diff --git a/Jenkinsfile b/Jenkinsfile index 215ff1bdded..ce404bfea1f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ #!/usr/bin/groovy -/* Copyright (C) 2019 Intel Corporation +/* Copyright (C) 2019-2023 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,11 +38,10 @@ */ // To use a test branch (i.e. PR) until it lands to master // I.e. for testing library changes -//@Library(value="pipeline-lib@your_branch") _ +@Library(value="pipeline-lib@bmurrell/el9") _ -// no debian/ support yet -// no pmix for leap15 yet -packageBuildingPipeline(['distros' : ['centos7', 'el8', 'leap15'], +/* groovylint-disable-next-line CompileStatic */ +packageBuildingPipeline(['distros' : ['centos7', 'el8', 'el9', 'leap15', 'ubuntu20.04'], 'publish_branch': 'daos_adio-rpm', 'make args' : 'CHROOT=true -f Makefile-rpm.mk', 'add_make_targets': 'romio-tarball', diff --git a/Makefile-rpm.mk b/Makefile-rpm.mk index c25d77667e1..2e84dd16b3f 100644 --- a/Makefile-rpm.mk +++ b/Makefile-rpm.mk @@ -112,29 +112,37 @@ mpich.spec: FORCE CHROOT ?= false CHROOT_NAME ?= epel-7-x86_64 +ifeq ($(ID_LIKE),debian) +ROMIO_DIR := BUILD/mpich-$(VERSION)/src/mpi/romio +ROMIO_PREFIX := _topdir +else +ifeq ($(CHROOT),true) +ROMIO_PREFIX := /var/lib/mock/$(CHROOT_NAME)/root/builddir/build +CHROOT_ROMIO_PREFIX := /builddir/build +else +ROMIO_PREFIX := _topdir +endif +ROMIO_DIR := BUILD/mpich-$(DL_VERSION)/src/mpi/romio +endif romio-$(DL_VERSION).tar.gz: FORCE - set -e; \ - if $(CHROOT); then \ - romio_prefix=/var/lib/mock/$(CHROOT_NAME)/root/builddir/build; \ - chroot_romio_prefix=/builddir/build; \ - else \ - romio_prefix=_topdir; \ - fi; \ - romio_dir=BUILD/mpich-$(DL_VERSION)/src/mpi/romio; \ - if grep "MPI_LIB = /" $$romio_prefix/$$romio_dir/test/Makefile; then \ - trap 'mv $$romio_prefix/$$romio_dir/test/Makefile{.old,}' EXIT; \ - mv $$romio_prefix/$$romio_dir/test/Makefile{,.old}; \ - sed -e 's/\(MPI_LIB = \)\/\(.*\)/\1-L\/\2/' \ - < $$romio_prefix/$$romio_dir/test/Makefile.old \ - > $$romio_prefix/$$romio_dir/test/Makefile; \ - fi; \ - if $(CHROOT); then \ - mock -r $(CHROOT_NAME) --chroot \ - "make -C $$chroot_romio_prefix/$$romio_dir clean"; \ - else \ - make -C $$romio_prefix/$$romio_dir clean; \ - fi; \ - tar -C $$romio_prefix/$$romio_dir/.. --exclude Makefile.old \ + set -e; \ + if [ -f $(ROMIO_PREFIX)/$(ROMIO_DIR)/test/Makefile ] && \ + grep "MPI_LIB = /" $(ROMIO_PREFIX)/$(ROMIO_DIR)/test/Makefile; then \ + trap 'mv $(ROMIO_PREFIX)/$(ROMIO_DIR)/test/Makefile{.old,}' EXIT; \ + mv $(ROMIO_PREFIX)/$(ROMIO_DIR)/test/Makefile{,.old}; \ + sed -e 's/\(MPI_LIB = \)\/\(.*\)/\1-L\/\2/' \ + < $(ROMIO_PREFIX)/$(ROMIO_DIR)/test/Makefile.old \ + > $(ROMIO_PREFIX)/$(ROMIO_DIR)/test/Makefile; \ + fi; \ + if [ "$(ID_LIKE)" != "debian" ]; then \ + if $(CHROOT); then \ + mock -r $(CHROOT_NAME) --chroot \ + "make -C $(CHROOT_ROMIO_PREFIX)/$(ROMIO_DIR) clean"; \ + else \ + make -C $(ROMIO_PREFIX)/$(ROMIO_DIR) clean; \ + fi; \ + fi; \ + tar -C $(ROMIO_PREFIX)/$(ROMIO_DIR)/.. --exclude Makefile.old \ -czf romio-$(DL_VERSION).tar.gz romio romio-tarball: romio-$(DL_VERSION).tar.gz diff --git a/Makefile.old b/Makefile.old new file mode 100644 index 00000000000..5bfa2aa72b4 --- /dev/null +++ b/Makefile.old @@ -0,0 +1,50998 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +MAKE=make + +# -*- Mode: Makefile; -*- +# +# (C) 2011 by Argonne National Laboratory. +# See COPYRIGHT in top-level directory. +# + +# this file exists to ensure that files in the "maint" dir get distributed +# properly when we "make dist" + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# all of these routines are internal, nothing gets added to mpi_sources + +# -*- Mode: Makefile; -*- +# +# (C) 2015 by Argonne National Laboratory. +# See COPYRIGHT in top-level directory. +# +# AUTOGENERATED! DO NOT EDIT! +# +# This file is created by script src/binding/fortran/use_mpi_f08/buildiface + +# conditional includes/build of "sock" controlled in the past by +# @ch3subsystems@ + +### -*- Mode: Makefile; -*- +### vim: set ft=automake : +### +### (C) 2011 by Argonne National Laboratory. +### See COPYRIGHT in top-level directory. +### + + + + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/mpich +pkgincludedir = $(includedir)/mpich +pkglibdir = $(libdir)/mpich +pkglibexecdir = $(libexecdir)/mpich +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu +target_triplet = x86_64-pc-linux-gnu +bin_PROGRAMS = src/env/mpichversion$(EXEEXT) src/env/mpivars$(EXEEXT) \ + $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ + $(am__EXEEXT_4) +#am__append_1 = src/mpi/debugger/mpich_dll_defs.h + +# workaround the fact that autoconf is missing per-object flags by using a dummy +# convenience library that isn't installed +#am__append_2 = src/mpi/debugger/libdbginitdummy.la +#am__append_3 = $(top_builddir)/src/mpi/debugger/libdbginitdummy.la +#am__append_4 = lib/libtvmpich.la + +# Only clean/rebuild defmsg.h if maintainer mode rules are enabled (we are +# cheating slightly by looking inside the implementation of +# "AM_MAINTAINER_MODE"). +# force dependency-based rebuilds of defmsg.h to happen earlier than ".c" file +# compilations via BUILT_SOURCES +am__append_5 = $(top_srcdir)/src/mpi/errhan/defmsg.h +am__append_6 = $(top_srcdir)/src/mpi/errhan/defmsg.h +am__append_7 = src/mpi/romio +am__append_8 = src/mpi/romio +am__append_9 = src/mpi/romio +am__append_10 = src/mpi/romio +am__append_11 = src/mpi/romio/libromio.la + +# libpromio contains the PMPI symbols (unlike libpmpi, which contains MPI +# symbols) and should be added to libmpi as well +#am__append_12 = src/mpi/romio/libpromio.la + +# This was previously a hard copy (not a symlink) performed by config.status +# (specified via AC_CONFIG_COMMANDS). Ideally we would eliminate this "copy" +# altogether and just set -Iromio_include_dir, but MPE2's build system uses +# $(top_builddir)/bin/mpicc that can't handle more than one include dir. +# +# Using a symlink allows us to avoid trying to capture the full dependency chain +# of MPICH/mpio.h --> ROMIO/mpio.h --> ROMIO/mpio.h.in --> ROMIO/config.status --> ...MORE_AUTOTOOLS... +am__append_13 = $(top_builddir)/src/include/mpio.h +am__append_14 = $(top_builddir)/src/include/mpio.h +am__append_15 = src/binding/cxx/initcxx.cxx + +# avoid dependency problems and attain an effect similar to simplemake's "all-preamble" +am__append_16 = src/binding/cxx/mpicxx.h +am__append_17 = \ + src/binding/cxx/mpicxx.h + +am__append_18 = -I$(top_builddir)/src/binding/cxx +am__append_19 = src/binding/fortran/mpif_h/sendf.c \ + src/binding/fortran/mpif_h/recvf.c \ + src/binding/fortran/mpif_h/get_countf.c \ + src/binding/fortran/mpif_h/bsendf.c src/binding/fortran/mpif_h/ssendf.c \ + src/binding/fortran/mpif_h/rsendf.c \ + src/binding/fortran/mpif_h/bufattachf.c \ + src/binding/fortran/mpif_h/bufdetachf.c \ + src/binding/fortran/mpif_h/isendf.c \ + src/binding/fortran/mpif_h/ibsendf.c \ + src/binding/fortran/mpif_h/issendf.c \ + src/binding/fortran/mpif_h/irsendf.c \ + src/binding/fortran/mpif_h/irecvf.c src/binding/fortran/mpif_h/waitf.c \ + src/binding/fortran/mpif_h/testf.c \ + src/binding/fortran/mpif_h/request_freef.c \ + src/binding/fortran/mpif_h/waitanyf.c \ + src/binding/fortran/mpif_h/testanyf.c \ + src/binding/fortran/mpif_h/waitallf.c \ + src/binding/fortran/mpif_h/testallf.c \ + src/binding/fortran/mpif_h/waitsomef.c \ + src/binding/fortran/mpif_h/testsomef.c \ + src/binding/fortran/mpif_h/iprobef.c \ + src/binding/fortran/mpif_h/probef.c \ + src/binding/fortran/mpif_h/cancelf.c \ + src/binding/fortran/mpif_h/testcancelf.c \ + src/binding/fortran/mpif_h/send_initf.c \ + src/binding/fortran/mpif_h/bsend_initf.c \ + src/binding/fortran/mpif_h/ssend_initf.c \ + src/binding/fortran/mpif_h/rsend_initf.c \ + src/binding/fortran/mpif_h/recv_initf.c \ + src/binding/fortran/mpif_h/startf.c \ + src/binding/fortran/mpif_h/startallf.c \ + src/binding/fortran/mpif_h/sendrecvf.c \ + src/binding/fortran/mpif_h/sndrcvrplf.c \ + src/binding/fortran/mpif_h/typecontigf.c \ + src/binding/fortran/mpif_h/type_vectorf.c \ + src/binding/fortran/mpif_h/type_hvectorf.c \ + src/binding/fortran/mpif_h/type_indexedf.c \ + src/binding/fortran/mpif_h/type_hindexedf.c \ + src/binding/fortran/mpif_h/type_structf.c \ + src/binding/fortran/mpif_h/type_extentf.c \ + src/binding/fortran/mpif_h/type_sizef.c \ + src/binding/fortran/mpif_h/type_lbf.c \ + src/binding/fortran/mpif_h/type_ubf.c \ + src/binding/fortran/mpif_h/type_commitf.c \ + src/binding/fortran/mpif_h/type_freef.c \ + src/binding/fortran/mpif_h/get_elementsf.c \ + src/binding/fortran/mpif_h/packf.c src/binding/fortran/mpif_h/unpackf.c \ + src/binding/fortran/mpif_h/pack_sizef.c \ + src/binding/fortran/mpif_h/barrierf.c \ + src/binding/fortran/mpif_h/bcastf.c \ + src/binding/fortran/mpif_h/gatherf.c \ + src/binding/fortran/mpif_h/gathervf.c \ + src/binding/fortran/mpif_h/scatterf.c \ + src/binding/fortran/mpif_h/scattervf.c \ + src/binding/fortran/mpif_h/allgatherf.c \ + src/binding/fortran/mpif_h/allgathervf.c \ + src/binding/fortran/mpif_h/alltoallf.c \ + src/binding/fortran/mpif_h/alltoallvf.c \ + src/binding/fortran/mpif_h/alltoallwf.c \ + src/binding/fortran/mpif_h/exscanf.c \ + src/binding/fortran/mpif_h/reducef.c \ + src/binding/fortran/mpif_h/op_createf.c \ + src/binding/fortran/mpif_h/op_freef.c \ + src/binding/fortran/mpif_h/allreducef.c \ + src/binding/fortran/mpif_h/redscatf.c \ + src/binding/fortran/mpif_h/scanf.c \ + src/binding/fortran/mpif_h/group_sizef.c \ + src/binding/fortran/mpif_h/group_rankf.c \ + src/binding/fortran/mpif_h/grouptranksf.c \ + src/binding/fortran/mpif_h/group_comparef.c \ + src/binding/fortran/mpif_h/comm_groupf.c \ + src/binding/fortran/mpif_h/group_unionf.c \ + src/binding/fortran/mpif_h/groupinterf.c \ + src/binding/fortran/mpif_h/groupdifff.c \ + src/binding/fortran/mpif_h/group_inclf.c \ + src/binding/fortran/mpif_h/group_exclf.c \ + src/binding/fortran/mpif_h/grouprinclf.c \ + src/binding/fortran/mpif_h/grouprexclf.c \ + src/binding/fortran/mpif_h/group_freef.c \ + src/binding/fortran/mpif_h/comm_sizef.c \ + src/binding/fortran/mpif_h/comm_rankf.c \ + src/binding/fortran/mpif_h/comm_comparef.c \ + src/binding/fortran/mpif_h/comm_dupf.c \ + src/binding/fortran/mpif_h/comm_dup_with_infof.c \ + src/binding/fortran/mpif_h/comm_createf.c \ + src/binding/fortran/mpif_h/comm_splitf.c \ + src/binding/fortran/mpif_h/comm_freef.c \ + src/binding/fortran/mpif_h/commtesticf.c \ + src/binding/fortran/mpif_h/commrsizef.c \ + src/binding/fortran/mpif_h/commrgroupf.c \ + src/binding/fortran/mpif_h/iccreatef.c \ + src/binding/fortran/mpif_h/icmergef.c \ + src/binding/fortran/mpif_h/keyval_freef.c \ + src/binding/fortran/mpif_h/attr_putf.c \ + src/binding/fortran/mpif_h/attr_getf.c \ + src/binding/fortran/mpif_h/attr_deletef.c \ + src/binding/fortran/mpif_h/topo_testf.c \ + src/binding/fortran/mpif_h/cart_createf.c \ + src/binding/fortran/mpif_h/dims_createf.c \ + src/binding/fortran/mpif_h/graph_createf.c \ + src/binding/fortran/mpif_h/graphdims_getf.c \ + src/binding/fortran/mpif_h/graph_getf.c \ + src/binding/fortran/mpif_h/cartdim_getf.c \ + src/binding/fortran/mpif_h/cart_getf.c \ + src/binding/fortran/mpif_h/cart_rankf.c \ + src/binding/fortran/mpif_h/cart_coordsf.c \ + src/binding/fortran/mpif_h/grfnbcountf.c \ + src/binding/fortran/mpif_h/grfnbrsf.c \ + src/binding/fortran/mpif_h/cart_shiftf.c \ + src/binding/fortran/mpif_h/cart_subf.c \ + src/binding/fortran/mpif_h/cart_mapf.c \ + src/binding/fortran/mpif_h/graph_mapf.c \ + src/binding/fortran/mpif_h/getpnamef.c \ + src/binding/fortran/mpif_h/get_versionf.c \ + src/binding/fortran/mpif_h/get_library_versionf.c \ + src/binding/fortran/mpif_h/errhcreatef.c \ + src/binding/fortran/mpif_h/errhsetf.c \ + src/binding/fortran/mpif_h/errhgetf.c \ + src/binding/fortran/mpif_h/errhfreef.c \ + src/binding/fortran/mpif_h/error_stringf.c \ + src/binding/fortran/mpif_h/error_classf.c \ + src/binding/fortran/mpif_h/finalizef.c \ + src/binding/fortran/mpif_h/initializedf.c \ + src/binding/fortran/mpif_h/abortf.c \ + src/binding/fortran/mpif_h/close_portf.c \ + src/binding/fortran/mpif_h/comm_acceptf.c \ + src/binding/fortran/mpif_h/comm_connectf.c \ + src/binding/fortran/mpif_h/commdiscf.c \ + src/binding/fortran/mpif_h/commparentf.c \ + src/binding/fortran/mpif_h/comm_joinf.c \ + src/binding/fortran/mpif_h/comm_spawnf.c \ + src/binding/fortran/mpif_h/spawnmultf.c \ + src/binding/fortran/mpif_h/lookup_namef.c \ + src/binding/fortran/mpif_h/open_portf.c \ + src/binding/fortran/mpif_h/publish_namef.c \ + src/binding/fortran/mpif_h/unpubnamef.c \ + src/binding/fortran/mpif_h/comm_set_infof.c \ + src/binding/fortran/mpif_h/comm_get_infof.c \ + src/binding/fortran/mpif_h/accumulatef.c \ + src/binding/fortran/mpif_h/getf.c src/binding/fortran/mpif_h/putf.c \ + src/binding/fortran/mpif_h/win_completef.c \ + src/binding/fortran/mpif_h/win_createf.c \ + src/binding/fortran/mpif_h/win_fencef.c \ + src/binding/fortran/mpif_h/win_freef.c \ + src/binding/fortran/mpif_h/win_get_groupf.c \ + src/binding/fortran/mpif_h/win_lockf.c \ + src/binding/fortran/mpif_h/win_postf.c \ + src/binding/fortran/mpif_h/win_startf.c \ + src/binding/fortran/mpif_h/win_testf.c \ + src/binding/fortran/mpif_h/win_unlockf.c \ + src/binding/fortran/mpif_h/win_waitf.c \ + src/binding/fortran/mpif_h/win_allocatef.c \ + src/binding/fortran/mpif_h/win_allocate_sharedf.c \ + src/binding/fortran/mpif_h/win_shared_queryf.c \ + src/binding/fortran/mpif_h/win_create_dynamicf.c \ + src/binding/fortran/mpif_h/win_attachf.c \ + src/binding/fortran/mpif_h/win_detachf.c \ + src/binding/fortran/mpif_h/win_get_infof.c \ + src/binding/fortran/mpif_h/win_set_infof.c \ + src/binding/fortran/mpif_h/get_accumulatef.c \ + src/binding/fortran/mpif_h/fetch_and_opf.c \ + src/binding/fortran/mpif_h/compare_and_swapf.c \ + src/binding/fortran/mpif_h/rputf.c src/binding/fortran/mpif_h/rgetf.c \ + src/binding/fortran/mpif_h/raccumulatef.c \ + src/binding/fortran/mpif_h/rget_accumulatef.c \ + src/binding/fortran/mpif_h/win_lock_allf.c \ + src/binding/fortran/mpif_h/win_unlock_allf.c \ + src/binding/fortran/mpif_h/win_flushf.c \ + src/binding/fortran/mpif_h/win_flush_allf.c \ + src/binding/fortran/mpif_h/win_flush_localf.c \ + src/binding/fortran/mpif_h/win_flush_local_allf.c \ + src/binding/fortran/mpif_h/win_syncf.c \ + src/binding/fortran/mpif_h/adderrclassf.c \ + src/binding/fortran/mpif_h/adderrcodef.c \ + src/binding/fortran/mpif_h/adderrstringf.c \ + src/binding/fortran/mpif_h/commcallerrf.c \ + src/binding/fortran/mpif_h/commnewkeyf.c \ + src/binding/fortran/mpif_h/commdelattrf.c \ + src/binding/fortran/mpif_h/commfreekeyf.c \ + src/binding/fortran/mpif_h/comm_get_attrf.c \ + src/binding/fortran/mpif_h/commgetnamf.c \ + src/binding/fortran/mpif_h/comm_set_attrf.c \ + src/binding/fortran/mpif_h/comm_set_namef.c \ + src/binding/fortran/mpif_h/filecallerrf.c \ + src/binding/fortran/mpif_h/greqcompletef.c \ + src/binding/fortran/mpif_h/greqstartf.c \ + src/binding/fortran/mpif_h/isthrmainf.c \ + src/binding/fortran/mpif_h/query_threadf.c \ + src/binding/fortran/mpif_h/statgetclf.c \ + src/binding/fortran/mpif_h/statsetelf.c \ + src/binding/fortran/mpif_h/typenewkeyf.c \ + src/binding/fortran/mpif_h/typedelattrf.c \ + src/binding/fortran/mpif_h/type_dupf.c \ + src/binding/fortran/mpif_h/typefreekeyf.c \ + src/binding/fortran/mpif_h/type_get_attrf.c \ + src/binding/fortran/mpif_h/typegetcntsf.c \ + src/binding/fortran/mpif_h/typegetenvf.c \ + src/binding/fortran/mpif_h/typegnamef.c \ + src/binding/fortran/mpif_h/typesetattrf.c \ + src/binding/fortran/mpif_h/typesetnamef.c \ + src/binding/fortran/mpif_h/type_match_sizef.c \ + src/binding/fortran/mpif_h/wincallerrf.c \ + src/binding/fortran/mpif_h/winnewkeyf.c \ + src/binding/fortran/mpif_h/windelattrf.c \ + src/binding/fortran/mpif_h/winfreekeyf.c \ + src/binding/fortran/mpif_h/win_get_attrf.c \ + src/binding/fortran/mpif_h/win_get_namef.c \ + src/binding/fortran/mpif_h/win_set_attrf.c \ + src/binding/fortran/mpif_h/win_set_namef.c \ + src/binding/fortran/mpif_h/alloc_memf.c \ + src/binding/fortran/mpif_h/commcreerrf.c \ + src/binding/fortran/mpif_h/commgeterrf.c \ + src/binding/fortran/mpif_h/commseterrf.c \ + src/binding/fortran/mpif_h/filecreerrf.c \ + src/binding/fortran/mpif_h/filegeterrf.c \ + src/binding/fortran/mpif_h/fileseterrf.c \ + src/binding/fortran/mpif_h/finalizedf.c \ + src/binding/fortran/mpif_h/free_memf.c \ + src/binding/fortran/mpif_h/info_createf.c \ + src/binding/fortran/mpif_h/info_deletef.c \ + src/binding/fortran/mpif_h/info_dupf.c \ + src/binding/fortran/mpif_h/info_freef.c \ + src/binding/fortran/mpif_h/info_getf.c \ + src/binding/fortran/mpif_h/infognkf.c \ + src/binding/fortran/mpif_h/infognthkf.c \ + src/binding/fortran/mpif_h/infovallenf.c \ + src/binding/fortran/mpif_h/info_setf.c \ + src/binding/fortran/mpif_h/pack_externalf.c \ + src/binding/fortran/mpif_h/packesizef.c \ + src/binding/fortran/mpif_h/reqgetstatf.c \ + src/binding/fortran/mpif_h/typedarrayf.c \ + src/binding/fortran/mpif_h/typechindf.c \ + src/binding/fortran/mpif_h/typechvecf.c \ + src/binding/fortran/mpif_h/typecindbf.c \ + src/binding/fortran/mpif_h/type_create_hindexed_blockf.c \ + src/binding/fortran/mpif_h/typecresizef.c \ + src/binding/fortran/mpif_h/typecstructf.c \ + src/binding/fortran/mpif_h/typecsubarrf.c \ + src/binding/fortran/mpif_h/typegetextentf.c \ + src/binding/fortran/mpif_h/typegtextf.c \ + src/binding/fortran/mpif_h/unpackextf.c \ + src/binding/fortran/mpif_h/wincreerrf.c \ + src/binding/fortran/mpif_h/wingeterrf.c \ + src/binding/fortran/mpif_h/winseterrf.c \ + src/binding/fortran/mpif_h/reduce_localf.c \ + src/binding/fortran/mpif_h/op_commutativef.c \ + src/binding/fortran/mpif_h/reduce_scatter_blockf.c \ + src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c \ + src/binding/fortran/mpif_h/dist_graph_createf.c \ + src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c \ + src/binding/fortran/mpif_h/dist_graph_neighborsf.c \ + src/binding/fortran/mpif_h/improbef.c \ + src/binding/fortran/mpif_h/imrecvf.c \ + src/binding/fortran/mpif_h/mprobef.c \ + src/binding/fortran/mpif_h/mrecvf.c \ + src/binding/fortran/mpif_h/comm_idupf.c \ + src/binding/fortran/mpif_h/ibarrierf.c \ + src/binding/fortran/mpif_h/ibcastf.c \ + src/binding/fortran/mpif_h/igatherf.c \ + src/binding/fortran/mpif_h/igathervf.c \ + src/binding/fortran/mpif_h/iscatterf.c \ + src/binding/fortran/mpif_h/iscattervf.c \ + src/binding/fortran/mpif_h/iallgatherf.c \ + src/binding/fortran/mpif_h/iallgathervf.c \ + src/binding/fortran/mpif_h/ialltoallf.c \ + src/binding/fortran/mpif_h/ialltoallvf.c \ + src/binding/fortran/mpif_h/ialltoallwf.c \ + src/binding/fortran/mpif_h/ireducef.c \ + src/binding/fortran/mpif_h/iallreducef.c \ + src/binding/fortran/mpif_h/ireduce_scatterf.c \ + src/binding/fortran/mpif_h/ireduce_scatter_blockf.c \ + src/binding/fortran/mpif_h/iscanf.c \ + src/binding/fortran/mpif_h/iexscanf.c \ + src/binding/fortran/mpif_h/ineighbor_allgatherf.c \ + src/binding/fortran/mpif_h/ineighbor_allgathervf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallvf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallwf.c \ + src/binding/fortran/mpif_h/neighbor_allgatherf.c \ + src/binding/fortran/mpif_h/neighbor_allgathervf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallvf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallwf.c \ + src/binding/fortran/mpif_h/comm_split_typef.c \ + src/binding/fortran/mpif_h/get_elements_xf.c \ + src/binding/fortran/mpif_h/status_set_elements_xf.c \ + src/binding/fortran/mpif_h/type_get_extent_xf.c \ + src/binding/fortran/mpif_h/type_get_true_extent_xf.c \ + src/binding/fortran/mpif_h/type_size_xf.c \ + src/binding/fortran/mpif_h/comm_create_groupf.c \ + src/binding/fortran/mpif_h/comm_failure_ackf.c \ + src/binding/fortran/mpif_h/comm_failure_get_ackedf.c \ + src/binding/fortran/mpif_h/comm_revokef.c \ + src/binding/fortran/mpif_h/comm_shrinkf.c \ + src/binding/fortran/mpif_h/comm_agreef.c \ + src/binding/fortran/mpif_h/file_openf.c \ + src/binding/fortran/mpif_h/file_closef.c \ + src/binding/fortran/mpif_h/file_deletef.c \ + src/binding/fortran/mpif_h/file_set_sizef.c \ + src/binding/fortran/mpif_h/file_preallocatef.c \ + src/binding/fortran/mpif_h/file_get_sizef.c \ + src/binding/fortran/mpif_h/file_get_groupf.c \ + src/binding/fortran/mpif_h/file_get_amodef.c \ + src/binding/fortran/mpif_h/file_set_infof.c \ + src/binding/fortran/mpif_h/file_get_infof.c \ + src/binding/fortran/mpif_h/file_set_viewf.c \ + src/binding/fortran/mpif_h/file_get_viewf.c \ + src/binding/fortran/mpif_h/file_read_atf.c \ + src/binding/fortran/mpif_h/file_read_at_allf.c \ + src/binding/fortran/mpif_h/file_write_atf.c \ + src/binding/fortran/mpif_h/file_write_at_allf.c \ + src/binding/fortran/mpif_h/file_iread_atf.c \ + src/binding/fortran/mpif_h/file_iwrite_atf.c \ + src/binding/fortran/mpif_h/file_readf.c \ + src/binding/fortran/mpif_h/file_read_allf.c \ + src/binding/fortran/mpif_h/file_writef.c \ + src/binding/fortran/mpif_h/file_write_allf.c \ + src/binding/fortran/mpif_h/file_ireadf.c \ + src/binding/fortran/mpif_h/file_iwritef.c \ + src/binding/fortran/mpif_h/file_seekf.c \ + src/binding/fortran/mpif_h/file_get_positionf.c \ + src/binding/fortran/mpif_h/file_get_byte_offsetf.c \ + src/binding/fortran/mpif_h/file_read_sharedf.c \ + src/binding/fortran/mpif_h/file_write_sharedf.c \ + src/binding/fortran/mpif_h/file_iread_sharedf.c \ + src/binding/fortran/mpif_h/file_iwrite_sharedf.c \ + src/binding/fortran/mpif_h/file_read_orderedf.c \ + src/binding/fortran/mpif_h/file_write_orderedf.c \ + src/binding/fortran/mpif_h/file_seek_sharedf.c \ + src/binding/fortran/mpif_h/file_get_position_sharedf.c \ + src/binding/fortran/mpif_h/file_read_at_all_beginf.c \ + src/binding/fortran/mpif_h/file_read_at_all_endf.c \ + src/binding/fortran/mpif_h/file_write_at_all_beginf.c \ + src/binding/fortran/mpif_h/file_write_at_all_endf.c \ + src/binding/fortran/mpif_h/file_read_all_beginf.c \ + src/binding/fortran/mpif_h/file_read_all_endf.c \ + src/binding/fortran/mpif_h/file_write_all_beginf.c \ + src/binding/fortran/mpif_h/file_write_all_endf.c \ + src/binding/fortran/mpif_h/file_read_ordered_beginf.c \ + src/binding/fortran/mpif_h/file_read_ordered_endf.c \ + src/binding/fortran/mpif_h/file_write_ordered_beginf.c \ + src/binding/fortran/mpif_h/file_write_ordered_endf.c \ + src/binding/fortran/mpif_h/file_get_type_extentf.c \ + src/binding/fortran/mpif_h/register_datarepf.c \ + src/binding/fortran/mpif_h/file_set_atomicityf.c \ + src/binding/fortran/mpif_h/file_get_atomicityf.c \ + src/binding/fortran/mpif_h/file_syncf.c \ + src/binding/fortran/mpif_h/file_iread_at_allf.c \ + src/binding/fortran/mpif_h/file_iwrite_at_allf.c \ + src/binding/fortran/mpif_h/file_iread_allf.c \ + src/binding/fortran/mpif_h/file_iwrite_allf.c \ + src/binding/fortran/mpif_h/initf.c \ + src/binding/fortran/mpif_h/initthreadf.c \ + src/binding/fortran/mpif_h/pcontrolf.c \ + src/binding/fortran/mpif_h/addressf.c \ + src/binding/fortran/mpif_h/getaddressf.c \ + src/binding/fortran/mpif_h/wtimef.c src/binding/fortran/mpif_h/wtickf.c \ + src/binding/fortran/mpif_h/aint_addf.c \ + src/binding/fortran/mpif_h/aint_difff.c \ + src/binding/fortran/mpif_h/keyval_createf.c \ + src/binding/fortran/mpif_h/dup_fnf.c \ + src/binding/fortran/mpif_h/null_del_fnf.c \ + src/binding/fortran/mpif_h/null_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_comm_fnf.c \ + src/binding/fortran/mpif_h/null_comm_del_fnf.c \ + src/binding/fortran/mpif_h/null_comm_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_win_fnf.c \ + src/binding/fortran/mpif_h/null_win_del_fnf.c \ + src/binding/fortran/mpif_h/null_win_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_type_fnf.c \ + src/binding/fortran/mpif_h/null_type_del_fnf.c \ + src/binding/fortran/mpif_h/null_type_copy_fnf.c + +am__append_20 = src/binding/fortran/mpif_h/fdebug.c \ + src/binding/fortran/mpif_h/setbot.c \ + src/binding/fortran/mpif_h/setbotf.f + +am__append_21 = src/binding/fortran/mpif_h/statusf2c.c src/binding/fortran/mpif_h/statusc2f.c + +# FIXME does AM_CPPFLAGS need to be included elsewhere somehow in the +# target-specific variable? +am__append_22 = -I${master_top_srcdir}/src/binding/fortran/mpif_h +am__append_23 = src/binding/fortran/mpif_h/fproto.h src/binding/fortran/mpif_h/mpi_fortimpl.h + +# config.status copies src/binding/fortran/mpif_h/mpif.h to src/include (see the relevant +# AC_OUTPUT_COMMANDS in configure.ac), so we need to delete it at distclean time +# too. More work is needed in this Makefile.mk to keep src/include/mpif.h up to +# date w.r.t. the src/binding/fortran/mpif_h version. +am__append_24 = src/binding/fortran/mpif_h/mpif.h src/include/mpif.h +am__append_25 = src/binding/fortran/mpif_h/mpif.h + +# We need to tell some compilers (e.g., Solaris f90) to look for modules in the +# current directory when the source file is not in the working directory (i.e., +# in a VPATH build) +am__append_26 = -Isrc/binding/fortran/use_mpi + +# C source that implements both the C and the Fortran bindings for the type +# creation routines. These go into libmpi.la and will be built a second time +# for inclusion in libpmpi.la on platforms that do not support weak symbols. +# If shared libraries are enabled then the compilation space doubles again. +am__append_27 = \ + src/binding/fortran/use_mpi/create_f90_int.c \ + src/binding/fortran/use_mpi/create_f90_real.c \ + src/binding/fortran/use_mpi/create_f90_complex.c + + +# utility code that has no PMPI equivalent +am__append_28 = src/binding/fortran/use_mpi/create_f90_util.c +am__append_29 = -Isrc/binding/fortran/use_mpi +am__append_30 = \ + src/binding/fortran/use_mpi/create_f90_util.h \ + src/binding/fortran/use_mpi/cf90t.h \ + src/binding/fortran/use_mpi/mpif90type.h \ + src/binding/fortran/use_mpi/mpifnoext.h + +am__append_31 = \ + src/binding/fortran/use_mpi/mpif90model.h + + +# cause any .$(MOD) files to be output in the f90 bindings directory instead of +# the current directory +am__append_32 = $(FCMODOUTFLAG)src/binding/fortran/use_mpi +am__append_33 = \ + src/binding/fortran/use_mpi/typef90cmplxf.c \ + src/binding/fortran/use_mpi/typef90realf.c \ + src/binding/fortran/use_mpi/typef90intf.c \ + src/binding/fortran/use_mpi/mpi.f90 \ + src/binding/fortran/use_mpi/mpi_constants.f90 \ + src/binding/fortran/use_mpi/mpi_sizeofs.f90 \ + src/binding/fortran/use_mpi/mpi_base.f90 + +am__append_34 = src/binding/fortran/use_mpi/mpi.$(MOD)-stamp \ + src/binding/fortran/use_mpi/$(MPIMOD).$(MOD) \ + src/binding/fortran/use_mpi/mpi.lo \ + src/binding/fortran/use_mpi/mpi-tmp \ + src/binding/fortran/use_mpi/mpi_constants.$(MOD)-stamp \ + src/binding/fortran/use_mpi/$(MPICONSTMOD).$(MOD) \ + src/binding/fortran/use_mpi/mpi_constants.lo \ + src/binding/fortran/use_mpi/mpi_constants-tmp \ + src/binding/fortran/use_mpi/mpi_sizeofs.$(MOD)-stamp \ + src/binding/fortran/use_mpi/$(MPISIZEOFMOD).$(MOD) \ + src/binding/fortran/use_mpi/mpi_sizeofs.lo \ + src/binding/fortran/use_mpi/mpi_sizeofs-tmp \ + src/binding/fortran/use_mpi/mpi_base.$(MOD)-stamp \ + src/binding/fortran/use_mpi/$(MPIBASEMOD).$(MOD) \ + src/binding/fortran/use_mpi/mpi_base.lo \ + src/binding/fortran/use_mpi/mpi_base-tmp \ + src/binding/fortran/use_mpi/mpifnoext.h \ + $(mpi_fc_modules) +am__append_35 = \ + src/binding/fortran/use_mpi/$(MPIMOD).$(MOD) \ + src/binding/fortran/use_mpi/$(MPISIZEOFMOD).$(MOD) \ + src/binding/fortran/use_mpi/$(MPICONSTMOD).$(MOD) \ + src/binding/fortran/use_mpi/$(MPIBASEMOD).$(MOD) + +am__append_36 = $(mpi_sources) fproto.h +#am__append_37 = -Isrc/binding/fortran/use_mpi_f08 +#am__append_38 = src/binding/fortran/use_mpi_f08/pmpi_f08.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_f08.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_f08_types.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/abort_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/accumulate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/add_error_class_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/add_error_code_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/add_error_string_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/aint_add_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/aint_diff_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/allgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/allgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/alloc_mem_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/allreduce_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/alltoall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/alltoallv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/alltoallw_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/barrier_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/bcast_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/bsend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/bsend_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/buffer_attach_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/buffer_detach_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cancel_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_coords_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_map_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_rank_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_shift_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_sub_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cartdim_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/close_port_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_accept_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_call_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_compare_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_connect_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_delete_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_disconnect_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_dup_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_dup_with_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_free_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_parent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_idup_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_join_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_rank_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_remote_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_remote_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_multiple_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_split_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_split_type_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_test_inter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/compare_and_swap_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dims_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_create_adjacent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_neighbors_count_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_neighbors_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/errhandler_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/error_class_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/error_string_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/exscan_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/f_sync_reg_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/fetch_and_op_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_call_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_close_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_create_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_delete_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_amode_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_atomicity_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_byte_offset_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_position_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_position_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_type_extent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_view_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_open_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_preallocate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_seek_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_seek_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_atomicity_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_view_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_sync_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/finalize_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/finalized_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/free_mem_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/gather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/gatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_accumulate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_address_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_count_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_elements_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_elements_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_library_version_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_processor_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_version_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_map_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_neighbors_count_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_neighbors_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graphdims_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/grequest_complete_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/grequest_start_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_compare_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_difference_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_excl_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_incl_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_intersection_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_range_excl_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_range_incl_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_rank_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_translate_ranks_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_union_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iallgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iallgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iallreduce_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ialltoall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ialltoallv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ialltoallw_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ibarrier_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ibcast_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ibsend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iexscan_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/igather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/igatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/improbe_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/imrecv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_allgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_allgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoallv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoallw_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_delete_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_dup_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_get_nkeys_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_get_nthkey_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_get_valuelen_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_set_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/init_thread_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/initialized_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/intercomm_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/intercomm_merge_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iprobe_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/irecv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_scatter_block_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_scatter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/irsend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/is_thread_main_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iscan_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iscatter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iscatterv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/isend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/issend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/lookup_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/mprobe_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/mrecv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_allgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_allgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoallv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoallw_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/op_commutative_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/op_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/op_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/open_port_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pack_external_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pack_external_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pack_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pack_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pcontrol_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/probe_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/publish_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/put_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/query_thread_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/raccumulate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/recv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/recv_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/reduce_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/reduce_local_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/reduce_scatter_block_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/reduce_scatter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/register_datarep_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/request_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/request_get_status_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rget_accumulate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rget_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rput_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rsend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rsend_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/scan_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/scatter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/scatterv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/send_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/send_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/sendrecv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/sendrecv_replace_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ssend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ssend_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/start_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/startall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/status_set_cancelled_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/status_set_elements_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/status_set_elements_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/test_cancelled_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/test_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/testall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/testany_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/testsome_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/topo_test_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_commit_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_contiguous_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_darray_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_complex_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_integer_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_real_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hindexed_block_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hindexed_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hvector_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_indexed_block_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_resized_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_struct_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_subarray_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_delete_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_dup_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_free_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_contents_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_envelope_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_extent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_extent_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_true_extent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_true_extent_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_indexed_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_match_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_set_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_set_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_size_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_vector_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/unpack_external_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/unpack_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/unpublish_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/wait_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/waitall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/waitany_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/waitsome_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_attach_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_call_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_complete_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_create_dynamic_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_create_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_create_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_delete_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_detach_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_fence_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_free_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_post_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_set_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_set_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_set_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_set_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_shared_query_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_start_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_sync_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_test_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_wait_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/wtick_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/wtime_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pabort_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paccumulate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_class_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_code_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_string_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paint_add_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paint_diff_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palloc_mem_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallreduce_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoallv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoallw_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbarrier_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbcast_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbsend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbsend_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbuffer_attach_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbuffer_detach_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcancel_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_coords_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_map_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_rank_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_shift_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_sub_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcartdim_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pclose_port_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_accept_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_call_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_compare_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_connect_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_delete_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_disconnect_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_dup_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_dup_with_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_free_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_parent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_idup_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_join_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_rank_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_remote_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_remote_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_spawn_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_spawn_multiple_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_split_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_split_type_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_test_inter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcompare_and_swap_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdims_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_create_adjacent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_neighbors_count_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_neighbors_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perrhandler_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perror_class_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perror_string_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pexscan_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pf_sync_reg_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfetch_and_op_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_call_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_close_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_create_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_delete_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_amode_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_atomicity_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_byte_offset_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_position_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_position_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_type_extent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_view_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_at_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_at_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_at_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_at_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_open_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_preallocate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_seek_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_seek_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_atomicity_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_view_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_sync_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_begin_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_end_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfinalize_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfinalized_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfree_mem_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_accumulate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_address_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_count_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_elements_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_elements_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_library_version_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_processor_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_version_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_map_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_neighbors_count_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_neighbors_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraphdims_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgrequest_complete_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgrequest_start_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_compare_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_difference_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_excl_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_incl_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_intersection_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_range_excl_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_range_incl_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_rank_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_translate_ranks_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_union_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallreduce_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoallv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoallw_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibarrier_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibcast_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibsend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piexscan_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pigather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pigatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pimprobe_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pimrecv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_allgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_allgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoallv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoallw_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_delete_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_dup_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_nkeys_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_nthkey_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_valuelen_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_set_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinit_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinit_thread_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinitialized_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pintercomm_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pintercomm_merge_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piprobe_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pirecv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_scatter_block_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_scatter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pirsend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pis_thread_main_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscan_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscatter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscatterv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pisend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pissend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/plookup_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pmprobe_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pmrecv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_allgather_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_allgatherv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoallv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoallw_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_commutative_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/popen_port_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_external_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_external_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppcontrol_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pprobe_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppublish_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pput_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pquery_thread_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/praccumulate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/precv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/precv_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_local_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_scatter_block_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_scatter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pregister_datarep_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prequest_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prequest_get_status_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prget_accumulate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prget_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prput_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prsend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prsend_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscan_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscatter_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscatterv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psend_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psendrecv_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psendrecv_replace_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pssend_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pssend_init_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstart_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstartall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_cancelled_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_elements_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_elements_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptest_cancelled_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptest_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestany_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestsome_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptopo_test_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_commit_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_contiguous_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_darray_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_complex_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_integer_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_real_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hindexed_block_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hindexed_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hvector_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_indexed_block_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_resized_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_struct_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_subarray_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_delete_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_dup_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_free_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_contents_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_envelope_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_extent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_extent_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_true_extent_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_true_extent_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_indexed_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_match_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_set_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_set_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_size_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_size_x_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_vector_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpack_external_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpack_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpublish_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwait_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitall_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitany_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitsome_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_allocate_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_allocate_shared_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_attach_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_call_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_complete_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_dynamic_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_delete_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_detach_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_fence_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_local_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_local_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_free_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_free_keyval_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_group_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_lock_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_lock_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_post_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_attr_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_errhandler_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_info_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_name_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_shared_query_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_start_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_sync_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_test_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_unlock_all_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_unlock_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_wait_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwtick_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwtime_f08ts.f90 \ +# src/binding/fortran/use_mpi_f08/wrappers_c/send_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/recv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/bsend_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ssend_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/rsend_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/buffer_attach_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/isend_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ibsend_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/issend_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/irsend_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/irecv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/send_init_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/bsend_init_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ssend_init_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/rsend_init_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/recv_init_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_replace_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/pack_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/unpack_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/bcast_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/gather_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/gatherv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/scatter_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/scatterv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/allgather_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/allgatherv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/alltoall_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/alltoallv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/alltoallw_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/exscan_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/reduce_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/allreduce_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/scan_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/accumulate_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/get_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/put_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/win_create_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/win_attach_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/win_detach_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/get_accumulate_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/fetch_and_op_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/compare_and_swap_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/rput_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/rget_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/raccumulate_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/rget_accumulate_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/free_mem_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/get_address_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/pack_external_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/unpack_external_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/reduce_local_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_block_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/imrecv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/mrecv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ibcast_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/igather_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/igatherv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/iscatter_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/iscatterv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/iallgather_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/iallgatherv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ialltoall_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallw_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/iallreduce_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_block_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/iscan_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/iexscan_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgather_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgatherv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoall_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallw_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgather_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgatherv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoall_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallv_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallw_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_shared_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_shared_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_shared_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_shared_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_begin_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_end_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_begin_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_end_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_begin_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_end_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_begin_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_end_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_begin_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_end_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_begin_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_end_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_all_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_all_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_all_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_all_cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_c.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c \ +# src/binding/fortran/use_mpi_f08/wrappers_c/utils.c +#am__append_39 = \ +# src/binding/fortran/use_mpi_f08/$(PMPI_F08_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_CALLBACKS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_COMPILE_CONSTANTS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_LINK_CONSTANTS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_TYPES_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_CDESC_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_GLUE_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NOBUF_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_TYPES_NAME).$(MOD) + +#am__append_40 = $(f08_module_files) +#am__append_41 = $(f08_module_files) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_LINK_CONSTANTS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.tmp \ +# src/binding/fortran/use_mpi_f08/$(PMPI_F08_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/pmpi_f08.lo \ +# src/binding/fortran/use_mpi_f08/pmpi_f08.stamp \ +# src/binding/fortran/use_mpi_f08/pmpi_f08.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_CALLBACKS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_GLUE_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_TYPES_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_f08_types.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_f08_types.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NOBUF_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_COMPILE_CONSTANTS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_f08.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_f08.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_TYPES_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_types.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_types.tmp \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_CDESC_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.tmp + +# ensure that the buildiface script ends up in the release tarball +#am__append_42 = src/binding/fortran/use_mpi_f08/wrappers_c/buildiface +#am__append_43 = -I${master_top_srcdir}/src/binding/fortran/use_mpi_f08/wrappers_c +#am__append_44 = src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.h +#am__append_45 = src/env/mpif77 +am__append_46 = src/env/mpifort +am__append_47 = src/env/mpicxx + +# note that the includes always happen but the effects of their contents are +# affected by "if BUILD_CH3" +am__append_48 = -I$(top_srcdir)/src/mpid/ch3/include \ + -I$(top_builddir)/src/mpid/ch3/include + +am__append_49 = \ + src/mpid/ch3/include/mpidimpl.h \ + src/mpid/ch3/include/mpidpkt.h \ + src/mpid/ch3/include/mpidpost.h \ + src/mpid/ch3/include/mpidpre.h \ + src/mpid/ch3/include/mpid_thread.h \ + src/mpid/ch3/include/mpidrma.h \ + src/mpid/ch3/include/mpid_sched.h \ + src/mpid/ch3/include/mpid_coll.h + +am__append_50 = \ + src/mpid/ch3/src/ch3u_buffer.c \ + src/mpid/ch3/src/ch3u_comm.c \ + src/mpid/ch3/src/ch3u_comm_spawn_multiple.c \ + src/mpid/ch3/src/ch3u_handle_connection.c \ + src/mpid/ch3/src/ch3u_handle_recv_pkt.c \ + src/mpid/ch3/src/ch3u_handle_recv_req.c \ + src/mpid/ch3/src/ch3u_handle_revoke_pkt.c \ + src/mpid/ch3/src/ch3u_handle_send_req.c \ + src/mpid/ch3/src/ch3u_handle_op_req.c \ + src/mpid/ch3/src/ch3u_port.c \ + src/mpid/ch3/src/ch3u_recvq.c \ + src/mpid/ch3/src/ch3u_request.c \ + src/mpid/ch3/src/ch3u_rma_progress.c \ + src/mpid/ch3/src/ch3u_rma_ops.c \ + src/mpid/ch3/src/ch3u_rma_reqops.c \ + src/mpid/ch3/src/ch3u_rma_sync.c \ + src/mpid/ch3/src/ch3u_rma_pkthandler.c \ + src/mpid/ch3/src/ch3u_rndv.c \ + src/mpid/ch3/src/ch3u_eager.c \ + src/mpid/ch3/src/ch3u_eagersync.c \ + src/mpid/ch3/src/ch3u_win_fns.c \ + src/mpid/ch3/src/mpid_abort.c \ + src/mpid/ch3/src/mpid_datatype.c \ + src/mpid/ch3/src/mpid_op.c \ + src/mpid/ch3/src/mpid_cancel_recv.c \ + src/mpid/ch3/src/mpid_cancel_send.c \ + src/mpid/ch3/src/mpid_comm_disconnect.c \ + src/mpid/ch3/src/mpid_comm_spawn_multiple.c \ + src/mpid/ch3/src/mpid_comm_failure_ack.c \ + src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c \ + src/mpid/ch3/src/mpid_comm_revoke.c \ + src/mpid/ch3/src/mpid_finalize.c \ + src/mpid/ch3/src/mpid_get_universe_size.c \ + src/mpid/ch3/src/mpid_getpname.c \ + src/mpid/ch3/src/mpid_improbe.c \ + src/mpid/ch3/src/mpid_imrecv.c \ + src/mpid/ch3/src/mpid_init.c \ + src/mpid/ch3/src/mpid_iprobe.c \ + src/mpid/ch3/src/mpid_irecv.c \ + src/mpid/ch3/src/mpid_irsend.c \ + src/mpid/ch3/src/mpid_isend.c \ + src/mpid/ch3/src/mpid_issend.c \ + src/mpid/ch3/src/mpid_mprobe.c \ + src/mpid/ch3/src/mpid_mrecv.c \ + src/mpid/ch3/src/mpid_port.c \ + src/mpid/ch3/src/mpid_probe.c \ + src/mpid/ch3/src/mpid_recv.c \ + src/mpid/ch3/src/mpid_rsend.c \ + src/mpid/ch3/src/mpid_send.c \ + src/mpid/ch3/src/mpid_ssend.c \ + src/mpid/ch3/src/mpid_startall.c \ + src/mpid/ch3/src/mpid_vc.c \ + src/mpid/ch3/src/mpid_rma.c \ + src/mpid/ch3/src/mpidi_rma.c \ + src/mpid/ch3/src/mpid_aint.c \ + src/mpid/ch3/src/mpidi_isend_self.c \ + src/mpid/ch3/src/mpidi_pg.c \ + src/mpid/ch3/src/mpidi_printf.c + +am__append_51 = src/mpid/ch3/util/sock/errnames.txt +#am__append_52 = \ +# src/mpid/ch3/util/sock/ch3u_init_sock.c \ +# src/mpid/ch3/util/sock/ch3u_connect_sock.c \ +# src/mpid/ch3/util/sock/ch3u_getinterfaces.c + +#am__append_53 = -I$(top_srcdir)/src/mpid/ch3/util/sock \ +# -I$(top_builddir)/src/mpid/ch3/util/sock + +#am__append_54 = src/mpid/ch3/util/sock/ch3usock.h +am__append_55 = -I$(top_srcdir)/src/mpid/ch3/channels/nemesis/include \ + -I$(top_builddir)/src/mpid/ch3/channels/nemesis/include \ + -I$(top_srcdir)/src/mpid/ch3/channels/nemesis/utils/monitor +am__append_56 = \ + src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h \ + src/mpid/ch3/channels/nemesis/include/mpidi_ch3_nemesis.h \ + src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h \ + src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_atomics.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_debug.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_fbox.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_queue.h + +am__append_57 = \ + src/mpid/ch3/channels/nemesis/src/ch3_finalize.c \ + src/mpid/ch3/channels/nemesis/src/ch3_init.c \ + src/mpid/ch3/channels/nemesis/src/ch3_isend.c \ + src/mpid/ch3/channels/nemesis/src/ch3_isendv.c \ + src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c \ + src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c \ + src/mpid/ch3/channels/nemesis/src/ch3_progress.c \ + src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c \ + src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c \ + src/mpid/ch3/channels/nemesis/src/ch3i_comm.c \ + src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c + +am__append_58 = \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c + +am__append_59 = \ + src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_queue.h + +am__append_60 = \ + src/mpid/ch3/channels/nemesis/netmod/none/none.c + +#am__append_61 = \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c + +#am__append_62 = src/mpid/ch3/channels/nemesis/netmod/ofi/errnames.txt +am__append_63 = src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c \ + src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c +am__append_64 = \ + src/mpid/ch3/channels/nemesis/utils/monitor/my_papi_defs.h \ + src/mpid/ch3/channels/nemesis/utils/monitor/rdtsc.h + + +# should be added unconditionally, since the error name list does not +# depend on any choices made by configure +am__append_65 = src/mpid/ch3/channels/sock/src/errnames.txt +#am__append_66 = \ +# src/mpid/ch3/channels/sock/src/sock.c \ +# src/mpid/ch3/channels/sock/src/ch3_finalize.c \ +# src/mpid/ch3/channels/sock/src/ch3_init.c \ +# src/mpid/ch3/channels/sock/src/ch3_isend.c \ +# src/mpid/ch3/channels/sock/src/ch3_isendv.c \ +# src/mpid/ch3/channels/sock/src/ch3_istartmsg.c \ +# src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c \ +# src/mpid/ch3/channels/sock/src/ch3_progress.c \ +# src/mpid/ch3/channels/sock/src/ch3_win_fns.c + +#am__append_67 = src/mpid/ch3/channels/sock/include/mpidu_sock.h \ +# src/mpid/ch3/channels/sock/include/mpidu_socki.h \ +# src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h \ +# src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h \ +# src/mpid/ch3/channels/sock/include/mpidi_ch3_post.h +#am__append_68 = \ +# -I$(top_srcdir)/src/mpid/ch3/channels/sock/include \ +# -I$(top_builddir)/src/mpid/ch3/channels/sock/include + +#am__append_69 = -I$(top_srcdir)/src/mpid/ch4/include \ +# -I$(top_builddir)/src/mpid/ch4/include \ +# -I$(top_srcdir)/src/mpid/ch4/src \ +# -I$(top_srcdir)/src/mpid/ch4/generic \ +# -I$(top_srcdir)/src/mpid/ch4/netmod/include +#am__append_70 = src/mpid/ch4/include/netmodpre.h \ +# src/mpid/ch4/include/shmpre.h \ +# src/mpid/ch4/include/mpidch4.h \ +# src/mpid/ch4/include/mpidch4r.h \ +# src/mpid/ch4/include/mpidimpl.h \ +# src/mpid/ch4/include/mpidpre.h \ +# src/mpid/ch4/include/mpid_sched.h \ +# src/mpid/ch4/include/mpid_thread.h \ +# src/mpid/ch4/src/ch4_comm.h \ +# src/mpid/ch4/src/ch4_progress.h \ +# src/mpid/ch4/src/ch4_request.h \ +# src/mpid/ch4/src/ch4_send.h \ +# src/mpid/ch4/src/ch4_startall.h \ +# src/mpid/ch4/src/ch4_types.h \ +# src/mpid/ch4/src/ch4_impl.h \ +# src/mpid/ch4/src/ch4_probe.h \ +# src/mpid/ch4/src/ch4_proc.h \ +# src/mpid/ch4/src/ch4_recv.h \ +# src/mpid/ch4/src/ch4_rma.h \ +# src/mpid/ch4/src/ch4_win.h \ +# src/mpid/ch4/src/ch4r_probe.h \ +# src/mpid/ch4/src/ch4r_rma.h \ +# src/mpid/ch4/src/ch4r_win.h \ +# src/mpid/ch4/src/ch4r_init.h \ +# src/mpid/ch4/src/ch4r_proc.h \ +# src/mpid/ch4/src/ch4i_comm.h \ +# src/mpid/ch4/src/ch4r_recvq.h \ +# src/mpid/ch4/src/ch4r_recv.h \ +# src/mpid/ch4/src/ch4r_symheap.h \ +# src/mpid/ch4/src/ch4r_buf.h \ +# src/mpid/ch4/src/ch4r_callbacks.h \ +# src/mpid/ch4/src/ch4r_rma_origin_callbacks.h \ +# src/mpid/ch4/src/ch4r_rma_target_callbacks.h \ +# src/mpid/ch4/src/ch4r_request.h \ +# src/mpid/ch4/generic/mpidig_send.h \ +# src/mpid/ch4/generic/mpidig_recv.h \ +# src/mpid/ch4/generic/mpidig_startall.h \ +# src/mpid/ch4/generic/mpidig.h \ +# src/mpid/ch4/netmod/include/netmod.h \ +# src/mpid/ch4/netmod/include/netmod_impl.h +#am__append_71 = src/mpid/ch4/src/ch4_globals.c \ +# src/mpid/ch4/src/ch4_impl.c \ +# src/mpid/ch4/src/ch4_init.c \ +# src/mpid/ch4/src/ch4_comm.c \ +# src/mpid/ch4/src/ch4_spawn.c \ +# src/mpid/ch4/src/ch4_win.c \ +# src/mpid/ch4/src/ch4i_comm.c \ +# src/mpid/ch4/src/ch4r_buf.c \ +# src/mpid/ch4/src/ch4r_init.c \ +# src/mpid/ch4/src/ch4r_comm.c \ +# src/mpid/ch4/src/ch4r_proc.c \ +# src/mpid/ch4/src/ch4r_recvq.c \ +# src/mpid/ch4/src/ch4r_callbacks.c \ +# src/mpid/ch4/src/ch4r_rma_origin_callbacks.c \ +# src/mpid/ch4/src/ch4r_rma_target_callbacks.c \ +# src/mpid/ch4/src/ch4r_symheap.c \ +# src/mpid/ch4/src/ch4r_win.c \ +# src/mpid/ch4/src/mpid_ch4_net_array.c + +##am__append_72 = src/mpid/ch4/src/ch4_coll_globals.c +#am__append_73 = src/mpid/ch4/src/ch4_coll_globals_default.c +#am__append_74 = src/mpid/ch4/generic/mpidig_globals.c \ +# src/mpid/ch4/generic/mpidig_init.c \ +# src/mpid/ch4/netmod/src/netmod_impl.c +##am__append_75 = +##am__append_76 = src/mpid/ch4/netmod/ofi/func_table.c \ +## src/mpid/ch4/netmod/ofi/ofi_init.c \ +## src/mpid/ch4/netmod/ofi/ofi_comm.c \ +## src/mpid/ch4/netmod/ofi/ofi_datatype.c \ +## src/mpid/ch4/netmod/ofi/ofi_op.c \ +## src/mpid/ch4/netmod/ofi/ofi_spawn.c \ +## src/mpid/ch4/netmod/ofi/ofi_win.c \ +## src/mpid/ch4/netmod/ofi/globals.c \ +## src/mpid/ch4/netmod/ofi/util.c + +##am__append_77 = src/mpid/ch4/netmod/ofi/errnames.txt +##am__append_78 = +##am__append_79 = +##am__append_80 = +##am__append_81 = src/mpid/ch4/netmod/ucx/func_table.c\ +## src/mpid/ch4/netmod/ucx/ucx_init.c \ +## src/mpid/ch4/netmod/ucx/ucx_comm.c \ +## src/mpid/ch4/netmod/ucx/ucx_datatype.c \ +## src/mpid/ch4/netmod/ucx/ucx_op.c \ +## src/mpid/ch4/netmod/ucx/ucx_spawn.c \ +## src/mpid/ch4/netmod/ucx/ucx_win.c \ +## src/mpid/ch4/netmod/ucx/globals.c + +##am__append_82 = src/mpid/ch4/netmod/ucx/errnames.txt +##am__append_83 = +##am__append_84 = +##am__append_85 = src/mpid/ch4/netmod/stubnm/func_table.c\ +## src/mpid/ch4/netmod/stubnm/stubnm_init.c \ +## src/mpid/ch4/netmod/stubnm/stubnm_comm.c \ +## src/mpid/ch4/netmod/stubnm/stubnm_datatype.c \ +## src/mpid/ch4/netmod/stubnm/stubnm_op.c \ +## src/mpid/ch4/netmod/stubnm/stubnm_spawn.c \ +## src/mpid/ch4/netmod/stubnm/stubnm_win.c \ +## src/mpid/ch4/netmod/stubnm/globals.c + +##am__append_86 = -I$(top_srcdir)/src/mpid/ch4/shm/include \ +## -I$(top_srcdir)/src/mpid/ch4/shm/posix \ +## -I$(top_srcdir)/src/mpid/ch4/shm/src +##am__append_87 = src/mpid/ch4/shm/include/shm.h \ +## src/mpid/ch4/shm/src/shm_impl.h \ +## src/mpid/ch4/shm/src/shm_am.h \ +## src/mpid/ch4/shm/src/shm_coll.h \ +## src/mpid/ch4/shm/src/shm_hooks.h \ +## src/mpid/ch4/shm/src/shm_init.h \ +## src/mpid/ch4/shm/src/shm_misc.h \ +## src/mpid/ch4/shm/src/shm_p2p.h \ +## src/mpid/ch4/shm/src/shm_startall.h \ +## src/mpid/ch4/shm/src/shm_noinline.h \ +## src/mpid/ch4/shm/src/shm_rma.h +##am__append_88 = src/mpid/ch4/shm/src/func_table.c \ +## src/mpid/ch4/shm/src/shm_init.c \ +## src/mpid/ch4/shm/src/shm_hooks.c \ +## src/mpid/ch4/shm/src/shm_dpm.c \ +## src/mpid/ch4/shm/src/shm_mem.c \ +## src/mpid/ch4/shm/src/shm_misc.c \ +## src/mpid/ch4/shm/src/shm_rma.c \ +## src/mpid/ch4/shm/src/shm_impl.c + +##am__append_89 = src/mpid/ch4/shm/src/topotree_util.h \ +## src/mpid/ch4/shm/src/topotree_types.h\ +## src/mpid/ch4/shm/src/topotree.h + +##am__append_90 = src/mpid/ch4/shm/src/topotree.c \ +## src/mpid/ch4/shm/src/topotree_util.c + +###am__append_91 = src/mpid/ch4/shm/stubshm/globals.c \ +### src/mpid/ch4/shm/stubshm/stubshm_comm.c \ +### src/mpid/ch4/shm/stubshm/stubshm_init.c \ +### src/mpid/ch4/shm/stubshm/stubshm_spawn.c \ +### src/mpid/ch4/shm/stubshm/stubshm_win.c + +###am__append_92 = -I$(top_srcdir)/src/mpid/ch4/shm/posix/release_gather +###am__append_93 = src/mpid/ch4/shm/posix/release_gather/release_gather_types.h \ +### src/mpid/ch4/shm/posix/release_gather/release_gather.h + +###am__append_94 = src/mpid/ch4/shm/posix/release_gather/release_gather.c +##am__append_95 = src/mpid/ch4/shm/posix/posix_am.h \ +## src/mpid/ch4/shm/posix/posix_coll.h \ +## src/mpid/ch4/shm/posix/shm_inline.h \ +## src/mpid/ch4/shm/posix/posix_noinline.h \ +## src/mpid/ch4/shm/posix/posix_progress.h \ +## src/mpid/ch4/shm/posix/posix_recv.h \ +## src/mpid/ch4/shm/posix/posix_rma.h \ +## src/mpid/ch4/shm/posix/posix_win.h \ +## src/mpid/ch4/shm/posix/posix_impl.h \ +## src/mpid/ch4/shm/posix/posix_probe.h \ +## src/mpid/ch4/shm/posix/posix_request.h \ +## src/mpid/ch4/shm/posix/posix_send.h \ +## src/mpid/ch4/shm/posix/posix_startall.h \ +## src/mpid/ch4/shm/posix/posix_unimpl.h \ +## src/mpid/ch4/shm/posix/posix_am_impl.h \ +## src/mpid/ch4/shm/posix/posix_pre.h \ +## src/mpid/ch4/shm/posix/posix_proc.h \ +## src/mpid/ch4/shm/posix/posix_types.h + +###am__append_96 = src/mpid/ch4/shm/posix/posix_coll_release_gather.h +##am__append_97 = src/mpid/ch4/shm/posix/globals.c \ +## src/mpid/ch4/shm/posix/posix_comm.c \ +## src/mpid/ch4/shm/posix/posix_init.c \ +## src/mpid/ch4/shm/posix/posix_op.c \ +## src/mpid/ch4/shm/posix/posix_datatype.c \ +## src/mpid/ch4/shm/posix/posix_spawn.c \ +## src/mpid/ch4/shm/posix/posix_win.c \ +## src/mpid/ch4/shm/posix/posix_eager_array.c \ +## src/mpid/ch4/shm/posix/posix_coll_init.c + +##am__append_98 = -I$(top_srcdir)/src/mpid/ch4/shm/posix/eager/include \ +## -I$(top_builddir)/src/mpid/ch4/shm/posix/eager/include +##am__append_99 = src/mpid/ch4/shm/posix/eager/include/posix_eager.h \ +## src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h \ +## src/mpid/ch4/shm/posix/eager/include/posix_eager_transaction.h \ +## src/mpid/ch4/shm/posix/eager/include/posix_eager_impl.h + +###am__append_100 = src/mpid/ch4/shm/posix/eager/fbox/fbox_init.h \ +### src/mpid/ch4/shm/posix/eager/fbox/fbox_send.h \ +### src/mpid/ch4/shm/posix/eager/fbox/fbox_recv.h \ +### src/mpid/ch4/shm/posix/eager/fbox/posix_eager_inline.h + +###am__append_101 = src/mpid/ch4/shm/posix/eager/fbox/globals.c \ +### src/mpid/ch4/shm/posix/eager/fbox/func_table.c + +###am__append_102 = src/mpid/ch4/shm/posix/eager/stub/stub_init.h \ +### src/mpid/ch4/shm/posix/eager/stub/stub_send.h \ +### src/mpid/ch4/shm/posix/eager/stub/stub_recv.h \ +### src/mpid/ch4/shm/posix/eager/stub/posix_eager_inline.h + +###am__append_103 = src/mpid/ch4/shm/posix/eager/stub/globals.c \ +### src/mpid/ch4/shm/posix/eager/stub/func_table.c + +am__append_104 = \ + src/mpid/common/sched/mpidu_sched.c + + +# so that the the device (e.g., ch3) can successfully include mpid_sched_pre.h +# There are no AC_OUTPUT_FILES, so the builddir path does not need to be added. +am__append_105 = -I$(top_srcdir)/src/mpid/common/sched +am__append_106 = \ + src/mpid/common/sched/mpidu_sched.h + + +# so that clients can successfully include mpid_thread.h +am__append_107 = -I$(top_srcdir)/src/mpid/common/thread +am__append_108 = src/mpid/common/thread/mpidu_thread_fallback.h +#am__append_109 = \ +# src/mpid/common/hcoll/hcoll_init.c \ +# src/mpid/common/hcoll/hcoll_ops.c \ +# src/mpid/common/hcoll/hcoll_dtypes.c \ +# src/mpid/common/hcoll/hcoll_rte.c + +#am__append_110 = \ +# src/mpid/common/hcoll/hcoll.h \ +# src/mpid/common/hcoll/hcoll_dtypes.h + +am__append_111 = \ + src/mpid/common/shm/mpidu_shm_alloc.c \ + src/mpid/common/shm/mpidu_shm_barrier.c + + +# there are no AC_OUTPUT_FILES headers, so builddir is unnecessary +am__append_112 = -I$(top_srcdir)/src/mpid/common/shm +am__append_113 = \ + src/mpid/common/shm/mpidu_generic_queue.h \ + src/mpid/common/shm/mpidu_shm_impl.h \ + src/mpid/common/shm/mpidu_shm.h + + +# there are no AC_OUTPUT_FILES headers, so builddir is unnecessary +#am__append_114 = -I$(top_srcdir)/src/mpid/common/bc +#am__append_115 = src/mpid/common/bc/mpidu_bc.h +#am__append_116 = src/mpid/common/bc/mpidu_bc.c +#am__append_117 = \ +# src/nameserv/file/file_nameserv.c + +am__append_118 = \ + src/nameserv/pmi/pmi_nameserv.c + +#am__append_119 = src/pm/util/libmpiexec.la +##am__append_120 = src/pm/gforker/mpiexec +#am__append_121 = src/pm/gforker/mpiexec.gforker +##am__append_122 = src/pm/remshell/mpiexec +#am__append_123 = src/pm/remshell/mpiexec.remshell + +# util comes first, sets some variables that may be used by each process +# manager's Makefile.mk + +# has its own full automake setup, not Makefile.mk +am__append_124 = src/pm/hydra +am__append_125 = src/pm/hydra +am__append_126 = src/pm/hydra + +# has its own full automake setup, not Makefile.mk +#am__append_127 = src/pm/hydra2 +#am__append_128 = src/pm/hydra2 +#am__append_129 = src/pm/hydra2 +#am__append_130 = \ +# src/pmi/pmi2/simple/simple2pmi.c \ +# src/pmi/pmi2/simple/simple_pmiutil.c + +#am__append_131 = \ +# src/pmi/pmi2/simple/simple_pmiutil.h \ +# src/pmi/pmi2/simple/simple2pmi.h \ +# src/pmi/pmi2/simple/pmi2compat.h \ +# src/pmi/pmi2/include/pmi2.h + +#am__append_132 = -I$(top_srcdir)/src/pmi/pmi2/simple \ +# -I$(top_srcdir)/src/pmi/pmi2/include +am__append_133 = \ + src/pmi/simple/simple_pmiutil.c \ + src/pmi/simple/simple_pmi.c + +am__append_134 = \ + src/pmi/simple/simple_pmiutil.h \ + src/pmi/include/pmi.h + +am__append_135 = \ + -I$(top_srcdir)/src/pmi/simple \ + -I$(top_srcdir)/src/pmi/include + +# include our subdir automake fragments + +# dropping mpi_fc_sources and mpi_cxx_sources from libmpmpi since they +# don't contribute any PMPI symbols. + +# libmpi.la might depend on libpmpi.la. We add them +# in that order to lib_LTLIBRARIES so libtool doesn't get +# confused. (see https://bugzilla.redhat.com/show_bug.cgi?id=91110) +#am__append_136 = lib/libpmpi.la \ +# lib/libmpi.la +am__append_137 = lib/libmpi.la +am__append_138 = lib/libmpifort.la +#am__append_139 = -DMPICH_MPI_FROM_PMPI -DUSE_ONLY_MPI_NAMES +am__append_140 = $(mpi_fc_sources) +am__append_141 = lib/libmpicxx.la +#am__append_142 = coverage-clean +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/src/hwloc/config/hwloc.m4 \ + $(top_srcdir)/src/hwloc/config/hwloc_check_attributes.m4 \ + $(top_srcdir)/src/hwloc/config/hwloc_check_vendor.m4 \ + $(top_srcdir)/src/hwloc/config/hwloc_check_visibility.m4 \ + $(top_srcdir)/src/hwloc/config/hwloc_components.m4 \ + $(top_srcdir)/src/hwloc/config/hwloc_pkg.m4 \ + $(top_srcdir)/src/hwloc/config/netloc.m4 \ + $(top_srcdir)/confdb/aclocal_attr_alias.m4 \ + $(top_srcdir)/confdb/aclocal_bugfix.m4 \ + $(top_srcdir)/confdb/aclocal_cache.m4 \ + $(top_srcdir)/confdb/aclocal_cc.m4 \ + $(top_srcdir)/confdb/aclocal_check_visibility.m4 \ + $(top_srcdir)/confdb/aclocal_coverage.m4 \ + $(top_srcdir)/confdb/aclocal_cxx.m4 \ + $(top_srcdir)/confdb/aclocal_f77.m4 \ + $(top_srcdir)/confdb/aclocal_fc.m4 \ + $(top_srcdir)/confdb/aclocal_libs.m4 \ + $(top_srcdir)/confdb/aclocal_make.m4 \ + $(top_srcdir)/confdb/aclocal_mpi.m4 \ + $(top_srcdir)/confdb/aclocal_runlog.m4 \ + $(top_srcdir)/confdb/aclocal_shl.m4 \ + $(top_srcdir)/confdb/aclocal_subcfg.m4 \ + $(top_srcdir)/confdb/aclocal_util.m4 \ + $(top_srcdir)/confdb/libtool.m4 \ + $(top_srcdir)/confdb/ltoptions.m4 \ + $(top_srcdir)/confdb/ltsugar.m4 \ + $(top_srcdir)/confdb/ltversion.m4 \ + $(top_srcdir)/confdb/lt~obsolete.m4 \ + $(top_srcdir)/confdb/random_r.m4 \ + $(top_srcdir)/confdb/stdlib_h.m4 \ + $(top_srcdir)/maint/version.m4 $(top_srcdir)/subsys_include.m4 \ + $(top_srcdir)/src/util/logging/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch4/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch4/netmod/ucx/subconfigure.m4 \ + $(top_srcdir)/src/pm/subconfigure.m4 \ + $(top_srcdir)/src/binding/fortran/use_mpi/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch4/shm/stubshm/subconfigure.m4 \ + $(top_srcdir)/src/pm/gforker/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch4/netmod/stubnm/subconfigure.m4 \ + $(top_srcdir)/src/mpid/common/hcoll/subconfigure.m4 \ + $(top_srcdir)/src/pm/remshell/subconfigure.m4 \ + $(top_srcdir)/src/pm/util/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch4/shm/posix/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch4/shm/posix/eager/fbox/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch4/shm/posix/eager/stub/subconfigure.m4 \ + $(top_srcdir)/src/mpid/common/bc/subconfigure.m4 \ + $(top_srcdir)/src/pmi/subconfigure.m4 \ + $(top_srcdir)/src/pmi/slurm/subconfigure.m4 \ + $(top_srcdir)/src/pmi/pmi2/subconfigure.m4 \ + $(top_srcdir)/src/pmi/pmi2/simple/subconfigure.m4 \ + $(top_srcdir)/src/pmi/bgq/subconfigure.m4 \ + $(top_srcdir)/src/pmi/cray/subconfigure.m4 \ + $(top_srcdir)/src/pmi/simple/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch3/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/subconfigure.m4 \ + $(top_srcdir)/src/mpid/common/shm/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/tcp/subconfigure.m4 \ + $(top_srcdir)/src/mpid/common/thread/subconfigure.m4 \ + $(top_srcdir)/src/mpid/common/sched/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch3/channels/sock/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch3/util/sock/subconfigure.m4 \ + $(top_srcdir)/src/mpid/ch4/netmod/ofi/subconfigure.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(dist_noinst_SCRIPTS) \ + $(am__dist_noinst_DATA_DIST) $(include_HEADERS) \ + $(am__modinc_HEADERS_DIST) $(am__noinst_HEADERS_DIST) \ + $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/include/mpichconf.h \ + $(top_builddir)/src/hwloc/include/private/autogen/config.h \ + $(top_builddir)/src/hwloc/include/hwloc/autogen/config.h +CONFIG_CLEAN_FILES = src/mpid/ch4/shm/posix/posix_eager_array.c \ + src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h \ + src/mpid/ch4/src/mpid_ch4_net_array.c \ + src/mpid/ch4/include/netmodpre.h \ + src/mpid/ch4/include/coll_algo_params.h \ + src/mpid/ch4/src/ch4_coll_globals_default.c \ + src/binding/fortran/use_mpi/mpif90model.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_net_module_defs.h \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c \ + src/include/mpichinfo.h mpich-doxygen src/include/mpir_ext.h \ + src/binding/cxx/mpicxx.h src/binding/fortran/mpif_h/mpif.h \ + src/binding/fortran/mpif_h/setbotf.f \ + src/binding/fortran/mpif_h/setbot.c \ + src/binding/fortran/use_mpi/mpi_sizeofs.f90 \ + src/binding/fortran/use_mpi/mpi_base.f90 \ + src/binding/fortran/use_mpi/mpi_constants.f90 \ + src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90 \ + src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90 \ + src/packaging/pkgconfig/mpich.pc \ + src/packaging/envmods/mpich.module src/env/mpixxx_opts.conf \ + src/env/mpicc.sh src/env/mpicc.bash src/env/mpicxx.sh \ + src/env/mpicxx.bash src/env/mpif77.sh src/env/mpif77.bash \ + src/env/mpifort.sh src/env/mpifort.bash src/env/parkill \ + src/include/mpi.h doc/design/Makefile \ + doc/installguide/Makefile doc/logging/Makefile \ + doc/refman/Makefile doc/userguide/Makefile +CONFIG_CLEAN_VPATH_FILES = +##am__EXEEXT_1 = src/pm/gforker/mpiexec$(EXEEXT) +#am__EXEEXT_2 = src/pm/gforker/mpiexec.gforker$(EXEEXT) +##am__EXEEXT_3 = src/pm/remshell/mpiexec$(EXEEXT) +#am__EXEEXT_4 = src/pm/remshell/mpiexec.remshell$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(includedir)" \ + "$(DESTDIR)$(modincdir)" "$(DESTDIR)$(includedir)" +PROGRAMS = $(bin_PROGRAMS) +LIBRARIES = $(noinst_LIBRARIES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +lib_libmpicxx_la_DEPENDENCIES = \ + lib/libmpi.la +am__lib_libmpicxx_la_SOURCES_DIST = \ + src/binding/cxx/initcxx.cxx +am__dirstamp = $(am__leading_dot)dirstamp +am__objects_1 = src/binding/cxx/initcxx.lo +am__objects_2 = $(am__objects_1) +am_lib_libmpicxx_la_OBJECTS = \ + $(am__objects_2) +lib_libmpicxx_la_OBJECTS = \ + $(am_lib_libmpicxx_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +lib_libmpicxx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(lib_libmpicxx_la_LDFLAGS) $(LDFLAGS) -o $@ +am_lib_libmpicxx_la_rpath = -rpath \ + $(libdir) +lib_libmpifort_la_DEPENDENCIES = \ + lib/libmpi.la +am__lib_libmpifort_la_SOURCES_DIST = \ + src/binding/fortran/mpif_h/sendf.c \ + src/binding/fortran/mpif_h/recvf.c \ + src/binding/fortran/mpif_h/get_countf.c \ + src/binding/fortran/mpif_h/bsendf.c \ + src/binding/fortran/mpif_h/ssendf.c \ + src/binding/fortran/mpif_h/rsendf.c \ + src/binding/fortran/mpif_h/bufattachf.c \ + src/binding/fortran/mpif_h/bufdetachf.c \ + src/binding/fortran/mpif_h/isendf.c \ + src/binding/fortran/mpif_h/ibsendf.c \ + src/binding/fortran/mpif_h/issendf.c \ + src/binding/fortran/mpif_h/irsendf.c \ + src/binding/fortran/mpif_h/irecvf.c \ + src/binding/fortran/mpif_h/waitf.c \ + src/binding/fortran/mpif_h/testf.c \ + src/binding/fortran/mpif_h/request_freef.c \ + src/binding/fortran/mpif_h/waitanyf.c \ + src/binding/fortran/mpif_h/testanyf.c \ + src/binding/fortran/mpif_h/waitallf.c \ + src/binding/fortran/mpif_h/testallf.c \ + src/binding/fortran/mpif_h/waitsomef.c \ + src/binding/fortran/mpif_h/testsomef.c \ + src/binding/fortran/mpif_h/iprobef.c \ + src/binding/fortran/mpif_h/probef.c \ + src/binding/fortran/mpif_h/cancelf.c \ + src/binding/fortran/mpif_h/testcancelf.c \ + src/binding/fortran/mpif_h/send_initf.c \ + src/binding/fortran/mpif_h/bsend_initf.c \ + src/binding/fortran/mpif_h/ssend_initf.c \ + src/binding/fortran/mpif_h/rsend_initf.c \ + src/binding/fortran/mpif_h/recv_initf.c \ + src/binding/fortran/mpif_h/startf.c \ + src/binding/fortran/mpif_h/startallf.c \ + src/binding/fortran/mpif_h/sendrecvf.c \ + src/binding/fortran/mpif_h/sndrcvrplf.c \ + src/binding/fortran/mpif_h/typecontigf.c \ + src/binding/fortran/mpif_h/type_vectorf.c \ + src/binding/fortran/mpif_h/type_hvectorf.c \ + src/binding/fortran/mpif_h/type_indexedf.c \ + src/binding/fortran/mpif_h/type_hindexedf.c \ + src/binding/fortran/mpif_h/type_structf.c \ + src/binding/fortran/mpif_h/type_extentf.c \ + src/binding/fortran/mpif_h/type_sizef.c \ + src/binding/fortran/mpif_h/type_lbf.c \ + src/binding/fortran/mpif_h/type_ubf.c \ + src/binding/fortran/mpif_h/type_commitf.c \ + src/binding/fortran/mpif_h/type_freef.c \ + src/binding/fortran/mpif_h/get_elementsf.c \ + src/binding/fortran/mpif_h/packf.c \ + src/binding/fortran/mpif_h/unpackf.c \ + src/binding/fortran/mpif_h/pack_sizef.c \ + src/binding/fortran/mpif_h/barrierf.c \ + src/binding/fortran/mpif_h/bcastf.c \ + src/binding/fortran/mpif_h/gatherf.c \ + src/binding/fortran/mpif_h/gathervf.c \ + src/binding/fortran/mpif_h/scatterf.c \ + src/binding/fortran/mpif_h/scattervf.c \ + src/binding/fortran/mpif_h/allgatherf.c \ + src/binding/fortran/mpif_h/allgathervf.c \ + src/binding/fortran/mpif_h/alltoallf.c \ + src/binding/fortran/mpif_h/alltoallvf.c \ + src/binding/fortran/mpif_h/alltoallwf.c \ + src/binding/fortran/mpif_h/exscanf.c \ + src/binding/fortran/mpif_h/reducef.c \ + src/binding/fortran/mpif_h/op_createf.c \ + src/binding/fortran/mpif_h/op_freef.c \ + src/binding/fortran/mpif_h/allreducef.c \ + src/binding/fortran/mpif_h/redscatf.c \ + src/binding/fortran/mpif_h/scanf.c \ + src/binding/fortran/mpif_h/group_sizef.c \ + src/binding/fortran/mpif_h/group_rankf.c \ + src/binding/fortran/mpif_h/grouptranksf.c \ + src/binding/fortran/mpif_h/group_comparef.c \ + src/binding/fortran/mpif_h/comm_groupf.c \ + src/binding/fortran/mpif_h/group_unionf.c \ + src/binding/fortran/mpif_h/groupinterf.c \ + src/binding/fortran/mpif_h/groupdifff.c \ + src/binding/fortran/mpif_h/group_inclf.c \ + src/binding/fortran/mpif_h/group_exclf.c \ + src/binding/fortran/mpif_h/grouprinclf.c \ + src/binding/fortran/mpif_h/grouprexclf.c \ + src/binding/fortran/mpif_h/group_freef.c \ + src/binding/fortran/mpif_h/comm_sizef.c \ + src/binding/fortran/mpif_h/comm_rankf.c \ + src/binding/fortran/mpif_h/comm_comparef.c \ + src/binding/fortran/mpif_h/comm_dupf.c \ + src/binding/fortran/mpif_h/comm_dup_with_infof.c \ + src/binding/fortran/mpif_h/comm_createf.c \ + src/binding/fortran/mpif_h/comm_splitf.c \ + src/binding/fortran/mpif_h/comm_freef.c \ + src/binding/fortran/mpif_h/commtesticf.c \ + src/binding/fortran/mpif_h/commrsizef.c \ + src/binding/fortran/mpif_h/commrgroupf.c \ + src/binding/fortran/mpif_h/iccreatef.c \ + src/binding/fortran/mpif_h/icmergef.c \ + src/binding/fortran/mpif_h/keyval_freef.c \ + src/binding/fortran/mpif_h/attr_putf.c \ + src/binding/fortran/mpif_h/attr_getf.c \ + src/binding/fortran/mpif_h/attr_deletef.c \ + src/binding/fortran/mpif_h/topo_testf.c \ + src/binding/fortran/mpif_h/cart_createf.c \ + src/binding/fortran/mpif_h/dims_createf.c \ + src/binding/fortran/mpif_h/graph_createf.c \ + src/binding/fortran/mpif_h/graphdims_getf.c \ + src/binding/fortran/mpif_h/graph_getf.c \ + src/binding/fortran/mpif_h/cartdim_getf.c \ + src/binding/fortran/mpif_h/cart_getf.c \ + src/binding/fortran/mpif_h/cart_rankf.c \ + src/binding/fortran/mpif_h/cart_coordsf.c \ + src/binding/fortran/mpif_h/grfnbcountf.c \ + src/binding/fortran/mpif_h/grfnbrsf.c \ + src/binding/fortran/mpif_h/cart_shiftf.c \ + src/binding/fortran/mpif_h/cart_subf.c \ + src/binding/fortran/mpif_h/cart_mapf.c \ + src/binding/fortran/mpif_h/graph_mapf.c \ + src/binding/fortran/mpif_h/getpnamef.c \ + src/binding/fortran/mpif_h/get_versionf.c \ + src/binding/fortran/mpif_h/get_library_versionf.c \ + src/binding/fortran/mpif_h/errhcreatef.c \ + src/binding/fortran/mpif_h/errhsetf.c \ + src/binding/fortran/mpif_h/errhgetf.c \ + src/binding/fortran/mpif_h/errhfreef.c \ + src/binding/fortran/mpif_h/error_stringf.c \ + src/binding/fortran/mpif_h/error_classf.c \ + src/binding/fortran/mpif_h/finalizef.c \ + src/binding/fortran/mpif_h/initializedf.c \ + src/binding/fortran/mpif_h/abortf.c \ + src/binding/fortran/mpif_h/close_portf.c \ + src/binding/fortran/mpif_h/comm_acceptf.c \ + src/binding/fortran/mpif_h/comm_connectf.c \ + src/binding/fortran/mpif_h/commdiscf.c \ + src/binding/fortran/mpif_h/commparentf.c \ + src/binding/fortran/mpif_h/comm_joinf.c \ + src/binding/fortran/mpif_h/comm_spawnf.c \ + src/binding/fortran/mpif_h/spawnmultf.c \ + src/binding/fortran/mpif_h/lookup_namef.c \ + src/binding/fortran/mpif_h/open_portf.c \ + src/binding/fortran/mpif_h/publish_namef.c \ + src/binding/fortran/mpif_h/unpubnamef.c \ + src/binding/fortran/mpif_h/comm_set_infof.c \ + src/binding/fortran/mpif_h/comm_get_infof.c \ + src/binding/fortran/mpif_h/accumulatef.c \ + src/binding/fortran/mpif_h/getf.c \ + src/binding/fortran/mpif_h/putf.c \ + src/binding/fortran/mpif_h/win_completef.c \ + src/binding/fortran/mpif_h/win_createf.c \ + src/binding/fortran/mpif_h/win_fencef.c \ + src/binding/fortran/mpif_h/win_freef.c \ + src/binding/fortran/mpif_h/win_get_groupf.c \ + src/binding/fortran/mpif_h/win_lockf.c \ + src/binding/fortran/mpif_h/win_postf.c \ + src/binding/fortran/mpif_h/win_startf.c \ + src/binding/fortran/mpif_h/win_testf.c \ + src/binding/fortran/mpif_h/win_unlockf.c \ + src/binding/fortran/mpif_h/win_waitf.c \ + src/binding/fortran/mpif_h/win_allocatef.c \ + src/binding/fortran/mpif_h/win_allocate_sharedf.c \ + src/binding/fortran/mpif_h/win_shared_queryf.c \ + src/binding/fortran/mpif_h/win_create_dynamicf.c \ + src/binding/fortran/mpif_h/win_attachf.c \ + src/binding/fortran/mpif_h/win_detachf.c \ + src/binding/fortran/mpif_h/win_get_infof.c \ + src/binding/fortran/mpif_h/win_set_infof.c \ + src/binding/fortran/mpif_h/get_accumulatef.c \ + src/binding/fortran/mpif_h/fetch_and_opf.c \ + src/binding/fortran/mpif_h/compare_and_swapf.c \ + src/binding/fortran/mpif_h/rputf.c \ + src/binding/fortran/mpif_h/rgetf.c \ + src/binding/fortran/mpif_h/raccumulatef.c \ + src/binding/fortran/mpif_h/rget_accumulatef.c \ + src/binding/fortran/mpif_h/win_lock_allf.c \ + src/binding/fortran/mpif_h/win_unlock_allf.c \ + src/binding/fortran/mpif_h/win_flushf.c \ + src/binding/fortran/mpif_h/win_flush_allf.c \ + src/binding/fortran/mpif_h/win_flush_localf.c \ + src/binding/fortran/mpif_h/win_flush_local_allf.c \ + src/binding/fortran/mpif_h/win_syncf.c \ + src/binding/fortran/mpif_h/adderrclassf.c \ + src/binding/fortran/mpif_h/adderrcodef.c \ + src/binding/fortran/mpif_h/adderrstringf.c \ + src/binding/fortran/mpif_h/commcallerrf.c \ + src/binding/fortran/mpif_h/commnewkeyf.c \ + src/binding/fortran/mpif_h/commdelattrf.c \ + src/binding/fortran/mpif_h/commfreekeyf.c \ + src/binding/fortran/mpif_h/comm_get_attrf.c \ + src/binding/fortran/mpif_h/commgetnamf.c \ + src/binding/fortran/mpif_h/comm_set_attrf.c \ + src/binding/fortran/mpif_h/comm_set_namef.c \ + src/binding/fortran/mpif_h/filecallerrf.c \ + src/binding/fortran/mpif_h/greqcompletef.c \ + src/binding/fortran/mpif_h/greqstartf.c \ + src/binding/fortran/mpif_h/isthrmainf.c \ + src/binding/fortran/mpif_h/query_threadf.c \ + src/binding/fortran/mpif_h/statgetclf.c \ + src/binding/fortran/mpif_h/statsetelf.c \ + src/binding/fortran/mpif_h/typenewkeyf.c \ + src/binding/fortran/mpif_h/typedelattrf.c \ + src/binding/fortran/mpif_h/type_dupf.c \ + src/binding/fortran/mpif_h/typefreekeyf.c \ + src/binding/fortran/mpif_h/type_get_attrf.c \ + src/binding/fortran/mpif_h/typegetcntsf.c \ + src/binding/fortran/mpif_h/typegetenvf.c \ + src/binding/fortran/mpif_h/typegnamef.c \ + src/binding/fortran/mpif_h/typesetattrf.c \ + src/binding/fortran/mpif_h/typesetnamef.c \ + src/binding/fortran/mpif_h/type_match_sizef.c \ + src/binding/fortran/mpif_h/wincallerrf.c \ + src/binding/fortran/mpif_h/winnewkeyf.c \ + src/binding/fortran/mpif_h/windelattrf.c \ + src/binding/fortran/mpif_h/winfreekeyf.c \ + src/binding/fortran/mpif_h/win_get_attrf.c \ + src/binding/fortran/mpif_h/win_get_namef.c \ + src/binding/fortran/mpif_h/win_set_attrf.c \ + src/binding/fortran/mpif_h/win_set_namef.c \ + src/binding/fortran/mpif_h/alloc_memf.c \ + src/binding/fortran/mpif_h/commcreerrf.c \ + src/binding/fortran/mpif_h/commgeterrf.c \ + src/binding/fortran/mpif_h/commseterrf.c \ + src/binding/fortran/mpif_h/filecreerrf.c \ + src/binding/fortran/mpif_h/filegeterrf.c \ + src/binding/fortran/mpif_h/fileseterrf.c \ + src/binding/fortran/mpif_h/finalizedf.c \ + src/binding/fortran/mpif_h/free_memf.c \ + src/binding/fortran/mpif_h/info_createf.c \ + src/binding/fortran/mpif_h/info_deletef.c \ + src/binding/fortran/mpif_h/info_dupf.c \ + src/binding/fortran/mpif_h/info_freef.c \ + src/binding/fortran/mpif_h/info_getf.c \ + src/binding/fortran/mpif_h/infognkf.c \ + src/binding/fortran/mpif_h/infognthkf.c \ + src/binding/fortran/mpif_h/infovallenf.c \ + src/binding/fortran/mpif_h/info_setf.c \ + src/binding/fortran/mpif_h/pack_externalf.c \ + src/binding/fortran/mpif_h/packesizef.c \ + src/binding/fortran/mpif_h/reqgetstatf.c \ + src/binding/fortran/mpif_h/typedarrayf.c \ + src/binding/fortran/mpif_h/typechindf.c \ + src/binding/fortran/mpif_h/typechvecf.c \ + src/binding/fortran/mpif_h/typecindbf.c \ + src/binding/fortran/mpif_h/type_create_hindexed_blockf.c \ + src/binding/fortran/mpif_h/typecresizef.c \ + src/binding/fortran/mpif_h/typecstructf.c \ + src/binding/fortran/mpif_h/typecsubarrf.c \ + src/binding/fortran/mpif_h/typegetextentf.c \ + src/binding/fortran/mpif_h/typegtextf.c \ + src/binding/fortran/mpif_h/unpackextf.c \ + src/binding/fortran/mpif_h/wincreerrf.c \ + src/binding/fortran/mpif_h/wingeterrf.c \ + src/binding/fortran/mpif_h/winseterrf.c \ + src/binding/fortran/mpif_h/reduce_localf.c \ + src/binding/fortran/mpif_h/op_commutativef.c \ + src/binding/fortran/mpif_h/reduce_scatter_blockf.c \ + src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c \ + src/binding/fortran/mpif_h/dist_graph_createf.c \ + src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c \ + src/binding/fortran/mpif_h/dist_graph_neighborsf.c \ + src/binding/fortran/mpif_h/improbef.c \ + src/binding/fortran/mpif_h/imrecvf.c \ + src/binding/fortran/mpif_h/mprobef.c \ + src/binding/fortran/mpif_h/mrecvf.c \ + src/binding/fortran/mpif_h/comm_idupf.c \ + src/binding/fortran/mpif_h/ibarrierf.c \ + src/binding/fortran/mpif_h/ibcastf.c \ + src/binding/fortran/mpif_h/igatherf.c \ + src/binding/fortran/mpif_h/igathervf.c \ + src/binding/fortran/mpif_h/iscatterf.c \ + src/binding/fortran/mpif_h/iscattervf.c \ + src/binding/fortran/mpif_h/iallgatherf.c \ + src/binding/fortran/mpif_h/iallgathervf.c \ + src/binding/fortran/mpif_h/ialltoallf.c \ + src/binding/fortran/mpif_h/ialltoallvf.c \ + src/binding/fortran/mpif_h/ialltoallwf.c \ + src/binding/fortran/mpif_h/ireducef.c \ + src/binding/fortran/mpif_h/iallreducef.c \ + src/binding/fortran/mpif_h/ireduce_scatterf.c \ + src/binding/fortran/mpif_h/ireduce_scatter_blockf.c \ + src/binding/fortran/mpif_h/iscanf.c \ + src/binding/fortran/mpif_h/iexscanf.c \ + src/binding/fortran/mpif_h/ineighbor_allgatherf.c \ + src/binding/fortran/mpif_h/ineighbor_allgathervf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallvf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallwf.c \ + src/binding/fortran/mpif_h/neighbor_allgatherf.c \ + src/binding/fortran/mpif_h/neighbor_allgathervf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallvf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallwf.c \ + src/binding/fortran/mpif_h/comm_split_typef.c \ + src/binding/fortran/mpif_h/get_elements_xf.c \ + src/binding/fortran/mpif_h/status_set_elements_xf.c \ + src/binding/fortran/mpif_h/type_get_extent_xf.c \ + src/binding/fortran/mpif_h/type_get_true_extent_xf.c \ + src/binding/fortran/mpif_h/type_size_xf.c \ + src/binding/fortran/mpif_h/comm_create_groupf.c \ + src/binding/fortran/mpif_h/comm_failure_ackf.c \ + src/binding/fortran/mpif_h/comm_failure_get_ackedf.c \ + src/binding/fortran/mpif_h/comm_revokef.c \ + src/binding/fortran/mpif_h/comm_shrinkf.c \ + src/binding/fortran/mpif_h/comm_agreef.c \ + src/binding/fortran/mpif_h/file_openf.c \ + src/binding/fortran/mpif_h/file_closef.c \ + src/binding/fortran/mpif_h/file_deletef.c \ + src/binding/fortran/mpif_h/file_set_sizef.c \ + src/binding/fortran/mpif_h/file_preallocatef.c \ + src/binding/fortran/mpif_h/file_get_sizef.c \ + src/binding/fortran/mpif_h/file_get_groupf.c \ + src/binding/fortran/mpif_h/file_get_amodef.c \ + src/binding/fortran/mpif_h/file_set_infof.c \ + src/binding/fortran/mpif_h/file_get_infof.c \ + src/binding/fortran/mpif_h/file_set_viewf.c \ + src/binding/fortran/mpif_h/file_get_viewf.c \ + src/binding/fortran/mpif_h/file_read_atf.c \ + src/binding/fortran/mpif_h/file_read_at_allf.c \ + src/binding/fortran/mpif_h/file_write_atf.c \ + src/binding/fortran/mpif_h/file_write_at_allf.c \ + src/binding/fortran/mpif_h/file_iread_atf.c \ + src/binding/fortran/mpif_h/file_iwrite_atf.c \ + src/binding/fortran/mpif_h/file_readf.c \ + src/binding/fortran/mpif_h/file_read_allf.c \ + src/binding/fortran/mpif_h/file_writef.c \ + src/binding/fortran/mpif_h/file_write_allf.c \ + src/binding/fortran/mpif_h/file_ireadf.c \ + src/binding/fortran/mpif_h/file_iwritef.c \ + src/binding/fortran/mpif_h/file_seekf.c \ + src/binding/fortran/mpif_h/file_get_positionf.c \ + src/binding/fortran/mpif_h/file_get_byte_offsetf.c \ + src/binding/fortran/mpif_h/file_read_sharedf.c \ + src/binding/fortran/mpif_h/file_write_sharedf.c \ + src/binding/fortran/mpif_h/file_iread_sharedf.c \ + src/binding/fortran/mpif_h/file_iwrite_sharedf.c \ + src/binding/fortran/mpif_h/file_read_orderedf.c \ + src/binding/fortran/mpif_h/file_write_orderedf.c \ + src/binding/fortran/mpif_h/file_seek_sharedf.c \ + src/binding/fortran/mpif_h/file_get_position_sharedf.c \ + src/binding/fortran/mpif_h/file_read_at_all_beginf.c \ + src/binding/fortran/mpif_h/file_read_at_all_endf.c \ + src/binding/fortran/mpif_h/file_write_at_all_beginf.c \ + src/binding/fortran/mpif_h/file_write_at_all_endf.c \ + src/binding/fortran/mpif_h/file_read_all_beginf.c \ + src/binding/fortran/mpif_h/file_read_all_endf.c \ + src/binding/fortran/mpif_h/file_write_all_beginf.c \ + src/binding/fortran/mpif_h/file_write_all_endf.c \ + src/binding/fortran/mpif_h/file_read_ordered_beginf.c \ + src/binding/fortran/mpif_h/file_read_ordered_endf.c \ + src/binding/fortran/mpif_h/file_write_ordered_beginf.c \ + src/binding/fortran/mpif_h/file_write_ordered_endf.c \ + src/binding/fortran/mpif_h/file_get_type_extentf.c \ + src/binding/fortran/mpif_h/register_datarepf.c \ + src/binding/fortran/mpif_h/file_set_atomicityf.c \ + src/binding/fortran/mpif_h/file_get_atomicityf.c \ + src/binding/fortran/mpif_h/file_syncf.c \ + src/binding/fortran/mpif_h/file_iread_at_allf.c \ + src/binding/fortran/mpif_h/file_iwrite_at_allf.c \ + src/binding/fortran/mpif_h/file_iread_allf.c \ + src/binding/fortran/mpif_h/file_iwrite_allf.c \ + src/binding/fortran/mpif_h/initf.c \ + src/binding/fortran/mpif_h/initthreadf.c \ + src/binding/fortran/mpif_h/pcontrolf.c \ + src/binding/fortran/mpif_h/addressf.c \ + src/binding/fortran/mpif_h/getaddressf.c \ + src/binding/fortran/mpif_h/wtimef.c \ + src/binding/fortran/mpif_h/wtickf.c \ + src/binding/fortran/mpif_h/aint_addf.c \ + src/binding/fortran/mpif_h/aint_difff.c \ + src/binding/fortran/mpif_h/keyval_createf.c \ + src/binding/fortran/mpif_h/dup_fnf.c \ + src/binding/fortran/mpif_h/null_del_fnf.c \ + src/binding/fortran/mpif_h/null_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_comm_fnf.c \ + src/binding/fortran/mpif_h/null_comm_del_fnf.c \ + src/binding/fortran/mpif_h/null_comm_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_win_fnf.c \ + src/binding/fortran/mpif_h/null_win_del_fnf.c \ + src/binding/fortran/mpif_h/null_win_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_type_fnf.c \ + src/binding/fortran/mpif_h/null_type_del_fnf.c \ + src/binding/fortran/mpif_h/null_type_copy_fnf.c \ + src/binding/fortran/use_mpi/typef90cmplxf.c \ + src/binding/fortran/use_mpi/typef90realf.c \ + src/binding/fortran/use_mpi/typef90intf.c \ + src/binding/fortran/use_mpi/mpi.f90 \ + src/binding/fortran/use_mpi/mpi_constants.f90 \ + src/binding/fortran/use_mpi/mpi_sizeofs.f90 \ + src/binding/fortran/use_mpi/mpi_base.f90 \ + src/binding/fortran/use_mpi_f08/pmpi_f08.f90 \ + src/binding/fortran/use_mpi_f08/mpi_f08.f90 \ + src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.f90 \ + src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90 \ + src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.f90 \ + src/binding/fortran/use_mpi_f08/mpi_f08_types.f90 \ + src/binding/fortran/use_mpi_f08/mpi_c_interface.f90 \ + src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.f90 \ + src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.f90 \ + src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 \ + src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/abort_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/accumulate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/add_error_class_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/add_error_code_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/add_error_string_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/aint_add_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/aint_diff_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/allgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/allgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/alloc_mem_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/allreduce_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/alltoall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/alltoallv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/alltoallw_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/barrier_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/bcast_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/bsend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/bsend_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/buffer_attach_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/buffer_detach_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cancel_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cart_coords_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cart_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cart_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cart_map_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cart_rank_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cart_shift_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cart_sub_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/cartdim_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/close_port_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_accept_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_call_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_compare_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_connect_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_delete_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_disconnect_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_dup_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_dup_with_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_free_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_parent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_idup_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_join_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_rank_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_remote_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_remote_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_multiple_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_split_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_split_type_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/comm_test_inter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/compare_and_swap_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/dims_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_create_adjacent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_neighbors_count_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_neighbors_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/errhandler_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/error_class_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/error_string_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/exscan_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/f_sync_reg_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/fetch_and_op_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_call_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_close_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_create_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_delete_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_amode_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_atomicity_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_byte_offset_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_position_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_position_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_type_extent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_get_view_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_open_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_preallocate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_read_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_seek_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_seek_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_set_atomicity_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_set_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_set_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_set_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_set_view_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_sync_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/file_write_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/finalize_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/finalized_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/free_mem_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/gather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/gatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_accumulate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_address_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_count_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_elements_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_elements_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_library_version_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_processor_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/get_version_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/graph_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/graph_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/graph_map_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/graph_neighbors_count_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/graph_neighbors_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/graphdims_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/grequest_complete_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/grequest_start_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_compare_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_difference_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_excl_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_incl_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_intersection_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_range_excl_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_range_incl_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_rank_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_translate_ranks_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/group_union_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/iallgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/iallgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/iallreduce_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ialltoall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ialltoallv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ialltoallw_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ibarrier_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ibcast_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ibsend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/iexscan_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/igather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/igatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/improbe_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/imrecv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_allgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_allgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoallv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoallw_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_delete_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_dup_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_get_nkeys_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_get_nthkey_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_get_valuelen_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/info_set_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/init_thread_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/initialized_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/intercomm_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/intercomm_merge_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/iprobe_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/irecv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_scatter_block_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_scatter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/irsend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/is_thread_main_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/iscan_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/iscatter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/iscatterv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/isend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/issend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/lookup_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/mprobe_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/mrecv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_allgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_allgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoallv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoallw_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/op_commutative_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/op_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/op_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/open_port_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/pack_external_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/pack_external_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/pack_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/pack_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/pcontrol_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/probe_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/publish_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/put_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/query_thread_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/raccumulate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/recv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/recv_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/reduce_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/reduce_local_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/reduce_scatter_block_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/reduce_scatter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/register_datarep_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/request_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/request_get_status_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/rget_accumulate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/rget_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/rput_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/rsend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/rsend_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/scan_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/scatter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/scatterv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/send_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/send_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/sendrecv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/sendrecv_replace_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ssend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/ssend_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/start_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/startall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/status_set_cancelled_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/status_set_elements_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/status_set_elements_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/test_cancelled_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/test_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/testall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/testany_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/testsome_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/topo_test_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_commit_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_contiguous_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_darray_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_complex_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_integer_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_real_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hindexed_block_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hindexed_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hvector_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_indexed_block_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_resized_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_struct_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_create_subarray_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_delete_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_dup_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_free_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_get_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_get_contents_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_get_envelope_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_get_extent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_get_extent_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_get_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_get_true_extent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_get_true_extent_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_indexed_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_match_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_set_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_set_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_size_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/type_vector_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/unpack_external_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/unpack_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/unpublish_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/wait_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/waitall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/waitany_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/waitsome_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_attach_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_call_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_complete_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_create_dynamic_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_create_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_create_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_delete_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_detach_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_fence_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_free_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_get_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_get_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_get_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_get_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_get_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_post_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_set_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_set_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_set_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_set_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_shared_query_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_start_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_sync_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_test_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/win_wait_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/wtick_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/wtime_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pabort_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paccumulate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_class_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_code_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_string_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paint_add_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paint_diff_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palloc_mem_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallreduce_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoallv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoallw_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbarrier_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbcast_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbsend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbsend_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbuffer_attach_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbuffer_detach_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcancel_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_coords_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_map_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_rank_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_shift_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_sub_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcartdim_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pclose_port_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_accept_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_call_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_compare_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_connect_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_delete_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_disconnect_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_dup_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_dup_with_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_free_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_parent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_idup_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_join_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_rank_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_remote_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_remote_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_spawn_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_spawn_multiple_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_split_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_split_type_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_test_inter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcompare_and_swap_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdims_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_create_adjacent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_neighbors_count_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_neighbors_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perrhandler_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perror_class_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perror_string_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pexscan_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pf_sync_reg_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfetch_and_op_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_call_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_close_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_create_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_delete_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_amode_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_atomicity_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_byte_offset_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_position_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_position_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_type_extent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_view_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_at_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_at_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_at_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_at_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_open_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_preallocate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_seek_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_seek_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_atomicity_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_view_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_sync_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_begin_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_end_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfinalize_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfinalized_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfree_mem_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_accumulate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_address_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_count_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_elements_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_elements_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_library_version_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_processor_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_version_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_map_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_neighbors_count_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_neighbors_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraphdims_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgrequest_complete_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgrequest_start_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_compare_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_difference_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_excl_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_incl_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_intersection_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_range_excl_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_range_incl_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_rank_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_translate_ranks_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_union_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallreduce_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoallv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoallw_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibarrier_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibcast_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibsend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piexscan_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pigather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pigatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pimprobe_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pimrecv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_allgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_allgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoallv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoallw_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_delete_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_dup_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_nkeys_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_nthkey_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_valuelen_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_set_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinit_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinit_thread_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinitialized_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pintercomm_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pintercomm_merge_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piprobe_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pirecv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_scatter_block_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_scatter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pirsend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pis_thread_main_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscan_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscatter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscatterv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pisend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pissend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/plookup_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pmprobe_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pmrecv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_allgather_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_allgatherv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoallv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoallw_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_commutative_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/popen_port_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_external_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_external_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppcontrol_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pprobe_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppublish_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pput_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pquery_thread_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/praccumulate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/precv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/precv_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_local_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_scatter_block_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_scatter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pregister_datarep_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prequest_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prequest_get_status_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prget_accumulate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prget_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prput_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prsend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prsend_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscan_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscatter_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscatterv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psend_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psendrecv_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psendrecv_replace_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pssend_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pssend_init_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstart_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstartall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_cancelled_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_elements_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_elements_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptest_cancelled_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptest_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestany_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestsome_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptopo_test_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_commit_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_contiguous_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_darray_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_complex_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_integer_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_real_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hindexed_block_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hindexed_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hvector_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_indexed_block_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_resized_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_struct_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_subarray_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_delete_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_dup_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_free_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_contents_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_envelope_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_extent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_extent_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_true_extent_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_true_extent_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_indexed_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_match_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_set_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_set_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_size_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_size_x_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_vector_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpack_external_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpack_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpublish_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwait_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitall_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitany_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitsome_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_allocate_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_allocate_shared_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_attach_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_call_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_complete_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_dynamic_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_delete_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_detach_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_fence_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_local_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_local_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_free_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_free_keyval_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_group_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_lock_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_lock_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_post_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_attr_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_errhandler_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_info_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_name_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_shared_query_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_start_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_sync_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_test_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_unlock_all_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_unlock_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_wait_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwtick_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwtime_f08ts.f90 \ + src/binding/fortran/use_mpi_f08/wrappers_c/send_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/recv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/bsend_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ssend_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/rsend_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/buffer_attach_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/isend_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ibsend_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/issend_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/irsend_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/irecv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/send_init_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/bsend_init_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ssend_init_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/rsend_init_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/recv_init_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_replace_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/pack_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/unpack_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/bcast_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/gather_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/gatherv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/scatter_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/scatterv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/allgather_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/allgatherv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/alltoall_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/alltoallv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/alltoallw_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/exscan_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/reduce_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/allreduce_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/scan_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/accumulate_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/get_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/put_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/win_create_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/win_attach_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/win_detach_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/get_accumulate_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/fetch_and_op_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/compare_and_swap_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/rput_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/rget_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/raccumulate_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/rget_accumulate_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/free_mem_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/get_address_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/pack_external_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/unpack_external_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/reduce_local_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_block_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/imrecv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/mrecv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ibcast_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/igather_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/igatherv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/iscatter_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/iscatterv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/iallgather_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/iallgatherv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ialltoall_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallw_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/iallreduce_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_block_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/iscan_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/iexscan_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgather_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgatherv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoall_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallw_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgather_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgatherv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoall_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallv_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallw_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_shared_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_shared_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_shared_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_shared_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_begin_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_end_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_begin_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_end_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_begin_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_end_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_begin_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_end_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_begin_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_end_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_begin_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_end_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_all_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_all_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_all_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_all_cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_c.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c \ + src/binding/fortran/use_mpi_f08/wrappers_c/utils.c +am__objects_3 = src/binding/fortran/mpif_h/lib_libmpifort_la-sendf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-recvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-get_countf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-bsendf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ssendf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-rsendf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-bufattachf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-bufdetachf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-isendf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ibsendf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-issendf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-irsendf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-irecvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-waitf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-testf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-request_freef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-waitanyf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-testanyf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-waitallf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-testallf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-waitsomef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-testsomef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iprobef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-probef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cancelf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-testcancelf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-send_initf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-bsend_initf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ssend_initf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-rsend_initf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-recv_initf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-startf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-startallf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-sendrecvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-sndrcvrplf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typecontigf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_vectorf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_hvectorf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_indexedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_hindexedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_structf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_extentf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_sizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_lbf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_ubf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_commitf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_freef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-get_elementsf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-packf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-unpackf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-pack_sizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-barrierf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-bcastf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-gatherf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-gathervf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-scatterf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-scattervf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-allgatherf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-allgathervf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallwf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-exscanf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-reducef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-op_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-op_freef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-allreducef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-redscatf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-scanf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-group_sizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-group_rankf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-grouptranksf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-group_comparef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_groupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-group_unionf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-groupinterf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-groupdifff.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-group_inclf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-group_exclf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-grouprinclf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-grouprexclf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-group_freef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_sizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_rankf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_comparef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dup_with_infof.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_splitf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_freef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commtesticf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commrsizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commrgroupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iccreatef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-icmergef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_freef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-attr_putf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-attr_getf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-attr_deletef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-topo_testf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cart_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dims_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-graph_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-graphdims_getf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-graph_getf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cartdim_getf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cart_getf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cart_rankf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cart_coordsf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbcountf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbrsf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cart_shiftf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cart_subf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-cart_mapf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-graph_mapf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-getpnamef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-get_versionf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-get_library_versionf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-errhcreatef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-errhsetf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-errhgetf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-errhfreef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-error_stringf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-error_classf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-finalizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-initializedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-abortf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-close_portf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_acceptf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_connectf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commdiscf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commparentf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_joinf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_spawnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-spawnmultf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-lookup_namef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-open_portf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-publish_namef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-unpubnamef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_infof.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_infof.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-accumulatef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-getf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-putf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_completef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_fencef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_freef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_groupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_lockf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_postf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_startf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_testf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlockf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_waitf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocatef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocate_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_shared_queryf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_create_dynamicf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_attachf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_detachf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_infof.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_infof.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-get_accumulatef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-fetch_and_opf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-compare_and_swapf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-rputf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-rgetf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-raccumulatef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-rget_accumulatef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_lock_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlock_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_flushf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_localf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_local_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_syncf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-adderrclassf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-adderrcodef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-adderrstringf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commcallerrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commnewkeyf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commdelattrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commfreekeyf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_attrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commgetnamf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_attrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_namef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-filecallerrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-greqcompletef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-greqstartf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-isthrmainf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-query_threadf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-statgetclf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-statsetelf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typenewkeyf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typedelattrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_dupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typefreekeyf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_attrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typegetcntsf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typegetenvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typegnamef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typesetattrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typesetnamef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_match_sizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-wincallerrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-winnewkeyf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-windelattrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-winfreekeyf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_attrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_namef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_attrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_namef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-alloc_memf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commcreerrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commgeterrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-commseterrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-filecreerrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-filegeterrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-fileseterrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-finalizedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-free_memf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-info_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-info_deletef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-info_dupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-info_freef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-info_getf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-infognkf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-infognthkf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-infovallenf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-info_setf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-pack_externalf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-packesizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-reqgetstatf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typedarrayf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typechindf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typechvecf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typecindbf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_create_hindexed_blockf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typecresizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typecstructf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typecsubarrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typegetextentf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-typegtextf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-unpackextf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-wincreerrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-wingeterrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-winseterrf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_localf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-op_commutativef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_scatter_blockf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_create_adjacentf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighbors_countf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighborsf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-improbef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-imrecvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-mprobef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-mrecvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_idupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ibarrierf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ibcastf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-igatherf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-igathervf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iscatterf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iscattervf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iallgatherf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iallgathervf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallwf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ireducef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iallreducef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatterf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatter_blockf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iscanf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-iexscanf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgatherf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgathervf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallwf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgatherf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgathervf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallvf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallwf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_split_typef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-get_elements_xf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-status_set_elements_xf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_extent_xf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_true_extent_xf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-type_size_xf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_create_groupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_ackf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_get_ackedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_revokef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_shrinkf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-comm_agreef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_openf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_closef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_deletef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_sizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_preallocatef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_sizef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_groupf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_amodef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_infof.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_infof.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_viewf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_viewf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_atf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_atf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_atf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_atf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_readf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_writef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_ireadf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwritef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_seekf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_positionf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_byte_offsetf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_orderedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_orderedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_seek_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_position_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_beginf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_endf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_beginf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_endf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_beginf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_endf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_beginf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_endf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_beginf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_endf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_beginf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_endf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_type_extentf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-register_datarepf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_atomicityf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_atomicityf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_syncf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_at_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_at_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_allf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-initf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-initthreadf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-pcontrolf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-addressf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-getaddressf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-wtimef.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-wtickf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-aint_addf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-aint_difff.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_createf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dup_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-null_del_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-null_copy_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dup_comm_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_del_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_copy_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dup_win_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_del_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_copy_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-dup_type_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_del_fnf.lo \ + src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_copy_fnf.lo +am__objects_4 = $(am__objects_3) +am__objects_5 = src/binding/fortran/use_mpi/lib_libmpifort_la-typef90cmplxf.lo \ + src/binding/fortran/use_mpi/lib_libmpifort_la-typef90realf.lo \ + src/binding/fortran/use_mpi/lib_libmpifort_la-typef90intf.lo \ + src/binding/fortran/use_mpi/mpi.lo \ + src/binding/fortran/use_mpi/mpi_constants.lo \ + src/binding/fortran/use_mpi/mpi_sizeofs.lo \ + src/binding/fortran/use_mpi/mpi_base.lo +#am__objects_6 = src/binding/fortran/use_mpi_f08/pmpi_f08.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.lo \ +# src/binding/fortran/use_mpi_f08/mpi_f08_types.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.lo \ +# src/binding/fortran/use_mpi_f08/mpi_c_interface_types.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/abort_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/accumulate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/add_error_class_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/add_error_code_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/add_error_string_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/aint_add_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/aint_diff_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/allgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/allgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/alloc_mem_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/allreduce_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/alltoall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/alltoallv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/alltoallw_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/barrier_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/bcast_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/bsend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/bsend_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/buffer_attach_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/buffer_detach_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cancel_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_coords_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_map_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_rank_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_shift_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cart_sub_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/cartdim_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/close_port_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_accept_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_call_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_compare_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_connect_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_delete_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_disconnect_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_dup_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_dup_with_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_free_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_parent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_idup_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_join_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_rank_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_remote_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_remote_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_multiple_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_split_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_split_type_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/comm_test_inter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/compare_and_swap_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dims_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_create_adjacent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_neighbors_count_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_neighbors_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/errhandler_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/error_class_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/error_string_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/exscan_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/f_sync_reg_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/fetch_and_op_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_call_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_close_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_create_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_delete_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_amode_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_atomicity_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_byte_offset_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_position_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_position_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_type_extent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_get_view_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_open_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_preallocate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_read_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_seek_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_seek_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_atomicity_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_set_view_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_sync_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/file_write_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/finalize_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/finalized_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/free_mem_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/gather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/gatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_accumulate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_address_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_count_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_elements_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_elements_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_library_version_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_processor_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/get_version_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_map_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_neighbors_count_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graph_neighbors_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/graphdims_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/grequest_complete_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/grequest_start_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_compare_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_difference_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_excl_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_incl_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_intersection_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_range_excl_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_range_incl_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_rank_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_translate_ranks_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/group_union_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iallgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iallgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iallreduce_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ialltoall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ialltoallv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ialltoallw_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ibarrier_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ibcast_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ibsend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iexscan_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/igather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/igatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/improbe_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/imrecv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_allgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_allgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoallv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoallw_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_delete_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_dup_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_get_nkeys_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_get_nthkey_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_get_valuelen_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/info_set_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/init_thread_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/initialized_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/intercomm_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/intercomm_merge_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iprobe_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/irecv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_scatter_block_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_scatter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/irsend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/is_thread_main_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iscan_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iscatter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/iscatterv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/isend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/issend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/lookup_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/mprobe_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/mrecv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_allgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_allgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoallv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoallw_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/op_commutative_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/op_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/op_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/open_port_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pack_external_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pack_external_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pack_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pack_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/pcontrol_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/probe_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/publish_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/put_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/query_thread_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/raccumulate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/recv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/recv_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/reduce_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/reduce_local_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/reduce_scatter_block_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/reduce_scatter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/register_datarep_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/request_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/request_get_status_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rget_accumulate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rget_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rput_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rsend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/rsend_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/scan_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/scatter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/scatterv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/send_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/send_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/sendrecv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/sendrecv_replace_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ssend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/ssend_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/start_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/startall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/status_set_cancelled_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/status_set_elements_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/status_set_elements_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/test_cancelled_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/test_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/testall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/testany_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/testsome_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/topo_test_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_commit_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_contiguous_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_darray_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_complex_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_integer_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_real_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hindexed_block_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hindexed_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hvector_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_indexed_block_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_resized_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_struct_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_create_subarray_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_delete_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_dup_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_free_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_contents_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_envelope_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_extent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_extent_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_true_extent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_get_true_extent_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_indexed_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_match_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_set_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_set_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_size_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/type_vector_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/unpack_external_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/unpack_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/unpublish_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/wait_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/waitall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/waitany_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/waitsome_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_attach_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_call_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_complete_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_create_dynamic_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_create_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_create_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_delete_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_detach_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_fence_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_free_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_get_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_post_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_set_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_set_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_set_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_set_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_shared_query_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_start_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_sync_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_test_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/win_wait_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/wtick_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/wtime_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pabort_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paccumulate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_class_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_code_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_string_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paint_add_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paint_diff_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palloc_mem_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallreduce_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoallv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoallw_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbarrier_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbcast_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbsend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbsend_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbuffer_attach_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbuffer_detach_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcancel_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_coords_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_map_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_rank_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_shift_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_sub_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcartdim_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pclose_port_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_accept_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_call_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_compare_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_connect_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_delete_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_disconnect_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_dup_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_dup_with_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_free_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_parent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_idup_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_join_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_rank_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_remote_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_remote_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_spawn_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_spawn_multiple_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_split_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_split_type_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_test_inter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcompare_and_swap_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdims_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_create_adjacent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_neighbors_count_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_neighbors_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perrhandler_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perror_class_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perror_string_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pexscan_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pf_sync_reg_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfetch_and_op_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_call_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_close_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_create_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_delete_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_amode_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_atomicity_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_byte_offset_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_position_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_position_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_type_extent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_view_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_at_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_at_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_at_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_at_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_open_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_preallocate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_seek_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_seek_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_atomicity_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_view_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_sync_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_begin_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_end_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfinalize_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfinalized_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfree_mem_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_accumulate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_address_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_count_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_elements_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_elements_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_library_version_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_processor_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_version_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_map_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_neighbors_count_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_neighbors_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraphdims_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgrequest_complete_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgrequest_start_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_compare_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_difference_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_excl_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_incl_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_intersection_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_range_excl_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_range_incl_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_rank_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_translate_ranks_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_union_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallreduce_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoallv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoallw_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibarrier_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibcast_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibsend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piexscan_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pigather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pigatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pimprobe_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pimrecv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_allgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_allgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoallv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoallw_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_delete_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_dup_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_nkeys_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_nthkey_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_valuelen_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_set_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinit_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinit_thread_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinitialized_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pintercomm_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pintercomm_merge_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piprobe_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pirecv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_scatter_block_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_scatter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pirsend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pis_thread_main_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscan_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscatter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscatterv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pisend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pissend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/plookup_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pmprobe_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pmrecv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_allgather_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_allgatherv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoallv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoallw_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_commutative_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/popen_port_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_external_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_external_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppcontrol_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pprobe_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppublish_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pput_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pquery_thread_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/praccumulate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/precv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/precv_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_local_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_scatter_block_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_scatter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pregister_datarep_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prequest_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prequest_get_status_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prget_accumulate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prget_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prput_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prsend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prsend_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscan_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscatter_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscatterv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psend_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psendrecv_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psendrecv_replace_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pssend_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pssend_init_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstart_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstartall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_cancelled_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_elements_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_elements_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptest_cancelled_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptest_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestany_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestsome_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptopo_test_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_commit_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_contiguous_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_darray_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_complex_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_integer_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_real_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hindexed_block_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hindexed_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hvector_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_indexed_block_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_resized_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_struct_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_subarray_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_delete_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_dup_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_free_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_contents_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_envelope_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_extent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_extent_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_true_extent_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_true_extent_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_indexed_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_match_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_set_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_set_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_size_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_size_x_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_vector_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpack_external_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpack_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpublish_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwait_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitall_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitany_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitsome_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_allocate_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_allocate_shared_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_attach_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_call_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_complete_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_dynamic_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_delete_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_detach_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_fence_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_local_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_local_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_free_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_free_keyval_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_group_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_lock_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_lock_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_post_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_attr_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_errhandler_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_info_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_name_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_shared_query_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_start_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_sync_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_test_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_unlock_all_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_unlock_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_wait_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwtick_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwtime_f08ts.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-buffer_attach_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-isend_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibsend_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-issend_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irsend_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irecv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_init_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_init_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_init_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_init_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_init_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_replace_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bcast_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gather_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gatherv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatter_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatterv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgather_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgatherv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoall_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallw_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-exscan_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allreduce_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scan_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-accumulate_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-put_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_create_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_attach_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_detach_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_accumulate_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-fetch_and_op_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-compare_and_swap_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rput_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-raccumulate_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_accumulate_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-free_mem_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_address_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_external_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_external_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_local_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_block_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-imrecv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-mrecv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibcast_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igather_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igatherv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatter_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatterv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgather_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgatherv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoall_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallw_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallreduce_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_block_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscan_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iexscan_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgather_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgatherv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoall_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallw_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgather_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgatherv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoall_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallv_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallw_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_shared_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_shared_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_shared_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_shared_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_begin_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_end_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_begin_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_end_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_begin_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_end_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_begin_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_end_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_begin_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_end_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_begin_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_end_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_all_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_all_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_all_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_all_cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-cdesc.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_c.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_multiple_c.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-f_sync_reg_c.lo \ +# src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-utils.lo +am__objects_7 = $(am__objects_5) $(am__objects_6) +am__objects_8 = $(am__objects_7) +am_lib_libmpifort_la_OBJECTS = \ + $(am__objects_4) $(am__objects_8) +lib_libmpifort_la_OBJECTS = \ + $(am_lib_libmpifort_la_OBJECTS) +am_lib_libmpifort_la_rpath = -rpath \ + $(libdir) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(am__append_3) $(am__append_12) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +lib_libmpi_la_DEPENDENCIES = \ + $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_2) \ + $(mpi_convenience_libs) +#lib_libmpi_la_DEPENDENCIES = \ +# lib/libpmpi.la \ +# $(mpi_convenience_libs) +am__lib_libmpi_la_SOURCES_DIST = src/mpi/attr/attr_delete.c \ + src/mpi/attr/attr_get.c src/mpi/attr/attr_put.c \ + src/mpi/attr/comm_create_keyval.c \ + src/mpi/attr/comm_delete_attr.c \ + src/mpi/attr/comm_free_keyval.c src/mpi/attr/comm_get_attr.c \ + src/mpi/attr/comm_set_attr.c src/mpi/attr/keyval_create.c \ + src/mpi/attr/keyval_free.c src/mpi/attr/type_create_keyval.c \ + src/mpi/attr/type_delete_attr.c \ + src/mpi/attr/type_free_keyval.c src/mpi/attr/type_get_attr.c \ + src/mpi/attr/type_set_attr.c src/mpi/attr/win_create_keyval.c \ + src/mpi/attr/win_delete_attr.c src/mpi/attr/win_free_keyval.c \ + src/mpi/attr/win_get_attr.c src/mpi/attr/win_set_attr.c \ + src/mpi/coll/allgather/allgather.c \ + src/mpi/coll/allgatherv/allgatherv.c \ + src/mpi/coll/allreduce/allreduce.c \ + src/mpi/coll/alltoall/alltoall.c \ + src/mpi/coll/alltoallv/alltoallv.c \ + src/mpi/coll/alltoallw/alltoallw.c \ + src/mpi/coll/barrier/barrier.c src/mpi/coll/bcast/bcast.c \ + src/mpi/coll/exscan/exscan.c src/mpi/coll/gather/gather.c \ + src/mpi/coll/gatherv/gatherv.c \ + src/mpi/coll/reduce_scatter/reduce_scatter.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c \ + src/mpi/coll/reduce/reduce.c src/mpi/coll/scan/scan.c \ + src/mpi/coll/scatter/scatter.c \ + src/mpi/coll/scatterv/scatterv.c \ + src/mpi/coll/neighbor_allgather/neighbor_allgather.c \ + src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c \ + src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c \ + src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c \ + src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c \ + src/mpi/coll/iallgather/iallgather.c \ + src/mpi/coll/iallgatherv/iallgatherv.c \ + src/mpi/coll/iallreduce/iallreduce.c \ + src/mpi/coll/ialltoall/ialltoall.c \ + src/mpi/coll/ialltoallv/ialltoallv.c \ + src/mpi/coll/ialltoallw/ialltoallw.c \ + src/mpi/coll/ibarrier/ibarrier.c src/mpi/coll/ibcast/ibcast.c \ + src/mpi/coll/iexscan/iexscan.c src/mpi/coll/igather/igather.c \ + src/mpi/coll/igatherv/igatherv.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c \ + src/mpi/coll/ireduce/ireduce.c src/mpi/coll/iscan/iscan.c \ + src/mpi/coll/iscatter/iscatter.c \ + src/mpi/coll/iscatterv/iscatterv.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c \ + src/mpi/coll/op/op_create.c src/mpi/coll/op/op_free.c \ + src/mpi/coll/op/op_commutative.c \ + src/mpi/coll/reduce_local/reduce_local.c \ + src/mpi/comm/comm_compare.c src/mpi/comm/comm_create.c \ + src/mpi/comm/comm_create_group.c src/mpi/comm/comm_dup.c \ + src/mpi/comm/comm_dup_with_info.c src/mpi/comm/comm_free.c \ + src/mpi/comm/comm_get_name.c src/mpi/comm/comm_get_info.c \ + src/mpi/comm/comm_set_info.c src/mpi/comm/comm_group.c \ + src/mpi/comm/comm_idup.c src/mpi/comm/comm_rank.c \ + src/mpi/comm/comm_size.c src/mpi/comm/comm_remote_group.c \ + src/mpi/comm/comm_remote_size.c src/mpi/comm/comm_set_name.c \ + src/mpi/comm/comm_split.c src/mpi/comm/comm_test_inter.c \ + src/mpi/comm/intercomm_create.c src/mpi/comm/intercomm_merge.c \ + src/mpi/comm/comm_split_type.c src/mpi/comm/comm_failure_ack.c \ + src/mpi/comm/comm_failure_get_acked.c \ + src/mpi/comm/comm_revoke.c src/mpi/comm/comm_shrink.c \ + src/mpi/comm/comm_agree.c src/mpi/datatype/address.c \ + src/mpi/datatype/get_address.c src/mpi/datatype/get_count.c \ + src/mpi/datatype/get_elements.c \ + src/mpi/datatype/get_elements_x.c src/mpi/datatype/pack.c \ + src/mpi/datatype/pack_external.c \ + src/mpi/datatype/pack_external_size.c \ + src/mpi/datatype/pack_size.c \ + src/mpi/datatype/status_set_elements.c \ + src/mpi/datatype/status_set_elements_x.c \ + src/mpi/datatype/type_get_name.c \ + src/mpi/datatype/type_set_name.c src/mpi/datatype/type_size.c \ + src/mpi/datatype/type_size_x.c src/mpi/datatype/type_extent.c \ + src/mpi/datatype/type_vector.c src/mpi/datatype/type_commit.c \ + src/mpi/datatype/type_indexed.c \ + src/mpi/datatype/type_hindexed.c \ + src/mpi/datatype/type_struct.c \ + src/mpi/datatype/type_contiguous.c \ + src/mpi/datatype/type_free.c src/mpi/datatype/type_hvector.c \ + src/mpi/datatype/type_dup.c \ + src/mpi/datatype/type_get_envelope.c \ + src/mpi/datatype/type_get_contents.c \ + src/mpi/datatype/type_ub.c src/mpi/datatype/type_lb.c \ + src/mpi/datatype/type_get_extent.c \ + src/mpi/datatype/type_get_extent_x.c \ + src/mpi/datatype/type_get_true_extent.c \ + src/mpi/datatype/type_get_true_extent_x.c \ + src/mpi/datatype/type_match_size.c \ + src/mpi/datatype/type_create_struct.c \ + src/mpi/datatype/type_create_hindexed.c \ + src/mpi/datatype/type_create_hvector.c \ + src/mpi/datatype/type_create_indexed_block.c \ + src/mpi/datatype/type_create_hindexed_block.c \ + src/mpi/datatype/type_create_resized.c \ + src/mpi/datatype/type_create_darray.c \ + src/mpi/datatype/type_create_subarray.c \ + src/mpi/datatype/unpack.c src/mpi/datatype/unpack_external.c \ + src/mpi/errhan/add_error_code.c \ + src/mpi/errhan/add_error_class.c \ + src/mpi/errhan/add_error_string.c \ + src/mpi/errhan/comm_call_errhandler.c \ + src/mpi/errhan/comm_create_errhandler.c \ + src/mpi/errhan/comm_get_errhandler.c \ + src/mpi/errhan/comm_set_errhandler.c \ + src/mpi/errhan/errhandler_create.c \ + src/mpi/errhan/errhandler_free.c \ + src/mpi/errhan/errhandler_get.c \ + src/mpi/errhan/errhandler_set.c src/mpi/errhan/error_class.c \ + src/mpi/errhan/error_string.c \ + src/mpi/errhan/file_create_errhandler.c \ + src/mpi/errhan/file_get_errhandler.c \ + src/mpi/errhan/file_set_errhandler.c \ + src/mpi/errhan/file_call_errhandler.c \ + src/mpi/errhan/win_create_errhandler.c \ + src/mpi/errhan/win_call_errhandler.c \ + src/mpi/errhan/win_get_errhandler.c \ + src/mpi/errhan/win_set_errhandler.c \ + src/mpi/group/group_compare.c src/mpi/group/group_difference.c \ + src/mpi/group/group_excl.c src/mpi/group/group_free.c \ + src/mpi/group/group_incl.c src/mpi/group/group_intersection.c \ + src/mpi/group/group_range_excl.c \ + src/mpi/group/group_range_incl.c src/mpi/group/group_rank.c \ + src/mpi/group/group_size.c \ + src/mpi/group/group_translate_ranks.c \ + src/mpi/group/group_union.c src/mpi/info/info_create.c \ + src/mpi/info/info_delete.c src/mpi/info/info_dup.c \ + src/mpi/info/info_free.c src/mpi/info/info_get.c \ + src/mpi/info/info_getn.c src/mpi/info/info_getnth.c \ + src/mpi/info/info_getvallen.c src/mpi/info/info_set.c \ + src/mpi/init/abort.c src/mpi/init/init.c \ + src/mpi/init/initialized.c src/mpi/init/initthread.c \ + src/mpi/init/ismain.c src/mpi/init/finalize.c \ + src/mpi/init/finalized.c src/mpi/init/querythread.c \ + src/mpi/misc/getpname.c src/mpi/misc/pcontrol.c \ + src/mpi/misc/version.c src/mpi/misc/library_version.c \ + src/mpi/misc/aint_add.c src/mpi/misc/aint_diff.c \ + src/mpi/misc/utils.c src/mpi/pt2pt/bsend.c \ + src/mpi/pt2pt/bsend_init.c src/mpi/pt2pt/bufattach.c \ + src/mpi/pt2pt/buffree.c src/mpi/pt2pt/ibsend.c \ + src/mpi/pt2pt/improbe.c src/mpi/pt2pt/imrecv.c \ + src/mpi/pt2pt/iprobe.c src/mpi/pt2pt/irecv.c \ + src/mpi/pt2pt/irsend.c src/mpi/pt2pt/isend.c \ + src/mpi/pt2pt/issend.c src/mpi/pt2pt/mprobe.c \ + src/mpi/pt2pt/mrecv.c src/mpi/pt2pt/probe.c \ + src/mpi/pt2pt/recv.c src/mpi/pt2pt/recv_init.c \ + src/mpi/pt2pt/rsend.c src/mpi/pt2pt/rsend_init.c \ + src/mpi/pt2pt/send.c src/mpi/pt2pt/send_init.c \ + src/mpi/pt2pt/sendrecv.c src/mpi/pt2pt/sendrecv_rep.c \ + src/mpi/pt2pt/ssend.c src/mpi/pt2pt/ssend_init.c \ + src/mpi/request/cancel.c src/mpi/request/greq_start.c \ + src/mpi/request/greq_complete.c src/mpi/request/request_free.c \ + src/mpi/request/request_get_status.c \ + src/mpi/request/status_set_cancelled.c src/mpi/request/start.c \ + src/mpi/request/startall.c src/mpi/request/test.c \ + src/mpi/request/test_cancelled.c src/mpi/request/testall.c \ + src/mpi/request/testany.c src/mpi/request/testsome.c \ + src/mpi/request/wait.c src/mpi/request/waitall.c \ + src/mpi/request/waitany.c src/mpi/request/waitsome.c \ + src/mpi/rma/accumulate.c src/mpi/rma/alloc_mem.c \ + src/mpi/rma/compare_and_swap.c src/mpi/rma/fetch_and_op.c \ + src/mpi/rma/free_mem.c src/mpi/rma/get.c \ + src/mpi/rma/get_accumulate.c src/mpi/rma/put.c \ + src/mpi/rma/raccumulate.c src/mpi/rma/rget.c \ + src/mpi/rma/rget_accumulate.c src/mpi/rma/rput.c \ + src/mpi/rma/win_allocate.c src/mpi/rma/win_allocate_shared.c \ + src/mpi/rma/win_attach.c src/mpi/rma/win_complete.c \ + src/mpi/rma/win_create.c src/mpi/rma/win_create_dynamic.c \ + src/mpi/rma/win_detach.c src/mpi/rma/win_fence.c \ + src/mpi/rma/win_flush.c src/mpi/rma/win_flush_all.c \ + src/mpi/rma/win_flush_local.c \ + src/mpi/rma/win_flush_local_all.c src/mpi/rma/win_free.c \ + src/mpi/rma/win_get_group.c src/mpi/rma/win_get_info.c \ + src/mpi/rma/win_get_name.c src/mpi/rma/win_lock.c \ + src/mpi/rma/win_lock_all.c src/mpi/rma/win_post.c \ + src/mpi/rma/win_set_info.c src/mpi/rma/win_set_name.c \ + src/mpi/rma/win_shared_query.c src/mpi/rma/win_start.c \ + src/mpi/rma/win_sync.c src/mpi/rma/win_test.c \ + src/mpi/rma/win_unlock.c src/mpi/rma/win_unlock_all.c \ + src/mpi/rma/win_wait.c src/mpi/spawn/comm_disconnect.c \ + src/mpi/spawn/comm_get_parent.c src/mpi/spawn/comm_join.c \ + src/mpi/spawn/comm_spawn.c src/mpi/spawn/comm_spawn_multiple.c \ + src/mpi/spawn/lookup_name.c src/mpi/spawn/publish_name.c \ + src/mpi/spawn/unpublish_name.c src/mpi/spawn/open_port.c \ + src/mpi/spawn/close_port.c src/mpi/spawn/comm_connect.c \ + src/mpi/spawn/comm_accept.c src/mpi/timer/wtime.c \ + src/mpi/timer/wtick.c src/mpi/topo/cart_coords.c \ + src/mpi/topo/cart_create.c src/mpi/topo/cart_get.c \ + src/mpi/topo/cart_map.c src/mpi/topo/cart_rank.c \ + src/mpi/topo/cart_shift.c src/mpi/topo/cart_sub.c \ + src/mpi/topo/dims_create.c src/mpi/topo/graph_get.c \ + src/mpi/topo/graph_map.c src/mpi/topo/graph_nbr.c \ + src/mpi/topo/graphcreate.c src/mpi/topo/graphdimsget.c \ + src/mpi/topo/graphnbrcnt.c src/mpi/topo/cartdim_get.c \ + src/mpi/topo/topo_test.c src/mpi/topo/dist_gr_create_adj.c \ + src/mpi/topo/dist_gr_create.c \ + src/mpi/topo/dist_gr_neighb_count.c \ + src/mpi/topo/dist_gr_neighb.c \ + src/binding/fortran/mpif_h/statusf2c.c \ + src/binding/fortran/mpif_h/statusc2f.c \ + src/binding/fortran/use_mpi/create_f90_int.c \ + src/binding/fortran/use_mpi/create_f90_real.c \ + src/binding/fortran/use_mpi/create_f90_complex.c \ + src/glue/romio/all_romio_symbols.c src/mpi_t/cat_changed.c \ + src/mpi_t/cat_get_categories.c src/mpi_t/cat_get_cvars.c \ + src/mpi_t/cat_get_info.c src/mpi_t/cat_get_num.c \ + src/mpi_t/cat_get_pvars.c src/mpi_t/cvar_get_info.c \ + src/mpi_t/cvar_get_num.c src/mpi_t/cvar_handle_alloc.c \ + src/mpi_t/cvar_handle_free.c src/mpi_t/cvar_read.c \ + src/mpi_t/cvar_write.c src/mpi_t/enum_get_info.c \ + src/mpi_t/enum_get_item.c src/mpi_t/mpit_finalize.c \ + src/mpi_t/mpit_initthread.c src/mpi_t/pvar_get_info.c \ + src/mpi_t/pvar_get_num.c src/mpi_t/pvar_handle_alloc.c \ + src/mpi_t/pvar_handle_free.c src/mpi_t/pvar_read.c \ + src/mpi_t/pvar_readreset.c src/mpi_t/pvar_reset.c \ + src/mpi_t/pvar_session_create.c src/mpi_t/pvar_session_free.c \ + src/mpi_t/pvar_start.c src/mpi_t/pvar_stop.c \ + src/mpi_t/pvar_write.c src/mpi_t/cat_get_index.c \ + src/mpi_t/cvar_get_index.c src/mpi_t/pvar_get_index.c \ + src/mpi/attr/attrutil.c src/mpi/attr/dup_fn.c \ + src/mpi/coll/allgather/allgather_allcomm_nb.c \ + src/mpi/coll/allgather/allgather_intra_recursive_doubling.c \ + src/mpi/coll/allgather/allgather_intra_brucks.c \ + src/mpi/coll/allgather/allgather_intra_ring.c \ + src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c \ + src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c \ + src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c \ + src/mpi/coll/allgatherv/allgatherv_intra_brucks.c \ + src/mpi/coll/allgatherv/allgatherv_intra_ring.c \ + src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c \ + src/mpi/coll/allreduce/allreduce_allcomm_nb.c \ + src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c \ + src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c \ + src/mpi/coll/allreduce/allreduce_intra_smp.c \ + src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c \ + src/mpi/coll/alltoall/alltoall_allcomm_nb.c \ + src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoall/alltoall_intra_brucks.c \ + src/mpi/coll/alltoall/alltoall_intra_scattered.c \ + src/mpi/coll/alltoall/alltoall_intra_pairwise.c \ + src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c \ + src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c \ + src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoallv/alltoallv_intra_scattered.c \ + src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c \ + src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c \ + src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoallw/alltoallw_intra_scattered.c \ + src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c \ + src/mpi/coll/barrier/barrier_allcomm_nb.c \ + src/mpi/coll/barrier/barrier_intra_dissemination.c \ + src/mpi/coll/barrier/barrier_intra_smp.c \ + src/mpi/coll/barrier/barrier_inter_bcast.c \ + src/mpi/coll/bcast/bcast_utils.c \ + src/mpi/coll/bcast/bcast_allcomm_nb.c \ + src/mpi/coll/bcast/bcast_intra_binomial.c \ + src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c \ + src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c \ + src/mpi/coll/bcast/bcast_intra_smp.c \ + src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c \ + src/mpi/coll/exscan/exscan_allcomm_nb.c \ + src/mpi/coll/exscan/exscan_intra_recursive_doubling.c \ + src/mpi/coll/gather/gather_allcomm_nb.c \ + src/mpi/coll/gather/gather_intra_binomial.c \ + src/mpi/coll/gather/gather_inter_linear.c \ + src/mpi/coll/gather/gather_inter_local_gather_remote_send.c \ + src/mpi/coll/gatherv/gatherv_allcomm_nb.c \ + src/mpi/coll/gatherv/gatherv_allcomm_linear.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c \ + src/mpi/coll/reduce/reduce_allcomm_nb.c \ + src/mpi/coll/reduce/reduce_intra_binomial.c \ + src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c \ + src/mpi/coll/reduce/reduce_intra_smp.c \ + src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c \ + src/mpi/coll/scan/scan_allcomm_nb.c \ + src/mpi/coll/scan/scan_intra_recursive_doubling.c \ + src/mpi/coll/scan/scan_intra_smp.c \ + src/mpi/coll/scatter/scatter_allcomm_nb.c \ + src/mpi/coll/scatter/scatter_intra_binomial.c \ + src/mpi/coll/scatter/scatter_inter_linear.c \ + src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c \ + src/mpi/coll/scatterv/scatterv_allcomm_nb.c \ + src/mpi/coll/scatterv/scatterv_allcomm_linear.c \ + src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c \ + src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c \ + src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c \ + src/mpi/coll/iallgather/iallgather_intra_brucks.c \ + src/mpi/coll/iallgather/iallgather_intra_ring.c \ + src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c \ + src/mpi/coll/iallgather/iallgather_gentran_algos.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c \ + src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c \ + src/mpi/coll/iallgatherv/iallgatherv_utils.c \ + src/mpi/coll/iallreduce/iallreduce_intra_naive.c \ + src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c \ + src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c \ + src/mpi/coll/iallreduce/iallreduce_intra_smp.c \ + src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c \ + src/mpi/coll/iallreduce/iallreduce_gentran_algos.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c \ + src/mpi/coll/ialltoall/ialltoall_intra_inplace.c \ + src/mpi/coll/ialltoall/ialltoall_intra_brucks.c \ + src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c \ + src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c \ + src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c \ + src/mpi/coll/ialltoall/ialltoall_gentran_algos.c \ + src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c \ + src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c \ + src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c \ + src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c \ + src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c \ + src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c \ + src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c \ + src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c \ + src/mpi/coll/ibarrier/ibarrier_inter_bcast.c \ + src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c \ + src/mpi/coll/ibcast/ibcast_intra_binomial.c \ + src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_smp.c \ + src/mpi/coll/ibcast/ibcast_inter_flat.c \ + src/mpi/coll/ibcast/ibcast_gentran_algos.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c \ + src/mpi/coll/ibcast/ibcast_utils.c \ + src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c \ + src/mpi/coll/igather/igather_intra_binomial.c \ + src/mpi/coll/igather/igather_inter_short.c \ + src/mpi/coll/igather/igather_inter_long.c \ + src/mpi/coll/igather/igather_gentran_algos.c \ + src/mpi/coll/igather/igather_intra_gentran_tree.c \ + src/mpi/coll/igatherv/igatherv_allcomm_linear.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c \ + src/mpi/coll/ireduce/ireduce_intra_binomial.c \ + src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c \ + src/mpi/coll/ireduce/ireduce_intra_smp.c \ + src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c \ + src/mpi/coll/ireduce/ireduce_gentran_algos.c \ + src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c \ + src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c \ + src/mpi/coll/iscan/iscan_intra_recursive_doubling.c \ + src/mpi/coll/iscan/iscan_intra_smp.c \ + src/mpi/coll/iscan/iscan_gentran_algos.c \ + src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c \ + src/mpi/coll/iscatter/iscatter_intra_binomial.c \ + src/mpi/coll/iscatter/iscatter_inter_linear.c \ + src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c \ + src/mpi/coll/iscatter/iscatter_gentran_algos.c \ + src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c \ + src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c \ + src/mpi/coll/op/opsum.c src/mpi/coll/op/opmax.c \ + src/mpi/coll/op/opmin.c src/mpi/coll/op/opband.c \ + src/mpi/coll/op/opbor.c src/mpi/coll/op/opbxor.c \ + src/mpi/coll/op/opland.c src/mpi/coll/op/oplor.c \ + src/mpi/coll/op/oplxor.c src/mpi/coll/op/opprod.c \ + src/mpi/coll/op/opminloc.c src/mpi/coll/op/opmaxloc.c \ + src/mpi/coll/op/opno_op.c src/mpi/coll/op/opreplace.c \ + src/mpi/coll/allreduce_group/allreduce_group.c \ + src/mpi/coll/src/coll_impl.c \ + src/mpi/coll/transports/gentran/gentran_impl.c \ + src/mpi/coll/transports/gentran/gentran_utils.c \ + src/mpi/coll/transports/gentran/tsp_gentran.c \ + src/mpi/coll/transports/stubtran/stubtran_impl.c \ + src/mpi/coll/transports/stubtran/tsp_stubtran.c \ + src/mpi/coll/algorithms/treealgo/treealgo.c \ + src/mpi/coll/algorithms/treealgo/treeutil.c \ + src/mpi/coll/algorithms/recexchalgo/recexchalgo.c \ + src/mpi/coll/algorithms/stubalgo/stubalgo.c \ + src/mpi/coll/helper_fns.c src/mpi/coll/nbcutil.c \ + src/mpi/comm/commutil.c src/mpi/comm/contextid.c \ + src/mpi/datatype/typerep/dataloop/darray_support.c \ + src/mpi/datatype/typerep/dataloop/dataloop.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c \ + src/mpi/datatype/typerep/dataloop/looputil.c \ + src/mpi/datatype/typerep/dataloop/segment.c \ + src/mpi/datatype/typerep/dataloop/segment_count.c \ + src/mpi/datatype/typerep/dataloop/segment_flatten.c \ + src/mpi/datatype/typerep/dataloop/subarray_support.c \ + src/mpi/datatype/typerep/dataloop/dataloop_debug.c \ + src/mpi/datatype/typerep/src/typerep_flatten.c \ + src/mpi/datatype/typerep/src/typerep_pack.c \ + src/mpi/datatype/typerep/src/typerep_pack_external.c \ + src/mpi/datatype/typerep/src/typerep_iov.c \ + src/mpi/datatype/typerep/src/typerep_create.c \ + src/mpi/datatype/typerep/src/typerep_debug.c \ + src/mpi/datatype/typeutil.c src/mpi/datatype/ext32_datatype.c \ + src/mpi/datatype/type_blockindexed.c \ + src/mpi/datatype/type_create_pairtype.c \ + src/mpi/datatype/type_debug.c src/mpi/errhan/errutil.c \ + src/mpi/errhan/dynerrutil.c src/mpi/group/grouputil.c \ + src/mpi/info/infoutil.c src/mpi/init/initinfo.c \ + src/mpi/init/async.c src/mpi/init/netloc_util.c \ + src/mpi/pt2pt/bsendutil.c src/mpi/request/mpir_request.c \ + src/mpi/rma/winutil.c src/mpi/rma/rmatypeutil.c \ + src/mpi/topo/topoutil.c src/util/mem/handlemem.c \ + src/util/mem/strerror.c src/util/cvar/mpir_cvars.c \ + src/util/procmap/local_proc.c src/util/assert/assert.c \ + src/binding/fortran/mpif_h/fdebug.c \ + src/binding/fortran/mpif_h/setbot.c \ + src/binding/fortran/mpif_h/setbotf.f \ + src/binding/fortran/use_mpi/create_f90_util.c \ + src/glue/romio/glue_romio.c src/mpid/ch3/src/ch3u_buffer.c \ + src/mpid/ch3/src/ch3u_comm.c \ + src/mpid/ch3/src/ch3u_comm_spawn_multiple.c \ + src/mpid/ch3/src/ch3u_handle_connection.c \ + src/mpid/ch3/src/ch3u_handle_recv_pkt.c \ + src/mpid/ch3/src/ch3u_handle_recv_req.c \ + src/mpid/ch3/src/ch3u_handle_revoke_pkt.c \ + src/mpid/ch3/src/ch3u_handle_send_req.c \ + src/mpid/ch3/src/ch3u_handle_op_req.c \ + src/mpid/ch3/src/ch3u_port.c src/mpid/ch3/src/ch3u_recvq.c \ + src/mpid/ch3/src/ch3u_request.c \ + src/mpid/ch3/src/ch3u_rma_progress.c \ + src/mpid/ch3/src/ch3u_rma_ops.c \ + src/mpid/ch3/src/ch3u_rma_reqops.c \ + src/mpid/ch3/src/ch3u_rma_sync.c \ + src/mpid/ch3/src/ch3u_rma_pkthandler.c \ + src/mpid/ch3/src/ch3u_rndv.c src/mpid/ch3/src/ch3u_eager.c \ + src/mpid/ch3/src/ch3u_eagersync.c \ + src/mpid/ch3/src/ch3u_win_fns.c src/mpid/ch3/src/mpid_abort.c \ + src/mpid/ch3/src/mpid_datatype.c src/mpid/ch3/src/mpid_op.c \ + src/mpid/ch3/src/mpid_cancel_recv.c \ + src/mpid/ch3/src/mpid_cancel_send.c \ + src/mpid/ch3/src/mpid_comm_disconnect.c \ + src/mpid/ch3/src/mpid_comm_spawn_multiple.c \ + src/mpid/ch3/src/mpid_comm_failure_ack.c \ + src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c \ + src/mpid/ch3/src/mpid_comm_revoke.c \ + src/mpid/ch3/src/mpid_finalize.c \ + src/mpid/ch3/src/mpid_get_universe_size.c \ + src/mpid/ch3/src/mpid_getpname.c \ + src/mpid/ch3/src/mpid_improbe.c src/mpid/ch3/src/mpid_imrecv.c \ + src/mpid/ch3/src/mpid_init.c src/mpid/ch3/src/mpid_iprobe.c \ + src/mpid/ch3/src/mpid_irecv.c src/mpid/ch3/src/mpid_irsend.c \ + src/mpid/ch3/src/mpid_isend.c src/mpid/ch3/src/mpid_issend.c \ + src/mpid/ch3/src/mpid_mprobe.c src/mpid/ch3/src/mpid_mrecv.c \ + src/mpid/ch3/src/mpid_port.c src/mpid/ch3/src/mpid_probe.c \ + src/mpid/ch3/src/mpid_recv.c src/mpid/ch3/src/mpid_rsend.c \ + src/mpid/ch3/src/mpid_send.c src/mpid/ch3/src/mpid_ssend.c \ + src/mpid/ch3/src/mpid_startall.c src/mpid/ch3/src/mpid_vc.c \ + src/mpid/ch3/src/mpid_rma.c src/mpid/ch3/src/mpidi_rma.c \ + src/mpid/ch3/src/mpid_aint.c \ + src/mpid/ch3/src/mpidi_isend_self.c \ + src/mpid/ch3/src/mpidi_pg.c src/mpid/ch3/src/mpidi_printf.c \ + src/mpid/ch3/util/sock/ch3u_init_sock.c \ + src/mpid/ch3/util/sock/ch3u_connect_sock.c \ + src/mpid/ch3/util/sock/ch3u_getinterfaces.c \ + src/mpid/ch3/channels/nemesis/src/ch3_finalize.c \ + src/mpid/ch3/channels/nemesis/src/ch3_init.c \ + src/mpid/ch3/channels/nemesis/src/ch3_isend.c \ + src/mpid/ch3/channels/nemesis/src/ch3_isendv.c \ + src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c \ + src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c \ + src/mpid/ch3/channels/nemesis/src/ch3_progress.c \ + src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c \ + src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c \ + src/mpid/ch3/channels/nemesis/src/ch3i_comm.c \ + src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c \ + src/mpid/ch3/channels/nemesis/netmod/none/none.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c \ + src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c \ + src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c \ + src/mpid/ch3/channels/sock/src/sock.c \ + src/mpid/ch3/channels/sock/src/ch3_finalize.c \ + src/mpid/ch3/channels/sock/src/ch3_init.c \ + src/mpid/ch3/channels/sock/src/ch3_isend.c \ + src/mpid/ch3/channels/sock/src/ch3_isendv.c \ + src/mpid/ch3/channels/sock/src/ch3_istartmsg.c \ + src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c \ + src/mpid/ch3/channels/sock/src/ch3_progress.c \ + src/mpid/ch3/channels/sock/src/ch3_win_fns.c \ + src/mpid/ch4/src/ch4_globals.c src/mpid/ch4/src/ch4_impl.c \ + src/mpid/ch4/src/ch4_init.c src/mpid/ch4/src/ch4_comm.c \ + src/mpid/ch4/src/ch4_spawn.c src/mpid/ch4/src/ch4_win.c \ + src/mpid/ch4/src/ch4i_comm.c src/mpid/ch4/src/ch4r_buf.c \ + src/mpid/ch4/src/ch4r_init.c src/mpid/ch4/src/ch4r_comm.c \ + src/mpid/ch4/src/ch4r_proc.c src/mpid/ch4/src/ch4r_recvq.c \ + src/mpid/ch4/src/ch4r_callbacks.c \ + src/mpid/ch4/src/ch4r_rma_origin_callbacks.c \ + src/mpid/ch4/src/ch4r_rma_target_callbacks.c \ + src/mpid/ch4/src/ch4r_symheap.c src/mpid/ch4/src/ch4r_win.c \ + src/mpid/ch4/src/mpid_ch4_net_array.c \ + src/mpid/ch4/src/ch4_coll_globals.c \ + src/mpid/ch4/src/ch4_coll_globals_default.c \ + src/mpid/ch4/generic/mpidig_globals.c \ + src/mpid/ch4/generic/mpidig_init.c \ + src/mpid/ch4/netmod/src/netmod_impl.c \ + src/mpid/ch4/netmod/ofi/func_table.c \ + src/mpid/ch4/netmod/ofi/ofi_init.c \ + src/mpid/ch4/netmod/ofi/ofi_comm.c \ + src/mpid/ch4/netmod/ofi/ofi_datatype.c \ + src/mpid/ch4/netmod/ofi/ofi_op.c \ + src/mpid/ch4/netmod/ofi/ofi_spawn.c \ + src/mpid/ch4/netmod/ofi/ofi_win.c \ + src/mpid/ch4/netmod/ofi/globals.c \ + src/mpid/ch4/netmod/ofi/util.c \ + src/mpid/ch4/netmod/ucx/func_table.c \ + src/mpid/ch4/netmod/ucx/ucx_init.c \ + src/mpid/ch4/netmod/ucx/ucx_comm.c \ + src/mpid/ch4/netmod/ucx/ucx_datatype.c \ + src/mpid/ch4/netmod/ucx/ucx_op.c \ + src/mpid/ch4/netmod/ucx/ucx_spawn.c \ + src/mpid/ch4/netmod/ucx/ucx_win.c \ + src/mpid/ch4/netmod/ucx/globals.c \ + src/mpid/ch4/netmod/stubnm/func_table.c \ + src/mpid/ch4/netmod/stubnm/stubnm_init.c \ + src/mpid/ch4/netmod/stubnm/stubnm_comm.c \ + src/mpid/ch4/netmod/stubnm/stubnm_datatype.c \ + src/mpid/ch4/netmod/stubnm/stubnm_op.c \ + src/mpid/ch4/netmod/stubnm/stubnm_spawn.c \ + src/mpid/ch4/netmod/stubnm/stubnm_win.c \ + src/mpid/ch4/netmod/stubnm/globals.c \ + src/mpid/ch4/shm/src/func_table.c \ + src/mpid/ch4/shm/src/shm_init.c \ + src/mpid/ch4/shm/src/shm_hooks.c \ + src/mpid/ch4/shm/src/shm_dpm.c src/mpid/ch4/shm/src/shm_mem.c \ + src/mpid/ch4/shm/src/shm_misc.c src/mpid/ch4/shm/src/shm_rma.c \ + src/mpid/ch4/shm/src/shm_impl.c \ + src/mpid/ch4/shm/src/topotree.c \ + src/mpid/ch4/shm/src/topotree_util.c \ + src/mpid/ch4/shm/stubshm/globals.c \ + src/mpid/ch4/shm/stubshm/stubshm_comm.c \ + src/mpid/ch4/shm/stubshm/stubshm_init.c \ + src/mpid/ch4/shm/stubshm/stubshm_spawn.c \ + src/mpid/ch4/shm/stubshm/stubshm_win.c \ + src/mpid/ch4/shm/posix/release_gather/release_gather.c \ + src/mpid/ch4/shm/posix/globals.c \ + src/mpid/ch4/shm/posix/posix_comm.c \ + src/mpid/ch4/shm/posix/posix_init.c \ + src/mpid/ch4/shm/posix/posix_op.c \ + src/mpid/ch4/shm/posix/posix_datatype.c \ + src/mpid/ch4/shm/posix/posix_spawn.c \ + src/mpid/ch4/shm/posix/posix_win.c \ + src/mpid/ch4/shm/posix/posix_eager_array.c \ + src/mpid/ch4/shm/posix/posix_coll_init.c \ + src/mpid/ch4/shm/posix/eager/fbox/globals.c \ + src/mpid/ch4/shm/posix/eager/fbox/func_table.c \ + src/mpid/ch4/shm/posix/eager/stub/globals.c \ + src/mpid/ch4/shm/posix/eager/stub/func_table.c \ + src/mpid/common/sched/mpidu_sched.c \ + src/mpid/common/hcoll/hcoll_init.c \ + src/mpid/common/hcoll/hcoll_ops.c \ + src/mpid/common/hcoll/hcoll_dtypes.c \ + src/mpid/common/hcoll/hcoll_rte.c \ + src/mpid/common/shm/mpidu_shm_alloc.c \ + src/mpid/common/shm/mpidu_shm_barrier.c \ + src/mpid/common/bc/mpidu_bc.c src/mpi_t/mpit.c \ + src/nameserv/file/file_nameserv.c \ + src/nameserv/pmi/pmi_nameserv.c \ + src/pmi/pmi2/simple/simple2pmi.c \ + src/pmi/pmi2/simple/simple_pmiutil.c \ + src/pmi/simple/simple_pmiutil.c src/pmi/simple/simple_pmi.c +am__objects_9 = src/binding/fortran/mpif_h/lib_libmpi_la-statusf2c.lo \ + src/binding/fortran/mpif_h/lib_libmpi_la-statusc2f.lo +am__objects_10 = src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_int.lo \ + src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_real.lo \ + src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_complex.lo +am__objects_11 = src/mpi/attr/lib_libmpi_la-attr_delete.lo \ + src/mpi/attr/lib_libmpi_la-attr_get.lo \ + src/mpi/attr/lib_libmpi_la-attr_put.lo \ + src/mpi/attr/lib_libmpi_la-comm_create_keyval.lo \ + src/mpi/attr/lib_libmpi_la-comm_delete_attr.lo \ + src/mpi/attr/lib_libmpi_la-comm_free_keyval.lo \ + src/mpi/attr/lib_libmpi_la-comm_get_attr.lo \ + src/mpi/attr/lib_libmpi_la-comm_set_attr.lo \ + src/mpi/attr/lib_libmpi_la-keyval_create.lo \ + src/mpi/attr/lib_libmpi_la-keyval_free.lo \ + src/mpi/attr/lib_libmpi_la-type_create_keyval.lo \ + src/mpi/attr/lib_libmpi_la-type_delete_attr.lo \ + src/mpi/attr/lib_libmpi_la-type_free_keyval.lo \ + src/mpi/attr/lib_libmpi_la-type_get_attr.lo \ + src/mpi/attr/lib_libmpi_la-type_set_attr.lo \ + src/mpi/attr/lib_libmpi_la-win_create_keyval.lo \ + src/mpi/attr/lib_libmpi_la-win_delete_attr.lo \ + src/mpi/attr/lib_libmpi_la-win_free_keyval.lo \ + src/mpi/attr/lib_libmpi_la-win_get_attr.lo \ + src/mpi/attr/lib_libmpi_la-win_set_attr.lo \ + src/mpi/coll/allgather/lib_libmpi_la-allgather.lo \ + src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv.lo \ + src/mpi/coll/allreduce/lib_libmpi_la-allreduce.lo \ + src/mpi/coll/alltoall/lib_libmpi_la-alltoall.lo \ + src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv.lo \ + src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw.lo \ + src/mpi/coll/barrier/lib_libmpi_la-barrier.lo \ + src/mpi/coll/bcast/lib_libmpi_la-bcast.lo \ + src/mpi/coll/exscan/lib_libmpi_la-exscan.lo \ + src/mpi/coll/gather/lib_libmpi_la-gather.lo \ + src/mpi/coll/gatherv/lib_libmpi_la-gatherv.lo \ + src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter.lo \ + src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block.lo \ + src/mpi/coll/reduce/lib_libmpi_la-reduce.lo \ + src/mpi/coll/scan/lib_libmpi_la-scan.lo \ + src/mpi/coll/scatter/lib_libmpi_la-scatter.lo \ + src/mpi/coll/scatterv/lib_libmpi_la-scatterv.lo \ + src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather.lo \ + src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv.lo \ + src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall.lo \ + src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv.lo \ + src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall.lo \ + src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv.lo \ + src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw.lo \ + src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast.lo \ + src/mpi/coll/iexscan/lib_libmpi_la-iexscan.lo \ + src/mpi/coll/igather/lib_libmpi_la-igather.lo \ + src/mpi/coll/igatherv/lib_libmpi_la-igatherv.lo \ + src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block.lo \ + src/mpi/coll/ireduce/lib_libmpi_la-ireduce.lo \ + src/mpi/coll/iscan/lib_libmpi_la-iscan.lo \ + src/mpi/coll/iscatter/lib_libmpi_la-iscatter.lo \ + src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv.lo \ + src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather.lo \ + src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv.lo \ + src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall.lo \ + src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv.lo \ + src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw.lo \ + src/mpi/coll/op/lib_libmpi_la-op_create.lo \ + src/mpi/coll/op/lib_libmpi_la-op_free.lo \ + src/mpi/coll/op/lib_libmpi_la-op_commutative.lo \ + src/mpi/coll/reduce_local/lib_libmpi_la-reduce_local.lo \ + src/mpi/comm/lib_libmpi_la-comm_compare.lo \ + src/mpi/comm/lib_libmpi_la-comm_create.lo \ + src/mpi/comm/lib_libmpi_la-comm_create_group.lo \ + src/mpi/comm/lib_libmpi_la-comm_dup.lo \ + src/mpi/comm/lib_libmpi_la-comm_dup_with_info.lo \ + src/mpi/comm/lib_libmpi_la-comm_free.lo \ + src/mpi/comm/lib_libmpi_la-comm_get_name.lo \ + src/mpi/comm/lib_libmpi_la-comm_get_info.lo \ + src/mpi/comm/lib_libmpi_la-comm_set_info.lo \ + src/mpi/comm/lib_libmpi_la-comm_group.lo \ + src/mpi/comm/lib_libmpi_la-comm_idup.lo \ + src/mpi/comm/lib_libmpi_la-comm_rank.lo \ + src/mpi/comm/lib_libmpi_la-comm_size.lo \ + src/mpi/comm/lib_libmpi_la-comm_remote_group.lo \ + src/mpi/comm/lib_libmpi_la-comm_remote_size.lo \ + src/mpi/comm/lib_libmpi_la-comm_set_name.lo \ + src/mpi/comm/lib_libmpi_la-comm_split.lo \ + src/mpi/comm/lib_libmpi_la-comm_test_inter.lo \ + src/mpi/comm/lib_libmpi_la-intercomm_create.lo \ + src/mpi/comm/lib_libmpi_la-intercomm_merge.lo \ + src/mpi/comm/lib_libmpi_la-comm_split_type.lo \ + src/mpi/comm/lib_libmpi_la-comm_failure_ack.lo \ + src/mpi/comm/lib_libmpi_la-comm_failure_get_acked.lo \ + src/mpi/comm/lib_libmpi_la-comm_revoke.lo \ + src/mpi/comm/lib_libmpi_la-comm_shrink.lo \ + src/mpi/comm/lib_libmpi_la-comm_agree.lo \ + src/mpi/datatype/lib_libmpi_la-address.lo \ + src/mpi/datatype/lib_libmpi_la-get_address.lo \ + src/mpi/datatype/lib_libmpi_la-get_count.lo \ + src/mpi/datatype/lib_libmpi_la-get_elements.lo \ + src/mpi/datatype/lib_libmpi_la-get_elements_x.lo \ + src/mpi/datatype/lib_libmpi_la-pack.lo \ + src/mpi/datatype/lib_libmpi_la-pack_external.lo \ + src/mpi/datatype/lib_libmpi_la-pack_external_size.lo \ + src/mpi/datatype/lib_libmpi_la-pack_size.lo \ + src/mpi/datatype/lib_libmpi_la-status_set_elements.lo \ + src/mpi/datatype/lib_libmpi_la-status_set_elements_x.lo \ + src/mpi/datatype/lib_libmpi_la-type_get_name.lo \ + src/mpi/datatype/lib_libmpi_la-type_set_name.lo \ + src/mpi/datatype/lib_libmpi_la-type_size.lo \ + src/mpi/datatype/lib_libmpi_la-type_size_x.lo \ + src/mpi/datatype/lib_libmpi_la-type_extent.lo \ + src/mpi/datatype/lib_libmpi_la-type_vector.lo \ + src/mpi/datatype/lib_libmpi_la-type_commit.lo \ + src/mpi/datatype/lib_libmpi_la-type_indexed.lo \ + src/mpi/datatype/lib_libmpi_la-type_hindexed.lo \ + src/mpi/datatype/lib_libmpi_la-type_struct.lo \ + src/mpi/datatype/lib_libmpi_la-type_contiguous.lo \ + src/mpi/datatype/lib_libmpi_la-type_free.lo \ + src/mpi/datatype/lib_libmpi_la-type_hvector.lo \ + src/mpi/datatype/lib_libmpi_la-type_dup.lo \ + src/mpi/datatype/lib_libmpi_la-type_get_envelope.lo \ + src/mpi/datatype/lib_libmpi_la-type_get_contents.lo \ + src/mpi/datatype/lib_libmpi_la-type_ub.lo \ + src/mpi/datatype/lib_libmpi_la-type_lb.lo \ + src/mpi/datatype/lib_libmpi_la-type_get_extent.lo \ + src/mpi/datatype/lib_libmpi_la-type_get_extent_x.lo \ + src/mpi/datatype/lib_libmpi_la-type_get_true_extent.lo \ + src/mpi/datatype/lib_libmpi_la-type_get_true_extent_x.lo \ + src/mpi/datatype/lib_libmpi_la-type_match_size.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_struct.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_hindexed.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_hvector.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_indexed_block.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_hindexed_block.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_resized.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_darray.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_subarray.lo \ + src/mpi/datatype/lib_libmpi_la-unpack.lo \ + src/mpi/datatype/lib_libmpi_la-unpack_external.lo \ + src/mpi/errhan/lib_libmpi_la-add_error_code.lo \ + src/mpi/errhan/lib_libmpi_la-add_error_class.lo \ + src/mpi/errhan/lib_libmpi_la-add_error_string.lo \ + src/mpi/errhan/lib_libmpi_la-comm_call_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-comm_create_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-comm_get_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-comm_set_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-errhandler_create.lo \ + src/mpi/errhan/lib_libmpi_la-errhandler_free.lo \ + src/mpi/errhan/lib_libmpi_la-errhandler_get.lo \ + src/mpi/errhan/lib_libmpi_la-errhandler_set.lo \ + src/mpi/errhan/lib_libmpi_la-error_class.lo \ + src/mpi/errhan/lib_libmpi_la-error_string.lo \ + src/mpi/errhan/lib_libmpi_la-file_create_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-file_get_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-file_set_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-file_call_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-win_create_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-win_call_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-win_get_errhandler.lo \ + src/mpi/errhan/lib_libmpi_la-win_set_errhandler.lo \ + src/mpi/group/lib_libmpi_la-group_compare.lo \ + src/mpi/group/lib_libmpi_la-group_difference.lo \ + src/mpi/group/lib_libmpi_la-group_excl.lo \ + src/mpi/group/lib_libmpi_la-group_free.lo \ + src/mpi/group/lib_libmpi_la-group_incl.lo \ + src/mpi/group/lib_libmpi_la-group_intersection.lo \ + src/mpi/group/lib_libmpi_la-group_range_excl.lo \ + src/mpi/group/lib_libmpi_la-group_range_incl.lo \ + src/mpi/group/lib_libmpi_la-group_rank.lo \ + src/mpi/group/lib_libmpi_la-group_size.lo \ + src/mpi/group/lib_libmpi_la-group_translate_ranks.lo \ + src/mpi/group/lib_libmpi_la-group_union.lo \ + src/mpi/info/lib_libmpi_la-info_create.lo \ + src/mpi/info/lib_libmpi_la-info_delete.lo \ + src/mpi/info/lib_libmpi_la-info_dup.lo \ + src/mpi/info/lib_libmpi_la-info_free.lo \ + src/mpi/info/lib_libmpi_la-info_get.lo \ + src/mpi/info/lib_libmpi_la-info_getn.lo \ + src/mpi/info/lib_libmpi_la-info_getnth.lo \ + src/mpi/info/lib_libmpi_la-info_getvallen.lo \ + src/mpi/info/lib_libmpi_la-info_set.lo \ + src/mpi/init/lib_libmpi_la-abort.lo \ + src/mpi/init/lib_libmpi_la-init.lo \ + src/mpi/init/lib_libmpi_la-initialized.lo \ + src/mpi/init/lib_libmpi_la-initthread.lo \ + src/mpi/init/lib_libmpi_la-ismain.lo \ + src/mpi/init/lib_libmpi_la-finalize.lo \ + src/mpi/init/lib_libmpi_la-finalized.lo \ + src/mpi/init/lib_libmpi_la-querythread.lo \ + src/mpi/misc/lib_libmpi_la-getpname.lo \ + src/mpi/misc/lib_libmpi_la-pcontrol.lo \ + src/mpi/misc/lib_libmpi_la-version.lo \ + src/mpi/misc/lib_libmpi_la-library_version.lo \ + src/mpi/misc/lib_libmpi_la-aint_add.lo \ + src/mpi/misc/lib_libmpi_la-aint_diff.lo \ + src/mpi/misc/lib_libmpi_la-utils.lo \ + src/mpi/pt2pt/lib_libmpi_la-bsend.lo \ + src/mpi/pt2pt/lib_libmpi_la-bsend_init.lo \ + src/mpi/pt2pt/lib_libmpi_la-bufattach.lo \ + src/mpi/pt2pt/lib_libmpi_la-buffree.lo \ + src/mpi/pt2pt/lib_libmpi_la-ibsend.lo \ + src/mpi/pt2pt/lib_libmpi_la-improbe.lo \ + src/mpi/pt2pt/lib_libmpi_la-imrecv.lo \ + src/mpi/pt2pt/lib_libmpi_la-iprobe.lo \ + src/mpi/pt2pt/lib_libmpi_la-irecv.lo \ + src/mpi/pt2pt/lib_libmpi_la-irsend.lo \ + src/mpi/pt2pt/lib_libmpi_la-isend.lo \ + src/mpi/pt2pt/lib_libmpi_la-issend.lo \ + src/mpi/pt2pt/lib_libmpi_la-mprobe.lo \ + src/mpi/pt2pt/lib_libmpi_la-mrecv.lo \ + src/mpi/pt2pt/lib_libmpi_la-probe.lo \ + src/mpi/pt2pt/lib_libmpi_la-recv.lo \ + src/mpi/pt2pt/lib_libmpi_la-recv_init.lo \ + src/mpi/pt2pt/lib_libmpi_la-rsend.lo \ + src/mpi/pt2pt/lib_libmpi_la-rsend_init.lo \ + src/mpi/pt2pt/lib_libmpi_la-send.lo \ + src/mpi/pt2pt/lib_libmpi_la-send_init.lo \ + src/mpi/pt2pt/lib_libmpi_la-sendrecv.lo \ + src/mpi/pt2pt/lib_libmpi_la-sendrecv_rep.lo \ + src/mpi/pt2pt/lib_libmpi_la-ssend.lo \ + src/mpi/pt2pt/lib_libmpi_la-ssend_init.lo \ + src/mpi/request/lib_libmpi_la-cancel.lo \ + src/mpi/request/lib_libmpi_la-greq_start.lo \ + src/mpi/request/lib_libmpi_la-greq_complete.lo \ + src/mpi/request/lib_libmpi_la-request_free.lo \ + src/mpi/request/lib_libmpi_la-request_get_status.lo \ + src/mpi/request/lib_libmpi_la-status_set_cancelled.lo \ + src/mpi/request/lib_libmpi_la-start.lo \ + src/mpi/request/lib_libmpi_la-startall.lo \ + src/mpi/request/lib_libmpi_la-test.lo \ + src/mpi/request/lib_libmpi_la-test_cancelled.lo \ + src/mpi/request/lib_libmpi_la-testall.lo \ + src/mpi/request/lib_libmpi_la-testany.lo \ + src/mpi/request/lib_libmpi_la-testsome.lo \ + src/mpi/request/lib_libmpi_la-wait.lo \ + src/mpi/request/lib_libmpi_la-waitall.lo \ + src/mpi/request/lib_libmpi_la-waitany.lo \ + src/mpi/request/lib_libmpi_la-waitsome.lo \ + src/mpi/rma/lib_libmpi_la-accumulate.lo \ + src/mpi/rma/lib_libmpi_la-alloc_mem.lo \ + src/mpi/rma/lib_libmpi_la-compare_and_swap.lo \ + src/mpi/rma/lib_libmpi_la-fetch_and_op.lo \ + src/mpi/rma/lib_libmpi_la-free_mem.lo \ + src/mpi/rma/lib_libmpi_la-get.lo \ + src/mpi/rma/lib_libmpi_la-get_accumulate.lo \ + src/mpi/rma/lib_libmpi_la-put.lo \ + src/mpi/rma/lib_libmpi_la-raccumulate.lo \ + src/mpi/rma/lib_libmpi_la-rget.lo \ + src/mpi/rma/lib_libmpi_la-rget_accumulate.lo \ + src/mpi/rma/lib_libmpi_la-rput.lo \ + src/mpi/rma/lib_libmpi_la-win_allocate.lo \ + src/mpi/rma/lib_libmpi_la-win_allocate_shared.lo \ + src/mpi/rma/lib_libmpi_la-win_attach.lo \ + src/mpi/rma/lib_libmpi_la-win_complete.lo \ + src/mpi/rma/lib_libmpi_la-win_create.lo \ + src/mpi/rma/lib_libmpi_la-win_create_dynamic.lo \ + src/mpi/rma/lib_libmpi_la-win_detach.lo \ + src/mpi/rma/lib_libmpi_la-win_fence.lo \ + src/mpi/rma/lib_libmpi_la-win_flush.lo \ + src/mpi/rma/lib_libmpi_la-win_flush_all.lo \ + src/mpi/rma/lib_libmpi_la-win_flush_local.lo \ + src/mpi/rma/lib_libmpi_la-win_flush_local_all.lo \ + src/mpi/rma/lib_libmpi_la-win_free.lo \ + src/mpi/rma/lib_libmpi_la-win_get_group.lo \ + src/mpi/rma/lib_libmpi_la-win_get_info.lo \ + src/mpi/rma/lib_libmpi_la-win_get_name.lo \ + src/mpi/rma/lib_libmpi_la-win_lock.lo \ + src/mpi/rma/lib_libmpi_la-win_lock_all.lo \ + src/mpi/rma/lib_libmpi_la-win_post.lo \ + src/mpi/rma/lib_libmpi_la-win_set_info.lo \ + src/mpi/rma/lib_libmpi_la-win_set_name.lo \ + src/mpi/rma/lib_libmpi_la-win_shared_query.lo \ + src/mpi/rma/lib_libmpi_la-win_start.lo \ + src/mpi/rma/lib_libmpi_la-win_sync.lo \ + src/mpi/rma/lib_libmpi_la-win_test.lo \ + src/mpi/rma/lib_libmpi_la-win_unlock.lo \ + src/mpi/rma/lib_libmpi_la-win_unlock_all.lo \ + src/mpi/rma/lib_libmpi_la-win_wait.lo \ + src/mpi/spawn/lib_libmpi_la-comm_disconnect.lo \ + src/mpi/spawn/lib_libmpi_la-comm_get_parent.lo \ + src/mpi/spawn/lib_libmpi_la-comm_join.lo \ + src/mpi/spawn/lib_libmpi_la-comm_spawn.lo \ + src/mpi/spawn/lib_libmpi_la-comm_spawn_multiple.lo \ + src/mpi/spawn/lib_libmpi_la-lookup_name.lo \ + src/mpi/spawn/lib_libmpi_la-publish_name.lo \ + src/mpi/spawn/lib_libmpi_la-unpublish_name.lo \ + src/mpi/spawn/lib_libmpi_la-open_port.lo \ + src/mpi/spawn/lib_libmpi_la-close_port.lo \ + src/mpi/spawn/lib_libmpi_la-comm_connect.lo \ + src/mpi/spawn/lib_libmpi_la-comm_accept.lo \ + src/mpi/timer/lib_libmpi_la-wtime.lo \ + src/mpi/timer/lib_libmpi_la-wtick.lo \ + src/mpi/topo/lib_libmpi_la-cart_coords.lo \ + src/mpi/topo/lib_libmpi_la-cart_create.lo \ + src/mpi/topo/lib_libmpi_la-cart_get.lo \ + src/mpi/topo/lib_libmpi_la-cart_map.lo \ + src/mpi/topo/lib_libmpi_la-cart_rank.lo \ + src/mpi/topo/lib_libmpi_la-cart_shift.lo \ + src/mpi/topo/lib_libmpi_la-cart_sub.lo \ + src/mpi/topo/lib_libmpi_la-dims_create.lo \ + src/mpi/topo/lib_libmpi_la-graph_get.lo \ + src/mpi/topo/lib_libmpi_la-graph_map.lo \ + src/mpi/topo/lib_libmpi_la-graph_nbr.lo \ + src/mpi/topo/lib_libmpi_la-graphcreate.lo \ + src/mpi/topo/lib_libmpi_la-graphdimsget.lo \ + src/mpi/topo/lib_libmpi_la-graphnbrcnt.lo \ + src/mpi/topo/lib_libmpi_la-cartdim_get.lo \ + src/mpi/topo/lib_libmpi_la-topo_test.lo \ + src/mpi/topo/lib_libmpi_la-dist_gr_create_adj.lo \ + src/mpi/topo/lib_libmpi_la-dist_gr_create.lo \ + src/mpi/topo/lib_libmpi_la-dist_gr_neighb_count.lo \ + src/mpi/topo/lib_libmpi_la-dist_gr_neighb.lo \ + $(am__objects_9) $(am__objects_10) \ + src/glue/romio/lib_libmpi_la-all_romio_symbols.lo \ + src/mpi_t/lib_libmpi_la-cat_changed.lo \ + src/mpi_t/lib_libmpi_la-cat_get_categories.lo \ + src/mpi_t/lib_libmpi_la-cat_get_cvars.lo \ + src/mpi_t/lib_libmpi_la-cat_get_info.lo \ + src/mpi_t/lib_libmpi_la-cat_get_num.lo \ + src/mpi_t/lib_libmpi_la-cat_get_pvars.lo \ + src/mpi_t/lib_libmpi_la-cvar_get_info.lo \ + src/mpi_t/lib_libmpi_la-cvar_get_num.lo \ + src/mpi_t/lib_libmpi_la-cvar_handle_alloc.lo \ + src/mpi_t/lib_libmpi_la-cvar_handle_free.lo \ + src/mpi_t/lib_libmpi_la-cvar_read.lo \ + src/mpi_t/lib_libmpi_la-cvar_write.lo \ + src/mpi_t/lib_libmpi_la-enum_get_info.lo \ + src/mpi_t/lib_libmpi_la-enum_get_item.lo \ + src/mpi_t/lib_libmpi_la-mpit_finalize.lo \ + src/mpi_t/lib_libmpi_la-mpit_initthread.lo \ + src/mpi_t/lib_libmpi_la-pvar_get_info.lo \ + src/mpi_t/lib_libmpi_la-pvar_get_num.lo \ + src/mpi_t/lib_libmpi_la-pvar_handle_alloc.lo \ + src/mpi_t/lib_libmpi_la-pvar_handle_free.lo \ + src/mpi_t/lib_libmpi_la-pvar_read.lo \ + src/mpi_t/lib_libmpi_la-pvar_readreset.lo \ + src/mpi_t/lib_libmpi_la-pvar_reset.lo \ + src/mpi_t/lib_libmpi_la-pvar_session_create.lo \ + src/mpi_t/lib_libmpi_la-pvar_session_free.lo \ + src/mpi_t/lib_libmpi_la-pvar_start.lo \ + src/mpi_t/lib_libmpi_la-pvar_stop.lo \ + src/mpi_t/lib_libmpi_la-pvar_write.lo \ + src/mpi_t/lib_libmpi_la-cat_get_index.lo \ + src/mpi_t/lib_libmpi_la-cvar_get_index.lo \ + src/mpi_t/lib_libmpi_la-pvar_get_index.lo +am__objects_12 = src/binding/fortran/mpif_h/lib_libmpi_la-fdebug.lo \ + src/binding/fortran/mpif_h/lib_libmpi_la-setbot.lo \ + src/binding/fortran/mpif_h/setbotf.lo +am__objects_13 = src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_util.lo +am__objects_14 = src/mpid/ch3/src/lib_libmpi_la-ch3u_buffer.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_comm.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_comm_spawn_multiple.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_connection.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_pkt.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_req.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_revoke_pkt.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_send_req.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_op_req.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_port.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_recvq.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_request.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_progress.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_ops.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_reqops.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_sync.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_pkthandler.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_rndv.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_eager.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_eagersync.lo \ + src/mpid/ch3/src/lib_libmpi_la-ch3u_win_fns.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_abort.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_datatype.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_op.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_recv.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_send.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_comm_disconnect.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_comm_spawn_multiple.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_comm_failure_ack.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_comm_get_all_failed_procs.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_comm_revoke.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_finalize.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_get_universe_size.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_getpname.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_improbe.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_imrecv.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_init.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_iprobe.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_irecv.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_irsend.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_isend.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_issend.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_mprobe.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_mrecv.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_port.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_probe.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_recv.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_rsend.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_send.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_ssend.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_startall.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_vc.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_rma.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpidi_rma.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpid_aint.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpidi_isend_self.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpidi_pg.lo \ + src/mpid/ch3/src/lib_libmpi_la-mpidi_printf.lo +#am__objects_15 = src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_init_sock.lo \ +# src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_connect_sock.lo \ +# src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_getinterfaces.lo +am__objects_16 = src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_finalize.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_init.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isend.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isendv.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsg.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsgv.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_progress.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_rma_shm.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_win_fns.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_comm.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_eagernoncontig.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_init.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_mpich.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_ckpt.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_finalize.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network_poll.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_debug.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt_shm.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_net_array.lo +am__objects_17 = src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_finalize.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_init.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_send.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_utility.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-socksm.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_getip.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_ckpt.lo +am__objects_18 = src/mpid/ch3/channels/nemesis/netmod/none/lib_libmpi_la-none.lo +#am__objects_19 = src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_init.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_cm.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_tagged.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_msg.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_data.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_progress.lo +am__objects_20 = src/mpid/ch3/channels/nemesis/utils/monitor/lib_libmpi_la-papi_defs.lo \ + src/mpid/ch3/channels/nemesis/utils/replacements/lib_libmpi_la-mkstemp.lo +#am__objects_21 = src/mpid/ch3/channels/sock/src/lib_libmpi_la-sock.lo \ +# src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_finalize.lo \ +# src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_init.lo \ +# src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isend.lo \ +# src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isendv.lo \ +# src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsg.lo \ +# src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsgv.lo \ +# src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_progress.lo \ +# src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_win_fns.lo +#am__objects_22 = src/mpid/ch4/src/lib_libmpi_la-ch4_globals.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4_impl.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4_init.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4_comm.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4_spawn.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4_win.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4i_comm.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_buf.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_init.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_comm.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_proc.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_recvq.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_callbacks.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_origin_callbacks.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_target_callbacks.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_symheap.lo \ +# src/mpid/ch4/src/lib_libmpi_la-ch4r_win.lo \ +# src/mpid/ch4/src/lib_libmpi_la-mpid_ch4_net_array.lo +##am__objects_23 = src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals.lo +#am__objects_24 = src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals_default.lo +#am__objects_25 = src/mpid/ch4/generic/lib_libmpi_la-mpidig_globals.lo \ +# src/mpid/ch4/generic/lib_libmpi_la-mpidig_init.lo \ +# src/mpid/ch4/netmod/src/lib_libmpi_la-netmod_impl.lo +##am__objects_26 = src/mpid/ch4/netmod/ofi/lib_libmpi_la-func_table.lo \ +## src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo \ +## src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_comm.lo \ +## src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_datatype.lo \ +## src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_op.lo \ +## src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_spawn.lo \ +## src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_win.lo \ +## src/mpid/ch4/netmod/ofi/lib_libmpi_la-globals.lo \ +## src/mpid/ch4/netmod/ofi/lib_libmpi_la-util.lo +##am__objects_27 = src/mpid/ch4/netmod/ucx/lib_libmpi_la-func_table.lo \ +## src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_init.lo \ +## src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_comm.lo \ +## src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_datatype.lo \ +## src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_op.lo \ +## src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_spawn.lo \ +## src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_win.lo \ +## src/mpid/ch4/netmod/ucx/lib_libmpi_la-globals.lo +##am__objects_28 = src/mpid/ch4/netmod/stubnm/lib_libmpi_la-func_table.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_init.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_comm.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_datatype.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_op.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_spawn.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_win.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libmpi_la-globals.lo +##am__objects_29 = src/mpid/ch4/shm/src/lib_libmpi_la-func_table.lo \ +## src/mpid/ch4/shm/src/lib_libmpi_la-shm_init.lo \ +## src/mpid/ch4/shm/src/lib_libmpi_la-shm_hooks.lo \ +## src/mpid/ch4/shm/src/lib_libmpi_la-shm_dpm.lo \ +## src/mpid/ch4/shm/src/lib_libmpi_la-shm_mem.lo \ +## src/mpid/ch4/shm/src/lib_libmpi_la-shm_misc.lo \ +## src/mpid/ch4/shm/src/lib_libmpi_la-shm_rma.lo \ +## src/mpid/ch4/shm/src/lib_libmpi_la-shm_impl.lo +##am__objects_30 = src/mpid/ch4/shm/src/lib_libmpi_la-topotree.lo \ +## src/mpid/ch4/shm/src/lib_libmpi_la-topotree_util.lo +###am__objects_31 = src/mpid/ch4/shm/stubshm/lib_libmpi_la-globals.lo \ +### src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_comm.lo \ +### src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_init.lo \ +### src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_spawn.lo \ +### src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_win.lo +###am__objects_32 = src/mpid/ch4/shm/posix/release_gather/lib_libmpi_la-release_gather.lo +##am__objects_33 = src/mpid/ch4/shm/posix/lib_libmpi_la-globals.lo \ +## src/mpid/ch4/shm/posix/lib_libmpi_la-posix_comm.lo \ +## src/mpid/ch4/shm/posix/lib_libmpi_la-posix_init.lo \ +## src/mpid/ch4/shm/posix/lib_libmpi_la-posix_op.lo \ +## src/mpid/ch4/shm/posix/lib_libmpi_la-posix_datatype.lo \ +## src/mpid/ch4/shm/posix/lib_libmpi_la-posix_spawn.lo \ +## src/mpid/ch4/shm/posix/lib_libmpi_la-posix_win.lo \ +## src/mpid/ch4/shm/posix/lib_libmpi_la-posix_eager_array.lo \ +## src/mpid/ch4/shm/posix/lib_libmpi_la-posix_coll_init.lo +###am__objects_34 = src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-globals.lo \ +### src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-func_table.lo +###am__objects_35 = src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-globals.lo \ +### src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-func_table.lo +am__objects_36 = src/mpid/common/sched/lib_libmpi_la-mpidu_sched.lo +#am__objects_37 = src/mpid/common/hcoll/lib_libmpi_la-hcoll_init.lo \ +# src/mpid/common/hcoll/lib_libmpi_la-hcoll_ops.lo \ +# src/mpid/common/hcoll/lib_libmpi_la-hcoll_dtypes.lo \ +# src/mpid/common/hcoll/lib_libmpi_la-hcoll_rte.lo +am__objects_38 = src/mpid/common/shm/lib_libmpi_la-mpidu_shm_alloc.lo \ + src/mpid/common/shm/lib_libmpi_la-mpidu_shm_barrier.lo +#am__objects_39 = src/mpid/common/bc/lib_libmpi_la-mpidu_bc.lo +#am__objects_40 = src/nameserv/file/lib_libmpi_la-file_nameserv.lo +am__objects_41 = src/nameserv/pmi/lib_libmpi_la-pmi_nameserv.lo +#am__objects_42 = src/pmi/pmi2/simple/lib_libmpi_la-simple2pmi.lo \ +# src/pmi/pmi2/simple/lib_libmpi_la-simple_pmiutil.lo +am__objects_43 = src/pmi/simple/lib_libmpi_la-simple_pmiutil.lo \ + src/pmi/simple/lib_libmpi_la-simple_pmi.lo +am__objects_44 = src/mpi/attr/lib_libmpi_la-attrutil.lo \ + src/mpi/attr/lib_libmpi_la-dup_fn.lo \ + src/mpi/coll/allgather/lib_libmpi_la-allgather_allcomm_nb.lo \ + src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_recursive_doubling.lo \ + src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_brucks.lo \ + src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_ring.lo \ + src/mpi/coll/allgather/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.lo \ + src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_allcomm_nb.lo \ + src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_recursive_doubling.lo \ + src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_brucks.lo \ + src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_ring.lo \ + src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.lo \ + src/mpi/coll/allreduce/lib_libmpi_la-allreduce_allcomm_nb.lo \ + src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_recursive_doubling.lo \ + src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.lo \ + src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_smp.lo \ + src/mpi/coll/allreduce/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.lo \ + src/mpi/coll/alltoall/lib_libmpi_la-alltoall_allcomm_nb.lo \ + src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo \ + src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_brucks.lo \ + src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_scattered.lo \ + src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise.lo \ + src/mpi/coll/alltoall/lib_libmpi_la-alltoall_inter_pairwise_exchange.lo \ + src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_allcomm_nb.lo \ + src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo \ + src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_scattered.lo \ + src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_inter_pairwise_exchange.lo \ + src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_allcomm_nb.lo \ + src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo \ + src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_scattered.lo \ + src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_inter_pairwise_exchange.lo \ + src/mpi/coll/barrier/lib_libmpi_la-barrier_allcomm_nb.lo \ + src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_dissemination.lo \ + src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_smp.lo \ + src/mpi/coll/barrier/lib_libmpi_la-barrier_inter_bcast.lo \ + src/mpi/coll/bcast/lib_libmpi_la-bcast_utils.lo \ + src/mpi/coll/bcast/lib_libmpi_la-bcast_allcomm_nb.lo \ + src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_binomial.lo \ + src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo \ + src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_ring_allgather.lo \ + src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_smp.lo \ + src/mpi/coll/bcast/lib_libmpi_la-bcast_inter_remote_send_local_bcast.lo \ + src/mpi/coll/exscan/lib_libmpi_la-exscan_allcomm_nb.lo \ + src/mpi/coll/exscan/lib_libmpi_la-exscan_intra_recursive_doubling.lo \ + src/mpi/coll/gather/lib_libmpi_la-gather_allcomm_nb.lo \ + src/mpi/coll/gather/lib_libmpi_la-gather_intra_binomial.lo \ + src/mpi/coll/gather/lib_libmpi_la-gather_inter_linear.lo \ + src/mpi/coll/gather/lib_libmpi_la-gather_inter_local_gather_remote_send.lo \ + src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_nb.lo \ + src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_linear.lo \ + src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_allcomm_nb.lo \ + src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_halving.lo \ + src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_pairwise.lo \ + src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.lo \ + src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_noncommutative.lo \ + src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo \ + src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_allcomm_nb.lo \ + src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.lo \ + src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_pairwise.lo \ + src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.lo \ + src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.lo \ + src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo \ + src/mpi/coll/reduce/lib_libmpi_la-reduce_allcomm_nb.lo \ + src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_binomial.lo \ + src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_reduce_scatter_gather.lo \ + src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_smp.lo \ + src/mpi/coll/reduce/lib_libmpi_la-reduce_inter_local_reduce_remote_send.lo \ + src/mpi/coll/scan/lib_libmpi_la-scan_allcomm_nb.lo \ + src/mpi/coll/scan/lib_libmpi_la-scan_intra_recursive_doubling.lo \ + src/mpi/coll/scan/lib_libmpi_la-scan_intra_smp.lo \ + src/mpi/coll/scatter/lib_libmpi_la-scatter_allcomm_nb.lo \ + src/mpi/coll/scatter/lib_libmpi_la-scatter_intra_binomial.lo \ + src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_linear.lo \ + src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_remote_send_local_scatter.lo \ + src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_nb.lo \ + src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_linear.lo \ + src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather_allcomm_nb.lo \ + src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.lo \ + src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall_allcomm_nb.lo \ + src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.lo \ + src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_recursive_doubling.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_brucks.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_ring.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_gentran_algos.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_brucks.lo \ + src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_ring.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_recursive_doubling.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_brucks.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_ring.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_gentran_algos.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_ring.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_brucks.lo \ + src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_utils.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_naive.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_recursive_doubling.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_smp.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_gentran_algos.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo \ + src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_tree.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_inplace.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_brucks.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_pairwise.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_inter_pairwise_exchange.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_gentran_algos.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_brucks.lo \ + src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_ring.lo \ + src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_inplace.lo \ + src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_blocked.lo \ + src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.lo \ + src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_gentran_algos.lo \ + src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_gentran_scattered.lo \ + src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_inplace.lo \ + src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_blocked.lo \ + src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.lo \ + src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_recursive_doubling.lo \ + src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_inter_bcast.lo \ + src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_gentran_recexch.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_binomial.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_smp.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_inter_flat.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_gentran_algos.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_tree.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_ring.lo \ + src/mpi/coll/ibcast/lib_libmpi_la-ibcast_utils.lo \ + src/mpi/coll/iexscan/lib_libmpi_la-iexscan_intra_recursive_doubling.lo \ + src/mpi/coll/igather/lib_libmpi_la-igather_intra_binomial.lo \ + src/mpi/coll/igather/lib_libmpi_la-igather_inter_short.lo \ + src/mpi/coll/igather/lib_libmpi_la-igather_inter_long.lo \ + src/mpi/coll/igather/lib_libmpi_la-igather_gentran_algos.lo \ + src/mpi/coll/igather/lib_libmpi_la-igather_intra_gentran_tree.lo \ + src/mpi/coll/igatherv/lib_libmpi_la-igatherv_allcomm_linear.lo \ + src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.lo \ + src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_pairwise.lo \ + src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.lo \ + src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_noncommutative.lo \ + src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo \ + src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_gentran_algos.lo \ + src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_gentran_algos.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo \ + src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_binomial.lo \ + src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.lo \ + src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_smp.lo \ + src/mpi/coll/ireduce/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.lo \ + src/mpi/coll/ireduce/lib_libmpi_la-ireduce_gentran_algos.lo \ + src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_tree.lo \ + src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_ring.lo \ + src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_recursive_doubling.lo \ + src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_smp.lo \ + src/mpi/coll/iscan/lib_libmpi_la-iscan_gentran_algos.lo \ + src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.lo \ + src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_binomial.lo \ + src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_linear.lo \ + src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.lo \ + src/mpi/coll/iscatter/lib_libmpi_la-iscatter_gentran_algos.lo \ + src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_gentran_tree.lo \ + src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv_allcomm_linear.lo \ + src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_linear.lo \ + src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_gentran_algos.lo \ + src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo \ + src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.lo \ + src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.lo \ + src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo \ + src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.lo \ + src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_gentran_algos.lo \ + src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo \ + src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.lo \ + src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.lo \ + src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo \ + src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.lo \ + src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.lo \ + src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo \ + src/mpi/coll/op/lib_libmpi_la-opsum.lo \ + src/mpi/coll/op/lib_libmpi_la-opmax.lo \ + src/mpi/coll/op/lib_libmpi_la-opmin.lo \ + src/mpi/coll/op/lib_libmpi_la-opband.lo \ + src/mpi/coll/op/lib_libmpi_la-opbor.lo \ + src/mpi/coll/op/lib_libmpi_la-opbxor.lo \ + src/mpi/coll/op/lib_libmpi_la-opland.lo \ + src/mpi/coll/op/lib_libmpi_la-oplor.lo \ + src/mpi/coll/op/lib_libmpi_la-oplxor.lo \ + src/mpi/coll/op/lib_libmpi_la-opprod.lo \ + src/mpi/coll/op/lib_libmpi_la-opminloc.lo \ + src/mpi/coll/op/lib_libmpi_la-opmaxloc.lo \ + src/mpi/coll/op/lib_libmpi_la-opno_op.lo \ + src/mpi/coll/op/lib_libmpi_la-opreplace.lo \ + src/mpi/coll/allreduce_group/lib_libmpi_la-allreduce_group.lo \ + src/mpi/coll/src/lib_libmpi_la-coll_impl.lo \ + src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_impl.lo \ + src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_utils.lo \ + src/mpi/coll/transports/gentran/lib_libmpi_la-tsp_gentran.lo \ + src/mpi/coll/transports/stubtran/lib_libmpi_la-stubtran_impl.lo \ + src/mpi/coll/transports/stubtran/lib_libmpi_la-tsp_stubtran.lo \ + src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treealgo.lo \ + src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treeutil.lo \ + src/mpi/coll/algorithms/recexchalgo/lib_libmpi_la-recexchalgo.lo \ + src/mpi/coll/algorithms/stubalgo/lib_libmpi_la-stubalgo.lo \ + src/mpi/coll/lib_libmpi_la-helper_fns.lo \ + src/mpi/coll/lib_libmpi_la-nbcutil.lo \ + src/mpi/comm/lib_libmpi_la-commutil.lo \ + src/mpi/comm/lib_libmpi_la-contextid.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-darray_support.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_blockindexed.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_contig.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_indexed.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_struct.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_vector.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-looputil.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_count.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_flatten.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-subarray_support.lo \ + src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_debug.lo \ + src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_flatten.lo \ + src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack.lo \ + src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack_external.lo \ + src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_iov.lo \ + src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_create.lo \ + src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_debug.lo \ + src/mpi/datatype/lib_libmpi_la-typeutil.lo \ + src/mpi/datatype/lib_libmpi_la-ext32_datatype.lo \ + src/mpi/datatype/lib_libmpi_la-type_blockindexed.lo \ + src/mpi/datatype/lib_libmpi_la-type_create_pairtype.lo \ + src/mpi/datatype/lib_libmpi_la-type_debug.lo \ + src/mpi/errhan/lib_libmpi_la-errutil.lo \ + src/mpi/errhan/lib_libmpi_la-dynerrutil.lo \ + src/mpi/group/lib_libmpi_la-grouputil.lo \ + src/mpi/info/lib_libmpi_la-infoutil.lo \ + src/mpi/init/lib_libmpi_la-initinfo.lo \ + src/mpi/init/lib_libmpi_la-async.lo \ + src/mpi/init/lib_libmpi_la-netloc_util.lo \ + src/mpi/pt2pt/lib_libmpi_la-bsendutil.lo \ + src/mpi/request/lib_libmpi_la-mpir_request.lo \ + src/mpi/rma/lib_libmpi_la-winutil.lo \ + src/mpi/rma/lib_libmpi_la-rmatypeutil.lo \ + src/mpi/topo/lib_libmpi_la-topoutil.lo \ + src/util/mem/lib_libmpi_la-handlemem.lo \ + src/util/mem/lib_libmpi_la-strerror.lo \ + src/util/cvar/lib_libmpi_la-mpir_cvars.lo \ + src/util/procmap/lib_libmpi_la-local_proc.lo \ + src/util/assert/lib_libmpi_la-assert.lo \ + $(am__objects_12) $(am__objects_13) \ + src/glue/romio/lib_libmpi_la-glue_romio.lo \ + $(am__objects_14) $(am__objects_15) $(am__objects_16) \ + $(am__objects_17) $(am__objects_18) $(am__objects_19) \ + $(am__objects_20) $(am__objects_21) $(am__objects_22) \ + $(am__objects_23) $(am__objects_24) $(am__objects_25) \ + $(am__objects_26) $(am__objects_27) $(am__objects_28) \ + $(am__objects_29) $(am__objects_30) $(am__objects_31) \ + $(am__objects_32) $(am__objects_33) $(am__objects_34) \ + $(am__objects_35) $(am__objects_36) $(am__objects_37) \ + $(am__objects_38) $(am__objects_39) \ + src/mpi_t/lib_libmpi_la-mpit.lo $(am__objects_40) \ + $(am__objects_41) $(am__objects_42) $(am__objects_43) +am_lib_libmpi_la_OBJECTS = \ + $(am__objects_11) $(am__objects_44) +#am_lib_libmpi_la_OBJECTS = \ +# $(am__objects_11) +lib_libmpi_la_OBJECTS = $(am_lib_libmpi_la_OBJECTS) +am_lib_libmpi_la_rpath = -rpath \ + $(libdir) +#am_lib_libmpi_la_rpath = -rpath \ +# $(libdir) +#lib_libpmpi_la_DEPENDENCIES = \ +# $(am__DEPENDENCIES_1) \ +# $(am__DEPENDENCIES_2) +am__lib_libpmpi_la_SOURCES_DIST = src/mpi/attr/attr_delete.c \ + src/mpi/attr/attr_get.c src/mpi/attr/attr_put.c \ + src/mpi/attr/comm_create_keyval.c \ + src/mpi/attr/comm_delete_attr.c \ + src/mpi/attr/comm_free_keyval.c src/mpi/attr/comm_get_attr.c \ + src/mpi/attr/comm_set_attr.c src/mpi/attr/keyval_create.c \ + src/mpi/attr/keyval_free.c src/mpi/attr/type_create_keyval.c \ + src/mpi/attr/type_delete_attr.c \ + src/mpi/attr/type_free_keyval.c src/mpi/attr/type_get_attr.c \ + src/mpi/attr/type_set_attr.c src/mpi/attr/win_create_keyval.c \ + src/mpi/attr/win_delete_attr.c src/mpi/attr/win_free_keyval.c \ + src/mpi/attr/win_get_attr.c src/mpi/attr/win_set_attr.c \ + src/mpi/coll/allgather/allgather.c \ + src/mpi/coll/allgatherv/allgatherv.c \ + src/mpi/coll/allreduce/allreduce.c \ + src/mpi/coll/alltoall/alltoall.c \ + src/mpi/coll/alltoallv/alltoallv.c \ + src/mpi/coll/alltoallw/alltoallw.c \ + src/mpi/coll/barrier/barrier.c src/mpi/coll/bcast/bcast.c \ + src/mpi/coll/exscan/exscan.c src/mpi/coll/gather/gather.c \ + src/mpi/coll/gatherv/gatherv.c \ + src/mpi/coll/reduce_scatter/reduce_scatter.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c \ + src/mpi/coll/reduce/reduce.c src/mpi/coll/scan/scan.c \ + src/mpi/coll/scatter/scatter.c \ + src/mpi/coll/scatterv/scatterv.c \ + src/mpi/coll/neighbor_allgather/neighbor_allgather.c \ + src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c \ + src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c \ + src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c \ + src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c \ + src/mpi/coll/iallgather/iallgather.c \ + src/mpi/coll/iallgatherv/iallgatherv.c \ + src/mpi/coll/iallreduce/iallreduce.c \ + src/mpi/coll/ialltoall/ialltoall.c \ + src/mpi/coll/ialltoallv/ialltoallv.c \ + src/mpi/coll/ialltoallw/ialltoallw.c \ + src/mpi/coll/ibarrier/ibarrier.c src/mpi/coll/ibcast/ibcast.c \ + src/mpi/coll/iexscan/iexscan.c src/mpi/coll/igather/igather.c \ + src/mpi/coll/igatherv/igatherv.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c \ + src/mpi/coll/ireduce/ireduce.c src/mpi/coll/iscan/iscan.c \ + src/mpi/coll/iscatter/iscatter.c \ + src/mpi/coll/iscatterv/iscatterv.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c \ + src/mpi/coll/op/op_create.c src/mpi/coll/op/op_free.c \ + src/mpi/coll/op/op_commutative.c \ + src/mpi/coll/reduce_local/reduce_local.c \ + src/mpi/comm/comm_compare.c src/mpi/comm/comm_create.c \ + src/mpi/comm/comm_create_group.c src/mpi/comm/comm_dup.c \ + src/mpi/comm/comm_dup_with_info.c src/mpi/comm/comm_free.c \ + src/mpi/comm/comm_get_name.c src/mpi/comm/comm_get_info.c \ + src/mpi/comm/comm_set_info.c src/mpi/comm/comm_group.c \ + src/mpi/comm/comm_idup.c src/mpi/comm/comm_rank.c \ + src/mpi/comm/comm_size.c src/mpi/comm/comm_remote_group.c \ + src/mpi/comm/comm_remote_size.c src/mpi/comm/comm_set_name.c \ + src/mpi/comm/comm_split.c src/mpi/comm/comm_test_inter.c \ + src/mpi/comm/intercomm_create.c src/mpi/comm/intercomm_merge.c \ + src/mpi/comm/comm_split_type.c src/mpi/comm/comm_failure_ack.c \ + src/mpi/comm/comm_failure_get_acked.c \ + src/mpi/comm/comm_revoke.c src/mpi/comm/comm_shrink.c \ + src/mpi/comm/comm_agree.c src/mpi/datatype/address.c \ + src/mpi/datatype/get_address.c src/mpi/datatype/get_count.c \ + src/mpi/datatype/get_elements.c \ + src/mpi/datatype/get_elements_x.c src/mpi/datatype/pack.c \ + src/mpi/datatype/pack_external.c \ + src/mpi/datatype/pack_external_size.c \ + src/mpi/datatype/pack_size.c \ + src/mpi/datatype/status_set_elements.c \ + src/mpi/datatype/status_set_elements_x.c \ + src/mpi/datatype/type_get_name.c \ + src/mpi/datatype/type_set_name.c src/mpi/datatype/type_size.c \ + src/mpi/datatype/type_size_x.c src/mpi/datatype/type_extent.c \ + src/mpi/datatype/type_vector.c src/mpi/datatype/type_commit.c \ + src/mpi/datatype/type_indexed.c \ + src/mpi/datatype/type_hindexed.c \ + src/mpi/datatype/type_struct.c \ + src/mpi/datatype/type_contiguous.c \ + src/mpi/datatype/type_free.c src/mpi/datatype/type_hvector.c \ + src/mpi/datatype/type_dup.c \ + src/mpi/datatype/type_get_envelope.c \ + src/mpi/datatype/type_get_contents.c \ + src/mpi/datatype/type_ub.c src/mpi/datatype/type_lb.c \ + src/mpi/datatype/type_get_extent.c \ + src/mpi/datatype/type_get_extent_x.c \ + src/mpi/datatype/type_get_true_extent.c \ + src/mpi/datatype/type_get_true_extent_x.c \ + src/mpi/datatype/type_match_size.c \ + src/mpi/datatype/type_create_struct.c \ + src/mpi/datatype/type_create_hindexed.c \ + src/mpi/datatype/type_create_hvector.c \ + src/mpi/datatype/type_create_indexed_block.c \ + src/mpi/datatype/type_create_hindexed_block.c \ + src/mpi/datatype/type_create_resized.c \ + src/mpi/datatype/type_create_darray.c \ + src/mpi/datatype/type_create_subarray.c \ + src/mpi/datatype/unpack.c src/mpi/datatype/unpack_external.c \ + src/mpi/errhan/add_error_code.c \ + src/mpi/errhan/add_error_class.c \ + src/mpi/errhan/add_error_string.c \ + src/mpi/errhan/comm_call_errhandler.c \ + src/mpi/errhan/comm_create_errhandler.c \ + src/mpi/errhan/comm_get_errhandler.c \ + src/mpi/errhan/comm_set_errhandler.c \ + src/mpi/errhan/errhandler_create.c \ + src/mpi/errhan/errhandler_free.c \ + src/mpi/errhan/errhandler_get.c \ + src/mpi/errhan/errhandler_set.c src/mpi/errhan/error_class.c \ + src/mpi/errhan/error_string.c \ + src/mpi/errhan/file_create_errhandler.c \ + src/mpi/errhan/file_get_errhandler.c \ + src/mpi/errhan/file_set_errhandler.c \ + src/mpi/errhan/file_call_errhandler.c \ + src/mpi/errhan/win_create_errhandler.c \ + src/mpi/errhan/win_call_errhandler.c \ + src/mpi/errhan/win_get_errhandler.c \ + src/mpi/errhan/win_set_errhandler.c \ + src/mpi/group/group_compare.c src/mpi/group/group_difference.c \ + src/mpi/group/group_excl.c src/mpi/group/group_free.c \ + src/mpi/group/group_incl.c src/mpi/group/group_intersection.c \ + src/mpi/group/group_range_excl.c \ + src/mpi/group/group_range_incl.c src/mpi/group/group_rank.c \ + src/mpi/group/group_size.c \ + src/mpi/group/group_translate_ranks.c \ + src/mpi/group/group_union.c src/mpi/info/info_create.c \ + src/mpi/info/info_delete.c src/mpi/info/info_dup.c \ + src/mpi/info/info_free.c src/mpi/info/info_get.c \ + src/mpi/info/info_getn.c src/mpi/info/info_getnth.c \ + src/mpi/info/info_getvallen.c src/mpi/info/info_set.c \ + src/mpi/init/abort.c src/mpi/init/init.c \ + src/mpi/init/initialized.c src/mpi/init/initthread.c \ + src/mpi/init/ismain.c src/mpi/init/finalize.c \ + src/mpi/init/finalized.c src/mpi/init/querythread.c \ + src/mpi/misc/getpname.c src/mpi/misc/pcontrol.c \ + src/mpi/misc/version.c src/mpi/misc/library_version.c \ + src/mpi/misc/aint_add.c src/mpi/misc/aint_diff.c \ + src/mpi/misc/utils.c src/mpi/pt2pt/bsend.c \ + src/mpi/pt2pt/bsend_init.c src/mpi/pt2pt/bufattach.c \ + src/mpi/pt2pt/buffree.c src/mpi/pt2pt/ibsend.c \ + src/mpi/pt2pt/improbe.c src/mpi/pt2pt/imrecv.c \ + src/mpi/pt2pt/iprobe.c src/mpi/pt2pt/irecv.c \ + src/mpi/pt2pt/irsend.c src/mpi/pt2pt/isend.c \ + src/mpi/pt2pt/issend.c src/mpi/pt2pt/mprobe.c \ + src/mpi/pt2pt/mrecv.c src/mpi/pt2pt/probe.c \ + src/mpi/pt2pt/recv.c src/mpi/pt2pt/recv_init.c \ + src/mpi/pt2pt/rsend.c src/mpi/pt2pt/rsend_init.c \ + src/mpi/pt2pt/send.c src/mpi/pt2pt/send_init.c \ + src/mpi/pt2pt/sendrecv.c src/mpi/pt2pt/sendrecv_rep.c \ + src/mpi/pt2pt/ssend.c src/mpi/pt2pt/ssend_init.c \ + src/mpi/request/cancel.c src/mpi/request/greq_start.c \ + src/mpi/request/greq_complete.c src/mpi/request/request_free.c \ + src/mpi/request/request_get_status.c \ + src/mpi/request/status_set_cancelled.c src/mpi/request/start.c \ + src/mpi/request/startall.c src/mpi/request/test.c \ + src/mpi/request/test_cancelled.c src/mpi/request/testall.c \ + src/mpi/request/testany.c src/mpi/request/testsome.c \ + src/mpi/request/wait.c src/mpi/request/waitall.c \ + src/mpi/request/waitany.c src/mpi/request/waitsome.c \ + src/mpi/rma/accumulate.c src/mpi/rma/alloc_mem.c \ + src/mpi/rma/compare_and_swap.c src/mpi/rma/fetch_and_op.c \ + src/mpi/rma/free_mem.c src/mpi/rma/get.c \ + src/mpi/rma/get_accumulate.c src/mpi/rma/put.c \ + src/mpi/rma/raccumulate.c src/mpi/rma/rget.c \ + src/mpi/rma/rget_accumulate.c src/mpi/rma/rput.c \ + src/mpi/rma/win_allocate.c src/mpi/rma/win_allocate_shared.c \ + src/mpi/rma/win_attach.c src/mpi/rma/win_complete.c \ + src/mpi/rma/win_create.c src/mpi/rma/win_create_dynamic.c \ + src/mpi/rma/win_detach.c src/mpi/rma/win_fence.c \ + src/mpi/rma/win_flush.c src/mpi/rma/win_flush_all.c \ + src/mpi/rma/win_flush_local.c \ + src/mpi/rma/win_flush_local_all.c src/mpi/rma/win_free.c \ + src/mpi/rma/win_get_group.c src/mpi/rma/win_get_info.c \ + src/mpi/rma/win_get_name.c src/mpi/rma/win_lock.c \ + src/mpi/rma/win_lock_all.c src/mpi/rma/win_post.c \ + src/mpi/rma/win_set_info.c src/mpi/rma/win_set_name.c \ + src/mpi/rma/win_shared_query.c src/mpi/rma/win_start.c \ + src/mpi/rma/win_sync.c src/mpi/rma/win_test.c \ + src/mpi/rma/win_unlock.c src/mpi/rma/win_unlock_all.c \ + src/mpi/rma/win_wait.c src/mpi/spawn/comm_disconnect.c \ + src/mpi/spawn/comm_get_parent.c src/mpi/spawn/comm_join.c \ + src/mpi/spawn/comm_spawn.c src/mpi/spawn/comm_spawn_multiple.c \ + src/mpi/spawn/lookup_name.c src/mpi/spawn/publish_name.c \ + src/mpi/spawn/unpublish_name.c src/mpi/spawn/open_port.c \ + src/mpi/spawn/close_port.c src/mpi/spawn/comm_connect.c \ + src/mpi/spawn/comm_accept.c src/mpi/timer/wtime.c \ + src/mpi/timer/wtick.c src/mpi/topo/cart_coords.c \ + src/mpi/topo/cart_create.c src/mpi/topo/cart_get.c \ + src/mpi/topo/cart_map.c src/mpi/topo/cart_rank.c \ + src/mpi/topo/cart_shift.c src/mpi/topo/cart_sub.c \ + src/mpi/topo/dims_create.c src/mpi/topo/graph_get.c \ + src/mpi/topo/graph_map.c src/mpi/topo/graph_nbr.c \ + src/mpi/topo/graphcreate.c src/mpi/topo/graphdimsget.c \ + src/mpi/topo/graphnbrcnt.c src/mpi/topo/cartdim_get.c \ + src/mpi/topo/topo_test.c src/mpi/topo/dist_gr_create_adj.c \ + src/mpi/topo/dist_gr_create.c \ + src/mpi/topo/dist_gr_neighb_count.c \ + src/mpi/topo/dist_gr_neighb.c \ + src/binding/fortran/mpif_h/statusf2c.c \ + src/binding/fortran/mpif_h/statusc2f.c \ + src/binding/fortran/use_mpi/create_f90_int.c \ + src/binding/fortran/use_mpi/create_f90_real.c \ + src/binding/fortran/use_mpi/create_f90_complex.c \ + src/glue/romio/all_romio_symbols.c src/mpi_t/cat_changed.c \ + src/mpi_t/cat_get_categories.c src/mpi_t/cat_get_cvars.c \ + src/mpi_t/cat_get_info.c src/mpi_t/cat_get_num.c \ + src/mpi_t/cat_get_pvars.c src/mpi_t/cvar_get_info.c \ + src/mpi_t/cvar_get_num.c src/mpi_t/cvar_handle_alloc.c \ + src/mpi_t/cvar_handle_free.c src/mpi_t/cvar_read.c \ + src/mpi_t/cvar_write.c src/mpi_t/enum_get_info.c \ + src/mpi_t/enum_get_item.c src/mpi_t/mpit_finalize.c \ + src/mpi_t/mpit_initthread.c src/mpi_t/pvar_get_info.c \ + src/mpi_t/pvar_get_num.c src/mpi_t/pvar_handle_alloc.c \ + src/mpi_t/pvar_handle_free.c src/mpi_t/pvar_read.c \ + src/mpi_t/pvar_readreset.c src/mpi_t/pvar_reset.c \ + src/mpi_t/pvar_session_create.c src/mpi_t/pvar_session_free.c \ + src/mpi_t/pvar_start.c src/mpi_t/pvar_stop.c \ + src/mpi_t/pvar_write.c src/mpi_t/cat_get_index.c \ + src/mpi_t/cvar_get_index.c src/mpi_t/pvar_get_index.c \ + src/binding/fortran/mpif_h/sendf.c \ + src/binding/fortran/mpif_h/recvf.c \ + src/binding/fortran/mpif_h/get_countf.c \ + src/binding/fortran/mpif_h/bsendf.c \ + src/binding/fortran/mpif_h/ssendf.c \ + src/binding/fortran/mpif_h/rsendf.c \ + src/binding/fortran/mpif_h/bufattachf.c \ + src/binding/fortran/mpif_h/bufdetachf.c \ + src/binding/fortran/mpif_h/isendf.c \ + src/binding/fortran/mpif_h/ibsendf.c \ + src/binding/fortran/mpif_h/issendf.c \ + src/binding/fortran/mpif_h/irsendf.c \ + src/binding/fortran/mpif_h/irecvf.c \ + src/binding/fortran/mpif_h/waitf.c \ + src/binding/fortran/mpif_h/testf.c \ + src/binding/fortran/mpif_h/request_freef.c \ + src/binding/fortran/mpif_h/waitanyf.c \ + src/binding/fortran/mpif_h/testanyf.c \ + src/binding/fortran/mpif_h/waitallf.c \ + src/binding/fortran/mpif_h/testallf.c \ + src/binding/fortran/mpif_h/waitsomef.c \ + src/binding/fortran/mpif_h/testsomef.c \ + src/binding/fortran/mpif_h/iprobef.c \ + src/binding/fortran/mpif_h/probef.c \ + src/binding/fortran/mpif_h/cancelf.c \ + src/binding/fortran/mpif_h/testcancelf.c \ + src/binding/fortran/mpif_h/send_initf.c \ + src/binding/fortran/mpif_h/bsend_initf.c \ + src/binding/fortran/mpif_h/ssend_initf.c \ + src/binding/fortran/mpif_h/rsend_initf.c \ + src/binding/fortran/mpif_h/recv_initf.c \ + src/binding/fortran/mpif_h/startf.c \ + src/binding/fortran/mpif_h/startallf.c \ + src/binding/fortran/mpif_h/sendrecvf.c \ + src/binding/fortran/mpif_h/sndrcvrplf.c \ + src/binding/fortran/mpif_h/typecontigf.c \ + src/binding/fortran/mpif_h/type_vectorf.c \ + src/binding/fortran/mpif_h/type_hvectorf.c \ + src/binding/fortran/mpif_h/type_indexedf.c \ + src/binding/fortran/mpif_h/type_hindexedf.c \ + src/binding/fortran/mpif_h/type_structf.c \ + src/binding/fortran/mpif_h/type_extentf.c \ + src/binding/fortran/mpif_h/type_sizef.c \ + src/binding/fortran/mpif_h/type_lbf.c \ + src/binding/fortran/mpif_h/type_ubf.c \ + src/binding/fortran/mpif_h/type_commitf.c \ + src/binding/fortran/mpif_h/type_freef.c \ + src/binding/fortran/mpif_h/get_elementsf.c \ + src/binding/fortran/mpif_h/packf.c \ + src/binding/fortran/mpif_h/unpackf.c \ + src/binding/fortran/mpif_h/pack_sizef.c \ + src/binding/fortran/mpif_h/barrierf.c \ + src/binding/fortran/mpif_h/bcastf.c \ + src/binding/fortran/mpif_h/gatherf.c \ + src/binding/fortran/mpif_h/gathervf.c \ + src/binding/fortran/mpif_h/scatterf.c \ + src/binding/fortran/mpif_h/scattervf.c \ + src/binding/fortran/mpif_h/allgatherf.c \ + src/binding/fortran/mpif_h/allgathervf.c \ + src/binding/fortran/mpif_h/alltoallf.c \ + src/binding/fortran/mpif_h/alltoallvf.c \ + src/binding/fortran/mpif_h/alltoallwf.c \ + src/binding/fortran/mpif_h/exscanf.c \ + src/binding/fortran/mpif_h/reducef.c \ + src/binding/fortran/mpif_h/op_createf.c \ + src/binding/fortran/mpif_h/op_freef.c \ + src/binding/fortran/mpif_h/allreducef.c \ + src/binding/fortran/mpif_h/redscatf.c \ + src/binding/fortran/mpif_h/scanf.c \ + src/binding/fortran/mpif_h/group_sizef.c \ + src/binding/fortran/mpif_h/group_rankf.c \ + src/binding/fortran/mpif_h/grouptranksf.c \ + src/binding/fortran/mpif_h/group_comparef.c \ + src/binding/fortran/mpif_h/comm_groupf.c \ + src/binding/fortran/mpif_h/group_unionf.c \ + src/binding/fortran/mpif_h/groupinterf.c \ + src/binding/fortran/mpif_h/groupdifff.c \ + src/binding/fortran/mpif_h/group_inclf.c \ + src/binding/fortran/mpif_h/group_exclf.c \ + src/binding/fortran/mpif_h/grouprinclf.c \ + src/binding/fortran/mpif_h/grouprexclf.c \ + src/binding/fortran/mpif_h/group_freef.c \ + src/binding/fortran/mpif_h/comm_sizef.c \ + src/binding/fortran/mpif_h/comm_rankf.c \ + src/binding/fortran/mpif_h/comm_comparef.c \ + src/binding/fortran/mpif_h/comm_dupf.c \ + src/binding/fortran/mpif_h/comm_dup_with_infof.c \ + src/binding/fortran/mpif_h/comm_createf.c \ + src/binding/fortran/mpif_h/comm_splitf.c \ + src/binding/fortran/mpif_h/comm_freef.c \ + src/binding/fortran/mpif_h/commtesticf.c \ + src/binding/fortran/mpif_h/commrsizef.c \ + src/binding/fortran/mpif_h/commrgroupf.c \ + src/binding/fortran/mpif_h/iccreatef.c \ + src/binding/fortran/mpif_h/icmergef.c \ + src/binding/fortran/mpif_h/keyval_freef.c \ + src/binding/fortran/mpif_h/attr_putf.c \ + src/binding/fortran/mpif_h/attr_getf.c \ + src/binding/fortran/mpif_h/attr_deletef.c \ + src/binding/fortran/mpif_h/topo_testf.c \ + src/binding/fortran/mpif_h/cart_createf.c \ + src/binding/fortran/mpif_h/dims_createf.c \ + src/binding/fortran/mpif_h/graph_createf.c \ + src/binding/fortran/mpif_h/graphdims_getf.c \ + src/binding/fortran/mpif_h/graph_getf.c \ + src/binding/fortran/mpif_h/cartdim_getf.c \ + src/binding/fortran/mpif_h/cart_getf.c \ + src/binding/fortran/mpif_h/cart_rankf.c \ + src/binding/fortran/mpif_h/cart_coordsf.c \ + src/binding/fortran/mpif_h/grfnbcountf.c \ + src/binding/fortran/mpif_h/grfnbrsf.c \ + src/binding/fortran/mpif_h/cart_shiftf.c \ + src/binding/fortran/mpif_h/cart_subf.c \ + src/binding/fortran/mpif_h/cart_mapf.c \ + src/binding/fortran/mpif_h/graph_mapf.c \ + src/binding/fortran/mpif_h/getpnamef.c \ + src/binding/fortran/mpif_h/get_versionf.c \ + src/binding/fortran/mpif_h/get_library_versionf.c \ + src/binding/fortran/mpif_h/errhcreatef.c \ + src/binding/fortran/mpif_h/errhsetf.c \ + src/binding/fortran/mpif_h/errhgetf.c \ + src/binding/fortran/mpif_h/errhfreef.c \ + src/binding/fortran/mpif_h/error_stringf.c \ + src/binding/fortran/mpif_h/error_classf.c \ + src/binding/fortran/mpif_h/finalizef.c \ + src/binding/fortran/mpif_h/initializedf.c \ + src/binding/fortran/mpif_h/abortf.c \ + src/binding/fortran/mpif_h/close_portf.c \ + src/binding/fortran/mpif_h/comm_acceptf.c \ + src/binding/fortran/mpif_h/comm_connectf.c \ + src/binding/fortran/mpif_h/commdiscf.c \ + src/binding/fortran/mpif_h/commparentf.c \ + src/binding/fortran/mpif_h/comm_joinf.c \ + src/binding/fortran/mpif_h/comm_spawnf.c \ + src/binding/fortran/mpif_h/spawnmultf.c \ + src/binding/fortran/mpif_h/lookup_namef.c \ + src/binding/fortran/mpif_h/open_portf.c \ + src/binding/fortran/mpif_h/publish_namef.c \ + src/binding/fortran/mpif_h/unpubnamef.c \ + src/binding/fortran/mpif_h/comm_set_infof.c \ + src/binding/fortran/mpif_h/comm_get_infof.c \ + src/binding/fortran/mpif_h/accumulatef.c \ + src/binding/fortran/mpif_h/getf.c \ + src/binding/fortran/mpif_h/putf.c \ + src/binding/fortran/mpif_h/win_completef.c \ + src/binding/fortran/mpif_h/win_createf.c \ + src/binding/fortran/mpif_h/win_fencef.c \ + src/binding/fortran/mpif_h/win_freef.c \ + src/binding/fortran/mpif_h/win_get_groupf.c \ + src/binding/fortran/mpif_h/win_lockf.c \ + src/binding/fortran/mpif_h/win_postf.c \ + src/binding/fortran/mpif_h/win_startf.c \ + src/binding/fortran/mpif_h/win_testf.c \ + src/binding/fortran/mpif_h/win_unlockf.c \ + src/binding/fortran/mpif_h/win_waitf.c \ + src/binding/fortran/mpif_h/win_allocatef.c \ + src/binding/fortran/mpif_h/win_allocate_sharedf.c \ + src/binding/fortran/mpif_h/win_shared_queryf.c \ + src/binding/fortran/mpif_h/win_create_dynamicf.c \ + src/binding/fortran/mpif_h/win_attachf.c \ + src/binding/fortran/mpif_h/win_detachf.c \ + src/binding/fortran/mpif_h/win_get_infof.c \ + src/binding/fortran/mpif_h/win_set_infof.c \ + src/binding/fortran/mpif_h/get_accumulatef.c \ + src/binding/fortran/mpif_h/fetch_and_opf.c \ + src/binding/fortran/mpif_h/compare_and_swapf.c \ + src/binding/fortran/mpif_h/rputf.c \ + src/binding/fortran/mpif_h/rgetf.c \ + src/binding/fortran/mpif_h/raccumulatef.c \ + src/binding/fortran/mpif_h/rget_accumulatef.c \ + src/binding/fortran/mpif_h/win_lock_allf.c \ + src/binding/fortran/mpif_h/win_unlock_allf.c \ + src/binding/fortran/mpif_h/win_flushf.c \ + src/binding/fortran/mpif_h/win_flush_allf.c \ + src/binding/fortran/mpif_h/win_flush_localf.c \ + src/binding/fortran/mpif_h/win_flush_local_allf.c \ + src/binding/fortran/mpif_h/win_syncf.c \ + src/binding/fortran/mpif_h/adderrclassf.c \ + src/binding/fortran/mpif_h/adderrcodef.c \ + src/binding/fortran/mpif_h/adderrstringf.c \ + src/binding/fortran/mpif_h/commcallerrf.c \ + src/binding/fortran/mpif_h/commnewkeyf.c \ + src/binding/fortran/mpif_h/commdelattrf.c \ + src/binding/fortran/mpif_h/commfreekeyf.c \ + src/binding/fortran/mpif_h/comm_get_attrf.c \ + src/binding/fortran/mpif_h/commgetnamf.c \ + src/binding/fortran/mpif_h/comm_set_attrf.c \ + src/binding/fortran/mpif_h/comm_set_namef.c \ + src/binding/fortran/mpif_h/filecallerrf.c \ + src/binding/fortran/mpif_h/greqcompletef.c \ + src/binding/fortran/mpif_h/greqstartf.c \ + src/binding/fortran/mpif_h/isthrmainf.c \ + src/binding/fortran/mpif_h/query_threadf.c \ + src/binding/fortran/mpif_h/statgetclf.c \ + src/binding/fortran/mpif_h/statsetelf.c \ + src/binding/fortran/mpif_h/typenewkeyf.c \ + src/binding/fortran/mpif_h/typedelattrf.c \ + src/binding/fortran/mpif_h/type_dupf.c \ + src/binding/fortran/mpif_h/typefreekeyf.c \ + src/binding/fortran/mpif_h/type_get_attrf.c \ + src/binding/fortran/mpif_h/typegetcntsf.c \ + src/binding/fortran/mpif_h/typegetenvf.c \ + src/binding/fortran/mpif_h/typegnamef.c \ + src/binding/fortran/mpif_h/typesetattrf.c \ + src/binding/fortran/mpif_h/typesetnamef.c \ + src/binding/fortran/mpif_h/type_match_sizef.c \ + src/binding/fortran/mpif_h/wincallerrf.c \ + src/binding/fortran/mpif_h/winnewkeyf.c \ + src/binding/fortran/mpif_h/windelattrf.c \ + src/binding/fortran/mpif_h/winfreekeyf.c \ + src/binding/fortran/mpif_h/win_get_attrf.c \ + src/binding/fortran/mpif_h/win_get_namef.c \ + src/binding/fortran/mpif_h/win_set_attrf.c \ + src/binding/fortran/mpif_h/win_set_namef.c \ + src/binding/fortran/mpif_h/alloc_memf.c \ + src/binding/fortran/mpif_h/commcreerrf.c \ + src/binding/fortran/mpif_h/commgeterrf.c \ + src/binding/fortran/mpif_h/commseterrf.c \ + src/binding/fortran/mpif_h/filecreerrf.c \ + src/binding/fortran/mpif_h/filegeterrf.c \ + src/binding/fortran/mpif_h/fileseterrf.c \ + src/binding/fortran/mpif_h/finalizedf.c \ + src/binding/fortran/mpif_h/free_memf.c \ + src/binding/fortran/mpif_h/info_createf.c \ + src/binding/fortran/mpif_h/info_deletef.c \ + src/binding/fortran/mpif_h/info_dupf.c \ + src/binding/fortran/mpif_h/info_freef.c \ + src/binding/fortran/mpif_h/info_getf.c \ + src/binding/fortran/mpif_h/infognkf.c \ + src/binding/fortran/mpif_h/infognthkf.c \ + src/binding/fortran/mpif_h/infovallenf.c \ + src/binding/fortran/mpif_h/info_setf.c \ + src/binding/fortran/mpif_h/pack_externalf.c \ + src/binding/fortran/mpif_h/packesizef.c \ + src/binding/fortran/mpif_h/reqgetstatf.c \ + src/binding/fortran/mpif_h/typedarrayf.c \ + src/binding/fortran/mpif_h/typechindf.c \ + src/binding/fortran/mpif_h/typechvecf.c \ + src/binding/fortran/mpif_h/typecindbf.c \ + src/binding/fortran/mpif_h/type_create_hindexed_blockf.c \ + src/binding/fortran/mpif_h/typecresizef.c \ + src/binding/fortran/mpif_h/typecstructf.c \ + src/binding/fortran/mpif_h/typecsubarrf.c \ + src/binding/fortran/mpif_h/typegetextentf.c \ + src/binding/fortran/mpif_h/typegtextf.c \ + src/binding/fortran/mpif_h/unpackextf.c \ + src/binding/fortran/mpif_h/wincreerrf.c \ + src/binding/fortran/mpif_h/wingeterrf.c \ + src/binding/fortran/mpif_h/winseterrf.c \ + src/binding/fortran/mpif_h/reduce_localf.c \ + src/binding/fortran/mpif_h/op_commutativef.c \ + src/binding/fortran/mpif_h/reduce_scatter_blockf.c \ + src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c \ + src/binding/fortran/mpif_h/dist_graph_createf.c \ + src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c \ + src/binding/fortran/mpif_h/dist_graph_neighborsf.c \ + src/binding/fortran/mpif_h/improbef.c \ + src/binding/fortran/mpif_h/imrecvf.c \ + src/binding/fortran/mpif_h/mprobef.c \ + src/binding/fortran/mpif_h/mrecvf.c \ + src/binding/fortran/mpif_h/comm_idupf.c \ + src/binding/fortran/mpif_h/ibarrierf.c \ + src/binding/fortran/mpif_h/ibcastf.c \ + src/binding/fortran/mpif_h/igatherf.c \ + src/binding/fortran/mpif_h/igathervf.c \ + src/binding/fortran/mpif_h/iscatterf.c \ + src/binding/fortran/mpif_h/iscattervf.c \ + src/binding/fortran/mpif_h/iallgatherf.c \ + src/binding/fortran/mpif_h/iallgathervf.c \ + src/binding/fortran/mpif_h/ialltoallf.c \ + src/binding/fortran/mpif_h/ialltoallvf.c \ + src/binding/fortran/mpif_h/ialltoallwf.c \ + src/binding/fortran/mpif_h/ireducef.c \ + src/binding/fortran/mpif_h/iallreducef.c \ + src/binding/fortran/mpif_h/ireduce_scatterf.c \ + src/binding/fortran/mpif_h/ireduce_scatter_blockf.c \ + src/binding/fortran/mpif_h/iscanf.c \ + src/binding/fortran/mpif_h/iexscanf.c \ + src/binding/fortran/mpif_h/ineighbor_allgatherf.c \ + src/binding/fortran/mpif_h/ineighbor_allgathervf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallvf.c \ + src/binding/fortran/mpif_h/ineighbor_alltoallwf.c \ + src/binding/fortran/mpif_h/neighbor_allgatherf.c \ + src/binding/fortran/mpif_h/neighbor_allgathervf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallvf.c \ + src/binding/fortran/mpif_h/neighbor_alltoallwf.c \ + src/binding/fortran/mpif_h/comm_split_typef.c \ + src/binding/fortran/mpif_h/get_elements_xf.c \ + src/binding/fortran/mpif_h/status_set_elements_xf.c \ + src/binding/fortran/mpif_h/type_get_extent_xf.c \ + src/binding/fortran/mpif_h/type_get_true_extent_xf.c \ + src/binding/fortran/mpif_h/type_size_xf.c \ + src/binding/fortran/mpif_h/comm_create_groupf.c \ + src/binding/fortran/mpif_h/comm_failure_ackf.c \ + src/binding/fortran/mpif_h/comm_failure_get_ackedf.c \ + src/binding/fortran/mpif_h/comm_revokef.c \ + src/binding/fortran/mpif_h/comm_shrinkf.c \ + src/binding/fortran/mpif_h/comm_agreef.c \ + src/binding/fortran/mpif_h/file_openf.c \ + src/binding/fortran/mpif_h/file_closef.c \ + src/binding/fortran/mpif_h/file_deletef.c \ + src/binding/fortran/mpif_h/file_set_sizef.c \ + src/binding/fortran/mpif_h/file_preallocatef.c \ + src/binding/fortran/mpif_h/file_get_sizef.c \ + src/binding/fortran/mpif_h/file_get_groupf.c \ + src/binding/fortran/mpif_h/file_get_amodef.c \ + src/binding/fortran/mpif_h/file_set_infof.c \ + src/binding/fortran/mpif_h/file_get_infof.c \ + src/binding/fortran/mpif_h/file_set_viewf.c \ + src/binding/fortran/mpif_h/file_get_viewf.c \ + src/binding/fortran/mpif_h/file_read_atf.c \ + src/binding/fortran/mpif_h/file_read_at_allf.c \ + src/binding/fortran/mpif_h/file_write_atf.c \ + src/binding/fortran/mpif_h/file_write_at_allf.c \ + src/binding/fortran/mpif_h/file_iread_atf.c \ + src/binding/fortran/mpif_h/file_iwrite_atf.c \ + src/binding/fortran/mpif_h/file_readf.c \ + src/binding/fortran/mpif_h/file_read_allf.c \ + src/binding/fortran/mpif_h/file_writef.c \ + src/binding/fortran/mpif_h/file_write_allf.c \ + src/binding/fortran/mpif_h/file_ireadf.c \ + src/binding/fortran/mpif_h/file_iwritef.c \ + src/binding/fortran/mpif_h/file_seekf.c \ + src/binding/fortran/mpif_h/file_get_positionf.c \ + src/binding/fortran/mpif_h/file_get_byte_offsetf.c \ + src/binding/fortran/mpif_h/file_read_sharedf.c \ + src/binding/fortran/mpif_h/file_write_sharedf.c \ + src/binding/fortran/mpif_h/file_iread_sharedf.c \ + src/binding/fortran/mpif_h/file_iwrite_sharedf.c \ + src/binding/fortran/mpif_h/file_read_orderedf.c \ + src/binding/fortran/mpif_h/file_write_orderedf.c \ + src/binding/fortran/mpif_h/file_seek_sharedf.c \ + src/binding/fortran/mpif_h/file_get_position_sharedf.c \ + src/binding/fortran/mpif_h/file_read_at_all_beginf.c \ + src/binding/fortran/mpif_h/file_read_at_all_endf.c \ + src/binding/fortran/mpif_h/file_write_at_all_beginf.c \ + src/binding/fortran/mpif_h/file_write_at_all_endf.c \ + src/binding/fortran/mpif_h/file_read_all_beginf.c \ + src/binding/fortran/mpif_h/file_read_all_endf.c \ + src/binding/fortran/mpif_h/file_write_all_beginf.c \ + src/binding/fortran/mpif_h/file_write_all_endf.c \ + src/binding/fortran/mpif_h/file_read_ordered_beginf.c \ + src/binding/fortran/mpif_h/file_read_ordered_endf.c \ + src/binding/fortran/mpif_h/file_write_ordered_beginf.c \ + src/binding/fortran/mpif_h/file_write_ordered_endf.c \ + src/binding/fortran/mpif_h/file_get_type_extentf.c \ + src/binding/fortran/mpif_h/register_datarepf.c \ + src/binding/fortran/mpif_h/file_set_atomicityf.c \ + src/binding/fortran/mpif_h/file_get_atomicityf.c \ + src/binding/fortran/mpif_h/file_syncf.c \ + src/binding/fortran/mpif_h/file_iread_at_allf.c \ + src/binding/fortran/mpif_h/file_iwrite_at_allf.c \ + src/binding/fortran/mpif_h/file_iread_allf.c \ + src/binding/fortran/mpif_h/file_iwrite_allf.c \ + src/binding/fortran/mpif_h/initf.c \ + src/binding/fortran/mpif_h/initthreadf.c \ + src/binding/fortran/mpif_h/pcontrolf.c \ + src/binding/fortran/mpif_h/addressf.c \ + src/binding/fortran/mpif_h/getaddressf.c \ + src/binding/fortran/mpif_h/wtimef.c \ + src/binding/fortran/mpif_h/wtickf.c \ + src/binding/fortran/mpif_h/aint_addf.c \ + src/binding/fortran/mpif_h/aint_difff.c \ + src/binding/fortran/mpif_h/keyval_createf.c \ + src/binding/fortran/mpif_h/dup_fnf.c \ + src/binding/fortran/mpif_h/null_del_fnf.c \ + src/binding/fortran/mpif_h/null_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_comm_fnf.c \ + src/binding/fortran/mpif_h/null_comm_del_fnf.c \ + src/binding/fortran/mpif_h/null_comm_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_win_fnf.c \ + src/binding/fortran/mpif_h/null_win_del_fnf.c \ + src/binding/fortran/mpif_h/null_win_copy_fnf.c \ + src/binding/fortran/mpif_h/dup_type_fnf.c \ + src/binding/fortran/mpif_h/null_type_del_fnf.c \ + src/binding/fortran/mpif_h/null_type_copy_fnf.c \ + src/mpi/attr/attrutil.c src/mpi/attr/dup_fn.c \ + src/mpi/coll/allgather/allgather_allcomm_nb.c \ + src/mpi/coll/allgather/allgather_intra_recursive_doubling.c \ + src/mpi/coll/allgather/allgather_intra_brucks.c \ + src/mpi/coll/allgather/allgather_intra_ring.c \ + src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c \ + src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c \ + src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c \ + src/mpi/coll/allgatherv/allgatherv_intra_brucks.c \ + src/mpi/coll/allgatherv/allgatherv_intra_ring.c \ + src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c \ + src/mpi/coll/allreduce/allreduce_allcomm_nb.c \ + src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c \ + src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c \ + src/mpi/coll/allreduce/allreduce_intra_smp.c \ + src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c \ + src/mpi/coll/alltoall/alltoall_allcomm_nb.c \ + src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoall/alltoall_intra_brucks.c \ + src/mpi/coll/alltoall/alltoall_intra_scattered.c \ + src/mpi/coll/alltoall/alltoall_intra_pairwise.c \ + src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c \ + src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c \ + src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoallv/alltoallv_intra_scattered.c \ + src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c \ + src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c \ + src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoallw/alltoallw_intra_scattered.c \ + src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c \ + src/mpi/coll/barrier/barrier_allcomm_nb.c \ + src/mpi/coll/barrier/barrier_intra_dissemination.c \ + src/mpi/coll/barrier/barrier_intra_smp.c \ + src/mpi/coll/barrier/barrier_inter_bcast.c \ + src/mpi/coll/bcast/bcast_utils.c \ + src/mpi/coll/bcast/bcast_allcomm_nb.c \ + src/mpi/coll/bcast/bcast_intra_binomial.c \ + src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c \ + src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c \ + src/mpi/coll/bcast/bcast_intra_smp.c \ + src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c \ + src/mpi/coll/exscan/exscan_allcomm_nb.c \ + src/mpi/coll/exscan/exscan_intra_recursive_doubling.c \ + src/mpi/coll/gather/gather_allcomm_nb.c \ + src/mpi/coll/gather/gather_intra_binomial.c \ + src/mpi/coll/gather/gather_inter_linear.c \ + src/mpi/coll/gather/gather_inter_local_gather_remote_send.c \ + src/mpi/coll/gatherv/gatherv_allcomm_nb.c \ + src/mpi/coll/gatherv/gatherv_allcomm_linear.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c \ + src/mpi/coll/reduce/reduce_allcomm_nb.c \ + src/mpi/coll/reduce/reduce_intra_binomial.c \ + src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c \ + src/mpi/coll/reduce/reduce_intra_smp.c \ + src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c \ + src/mpi/coll/scan/scan_allcomm_nb.c \ + src/mpi/coll/scan/scan_intra_recursive_doubling.c \ + src/mpi/coll/scan/scan_intra_smp.c \ + src/mpi/coll/scatter/scatter_allcomm_nb.c \ + src/mpi/coll/scatter/scatter_intra_binomial.c \ + src/mpi/coll/scatter/scatter_inter_linear.c \ + src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c \ + src/mpi/coll/scatterv/scatterv_allcomm_nb.c \ + src/mpi/coll/scatterv/scatterv_allcomm_linear.c \ + src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c \ + src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c \ + src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c \ + src/mpi/coll/iallgather/iallgather_intra_brucks.c \ + src/mpi/coll/iallgather/iallgather_intra_ring.c \ + src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c \ + src/mpi/coll/iallgather/iallgather_gentran_algos.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c \ + src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c \ + src/mpi/coll/iallgatherv/iallgatherv_utils.c \ + src/mpi/coll/iallreduce/iallreduce_intra_naive.c \ + src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c \ + src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c \ + src/mpi/coll/iallreduce/iallreduce_intra_smp.c \ + src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c \ + src/mpi/coll/iallreduce/iallreduce_gentran_algos.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c \ + src/mpi/coll/ialltoall/ialltoall_intra_inplace.c \ + src/mpi/coll/ialltoall/ialltoall_intra_brucks.c \ + src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c \ + src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c \ + src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c \ + src/mpi/coll/ialltoall/ialltoall_gentran_algos.c \ + src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c \ + src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c \ + src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c \ + src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c \ + src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c \ + src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c \ + src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c \ + src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c \ + src/mpi/coll/ibarrier/ibarrier_inter_bcast.c \ + src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c \ + src/mpi/coll/ibcast/ibcast_intra_binomial.c \ + src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_smp.c \ + src/mpi/coll/ibcast/ibcast_inter_flat.c \ + src/mpi/coll/ibcast/ibcast_gentran_algos.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c \ + src/mpi/coll/ibcast/ibcast_utils.c \ + src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c \ + src/mpi/coll/igather/igather_intra_binomial.c \ + src/mpi/coll/igather/igather_inter_short.c \ + src/mpi/coll/igather/igather_inter_long.c \ + src/mpi/coll/igather/igather_gentran_algos.c \ + src/mpi/coll/igather/igather_intra_gentran_tree.c \ + src/mpi/coll/igatherv/igatherv_allcomm_linear.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c \ + src/mpi/coll/ireduce/ireduce_intra_binomial.c \ + src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c \ + src/mpi/coll/ireduce/ireduce_intra_smp.c \ + src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c \ + src/mpi/coll/ireduce/ireduce_gentran_algos.c \ + src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c \ + src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c \ + src/mpi/coll/iscan/iscan_intra_recursive_doubling.c \ + src/mpi/coll/iscan/iscan_intra_smp.c \ + src/mpi/coll/iscan/iscan_gentran_algos.c \ + src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c \ + src/mpi/coll/iscatter/iscatter_intra_binomial.c \ + src/mpi/coll/iscatter/iscatter_inter_linear.c \ + src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c \ + src/mpi/coll/iscatter/iscatter_gentran_algos.c \ + src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c \ + src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c \ + src/mpi/coll/op/opsum.c src/mpi/coll/op/opmax.c \ + src/mpi/coll/op/opmin.c src/mpi/coll/op/opband.c \ + src/mpi/coll/op/opbor.c src/mpi/coll/op/opbxor.c \ + src/mpi/coll/op/opland.c src/mpi/coll/op/oplor.c \ + src/mpi/coll/op/oplxor.c src/mpi/coll/op/opprod.c \ + src/mpi/coll/op/opminloc.c src/mpi/coll/op/opmaxloc.c \ + src/mpi/coll/op/opno_op.c src/mpi/coll/op/opreplace.c \ + src/mpi/coll/allreduce_group/allreduce_group.c \ + src/mpi/coll/src/coll_impl.c \ + src/mpi/coll/transports/gentran/gentran_impl.c \ + src/mpi/coll/transports/gentran/gentran_utils.c \ + src/mpi/coll/transports/gentran/tsp_gentran.c \ + src/mpi/coll/transports/stubtran/stubtran_impl.c \ + src/mpi/coll/transports/stubtran/tsp_stubtran.c \ + src/mpi/coll/algorithms/treealgo/treealgo.c \ + src/mpi/coll/algorithms/treealgo/treeutil.c \ + src/mpi/coll/algorithms/recexchalgo/recexchalgo.c \ + src/mpi/coll/algorithms/stubalgo/stubalgo.c \ + src/mpi/coll/helper_fns.c src/mpi/coll/nbcutil.c \ + src/mpi/comm/commutil.c src/mpi/comm/contextid.c \ + src/mpi/datatype/typerep/dataloop/darray_support.c \ + src/mpi/datatype/typerep/dataloop/dataloop.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c \ + src/mpi/datatype/typerep/dataloop/looputil.c \ + src/mpi/datatype/typerep/dataloop/segment.c \ + src/mpi/datatype/typerep/dataloop/segment_count.c \ + src/mpi/datatype/typerep/dataloop/segment_flatten.c \ + src/mpi/datatype/typerep/dataloop/subarray_support.c \ + src/mpi/datatype/typerep/dataloop/dataloop_debug.c \ + src/mpi/datatype/typerep/src/typerep_flatten.c \ + src/mpi/datatype/typerep/src/typerep_pack.c \ + src/mpi/datatype/typerep/src/typerep_pack_external.c \ + src/mpi/datatype/typerep/src/typerep_iov.c \ + src/mpi/datatype/typerep/src/typerep_create.c \ + src/mpi/datatype/typerep/src/typerep_debug.c \ + src/mpi/datatype/typeutil.c src/mpi/datatype/ext32_datatype.c \ + src/mpi/datatype/type_blockindexed.c \ + src/mpi/datatype/type_create_pairtype.c \ + src/mpi/datatype/type_debug.c src/mpi/errhan/errutil.c \ + src/mpi/errhan/dynerrutil.c src/mpi/group/grouputil.c \ + src/mpi/info/infoutil.c src/mpi/init/initinfo.c \ + src/mpi/init/async.c src/mpi/init/netloc_util.c \ + src/mpi/pt2pt/bsendutil.c src/mpi/request/mpir_request.c \ + src/mpi/rma/winutil.c src/mpi/rma/rmatypeutil.c \ + src/mpi/topo/topoutil.c src/util/mem/handlemem.c \ + src/util/mem/strerror.c src/util/cvar/mpir_cvars.c \ + src/util/procmap/local_proc.c src/util/assert/assert.c \ + src/binding/fortran/mpif_h/fdebug.c \ + src/binding/fortran/mpif_h/setbot.c \ + src/binding/fortran/mpif_h/setbotf.f \ + src/binding/fortran/use_mpi/create_f90_util.c \ + src/glue/romio/glue_romio.c src/mpid/ch3/src/ch3u_buffer.c \ + src/mpid/ch3/src/ch3u_comm.c \ + src/mpid/ch3/src/ch3u_comm_spawn_multiple.c \ + src/mpid/ch3/src/ch3u_handle_connection.c \ + src/mpid/ch3/src/ch3u_handle_recv_pkt.c \ + src/mpid/ch3/src/ch3u_handle_recv_req.c \ + src/mpid/ch3/src/ch3u_handle_revoke_pkt.c \ + src/mpid/ch3/src/ch3u_handle_send_req.c \ + src/mpid/ch3/src/ch3u_handle_op_req.c \ + src/mpid/ch3/src/ch3u_port.c src/mpid/ch3/src/ch3u_recvq.c \ + src/mpid/ch3/src/ch3u_request.c \ + src/mpid/ch3/src/ch3u_rma_progress.c \ + src/mpid/ch3/src/ch3u_rma_ops.c \ + src/mpid/ch3/src/ch3u_rma_reqops.c \ + src/mpid/ch3/src/ch3u_rma_sync.c \ + src/mpid/ch3/src/ch3u_rma_pkthandler.c \ + src/mpid/ch3/src/ch3u_rndv.c src/mpid/ch3/src/ch3u_eager.c \ + src/mpid/ch3/src/ch3u_eagersync.c \ + src/mpid/ch3/src/ch3u_win_fns.c src/mpid/ch3/src/mpid_abort.c \ + src/mpid/ch3/src/mpid_datatype.c src/mpid/ch3/src/mpid_op.c \ + src/mpid/ch3/src/mpid_cancel_recv.c \ + src/mpid/ch3/src/mpid_cancel_send.c \ + src/mpid/ch3/src/mpid_comm_disconnect.c \ + src/mpid/ch3/src/mpid_comm_spawn_multiple.c \ + src/mpid/ch3/src/mpid_comm_failure_ack.c \ + src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c \ + src/mpid/ch3/src/mpid_comm_revoke.c \ + src/mpid/ch3/src/mpid_finalize.c \ + src/mpid/ch3/src/mpid_get_universe_size.c \ + src/mpid/ch3/src/mpid_getpname.c \ + src/mpid/ch3/src/mpid_improbe.c src/mpid/ch3/src/mpid_imrecv.c \ + src/mpid/ch3/src/mpid_init.c src/mpid/ch3/src/mpid_iprobe.c \ + src/mpid/ch3/src/mpid_irecv.c src/mpid/ch3/src/mpid_irsend.c \ + src/mpid/ch3/src/mpid_isend.c src/mpid/ch3/src/mpid_issend.c \ + src/mpid/ch3/src/mpid_mprobe.c src/mpid/ch3/src/mpid_mrecv.c \ + src/mpid/ch3/src/mpid_port.c src/mpid/ch3/src/mpid_probe.c \ + src/mpid/ch3/src/mpid_recv.c src/mpid/ch3/src/mpid_rsend.c \ + src/mpid/ch3/src/mpid_send.c src/mpid/ch3/src/mpid_ssend.c \ + src/mpid/ch3/src/mpid_startall.c src/mpid/ch3/src/mpid_vc.c \ + src/mpid/ch3/src/mpid_rma.c src/mpid/ch3/src/mpidi_rma.c \ + src/mpid/ch3/src/mpid_aint.c \ + src/mpid/ch3/src/mpidi_isend_self.c \ + src/mpid/ch3/src/mpidi_pg.c src/mpid/ch3/src/mpidi_printf.c \ + src/mpid/ch3/util/sock/ch3u_init_sock.c \ + src/mpid/ch3/util/sock/ch3u_connect_sock.c \ + src/mpid/ch3/util/sock/ch3u_getinterfaces.c \ + src/mpid/ch3/channels/nemesis/src/ch3_finalize.c \ + src/mpid/ch3/channels/nemesis/src/ch3_init.c \ + src/mpid/ch3/channels/nemesis/src/ch3_isend.c \ + src/mpid/ch3/channels/nemesis/src/ch3_isendv.c \ + src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c \ + src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c \ + src/mpid/ch3/channels/nemesis/src/ch3_progress.c \ + src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c \ + src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c \ + src/mpid/ch3/channels/nemesis/src/ch3i_comm.c \ + src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c \ + src/mpid/ch3/channels/nemesis/netmod/none/none.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c \ + src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c \ + src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c \ + src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c \ + src/mpid/ch3/channels/sock/src/sock.c \ + src/mpid/ch3/channels/sock/src/ch3_finalize.c \ + src/mpid/ch3/channels/sock/src/ch3_init.c \ + src/mpid/ch3/channels/sock/src/ch3_isend.c \ + src/mpid/ch3/channels/sock/src/ch3_isendv.c \ + src/mpid/ch3/channels/sock/src/ch3_istartmsg.c \ + src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c \ + src/mpid/ch3/channels/sock/src/ch3_progress.c \ + src/mpid/ch3/channels/sock/src/ch3_win_fns.c \ + src/mpid/ch4/src/ch4_globals.c src/mpid/ch4/src/ch4_impl.c \ + src/mpid/ch4/src/ch4_init.c src/mpid/ch4/src/ch4_comm.c \ + src/mpid/ch4/src/ch4_spawn.c src/mpid/ch4/src/ch4_win.c \ + src/mpid/ch4/src/ch4i_comm.c src/mpid/ch4/src/ch4r_buf.c \ + src/mpid/ch4/src/ch4r_init.c src/mpid/ch4/src/ch4r_comm.c \ + src/mpid/ch4/src/ch4r_proc.c src/mpid/ch4/src/ch4r_recvq.c \ + src/mpid/ch4/src/ch4r_callbacks.c \ + src/mpid/ch4/src/ch4r_rma_origin_callbacks.c \ + src/mpid/ch4/src/ch4r_rma_target_callbacks.c \ + src/mpid/ch4/src/ch4r_symheap.c src/mpid/ch4/src/ch4r_win.c \ + src/mpid/ch4/src/mpid_ch4_net_array.c \ + src/mpid/ch4/src/ch4_coll_globals.c \ + src/mpid/ch4/src/ch4_coll_globals_default.c \ + src/mpid/ch4/generic/mpidig_globals.c \ + src/mpid/ch4/generic/mpidig_init.c \ + src/mpid/ch4/netmod/src/netmod_impl.c \ + src/mpid/ch4/netmod/ofi/func_table.c \ + src/mpid/ch4/netmod/ofi/ofi_init.c \ + src/mpid/ch4/netmod/ofi/ofi_comm.c \ + src/mpid/ch4/netmod/ofi/ofi_datatype.c \ + src/mpid/ch4/netmod/ofi/ofi_op.c \ + src/mpid/ch4/netmod/ofi/ofi_spawn.c \ + src/mpid/ch4/netmod/ofi/ofi_win.c \ + src/mpid/ch4/netmod/ofi/globals.c \ + src/mpid/ch4/netmod/ofi/util.c \ + src/mpid/ch4/netmod/ucx/func_table.c \ + src/mpid/ch4/netmod/ucx/ucx_init.c \ + src/mpid/ch4/netmod/ucx/ucx_comm.c \ + src/mpid/ch4/netmod/ucx/ucx_datatype.c \ + src/mpid/ch4/netmod/ucx/ucx_op.c \ + src/mpid/ch4/netmod/ucx/ucx_spawn.c \ + src/mpid/ch4/netmod/ucx/ucx_win.c \ + src/mpid/ch4/netmod/ucx/globals.c \ + src/mpid/ch4/netmod/stubnm/func_table.c \ + src/mpid/ch4/netmod/stubnm/stubnm_init.c \ + src/mpid/ch4/netmod/stubnm/stubnm_comm.c \ + src/mpid/ch4/netmod/stubnm/stubnm_datatype.c \ + src/mpid/ch4/netmod/stubnm/stubnm_op.c \ + src/mpid/ch4/netmod/stubnm/stubnm_spawn.c \ + src/mpid/ch4/netmod/stubnm/stubnm_win.c \ + src/mpid/ch4/netmod/stubnm/globals.c \ + src/mpid/ch4/shm/src/func_table.c \ + src/mpid/ch4/shm/src/shm_init.c \ + src/mpid/ch4/shm/src/shm_hooks.c \ + src/mpid/ch4/shm/src/shm_dpm.c src/mpid/ch4/shm/src/shm_mem.c \ + src/mpid/ch4/shm/src/shm_misc.c src/mpid/ch4/shm/src/shm_rma.c \ + src/mpid/ch4/shm/src/shm_impl.c \ + src/mpid/ch4/shm/src/topotree.c \ + src/mpid/ch4/shm/src/topotree_util.c \ + src/mpid/ch4/shm/stubshm/globals.c \ + src/mpid/ch4/shm/stubshm/stubshm_comm.c \ + src/mpid/ch4/shm/stubshm/stubshm_init.c \ + src/mpid/ch4/shm/stubshm/stubshm_spawn.c \ + src/mpid/ch4/shm/stubshm/stubshm_win.c \ + src/mpid/ch4/shm/posix/release_gather/release_gather.c \ + src/mpid/ch4/shm/posix/globals.c \ + src/mpid/ch4/shm/posix/posix_comm.c \ + src/mpid/ch4/shm/posix/posix_init.c \ + src/mpid/ch4/shm/posix/posix_op.c \ + src/mpid/ch4/shm/posix/posix_datatype.c \ + src/mpid/ch4/shm/posix/posix_spawn.c \ + src/mpid/ch4/shm/posix/posix_win.c \ + src/mpid/ch4/shm/posix/posix_eager_array.c \ + src/mpid/ch4/shm/posix/posix_coll_init.c \ + src/mpid/ch4/shm/posix/eager/fbox/globals.c \ + src/mpid/ch4/shm/posix/eager/fbox/func_table.c \ + src/mpid/ch4/shm/posix/eager/stub/globals.c \ + src/mpid/ch4/shm/posix/eager/stub/func_table.c \ + src/mpid/common/sched/mpidu_sched.c \ + src/mpid/common/hcoll/hcoll_init.c \ + src/mpid/common/hcoll/hcoll_ops.c \ + src/mpid/common/hcoll/hcoll_dtypes.c \ + src/mpid/common/hcoll/hcoll_rte.c \ + src/mpid/common/shm/mpidu_shm_alloc.c \ + src/mpid/common/shm/mpidu_shm_barrier.c \ + src/mpid/common/bc/mpidu_bc.c src/mpi_t/mpit.c \ + src/nameserv/file/file_nameserv.c \ + src/nameserv/pmi/pmi_nameserv.c \ + src/pmi/pmi2/simple/simple2pmi.c \ + src/pmi/pmi2/simple/simple_pmiutil.c \ + src/pmi/simple/simple_pmiutil.c src/pmi/simple/simple_pmi.c +am__objects_45 = src/binding/fortran/mpif_h/lib_libpmpi_la-statusf2c.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-statusc2f.lo +am__objects_46 = src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_int.lo \ + src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_real.lo \ + src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_complex.lo +am__objects_47 = src/mpi/attr/lib_libpmpi_la-attr_delete.lo \ + src/mpi/attr/lib_libpmpi_la-attr_get.lo \ + src/mpi/attr/lib_libpmpi_la-attr_put.lo \ + src/mpi/attr/lib_libpmpi_la-comm_create_keyval.lo \ + src/mpi/attr/lib_libpmpi_la-comm_delete_attr.lo \ + src/mpi/attr/lib_libpmpi_la-comm_free_keyval.lo \ + src/mpi/attr/lib_libpmpi_la-comm_get_attr.lo \ + src/mpi/attr/lib_libpmpi_la-comm_set_attr.lo \ + src/mpi/attr/lib_libpmpi_la-keyval_create.lo \ + src/mpi/attr/lib_libpmpi_la-keyval_free.lo \ + src/mpi/attr/lib_libpmpi_la-type_create_keyval.lo \ + src/mpi/attr/lib_libpmpi_la-type_delete_attr.lo \ + src/mpi/attr/lib_libpmpi_la-type_free_keyval.lo \ + src/mpi/attr/lib_libpmpi_la-type_get_attr.lo \ + src/mpi/attr/lib_libpmpi_la-type_set_attr.lo \ + src/mpi/attr/lib_libpmpi_la-win_create_keyval.lo \ + src/mpi/attr/lib_libpmpi_la-win_delete_attr.lo \ + src/mpi/attr/lib_libpmpi_la-win_free_keyval.lo \ + src/mpi/attr/lib_libpmpi_la-win_get_attr.lo \ + src/mpi/attr/lib_libpmpi_la-win_set_attr.lo \ + src/mpi/coll/allgather/lib_libpmpi_la-allgather.lo \ + src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv.lo \ + src/mpi/coll/allreduce/lib_libpmpi_la-allreduce.lo \ + src/mpi/coll/alltoall/lib_libpmpi_la-alltoall.lo \ + src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv.lo \ + src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw.lo \ + src/mpi/coll/barrier/lib_libpmpi_la-barrier.lo \ + src/mpi/coll/bcast/lib_libpmpi_la-bcast.lo \ + src/mpi/coll/exscan/lib_libpmpi_la-exscan.lo \ + src/mpi/coll/gather/lib_libpmpi_la-gather.lo \ + src/mpi/coll/gatherv/lib_libpmpi_la-gatherv.lo \ + src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter.lo \ + src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block.lo \ + src/mpi/coll/reduce/lib_libpmpi_la-reduce.lo \ + src/mpi/coll/scan/lib_libpmpi_la-scan.lo \ + src/mpi/coll/scatter/lib_libpmpi_la-scatter.lo \ + src/mpi/coll/scatterv/lib_libpmpi_la-scatterv.lo \ + src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather.lo \ + src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv.lo \ + src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall.lo \ + src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv.lo \ + src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall.lo \ + src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv.lo \ + src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw.lo \ + src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast.lo \ + src/mpi/coll/iexscan/lib_libpmpi_la-iexscan.lo \ + src/mpi/coll/igather/lib_libpmpi_la-igather.lo \ + src/mpi/coll/igatherv/lib_libpmpi_la-igatherv.lo \ + src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block.lo \ + src/mpi/coll/ireduce/lib_libpmpi_la-ireduce.lo \ + src/mpi/coll/iscan/lib_libpmpi_la-iscan.lo \ + src/mpi/coll/iscatter/lib_libpmpi_la-iscatter.lo \ + src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv.lo \ + src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather.lo \ + src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv.lo \ + src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall.lo \ + src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv.lo \ + src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw.lo \ + src/mpi/coll/op/lib_libpmpi_la-op_create.lo \ + src/mpi/coll/op/lib_libpmpi_la-op_free.lo \ + src/mpi/coll/op/lib_libpmpi_la-op_commutative.lo \ + src/mpi/coll/reduce_local/lib_libpmpi_la-reduce_local.lo \ + src/mpi/comm/lib_libpmpi_la-comm_compare.lo \ + src/mpi/comm/lib_libpmpi_la-comm_create.lo \ + src/mpi/comm/lib_libpmpi_la-comm_create_group.lo \ + src/mpi/comm/lib_libpmpi_la-comm_dup.lo \ + src/mpi/comm/lib_libpmpi_la-comm_dup_with_info.lo \ + src/mpi/comm/lib_libpmpi_la-comm_free.lo \ + src/mpi/comm/lib_libpmpi_la-comm_get_name.lo \ + src/mpi/comm/lib_libpmpi_la-comm_get_info.lo \ + src/mpi/comm/lib_libpmpi_la-comm_set_info.lo \ + src/mpi/comm/lib_libpmpi_la-comm_group.lo \ + src/mpi/comm/lib_libpmpi_la-comm_idup.lo \ + src/mpi/comm/lib_libpmpi_la-comm_rank.lo \ + src/mpi/comm/lib_libpmpi_la-comm_size.lo \ + src/mpi/comm/lib_libpmpi_la-comm_remote_group.lo \ + src/mpi/comm/lib_libpmpi_la-comm_remote_size.lo \ + src/mpi/comm/lib_libpmpi_la-comm_set_name.lo \ + src/mpi/comm/lib_libpmpi_la-comm_split.lo \ + src/mpi/comm/lib_libpmpi_la-comm_test_inter.lo \ + src/mpi/comm/lib_libpmpi_la-intercomm_create.lo \ + src/mpi/comm/lib_libpmpi_la-intercomm_merge.lo \ + src/mpi/comm/lib_libpmpi_la-comm_split_type.lo \ + src/mpi/comm/lib_libpmpi_la-comm_failure_ack.lo \ + src/mpi/comm/lib_libpmpi_la-comm_failure_get_acked.lo \ + src/mpi/comm/lib_libpmpi_la-comm_revoke.lo \ + src/mpi/comm/lib_libpmpi_la-comm_shrink.lo \ + src/mpi/comm/lib_libpmpi_la-comm_agree.lo \ + src/mpi/datatype/lib_libpmpi_la-address.lo \ + src/mpi/datatype/lib_libpmpi_la-get_address.lo \ + src/mpi/datatype/lib_libpmpi_la-get_count.lo \ + src/mpi/datatype/lib_libpmpi_la-get_elements.lo \ + src/mpi/datatype/lib_libpmpi_la-get_elements_x.lo \ + src/mpi/datatype/lib_libpmpi_la-pack.lo \ + src/mpi/datatype/lib_libpmpi_la-pack_external.lo \ + src/mpi/datatype/lib_libpmpi_la-pack_external_size.lo \ + src/mpi/datatype/lib_libpmpi_la-pack_size.lo \ + src/mpi/datatype/lib_libpmpi_la-status_set_elements.lo \ + src/mpi/datatype/lib_libpmpi_la-status_set_elements_x.lo \ + src/mpi/datatype/lib_libpmpi_la-type_get_name.lo \ + src/mpi/datatype/lib_libpmpi_la-type_set_name.lo \ + src/mpi/datatype/lib_libpmpi_la-type_size.lo \ + src/mpi/datatype/lib_libpmpi_la-type_size_x.lo \ + src/mpi/datatype/lib_libpmpi_la-type_extent.lo \ + src/mpi/datatype/lib_libpmpi_la-type_vector.lo \ + src/mpi/datatype/lib_libpmpi_la-type_commit.lo \ + src/mpi/datatype/lib_libpmpi_la-type_indexed.lo \ + src/mpi/datatype/lib_libpmpi_la-type_hindexed.lo \ + src/mpi/datatype/lib_libpmpi_la-type_struct.lo \ + src/mpi/datatype/lib_libpmpi_la-type_contiguous.lo \ + src/mpi/datatype/lib_libpmpi_la-type_free.lo \ + src/mpi/datatype/lib_libpmpi_la-type_hvector.lo \ + src/mpi/datatype/lib_libpmpi_la-type_dup.lo \ + src/mpi/datatype/lib_libpmpi_la-type_get_envelope.lo \ + src/mpi/datatype/lib_libpmpi_la-type_get_contents.lo \ + src/mpi/datatype/lib_libpmpi_la-type_ub.lo \ + src/mpi/datatype/lib_libpmpi_la-type_lb.lo \ + src/mpi/datatype/lib_libpmpi_la-type_get_extent.lo \ + src/mpi/datatype/lib_libpmpi_la-type_get_extent_x.lo \ + src/mpi/datatype/lib_libpmpi_la-type_get_true_extent.lo \ + src/mpi/datatype/lib_libpmpi_la-type_get_true_extent_x.lo \ + src/mpi/datatype/lib_libpmpi_la-type_match_size.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_struct.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_hindexed.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_hvector.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_indexed_block.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_hindexed_block.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_resized.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_darray.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_subarray.lo \ + src/mpi/datatype/lib_libpmpi_la-unpack.lo \ + src/mpi/datatype/lib_libpmpi_la-unpack_external.lo \ + src/mpi/errhan/lib_libpmpi_la-add_error_code.lo \ + src/mpi/errhan/lib_libpmpi_la-add_error_class.lo \ + src/mpi/errhan/lib_libpmpi_la-add_error_string.lo \ + src/mpi/errhan/lib_libpmpi_la-comm_call_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-comm_create_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-comm_get_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-comm_set_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-errhandler_create.lo \ + src/mpi/errhan/lib_libpmpi_la-errhandler_free.lo \ + src/mpi/errhan/lib_libpmpi_la-errhandler_get.lo \ + src/mpi/errhan/lib_libpmpi_la-errhandler_set.lo \ + src/mpi/errhan/lib_libpmpi_la-error_class.lo \ + src/mpi/errhan/lib_libpmpi_la-error_string.lo \ + src/mpi/errhan/lib_libpmpi_la-file_create_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-file_get_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-file_set_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-file_call_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-win_create_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-win_call_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-win_get_errhandler.lo \ + src/mpi/errhan/lib_libpmpi_la-win_set_errhandler.lo \ + src/mpi/group/lib_libpmpi_la-group_compare.lo \ + src/mpi/group/lib_libpmpi_la-group_difference.lo \ + src/mpi/group/lib_libpmpi_la-group_excl.lo \ + src/mpi/group/lib_libpmpi_la-group_free.lo \ + src/mpi/group/lib_libpmpi_la-group_incl.lo \ + src/mpi/group/lib_libpmpi_la-group_intersection.lo \ + src/mpi/group/lib_libpmpi_la-group_range_excl.lo \ + src/mpi/group/lib_libpmpi_la-group_range_incl.lo \ + src/mpi/group/lib_libpmpi_la-group_rank.lo \ + src/mpi/group/lib_libpmpi_la-group_size.lo \ + src/mpi/group/lib_libpmpi_la-group_translate_ranks.lo \ + src/mpi/group/lib_libpmpi_la-group_union.lo \ + src/mpi/info/lib_libpmpi_la-info_create.lo \ + src/mpi/info/lib_libpmpi_la-info_delete.lo \ + src/mpi/info/lib_libpmpi_la-info_dup.lo \ + src/mpi/info/lib_libpmpi_la-info_free.lo \ + src/mpi/info/lib_libpmpi_la-info_get.lo \ + src/mpi/info/lib_libpmpi_la-info_getn.lo \ + src/mpi/info/lib_libpmpi_la-info_getnth.lo \ + src/mpi/info/lib_libpmpi_la-info_getvallen.lo \ + src/mpi/info/lib_libpmpi_la-info_set.lo \ + src/mpi/init/lib_libpmpi_la-abort.lo \ + src/mpi/init/lib_libpmpi_la-init.lo \ + src/mpi/init/lib_libpmpi_la-initialized.lo \ + src/mpi/init/lib_libpmpi_la-initthread.lo \ + src/mpi/init/lib_libpmpi_la-ismain.lo \ + src/mpi/init/lib_libpmpi_la-finalize.lo \ + src/mpi/init/lib_libpmpi_la-finalized.lo \ + src/mpi/init/lib_libpmpi_la-querythread.lo \ + src/mpi/misc/lib_libpmpi_la-getpname.lo \ + src/mpi/misc/lib_libpmpi_la-pcontrol.lo \ + src/mpi/misc/lib_libpmpi_la-version.lo \ + src/mpi/misc/lib_libpmpi_la-library_version.lo \ + src/mpi/misc/lib_libpmpi_la-aint_add.lo \ + src/mpi/misc/lib_libpmpi_la-aint_diff.lo \ + src/mpi/misc/lib_libpmpi_la-utils.lo \ + src/mpi/pt2pt/lib_libpmpi_la-bsend.lo \ + src/mpi/pt2pt/lib_libpmpi_la-bsend_init.lo \ + src/mpi/pt2pt/lib_libpmpi_la-bufattach.lo \ + src/mpi/pt2pt/lib_libpmpi_la-buffree.lo \ + src/mpi/pt2pt/lib_libpmpi_la-ibsend.lo \ + src/mpi/pt2pt/lib_libpmpi_la-improbe.lo \ + src/mpi/pt2pt/lib_libpmpi_la-imrecv.lo \ + src/mpi/pt2pt/lib_libpmpi_la-iprobe.lo \ + src/mpi/pt2pt/lib_libpmpi_la-irecv.lo \ + src/mpi/pt2pt/lib_libpmpi_la-irsend.lo \ + src/mpi/pt2pt/lib_libpmpi_la-isend.lo \ + src/mpi/pt2pt/lib_libpmpi_la-issend.lo \ + src/mpi/pt2pt/lib_libpmpi_la-mprobe.lo \ + src/mpi/pt2pt/lib_libpmpi_la-mrecv.lo \ + src/mpi/pt2pt/lib_libpmpi_la-probe.lo \ + src/mpi/pt2pt/lib_libpmpi_la-recv.lo \ + src/mpi/pt2pt/lib_libpmpi_la-recv_init.lo \ + src/mpi/pt2pt/lib_libpmpi_la-rsend.lo \ + src/mpi/pt2pt/lib_libpmpi_la-rsend_init.lo \ + src/mpi/pt2pt/lib_libpmpi_la-send.lo \ + src/mpi/pt2pt/lib_libpmpi_la-send_init.lo \ + src/mpi/pt2pt/lib_libpmpi_la-sendrecv.lo \ + src/mpi/pt2pt/lib_libpmpi_la-sendrecv_rep.lo \ + src/mpi/pt2pt/lib_libpmpi_la-ssend.lo \ + src/mpi/pt2pt/lib_libpmpi_la-ssend_init.lo \ + src/mpi/request/lib_libpmpi_la-cancel.lo \ + src/mpi/request/lib_libpmpi_la-greq_start.lo \ + src/mpi/request/lib_libpmpi_la-greq_complete.lo \ + src/mpi/request/lib_libpmpi_la-request_free.lo \ + src/mpi/request/lib_libpmpi_la-request_get_status.lo \ + src/mpi/request/lib_libpmpi_la-status_set_cancelled.lo \ + src/mpi/request/lib_libpmpi_la-start.lo \ + src/mpi/request/lib_libpmpi_la-startall.lo \ + src/mpi/request/lib_libpmpi_la-test.lo \ + src/mpi/request/lib_libpmpi_la-test_cancelled.lo \ + src/mpi/request/lib_libpmpi_la-testall.lo \ + src/mpi/request/lib_libpmpi_la-testany.lo \ + src/mpi/request/lib_libpmpi_la-testsome.lo \ + src/mpi/request/lib_libpmpi_la-wait.lo \ + src/mpi/request/lib_libpmpi_la-waitall.lo \ + src/mpi/request/lib_libpmpi_la-waitany.lo \ + src/mpi/request/lib_libpmpi_la-waitsome.lo \ + src/mpi/rma/lib_libpmpi_la-accumulate.lo \ + src/mpi/rma/lib_libpmpi_la-alloc_mem.lo \ + src/mpi/rma/lib_libpmpi_la-compare_and_swap.lo \ + src/mpi/rma/lib_libpmpi_la-fetch_and_op.lo \ + src/mpi/rma/lib_libpmpi_la-free_mem.lo \ + src/mpi/rma/lib_libpmpi_la-get.lo \ + src/mpi/rma/lib_libpmpi_la-get_accumulate.lo \ + src/mpi/rma/lib_libpmpi_la-put.lo \ + src/mpi/rma/lib_libpmpi_la-raccumulate.lo \ + src/mpi/rma/lib_libpmpi_la-rget.lo \ + src/mpi/rma/lib_libpmpi_la-rget_accumulate.lo \ + src/mpi/rma/lib_libpmpi_la-rput.lo \ + src/mpi/rma/lib_libpmpi_la-win_allocate.lo \ + src/mpi/rma/lib_libpmpi_la-win_allocate_shared.lo \ + src/mpi/rma/lib_libpmpi_la-win_attach.lo \ + src/mpi/rma/lib_libpmpi_la-win_complete.lo \ + src/mpi/rma/lib_libpmpi_la-win_create.lo \ + src/mpi/rma/lib_libpmpi_la-win_create_dynamic.lo \ + src/mpi/rma/lib_libpmpi_la-win_detach.lo \ + src/mpi/rma/lib_libpmpi_la-win_fence.lo \ + src/mpi/rma/lib_libpmpi_la-win_flush.lo \ + src/mpi/rma/lib_libpmpi_la-win_flush_all.lo \ + src/mpi/rma/lib_libpmpi_la-win_flush_local.lo \ + src/mpi/rma/lib_libpmpi_la-win_flush_local_all.lo \ + src/mpi/rma/lib_libpmpi_la-win_free.lo \ + src/mpi/rma/lib_libpmpi_la-win_get_group.lo \ + src/mpi/rma/lib_libpmpi_la-win_get_info.lo \ + src/mpi/rma/lib_libpmpi_la-win_get_name.lo \ + src/mpi/rma/lib_libpmpi_la-win_lock.lo \ + src/mpi/rma/lib_libpmpi_la-win_lock_all.lo \ + src/mpi/rma/lib_libpmpi_la-win_post.lo \ + src/mpi/rma/lib_libpmpi_la-win_set_info.lo \ + src/mpi/rma/lib_libpmpi_la-win_set_name.lo \ + src/mpi/rma/lib_libpmpi_la-win_shared_query.lo \ + src/mpi/rma/lib_libpmpi_la-win_start.lo \ + src/mpi/rma/lib_libpmpi_la-win_sync.lo \ + src/mpi/rma/lib_libpmpi_la-win_test.lo \ + src/mpi/rma/lib_libpmpi_la-win_unlock.lo \ + src/mpi/rma/lib_libpmpi_la-win_unlock_all.lo \ + src/mpi/rma/lib_libpmpi_la-win_wait.lo \ + src/mpi/spawn/lib_libpmpi_la-comm_disconnect.lo \ + src/mpi/spawn/lib_libpmpi_la-comm_get_parent.lo \ + src/mpi/spawn/lib_libpmpi_la-comm_join.lo \ + src/mpi/spawn/lib_libpmpi_la-comm_spawn.lo \ + src/mpi/spawn/lib_libpmpi_la-comm_spawn_multiple.lo \ + src/mpi/spawn/lib_libpmpi_la-lookup_name.lo \ + src/mpi/spawn/lib_libpmpi_la-publish_name.lo \ + src/mpi/spawn/lib_libpmpi_la-unpublish_name.lo \ + src/mpi/spawn/lib_libpmpi_la-open_port.lo \ + src/mpi/spawn/lib_libpmpi_la-close_port.lo \ + src/mpi/spawn/lib_libpmpi_la-comm_connect.lo \ + src/mpi/spawn/lib_libpmpi_la-comm_accept.lo \ + src/mpi/timer/lib_libpmpi_la-wtime.lo \ + src/mpi/timer/lib_libpmpi_la-wtick.lo \ + src/mpi/topo/lib_libpmpi_la-cart_coords.lo \ + src/mpi/topo/lib_libpmpi_la-cart_create.lo \ + src/mpi/topo/lib_libpmpi_la-cart_get.lo \ + src/mpi/topo/lib_libpmpi_la-cart_map.lo \ + src/mpi/topo/lib_libpmpi_la-cart_rank.lo \ + src/mpi/topo/lib_libpmpi_la-cart_shift.lo \ + src/mpi/topo/lib_libpmpi_la-cart_sub.lo \ + src/mpi/topo/lib_libpmpi_la-dims_create.lo \ + src/mpi/topo/lib_libpmpi_la-graph_get.lo \ + src/mpi/topo/lib_libpmpi_la-graph_map.lo \ + src/mpi/topo/lib_libpmpi_la-graph_nbr.lo \ + src/mpi/topo/lib_libpmpi_la-graphcreate.lo \ + src/mpi/topo/lib_libpmpi_la-graphdimsget.lo \ + src/mpi/topo/lib_libpmpi_la-graphnbrcnt.lo \ + src/mpi/topo/lib_libpmpi_la-cartdim_get.lo \ + src/mpi/topo/lib_libpmpi_la-topo_test.lo \ + src/mpi/topo/lib_libpmpi_la-dist_gr_create_adj.lo \ + src/mpi/topo/lib_libpmpi_la-dist_gr_create.lo \ + src/mpi/topo/lib_libpmpi_la-dist_gr_neighb_count.lo \ + src/mpi/topo/lib_libpmpi_la-dist_gr_neighb.lo \ + $(am__objects_45) $(am__objects_46) \ + src/glue/romio/lib_libpmpi_la-all_romio_symbols.lo \ + src/mpi_t/lib_libpmpi_la-cat_changed.lo \ + src/mpi_t/lib_libpmpi_la-cat_get_categories.lo \ + src/mpi_t/lib_libpmpi_la-cat_get_cvars.lo \ + src/mpi_t/lib_libpmpi_la-cat_get_info.lo \ + src/mpi_t/lib_libpmpi_la-cat_get_num.lo \ + src/mpi_t/lib_libpmpi_la-cat_get_pvars.lo \ + src/mpi_t/lib_libpmpi_la-cvar_get_info.lo \ + src/mpi_t/lib_libpmpi_la-cvar_get_num.lo \ + src/mpi_t/lib_libpmpi_la-cvar_handle_alloc.lo \ + src/mpi_t/lib_libpmpi_la-cvar_handle_free.lo \ + src/mpi_t/lib_libpmpi_la-cvar_read.lo \ + src/mpi_t/lib_libpmpi_la-cvar_write.lo \ + src/mpi_t/lib_libpmpi_la-enum_get_info.lo \ + src/mpi_t/lib_libpmpi_la-enum_get_item.lo \ + src/mpi_t/lib_libpmpi_la-mpit_finalize.lo \ + src/mpi_t/lib_libpmpi_la-mpit_initthread.lo \ + src/mpi_t/lib_libpmpi_la-pvar_get_info.lo \ + src/mpi_t/lib_libpmpi_la-pvar_get_num.lo \ + src/mpi_t/lib_libpmpi_la-pvar_handle_alloc.lo \ + src/mpi_t/lib_libpmpi_la-pvar_handle_free.lo \ + src/mpi_t/lib_libpmpi_la-pvar_read.lo \ + src/mpi_t/lib_libpmpi_la-pvar_readreset.lo \ + src/mpi_t/lib_libpmpi_la-pvar_reset.lo \ + src/mpi_t/lib_libpmpi_la-pvar_session_create.lo \ + src/mpi_t/lib_libpmpi_la-pvar_session_free.lo \ + src/mpi_t/lib_libpmpi_la-pvar_start.lo \ + src/mpi_t/lib_libpmpi_la-pvar_stop.lo \ + src/mpi_t/lib_libpmpi_la-pvar_write.lo \ + src/mpi_t/lib_libpmpi_la-cat_get_index.lo \ + src/mpi_t/lib_libpmpi_la-cvar_get_index.lo \ + src/mpi_t/lib_libpmpi_la-pvar_get_index.lo +am__objects_48 = src/binding/fortran/mpif_h/lib_libpmpi_la-sendf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-recvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-get_countf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-bsendf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ssendf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-rsendf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-bufattachf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-bufdetachf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-isendf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ibsendf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-issendf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-irsendf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-irecvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-waitf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-testf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-request_freef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-waitanyf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-testanyf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-waitallf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-testallf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-waitsomef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-testsomef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iprobef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-probef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cancelf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-testcancelf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-send_initf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-bsend_initf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ssend_initf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-rsend_initf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-recv_initf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-startf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-startallf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-sendrecvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-sndrcvrplf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typecontigf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_vectorf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_hvectorf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_indexedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_hindexedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_structf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_extentf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_sizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_lbf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_ubf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_commitf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_freef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-get_elementsf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-packf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-unpackf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-pack_sizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-barrierf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-bcastf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-gatherf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-gathervf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-scatterf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-scattervf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-allgatherf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-allgathervf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallwf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-exscanf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-reducef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-op_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-op_freef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-allreducef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-redscatf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-scanf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-group_sizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-group_rankf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-grouptranksf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-group_comparef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_groupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-group_unionf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-groupinterf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-groupdifff.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-group_inclf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-group_exclf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-grouprinclf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-grouprexclf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-group_freef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_sizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_rankf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_comparef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dup_with_infof.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_splitf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_freef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commtesticf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commrsizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commrgroupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iccreatef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-icmergef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_freef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-attr_putf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-attr_getf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-attr_deletef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-topo_testf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cart_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dims_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-graph_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-graphdims_getf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-graph_getf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cartdim_getf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cart_getf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cart_rankf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cart_coordsf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbcountf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbrsf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cart_shiftf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cart_subf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-cart_mapf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-graph_mapf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-getpnamef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-get_versionf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-get_library_versionf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-errhcreatef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-errhsetf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-errhgetf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-errhfreef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-error_stringf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-error_classf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-finalizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-initializedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-abortf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-close_portf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_acceptf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_connectf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commdiscf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commparentf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_joinf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_spawnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-spawnmultf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-lookup_namef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-open_portf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-publish_namef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-unpubnamef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_infof.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_infof.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-accumulatef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-getf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-putf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_completef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_fencef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_freef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_groupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_lockf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_postf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_startf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_testf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlockf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_waitf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocatef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocate_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_shared_queryf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_create_dynamicf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_attachf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_detachf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_infof.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_infof.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-get_accumulatef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-fetch_and_opf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-compare_and_swapf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-rputf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-rgetf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-raccumulatef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-rget_accumulatef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_lock_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlock_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_flushf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_localf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_local_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_syncf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-adderrclassf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-adderrcodef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-adderrstringf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commcallerrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commnewkeyf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commdelattrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commfreekeyf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_attrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commgetnamf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_attrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_namef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-filecallerrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-greqcompletef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-greqstartf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-isthrmainf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-query_threadf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-statgetclf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-statsetelf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typenewkeyf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typedelattrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_dupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typefreekeyf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_attrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typegetcntsf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typegetenvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typegnamef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typesetattrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typesetnamef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_match_sizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-wincallerrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-winnewkeyf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-windelattrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-winfreekeyf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_attrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_namef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_attrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_namef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-alloc_memf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commcreerrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commgeterrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-commseterrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-filecreerrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-filegeterrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-fileseterrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-finalizedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-free_memf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-info_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-info_deletef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-info_dupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-info_freef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-info_getf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-infognkf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-infognthkf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-infovallenf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-info_setf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-pack_externalf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-packesizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-reqgetstatf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typedarrayf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typechindf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typechvecf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typecindbf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_create_hindexed_blockf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typecresizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typecstructf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typecsubarrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typegetextentf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-typegtextf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-unpackextf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-wincreerrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-wingeterrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-winseterrf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_localf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-op_commutativef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_scatter_blockf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_create_adjacentf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighbors_countf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighborsf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-improbef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-imrecvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-mprobef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-mrecvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_idupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ibarrierf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ibcastf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-igatherf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-igathervf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iscatterf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iscattervf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iallgatherf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iallgathervf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallwf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ireducef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iallreducef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatterf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatter_blockf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iscanf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-iexscanf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgatherf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgathervf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallwf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgatherf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgathervf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallvf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallwf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_split_typef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-get_elements_xf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-status_set_elements_xf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_extent_xf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_true_extent_xf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-type_size_xf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_create_groupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_ackf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_get_ackedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_revokef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_shrinkf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-comm_agreef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_openf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_closef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_deletef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_sizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_preallocatef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_sizef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_groupf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_amodef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_infof.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_infof.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_viewf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_viewf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_atf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_atf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_atf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_atf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_readf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_writef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_ireadf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwritef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_seekf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_positionf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_byte_offsetf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_orderedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_orderedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_seek_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_position_sharedf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_beginf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_endf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_beginf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_endf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_beginf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_endf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_beginf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_endf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_beginf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_endf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_beginf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_endf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_type_extentf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-register_datarepf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_atomicityf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_atomicityf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_syncf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_at_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_at_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_allf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-initf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-initthreadf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-pcontrolf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-addressf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-getaddressf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-wtimef.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-wtickf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-aint_addf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-aint_difff.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_createf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dup_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-null_del_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-null_copy_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dup_comm_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_del_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_copy_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dup_win_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_del_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_copy_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-dup_type_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_del_fnf.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_copy_fnf.lo +am__objects_49 = $(am__objects_48) +am__objects_50 = src/binding/fortran/mpif_h/lib_libpmpi_la-fdebug.lo \ + src/binding/fortran/mpif_h/lib_libpmpi_la-setbot.lo \ + src/binding/fortran/mpif_h/setbotf.lo +am__objects_51 = src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_util.lo +am__objects_52 = src/mpid/ch3/src/lib_libpmpi_la-ch3u_buffer.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm_spawn_multiple.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_connection.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_pkt.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_req.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_revoke_pkt.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_send_req.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_op_req.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_port.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_recvq.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_request.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_progress.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_ops.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_reqops.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_sync.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_pkthandler.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_rndv.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_eager.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_eagersync.lo \ + src/mpid/ch3/src/lib_libpmpi_la-ch3u_win_fns.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_abort.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_datatype.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_op.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_recv.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_send.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_disconnect.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_spawn_multiple.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_failure_ack.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_get_all_failed_procs.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_revoke.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_finalize.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_get_universe_size.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_getpname.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_improbe.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_imrecv.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_init.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_iprobe.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_irecv.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_irsend.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_isend.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_issend.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_mprobe.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_mrecv.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_port.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_probe.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_recv.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_rsend.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_send.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_ssend.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_startall.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_vc.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_rma.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpidi_rma.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpid_aint.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpidi_isend_self.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpidi_pg.lo \ + src/mpid/ch3/src/lib_libpmpi_la-mpidi_printf.lo +#am__objects_53 = src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_init_sock.lo \ +# src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_connect_sock.lo \ +# src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_getinterfaces.lo +am__objects_54 = src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_finalize.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_init.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isend.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isendv.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsg.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsgv.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_progress.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_rma_shm.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_win_fns.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_comm.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_eagernoncontig.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_init.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_mpich.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_ckpt.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_finalize.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network_poll.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_debug.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt_shm.lo \ + src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_net_array.lo +am__objects_55 = src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_finalize.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_init.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_send.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_utility.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-socksm.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_getip.lo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_ckpt.lo +am__objects_56 = src/mpid/ch3/channels/nemesis/netmod/none/lib_libpmpi_la-none.lo +#am__objects_57 = src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_init.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_cm.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_tagged.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_msg.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_data.lo \ +# src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_progress.lo +am__objects_58 = src/mpid/ch3/channels/nemesis/utils/monitor/lib_libpmpi_la-papi_defs.lo \ + src/mpid/ch3/channels/nemesis/utils/replacements/lib_libpmpi_la-mkstemp.lo +#am__objects_59 = src/mpid/ch3/channels/sock/src/lib_libpmpi_la-sock.lo \ +# src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_finalize.lo \ +# src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_init.lo \ +# src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isend.lo \ +# src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isendv.lo \ +# src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsg.lo \ +# src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsgv.lo \ +# src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_progress.lo \ +# src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_win_fns.lo +#am__objects_60 = src/mpid/ch4/src/lib_libpmpi_la-ch4_globals.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4_impl.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4_init.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4_comm.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4_spawn.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4_win.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4i_comm.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_buf.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_init.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_comm.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_proc.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_recvq.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_callbacks.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_origin_callbacks.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_target_callbacks.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_symheap.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-ch4r_win.lo \ +# src/mpid/ch4/src/lib_libpmpi_la-mpid_ch4_net_array.lo +##am__objects_61 = src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals.lo +#am__objects_62 = src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals_default.lo +#am__objects_63 = src/mpid/ch4/generic/lib_libpmpi_la-mpidig_globals.lo \ +# src/mpid/ch4/generic/lib_libpmpi_la-mpidig_init.lo \ +# src/mpid/ch4/netmod/src/lib_libpmpi_la-netmod_impl.lo +##am__objects_64 = src/mpid/ch4/netmod/ofi/lib_libpmpi_la-func_table.lo \ +## src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_init.lo \ +## src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_comm.lo \ +## src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_datatype.lo \ +## src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_op.lo \ +## src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_spawn.lo \ +## src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_win.lo \ +## src/mpid/ch4/netmod/ofi/lib_libpmpi_la-globals.lo \ +## src/mpid/ch4/netmod/ofi/lib_libpmpi_la-util.lo +##am__objects_65 = src/mpid/ch4/netmod/ucx/lib_libpmpi_la-func_table.lo \ +## src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_init.lo \ +## src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_comm.lo \ +## src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_datatype.lo \ +## src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_op.lo \ +## src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_spawn.lo \ +## src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_win.lo \ +## src/mpid/ch4/netmod/ucx/lib_libpmpi_la-globals.lo +##am__objects_66 = src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-func_table.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_init.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_comm.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_datatype.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_op.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_spawn.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_win.lo \ +## src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-globals.lo +##am__objects_67 = src/mpid/ch4/shm/src/lib_libpmpi_la-func_table.lo \ +## src/mpid/ch4/shm/src/lib_libpmpi_la-shm_init.lo \ +## src/mpid/ch4/shm/src/lib_libpmpi_la-shm_hooks.lo \ +## src/mpid/ch4/shm/src/lib_libpmpi_la-shm_dpm.lo \ +## src/mpid/ch4/shm/src/lib_libpmpi_la-shm_mem.lo \ +## src/mpid/ch4/shm/src/lib_libpmpi_la-shm_misc.lo \ +## src/mpid/ch4/shm/src/lib_libpmpi_la-shm_rma.lo \ +## src/mpid/ch4/shm/src/lib_libpmpi_la-shm_impl.lo +##am__objects_68 = src/mpid/ch4/shm/src/lib_libpmpi_la-topotree.lo \ +## src/mpid/ch4/shm/src/lib_libpmpi_la-topotree_util.lo +###am__objects_69 = src/mpid/ch4/shm/stubshm/lib_libpmpi_la-globals.lo \ +### src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_comm.lo \ +### src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_init.lo \ +### src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_spawn.lo \ +### src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_win.lo +###am__objects_70 = src/mpid/ch4/shm/posix/release_gather/lib_libpmpi_la-release_gather.lo +##am__objects_71 = src/mpid/ch4/shm/posix/lib_libpmpi_la-globals.lo \ +## src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_comm.lo \ +## src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_init.lo \ +## src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_op.lo \ +## src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_datatype.lo \ +## src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_spawn.lo \ +## src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_win.lo \ +## src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_eager_array.lo \ +## src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_coll_init.lo +###am__objects_72 = src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-globals.lo \ +### src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-func_table.lo +###am__objects_73 = src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-globals.lo \ +### src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-func_table.lo +am__objects_74 = src/mpid/common/sched/lib_libpmpi_la-mpidu_sched.lo +#am__objects_75 = src/mpid/common/hcoll/lib_libpmpi_la-hcoll_init.lo \ +# src/mpid/common/hcoll/lib_libpmpi_la-hcoll_ops.lo \ +# src/mpid/common/hcoll/lib_libpmpi_la-hcoll_dtypes.lo \ +# src/mpid/common/hcoll/lib_libpmpi_la-hcoll_rte.lo +am__objects_76 = src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_alloc.lo \ + src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_barrier.lo +#am__objects_77 = src/mpid/common/bc/lib_libpmpi_la-mpidu_bc.lo +#am__objects_78 = src/nameserv/file/lib_libpmpi_la-file_nameserv.lo +am__objects_79 = src/nameserv/pmi/lib_libpmpi_la-pmi_nameserv.lo +#am__objects_80 = src/pmi/pmi2/simple/lib_libpmpi_la-simple2pmi.lo \ +# src/pmi/pmi2/simple/lib_libpmpi_la-simple_pmiutil.lo +am__objects_81 = src/pmi/simple/lib_libpmpi_la-simple_pmiutil.lo \ + src/pmi/simple/lib_libpmpi_la-simple_pmi.lo +am__objects_82 = src/mpi/attr/lib_libpmpi_la-attrutil.lo \ + src/mpi/attr/lib_libpmpi_la-dup_fn.lo \ + src/mpi/coll/allgather/lib_libpmpi_la-allgather_allcomm_nb.lo \ + src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_recursive_doubling.lo \ + src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_brucks.lo \ + src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_ring.lo \ + src/mpi/coll/allgather/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.lo \ + src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_allcomm_nb.lo \ + src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_recursive_doubling.lo \ + src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_brucks.lo \ + src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_ring.lo \ + src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.lo \ + src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_allcomm_nb.lo \ + src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_recursive_doubling.lo \ + src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.lo \ + src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_smp.lo \ + src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.lo \ + src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_allcomm_nb.lo \ + src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo \ + src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_brucks.lo \ + src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_scattered.lo \ + src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise.lo \ + src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_inter_pairwise_exchange.lo \ + src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_allcomm_nb.lo \ + src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo \ + src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_scattered.lo \ + src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.lo \ + src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_allcomm_nb.lo \ + src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo \ + src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_scattered.lo \ + src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.lo \ + src/mpi/coll/barrier/lib_libpmpi_la-barrier_allcomm_nb.lo \ + src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_dissemination.lo \ + src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_smp.lo \ + src/mpi/coll/barrier/lib_libpmpi_la-barrier_inter_bcast.lo \ + src/mpi/coll/bcast/lib_libpmpi_la-bcast_utils.lo \ + src/mpi/coll/bcast/lib_libpmpi_la-bcast_allcomm_nb.lo \ + src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_binomial.lo \ + src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo \ + src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.lo \ + src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_smp.lo \ + src/mpi/coll/bcast/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.lo \ + src/mpi/coll/exscan/lib_libpmpi_la-exscan_allcomm_nb.lo \ + src/mpi/coll/exscan/lib_libpmpi_la-exscan_intra_recursive_doubling.lo \ + src/mpi/coll/gather/lib_libpmpi_la-gather_allcomm_nb.lo \ + src/mpi/coll/gather/lib_libpmpi_la-gather_intra_binomial.lo \ + src/mpi/coll/gather/lib_libpmpi_la-gather_inter_linear.lo \ + src/mpi/coll/gather/lib_libpmpi_la-gather_inter_local_gather_remote_send.lo \ + src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_nb.lo \ + src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_linear.lo \ + src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_allcomm_nb.lo \ + src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.lo \ + src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_pairwise.lo \ + src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.lo \ + src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_noncommutative.lo \ + src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo \ + src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.lo \ + src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.lo \ + src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.lo \ + src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.lo \ + src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.lo \ + src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo \ + src/mpi/coll/reduce/lib_libpmpi_la-reduce_allcomm_nb.lo \ + src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_binomial.lo \ + src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.lo \ + src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_smp.lo \ + src/mpi/coll/reduce/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.lo \ + src/mpi/coll/scan/lib_libpmpi_la-scan_allcomm_nb.lo \ + src/mpi/coll/scan/lib_libpmpi_la-scan_intra_recursive_doubling.lo \ + src/mpi/coll/scan/lib_libpmpi_la-scan_intra_smp.lo \ + src/mpi/coll/scatter/lib_libpmpi_la-scatter_allcomm_nb.lo \ + src/mpi/coll/scatter/lib_libpmpi_la-scatter_intra_binomial.lo \ + src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_linear.lo \ + src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.lo \ + src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_nb.lo \ + src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_linear.lo \ + src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather_allcomm_nb.lo \ + src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.lo \ + src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.lo \ + src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.lo \ + src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_recursive_doubling.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_brucks.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_ring.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_gentran_algos.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_brucks.lo \ + src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_ring.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_brucks.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_ring.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_gentran_algos.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_ring.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.lo \ + src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_utils.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_naive.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_recursive_doubling.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_smp.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_gentran_algos.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo \ + src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_tree.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_inplace.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_brucks.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_pairwise.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_gentran_algos.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_brucks.lo \ + src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_ring.lo \ + src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_inplace.lo \ + src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_blocked.lo \ + src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.lo \ + src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_gentran_algos.lo \ + src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.lo \ + src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_inplace.lo \ + src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_blocked.lo \ + src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.lo \ + src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_recursive_doubling.lo \ + src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_inter_bcast.lo \ + src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_gentran_recexch.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_binomial.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_smp.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_inter_flat.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_gentran_algos.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_tree.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_ring.lo \ + src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_utils.lo \ + src/mpi/coll/iexscan/lib_libpmpi_la-iexscan_intra_recursive_doubling.lo \ + src/mpi/coll/igather/lib_libpmpi_la-igather_intra_binomial.lo \ + src/mpi/coll/igather/lib_libpmpi_la-igather_inter_short.lo \ + src/mpi/coll/igather/lib_libpmpi_la-igather_inter_long.lo \ + src/mpi/coll/igather/lib_libpmpi_la-igather_gentran_algos.lo \ + src/mpi/coll/igather/lib_libpmpi_la-igather_intra_gentran_tree.lo \ + src/mpi/coll/igatherv/lib_libpmpi_la-igatherv_allcomm_linear.lo \ + src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.lo \ + src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_pairwise.lo \ + src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.lo \ + src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.lo \ + src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo \ + src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_gentran_algos.lo \ + src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.lo \ + src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo \ + src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_binomial.lo \ + src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.lo \ + src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_smp.lo \ + src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.lo \ + src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_gentran_algos.lo \ + src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_tree.lo \ + src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_ring.lo \ + src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_recursive_doubling.lo \ + src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_smp.lo \ + src/mpi/coll/iscan/lib_libpmpi_la-iscan_gentran_algos.lo \ + src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.lo \ + src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_binomial.lo \ + src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_linear.lo \ + src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.lo \ + src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_gentran_algos.lo \ + src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_gentran_tree.lo \ + src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv_allcomm_linear.lo \ + src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.lo \ + src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_gentran_algos.lo \ + src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo \ + src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.lo \ + src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.lo \ + src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo \ + src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.lo \ + src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.lo \ + src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo \ + src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.lo \ + src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.lo \ + src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo \ + src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.lo \ + src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.lo \ + src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo \ + src/mpi/coll/op/lib_libpmpi_la-opsum.lo \ + src/mpi/coll/op/lib_libpmpi_la-opmax.lo \ + src/mpi/coll/op/lib_libpmpi_la-opmin.lo \ + src/mpi/coll/op/lib_libpmpi_la-opband.lo \ + src/mpi/coll/op/lib_libpmpi_la-opbor.lo \ + src/mpi/coll/op/lib_libpmpi_la-opbxor.lo \ + src/mpi/coll/op/lib_libpmpi_la-opland.lo \ + src/mpi/coll/op/lib_libpmpi_la-oplor.lo \ + src/mpi/coll/op/lib_libpmpi_la-oplxor.lo \ + src/mpi/coll/op/lib_libpmpi_la-opprod.lo \ + src/mpi/coll/op/lib_libpmpi_la-opminloc.lo \ + src/mpi/coll/op/lib_libpmpi_la-opmaxloc.lo \ + src/mpi/coll/op/lib_libpmpi_la-opno_op.lo \ + src/mpi/coll/op/lib_libpmpi_la-opreplace.lo \ + src/mpi/coll/allreduce_group/lib_libpmpi_la-allreduce_group.lo \ + src/mpi/coll/src/lib_libpmpi_la-coll_impl.lo \ + src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_impl.lo \ + src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_utils.lo \ + src/mpi/coll/transports/gentran/lib_libpmpi_la-tsp_gentran.lo \ + src/mpi/coll/transports/stubtran/lib_libpmpi_la-stubtran_impl.lo \ + src/mpi/coll/transports/stubtran/lib_libpmpi_la-tsp_stubtran.lo \ + src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treealgo.lo \ + src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treeutil.lo \ + src/mpi/coll/algorithms/recexchalgo/lib_libpmpi_la-recexchalgo.lo \ + src/mpi/coll/algorithms/stubalgo/lib_libpmpi_la-stubalgo.lo \ + src/mpi/coll/lib_libpmpi_la-helper_fns.lo \ + src/mpi/coll/lib_libpmpi_la-nbcutil.lo \ + src/mpi/comm/lib_libpmpi_la-commutil.lo \ + src/mpi/comm/lib_libpmpi_la-contextid.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-darray_support.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_blockindexed.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_contig.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_indexed.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_struct.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_vector.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-looputil.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_count.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_flatten.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-subarray_support.lo \ + src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_debug.lo \ + src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_flatten.lo \ + src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack.lo \ + src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack_external.lo \ + src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_iov.lo \ + src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_create.lo \ + src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_debug.lo \ + src/mpi/datatype/lib_libpmpi_la-typeutil.lo \ + src/mpi/datatype/lib_libpmpi_la-ext32_datatype.lo \ + src/mpi/datatype/lib_libpmpi_la-type_blockindexed.lo \ + src/mpi/datatype/lib_libpmpi_la-type_create_pairtype.lo \ + src/mpi/datatype/lib_libpmpi_la-type_debug.lo \ + src/mpi/errhan/lib_libpmpi_la-errutil.lo \ + src/mpi/errhan/lib_libpmpi_la-dynerrutil.lo \ + src/mpi/group/lib_libpmpi_la-grouputil.lo \ + src/mpi/info/lib_libpmpi_la-infoutil.lo \ + src/mpi/init/lib_libpmpi_la-initinfo.lo \ + src/mpi/init/lib_libpmpi_la-async.lo \ + src/mpi/init/lib_libpmpi_la-netloc_util.lo \ + src/mpi/pt2pt/lib_libpmpi_la-bsendutil.lo \ + src/mpi/request/lib_libpmpi_la-mpir_request.lo \ + src/mpi/rma/lib_libpmpi_la-winutil.lo \ + src/mpi/rma/lib_libpmpi_la-rmatypeutil.lo \ + src/mpi/topo/lib_libpmpi_la-topoutil.lo \ + src/util/mem/lib_libpmpi_la-handlemem.lo \ + src/util/mem/lib_libpmpi_la-strerror.lo \ + src/util/cvar/lib_libpmpi_la-mpir_cvars.lo \ + src/util/procmap/lib_libpmpi_la-local_proc.lo \ + src/util/assert/lib_libpmpi_la-assert.lo \ + $(am__objects_50) $(am__objects_51) \ + src/glue/romio/lib_libpmpi_la-glue_romio.lo \ + $(am__objects_52) $(am__objects_53) $(am__objects_54) \ + $(am__objects_55) $(am__objects_56) $(am__objects_57) \ + $(am__objects_58) $(am__objects_59) $(am__objects_60) \ + $(am__objects_61) $(am__objects_62) $(am__objects_63) \ + $(am__objects_64) $(am__objects_65) $(am__objects_66) \ + $(am__objects_67) $(am__objects_68) $(am__objects_69) \ + $(am__objects_70) $(am__objects_71) $(am__objects_72) \ + $(am__objects_73) $(am__objects_74) $(am__objects_75) \ + $(am__objects_76) $(am__objects_77) \ + src/mpi_t/lib_libpmpi_la-mpit.lo $(am__objects_78) \ + $(am__objects_79) $(am__objects_80) $(am__objects_81) +#am_lib_libpmpi_la_OBJECTS = \ +# $(am__objects_47) $(am__objects_49) \ +# $(am__objects_82) +lib_libpmpi_la_OBJECTS = \ + $(am_lib_libpmpi_la_OBJECTS) +#am_lib_libpmpi_la_rpath = -rpath \ +# $(libdir) +lib_libtvmpich_la_LIBADD = +am__lib_libtvmpich_la_SOURCES_DIST = src/mpi/debugger/dll_mpich.c +#am_lib_libtvmpich_la_OBJECTS = src/mpi/debugger/lib_libtvmpich_la-dll_mpich.lo +lib_libtvmpich_la_OBJECTS = $(am_lib_libtvmpich_la_OBJECTS) +lib_libtvmpich_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(lib_libtvmpich_la_CFLAGS) $(CFLAGS) \ + $(lib_libtvmpich_la_LDFLAGS) $(LDFLAGS) -o $@ +#am_lib_libtvmpich_la_rpath = -rpath $(libdir) +src_mpi_debugger_libdbginitdummy_la_LIBADD = +am__src_mpi_debugger_libdbginitdummy_la_SOURCES_DIST = \ + src/mpi/debugger/dbginit.c +#am_src_mpi_debugger_libdbginitdummy_la_OBJECTS = src/mpi/debugger/libdbginitdummy_la-dbginit.lo +src_mpi_debugger_libdbginitdummy_la_OBJECTS = \ + $(am_src_mpi_debugger_libdbginitdummy_la_OBJECTS) +src_mpi_debugger_libdbginitdummy_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(src_mpi_debugger_libdbginitdummy_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +#am_src_mpi_debugger_libdbginitdummy_la_rpath = +#src_pm_util_libmpiexec_la_DEPENDENCIES = \ +# $(am__DEPENDENCIES_1) +am__src_pm_util_libmpiexec_la_SOURCES_DIST = src/pm/util/cmnargs.c \ + src/pm/util/process.c src/pm/util/ioloop.c \ + src/pm/util/pmiserv.c src/pm/util/labelout.c src/pm/util/env.c \ + src/pm/util/newsession.c src/pm/util/rm.c \ + src/pm/util/pmiport.c src/pm/util/dbgiface.c \ + src/pm/util/simple_pmiutil2.c +#am_src_pm_util_libmpiexec_la_OBJECTS = \ +# src/pm/util/libmpiexec_la-cmnargs.lo \ +# src/pm/util/libmpiexec_la-process.lo \ +# src/pm/util/libmpiexec_la-ioloop.lo \ +# src/pm/util/libmpiexec_la-pmiserv.lo \ +# src/pm/util/libmpiexec_la-labelout.lo \ +# src/pm/util/libmpiexec_la-env.lo \ +# src/pm/util/libmpiexec_la-newsession.lo \ +# src/pm/util/libmpiexec_la-rm.lo \ +# src/pm/util/libmpiexec_la-pmiport.lo \ +# src/pm/util/libmpiexec_la-dbgiface.lo \ +# src/pm/util/libmpiexec_la-simple_pmiutil2.lo +src_pm_util_libmpiexec_la_OBJECTS = \ + $(am_src_pm_util_libmpiexec_la_OBJECTS) +src_pm_util_libmpiexec_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) \ + $(src_pm_util_libmpiexec_la_LDFLAGS) $(LDFLAGS) -o $@ +#am_src_pm_util_libmpiexec_la_rpath = +src_env_mpichversion_SOURCES = src/env/mpichversion.c +src_env_mpichversion_OBJECTS = src/env/mpichversion.$(OBJEXT) +src_env_mpichversion_DEPENDENCIES = lib/libmpi.la +src_env_mpivars_SOURCES = src/env/mpivars.c +src_env_mpivars_OBJECTS = src/env/mpivars.$(OBJEXT) +src_env_mpivars_DEPENDENCIES = lib/libmpi.la +am__src_pm_gforker_mpiexec_SOURCES_DIST = src/pm/gforker/mpiexec.c +##am_src_pm_gforker_mpiexec_OBJECTS = src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.$(OBJEXT) +src_pm_gforker_mpiexec_OBJECTS = $(am_src_pm_gforker_mpiexec_OBJECTS) +##src_pm_gforker_mpiexec_DEPENDENCIES = src/pm/util/libmpiexec.la \ +## $(am__DEPENDENCIES_1) +src_pm_gforker_mpiexec_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(src_pm_gforker_mpiexec_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__src_pm_gforker_mpiexec_gforker_SOURCES_DIST = \ + src/pm/gforker/mpiexec.c +#am_src_pm_gforker_mpiexec_gforker_OBJECTS = src/pm/gforker/mpiexec_gforker-mpiexec.$(OBJEXT) +src_pm_gforker_mpiexec_gforker_OBJECTS = \ + $(am_src_pm_gforker_mpiexec_gforker_OBJECTS) +#src_pm_gforker_mpiexec_gforker_DEPENDENCIES = src/pm/util/libmpiexec.la \ +# $(am__DEPENDENCIES_1) +src_pm_gforker_mpiexec_gforker_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(src_pm_gforker_mpiexec_gforker_LDFLAGS) $(LDFLAGS) -o $@ +am__src_pm_remshell_mpiexec_SOURCES_DIST = src/pm/remshell/mpiexec.c +##am_src_pm_remshell_mpiexec_OBJECTS = src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.$(OBJEXT) +src_pm_remshell_mpiexec_OBJECTS = \ + $(am_src_pm_remshell_mpiexec_OBJECTS) +##src_pm_remshell_mpiexec_DEPENDENCIES = src/pm/util/libmpiexec.la \ +## $(am__DEPENDENCIES_1) +src_pm_remshell_mpiexec_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(src_pm_remshell_mpiexec_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__src_pm_remshell_mpiexec_remshell_SOURCES_DIST = \ + src/pm/remshell/mpiexec.c +#am_src_pm_remshell_mpiexec_remshell_OBJECTS = src/pm/remshell/mpiexec_remshell-mpiexec.$(OBJEXT) +src_pm_remshell_mpiexec_remshell_OBJECTS = \ + $(am_src_pm_remshell_mpiexec_remshell_OBJECTS) +#src_pm_remshell_mpiexec_remshell_DEPENDENCIES = src/pm/util/libmpiexec.la \ +# $(am__DEPENDENCIES_1) +src_pm_remshell_mpiexec_remshell_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(src_pm_remshell_mpiexec_remshell_LDFLAGS) $(LDFLAGS) -o $@ +SCRIPTS = $(bin_SCRIPTS) $(dist_noinst_SCRIPTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir)/src/include -I$(top_builddir)/src/hwloc/include/private/autogen -I$(top_builddir)/src/hwloc/include/hwloc/autogen +depcomp = $(SHELL) $(top_srcdir)/confdb/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = src/binding/cxx/$(DEPDIR)/initcxx.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-abortf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-accumulatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrclassf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrcodef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrstringf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-addressf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_addf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_difff.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alloc_memf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allreducef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallwf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_deletef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_putf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-barrierf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bcastf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsend_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufattachf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufdetachf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cancelf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_coordsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_mapf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_rankf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_shiftf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_subf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cartdim_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-close_portf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_acceptf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_agreef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_comparef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_connectf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_create_groupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dup_with_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_ackf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_get_ackedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_groupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_idupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_joinf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_rankf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_revokef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_shrinkf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_spawnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_split_typef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_splitf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcallerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcreerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdelattrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdiscf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commfreekeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgeterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgetnamf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commnewkeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commparentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrgroupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrsizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commseterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commtesticf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-compare_and_swapf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dims_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_create_adjacentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighbors_countf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighborsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_comm_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_type_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_win_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhcreatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhfreef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhgetf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhsetf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_classf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_stringf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-exscanf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fetch_and_opf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_closef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_deletef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_amodef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_atomicityf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_byte_offsetf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_groupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_position_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_positionf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_type_extentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_viewf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_at_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_atf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_ireadf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_atf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwritef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_openf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_preallocatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_atf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_orderedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_readf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seek_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seekf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_atomicityf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_viewf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_syncf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_atf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_orderedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_writef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecallerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecreerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filegeterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fileseterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-free_memf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_accumulatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_countf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elements_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elementsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_library_versionf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_versionf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getaddressf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getpnamef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_mapf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graphdims_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqcompletef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqstartf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbcountf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbrsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_comparef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_exclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_inclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_rankf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_unionf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupdifff.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupinterf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprexclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprinclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouptranksf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallreducef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallwf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibarrierf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibcastf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibsendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iccreatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-icmergef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iexscanf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-improbef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-imrecvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallwf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_deletef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_dupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_setf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognkf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognthkf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infovallenf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initializedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initthreadf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iprobef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irecvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_blockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatterf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireducef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irsendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscanf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscatterf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscattervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-issendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isthrmainf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-lookup_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mprobef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mrecvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallwf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_copy_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_del_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_copy_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_del_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_copy_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_del_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_copy_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_del_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_commutativef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-open_portf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_externalf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packesizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pcontrolf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-probef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-publish_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-putf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-query_threadf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-raccumulatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recv_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-redscatf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_localf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_blockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reducef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-register_datarepf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reqgetstatf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-request_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rget_accumulatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rgetf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rputf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsend_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scanf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scatterf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scattervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-send_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendrecvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sndrcvrplf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-spawnmultf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssend_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statgetclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statsetelf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-status_set_elements_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testanyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testcancelf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testsomef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-topo_testf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_commitf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_create_hindexed_blockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_dupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_extentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_extent_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_true_extent_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hindexedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hvectorf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_indexedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_lbf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_match_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_size_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_structf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_ubf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_vectorf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechindf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechvecf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecindbf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecontigf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecresizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecstructf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecsubarrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedarrayf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedelattrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typefreekeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetcntsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetenvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetextentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegnamef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegtextf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typenewkeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetattrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetnamef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackextf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpubnamef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitanyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitsomef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocate_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_attachf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_completef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_create_dynamicf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_detachf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_fencef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_local_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_localf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flushf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_groupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lock_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_postf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_shared_queryf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_startf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_syncf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_testf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlock_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_waitf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincallerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincreerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-windelattrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winfreekeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wingeterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winnewkeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winseterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtickf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtimef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-fdebug.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-setbot.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusc2f.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusf2c.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-abortf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-accumulatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrclassf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrcodef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrstringf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-addressf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_addf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_difff.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alloc_memf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allreducef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallwf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_deletef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_putf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-barrierf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bcastf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsend_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufattachf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufdetachf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cancelf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_coordsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_mapf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_rankf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_shiftf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_subf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cartdim_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-close_portf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_acceptf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_agreef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_comparef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_connectf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_create_groupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_ackf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_ackedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_groupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_idupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_joinf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_rankf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_revokef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_shrinkf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_spawnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_split_typef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_splitf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcallerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcreerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdelattrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdiscf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commfreekeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgeterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgetnamf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commnewkeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commparentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrgroupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrsizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commseterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commtesticf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-compare_and_swapf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dims_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_create_adjacentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighbors_countf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighborsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_comm_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_type_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_win_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhcreatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhfreef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhgetf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhsetf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_classf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_stringf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-exscanf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fdebug.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fetch_and_opf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_closef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_deletef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_amodef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_atomicityf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_byte_offsetf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_groupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_position_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_positionf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_type_extentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_viewf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_at_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_atf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_ireadf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_at_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_atf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwritef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_openf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_preallocatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_atf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_orderedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_readf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seek_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seekf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_atomicityf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_viewf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_syncf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_atf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_beginf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_endf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_orderedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_writef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecallerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecreerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filegeterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fileseterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-free_memf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_accumulatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_countf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elements_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elementsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_library_versionf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_versionf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getaddressf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getpnamef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_mapf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graphdims_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqcompletef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqstartf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbcountf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbrsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_comparef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_exclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_inclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_rankf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_unionf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupdifff.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupinterf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprexclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprinclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouptranksf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallreducef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallwf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibarrierf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibcastf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibsendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iccreatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-icmergef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iexscanf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-improbef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-imrecvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallwf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_deletef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_dupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_getf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_setf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognkf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognthkf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infovallenf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initializedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initthreadf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iprobef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irecvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_blockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatterf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireducef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irsendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscanf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscatterf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscattervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-issendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isthrmainf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-lookup_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mprobef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mrecvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgathervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallwf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_copy_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_del_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_copy_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_del_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_copy_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_del_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_copy_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_del_fnf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_commutativef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-open_portf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_externalf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packesizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pcontrolf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-probef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-publish_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-putf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-query_threadf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-raccumulatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recv_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-redscatf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_localf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_blockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reducef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-register_datarepf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reqgetstatf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-request_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rget_accumulatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rgetf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rputf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsend_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scanf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scatterf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scattervf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-send_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendrecvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-setbot.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sndrcvrplf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-spawnmultf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssend_initf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssendf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statgetclf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statsetelf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-status_set_elements_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusc2f.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusf2c.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testanyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testcancelf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testsomef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-topo_testf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_commitf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_blockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_dupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_extentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_extent_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hindexedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hvectorf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_indexedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_lbf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_match_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_size_xf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_sizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_structf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_ubf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_vectorf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechindf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechvecf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecindbf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecontigf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecresizef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecstructf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecsubarrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedarrayf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedelattrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typefreekeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetcntsf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetenvf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetextentf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegnamef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegtextf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typenewkeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetattrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetnamef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackextf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpubnamef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitallf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitanyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitsomef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocate_sharedf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocatef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_attachf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_completef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_create_dynamicf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_createf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_detachf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_fencef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_local_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_localf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flushf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_freef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_groupf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lock_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_postf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_attrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_infof.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_namef.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_shared_queryf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_startf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_syncf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_testf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlock_allf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlockf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_waitf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincallerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincreerrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-windelattrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winfreekeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wingeterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winnewkeyf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winseterrf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtickf.Plo \ + src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtimef.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90cmplxf.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90intf.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90realf.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_complex.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_int.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_real.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_util.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_complex.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_int.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_real.Plo \ + src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_util.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-accumulate_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgather_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgatherv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allreduce_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoall_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallw_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bcast_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_init_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-buffer_attach_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_c.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_multiple_c.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-compare_and_swap_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-exscan_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-f_sync_reg_c.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-fetch_and_op_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_all_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_all_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_shared_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_all_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_all_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_shared_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_begin_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_end_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_begin_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_end_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_begin_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_end_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_shared_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_begin_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_end_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_begin_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_end_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_begin_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_end_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_shared_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-free_mem_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gather_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gatherv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_accumulate_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_address_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgather_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgatherv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallreduce_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoall_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallw_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibcast_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibsend_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iexscan_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igather_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igatherv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-imrecv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgather_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoall_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallw_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irecv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_block_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irsend_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscan_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatter_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatterv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-isend_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-issend_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-mrecv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgather_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoall_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallw_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_external_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-put_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-raccumulate_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_init_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_local_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_block_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_accumulate_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rput_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_init_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scan_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatter_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatterv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_init_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_replace_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_init_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_external_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-utils.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_attach_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_create_cdesc.Plo \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_detach_cdesc.Plo \ + src/env/$(DEPDIR)/mpichversion.Po src/env/$(DEPDIR)/mpivars.Po \ + src/glue/romio/$(DEPDIR)/lib_libmpi_la-all_romio_symbols.Plo \ + src/glue/romio/$(DEPDIR)/lib_libmpi_la-glue_romio.Plo \ + src/glue/romio/$(DEPDIR)/lib_libpmpi_la-all_romio_symbols.Plo \ + src/glue/romio/$(DEPDIR)/lib_libpmpi_la-glue_romio.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_delete.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_get.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_put.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attrutil.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_create_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_delete_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_free_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_get_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_set_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-dup_fn.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_create.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_free.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_create_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_delete_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_free_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_get_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_set_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_create_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_delete_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_free_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_get_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_set_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_delete.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_get.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_put.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attrutil.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_create_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_delete_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_free_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_get_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_set_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-dup_fn.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_create.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_free.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_create_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_delete_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_free_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_get_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_set_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_create_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_delete_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_free_keyval.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_get_attr.Plo \ + src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_set_attr.Plo \ + src/mpi/coll/$(DEPDIR)/lib_libmpi_la-helper_fns.Plo \ + src/mpi/coll/$(DEPDIR)/lib_libmpi_la-nbcutil.Plo \ + src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-helper_fns.Plo \ + src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-nbcutil.Plo \ + src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libmpi_la-recexchalgo.Plo \ + src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libpmpi_la-recexchalgo.Plo \ + src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libmpi_la-stubalgo.Plo \ + src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libpmpi_la-stubalgo.Plo \ + src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treealgo.Plo \ + src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treeutil.Plo \ + src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treealgo.Plo \ + src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treeutil.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_allcomm_nb.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_brucks.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_recursive_doubling.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_ring.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_allcomm_nb.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_brucks.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_recursive_doubling.Plo \ + src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_ring.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_allcomm_nb.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_brucks.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_recursive_doubling.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_ring.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_allcomm_nb.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_brucks.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_recursive_doubling.Plo \ + src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_ring.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_allcomm_nb.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_recursive_doubling.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_smp.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_allcomm_nb.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_recursive_doubling.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.Plo \ + src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_smp.Plo \ + src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libmpi_la-allreduce_group.Plo \ + src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libpmpi_la-allreduce_group.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_allcomm_nb.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_inter_pairwise_exchange.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_brucks.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_scattered.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_allcomm_nb.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_inter_pairwise_exchange.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_brucks.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo \ + src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_scattered.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_allcomm_nb.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_inter_pairwise_exchange.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_scattered.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_allcomm_nb.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo \ + src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_scattered.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_allcomm_nb.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_inter_pairwise_exchange.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_scattered.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_allcomm_nb.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo \ + src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_scattered.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_allcomm_nb.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_inter_bcast.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_dissemination.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_smp.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_allcomm_nb.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_inter_bcast.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_dissemination.Plo \ + src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_smp.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_allcomm_nb.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_inter_remote_send_local_bcast.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_binomial.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_ring_allgather.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_smp.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_utils.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_allcomm_nb.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_binomial.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_smp.Plo \ + src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_utils.Plo \ + src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan.Plo \ + src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_allcomm_nb.Plo \ + src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_intra_recursive_doubling.Plo \ + src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan.Plo \ + src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_allcomm_nb.Plo \ + src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_intra_recursive_doubling.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_allcomm_nb.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_linear.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_local_gather_remote_send.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_intra_binomial.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_allcomm_nb.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_linear.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_local_gather_remote_send.Plo \ + src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_intra_binomial.Plo \ + src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv.Plo \ + src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_linear.Plo \ + src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_nb.Plo \ + src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv.Plo \ + src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_linear.Plo \ + src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_nb.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_gentran_algos.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_brucks.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_brucks.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_ring.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_recursive_doubling.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_ring.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_gentran_algos.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_brucks.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_brucks.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_ring.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_recursive_doubling.Plo \ + src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_ring.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_gentran_algos.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_brucks.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_brucks.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_ring.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_recursive_doubling.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_ring.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_utils.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_gentran_algos.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_brucks.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_ring.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_ring.Plo \ + src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_utils.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_gentran_algos.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_tree.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_naive.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_recursive_doubling.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_smp.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_gentran_algos.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_tree.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_naive.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_recursive_doubling.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo \ + src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_smp.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_gentran_algos.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_inter_pairwise_exchange.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_brucks.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_brucks.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_ring.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_inplace.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_pairwise.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_gentran_algos.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_brucks.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_brucks.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_ring.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_inplace.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_pairwise.Plo \ + src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_gentran_algos.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_blocked.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_gentran_scattered.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_inplace.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_gentran_algos.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_blocked.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.Plo \ + src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_inplace.Plo \ + src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw.Plo \ + src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.Plo \ + src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_blocked.Plo \ + src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_inplace.Plo \ + src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw.Plo \ + src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.Plo \ + src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_blocked.Plo \ + src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_inplace.Plo \ + src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier.Plo \ + src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_inter_bcast.Plo \ + src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_gentran_recexch.Plo \ + src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_recursive_doubling.Plo \ + src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier.Plo \ + src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_inter_bcast.Plo \ + src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_gentran_recexch.Plo \ + src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_recursive_doubling.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_gentran_algos.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_inter_flat.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_binomial.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_ring.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_tree.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_smp.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_utils.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_gentran_algos.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_inter_flat.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_binomial.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_ring.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_tree.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_smp.Plo \ + src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_utils.Plo \ + src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan.Plo \ + src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan_intra_recursive_doubling.Plo \ + src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan.Plo \ + src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan_intra_recursive_doubling.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_gentran_algos.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_long.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_short.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_binomial.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_gentran_tree.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_gentran_algos.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_long.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_short.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_binomial.Plo \ + src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_gentran_tree.Plo \ + src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv.Plo \ + src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv_allcomm_linear.Plo \ + src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv.Plo \ + src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather.Plo \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_gentran_algos.Plo \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather.Plo \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_gentran_algos.Plo \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv.Plo \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.Plo \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv.Plo \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.Plo \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall.Plo \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_gentran_algos.Plo \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall.Plo \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.Plo \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv.Plo \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.Plo \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv.Plo \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.Plo \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw.Plo \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.Plo \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw.Plo \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.Plo \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_gentran_algos.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_binomial.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_ring.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_tree.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_smp.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_gentran_algos.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_binomial.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_ring.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_tree.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.Plo \ + src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_smp.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_gentran_algos.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_noncommutative.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_pairwise.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_gentran_algos.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_pairwise.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.Plo \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_gentran_algos.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_gentran_algos.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_recursive_doubling.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_smp.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_gentran_algos.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_recursive_doubling.Plo \ + src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_smp.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_gentran_algos.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_linear.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_binomial.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_gentran_tree.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_gentran_algos.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_linear.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_binomial.Plo \ + src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_gentran_tree.Plo \ + src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv.Plo \ + src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv_allcomm_linear.Plo \ + src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv.Plo \ + src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv_allcomm_linear.Plo \ + src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather.Plo \ + src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather_allcomm_nb.Plo \ + src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather.Plo \ + src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather_allcomm_nb.Plo \ + src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv.Plo \ + src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.Plo \ + src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv.Plo \ + src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.Plo \ + src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall.Plo \ + src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall_allcomm_nb.Plo \ + src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall.Plo \ + src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.Plo \ + src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv.Plo \ + src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.Plo \ + src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv.Plo \ + src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.Plo \ + src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw.Plo \ + src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.Plo \ + src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw.Plo \ + src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_commutative.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_create.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_free.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opband.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbor.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbxor.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opland.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplor.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplxor.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmax.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmaxloc.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmin.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opminloc.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opno_op.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opprod.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opreplace.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opsum.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_commutative.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_create.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_free.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opband.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbor.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbxor.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opland.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplor.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplxor.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmax.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmaxloc.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmin.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opminloc.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opno_op.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opprod.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opreplace.Plo \ + src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opsum.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_allcomm_nb.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_inter_local_reduce_remote_send.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_binomial.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_reduce_scatter_gather.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_smp.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_allcomm_nb.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_binomial.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.Plo \ + src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_smp.Plo \ + src/mpi/coll/reduce_local/$(DEPDIR)/lib_libmpi_la-reduce_local.Plo \ + src/mpi/coll/reduce_local/$(DEPDIR)/lib_libpmpi_la-reduce_local.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_allcomm_nb.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_noncommutative.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_pairwise.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_halving.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_allcomm_nb.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_noncommutative.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_pairwise.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.Plo \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_allcomm_nb.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_pairwise.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.Plo \ + src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan.Plo \ + src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_allcomm_nb.Plo \ + src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_recursive_doubling.Plo \ + src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_smp.Plo \ + src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan.Plo \ + src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_allcomm_nb.Plo \ + src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_recursive_doubling.Plo \ + src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_smp.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_allcomm_nb.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_linear.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_remote_send_local_scatter.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_intra_binomial.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_allcomm_nb.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_linear.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.Plo \ + src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_intra_binomial.Plo \ + src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv.Plo \ + src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_linear.Plo \ + src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_nb.Plo \ + src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv.Plo \ + src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_linear.Plo \ + src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_nb.Plo \ + src/mpi/coll/src/$(DEPDIR)/lib_libmpi_la-coll_impl.Plo \ + src/mpi/coll/src/$(DEPDIR)/lib_libpmpi_la-coll_impl.Plo \ + src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_impl.Plo \ + src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_utils.Plo \ + src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-tsp_gentran.Plo \ + src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_impl.Plo \ + src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_utils.Plo \ + src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-tsp_gentran.Plo \ + src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-stubtran_impl.Plo \ + src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-tsp_stubtran.Plo \ + src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-stubtran_impl.Plo \ + src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-tsp_stubtran.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_agree.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_compare.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create_group.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup_with_info.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_ack.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_get_acked.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_free.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_info.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_name.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_group.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_idup.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_rank.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_group.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_size.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_revoke.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_info.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_name.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_shrink.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_size.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split_type.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_test_inter.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-commutil.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-contextid.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_create.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_merge.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_agree.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_compare.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create_group.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_info.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_ack.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_acked.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_free.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_info.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_name.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_group.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_idup.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_rank.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_group.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_size.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_revoke.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_info.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_name.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_shrink.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_size.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split_type.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_test_inter.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-commutil.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-contextid.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_create.Plo \ + src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_merge.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-address.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-ext32_datatype.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_address.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_count.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external_size.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_size.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_blockindexed.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_commit.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_contiguous.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_darray.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed_block.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hvector.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_indexed_block.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_pairtype.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_resized.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_struct.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_subarray.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_debug.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_dup.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_extent.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_free.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_contents.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_envelope.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_name.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hindexed.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hvector.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_indexed.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_lb.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_match_size.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_set_name.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_struct.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_ub.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_vector.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-typeutil.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack_external.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-address.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-ext32_datatype.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_address.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_count.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external_size.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_size.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_blockindexed.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_commit.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_contiguous.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_darray.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_block.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hvector.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_indexed_block.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_pairtype.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_resized.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_struct.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_subarray.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_debug.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_dup.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_extent.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_free.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_contents.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_envelope.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_name.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hindexed.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hvector.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_indexed.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_lb.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_match_size.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_set_name.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size_x.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_struct.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_ub.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_vector.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-typeutil.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack.Plo \ + src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack_external.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-darray_support.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_blockindexed.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_contig.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_indexed.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_struct.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_vector.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_debug.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-looputil.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_count.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_flatten.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-subarray_support.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-darray_support.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_blockindexed.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_contig.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_indexed.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_struct.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_vector.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_debug.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-looputil.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_count.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_flatten.Plo \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-subarray_support.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_create.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_debug.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_flatten.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_iov.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack_external.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_create.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_debug.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_flatten.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_iov.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack.Plo \ + src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack_external.Plo \ + src/mpi/debugger/$(DEPDIR)/lib_libtvmpich_la-dll_mpich.Plo \ + src/mpi/debugger/$(DEPDIR)/libdbginitdummy_la-dbginit.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_class.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_code.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_string.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_call_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_create_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_get_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_set_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-dynerrutil.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_create.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_free.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_get.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_set.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_class.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_string.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errutil.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_call_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_create_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_get_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_set_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_call_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_create_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_get_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_set_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_class.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_code.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_string.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_call_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_create_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_get_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_set_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-dynerrutil.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_create.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_free.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_get.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_set.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_class.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_string.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errutil.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_call_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_create_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_get_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_set_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_call_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_create_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_get_errhandler.Plo \ + src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_set_errhandler.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_compare.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_difference.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_excl.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_free.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_incl.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_intersection.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_excl.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_incl.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_rank.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_size.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_translate_ranks.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_union.Plo \ + src/mpi/group/$(DEPDIR)/lib_libmpi_la-grouputil.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_compare.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_difference.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_excl.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_free.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_incl.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_intersection.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_excl.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_incl.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_rank.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_size.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_translate_ranks.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_union.Plo \ + src/mpi/group/$(DEPDIR)/lib_libpmpi_la-grouputil.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_create.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_delete.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_dup.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_free.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_get.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getn.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getnth.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getvallen.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_set.Plo \ + src/mpi/info/$(DEPDIR)/lib_libmpi_la-infoutil.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_create.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_delete.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_dup.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_free.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_get.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getn.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getnth.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getvallen.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_set.Plo \ + src/mpi/info/$(DEPDIR)/lib_libpmpi_la-infoutil.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-abort.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-async.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalize.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalized.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-init.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-initialized.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-initinfo.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-initthread.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-ismain.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-netloc_util.Plo \ + src/mpi/init/$(DEPDIR)/lib_libmpi_la-querythread.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-abort.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-async.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalize.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalized.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-init.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initialized.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initinfo.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initthread.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-ismain.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-netloc_util.Plo \ + src/mpi/init/$(DEPDIR)/lib_libpmpi_la-querythread.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_add.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_diff.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libmpi_la-getpname.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libmpi_la-library_version.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libmpi_la-pcontrol.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libmpi_la-utils.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libmpi_la-version.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_add.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_diff.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-getpname.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-library_version.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-pcontrol.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-utils.Plo \ + src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-version.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsendutil.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bufattach.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-buffree.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ibsend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-improbe.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-imrecv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-iprobe.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irecv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irsend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-isend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-issend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mprobe.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mrecv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-probe.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv_rep.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsendutil.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bufattach.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-buffree.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ibsend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-improbe.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-imrecv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-iprobe.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irecv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irsend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-isend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-issend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mprobe.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mrecv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-probe.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send_init.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv_rep.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend.Plo \ + src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend_init.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-cancel.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_complete.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_start.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-mpir_request.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_free.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_get_status.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-start.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-startall.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-status_set_cancelled.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-test.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-test_cancelled.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-testall.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-testany.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-testsome.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-wait.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitall.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitany.Plo \ + src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitsome.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-cancel.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_complete.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_start.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-mpir_request.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_free.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_get_status.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-start.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-startall.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-status_set_cancelled.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test_cancelled.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testall.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testany.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testsome.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-wait.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitall.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitany.Plo \ + src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitsome.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-accumulate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-alloc_mem.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-compare_and_swap.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-fetch_and_op.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-free_mem.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get_accumulate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-put.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-raccumulate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget_accumulate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rmatypeutil.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rput.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate_shared.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_attach.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_complete.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create_dynamic.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_detach.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_fence.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_all.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local_all.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_free.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_group.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_info.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_name.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock_all.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_post.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_info.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_name.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_shared_query.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_start.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_sync.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_test.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock_all.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_wait.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libmpi_la-winutil.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-accumulate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-alloc_mem.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-compare_and_swap.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-fetch_and_op.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-free_mem.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get_accumulate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-put.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-raccumulate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget_accumulate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rmatypeutil.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rput.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate_shared.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_attach.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_complete.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create_dynamic.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_detach.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_fence.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_all.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local_all.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_free.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_group.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_info.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_name.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock_all.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_post.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_info.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_name.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_shared_query.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_start.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_sync.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_test.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock_all.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_wait.Plo \ + src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-winutil.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-close_port.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_accept.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_connect.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_disconnect.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_get_parent.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_join.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn_multiple.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-lookup_name.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-open_port.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-publish_name.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-unpublish_name.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-close_port.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_accept.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_connect.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_disconnect.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_get_parent.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_join.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn_multiple.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-lookup_name.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-open_port.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-publish_name.Plo \ + src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-unpublish_name.Plo \ + src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtick.Plo \ + src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtime.Plo \ + src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtick.Plo \ + src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtime.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_coords.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_create.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_get.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_map.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_rank.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_shift.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_sub.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cartdim_get.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dims_create.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create_adj.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb_count.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_get.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_map.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_nbr.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphcreate.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphdimsget.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphnbrcnt.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topo_test.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topoutil.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_coords.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_create.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_get.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_map.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_rank.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_shift.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_sub.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cartdim_get.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dims_create.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create_adj.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb_count.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_get.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_map.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_nbr.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphcreate.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphdimsget.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphnbrcnt.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topo_test.Plo \ + src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topoutil.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_changed.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_categories.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_cvars.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_index.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_info.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_num.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_pvars.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_index.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_info.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_num.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_alloc.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_free.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_read.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_write.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_info.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_item.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_finalize.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_initthread.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_index.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_info.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_num.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_alloc.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_free.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_read.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_readreset.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_reset.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_create.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_free.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_start.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_stop.Plo \ + src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_write.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_changed.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_categories.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_cvars.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_index.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_info.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_num.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_pvars.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_index.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_info.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_num.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_alloc.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_free.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_read.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_write.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_info.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_item.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_finalize.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_initthread.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_index.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_info.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_num.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_alloc.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_free.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_read.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_readreset.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_reset.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_create.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_free.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_start.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_stop.Plo \ + src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_write.Plo \ + src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libmpi_la-none.Plo \ + src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libpmpi_la-none.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_cm.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_data.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_msg.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_progress.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_tagged.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_cm.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_data.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_msg.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_progress.Plo \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_tagged.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-socksm.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_ckpt.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_finalize.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_getip.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_init.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_send.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_utility.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-socksm.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_ckpt.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_finalize.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_getip.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_init.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_send.Plo \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_utility.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_rma_shm.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_comm.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_eagernoncontig.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_ckpt.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_debug.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_finalize.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_init.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt_shm.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_mpich.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_net_array.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network_poll.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_rma_shm.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_comm.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_eagernoncontig.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_ckpt.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_debug.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_finalize.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_init.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt_shm.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_mpich.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_net_array.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network.Plo \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network_poll.Plo \ + src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libmpi_la-papi_defs.Plo \ + src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libpmpi_la-papi_defs.Plo \ + src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libmpi_la-mkstemp.Plo \ + src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libpmpi_la-mkstemp.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-sock.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-sock.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_buffer.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm_spawn_multiple.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eager.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eagersync.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_connection.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_op_req.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_pkt.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_req.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_revoke_pkt.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_send_req.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_port.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_recvq.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_request.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_ops.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_pkthandler.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_progress.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_reqops.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_sync.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rndv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_win_fns.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_abort.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_aint.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_recv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_send.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_disconnect.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_failure_ack.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_get_all_failed_procs.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_revoke.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_spawn_multiple.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_datatype.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_finalize.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_get_universe_size.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_getpname.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_improbe.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_imrecv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_init.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_iprobe.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irecv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irsend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_isend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_issend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mprobe.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mrecv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_op.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_port.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_probe.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_recv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rma.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rsend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_send.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_ssend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_startall.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_vc.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_isend_self.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_pg.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_printf.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_rma.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_buffer.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm_spawn_multiple.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eager.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eagersync.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_connection.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_op_req.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_pkt.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_req.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_revoke_pkt.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_send_req.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_port.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_recvq.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_request.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_ops.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_pkthandler.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_progress.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_reqops.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_sync.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rndv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_win_fns.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_abort.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_aint.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_recv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_send.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_disconnect.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_failure_ack.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_get_all_failed_procs.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_revoke.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_spawn_multiple.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_datatype.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_finalize.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_get_universe_size.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_getpname.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_improbe.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_imrecv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_init.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_iprobe.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irecv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irsend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_isend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_issend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mprobe.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mrecv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_op.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_port.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_probe.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_recv.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rma.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rsend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_send.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_ssend.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_startall.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_vc.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_isend_self.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_pg.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_printf.Plo \ + src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_rma.Plo \ + src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_connect_sock.Plo \ + src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_getinterfaces.Plo \ + src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_init_sock.Plo \ + src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_connect_sock.Plo \ + src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_getinterfaces.Plo \ + src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_init_sock.Plo \ + src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_globals.Plo \ + src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_init.Plo \ + src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_globals.Plo \ + src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_init.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-func_table.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-globals.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_comm.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_datatype.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_op.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_spawn.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_win.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-util.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-func_table.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-globals.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_comm.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_datatype.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_op.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_spawn.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_win.Plo \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-util.Plo \ + src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libmpi_la-netmod_impl.Plo \ + src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libpmpi_la-netmod_impl.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-func_table.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-globals.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_comm.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_datatype.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_init.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_op.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_spawn.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_win.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-func_table.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-globals.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_comm.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_datatype.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_init.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_op.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_spawn.Plo \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_win.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-func_table.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-globals.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_comm.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_datatype.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_init.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_op.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_spawn.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_win.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-func_table.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-globals.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_comm.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_datatype.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_init.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_op.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_spawn.Plo \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_win.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-globals.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_coll_init.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_comm.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_datatype.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_eager_array.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_init.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_op.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_spawn.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_win.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-globals.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_coll_init.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_comm.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_datatype.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_eager_array.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_init.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_op.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_spawn.Plo \ + src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_win.Plo \ + src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-func_table.Plo \ + src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-globals.Plo \ + src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-func_table.Plo \ + src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-globals.Plo \ + src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-func_table.Plo \ + src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-globals.Plo \ + src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-func_table.Plo \ + src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-globals.Plo \ + src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libmpi_la-release_gather.Plo \ + src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libpmpi_la-release_gather.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-func_table.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_dpm.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_hooks.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_impl.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_init.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_mem.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_misc.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_rma.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree_util.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-func_table.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_dpm.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_hooks.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_impl.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_init.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_mem.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_misc.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_rma.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree.Plo \ + src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree_util.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-globals.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_comm.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_init.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_spawn.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_win.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-globals.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_comm.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_init.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_spawn.Plo \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_win.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals_default.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_comm.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_globals.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_impl.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_init.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_spawn.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_win.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4i_comm.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_buf.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_callbacks.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_comm.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_init.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_proc.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_recvq.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_origin_callbacks.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_target_callbacks.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_symheap.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_win.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-mpid_ch4_net_array.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals_default.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_comm.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_globals.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_impl.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_init.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_spawn.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_win.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4i_comm.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_buf.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_callbacks.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_comm.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_init.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_proc.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_recvq.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_origin_callbacks.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_target_callbacks.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_symheap.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_win.Plo \ + src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-mpid_ch4_net_array.Plo \ + src/mpid/common/bc/$(DEPDIR)/lib_libmpi_la-mpidu_bc.Plo \ + src/mpid/common/bc/$(DEPDIR)/lib_libpmpi_la-mpidu_bc.Plo \ + src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_dtypes.Plo \ + src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_init.Plo \ + src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_ops.Plo \ + src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_rte.Plo \ + src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_dtypes.Plo \ + src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_init.Plo \ + src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_ops.Plo \ + src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_rte.Plo \ + src/mpid/common/sched/$(DEPDIR)/lib_libmpi_la-mpidu_sched.Plo \ + src/mpid/common/sched/$(DEPDIR)/lib_libpmpi_la-mpidu_sched.Plo \ + src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_alloc.Plo \ + src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_barrier.Plo \ + src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_alloc.Plo \ + src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_barrier.Plo \ + src/nameserv/file/$(DEPDIR)/lib_libmpi_la-file_nameserv.Plo \ + src/nameserv/file/$(DEPDIR)/lib_libpmpi_la-file_nameserv.Plo \ + src/nameserv/pmi/$(DEPDIR)/lib_libmpi_la-pmi_nameserv.Plo \ + src/nameserv/pmi/$(DEPDIR)/lib_libpmpi_la-pmi_nameserv.Plo \ + src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Po \ + src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Po \ + src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Po \ + src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Po \ + src/pm/util/$(DEPDIR)/libmpiexec_la-cmnargs.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-dbgiface.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-env.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-ioloop.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-labelout.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-newsession.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-pmiport.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-pmiserv.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-process.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-rm.Plo \ + src/pm/util/$(DEPDIR)/libmpiexec_la-simple_pmiutil2.Plo \ + src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple2pmi.Plo \ + src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo \ + src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple2pmi.Plo \ + src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo \ + src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmi.Plo \ + src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo \ + src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmi.Plo \ + src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo \ + src/util/assert/$(DEPDIR)/lib_libmpi_la-assert.Plo \ + src/util/assert/$(DEPDIR)/lib_libpmpi_la-assert.Plo \ + src/util/cvar/$(DEPDIR)/lib_libmpi_la-mpir_cvars.Plo \ + src/util/cvar/$(DEPDIR)/lib_libpmpi_la-mpir_cvars.Plo \ + src/util/mem/$(DEPDIR)/lib_libmpi_la-handlemem.Plo \ + src/util/mem/$(DEPDIR)/lib_libmpi_la-strerror.Plo \ + src/util/mem/$(DEPDIR)/lib_libpmpi_la-handlemem.Plo \ + src/util/mem/$(DEPDIR)/lib_libpmpi_la-strerror.Plo \ + src/util/procmap/$(DEPDIR)/lib_libmpi_la-local_proc.Plo \ + src/util/procmap/$(DEPDIR)/lib_libpmpi_la-local_proc.Plo +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS) +LTF77COMPILE = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) +AM_V_F77 = $(am__v_F77_$(V)) +am__v_F77_ = $(am__v_F77_$(AM_DEFAULT_VERBOSITY)) +am__v_F77_0 = @echo " F77 " $@; +am__v_F77_1 = +F77LD = $(F77) +F77LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_F77LD = $(am__v_F77LD_$(V)) +am__v_F77LD_ = $(am__v_F77LD_$(AM_DEFAULT_VERBOSITY)) +am__v_F77LD_0 = @echo " F77LD " $@; +am__v_F77LD_1 = +FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) +LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_FC = $(am__v_FC_$(V)) +am__v_FC_ = $(am__v_FC_$(AM_DEFAULT_VERBOSITY)) +am__v_FC_0 = @echo " FC " $@; +am__v_FC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib_libmpicxx_la_SOURCES) \ + $(lib_libmpifort_la_SOURCES) \ + $(lib_libmpi_la_SOURCES) \ + $(lib_libpmpi_la_SOURCES) \ + $(lib_libtvmpich_la_SOURCES) \ + $(src_mpi_debugger_libdbginitdummy_la_SOURCES) \ + $(src_pm_util_libmpiexec_la_SOURCES) src/env/mpichversion.c \ + src/env/mpivars.c $(src_pm_gforker_mpiexec_SOURCES) \ + $(src_pm_gforker_mpiexec_gforker_SOURCES) \ + $(src_pm_remshell_mpiexec_SOURCES) \ + $(src_pm_remshell_mpiexec_remshell_SOURCES) +DIST_SOURCES = $(am__lib_libmpicxx_la_SOURCES_DIST) \ + $(am__lib_libmpifort_la_SOURCES_DIST) \ + $(am__lib_libmpi_la_SOURCES_DIST) \ + $(am__lib_libpmpi_la_SOURCES_DIST) \ + $(am__lib_libtvmpich_la_SOURCES_DIST) \ + $(am__src_mpi_debugger_libdbginitdummy_la_SOURCES_DIST) \ + $(am__src_pm_util_libmpiexec_la_SOURCES_DIST) \ + src/env/mpichversion.c src/env/mpivars.c \ + $(am__src_pm_gforker_mpiexec_SOURCES_DIST) \ + $(am__src_pm_gforker_mpiexec_gforker_SOURCES_DIST) \ + $(am__src_pm_remshell_mpiexec_SOURCES_DIST) \ + $(am__src_pm_remshell_mpiexec_remshell_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__dist_noinst_DATA_DIST = maint/Version maint/Version.base.m4 \ + maint/docnotes maint/errmsgdirs maint/cvardirs \ + maint/gccimpgen.cpp maint/local_perl/README \ + maint/local_perl/YAML-Tiny-1.41.tar.gz maint/mpi1.lst \ + maint/setup.jpg maint/structalign.c maint/version.m4 \ + src/mpi/errhan/errnames.txt src/mpid/ch3/errnames.txt \ + src/mpid/ch3/util/sock/errnames.txt \ + src/mpid/ch3/channels/nemesis/netmod/ofi/errnames.txt \ + src/mpid/ch3/channels/sock/src/errnames.txt \ + src/mpid/ch4/netmod/ofi/errnames.txt \ + src/mpid/ch4/netmod/ucx/errnames.txt src/pmi/errnames.txt \ + src/mpi/errhan/baseerrnames.txt +DATA = $(dist_noinst_DATA) $(nodist_pkgconfig_DATA) $(noinst_DATA) \ + $(sysconf_DATA) +am__modinc_HEADERS_DIST = \ + src/binding/fortran/use_mpi/$(MPIMOD).$(MOD) \ + src/binding/fortran/use_mpi/$(MPISIZEOFMOD).$(MOD) \ + src/binding/fortran/use_mpi/$(MPICONSTMOD).$(MOD) \ + src/binding/fortran/use_mpi/$(MPIBASEMOD).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(PMPI_F08_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_F08_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_F08_CALLBACKS_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_F08_COMPILE_CONSTANTS_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_F08_LINK_CONSTANTS_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_F08_TYPES_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_CDESC_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_GLUE_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NOBUF_NAME).$(MOD) \ + src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_TYPES_NAME).$(MOD) +am__noinst_HEADERS_DIST = src/mpi/attr/attr.h \ + src/mpi/coll/bcast/bcast.h \ + src/mpi/coll/iallgatherv/iallgatherv.h \ + src/mpi/coll/ibcast/ibcast.h \ + src/mpi/coll/allreduce_group/allreduce_group.h \ + src/mpi/coll/transports/gentran/gentran_impl.h \ + src/mpi/coll/transports/gentran/gentran_utils.h \ + src/mpi/coll/transports/gentran/tsp_gentran.h \ + src/mpi/coll/transports/gentran/tsp_gentran_types.h \ + src/mpi/coll/transports/stubtran/stubtran_impl.h \ + src/mpi/coll/transports/stubtran/tsp_stubtran.h \ + src/mpi/coll/transports/stubtran/tsp_stubtran_types.h \ + src/mpi/coll/transports/common/tsp_undef.h \ + src/mpi/coll/algorithms/treealgo/treealgo.h \ + src/mpi/coll/algorithms/treealgo/treealgo_types.h \ + src/mpi/coll/algorithms/treealgo/treeutil.h \ + src/mpi/coll/algorithms/recexchalgo/recexchalgo.h \ + src/mpi/coll/algorithms/stubalgo/stubalgo.h \ + src/mpi/coll/algorithms/stubalgo/stubalgo_types.h \ + src/mpi/coll/include/coll_impl.h src/mpi/comm/mpicomm.h \ + src/mpi/datatype/typerep/dataloop/typesize_support.h \ + src/mpi/datatype/typerep/dataloop/dataloop_internal.h \ + src/mpi/datatype/datatype.h src/mpi/datatype/veccpy.h \ + src/mpi/debugger/mpich_dll_defs.h src/mpi/errhan/defmsg.h \ + src/mpi/errhan/errcodes.h \ + $(top_srcdir)/src/mpi/errhan/defmsg.h src/mpi/group/group.h \ + src/mpi/init/mpi_init.h src/mpi/pt2pt/bsendutil.h \ + src/mpi/spawn/namepub.h src/util/nodemap/build_nodemap.h \ + src/util/wrappers/mpiu_sock_wrappers.h \ + src/util/wrappers/mpiu_util_wrappers.h \ + src/binding/fortran/mpif_h/fproto.h \ + src/binding/fortran/mpif_h/mpi_fortimpl.h \ + src/binding/fortran/use_mpi/create_f90_util.h \ + src/binding/fortran/use_mpi/cf90t.h \ + src/binding/fortran/use_mpi/mpif90type.h \ + src/binding/fortran/use_mpi/mpifnoext.h \ + src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.h \ + src/include/bsocket.h src/include/mpir_refcount.h \ + src/include/mpir_refcount_global.h \ + src/include/mpir_refcount_pobj.h \ + src/include/mpir_refcount_single.h src/include/mpir_assert.h \ + src/include/mpir_misc_post.h src/include/mpir_type_defs.h \ + src/include/mpir_dbg.h src/include/mpir_attr_generic.h \ + src/include/mpir_attr.h src/include/mpii_f77interface.h \ + src/include/mpii_cxxinterface.h src/include/mpii_fortlogical.h \ + src/include/mpiallstates.h src/include/mpii_bsend.h \ + src/include/mpir_cvars.h src/include/mpichconfconst.h \ + src/include/mpir_err.h src/include/mpir_ext.h \ + src/include/mpir_func.h src/include/mpir_coll.h \ + src/include/mpir_comm.h src/include/mpir_debugger.h \ + src/include/mpir_request.h src/include/mpir_status.h \ + src/include/mpir_contextid.h src/include/mpir_objects.h \ + src/include/mpir_pointers.h src/include/mpir_topo.h \ + src/include/mpir_group.h src/include/mpir_errhandler.h \ + src/include/mpir_info.h src/include/mpiimpl.h \ + src/include/mpir_mem.h src/include/mpir_thread.h \ + src/include/mpir_nbc.h src/include/mpir_op.h \ + src/include/mpir_process.h src/include/mpir_misc.h \ + src/include/mpir_tags.h src/include/mpir_datatype.h \ + src/include/mpir_win.h src/include/mpir_pt2pt.h \ + src/include/nopackage.h src/include/rlog.h \ + src/include/rlog_macros.h src/include/mpir_op_util.h \ + src/mpid/include/mpidu_pre.h src/mpid/ch3/include/mpidimpl.h \ + src/mpid/ch3/include/mpidpkt.h src/mpid/ch3/include/mpidpost.h \ + src/mpid/ch3/include/mpidpre.h \ + src/mpid/ch3/include/mpid_thread.h \ + src/mpid/ch3/include/mpidrma.h \ + src/mpid/ch3/include/mpid_sched.h \ + src/mpid/ch3/include/mpid_coll.h \ + src/mpid/ch3/util/sock/ch3usock.h \ + src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h \ + src/mpid/ch3/channels/nemesis/include/mpidi_ch3_nemesis.h \ + src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h \ + src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_atomics.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_debug.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_fbox.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h \ + src/mpid/ch3/channels/nemesis/include/mpid_nem_queue.h \ + src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h \ + src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_queue.h \ + src/mpid/ch3/channels/nemesis/utils/monitor/my_papi_defs.h \ + src/mpid/ch3/channels/nemesis/utils/monitor/rdtsc.h \ + src/mpid/ch3/channels/sock/include/mpidu_sock.h \ + src/mpid/ch3/channels/sock/include/mpidu_socki.h \ + src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h \ + src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h \ + src/mpid/ch3/channels/sock/include/mpidi_ch3_post.h \ + src/mpid/ch4/include/netmodpre.h src/mpid/ch4/include/shmpre.h \ + src/mpid/ch4/include/mpidch4.h src/mpid/ch4/include/mpidch4r.h \ + src/mpid/ch4/include/mpidimpl.h src/mpid/ch4/include/mpidpre.h \ + src/mpid/ch4/include/mpid_sched.h \ + src/mpid/ch4/include/mpid_thread.h src/mpid/ch4/src/ch4_comm.h \ + src/mpid/ch4/src/ch4_progress.h src/mpid/ch4/src/ch4_request.h \ + src/mpid/ch4/src/ch4_send.h src/mpid/ch4/src/ch4_startall.h \ + src/mpid/ch4/src/ch4_types.h src/mpid/ch4/src/ch4_impl.h \ + src/mpid/ch4/src/ch4_probe.h src/mpid/ch4/src/ch4_proc.h \ + src/mpid/ch4/src/ch4_recv.h src/mpid/ch4/src/ch4_rma.h \ + src/mpid/ch4/src/ch4_win.h src/mpid/ch4/src/ch4r_probe.h \ + src/mpid/ch4/src/ch4r_rma.h src/mpid/ch4/src/ch4r_win.h \ + src/mpid/ch4/src/ch4r_init.h src/mpid/ch4/src/ch4r_proc.h \ + src/mpid/ch4/src/ch4i_comm.h src/mpid/ch4/src/ch4r_recvq.h \ + src/mpid/ch4/src/ch4r_recv.h src/mpid/ch4/src/ch4r_symheap.h \ + src/mpid/ch4/src/ch4r_buf.h src/mpid/ch4/src/ch4r_callbacks.h \ + src/mpid/ch4/src/ch4r_rma_origin_callbacks.h \ + src/mpid/ch4/src/ch4r_rma_target_callbacks.h \ + src/mpid/ch4/src/ch4r_request.h \ + src/mpid/ch4/generic/mpidig_send.h \ + src/mpid/ch4/generic/mpidig_recv.h \ + src/mpid/ch4/generic/mpidig_startall.h \ + src/mpid/ch4/generic/mpidig.h \ + src/mpid/ch4/netmod/include/netmod.h \ + src/mpid/ch4/netmod/include/netmod_impl.h \ + src/mpid/ch4/shm/include/shm.h src/mpid/ch4/shm/src/shm_impl.h \ + src/mpid/ch4/shm/src/shm_am.h src/mpid/ch4/shm/src/shm_coll.h \ + src/mpid/ch4/shm/src/shm_hooks.h \ + src/mpid/ch4/shm/src/shm_init.h \ + src/mpid/ch4/shm/src/shm_misc.h src/mpid/ch4/shm/src/shm_p2p.h \ + src/mpid/ch4/shm/src/shm_startall.h \ + src/mpid/ch4/shm/src/shm_noinline.h \ + src/mpid/ch4/shm/src/shm_rma.h \ + src/mpid/ch4/shm/src/topotree_util.h \ + src/mpid/ch4/shm/src/topotree_types.h \ + src/mpid/ch4/shm/src/topotree.h \ + src/mpid/ch4/shm/posix/release_gather/release_gather_types.h \ + src/mpid/ch4/shm/posix/release_gather/release_gather.h \ + src/mpid/ch4/shm/posix/posix_am.h \ + src/mpid/ch4/shm/posix/posix_coll.h \ + src/mpid/ch4/shm/posix/shm_inline.h \ + src/mpid/ch4/shm/posix/posix_noinline.h \ + src/mpid/ch4/shm/posix/posix_progress.h \ + src/mpid/ch4/shm/posix/posix_recv.h \ + src/mpid/ch4/shm/posix/posix_rma.h \ + src/mpid/ch4/shm/posix/posix_win.h \ + src/mpid/ch4/shm/posix/posix_impl.h \ + src/mpid/ch4/shm/posix/posix_probe.h \ + src/mpid/ch4/shm/posix/posix_request.h \ + src/mpid/ch4/shm/posix/posix_send.h \ + src/mpid/ch4/shm/posix/posix_startall.h \ + src/mpid/ch4/shm/posix/posix_unimpl.h \ + src/mpid/ch4/shm/posix/posix_am_impl.h \ + src/mpid/ch4/shm/posix/posix_pre.h \ + src/mpid/ch4/shm/posix/posix_proc.h \ + src/mpid/ch4/shm/posix/posix_types.h \ + src/mpid/ch4/shm/posix/posix_coll_release_gather.h \ + src/mpid/ch4/shm/posix/eager/include/posix_eager.h \ + src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h \ + src/mpid/ch4/shm/posix/eager/include/posix_eager_transaction.h \ + src/mpid/ch4/shm/posix/eager/include/posix_eager_impl.h \ + src/mpid/ch4/shm/posix/eager/fbox/fbox_init.h \ + src/mpid/ch4/shm/posix/eager/fbox/fbox_send.h \ + src/mpid/ch4/shm/posix/eager/fbox/fbox_recv.h \ + src/mpid/ch4/shm/posix/eager/fbox/posix_eager_inline.h \ + src/mpid/ch4/shm/posix/eager/stub/stub_init.h \ + src/mpid/ch4/shm/posix/eager/stub/stub_send.h \ + src/mpid/ch4/shm/posix/eager/stub/stub_recv.h \ + src/mpid/ch4/shm/posix/eager/stub/posix_eager_inline.h \ + src/mpid/common/sched/mpidu_sched.h \ + src/mpid/common/thread/mpidu_thread_fallback.h \ + src/mpid/common/hcoll/hcoll.h \ + src/mpid/common/hcoll/hcoll_dtypes.h \ + src/mpid/common/timers/mpid_timers_fallback.h \ + src/mpid/common/shm/mpidu_generic_queue.h \ + src/mpid/common/shm/mpidu_shm_impl.h \ + src/mpid/common/shm/mpidu_shm.h src/mpid/common/bc/mpidu_bc.h \ + src/pmi/pmi2/simple/simple_pmiutil.h \ + src/pmi/pmi2/simple/simple2pmi.h \ + src/pmi/pmi2/simple/pmi2compat.h src/pmi/pmi2/include/pmi2.h \ + src/pmi/simple/simple_pmiutil.h src/pmi/include/pmi.h +HEADERS = $(include_HEADERS) $(modinc_HEADERS) \ + $(nodist_include_HEADERS) $(nodist_noinst_HEADERS) \ + $(noinst_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir distdir-am dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/maint/Makefile.mk \ + $(srcdir)/mpich-doxygen.in $(srcdir)/src/Makefile.mk \ + $(top_srcdir)/confdb/ar-lib $(top_srcdir)/confdb/compile \ + $(top_srcdir)/confdb/config.guess \ + $(top_srcdir)/confdb/config.rpath \ + $(top_srcdir)/confdb/config.sub $(top_srcdir)/confdb/depcomp \ + $(top_srcdir)/confdb/install-sh $(top_srcdir)/confdb/ltmain.sh \ + $(top_srcdir)/confdb/missing $(top_srcdir)/doc/Makefile.mk \ + $(top_srcdir)/doc/design/Makefile.in \ + $(top_srcdir)/doc/installguide/Makefile.in \ + $(top_srcdir)/doc/logging/Makefile.in \ + $(top_srcdir)/doc/refman/Makefile.in \ + $(top_srcdir)/doc/userguide/Makefile.in \ + $(top_srcdir)/src/binding/Makefile.mk \ + $(top_srcdir)/src/binding/cxx/Makefile.mk \ + $(top_srcdir)/src/binding/cxx/mpicxx.h.in \ + $(top_srcdir)/src/binding/fortran/mpif_h/Makefile.mk \ + $(top_srcdir)/src/binding/fortran/mpif_h/mpif.h.in \ + $(top_srcdir)/src/binding/fortran/mpif_h/setbot.c.in \ + $(top_srcdir)/src/binding/fortran/mpif_h/setbotf.f.in \ + $(top_srcdir)/src/binding/fortran/use_mpi/Makefile.mk \ + $(top_srcdir)/src/binding/fortran/use_mpi/mpi_base.f90.in \ + $(top_srcdir)/src/binding/fortran/use_mpi/mpi_constants.f90.in \ + $(top_srcdir)/src/binding/fortran/use_mpi/mpi_sizeofs.f90.in \ + $(top_srcdir)/src/binding/fortran/use_mpi/mpif90model.h.in \ + $(top_srcdir)/src/binding/fortran/use_mpi_f08/Makefile.mk \ + $(top_srcdir)/src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90.in \ + $(top_srcdir)/src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90.in \ + $(top_srcdir)/src/binding/fortran/use_mpi_f08/wrappers_c/Makefile.mk \ + $(top_srcdir)/src/env/Makefile.mk \ + $(top_srcdir)/src/env/mpicc.bash.in \ + $(top_srcdir)/src/env/mpicc.sh.in \ + $(top_srcdir)/src/env/mpicxx.bash.in \ + $(top_srcdir)/src/env/mpicxx.sh.in \ + $(top_srcdir)/src/env/mpif77.bash.in \ + $(top_srcdir)/src/env/mpif77.sh.in \ + $(top_srcdir)/src/env/mpifort.bash.in \ + $(top_srcdir)/src/env/mpifort.sh.in \ + $(top_srcdir)/src/env/mpixxx_opts.conf.in \ + $(top_srcdir)/src/env/parkill.in \ + $(top_srcdir)/src/glue/Makefile.mk \ + $(top_srcdir)/src/glue/romio/Makefile.mk \ + $(top_srcdir)/src/hwloc/include/hwloc/autogen/config.h.in \ + $(top_srcdir)/src/hwloc/include/private/autogen/config.h.in \ + $(top_srcdir)/src/include/Makefile.mk \ + $(top_srcdir)/src/include/mpi.h.in \ + $(top_srcdir)/src/include/mpichconf.h.in \ + $(top_srcdir)/src/include/mpichinfo.h.in \ + $(top_srcdir)/src/include/mpir_ext.h.in \ + $(top_srcdir)/src/mpi/Makefile.mk \ + $(top_srcdir)/src/mpi/attr/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/algorithms/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/algorithms/recexchalgo/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/algorithms/stubalgo/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/algorithms/treealgo/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/allgather/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/allgatherv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/allreduce/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/allreduce_group/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/alltoall/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/alltoallv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/alltoallw/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/barrier/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/bcast/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/exscan/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/gather/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/gatherv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/iallgather/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/iallgatherv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/iallreduce/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ialltoall/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ialltoallv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ialltoallw/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ibarrier/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ibcast/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/iexscan/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/igather/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/igatherv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ineighbor_allgather/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ineighbor_allgatherv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ineighbor_alltoall/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ineighbor_alltoallv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ineighbor_alltoallw/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ireduce/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ireduce_scatter/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/ireduce_scatter_block/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/iscan/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/iscatter/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/iscatterv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/neighbor_allgather/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/neighbor_allgatherv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/neighbor_alltoall/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/neighbor_alltoallv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/neighbor_alltoallw/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/op/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/reduce/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/reduce_local/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/reduce_scatter/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/reduce_scatter_block/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/scan/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/scatter/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/scatterv/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/src/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/transports/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/transports/gentran/Makefile.mk \ + $(top_srcdir)/src/mpi/coll/transports/stubtran/Makefile.mk \ + $(top_srcdir)/src/mpi/comm/Makefile.mk \ + $(top_srcdir)/src/mpi/datatype/Makefile.mk \ + $(top_srcdir)/src/mpi/datatype/typerep/Makefile.mk \ + $(top_srcdir)/src/mpi/datatype/typerep/dataloop/Makefile.mk \ + $(top_srcdir)/src/mpi/debugger/Makefile.mk \ + $(top_srcdir)/src/mpi/errhan/Makefile.mk \ + $(top_srcdir)/src/mpi/group/Makefile.mk \ + $(top_srcdir)/src/mpi/info/Makefile.mk \ + $(top_srcdir)/src/mpi/init/Makefile.mk \ + $(top_srcdir)/src/mpi/misc/Makefile.mk \ + $(top_srcdir)/src/mpi/pt2pt/Makefile.mk \ + $(top_srcdir)/src/mpi/request/Makefile.mk \ + $(top_srcdir)/src/mpi/rma/Makefile.mk \ + $(top_srcdir)/src/mpi/spawn/Makefile.mk \ + $(top_srcdir)/src/mpi/timer/Makefile.mk \ + $(top_srcdir)/src/mpi/topo/Makefile.mk \ + $(top_srcdir)/src/mpi_t/Makefile.mk \ + $(top_srcdir)/src/mpid/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/include/mpid_nem_net_module_defs.h.in \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/none/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/ofi/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/tcp/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/src/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c.in \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/utils/monitor/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/nemesis/utils/replacements/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/sock/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/channels/sock/src/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/src/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/util/Makefile.mk \ + $(top_srcdir)/src/mpid/ch3/util/sock/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/generic/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/include/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/include/coll_algo_params.h.in \ + $(top_srcdir)/src/mpid/ch4/include/netmodpre.h.in \ + $(top_srcdir)/src/mpid/ch4/netmod/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/netmod/ofi/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/netmod/src/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/netmod/stubnm/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/netmod/ucx/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/shm/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/shm/posix/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/shm/posix/eager/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/shm/posix/eager/fbox/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h.in \ + $(top_srcdir)/src/mpid/ch4/shm/posix/eager/stub/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/shm/posix/posix_eager_array.c.in \ + $(top_srcdir)/src/mpid/ch4/shm/posix/release_gather/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/shm/src/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/shm/stubshm/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/src/Makefile.mk \ + $(top_srcdir)/src/mpid/ch4/src/ch4_coll_globals_default.c.in \ + $(top_srcdir)/src/mpid/ch4/src/mpid_ch4_net_array.c.in \ + $(top_srcdir)/src/mpid/common/Makefile.mk \ + $(top_srcdir)/src/mpid/common/bc/Makefile.mk \ + $(top_srcdir)/src/mpid/common/hcoll/Makefile.mk \ + $(top_srcdir)/src/mpid/common/sched/Makefile.mk \ + $(top_srcdir)/src/mpid/common/shm/Makefile.mk \ + $(top_srcdir)/src/mpid/common/thread/Makefile.mk \ + $(top_srcdir)/src/mpid/common/timers/Makefile.mk \ + $(top_srcdir)/src/nameserv/Makefile.mk \ + $(top_srcdir)/src/nameserv/file/Makefile.mk \ + $(top_srcdir)/src/nameserv/pmi/Makefile.mk \ + $(top_srcdir)/src/packaging/Makefile.mk \ + $(top_srcdir)/src/packaging/envmods/Makefile.mk \ + $(top_srcdir)/src/packaging/envmods/mpich.module.in \ + $(top_srcdir)/src/packaging/pkgconfig/Makefile.mk \ + $(top_srcdir)/src/packaging/pkgconfig/mpich.pc.in \ + $(top_srcdir)/src/pm/Makefile.mk \ + $(top_srcdir)/src/pm/gforker/Makefile.mk \ + $(top_srcdir)/src/pm/remshell/Makefile.mk \ + $(top_srcdir)/src/pm/util/Makefile.mk \ + $(top_srcdir)/src/pmi/Makefile.mk \ + $(top_srcdir)/src/pmi/pmi2/Makefile.mk \ + $(top_srcdir)/src/pmi/pmi2/simple/Makefile.mk \ + $(top_srcdir)/src/pmi/simple/Makefile.mk \ + $(top_srcdir)/src/util/Makefile.mk \ + $(top_srcdir)/src/util/assert/Makefile.mk \ + $(top_srcdir)/src/util/cvar/Makefile.mk \ + $(top_srcdir)/src/util/mem/Makefile.mk \ + $(top_srcdir)/src/util/nodemap/Makefile.mk \ + $(top_srcdir)/src/util/procmap/Makefile.mk \ + $(top_srcdir)/src/util/wrappers/Makefile.mk README \ + confdb/ar-lib confdb/compile confdb/config.guess \ + confdb/config.rpath confdb/config.sub confdb/depcomp \ + confdb/install-sh confdb/ltmain.sh confdb/missing +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +VPATH = VPATH=.:${srcdir} +ABIVERSION = 13:6:1 +ABIVERSIONFLAGS = -version-info $(ABIVERSION) +ACLOCAL = ${SHELL} /home/brian/daos/rpm/mpich/confdb/missing aclocal-1.16 +ADDRESS_KIND = 8 +ALLOCA = +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 0 +AR = ar +AS = as +AUTOCONF = ${SHELL} /home/brian/daos/rpm/mpich/confdb/missing autoconf +AUTOHEADER = ${SHELL} /home/brian/daos/rpm/mpich/confdb/missing autoheader +AUTOMAKE = ${SHELL} /home/brian/daos/rpm/mpich/confdb/missing automake-1.16 +AWK = gawk +BASH = /bin/sh +BASH_SHELL = /bin/bash +BSEND_OVERHEAD = 96 +CC = gcc -std=gnu99 +CCDEPMODE = depmode=gcc3 +CFLAGS = -O2 +CMB_1INT_ALIGNMENT = __attribute__((aligned(16))) +CMB_STATUS_ALIGNMENT = __attribute__((aligned(32))) +CONFIGURE_ARGS_CLEAN = --no-create --no-recursion +CONFIGURE_ARGUMENTS = +COUNT_KIND = 8 +CPP = gcc -E +CPPFLAGS = -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -D_REENTRANT -I/home/brian/daos/rpm/mpich/src/mpi/romio/include +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 +CYGPATH_W = echo +C_LINKPATH_SHL = +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DEVICE = ch3:nemesis +DISABLE_TAG_SUPPORT = #define NO_TAGS_WITH_MODIFIERS 1 +DLLIMPORT = +DLLTOOL = false +DOCTEXT = false +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F08_2INT = +F08_AINT = +F08_BYTE = +F08_CHAR = +F08_COMPLEX16 = +F08_COMPLEX32 = +F08_COMPLEX8 = +F08_COUNT = +F08_CXX_BOOL = +F08_CXX_DOUBLE_COMPLEX = +F08_CXX_FLOAT_COMPLEX = +F08_CXX_LONG_DOUBLE_COMPLEX = +F08_C_AINT = +F08_C_BOOL = +F08_C_COMPLEX = +F08_C_COUNT = +F08_C_DOUBLE_COMPLEX = +F08_C_FLOAT_COMPLEX = +F08_C_LONG_DOUBLE_COMPLEX = +F08_C_OFFSET = +F08_DOUBLE = +F08_DOUBLE_INT = +F08_FLOAT = +F08_FLOAT_INT = +F08_INT = +F08_INT16_T = +F08_INT32_T = +F08_INT64_T = +F08_INT8_T = +F08_INTEGER1 = +F08_INTEGER16 = +F08_INTEGER2 = +F08_INTEGER4 = +F08_INTEGER8 = +F08_LB = +F08_LONG = +F08_LONG_DOUBLE = +F08_LONG_DOUBLE_INT = +F08_LONG_INT = +F08_LONG_LONG = +F08_LONG_LONG_INT = +F08_OFFSET = +F08_PACKED = +F08_REAL16 = +F08_REAL4 = +F08_REAL8 = +F08_SHORT = +F08_SHORT_INT = +F08_SIGNED_CHAR = +F08_UB = +F08_UINT16_T = +F08_UINT32_T = +F08_UINT64_T = +F08_UINT8_T = +F08_UNSIGNED = +F08_UNSIGNED_CHAR = +F08_UNSIGNED_INT = +F08_UNSIGNED_LONG = +F08_UNSIGNED_LONG_LONG = +F08_UNSIGNED_SHORT = +F08_WCHAR = +F77 = gfortran +F77CPP = +F77_COMPLEX16 = 1275072554 +F77_COMPLEX32 = 1275076652 +F77_COMPLEX8 = 1275070504 +F77_INCDIR = -I +F77_INTEGER1 = 1275068717 +F77_INTEGER16 = MPI_DATATYPE_NULL +F77_INTEGER2 = 1275068975 +F77_INTEGER4 = 1275069488 +F77_INTEGER8 = 1275070513 +F77_LIBDIR_LEADER = -L +F77_NAME_MANGLE = F77_NAME_LOWER_USCORE +F77_OTHER_LIBS = +F77_REAL16 = 1275072555 +F77_REAL4 = 1275069479 +F77_REAL8 = 1275070505 +FC = gfortran +FCCPP = +FCEXT = f90 +FCFLAGS = -O2 +FCINC = -I +FCINCFLAG = -I +FCMODEXT = mod +FCMODINCFLAG = -I +FCMODINCSPEC = +FCMODOUTFLAG = -J +FC_ALL_INTEGER_MODELS = 2 , 1, 4 , 2, 9 , 4, 18 , 8, +FC_DOUBLE_MODEL = 15 , 307 +FC_INTEGER_MODEL = 9 +FC_INTEGER_MODEL_MAP = { 2 , 1 , 1 }, { 4 , 2 , 2 }, { 9 , 4 , 4 }, { 18 , 8 , 8 }, +FC_OTHER_LIBS = +FC_REAL_MODEL = 6 , 37 +FC_WORK_FILES_ARG = +FFLAGS = -O2 +FGREP = /bin/grep -F +FILE = +FLIBS = -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lgfortran -lm -lquadmath +FORTRAN_BINDING = 1 +FORTRAN_MPI_OFFSET = integer*8 +GCOV = gcov +GNUCXX_MINORVERSION = 8 +GNUCXX_VERSION = 4 +GNULIB_ATOLL = 0 +GNULIB_CALLOC_POSIX = 0 +GNULIB_CANONICALIZE_FILE_NAME = 0 +GNULIB_GETLOADAVG = 0 +GNULIB_GETSUBOPT = 0 +GNULIB_GRANTPT = 0 +GNULIB_MALLOC_POSIX = 0 +GNULIB_MBTOWC = 0 +GNULIB_MKDTEMP = 0 +GNULIB_MKOSTEMP = 0 +GNULIB_MKOSTEMPS = 0 +GNULIB_MKSTEMP = 0 +GNULIB_MKSTEMPS = 0 +GNULIB_POSIX_OPENPT = 0 +GNULIB_PTSNAME = 0 +GNULIB_PTSNAME_R = 0 +GNULIB_PUTENV = 0 +GNULIB_QSORT_R = 0 +GNULIB_RANDOM = 0 +GNULIB_RANDOM_R = 0 +GNULIB_REALLOC_POSIX = 0 +GNULIB_REALPATH = 0 +GNULIB_RPMATCH = 0 +GNULIB_SECURE_GETENV = 0 +GNULIB_SETENV = 0 +GNULIB_STRTOD = 0 +GNULIB_STRTOLL = 0 +GNULIB_STRTOULL = 0 +GNULIB_SYSTEM_POSIX = 0 +GNULIB_UNLOCKPT = 0 +GNULIB_UNSETENV = 0 +GNULIB_WCTOMB = 0 +GNULIB__EXIT = 0 +GREP = /bin/grep +HAVE_ATOLL = 1 +HAVE_CANONICALIZE_FILE_NAME = 1 +HAVE_CXX_EXCEPTIONS = 1 +HAVE_DECL_GETLOADAVG = 1 +HAVE_DECL_SETENV = 1 +HAVE_DECL_UNSETENV = 1 +HAVE_ERROR_CHECKING = 1 +HAVE_GETSUBOPT = 1 +HAVE_GRANTPT = 1 +HAVE_MKDTEMP = 1 +HAVE_MKOSTEMP = 1 +HAVE_MKOSTEMPS = 1 +HAVE_MKSTEMP = 1 +HAVE_MKSTEMPS = 1 +HAVE_POSIX_OPENPT = 1 +HAVE_PTSNAME = 1 +HAVE_PTSNAME_R = 1 +HAVE_RANDOM = 1 +HAVE_RANDOM_H = 1 +HAVE_RANDOM_R = 1 +HAVE_REALPATH = 1 +HAVE_ROMIO = #include "mpio.h" +HAVE_RPMATCH = 1 +HAVE_SECURE_GETENV = 1 +HAVE_SETENV = 1 +HAVE_STRTOD = 1 +HAVE_STRTOLL = 1 +HAVE_STRTOULL = 1 +HAVE_STRUCT_RANDOM_DATA = 1 +HAVE_SYS_LOADAVG_H = 0 +HAVE_UNLOCKPT = 1 +HAVE__EXIT = 1 +HWLOC_CFLAGS = -fvisibility=hidden -I/usr/include/libxml2 +HWLOC_CPPFLAGS = -I$(HWLOC_top_builddir)/include -I$(HWLOC_top_srcdir)/include +HWLOC_CUDA_LIBS = +HWLOC_EMBEDDED_CFLAGS = -I/usr/include/libxml2 +HWLOC_EMBEDDED_CPPFLAGS = -I$(HWLOC_top_builddir)/include -I$(HWLOC_top_srcdir)/include +HWLOC_EMBEDDED_LDADD = $(HWLOC_top_builddir)/hwloc/libhwloc_embedded.la +HWLOC_EMBEDDED_LDFLAGS = +HWLOC_EMBEDDED_LIBS = -lm -ludev -lxml2 +HWLOC_GL_LIBS = +HWLOC_HAVE_LIBXML2 = 1 +HWLOC_HAVE_NVML = 0 +HWLOC_HAVE_OPENCL = 0 +HWLOC_LDFLAGS = +HWLOC_LIBS = +HWLOC_LIBS_PRIVATE = -lpthread +HWLOC_LIBXML2_CFLAGS = -I/usr/include/libxml2 +HWLOC_LIBXML2_LIBS = -lxml2 +HWLOC_MS_LIB = +HWLOC_MS_LIB_ARCH = X64 +HWLOC_NVML_LIBS = +HWLOC_OPENCL_CFLAGS = +HWLOC_OPENCL_LDFLAGS = +HWLOC_OPENCL_LIBS = +HWLOC_PCIACCESS_CFLAGS = +HWLOC_PCIACCESS_LIBS = +HWLOC_PLUGINS_DIR = $(libdir)/hwloc +HWLOC_PLUGINS_PATH = $(libdir)/hwloc +HWLOC_RELEASE_DATE = Unreleased developer copy +HWLOC_REQUIRES = libxml-2.0 +HWLOC_VERSION = 2.0.3rc2-git +HWLOC_X11_CPPFLAGS = +HWLOC_X11_LIBS = +HWLOC_top_builddir = /home/brian/daos/rpm/mpich/src/hwloc +HWLOC_top_srcdir = /home/brian/daos/rpm/mpich/src/hwloc +INCLUDE_MPICXX_H = #include "mpicxx.h" +INSTALL = /bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTEGER_KIND = 4 +INTERLIB_DEPS = yes +KILLALL = killall +LD = /bin/ld -m elf_x86_64 +LDFLAGS = +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LPMPILIBNAME = +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAINT = +MAKE = make +MAKEINFO = ${SHELL} /home/brian/daos/rpm/mpich/confdb/missing makeinfo +MANIFEST_TOOL = : +MKDIR_P = mkdir -p +MPIBASEMODNAME = mpi_base +MPICC_NAME = mpicc +MPICHLIB_CFLAGS = +MPICHLIB_CPPFLAGS = +MPICHLIB_CXXFLAGS = +MPICHLIB_FCFLAGS = +MPICHLIB_FFLAGS = +MPICH_CUSTOM_STRING = +MPICH_MPICC_CFLAGS = +MPICH_MPICC_CPPFLAGS = +MPICH_MPICC_LDFLAGS = +MPICH_MPICC_LIBS = +MPICH_MPICXX_CPPFLAGS = +MPICH_MPICXX_CXXFLAGS = +MPICH_MPICXX_LDFLAGS = +MPICH_MPICXX_LIBS = +MPICH_MPIF77_CPPFLAGS = +MPICH_MPIF77_FFLAGS = +MPICH_MPIF77_LDFLAGS = +MPICH_MPIF77_LIBS = +MPICH_MPIFORT_CPPFLAGS = +MPICH_MPIFORT_FCFLAGS = +MPICH_MPIFORT_LDFLAGS = +MPICH_MPIFORT_LIBS = +MPICH_NUMVERSION = 30300300 +MPICH_RELEASE_DATE = unreleased development copy +MPICH_VERSION = 3.3 +MPICONSTMODNAME = mpi_constants +MPICPP_NAME = mpic++ +MPICXXLIBNAME = mpicxx +MPICXX_NAME = mpicxx +MPIF77_NAME = mpif77 +MPIF90_NAME = mpif90 +MPIFCLIBNAME = mpifort +MPIFORT_NAME = mpifort +MPIFPMPI = ,PMPI_WTIME,PMPI_WTICK +MPILIBNAME = mpi +MPIMODNAME = mpi +MPIR_CXX_BOOL = 0x4c000133 +MPIR_CXX_COMPLEX = 0x4c000834 +MPIR_CXX_DOUBLE_COMPLEX = 0x4c001035 +MPIR_CXX_LONG_DOUBLE_COMPLEX = 0x4c002036 +MPISIZEOFMODNAME = mpi_sizeofs +MPIU_DLL_SPEC_DEF = #define MPIU_DLL_SPEC +MPIX_C_FLOAT16 = 0x4c000246 +MPI_2COMPLEX = 1275072548 +MPI_2DOUBLE_COMPLEX = 1275076645 +MPI_2DOUBLE_PRECISION = 1275072547 +MPI_2INT = 0x4c000816 +MPI_2INTEGER = 1275070496 +MPI_2REAL = 1275070497 +MPI_AINT = long +MPI_AINT_DATATYPE = 0x4c000843 +MPI_AINT_FMT_DEC_SPEC = %ld +MPI_AINT_FMT_HEX_SPEC = %lx +MPI_BYTE = 0x4c00010d +MPI_CHAR = 0x4c000101 +MPI_CHARACTER = 1275068698 +MPI_COMPLEX = 1275070494 +MPI_COMPLEX16 = 0x4c00102a +MPI_COMPLEX32 = 0x4c00202c +MPI_COMPLEX8 = 0x4c000828 +MPI_COUNT = long long +MPI_COUNT_DATATYPE = 0x4c000845 +MPI_C_BOOL = 0x4c00013f +MPI_C_DOUBLE_COMPLEX = 0x4c001041 +MPI_C_FLOAT_COMPLEX = 0x4c000840 +MPI_C_INTERFACE_CDESC_NAME = mpi_c_interface_cdesc +MPI_C_INTERFACE_GLUE_NAME = mpi_c_interface_glue +MPI_C_INTERFACE_NAME = mpi_c_interface +MPI_C_INTERFACE_NOBUF_NAME = mpi_c_interface_nobuf +MPI_C_INTERFACE_TYPES_NAME = mpi_c_interface_types +MPI_C_LONG_DOUBLE_COMPLEX = 0x4c002042 +MPI_DOUBLE = 0x4c00080b +MPI_DOUBLE_COMPLEX = 1275072546 +MPI_DOUBLE_INT = 0x8c000001 +MPI_DOUBLE_PRECISION = 1275070495 +MPI_F08_CALLBACKS_NAME = mpi_f08_callbacks +MPI_F08_COMPILE_CONSTANTS_NAME = mpi_f08_compile_constants +MPI_F08_LINK_CONSTANTS_NAME = mpi_f08_link_constants +MPI_F08_NAME = mpi_f08 +MPI_F08_TYPES_NAME = mpi_f08_types +MPI_F77_2INT = 1275070486 +MPI_F77_AINT = 1275070531 +MPI_F77_BYTE = 1275068685 +MPI_F77_CHAR = 1275068673 +MPI_F77_COUNT = 1275070533 +MPI_F77_CXX_BOOL = 1275068723 +MPI_F77_CXX_DOUBLE_COMPLEX = 1275072565 +MPI_F77_CXX_FLOAT_COMPLEX = 1275070516 +MPI_F77_CXX_LONG_DOUBLE_COMPLEX = 1275076662 +MPI_F77_C_BOOL = 1275068735 +MPI_F77_C_COMPLEX = 1275070528 +MPI_F77_C_DOUBLE_COMPLEX = 1275072577 +MPI_F77_C_FLOAT_COMPLEX = 1275070528 +MPI_F77_C_LONG_DOUBLE_COMPLEX = 1275076674 +MPI_F77_DOUBLE = 1275070475 +MPI_F77_DOUBLE_INT = -1946157055 +MPI_F77_FLOAT = 1275069450 +MPI_F77_FLOAT_INT = -1946157056 +MPI_F77_INT = 1275069445 +MPI_F77_INT16_T = 1275068984 +MPI_F77_INT32_T = 1275069497 +MPI_F77_INT64_T = 1275070522 +MPI_F77_INT8_T = 1275068727 +MPI_F77_LB = 1275068432 +MPI_F77_LONG = 1275070471 +MPI_F77_LONG_DOUBLE = 1275072524 +MPI_F77_LONG_DOUBLE_INT = -1946157052 +MPI_F77_LONG_INT = -1946157054 +MPI_F77_LONG_LONG = 1275070473 +MPI_F77_LONG_LONG_INT = 1275070473 +MPI_F77_OFFSET = 1275070532 +MPI_F77_PACKED = 1275068687 +MPI_F77_SHORT = 1275068931 +MPI_F77_SHORT_INT = -1946157053 +MPI_F77_SIGNED_CHAR = 1275068696 +MPI_F77_UB = 1275068433 +MPI_F77_UINT16_T = 1275068988 +MPI_F77_UINT32_T = 1275069501 +MPI_F77_UINT64_T = 1275070526 +MPI_F77_UINT8_T = 1275068731 +MPI_F77_UNSIGNED = 1275069446 +MPI_F77_UNSIGNED_CHAR = 1275068674 +MPI_F77_UNSIGNED_LONG = 1275070472 +MPI_F77_UNSIGNED_LONG_LONG = 1275070489 +MPI_F77_UNSIGNED_SHORT = 1275068932 +MPI_F77_WCHAR = 1275069454 +MPI_FINT = int +MPI_FLOAT = 0x4c00040a +MPI_FLOAT_INT = 0x8c000000 +MPI_INT = 0x4c000405 +MPI_INT16_T = 0x4c000238 +MPI_INT32_T = 0x4c000439 +MPI_INT64_T = 0x4c00083a +MPI_INT8_T = 0x4c000137 +MPI_INTEGER = 1275069467 +MPI_INTEGER1 = 0x4c00012d +MPI_INTEGER16 = MPI_DATATYPE_NULL +MPI_INTEGER2 = 0x4c00022f +MPI_INTEGER4 = 0x4c000430 +MPI_INTEGER8 = 0x4c000831 +MPI_LB = 0x4c000010 +MPI_LOGICAL = 1275069469 +MPI_LONG = 0x4c000807 +MPI_LONG_DOUBLE = 0x4c00100c +MPI_LONG_DOUBLE_INT = 0x8c000004 +MPI_LONG_INT = 0x8c000002 +MPI_LONG_LONG = 0x4c000809 +MPI_MAX_ERROR_STRING = 512 +MPI_MAX_LIBRARY_VERSION_STRING = 8192 +MPI_MAX_PROCESSOR_NAME = 128 +MPI_OFFSET = long long +MPI_OFFSET_DATATYPE = 0x4c000844 +MPI_OFFSET_TYPEDEF = typedef long long MPI_Offset; +MPI_PACKED = 0x4c00010f +MPI_REAL = 1275069468 +MPI_REAL16 = 0x4c00102b +MPI_REAL4 = 0x4c000427 +MPI_REAL8 = 0x4c000829 +MPI_SHORT = 0x4c000203 +MPI_SHORT_INT = 0x8c000003 +MPI_SIGNED_CHAR = 0x4c000118 +MPI_STATUS_SIZE = 5 +MPI_UB = 0x4c000011 +MPI_UINT16_T = 0x4c00023c +MPI_UINT32_T = 0x4c00043d +MPI_UINT64_T = 0x4c00083e +MPI_UINT8_T = 0x4c00013b +MPI_UNSIGNED_CHAR = 0x4c000102 +MPI_UNSIGNED_INT = 0x4c000406 +MPI_UNSIGNED_LONG = 0x4c000808 +MPI_UNSIGNED_LONG_LONG = 0x4c000819 +MPI_UNSIGNED_SHORT = 0x4c000204 +MPI_WCHAR = 0x4c00040e +MPLLIBNAME = mpl +NM = /bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OFFSET_KIND = 8 +OPALIBNAME = opa +OTOOL = +OTOOL64 = +PACKAGE = mpich +PACKAGE_BUGREPORT = discuss@mpich.org +PACKAGE_NAME = MPICH +PACKAGE_STRING = MPICH 3.3 +PACKAGE_TARNAME = mpich +PACKAGE_URL = http://www.mpich.org/ +PACKAGE_VERSION = 3.3 +PAPI_INCLUDE = +PATH_SEPARATOR = : +PERL = /bin/perl +PKG_CONFIG = /bin/pkg-config +PMPILIBNAME = pmpi +PMPI_F08_NAME = pmpi_f08 +RANLIB = ranlib +REPLACE_CALLOC = 0 +REPLACE_CANONICALIZE_FILE_NAME = 0 +REPLACE_MALLOC = 0 +REPLACE_MBTOWC = 0 +REPLACE_MKSTEMP = 0 +REPLACE_PTSNAME = 0 +REPLACE_PTSNAME_R = 0 +REPLACE_PUTENV = 0 +REPLACE_QSORT_R = 0 +REPLACE_RANDOM_R = 0 +REPLACE_REALLOC = 0 +REPLACE_REALPATH = 0 +REPLACE_SETENV = 0 +REPLACE_STRTOD = 0 +REPLACE_UNSETENV = 0 +REPLACE_WCTOMB = 0 +REQD = +REQI1 = +REQI2 = +REQI8 = +RSH = +SED = /bin/sed +SET_CFLAGS = CFLAGS= +SET_MAKE = MAKE=make +SHELL = /bin/sh +SHLIB_EXT = .so +SIZEOF_FC_CHARACTER = 1 +SIZEOF_FC_DOUBLE_PRECISION = 8 +SIZEOF_FC_INTEGER = 4 +SIZEOF_FC_REAL = 4 +SIZEOF_MPI_STATUS = 20 +SSH = +STRIP = strip +USER_CFLAGS = +USER_CPPFLAGS = +USER_CXXFLAGS = +USER_EXTRA_LIBS = +USER_FCFLAGS = +USER_FFLAGS = +USER_LDFLAGS = +USER_LIBS = +VERSION = 3.3 +VISIBILITY_CFLAGS = -fvisibility=hidden +WRAPPER_CFLAGS = +WRAPPER_CPPFLAGS = +WRAPPER_CXXFLAGS = +WRAPPER_C_DYNAMIC_LOADING_FLAGS = -Wl,-rpath -Wl,${exec_prefix}/lib -Wl,--enable-new-dtags +WRAPPER_EXTRA_LIBS = +WRAPPER_FCFLAGS = +WRAPPER_FFLAGS = +WRAPPER_LDFLAGS = +WRAPPER_LIBS = -lm -ludev -lxml2 -lpthread -lrt +WTIME_DOUBLE_TYPE = REAL*8 +XARGS_NODATA_OPT = -r +XMKMF = +X_CFLAGS = +X_EXTRA_LIBS = +X_LIBS = +X_PRE_LIBS = +ZMLIBNAME = zm +abs_builddir = /home/brian/daos/rpm/mpich +abs_srcdir = /home/brian/daos/rpm/mpich +abs_top_builddir = /home/brian/daos/rpm/mpich +abs_top_srcdir = /home/brian/daos/rpm/mpich +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +ac_ct_F77 = +ac_ct_FC = gfortran +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindings = f77 f90 cxx +bindir = ${exec_prefix}/bin +build = x86_64-pc-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = pc +builddir = . +ch4_netmods = +ch4_nets_array = +ch4_nets_array_sz = +ch4_nets_func_array = +ch4_nets_func_decl = +ch4_nets_native_func_array = +ch4_nets_native_func_decl = +ch4_nets_strings = +ch4_posix_eager_array = MPIDI_POSIX_FBOX +ch4_posix_eager_array_sz = 1 +ch4_posix_eager_func_array = &MPIDI_POSIX_eager_fbox_funcs +ch4_posix_eager_func_decl = MPIDI_POSIX_eager_fbox_funcs +ch4_posix_eager_modules = fbox +ch4_posix_eager_pre_include = #include "../fbox/fbox_pre.h" +ch4_posix_eager_recv_transaction_decl = MPIDI_POSIX_eager_fbox_recv_transaction_t fbox; +ch4_posix_eager_strings = "fbox" +channel_name = nemesis +datadir = ${datarootdir} +datarootdir = ${prefix}/share +device_name = ch3 +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-pc-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +hwloclib = $(HWLOC_top_builddir)/hwloc/libhwloc_embedded.la +hwloclibdir = +hwlocsrcdir = src/hwloc +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/brian/daos/rpm/mpich/confdb/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +libmpi_so_version = 13:6:1 +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +master_top_builddir = /home/brian/daos/rpm/mpich +master_top_srcdir = /home/brian/daos/rpm/mpich +mkdir_p = $(MKDIR_P) +mmx_copy_s = +modincdir = ${prefix}/include +mpllib = src/mpl/libmpl.la +mpllibdir = +mplsrcdir = src/mpl +nemesis_nets_array = MPIDI_NEM_TCP +nemesis_nets_array_sz = 1 +nemesis_nets_dirs = tcp +nemesis_nets_func_array = &MPIDI_nem_tcp_funcs +nemesis_nets_func_decl = MPIDI_nem_tcp_funcs +nemesis_nets_macro_defs = #define MPIDI_NEM_TCP 0 +nemesis_nets_strings = "tcp" +nemesis_networks = tcp +netloclibdir = +ofi_embedded = +ofilib = +ofisrcdir = +oldincludedir = /usr/include +opalib = src/openpa/src/libopa.la +opalibdir = +opasrcdir = src/openpa +pdfdir = ${docdir} + +# used by nodist_pkgconfig_DATA +pkgconfigdir = ${exec_prefix}/lib/pkgconfig +pm_name = hydra +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +subdirs = test/mpi +sysconfdir = ${prefix}/etc +target = x86_64-pc-linux-gnu +target_alias = +target_cpu = x86_64 +target_os = linux-gnu +target_vendor = pc +top_build_prefix = +top_builddir = . +top_srcdir = . +ucxdir = +ucxlib = +with_libfabric = +with_wrapper_dl_type = runpath +zmlib = +zmlibdir = +zmsrcdir = +ACLOCAL_AMFLAGS = -I confdb -I src/hwloc/config + +# automake requires that we initialize variables to something, even just empty, +# before appending to them with "+=" +AM_CFLAGS = -fvisibility=hidden -I/usr/include/libxml2 + +# build collectives transport + +# build collectives algorithms + +# several headers are included by the rest of MPICH + +# for datatype.h, which is included by some other dirs + +# for namepub.h, which is included by some other dirs + +### -*- Mode: Makefile; -*- +### vim: set ft=automake : +### +### (C) 2015 by Argonne National Laboratory. +### See COPYRIGHT in top-level directory. +### +AM_CPPFLAGS = -I$(HWLOC_top_builddir)/include -I$(HWLOC_top_srcdir)/include -I$(top_srcdir)/src/include \ + -I$(top_srcdir)/src/mpi/coll/allreduce_group/ \ + -I$(top_srcdir)/src/mpi/coll/transports/gentran \ + -I$(top_srcdir)/src/mpi/coll/transports/stubtran \ + -I$(top_srcdir)/src/mpi/coll/transports/common \ + -I$(top_srcdir)/src/mpi/coll/algorithms/treealgo \ + -I$(top_srcdir)/src/mpi/coll/algorithms/recexchalgo \ + -I$(top_srcdir)/src/mpi/coll/algorithms/stubalgo \ + -I$(top_srcdir)/src/mpi/coll/algorithms/common \ + -I$(top_srcdir)/src/mpi/coll/include/ \ + -I$(top_srcdir)/src/mpi/datatype/typerep/dataloop \ + -I$(top_srcdir)/src/mpi/datatype -I$(top_srcdir)/src/mpi/spawn \ + -I$(top_srcdir)/src/util/mem -I$(top_srcdir)/src/util/nodemap \ + -I$(top_srcdir)/src/util/wrappers \ + -I$(top_builddir)/src/util/wrappers $(am__append_18) \ + $(am__append_22) $(am__append_29) $(am__append_43) \ + -I$(top_srcdir)/src/mpid/include $(am__append_48) \ + $(am__append_53) $(am__append_55) $(am__append_68) \ + $(am__append_69) $(am__append_86) $(am__append_92) \ + $(am__append_98) $(am__append_105) $(am__append_107) \ + -I$(top_srcdir)/src/mpid/common/timers $(am__append_112) \ + $(am__append_114) $(am__append_132) $(am__append_135) +AM_FFLAGS = +AM_FCFLAGS = $(am__append_26) $(am__append_37) +include_HEADERS = + +# nodist_ b/c these are created by config.status and should not be distributed +nodist_include_HEADERS = $(am__append_17) $(am__append_25) \ + src/include/mpi.h +nodist_noinst_HEADERS = $(am__append_31) src/include/mpichinfo.h \ + src/include/mpichconf.h +BUILT_SOURCES = $(am__append_5) $(am__append_13) $(am__append_16) \ + $(am__append_40) src/include/mpir_ext.h +bin_SCRIPTS = src/env/mpicc src/env/parkill $(am__append_45) \ + $(am__append_46) $(am__append_47) +dist_noinst_SCRIPTS = autogen.sh maint/configure.ac \ + maint/checkbuilds.in maint/checkmake maint/clmake.in \ + maint/createcoverage.in maint/decode_handle \ + maint/extracterrmsgs maint/extractfixme.in \ + maint/extractstates.in maint/extractstrings.in \ + maint/findunusederrtxt maint/gcovmerge.in maint/getcoverage.in \ + maint/gen_subcfg_m4 maint/extractcvars maint/genstates.in \ + maint/getcoverage.in maint/local_perl/lib/YAML/Tiny.pm \ + maint/parse.sub maint/parsetest maint/release.pl \ + maint/samplebuilds maint/testbuild maint/testpmpi +noinst_DATA = + +# FIXME DUPLICATION: this list of files can be (mostly harmlessly) different +# than the list in maint/errmsgdirs because this list will be assembled +# conditionally based on configure tests and AM_CONDITIONAL usage +dist_noinst_DATA = maint/Version maint/Version.base.m4 maint/docnotes \ + maint/errmsgdirs maint/cvardirs maint/gccimpgen.cpp \ + maint/local_perl/README maint/local_perl/YAML-Tiny-1.41.tar.gz \ + maint/mpi1.lst maint/setup.jpg maint/structalign.c \ + maint/version.m4 $(errnames_txt_files) \ + src/mpi/errhan/baseerrnames.txt +noinst_HEADERS = src/mpi/attr/attr.h src/mpi/coll/bcast/bcast.h \ + src/mpi/coll/iallgatherv/iallgatherv.h \ + src/mpi/coll/ibcast/ibcast.h \ + src/mpi/coll/allreduce_group/allreduce_group.h \ + src/mpi/coll/transports/gentran/gentran_impl.h \ + src/mpi/coll/transports/gentran/gentran_utils.h \ + src/mpi/coll/transports/gentran/tsp_gentran.h \ + src/mpi/coll/transports/gentran/tsp_gentran_types.h \ + src/mpi/coll/transports/stubtran/stubtran_impl.h \ + src/mpi/coll/transports/stubtran/tsp_stubtran.h \ + src/mpi/coll/transports/stubtran/tsp_stubtran_types.h \ + src/mpi/coll/transports/common/tsp_undef.h \ + src/mpi/coll/algorithms/treealgo/treealgo.h \ + src/mpi/coll/algorithms/treealgo/treealgo_types.h \ + src/mpi/coll/algorithms/treealgo/treeutil.h \ + src/mpi/coll/algorithms/recexchalgo/recexchalgo.h \ + src/mpi/coll/algorithms/stubalgo/stubalgo.h \ + src/mpi/coll/algorithms/stubalgo/stubalgo_types.h \ + src/mpi/coll/include/coll_impl.h src/mpi/comm/mpicomm.h \ + src/mpi/datatype/typerep/dataloop/typesize_support.h \ + src/mpi/datatype/typerep/dataloop/dataloop_internal.h \ + src/mpi/datatype/datatype.h src/mpi/datatype/veccpy.h \ + $(am__append_1) src/mpi/errhan/defmsg.h \ + src/mpi/errhan/errcodes.h \ + $(top_srcdir)/src/mpi/errhan/defmsg.h src/mpi/group/group.h \ + src/mpi/init/mpi_init.h src/mpi/pt2pt/bsendutil.h \ + src/mpi/spawn/namepub.h src/util/nodemap/build_nodemap.h \ + src/util/wrappers/mpiu_sock_wrappers.h \ + src/util/wrappers/mpiu_util_wrappers.h $(am__append_23) \ + $(am__append_30) $(am__append_44) src/include/bsocket.h \ + src/include/mpir_refcount.h src/include/mpir_refcount_global.h \ + src/include/mpir_refcount_pobj.h \ + src/include/mpir_refcount_single.h src/include/mpir_refcount.h \ + src/include/mpir_assert.h src/include/mpir_misc_post.h \ + src/include/mpir_type_defs.h src/include/mpir_dbg.h \ + src/include/mpir_attr_generic.h src/include/mpir_attr.h \ + src/include/mpii_f77interface.h \ + src/include/mpii_cxxinterface.h src/include/mpii_fortlogical.h \ + src/include/mpiallstates.h src/include/mpii_bsend.h \ + src/include/mpir_cvars.h src/include/mpichconfconst.h \ + src/include/mpir_err.h src/include/mpir_ext.h \ + src/include/mpir_func.h src/include/mpir_coll.h \ + src/include/mpir_comm.h src/include/mpir_debugger.h \ + src/include/mpir_request.h src/include/mpir_status.h \ + src/include/mpir_contextid.h src/include/mpir_objects.h \ + src/include/mpir_pointers.h src/include/mpir_topo.h \ + src/include/mpir_group.h src/include/mpir_errhandler.h \ + src/include/mpir_info.h src/include/mpiimpl.h \ + src/include/mpir_mem.h src/include/mpir_thread.h \ + src/include/mpir_nbc.h src/include/mpir_op.h \ + src/include/mpir_process.h src/include/mpir_misc.h \ + src/include/mpir_tags.h src/include/mpir_datatype.h \ + src/include/mpir_win.h src/include/mpir_pt2pt.h \ + src/include/nopackage.h src/include/rlog.h \ + src/include/rlog_macros.h src/include/mpir_op_util.h \ + src/mpid/include/mpidu_pre.h $(am__append_49) $(am__append_54) \ + $(am__append_56) $(am__append_59) $(am__append_64) \ + $(am__append_67) $(am__append_70) $(am__append_75) \ + $(am__append_80) $(am__append_87) $(am__append_89) \ + $(am__append_93) $(am__append_95) $(am__append_96) \ + $(am__append_99) $(am__append_100) $(am__append_102) \ + $(am__append_106) $(am__append_108) $(am__append_110) \ + src/mpid/common/timers/mpid_timers_fallback.h \ + $(am__append_113) $(am__append_115) $(am__append_131) \ + $(am__append_134) +noinst_LIBRARIES = +noinst_LTLIBRARIES = $(am__append_2) $(am__append_119) +sysconf_DATA = +nodist_pkgconfig_DATA = src/packaging/pkgconfig/mpich.pc +CLEANFILES = $(am__append_34) $(am__append_41) + +# created by confdb/aclocal_cache.m4 +DISTCLEANFILES = $(am__append_14) $(am__append_24) \ + $(top_builddir)/src/env/cc_shlib.conf \ + $(top_builddir)/src/env/cxx_shlib.conf \ + $(top_builddir)/src/env/f77_shlib.conf \ + $(top_builddir)/src/env/fc_shlib.conf \ + $(top_builddir)/src/env/mpicc $(top_builddir)/src/env/mpicxx \ + $(top_builddir)/src/env/mpif77 $(top_builddir)/src/env/mpifort \ + config.system +MAINTAINERCLEANFILES = $(am__append_6) $(am__append_36) + +# -------------------------------------------------------------------------- +# documentation rules +# -------------------------------------------------------------------------- + +# Tell make (via the automake SUFFIXES var) that our phony suffixes exist and +# should be considered when dissecting suffix-based implicit rules. These phony +# suffix files should NOT be added to a .PHONY target, otherwise make will not +# use the implicit rules to attempt to build them. + +# sometimes helpful when debugging macros to see the preprocessed output. +# Also using '-CC' because comments provide useful landmarks +SUFFIXES = .man-phony .html-phony .man1-phony .html1-phony .man3-phony \ + .html3-phony .txt .i + +# ensure that the buildiface script ends up in the release tarball + +# ensure that the buildiface script ends up in the release tarball + +# ensure that the buildiface script ends up in the release tarball + +# additional perl files that are "require"d by use_mpi/buildiface and +# mpif_h/buildiface, respectively + +# ensure that the buildiface script ends up in the release tarball + +# README.vin is tricky, we don't actually distribute it when we use release.pl, +# but we do need to distribute it in order for ./autogen.sh to work +# correctly on a distribution tarball. For now we distribute it when we "make +# dist". +EXTRA_DIST = src/binding/cxx/buildiface \ + src/binding/fortran/mpif_h/buildiface \ + src/binding/fortran/use_mpi/buildiface \ + src/binding/fortran/use_mpi/binding.sub \ + src/binding/fortran/use_mpi/cf90tdefs \ + src/binding/fortran/use_mpi_f08/buildiface $(am__append_42) \ + $(wrapper_doc_src) README CHANGES COPYRIGHT README.envvar \ + README.vin +DOC_SUBDIRS = doc/mansrc doc/userguide doc/installguide doc/logging \ + doc/design +MANDOC_SUBDIRS = $(am__append_9) $(am__append_126) $(am__append_129) +HTMLDOC_SUBDIRS = $(am__append_10) + +# install-man does not have a special "-local" target for some reason + +# install-pdf will not be run by default in a "make install" unless we do this +INSTALL_DATA_LOCAL_TARGETS = install-man-local install-html-local \ + install-pdf-local +doc1_src_txt = $(wrapper_doc_src) +doc3_src_txt = doc/mansrc/mpiconsts.txt + +# add (+=) target names to this variable to add them to the dependencies of the +# 'clean-local' target +CLEAN_LOCAL_TARGETS = test-clean $(am__append_142) + +# contains all of the "errnames.txt" files that are used by maint/extracterrmsgs +# to build src/mpi/errhan/defmsg.h +errnames_txt_files = src/mpi/errhan/errnames.txt \ + src/mpid/ch3/errnames.txt $(am__append_51) $(am__append_62) \ + $(am__append_65) $(am__append_77) $(am__append_82) \ + src/pmi/errnames.txt +external_subdirs = src/mpl src/openpa src/hwloc \ + $(am__append_78) $(am__append_83) +external_ldflags = +external_libs = -lm -ludev -lxml2 -lpthread -lrt +mpi_convenience_libs = $(am__append_11) +pmpi_convenience_libs = src/openpa/src/libopa.la src/mpl/libmpl.la $(HWLOC_top_builddir)/hwloc/libhwloc_embedded.la \ + $(am__append_3) $(am__append_12) $(am__append_79) \ + $(am__append_84) + +# NOTE on our semi-unconventional usage of DIST_SUBDIRS: +# The automake manual recommends thinking of DIST_SUBDIRS as the list of all +# *configured* subdirectories. The normal autotools model involves +# unconditional configure steps for all/most directories with conditional make +# steps (i.e., conditional inclusion in SUBDIRS). But in the MPICH case we +# almost always configure exactly the directories that will be included in +# SUBDIRS. So most additions to DIST_SUBDIRS should be conditional on the same +# condition as the corresponding SUBDIRS addition. +DIST_SUBDIRS = ${external_subdirs} $(am__append_8) $(am__append_125) \ + $(am__append_128) . examples test + +# build the current directory and then the examples directory after everything else +SUBDIRS = ${external_subdirs} $(am__append_7) $(am__append_124) \ + $(am__append_127) . examples +# link with libtool+CCLD +#lib_libmpi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +# $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ +# $(lib_libmpi_la_CFLAGS) $(CFLAGS) \ +# $(lib_libmpi_la_LDFLAGS) $(LDFLAGS) -o $@ + + +# link with libtool+F77LD +lib_libmpi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(F77LD) \ + $(AM_FFLAGS) $(FFLAGS) $(lib_libmpi_la_LDFLAGS) \ + $(LDFLAGS) -o $@ + +#lib_libpmpi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +# $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ +# $(lib_libpmpi_la_CFLAGS) $(CFLAGS) \ +# $(lib_libpmpi_la_LDFLAGS) $(LDFLAGS) -o $@ + +lib_libpmpi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(F77LD) \ + $(AM_FFLAGS) $(FFLAGS) $(lib_libpmpi_la_LDFLAGS) \ + $(LDFLAGS) -o $@ + +#lib_libmpifort_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 \ +# $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(F77LD) \ +# $(AM_FFLAGS) $(FFLAGS) $(lib_libmpifort_la_LDFLAGS) \ +# $(LDFLAGS) -o $@ + +lib_libmpifort_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(FCLD) \ + $(AM_FCFLAGS) $(FCFLAGS) $(lib_libmpifort_la_LDFLAGS) \ + $(LDFLAGS) -o $@ + + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources +mpi_sources = src/mpi/attr/attr_delete.c src/mpi/attr/attr_get.c \ + src/mpi/attr/attr_put.c src/mpi/attr/comm_create_keyval.c \ + src/mpi/attr/comm_delete_attr.c \ + src/mpi/attr/comm_free_keyval.c src/mpi/attr/comm_get_attr.c \ + src/mpi/attr/comm_set_attr.c src/mpi/attr/keyval_create.c \ + src/mpi/attr/keyval_free.c src/mpi/attr/type_create_keyval.c \ + src/mpi/attr/type_delete_attr.c \ + src/mpi/attr/type_free_keyval.c src/mpi/attr/type_get_attr.c \ + src/mpi/attr/type_set_attr.c src/mpi/attr/win_create_keyval.c \ + src/mpi/attr/win_delete_attr.c src/mpi/attr/win_free_keyval.c \ + src/mpi/attr/win_get_attr.c src/mpi/attr/win_set_attr.c \ + src/mpi/coll/allgather/allgather.c \ + src/mpi/coll/allgatherv/allgatherv.c \ + src/mpi/coll/allreduce/allreduce.c \ + src/mpi/coll/alltoall/alltoall.c \ + src/mpi/coll/alltoallv/alltoallv.c \ + src/mpi/coll/alltoallw/alltoallw.c \ + src/mpi/coll/barrier/barrier.c src/mpi/coll/bcast/bcast.c \ + src/mpi/coll/exscan/exscan.c src/mpi/coll/gather/gather.c \ + src/mpi/coll/gatherv/gatherv.c \ + src/mpi/coll/reduce_scatter/reduce_scatter.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c \ + src/mpi/coll/reduce/reduce.c src/mpi/coll/scan/scan.c \ + src/mpi/coll/scatter/scatter.c \ + src/mpi/coll/scatterv/scatterv.c \ + src/mpi/coll/neighbor_allgather/neighbor_allgather.c \ + src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c \ + src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c \ + src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c \ + src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c \ + src/mpi/coll/iallgather/iallgather.c \ + src/mpi/coll/iallgatherv/iallgatherv.c \ + src/mpi/coll/iallreduce/iallreduce.c \ + src/mpi/coll/ialltoall/ialltoall.c \ + src/mpi/coll/ialltoallv/ialltoallv.c \ + src/mpi/coll/ialltoallw/ialltoallw.c \ + src/mpi/coll/ibarrier/ibarrier.c src/mpi/coll/ibcast/ibcast.c \ + src/mpi/coll/iexscan/iexscan.c src/mpi/coll/igather/igather.c \ + src/mpi/coll/igatherv/igatherv.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c \ + src/mpi/coll/ireduce/ireduce.c src/mpi/coll/iscan/iscan.c \ + src/mpi/coll/iscatter/iscatter.c \ + src/mpi/coll/iscatterv/iscatterv.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c \ + src/mpi/coll/op/op_create.c src/mpi/coll/op/op_free.c \ + src/mpi/coll/op/op_commutative.c \ + src/mpi/coll/reduce_local/reduce_local.c \ + src/mpi/comm/comm_compare.c src/mpi/comm/comm_create.c \ + src/mpi/comm/comm_create_group.c src/mpi/comm/comm_dup.c \ + src/mpi/comm/comm_dup_with_info.c src/mpi/comm/comm_free.c \ + src/mpi/comm/comm_get_name.c src/mpi/comm/comm_get_info.c \ + src/mpi/comm/comm_set_info.c src/mpi/comm/comm_group.c \ + src/mpi/comm/comm_idup.c src/mpi/comm/comm_rank.c \ + src/mpi/comm/comm_size.c src/mpi/comm/comm_remote_group.c \ + src/mpi/comm/comm_remote_size.c src/mpi/comm/comm_set_name.c \ + src/mpi/comm/comm_split.c src/mpi/comm/comm_test_inter.c \ + src/mpi/comm/intercomm_create.c src/mpi/comm/intercomm_merge.c \ + src/mpi/comm/comm_split_type.c src/mpi/comm/comm_failure_ack.c \ + src/mpi/comm/comm_failure_get_acked.c \ + src/mpi/comm/comm_revoke.c src/mpi/comm/comm_shrink.c \ + src/mpi/comm/comm_agree.c src/mpi/datatype/address.c \ + src/mpi/datatype/get_address.c src/mpi/datatype/get_count.c \ + src/mpi/datatype/get_elements.c \ + src/mpi/datatype/get_elements_x.c src/mpi/datatype/pack.c \ + src/mpi/datatype/pack_external.c \ + src/mpi/datatype/pack_external_size.c \ + src/mpi/datatype/pack_size.c \ + src/mpi/datatype/status_set_elements.c \ + src/mpi/datatype/status_set_elements_x.c \ + src/mpi/datatype/type_get_name.c \ + src/mpi/datatype/type_set_name.c src/mpi/datatype/type_size.c \ + src/mpi/datatype/type_size_x.c src/mpi/datatype/type_extent.c \ + src/mpi/datatype/type_vector.c src/mpi/datatype/type_commit.c \ + src/mpi/datatype/type_indexed.c \ + src/mpi/datatype/type_hindexed.c \ + src/mpi/datatype/type_struct.c \ + src/mpi/datatype/type_contiguous.c \ + src/mpi/datatype/type_free.c src/mpi/datatype/type_hvector.c \ + src/mpi/datatype/type_dup.c \ + src/mpi/datatype/type_get_envelope.c \ + src/mpi/datatype/type_get_contents.c \ + src/mpi/datatype/type_ub.c src/mpi/datatype/type_lb.c \ + src/mpi/datatype/type_get_extent.c \ + src/mpi/datatype/type_get_extent_x.c \ + src/mpi/datatype/type_get_true_extent.c \ + src/mpi/datatype/type_get_true_extent_x.c \ + src/mpi/datatype/type_match_size.c \ + src/mpi/datatype/type_create_struct.c \ + src/mpi/datatype/type_create_hindexed.c \ + src/mpi/datatype/type_create_hvector.c \ + src/mpi/datatype/type_create_indexed_block.c \ + src/mpi/datatype/type_create_hindexed_block.c \ + src/mpi/datatype/type_create_resized.c \ + src/mpi/datatype/type_create_darray.c \ + src/mpi/datatype/type_create_subarray.c \ + src/mpi/datatype/unpack.c src/mpi/datatype/unpack_external.c \ + src/mpi/errhan/add_error_code.c \ + src/mpi/errhan/add_error_class.c \ + src/mpi/errhan/add_error_string.c \ + src/mpi/errhan/comm_call_errhandler.c \ + src/mpi/errhan/comm_create_errhandler.c \ + src/mpi/errhan/comm_get_errhandler.c \ + src/mpi/errhan/comm_set_errhandler.c \ + src/mpi/errhan/errhandler_create.c \ + src/mpi/errhan/errhandler_free.c \ + src/mpi/errhan/errhandler_get.c \ + src/mpi/errhan/errhandler_set.c src/mpi/errhan/error_class.c \ + src/mpi/errhan/error_string.c \ + src/mpi/errhan/file_create_errhandler.c \ + src/mpi/errhan/file_get_errhandler.c \ + src/mpi/errhan/file_set_errhandler.c \ + src/mpi/errhan/file_call_errhandler.c \ + src/mpi/errhan/win_create_errhandler.c \ + src/mpi/errhan/win_call_errhandler.c \ + src/mpi/errhan/win_get_errhandler.c \ + src/mpi/errhan/win_set_errhandler.c \ + src/mpi/group/group_compare.c src/mpi/group/group_difference.c \ + src/mpi/group/group_excl.c src/mpi/group/group_free.c \ + src/mpi/group/group_incl.c src/mpi/group/group_intersection.c \ + src/mpi/group/group_range_excl.c \ + src/mpi/group/group_range_incl.c src/mpi/group/group_rank.c \ + src/mpi/group/group_size.c \ + src/mpi/group/group_translate_ranks.c \ + src/mpi/group/group_union.c src/mpi/info/info_create.c \ + src/mpi/info/info_delete.c src/mpi/info/info_dup.c \ + src/mpi/info/info_free.c src/mpi/info/info_get.c \ + src/mpi/info/info_getn.c src/mpi/info/info_getnth.c \ + src/mpi/info/info_getvallen.c src/mpi/info/info_set.c \ + src/mpi/init/abort.c src/mpi/init/init.c \ + src/mpi/init/initialized.c src/mpi/init/initthread.c \ + src/mpi/init/ismain.c src/mpi/init/finalize.c \ + src/mpi/init/finalized.c src/mpi/init/querythread.c \ + src/mpi/misc/getpname.c src/mpi/misc/pcontrol.c \ + src/mpi/misc/version.c src/mpi/misc/library_version.c \ + src/mpi/misc/aint_add.c src/mpi/misc/aint_diff.c \ + src/mpi/misc/utils.c src/mpi/pt2pt/bsend.c \ + src/mpi/pt2pt/bsend_init.c src/mpi/pt2pt/bufattach.c \ + src/mpi/pt2pt/buffree.c src/mpi/pt2pt/ibsend.c \ + src/mpi/pt2pt/improbe.c src/mpi/pt2pt/imrecv.c \ + src/mpi/pt2pt/iprobe.c src/mpi/pt2pt/irecv.c \ + src/mpi/pt2pt/irsend.c src/mpi/pt2pt/isend.c \ + src/mpi/pt2pt/issend.c src/mpi/pt2pt/mprobe.c \ + src/mpi/pt2pt/mrecv.c src/mpi/pt2pt/probe.c \ + src/mpi/pt2pt/recv.c src/mpi/pt2pt/recv_init.c \ + src/mpi/pt2pt/rsend.c src/mpi/pt2pt/rsend_init.c \ + src/mpi/pt2pt/send.c src/mpi/pt2pt/send_init.c \ + src/mpi/pt2pt/sendrecv.c src/mpi/pt2pt/sendrecv_rep.c \ + src/mpi/pt2pt/ssend.c src/mpi/pt2pt/ssend_init.c \ + src/mpi/request/cancel.c src/mpi/request/greq_start.c \ + src/mpi/request/greq_complete.c src/mpi/request/request_free.c \ + src/mpi/request/request_get_status.c \ + src/mpi/request/status_set_cancelled.c src/mpi/request/start.c \ + src/mpi/request/startall.c src/mpi/request/test.c \ + src/mpi/request/test_cancelled.c src/mpi/request/testall.c \ + src/mpi/request/testany.c src/mpi/request/testsome.c \ + src/mpi/request/wait.c src/mpi/request/waitall.c \ + src/mpi/request/waitany.c src/mpi/request/waitsome.c \ + src/mpi/rma/accumulate.c src/mpi/rma/alloc_mem.c \ + src/mpi/rma/compare_and_swap.c src/mpi/rma/fetch_and_op.c \ + src/mpi/rma/free_mem.c src/mpi/rma/get.c \ + src/mpi/rma/get_accumulate.c src/mpi/rma/put.c \ + src/mpi/rma/raccumulate.c src/mpi/rma/rget.c \ + src/mpi/rma/rget_accumulate.c src/mpi/rma/rput.c \ + src/mpi/rma/win_allocate.c src/mpi/rma/win_allocate_shared.c \ + src/mpi/rma/win_attach.c src/mpi/rma/win_complete.c \ + src/mpi/rma/win_create.c src/mpi/rma/win_create_dynamic.c \ + src/mpi/rma/win_detach.c src/mpi/rma/win_fence.c \ + src/mpi/rma/win_flush.c src/mpi/rma/win_flush_all.c \ + src/mpi/rma/win_flush_local.c \ + src/mpi/rma/win_flush_local_all.c src/mpi/rma/win_free.c \ + src/mpi/rma/win_get_group.c src/mpi/rma/win_get_info.c \ + src/mpi/rma/win_get_name.c src/mpi/rma/win_lock.c \ + src/mpi/rma/win_lock_all.c src/mpi/rma/win_post.c \ + src/mpi/rma/win_set_info.c src/mpi/rma/win_set_name.c \ + src/mpi/rma/win_shared_query.c src/mpi/rma/win_start.c \ + src/mpi/rma/win_sync.c src/mpi/rma/win_test.c \ + src/mpi/rma/win_unlock.c src/mpi/rma/win_unlock_all.c \ + src/mpi/rma/win_wait.c src/mpi/spawn/comm_disconnect.c \ + src/mpi/spawn/comm_get_parent.c src/mpi/spawn/comm_join.c \ + src/mpi/spawn/comm_spawn.c src/mpi/spawn/comm_spawn_multiple.c \ + src/mpi/spawn/lookup_name.c src/mpi/spawn/publish_name.c \ + src/mpi/spawn/unpublish_name.c src/mpi/spawn/open_port.c \ + src/mpi/spawn/close_port.c src/mpi/spawn/comm_connect.c \ + src/mpi/spawn/comm_accept.c src/mpi/timer/wtime.c \ + src/mpi/timer/wtick.c src/mpi/topo/cart_coords.c \ + src/mpi/topo/cart_create.c src/mpi/topo/cart_get.c \ + src/mpi/topo/cart_map.c src/mpi/topo/cart_rank.c \ + src/mpi/topo/cart_shift.c src/mpi/topo/cart_sub.c \ + src/mpi/topo/dims_create.c src/mpi/topo/graph_get.c \ + src/mpi/topo/graph_map.c src/mpi/topo/graph_nbr.c \ + src/mpi/topo/graphcreate.c src/mpi/topo/graphdimsget.c \ + src/mpi/topo/graphnbrcnt.c src/mpi/topo/cartdim_get.c \ + src/mpi/topo/topo_test.c src/mpi/topo/dist_gr_create_adj.c \ + src/mpi/topo/dist_gr_create.c \ + src/mpi/topo/dist_gr_neighb_count.c \ + src/mpi/topo/dist_gr_neighb.c $(am__append_21) \ + $(am__append_27) src/glue/romio/all_romio_symbols.c \ + src/mpi_t/cat_changed.c src/mpi_t/cat_get_categories.c \ + src/mpi_t/cat_get_cvars.c src/mpi_t/cat_get_info.c \ + src/mpi_t/cat_get_num.c src/mpi_t/cat_get_pvars.c \ + src/mpi_t/cvar_get_info.c src/mpi_t/cvar_get_num.c \ + src/mpi_t/cvar_handle_alloc.c src/mpi_t/cvar_handle_free.c \ + src/mpi_t/cvar_read.c src/mpi_t/cvar_write.c \ + src/mpi_t/enum_get_info.c src/mpi_t/enum_get_item.c \ + src/mpi_t/mpit_finalize.c src/mpi_t/mpit_initthread.c \ + src/mpi_t/pvar_get_info.c src/mpi_t/pvar_get_num.c \ + src/mpi_t/pvar_handle_alloc.c src/mpi_t/pvar_handle_free.c \ + src/mpi_t/pvar_read.c src/mpi_t/pvar_readreset.c \ + src/mpi_t/pvar_reset.c src/mpi_t/pvar_session_create.c \ + src/mpi_t/pvar_session_free.c src/mpi_t/pvar_start.c \ + src/mpi_t/pvar_stop.c src/mpi_t/pvar_write.c \ + src/mpi_t/cat_get_index.c src/mpi_t/cvar_get_index.c \ + src/mpi_t/pvar_get_index.c +mpi_f77_sources = $(am__append_19) +mpi_fc_sources = $(am__append_33) $(am__append_38) +mpi_fc_modules = $(am__append_35) $(am__append_39) +mpi_cxx_sources = $(am__append_15) + +# mpi_sources includes only the routines that are MPI function entry points +# The code for the MPI operations (e.g., MPI_SUM) is not included in +# mpi_sources +mpi_core_sources = src/mpi/attr/attrutil.c src/mpi/attr/dup_fn.c \ + src/mpi/coll/allgather/allgather_allcomm_nb.c \ + src/mpi/coll/allgather/allgather_intra_recursive_doubling.c \ + src/mpi/coll/allgather/allgather_intra_brucks.c \ + src/mpi/coll/allgather/allgather_intra_ring.c \ + src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c \ + src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c \ + src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c \ + src/mpi/coll/allgatherv/allgatherv_intra_brucks.c \ + src/mpi/coll/allgatherv/allgatherv_intra_ring.c \ + src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c \ + src/mpi/coll/allreduce/allreduce_allcomm_nb.c \ + src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c \ + src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c \ + src/mpi/coll/allreduce/allreduce_intra_smp.c \ + src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c \ + src/mpi/coll/alltoall/alltoall_allcomm_nb.c \ + src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoall/alltoall_intra_brucks.c \ + src/mpi/coll/alltoall/alltoall_intra_scattered.c \ + src/mpi/coll/alltoall/alltoall_intra_pairwise.c \ + src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c \ + src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c \ + src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoallv/alltoallv_intra_scattered.c \ + src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c \ + src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c \ + src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c \ + src/mpi/coll/alltoallw/alltoallw_intra_scattered.c \ + src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c \ + src/mpi/coll/barrier/barrier_allcomm_nb.c \ + src/mpi/coll/barrier/barrier_intra_dissemination.c \ + src/mpi/coll/barrier/barrier_intra_smp.c \ + src/mpi/coll/barrier/barrier_inter_bcast.c \ + src/mpi/coll/bcast/bcast_utils.c \ + src/mpi/coll/bcast/bcast_allcomm_nb.c \ + src/mpi/coll/bcast/bcast_intra_binomial.c \ + src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c \ + src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c \ + src/mpi/coll/bcast/bcast_intra_smp.c \ + src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c \ + src/mpi/coll/exscan/exscan_allcomm_nb.c \ + src/mpi/coll/exscan/exscan_intra_recursive_doubling.c \ + src/mpi/coll/gather/gather_allcomm_nb.c \ + src/mpi/coll/gather/gather_intra_binomial.c \ + src/mpi/coll/gather/gather_inter_linear.c \ + src/mpi/coll/gather/gather_inter_local_gather_remote_send.c \ + src/mpi/coll/gatherv/gatherv_allcomm_nb.c \ + src/mpi/coll/gatherv/gatherv_allcomm_linear.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c \ + src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c \ + src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c \ + src/mpi/coll/reduce/reduce_allcomm_nb.c \ + src/mpi/coll/reduce/reduce_intra_binomial.c \ + src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c \ + src/mpi/coll/reduce/reduce_intra_smp.c \ + src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c \ + src/mpi/coll/scan/scan_allcomm_nb.c \ + src/mpi/coll/scan/scan_intra_recursive_doubling.c \ + src/mpi/coll/scan/scan_intra_smp.c \ + src/mpi/coll/scatter/scatter_allcomm_nb.c \ + src/mpi/coll/scatter/scatter_intra_binomial.c \ + src/mpi/coll/scatter/scatter_inter_linear.c \ + src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c \ + src/mpi/coll/scatterv/scatterv_allcomm_nb.c \ + src/mpi/coll/scatterv/scatterv_allcomm_linear.c \ + src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c \ + src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c \ + src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c \ + src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c \ + src/mpi/coll/iallgather/iallgather_intra_brucks.c \ + src/mpi/coll/iallgather/iallgather_intra_ring.c \ + src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c \ + src/mpi/coll/iallgather/iallgather_gentran_algos.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c \ + src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c \ + src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c \ + src/mpi/coll/iallgatherv/iallgatherv_utils.c \ + src/mpi/coll/iallreduce/iallreduce_intra_naive.c \ + src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c \ + src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c \ + src/mpi/coll/iallreduce/iallreduce_intra_smp.c \ + src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c \ + src/mpi/coll/iallreduce/iallreduce_gentran_algos.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c \ + src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c \ + src/mpi/coll/ialltoall/ialltoall_intra_inplace.c \ + src/mpi/coll/ialltoall/ialltoall_intra_brucks.c \ + src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c \ + src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c \ + src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c \ + src/mpi/coll/ialltoall/ialltoall_gentran_algos.c \ + src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c \ + src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c \ + src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c \ + src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c \ + src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c \ + src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c \ + src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c \ + src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c \ + src/mpi/coll/ibarrier/ibarrier_inter_bcast.c \ + src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c \ + src/mpi/coll/ibcast/ibcast_intra_binomial.c \ + src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_smp.c \ + src/mpi/coll/ibcast/ibcast_inter_flat.c \ + src/mpi/coll/ibcast/ibcast_gentran_algos.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c \ + src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c \ + src/mpi/coll/ibcast/ibcast_utils.c \ + src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c \ + src/mpi/coll/igather/igather_intra_binomial.c \ + src/mpi/coll/igather/igather_inter_short.c \ + src/mpi/coll/igather/igather_inter_long.c \ + src/mpi/coll/igather/igather_gentran_algos.c \ + src/mpi/coll/igather/igather_intra_gentran_tree.c \ + src/mpi/coll/igatherv/igatherv_allcomm_linear.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c \ + src/mpi/coll/ireduce/ireduce_intra_binomial.c \ + src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c \ + src/mpi/coll/ireduce/ireduce_intra_smp.c \ + src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c \ + src/mpi/coll/ireduce/ireduce_gentran_algos.c \ + src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c \ + src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c \ + src/mpi/coll/iscan/iscan_intra_recursive_doubling.c \ + src/mpi/coll/iscan/iscan_intra_smp.c \ + src/mpi/coll/iscan/iscan_gentran_algos.c \ + src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c \ + src/mpi/coll/iscatter/iscatter_intra_binomial.c \ + src/mpi/coll/iscatter/iscatter_inter_linear.c \ + src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c \ + src/mpi/coll/iscatter/iscatter_gentran_algos.c \ + src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c \ + src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c \ + src/mpi/coll/op/opsum.c src/mpi/coll/op/opmax.c \ + src/mpi/coll/op/opmin.c src/mpi/coll/op/opband.c \ + src/mpi/coll/op/opbor.c src/mpi/coll/op/opbxor.c \ + src/mpi/coll/op/opland.c src/mpi/coll/op/oplor.c \ + src/mpi/coll/op/oplxor.c src/mpi/coll/op/opprod.c \ + src/mpi/coll/op/opminloc.c src/mpi/coll/op/opmaxloc.c \ + src/mpi/coll/op/opno_op.c src/mpi/coll/op/opreplace.c \ + src/mpi/coll/allreduce_group/allreduce_group.c \ + src/mpi/coll/src/coll_impl.c \ + src/mpi/coll/transports/gentran/gentran_impl.c \ + src/mpi/coll/transports/gentran/gentran_utils.c \ + src/mpi/coll/transports/gentran/tsp_gentran.c \ + src/mpi/coll/transports/stubtran/stubtran_impl.c \ + src/mpi/coll/transports/stubtran/tsp_stubtran.c \ + src/mpi/coll/algorithms/treealgo/treealgo.c \ + src/mpi/coll/algorithms/treealgo/treeutil.c \ + src/mpi/coll/algorithms/recexchalgo/recexchalgo.c \ + src/mpi/coll/algorithms/stubalgo/stubalgo.c \ + src/mpi/coll/helper_fns.c src/mpi/coll/nbcutil.c \ + src/mpi/comm/commutil.c src/mpi/comm/contextid.c \ + src/mpi/datatype/typerep/dataloop/darray_support.c \ + src/mpi/datatype/typerep/dataloop/dataloop.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c \ + src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c \ + src/mpi/datatype/typerep/dataloop/looputil.c \ + src/mpi/datatype/typerep/dataloop/segment.c \ + src/mpi/datatype/typerep/dataloop/segment_count.c \ + src/mpi/datatype/typerep/dataloop/segment_flatten.c \ + src/mpi/datatype/typerep/dataloop/subarray_support.c \ + src/mpi/datatype/typerep/dataloop/dataloop_debug.c \ + src/mpi/datatype/typerep/src/typerep_flatten.c \ + src/mpi/datatype/typerep/src/typerep_pack.c \ + src/mpi/datatype/typerep/src/typerep_pack_external.c \ + src/mpi/datatype/typerep/src/typerep_iov.c \ + src/mpi/datatype/typerep/src/typerep_create.c \ + src/mpi/datatype/typerep/src/typerep_debug.c \ + src/mpi/datatype/typeutil.c src/mpi/datatype/ext32_datatype.c \ + src/mpi/datatype/type_blockindexed.c \ + src/mpi/datatype/type_create_pairtype.c \ + src/mpi/datatype/type_debug.c src/mpi/errhan/errutil.c \ + src/mpi/errhan/dynerrutil.c src/mpi/group/grouputil.c \ + src/mpi/info/infoutil.c src/mpi/init/initinfo.c \ + src/mpi/init/async.c src/mpi/init/netloc_util.c \ + src/mpi/pt2pt/bsendutil.c src/mpi/request/mpir_request.c \ + src/mpi/rma/winutil.c src/mpi/rma/rmatypeutil.c \ + src/mpi/topo/topoutil.c src/util/mem/handlemem.c \ + src/util/mem/strerror.c src/util/cvar/mpir_cvars.c \ + src/util/procmap/local_proc.c src/util/assert/assert.c \ + $(am__append_20) $(am__append_28) src/glue/romio/glue_romio.c \ + $(am__append_50) $(am__append_52) $(am__append_57) \ + $(am__append_58) $(am__append_60) $(am__append_61) \ + $(am__append_63) $(am__append_66) $(am__append_71) \ + $(am__append_72) $(am__append_73) $(am__append_74) \ + $(am__append_76) $(am__append_81) $(am__append_85) \ + $(am__append_88) $(am__append_90) $(am__append_91) \ + $(am__append_94) $(am__append_97) $(am__append_101) \ + $(am__append_103) $(am__append_104) $(am__append_109) \ + $(am__append_111) $(am__append_116) src/mpi_t/mpit.c \ + $(am__append_117) $(am__append_118) $(am__append_130) \ + $(am__append_133) +lib_LTLIBRARIES = $(am__append_4) $(am__append_136) $(am__append_137) \ + $(am__append_138) $(am__append_141) +#src_mpi_debugger_libdbginitdummy_la_SOURCES = src/mpi/debugger/dbginit.c +#src_mpi_debugger_libdbginitdummy_la_CFLAGS = -g +# There is no static debugger interface library +#lib_libtvmpich_la_SOURCES = src/mpi/debugger/dll_mpich.c +#lib_libtvmpich_la_CFLAGS = -g +#lib_libtvmpich_la_LDFLAGS = -g $(ABIVERSIONFLAGS) + +# tvtest builds a main program that uses the routines in dll_mpich to +# access the internal structure of an MPICH program. This is only a partial +# test, but it allows a developer to check out the basic functioning of +# dll_mpich (but without loading it). +# +# NB: these tests can only be built *after* a "make install" step. They must be +# built explicitly +#tvtest_objs = src/mpi/debugger/tvtest.o src/mpi/debugger/dbgstub.o + +# Update output files if the buildiface script or mpi.h.in is updated. Use the +# buildiface-stamp to deal with the &ReplaceIfDifferent logic +cxx_buildiface_out_files = $(top_srcdir)/src/binding/cxx/mpicxx.h.in \ + $(top_srcdir)/src/binding/cxx/initcxx.cxx + +MOD = mod +MPIMOD = mpi +MPICONSTMOD = mpi_constants +MPISIZEOFMOD = mpi_sizeofs +MPIBASEMOD = mpi_base +FC_COMPILE_MODS = $(LTFCCOMPILE) $(am__append_32) + +# variables for custom "silent-rules" for F90 modules +mod_verbose = $(mod_verbose_$(V)) +mod_verbose_ = $(mod_verbose_$(AM_DEFAULT_VERBOSITY)) +mod_verbose_0 = @echo " MOD " $@; +#f08_module_files = \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_LINK_CONSTANTS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(PMPI_F08_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_CALLBACKS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_GLUE_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_TYPES_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NOBUF_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_COMPILE_CONSTANTS_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_F08_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_TYPES_NAME).$(MOD) \ +# src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_CDESC_NAME).$(MOD) + +#F08_COMPILE_MODS = $(LTFCCOMPILE) \ +# $(FCMODOUTFLAG)src/binding/fortran/use_mpi_f08 +src_env_mpichversion_LDADD = lib/libmpi.la +src_env_mpivars_LDADD = lib/libmpi.la +wrapper_doc_src = src/env/mpicc.txt \ + src/env/mpif77.txt \ + src/env/mpicxx.txt \ + src/env/mpifort.txt \ + src/env/mpiexec.txt + + +# common include paths that are used by gforker, remshell, and any other process +# managers that use utility code from this directory +common_pm_includes = \ + -I${top_builddir}/src/include -I${top_srcdir}/src/include \ + -I${top_builddir}/src/pmi/simple -I${top_srcdir}/src/pmi/simple \ + -I${top_builddir}/src/pm/util -I${top_srcdir}/src/pm/util + + +# Ensure that dgbiface is compiled with the -g option, as the symbols must +# be present for the debugger to see them +#src_pm_util_libmpiexec_la_CFLAGS = -g $(AM_CFLAGS) + +# we may want to omit the regular AM_CPPFLAGS when building objects in this +# utility library +#src_pm_util_libmpiexec_la_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) + +# MPL +#src_pm_util_libmpiexec_la_LIBADD = $(mpllib) +#src_pm_util_libmpiexec_la_LDFLAGS = $(mpllibdir) +#EXTRA_src_pm_util_libmpiexec_la_DEPENDENCIES = $(mpllib) + +# We use the msg print routines (for now) - include these in the mpiexec +# library so that we don't need to copy the source files +# simple_pmiutil2 is a subset of simple_pmiutil, +# since it may no longer be used by other applications +# (they make use of routines like the trmem routines that may no longer +# be used by other applications). +# +# [goodell] FIXME the above comment is basically unintelligible... +#src_pm_util_libmpiexec_la_SOURCES = \ +# src/pm/util/cmnargs.c \ +# src/pm/util/process.c \ +# src/pm/util/ioloop.c \ +# src/pm/util/pmiserv.c \ +# src/pm/util/labelout.c \ +# src/pm/util/env.c \ +# src/pm/util/newsession.c \ +# src/pm/util/rm.c \ +# src/pm/util/pmiport.c \ +# src/pm/util/dbgiface.c \ +# src/pm/util/simple_pmiutil2.c + +##src_pm_gforker_mpiexec_SOURCES = src/pm/gforker/mpiexec.c +##src_pm_gforker_mpiexec_LDADD = src/pm/util/libmpiexec.la $(mpllib) +##src_pm_gforker_mpiexec_LDFLAGS = $(mpllibdir) +##EXTRA_src_pm_gforker_mpiexec_DEPENDENCIES = $(mpllib) +# we may not want to add AM_CPPFLAGS for this program +##src_pm_gforker_mpiexec_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) +#src_pm_gforker_mpiexec_gforker_SOURCES = src/pm/gforker/mpiexec.c +#src_pm_gforker_mpiexec_gforker_LDADD = src/pm/util/libmpiexec.la $(mpllib) +#src_pm_gforker_mpiexec_gforker_LDFLAGS = $(mpllibdir) +#EXTRA_src_pm_gforker_mpiexec_gforker_DEPENDENCIES = $(mpllib) +# we may not want to add AM_CPPFLAGS for this program +#src_pm_gforker_mpiexec_gforker_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) +##src_pm_remshell_mpiexec_SOURCES = src/pm/remshell/mpiexec.c +##src_pm_remshell_mpiexec_LDADD = src/pm/util/libmpiexec.la $(mpllib) +##src_pm_remshell_mpiexec_LDFLAGS = $(mpllibdir) +##EXTRA_src_pm_remshell_mpiexec_DEPENDENCIES = $(mpllib) +# we may not want to add AM_CPPFLAGS for this program +##src_pm_remshell_mpiexec_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) +#src_pm_remshell_mpiexec_remshell_SOURCES = src/pm/remshell/mpiexec.c +#src_pm_remshell_mpiexec_remshell_LDADD = src/pm/util/libmpiexec.la $(mpllib) +#src_pm_remshell_mpiexec_remshell_LDFLAGS = $(mpllibdir) +#EXTRA_src_pm_remshell_mpiexec_remshell_DEPENDENCIES = $(mpllib) +# we may not want to add AM_CPPFLAGS for this program +#src_pm_remshell_mpiexec_remshell_CPPFLAGS = $(common_pm_includes) $(AM_CPPFLAGS) +#lib_libpmpi_la_SOURCES = $(mpi_sources) $(mpi_f77_sources) $(mpi_core_sources) +#lib_libpmpi_la_LDFLAGS = $(external_ldflags) $(ABIVERSIONFLAGS) +#lib_libpmpi_la_CPPFLAGS = $(AM_CPPFLAGS) -DF77_USE_PMPI +#lib_libpmpi_la_LIBADD = $(external_libs) $(pmpi_convenience_libs) +#EXTRA_lib_libpmpi_la_DEPENDENCIES = $(pmpi_convenience_libs) +lib_libmpi_la_SOURCES = $(mpi_sources) $(mpi_core_sources) +#lib_libmpi_la_SOURCES = $(mpi_sources) +lib_libmpi_la_LDFLAGS = $(external_ldflags) $(ABIVERSIONFLAGS) +#lib_libmpi_la_LDFLAGS = $(ABIVERSIONFLAGS) +lib_libmpi_la_CPPFLAGS = $(AM_CPPFLAGS) +#lib_libmpi_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPICH_MPI_FROM_PMPI +lib_libmpi_la_LIBADD = $(external_libs) $(pmpi_convenience_libs) $(mpi_convenience_libs) +#lib_libmpi_la_LIBADD = lib/libpmpi.la $(mpi_convenience_libs) +EXTRA_lib_libmpi_la_DEPENDENCIES = $(pmpi_convenience_libs) $(mpi_convenience_libs) +lib_libmpifort_la_CPPFLAGS = \ + $(AM_CPPFLAGS) $(am__append_139) +lib_libmpifort_la_SOURCES = \ + $(mpi_f77_sources) $(am__append_140) +modinc_HEADERS = $(mpi_fc_modules) +lib_libmpifort_la_LDFLAGS = $(ABIVERSIONFLAGS) +lib_libmpifort_la_LIBADD = lib/libmpi.la +lib_libmpicxx_la_SOURCES = $(mpi_cxx_sources) +lib_libmpicxx_la_LDFLAGS = $(ABIVERSIONFLAGS) +lib_libmpicxx_la_LIBADD = lib/libmpi.la + +# $(lib_libmpi_la_SOURCES) already contains $(mpi_sources) +# We don't include the $(lib_libpmpi_la_SOURCES) here because of gcov's +# inability to correctly handle multiple object files with the same source file. +#gcov_sources = $(lib_libmpi_la_SOURCES) + +# "make V=1" support for our documentation recipes +doctextman_verbose = $(doctextman_verbose_$(V)) +doctextman_verbose_ = $(doctextman_verbose_$(AM_DEFAULT_VERBOSITY)) +doctextman_verbose_0 = @echo " DOCTEXTMAN " $@; +doctexthtml_verbose = $(doctexthtml_verbose_$(V)) +doctexthtml_verbose_ = $(doctexthtml_verbose_$(AM_DEFAULT_VERBOSITY)) +doctexthtml_verbose_0 = @echo " DOCTEXTHTML " $@; + +# build dir paths for doc generation, used to override subdir (esp. ROMIO) doc +# generation locations/options +mandoc_path1 = $(abs_top_builddir)/man/man1 +mandoc_path3 = $(abs_top_builddir)/man/man3 +htmldoc_path1 = $(abs_top_builddir)/www/www1 +htmldoc_path3 = $(abs_top_builddir)/www/www3 +doctext_docnotes = $(abs_top_srcdir)/maint/docnotes +# Provide an easily replaced url root for the generated index file. +# You can override this with URL desired in the index file generated by doctext. +# You can ignore this if you don't use mapnames or tohtml to add links +# to the MPI manual pages to documents. +htmldoc_root3 = "--your-url-here--" +DEVELOPER_SUBDIRS = doc/pmi doc/namepub +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .man-phony .html-phony .man1-phony .html1-phony .man3-phony .html3-phony .txt .i .c .cxx .f .f90 .lo .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/maint/Makefile.mk $(srcdir)/src/Makefile.mk $(top_srcdir)/src/mpi/Makefile.mk $(top_srcdir)/src/mpi/attr/Makefile.mk $(top_srcdir)/src/mpi/coll/Makefile.mk $(top_srcdir)/src/mpi/coll/allgather/Makefile.mk $(top_srcdir)/src/mpi/coll/allgatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/allreduce/Makefile.mk $(top_srcdir)/src/mpi/coll/alltoall/Makefile.mk $(top_srcdir)/src/mpi/coll/alltoallv/Makefile.mk $(top_srcdir)/src/mpi/coll/alltoallw/Makefile.mk $(top_srcdir)/src/mpi/coll/barrier/Makefile.mk $(top_srcdir)/src/mpi/coll/bcast/Makefile.mk $(top_srcdir)/src/mpi/coll/exscan/Makefile.mk $(top_srcdir)/src/mpi/coll/gather/Makefile.mk $(top_srcdir)/src/mpi/coll/gatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/reduce_scatter/Makefile.mk $(top_srcdir)/src/mpi/coll/reduce_scatter_block/Makefile.mk $(top_srcdir)/src/mpi/coll/reduce/Makefile.mk $(top_srcdir)/src/mpi/coll/scan/Makefile.mk $(top_srcdir)/src/mpi/coll/scatter/Makefile.mk $(top_srcdir)/src/mpi/coll/scatterv/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_allgather/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_allgatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_alltoall/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_alltoallv/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_alltoallw/Makefile.mk $(top_srcdir)/src/mpi/coll/iallgather/Makefile.mk $(top_srcdir)/src/mpi/coll/iallgatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/iallreduce/Makefile.mk $(top_srcdir)/src/mpi/coll/ialltoall/Makefile.mk $(top_srcdir)/src/mpi/coll/ialltoallv/Makefile.mk $(top_srcdir)/src/mpi/coll/ialltoallw/Makefile.mk $(top_srcdir)/src/mpi/coll/ibarrier/Makefile.mk $(top_srcdir)/src/mpi/coll/ibcast/Makefile.mk $(top_srcdir)/src/mpi/coll/iexscan/Makefile.mk $(top_srcdir)/src/mpi/coll/igather/Makefile.mk $(top_srcdir)/src/mpi/coll/igatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/ireduce_scatter/Makefile.mk $(top_srcdir)/src/mpi/coll/ireduce_scatter_block/Makefile.mk $(top_srcdir)/src/mpi/coll/ireduce/Makefile.mk $(top_srcdir)/src/mpi/coll/iscan/Makefile.mk $(top_srcdir)/src/mpi/coll/iscatter/Makefile.mk $(top_srcdir)/src/mpi/coll/iscatterv/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_allgather/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_allgatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_alltoall/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_alltoallv/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_alltoallw/Makefile.mk $(top_srcdir)/src/mpi/coll/op/Makefile.mk $(top_srcdir)/src/mpi/coll/reduce_local/Makefile.mk $(top_srcdir)/src/mpi/coll/allreduce_group/Makefile.mk $(top_srcdir)/src/mpi/coll/src/Makefile.mk $(top_srcdir)/src/mpi/coll/transports/Makefile.mk $(top_srcdir)/src/mpi/coll/transports/gentran/Makefile.mk $(top_srcdir)/src/mpi/coll/transports/stubtran/Makefile.mk $(top_srcdir)/src/mpi/coll/algorithms/Makefile.mk $(top_srcdir)/src/mpi/coll/algorithms/treealgo/Makefile.mk $(top_srcdir)/src/mpi/coll/algorithms/recexchalgo/Makefile.mk $(top_srcdir)/src/mpi/coll/algorithms/stubalgo/Makefile.mk $(top_srcdir)/src/mpi/comm/Makefile.mk $(top_srcdir)/src/mpi/datatype/Makefile.mk $(top_srcdir)/src/mpi/datatype/typerep/Makefile.mk $(top_srcdir)/src/mpi/datatype/typerep/dataloop/Makefile.mk $(top_srcdir)/src/mpi/debugger/Makefile.mk $(top_srcdir)/src/mpi/errhan/Makefile.mk $(top_srcdir)/src/mpi/group/Makefile.mk $(top_srcdir)/src/mpi/info/Makefile.mk $(top_srcdir)/src/mpi/init/Makefile.mk $(top_srcdir)/src/mpi/misc/Makefile.mk $(top_srcdir)/src/mpi/pt2pt/Makefile.mk $(top_srcdir)/src/mpi/request/Makefile.mk $(top_srcdir)/src/mpi/rma/Makefile.mk $(top_srcdir)/src/mpi/spawn/Makefile.mk $(top_srcdir)/src/mpi/timer/Makefile.mk $(top_srcdir)/src/mpi/topo/Makefile.mk $(top_srcdir)/src/util/Makefile.mk $(top_srcdir)/src/util/mem/Makefile.mk $(top_srcdir)/src/util/cvar/Makefile.mk $(top_srcdir)/src/util/procmap/Makefile.mk $(top_srcdir)/src/util/nodemap/Makefile.mk $(top_srcdir)/src/util/wrappers/Makefile.mk $(top_srcdir)/src/util/assert/Makefile.mk $(top_srcdir)/src/binding/Makefile.mk $(top_srcdir)/src/binding/cxx/Makefile.mk $(top_srcdir)/src/binding/fortran/mpif_h/Makefile.mk $(top_srcdir)/src/binding/fortran/use_mpi/Makefile.mk $(top_srcdir)/src/binding/fortran/use_mpi_f08/Makefile.mk $(top_srcdir)/src/binding/fortran/use_mpi_f08/wrappers_c/Makefile.mk $(top_srcdir)/src/env/Makefile.mk $(top_srcdir)/src/glue/Makefile.mk $(top_srcdir)/src/glue/romio/Makefile.mk $(top_srcdir)/src/include/Makefile.mk $(top_srcdir)/src/mpid/Makefile.mk $(top_srcdir)/src/mpid/ch3/Makefile.mk $(top_srcdir)/src/mpid/ch3/src/Makefile.mk $(top_srcdir)/src/mpid/ch3/util/Makefile.mk $(top_srcdir)/src/mpid/ch3/util/sock/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/src/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/tcp/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/none/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/ofi/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/utils/monitor/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/utils/replacements/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/sock/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/sock/src/Makefile.mk $(top_srcdir)/src/mpid/ch4/Makefile.mk $(top_srcdir)/src/mpid/ch4/include/Makefile.mk $(top_srcdir)/src/mpid/ch4/src/Makefile.mk $(top_srcdir)/src/mpid/ch4/generic/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/src/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/ofi/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/ucx/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/stubnm/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/src/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/stubshm/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/release_gather/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/eager/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/eager/fbox/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/eager/stub/Makefile.mk $(top_srcdir)/src/mpid/common/Makefile.mk $(top_srcdir)/src/mpid/common/sched/Makefile.mk $(top_srcdir)/src/mpid/common/thread/Makefile.mk $(top_srcdir)/src/mpid/common/hcoll/Makefile.mk $(top_srcdir)/src/mpid/common/timers/Makefile.mk $(top_srcdir)/src/mpid/common/shm/Makefile.mk $(top_srcdir)/src/mpid/common/bc/Makefile.mk $(top_srcdir)/src/mpi_t/Makefile.mk $(top_srcdir)/src/nameserv/Makefile.mk $(top_srcdir)/src/nameserv/file/Makefile.mk $(top_srcdir)/src/nameserv/pmi/Makefile.mk $(top_srcdir)/src/packaging/Makefile.mk $(top_srcdir)/src/packaging/pkgconfig/Makefile.mk $(top_srcdir)/src/packaging/envmods/Makefile.mk $(top_srcdir)/src/pm/Makefile.mk $(top_srcdir)/src/pm/util/Makefile.mk $(top_srcdir)/src/pm/gforker/Makefile.mk $(top_srcdir)/src/pm/remshell/Makefile.mk $(top_srcdir)/src/pmi/Makefile.mk $(top_srcdir)/src/pmi/pmi2/Makefile.mk $(top_srcdir)/src/pmi/pmi2/simple/Makefile.mk $(top_srcdir)/src/pmi/simple/Makefile.mk $(top_srcdir)/doc/Makefile.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + esac; +$(srcdir)/maint/Makefile.mk $(srcdir)/src/Makefile.mk $(top_srcdir)/src/mpi/Makefile.mk $(top_srcdir)/src/mpi/attr/Makefile.mk $(top_srcdir)/src/mpi/coll/Makefile.mk $(top_srcdir)/src/mpi/coll/allgather/Makefile.mk $(top_srcdir)/src/mpi/coll/allgatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/allreduce/Makefile.mk $(top_srcdir)/src/mpi/coll/alltoall/Makefile.mk $(top_srcdir)/src/mpi/coll/alltoallv/Makefile.mk $(top_srcdir)/src/mpi/coll/alltoallw/Makefile.mk $(top_srcdir)/src/mpi/coll/barrier/Makefile.mk $(top_srcdir)/src/mpi/coll/bcast/Makefile.mk $(top_srcdir)/src/mpi/coll/exscan/Makefile.mk $(top_srcdir)/src/mpi/coll/gather/Makefile.mk $(top_srcdir)/src/mpi/coll/gatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/reduce_scatter/Makefile.mk $(top_srcdir)/src/mpi/coll/reduce_scatter_block/Makefile.mk $(top_srcdir)/src/mpi/coll/reduce/Makefile.mk $(top_srcdir)/src/mpi/coll/scan/Makefile.mk $(top_srcdir)/src/mpi/coll/scatter/Makefile.mk $(top_srcdir)/src/mpi/coll/scatterv/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_allgather/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_allgatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_alltoall/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_alltoallv/Makefile.mk $(top_srcdir)/src/mpi/coll/neighbor_alltoallw/Makefile.mk $(top_srcdir)/src/mpi/coll/iallgather/Makefile.mk $(top_srcdir)/src/mpi/coll/iallgatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/iallreduce/Makefile.mk $(top_srcdir)/src/mpi/coll/ialltoall/Makefile.mk $(top_srcdir)/src/mpi/coll/ialltoallv/Makefile.mk $(top_srcdir)/src/mpi/coll/ialltoallw/Makefile.mk $(top_srcdir)/src/mpi/coll/ibarrier/Makefile.mk $(top_srcdir)/src/mpi/coll/ibcast/Makefile.mk $(top_srcdir)/src/mpi/coll/iexscan/Makefile.mk $(top_srcdir)/src/mpi/coll/igather/Makefile.mk $(top_srcdir)/src/mpi/coll/igatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/ireduce_scatter/Makefile.mk $(top_srcdir)/src/mpi/coll/ireduce_scatter_block/Makefile.mk $(top_srcdir)/src/mpi/coll/ireduce/Makefile.mk $(top_srcdir)/src/mpi/coll/iscan/Makefile.mk $(top_srcdir)/src/mpi/coll/iscatter/Makefile.mk $(top_srcdir)/src/mpi/coll/iscatterv/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_allgather/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_allgatherv/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_alltoall/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_alltoallv/Makefile.mk $(top_srcdir)/src/mpi/coll/ineighbor_alltoallw/Makefile.mk $(top_srcdir)/src/mpi/coll/op/Makefile.mk $(top_srcdir)/src/mpi/coll/reduce_local/Makefile.mk $(top_srcdir)/src/mpi/coll/allreduce_group/Makefile.mk $(top_srcdir)/src/mpi/coll/src/Makefile.mk $(top_srcdir)/src/mpi/coll/transports/Makefile.mk $(top_srcdir)/src/mpi/coll/transports/gentran/Makefile.mk $(top_srcdir)/src/mpi/coll/transports/stubtran/Makefile.mk $(top_srcdir)/src/mpi/coll/algorithms/Makefile.mk $(top_srcdir)/src/mpi/coll/algorithms/treealgo/Makefile.mk $(top_srcdir)/src/mpi/coll/algorithms/recexchalgo/Makefile.mk $(top_srcdir)/src/mpi/coll/algorithms/stubalgo/Makefile.mk $(top_srcdir)/src/mpi/comm/Makefile.mk $(top_srcdir)/src/mpi/datatype/Makefile.mk $(top_srcdir)/src/mpi/datatype/typerep/Makefile.mk $(top_srcdir)/src/mpi/datatype/typerep/dataloop/Makefile.mk $(top_srcdir)/src/mpi/debugger/Makefile.mk $(top_srcdir)/src/mpi/errhan/Makefile.mk $(top_srcdir)/src/mpi/group/Makefile.mk $(top_srcdir)/src/mpi/info/Makefile.mk $(top_srcdir)/src/mpi/init/Makefile.mk $(top_srcdir)/src/mpi/misc/Makefile.mk $(top_srcdir)/src/mpi/pt2pt/Makefile.mk $(top_srcdir)/src/mpi/request/Makefile.mk $(top_srcdir)/src/mpi/rma/Makefile.mk $(top_srcdir)/src/mpi/spawn/Makefile.mk $(top_srcdir)/src/mpi/timer/Makefile.mk $(top_srcdir)/src/mpi/topo/Makefile.mk $(top_srcdir)/src/util/Makefile.mk $(top_srcdir)/src/util/mem/Makefile.mk $(top_srcdir)/src/util/cvar/Makefile.mk $(top_srcdir)/src/util/procmap/Makefile.mk $(top_srcdir)/src/util/nodemap/Makefile.mk $(top_srcdir)/src/util/wrappers/Makefile.mk $(top_srcdir)/src/util/assert/Makefile.mk $(top_srcdir)/src/binding/Makefile.mk $(top_srcdir)/src/binding/cxx/Makefile.mk $(top_srcdir)/src/binding/fortran/mpif_h/Makefile.mk $(top_srcdir)/src/binding/fortran/use_mpi/Makefile.mk $(top_srcdir)/src/binding/fortran/use_mpi_f08/Makefile.mk $(top_srcdir)/src/binding/fortran/use_mpi_f08/wrappers_c/Makefile.mk $(top_srcdir)/src/env/Makefile.mk $(top_srcdir)/src/glue/Makefile.mk $(top_srcdir)/src/glue/romio/Makefile.mk $(top_srcdir)/src/include/Makefile.mk $(top_srcdir)/src/mpid/Makefile.mk $(top_srcdir)/src/mpid/ch3/Makefile.mk $(top_srcdir)/src/mpid/ch3/src/Makefile.mk $(top_srcdir)/src/mpid/ch3/util/Makefile.mk $(top_srcdir)/src/mpid/ch3/util/sock/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/src/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/tcp/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/none/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/ofi/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/utils/monitor/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/nemesis/utils/replacements/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/sock/Makefile.mk $(top_srcdir)/src/mpid/ch3/channels/sock/src/Makefile.mk $(top_srcdir)/src/mpid/ch4/Makefile.mk $(top_srcdir)/src/mpid/ch4/include/Makefile.mk $(top_srcdir)/src/mpid/ch4/src/Makefile.mk $(top_srcdir)/src/mpid/ch4/generic/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/src/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/ofi/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/ucx/Makefile.mk $(top_srcdir)/src/mpid/ch4/netmod/stubnm/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/src/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/stubshm/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/release_gather/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/eager/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/eager/fbox/Makefile.mk $(top_srcdir)/src/mpid/ch4/shm/posix/eager/stub/Makefile.mk $(top_srcdir)/src/mpid/common/Makefile.mk $(top_srcdir)/src/mpid/common/sched/Makefile.mk $(top_srcdir)/src/mpid/common/thread/Makefile.mk $(top_srcdir)/src/mpid/common/hcoll/Makefile.mk $(top_srcdir)/src/mpid/common/timers/Makefile.mk $(top_srcdir)/src/mpid/common/shm/Makefile.mk $(top_srcdir)/src/mpid/common/bc/Makefile.mk $(top_srcdir)/src/mpi_t/Makefile.mk $(top_srcdir)/src/nameserv/Makefile.mk $(top_srcdir)/src/nameserv/file/Makefile.mk $(top_srcdir)/src/nameserv/pmi/Makefile.mk $(top_srcdir)/src/packaging/Makefile.mk $(top_srcdir)/src/packaging/pkgconfig/Makefile.mk $(top_srcdir)/src/packaging/envmods/Makefile.mk $(top_srcdir)/src/pm/Makefile.mk $(top_srcdir)/src/pm/util/Makefile.mk $(top_srcdir)/src/pm/gforker/Makefile.mk $(top_srcdir)/src/pm/remshell/Makefile.mk $(top_srcdir)/src/pmi/Makefile.mk $(top_srcdir)/src/pmi/pmi2/Makefile.mk $(top_srcdir)/src/pmi/pmi2/simple/Makefile.mk $(top_srcdir)/src/pmi/simple/Makefile.mk $(top_srcdir)/doc/Makefile.mk $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +src/include/mpichconf.h: src/include/stamp-h1 + @test -f $@ || rm -f src/include/stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) src/include/stamp-h1 + +src/include/stamp-h1: $(top_srcdir)/src/include/mpichconf.h.in $(top_builddir)/config.status + @rm -f src/include/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status src/include/mpichconf.h +$(top_srcdir)/src/include/mpichconf.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f src/include/stamp-h1 + touch $@ + +src/hwloc/include/private/autogen/config.h: src/hwloc/include/private/autogen/stamp-h2 + @test -f $@ || rm -f src/hwloc/include/private/autogen/stamp-h2 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) src/hwloc/include/private/autogen/stamp-h2 + +src/hwloc/include/private/autogen/stamp-h2: $(top_srcdir)/src/hwloc/include/private/autogen/config.h.in $(top_builddir)/config.status + @rm -f src/hwloc/include/private/autogen/stamp-h2 + cd $(top_builddir) && $(SHELL) ./config.status src/hwloc/include/private/autogen/config.h + +src/hwloc/include/hwloc/autogen/config.h: src/hwloc/include/hwloc/autogen/stamp-h3 + @test -f $@ || rm -f src/hwloc/include/hwloc/autogen/stamp-h3 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) src/hwloc/include/hwloc/autogen/stamp-h3 + +src/hwloc/include/hwloc/autogen/stamp-h3: $(top_srcdir)/src/hwloc/include/hwloc/autogen/config.h.in $(top_builddir)/config.status + @rm -f src/hwloc/include/hwloc/autogen/stamp-h3 + cd $(top_builddir) && $(SHELL) ./config.status src/hwloc/include/hwloc/autogen/config.h + +distclean-hdr: + -rm -f src/include/mpichconf.h src/include/stamp-h1 src/hwloc/include/private/autogen/config.h src/hwloc/include/private/autogen/stamp-h2 src/hwloc/include/hwloc/autogen/config.h src/hwloc/include/hwloc/autogen/stamp-h3 +src/mpid/ch4/shm/posix/posix_eager_array.c: $(top_builddir)/config.status $(top_srcdir)/src/mpid/ch4/shm/posix/posix_eager_array.c.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h: $(top_builddir)/config.status $(top_srcdir)/src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +#src/mpid/ch4/src/mpid_ch4_net_array.c: $(top_builddir)/config.status $(top_srcdir)/src/mpid/ch4/src/mpid_ch4_net_array.c.in +# cd $(top_builddir) && $(SHELL) ./config.status $@ +#src/mpid/ch4/include/netmodpre.h: $(top_builddir)/config.status $(top_srcdir)/src/mpid/ch4/include/netmodpre.h.in +# cd $(top_builddir) && $(SHELL) ./config.status $@ +#src/mpid/ch4/include/coll_algo_params.h: $(top_builddir)/config.status $(top_srcdir)/src/mpid/ch4/include/coll_algo_params.h.in +# cd $(top_builddir) && $(SHELL) ./config.status $@ +#src/mpid/ch4/src/ch4_coll_globals_default.c: $(top_builddir)/config.status $(top_srcdir)/src/mpid/ch4/src/ch4_coll_globals_default.c.in +# cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/use_mpi/mpif90model.h: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/use_mpi/mpif90model.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/mpid/ch3/channels/nemesis/include/mpid_nem_net_module_defs.h: $(top_builddir)/config.status $(top_srcdir)/src/mpid/ch3/channels/nemesis/include/mpid_nem_net_module_defs.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c: $(top_builddir)/config.status $(top_srcdir)/src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/include/mpichinfo.h: $(top_builddir)/config.status $(top_srcdir)/src/include/mpichinfo.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +mpich-doxygen: $(top_builddir)/config.status $(srcdir)/mpich-doxygen.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/include/mpir_ext.h: $(top_builddir)/config.status $(top_srcdir)/src/include/mpir_ext.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/cxx/mpicxx.h: $(top_builddir)/config.status $(top_srcdir)/src/binding/cxx/mpicxx.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/mpif_h/mpif.h: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/mpif_h/mpif.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/mpif_h/setbotf.f: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/mpif_h/setbotf.f.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/mpif_h/setbot.c: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/mpif_h/setbot.c.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/use_mpi/mpi_sizeofs.f90: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/use_mpi/mpi_sizeofs.f90.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/use_mpi/mpi_base.f90: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/use_mpi/mpi_base.f90.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/use_mpi/mpi_constants.f90: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/use_mpi/mpi_constants.f90.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90: $(top_builddir)/config.status $(top_srcdir)/src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/packaging/pkgconfig/mpich.pc: $(top_builddir)/config.status $(top_srcdir)/src/packaging/pkgconfig/mpich.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/packaging/envmods/mpich.module: $(top_builddir)/config.status $(top_srcdir)/src/packaging/envmods/mpich.module.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpixxx_opts.conf: $(top_builddir)/config.status $(top_srcdir)/src/env/mpixxx_opts.conf.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpicc.sh: $(top_builddir)/config.status $(top_srcdir)/src/env/mpicc.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpicc.bash: $(top_builddir)/config.status $(top_srcdir)/src/env/mpicc.bash.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpicxx.sh: $(top_builddir)/config.status $(top_srcdir)/src/env/mpicxx.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpicxx.bash: $(top_builddir)/config.status $(top_srcdir)/src/env/mpicxx.bash.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpif77.sh: $(top_builddir)/config.status $(top_srcdir)/src/env/mpif77.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpif77.bash: $(top_builddir)/config.status $(top_srcdir)/src/env/mpif77.bash.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpifort.sh: $(top_builddir)/config.status $(top_srcdir)/src/env/mpifort.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/mpifort.bash: $(top_builddir)/config.status $(top_srcdir)/src/env/mpifort.bash.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/env/parkill: $(top_builddir)/config.status $(top_srcdir)/src/env/parkill.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/include/mpi.h: $(top_builddir)/config.status $(top_srcdir)/src/include/mpi.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +doc/design/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/design/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +doc/installguide/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/installguide/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +doc/logging/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/logging/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +doc/refman/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/refman/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +doc/userguide/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/userguide/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +src/binding/cxx/$(am__dirstamp): + @$(MKDIR_P) src/binding/cxx + @: > src/binding/cxx/$(am__dirstamp) +src/binding/cxx/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/binding/cxx/$(DEPDIR) + @: > src/binding/cxx/$(DEPDIR)/$(am__dirstamp) +src/binding/cxx/initcxx.lo: src/binding/cxx/$(am__dirstamp) \ + src/binding/cxx/$(DEPDIR)/$(am__dirstamp) +lib/$(am__dirstamp): + @$(MKDIR_P) lib + @: > lib/$(am__dirstamp) + +lib/libmpicxx.la: $(lib_libmpicxx_la_OBJECTS) $(lib_libmpicxx_la_DEPENDENCIES) $(EXTRA_lib_libmpicxx_la_DEPENDENCIES) lib/$(am__dirstamp) + $(AM_V_CXXLD)$(lib_libmpicxx_la_LINK) $(am_lib_libmpicxx_la_rpath) $(lib_libmpicxx_la_OBJECTS) $(lib_libmpicxx_la_LIBADD) $(LIBS) +src/binding/fortran/mpif_h/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/mpif_h + @: > src/binding/fortran/mpif_h/$(am__dirstamp) +src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/mpif_h/$(DEPDIR) + @: > src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-sendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-recvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-get_countf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-bsendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ssendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-rsendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-bufattachf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-bufdetachf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-isendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ibsendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-issendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-irsendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-irecvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-waitf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-testf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-request_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-waitanyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-testanyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-waitallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-testallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-waitsomef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-testsomef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iprobef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-probef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cancelf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-testcancelf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-send_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-bsend_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ssend_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-rsend_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-recv_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-startf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-startallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-sendrecvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-sndrcvrplf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typecontigf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_vectorf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_hvectorf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_indexedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_hindexedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_structf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_extentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_lbf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_ubf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_commitf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-get_elementsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-packf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-unpackf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-pack_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-barrierf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-bcastf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-gatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-gathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-scatterf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-scattervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-allgatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-allgathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallwf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-exscanf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-reducef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-op_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-op_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-allreducef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-redscatf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-scanf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-group_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-group_rankf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-grouptranksf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-group_comparef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_groupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-group_unionf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-groupinterf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-groupdifff.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-group_inclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-group_exclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-grouprinclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-grouprexclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-group_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_rankf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_comparef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dup_with_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_splitf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commtesticf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commrsizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commrgroupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iccreatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-icmergef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-attr_putf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-attr_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-attr_deletef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-topo_testf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dims_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-graph_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-graphdims_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-graph_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cartdim_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_rankf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_coordsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbcountf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbrsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_shiftf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_subf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_mapf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-graph_mapf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-getpnamef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-get_versionf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-get_library_versionf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-errhcreatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-errhsetf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-errhgetf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-errhfreef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-error_stringf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-error_classf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-finalizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-initializedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-abortf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-close_portf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_acceptf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_connectf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commdiscf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commparentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_joinf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_spawnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-spawnmultf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-lookup_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-open_portf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-publish_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-unpubnamef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-accumulatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-putf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_completef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_fencef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_groupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_lockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_postf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_startf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_testf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_waitf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocate_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_shared_queryf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_create_dynamicf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_attachf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_detachf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-get_accumulatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-fetch_and_opf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-compare_and_swapf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-rputf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-rgetf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-raccumulatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-rget_accumulatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_lock_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlock_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_flushf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_localf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_local_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_syncf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-adderrclassf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-adderrcodef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-adderrstringf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commcallerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commnewkeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commdelattrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commfreekeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commgetnamf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-filecallerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-greqcompletef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-greqstartf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-isthrmainf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-query_threadf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-statgetclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-statsetelf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typenewkeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typedelattrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_dupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typefreekeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typegetcntsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typegetenvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typegnamef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typesetattrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typesetnamef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_match_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-wincallerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-winnewkeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-windelattrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-winfreekeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-alloc_memf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commcreerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commgeterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-commseterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-filecreerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-filegeterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-fileseterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-finalizedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-free_memf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-info_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-info_deletef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-info_dupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-info_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-info_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-infognkf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-infognthkf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-infovallenf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-info_setf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-pack_externalf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-packesizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-reqgetstatf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typedarrayf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typechindf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typechvecf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typecindbf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_create_hindexed_blockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typecresizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typecstructf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typecsubarrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typegetextentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-typegtextf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-unpackextf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-wincreerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-wingeterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-winseterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_localf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-op_commutativef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_scatter_blockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_create_adjacentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighbors_countf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighborsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-improbef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-imrecvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-mprobef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-mrecvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_idupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ibarrierf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ibcastf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-igatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-igathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iscatterf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iscattervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iallgatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iallgathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallwf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ireducef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iallreducef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatterf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatter_blockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iscanf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-iexscanf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallwf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallwf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_split_typef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-get_elements_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-status_set_elements_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_extent_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_true_extent_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-type_size_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_create_groupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_ackf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_get_ackedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_revokef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_shrinkf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_agreef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_openf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_closef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_deletef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_preallocatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_groupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_amodef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_viewf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_viewf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_atf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_atf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_atf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_atf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_readf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_writef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_ireadf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwritef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_seekf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_positionf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_byte_offsetf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_orderedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_orderedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_seek_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_position_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_type_extentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-register_datarepf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_atomicityf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_atomicityf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_syncf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_at_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_at_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-initthreadf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-pcontrolf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-addressf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-getaddressf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-wtimef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-wtickf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-aint_addf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-aint_difff.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dup_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-null_del_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-null_copy_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dup_comm_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_del_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_copy_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dup_win_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_del_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_copy_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-dup_type_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_del_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_copy_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi + @: > src/binding/fortran/use_mpi/$(am__dirstamp) +src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi/$(DEPDIR) + @: > src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libmpifort_la-typef90cmplxf.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libmpifort_la-typef90realf.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libmpifort_la-typef90intf.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/mpi.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/mpi_constants.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/mpi_sizeofs.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/mpi_base.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi_f08 + @: > src/binding/fortran/use_mpi_f08/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi_f08/$(DEPDIR) + @: > src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/pmpi_f08.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_f08.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_f08_types.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_c_interface.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/mpi_c_interface_types.lo: \ + src/binding/fortran/use_mpi_f08/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi_f08/wrappers_f + @: > src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR) + @: > src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/abort_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/accumulate_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/add_error_class_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/add_error_code_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/add_error_string_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/aint_add_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/aint_diff_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/allgather_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/allgatherv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/alloc_mem_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/allreduce_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/alltoall_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/alltoallv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/alltoallw_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/barrier_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/bcast_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/bsend_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/bsend_init_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/buffer_attach_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/buffer_detach_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cancel_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cart_coords_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cart_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cart_get_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cart_map_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cart_rank_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cart_shift_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cart_sub_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/cartdim_get_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/close_port_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_accept_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_call_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_compare_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_connect_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_group_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_create_keyval_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_delete_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_disconnect_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_dup_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_dup_with_info_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_free_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_free_keyval_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_info_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_get_parent_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_group_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_idup_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_join_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_rank_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_remote_group_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_remote_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_info_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_set_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_spawn_multiple_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_split_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_split_type_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/comm_test_inter_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/compare_and_swap_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/dims_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_create_adjacent_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_neighbors_count_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/dist_graph_neighbors_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/errhandler_free_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/error_class_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/error_string_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/exscan_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/f_sync_reg_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/fetch_and_op_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_call_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_close_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_create_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_delete_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_amode_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_atomicity_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_byte_offset_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_group_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_info_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_position_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_position_shared_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_type_extent_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_get_view_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_shared_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_shared_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_open_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_preallocate_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_begin_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_end_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_begin_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_end_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_at_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_begin_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_end_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_ordered_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_read_shared_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_seek_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_seek_shared_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_set_atomicity_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_set_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_set_info_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_set_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_set_view_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_sync_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_begin_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_end_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_begin_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_end_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_at_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_begin_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_end_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_ordered_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/file_write_shared_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/finalize_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/finalized_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/free_mem_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/gather_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/gatherv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_accumulate_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_address_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_count_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_elements_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_elements_x_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_library_version_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_processor_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/get_version_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/graph_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/graph_get_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/graph_map_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/graph_neighbors_count_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/graph_neighbors_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/graphdims_get_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/grequest_complete_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/grequest_start_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_compare_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_difference_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_excl_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_free_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_incl_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_intersection_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_range_excl_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_range_incl_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_rank_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_translate_ranks_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/group_union_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/iallgather_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/iallgatherv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/iallreduce_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ialltoall_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ialltoallv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ialltoallw_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ibarrier_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ibcast_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ibsend_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/iexscan_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/igather_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/igatherv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/improbe_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/imrecv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_allgather_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_allgatherv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoall_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoallv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ineighbor_alltoallw_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_delete_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_dup_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_free_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_get_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_get_nkeys_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_get_nthkey_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_get_valuelen_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/info_set_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/init_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/init_thread_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/initialized_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/intercomm_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/intercomm_merge_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/iprobe_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/irecv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_scatter_block_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ireduce_scatter_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/irsend_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/is_thread_main_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/iscan_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/iscatter_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/iscatterv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/isend_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/issend_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/lookup_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/mprobe_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/mrecv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_allgather_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_allgatherv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoall_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoallv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/neighbor_alltoallw_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/op_commutative_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/op_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/op_free_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/open_port_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/pack_external_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/pack_external_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/pack_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/pack_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/pcontrol_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/probe_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/publish_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/put_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/query_thread_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/raccumulate_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/recv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/recv_init_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/reduce_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/reduce_local_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/reduce_scatter_block_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/reduce_scatter_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/register_datarep_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/request_free_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/request_get_status_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/rget_accumulate_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/rget_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/rput_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/rsend_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/rsend_init_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/scan_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/scatter_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/scatterv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/send_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/send_init_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/sendrecv_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/sendrecv_replace_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ssend_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/ssend_init_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/start_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/startall_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/status_set_cancelled_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/status_set_elements_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/status_set_elements_x_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/test_cancelled_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/test_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/testall_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/testany_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/testsome_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/topo_test_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_commit_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_contiguous_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_darray_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_complex_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_integer_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_f90_real_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hindexed_block_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hindexed_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_hvector_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_indexed_block_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_keyval_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_resized_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_struct_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_create_subarray_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_delete_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_dup_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_free_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_free_keyval_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_get_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_get_contents_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_get_envelope_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_get_extent_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_get_extent_x_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_get_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_get_true_extent_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_get_true_extent_x_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_indexed_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_match_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_set_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_set_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_size_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_size_x_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/type_vector_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/unpack_external_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/unpack_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/unpublish_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/wait_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/waitall_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/waitany_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/waitsome_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_allocate_shared_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_attach_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_call_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_complete_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_create_dynamic_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_create_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_create_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_create_keyval_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_delete_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_detach_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_fence_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_flush_local_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_free_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_free_keyval_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_get_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_get_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_get_group_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_get_info_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_get_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_lock_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_post_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_set_attr_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_set_errhandler_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_set_info_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_set_name_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_shared_query_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_start_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_sync_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_test_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_all_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_unlock_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/win_wait_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/wtick_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/wtime_f08ts.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi_f08/wrappers_f/profiling + @: > src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR) + @: > src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pabort_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paccumulate_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_class_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_code_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/padd_error_string_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paint_add_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/paint_diff_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallgather_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallgatherv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palloc_mem_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pallreduce_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoall_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoallv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/palltoallw_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbarrier_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbcast_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbsend_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbsend_init_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbuffer_attach_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pbuffer_detach_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcancel_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_coords_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_get_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_map_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_rank_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_shift_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcart_sub_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcartdim_get_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pclose_port_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_accept_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_call_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_compare_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_connect_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_group_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_create_keyval_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_delete_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_disconnect_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_dup_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_dup_with_info_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_free_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_free_keyval_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_info_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_get_parent_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_group_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_idup_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_join_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_rank_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_remote_group_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_remote_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_info_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_set_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_spawn_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_spawn_multiple_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_split_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_split_type_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcomm_test_inter_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pcompare_and_swap_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdims_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_create_adjacent_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_neighbors_count_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pdist_graph_neighbors_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perrhandler_free_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perror_class_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/perror_string_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pexscan_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pf_sync_reg_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfetch_and_op_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_call_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_close_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_create_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_delete_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_amode_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_atomicity_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_byte_offset_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_group_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_info_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_position_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_position_shared_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_type_extent_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_get_view_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_at_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_at_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iread_shared_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_at_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_at_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_iwrite_shared_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_open_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_preallocate_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_begin_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_end_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_begin_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_end_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_at_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_begin_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_end_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_ordered_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_read_shared_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_seek_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_seek_shared_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_atomicity_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_info_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_set_view_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_sync_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_begin_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_end_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_begin_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_end_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_at_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_begin_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_end_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_ordered_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfile_write_shared_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfinalize_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfinalized_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pfree_mem_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgather_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgatherv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_accumulate_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_address_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_count_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_elements_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_elements_x_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_library_version_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_processor_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pget_version_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_get_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_map_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_neighbors_count_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraph_neighbors_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgraphdims_get_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgrequest_complete_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgrequest_start_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_compare_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_difference_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_excl_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_free_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_incl_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_intersection_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_range_excl_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_range_incl_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_rank_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_translate_ranks_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pgroup_union_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallgather_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallgatherv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piallreduce_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoall_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoallv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pialltoallw_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibarrier_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibcast_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pibsend_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piexscan_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pigather_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pigatherv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pimprobe_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pimrecv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_allgather_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_allgatherv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoall_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoallv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pineighbor_alltoallw_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_delete_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_dup_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_free_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_nkeys_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_nthkey_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_get_valuelen_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinfo_set_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinit_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinit_thread_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pinitialized_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pintercomm_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pintercomm_merge_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piprobe_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pirecv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_scatter_block_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pireduce_scatter_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pirsend_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pis_thread_main_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscan_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscatter_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/piscatterv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pisend_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pissend_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/plookup_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pmprobe_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pmrecv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_allgather_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_allgatherv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoall_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoallv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pneighbor_alltoallw_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_commutative_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pop_free_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/popen_port_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_external_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_external_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppack_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppcontrol_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pprobe_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ppublish_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pput_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pquery_thread_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/praccumulate_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/precv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/precv_init_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_local_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_scatter_block_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/preduce_scatter_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pregister_datarep_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prequest_free_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prequest_get_status_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prget_accumulate_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prget_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prput_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prsend_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/prsend_init_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscan_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscatter_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pscatterv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psend_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psend_init_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psendrecv_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/psendrecv_replace_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pssend_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pssend_init_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstart_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstartall_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_cancelled_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_elements_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pstatus_set_elements_x_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptest_cancelled_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptest_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestall_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestany_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptestsome_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptopo_test_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_commit_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_contiguous_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_darray_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_complex_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_integer_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_f90_real_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hindexed_block_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hindexed_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_hvector_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_indexed_block_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_keyval_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_resized_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_struct_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_create_subarray_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_delete_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_dup_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_free_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_free_keyval_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_contents_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_envelope_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_extent_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_extent_x_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_true_extent_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_get_true_extent_x_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_indexed_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_match_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_set_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_set_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_size_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_size_x_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/ptype_vector_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpack_external_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpack_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/punpublish_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwait_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitall_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitany_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwaitsome_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_allocate_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_allocate_shared_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_attach_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_call_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_complete_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_dynamic_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_create_keyval_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_delete_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_detach_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_fence_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_local_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_flush_local_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_free_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_free_keyval_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_group_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_info_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_get_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_lock_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_lock_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_post_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_attr_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_errhandler_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_info_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_set_name_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_shared_query_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_start_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_sync_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_test_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_unlock_all_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_unlock_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwin_wait_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwtick_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_f/profiling/pwtime_f08ts.lo: src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi_f08/wrappers_c + @: > src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR) + @: > src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-buffer_attach_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-isend_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibsend_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-issend_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irsend_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irecv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_init_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_init_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_init_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_init_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_init_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_replace_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bcast_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gather_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gatherv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatter_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatterv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgather_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgatherv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoall_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallw_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-exscan_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allreduce_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scan_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-accumulate_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-put_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_create_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_attach_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_detach_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_accumulate_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-fetch_and_op_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-compare_and_swap_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rput_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-raccumulate_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_accumulate_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-free_mem_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_address_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_external_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_external_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_local_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_block_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-imrecv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-mrecv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibcast_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igather_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igatherv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatter_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatterv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgather_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgatherv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoall_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallw_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallreduce_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_block_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscan_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iexscan_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgather_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgatherv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoall_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallw_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgather_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgatherv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoall_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallv_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallw_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_shared_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_shared_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_shared_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_shared_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_begin_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_end_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_begin_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_end_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_begin_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_end_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_begin_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_end_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_begin_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_end_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_begin_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_end_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_all_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_all_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_all_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_all_cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-cdesc.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_c.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_multiple_c.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-f_sync_reg_c.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-utils.lo: \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) \ + src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) + +lib/libmpifort.la: $(lib_libmpifort_la_OBJECTS) $(lib_libmpifort_la_DEPENDENCIES) $(EXTRA_lib_libmpifort_la_DEPENDENCIES) lib/$(am__dirstamp) + $(AM_V_GEN)$(lib_libmpifort_la_LINK) $(am_lib_libmpifort_la_rpath) $(lib_libmpifort_la_OBJECTS) $(lib_libmpifort_la_LIBADD) $(LIBS) +src/mpi/attr/$(am__dirstamp): + @$(MKDIR_P) src/mpi/attr + @: > src/mpi/attr/$(am__dirstamp) +src/mpi/attr/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/attr/$(DEPDIR) + @: > src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-attr_delete.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-attr_get.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-attr_put.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-comm_create_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-comm_delete_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-comm_free_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-comm_get_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-comm_set_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-keyval_create.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-keyval_free.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-type_create_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-type_delete_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-type_free_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-type_get_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-type_set_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-win_create_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-win_delete_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-win_free_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-win_get_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-win_set_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/allgather + @: > src/mpi/coll/allgather/$(am__dirstamp) +src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/allgather/$(DEPDIR) + @: > src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libmpi_la-allgather.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/allgatherv + @: > src/mpi/coll/allgatherv/$(am__dirstamp) +src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/allgatherv/$(DEPDIR) + @: > src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/allreduce + @: > src/mpi/coll/allreduce/$(am__dirstamp) +src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/allreduce/$(DEPDIR) + @: > src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libmpi_la-allreduce.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/alltoall + @: > src/mpi/coll/alltoall/$(am__dirstamp) +src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/alltoall/$(DEPDIR) + @: > src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libmpi_la-alltoall.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/alltoallv + @: > src/mpi/coll/alltoallv/$(am__dirstamp) +src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/alltoallv/$(DEPDIR) + @: > src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/alltoallw + @: > src/mpi/coll/alltoallw/$(am__dirstamp) +src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/alltoallw/$(DEPDIR) + @: > src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/barrier + @: > src/mpi/coll/barrier/$(am__dirstamp) +src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/barrier/$(DEPDIR) + @: > src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libmpi_la-barrier.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/bcast + @: > src/mpi/coll/bcast/$(am__dirstamp) +src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/bcast/$(DEPDIR) + @: > src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libmpi_la-bcast.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/exscan/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/exscan + @: > src/mpi/coll/exscan/$(am__dirstamp) +src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/exscan/$(DEPDIR) + @: > src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/exscan/lib_libmpi_la-exscan.lo: \ + src/mpi/coll/exscan/$(am__dirstamp) \ + src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/gather + @: > src/mpi/coll/gather/$(am__dirstamp) +src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/gather/$(DEPDIR) + @: > src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libmpi_la-gather.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gatherv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/gatherv + @: > src/mpi/coll/gatherv/$(am__dirstamp) +src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/gatherv/$(DEPDIR) + @: > src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gatherv/lib_libmpi_la-gatherv.lo: \ + src/mpi/coll/gatherv/$(am__dirstamp) \ + src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/reduce_scatter + @: > src/mpi/coll/reduce_scatter/$(am__dirstamp) +src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/reduce_scatter/$(DEPDIR) + @: > src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/reduce_scatter_block + @: > src/mpi/coll/reduce_scatter_block/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/reduce_scatter_block/$(DEPDIR) + @: > src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/reduce + @: > src/mpi/coll/reduce/$(am__dirstamp) +src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/reduce/$(DEPDIR) + @: > src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libmpi_la-reduce.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/scan + @: > src/mpi/coll/scan/$(am__dirstamp) +src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/scan/$(DEPDIR) + @: > src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/lib_libmpi_la-scan.lo: \ + src/mpi/coll/scan/$(am__dirstamp) \ + src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/scatter + @: > src/mpi/coll/scatter/$(am__dirstamp) +src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/scatter/$(DEPDIR) + @: > src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libmpi_la-scatter.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatterv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/scatterv + @: > src/mpi/coll/scatterv/$(am__dirstamp) +src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/scatterv/$(DEPDIR) + @: > src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatterv/lib_libmpi_la-scatterv.lo: \ + src/mpi/coll/scatterv/$(am__dirstamp) \ + src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgather/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_allgather + @: > src/mpi/coll/neighbor_allgather/$(am__dirstamp) +src/mpi/coll/neighbor_allgather/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_allgather/$(DEPDIR) + @: > src/mpi/coll/neighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather.lo: \ + src/mpi/coll/neighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/neighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgatherv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_allgatherv + @: > src/mpi/coll/neighbor_allgatherv/$(am__dirstamp) +src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_allgatherv/$(DEPDIR) + @: > src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv.lo: \ + src/mpi/coll/neighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoall/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_alltoall + @: > src/mpi/coll/neighbor_alltoall/$(am__dirstamp) +src/mpi/coll/neighbor_alltoall/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_alltoall/$(DEPDIR) + @: > src/mpi/coll/neighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall.lo: \ + src/mpi/coll/neighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_alltoallv + @: > src/mpi/coll/neighbor_alltoallv/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_alltoallv/$(DEPDIR) + @: > src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv.lo: \ + src/mpi/coll/neighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallw/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_alltoallw + @: > src/mpi/coll/neighbor_alltoallw/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/neighbor_alltoallw/$(DEPDIR) + @: > src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw.lo: \ + src/mpi/coll/neighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iallgather + @: > src/mpi/coll/iallgather/$(am__dirstamp) +src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iallgather/$(DEPDIR) + @: > src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iallgatherv + @: > src/mpi/coll/iallgatherv/$(am__dirstamp) +src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iallgatherv/$(DEPDIR) + @: > src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iallreduce + @: > src/mpi/coll/iallreduce/$(am__dirstamp) +src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iallreduce/$(DEPDIR) + @: > src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ialltoall + @: > src/mpi/coll/ialltoall/$(am__dirstamp) +src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ialltoall/$(DEPDIR) + @: > src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ialltoallv + @: > src/mpi/coll/ialltoallv/$(am__dirstamp) +src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ialltoallv/$(DEPDIR) + @: > src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ialltoallw + @: > src/mpi/coll/ialltoallw/$(am__dirstamp) +src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ialltoallw/$(DEPDIR) + @: > src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw.lo: \ + src/mpi/coll/ialltoallw/$(am__dirstamp) \ + src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ibarrier + @: > src/mpi/coll/ibarrier/$(am__dirstamp) +src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ibarrier/$(DEPDIR) + @: > src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier.lo: \ + src/mpi/coll/ibarrier/$(am__dirstamp) \ + src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ibcast + @: > src/mpi/coll/ibcast/$(am__dirstamp) +src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ibcast/$(DEPDIR) + @: > src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iexscan/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iexscan + @: > src/mpi/coll/iexscan/$(am__dirstamp) +src/mpi/coll/iexscan/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iexscan/$(DEPDIR) + @: > src/mpi/coll/iexscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iexscan/lib_libmpi_la-iexscan.lo: \ + src/mpi/coll/iexscan/$(am__dirstamp) \ + src/mpi/coll/iexscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/igather + @: > src/mpi/coll/igather/$(am__dirstamp) +src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/igather/$(DEPDIR) + @: > src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libmpi_la-igather.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igatherv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/igatherv + @: > src/mpi/coll/igatherv/$(am__dirstamp) +src/mpi/coll/igatherv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/igatherv/$(DEPDIR) + @: > src/mpi/coll/igatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igatherv/lib_libmpi_la-igatherv.lo: \ + src/mpi/coll/igatherv/$(am__dirstamp) \ + src/mpi/coll/igatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ireduce_scatter + @: > src/mpi/coll/ireduce_scatter/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ireduce_scatter/$(DEPDIR) + @: > src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ireduce_scatter_block + @: > src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ireduce_scatter_block/$(DEPDIR) + @: > src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ireduce + @: > src/mpi/coll/ireduce/$(am__dirstamp) +src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ireduce/$(DEPDIR) + @: > src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libmpi_la-ireduce.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iscan + @: > src/mpi/coll/iscan/$(am__dirstamp) +src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iscan/$(DEPDIR) + @: > src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libmpi_la-iscan.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iscatter + @: > src/mpi/coll/iscatter/$(am__dirstamp) +src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iscatter/$(DEPDIR) + @: > src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libmpi_la-iscatter.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatterv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iscatterv + @: > src/mpi/coll/iscatterv/$(am__dirstamp) +src/mpi/coll/iscatterv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/iscatterv/$(DEPDIR) + @: > src/mpi/coll/iscatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv.lo: \ + src/mpi/coll/iscatterv/$(am__dirstamp) \ + src/mpi/coll/iscatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_allgather + @: > src/mpi/coll/ineighbor_allgather/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_allgather/$(DEPDIR) + @: > src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather.lo: \ + src/mpi/coll/ineighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_allgatherv + @: > src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR) + @: > src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv.lo: \ + src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_alltoall + @: > src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_alltoall/$(DEPDIR) + @: > src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall.lo: \ + src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_alltoallv + @: > src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR) + @: > src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv.lo: \ + src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_alltoallw + @: > src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR) + @: > src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw.lo: \ + src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/op + @: > src/mpi/coll/op/$(am__dirstamp) +src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/op/$(DEPDIR) + @: > src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-op_create.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-op_free.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-op_commutative.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_local/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/reduce_local + @: > src/mpi/coll/reduce_local/$(am__dirstamp) +src/mpi/coll/reduce_local/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/reduce_local/$(DEPDIR) + @: > src/mpi/coll/reduce_local/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_local/lib_libmpi_la-reduce_local.lo: \ + src/mpi/coll/reduce_local/$(am__dirstamp) \ + src/mpi/coll/reduce_local/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/$(am__dirstamp): + @$(MKDIR_P) src/mpi/comm + @: > src/mpi/comm/$(am__dirstamp) +src/mpi/comm/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/comm/$(DEPDIR) + @: > src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_compare.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_create.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_create_group.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_dup.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_dup_with_info.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_free.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_get_name.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_get_info.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_set_info.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_group.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_idup.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_rank.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_size.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_remote_group.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_remote_size.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_set_name.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_split.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_test_inter.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-intercomm_create.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-intercomm_merge.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_split_type.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_failure_ack.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_failure_get_acked.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_revoke.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_shrink.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-comm_agree.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/$(am__dirstamp): + @$(MKDIR_P) src/mpi/datatype + @: > src/mpi/datatype/$(am__dirstamp) +src/mpi/datatype/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/datatype/$(DEPDIR) + @: > src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-address.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-get_address.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-get_count.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-get_elements.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-get_elements_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-pack.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-pack_external.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-pack_external_size.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-pack_size.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-status_set_elements.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-status_set_elements_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_get_name.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_set_name.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_size.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_size_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_extent.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_vector.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_commit.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_indexed.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_hindexed.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_struct.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_contiguous.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_free.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_hvector.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_dup.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_get_envelope.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_get_contents.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_ub.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_lb.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_get_extent.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_get_extent_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_get_true_extent.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_get_true_extent_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_match_size.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_struct.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_hindexed.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_hvector.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_indexed_block.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_hindexed_block.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_resized.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_darray.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_subarray.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-unpack.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-unpack_external.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/$(am__dirstamp): + @$(MKDIR_P) src/mpi/errhan + @: > src/mpi/errhan/$(am__dirstamp) +src/mpi/errhan/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/errhan/$(DEPDIR) + @: > src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-add_error_code.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-add_error_class.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-add_error_string.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-comm_call_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-comm_create_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-comm_get_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-comm_set_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-errhandler_create.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-errhandler_free.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-errhandler_get.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-errhandler_set.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-error_class.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-error_string.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-file_create_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-file_get_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-file_set_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-file_call_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-win_create_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-win_call_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-win_get_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-win_set_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/$(am__dirstamp): + @$(MKDIR_P) src/mpi/group + @: > src/mpi/group/$(am__dirstamp) +src/mpi/group/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/group/$(DEPDIR) + @: > src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_compare.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_difference.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_excl.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_free.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_incl.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_intersection.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_range_excl.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_range_incl.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_rank.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_size.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_translate_ranks.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-group_union.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/$(am__dirstamp): + @$(MKDIR_P) src/mpi/info + @: > src/mpi/info/$(am__dirstamp) +src/mpi/info/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/info/$(DEPDIR) + @: > src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_create.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_delete.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_dup.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_free.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_get.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_getn.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_getnth.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_getvallen.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-info_set.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/$(am__dirstamp): + @$(MKDIR_P) src/mpi/init + @: > src/mpi/init/$(am__dirstamp) +src/mpi/init/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/init/$(DEPDIR) + @: > src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-abort.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-init.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-initialized.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-initthread.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-ismain.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-finalize.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-finalized.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-querythread.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/$(am__dirstamp): + @$(MKDIR_P) src/mpi/misc + @: > src/mpi/misc/$(am__dirstamp) +src/mpi/misc/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/misc/$(DEPDIR) + @: > src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libmpi_la-getpname.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libmpi_la-pcontrol.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libmpi_la-version.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libmpi_la-library_version.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libmpi_la-aint_add.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libmpi_la-aint_diff.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libmpi_la-utils.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/$(am__dirstamp): + @$(MKDIR_P) src/mpi/pt2pt + @: > src/mpi/pt2pt/$(am__dirstamp) +src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/pt2pt/$(DEPDIR) + @: > src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-bsend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-bsend_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-bufattach.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-buffree.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-ibsend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-improbe.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-imrecv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-iprobe.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-irecv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-irsend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-isend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-issend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-mprobe.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-mrecv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-probe.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-recv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-recv_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-rsend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-rsend_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-send.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-send_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-sendrecv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-sendrecv_rep.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-ssend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-ssend_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/$(am__dirstamp): + @$(MKDIR_P) src/mpi/request + @: > src/mpi/request/$(am__dirstamp) +src/mpi/request/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/request/$(DEPDIR) + @: > src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-cancel.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-greq_start.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-greq_complete.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-request_free.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-request_get_status.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-status_set_cancelled.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-start.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-startall.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-test.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-test_cancelled.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-testall.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-testany.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-testsome.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-wait.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-waitall.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-waitany.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-waitsome.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/$(am__dirstamp): + @$(MKDIR_P) src/mpi/rma + @: > src/mpi/rma/$(am__dirstamp) +src/mpi/rma/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/rma/$(DEPDIR) + @: > src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-accumulate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-alloc_mem.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-compare_and_swap.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-fetch_and_op.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-free_mem.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-get.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-get_accumulate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-put.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-raccumulate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-rget.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-rget_accumulate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-rput.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_allocate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_allocate_shared.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_attach.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_complete.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_create.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_create_dynamic.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_detach.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_fence.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_flush.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_flush_all.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_flush_local.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_flush_local_all.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_free.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_get_group.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_get_info.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_get_name.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_lock.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_lock_all.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_post.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_set_info.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_set_name.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_shared_query.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_start.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_sync.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_test.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_unlock.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_unlock_all.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-win_wait.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/$(am__dirstamp): + @$(MKDIR_P) src/mpi/spawn + @: > src/mpi/spawn/$(am__dirstamp) +src/mpi/spawn/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/spawn/$(DEPDIR) + @: > src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-comm_disconnect.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-comm_get_parent.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-comm_join.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-comm_spawn.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-comm_spawn_multiple.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-lookup_name.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-publish_name.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-unpublish_name.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-open_port.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-close_port.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-comm_connect.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libmpi_la-comm_accept.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/timer/$(am__dirstamp): + @$(MKDIR_P) src/mpi/timer + @: > src/mpi/timer/$(am__dirstamp) +src/mpi/timer/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/timer/$(DEPDIR) + @: > src/mpi/timer/$(DEPDIR)/$(am__dirstamp) +src/mpi/timer/lib_libmpi_la-wtime.lo: \ + src/mpi/timer/$(am__dirstamp) \ + src/mpi/timer/$(DEPDIR)/$(am__dirstamp) +src/mpi/timer/lib_libmpi_la-wtick.lo: \ + src/mpi/timer/$(am__dirstamp) \ + src/mpi/timer/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/$(am__dirstamp): + @$(MKDIR_P) src/mpi/topo + @: > src/mpi/topo/$(am__dirstamp) +src/mpi/topo/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/topo/$(DEPDIR) + @: > src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-cart_coords.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-cart_create.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-cart_get.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-cart_map.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-cart_rank.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-cart_shift.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-cart_sub.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-dims_create.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-graph_get.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-graph_map.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-graph_nbr.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-graphcreate.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-graphdimsget.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-graphnbrcnt.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-cartdim_get.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-topo_test.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-dist_gr_create_adj.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-dist_gr_create.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-dist_gr_neighb_count.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-dist_gr_neighb.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpi_la-statusf2c.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpi_la-statusc2f.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_int.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_real.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_complex.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/glue/romio/$(am__dirstamp): + @$(MKDIR_P) src/glue/romio + @: > src/glue/romio/$(am__dirstamp) +src/glue/romio/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/glue/romio/$(DEPDIR) + @: > src/glue/romio/$(DEPDIR)/$(am__dirstamp) +src/glue/romio/lib_libmpi_la-all_romio_symbols.lo: \ + src/glue/romio/$(am__dirstamp) \ + src/glue/romio/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/$(am__dirstamp): + @$(MKDIR_P) src/mpi_t + @: > src/mpi_t/$(am__dirstamp) +src/mpi_t/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi_t/$(DEPDIR) + @: > src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cat_changed.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cat_get_categories.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cat_get_cvars.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cat_get_info.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cat_get_num.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cat_get_pvars.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cvar_get_info.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cvar_get_num.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cvar_handle_alloc.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cvar_handle_free.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cvar_read.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cvar_write.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-enum_get_info.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-enum_get_item.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-mpit_finalize.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-mpit_initthread.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_get_info.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_get_num.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_handle_alloc.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_handle_free.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_read.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_readreset.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_reset.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_session_create.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_session_free.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_start.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_stop.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_write.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cat_get_index.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-cvar_get_index.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-pvar_get_index.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-attrutil.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libmpi_la-dup_fn.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libmpi_la-allgather_allcomm_nb.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_recursive_doubling.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_brucks.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_ring.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_allcomm_nb.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_recursive_doubling.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_brucks.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_ring.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_allcomm_nb.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_recursive_doubling.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_smp.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_allcomm_nb.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_brucks.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_scattered.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_inter_pairwise_exchange.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_allcomm_nb.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_scattered.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_inter_pairwise_exchange.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_allcomm_nb.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_scattered.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_inter_pairwise_exchange.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libmpi_la-barrier_allcomm_nb.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_dissemination.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_smp.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libmpi_la-barrier_inter_bcast.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libmpi_la-bcast_utils.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libmpi_la-bcast_allcomm_nb.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_binomial.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_ring_allgather.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_smp.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libmpi_la-bcast_inter_remote_send_local_bcast.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/exscan/lib_libmpi_la-exscan_allcomm_nb.lo: \ + src/mpi/coll/exscan/$(am__dirstamp) \ + src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/exscan/lib_libmpi_la-exscan_intra_recursive_doubling.lo: \ + src/mpi/coll/exscan/$(am__dirstamp) \ + src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libmpi_la-gather_allcomm_nb.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libmpi_la-gather_intra_binomial.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libmpi_la-gather_inter_linear.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libmpi_la-gather_inter_local_gather_remote_send.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_nb.lo: \ + src/mpi/coll/gatherv/$(am__dirstamp) \ + src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_linear.lo: \ + src/mpi/coll/gatherv/$(am__dirstamp) \ + src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_allcomm_nb.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_halving.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_pairwise.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_noncommutative.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_allcomm_nb.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_pairwise.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libmpi_la-reduce_allcomm_nb.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_binomial.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_reduce_scatter_gather.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_smp.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libmpi_la-reduce_inter_local_reduce_remote_send.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/lib_libmpi_la-scan_allcomm_nb.lo: \ + src/mpi/coll/scan/$(am__dirstamp) \ + src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/lib_libmpi_la-scan_intra_recursive_doubling.lo: \ + src/mpi/coll/scan/$(am__dirstamp) \ + src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/lib_libmpi_la-scan_intra_smp.lo: \ + src/mpi/coll/scan/$(am__dirstamp) \ + src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libmpi_la-scatter_allcomm_nb.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libmpi_la-scatter_intra_binomial.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_linear.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_remote_send_local_scatter.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_nb.lo: \ + src/mpi/coll/scatterv/$(am__dirstamp) \ + src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_linear.lo: \ + src/mpi/coll/scatterv/$(am__dirstamp) \ + src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather_allcomm_nb.lo: \ + src/mpi/coll/neighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/neighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.lo: \ + src/mpi/coll/neighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall_allcomm_nb.lo: \ + src/mpi/coll/neighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.lo: \ + src/mpi/coll/neighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.lo: \ + src/mpi/coll/neighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_recursive_doubling.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_brucks.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_ring.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_gentran_algos.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_brucks.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_ring.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_recursive_doubling.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_brucks.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_ring.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_gentran_algos.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_ring.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_brucks.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_utils.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_naive.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_recursive_doubling.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_smp.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_gentran_algos.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_tree.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_inplace.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_brucks.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_pairwise.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_inter_pairwise_exchange.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_gentran_algos.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_brucks.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_ring.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_inplace.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_blocked.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_gentran_algos.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_gentran_scattered.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_inplace.lo: \ + src/mpi/coll/ialltoallw/$(am__dirstamp) \ + src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_blocked.lo: \ + src/mpi/coll/ialltoallw/$(am__dirstamp) \ + src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.lo: \ + src/mpi/coll/ialltoallw/$(am__dirstamp) \ + src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_recursive_doubling.lo: \ + src/mpi/coll/ibarrier/$(am__dirstamp) \ + src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_inter_bcast.lo: \ + src/mpi/coll/ibarrier/$(am__dirstamp) \ + src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_gentran_recexch.lo: \ + src/mpi/coll/ibarrier/$(am__dirstamp) \ + src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_binomial.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_smp.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_inter_flat.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_gentran_algos.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_tree.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_ring.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_utils.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iexscan/lib_libmpi_la-iexscan_intra_recursive_doubling.lo: \ + src/mpi/coll/iexscan/$(am__dirstamp) \ + src/mpi/coll/iexscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libmpi_la-igather_intra_binomial.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libmpi_la-igather_inter_short.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libmpi_la-igather_inter_long.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libmpi_la-igather_gentran_algos.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libmpi_la-igather_intra_gentran_tree.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igatherv/lib_libmpi_la-igatherv_allcomm_linear.lo: \ + src/mpi/coll/igatherv/$(am__dirstamp) \ + src/mpi/coll/igatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_pairwise.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_noncommutative.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_gentran_algos.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_gentran_algos.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_binomial.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_smp.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_gentran_algos.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_tree.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_ring.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_recursive_doubling.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_smp.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libmpi_la-iscan_gentran_algos.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_binomial.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_linear.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_gentran_algos.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_gentran_tree.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv_allcomm_linear.lo: \ + src/mpi/coll/iscatterv/$(am__dirstamp) \ + src/mpi/coll/iscatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_gentran_algos.lo: \ + src/mpi/coll/ineighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.lo: \ + src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_gentran_algos.lo: \ + src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.lo: \ + src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.lo: \ + src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opsum.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opmax.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opmin.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opband.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opbor.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opbxor.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opland.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-oplor.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-oplxor.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opprod.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opminloc.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opmaxloc.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opno_op.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libmpi_la-opreplace.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce_group/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/allreduce_group + @: > src/mpi/coll/allreduce_group/$(am__dirstamp) +src/mpi/coll/allreduce_group/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/allreduce_group/$(DEPDIR) + @: > src/mpi/coll/allreduce_group/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce_group/lib_libmpi_la-allreduce_group.lo: \ + src/mpi/coll/allreduce_group/$(am__dirstamp) \ + src/mpi/coll/allreduce_group/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/src/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/src + @: > src/mpi/coll/src/$(am__dirstamp) +src/mpi/coll/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/src/$(DEPDIR) + @: > src/mpi/coll/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/src/lib_libmpi_la-coll_impl.lo: \ + src/mpi/coll/src/$(am__dirstamp) \ + src/mpi/coll/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/gentran/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/transports/gentran + @: > src/mpi/coll/transports/gentran/$(am__dirstamp) +src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/transports/gentran/$(DEPDIR) + @: > src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_impl.lo: \ + src/mpi/coll/transports/gentran/$(am__dirstamp) \ + src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_utils.lo: \ + src/mpi/coll/transports/gentran/$(am__dirstamp) \ + src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/gentran/lib_libmpi_la-tsp_gentran.lo: \ + src/mpi/coll/transports/gentran/$(am__dirstamp) \ + src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/stubtran/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/transports/stubtran + @: > src/mpi/coll/transports/stubtran/$(am__dirstamp) +src/mpi/coll/transports/stubtran/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/transports/stubtran/$(DEPDIR) + @: > src/mpi/coll/transports/stubtran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/stubtran/lib_libmpi_la-stubtran_impl.lo: \ + src/mpi/coll/transports/stubtran/$(am__dirstamp) \ + src/mpi/coll/transports/stubtran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/stubtran/lib_libmpi_la-tsp_stubtran.lo: \ + src/mpi/coll/transports/stubtran/$(am__dirstamp) \ + src/mpi/coll/transports/stubtran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/treealgo/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/algorithms/treealgo + @: > src/mpi/coll/algorithms/treealgo/$(am__dirstamp) +src/mpi/coll/algorithms/treealgo/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/algorithms/treealgo/$(DEPDIR) + @: > src/mpi/coll/algorithms/treealgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treealgo.lo: \ + src/mpi/coll/algorithms/treealgo/$(am__dirstamp) \ + src/mpi/coll/algorithms/treealgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treeutil.lo: \ + src/mpi/coll/algorithms/treealgo/$(am__dirstamp) \ + src/mpi/coll/algorithms/treealgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/recexchalgo/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/algorithms/recexchalgo + @: > src/mpi/coll/algorithms/recexchalgo/$(am__dirstamp) +src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/algorithms/recexchalgo/$(DEPDIR) + @: > src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/recexchalgo/lib_libmpi_la-recexchalgo.lo: \ + src/mpi/coll/algorithms/recexchalgo/$(am__dirstamp) \ + src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/stubalgo/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/algorithms/stubalgo + @: > src/mpi/coll/algorithms/stubalgo/$(am__dirstamp) +src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/algorithms/stubalgo/$(DEPDIR) + @: > src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/stubalgo/lib_libmpi_la-stubalgo.lo: \ + src/mpi/coll/algorithms/stubalgo/$(am__dirstamp) \ + src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll + @: > src/mpi/coll/$(am__dirstamp) +src/mpi/coll/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/coll/$(DEPDIR) + @: > src/mpi/coll/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/lib_libmpi_la-helper_fns.lo: \ + src/mpi/coll/$(am__dirstamp) \ + src/mpi/coll/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/lib_libmpi_la-nbcutil.lo: \ + src/mpi/coll/$(am__dirstamp) \ + src/mpi/coll/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-commutil.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libmpi_la-contextid.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/$(am__dirstamp): + @$(MKDIR_P) src/mpi/datatype/typerep/dataloop + @: > src/mpi/datatype/typerep/dataloop/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/datatype/typerep/dataloop/$(DEPDIR) + @: > src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-darray_support.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_blockindexed.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_contig.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_indexed.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_struct.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_vector.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-looputil.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_count.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_flatten.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-subarray_support.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_debug.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/$(am__dirstamp): + @$(MKDIR_P) src/mpi/datatype/typerep/src + @: > src/mpi/datatype/typerep/src/$(am__dirstamp) +src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/datatype/typerep/src/$(DEPDIR) + @: > src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_flatten.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack_external.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_iov.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_create.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_debug.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-typeutil.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-ext32_datatype.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_blockindexed.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_create_pairtype.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libmpi_la-type_debug.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-errutil.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libmpi_la-dynerrutil.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libmpi_la-grouputil.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libmpi_la-infoutil.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-initinfo.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-async.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libmpi_la-netloc_util.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libmpi_la-bsendutil.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libmpi_la-mpir_request.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-winutil.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libmpi_la-rmatypeutil.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libmpi_la-topoutil.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/util/mem/$(am__dirstamp): + @$(MKDIR_P) src/util/mem + @: > src/util/mem/$(am__dirstamp) +src/util/mem/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/util/mem/$(DEPDIR) + @: > src/util/mem/$(DEPDIR)/$(am__dirstamp) +src/util/mem/lib_libmpi_la-handlemem.lo: \ + src/util/mem/$(am__dirstamp) \ + src/util/mem/$(DEPDIR)/$(am__dirstamp) +src/util/mem/lib_libmpi_la-strerror.lo: \ + src/util/mem/$(am__dirstamp) \ + src/util/mem/$(DEPDIR)/$(am__dirstamp) +src/util/cvar/$(am__dirstamp): + @$(MKDIR_P) src/util/cvar + @: > src/util/cvar/$(am__dirstamp) +src/util/cvar/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/util/cvar/$(DEPDIR) + @: > src/util/cvar/$(DEPDIR)/$(am__dirstamp) +src/util/cvar/lib_libmpi_la-mpir_cvars.lo: \ + src/util/cvar/$(am__dirstamp) \ + src/util/cvar/$(DEPDIR)/$(am__dirstamp) +src/util/procmap/$(am__dirstamp): + @$(MKDIR_P) src/util/procmap + @: > src/util/procmap/$(am__dirstamp) +src/util/procmap/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/util/procmap/$(DEPDIR) + @: > src/util/procmap/$(DEPDIR)/$(am__dirstamp) +src/util/procmap/lib_libmpi_la-local_proc.lo: \ + src/util/procmap/$(am__dirstamp) \ + src/util/procmap/$(DEPDIR)/$(am__dirstamp) +src/util/assert/$(am__dirstamp): + @$(MKDIR_P) src/util/assert + @: > src/util/assert/$(am__dirstamp) +src/util/assert/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/util/assert/$(DEPDIR) + @: > src/util/assert/$(DEPDIR)/$(am__dirstamp) +src/util/assert/lib_libmpi_la-assert.lo: \ + src/util/assert/$(am__dirstamp) \ + src/util/assert/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpi_la-fdebug.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libmpi_la-setbot.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/setbotf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_util.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/glue/romio/lib_libmpi_la-glue_romio.lo: \ + src/glue/romio/$(am__dirstamp) \ + src/glue/romio/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/src + @: > src/mpid/ch3/src/$(am__dirstamp) +src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/src/$(DEPDIR) + @: > src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_buffer.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_comm.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_comm_spawn_multiple.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_connection.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_pkt.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_req.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_revoke_pkt.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_send_req.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_op_req.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_port.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_recvq.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_request.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_progress.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_ops.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_reqops.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_sync.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_pkthandler.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_rndv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_eager.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_eagersync.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-ch3u_win_fns.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_abort.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_datatype.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_op.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_recv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_send.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_disconnect.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_spawn_multiple.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_failure_ack.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_get_all_failed_procs.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_revoke.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_finalize.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_get_universe_size.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_getpname.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_improbe.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_imrecv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_init.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_iprobe.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_irecv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_irsend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_isend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_issend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_mprobe.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_mrecv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_port.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_probe.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_recv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_rsend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_send.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_ssend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_startall.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_vc.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_rma.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpidi_rma.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpid_aint.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpidi_isend_self.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpidi_pg.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libmpi_la-mpidi_printf.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/util/sock/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/util/sock + @: > src/mpid/ch3/util/sock/$(am__dirstamp) +src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/util/sock/$(DEPDIR) + @: > src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_init_sock.lo: \ + src/mpid/ch3/util/sock/$(am__dirstamp) \ + src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_connect_sock.lo: \ + src/mpid/ch3/util/sock/$(am__dirstamp) \ + src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_getinterfaces.lo: \ + src/mpid/ch3/util/sock/$(am__dirstamp) \ + src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/src + @: > src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/src/$(DEPDIR) + @: > src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_finalize.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_init.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isend.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isendv.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsg.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsgv.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_progress.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_rma_shm.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_win_fns.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_comm.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_eagernoncontig.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_init.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_mpich.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_ckpt.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_finalize.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network_poll.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_debug.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt_shm.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_net_array.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/netmod/tcp + @: > src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR) + @: > src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_finalize.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_init.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_send.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_utility.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-socksm.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_getip.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_ckpt.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/none/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/netmod/none + @: > src/mpid/ch3/channels/nemesis/netmod/none/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR) + @: > src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/none/lib_libmpi_la-none.lo: \ + src/mpid/ch3/channels/nemesis/netmod/none/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/netmod/ofi + @: > src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR) + @: > src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_init.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_cm.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_tagged.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_msg.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_data.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_progress.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/utils/monitor/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/utils/monitor + @: > src/mpid/ch3/channels/nemesis/utils/monitor/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR) + @: > src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/utils/monitor/lib_libmpi_la-papi_defs.lo: \ + src/mpid/ch3/channels/nemesis/utils/monitor/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/utils/replacements/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/utils/replacements + @: > src/mpid/ch3/channels/nemesis/utils/replacements/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR) + @: > src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/utils/replacements/lib_libmpi_la-mkstemp.lo: src/mpid/ch3/channels/nemesis/utils/replacements/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/sock/src + @: > src/mpid/ch3/channels/sock/src/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch3/channels/sock/src/$(DEPDIR) + @: > src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-sock.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_finalize.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_init.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isend.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isendv.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsg.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsgv.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_progress.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_win_fns.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/src + @: > src/mpid/ch4/src/$(am__dirstamp) +src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/src/$(DEPDIR) + @: > src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4_globals.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4_impl.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4_init.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4_comm.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4_spawn.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4_win.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4i_comm.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_buf.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_init.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_comm.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_proc.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_recvq.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_callbacks.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_origin_callbacks.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_target_callbacks.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_symheap.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4r_win.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-mpid_ch4_net_array.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals_default.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/generic/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/generic + @: > src/mpid/ch4/generic/$(am__dirstamp) +src/mpid/ch4/generic/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/generic/$(DEPDIR) + @: > src/mpid/ch4/generic/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/generic/lib_libmpi_la-mpidig_globals.lo: \ + src/mpid/ch4/generic/$(am__dirstamp) \ + src/mpid/ch4/generic/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/generic/lib_libmpi_la-mpidig_init.lo: \ + src/mpid/ch4/generic/$(am__dirstamp) \ + src/mpid/ch4/generic/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/src/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/netmod/src + @: > src/mpid/ch4/netmod/src/$(am__dirstamp) +src/mpid/ch4/netmod/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/netmod/src/$(DEPDIR) + @: > src/mpid/ch4/netmod/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/src/lib_libmpi_la-netmod_impl.lo: \ + src/mpid/ch4/netmod/src/$(am__dirstamp) \ + src/mpid/ch4/netmod/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/netmod/ofi + @: > src/mpid/ch4/netmod/ofi/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/netmod/ofi/$(DEPDIR) + @: > src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-func_table.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_comm.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_datatype.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_op.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_spawn.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_win.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-globals.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libmpi_la-util.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/netmod/ucx + @: > src/mpid/ch4/netmod/ucx/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/netmod/ucx/$(DEPDIR) + @: > src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libmpi_la-func_table.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_init.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_comm.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_datatype.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_op.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_spawn.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_win.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libmpi_la-globals.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/netmod/stubnm + @: > src/mpid/ch4/netmod/stubnm/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/netmod/stubnm/$(DEPDIR) + @: > src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-func_table.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_init.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_comm.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_datatype.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_op.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_spawn.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_win.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-globals.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/src + @: > src/mpid/ch4/shm/src/$(am__dirstamp) +src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/src/$(DEPDIR) + @: > src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-func_table.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-shm_init.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-shm_hooks.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-shm_dpm.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-shm_mem.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-shm_misc.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-shm_rma.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-shm_impl.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-topotree.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libmpi_la-topotree_util.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/stubshm + @: > src/mpid/ch4/shm/stubshm/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/stubshm/$(DEPDIR) + @: > src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libmpi_la-globals.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_comm.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_init.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_spawn.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_win.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/release_gather/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/posix/release_gather + @: > src/mpid/ch4/shm/posix/release_gather/$(am__dirstamp) +src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/posix/release_gather/$(DEPDIR) + @: > src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/release_gather/lib_libmpi_la-release_gather.lo: \ + src/mpid/ch4/shm/posix/release_gather/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/posix + @: > src/mpid/ch4/shm/posix/$(am__dirstamp) +src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/posix/$(DEPDIR) + @: > src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-globals.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_comm.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_init.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_op.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_datatype.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_spawn.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_win.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_eager_array.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_coll_init.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/fbox/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/posix/eager/fbox + @: > src/mpid/ch4/shm/posix/eager/fbox/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR) + @: > src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-globals.lo: \ + src/mpid/ch4/shm/posix/eager/fbox/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-func_table.lo: \ + src/mpid/ch4/shm/posix/eager/fbox/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/stub/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/posix/eager/stub + @: > src/mpid/ch4/shm/posix/eager/stub/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR) + @: > src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-globals.lo: \ + src/mpid/ch4/shm/posix/eager/stub/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-func_table.lo: \ + src/mpid/ch4/shm/posix/eager/stub/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/sched/$(am__dirstamp): + @$(MKDIR_P) src/mpid/common/sched + @: > src/mpid/common/sched/$(am__dirstamp) +src/mpid/common/sched/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/common/sched/$(DEPDIR) + @: > src/mpid/common/sched/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/sched/lib_libmpi_la-mpidu_sched.lo: \ + src/mpid/common/sched/$(am__dirstamp) \ + src/mpid/common/sched/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/$(am__dirstamp): + @$(MKDIR_P) src/mpid/common/hcoll + @: > src/mpid/common/hcoll/$(am__dirstamp) +src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/common/hcoll/$(DEPDIR) + @: > src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/lib_libmpi_la-hcoll_init.lo: \ + src/mpid/common/hcoll/$(am__dirstamp) \ + src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/lib_libmpi_la-hcoll_ops.lo: \ + src/mpid/common/hcoll/$(am__dirstamp) \ + src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/lib_libmpi_la-hcoll_dtypes.lo: \ + src/mpid/common/hcoll/$(am__dirstamp) \ + src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/lib_libmpi_la-hcoll_rte.lo: \ + src/mpid/common/hcoll/$(am__dirstamp) \ + src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/shm/$(am__dirstamp): + @$(MKDIR_P) src/mpid/common/shm + @: > src/mpid/common/shm/$(am__dirstamp) +src/mpid/common/shm/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/common/shm/$(DEPDIR) + @: > src/mpid/common/shm/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/shm/lib_libmpi_la-mpidu_shm_alloc.lo: \ + src/mpid/common/shm/$(am__dirstamp) \ + src/mpid/common/shm/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/shm/lib_libmpi_la-mpidu_shm_barrier.lo: \ + src/mpid/common/shm/$(am__dirstamp) \ + src/mpid/common/shm/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/bc/$(am__dirstamp): + @$(MKDIR_P) src/mpid/common/bc + @: > src/mpid/common/bc/$(am__dirstamp) +src/mpid/common/bc/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpid/common/bc/$(DEPDIR) + @: > src/mpid/common/bc/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/bc/lib_libmpi_la-mpidu_bc.lo: \ + src/mpid/common/bc/$(am__dirstamp) \ + src/mpid/common/bc/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libmpi_la-mpit.lo: src/mpi_t/$(am__dirstamp) \ + src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/nameserv/file/$(am__dirstamp): + @$(MKDIR_P) src/nameserv/file + @: > src/nameserv/file/$(am__dirstamp) +src/nameserv/file/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/nameserv/file/$(DEPDIR) + @: > src/nameserv/file/$(DEPDIR)/$(am__dirstamp) +src/nameserv/file/lib_libmpi_la-file_nameserv.lo: \ + src/nameserv/file/$(am__dirstamp) \ + src/nameserv/file/$(DEPDIR)/$(am__dirstamp) +src/nameserv/pmi/$(am__dirstamp): + @$(MKDIR_P) src/nameserv/pmi + @: > src/nameserv/pmi/$(am__dirstamp) +src/nameserv/pmi/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/nameserv/pmi/$(DEPDIR) + @: > src/nameserv/pmi/$(DEPDIR)/$(am__dirstamp) +src/nameserv/pmi/lib_libmpi_la-pmi_nameserv.lo: \ + src/nameserv/pmi/$(am__dirstamp) \ + src/nameserv/pmi/$(DEPDIR)/$(am__dirstamp) +src/pmi/pmi2/simple/$(am__dirstamp): + @$(MKDIR_P) src/pmi/pmi2/simple + @: > src/pmi/pmi2/simple/$(am__dirstamp) +src/pmi/pmi2/simple/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/pmi/pmi2/simple/$(DEPDIR) + @: > src/pmi/pmi2/simple/$(DEPDIR)/$(am__dirstamp) +src/pmi/pmi2/simple/lib_libmpi_la-simple2pmi.lo: \ + src/pmi/pmi2/simple/$(am__dirstamp) \ + src/pmi/pmi2/simple/$(DEPDIR)/$(am__dirstamp) +src/pmi/pmi2/simple/lib_libmpi_la-simple_pmiutil.lo: \ + src/pmi/pmi2/simple/$(am__dirstamp) \ + src/pmi/pmi2/simple/$(DEPDIR)/$(am__dirstamp) +src/pmi/simple/$(am__dirstamp): + @$(MKDIR_P) src/pmi/simple + @: > src/pmi/simple/$(am__dirstamp) +src/pmi/simple/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/pmi/simple/$(DEPDIR) + @: > src/pmi/simple/$(DEPDIR)/$(am__dirstamp) +src/pmi/simple/lib_libmpi_la-simple_pmiutil.lo: \ + src/pmi/simple/$(am__dirstamp) \ + src/pmi/simple/$(DEPDIR)/$(am__dirstamp) +src/pmi/simple/lib_libmpi_la-simple_pmi.lo: \ + src/pmi/simple/$(am__dirstamp) \ + src/pmi/simple/$(DEPDIR)/$(am__dirstamp) + +lib/libmpi.la: $(lib_libmpi_la_OBJECTS) $(lib_libmpi_la_DEPENDENCIES) $(EXTRA_lib_libmpi_la_DEPENDENCIES) lib/$(am__dirstamp) + $(AM_V_GEN)$(lib_libmpi_la_LINK) $(am_lib_libmpi_la_rpath) $(lib_libmpi_la_OBJECTS) $(lib_libmpi_la_LIBADD) $(LIBS) +src/mpi/attr/lib_libpmpi_la-attr_delete.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-attr_get.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-attr_put.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-comm_create_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-comm_delete_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-comm_free_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-comm_get_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-comm_set_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-keyval_create.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-keyval_free.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-type_create_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-type_delete_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-type_free_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-type_get_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-type_set_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-win_create_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-win_delete_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-win_free_keyval.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-win_get_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-win_set_attr.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libpmpi_la-allgather.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libpmpi_la-barrier.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libpmpi_la-bcast.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/exscan/lib_libpmpi_la-exscan.lo: \ + src/mpi/coll/exscan/$(am__dirstamp) \ + src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libpmpi_la-gather.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gatherv/lib_libpmpi_la-gatherv.lo: \ + src/mpi/coll/gatherv/$(am__dirstamp) \ + src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libpmpi_la-reduce.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/lib_libpmpi_la-scan.lo: \ + src/mpi/coll/scan/$(am__dirstamp) \ + src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libpmpi_la-scatter.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatterv/lib_libpmpi_la-scatterv.lo: \ + src/mpi/coll/scatterv/$(am__dirstamp) \ + src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather.lo: \ + src/mpi/coll/neighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/neighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv.lo: \ + src/mpi/coll/neighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall.lo: \ + src/mpi/coll/neighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv.lo: \ + src/mpi/coll/neighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw.lo: \ + src/mpi/coll/neighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw.lo: \ + src/mpi/coll/ialltoallw/$(am__dirstamp) \ + src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier.lo: \ + src/mpi/coll/ibarrier/$(am__dirstamp) \ + src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iexscan/lib_libpmpi_la-iexscan.lo: \ + src/mpi/coll/iexscan/$(am__dirstamp) \ + src/mpi/coll/iexscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libpmpi_la-igather.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igatherv/lib_libpmpi_la-igatherv.lo: \ + src/mpi/coll/igatherv/$(am__dirstamp) \ + src/mpi/coll/igatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libpmpi_la-iscan.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv.lo: \ + src/mpi/coll/iscatterv/$(am__dirstamp) \ + src/mpi/coll/iscatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather.lo: \ + src/mpi/coll/ineighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv.lo: \ + src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall.lo: \ + src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv.lo: \ + src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw.lo: \ + src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-op_create.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-op_free.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-op_commutative.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_local/lib_libpmpi_la-reduce_local.lo: \ + src/mpi/coll/reduce_local/$(am__dirstamp) \ + src/mpi/coll/reduce_local/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_compare.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_create.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_create_group.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_dup.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_dup_with_info.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_free.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_get_name.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_get_info.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_set_info.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_group.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_idup.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_rank.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_size.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_remote_group.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_remote_size.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_set_name.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_split.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_test_inter.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-intercomm_create.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-intercomm_merge.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_split_type.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_failure_ack.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_failure_get_acked.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_revoke.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_shrink.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-comm_agree.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-address.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-get_address.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-get_count.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-get_elements.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-get_elements_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-pack.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-pack_external.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-pack_external_size.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-pack_size.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-status_set_elements.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-status_set_elements_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_get_name.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_set_name.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_size.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_size_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_extent.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_vector.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_commit.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_indexed.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_hindexed.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_struct.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_contiguous.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_free.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_hvector.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_dup.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_get_envelope.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_get_contents.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_ub.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_lb.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_get_extent.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_get_extent_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_get_true_extent.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_get_true_extent_x.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_match_size.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_struct.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_hindexed.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_hvector.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_indexed_block.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_hindexed_block.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_resized.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_darray.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_subarray.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-unpack.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-unpack_external.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-add_error_code.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-add_error_class.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-add_error_string.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-comm_call_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-comm_create_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-comm_get_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-comm_set_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-errhandler_create.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-errhandler_free.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-errhandler_get.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-errhandler_set.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-error_class.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-error_string.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-file_create_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-file_get_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-file_set_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-file_call_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-win_create_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-win_call_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-win_get_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-win_set_errhandler.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_compare.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_difference.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_excl.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_free.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_incl.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_intersection.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_range_excl.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_range_incl.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_rank.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_size.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_translate_ranks.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-group_union.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_create.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_delete.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_dup.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_free.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_get.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_getn.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_getnth.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_getvallen.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-info_set.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-abort.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-init.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-initialized.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-initthread.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-ismain.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-finalize.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-finalized.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-querythread.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libpmpi_la-getpname.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libpmpi_la-pcontrol.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libpmpi_la-version.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libpmpi_la-library_version.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libpmpi_la-aint_add.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libpmpi_la-aint_diff.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/misc/lib_libpmpi_la-utils.lo: \ + src/mpi/misc/$(am__dirstamp) \ + src/mpi/misc/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-bsend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-bsend_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-bufattach.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-buffree.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-ibsend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-improbe.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-imrecv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-iprobe.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-irecv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-irsend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-isend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-issend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-mprobe.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-mrecv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-probe.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-recv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-recv_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-rsend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-rsend_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-send.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-send_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-sendrecv.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-sendrecv_rep.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-ssend.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-ssend_init.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-cancel.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-greq_start.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-greq_complete.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-request_free.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-request_get_status.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-status_set_cancelled.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-start.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-startall.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-test.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-test_cancelled.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-testall.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-testany.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-testsome.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-wait.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-waitall.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-waitany.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-waitsome.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-accumulate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-alloc_mem.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-compare_and_swap.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-fetch_and_op.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-free_mem.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-get.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-get_accumulate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-put.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-raccumulate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-rget.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-rget_accumulate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-rput.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_allocate.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_allocate_shared.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_attach.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_complete.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_create.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_create_dynamic.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_detach.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_fence.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_flush.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_flush_all.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_flush_local.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_flush_local_all.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_free.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_get_group.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_get_info.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_get_name.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_lock.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_lock_all.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_post.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_set_info.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_set_name.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_shared_query.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_start.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_sync.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_test.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_unlock.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_unlock_all.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-win_wait.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-comm_disconnect.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-comm_get_parent.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-comm_join.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-comm_spawn.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-comm_spawn_multiple.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-lookup_name.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-publish_name.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-unpublish_name.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-open_port.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-close_port.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-comm_connect.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/spawn/lib_libpmpi_la-comm_accept.lo: \ + src/mpi/spawn/$(am__dirstamp) \ + src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) +src/mpi/timer/lib_libpmpi_la-wtime.lo: \ + src/mpi/timer/$(am__dirstamp) \ + src/mpi/timer/$(DEPDIR)/$(am__dirstamp) +src/mpi/timer/lib_libpmpi_la-wtick.lo: \ + src/mpi/timer/$(am__dirstamp) \ + src/mpi/timer/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-cart_coords.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-cart_create.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-cart_get.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-cart_map.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-cart_rank.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-cart_shift.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-cart_sub.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-dims_create.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-graph_get.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-graph_map.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-graph_nbr.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-graphcreate.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-graphdimsget.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-graphnbrcnt.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-cartdim_get.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-topo_test.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-dist_gr_create_adj.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-dist_gr_create.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-dist_gr_neighb_count.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-dist_gr_neighb.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-statusf2c.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-statusc2f.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_int.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_real.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_complex.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/glue/romio/lib_libpmpi_la-all_romio_symbols.lo: \ + src/glue/romio/$(am__dirstamp) \ + src/glue/romio/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cat_changed.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cat_get_categories.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cat_get_cvars.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cat_get_info.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cat_get_num.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cat_get_pvars.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cvar_get_info.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cvar_get_num.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cvar_handle_alloc.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cvar_handle_free.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cvar_read.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cvar_write.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-enum_get_info.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-enum_get_item.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-mpit_finalize.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-mpit_initthread.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_get_info.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_get_num.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_handle_alloc.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_handle_free.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_read.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_readreset.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_reset.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_session_create.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_session_free.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_start.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_stop.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_write.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cat_get_index.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-cvar_get_index.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-pvar_get_index.lo: \ + src/mpi_t/$(am__dirstamp) src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-sendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-recvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-get_countf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-bsendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ssendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-rsendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-bufattachf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-bufdetachf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-isendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ibsendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-issendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-irsendf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-irecvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-waitf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-testf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-request_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-waitanyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-testanyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-waitallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-testallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-waitsomef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-testsomef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iprobef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-probef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cancelf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-testcancelf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-send_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-bsend_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ssend_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-rsend_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-recv_initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-startf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-startallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-sendrecvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-sndrcvrplf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typecontigf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_vectorf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_hvectorf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_indexedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_hindexedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_structf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_extentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_lbf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_ubf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_commitf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-get_elementsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-packf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-unpackf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-pack_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-barrierf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-bcastf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-gatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-gathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-scatterf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-scattervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-allgatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-allgathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallwf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-exscanf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-reducef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-op_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-op_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-allreducef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-redscatf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-scanf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-group_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-group_rankf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-grouptranksf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-group_comparef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_groupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-group_unionf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-groupinterf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-groupdifff.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-group_inclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-group_exclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-grouprinclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-grouprexclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-group_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_rankf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_comparef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dup_with_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_splitf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commtesticf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commrsizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commrgroupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iccreatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-icmergef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-attr_putf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-attr_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-attr_deletef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-topo_testf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dims_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-graph_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-graphdims_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-graph_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cartdim_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_rankf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_coordsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbcountf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbrsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_shiftf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_subf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_mapf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-graph_mapf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-getpnamef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-get_versionf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-get_library_versionf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-errhcreatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-errhsetf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-errhgetf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-errhfreef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-error_stringf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-error_classf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-finalizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-initializedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-abortf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-close_portf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_acceptf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_connectf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commdiscf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commparentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_joinf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_spawnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-spawnmultf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-lookup_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-open_portf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-publish_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-unpubnamef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-accumulatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-putf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_completef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_fencef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_groupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_lockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_postf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_startf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_testf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_waitf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocate_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_shared_queryf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_create_dynamicf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_attachf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_detachf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-get_accumulatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-fetch_and_opf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-compare_and_swapf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-rputf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-rgetf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-raccumulatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-rget_accumulatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_lock_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlock_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_flushf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_localf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_local_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_syncf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-adderrclassf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-adderrcodef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-adderrstringf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commcallerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commnewkeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commdelattrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commfreekeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commgetnamf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-filecallerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-greqcompletef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-greqstartf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-isthrmainf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-query_threadf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-statgetclf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-statsetelf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typenewkeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typedelattrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_dupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typefreekeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typegetcntsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typegetenvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typegnamef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typesetattrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typesetnamef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_match_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-wincallerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-winnewkeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-windelattrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-winfreekeyf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_attrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_namef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-alloc_memf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commcreerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commgeterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-commseterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-filecreerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-filegeterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-fileseterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-finalizedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-free_memf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-info_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-info_deletef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-info_dupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-info_freef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-info_getf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-infognkf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-infognthkf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-infovallenf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-info_setf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-pack_externalf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-packesizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-reqgetstatf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typedarrayf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typechindf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typechvecf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typecindbf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_create_hindexed_blockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typecresizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typecstructf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typecsubarrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typegetextentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-typegtextf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-unpackextf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-wincreerrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-wingeterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-winseterrf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_localf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-op_commutativef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_scatter_blockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_create_adjacentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighbors_countf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighborsf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-improbef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-imrecvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-mprobef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-mrecvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_idupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ibarrierf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ibcastf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-igatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-igathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iscatterf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iscattervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iallgatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iallgathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallwf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ireducef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iallreducef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatterf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatter_blockf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iscanf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-iexscanf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallwf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgatherf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgathervf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallvf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallwf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_split_typef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-get_elements_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-status_set_elements_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_extent_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_true_extent_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-type_size_xf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_create_groupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_ackf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_get_ackedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_revokef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_shrinkf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_agreef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_openf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_closef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_deletef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_preallocatef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_sizef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_groupf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_amodef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_infof.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_viewf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_viewf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_atf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_atf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_atf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_atf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_readf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_writef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_ireadf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwritef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_seekf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_positionf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_byte_offsetf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_orderedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_orderedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_seek_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_position_sharedf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_beginf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_endf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_type_extentf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-register_datarepf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_atomicityf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_atomicityf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_syncf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_at_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_at_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_allf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-initf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-initthreadf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-pcontrolf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-addressf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-getaddressf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-wtimef.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-wtickf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-aint_addf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-aint_difff.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_createf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dup_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-null_del_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-null_copy_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dup_comm_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_del_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_copy_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dup_win_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_del_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_copy_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-dup_type_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_del_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_copy_fnf.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-attrutil.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/attr/lib_libpmpi_la-dup_fn.lo: \ + src/mpi/attr/$(am__dirstamp) \ + src/mpi/attr/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libpmpi_la-allgather_allcomm_nb.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_recursive_doubling.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_brucks.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_ring.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgather/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.lo: \ + src/mpi/coll/allgather/$(am__dirstamp) \ + src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_allcomm_nb.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_recursive_doubling.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_brucks.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_ring.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.lo: \ + src/mpi/coll/allgatherv/$(am__dirstamp) \ + src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_allcomm_nb.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_recursive_doubling.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_smp.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.lo: \ + src/mpi/coll/allreduce/$(am__dirstamp) \ + src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_allcomm_nb.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_brucks.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_scattered.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_inter_pairwise_exchange.lo: \ + src/mpi/coll/alltoall/$(am__dirstamp) \ + src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_allcomm_nb.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_scattered.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.lo: \ + src/mpi/coll/alltoallv/$(am__dirstamp) \ + src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_allcomm_nb.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_scattered.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.lo: \ + src/mpi/coll/alltoallw/$(am__dirstamp) \ + src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libpmpi_la-barrier_allcomm_nb.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_dissemination.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_smp.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/barrier/lib_libpmpi_la-barrier_inter_bcast.lo: \ + src/mpi/coll/barrier/$(am__dirstamp) \ + src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libpmpi_la-bcast_utils.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libpmpi_la-bcast_allcomm_nb.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_binomial.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_smp.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/bcast/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.lo: \ + src/mpi/coll/bcast/$(am__dirstamp) \ + src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/exscan/lib_libpmpi_la-exscan_allcomm_nb.lo: \ + src/mpi/coll/exscan/$(am__dirstamp) \ + src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/exscan/lib_libpmpi_la-exscan_intra_recursive_doubling.lo: \ + src/mpi/coll/exscan/$(am__dirstamp) \ + src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libpmpi_la-gather_allcomm_nb.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libpmpi_la-gather_intra_binomial.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libpmpi_la-gather_inter_linear.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gather/lib_libpmpi_la-gather_inter_local_gather_remote_send.lo: \ + src/mpi/coll/gather/$(am__dirstamp) \ + src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_nb.lo: \ + src/mpi/coll/gatherv/$(am__dirstamp) \ + src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_linear.lo: \ + src/mpi/coll/gatherv/$(am__dirstamp) \ + src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_allcomm_nb.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_pairwise.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_noncommutative.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo: \ + src/mpi/coll/reduce_scatter/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo: \ + src/mpi/coll/reduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libpmpi_la-reduce_allcomm_nb.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_binomial.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_smp.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/reduce/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.lo: \ + src/mpi/coll/reduce/$(am__dirstamp) \ + src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/lib_libpmpi_la-scan_allcomm_nb.lo: \ + src/mpi/coll/scan/$(am__dirstamp) \ + src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/lib_libpmpi_la-scan_intra_recursive_doubling.lo: \ + src/mpi/coll/scan/$(am__dirstamp) \ + src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scan/lib_libpmpi_la-scan_intra_smp.lo: \ + src/mpi/coll/scan/$(am__dirstamp) \ + src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libpmpi_la-scatter_allcomm_nb.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libpmpi_la-scatter_intra_binomial.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_linear.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.lo: \ + src/mpi/coll/scatter/$(am__dirstamp) \ + src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_nb.lo: \ + src/mpi/coll/scatterv/$(am__dirstamp) \ + src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_linear.lo: \ + src/mpi/coll/scatterv/$(am__dirstamp) \ + src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather_allcomm_nb.lo: \ + src/mpi/coll/neighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/neighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.lo: \ + src/mpi/coll/neighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.lo: \ + src/mpi/coll/neighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.lo: \ + src/mpi/coll/neighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.lo: \ + src/mpi/coll/neighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_recursive_doubling.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_brucks.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_ring.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_gentran_algos.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_brucks.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_ring.lo: \ + src/mpi/coll/iallgather/$(am__dirstamp) \ + src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_brucks.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_ring.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_gentran_algos.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_ring.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_utils.lo: \ + src/mpi/coll/iallgatherv/$(am__dirstamp) \ + src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_naive.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_recursive_doubling.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_smp.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_gentran_algos.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_tree.lo: \ + src/mpi/coll/iallreduce/$(am__dirstamp) \ + src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_inplace.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_brucks.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_pairwise.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_gentran_algos.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_brucks.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_ring.lo: \ + src/mpi/coll/ialltoall/$(am__dirstamp) \ + src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_inplace.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_blocked.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_gentran_algos.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.lo: \ + src/mpi/coll/ialltoallv/$(am__dirstamp) \ + src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_inplace.lo: \ + src/mpi/coll/ialltoallw/$(am__dirstamp) \ + src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_blocked.lo: \ + src/mpi/coll/ialltoallw/$(am__dirstamp) \ + src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.lo: \ + src/mpi/coll/ialltoallw/$(am__dirstamp) \ + src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_recursive_doubling.lo: \ + src/mpi/coll/ibarrier/$(am__dirstamp) \ + src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_inter_bcast.lo: \ + src/mpi/coll/ibarrier/$(am__dirstamp) \ + src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_gentran_recexch.lo: \ + src/mpi/coll/ibarrier/$(am__dirstamp) \ + src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_binomial.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_smp.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_inter_flat.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_gentran_algos.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_tree.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_ring.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_utils.lo: \ + src/mpi/coll/ibcast/$(am__dirstamp) \ + src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iexscan/lib_libpmpi_la-iexscan_intra_recursive_doubling.lo: \ + src/mpi/coll/iexscan/$(am__dirstamp) \ + src/mpi/coll/iexscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libpmpi_la-igather_intra_binomial.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libpmpi_la-igather_inter_short.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libpmpi_la-igather_inter_long.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libpmpi_la-igather_gentran_algos.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igather/lib_libpmpi_la-igather_intra_gentran_tree.lo: \ + src/mpi/coll/igather/$(am__dirstamp) \ + src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/igatherv/lib_libpmpi_la-igatherv_allcomm_linear.lo: \ + src/mpi/coll/igatherv/$(am__dirstamp) \ + src/mpi/coll/igatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_pairwise.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_gentran_algos.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.lo: \ + src/mpi/coll/ireduce_scatter/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo: \ + src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) \ + src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_binomial.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_smp.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_gentran_algos.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_tree.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_ring.lo: \ + src/mpi/coll/ireduce/$(am__dirstamp) \ + src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_recursive_doubling.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_smp.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libpmpi_la-iscan_gentran_algos.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.lo: \ + src/mpi/coll/iscan/$(am__dirstamp) \ + src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_binomial.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_linear.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_gentran_algos.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_gentran_tree.lo: \ + src/mpi/coll/iscatter/$(am__dirstamp) \ + src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv_allcomm_linear.lo: \ + src/mpi/coll/iscatterv/$(am__dirstamp) \ + src/mpi/coll/iscatterv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_gentran_algos.lo: \ + src/mpi/coll/ineighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_allgather/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.lo: \ + src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.lo: \ + src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.lo: \ + src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.lo: \ + src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.lo: \ + src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo: \ + src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) \ + src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opsum.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opmax.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opmin.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opband.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opbor.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opbxor.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opland.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-oplor.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-oplxor.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opprod.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opminloc.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opmaxloc.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opno_op.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/op/lib_libpmpi_la-opreplace.lo: \ + src/mpi/coll/op/$(am__dirstamp) \ + src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/allreduce_group/lib_libpmpi_la-allreduce_group.lo: \ + src/mpi/coll/allreduce_group/$(am__dirstamp) \ + src/mpi/coll/allreduce_group/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/src/lib_libpmpi_la-coll_impl.lo: \ + src/mpi/coll/src/$(am__dirstamp) \ + src/mpi/coll/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_impl.lo: \ + src/mpi/coll/transports/gentran/$(am__dirstamp) \ + src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_utils.lo: \ + src/mpi/coll/transports/gentran/$(am__dirstamp) \ + src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/gentran/lib_libpmpi_la-tsp_gentran.lo: \ + src/mpi/coll/transports/gentran/$(am__dirstamp) \ + src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/stubtran/lib_libpmpi_la-stubtran_impl.lo: \ + src/mpi/coll/transports/stubtran/$(am__dirstamp) \ + src/mpi/coll/transports/stubtran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/transports/stubtran/lib_libpmpi_la-tsp_stubtran.lo: \ + src/mpi/coll/transports/stubtran/$(am__dirstamp) \ + src/mpi/coll/transports/stubtran/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treealgo.lo: \ + src/mpi/coll/algorithms/treealgo/$(am__dirstamp) \ + src/mpi/coll/algorithms/treealgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treeutil.lo: \ + src/mpi/coll/algorithms/treealgo/$(am__dirstamp) \ + src/mpi/coll/algorithms/treealgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/recexchalgo/lib_libpmpi_la-recexchalgo.lo: \ + src/mpi/coll/algorithms/recexchalgo/$(am__dirstamp) \ + src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/algorithms/stubalgo/lib_libpmpi_la-stubalgo.lo: \ + src/mpi/coll/algorithms/stubalgo/$(am__dirstamp) \ + src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/lib_libpmpi_la-helper_fns.lo: \ + src/mpi/coll/$(am__dirstamp) \ + src/mpi/coll/$(DEPDIR)/$(am__dirstamp) +src/mpi/coll/lib_libpmpi_la-nbcutil.lo: \ + src/mpi/coll/$(am__dirstamp) \ + src/mpi/coll/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-commutil.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/comm/lib_libpmpi_la-contextid.lo: \ + src/mpi/comm/$(am__dirstamp) \ + src/mpi/comm/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-darray_support.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_blockindexed.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_contig.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_indexed.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_struct.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_vector.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-looputil.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_count.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_flatten.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-subarray_support.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_debug.lo: \ + src/mpi/datatype/typerep/dataloop/$(am__dirstamp) \ + src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_flatten.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack_external.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_iov.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_create.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_debug.lo: \ + src/mpi/datatype/typerep/src/$(am__dirstamp) \ + src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-typeutil.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-ext32_datatype.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_blockindexed.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_create_pairtype.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/datatype/lib_libpmpi_la-type_debug.lo: \ + src/mpi/datatype/$(am__dirstamp) \ + src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-errutil.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/errhan/lib_libpmpi_la-dynerrutil.lo: \ + src/mpi/errhan/$(am__dirstamp) \ + src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) +src/mpi/group/lib_libpmpi_la-grouputil.lo: \ + src/mpi/group/$(am__dirstamp) \ + src/mpi/group/$(DEPDIR)/$(am__dirstamp) +src/mpi/info/lib_libpmpi_la-infoutil.lo: \ + src/mpi/info/$(am__dirstamp) \ + src/mpi/info/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-initinfo.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-async.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/init/lib_libpmpi_la-netloc_util.lo: \ + src/mpi/init/$(am__dirstamp) \ + src/mpi/init/$(DEPDIR)/$(am__dirstamp) +src/mpi/pt2pt/lib_libpmpi_la-bsendutil.lo: \ + src/mpi/pt2pt/$(am__dirstamp) \ + src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) +src/mpi/request/lib_libpmpi_la-mpir_request.lo: \ + src/mpi/request/$(am__dirstamp) \ + src/mpi/request/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-winutil.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/rma/lib_libpmpi_la-rmatypeutil.lo: \ + src/mpi/rma/$(am__dirstamp) \ + src/mpi/rma/$(DEPDIR)/$(am__dirstamp) +src/mpi/topo/lib_libpmpi_la-topoutil.lo: \ + src/mpi/topo/$(am__dirstamp) \ + src/mpi/topo/$(DEPDIR)/$(am__dirstamp) +src/util/mem/lib_libpmpi_la-handlemem.lo: \ + src/util/mem/$(am__dirstamp) \ + src/util/mem/$(DEPDIR)/$(am__dirstamp) +src/util/mem/lib_libpmpi_la-strerror.lo: \ + src/util/mem/$(am__dirstamp) \ + src/util/mem/$(DEPDIR)/$(am__dirstamp) +src/util/cvar/lib_libpmpi_la-mpir_cvars.lo: \ + src/util/cvar/$(am__dirstamp) \ + src/util/cvar/$(DEPDIR)/$(am__dirstamp) +src/util/procmap/lib_libpmpi_la-local_proc.lo: \ + src/util/procmap/$(am__dirstamp) \ + src/util/procmap/$(DEPDIR)/$(am__dirstamp) +src/util/assert/lib_libpmpi_la-assert.lo: \ + src/util/assert/$(am__dirstamp) \ + src/util/assert/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-fdebug.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/mpif_h/lib_libpmpi_la-setbot.lo: \ + src/binding/fortran/mpif_h/$(am__dirstamp) \ + src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) +src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_util.lo: \ + src/binding/fortran/use_mpi/$(am__dirstamp) \ + src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) +src/glue/romio/lib_libpmpi_la-glue_romio.lo: \ + src/glue/romio/$(am__dirstamp) \ + src/glue/romio/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_buffer.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm_spawn_multiple.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_connection.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_pkt.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_req.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_revoke_pkt.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_send_req.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_op_req.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_port.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_recvq.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_request.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_progress.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_ops.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_reqops.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_sync.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_pkthandler.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rndv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_eager.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_eagersync.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-ch3u_win_fns.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_abort.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_datatype.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_op.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_recv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_send.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_disconnect.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_spawn_multiple.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_failure_ack.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_get_all_failed_procs.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_revoke.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_finalize.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_get_universe_size.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_getpname.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_improbe.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_imrecv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_init.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_iprobe.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_irecv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_irsend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_isend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_issend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_mprobe.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_mrecv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_port.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_probe.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_recv.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_rsend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_send.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_ssend.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_startall.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_vc.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_rma.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpidi_rma.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpid_aint.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpidi_isend_self.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpidi_pg.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/src/lib_libpmpi_la-mpidi_printf.lo: \ + src/mpid/ch3/src/$(am__dirstamp) \ + src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_init_sock.lo: \ + src/mpid/ch3/util/sock/$(am__dirstamp) \ + src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_connect_sock.lo: \ + src/mpid/ch3/util/sock/$(am__dirstamp) \ + src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_getinterfaces.lo: \ + src/mpid/ch3/util/sock/$(am__dirstamp) \ + src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_finalize.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_init.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isend.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isendv.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsg.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsgv.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_progress.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_rma_shm.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_win_fns.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_comm.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_eagernoncontig.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_init.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_mpich.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_ckpt.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_finalize.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network_poll.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_debug.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt_shm.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_net_array.lo: \ + src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_finalize.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_init.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_send.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_utility.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-socksm.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_getip.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_ckpt.lo: \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/none/lib_libpmpi_la-none.lo: \ + src/mpid/ch3/channels/nemesis/netmod/none/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_init.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_cm.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_tagged.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_msg.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_data.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_progress.lo: \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/utils/monitor/lib_libpmpi_la-papi_defs.lo: \ + src/mpid/ch3/channels/nemesis/utils/monitor/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/nemesis/utils/replacements/lib_libpmpi_la-mkstemp.lo: src/mpid/ch3/channels/nemesis/utils/replacements/$(am__dirstamp) \ + src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-sock.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_finalize.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_init.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isend.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isendv.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsg.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsgv.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_progress.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_win_fns.lo: \ + src/mpid/ch3/channels/sock/src/$(am__dirstamp) \ + src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4_globals.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4_impl.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4_init.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4_comm.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4_spawn.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4_win.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4i_comm.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_buf.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_init.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_comm.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_proc.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_recvq.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_callbacks.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_origin_callbacks.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_target_callbacks.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_symheap.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4r_win.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-mpid_ch4_net_array.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals_default.lo: \ + src/mpid/ch4/src/$(am__dirstamp) \ + src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/generic/lib_libpmpi_la-mpidig_globals.lo: \ + src/mpid/ch4/generic/$(am__dirstamp) \ + src/mpid/ch4/generic/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/generic/lib_libpmpi_la-mpidig_init.lo: \ + src/mpid/ch4/generic/$(am__dirstamp) \ + src/mpid/ch4/generic/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/src/lib_libpmpi_la-netmod_impl.lo: \ + src/mpid/ch4/netmod/src/$(am__dirstamp) \ + src/mpid/ch4/netmod/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-func_table.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_init.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_comm.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_datatype.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_op.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_spawn.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_win.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-globals.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-util.lo: \ + src/mpid/ch4/netmod/ofi/$(am__dirstamp) \ + src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-func_table.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_init.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_comm.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_datatype.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_op.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_spawn.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_win.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-globals.lo: \ + src/mpid/ch4/netmod/ucx/$(am__dirstamp) \ + src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-func_table.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_init.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_comm.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_datatype.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_op.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_spawn.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_win.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-globals.lo: \ + src/mpid/ch4/netmod/stubnm/$(am__dirstamp) \ + src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-func_table.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_init.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_hooks.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_dpm.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_mem.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_misc.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_rma.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_impl.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-topotree.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/src/lib_libpmpi_la-topotree_util.lo: \ + src/mpid/ch4/shm/src/$(am__dirstamp) \ + src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-globals.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_comm.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_init.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_spawn.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_win.lo: \ + src/mpid/ch4/shm/stubshm/$(am__dirstamp) \ + src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/release_gather/lib_libpmpi_la-release_gather.lo: \ + src/mpid/ch4/shm/posix/release_gather/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-globals.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_comm.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_init.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_op.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_datatype.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_spawn.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_win.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_eager_array.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_coll_init.lo: \ + src/mpid/ch4/shm/posix/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-globals.lo: \ + src/mpid/ch4/shm/posix/eager/fbox/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-func_table.lo: \ + src/mpid/ch4/shm/posix/eager/fbox/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-globals.lo: \ + src/mpid/ch4/shm/posix/eager/stub/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/$(am__dirstamp) +src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-func_table.lo: \ + src/mpid/ch4/shm/posix/eager/stub/$(am__dirstamp) \ + src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/sched/lib_libpmpi_la-mpidu_sched.lo: \ + src/mpid/common/sched/$(am__dirstamp) \ + src/mpid/common/sched/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/lib_libpmpi_la-hcoll_init.lo: \ + src/mpid/common/hcoll/$(am__dirstamp) \ + src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/lib_libpmpi_la-hcoll_ops.lo: \ + src/mpid/common/hcoll/$(am__dirstamp) \ + src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/lib_libpmpi_la-hcoll_dtypes.lo: \ + src/mpid/common/hcoll/$(am__dirstamp) \ + src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/hcoll/lib_libpmpi_la-hcoll_rte.lo: \ + src/mpid/common/hcoll/$(am__dirstamp) \ + src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_alloc.lo: \ + src/mpid/common/shm/$(am__dirstamp) \ + src/mpid/common/shm/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_barrier.lo: \ + src/mpid/common/shm/$(am__dirstamp) \ + src/mpid/common/shm/$(DEPDIR)/$(am__dirstamp) +src/mpid/common/bc/lib_libpmpi_la-mpidu_bc.lo: \ + src/mpid/common/bc/$(am__dirstamp) \ + src/mpid/common/bc/$(DEPDIR)/$(am__dirstamp) +src/mpi_t/lib_libpmpi_la-mpit.lo: src/mpi_t/$(am__dirstamp) \ + src/mpi_t/$(DEPDIR)/$(am__dirstamp) +src/nameserv/file/lib_libpmpi_la-file_nameserv.lo: \ + src/nameserv/file/$(am__dirstamp) \ + src/nameserv/file/$(DEPDIR)/$(am__dirstamp) +src/nameserv/pmi/lib_libpmpi_la-pmi_nameserv.lo: \ + src/nameserv/pmi/$(am__dirstamp) \ + src/nameserv/pmi/$(DEPDIR)/$(am__dirstamp) +src/pmi/pmi2/simple/lib_libpmpi_la-simple2pmi.lo: \ + src/pmi/pmi2/simple/$(am__dirstamp) \ + src/pmi/pmi2/simple/$(DEPDIR)/$(am__dirstamp) +src/pmi/pmi2/simple/lib_libpmpi_la-simple_pmiutil.lo: \ + src/pmi/pmi2/simple/$(am__dirstamp) \ + src/pmi/pmi2/simple/$(DEPDIR)/$(am__dirstamp) +src/pmi/simple/lib_libpmpi_la-simple_pmiutil.lo: \ + src/pmi/simple/$(am__dirstamp) \ + src/pmi/simple/$(DEPDIR)/$(am__dirstamp) +src/pmi/simple/lib_libpmpi_la-simple_pmi.lo: \ + src/pmi/simple/$(am__dirstamp) \ + src/pmi/simple/$(DEPDIR)/$(am__dirstamp) + +lib/libpmpi.la: $(lib_libpmpi_la_OBJECTS) $(lib_libpmpi_la_DEPENDENCIES) $(EXTRA_lib_libpmpi_la_DEPENDENCIES) lib/$(am__dirstamp) + $(AM_V_GEN)$(lib_libpmpi_la_LINK) $(am_lib_libpmpi_la_rpath) $(lib_libpmpi_la_OBJECTS) $(lib_libpmpi_la_LIBADD) $(LIBS) +src/mpi/debugger/$(am__dirstamp): + @$(MKDIR_P) src/mpi/debugger + @: > src/mpi/debugger/$(am__dirstamp) +src/mpi/debugger/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/mpi/debugger/$(DEPDIR) + @: > src/mpi/debugger/$(DEPDIR)/$(am__dirstamp) +src/mpi/debugger/lib_libtvmpich_la-dll_mpich.lo: \ + src/mpi/debugger/$(am__dirstamp) \ + src/mpi/debugger/$(DEPDIR)/$(am__dirstamp) + +lib/libtvmpich.la: $(lib_libtvmpich_la_OBJECTS) $(lib_libtvmpich_la_DEPENDENCIES) $(EXTRA_lib_libtvmpich_la_DEPENDENCIES) lib/$(am__dirstamp) + $(AM_V_CCLD)$(lib_libtvmpich_la_LINK) $(am_lib_libtvmpich_la_rpath) $(lib_libtvmpich_la_OBJECTS) $(lib_libtvmpich_la_LIBADD) $(LIBS) +src/mpi/debugger/libdbginitdummy_la-dbginit.lo: \ + src/mpi/debugger/$(am__dirstamp) \ + src/mpi/debugger/$(DEPDIR)/$(am__dirstamp) + +src/mpi/debugger/libdbginitdummy.la: $(src_mpi_debugger_libdbginitdummy_la_OBJECTS) $(src_mpi_debugger_libdbginitdummy_la_DEPENDENCIES) $(EXTRA_src_mpi_debugger_libdbginitdummy_la_DEPENDENCIES) src/mpi/debugger/$(am__dirstamp) + $(AM_V_CCLD)$(src_mpi_debugger_libdbginitdummy_la_LINK) $(am_src_mpi_debugger_libdbginitdummy_la_rpath) $(src_mpi_debugger_libdbginitdummy_la_OBJECTS) $(src_mpi_debugger_libdbginitdummy_la_LIBADD) $(LIBS) +src/pm/util/$(am__dirstamp): + @$(MKDIR_P) src/pm/util + @: > src/pm/util/$(am__dirstamp) +src/pm/util/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/pm/util/$(DEPDIR) + @: > src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-cmnargs.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-process.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-ioloop.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-pmiserv.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-labelout.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-env.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-newsession.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-rm.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-pmiport.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-dbgiface.lo: src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) +src/pm/util/libmpiexec_la-simple_pmiutil2.lo: \ + src/pm/util/$(am__dirstamp) \ + src/pm/util/$(DEPDIR)/$(am__dirstamp) + +src/pm/util/libmpiexec.la: $(src_pm_util_libmpiexec_la_OBJECTS) $(src_pm_util_libmpiexec_la_DEPENDENCIES) $(EXTRA_src_pm_util_libmpiexec_la_DEPENDENCIES) src/pm/util/$(am__dirstamp) + $(AM_V_CCLD)$(src_pm_util_libmpiexec_la_LINK) $(am_src_pm_util_libmpiexec_la_rpath) $(src_pm_util_libmpiexec_la_OBJECTS) $(src_pm_util_libmpiexec_la_LIBADD) $(LIBS) +src/env/$(am__dirstamp): + @$(MKDIR_P) src/env + @: > src/env/$(am__dirstamp) +src/env/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/env/$(DEPDIR) + @: > src/env/$(DEPDIR)/$(am__dirstamp) +src/env/mpichversion.$(OBJEXT): src/env/$(am__dirstamp) \ + src/env/$(DEPDIR)/$(am__dirstamp) + +src/env/mpichversion$(EXEEXT): $(src_env_mpichversion_OBJECTS) $(src_env_mpichversion_DEPENDENCIES) $(EXTRA_src_env_mpichversion_DEPENDENCIES) src/env/$(am__dirstamp) + @rm -f src/env/mpichversion$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_env_mpichversion_OBJECTS) $(src_env_mpichversion_LDADD) $(LIBS) +src/env/mpivars.$(OBJEXT): src/env/$(am__dirstamp) \ + src/env/$(DEPDIR)/$(am__dirstamp) + +src/env/mpivars$(EXEEXT): $(src_env_mpivars_OBJECTS) $(src_env_mpivars_DEPENDENCIES) $(EXTRA_src_env_mpivars_DEPENDENCIES) src/env/$(am__dirstamp) + @rm -f src/env/mpivars$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_env_mpivars_OBJECTS) $(src_env_mpivars_LDADD) $(LIBS) +src/pm/gforker/$(am__dirstamp): + @$(MKDIR_P) src/pm/gforker + @: > src/pm/gforker/$(am__dirstamp) +src/pm/gforker/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/pm/gforker/$(DEPDIR) + @: > src/pm/gforker/$(DEPDIR)/$(am__dirstamp) +src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.$(OBJEXT): \ + src/pm/gforker/$(am__dirstamp) \ + src/pm/gforker/$(DEPDIR)/$(am__dirstamp) + +src/pm/gforker/mpiexec$(EXEEXT): $(src_pm_gforker_mpiexec_OBJECTS) $(src_pm_gforker_mpiexec_DEPENDENCIES) $(EXTRA_src_pm_gforker_mpiexec_DEPENDENCIES) src/pm/gforker/$(am__dirstamp) + @rm -f src/pm/gforker/mpiexec$(EXEEXT) + $(AM_V_CCLD)$(src_pm_gforker_mpiexec_LINK) $(src_pm_gforker_mpiexec_OBJECTS) $(src_pm_gforker_mpiexec_LDADD) $(LIBS) +src/pm/gforker/mpiexec_gforker-mpiexec.$(OBJEXT): \ + src/pm/gforker/$(am__dirstamp) \ + src/pm/gforker/$(DEPDIR)/$(am__dirstamp) + +src/pm/gforker/mpiexec.gforker$(EXEEXT): $(src_pm_gforker_mpiexec_gforker_OBJECTS) $(src_pm_gforker_mpiexec_gforker_DEPENDENCIES) $(EXTRA_src_pm_gforker_mpiexec_gforker_DEPENDENCIES) src/pm/gforker/$(am__dirstamp) + @rm -f src/pm/gforker/mpiexec.gforker$(EXEEXT) + $(AM_V_CCLD)$(src_pm_gforker_mpiexec_gforker_LINK) $(src_pm_gforker_mpiexec_gforker_OBJECTS) $(src_pm_gforker_mpiexec_gforker_LDADD) $(LIBS) +src/pm/remshell/$(am__dirstamp): + @$(MKDIR_P) src/pm/remshell + @: > src/pm/remshell/$(am__dirstamp) +src/pm/remshell/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/pm/remshell/$(DEPDIR) + @: > src/pm/remshell/$(DEPDIR)/$(am__dirstamp) +src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.$(OBJEXT): \ + src/pm/remshell/$(am__dirstamp) \ + src/pm/remshell/$(DEPDIR)/$(am__dirstamp) + +src/pm/remshell/mpiexec$(EXEEXT): $(src_pm_remshell_mpiexec_OBJECTS) $(src_pm_remshell_mpiexec_DEPENDENCIES) $(EXTRA_src_pm_remshell_mpiexec_DEPENDENCIES) src/pm/remshell/$(am__dirstamp) + @rm -f src/pm/remshell/mpiexec$(EXEEXT) + $(AM_V_CCLD)$(src_pm_remshell_mpiexec_LINK) $(src_pm_remshell_mpiexec_OBJECTS) $(src_pm_remshell_mpiexec_LDADD) $(LIBS) +src/pm/remshell/mpiexec_remshell-mpiexec.$(OBJEXT): \ + src/pm/remshell/$(am__dirstamp) \ + src/pm/remshell/$(DEPDIR)/$(am__dirstamp) + +src/pm/remshell/mpiexec.remshell$(EXEEXT): $(src_pm_remshell_mpiexec_remshell_OBJECTS) $(src_pm_remshell_mpiexec_remshell_DEPENDENCIES) $(EXTRA_src_pm_remshell_mpiexec_remshell_DEPENDENCIES) src/pm/remshell/$(am__dirstamp) + @rm -f src/pm/remshell/mpiexec.remshell$(EXEEXT) + $(AM_V_CCLD)$(src_pm_remshell_mpiexec_remshell_LINK) $(src_pm_remshell_mpiexec_remshell_OBJECTS) $(src_pm_remshell_mpiexec_remshell_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f src/binding/cxx/*.$(OBJEXT) + -rm -f src/binding/cxx/*.lo + -rm -f src/binding/fortran/mpif_h/*.$(OBJEXT) + -rm -f src/binding/fortran/mpif_h/*.lo + -rm -f src/binding/fortran/use_mpi/*.$(OBJEXT) + -rm -f src/binding/fortran/use_mpi/*.lo + -rm -f src/binding/fortran/use_mpi_f08/*.$(OBJEXT) + -rm -f src/binding/fortran/use_mpi_f08/*.lo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/*.$(OBJEXT) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/*.lo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_f/*.$(OBJEXT) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_f/*.lo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_f/profiling/*.$(OBJEXT) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_f/profiling/*.lo + -rm -f src/env/*.$(OBJEXT) + -rm -f src/glue/romio/*.$(OBJEXT) + -rm -f src/glue/romio/*.lo + -rm -f src/mpi/attr/*.$(OBJEXT) + -rm -f src/mpi/attr/*.lo + -rm -f src/mpi/coll/*.$(OBJEXT) + -rm -f src/mpi/coll/*.lo + -rm -f src/mpi/coll/algorithms/recexchalgo/*.$(OBJEXT) + -rm -f src/mpi/coll/algorithms/recexchalgo/*.lo + -rm -f src/mpi/coll/algorithms/stubalgo/*.$(OBJEXT) + -rm -f src/mpi/coll/algorithms/stubalgo/*.lo + -rm -f src/mpi/coll/algorithms/treealgo/*.$(OBJEXT) + -rm -f src/mpi/coll/algorithms/treealgo/*.lo + -rm -f src/mpi/coll/allgather/*.$(OBJEXT) + -rm -f src/mpi/coll/allgather/*.lo + -rm -f src/mpi/coll/allgatherv/*.$(OBJEXT) + -rm -f src/mpi/coll/allgatherv/*.lo + -rm -f src/mpi/coll/allreduce/*.$(OBJEXT) + -rm -f src/mpi/coll/allreduce/*.lo + -rm -f src/mpi/coll/allreduce_group/*.$(OBJEXT) + -rm -f src/mpi/coll/allreduce_group/*.lo + -rm -f src/mpi/coll/alltoall/*.$(OBJEXT) + -rm -f src/mpi/coll/alltoall/*.lo + -rm -f src/mpi/coll/alltoallv/*.$(OBJEXT) + -rm -f src/mpi/coll/alltoallv/*.lo + -rm -f src/mpi/coll/alltoallw/*.$(OBJEXT) + -rm -f src/mpi/coll/alltoallw/*.lo + -rm -f src/mpi/coll/barrier/*.$(OBJEXT) + -rm -f src/mpi/coll/barrier/*.lo + -rm -f src/mpi/coll/bcast/*.$(OBJEXT) + -rm -f src/mpi/coll/bcast/*.lo + -rm -f src/mpi/coll/exscan/*.$(OBJEXT) + -rm -f src/mpi/coll/exscan/*.lo + -rm -f src/mpi/coll/gather/*.$(OBJEXT) + -rm -f src/mpi/coll/gather/*.lo + -rm -f src/mpi/coll/gatherv/*.$(OBJEXT) + -rm -f src/mpi/coll/gatherv/*.lo + -rm -f src/mpi/coll/iallgather/*.$(OBJEXT) + -rm -f src/mpi/coll/iallgather/*.lo + -rm -f src/mpi/coll/iallgatherv/*.$(OBJEXT) + -rm -f src/mpi/coll/iallgatherv/*.lo + -rm -f src/mpi/coll/iallreduce/*.$(OBJEXT) + -rm -f src/mpi/coll/iallreduce/*.lo + -rm -f src/mpi/coll/ialltoall/*.$(OBJEXT) + -rm -f src/mpi/coll/ialltoall/*.lo + -rm -f src/mpi/coll/ialltoallv/*.$(OBJEXT) + -rm -f src/mpi/coll/ialltoallv/*.lo + -rm -f src/mpi/coll/ialltoallw/*.$(OBJEXT) + -rm -f src/mpi/coll/ialltoallw/*.lo + -rm -f src/mpi/coll/ibarrier/*.$(OBJEXT) + -rm -f src/mpi/coll/ibarrier/*.lo + -rm -f src/mpi/coll/ibcast/*.$(OBJEXT) + -rm -f src/mpi/coll/ibcast/*.lo + -rm -f src/mpi/coll/iexscan/*.$(OBJEXT) + -rm -f src/mpi/coll/iexscan/*.lo + -rm -f src/mpi/coll/igather/*.$(OBJEXT) + -rm -f src/mpi/coll/igather/*.lo + -rm -f src/mpi/coll/igatherv/*.$(OBJEXT) + -rm -f src/mpi/coll/igatherv/*.lo + -rm -f src/mpi/coll/ineighbor_allgather/*.$(OBJEXT) + -rm -f src/mpi/coll/ineighbor_allgather/*.lo + -rm -f src/mpi/coll/ineighbor_allgatherv/*.$(OBJEXT) + -rm -f src/mpi/coll/ineighbor_allgatherv/*.lo + -rm -f src/mpi/coll/ineighbor_alltoall/*.$(OBJEXT) + -rm -f src/mpi/coll/ineighbor_alltoall/*.lo + -rm -f src/mpi/coll/ineighbor_alltoallv/*.$(OBJEXT) + -rm -f src/mpi/coll/ineighbor_alltoallv/*.lo + -rm -f src/mpi/coll/ineighbor_alltoallw/*.$(OBJEXT) + -rm -f src/mpi/coll/ineighbor_alltoallw/*.lo + -rm -f src/mpi/coll/ireduce/*.$(OBJEXT) + -rm -f src/mpi/coll/ireduce/*.lo + -rm -f src/mpi/coll/ireduce_scatter/*.$(OBJEXT) + -rm -f src/mpi/coll/ireduce_scatter/*.lo + -rm -f src/mpi/coll/ireduce_scatter_block/*.$(OBJEXT) + -rm -f src/mpi/coll/ireduce_scatter_block/*.lo + -rm -f src/mpi/coll/iscan/*.$(OBJEXT) + -rm -f src/mpi/coll/iscan/*.lo + -rm -f src/mpi/coll/iscatter/*.$(OBJEXT) + -rm -f src/mpi/coll/iscatter/*.lo + -rm -f src/mpi/coll/iscatterv/*.$(OBJEXT) + -rm -f src/mpi/coll/iscatterv/*.lo + -rm -f src/mpi/coll/neighbor_allgather/*.$(OBJEXT) + -rm -f src/mpi/coll/neighbor_allgather/*.lo + -rm -f src/mpi/coll/neighbor_allgatherv/*.$(OBJEXT) + -rm -f src/mpi/coll/neighbor_allgatherv/*.lo + -rm -f src/mpi/coll/neighbor_alltoall/*.$(OBJEXT) + -rm -f src/mpi/coll/neighbor_alltoall/*.lo + -rm -f src/mpi/coll/neighbor_alltoallv/*.$(OBJEXT) + -rm -f src/mpi/coll/neighbor_alltoallv/*.lo + -rm -f src/mpi/coll/neighbor_alltoallw/*.$(OBJEXT) + -rm -f src/mpi/coll/neighbor_alltoallw/*.lo + -rm -f src/mpi/coll/op/*.$(OBJEXT) + -rm -f src/mpi/coll/op/*.lo + -rm -f src/mpi/coll/reduce/*.$(OBJEXT) + -rm -f src/mpi/coll/reduce/*.lo + -rm -f src/mpi/coll/reduce_local/*.$(OBJEXT) + -rm -f src/mpi/coll/reduce_local/*.lo + -rm -f src/mpi/coll/reduce_scatter/*.$(OBJEXT) + -rm -f src/mpi/coll/reduce_scatter/*.lo + -rm -f src/mpi/coll/reduce_scatter_block/*.$(OBJEXT) + -rm -f src/mpi/coll/reduce_scatter_block/*.lo + -rm -f src/mpi/coll/scan/*.$(OBJEXT) + -rm -f src/mpi/coll/scan/*.lo + -rm -f src/mpi/coll/scatter/*.$(OBJEXT) + -rm -f src/mpi/coll/scatter/*.lo + -rm -f src/mpi/coll/scatterv/*.$(OBJEXT) + -rm -f src/mpi/coll/scatterv/*.lo + -rm -f src/mpi/coll/src/*.$(OBJEXT) + -rm -f src/mpi/coll/src/*.lo + -rm -f src/mpi/coll/transports/gentran/*.$(OBJEXT) + -rm -f src/mpi/coll/transports/gentran/*.lo + -rm -f src/mpi/coll/transports/stubtran/*.$(OBJEXT) + -rm -f src/mpi/coll/transports/stubtran/*.lo + -rm -f src/mpi/comm/*.$(OBJEXT) + -rm -f src/mpi/comm/*.lo + -rm -f src/mpi/datatype/*.$(OBJEXT) + -rm -f src/mpi/datatype/*.lo + -rm -f src/mpi/datatype/typerep/dataloop/*.$(OBJEXT) + -rm -f src/mpi/datatype/typerep/dataloop/*.lo + -rm -f src/mpi/datatype/typerep/src/*.$(OBJEXT) + -rm -f src/mpi/datatype/typerep/src/*.lo + -rm -f src/mpi/debugger/*.$(OBJEXT) + -rm -f src/mpi/debugger/*.lo + -rm -f src/mpi/errhan/*.$(OBJEXT) + -rm -f src/mpi/errhan/*.lo + -rm -f src/mpi/group/*.$(OBJEXT) + -rm -f src/mpi/group/*.lo + -rm -f src/mpi/info/*.$(OBJEXT) + -rm -f src/mpi/info/*.lo + -rm -f src/mpi/init/*.$(OBJEXT) + -rm -f src/mpi/init/*.lo + -rm -f src/mpi/misc/*.$(OBJEXT) + -rm -f src/mpi/misc/*.lo + -rm -f src/mpi/pt2pt/*.$(OBJEXT) + -rm -f src/mpi/pt2pt/*.lo + -rm -f src/mpi/request/*.$(OBJEXT) + -rm -f src/mpi/request/*.lo + -rm -f src/mpi/rma/*.$(OBJEXT) + -rm -f src/mpi/rma/*.lo + -rm -f src/mpi/spawn/*.$(OBJEXT) + -rm -f src/mpi/spawn/*.lo + -rm -f src/mpi/timer/*.$(OBJEXT) + -rm -f src/mpi/timer/*.lo + -rm -f src/mpi/topo/*.$(OBJEXT) + -rm -f src/mpi/topo/*.lo + -rm -f src/mpi_t/*.$(OBJEXT) + -rm -f src/mpi_t/*.lo + -rm -f src/mpid/ch3/channels/nemesis/netmod/none/*.$(OBJEXT) + -rm -f src/mpid/ch3/channels/nemesis/netmod/none/*.lo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/*.$(OBJEXT) + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/*.lo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/*.$(OBJEXT) + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/*.lo + -rm -f src/mpid/ch3/channels/nemesis/src/*.$(OBJEXT) + -rm -f src/mpid/ch3/channels/nemesis/src/*.lo + -rm -f src/mpid/ch3/channels/nemesis/utils/monitor/*.$(OBJEXT) + -rm -f src/mpid/ch3/channels/nemesis/utils/monitor/*.lo + -rm -f src/mpid/ch3/channels/nemesis/utils/replacements/*.$(OBJEXT) + -rm -f src/mpid/ch3/channels/nemesis/utils/replacements/*.lo + -rm -f src/mpid/ch3/channels/sock/src/*.$(OBJEXT) + -rm -f src/mpid/ch3/channels/sock/src/*.lo + -rm -f src/mpid/ch3/src/*.$(OBJEXT) + -rm -f src/mpid/ch3/src/*.lo + -rm -f src/mpid/ch3/util/sock/*.$(OBJEXT) + -rm -f src/mpid/ch3/util/sock/*.lo + -rm -f src/mpid/ch4/generic/*.$(OBJEXT) + -rm -f src/mpid/ch4/generic/*.lo + -rm -f src/mpid/ch4/netmod/ofi/*.$(OBJEXT) + -rm -f src/mpid/ch4/netmod/ofi/*.lo + -rm -f src/mpid/ch4/netmod/src/*.$(OBJEXT) + -rm -f src/mpid/ch4/netmod/src/*.lo + -rm -f src/mpid/ch4/netmod/stubnm/*.$(OBJEXT) + -rm -f src/mpid/ch4/netmod/stubnm/*.lo + -rm -f src/mpid/ch4/netmod/ucx/*.$(OBJEXT) + -rm -f src/mpid/ch4/netmod/ucx/*.lo + -rm -f src/mpid/ch4/shm/posix/*.$(OBJEXT) + -rm -f src/mpid/ch4/shm/posix/*.lo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/*.$(OBJEXT) + -rm -f src/mpid/ch4/shm/posix/eager/fbox/*.lo + -rm -f src/mpid/ch4/shm/posix/eager/stub/*.$(OBJEXT) + -rm -f src/mpid/ch4/shm/posix/eager/stub/*.lo + -rm -f src/mpid/ch4/shm/posix/release_gather/*.$(OBJEXT) + -rm -f src/mpid/ch4/shm/posix/release_gather/*.lo + -rm -f src/mpid/ch4/shm/src/*.$(OBJEXT) + -rm -f src/mpid/ch4/shm/src/*.lo + -rm -f src/mpid/ch4/shm/stubshm/*.$(OBJEXT) + -rm -f src/mpid/ch4/shm/stubshm/*.lo + -rm -f src/mpid/ch4/src/*.$(OBJEXT) + -rm -f src/mpid/ch4/src/*.lo + -rm -f src/mpid/common/bc/*.$(OBJEXT) + -rm -f src/mpid/common/bc/*.lo + -rm -f src/mpid/common/hcoll/*.$(OBJEXT) + -rm -f src/mpid/common/hcoll/*.lo + -rm -f src/mpid/common/sched/*.$(OBJEXT) + -rm -f src/mpid/common/sched/*.lo + -rm -f src/mpid/common/shm/*.$(OBJEXT) + -rm -f src/mpid/common/shm/*.lo + -rm -f src/nameserv/file/*.$(OBJEXT) + -rm -f src/nameserv/file/*.lo + -rm -f src/nameserv/pmi/*.$(OBJEXT) + -rm -f src/nameserv/pmi/*.lo + -rm -f src/pm/gforker/*.$(OBJEXT) + -rm -f src/pm/remshell/*.$(OBJEXT) + -rm -f src/pm/util/*.$(OBJEXT) + -rm -f src/pm/util/*.lo + -rm -f src/pmi/pmi2/simple/*.$(OBJEXT) + -rm -f src/pmi/pmi2/simple/*.lo + -rm -f src/pmi/simple/*.$(OBJEXT) + -rm -f src/pmi/simple/*.lo + -rm -f src/util/assert/*.$(OBJEXT) + -rm -f src/util/assert/*.lo + -rm -f src/util/cvar/*.$(OBJEXT) + -rm -f src/util/cvar/*.lo + -rm -f src/util/mem/*.$(OBJEXT) + -rm -f src/util/mem/*.lo + -rm -f src/util/procmap/*.$(OBJEXT) + -rm -f src/util/procmap/*.lo + +distclean-compile: + -rm -f *.tab.c + +include src/binding/cxx/$(DEPDIR)/initcxx.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-abortf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-accumulatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrclassf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrcodef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrstringf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-addressf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_addf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_difff.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alloc_memf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allreducef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallwf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_deletef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_putf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-barrierf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bcastf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsend_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufattachf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufdetachf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cancelf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_coordsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_mapf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_rankf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_shiftf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_subf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cartdim_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-close_portf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_acceptf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_agreef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_comparef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_connectf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_create_groupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dup_with_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_ackf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_get_ackedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_groupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_idupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_joinf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_rankf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_revokef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_shrinkf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_spawnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_split_typef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_splitf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcallerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcreerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdelattrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdiscf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commfreekeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgeterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgetnamf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commnewkeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commparentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrgroupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrsizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commseterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commtesticf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-compare_and_swapf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dims_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_create_adjacentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighbors_countf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighborsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_comm_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_type_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_win_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhcreatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhfreef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhgetf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhsetf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_classf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_stringf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-exscanf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fetch_and_opf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_closef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_deletef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_amodef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_atomicityf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_byte_offsetf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_groupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_position_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_positionf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_type_extentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_viewf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_at_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_atf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_ireadf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_atf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwritef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_openf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_preallocatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_atf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_orderedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_readf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seek_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seekf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_atomicityf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_viewf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_syncf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_atf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_orderedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_writef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecallerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecreerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filegeterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fileseterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-free_memf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_accumulatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_countf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elements_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elementsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_library_versionf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_versionf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getaddressf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getpnamef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_mapf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graphdims_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqcompletef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqstartf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbcountf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbrsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_comparef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_exclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_inclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_rankf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_unionf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupdifff.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupinterf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprexclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprinclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouptranksf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallreducef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallwf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibarrierf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibcastf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibsendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iccreatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-icmergef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iexscanf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-improbef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-imrecvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallwf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_deletef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_dupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_setf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognkf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognthkf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infovallenf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initializedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initthreadf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iprobef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irecvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_blockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatterf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireducef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irsendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscanf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscatterf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscattervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-issendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isthrmainf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-lookup_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mprobef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mrecvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallwf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_copy_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_del_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_copy_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_del_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_copy_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_del_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_copy_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_del_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_commutativef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-open_portf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_externalf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packesizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pcontrolf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-probef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-publish_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-putf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-query_threadf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-raccumulatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recv_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-redscatf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_localf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_blockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reducef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-register_datarepf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reqgetstatf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-request_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rget_accumulatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rgetf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rputf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsend_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scanf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scatterf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scattervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-send_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendrecvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sndrcvrplf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-spawnmultf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssend_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statgetclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statsetelf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-status_set_elements_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testanyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testcancelf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testsomef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-topo_testf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_commitf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_create_hindexed_blockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_dupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_extentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_extent_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_true_extent_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hindexedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hvectorf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_indexedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_lbf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_match_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_size_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_structf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_ubf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_vectorf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechindf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechvecf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecindbf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecontigf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecresizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecstructf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecsubarrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedarrayf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedelattrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typefreekeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetcntsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetenvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetextentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegnamef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegtextf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typenewkeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetattrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetnamef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackextf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpubnamef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitanyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitsomef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocate_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_attachf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_completef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_create_dynamicf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_detachf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_fencef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_local_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_localf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flushf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_groupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lock_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_postf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_shared_queryf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_startf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_syncf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_testf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlock_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_waitf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincallerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincreerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-windelattrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winfreekeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wingeterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winnewkeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winseterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtickf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtimef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-fdebug.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-setbot.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusc2f.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusf2c.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-abortf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-accumulatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrclassf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrcodef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrstringf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-addressf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_addf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_difff.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alloc_memf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allreducef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallwf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_deletef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_putf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-barrierf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bcastf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsend_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufattachf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufdetachf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cancelf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_coordsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_mapf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_rankf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_shiftf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_subf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cartdim_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-close_portf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_acceptf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_agreef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_comparef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_connectf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_create_groupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_ackf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_ackedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_groupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_idupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_joinf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_rankf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_revokef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_shrinkf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_spawnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_split_typef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_splitf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcallerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcreerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdelattrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdiscf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commfreekeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgeterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgetnamf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commnewkeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commparentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrgroupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrsizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commseterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commtesticf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-compare_and_swapf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dims_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_create_adjacentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighbors_countf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighborsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_comm_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_type_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_win_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhcreatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhfreef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhgetf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhsetf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_classf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_stringf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-exscanf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fdebug.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fetch_and_opf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_closef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_deletef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_amodef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_atomicityf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_byte_offsetf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_groupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_position_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_positionf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_type_extentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_viewf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_at_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_atf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_ireadf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_at_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_atf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwritef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_openf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_preallocatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_atf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_orderedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_readf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seek_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seekf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_atomicityf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_viewf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_syncf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_atf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_beginf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_endf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_orderedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_writef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecallerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecreerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filegeterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fileseterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-free_memf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_accumulatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_countf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elements_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elementsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_library_versionf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_versionf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getaddressf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getpnamef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_mapf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graphdims_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqcompletef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqstartf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbcountf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbrsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_comparef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_exclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_inclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_rankf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_unionf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupdifff.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupinterf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprexclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprinclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouptranksf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallreducef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallwf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibarrierf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibcastf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibsendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iccreatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-icmergef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iexscanf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-improbef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-imrecvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallwf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_deletef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_dupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_getf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_setf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognkf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognthkf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infovallenf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initializedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initthreadf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iprobef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irecvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_blockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatterf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireducef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irsendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscanf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscatterf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscattervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-issendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isthrmainf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-lookup_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mprobef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mrecvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgathervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallwf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_copy_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_del_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_copy_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_del_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_copy_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_del_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_copy_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_del_fnf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_commutativef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-open_portf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_externalf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packesizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pcontrolf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-probef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-publish_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-putf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-query_threadf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-raccumulatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recv_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-redscatf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_localf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_blockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reducef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-register_datarepf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reqgetstatf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-request_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rget_accumulatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rgetf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rputf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsend_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scanf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scatterf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scattervf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-send_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendrecvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-setbot.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sndrcvrplf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-spawnmultf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssend_initf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssendf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statgetclf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statsetelf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-status_set_elements_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusc2f.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusf2c.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testanyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testcancelf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testsomef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-topo_testf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_commitf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_blockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_dupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_extentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_extent_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hindexedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hvectorf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_indexedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_lbf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_match_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_size_xf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_sizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_structf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_ubf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_vectorf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechindf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechvecf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecindbf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecontigf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecresizef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecstructf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecsubarrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedarrayf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedelattrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typefreekeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetcntsf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetenvf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetextentf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegnamef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegtextf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typenewkeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetattrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetnamef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackextf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpubnamef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitallf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitanyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitsomef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocate_sharedf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocatef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_attachf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_completef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_create_dynamicf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_createf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_detachf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_fencef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_local_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_localf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flushf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_freef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_groupf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lock_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_postf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_attrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_infof.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_namef.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_shared_queryf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_startf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_syncf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_testf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlock_allf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlockf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_waitf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincallerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincreerrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-windelattrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winfreekeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wingeterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winnewkeyf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winseterrf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtickf.Plo # am--include-marker +include src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtimef.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90cmplxf.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90intf.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90realf.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_complex.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_int.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_real.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_util.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_complex.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_int.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_real.Plo # am--include-marker +include src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_util.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-accumulate_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgather_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgatherv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allreduce_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoall_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallw_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bcast_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_init_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-buffer_attach_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_c.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_multiple_c.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-compare_and_swap_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-exscan_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-f_sync_reg_c.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-fetch_and_op_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_all_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_all_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_shared_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_all_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_all_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_shared_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_begin_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_end_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_begin_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_end_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_begin_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_end_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_shared_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_begin_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_end_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_begin_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_end_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_begin_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_end_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_shared_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-free_mem_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gather_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gatherv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_accumulate_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_address_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgather_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgatherv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallreduce_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoall_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallw_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibcast_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibsend_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iexscan_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igather_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igatherv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-imrecv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgather_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoall_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallw_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irecv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_block_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irsend_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscan_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatter_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatterv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-isend_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-issend_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-mrecv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgather_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoall_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallw_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_external_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-put_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-raccumulate_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_init_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_local_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_block_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_accumulate_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rput_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_init_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scan_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatter_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatterv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_init_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_replace_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_init_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_external_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-utils.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_attach_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_create_cdesc.Plo # am--include-marker +include src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_detach_cdesc.Plo # am--include-marker +include src/env/$(DEPDIR)/mpichversion.Po # am--include-marker +include src/env/$(DEPDIR)/mpivars.Po # am--include-marker +include src/glue/romio/$(DEPDIR)/lib_libmpi_la-all_romio_symbols.Plo # am--include-marker +include src/glue/romio/$(DEPDIR)/lib_libmpi_la-glue_romio.Plo # am--include-marker +include src/glue/romio/$(DEPDIR)/lib_libpmpi_la-all_romio_symbols.Plo # am--include-marker +include src/glue/romio/$(DEPDIR)/lib_libpmpi_la-glue_romio.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_delete.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_get.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_put.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attrutil.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_create_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_delete_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_free_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_get_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_set_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-dup_fn.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_create.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_free.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_create_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_delete_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_free_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_get_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_set_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_create_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_delete_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_free_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_get_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_set_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_delete.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_get.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_put.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attrutil.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_create_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_delete_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_free_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_get_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_set_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-dup_fn.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_create.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_free.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_create_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_delete_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_free_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_get_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_set_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_create_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_delete_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_free_keyval.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_get_attr.Plo # am--include-marker +include src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_set_attr.Plo # am--include-marker +include src/mpi/coll/$(DEPDIR)/lib_libmpi_la-helper_fns.Plo # am--include-marker +include src/mpi/coll/$(DEPDIR)/lib_libmpi_la-nbcutil.Plo # am--include-marker +include src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-helper_fns.Plo # am--include-marker +include src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-nbcutil.Plo # am--include-marker +include src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libmpi_la-recexchalgo.Plo # am--include-marker +include src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libpmpi_la-recexchalgo.Plo # am--include-marker +include src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libmpi_la-stubalgo.Plo # am--include-marker +include src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libpmpi_la-stubalgo.Plo # am--include-marker +include src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treealgo.Plo # am--include-marker +include src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treeutil.Plo # am--include-marker +include src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treealgo.Plo # am--include-marker +include src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treeutil.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_brucks.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_ring.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_brucks.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_ring.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_brucks.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_ring.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_brucks.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_ring.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_smp.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.Plo # am--include-marker +include src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_smp.Plo # am--include-marker +include src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libmpi_la-allreduce_group.Plo # am--include-marker +include src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libpmpi_la-allreduce_group.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_brucks.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_scattered.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_brucks.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo # am--include-marker +include src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_scattered.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_scattered.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo # am--include-marker +include src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_scattered.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_scattered.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo # am--include-marker +include src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_scattered.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_inter_bcast.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_dissemination.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_smp.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_inter_bcast.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_dissemination.Plo # am--include-marker +include src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_smp.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_inter_remote_send_local_bcast.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_binomial.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_ring_allgather.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_smp.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_utils.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_binomial.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_smp.Plo # am--include-marker +include src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_utils.Plo # am--include-marker +include src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan.Plo # am--include-marker +include src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan.Plo # am--include-marker +include src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_linear.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_local_gather_remote_send.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_intra_binomial.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_linear.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_local_gather_remote_send.Plo # am--include-marker +include src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_intra_binomial.Plo # am--include-marker +include src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv.Plo # am--include-marker +include src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv.Plo # am--include-marker +include src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_brucks.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_brucks.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_ring.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_brucks.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_brucks.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_ring.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_brucks.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_brucks.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_ring.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_utils.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_brucks.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_ring.Plo # am--include-marker +include src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_utils.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_naive.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_smp.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_naive.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo # am--include-marker +include src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_smp.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_brucks.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_brucks.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_inplace.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_brucks.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_brucks.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_inplace.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_blocked.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_gentran_scattered.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_inplace.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_blocked.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.Plo # am--include-marker +include src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_inplace.Plo # am--include-marker +include src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw.Plo # am--include-marker +include src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_blocked.Plo # am--include-marker +include src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_inplace.Plo # am--include-marker +include src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw.Plo # am--include-marker +include src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.Plo # am--include-marker +include src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_blocked.Plo # am--include-marker +include src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_inplace.Plo # am--include-marker +include src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier.Plo # am--include-marker +include src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_inter_bcast.Plo # am--include-marker +include src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_gentran_recexch.Plo # am--include-marker +include src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier.Plo # am--include-marker +include src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_inter_bcast.Plo # am--include-marker +include src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_gentran_recexch.Plo # am--include-marker +include src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_inter_flat.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_binomial.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_smp.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_utils.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_inter_flat.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_binomial.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_smp.Plo # am--include-marker +include src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_utils.Plo # am--include-marker +include src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan.Plo # am--include-marker +include src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan.Plo # am--include-marker +include src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_gentran_algos.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_long.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_short.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_binomial.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_gentran_algos.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_long.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_short.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_binomial.Plo # am--include-marker +include src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv.Plo # am--include-marker +include src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv.Plo # am--include-marker +include src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_binomial.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_smp.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_binomial.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_ring.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.Plo # am--include-marker +include src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_smp.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_noncommutative.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_smp.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_smp.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_linear.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_binomial.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_gentran_algos.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_linear.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_binomial.Plo # am--include-marker +include src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_gentran_tree.Plo # am--include-marker +include src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv.Plo # am--include-marker +include src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv.Plo # am--include-marker +include src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather.Plo # am--include-marker +include src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather.Plo # am--include-marker +include src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv.Plo # am--include-marker +include src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv.Plo # am--include-marker +include src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw.Plo # am--include-marker +include src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_commutative.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_create.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_free.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opband.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbor.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbxor.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opland.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplor.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplxor.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmax.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmaxloc.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmin.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opminloc.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opno_op.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opprod.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opreplace.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opsum.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_commutative.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_create.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_free.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opband.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbor.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbxor.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opland.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplor.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplxor.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmax.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmaxloc.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmin.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opminloc.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opno_op.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opprod.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opreplace.Plo # am--include-marker +include src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opsum.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_inter_local_reduce_remote_send.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_binomial.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_reduce_scatter_gather.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_smp.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_binomial.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.Plo # am--include-marker +include src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_smp.Plo # am--include-marker +include src/mpi/coll/reduce_local/$(DEPDIR)/lib_libmpi_la-reduce_local.Plo # am--include-marker +include src/mpi/coll/reduce_local/$(DEPDIR)/lib_libpmpi_la-reduce_local.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_noncommutative.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_halving.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_noncommutative.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.Plo # am--include-marker +include src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan.Plo # am--include-marker +include src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_smp.Plo # am--include-marker +include src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan.Plo # am--include-marker +include src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_recursive_doubling.Plo # am--include-marker +include src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_smp.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_linear.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_remote_send_local_scatter.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_intra_binomial.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_linear.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.Plo # am--include-marker +include src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_intra_binomial.Plo # am--include-marker +include src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv.Plo # am--include-marker +include src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv.Plo # am--include-marker +include src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_linear.Plo # am--include-marker +include src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_nb.Plo # am--include-marker +include src/mpi/coll/src/$(DEPDIR)/lib_libmpi_la-coll_impl.Plo # am--include-marker +include src/mpi/coll/src/$(DEPDIR)/lib_libpmpi_la-coll_impl.Plo # am--include-marker +include src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_impl.Plo # am--include-marker +include src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_utils.Plo # am--include-marker +include src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-tsp_gentran.Plo # am--include-marker +include src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_impl.Plo # am--include-marker +include src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_utils.Plo # am--include-marker +include src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-tsp_gentran.Plo # am--include-marker +include src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-stubtran_impl.Plo # am--include-marker +include src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-tsp_stubtran.Plo # am--include-marker +include src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-stubtran_impl.Plo # am--include-marker +include src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-tsp_stubtran.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_agree.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_compare.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create_group.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup_with_info.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_ack.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_get_acked.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_free.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_info.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_name.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_group.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_idup.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_rank.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_group.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_size.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_revoke.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_info.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_name.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_shrink.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_size.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split_type.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_test_inter.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-commutil.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-contextid.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_create.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_merge.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_agree.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_compare.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create_group.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_info.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_ack.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_acked.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_free.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_info.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_name.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_group.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_idup.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_rank.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_group.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_size.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_revoke.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_info.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_name.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_shrink.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_size.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split_type.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_test_inter.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-commutil.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-contextid.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_create.Plo # am--include-marker +include src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_merge.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-address.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-ext32_datatype.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_address.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_count.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external_size.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_size.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_blockindexed.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_commit.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_contiguous.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_darray.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed_block.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hvector.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_indexed_block.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_pairtype.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_resized.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_struct.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_subarray.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_debug.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_dup.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_extent.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_free.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_contents.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_envelope.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_name.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hindexed.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hvector.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_indexed.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_lb.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_match_size.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_set_name.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_struct.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_ub.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_vector.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-typeutil.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack_external.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-address.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-ext32_datatype.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_address.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_count.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external_size.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_size.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_blockindexed.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_commit.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_contiguous.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_darray.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_block.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hvector.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_indexed_block.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_pairtype.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_resized.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_struct.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_subarray.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_debug.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_dup.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_extent.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_free.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_contents.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_envelope.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_name.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hindexed.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hvector.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_indexed.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_lb.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_match_size.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_set_name.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size_x.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_struct.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_ub.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_vector.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-typeutil.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack.Plo # am--include-marker +include src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack_external.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-darray_support.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_blockindexed.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_contig.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_indexed.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_struct.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_vector.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_debug.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-looputil.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_count.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_flatten.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-subarray_support.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-darray_support.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_blockindexed.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_contig.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_indexed.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_struct.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_vector.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_debug.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-looputil.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_count.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_flatten.Plo # am--include-marker +include src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-subarray_support.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_create.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_debug.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_flatten.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_iov.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack_external.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_create.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_debug.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_flatten.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_iov.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack.Plo # am--include-marker +include src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack_external.Plo # am--include-marker +include src/mpi/debugger/$(DEPDIR)/lib_libtvmpich_la-dll_mpich.Plo # am--include-marker +include src/mpi/debugger/$(DEPDIR)/libdbginitdummy_la-dbginit.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_class.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_code.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_string.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_call_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_create_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_get_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_set_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-dynerrutil.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_create.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_free.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_get.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_set.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_class.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_string.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errutil.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_call_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_create_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_get_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_set_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_call_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_create_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_get_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_set_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_class.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_code.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_string.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_call_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_create_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_get_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_set_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-dynerrutil.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_create.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_free.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_get.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_set.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_class.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_string.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errutil.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_call_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_create_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_get_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_set_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_call_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_create_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_get_errhandler.Plo # am--include-marker +include src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_set_errhandler.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_compare.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_difference.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_excl.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_free.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_incl.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_intersection.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_excl.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_incl.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_rank.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_size.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_translate_ranks.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_union.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libmpi_la-grouputil.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_compare.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_difference.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_excl.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_free.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_incl.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_intersection.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_excl.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_incl.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_rank.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_size.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_translate_ranks.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_union.Plo # am--include-marker +include src/mpi/group/$(DEPDIR)/lib_libpmpi_la-grouputil.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_create.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_delete.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_dup.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_free.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_get.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getn.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getnth.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getvallen.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_set.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libmpi_la-infoutil.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_create.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_delete.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_dup.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_free.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_get.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getn.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getnth.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getvallen.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_set.Plo # am--include-marker +include src/mpi/info/$(DEPDIR)/lib_libpmpi_la-infoutil.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-abort.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-async.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalize.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalized.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-init.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-initialized.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-initinfo.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-initthread.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-ismain.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-netloc_util.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libmpi_la-querythread.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-abort.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-async.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalize.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalized.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-init.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initialized.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initinfo.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initthread.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-ismain.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-netloc_util.Plo # am--include-marker +include src/mpi/init/$(DEPDIR)/lib_libpmpi_la-querythread.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_add.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_diff.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libmpi_la-getpname.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libmpi_la-library_version.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libmpi_la-pcontrol.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libmpi_la-utils.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libmpi_la-version.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_add.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_diff.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-getpname.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-library_version.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-pcontrol.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-utils.Plo # am--include-marker +include src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-version.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsendutil.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bufattach.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-buffree.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ibsend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-improbe.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-imrecv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-iprobe.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irecv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irsend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-isend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-issend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mprobe.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mrecv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-probe.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv_rep.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsendutil.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bufattach.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-buffree.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ibsend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-improbe.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-imrecv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-iprobe.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irecv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irsend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-isend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-issend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mprobe.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mrecv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-probe.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send_init.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv_rep.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend.Plo # am--include-marker +include src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend_init.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-cancel.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_complete.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_start.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-mpir_request.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_free.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_get_status.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-start.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-startall.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-status_set_cancelled.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-test.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-test_cancelled.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-testall.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-testany.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-testsome.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-wait.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitall.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitany.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitsome.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-cancel.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_complete.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_start.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-mpir_request.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_free.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_get_status.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-start.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-startall.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-status_set_cancelled.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test_cancelled.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testall.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testany.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testsome.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-wait.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitall.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitany.Plo # am--include-marker +include src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitsome.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-accumulate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-alloc_mem.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-compare_and_swap.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-fetch_and_op.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-free_mem.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get_accumulate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-put.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-raccumulate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget_accumulate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rmatypeutil.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rput.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate_shared.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_attach.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_complete.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create_dynamic.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_detach.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_fence.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_all.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local_all.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_free.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_group.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_info.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_name.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock_all.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_post.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_info.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_name.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_shared_query.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_start.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_sync.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_test.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock_all.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_wait.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libmpi_la-winutil.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-accumulate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-alloc_mem.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-compare_and_swap.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-fetch_and_op.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-free_mem.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get_accumulate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-put.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-raccumulate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget_accumulate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rmatypeutil.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rput.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate_shared.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_attach.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_complete.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create_dynamic.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_detach.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_fence.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_all.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local_all.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_free.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_group.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_info.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_name.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock_all.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_post.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_info.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_name.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_shared_query.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_start.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_sync.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_test.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock_all.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_wait.Plo # am--include-marker +include src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-winutil.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-close_port.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_accept.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_connect.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_disconnect.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_get_parent.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_join.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn_multiple.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-lookup_name.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-open_port.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-publish_name.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-unpublish_name.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-close_port.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_accept.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_connect.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_disconnect.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_get_parent.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_join.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn_multiple.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-lookup_name.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-open_port.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-publish_name.Plo # am--include-marker +include src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-unpublish_name.Plo # am--include-marker +include src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtick.Plo # am--include-marker +include src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtime.Plo # am--include-marker +include src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtick.Plo # am--include-marker +include src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtime.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_coords.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_create.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_get.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_map.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_rank.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_shift.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_sub.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cartdim_get.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dims_create.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create_adj.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb_count.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_get.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_map.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_nbr.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphcreate.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphdimsget.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphnbrcnt.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topo_test.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topoutil.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_coords.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_create.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_get.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_map.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_rank.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_shift.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_sub.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cartdim_get.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dims_create.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create_adj.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb_count.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_get.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_map.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_nbr.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphcreate.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphdimsget.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphnbrcnt.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topo_test.Plo # am--include-marker +include src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topoutil.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_changed.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_categories.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_cvars.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_index.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_info.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_num.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_pvars.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_index.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_info.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_num.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_alloc.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_free.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_read.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_write.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_info.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_item.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_finalize.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_initthread.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_index.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_info.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_num.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_alloc.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_free.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_read.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_readreset.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_reset.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_create.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_free.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_start.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_stop.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_write.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_changed.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_categories.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_cvars.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_index.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_info.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_num.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_pvars.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_index.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_info.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_num.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_alloc.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_free.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_read.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_write.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_info.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_item.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_finalize.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_initthread.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_index.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_info.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_num.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_alloc.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_free.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_read.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_readreset.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_reset.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_create.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_free.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_start.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_stop.Plo # am--include-marker +include src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_write.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libmpi_la-none.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libpmpi_la-none.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_cm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_data.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_msg.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_progress.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_tagged.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_cm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_data.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_msg.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_progress.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_tagged.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-socksm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_ckpt.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_finalize.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_getip.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_init.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_send.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_utility.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-socksm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_ckpt.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_finalize.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_getip.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_init.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_send.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_utility.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_rma_shm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_comm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_eagernoncontig.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_ckpt.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_debug.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_finalize.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_init.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt_shm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_mpich.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_net_array.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network_poll.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_rma_shm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_comm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_eagernoncontig.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_ckpt.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_debug.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_finalize.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_init.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt_shm.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_mpich.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_net_array.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network_poll.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libmpi_la-papi_defs.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libpmpi_la-papi_defs.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libmpi_la-mkstemp.Plo # am--include-marker +include src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libpmpi_la-mkstemp.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-sock.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo # am--include-marker +include src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-sock.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_buffer.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm_spawn_multiple.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eager.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eagersync.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_connection.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_op_req.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_pkt.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_req.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_revoke_pkt.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_send_req.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_port.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_recvq.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_request.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_ops.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_pkthandler.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_progress.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_reqops.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_sync.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rndv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_win_fns.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_abort.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_aint.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_recv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_send.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_disconnect.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_failure_ack.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_get_all_failed_procs.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_revoke.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_spawn_multiple.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_datatype.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_finalize.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_get_universe_size.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_getpname.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_improbe.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_imrecv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_init.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_iprobe.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irecv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irsend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_isend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_issend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mprobe.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mrecv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_op.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_port.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_probe.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_recv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rma.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rsend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_send.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_ssend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_startall.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_vc.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_isend_self.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_pg.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_printf.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_rma.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_buffer.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm_spawn_multiple.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eager.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eagersync.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_connection.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_op_req.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_pkt.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_req.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_revoke_pkt.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_send_req.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_port.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_recvq.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_request.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_ops.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_pkthandler.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_progress.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_reqops.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_sync.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rndv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_win_fns.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_abort.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_aint.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_recv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_send.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_disconnect.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_failure_ack.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_get_all_failed_procs.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_revoke.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_spawn_multiple.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_datatype.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_finalize.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_get_universe_size.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_getpname.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_improbe.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_imrecv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_init.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_iprobe.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irecv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irsend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_isend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_issend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mprobe.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mrecv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_op.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_port.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_probe.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_recv.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rma.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rsend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_send.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_ssend.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_startall.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_vc.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_isend_self.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_pg.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_printf.Plo # am--include-marker +include src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_rma.Plo # am--include-marker +include src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_connect_sock.Plo # am--include-marker +include src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_getinterfaces.Plo # am--include-marker +include src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_init_sock.Plo # am--include-marker +include src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_connect_sock.Plo # am--include-marker +include src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_getinterfaces.Plo # am--include-marker +include src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_init_sock.Plo # am--include-marker +include src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_globals.Plo # am--include-marker +include src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_init.Plo # am--include-marker +include src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_globals.Plo # am--include-marker +include src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_init.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_comm.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_datatype.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_op.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_spawn.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_win.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-util.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_comm.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_datatype.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_op.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_spawn.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_win.Plo # am--include-marker +include src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-util.Plo # am--include-marker +include src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libmpi_la-netmod_impl.Plo # am--include-marker +include src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libpmpi_la-netmod_impl.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_comm.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_datatype.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_init.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_op.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_spawn.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_win.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_comm.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_datatype.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_init.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_op.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_spawn.Plo # am--include-marker +include src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_win.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_comm.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_datatype.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_init.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_op.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_spawn.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_win.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_comm.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_datatype.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_init.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_op.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_spawn.Plo # am--include-marker +include src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_win.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_coll_init.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_comm.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_datatype.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_eager_array.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_init.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_op.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_spawn.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_win.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_coll_init.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_comm.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_datatype.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_eager_array.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_init.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_op.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_spawn.Plo # am--include-marker +include src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_win.Plo # am--include-marker +include src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libmpi_la-release_gather.Plo # am--include-marker +include src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libpmpi_la-release_gather.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_dpm.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_hooks.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_impl.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_init.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_mem.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_misc.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_rma.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree_util.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-func_table.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_dpm.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_hooks.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_impl.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_init.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_mem.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_misc.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_rma.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree.Plo # am--include-marker +include src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree_util.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_comm.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_init.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_spawn.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_win.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-globals.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_comm.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_init.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_spawn.Plo # am--include-marker +include src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_win.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals_default.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_comm.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_globals.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_impl.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_init.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_spawn.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_win.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4i_comm.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_buf.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_callbacks.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_comm.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_init.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_proc.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_recvq.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_origin_callbacks.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_target_callbacks.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_symheap.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_win.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-mpid_ch4_net_array.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals_default.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_comm.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_globals.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_impl.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_init.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_spawn.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_win.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4i_comm.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_buf.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_callbacks.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_comm.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_init.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_proc.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_recvq.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_origin_callbacks.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_target_callbacks.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_symheap.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_win.Plo # am--include-marker +include src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-mpid_ch4_net_array.Plo # am--include-marker +include src/mpid/common/bc/$(DEPDIR)/lib_libmpi_la-mpidu_bc.Plo # am--include-marker +include src/mpid/common/bc/$(DEPDIR)/lib_libpmpi_la-mpidu_bc.Plo # am--include-marker +include src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_dtypes.Plo # am--include-marker +include src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_init.Plo # am--include-marker +include src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_ops.Plo # am--include-marker +include src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_rte.Plo # am--include-marker +include src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_dtypes.Plo # am--include-marker +include src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_init.Plo # am--include-marker +include src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_ops.Plo # am--include-marker +include src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_rte.Plo # am--include-marker +include src/mpid/common/sched/$(DEPDIR)/lib_libmpi_la-mpidu_sched.Plo # am--include-marker +include src/mpid/common/sched/$(DEPDIR)/lib_libpmpi_la-mpidu_sched.Plo # am--include-marker +include src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_alloc.Plo # am--include-marker +include src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_barrier.Plo # am--include-marker +include src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_alloc.Plo # am--include-marker +include src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_barrier.Plo # am--include-marker +include src/nameserv/file/$(DEPDIR)/lib_libmpi_la-file_nameserv.Plo # am--include-marker +include src/nameserv/file/$(DEPDIR)/lib_libpmpi_la-file_nameserv.Plo # am--include-marker +include src/nameserv/pmi/$(DEPDIR)/lib_libmpi_la-pmi_nameserv.Plo # am--include-marker +include src/nameserv/pmi/$(DEPDIR)/lib_libpmpi_la-pmi_nameserv.Plo # am--include-marker +include src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Po # am--include-marker +include src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Po # am--include-marker +include src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Po # am--include-marker +include src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Po # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-cmnargs.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-dbgiface.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-env.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-ioloop.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-labelout.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-newsession.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-pmiport.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-pmiserv.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-process.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-rm.Plo # am--include-marker +include src/pm/util/$(DEPDIR)/libmpiexec_la-simple_pmiutil2.Plo # am--include-marker +include src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple2pmi.Plo # am--include-marker +include src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo # am--include-marker +include src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple2pmi.Plo # am--include-marker +include src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo # am--include-marker +include src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmi.Plo # am--include-marker +include src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo # am--include-marker +include src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmi.Plo # am--include-marker +include src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo # am--include-marker +include src/util/assert/$(DEPDIR)/lib_libmpi_la-assert.Plo # am--include-marker +include src/util/assert/$(DEPDIR)/lib_libpmpi_la-assert.Plo # am--include-marker +include src/util/cvar/$(DEPDIR)/lib_libmpi_la-mpir_cvars.Plo # am--include-marker +include src/util/cvar/$(DEPDIR)/lib_libpmpi_la-mpir_cvars.Plo # am--include-marker +include src/util/mem/$(DEPDIR)/lib_libmpi_la-handlemem.Plo # am--include-marker +include src/util/mem/$(DEPDIR)/lib_libmpi_la-strerror.Plo # am--include-marker +include src/util/mem/$(DEPDIR)/lib_libpmpi_la-handlemem.Plo # am--include-marker +include src/util/mem/$(DEPDIR)/lib_libpmpi_la-strerror.Plo # am--include-marker +include src/util/procmap/$(DEPDIR)/lib_libmpi_la-local_proc.Plo # am--include-marker +include src/util/procmap/$(DEPDIR)/lib_libpmpi_la-local_proc.Plo # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ + $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Plo +# $(AM_V_CC)source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< + +src/binding/fortran/mpif_h/lib_libmpifort_la-sendf.lo: src/binding/fortran/mpif_h/sendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-sendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-sendf.lo `test -f 'src/binding/fortran/mpif_h/sendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/sendf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-sendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-sendf.lo `test -f 'src/binding/fortran/mpif_h/sendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sendf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-recvf.lo: src/binding/fortran/mpif_h/recvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-recvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-recvf.lo `test -f 'src/binding/fortran/mpif_h/recvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/recvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/recvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-recvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-recvf.lo `test -f 'src/binding/fortran/mpif_h/recvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/recvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-get_countf.lo: src/binding/fortran/mpif_h/get_countf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-get_countf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_countf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_countf.lo `test -f 'src/binding/fortran/mpif_h/get_countf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_countf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_countf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_countf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_countf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-get_countf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_countf.lo `test -f 'src/binding/fortran/mpif_h/get_countf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_countf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-bsendf.lo: src/binding/fortran/mpif_h/bsendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-bsendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bsendf.lo `test -f 'src/binding/fortran/mpif_h/bsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bsendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bsendf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-bsendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bsendf.lo `test -f 'src/binding/fortran/mpif_h/bsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bsendf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ssendf.lo: src/binding/fortran/mpif_h/ssendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ssendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ssendf.lo `test -f 'src/binding/fortran/mpif_h/ssendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ssendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ssendf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ssendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ssendf.lo `test -f 'src/binding/fortran/mpif_h/ssendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ssendf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-rsendf.lo: src/binding/fortran/mpif_h/rsendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-rsendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rsendf.lo `test -f 'src/binding/fortran/mpif_h/rsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rsendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rsendf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-rsendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rsendf.lo `test -f 'src/binding/fortran/mpif_h/rsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rsendf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-bufattachf.lo: src/binding/fortran/mpif_h/bufattachf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-bufattachf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufattachf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bufattachf.lo `test -f 'src/binding/fortran/mpif_h/bufattachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bufattachf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufattachf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufattachf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bufattachf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-bufattachf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bufattachf.lo `test -f 'src/binding/fortran/mpif_h/bufattachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bufattachf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-bufdetachf.lo: src/binding/fortran/mpif_h/bufdetachf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-bufdetachf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufdetachf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bufdetachf.lo `test -f 'src/binding/fortran/mpif_h/bufdetachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bufdetachf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufdetachf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufdetachf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bufdetachf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-bufdetachf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bufdetachf.lo `test -f 'src/binding/fortran/mpif_h/bufdetachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bufdetachf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-isendf.lo: src/binding/fortran/mpif_h/isendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-isendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-isendf.lo `test -f 'src/binding/fortran/mpif_h/isendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/isendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/isendf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-isendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-isendf.lo `test -f 'src/binding/fortran/mpif_h/isendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/isendf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ibsendf.lo: src/binding/fortran/mpif_h/ibsendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ibsendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibsendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ibsendf.lo `test -f 'src/binding/fortran/mpif_h/ibsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibsendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibsendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibsendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ibsendf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ibsendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ibsendf.lo `test -f 'src/binding/fortran/mpif_h/ibsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibsendf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-issendf.lo: src/binding/fortran/mpif_h/issendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-issendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-issendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-issendf.lo `test -f 'src/binding/fortran/mpif_h/issendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/issendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-issendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-issendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/issendf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-issendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-issendf.lo `test -f 'src/binding/fortran/mpif_h/issendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/issendf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-irsendf.lo: src/binding/fortran/mpif_h/irsendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-irsendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irsendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-irsendf.lo `test -f 'src/binding/fortran/mpif_h/irsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/irsendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irsendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irsendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/irsendf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-irsendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-irsendf.lo `test -f 'src/binding/fortran/mpif_h/irsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/irsendf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-irecvf.lo: src/binding/fortran/mpif_h/irecvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-irecvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irecvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-irecvf.lo `test -f 'src/binding/fortran/mpif_h/irecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/irecvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irecvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irecvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/irecvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-irecvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-irecvf.lo `test -f 'src/binding/fortran/mpif_h/irecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/irecvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-waitf.lo: src/binding/fortran/mpif_h/waitf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-waitf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-waitf.lo `test -f 'src/binding/fortran/mpif_h/waitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/waitf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-waitf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-waitf.lo `test -f 'src/binding/fortran/mpif_h/waitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-testf.lo: src/binding/fortran/mpif_h/testf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-testf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testf.lo `test -f 'src/binding/fortran/mpif_h/testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-testf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testf.lo `test -f 'src/binding/fortran/mpif_h/testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-request_freef.lo: src/binding/fortran/mpif_h/request_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-request_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-request_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-request_freef.lo `test -f 'src/binding/fortran/mpif_h/request_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/request_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-request_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-request_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/request_freef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-request_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-request_freef.lo `test -f 'src/binding/fortran/mpif_h/request_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/request_freef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-waitanyf.lo: src/binding/fortran/mpif_h/waitanyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-waitanyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitanyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-waitanyf.lo `test -f 'src/binding/fortran/mpif_h/waitanyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitanyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitanyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitanyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/waitanyf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-waitanyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-waitanyf.lo `test -f 'src/binding/fortran/mpif_h/waitanyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitanyf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-testanyf.lo: src/binding/fortran/mpif_h/testanyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-testanyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testanyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testanyf.lo `test -f 'src/binding/fortran/mpif_h/testanyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testanyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testanyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testanyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testanyf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-testanyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testanyf.lo `test -f 'src/binding/fortran/mpif_h/testanyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testanyf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-waitallf.lo: src/binding/fortran/mpif_h/waitallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-waitallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-waitallf.lo `test -f 'src/binding/fortran/mpif_h/waitallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/waitallf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-waitallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-waitallf.lo `test -f 'src/binding/fortran/mpif_h/waitallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitallf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-testallf.lo: src/binding/fortran/mpif_h/testallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-testallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testallf.lo `test -f 'src/binding/fortran/mpif_h/testallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testallf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-testallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testallf.lo `test -f 'src/binding/fortran/mpif_h/testallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testallf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-waitsomef.lo: src/binding/fortran/mpif_h/waitsomef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-waitsomef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitsomef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-waitsomef.lo `test -f 'src/binding/fortran/mpif_h/waitsomef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitsomef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitsomef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitsomef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/waitsomef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-waitsomef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-waitsomef.lo `test -f 'src/binding/fortran/mpif_h/waitsomef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitsomef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-testsomef.lo: src/binding/fortran/mpif_h/testsomef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-testsomef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testsomef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testsomef.lo `test -f 'src/binding/fortran/mpif_h/testsomef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testsomef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testsomef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testsomef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testsomef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-testsomef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testsomef.lo `test -f 'src/binding/fortran/mpif_h/testsomef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testsomef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iprobef.lo: src/binding/fortran/mpif_h/iprobef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iprobef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iprobef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iprobef.lo `test -f 'src/binding/fortran/mpif_h/iprobef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iprobef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iprobef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iprobef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iprobef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iprobef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iprobef.lo `test -f 'src/binding/fortran/mpif_h/iprobef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iprobef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-probef.lo: src/binding/fortran/mpif_h/probef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-probef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-probef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-probef.lo `test -f 'src/binding/fortran/mpif_h/probef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/probef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-probef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-probef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/probef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-probef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-probef.lo `test -f 'src/binding/fortran/mpif_h/probef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/probef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cancelf.lo: src/binding/fortran/mpif_h/cancelf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cancelf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cancelf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cancelf.lo `test -f 'src/binding/fortran/mpif_h/cancelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cancelf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cancelf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cancelf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cancelf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cancelf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cancelf.lo `test -f 'src/binding/fortran/mpif_h/cancelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cancelf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-testcancelf.lo: src/binding/fortran/mpif_h/testcancelf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-testcancelf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testcancelf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testcancelf.lo `test -f 'src/binding/fortran/mpif_h/testcancelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testcancelf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testcancelf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testcancelf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testcancelf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-testcancelf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-testcancelf.lo `test -f 'src/binding/fortran/mpif_h/testcancelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testcancelf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-send_initf.lo: src/binding/fortran/mpif_h/send_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-send_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-send_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-send_initf.lo `test -f 'src/binding/fortran/mpif_h/send_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/send_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-send_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-send_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/send_initf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-send_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-send_initf.lo `test -f 'src/binding/fortran/mpif_h/send_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/send_initf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-bsend_initf.lo: src/binding/fortran/mpif_h/bsend_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-bsend_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsend_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bsend_initf.lo `test -f 'src/binding/fortran/mpif_h/bsend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bsend_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsend_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsend_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bsend_initf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-bsend_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bsend_initf.lo `test -f 'src/binding/fortran/mpif_h/bsend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bsend_initf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ssend_initf.lo: src/binding/fortran/mpif_h/ssend_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ssend_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssend_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ssend_initf.lo `test -f 'src/binding/fortran/mpif_h/ssend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ssend_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssend_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssend_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ssend_initf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ssend_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ssend_initf.lo `test -f 'src/binding/fortran/mpif_h/ssend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ssend_initf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-rsend_initf.lo: src/binding/fortran/mpif_h/rsend_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-rsend_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsend_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rsend_initf.lo `test -f 'src/binding/fortran/mpif_h/rsend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rsend_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsend_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsend_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rsend_initf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-rsend_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rsend_initf.lo `test -f 'src/binding/fortran/mpif_h/rsend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rsend_initf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-recv_initf.lo: src/binding/fortran/mpif_h/recv_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-recv_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recv_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-recv_initf.lo `test -f 'src/binding/fortran/mpif_h/recv_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/recv_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recv_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recv_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/recv_initf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-recv_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-recv_initf.lo `test -f 'src/binding/fortran/mpif_h/recv_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/recv_initf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-startf.lo: src/binding/fortran/mpif_h/startf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-startf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-startf.lo `test -f 'src/binding/fortran/mpif_h/startf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/startf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/startf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-startf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-startf.lo `test -f 'src/binding/fortran/mpif_h/startf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/startf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-startallf.lo: src/binding/fortran/mpif_h/startallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-startallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-startallf.lo `test -f 'src/binding/fortran/mpif_h/startallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/startallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/startallf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-startallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-startallf.lo `test -f 'src/binding/fortran/mpif_h/startallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/startallf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-sendrecvf.lo: src/binding/fortran/mpif_h/sendrecvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-sendrecvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendrecvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-sendrecvf.lo `test -f 'src/binding/fortran/mpif_h/sendrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sendrecvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendrecvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendrecvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/sendrecvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-sendrecvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-sendrecvf.lo `test -f 'src/binding/fortran/mpif_h/sendrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sendrecvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-sndrcvrplf.lo: src/binding/fortran/mpif_h/sndrcvrplf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-sndrcvrplf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sndrcvrplf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-sndrcvrplf.lo `test -f 'src/binding/fortran/mpif_h/sndrcvrplf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sndrcvrplf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sndrcvrplf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sndrcvrplf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/sndrcvrplf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-sndrcvrplf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-sndrcvrplf.lo `test -f 'src/binding/fortran/mpif_h/sndrcvrplf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sndrcvrplf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typecontigf.lo: src/binding/fortran/mpif_h/typecontigf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typecontigf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecontigf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecontigf.lo `test -f 'src/binding/fortran/mpif_h/typecontigf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecontigf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecontigf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecontigf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecontigf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typecontigf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecontigf.lo `test -f 'src/binding/fortran/mpif_h/typecontigf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecontigf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_vectorf.lo: src/binding/fortran/mpif_h/type_vectorf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_vectorf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_vectorf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_vectorf.lo `test -f 'src/binding/fortran/mpif_h/type_vectorf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_vectorf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_vectorf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_vectorf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_vectorf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_vectorf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_vectorf.lo `test -f 'src/binding/fortran/mpif_h/type_vectorf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_vectorf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_hvectorf.lo: src/binding/fortran/mpif_h/type_hvectorf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_hvectorf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hvectorf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_hvectorf.lo `test -f 'src/binding/fortran/mpif_h/type_hvectorf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_hvectorf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hvectorf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hvectorf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_hvectorf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_hvectorf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_hvectorf.lo `test -f 'src/binding/fortran/mpif_h/type_hvectorf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_hvectorf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_indexedf.lo: src/binding/fortran/mpif_h/type_indexedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_indexedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_indexedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_indexedf.lo `test -f 'src/binding/fortran/mpif_h/type_indexedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_indexedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_indexedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_indexedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_indexedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_indexedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_indexedf.lo `test -f 'src/binding/fortran/mpif_h/type_indexedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_indexedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_hindexedf.lo: src/binding/fortran/mpif_h/type_hindexedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_hindexedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hindexedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_hindexedf.lo `test -f 'src/binding/fortran/mpif_h/type_hindexedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_hindexedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hindexedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hindexedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_hindexedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_hindexedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_hindexedf.lo `test -f 'src/binding/fortran/mpif_h/type_hindexedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_hindexedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_structf.lo: src/binding/fortran/mpif_h/type_structf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_structf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_structf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_structf.lo `test -f 'src/binding/fortran/mpif_h/type_structf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_structf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_structf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_structf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_structf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_structf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_structf.lo `test -f 'src/binding/fortran/mpif_h/type_structf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_structf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_extentf.lo: src/binding/fortran/mpif_h/type_extentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_extentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_extentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_extentf.lo `test -f 'src/binding/fortran/mpif_h/type_extentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_extentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_extentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_extentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_extentf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_extentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_extentf.lo `test -f 'src/binding/fortran/mpif_h/type_extentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_extentf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_sizef.lo: src/binding/fortran/mpif_h/type_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_sizef.lo `test -f 'src/binding/fortran/mpif_h/type_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_sizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_sizef.lo `test -f 'src/binding/fortran/mpif_h/type_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_sizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_lbf.lo: src/binding/fortran/mpif_h/type_lbf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_lbf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_lbf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_lbf.lo `test -f 'src/binding/fortran/mpif_h/type_lbf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_lbf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_lbf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_lbf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_lbf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_lbf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_lbf.lo `test -f 'src/binding/fortran/mpif_h/type_lbf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_lbf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_ubf.lo: src/binding/fortran/mpif_h/type_ubf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_ubf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_ubf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_ubf.lo `test -f 'src/binding/fortran/mpif_h/type_ubf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_ubf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_ubf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_ubf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_ubf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_ubf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_ubf.lo `test -f 'src/binding/fortran/mpif_h/type_ubf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_ubf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_commitf.lo: src/binding/fortran/mpif_h/type_commitf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_commitf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_commitf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_commitf.lo `test -f 'src/binding/fortran/mpif_h/type_commitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_commitf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_commitf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_commitf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_commitf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_commitf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_commitf.lo `test -f 'src/binding/fortran/mpif_h/type_commitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_commitf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_freef.lo: src/binding/fortran/mpif_h/type_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_freef.lo `test -f 'src/binding/fortran/mpif_h/type_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_freef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_freef.lo `test -f 'src/binding/fortran/mpif_h/type_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_freef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-get_elementsf.lo: src/binding/fortran/mpif_h/get_elementsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-get_elementsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elementsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_elementsf.lo `test -f 'src/binding/fortran/mpif_h/get_elementsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_elementsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elementsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elementsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_elementsf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-get_elementsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_elementsf.lo `test -f 'src/binding/fortran/mpif_h/get_elementsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_elementsf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-packf.lo: src/binding/fortran/mpif_h/packf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-packf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-packf.lo `test -f 'src/binding/fortran/mpif_h/packf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/packf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/packf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-packf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-packf.lo `test -f 'src/binding/fortran/mpif_h/packf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/packf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-unpackf.lo: src/binding/fortran/mpif_h/unpackf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-unpackf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-unpackf.lo `test -f 'src/binding/fortran/mpif_h/unpackf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpackf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/unpackf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-unpackf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-unpackf.lo `test -f 'src/binding/fortran/mpif_h/unpackf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpackf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-pack_sizef.lo: src/binding/fortran/mpif_h/pack_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-pack_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-pack_sizef.lo `test -f 'src/binding/fortran/mpif_h/pack_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pack_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/pack_sizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-pack_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-pack_sizef.lo `test -f 'src/binding/fortran/mpif_h/pack_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pack_sizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-barrierf.lo: src/binding/fortran/mpif_h/barrierf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-barrierf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-barrierf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-barrierf.lo `test -f 'src/binding/fortran/mpif_h/barrierf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/barrierf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-barrierf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-barrierf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/barrierf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-barrierf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-barrierf.lo `test -f 'src/binding/fortran/mpif_h/barrierf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/barrierf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-bcastf.lo: src/binding/fortran/mpif_h/bcastf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-bcastf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bcastf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bcastf.lo `test -f 'src/binding/fortran/mpif_h/bcastf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bcastf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bcastf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bcastf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bcastf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-bcastf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-bcastf.lo `test -f 'src/binding/fortran/mpif_h/bcastf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bcastf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-gatherf.lo: src/binding/fortran/mpif_h/gatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-gatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-gatherf.lo `test -f 'src/binding/fortran/mpif_h/gatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/gatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/gatherf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-gatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-gatherf.lo `test -f 'src/binding/fortran/mpif_h/gatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/gatherf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-gathervf.lo: src/binding/fortran/mpif_h/gathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-gathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-gathervf.lo `test -f 'src/binding/fortran/mpif_h/gathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/gathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/gathervf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-gathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-gathervf.lo `test -f 'src/binding/fortran/mpif_h/gathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/gathervf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-scatterf.lo: src/binding/fortran/mpif_h/scatterf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-scatterf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scatterf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-scatterf.lo `test -f 'src/binding/fortran/mpif_h/scatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scatterf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scatterf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scatterf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/scatterf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-scatterf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-scatterf.lo `test -f 'src/binding/fortran/mpif_h/scatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scatterf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-scattervf.lo: src/binding/fortran/mpif_h/scattervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-scattervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scattervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-scattervf.lo `test -f 'src/binding/fortran/mpif_h/scattervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scattervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scattervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scattervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/scattervf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-scattervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-scattervf.lo `test -f 'src/binding/fortran/mpif_h/scattervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scattervf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-allgatherf.lo: src/binding/fortran/mpif_h/allgatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-allgatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-allgatherf.lo `test -f 'src/binding/fortran/mpif_h/allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allgatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/allgatherf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-allgatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-allgatherf.lo `test -f 'src/binding/fortran/mpif_h/allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allgatherf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-allgathervf.lo: src/binding/fortran/mpif_h/allgathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-allgathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-allgathervf.lo `test -f 'src/binding/fortran/mpif_h/allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allgathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/allgathervf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-allgathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-allgathervf.lo `test -f 'src/binding/fortran/mpif_h/allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allgathervf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallf.lo: src/binding/fortran/mpif_h/alltoallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallf.lo `test -f 'src/binding/fortran/mpif_h/alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/alltoallf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallf.lo `test -f 'src/binding/fortran/mpif_h/alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallvf.lo: src/binding/fortran/mpif_h/alltoallvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/alltoallvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallwf.lo: src/binding/fortran/mpif_h/alltoallwf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallwf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallwf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallwf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallwf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallwf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/alltoallwf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallwf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallwf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-exscanf.lo: src/binding/fortran/mpif_h/exscanf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-exscanf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-exscanf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-exscanf.lo `test -f 'src/binding/fortran/mpif_h/exscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/exscanf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-exscanf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-exscanf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/exscanf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-exscanf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-exscanf.lo `test -f 'src/binding/fortran/mpif_h/exscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/exscanf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-reducef.lo: src/binding/fortran/mpif_h/reducef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-reducef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reducef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-reducef.lo `test -f 'src/binding/fortran/mpif_h/reducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reducef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reducef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reducef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/reducef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-reducef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-reducef.lo `test -f 'src/binding/fortran/mpif_h/reducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reducef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-op_createf.lo: src/binding/fortran/mpif_h/op_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-op_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-op_createf.lo `test -f 'src/binding/fortran/mpif_h/op_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/op_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-op_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-op_createf.lo `test -f 'src/binding/fortran/mpif_h/op_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-op_freef.lo: src/binding/fortran/mpif_h/op_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-op_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-op_freef.lo `test -f 'src/binding/fortran/mpif_h/op_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/op_freef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-op_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-op_freef.lo `test -f 'src/binding/fortran/mpif_h/op_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_freef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-allreducef.lo: src/binding/fortran/mpif_h/allreducef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-allreducef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allreducef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-allreducef.lo `test -f 'src/binding/fortran/mpif_h/allreducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allreducef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allreducef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allreducef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/allreducef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-allreducef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-allreducef.lo `test -f 'src/binding/fortran/mpif_h/allreducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allreducef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-redscatf.lo: src/binding/fortran/mpif_h/redscatf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-redscatf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-redscatf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-redscatf.lo `test -f 'src/binding/fortran/mpif_h/redscatf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/redscatf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-redscatf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-redscatf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/redscatf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-redscatf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-redscatf.lo `test -f 'src/binding/fortran/mpif_h/redscatf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/redscatf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-scanf.lo: src/binding/fortran/mpif_h/scanf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-scanf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scanf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-scanf.lo `test -f 'src/binding/fortran/mpif_h/scanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scanf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scanf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scanf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/scanf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-scanf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-scanf.lo `test -f 'src/binding/fortran/mpif_h/scanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scanf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-group_sizef.lo: src/binding/fortran/mpif_h/group_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-group_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_sizef.lo `test -f 'src/binding/fortran/mpif_h/group_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_sizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-group_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_sizef.lo `test -f 'src/binding/fortran/mpif_h/group_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_sizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-group_rankf.lo: src/binding/fortran/mpif_h/group_rankf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-group_rankf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_rankf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_rankf.lo `test -f 'src/binding/fortran/mpif_h/group_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_rankf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_rankf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_rankf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_rankf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-group_rankf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_rankf.lo `test -f 'src/binding/fortran/mpif_h/group_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_rankf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-grouptranksf.lo: src/binding/fortran/mpif_h/grouptranksf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-grouptranksf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouptranksf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grouptranksf.lo `test -f 'src/binding/fortran/mpif_h/grouptranksf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouptranksf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouptranksf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouptranksf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grouptranksf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-grouptranksf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grouptranksf.lo `test -f 'src/binding/fortran/mpif_h/grouptranksf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouptranksf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-group_comparef.lo: src/binding/fortran/mpif_h/group_comparef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-group_comparef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_comparef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_comparef.lo `test -f 'src/binding/fortran/mpif_h/group_comparef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_comparef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_comparef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_comparef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_comparef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-group_comparef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_comparef.lo `test -f 'src/binding/fortran/mpif_h/group_comparef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_comparef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_groupf.lo: src/binding/fortran/mpif_h/comm_groupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_groupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_groupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_groupf.lo `test -f 'src/binding/fortran/mpif_h/comm_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_groupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_groupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_groupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_groupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_groupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_groupf.lo `test -f 'src/binding/fortran/mpif_h/comm_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_groupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-group_unionf.lo: src/binding/fortran/mpif_h/group_unionf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-group_unionf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_unionf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_unionf.lo `test -f 'src/binding/fortran/mpif_h/group_unionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_unionf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_unionf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_unionf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_unionf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-group_unionf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_unionf.lo `test -f 'src/binding/fortran/mpif_h/group_unionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_unionf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-groupinterf.lo: src/binding/fortran/mpif_h/groupinterf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-groupinterf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupinterf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-groupinterf.lo `test -f 'src/binding/fortran/mpif_h/groupinterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/groupinterf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupinterf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupinterf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/groupinterf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-groupinterf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-groupinterf.lo `test -f 'src/binding/fortran/mpif_h/groupinterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/groupinterf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-groupdifff.lo: src/binding/fortran/mpif_h/groupdifff.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-groupdifff.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupdifff.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-groupdifff.lo `test -f 'src/binding/fortran/mpif_h/groupdifff.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/groupdifff.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupdifff.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupdifff.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/groupdifff.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-groupdifff.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-groupdifff.lo `test -f 'src/binding/fortran/mpif_h/groupdifff.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/groupdifff.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-group_inclf.lo: src/binding/fortran/mpif_h/group_inclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-group_inclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_inclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_inclf.lo `test -f 'src/binding/fortran/mpif_h/group_inclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_inclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_inclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_inclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_inclf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-group_inclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_inclf.lo `test -f 'src/binding/fortran/mpif_h/group_inclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_inclf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-group_exclf.lo: src/binding/fortran/mpif_h/group_exclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-group_exclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_exclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_exclf.lo `test -f 'src/binding/fortran/mpif_h/group_exclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_exclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_exclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_exclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_exclf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-group_exclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_exclf.lo `test -f 'src/binding/fortran/mpif_h/group_exclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_exclf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-grouprinclf.lo: src/binding/fortran/mpif_h/grouprinclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-grouprinclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprinclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grouprinclf.lo `test -f 'src/binding/fortran/mpif_h/grouprinclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouprinclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprinclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprinclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grouprinclf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-grouprinclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grouprinclf.lo `test -f 'src/binding/fortran/mpif_h/grouprinclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouprinclf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-grouprexclf.lo: src/binding/fortran/mpif_h/grouprexclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-grouprexclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprexclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grouprexclf.lo `test -f 'src/binding/fortran/mpif_h/grouprexclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouprexclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprexclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprexclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grouprexclf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-grouprexclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grouprexclf.lo `test -f 'src/binding/fortran/mpif_h/grouprexclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouprexclf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-group_freef.lo: src/binding/fortran/mpif_h/group_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-group_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_freef.lo `test -f 'src/binding/fortran/mpif_h/group_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_freef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-group_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-group_freef.lo `test -f 'src/binding/fortran/mpif_h/group_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_freef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_sizef.lo: src/binding/fortran/mpif_h/comm_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_sizef.lo `test -f 'src/binding/fortran/mpif_h/comm_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_sizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_sizef.lo `test -f 'src/binding/fortran/mpif_h/comm_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_sizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_rankf.lo: src/binding/fortran/mpif_h/comm_rankf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_rankf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_rankf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_rankf.lo `test -f 'src/binding/fortran/mpif_h/comm_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_rankf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_rankf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_rankf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_rankf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_rankf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_rankf.lo `test -f 'src/binding/fortran/mpif_h/comm_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_rankf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_comparef.lo: src/binding/fortran/mpif_h/comm_comparef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_comparef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_comparef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_comparef.lo `test -f 'src/binding/fortran/mpif_h/comm_comparef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_comparef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_comparef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_comparef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_comparef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_comparef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_comparef.lo `test -f 'src/binding/fortran/mpif_h/comm_comparef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_comparef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dupf.lo: src/binding/fortran/mpif_h/comm_dupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dupf.lo `test -f 'src/binding/fortran/mpif_h/comm_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_dupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_dupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dupf.lo `test -f 'src/binding/fortran/mpif_h/comm_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_dupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dup_with_infof.lo: src/binding/fortran/mpif_h/comm_dup_with_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dup_with_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dup_with_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dup_with_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_dup_with_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_dup_with_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dup_with_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dup_with_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_dup_with_infof.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dup_with_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_dup_with_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_dup_with_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_dup_with_infof.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_createf.lo: src/binding/fortran/mpif_h/comm_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_createf.lo `test -f 'src/binding/fortran/mpif_h/comm_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_createf.lo `test -f 'src/binding/fortran/mpif_h/comm_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_splitf.lo: src/binding/fortran/mpif_h/comm_splitf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_splitf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_splitf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_splitf.lo `test -f 'src/binding/fortran/mpif_h/comm_splitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_splitf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_splitf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_splitf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_splitf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_splitf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_splitf.lo `test -f 'src/binding/fortran/mpif_h/comm_splitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_splitf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_freef.lo: src/binding/fortran/mpif_h/comm_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_freef.lo `test -f 'src/binding/fortran/mpif_h/comm_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_freef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_freef.lo `test -f 'src/binding/fortran/mpif_h/comm_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_freef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commtesticf.lo: src/binding/fortran/mpif_h/commtesticf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commtesticf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commtesticf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commtesticf.lo `test -f 'src/binding/fortran/mpif_h/commtesticf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commtesticf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commtesticf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commtesticf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commtesticf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commtesticf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commtesticf.lo `test -f 'src/binding/fortran/mpif_h/commtesticf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commtesticf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commrsizef.lo: src/binding/fortran/mpif_h/commrsizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commrsizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrsizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commrsizef.lo `test -f 'src/binding/fortran/mpif_h/commrsizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commrsizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrsizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrsizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commrsizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commrsizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commrsizef.lo `test -f 'src/binding/fortran/mpif_h/commrsizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commrsizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commrgroupf.lo: src/binding/fortran/mpif_h/commrgroupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commrgroupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrgroupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commrgroupf.lo `test -f 'src/binding/fortran/mpif_h/commrgroupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commrgroupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrgroupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrgroupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commrgroupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commrgroupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commrgroupf.lo `test -f 'src/binding/fortran/mpif_h/commrgroupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commrgroupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iccreatef.lo: src/binding/fortran/mpif_h/iccreatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iccreatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iccreatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iccreatef.lo `test -f 'src/binding/fortran/mpif_h/iccreatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iccreatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iccreatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iccreatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iccreatef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iccreatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iccreatef.lo `test -f 'src/binding/fortran/mpif_h/iccreatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iccreatef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-icmergef.lo: src/binding/fortran/mpif_h/icmergef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-icmergef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-icmergef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-icmergef.lo `test -f 'src/binding/fortran/mpif_h/icmergef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/icmergef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-icmergef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-icmergef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/icmergef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-icmergef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-icmergef.lo `test -f 'src/binding/fortran/mpif_h/icmergef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/icmergef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_freef.lo: src/binding/fortran/mpif_h/keyval_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_freef.lo `test -f 'src/binding/fortran/mpif_h/keyval_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/keyval_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/keyval_freef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_freef.lo `test -f 'src/binding/fortran/mpif_h/keyval_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/keyval_freef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-attr_putf.lo: src/binding/fortran/mpif_h/attr_putf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-attr_putf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_putf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-attr_putf.lo `test -f 'src/binding/fortran/mpif_h/attr_putf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_putf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_putf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_putf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/attr_putf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-attr_putf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-attr_putf.lo `test -f 'src/binding/fortran/mpif_h/attr_putf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_putf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-attr_getf.lo: src/binding/fortran/mpif_h/attr_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-attr_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-attr_getf.lo `test -f 'src/binding/fortran/mpif_h/attr_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/attr_getf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-attr_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-attr_getf.lo `test -f 'src/binding/fortran/mpif_h/attr_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_getf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-attr_deletef.lo: src/binding/fortran/mpif_h/attr_deletef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-attr_deletef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_deletef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-attr_deletef.lo `test -f 'src/binding/fortran/mpif_h/attr_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_deletef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_deletef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_deletef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/attr_deletef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-attr_deletef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-attr_deletef.lo `test -f 'src/binding/fortran/mpif_h/attr_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_deletef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-topo_testf.lo: src/binding/fortran/mpif_h/topo_testf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-topo_testf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-topo_testf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-topo_testf.lo `test -f 'src/binding/fortran/mpif_h/topo_testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/topo_testf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-topo_testf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-topo_testf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/topo_testf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-topo_testf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-topo_testf.lo `test -f 'src/binding/fortran/mpif_h/topo_testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/topo_testf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_createf.lo: src/binding/fortran/mpif_h/cart_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cart_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_createf.lo `test -f 'src/binding/fortran/mpif_h/cart_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cart_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_createf.lo `test -f 'src/binding/fortran/mpif_h/cart_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dims_createf.lo: src/binding/fortran/mpif_h/dims_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dims_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dims_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dims_createf.lo `test -f 'src/binding/fortran/mpif_h/dims_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dims_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dims_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dims_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dims_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dims_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dims_createf.lo `test -f 'src/binding/fortran/mpif_h/dims_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dims_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-graph_createf.lo: src/binding/fortran/mpif_h/graph_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-graph_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-graph_createf.lo `test -f 'src/binding/fortran/mpif_h/graph_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/graph_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-graph_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-graph_createf.lo `test -f 'src/binding/fortran/mpif_h/graph_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-graphdims_getf.lo: src/binding/fortran/mpif_h/graphdims_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-graphdims_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graphdims_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-graphdims_getf.lo `test -f 'src/binding/fortran/mpif_h/graphdims_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graphdims_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graphdims_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graphdims_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/graphdims_getf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-graphdims_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-graphdims_getf.lo `test -f 'src/binding/fortran/mpif_h/graphdims_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graphdims_getf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-graph_getf.lo: src/binding/fortran/mpif_h/graph_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-graph_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-graph_getf.lo `test -f 'src/binding/fortran/mpif_h/graph_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/graph_getf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-graph_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-graph_getf.lo `test -f 'src/binding/fortran/mpif_h/graph_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_getf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cartdim_getf.lo: src/binding/fortran/mpif_h/cartdim_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cartdim_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cartdim_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cartdim_getf.lo `test -f 'src/binding/fortran/mpif_h/cartdim_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cartdim_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cartdim_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cartdim_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cartdim_getf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cartdim_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cartdim_getf.lo `test -f 'src/binding/fortran/mpif_h/cartdim_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cartdim_getf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_getf.lo: src/binding/fortran/mpif_h/cart_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cart_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_getf.lo `test -f 'src/binding/fortran/mpif_h/cart_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_getf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cart_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_getf.lo `test -f 'src/binding/fortran/mpif_h/cart_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_getf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_rankf.lo: src/binding/fortran/mpif_h/cart_rankf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cart_rankf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_rankf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_rankf.lo `test -f 'src/binding/fortran/mpif_h/cart_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_rankf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_rankf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_rankf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_rankf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cart_rankf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_rankf.lo `test -f 'src/binding/fortran/mpif_h/cart_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_rankf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_coordsf.lo: src/binding/fortran/mpif_h/cart_coordsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cart_coordsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_coordsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_coordsf.lo `test -f 'src/binding/fortran/mpif_h/cart_coordsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_coordsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_coordsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_coordsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_coordsf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cart_coordsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_coordsf.lo `test -f 'src/binding/fortran/mpif_h/cart_coordsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_coordsf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbcountf.lo: src/binding/fortran/mpif_h/grfnbcountf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbcountf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbcountf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbcountf.lo `test -f 'src/binding/fortran/mpif_h/grfnbcountf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grfnbcountf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbcountf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbcountf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grfnbcountf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbcountf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbcountf.lo `test -f 'src/binding/fortran/mpif_h/grfnbcountf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grfnbcountf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbrsf.lo: src/binding/fortran/mpif_h/grfnbrsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbrsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbrsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbrsf.lo `test -f 'src/binding/fortran/mpif_h/grfnbrsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grfnbrsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbrsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbrsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grfnbrsf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbrsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-grfnbrsf.lo `test -f 'src/binding/fortran/mpif_h/grfnbrsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grfnbrsf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_shiftf.lo: src/binding/fortran/mpif_h/cart_shiftf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cart_shiftf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_shiftf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_shiftf.lo `test -f 'src/binding/fortran/mpif_h/cart_shiftf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_shiftf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_shiftf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_shiftf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_shiftf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cart_shiftf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_shiftf.lo `test -f 'src/binding/fortran/mpif_h/cart_shiftf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_shiftf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_subf.lo: src/binding/fortran/mpif_h/cart_subf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cart_subf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_subf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_subf.lo `test -f 'src/binding/fortran/mpif_h/cart_subf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_subf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_subf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_subf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_subf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cart_subf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_subf.lo `test -f 'src/binding/fortran/mpif_h/cart_subf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_subf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-cart_mapf.lo: src/binding/fortran/mpif_h/cart_mapf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-cart_mapf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_mapf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_mapf.lo `test -f 'src/binding/fortran/mpif_h/cart_mapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_mapf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_mapf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_mapf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_mapf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-cart_mapf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-cart_mapf.lo `test -f 'src/binding/fortran/mpif_h/cart_mapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_mapf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-graph_mapf.lo: src/binding/fortran/mpif_h/graph_mapf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-graph_mapf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_mapf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-graph_mapf.lo `test -f 'src/binding/fortran/mpif_h/graph_mapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_mapf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_mapf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_mapf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/graph_mapf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-graph_mapf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-graph_mapf.lo `test -f 'src/binding/fortran/mpif_h/graph_mapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_mapf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-getpnamef.lo: src/binding/fortran/mpif_h/getpnamef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-getpnamef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getpnamef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-getpnamef.lo `test -f 'src/binding/fortran/mpif_h/getpnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getpnamef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getpnamef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getpnamef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/getpnamef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-getpnamef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-getpnamef.lo `test -f 'src/binding/fortran/mpif_h/getpnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getpnamef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-get_versionf.lo: src/binding/fortran/mpif_h/get_versionf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-get_versionf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_versionf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_versionf.lo `test -f 'src/binding/fortran/mpif_h/get_versionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_versionf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_versionf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_versionf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_versionf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-get_versionf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_versionf.lo `test -f 'src/binding/fortran/mpif_h/get_versionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_versionf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-get_library_versionf.lo: src/binding/fortran/mpif_h/get_library_versionf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-get_library_versionf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_library_versionf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_library_versionf.lo `test -f 'src/binding/fortran/mpif_h/get_library_versionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_library_versionf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_library_versionf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_library_versionf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_library_versionf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-get_library_versionf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_library_versionf.lo `test -f 'src/binding/fortran/mpif_h/get_library_versionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_library_versionf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-errhcreatef.lo: src/binding/fortran/mpif_h/errhcreatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-errhcreatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhcreatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-errhcreatef.lo `test -f 'src/binding/fortran/mpif_h/errhcreatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhcreatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhcreatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhcreatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/errhcreatef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-errhcreatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-errhcreatef.lo `test -f 'src/binding/fortran/mpif_h/errhcreatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhcreatef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-errhsetf.lo: src/binding/fortran/mpif_h/errhsetf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-errhsetf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhsetf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-errhsetf.lo `test -f 'src/binding/fortran/mpif_h/errhsetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhsetf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhsetf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhsetf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/errhsetf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-errhsetf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-errhsetf.lo `test -f 'src/binding/fortran/mpif_h/errhsetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhsetf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-errhgetf.lo: src/binding/fortran/mpif_h/errhgetf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-errhgetf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhgetf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-errhgetf.lo `test -f 'src/binding/fortran/mpif_h/errhgetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhgetf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhgetf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhgetf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/errhgetf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-errhgetf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-errhgetf.lo `test -f 'src/binding/fortran/mpif_h/errhgetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhgetf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-errhfreef.lo: src/binding/fortran/mpif_h/errhfreef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-errhfreef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhfreef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-errhfreef.lo `test -f 'src/binding/fortran/mpif_h/errhfreef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhfreef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhfreef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhfreef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/errhfreef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-errhfreef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-errhfreef.lo `test -f 'src/binding/fortran/mpif_h/errhfreef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhfreef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-error_stringf.lo: src/binding/fortran/mpif_h/error_stringf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-error_stringf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_stringf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-error_stringf.lo `test -f 'src/binding/fortran/mpif_h/error_stringf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/error_stringf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_stringf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_stringf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/error_stringf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-error_stringf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-error_stringf.lo `test -f 'src/binding/fortran/mpif_h/error_stringf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/error_stringf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-error_classf.lo: src/binding/fortran/mpif_h/error_classf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-error_classf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_classf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-error_classf.lo `test -f 'src/binding/fortran/mpif_h/error_classf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/error_classf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_classf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_classf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/error_classf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-error_classf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-error_classf.lo `test -f 'src/binding/fortran/mpif_h/error_classf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/error_classf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-finalizef.lo: src/binding/fortran/mpif_h/finalizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-finalizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-finalizef.lo `test -f 'src/binding/fortran/mpif_h/finalizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/finalizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/finalizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-finalizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-finalizef.lo `test -f 'src/binding/fortran/mpif_h/finalizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/finalizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-initializedf.lo: src/binding/fortran/mpif_h/initializedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-initializedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initializedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-initializedf.lo `test -f 'src/binding/fortran/mpif_h/initializedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initializedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initializedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initializedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/initializedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-initializedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-initializedf.lo `test -f 'src/binding/fortran/mpif_h/initializedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initializedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-abortf.lo: src/binding/fortran/mpif_h/abortf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-abortf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-abortf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-abortf.lo `test -f 'src/binding/fortran/mpif_h/abortf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/abortf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-abortf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-abortf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/abortf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-abortf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-abortf.lo `test -f 'src/binding/fortran/mpif_h/abortf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/abortf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-close_portf.lo: src/binding/fortran/mpif_h/close_portf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-close_portf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-close_portf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-close_portf.lo `test -f 'src/binding/fortran/mpif_h/close_portf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/close_portf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-close_portf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-close_portf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/close_portf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-close_portf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-close_portf.lo `test -f 'src/binding/fortran/mpif_h/close_portf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/close_portf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_acceptf.lo: src/binding/fortran/mpif_h/comm_acceptf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_acceptf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_acceptf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_acceptf.lo `test -f 'src/binding/fortran/mpif_h/comm_acceptf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_acceptf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_acceptf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_acceptf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_acceptf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_acceptf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_acceptf.lo `test -f 'src/binding/fortran/mpif_h/comm_acceptf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_acceptf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_connectf.lo: src/binding/fortran/mpif_h/comm_connectf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_connectf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_connectf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_connectf.lo `test -f 'src/binding/fortran/mpif_h/comm_connectf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_connectf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_connectf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_connectf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_connectf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_connectf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_connectf.lo `test -f 'src/binding/fortran/mpif_h/comm_connectf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_connectf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commdiscf.lo: src/binding/fortran/mpif_h/commdiscf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commdiscf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdiscf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commdiscf.lo `test -f 'src/binding/fortran/mpif_h/commdiscf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commdiscf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdiscf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdiscf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commdiscf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commdiscf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commdiscf.lo `test -f 'src/binding/fortran/mpif_h/commdiscf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commdiscf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commparentf.lo: src/binding/fortran/mpif_h/commparentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commparentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commparentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commparentf.lo `test -f 'src/binding/fortran/mpif_h/commparentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commparentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commparentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commparentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commparentf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commparentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commparentf.lo `test -f 'src/binding/fortran/mpif_h/commparentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commparentf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_joinf.lo: src/binding/fortran/mpif_h/comm_joinf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_joinf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_joinf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_joinf.lo `test -f 'src/binding/fortran/mpif_h/comm_joinf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_joinf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_joinf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_joinf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_joinf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_joinf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_joinf.lo `test -f 'src/binding/fortran/mpif_h/comm_joinf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_joinf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_spawnf.lo: src/binding/fortran/mpif_h/comm_spawnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_spawnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_spawnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_spawnf.lo `test -f 'src/binding/fortran/mpif_h/comm_spawnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_spawnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_spawnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_spawnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_spawnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_spawnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_spawnf.lo `test -f 'src/binding/fortran/mpif_h/comm_spawnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_spawnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-spawnmultf.lo: src/binding/fortran/mpif_h/spawnmultf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-spawnmultf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-spawnmultf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-spawnmultf.lo `test -f 'src/binding/fortran/mpif_h/spawnmultf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/spawnmultf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-spawnmultf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-spawnmultf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/spawnmultf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-spawnmultf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-spawnmultf.lo `test -f 'src/binding/fortran/mpif_h/spawnmultf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/spawnmultf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-lookup_namef.lo: src/binding/fortran/mpif_h/lookup_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-lookup_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-lookup_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-lookup_namef.lo `test -f 'src/binding/fortran/mpif_h/lookup_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/lookup_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-lookup_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-lookup_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/lookup_namef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-lookup_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-lookup_namef.lo `test -f 'src/binding/fortran/mpif_h/lookup_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/lookup_namef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-open_portf.lo: src/binding/fortran/mpif_h/open_portf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-open_portf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-open_portf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-open_portf.lo `test -f 'src/binding/fortran/mpif_h/open_portf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/open_portf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-open_portf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-open_portf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/open_portf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-open_portf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-open_portf.lo `test -f 'src/binding/fortran/mpif_h/open_portf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/open_portf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-publish_namef.lo: src/binding/fortran/mpif_h/publish_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-publish_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-publish_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-publish_namef.lo `test -f 'src/binding/fortran/mpif_h/publish_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/publish_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-publish_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-publish_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/publish_namef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-publish_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-publish_namef.lo `test -f 'src/binding/fortran/mpif_h/publish_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/publish_namef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-unpubnamef.lo: src/binding/fortran/mpif_h/unpubnamef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-unpubnamef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpubnamef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-unpubnamef.lo `test -f 'src/binding/fortran/mpif_h/unpubnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpubnamef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpubnamef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpubnamef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/unpubnamef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-unpubnamef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-unpubnamef.lo `test -f 'src/binding/fortran/mpif_h/unpubnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpubnamef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_infof.lo: src/binding/fortran/mpif_h/comm_set_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_set_infof.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_infof.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_infof.lo: src/binding/fortran/mpif_h/comm_get_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_get_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_get_infof.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_get_infof.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-accumulatef.lo: src/binding/fortran/mpif_h/accumulatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-accumulatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-accumulatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-accumulatef.lo `test -f 'src/binding/fortran/mpif_h/accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/accumulatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-accumulatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-accumulatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/accumulatef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-accumulatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-accumulatef.lo `test -f 'src/binding/fortran/mpif_h/accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/accumulatef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-getf.lo: src/binding/fortran/mpif_h/getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-getf.lo `test -f 'src/binding/fortran/mpif_h/getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/getf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-getf.lo `test -f 'src/binding/fortran/mpif_h/getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-putf.lo: src/binding/fortran/mpif_h/putf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-putf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-putf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-putf.lo `test -f 'src/binding/fortran/mpif_h/putf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/putf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-putf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-putf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/putf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-putf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-putf.lo `test -f 'src/binding/fortran/mpif_h/putf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/putf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_completef.lo: src/binding/fortran/mpif_h/win_completef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_completef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_completef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_completef.lo `test -f 'src/binding/fortran/mpif_h/win_completef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_completef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_completef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_completef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_completef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_completef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_completef.lo `test -f 'src/binding/fortran/mpif_h/win_completef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_completef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_createf.lo: src/binding/fortran/mpif_h/win_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_createf.lo `test -f 'src/binding/fortran/mpif_h/win_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_createf.lo `test -f 'src/binding/fortran/mpif_h/win_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_fencef.lo: src/binding/fortran/mpif_h/win_fencef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_fencef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_fencef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_fencef.lo `test -f 'src/binding/fortran/mpif_h/win_fencef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_fencef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_fencef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_fencef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_fencef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_fencef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_fencef.lo `test -f 'src/binding/fortran/mpif_h/win_fencef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_fencef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_freef.lo: src/binding/fortran/mpif_h/win_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_freef.lo `test -f 'src/binding/fortran/mpif_h/win_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_freef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_freef.lo `test -f 'src/binding/fortran/mpif_h/win_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_freef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_groupf.lo: src/binding/fortran/mpif_h/win_get_groupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_groupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_groupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_groupf.lo `test -f 'src/binding/fortran/mpif_h/win_get_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_groupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_groupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_groupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_get_groupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_groupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_groupf.lo `test -f 'src/binding/fortran/mpif_h/win_get_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_groupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_lockf.lo: src/binding/fortran/mpif_h/win_lockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_lockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_lockf.lo `test -f 'src/binding/fortran/mpif_h/win_lockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_lockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_lockf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_lockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_lockf.lo `test -f 'src/binding/fortran/mpif_h/win_lockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_lockf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_postf.lo: src/binding/fortran/mpif_h/win_postf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_postf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_postf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_postf.lo `test -f 'src/binding/fortran/mpif_h/win_postf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_postf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_postf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_postf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_postf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_postf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_postf.lo `test -f 'src/binding/fortran/mpif_h/win_postf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_postf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_startf.lo: src/binding/fortran/mpif_h/win_startf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_startf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_startf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_startf.lo `test -f 'src/binding/fortran/mpif_h/win_startf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_startf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_startf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_startf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_startf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_startf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_startf.lo `test -f 'src/binding/fortran/mpif_h/win_startf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_startf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_testf.lo: src/binding/fortran/mpif_h/win_testf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_testf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_testf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_testf.lo `test -f 'src/binding/fortran/mpif_h/win_testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_testf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_testf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_testf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_testf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_testf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_testf.lo `test -f 'src/binding/fortran/mpif_h/win_testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_testf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlockf.lo: src/binding/fortran/mpif_h/win_unlockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlockf.lo `test -f 'src/binding/fortran/mpif_h/win_unlockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_unlockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_unlockf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlockf.lo `test -f 'src/binding/fortran/mpif_h/win_unlockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_unlockf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_waitf.lo: src/binding/fortran/mpif_h/win_waitf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_waitf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_waitf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_waitf.lo `test -f 'src/binding/fortran/mpif_h/win_waitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_waitf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_waitf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_waitf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_waitf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_waitf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_waitf.lo `test -f 'src/binding/fortran/mpif_h/win_waitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_waitf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocatef.lo: src/binding/fortran/mpif_h/win_allocatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocatef.lo `test -f 'src/binding/fortran/mpif_h/win_allocatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_allocatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_allocatef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocatef.lo `test -f 'src/binding/fortran/mpif_h/win_allocatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_allocatef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocate_sharedf.lo: src/binding/fortran/mpif_h/win_allocate_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocate_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocate_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocate_sharedf.lo `test -f 'src/binding/fortran/mpif_h/win_allocate_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_allocate_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocate_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocate_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_allocate_sharedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocate_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_allocate_sharedf.lo `test -f 'src/binding/fortran/mpif_h/win_allocate_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_allocate_sharedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_shared_queryf.lo: src/binding/fortran/mpif_h/win_shared_queryf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_shared_queryf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_shared_queryf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_shared_queryf.lo `test -f 'src/binding/fortran/mpif_h/win_shared_queryf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_shared_queryf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_shared_queryf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_shared_queryf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_shared_queryf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_shared_queryf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_shared_queryf.lo `test -f 'src/binding/fortran/mpif_h/win_shared_queryf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_shared_queryf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_create_dynamicf.lo: src/binding/fortran/mpif_h/win_create_dynamicf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_create_dynamicf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_create_dynamicf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_create_dynamicf.lo `test -f 'src/binding/fortran/mpif_h/win_create_dynamicf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_create_dynamicf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_create_dynamicf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_create_dynamicf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_create_dynamicf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_create_dynamicf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_create_dynamicf.lo `test -f 'src/binding/fortran/mpif_h/win_create_dynamicf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_create_dynamicf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_attachf.lo: src/binding/fortran/mpif_h/win_attachf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_attachf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_attachf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_attachf.lo `test -f 'src/binding/fortran/mpif_h/win_attachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_attachf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_attachf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_attachf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_attachf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_attachf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_attachf.lo `test -f 'src/binding/fortran/mpif_h/win_attachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_attachf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_detachf.lo: src/binding/fortran/mpif_h/win_detachf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_detachf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_detachf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_detachf.lo `test -f 'src/binding/fortran/mpif_h/win_detachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_detachf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_detachf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_detachf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_detachf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_detachf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_detachf.lo `test -f 'src/binding/fortran/mpif_h/win_detachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_detachf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_infof.lo: src/binding/fortran/mpif_h/win_get_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_infof.lo `test -f 'src/binding/fortran/mpif_h/win_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_get_infof.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_infof.lo `test -f 'src/binding/fortran/mpif_h/win_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_infof.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_infof.lo: src/binding/fortran/mpif_h/win_set_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_infof.lo `test -f 'src/binding/fortran/mpif_h/win_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_set_infof.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_infof.lo `test -f 'src/binding/fortran/mpif_h/win_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_infof.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-get_accumulatef.lo: src/binding/fortran/mpif_h/get_accumulatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-get_accumulatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_accumulatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_accumulatef.lo `test -f 'src/binding/fortran/mpif_h/get_accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_accumulatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_accumulatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_accumulatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_accumulatef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-get_accumulatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_accumulatef.lo `test -f 'src/binding/fortran/mpif_h/get_accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_accumulatef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-fetch_and_opf.lo: src/binding/fortran/mpif_h/fetch_and_opf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-fetch_and_opf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fetch_and_opf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-fetch_and_opf.lo `test -f 'src/binding/fortran/mpif_h/fetch_and_opf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fetch_and_opf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fetch_and_opf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fetch_and_opf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/fetch_and_opf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-fetch_and_opf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-fetch_and_opf.lo `test -f 'src/binding/fortran/mpif_h/fetch_and_opf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fetch_and_opf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-compare_and_swapf.lo: src/binding/fortran/mpif_h/compare_and_swapf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-compare_and_swapf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-compare_and_swapf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-compare_and_swapf.lo `test -f 'src/binding/fortran/mpif_h/compare_and_swapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/compare_and_swapf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-compare_and_swapf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-compare_and_swapf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/compare_and_swapf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-compare_and_swapf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-compare_and_swapf.lo `test -f 'src/binding/fortran/mpif_h/compare_and_swapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/compare_and_swapf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-rputf.lo: src/binding/fortran/mpif_h/rputf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-rputf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rputf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rputf.lo `test -f 'src/binding/fortran/mpif_h/rputf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rputf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rputf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rputf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rputf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-rputf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rputf.lo `test -f 'src/binding/fortran/mpif_h/rputf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rputf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-rgetf.lo: src/binding/fortran/mpif_h/rgetf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-rgetf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rgetf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rgetf.lo `test -f 'src/binding/fortran/mpif_h/rgetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rgetf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rgetf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rgetf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rgetf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-rgetf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rgetf.lo `test -f 'src/binding/fortran/mpif_h/rgetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rgetf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-raccumulatef.lo: src/binding/fortran/mpif_h/raccumulatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-raccumulatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-raccumulatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-raccumulatef.lo `test -f 'src/binding/fortran/mpif_h/raccumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/raccumulatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-raccumulatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-raccumulatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/raccumulatef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-raccumulatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-raccumulatef.lo `test -f 'src/binding/fortran/mpif_h/raccumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/raccumulatef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-rget_accumulatef.lo: src/binding/fortran/mpif_h/rget_accumulatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-rget_accumulatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rget_accumulatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rget_accumulatef.lo `test -f 'src/binding/fortran/mpif_h/rget_accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rget_accumulatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rget_accumulatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rget_accumulatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rget_accumulatef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-rget_accumulatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-rget_accumulatef.lo `test -f 'src/binding/fortran/mpif_h/rget_accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rget_accumulatef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_lock_allf.lo: src/binding/fortran/mpif_h/win_lock_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_lock_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lock_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_lock_allf.lo `test -f 'src/binding/fortran/mpif_h/win_lock_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_lock_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lock_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lock_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_lock_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_lock_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_lock_allf.lo `test -f 'src/binding/fortran/mpif_h/win_lock_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_lock_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlock_allf.lo: src/binding/fortran/mpif_h/win_unlock_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlock_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlock_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlock_allf.lo `test -f 'src/binding/fortran/mpif_h/win_unlock_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_unlock_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlock_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlock_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_unlock_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlock_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_unlock_allf.lo `test -f 'src/binding/fortran/mpif_h/win_unlock_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_unlock_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_flushf.lo: src/binding/fortran/mpif_h/win_flushf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_flushf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flushf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_flushf.lo `test -f 'src/binding/fortran/mpif_h/win_flushf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flushf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flushf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flushf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_flushf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_flushf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_flushf.lo `test -f 'src/binding/fortran/mpif_h/win_flushf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flushf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_allf.lo: src/binding/fortran/mpif_h/win_flush_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_allf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_flush_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_allf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_localf.lo: src/binding/fortran/mpif_h/win_flush_localf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_localf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_localf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_localf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_localf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_localf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_localf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_localf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_flush_localf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_localf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_localf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_localf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_localf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_local_allf.lo: src/binding/fortran/mpif_h/win_flush_local_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_local_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_local_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_local_allf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_local_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_local_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_local_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_local_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_flush_local_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_local_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_flush_local_allf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_local_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_local_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_syncf.lo: src/binding/fortran/mpif_h/win_syncf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_syncf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_syncf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_syncf.lo `test -f 'src/binding/fortran/mpif_h/win_syncf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_syncf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_syncf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_syncf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_syncf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_syncf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_syncf.lo `test -f 'src/binding/fortran/mpif_h/win_syncf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_syncf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-adderrclassf.lo: src/binding/fortran/mpif_h/adderrclassf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-adderrclassf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrclassf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-adderrclassf.lo `test -f 'src/binding/fortran/mpif_h/adderrclassf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrclassf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrclassf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrclassf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/adderrclassf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-adderrclassf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-adderrclassf.lo `test -f 'src/binding/fortran/mpif_h/adderrclassf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrclassf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-adderrcodef.lo: src/binding/fortran/mpif_h/adderrcodef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-adderrcodef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrcodef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-adderrcodef.lo `test -f 'src/binding/fortran/mpif_h/adderrcodef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrcodef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrcodef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrcodef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/adderrcodef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-adderrcodef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-adderrcodef.lo `test -f 'src/binding/fortran/mpif_h/adderrcodef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrcodef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-adderrstringf.lo: src/binding/fortran/mpif_h/adderrstringf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-adderrstringf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrstringf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-adderrstringf.lo `test -f 'src/binding/fortran/mpif_h/adderrstringf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrstringf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrstringf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrstringf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/adderrstringf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-adderrstringf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-adderrstringf.lo `test -f 'src/binding/fortran/mpif_h/adderrstringf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrstringf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commcallerrf.lo: src/binding/fortran/mpif_h/commcallerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commcallerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcallerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commcallerrf.lo `test -f 'src/binding/fortran/mpif_h/commcallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commcallerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcallerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcallerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commcallerrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commcallerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commcallerrf.lo `test -f 'src/binding/fortran/mpif_h/commcallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commcallerrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commnewkeyf.lo: src/binding/fortran/mpif_h/commnewkeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commnewkeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commnewkeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commnewkeyf.lo `test -f 'src/binding/fortran/mpif_h/commnewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commnewkeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commnewkeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commnewkeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commnewkeyf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commnewkeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commnewkeyf.lo `test -f 'src/binding/fortran/mpif_h/commnewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commnewkeyf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commdelattrf.lo: src/binding/fortran/mpif_h/commdelattrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commdelattrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdelattrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commdelattrf.lo `test -f 'src/binding/fortran/mpif_h/commdelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commdelattrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdelattrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdelattrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commdelattrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commdelattrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commdelattrf.lo `test -f 'src/binding/fortran/mpif_h/commdelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commdelattrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commfreekeyf.lo: src/binding/fortran/mpif_h/commfreekeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commfreekeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commfreekeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commfreekeyf.lo `test -f 'src/binding/fortran/mpif_h/commfreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commfreekeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commfreekeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commfreekeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commfreekeyf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commfreekeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commfreekeyf.lo `test -f 'src/binding/fortran/mpif_h/commfreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commfreekeyf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_attrf.lo: src/binding/fortran/mpif_h/comm_get_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/comm_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_get_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_get_attrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/comm_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_get_attrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commgetnamf.lo: src/binding/fortran/mpif_h/commgetnamf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commgetnamf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgetnamf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commgetnamf.lo `test -f 'src/binding/fortran/mpif_h/commgetnamf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commgetnamf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgetnamf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgetnamf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commgetnamf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commgetnamf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commgetnamf.lo `test -f 'src/binding/fortran/mpif_h/commgetnamf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commgetnamf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_attrf.lo: src/binding/fortran/mpif_h/comm_set_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_attrf.lo `test -f 'src/binding/fortran/mpif_h/comm_set_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_set_attrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_attrf.lo `test -f 'src/binding/fortran/mpif_h/comm_set_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_attrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_namef.lo: src/binding/fortran/mpif_h/comm_set_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_namef.lo `test -f 'src/binding/fortran/mpif_h/comm_set_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_set_namef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_set_namef.lo `test -f 'src/binding/fortran/mpif_h/comm_set_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_namef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-filecallerrf.lo: src/binding/fortran/mpif_h/filecallerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-filecallerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecallerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-filecallerrf.lo `test -f 'src/binding/fortran/mpif_h/filecallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filecallerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecallerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecallerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/filecallerrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-filecallerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-filecallerrf.lo `test -f 'src/binding/fortran/mpif_h/filecallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filecallerrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-greqcompletef.lo: src/binding/fortran/mpif_h/greqcompletef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-greqcompletef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqcompletef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-greqcompletef.lo `test -f 'src/binding/fortran/mpif_h/greqcompletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/greqcompletef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqcompletef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqcompletef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/greqcompletef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-greqcompletef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-greqcompletef.lo `test -f 'src/binding/fortran/mpif_h/greqcompletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/greqcompletef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-greqstartf.lo: src/binding/fortran/mpif_h/greqstartf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-greqstartf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqstartf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-greqstartf.lo `test -f 'src/binding/fortran/mpif_h/greqstartf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/greqstartf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqstartf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqstartf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/greqstartf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-greqstartf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-greqstartf.lo `test -f 'src/binding/fortran/mpif_h/greqstartf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/greqstartf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-isthrmainf.lo: src/binding/fortran/mpif_h/isthrmainf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-isthrmainf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isthrmainf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-isthrmainf.lo `test -f 'src/binding/fortran/mpif_h/isthrmainf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/isthrmainf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isthrmainf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isthrmainf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/isthrmainf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-isthrmainf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-isthrmainf.lo `test -f 'src/binding/fortran/mpif_h/isthrmainf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/isthrmainf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-query_threadf.lo: src/binding/fortran/mpif_h/query_threadf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-query_threadf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-query_threadf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-query_threadf.lo `test -f 'src/binding/fortran/mpif_h/query_threadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/query_threadf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-query_threadf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-query_threadf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/query_threadf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-query_threadf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-query_threadf.lo `test -f 'src/binding/fortran/mpif_h/query_threadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/query_threadf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-statgetclf.lo: src/binding/fortran/mpif_h/statgetclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-statgetclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statgetclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-statgetclf.lo `test -f 'src/binding/fortran/mpif_h/statgetclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statgetclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statgetclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statgetclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/statgetclf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-statgetclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-statgetclf.lo `test -f 'src/binding/fortran/mpif_h/statgetclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statgetclf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-statsetelf.lo: src/binding/fortran/mpif_h/statsetelf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-statsetelf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statsetelf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-statsetelf.lo `test -f 'src/binding/fortran/mpif_h/statsetelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statsetelf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statsetelf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statsetelf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/statsetelf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-statsetelf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-statsetelf.lo `test -f 'src/binding/fortran/mpif_h/statsetelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statsetelf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typenewkeyf.lo: src/binding/fortran/mpif_h/typenewkeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typenewkeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typenewkeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typenewkeyf.lo `test -f 'src/binding/fortran/mpif_h/typenewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typenewkeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typenewkeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typenewkeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typenewkeyf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typenewkeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typenewkeyf.lo `test -f 'src/binding/fortran/mpif_h/typenewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typenewkeyf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typedelattrf.lo: src/binding/fortran/mpif_h/typedelattrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typedelattrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedelattrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typedelattrf.lo `test -f 'src/binding/fortran/mpif_h/typedelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typedelattrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedelattrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedelattrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typedelattrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typedelattrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typedelattrf.lo `test -f 'src/binding/fortran/mpif_h/typedelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typedelattrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_dupf.lo: src/binding/fortran/mpif_h/type_dupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_dupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_dupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_dupf.lo `test -f 'src/binding/fortran/mpif_h/type_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_dupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_dupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_dupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_dupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_dupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_dupf.lo `test -f 'src/binding/fortran/mpif_h/type_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_dupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typefreekeyf.lo: src/binding/fortran/mpif_h/typefreekeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typefreekeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typefreekeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typefreekeyf.lo `test -f 'src/binding/fortran/mpif_h/typefreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typefreekeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typefreekeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typefreekeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typefreekeyf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typefreekeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typefreekeyf.lo `test -f 'src/binding/fortran/mpif_h/typefreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typefreekeyf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_attrf.lo: src/binding/fortran/mpif_h/type_get_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/type_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_get_attrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/type_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_attrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typegetcntsf.lo: src/binding/fortran/mpif_h/typegetcntsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typegetcntsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetcntsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegetcntsf.lo `test -f 'src/binding/fortran/mpif_h/typegetcntsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetcntsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetcntsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetcntsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegetcntsf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typegetcntsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegetcntsf.lo `test -f 'src/binding/fortran/mpif_h/typegetcntsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetcntsf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typegetenvf.lo: src/binding/fortran/mpif_h/typegetenvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typegetenvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetenvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegetenvf.lo `test -f 'src/binding/fortran/mpif_h/typegetenvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetenvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetenvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetenvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegetenvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typegetenvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegetenvf.lo `test -f 'src/binding/fortran/mpif_h/typegetenvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetenvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typegnamef.lo: src/binding/fortran/mpif_h/typegnamef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typegnamef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegnamef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegnamef.lo `test -f 'src/binding/fortran/mpif_h/typegnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegnamef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegnamef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegnamef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegnamef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typegnamef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegnamef.lo `test -f 'src/binding/fortran/mpif_h/typegnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegnamef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typesetattrf.lo: src/binding/fortran/mpif_h/typesetattrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typesetattrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetattrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typesetattrf.lo `test -f 'src/binding/fortran/mpif_h/typesetattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typesetattrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetattrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetattrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typesetattrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typesetattrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typesetattrf.lo `test -f 'src/binding/fortran/mpif_h/typesetattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typesetattrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typesetnamef.lo: src/binding/fortran/mpif_h/typesetnamef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typesetnamef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetnamef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typesetnamef.lo `test -f 'src/binding/fortran/mpif_h/typesetnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typesetnamef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetnamef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetnamef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typesetnamef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typesetnamef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typesetnamef.lo `test -f 'src/binding/fortran/mpif_h/typesetnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typesetnamef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_match_sizef.lo: src/binding/fortran/mpif_h/type_match_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_match_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_match_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_match_sizef.lo `test -f 'src/binding/fortran/mpif_h/type_match_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_match_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_match_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_match_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_match_sizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_match_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_match_sizef.lo `test -f 'src/binding/fortran/mpif_h/type_match_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_match_sizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-wincallerrf.lo: src/binding/fortran/mpif_h/wincallerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-wincallerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincallerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wincallerrf.lo `test -f 'src/binding/fortran/mpif_h/wincallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wincallerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincallerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincallerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wincallerrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-wincallerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wincallerrf.lo `test -f 'src/binding/fortran/mpif_h/wincallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wincallerrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-winnewkeyf.lo: src/binding/fortran/mpif_h/winnewkeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-winnewkeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winnewkeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-winnewkeyf.lo `test -f 'src/binding/fortran/mpif_h/winnewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winnewkeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winnewkeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winnewkeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/winnewkeyf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-winnewkeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-winnewkeyf.lo `test -f 'src/binding/fortran/mpif_h/winnewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winnewkeyf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-windelattrf.lo: src/binding/fortran/mpif_h/windelattrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-windelattrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-windelattrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-windelattrf.lo `test -f 'src/binding/fortran/mpif_h/windelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/windelattrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-windelattrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-windelattrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/windelattrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-windelattrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-windelattrf.lo `test -f 'src/binding/fortran/mpif_h/windelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/windelattrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-winfreekeyf.lo: src/binding/fortran/mpif_h/winfreekeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-winfreekeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winfreekeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-winfreekeyf.lo `test -f 'src/binding/fortran/mpif_h/winfreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winfreekeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winfreekeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winfreekeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/winfreekeyf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-winfreekeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-winfreekeyf.lo `test -f 'src/binding/fortran/mpif_h/winfreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winfreekeyf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_attrf.lo: src/binding/fortran/mpif_h/win_get_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/win_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_get_attrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/win_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_attrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_namef.lo: src/binding/fortran/mpif_h/win_get_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_namef.lo `test -f 'src/binding/fortran/mpif_h/win_get_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_get_namef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_get_namef.lo `test -f 'src/binding/fortran/mpif_h/win_get_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_namef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_attrf.lo: src/binding/fortran/mpif_h/win_set_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_attrf.lo `test -f 'src/binding/fortran/mpif_h/win_set_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_set_attrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_attrf.lo `test -f 'src/binding/fortran/mpif_h/win_set_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_attrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_namef.lo: src/binding/fortran/mpif_h/win_set_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_namef.lo `test -f 'src/binding/fortran/mpif_h/win_set_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_set_namef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-win_set_namef.lo `test -f 'src/binding/fortran/mpif_h/win_set_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_namef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-alloc_memf.lo: src/binding/fortran/mpif_h/alloc_memf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-alloc_memf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alloc_memf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-alloc_memf.lo `test -f 'src/binding/fortran/mpif_h/alloc_memf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alloc_memf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alloc_memf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alloc_memf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/alloc_memf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-alloc_memf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-alloc_memf.lo `test -f 'src/binding/fortran/mpif_h/alloc_memf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alloc_memf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commcreerrf.lo: src/binding/fortran/mpif_h/commcreerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commcreerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcreerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commcreerrf.lo `test -f 'src/binding/fortran/mpif_h/commcreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commcreerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcreerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcreerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commcreerrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commcreerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commcreerrf.lo `test -f 'src/binding/fortran/mpif_h/commcreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commcreerrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commgeterrf.lo: src/binding/fortran/mpif_h/commgeterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commgeterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgeterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commgeterrf.lo `test -f 'src/binding/fortran/mpif_h/commgeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commgeterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgeterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgeterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commgeterrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commgeterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commgeterrf.lo `test -f 'src/binding/fortran/mpif_h/commgeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commgeterrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-commseterrf.lo: src/binding/fortran/mpif_h/commseterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-commseterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commseterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commseterrf.lo `test -f 'src/binding/fortran/mpif_h/commseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commseterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commseterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commseterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commseterrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-commseterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-commseterrf.lo `test -f 'src/binding/fortran/mpif_h/commseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commseterrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-filecreerrf.lo: src/binding/fortran/mpif_h/filecreerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-filecreerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecreerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-filecreerrf.lo `test -f 'src/binding/fortran/mpif_h/filecreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filecreerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecreerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecreerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/filecreerrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-filecreerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-filecreerrf.lo `test -f 'src/binding/fortran/mpif_h/filecreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filecreerrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-filegeterrf.lo: src/binding/fortran/mpif_h/filegeterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-filegeterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filegeterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-filegeterrf.lo `test -f 'src/binding/fortran/mpif_h/filegeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filegeterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filegeterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filegeterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/filegeterrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-filegeterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-filegeterrf.lo `test -f 'src/binding/fortran/mpif_h/filegeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filegeterrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-fileseterrf.lo: src/binding/fortran/mpif_h/fileseterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-fileseterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fileseterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-fileseterrf.lo `test -f 'src/binding/fortran/mpif_h/fileseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fileseterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fileseterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fileseterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/fileseterrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-fileseterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-fileseterrf.lo `test -f 'src/binding/fortran/mpif_h/fileseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fileseterrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-finalizedf.lo: src/binding/fortran/mpif_h/finalizedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-finalizedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-finalizedf.lo `test -f 'src/binding/fortran/mpif_h/finalizedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/finalizedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/finalizedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-finalizedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-finalizedf.lo `test -f 'src/binding/fortran/mpif_h/finalizedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/finalizedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-free_memf.lo: src/binding/fortran/mpif_h/free_memf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-free_memf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-free_memf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-free_memf.lo `test -f 'src/binding/fortran/mpif_h/free_memf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/free_memf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-free_memf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-free_memf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/free_memf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-free_memf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-free_memf.lo `test -f 'src/binding/fortran/mpif_h/free_memf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/free_memf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-info_createf.lo: src/binding/fortran/mpif_h/info_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-info_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_createf.lo `test -f 'src/binding/fortran/mpif_h/info_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-info_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_createf.lo `test -f 'src/binding/fortran/mpif_h/info_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-info_deletef.lo: src/binding/fortran/mpif_h/info_deletef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-info_deletef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_deletef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_deletef.lo `test -f 'src/binding/fortran/mpif_h/info_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_deletef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_deletef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_deletef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_deletef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-info_deletef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_deletef.lo `test -f 'src/binding/fortran/mpif_h/info_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_deletef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-info_dupf.lo: src/binding/fortran/mpif_h/info_dupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-info_dupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_dupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_dupf.lo `test -f 'src/binding/fortran/mpif_h/info_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_dupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_dupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_dupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_dupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-info_dupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_dupf.lo `test -f 'src/binding/fortran/mpif_h/info_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_dupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-info_freef.lo: src/binding/fortran/mpif_h/info_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-info_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_freef.lo `test -f 'src/binding/fortran/mpif_h/info_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_freef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-info_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_freef.lo `test -f 'src/binding/fortran/mpif_h/info_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_freef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-info_getf.lo: src/binding/fortran/mpif_h/info_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-info_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_getf.lo `test -f 'src/binding/fortran/mpif_h/info_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_getf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-info_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_getf.lo `test -f 'src/binding/fortran/mpif_h/info_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_getf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-infognkf.lo: src/binding/fortran/mpif_h/infognkf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-infognkf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognkf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-infognkf.lo `test -f 'src/binding/fortran/mpif_h/infognkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infognkf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognkf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognkf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/infognkf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-infognkf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-infognkf.lo `test -f 'src/binding/fortran/mpif_h/infognkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infognkf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-infognthkf.lo: src/binding/fortran/mpif_h/infognthkf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-infognthkf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognthkf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-infognthkf.lo `test -f 'src/binding/fortran/mpif_h/infognthkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infognthkf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognthkf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognthkf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/infognthkf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-infognthkf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-infognthkf.lo `test -f 'src/binding/fortran/mpif_h/infognthkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infognthkf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-infovallenf.lo: src/binding/fortran/mpif_h/infovallenf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-infovallenf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infovallenf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-infovallenf.lo `test -f 'src/binding/fortran/mpif_h/infovallenf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infovallenf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infovallenf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infovallenf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/infovallenf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-infovallenf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-infovallenf.lo `test -f 'src/binding/fortran/mpif_h/infovallenf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infovallenf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-info_setf.lo: src/binding/fortran/mpif_h/info_setf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-info_setf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_setf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_setf.lo `test -f 'src/binding/fortran/mpif_h/info_setf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_setf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_setf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_setf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_setf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-info_setf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-info_setf.lo `test -f 'src/binding/fortran/mpif_h/info_setf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_setf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-pack_externalf.lo: src/binding/fortran/mpif_h/pack_externalf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-pack_externalf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_externalf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-pack_externalf.lo `test -f 'src/binding/fortran/mpif_h/pack_externalf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pack_externalf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_externalf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_externalf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/pack_externalf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-pack_externalf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-pack_externalf.lo `test -f 'src/binding/fortran/mpif_h/pack_externalf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pack_externalf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-packesizef.lo: src/binding/fortran/mpif_h/packesizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-packesizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packesizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-packesizef.lo `test -f 'src/binding/fortran/mpif_h/packesizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/packesizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packesizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packesizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/packesizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-packesizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-packesizef.lo `test -f 'src/binding/fortran/mpif_h/packesizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/packesizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-reqgetstatf.lo: src/binding/fortran/mpif_h/reqgetstatf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-reqgetstatf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reqgetstatf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-reqgetstatf.lo `test -f 'src/binding/fortran/mpif_h/reqgetstatf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reqgetstatf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reqgetstatf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reqgetstatf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/reqgetstatf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-reqgetstatf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-reqgetstatf.lo `test -f 'src/binding/fortran/mpif_h/reqgetstatf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reqgetstatf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typedarrayf.lo: src/binding/fortran/mpif_h/typedarrayf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typedarrayf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedarrayf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typedarrayf.lo `test -f 'src/binding/fortran/mpif_h/typedarrayf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typedarrayf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedarrayf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedarrayf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typedarrayf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typedarrayf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typedarrayf.lo `test -f 'src/binding/fortran/mpif_h/typedarrayf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typedarrayf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typechindf.lo: src/binding/fortran/mpif_h/typechindf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typechindf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechindf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typechindf.lo `test -f 'src/binding/fortran/mpif_h/typechindf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typechindf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechindf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechindf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typechindf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typechindf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typechindf.lo `test -f 'src/binding/fortran/mpif_h/typechindf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typechindf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typechvecf.lo: src/binding/fortran/mpif_h/typechvecf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typechvecf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechvecf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typechvecf.lo `test -f 'src/binding/fortran/mpif_h/typechvecf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typechvecf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechvecf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechvecf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typechvecf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typechvecf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typechvecf.lo `test -f 'src/binding/fortran/mpif_h/typechvecf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typechvecf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typecindbf.lo: src/binding/fortran/mpif_h/typecindbf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typecindbf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecindbf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecindbf.lo `test -f 'src/binding/fortran/mpif_h/typecindbf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecindbf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecindbf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecindbf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecindbf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typecindbf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecindbf.lo `test -f 'src/binding/fortran/mpif_h/typecindbf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecindbf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_create_hindexed_blockf.lo: src/binding/fortran/mpif_h/type_create_hindexed_blockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_create_hindexed_blockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_create_hindexed_blockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_create_hindexed_blockf.lo `test -f 'src/binding/fortran/mpif_h/type_create_hindexed_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_create_hindexed_blockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_create_hindexed_blockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_create_hindexed_blockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_create_hindexed_blockf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_create_hindexed_blockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_create_hindexed_blockf.lo `test -f 'src/binding/fortran/mpif_h/type_create_hindexed_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_create_hindexed_blockf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typecresizef.lo: src/binding/fortran/mpif_h/typecresizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typecresizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecresizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecresizef.lo `test -f 'src/binding/fortran/mpif_h/typecresizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecresizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecresizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecresizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecresizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typecresizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecresizef.lo `test -f 'src/binding/fortran/mpif_h/typecresizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecresizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typecstructf.lo: src/binding/fortran/mpif_h/typecstructf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typecstructf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecstructf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecstructf.lo `test -f 'src/binding/fortran/mpif_h/typecstructf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecstructf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecstructf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecstructf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecstructf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typecstructf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecstructf.lo `test -f 'src/binding/fortran/mpif_h/typecstructf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecstructf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typecsubarrf.lo: src/binding/fortran/mpif_h/typecsubarrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typecsubarrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecsubarrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecsubarrf.lo `test -f 'src/binding/fortran/mpif_h/typecsubarrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecsubarrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecsubarrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecsubarrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecsubarrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typecsubarrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typecsubarrf.lo `test -f 'src/binding/fortran/mpif_h/typecsubarrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecsubarrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typegetextentf.lo: src/binding/fortran/mpif_h/typegetextentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typegetextentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetextentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegetextentf.lo `test -f 'src/binding/fortran/mpif_h/typegetextentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetextentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetextentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetextentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegetextentf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typegetextentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegetextentf.lo `test -f 'src/binding/fortran/mpif_h/typegetextentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetextentf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-typegtextf.lo: src/binding/fortran/mpif_h/typegtextf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-typegtextf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegtextf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegtextf.lo `test -f 'src/binding/fortran/mpif_h/typegtextf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegtextf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegtextf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegtextf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegtextf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-typegtextf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-typegtextf.lo `test -f 'src/binding/fortran/mpif_h/typegtextf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegtextf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-unpackextf.lo: src/binding/fortran/mpif_h/unpackextf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-unpackextf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackextf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-unpackextf.lo `test -f 'src/binding/fortran/mpif_h/unpackextf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpackextf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackextf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackextf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/unpackextf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-unpackextf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-unpackextf.lo `test -f 'src/binding/fortran/mpif_h/unpackextf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpackextf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-wincreerrf.lo: src/binding/fortran/mpif_h/wincreerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-wincreerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincreerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wincreerrf.lo `test -f 'src/binding/fortran/mpif_h/wincreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wincreerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincreerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincreerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wincreerrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-wincreerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wincreerrf.lo `test -f 'src/binding/fortran/mpif_h/wincreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wincreerrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-wingeterrf.lo: src/binding/fortran/mpif_h/wingeterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-wingeterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wingeterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wingeterrf.lo `test -f 'src/binding/fortran/mpif_h/wingeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wingeterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wingeterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wingeterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wingeterrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-wingeterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wingeterrf.lo `test -f 'src/binding/fortran/mpif_h/wingeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wingeterrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-winseterrf.lo: src/binding/fortran/mpif_h/winseterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-winseterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winseterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-winseterrf.lo `test -f 'src/binding/fortran/mpif_h/winseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winseterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winseterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winseterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/winseterrf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-winseterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-winseterrf.lo `test -f 'src/binding/fortran/mpif_h/winseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winseterrf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_localf.lo: src/binding/fortran/mpif_h/reduce_localf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_localf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_localf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_localf.lo `test -f 'src/binding/fortran/mpif_h/reduce_localf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reduce_localf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_localf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_localf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/reduce_localf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_localf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_localf.lo `test -f 'src/binding/fortran/mpif_h/reduce_localf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reduce_localf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-op_commutativef.lo: src/binding/fortran/mpif_h/op_commutativef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-op_commutativef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_commutativef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-op_commutativef.lo `test -f 'src/binding/fortran/mpif_h/op_commutativef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_commutativef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_commutativef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_commutativef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/op_commutativef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-op_commutativef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-op_commutativef.lo `test -f 'src/binding/fortran/mpif_h/op_commutativef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_commutativef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_scatter_blockf.lo: src/binding/fortran/mpif_h/reduce_scatter_blockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_scatter_blockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_blockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_scatter_blockf.lo `test -f 'src/binding/fortran/mpif_h/reduce_scatter_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reduce_scatter_blockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_blockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_blockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/reduce_scatter_blockf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_scatter_blockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-reduce_scatter_blockf.lo `test -f 'src/binding/fortran/mpif_h/reduce_scatter_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reduce_scatter_blockf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_create_adjacentf.lo: src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_create_adjacentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_create_adjacentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_create_adjacentf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_create_adjacentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_create_adjacentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_create_adjacentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_create_adjacentf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_createf.lo: src/binding/fortran/mpif_h/dist_graph_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_createf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dist_graph_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_createf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighbors_countf.lo: src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighbors_countf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighbors_countf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighbors_countf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighbors_countf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighbors_countf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighbors_countf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighbors_countf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighborsf.lo: src/binding/fortran/mpif_h/dist_graph_neighborsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighborsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighborsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighborsf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_neighborsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_neighborsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighborsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighborsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dist_graph_neighborsf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighborsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dist_graph_neighborsf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_neighborsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_neighborsf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-improbef.lo: src/binding/fortran/mpif_h/improbef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-improbef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-improbef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-improbef.lo `test -f 'src/binding/fortran/mpif_h/improbef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/improbef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-improbef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-improbef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/improbef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-improbef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-improbef.lo `test -f 'src/binding/fortran/mpif_h/improbef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/improbef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-imrecvf.lo: src/binding/fortran/mpif_h/imrecvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-imrecvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-imrecvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-imrecvf.lo `test -f 'src/binding/fortran/mpif_h/imrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/imrecvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-imrecvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-imrecvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/imrecvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-imrecvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-imrecvf.lo `test -f 'src/binding/fortran/mpif_h/imrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/imrecvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-mprobef.lo: src/binding/fortran/mpif_h/mprobef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-mprobef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mprobef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-mprobef.lo `test -f 'src/binding/fortran/mpif_h/mprobef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/mprobef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mprobef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mprobef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/mprobef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-mprobef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-mprobef.lo `test -f 'src/binding/fortran/mpif_h/mprobef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/mprobef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-mrecvf.lo: src/binding/fortran/mpif_h/mrecvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-mrecvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mrecvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-mrecvf.lo `test -f 'src/binding/fortran/mpif_h/mrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/mrecvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mrecvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mrecvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/mrecvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-mrecvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-mrecvf.lo `test -f 'src/binding/fortran/mpif_h/mrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/mrecvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_idupf.lo: src/binding/fortran/mpif_h/comm_idupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_idupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_idupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_idupf.lo `test -f 'src/binding/fortran/mpif_h/comm_idupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_idupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_idupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_idupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_idupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_idupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_idupf.lo `test -f 'src/binding/fortran/mpif_h/comm_idupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_idupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ibarrierf.lo: src/binding/fortran/mpif_h/ibarrierf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ibarrierf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibarrierf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ibarrierf.lo `test -f 'src/binding/fortran/mpif_h/ibarrierf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibarrierf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibarrierf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibarrierf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ibarrierf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ibarrierf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ibarrierf.lo `test -f 'src/binding/fortran/mpif_h/ibarrierf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibarrierf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ibcastf.lo: src/binding/fortran/mpif_h/ibcastf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ibcastf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibcastf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ibcastf.lo `test -f 'src/binding/fortran/mpif_h/ibcastf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibcastf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibcastf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibcastf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ibcastf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ibcastf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ibcastf.lo `test -f 'src/binding/fortran/mpif_h/ibcastf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibcastf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-igatherf.lo: src/binding/fortran/mpif_h/igatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-igatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-igatherf.lo `test -f 'src/binding/fortran/mpif_h/igatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/igatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/igatherf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-igatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-igatherf.lo `test -f 'src/binding/fortran/mpif_h/igatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/igatherf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-igathervf.lo: src/binding/fortran/mpif_h/igathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-igathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-igathervf.lo `test -f 'src/binding/fortran/mpif_h/igathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/igathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/igathervf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-igathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-igathervf.lo `test -f 'src/binding/fortran/mpif_h/igathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/igathervf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iscatterf.lo: src/binding/fortran/mpif_h/iscatterf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iscatterf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscatterf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iscatterf.lo `test -f 'src/binding/fortran/mpif_h/iscatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscatterf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscatterf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscatterf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iscatterf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iscatterf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iscatterf.lo `test -f 'src/binding/fortran/mpif_h/iscatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscatterf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iscattervf.lo: src/binding/fortran/mpif_h/iscattervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iscattervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscattervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iscattervf.lo `test -f 'src/binding/fortran/mpif_h/iscattervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscattervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscattervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscattervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iscattervf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iscattervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iscattervf.lo `test -f 'src/binding/fortran/mpif_h/iscattervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscattervf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iallgatherf.lo: src/binding/fortran/mpif_h/iallgatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iallgatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iallgatherf.lo `test -f 'src/binding/fortran/mpif_h/iallgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallgatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iallgatherf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iallgatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iallgatherf.lo `test -f 'src/binding/fortran/mpif_h/iallgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallgatherf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iallgathervf.lo: src/binding/fortran/mpif_h/iallgathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iallgathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iallgathervf.lo `test -f 'src/binding/fortran/mpif_h/iallgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallgathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iallgathervf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iallgathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iallgathervf.lo `test -f 'src/binding/fortran/mpif_h/iallgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallgathervf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallf.lo: src/binding/fortran/mpif_h/ialltoallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ialltoallf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallvf.lo: src/binding/fortran/mpif_h/ialltoallvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallvf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ialltoallvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallvf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallwf.lo: src/binding/fortran/mpif_h/ialltoallwf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallwf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallwf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallwf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallwf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallwf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallwf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ialltoallwf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallwf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ialltoallwf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallwf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ireducef.lo: src/binding/fortran/mpif_h/ireducef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ireducef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireducef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ireducef.lo `test -f 'src/binding/fortran/mpif_h/ireducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireducef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireducef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireducef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ireducef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ireducef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ireducef.lo `test -f 'src/binding/fortran/mpif_h/ireducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireducef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iallreducef.lo: src/binding/fortran/mpif_h/iallreducef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iallreducef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallreducef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iallreducef.lo `test -f 'src/binding/fortran/mpif_h/iallreducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallreducef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallreducef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallreducef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iallreducef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iallreducef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iallreducef.lo `test -f 'src/binding/fortran/mpif_h/iallreducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallreducef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatterf.lo: src/binding/fortran/mpif_h/ireduce_scatterf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatterf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatterf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatterf.lo `test -f 'src/binding/fortran/mpif_h/ireduce_scatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireduce_scatterf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatterf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatterf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ireduce_scatterf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatterf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatterf.lo `test -f 'src/binding/fortran/mpif_h/ireduce_scatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireduce_scatterf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatter_blockf.lo: src/binding/fortran/mpif_h/ireduce_scatter_blockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatter_blockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_blockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatter_blockf.lo `test -f 'src/binding/fortran/mpif_h/ireduce_scatter_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireduce_scatter_blockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_blockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_blockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ireduce_scatter_blockf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatter_blockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ireduce_scatter_blockf.lo `test -f 'src/binding/fortran/mpif_h/ireduce_scatter_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireduce_scatter_blockf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iscanf.lo: src/binding/fortran/mpif_h/iscanf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iscanf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscanf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iscanf.lo `test -f 'src/binding/fortran/mpif_h/iscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscanf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscanf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscanf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iscanf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iscanf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iscanf.lo `test -f 'src/binding/fortran/mpif_h/iscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscanf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-iexscanf.lo: src/binding/fortran/mpif_h/iexscanf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-iexscanf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iexscanf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iexscanf.lo `test -f 'src/binding/fortran/mpif_h/iexscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iexscanf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iexscanf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iexscanf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iexscanf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-iexscanf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-iexscanf.lo `test -f 'src/binding/fortran/mpif_h/iexscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iexscanf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgatherf.lo: src/binding/fortran/mpif_h/ineighbor_allgatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgatherf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_allgatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_allgatherf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgatherf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_allgatherf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgathervf.lo: src/binding/fortran/mpif_h/ineighbor_allgathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgathervf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_allgathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_allgathervf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_allgathervf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_allgathervf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallf.lo: src/binding/fortran/mpif_h/ineighbor_alltoallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_alltoallf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallvf.lo: src/binding/fortran/mpif_h/ineighbor_alltoallvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_alltoallvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallwf.lo: src/binding/fortran/mpif_h/ineighbor_alltoallwf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallwf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallwf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallwf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallwf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallwf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_alltoallwf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallwf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-ineighbor_alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallwf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgatherf.lo: src/binding/fortran/mpif_h/neighbor_allgatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgatherf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_allgatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_allgatherf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgatherf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_allgatherf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgathervf.lo: src/binding/fortran/mpif_h/neighbor_allgathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgathervf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_allgathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_allgathervf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_allgathervf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_allgathervf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallf.lo: src/binding/fortran/mpif_h/neighbor_alltoallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_alltoallf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallvf.lo: src/binding/fortran/mpif_h/neighbor_alltoallvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_alltoallvf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallvf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallwf.lo: src/binding/fortran/mpif_h/neighbor_alltoallwf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallwf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallwf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallwf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallwf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallwf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_alltoallwf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallwf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-neighbor_alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallwf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_split_typef.lo: src/binding/fortran/mpif_h/comm_split_typef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_split_typef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_split_typef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_split_typef.lo `test -f 'src/binding/fortran/mpif_h/comm_split_typef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_split_typef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_split_typef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_split_typef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_split_typef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_split_typef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_split_typef.lo `test -f 'src/binding/fortran/mpif_h/comm_split_typef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_split_typef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-get_elements_xf.lo: src/binding/fortran/mpif_h/get_elements_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-get_elements_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elements_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_elements_xf.lo `test -f 'src/binding/fortran/mpif_h/get_elements_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_elements_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elements_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elements_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_elements_xf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-get_elements_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-get_elements_xf.lo `test -f 'src/binding/fortran/mpif_h/get_elements_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_elements_xf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-status_set_elements_xf.lo: src/binding/fortran/mpif_h/status_set_elements_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-status_set_elements_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-status_set_elements_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-status_set_elements_xf.lo `test -f 'src/binding/fortran/mpif_h/status_set_elements_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/status_set_elements_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-status_set_elements_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-status_set_elements_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/status_set_elements_xf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-status_set_elements_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-status_set_elements_xf.lo `test -f 'src/binding/fortran/mpif_h/status_set_elements_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/status_set_elements_xf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_extent_xf.lo: src/binding/fortran/mpif_h/type_get_extent_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_extent_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_extent_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_extent_xf.lo `test -f 'src/binding/fortran/mpif_h/type_get_extent_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_extent_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_extent_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_extent_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_get_extent_xf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_extent_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_extent_xf.lo `test -f 'src/binding/fortran/mpif_h/type_get_extent_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_extent_xf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_true_extent_xf.lo: src/binding/fortran/mpif_h/type_get_true_extent_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_true_extent_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_true_extent_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_true_extent_xf.lo `test -f 'src/binding/fortran/mpif_h/type_get_true_extent_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_true_extent_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_true_extent_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_true_extent_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_get_true_extent_xf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_true_extent_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_get_true_extent_xf.lo `test -f 'src/binding/fortran/mpif_h/type_get_true_extent_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_true_extent_xf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-type_size_xf.lo: src/binding/fortran/mpif_h/type_size_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-type_size_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_size_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_size_xf.lo `test -f 'src/binding/fortran/mpif_h/type_size_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_size_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_size_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_size_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_size_xf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-type_size_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-type_size_xf.lo `test -f 'src/binding/fortran/mpif_h/type_size_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_size_xf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_create_groupf.lo: src/binding/fortran/mpif_h/comm_create_groupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_create_groupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_create_groupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_create_groupf.lo `test -f 'src/binding/fortran/mpif_h/comm_create_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_create_groupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_create_groupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_create_groupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_create_groupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_create_groupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_create_groupf.lo `test -f 'src/binding/fortran/mpif_h/comm_create_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_create_groupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_ackf.lo: src/binding/fortran/mpif_h/comm_failure_ackf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_ackf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_ackf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_ackf.lo `test -f 'src/binding/fortran/mpif_h/comm_failure_ackf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_failure_ackf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_ackf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_ackf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_failure_ackf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_ackf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_ackf.lo `test -f 'src/binding/fortran/mpif_h/comm_failure_ackf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_failure_ackf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_get_ackedf.lo: src/binding/fortran/mpif_h/comm_failure_get_ackedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_get_ackedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_get_ackedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_get_ackedf.lo `test -f 'src/binding/fortran/mpif_h/comm_failure_get_ackedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_failure_get_ackedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_get_ackedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_get_ackedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_failure_get_ackedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_get_ackedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_failure_get_ackedf.lo `test -f 'src/binding/fortran/mpif_h/comm_failure_get_ackedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_failure_get_ackedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_revokef.lo: src/binding/fortran/mpif_h/comm_revokef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_revokef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_revokef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_revokef.lo `test -f 'src/binding/fortran/mpif_h/comm_revokef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_revokef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_revokef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_revokef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_revokef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_revokef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_revokef.lo `test -f 'src/binding/fortran/mpif_h/comm_revokef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_revokef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_shrinkf.lo: src/binding/fortran/mpif_h/comm_shrinkf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_shrinkf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_shrinkf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_shrinkf.lo `test -f 'src/binding/fortran/mpif_h/comm_shrinkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_shrinkf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_shrinkf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_shrinkf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_shrinkf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_shrinkf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_shrinkf.lo `test -f 'src/binding/fortran/mpif_h/comm_shrinkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_shrinkf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-comm_agreef.lo: src/binding/fortran/mpif_h/comm_agreef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-comm_agreef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_agreef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_agreef.lo `test -f 'src/binding/fortran/mpif_h/comm_agreef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_agreef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_agreef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_agreef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_agreef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-comm_agreef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-comm_agreef.lo `test -f 'src/binding/fortran/mpif_h/comm_agreef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_agreef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_openf.lo: src/binding/fortran/mpif_h/file_openf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_openf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_openf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_openf.lo `test -f 'src/binding/fortran/mpif_h/file_openf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_openf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_openf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_openf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_openf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_openf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_openf.lo `test -f 'src/binding/fortran/mpif_h/file_openf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_openf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_closef.lo: src/binding/fortran/mpif_h/file_closef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_closef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_closef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_closef.lo `test -f 'src/binding/fortran/mpif_h/file_closef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_closef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_closef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_closef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_closef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_closef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_closef.lo `test -f 'src/binding/fortran/mpif_h/file_closef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_closef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_deletef.lo: src/binding/fortran/mpif_h/file_deletef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_deletef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_deletef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_deletef.lo `test -f 'src/binding/fortran/mpif_h/file_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_deletef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_deletef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_deletef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_deletef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_deletef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_deletef.lo `test -f 'src/binding/fortran/mpif_h/file_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_deletef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_sizef.lo: src/binding/fortran/mpif_h/file_set_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_sizef.lo `test -f 'src/binding/fortran/mpif_h/file_set_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_set_sizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_sizef.lo `test -f 'src/binding/fortran/mpif_h/file_set_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_sizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_preallocatef.lo: src/binding/fortran/mpif_h/file_preallocatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_preallocatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_preallocatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_preallocatef.lo `test -f 'src/binding/fortran/mpif_h/file_preallocatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_preallocatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_preallocatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_preallocatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_preallocatef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_preallocatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_preallocatef.lo `test -f 'src/binding/fortran/mpif_h/file_preallocatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_preallocatef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_sizef.lo: src/binding/fortran/mpif_h/file_get_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_sizef.lo `test -f 'src/binding/fortran/mpif_h/file_get_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_sizef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_sizef.lo `test -f 'src/binding/fortran/mpif_h/file_get_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_sizef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_groupf.lo: src/binding/fortran/mpif_h/file_get_groupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_groupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_groupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_groupf.lo `test -f 'src/binding/fortran/mpif_h/file_get_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_groupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_groupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_groupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_groupf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_groupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_groupf.lo `test -f 'src/binding/fortran/mpif_h/file_get_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_groupf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_amodef.lo: src/binding/fortran/mpif_h/file_get_amodef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_amodef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_amodef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_amodef.lo `test -f 'src/binding/fortran/mpif_h/file_get_amodef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_amodef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_amodef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_amodef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_amodef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_amodef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_amodef.lo `test -f 'src/binding/fortran/mpif_h/file_get_amodef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_amodef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_infof.lo: src/binding/fortran/mpif_h/file_set_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_infof.lo `test -f 'src/binding/fortran/mpif_h/file_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_set_infof.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_infof.lo `test -f 'src/binding/fortran/mpif_h/file_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_infof.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_infof.lo: src/binding/fortran/mpif_h/file_get_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_infof.lo `test -f 'src/binding/fortran/mpif_h/file_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_infof.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_infof.lo `test -f 'src/binding/fortran/mpif_h/file_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_infof.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_viewf.lo: src/binding/fortran/mpif_h/file_set_viewf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_viewf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_viewf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_viewf.lo `test -f 'src/binding/fortran/mpif_h/file_set_viewf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_viewf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_viewf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_viewf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_set_viewf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_viewf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_viewf.lo `test -f 'src/binding/fortran/mpif_h/file_set_viewf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_viewf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_viewf.lo: src/binding/fortran/mpif_h/file_get_viewf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_viewf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_viewf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_viewf.lo `test -f 'src/binding/fortran/mpif_h/file_get_viewf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_viewf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_viewf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_viewf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_viewf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_viewf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_viewf.lo `test -f 'src/binding/fortran/mpif_h/file_get_viewf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_viewf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_atf.lo: src/binding/fortran/mpif_h/file_read_atf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_atf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_atf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_atf.lo `test -f 'src/binding/fortran/mpif_h/file_read_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_atf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_atf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_atf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_atf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_atf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_atf.lo `test -f 'src/binding/fortran/mpif_h/file_read_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_atf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_allf.lo: src/binding/fortran/mpif_h/file_read_at_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_at_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_atf.lo: src/binding/fortran/mpif_h/file_write_atf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_atf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_atf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_atf.lo `test -f 'src/binding/fortran/mpif_h/file_write_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_atf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_atf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_atf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_atf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_atf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_atf.lo `test -f 'src/binding/fortran/mpif_h/file_write_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_atf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_allf.lo: src/binding/fortran/mpif_h/file_write_at_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_at_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_atf.lo: src/binding/fortran/mpif_h/file_iread_atf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_atf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_atf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_atf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_atf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_atf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_atf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iread_atf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_atf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_atf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_atf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_atf.lo: src/binding/fortran/mpif_h/file_iwrite_atf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_atf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_atf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_atf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_atf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_atf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_atf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwrite_atf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_atf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_atf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_atf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_readf.lo: src/binding/fortran/mpif_h/file_readf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_readf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_readf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_readf.lo `test -f 'src/binding/fortran/mpif_h/file_readf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_readf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_readf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_readf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_readf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_readf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_readf.lo `test -f 'src/binding/fortran/mpif_h/file_readf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_readf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_allf.lo: src/binding/fortran/mpif_h/file_read_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_allf.lo `test -f 'src/binding/fortran/mpif_h/file_read_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_allf.lo `test -f 'src/binding/fortran/mpif_h/file_read_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_writef.lo: src/binding/fortran/mpif_h/file_writef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_writef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_writef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_writef.lo `test -f 'src/binding/fortran/mpif_h/file_writef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_writef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_writef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_writef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_writef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_writef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_writef.lo `test -f 'src/binding/fortran/mpif_h/file_writef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_writef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_allf.lo: src/binding/fortran/mpif_h/file_write_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_allf.lo `test -f 'src/binding/fortran/mpif_h/file_write_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_allf.lo `test -f 'src/binding/fortran/mpif_h/file_write_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_ireadf.lo: src/binding/fortran/mpif_h/file_ireadf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_ireadf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_ireadf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_ireadf.lo `test -f 'src/binding/fortran/mpif_h/file_ireadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_ireadf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_ireadf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_ireadf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_ireadf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_ireadf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_ireadf.lo `test -f 'src/binding/fortran/mpif_h/file_ireadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_ireadf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwritef.lo: src/binding/fortran/mpif_h/file_iwritef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwritef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwritef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwritef.lo `test -f 'src/binding/fortran/mpif_h/file_iwritef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwritef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwritef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwritef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwritef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwritef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwritef.lo `test -f 'src/binding/fortran/mpif_h/file_iwritef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwritef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_seekf.lo: src/binding/fortran/mpif_h/file_seekf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_seekf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seekf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_seekf.lo `test -f 'src/binding/fortran/mpif_h/file_seekf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_seekf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seekf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seekf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_seekf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_seekf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_seekf.lo `test -f 'src/binding/fortran/mpif_h/file_seekf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_seekf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_positionf.lo: src/binding/fortran/mpif_h/file_get_positionf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_positionf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_positionf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_positionf.lo `test -f 'src/binding/fortran/mpif_h/file_get_positionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_positionf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_positionf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_positionf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_positionf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_positionf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_positionf.lo `test -f 'src/binding/fortran/mpif_h/file_get_positionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_positionf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_byte_offsetf.lo: src/binding/fortran/mpif_h/file_get_byte_offsetf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_byte_offsetf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_byte_offsetf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_byte_offsetf.lo `test -f 'src/binding/fortran/mpif_h/file_get_byte_offsetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_byte_offsetf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_byte_offsetf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_byte_offsetf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_byte_offsetf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_byte_offsetf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_byte_offsetf.lo `test -f 'src/binding/fortran/mpif_h/file_get_byte_offsetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_byte_offsetf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_sharedf.lo: src/binding/fortran/mpif_h/file_read_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_read_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_sharedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_read_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_sharedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_sharedf.lo: src/binding/fortran/mpif_h/file_write_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_write_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_sharedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_write_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_sharedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_sharedf.lo: src/binding/fortran/mpif_h/file_iread_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iread_sharedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_sharedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_sharedf.lo: src/binding/fortran/mpif_h/file_iwrite_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwrite_sharedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_sharedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_orderedf.lo: src/binding/fortran/mpif_h/file_read_orderedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_orderedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_orderedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_orderedf.lo `test -f 'src/binding/fortran/mpif_h/file_read_orderedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_orderedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_orderedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_orderedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_orderedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_orderedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_orderedf.lo `test -f 'src/binding/fortran/mpif_h/file_read_orderedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_orderedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_orderedf.lo: src/binding/fortran/mpif_h/file_write_orderedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_orderedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_orderedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_orderedf.lo `test -f 'src/binding/fortran/mpif_h/file_write_orderedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_orderedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_orderedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_orderedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_orderedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_orderedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_orderedf.lo `test -f 'src/binding/fortran/mpif_h/file_write_orderedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_orderedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_seek_sharedf.lo: src/binding/fortran/mpif_h/file_seek_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_seek_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seek_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_seek_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_seek_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_seek_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seek_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seek_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_seek_sharedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_seek_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_seek_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_seek_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_seek_sharedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_position_sharedf.lo: src/binding/fortran/mpif_h/file_get_position_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_position_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_position_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_position_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_get_position_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_position_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_position_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_position_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_position_sharedf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_position_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_position_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_get_position_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_position_sharedf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_beginf.lo: src/binding/fortran/mpif_h/file_read_at_all_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_all_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_at_all_beginf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_all_beginf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_endf.lo: src/binding/fortran/mpif_h/file_read_at_all_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_all_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_at_all_endf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_at_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_all_endf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_beginf.lo: src/binding/fortran/mpif_h/file_write_at_all_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_all_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_at_all_beginf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_all_beginf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_endf.lo: src/binding/fortran/mpif_h/file_write_at_all_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_all_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_at_all_endf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_at_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_all_endf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_beginf.lo: src/binding/fortran/mpif_h/file_read_all_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_all_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_all_beginf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_all_beginf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_endf.lo: src/binding/fortran/mpif_h/file_read_all_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_all_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_all_endf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_all_endf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_beginf.lo: src/binding/fortran/mpif_h/file_write_all_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_all_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_all_beginf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_all_beginf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_endf.lo: src/binding/fortran/mpif_h/file_write_all_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_all_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_all_endf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_all_endf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_beginf.lo: src/binding/fortran/mpif_h/file_read_ordered_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_ordered_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_ordered_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_ordered_beginf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_ordered_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_ordered_beginf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_endf.lo: src/binding/fortran/mpif_h/file_read_ordered_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_ordered_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_ordered_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_ordered_endf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_read_ordered_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_ordered_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_ordered_endf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_beginf.lo: src/binding/fortran/mpif_h/file_write_ordered_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_ordered_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_ordered_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_ordered_beginf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_ordered_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_ordered_beginf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_endf.lo: src/binding/fortran/mpif_h/file_write_ordered_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_ordered_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_ordered_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_ordered_endf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_write_ordered_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_ordered_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_ordered_endf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_type_extentf.lo: src/binding/fortran/mpif_h/file_get_type_extentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_type_extentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_type_extentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_type_extentf.lo `test -f 'src/binding/fortran/mpif_h/file_get_type_extentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_type_extentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_type_extentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_type_extentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_type_extentf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_type_extentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_type_extentf.lo `test -f 'src/binding/fortran/mpif_h/file_get_type_extentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_type_extentf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-register_datarepf.lo: src/binding/fortran/mpif_h/register_datarepf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-register_datarepf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-register_datarepf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-register_datarepf.lo `test -f 'src/binding/fortran/mpif_h/register_datarepf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/register_datarepf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-register_datarepf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-register_datarepf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/register_datarepf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-register_datarepf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-register_datarepf.lo `test -f 'src/binding/fortran/mpif_h/register_datarepf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/register_datarepf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_atomicityf.lo: src/binding/fortran/mpif_h/file_set_atomicityf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_atomicityf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_atomicityf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_atomicityf.lo `test -f 'src/binding/fortran/mpif_h/file_set_atomicityf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_atomicityf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_atomicityf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_atomicityf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_set_atomicityf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_atomicityf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_set_atomicityf.lo `test -f 'src/binding/fortran/mpif_h/file_set_atomicityf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_atomicityf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_atomicityf.lo: src/binding/fortran/mpif_h/file_get_atomicityf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_atomicityf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_atomicityf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_atomicityf.lo `test -f 'src/binding/fortran/mpif_h/file_get_atomicityf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_atomicityf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_atomicityf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_atomicityf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_atomicityf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_atomicityf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_get_atomicityf.lo `test -f 'src/binding/fortran/mpif_h/file_get_atomicityf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_atomicityf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_syncf.lo: src/binding/fortran/mpif_h/file_syncf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_syncf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_syncf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_syncf.lo `test -f 'src/binding/fortran/mpif_h/file_syncf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_syncf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_syncf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_syncf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_syncf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_syncf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_syncf.lo `test -f 'src/binding/fortran/mpif_h/file_syncf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_syncf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_at_allf.lo: src/binding/fortran/mpif_h/file_iread_at_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_at_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_at_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_at_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_at_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_at_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iread_at_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_at_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_at_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_at_allf.lo: src/binding/fortran/mpif_h/file_iwrite_at_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_at_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_at_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwrite_at_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_at_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_at_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_allf.lo: src/binding/fortran/mpif_h/file_iread_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iread_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iread_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_allf.lo: src/binding/fortran/mpif_h/file_iwrite_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwrite_allf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-file_iwrite_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_allf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-initf.lo: src/binding/fortran/mpif_h/initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-initf.lo `test -f 'src/binding/fortran/mpif_h/initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/initf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-initf.lo `test -f 'src/binding/fortran/mpif_h/initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-initthreadf.lo: src/binding/fortran/mpif_h/initthreadf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-initthreadf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initthreadf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-initthreadf.lo `test -f 'src/binding/fortran/mpif_h/initthreadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initthreadf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initthreadf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initthreadf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/initthreadf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-initthreadf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-initthreadf.lo `test -f 'src/binding/fortran/mpif_h/initthreadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initthreadf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-pcontrolf.lo: src/binding/fortran/mpif_h/pcontrolf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-pcontrolf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pcontrolf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-pcontrolf.lo `test -f 'src/binding/fortran/mpif_h/pcontrolf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pcontrolf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pcontrolf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pcontrolf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/pcontrolf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-pcontrolf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-pcontrolf.lo `test -f 'src/binding/fortran/mpif_h/pcontrolf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pcontrolf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-addressf.lo: src/binding/fortran/mpif_h/addressf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-addressf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-addressf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-addressf.lo `test -f 'src/binding/fortran/mpif_h/addressf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/addressf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-addressf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-addressf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/addressf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-addressf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-addressf.lo `test -f 'src/binding/fortran/mpif_h/addressf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/addressf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-getaddressf.lo: src/binding/fortran/mpif_h/getaddressf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-getaddressf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getaddressf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-getaddressf.lo `test -f 'src/binding/fortran/mpif_h/getaddressf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getaddressf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getaddressf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getaddressf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/getaddressf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-getaddressf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-getaddressf.lo `test -f 'src/binding/fortran/mpif_h/getaddressf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getaddressf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-wtimef.lo: src/binding/fortran/mpif_h/wtimef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-wtimef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtimef.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wtimef.lo `test -f 'src/binding/fortran/mpif_h/wtimef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wtimef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtimef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtimef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wtimef.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-wtimef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wtimef.lo `test -f 'src/binding/fortran/mpif_h/wtimef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wtimef.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-wtickf.lo: src/binding/fortran/mpif_h/wtickf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-wtickf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtickf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wtickf.lo `test -f 'src/binding/fortran/mpif_h/wtickf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wtickf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtickf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtickf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wtickf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-wtickf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-wtickf.lo `test -f 'src/binding/fortran/mpif_h/wtickf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wtickf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-aint_addf.lo: src/binding/fortran/mpif_h/aint_addf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-aint_addf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_addf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-aint_addf.lo `test -f 'src/binding/fortran/mpif_h/aint_addf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/aint_addf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_addf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_addf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/aint_addf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-aint_addf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-aint_addf.lo `test -f 'src/binding/fortran/mpif_h/aint_addf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/aint_addf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-aint_difff.lo: src/binding/fortran/mpif_h/aint_difff.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-aint_difff.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_difff.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-aint_difff.lo `test -f 'src/binding/fortran/mpif_h/aint_difff.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/aint_difff.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_difff.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_difff.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/aint_difff.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-aint_difff.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-aint_difff.lo `test -f 'src/binding/fortran/mpif_h/aint_difff.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/aint_difff.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_createf.lo: src/binding/fortran/mpif_h/keyval_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_createf.lo `test -f 'src/binding/fortran/mpif_h/keyval_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/keyval_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/keyval_createf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-keyval_createf.lo `test -f 'src/binding/fortran/mpif_h/keyval_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/keyval_createf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dup_fnf.lo: src/binding/fortran/mpif_h/dup_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dup_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dup_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dup_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dup_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dup_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-null_del_fnf.lo: src/binding/fortran/mpif_h/null_del_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-null_del_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_del_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_del_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_del_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_del_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_del_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-null_del_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_del_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-null_copy_fnf.lo: src/binding/fortran/mpif_h/null_copy_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-null_copy_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_copy_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_copy_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_copy_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_copy_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_copy_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-null_copy_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_copy_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dup_comm_fnf.lo: src/binding/fortran/mpif_h/dup_comm_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dup_comm_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_comm_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dup_comm_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_comm_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_comm_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_comm_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_comm_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dup_comm_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dup_comm_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dup_comm_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_comm_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_comm_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_del_fnf.lo: src/binding/fortran/mpif_h/null_comm_del_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_del_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_del_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_comm_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_comm_del_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_del_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_del_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_comm_del_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_del_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_comm_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_comm_del_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_copy_fnf.lo: src/binding/fortran/mpif_h/null_comm_copy_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_copy_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_copy_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_comm_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_comm_copy_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_copy_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_copy_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_comm_copy_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_copy_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_comm_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_comm_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_comm_copy_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dup_win_fnf.lo: src/binding/fortran/mpif_h/dup_win_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dup_win_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_win_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dup_win_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_win_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_win_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_win_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_win_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dup_win_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dup_win_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dup_win_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_win_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_win_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_del_fnf.lo: src/binding/fortran/mpif_h/null_win_del_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_del_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_del_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_win_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_win_del_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_del_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_del_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_win_del_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_del_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_win_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_win_del_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_copy_fnf.lo: src/binding/fortran/mpif_h/null_win_copy_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_copy_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_copy_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_win_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_win_copy_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_copy_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_copy_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_win_copy_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_copy_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_win_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_win_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_win_copy_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-dup_type_fnf.lo: src/binding/fortran/mpif_h/dup_type_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-dup_type_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_type_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dup_type_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_type_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_type_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_type_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_type_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dup_type_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-dup_type_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-dup_type_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_type_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_type_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_del_fnf.lo: src/binding/fortran/mpif_h/null_type_del_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_del_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_del_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_type_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_type_del_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_del_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_del_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_type_del_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_del_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_type_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_type_del_fnf.c + +src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_copy_fnf.lo: src/binding/fortran/mpif_h/null_type_copy_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_copy_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_copy_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_type_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_type_copy_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_copy_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_copy_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_type_copy_fnf.c' object='src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_copy_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpifort_la-null_type_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_type_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_type_copy_fnf.c + +src/binding/fortran/use_mpi/lib_libmpifort_la-typef90cmplxf.lo: src/binding/fortran/use_mpi/typef90cmplxf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libmpifort_la-typef90cmplxf.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90cmplxf.Tpo -c -o src/binding/fortran/use_mpi/lib_libmpifort_la-typef90cmplxf.lo `test -f 'src/binding/fortran/use_mpi/typef90cmplxf.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/typef90cmplxf.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90cmplxf.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90cmplxf.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/typef90cmplxf.c' object='src/binding/fortran/use_mpi/lib_libmpifort_la-typef90cmplxf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libmpifort_la-typef90cmplxf.lo `test -f 'src/binding/fortran/use_mpi/typef90cmplxf.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/typef90cmplxf.c + +src/binding/fortran/use_mpi/lib_libmpifort_la-typef90realf.lo: src/binding/fortran/use_mpi/typef90realf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libmpifort_la-typef90realf.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90realf.Tpo -c -o src/binding/fortran/use_mpi/lib_libmpifort_la-typef90realf.lo `test -f 'src/binding/fortran/use_mpi/typef90realf.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/typef90realf.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90realf.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90realf.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/typef90realf.c' object='src/binding/fortran/use_mpi/lib_libmpifort_la-typef90realf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libmpifort_la-typef90realf.lo `test -f 'src/binding/fortran/use_mpi/typef90realf.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/typef90realf.c + +src/binding/fortran/use_mpi/lib_libmpifort_la-typef90intf.lo: src/binding/fortran/use_mpi/typef90intf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libmpifort_la-typef90intf.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90intf.Tpo -c -o src/binding/fortran/use_mpi/lib_libmpifort_la-typef90intf.lo `test -f 'src/binding/fortran/use_mpi/typef90intf.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/typef90intf.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90intf.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90intf.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/typef90intf.c' object='src/binding/fortran/use_mpi/lib_libmpifort_la-typef90intf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libmpifort_la-typef90intf.lo `test -f 'src/binding/fortran/use_mpi/typef90intf.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/typef90intf.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/send_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/send_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/send_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/send_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/send_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/send_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/recv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/recv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/recv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/recv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/recv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/recv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/bsend_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/bsend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/bsend_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/bsend_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/bsend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/bsend_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ssend_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ssend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ssend_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ssend_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ssend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ssend_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/rsend_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rsend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rsend_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/rsend_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rsend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rsend_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-buffer_attach_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/buffer_attach_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-buffer_attach_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-buffer_attach_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-buffer_attach_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/buffer_attach_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/buffer_attach_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-buffer_attach_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-buffer_attach_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/buffer_attach_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-buffer_attach_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-buffer_attach_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/buffer_attach_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/buffer_attach_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-isend_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/isend_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-isend_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-isend_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-isend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/isend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/isend_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-isend_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-isend_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/isend_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-isend_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-isend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/isend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/isend_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibsend_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ibsend_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibsend_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibsend_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibsend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ibsend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ibsend_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibsend_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibsend_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ibsend_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibsend_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibsend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ibsend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ibsend_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-issend_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/issend_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-issend_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-issend_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-issend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/issend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/issend_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-issend_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-issend_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/issend_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-issend_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-issend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/issend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/issend_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irsend_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/irsend_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irsend_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irsend_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irsend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/irsend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/irsend_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irsend_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irsend_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/irsend_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irsend_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irsend_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/irsend_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/irsend_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irecv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/irecv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irecv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irecv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irecv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/irecv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/irecv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irecv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irecv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/irecv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irecv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-irecv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/irecv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/irecv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_init_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/send_init_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_init_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_init_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/send_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/send_init_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_init_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_init_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/send_init_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_init_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-send_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/send_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/send_init_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_init_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/bsend_init_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_init_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_init_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/bsend_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/bsend_init_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_init_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_init_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/bsend_init_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_init_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bsend_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/bsend_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/bsend_init_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_init_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ssend_init_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_init_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_init_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ssend_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ssend_init_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_init_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_init_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ssend_init_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_init_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ssend_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ssend_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ssend_init_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_init_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/rsend_init_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_init_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_init_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rsend_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rsend_init_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_init_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_init_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/rsend_init_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_init_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rsend_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rsend_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rsend_init_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_init_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/recv_init_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_init_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_init_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/recv_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/recv_init_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_init_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_init_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/recv_init_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_init_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-recv_init_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/recv_init_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/recv_init_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_replace_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_replace_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_replace_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_replace_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_replace_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_replace_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_replace_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_replace_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_replace_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_replace_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_replace_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-sendrecv_replace_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_replace_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/sendrecv_replace_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/pack_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/pack_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/pack_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/pack_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/pack_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/pack_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/unpack_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/unpack_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/unpack_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/unpack_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/unpack_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/unpack_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bcast_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/bcast_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bcast_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bcast_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bcast_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/bcast_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/bcast_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bcast_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bcast_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/bcast_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bcast_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-bcast_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/bcast_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/bcast_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gather_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/gather_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gather_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gather_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/gather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/gather_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gather_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gather_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/gather_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gather_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/gather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/gather_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gatherv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/gatherv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gatherv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gatherv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/gatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/gatherv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gatherv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gatherv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/gatherv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gatherv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-gatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/gatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/gatherv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatter_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/scatter_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatter_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatter_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatter_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/scatter_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/scatter_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatter_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatter_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/scatter_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatter_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatter_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/scatter_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/scatter_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatterv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/scatterv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatterv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatterv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatterv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/scatterv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/scatterv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatterv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatterv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/scatterv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatterv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scatterv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/scatterv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/scatterv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgather_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/allgather_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgather_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgather_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/allgather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/allgather_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgather_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgather_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/allgather_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgather_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/allgather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/allgather_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgatherv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/allgatherv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgatherv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgatherv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/allgatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/allgatherv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgatherv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgatherv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/allgatherv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgatherv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allgatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/allgatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/allgatherv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoall_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/alltoall_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoall_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoall_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoall_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/alltoall_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/alltoall_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoall_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoall_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/alltoall_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoall_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoall_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/alltoall_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/alltoall_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/alltoallv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/alltoallv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/alltoallv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/alltoallv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/alltoallv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/alltoallv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallw_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/alltoallw_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallw_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallw_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallw_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/alltoallw_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/alltoallw_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallw_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallw_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/alltoallw_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallw_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-alltoallw_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/alltoallw_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/alltoallw_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-exscan_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/exscan_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-exscan_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-exscan_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-exscan_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/exscan_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/exscan_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-exscan_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-exscan_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/exscan_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-exscan_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-exscan_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/exscan_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/exscan_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/reduce_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/reduce_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/reduce_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/reduce_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/reduce_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/reduce_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allreduce_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/allreduce_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allreduce_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allreduce_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allreduce_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/allreduce_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/allreduce_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allreduce_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allreduce_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/allreduce_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allreduce_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-allreduce_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/allreduce_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/allreduce_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scan_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/scan_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scan_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scan_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scan_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/scan_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/scan_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scan_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scan_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/scan_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scan_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-scan_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/scan_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/scan_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-accumulate_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/accumulate_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-accumulate_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-accumulate_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-accumulate_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/accumulate_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/accumulate_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-accumulate_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-accumulate_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/accumulate_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-accumulate_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-accumulate_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/accumulate_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/accumulate_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/get_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/get_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/get_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/get_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/get_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/get_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-put_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/put_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-put_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-put_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-put_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/put_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/put_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-put_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-put_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/put_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-put_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-put_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/put_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/put_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_create_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/win_create_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_create_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_create_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_create_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/win_create_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/win_create_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_create_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_create_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/win_create_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_create_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_create_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/win_create_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/win_create_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_attach_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/win_attach_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_attach_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_attach_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_attach_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/win_attach_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/win_attach_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_attach_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_attach_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/win_attach_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_attach_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_attach_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/win_attach_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/win_attach_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_detach_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/win_detach_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_detach_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_detach_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_detach_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/win_detach_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/win_detach_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_detach_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_detach_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/win_detach_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_detach_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-win_detach_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/win_detach_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/win_detach_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_accumulate_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/get_accumulate_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_accumulate_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_accumulate_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_accumulate_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/get_accumulate_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/get_accumulate_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_accumulate_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_accumulate_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/get_accumulate_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_accumulate_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_accumulate_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/get_accumulate_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/get_accumulate_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-fetch_and_op_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/fetch_and_op_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-fetch_and_op_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-fetch_and_op_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-fetch_and_op_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/fetch_and_op_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/fetch_and_op_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-fetch_and_op_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-fetch_and_op_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/fetch_and_op_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-fetch_and_op_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-fetch_and_op_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/fetch_and_op_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/fetch_and_op_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-compare_and_swap_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/compare_and_swap_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-compare_and_swap_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-compare_and_swap_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-compare_and_swap_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/compare_and_swap_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/compare_and_swap_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-compare_and_swap_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-compare_and_swap_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/compare_and_swap_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-compare_and_swap_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-compare_and_swap_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/compare_and_swap_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/compare_and_swap_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rput_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/rput_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rput_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rput_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rput_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rput_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rput_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rput_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rput_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/rput_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rput_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rput_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rput_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rput_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/rget_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rget_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rget_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/rget_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rget_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rget_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-raccumulate_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/raccumulate_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-raccumulate_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-raccumulate_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-raccumulate_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/raccumulate_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/raccumulate_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-raccumulate_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-raccumulate_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/raccumulate_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-raccumulate_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-raccumulate_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/raccumulate_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/raccumulate_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_accumulate_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/rget_accumulate_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_accumulate_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_accumulate_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_accumulate_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rget_accumulate_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rget_accumulate_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_accumulate_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_accumulate_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/rget_accumulate_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_accumulate_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-rget_accumulate_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/rget_accumulate_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/rget_accumulate_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-free_mem_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/free_mem_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-free_mem_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-free_mem_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-free_mem_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/free_mem_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/free_mem_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-free_mem_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-free_mem_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/free_mem_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-free_mem_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-free_mem_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/free_mem_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/free_mem_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_address_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/get_address_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_address_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_address_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_address_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/get_address_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/get_address_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_address_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_address_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/get_address_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_address_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-get_address_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/get_address_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/get_address_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_external_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/pack_external_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_external_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_external_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_external_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/pack_external_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/pack_external_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_external_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_external_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/pack_external_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_external_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-pack_external_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/pack_external_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/pack_external_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_external_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/unpack_external_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_external_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_external_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_external_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/unpack_external_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/unpack_external_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_external_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_external_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/unpack_external_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_external_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-unpack_external_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/unpack_external_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/unpack_external_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_local_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/reduce_local_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_local_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_local_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_local_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/reduce_local_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/reduce_local_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_local_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_local_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/reduce_local_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_local_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_local_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/reduce_local_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/reduce_local_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_block_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_block_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_block_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_block_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_block_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_block_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_block_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_block_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_block_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_block_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_block_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-reduce_scatter_block_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_block_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/reduce_scatter_block_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-imrecv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/imrecv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-imrecv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-imrecv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-imrecv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/imrecv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/imrecv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-imrecv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-imrecv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/imrecv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-imrecv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-imrecv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/imrecv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/imrecv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-mrecv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/mrecv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-mrecv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-mrecv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-mrecv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/mrecv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/mrecv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-mrecv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-mrecv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/mrecv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-mrecv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-mrecv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/mrecv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/mrecv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibcast_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ibcast_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibcast_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibcast_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibcast_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ibcast_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ibcast_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibcast_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibcast_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ibcast_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibcast_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ibcast_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ibcast_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ibcast_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igather_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/igather_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igather_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igather_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/igather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/igather_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igather_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igather_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/igather_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igather_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/igather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/igather_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igatherv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/igatherv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igatherv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igatherv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/igatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/igatherv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igatherv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igatherv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/igatherv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igatherv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-igatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/igatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/igatherv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatter_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/iscatter_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatter_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatter_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatter_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iscatter_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iscatter_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatter_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatter_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/iscatter_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatter_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatter_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iscatter_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iscatter_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatterv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/iscatterv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatterv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatterv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatterv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iscatterv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iscatterv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatterv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatterv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/iscatterv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatterv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscatterv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iscatterv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iscatterv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgather_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/iallgather_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgather_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgather_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iallgather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iallgather_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgather_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgather_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/iallgather_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgather_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iallgather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iallgather_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgatherv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/iallgatherv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgatherv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgatherv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iallgatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iallgatherv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgatherv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgatherv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/iallgatherv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgatherv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallgatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iallgatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iallgatherv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoall_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ialltoall_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoall_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoall_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoall_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ialltoall_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ialltoall_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoall_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoall_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ialltoall_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoall_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoall_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ialltoall_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ialltoall_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallw_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallw_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallw_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallw_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallw_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallw_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallw_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallw_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallw_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallw_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallw_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ialltoallw_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallw_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ialltoallw_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallreduce_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/iallreduce_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallreduce_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallreduce_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallreduce_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iallreduce_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iallreduce_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallreduce_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallreduce_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/iallreduce_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallreduce_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iallreduce_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iallreduce_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iallreduce_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_block_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_block_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_block_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_block_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_block_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_block_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_block_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_block_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_block_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_block_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_block_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ireduce_scatter_block_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_block_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ireduce_scatter_block_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscan_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/iscan_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscan_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscan_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscan_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iscan_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iscan_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscan_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscan_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/iscan_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscan_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iscan_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iscan_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iscan_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iexscan_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/iexscan_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iexscan_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iexscan_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iexscan_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iexscan_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iexscan_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iexscan_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iexscan_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/iexscan_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iexscan_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-iexscan_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/iexscan_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/iexscan_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgather_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgather_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgather_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgather_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgather_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgather_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgather_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgather_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgather_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgather_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgatherv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgatherv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgatherv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgatherv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgatherv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgatherv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_allgatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_allgatherv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoall_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoall_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoall_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoall_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoall_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoall_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoall_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoall_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoall_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoall_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoall_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoall_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoall_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoall_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallw_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallw_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallw_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallw_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallw_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallw_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallw_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallw_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallw_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallw_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallw_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-ineighbor_alltoallw_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallw_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/ineighbor_alltoallw_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgather_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgather_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgather_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgather_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgather_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgather_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgather_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgather_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgather_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgather_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgather_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgather_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgatherv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgatherv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgatherv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgatherv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgatherv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgatherv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_allgatherv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgatherv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_allgatherv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoall_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoall_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoall_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoall_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoall_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoall_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoall_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoall_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoall_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoall_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoall_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoall_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoall_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoall_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallv_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallv_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallv_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallv_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallv_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallv_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallv_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallv_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallv_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallv_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallv_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallv_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallw_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallw_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallw_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallw_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallw_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallw_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallw_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallw_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallw_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallw_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallw_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-neighbor_alltoallw_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallw_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/neighbor_alltoallw_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_shared_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_shared_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_shared_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_shared_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_shared_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_shared_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_shared_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_shared_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_shared_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_shared_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_shared_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_shared_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_shared_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_shared_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_shared_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_shared_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_shared_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_shared_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_shared_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_shared_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_shared_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_shared_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_shared_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_shared_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_shared_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_shared_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_shared_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_shared_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_shared_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_shared_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_shared_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_shared_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_shared_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_shared_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_shared_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_shared_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_shared_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_shared_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_shared_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_shared_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_shared_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_shared_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_shared_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_shared_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_shared_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_shared_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_shared_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_shared_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_shared_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_shared_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_shared_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_shared_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_shared_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_shared_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_shared_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_shared_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_begin_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_begin_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_begin_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_begin_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_begin_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_begin_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_begin_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_begin_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_begin_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_begin_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_end_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_end_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_end_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_end_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_end_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_end_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_end_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_end_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_end_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_at_all_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_at_all_end_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_begin_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_begin_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_begin_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_begin_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_begin_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_begin_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_begin_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_begin_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_begin_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_begin_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_end_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_end_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_end_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_end_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_end_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_end_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_end_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_end_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_end_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_at_all_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_at_all_end_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_begin_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_begin_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_begin_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_begin_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_begin_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_begin_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_begin_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_begin_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_begin_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_begin_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_end_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_end_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_end_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_end_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_end_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_end_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_end_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_end_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_end_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_all_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_all_end_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_begin_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_begin_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_begin_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_begin_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_begin_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_begin_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_begin_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_begin_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_begin_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_begin_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_end_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_end_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_end_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_end_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_end_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_end_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_end_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_end_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_end_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_all_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_all_end_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_begin_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_begin_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_begin_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_begin_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_begin_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_begin_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_begin_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_begin_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_begin_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_begin_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_end_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_end_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_end_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_end_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_end_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_end_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_end_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_end_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_end_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_read_ordered_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_read_ordered_end_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_begin_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_begin_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_begin_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_begin_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_begin_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_begin_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_begin_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_begin_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_begin_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_begin_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_begin_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_begin_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_end_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_end_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_end_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_end_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_end_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_end_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_end_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_end_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_end_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_write_ordered_end_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_end_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_write_ordered_end_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_all_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_all_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_all_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_all_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_all_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_all_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_all_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_all_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_all_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_at_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_at_all_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_all_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_all_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_all_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_all_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_all_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_all_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_all_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_all_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_all_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_at_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_at_all_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_all_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_all_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_all_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_all_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_all_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_all_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_all_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_all_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_all_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iread_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iread_all_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_all_cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_all_cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_all_cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_all_cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_all_cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_all_cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_all_cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_all_cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_all_cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-file_iwrite_all_cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_all_cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/file_iwrite_all_cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-cdesc.lo: src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-cdesc.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-cdesc.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-cdesc.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-cdesc.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-cdesc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-cdesc.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_c.lo: src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_c.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_c.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_c.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_c.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_c.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_c.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_c.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_c.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_c.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_c.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_c.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_c.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_c.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_multiple_c.lo: src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_multiple_c.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_multiple_c.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_multiple_c.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_multiple_c.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_multiple_c.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_multiple_c.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-comm_spawn_multiple_c.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-f_sync_reg_c.lo: src/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-f_sync_reg_c.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-f_sync_reg_c.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-f_sync_reg_c.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-f_sync_reg_c.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-f_sync_reg_c.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-f_sync_reg_c.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-f_sync_reg_c.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c + +src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-utils.lo: src/binding/fortran/use_mpi_f08/wrappers_c/utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-utils.lo -MD -MP -MF src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-utils.Tpo -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-utils.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/utils.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/utils.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-utils.Tpo src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-utils.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi_f08/wrappers_c/utils.c' object='src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpifort_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi_f08/wrappers_c/lib_libmpifort_la-utils.lo `test -f 'src/binding/fortran/use_mpi_f08/wrappers_c/utils.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/wrappers_c/utils.c + +src/mpi/attr/lib_libmpi_la-attr_delete.lo: src/mpi/attr/attr_delete.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-attr_delete.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_delete.Tpo -c -o src/mpi/attr/lib_libmpi_la-attr_delete.lo `test -f 'src/mpi/attr/attr_delete.c' || echo '$(srcdir)/'`src/mpi/attr/attr_delete.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_delete.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_delete.Plo +# $(AM_V_CC)source='src/mpi/attr/attr_delete.c' object='src/mpi/attr/lib_libmpi_la-attr_delete.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-attr_delete.lo `test -f 'src/mpi/attr/attr_delete.c' || echo '$(srcdir)/'`src/mpi/attr/attr_delete.c + +src/mpi/attr/lib_libmpi_la-attr_get.lo: src/mpi/attr/attr_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-attr_get.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_get.Tpo -c -o src/mpi/attr/lib_libmpi_la-attr_get.lo `test -f 'src/mpi/attr/attr_get.c' || echo '$(srcdir)/'`src/mpi/attr/attr_get.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_get.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_get.Plo +# $(AM_V_CC)source='src/mpi/attr/attr_get.c' object='src/mpi/attr/lib_libmpi_la-attr_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-attr_get.lo `test -f 'src/mpi/attr/attr_get.c' || echo '$(srcdir)/'`src/mpi/attr/attr_get.c + +src/mpi/attr/lib_libmpi_la-attr_put.lo: src/mpi/attr/attr_put.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-attr_put.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_put.Tpo -c -o src/mpi/attr/lib_libmpi_la-attr_put.lo `test -f 'src/mpi/attr/attr_put.c' || echo '$(srcdir)/'`src/mpi/attr/attr_put.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_put.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_put.Plo +# $(AM_V_CC)source='src/mpi/attr/attr_put.c' object='src/mpi/attr/lib_libmpi_la-attr_put.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-attr_put.lo `test -f 'src/mpi/attr/attr_put.c' || echo '$(srcdir)/'`src/mpi/attr/attr_put.c + +src/mpi/attr/lib_libmpi_la-comm_create_keyval.lo: src/mpi/attr/comm_create_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-comm_create_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_create_keyval.Tpo -c -o src/mpi/attr/lib_libmpi_la-comm_create_keyval.lo `test -f 'src/mpi/attr/comm_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/comm_create_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_create_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_create_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_create_keyval.c' object='src/mpi/attr/lib_libmpi_la-comm_create_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-comm_create_keyval.lo `test -f 'src/mpi/attr/comm_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/comm_create_keyval.c + +src/mpi/attr/lib_libmpi_la-comm_delete_attr.lo: src/mpi/attr/comm_delete_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-comm_delete_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_delete_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-comm_delete_attr.lo `test -f 'src/mpi/attr/comm_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_delete_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_delete_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_delete_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_delete_attr.c' object='src/mpi/attr/lib_libmpi_la-comm_delete_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-comm_delete_attr.lo `test -f 'src/mpi/attr/comm_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_delete_attr.c + +src/mpi/attr/lib_libmpi_la-comm_free_keyval.lo: src/mpi/attr/comm_free_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-comm_free_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_free_keyval.Tpo -c -o src/mpi/attr/lib_libmpi_la-comm_free_keyval.lo `test -f 'src/mpi/attr/comm_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/comm_free_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_free_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_free_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_free_keyval.c' object='src/mpi/attr/lib_libmpi_la-comm_free_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-comm_free_keyval.lo `test -f 'src/mpi/attr/comm_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/comm_free_keyval.c + +src/mpi/attr/lib_libmpi_la-comm_get_attr.lo: src/mpi/attr/comm_get_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-comm_get_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_get_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-comm_get_attr.lo `test -f 'src/mpi/attr/comm_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_get_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_get_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_get_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_get_attr.c' object='src/mpi/attr/lib_libmpi_la-comm_get_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-comm_get_attr.lo `test -f 'src/mpi/attr/comm_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_get_attr.c + +src/mpi/attr/lib_libmpi_la-comm_set_attr.lo: src/mpi/attr/comm_set_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-comm_set_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_set_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-comm_set_attr.lo `test -f 'src/mpi/attr/comm_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_set_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_set_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_set_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_set_attr.c' object='src/mpi/attr/lib_libmpi_la-comm_set_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-comm_set_attr.lo `test -f 'src/mpi/attr/comm_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_set_attr.c + +src/mpi/attr/lib_libmpi_la-keyval_create.lo: src/mpi/attr/keyval_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-keyval_create.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_create.Tpo -c -o src/mpi/attr/lib_libmpi_la-keyval_create.lo `test -f 'src/mpi/attr/keyval_create.c' || echo '$(srcdir)/'`src/mpi/attr/keyval_create.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_create.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_create.Plo +# $(AM_V_CC)source='src/mpi/attr/keyval_create.c' object='src/mpi/attr/lib_libmpi_la-keyval_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-keyval_create.lo `test -f 'src/mpi/attr/keyval_create.c' || echo '$(srcdir)/'`src/mpi/attr/keyval_create.c + +src/mpi/attr/lib_libmpi_la-keyval_free.lo: src/mpi/attr/keyval_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-keyval_free.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_free.Tpo -c -o src/mpi/attr/lib_libmpi_la-keyval_free.lo `test -f 'src/mpi/attr/keyval_free.c' || echo '$(srcdir)/'`src/mpi/attr/keyval_free.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_free.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_free.Plo +# $(AM_V_CC)source='src/mpi/attr/keyval_free.c' object='src/mpi/attr/lib_libmpi_la-keyval_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-keyval_free.lo `test -f 'src/mpi/attr/keyval_free.c' || echo '$(srcdir)/'`src/mpi/attr/keyval_free.c + +src/mpi/attr/lib_libmpi_la-type_create_keyval.lo: src/mpi/attr/type_create_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-type_create_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_create_keyval.Tpo -c -o src/mpi/attr/lib_libmpi_la-type_create_keyval.lo `test -f 'src/mpi/attr/type_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/type_create_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_create_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_create_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/type_create_keyval.c' object='src/mpi/attr/lib_libmpi_la-type_create_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-type_create_keyval.lo `test -f 'src/mpi/attr/type_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/type_create_keyval.c + +src/mpi/attr/lib_libmpi_la-type_delete_attr.lo: src/mpi/attr/type_delete_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-type_delete_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_delete_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-type_delete_attr.lo `test -f 'src/mpi/attr/type_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_delete_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_delete_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_delete_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/type_delete_attr.c' object='src/mpi/attr/lib_libmpi_la-type_delete_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-type_delete_attr.lo `test -f 'src/mpi/attr/type_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_delete_attr.c + +src/mpi/attr/lib_libmpi_la-type_free_keyval.lo: src/mpi/attr/type_free_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-type_free_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_free_keyval.Tpo -c -o src/mpi/attr/lib_libmpi_la-type_free_keyval.lo `test -f 'src/mpi/attr/type_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/type_free_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_free_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_free_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/type_free_keyval.c' object='src/mpi/attr/lib_libmpi_la-type_free_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-type_free_keyval.lo `test -f 'src/mpi/attr/type_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/type_free_keyval.c + +src/mpi/attr/lib_libmpi_la-type_get_attr.lo: src/mpi/attr/type_get_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-type_get_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_get_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-type_get_attr.lo `test -f 'src/mpi/attr/type_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_get_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_get_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_get_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/type_get_attr.c' object='src/mpi/attr/lib_libmpi_la-type_get_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-type_get_attr.lo `test -f 'src/mpi/attr/type_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_get_attr.c + +src/mpi/attr/lib_libmpi_la-type_set_attr.lo: src/mpi/attr/type_set_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-type_set_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_set_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-type_set_attr.lo `test -f 'src/mpi/attr/type_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_set_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_set_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_set_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/type_set_attr.c' object='src/mpi/attr/lib_libmpi_la-type_set_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-type_set_attr.lo `test -f 'src/mpi/attr/type_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_set_attr.c + +src/mpi/attr/lib_libmpi_la-win_create_keyval.lo: src/mpi/attr/win_create_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-win_create_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_create_keyval.Tpo -c -o src/mpi/attr/lib_libmpi_la-win_create_keyval.lo `test -f 'src/mpi/attr/win_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/win_create_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_create_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_create_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/win_create_keyval.c' object='src/mpi/attr/lib_libmpi_la-win_create_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-win_create_keyval.lo `test -f 'src/mpi/attr/win_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/win_create_keyval.c + +src/mpi/attr/lib_libmpi_la-win_delete_attr.lo: src/mpi/attr/win_delete_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-win_delete_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_delete_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-win_delete_attr.lo `test -f 'src/mpi/attr/win_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_delete_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_delete_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_delete_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/win_delete_attr.c' object='src/mpi/attr/lib_libmpi_la-win_delete_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-win_delete_attr.lo `test -f 'src/mpi/attr/win_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_delete_attr.c + +src/mpi/attr/lib_libmpi_la-win_free_keyval.lo: src/mpi/attr/win_free_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-win_free_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_free_keyval.Tpo -c -o src/mpi/attr/lib_libmpi_la-win_free_keyval.lo `test -f 'src/mpi/attr/win_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/win_free_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_free_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_free_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/win_free_keyval.c' object='src/mpi/attr/lib_libmpi_la-win_free_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-win_free_keyval.lo `test -f 'src/mpi/attr/win_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/win_free_keyval.c + +src/mpi/attr/lib_libmpi_la-win_get_attr.lo: src/mpi/attr/win_get_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-win_get_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_get_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-win_get_attr.lo `test -f 'src/mpi/attr/win_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_get_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_get_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_get_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/win_get_attr.c' object='src/mpi/attr/lib_libmpi_la-win_get_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-win_get_attr.lo `test -f 'src/mpi/attr/win_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_get_attr.c + +src/mpi/attr/lib_libmpi_la-win_set_attr.lo: src/mpi/attr/win_set_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-win_set_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_set_attr.Tpo -c -o src/mpi/attr/lib_libmpi_la-win_set_attr.lo `test -f 'src/mpi/attr/win_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_set_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_set_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_set_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/win_set_attr.c' object='src/mpi/attr/lib_libmpi_la-win_set_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-win_set_attr.lo `test -f 'src/mpi/attr/win_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_set_attr.c + +src/mpi/coll/allgather/lib_libmpi_la-allgather.lo: src/mpi/coll/allgather/allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libmpi_la-allgather.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather.Tpo -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather.lo `test -f 'src/mpi/coll/allgather/allgather.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather.c' object='src/mpi/coll/allgather/lib_libmpi_la-allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather.lo `test -f 'src/mpi/coll/allgather/allgather.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather.c + +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv.lo: src/mpi/coll/allgatherv/allgatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv.Tpo -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv.lo `test -f 'src/mpi/coll/allgatherv/allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv.c' object='src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv.lo `test -f 'src/mpi/coll/allgatherv/allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv.c + +src/mpi/coll/allreduce/lib_libmpi_la-allreduce.lo: src/mpi/coll/allreduce/allreduce.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libmpi_la-allreduce.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce.Tpo -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce.lo `test -f 'src/mpi/coll/allreduce/allreduce.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce.c' object='src/mpi/coll/allreduce/lib_libmpi_la-allreduce.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce.lo `test -f 'src/mpi/coll/allreduce/allreduce.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce.c + +src/mpi/coll/alltoall/lib_libmpi_la-alltoall.lo: src/mpi/coll/alltoall/alltoall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libmpi_la-alltoall.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall.Tpo -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall.lo `test -f 'src/mpi/coll/alltoall/alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall.c' object='src/mpi/coll/alltoall/lib_libmpi_la-alltoall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall.lo `test -f 'src/mpi/coll/alltoall/alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall.c + +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv.lo: src/mpi/coll/alltoallv/alltoallv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv.Tpo -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv.lo `test -f 'src/mpi/coll/alltoallv/alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv.c' object='src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv.lo `test -f 'src/mpi/coll/alltoallv/alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv.c + +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw.lo: src/mpi/coll/alltoallw/alltoallw.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw.Tpo -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw.lo `test -f 'src/mpi/coll/alltoallw/alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw.c' object='src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw.lo `test -f 'src/mpi/coll/alltoallw/alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw.c + +src/mpi/coll/barrier/lib_libmpi_la-barrier.lo: src/mpi/coll/barrier/barrier.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libmpi_la-barrier.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier.Tpo -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier.lo `test -f 'src/mpi/coll/barrier/barrier.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier.c' object='src/mpi/coll/barrier/lib_libmpi_la-barrier.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier.lo `test -f 'src/mpi/coll/barrier/barrier.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier.c + +src/mpi/coll/bcast/lib_libmpi_la-bcast.lo: src/mpi/coll/bcast/bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libmpi_la-bcast.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast.Tpo -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast.lo `test -f 'src/mpi/coll/bcast/bcast.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast.c' object='src/mpi/coll/bcast/lib_libmpi_la-bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast.lo `test -f 'src/mpi/coll/bcast/bcast.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast.c + +src/mpi/coll/exscan/lib_libmpi_la-exscan.lo: src/mpi/coll/exscan/exscan.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/exscan/lib_libmpi_la-exscan.lo -MD -MP -MF src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan.Tpo -c -o src/mpi/coll/exscan/lib_libmpi_la-exscan.lo `test -f 'src/mpi/coll/exscan/exscan.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan.c + $(AM_V_at)$(am__mv) src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan.Tpo src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan.Plo +# $(AM_V_CC)source='src/mpi/coll/exscan/exscan.c' object='src/mpi/coll/exscan/lib_libmpi_la-exscan.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/exscan/lib_libmpi_la-exscan.lo `test -f 'src/mpi/coll/exscan/exscan.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan.c + +src/mpi/coll/gather/lib_libmpi_la-gather.lo: src/mpi/coll/gather/gather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libmpi_la-gather.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather.Tpo -c -o src/mpi/coll/gather/lib_libmpi_la-gather.lo `test -f 'src/mpi/coll/gather/gather.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather.c' object='src/mpi/coll/gather/lib_libmpi_la-gather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libmpi_la-gather.lo `test -f 'src/mpi/coll/gather/gather.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather.c + +src/mpi/coll/gatherv/lib_libmpi_la-gatherv.lo: src/mpi/coll/gatherv/gatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gatherv/lib_libmpi_la-gatherv.lo -MD -MP -MF src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv.Tpo -c -o src/mpi/coll/gatherv/lib_libmpi_la-gatherv.lo `test -f 'src/mpi/coll/gatherv/gatherv.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv.Tpo src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/gatherv/gatherv.c' object='src/mpi/coll/gatherv/lib_libmpi_la-gatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gatherv/lib_libmpi_la-gatherv.lo `test -f 'src/mpi/coll/gatherv/gatherv.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv.c + +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter.lo: src/mpi/coll/reduce_scatter/reduce_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter.c' object='src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter.c + +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c' object='src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c + +src/mpi/coll/reduce/lib_libmpi_la-reduce.lo: src/mpi/coll/reduce/reduce.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libmpi_la-reduce.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce.Tpo -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce.lo `test -f 'src/mpi/coll/reduce/reduce.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce.c' object='src/mpi/coll/reduce/lib_libmpi_la-reduce.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce.lo `test -f 'src/mpi/coll/reduce/reduce.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce.c + +src/mpi/coll/scan/lib_libmpi_la-scan.lo: src/mpi/coll/scan/scan.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scan/lib_libmpi_la-scan.lo -MD -MP -MF src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan.Tpo -c -o src/mpi/coll/scan/lib_libmpi_la-scan.lo `test -f 'src/mpi/coll/scan/scan.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan.c + $(AM_V_at)$(am__mv) src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan.Tpo src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan.Plo +# $(AM_V_CC)source='src/mpi/coll/scan/scan.c' object='src/mpi/coll/scan/lib_libmpi_la-scan.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scan/lib_libmpi_la-scan.lo `test -f 'src/mpi/coll/scan/scan.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan.c + +src/mpi/coll/scatter/lib_libmpi_la-scatter.lo: src/mpi/coll/scatter/scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libmpi_la-scatter.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter.Tpo -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter.lo `test -f 'src/mpi/coll/scatter/scatter.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter.c' object='src/mpi/coll/scatter/lib_libmpi_la-scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter.lo `test -f 'src/mpi/coll/scatter/scatter.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter.c + +src/mpi/coll/scatterv/lib_libmpi_la-scatterv.lo: src/mpi/coll/scatterv/scatterv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatterv/lib_libmpi_la-scatterv.lo -MD -MP -MF src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv.Tpo -c -o src/mpi/coll/scatterv/lib_libmpi_la-scatterv.lo `test -f 'src/mpi/coll/scatterv/scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv.Tpo src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv.Plo +# $(AM_V_CC)source='src/mpi/coll/scatterv/scatterv.c' object='src/mpi/coll/scatterv/lib_libmpi_la-scatterv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatterv/lib_libmpi_la-scatterv.lo `test -f 'src/mpi/coll/scatterv/scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv.c + +src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather.lo: src/mpi/coll/neighbor_allgather/neighbor_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather.lo -MD -MP -MF src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather.Tpo -c -o src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather.lo `test -f 'src/mpi/coll/neighbor_allgather/neighbor_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgather/neighbor_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather.Tpo src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_allgather/neighbor_allgather.c' object='src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather.lo `test -f 'src/mpi/coll/neighbor_allgather/neighbor_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgather/neighbor_allgather.c + +src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv.lo: src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv.lo -MD -MP -MF src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv.Tpo -c -o src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv.lo `test -f 'src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv.Tpo src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c' object='src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv.lo `test -f 'src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c + +src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall.lo: src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall.lo -MD -MP -MF src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall.Tpo -c -o src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall.lo `test -f 'src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall.Tpo src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c' object='src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall.lo `test -f 'src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c + +src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv.lo: src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv.lo -MD -MP -MF src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv.Tpo -c -o src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv.lo `test -f 'src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv.Tpo src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c' object='src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv.lo `test -f 'src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c + +src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw.lo: src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw.lo -MD -MP -MF src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw.Tpo -c -o src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw.lo `test -f 'src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw.Tpo src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c' object='src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw.lo `test -f 'src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather.lo: src/mpi/coll/iallgather/iallgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather.lo `test -f 'src/mpi/coll/iallgather/iallgather.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather.lo `test -f 'src/mpi/coll/iallgather/iallgather.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv.lo: src/mpi/coll/iallgatherv/iallgatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce.lo: src/mpi/coll/iallreduce/iallreduce.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce.lo `test -f 'src/mpi/coll/iallreduce/iallreduce.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce.lo `test -f 'src/mpi/coll/iallreduce/iallreduce.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall.lo: src/mpi/coll/ialltoall/ialltoall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall.lo `test -f 'src/mpi/coll/ialltoall/ialltoall.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall.lo `test -f 'src/mpi/coll/ialltoall/ialltoall.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall.c + +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv.lo: src/mpi/coll/ialltoallv/ialltoallv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv.Tpo -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv.c' object='src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv.c + +src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw.lo: src/mpi/coll/ialltoallw/ialltoallw.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw.lo -MD -MP -MF src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw.Tpo -c -o src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw.Tpo src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallw/ialltoallw.c' object='src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw.c + +src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier.lo: src/mpi/coll/ibarrier/ibarrier.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier.lo -MD -MP -MF src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier.Tpo -c -o src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier.lo `test -f 'src/mpi/coll/ibarrier/ibarrier.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier.Tpo src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier.Plo +# $(AM_V_CC)source='src/mpi/coll/ibarrier/ibarrier.c' object='src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier.lo `test -f 'src/mpi/coll/ibarrier/ibarrier.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast.lo: src/mpi/coll/ibcast/ibcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast.lo `test -f 'src/mpi/coll/ibcast/ibcast.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast.lo `test -f 'src/mpi/coll/ibcast/ibcast.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast.c + +src/mpi/coll/iexscan/lib_libmpi_la-iexscan.lo: src/mpi/coll/iexscan/iexscan.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iexscan/lib_libmpi_la-iexscan.lo -MD -MP -MF src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan.Tpo -c -o src/mpi/coll/iexscan/lib_libmpi_la-iexscan.lo `test -f 'src/mpi/coll/iexscan/iexscan.c' || echo '$(srcdir)/'`src/mpi/coll/iexscan/iexscan.c + $(AM_V_at)$(am__mv) src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan.Tpo src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan.Plo +# $(AM_V_CC)source='src/mpi/coll/iexscan/iexscan.c' object='src/mpi/coll/iexscan/lib_libmpi_la-iexscan.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iexscan/lib_libmpi_la-iexscan.lo `test -f 'src/mpi/coll/iexscan/iexscan.c' || echo '$(srcdir)/'`src/mpi/coll/iexscan/iexscan.c + +src/mpi/coll/igather/lib_libmpi_la-igather.lo: src/mpi/coll/igather/igather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libmpi_la-igather.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather.Tpo -c -o src/mpi/coll/igather/lib_libmpi_la-igather.lo `test -f 'src/mpi/coll/igather/igather.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather.c' object='src/mpi/coll/igather/lib_libmpi_la-igather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libmpi_la-igather.lo `test -f 'src/mpi/coll/igather/igather.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather.c + +src/mpi/coll/igatherv/lib_libmpi_la-igatherv.lo: src/mpi/coll/igatherv/igatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igatherv/lib_libmpi_la-igatherv.lo -MD -MP -MF src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv.Tpo -c -o src/mpi/coll/igatherv/lib_libmpi_la-igatherv.lo `test -f 'src/mpi/coll/igatherv/igatherv.c' || echo '$(srcdir)/'`src/mpi/coll/igatherv/igatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv.Tpo src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/igatherv/igatherv.c' object='src/mpi/coll/igatherv/lib_libmpi_la-igatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igatherv/lib_libmpi_la-igatherv.lo `test -f 'src/mpi/coll/igatherv/igatherv.c' || echo '$(srcdir)/'`src/mpi/coll/igatherv/igatherv.c + +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter.c' object='src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter.c + +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c' object='src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c + +src/mpi/coll/ireduce/lib_libmpi_la-ireduce.lo: src/mpi/coll/ireduce/ireduce.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libmpi_la-ireduce.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce.Tpo -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce.lo `test -f 'src/mpi/coll/ireduce/ireduce.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce.c' object='src/mpi/coll/ireduce/lib_libmpi_la-ireduce.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce.lo `test -f 'src/mpi/coll/ireduce/ireduce.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce.c + +src/mpi/coll/iscan/lib_libmpi_la-iscan.lo: src/mpi/coll/iscan/iscan.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libmpi_la-iscan.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan.Tpo -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan.lo `test -f 'src/mpi/coll/iscan/iscan.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan.c' object='src/mpi/coll/iscan/lib_libmpi_la-iscan.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan.lo `test -f 'src/mpi/coll/iscan/iscan.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan.c + +src/mpi/coll/iscatter/lib_libmpi_la-iscatter.lo: src/mpi/coll/iscatter/iscatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libmpi_la-iscatter.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter.Tpo -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter.lo `test -f 'src/mpi/coll/iscatter/iscatter.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter.c' object='src/mpi/coll/iscatter/lib_libmpi_la-iscatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter.lo `test -f 'src/mpi/coll/iscatter/iscatter.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter.c + +src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv.lo: src/mpi/coll/iscatterv/iscatterv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv.lo -MD -MP -MF src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv.Tpo -c -o src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv.lo `test -f 'src/mpi/coll/iscatterv/iscatterv.c' || echo '$(srcdir)/'`src/mpi/coll/iscatterv/iscatterv.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv.Tpo src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatterv/iscatterv.c' object='src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv.lo `test -f 'src/mpi/coll/iscatterv/iscatterv.c' || echo '$(srcdir)/'`src/mpi/coll/iscatterv/iscatterv.c + +src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather.lo: src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather.lo -MD -MP -MF src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather.Tpo -c -o src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather.Tpo src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c' object='src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c + +src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv.lo: src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv.lo -MD -MP -MF src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv.Tpo -c -o src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv.Tpo src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c' object='src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c + +src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall.lo: src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall.Tpo -c -o src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall.Tpo src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c' object='src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c + +src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv.lo: src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv.Tpo -c -o src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv.Tpo src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c' object='src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c + +src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw.lo: src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw.Tpo -c -o src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw.Tpo src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c' object='src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c + +src/mpi/coll/op/lib_libmpi_la-op_create.lo: src/mpi/coll/op/op_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-op_create.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_create.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-op_create.lo `test -f 'src/mpi/coll/op/op_create.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_create.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_create.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_create.Plo +# $(AM_V_CC)source='src/mpi/coll/op/op_create.c' object='src/mpi/coll/op/lib_libmpi_la-op_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-op_create.lo `test -f 'src/mpi/coll/op/op_create.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_create.c + +src/mpi/coll/op/lib_libmpi_la-op_free.lo: src/mpi/coll/op/op_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-op_free.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_free.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-op_free.lo `test -f 'src/mpi/coll/op/op_free.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_free.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_free.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_free.Plo +# $(AM_V_CC)source='src/mpi/coll/op/op_free.c' object='src/mpi/coll/op/lib_libmpi_la-op_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-op_free.lo `test -f 'src/mpi/coll/op/op_free.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_free.c + +src/mpi/coll/op/lib_libmpi_la-op_commutative.lo: src/mpi/coll/op/op_commutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-op_commutative.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_commutative.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-op_commutative.lo `test -f 'src/mpi/coll/op/op_commutative.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_commutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_commutative.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_commutative.Plo +# $(AM_V_CC)source='src/mpi/coll/op/op_commutative.c' object='src/mpi/coll/op/lib_libmpi_la-op_commutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-op_commutative.lo `test -f 'src/mpi/coll/op/op_commutative.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_commutative.c + +src/mpi/coll/reduce_local/lib_libmpi_la-reduce_local.lo: src/mpi/coll/reduce_local/reduce_local.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_local/lib_libmpi_la-reduce_local.lo -MD -MP -MF src/mpi/coll/reduce_local/$(DEPDIR)/lib_libmpi_la-reduce_local.Tpo -c -o src/mpi/coll/reduce_local/lib_libmpi_la-reduce_local.lo `test -f 'src/mpi/coll/reduce_local/reduce_local.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_local/reduce_local.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_local/$(DEPDIR)/lib_libmpi_la-reduce_local.Tpo src/mpi/coll/reduce_local/$(DEPDIR)/lib_libmpi_la-reduce_local.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_local/reduce_local.c' object='src/mpi/coll/reduce_local/lib_libmpi_la-reduce_local.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_local/lib_libmpi_la-reduce_local.lo `test -f 'src/mpi/coll/reduce_local/reduce_local.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_local/reduce_local.c + +src/mpi/comm/lib_libmpi_la-comm_compare.lo: src/mpi/comm/comm_compare.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_compare.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_compare.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_compare.lo `test -f 'src/mpi/comm/comm_compare.c' || echo '$(srcdir)/'`src/mpi/comm/comm_compare.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_compare.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_compare.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_compare.c' object='src/mpi/comm/lib_libmpi_la-comm_compare.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_compare.lo `test -f 'src/mpi/comm/comm_compare.c' || echo '$(srcdir)/'`src/mpi/comm/comm_compare.c + +src/mpi/comm/lib_libmpi_la-comm_create.lo: src/mpi/comm/comm_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_create.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_create.lo `test -f 'src/mpi/comm/comm_create.c' || echo '$(srcdir)/'`src/mpi/comm/comm_create.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_create.c' object='src/mpi/comm/lib_libmpi_la-comm_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_create.lo `test -f 'src/mpi/comm/comm_create.c' || echo '$(srcdir)/'`src/mpi/comm/comm_create.c + +src/mpi/comm/lib_libmpi_la-comm_create_group.lo: src/mpi/comm/comm_create_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_create_group.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create_group.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_create_group.lo `test -f 'src/mpi/comm/comm_create_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_create_group.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create_group.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create_group.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_create_group.c' object='src/mpi/comm/lib_libmpi_la-comm_create_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_create_group.lo `test -f 'src/mpi/comm/comm_create_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_create_group.c + +src/mpi/comm/lib_libmpi_la-comm_dup.lo: src/mpi/comm/comm_dup.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_dup.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_dup.lo `test -f 'src/mpi/comm/comm_dup.c' || echo '$(srcdir)/'`src/mpi/comm/comm_dup.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_dup.c' object='src/mpi/comm/lib_libmpi_la-comm_dup.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_dup.lo `test -f 'src/mpi/comm/comm_dup.c' || echo '$(srcdir)/'`src/mpi/comm/comm_dup.c + +src/mpi/comm/lib_libmpi_la-comm_dup_with_info.lo: src/mpi/comm/comm_dup_with_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_dup_with_info.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup_with_info.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_dup_with_info.lo `test -f 'src/mpi/comm/comm_dup_with_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_dup_with_info.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup_with_info.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup_with_info.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_dup_with_info.c' object='src/mpi/comm/lib_libmpi_la-comm_dup_with_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_dup_with_info.lo `test -f 'src/mpi/comm/comm_dup_with_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_dup_with_info.c + +src/mpi/comm/lib_libmpi_la-comm_free.lo: src/mpi/comm/comm_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_free.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_free.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_free.lo `test -f 'src/mpi/comm/comm_free.c' || echo '$(srcdir)/'`src/mpi/comm/comm_free.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_free.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_free.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_free.c' object='src/mpi/comm/lib_libmpi_la-comm_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_free.lo `test -f 'src/mpi/comm/comm_free.c' || echo '$(srcdir)/'`src/mpi/comm/comm_free.c + +src/mpi/comm/lib_libmpi_la-comm_get_name.lo: src/mpi/comm/comm_get_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_get_name.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_name.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_get_name.lo `test -f 'src/mpi/comm/comm_get_name.c' || echo '$(srcdir)/'`src/mpi/comm/comm_get_name.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_name.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_name.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_get_name.c' object='src/mpi/comm/lib_libmpi_la-comm_get_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_get_name.lo `test -f 'src/mpi/comm/comm_get_name.c' || echo '$(srcdir)/'`src/mpi/comm/comm_get_name.c + +src/mpi/comm/lib_libmpi_la-comm_get_info.lo: src/mpi/comm/comm_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_get_info.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_info.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_get_info.lo `test -f 'src/mpi/comm/comm_get_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_get_info.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_info.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_info.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_get_info.c' object='src/mpi/comm/lib_libmpi_la-comm_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_get_info.lo `test -f 'src/mpi/comm/comm_get_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_get_info.c + +src/mpi/comm/lib_libmpi_la-comm_set_info.lo: src/mpi/comm/comm_set_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_set_info.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_info.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_set_info.lo `test -f 'src/mpi/comm/comm_set_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_set_info.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_info.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_info.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_set_info.c' object='src/mpi/comm/lib_libmpi_la-comm_set_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_set_info.lo `test -f 'src/mpi/comm/comm_set_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_set_info.c + +src/mpi/comm/lib_libmpi_la-comm_group.lo: src/mpi/comm/comm_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_group.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_group.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_group.lo `test -f 'src/mpi/comm/comm_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_group.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_group.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_group.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_group.c' object='src/mpi/comm/lib_libmpi_la-comm_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_group.lo `test -f 'src/mpi/comm/comm_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_group.c + +src/mpi/comm/lib_libmpi_la-comm_idup.lo: src/mpi/comm/comm_idup.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_idup.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_idup.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_idup.lo `test -f 'src/mpi/comm/comm_idup.c' || echo '$(srcdir)/'`src/mpi/comm/comm_idup.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_idup.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_idup.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_idup.c' object='src/mpi/comm/lib_libmpi_la-comm_idup.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_idup.lo `test -f 'src/mpi/comm/comm_idup.c' || echo '$(srcdir)/'`src/mpi/comm/comm_idup.c + +src/mpi/comm/lib_libmpi_la-comm_rank.lo: src/mpi/comm/comm_rank.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_rank.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_rank.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_rank.lo `test -f 'src/mpi/comm/comm_rank.c' || echo '$(srcdir)/'`src/mpi/comm/comm_rank.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_rank.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_rank.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_rank.c' object='src/mpi/comm/lib_libmpi_la-comm_rank.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_rank.lo `test -f 'src/mpi/comm/comm_rank.c' || echo '$(srcdir)/'`src/mpi/comm/comm_rank.c + +src/mpi/comm/lib_libmpi_la-comm_size.lo: src/mpi/comm/comm_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_size.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_size.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_size.lo `test -f 'src/mpi/comm/comm_size.c' || echo '$(srcdir)/'`src/mpi/comm/comm_size.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_size.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_size.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_size.c' object='src/mpi/comm/lib_libmpi_la-comm_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_size.lo `test -f 'src/mpi/comm/comm_size.c' || echo '$(srcdir)/'`src/mpi/comm/comm_size.c + +src/mpi/comm/lib_libmpi_la-comm_remote_group.lo: src/mpi/comm/comm_remote_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_remote_group.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_group.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_remote_group.lo `test -f 'src/mpi/comm/comm_remote_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_remote_group.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_group.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_group.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_remote_group.c' object='src/mpi/comm/lib_libmpi_la-comm_remote_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_remote_group.lo `test -f 'src/mpi/comm/comm_remote_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_remote_group.c + +src/mpi/comm/lib_libmpi_la-comm_remote_size.lo: src/mpi/comm/comm_remote_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_remote_size.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_size.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_remote_size.lo `test -f 'src/mpi/comm/comm_remote_size.c' || echo '$(srcdir)/'`src/mpi/comm/comm_remote_size.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_size.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_size.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_remote_size.c' object='src/mpi/comm/lib_libmpi_la-comm_remote_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_remote_size.lo `test -f 'src/mpi/comm/comm_remote_size.c' || echo '$(srcdir)/'`src/mpi/comm/comm_remote_size.c + +src/mpi/comm/lib_libmpi_la-comm_set_name.lo: src/mpi/comm/comm_set_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_set_name.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_name.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_set_name.lo `test -f 'src/mpi/comm/comm_set_name.c' || echo '$(srcdir)/'`src/mpi/comm/comm_set_name.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_name.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_name.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_set_name.c' object='src/mpi/comm/lib_libmpi_la-comm_set_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_set_name.lo `test -f 'src/mpi/comm/comm_set_name.c' || echo '$(srcdir)/'`src/mpi/comm/comm_set_name.c + +src/mpi/comm/lib_libmpi_la-comm_split.lo: src/mpi/comm/comm_split.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_split.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_split.lo `test -f 'src/mpi/comm/comm_split.c' || echo '$(srcdir)/'`src/mpi/comm/comm_split.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_split.c' object='src/mpi/comm/lib_libmpi_la-comm_split.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_split.lo `test -f 'src/mpi/comm/comm_split.c' || echo '$(srcdir)/'`src/mpi/comm/comm_split.c + +src/mpi/comm/lib_libmpi_la-comm_test_inter.lo: src/mpi/comm/comm_test_inter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_test_inter.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_test_inter.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_test_inter.lo `test -f 'src/mpi/comm/comm_test_inter.c' || echo '$(srcdir)/'`src/mpi/comm/comm_test_inter.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_test_inter.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_test_inter.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_test_inter.c' object='src/mpi/comm/lib_libmpi_la-comm_test_inter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_test_inter.lo `test -f 'src/mpi/comm/comm_test_inter.c' || echo '$(srcdir)/'`src/mpi/comm/comm_test_inter.c + +src/mpi/comm/lib_libmpi_la-intercomm_create.lo: src/mpi/comm/intercomm_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-intercomm_create.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_create.Tpo -c -o src/mpi/comm/lib_libmpi_la-intercomm_create.lo `test -f 'src/mpi/comm/intercomm_create.c' || echo '$(srcdir)/'`src/mpi/comm/intercomm_create.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_create.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_create.Plo +# $(AM_V_CC)source='src/mpi/comm/intercomm_create.c' object='src/mpi/comm/lib_libmpi_la-intercomm_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-intercomm_create.lo `test -f 'src/mpi/comm/intercomm_create.c' || echo '$(srcdir)/'`src/mpi/comm/intercomm_create.c + +src/mpi/comm/lib_libmpi_la-intercomm_merge.lo: src/mpi/comm/intercomm_merge.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-intercomm_merge.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_merge.Tpo -c -o src/mpi/comm/lib_libmpi_la-intercomm_merge.lo `test -f 'src/mpi/comm/intercomm_merge.c' || echo '$(srcdir)/'`src/mpi/comm/intercomm_merge.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_merge.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_merge.Plo +# $(AM_V_CC)source='src/mpi/comm/intercomm_merge.c' object='src/mpi/comm/lib_libmpi_la-intercomm_merge.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-intercomm_merge.lo `test -f 'src/mpi/comm/intercomm_merge.c' || echo '$(srcdir)/'`src/mpi/comm/intercomm_merge.c + +src/mpi/comm/lib_libmpi_la-comm_split_type.lo: src/mpi/comm/comm_split_type.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_split_type.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split_type.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_split_type.lo `test -f 'src/mpi/comm/comm_split_type.c' || echo '$(srcdir)/'`src/mpi/comm/comm_split_type.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split_type.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split_type.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_split_type.c' object='src/mpi/comm/lib_libmpi_la-comm_split_type.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_split_type.lo `test -f 'src/mpi/comm/comm_split_type.c' || echo '$(srcdir)/'`src/mpi/comm/comm_split_type.c + +src/mpi/comm/lib_libmpi_la-comm_failure_ack.lo: src/mpi/comm/comm_failure_ack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_failure_ack.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_ack.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_failure_ack.lo `test -f 'src/mpi/comm/comm_failure_ack.c' || echo '$(srcdir)/'`src/mpi/comm/comm_failure_ack.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_ack.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_ack.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_failure_ack.c' object='src/mpi/comm/lib_libmpi_la-comm_failure_ack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_failure_ack.lo `test -f 'src/mpi/comm/comm_failure_ack.c' || echo '$(srcdir)/'`src/mpi/comm/comm_failure_ack.c + +src/mpi/comm/lib_libmpi_la-comm_failure_get_acked.lo: src/mpi/comm/comm_failure_get_acked.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_failure_get_acked.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_get_acked.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_failure_get_acked.lo `test -f 'src/mpi/comm/comm_failure_get_acked.c' || echo '$(srcdir)/'`src/mpi/comm/comm_failure_get_acked.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_get_acked.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_get_acked.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_failure_get_acked.c' object='src/mpi/comm/lib_libmpi_la-comm_failure_get_acked.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_failure_get_acked.lo `test -f 'src/mpi/comm/comm_failure_get_acked.c' || echo '$(srcdir)/'`src/mpi/comm/comm_failure_get_acked.c + +src/mpi/comm/lib_libmpi_la-comm_revoke.lo: src/mpi/comm/comm_revoke.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_revoke.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_revoke.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_revoke.lo `test -f 'src/mpi/comm/comm_revoke.c' || echo '$(srcdir)/'`src/mpi/comm/comm_revoke.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_revoke.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_revoke.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_revoke.c' object='src/mpi/comm/lib_libmpi_la-comm_revoke.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_revoke.lo `test -f 'src/mpi/comm/comm_revoke.c' || echo '$(srcdir)/'`src/mpi/comm/comm_revoke.c + +src/mpi/comm/lib_libmpi_la-comm_shrink.lo: src/mpi/comm/comm_shrink.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_shrink.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_shrink.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_shrink.lo `test -f 'src/mpi/comm/comm_shrink.c' || echo '$(srcdir)/'`src/mpi/comm/comm_shrink.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_shrink.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_shrink.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_shrink.c' object='src/mpi/comm/lib_libmpi_la-comm_shrink.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_shrink.lo `test -f 'src/mpi/comm/comm_shrink.c' || echo '$(srcdir)/'`src/mpi/comm/comm_shrink.c + +src/mpi/comm/lib_libmpi_la-comm_agree.lo: src/mpi/comm/comm_agree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-comm_agree.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_agree.Tpo -c -o src/mpi/comm/lib_libmpi_la-comm_agree.lo `test -f 'src/mpi/comm/comm_agree.c' || echo '$(srcdir)/'`src/mpi/comm/comm_agree.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_agree.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_agree.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_agree.c' object='src/mpi/comm/lib_libmpi_la-comm_agree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-comm_agree.lo `test -f 'src/mpi/comm/comm_agree.c' || echo '$(srcdir)/'`src/mpi/comm/comm_agree.c + +src/mpi/datatype/lib_libmpi_la-address.lo: src/mpi/datatype/address.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-address.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-address.Tpo -c -o src/mpi/datatype/lib_libmpi_la-address.lo `test -f 'src/mpi/datatype/address.c' || echo '$(srcdir)/'`src/mpi/datatype/address.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-address.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-address.Plo +# $(AM_V_CC)source='src/mpi/datatype/address.c' object='src/mpi/datatype/lib_libmpi_la-address.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-address.lo `test -f 'src/mpi/datatype/address.c' || echo '$(srcdir)/'`src/mpi/datatype/address.c + +src/mpi/datatype/lib_libmpi_la-get_address.lo: src/mpi/datatype/get_address.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-get_address.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_address.Tpo -c -o src/mpi/datatype/lib_libmpi_la-get_address.lo `test -f 'src/mpi/datatype/get_address.c' || echo '$(srcdir)/'`src/mpi/datatype/get_address.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_address.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_address.Plo +# $(AM_V_CC)source='src/mpi/datatype/get_address.c' object='src/mpi/datatype/lib_libmpi_la-get_address.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-get_address.lo `test -f 'src/mpi/datatype/get_address.c' || echo '$(srcdir)/'`src/mpi/datatype/get_address.c + +src/mpi/datatype/lib_libmpi_la-get_count.lo: src/mpi/datatype/get_count.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-get_count.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_count.Tpo -c -o src/mpi/datatype/lib_libmpi_la-get_count.lo `test -f 'src/mpi/datatype/get_count.c' || echo '$(srcdir)/'`src/mpi/datatype/get_count.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_count.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_count.Plo +# $(AM_V_CC)source='src/mpi/datatype/get_count.c' object='src/mpi/datatype/lib_libmpi_la-get_count.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-get_count.lo `test -f 'src/mpi/datatype/get_count.c' || echo '$(srcdir)/'`src/mpi/datatype/get_count.c + +src/mpi/datatype/lib_libmpi_la-get_elements.lo: src/mpi/datatype/get_elements.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-get_elements.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements.Tpo -c -o src/mpi/datatype/lib_libmpi_la-get_elements.lo `test -f 'src/mpi/datatype/get_elements.c' || echo '$(srcdir)/'`src/mpi/datatype/get_elements.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements.Plo +# $(AM_V_CC)source='src/mpi/datatype/get_elements.c' object='src/mpi/datatype/lib_libmpi_la-get_elements.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-get_elements.lo `test -f 'src/mpi/datatype/get_elements.c' || echo '$(srcdir)/'`src/mpi/datatype/get_elements.c + +src/mpi/datatype/lib_libmpi_la-get_elements_x.lo: src/mpi/datatype/get_elements_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-get_elements_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements_x.Tpo -c -o src/mpi/datatype/lib_libmpi_la-get_elements_x.lo `test -f 'src/mpi/datatype/get_elements_x.c' || echo '$(srcdir)/'`src/mpi/datatype/get_elements_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/get_elements_x.c' object='src/mpi/datatype/lib_libmpi_la-get_elements_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-get_elements_x.lo `test -f 'src/mpi/datatype/get_elements_x.c' || echo '$(srcdir)/'`src/mpi/datatype/get_elements_x.c + +src/mpi/datatype/lib_libmpi_la-pack.lo: src/mpi/datatype/pack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-pack.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack.Tpo -c -o src/mpi/datatype/lib_libmpi_la-pack.lo `test -f 'src/mpi/datatype/pack.c' || echo '$(srcdir)/'`src/mpi/datatype/pack.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack.Plo +# $(AM_V_CC)source='src/mpi/datatype/pack.c' object='src/mpi/datatype/lib_libmpi_la-pack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-pack.lo `test -f 'src/mpi/datatype/pack.c' || echo '$(srcdir)/'`src/mpi/datatype/pack.c + +src/mpi/datatype/lib_libmpi_la-pack_external.lo: src/mpi/datatype/pack_external.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-pack_external.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external.Tpo -c -o src/mpi/datatype/lib_libmpi_la-pack_external.lo `test -f 'src/mpi/datatype/pack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_external.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external.Plo +# $(AM_V_CC)source='src/mpi/datatype/pack_external.c' object='src/mpi/datatype/lib_libmpi_la-pack_external.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-pack_external.lo `test -f 'src/mpi/datatype/pack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_external.c + +src/mpi/datatype/lib_libmpi_la-pack_external_size.lo: src/mpi/datatype/pack_external_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-pack_external_size.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external_size.Tpo -c -o src/mpi/datatype/lib_libmpi_la-pack_external_size.lo `test -f 'src/mpi/datatype/pack_external_size.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_external_size.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external_size.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external_size.Plo +# $(AM_V_CC)source='src/mpi/datatype/pack_external_size.c' object='src/mpi/datatype/lib_libmpi_la-pack_external_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-pack_external_size.lo `test -f 'src/mpi/datatype/pack_external_size.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_external_size.c + +src/mpi/datatype/lib_libmpi_la-pack_size.lo: src/mpi/datatype/pack_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-pack_size.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_size.Tpo -c -o src/mpi/datatype/lib_libmpi_la-pack_size.lo `test -f 'src/mpi/datatype/pack_size.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_size.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_size.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_size.Plo +# $(AM_V_CC)source='src/mpi/datatype/pack_size.c' object='src/mpi/datatype/lib_libmpi_la-pack_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-pack_size.lo `test -f 'src/mpi/datatype/pack_size.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_size.c + +src/mpi/datatype/lib_libmpi_la-status_set_elements.lo: src/mpi/datatype/status_set_elements.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-status_set_elements.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements.Tpo -c -o src/mpi/datatype/lib_libmpi_la-status_set_elements.lo `test -f 'src/mpi/datatype/status_set_elements.c' || echo '$(srcdir)/'`src/mpi/datatype/status_set_elements.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements.Plo +# $(AM_V_CC)source='src/mpi/datatype/status_set_elements.c' object='src/mpi/datatype/lib_libmpi_la-status_set_elements.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-status_set_elements.lo `test -f 'src/mpi/datatype/status_set_elements.c' || echo '$(srcdir)/'`src/mpi/datatype/status_set_elements.c + +src/mpi/datatype/lib_libmpi_la-status_set_elements_x.lo: src/mpi/datatype/status_set_elements_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-status_set_elements_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements_x.Tpo -c -o src/mpi/datatype/lib_libmpi_la-status_set_elements_x.lo `test -f 'src/mpi/datatype/status_set_elements_x.c' || echo '$(srcdir)/'`src/mpi/datatype/status_set_elements_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/status_set_elements_x.c' object='src/mpi/datatype/lib_libmpi_la-status_set_elements_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-status_set_elements_x.lo `test -f 'src/mpi/datatype/status_set_elements_x.c' || echo '$(srcdir)/'`src/mpi/datatype/status_set_elements_x.c + +src/mpi/datatype/lib_libmpi_la-type_get_name.lo: src/mpi/datatype/type_get_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_get_name.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_name.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_get_name.lo `test -f 'src/mpi/datatype/type_get_name.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_name.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_name.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_name.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_name.c' object='src/mpi/datatype/lib_libmpi_la-type_get_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_get_name.lo `test -f 'src/mpi/datatype/type_get_name.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_name.c + +src/mpi/datatype/lib_libmpi_la-type_set_name.lo: src/mpi/datatype/type_set_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_set_name.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_set_name.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_set_name.lo `test -f 'src/mpi/datatype/type_set_name.c' || echo '$(srcdir)/'`src/mpi/datatype/type_set_name.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_set_name.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_set_name.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_set_name.c' object='src/mpi/datatype/lib_libmpi_la-type_set_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_set_name.lo `test -f 'src/mpi/datatype/type_set_name.c' || echo '$(srcdir)/'`src/mpi/datatype/type_set_name.c + +src/mpi/datatype/lib_libmpi_la-type_size.lo: src/mpi/datatype/type_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_size.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_size.lo `test -f 'src/mpi/datatype/type_size.c' || echo '$(srcdir)/'`src/mpi/datatype/type_size.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_size.c' object='src/mpi/datatype/lib_libmpi_la-type_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_size.lo `test -f 'src/mpi/datatype/type_size.c' || echo '$(srcdir)/'`src/mpi/datatype/type_size.c + +src/mpi/datatype/lib_libmpi_la-type_size_x.lo: src/mpi/datatype/type_size_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_size_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size_x.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_size_x.lo `test -f 'src/mpi/datatype/type_size_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_size_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_size_x.c' object='src/mpi/datatype/lib_libmpi_la-type_size_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_size_x.lo `test -f 'src/mpi/datatype/type_size_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_size_x.c + +src/mpi/datatype/lib_libmpi_la-type_extent.lo: src/mpi/datatype/type_extent.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_extent.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_extent.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_extent.lo `test -f 'src/mpi/datatype/type_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_extent.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_extent.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_extent.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_extent.c' object='src/mpi/datatype/lib_libmpi_la-type_extent.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_extent.lo `test -f 'src/mpi/datatype/type_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_extent.c + +src/mpi/datatype/lib_libmpi_la-type_vector.lo: src/mpi/datatype/type_vector.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_vector.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_vector.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_vector.lo `test -f 'src/mpi/datatype/type_vector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_vector.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_vector.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_vector.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_vector.c' object='src/mpi/datatype/lib_libmpi_la-type_vector.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_vector.lo `test -f 'src/mpi/datatype/type_vector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_vector.c + +src/mpi/datatype/lib_libmpi_la-type_commit.lo: src/mpi/datatype/type_commit.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_commit.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_commit.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_commit.lo `test -f 'src/mpi/datatype/type_commit.c' || echo '$(srcdir)/'`src/mpi/datatype/type_commit.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_commit.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_commit.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_commit.c' object='src/mpi/datatype/lib_libmpi_la-type_commit.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_commit.lo `test -f 'src/mpi/datatype/type_commit.c' || echo '$(srcdir)/'`src/mpi/datatype/type_commit.c + +src/mpi/datatype/lib_libmpi_la-type_indexed.lo: src/mpi/datatype/type_indexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_indexed.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_indexed.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_indexed.lo `test -f 'src/mpi/datatype/type_indexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_indexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_indexed.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_indexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_indexed.c' object='src/mpi/datatype/lib_libmpi_la-type_indexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_indexed.lo `test -f 'src/mpi/datatype/type_indexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_indexed.c + +src/mpi/datatype/lib_libmpi_la-type_hindexed.lo: src/mpi/datatype/type_hindexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_hindexed.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hindexed.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_hindexed.lo `test -f 'src/mpi/datatype/type_hindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_hindexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hindexed.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hindexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_hindexed.c' object='src/mpi/datatype/lib_libmpi_la-type_hindexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_hindexed.lo `test -f 'src/mpi/datatype/type_hindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_hindexed.c + +src/mpi/datatype/lib_libmpi_la-type_struct.lo: src/mpi/datatype/type_struct.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_struct.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_struct.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_struct.lo `test -f 'src/mpi/datatype/type_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/type_struct.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_struct.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_struct.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_struct.c' object='src/mpi/datatype/lib_libmpi_la-type_struct.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_struct.lo `test -f 'src/mpi/datatype/type_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/type_struct.c + +src/mpi/datatype/lib_libmpi_la-type_contiguous.lo: src/mpi/datatype/type_contiguous.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_contiguous.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_contiguous.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_contiguous.lo `test -f 'src/mpi/datatype/type_contiguous.c' || echo '$(srcdir)/'`src/mpi/datatype/type_contiguous.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_contiguous.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_contiguous.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_contiguous.c' object='src/mpi/datatype/lib_libmpi_la-type_contiguous.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_contiguous.lo `test -f 'src/mpi/datatype/type_contiguous.c' || echo '$(srcdir)/'`src/mpi/datatype/type_contiguous.c + +src/mpi/datatype/lib_libmpi_la-type_free.lo: src/mpi/datatype/type_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_free.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_free.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_free.lo `test -f 'src/mpi/datatype/type_free.c' || echo '$(srcdir)/'`src/mpi/datatype/type_free.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_free.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_free.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_free.c' object='src/mpi/datatype/lib_libmpi_la-type_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_free.lo `test -f 'src/mpi/datatype/type_free.c' || echo '$(srcdir)/'`src/mpi/datatype/type_free.c + +src/mpi/datatype/lib_libmpi_la-type_hvector.lo: src/mpi/datatype/type_hvector.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_hvector.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hvector.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_hvector.lo `test -f 'src/mpi/datatype/type_hvector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_hvector.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hvector.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hvector.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_hvector.c' object='src/mpi/datatype/lib_libmpi_la-type_hvector.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_hvector.lo `test -f 'src/mpi/datatype/type_hvector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_hvector.c + +src/mpi/datatype/lib_libmpi_la-type_dup.lo: src/mpi/datatype/type_dup.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_dup.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_dup.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_dup.lo `test -f 'src/mpi/datatype/type_dup.c' || echo '$(srcdir)/'`src/mpi/datatype/type_dup.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_dup.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_dup.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_dup.c' object='src/mpi/datatype/lib_libmpi_la-type_dup.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_dup.lo `test -f 'src/mpi/datatype/type_dup.c' || echo '$(srcdir)/'`src/mpi/datatype/type_dup.c + +src/mpi/datatype/lib_libmpi_la-type_get_envelope.lo: src/mpi/datatype/type_get_envelope.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_get_envelope.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_envelope.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_get_envelope.lo `test -f 'src/mpi/datatype/type_get_envelope.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_envelope.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_envelope.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_envelope.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_envelope.c' object='src/mpi/datatype/lib_libmpi_la-type_get_envelope.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_get_envelope.lo `test -f 'src/mpi/datatype/type_get_envelope.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_envelope.c + +src/mpi/datatype/lib_libmpi_la-type_get_contents.lo: src/mpi/datatype/type_get_contents.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_get_contents.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_contents.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_get_contents.lo `test -f 'src/mpi/datatype/type_get_contents.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_contents.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_contents.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_contents.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_contents.c' object='src/mpi/datatype/lib_libmpi_la-type_get_contents.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_get_contents.lo `test -f 'src/mpi/datatype/type_get_contents.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_contents.c + +src/mpi/datatype/lib_libmpi_la-type_ub.lo: src/mpi/datatype/type_ub.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_ub.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_ub.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_ub.lo `test -f 'src/mpi/datatype/type_ub.c' || echo '$(srcdir)/'`src/mpi/datatype/type_ub.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_ub.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_ub.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_ub.c' object='src/mpi/datatype/lib_libmpi_la-type_ub.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_ub.lo `test -f 'src/mpi/datatype/type_ub.c' || echo '$(srcdir)/'`src/mpi/datatype/type_ub.c + +src/mpi/datatype/lib_libmpi_la-type_lb.lo: src/mpi/datatype/type_lb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_lb.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_lb.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_lb.lo `test -f 'src/mpi/datatype/type_lb.c' || echo '$(srcdir)/'`src/mpi/datatype/type_lb.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_lb.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_lb.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_lb.c' object='src/mpi/datatype/lib_libmpi_la-type_lb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_lb.lo `test -f 'src/mpi/datatype/type_lb.c' || echo '$(srcdir)/'`src/mpi/datatype/type_lb.c + +src/mpi/datatype/lib_libmpi_la-type_get_extent.lo: src/mpi/datatype/type_get_extent.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_get_extent.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_get_extent.lo `test -f 'src/mpi/datatype/type_get_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_extent.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_extent.c' object='src/mpi/datatype/lib_libmpi_la-type_get_extent.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_get_extent.lo `test -f 'src/mpi/datatype/type_get_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_extent.c + +src/mpi/datatype/lib_libmpi_la-type_get_extent_x.lo: src/mpi/datatype/type_get_extent_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_get_extent_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent_x.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_get_extent_x.lo `test -f 'src/mpi/datatype/type_get_extent_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_extent_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_extent_x.c' object='src/mpi/datatype/lib_libmpi_la-type_get_extent_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_get_extent_x.lo `test -f 'src/mpi/datatype/type_get_extent_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_extent_x.c + +src/mpi/datatype/lib_libmpi_la-type_get_true_extent.lo: src/mpi/datatype/type_get_true_extent.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_get_true_extent.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_get_true_extent.lo `test -f 'src/mpi/datatype/type_get_true_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_true_extent.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_true_extent.c' object='src/mpi/datatype/lib_libmpi_la-type_get_true_extent.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_get_true_extent.lo `test -f 'src/mpi/datatype/type_get_true_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_true_extent.c + +src/mpi/datatype/lib_libmpi_la-type_get_true_extent_x.lo: src/mpi/datatype/type_get_true_extent_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_get_true_extent_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent_x.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_get_true_extent_x.lo `test -f 'src/mpi/datatype/type_get_true_extent_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_true_extent_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_true_extent_x.c' object='src/mpi/datatype/lib_libmpi_la-type_get_true_extent_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_get_true_extent_x.lo `test -f 'src/mpi/datatype/type_get_true_extent_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_true_extent_x.c + +src/mpi/datatype/lib_libmpi_la-type_match_size.lo: src/mpi/datatype/type_match_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_match_size.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_match_size.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_match_size.lo `test -f 'src/mpi/datatype/type_match_size.c' || echo '$(srcdir)/'`src/mpi/datatype/type_match_size.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_match_size.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_match_size.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_match_size.c' object='src/mpi/datatype/lib_libmpi_la-type_match_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_match_size.lo `test -f 'src/mpi/datatype/type_match_size.c' || echo '$(srcdir)/'`src/mpi/datatype/type_match_size.c + +src/mpi/datatype/lib_libmpi_la-type_create_struct.lo: src/mpi/datatype/type_create_struct.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_struct.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_struct.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_struct.lo `test -f 'src/mpi/datatype/type_create_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_struct.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_struct.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_struct.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_struct.c' object='src/mpi/datatype/lib_libmpi_la-type_create_struct.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_struct.lo `test -f 'src/mpi/datatype/type_create_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_struct.c + +src/mpi/datatype/lib_libmpi_la-type_create_hindexed.lo: src/mpi/datatype/type_create_hindexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_hindexed.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_hindexed.lo `test -f 'src/mpi/datatype/type_create_hindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hindexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_hindexed.c' object='src/mpi/datatype/lib_libmpi_la-type_create_hindexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_hindexed.lo `test -f 'src/mpi/datatype/type_create_hindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hindexed.c + +src/mpi/datatype/lib_libmpi_la-type_create_hvector.lo: src/mpi/datatype/type_create_hvector.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_hvector.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hvector.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_hvector.lo `test -f 'src/mpi/datatype/type_create_hvector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hvector.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hvector.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hvector.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_hvector.c' object='src/mpi/datatype/lib_libmpi_la-type_create_hvector.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_hvector.lo `test -f 'src/mpi/datatype/type_create_hvector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hvector.c + +src/mpi/datatype/lib_libmpi_la-type_create_indexed_block.lo: src/mpi/datatype/type_create_indexed_block.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_indexed_block.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_indexed_block.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_indexed_block.lo `test -f 'src/mpi/datatype/type_create_indexed_block.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_indexed_block.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_indexed_block.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_indexed_block.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_indexed_block.c' object='src/mpi/datatype/lib_libmpi_la-type_create_indexed_block.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_indexed_block.lo `test -f 'src/mpi/datatype/type_create_indexed_block.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_indexed_block.c + +src/mpi/datatype/lib_libmpi_la-type_create_hindexed_block.lo: src/mpi/datatype/type_create_hindexed_block.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_hindexed_block.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed_block.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_hindexed_block.lo `test -f 'src/mpi/datatype/type_create_hindexed_block.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hindexed_block.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed_block.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed_block.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_hindexed_block.c' object='src/mpi/datatype/lib_libmpi_la-type_create_hindexed_block.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_hindexed_block.lo `test -f 'src/mpi/datatype/type_create_hindexed_block.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hindexed_block.c + +src/mpi/datatype/lib_libmpi_la-type_create_resized.lo: src/mpi/datatype/type_create_resized.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_resized.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_resized.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_resized.lo `test -f 'src/mpi/datatype/type_create_resized.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_resized.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_resized.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_resized.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_resized.c' object='src/mpi/datatype/lib_libmpi_la-type_create_resized.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_resized.lo `test -f 'src/mpi/datatype/type_create_resized.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_resized.c + +src/mpi/datatype/lib_libmpi_la-type_create_darray.lo: src/mpi/datatype/type_create_darray.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_darray.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_darray.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_darray.lo `test -f 'src/mpi/datatype/type_create_darray.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_darray.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_darray.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_darray.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_darray.c' object='src/mpi/datatype/lib_libmpi_la-type_create_darray.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_darray.lo `test -f 'src/mpi/datatype/type_create_darray.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_darray.c + +src/mpi/datatype/lib_libmpi_la-type_create_subarray.lo: src/mpi/datatype/type_create_subarray.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_subarray.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_subarray.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_subarray.lo `test -f 'src/mpi/datatype/type_create_subarray.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_subarray.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_subarray.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_subarray.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_subarray.c' object='src/mpi/datatype/lib_libmpi_la-type_create_subarray.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_subarray.lo `test -f 'src/mpi/datatype/type_create_subarray.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_subarray.c + +src/mpi/datatype/lib_libmpi_la-unpack.lo: src/mpi/datatype/unpack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-unpack.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack.Tpo -c -o src/mpi/datatype/lib_libmpi_la-unpack.lo `test -f 'src/mpi/datatype/unpack.c' || echo '$(srcdir)/'`src/mpi/datatype/unpack.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack.Plo +# $(AM_V_CC)source='src/mpi/datatype/unpack.c' object='src/mpi/datatype/lib_libmpi_la-unpack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-unpack.lo `test -f 'src/mpi/datatype/unpack.c' || echo '$(srcdir)/'`src/mpi/datatype/unpack.c + +src/mpi/datatype/lib_libmpi_la-unpack_external.lo: src/mpi/datatype/unpack_external.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-unpack_external.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack_external.Tpo -c -o src/mpi/datatype/lib_libmpi_la-unpack_external.lo `test -f 'src/mpi/datatype/unpack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/unpack_external.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack_external.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack_external.Plo +# $(AM_V_CC)source='src/mpi/datatype/unpack_external.c' object='src/mpi/datatype/lib_libmpi_la-unpack_external.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-unpack_external.lo `test -f 'src/mpi/datatype/unpack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/unpack_external.c + +src/mpi/errhan/lib_libmpi_la-add_error_code.lo: src/mpi/errhan/add_error_code.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-add_error_code.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_code.Tpo -c -o src/mpi/errhan/lib_libmpi_la-add_error_code.lo `test -f 'src/mpi/errhan/add_error_code.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_code.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_code.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_code.Plo +# $(AM_V_CC)source='src/mpi/errhan/add_error_code.c' object='src/mpi/errhan/lib_libmpi_la-add_error_code.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-add_error_code.lo `test -f 'src/mpi/errhan/add_error_code.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_code.c + +src/mpi/errhan/lib_libmpi_la-add_error_class.lo: src/mpi/errhan/add_error_class.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-add_error_class.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_class.Tpo -c -o src/mpi/errhan/lib_libmpi_la-add_error_class.lo `test -f 'src/mpi/errhan/add_error_class.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_class.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_class.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_class.Plo +# $(AM_V_CC)source='src/mpi/errhan/add_error_class.c' object='src/mpi/errhan/lib_libmpi_la-add_error_class.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-add_error_class.lo `test -f 'src/mpi/errhan/add_error_class.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_class.c + +src/mpi/errhan/lib_libmpi_la-add_error_string.lo: src/mpi/errhan/add_error_string.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-add_error_string.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_string.Tpo -c -o src/mpi/errhan/lib_libmpi_la-add_error_string.lo `test -f 'src/mpi/errhan/add_error_string.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_string.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_string.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_string.Plo +# $(AM_V_CC)source='src/mpi/errhan/add_error_string.c' object='src/mpi/errhan/lib_libmpi_la-add_error_string.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-add_error_string.lo `test -f 'src/mpi/errhan/add_error_string.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_string.c + +src/mpi/errhan/lib_libmpi_la-comm_call_errhandler.lo: src/mpi/errhan/comm_call_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-comm_call_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_call_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-comm_call_errhandler.lo `test -f 'src/mpi/errhan/comm_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_call_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_call_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_call_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/comm_call_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-comm_call_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-comm_call_errhandler.lo `test -f 'src/mpi/errhan/comm_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_call_errhandler.c + +src/mpi/errhan/lib_libmpi_la-comm_create_errhandler.lo: src/mpi/errhan/comm_create_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-comm_create_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_create_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-comm_create_errhandler.lo `test -f 'src/mpi/errhan/comm_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_create_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_create_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_create_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/comm_create_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-comm_create_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-comm_create_errhandler.lo `test -f 'src/mpi/errhan/comm_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_create_errhandler.c + +src/mpi/errhan/lib_libmpi_la-comm_get_errhandler.lo: src/mpi/errhan/comm_get_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-comm_get_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_get_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-comm_get_errhandler.lo `test -f 'src/mpi/errhan/comm_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_get_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_get_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_get_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/comm_get_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-comm_get_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-comm_get_errhandler.lo `test -f 'src/mpi/errhan/comm_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_get_errhandler.c + +src/mpi/errhan/lib_libmpi_la-comm_set_errhandler.lo: src/mpi/errhan/comm_set_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-comm_set_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_set_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-comm_set_errhandler.lo `test -f 'src/mpi/errhan/comm_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_set_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_set_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_set_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/comm_set_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-comm_set_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-comm_set_errhandler.lo `test -f 'src/mpi/errhan/comm_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_set_errhandler.c + +src/mpi/errhan/lib_libmpi_la-errhandler_create.lo: src/mpi/errhan/errhandler_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-errhandler_create.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_create.Tpo -c -o src/mpi/errhan/lib_libmpi_la-errhandler_create.lo `test -f 'src/mpi/errhan/errhandler_create.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_create.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_create.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_create.Plo +# $(AM_V_CC)source='src/mpi/errhan/errhandler_create.c' object='src/mpi/errhan/lib_libmpi_la-errhandler_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-errhandler_create.lo `test -f 'src/mpi/errhan/errhandler_create.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_create.c + +src/mpi/errhan/lib_libmpi_la-errhandler_free.lo: src/mpi/errhan/errhandler_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-errhandler_free.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_free.Tpo -c -o src/mpi/errhan/lib_libmpi_la-errhandler_free.lo `test -f 'src/mpi/errhan/errhandler_free.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_free.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_free.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_free.Plo +# $(AM_V_CC)source='src/mpi/errhan/errhandler_free.c' object='src/mpi/errhan/lib_libmpi_la-errhandler_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-errhandler_free.lo `test -f 'src/mpi/errhan/errhandler_free.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_free.c + +src/mpi/errhan/lib_libmpi_la-errhandler_get.lo: src/mpi/errhan/errhandler_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-errhandler_get.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_get.Tpo -c -o src/mpi/errhan/lib_libmpi_la-errhandler_get.lo `test -f 'src/mpi/errhan/errhandler_get.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_get.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_get.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_get.Plo +# $(AM_V_CC)source='src/mpi/errhan/errhandler_get.c' object='src/mpi/errhan/lib_libmpi_la-errhandler_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-errhandler_get.lo `test -f 'src/mpi/errhan/errhandler_get.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_get.c + +src/mpi/errhan/lib_libmpi_la-errhandler_set.lo: src/mpi/errhan/errhandler_set.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-errhandler_set.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_set.Tpo -c -o src/mpi/errhan/lib_libmpi_la-errhandler_set.lo `test -f 'src/mpi/errhan/errhandler_set.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_set.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_set.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_set.Plo +# $(AM_V_CC)source='src/mpi/errhan/errhandler_set.c' object='src/mpi/errhan/lib_libmpi_la-errhandler_set.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-errhandler_set.lo `test -f 'src/mpi/errhan/errhandler_set.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_set.c + +src/mpi/errhan/lib_libmpi_la-error_class.lo: src/mpi/errhan/error_class.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-error_class.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_class.Tpo -c -o src/mpi/errhan/lib_libmpi_la-error_class.lo `test -f 'src/mpi/errhan/error_class.c' || echo '$(srcdir)/'`src/mpi/errhan/error_class.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_class.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_class.Plo +# $(AM_V_CC)source='src/mpi/errhan/error_class.c' object='src/mpi/errhan/lib_libmpi_la-error_class.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-error_class.lo `test -f 'src/mpi/errhan/error_class.c' || echo '$(srcdir)/'`src/mpi/errhan/error_class.c + +src/mpi/errhan/lib_libmpi_la-error_string.lo: src/mpi/errhan/error_string.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-error_string.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_string.Tpo -c -o src/mpi/errhan/lib_libmpi_la-error_string.lo `test -f 'src/mpi/errhan/error_string.c' || echo '$(srcdir)/'`src/mpi/errhan/error_string.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_string.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_string.Plo +# $(AM_V_CC)source='src/mpi/errhan/error_string.c' object='src/mpi/errhan/lib_libmpi_la-error_string.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-error_string.lo `test -f 'src/mpi/errhan/error_string.c' || echo '$(srcdir)/'`src/mpi/errhan/error_string.c + +src/mpi/errhan/lib_libmpi_la-file_create_errhandler.lo: src/mpi/errhan/file_create_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-file_create_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_create_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-file_create_errhandler.lo `test -f 'src/mpi/errhan/file_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_create_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_create_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_create_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/file_create_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-file_create_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-file_create_errhandler.lo `test -f 'src/mpi/errhan/file_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_create_errhandler.c + +src/mpi/errhan/lib_libmpi_la-file_get_errhandler.lo: src/mpi/errhan/file_get_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-file_get_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_get_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-file_get_errhandler.lo `test -f 'src/mpi/errhan/file_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_get_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_get_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_get_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/file_get_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-file_get_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-file_get_errhandler.lo `test -f 'src/mpi/errhan/file_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_get_errhandler.c + +src/mpi/errhan/lib_libmpi_la-file_set_errhandler.lo: src/mpi/errhan/file_set_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-file_set_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_set_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-file_set_errhandler.lo `test -f 'src/mpi/errhan/file_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_set_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_set_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_set_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/file_set_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-file_set_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-file_set_errhandler.lo `test -f 'src/mpi/errhan/file_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_set_errhandler.c + +src/mpi/errhan/lib_libmpi_la-file_call_errhandler.lo: src/mpi/errhan/file_call_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-file_call_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_call_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-file_call_errhandler.lo `test -f 'src/mpi/errhan/file_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_call_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_call_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_call_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/file_call_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-file_call_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-file_call_errhandler.lo `test -f 'src/mpi/errhan/file_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_call_errhandler.c + +src/mpi/errhan/lib_libmpi_la-win_create_errhandler.lo: src/mpi/errhan/win_create_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-win_create_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_create_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-win_create_errhandler.lo `test -f 'src/mpi/errhan/win_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_create_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_create_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_create_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/win_create_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-win_create_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-win_create_errhandler.lo `test -f 'src/mpi/errhan/win_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_create_errhandler.c + +src/mpi/errhan/lib_libmpi_la-win_call_errhandler.lo: src/mpi/errhan/win_call_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-win_call_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_call_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-win_call_errhandler.lo `test -f 'src/mpi/errhan/win_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_call_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_call_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_call_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/win_call_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-win_call_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-win_call_errhandler.lo `test -f 'src/mpi/errhan/win_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_call_errhandler.c + +src/mpi/errhan/lib_libmpi_la-win_get_errhandler.lo: src/mpi/errhan/win_get_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-win_get_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_get_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-win_get_errhandler.lo `test -f 'src/mpi/errhan/win_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_get_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_get_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_get_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/win_get_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-win_get_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-win_get_errhandler.lo `test -f 'src/mpi/errhan/win_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_get_errhandler.c + +src/mpi/errhan/lib_libmpi_la-win_set_errhandler.lo: src/mpi/errhan/win_set_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-win_set_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_set_errhandler.Tpo -c -o src/mpi/errhan/lib_libmpi_la-win_set_errhandler.lo `test -f 'src/mpi/errhan/win_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_set_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_set_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_set_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/win_set_errhandler.c' object='src/mpi/errhan/lib_libmpi_la-win_set_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-win_set_errhandler.lo `test -f 'src/mpi/errhan/win_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_set_errhandler.c + +src/mpi/group/lib_libmpi_la-group_compare.lo: src/mpi/group/group_compare.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_compare.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_compare.Tpo -c -o src/mpi/group/lib_libmpi_la-group_compare.lo `test -f 'src/mpi/group/group_compare.c' || echo '$(srcdir)/'`src/mpi/group/group_compare.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_compare.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_compare.Plo +# $(AM_V_CC)source='src/mpi/group/group_compare.c' object='src/mpi/group/lib_libmpi_la-group_compare.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_compare.lo `test -f 'src/mpi/group/group_compare.c' || echo '$(srcdir)/'`src/mpi/group/group_compare.c + +src/mpi/group/lib_libmpi_la-group_difference.lo: src/mpi/group/group_difference.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_difference.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_difference.Tpo -c -o src/mpi/group/lib_libmpi_la-group_difference.lo `test -f 'src/mpi/group/group_difference.c' || echo '$(srcdir)/'`src/mpi/group/group_difference.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_difference.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_difference.Plo +# $(AM_V_CC)source='src/mpi/group/group_difference.c' object='src/mpi/group/lib_libmpi_la-group_difference.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_difference.lo `test -f 'src/mpi/group/group_difference.c' || echo '$(srcdir)/'`src/mpi/group/group_difference.c + +src/mpi/group/lib_libmpi_la-group_excl.lo: src/mpi/group/group_excl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_excl.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_excl.Tpo -c -o src/mpi/group/lib_libmpi_la-group_excl.lo `test -f 'src/mpi/group/group_excl.c' || echo '$(srcdir)/'`src/mpi/group/group_excl.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_excl.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_excl.Plo +# $(AM_V_CC)source='src/mpi/group/group_excl.c' object='src/mpi/group/lib_libmpi_la-group_excl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_excl.lo `test -f 'src/mpi/group/group_excl.c' || echo '$(srcdir)/'`src/mpi/group/group_excl.c + +src/mpi/group/lib_libmpi_la-group_free.lo: src/mpi/group/group_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_free.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_free.Tpo -c -o src/mpi/group/lib_libmpi_la-group_free.lo `test -f 'src/mpi/group/group_free.c' || echo '$(srcdir)/'`src/mpi/group/group_free.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_free.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_free.Plo +# $(AM_V_CC)source='src/mpi/group/group_free.c' object='src/mpi/group/lib_libmpi_la-group_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_free.lo `test -f 'src/mpi/group/group_free.c' || echo '$(srcdir)/'`src/mpi/group/group_free.c + +src/mpi/group/lib_libmpi_la-group_incl.lo: src/mpi/group/group_incl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_incl.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_incl.Tpo -c -o src/mpi/group/lib_libmpi_la-group_incl.lo `test -f 'src/mpi/group/group_incl.c' || echo '$(srcdir)/'`src/mpi/group/group_incl.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_incl.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_incl.Plo +# $(AM_V_CC)source='src/mpi/group/group_incl.c' object='src/mpi/group/lib_libmpi_la-group_incl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_incl.lo `test -f 'src/mpi/group/group_incl.c' || echo '$(srcdir)/'`src/mpi/group/group_incl.c + +src/mpi/group/lib_libmpi_la-group_intersection.lo: src/mpi/group/group_intersection.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_intersection.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_intersection.Tpo -c -o src/mpi/group/lib_libmpi_la-group_intersection.lo `test -f 'src/mpi/group/group_intersection.c' || echo '$(srcdir)/'`src/mpi/group/group_intersection.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_intersection.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_intersection.Plo +# $(AM_V_CC)source='src/mpi/group/group_intersection.c' object='src/mpi/group/lib_libmpi_la-group_intersection.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_intersection.lo `test -f 'src/mpi/group/group_intersection.c' || echo '$(srcdir)/'`src/mpi/group/group_intersection.c + +src/mpi/group/lib_libmpi_la-group_range_excl.lo: src/mpi/group/group_range_excl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_range_excl.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_excl.Tpo -c -o src/mpi/group/lib_libmpi_la-group_range_excl.lo `test -f 'src/mpi/group/group_range_excl.c' || echo '$(srcdir)/'`src/mpi/group/group_range_excl.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_excl.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_excl.Plo +# $(AM_V_CC)source='src/mpi/group/group_range_excl.c' object='src/mpi/group/lib_libmpi_la-group_range_excl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_range_excl.lo `test -f 'src/mpi/group/group_range_excl.c' || echo '$(srcdir)/'`src/mpi/group/group_range_excl.c + +src/mpi/group/lib_libmpi_la-group_range_incl.lo: src/mpi/group/group_range_incl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_range_incl.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_incl.Tpo -c -o src/mpi/group/lib_libmpi_la-group_range_incl.lo `test -f 'src/mpi/group/group_range_incl.c' || echo '$(srcdir)/'`src/mpi/group/group_range_incl.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_incl.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_incl.Plo +# $(AM_V_CC)source='src/mpi/group/group_range_incl.c' object='src/mpi/group/lib_libmpi_la-group_range_incl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_range_incl.lo `test -f 'src/mpi/group/group_range_incl.c' || echo '$(srcdir)/'`src/mpi/group/group_range_incl.c + +src/mpi/group/lib_libmpi_la-group_rank.lo: src/mpi/group/group_rank.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_rank.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_rank.Tpo -c -o src/mpi/group/lib_libmpi_la-group_rank.lo `test -f 'src/mpi/group/group_rank.c' || echo '$(srcdir)/'`src/mpi/group/group_rank.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_rank.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_rank.Plo +# $(AM_V_CC)source='src/mpi/group/group_rank.c' object='src/mpi/group/lib_libmpi_la-group_rank.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_rank.lo `test -f 'src/mpi/group/group_rank.c' || echo '$(srcdir)/'`src/mpi/group/group_rank.c + +src/mpi/group/lib_libmpi_la-group_size.lo: src/mpi/group/group_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_size.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_size.Tpo -c -o src/mpi/group/lib_libmpi_la-group_size.lo `test -f 'src/mpi/group/group_size.c' || echo '$(srcdir)/'`src/mpi/group/group_size.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_size.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_size.Plo +# $(AM_V_CC)source='src/mpi/group/group_size.c' object='src/mpi/group/lib_libmpi_la-group_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_size.lo `test -f 'src/mpi/group/group_size.c' || echo '$(srcdir)/'`src/mpi/group/group_size.c + +src/mpi/group/lib_libmpi_la-group_translate_ranks.lo: src/mpi/group/group_translate_ranks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_translate_ranks.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_translate_ranks.Tpo -c -o src/mpi/group/lib_libmpi_la-group_translate_ranks.lo `test -f 'src/mpi/group/group_translate_ranks.c' || echo '$(srcdir)/'`src/mpi/group/group_translate_ranks.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_translate_ranks.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_translate_ranks.Plo +# $(AM_V_CC)source='src/mpi/group/group_translate_ranks.c' object='src/mpi/group/lib_libmpi_la-group_translate_ranks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_translate_ranks.lo `test -f 'src/mpi/group/group_translate_ranks.c' || echo '$(srcdir)/'`src/mpi/group/group_translate_ranks.c + +src/mpi/group/lib_libmpi_la-group_union.lo: src/mpi/group/group_union.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-group_union.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_union.Tpo -c -o src/mpi/group/lib_libmpi_la-group_union.lo `test -f 'src/mpi/group/group_union.c' || echo '$(srcdir)/'`src/mpi/group/group_union.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_union.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_union.Plo +# $(AM_V_CC)source='src/mpi/group/group_union.c' object='src/mpi/group/lib_libmpi_la-group_union.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-group_union.lo `test -f 'src/mpi/group/group_union.c' || echo '$(srcdir)/'`src/mpi/group/group_union.c + +src/mpi/info/lib_libmpi_la-info_create.lo: src/mpi/info/info_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_create.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_create.Tpo -c -o src/mpi/info/lib_libmpi_la-info_create.lo `test -f 'src/mpi/info/info_create.c' || echo '$(srcdir)/'`src/mpi/info/info_create.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_create.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_create.Plo +# $(AM_V_CC)source='src/mpi/info/info_create.c' object='src/mpi/info/lib_libmpi_la-info_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_create.lo `test -f 'src/mpi/info/info_create.c' || echo '$(srcdir)/'`src/mpi/info/info_create.c + +src/mpi/info/lib_libmpi_la-info_delete.lo: src/mpi/info/info_delete.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_delete.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_delete.Tpo -c -o src/mpi/info/lib_libmpi_la-info_delete.lo `test -f 'src/mpi/info/info_delete.c' || echo '$(srcdir)/'`src/mpi/info/info_delete.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_delete.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_delete.Plo +# $(AM_V_CC)source='src/mpi/info/info_delete.c' object='src/mpi/info/lib_libmpi_la-info_delete.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_delete.lo `test -f 'src/mpi/info/info_delete.c' || echo '$(srcdir)/'`src/mpi/info/info_delete.c + +src/mpi/info/lib_libmpi_la-info_dup.lo: src/mpi/info/info_dup.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_dup.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_dup.Tpo -c -o src/mpi/info/lib_libmpi_la-info_dup.lo `test -f 'src/mpi/info/info_dup.c' || echo '$(srcdir)/'`src/mpi/info/info_dup.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_dup.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_dup.Plo +# $(AM_V_CC)source='src/mpi/info/info_dup.c' object='src/mpi/info/lib_libmpi_la-info_dup.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_dup.lo `test -f 'src/mpi/info/info_dup.c' || echo '$(srcdir)/'`src/mpi/info/info_dup.c + +src/mpi/info/lib_libmpi_la-info_free.lo: src/mpi/info/info_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_free.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_free.Tpo -c -o src/mpi/info/lib_libmpi_la-info_free.lo `test -f 'src/mpi/info/info_free.c' || echo '$(srcdir)/'`src/mpi/info/info_free.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_free.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_free.Plo +# $(AM_V_CC)source='src/mpi/info/info_free.c' object='src/mpi/info/lib_libmpi_la-info_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_free.lo `test -f 'src/mpi/info/info_free.c' || echo '$(srcdir)/'`src/mpi/info/info_free.c + +src/mpi/info/lib_libmpi_la-info_get.lo: src/mpi/info/info_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_get.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_get.Tpo -c -o src/mpi/info/lib_libmpi_la-info_get.lo `test -f 'src/mpi/info/info_get.c' || echo '$(srcdir)/'`src/mpi/info/info_get.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_get.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_get.Plo +# $(AM_V_CC)source='src/mpi/info/info_get.c' object='src/mpi/info/lib_libmpi_la-info_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_get.lo `test -f 'src/mpi/info/info_get.c' || echo '$(srcdir)/'`src/mpi/info/info_get.c + +src/mpi/info/lib_libmpi_la-info_getn.lo: src/mpi/info/info_getn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_getn.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getn.Tpo -c -o src/mpi/info/lib_libmpi_la-info_getn.lo `test -f 'src/mpi/info/info_getn.c' || echo '$(srcdir)/'`src/mpi/info/info_getn.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getn.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getn.Plo +# $(AM_V_CC)source='src/mpi/info/info_getn.c' object='src/mpi/info/lib_libmpi_la-info_getn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_getn.lo `test -f 'src/mpi/info/info_getn.c' || echo '$(srcdir)/'`src/mpi/info/info_getn.c + +src/mpi/info/lib_libmpi_la-info_getnth.lo: src/mpi/info/info_getnth.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_getnth.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getnth.Tpo -c -o src/mpi/info/lib_libmpi_la-info_getnth.lo `test -f 'src/mpi/info/info_getnth.c' || echo '$(srcdir)/'`src/mpi/info/info_getnth.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getnth.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getnth.Plo +# $(AM_V_CC)source='src/mpi/info/info_getnth.c' object='src/mpi/info/lib_libmpi_la-info_getnth.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_getnth.lo `test -f 'src/mpi/info/info_getnth.c' || echo '$(srcdir)/'`src/mpi/info/info_getnth.c + +src/mpi/info/lib_libmpi_la-info_getvallen.lo: src/mpi/info/info_getvallen.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_getvallen.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getvallen.Tpo -c -o src/mpi/info/lib_libmpi_la-info_getvallen.lo `test -f 'src/mpi/info/info_getvallen.c' || echo '$(srcdir)/'`src/mpi/info/info_getvallen.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getvallen.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getvallen.Plo +# $(AM_V_CC)source='src/mpi/info/info_getvallen.c' object='src/mpi/info/lib_libmpi_la-info_getvallen.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_getvallen.lo `test -f 'src/mpi/info/info_getvallen.c' || echo '$(srcdir)/'`src/mpi/info/info_getvallen.c + +src/mpi/info/lib_libmpi_la-info_set.lo: src/mpi/info/info_set.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-info_set.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_set.Tpo -c -o src/mpi/info/lib_libmpi_la-info_set.lo `test -f 'src/mpi/info/info_set.c' || echo '$(srcdir)/'`src/mpi/info/info_set.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_set.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_set.Plo +# $(AM_V_CC)source='src/mpi/info/info_set.c' object='src/mpi/info/lib_libmpi_la-info_set.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-info_set.lo `test -f 'src/mpi/info/info_set.c' || echo '$(srcdir)/'`src/mpi/info/info_set.c + +src/mpi/init/lib_libmpi_la-abort.lo: src/mpi/init/abort.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-abort.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-abort.Tpo -c -o src/mpi/init/lib_libmpi_la-abort.lo `test -f 'src/mpi/init/abort.c' || echo '$(srcdir)/'`src/mpi/init/abort.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-abort.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-abort.Plo +# $(AM_V_CC)source='src/mpi/init/abort.c' object='src/mpi/init/lib_libmpi_la-abort.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-abort.lo `test -f 'src/mpi/init/abort.c' || echo '$(srcdir)/'`src/mpi/init/abort.c + +src/mpi/init/lib_libmpi_la-init.lo: src/mpi/init/init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-init.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-init.Tpo -c -o src/mpi/init/lib_libmpi_la-init.lo `test -f 'src/mpi/init/init.c' || echo '$(srcdir)/'`src/mpi/init/init.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-init.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-init.Plo +# $(AM_V_CC)source='src/mpi/init/init.c' object='src/mpi/init/lib_libmpi_la-init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-init.lo `test -f 'src/mpi/init/init.c' || echo '$(srcdir)/'`src/mpi/init/init.c + +src/mpi/init/lib_libmpi_la-initialized.lo: src/mpi/init/initialized.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-initialized.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-initialized.Tpo -c -o src/mpi/init/lib_libmpi_la-initialized.lo `test -f 'src/mpi/init/initialized.c' || echo '$(srcdir)/'`src/mpi/init/initialized.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-initialized.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-initialized.Plo +# $(AM_V_CC)source='src/mpi/init/initialized.c' object='src/mpi/init/lib_libmpi_la-initialized.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-initialized.lo `test -f 'src/mpi/init/initialized.c' || echo '$(srcdir)/'`src/mpi/init/initialized.c + +src/mpi/init/lib_libmpi_la-initthread.lo: src/mpi/init/initthread.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-initthread.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-initthread.Tpo -c -o src/mpi/init/lib_libmpi_la-initthread.lo `test -f 'src/mpi/init/initthread.c' || echo '$(srcdir)/'`src/mpi/init/initthread.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-initthread.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-initthread.Plo +# $(AM_V_CC)source='src/mpi/init/initthread.c' object='src/mpi/init/lib_libmpi_la-initthread.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-initthread.lo `test -f 'src/mpi/init/initthread.c' || echo '$(srcdir)/'`src/mpi/init/initthread.c + +src/mpi/init/lib_libmpi_la-ismain.lo: src/mpi/init/ismain.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-ismain.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-ismain.Tpo -c -o src/mpi/init/lib_libmpi_la-ismain.lo `test -f 'src/mpi/init/ismain.c' || echo '$(srcdir)/'`src/mpi/init/ismain.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-ismain.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-ismain.Plo +# $(AM_V_CC)source='src/mpi/init/ismain.c' object='src/mpi/init/lib_libmpi_la-ismain.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-ismain.lo `test -f 'src/mpi/init/ismain.c' || echo '$(srcdir)/'`src/mpi/init/ismain.c + +src/mpi/init/lib_libmpi_la-finalize.lo: src/mpi/init/finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-finalize.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalize.Tpo -c -o src/mpi/init/lib_libmpi_la-finalize.lo `test -f 'src/mpi/init/finalize.c' || echo '$(srcdir)/'`src/mpi/init/finalize.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalize.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalize.Plo +# $(AM_V_CC)source='src/mpi/init/finalize.c' object='src/mpi/init/lib_libmpi_la-finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-finalize.lo `test -f 'src/mpi/init/finalize.c' || echo '$(srcdir)/'`src/mpi/init/finalize.c + +src/mpi/init/lib_libmpi_la-finalized.lo: src/mpi/init/finalized.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-finalized.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalized.Tpo -c -o src/mpi/init/lib_libmpi_la-finalized.lo `test -f 'src/mpi/init/finalized.c' || echo '$(srcdir)/'`src/mpi/init/finalized.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalized.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalized.Plo +# $(AM_V_CC)source='src/mpi/init/finalized.c' object='src/mpi/init/lib_libmpi_la-finalized.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-finalized.lo `test -f 'src/mpi/init/finalized.c' || echo '$(srcdir)/'`src/mpi/init/finalized.c + +src/mpi/init/lib_libmpi_la-querythread.lo: src/mpi/init/querythread.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-querythread.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-querythread.Tpo -c -o src/mpi/init/lib_libmpi_la-querythread.lo `test -f 'src/mpi/init/querythread.c' || echo '$(srcdir)/'`src/mpi/init/querythread.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-querythread.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-querythread.Plo +# $(AM_V_CC)source='src/mpi/init/querythread.c' object='src/mpi/init/lib_libmpi_la-querythread.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-querythread.lo `test -f 'src/mpi/init/querythread.c' || echo '$(srcdir)/'`src/mpi/init/querythread.c + +src/mpi/misc/lib_libmpi_la-getpname.lo: src/mpi/misc/getpname.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libmpi_la-getpname.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libmpi_la-getpname.Tpo -c -o src/mpi/misc/lib_libmpi_la-getpname.lo `test -f 'src/mpi/misc/getpname.c' || echo '$(srcdir)/'`src/mpi/misc/getpname.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libmpi_la-getpname.Tpo src/mpi/misc/$(DEPDIR)/lib_libmpi_la-getpname.Plo +# $(AM_V_CC)source='src/mpi/misc/getpname.c' object='src/mpi/misc/lib_libmpi_la-getpname.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libmpi_la-getpname.lo `test -f 'src/mpi/misc/getpname.c' || echo '$(srcdir)/'`src/mpi/misc/getpname.c + +src/mpi/misc/lib_libmpi_la-pcontrol.lo: src/mpi/misc/pcontrol.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libmpi_la-pcontrol.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libmpi_la-pcontrol.Tpo -c -o src/mpi/misc/lib_libmpi_la-pcontrol.lo `test -f 'src/mpi/misc/pcontrol.c' || echo '$(srcdir)/'`src/mpi/misc/pcontrol.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libmpi_la-pcontrol.Tpo src/mpi/misc/$(DEPDIR)/lib_libmpi_la-pcontrol.Plo +# $(AM_V_CC)source='src/mpi/misc/pcontrol.c' object='src/mpi/misc/lib_libmpi_la-pcontrol.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libmpi_la-pcontrol.lo `test -f 'src/mpi/misc/pcontrol.c' || echo '$(srcdir)/'`src/mpi/misc/pcontrol.c + +src/mpi/misc/lib_libmpi_la-version.lo: src/mpi/misc/version.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libmpi_la-version.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libmpi_la-version.Tpo -c -o src/mpi/misc/lib_libmpi_la-version.lo `test -f 'src/mpi/misc/version.c' || echo '$(srcdir)/'`src/mpi/misc/version.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libmpi_la-version.Tpo src/mpi/misc/$(DEPDIR)/lib_libmpi_la-version.Plo +# $(AM_V_CC)source='src/mpi/misc/version.c' object='src/mpi/misc/lib_libmpi_la-version.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libmpi_la-version.lo `test -f 'src/mpi/misc/version.c' || echo '$(srcdir)/'`src/mpi/misc/version.c + +src/mpi/misc/lib_libmpi_la-library_version.lo: src/mpi/misc/library_version.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libmpi_la-library_version.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libmpi_la-library_version.Tpo -c -o src/mpi/misc/lib_libmpi_la-library_version.lo `test -f 'src/mpi/misc/library_version.c' || echo '$(srcdir)/'`src/mpi/misc/library_version.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libmpi_la-library_version.Tpo src/mpi/misc/$(DEPDIR)/lib_libmpi_la-library_version.Plo +# $(AM_V_CC)source='src/mpi/misc/library_version.c' object='src/mpi/misc/lib_libmpi_la-library_version.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libmpi_la-library_version.lo `test -f 'src/mpi/misc/library_version.c' || echo '$(srcdir)/'`src/mpi/misc/library_version.c + +src/mpi/misc/lib_libmpi_la-aint_add.lo: src/mpi/misc/aint_add.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libmpi_la-aint_add.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_add.Tpo -c -o src/mpi/misc/lib_libmpi_la-aint_add.lo `test -f 'src/mpi/misc/aint_add.c' || echo '$(srcdir)/'`src/mpi/misc/aint_add.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_add.Tpo src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_add.Plo +# $(AM_V_CC)source='src/mpi/misc/aint_add.c' object='src/mpi/misc/lib_libmpi_la-aint_add.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libmpi_la-aint_add.lo `test -f 'src/mpi/misc/aint_add.c' || echo '$(srcdir)/'`src/mpi/misc/aint_add.c + +src/mpi/misc/lib_libmpi_la-aint_diff.lo: src/mpi/misc/aint_diff.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libmpi_la-aint_diff.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_diff.Tpo -c -o src/mpi/misc/lib_libmpi_la-aint_diff.lo `test -f 'src/mpi/misc/aint_diff.c' || echo '$(srcdir)/'`src/mpi/misc/aint_diff.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_diff.Tpo src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_diff.Plo +# $(AM_V_CC)source='src/mpi/misc/aint_diff.c' object='src/mpi/misc/lib_libmpi_la-aint_diff.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libmpi_la-aint_diff.lo `test -f 'src/mpi/misc/aint_diff.c' || echo '$(srcdir)/'`src/mpi/misc/aint_diff.c + +src/mpi/misc/lib_libmpi_la-utils.lo: src/mpi/misc/utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libmpi_la-utils.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libmpi_la-utils.Tpo -c -o src/mpi/misc/lib_libmpi_la-utils.lo `test -f 'src/mpi/misc/utils.c' || echo '$(srcdir)/'`src/mpi/misc/utils.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libmpi_la-utils.Tpo src/mpi/misc/$(DEPDIR)/lib_libmpi_la-utils.Plo +# $(AM_V_CC)source='src/mpi/misc/utils.c' object='src/mpi/misc/lib_libmpi_la-utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libmpi_la-utils.lo `test -f 'src/mpi/misc/utils.c' || echo '$(srcdir)/'`src/mpi/misc/utils.c + +src/mpi/pt2pt/lib_libmpi_la-bsend.lo: src/mpi/pt2pt/bsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-bsend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-bsend.lo `test -f 'src/mpi/pt2pt/bsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/bsend.c' object='src/mpi/pt2pt/lib_libmpi_la-bsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-bsend.lo `test -f 'src/mpi/pt2pt/bsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsend.c + +src/mpi/pt2pt/lib_libmpi_la-bsend_init.lo: src/mpi/pt2pt/bsend_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-bsend_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend_init.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-bsend_init.lo `test -f 'src/mpi/pt2pt/bsend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsend_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/bsend_init.c' object='src/mpi/pt2pt/lib_libmpi_la-bsend_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-bsend_init.lo `test -f 'src/mpi/pt2pt/bsend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsend_init.c + +src/mpi/pt2pt/lib_libmpi_la-bufattach.lo: src/mpi/pt2pt/bufattach.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-bufattach.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bufattach.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-bufattach.lo `test -f 'src/mpi/pt2pt/bufattach.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bufattach.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bufattach.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bufattach.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/bufattach.c' object='src/mpi/pt2pt/lib_libmpi_la-bufattach.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-bufattach.lo `test -f 'src/mpi/pt2pt/bufattach.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bufattach.c + +src/mpi/pt2pt/lib_libmpi_la-buffree.lo: src/mpi/pt2pt/buffree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-buffree.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-buffree.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-buffree.lo `test -f 'src/mpi/pt2pt/buffree.c' || echo '$(srcdir)/'`src/mpi/pt2pt/buffree.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-buffree.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-buffree.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/buffree.c' object='src/mpi/pt2pt/lib_libmpi_la-buffree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-buffree.lo `test -f 'src/mpi/pt2pt/buffree.c' || echo '$(srcdir)/'`src/mpi/pt2pt/buffree.c + +src/mpi/pt2pt/lib_libmpi_la-ibsend.lo: src/mpi/pt2pt/ibsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-ibsend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ibsend.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-ibsend.lo `test -f 'src/mpi/pt2pt/ibsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ibsend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ibsend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ibsend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/ibsend.c' object='src/mpi/pt2pt/lib_libmpi_la-ibsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-ibsend.lo `test -f 'src/mpi/pt2pt/ibsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ibsend.c + +src/mpi/pt2pt/lib_libmpi_la-improbe.lo: src/mpi/pt2pt/improbe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-improbe.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-improbe.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-improbe.lo `test -f 'src/mpi/pt2pt/improbe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/improbe.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-improbe.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-improbe.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/improbe.c' object='src/mpi/pt2pt/lib_libmpi_la-improbe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-improbe.lo `test -f 'src/mpi/pt2pt/improbe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/improbe.c + +src/mpi/pt2pt/lib_libmpi_la-imrecv.lo: src/mpi/pt2pt/imrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-imrecv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-imrecv.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-imrecv.lo `test -f 'src/mpi/pt2pt/imrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/imrecv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-imrecv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-imrecv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/imrecv.c' object='src/mpi/pt2pt/lib_libmpi_la-imrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-imrecv.lo `test -f 'src/mpi/pt2pt/imrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/imrecv.c + +src/mpi/pt2pt/lib_libmpi_la-iprobe.lo: src/mpi/pt2pt/iprobe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-iprobe.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-iprobe.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-iprobe.lo `test -f 'src/mpi/pt2pt/iprobe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/iprobe.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-iprobe.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-iprobe.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/iprobe.c' object='src/mpi/pt2pt/lib_libmpi_la-iprobe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-iprobe.lo `test -f 'src/mpi/pt2pt/iprobe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/iprobe.c + +src/mpi/pt2pt/lib_libmpi_la-irecv.lo: src/mpi/pt2pt/irecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-irecv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irecv.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-irecv.lo `test -f 'src/mpi/pt2pt/irecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/irecv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irecv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irecv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/irecv.c' object='src/mpi/pt2pt/lib_libmpi_la-irecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-irecv.lo `test -f 'src/mpi/pt2pt/irecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/irecv.c + +src/mpi/pt2pt/lib_libmpi_la-irsend.lo: src/mpi/pt2pt/irsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-irsend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irsend.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-irsend.lo `test -f 'src/mpi/pt2pt/irsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/irsend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irsend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irsend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/irsend.c' object='src/mpi/pt2pt/lib_libmpi_la-irsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-irsend.lo `test -f 'src/mpi/pt2pt/irsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/irsend.c + +src/mpi/pt2pt/lib_libmpi_la-isend.lo: src/mpi/pt2pt/isend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-isend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-isend.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-isend.lo `test -f 'src/mpi/pt2pt/isend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/isend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-isend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-isend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/isend.c' object='src/mpi/pt2pt/lib_libmpi_la-isend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-isend.lo `test -f 'src/mpi/pt2pt/isend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/isend.c + +src/mpi/pt2pt/lib_libmpi_la-issend.lo: src/mpi/pt2pt/issend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-issend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-issend.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-issend.lo `test -f 'src/mpi/pt2pt/issend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/issend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-issend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-issend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/issend.c' object='src/mpi/pt2pt/lib_libmpi_la-issend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-issend.lo `test -f 'src/mpi/pt2pt/issend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/issend.c + +src/mpi/pt2pt/lib_libmpi_la-mprobe.lo: src/mpi/pt2pt/mprobe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-mprobe.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mprobe.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-mprobe.lo `test -f 'src/mpi/pt2pt/mprobe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/mprobe.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mprobe.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mprobe.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/mprobe.c' object='src/mpi/pt2pt/lib_libmpi_la-mprobe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-mprobe.lo `test -f 'src/mpi/pt2pt/mprobe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/mprobe.c + +src/mpi/pt2pt/lib_libmpi_la-mrecv.lo: src/mpi/pt2pt/mrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-mrecv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mrecv.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-mrecv.lo `test -f 'src/mpi/pt2pt/mrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/mrecv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mrecv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mrecv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/mrecv.c' object='src/mpi/pt2pt/lib_libmpi_la-mrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-mrecv.lo `test -f 'src/mpi/pt2pt/mrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/mrecv.c + +src/mpi/pt2pt/lib_libmpi_la-probe.lo: src/mpi/pt2pt/probe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-probe.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-probe.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-probe.lo `test -f 'src/mpi/pt2pt/probe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/probe.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-probe.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-probe.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/probe.c' object='src/mpi/pt2pt/lib_libmpi_la-probe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-probe.lo `test -f 'src/mpi/pt2pt/probe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/probe.c + +src/mpi/pt2pt/lib_libmpi_la-recv.lo: src/mpi/pt2pt/recv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-recv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-recv.lo `test -f 'src/mpi/pt2pt/recv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/recv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/recv.c' object='src/mpi/pt2pt/lib_libmpi_la-recv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-recv.lo `test -f 'src/mpi/pt2pt/recv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/recv.c + +src/mpi/pt2pt/lib_libmpi_la-recv_init.lo: src/mpi/pt2pt/recv_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-recv_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv_init.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-recv_init.lo `test -f 'src/mpi/pt2pt/recv_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/recv_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/recv_init.c' object='src/mpi/pt2pt/lib_libmpi_la-recv_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-recv_init.lo `test -f 'src/mpi/pt2pt/recv_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/recv_init.c + +src/mpi/pt2pt/lib_libmpi_la-rsend.lo: src/mpi/pt2pt/rsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-rsend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-rsend.lo `test -f 'src/mpi/pt2pt/rsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/rsend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/rsend.c' object='src/mpi/pt2pt/lib_libmpi_la-rsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-rsend.lo `test -f 'src/mpi/pt2pt/rsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/rsend.c + +src/mpi/pt2pt/lib_libmpi_la-rsend_init.lo: src/mpi/pt2pt/rsend_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-rsend_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend_init.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-rsend_init.lo `test -f 'src/mpi/pt2pt/rsend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/rsend_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/rsend_init.c' object='src/mpi/pt2pt/lib_libmpi_la-rsend_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-rsend_init.lo `test -f 'src/mpi/pt2pt/rsend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/rsend_init.c + +src/mpi/pt2pt/lib_libmpi_la-send.lo: src/mpi/pt2pt/send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-send.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-send.lo `test -f 'src/mpi/pt2pt/send.c' || echo '$(srcdir)/'`src/mpi/pt2pt/send.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/send.c' object='src/mpi/pt2pt/lib_libmpi_la-send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-send.lo `test -f 'src/mpi/pt2pt/send.c' || echo '$(srcdir)/'`src/mpi/pt2pt/send.c + +src/mpi/pt2pt/lib_libmpi_la-send_init.lo: src/mpi/pt2pt/send_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-send_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send_init.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-send_init.lo `test -f 'src/mpi/pt2pt/send_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/send_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/send_init.c' object='src/mpi/pt2pt/lib_libmpi_la-send_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-send_init.lo `test -f 'src/mpi/pt2pt/send_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/send_init.c + +src/mpi/pt2pt/lib_libmpi_la-sendrecv.lo: src/mpi/pt2pt/sendrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-sendrecv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-sendrecv.lo `test -f 'src/mpi/pt2pt/sendrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/sendrecv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/sendrecv.c' object='src/mpi/pt2pt/lib_libmpi_la-sendrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-sendrecv.lo `test -f 'src/mpi/pt2pt/sendrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/sendrecv.c + +src/mpi/pt2pt/lib_libmpi_la-sendrecv_rep.lo: src/mpi/pt2pt/sendrecv_rep.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-sendrecv_rep.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv_rep.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-sendrecv_rep.lo `test -f 'src/mpi/pt2pt/sendrecv_rep.c' || echo '$(srcdir)/'`src/mpi/pt2pt/sendrecv_rep.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv_rep.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv_rep.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/sendrecv_rep.c' object='src/mpi/pt2pt/lib_libmpi_la-sendrecv_rep.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-sendrecv_rep.lo `test -f 'src/mpi/pt2pt/sendrecv_rep.c' || echo '$(srcdir)/'`src/mpi/pt2pt/sendrecv_rep.c + +src/mpi/pt2pt/lib_libmpi_la-ssend.lo: src/mpi/pt2pt/ssend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-ssend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-ssend.lo `test -f 'src/mpi/pt2pt/ssend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ssend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/ssend.c' object='src/mpi/pt2pt/lib_libmpi_la-ssend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-ssend.lo `test -f 'src/mpi/pt2pt/ssend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ssend.c + +src/mpi/pt2pt/lib_libmpi_la-ssend_init.lo: src/mpi/pt2pt/ssend_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-ssend_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend_init.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-ssend_init.lo `test -f 'src/mpi/pt2pt/ssend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ssend_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/ssend_init.c' object='src/mpi/pt2pt/lib_libmpi_la-ssend_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-ssend_init.lo `test -f 'src/mpi/pt2pt/ssend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ssend_init.c + +src/mpi/request/lib_libmpi_la-cancel.lo: src/mpi/request/cancel.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-cancel.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-cancel.Tpo -c -o src/mpi/request/lib_libmpi_la-cancel.lo `test -f 'src/mpi/request/cancel.c' || echo '$(srcdir)/'`src/mpi/request/cancel.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-cancel.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-cancel.Plo +# $(AM_V_CC)source='src/mpi/request/cancel.c' object='src/mpi/request/lib_libmpi_la-cancel.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-cancel.lo `test -f 'src/mpi/request/cancel.c' || echo '$(srcdir)/'`src/mpi/request/cancel.c + +src/mpi/request/lib_libmpi_la-greq_start.lo: src/mpi/request/greq_start.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-greq_start.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_start.Tpo -c -o src/mpi/request/lib_libmpi_la-greq_start.lo `test -f 'src/mpi/request/greq_start.c' || echo '$(srcdir)/'`src/mpi/request/greq_start.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_start.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_start.Plo +# $(AM_V_CC)source='src/mpi/request/greq_start.c' object='src/mpi/request/lib_libmpi_la-greq_start.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-greq_start.lo `test -f 'src/mpi/request/greq_start.c' || echo '$(srcdir)/'`src/mpi/request/greq_start.c + +src/mpi/request/lib_libmpi_la-greq_complete.lo: src/mpi/request/greq_complete.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-greq_complete.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_complete.Tpo -c -o src/mpi/request/lib_libmpi_la-greq_complete.lo `test -f 'src/mpi/request/greq_complete.c' || echo '$(srcdir)/'`src/mpi/request/greq_complete.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_complete.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_complete.Plo +# $(AM_V_CC)source='src/mpi/request/greq_complete.c' object='src/mpi/request/lib_libmpi_la-greq_complete.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-greq_complete.lo `test -f 'src/mpi/request/greq_complete.c' || echo '$(srcdir)/'`src/mpi/request/greq_complete.c + +src/mpi/request/lib_libmpi_la-request_free.lo: src/mpi/request/request_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-request_free.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_free.Tpo -c -o src/mpi/request/lib_libmpi_la-request_free.lo `test -f 'src/mpi/request/request_free.c' || echo '$(srcdir)/'`src/mpi/request/request_free.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_free.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_free.Plo +# $(AM_V_CC)source='src/mpi/request/request_free.c' object='src/mpi/request/lib_libmpi_la-request_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-request_free.lo `test -f 'src/mpi/request/request_free.c' || echo '$(srcdir)/'`src/mpi/request/request_free.c + +src/mpi/request/lib_libmpi_la-request_get_status.lo: src/mpi/request/request_get_status.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-request_get_status.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_get_status.Tpo -c -o src/mpi/request/lib_libmpi_la-request_get_status.lo `test -f 'src/mpi/request/request_get_status.c' || echo '$(srcdir)/'`src/mpi/request/request_get_status.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_get_status.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_get_status.Plo +# $(AM_V_CC)source='src/mpi/request/request_get_status.c' object='src/mpi/request/lib_libmpi_la-request_get_status.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-request_get_status.lo `test -f 'src/mpi/request/request_get_status.c' || echo '$(srcdir)/'`src/mpi/request/request_get_status.c + +src/mpi/request/lib_libmpi_la-status_set_cancelled.lo: src/mpi/request/status_set_cancelled.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-status_set_cancelled.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-status_set_cancelled.Tpo -c -o src/mpi/request/lib_libmpi_la-status_set_cancelled.lo `test -f 'src/mpi/request/status_set_cancelled.c' || echo '$(srcdir)/'`src/mpi/request/status_set_cancelled.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-status_set_cancelled.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-status_set_cancelled.Plo +# $(AM_V_CC)source='src/mpi/request/status_set_cancelled.c' object='src/mpi/request/lib_libmpi_la-status_set_cancelled.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-status_set_cancelled.lo `test -f 'src/mpi/request/status_set_cancelled.c' || echo '$(srcdir)/'`src/mpi/request/status_set_cancelled.c + +src/mpi/request/lib_libmpi_la-start.lo: src/mpi/request/start.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-start.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-start.Tpo -c -o src/mpi/request/lib_libmpi_la-start.lo `test -f 'src/mpi/request/start.c' || echo '$(srcdir)/'`src/mpi/request/start.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-start.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-start.Plo +# $(AM_V_CC)source='src/mpi/request/start.c' object='src/mpi/request/lib_libmpi_la-start.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-start.lo `test -f 'src/mpi/request/start.c' || echo '$(srcdir)/'`src/mpi/request/start.c + +src/mpi/request/lib_libmpi_la-startall.lo: src/mpi/request/startall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-startall.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-startall.Tpo -c -o src/mpi/request/lib_libmpi_la-startall.lo `test -f 'src/mpi/request/startall.c' || echo '$(srcdir)/'`src/mpi/request/startall.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-startall.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-startall.Plo +# $(AM_V_CC)source='src/mpi/request/startall.c' object='src/mpi/request/lib_libmpi_la-startall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-startall.lo `test -f 'src/mpi/request/startall.c' || echo '$(srcdir)/'`src/mpi/request/startall.c + +src/mpi/request/lib_libmpi_la-test.lo: src/mpi/request/test.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-test.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-test.Tpo -c -o src/mpi/request/lib_libmpi_la-test.lo `test -f 'src/mpi/request/test.c' || echo '$(srcdir)/'`src/mpi/request/test.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-test.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-test.Plo +# $(AM_V_CC)source='src/mpi/request/test.c' object='src/mpi/request/lib_libmpi_la-test.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-test.lo `test -f 'src/mpi/request/test.c' || echo '$(srcdir)/'`src/mpi/request/test.c + +src/mpi/request/lib_libmpi_la-test_cancelled.lo: src/mpi/request/test_cancelled.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-test_cancelled.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-test_cancelled.Tpo -c -o src/mpi/request/lib_libmpi_la-test_cancelled.lo `test -f 'src/mpi/request/test_cancelled.c' || echo '$(srcdir)/'`src/mpi/request/test_cancelled.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-test_cancelled.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-test_cancelled.Plo +# $(AM_V_CC)source='src/mpi/request/test_cancelled.c' object='src/mpi/request/lib_libmpi_la-test_cancelled.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-test_cancelled.lo `test -f 'src/mpi/request/test_cancelled.c' || echo '$(srcdir)/'`src/mpi/request/test_cancelled.c + +src/mpi/request/lib_libmpi_la-testall.lo: src/mpi/request/testall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-testall.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-testall.Tpo -c -o src/mpi/request/lib_libmpi_la-testall.lo `test -f 'src/mpi/request/testall.c' || echo '$(srcdir)/'`src/mpi/request/testall.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-testall.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-testall.Plo +# $(AM_V_CC)source='src/mpi/request/testall.c' object='src/mpi/request/lib_libmpi_la-testall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-testall.lo `test -f 'src/mpi/request/testall.c' || echo '$(srcdir)/'`src/mpi/request/testall.c + +src/mpi/request/lib_libmpi_la-testany.lo: src/mpi/request/testany.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-testany.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-testany.Tpo -c -o src/mpi/request/lib_libmpi_la-testany.lo `test -f 'src/mpi/request/testany.c' || echo '$(srcdir)/'`src/mpi/request/testany.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-testany.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-testany.Plo +# $(AM_V_CC)source='src/mpi/request/testany.c' object='src/mpi/request/lib_libmpi_la-testany.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-testany.lo `test -f 'src/mpi/request/testany.c' || echo '$(srcdir)/'`src/mpi/request/testany.c + +src/mpi/request/lib_libmpi_la-testsome.lo: src/mpi/request/testsome.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-testsome.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-testsome.Tpo -c -o src/mpi/request/lib_libmpi_la-testsome.lo `test -f 'src/mpi/request/testsome.c' || echo '$(srcdir)/'`src/mpi/request/testsome.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-testsome.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-testsome.Plo +# $(AM_V_CC)source='src/mpi/request/testsome.c' object='src/mpi/request/lib_libmpi_la-testsome.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-testsome.lo `test -f 'src/mpi/request/testsome.c' || echo '$(srcdir)/'`src/mpi/request/testsome.c + +src/mpi/request/lib_libmpi_la-wait.lo: src/mpi/request/wait.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-wait.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-wait.Tpo -c -o src/mpi/request/lib_libmpi_la-wait.lo `test -f 'src/mpi/request/wait.c' || echo '$(srcdir)/'`src/mpi/request/wait.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-wait.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-wait.Plo +# $(AM_V_CC)source='src/mpi/request/wait.c' object='src/mpi/request/lib_libmpi_la-wait.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-wait.lo `test -f 'src/mpi/request/wait.c' || echo '$(srcdir)/'`src/mpi/request/wait.c + +src/mpi/request/lib_libmpi_la-waitall.lo: src/mpi/request/waitall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-waitall.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitall.Tpo -c -o src/mpi/request/lib_libmpi_la-waitall.lo `test -f 'src/mpi/request/waitall.c' || echo '$(srcdir)/'`src/mpi/request/waitall.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitall.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitall.Plo +# $(AM_V_CC)source='src/mpi/request/waitall.c' object='src/mpi/request/lib_libmpi_la-waitall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-waitall.lo `test -f 'src/mpi/request/waitall.c' || echo '$(srcdir)/'`src/mpi/request/waitall.c + +src/mpi/request/lib_libmpi_la-waitany.lo: src/mpi/request/waitany.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-waitany.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitany.Tpo -c -o src/mpi/request/lib_libmpi_la-waitany.lo `test -f 'src/mpi/request/waitany.c' || echo '$(srcdir)/'`src/mpi/request/waitany.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitany.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitany.Plo +# $(AM_V_CC)source='src/mpi/request/waitany.c' object='src/mpi/request/lib_libmpi_la-waitany.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-waitany.lo `test -f 'src/mpi/request/waitany.c' || echo '$(srcdir)/'`src/mpi/request/waitany.c + +src/mpi/request/lib_libmpi_la-waitsome.lo: src/mpi/request/waitsome.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-waitsome.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitsome.Tpo -c -o src/mpi/request/lib_libmpi_la-waitsome.lo `test -f 'src/mpi/request/waitsome.c' || echo '$(srcdir)/'`src/mpi/request/waitsome.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitsome.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitsome.Plo +# $(AM_V_CC)source='src/mpi/request/waitsome.c' object='src/mpi/request/lib_libmpi_la-waitsome.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-waitsome.lo `test -f 'src/mpi/request/waitsome.c' || echo '$(srcdir)/'`src/mpi/request/waitsome.c + +src/mpi/rma/lib_libmpi_la-accumulate.lo: src/mpi/rma/accumulate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-accumulate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-accumulate.Tpo -c -o src/mpi/rma/lib_libmpi_la-accumulate.lo `test -f 'src/mpi/rma/accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/accumulate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-accumulate.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-accumulate.Plo +# $(AM_V_CC)source='src/mpi/rma/accumulate.c' object='src/mpi/rma/lib_libmpi_la-accumulate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-accumulate.lo `test -f 'src/mpi/rma/accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/accumulate.c + +src/mpi/rma/lib_libmpi_la-alloc_mem.lo: src/mpi/rma/alloc_mem.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-alloc_mem.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-alloc_mem.Tpo -c -o src/mpi/rma/lib_libmpi_la-alloc_mem.lo `test -f 'src/mpi/rma/alloc_mem.c' || echo '$(srcdir)/'`src/mpi/rma/alloc_mem.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-alloc_mem.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-alloc_mem.Plo +# $(AM_V_CC)source='src/mpi/rma/alloc_mem.c' object='src/mpi/rma/lib_libmpi_la-alloc_mem.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-alloc_mem.lo `test -f 'src/mpi/rma/alloc_mem.c' || echo '$(srcdir)/'`src/mpi/rma/alloc_mem.c + +src/mpi/rma/lib_libmpi_la-compare_and_swap.lo: src/mpi/rma/compare_and_swap.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-compare_and_swap.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-compare_and_swap.Tpo -c -o src/mpi/rma/lib_libmpi_la-compare_and_swap.lo `test -f 'src/mpi/rma/compare_and_swap.c' || echo '$(srcdir)/'`src/mpi/rma/compare_and_swap.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-compare_and_swap.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-compare_and_swap.Plo +# $(AM_V_CC)source='src/mpi/rma/compare_and_swap.c' object='src/mpi/rma/lib_libmpi_la-compare_and_swap.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-compare_and_swap.lo `test -f 'src/mpi/rma/compare_and_swap.c' || echo '$(srcdir)/'`src/mpi/rma/compare_and_swap.c + +src/mpi/rma/lib_libmpi_la-fetch_and_op.lo: src/mpi/rma/fetch_and_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-fetch_and_op.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-fetch_and_op.Tpo -c -o src/mpi/rma/lib_libmpi_la-fetch_and_op.lo `test -f 'src/mpi/rma/fetch_and_op.c' || echo '$(srcdir)/'`src/mpi/rma/fetch_and_op.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-fetch_and_op.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-fetch_and_op.Plo +# $(AM_V_CC)source='src/mpi/rma/fetch_and_op.c' object='src/mpi/rma/lib_libmpi_la-fetch_and_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-fetch_and_op.lo `test -f 'src/mpi/rma/fetch_and_op.c' || echo '$(srcdir)/'`src/mpi/rma/fetch_and_op.c + +src/mpi/rma/lib_libmpi_la-free_mem.lo: src/mpi/rma/free_mem.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-free_mem.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-free_mem.Tpo -c -o src/mpi/rma/lib_libmpi_la-free_mem.lo `test -f 'src/mpi/rma/free_mem.c' || echo '$(srcdir)/'`src/mpi/rma/free_mem.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-free_mem.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-free_mem.Plo +# $(AM_V_CC)source='src/mpi/rma/free_mem.c' object='src/mpi/rma/lib_libmpi_la-free_mem.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-free_mem.lo `test -f 'src/mpi/rma/free_mem.c' || echo '$(srcdir)/'`src/mpi/rma/free_mem.c + +src/mpi/rma/lib_libmpi_la-get.lo: src/mpi/rma/get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-get.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get.Tpo -c -o src/mpi/rma/lib_libmpi_la-get.lo `test -f 'src/mpi/rma/get.c' || echo '$(srcdir)/'`src/mpi/rma/get.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get.Plo +# $(AM_V_CC)source='src/mpi/rma/get.c' object='src/mpi/rma/lib_libmpi_la-get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-get.lo `test -f 'src/mpi/rma/get.c' || echo '$(srcdir)/'`src/mpi/rma/get.c + +src/mpi/rma/lib_libmpi_la-get_accumulate.lo: src/mpi/rma/get_accumulate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-get_accumulate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get_accumulate.Tpo -c -o src/mpi/rma/lib_libmpi_la-get_accumulate.lo `test -f 'src/mpi/rma/get_accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/get_accumulate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get_accumulate.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get_accumulate.Plo +# $(AM_V_CC)source='src/mpi/rma/get_accumulate.c' object='src/mpi/rma/lib_libmpi_la-get_accumulate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-get_accumulate.lo `test -f 'src/mpi/rma/get_accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/get_accumulate.c + +src/mpi/rma/lib_libmpi_la-put.lo: src/mpi/rma/put.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-put.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-put.Tpo -c -o src/mpi/rma/lib_libmpi_la-put.lo `test -f 'src/mpi/rma/put.c' || echo '$(srcdir)/'`src/mpi/rma/put.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-put.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-put.Plo +# $(AM_V_CC)source='src/mpi/rma/put.c' object='src/mpi/rma/lib_libmpi_la-put.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-put.lo `test -f 'src/mpi/rma/put.c' || echo '$(srcdir)/'`src/mpi/rma/put.c + +src/mpi/rma/lib_libmpi_la-raccumulate.lo: src/mpi/rma/raccumulate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-raccumulate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-raccumulate.Tpo -c -o src/mpi/rma/lib_libmpi_la-raccumulate.lo `test -f 'src/mpi/rma/raccumulate.c' || echo '$(srcdir)/'`src/mpi/rma/raccumulate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-raccumulate.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-raccumulate.Plo +# $(AM_V_CC)source='src/mpi/rma/raccumulate.c' object='src/mpi/rma/lib_libmpi_la-raccumulate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-raccumulate.lo `test -f 'src/mpi/rma/raccumulate.c' || echo '$(srcdir)/'`src/mpi/rma/raccumulate.c + +src/mpi/rma/lib_libmpi_la-rget.lo: src/mpi/rma/rget.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-rget.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget.Tpo -c -o src/mpi/rma/lib_libmpi_la-rget.lo `test -f 'src/mpi/rma/rget.c' || echo '$(srcdir)/'`src/mpi/rma/rget.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget.Plo +# $(AM_V_CC)source='src/mpi/rma/rget.c' object='src/mpi/rma/lib_libmpi_la-rget.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-rget.lo `test -f 'src/mpi/rma/rget.c' || echo '$(srcdir)/'`src/mpi/rma/rget.c + +src/mpi/rma/lib_libmpi_la-rget_accumulate.lo: src/mpi/rma/rget_accumulate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-rget_accumulate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget_accumulate.Tpo -c -o src/mpi/rma/lib_libmpi_la-rget_accumulate.lo `test -f 'src/mpi/rma/rget_accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/rget_accumulate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget_accumulate.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget_accumulate.Plo +# $(AM_V_CC)source='src/mpi/rma/rget_accumulate.c' object='src/mpi/rma/lib_libmpi_la-rget_accumulate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-rget_accumulate.lo `test -f 'src/mpi/rma/rget_accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/rget_accumulate.c + +src/mpi/rma/lib_libmpi_la-rput.lo: src/mpi/rma/rput.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-rput.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rput.Tpo -c -o src/mpi/rma/lib_libmpi_la-rput.lo `test -f 'src/mpi/rma/rput.c' || echo '$(srcdir)/'`src/mpi/rma/rput.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rput.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rput.Plo +# $(AM_V_CC)source='src/mpi/rma/rput.c' object='src/mpi/rma/lib_libmpi_la-rput.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-rput.lo `test -f 'src/mpi/rma/rput.c' || echo '$(srcdir)/'`src/mpi/rma/rput.c + +src/mpi/rma/lib_libmpi_la-win_allocate.lo: src/mpi/rma/win_allocate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_allocate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_allocate.lo `test -f 'src/mpi/rma/win_allocate.c' || echo '$(srcdir)/'`src/mpi/rma/win_allocate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate.Plo +# $(AM_V_CC)source='src/mpi/rma/win_allocate.c' object='src/mpi/rma/lib_libmpi_la-win_allocate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_allocate.lo `test -f 'src/mpi/rma/win_allocate.c' || echo '$(srcdir)/'`src/mpi/rma/win_allocate.c + +src/mpi/rma/lib_libmpi_la-win_allocate_shared.lo: src/mpi/rma/win_allocate_shared.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_allocate_shared.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate_shared.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_allocate_shared.lo `test -f 'src/mpi/rma/win_allocate_shared.c' || echo '$(srcdir)/'`src/mpi/rma/win_allocate_shared.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate_shared.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate_shared.Plo +# $(AM_V_CC)source='src/mpi/rma/win_allocate_shared.c' object='src/mpi/rma/lib_libmpi_la-win_allocate_shared.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_allocate_shared.lo `test -f 'src/mpi/rma/win_allocate_shared.c' || echo '$(srcdir)/'`src/mpi/rma/win_allocate_shared.c + +src/mpi/rma/lib_libmpi_la-win_attach.lo: src/mpi/rma/win_attach.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_attach.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_attach.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_attach.lo `test -f 'src/mpi/rma/win_attach.c' || echo '$(srcdir)/'`src/mpi/rma/win_attach.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_attach.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_attach.Plo +# $(AM_V_CC)source='src/mpi/rma/win_attach.c' object='src/mpi/rma/lib_libmpi_la-win_attach.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_attach.lo `test -f 'src/mpi/rma/win_attach.c' || echo '$(srcdir)/'`src/mpi/rma/win_attach.c + +src/mpi/rma/lib_libmpi_la-win_complete.lo: src/mpi/rma/win_complete.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_complete.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_complete.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_complete.lo `test -f 'src/mpi/rma/win_complete.c' || echo '$(srcdir)/'`src/mpi/rma/win_complete.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_complete.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_complete.Plo +# $(AM_V_CC)source='src/mpi/rma/win_complete.c' object='src/mpi/rma/lib_libmpi_la-win_complete.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_complete.lo `test -f 'src/mpi/rma/win_complete.c' || echo '$(srcdir)/'`src/mpi/rma/win_complete.c + +src/mpi/rma/lib_libmpi_la-win_create.lo: src/mpi/rma/win_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_create.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_create.lo `test -f 'src/mpi/rma/win_create.c' || echo '$(srcdir)/'`src/mpi/rma/win_create.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create.Plo +# $(AM_V_CC)source='src/mpi/rma/win_create.c' object='src/mpi/rma/lib_libmpi_la-win_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_create.lo `test -f 'src/mpi/rma/win_create.c' || echo '$(srcdir)/'`src/mpi/rma/win_create.c + +src/mpi/rma/lib_libmpi_la-win_create_dynamic.lo: src/mpi/rma/win_create_dynamic.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_create_dynamic.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create_dynamic.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_create_dynamic.lo `test -f 'src/mpi/rma/win_create_dynamic.c' || echo '$(srcdir)/'`src/mpi/rma/win_create_dynamic.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create_dynamic.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create_dynamic.Plo +# $(AM_V_CC)source='src/mpi/rma/win_create_dynamic.c' object='src/mpi/rma/lib_libmpi_la-win_create_dynamic.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_create_dynamic.lo `test -f 'src/mpi/rma/win_create_dynamic.c' || echo '$(srcdir)/'`src/mpi/rma/win_create_dynamic.c + +src/mpi/rma/lib_libmpi_la-win_detach.lo: src/mpi/rma/win_detach.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_detach.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_detach.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_detach.lo `test -f 'src/mpi/rma/win_detach.c' || echo '$(srcdir)/'`src/mpi/rma/win_detach.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_detach.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_detach.Plo +# $(AM_V_CC)source='src/mpi/rma/win_detach.c' object='src/mpi/rma/lib_libmpi_la-win_detach.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_detach.lo `test -f 'src/mpi/rma/win_detach.c' || echo '$(srcdir)/'`src/mpi/rma/win_detach.c + +src/mpi/rma/lib_libmpi_la-win_fence.lo: src/mpi/rma/win_fence.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_fence.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_fence.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_fence.lo `test -f 'src/mpi/rma/win_fence.c' || echo '$(srcdir)/'`src/mpi/rma/win_fence.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_fence.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_fence.Plo +# $(AM_V_CC)source='src/mpi/rma/win_fence.c' object='src/mpi/rma/lib_libmpi_la-win_fence.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_fence.lo `test -f 'src/mpi/rma/win_fence.c' || echo '$(srcdir)/'`src/mpi/rma/win_fence.c + +src/mpi/rma/lib_libmpi_la-win_flush.lo: src/mpi/rma/win_flush.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_flush.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_flush.lo `test -f 'src/mpi/rma/win_flush.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush.Plo +# $(AM_V_CC)source='src/mpi/rma/win_flush.c' object='src/mpi/rma/lib_libmpi_la-win_flush.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_flush.lo `test -f 'src/mpi/rma/win_flush.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush.c + +src/mpi/rma/lib_libmpi_la-win_flush_all.lo: src/mpi/rma/win_flush_all.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_flush_all.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_all.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_flush_all.lo `test -f 'src/mpi/rma/win_flush_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_all.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_all.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_all.Plo +# $(AM_V_CC)source='src/mpi/rma/win_flush_all.c' object='src/mpi/rma/lib_libmpi_la-win_flush_all.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_flush_all.lo `test -f 'src/mpi/rma/win_flush_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_all.c + +src/mpi/rma/lib_libmpi_la-win_flush_local.lo: src/mpi/rma/win_flush_local.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_flush_local.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_flush_local.lo `test -f 'src/mpi/rma/win_flush_local.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_local.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local.Plo +# $(AM_V_CC)source='src/mpi/rma/win_flush_local.c' object='src/mpi/rma/lib_libmpi_la-win_flush_local.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_flush_local.lo `test -f 'src/mpi/rma/win_flush_local.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_local.c + +src/mpi/rma/lib_libmpi_la-win_flush_local_all.lo: src/mpi/rma/win_flush_local_all.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_flush_local_all.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local_all.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_flush_local_all.lo `test -f 'src/mpi/rma/win_flush_local_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_local_all.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local_all.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local_all.Plo +# $(AM_V_CC)source='src/mpi/rma/win_flush_local_all.c' object='src/mpi/rma/lib_libmpi_la-win_flush_local_all.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_flush_local_all.lo `test -f 'src/mpi/rma/win_flush_local_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_local_all.c + +src/mpi/rma/lib_libmpi_la-win_free.lo: src/mpi/rma/win_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_free.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_free.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_free.lo `test -f 'src/mpi/rma/win_free.c' || echo '$(srcdir)/'`src/mpi/rma/win_free.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_free.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_free.Plo +# $(AM_V_CC)source='src/mpi/rma/win_free.c' object='src/mpi/rma/lib_libmpi_la-win_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_free.lo `test -f 'src/mpi/rma/win_free.c' || echo '$(srcdir)/'`src/mpi/rma/win_free.c + +src/mpi/rma/lib_libmpi_la-win_get_group.lo: src/mpi/rma/win_get_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_get_group.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_group.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_get_group.lo `test -f 'src/mpi/rma/win_get_group.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_group.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_group.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_group.Plo +# $(AM_V_CC)source='src/mpi/rma/win_get_group.c' object='src/mpi/rma/lib_libmpi_la-win_get_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_get_group.lo `test -f 'src/mpi/rma/win_get_group.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_group.c + +src/mpi/rma/lib_libmpi_la-win_get_info.lo: src/mpi/rma/win_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_get_info.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_info.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_get_info.lo `test -f 'src/mpi/rma/win_get_info.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_info.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_info.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_info.Plo +# $(AM_V_CC)source='src/mpi/rma/win_get_info.c' object='src/mpi/rma/lib_libmpi_la-win_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_get_info.lo `test -f 'src/mpi/rma/win_get_info.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_info.c + +src/mpi/rma/lib_libmpi_la-win_get_name.lo: src/mpi/rma/win_get_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_get_name.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_name.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_get_name.lo `test -f 'src/mpi/rma/win_get_name.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_name.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_name.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_name.Plo +# $(AM_V_CC)source='src/mpi/rma/win_get_name.c' object='src/mpi/rma/lib_libmpi_la-win_get_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_get_name.lo `test -f 'src/mpi/rma/win_get_name.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_name.c + +src/mpi/rma/lib_libmpi_la-win_lock.lo: src/mpi/rma/win_lock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_lock.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_lock.lo `test -f 'src/mpi/rma/win_lock.c' || echo '$(srcdir)/'`src/mpi/rma/win_lock.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock.Plo +# $(AM_V_CC)source='src/mpi/rma/win_lock.c' object='src/mpi/rma/lib_libmpi_la-win_lock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_lock.lo `test -f 'src/mpi/rma/win_lock.c' || echo '$(srcdir)/'`src/mpi/rma/win_lock.c + +src/mpi/rma/lib_libmpi_la-win_lock_all.lo: src/mpi/rma/win_lock_all.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_lock_all.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock_all.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_lock_all.lo `test -f 'src/mpi/rma/win_lock_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_lock_all.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock_all.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock_all.Plo +# $(AM_V_CC)source='src/mpi/rma/win_lock_all.c' object='src/mpi/rma/lib_libmpi_la-win_lock_all.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_lock_all.lo `test -f 'src/mpi/rma/win_lock_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_lock_all.c + +src/mpi/rma/lib_libmpi_la-win_post.lo: src/mpi/rma/win_post.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_post.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_post.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_post.lo `test -f 'src/mpi/rma/win_post.c' || echo '$(srcdir)/'`src/mpi/rma/win_post.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_post.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_post.Plo +# $(AM_V_CC)source='src/mpi/rma/win_post.c' object='src/mpi/rma/lib_libmpi_la-win_post.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_post.lo `test -f 'src/mpi/rma/win_post.c' || echo '$(srcdir)/'`src/mpi/rma/win_post.c + +src/mpi/rma/lib_libmpi_la-win_set_info.lo: src/mpi/rma/win_set_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_set_info.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_info.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_set_info.lo `test -f 'src/mpi/rma/win_set_info.c' || echo '$(srcdir)/'`src/mpi/rma/win_set_info.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_info.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_info.Plo +# $(AM_V_CC)source='src/mpi/rma/win_set_info.c' object='src/mpi/rma/lib_libmpi_la-win_set_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_set_info.lo `test -f 'src/mpi/rma/win_set_info.c' || echo '$(srcdir)/'`src/mpi/rma/win_set_info.c + +src/mpi/rma/lib_libmpi_la-win_set_name.lo: src/mpi/rma/win_set_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_set_name.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_name.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_set_name.lo `test -f 'src/mpi/rma/win_set_name.c' || echo '$(srcdir)/'`src/mpi/rma/win_set_name.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_name.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_name.Plo +# $(AM_V_CC)source='src/mpi/rma/win_set_name.c' object='src/mpi/rma/lib_libmpi_la-win_set_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_set_name.lo `test -f 'src/mpi/rma/win_set_name.c' || echo '$(srcdir)/'`src/mpi/rma/win_set_name.c + +src/mpi/rma/lib_libmpi_la-win_shared_query.lo: src/mpi/rma/win_shared_query.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_shared_query.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_shared_query.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_shared_query.lo `test -f 'src/mpi/rma/win_shared_query.c' || echo '$(srcdir)/'`src/mpi/rma/win_shared_query.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_shared_query.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_shared_query.Plo +# $(AM_V_CC)source='src/mpi/rma/win_shared_query.c' object='src/mpi/rma/lib_libmpi_la-win_shared_query.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_shared_query.lo `test -f 'src/mpi/rma/win_shared_query.c' || echo '$(srcdir)/'`src/mpi/rma/win_shared_query.c + +src/mpi/rma/lib_libmpi_la-win_start.lo: src/mpi/rma/win_start.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_start.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_start.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_start.lo `test -f 'src/mpi/rma/win_start.c' || echo '$(srcdir)/'`src/mpi/rma/win_start.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_start.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_start.Plo +# $(AM_V_CC)source='src/mpi/rma/win_start.c' object='src/mpi/rma/lib_libmpi_la-win_start.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_start.lo `test -f 'src/mpi/rma/win_start.c' || echo '$(srcdir)/'`src/mpi/rma/win_start.c + +src/mpi/rma/lib_libmpi_la-win_sync.lo: src/mpi/rma/win_sync.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_sync.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_sync.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_sync.lo `test -f 'src/mpi/rma/win_sync.c' || echo '$(srcdir)/'`src/mpi/rma/win_sync.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_sync.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_sync.Plo +# $(AM_V_CC)source='src/mpi/rma/win_sync.c' object='src/mpi/rma/lib_libmpi_la-win_sync.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_sync.lo `test -f 'src/mpi/rma/win_sync.c' || echo '$(srcdir)/'`src/mpi/rma/win_sync.c + +src/mpi/rma/lib_libmpi_la-win_test.lo: src/mpi/rma/win_test.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_test.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_test.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_test.lo `test -f 'src/mpi/rma/win_test.c' || echo '$(srcdir)/'`src/mpi/rma/win_test.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_test.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_test.Plo +# $(AM_V_CC)source='src/mpi/rma/win_test.c' object='src/mpi/rma/lib_libmpi_la-win_test.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_test.lo `test -f 'src/mpi/rma/win_test.c' || echo '$(srcdir)/'`src/mpi/rma/win_test.c + +src/mpi/rma/lib_libmpi_la-win_unlock.lo: src/mpi/rma/win_unlock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_unlock.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_unlock.lo `test -f 'src/mpi/rma/win_unlock.c' || echo '$(srcdir)/'`src/mpi/rma/win_unlock.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock.Plo +# $(AM_V_CC)source='src/mpi/rma/win_unlock.c' object='src/mpi/rma/lib_libmpi_la-win_unlock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_unlock.lo `test -f 'src/mpi/rma/win_unlock.c' || echo '$(srcdir)/'`src/mpi/rma/win_unlock.c + +src/mpi/rma/lib_libmpi_la-win_unlock_all.lo: src/mpi/rma/win_unlock_all.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_unlock_all.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock_all.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_unlock_all.lo `test -f 'src/mpi/rma/win_unlock_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_unlock_all.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock_all.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock_all.Plo +# $(AM_V_CC)source='src/mpi/rma/win_unlock_all.c' object='src/mpi/rma/lib_libmpi_la-win_unlock_all.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_unlock_all.lo `test -f 'src/mpi/rma/win_unlock_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_unlock_all.c + +src/mpi/rma/lib_libmpi_la-win_wait.lo: src/mpi/rma/win_wait.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-win_wait.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_wait.Tpo -c -o src/mpi/rma/lib_libmpi_la-win_wait.lo `test -f 'src/mpi/rma/win_wait.c' || echo '$(srcdir)/'`src/mpi/rma/win_wait.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_wait.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_wait.Plo +# $(AM_V_CC)source='src/mpi/rma/win_wait.c' object='src/mpi/rma/lib_libmpi_la-win_wait.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-win_wait.lo `test -f 'src/mpi/rma/win_wait.c' || echo '$(srcdir)/'`src/mpi/rma/win_wait.c + +src/mpi/spawn/lib_libmpi_la-comm_disconnect.lo: src/mpi/spawn/comm_disconnect.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-comm_disconnect.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_disconnect.Tpo -c -o src/mpi/spawn/lib_libmpi_la-comm_disconnect.lo `test -f 'src/mpi/spawn/comm_disconnect.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_disconnect.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_disconnect.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_disconnect.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_disconnect.c' object='src/mpi/spawn/lib_libmpi_la-comm_disconnect.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-comm_disconnect.lo `test -f 'src/mpi/spawn/comm_disconnect.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_disconnect.c + +src/mpi/spawn/lib_libmpi_la-comm_get_parent.lo: src/mpi/spawn/comm_get_parent.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-comm_get_parent.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_get_parent.Tpo -c -o src/mpi/spawn/lib_libmpi_la-comm_get_parent.lo `test -f 'src/mpi/spawn/comm_get_parent.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_get_parent.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_get_parent.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_get_parent.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_get_parent.c' object='src/mpi/spawn/lib_libmpi_la-comm_get_parent.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-comm_get_parent.lo `test -f 'src/mpi/spawn/comm_get_parent.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_get_parent.c + +src/mpi/spawn/lib_libmpi_la-comm_join.lo: src/mpi/spawn/comm_join.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-comm_join.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_join.Tpo -c -o src/mpi/spawn/lib_libmpi_la-comm_join.lo `test -f 'src/mpi/spawn/comm_join.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_join.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_join.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_join.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_join.c' object='src/mpi/spawn/lib_libmpi_la-comm_join.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-comm_join.lo `test -f 'src/mpi/spawn/comm_join.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_join.c + +src/mpi/spawn/lib_libmpi_la-comm_spawn.lo: src/mpi/spawn/comm_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-comm_spawn.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn.Tpo -c -o src/mpi/spawn/lib_libmpi_la-comm_spawn.lo `test -f 'src/mpi/spawn/comm_spawn.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_spawn.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_spawn.c' object='src/mpi/spawn/lib_libmpi_la-comm_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-comm_spawn.lo `test -f 'src/mpi/spawn/comm_spawn.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_spawn.c + +src/mpi/spawn/lib_libmpi_la-comm_spawn_multiple.lo: src/mpi/spawn/comm_spawn_multiple.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-comm_spawn_multiple.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn_multiple.Tpo -c -o src/mpi/spawn/lib_libmpi_la-comm_spawn_multiple.lo `test -f 'src/mpi/spawn/comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_spawn_multiple.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn_multiple.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn_multiple.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_spawn_multiple.c' object='src/mpi/spawn/lib_libmpi_la-comm_spawn_multiple.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-comm_spawn_multiple.lo `test -f 'src/mpi/spawn/comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_spawn_multiple.c + +src/mpi/spawn/lib_libmpi_la-lookup_name.lo: src/mpi/spawn/lookup_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-lookup_name.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-lookup_name.Tpo -c -o src/mpi/spawn/lib_libmpi_la-lookup_name.lo `test -f 'src/mpi/spawn/lookup_name.c' || echo '$(srcdir)/'`src/mpi/spawn/lookup_name.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-lookup_name.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-lookup_name.Plo +# $(AM_V_CC)source='src/mpi/spawn/lookup_name.c' object='src/mpi/spawn/lib_libmpi_la-lookup_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-lookup_name.lo `test -f 'src/mpi/spawn/lookup_name.c' || echo '$(srcdir)/'`src/mpi/spawn/lookup_name.c + +src/mpi/spawn/lib_libmpi_la-publish_name.lo: src/mpi/spawn/publish_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-publish_name.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-publish_name.Tpo -c -o src/mpi/spawn/lib_libmpi_la-publish_name.lo `test -f 'src/mpi/spawn/publish_name.c' || echo '$(srcdir)/'`src/mpi/spawn/publish_name.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-publish_name.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-publish_name.Plo +# $(AM_V_CC)source='src/mpi/spawn/publish_name.c' object='src/mpi/spawn/lib_libmpi_la-publish_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-publish_name.lo `test -f 'src/mpi/spawn/publish_name.c' || echo '$(srcdir)/'`src/mpi/spawn/publish_name.c + +src/mpi/spawn/lib_libmpi_la-unpublish_name.lo: src/mpi/spawn/unpublish_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-unpublish_name.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-unpublish_name.Tpo -c -o src/mpi/spawn/lib_libmpi_la-unpublish_name.lo `test -f 'src/mpi/spawn/unpublish_name.c' || echo '$(srcdir)/'`src/mpi/spawn/unpublish_name.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-unpublish_name.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-unpublish_name.Plo +# $(AM_V_CC)source='src/mpi/spawn/unpublish_name.c' object='src/mpi/spawn/lib_libmpi_la-unpublish_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-unpublish_name.lo `test -f 'src/mpi/spawn/unpublish_name.c' || echo '$(srcdir)/'`src/mpi/spawn/unpublish_name.c + +src/mpi/spawn/lib_libmpi_la-open_port.lo: src/mpi/spawn/open_port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-open_port.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-open_port.Tpo -c -o src/mpi/spawn/lib_libmpi_la-open_port.lo `test -f 'src/mpi/spawn/open_port.c' || echo '$(srcdir)/'`src/mpi/spawn/open_port.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-open_port.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-open_port.Plo +# $(AM_V_CC)source='src/mpi/spawn/open_port.c' object='src/mpi/spawn/lib_libmpi_la-open_port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-open_port.lo `test -f 'src/mpi/spawn/open_port.c' || echo '$(srcdir)/'`src/mpi/spawn/open_port.c + +src/mpi/spawn/lib_libmpi_la-close_port.lo: src/mpi/spawn/close_port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-close_port.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-close_port.Tpo -c -o src/mpi/spawn/lib_libmpi_la-close_port.lo `test -f 'src/mpi/spawn/close_port.c' || echo '$(srcdir)/'`src/mpi/spawn/close_port.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-close_port.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-close_port.Plo +# $(AM_V_CC)source='src/mpi/spawn/close_port.c' object='src/mpi/spawn/lib_libmpi_la-close_port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-close_port.lo `test -f 'src/mpi/spawn/close_port.c' || echo '$(srcdir)/'`src/mpi/spawn/close_port.c + +src/mpi/spawn/lib_libmpi_la-comm_connect.lo: src/mpi/spawn/comm_connect.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-comm_connect.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_connect.Tpo -c -o src/mpi/spawn/lib_libmpi_la-comm_connect.lo `test -f 'src/mpi/spawn/comm_connect.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_connect.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_connect.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_connect.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_connect.c' object='src/mpi/spawn/lib_libmpi_la-comm_connect.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-comm_connect.lo `test -f 'src/mpi/spawn/comm_connect.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_connect.c + +src/mpi/spawn/lib_libmpi_la-comm_accept.lo: src/mpi/spawn/comm_accept.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libmpi_la-comm_accept.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_accept.Tpo -c -o src/mpi/spawn/lib_libmpi_la-comm_accept.lo `test -f 'src/mpi/spawn/comm_accept.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_accept.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_accept.Tpo src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_accept.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_accept.c' object='src/mpi/spawn/lib_libmpi_la-comm_accept.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libmpi_la-comm_accept.lo `test -f 'src/mpi/spawn/comm_accept.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_accept.c + +src/mpi/timer/lib_libmpi_la-wtime.lo: src/mpi/timer/wtime.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/timer/lib_libmpi_la-wtime.lo -MD -MP -MF src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtime.Tpo -c -o src/mpi/timer/lib_libmpi_la-wtime.lo `test -f 'src/mpi/timer/wtime.c' || echo '$(srcdir)/'`src/mpi/timer/wtime.c + $(AM_V_at)$(am__mv) src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtime.Tpo src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtime.Plo +# $(AM_V_CC)source='src/mpi/timer/wtime.c' object='src/mpi/timer/lib_libmpi_la-wtime.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/timer/lib_libmpi_la-wtime.lo `test -f 'src/mpi/timer/wtime.c' || echo '$(srcdir)/'`src/mpi/timer/wtime.c + +src/mpi/timer/lib_libmpi_la-wtick.lo: src/mpi/timer/wtick.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/timer/lib_libmpi_la-wtick.lo -MD -MP -MF src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtick.Tpo -c -o src/mpi/timer/lib_libmpi_la-wtick.lo `test -f 'src/mpi/timer/wtick.c' || echo '$(srcdir)/'`src/mpi/timer/wtick.c + $(AM_V_at)$(am__mv) src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtick.Tpo src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtick.Plo +# $(AM_V_CC)source='src/mpi/timer/wtick.c' object='src/mpi/timer/lib_libmpi_la-wtick.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/timer/lib_libmpi_la-wtick.lo `test -f 'src/mpi/timer/wtick.c' || echo '$(srcdir)/'`src/mpi/timer/wtick.c + +src/mpi/topo/lib_libmpi_la-cart_coords.lo: src/mpi/topo/cart_coords.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-cart_coords.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_coords.Tpo -c -o src/mpi/topo/lib_libmpi_la-cart_coords.lo `test -f 'src/mpi/topo/cart_coords.c' || echo '$(srcdir)/'`src/mpi/topo/cart_coords.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_coords.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_coords.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_coords.c' object='src/mpi/topo/lib_libmpi_la-cart_coords.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-cart_coords.lo `test -f 'src/mpi/topo/cart_coords.c' || echo '$(srcdir)/'`src/mpi/topo/cart_coords.c + +src/mpi/topo/lib_libmpi_la-cart_create.lo: src/mpi/topo/cart_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-cart_create.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_create.Tpo -c -o src/mpi/topo/lib_libmpi_la-cart_create.lo `test -f 'src/mpi/topo/cart_create.c' || echo '$(srcdir)/'`src/mpi/topo/cart_create.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_create.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_create.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_create.c' object='src/mpi/topo/lib_libmpi_la-cart_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-cart_create.lo `test -f 'src/mpi/topo/cart_create.c' || echo '$(srcdir)/'`src/mpi/topo/cart_create.c + +src/mpi/topo/lib_libmpi_la-cart_get.lo: src/mpi/topo/cart_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-cart_get.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_get.Tpo -c -o src/mpi/topo/lib_libmpi_la-cart_get.lo `test -f 'src/mpi/topo/cart_get.c' || echo '$(srcdir)/'`src/mpi/topo/cart_get.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_get.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_get.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_get.c' object='src/mpi/topo/lib_libmpi_la-cart_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-cart_get.lo `test -f 'src/mpi/topo/cart_get.c' || echo '$(srcdir)/'`src/mpi/topo/cart_get.c + +src/mpi/topo/lib_libmpi_la-cart_map.lo: src/mpi/topo/cart_map.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-cart_map.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_map.Tpo -c -o src/mpi/topo/lib_libmpi_la-cart_map.lo `test -f 'src/mpi/topo/cart_map.c' || echo '$(srcdir)/'`src/mpi/topo/cart_map.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_map.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_map.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_map.c' object='src/mpi/topo/lib_libmpi_la-cart_map.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-cart_map.lo `test -f 'src/mpi/topo/cart_map.c' || echo '$(srcdir)/'`src/mpi/topo/cart_map.c + +src/mpi/topo/lib_libmpi_la-cart_rank.lo: src/mpi/topo/cart_rank.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-cart_rank.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_rank.Tpo -c -o src/mpi/topo/lib_libmpi_la-cart_rank.lo `test -f 'src/mpi/topo/cart_rank.c' || echo '$(srcdir)/'`src/mpi/topo/cart_rank.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_rank.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_rank.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_rank.c' object='src/mpi/topo/lib_libmpi_la-cart_rank.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-cart_rank.lo `test -f 'src/mpi/topo/cart_rank.c' || echo '$(srcdir)/'`src/mpi/topo/cart_rank.c + +src/mpi/topo/lib_libmpi_la-cart_shift.lo: src/mpi/topo/cart_shift.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-cart_shift.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_shift.Tpo -c -o src/mpi/topo/lib_libmpi_la-cart_shift.lo `test -f 'src/mpi/topo/cart_shift.c' || echo '$(srcdir)/'`src/mpi/topo/cart_shift.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_shift.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_shift.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_shift.c' object='src/mpi/topo/lib_libmpi_la-cart_shift.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-cart_shift.lo `test -f 'src/mpi/topo/cart_shift.c' || echo '$(srcdir)/'`src/mpi/topo/cart_shift.c + +src/mpi/topo/lib_libmpi_la-cart_sub.lo: src/mpi/topo/cart_sub.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-cart_sub.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_sub.Tpo -c -o src/mpi/topo/lib_libmpi_la-cart_sub.lo `test -f 'src/mpi/topo/cart_sub.c' || echo '$(srcdir)/'`src/mpi/topo/cart_sub.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_sub.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_sub.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_sub.c' object='src/mpi/topo/lib_libmpi_la-cart_sub.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-cart_sub.lo `test -f 'src/mpi/topo/cart_sub.c' || echo '$(srcdir)/'`src/mpi/topo/cart_sub.c + +src/mpi/topo/lib_libmpi_la-dims_create.lo: src/mpi/topo/dims_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-dims_create.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dims_create.Tpo -c -o src/mpi/topo/lib_libmpi_la-dims_create.lo `test -f 'src/mpi/topo/dims_create.c' || echo '$(srcdir)/'`src/mpi/topo/dims_create.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dims_create.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dims_create.Plo +# $(AM_V_CC)source='src/mpi/topo/dims_create.c' object='src/mpi/topo/lib_libmpi_la-dims_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-dims_create.lo `test -f 'src/mpi/topo/dims_create.c' || echo '$(srcdir)/'`src/mpi/topo/dims_create.c + +src/mpi/topo/lib_libmpi_la-graph_get.lo: src/mpi/topo/graph_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-graph_get.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_get.Tpo -c -o src/mpi/topo/lib_libmpi_la-graph_get.lo `test -f 'src/mpi/topo/graph_get.c' || echo '$(srcdir)/'`src/mpi/topo/graph_get.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_get.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_get.Plo +# $(AM_V_CC)source='src/mpi/topo/graph_get.c' object='src/mpi/topo/lib_libmpi_la-graph_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-graph_get.lo `test -f 'src/mpi/topo/graph_get.c' || echo '$(srcdir)/'`src/mpi/topo/graph_get.c + +src/mpi/topo/lib_libmpi_la-graph_map.lo: src/mpi/topo/graph_map.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-graph_map.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_map.Tpo -c -o src/mpi/topo/lib_libmpi_la-graph_map.lo `test -f 'src/mpi/topo/graph_map.c' || echo '$(srcdir)/'`src/mpi/topo/graph_map.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_map.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_map.Plo +# $(AM_V_CC)source='src/mpi/topo/graph_map.c' object='src/mpi/topo/lib_libmpi_la-graph_map.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-graph_map.lo `test -f 'src/mpi/topo/graph_map.c' || echo '$(srcdir)/'`src/mpi/topo/graph_map.c + +src/mpi/topo/lib_libmpi_la-graph_nbr.lo: src/mpi/topo/graph_nbr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-graph_nbr.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_nbr.Tpo -c -o src/mpi/topo/lib_libmpi_la-graph_nbr.lo `test -f 'src/mpi/topo/graph_nbr.c' || echo '$(srcdir)/'`src/mpi/topo/graph_nbr.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_nbr.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_nbr.Plo +# $(AM_V_CC)source='src/mpi/topo/graph_nbr.c' object='src/mpi/topo/lib_libmpi_la-graph_nbr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-graph_nbr.lo `test -f 'src/mpi/topo/graph_nbr.c' || echo '$(srcdir)/'`src/mpi/topo/graph_nbr.c + +src/mpi/topo/lib_libmpi_la-graphcreate.lo: src/mpi/topo/graphcreate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-graphcreate.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphcreate.Tpo -c -o src/mpi/topo/lib_libmpi_la-graphcreate.lo `test -f 'src/mpi/topo/graphcreate.c' || echo '$(srcdir)/'`src/mpi/topo/graphcreate.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphcreate.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphcreate.Plo +# $(AM_V_CC)source='src/mpi/topo/graphcreate.c' object='src/mpi/topo/lib_libmpi_la-graphcreate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-graphcreate.lo `test -f 'src/mpi/topo/graphcreate.c' || echo '$(srcdir)/'`src/mpi/topo/graphcreate.c + +src/mpi/topo/lib_libmpi_la-graphdimsget.lo: src/mpi/topo/graphdimsget.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-graphdimsget.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphdimsget.Tpo -c -o src/mpi/topo/lib_libmpi_la-graphdimsget.lo `test -f 'src/mpi/topo/graphdimsget.c' || echo '$(srcdir)/'`src/mpi/topo/graphdimsget.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphdimsget.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphdimsget.Plo +# $(AM_V_CC)source='src/mpi/topo/graphdimsget.c' object='src/mpi/topo/lib_libmpi_la-graphdimsget.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-graphdimsget.lo `test -f 'src/mpi/topo/graphdimsget.c' || echo '$(srcdir)/'`src/mpi/topo/graphdimsget.c + +src/mpi/topo/lib_libmpi_la-graphnbrcnt.lo: src/mpi/topo/graphnbrcnt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-graphnbrcnt.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphnbrcnt.Tpo -c -o src/mpi/topo/lib_libmpi_la-graphnbrcnt.lo `test -f 'src/mpi/topo/graphnbrcnt.c' || echo '$(srcdir)/'`src/mpi/topo/graphnbrcnt.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphnbrcnt.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphnbrcnt.Plo +# $(AM_V_CC)source='src/mpi/topo/graphnbrcnt.c' object='src/mpi/topo/lib_libmpi_la-graphnbrcnt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-graphnbrcnt.lo `test -f 'src/mpi/topo/graphnbrcnt.c' || echo '$(srcdir)/'`src/mpi/topo/graphnbrcnt.c + +src/mpi/topo/lib_libmpi_la-cartdim_get.lo: src/mpi/topo/cartdim_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-cartdim_get.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cartdim_get.Tpo -c -o src/mpi/topo/lib_libmpi_la-cartdim_get.lo `test -f 'src/mpi/topo/cartdim_get.c' || echo '$(srcdir)/'`src/mpi/topo/cartdim_get.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cartdim_get.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cartdim_get.Plo +# $(AM_V_CC)source='src/mpi/topo/cartdim_get.c' object='src/mpi/topo/lib_libmpi_la-cartdim_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-cartdim_get.lo `test -f 'src/mpi/topo/cartdim_get.c' || echo '$(srcdir)/'`src/mpi/topo/cartdim_get.c + +src/mpi/topo/lib_libmpi_la-topo_test.lo: src/mpi/topo/topo_test.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-topo_test.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topo_test.Tpo -c -o src/mpi/topo/lib_libmpi_la-topo_test.lo `test -f 'src/mpi/topo/topo_test.c' || echo '$(srcdir)/'`src/mpi/topo/topo_test.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topo_test.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topo_test.Plo +# $(AM_V_CC)source='src/mpi/topo/topo_test.c' object='src/mpi/topo/lib_libmpi_la-topo_test.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-topo_test.lo `test -f 'src/mpi/topo/topo_test.c' || echo '$(srcdir)/'`src/mpi/topo/topo_test.c + +src/mpi/topo/lib_libmpi_la-dist_gr_create_adj.lo: src/mpi/topo/dist_gr_create_adj.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-dist_gr_create_adj.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create_adj.Tpo -c -o src/mpi/topo/lib_libmpi_la-dist_gr_create_adj.lo `test -f 'src/mpi/topo/dist_gr_create_adj.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_create_adj.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create_adj.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create_adj.Plo +# $(AM_V_CC)source='src/mpi/topo/dist_gr_create_adj.c' object='src/mpi/topo/lib_libmpi_la-dist_gr_create_adj.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-dist_gr_create_adj.lo `test -f 'src/mpi/topo/dist_gr_create_adj.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_create_adj.c + +src/mpi/topo/lib_libmpi_la-dist_gr_create.lo: src/mpi/topo/dist_gr_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-dist_gr_create.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create.Tpo -c -o src/mpi/topo/lib_libmpi_la-dist_gr_create.lo `test -f 'src/mpi/topo/dist_gr_create.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_create.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create.Plo +# $(AM_V_CC)source='src/mpi/topo/dist_gr_create.c' object='src/mpi/topo/lib_libmpi_la-dist_gr_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-dist_gr_create.lo `test -f 'src/mpi/topo/dist_gr_create.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_create.c + +src/mpi/topo/lib_libmpi_la-dist_gr_neighb_count.lo: src/mpi/topo/dist_gr_neighb_count.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-dist_gr_neighb_count.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb_count.Tpo -c -o src/mpi/topo/lib_libmpi_la-dist_gr_neighb_count.lo `test -f 'src/mpi/topo/dist_gr_neighb_count.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_neighb_count.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb_count.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb_count.Plo +# $(AM_V_CC)source='src/mpi/topo/dist_gr_neighb_count.c' object='src/mpi/topo/lib_libmpi_la-dist_gr_neighb_count.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-dist_gr_neighb_count.lo `test -f 'src/mpi/topo/dist_gr_neighb_count.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_neighb_count.c + +src/mpi/topo/lib_libmpi_la-dist_gr_neighb.lo: src/mpi/topo/dist_gr_neighb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-dist_gr_neighb.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb.Tpo -c -o src/mpi/topo/lib_libmpi_la-dist_gr_neighb.lo `test -f 'src/mpi/topo/dist_gr_neighb.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_neighb.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb.Plo +# $(AM_V_CC)source='src/mpi/topo/dist_gr_neighb.c' object='src/mpi/topo/lib_libmpi_la-dist_gr_neighb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-dist_gr_neighb.lo `test -f 'src/mpi/topo/dist_gr_neighb.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_neighb.c + +src/binding/fortran/mpif_h/lib_libmpi_la-statusf2c.lo: src/binding/fortran/mpif_h/statusf2c.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpi_la-statusf2c.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusf2c.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpi_la-statusf2c.lo `test -f 'src/binding/fortran/mpif_h/statusf2c.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statusf2c.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusf2c.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusf2c.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/statusf2c.c' object='src/binding/fortran/mpif_h/lib_libmpi_la-statusf2c.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpi_la-statusf2c.lo `test -f 'src/binding/fortran/mpif_h/statusf2c.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statusf2c.c + +src/binding/fortran/mpif_h/lib_libmpi_la-statusc2f.lo: src/binding/fortran/mpif_h/statusc2f.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpi_la-statusc2f.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusc2f.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpi_la-statusc2f.lo `test -f 'src/binding/fortran/mpif_h/statusc2f.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statusc2f.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusc2f.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusc2f.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/statusc2f.c' object='src/binding/fortran/mpif_h/lib_libmpi_la-statusc2f.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpi_la-statusc2f.lo `test -f 'src/binding/fortran/mpif_h/statusc2f.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statusc2f.c + +src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_int.lo: src/binding/fortran/use_mpi/create_f90_int.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_int.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_int.Tpo -c -o src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_int.lo `test -f 'src/binding/fortran/use_mpi/create_f90_int.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_int.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_int.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_int.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/create_f90_int.c' object='src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_int.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_int.lo `test -f 'src/binding/fortran/use_mpi/create_f90_int.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_int.c + +src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_real.lo: src/binding/fortran/use_mpi/create_f90_real.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_real.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_real.Tpo -c -o src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_real.lo `test -f 'src/binding/fortran/use_mpi/create_f90_real.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_real.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_real.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_real.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/create_f90_real.c' object='src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_real.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_real.lo `test -f 'src/binding/fortran/use_mpi/create_f90_real.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_real.c + +src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_complex.lo: src/binding/fortran/use_mpi/create_f90_complex.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_complex.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_complex.Tpo -c -o src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_complex.lo `test -f 'src/binding/fortran/use_mpi/create_f90_complex.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_complex.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_complex.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_complex.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/create_f90_complex.c' object='src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_complex.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_complex.lo `test -f 'src/binding/fortran/use_mpi/create_f90_complex.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_complex.c + +src/glue/romio/lib_libmpi_la-all_romio_symbols.lo: src/glue/romio/all_romio_symbols.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/glue/romio/lib_libmpi_la-all_romio_symbols.lo -MD -MP -MF src/glue/romio/$(DEPDIR)/lib_libmpi_la-all_romio_symbols.Tpo -c -o src/glue/romio/lib_libmpi_la-all_romio_symbols.lo `test -f 'src/glue/romio/all_romio_symbols.c' || echo '$(srcdir)/'`src/glue/romio/all_romio_symbols.c + $(AM_V_at)$(am__mv) src/glue/romio/$(DEPDIR)/lib_libmpi_la-all_romio_symbols.Tpo src/glue/romio/$(DEPDIR)/lib_libmpi_la-all_romio_symbols.Plo +# $(AM_V_CC)source='src/glue/romio/all_romio_symbols.c' object='src/glue/romio/lib_libmpi_la-all_romio_symbols.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/glue/romio/lib_libmpi_la-all_romio_symbols.lo `test -f 'src/glue/romio/all_romio_symbols.c' || echo '$(srcdir)/'`src/glue/romio/all_romio_symbols.c + +src/mpi_t/lib_libmpi_la-cat_changed.lo: src/mpi_t/cat_changed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cat_changed.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_changed.Tpo -c -o src/mpi_t/lib_libmpi_la-cat_changed.lo `test -f 'src/mpi_t/cat_changed.c' || echo '$(srcdir)/'`src/mpi_t/cat_changed.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_changed.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_changed.Plo +# $(AM_V_CC)source='src/mpi_t/cat_changed.c' object='src/mpi_t/lib_libmpi_la-cat_changed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cat_changed.lo `test -f 'src/mpi_t/cat_changed.c' || echo '$(srcdir)/'`src/mpi_t/cat_changed.c + +src/mpi_t/lib_libmpi_la-cat_get_categories.lo: src/mpi_t/cat_get_categories.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cat_get_categories.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_categories.Tpo -c -o src/mpi_t/lib_libmpi_la-cat_get_categories.lo `test -f 'src/mpi_t/cat_get_categories.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_categories.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_categories.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_categories.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_categories.c' object='src/mpi_t/lib_libmpi_la-cat_get_categories.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cat_get_categories.lo `test -f 'src/mpi_t/cat_get_categories.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_categories.c + +src/mpi_t/lib_libmpi_la-cat_get_cvars.lo: src/mpi_t/cat_get_cvars.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cat_get_cvars.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_cvars.Tpo -c -o src/mpi_t/lib_libmpi_la-cat_get_cvars.lo `test -f 'src/mpi_t/cat_get_cvars.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_cvars.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_cvars.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_cvars.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_cvars.c' object='src/mpi_t/lib_libmpi_la-cat_get_cvars.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cat_get_cvars.lo `test -f 'src/mpi_t/cat_get_cvars.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_cvars.c + +src/mpi_t/lib_libmpi_la-cat_get_info.lo: src/mpi_t/cat_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cat_get_info.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_info.Tpo -c -o src/mpi_t/lib_libmpi_la-cat_get_info.lo `test -f 'src/mpi_t/cat_get_info.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_info.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_info.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_info.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_info.c' object='src/mpi_t/lib_libmpi_la-cat_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cat_get_info.lo `test -f 'src/mpi_t/cat_get_info.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_info.c + +src/mpi_t/lib_libmpi_la-cat_get_num.lo: src/mpi_t/cat_get_num.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cat_get_num.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_num.Tpo -c -o src/mpi_t/lib_libmpi_la-cat_get_num.lo `test -f 'src/mpi_t/cat_get_num.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_num.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_num.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_num.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_num.c' object='src/mpi_t/lib_libmpi_la-cat_get_num.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cat_get_num.lo `test -f 'src/mpi_t/cat_get_num.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_num.c + +src/mpi_t/lib_libmpi_la-cat_get_pvars.lo: src/mpi_t/cat_get_pvars.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cat_get_pvars.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_pvars.Tpo -c -o src/mpi_t/lib_libmpi_la-cat_get_pvars.lo `test -f 'src/mpi_t/cat_get_pvars.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_pvars.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_pvars.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_pvars.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_pvars.c' object='src/mpi_t/lib_libmpi_la-cat_get_pvars.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cat_get_pvars.lo `test -f 'src/mpi_t/cat_get_pvars.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_pvars.c + +src/mpi_t/lib_libmpi_la-cvar_get_info.lo: src/mpi_t/cvar_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cvar_get_info.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_info.Tpo -c -o src/mpi_t/lib_libmpi_la-cvar_get_info.lo `test -f 'src/mpi_t/cvar_get_info.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_info.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_info.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_info.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_get_info.c' object='src/mpi_t/lib_libmpi_la-cvar_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cvar_get_info.lo `test -f 'src/mpi_t/cvar_get_info.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_info.c + +src/mpi_t/lib_libmpi_la-cvar_get_num.lo: src/mpi_t/cvar_get_num.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cvar_get_num.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_num.Tpo -c -o src/mpi_t/lib_libmpi_la-cvar_get_num.lo `test -f 'src/mpi_t/cvar_get_num.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_num.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_num.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_num.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_get_num.c' object='src/mpi_t/lib_libmpi_la-cvar_get_num.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cvar_get_num.lo `test -f 'src/mpi_t/cvar_get_num.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_num.c + +src/mpi_t/lib_libmpi_la-cvar_handle_alloc.lo: src/mpi_t/cvar_handle_alloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cvar_handle_alloc.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_alloc.Tpo -c -o src/mpi_t/lib_libmpi_la-cvar_handle_alloc.lo `test -f 'src/mpi_t/cvar_handle_alloc.c' || echo '$(srcdir)/'`src/mpi_t/cvar_handle_alloc.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_alloc.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_alloc.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_handle_alloc.c' object='src/mpi_t/lib_libmpi_la-cvar_handle_alloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cvar_handle_alloc.lo `test -f 'src/mpi_t/cvar_handle_alloc.c' || echo '$(srcdir)/'`src/mpi_t/cvar_handle_alloc.c + +src/mpi_t/lib_libmpi_la-cvar_handle_free.lo: src/mpi_t/cvar_handle_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cvar_handle_free.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_free.Tpo -c -o src/mpi_t/lib_libmpi_la-cvar_handle_free.lo `test -f 'src/mpi_t/cvar_handle_free.c' || echo '$(srcdir)/'`src/mpi_t/cvar_handle_free.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_free.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_free.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_handle_free.c' object='src/mpi_t/lib_libmpi_la-cvar_handle_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cvar_handle_free.lo `test -f 'src/mpi_t/cvar_handle_free.c' || echo '$(srcdir)/'`src/mpi_t/cvar_handle_free.c + +src/mpi_t/lib_libmpi_la-cvar_read.lo: src/mpi_t/cvar_read.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cvar_read.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_read.Tpo -c -o src/mpi_t/lib_libmpi_la-cvar_read.lo `test -f 'src/mpi_t/cvar_read.c' || echo '$(srcdir)/'`src/mpi_t/cvar_read.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_read.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_read.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_read.c' object='src/mpi_t/lib_libmpi_la-cvar_read.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cvar_read.lo `test -f 'src/mpi_t/cvar_read.c' || echo '$(srcdir)/'`src/mpi_t/cvar_read.c + +src/mpi_t/lib_libmpi_la-cvar_write.lo: src/mpi_t/cvar_write.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cvar_write.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_write.Tpo -c -o src/mpi_t/lib_libmpi_la-cvar_write.lo `test -f 'src/mpi_t/cvar_write.c' || echo '$(srcdir)/'`src/mpi_t/cvar_write.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_write.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_write.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_write.c' object='src/mpi_t/lib_libmpi_la-cvar_write.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cvar_write.lo `test -f 'src/mpi_t/cvar_write.c' || echo '$(srcdir)/'`src/mpi_t/cvar_write.c + +src/mpi_t/lib_libmpi_la-enum_get_info.lo: src/mpi_t/enum_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-enum_get_info.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_info.Tpo -c -o src/mpi_t/lib_libmpi_la-enum_get_info.lo `test -f 'src/mpi_t/enum_get_info.c' || echo '$(srcdir)/'`src/mpi_t/enum_get_info.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_info.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_info.Plo +# $(AM_V_CC)source='src/mpi_t/enum_get_info.c' object='src/mpi_t/lib_libmpi_la-enum_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-enum_get_info.lo `test -f 'src/mpi_t/enum_get_info.c' || echo '$(srcdir)/'`src/mpi_t/enum_get_info.c + +src/mpi_t/lib_libmpi_la-enum_get_item.lo: src/mpi_t/enum_get_item.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-enum_get_item.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_item.Tpo -c -o src/mpi_t/lib_libmpi_la-enum_get_item.lo `test -f 'src/mpi_t/enum_get_item.c' || echo '$(srcdir)/'`src/mpi_t/enum_get_item.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_item.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_item.Plo +# $(AM_V_CC)source='src/mpi_t/enum_get_item.c' object='src/mpi_t/lib_libmpi_la-enum_get_item.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-enum_get_item.lo `test -f 'src/mpi_t/enum_get_item.c' || echo '$(srcdir)/'`src/mpi_t/enum_get_item.c + +src/mpi_t/lib_libmpi_la-mpit_finalize.lo: src/mpi_t/mpit_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-mpit_finalize.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_finalize.Tpo -c -o src/mpi_t/lib_libmpi_la-mpit_finalize.lo `test -f 'src/mpi_t/mpit_finalize.c' || echo '$(srcdir)/'`src/mpi_t/mpit_finalize.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_finalize.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_finalize.Plo +# $(AM_V_CC)source='src/mpi_t/mpit_finalize.c' object='src/mpi_t/lib_libmpi_la-mpit_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-mpit_finalize.lo `test -f 'src/mpi_t/mpit_finalize.c' || echo '$(srcdir)/'`src/mpi_t/mpit_finalize.c + +src/mpi_t/lib_libmpi_la-mpit_initthread.lo: src/mpi_t/mpit_initthread.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-mpit_initthread.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_initthread.Tpo -c -o src/mpi_t/lib_libmpi_la-mpit_initthread.lo `test -f 'src/mpi_t/mpit_initthread.c' || echo '$(srcdir)/'`src/mpi_t/mpit_initthread.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_initthread.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_initthread.Plo +# $(AM_V_CC)source='src/mpi_t/mpit_initthread.c' object='src/mpi_t/lib_libmpi_la-mpit_initthread.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-mpit_initthread.lo `test -f 'src/mpi_t/mpit_initthread.c' || echo '$(srcdir)/'`src/mpi_t/mpit_initthread.c + +src/mpi_t/lib_libmpi_la-pvar_get_info.lo: src/mpi_t/pvar_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_get_info.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_info.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_get_info.lo `test -f 'src/mpi_t/pvar_get_info.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_info.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_info.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_info.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_get_info.c' object='src/mpi_t/lib_libmpi_la-pvar_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_get_info.lo `test -f 'src/mpi_t/pvar_get_info.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_info.c + +src/mpi_t/lib_libmpi_la-pvar_get_num.lo: src/mpi_t/pvar_get_num.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_get_num.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_num.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_get_num.lo `test -f 'src/mpi_t/pvar_get_num.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_num.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_num.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_num.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_get_num.c' object='src/mpi_t/lib_libmpi_la-pvar_get_num.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_get_num.lo `test -f 'src/mpi_t/pvar_get_num.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_num.c + +src/mpi_t/lib_libmpi_la-pvar_handle_alloc.lo: src/mpi_t/pvar_handle_alloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_handle_alloc.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_alloc.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_handle_alloc.lo `test -f 'src/mpi_t/pvar_handle_alloc.c' || echo '$(srcdir)/'`src/mpi_t/pvar_handle_alloc.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_alloc.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_alloc.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_handle_alloc.c' object='src/mpi_t/lib_libmpi_la-pvar_handle_alloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_handle_alloc.lo `test -f 'src/mpi_t/pvar_handle_alloc.c' || echo '$(srcdir)/'`src/mpi_t/pvar_handle_alloc.c + +src/mpi_t/lib_libmpi_la-pvar_handle_free.lo: src/mpi_t/pvar_handle_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_handle_free.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_free.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_handle_free.lo `test -f 'src/mpi_t/pvar_handle_free.c' || echo '$(srcdir)/'`src/mpi_t/pvar_handle_free.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_free.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_free.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_handle_free.c' object='src/mpi_t/lib_libmpi_la-pvar_handle_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_handle_free.lo `test -f 'src/mpi_t/pvar_handle_free.c' || echo '$(srcdir)/'`src/mpi_t/pvar_handle_free.c + +src/mpi_t/lib_libmpi_la-pvar_read.lo: src/mpi_t/pvar_read.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_read.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_read.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_read.lo `test -f 'src/mpi_t/pvar_read.c' || echo '$(srcdir)/'`src/mpi_t/pvar_read.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_read.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_read.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_read.c' object='src/mpi_t/lib_libmpi_la-pvar_read.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_read.lo `test -f 'src/mpi_t/pvar_read.c' || echo '$(srcdir)/'`src/mpi_t/pvar_read.c + +src/mpi_t/lib_libmpi_la-pvar_readreset.lo: src/mpi_t/pvar_readreset.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_readreset.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_readreset.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_readreset.lo `test -f 'src/mpi_t/pvar_readreset.c' || echo '$(srcdir)/'`src/mpi_t/pvar_readreset.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_readreset.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_readreset.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_readreset.c' object='src/mpi_t/lib_libmpi_la-pvar_readreset.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_readreset.lo `test -f 'src/mpi_t/pvar_readreset.c' || echo '$(srcdir)/'`src/mpi_t/pvar_readreset.c + +src/mpi_t/lib_libmpi_la-pvar_reset.lo: src/mpi_t/pvar_reset.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_reset.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_reset.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_reset.lo `test -f 'src/mpi_t/pvar_reset.c' || echo '$(srcdir)/'`src/mpi_t/pvar_reset.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_reset.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_reset.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_reset.c' object='src/mpi_t/lib_libmpi_la-pvar_reset.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_reset.lo `test -f 'src/mpi_t/pvar_reset.c' || echo '$(srcdir)/'`src/mpi_t/pvar_reset.c + +src/mpi_t/lib_libmpi_la-pvar_session_create.lo: src/mpi_t/pvar_session_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_session_create.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_create.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_session_create.lo `test -f 'src/mpi_t/pvar_session_create.c' || echo '$(srcdir)/'`src/mpi_t/pvar_session_create.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_create.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_create.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_session_create.c' object='src/mpi_t/lib_libmpi_la-pvar_session_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_session_create.lo `test -f 'src/mpi_t/pvar_session_create.c' || echo '$(srcdir)/'`src/mpi_t/pvar_session_create.c + +src/mpi_t/lib_libmpi_la-pvar_session_free.lo: src/mpi_t/pvar_session_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_session_free.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_free.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_session_free.lo `test -f 'src/mpi_t/pvar_session_free.c' || echo '$(srcdir)/'`src/mpi_t/pvar_session_free.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_free.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_free.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_session_free.c' object='src/mpi_t/lib_libmpi_la-pvar_session_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_session_free.lo `test -f 'src/mpi_t/pvar_session_free.c' || echo '$(srcdir)/'`src/mpi_t/pvar_session_free.c + +src/mpi_t/lib_libmpi_la-pvar_start.lo: src/mpi_t/pvar_start.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_start.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_start.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_start.lo `test -f 'src/mpi_t/pvar_start.c' || echo '$(srcdir)/'`src/mpi_t/pvar_start.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_start.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_start.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_start.c' object='src/mpi_t/lib_libmpi_la-pvar_start.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_start.lo `test -f 'src/mpi_t/pvar_start.c' || echo '$(srcdir)/'`src/mpi_t/pvar_start.c + +src/mpi_t/lib_libmpi_la-pvar_stop.lo: src/mpi_t/pvar_stop.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_stop.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_stop.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_stop.lo `test -f 'src/mpi_t/pvar_stop.c' || echo '$(srcdir)/'`src/mpi_t/pvar_stop.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_stop.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_stop.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_stop.c' object='src/mpi_t/lib_libmpi_la-pvar_stop.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_stop.lo `test -f 'src/mpi_t/pvar_stop.c' || echo '$(srcdir)/'`src/mpi_t/pvar_stop.c + +src/mpi_t/lib_libmpi_la-pvar_write.lo: src/mpi_t/pvar_write.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_write.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_write.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_write.lo `test -f 'src/mpi_t/pvar_write.c' || echo '$(srcdir)/'`src/mpi_t/pvar_write.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_write.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_write.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_write.c' object='src/mpi_t/lib_libmpi_la-pvar_write.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_write.lo `test -f 'src/mpi_t/pvar_write.c' || echo '$(srcdir)/'`src/mpi_t/pvar_write.c + +src/mpi_t/lib_libmpi_la-cat_get_index.lo: src/mpi_t/cat_get_index.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cat_get_index.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_index.Tpo -c -o src/mpi_t/lib_libmpi_la-cat_get_index.lo `test -f 'src/mpi_t/cat_get_index.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_index.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_index.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_index.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_index.c' object='src/mpi_t/lib_libmpi_la-cat_get_index.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cat_get_index.lo `test -f 'src/mpi_t/cat_get_index.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_index.c + +src/mpi_t/lib_libmpi_la-cvar_get_index.lo: src/mpi_t/cvar_get_index.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-cvar_get_index.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_index.Tpo -c -o src/mpi_t/lib_libmpi_la-cvar_get_index.lo `test -f 'src/mpi_t/cvar_get_index.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_index.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_index.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_index.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_get_index.c' object='src/mpi_t/lib_libmpi_la-cvar_get_index.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-cvar_get_index.lo `test -f 'src/mpi_t/cvar_get_index.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_index.c + +src/mpi_t/lib_libmpi_la-pvar_get_index.lo: src/mpi_t/pvar_get_index.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-pvar_get_index.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_index.Tpo -c -o src/mpi_t/lib_libmpi_la-pvar_get_index.lo `test -f 'src/mpi_t/pvar_get_index.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_index.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_index.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_index.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_get_index.c' object='src/mpi_t/lib_libmpi_la-pvar_get_index.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-pvar_get_index.lo `test -f 'src/mpi_t/pvar_get_index.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_index.c + +src/mpi/attr/lib_libmpi_la-attrutil.lo: src/mpi/attr/attrutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-attrutil.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attrutil.Tpo -c -o src/mpi/attr/lib_libmpi_la-attrutil.lo `test -f 'src/mpi/attr/attrutil.c' || echo '$(srcdir)/'`src/mpi/attr/attrutil.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attrutil.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attrutil.Plo +# $(AM_V_CC)source='src/mpi/attr/attrutil.c' object='src/mpi/attr/lib_libmpi_la-attrutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-attrutil.lo `test -f 'src/mpi/attr/attrutil.c' || echo '$(srcdir)/'`src/mpi/attr/attrutil.c + +src/mpi/attr/lib_libmpi_la-dup_fn.lo: src/mpi/attr/dup_fn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libmpi_la-dup_fn.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libmpi_la-dup_fn.Tpo -c -o src/mpi/attr/lib_libmpi_la-dup_fn.lo `test -f 'src/mpi/attr/dup_fn.c' || echo '$(srcdir)/'`src/mpi/attr/dup_fn.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libmpi_la-dup_fn.Tpo src/mpi/attr/$(DEPDIR)/lib_libmpi_la-dup_fn.Plo +# $(AM_V_CC)source='src/mpi/attr/dup_fn.c' object='src/mpi/attr/lib_libmpi_la-dup_fn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libmpi_la-dup_fn.lo `test -f 'src/mpi/attr/dup_fn.c' || echo '$(srcdir)/'`src/mpi/attr/dup_fn.c + +src/mpi/coll/allgather/lib_libmpi_la-allgather_allcomm_nb.lo: src/mpi/coll/allgather/allgather_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libmpi_la-allgather_allcomm_nb.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_allcomm_nb.Tpo -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_allcomm_nb.lo `test -f 'src/mpi/coll/allgather/allgather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_allcomm_nb.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_allcomm_nb.c' object='src/mpi/coll/allgather/lib_libmpi_la-allgather_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_allcomm_nb.lo `test -f 'src/mpi/coll/allgather/allgather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_allcomm_nb.c + +src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_recursive_doubling.lo: src/mpi/coll/allgather/allgather_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_recursive_doubling.Tpo -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allgather/allgather_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_recursive_doubling.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_intra_recursive_doubling.c' object='src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allgather/allgather_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_recursive_doubling.c + +src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_brucks.lo: src/mpi/coll/allgather/allgather_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_brucks.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_brucks.Tpo -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_brucks.lo `test -f 'src/mpi/coll/allgather/allgather_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_brucks.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_intra_brucks.c' object='src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_brucks.lo `test -f 'src/mpi/coll/allgather/allgather_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_brucks.c + +src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_ring.lo: src/mpi/coll/allgather/allgather_intra_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_ring.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_ring.Tpo -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_ring.lo `test -f 'src/mpi/coll/allgather/allgather_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_ring.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_intra_ring.c' object='src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_intra_ring.lo `test -f 'src/mpi/coll/allgather/allgather_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_ring.c + +src/mpi/coll/allgather/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.lo: src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.Tpo -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.lo `test -f 'src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c' object='src/mpi/coll/allgather/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.lo `test -f 'src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c + +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_allcomm_nb.lo: src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_allcomm_nb.Tpo -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_allcomm_nb.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_allcomm_nb.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c' object='src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_allcomm_nb.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c + +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_recursive_doubling.lo: src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_recursive_doubling.Tpo -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_recursive_doubling.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c' object='src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c + +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_brucks.lo: src/mpi/coll/allgatherv/allgatherv_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_brucks.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_brucks.Tpo -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_brucks.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_brucks.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_intra_brucks.c' object='src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_brucks.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_brucks.c + +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_ring.lo: src/mpi/coll/allgatherv/allgatherv_intra_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_ring.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_ring.Tpo -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_ring.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_ring.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_intra_ring.c' object='src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_intra_ring.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_ring.c + +src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.lo: src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.Tpo -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c' object='src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c + +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_allcomm_nb.lo: src/mpi/coll/allreduce/allreduce_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libmpi_la-allreduce_allcomm_nb.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_allcomm_nb.Tpo -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_allcomm_nb.lo `test -f 'src/mpi/coll/allreduce/allreduce_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_allcomm_nb.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_allcomm_nb.c' object='src/mpi/coll/allreduce/lib_libmpi_la-allreduce_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_allcomm_nb.lo `test -f 'src/mpi/coll/allreduce/allreduce_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_allcomm_nb.c + +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_recursive_doubling.lo: src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_recursive_doubling.Tpo -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_recursive_doubling.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c' object='src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c + +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.lo: src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.Tpo -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c' object='src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c + +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_smp.lo: src/mpi/coll/allreduce/allreduce_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_smp.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_smp.Tpo -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_smp.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_smp.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_intra_smp.c' object='src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_intra_smp.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_smp.c + +src/mpi/coll/allreduce/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.lo: src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.Tpo -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.lo `test -f 'src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c' object='src/mpi/coll/allreduce/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.lo `test -f 'src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c + +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_allcomm_nb.lo: src/mpi/coll/alltoall/alltoall_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libmpi_la-alltoall_allcomm_nb.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_allcomm_nb.Tpo -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_allcomm_nb.lo `test -f 'src/mpi/coll/alltoall/alltoall_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_allcomm_nb.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_allcomm_nb.c' object='src/mpi/coll/alltoall/lib_libmpi_la-alltoall_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_allcomm_nb.lo `test -f 'src/mpi/coll/alltoall/alltoall_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_allcomm_nb.c + +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo: src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.Tpo -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c' object='src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c + +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_brucks.lo: src/mpi/coll/alltoall/alltoall_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_brucks.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_brucks.Tpo -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_brucks.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_brucks.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_intra_brucks.c' object='src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_brucks.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_brucks.c + +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_scattered.lo: src/mpi/coll/alltoall/alltoall_intra_scattered.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_scattered.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_scattered.Tpo -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_scattered.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_scattered.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_scattered.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_scattered.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_intra_scattered.c' object='src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_scattered.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_scattered.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_scattered.c + +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise.lo: src/mpi/coll/alltoall/alltoall_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise.Tpo -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_intra_pairwise.c' object='src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_intra_pairwise.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_pairwise.c + +src/mpi/coll/alltoall/lib_libmpi_la-alltoall_inter_pairwise_exchange.lo: src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libmpi_la-alltoall_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_inter_pairwise_exchange.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c' object='src/mpi/coll/alltoall/lib_libmpi_la-alltoall_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libmpi_la-alltoall_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c + +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_allcomm_nb.lo: src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_allcomm_nb.Tpo -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_allcomm_nb.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_allcomm_nb.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c' object='src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_allcomm_nb.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c + +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo: src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Tpo -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c' object='src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c + +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_scattered.lo: src/mpi/coll/alltoallv/alltoallv_intra_scattered.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_scattered.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_scattered.Tpo -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_scattered.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_intra_scattered.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_scattered.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_scattered.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv_intra_scattered.c' object='src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_scattered.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_intra_scattered.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_intra_scattered.c + +src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_inter_pairwise_exchange.lo: src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_inter_pairwise_exchange.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c' object='src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libmpi_la-alltoallv_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c + +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_allcomm_nb.lo: src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_allcomm_nb.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_allcomm_nb.Tpo -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_allcomm_nb.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_allcomm_nb.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c' object='src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_allcomm_nb.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c + +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo: src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Tpo -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c' object='src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c + +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_scattered.lo: src/mpi/coll/alltoallw/alltoallw_intra_scattered.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_scattered.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_scattered.Tpo -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_scattered.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_intra_scattered.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_scattered.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_scattered.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw_intra_scattered.c' object='src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_scattered.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_intra_scattered.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_intra_scattered.c + +src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_inter_pairwise_exchange.lo: src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_inter_pairwise_exchange.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c' object='src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libmpi_la-alltoallw_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c + +src/mpi/coll/barrier/lib_libmpi_la-barrier_allcomm_nb.lo: src/mpi/coll/barrier/barrier_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libmpi_la-barrier_allcomm_nb.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_allcomm_nb.Tpo -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier_allcomm_nb.lo `test -f 'src/mpi/coll/barrier/barrier_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_allcomm_nb.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier_allcomm_nb.c' object='src/mpi/coll/barrier/lib_libmpi_la-barrier_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier_allcomm_nb.lo `test -f 'src/mpi/coll/barrier/barrier_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_allcomm_nb.c + +src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_dissemination.lo: src/mpi/coll/barrier/barrier_intra_dissemination.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_dissemination.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_dissemination.Tpo -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_dissemination.lo `test -f 'src/mpi/coll/barrier/barrier_intra_dissemination.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_intra_dissemination.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_dissemination.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_dissemination.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier_intra_dissemination.c' object='src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_dissemination.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_dissemination.lo `test -f 'src/mpi/coll/barrier/barrier_intra_dissemination.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_intra_dissemination.c + +src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_smp.lo: src/mpi/coll/barrier/barrier_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_smp.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_smp.Tpo -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_smp.lo `test -f 'src/mpi/coll/barrier/barrier_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_smp.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier_intra_smp.c' object='src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier_intra_smp.lo `test -f 'src/mpi/coll/barrier/barrier_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_intra_smp.c + +src/mpi/coll/barrier/lib_libmpi_la-barrier_inter_bcast.lo: src/mpi/coll/barrier/barrier_inter_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libmpi_la-barrier_inter_bcast.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_inter_bcast.Tpo -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier_inter_bcast.lo `test -f 'src/mpi/coll/barrier/barrier_inter_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_inter_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_inter_bcast.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_inter_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier_inter_bcast.c' object='src/mpi/coll/barrier/lib_libmpi_la-barrier_inter_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libmpi_la-barrier_inter_bcast.lo `test -f 'src/mpi/coll/barrier/barrier_inter_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_inter_bcast.c + +src/mpi/coll/bcast/lib_libmpi_la-bcast_utils.lo: src/mpi/coll/bcast/bcast_utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libmpi_la-bcast_utils.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_utils.Tpo -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_utils.lo `test -f 'src/mpi/coll/bcast/bcast_utils.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_utils.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_utils.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_utils.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_utils.c' object='src/mpi/coll/bcast/lib_libmpi_la-bcast_utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_utils.lo `test -f 'src/mpi/coll/bcast/bcast_utils.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_utils.c + +src/mpi/coll/bcast/lib_libmpi_la-bcast_allcomm_nb.lo: src/mpi/coll/bcast/bcast_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libmpi_la-bcast_allcomm_nb.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_allcomm_nb.Tpo -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_allcomm_nb.lo `test -f 'src/mpi/coll/bcast/bcast_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_allcomm_nb.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_allcomm_nb.c' object='src/mpi/coll/bcast/lib_libmpi_la-bcast_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_allcomm_nb.lo `test -f 'src/mpi/coll/bcast/bcast_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_allcomm_nb.c + +src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_binomial.lo: src/mpi/coll/bcast/bcast_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_binomial.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_binomial.Tpo -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_binomial.lo `test -f 'src/mpi/coll/bcast/bcast_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_binomial.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_intra_binomial.c' object='src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_binomial.lo `test -f 'src/mpi/coll/bcast/bcast_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_binomial.c + +src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo: src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Tpo -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo `test -f 'src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c' object='src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo `test -f 'src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c + +src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_ring_allgather.lo: src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_ring_allgather.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_ring_allgather.Tpo -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_ring_allgather.lo `test -f 'src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_ring_allgather.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_ring_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c' object='src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_ring_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_scatter_ring_allgather.lo `test -f 'src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c + +src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_smp.lo: src/mpi/coll/bcast/bcast_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_smp.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_smp.Tpo -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_smp.lo `test -f 'src/mpi/coll/bcast/bcast_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_smp.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_intra_smp.c' object='src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_intra_smp.lo `test -f 'src/mpi/coll/bcast/bcast_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_smp.c + +src/mpi/coll/bcast/lib_libmpi_la-bcast_inter_remote_send_local_bcast.lo: src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libmpi_la-bcast_inter_remote_send_local_bcast.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_inter_remote_send_local_bcast.Tpo -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_inter_remote_send_local_bcast.lo `test -f 'src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_inter_remote_send_local_bcast.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_inter_remote_send_local_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c' object='src/mpi/coll/bcast/lib_libmpi_la-bcast_inter_remote_send_local_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libmpi_la-bcast_inter_remote_send_local_bcast.lo `test -f 'src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c + +src/mpi/coll/exscan/lib_libmpi_la-exscan_allcomm_nb.lo: src/mpi/coll/exscan/exscan_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/exscan/lib_libmpi_la-exscan_allcomm_nb.lo -MD -MP -MF src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_allcomm_nb.Tpo -c -o src/mpi/coll/exscan/lib_libmpi_la-exscan_allcomm_nb.lo `test -f 'src/mpi/coll/exscan/exscan_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_allcomm_nb.Tpo src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/exscan/exscan_allcomm_nb.c' object='src/mpi/coll/exscan/lib_libmpi_la-exscan_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/exscan/lib_libmpi_la-exscan_allcomm_nb.lo `test -f 'src/mpi/coll/exscan/exscan_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan_allcomm_nb.c + +src/mpi/coll/exscan/lib_libmpi_la-exscan_intra_recursive_doubling.lo: src/mpi/coll/exscan/exscan_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/exscan/lib_libmpi_la-exscan_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_intra_recursive_doubling.Tpo -c -o src/mpi/coll/exscan/lib_libmpi_la-exscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/exscan/exscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_intra_recursive_doubling.Tpo src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/exscan/exscan_intra_recursive_doubling.c' object='src/mpi/coll/exscan/lib_libmpi_la-exscan_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/exscan/lib_libmpi_la-exscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/exscan/exscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan_intra_recursive_doubling.c + +src/mpi/coll/gather/lib_libmpi_la-gather_allcomm_nb.lo: src/mpi/coll/gather/gather_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libmpi_la-gather_allcomm_nb.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_allcomm_nb.Tpo -c -o src/mpi/coll/gather/lib_libmpi_la-gather_allcomm_nb.lo `test -f 'src/mpi/coll/gather/gather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_allcomm_nb.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather_allcomm_nb.c' object='src/mpi/coll/gather/lib_libmpi_la-gather_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libmpi_la-gather_allcomm_nb.lo `test -f 'src/mpi/coll/gather/gather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_allcomm_nb.c + +src/mpi/coll/gather/lib_libmpi_la-gather_intra_binomial.lo: src/mpi/coll/gather/gather_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libmpi_la-gather_intra_binomial.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_intra_binomial.Tpo -c -o src/mpi/coll/gather/lib_libmpi_la-gather_intra_binomial.lo `test -f 'src/mpi/coll/gather/gather_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_intra_binomial.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather_intra_binomial.c' object='src/mpi/coll/gather/lib_libmpi_la-gather_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libmpi_la-gather_intra_binomial.lo `test -f 'src/mpi/coll/gather/gather_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_intra_binomial.c + +src/mpi/coll/gather/lib_libmpi_la-gather_inter_linear.lo: src/mpi/coll/gather/gather_inter_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libmpi_la-gather_inter_linear.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_linear.Tpo -c -o src/mpi/coll/gather/lib_libmpi_la-gather_inter_linear.lo `test -f 'src/mpi/coll/gather/gather_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_inter_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_linear.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather_inter_linear.c' object='src/mpi/coll/gather/lib_libmpi_la-gather_inter_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libmpi_la-gather_inter_linear.lo `test -f 'src/mpi/coll/gather/gather_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_inter_linear.c + +src/mpi/coll/gather/lib_libmpi_la-gather_inter_local_gather_remote_send.lo: src/mpi/coll/gather/gather_inter_local_gather_remote_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libmpi_la-gather_inter_local_gather_remote_send.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_local_gather_remote_send.Tpo -c -o src/mpi/coll/gather/lib_libmpi_la-gather_inter_local_gather_remote_send.lo `test -f 'src/mpi/coll/gather/gather_inter_local_gather_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_inter_local_gather_remote_send.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_local_gather_remote_send.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_local_gather_remote_send.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather_inter_local_gather_remote_send.c' object='src/mpi/coll/gather/lib_libmpi_la-gather_inter_local_gather_remote_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libmpi_la-gather_inter_local_gather_remote_send.lo `test -f 'src/mpi/coll/gather/gather_inter_local_gather_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_inter_local_gather_remote_send.c + +src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_nb.lo: src/mpi/coll/gatherv/gatherv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_nb.Tpo -c -o src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_nb.lo `test -f 'src/mpi/coll/gatherv/gatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_nb.Tpo src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/gatherv/gatherv_allcomm_nb.c' object='src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_nb.lo `test -f 'src/mpi/coll/gatherv/gatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv_allcomm_nb.c + +src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_linear.lo: src/mpi/coll/gatherv/gatherv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_linear.Tpo -c -o src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_linear.lo `test -f 'src/mpi/coll/gatherv/gatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_linear.Tpo src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/gatherv/gatherv_allcomm_linear.c' object='src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gatherv/lib_libmpi_la-gatherv_allcomm_linear.lo `test -f 'src/mpi/coll/gatherv/gatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv_allcomm_linear.c + +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_allcomm_nb.lo: src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_allcomm_nb.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_allcomm_nb.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_allcomm_nb.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_allcomm_nb.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c' object='src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_allcomm_nb.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c + +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_halving.lo: src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_halving.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_halving.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_halving.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_halving.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c' object='src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_halving.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c + +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_pairwise.lo: src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_pairwise.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_pairwise.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_pairwise.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_pairwise.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c' object='src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_pairwise.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c + +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.lo: src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c' object='src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c + +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_noncommutative.lo: src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_noncommutative.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_noncommutative.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_noncommutative.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_noncommutative.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_noncommutative.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c' object='src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_noncommutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_intra_noncommutative.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c + +src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo: src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c' object='src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c + +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_allcomm_nb.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_allcomm_nb.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_allcomm_nb.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_allcomm_nb.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_allcomm_nb.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c' object='src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_allcomm_nb.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c + +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c' object='src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c + +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_pairwise.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_pairwise.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_pairwise.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_pairwise.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_pairwise.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c' object='src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_pairwise.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c + +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c' object='src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c + +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c' object='src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c + +src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c' object='src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c + +src/mpi/coll/reduce/lib_libmpi_la-reduce_allcomm_nb.lo: src/mpi/coll/reduce/reduce_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libmpi_la-reduce_allcomm_nb.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_allcomm_nb.Tpo -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_allcomm_nb.lo `test -f 'src/mpi/coll/reduce/reduce_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_allcomm_nb.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_allcomm_nb.c' object='src/mpi/coll/reduce/lib_libmpi_la-reduce_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_allcomm_nb.lo `test -f 'src/mpi/coll/reduce/reduce_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_allcomm_nb.c + +src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_binomial.lo: src/mpi/coll/reduce/reduce_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_binomial.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_binomial.Tpo -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_binomial.lo `test -f 'src/mpi/coll/reduce/reduce_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_binomial.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_intra_binomial.c' object='src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_binomial.lo `test -f 'src/mpi/coll/reduce/reduce_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_binomial.c + +src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_reduce_scatter_gather.lo: src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_reduce_scatter_gather.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_reduce_scatter_gather.Tpo -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_reduce_scatter_gather.lo `test -f 'src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_reduce_scatter_gather.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_reduce_scatter_gather.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c' object='src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_reduce_scatter_gather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_reduce_scatter_gather.lo `test -f 'src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c + +src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_smp.lo: src/mpi/coll/reduce/reduce_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_smp.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_smp.Tpo -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_smp.lo `test -f 'src/mpi/coll/reduce/reduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_smp.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_intra_smp.c' object='src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_intra_smp.lo `test -f 'src/mpi/coll/reduce/reduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_smp.c + +src/mpi/coll/reduce/lib_libmpi_la-reduce_inter_local_reduce_remote_send.lo: src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libmpi_la-reduce_inter_local_reduce_remote_send.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_inter_local_reduce_remote_send.Tpo -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_inter_local_reduce_remote_send.lo `test -f 'src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_inter_local_reduce_remote_send.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_inter_local_reduce_remote_send.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c' object='src/mpi/coll/reduce/lib_libmpi_la-reduce_inter_local_reduce_remote_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libmpi_la-reduce_inter_local_reduce_remote_send.lo `test -f 'src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c + +src/mpi/coll/scan/lib_libmpi_la-scan_allcomm_nb.lo: src/mpi/coll/scan/scan_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scan/lib_libmpi_la-scan_allcomm_nb.lo -MD -MP -MF src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_allcomm_nb.Tpo -c -o src/mpi/coll/scan/lib_libmpi_la-scan_allcomm_nb.lo `test -f 'src/mpi/coll/scan/scan_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_allcomm_nb.Tpo src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/scan/scan_allcomm_nb.c' object='src/mpi/coll/scan/lib_libmpi_la-scan_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scan/lib_libmpi_la-scan_allcomm_nb.lo `test -f 'src/mpi/coll/scan/scan_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_allcomm_nb.c + +src/mpi/coll/scan/lib_libmpi_la-scan_intra_recursive_doubling.lo: src/mpi/coll/scan/scan_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scan/lib_libmpi_la-scan_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_recursive_doubling.Tpo -c -o src/mpi/coll/scan/lib_libmpi_la-scan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/scan/scan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_recursive_doubling.Tpo src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/scan/scan_intra_recursive_doubling.c' object='src/mpi/coll/scan/lib_libmpi_la-scan_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scan/lib_libmpi_la-scan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/scan/scan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_intra_recursive_doubling.c + +src/mpi/coll/scan/lib_libmpi_la-scan_intra_smp.lo: src/mpi/coll/scan/scan_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scan/lib_libmpi_la-scan_intra_smp.lo -MD -MP -MF src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_smp.Tpo -c -o src/mpi/coll/scan/lib_libmpi_la-scan_intra_smp.lo `test -f 'src/mpi/coll/scan/scan_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_smp.Tpo src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/scan/scan_intra_smp.c' object='src/mpi/coll/scan/lib_libmpi_la-scan_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scan/lib_libmpi_la-scan_intra_smp.lo `test -f 'src/mpi/coll/scan/scan_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_intra_smp.c + +src/mpi/coll/scatter/lib_libmpi_la-scatter_allcomm_nb.lo: src/mpi/coll/scatter/scatter_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libmpi_la-scatter_allcomm_nb.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_allcomm_nb.Tpo -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter_allcomm_nb.lo `test -f 'src/mpi/coll/scatter/scatter_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_allcomm_nb.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter_allcomm_nb.c' object='src/mpi/coll/scatter/lib_libmpi_la-scatter_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter_allcomm_nb.lo `test -f 'src/mpi/coll/scatter/scatter_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_allcomm_nb.c + +src/mpi/coll/scatter/lib_libmpi_la-scatter_intra_binomial.lo: src/mpi/coll/scatter/scatter_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libmpi_la-scatter_intra_binomial.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_intra_binomial.Tpo -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter_intra_binomial.lo `test -f 'src/mpi/coll/scatter/scatter_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_intra_binomial.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter_intra_binomial.c' object='src/mpi/coll/scatter/lib_libmpi_la-scatter_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter_intra_binomial.lo `test -f 'src/mpi/coll/scatter/scatter_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_intra_binomial.c + +src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_linear.lo: src/mpi/coll/scatter/scatter_inter_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_linear.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_linear.Tpo -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_linear.lo `test -f 'src/mpi/coll/scatter/scatter_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_inter_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_linear.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter_inter_linear.c' object='src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_linear.lo `test -f 'src/mpi/coll/scatter/scatter_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_inter_linear.c + +src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_remote_send_local_scatter.lo: src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_remote_send_local_scatter.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_remote_send_local_scatter.Tpo -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_remote_send_local_scatter.lo `test -f 'src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_remote_send_local_scatter.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_remote_send_local_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c' object='src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_remote_send_local_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libmpi_la-scatter_inter_remote_send_local_scatter.lo `test -f 'src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c + +src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_nb.lo: src/mpi/coll/scatterv/scatterv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_nb.Tpo -c -o src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_nb.lo `test -f 'src/mpi/coll/scatterv/scatterv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_nb.Tpo src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/scatterv/scatterv_allcomm_nb.c' object='src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_nb.lo `test -f 'src/mpi/coll/scatterv/scatterv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv_allcomm_nb.c + +src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_linear.lo: src/mpi/coll/scatterv/scatterv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_linear.Tpo -c -o src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_linear.lo `test -f 'src/mpi/coll/scatterv/scatterv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_linear.Tpo src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/scatterv/scatterv_allcomm_linear.c' object='src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatterv/lib_libmpi_la-scatterv_allcomm_linear.lo `test -f 'src/mpi/coll/scatterv/scatterv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv_allcomm_linear.c + +src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather_allcomm_nb.lo: src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather_allcomm_nb.Tpo src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c' object='src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_allgather/lib_libmpi_la-neighbor_allgather_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c + +src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.lo: src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.Tpo src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c' object='src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_allgatherv/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c + +src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall_allcomm_nb.lo: src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall_allcomm_nb.Tpo src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c' object='src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoall/lib_libmpi_la-neighbor_alltoall_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c + +src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.lo: src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.Tpo src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c' object='src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoallv/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c + +src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.lo: src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.Tpo src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c' object='src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoallw/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_recursive_doubling.lo: src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_recursive_doubling.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_brucks.lo: src/mpi/coll/iallgather/iallgather_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_brucks.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_brucks.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_brucks.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_brucks.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_brucks.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_brucks.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_brucks.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_ring.lo: src/mpi/coll/iallgather/iallgather_intra_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_ring.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_ring.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_ring.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_ring.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_ring.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_ring.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_ring.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.lo: src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.lo `test -f 'src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.lo `test -f 'src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_gentran_algos.lo: src/mpi/coll/iallgather/iallgather_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_gentran_algos.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_gentran_algos.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_gentran_algos.lo `test -f 'src/mpi/coll/iallgather/iallgather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_gentran_algos.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_gentran_algos.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_gentran_algos.lo `test -f 'src/mpi/coll/iallgather/iallgather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_gentran_algos.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.lo: src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.lo: src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_brucks.lo: src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_brucks.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_brucks.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_brucks.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_brucks.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_brucks.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c + +src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_ring.lo: src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_ring.Tpo -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_ring.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_ring.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c' object='src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libmpi_la-iallgather_intra_gentran_ring.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_recursive_doubling.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_recursive_doubling.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_brucks.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_brucks.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_brucks.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_brucks.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_brucks.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_brucks.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_ring.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_ring.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_ring.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_ring.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_ring.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_ring.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo: src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_gentran_algos.lo: src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_gentran_algos.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_gentran_algos.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_gentran_algos.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_gentran_algos.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_gentran_algos.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_ring.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_ring.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_ring.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_ring.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_ring.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_brucks.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_brucks.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_brucks.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_brucks.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_brucks.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_intra_gentran_brucks.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c + +src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_utils.lo: src/mpi/coll/iallgatherv/iallgatherv_utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_utils.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_utils.Tpo -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_utils.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_utils.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_utils.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_utils.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_utils.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_utils.c' object='src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libmpi_la-iallgatherv_utils.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_utils.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_utils.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_naive.lo: src/mpi/coll/iallreduce/iallreduce_intra_naive.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_naive.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_naive.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_naive.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_naive.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_naive.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_naive.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_naive.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_naive.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_naive.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_naive.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_naive.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_naive.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.lo: src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_recursive_doubling.lo: src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_recursive_doubling.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_smp.lo: src/mpi/coll/iallreduce/iallreduce_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_smp.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_smp.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_smp.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_smp.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_smp.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_smp.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_smp.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo: src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_gentran_algos.lo: src/mpi/coll/iallreduce/iallreduce_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_gentran_algos.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_gentran_algos.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_gentran_algos.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_gentran_algos.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_gentran_algos.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_gentran_algos.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_gentran_algos.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo: src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo: src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c + +src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_tree.lo: src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_tree.Tpo -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_tree.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_tree.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c' object='src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libmpi_la-iallreduce_intra_gentran_tree.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_inplace.lo: src/mpi/coll/ialltoall/ialltoall_intra_inplace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_inplace.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_inplace.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_inplace.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_inplace.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_inplace.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_inplace.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_inplace.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_inplace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_inplace.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_inplace.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_brucks.lo: src/mpi/coll/ialltoall/ialltoall_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_brucks.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_brucks.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_brucks.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_brucks.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_brucks.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_brucks.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_brucks.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.lo: src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_pairwise.lo: src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_pairwise.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_pairwise.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_pairwise.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_pairwise.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_pairwise.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_inter_pairwise_exchange.lo: src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_inter_pairwise_exchange.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_gentran_algos.lo: src/mpi/coll/ialltoall/ialltoall_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_gentran_algos.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_gentran_algos.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_gentran_algos.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_gentran_algos.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_gentran_algos.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_gentran_algos.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_gentran_algos.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_brucks.lo: src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_brucks.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_brucks.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_brucks.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_brucks.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_brucks.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c + +src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_ring.lo: src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_ring.Tpo -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_ring.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_ring.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c' object='src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libmpi_la-ialltoall_intra_gentran_ring.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c + +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_inplace.lo: src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_inplace.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_inplace.Tpo -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_inplace.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_inplace.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_inplace.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c' object='src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_inplace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_inplace.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c + +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_blocked.lo: src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_blocked.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_blocked.Tpo -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_blocked.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_blocked.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_blocked.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c' object='src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_blocked.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_blocked.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c + +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.lo: src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c' object='src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c + +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_gentran_algos.lo: src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_gentran_algos.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_gentran_algos.Tpo -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_gentran_algos.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_gentran_algos.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c' object='src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_gentran_algos.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c + +src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_gentran_scattered.lo: src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_gentran_scattered.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_gentran_scattered.Tpo -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_gentran_scattered.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_gentran_scattered.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_gentran_scattered.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c' object='src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_gentran_scattered.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libmpi_la-ialltoallv_intra_gentran_scattered.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c + +src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_inplace.lo: src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_inplace.lo -MD -MP -MF src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_inplace.Tpo -c -o src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_inplace.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_inplace.Tpo src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_inplace.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c' object='src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_inplace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_inplace.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c + +src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_blocked.lo: src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_blocked.lo -MD -MP -MF src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_blocked.Tpo -c -o src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_blocked.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_blocked.Tpo src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_blocked.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c' object='src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_blocked.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_intra_blocked.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c + +src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.lo: src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.Tpo src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c' object='src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallw/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c + +src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_recursive_doubling.lo: src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_recursive_doubling.Tpo -c -o src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_recursive_doubling.Tpo src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c' object='src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c + +src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_inter_bcast.lo: src/mpi/coll/ibarrier/ibarrier_inter_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_inter_bcast.lo -MD -MP -MF src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_inter_bcast.Tpo -c -o src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_inter_bcast.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_inter_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_inter_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_inter_bcast.Tpo src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_inter_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/ibarrier/ibarrier_inter_bcast.c' object='src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_inter_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_inter_bcast.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_inter_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_inter_bcast.c + +src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_gentran_recexch.lo: src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_gentran_recexch.lo -MD -MP -MF src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_gentran_recexch.Tpo -c -o src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_gentran_recexch.Tpo src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_gentran_recexch.Plo +# $(AM_V_CC)source='src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c' object='src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_gentran_recexch.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibarrier/lib_libmpi_la-ibarrier_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_binomial.lo: src/mpi/coll/ibcast/ibcast_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_binomial.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_binomial.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_binomial.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_binomial.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_binomial.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_binomial.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_binomial.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.lo: src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo: src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_smp.lo: src/mpi/coll/ibcast/ibcast_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_smp.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_smp.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_smp.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_smp.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_smp.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_smp.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_smp.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_inter_flat.lo: src/mpi/coll/ibcast/ibcast_inter_flat.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_inter_flat.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_inter_flat.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_inter_flat.lo `test -f 'src/mpi/coll/ibcast/ibcast_inter_flat.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_inter_flat.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_inter_flat.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_inter_flat.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_inter_flat.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_inter_flat.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_inter_flat.lo `test -f 'src/mpi/coll/ibcast/ibcast_inter_flat.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_inter_flat.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_gentran_algos.lo: src/mpi/coll/ibcast/ibcast_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_gentran_algos.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_gentran_algos.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_gentran_algos.lo `test -f 'src/mpi/coll/ibcast/ibcast_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_gentran_algos.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_gentran_algos.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_gentran_algos.lo `test -f 'src/mpi/coll/ibcast/ibcast_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_gentran_algos.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_tree.lo: src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_tree.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_tree.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_tree.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_tree.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo: src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_ring.lo: src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_ring.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_ring.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_ring.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_intra_gentran_ring.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c + +src/mpi/coll/ibcast/lib_libmpi_la-ibcast_utils.lo: src/mpi/coll/ibcast/ibcast_utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libmpi_la-ibcast_utils.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_utils.Tpo -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_utils.lo `test -f 'src/mpi/coll/ibcast/ibcast_utils.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_utils.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_utils.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_utils.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_utils.c' object='src/mpi/coll/ibcast/lib_libmpi_la-ibcast_utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libmpi_la-ibcast_utils.lo `test -f 'src/mpi/coll/ibcast/ibcast_utils.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_utils.c + +src/mpi/coll/iexscan/lib_libmpi_la-iexscan_intra_recursive_doubling.lo: src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iexscan/lib_libmpi_la-iexscan_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iexscan/lib_libmpi_la-iexscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan_intra_recursive_doubling.Tpo src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c' object='src/mpi/coll/iexscan/lib_libmpi_la-iexscan_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iexscan/lib_libmpi_la-iexscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c + +src/mpi/coll/igather/lib_libmpi_la-igather_intra_binomial.lo: src/mpi/coll/igather/igather_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libmpi_la-igather_intra_binomial.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_binomial.Tpo -c -o src/mpi/coll/igather/lib_libmpi_la-igather_intra_binomial.lo `test -f 'src/mpi/coll/igather/igather_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_binomial.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_intra_binomial.c' object='src/mpi/coll/igather/lib_libmpi_la-igather_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libmpi_la-igather_intra_binomial.lo `test -f 'src/mpi/coll/igather/igather_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_intra_binomial.c + +src/mpi/coll/igather/lib_libmpi_la-igather_inter_short.lo: src/mpi/coll/igather/igather_inter_short.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libmpi_la-igather_inter_short.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_short.Tpo -c -o src/mpi/coll/igather/lib_libmpi_la-igather_inter_short.lo `test -f 'src/mpi/coll/igather/igather_inter_short.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_inter_short.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_short.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_short.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_inter_short.c' object='src/mpi/coll/igather/lib_libmpi_la-igather_inter_short.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libmpi_la-igather_inter_short.lo `test -f 'src/mpi/coll/igather/igather_inter_short.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_inter_short.c + +src/mpi/coll/igather/lib_libmpi_la-igather_inter_long.lo: src/mpi/coll/igather/igather_inter_long.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libmpi_la-igather_inter_long.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_long.Tpo -c -o src/mpi/coll/igather/lib_libmpi_la-igather_inter_long.lo `test -f 'src/mpi/coll/igather/igather_inter_long.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_inter_long.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_long.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_long.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_inter_long.c' object='src/mpi/coll/igather/lib_libmpi_la-igather_inter_long.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libmpi_la-igather_inter_long.lo `test -f 'src/mpi/coll/igather/igather_inter_long.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_inter_long.c + +src/mpi/coll/igather/lib_libmpi_la-igather_gentran_algos.lo: src/mpi/coll/igather/igather_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libmpi_la-igather_gentran_algos.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_gentran_algos.Tpo -c -o src/mpi/coll/igather/lib_libmpi_la-igather_gentran_algos.lo `test -f 'src/mpi/coll/igather/igather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_gentran_algos.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_gentran_algos.c' object='src/mpi/coll/igather/lib_libmpi_la-igather_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libmpi_la-igather_gentran_algos.lo `test -f 'src/mpi/coll/igather/igather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_gentran_algos.c + +src/mpi/coll/igather/lib_libmpi_la-igather_intra_gentran_tree.lo: src/mpi/coll/igather/igather_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libmpi_la-igather_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_gentran_tree.Tpo -c -o src/mpi/coll/igather/lib_libmpi_la-igather_intra_gentran_tree.lo `test -f 'src/mpi/coll/igather/igather_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_gentran_tree.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_intra_gentran_tree.c' object='src/mpi/coll/igather/lib_libmpi_la-igather_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libmpi_la-igather_intra_gentran_tree.lo `test -f 'src/mpi/coll/igather/igather_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_intra_gentran_tree.c + +src/mpi/coll/igatherv/lib_libmpi_la-igatherv_allcomm_linear.lo: src/mpi/coll/igatherv/igatherv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igatherv/lib_libmpi_la-igatherv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv_allcomm_linear.Tpo -c -o src/mpi/coll/igatherv/lib_libmpi_la-igatherv_allcomm_linear.lo `test -f 'src/mpi/coll/igatherv/igatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/igatherv/igatherv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv_allcomm_linear.Tpo src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/igatherv/igatherv_allcomm_linear.c' object='src/mpi/coll/igatherv/lib_libmpi_la-igatherv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igatherv/lib_libmpi_la-igatherv_allcomm_linear.lo `test -f 'src/mpi/coll/igatherv/igatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/igatherv/igatherv_allcomm_linear.c + +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c' object='src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c + +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_pairwise.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_pairwise.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_pairwise.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_pairwise.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_pairwise.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c' object='src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_pairwise.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c + +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c' object='src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c + +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_noncommutative.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_noncommutative.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_noncommutative.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_noncommutative.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_noncommutative.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_noncommutative.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c' object='src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_noncommutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_noncommutative.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c + +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c' object='src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c + +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_gentran_algos.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_gentran_algos.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_gentran_algos.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_gentran_algos.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_gentran_algos.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c' object='src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_gentran_algos.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c + +src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c' object='src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c + +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c' object='src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c + +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c' object='src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c + +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c' object='src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c + +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c' object='src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c + +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c' object='src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c + +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_gentran_algos.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_gentran_algos.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_gentran_algos.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_gentran_algos.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_gentran_algos.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c' object='src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_gentran_algos.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c + +src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c' object='src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c + +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_binomial.lo: src/mpi/coll/ireduce/ireduce_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_binomial.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_binomial.Tpo -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_binomial.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_binomial.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_binomial.c' object='src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_binomial.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_binomial.c + +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.lo: src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.Tpo -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c' object='src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c + +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_smp.lo: src/mpi/coll/ireduce/ireduce_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_smp.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_smp.Tpo -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_smp.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_smp.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_smp.c' object='src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_smp.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_smp.c + +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.lo: src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.Tpo -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.lo `test -f 'src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c' object='src/mpi/coll/ireduce/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.lo `test -f 'src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c + +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_gentran_algos.lo: src/mpi/coll/ireduce/ireduce_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libmpi_la-ireduce_gentran_algos.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_gentran_algos.Tpo -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_gentran_algos.lo `test -f 'src/mpi/coll/ireduce/ireduce_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_gentran_algos.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_gentran_algos.c' object='src/mpi/coll/ireduce/lib_libmpi_la-ireduce_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_gentran_algos.lo `test -f 'src/mpi/coll/ireduce/ireduce_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_gentran_algos.c + +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_tree.lo: src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_tree.Tpo -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_tree.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_tree.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c' object='src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_tree.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c + +src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_ring.lo: src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_ring.Tpo -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_ring.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_ring.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c' object='src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libmpi_la-ireduce_intra_gentran_ring.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c + +src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_recursive_doubling.lo: src/mpi/coll/iscan/iscan_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iscan/iscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_recursive_doubling.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan_intra_recursive_doubling.c' object='src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iscan/iscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_recursive_doubling.c + +src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_smp.lo: src/mpi/coll/iscan/iscan_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_smp.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_smp.Tpo -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_smp.lo `test -f 'src/mpi/coll/iscan/iscan_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_smp.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan_intra_smp.c' object='src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_smp.lo `test -f 'src/mpi/coll/iscan/iscan_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_smp.c + +src/mpi/coll/iscan/lib_libmpi_la-iscan_gentran_algos.lo: src/mpi/coll/iscan/iscan_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libmpi_la-iscan_gentran_algos.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_gentran_algos.Tpo -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan_gentran_algos.lo `test -f 'src/mpi/coll/iscan/iscan_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_gentran_algos.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan_gentran_algos.c' object='src/mpi/coll/iscan/lib_libmpi_la-iscan_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan_gentran_algos.lo `test -f 'src/mpi/coll/iscan/iscan_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_gentran_algos.c + +src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.lo: src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.Tpo -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.lo `test -f 'src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c' object='src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.lo `test -f 'src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c + +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_binomial.lo: src/mpi/coll/iscatter/iscatter_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_binomial.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_binomial.Tpo -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_binomial.lo `test -f 'src/mpi/coll/iscatter/iscatter_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_binomial.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_intra_binomial.c' object='src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_binomial.lo `test -f 'src/mpi/coll/iscatter/iscatter_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_intra_binomial.c + +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_linear.lo: src/mpi/coll/iscatter/iscatter_inter_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_linear.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_linear.Tpo -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_linear.lo `test -f 'src/mpi/coll/iscatter/iscatter_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_inter_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_linear.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_inter_linear.c' object='src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_linear.lo `test -f 'src/mpi/coll/iscatter/iscatter_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_inter_linear.c + +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.lo: src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.Tpo -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.lo `test -f 'src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c' object='src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.lo `test -f 'src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c + +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_gentran_algos.lo: src/mpi/coll/iscatter/iscatter_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libmpi_la-iscatter_gentran_algos.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_gentran_algos.Tpo -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_gentran_algos.lo `test -f 'src/mpi/coll/iscatter/iscatter_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_gentran_algos.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_gentran_algos.c' object='src/mpi/coll/iscatter/lib_libmpi_la-iscatter_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_gentran_algos.lo `test -f 'src/mpi/coll/iscatter/iscatter_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_gentran_algos.c + +src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_gentran_tree.lo: src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_gentran_tree.Tpo -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_gentran_tree.lo `test -f 'src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_gentran_tree.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c' object='src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libmpi_la-iscatter_intra_gentran_tree.lo `test -f 'src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c + +src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv_allcomm_linear.lo: src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv_allcomm_linear.Tpo -c -o src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv_allcomm_linear.lo `test -f 'src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv_allcomm_linear.Tpo src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c' object='src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatterv/lib_libmpi_la-iscatterv_allcomm_linear.lo `test -f 'src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c + +src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_linear.lo: src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_linear.Tpo src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c' object='src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c + +src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_gentran_algos.lo: src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_gentran_algos.Tpo src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c' object='src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c + +src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgather/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c + +src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.lo: src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.Tpo src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c' object='src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c + +src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.lo: src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.Tpo src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c' object='src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c + +src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgatherv/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c + +src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.lo: src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.Tpo src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c' object='src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c + +src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_gentran_algos.lo: src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_gentran_algos.Tpo src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c' object='src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c + +src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoall/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c + +src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.lo: src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.Tpo src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c' object='src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c + +src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.lo: src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.Tpo src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c' object='src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c + +src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallv/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c + +src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.lo: src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.Tpo src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c' object='src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c + +src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.lo: src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.Tpo src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c' object='src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c + +src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallw/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c + +src/mpi/coll/op/lib_libmpi_la-opsum.lo: src/mpi/coll/op/opsum.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opsum.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opsum.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opsum.lo `test -f 'src/mpi/coll/op/opsum.c' || echo '$(srcdir)/'`src/mpi/coll/op/opsum.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opsum.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opsum.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opsum.c' object='src/mpi/coll/op/lib_libmpi_la-opsum.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opsum.lo `test -f 'src/mpi/coll/op/opsum.c' || echo '$(srcdir)/'`src/mpi/coll/op/opsum.c + +src/mpi/coll/op/lib_libmpi_la-opmax.lo: src/mpi/coll/op/opmax.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opmax.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmax.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opmax.lo `test -f 'src/mpi/coll/op/opmax.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmax.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmax.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmax.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opmax.c' object='src/mpi/coll/op/lib_libmpi_la-opmax.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opmax.lo `test -f 'src/mpi/coll/op/opmax.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmax.c + +src/mpi/coll/op/lib_libmpi_la-opmin.lo: src/mpi/coll/op/opmin.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opmin.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmin.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opmin.lo `test -f 'src/mpi/coll/op/opmin.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmin.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmin.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmin.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opmin.c' object='src/mpi/coll/op/lib_libmpi_la-opmin.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opmin.lo `test -f 'src/mpi/coll/op/opmin.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmin.c + +src/mpi/coll/op/lib_libmpi_la-opband.lo: src/mpi/coll/op/opband.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opband.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opband.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opband.lo `test -f 'src/mpi/coll/op/opband.c' || echo '$(srcdir)/'`src/mpi/coll/op/opband.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opband.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opband.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opband.c' object='src/mpi/coll/op/lib_libmpi_la-opband.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opband.lo `test -f 'src/mpi/coll/op/opband.c' || echo '$(srcdir)/'`src/mpi/coll/op/opband.c + +src/mpi/coll/op/lib_libmpi_la-opbor.lo: src/mpi/coll/op/opbor.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opbor.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbor.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opbor.lo `test -f 'src/mpi/coll/op/opbor.c' || echo '$(srcdir)/'`src/mpi/coll/op/opbor.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbor.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbor.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opbor.c' object='src/mpi/coll/op/lib_libmpi_la-opbor.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opbor.lo `test -f 'src/mpi/coll/op/opbor.c' || echo '$(srcdir)/'`src/mpi/coll/op/opbor.c + +src/mpi/coll/op/lib_libmpi_la-opbxor.lo: src/mpi/coll/op/opbxor.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opbxor.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbxor.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opbxor.lo `test -f 'src/mpi/coll/op/opbxor.c' || echo '$(srcdir)/'`src/mpi/coll/op/opbxor.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbxor.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbxor.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opbxor.c' object='src/mpi/coll/op/lib_libmpi_la-opbxor.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opbxor.lo `test -f 'src/mpi/coll/op/opbxor.c' || echo '$(srcdir)/'`src/mpi/coll/op/opbxor.c + +src/mpi/coll/op/lib_libmpi_la-opland.lo: src/mpi/coll/op/opland.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opland.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opland.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opland.lo `test -f 'src/mpi/coll/op/opland.c' || echo '$(srcdir)/'`src/mpi/coll/op/opland.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opland.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opland.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opland.c' object='src/mpi/coll/op/lib_libmpi_la-opland.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opland.lo `test -f 'src/mpi/coll/op/opland.c' || echo '$(srcdir)/'`src/mpi/coll/op/opland.c + +src/mpi/coll/op/lib_libmpi_la-oplor.lo: src/mpi/coll/op/oplor.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-oplor.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplor.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-oplor.lo `test -f 'src/mpi/coll/op/oplor.c' || echo '$(srcdir)/'`src/mpi/coll/op/oplor.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplor.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplor.Plo +# $(AM_V_CC)source='src/mpi/coll/op/oplor.c' object='src/mpi/coll/op/lib_libmpi_la-oplor.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-oplor.lo `test -f 'src/mpi/coll/op/oplor.c' || echo '$(srcdir)/'`src/mpi/coll/op/oplor.c + +src/mpi/coll/op/lib_libmpi_la-oplxor.lo: src/mpi/coll/op/oplxor.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-oplxor.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplxor.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-oplxor.lo `test -f 'src/mpi/coll/op/oplxor.c' || echo '$(srcdir)/'`src/mpi/coll/op/oplxor.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplxor.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplxor.Plo +# $(AM_V_CC)source='src/mpi/coll/op/oplxor.c' object='src/mpi/coll/op/lib_libmpi_la-oplxor.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-oplxor.lo `test -f 'src/mpi/coll/op/oplxor.c' || echo '$(srcdir)/'`src/mpi/coll/op/oplxor.c + +src/mpi/coll/op/lib_libmpi_la-opprod.lo: src/mpi/coll/op/opprod.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opprod.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opprod.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opprod.lo `test -f 'src/mpi/coll/op/opprod.c' || echo '$(srcdir)/'`src/mpi/coll/op/opprod.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opprod.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opprod.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opprod.c' object='src/mpi/coll/op/lib_libmpi_la-opprod.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opprod.lo `test -f 'src/mpi/coll/op/opprod.c' || echo '$(srcdir)/'`src/mpi/coll/op/opprod.c + +src/mpi/coll/op/lib_libmpi_la-opminloc.lo: src/mpi/coll/op/opminloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opminloc.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opminloc.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opminloc.lo `test -f 'src/mpi/coll/op/opminloc.c' || echo '$(srcdir)/'`src/mpi/coll/op/opminloc.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opminloc.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opminloc.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opminloc.c' object='src/mpi/coll/op/lib_libmpi_la-opminloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opminloc.lo `test -f 'src/mpi/coll/op/opminloc.c' || echo '$(srcdir)/'`src/mpi/coll/op/opminloc.c + +src/mpi/coll/op/lib_libmpi_la-opmaxloc.lo: src/mpi/coll/op/opmaxloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opmaxloc.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmaxloc.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opmaxloc.lo `test -f 'src/mpi/coll/op/opmaxloc.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmaxloc.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmaxloc.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmaxloc.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opmaxloc.c' object='src/mpi/coll/op/lib_libmpi_la-opmaxloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opmaxloc.lo `test -f 'src/mpi/coll/op/opmaxloc.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmaxloc.c + +src/mpi/coll/op/lib_libmpi_la-opno_op.lo: src/mpi/coll/op/opno_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opno_op.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opno_op.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opno_op.lo `test -f 'src/mpi/coll/op/opno_op.c' || echo '$(srcdir)/'`src/mpi/coll/op/opno_op.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opno_op.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opno_op.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opno_op.c' object='src/mpi/coll/op/lib_libmpi_la-opno_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opno_op.lo `test -f 'src/mpi/coll/op/opno_op.c' || echo '$(srcdir)/'`src/mpi/coll/op/opno_op.c + +src/mpi/coll/op/lib_libmpi_la-opreplace.lo: src/mpi/coll/op/opreplace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libmpi_la-opreplace.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opreplace.Tpo -c -o src/mpi/coll/op/lib_libmpi_la-opreplace.lo `test -f 'src/mpi/coll/op/opreplace.c' || echo '$(srcdir)/'`src/mpi/coll/op/opreplace.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opreplace.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opreplace.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opreplace.c' object='src/mpi/coll/op/lib_libmpi_la-opreplace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libmpi_la-opreplace.lo `test -f 'src/mpi/coll/op/opreplace.c' || echo '$(srcdir)/'`src/mpi/coll/op/opreplace.c + +src/mpi/coll/allreduce_group/lib_libmpi_la-allreduce_group.lo: src/mpi/coll/allreduce_group/allreduce_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce_group/lib_libmpi_la-allreduce_group.lo -MD -MP -MF src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libmpi_la-allreduce_group.Tpo -c -o src/mpi/coll/allreduce_group/lib_libmpi_la-allreduce_group.lo `test -f 'src/mpi/coll/allreduce_group/allreduce_group.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce_group/allreduce_group.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libmpi_la-allreduce_group.Tpo src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libmpi_la-allreduce_group.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce_group/allreduce_group.c' object='src/mpi/coll/allreduce_group/lib_libmpi_la-allreduce_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce_group/lib_libmpi_la-allreduce_group.lo `test -f 'src/mpi/coll/allreduce_group/allreduce_group.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce_group/allreduce_group.c + +src/mpi/coll/src/lib_libmpi_la-coll_impl.lo: src/mpi/coll/src/coll_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/src/lib_libmpi_la-coll_impl.lo -MD -MP -MF src/mpi/coll/src/$(DEPDIR)/lib_libmpi_la-coll_impl.Tpo -c -o src/mpi/coll/src/lib_libmpi_la-coll_impl.lo `test -f 'src/mpi/coll/src/coll_impl.c' || echo '$(srcdir)/'`src/mpi/coll/src/coll_impl.c + $(AM_V_at)$(am__mv) src/mpi/coll/src/$(DEPDIR)/lib_libmpi_la-coll_impl.Tpo src/mpi/coll/src/$(DEPDIR)/lib_libmpi_la-coll_impl.Plo +# $(AM_V_CC)source='src/mpi/coll/src/coll_impl.c' object='src/mpi/coll/src/lib_libmpi_la-coll_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/src/lib_libmpi_la-coll_impl.lo `test -f 'src/mpi/coll/src/coll_impl.c' || echo '$(srcdir)/'`src/mpi/coll/src/coll_impl.c + +src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_impl.lo: src/mpi/coll/transports/gentran/gentran_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_impl.lo -MD -MP -MF src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_impl.Tpo -c -o src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_impl.lo `test -f 'src/mpi/coll/transports/gentran/gentran_impl.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/gentran_impl.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_impl.Tpo src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_impl.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/gentran/gentran_impl.c' object='src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_impl.lo `test -f 'src/mpi/coll/transports/gentran/gentran_impl.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/gentran_impl.c + +src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_utils.lo: src/mpi/coll/transports/gentran/gentran_utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_utils.lo -MD -MP -MF src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_utils.Tpo -c -o src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_utils.lo `test -f 'src/mpi/coll/transports/gentran/gentran_utils.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/gentran_utils.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_utils.Tpo src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_utils.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/gentran/gentran_utils.c' object='src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/gentran/lib_libmpi_la-gentran_utils.lo `test -f 'src/mpi/coll/transports/gentran/gentran_utils.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/gentran_utils.c + +src/mpi/coll/transports/gentran/lib_libmpi_la-tsp_gentran.lo: src/mpi/coll/transports/gentran/tsp_gentran.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/gentran/lib_libmpi_la-tsp_gentran.lo -MD -MP -MF src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-tsp_gentran.Tpo -c -o src/mpi/coll/transports/gentran/lib_libmpi_la-tsp_gentran.lo `test -f 'src/mpi/coll/transports/gentran/tsp_gentran.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/tsp_gentran.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-tsp_gentran.Tpo src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-tsp_gentran.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/gentran/tsp_gentran.c' object='src/mpi/coll/transports/gentran/lib_libmpi_la-tsp_gentran.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/gentran/lib_libmpi_la-tsp_gentran.lo `test -f 'src/mpi/coll/transports/gentran/tsp_gentran.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/tsp_gentran.c + +src/mpi/coll/transports/stubtran/lib_libmpi_la-stubtran_impl.lo: src/mpi/coll/transports/stubtran/stubtran_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/stubtran/lib_libmpi_la-stubtran_impl.lo -MD -MP -MF src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-stubtran_impl.Tpo -c -o src/mpi/coll/transports/stubtran/lib_libmpi_la-stubtran_impl.lo `test -f 'src/mpi/coll/transports/stubtran/stubtran_impl.c' || echo '$(srcdir)/'`src/mpi/coll/transports/stubtran/stubtran_impl.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-stubtran_impl.Tpo src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-stubtran_impl.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/stubtran/stubtran_impl.c' object='src/mpi/coll/transports/stubtran/lib_libmpi_la-stubtran_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/stubtran/lib_libmpi_la-stubtran_impl.lo `test -f 'src/mpi/coll/transports/stubtran/stubtran_impl.c' || echo '$(srcdir)/'`src/mpi/coll/transports/stubtran/stubtran_impl.c + +src/mpi/coll/transports/stubtran/lib_libmpi_la-tsp_stubtran.lo: src/mpi/coll/transports/stubtran/tsp_stubtran.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/stubtran/lib_libmpi_la-tsp_stubtran.lo -MD -MP -MF src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-tsp_stubtran.Tpo -c -o src/mpi/coll/transports/stubtran/lib_libmpi_la-tsp_stubtran.lo `test -f 'src/mpi/coll/transports/stubtran/tsp_stubtran.c' || echo '$(srcdir)/'`src/mpi/coll/transports/stubtran/tsp_stubtran.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-tsp_stubtran.Tpo src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-tsp_stubtran.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/stubtran/tsp_stubtran.c' object='src/mpi/coll/transports/stubtran/lib_libmpi_la-tsp_stubtran.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/stubtran/lib_libmpi_la-tsp_stubtran.lo `test -f 'src/mpi/coll/transports/stubtran/tsp_stubtran.c' || echo '$(srcdir)/'`src/mpi/coll/transports/stubtran/tsp_stubtran.c + +src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treealgo.lo: src/mpi/coll/algorithms/treealgo/treealgo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treealgo.lo -MD -MP -MF src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treealgo.Tpo -c -o src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treealgo.lo `test -f 'src/mpi/coll/algorithms/treealgo/treealgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/treealgo/treealgo.c + $(AM_V_at)$(am__mv) src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treealgo.Tpo src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treealgo.Plo +# $(AM_V_CC)source='src/mpi/coll/algorithms/treealgo/treealgo.c' object='src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treealgo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treealgo.lo `test -f 'src/mpi/coll/algorithms/treealgo/treealgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/treealgo/treealgo.c + +src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treeutil.lo: src/mpi/coll/algorithms/treealgo/treeutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treeutil.lo -MD -MP -MF src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treeutil.Tpo -c -o src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treeutil.lo `test -f 'src/mpi/coll/algorithms/treealgo/treeutil.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/treealgo/treeutil.c + $(AM_V_at)$(am__mv) src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treeutil.Tpo src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treeutil.Plo +# $(AM_V_CC)source='src/mpi/coll/algorithms/treealgo/treeutil.c' object='src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treeutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/algorithms/treealgo/lib_libmpi_la-treeutil.lo `test -f 'src/mpi/coll/algorithms/treealgo/treeutil.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/treealgo/treeutil.c + +src/mpi/coll/algorithms/recexchalgo/lib_libmpi_la-recexchalgo.lo: src/mpi/coll/algorithms/recexchalgo/recexchalgo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/algorithms/recexchalgo/lib_libmpi_la-recexchalgo.lo -MD -MP -MF src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libmpi_la-recexchalgo.Tpo -c -o src/mpi/coll/algorithms/recexchalgo/lib_libmpi_la-recexchalgo.lo `test -f 'src/mpi/coll/algorithms/recexchalgo/recexchalgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/recexchalgo/recexchalgo.c + $(AM_V_at)$(am__mv) src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libmpi_la-recexchalgo.Tpo src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libmpi_la-recexchalgo.Plo +# $(AM_V_CC)source='src/mpi/coll/algorithms/recexchalgo/recexchalgo.c' object='src/mpi/coll/algorithms/recexchalgo/lib_libmpi_la-recexchalgo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/algorithms/recexchalgo/lib_libmpi_la-recexchalgo.lo `test -f 'src/mpi/coll/algorithms/recexchalgo/recexchalgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/recexchalgo/recexchalgo.c + +src/mpi/coll/algorithms/stubalgo/lib_libmpi_la-stubalgo.lo: src/mpi/coll/algorithms/stubalgo/stubalgo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/algorithms/stubalgo/lib_libmpi_la-stubalgo.lo -MD -MP -MF src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libmpi_la-stubalgo.Tpo -c -o src/mpi/coll/algorithms/stubalgo/lib_libmpi_la-stubalgo.lo `test -f 'src/mpi/coll/algorithms/stubalgo/stubalgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/stubalgo/stubalgo.c + $(AM_V_at)$(am__mv) src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libmpi_la-stubalgo.Tpo src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libmpi_la-stubalgo.Plo +# $(AM_V_CC)source='src/mpi/coll/algorithms/stubalgo/stubalgo.c' object='src/mpi/coll/algorithms/stubalgo/lib_libmpi_la-stubalgo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/algorithms/stubalgo/lib_libmpi_la-stubalgo.lo `test -f 'src/mpi/coll/algorithms/stubalgo/stubalgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/stubalgo/stubalgo.c + +src/mpi/coll/lib_libmpi_la-helper_fns.lo: src/mpi/coll/helper_fns.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/lib_libmpi_la-helper_fns.lo -MD -MP -MF src/mpi/coll/$(DEPDIR)/lib_libmpi_la-helper_fns.Tpo -c -o src/mpi/coll/lib_libmpi_la-helper_fns.lo `test -f 'src/mpi/coll/helper_fns.c' || echo '$(srcdir)/'`src/mpi/coll/helper_fns.c + $(AM_V_at)$(am__mv) src/mpi/coll/$(DEPDIR)/lib_libmpi_la-helper_fns.Tpo src/mpi/coll/$(DEPDIR)/lib_libmpi_la-helper_fns.Plo +# $(AM_V_CC)source='src/mpi/coll/helper_fns.c' object='src/mpi/coll/lib_libmpi_la-helper_fns.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/lib_libmpi_la-helper_fns.lo `test -f 'src/mpi/coll/helper_fns.c' || echo '$(srcdir)/'`src/mpi/coll/helper_fns.c + +src/mpi/coll/lib_libmpi_la-nbcutil.lo: src/mpi/coll/nbcutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/lib_libmpi_la-nbcutil.lo -MD -MP -MF src/mpi/coll/$(DEPDIR)/lib_libmpi_la-nbcutil.Tpo -c -o src/mpi/coll/lib_libmpi_la-nbcutil.lo `test -f 'src/mpi/coll/nbcutil.c' || echo '$(srcdir)/'`src/mpi/coll/nbcutil.c + $(AM_V_at)$(am__mv) src/mpi/coll/$(DEPDIR)/lib_libmpi_la-nbcutil.Tpo src/mpi/coll/$(DEPDIR)/lib_libmpi_la-nbcutil.Plo +# $(AM_V_CC)source='src/mpi/coll/nbcutil.c' object='src/mpi/coll/lib_libmpi_la-nbcutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/lib_libmpi_la-nbcutil.lo `test -f 'src/mpi/coll/nbcutil.c' || echo '$(srcdir)/'`src/mpi/coll/nbcutil.c + +src/mpi/comm/lib_libmpi_la-commutil.lo: src/mpi/comm/commutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-commutil.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-commutil.Tpo -c -o src/mpi/comm/lib_libmpi_la-commutil.lo `test -f 'src/mpi/comm/commutil.c' || echo '$(srcdir)/'`src/mpi/comm/commutil.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-commutil.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-commutil.Plo +# $(AM_V_CC)source='src/mpi/comm/commutil.c' object='src/mpi/comm/lib_libmpi_la-commutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-commutil.lo `test -f 'src/mpi/comm/commutil.c' || echo '$(srcdir)/'`src/mpi/comm/commutil.c + +src/mpi/comm/lib_libmpi_la-contextid.lo: src/mpi/comm/contextid.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libmpi_la-contextid.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libmpi_la-contextid.Tpo -c -o src/mpi/comm/lib_libmpi_la-contextid.lo `test -f 'src/mpi/comm/contextid.c' || echo '$(srcdir)/'`src/mpi/comm/contextid.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libmpi_la-contextid.Tpo src/mpi/comm/$(DEPDIR)/lib_libmpi_la-contextid.Plo +# $(AM_V_CC)source='src/mpi/comm/contextid.c' object='src/mpi/comm/lib_libmpi_la-contextid.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libmpi_la-contextid.lo `test -f 'src/mpi/comm/contextid.c' || echo '$(srcdir)/'`src/mpi/comm/contextid.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-darray_support.lo: src/mpi/datatype/typerep/dataloop/darray_support.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-darray_support.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-darray_support.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-darray_support.lo `test -f 'src/mpi/datatype/typerep/dataloop/darray_support.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/darray_support.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-darray_support.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-darray_support.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/darray_support.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-darray_support.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-darray_support.lo `test -f 'src/mpi/datatype/typerep/dataloop/darray_support.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/darray_support.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop.lo: src/mpi/datatype/typerep/dataloop/dataloop.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create.lo: src/mpi/datatype/typerep/dataloop/dataloop_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_blockindexed.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_blockindexed.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_blockindexed.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_blockindexed.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_blockindexed.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_blockindexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_blockindexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_blockindexed.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_contig.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_contig.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_contig.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_contig.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_contig.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_contig.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_contig.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_contig.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_indexed.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_indexed.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_indexed.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_indexed.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_indexed.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_indexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_indexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_indexed.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_struct.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_struct.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_struct.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_struct.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_struct.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_struct.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_struct.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_struct.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_vector.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_vector.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_vector.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_vector.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_vector.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_vector.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_vector.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_create_vector.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-looputil.lo: src/mpi/datatype/typerep/dataloop/looputil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-looputil.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-looputil.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-looputil.lo `test -f 'src/mpi/datatype/typerep/dataloop/looputil.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/looputil.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-looputil.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-looputil.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/looputil.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-looputil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-looputil.lo `test -f 'src/mpi/datatype/typerep/dataloop/looputil.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/looputil.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment.lo: src/mpi/datatype/typerep/dataloop/segment.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/segment.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_count.lo: src/mpi/datatype/typerep/dataloop/segment_count.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_count.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_count.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_count.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment_count.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment_count.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_count.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_count.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/segment_count.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_count.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_count.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment_count.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment_count.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_flatten.lo: src/mpi/datatype/typerep/dataloop/segment_flatten.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_flatten.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_flatten.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_flatten.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment_flatten.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment_flatten.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_flatten.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_flatten.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/segment_flatten.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_flatten.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-segment_flatten.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment_flatten.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment_flatten.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-subarray_support.lo: src/mpi/datatype/typerep/dataloop/subarray_support.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-subarray_support.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-subarray_support.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-subarray_support.lo `test -f 'src/mpi/datatype/typerep/dataloop/subarray_support.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/subarray_support.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-subarray_support.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-subarray_support.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/subarray_support.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-subarray_support.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-subarray_support.lo `test -f 'src/mpi/datatype/typerep/dataloop/subarray_support.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/subarray_support.c + +src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_debug.lo: src/mpi/datatype/typerep/dataloop/dataloop_debug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_debug.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_debug.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_debug.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_debug.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_debug.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_debug.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_debug.c' object='src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libmpi_la-dataloop_debug.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_debug.c + +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_flatten.lo: src/mpi/datatype/typerep/src/typerep_flatten.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_flatten.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_flatten.Tpo -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_flatten.lo `test -f 'src/mpi/datatype/typerep/src/typerep_flatten.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_flatten.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_flatten.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_flatten.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_flatten.c' object='src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_flatten.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_flatten.lo `test -f 'src/mpi/datatype/typerep/src/typerep_flatten.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_flatten.c + +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack.lo: src/mpi/datatype/typerep/src/typerep_pack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack.Tpo -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack.lo `test -f 'src/mpi/datatype/typerep/src/typerep_pack.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_pack.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_pack.c' object='src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack.lo `test -f 'src/mpi/datatype/typerep/src/typerep_pack.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_pack.c + +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack_external.lo: src/mpi/datatype/typerep/src/typerep_pack_external.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack_external.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack_external.Tpo -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack_external.lo `test -f 'src/mpi/datatype/typerep/src/typerep_pack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_pack_external.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack_external.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack_external.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_pack_external.c' object='src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack_external.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_pack_external.lo `test -f 'src/mpi/datatype/typerep/src/typerep_pack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_pack_external.c + +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_iov.lo: src/mpi/datatype/typerep/src/typerep_iov.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_iov.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_iov.Tpo -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_iov.lo `test -f 'src/mpi/datatype/typerep/src/typerep_iov.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_iov.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_iov.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_iov.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_iov.c' object='src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_iov.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_iov.lo `test -f 'src/mpi/datatype/typerep/src/typerep_iov.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_iov.c + +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_create.lo: src/mpi/datatype/typerep/src/typerep_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_create.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_create.Tpo -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_create.lo `test -f 'src/mpi/datatype/typerep/src/typerep_create.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_create.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_create.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_create.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_create.c' object='src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_create.lo `test -f 'src/mpi/datatype/typerep/src/typerep_create.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_create.c + +src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_debug.lo: src/mpi/datatype/typerep/src/typerep_debug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_debug.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_debug.Tpo -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_debug.lo `test -f 'src/mpi/datatype/typerep/src/typerep_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_debug.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_debug.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_debug.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_debug.c' object='src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libmpi_la-typerep_debug.lo `test -f 'src/mpi/datatype/typerep/src/typerep_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_debug.c + +src/mpi/datatype/lib_libmpi_la-typeutil.lo: src/mpi/datatype/typeutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-typeutil.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-typeutil.Tpo -c -o src/mpi/datatype/lib_libmpi_la-typeutil.lo `test -f 'src/mpi/datatype/typeutil.c' || echo '$(srcdir)/'`src/mpi/datatype/typeutil.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-typeutil.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-typeutil.Plo +# $(AM_V_CC)source='src/mpi/datatype/typeutil.c' object='src/mpi/datatype/lib_libmpi_la-typeutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-typeutil.lo `test -f 'src/mpi/datatype/typeutil.c' || echo '$(srcdir)/'`src/mpi/datatype/typeutil.c + +src/mpi/datatype/lib_libmpi_la-ext32_datatype.lo: src/mpi/datatype/ext32_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-ext32_datatype.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-ext32_datatype.Tpo -c -o src/mpi/datatype/lib_libmpi_la-ext32_datatype.lo `test -f 'src/mpi/datatype/ext32_datatype.c' || echo '$(srcdir)/'`src/mpi/datatype/ext32_datatype.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-ext32_datatype.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-ext32_datatype.Plo +# $(AM_V_CC)source='src/mpi/datatype/ext32_datatype.c' object='src/mpi/datatype/lib_libmpi_la-ext32_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-ext32_datatype.lo `test -f 'src/mpi/datatype/ext32_datatype.c' || echo '$(srcdir)/'`src/mpi/datatype/ext32_datatype.c + +src/mpi/datatype/lib_libmpi_la-type_blockindexed.lo: src/mpi/datatype/type_blockindexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_blockindexed.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_blockindexed.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_blockindexed.lo `test -f 'src/mpi/datatype/type_blockindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_blockindexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_blockindexed.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_blockindexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_blockindexed.c' object='src/mpi/datatype/lib_libmpi_la-type_blockindexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_blockindexed.lo `test -f 'src/mpi/datatype/type_blockindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_blockindexed.c + +src/mpi/datatype/lib_libmpi_la-type_create_pairtype.lo: src/mpi/datatype/type_create_pairtype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_create_pairtype.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_pairtype.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_create_pairtype.lo `test -f 'src/mpi/datatype/type_create_pairtype.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_pairtype.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_pairtype.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_pairtype.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_pairtype.c' object='src/mpi/datatype/lib_libmpi_la-type_create_pairtype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_create_pairtype.lo `test -f 'src/mpi/datatype/type_create_pairtype.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_pairtype.c + +src/mpi/datatype/lib_libmpi_la-type_debug.lo: src/mpi/datatype/type_debug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libmpi_la-type_debug.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_debug.Tpo -c -o src/mpi/datatype/lib_libmpi_la-type_debug.lo `test -f 'src/mpi/datatype/type_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/type_debug.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_debug.Tpo src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_debug.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_debug.c' object='src/mpi/datatype/lib_libmpi_la-type_debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libmpi_la-type_debug.lo `test -f 'src/mpi/datatype/type_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/type_debug.c + +src/mpi/errhan/lib_libmpi_la-errutil.lo: src/mpi/errhan/errutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-errutil.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errutil.Tpo -c -o src/mpi/errhan/lib_libmpi_la-errutil.lo `test -f 'src/mpi/errhan/errutil.c' || echo '$(srcdir)/'`src/mpi/errhan/errutil.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errutil.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errutil.Plo +# $(AM_V_CC)source='src/mpi/errhan/errutil.c' object='src/mpi/errhan/lib_libmpi_la-errutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-errutil.lo `test -f 'src/mpi/errhan/errutil.c' || echo '$(srcdir)/'`src/mpi/errhan/errutil.c + +src/mpi/errhan/lib_libmpi_la-dynerrutil.lo: src/mpi/errhan/dynerrutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libmpi_la-dynerrutil.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-dynerrutil.Tpo -c -o src/mpi/errhan/lib_libmpi_la-dynerrutil.lo `test -f 'src/mpi/errhan/dynerrutil.c' || echo '$(srcdir)/'`src/mpi/errhan/dynerrutil.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-dynerrutil.Tpo src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-dynerrutil.Plo +# $(AM_V_CC)source='src/mpi/errhan/dynerrutil.c' object='src/mpi/errhan/lib_libmpi_la-dynerrutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libmpi_la-dynerrutil.lo `test -f 'src/mpi/errhan/dynerrutil.c' || echo '$(srcdir)/'`src/mpi/errhan/dynerrutil.c + +src/mpi/group/lib_libmpi_la-grouputil.lo: src/mpi/group/grouputil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libmpi_la-grouputil.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libmpi_la-grouputil.Tpo -c -o src/mpi/group/lib_libmpi_la-grouputil.lo `test -f 'src/mpi/group/grouputil.c' || echo '$(srcdir)/'`src/mpi/group/grouputil.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libmpi_la-grouputil.Tpo src/mpi/group/$(DEPDIR)/lib_libmpi_la-grouputil.Plo +# $(AM_V_CC)source='src/mpi/group/grouputil.c' object='src/mpi/group/lib_libmpi_la-grouputil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libmpi_la-grouputil.lo `test -f 'src/mpi/group/grouputil.c' || echo '$(srcdir)/'`src/mpi/group/grouputil.c + +src/mpi/info/lib_libmpi_la-infoutil.lo: src/mpi/info/infoutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libmpi_la-infoutil.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libmpi_la-infoutil.Tpo -c -o src/mpi/info/lib_libmpi_la-infoutil.lo `test -f 'src/mpi/info/infoutil.c' || echo '$(srcdir)/'`src/mpi/info/infoutil.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libmpi_la-infoutil.Tpo src/mpi/info/$(DEPDIR)/lib_libmpi_la-infoutil.Plo +# $(AM_V_CC)source='src/mpi/info/infoutil.c' object='src/mpi/info/lib_libmpi_la-infoutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libmpi_la-infoutil.lo `test -f 'src/mpi/info/infoutil.c' || echo '$(srcdir)/'`src/mpi/info/infoutil.c + +src/mpi/init/lib_libmpi_la-initinfo.lo: src/mpi/init/initinfo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-initinfo.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-initinfo.Tpo -c -o src/mpi/init/lib_libmpi_la-initinfo.lo `test -f 'src/mpi/init/initinfo.c' || echo '$(srcdir)/'`src/mpi/init/initinfo.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-initinfo.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-initinfo.Plo +# $(AM_V_CC)source='src/mpi/init/initinfo.c' object='src/mpi/init/lib_libmpi_la-initinfo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-initinfo.lo `test -f 'src/mpi/init/initinfo.c' || echo '$(srcdir)/'`src/mpi/init/initinfo.c + +src/mpi/init/lib_libmpi_la-async.lo: src/mpi/init/async.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-async.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-async.Tpo -c -o src/mpi/init/lib_libmpi_la-async.lo `test -f 'src/mpi/init/async.c' || echo '$(srcdir)/'`src/mpi/init/async.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-async.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-async.Plo +# $(AM_V_CC)source='src/mpi/init/async.c' object='src/mpi/init/lib_libmpi_la-async.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-async.lo `test -f 'src/mpi/init/async.c' || echo '$(srcdir)/'`src/mpi/init/async.c + +src/mpi/init/lib_libmpi_la-netloc_util.lo: src/mpi/init/netloc_util.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libmpi_la-netloc_util.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libmpi_la-netloc_util.Tpo -c -o src/mpi/init/lib_libmpi_la-netloc_util.lo `test -f 'src/mpi/init/netloc_util.c' || echo '$(srcdir)/'`src/mpi/init/netloc_util.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libmpi_la-netloc_util.Tpo src/mpi/init/$(DEPDIR)/lib_libmpi_la-netloc_util.Plo +# $(AM_V_CC)source='src/mpi/init/netloc_util.c' object='src/mpi/init/lib_libmpi_la-netloc_util.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libmpi_la-netloc_util.lo `test -f 'src/mpi/init/netloc_util.c' || echo '$(srcdir)/'`src/mpi/init/netloc_util.c + +src/mpi/pt2pt/lib_libmpi_la-bsendutil.lo: src/mpi/pt2pt/bsendutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libmpi_la-bsendutil.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsendutil.Tpo -c -o src/mpi/pt2pt/lib_libmpi_la-bsendutil.lo `test -f 'src/mpi/pt2pt/bsendutil.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsendutil.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsendutil.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsendutil.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/bsendutil.c' object='src/mpi/pt2pt/lib_libmpi_la-bsendutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libmpi_la-bsendutil.lo `test -f 'src/mpi/pt2pt/bsendutil.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsendutil.c + +src/mpi/request/lib_libmpi_la-mpir_request.lo: src/mpi/request/mpir_request.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libmpi_la-mpir_request.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libmpi_la-mpir_request.Tpo -c -o src/mpi/request/lib_libmpi_la-mpir_request.lo `test -f 'src/mpi/request/mpir_request.c' || echo '$(srcdir)/'`src/mpi/request/mpir_request.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libmpi_la-mpir_request.Tpo src/mpi/request/$(DEPDIR)/lib_libmpi_la-mpir_request.Plo +# $(AM_V_CC)source='src/mpi/request/mpir_request.c' object='src/mpi/request/lib_libmpi_la-mpir_request.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libmpi_la-mpir_request.lo `test -f 'src/mpi/request/mpir_request.c' || echo '$(srcdir)/'`src/mpi/request/mpir_request.c + +src/mpi/rma/lib_libmpi_la-winutil.lo: src/mpi/rma/winutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-winutil.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-winutil.Tpo -c -o src/mpi/rma/lib_libmpi_la-winutil.lo `test -f 'src/mpi/rma/winutil.c' || echo '$(srcdir)/'`src/mpi/rma/winutil.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-winutil.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-winutil.Plo +# $(AM_V_CC)source='src/mpi/rma/winutil.c' object='src/mpi/rma/lib_libmpi_la-winutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-winutil.lo `test -f 'src/mpi/rma/winutil.c' || echo '$(srcdir)/'`src/mpi/rma/winutil.c + +src/mpi/rma/lib_libmpi_la-rmatypeutil.lo: src/mpi/rma/rmatypeutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libmpi_la-rmatypeutil.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rmatypeutil.Tpo -c -o src/mpi/rma/lib_libmpi_la-rmatypeutil.lo `test -f 'src/mpi/rma/rmatypeutil.c' || echo '$(srcdir)/'`src/mpi/rma/rmatypeutil.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rmatypeutil.Tpo src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rmatypeutil.Plo +# $(AM_V_CC)source='src/mpi/rma/rmatypeutil.c' object='src/mpi/rma/lib_libmpi_la-rmatypeutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libmpi_la-rmatypeutil.lo `test -f 'src/mpi/rma/rmatypeutil.c' || echo '$(srcdir)/'`src/mpi/rma/rmatypeutil.c + +src/mpi/topo/lib_libmpi_la-topoutil.lo: src/mpi/topo/topoutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libmpi_la-topoutil.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topoutil.Tpo -c -o src/mpi/topo/lib_libmpi_la-topoutil.lo `test -f 'src/mpi/topo/topoutil.c' || echo '$(srcdir)/'`src/mpi/topo/topoutil.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topoutil.Tpo src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topoutil.Plo +# $(AM_V_CC)source='src/mpi/topo/topoutil.c' object='src/mpi/topo/lib_libmpi_la-topoutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libmpi_la-topoutil.lo `test -f 'src/mpi/topo/topoutil.c' || echo '$(srcdir)/'`src/mpi/topo/topoutil.c + +src/util/mem/lib_libmpi_la-handlemem.lo: src/util/mem/handlemem.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/mem/lib_libmpi_la-handlemem.lo -MD -MP -MF src/util/mem/$(DEPDIR)/lib_libmpi_la-handlemem.Tpo -c -o src/util/mem/lib_libmpi_la-handlemem.lo `test -f 'src/util/mem/handlemem.c' || echo '$(srcdir)/'`src/util/mem/handlemem.c + $(AM_V_at)$(am__mv) src/util/mem/$(DEPDIR)/lib_libmpi_la-handlemem.Tpo src/util/mem/$(DEPDIR)/lib_libmpi_la-handlemem.Plo +# $(AM_V_CC)source='src/util/mem/handlemem.c' object='src/util/mem/lib_libmpi_la-handlemem.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/mem/lib_libmpi_la-handlemem.lo `test -f 'src/util/mem/handlemem.c' || echo '$(srcdir)/'`src/util/mem/handlemem.c + +src/util/mem/lib_libmpi_la-strerror.lo: src/util/mem/strerror.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/mem/lib_libmpi_la-strerror.lo -MD -MP -MF src/util/mem/$(DEPDIR)/lib_libmpi_la-strerror.Tpo -c -o src/util/mem/lib_libmpi_la-strerror.lo `test -f 'src/util/mem/strerror.c' || echo '$(srcdir)/'`src/util/mem/strerror.c + $(AM_V_at)$(am__mv) src/util/mem/$(DEPDIR)/lib_libmpi_la-strerror.Tpo src/util/mem/$(DEPDIR)/lib_libmpi_la-strerror.Plo +# $(AM_V_CC)source='src/util/mem/strerror.c' object='src/util/mem/lib_libmpi_la-strerror.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/mem/lib_libmpi_la-strerror.lo `test -f 'src/util/mem/strerror.c' || echo '$(srcdir)/'`src/util/mem/strerror.c + +src/util/cvar/lib_libmpi_la-mpir_cvars.lo: src/util/cvar/mpir_cvars.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/cvar/lib_libmpi_la-mpir_cvars.lo -MD -MP -MF src/util/cvar/$(DEPDIR)/lib_libmpi_la-mpir_cvars.Tpo -c -o src/util/cvar/lib_libmpi_la-mpir_cvars.lo `test -f 'src/util/cvar/mpir_cvars.c' || echo '$(srcdir)/'`src/util/cvar/mpir_cvars.c + $(AM_V_at)$(am__mv) src/util/cvar/$(DEPDIR)/lib_libmpi_la-mpir_cvars.Tpo src/util/cvar/$(DEPDIR)/lib_libmpi_la-mpir_cvars.Plo +# $(AM_V_CC)source='src/util/cvar/mpir_cvars.c' object='src/util/cvar/lib_libmpi_la-mpir_cvars.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/cvar/lib_libmpi_la-mpir_cvars.lo `test -f 'src/util/cvar/mpir_cvars.c' || echo '$(srcdir)/'`src/util/cvar/mpir_cvars.c + +src/util/procmap/lib_libmpi_la-local_proc.lo: src/util/procmap/local_proc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/procmap/lib_libmpi_la-local_proc.lo -MD -MP -MF src/util/procmap/$(DEPDIR)/lib_libmpi_la-local_proc.Tpo -c -o src/util/procmap/lib_libmpi_la-local_proc.lo `test -f 'src/util/procmap/local_proc.c' || echo '$(srcdir)/'`src/util/procmap/local_proc.c + $(AM_V_at)$(am__mv) src/util/procmap/$(DEPDIR)/lib_libmpi_la-local_proc.Tpo src/util/procmap/$(DEPDIR)/lib_libmpi_la-local_proc.Plo +# $(AM_V_CC)source='src/util/procmap/local_proc.c' object='src/util/procmap/lib_libmpi_la-local_proc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/procmap/lib_libmpi_la-local_proc.lo `test -f 'src/util/procmap/local_proc.c' || echo '$(srcdir)/'`src/util/procmap/local_proc.c + +src/util/assert/lib_libmpi_la-assert.lo: src/util/assert/assert.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/assert/lib_libmpi_la-assert.lo -MD -MP -MF src/util/assert/$(DEPDIR)/lib_libmpi_la-assert.Tpo -c -o src/util/assert/lib_libmpi_la-assert.lo `test -f 'src/util/assert/assert.c' || echo '$(srcdir)/'`src/util/assert/assert.c + $(AM_V_at)$(am__mv) src/util/assert/$(DEPDIR)/lib_libmpi_la-assert.Tpo src/util/assert/$(DEPDIR)/lib_libmpi_la-assert.Plo +# $(AM_V_CC)source='src/util/assert/assert.c' object='src/util/assert/lib_libmpi_la-assert.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/assert/lib_libmpi_la-assert.lo `test -f 'src/util/assert/assert.c' || echo '$(srcdir)/'`src/util/assert/assert.c + +src/binding/fortran/mpif_h/lib_libmpi_la-fdebug.lo: src/binding/fortran/mpif_h/fdebug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpi_la-fdebug.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-fdebug.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpi_la-fdebug.lo `test -f 'src/binding/fortran/mpif_h/fdebug.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fdebug.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-fdebug.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-fdebug.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/fdebug.c' object='src/binding/fortran/mpif_h/lib_libmpi_la-fdebug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpi_la-fdebug.lo `test -f 'src/binding/fortran/mpif_h/fdebug.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fdebug.c + +src/binding/fortran/mpif_h/lib_libmpi_la-setbot.lo: src/binding/fortran/mpif_h/setbot.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libmpi_la-setbot.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-setbot.Tpo -c -o src/binding/fortran/mpif_h/lib_libmpi_la-setbot.lo `test -f 'src/binding/fortran/mpif_h/setbot.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/setbot.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-setbot.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-setbot.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/setbot.c' object='src/binding/fortran/mpif_h/lib_libmpi_la-setbot.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libmpi_la-setbot.lo `test -f 'src/binding/fortran/mpif_h/setbot.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/setbot.c + +src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_util.lo: src/binding/fortran/use_mpi/create_f90_util.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_util.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_util.Tpo -c -o src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_util.lo `test -f 'src/binding/fortran/use_mpi/create_f90_util.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_util.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_util.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_util.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/create_f90_util.c' object='src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_util.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libmpi_la-create_f90_util.lo `test -f 'src/binding/fortran/use_mpi/create_f90_util.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_util.c + +src/glue/romio/lib_libmpi_la-glue_romio.lo: src/glue/romio/glue_romio.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/glue/romio/lib_libmpi_la-glue_romio.lo -MD -MP -MF src/glue/romio/$(DEPDIR)/lib_libmpi_la-glue_romio.Tpo -c -o src/glue/romio/lib_libmpi_la-glue_romio.lo `test -f 'src/glue/romio/glue_romio.c' || echo '$(srcdir)/'`src/glue/romio/glue_romio.c + $(AM_V_at)$(am__mv) src/glue/romio/$(DEPDIR)/lib_libmpi_la-glue_romio.Tpo src/glue/romio/$(DEPDIR)/lib_libmpi_la-glue_romio.Plo +# $(AM_V_CC)source='src/glue/romio/glue_romio.c' object='src/glue/romio/lib_libmpi_la-glue_romio.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/glue/romio/lib_libmpi_la-glue_romio.lo `test -f 'src/glue/romio/glue_romio.c' || echo '$(srcdir)/'`src/glue/romio/glue_romio.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_buffer.lo: src/mpid/ch3/src/ch3u_buffer.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_buffer.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_buffer.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_buffer.lo `test -f 'src/mpid/ch3/src/ch3u_buffer.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_buffer.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_buffer.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_buffer.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_buffer.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_buffer.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_buffer.lo `test -f 'src/mpid/ch3/src/ch3u_buffer.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_buffer.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_comm.lo: src/mpid/ch3/src/ch3u_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_comm.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_comm.lo `test -f 'src/mpid/ch3/src/ch3u_comm.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_comm.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_comm.lo `test -f 'src/mpid/ch3/src/ch3u_comm.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_comm.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_comm_spawn_multiple.lo: src/mpid/ch3/src/ch3u_comm_spawn_multiple.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_comm_spawn_multiple.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm_spawn_multiple.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_comm_spawn_multiple.lo `test -f 'src/mpid/ch3/src/ch3u_comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_comm_spawn_multiple.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm_spawn_multiple.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm_spawn_multiple.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_comm_spawn_multiple.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_comm_spawn_multiple.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_comm_spawn_multiple.lo `test -f 'src/mpid/ch3/src/ch3u_comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_comm_spawn_multiple.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_connection.lo: src/mpid/ch3/src/ch3u_handle_connection.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_connection.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_connection.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_connection.lo `test -f 'src/mpid/ch3/src/ch3u_handle_connection.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_connection.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_connection.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_connection.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_connection.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_connection.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_connection.lo `test -f 'src/mpid/ch3/src/ch3u_handle_connection.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_connection.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_pkt.lo: src/mpid/ch3/src/ch3u_handle_recv_pkt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_pkt.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_pkt.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_pkt.lo `test -f 'src/mpid/ch3/src/ch3u_handle_recv_pkt.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_recv_pkt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_pkt.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_pkt.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_recv_pkt.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_pkt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_pkt.lo `test -f 'src/mpid/ch3/src/ch3u_handle_recv_pkt.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_recv_pkt.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_req.lo: src/mpid/ch3/src/ch3u_handle_recv_req.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_req.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_req.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_recv_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_recv_req.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_req.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_req.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_recv_req.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_req.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_recv_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_recv_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_recv_req.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_revoke_pkt.lo: src/mpid/ch3/src/ch3u_handle_revoke_pkt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_revoke_pkt.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_revoke_pkt.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_revoke_pkt.lo `test -f 'src/mpid/ch3/src/ch3u_handle_revoke_pkt.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_revoke_pkt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_revoke_pkt.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_revoke_pkt.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_revoke_pkt.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_revoke_pkt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_revoke_pkt.lo `test -f 'src/mpid/ch3/src/ch3u_handle_revoke_pkt.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_revoke_pkt.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_send_req.lo: src/mpid/ch3/src/ch3u_handle_send_req.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_send_req.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_send_req.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_send_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_send_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_send_req.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_send_req.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_send_req.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_send_req.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_send_req.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_send_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_send_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_send_req.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_op_req.lo: src/mpid/ch3/src/ch3u_handle_op_req.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_op_req.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_op_req.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_op_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_op_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_op_req.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_op_req.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_op_req.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_op_req.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_op_req.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_handle_op_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_op_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_op_req.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_port.lo: src/mpid/ch3/src/ch3u_port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_port.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_port.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_port.lo `test -f 'src/mpid/ch3/src/ch3u_port.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_port.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_port.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_port.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_port.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_port.lo `test -f 'src/mpid/ch3/src/ch3u_port.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_port.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_recvq.lo: src/mpid/ch3/src/ch3u_recvq.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_recvq.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_recvq.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_recvq.lo `test -f 'src/mpid/ch3/src/ch3u_recvq.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_recvq.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_recvq.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_recvq.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_recvq.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_recvq.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_recvq.lo `test -f 'src/mpid/ch3/src/ch3u_recvq.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_recvq.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_request.lo: src/mpid/ch3/src/ch3u_request.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_request.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_request.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_request.lo `test -f 'src/mpid/ch3/src/ch3u_request.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_request.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_request.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_request.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_request.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_request.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_request.lo `test -f 'src/mpid/ch3/src/ch3u_request.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_request.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_progress.lo: src/mpid/ch3/src/ch3u_rma_progress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_progress.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_progress.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_progress.lo `test -f 'src/mpid/ch3/src/ch3u_rma_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_progress.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_progress.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_progress.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_progress.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_progress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_progress.lo `test -f 'src/mpid/ch3/src/ch3u_rma_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_progress.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_ops.lo: src/mpid/ch3/src/ch3u_rma_ops.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_ops.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_ops.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_ops.lo `test -f 'src/mpid/ch3/src/ch3u_rma_ops.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_ops.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_ops.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_ops.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_ops.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_ops.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_ops.lo `test -f 'src/mpid/ch3/src/ch3u_rma_ops.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_ops.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_reqops.lo: src/mpid/ch3/src/ch3u_rma_reqops.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_reqops.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_reqops.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_reqops.lo `test -f 'src/mpid/ch3/src/ch3u_rma_reqops.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_reqops.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_reqops.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_reqops.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_reqops.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_reqops.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_reqops.lo `test -f 'src/mpid/ch3/src/ch3u_rma_reqops.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_reqops.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_sync.lo: src/mpid/ch3/src/ch3u_rma_sync.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_sync.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_sync.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_sync.lo `test -f 'src/mpid/ch3/src/ch3u_rma_sync.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_sync.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_sync.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_sync.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_sync.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_sync.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_sync.lo `test -f 'src/mpid/ch3/src/ch3u_rma_sync.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_sync.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_pkthandler.lo: src/mpid/ch3/src/ch3u_rma_pkthandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_pkthandler.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_pkthandler.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_pkthandler.lo `test -f 'src/mpid/ch3/src/ch3u_rma_pkthandler.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_pkthandler.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_pkthandler.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_pkthandler.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_pkthandler.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_pkthandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rma_pkthandler.lo `test -f 'src/mpid/ch3/src/ch3u_rma_pkthandler.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_pkthandler.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_rndv.lo: src/mpid/ch3/src/ch3u_rndv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_rndv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rndv.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rndv.lo `test -f 'src/mpid/ch3/src/ch3u_rndv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rndv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rndv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rndv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rndv.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_rndv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_rndv.lo `test -f 'src/mpid/ch3/src/ch3u_rndv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rndv.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_eager.lo: src/mpid/ch3/src/ch3u_eager.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_eager.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eager.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_eager.lo `test -f 'src/mpid/ch3/src/ch3u_eager.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_eager.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eager.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eager.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_eager.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_eager.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_eager.lo `test -f 'src/mpid/ch3/src/ch3u_eager.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_eager.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_eagersync.lo: src/mpid/ch3/src/ch3u_eagersync.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_eagersync.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eagersync.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_eagersync.lo `test -f 'src/mpid/ch3/src/ch3u_eagersync.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_eagersync.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eagersync.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eagersync.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_eagersync.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_eagersync.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_eagersync.lo `test -f 'src/mpid/ch3/src/ch3u_eagersync.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_eagersync.c + +src/mpid/ch3/src/lib_libmpi_la-ch3u_win_fns.lo: src/mpid/ch3/src/ch3u_win_fns.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-ch3u_win_fns.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_win_fns.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_win_fns.lo `test -f 'src/mpid/ch3/src/ch3u_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_win_fns.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_win_fns.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_win_fns.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_win_fns.c' object='src/mpid/ch3/src/lib_libmpi_la-ch3u_win_fns.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-ch3u_win_fns.lo `test -f 'src/mpid/ch3/src/ch3u_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_win_fns.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_abort.lo: src/mpid/ch3/src/mpid_abort.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_abort.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_abort.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_abort.lo `test -f 'src/mpid/ch3/src/mpid_abort.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_abort.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_abort.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_abort.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_abort.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_abort.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_abort.lo `test -f 'src/mpid/ch3/src/mpid_abort.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_abort.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_datatype.lo: src/mpid/ch3/src/mpid_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_datatype.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_datatype.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_datatype.lo `test -f 'src/mpid/ch3/src/mpid_datatype.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_datatype.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_datatype.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_datatype.lo `test -f 'src/mpid/ch3/src/mpid_datatype.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_datatype.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_op.lo: src/mpid/ch3/src/mpid_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_op.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_op.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_op.lo `test -f 'src/mpid/ch3/src/mpid_op.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_op.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_op.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_op.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_op.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_op.lo `test -f 'src/mpid/ch3/src/mpid_op.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_op.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_recv.lo: src/mpid/ch3/src/mpid_cancel_recv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_recv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_recv.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_recv.lo `test -f 'src/mpid/ch3/src/mpid_cancel_recv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_cancel_recv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_recv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_recv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_cancel_recv.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_recv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_recv.lo `test -f 'src/mpid/ch3/src/mpid_cancel_recv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_cancel_recv.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_send.lo: src/mpid/ch3/src/mpid_cancel_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_send.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_send.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_send.lo `test -f 'src/mpid/ch3/src/mpid_cancel_send.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_cancel_send.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_send.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_send.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_cancel_send.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_cancel_send.lo `test -f 'src/mpid/ch3/src/mpid_cancel_send.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_cancel_send.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_disconnect.lo: src/mpid/ch3/src/mpid_comm_disconnect.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_comm_disconnect.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_disconnect.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_disconnect.lo `test -f 'src/mpid/ch3/src/mpid_comm_disconnect.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_disconnect.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_disconnect.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_disconnect.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_disconnect.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_comm_disconnect.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_disconnect.lo `test -f 'src/mpid/ch3/src/mpid_comm_disconnect.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_disconnect.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_spawn_multiple.lo: src/mpid/ch3/src/mpid_comm_spawn_multiple.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_comm_spawn_multiple.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_spawn_multiple.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_spawn_multiple.lo `test -f 'src/mpid/ch3/src/mpid_comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_spawn_multiple.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_spawn_multiple.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_spawn_multiple.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_spawn_multiple.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_comm_spawn_multiple.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_spawn_multiple.lo `test -f 'src/mpid/ch3/src/mpid_comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_spawn_multiple.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_failure_ack.lo: src/mpid/ch3/src/mpid_comm_failure_ack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_comm_failure_ack.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_failure_ack.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_failure_ack.lo `test -f 'src/mpid/ch3/src/mpid_comm_failure_ack.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_failure_ack.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_failure_ack.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_failure_ack.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_failure_ack.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_comm_failure_ack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_failure_ack.lo `test -f 'src/mpid/ch3/src/mpid_comm_failure_ack.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_failure_ack.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_get_all_failed_procs.lo: src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_comm_get_all_failed_procs.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_get_all_failed_procs.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_get_all_failed_procs.lo `test -f 'src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_get_all_failed_procs.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_get_all_failed_procs.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_comm_get_all_failed_procs.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_get_all_failed_procs.lo `test -f 'src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_comm_revoke.lo: src/mpid/ch3/src/mpid_comm_revoke.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_comm_revoke.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_revoke.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_revoke.lo `test -f 'src/mpid/ch3/src/mpid_comm_revoke.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_revoke.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_revoke.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_revoke.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_revoke.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_comm_revoke.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_comm_revoke.lo `test -f 'src/mpid/ch3/src/mpid_comm_revoke.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_revoke.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_finalize.lo: src/mpid/ch3/src/mpid_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_finalize.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_finalize.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_finalize.lo `test -f 'src/mpid/ch3/src/mpid_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_finalize.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_finalize.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_finalize.lo `test -f 'src/mpid/ch3/src/mpid_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_finalize.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_get_universe_size.lo: src/mpid/ch3/src/mpid_get_universe_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_get_universe_size.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_get_universe_size.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_get_universe_size.lo `test -f 'src/mpid/ch3/src/mpid_get_universe_size.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_get_universe_size.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_get_universe_size.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_get_universe_size.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_get_universe_size.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_get_universe_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_get_universe_size.lo `test -f 'src/mpid/ch3/src/mpid_get_universe_size.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_get_universe_size.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_getpname.lo: src/mpid/ch3/src/mpid_getpname.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_getpname.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_getpname.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_getpname.lo `test -f 'src/mpid/ch3/src/mpid_getpname.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_getpname.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_getpname.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_getpname.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_getpname.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_getpname.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_getpname.lo `test -f 'src/mpid/ch3/src/mpid_getpname.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_getpname.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_improbe.lo: src/mpid/ch3/src/mpid_improbe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_improbe.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_improbe.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_improbe.lo `test -f 'src/mpid/ch3/src/mpid_improbe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_improbe.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_improbe.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_improbe.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_improbe.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_improbe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_improbe.lo `test -f 'src/mpid/ch3/src/mpid_improbe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_improbe.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_imrecv.lo: src/mpid/ch3/src/mpid_imrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_imrecv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_imrecv.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_imrecv.lo `test -f 'src/mpid/ch3/src/mpid_imrecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_imrecv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_imrecv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_imrecv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_imrecv.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_imrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_imrecv.lo `test -f 'src/mpid/ch3/src/mpid_imrecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_imrecv.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_init.lo: src/mpid/ch3/src/mpid_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_init.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_init.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_init.lo `test -f 'src/mpid/ch3/src/mpid_init.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_init.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_init.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_init.lo `test -f 'src/mpid/ch3/src/mpid_init.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_init.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_iprobe.lo: src/mpid/ch3/src/mpid_iprobe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_iprobe.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_iprobe.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_iprobe.lo `test -f 'src/mpid/ch3/src/mpid_iprobe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_iprobe.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_iprobe.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_iprobe.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_iprobe.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_iprobe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_iprobe.lo `test -f 'src/mpid/ch3/src/mpid_iprobe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_iprobe.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_irecv.lo: src/mpid/ch3/src/mpid_irecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_irecv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irecv.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_irecv.lo `test -f 'src/mpid/ch3/src/mpid_irecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_irecv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irecv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irecv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_irecv.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_irecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_irecv.lo `test -f 'src/mpid/ch3/src/mpid_irecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_irecv.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_irsend.lo: src/mpid/ch3/src/mpid_irsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_irsend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irsend.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_irsend.lo `test -f 'src/mpid/ch3/src/mpid_irsend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_irsend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irsend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irsend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_irsend.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_irsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_irsend.lo `test -f 'src/mpid/ch3/src/mpid_irsend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_irsend.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_isend.lo: src/mpid/ch3/src/mpid_isend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_isend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_isend.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_isend.lo `test -f 'src/mpid/ch3/src/mpid_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_isend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_isend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_isend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_isend.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_isend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_isend.lo `test -f 'src/mpid/ch3/src/mpid_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_isend.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_issend.lo: src/mpid/ch3/src/mpid_issend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_issend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_issend.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_issend.lo `test -f 'src/mpid/ch3/src/mpid_issend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_issend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_issend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_issend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_issend.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_issend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_issend.lo `test -f 'src/mpid/ch3/src/mpid_issend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_issend.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_mprobe.lo: src/mpid/ch3/src/mpid_mprobe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_mprobe.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mprobe.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_mprobe.lo `test -f 'src/mpid/ch3/src/mpid_mprobe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_mprobe.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mprobe.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mprobe.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_mprobe.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_mprobe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_mprobe.lo `test -f 'src/mpid/ch3/src/mpid_mprobe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_mprobe.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_mrecv.lo: src/mpid/ch3/src/mpid_mrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_mrecv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mrecv.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_mrecv.lo `test -f 'src/mpid/ch3/src/mpid_mrecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_mrecv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mrecv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mrecv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_mrecv.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_mrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_mrecv.lo `test -f 'src/mpid/ch3/src/mpid_mrecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_mrecv.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_port.lo: src/mpid/ch3/src/mpid_port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_port.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_port.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_port.lo `test -f 'src/mpid/ch3/src/mpid_port.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_port.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_port.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_port.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_port.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_port.lo `test -f 'src/mpid/ch3/src/mpid_port.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_port.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_probe.lo: src/mpid/ch3/src/mpid_probe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_probe.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_probe.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_probe.lo `test -f 'src/mpid/ch3/src/mpid_probe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_probe.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_probe.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_probe.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_probe.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_probe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_probe.lo `test -f 'src/mpid/ch3/src/mpid_probe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_probe.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_recv.lo: src/mpid/ch3/src/mpid_recv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_recv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_recv.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_recv.lo `test -f 'src/mpid/ch3/src/mpid_recv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_recv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_recv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_recv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_recv.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_recv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_recv.lo `test -f 'src/mpid/ch3/src/mpid_recv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_recv.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_rsend.lo: src/mpid/ch3/src/mpid_rsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_rsend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rsend.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_rsend.lo `test -f 'src/mpid/ch3/src/mpid_rsend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_rsend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rsend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rsend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_rsend.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_rsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_rsend.lo `test -f 'src/mpid/ch3/src/mpid_rsend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_rsend.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_send.lo: src/mpid/ch3/src/mpid_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_send.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_send.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_send.lo `test -f 'src/mpid/ch3/src/mpid_send.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_send.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_send.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_send.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_send.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_send.lo `test -f 'src/mpid/ch3/src/mpid_send.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_send.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_ssend.lo: src/mpid/ch3/src/mpid_ssend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_ssend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_ssend.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_ssend.lo `test -f 'src/mpid/ch3/src/mpid_ssend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_ssend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_ssend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_ssend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_ssend.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_ssend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_ssend.lo `test -f 'src/mpid/ch3/src/mpid_ssend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_ssend.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_startall.lo: src/mpid/ch3/src/mpid_startall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_startall.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_startall.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_startall.lo `test -f 'src/mpid/ch3/src/mpid_startall.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_startall.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_startall.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_startall.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_startall.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_startall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_startall.lo `test -f 'src/mpid/ch3/src/mpid_startall.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_startall.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_vc.lo: src/mpid/ch3/src/mpid_vc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_vc.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_vc.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_vc.lo `test -f 'src/mpid/ch3/src/mpid_vc.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_vc.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_vc.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_vc.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_vc.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_vc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_vc.lo `test -f 'src/mpid/ch3/src/mpid_vc.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_vc.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_rma.lo: src/mpid/ch3/src/mpid_rma.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_rma.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rma.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_rma.lo `test -f 'src/mpid/ch3/src/mpid_rma.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_rma.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rma.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rma.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_rma.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_rma.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_rma.lo `test -f 'src/mpid/ch3/src/mpid_rma.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_rma.c + +src/mpid/ch3/src/lib_libmpi_la-mpidi_rma.lo: src/mpid/ch3/src/mpidi_rma.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpidi_rma.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_rma.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpidi_rma.lo `test -f 'src/mpid/ch3/src/mpidi_rma.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_rma.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_rma.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_rma.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpidi_rma.c' object='src/mpid/ch3/src/lib_libmpi_la-mpidi_rma.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpidi_rma.lo `test -f 'src/mpid/ch3/src/mpidi_rma.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_rma.c + +src/mpid/ch3/src/lib_libmpi_la-mpid_aint.lo: src/mpid/ch3/src/mpid_aint.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpid_aint.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_aint.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_aint.lo `test -f 'src/mpid/ch3/src/mpid_aint.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_aint.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_aint.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_aint.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_aint.c' object='src/mpid/ch3/src/lib_libmpi_la-mpid_aint.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpid_aint.lo `test -f 'src/mpid/ch3/src/mpid_aint.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_aint.c + +src/mpid/ch3/src/lib_libmpi_la-mpidi_isend_self.lo: src/mpid/ch3/src/mpidi_isend_self.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpidi_isend_self.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_isend_self.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpidi_isend_self.lo `test -f 'src/mpid/ch3/src/mpidi_isend_self.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_isend_self.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_isend_self.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_isend_self.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpidi_isend_self.c' object='src/mpid/ch3/src/lib_libmpi_la-mpidi_isend_self.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpidi_isend_self.lo `test -f 'src/mpid/ch3/src/mpidi_isend_self.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_isend_self.c + +src/mpid/ch3/src/lib_libmpi_la-mpidi_pg.lo: src/mpid/ch3/src/mpidi_pg.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpidi_pg.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_pg.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpidi_pg.lo `test -f 'src/mpid/ch3/src/mpidi_pg.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_pg.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_pg.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_pg.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpidi_pg.c' object='src/mpid/ch3/src/lib_libmpi_la-mpidi_pg.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpidi_pg.lo `test -f 'src/mpid/ch3/src/mpidi_pg.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_pg.c + +src/mpid/ch3/src/lib_libmpi_la-mpidi_printf.lo: src/mpid/ch3/src/mpidi_printf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libmpi_la-mpidi_printf.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_printf.Tpo -c -o src/mpid/ch3/src/lib_libmpi_la-mpidi_printf.lo `test -f 'src/mpid/ch3/src/mpidi_printf.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_printf.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_printf.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_printf.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpidi_printf.c' object='src/mpid/ch3/src/lib_libmpi_la-mpidi_printf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libmpi_la-mpidi_printf.lo `test -f 'src/mpid/ch3/src/mpidi_printf.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_printf.c + +src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_init_sock.lo: src/mpid/ch3/util/sock/ch3u_init_sock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_init_sock.lo -MD -MP -MF src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_init_sock.Tpo -c -o src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_init_sock.lo `test -f 'src/mpid/ch3/util/sock/ch3u_init_sock.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_init_sock.c + $(AM_V_at)$(am__mv) src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_init_sock.Tpo src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_init_sock.Plo +# $(AM_V_CC)source='src/mpid/ch3/util/sock/ch3u_init_sock.c' object='src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_init_sock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_init_sock.lo `test -f 'src/mpid/ch3/util/sock/ch3u_init_sock.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_init_sock.c + +src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_connect_sock.lo: src/mpid/ch3/util/sock/ch3u_connect_sock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_connect_sock.lo -MD -MP -MF src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_connect_sock.Tpo -c -o src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_connect_sock.lo `test -f 'src/mpid/ch3/util/sock/ch3u_connect_sock.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_connect_sock.c + $(AM_V_at)$(am__mv) src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_connect_sock.Tpo src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_connect_sock.Plo +# $(AM_V_CC)source='src/mpid/ch3/util/sock/ch3u_connect_sock.c' object='src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_connect_sock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_connect_sock.lo `test -f 'src/mpid/ch3/util/sock/ch3u_connect_sock.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_connect_sock.c + +src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_getinterfaces.lo: src/mpid/ch3/util/sock/ch3u_getinterfaces.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_getinterfaces.lo -MD -MP -MF src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_getinterfaces.Tpo -c -o src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_getinterfaces.lo `test -f 'src/mpid/ch3/util/sock/ch3u_getinterfaces.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_getinterfaces.c + $(AM_V_at)$(am__mv) src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_getinterfaces.Tpo src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_getinterfaces.Plo +# $(AM_V_CC)source='src/mpid/ch3/util/sock/ch3u_getinterfaces.c' object='src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_getinterfaces.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/util/sock/lib_libmpi_la-ch3u_getinterfaces.lo `test -f 'src/mpid/ch3/util/sock/ch3u_getinterfaces.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_getinterfaces.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_finalize.lo: src/mpid/ch3/channels/nemesis/src/ch3_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_finalize.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_finalize.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_finalize.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_init.lo: src/mpid/ch3/channels/nemesis/src/ch3_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_init.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_init.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_init.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_init.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_init.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isend.lo: src/mpid/ch3/channels/nemesis/src/ch3_isend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isend.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isend.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_isend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_isend.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isend.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_isend.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isendv.lo: src/mpid/ch3/channels/nemesis/src/ch3_isendv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isendv.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isendv.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_isendv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_isendv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_isendv.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isendv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_isendv.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_isendv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_isendv.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsg.lo: src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsg.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsg.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsg.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsg.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsgv.lo: src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsgv.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsgv.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsgv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_istartmsgv.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_progress.lo: src/mpid/ch3/channels/nemesis/src/ch3_progress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_progress.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_progress.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_progress.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_progress.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_progress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_progress.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_progress.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_rma_shm.lo: src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_rma_shm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_rma_shm.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_rma_shm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_rma_shm.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_rma_shm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_rma_shm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_rma_shm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_win_fns.lo: src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_win_fns.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_win_fns.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_win_fns.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3_win_fns.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_comm.lo: src/mpid/ch3/channels/nemesis/src/ch3i_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_comm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_comm.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_comm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3i_comm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3i_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_comm.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_comm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3i_comm.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_comm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3i_comm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3i_comm.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_eagernoncontig.lo: src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_eagernoncontig.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_eagernoncontig.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_eagernoncontig.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_eagernoncontig.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_eagernoncontig.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_eagernoncontig.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-ch3i_eagernoncontig.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_init.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_init.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_init.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_init.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_init.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_init.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_mpich.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_mpich.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_mpich.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_mpich.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_mpich.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_mpich.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_mpich.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_mpich.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_ckpt.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_ckpt.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_ckpt.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_ckpt.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_ckpt.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_ckpt.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_ckpt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_ckpt.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_finalize.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_finalize.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_finalize.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_finalize.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network_poll.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network_poll.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network_poll.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network_poll.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network_poll.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network_poll.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network_poll.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network_poll.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_network.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_debug.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_debug.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_debug.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_debug.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_debug.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_debug.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_debug.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt_shm.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt_shm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt_shm.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt_shm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt_shm.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt_shm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt_shm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_lmt_shm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c + +src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_net_array.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_net_array.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_net_array.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_net_array.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_net_array.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_net_array.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c' object='src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_net_array.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libmpi_la-mpid_nem_net_array.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_finalize.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_finalize.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_finalize.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_finalize.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_init.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_init.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_init.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_init.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_init.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_init.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_send.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_send.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_send.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_send.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_send.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_send.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_send.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_utility.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_utility.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_utility.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_utility.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_utility.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_utility.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_utility.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_utility.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-socksm.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-socksm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-socksm.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-socksm.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-socksm.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-socksm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-socksm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-socksm.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_getip.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_getip.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_getip.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_getip.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_getip.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_getip.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_getip.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_getip.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_ckpt.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_ckpt.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_ckpt.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_ckpt.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_ckpt.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_ckpt.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_ckpt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libmpi_la-tcp_ckpt.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c + +src/mpid/ch3/channels/nemesis/netmod/none/lib_libmpi_la-none.lo: src/mpid/ch3/channels/nemesis/netmod/none/none.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/none/lib_libmpi_la-none.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libmpi_la-none.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/none/lib_libmpi_la-none.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/none/none.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/none/none.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libmpi_la-none.Tpo src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libmpi_la-none.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/none/none.c' object='src/mpid/ch3/channels/nemesis/netmod/none/lib_libmpi_la-none.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/none/lib_libmpi_la-none.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/none/none.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/none/none.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_init.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_init.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_init.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_init.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_cm.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_cm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_cm.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_cm.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_cm.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_cm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_cm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_cm.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_tagged.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_tagged.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_tagged.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_tagged.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_tagged.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_tagged.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_tagged.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_tagged.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_msg.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_msg.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_msg.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_msg.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_msg.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_msg.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_msg.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_msg.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_data.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_data.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_data.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_data.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_data.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_data.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_data.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_data.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_progress.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_progress.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_progress.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_progress.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_progress.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_progress.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_progress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libmpi_la-ofi_progress.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c + +src/mpid/ch3/channels/nemesis/utils/monitor/lib_libmpi_la-papi_defs.lo: src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/utils/monitor/lib_libmpi_la-papi_defs.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libmpi_la-papi_defs.Tpo -c -o src/mpid/ch3/channels/nemesis/utils/monitor/lib_libmpi_la-papi_defs.lo `test -f 'src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libmpi_la-papi_defs.Tpo src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libmpi_la-papi_defs.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c' object='src/mpid/ch3/channels/nemesis/utils/monitor/lib_libmpi_la-papi_defs.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/utils/monitor/lib_libmpi_la-papi_defs.lo `test -f 'src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c + +src/mpid/ch3/channels/nemesis/utils/replacements/lib_libmpi_la-mkstemp.lo: src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/utils/replacements/lib_libmpi_la-mkstemp.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libmpi_la-mkstemp.Tpo -c -o src/mpid/ch3/channels/nemesis/utils/replacements/lib_libmpi_la-mkstemp.lo `test -f 'src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libmpi_la-mkstemp.Tpo src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libmpi_la-mkstemp.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c' object='src/mpid/ch3/channels/nemesis/utils/replacements/lib_libmpi_la-mkstemp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/utils/replacements/lib_libmpi_la-mkstemp.lo `test -f 'src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-sock.lo: src/mpid/ch3/channels/sock/src/sock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-sock.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-sock.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-sock.lo `test -f 'src/mpid/ch3/channels/sock/src/sock.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/sock.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-sock.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-sock.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/sock.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-sock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-sock.lo `test -f 'src/mpid/ch3/channels/sock/src/sock.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/sock.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_finalize.lo: src/mpid/ch3/channels/sock/src/ch3_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_finalize.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_finalize.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_finalize.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_finalize.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_finalize.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_init.lo: src/mpid/ch3/channels/sock/src/ch3_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_init.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_init.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_init.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_init.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_init.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isend.lo: src/mpid/ch3/channels/sock/src/ch3_isend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isend.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isend.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_isend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_isend.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isend.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_isend.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isendv.lo: src/mpid/ch3/channels/sock/src/ch3_isendv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isendv.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isendv.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_isendv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_isendv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_isendv.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isendv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_isendv.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_isendv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_isendv.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsg.lo: src/mpid/ch3/channels/sock/src/ch3_istartmsg.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsg.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsg.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_istartmsg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_istartmsg.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_istartmsg.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsg.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsg.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_istartmsg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_istartmsg.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsgv.lo: src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsgv.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsgv.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsgv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_istartmsgv.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_progress.lo: src/mpid/ch3/channels/sock/src/ch3_progress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_progress.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_progress.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_progress.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_progress.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_progress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_progress.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_progress.c + +src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_win_fns.lo: src/mpid/ch3/channels/sock/src/ch3_win_fns.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_win_fns.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_win_fns.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_win_fns.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_win_fns.c' object='src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_win_fns.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libmpi_la-ch3_win_fns.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_win_fns.c + +src/mpid/ch4/src/lib_libmpi_la-ch4_globals.lo: src/mpid/ch4/src/ch4_globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4_globals.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_globals.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_globals.lo `test -f 'src/mpid/ch4/src/ch4_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_globals.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_globals.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4_globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_globals.lo `test -f 'src/mpid/ch4/src/ch4_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_globals.c + +src/mpid/ch4/src/lib_libmpi_la-ch4_impl.lo: src/mpid/ch4/src/ch4_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4_impl.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_impl.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_impl.lo `test -f 'src/mpid/ch4/src/ch4_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_impl.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_impl.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_impl.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_impl.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_impl.lo `test -f 'src/mpid/ch4/src/ch4_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_impl.c + +src/mpid/ch4/src/lib_libmpi_la-ch4_init.lo: src/mpid/ch4/src/ch4_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4_init.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_init.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_init.lo `test -f 'src/mpid/ch4/src/ch4_init.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_init.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_init.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_init.lo `test -f 'src/mpid/ch4/src/ch4_init.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_init.c + +src/mpid/ch4/src/lib_libmpi_la-ch4_comm.lo: src/mpid/ch4/src/ch4_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4_comm.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_comm.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_comm.lo `test -f 'src/mpid/ch4/src/ch4_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_comm.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_comm.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_comm.lo `test -f 'src/mpid/ch4/src/ch4_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_comm.c + +src/mpid/ch4/src/lib_libmpi_la-ch4_spawn.lo: src/mpid/ch4/src/ch4_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4_spawn.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_spawn.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_spawn.lo `test -f 'src/mpid/ch4/src/ch4_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_spawn.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_spawn.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_spawn.lo `test -f 'src/mpid/ch4/src/ch4_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_spawn.c + +src/mpid/ch4/src/lib_libmpi_la-ch4_win.lo: src/mpid/ch4/src/ch4_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4_win.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_win.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_win.lo `test -f 'src/mpid/ch4/src/ch4_win.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_win.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_win.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_win.lo `test -f 'src/mpid/ch4/src/ch4_win.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_win.c + +src/mpid/ch4/src/lib_libmpi_la-ch4i_comm.lo: src/mpid/ch4/src/ch4i_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4i_comm.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4i_comm.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4i_comm.lo `test -f 'src/mpid/ch4/src/ch4i_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4i_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4i_comm.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4i_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4i_comm.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4i_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4i_comm.lo `test -f 'src/mpid/ch4/src/ch4i_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4i_comm.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_buf.lo: src/mpid/ch4/src/ch4r_buf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_buf.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_buf.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_buf.lo `test -f 'src/mpid/ch4/src/ch4r_buf.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_buf.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_buf.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_buf.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_buf.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_buf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_buf.lo `test -f 'src/mpid/ch4/src/ch4r_buf.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_buf.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_init.lo: src/mpid/ch4/src/ch4r_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_init.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_init.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_init.lo `test -f 'src/mpid/ch4/src/ch4r_init.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_init.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_init.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_init.lo `test -f 'src/mpid/ch4/src/ch4r_init.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_init.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_comm.lo: src/mpid/ch4/src/ch4r_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_comm.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_comm.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_comm.lo `test -f 'src/mpid/ch4/src/ch4r_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_comm.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_comm.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_comm.lo `test -f 'src/mpid/ch4/src/ch4r_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_comm.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_proc.lo: src/mpid/ch4/src/ch4r_proc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_proc.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_proc.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_proc.lo `test -f 'src/mpid/ch4/src/ch4r_proc.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_proc.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_proc.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_proc.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_proc.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_proc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_proc.lo `test -f 'src/mpid/ch4/src/ch4r_proc.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_proc.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_recvq.lo: src/mpid/ch4/src/ch4r_recvq.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_recvq.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_recvq.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_recvq.lo `test -f 'src/mpid/ch4/src/ch4r_recvq.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_recvq.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_recvq.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_recvq.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_recvq.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_recvq.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_recvq.lo `test -f 'src/mpid/ch4/src/ch4r_recvq.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_recvq.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_callbacks.lo: src/mpid/ch4/src/ch4r_callbacks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_callbacks.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_callbacks.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_callbacks.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_callbacks.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_callbacks.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_callbacks.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_callbacks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_callbacks.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_origin_callbacks.lo: src/mpid/ch4/src/ch4r_rma_origin_callbacks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_origin_callbacks.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_origin_callbacks.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_origin_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_rma_origin_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_rma_origin_callbacks.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_origin_callbacks.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_origin_callbacks.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_rma_origin_callbacks.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_origin_callbacks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_origin_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_rma_origin_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_rma_origin_callbacks.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_target_callbacks.lo: src/mpid/ch4/src/ch4r_rma_target_callbacks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_target_callbacks.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_target_callbacks.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_target_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_rma_target_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_rma_target_callbacks.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_target_callbacks.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_target_callbacks.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_rma_target_callbacks.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_target_callbacks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_rma_target_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_rma_target_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_rma_target_callbacks.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_symheap.lo: src/mpid/ch4/src/ch4r_symheap.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_symheap.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_symheap.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_symheap.lo `test -f 'src/mpid/ch4/src/ch4r_symheap.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_symheap.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_symheap.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_symheap.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_symheap.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_symheap.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_symheap.lo `test -f 'src/mpid/ch4/src/ch4r_symheap.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_symheap.c + +src/mpid/ch4/src/lib_libmpi_la-ch4r_win.lo: src/mpid/ch4/src/ch4r_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4r_win.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_win.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_win.lo `test -f 'src/mpid/ch4/src/ch4r_win.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_win.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_win.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4r_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4r_win.lo `test -f 'src/mpid/ch4/src/ch4r_win.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_win.c + +src/mpid/ch4/src/lib_libmpi_la-mpid_ch4_net_array.lo: src/mpid/ch4/src/mpid_ch4_net_array.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-mpid_ch4_net_array.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-mpid_ch4_net_array.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-mpid_ch4_net_array.lo `test -f 'src/mpid/ch4/src/mpid_ch4_net_array.c' || echo '$(srcdir)/'`src/mpid/ch4/src/mpid_ch4_net_array.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-mpid_ch4_net_array.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-mpid_ch4_net_array.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/mpid_ch4_net_array.c' object='src/mpid/ch4/src/lib_libmpi_la-mpid_ch4_net_array.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-mpid_ch4_net_array.lo `test -f 'src/mpid/ch4/src/mpid_ch4_net_array.c' || echo '$(srcdir)/'`src/mpid/ch4/src/mpid_ch4_net_array.c + +src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals.lo: src/mpid/ch4/src/ch4_coll_globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals.lo `test -f 'src/mpid/ch4/src/ch4_coll_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_coll_globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_coll_globals.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals.lo `test -f 'src/mpid/ch4/src/ch4_coll_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_coll_globals.c + +src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals_default.lo: src/mpid/ch4/src/ch4_coll_globals_default.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals_default.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals_default.Tpo -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals_default.lo `test -f 'src/mpid/ch4/src/ch4_coll_globals_default.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_coll_globals_default.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals_default.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals_default.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_coll_globals_default.c' object='src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals_default.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libmpi_la-ch4_coll_globals_default.lo `test -f 'src/mpid/ch4/src/ch4_coll_globals_default.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_coll_globals_default.c + +src/mpid/ch4/generic/lib_libmpi_la-mpidig_globals.lo: src/mpid/ch4/generic/mpidig_globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/generic/lib_libmpi_la-mpidig_globals.lo -MD -MP -MF src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_globals.Tpo -c -o src/mpid/ch4/generic/lib_libmpi_la-mpidig_globals.lo `test -f 'src/mpid/ch4/generic/mpidig_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/generic/mpidig_globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_globals.Tpo src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/generic/mpidig_globals.c' object='src/mpid/ch4/generic/lib_libmpi_la-mpidig_globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/generic/lib_libmpi_la-mpidig_globals.lo `test -f 'src/mpid/ch4/generic/mpidig_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/generic/mpidig_globals.c + +src/mpid/ch4/generic/lib_libmpi_la-mpidig_init.lo: src/mpid/ch4/generic/mpidig_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/generic/lib_libmpi_la-mpidig_init.lo -MD -MP -MF src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_init.Tpo -c -o src/mpid/ch4/generic/lib_libmpi_la-mpidig_init.lo `test -f 'src/mpid/ch4/generic/mpidig_init.c' || echo '$(srcdir)/'`src/mpid/ch4/generic/mpidig_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_init.Tpo src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/generic/mpidig_init.c' object='src/mpid/ch4/generic/lib_libmpi_la-mpidig_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/generic/lib_libmpi_la-mpidig_init.lo `test -f 'src/mpid/ch4/generic/mpidig_init.c' || echo '$(srcdir)/'`src/mpid/ch4/generic/mpidig_init.c + +src/mpid/ch4/netmod/src/lib_libmpi_la-netmod_impl.lo: src/mpid/ch4/netmod/src/netmod_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/src/lib_libmpi_la-netmod_impl.lo -MD -MP -MF src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libmpi_la-netmod_impl.Tpo -c -o src/mpid/ch4/netmod/src/lib_libmpi_la-netmod_impl.lo `test -f 'src/mpid/ch4/netmod/src/netmod_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/src/netmod_impl.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libmpi_la-netmod_impl.Tpo src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libmpi_la-netmod_impl.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/src/netmod_impl.c' object='src/mpid/ch4/netmod/src/lib_libmpi_la-netmod_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/src/lib_libmpi_la-netmod_impl.lo `test -f 'src/mpid/ch4/netmod/src/netmod_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/src/netmod_impl.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-func_table.lo: src/mpid/ch4/netmod/ofi/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-func_table.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/ofi/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-func_table.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/func_table.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/ofi/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/func_table.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo: src/mpid/ch4/netmod/ofi/ofi_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_init.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_init.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_comm.lo: src/mpid/ch4/netmod/ofi/ofi_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_comm.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_comm.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_comm.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_comm.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_comm.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_comm.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_comm.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_datatype.lo: src/mpid/ch4/netmod/ofi/ofi_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_datatype.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_datatype.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_datatype.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_datatype.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_datatype.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_datatype.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_datatype.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_op.lo: src/mpid/ch4/netmod/ofi/ofi_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_op.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_op.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_op.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_op.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_op.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_op.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_op.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_op.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_op.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_spawn.lo: src/mpid/ch4/netmod/ofi/ofi_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_spawn.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_spawn.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_spawn.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_spawn.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_spawn.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_spawn.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_spawn.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_win.lo: src/mpid/ch4/netmod/ofi/ofi_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_win.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_win.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_win.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_win.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_win.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_win.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_win.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-globals.lo: src/mpid/ch4/netmod/ofi/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-globals.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/ofi/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-globals.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/globals.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/ofi/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/globals.c + +src/mpid/ch4/netmod/ofi/lib_libmpi_la-util.lo: src/mpid/ch4/netmod/ofi/util.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-util.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-util.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-util.lo `test -f 'src/mpid/ch4/netmod/ofi/util.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/util.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-util.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-util.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/util.c' object='src/mpid/ch4/netmod/ofi/lib_libmpi_la-util.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libmpi_la-util.lo `test -f 'src/mpid/ch4/netmod/ofi/util.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/util.c + +src/mpid/ch4/netmod/ucx/lib_libmpi_la-func_table.lo: src/mpid/ch4/netmod/ucx/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-func_table.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/ucx/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-func_table.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/func_table.c' object='src/mpid/ch4/netmod/ucx/lib_libmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/ucx/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/func_table.c + +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_init.lo: src/mpid/ch4/netmod/ucx/ucx_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_init.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_init.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_init.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_init.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_init.c' object='src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_init.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_init.c + +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_comm.lo: src/mpid/ch4/netmod/ucx/ucx_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_comm.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_comm.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_comm.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_comm.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_comm.c' object='src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_comm.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_comm.c + +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_datatype.lo: src/mpid/ch4/netmod/ucx/ucx_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_datatype.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_datatype.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_datatype.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_datatype.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_datatype.c' object='src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_datatype.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_datatype.c + +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_op.lo: src/mpid/ch4/netmod/ucx/ucx_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_op.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_op.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_op.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_op.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_op.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_op.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_op.c' object='src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_op.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_op.c + +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_spawn.lo: src/mpid/ch4/netmod/ucx/ucx_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_spawn.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_spawn.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_spawn.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_spawn.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_spawn.c' object='src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_spawn.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_spawn.c + +src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_win.lo: src/mpid/ch4/netmod/ucx/ucx_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_win.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_win.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_win.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_win.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_win.c' object='src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-ucx_win.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_win.c + +src/mpid/ch4/netmod/ucx/lib_libmpi_la-globals.lo: src/mpid/ch4/netmod/ucx/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-globals.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/ucx/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-globals.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/globals.c' object='src/mpid/ch4/netmod/ucx/lib_libmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/ucx/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/globals.c + +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-func_table.lo: src/mpid/ch4/netmod/stubnm/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-func_table.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/stubnm/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-func_table.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/func_table.c' object='src/mpid/ch4/netmod/stubnm/lib_libmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/stubnm/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/func_table.c + +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_init.lo: src/mpid/ch4/netmod/stubnm/stubnm_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_init.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_init.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_init.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_init.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_init.c' object='src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_init.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_init.c + +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_comm.lo: src/mpid/ch4/netmod/stubnm/stubnm_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_comm.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_comm.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_comm.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_comm.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_comm.c' object='src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_comm.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_comm.c + +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_datatype.lo: src/mpid/ch4/netmod/stubnm/stubnm_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_datatype.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_datatype.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_datatype.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_datatype.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_datatype.c' object='src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_datatype.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_datatype.c + +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_op.lo: src/mpid/ch4/netmod/stubnm/stubnm_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_op.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_op.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_op.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_op.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_op.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_op.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_op.c' object='src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_op.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_op.c + +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_spawn.lo: src/mpid/ch4/netmod/stubnm/stubnm_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_spawn.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_spawn.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_spawn.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_spawn.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_spawn.c' object='src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_spawn.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_spawn.c + +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_win.lo: src/mpid/ch4/netmod/stubnm/stubnm_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_win.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_win.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_win.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_win.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_win.c' object='src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-stubnm_win.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_win.c + +src/mpid/ch4/netmod/stubnm/lib_libmpi_la-globals.lo: src/mpid/ch4/netmod/stubnm/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-globals.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/stubnm/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-globals.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/globals.c' object='src/mpid/ch4/netmod/stubnm/lib_libmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/stubnm/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/globals.c + +src/mpid/ch4/shm/src/lib_libmpi_la-func_table.lo: src/mpid/ch4/shm/src/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-func_table.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/src/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-func_table.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/func_table.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/src/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/func_table.c + +src/mpid/ch4/shm/src/lib_libmpi_la-shm_init.lo: src/mpid/ch4/shm/src/shm_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-shm_init.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_init.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_init.lo `test -f 'src/mpid/ch4/shm/src/shm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_init.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_init.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-shm_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_init.lo `test -f 'src/mpid/ch4/shm/src/shm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_init.c + +src/mpid/ch4/shm/src/lib_libmpi_la-shm_hooks.lo: src/mpid/ch4/shm/src/shm_hooks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-shm_hooks.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_hooks.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_hooks.lo `test -f 'src/mpid/ch4/shm/src/shm_hooks.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_hooks.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_hooks.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_hooks.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_hooks.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-shm_hooks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_hooks.lo `test -f 'src/mpid/ch4/shm/src/shm_hooks.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_hooks.c + +src/mpid/ch4/shm/src/lib_libmpi_la-shm_dpm.lo: src/mpid/ch4/shm/src/shm_dpm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-shm_dpm.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_dpm.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_dpm.lo `test -f 'src/mpid/ch4/shm/src/shm_dpm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_dpm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_dpm.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_dpm.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_dpm.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-shm_dpm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_dpm.lo `test -f 'src/mpid/ch4/shm/src/shm_dpm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_dpm.c + +src/mpid/ch4/shm/src/lib_libmpi_la-shm_mem.lo: src/mpid/ch4/shm/src/shm_mem.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-shm_mem.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_mem.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_mem.lo `test -f 'src/mpid/ch4/shm/src/shm_mem.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_mem.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_mem.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_mem.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_mem.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-shm_mem.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_mem.lo `test -f 'src/mpid/ch4/shm/src/shm_mem.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_mem.c + +src/mpid/ch4/shm/src/lib_libmpi_la-shm_misc.lo: src/mpid/ch4/shm/src/shm_misc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-shm_misc.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_misc.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_misc.lo `test -f 'src/mpid/ch4/shm/src/shm_misc.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_misc.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_misc.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_misc.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_misc.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-shm_misc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_misc.lo `test -f 'src/mpid/ch4/shm/src/shm_misc.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_misc.c + +src/mpid/ch4/shm/src/lib_libmpi_la-shm_rma.lo: src/mpid/ch4/shm/src/shm_rma.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-shm_rma.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_rma.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_rma.lo `test -f 'src/mpid/ch4/shm/src/shm_rma.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_rma.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_rma.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_rma.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_rma.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-shm_rma.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_rma.lo `test -f 'src/mpid/ch4/shm/src/shm_rma.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_rma.c + +src/mpid/ch4/shm/src/lib_libmpi_la-shm_impl.lo: src/mpid/ch4/shm/src/shm_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-shm_impl.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_impl.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_impl.lo `test -f 'src/mpid/ch4/shm/src/shm_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_impl.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_impl.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_impl.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_impl.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-shm_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-shm_impl.lo `test -f 'src/mpid/ch4/shm/src/shm_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_impl.c + +src/mpid/ch4/shm/src/lib_libmpi_la-topotree.lo: src/mpid/ch4/shm/src/topotree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-topotree.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-topotree.lo `test -f 'src/mpid/ch4/shm/src/topotree.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/topotree.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/topotree.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-topotree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-topotree.lo `test -f 'src/mpid/ch4/shm/src/topotree.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/topotree.c + +src/mpid/ch4/shm/src/lib_libmpi_la-topotree_util.lo: src/mpid/ch4/shm/src/topotree_util.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libmpi_la-topotree_util.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree_util.Tpo -c -o src/mpid/ch4/shm/src/lib_libmpi_la-topotree_util.lo `test -f 'src/mpid/ch4/shm/src/topotree_util.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/topotree_util.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree_util.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree_util.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/topotree_util.c' object='src/mpid/ch4/shm/src/lib_libmpi_la-topotree_util.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libmpi_la-topotree_util.lo `test -f 'src/mpid/ch4/shm/src/topotree_util.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/topotree_util.c + +src/mpid/ch4/shm/stubshm/lib_libmpi_la-globals.lo: src/mpid/ch4/shm/stubshm/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-globals.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/stubshm/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-globals.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/globals.c' object='src/mpid/ch4/shm/stubshm/lib_libmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/stubshm/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/globals.c + +src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_comm.lo: src/mpid/ch4/shm/stubshm/stubshm_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_comm.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_comm.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_comm.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_comm.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/stubshm_comm.c' object='src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_comm.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_comm.c + +src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_init.lo: src/mpid/ch4/shm/stubshm/stubshm_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_init.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_init.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_init.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_init.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/stubshm_init.c' object='src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_init.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_init.c + +src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_spawn.lo: src/mpid/ch4/shm/stubshm/stubshm_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_spawn.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_spawn.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_spawn.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_spawn.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/stubshm_spawn.c' object='src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_spawn.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_spawn.c + +src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_win.lo: src/mpid/ch4/shm/stubshm/stubshm_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_win.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_win.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_win.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_win.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_win.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/stubshm_win.c' object='src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libmpi_la-stubshm_win.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_win.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_win.c + +src/mpid/ch4/shm/posix/release_gather/lib_libmpi_la-release_gather.lo: src/mpid/ch4/shm/posix/release_gather/release_gather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/release_gather/lib_libmpi_la-release_gather.lo -MD -MP -MF src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libmpi_la-release_gather.Tpo -c -o src/mpid/ch4/shm/posix/release_gather/lib_libmpi_la-release_gather.lo `test -f 'src/mpid/ch4/shm/posix/release_gather/release_gather.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/release_gather/release_gather.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libmpi_la-release_gather.Tpo src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libmpi_la-release_gather.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/release_gather/release_gather.c' object='src/mpid/ch4/shm/posix/release_gather/lib_libmpi_la-release_gather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/release_gather/lib_libmpi_la-release_gather.lo `test -f 'src/mpid/ch4/shm/posix/release_gather/release_gather.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/release_gather/release_gather.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-globals.lo: src/mpid/ch4/shm/posix/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-globals.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-globals.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/globals.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/globals.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_comm.lo: src/mpid/ch4/shm/posix/posix_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-posix_comm.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_comm.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_comm.lo `test -f 'src/mpid/ch4/shm/posix/posix_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_comm.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_comm.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-posix_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_comm.lo `test -f 'src/mpid/ch4/shm/posix/posix_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_comm.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_init.lo: src/mpid/ch4/shm/posix/posix_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-posix_init.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_init.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_init.lo `test -f 'src/mpid/ch4/shm/posix/posix_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_init.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_init.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-posix_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_init.lo `test -f 'src/mpid/ch4/shm/posix/posix_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_init.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_op.lo: src/mpid/ch4/shm/posix/posix_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-posix_op.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_op.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_op.lo `test -f 'src/mpid/ch4/shm/posix/posix_op.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_op.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_op.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_op.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_op.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-posix_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_op.lo `test -f 'src/mpid/ch4/shm/posix/posix_op.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_op.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_datatype.lo: src/mpid/ch4/shm/posix/posix_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-posix_datatype.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_datatype.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_datatype.lo `test -f 'src/mpid/ch4/shm/posix/posix_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_datatype.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_datatype.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-posix_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_datatype.lo `test -f 'src/mpid/ch4/shm/posix/posix_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_datatype.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_spawn.lo: src/mpid/ch4/shm/posix/posix_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-posix_spawn.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_spawn.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_spawn.lo `test -f 'src/mpid/ch4/shm/posix/posix_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_spawn.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_spawn.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-posix_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_spawn.lo `test -f 'src/mpid/ch4/shm/posix/posix_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_spawn.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_win.lo: src/mpid/ch4/shm/posix/posix_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-posix_win.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_win.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_win.lo `test -f 'src/mpid/ch4/shm/posix/posix_win.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_win.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_win.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-posix_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_win.lo `test -f 'src/mpid/ch4/shm/posix/posix_win.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_win.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_eager_array.lo: src/mpid/ch4/shm/posix/posix_eager_array.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-posix_eager_array.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_eager_array.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_eager_array.lo `test -f 'src/mpid/ch4/shm/posix/posix_eager_array.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_eager_array.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_eager_array.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_eager_array.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_eager_array.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-posix_eager_array.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_eager_array.lo `test -f 'src/mpid/ch4/shm/posix/posix_eager_array.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_eager_array.c + +src/mpid/ch4/shm/posix/lib_libmpi_la-posix_coll_init.lo: src/mpid/ch4/shm/posix/posix_coll_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libmpi_la-posix_coll_init.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_coll_init.Tpo -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_coll_init.lo `test -f 'src/mpid/ch4/shm/posix/posix_coll_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_coll_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_coll_init.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_coll_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_coll_init.c' object='src/mpid/ch4/shm/posix/lib_libmpi_la-posix_coll_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libmpi_la-posix_coll_init.lo `test -f 'src/mpid/ch4/shm/posix/posix_coll_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_coll_init.c + +src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-globals.lo: src/mpid/ch4/shm/posix/eager/fbox/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-globals.Tpo -c -o src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/eager/fbox/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/fbox/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-globals.Tpo src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/eager/fbox/globals.c' object='src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/eager/fbox/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/fbox/globals.c + +src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-func_table.lo: src/mpid/ch4/shm/posix/eager/fbox/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-func_table.Tpo -c -o src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/posix/eager/fbox/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/fbox/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-func_table.Tpo src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/eager/fbox/func_table.c' object='src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/eager/fbox/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/posix/eager/fbox/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/fbox/func_table.c + +src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-globals.lo: src/mpid/ch4/shm/posix/eager/stub/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-globals.Tpo -c -o src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/eager/stub/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/stub/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-globals.Tpo src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/eager/stub/globals.c' object='src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/eager/stub/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/stub/globals.c + +src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-func_table.lo: src/mpid/ch4/shm/posix/eager/stub/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-func_table.Tpo -c -o src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/posix/eager/stub/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/stub/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-func_table.Tpo src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/eager/stub/func_table.c' object='src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/eager/stub/lib_libmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/posix/eager/stub/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/stub/func_table.c + +src/mpid/common/sched/lib_libmpi_la-mpidu_sched.lo: src/mpid/common/sched/mpidu_sched.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/sched/lib_libmpi_la-mpidu_sched.lo -MD -MP -MF src/mpid/common/sched/$(DEPDIR)/lib_libmpi_la-mpidu_sched.Tpo -c -o src/mpid/common/sched/lib_libmpi_la-mpidu_sched.lo `test -f 'src/mpid/common/sched/mpidu_sched.c' || echo '$(srcdir)/'`src/mpid/common/sched/mpidu_sched.c + $(AM_V_at)$(am__mv) src/mpid/common/sched/$(DEPDIR)/lib_libmpi_la-mpidu_sched.Tpo src/mpid/common/sched/$(DEPDIR)/lib_libmpi_la-mpidu_sched.Plo +# $(AM_V_CC)source='src/mpid/common/sched/mpidu_sched.c' object='src/mpid/common/sched/lib_libmpi_la-mpidu_sched.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/sched/lib_libmpi_la-mpidu_sched.lo `test -f 'src/mpid/common/sched/mpidu_sched.c' || echo '$(srcdir)/'`src/mpid/common/sched/mpidu_sched.c + +src/mpid/common/hcoll/lib_libmpi_la-hcoll_init.lo: src/mpid/common/hcoll/hcoll_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/hcoll/lib_libmpi_la-hcoll_init.lo -MD -MP -MF src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_init.Tpo -c -o src/mpid/common/hcoll/lib_libmpi_la-hcoll_init.lo `test -f 'src/mpid/common/hcoll/hcoll_init.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_init.c + $(AM_V_at)$(am__mv) src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_init.Tpo src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_init.Plo +# $(AM_V_CC)source='src/mpid/common/hcoll/hcoll_init.c' object='src/mpid/common/hcoll/lib_libmpi_la-hcoll_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/hcoll/lib_libmpi_la-hcoll_init.lo `test -f 'src/mpid/common/hcoll/hcoll_init.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_init.c + +src/mpid/common/hcoll/lib_libmpi_la-hcoll_ops.lo: src/mpid/common/hcoll/hcoll_ops.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/hcoll/lib_libmpi_la-hcoll_ops.lo -MD -MP -MF src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_ops.Tpo -c -o src/mpid/common/hcoll/lib_libmpi_la-hcoll_ops.lo `test -f 'src/mpid/common/hcoll/hcoll_ops.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_ops.c + $(AM_V_at)$(am__mv) src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_ops.Tpo src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_ops.Plo +# $(AM_V_CC)source='src/mpid/common/hcoll/hcoll_ops.c' object='src/mpid/common/hcoll/lib_libmpi_la-hcoll_ops.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/hcoll/lib_libmpi_la-hcoll_ops.lo `test -f 'src/mpid/common/hcoll/hcoll_ops.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_ops.c + +src/mpid/common/hcoll/lib_libmpi_la-hcoll_dtypes.lo: src/mpid/common/hcoll/hcoll_dtypes.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/hcoll/lib_libmpi_la-hcoll_dtypes.lo -MD -MP -MF src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_dtypes.Tpo -c -o src/mpid/common/hcoll/lib_libmpi_la-hcoll_dtypes.lo `test -f 'src/mpid/common/hcoll/hcoll_dtypes.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_dtypes.c + $(AM_V_at)$(am__mv) src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_dtypes.Tpo src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_dtypes.Plo +# $(AM_V_CC)source='src/mpid/common/hcoll/hcoll_dtypes.c' object='src/mpid/common/hcoll/lib_libmpi_la-hcoll_dtypes.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/hcoll/lib_libmpi_la-hcoll_dtypes.lo `test -f 'src/mpid/common/hcoll/hcoll_dtypes.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_dtypes.c + +src/mpid/common/hcoll/lib_libmpi_la-hcoll_rte.lo: src/mpid/common/hcoll/hcoll_rte.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/hcoll/lib_libmpi_la-hcoll_rte.lo -MD -MP -MF src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_rte.Tpo -c -o src/mpid/common/hcoll/lib_libmpi_la-hcoll_rte.lo `test -f 'src/mpid/common/hcoll/hcoll_rte.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_rte.c + $(AM_V_at)$(am__mv) src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_rte.Tpo src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_rte.Plo +# $(AM_V_CC)source='src/mpid/common/hcoll/hcoll_rte.c' object='src/mpid/common/hcoll/lib_libmpi_la-hcoll_rte.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/hcoll/lib_libmpi_la-hcoll_rte.lo `test -f 'src/mpid/common/hcoll/hcoll_rte.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_rte.c + +src/mpid/common/shm/lib_libmpi_la-mpidu_shm_alloc.lo: src/mpid/common/shm/mpidu_shm_alloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/shm/lib_libmpi_la-mpidu_shm_alloc.lo -MD -MP -MF src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_alloc.Tpo -c -o src/mpid/common/shm/lib_libmpi_la-mpidu_shm_alloc.lo `test -f 'src/mpid/common/shm/mpidu_shm_alloc.c' || echo '$(srcdir)/'`src/mpid/common/shm/mpidu_shm_alloc.c + $(AM_V_at)$(am__mv) src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_alloc.Tpo src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_alloc.Plo +# $(AM_V_CC)source='src/mpid/common/shm/mpidu_shm_alloc.c' object='src/mpid/common/shm/lib_libmpi_la-mpidu_shm_alloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/shm/lib_libmpi_la-mpidu_shm_alloc.lo `test -f 'src/mpid/common/shm/mpidu_shm_alloc.c' || echo '$(srcdir)/'`src/mpid/common/shm/mpidu_shm_alloc.c + +src/mpid/common/shm/lib_libmpi_la-mpidu_shm_barrier.lo: src/mpid/common/shm/mpidu_shm_barrier.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/shm/lib_libmpi_la-mpidu_shm_barrier.lo -MD -MP -MF src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_barrier.Tpo -c -o src/mpid/common/shm/lib_libmpi_la-mpidu_shm_barrier.lo `test -f 'src/mpid/common/shm/mpidu_shm_barrier.c' || echo '$(srcdir)/'`src/mpid/common/shm/mpidu_shm_barrier.c + $(AM_V_at)$(am__mv) src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_barrier.Tpo src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_barrier.Plo +# $(AM_V_CC)source='src/mpid/common/shm/mpidu_shm_barrier.c' object='src/mpid/common/shm/lib_libmpi_la-mpidu_shm_barrier.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/shm/lib_libmpi_la-mpidu_shm_barrier.lo `test -f 'src/mpid/common/shm/mpidu_shm_barrier.c' || echo '$(srcdir)/'`src/mpid/common/shm/mpidu_shm_barrier.c + +src/mpid/common/bc/lib_libmpi_la-mpidu_bc.lo: src/mpid/common/bc/mpidu_bc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/bc/lib_libmpi_la-mpidu_bc.lo -MD -MP -MF src/mpid/common/bc/$(DEPDIR)/lib_libmpi_la-mpidu_bc.Tpo -c -o src/mpid/common/bc/lib_libmpi_la-mpidu_bc.lo `test -f 'src/mpid/common/bc/mpidu_bc.c' || echo '$(srcdir)/'`src/mpid/common/bc/mpidu_bc.c + $(AM_V_at)$(am__mv) src/mpid/common/bc/$(DEPDIR)/lib_libmpi_la-mpidu_bc.Tpo src/mpid/common/bc/$(DEPDIR)/lib_libmpi_la-mpidu_bc.Plo +# $(AM_V_CC)source='src/mpid/common/bc/mpidu_bc.c' object='src/mpid/common/bc/lib_libmpi_la-mpidu_bc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/bc/lib_libmpi_la-mpidu_bc.lo `test -f 'src/mpid/common/bc/mpidu_bc.c' || echo '$(srcdir)/'`src/mpid/common/bc/mpidu_bc.c + +src/mpi_t/lib_libmpi_la-mpit.lo: src/mpi_t/mpit.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libmpi_la-mpit.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit.Tpo -c -o src/mpi_t/lib_libmpi_la-mpit.lo `test -f 'src/mpi_t/mpit.c' || echo '$(srcdir)/'`src/mpi_t/mpit.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit.Tpo src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit.Plo +# $(AM_V_CC)source='src/mpi_t/mpit.c' object='src/mpi_t/lib_libmpi_la-mpit.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libmpi_la-mpit.lo `test -f 'src/mpi_t/mpit.c' || echo '$(srcdir)/'`src/mpi_t/mpit.c + +src/nameserv/file/lib_libmpi_la-file_nameserv.lo: src/nameserv/file/file_nameserv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/nameserv/file/lib_libmpi_la-file_nameserv.lo -MD -MP -MF src/nameserv/file/$(DEPDIR)/lib_libmpi_la-file_nameserv.Tpo -c -o src/nameserv/file/lib_libmpi_la-file_nameserv.lo `test -f 'src/nameserv/file/file_nameserv.c' || echo '$(srcdir)/'`src/nameserv/file/file_nameserv.c + $(AM_V_at)$(am__mv) src/nameserv/file/$(DEPDIR)/lib_libmpi_la-file_nameserv.Tpo src/nameserv/file/$(DEPDIR)/lib_libmpi_la-file_nameserv.Plo +# $(AM_V_CC)source='src/nameserv/file/file_nameserv.c' object='src/nameserv/file/lib_libmpi_la-file_nameserv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/nameserv/file/lib_libmpi_la-file_nameserv.lo `test -f 'src/nameserv/file/file_nameserv.c' || echo '$(srcdir)/'`src/nameserv/file/file_nameserv.c + +src/nameserv/pmi/lib_libmpi_la-pmi_nameserv.lo: src/nameserv/pmi/pmi_nameserv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/nameserv/pmi/lib_libmpi_la-pmi_nameserv.lo -MD -MP -MF src/nameserv/pmi/$(DEPDIR)/lib_libmpi_la-pmi_nameserv.Tpo -c -o src/nameserv/pmi/lib_libmpi_la-pmi_nameserv.lo `test -f 'src/nameserv/pmi/pmi_nameserv.c' || echo '$(srcdir)/'`src/nameserv/pmi/pmi_nameserv.c + $(AM_V_at)$(am__mv) src/nameserv/pmi/$(DEPDIR)/lib_libmpi_la-pmi_nameserv.Tpo src/nameserv/pmi/$(DEPDIR)/lib_libmpi_la-pmi_nameserv.Plo +# $(AM_V_CC)source='src/nameserv/pmi/pmi_nameserv.c' object='src/nameserv/pmi/lib_libmpi_la-pmi_nameserv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/nameserv/pmi/lib_libmpi_la-pmi_nameserv.lo `test -f 'src/nameserv/pmi/pmi_nameserv.c' || echo '$(srcdir)/'`src/nameserv/pmi/pmi_nameserv.c + +src/pmi/pmi2/simple/lib_libmpi_la-simple2pmi.lo: src/pmi/pmi2/simple/simple2pmi.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pmi/pmi2/simple/lib_libmpi_la-simple2pmi.lo -MD -MP -MF src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple2pmi.Tpo -c -o src/pmi/pmi2/simple/lib_libmpi_la-simple2pmi.lo `test -f 'src/pmi/pmi2/simple/simple2pmi.c' || echo '$(srcdir)/'`src/pmi/pmi2/simple/simple2pmi.c + $(AM_V_at)$(am__mv) src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple2pmi.Tpo src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple2pmi.Plo +# $(AM_V_CC)source='src/pmi/pmi2/simple/simple2pmi.c' object='src/pmi/pmi2/simple/lib_libmpi_la-simple2pmi.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pmi/pmi2/simple/lib_libmpi_la-simple2pmi.lo `test -f 'src/pmi/pmi2/simple/simple2pmi.c' || echo '$(srcdir)/'`src/pmi/pmi2/simple/simple2pmi.c + +src/pmi/pmi2/simple/lib_libmpi_la-simple_pmiutil.lo: src/pmi/pmi2/simple/simple_pmiutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pmi/pmi2/simple/lib_libmpi_la-simple_pmiutil.lo -MD -MP -MF src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Tpo -c -o src/pmi/pmi2/simple/lib_libmpi_la-simple_pmiutil.lo `test -f 'src/pmi/pmi2/simple/simple_pmiutil.c' || echo '$(srcdir)/'`src/pmi/pmi2/simple/simple_pmiutil.c + $(AM_V_at)$(am__mv) src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Tpo src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo +# $(AM_V_CC)source='src/pmi/pmi2/simple/simple_pmiutil.c' object='src/pmi/pmi2/simple/lib_libmpi_la-simple_pmiutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pmi/pmi2/simple/lib_libmpi_la-simple_pmiutil.lo `test -f 'src/pmi/pmi2/simple/simple_pmiutil.c' || echo '$(srcdir)/'`src/pmi/pmi2/simple/simple_pmiutil.c + +src/pmi/simple/lib_libmpi_la-simple_pmiutil.lo: src/pmi/simple/simple_pmiutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pmi/simple/lib_libmpi_la-simple_pmiutil.lo -MD -MP -MF src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Tpo -c -o src/pmi/simple/lib_libmpi_la-simple_pmiutil.lo `test -f 'src/pmi/simple/simple_pmiutil.c' || echo '$(srcdir)/'`src/pmi/simple/simple_pmiutil.c + $(AM_V_at)$(am__mv) src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Tpo src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo +# $(AM_V_CC)source='src/pmi/simple/simple_pmiutil.c' object='src/pmi/simple/lib_libmpi_la-simple_pmiutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pmi/simple/lib_libmpi_la-simple_pmiutil.lo `test -f 'src/pmi/simple/simple_pmiutil.c' || echo '$(srcdir)/'`src/pmi/simple/simple_pmiutil.c + +src/pmi/simple/lib_libmpi_la-simple_pmi.lo: src/pmi/simple/simple_pmi.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pmi/simple/lib_libmpi_la-simple_pmi.lo -MD -MP -MF src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmi.Tpo -c -o src/pmi/simple/lib_libmpi_la-simple_pmi.lo `test -f 'src/pmi/simple/simple_pmi.c' || echo '$(srcdir)/'`src/pmi/simple/simple_pmi.c + $(AM_V_at)$(am__mv) src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmi.Tpo src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmi.Plo +# $(AM_V_CC)source='src/pmi/simple/simple_pmi.c' object='src/pmi/simple/lib_libmpi_la-simple_pmi.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pmi/simple/lib_libmpi_la-simple_pmi.lo `test -f 'src/pmi/simple/simple_pmi.c' || echo '$(srcdir)/'`src/pmi/simple/simple_pmi.c + +src/mpi/attr/lib_libpmpi_la-attr_delete.lo: src/mpi/attr/attr_delete.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-attr_delete.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_delete.Tpo -c -o src/mpi/attr/lib_libpmpi_la-attr_delete.lo `test -f 'src/mpi/attr/attr_delete.c' || echo '$(srcdir)/'`src/mpi/attr/attr_delete.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_delete.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_delete.Plo +# $(AM_V_CC)source='src/mpi/attr/attr_delete.c' object='src/mpi/attr/lib_libpmpi_la-attr_delete.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-attr_delete.lo `test -f 'src/mpi/attr/attr_delete.c' || echo '$(srcdir)/'`src/mpi/attr/attr_delete.c + +src/mpi/attr/lib_libpmpi_la-attr_get.lo: src/mpi/attr/attr_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-attr_get.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_get.Tpo -c -o src/mpi/attr/lib_libpmpi_la-attr_get.lo `test -f 'src/mpi/attr/attr_get.c' || echo '$(srcdir)/'`src/mpi/attr/attr_get.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_get.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_get.Plo +# $(AM_V_CC)source='src/mpi/attr/attr_get.c' object='src/mpi/attr/lib_libpmpi_la-attr_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-attr_get.lo `test -f 'src/mpi/attr/attr_get.c' || echo '$(srcdir)/'`src/mpi/attr/attr_get.c + +src/mpi/attr/lib_libpmpi_la-attr_put.lo: src/mpi/attr/attr_put.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-attr_put.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_put.Tpo -c -o src/mpi/attr/lib_libpmpi_la-attr_put.lo `test -f 'src/mpi/attr/attr_put.c' || echo '$(srcdir)/'`src/mpi/attr/attr_put.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_put.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_put.Plo +# $(AM_V_CC)source='src/mpi/attr/attr_put.c' object='src/mpi/attr/lib_libpmpi_la-attr_put.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-attr_put.lo `test -f 'src/mpi/attr/attr_put.c' || echo '$(srcdir)/'`src/mpi/attr/attr_put.c + +src/mpi/attr/lib_libpmpi_la-comm_create_keyval.lo: src/mpi/attr/comm_create_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-comm_create_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_create_keyval.Tpo -c -o src/mpi/attr/lib_libpmpi_la-comm_create_keyval.lo `test -f 'src/mpi/attr/comm_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/comm_create_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_create_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_create_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_create_keyval.c' object='src/mpi/attr/lib_libpmpi_la-comm_create_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-comm_create_keyval.lo `test -f 'src/mpi/attr/comm_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/comm_create_keyval.c + +src/mpi/attr/lib_libpmpi_la-comm_delete_attr.lo: src/mpi/attr/comm_delete_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-comm_delete_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_delete_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-comm_delete_attr.lo `test -f 'src/mpi/attr/comm_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_delete_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_delete_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_delete_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_delete_attr.c' object='src/mpi/attr/lib_libpmpi_la-comm_delete_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-comm_delete_attr.lo `test -f 'src/mpi/attr/comm_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_delete_attr.c + +src/mpi/attr/lib_libpmpi_la-comm_free_keyval.lo: src/mpi/attr/comm_free_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-comm_free_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_free_keyval.Tpo -c -o src/mpi/attr/lib_libpmpi_la-comm_free_keyval.lo `test -f 'src/mpi/attr/comm_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/comm_free_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_free_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_free_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_free_keyval.c' object='src/mpi/attr/lib_libpmpi_la-comm_free_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-comm_free_keyval.lo `test -f 'src/mpi/attr/comm_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/comm_free_keyval.c + +src/mpi/attr/lib_libpmpi_la-comm_get_attr.lo: src/mpi/attr/comm_get_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-comm_get_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_get_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-comm_get_attr.lo `test -f 'src/mpi/attr/comm_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_get_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_get_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_get_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_get_attr.c' object='src/mpi/attr/lib_libpmpi_la-comm_get_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-comm_get_attr.lo `test -f 'src/mpi/attr/comm_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_get_attr.c + +src/mpi/attr/lib_libpmpi_la-comm_set_attr.lo: src/mpi/attr/comm_set_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-comm_set_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_set_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-comm_set_attr.lo `test -f 'src/mpi/attr/comm_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_set_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_set_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_set_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/comm_set_attr.c' object='src/mpi/attr/lib_libpmpi_la-comm_set_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-comm_set_attr.lo `test -f 'src/mpi/attr/comm_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/comm_set_attr.c + +src/mpi/attr/lib_libpmpi_la-keyval_create.lo: src/mpi/attr/keyval_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-keyval_create.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_create.Tpo -c -o src/mpi/attr/lib_libpmpi_la-keyval_create.lo `test -f 'src/mpi/attr/keyval_create.c' || echo '$(srcdir)/'`src/mpi/attr/keyval_create.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_create.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_create.Plo +# $(AM_V_CC)source='src/mpi/attr/keyval_create.c' object='src/mpi/attr/lib_libpmpi_la-keyval_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-keyval_create.lo `test -f 'src/mpi/attr/keyval_create.c' || echo '$(srcdir)/'`src/mpi/attr/keyval_create.c + +src/mpi/attr/lib_libpmpi_la-keyval_free.lo: src/mpi/attr/keyval_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-keyval_free.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_free.Tpo -c -o src/mpi/attr/lib_libpmpi_la-keyval_free.lo `test -f 'src/mpi/attr/keyval_free.c' || echo '$(srcdir)/'`src/mpi/attr/keyval_free.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_free.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_free.Plo +# $(AM_V_CC)source='src/mpi/attr/keyval_free.c' object='src/mpi/attr/lib_libpmpi_la-keyval_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-keyval_free.lo `test -f 'src/mpi/attr/keyval_free.c' || echo '$(srcdir)/'`src/mpi/attr/keyval_free.c + +src/mpi/attr/lib_libpmpi_la-type_create_keyval.lo: src/mpi/attr/type_create_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-type_create_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_create_keyval.Tpo -c -o src/mpi/attr/lib_libpmpi_la-type_create_keyval.lo `test -f 'src/mpi/attr/type_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/type_create_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_create_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_create_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/type_create_keyval.c' object='src/mpi/attr/lib_libpmpi_la-type_create_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-type_create_keyval.lo `test -f 'src/mpi/attr/type_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/type_create_keyval.c + +src/mpi/attr/lib_libpmpi_la-type_delete_attr.lo: src/mpi/attr/type_delete_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-type_delete_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_delete_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-type_delete_attr.lo `test -f 'src/mpi/attr/type_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_delete_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_delete_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_delete_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/type_delete_attr.c' object='src/mpi/attr/lib_libpmpi_la-type_delete_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-type_delete_attr.lo `test -f 'src/mpi/attr/type_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_delete_attr.c + +src/mpi/attr/lib_libpmpi_la-type_free_keyval.lo: src/mpi/attr/type_free_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-type_free_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_free_keyval.Tpo -c -o src/mpi/attr/lib_libpmpi_la-type_free_keyval.lo `test -f 'src/mpi/attr/type_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/type_free_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_free_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_free_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/type_free_keyval.c' object='src/mpi/attr/lib_libpmpi_la-type_free_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-type_free_keyval.lo `test -f 'src/mpi/attr/type_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/type_free_keyval.c + +src/mpi/attr/lib_libpmpi_la-type_get_attr.lo: src/mpi/attr/type_get_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-type_get_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_get_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-type_get_attr.lo `test -f 'src/mpi/attr/type_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_get_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_get_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_get_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/type_get_attr.c' object='src/mpi/attr/lib_libpmpi_la-type_get_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-type_get_attr.lo `test -f 'src/mpi/attr/type_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_get_attr.c + +src/mpi/attr/lib_libpmpi_la-type_set_attr.lo: src/mpi/attr/type_set_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-type_set_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_set_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-type_set_attr.lo `test -f 'src/mpi/attr/type_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_set_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_set_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_set_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/type_set_attr.c' object='src/mpi/attr/lib_libpmpi_la-type_set_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-type_set_attr.lo `test -f 'src/mpi/attr/type_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/type_set_attr.c + +src/mpi/attr/lib_libpmpi_la-win_create_keyval.lo: src/mpi/attr/win_create_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-win_create_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_create_keyval.Tpo -c -o src/mpi/attr/lib_libpmpi_la-win_create_keyval.lo `test -f 'src/mpi/attr/win_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/win_create_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_create_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_create_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/win_create_keyval.c' object='src/mpi/attr/lib_libpmpi_la-win_create_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-win_create_keyval.lo `test -f 'src/mpi/attr/win_create_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/win_create_keyval.c + +src/mpi/attr/lib_libpmpi_la-win_delete_attr.lo: src/mpi/attr/win_delete_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-win_delete_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_delete_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-win_delete_attr.lo `test -f 'src/mpi/attr/win_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_delete_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_delete_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_delete_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/win_delete_attr.c' object='src/mpi/attr/lib_libpmpi_la-win_delete_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-win_delete_attr.lo `test -f 'src/mpi/attr/win_delete_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_delete_attr.c + +src/mpi/attr/lib_libpmpi_la-win_free_keyval.lo: src/mpi/attr/win_free_keyval.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-win_free_keyval.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_free_keyval.Tpo -c -o src/mpi/attr/lib_libpmpi_la-win_free_keyval.lo `test -f 'src/mpi/attr/win_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/win_free_keyval.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_free_keyval.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_free_keyval.Plo +# $(AM_V_CC)source='src/mpi/attr/win_free_keyval.c' object='src/mpi/attr/lib_libpmpi_la-win_free_keyval.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-win_free_keyval.lo `test -f 'src/mpi/attr/win_free_keyval.c' || echo '$(srcdir)/'`src/mpi/attr/win_free_keyval.c + +src/mpi/attr/lib_libpmpi_la-win_get_attr.lo: src/mpi/attr/win_get_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-win_get_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_get_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-win_get_attr.lo `test -f 'src/mpi/attr/win_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_get_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_get_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_get_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/win_get_attr.c' object='src/mpi/attr/lib_libpmpi_la-win_get_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-win_get_attr.lo `test -f 'src/mpi/attr/win_get_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_get_attr.c + +src/mpi/attr/lib_libpmpi_la-win_set_attr.lo: src/mpi/attr/win_set_attr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-win_set_attr.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_set_attr.Tpo -c -o src/mpi/attr/lib_libpmpi_la-win_set_attr.lo `test -f 'src/mpi/attr/win_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_set_attr.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_set_attr.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_set_attr.Plo +# $(AM_V_CC)source='src/mpi/attr/win_set_attr.c' object='src/mpi/attr/lib_libpmpi_la-win_set_attr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-win_set_attr.lo `test -f 'src/mpi/attr/win_set_attr.c' || echo '$(srcdir)/'`src/mpi/attr/win_set_attr.c + +src/mpi/coll/allgather/lib_libpmpi_la-allgather.lo: src/mpi/coll/allgather/allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libpmpi_la-allgather.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather.Tpo -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather.lo `test -f 'src/mpi/coll/allgather/allgather.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather.c' object='src/mpi/coll/allgather/lib_libpmpi_la-allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather.lo `test -f 'src/mpi/coll/allgather/allgather.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather.c + +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv.lo: src/mpi/coll/allgatherv/allgatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv.Tpo -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv.lo `test -f 'src/mpi/coll/allgatherv/allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv.c' object='src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv.lo `test -f 'src/mpi/coll/allgatherv/allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv.c + +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce.lo: src/mpi/coll/allreduce/allreduce.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libpmpi_la-allreduce.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce.Tpo -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce.lo `test -f 'src/mpi/coll/allreduce/allreduce.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce.c' object='src/mpi/coll/allreduce/lib_libpmpi_la-allreduce.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce.lo `test -f 'src/mpi/coll/allreduce/allreduce.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce.c + +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall.lo: src/mpi/coll/alltoall/alltoall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libpmpi_la-alltoall.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall.Tpo -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall.lo `test -f 'src/mpi/coll/alltoall/alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall.c' object='src/mpi/coll/alltoall/lib_libpmpi_la-alltoall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall.lo `test -f 'src/mpi/coll/alltoall/alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall.c + +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv.lo: src/mpi/coll/alltoallv/alltoallv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv.Tpo -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv.lo `test -f 'src/mpi/coll/alltoallv/alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv.c' object='src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv.lo `test -f 'src/mpi/coll/alltoallv/alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv.c + +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw.lo: src/mpi/coll/alltoallw/alltoallw.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw.Tpo -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw.lo `test -f 'src/mpi/coll/alltoallw/alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw.c' object='src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw.lo `test -f 'src/mpi/coll/alltoallw/alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw.c + +src/mpi/coll/barrier/lib_libpmpi_la-barrier.lo: src/mpi/coll/barrier/barrier.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libpmpi_la-barrier.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier.Tpo -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier.lo `test -f 'src/mpi/coll/barrier/barrier.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier.c' object='src/mpi/coll/barrier/lib_libpmpi_la-barrier.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier.lo `test -f 'src/mpi/coll/barrier/barrier.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier.c + +src/mpi/coll/bcast/lib_libpmpi_la-bcast.lo: src/mpi/coll/bcast/bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libpmpi_la-bcast.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast.Tpo -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast.lo `test -f 'src/mpi/coll/bcast/bcast.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast.c' object='src/mpi/coll/bcast/lib_libpmpi_la-bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast.lo `test -f 'src/mpi/coll/bcast/bcast.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast.c + +src/mpi/coll/exscan/lib_libpmpi_la-exscan.lo: src/mpi/coll/exscan/exscan.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/exscan/lib_libpmpi_la-exscan.lo -MD -MP -MF src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan.Tpo -c -o src/mpi/coll/exscan/lib_libpmpi_la-exscan.lo `test -f 'src/mpi/coll/exscan/exscan.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan.c + $(AM_V_at)$(am__mv) src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan.Tpo src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan.Plo +# $(AM_V_CC)source='src/mpi/coll/exscan/exscan.c' object='src/mpi/coll/exscan/lib_libpmpi_la-exscan.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/exscan/lib_libpmpi_la-exscan.lo `test -f 'src/mpi/coll/exscan/exscan.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan.c + +src/mpi/coll/gather/lib_libpmpi_la-gather.lo: src/mpi/coll/gather/gather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libpmpi_la-gather.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather.Tpo -c -o src/mpi/coll/gather/lib_libpmpi_la-gather.lo `test -f 'src/mpi/coll/gather/gather.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather.c' object='src/mpi/coll/gather/lib_libpmpi_la-gather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libpmpi_la-gather.lo `test -f 'src/mpi/coll/gather/gather.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather.c + +src/mpi/coll/gatherv/lib_libpmpi_la-gatherv.lo: src/mpi/coll/gatherv/gatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gatherv/lib_libpmpi_la-gatherv.lo -MD -MP -MF src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv.Tpo -c -o src/mpi/coll/gatherv/lib_libpmpi_la-gatherv.lo `test -f 'src/mpi/coll/gatherv/gatherv.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv.Tpo src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/gatherv/gatherv.c' object='src/mpi/coll/gatherv/lib_libpmpi_la-gatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gatherv/lib_libpmpi_la-gatherv.lo `test -f 'src/mpi/coll/gatherv/gatherv.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv.c + +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter.lo: src/mpi/coll/reduce_scatter/reduce_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter.c' object='src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter.c + +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c' object='src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c + +src/mpi/coll/reduce/lib_libpmpi_la-reduce.lo: src/mpi/coll/reduce/reduce.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libpmpi_la-reduce.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce.Tpo -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce.lo `test -f 'src/mpi/coll/reduce/reduce.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce.c' object='src/mpi/coll/reduce/lib_libpmpi_la-reduce.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce.lo `test -f 'src/mpi/coll/reduce/reduce.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce.c + +src/mpi/coll/scan/lib_libpmpi_la-scan.lo: src/mpi/coll/scan/scan.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scan/lib_libpmpi_la-scan.lo -MD -MP -MF src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan.Tpo -c -o src/mpi/coll/scan/lib_libpmpi_la-scan.lo `test -f 'src/mpi/coll/scan/scan.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan.c + $(AM_V_at)$(am__mv) src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan.Tpo src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan.Plo +# $(AM_V_CC)source='src/mpi/coll/scan/scan.c' object='src/mpi/coll/scan/lib_libpmpi_la-scan.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scan/lib_libpmpi_la-scan.lo `test -f 'src/mpi/coll/scan/scan.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan.c + +src/mpi/coll/scatter/lib_libpmpi_la-scatter.lo: src/mpi/coll/scatter/scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libpmpi_la-scatter.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter.Tpo -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter.lo `test -f 'src/mpi/coll/scatter/scatter.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter.c' object='src/mpi/coll/scatter/lib_libpmpi_la-scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter.lo `test -f 'src/mpi/coll/scatter/scatter.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter.c + +src/mpi/coll/scatterv/lib_libpmpi_la-scatterv.lo: src/mpi/coll/scatterv/scatterv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatterv/lib_libpmpi_la-scatterv.lo -MD -MP -MF src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv.Tpo -c -o src/mpi/coll/scatterv/lib_libpmpi_la-scatterv.lo `test -f 'src/mpi/coll/scatterv/scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv.Tpo src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv.Plo +# $(AM_V_CC)source='src/mpi/coll/scatterv/scatterv.c' object='src/mpi/coll/scatterv/lib_libpmpi_la-scatterv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatterv/lib_libpmpi_la-scatterv.lo `test -f 'src/mpi/coll/scatterv/scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv.c + +src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather.lo: src/mpi/coll/neighbor_allgather/neighbor_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather.lo -MD -MP -MF src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather.Tpo -c -o src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather.lo `test -f 'src/mpi/coll/neighbor_allgather/neighbor_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgather/neighbor_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather.Tpo src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_allgather/neighbor_allgather.c' object='src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather.lo `test -f 'src/mpi/coll/neighbor_allgather/neighbor_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgather/neighbor_allgather.c + +src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv.lo: src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv.lo -MD -MP -MF src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv.Tpo -c -o src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv.lo `test -f 'src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv.Tpo src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c' object='src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv.lo `test -f 'src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c + +src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall.lo: src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall.lo -MD -MP -MF src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall.Tpo -c -o src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall.lo `test -f 'src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall.Tpo src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c' object='src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall.lo `test -f 'src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c + +src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv.lo: src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv.lo -MD -MP -MF src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv.Tpo -c -o src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv.lo `test -f 'src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv.Tpo src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c' object='src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv.lo `test -f 'src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c + +src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw.lo: src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw.lo -MD -MP -MF src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw.Tpo -c -o src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw.lo `test -f 'src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw.Tpo src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c' object='src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw.lo `test -f 'src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather.lo: src/mpi/coll/iallgather/iallgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather.lo `test -f 'src/mpi/coll/iallgather/iallgather.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather.lo `test -f 'src/mpi/coll/iallgather/iallgather.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv.lo: src/mpi/coll/iallgatherv/iallgatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce.lo: src/mpi/coll/iallreduce/iallreduce.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce.lo `test -f 'src/mpi/coll/iallreduce/iallreduce.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce.lo `test -f 'src/mpi/coll/iallreduce/iallreduce.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall.lo: src/mpi/coll/ialltoall/ialltoall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall.lo `test -f 'src/mpi/coll/ialltoall/ialltoall.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall.lo `test -f 'src/mpi/coll/ialltoall/ialltoall.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall.c + +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv.lo: src/mpi/coll/ialltoallv/ialltoallv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv.Tpo -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv.c' object='src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv.c + +src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw.lo: src/mpi/coll/ialltoallw/ialltoallw.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw.lo -MD -MP -MF src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw.Tpo -c -o src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw.Tpo src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallw/ialltoallw.c' object='src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw.c + +src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier.lo: src/mpi/coll/ibarrier/ibarrier.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier.lo -MD -MP -MF src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier.Tpo -c -o src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier.lo `test -f 'src/mpi/coll/ibarrier/ibarrier.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier.Tpo src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier.Plo +# $(AM_V_CC)source='src/mpi/coll/ibarrier/ibarrier.c' object='src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier.lo `test -f 'src/mpi/coll/ibarrier/ibarrier.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast.lo: src/mpi/coll/ibcast/ibcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast.lo `test -f 'src/mpi/coll/ibcast/ibcast.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast.lo `test -f 'src/mpi/coll/ibcast/ibcast.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast.c + +src/mpi/coll/iexscan/lib_libpmpi_la-iexscan.lo: src/mpi/coll/iexscan/iexscan.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iexscan/lib_libpmpi_la-iexscan.lo -MD -MP -MF src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan.Tpo -c -o src/mpi/coll/iexscan/lib_libpmpi_la-iexscan.lo `test -f 'src/mpi/coll/iexscan/iexscan.c' || echo '$(srcdir)/'`src/mpi/coll/iexscan/iexscan.c + $(AM_V_at)$(am__mv) src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan.Tpo src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan.Plo +# $(AM_V_CC)source='src/mpi/coll/iexscan/iexscan.c' object='src/mpi/coll/iexscan/lib_libpmpi_la-iexscan.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iexscan/lib_libpmpi_la-iexscan.lo `test -f 'src/mpi/coll/iexscan/iexscan.c' || echo '$(srcdir)/'`src/mpi/coll/iexscan/iexscan.c + +src/mpi/coll/igather/lib_libpmpi_la-igather.lo: src/mpi/coll/igather/igather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libpmpi_la-igather.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather.Tpo -c -o src/mpi/coll/igather/lib_libpmpi_la-igather.lo `test -f 'src/mpi/coll/igather/igather.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather.c' object='src/mpi/coll/igather/lib_libpmpi_la-igather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libpmpi_la-igather.lo `test -f 'src/mpi/coll/igather/igather.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather.c + +src/mpi/coll/igatherv/lib_libpmpi_la-igatherv.lo: src/mpi/coll/igatherv/igatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igatherv/lib_libpmpi_la-igatherv.lo -MD -MP -MF src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv.Tpo -c -o src/mpi/coll/igatherv/lib_libpmpi_la-igatherv.lo `test -f 'src/mpi/coll/igatherv/igatherv.c' || echo '$(srcdir)/'`src/mpi/coll/igatherv/igatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv.Tpo src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/igatherv/igatherv.c' object='src/mpi/coll/igatherv/lib_libpmpi_la-igatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igatherv/lib_libpmpi_la-igatherv.lo `test -f 'src/mpi/coll/igatherv/igatherv.c' || echo '$(srcdir)/'`src/mpi/coll/igatherv/igatherv.c + +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter.c' object='src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter.c + +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c' object='src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c + +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce.lo: src/mpi/coll/ireduce/ireduce.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libpmpi_la-ireduce.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce.Tpo -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce.lo `test -f 'src/mpi/coll/ireduce/ireduce.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce.c' object='src/mpi/coll/ireduce/lib_libpmpi_la-ireduce.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce.lo `test -f 'src/mpi/coll/ireduce/ireduce.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce.c + +src/mpi/coll/iscan/lib_libpmpi_la-iscan.lo: src/mpi/coll/iscan/iscan.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libpmpi_la-iscan.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan.Tpo -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan.lo `test -f 'src/mpi/coll/iscan/iscan.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan.c' object='src/mpi/coll/iscan/lib_libpmpi_la-iscan.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan.lo `test -f 'src/mpi/coll/iscan/iscan.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan.c + +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter.lo: src/mpi/coll/iscatter/iscatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libpmpi_la-iscatter.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter.Tpo -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter.lo `test -f 'src/mpi/coll/iscatter/iscatter.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter.c' object='src/mpi/coll/iscatter/lib_libpmpi_la-iscatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter.lo `test -f 'src/mpi/coll/iscatter/iscatter.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter.c + +src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv.lo: src/mpi/coll/iscatterv/iscatterv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv.lo -MD -MP -MF src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv.Tpo -c -o src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv.lo `test -f 'src/mpi/coll/iscatterv/iscatterv.c' || echo '$(srcdir)/'`src/mpi/coll/iscatterv/iscatterv.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv.Tpo src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatterv/iscatterv.c' object='src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv.lo `test -f 'src/mpi/coll/iscatterv/iscatterv.c' || echo '$(srcdir)/'`src/mpi/coll/iscatterv/iscatterv.c + +src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather.lo: src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather.lo -MD -MP -MF src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather.Tpo -c -o src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather.Tpo src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c' object='src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c + +src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv.lo: src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv.lo -MD -MP -MF src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv.Tpo -c -o src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv.Tpo src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c' object='src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c + +src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall.lo: src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall.Tpo -c -o src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall.Tpo src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c' object='src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c + +src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv.lo: src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv.Tpo -c -o src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv.Tpo src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c' object='src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c + +src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw.lo: src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw.Tpo -c -o src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw.Tpo src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c' object='src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c + +src/mpi/coll/op/lib_libpmpi_la-op_create.lo: src/mpi/coll/op/op_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-op_create.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_create.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-op_create.lo `test -f 'src/mpi/coll/op/op_create.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_create.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_create.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_create.Plo +# $(AM_V_CC)source='src/mpi/coll/op/op_create.c' object='src/mpi/coll/op/lib_libpmpi_la-op_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-op_create.lo `test -f 'src/mpi/coll/op/op_create.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_create.c + +src/mpi/coll/op/lib_libpmpi_la-op_free.lo: src/mpi/coll/op/op_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-op_free.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_free.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-op_free.lo `test -f 'src/mpi/coll/op/op_free.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_free.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_free.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_free.Plo +# $(AM_V_CC)source='src/mpi/coll/op/op_free.c' object='src/mpi/coll/op/lib_libpmpi_la-op_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-op_free.lo `test -f 'src/mpi/coll/op/op_free.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_free.c + +src/mpi/coll/op/lib_libpmpi_la-op_commutative.lo: src/mpi/coll/op/op_commutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-op_commutative.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_commutative.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-op_commutative.lo `test -f 'src/mpi/coll/op/op_commutative.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_commutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_commutative.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_commutative.Plo +# $(AM_V_CC)source='src/mpi/coll/op/op_commutative.c' object='src/mpi/coll/op/lib_libpmpi_la-op_commutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-op_commutative.lo `test -f 'src/mpi/coll/op/op_commutative.c' || echo '$(srcdir)/'`src/mpi/coll/op/op_commutative.c + +src/mpi/coll/reduce_local/lib_libpmpi_la-reduce_local.lo: src/mpi/coll/reduce_local/reduce_local.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_local/lib_libpmpi_la-reduce_local.lo -MD -MP -MF src/mpi/coll/reduce_local/$(DEPDIR)/lib_libpmpi_la-reduce_local.Tpo -c -o src/mpi/coll/reduce_local/lib_libpmpi_la-reduce_local.lo `test -f 'src/mpi/coll/reduce_local/reduce_local.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_local/reduce_local.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_local/$(DEPDIR)/lib_libpmpi_la-reduce_local.Tpo src/mpi/coll/reduce_local/$(DEPDIR)/lib_libpmpi_la-reduce_local.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_local/reduce_local.c' object='src/mpi/coll/reduce_local/lib_libpmpi_la-reduce_local.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_local/lib_libpmpi_la-reduce_local.lo `test -f 'src/mpi/coll/reduce_local/reduce_local.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_local/reduce_local.c + +src/mpi/comm/lib_libpmpi_la-comm_compare.lo: src/mpi/comm/comm_compare.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_compare.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_compare.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_compare.lo `test -f 'src/mpi/comm/comm_compare.c' || echo '$(srcdir)/'`src/mpi/comm/comm_compare.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_compare.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_compare.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_compare.c' object='src/mpi/comm/lib_libpmpi_la-comm_compare.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_compare.lo `test -f 'src/mpi/comm/comm_compare.c' || echo '$(srcdir)/'`src/mpi/comm/comm_compare.c + +src/mpi/comm/lib_libpmpi_la-comm_create.lo: src/mpi/comm/comm_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_create.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_create.lo `test -f 'src/mpi/comm/comm_create.c' || echo '$(srcdir)/'`src/mpi/comm/comm_create.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_create.c' object='src/mpi/comm/lib_libpmpi_la-comm_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_create.lo `test -f 'src/mpi/comm/comm_create.c' || echo '$(srcdir)/'`src/mpi/comm/comm_create.c + +src/mpi/comm/lib_libpmpi_la-comm_create_group.lo: src/mpi/comm/comm_create_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_create_group.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create_group.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_create_group.lo `test -f 'src/mpi/comm/comm_create_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_create_group.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create_group.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create_group.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_create_group.c' object='src/mpi/comm/lib_libpmpi_la-comm_create_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_create_group.lo `test -f 'src/mpi/comm/comm_create_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_create_group.c + +src/mpi/comm/lib_libpmpi_la-comm_dup.lo: src/mpi/comm/comm_dup.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_dup.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_dup.lo `test -f 'src/mpi/comm/comm_dup.c' || echo '$(srcdir)/'`src/mpi/comm/comm_dup.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_dup.c' object='src/mpi/comm/lib_libpmpi_la-comm_dup.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_dup.lo `test -f 'src/mpi/comm/comm_dup.c' || echo '$(srcdir)/'`src/mpi/comm/comm_dup.c + +src/mpi/comm/lib_libpmpi_la-comm_dup_with_info.lo: src/mpi/comm/comm_dup_with_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_dup_with_info.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_info.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_dup_with_info.lo `test -f 'src/mpi/comm/comm_dup_with_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_dup_with_info.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_info.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_info.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_dup_with_info.c' object='src/mpi/comm/lib_libpmpi_la-comm_dup_with_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_dup_with_info.lo `test -f 'src/mpi/comm/comm_dup_with_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_dup_with_info.c + +src/mpi/comm/lib_libpmpi_la-comm_free.lo: src/mpi/comm/comm_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_free.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_free.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_free.lo `test -f 'src/mpi/comm/comm_free.c' || echo '$(srcdir)/'`src/mpi/comm/comm_free.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_free.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_free.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_free.c' object='src/mpi/comm/lib_libpmpi_la-comm_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_free.lo `test -f 'src/mpi/comm/comm_free.c' || echo '$(srcdir)/'`src/mpi/comm/comm_free.c + +src/mpi/comm/lib_libpmpi_la-comm_get_name.lo: src/mpi/comm/comm_get_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_get_name.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_name.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_get_name.lo `test -f 'src/mpi/comm/comm_get_name.c' || echo '$(srcdir)/'`src/mpi/comm/comm_get_name.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_name.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_name.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_get_name.c' object='src/mpi/comm/lib_libpmpi_la-comm_get_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_get_name.lo `test -f 'src/mpi/comm/comm_get_name.c' || echo '$(srcdir)/'`src/mpi/comm/comm_get_name.c + +src/mpi/comm/lib_libpmpi_la-comm_get_info.lo: src/mpi/comm/comm_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_get_info.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_info.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_get_info.lo `test -f 'src/mpi/comm/comm_get_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_get_info.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_info.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_info.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_get_info.c' object='src/mpi/comm/lib_libpmpi_la-comm_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_get_info.lo `test -f 'src/mpi/comm/comm_get_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_get_info.c + +src/mpi/comm/lib_libpmpi_la-comm_set_info.lo: src/mpi/comm/comm_set_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_set_info.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_info.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_set_info.lo `test -f 'src/mpi/comm/comm_set_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_set_info.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_info.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_info.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_set_info.c' object='src/mpi/comm/lib_libpmpi_la-comm_set_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_set_info.lo `test -f 'src/mpi/comm/comm_set_info.c' || echo '$(srcdir)/'`src/mpi/comm/comm_set_info.c + +src/mpi/comm/lib_libpmpi_la-comm_group.lo: src/mpi/comm/comm_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_group.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_group.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_group.lo `test -f 'src/mpi/comm/comm_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_group.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_group.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_group.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_group.c' object='src/mpi/comm/lib_libpmpi_la-comm_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_group.lo `test -f 'src/mpi/comm/comm_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_group.c + +src/mpi/comm/lib_libpmpi_la-comm_idup.lo: src/mpi/comm/comm_idup.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_idup.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_idup.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_idup.lo `test -f 'src/mpi/comm/comm_idup.c' || echo '$(srcdir)/'`src/mpi/comm/comm_idup.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_idup.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_idup.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_idup.c' object='src/mpi/comm/lib_libpmpi_la-comm_idup.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_idup.lo `test -f 'src/mpi/comm/comm_idup.c' || echo '$(srcdir)/'`src/mpi/comm/comm_idup.c + +src/mpi/comm/lib_libpmpi_la-comm_rank.lo: src/mpi/comm/comm_rank.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_rank.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_rank.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_rank.lo `test -f 'src/mpi/comm/comm_rank.c' || echo '$(srcdir)/'`src/mpi/comm/comm_rank.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_rank.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_rank.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_rank.c' object='src/mpi/comm/lib_libpmpi_la-comm_rank.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_rank.lo `test -f 'src/mpi/comm/comm_rank.c' || echo '$(srcdir)/'`src/mpi/comm/comm_rank.c + +src/mpi/comm/lib_libpmpi_la-comm_size.lo: src/mpi/comm/comm_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_size.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_size.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_size.lo `test -f 'src/mpi/comm/comm_size.c' || echo '$(srcdir)/'`src/mpi/comm/comm_size.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_size.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_size.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_size.c' object='src/mpi/comm/lib_libpmpi_la-comm_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_size.lo `test -f 'src/mpi/comm/comm_size.c' || echo '$(srcdir)/'`src/mpi/comm/comm_size.c + +src/mpi/comm/lib_libpmpi_la-comm_remote_group.lo: src/mpi/comm/comm_remote_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_remote_group.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_group.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_remote_group.lo `test -f 'src/mpi/comm/comm_remote_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_remote_group.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_group.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_group.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_remote_group.c' object='src/mpi/comm/lib_libpmpi_la-comm_remote_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_remote_group.lo `test -f 'src/mpi/comm/comm_remote_group.c' || echo '$(srcdir)/'`src/mpi/comm/comm_remote_group.c + +src/mpi/comm/lib_libpmpi_la-comm_remote_size.lo: src/mpi/comm/comm_remote_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_remote_size.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_size.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_remote_size.lo `test -f 'src/mpi/comm/comm_remote_size.c' || echo '$(srcdir)/'`src/mpi/comm/comm_remote_size.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_size.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_size.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_remote_size.c' object='src/mpi/comm/lib_libpmpi_la-comm_remote_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_remote_size.lo `test -f 'src/mpi/comm/comm_remote_size.c' || echo '$(srcdir)/'`src/mpi/comm/comm_remote_size.c + +src/mpi/comm/lib_libpmpi_la-comm_set_name.lo: src/mpi/comm/comm_set_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_set_name.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_name.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_set_name.lo `test -f 'src/mpi/comm/comm_set_name.c' || echo '$(srcdir)/'`src/mpi/comm/comm_set_name.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_name.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_name.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_set_name.c' object='src/mpi/comm/lib_libpmpi_la-comm_set_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_set_name.lo `test -f 'src/mpi/comm/comm_set_name.c' || echo '$(srcdir)/'`src/mpi/comm/comm_set_name.c + +src/mpi/comm/lib_libpmpi_la-comm_split.lo: src/mpi/comm/comm_split.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_split.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_split.lo `test -f 'src/mpi/comm/comm_split.c' || echo '$(srcdir)/'`src/mpi/comm/comm_split.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_split.c' object='src/mpi/comm/lib_libpmpi_la-comm_split.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_split.lo `test -f 'src/mpi/comm/comm_split.c' || echo '$(srcdir)/'`src/mpi/comm/comm_split.c + +src/mpi/comm/lib_libpmpi_la-comm_test_inter.lo: src/mpi/comm/comm_test_inter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_test_inter.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_test_inter.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_test_inter.lo `test -f 'src/mpi/comm/comm_test_inter.c' || echo '$(srcdir)/'`src/mpi/comm/comm_test_inter.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_test_inter.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_test_inter.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_test_inter.c' object='src/mpi/comm/lib_libpmpi_la-comm_test_inter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_test_inter.lo `test -f 'src/mpi/comm/comm_test_inter.c' || echo '$(srcdir)/'`src/mpi/comm/comm_test_inter.c + +src/mpi/comm/lib_libpmpi_la-intercomm_create.lo: src/mpi/comm/intercomm_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-intercomm_create.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_create.Tpo -c -o src/mpi/comm/lib_libpmpi_la-intercomm_create.lo `test -f 'src/mpi/comm/intercomm_create.c' || echo '$(srcdir)/'`src/mpi/comm/intercomm_create.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_create.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_create.Plo +# $(AM_V_CC)source='src/mpi/comm/intercomm_create.c' object='src/mpi/comm/lib_libpmpi_la-intercomm_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-intercomm_create.lo `test -f 'src/mpi/comm/intercomm_create.c' || echo '$(srcdir)/'`src/mpi/comm/intercomm_create.c + +src/mpi/comm/lib_libpmpi_la-intercomm_merge.lo: src/mpi/comm/intercomm_merge.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-intercomm_merge.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_merge.Tpo -c -o src/mpi/comm/lib_libpmpi_la-intercomm_merge.lo `test -f 'src/mpi/comm/intercomm_merge.c' || echo '$(srcdir)/'`src/mpi/comm/intercomm_merge.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_merge.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_merge.Plo +# $(AM_V_CC)source='src/mpi/comm/intercomm_merge.c' object='src/mpi/comm/lib_libpmpi_la-intercomm_merge.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-intercomm_merge.lo `test -f 'src/mpi/comm/intercomm_merge.c' || echo '$(srcdir)/'`src/mpi/comm/intercomm_merge.c + +src/mpi/comm/lib_libpmpi_la-comm_split_type.lo: src/mpi/comm/comm_split_type.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_split_type.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split_type.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_split_type.lo `test -f 'src/mpi/comm/comm_split_type.c' || echo '$(srcdir)/'`src/mpi/comm/comm_split_type.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split_type.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split_type.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_split_type.c' object='src/mpi/comm/lib_libpmpi_la-comm_split_type.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_split_type.lo `test -f 'src/mpi/comm/comm_split_type.c' || echo '$(srcdir)/'`src/mpi/comm/comm_split_type.c + +src/mpi/comm/lib_libpmpi_la-comm_failure_ack.lo: src/mpi/comm/comm_failure_ack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_failure_ack.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_ack.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_failure_ack.lo `test -f 'src/mpi/comm/comm_failure_ack.c' || echo '$(srcdir)/'`src/mpi/comm/comm_failure_ack.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_ack.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_ack.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_failure_ack.c' object='src/mpi/comm/lib_libpmpi_la-comm_failure_ack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_failure_ack.lo `test -f 'src/mpi/comm/comm_failure_ack.c' || echo '$(srcdir)/'`src/mpi/comm/comm_failure_ack.c + +src/mpi/comm/lib_libpmpi_la-comm_failure_get_acked.lo: src/mpi/comm/comm_failure_get_acked.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_failure_get_acked.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_acked.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_failure_get_acked.lo `test -f 'src/mpi/comm/comm_failure_get_acked.c' || echo '$(srcdir)/'`src/mpi/comm/comm_failure_get_acked.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_acked.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_acked.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_failure_get_acked.c' object='src/mpi/comm/lib_libpmpi_la-comm_failure_get_acked.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_failure_get_acked.lo `test -f 'src/mpi/comm/comm_failure_get_acked.c' || echo '$(srcdir)/'`src/mpi/comm/comm_failure_get_acked.c + +src/mpi/comm/lib_libpmpi_la-comm_revoke.lo: src/mpi/comm/comm_revoke.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_revoke.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_revoke.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_revoke.lo `test -f 'src/mpi/comm/comm_revoke.c' || echo '$(srcdir)/'`src/mpi/comm/comm_revoke.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_revoke.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_revoke.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_revoke.c' object='src/mpi/comm/lib_libpmpi_la-comm_revoke.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_revoke.lo `test -f 'src/mpi/comm/comm_revoke.c' || echo '$(srcdir)/'`src/mpi/comm/comm_revoke.c + +src/mpi/comm/lib_libpmpi_la-comm_shrink.lo: src/mpi/comm/comm_shrink.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_shrink.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_shrink.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_shrink.lo `test -f 'src/mpi/comm/comm_shrink.c' || echo '$(srcdir)/'`src/mpi/comm/comm_shrink.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_shrink.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_shrink.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_shrink.c' object='src/mpi/comm/lib_libpmpi_la-comm_shrink.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_shrink.lo `test -f 'src/mpi/comm/comm_shrink.c' || echo '$(srcdir)/'`src/mpi/comm/comm_shrink.c + +src/mpi/comm/lib_libpmpi_la-comm_agree.lo: src/mpi/comm/comm_agree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-comm_agree.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_agree.Tpo -c -o src/mpi/comm/lib_libpmpi_la-comm_agree.lo `test -f 'src/mpi/comm/comm_agree.c' || echo '$(srcdir)/'`src/mpi/comm/comm_agree.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_agree.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_agree.Plo +# $(AM_V_CC)source='src/mpi/comm/comm_agree.c' object='src/mpi/comm/lib_libpmpi_la-comm_agree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-comm_agree.lo `test -f 'src/mpi/comm/comm_agree.c' || echo '$(srcdir)/'`src/mpi/comm/comm_agree.c + +src/mpi/datatype/lib_libpmpi_la-address.lo: src/mpi/datatype/address.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-address.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-address.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-address.lo `test -f 'src/mpi/datatype/address.c' || echo '$(srcdir)/'`src/mpi/datatype/address.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-address.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-address.Plo +# $(AM_V_CC)source='src/mpi/datatype/address.c' object='src/mpi/datatype/lib_libpmpi_la-address.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-address.lo `test -f 'src/mpi/datatype/address.c' || echo '$(srcdir)/'`src/mpi/datatype/address.c + +src/mpi/datatype/lib_libpmpi_la-get_address.lo: src/mpi/datatype/get_address.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-get_address.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_address.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-get_address.lo `test -f 'src/mpi/datatype/get_address.c' || echo '$(srcdir)/'`src/mpi/datatype/get_address.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_address.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_address.Plo +# $(AM_V_CC)source='src/mpi/datatype/get_address.c' object='src/mpi/datatype/lib_libpmpi_la-get_address.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-get_address.lo `test -f 'src/mpi/datatype/get_address.c' || echo '$(srcdir)/'`src/mpi/datatype/get_address.c + +src/mpi/datatype/lib_libpmpi_la-get_count.lo: src/mpi/datatype/get_count.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-get_count.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_count.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-get_count.lo `test -f 'src/mpi/datatype/get_count.c' || echo '$(srcdir)/'`src/mpi/datatype/get_count.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_count.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_count.Plo +# $(AM_V_CC)source='src/mpi/datatype/get_count.c' object='src/mpi/datatype/lib_libpmpi_la-get_count.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-get_count.lo `test -f 'src/mpi/datatype/get_count.c' || echo '$(srcdir)/'`src/mpi/datatype/get_count.c + +src/mpi/datatype/lib_libpmpi_la-get_elements.lo: src/mpi/datatype/get_elements.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-get_elements.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-get_elements.lo `test -f 'src/mpi/datatype/get_elements.c' || echo '$(srcdir)/'`src/mpi/datatype/get_elements.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements.Plo +# $(AM_V_CC)source='src/mpi/datatype/get_elements.c' object='src/mpi/datatype/lib_libpmpi_la-get_elements.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-get_elements.lo `test -f 'src/mpi/datatype/get_elements.c' || echo '$(srcdir)/'`src/mpi/datatype/get_elements.c + +src/mpi/datatype/lib_libpmpi_la-get_elements_x.lo: src/mpi/datatype/get_elements_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-get_elements_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements_x.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-get_elements_x.lo `test -f 'src/mpi/datatype/get_elements_x.c' || echo '$(srcdir)/'`src/mpi/datatype/get_elements_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/get_elements_x.c' object='src/mpi/datatype/lib_libpmpi_la-get_elements_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-get_elements_x.lo `test -f 'src/mpi/datatype/get_elements_x.c' || echo '$(srcdir)/'`src/mpi/datatype/get_elements_x.c + +src/mpi/datatype/lib_libpmpi_la-pack.lo: src/mpi/datatype/pack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-pack.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-pack.lo `test -f 'src/mpi/datatype/pack.c' || echo '$(srcdir)/'`src/mpi/datatype/pack.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack.Plo +# $(AM_V_CC)source='src/mpi/datatype/pack.c' object='src/mpi/datatype/lib_libpmpi_la-pack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-pack.lo `test -f 'src/mpi/datatype/pack.c' || echo '$(srcdir)/'`src/mpi/datatype/pack.c + +src/mpi/datatype/lib_libpmpi_la-pack_external.lo: src/mpi/datatype/pack_external.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-pack_external.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-pack_external.lo `test -f 'src/mpi/datatype/pack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_external.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external.Plo +# $(AM_V_CC)source='src/mpi/datatype/pack_external.c' object='src/mpi/datatype/lib_libpmpi_la-pack_external.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-pack_external.lo `test -f 'src/mpi/datatype/pack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_external.c + +src/mpi/datatype/lib_libpmpi_la-pack_external_size.lo: src/mpi/datatype/pack_external_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-pack_external_size.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external_size.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-pack_external_size.lo `test -f 'src/mpi/datatype/pack_external_size.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_external_size.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external_size.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external_size.Plo +# $(AM_V_CC)source='src/mpi/datatype/pack_external_size.c' object='src/mpi/datatype/lib_libpmpi_la-pack_external_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-pack_external_size.lo `test -f 'src/mpi/datatype/pack_external_size.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_external_size.c + +src/mpi/datatype/lib_libpmpi_la-pack_size.lo: src/mpi/datatype/pack_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-pack_size.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_size.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-pack_size.lo `test -f 'src/mpi/datatype/pack_size.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_size.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_size.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_size.Plo +# $(AM_V_CC)source='src/mpi/datatype/pack_size.c' object='src/mpi/datatype/lib_libpmpi_la-pack_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-pack_size.lo `test -f 'src/mpi/datatype/pack_size.c' || echo '$(srcdir)/'`src/mpi/datatype/pack_size.c + +src/mpi/datatype/lib_libpmpi_la-status_set_elements.lo: src/mpi/datatype/status_set_elements.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-status_set_elements.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-status_set_elements.lo `test -f 'src/mpi/datatype/status_set_elements.c' || echo '$(srcdir)/'`src/mpi/datatype/status_set_elements.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements.Plo +# $(AM_V_CC)source='src/mpi/datatype/status_set_elements.c' object='src/mpi/datatype/lib_libpmpi_la-status_set_elements.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-status_set_elements.lo `test -f 'src/mpi/datatype/status_set_elements.c' || echo '$(srcdir)/'`src/mpi/datatype/status_set_elements.c + +src/mpi/datatype/lib_libpmpi_la-status_set_elements_x.lo: src/mpi/datatype/status_set_elements_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-status_set_elements_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements_x.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-status_set_elements_x.lo `test -f 'src/mpi/datatype/status_set_elements_x.c' || echo '$(srcdir)/'`src/mpi/datatype/status_set_elements_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/status_set_elements_x.c' object='src/mpi/datatype/lib_libpmpi_la-status_set_elements_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-status_set_elements_x.lo `test -f 'src/mpi/datatype/status_set_elements_x.c' || echo '$(srcdir)/'`src/mpi/datatype/status_set_elements_x.c + +src/mpi/datatype/lib_libpmpi_la-type_get_name.lo: src/mpi/datatype/type_get_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_get_name.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_name.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_get_name.lo `test -f 'src/mpi/datatype/type_get_name.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_name.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_name.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_name.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_name.c' object='src/mpi/datatype/lib_libpmpi_la-type_get_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_get_name.lo `test -f 'src/mpi/datatype/type_get_name.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_name.c + +src/mpi/datatype/lib_libpmpi_la-type_set_name.lo: src/mpi/datatype/type_set_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_set_name.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_set_name.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_set_name.lo `test -f 'src/mpi/datatype/type_set_name.c' || echo '$(srcdir)/'`src/mpi/datatype/type_set_name.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_set_name.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_set_name.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_set_name.c' object='src/mpi/datatype/lib_libpmpi_la-type_set_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_set_name.lo `test -f 'src/mpi/datatype/type_set_name.c' || echo '$(srcdir)/'`src/mpi/datatype/type_set_name.c + +src/mpi/datatype/lib_libpmpi_la-type_size.lo: src/mpi/datatype/type_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_size.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_size.lo `test -f 'src/mpi/datatype/type_size.c' || echo '$(srcdir)/'`src/mpi/datatype/type_size.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_size.c' object='src/mpi/datatype/lib_libpmpi_la-type_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_size.lo `test -f 'src/mpi/datatype/type_size.c' || echo '$(srcdir)/'`src/mpi/datatype/type_size.c + +src/mpi/datatype/lib_libpmpi_la-type_size_x.lo: src/mpi/datatype/type_size_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_size_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size_x.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_size_x.lo `test -f 'src/mpi/datatype/type_size_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_size_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_size_x.c' object='src/mpi/datatype/lib_libpmpi_la-type_size_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_size_x.lo `test -f 'src/mpi/datatype/type_size_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_size_x.c + +src/mpi/datatype/lib_libpmpi_la-type_extent.lo: src/mpi/datatype/type_extent.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_extent.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_extent.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_extent.lo `test -f 'src/mpi/datatype/type_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_extent.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_extent.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_extent.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_extent.c' object='src/mpi/datatype/lib_libpmpi_la-type_extent.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_extent.lo `test -f 'src/mpi/datatype/type_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_extent.c + +src/mpi/datatype/lib_libpmpi_la-type_vector.lo: src/mpi/datatype/type_vector.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_vector.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_vector.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_vector.lo `test -f 'src/mpi/datatype/type_vector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_vector.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_vector.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_vector.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_vector.c' object='src/mpi/datatype/lib_libpmpi_la-type_vector.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_vector.lo `test -f 'src/mpi/datatype/type_vector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_vector.c + +src/mpi/datatype/lib_libpmpi_la-type_commit.lo: src/mpi/datatype/type_commit.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_commit.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_commit.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_commit.lo `test -f 'src/mpi/datatype/type_commit.c' || echo '$(srcdir)/'`src/mpi/datatype/type_commit.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_commit.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_commit.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_commit.c' object='src/mpi/datatype/lib_libpmpi_la-type_commit.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_commit.lo `test -f 'src/mpi/datatype/type_commit.c' || echo '$(srcdir)/'`src/mpi/datatype/type_commit.c + +src/mpi/datatype/lib_libpmpi_la-type_indexed.lo: src/mpi/datatype/type_indexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_indexed.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_indexed.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_indexed.lo `test -f 'src/mpi/datatype/type_indexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_indexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_indexed.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_indexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_indexed.c' object='src/mpi/datatype/lib_libpmpi_la-type_indexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_indexed.lo `test -f 'src/mpi/datatype/type_indexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_indexed.c + +src/mpi/datatype/lib_libpmpi_la-type_hindexed.lo: src/mpi/datatype/type_hindexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_hindexed.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hindexed.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_hindexed.lo `test -f 'src/mpi/datatype/type_hindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_hindexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hindexed.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hindexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_hindexed.c' object='src/mpi/datatype/lib_libpmpi_la-type_hindexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_hindexed.lo `test -f 'src/mpi/datatype/type_hindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_hindexed.c + +src/mpi/datatype/lib_libpmpi_la-type_struct.lo: src/mpi/datatype/type_struct.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_struct.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_struct.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_struct.lo `test -f 'src/mpi/datatype/type_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/type_struct.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_struct.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_struct.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_struct.c' object='src/mpi/datatype/lib_libpmpi_la-type_struct.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_struct.lo `test -f 'src/mpi/datatype/type_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/type_struct.c + +src/mpi/datatype/lib_libpmpi_la-type_contiguous.lo: src/mpi/datatype/type_contiguous.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_contiguous.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_contiguous.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_contiguous.lo `test -f 'src/mpi/datatype/type_contiguous.c' || echo '$(srcdir)/'`src/mpi/datatype/type_contiguous.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_contiguous.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_contiguous.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_contiguous.c' object='src/mpi/datatype/lib_libpmpi_la-type_contiguous.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_contiguous.lo `test -f 'src/mpi/datatype/type_contiguous.c' || echo '$(srcdir)/'`src/mpi/datatype/type_contiguous.c + +src/mpi/datatype/lib_libpmpi_la-type_free.lo: src/mpi/datatype/type_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_free.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_free.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_free.lo `test -f 'src/mpi/datatype/type_free.c' || echo '$(srcdir)/'`src/mpi/datatype/type_free.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_free.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_free.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_free.c' object='src/mpi/datatype/lib_libpmpi_la-type_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_free.lo `test -f 'src/mpi/datatype/type_free.c' || echo '$(srcdir)/'`src/mpi/datatype/type_free.c + +src/mpi/datatype/lib_libpmpi_la-type_hvector.lo: src/mpi/datatype/type_hvector.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_hvector.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hvector.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_hvector.lo `test -f 'src/mpi/datatype/type_hvector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_hvector.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hvector.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hvector.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_hvector.c' object='src/mpi/datatype/lib_libpmpi_la-type_hvector.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_hvector.lo `test -f 'src/mpi/datatype/type_hvector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_hvector.c + +src/mpi/datatype/lib_libpmpi_la-type_dup.lo: src/mpi/datatype/type_dup.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_dup.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_dup.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_dup.lo `test -f 'src/mpi/datatype/type_dup.c' || echo '$(srcdir)/'`src/mpi/datatype/type_dup.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_dup.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_dup.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_dup.c' object='src/mpi/datatype/lib_libpmpi_la-type_dup.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_dup.lo `test -f 'src/mpi/datatype/type_dup.c' || echo '$(srcdir)/'`src/mpi/datatype/type_dup.c + +src/mpi/datatype/lib_libpmpi_la-type_get_envelope.lo: src/mpi/datatype/type_get_envelope.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_get_envelope.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_envelope.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_get_envelope.lo `test -f 'src/mpi/datatype/type_get_envelope.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_envelope.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_envelope.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_envelope.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_envelope.c' object='src/mpi/datatype/lib_libpmpi_la-type_get_envelope.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_get_envelope.lo `test -f 'src/mpi/datatype/type_get_envelope.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_envelope.c + +src/mpi/datatype/lib_libpmpi_la-type_get_contents.lo: src/mpi/datatype/type_get_contents.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_get_contents.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_contents.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_get_contents.lo `test -f 'src/mpi/datatype/type_get_contents.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_contents.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_contents.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_contents.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_contents.c' object='src/mpi/datatype/lib_libpmpi_la-type_get_contents.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_get_contents.lo `test -f 'src/mpi/datatype/type_get_contents.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_contents.c + +src/mpi/datatype/lib_libpmpi_la-type_ub.lo: src/mpi/datatype/type_ub.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_ub.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_ub.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_ub.lo `test -f 'src/mpi/datatype/type_ub.c' || echo '$(srcdir)/'`src/mpi/datatype/type_ub.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_ub.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_ub.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_ub.c' object='src/mpi/datatype/lib_libpmpi_la-type_ub.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_ub.lo `test -f 'src/mpi/datatype/type_ub.c' || echo '$(srcdir)/'`src/mpi/datatype/type_ub.c + +src/mpi/datatype/lib_libpmpi_la-type_lb.lo: src/mpi/datatype/type_lb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_lb.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_lb.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_lb.lo `test -f 'src/mpi/datatype/type_lb.c' || echo '$(srcdir)/'`src/mpi/datatype/type_lb.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_lb.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_lb.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_lb.c' object='src/mpi/datatype/lib_libpmpi_la-type_lb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_lb.lo `test -f 'src/mpi/datatype/type_lb.c' || echo '$(srcdir)/'`src/mpi/datatype/type_lb.c + +src/mpi/datatype/lib_libpmpi_la-type_get_extent.lo: src/mpi/datatype/type_get_extent.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_get_extent.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_get_extent.lo `test -f 'src/mpi/datatype/type_get_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_extent.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_extent.c' object='src/mpi/datatype/lib_libpmpi_la-type_get_extent.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_get_extent.lo `test -f 'src/mpi/datatype/type_get_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_extent.c + +src/mpi/datatype/lib_libpmpi_la-type_get_extent_x.lo: src/mpi/datatype/type_get_extent_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_get_extent_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent_x.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_get_extent_x.lo `test -f 'src/mpi/datatype/type_get_extent_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_extent_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_extent_x.c' object='src/mpi/datatype/lib_libpmpi_la-type_get_extent_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_get_extent_x.lo `test -f 'src/mpi/datatype/type_get_extent_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_extent_x.c + +src/mpi/datatype/lib_libpmpi_la-type_get_true_extent.lo: src/mpi/datatype/type_get_true_extent.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_get_true_extent.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_get_true_extent.lo `test -f 'src/mpi/datatype/type_get_true_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_true_extent.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_true_extent.c' object='src/mpi/datatype/lib_libpmpi_la-type_get_true_extent.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_get_true_extent.lo `test -f 'src/mpi/datatype/type_get_true_extent.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_true_extent.c + +src/mpi/datatype/lib_libpmpi_la-type_get_true_extent_x.lo: src/mpi/datatype/type_get_true_extent_x.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_get_true_extent_x.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_x.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_get_true_extent_x.lo `test -f 'src/mpi/datatype/type_get_true_extent_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_true_extent_x.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_x.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_x.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_get_true_extent_x.c' object='src/mpi/datatype/lib_libpmpi_la-type_get_true_extent_x.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_get_true_extent_x.lo `test -f 'src/mpi/datatype/type_get_true_extent_x.c' || echo '$(srcdir)/'`src/mpi/datatype/type_get_true_extent_x.c + +src/mpi/datatype/lib_libpmpi_la-type_match_size.lo: src/mpi/datatype/type_match_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_match_size.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_match_size.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_match_size.lo `test -f 'src/mpi/datatype/type_match_size.c' || echo '$(srcdir)/'`src/mpi/datatype/type_match_size.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_match_size.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_match_size.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_match_size.c' object='src/mpi/datatype/lib_libpmpi_la-type_match_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_match_size.lo `test -f 'src/mpi/datatype/type_match_size.c' || echo '$(srcdir)/'`src/mpi/datatype/type_match_size.c + +src/mpi/datatype/lib_libpmpi_la-type_create_struct.lo: src/mpi/datatype/type_create_struct.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_struct.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_struct.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_struct.lo `test -f 'src/mpi/datatype/type_create_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_struct.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_struct.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_struct.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_struct.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_struct.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_struct.lo `test -f 'src/mpi/datatype/type_create_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_struct.c + +src/mpi/datatype/lib_libpmpi_la-type_create_hindexed.lo: src/mpi/datatype/type_create_hindexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_hindexed.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_hindexed.lo `test -f 'src/mpi/datatype/type_create_hindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hindexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_hindexed.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_hindexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_hindexed.lo `test -f 'src/mpi/datatype/type_create_hindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hindexed.c + +src/mpi/datatype/lib_libpmpi_la-type_create_hvector.lo: src/mpi/datatype/type_create_hvector.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_hvector.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hvector.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_hvector.lo `test -f 'src/mpi/datatype/type_create_hvector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hvector.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hvector.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hvector.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_hvector.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_hvector.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_hvector.lo `test -f 'src/mpi/datatype/type_create_hvector.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hvector.c + +src/mpi/datatype/lib_libpmpi_la-type_create_indexed_block.lo: src/mpi/datatype/type_create_indexed_block.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_indexed_block.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_indexed_block.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_indexed_block.lo `test -f 'src/mpi/datatype/type_create_indexed_block.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_indexed_block.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_indexed_block.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_indexed_block.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_indexed_block.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_indexed_block.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_indexed_block.lo `test -f 'src/mpi/datatype/type_create_indexed_block.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_indexed_block.c + +src/mpi/datatype/lib_libpmpi_la-type_create_hindexed_block.lo: src/mpi/datatype/type_create_hindexed_block.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_hindexed_block.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_block.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_hindexed_block.lo `test -f 'src/mpi/datatype/type_create_hindexed_block.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hindexed_block.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_block.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_block.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_hindexed_block.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_hindexed_block.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_hindexed_block.lo `test -f 'src/mpi/datatype/type_create_hindexed_block.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_hindexed_block.c + +src/mpi/datatype/lib_libpmpi_la-type_create_resized.lo: src/mpi/datatype/type_create_resized.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_resized.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_resized.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_resized.lo `test -f 'src/mpi/datatype/type_create_resized.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_resized.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_resized.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_resized.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_resized.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_resized.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_resized.lo `test -f 'src/mpi/datatype/type_create_resized.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_resized.c + +src/mpi/datatype/lib_libpmpi_la-type_create_darray.lo: src/mpi/datatype/type_create_darray.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_darray.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_darray.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_darray.lo `test -f 'src/mpi/datatype/type_create_darray.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_darray.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_darray.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_darray.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_darray.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_darray.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_darray.lo `test -f 'src/mpi/datatype/type_create_darray.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_darray.c + +src/mpi/datatype/lib_libpmpi_la-type_create_subarray.lo: src/mpi/datatype/type_create_subarray.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_subarray.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_subarray.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_subarray.lo `test -f 'src/mpi/datatype/type_create_subarray.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_subarray.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_subarray.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_subarray.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_subarray.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_subarray.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_subarray.lo `test -f 'src/mpi/datatype/type_create_subarray.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_subarray.c + +src/mpi/datatype/lib_libpmpi_la-unpack.lo: src/mpi/datatype/unpack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-unpack.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-unpack.lo `test -f 'src/mpi/datatype/unpack.c' || echo '$(srcdir)/'`src/mpi/datatype/unpack.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack.Plo +# $(AM_V_CC)source='src/mpi/datatype/unpack.c' object='src/mpi/datatype/lib_libpmpi_la-unpack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-unpack.lo `test -f 'src/mpi/datatype/unpack.c' || echo '$(srcdir)/'`src/mpi/datatype/unpack.c + +src/mpi/datatype/lib_libpmpi_la-unpack_external.lo: src/mpi/datatype/unpack_external.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-unpack_external.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack_external.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-unpack_external.lo `test -f 'src/mpi/datatype/unpack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/unpack_external.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack_external.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack_external.Plo +# $(AM_V_CC)source='src/mpi/datatype/unpack_external.c' object='src/mpi/datatype/lib_libpmpi_la-unpack_external.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-unpack_external.lo `test -f 'src/mpi/datatype/unpack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/unpack_external.c + +src/mpi/errhan/lib_libpmpi_la-add_error_code.lo: src/mpi/errhan/add_error_code.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-add_error_code.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_code.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-add_error_code.lo `test -f 'src/mpi/errhan/add_error_code.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_code.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_code.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_code.Plo +# $(AM_V_CC)source='src/mpi/errhan/add_error_code.c' object='src/mpi/errhan/lib_libpmpi_la-add_error_code.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-add_error_code.lo `test -f 'src/mpi/errhan/add_error_code.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_code.c + +src/mpi/errhan/lib_libpmpi_la-add_error_class.lo: src/mpi/errhan/add_error_class.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-add_error_class.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_class.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-add_error_class.lo `test -f 'src/mpi/errhan/add_error_class.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_class.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_class.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_class.Plo +# $(AM_V_CC)source='src/mpi/errhan/add_error_class.c' object='src/mpi/errhan/lib_libpmpi_la-add_error_class.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-add_error_class.lo `test -f 'src/mpi/errhan/add_error_class.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_class.c + +src/mpi/errhan/lib_libpmpi_la-add_error_string.lo: src/mpi/errhan/add_error_string.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-add_error_string.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_string.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-add_error_string.lo `test -f 'src/mpi/errhan/add_error_string.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_string.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_string.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_string.Plo +# $(AM_V_CC)source='src/mpi/errhan/add_error_string.c' object='src/mpi/errhan/lib_libpmpi_la-add_error_string.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-add_error_string.lo `test -f 'src/mpi/errhan/add_error_string.c' || echo '$(srcdir)/'`src/mpi/errhan/add_error_string.c + +src/mpi/errhan/lib_libpmpi_la-comm_call_errhandler.lo: src/mpi/errhan/comm_call_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-comm_call_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_call_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-comm_call_errhandler.lo `test -f 'src/mpi/errhan/comm_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_call_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_call_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_call_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/comm_call_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-comm_call_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-comm_call_errhandler.lo `test -f 'src/mpi/errhan/comm_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_call_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-comm_create_errhandler.lo: src/mpi/errhan/comm_create_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-comm_create_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_create_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-comm_create_errhandler.lo `test -f 'src/mpi/errhan/comm_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_create_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_create_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_create_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/comm_create_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-comm_create_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-comm_create_errhandler.lo `test -f 'src/mpi/errhan/comm_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_create_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-comm_get_errhandler.lo: src/mpi/errhan/comm_get_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-comm_get_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_get_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-comm_get_errhandler.lo `test -f 'src/mpi/errhan/comm_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_get_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_get_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_get_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/comm_get_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-comm_get_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-comm_get_errhandler.lo `test -f 'src/mpi/errhan/comm_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_get_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-comm_set_errhandler.lo: src/mpi/errhan/comm_set_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-comm_set_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_set_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-comm_set_errhandler.lo `test -f 'src/mpi/errhan/comm_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_set_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_set_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_set_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/comm_set_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-comm_set_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-comm_set_errhandler.lo `test -f 'src/mpi/errhan/comm_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/comm_set_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-errhandler_create.lo: src/mpi/errhan/errhandler_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-errhandler_create.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_create.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-errhandler_create.lo `test -f 'src/mpi/errhan/errhandler_create.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_create.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_create.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_create.Plo +# $(AM_V_CC)source='src/mpi/errhan/errhandler_create.c' object='src/mpi/errhan/lib_libpmpi_la-errhandler_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-errhandler_create.lo `test -f 'src/mpi/errhan/errhandler_create.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_create.c + +src/mpi/errhan/lib_libpmpi_la-errhandler_free.lo: src/mpi/errhan/errhandler_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-errhandler_free.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_free.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-errhandler_free.lo `test -f 'src/mpi/errhan/errhandler_free.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_free.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_free.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_free.Plo +# $(AM_V_CC)source='src/mpi/errhan/errhandler_free.c' object='src/mpi/errhan/lib_libpmpi_la-errhandler_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-errhandler_free.lo `test -f 'src/mpi/errhan/errhandler_free.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_free.c + +src/mpi/errhan/lib_libpmpi_la-errhandler_get.lo: src/mpi/errhan/errhandler_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-errhandler_get.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_get.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-errhandler_get.lo `test -f 'src/mpi/errhan/errhandler_get.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_get.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_get.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_get.Plo +# $(AM_V_CC)source='src/mpi/errhan/errhandler_get.c' object='src/mpi/errhan/lib_libpmpi_la-errhandler_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-errhandler_get.lo `test -f 'src/mpi/errhan/errhandler_get.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_get.c + +src/mpi/errhan/lib_libpmpi_la-errhandler_set.lo: src/mpi/errhan/errhandler_set.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-errhandler_set.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_set.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-errhandler_set.lo `test -f 'src/mpi/errhan/errhandler_set.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_set.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_set.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_set.Plo +# $(AM_V_CC)source='src/mpi/errhan/errhandler_set.c' object='src/mpi/errhan/lib_libpmpi_la-errhandler_set.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-errhandler_set.lo `test -f 'src/mpi/errhan/errhandler_set.c' || echo '$(srcdir)/'`src/mpi/errhan/errhandler_set.c + +src/mpi/errhan/lib_libpmpi_la-error_class.lo: src/mpi/errhan/error_class.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-error_class.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_class.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-error_class.lo `test -f 'src/mpi/errhan/error_class.c' || echo '$(srcdir)/'`src/mpi/errhan/error_class.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_class.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_class.Plo +# $(AM_V_CC)source='src/mpi/errhan/error_class.c' object='src/mpi/errhan/lib_libpmpi_la-error_class.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-error_class.lo `test -f 'src/mpi/errhan/error_class.c' || echo '$(srcdir)/'`src/mpi/errhan/error_class.c + +src/mpi/errhan/lib_libpmpi_la-error_string.lo: src/mpi/errhan/error_string.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-error_string.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_string.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-error_string.lo `test -f 'src/mpi/errhan/error_string.c' || echo '$(srcdir)/'`src/mpi/errhan/error_string.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_string.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_string.Plo +# $(AM_V_CC)source='src/mpi/errhan/error_string.c' object='src/mpi/errhan/lib_libpmpi_la-error_string.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-error_string.lo `test -f 'src/mpi/errhan/error_string.c' || echo '$(srcdir)/'`src/mpi/errhan/error_string.c + +src/mpi/errhan/lib_libpmpi_la-file_create_errhandler.lo: src/mpi/errhan/file_create_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-file_create_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_create_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-file_create_errhandler.lo `test -f 'src/mpi/errhan/file_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_create_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_create_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_create_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/file_create_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-file_create_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-file_create_errhandler.lo `test -f 'src/mpi/errhan/file_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_create_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-file_get_errhandler.lo: src/mpi/errhan/file_get_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-file_get_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_get_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-file_get_errhandler.lo `test -f 'src/mpi/errhan/file_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_get_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_get_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_get_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/file_get_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-file_get_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-file_get_errhandler.lo `test -f 'src/mpi/errhan/file_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_get_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-file_set_errhandler.lo: src/mpi/errhan/file_set_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-file_set_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_set_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-file_set_errhandler.lo `test -f 'src/mpi/errhan/file_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_set_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_set_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_set_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/file_set_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-file_set_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-file_set_errhandler.lo `test -f 'src/mpi/errhan/file_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_set_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-file_call_errhandler.lo: src/mpi/errhan/file_call_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-file_call_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_call_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-file_call_errhandler.lo `test -f 'src/mpi/errhan/file_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_call_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_call_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_call_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/file_call_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-file_call_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-file_call_errhandler.lo `test -f 'src/mpi/errhan/file_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/file_call_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-win_create_errhandler.lo: src/mpi/errhan/win_create_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-win_create_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_create_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-win_create_errhandler.lo `test -f 'src/mpi/errhan/win_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_create_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_create_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_create_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/win_create_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-win_create_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-win_create_errhandler.lo `test -f 'src/mpi/errhan/win_create_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_create_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-win_call_errhandler.lo: src/mpi/errhan/win_call_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-win_call_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_call_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-win_call_errhandler.lo `test -f 'src/mpi/errhan/win_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_call_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_call_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_call_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/win_call_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-win_call_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-win_call_errhandler.lo `test -f 'src/mpi/errhan/win_call_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_call_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-win_get_errhandler.lo: src/mpi/errhan/win_get_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-win_get_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_get_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-win_get_errhandler.lo `test -f 'src/mpi/errhan/win_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_get_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_get_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_get_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/win_get_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-win_get_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-win_get_errhandler.lo `test -f 'src/mpi/errhan/win_get_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_get_errhandler.c + +src/mpi/errhan/lib_libpmpi_la-win_set_errhandler.lo: src/mpi/errhan/win_set_errhandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-win_set_errhandler.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_set_errhandler.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-win_set_errhandler.lo `test -f 'src/mpi/errhan/win_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_set_errhandler.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_set_errhandler.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_set_errhandler.Plo +# $(AM_V_CC)source='src/mpi/errhan/win_set_errhandler.c' object='src/mpi/errhan/lib_libpmpi_la-win_set_errhandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-win_set_errhandler.lo `test -f 'src/mpi/errhan/win_set_errhandler.c' || echo '$(srcdir)/'`src/mpi/errhan/win_set_errhandler.c + +src/mpi/group/lib_libpmpi_la-group_compare.lo: src/mpi/group/group_compare.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_compare.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_compare.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_compare.lo `test -f 'src/mpi/group/group_compare.c' || echo '$(srcdir)/'`src/mpi/group/group_compare.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_compare.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_compare.Plo +# $(AM_V_CC)source='src/mpi/group/group_compare.c' object='src/mpi/group/lib_libpmpi_la-group_compare.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_compare.lo `test -f 'src/mpi/group/group_compare.c' || echo '$(srcdir)/'`src/mpi/group/group_compare.c + +src/mpi/group/lib_libpmpi_la-group_difference.lo: src/mpi/group/group_difference.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_difference.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_difference.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_difference.lo `test -f 'src/mpi/group/group_difference.c' || echo '$(srcdir)/'`src/mpi/group/group_difference.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_difference.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_difference.Plo +# $(AM_V_CC)source='src/mpi/group/group_difference.c' object='src/mpi/group/lib_libpmpi_la-group_difference.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_difference.lo `test -f 'src/mpi/group/group_difference.c' || echo '$(srcdir)/'`src/mpi/group/group_difference.c + +src/mpi/group/lib_libpmpi_la-group_excl.lo: src/mpi/group/group_excl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_excl.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_excl.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_excl.lo `test -f 'src/mpi/group/group_excl.c' || echo '$(srcdir)/'`src/mpi/group/group_excl.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_excl.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_excl.Plo +# $(AM_V_CC)source='src/mpi/group/group_excl.c' object='src/mpi/group/lib_libpmpi_la-group_excl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_excl.lo `test -f 'src/mpi/group/group_excl.c' || echo '$(srcdir)/'`src/mpi/group/group_excl.c + +src/mpi/group/lib_libpmpi_la-group_free.lo: src/mpi/group/group_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_free.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_free.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_free.lo `test -f 'src/mpi/group/group_free.c' || echo '$(srcdir)/'`src/mpi/group/group_free.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_free.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_free.Plo +# $(AM_V_CC)source='src/mpi/group/group_free.c' object='src/mpi/group/lib_libpmpi_la-group_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_free.lo `test -f 'src/mpi/group/group_free.c' || echo '$(srcdir)/'`src/mpi/group/group_free.c + +src/mpi/group/lib_libpmpi_la-group_incl.lo: src/mpi/group/group_incl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_incl.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_incl.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_incl.lo `test -f 'src/mpi/group/group_incl.c' || echo '$(srcdir)/'`src/mpi/group/group_incl.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_incl.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_incl.Plo +# $(AM_V_CC)source='src/mpi/group/group_incl.c' object='src/mpi/group/lib_libpmpi_la-group_incl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_incl.lo `test -f 'src/mpi/group/group_incl.c' || echo '$(srcdir)/'`src/mpi/group/group_incl.c + +src/mpi/group/lib_libpmpi_la-group_intersection.lo: src/mpi/group/group_intersection.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_intersection.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_intersection.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_intersection.lo `test -f 'src/mpi/group/group_intersection.c' || echo '$(srcdir)/'`src/mpi/group/group_intersection.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_intersection.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_intersection.Plo +# $(AM_V_CC)source='src/mpi/group/group_intersection.c' object='src/mpi/group/lib_libpmpi_la-group_intersection.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_intersection.lo `test -f 'src/mpi/group/group_intersection.c' || echo '$(srcdir)/'`src/mpi/group/group_intersection.c + +src/mpi/group/lib_libpmpi_la-group_range_excl.lo: src/mpi/group/group_range_excl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_range_excl.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_excl.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_range_excl.lo `test -f 'src/mpi/group/group_range_excl.c' || echo '$(srcdir)/'`src/mpi/group/group_range_excl.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_excl.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_excl.Plo +# $(AM_V_CC)source='src/mpi/group/group_range_excl.c' object='src/mpi/group/lib_libpmpi_la-group_range_excl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_range_excl.lo `test -f 'src/mpi/group/group_range_excl.c' || echo '$(srcdir)/'`src/mpi/group/group_range_excl.c + +src/mpi/group/lib_libpmpi_la-group_range_incl.lo: src/mpi/group/group_range_incl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_range_incl.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_incl.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_range_incl.lo `test -f 'src/mpi/group/group_range_incl.c' || echo '$(srcdir)/'`src/mpi/group/group_range_incl.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_incl.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_incl.Plo +# $(AM_V_CC)source='src/mpi/group/group_range_incl.c' object='src/mpi/group/lib_libpmpi_la-group_range_incl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_range_incl.lo `test -f 'src/mpi/group/group_range_incl.c' || echo '$(srcdir)/'`src/mpi/group/group_range_incl.c + +src/mpi/group/lib_libpmpi_la-group_rank.lo: src/mpi/group/group_rank.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_rank.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_rank.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_rank.lo `test -f 'src/mpi/group/group_rank.c' || echo '$(srcdir)/'`src/mpi/group/group_rank.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_rank.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_rank.Plo +# $(AM_V_CC)source='src/mpi/group/group_rank.c' object='src/mpi/group/lib_libpmpi_la-group_rank.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_rank.lo `test -f 'src/mpi/group/group_rank.c' || echo '$(srcdir)/'`src/mpi/group/group_rank.c + +src/mpi/group/lib_libpmpi_la-group_size.lo: src/mpi/group/group_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_size.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_size.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_size.lo `test -f 'src/mpi/group/group_size.c' || echo '$(srcdir)/'`src/mpi/group/group_size.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_size.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_size.Plo +# $(AM_V_CC)source='src/mpi/group/group_size.c' object='src/mpi/group/lib_libpmpi_la-group_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_size.lo `test -f 'src/mpi/group/group_size.c' || echo '$(srcdir)/'`src/mpi/group/group_size.c + +src/mpi/group/lib_libpmpi_la-group_translate_ranks.lo: src/mpi/group/group_translate_ranks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_translate_ranks.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_translate_ranks.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_translate_ranks.lo `test -f 'src/mpi/group/group_translate_ranks.c' || echo '$(srcdir)/'`src/mpi/group/group_translate_ranks.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_translate_ranks.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_translate_ranks.Plo +# $(AM_V_CC)source='src/mpi/group/group_translate_ranks.c' object='src/mpi/group/lib_libpmpi_la-group_translate_ranks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_translate_ranks.lo `test -f 'src/mpi/group/group_translate_ranks.c' || echo '$(srcdir)/'`src/mpi/group/group_translate_ranks.c + +src/mpi/group/lib_libpmpi_la-group_union.lo: src/mpi/group/group_union.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-group_union.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_union.Tpo -c -o src/mpi/group/lib_libpmpi_la-group_union.lo `test -f 'src/mpi/group/group_union.c' || echo '$(srcdir)/'`src/mpi/group/group_union.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_union.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_union.Plo +# $(AM_V_CC)source='src/mpi/group/group_union.c' object='src/mpi/group/lib_libpmpi_la-group_union.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-group_union.lo `test -f 'src/mpi/group/group_union.c' || echo '$(srcdir)/'`src/mpi/group/group_union.c + +src/mpi/info/lib_libpmpi_la-info_create.lo: src/mpi/info/info_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_create.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_create.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_create.lo `test -f 'src/mpi/info/info_create.c' || echo '$(srcdir)/'`src/mpi/info/info_create.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_create.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_create.Plo +# $(AM_V_CC)source='src/mpi/info/info_create.c' object='src/mpi/info/lib_libpmpi_la-info_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_create.lo `test -f 'src/mpi/info/info_create.c' || echo '$(srcdir)/'`src/mpi/info/info_create.c + +src/mpi/info/lib_libpmpi_la-info_delete.lo: src/mpi/info/info_delete.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_delete.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_delete.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_delete.lo `test -f 'src/mpi/info/info_delete.c' || echo '$(srcdir)/'`src/mpi/info/info_delete.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_delete.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_delete.Plo +# $(AM_V_CC)source='src/mpi/info/info_delete.c' object='src/mpi/info/lib_libpmpi_la-info_delete.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_delete.lo `test -f 'src/mpi/info/info_delete.c' || echo '$(srcdir)/'`src/mpi/info/info_delete.c + +src/mpi/info/lib_libpmpi_la-info_dup.lo: src/mpi/info/info_dup.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_dup.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_dup.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_dup.lo `test -f 'src/mpi/info/info_dup.c' || echo '$(srcdir)/'`src/mpi/info/info_dup.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_dup.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_dup.Plo +# $(AM_V_CC)source='src/mpi/info/info_dup.c' object='src/mpi/info/lib_libpmpi_la-info_dup.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_dup.lo `test -f 'src/mpi/info/info_dup.c' || echo '$(srcdir)/'`src/mpi/info/info_dup.c + +src/mpi/info/lib_libpmpi_la-info_free.lo: src/mpi/info/info_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_free.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_free.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_free.lo `test -f 'src/mpi/info/info_free.c' || echo '$(srcdir)/'`src/mpi/info/info_free.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_free.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_free.Plo +# $(AM_V_CC)source='src/mpi/info/info_free.c' object='src/mpi/info/lib_libpmpi_la-info_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_free.lo `test -f 'src/mpi/info/info_free.c' || echo '$(srcdir)/'`src/mpi/info/info_free.c + +src/mpi/info/lib_libpmpi_la-info_get.lo: src/mpi/info/info_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_get.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_get.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_get.lo `test -f 'src/mpi/info/info_get.c' || echo '$(srcdir)/'`src/mpi/info/info_get.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_get.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_get.Plo +# $(AM_V_CC)source='src/mpi/info/info_get.c' object='src/mpi/info/lib_libpmpi_la-info_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_get.lo `test -f 'src/mpi/info/info_get.c' || echo '$(srcdir)/'`src/mpi/info/info_get.c + +src/mpi/info/lib_libpmpi_la-info_getn.lo: src/mpi/info/info_getn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_getn.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getn.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_getn.lo `test -f 'src/mpi/info/info_getn.c' || echo '$(srcdir)/'`src/mpi/info/info_getn.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getn.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getn.Plo +# $(AM_V_CC)source='src/mpi/info/info_getn.c' object='src/mpi/info/lib_libpmpi_la-info_getn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_getn.lo `test -f 'src/mpi/info/info_getn.c' || echo '$(srcdir)/'`src/mpi/info/info_getn.c + +src/mpi/info/lib_libpmpi_la-info_getnth.lo: src/mpi/info/info_getnth.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_getnth.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getnth.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_getnth.lo `test -f 'src/mpi/info/info_getnth.c' || echo '$(srcdir)/'`src/mpi/info/info_getnth.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getnth.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getnth.Plo +# $(AM_V_CC)source='src/mpi/info/info_getnth.c' object='src/mpi/info/lib_libpmpi_la-info_getnth.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_getnth.lo `test -f 'src/mpi/info/info_getnth.c' || echo '$(srcdir)/'`src/mpi/info/info_getnth.c + +src/mpi/info/lib_libpmpi_la-info_getvallen.lo: src/mpi/info/info_getvallen.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_getvallen.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getvallen.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_getvallen.lo `test -f 'src/mpi/info/info_getvallen.c' || echo '$(srcdir)/'`src/mpi/info/info_getvallen.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getvallen.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getvallen.Plo +# $(AM_V_CC)source='src/mpi/info/info_getvallen.c' object='src/mpi/info/lib_libpmpi_la-info_getvallen.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_getvallen.lo `test -f 'src/mpi/info/info_getvallen.c' || echo '$(srcdir)/'`src/mpi/info/info_getvallen.c + +src/mpi/info/lib_libpmpi_la-info_set.lo: src/mpi/info/info_set.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-info_set.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_set.Tpo -c -o src/mpi/info/lib_libpmpi_la-info_set.lo `test -f 'src/mpi/info/info_set.c' || echo '$(srcdir)/'`src/mpi/info/info_set.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_set.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_set.Plo +# $(AM_V_CC)source='src/mpi/info/info_set.c' object='src/mpi/info/lib_libpmpi_la-info_set.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-info_set.lo `test -f 'src/mpi/info/info_set.c' || echo '$(srcdir)/'`src/mpi/info/info_set.c + +src/mpi/init/lib_libpmpi_la-abort.lo: src/mpi/init/abort.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-abort.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-abort.Tpo -c -o src/mpi/init/lib_libpmpi_la-abort.lo `test -f 'src/mpi/init/abort.c' || echo '$(srcdir)/'`src/mpi/init/abort.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-abort.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-abort.Plo +# $(AM_V_CC)source='src/mpi/init/abort.c' object='src/mpi/init/lib_libpmpi_la-abort.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-abort.lo `test -f 'src/mpi/init/abort.c' || echo '$(srcdir)/'`src/mpi/init/abort.c + +src/mpi/init/lib_libpmpi_la-init.lo: src/mpi/init/init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-init.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-init.Tpo -c -o src/mpi/init/lib_libpmpi_la-init.lo `test -f 'src/mpi/init/init.c' || echo '$(srcdir)/'`src/mpi/init/init.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-init.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-init.Plo +# $(AM_V_CC)source='src/mpi/init/init.c' object='src/mpi/init/lib_libpmpi_la-init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-init.lo `test -f 'src/mpi/init/init.c' || echo '$(srcdir)/'`src/mpi/init/init.c + +src/mpi/init/lib_libpmpi_la-initialized.lo: src/mpi/init/initialized.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-initialized.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initialized.Tpo -c -o src/mpi/init/lib_libpmpi_la-initialized.lo `test -f 'src/mpi/init/initialized.c' || echo '$(srcdir)/'`src/mpi/init/initialized.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initialized.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initialized.Plo +# $(AM_V_CC)source='src/mpi/init/initialized.c' object='src/mpi/init/lib_libpmpi_la-initialized.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-initialized.lo `test -f 'src/mpi/init/initialized.c' || echo '$(srcdir)/'`src/mpi/init/initialized.c + +src/mpi/init/lib_libpmpi_la-initthread.lo: src/mpi/init/initthread.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-initthread.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initthread.Tpo -c -o src/mpi/init/lib_libpmpi_la-initthread.lo `test -f 'src/mpi/init/initthread.c' || echo '$(srcdir)/'`src/mpi/init/initthread.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initthread.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initthread.Plo +# $(AM_V_CC)source='src/mpi/init/initthread.c' object='src/mpi/init/lib_libpmpi_la-initthread.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-initthread.lo `test -f 'src/mpi/init/initthread.c' || echo '$(srcdir)/'`src/mpi/init/initthread.c + +src/mpi/init/lib_libpmpi_la-ismain.lo: src/mpi/init/ismain.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-ismain.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-ismain.Tpo -c -o src/mpi/init/lib_libpmpi_la-ismain.lo `test -f 'src/mpi/init/ismain.c' || echo '$(srcdir)/'`src/mpi/init/ismain.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-ismain.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-ismain.Plo +# $(AM_V_CC)source='src/mpi/init/ismain.c' object='src/mpi/init/lib_libpmpi_la-ismain.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-ismain.lo `test -f 'src/mpi/init/ismain.c' || echo '$(srcdir)/'`src/mpi/init/ismain.c + +src/mpi/init/lib_libpmpi_la-finalize.lo: src/mpi/init/finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-finalize.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalize.Tpo -c -o src/mpi/init/lib_libpmpi_la-finalize.lo `test -f 'src/mpi/init/finalize.c' || echo '$(srcdir)/'`src/mpi/init/finalize.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalize.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalize.Plo +# $(AM_V_CC)source='src/mpi/init/finalize.c' object='src/mpi/init/lib_libpmpi_la-finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-finalize.lo `test -f 'src/mpi/init/finalize.c' || echo '$(srcdir)/'`src/mpi/init/finalize.c + +src/mpi/init/lib_libpmpi_la-finalized.lo: src/mpi/init/finalized.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-finalized.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalized.Tpo -c -o src/mpi/init/lib_libpmpi_la-finalized.lo `test -f 'src/mpi/init/finalized.c' || echo '$(srcdir)/'`src/mpi/init/finalized.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalized.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalized.Plo +# $(AM_V_CC)source='src/mpi/init/finalized.c' object='src/mpi/init/lib_libpmpi_la-finalized.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-finalized.lo `test -f 'src/mpi/init/finalized.c' || echo '$(srcdir)/'`src/mpi/init/finalized.c + +src/mpi/init/lib_libpmpi_la-querythread.lo: src/mpi/init/querythread.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-querythread.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-querythread.Tpo -c -o src/mpi/init/lib_libpmpi_la-querythread.lo `test -f 'src/mpi/init/querythread.c' || echo '$(srcdir)/'`src/mpi/init/querythread.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-querythread.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-querythread.Plo +# $(AM_V_CC)source='src/mpi/init/querythread.c' object='src/mpi/init/lib_libpmpi_la-querythread.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-querythread.lo `test -f 'src/mpi/init/querythread.c' || echo '$(srcdir)/'`src/mpi/init/querythread.c + +src/mpi/misc/lib_libpmpi_la-getpname.lo: src/mpi/misc/getpname.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libpmpi_la-getpname.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-getpname.Tpo -c -o src/mpi/misc/lib_libpmpi_la-getpname.lo `test -f 'src/mpi/misc/getpname.c' || echo '$(srcdir)/'`src/mpi/misc/getpname.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-getpname.Tpo src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-getpname.Plo +# $(AM_V_CC)source='src/mpi/misc/getpname.c' object='src/mpi/misc/lib_libpmpi_la-getpname.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libpmpi_la-getpname.lo `test -f 'src/mpi/misc/getpname.c' || echo '$(srcdir)/'`src/mpi/misc/getpname.c + +src/mpi/misc/lib_libpmpi_la-pcontrol.lo: src/mpi/misc/pcontrol.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libpmpi_la-pcontrol.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-pcontrol.Tpo -c -o src/mpi/misc/lib_libpmpi_la-pcontrol.lo `test -f 'src/mpi/misc/pcontrol.c' || echo '$(srcdir)/'`src/mpi/misc/pcontrol.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-pcontrol.Tpo src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-pcontrol.Plo +# $(AM_V_CC)source='src/mpi/misc/pcontrol.c' object='src/mpi/misc/lib_libpmpi_la-pcontrol.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libpmpi_la-pcontrol.lo `test -f 'src/mpi/misc/pcontrol.c' || echo '$(srcdir)/'`src/mpi/misc/pcontrol.c + +src/mpi/misc/lib_libpmpi_la-version.lo: src/mpi/misc/version.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libpmpi_la-version.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-version.Tpo -c -o src/mpi/misc/lib_libpmpi_la-version.lo `test -f 'src/mpi/misc/version.c' || echo '$(srcdir)/'`src/mpi/misc/version.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-version.Tpo src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-version.Plo +# $(AM_V_CC)source='src/mpi/misc/version.c' object='src/mpi/misc/lib_libpmpi_la-version.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libpmpi_la-version.lo `test -f 'src/mpi/misc/version.c' || echo '$(srcdir)/'`src/mpi/misc/version.c + +src/mpi/misc/lib_libpmpi_la-library_version.lo: src/mpi/misc/library_version.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libpmpi_la-library_version.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-library_version.Tpo -c -o src/mpi/misc/lib_libpmpi_la-library_version.lo `test -f 'src/mpi/misc/library_version.c' || echo '$(srcdir)/'`src/mpi/misc/library_version.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-library_version.Tpo src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-library_version.Plo +# $(AM_V_CC)source='src/mpi/misc/library_version.c' object='src/mpi/misc/lib_libpmpi_la-library_version.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libpmpi_la-library_version.lo `test -f 'src/mpi/misc/library_version.c' || echo '$(srcdir)/'`src/mpi/misc/library_version.c + +src/mpi/misc/lib_libpmpi_la-aint_add.lo: src/mpi/misc/aint_add.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libpmpi_la-aint_add.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_add.Tpo -c -o src/mpi/misc/lib_libpmpi_la-aint_add.lo `test -f 'src/mpi/misc/aint_add.c' || echo '$(srcdir)/'`src/mpi/misc/aint_add.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_add.Tpo src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_add.Plo +# $(AM_V_CC)source='src/mpi/misc/aint_add.c' object='src/mpi/misc/lib_libpmpi_la-aint_add.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libpmpi_la-aint_add.lo `test -f 'src/mpi/misc/aint_add.c' || echo '$(srcdir)/'`src/mpi/misc/aint_add.c + +src/mpi/misc/lib_libpmpi_la-aint_diff.lo: src/mpi/misc/aint_diff.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libpmpi_la-aint_diff.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_diff.Tpo -c -o src/mpi/misc/lib_libpmpi_la-aint_diff.lo `test -f 'src/mpi/misc/aint_diff.c' || echo '$(srcdir)/'`src/mpi/misc/aint_diff.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_diff.Tpo src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_diff.Plo +# $(AM_V_CC)source='src/mpi/misc/aint_diff.c' object='src/mpi/misc/lib_libpmpi_la-aint_diff.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libpmpi_la-aint_diff.lo `test -f 'src/mpi/misc/aint_diff.c' || echo '$(srcdir)/'`src/mpi/misc/aint_diff.c + +src/mpi/misc/lib_libpmpi_la-utils.lo: src/mpi/misc/utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/misc/lib_libpmpi_la-utils.lo -MD -MP -MF src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-utils.Tpo -c -o src/mpi/misc/lib_libpmpi_la-utils.lo `test -f 'src/mpi/misc/utils.c' || echo '$(srcdir)/'`src/mpi/misc/utils.c + $(AM_V_at)$(am__mv) src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-utils.Tpo src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-utils.Plo +# $(AM_V_CC)source='src/mpi/misc/utils.c' object='src/mpi/misc/lib_libpmpi_la-utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/misc/lib_libpmpi_la-utils.lo `test -f 'src/mpi/misc/utils.c' || echo '$(srcdir)/'`src/mpi/misc/utils.c + +src/mpi/pt2pt/lib_libpmpi_la-bsend.lo: src/mpi/pt2pt/bsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-bsend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-bsend.lo `test -f 'src/mpi/pt2pt/bsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/bsend.c' object='src/mpi/pt2pt/lib_libpmpi_la-bsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-bsend.lo `test -f 'src/mpi/pt2pt/bsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsend.c + +src/mpi/pt2pt/lib_libpmpi_la-bsend_init.lo: src/mpi/pt2pt/bsend_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-bsend_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend_init.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-bsend_init.lo `test -f 'src/mpi/pt2pt/bsend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsend_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/bsend_init.c' object='src/mpi/pt2pt/lib_libpmpi_la-bsend_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-bsend_init.lo `test -f 'src/mpi/pt2pt/bsend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsend_init.c + +src/mpi/pt2pt/lib_libpmpi_la-bufattach.lo: src/mpi/pt2pt/bufattach.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-bufattach.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bufattach.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-bufattach.lo `test -f 'src/mpi/pt2pt/bufattach.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bufattach.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bufattach.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bufattach.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/bufattach.c' object='src/mpi/pt2pt/lib_libpmpi_la-bufattach.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-bufattach.lo `test -f 'src/mpi/pt2pt/bufattach.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bufattach.c + +src/mpi/pt2pt/lib_libpmpi_la-buffree.lo: src/mpi/pt2pt/buffree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-buffree.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-buffree.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-buffree.lo `test -f 'src/mpi/pt2pt/buffree.c' || echo '$(srcdir)/'`src/mpi/pt2pt/buffree.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-buffree.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-buffree.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/buffree.c' object='src/mpi/pt2pt/lib_libpmpi_la-buffree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-buffree.lo `test -f 'src/mpi/pt2pt/buffree.c' || echo '$(srcdir)/'`src/mpi/pt2pt/buffree.c + +src/mpi/pt2pt/lib_libpmpi_la-ibsend.lo: src/mpi/pt2pt/ibsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-ibsend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ibsend.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-ibsend.lo `test -f 'src/mpi/pt2pt/ibsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ibsend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ibsend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ibsend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/ibsend.c' object='src/mpi/pt2pt/lib_libpmpi_la-ibsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-ibsend.lo `test -f 'src/mpi/pt2pt/ibsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ibsend.c + +src/mpi/pt2pt/lib_libpmpi_la-improbe.lo: src/mpi/pt2pt/improbe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-improbe.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-improbe.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-improbe.lo `test -f 'src/mpi/pt2pt/improbe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/improbe.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-improbe.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-improbe.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/improbe.c' object='src/mpi/pt2pt/lib_libpmpi_la-improbe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-improbe.lo `test -f 'src/mpi/pt2pt/improbe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/improbe.c + +src/mpi/pt2pt/lib_libpmpi_la-imrecv.lo: src/mpi/pt2pt/imrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-imrecv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-imrecv.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-imrecv.lo `test -f 'src/mpi/pt2pt/imrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/imrecv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-imrecv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-imrecv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/imrecv.c' object='src/mpi/pt2pt/lib_libpmpi_la-imrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-imrecv.lo `test -f 'src/mpi/pt2pt/imrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/imrecv.c + +src/mpi/pt2pt/lib_libpmpi_la-iprobe.lo: src/mpi/pt2pt/iprobe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-iprobe.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-iprobe.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-iprobe.lo `test -f 'src/mpi/pt2pt/iprobe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/iprobe.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-iprobe.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-iprobe.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/iprobe.c' object='src/mpi/pt2pt/lib_libpmpi_la-iprobe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-iprobe.lo `test -f 'src/mpi/pt2pt/iprobe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/iprobe.c + +src/mpi/pt2pt/lib_libpmpi_la-irecv.lo: src/mpi/pt2pt/irecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-irecv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irecv.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-irecv.lo `test -f 'src/mpi/pt2pt/irecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/irecv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irecv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irecv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/irecv.c' object='src/mpi/pt2pt/lib_libpmpi_la-irecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-irecv.lo `test -f 'src/mpi/pt2pt/irecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/irecv.c + +src/mpi/pt2pt/lib_libpmpi_la-irsend.lo: src/mpi/pt2pt/irsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-irsend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irsend.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-irsend.lo `test -f 'src/mpi/pt2pt/irsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/irsend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irsend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irsend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/irsend.c' object='src/mpi/pt2pt/lib_libpmpi_la-irsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-irsend.lo `test -f 'src/mpi/pt2pt/irsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/irsend.c + +src/mpi/pt2pt/lib_libpmpi_la-isend.lo: src/mpi/pt2pt/isend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-isend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-isend.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-isend.lo `test -f 'src/mpi/pt2pt/isend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/isend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-isend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-isend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/isend.c' object='src/mpi/pt2pt/lib_libpmpi_la-isend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-isend.lo `test -f 'src/mpi/pt2pt/isend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/isend.c + +src/mpi/pt2pt/lib_libpmpi_la-issend.lo: src/mpi/pt2pt/issend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-issend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-issend.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-issend.lo `test -f 'src/mpi/pt2pt/issend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/issend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-issend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-issend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/issend.c' object='src/mpi/pt2pt/lib_libpmpi_la-issend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-issend.lo `test -f 'src/mpi/pt2pt/issend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/issend.c + +src/mpi/pt2pt/lib_libpmpi_la-mprobe.lo: src/mpi/pt2pt/mprobe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-mprobe.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mprobe.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-mprobe.lo `test -f 'src/mpi/pt2pt/mprobe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/mprobe.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mprobe.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mprobe.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/mprobe.c' object='src/mpi/pt2pt/lib_libpmpi_la-mprobe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-mprobe.lo `test -f 'src/mpi/pt2pt/mprobe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/mprobe.c + +src/mpi/pt2pt/lib_libpmpi_la-mrecv.lo: src/mpi/pt2pt/mrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-mrecv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mrecv.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-mrecv.lo `test -f 'src/mpi/pt2pt/mrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/mrecv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mrecv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mrecv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/mrecv.c' object='src/mpi/pt2pt/lib_libpmpi_la-mrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-mrecv.lo `test -f 'src/mpi/pt2pt/mrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/mrecv.c + +src/mpi/pt2pt/lib_libpmpi_la-probe.lo: src/mpi/pt2pt/probe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-probe.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-probe.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-probe.lo `test -f 'src/mpi/pt2pt/probe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/probe.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-probe.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-probe.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/probe.c' object='src/mpi/pt2pt/lib_libpmpi_la-probe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-probe.lo `test -f 'src/mpi/pt2pt/probe.c' || echo '$(srcdir)/'`src/mpi/pt2pt/probe.c + +src/mpi/pt2pt/lib_libpmpi_la-recv.lo: src/mpi/pt2pt/recv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-recv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-recv.lo `test -f 'src/mpi/pt2pt/recv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/recv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/recv.c' object='src/mpi/pt2pt/lib_libpmpi_la-recv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-recv.lo `test -f 'src/mpi/pt2pt/recv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/recv.c + +src/mpi/pt2pt/lib_libpmpi_la-recv_init.lo: src/mpi/pt2pt/recv_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-recv_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv_init.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-recv_init.lo `test -f 'src/mpi/pt2pt/recv_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/recv_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/recv_init.c' object='src/mpi/pt2pt/lib_libpmpi_la-recv_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-recv_init.lo `test -f 'src/mpi/pt2pt/recv_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/recv_init.c + +src/mpi/pt2pt/lib_libpmpi_la-rsend.lo: src/mpi/pt2pt/rsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-rsend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-rsend.lo `test -f 'src/mpi/pt2pt/rsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/rsend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/rsend.c' object='src/mpi/pt2pt/lib_libpmpi_la-rsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-rsend.lo `test -f 'src/mpi/pt2pt/rsend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/rsend.c + +src/mpi/pt2pt/lib_libpmpi_la-rsend_init.lo: src/mpi/pt2pt/rsend_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-rsend_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend_init.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-rsend_init.lo `test -f 'src/mpi/pt2pt/rsend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/rsend_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/rsend_init.c' object='src/mpi/pt2pt/lib_libpmpi_la-rsend_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-rsend_init.lo `test -f 'src/mpi/pt2pt/rsend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/rsend_init.c + +src/mpi/pt2pt/lib_libpmpi_la-send.lo: src/mpi/pt2pt/send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-send.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-send.lo `test -f 'src/mpi/pt2pt/send.c' || echo '$(srcdir)/'`src/mpi/pt2pt/send.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/send.c' object='src/mpi/pt2pt/lib_libpmpi_la-send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-send.lo `test -f 'src/mpi/pt2pt/send.c' || echo '$(srcdir)/'`src/mpi/pt2pt/send.c + +src/mpi/pt2pt/lib_libpmpi_la-send_init.lo: src/mpi/pt2pt/send_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-send_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send_init.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-send_init.lo `test -f 'src/mpi/pt2pt/send_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/send_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/send_init.c' object='src/mpi/pt2pt/lib_libpmpi_la-send_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-send_init.lo `test -f 'src/mpi/pt2pt/send_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/send_init.c + +src/mpi/pt2pt/lib_libpmpi_la-sendrecv.lo: src/mpi/pt2pt/sendrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-sendrecv.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-sendrecv.lo `test -f 'src/mpi/pt2pt/sendrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/sendrecv.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/sendrecv.c' object='src/mpi/pt2pt/lib_libpmpi_la-sendrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-sendrecv.lo `test -f 'src/mpi/pt2pt/sendrecv.c' || echo '$(srcdir)/'`src/mpi/pt2pt/sendrecv.c + +src/mpi/pt2pt/lib_libpmpi_la-sendrecv_rep.lo: src/mpi/pt2pt/sendrecv_rep.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-sendrecv_rep.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv_rep.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-sendrecv_rep.lo `test -f 'src/mpi/pt2pt/sendrecv_rep.c' || echo '$(srcdir)/'`src/mpi/pt2pt/sendrecv_rep.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv_rep.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv_rep.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/sendrecv_rep.c' object='src/mpi/pt2pt/lib_libpmpi_la-sendrecv_rep.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-sendrecv_rep.lo `test -f 'src/mpi/pt2pt/sendrecv_rep.c' || echo '$(srcdir)/'`src/mpi/pt2pt/sendrecv_rep.c + +src/mpi/pt2pt/lib_libpmpi_la-ssend.lo: src/mpi/pt2pt/ssend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-ssend.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-ssend.lo `test -f 'src/mpi/pt2pt/ssend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ssend.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/ssend.c' object='src/mpi/pt2pt/lib_libpmpi_la-ssend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-ssend.lo `test -f 'src/mpi/pt2pt/ssend.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ssend.c + +src/mpi/pt2pt/lib_libpmpi_la-ssend_init.lo: src/mpi/pt2pt/ssend_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-ssend_init.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend_init.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-ssend_init.lo `test -f 'src/mpi/pt2pt/ssend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ssend_init.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend_init.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend_init.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/ssend_init.c' object='src/mpi/pt2pt/lib_libpmpi_la-ssend_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-ssend_init.lo `test -f 'src/mpi/pt2pt/ssend_init.c' || echo '$(srcdir)/'`src/mpi/pt2pt/ssend_init.c + +src/mpi/request/lib_libpmpi_la-cancel.lo: src/mpi/request/cancel.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-cancel.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-cancel.Tpo -c -o src/mpi/request/lib_libpmpi_la-cancel.lo `test -f 'src/mpi/request/cancel.c' || echo '$(srcdir)/'`src/mpi/request/cancel.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-cancel.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-cancel.Plo +# $(AM_V_CC)source='src/mpi/request/cancel.c' object='src/mpi/request/lib_libpmpi_la-cancel.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-cancel.lo `test -f 'src/mpi/request/cancel.c' || echo '$(srcdir)/'`src/mpi/request/cancel.c + +src/mpi/request/lib_libpmpi_la-greq_start.lo: src/mpi/request/greq_start.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-greq_start.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_start.Tpo -c -o src/mpi/request/lib_libpmpi_la-greq_start.lo `test -f 'src/mpi/request/greq_start.c' || echo '$(srcdir)/'`src/mpi/request/greq_start.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_start.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_start.Plo +# $(AM_V_CC)source='src/mpi/request/greq_start.c' object='src/mpi/request/lib_libpmpi_la-greq_start.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-greq_start.lo `test -f 'src/mpi/request/greq_start.c' || echo '$(srcdir)/'`src/mpi/request/greq_start.c + +src/mpi/request/lib_libpmpi_la-greq_complete.lo: src/mpi/request/greq_complete.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-greq_complete.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_complete.Tpo -c -o src/mpi/request/lib_libpmpi_la-greq_complete.lo `test -f 'src/mpi/request/greq_complete.c' || echo '$(srcdir)/'`src/mpi/request/greq_complete.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_complete.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_complete.Plo +# $(AM_V_CC)source='src/mpi/request/greq_complete.c' object='src/mpi/request/lib_libpmpi_la-greq_complete.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-greq_complete.lo `test -f 'src/mpi/request/greq_complete.c' || echo '$(srcdir)/'`src/mpi/request/greq_complete.c + +src/mpi/request/lib_libpmpi_la-request_free.lo: src/mpi/request/request_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-request_free.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_free.Tpo -c -o src/mpi/request/lib_libpmpi_la-request_free.lo `test -f 'src/mpi/request/request_free.c' || echo '$(srcdir)/'`src/mpi/request/request_free.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_free.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_free.Plo +# $(AM_V_CC)source='src/mpi/request/request_free.c' object='src/mpi/request/lib_libpmpi_la-request_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-request_free.lo `test -f 'src/mpi/request/request_free.c' || echo '$(srcdir)/'`src/mpi/request/request_free.c + +src/mpi/request/lib_libpmpi_la-request_get_status.lo: src/mpi/request/request_get_status.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-request_get_status.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_get_status.Tpo -c -o src/mpi/request/lib_libpmpi_la-request_get_status.lo `test -f 'src/mpi/request/request_get_status.c' || echo '$(srcdir)/'`src/mpi/request/request_get_status.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_get_status.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_get_status.Plo +# $(AM_V_CC)source='src/mpi/request/request_get_status.c' object='src/mpi/request/lib_libpmpi_la-request_get_status.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-request_get_status.lo `test -f 'src/mpi/request/request_get_status.c' || echo '$(srcdir)/'`src/mpi/request/request_get_status.c + +src/mpi/request/lib_libpmpi_la-status_set_cancelled.lo: src/mpi/request/status_set_cancelled.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-status_set_cancelled.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-status_set_cancelled.Tpo -c -o src/mpi/request/lib_libpmpi_la-status_set_cancelled.lo `test -f 'src/mpi/request/status_set_cancelled.c' || echo '$(srcdir)/'`src/mpi/request/status_set_cancelled.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-status_set_cancelled.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-status_set_cancelled.Plo +# $(AM_V_CC)source='src/mpi/request/status_set_cancelled.c' object='src/mpi/request/lib_libpmpi_la-status_set_cancelled.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-status_set_cancelled.lo `test -f 'src/mpi/request/status_set_cancelled.c' || echo '$(srcdir)/'`src/mpi/request/status_set_cancelled.c + +src/mpi/request/lib_libpmpi_la-start.lo: src/mpi/request/start.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-start.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-start.Tpo -c -o src/mpi/request/lib_libpmpi_la-start.lo `test -f 'src/mpi/request/start.c' || echo '$(srcdir)/'`src/mpi/request/start.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-start.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-start.Plo +# $(AM_V_CC)source='src/mpi/request/start.c' object='src/mpi/request/lib_libpmpi_la-start.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-start.lo `test -f 'src/mpi/request/start.c' || echo '$(srcdir)/'`src/mpi/request/start.c + +src/mpi/request/lib_libpmpi_la-startall.lo: src/mpi/request/startall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-startall.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-startall.Tpo -c -o src/mpi/request/lib_libpmpi_la-startall.lo `test -f 'src/mpi/request/startall.c' || echo '$(srcdir)/'`src/mpi/request/startall.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-startall.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-startall.Plo +# $(AM_V_CC)source='src/mpi/request/startall.c' object='src/mpi/request/lib_libpmpi_la-startall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-startall.lo `test -f 'src/mpi/request/startall.c' || echo '$(srcdir)/'`src/mpi/request/startall.c + +src/mpi/request/lib_libpmpi_la-test.lo: src/mpi/request/test.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-test.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test.Tpo -c -o src/mpi/request/lib_libpmpi_la-test.lo `test -f 'src/mpi/request/test.c' || echo '$(srcdir)/'`src/mpi/request/test.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test.Plo +# $(AM_V_CC)source='src/mpi/request/test.c' object='src/mpi/request/lib_libpmpi_la-test.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-test.lo `test -f 'src/mpi/request/test.c' || echo '$(srcdir)/'`src/mpi/request/test.c + +src/mpi/request/lib_libpmpi_la-test_cancelled.lo: src/mpi/request/test_cancelled.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-test_cancelled.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test_cancelled.Tpo -c -o src/mpi/request/lib_libpmpi_la-test_cancelled.lo `test -f 'src/mpi/request/test_cancelled.c' || echo '$(srcdir)/'`src/mpi/request/test_cancelled.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test_cancelled.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test_cancelled.Plo +# $(AM_V_CC)source='src/mpi/request/test_cancelled.c' object='src/mpi/request/lib_libpmpi_la-test_cancelled.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-test_cancelled.lo `test -f 'src/mpi/request/test_cancelled.c' || echo '$(srcdir)/'`src/mpi/request/test_cancelled.c + +src/mpi/request/lib_libpmpi_la-testall.lo: src/mpi/request/testall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-testall.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testall.Tpo -c -o src/mpi/request/lib_libpmpi_la-testall.lo `test -f 'src/mpi/request/testall.c' || echo '$(srcdir)/'`src/mpi/request/testall.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testall.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testall.Plo +# $(AM_V_CC)source='src/mpi/request/testall.c' object='src/mpi/request/lib_libpmpi_la-testall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-testall.lo `test -f 'src/mpi/request/testall.c' || echo '$(srcdir)/'`src/mpi/request/testall.c + +src/mpi/request/lib_libpmpi_la-testany.lo: src/mpi/request/testany.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-testany.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testany.Tpo -c -o src/mpi/request/lib_libpmpi_la-testany.lo `test -f 'src/mpi/request/testany.c' || echo '$(srcdir)/'`src/mpi/request/testany.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testany.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testany.Plo +# $(AM_V_CC)source='src/mpi/request/testany.c' object='src/mpi/request/lib_libpmpi_la-testany.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-testany.lo `test -f 'src/mpi/request/testany.c' || echo '$(srcdir)/'`src/mpi/request/testany.c + +src/mpi/request/lib_libpmpi_la-testsome.lo: src/mpi/request/testsome.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-testsome.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testsome.Tpo -c -o src/mpi/request/lib_libpmpi_la-testsome.lo `test -f 'src/mpi/request/testsome.c' || echo '$(srcdir)/'`src/mpi/request/testsome.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testsome.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testsome.Plo +# $(AM_V_CC)source='src/mpi/request/testsome.c' object='src/mpi/request/lib_libpmpi_la-testsome.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-testsome.lo `test -f 'src/mpi/request/testsome.c' || echo '$(srcdir)/'`src/mpi/request/testsome.c + +src/mpi/request/lib_libpmpi_la-wait.lo: src/mpi/request/wait.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-wait.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-wait.Tpo -c -o src/mpi/request/lib_libpmpi_la-wait.lo `test -f 'src/mpi/request/wait.c' || echo '$(srcdir)/'`src/mpi/request/wait.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-wait.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-wait.Plo +# $(AM_V_CC)source='src/mpi/request/wait.c' object='src/mpi/request/lib_libpmpi_la-wait.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-wait.lo `test -f 'src/mpi/request/wait.c' || echo '$(srcdir)/'`src/mpi/request/wait.c + +src/mpi/request/lib_libpmpi_la-waitall.lo: src/mpi/request/waitall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-waitall.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitall.Tpo -c -o src/mpi/request/lib_libpmpi_la-waitall.lo `test -f 'src/mpi/request/waitall.c' || echo '$(srcdir)/'`src/mpi/request/waitall.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitall.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitall.Plo +# $(AM_V_CC)source='src/mpi/request/waitall.c' object='src/mpi/request/lib_libpmpi_la-waitall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-waitall.lo `test -f 'src/mpi/request/waitall.c' || echo '$(srcdir)/'`src/mpi/request/waitall.c + +src/mpi/request/lib_libpmpi_la-waitany.lo: src/mpi/request/waitany.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-waitany.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitany.Tpo -c -o src/mpi/request/lib_libpmpi_la-waitany.lo `test -f 'src/mpi/request/waitany.c' || echo '$(srcdir)/'`src/mpi/request/waitany.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitany.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitany.Plo +# $(AM_V_CC)source='src/mpi/request/waitany.c' object='src/mpi/request/lib_libpmpi_la-waitany.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-waitany.lo `test -f 'src/mpi/request/waitany.c' || echo '$(srcdir)/'`src/mpi/request/waitany.c + +src/mpi/request/lib_libpmpi_la-waitsome.lo: src/mpi/request/waitsome.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-waitsome.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitsome.Tpo -c -o src/mpi/request/lib_libpmpi_la-waitsome.lo `test -f 'src/mpi/request/waitsome.c' || echo '$(srcdir)/'`src/mpi/request/waitsome.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitsome.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitsome.Plo +# $(AM_V_CC)source='src/mpi/request/waitsome.c' object='src/mpi/request/lib_libpmpi_la-waitsome.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-waitsome.lo `test -f 'src/mpi/request/waitsome.c' || echo '$(srcdir)/'`src/mpi/request/waitsome.c + +src/mpi/rma/lib_libpmpi_la-accumulate.lo: src/mpi/rma/accumulate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-accumulate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-accumulate.Tpo -c -o src/mpi/rma/lib_libpmpi_la-accumulate.lo `test -f 'src/mpi/rma/accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/accumulate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-accumulate.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-accumulate.Plo +# $(AM_V_CC)source='src/mpi/rma/accumulate.c' object='src/mpi/rma/lib_libpmpi_la-accumulate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-accumulate.lo `test -f 'src/mpi/rma/accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/accumulate.c + +src/mpi/rma/lib_libpmpi_la-alloc_mem.lo: src/mpi/rma/alloc_mem.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-alloc_mem.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-alloc_mem.Tpo -c -o src/mpi/rma/lib_libpmpi_la-alloc_mem.lo `test -f 'src/mpi/rma/alloc_mem.c' || echo '$(srcdir)/'`src/mpi/rma/alloc_mem.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-alloc_mem.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-alloc_mem.Plo +# $(AM_V_CC)source='src/mpi/rma/alloc_mem.c' object='src/mpi/rma/lib_libpmpi_la-alloc_mem.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-alloc_mem.lo `test -f 'src/mpi/rma/alloc_mem.c' || echo '$(srcdir)/'`src/mpi/rma/alloc_mem.c + +src/mpi/rma/lib_libpmpi_la-compare_and_swap.lo: src/mpi/rma/compare_and_swap.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-compare_and_swap.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-compare_and_swap.Tpo -c -o src/mpi/rma/lib_libpmpi_la-compare_and_swap.lo `test -f 'src/mpi/rma/compare_and_swap.c' || echo '$(srcdir)/'`src/mpi/rma/compare_and_swap.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-compare_and_swap.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-compare_and_swap.Plo +# $(AM_V_CC)source='src/mpi/rma/compare_and_swap.c' object='src/mpi/rma/lib_libpmpi_la-compare_and_swap.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-compare_and_swap.lo `test -f 'src/mpi/rma/compare_and_swap.c' || echo '$(srcdir)/'`src/mpi/rma/compare_and_swap.c + +src/mpi/rma/lib_libpmpi_la-fetch_and_op.lo: src/mpi/rma/fetch_and_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-fetch_and_op.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-fetch_and_op.Tpo -c -o src/mpi/rma/lib_libpmpi_la-fetch_and_op.lo `test -f 'src/mpi/rma/fetch_and_op.c' || echo '$(srcdir)/'`src/mpi/rma/fetch_and_op.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-fetch_and_op.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-fetch_and_op.Plo +# $(AM_V_CC)source='src/mpi/rma/fetch_and_op.c' object='src/mpi/rma/lib_libpmpi_la-fetch_and_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-fetch_and_op.lo `test -f 'src/mpi/rma/fetch_and_op.c' || echo '$(srcdir)/'`src/mpi/rma/fetch_and_op.c + +src/mpi/rma/lib_libpmpi_la-free_mem.lo: src/mpi/rma/free_mem.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-free_mem.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-free_mem.Tpo -c -o src/mpi/rma/lib_libpmpi_la-free_mem.lo `test -f 'src/mpi/rma/free_mem.c' || echo '$(srcdir)/'`src/mpi/rma/free_mem.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-free_mem.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-free_mem.Plo +# $(AM_V_CC)source='src/mpi/rma/free_mem.c' object='src/mpi/rma/lib_libpmpi_la-free_mem.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-free_mem.lo `test -f 'src/mpi/rma/free_mem.c' || echo '$(srcdir)/'`src/mpi/rma/free_mem.c + +src/mpi/rma/lib_libpmpi_la-get.lo: src/mpi/rma/get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-get.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get.Tpo -c -o src/mpi/rma/lib_libpmpi_la-get.lo `test -f 'src/mpi/rma/get.c' || echo '$(srcdir)/'`src/mpi/rma/get.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get.Plo +# $(AM_V_CC)source='src/mpi/rma/get.c' object='src/mpi/rma/lib_libpmpi_la-get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-get.lo `test -f 'src/mpi/rma/get.c' || echo '$(srcdir)/'`src/mpi/rma/get.c + +src/mpi/rma/lib_libpmpi_la-get_accumulate.lo: src/mpi/rma/get_accumulate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-get_accumulate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get_accumulate.Tpo -c -o src/mpi/rma/lib_libpmpi_la-get_accumulate.lo `test -f 'src/mpi/rma/get_accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/get_accumulate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get_accumulate.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get_accumulate.Plo +# $(AM_V_CC)source='src/mpi/rma/get_accumulate.c' object='src/mpi/rma/lib_libpmpi_la-get_accumulate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-get_accumulate.lo `test -f 'src/mpi/rma/get_accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/get_accumulate.c + +src/mpi/rma/lib_libpmpi_la-put.lo: src/mpi/rma/put.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-put.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-put.Tpo -c -o src/mpi/rma/lib_libpmpi_la-put.lo `test -f 'src/mpi/rma/put.c' || echo '$(srcdir)/'`src/mpi/rma/put.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-put.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-put.Plo +# $(AM_V_CC)source='src/mpi/rma/put.c' object='src/mpi/rma/lib_libpmpi_la-put.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-put.lo `test -f 'src/mpi/rma/put.c' || echo '$(srcdir)/'`src/mpi/rma/put.c + +src/mpi/rma/lib_libpmpi_la-raccumulate.lo: src/mpi/rma/raccumulate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-raccumulate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-raccumulate.Tpo -c -o src/mpi/rma/lib_libpmpi_la-raccumulate.lo `test -f 'src/mpi/rma/raccumulate.c' || echo '$(srcdir)/'`src/mpi/rma/raccumulate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-raccumulate.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-raccumulate.Plo +# $(AM_V_CC)source='src/mpi/rma/raccumulate.c' object='src/mpi/rma/lib_libpmpi_la-raccumulate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-raccumulate.lo `test -f 'src/mpi/rma/raccumulate.c' || echo '$(srcdir)/'`src/mpi/rma/raccumulate.c + +src/mpi/rma/lib_libpmpi_la-rget.lo: src/mpi/rma/rget.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-rget.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget.Tpo -c -o src/mpi/rma/lib_libpmpi_la-rget.lo `test -f 'src/mpi/rma/rget.c' || echo '$(srcdir)/'`src/mpi/rma/rget.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget.Plo +# $(AM_V_CC)source='src/mpi/rma/rget.c' object='src/mpi/rma/lib_libpmpi_la-rget.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-rget.lo `test -f 'src/mpi/rma/rget.c' || echo '$(srcdir)/'`src/mpi/rma/rget.c + +src/mpi/rma/lib_libpmpi_la-rget_accumulate.lo: src/mpi/rma/rget_accumulate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-rget_accumulate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget_accumulate.Tpo -c -o src/mpi/rma/lib_libpmpi_la-rget_accumulate.lo `test -f 'src/mpi/rma/rget_accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/rget_accumulate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget_accumulate.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget_accumulate.Plo +# $(AM_V_CC)source='src/mpi/rma/rget_accumulate.c' object='src/mpi/rma/lib_libpmpi_la-rget_accumulate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-rget_accumulate.lo `test -f 'src/mpi/rma/rget_accumulate.c' || echo '$(srcdir)/'`src/mpi/rma/rget_accumulate.c + +src/mpi/rma/lib_libpmpi_la-rput.lo: src/mpi/rma/rput.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-rput.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rput.Tpo -c -o src/mpi/rma/lib_libpmpi_la-rput.lo `test -f 'src/mpi/rma/rput.c' || echo '$(srcdir)/'`src/mpi/rma/rput.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rput.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rput.Plo +# $(AM_V_CC)source='src/mpi/rma/rput.c' object='src/mpi/rma/lib_libpmpi_la-rput.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-rput.lo `test -f 'src/mpi/rma/rput.c' || echo '$(srcdir)/'`src/mpi/rma/rput.c + +src/mpi/rma/lib_libpmpi_la-win_allocate.lo: src/mpi/rma/win_allocate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_allocate.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_allocate.lo `test -f 'src/mpi/rma/win_allocate.c' || echo '$(srcdir)/'`src/mpi/rma/win_allocate.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate.Plo +# $(AM_V_CC)source='src/mpi/rma/win_allocate.c' object='src/mpi/rma/lib_libpmpi_la-win_allocate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_allocate.lo `test -f 'src/mpi/rma/win_allocate.c' || echo '$(srcdir)/'`src/mpi/rma/win_allocate.c + +src/mpi/rma/lib_libpmpi_la-win_allocate_shared.lo: src/mpi/rma/win_allocate_shared.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_allocate_shared.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate_shared.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_allocate_shared.lo `test -f 'src/mpi/rma/win_allocate_shared.c' || echo '$(srcdir)/'`src/mpi/rma/win_allocate_shared.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate_shared.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate_shared.Plo +# $(AM_V_CC)source='src/mpi/rma/win_allocate_shared.c' object='src/mpi/rma/lib_libpmpi_la-win_allocate_shared.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_allocate_shared.lo `test -f 'src/mpi/rma/win_allocate_shared.c' || echo '$(srcdir)/'`src/mpi/rma/win_allocate_shared.c + +src/mpi/rma/lib_libpmpi_la-win_attach.lo: src/mpi/rma/win_attach.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_attach.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_attach.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_attach.lo `test -f 'src/mpi/rma/win_attach.c' || echo '$(srcdir)/'`src/mpi/rma/win_attach.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_attach.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_attach.Plo +# $(AM_V_CC)source='src/mpi/rma/win_attach.c' object='src/mpi/rma/lib_libpmpi_la-win_attach.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_attach.lo `test -f 'src/mpi/rma/win_attach.c' || echo '$(srcdir)/'`src/mpi/rma/win_attach.c + +src/mpi/rma/lib_libpmpi_la-win_complete.lo: src/mpi/rma/win_complete.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_complete.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_complete.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_complete.lo `test -f 'src/mpi/rma/win_complete.c' || echo '$(srcdir)/'`src/mpi/rma/win_complete.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_complete.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_complete.Plo +# $(AM_V_CC)source='src/mpi/rma/win_complete.c' object='src/mpi/rma/lib_libpmpi_la-win_complete.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_complete.lo `test -f 'src/mpi/rma/win_complete.c' || echo '$(srcdir)/'`src/mpi/rma/win_complete.c + +src/mpi/rma/lib_libpmpi_la-win_create.lo: src/mpi/rma/win_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_create.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_create.lo `test -f 'src/mpi/rma/win_create.c' || echo '$(srcdir)/'`src/mpi/rma/win_create.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create.Plo +# $(AM_V_CC)source='src/mpi/rma/win_create.c' object='src/mpi/rma/lib_libpmpi_la-win_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_create.lo `test -f 'src/mpi/rma/win_create.c' || echo '$(srcdir)/'`src/mpi/rma/win_create.c + +src/mpi/rma/lib_libpmpi_la-win_create_dynamic.lo: src/mpi/rma/win_create_dynamic.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_create_dynamic.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create_dynamic.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_create_dynamic.lo `test -f 'src/mpi/rma/win_create_dynamic.c' || echo '$(srcdir)/'`src/mpi/rma/win_create_dynamic.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create_dynamic.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create_dynamic.Plo +# $(AM_V_CC)source='src/mpi/rma/win_create_dynamic.c' object='src/mpi/rma/lib_libpmpi_la-win_create_dynamic.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_create_dynamic.lo `test -f 'src/mpi/rma/win_create_dynamic.c' || echo '$(srcdir)/'`src/mpi/rma/win_create_dynamic.c + +src/mpi/rma/lib_libpmpi_la-win_detach.lo: src/mpi/rma/win_detach.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_detach.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_detach.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_detach.lo `test -f 'src/mpi/rma/win_detach.c' || echo '$(srcdir)/'`src/mpi/rma/win_detach.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_detach.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_detach.Plo +# $(AM_V_CC)source='src/mpi/rma/win_detach.c' object='src/mpi/rma/lib_libpmpi_la-win_detach.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_detach.lo `test -f 'src/mpi/rma/win_detach.c' || echo '$(srcdir)/'`src/mpi/rma/win_detach.c + +src/mpi/rma/lib_libpmpi_la-win_fence.lo: src/mpi/rma/win_fence.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_fence.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_fence.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_fence.lo `test -f 'src/mpi/rma/win_fence.c' || echo '$(srcdir)/'`src/mpi/rma/win_fence.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_fence.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_fence.Plo +# $(AM_V_CC)source='src/mpi/rma/win_fence.c' object='src/mpi/rma/lib_libpmpi_la-win_fence.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_fence.lo `test -f 'src/mpi/rma/win_fence.c' || echo '$(srcdir)/'`src/mpi/rma/win_fence.c + +src/mpi/rma/lib_libpmpi_la-win_flush.lo: src/mpi/rma/win_flush.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_flush.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_flush.lo `test -f 'src/mpi/rma/win_flush.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush.Plo +# $(AM_V_CC)source='src/mpi/rma/win_flush.c' object='src/mpi/rma/lib_libpmpi_la-win_flush.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_flush.lo `test -f 'src/mpi/rma/win_flush.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush.c + +src/mpi/rma/lib_libpmpi_la-win_flush_all.lo: src/mpi/rma/win_flush_all.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_flush_all.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_all.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_flush_all.lo `test -f 'src/mpi/rma/win_flush_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_all.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_all.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_all.Plo +# $(AM_V_CC)source='src/mpi/rma/win_flush_all.c' object='src/mpi/rma/lib_libpmpi_la-win_flush_all.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_flush_all.lo `test -f 'src/mpi/rma/win_flush_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_all.c + +src/mpi/rma/lib_libpmpi_la-win_flush_local.lo: src/mpi/rma/win_flush_local.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_flush_local.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_flush_local.lo `test -f 'src/mpi/rma/win_flush_local.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_local.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local.Plo +# $(AM_V_CC)source='src/mpi/rma/win_flush_local.c' object='src/mpi/rma/lib_libpmpi_la-win_flush_local.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_flush_local.lo `test -f 'src/mpi/rma/win_flush_local.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_local.c + +src/mpi/rma/lib_libpmpi_la-win_flush_local_all.lo: src/mpi/rma/win_flush_local_all.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_flush_local_all.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local_all.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_flush_local_all.lo `test -f 'src/mpi/rma/win_flush_local_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_local_all.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local_all.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local_all.Plo +# $(AM_V_CC)source='src/mpi/rma/win_flush_local_all.c' object='src/mpi/rma/lib_libpmpi_la-win_flush_local_all.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_flush_local_all.lo `test -f 'src/mpi/rma/win_flush_local_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_flush_local_all.c + +src/mpi/rma/lib_libpmpi_la-win_free.lo: src/mpi/rma/win_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_free.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_free.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_free.lo `test -f 'src/mpi/rma/win_free.c' || echo '$(srcdir)/'`src/mpi/rma/win_free.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_free.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_free.Plo +# $(AM_V_CC)source='src/mpi/rma/win_free.c' object='src/mpi/rma/lib_libpmpi_la-win_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_free.lo `test -f 'src/mpi/rma/win_free.c' || echo '$(srcdir)/'`src/mpi/rma/win_free.c + +src/mpi/rma/lib_libpmpi_la-win_get_group.lo: src/mpi/rma/win_get_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_get_group.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_group.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_get_group.lo `test -f 'src/mpi/rma/win_get_group.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_group.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_group.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_group.Plo +# $(AM_V_CC)source='src/mpi/rma/win_get_group.c' object='src/mpi/rma/lib_libpmpi_la-win_get_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_get_group.lo `test -f 'src/mpi/rma/win_get_group.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_group.c + +src/mpi/rma/lib_libpmpi_la-win_get_info.lo: src/mpi/rma/win_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_get_info.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_info.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_get_info.lo `test -f 'src/mpi/rma/win_get_info.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_info.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_info.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_info.Plo +# $(AM_V_CC)source='src/mpi/rma/win_get_info.c' object='src/mpi/rma/lib_libpmpi_la-win_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_get_info.lo `test -f 'src/mpi/rma/win_get_info.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_info.c + +src/mpi/rma/lib_libpmpi_la-win_get_name.lo: src/mpi/rma/win_get_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_get_name.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_name.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_get_name.lo `test -f 'src/mpi/rma/win_get_name.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_name.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_name.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_name.Plo +# $(AM_V_CC)source='src/mpi/rma/win_get_name.c' object='src/mpi/rma/lib_libpmpi_la-win_get_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_get_name.lo `test -f 'src/mpi/rma/win_get_name.c' || echo '$(srcdir)/'`src/mpi/rma/win_get_name.c + +src/mpi/rma/lib_libpmpi_la-win_lock.lo: src/mpi/rma/win_lock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_lock.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_lock.lo `test -f 'src/mpi/rma/win_lock.c' || echo '$(srcdir)/'`src/mpi/rma/win_lock.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock.Plo +# $(AM_V_CC)source='src/mpi/rma/win_lock.c' object='src/mpi/rma/lib_libpmpi_la-win_lock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_lock.lo `test -f 'src/mpi/rma/win_lock.c' || echo '$(srcdir)/'`src/mpi/rma/win_lock.c + +src/mpi/rma/lib_libpmpi_la-win_lock_all.lo: src/mpi/rma/win_lock_all.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_lock_all.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock_all.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_lock_all.lo `test -f 'src/mpi/rma/win_lock_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_lock_all.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock_all.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock_all.Plo +# $(AM_V_CC)source='src/mpi/rma/win_lock_all.c' object='src/mpi/rma/lib_libpmpi_la-win_lock_all.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_lock_all.lo `test -f 'src/mpi/rma/win_lock_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_lock_all.c + +src/mpi/rma/lib_libpmpi_la-win_post.lo: src/mpi/rma/win_post.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_post.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_post.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_post.lo `test -f 'src/mpi/rma/win_post.c' || echo '$(srcdir)/'`src/mpi/rma/win_post.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_post.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_post.Plo +# $(AM_V_CC)source='src/mpi/rma/win_post.c' object='src/mpi/rma/lib_libpmpi_la-win_post.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_post.lo `test -f 'src/mpi/rma/win_post.c' || echo '$(srcdir)/'`src/mpi/rma/win_post.c + +src/mpi/rma/lib_libpmpi_la-win_set_info.lo: src/mpi/rma/win_set_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_set_info.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_info.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_set_info.lo `test -f 'src/mpi/rma/win_set_info.c' || echo '$(srcdir)/'`src/mpi/rma/win_set_info.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_info.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_info.Plo +# $(AM_V_CC)source='src/mpi/rma/win_set_info.c' object='src/mpi/rma/lib_libpmpi_la-win_set_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_set_info.lo `test -f 'src/mpi/rma/win_set_info.c' || echo '$(srcdir)/'`src/mpi/rma/win_set_info.c + +src/mpi/rma/lib_libpmpi_la-win_set_name.lo: src/mpi/rma/win_set_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_set_name.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_name.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_set_name.lo `test -f 'src/mpi/rma/win_set_name.c' || echo '$(srcdir)/'`src/mpi/rma/win_set_name.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_name.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_name.Plo +# $(AM_V_CC)source='src/mpi/rma/win_set_name.c' object='src/mpi/rma/lib_libpmpi_la-win_set_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_set_name.lo `test -f 'src/mpi/rma/win_set_name.c' || echo '$(srcdir)/'`src/mpi/rma/win_set_name.c + +src/mpi/rma/lib_libpmpi_la-win_shared_query.lo: src/mpi/rma/win_shared_query.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_shared_query.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_shared_query.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_shared_query.lo `test -f 'src/mpi/rma/win_shared_query.c' || echo '$(srcdir)/'`src/mpi/rma/win_shared_query.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_shared_query.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_shared_query.Plo +# $(AM_V_CC)source='src/mpi/rma/win_shared_query.c' object='src/mpi/rma/lib_libpmpi_la-win_shared_query.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_shared_query.lo `test -f 'src/mpi/rma/win_shared_query.c' || echo '$(srcdir)/'`src/mpi/rma/win_shared_query.c + +src/mpi/rma/lib_libpmpi_la-win_start.lo: src/mpi/rma/win_start.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_start.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_start.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_start.lo `test -f 'src/mpi/rma/win_start.c' || echo '$(srcdir)/'`src/mpi/rma/win_start.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_start.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_start.Plo +# $(AM_V_CC)source='src/mpi/rma/win_start.c' object='src/mpi/rma/lib_libpmpi_la-win_start.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_start.lo `test -f 'src/mpi/rma/win_start.c' || echo '$(srcdir)/'`src/mpi/rma/win_start.c + +src/mpi/rma/lib_libpmpi_la-win_sync.lo: src/mpi/rma/win_sync.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_sync.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_sync.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_sync.lo `test -f 'src/mpi/rma/win_sync.c' || echo '$(srcdir)/'`src/mpi/rma/win_sync.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_sync.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_sync.Plo +# $(AM_V_CC)source='src/mpi/rma/win_sync.c' object='src/mpi/rma/lib_libpmpi_la-win_sync.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_sync.lo `test -f 'src/mpi/rma/win_sync.c' || echo '$(srcdir)/'`src/mpi/rma/win_sync.c + +src/mpi/rma/lib_libpmpi_la-win_test.lo: src/mpi/rma/win_test.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_test.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_test.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_test.lo `test -f 'src/mpi/rma/win_test.c' || echo '$(srcdir)/'`src/mpi/rma/win_test.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_test.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_test.Plo +# $(AM_V_CC)source='src/mpi/rma/win_test.c' object='src/mpi/rma/lib_libpmpi_la-win_test.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_test.lo `test -f 'src/mpi/rma/win_test.c' || echo '$(srcdir)/'`src/mpi/rma/win_test.c + +src/mpi/rma/lib_libpmpi_la-win_unlock.lo: src/mpi/rma/win_unlock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_unlock.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_unlock.lo `test -f 'src/mpi/rma/win_unlock.c' || echo '$(srcdir)/'`src/mpi/rma/win_unlock.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock.Plo +# $(AM_V_CC)source='src/mpi/rma/win_unlock.c' object='src/mpi/rma/lib_libpmpi_la-win_unlock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_unlock.lo `test -f 'src/mpi/rma/win_unlock.c' || echo '$(srcdir)/'`src/mpi/rma/win_unlock.c + +src/mpi/rma/lib_libpmpi_la-win_unlock_all.lo: src/mpi/rma/win_unlock_all.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_unlock_all.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock_all.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_unlock_all.lo `test -f 'src/mpi/rma/win_unlock_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_unlock_all.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock_all.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock_all.Plo +# $(AM_V_CC)source='src/mpi/rma/win_unlock_all.c' object='src/mpi/rma/lib_libpmpi_la-win_unlock_all.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_unlock_all.lo `test -f 'src/mpi/rma/win_unlock_all.c' || echo '$(srcdir)/'`src/mpi/rma/win_unlock_all.c + +src/mpi/rma/lib_libpmpi_la-win_wait.lo: src/mpi/rma/win_wait.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-win_wait.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_wait.Tpo -c -o src/mpi/rma/lib_libpmpi_la-win_wait.lo `test -f 'src/mpi/rma/win_wait.c' || echo '$(srcdir)/'`src/mpi/rma/win_wait.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_wait.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_wait.Plo +# $(AM_V_CC)source='src/mpi/rma/win_wait.c' object='src/mpi/rma/lib_libpmpi_la-win_wait.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-win_wait.lo `test -f 'src/mpi/rma/win_wait.c' || echo '$(srcdir)/'`src/mpi/rma/win_wait.c + +src/mpi/spawn/lib_libpmpi_la-comm_disconnect.lo: src/mpi/spawn/comm_disconnect.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-comm_disconnect.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_disconnect.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-comm_disconnect.lo `test -f 'src/mpi/spawn/comm_disconnect.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_disconnect.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_disconnect.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_disconnect.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_disconnect.c' object='src/mpi/spawn/lib_libpmpi_la-comm_disconnect.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-comm_disconnect.lo `test -f 'src/mpi/spawn/comm_disconnect.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_disconnect.c + +src/mpi/spawn/lib_libpmpi_la-comm_get_parent.lo: src/mpi/spawn/comm_get_parent.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-comm_get_parent.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_get_parent.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-comm_get_parent.lo `test -f 'src/mpi/spawn/comm_get_parent.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_get_parent.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_get_parent.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_get_parent.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_get_parent.c' object='src/mpi/spawn/lib_libpmpi_la-comm_get_parent.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-comm_get_parent.lo `test -f 'src/mpi/spawn/comm_get_parent.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_get_parent.c + +src/mpi/spawn/lib_libpmpi_la-comm_join.lo: src/mpi/spawn/comm_join.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-comm_join.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_join.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-comm_join.lo `test -f 'src/mpi/spawn/comm_join.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_join.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_join.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_join.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_join.c' object='src/mpi/spawn/lib_libpmpi_la-comm_join.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-comm_join.lo `test -f 'src/mpi/spawn/comm_join.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_join.c + +src/mpi/spawn/lib_libpmpi_la-comm_spawn.lo: src/mpi/spawn/comm_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-comm_spawn.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-comm_spawn.lo `test -f 'src/mpi/spawn/comm_spawn.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_spawn.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_spawn.c' object='src/mpi/spawn/lib_libpmpi_la-comm_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-comm_spawn.lo `test -f 'src/mpi/spawn/comm_spawn.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_spawn.c + +src/mpi/spawn/lib_libpmpi_la-comm_spawn_multiple.lo: src/mpi/spawn/comm_spawn_multiple.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-comm_spawn_multiple.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn_multiple.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-comm_spawn_multiple.lo `test -f 'src/mpi/spawn/comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_spawn_multiple.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn_multiple.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn_multiple.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_spawn_multiple.c' object='src/mpi/spawn/lib_libpmpi_la-comm_spawn_multiple.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-comm_spawn_multiple.lo `test -f 'src/mpi/spawn/comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_spawn_multiple.c + +src/mpi/spawn/lib_libpmpi_la-lookup_name.lo: src/mpi/spawn/lookup_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-lookup_name.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-lookup_name.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-lookup_name.lo `test -f 'src/mpi/spawn/lookup_name.c' || echo '$(srcdir)/'`src/mpi/spawn/lookup_name.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-lookup_name.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-lookup_name.Plo +# $(AM_V_CC)source='src/mpi/spawn/lookup_name.c' object='src/mpi/spawn/lib_libpmpi_la-lookup_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-lookup_name.lo `test -f 'src/mpi/spawn/lookup_name.c' || echo '$(srcdir)/'`src/mpi/spawn/lookup_name.c + +src/mpi/spawn/lib_libpmpi_la-publish_name.lo: src/mpi/spawn/publish_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-publish_name.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-publish_name.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-publish_name.lo `test -f 'src/mpi/spawn/publish_name.c' || echo '$(srcdir)/'`src/mpi/spawn/publish_name.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-publish_name.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-publish_name.Plo +# $(AM_V_CC)source='src/mpi/spawn/publish_name.c' object='src/mpi/spawn/lib_libpmpi_la-publish_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-publish_name.lo `test -f 'src/mpi/spawn/publish_name.c' || echo '$(srcdir)/'`src/mpi/spawn/publish_name.c + +src/mpi/spawn/lib_libpmpi_la-unpublish_name.lo: src/mpi/spawn/unpublish_name.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-unpublish_name.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-unpublish_name.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-unpublish_name.lo `test -f 'src/mpi/spawn/unpublish_name.c' || echo '$(srcdir)/'`src/mpi/spawn/unpublish_name.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-unpublish_name.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-unpublish_name.Plo +# $(AM_V_CC)source='src/mpi/spawn/unpublish_name.c' object='src/mpi/spawn/lib_libpmpi_la-unpublish_name.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-unpublish_name.lo `test -f 'src/mpi/spawn/unpublish_name.c' || echo '$(srcdir)/'`src/mpi/spawn/unpublish_name.c + +src/mpi/spawn/lib_libpmpi_la-open_port.lo: src/mpi/spawn/open_port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-open_port.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-open_port.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-open_port.lo `test -f 'src/mpi/spawn/open_port.c' || echo '$(srcdir)/'`src/mpi/spawn/open_port.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-open_port.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-open_port.Plo +# $(AM_V_CC)source='src/mpi/spawn/open_port.c' object='src/mpi/spawn/lib_libpmpi_la-open_port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-open_port.lo `test -f 'src/mpi/spawn/open_port.c' || echo '$(srcdir)/'`src/mpi/spawn/open_port.c + +src/mpi/spawn/lib_libpmpi_la-close_port.lo: src/mpi/spawn/close_port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-close_port.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-close_port.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-close_port.lo `test -f 'src/mpi/spawn/close_port.c' || echo '$(srcdir)/'`src/mpi/spawn/close_port.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-close_port.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-close_port.Plo +# $(AM_V_CC)source='src/mpi/spawn/close_port.c' object='src/mpi/spawn/lib_libpmpi_la-close_port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-close_port.lo `test -f 'src/mpi/spawn/close_port.c' || echo '$(srcdir)/'`src/mpi/spawn/close_port.c + +src/mpi/spawn/lib_libpmpi_la-comm_connect.lo: src/mpi/spawn/comm_connect.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-comm_connect.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_connect.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-comm_connect.lo `test -f 'src/mpi/spawn/comm_connect.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_connect.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_connect.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_connect.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_connect.c' object='src/mpi/spawn/lib_libpmpi_la-comm_connect.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-comm_connect.lo `test -f 'src/mpi/spawn/comm_connect.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_connect.c + +src/mpi/spawn/lib_libpmpi_la-comm_accept.lo: src/mpi/spawn/comm_accept.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/spawn/lib_libpmpi_la-comm_accept.lo -MD -MP -MF src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_accept.Tpo -c -o src/mpi/spawn/lib_libpmpi_la-comm_accept.lo `test -f 'src/mpi/spawn/comm_accept.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_accept.c + $(AM_V_at)$(am__mv) src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_accept.Tpo src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_accept.Plo +# $(AM_V_CC)source='src/mpi/spawn/comm_accept.c' object='src/mpi/spawn/lib_libpmpi_la-comm_accept.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/spawn/lib_libpmpi_la-comm_accept.lo `test -f 'src/mpi/spawn/comm_accept.c' || echo '$(srcdir)/'`src/mpi/spawn/comm_accept.c + +src/mpi/timer/lib_libpmpi_la-wtime.lo: src/mpi/timer/wtime.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/timer/lib_libpmpi_la-wtime.lo -MD -MP -MF src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtime.Tpo -c -o src/mpi/timer/lib_libpmpi_la-wtime.lo `test -f 'src/mpi/timer/wtime.c' || echo '$(srcdir)/'`src/mpi/timer/wtime.c + $(AM_V_at)$(am__mv) src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtime.Tpo src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtime.Plo +# $(AM_V_CC)source='src/mpi/timer/wtime.c' object='src/mpi/timer/lib_libpmpi_la-wtime.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/timer/lib_libpmpi_la-wtime.lo `test -f 'src/mpi/timer/wtime.c' || echo '$(srcdir)/'`src/mpi/timer/wtime.c + +src/mpi/timer/lib_libpmpi_la-wtick.lo: src/mpi/timer/wtick.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/timer/lib_libpmpi_la-wtick.lo -MD -MP -MF src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtick.Tpo -c -o src/mpi/timer/lib_libpmpi_la-wtick.lo `test -f 'src/mpi/timer/wtick.c' || echo '$(srcdir)/'`src/mpi/timer/wtick.c + $(AM_V_at)$(am__mv) src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtick.Tpo src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtick.Plo +# $(AM_V_CC)source='src/mpi/timer/wtick.c' object='src/mpi/timer/lib_libpmpi_la-wtick.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/timer/lib_libpmpi_la-wtick.lo `test -f 'src/mpi/timer/wtick.c' || echo '$(srcdir)/'`src/mpi/timer/wtick.c + +src/mpi/topo/lib_libpmpi_la-cart_coords.lo: src/mpi/topo/cart_coords.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-cart_coords.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_coords.Tpo -c -o src/mpi/topo/lib_libpmpi_la-cart_coords.lo `test -f 'src/mpi/topo/cart_coords.c' || echo '$(srcdir)/'`src/mpi/topo/cart_coords.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_coords.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_coords.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_coords.c' object='src/mpi/topo/lib_libpmpi_la-cart_coords.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-cart_coords.lo `test -f 'src/mpi/topo/cart_coords.c' || echo '$(srcdir)/'`src/mpi/topo/cart_coords.c + +src/mpi/topo/lib_libpmpi_la-cart_create.lo: src/mpi/topo/cart_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-cart_create.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_create.Tpo -c -o src/mpi/topo/lib_libpmpi_la-cart_create.lo `test -f 'src/mpi/topo/cart_create.c' || echo '$(srcdir)/'`src/mpi/topo/cart_create.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_create.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_create.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_create.c' object='src/mpi/topo/lib_libpmpi_la-cart_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-cart_create.lo `test -f 'src/mpi/topo/cart_create.c' || echo '$(srcdir)/'`src/mpi/topo/cart_create.c + +src/mpi/topo/lib_libpmpi_la-cart_get.lo: src/mpi/topo/cart_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-cart_get.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_get.Tpo -c -o src/mpi/topo/lib_libpmpi_la-cart_get.lo `test -f 'src/mpi/topo/cart_get.c' || echo '$(srcdir)/'`src/mpi/topo/cart_get.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_get.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_get.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_get.c' object='src/mpi/topo/lib_libpmpi_la-cart_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-cart_get.lo `test -f 'src/mpi/topo/cart_get.c' || echo '$(srcdir)/'`src/mpi/topo/cart_get.c + +src/mpi/topo/lib_libpmpi_la-cart_map.lo: src/mpi/topo/cart_map.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-cart_map.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_map.Tpo -c -o src/mpi/topo/lib_libpmpi_la-cart_map.lo `test -f 'src/mpi/topo/cart_map.c' || echo '$(srcdir)/'`src/mpi/topo/cart_map.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_map.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_map.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_map.c' object='src/mpi/topo/lib_libpmpi_la-cart_map.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-cart_map.lo `test -f 'src/mpi/topo/cart_map.c' || echo '$(srcdir)/'`src/mpi/topo/cart_map.c + +src/mpi/topo/lib_libpmpi_la-cart_rank.lo: src/mpi/topo/cart_rank.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-cart_rank.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_rank.Tpo -c -o src/mpi/topo/lib_libpmpi_la-cart_rank.lo `test -f 'src/mpi/topo/cart_rank.c' || echo '$(srcdir)/'`src/mpi/topo/cart_rank.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_rank.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_rank.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_rank.c' object='src/mpi/topo/lib_libpmpi_la-cart_rank.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-cart_rank.lo `test -f 'src/mpi/topo/cart_rank.c' || echo '$(srcdir)/'`src/mpi/topo/cart_rank.c + +src/mpi/topo/lib_libpmpi_la-cart_shift.lo: src/mpi/topo/cart_shift.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-cart_shift.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_shift.Tpo -c -o src/mpi/topo/lib_libpmpi_la-cart_shift.lo `test -f 'src/mpi/topo/cart_shift.c' || echo '$(srcdir)/'`src/mpi/topo/cart_shift.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_shift.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_shift.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_shift.c' object='src/mpi/topo/lib_libpmpi_la-cart_shift.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-cart_shift.lo `test -f 'src/mpi/topo/cart_shift.c' || echo '$(srcdir)/'`src/mpi/topo/cart_shift.c + +src/mpi/topo/lib_libpmpi_la-cart_sub.lo: src/mpi/topo/cart_sub.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-cart_sub.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_sub.Tpo -c -o src/mpi/topo/lib_libpmpi_la-cart_sub.lo `test -f 'src/mpi/topo/cart_sub.c' || echo '$(srcdir)/'`src/mpi/topo/cart_sub.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_sub.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_sub.Plo +# $(AM_V_CC)source='src/mpi/topo/cart_sub.c' object='src/mpi/topo/lib_libpmpi_la-cart_sub.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-cart_sub.lo `test -f 'src/mpi/topo/cart_sub.c' || echo '$(srcdir)/'`src/mpi/topo/cart_sub.c + +src/mpi/topo/lib_libpmpi_la-dims_create.lo: src/mpi/topo/dims_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-dims_create.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dims_create.Tpo -c -o src/mpi/topo/lib_libpmpi_la-dims_create.lo `test -f 'src/mpi/topo/dims_create.c' || echo '$(srcdir)/'`src/mpi/topo/dims_create.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dims_create.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dims_create.Plo +# $(AM_V_CC)source='src/mpi/topo/dims_create.c' object='src/mpi/topo/lib_libpmpi_la-dims_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-dims_create.lo `test -f 'src/mpi/topo/dims_create.c' || echo '$(srcdir)/'`src/mpi/topo/dims_create.c + +src/mpi/topo/lib_libpmpi_la-graph_get.lo: src/mpi/topo/graph_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-graph_get.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_get.Tpo -c -o src/mpi/topo/lib_libpmpi_la-graph_get.lo `test -f 'src/mpi/topo/graph_get.c' || echo '$(srcdir)/'`src/mpi/topo/graph_get.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_get.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_get.Plo +# $(AM_V_CC)source='src/mpi/topo/graph_get.c' object='src/mpi/topo/lib_libpmpi_la-graph_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-graph_get.lo `test -f 'src/mpi/topo/graph_get.c' || echo '$(srcdir)/'`src/mpi/topo/graph_get.c + +src/mpi/topo/lib_libpmpi_la-graph_map.lo: src/mpi/topo/graph_map.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-graph_map.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_map.Tpo -c -o src/mpi/topo/lib_libpmpi_la-graph_map.lo `test -f 'src/mpi/topo/graph_map.c' || echo '$(srcdir)/'`src/mpi/topo/graph_map.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_map.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_map.Plo +# $(AM_V_CC)source='src/mpi/topo/graph_map.c' object='src/mpi/topo/lib_libpmpi_la-graph_map.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-graph_map.lo `test -f 'src/mpi/topo/graph_map.c' || echo '$(srcdir)/'`src/mpi/topo/graph_map.c + +src/mpi/topo/lib_libpmpi_la-graph_nbr.lo: src/mpi/topo/graph_nbr.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-graph_nbr.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_nbr.Tpo -c -o src/mpi/topo/lib_libpmpi_la-graph_nbr.lo `test -f 'src/mpi/topo/graph_nbr.c' || echo '$(srcdir)/'`src/mpi/topo/graph_nbr.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_nbr.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_nbr.Plo +# $(AM_V_CC)source='src/mpi/topo/graph_nbr.c' object='src/mpi/topo/lib_libpmpi_la-graph_nbr.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-graph_nbr.lo `test -f 'src/mpi/topo/graph_nbr.c' || echo '$(srcdir)/'`src/mpi/topo/graph_nbr.c + +src/mpi/topo/lib_libpmpi_la-graphcreate.lo: src/mpi/topo/graphcreate.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-graphcreate.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphcreate.Tpo -c -o src/mpi/topo/lib_libpmpi_la-graphcreate.lo `test -f 'src/mpi/topo/graphcreate.c' || echo '$(srcdir)/'`src/mpi/topo/graphcreate.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphcreate.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphcreate.Plo +# $(AM_V_CC)source='src/mpi/topo/graphcreate.c' object='src/mpi/topo/lib_libpmpi_la-graphcreate.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-graphcreate.lo `test -f 'src/mpi/topo/graphcreate.c' || echo '$(srcdir)/'`src/mpi/topo/graphcreate.c + +src/mpi/topo/lib_libpmpi_la-graphdimsget.lo: src/mpi/topo/graphdimsget.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-graphdimsget.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphdimsget.Tpo -c -o src/mpi/topo/lib_libpmpi_la-graphdimsget.lo `test -f 'src/mpi/topo/graphdimsget.c' || echo '$(srcdir)/'`src/mpi/topo/graphdimsget.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphdimsget.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphdimsget.Plo +# $(AM_V_CC)source='src/mpi/topo/graphdimsget.c' object='src/mpi/topo/lib_libpmpi_la-graphdimsget.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-graphdimsget.lo `test -f 'src/mpi/topo/graphdimsget.c' || echo '$(srcdir)/'`src/mpi/topo/graphdimsget.c + +src/mpi/topo/lib_libpmpi_la-graphnbrcnt.lo: src/mpi/topo/graphnbrcnt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-graphnbrcnt.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphnbrcnt.Tpo -c -o src/mpi/topo/lib_libpmpi_la-graphnbrcnt.lo `test -f 'src/mpi/topo/graphnbrcnt.c' || echo '$(srcdir)/'`src/mpi/topo/graphnbrcnt.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphnbrcnt.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphnbrcnt.Plo +# $(AM_V_CC)source='src/mpi/topo/graphnbrcnt.c' object='src/mpi/topo/lib_libpmpi_la-graphnbrcnt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-graphnbrcnt.lo `test -f 'src/mpi/topo/graphnbrcnt.c' || echo '$(srcdir)/'`src/mpi/topo/graphnbrcnt.c + +src/mpi/topo/lib_libpmpi_la-cartdim_get.lo: src/mpi/topo/cartdim_get.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-cartdim_get.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cartdim_get.Tpo -c -o src/mpi/topo/lib_libpmpi_la-cartdim_get.lo `test -f 'src/mpi/topo/cartdim_get.c' || echo '$(srcdir)/'`src/mpi/topo/cartdim_get.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cartdim_get.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cartdim_get.Plo +# $(AM_V_CC)source='src/mpi/topo/cartdim_get.c' object='src/mpi/topo/lib_libpmpi_la-cartdim_get.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-cartdim_get.lo `test -f 'src/mpi/topo/cartdim_get.c' || echo '$(srcdir)/'`src/mpi/topo/cartdim_get.c + +src/mpi/topo/lib_libpmpi_la-topo_test.lo: src/mpi/topo/topo_test.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-topo_test.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topo_test.Tpo -c -o src/mpi/topo/lib_libpmpi_la-topo_test.lo `test -f 'src/mpi/topo/topo_test.c' || echo '$(srcdir)/'`src/mpi/topo/topo_test.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topo_test.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topo_test.Plo +# $(AM_V_CC)source='src/mpi/topo/topo_test.c' object='src/mpi/topo/lib_libpmpi_la-topo_test.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-topo_test.lo `test -f 'src/mpi/topo/topo_test.c' || echo '$(srcdir)/'`src/mpi/topo/topo_test.c + +src/mpi/topo/lib_libpmpi_la-dist_gr_create_adj.lo: src/mpi/topo/dist_gr_create_adj.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-dist_gr_create_adj.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create_adj.Tpo -c -o src/mpi/topo/lib_libpmpi_la-dist_gr_create_adj.lo `test -f 'src/mpi/topo/dist_gr_create_adj.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_create_adj.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create_adj.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create_adj.Plo +# $(AM_V_CC)source='src/mpi/topo/dist_gr_create_adj.c' object='src/mpi/topo/lib_libpmpi_la-dist_gr_create_adj.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-dist_gr_create_adj.lo `test -f 'src/mpi/topo/dist_gr_create_adj.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_create_adj.c + +src/mpi/topo/lib_libpmpi_la-dist_gr_create.lo: src/mpi/topo/dist_gr_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-dist_gr_create.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create.Tpo -c -o src/mpi/topo/lib_libpmpi_la-dist_gr_create.lo `test -f 'src/mpi/topo/dist_gr_create.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_create.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create.Plo +# $(AM_V_CC)source='src/mpi/topo/dist_gr_create.c' object='src/mpi/topo/lib_libpmpi_la-dist_gr_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-dist_gr_create.lo `test -f 'src/mpi/topo/dist_gr_create.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_create.c + +src/mpi/topo/lib_libpmpi_la-dist_gr_neighb_count.lo: src/mpi/topo/dist_gr_neighb_count.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-dist_gr_neighb_count.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb_count.Tpo -c -o src/mpi/topo/lib_libpmpi_la-dist_gr_neighb_count.lo `test -f 'src/mpi/topo/dist_gr_neighb_count.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_neighb_count.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb_count.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb_count.Plo +# $(AM_V_CC)source='src/mpi/topo/dist_gr_neighb_count.c' object='src/mpi/topo/lib_libpmpi_la-dist_gr_neighb_count.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-dist_gr_neighb_count.lo `test -f 'src/mpi/topo/dist_gr_neighb_count.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_neighb_count.c + +src/mpi/topo/lib_libpmpi_la-dist_gr_neighb.lo: src/mpi/topo/dist_gr_neighb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-dist_gr_neighb.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb.Tpo -c -o src/mpi/topo/lib_libpmpi_la-dist_gr_neighb.lo `test -f 'src/mpi/topo/dist_gr_neighb.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_neighb.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb.Plo +# $(AM_V_CC)source='src/mpi/topo/dist_gr_neighb.c' object='src/mpi/topo/lib_libpmpi_la-dist_gr_neighb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-dist_gr_neighb.lo `test -f 'src/mpi/topo/dist_gr_neighb.c' || echo '$(srcdir)/'`src/mpi/topo/dist_gr_neighb.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-statusf2c.lo: src/binding/fortran/mpif_h/statusf2c.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-statusf2c.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusf2c.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-statusf2c.lo `test -f 'src/binding/fortran/mpif_h/statusf2c.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statusf2c.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusf2c.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusf2c.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/statusf2c.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-statusf2c.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-statusf2c.lo `test -f 'src/binding/fortran/mpif_h/statusf2c.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statusf2c.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-statusc2f.lo: src/binding/fortran/mpif_h/statusc2f.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-statusc2f.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusc2f.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-statusc2f.lo `test -f 'src/binding/fortran/mpif_h/statusc2f.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statusc2f.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusc2f.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusc2f.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/statusc2f.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-statusc2f.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-statusc2f.lo `test -f 'src/binding/fortran/mpif_h/statusc2f.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statusc2f.c + +src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_int.lo: src/binding/fortran/use_mpi/create_f90_int.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_int.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_int.Tpo -c -o src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_int.lo `test -f 'src/binding/fortran/use_mpi/create_f90_int.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_int.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_int.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_int.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/create_f90_int.c' object='src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_int.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_int.lo `test -f 'src/binding/fortran/use_mpi/create_f90_int.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_int.c + +src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_real.lo: src/binding/fortran/use_mpi/create_f90_real.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_real.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_real.Tpo -c -o src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_real.lo `test -f 'src/binding/fortran/use_mpi/create_f90_real.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_real.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_real.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_real.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/create_f90_real.c' object='src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_real.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_real.lo `test -f 'src/binding/fortran/use_mpi/create_f90_real.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_real.c + +src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_complex.lo: src/binding/fortran/use_mpi/create_f90_complex.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_complex.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_complex.Tpo -c -o src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_complex.lo `test -f 'src/binding/fortran/use_mpi/create_f90_complex.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_complex.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_complex.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_complex.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/create_f90_complex.c' object='src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_complex.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_complex.lo `test -f 'src/binding/fortran/use_mpi/create_f90_complex.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_complex.c + +src/glue/romio/lib_libpmpi_la-all_romio_symbols.lo: src/glue/romio/all_romio_symbols.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/glue/romio/lib_libpmpi_la-all_romio_symbols.lo -MD -MP -MF src/glue/romio/$(DEPDIR)/lib_libpmpi_la-all_romio_symbols.Tpo -c -o src/glue/romio/lib_libpmpi_la-all_romio_symbols.lo `test -f 'src/glue/romio/all_romio_symbols.c' || echo '$(srcdir)/'`src/glue/romio/all_romio_symbols.c + $(AM_V_at)$(am__mv) src/glue/romio/$(DEPDIR)/lib_libpmpi_la-all_romio_symbols.Tpo src/glue/romio/$(DEPDIR)/lib_libpmpi_la-all_romio_symbols.Plo +# $(AM_V_CC)source='src/glue/romio/all_romio_symbols.c' object='src/glue/romio/lib_libpmpi_la-all_romio_symbols.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/glue/romio/lib_libpmpi_la-all_romio_symbols.lo `test -f 'src/glue/romio/all_romio_symbols.c' || echo '$(srcdir)/'`src/glue/romio/all_romio_symbols.c + +src/mpi_t/lib_libpmpi_la-cat_changed.lo: src/mpi_t/cat_changed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cat_changed.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_changed.Tpo -c -o src/mpi_t/lib_libpmpi_la-cat_changed.lo `test -f 'src/mpi_t/cat_changed.c' || echo '$(srcdir)/'`src/mpi_t/cat_changed.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_changed.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_changed.Plo +# $(AM_V_CC)source='src/mpi_t/cat_changed.c' object='src/mpi_t/lib_libpmpi_la-cat_changed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cat_changed.lo `test -f 'src/mpi_t/cat_changed.c' || echo '$(srcdir)/'`src/mpi_t/cat_changed.c + +src/mpi_t/lib_libpmpi_la-cat_get_categories.lo: src/mpi_t/cat_get_categories.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cat_get_categories.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_categories.Tpo -c -o src/mpi_t/lib_libpmpi_la-cat_get_categories.lo `test -f 'src/mpi_t/cat_get_categories.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_categories.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_categories.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_categories.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_categories.c' object='src/mpi_t/lib_libpmpi_la-cat_get_categories.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cat_get_categories.lo `test -f 'src/mpi_t/cat_get_categories.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_categories.c + +src/mpi_t/lib_libpmpi_la-cat_get_cvars.lo: src/mpi_t/cat_get_cvars.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cat_get_cvars.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_cvars.Tpo -c -o src/mpi_t/lib_libpmpi_la-cat_get_cvars.lo `test -f 'src/mpi_t/cat_get_cvars.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_cvars.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_cvars.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_cvars.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_cvars.c' object='src/mpi_t/lib_libpmpi_la-cat_get_cvars.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cat_get_cvars.lo `test -f 'src/mpi_t/cat_get_cvars.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_cvars.c + +src/mpi_t/lib_libpmpi_la-cat_get_info.lo: src/mpi_t/cat_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cat_get_info.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_info.Tpo -c -o src/mpi_t/lib_libpmpi_la-cat_get_info.lo `test -f 'src/mpi_t/cat_get_info.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_info.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_info.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_info.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_info.c' object='src/mpi_t/lib_libpmpi_la-cat_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cat_get_info.lo `test -f 'src/mpi_t/cat_get_info.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_info.c + +src/mpi_t/lib_libpmpi_la-cat_get_num.lo: src/mpi_t/cat_get_num.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cat_get_num.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_num.Tpo -c -o src/mpi_t/lib_libpmpi_la-cat_get_num.lo `test -f 'src/mpi_t/cat_get_num.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_num.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_num.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_num.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_num.c' object='src/mpi_t/lib_libpmpi_la-cat_get_num.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cat_get_num.lo `test -f 'src/mpi_t/cat_get_num.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_num.c + +src/mpi_t/lib_libpmpi_la-cat_get_pvars.lo: src/mpi_t/cat_get_pvars.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cat_get_pvars.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_pvars.Tpo -c -o src/mpi_t/lib_libpmpi_la-cat_get_pvars.lo `test -f 'src/mpi_t/cat_get_pvars.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_pvars.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_pvars.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_pvars.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_pvars.c' object='src/mpi_t/lib_libpmpi_la-cat_get_pvars.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cat_get_pvars.lo `test -f 'src/mpi_t/cat_get_pvars.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_pvars.c + +src/mpi_t/lib_libpmpi_la-cvar_get_info.lo: src/mpi_t/cvar_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cvar_get_info.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_info.Tpo -c -o src/mpi_t/lib_libpmpi_la-cvar_get_info.lo `test -f 'src/mpi_t/cvar_get_info.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_info.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_info.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_info.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_get_info.c' object='src/mpi_t/lib_libpmpi_la-cvar_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cvar_get_info.lo `test -f 'src/mpi_t/cvar_get_info.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_info.c + +src/mpi_t/lib_libpmpi_la-cvar_get_num.lo: src/mpi_t/cvar_get_num.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cvar_get_num.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_num.Tpo -c -o src/mpi_t/lib_libpmpi_la-cvar_get_num.lo `test -f 'src/mpi_t/cvar_get_num.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_num.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_num.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_num.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_get_num.c' object='src/mpi_t/lib_libpmpi_la-cvar_get_num.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cvar_get_num.lo `test -f 'src/mpi_t/cvar_get_num.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_num.c + +src/mpi_t/lib_libpmpi_la-cvar_handle_alloc.lo: src/mpi_t/cvar_handle_alloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cvar_handle_alloc.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_alloc.Tpo -c -o src/mpi_t/lib_libpmpi_la-cvar_handle_alloc.lo `test -f 'src/mpi_t/cvar_handle_alloc.c' || echo '$(srcdir)/'`src/mpi_t/cvar_handle_alloc.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_alloc.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_alloc.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_handle_alloc.c' object='src/mpi_t/lib_libpmpi_la-cvar_handle_alloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cvar_handle_alloc.lo `test -f 'src/mpi_t/cvar_handle_alloc.c' || echo '$(srcdir)/'`src/mpi_t/cvar_handle_alloc.c + +src/mpi_t/lib_libpmpi_la-cvar_handle_free.lo: src/mpi_t/cvar_handle_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cvar_handle_free.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_free.Tpo -c -o src/mpi_t/lib_libpmpi_la-cvar_handle_free.lo `test -f 'src/mpi_t/cvar_handle_free.c' || echo '$(srcdir)/'`src/mpi_t/cvar_handle_free.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_free.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_free.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_handle_free.c' object='src/mpi_t/lib_libpmpi_la-cvar_handle_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cvar_handle_free.lo `test -f 'src/mpi_t/cvar_handle_free.c' || echo '$(srcdir)/'`src/mpi_t/cvar_handle_free.c + +src/mpi_t/lib_libpmpi_la-cvar_read.lo: src/mpi_t/cvar_read.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cvar_read.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_read.Tpo -c -o src/mpi_t/lib_libpmpi_la-cvar_read.lo `test -f 'src/mpi_t/cvar_read.c' || echo '$(srcdir)/'`src/mpi_t/cvar_read.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_read.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_read.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_read.c' object='src/mpi_t/lib_libpmpi_la-cvar_read.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cvar_read.lo `test -f 'src/mpi_t/cvar_read.c' || echo '$(srcdir)/'`src/mpi_t/cvar_read.c + +src/mpi_t/lib_libpmpi_la-cvar_write.lo: src/mpi_t/cvar_write.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cvar_write.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_write.Tpo -c -o src/mpi_t/lib_libpmpi_la-cvar_write.lo `test -f 'src/mpi_t/cvar_write.c' || echo '$(srcdir)/'`src/mpi_t/cvar_write.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_write.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_write.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_write.c' object='src/mpi_t/lib_libpmpi_la-cvar_write.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cvar_write.lo `test -f 'src/mpi_t/cvar_write.c' || echo '$(srcdir)/'`src/mpi_t/cvar_write.c + +src/mpi_t/lib_libpmpi_la-enum_get_info.lo: src/mpi_t/enum_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-enum_get_info.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_info.Tpo -c -o src/mpi_t/lib_libpmpi_la-enum_get_info.lo `test -f 'src/mpi_t/enum_get_info.c' || echo '$(srcdir)/'`src/mpi_t/enum_get_info.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_info.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_info.Plo +# $(AM_V_CC)source='src/mpi_t/enum_get_info.c' object='src/mpi_t/lib_libpmpi_la-enum_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-enum_get_info.lo `test -f 'src/mpi_t/enum_get_info.c' || echo '$(srcdir)/'`src/mpi_t/enum_get_info.c + +src/mpi_t/lib_libpmpi_la-enum_get_item.lo: src/mpi_t/enum_get_item.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-enum_get_item.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_item.Tpo -c -o src/mpi_t/lib_libpmpi_la-enum_get_item.lo `test -f 'src/mpi_t/enum_get_item.c' || echo '$(srcdir)/'`src/mpi_t/enum_get_item.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_item.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_item.Plo +# $(AM_V_CC)source='src/mpi_t/enum_get_item.c' object='src/mpi_t/lib_libpmpi_la-enum_get_item.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-enum_get_item.lo `test -f 'src/mpi_t/enum_get_item.c' || echo '$(srcdir)/'`src/mpi_t/enum_get_item.c + +src/mpi_t/lib_libpmpi_la-mpit_finalize.lo: src/mpi_t/mpit_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-mpit_finalize.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_finalize.Tpo -c -o src/mpi_t/lib_libpmpi_la-mpit_finalize.lo `test -f 'src/mpi_t/mpit_finalize.c' || echo '$(srcdir)/'`src/mpi_t/mpit_finalize.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_finalize.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_finalize.Plo +# $(AM_V_CC)source='src/mpi_t/mpit_finalize.c' object='src/mpi_t/lib_libpmpi_la-mpit_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-mpit_finalize.lo `test -f 'src/mpi_t/mpit_finalize.c' || echo '$(srcdir)/'`src/mpi_t/mpit_finalize.c + +src/mpi_t/lib_libpmpi_la-mpit_initthread.lo: src/mpi_t/mpit_initthread.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-mpit_initthread.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_initthread.Tpo -c -o src/mpi_t/lib_libpmpi_la-mpit_initthread.lo `test -f 'src/mpi_t/mpit_initthread.c' || echo '$(srcdir)/'`src/mpi_t/mpit_initthread.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_initthread.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_initthread.Plo +# $(AM_V_CC)source='src/mpi_t/mpit_initthread.c' object='src/mpi_t/lib_libpmpi_la-mpit_initthread.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-mpit_initthread.lo `test -f 'src/mpi_t/mpit_initthread.c' || echo '$(srcdir)/'`src/mpi_t/mpit_initthread.c + +src/mpi_t/lib_libpmpi_la-pvar_get_info.lo: src/mpi_t/pvar_get_info.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_get_info.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_info.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_get_info.lo `test -f 'src/mpi_t/pvar_get_info.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_info.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_info.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_info.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_get_info.c' object='src/mpi_t/lib_libpmpi_la-pvar_get_info.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_get_info.lo `test -f 'src/mpi_t/pvar_get_info.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_info.c + +src/mpi_t/lib_libpmpi_la-pvar_get_num.lo: src/mpi_t/pvar_get_num.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_get_num.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_num.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_get_num.lo `test -f 'src/mpi_t/pvar_get_num.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_num.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_num.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_num.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_get_num.c' object='src/mpi_t/lib_libpmpi_la-pvar_get_num.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_get_num.lo `test -f 'src/mpi_t/pvar_get_num.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_num.c + +src/mpi_t/lib_libpmpi_la-pvar_handle_alloc.lo: src/mpi_t/pvar_handle_alloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_handle_alloc.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_alloc.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_handle_alloc.lo `test -f 'src/mpi_t/pvar_handle_alloc.c' || echo '$(srcdir)/'`src/mpi_t/pvar_handle_alloc.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_alloc.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_alloc.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_handle_alloc.c' object='src/mpi_t/lib_libpmpi_la-pvar_handle_alloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_handle_alloc.lo `test -f 'src/mpi_t/pvar_handle_alloc.c' || echo '$(srcdir)/'`src/mpi_t/pvar_handle_alloc.c + +src/mpi_t/lib_libpmpi_la-pvar_handle_free.lo: src/mpi_t/pvar_handle_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_handle_free.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_free.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_handle_free.lo `test -f 'src/mpi_t/pvar_handle_free.c' || echo '$(srcdir)/'`src/mpi_t/pvar_handle_free.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_free.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_free.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_handle_free.c' object='src/mpi_t/lib_libpmpi_la-pvar_handle_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_handle_free.lo `test -f 'src/mpi_t/pvar_handle_free.c' || echo '$(srcdir)/'`src/mpi_t/pvar_handle_free.c + +src/mpi_t/lib_libpmpi_la-pvar_read.lo: src/mpi_t/pvar_read.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_read.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_read.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_read.lo `test -f 'src/mpi_t/pvar_read.c' || echo '$(srcdir)/'`src/mpi_t/pvar_read.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_read.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_read.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_read.c' object='src/mpi_t/lib_libpmpi_la-pvar_read.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_read.lo `test -f 'src/mpi_t/pvar_read.c' || echo '$(srcdir)/'`src/mpi_t/pvar_read.c + +src/mpi_t/lib_libpmpi_la-pvar_readreset.lo: src/mpi_t/pvar_readreset.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_readreset.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_readreset.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_readreset.lo `test -f 'src/mpi_t/pvar_readreset.c' || echo '$(srcdir)/'`src/mpi_t/pvar_readreset.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_readreset.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_readreset.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_readreset.c' object='src/mpi_t/lib_libpmpi_la-pvar_readreset.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_readreset.lo `test -f 'src/mpi_t/pvar_readreset.c' || echo '$(srcdir)/'`src/mpi_t/pvar_readreset.c + +src/mpi_t/lib_libpmpi_la-pvar_reset.lo: src/mpi_t/pvar_reset.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_reset.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_reset.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_reset.lo `test -f 'src/mpi_t/pvar_reset.c' || echo '$(srcdir)/'`src/mpi_t/pvar_reset.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_reset.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_reset.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_reset.c' object='src/mpi_t/lib_libpmpi_la-pvar_reset.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_reset.lo `test -f 'src/mpi_t/pvar_reset.c' || echo '$(srcdir)/'`src/mpi_t/pvar_reset.c + +src/mpi_t/lib_libpmpi_la-pvar_session_create.lo: src/mpi_t/pvar_session_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_session_create.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_create.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_session_create.lo `test -f 'src/mpi_t/pvar_session_create.c' || echo '$(srcdir)/'`src/mpi_t/pvar_session_create.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_create.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_create.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_session_create.c' object='src/mpi_t/lib_libpmpi_la-pvar_session_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_session_create.lo `test -f 'src/mpi_t/pvar_session_create.c' || echo '$(srcdir)/'`src/mpi_t/pvar_session_create.c + +src/mpi_t/lib_libpmpi_la-pvar_session_free.lo: src/mpi_t/pvar_session_free.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_session_free.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_free.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_session_free.lo `test -f 'src/mpi_t/pvar_session_free.c' || echo '$(srcdir)/'`src/mpi_t/pvar_session_free.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_free.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_free.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_session_free.c' object='src/mpi_t/lib_libpmpi_la-pvar_session_free.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_session_free.lo `test -f 'src/mpi_t/pvar_session_free.c' || echo '$(srcdir)/'`src/mpi_t/pvar_session_free.c + +src/mpi_t/lib_libpmpi_la-pvar_start.lo: src/mpi_t/pvar_start.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_start.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_start.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_start.lo `test -f 'src/mpi_t/pvar_start.c' || echo '$(srcdir)/'`src/mpi_t/pvar_start.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_start.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_start.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_start.c' object='src/mpi_t/lib_libpmpi_la-pvar_start.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_start.lo `test -f 'src/mpi_t/pvar_start.c' || echo '$(srcdir)/'`src/mpi_t/pvar_start.c + +src/mpi_t/lib_libpmpi_la-pvar_stop.lo: src/mpi_t/pvar_stop.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_stop.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_stop.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_stop.lo `test -f 'src/mpi_t/pvar_stop.c' || echo '$(srcdir)/'`src/mpi_t/pvar_stop.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_stop.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_stop.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_stop.c' object='src/mpi_t/lib_libpmpi_la-pvar_stop.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_stop.lo `test -f 'src/mpi_t/pvar_stop.c' || echo '$(srcdir)/'`src/mpi_t/pvar_stop.c + +src/mpi_t/lib_libpmpi_la-pvar_write.lo: src/mpi_t/pvar_write.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_write.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_write.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_write.lo `test -f 'src/mpi_t/pvar_write.c' || echo '$(srcdir)/'`src/mpi_t/pvar_write.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_write.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_write.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_write.c' object='src/mpi_t/lib_libpmpi_la-pvar_write.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_write.lo `test -f 'src/mpi_t/pvar_write.c' || echo '$(srcdir)/'`src/mpi_t/pvar_write.c + +src/mpi_t/lib_libpmpi_la-cat_get_index.lo: src/mpi_t/cat_get_index.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cat_get_index.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_index.Tpo -c -o src/mpi_t/lib_libpmpi_la-cat_get_index.lo `test -f 'src/mpi_t/cat_get_index.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_index.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_index.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_index.Plo +# $(AM_V_CC)source='src/mpi_t/cat_get_index.c' object='src/mpi_t/lib_libpmpi_la-cat_get_index.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cat_get_index.lo `test -f 'src/mpi_t/cat_get_index.c' || echo '$(srcdir)/'`src/mpi_t/cat_get_index.c + +src/mpi_t/lib_libpmpi_la-cvar_get_index.lo: src/mpi_t/cvar_get_index.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-cvar_get_index.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_index.Tpo -c -o src/mpi_t/lib_libpmpi_la-cvar_get_index.lo `test -f 'src/mpi_t/cvar_get_index.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_index.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_index.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_index.Plo +# $(AM_V_CC)source='src/mpi_t/cvar_get_index.c' object='src/mpi_t/lib_libpmpi_la-cvar_get_index.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-cvar_get_index.lo `test -f 'src/mpi_t/cvar_get_index.c' || echo '$(srcdir)/'`src/mpi_t/cvar_get_index.c + +src/mpi_t/lib_libpmpi_la-pvar_get_index.lo: src/mpi_t/pvar_get_index.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-pvar_get_index.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_index.Tpo -c -o src/mpi_t/lib_libpmpi_la-pvar_get_index.lo `test -f 'src/mpi_t/pvar_get_index.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_index.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_index.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_index.Plo +# $(AM_V_CC)source='src/mpi_t/pvar_get_index.c' object='src/mpi_t/lib_libpmpi_la-pvar_get_index.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-pvar_get_index.lo `test -f 'src/mpi_t/pvar_get_index.c' || echo '$(srcdir)/'`src/mpi_t/pvar_get_index.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-sendf.lo: src/binding/fortran/mpif_h/sendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-sendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-sendf.lo `test -f 'src/binding/fortran/mpif_h/sendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/sendf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-sendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-sendf.lo `test -f 'src/binding/fortran/mpif_h/sendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sendf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-recvf.lo: src/binding/fortran/mpif_h/recvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-recvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-recvf.lo `test -f 'src/binding/fortran/mpif_h/recvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/recvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/recvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-recvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-recvf.lo `test -f 'src/binding/fortran/mpif_h/recvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/recvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-get_countf.lo: src/binding/fortran/mpif_h/get_countf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-get_countf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_countf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_countf.lo `test -f 'src/binding/fortran/mpif_h/get_countf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_countf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_countf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_countf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_countf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-get_countf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_countf.lo `test -f 'src/binding/fortran/mpif_h/get_countf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_countf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-bsendf.lo: src/binding/fortran/mpif_h/bsendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-bsendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bsendf.lo `test -f 'src/binding/fortran/mpif_h/bsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bsendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bsendf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-bsendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bsendf.lo `test -f 'src/binding/fortran/mpif_h/bsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bsendf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ssendf.lo: src/binding/fortran/mpif_h/ssendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ssendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ssendf.lo `test -f 'src/binding/fortran/mpif_h/ssendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ssendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ssendf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ssendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ssendf.lo `test -f 'src/binding/fortran/mpif_h/ssendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ssendf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-rsendf.lo: src/binding/fortran/mpif_h/rsendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-rsendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rsendf.lo `test -f 'src/binding/fortran/mpif_h/rsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rsendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rsendf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-rsendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rsendf.lo `test -f 'src/binding/fortran/mpif_h/rsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rsendf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-bufattachf.lo: src/binding/fortran/mpif_h/bufattachf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-bufattachf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufattachf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bufattachf.lo `test -f 'src/binding/fortran/mpif_h/bufattachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bufattachf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufattachf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufattachf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bufattachf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-bufattachf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bufattachf.lo `test -f 'src/binding/fortran/mpif_h/bufattachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bufattachf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-bufdetachf.lo: src/binding/fortran/mpif_h/bufdetachf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-bufdetachf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufdetachf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bufdetachf.lo `test -f 'src/binding/fortran/mpif_h/bufdetachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bufdetachf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufdetachf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufdetachf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bufdetachf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-bufdetachf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bufdetachf.lo `test -f 'src/binding/fortran/mpif_h/bufdetachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bufdetachf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-isendf.lo: src/binding/fortran/mpif_h/isendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-isendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-isendf.lo `test -f 'src/binding/fortran/mpif_h/isendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/isendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/isendf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-isendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-isendf.lo `test -f 'src/binding/fortran/mpif_h/isendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/isendf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ibsendf.lo: src/binding/fortran/mpif_h/ibsendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ibsendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibsendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ibsendf.lo `test -f 'src/binding/fortran/mpif_h/ibsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibsendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibsendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibsendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ibsendf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ibsendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ibsendf.lo `test -f 'src/binding/fortran/mpif_h/ibsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibsendf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-issendf.lo: src/binding/fortran/mpif_h/issendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-issendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-issendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-issendf.lo `test -f 'src/binding/fortran/mpif_h/issendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/issendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-issendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-issendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/issendf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-issendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-issendf.lo `test -f 'src/binding/fortran/mpif_h/issendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/issendf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-irsendf.lo: src/binding/fortran/mpif_h/irsendf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-irsendf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irsendf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-irsendf.lo `test -f 'src/binding/fortran/mpif_h/irsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/irsendf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irsendf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irsendf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/irsendf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-irsendf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-irsendf.lo `test -f 'src/binding/fortran/mpif_h/irsendf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/irsendf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-irecvf.lo: src/binding/fortran/mpif_h/irecvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-irecvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irecvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-irecvf.lo `test -f 'src/binding/fortran/mpif_h/irecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/irecvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irecvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irecvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/irecvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-irecvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-irecvf.lo `test -f 'src/binding/fortran/mpif_h/irecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/irecvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-waitf.lo: src/binding/fortran/mpif_h/waitf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-waitf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-waitf.lo `test -f 'src/binding/fortran/mpif_h/waitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/waitf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-waitf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-waitf.lo `test -f 'src/binding/fortran/mpif_h/waitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-testf.lo: src/binding/fortran/mpif_h/testf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-testf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testf.lo `test -f 'src/binding/fortran/mpif_h/testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-testf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testf.lo `test -f 'src/binding/fortran/mpif_h/testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-request_freef.lo: src/binding/fortran/mpif_h/request_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-request_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-request_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-request_freef.lo `test -f 'src/binding/fortran/mpif_h/request_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/request_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-request_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-request_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/request_freef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-request_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-request_freef.lo `test -f 'src/binding/fortran/mpif_h/request_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/request_freef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-waitanyf.lo: src/binding/fortran/mpif_h/waitanyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-waitanyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitanyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-waitanyf.lo `test -f 'src/binding/fortran/mpif_h/waitanyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitanyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitanyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitanyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/waitanyf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-waitanyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-waitanyf.lo `test -f 'src/binding/fortran/mpif_h/waitanyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitanyf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-testanyf.lo: src/binding/fortran/mpif_h/testanyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-testanyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testanyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testanyf.lo `test -f 'src/binding/fortran/mpif_h/testanyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testanyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testanyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testanyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testanyf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-testanyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testanyf.lo `test -f 'src/binding/fortran/mpif_h/testanyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testanyf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-waitallf.lo: src/binding/fortran/mpif_h/waitallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-waitallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-waitallf.lo `test -f 'src/binding/fortran/mpif_h/waitallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/waitallf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-waitallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-waitallf.lo `test -f 'src/binding/fortran/mpif_h/waitallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitallf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-testallf.lo: src/binding/fortran/mpif_h/testallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-testallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testallf.lo `test -f 'src/binding/fortran/mpif_h/testallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testallf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-testallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testallf.lo `test -f 'src/binding/fortran/mpif_h/testallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testallf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-waitsomef.lo: src/binding/fortran/mpif_h/waitsomef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-waitsomef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitsomef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-waitsomef.lo `test -f 'src/binding/fortran/mpif_h/waitsomef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitsomef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitsomef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitsomef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/waitsomef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-waitsomef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-waitsomef.lo `test -f 'src/binding/fortran/mpif_h/waitsomef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/waitsomef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-testsomef.lo: src/binding/fortran/mpif_h/testsomef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-testsomef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testsomef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testsomef.lo `test -f 'src/binding/fortran/mpif_h/testsomef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testsomef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testsomef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testsomef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testsomef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-testsomef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testsomef.lo `test -f 'src/binding/fortran/mpif_h/testsomef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testsomef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iprobef.lo: src/binding/fortran/mpif_h/iprobef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iprobef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iprobef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iprobef.lo `test -f 'src/binding/fortran/mpif_h/iprobef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iprobef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iprobef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iprobef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iprobef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iprobef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iprobef.lo `test -f 'src/binding/fortran/mpif_h/iprobef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iprobef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-probef.lo: src/binding/fortran/mpif_h/probef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-probef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-probef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-probef.lo `test -f 'src/binding/fortran/mpif_h/probef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/probef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-probef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-probef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/probef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-probef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-probef.lo `test -f 'src/binding/fortran/mpif_h/probef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/probef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cancelf.lo: src/binding/fortran/mpif_h/cancelf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cancelf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cancelf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cancelf.lo `test -f 'src/binding/fortran/mpif_h/cancelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cancelf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cancelf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cancelf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cancelf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cancelf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cancelf.lo `test -f 'src/binding/fortran/mpif_h/cancelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cancelf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-testcancelf.lo: src/binding/fortran/mpif_h/testcancelf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-testcancelf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testcancelf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testcancelf.lo `test -f 'src/binding/fortran/mpif_h/testcancelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testcancelf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testcancelf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testcancelf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/testcancelf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-testcancelf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-testcancelf.lo `test -f 'src/binding/fortran/mpif_h/testcancelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/testcancelf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-send_initf.lo: src/binding/fortran/mpif_h/send_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-send_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-send_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-send_initf.lo `test -f 'src/binding/fortran/mpif_h/send_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/send_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-send_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-send_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/send_initf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-send_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-send_initf.lo `test -f 'src/binding/fortran/mpif_h/send_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/send_initf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-bsend_initf.lo: src/binding/fortran/mpif_h/bsend_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-bsend_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsend_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bsend_initf.lo `test -f 'src/binding/fortran/mpif_h/bsend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bsend_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsend_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsend_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bsend_initf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-bsend_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bsend_initf.lo `test -f 'src/binding/fortran/mpif_h/bsend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bsend_initf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ssend_initf.lo: src/binding/fortran/mpif_h/ssend_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ssend_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssend_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ssend_initf.lo `test -f 'src/binding/fortran/mpif_h/ssend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ssend_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssend_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssend_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ssend_initf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ssend_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ssend_initf.lo `test -f 'src/binding/fortran/mpif_h/ssend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ssend_initf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-rsend_initf.lo: src/binding/fortran/mpif_h/rsend_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-rsend_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsend_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rsend_initf.lo `test -f 'src/binding/fortran/mpif_h/rsend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rsend_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsend_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsend_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rsend_initf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-rsend_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rsend_initf.lo `test -f 'src/binding/fortran/mpif_h/rsend_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rsend_initf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-recv_initf.lo: src/binding/fortran/mpif_h/recv_initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-recv_initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recv_initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-recv_initf.lo `test -f 'src/binding/fortran/mpif_h/recv_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/recv_initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recv_initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recv_initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/recv_initf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-recv_initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-recv_initf.lo `test -f 'src/binding/fortran/mpif_h/recv_initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/recv_initf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-startf.lo: src/binding/fortran/mpif_h/startf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-startf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-startf.lo `test -f 'src/binding/fortran/mpif_h/startf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/startf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/startf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-startf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-startf.lo `test -f 'src/binding/fortran/mpif_h/startf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/startf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-startallf.lo: src/binding/fortran/mpif_h/startallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-startallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-startallf.lo `test -f 'src/binding/fortran/mpif_h/startallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/startallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/startallf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-startallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-startallf.lo `test -f 'src/binding/fortran/mpif_h/startallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/startallf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-sendrecvf.lo: src/binding/fortran/mpif_h/sendrecvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-sendrecvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendrecvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-sendrecvf.lo `test -f 'src/binding/fortran/mpif_h/sendrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sendrecvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendrecvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendrecvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/sendrecvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-sendrecvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-sendrecvf.lo `test -f 'src/binding/fortran/mpif_h/sendrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sendrecvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-sndrcvrplf.lo: src/binding/fortran/mpif_h/sndrcvrplf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-sndrcvrplf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sndrcvrplf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-sndrcvrplf.lo `test -f 'src/binding/fortran/mpif_h/sndrcvrplf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sndrcvrplf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sndrcvrplf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sndrcvrplf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/sndrcvrplf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-sndrcvrplf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-sndrcvrplf.lo `test -f 'src/binding/fortran/mpif_h/sndrcvrplf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/sndrcvrplf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typecontigf.lo: src/binding/fortran/mpif_h/typecontigf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typecontigf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecontigf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecontigf.lo `test -f 'src/binding/fortran/mpif_h/typecontigf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecontigf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecontigf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecontigf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecontigf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typecontigf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecontigf.lo `test -f 'src/binding/fortran/mpif_h/typecontigf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecontigf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_vectorf.lo: src/binding/fortran/mpif_h/type_vectorf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_vectorf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_vectorf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_vectorf.lo `test -f 'src/binding/fortran/mpif_h/type_vectorf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_vectorf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_vectorf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_vectorf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_vectorf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_vectorf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_vectorf.lo `test -f 'src/binding/fortran/mpif_h/type_vectorf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_vectorf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_hvectorf.lo: src/binding/fortran/mpif_h/type_hvectorf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_hvectorf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hvectorf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_hvectorf.lo `test -f 'src/binding/fortran/mpif_h/type_hvectorf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_hvectorf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hvectorf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hvectorf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_hvectorf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_hvectorf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_hvectorf.lo `test -f 'src/binding/fortran/mpif_h/type_hvectorf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_hvectorf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_indexedf.lo: src/binding/fortran/mpif_h/type_indexedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_indexedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_indexedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_indexedf.lo `test -f 'src/binding/fortran/mpif_h/type_indexedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_indexedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_indexedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_indexedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_indexedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_indexedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_indexedf.lo `test -f 'src/binding/fortran/mpif_h/type_indexedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_indexedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_hindexedf.lo: src/binding/fortran/mpif_h/type_hindexedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_hindexedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hindexedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_hindexedf.lo `test -f 'src/binding/fortran/mpif_h/type_hindexedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_hindexedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hindexedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hindexedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_hindexedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_hindexedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_hindexedf.lo `test -f 'src/binding/fortran/mpif_h/type_hindexedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_hindexedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_structf.lo: src/binding/fortran/mpif_h/type_structf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_structf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_structf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_structf.lo `test -f 'src/binding/fortran/mpif_h/type_structf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_structf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_structf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_structf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_structf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_structf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_structf.lo `test -f 'src/binding/fortran/mpif_h/type_structf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_structf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_extentf.lo: src/binding/fortran/mpif_h/type_extentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_extentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_extentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_extentf.lo `test -f 'src/binding/fortran/mpif_h/type_extentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_extentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_extentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_extentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_extentf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_extentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_extentf.lo `test -f 'src/binding/fortran/mpif_h/type_extentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_extentf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_sizef.lo: src/binding/fortran/mpif_h/type_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_sizef.lo `test -f 'src/binding/fortran/mpif_h/type_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_sizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_sizef.lo `test -f 'src/binding/fortran/mpif_h/type_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_sizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_lbf.lo: src/binding/fortran/mpif_h/type_lbf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_lbf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_lbf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_lbf.lo `test -f 'src/binding/fortran/mpif_h/type_lbf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_lbf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_lbf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_lbf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_lbf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_lbf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_lbf.lo `test -f 'src/binding/fortran/mpif_h/type_lbf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_lbf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_ubf.lo: src/binding/fortran/mpif_h/type_ubf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_ubf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_ubf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_ubf.lo `test -f 'src/binding/fortran/mpif_h/type_ubf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_ubf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_ubf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_ubf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_ubf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_ubf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_ubf.lo `test -f 'src/binding/fortran/mpif_h/type_ubf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_ubf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_commitf.lo: src/binding/fortran/mpif_h/type_commitf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_commitf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_commitf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_commitf.lo `test -f 'src/binding/fortran/mpif_h/type_commitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_commitf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_commitf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_commitf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_commitf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_commitf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_commitf.lo `test -f 'src/binding/fortran/mpif_h/type_commitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_commitf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_freef.lo: src/binding/fortran/mpif_h/type_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_freef.lo `test -f 'src/binding/fortran/mpif_h/type_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_freef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_freef.lo `test -f 'src/binding/fortran/mpif_h/type_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_freef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-get_elementsf.lo: src/binding/fortran/mpif_h/get_elementsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-get_elementsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elementsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_elementsf.lo `test -f 'src/binding/fortran/mpif_h/get_elementsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_elementsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elementsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elementsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_elementsf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-get_elementsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_elementsf.lo `test -f 'src/binding/fortran/mpif_h/get_elementsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_elementsf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-packf.lo: src/binding/fortran/mpif_h/packf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-packf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-packf.lo `test -f 'src/binding/fortran/mpif_h/packf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/packf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/packf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-packf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-packf.lo `test -f 'src/binding/fortran/mpif_h/packf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/packf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-unpackf.lo: src/binding/fortran/mpif_h/unpackf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-unpackf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-unpackf.lo `test -f 'src/binding/fortran/mpif_h/unpackf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpackf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/unpackf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-unpackf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-unpackf.lo `test -f 'src/binding/fortran/mpif_h/unpackf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpackf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-pack_sizef.lo: src/binding/fortran/mpif_h/pack_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-pack_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-pack_sizef.lo `test -f 'src/binding/fortran/mpif_h/pack_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pack_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/pack_sizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-pack_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-pack_sizef.lo `test -f 'src/binding/fortran/mpif_h/pack_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pack_sizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-barrierf.lo: src/binding/fortran/mpif_h/barrierf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-barrierf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-barrierf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-barrierf.lo `test -f 'src/binding/fortran/mpif_h/barrierf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/barrierf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-barrierf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-barrierf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/barrierf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-barrierf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-barrierf.lo `test -f 'src/binding/fortran/mpif_h/barrierf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/barrierf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-bcastf.lo: src/binding/fortran/mpif_h/bcastf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-bcastf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bcastf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bcastf.lo `test -f 'src/binding/fortran/mpif_h/bcastf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bcastf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bcastf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bcastf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/bcastf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-bcastf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-bcastf.lo `test -f 'src/binding/fortran/mpif_h/bcastf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/bcastf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-gatherf.lo: src/binding/fortran/mpif_h/gatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-gatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-gatherf.lo `test -f 'src/binding/fortran/mpif_h/gatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/gatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/gatherf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-gatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-gatherf.lo `test -f 'src/binding/fortran/mpif_h/gatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/gatherf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-gathervf.lo: src/binding/fortran/mpif_h/gathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-gathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-gathervf.lo `test -f 'src/binding/fortran/mpif_h/gathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/gathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/gathervf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-gathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-gathervf.lo `test -f 'src/binding/fortran/mpif_h/gathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/gathervf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-scatterf.lo: src/binding/fortran/mpif_h/scatterf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-scatterf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scatterf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-scatterf.lo `test -f 'src/binding/fortran/mpif_h/scatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scatterf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scatterf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scatterf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/scatterf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-scatterf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-scatterf.lo `test -f 'src/binding/fortran/mpif_h/scatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scatterf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-scattervf.lo: src/binding/fortran/mpif_h/scattervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-scattervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scattervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-scattervf.lo `test -f 'src/binding/fortran/mpif_h/scattervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scattervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scattervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scattervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/scattervf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-scattervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-scattervf.lo `test -f 'src/binding/fortran/mpif_h/scattervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scattervf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-allgatherf.lo: src/binding/fortran/mpif_h/allgatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-allgatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-allgatherf.lo `test -f 'src/binding/fortran/mpif_h/allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allgatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/allgatherf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-allgatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-allgatherf.lo `test -f 'src/binding/fortran/mpif_h/allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allgatherf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-allgathervf.lo: src/binding/fortran/mpif_h/allgathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-allgathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-allgathervf.lo `test -f 'src/binding/fortran/mpif_h/allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allgathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/allgathervf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-allgathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-allgathervf.lo `test -f 'src/binding/fortran/mpif_h/allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allgathervf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallf.lo: src/binding/fortran/mpif_h/alltoallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallf.lo `test -f 'src/binding/fortran/mpif_h/alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/alltoallf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallf.lo `test -f 'src/binding/fortran/mpif_h/alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallvf.lo: src/binding/fortran/mpif_h/alltoallvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/alltoallvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallwf.lo: src/binding/fortran/mpif_h/alltoallwf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallwf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallwf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallwf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallwf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallwf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/alltoallwf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallwf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alltoallwf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-exscanf.lo: src/binding/fortran/mpif_h/exscanf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-exscanf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-exscanf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-exscanf.lo `test -f 'src/binding/fortran/mpif_h/exscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/exscanf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-exscanf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-exscanf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/exscanf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-exscanf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-exscanf.lo `test -f 'src/binding/fortran/mpif_h/exscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/exscanf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-reducef.lo: src/binding/fortran/mpif_h/reducef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-reducef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reducef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-reducef.lo `test -f 'src/binding/fortran/mpif_h/reducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reducef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reducef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reducef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/reducef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-reducef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-reducef.lo `test -f 'src/binding/fortran/mpif_h/reducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reducef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-op_createf.lo: src/binding/fortran/mpif_h/op_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-op_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-op_createf.lo `test -f 'src/binding/fortran/mpif_h/op_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/op_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-op_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-op_createf.lo `test -f 'src/binding/fortran/mpif_h/op_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-op_freef.lo: src/binding/fortran/mpif_h/op_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-op_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-op_freef.lo `test -f 'src/binding/fortran/mpif_h/op_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/op_freef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-op_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-op_freef.lo `test -f 'src/binding/fortran/mpif_h/op_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_freef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-allreducef.lo: src/binding/fortran/mpif_h/allreducef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-allreducef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allreducef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-allreducef.lo `test -f 'src/binding/fortran/mpif_h/allreducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allreducef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allreducef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allreducef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/allreducef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-allreducef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-allreducef.lo `test -f 'src/binding/fortran/mpif_h/allreducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/allreducef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-redscatf.lo: src/binding/fortran/mpif_h/redscatf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-redscatf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-redscatf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-redscatf.lo `test -f 'src/binding/fortran/mpif_h/redscatf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/redscatf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-redscatf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-redscatf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/redscatf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-redscatf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-redscatf.lo `test -f 'src/binding/fortran/mpif_h/redscatf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/redscatf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-scanf.lo: src/binding/fortran/mpif_h/scanf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-scanf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scanf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-scanf.lo `test -f 'src/binding/fortran/mpif_h/scanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scanf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scanf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scanf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/scanf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-scanf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-scanf.lo `test -f 'src/binding/fortran/mpif_h/scanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/scanf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-group_sizef.lo: src/binding/fortran/mpif_h/group_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-group_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_sizef.lo `test -f 'src/binding/fortran/mpif_h/group_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_sizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-group_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_sizef.lo `test -f 'src/binding/fortran/mpif_h/group_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_sizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-group_rankf.lo: src/binding/fortran/mpif_h/group_rankf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-group_rankf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_rankf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_rankf.lo `test -f 'src/binding/fortran/mpif_h/group_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_rankf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_rankf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_rankf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_rankf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-group_rankf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_rankf.lo `test -f 'src/binding/fortran/mpif_h/group_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_rankf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-grouptranksf.lo: src/binding/fortran/mpif_h/grouptranksf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-grouptranksf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouptranksf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grouptranksf.lo `test -f 'src/binding/fortran/mpif_h/grouptranksf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouptranksf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouptranksf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouptranksf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grouptranksf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-grouptranksf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grouptranksf.lo `test -f 'src/binding/fortran/mpif_h/grouptranksf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouptranksf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-group_comparef.lo: src/binding/fortran/mpif_h/group_comparef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-group_comparef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_comparef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_comparef.lo `test -f 'src/binding/fortran/mpif_h/group_comparef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_comparef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_comparef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_comparef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_comparef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-group_comparef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_comparef.lo `test -f 'src/binding/fortran/mpif_h/group_comparef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_comparef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_groupf.lo: src/binding/fortran/mpif_h/comm_groupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_groupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_groupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_groupf.lo `test -f 'src/binding/fortran/mpif_h/comm_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_groupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_groupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_groupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_groupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_groupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_groupf.lo `test -f 'src/binding/fortran/mpif_h/comm_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_groupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-group_unionf.lo: src/binding/fortran/mpif_h/group_unionf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-group_unionf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_unionf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_unionf.lo `test -f 'src/binding/fortran/mpif_h/group_unionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_unionf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_unionf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_unionf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_unionf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-group_unionf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_unionf.lo `test -f 'src/binding/fortran/mpif_h/group_unionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_unionf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-groupinterf.lo: src/binding/fortran/mpif_h/groupinterf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-groupinterf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupinterf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-groupinterf.lo `test -f 'src/binding/fortran/mpif_h/groupinterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/groupinterf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupinterf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupinterf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/groupinterf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-groupinterf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-groupinterf.lo `test -f 'src/binding/fortran/mpif_h/groupinterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/groupinterf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-groupdifff.lo: src/binding/fortran/mpif_h/groupdifff.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-groupdifff.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupdifff.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-groupdifff.lo `test -f 'src/binding/fortran/mpif_h/groupdifff.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/groupdifff.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupdifff.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupdifff.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/groupdifff.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-groupdifff.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-groupdifff.lo `test -f 'src/binding/fortran/mpif_h/groupdifff.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/groupdifff.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-group_inclf.lo: src/binding/fortran/mpif_h/group_inclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-group_inclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_inclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_inclf.lo `test -f 'src/binding/fortran/mpif_h/group_inclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_inclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_inclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_inclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_inclf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-group_inclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_inclf.lo `test -f 'src/binding/fortran/mpif_h/group_inclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_inclf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-group_exclf.lo: src/binding/fortran/mpif_h/group_exclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-group_exclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_exclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_exclf.lo `test -f 'src/binding/fortran/mpif_h/group_exclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_exclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_exclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_exclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_exclf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-group_exclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_exclf.lo `test -f 'src/binding/fortran/mpif_h/group_exclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_exclf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-grouprinclf.lo: src/binding/fortran/mpif_h/grouprinclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-grouprinclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprinclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grouprinclf.lo `test -f 'src/binding/fortran/mpif_h/grouprinclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouprinclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprinclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprinclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grouprinclf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-grouprinclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grouprinclf.lo `test -f 'src/binding/fortran/mpif_h/grouprinclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouprinclf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-grouprexclf.lo: src/binding/fortran/mpif_h/grouprexclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-grouprexclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprexclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grouprexclf.lo `test -f 'src/binding/fortran/mpif_h/grouprexclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouprexclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprexclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprexclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grouprexclf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-grouprexclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grouprexclf.lo `test -f 'src/binding/fortran/mpif_h/grouprexclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grouprexclf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-group_freef.lo: src/binding/fortran/mpif_h/group_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-group_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_freef.lo `test -f 'src/binding/fortran/mpif_h/group_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/group_freef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-group_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-group_freef.lo `test -f 'src/binding/fortran/mpif_h/group_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/group_freef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_sizef.lo: src/binding/fortran/mpif_h/comm_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_sizef.lo `test -f 'src/binding/fortran/mpif_h/comm_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_sizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_sizef.lo `test -f 'src/binding/fortran/mpif_h/comm_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_sizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_rankf.lo: src/binding/fortran/mpif_h/comm_rankf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_rankf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_rankf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_rankf.lo `test -f 'src/binding/fortran/mpif_h/comm_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_rankf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_rankf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_rankf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_rankf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_rankf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_rankf.lo `test -f 'src/binding/fortran/mpif_h/comm_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_rankf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_comparef.lo: src/binding/fortran/mpif_h/comm_comparef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_comparef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_comparef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_comparef.lo `test -f 'src/binding/fortran/mpif_h/comm_comparef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_comparef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_comparef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_comparef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_comparef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_comparef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_comparef.lo `test -f 'src/binding/fortran/mpif_h/comm_comparef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_comparef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dupf.lo: src/binding/fortran/mpif_h/comm_dupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dupf.lo `test -f 'src/binding/fortran/mpif_h/comm_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_dupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_dupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dupf.lo `test -f 'src/binding/fortran/mpif_h/comm_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_dupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dup_with_infof.lo: src/binding/fortran/mpif_h/comm_dup_with_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dup_with_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dup_with_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_dup_with_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_dup_with_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_dup_with_infof.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dup_with_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_dup_with_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_dup_with_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_dup_with_infof.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_createf.lo: src/binding/fortran/mpif_h/comm_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_createf.lo `test -f 'src/binding/fortran/mpif_h/comm_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_createf.lo `test -f 'src/binding/fortran/mpif_h/comm_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_splitf.lo: src/binding/fortran/mpif_h/comm_splitf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_splitf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_splitf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_splitf.lo `test -f 'src/binding/fortran/mpif_h/comm_splitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_splitf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_splitf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_splitf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_splitf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_splitf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_splitf.lo `test -f 'src/binding/fortran/mpif_h/comm_splitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_splitf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_freef.lo: src/binding/fortran/mpif_h/comm_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_freef.lo `test -f 'src/binding/fortran/mpif_h/comm_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_freef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_freef.lo `test -f 'src/binding/fortran/mpif_h/comm_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_freef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commtesticf.lo: src/binding/fortran/mpif_h/commtesticf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commtesticf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commtesticf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commtesticf.lo `test -f 'src/binding/fortran/mpif_h/commtesticf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commtesticf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commtesticf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commtesticf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commtesticf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commtesticf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commtesticf.lo `test -f 'src/binding/fortran/mpif_h/commtesticf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commtesticf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commrsizef.lo: src/binding/fortran/mpif_h/commrsizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commrsizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrsizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commrsizef.lo `test -f 'src/binding/fortran/mpif_h/commrsizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commrsizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrsizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrsizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commrsizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commrsizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commrsizef.lo `test -f 'src/binding/fortran/mpif_h/commrsizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commrsizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commrgroupf.lo: src/binding/fortran/mpif_h/commrgroupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commrgroupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrgroupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commrgroupf.lo `test -f 'src/binding/fortran/mpif_h/commrgroupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commrgroupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrgroupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrgroupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commrgroupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commrgroupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commrgroupf.lo `test -f 'src/binding/fortran/mpif_h/commrgroupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commrgroupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iccreatef.lo: src/binding/fortran/mpif_h/iccreatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iccreatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iccreatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iccreatef.lo `test -f 'src/binding/fortran/mpif_h/iccreatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iccreatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iccreatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iccreatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iccreatef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iccreatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iccreatef.lo `test -f 'src/binding/fortran/mpif_h/iccreatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iccreatef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-icmergef.lo: src/binding/fortran/mpif_h/icmergef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-icmergef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-icmergef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-icmergef.lo `test -f 'src/binding/fortran/mpif_h/icmergef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/icmergef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-icmergef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-icmergef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/icmergef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-icmergef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-icmergef.lo `test -f 'src/binding/fortran/mpif_h/icmergef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/icmergef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_freef.lo: src/binding/fortran/mpif_h/keyval_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_freef.lo `test -f 'src/binding/fortran/mpif_h/keyval_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/keyval_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/keyval_freef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_freef.lo `test -f 'src/binding/fortran/mpif_h/keyval_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/keyval_freef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-attr_putf.lo: src/binding/fortran/mpif_h/attr_putf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-attr_putf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_putf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-attr_putf.lo `test -f 'src/binding/fortran/mpif_h/attr_putf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_putf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_putf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_putf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/attr_putf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-attr_putf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-attr_putf.lo `test -f 'src/binding/fortran/mpif_h/attr_putf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_putf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-attr_getf.lo: src/binding/fortran/mpif_h/attr_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-attr_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-attr_getf.lo `test -f 'src/binding/fortran/mpif_h/attr_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/attr_getf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-attr_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-attr_getf.lo `test -f 'src/binding/fortran/mpif_h/attr_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_getf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-attr_deletef.lo: src/binding/fortran/mpif_h/attr_deletef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-attr_deletef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_deletef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-attr_deletef.lo `test -f 'src/binding/fortran/mpif_h/attr_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_deletef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_deletef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_deletef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/attr_deletef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-attr_deletef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-attr_deletef.lo `test -f 'src/binding/fortran/mpif_h/attr_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/attr_deletef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-topo_testf.lo: src/binding/fortran/mpif_h/topo_testf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-topo_testf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-topo_testf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-topo_testf.lo `test -f 'src/binding/fortran/mpif_h/topo_testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/topo_testf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-topo_testf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-topo_testf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/topo_testf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-topo_testf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-topo_testf.lo `test -f 'src/binding/fortran/mpif_h/topo_testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/topo_testf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_createf.lo: src/binding/fortran/mpif_h/cart_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cart_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_createf.lo `test -f 'src/binding/fortran/mpif_h/cart_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cart_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_createf.lo `test -f 'src/binding/fortran/mpif_h/cart_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dims_createf.lo: src/binding/fortran/mpif_h/dims_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dims_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dims_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dims_createf.lo `test -f 'src/binding/fortran/mpif_h/dims_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dims_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dims_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dims_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dims_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dims_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dims_createf.lo `test -f 'src/binding/fortran/mpif_h/dims_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dims_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-graph_createf.lo: src/binding/fortran/mpif_h/graph_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-graph_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-graph_createf.lo `test -f 'src/binding/fortran/mpif_h/graph_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/graph_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-graph_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-graph_createf.lo `test -f 'src/binding/fortran/mpif_h/graph_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-graphdims_getf.lo: src/binding/fortran/mpif_h/graphdims_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-graphdims_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graphdims_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-graphdims_getf.lo `test -f 'src/binding/fortran/mpif_h/graphdims_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graphdims_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graphdims_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graphdims_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/graphdims_getf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-graphdims_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-graphdims_getf.lo `test -f 'src/binding/fortran/mpif_h/graphdims_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graphdims_getf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-graph_getf.lo: src/binding/fortran/mpif_h/graph_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-graph_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-graph_getf.lo `test -f 'src/binding/fortran/mpif_h/graph_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/graph_getf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-graph_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-graph_getf.lo `test -f 'src/binding/fortran/mpif_h/graph_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_getf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cartdim_getf.lo: src/binding/fortran/mpif_h/cartdim_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cartdim_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cartdim_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cartdim_getf.lo `test -f 'src/binding/fortran/mpif_h/cartdim_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cartdim_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cartdim_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cartdim_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cartdim_getf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cartdim_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cartdim_getf.lo `test -f 'src/binding/fortran/mpif_h/cartdim_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cartdim_getf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_getf.lo: src/binding/fortran/mpif_h/cart_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cart_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_getf.lo `test -f 'src/binding/fortran/mpif_h/cart_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_getf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cart_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_getf.lo `test -f 'src/binding/fortran/mpif_h/cart_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_getf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_rankf.lo: src/binding/fortran/mpif_h/cart_rankf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cart_rankf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_rankf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_rankf.lo `test -f 'src/binding/fortran/mpif_h/cart_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_rankf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_rankf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_rankf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_rankf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cart_rankf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_rankf.lo `test -f 'src/binding/fortran/mpif_h/cart_rankf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_rankf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_coordsf.lo: src/binding/fortran/mpif_h/cart_coordsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cart_coordsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_coordsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_coordsf.lo `test -f 'src/binding/fortran/mpif_h/cart_coordsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_coordsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_coordsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_coordsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_coordsf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cart_coordsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_coordsf.lo `test -f 'src/binding/fortran/mpif_h/cart_coordsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_coordsf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbcountf.lo: src/binding/fortran/mpif_h/grfnbcountf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbcountf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbcountf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbcountf.lo `test -f 'src/binding/fortran/mpif_h/grfnbcountf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grfnbcountf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbcountf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbcountf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grfnbcountf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbcountf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbcountf.lo `test -f 'src/binding/fortran/mpif_h/grfnbcountf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grfnbcountf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbrsf.lo: src/binding/fortran/mpif_h/grfnbrsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbrsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbrsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbrsf.lo `test -f 'src/binding/fortran/mpif_h/grfnbrsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grfnbrsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbrsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbrsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/grfnbrsf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbrsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-grfnbrsf.lo `test -f 'src/binding/fortran/mpif_h/grfnbrsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/grfnbrsf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_shiftf.lo: src/binding/fortran/mpif_h/cart_shiftf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cart_shiftf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_shiftf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_shiftf.lo `test -f 'src/binding/fortran/mpif_h/cart_shiftf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_shiftf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_shiftf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_shiftf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_shiftf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cart_shiftf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_shiftf.lo `test -f 'src/binding/fortran/mpif_h/cart_shiftf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_shiftf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_subf.lo: src/binding/fortran/mpif_h/cart_subf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cart_subf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_subf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_subf.lo `test -f 'src/binding/fortran/mpif_h/cart_subf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_subf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_subf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_subf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_subf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cart_subf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_subf.lo `test -f 'src/binding/fortran/mpif_h/cart_subf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_subf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-cart_mapf.lo: src/binding/fortran/mpif_h/cart_mapf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-cart_mapf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_mapf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_mapf.lo `test -f 'src/binding/fortran/mpif_h/cart_mapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_mapf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_mapf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_mapf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/cart_mapf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-cart_mapf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-cart_mapf.lo `test -f 'src/binding/fortran/mpif_h/cart_mapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/cart_mapf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-graph_mapf.lo: src/binding/fortran/mpif_h/graph_mapf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-graph_mapf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_mapf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-graph_mapf.lo `test -f 'src/binding/fortran/mpif_h/graph_mapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_mapf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_mapf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_mapf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/graph_mapf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-graph_mapf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-graph_mapf.lo `test -f 'src/binding/fortran/mpif_h/graph_mapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/graph_mapf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-getpnamef.lo: src/binding/fortran/mpif_h/getpnamef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-getpnamef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getpnamef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-getpnamef.lo `test -f 'src/binding/fortran/mpif_h/getpnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getpnamef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getpnamef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getpnamef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/getpnamef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-getpnamef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-getpnamef.lo `test -f 'src/binding/fortran/mpif_h/getpnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getpnamef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-get_versionf.lo: src/binding/fortran/mpif_h/get_versionf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-get_versionf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_versionf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_versionf.lo `test -f 'src/binding/fortran/mpif_h/get_versionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_versionf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_versionf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_versionf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_versionf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-get_versionf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_versionf.lo `test -f 'src/binding/fortran/mpif_h/get_versionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_versionf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-get_library_versionf.lo: src/binding/fortran/mpif_h/get_library_versionf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-get_library_versionf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_library_versionf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_library_versionf.lo `test -f 'src/binding/fortran/mpif_h/get_library_versionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_library_versionf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_library_versionf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_library_versionf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_library_versionf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-get_library_versionf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_library_versionf.lo `test -f 'src/binding/fortran/mpif_h/get_library_versionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_library_versionf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-errhcreatef.lo: src/binding/fortran/mpif_h/errhcreatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-errhcreatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhcreatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-errhcreatef.lo `test -f 'src/binding/fortran/mpif_h/errhcreatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhcreatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhcreatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhcreatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/errhcreatef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-errhcreatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-errhcreatef.lo `test -f 'src/binding/fortran/mpif_h/errhcreatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhcreatef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-errhsetf.lo: src/binding/fortran/mpif_h/errhsetf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-errhsetf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhsetf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-errhsetf.lo `test -f 'src/binding/fortran/mpif_h/errhsetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhsetf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhsetf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhsetf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/errhsetf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-errhsetf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-errhsetf.lo `test -f 'src/binding/fortran/mpif_h/errhsetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhsetf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-errhgetf.lo: src/binding/fortran/mpif_h/errhgetf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-errhgetf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhgetf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-errhgetf.lo `test -f 'src/binding/fortran/mpif_h/errhgetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhgetf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhgetf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhgetf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/errhgetf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-errhgetf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-errhgetf.lo `test -f 'src/binding/fortran/mpif_h/errhgetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhgetf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-errhfreef.lo: src/binding/fortran/mpif_h/errhfreef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-errhfreef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhfreef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-errhfreef.lo `test -f 'src/binding/fortran/mpif_h/errhfreef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhfreef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhfreef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhfreef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/errhfreef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-errhfreef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-errhfreef.lo `test -f 'src/binding/fortran/mpif_h/errhfreef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/errhfreef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-error_stringf.lo: src/binding/fortran/mpif_h/error_stringf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-error_stringf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_stringf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-error_stringf.lo `test -f 'src/binding/fortran/mpif_h/error_stringf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/error_stringf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_stringf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_stringf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/error_stringf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-error_stringf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-error_stringf.lo `test -f 'src/binding/fortran/mpif_h/error_stringf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/error_stringf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-error_classf.lo: src/binding/fortran/mpif_h/error_classf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-error_classf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_classf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-error_classf.lo `test -f 'src/binding/fortran/mpif_h/error_classf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/error_classf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_classf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_classf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/error_classf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-error_classf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-error_classf.lo `test -f 'src/binding/fortran/mpif_h/error_classf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/error_classf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-finalizef.lo: src/binding/fortran/mpif_h/finalizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-finalizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-finalizef.lo `test -f 'src/binding/fortran/mpif_h/finalizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/finalizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/finalizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-finalizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-finalizef.lo `test -f 'src/binding/fortran/mpif_h/finalizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/finalizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-initializedf.lo: src/binding/fortran/mpif_h/initializedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-initializedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initializedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-initializedf.lo `test -f 'src/binding/fortran/mpif_h/initializedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initializedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initializedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initializedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/initializedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-initializedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-initializedf.lo `test -f 'src/binding/fortran/mpif_h/initializedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initializedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-abortf.lo: src/binding/fortran/mpif_h/abortf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-abortf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-abortf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-abortf.lo `test -f 'src/binding/fortran/mpif_h/abortf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/abortf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-abortf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-abortf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/abortf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-abortf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-abortf.lo `test -f 'src/binding/fortran/mpif_h/abortf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/abortf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-close_portf.lo: src/binding/fortran/mpif_h/close_portf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-close_portf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-close_portf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-close_portf.lo `test -f 'src/binding/fortran/mpif_h/close_portf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/close_portf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-close_portf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-close_portf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/close_portf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-close_portf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-close_portf.lo `test -f 'src/binding/fortran/mpif_h/close_portf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/close_portf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_acceptf.lo: src/binding/fortran/mpif_h/comm_acceptf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_acceptf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_acceptf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_acceptf.lo `test -f 'src/binding/fortran/mpif_h/comm_acceptf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_acceptf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_acceptf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_acceptf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_acceptf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_acceptf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_acceptf.lo `test -f 'src/binding/fortran/mpif_h/comm_acceptf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_acceptf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_connectf.lo: src/binding/fortran/mpif_h/comm_connectf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_connectf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_connectf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_connectf.lo `test -f 'src/binding/fortran/mpif_h/comm_connectf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_connectf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_connectf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_connectf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_connectf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_connectf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_connectf.lo `test -f 'src/binding/fortran/mpif_h/comm_connectf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_connectf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commdiscf.lo: src/binding/fortran/mpif_h/commdiscf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commdiscf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdiscf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commdiscf.lo `test -f 'src/binding/fortran/mpif_h/commdiscf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commdiscf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdiscf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdiscf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commdiscf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commdiscf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commdiscf.lo `test -f 'src/binding/fortran/mpif_h/commdiscf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commdiscf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commparentf.lo: src/binding/fortran/mpif_h/commparentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commparentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commparentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commparentf.lo `test -f 'src/binding/fortran/mpif_h/commparentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commparentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commparentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commparentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commparentf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commparentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commparentf.lo `test -f 'src/binding/fortran/mpif_h/commparentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commparentf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_joinf.lo: src/binding/fortran/mpif_h/comm_joinf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_joinf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_joinf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_joinf.lo `test -f 'src/binding/fortran/mpif_h/comm_joinf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_joinf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_joinf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_joinf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_joinf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_joinf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_joinf.lo `test -f 'src/binding/fortran/mpif_h/comm_joinf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_joinf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_spawnf.lo: src/binding/fortran/mpif_h/comm_spawnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_spawnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_spawnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_spawnf.lo `test -f 'src/binding/fortran/mpif_h/comm_spawnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_spawnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_spawnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_spawnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_spawnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_spawnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_spawnf.lo `test -f 'src/binding/fortran/mpif_h/comm_spawnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_spawnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-spawnmultf.lo: src/binding/fortran/mpif_h/spawnmultf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-spawnmultf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-spawnmultf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-spawnmultf.lo `test -f 'src/binding/fortran/mpif_h/spawnmultf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/spawnmultf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-spawnmultf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-spawnmultf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/spawnmultf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-spawnmultf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-spawnmultf.lo `test -f 'src/binding/fortran/mpif_h/spawnmultf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/spawnmultf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-lookup_namef.lo: src/binding/fortran/mpif_h/lookup_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-lookup_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-lookup_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-lookup_namef.lo `test -f 'src/binding/fortran/mpif_h/lookup_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/lookup_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-lookup_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-lookup_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/lookup_namef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-lookup_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-lookup_namef.lo `test -f 'src/binding/fortran/mpif_h/lookup_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/lookup_namef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-open_portf.lo: src/binding/fortran/mpif_h/open_portf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-open_portf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-open_portf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-open_portf.lo `test -f 'src/binding/fortran/mpif_h/open_portf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/open_portf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-open_portf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-open_portf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/open_portf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-open_portf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-open_portf.lo `test -f 'src/binding/fortran/mpif_h/open_portf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/open_portf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-publish_namef.lo: src/binding/fortran/mpif_h/publish_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-publish_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-publish_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-publish_namef.lo `test -f 'src/binding/fortran/mpif_h/publish_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/publish_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-publish_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-publish_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/publish_namef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-publish_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-publish_namef.lo `test -f 'src/binding/fortran/mpif_h/publish_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/publish_namef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-unpubnamef.lo: src/binding/fortran/mpif_h/unpubnamef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-unpubnamef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpubnamef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-unpubnamef.lo `test -f 'src/binding/fortran/mpif_h/unpubnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpubnamef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpubnamef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpubnamef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/unpubnamef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-unpubnamef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-unpubnamef.lo `test -f 'src/binding/fortran/mpif_h/unpubnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpubnamef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_infof.lo: src/binding/fortran/mpif_h/comm_set_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_set_infof.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_infof.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_infof.lo: src/binding/fortran/mpif_h/comm_get_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_get_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_get_infof.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_infof.lo `test -f 'src/binding/fortran/mpif_h/comm_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_get_infof.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-accumulatef.lo: src/binding/fortran/mpif_h/accumulatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-accumulatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-accumulatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-accumulatef.lo `test -f 'src/binding/fortran/mpif_h/accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/accumulatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-accumulatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-accumulatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/accumulatef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-accumulatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-accumulatef.lo `test -f 'src/binding/fortran/mpif_h/accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/accumulatef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-getf.lo: src/binding/fortran/mpif_h/getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-getf.lo `test -f 'src/binding/fortran/mpif_h/getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/getf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-getf.lo `test -f 'src/binding/fortran/mpif_h/getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-putf.lo: src/binding/fortran/mpif_h/putf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-putf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-putf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-putf.lo `test -f 'src/binding/fortran/mpif_h/putf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/putf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-putf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-putf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/putf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-putf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-putf.lo `test -f 'src/binding/fortran/mpif_h/putf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/putf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_completef.lo: src/binding/fortran/mpif_h/win_completef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_completef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_completef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_completef.lo `test -f 'src/binding/fortran/mpif_h/win_completef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_completef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_completef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_completef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_completef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_completef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_completef.lo `test -f 'src/binding/fortran/mpif_h/win_completef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_completef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_createf.lo: src/binding/fortran/mpif_h/win_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_createf.lo `test -f 'src/binding/fortran/mpif_h/win_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_createf.lo `test -f 'src/binding/fortran/mpif_h/win_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_fencef.lo: src/binding/fortran/mpif_h/win_fencef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_fencef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_fencef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_fencef.lo `test -f 'src/binding/fortran/mpif_h/win_fencef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_fencef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_fencef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_fencef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_fencef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_fencef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_fencef.lo `test -f 'src/binding/fortran/mpif_h/win_fencef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_fencef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_freef.lo: src/binding/fortran/mpif_h/win_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_freef.lo `test -f 'src/binding/fortran/mpif_h/win_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_freef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_freef.lo `test -f 'src/binding/fortran/mpif_h/win_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_freef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_groupf.lo: src/binding/fortran/mpif_h/win_get_groupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_groupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_groupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_groupf.lo `test -f 'src/binding/fortran/mpif_h/win_get_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_groupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_groupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_groupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_get_groupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_groupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_groupf.lo `test -f 'src/binding/fortran/mpif_h/win_get_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_groupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_lockf.lo: src/binding/fortran/mpif_h/win_lockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_lockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_lockf.lo `test -f 'src/binding/fortran/mpif_h/win_lockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_lockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_lockf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_lockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_lockf.lo `test -f 'src/binding/fortran/mpif_h/win_lockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_lockf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_postf.lo: src/binding/fortran/mpif_h/win_postf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_postf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_postf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_postf.lo `test -f 'src/binding/fortran/mpif_h/win_postf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_postf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_postf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_postf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_postf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_postf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_postf.lo `test -f 'src/binding/fortran/mpif_h/win_postf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_postf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_startf.lo: src/binding/fortran/mpif_h/win_startf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_startf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_startf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_startf.lo `test -f 'src/binding/fortran/mpif_h/win_startf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_startf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_startf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_startf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_startf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_startf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_startf.lo `test -f 'src/binding/fortran/mpif_h/win_startf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_startf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_testf.lo: src/binding/fortran/mpif_h/win_testf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_testf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_testf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_testf.lo `test -f 'src/binding/fortran/mpif_h/win_testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_testf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_testf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_testf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_testf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_testf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_testf.lo `test -f 'src/binding/fortran/mpif_h/win_testf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_testf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlockf.lo: src/binding/fortran/mpif_h/win_unlockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlockf.lo `test -f 'src/binding/fortran/mpif_h/win_unlockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_unlockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_unlockf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlockf.lo `test -f 'src/binding/fortran/mpif_h/win_unlockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_unlockf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_waitf.lo: src/binding/fortran/mpif_h/win_waitf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_waitf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_waitf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_waitf.lo `test -f 'src/binding/fortran/mpif_h/win_waitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_waitf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_waitf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_waitf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_waitf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_waitf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_waitf.lo `test -f 'src/binding/fortran/mpif_h/win_waitf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_waitf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocatef.lo: src/binding/fortran/mpif_h/win_allocatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocatef.lo `test -f 'src/binding/fortran/mpif_h/win_allocatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_allocatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_allocatef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocatef.lo `test -f 'src/binding/fortran/mpif_h/win_allocatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_allocatef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocate_sharedf.lo: src/binding/fortran/mpif_h/win_allocate_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocate_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocate_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocate_sharedf.lo `test -f 'src/binding/fortran/mpif_h/win_allocate_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_allocate_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocate_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocate_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_allocate_sharedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocate_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_allocate_sharedf.lo `test -f 'src/binding/fortran/mpif_h/win_allocate_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_allocate_sharedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_shared_queryf.lo: src/binding/fortran/mpif_h/win_shared_queryf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_shared_queryf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_shared_queryf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_shared_queryf.lo `test -f 'src/binding/fortran/mpif_h/win_shared_queryf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_shared_queryf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_shared_queryf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_shared_queryf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_shared_queryf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_shared_queryf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_shared_queryf.lo `test -f 'src/binding/fortran/mpif_h/win_shared_queryf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_shared_queryf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_create_dynamicf.lo: src/binding/fortran/mpif_h/win_create_dynamicf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_create_dynamicf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_create_dynamicf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_create_dynamicf.lo `test -f 'src/binding/fortran/mpif_h/win_create_dynamicf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_create_dynamicf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_create_dynamicf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_create_dynamicf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_create_dynamicf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_create_dynamicf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_create_dynamicf.lo `test -f 'src/binding/fortran/mpif_h/win_create_dynamicf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_create_dynamicf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_attachf.lo: src/binding/fortran/mpif_h/win_attachf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_attachf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_attachf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_attachf.lo `test -f 'src/binding/fortran/mpif_h/win_attachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_attachf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_attachf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_attachf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_attachf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_attachf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_attachf.lo `test -f 'src/binding/fortran/mpif_h/win_attachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_attachf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_detachf.lo: src/binding/fortran/mpif_h/win_detachf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_detachf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_detachf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_detachf.lo `test -f 'src/binding/fortran/mpif_h/win_detachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_detachf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_detachf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_detachf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_detachf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_detachf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_detachf.lo `test -f 'src/binding/fortran/mpif_h/win_detachf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_detachf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_infof.lo: src/binding/fortran/mpif_h/win_get_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_infof.lo `test -f 'src/binding/fortran/mpif_h/win_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_get_infof.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_infof.lo `test -f 'src/binding/fortran/mpif_h/win_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_infof.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_infof.lo: src/binding/fortran/mpif_h/win_set_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_infof.lo `test -f 'src/binding/fortran/mpif_h/win_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_set_infof.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_infof.lo `test -f 'src/binding/fortran/mpif_h/win_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_infof.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-get_accumulatef.lo: src/binding/fortran/mpif_h/get_accumulatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-get_accumulatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_accumulatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_accumulatef.lo `test -f 'src/binding/fortran/mpif_h/get_accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_accumulatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_accumulatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_accumulatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_accumulatef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-get_accumulatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_accumulatef.lo `test -f 'src/binding/fortran/mpif_h/get_accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_accumulatef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-fetch_and_opf.lo: src/binding/fortran/mpif_h/fetch_and_opf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-fetch_and_opf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fetch_and_opf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-fetch_and_opf.lo `test -f 'src/binding/fortran/mpif_h/fetch_and_opf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fetch_and_opf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fetch_and_opf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fetch_and_opf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/fetch_and_opf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-fetch_and_opf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-fetch_and_opf.lo `test -f 'src/binding/fortran/mpif_h/fetch_and_opf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fetch_and_opf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-compare_and_swapf.lo: src/binding/fortran/mpif_h/compare_and_swapf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-compare_and_swapf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-compare_and_swapf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-compare_and_swapf.lo `test -f 'src/binding/fortran/mpif_h/compare_and_swapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/compare_and_swapf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-compare_and_swapf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-compare_and_swapf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/compare_and_swapf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-compare_and_swapf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-compare_and_swapf.lo `test -f 'src/binding/fortran/mpif_h/compare_and_swapf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/compare_and_swapf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-rputf.lo: src/binding/fortran/mpif_h/rputf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-rputf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rputf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rputf.lo `test -f 'src/binding/fortran/mpif_h/rputf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rputf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rputf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rputf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rputf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-rputf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rputf.lo `test -f 'src/binding/fortran/mpif_h/rputf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rputf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-rgetf.lo: src/binding/fortran/mpif_h/rgetf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-rgetf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rgetf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rgetf.lo `test -f 'src/binding/fortran/mpif_h/rgetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rgetf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rgetf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rgetf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rgetf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-rgetf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rgetf.lo `test -f 'src/binding/fortran/mpif_h/rgetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rgetf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-raccumulatef.lo: src/binding/fortran/mpif_h/raccumulatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-raccumulatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-raccumulatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-raccumulatef.lo `test -f 'src/binding/fortran/mpif_h/raccumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/raccumulatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-raccumulatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-raccumulatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/raccumulatef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-raccumulatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-raccumulatef.lo `test -f 'src/binding/fortran/mpif_h/raccumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/raccumulatef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-rget_accumulatef.lo: src/binding/fortran/mpif_h/rget_accumulatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-rget_accumulatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rget_accumulatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rget_accumulatef.lo `test -f 'src/binding/fortran/mpif_h/rget_accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rget_accumulatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rget_accumulatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rget_accumulatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/rget_accumulatef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-rget_accumulatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-rget_accumulatef.lo `test -f 'src/binding/fortran/mpif_h/rget_accumulatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/rget_accumulatef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_lock_allf.lo: src/binding/fortran/mpif_h/win_lock_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_lock_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lock_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_lock_allf.lo `test -f 'src/binding/fortran/mpif_h/win_lock_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_lock_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lock_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lock_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_lock_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_lock_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_lock_allf.lo `test -f 'src/binding/fortran/mpif_h/win_lock_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_lock_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlock_allf.lo: src/binding/fortran/mpif_h/win_unlock_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlock_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlock_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlock_allf.lo `test -f 'src/binding/fortran/mpif_h/win_unlock_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_unlock_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlock_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlock_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_unlock_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlock_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_unlock_allf.lo `test -f 'src/binding/fortran/mpif_h/win_unlock_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_unlock_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_flushf.lo: src/binding/fortran/mpif_h/win_flushf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_flushf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flushf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_flushf.lo `test -f 'src/binding/fortran/mpif_h/win_flushf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flushf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flushf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flushf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_flushf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_flushf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_flushf.lo `test -f 'src/binding/fortran/mpif_h/win_flushf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flushf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_allf.lo: src/binding/fortran/mpif_h/win_flush_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_allf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_flush_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_allf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_localf.lo: src/binding/fortran/mpif_h/win_flush_localf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_localf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_localf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_localf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_localf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_localf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_localf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_localf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_flush_localf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_localf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_localf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_localf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_localf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_local_allf.lo: src/binding/fortran/mpif_h/win_flush_local_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_local_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_local_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_local_allf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_local_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_local_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_local_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_local_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_flush_local_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_local_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_flush_local_allf.lo `test -f 'src/binding/fortran/mpif_h/win_flush_local_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_flush_local_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_syncf.lo: src/binding/fortran/mpif_h/win_syncf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_syncf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_syncf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_syncf.lo `test -f 'src/binding/fortran/mpif_h/win_syncf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_syncf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_syncf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_syncf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_syncf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_syncf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_syncf.lo `test -f 'src/binding/fortran/mpif_h/win_syncf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_syncf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-adderrclassf.lo: src/binding/fortran/mpif_h/adderrclassf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-adderrclassf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrclassf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-adderrclassf.lo `test -f 'src/binding/fortran/mpif_h/adderrclassf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrclassf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrclassf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrclassf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/adderrclassf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-adderrclassf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-adderrclassf.lo `test -f 'src/binding/fortran/mpif_h/adderrclassf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrclassf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-adderrcodef.lo: src/binding/fortran/mpif_h/adderrcodef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-adderrcodef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrcodef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-adderrcodef.lo `test -f 'src/binding/fortran/mpif_h/adderrcodef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrcodef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrcodef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrcodef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/adderrcodef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-adderrcodef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-adderrcodef.lo `test -f 'src/binding/fortran/mpif_h/adderrcodef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrcodef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-adderrstringf.lo: src/binding/fortran/mpif_h/adderrstringf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-adderrstringf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrstringf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-adderrstringf.lo `test -f 'src/binding/fortran/mpif_h/adderrstringf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrstringf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrstringf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrstringf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/adderrstringf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-adderrstringf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-adderrstringf.lo `test -f 'src/binding/fortran/mpif_h/adderrstringf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/adderrstringf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commcallerrf.lo: src/binding/fortran/mpif_h/commcallerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commcallerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcallerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commcallerrf.lo `test -f 'src/binding/fortran/mpif_h/commcallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commcallerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcallerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcallerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commcallerrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commcallerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commcallerrf.lo `test -f 'src/binding/fortran/mpif_h/commcallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commcallerrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commnewkeyf.lo: src/binding/fortran/mpif_h/commnewkeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commnewkeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commnewkeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commnewkeyf.lo `test -f 'src/binding/fortran/mpif_h/commnewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commnewkeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commnewkeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commnewkeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commnewkeyf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commnewkeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commnewkeyf.lo `test -f 'src/binding/fortran/mpif_h/commnewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commnewkeyf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commdelattrf.lo: src/binding/fortran/mpif_h/commdelattrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commdelattrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdelattrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commdelattrf.lo `test -f 'src/binding/fortran/mpif_h/commdelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commdelattrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdelattrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdelattrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commdelattrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commdelattrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commdelattrf.lo `test -f 'src/binding/fortran/mpif_h/commdelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commdelattrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commfreekeyf.lo: src/binding/fortran/mpif_h/commfreekeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commfreekeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commfreekeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commfreekeyf.lo `test -f 'src/binding/fortran/mpif_h/commfreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commfreekeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commfreekeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commfreekeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commfreekeyf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commfreekeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commfreekeyf.lo `test -f 'src/binding/fortran/mpif_h/commfreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commfreekeyf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_attrf.lo: src/binding/fortran/mpif_h/comm_get_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/comm_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_get_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_get_attrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/comm_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_get_attrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commgetnamf.lo: src/binding/fortran/mpif_h/commgetnamf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commgetnamf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgetnamf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commgetnamf.lo `test -f 'src/binding/fortran/mpif_h/commgetnamf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commgetnamf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgetnamf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgetnamf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commgetnamf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commgetnamf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commgetnamf.lo `test -f 'src/binding/fortran/mpif_h/commgetnamf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commgetnamf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_attrf.lo: src/binding/fortran/mpif_h/comm_set_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_attrf.lo `test -f 'src/binding/fortran/mpif_h/comm_set_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_set_attrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_attrf.lo `test -f 'src/binding/fortran/mpif_h/comm_set_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_attrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_namef.lo: src/binding/fortran/mpif_h/comm_set_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_namef.lo `test -f 'src/binding/fortran/mpif_h/comm_set_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_set_namef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_set_namef.lo `test -f 'src/binding/fortran/mpif_h/comm_set_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_set_namef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-filecallerrf.lo: src/binding/fortran/mpif_h/filecallerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-filecallerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecallerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-filecallerrf.lo `test -f 'src/binding/fortran/mpif_h/filecallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filecallerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecallerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecallerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/filecallerrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-filecallerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-filecallerrf.lo `test -f 'src/binding/fortran/mpif_h/filecallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filecallerrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-greqcompletef.lo: src/binding/fortran/mpif_h/greqcompletef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-greqcompletef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqcompletef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-greqcompletef.lo `test -f 'src/binding/fortran/mpif_h/greqcompletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/greqcompletef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqcompletef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqcompletef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/greqcompletef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-greqcompletef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-greqcompletef.lo `test -f 'src/binding/fortran/mpif_h/greqcompletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/greqcompletef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-greqstartf.lo: src/binding/fortran/mpif_h/greqstartf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-greqstartf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqstartf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-greqstartf.lo `test -f 'src/binding/fortran/mpif_h/greqstartf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/greqstartf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqstartf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqstartf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/greqstartf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-greqstartf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-greqstartf.lo `test -f 'src/binding/fortran/mpif_h/greqstartf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/greqstartf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-isthrmainf.lo: src/binding/fortran/mpif_h/isthrmainf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-isthrmainf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isthrmainf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-isthrmainf.lo `test -f 'src/binding/fortran/mpif_h/isthrmainf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/isthrmainf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isthrmainf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isthrmainf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/isthrmainf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-isthrmainf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-isthrmainf.lo `test -f 'src/binding/fortran/mpif_h/isthrmainf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/isthrmainf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-query_threadf.lo: src/binding/fortran/mpif_h/query_threadf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-query_threadf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-query_threadf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-query_threadf.lo `test -f 'src/binding/fortran/mpif_h/query_threadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/query_threadf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-query_threadf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-query_threadf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/query_threadf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-query_threadf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-query_threadf.lo `test -f 'src/binding/fortran/mpif_h/query_threadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/query_threadf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-statgetclf.lo: src/binding/fortran/mpif_h/statgetclf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-statgetclf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statgetclf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-statgetclf.lo `test -f 'src/binding/fortran/mpif_h/statgetclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statgetclf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statgetclf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statgetclf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/statgetclf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-statgetclf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-statgetclf.lo `test -f 'src/binding/fortran/mpif_h/statgetclf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statgetclf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-statsetelf.lo: src/binding/fortran/mpif_h/statsetelf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-statsetelf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statsetelf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-statsetelf.lo `test -f 'src/binding/fortran/mpif_h/statsetelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statsetelf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statsetelf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statsetelf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/statsetelf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-statsetelf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-statsetelf.lo `test -f 'src/binding/fortran/mpif_h/statsetelf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/statsetelf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typenewkeyf.lo: src/binding/fortran/mpif_h/typenewkeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typenewkeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typenewkeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typenewkeyf.lo `test -f 'src/binding/fortran/mpif_h/typenewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typenewkeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typenewkeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typenewkeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typenewkeyf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typenewkeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typenewkeyf.lo `test -f 'src/binding/fortran/mpif_h/typenewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typenewkeyf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typedelattrf.lo: src/binding/fortran/mpif_h/typedelattrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typedelattrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedelattrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typedelattrf.lo `test -f 'src/binding/fortran/mpif_h/typedelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typedelattrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedelattrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedelattrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typedelattrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typedelattrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typedelattrf.lo `test -f 'src/binding/fortran/mpif_h/typedelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typedelattrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_dupf.lo: src/binding/fortran/mpif_h/type_dupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_dupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_dupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_dupf.lo `test -f 'src/binding/fortran/mpif_h/type_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_dupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_dupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_dupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_dupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_dupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_dupf.lo `test -f 'src/binding/fortran/mpif_h/type_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_dupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typefreekeyf.lo: src/binding/fortran/mpif_h/typefreekeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typefreekeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typefreekeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typefreekeyf.lo `test -f 'src/binding/fortran/mpif_h/typefreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typefreekeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typefreekeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typefreekeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typefreekeyf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typefreekeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typefreekeyf.lo `test -f 'src/binding/fortran/mpif_h/typefreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typefreekeyf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_attrf.lo: src/binding/fortran/mpif_h/type_get_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/type_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_get_attrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/type_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_attrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typegetcntsf.lo: src/binding/fortran/mpif_h/typegetcntsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typegetcntsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetcntsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegetcntsf.lo `test -f 'src/binding/fortran/mpif_h/typegetcntsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetcntsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetcntsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetcntsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegetcntsf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typegetcntsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegetcntsf.lo `test -f 'src/binding/fortran/mpif_h/typegetcntsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetcntsf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typegetenvf.lo: src/binding/fortran/mpif_h/typegetenvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typegetenvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetenvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegetenvf.lo `test -f 'src/binding/fortran/mpif_h/typegetenvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetenvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetenvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetenvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegetenvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typegetenvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegetenvf.lo `test -f 'src/binding/fortran/mpif_h/typegetenvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetenvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typegnamef.lo: src/binding/fortran/mpif_h/typegnamef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typegnamef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegnamef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegnamef.lo `test -f 'src/binding/fortran/mpif_h/typegnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegnamef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegnamef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegnamef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegnamef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typegnamef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegnamef.lo `test -f 'src/binding/fortran/mpif_h/typegnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegnamef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typesetattrf.lo: src/binding/fortran/mpif_h/typesetattrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typesetattrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetattrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typesetattrf.lo `test -f 'src/binding/fortran/mpif_h/typesetattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typesetattrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetattrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetattrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typesetattrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typesetattrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typesetattrf.lo `test -f 'src/binding/fortran/mpif_h/typesetattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typesetattrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typesetnamef.lo: src/binding/fortran/mpif_h/typesetnamef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typesetnamef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetnamef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typesetnamef.lo `test -f 'src/binding/fortran/mpif_h/typesetnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typesetnamef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetnamef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetnamef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typesetnamef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typesetnamef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typesetnamef.lo `test -f 'src/binding/fortran/mpif_h/typesetnamef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typesetnamef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_match_sizef.lo: src/binding/fortran/mpif_h/type_match_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_match_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_match_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_match_sizef.lo `test -f 'src/binding/fortran/mpif_h/type_match_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_match_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_match_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_match_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_match_sizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_match_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_match_sizef.lo `test -f 'src/binding/fortran/mpif_h/type_match_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_match_sizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-wincallerrf.lo: src/binding/fortran/mpif_h/wincallerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-wincallerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincallerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wincallerrf.lo `test -f 'src/binding/fortran/mpif_h/wincallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wincallerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincallerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincallerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wincallerrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-wincallerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wincallerrf.lo `test -f 'src/binding/fortran/mpif_h/wincallerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wincallerrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-winnewkeyf.lo: src/binding/fortran/mpif_h/winnewkeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-winnewkeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winnewkeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-winnewkeyf.lo `test -f 'src/binding/fortran/mpif_h/winnewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winnewkeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winnewkeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winnewkeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/winnewkeyf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-winnewkeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-winnewkeyf.lo `test -f 'src/binding/fortran/mpif_h/winnewkeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winnewkeyf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-windelattrf.lo: src/binding/fortran/mpif_h/windelattrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-windelattrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-windelattrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-windelattrf.lo `test -f 'src/binding/fortran/mpif_h/windelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/windelattrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-windelattrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-windelattrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/windelattrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-windelattrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-windelattrf.lo `test -f 'src/binding/fortran/mpif_h/windelattrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/windelattrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-winfreekeyf.lo: src/binding/fortran/mpif_h/winfreekeyf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-winfreekeyf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winfreekeyf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-winfreekeyf.lo `test -f 'src/binding/fortran/mpif_h/winfreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winfreekeyf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winfreekeyf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winfreekeyf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/winfreekeyf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-winfreekeyf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-winfreekeyf.lo `test -f 'src/binding/fortran/mpif_h/winfreekeyf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winfreekeyf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_attrf.lo: src/binding/fortran/mpif_h/win_get_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/win_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_get_attrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_attrf.lo `test -f 'src/binding/fortran/mpif_h/win_get_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_attrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_namef.lo: src/binding/fortran/mpif_h/win_get_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_namef.lo `test -f 'src/binding/fortran/mpif_h/win_get_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_get_namef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_get_namef.lo `test -f 'src/binding/fortran/mpif_h/win_get_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_get_namef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_attrf.lo: src/binding/fortran/mpif_h/win_set_attrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_attrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_attrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_attrf.lo `test -f 'src/binding/fortran/mpif_h/win_set_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_attrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_attrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_attrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_set_attrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_attrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_attrf.lo `test -f 'src/binding/fortran/mpif_h/win_set_attrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_attrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_namef.lo: src/binding/fortran/mpif_h/win_set_namef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_namef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_namef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_namef.lo `test -f 'src/binding/fortran/mpif_h/win_set_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_namef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_namef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_namef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/win_set_namef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_namef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-win_set_namef.lo `test -f 'src/binding/fortran/mpif_h/win_set_namef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/win_set_namef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-alloc_memf.lo: src/binding/fortran/mpif_h/alloc_memf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-alloc_memf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alloc_memf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-alloc_memf.lo `test -f 'src/binding/fortran/mpif_h/alloc_memf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alloc_memf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alloc_memf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alloc_memf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/alloc_memf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-alloc_memf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-alloc_memf.lo `test -f 'src/binding/fortran/mpif_h/alloc_memf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/alloc_memf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commcreerrf.lo: src/binding/fortran/mpif_h/commcreerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commcreerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcreerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commcreerrf.lo `test -f 'src/binding/fortran/mpif_h/commcreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commcreerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcreerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcreerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commcreerrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commcreerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commcreerrf.lo `test -f 'src/binding/fortran/mpif_h/commcreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commcreerrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commgeterrf.lo: src/binding/fortran/mpif_h/commgeterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commgeterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgeterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commgeterrf.lo `test -f 'src/binding/fortran/mpif_h/commgeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commgeterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgeterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgeterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commgeterrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commgeterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commgeterrf.lo `test -f 'src/binding/fortran/mpif_h/commgeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commgeterrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-commseterrf.lo: src/binding/fortran/mpif_h/commseterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-commseterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commseterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commseterrf.lo `test -f 'src/binding/fortran/mpif_h/commseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commseterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commseterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commseterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/commseterrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-commseterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-commseterrf.lo `test -f 'src/binding/fortran/mpif_h/commseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/commseterrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-filecreerrf.lo: src/binding/fortran/mpif_h/filecreerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-filecreerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecreerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-filecreerrf.lo `test -f 'src/binding/fortran/mpif_h/filecreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filecreerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecreerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecreerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/filecreerrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-filecreerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-filecreerrf.lo `test -f 'src/binding/fortran/mpif_h/filecreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filecreerrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-filegeterrf.lo: src/binding/fortran/mpif_h/filegeterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-filegeterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filegeterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-filegeterrf.lo `test -f 'src/binding/fortran/mpif_h/filegeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filegeterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filegeterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filegeterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/filegeterrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-filegeterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-filegeterrf.lo `test -f 'src/binding/fortran/mpif_h/filegeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/filegeterrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-fileseterrf.lo: src/binding/fortran/mpif_h/fileseterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-fileseterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fileseterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-fileseterrf.lo `test -f 'src/binding/fortran/mpif_h/fileseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fileseterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fileseterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fileseterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/fileseterrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-fileseterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-fileseterrf.lo `test -f 'src/binding/fortran/mpif_h/fileseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fileseterrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-finalizedf.lo: src/binding/fortran/mpif_h/finalizedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-finalizedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-finalizedf.lo `test -f 'src/binding/fortran/mpif_h/finalizedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/finalizedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/finalizedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-finalizedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-finalizedf.lo `test -f 'src/binding/fortran/mpif_h/finalizedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/finalizedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-free_memf.lo: src/binding/fortran/mpif_h/free_memf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-free_memf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-free_memf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-free_memf.lo `test -f 'src/binding/fortran/mpif_h/free_memf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/free_memf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-free_memf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-free_memf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/free_memf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-free_memf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-free_memf.lo `test -f 'src/binding/fortran/mpif_h/free_memf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/free_memf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-info_createf.lo: src/binding/fortran/mpif_h/info_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-info_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_createf.lo `test -f 'src/binding/fortran/mpif_h/info_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-info_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_createf.lo `test -f 'src/binding/fortran/mpif_h/info_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-info_deletef.lo: src/binding/fortran/mpif_h/info_deletef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-info_deletef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_deletef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_deletef.lo `test -f 'src/binding/fortran/mpif_h/info_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_deletef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_deletef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_deletef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_deletef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-info_deletef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_deletef.lo `test -f 'src/binding/fortran/mpif_h/info_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_deletef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-info_dupf.lo: src/binding/fortran/mpif_h/info_dupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-info_dupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_dupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_dupf.lo `test -f 'src/binding/fortran/mpif_h/info_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_dupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_dupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_dupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_dupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-info_dupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_dupf.lo `test -f 'src/binding/fortran/mpif_h/info_dupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_dupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-info_freef.lo: src/binding/fortran/mpif_h/info_freef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-info_freef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_freef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_freef.lo `test -f 'src/binding/fortran/mpif_h/info_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_freef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_freef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_freef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_freef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-info_freef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_freef.lo `test -f 'src/binding/fortran/mpif_h/info_freef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_freef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-info_getf.lo: src/binding/fortran/mpif_h/info_getf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-info_getf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_getf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_getf.lo `test -f 'src/binding/fortran/mpif_h/info_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_getf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_getf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_getf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_getf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-info_getf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_getf.lo `test -f 'src/binding/fortran/mpif_h/info_getf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_getf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-infognkf.lo: src/binding/fortran/mpif_h/infognkf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-infognkf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognkf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-infognkf.lo `test -f 'src/binding/fortran/mpif_h/infognkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infognkf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognkf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognkf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/infognkf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-infognkf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-infognkf.lo `test -f 'src/binding/fortran/mpif_h/infognkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infognkf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-infognthkf.lo: src/binding/fortran/mpif_h/infognthkf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-infognthkf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognthkf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-infognthkf.lo `test -f 'src/binding/fortran/mpif_h/infognthkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infognthkf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognthkf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognthkf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/infognthkf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-infognthkf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-infognthkf.lo `test -f 'src/binding/fortran/mpif_h/infognthkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infognthkf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-infovallenf.lo: src/binding/fortran/mpif_h/infovallenf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-infovallenf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infovallenf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-infovallenf.lo `test -f 'src/binding/fortran/mpif_h/infovallenf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infovallenf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infovallenf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infovallenf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/infovallenf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-infovallenf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-infovallenf.lo `test -f 'src/binding/fortran/mpif_h/infovallenf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/infovallenf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-info_setf.lo: src/binding/fortran/mpif_h/info_setf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-info_setf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_setf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_setf.lo `test -f 'src/binding/fortran/mpif_h/info_setf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_setf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_setf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_setf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/info_setf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-info_setf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-info_setf.lo `test -f 'src/binding/fortran/mpif_h/info_setf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/info_setf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-pack_externalf.lo: src/binding/fortran/mpif_h/pack_externalf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-pack_externalf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_externalf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-pack_externalf.lo `test -f 'src/binding/fortran/mpif_h/pack_externalf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pack_externalf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_externalf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_externalf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/pack_externalf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-pack_externalf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-pack_externalf.lo `test -f 'src/binding/fortran/mpif_h/pack_externalf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pack_externalf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-packesizef.lo: src/binding/fortran/mpif_h/packesizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-packesizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packesizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-packesizef.lo `test -f 'src/binding/fortran/mpif_h/packesizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/packesizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packesizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packesizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/packesizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-packesizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-packesizef.lo `test -f 'src/binding/fortran/mpif_h/packesizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/packesizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-reqgetstatf.lo: src/binding/fortran/mpif_h/reqgetstatf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-reqgetstatf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reqgetstatf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-reqgetstatf.lo `test -f 'src/binding/fortran/mpif_h/reqgetstatf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reqgetstatf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reqgetstatf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reqgetstatf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/reqgetstatf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-reqgetstatf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-reqgetstatf.lo `test -f 'src/binding/fortran/mpif_h/reqgetstatf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reqgetstatf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typedarrayf.lo: src/binding/fortran/mpif_h/typedarrayf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typedarrayf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedarrayf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typedarrayf.lo `test -f 'src/binding/fortran/mpif_h/typedarrayf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typedarrayf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedarrayf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedarrayf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typedarrayf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typedarrayf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typedarrayf.lo `test -f 'src/binding/fortran/mpif_h/typedarrayf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typedarrayf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typechindf.lo: src/binding/fortran/mpif_h/typechindf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typechindf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechindf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typechindf.lo `test -f 'src/binding/fortran/mpif_h/typechindf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typechindf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechindf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechindf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typechindf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typechindf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typechindf.lo `test -f 'src/binding/fortran/mpif_h/typechindf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typechindf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typechvecf.lo: src/binding/fortran/mpif_h/typechvecf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typechvecf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechvecf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typechvecf.lo `test -f 'src/binding/fortran/mpif_h/typechvecf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typechvecf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechvecf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechvecf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typechvecf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typechvecf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typechvecf.lo `test -f 'src/binding/fortran/mpif_h/typechvecf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typechvecf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typecindbf.lo: src/binding/fortran/mpif_h/typecindbf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typecindbf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecindbf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecindbf.lo `test -f 'src/binding/fortran/mpif_h/typecindbf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecindbf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecindbf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecindbf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecindbf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typecindbf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecindbf.lo `test -f 'src/binding/fortran/mpif_h/typecindbf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecindbf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_create_hindexed_blockf.lo: src/binding/fortran/mpif_h/type_create_hindexed_blockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_create_hindexed_blockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_blockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_create_hindexed_blockf.lo `test -f 'src/binding/fortran/mpif_h/type_create_hindexed_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_create_hindexed_blockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_blockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_blockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_create_hindexed_blockf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_create_hindexed_blockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_create_hindexed_blockf.lo `test -f 'src/binding/fortran/mpif_h/type_create_hindexed_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_create_hindexed_blockf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typecresizef.lo: src/binding/fortran/mpif_h/typecresizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typecresizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecresizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecresizef.lo `test -f 'src/binding/fortran/mpif_h/typecresizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecresizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecresizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecresizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecresizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typecresizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecresizef.lo `test -f 'src/binding/fortran/mpif_h/typecresizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecresizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typecstructf.lo: src/binding/fortran/mpif_h/typecstructf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typecstructf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecstructf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecstructf.lo `test -f 'src/binding/fortran/mpif_h/typecstructf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecstructf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecstructf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecstructf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecstructf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typecstructf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecstructf.lo `test -f 'src/binding/fortran/mpif_h/typecstructf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecstructf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typecsubarrf.lo: src/binding/fortran/mpif_h/typecsubarrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typecsubarrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecsubarrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecsubarrf.lo `test -f 'src/binding/fortran/mpif_h/typecsubarrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecsubarrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecsubarrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecsubarrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typecsubarrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typecsubarrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typecsubarrf.lo `test -f 'src/binding/fortran/mpif_h/typecsubarrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typecsubarrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typegetextentf.lo: src/binding/fortran/mpif_h/typegetextentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typegetextentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetextentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegetextentf.lo `test -f 'src/binding/fortran/mpif_h/typegetextentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetextentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetextentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetextentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegetextentf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typegetextentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegetextentf.lo `test -f 'src/binding/fortran/mpif_h/typegetextentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegetextentf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-typegtextf.lo: src/binding/fortran/mpif_h/typegtextf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-typegtextf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegtextf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegtextf.lo `test -f 'src/binding/fortran/mpif_h/typegtextf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegtextf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegtextf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegtextf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/typegtextf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-typegtextf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-typegtextf.lo `test -f 'src/binding/fortran/mpif_h/typegtextf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/typegtextf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-unpackextf.lo: src/binding/fortran/mpif_h/unpackextf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-unpackextf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackextf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-unpackextf.lo `test -f 'src/binding/fortran/mpif_h/unpackextf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpackextf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackextf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackextf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/unpackextf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-unpackextf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-unpackextf.lo `test -f 'src/binding/fortran/mpif_h/unpackextf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/unpackextf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-wincreerrf.lo: src/binding/fortran/mpif_h/wincreerrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-wincreerrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincreerrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wincreerrf.lo `test -f 'src/binding/fortran/mpif_h/wincreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wincreerrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincreerrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincreerrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wincreerrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-wincreerrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wincreerrf.lo `test -f 'src/binding/fortran/mpif_h/wincreerrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wincreerrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-wingeterrf.lo: src/binding/fortran/mpif_h/wingeterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-wingeterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wingeterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wingeterrf.lo `test -f 'src/binding/fortran/mpif_h/wingeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wingeterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wingeterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wingeterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wingeterrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-wingeterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wingeterrf.lo `test -f 'src/binding/fortran/mpif_h/wingeterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wingeterrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-winseterrf.lo: src/binding/fortran/mpif_h/winseterrf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-winseterrf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winseterrf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-winseterrf.lo `test -f 'src/binding/fortran/mpif_h/winseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winseterrf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winseterrf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winseterrf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/winseterrf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-winseterrf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-winseterrf.lo `test -f 'src/binding/fortran/mpif_h/winseterrf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/winseterrf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_localf.lo: src/binding/fortran/mpif_h/reduce_localf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_localf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_localf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_localf.lo `test -f 'src/binding/fortran/mpif_h/reduce_localf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reduce_localf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_localf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_localf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/reduce_localf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_localf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_localf.lo `test -f 'src/binding/fortran/mpif_h/reduce_localf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reduce_localf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-op_commutativef.lo: src/binding/fortran/mpif_h/op_commutativef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-op_commutativef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_commutativef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-op_commutativef.lo `test -f 'src/binding/fortran/mpif_h/op_commutativef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_commutativef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_commutativef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_commutativef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/op_commutativef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-op_commutativef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-op_commutativef.lo `test -f 'src/binding/fortran/mpif_h/op_commutativef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/op_commutativef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_scatter_blockf.lo: src/binding/fortran/mpif_h/reduce_scatter_blockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_scatter_blockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_blockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_scatter_blockf.lo `test -f 'src/binding/fortran/mpif_h/reduce_scatter_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reduce_scatter_blockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_blockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_blockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/reduce_scatter_blockf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_scatter_blockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-reduce_scatter_blockf.lo `test -f 'src/binding/fortran/mpif_h/reduce_scatter_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/reduce_scatter_blockf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_create_adjacentf.lo: src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_create_adjacentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_create_adjacentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_create_adjacentf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_create_adjacentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_create_adjacentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_create_adjacentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_create_adjacentf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_create_adjacentf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_createf.lo: src/binding/fortran/mpif_h/dist_graph_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_createf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dist_graph_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_createf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighbors_countf.lo: src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighbors_countf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighbors_countf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighbors_countf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighbors_countf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighbors_countf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighbors_countf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighbors_countf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_neighbors_countf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighborsf.lo: src/binding/fortran/mpif_h/dist_graph_neighborsf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighborsf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighborsf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighborsf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_neighborsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_neighborsf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighborsf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighborsf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dist_graph_neighborsf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighborsf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dist_graph_neighborsf.lo `test -f 'src/binding/fortran/mpif_h/dist_graph_neighborsf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dist_graph_neighborsf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-improbef.lo: src/binding/fortran/mpif_h/improbef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-improbef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-improbef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-improbef.lo `test -f 'src/binding/fortran/mpif_h/improbef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/improbef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-improbef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-improbef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/improbef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-improbef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-improbef.lo `test -f 'src/binding/fortran/mpif_h/improbef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/improbef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-imrecvf.lo: src/binding/fortran/mpif_h/imrecvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-imrecvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-imrecvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-imrecvf.lo `test -f 'src/binding/fortran/mpif_h/imrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/imrecvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-imrecvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-imrecvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/imrecvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-imrecvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-imrecvf.lo `test -f 'src/binding/fortran/mpif_h/imrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/imrecvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-mprobef.lo: src/binding/fortran/mpif_h/mprobef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-mprobef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mprobef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-mprobef.lo `test -f 'src/binding/fortran/mpif_h/mprobef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/mprobef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mprobef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mprobef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/mprobef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-mprobef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-mprobef.lo `test -f 'src/binding/fortran/mpif_h/mprobef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/mprobef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-mrecvf.lo: src/binding/fortran/mpif_h/mrecvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-mrecvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mrecvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-mrecvf.lo `test -f 'src/binding/fortran/mpif_h/mrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/mrecvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mrecvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mrecvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/mrecvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-mrecvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-mrecvf.lo `test -f 'src/binding/fortran/mpif_h/mrecvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/mrecvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_idupf.lo: src/binding/fortran/mpif_h/comm_idupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_idupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_idupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_idupf.lo `test -f 'src/binding/fortran/mpif_h/comm_idupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_idupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_idupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_idupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_idupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_idupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_idupf.lo `test -f 'src/binding/fortran/mpif_h/comm_idupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_idupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ibarrierf.lo: src/binding/fortran/mpif_h/ibarrierf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ibarrierf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibarrierf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ibarrierf.lo `test -f 'src/binding/fortran/mpif_h/ibarrierf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibarrierf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibarrierf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibarrierf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ibarrierf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ibarrierf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ibarrierf.lo `test -f 'src/binding/fortran/mpif_h/ibarrierf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibarrierf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ibcastf.lo: src/binding/fortran/mpif_h/ibcastf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ibcastf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibcastf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ibcastf.lo `test -f 'src/binding/fortran/mpif_h/ibcastf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibcastf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibcastf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibcastf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ibcastf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ibcastf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ibcastf.lo `test -f 'src/binding/fortran/mpif_h/ibcastf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ibcastf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-igatherf.lo: src/binding/fortran/mpif_h/igatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-igatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-igatherf.lo `test -f 'src/binding/fortran/mpif_h/igatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/igatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/igatherf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-igatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-igatherf.lo `test -f 'src/binding/fortran/mpif_h/igatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/igatherf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-igathervf.lo: src/binding/fortran/mpif_h/igathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-igathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-igathervf.lo `test -f 'src/binding/fortran/mpif_h/igathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/igathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/igathervf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-igathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-igathervf.lo `test -f 'src/binding/fortran/mpif_h/igathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/igathervf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iscatterf.lo: src/binding/fortran/mpif_h/iscatterf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iscatterf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscatterf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iscatterf.lo `test -f 'src/binding/fortran/mpif_h/iscatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscatterf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscatterf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscatterf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iscatterf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iscatterf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iscatterf.lo `test -f 'src/binding/fortran/mpif_h/iscatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscatterf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iscattervf.lo: src/binding/fortran/mpif_h/iscattervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iscattervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscattervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iscattervf.lo `test -f 'src/binding/fortran/mpif_h/iscattervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscattervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscattervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscattervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iscattervf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iscattervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iscattervf.lo `test -f 'src/binding/fortran/mpif_h/iscattervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscattervf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iallgatherf.lo: src/binding/fortran/mpif_h/iallgatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iallgatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iallgatherf.lo `test -f 'src/binding/fortran/mpif_h/iallgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallgatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iallgatherf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iallgatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iallgatherf.lo `test -f 'src/binding/fortran/mpif_h/iallgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallgatherf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iallgathervf.lo: src/binding/fortran/mpif_h/iallgathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iallgathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iallgathervf.lo `test -f 'src/binding/fortran/mpif_h/iallgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallgathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iallgathervf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iallgathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iallgathervf.lo `test -f 'src/binding/fortran/mpif_h/iallgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallgathervf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallf.lo: src/binding/fortran/mpif_h/ialltoallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ialltoallf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallvf.lo: src/binding/fortran/mpif_h/ialltoallvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallvf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ialltoallvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallvf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallwf.lo: src/binding/fortran/mpif_h/ialltoallwf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallwf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallwf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallwf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallwf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallwf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallwf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ialltoallwf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallwf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ialltoallwf.lo `test -f 'src/binding/fortran/mpif_h/ialltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ialltoallwf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ireducef.lo: src/binding/fortran/mpif_h/ireducef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ireducef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireducef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ireducef.lo `test -f 'src/binding/fortran/mpif_h/ireducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireducef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireducef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireducef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ireducef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ireducef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ireducef.lo `test -f 'src/binding/fortran/mpif_h/ireducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireducef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iallreducef.lo: src/binding/fortran/mpif_h/iallreducef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iallreducef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallreducef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iallreducef.lo `test -f 'src/binding/fortran/mpif_h/iallreducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallreducef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallreducef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallreducef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iallreducef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iallreducef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iallreducef.lo `test -f 'src/binding/fortran/mpif_h/iallreducef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iallreducef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatterf.lo: src/binding/fortran/mpif_h/ireduce_scatterf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatterf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatterf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatterf.lo `test -f 'src/binding/fortran/mpif_h/ireduce_scatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireduce_scatterf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatterf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatterf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ireduce_scatterf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatterf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatterf.lo `test -f 'src/binding/fortran/mpif_h/ireduce_scatterf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireduce_scatterf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatter_blockf.lo: src/binding/fortran/mpif_h/ireduce_scatter_blockf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatter_blockf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_blockf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatter_blockf.lo `test -f 'src/binding/fortran/mpif_h/ireduce_scatter_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireduce_scatter_blockf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_blockf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_blockf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ireduce_scatter_blockf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatter_blockf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ireduce_scatter_blockf.lo `test -f 'src/binding/fortran/mpif_h/ireduce_scatter_blockf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ireduce_scatter_blockf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iscanf.lo: src/binding/fortran/mpif_h/iscanf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iscanf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscanf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iscanf.lo `test -f 'src/binding/fortran/mpif_h/iscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscanf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscanf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscanf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iscanf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iscanf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iscanf.lo `test -f 'src/binding/fortran/mpif_h/iscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iscanf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-iexscanf.lo: src/binding/fortran/mpif_h/iexscanf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-iexscanf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iexscanf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iexscanf.lo `test -f 'src/binding/fortran/mpif_h/iexscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iexscanf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iexscanf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iexscanf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/iexscanf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-iexscanf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-iexscanf.lo `test -f 'src/binding/fortran/mpif_h/iexscanf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/iexscanf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgatherf.lo: src/binding/fortran/mpif_h/ineighbor_allgatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgatherf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_allgatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_allgatherf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgatherf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_allgatherf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgathervf.lo: src/binding/fortran/mpif_h/ineighbor_allgathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgathervf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_allgathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_allgathervf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_allgathervf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_allgathervf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallf.lo: src/binding/fortran/mpif_h/ineighbor_alltoallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_alltoallf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallvf.lo: src/binding/fortran/mpif_h/ineighbor_alltoallvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_alltoallvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallwf.lo: src/binding/fortran/mpif_h/ineighbor_alltoallwf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallwf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallwf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallwf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallwf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallwf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/ineighbor_alltoallwf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallwf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-ineighbor_alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/ineighbor_alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/ineighbor_alltoallwf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgatherf.lo: src/binding/fortran/mpif_h/neighbor_allgatherf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgatherf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgatherf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_allgatherf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_allgatherf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgatherf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgatherf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_allgatherf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_allgatherf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgathervf.lo: src/binding/fortran/mpif_h/neighbor_allgathervf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgathervf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgathervf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgathervf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_allgathervf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgathervf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgathervf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_allgathervf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgathervf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_allgathervf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_allgathervf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_allgathervf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallf.lo: src/binding/fortran/mpif_h/neighbor_alltoallf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_alltoallf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallvf.lo: src/binding/fortran/mpif_h/neighbor_alltoallvf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallvf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallvf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallvf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallvf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallvf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_alltoallvf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallvf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallvf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallvf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallvf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallwf.lo: src/binding/fortran/mpif_h/neighbor_alltoallwf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallwf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallwf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallwf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallwf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallwf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/neighbor_alltoallwf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallwf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-neighbor_alltoallwf.lo `test -f 'src/binding/fortran/mpif_h/neighbor_alltoallwf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/neighbor_alltoallwf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_split_typef.lo: src/binding/fortran/mpif_h/comm_split_typef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_split_typef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_split_typef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_split_typef.lo `test -f 'src/binding/fortran/mpif_h/comm_split_typef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_split_typef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_split_typef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_split_typef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_split_typef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_split_typef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_split_typef.lo `test -f 'src/binding/fortran/mpif_h/comm_split_typef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_split_typef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-get_elements_xf.lo: src/binding/fortran/mpif_h/get_elements_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-get_elements_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elements_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_elements_xf.lo `test -f 'src/binding/fortran/mpif_h/get_elements_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_elements_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elements_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elements_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/get_elements_xf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-get_elements_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-get_elements_xf.lo `test -f 'src/binding/fortran/mpif_h/get_elements_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/get_elements_xf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-status_set_elements_xf.lo: src/binding/fortran/mpif_h/status_set_elements_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-status_set_elements_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-status_set_elements_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-status_set_elements_xf.lo `test -f 'src/binding/fortran/mpif_h/status_set_elements_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/status_set_elements_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-status_set_elements_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-status_set_elements_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/status_set_elements_xf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-status_set_elements_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-status_set_elements_xf.lo `test -f 'src/binding/fortran/mpif_h/status_set_elements_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/status_set_elements_xf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_extent_xf.lo: src/binding/fortran/mpif_h/type_get_extent_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_extent_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_extent_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_extent_xf.lo `test -f 'src/binding/fortran/mpif_h/type_get_extent_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_extent_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_extent_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_extent_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_get_extent_xf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_extent_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_extent_xf.lo `test -f 'src/binding/fortran/mpif_h/type_get_extent_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_extent_xf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_true_extent_xf.lo: src/binding/fortran/mpif_h/type_get_true_extent_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_true_extent_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_true_extent_xf.lo `test -f 'src/binding/fortran/mpif_h/type_get_true_extent_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_true_extent_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_get_true_extent_xf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_true_extent_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_get_true_extent_xf.lo `test -f 'src/binding/fortran/mpif_h/type_get_true_extent_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_get_true_extent_xf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-type_size_xf.lo: src/binding/fortran/mpif_h/type_size_xf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-type_size_xf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_size_xf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_size_xf.lo `test -f 'src/binding/fortran/mpif_h/type_size_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_size_xf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_size_xf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_size_xf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/type_size_xf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-type_size_xf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-type_size_xf.lo `test -f 'src/binding/fortran/mpif_h/type_size_xf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/type_size_xf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_create_groupf.lo: src/binding/fortran/mpif_h/comm_create_groupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_create_groupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_create_groupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_create_groupf.lo `test -f 'src/binding/fortran/mpif_h/comm_create_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_create_groupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_create_groupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_create_groupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_create_groupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_create_groupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_create_groupf.lo `test -f 'src/binding/fortran/mpif_h/comm_create_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_create_groupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_ackf.lo: src/binding/fortran/mpif_h/comm_failure_ackf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_ackf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_ackf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_ackf.lo `test -f 'src/binding/fortran/mpif_h/comm_failure_ackf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_failure_ackf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_ackf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_ackf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_failure_ackf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_ackf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_ackf.lo `test -f 'src/binding/fortran/mpif_h/comm_failure_ackf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_failure_ackf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_get_ackedf.lo: src/binding/fortran/mpif_h/comm_failure_get_ackedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_get_ackedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_ackedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_get_ackedf.lo `test -f 'src/binding/fortran/mpif_h/comm_failure_get_ackedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_failure_get_ackedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_ackedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_ackedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_failure_get_ackedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_get_ackedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_failure_get_ackedf.lo `test -f 'src/binding/fortran/mpif_h/comm_failure_get_ackedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_failure_get_ackedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_revokef.lo: src/binding/fortran/mpif_h/comm_revokef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_revokef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_revokef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_revokef.lo `test -f 'src/binding/fortran/mpif_h/comm_revokef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_revokef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_revokef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_revokef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_revokef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_revokef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_revokef.lo `test -f 'src/binding/fortran/mpif_h/comm_revokef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_revokef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_shrinkf.lo: src/binding/fortran/mpif_h/comm_shrinkf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_shrinkf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_shrinkf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_shrinkf.lo `test -f 'src/binding/fortran/mpif_h/comm_shrinkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_shrinkf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_shrinkf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_shrinkf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_shrinkf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_shrinkf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_shrinkf.lo `test -f 'src/binding/fortran/mpif_h/comm_shrinkf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_shrinkf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-comm_agreef.lo: src/binding/fortran/mpif_h/comm_agreef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-comm_agreef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_agreef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_agreef.lo `test -f 'src/binding/fortran/mpif_h/comm_agreef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_agreef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_agreef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_agreef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/comm_agreef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-comm_agreef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-comm_agreef.lo `test -f 'src/binding/fortran/mpif_h/comm_agreef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/comm_agreef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_openf.lo: src/binding/fortran/mpif_h/file_openf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_openf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_openf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_openf.lo `test -f 'src/binding/fortran/mpif_h/file_openf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_openf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_openf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_openf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_openf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_openf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_openf.lo `test -f 'src/binding/fortran/mpif_h/file_openf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_openf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_closef.lo: src/binding/fortran/mpif_h/file_closef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_closef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_closef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_closef.lo `test -f 'src/binding/fortran/mpif_h/file_closef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_closef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_closef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_closef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_closef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_closef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_closef.lo `test -f 'src/binding/fortran/mpif_h/file_closef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_closef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_deletef.lo: src/binding/fortran/mpif_h/file_deletef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_deletef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_deletef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_deletef.lo `test -f 'src/binding/fortran/mpif_h/file_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_deletef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_deletef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_deletef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_deletef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_deletef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_deletef.lo `test -f 'src/binding/fortran/mpif_h/file_deletef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_deletef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_sizef.lo: src/binding/fortran/mpif_h/file_set_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_sizef.lo `test -f 'src/binding/fortran/mpif_h/file_set_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_set_sizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_sizef.lo `test -f 'src/binding/fortran/mpif_h/file_set_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_sizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_preallocatef.lo: src/binding/fortran/mpif_h/file_preallocatef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_preallocatef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_preallocatef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_preallocatef.lo `test -f 'src/binding/fortran/mpif_h/file_preallocatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_preallocatef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_preallocatef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_preallocatef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_preallocatef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_preallocatef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_preallocatef.lo `test -f 'src/binding/fortran/mpif_h/file_preallocatef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_preallocatef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_sizef.lo: src/binding/fortran/mpif_h/file_get_sizef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_sizef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_sizef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_sizef.lo `test -f 'src/binding/fortran/mpif_h/file_get_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_sizef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_sizef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_sizef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_sizef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_sizef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_sizef.lo `test -f 'src/binding/fortran/mpif_h/file_get_sizef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_sizef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_groupf.lo: src/binding/fortran/mpif_h/file_get_groupf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_groupf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_groupf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_groupf.lo `test -f 'src/binding/fortran/mpif_h/file_get_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_groupf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_groupf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_groupf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_groupf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_groupf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_groupf.lo `test -f 'src/binding/fortran/mpif_h/file_get_groupf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_groupf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_amodef.lo: src/binding/fortran/mpif_h/file_get_amodef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_amodef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_amodef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_amodef.lo `test -f 'src/binding/fortran/mpif_h/file_get_amodef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_amodef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_amodef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_amodef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_amodef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_amodef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_amodef.lo `test -f 'src/binding/fortran/mpif_h/file_get_amodef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_amodef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_infof.lo: src/binding/fortran/mpif_h/file_set_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_infof.lo `test -f 'src/binding/fortran/mpif_h/file_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_set_infof.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_infof.lo `test -f 'src/binding/fortran/mpif_h/file_set_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_infof.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_infof.lo: src/binding/fortran/mpif_h/file_get_infof.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_infof.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_infof.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_infof.lo `test -f 'src/binding/fortran/mpif_h/file_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_infof.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_infof.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_infof.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_infof.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_infof.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_infof.lo `test -f 'src/binding/fortran/mpif_h/file_get_infof.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_infof.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_viewf.lo: src/binding/fortran/mpif_h/file_set_viewf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_viewf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_viewf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_viewf.lo `test -f 'src/binding/fortran/mpif_h/file_set_viewf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_viewf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_viewf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_viewf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_set_viewf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_viewf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_viewf.lo `test -f 'src/binding/fortran/mpif_h/file_set_viewf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_viewf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_viewf.lo: src/binding/fortran/mpif_h/file_get_viewf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_viewf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_viewf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_viewf.lo `test -f 'src/binding/fortran/mpif_h/file_get_viewf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_viewf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_viewf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_viewf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_viewf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_viewf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_viewf.lo `test -f 'src/binding/fortran/mpif_h/file_get_viewf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_viewf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_atf.lo: src/binding/fortran/mpif_h/file_read_atf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_atf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_atf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_atf.lo `test -f 'src/binding/fortran/mpif_h/file_read_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_atf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_atf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_atf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_atf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_atf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_atf.lo `test -f 'src/binding/fortran/mpif_h/file_read_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_atf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_allf.lo: src/binding/fortran/mpif_h/file_read_at_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_at_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_atf.lo: src/binding/fortran/mpif_h/file_write_atf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_atf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_atf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_atf.lo `test -f 'src/binding/fortran/mpif_h/file_write_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_atf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_atf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_atf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_atf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_atf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_atf.lo `test -f 'src/binding/fortran/mpif_h/file_write_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_atf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_allf.lo: src/binding/fortran/mpif_h/file_write_at_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_at_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_atf.lo: src/binding/fortran/mpif_h/file_iread_atf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_atf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_atf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_atf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_atf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_atf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_atf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iread_atf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_atf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_atf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_atf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_atf.lo: src/binding/fortran/mpif_h/file_iwrite_atf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_atf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_atf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_atf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_atf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_atf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_atf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwrite_atf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_atf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_atf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_atf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_atf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_readf.lo: src/binding/fortran/mpif_h/file_readf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_readf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_readf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_readf.lo `test -f 'src/binding/fortran/mpif_h/file_readf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_readf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_readf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_readf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_readf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_readf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_readf.lo `test -f 'src/binding/fortran/mpif_h/file_readf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_readf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_allf.lo: src/binding/fortran/mpif_h/file_read_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_allf.lo `test -f 'src/binding/fortran/mpif_h/file_read_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_allf.lo `test -f 'src/binding/fortran/mpif_h/file_read_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_writef.lo: src/binding/fortran/mpif_h/file_writef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_writef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_writef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_writef.lo `test -f 'src/binding/fortran/mpif_h/file_writef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_writef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_writef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_writef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_writef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_writef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_writef.lo `test -f 'src/binding/fortran/mpif_h/file_writef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_writef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_allf.lo: src/binding/fortran/mpif_h/file_write_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_allf.lo `test -f 'src/binding/fortran/mpif_h/file_write_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_allf.lo `test -f 'src/binding/fortran/mpif_h/file_write_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_ireadf.lo: src/binding/fortran/mpif_h/file_ireadf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_ireadf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_ireadf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_ireadf.lo `test -f 'src/binding/fortran/mpif_h/file_ireadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_ireadf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_ireadf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_ireadf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_ireadf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_ireadf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_ireadf.lo `test -f 'src/binding/fortran/mpif_h/file_ireadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_ireadf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwritef.lo: src/binding/fortran/mpif_h/file_iwritef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwritef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwritef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwritef.lo `test -f 'src/binding/fortran/mpif_h/file_iwritef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwritef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwritef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwritef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwritef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwritef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwritef.lo `test -f 'src/binding/fortran/mpif_h/file_iwritef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwritef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_seekf.lo: src/binding/fortran/mpif_h/file_seekf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_seekf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seekf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_seekf.lo `test -f 'src/binding/fortran/mpif_h/file_seekf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_seekf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seekf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seekf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_seekf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_seekf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_seekf.lo `test -f 'src/binding/fortran/mpif_h/file_seekf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_seekf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_positionf.lo: src/binding/fortran/mpif_h/file_get_positionf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_positionf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_positionf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_positionf.lo `test -f 'src/binding/fortran/mpif_h/file_get_positionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_positionf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_positionf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_positionf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_positionf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_positionf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_positionf.lo `test -f 'src/binding/fortran/mpif_h/file_get_positionf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_positionf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_byte_offsetf.lo: src/binding/fortran/mpif_h/file_get_byte_offsetf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_byte_offsetf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_byte_offsetf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_byte_offsetf.lo `test -f 'src/binding/fortran/mpif_h/file_get_byte_offsetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_byte_offsetf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_byte_offsetf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_byte_offsetf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_byte_offsetf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_byte_offsetf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_byte_offsetf.lo `test -f 'src/binding/fortran/mpif_h/file_get_byte_offsetf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_byte_offsetf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_sharedf.lo: src/binding/fortran/mpif_h/file_read_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_read_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_sharedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_read_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_sharedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_sharedf.lo: src/binding/fortran/mpif_h/file_write_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_write_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_sharedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_write_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_sharedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_sharedf.lo: src/binding/fortran/mpif_h/file_iread_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iread_sharedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_sharedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_sharedf.lo: src/binding/fortran/mpif_h/file_iwrite_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwrite_sharedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_sharedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_orderedf.lo: src/binding/fortran/mpif_h/file_read_orderedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_orderedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_orderedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_orderedf.lo `test -f 'src/binding/fortran/mpif_h/file_read_orderedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_orderedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_orderedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_orderedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_orderedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_orderedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_orderedf.lo `test -f 'src/binding/fortran/mpif_h/file_read_orderedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_orderedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_orderedf.lo: src/binding/fortran/mpif_h/file_write_orderedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_orderedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_orderedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_orderedf.lo `test -f 'src/binding/fortran/mpif_h/file_write_orderedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_orderedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_orderedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_orderedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_orderedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_orderedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_orderedf.lo `test -f 'src/binding/fortran/mpif_h/file_write_orderedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_orderedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_seek_sharedf.lo: src/binding/fortran/mpif_h/file_seek_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_seek_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seek_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_seek_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_seek_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_seek_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seek_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seek_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_seek_sharedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_seek_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_seek_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_seek_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_seek_sharedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_position_sharedf.lo: src/binding/fortran/mpif_h/file_get_position_sharedf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_position_sharedf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_position_sharedf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_position_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_get_position_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_position_sharedf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_position_sharedf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_position_sharedf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_position_sharedf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_position_sharedf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_position_sharedf.lo `test -f 'src/binding/fortran/mpif_h/file_get_position_sharedf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_position_sharedf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_beginf.lo: src/binding/fortran/mpif_h/file_read_at_all_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_all_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_at_all_beginf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_all_beginf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_endf.lo: src/binding/fortran/mpif_h/file_read_at_all_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_all_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_at_all_endf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_at_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_at_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_at_all_endf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_beginf.lo: src/binding/fortran/mpif_h/file_write_at_all_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_all_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_at_all_beginf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_all_beginf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_endf.lo: src/binding/fortran/mpif_h/file_write_at_all_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_all_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_at_all_endf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_at_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_at_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_at_all_endf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_beginf.lo: src/binding/fortran/mpif_h/file_read_all_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_all_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_all_beginf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_all_beginf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_endf.lo: src/binding/fortran/mpif_h/file_read_all_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_all_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_all_endf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_all_endf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_beginf.lo: src/binding/fortran/mpif_h/file_write_all_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_all_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_all_beginf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_all_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_all_beginf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_endf.lo: src/binding/fortran/mpif_h/file_write_all_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_all_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_all_endf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_all_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_all_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_all_endf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_beginf.lo: src/binding/fortran/mpif_h/file_read_ordered_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_ordered_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_ordered_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_ordered_beginf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_read_ordered_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_ordered_beginf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_endf.lo: src/binding/fortran/mpif_h/file_read_ordered_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_ordered_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_ordered_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_read_ordered_endf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_read_ordered_endf.lo `test -f 'src/binding/fortran/mpif_h/file_read_ordered_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_read_ordered_endf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_beginf.lo: src/binding/fortran/mpif_h/file_write_ordered_beginf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_beginf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_beginf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_ordered_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_ordered_beginf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_beginf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_beginf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_ordered_beginf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_beginf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_beginf.lo `test -f 'src/binding/fortran/mpif_h/file_write_ordered_beginf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_ordered_beginf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_endf.lo: src/binding/fortran/mpif_h/file_write_ordered_endf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_endf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_endf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_ordered_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_ordered_endf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_endf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_endf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_write_ordered_endf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_endf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_write_ordered_endf.lo `test -f 'src/binding/fortran/mpif_h/file_write_ordered_endf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_write_ordered_endf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_type_extentf.lo: src/binding/fortran/mpif_h/file_get_type_extentf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_type_extentf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_type_extentf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_type_extentf.lo `test -f 'src/binding/fortran/mpif_h/file_get_type_extentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_type_extentf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_type_extentf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_type_extentf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_type_extentf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_type_extentf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_type_extentf.lo `test -f 'src/binding/fortran/mpif_h/file_get_type_extentf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_type_extentf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-register_datarepf.lo: src/binding/fortran/mpif_h/register_datarepf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-register_datarepf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-register_datarepf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-register_datarepf.lo `test -f 'src/binding/fortran/mpif_h/register_datarepf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/register_datarepf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-register_datarepf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-register_datarepf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/register_datarepf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-register_datarepf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-register_datarepf.lo `test -f 'src/binding/fortran/mpif_h/register_datarepf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/register_datarepf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_atomicityf.lo: src/binding/fortran/mpif_h/file_set_atomicityf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_atomicityf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_atomicityf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_atomicityf.lo `test -f 'src/binding/fortran/mpif_h/file_set_atomicityf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_atomicityf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_atomicityf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_atomicityf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_set_atomicityf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_atomicityf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_set_atomicityf.lo `test -f 'src/binding/fortran/mpif_h/file_set_atomicityf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_set_atomicityf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_atomicityf.lo: src/binding/fortran/mpif_h/file_get_atomicityf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_atomicityf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_atomicityf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_atomicityf.lo `test -f 'src/binding/fortran/mpif_h/file_get_atomicityf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_atomicityf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_atomicityf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_atomicityf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_get_atomicityf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_atomicityf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_get_atomicityf.lo `test -f 'src/binding/fortran/mpif_h/file_get_atomicityf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_get_atomicityf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_syncf.lo: src/binding/fortran/mpif_h/file_syncf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_syncf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_syncf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_syncf.lo `test -f 'src/binding/fortran/mpif_h/file_syncf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_syncf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_syncf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_syncf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_syncf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_syncf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_syncf.lo `test -f 'src/binding/fortran/mpif_h/file_syncf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_syncf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_at_allf.lo: src/binding/fortran/mpif_h/file_iread_at_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_at_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_at_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_at_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_at_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_at_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iread_at_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_at_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_at_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_at_allf.lo: src/binding/fortran/mpif_h/file_iwrite_at_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_at_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_at_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_at_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_at_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_at_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwrite_at_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_at_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_at_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_at_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_at_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_allf.lo: src/binding/fortran/mpif_h/file_iread_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iread_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iread_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iread_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iread_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_allf.lo: src/binding/fortran/mpif_h/file_iwrite_allf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_allf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_allf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_allf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_allf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_allf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/file_iwrite_allf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_allf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-file_iwrite_allf.lo `test -f 'src/binding/fortran/mpif_h/file_iwrite_allf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/file_iwrite_allf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-initf.lo: src/binding/fortran/mpif_h/initf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-initf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-initf.lo `test -f 'src/binding/fortran/mpif_h/initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/initf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-initf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-initf.lo `test -f 'src/binding/fortran/mpif_h/initf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-initthreadf.lo: src/binding/fortran/mpif_h/initthreadf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-initthreadf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initthreadf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-initthreadf.lo `test -f 'src/binding/fortran/mpif_h/initthreadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initthreadf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initthreadf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initthreadf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/initthreadf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-initthreadf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-initthreadf.lo `test -f 'src/binding/fortran/mpif_h/initthreadf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/initthreadf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-pcontrolf.lo: src/binding/fortran/mpif_h/pcontrolf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-pcontrolf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pcontrolf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-pcontrolf.lo `test -f 'src/binding/fortran/mpif_h/pcontrolf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pcontrolf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pcontrolf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pcontrolf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/pcontrolf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-pcontrolf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-pcontrolf.lo `test -f 'src/binding/fortran/mpif_h/pcontrolf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/pcontrolf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-addressf.lo: src/binding/fortran/mpif_h/addressf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-addressf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-addressf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-addressf.lo `test -f 'src/binding/fortran/mpif_h/addressf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/addressf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-addressf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-addressf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/addressf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-addressf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-addressf.lo `test -f 'src/binding/fortran/mpif_h/addressf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/addressf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-getaddressf.lo: src/binding/fortran/mpif_h/getaddressf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-getaddressf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getaddressf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-getaddressf.lo `test -f 'src/binding/fortran/mpif_h/getaddressf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getaddressf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getaddressf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getaddressf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/getaddressf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-getaddressf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-getaddressf.lo `test -f 'src/binding/fortran/mpif_h/getaddressf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/getaddressf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-wtimef.lo: src/binding/fortran/mpif_h/wtimef.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-wtimef.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtimef.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wtimef.lo `test -f 'src/binding/fortran/mpif_h/wtimef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wtimef.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtimef.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtimef.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wtimef.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-wtimef.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wtimef.lo `test -f 'src/binding/fortran/mpif_h/wtimef.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wtimef.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-wtickf.lo: src/binding/fortran/mpif_h/wtickf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-wtickf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtickf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wtickf.lo `test -f 'src/binding/fortran/mpif_h/wtickf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wtickf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtickf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtickf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/wtickf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-wtickf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-wtickf.lo `test -f 'src/binding/fortran/mpif_h/wtickf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/wtickf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-aint_addf.lo: src/binding/fortran/mpif_h/aint_addf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-aint_addf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_addf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-aint_addf.lo `test -f 'src/binding/fortran/mpif_h/aint_addf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/aint_addf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_addf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_addf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/aint_addf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-aint_addf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-aint_addf.lo `test -f 'src/binding/fortran/mpif_h/aint_addf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/aint_addf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-aint_difff.lo: src/binding/fortran/mpif_h/aint_difff.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-aint_difff.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_difff.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-aint_difff.lo `test -f 'src/binding/fortran/mpif_h/aint_difff.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/aint_difff.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_difff.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_difff.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/aint_difff.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-aint_difff.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-aint_difff.lo `test -f 'src/binding/fortran/mpif_h/aint_difff.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/aint_difff.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_createf.lo: src/binding/fortran/mpif_h/keyval_createf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_createf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_createf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_createf.lo `test -f 'src/binding/fortran/mpif_h/keyval_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/keyval_createf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_createf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_createf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/keyval_createf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_createf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-keyval_createf.lo `test -f 'src/binding/fortran/mpif_h/keyval_createf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/keyval_createf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dup_fnf.lo: src/binding/fortran/mpif_h/dup_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dup_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dup_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dup_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dup_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dup_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-null_del_fnf.lo: src/binding/fortran/mpif_h/null_del_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-null_del_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_del_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_del_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_del_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_del_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_del_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-null_del_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_del_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-null_copy_fnf.lo: src/binding/fortran/mpif_h/null_copy_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-null_copy_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_copy_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_copy_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_copy_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_copy_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_copy_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-null_copy_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_copy_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dup_comm_fnf.lo: src/binding/fortran/mpif_h/dup_comm_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dup_comm_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_comm_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dup_comm_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_comm_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_comm_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_comm_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_comm_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dup_comm_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dup_comm_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dup_comm_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_comm_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_comm_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_del_fnf.lo: src/binding/fortran/mpif_h/null_comm_del_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_del_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_del_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_comm_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_comm_del_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_del_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_del_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_comm_del_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_del_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_comm_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_comm_del_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_copy_fnf.lo: src/binding/fortran/mpif_h/null_comm_copy_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_copy_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_copy_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_comm_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_comm_copy_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_copy_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_copy_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_comm_copy_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_copy_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_comm_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_comm_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_comm_copy_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dup_win_fnf.lo: src/binding/fortran/mpif_h/dup_win_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dup_win_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_win_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dup_win_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_win_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_win_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_win_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_win_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dup_win_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dup_win_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dup_win_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_win_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_win_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_del_fnf.lo: src/binding/fortran/mpif_h/null_win_del_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_del_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_del_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_win_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_win_del_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_del_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_del_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_win_del_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_del_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_win_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_win_del_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_copy_fnf.lo: src/binding/fortran/mpif_h/null_win_copy_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_copy_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_copy_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_win_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_win_copy_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_copy_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_copy_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_win_copy_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_copy_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_win_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_win_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_win_copy_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-dup_type_fnf.lo: src/binding/fortran/mpif_h/dup_type_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-dup_type_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_type_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dup_type_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_type_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_type_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_type_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_type_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/dup_type_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-dup_type_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-dup_type_fnf.lo `test -f 'src/binding/fortran/mpif_h/dup_type_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/dup_type_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_del_fnf.lo: src/binding/fortran/mpif_h/null_type_del_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_del_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_del_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_type_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_type_del_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_del_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_del_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_type_del_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_del_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_del_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_type_del_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_type_del_fnf.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_copy_fnf.lo: src/binding/fortran/mpif_h/null_type_copy_fnf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_copy_fnf.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_copy_fnf.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_type_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_type_copy_fnf.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_copy_fnf.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_copy_fnf.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/null_type_copy_fnf.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_copy_fnf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-null_type_copy_fnf.lo `test -f 'src/binding/fortran/mpif_h/null_type_copy_fnf.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/null_type_copy_fnf.c + +src/mpi/attr/lib_libpmpi_la-attrutil.lo: src/mpi/attr/attrutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-attrutil.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attrutil.Tpo -c -o src/mpi/attr/lib_libpmpi_la-attrutil.lo `test -f 'src/mpi/attr/attrutil.c' || echo '$(srcdir)/'`src/mpi/attr/attrutil.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attrutil.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attrutil.Plo +# $(AM_V_CC)source='src/mpi/attr/attrutil.c' object='src/mpi/attr/lib_libpmpi_la-attrutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-attrutil.lo `test -f 'src/mpi/attr/attrutil.c' || echo '$(srcdir)/'`src/mpi/attr/attrutil.c + +src/mpi/attr/lib_libpmpi_la-dup_fn.lo: src/mpi/attr/dup_fn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/attr/lib_libpmpi_la-dup_fn.lo -MD -MP -MF src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-dup_fn.Tpo -c -o src/mpi/attr/lib_libpmpi_la-dup_fn.lo `test -f 'src/mpi/attr/dup_fn.c' || echo '$(srcdir)/'`src/mpi/attr/dup_fn.c + $(AM_V_at)$(am__mv) src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-dup_fn.Tpo src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-dup_fn.Plo +# $(AM_V_CC)source='src/mpi/attr/dup_fn.c' object='src/mpi/attr/lib_libpmpi_la-dup_fn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/attr/lib_libpmpi_la-dup_fn.lo `test -f 'src/mpi/attr/dup_fn.c' || echo '$(srcdir)/'`src/mpi/attr/dup_fn.c + +src/mpi/coll/allgather/lib_libpmpi_la-allgather_allcomm_nb.lo: src/mpi/coll/allgather/allgather_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libpmpi_la-allgather_allcomm_nb.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_allcomm_nb.Tpo -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_allcomm_nb.lo `test -f 'src/mpi/coll/allgather/allgather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_allcomm_nb.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_allcomm_nb.c' object='src/mpi/coll/allgather/lib_libpmpi_la-allgather_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_allcomm_nb.lo `test -f 'src/mpi/coll/allgather/allgather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_allcomm_nb.c + +src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_recursive_doubling.lo: src/mpi/coll/allgather/allgather_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_recursive_doubling.Tpo -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allgather/allgather_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_recursive_doubling.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_intra_recursive_doubling.c' object='src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allgather/allgather_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_recursive_doubling.c + +src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_brucks.lo: src/mpi/coll/allgather/allgather_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_brucks.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_brucks.Tpo -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_brucks.lo `test -f 'src/mpi/coll/allgather/allgather_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_brucks.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_intra_brucks.c' object='src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_brucks.lo `test -f 'src/mpi/coll/allgather/allgather_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_brucks.c + +src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_ring.lo: src/mpi/coll/allgather/allgather_intra_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_ring.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_ring.Tpo -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_ring.lo `test -f 'src/mpi/coll/allgather/allgather_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_ring.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_intra_ring.c' object='src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_intra_ring.lo `test -f 'src/mpi/coll/allgather/allgather_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_intra_ring.c + +src/mpi/coll/allgather/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.lo: src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgather/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.lo -MD -MP -MF src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.Tpo -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.lo `test -f 'src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.Tpo src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c' object='src/mpi/coll/allgather/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgather/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.lo `test -f 'src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c + +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_allcomm_nb.lo: src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_allcomm_nb.Tpo -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_allcomm_nb.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_allcomm_nb.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c' object='src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_allcomm_nb.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c + +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_recursive_doubling.lo: src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_recursive_doubling.Tpo -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_recursive_doubling.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c' object='src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c + +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_brucks.lo: src/mpi/coll/allgatherv/allgatherv_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_brucks.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_brucks.Tpo -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_brucks.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_brucks.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_intra_brucks.c' object='src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_brucks.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_brucks.c + +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_ring.lo: src/mpi/coll/allgatherv/allgatherv_intra_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_ring.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_ring.Tpo -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_ring.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_ring.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_intra_ring.c' object='src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_intra_ring.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_intra_ring.c + +src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.lo: src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.lo -MD -MP -MF src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.Tpo -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.Tpo src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c' object='src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allgatherv/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.lo `test -f 'src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c + +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_allcomm_nb.lo: src/mpi/coll/allreduce/allreduce_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_allcomm_nb.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_allcomm_nb.Tpo -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_allcomm_nb.lo `test -f 'src/mpi/coll/allreduce/allreduce_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_allcomm_nb.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_allcomm_nb.c' object='src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_allcomm_nb.lo `test -f 'src/mpi/coll/allreduce/allreduce_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_allcomm_nb.c + +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_recursive_doubling.lo: src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_recursive_doubling.Tpo -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_recursive_doubling.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c' object='src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_recursive_doubling.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c + +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.lo: src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.Tpo -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c' object='src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c + +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_smp.lo: src/mpi/coll/allreduce/allreduce_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_smp.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_smp.Tpo -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_smp.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_smp.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_intra_smp.c' object='src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_intra_smp.lo `test -f 'src/mpi/coll/allreduce/allreduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_intra_smp.c + +src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.lo: src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.lo -MD -MP -MF src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.Tpo -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.lo `test -f 'src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.Tpo src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c' object='src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.lo `test -f 'src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c + +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_allcomm_nb.lo: src/mpi/coll/alltoall/alltoall_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_allcomm_nb.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_allcomm_nb.Tpo -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_allcomm_nb.lo `test -f 'src/mpi/coll/alltoall/alltoall_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_allcomm_nb.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_allcomm_nb.c' object='src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_allcomm_nb.lo `test -f 'src/mpi/coll/alltoall/alltoall_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_allcomm_nb.c + +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo: src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.Tpo -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c' object='src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c + +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_brucks.lo: src/mpi/coll/alltoall/alltoall_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_brucks.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_brucks.Tpo -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_brucks.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_brucks.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_intra_brucks.c' object='src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_brucks.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_brucks.c + +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_scattered.lo: src/mpi/coll/alltoall/alltoall_intra_scattered.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_scattered.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_scattered.Tpo -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_scattered.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_scattered.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_scattered.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_scattered.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_intra_scattered.c' object='src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_scattered.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_scattered.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_scattered.c + +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise.lo: src/mpi/coll/alltoall/alltoall_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise.Tpo -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_intra_pairwise.c' object='src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_intra_pairwise.lo `test -f 'src/mpi/coll/alltoall/alltoall_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_intra_pairwise.c + +src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_inter_pairwise_exchange.lo: src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_inter_pairwise_exchange.Tpo src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c' object='src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoall/lib_libpmpi_la-alltoall_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c + +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_allcomm_nb.lo: src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_allcomm_nb.Tpo -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_allcomm_nb.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_allcomm_nb.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c' object='src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_allcomm_nb.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c + +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo: src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Tpo -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c' object='src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c + +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_scattered.lo: src/mpi/coll/alltoallv/alltoallv_intra_scattered.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_scattered.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_scattered.Tpo -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_scattered.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_intra_scattered.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_scattered.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_scattered.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv_intra_scattered.c' object='src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_scattered.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_intra_scattered.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_intra_scattered.c + +src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.lo: src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.Tpo src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c' object='src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallv/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c + +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_allcomm_nb.lo: src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_allcomm_nb.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_allcomm_nb.Tpo -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_allcomm_nb.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_allcomm_nb.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c' object='src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_allcomm_nb.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c + +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo: src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Tpo -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c' object='src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c + +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_scattered.lo: src/mpi/coll/alltoallw/alltoallw_intra_scattered.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_scattered.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_scattered.Tpo -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_scattered.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_intra_scattered.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_scattered.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_scattered.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw_intra_scattered.c' object='src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_scattered.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_intra_scattered.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_intra_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_intra_scattered.c + +src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.lo: src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.Tpo src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c' object='src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/alltoallw/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c + +src/mpi/coll/barrier/lib_libpmpi_la-barrier_allcomm_nb.lo: src/mpi/coll/barrier/barrier_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libpmpi_la-barrier_allcomm_nb.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_allcomm_nb.Tpo -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier_allcomm_nb.lo `test -f 'src/mpi/coll/barrier/barrier_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_allcomm_nb.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier_allcomm_nb.c' object='src/mpi/coll/barrier/lib_libpmpi_la-barrier_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier_allcomm_nb.lo `test -f 'src/mpi/coll/barrier/barrier_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_allcomm_nb.c + +src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_dissemination.lo: src/mpi/coll/barrier/barrier_intra_dissemination.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_dissemination.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_dissemination.Tpo -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_dissemination.lo `test -f 'src/mpi/coll/barrier/barrier_intra_dissemination.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_intra_dissemination.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_dissemination.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_dissemination.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier_intra_dissemination.c' object='src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_dissemination.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_dissemination.lo `test -f 'src/mpi/coll/barrier/barrier_intra_dissemination.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_intra_dissemination.c + +src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_smp.lo: src/mpi/coll/barrier/barrier_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_smp.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_smp.Tpo -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_smp.lo `test -f 'src/mpi/coll/barrier/barrier_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_smp.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier_intra_smp.c' object='src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier_intra_smp.lo `test -f 'src/mpi/coll/barrier/barrier_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_intra_smp.c + +src/mpi/coll/barrier/lib_libpmpi_la-barrier_inter_bcast.lo: src/mpi/coll/barrier/barrier_inter_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/barrier/lib_libpmpi_la-barrier_inter_bcast.lo -MD -MP -MF src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_inter_bcast.Tpo -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier_inter_bcast.lo `test -f 'src/mpi/coll/barrier/barrier_inter_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_inter_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_inter_bcast.Tpo src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_inter_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/barrier/barrier_inter_bcast.c' object='src/mpi/coll/barrier/lib_libpmpi_la-barrier_inter_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/barrier/lib_libpmpi_la-barrier_inter_bcast.lo `test -f 'src/mpi/coll/barrier/barrier_inter_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/barrier/barrier_inter_bcast.c + +src/mpi/coll/bcast/lib_libpmpi_la-bcast_utils.lo: src/mpi/coll/bcast/bcast_utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libpmpi_la-bcast_utils.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_utils.Tpo -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_utils.lo `test -f 'src/mpi/coll/bcast/bcast_utils.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_utils.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_utils.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_utils.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_utils.c' object='src/mpi/coll/bcast/lib_libpmpi_la-bcast_utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_utils.lo `test -f 'src/mpi/coll/bcast/bcast_utils.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_utils.c + +src/mpi/coll/bcast/lib_libpmpi_la-bcast_allcomm_nb.lo: src/mpi/coll/bcast/bcast_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libpmpi_la-bcast_allcomm_nb.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_allcomm_nb.Tpo -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_allcomm_nb.lo `test -f 'src/mpi/coll/bcast/bcast_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_allcomm_nb.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_allcomm_nb.c' object='src/mpi/coll/bcast/lib_libpmpi_la-bcast_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_allcomm_nb.lo `test -f 'src/mpi/coll/bcast/bcast_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_allcomm_nb.c + +src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_binomial.lo: src/mpi/coll/bcast/bcast_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_binomial.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_binomial.Tpo -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_binomial.lo `test -f 'src/mpi/coll/bcast/bcast_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_binomial.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_intra_binomial.c' object='src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_binomial.lo `test -f 'src/mpi/coll/bcast/bcast_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_binomial.c + +src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo: src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Tpo -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo `test -f 'src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c' object='src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.lo `test -f 'src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c + +src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.lo: src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.Tpo -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.lo `test -f 'src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c' object='src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.lo `test -f 'src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c + +src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_smp.lo: src/mpi/coll/bcast/bcast_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_smp.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_smp.Tpo -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_smp.lo `test -f 'src/mpi/coll/bcast/bcast_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_smp.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_intra_smp.c' object='src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_intra_smp.lo `test -f 'src/mpi/coll/bcast/bcast_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_intra_smp.c + +src/mpi/coll/bcast/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.lo: src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/bcast/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.lo -MD -MP -MF src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.Tpo -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.lo `test -f 'src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.Tpo src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c' object='src/mpi/coll/bcast/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/bcast/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.lo `test -f 'src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c + +src/mpi/coll/exscan/lib_libpmpi_la-exscan_allcomm_nb.lo: src/mpi/coll/exscan/exscan_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/exscan/lib_libpmpi_la-exscan_allcomm_nb.lo -MD -MP -MF src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_allcomm_nb.Tpo -c -o src/mpi/coll/exscan/lib_libpmpi_la-exscan_allcomm_nb.lo `test -f 'src/mpi/coll/exscan/exscan_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_allcomm_nb.Tpo src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/exscan/exscan_allcomm_nb.c' object='src/mpi/coll/exscan/lib_libpmpi_la-exscan_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/exscan/lib_libpmpi_la-exscan_allcomm_nb.lo `test -f 'src/mpi/coll/exscan/exscan_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan_allcomm_nb.c + +src/mpi/coll/exscan/lib_libpmpi_la-exscan_intra_recursive_doubling.lo: src/mpi/coll/exscan/exscan_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/exscan/lib_libpmpi_la-exscan_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_intra_recursive_doubling.Tpo -c -o src/mpi/coll/exscan/lib_libpmpi_la-exscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/exscan/exscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_intra_recursive_doubling.Tpo src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/exscan/exscan_intra_recursive_doubling.c' object='src/mpi/coll/exscan/lib_libpmpi_la-exscan_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/exscan/lib_libpmpi_la-exscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/exscan/exscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/exscan/exscan_intra_recursive_doubling.c + +src/mpi/coll/gather/lib_libpmpi_la-gather_allcomm_nb.lo: src/mpi/coll/gather/gather_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libpmpi_la-gather_allcomm_nb.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_allcomm_nb.Tpo -c -o src/mpi/coll/gather/lib_libpmpi_la-gather_allcomm_nb.lo `test -f 'src/mpi/coll/gather/gather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_allcomm_nb.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather_allcomm_nb.c' object='src/mpi/coll/gather/lib_libpmpi_la-gather_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libpmpi_la-gather_allcomm_nb.lo `test -f 'src/mpi/coll/gather/gather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_allcomm_nb.c + +src/mpi/coll/gather/lib_libpmpi_la-gather_intra_binomial.lo: src/mpi/coll/gather/gather_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libpmpi_la-gather_intra_binomial.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_intra_binomial.Tpo -c -o src/mpi/coll/gather/lib_libpmpi_la-gather_intra_binomial.lo `test -f 'src/mpi/coll/gather/gather_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_intra_binomial.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather_intra_binomial.c' object='src/mpi/coll/gather/lib_libpmpi_la-gather_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libpmpi_la-gather_intra_binomial.lo `test -f 'src/mpi/coll/gather/gather_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_intra_binomial.c + +src/mpi/coll/gather/lib_libpmpi_la-gather_inter_linear.lo: src/mpi/coll/gather/gather_inter_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libpmpi_la-gather_inter_linear.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_linear.Tpo -c -o src/mpi/coll/gather/lib_libpmpi_la-gather_inter_linear.lo `test -f 'src/mpi/coll/gather/gather_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_inter_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_linear.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather_inter_linear.c' object='src/mpi/coll/gather/lib_libpmpi_la-gather_inter_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libpmpi_la-gather_inter_linear.lo `test -f 'src/mpi/coll/gather/gather_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_inter_linear.c + +src/mpi/coll/gather/lib_libpmpi_la-gather_inter_local_gather_remote_send.lo: src/mpi/coll/gather/gather_inter_local_gather_remote_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gather/lib_libpmpi_la-gather_inter_local_gather_remote_send.lo -MD -MP -MF src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_local_gather_remote_send.Tpo -c -o src/mpi/coll/gather/lib_libpmpi_la-gather_inter_local_gather_remote_send.lo `test -f 'src/mpi/coll/gather/gather_inter_local_gather_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_inter_local_gather_remote_send.c + $(AM_V_at)$(am__mv) src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_local_gather_remote_send.Tpo src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_local_gather_remote_send.Plo +# $(AM_V_CC)source='src/mpi/coll/gather/gather_inter_local_gather_remote_send.c' object='src/mpi/coll/gather/lib_libpmpi_la-gather_inter_local_gather_remote_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gather/lib_libpmpi_la-gather_inter_local_gather_remote_send.lo `test -f 'src/mpi/coll/gather/gather_inter_local_gather_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/gather/gather_inter_local_gather_remote_send.c + +src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_nb.lo: src/mpi/coll/gatherv/gatherv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_nb.Tpo -c -o src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_nb.lo `test -f 'src/mpi/coll/gatherv/gatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_nb.Tpo src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/gatherv/gatherv_allcomm_nb.c' object='src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_nb.lo `test -f 'src/mpi/coll/gatherv/gatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv_allcomm_nb.c + +src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_linear.lo: src/mpi/coll/gatherv/gatherv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_linear.Tpo -c -o src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_linear.lo `test -f 'src/mpi/coll/gatherv/gatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_linear.Tpo src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/gatherv/gatherv_allcomm_linear.c' object='src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/gatherv/lib_libpmpi_la-gatherv_allcomm_linear.lo `test -f 'src/mpi/coll/gatherv/gatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/gatherv/gatherv_allcomm_linear.c + +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_allcomm_nb.lo: src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_allcomm_nb.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_allcomm_nb.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_allcomm_nb.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_allcomm_nb.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c' object='src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_allcomm_nb.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c + +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.lo: src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c' object='src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c + +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_pairwise.lo: src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_pairwise.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_pairwise.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_pairwise.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_pairwise.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c' object='src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_pairwise.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c + +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.lo: src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c' object='src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c + +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_noncommutative.lo: src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_noncommutative.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_noncommutative.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_noncommutative.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_noncommutative.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_noncommutative.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c' object='src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_noncommutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_intra_noncommutative.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c + +src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo: src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo -MD -MP -MF src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Tpo -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Tpo src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c' object='src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.lo `test -f 'src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c + +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c' object='src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c + +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c' object='src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c + +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c' object='src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c + +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c' object='src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c + +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c' object='src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c + +src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo: src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo -MD -MP -MF src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Tpo -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Tpo src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c' object='src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce_scatter_block/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.lo `test -f 'src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c + +src/mpi/coll/reduce/lib_libpmpi_la-reduce_allcomm_nb.lo: src/mpi/coll/reduce/reduce_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libpmpi_la-reduce_allcomm_nb.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_allcomm_nb.Tpo -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_allcomm_nb.lo `test -f 'src/mpi/coll/reduce/reduce_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_allcomm_nb.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_allcomm_nb.c' object='src/mpi/coll/reduce/lib_libpmpi_la-reduce_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_allcomm_nb.lo `test -f 'src/mpi/coll/reduce/reduce_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_allcomm_nb.c + +src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_binomial.lo: src/mpi/coll/reduce/reduce_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_binomial.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_binomial.Tpo -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_binomial.lo `test -f 'src/mpi/coll/reduce/reduce_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_binomial.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_intra_binomial.c' object='src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_binomial.lo `test -f 'src/mpi/coll/reduce/reduce_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_binomial.c + +src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.lo: src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.Tpo -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.lo `test -f 'src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c' object='src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.lo `test -f 'src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c + +src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_smp.lo: src/mpi/coll/reduce/reduce_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_smp.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_smp.Tpo -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_smp.lo `test -f 'src/mpi/coll/reduce/reduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_smp.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_intra_smp.c' object='src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_intra_smp.lo `test -f 'src/mpi/coll/reduce/reduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_intra_smp.c + +src/mpi/coll/reduce/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.lo: src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/reduce/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.lo -MD -MP -MF src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.Tpo -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.lo `test -f 'src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c + $(AM_V_at)$(am__mv) src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.Tpo src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.Plo +# $(AM_V_CC)source='src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c' object='src/mpi/coll/reduce/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/reduce/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.lo `test -f 'src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c + +src/mpi/coll/scan/lib_libpmpi_la-scan_allcomm_nb.lo: src/mpi/coll/scan/scan_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scan/lib_libpmpi_la-scan_allcomm_nb.lo -MD -MP -MF src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_allcomm_nb.Tpo -c -o src/mpi/coll/scan/lib_libpmpi_la-scan_allcomm_nb.lo `test -f 'src/mpi/coll/scan/scan_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_allcomm_nb.Tpo src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/scan/scan_allcomm_nb.c' object='src/mpi/coll/scan/lib_libpmpi_la-scan_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scan/lib_libpmpi_la-scan_allcomm_nb.lo `test -f 'src/mpi/coll/scan/scan_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_allcomm_nb.c + +src/mpi/coll/scan/lib_libpmpi_la-scan_intra_recursive_doubling.lo: src/mpi/coll/scan/scan_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scan/lib_libpmpi_la-scan_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_recursive_doubling.Tpo -c -o src/mpi/coll/scan/lib_libpmpi_la-scan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/scan/scan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_recursive_doubling.Tpo src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/scan/scan_intra_recursive_doubling.c' object='src/mpi/coll/scan/lib_libpmpi_la-scan_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scan/lib_libpmpi_la-scan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/scan/scan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_intra_recursive_doubling.c + +src/mpi/coll/scan/lib_libpmpi_la-scan_intra_smp.lo: src/mpi/coll/scan/scan_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scan/lib_libpmpi_la-scan_intra_smp.lo -MD -MP -MF src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_smp.Tpo -c -o src/mpi/coll/scan/lib_libpmpi_la-scan_intra_smp.lo `test -f 'src/mpi/coll/scan/scan_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_smp.Tpo src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/scan/scan_intra_smp.c' object='src/mpi/coll/scan/lib_libpmpi_la-scan_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scan/lib_libpmpi_la-scan_intra_smp.lo `test -f 'src/mpi/coll/scan/scan_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/scan/scan_intra_smp.c + +src/mpi/coll/scatter/lib_libpmpi_la-scatter_allcomm_nb.lo: src/mpi/coll/scatter/scatter_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libpmpi_la-scatter_allcomm_nb.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_allcomm_nb.Tpo -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter_allcomm_nb.lo `test -f 'src/mpi/coll/scatter/scatter_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_allcomm_nb.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter_allcomm_nb.c' object='src/mpi/coll/scatter/lib_libpmpi_la-scatter_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter_allcomm_nb.lo `test -f 'src/mpi/coll/scatter/scatter_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_allcomm_nb.c + +src/mpi/coll/scatter/lib_libpmpi_la-scatter_intra_binomial.lo: src/mpi/coll/scatter/scatter_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libpmpi_la-scatter_intra_binomial.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_intra_binomial.Tpo -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter_intra_binomial.lo `test -f 'src/mpi/coll/scatter/scatter_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_intra_binomial.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter_intra_binomial.c' object='src/mpi/coll/scatter/lib_libpmpi_la-scatter_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter_intra_binomial.lo `test -f 'src/mpi/coll/scatter/scatter_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_intra_binomial.c + +src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_linear.lo: src/mpi/coll/scatter/scatter_inter_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_linear.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_linear.Tpo -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_linear.lo `test -f 'src/mpi/coll/scatter/scatter_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_inter_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_linear.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter_inter_linear.c' object='src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_linear.lo `test -f 'src/mpi/coll/scatter/scatter_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_inter_linear.c + +src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.lo: src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.lo -MD -MP -MF src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.Tpo -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.lo `test -f 'src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.Tpo src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c' object='src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatter/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.lo `test -f 'src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c + +src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_nb.lo: src/mpi/coll/scatterv/scatterv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_nb.Tpo -c -o src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_nb.lo `test -f 'src/mpi/coll/scatterv/scatterv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_nb.Tpo src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/scatterv/scatterv_allcomm_nb.c' object='src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_nb.lo `test -f 'src/mpi/coll/scatterv/scatterv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv_allcomm_nb.c + +src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_linear.lo: src/mpi/coll/scatterv/scatterv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_linear.Tpo -c -o src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_linear.lo `test -f 'src/mpi/coll/scatterv/scatterv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_linear.Tpo src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/scatterv/scatterv_allcomm_linear.c' object='src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/scatterv/lib_libpmpi_la-scatterv_allcomm_linear.lo `test -f 'src/mpi/coll/scatterv/scatterv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/scatterv/scatterv_allcomm_linear.c + +src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather_allcomm_nb.lo: src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather_allcomm_nb.Tpo src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c' object='src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_allgather/lib_libpmpi_la-neighbor_allgather_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c + +src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.lo: src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.Tpo src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c' object='src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_allgatherv/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c + +src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.lo: src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.Tpo src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c' object='src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoall/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c + +src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.lo: src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.Tpo src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c' object='src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoallv/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c + +src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.lo: src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.lo -MD -MP -MF src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.Tpo -c -o src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c + $(AM_V_at)$(am__mv) src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.Tpo src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.Plo +# $(AM_V_CC)source='src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c' object='src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/neighbor_alltoallw/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.lo `test -f 'src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c' || echo '$(srcdir)/'`src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_recursive_doubling.lo: src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_recursive_doubling.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_brucks.lo: src/mpi/coll/iallgather/iallgather_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_brucks.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_brucks.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_brucks.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_brucks.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_brucks.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_brucks.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_brucks.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_ring.lo: src/mpi/coll/iallgather/iallgather_intra_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_ring.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_ring.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_ring.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_ring.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_ring.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_ring.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_ring.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.lo: src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.lo `test -f 'src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.lo `test -f 'src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_gentran_algos.lo: src/mpi/coll/iallgather/iallgather_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_gentran_algos.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_gentran_algos.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_gentran_algos.lo `test -f 'src/mpi/coll/iallgather/iallgather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_gentran_algos.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_gentran_algos.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_gentran_algos.lo `test -f 'src/mpi/coll/iallgather/iallgather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_gentran_algos.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.lo: src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.lo: src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_brucks.lo: src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_brucks.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_brucks.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_brucks.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_brucks.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_brucks.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c + +src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_ring.lo: src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_ring.Tpo -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_ring.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_ring.Tpo src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c' object='src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgather/lib_libpmpi_la-iallgather_intra_gentran_ring.lo `test -f 'src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_brucks.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_brucks.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_brucks.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_brucks.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_brucks.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_brucks.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_ring.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_ring.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_ring.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_ring.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_ring.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_ring.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo: src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_gentran_algos.lo: src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_gentran_algos.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_gentran_algos.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_gentran_algos.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_gentran_algos.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_gentran_algos.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_ring.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_ring.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_ring.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_ring.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_ring.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.lo: src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c + +src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_utils.lo: src/mpi/coll/iallgatherv/iallgatherv_utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_utils.lo -MD -MP -MF src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_utils.Tpo -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_utils.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_utils.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_utils.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_utils.Tpo src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_utils.Plo +# $(AM_V_CC)source='src/mpi/coll/iallgatherv/iallgatherv_utils.c' object='src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallgatherv/lib_libpmpi_la-iallgatherv_utils.lo `test -f 'src/mpi/coll/iallgatherv/iallgatherv_utils.c' || echo '$(srcdir)/'`src/mpi/coll/iallgatherv/iallgatherv_utils.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_naive.lo: src/mpi/coll/iallreduce/iallreduce_intra_naive.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_naive.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_naive.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_naive.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_naive.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_naive.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_naive.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_naive.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_naive.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_naive.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_naive.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_naive.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_naive.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.lo: src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_recursive_doubling.lo: src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_recursive_doubling.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_smp.lo: src/mpi/coll/iallreduce/iallreduce_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_smp.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_smp.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_smp.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_smp.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_smp.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_smp.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_smp.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo: src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_gentran_algos.lo: src/mpi/coll/iallreduce/iallreduce_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_gentran_algos.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_gentran_algos.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_gentran_algos.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_gentran_algos.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_gentran_algos.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_gentran_algos.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_gentran_algos.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo: src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo: src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c + +src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_tree.lo: src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_tree.Tpo -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_tree.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_tree.Tpo src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c' object='src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iallreduce/lib_libpmpi_la-iallreduce_intra_gentran_tree.lo `test -f 'src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_inplace.lo: src/mpi/coll/ialltoall/ialltoall_intra_inplace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_inplace.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_inplace.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_inplace.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_inplace.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_inplace.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_inplace.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_inplace.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_inplace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_inplace.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_inplace.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_brucks.lo: src/mpi/coll/ialltoall/ialltoall_intra_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_brucks.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_brucks.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_brucks.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_brucks.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_brucks.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_brucks.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_brucks.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.lo: src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_pairwise.lo: src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_pairwise.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_pairwise.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_pairwise.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_pairwise.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_pairwise.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.lo: src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_gentran_algos.lo: src/mpi/coll/ialltoall/ialltoall_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_gentran_algos.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_gentran_algos.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_gentran_algos.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_gentran_algos.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_gentran_algos.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_gentran_algos.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_gentran_algos.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_brucks.lo: src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_brucks.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_brucks.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_brucks.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_brucks.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_brucks.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_brucks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_brucks.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c + +src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_ring.lo: src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_ring.Tpo -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_ring.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_ring.Tpo src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c' object='src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoall/lib_libpmpi_la-ialltoall_intra_gentran_ring.lo `test -f 'src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c + +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_inplace.lo: src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_inplace.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_inplace.Tpo -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_inplace.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_inplace.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_inplace.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c' object='src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_inplace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_inplace.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c + +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_blocked.lo: src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_blocked.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_blocked.Tpo -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_blocked.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_blocked.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_blocked.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c' object='src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_blocked.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_blocked.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c + +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.lo: src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c' object='src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c + +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_gentran_algos.lo: src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_gentran_algos.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_gentran_algos.Tpo -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_gentran_algos.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_gentran_algos.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c' object='src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_gentran_algos.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c + +src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.lo: src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.lo -MD -MP -MF src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.Tpo -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.Tpo src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c' object='src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallv/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.lo `test -f 'src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c + +src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_inplace.lo: src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_inplace.lo -MD -MP -MF src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_inplace.Tpo -c -o src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_inplace.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_inplace.Tpo src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_inplace.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c' object='src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_inplace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_inplace.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c + +src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_blocked.lo: src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_blocked.lo -MD -MP -MF src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_blocked.Tpo -c -o src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_blocked.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_blocked.Tpo src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_blocked.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c' object='src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_blocked.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_intra_blocked.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c + +src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.lo: src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.lo -MD -MP -MF src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.Tpo -c -o src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c + $(AM_V_at)$(am__mv) src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.Tpo src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.Plo +# $(AM_V_CC)source='src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c' object='src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ialltoallw/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.lo `test -f 'src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c' || echo '$(srcdir)/'`src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c + +src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_recursive_doubling.lo: src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_recursive_doubling.Tpo -c -o src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_recursive_doubling.Tpo src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c' object='src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c + +src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_inter_bcast.lo: src/mpi/coll/ibarrier/ibarrier_inter_bcast.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_inter_bcast.lo -MD -MP -MF src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_inter_bcast.Tpo -c -o src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_inter_bcast.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_inter_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_inter_bcast.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_inter_bcast.Tpo src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_inter_bcast.Plo +# $(AM_V_CC)source='src/mpi/coll/ibarrier/ibarrier_inter_bcast.c' object='src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_inter_bcast.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_inter_bcast.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_inter_bcast.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_inter_bcast.c + +src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_gentran_recexch.lo: src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_gentran_recexch.lo -MD -MP -MF src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_gentran_recexch.Tpo -c -o src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_gentran_recexch.Tpo src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_gentran_recexch.Plo +# $(AM_V_CC)source='src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c' object='src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_gentran_recexch.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibarrier/lib_libpmpi_la-ibarrier_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_binomial.lo: src/mpi/coll/ibcast/ibcast_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_binomial.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_binomial.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_binomial.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_binomial.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_binomial.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_binomial.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_binomial.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.lo: src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo: src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_smp.lo: src/mpi/coll/ibcast/ibcast_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_smp.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_smp.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_smp.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_smp.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_smp.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_smp.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_smp.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_inter_flat.lo: src/mpi/coll/ibcast/ibcast_inter_flat.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_inter_flat.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_inter_flat.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_inter_flat.lo `test -f 'src/mpi/coll/ibcast/ibcast_inter_flat.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_inter_flat.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_inter_flat.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_inter_flat.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_inter_flat.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_inter_flat.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_inter_flat.lo `test -f 'src/mpi/coll/ibcast/ibcast_inter_flat.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_inter_flat.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_gentran_algos.lo: src/mpi/coll/ibcast/ibcast_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_gentran_algos.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_gentran_algos.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_gentran_algos.lo `test -f 'src/mpi/coll/ibcast/ibcast_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_gentran_algos.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_gentran_algos.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_gentran_algos.lo `test -f 'src/mpi/coll/ibcast/ibcast_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_gentran_algos.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_tree.lo: src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_tree.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_tree.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_tree.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_tree.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo: src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_ring.lo: src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_ring.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_ring.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_ring.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_intra_gentran_ring.lo `test -f 'src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c + +src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_utils.lo: src/mpi/coll/ibcast/ibcast_utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_utils.lo -MD -MP -MF src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_utils.Tpo -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_utils.lo `test -f 'src/mpi/coll/ibcast/ibcast_utils.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_utils.c + $(AM_V_at)$(am__mv) src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_utils.Tpo src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_utils.Plo +# $(AM_V_CC)source='src/mpi/coll/ibcast/ibcast_utils.c' object='src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ibcast/lib_libpmpi_la-ibcast_utils.lo `test -f 'src/mpi/coll/ibcast/ibcast_utils.c' || echo '$(srcdir)/'`src/mpi/coll/ibcast/ibcast_utils.c + +src/mpi/coll/iexscan/lib_libpmpi_la-iexscan_intra_recursive_doubling.lo: src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iexscan/lib_libpmpi_la-iexscan_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iexscan/lib_libpmpi_la-iexscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan_intra_recursive_doubling.Tpo src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c' object='src/mpi/coll/iexscan/lib_libpmpi_la-iexscan_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iexscan/lib_libpmpi_la-iexscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c + +src/mpi/coll/igather/lib_libpmpi_la-igather_intra_binomial.lo: src/mpi/coll/igather/igather_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libpmpi_la-igather_intra_binomial.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_binomial.Tpo -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_intra_binomial.lo `test -f 'src/mpi/coll/igather/igather_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_binomial.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_intra_binomial.c' object='src/mpi/coll/igather/lib_libpmpi_la-igather_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_intra_binomial.lo `test -f 'src/mpi/coll/igather/igather_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_intra_binomial.c + +src/mpi/coll/igather/lib_libpmpi_la-igather_inter_short.lo: src/mpi/coll/igather/igather_inter_short.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libpmpi_la-igather_inter_short.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_short.Tpo -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_inter_short.lo `test -f 'src/mpi/coll/igather/igather_inter_short.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_inter_short.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_short.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_short.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_inter_short.c' object='src/mpi/coll/igather/lib_libpmpi_la-igather_inter_short.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_inter_short.lo `test -f 'src/mpi/coll/igather/igather_inter_short.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_inter_short.c + +src/mpi/coll/igather/lib_libpmpi_la-igather_inter_long.lo: src/mpi/coll/igather/igather_inter_long.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libpmpi_la-igather_inter_long.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_long.Tpo -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_inter_long.lo `test -f 'src/mpi/coll/igather/igather_inter_long.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_inter_long.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_long.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_long.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_inter_long.c' object='src/mpi/coll/igather/lib_libpmpi_la-igather_inter_long.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_inter_long.lo `test -f 'src/mpi/coll/igather/igather_inter_long.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_inter_long.c + +src/mpi/coll/igather/lib_libpmpi_la-igather_gentran_algos.lo: src/mpi/coll/igather/igather_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libpmpi_la-igather_gentran_algos.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_gentran_algos.Tpo -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_gentran_algos.lo `test -f 'src/mpi/coll/igather/igather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_gentran_algos.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_gentran_algos.c' object='src/mpi/coll/igather/lib_libpmpi_la-igather_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_gentran_algos.lo `test -f 'src/mpi/coll/igather/igather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_gentran_algos.c + +src/mpi/coll/igather/lib_libpmpi_la-igather_intra_gentran_tree.lo: src/mpi/coll/igather/igather_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igather/lib_libpmpi_la-igather_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_gentran_tree.Tpo -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_intra_gentran_tree.lo `test -f 'src/mpi/coll/igather/igather_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_gentran_tree.Tpo src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/igather/igather_intra_gentran_tree.c' object='src/mpi/coll/igather/lib_libpmpi_la-igather_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igather/lib_libpmpi_la-igather_intra_gentran_tree.lo `test -f 'src/mpi/coll/igather/igather_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/igather/igather_intra_gentran_tree.c + +src/mpi/coll/igatherv/lib_libpmpi_la-igatherv_allcomm_linear.lo: src/mpi/coll/igatherv/igatherv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/igatherv/lib_libpmpi_la-igatherv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv_allcomm_linear.Tpo -c -o src/mpi/coll/igatherv/lib_libpmpi_la-igatherv_allcomm_linear.lo `test -f 'src/mpi/coll/igatherv/igatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/igatherv/igatherv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv_allcomm_linear.Tpo src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/igatherv/igatherv_allcomm_linear.c' object='src/mpi/coll/igatherv/lib_libpmpi_la-igatherv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/igatherv/lib_libpmpi_la-igatherv_allcomm_linear.lo `test -f 'src/mpi/coll/igatherv/igatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/igatherv/igatherv_allcomm_linear.c + +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c' object='src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c + +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_pairwise.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_pairwise.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_pairwise.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_pairwise.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_pairwise.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c' object='src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_pairwise.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c + +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c' object='src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c + +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c' object='src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c + +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c' object='src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c + +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_gentran_algos.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_gentran_algos.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_gentran_algos.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_gentran_algos.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_gentran_algos.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c' object='src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_gentran_algos.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c + +src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.lo: src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.lo -MD -MP -MF src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.Tpo -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.Tpo src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c' object='src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c + +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c' object='src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c + +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c' object='src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c + +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c' object='src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c + +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c' object='src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c + +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c' object='src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c + +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c' object='src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c + +src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo: src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo -MD -MP -MF src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.Tpo -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.Tpo src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c' object='src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce_scatter_block/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.lo `test -f 'src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c + +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_binomial.lo: src/mpi/coll/ireduce/ireduce_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_binomial.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_binomial.Tpo -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_binomial.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_binomial.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_binomial.c' object='src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_binomial.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_binomial.c + +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.lo: src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.Tpo -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c' object='src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c + +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_smp.lo: src/mpi/coll/ireduce/ireduce_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_smp.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_smp.Tpo -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_smp.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_smp.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_smp.c' object='src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_smp.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_smp.c + +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.lo: src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.Tpo -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.lo `test -f 'src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c' object='src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.lo `test -f 'src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c + +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_gentran_algos.lo: src/mpi/coll/ireduce/ireduce_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_gentran_algos.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_gentran_algos.Tpo -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_gentran_algos.lo `test -f 'src/mpi/coll/ireduce/ireduce_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_gentran_algos.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_gentran_algos.c' object='src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_gentran_algos.lo `test -f 'src/mpi/coll/ireduce/ireduce_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_gentran_algos.c + +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_tree.lo: src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_tree.Tpo -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_tree.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_tree.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c' object='src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_tree.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c + +src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_ring.lo: src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_ring.lo -MD -MP -MF src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_ring.Tpo -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_ring.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c + $(AM_V_at)$(am__mv) src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_ring.Tpo src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_ring.Plo +# $(AM_V_CC)source='src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c' object='src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_ring.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ireduce/lib_libpmpi_la-ireduce_intra_gentran_ring.lo `test -f 'src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c' || echo '$(srcdir)/'`src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c + +src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_recursive_doubling.lo: src/mpi/coll/iscan/iscan_intra_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_recursive_doubling.Tpo -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iscan/iscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_recursive_doubling.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan_intra_recursive_doubling.c' object='src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_recursive_doubling.lo `test -f 'src/mpi/coll/iscan/iscan_intra_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_recursive_doubling.c + +src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_smp.lo: src/mpi/coll/iscan/iscan_intra_smp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_smp.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_smp.Tpo -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_smp.lo `test -f 'src/mpi/coll/iscan/iscan_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_smp.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_smp.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_smp.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan_intra_smp.c' object='src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_smp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_smp.lo `test -f 'src/mpi/coll/iscan/iscan_intra_smp.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_smp.c + +src/mpi/coll/iscan/lib_libpmpi_la-iscan_gentran_algos.lo: src/mpi/coll/iscan/iscan_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libpmpi_la-iscan_gentran_algos.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_gentran_algos.Tpo -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan_gentran_algos.lo `test -f 'src/mpi/coll/iscan/iscan_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_gentran_algos.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan_gentran_algos.c' object='src/mpi/coll/iscan/lib_libpmpi_la-iscan_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan_gentran_algos.lo `test -f 'src/mpi/coll/iscan/iscan_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_gentran_algos.c + +src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.lo: src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.lo -MD -MP -MF src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.Tpo -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.lo `test -f 'src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.Tpo src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.Plo +# $(AM_V_CC)source='src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c' object='src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscan/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.lo `test -f 'src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c' || echo '$(srcdir)/'`src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c + +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_binomial.lo: src/mpi/coll/iscatter/iscatter_intra_binomial.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_binomial.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_binomial.Tpo -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_binomial.lo `test -f 'src/mpi/coll/iscatter/iscatter_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_intra_binomial.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_binomial.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_binomial.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_intra_binomial.c' object='src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_binomial.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_binomial.lo `test -f 'src/mpi/coll/iscatter/iscatter_intra_binomial.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_intra_binomial.c + +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_linear.lo: src/mpi/coll/iscatter/iscatter_inter_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_linear.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_linear.Tpo -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_linear.lo `test -f 'src/mpi/coll/iscatter/iscatter_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_inter_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_linear.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_inter_linear.c' object='src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_linear.lo `test -f 'src/mpi/coll/iscatter/iscatter_inter_linear.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_inter_linear.c + +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.lo: src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.Tpo -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.lo `test -f 'src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c' object='src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.lo `test -f 'src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c + +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_gentran_algos.lo: src/mpi/coll/iscatter/iscatter_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_gentran_algos.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_gentran_algos.Tpo -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_gentran_algos.lo `test -f 'src/mpi/coll/iscatter/iscatter_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_gentran_algos.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_gentran_algos.c' object='src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_gentran_algos.lo `test -f 'src/mpi/coll/iscatter/iscatter_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_gentran_algos.c + +src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_gentran_tree.lo: src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_gentran_tree.lo -MD -MP -MF src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_gentran_tree.Tpo -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_gentran_tree.lo `test -f 'src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_gentran_tree.Tpo src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_gentran_tree.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c' object='src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_gentran_tree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatter/lib_libpmpi_la-iscatter_intra_gentran_tree.lo `test -f 'src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c' || echo '$(srcdir)/'`src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c + +src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv_allcomm_linear.lo: src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv_allcomm_linear.Tpo -c -o src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv_allcomm_linear.lo `test -f 'src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv_allcomm_linear.Tpo src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c' object='src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/iscatterv/lib_libpmpi_la-iscatterv_allcomm_linear.lo `test -f 'src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c + +src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.lo: src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.Tpo src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c' object='src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c + +src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_gentran_algos.lo: src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_gentran_algos.Tpo src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c' object='src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c + +src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgather/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c + +src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.lo: src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.Tpo src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c' object='src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c + +src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.lo: src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.Tpo src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c' object='src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c + +src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_allgatherv/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c + +src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.lo: src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.Tpo src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c' object='src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c + +src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.lo: src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.Tpo src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c' object='src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c + +src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoall/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c + +src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.lo: src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.Tpo src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c' object='src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c + +src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.lo: src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.Tpo src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c' object='src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c + +src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallv/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c + +src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.lo: src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.Tpo src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c' object='src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c + +src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.lo: src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.Tpo -c -o src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.Tpo src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c' object='src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c + +src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo: src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo -MD -MP -MF src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Tpo -c -o src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c + $(AM_V_at)$(am__mv) src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Tpo src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo +# $(AM_V_CC)source='src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c' object='src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/ineighbor_alltoallw/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.lo `test -f 'src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c' || echo '$(srcdir)/'`src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c + +src/mpi/coll/op/lib_libpmpi_la-opsum.lo: src/mpi/coll/op/opsum.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opsum.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opsum.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opsum.lo `test -f 'src/mpi/coll/op/opsum.c' || echo '$(srcdir)/'`src/mpi/coll/op/opsum.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opsum.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opsum.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opsum.c' object='src/mpi/coll/op/lib_libpmpi_la-opsum.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opsum.lo `test -f 'src/mpi/coll/op/opsum.c' || echo '$(srcdir)/'`src/mpi/coll/op/opsum.c + +src/mpi/coll/op/lib_libpmpi_la-opmax.lo: src/mpi/coll/op/opmax.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opmax.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmax.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opmax.lo `test -f 'src/mpi/coll/op/opmax.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmax.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmax.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmax.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opmax.c' object='src/mpi/coll/op/lib_libpmpi_la-opmax.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opmax.lo `test -f 'src/mpi/coll/op/opmax.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmax.c + +src/mpi/coll/op/lib_libpmpi_la-opmin.lo: src/mpi/coll/op/opmin.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opmin.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmin.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opmin.lo `test -f 'src/mpi/coll/op/opmin.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmin.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmin.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmin.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opmin.c' object='src/mpi/coll/op/lib_libpmpi_la-opmin.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opmin.lo `test -f 'src/mpi/coll/op/opmin.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmin.c + +src/mpi/coll/op/lib_libpmpi_la-opband.lo: src/mpi/coll/op/opband.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opband.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opband.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opband.lo `test -f 'src/mpi/coll/op/opband.c' || echo '$(srcdir)/'`src/mpi/coll/op/opband.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opband.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opband.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opband.c' object='src/mpi/coll/op/lib_libpmpi_la-opband.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opband.lo `test -f 'src/mpi/coll/op/opband.c' || echo '$(srcdir)/'`src/mpi/coll/op/opband.c + +src/mpi/coll/op/lib_libpmpi_la-opbor.lo: src/mpi/coll/op/opbor.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opbor.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbor.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opbor.lo `test -f 'src/mpi/coll/op/opbor.c' || echo '$(srcdir)/'`src/mpi/coll/op/opbor.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbor.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbor.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opbor.c' object='src/mpi/coll/op/lib_libpmpi_la-opbor.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opbor.lo `test -f 'src/mpi/coll/op/opbor.c' || echo '$(srcdir)/'`src/mpi/coll/op/opbor.c + +src/mpi/coll/op/lib_libpmpi_la-opbxor.lo: src/mpi/coll/op/opbxor.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opbxor.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbxor.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opbxor.lo `test -f 'src/mpi/coll/op/opbxor.c' || echo '$(srcdir)/'`src/mpi/coll/op/opbxor.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbxor.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbxor.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opbxor.c' object='src/mpi/coll/op/lib_libpmpi_la-opbxor.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opbxor.lo `test -f 'src/mpi/coll/op/opbxor.c' || echo '$(srcdir)/'`src/mpi/coll/op/opbxor.c + +src/mpi/coll/op/lib_libpmpi_la-opland.lo: src/mpi/coll/op/opland.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opland.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opland.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opland.lo `test -f 'src/mpi/coll/op/opland.c' || echo '$(srcdir)/'`src/mpi/coll/op/opland.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opland.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opland.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opland.c' object='src/mpi/coll/op/lib_libpmpi_la-opland.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opland.lo `test -f 'src/mpi/coll/op/opland.c' || echo '$(srcdir)/'`src/mpi/coll/op/opland.c + +src/mpi/coll/op/lib_libpmpi_la-oplor.lo: src/mpi/coll/op/oplor.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-oplor.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplor.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-oplor.lo `test -f 'src/mpi/coll/op/oplor.c' || echo '$(srcdir)/'`src/mpi/coll/op/oplor.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplor.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplor.Plo +# $(AM_V_CC)source='src/mpi/coll/op/oplor.c' object='src/mpi/coll/op/lib_libpmpi_la-oplor.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-oplor.lo `test -f 'src/mpi/coll/op/oplor.c' || echo '$(srcdir)/'`src/mpi/coll/op/oplor.c + +src/mpi/coll/op/lib_libpmpi_la-oplxor.lo: src/mpi/coll/op/oplxor.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-oplxor.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplxor.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-oplxor.lo `test -f 'src/mpi/coll/op/oplxor.c' || echo '$(srcdir)/'`src/mpi/coll/op/oplxor.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplxor.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplxor.Plo +# $(AM_V_CC)source='src/mpi/coll/op/oplxor.c' object='src/mpi/coll/op/lib_libpmpi_la-oplxor.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-oplxor.lo `test -f 'src/mpi/coll/op/oplxor.c' || echo '$(srcdir)/'`src/mpi/coll/op/oplxor.c + +src/mpi/coll/op/lib_libpmpi_la-opprod.lo: src/mpi/coll/op/opprod.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opprod.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opprod.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opprod.lo `test -f 'src/mpi/coll/op/opprod.c' || echo '$(srcdir)/'`src/mpi/coll/op/opprod.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opprod.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opprod.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opprod.c' object='src/mpi/coll/op/lib_libpmpi_la-opprod.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opprod.lo `test -f 'src/mpi/coll/op/opprod.c' || echo '$(srcdir)/'`src/mpi/coll/op/opprod.c + +src/mpi/coll/op/lib_libpmpi_la-opminloc.lo: src/mpi/coll/op/opminloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opminloc.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opminloc.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opminloc.lo `test -f 'src/mpi/coll/op/opminloc.c' || echo '$(srcdir)/'`src/mpi/coll/op/opminloc.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opminloc.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opminloc.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opminloc.c' object='src/mpi/coll/op/lib_libpmpi_la-opminloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opminloc.lo `test -f 'src/mpi/coll/op/opminloc.c' || echo '$(srcdir)/'`src/mpi/coll/op/opminloc.c + +src/mpi/coll/op/lib_libpmpi_la-opmaxloc.lo: src/mpi/coll/op/opmaxloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opmaxloc.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmaxloc.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opmaxloc.lo `test -f 'src/mpi/coll/op/opmaxloc.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmaxloc.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmaxloc.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmaxloc.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opmaxloc.c' object='src/mpi/coll/op/lib_libpmpi_la-opmaxloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opmaxloc.lo `test -f 'src/mpi/coll/op/opmaxloc.c' || echo '$(srcdir)/'`src/mpi/coll/op/opmaxloc.c + +src/mpi/coll/op/lib_libpmpi_la-opno_op.lo: src/mpi/coll/op/opno_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opno_op.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opno_op.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opno_op.lo `test -f 'src/mpi/coll/op/opno_op.c' || echo '$(srcdir)/'`src/mpi/coll/op/opno_op.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opno_op.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opno_op.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opno_op.c' object='src/mpi/coll/op/lib_libpmpi_la-opno_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opno_op.lo `test -f 'src/mpi/coll/op/opno_op.c' || echo '$(srcdir)/'`src/mpi/coll/op/opno_op.c + +src/mpi/coll/op/lib_libpmpi_la-opreplace.lo: src/mpi/coll/op/opreplace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/op/lib_libpmpi_la-opreplace.lo -MD -MP -MF src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opreplace.Tpo -c -o src/mpi/coll/op/lib_libpmpi_la-opreplace.lo `test -f 'src/mpi/coll/op/opreplace.c' || echo '$(srcdir)/'`src/mpi/coll/op/opreplace.c + $(AM_V_at)$(am__mv) src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opreplace.Tpo src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opreplace.Plo +# $(AM_V_CC)source='src/mpi/coll/op/opreplace.c' object='src/mpi/coll/op/lib_libpmpi_la-opreplace.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/op/lib_libpmpi_la-opreplace.lo `test -f 'src/mpi/coll/op/opreplace.c' || echo '$(srcdir)/'`src/mpi/coll/op/opreplace.c + +src/mpi/coll/allreduce_group/lib_libpmpi_la-allreduce_group.lo: src/mpi/coll/allreduce_group/allreduce_group.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/allreduce_group/lib_libpmpi_la-allreduce_group.lo -MD -MP -MF src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libpmpi_la-allreduce_group.Tpo -c -o src/mpi/coll/allreduce_group/lib_libpmpi_la-allreduce_group.lo `test -f 'src/mpi/coll/allreduce_group/allreduce_group.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce_group/allreduce_group.c + $(AM_V_at)$(am__mv) src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libpmpi_la-allreduce_group.Tpo src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libpmpi_la-allreduce_group.Plo +# $(AM_V_CC)source='src/mpi/coll/allreduce_group/allreduce_group.c' object='src/mpi/coll/allreduce_group/lib_libpmpi_la-allreduce_group.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/allreduce_group/lib_libpmpi_la-allreduce_group.lo `test -f 'src/mpi/coll/allreduce_group/allreduce_group.c' || echo '$(srcdir)/'`src/mpi/coll/allreduce_group/allreduce_group.c + +src/mpi/coll/src/lib_libpmpi_la-coll_impl.lo: src/mpi/coll/src/coll_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/src/lib_libpmpi_la-coll_impl.lo -MD -MP -MF src/mpi/coll/src/$(DEPDIR)/lib_libpmpi_la-coll_impl.Tpo -c -o src/mpi/coll/src/lib_libpmpi_la-coll_impl.lo `test -f 'src/mpi/coll/src/coll_impl.c' || echo '$(srcdir)/'`src/mpi/coll/src/coll_impl.c + $(AM_V_at)$(am__mv) src/mpi/coll/src/$(DEPDIR)/lib_libpmpi_la-coll_impl.Tpo src/mpi/coll/src/$(DEPDIR)/lib_libpmpi_la-coll_impl.Plo +# $(AM_V_CC)source='src/mpi/coll/src/coll_impl.c' object='src/mpi/coll/src/lib_libpmpi_la-coll_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/src/lib_libpmpi_la-coll_impl.lo `test -f 'src/mpi/coll/src/coll_impl.c' || echo '$(srcdir)/'`src/mpi/coll/src/coll_impl.c + +src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_impl.lo: src/mpi/coll/transports/gentran/gentran_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_impl.lo -MD -MP -MF src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_impl.Tpo -c -o src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_impl.lo `test -f 'src/mpi/coll/transports/gentran/gentran_impl.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/gentran_impl.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_impl.Tpo src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_impl.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/gentran/gentran_impl.c' object='src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_impl.lo `test -f 'src/mpi/coll/transports/gentran/gentran_impl.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/gentran_impl.c + +src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_utils.lo: src/mpi/coll/transports/gentran/gentran_utils.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_utils.lo -MD -MP -MF src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_utils.Tpo -c -o src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_utils.lo `test -f 'src/mpi/coll/transports/gentran/gentran_utils.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/gentran_utils.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_utils.Tpo src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_utils.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/gentran/gentran_utils.c' object='src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_utils.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/gentran/lib_libpmpi_la-gentran_utils.lo `test -f 'src/mpi/coll/transports/gentran/gentran_utils.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/gentran_utils.c + +src/mpi/coll/transports/gentran/lib_libpmpi_la-tsp_gentran.lo: src/mpi/coll/transports/gentran/tsp_gentran.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/gentran/lib_libpmpi_la-tsp_gentran.lo -MD -MP -MF src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-tsp_gentran.Tpo -c -o src/mpi/coll/transports/gentran/lib_libpmpi_la-tsp_gentran.lo `test -f 'src/mpi/coll/transports/gentran/tsp_gentran.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/tsp_gentran.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-tsp_gentran.Tpo src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-tsp_gentran.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/gentran/tsp_gentran.c' object='src/mpi/coll/transports/gentran/lib_libpmpi_la-tsp_gentran.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/gentran/lib_libpmpi_la-tsp_gentran.lo `test -f 'src/mpi/coll/transports/gentran/tsp_gentran.c' || echo '$(srcdir)/'`src/mpi/coll/transports/gentran/tsp_gentran.c + +src/mpi/coll/transports/stubtran/lib_libpmpi_la-stubtran_impl.lo: src/mpi/coll/transports/stubtran/stubtran_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/stubtran/lib_libpmpi_la-stubtran_impl.lo -MD -MP -MF src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-stubtran_impl.Tpo -c -o src/mpi/coll/transports/stubtran/lib_libpmpi_la-stubtran_impl.lo `test -f 'src/mpi/coll/transports/stubtran/stubtran_impl.c' || echo '$(srcdir)/'`src/mpi/coll/transports/stubtran/stubtran_impl.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-stubtran_impl.Tpo src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-stubtran_impl.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/stubtran/stubtran_impl.c' object='src/mpi/coll/transports/stubtran/lib_libpmpi_la-stubtran_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/stubtran/lib_libpmpi_la-stubtran_impl.lo `test -f 'src/mpi/coll/transports/stubtran/stubtran_impl.c' || echo '$(srcdir)/'`src/mpi/coll/transports/stubtran/stubtran_impl.c + +src/mpi/coll/transports/stubtran/lib_libpmpi_la-tsp_stubtran.lo: src/mpi/coll/transports/stubtran/tsp_stubtran.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/transports/stubtran/lib_libpmpi_la-tsp_stubtran.lo -MD -MP -MF src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-tsp_stubtran.Tpo -c -o src/mpi/coll/transports/stubtran/lib_libpmpi_la-tsp_stubtran.lo `test -f 'src/mpi/coll/transports/stubtran/tsp_stubtran.c' || echo '$(srcdir)/'`src/mpi/coll/transports/stubtran/tsp_stubtran.c + $(AM_V_at)$(am__mv) src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-tsp_stubtran.Tpo src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-tsp_stubtran.Plo +# $(AM_V_CC)source='src/mpi/coll/transports/stubtran/tsp_stubtran.c' object='src/mpi/coll/transports/stubtran/lib_libpmpi_la-tsp_stubtran.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/transports/stubtran/lib_libpmpi_la-tsp_stubtran.lo `test -f 'src/mpi/coll/transports/stubtran/tsp_stubtran.c' || echo '$(srcdir)/'`src/mpi/coll/transports/stubtran/tsp_stubtran.c + +src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treealgo.lo: src/mpi/coll/algorithms/treealgo/treealgo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treealgo.lo -MD -MP -MF src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treealgo.Tpo -c -o src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treealgo.lo `test -f 'src/mpi/coll/algorithms/treealgo/treealgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/treealgo/treealgo.c + $(AM_V_at)$(am__mv) src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treealgo.Tpo src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treealgo.Plo +# $(AM_V_CC)source='src/mpi/coll/algorithms/treealgo/treealgo.c' object='src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treealgo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treealgo.lo `test -f 'src/mpi/coll/algorithms/treealgo/treealgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/treealgo/treealgo.c + +src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treeutil.lo: src/mpi/coll/algorithms/treealgo/treeutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treeutil.lo -MD -MP -MF src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treeutil.Tpo -c -o src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treeutil.lo `test -f 'src/mpi/coll/algorithms/treealgo/treeutil.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/treealgo/treeutil.c + $(AM_V_at)$(am__mv) src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treeutil.Tpo src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treeutil.Plo +# $(AM_V_CC)source='src/mpi/coll/algorithms/treealgo/treeutil.c' object='src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treeutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/algorithms/treealgo/lib_libpmpi_la-treeutil.lo `test -f 'src/mpi/coll/algorithms/treealgo/treeutil.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/treealgo/treeutil.c + +src/mpi/coll/algorithms/recexchalgo/lib_libpmpi_la-recexchalgo.lo: src/mpi/coll/algorithms/recexchalgo/recexchalgo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/algorithms/recexchalgo/lib_libpmpi_la-recexchalgo.lo -MD -MP -MF src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libpmpi_la-recexchalgo.Tpo -c -o src/mpi/coll/algorithms/recexchalgo/lib_libpmpi_la-recexchalgo.lo `test -f 'src/mpi/coll/algorithms/recexchalgo/recexchalgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/recexchalgo/recexchalgo.c + $(AM_V_at)$(am__mv) src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libpmpi_la-recexchalgo.Tpo src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libpmpi_la-recexchalgo.Plo +# $(AM_V_CC)source='src/mpi/coll/algorithms/recexchalgo/recexchalgo.c' object='src/mpi/coll/algorithms/recexchalgo/lib_libpmpi_la-recexchalgo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/algorithms/recexchalgo/lib_libpmpi_la-recexchalgo.lo `test -f 'src/mpi/coll/algorithms/recexchalgo/recexchalgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/recexchalgo/recexchalgo.c + +src/mpi/coll/algorithms/stubalgo/lib_libpmpi_la-stubalgo.lo: src/mpi/coll/algorithms/stubalgo/stubalgo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/algorithms/stubalgo/lib_libpmpi_la-stubalgo.lo -MD -MP -MF src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libpmpi_la-stubalgo.Tpo -c -o src/mpi/coll/algorithms/stubalgo/lib_libpmpi_la-stubalgo.lo `test -f 'src/mpi/coll/algorithms/stubalgo/stubalgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/stubalgo/stubalgo.c + $(AM_V_at)$(am__mv) src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libpmpi_la-stubalgo.Tpo src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libpmpi_la-stubalgo.Plo +# $(AM_V_CC)source='src/mpi/coll/algorithms/stubalgo/stubalgo.c' object='src/mpi/coll/algorithms/stubalgo/lib_libpmpi_la-stubalgo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/algorithms/stubalgo/lib_libpmpi_la-stubalgo.lo `test -f 'src/mpi/coll/algorithms/stubalgo/stubalgo.c' || echo '$(srcdir)/'`src/mpi/coll/algorithms/stubalgo/stubalgo.c + +src/mpi/coll/lib_libpmpi_la-helper_fns.lo: src/mpi/coll/helper_fns.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/lib_libpmpi_la-helper_fns.lo -MD -MP -MF src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-helper_fns.Tpo -c -o src/mpi/coll/lib_libpmpi_la-helper_fns.lo `test -f 'src/mpi/coll/helper_fns.c' || echo '$(srcdir)/'`src/mpi/coll/helper_fns.c + $(AM_V_at)$(am__mv) src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-helper_fns.Tpo src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-helper_fns.Plo +# $(AM_V_CC)source='src/mpi/coll/helper_fns.c' object='src/mpi/coll/lib_libpmpi_la-helper_fns.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/lib_libpmpi_la-helper_fns.lo `test -f 'src/mpi/coll/helper_fns.c' || echo '$(srcdir)/'`src/mpi/coll/helper_fns.c + +src/mpi/coll/lib_libpmpi_la-nbcutil.lo: src/mpi/coll/nbcutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/coll/lib_libpmpi_la-nbcutil.lo -MD -MP -MF src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-nbcutil.Tpo -c -o src/mpi/coll/lib_libpmpi_la-nbcutil.lo `test -f 'src/mpi/coll/nbcutil.c' || echo '$(srcdir)/'`src/mpi/coll/nbcutil.c + $(AM_V_at)$(am__mv) src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-nbcutil.Tpo src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-nbcutil.Plo +# $(AM_V_CC)source='src/mpi/coll/nbcutil.c' object='src/mpi/coll/lib_libpmpi_la-nbcutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/coll/lib_libpmpi_la-nbcutil.lo `test -f 'src/mpi/coll/nbcutil.c' || echo '$(srcdir)/'`src/mpi/coll/nbcutil.c + +src/mpi/comm/lib_libpmpi_la-commutil.lo: src/mpi/comm/commutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-commutil.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-commutil.Tpo -c -o src/mpi/comm/lib_libpmpi_la-commutil.lo `test -f 'src/mpi/comm/commutil.c' || echo '$(srcdir)/'`src/mpi/comm/commutil.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-commutil.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-commutil.Plo +# $(AM_V_CC)source='src/mpi/comm/commutil.c' object='src/mpi/comm/lib_libpmpi_la-commutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-commutil.lo `test -f 'src/mpi/comm/commutil.c' || echo '$(srcdir)/'`src/mpi/comm/commutil.c + +src/mpi/comm/lib_libpmpi_la-contextid.lo: src/mpi/comm/contextid.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/comm/lib_libpmpi_la-contextid.lo -MD -MP -MF src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-contextid.Tpo -c -o src/mpi/comm/lib_libpmpi_la-contextid.lo `test -f 'src/mpi/comm/contextid.c' || echo '$(srcdir)/'`src/mpi/comm/contextid.c + $(AM_V_at)$(am__mv) src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-contextid.Tpo src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-contextid.Plo +# $(AM_V_CC)source='src/mpi/comm/contextid.c' object='src/mpi/comm/lib_libpmpi_la-contextid.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/comm/lib_libpmpi_la-contextid.lo `test -f 'src/mpi/comm/contextid.c' || echo '$(srcdir)/'`src/mpi/comm/contextid.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-darray_support.lo: src/mpi/datatype/typerep/dataloop/darray_support.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-darray_support.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-darray_support.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-darray_support.lo `test -f 'src/mpi/datatype/typerep/dataloop/darray_support.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/darray_support.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-darray_support.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-darray_support.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/darray_support.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-darray_support.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-darray_support.lo `test -f 'src/mpi/datatype/typerep/dataloop/darray_support.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/darray_support.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop.lo: src/mpi/datatype/typerep/dataloop/dataloop.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create.lo: src/mpi/datatype/typerep/dataloop/dataloop_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_blockindexed.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_blockindexed.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_blockindexed.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_blockindexed.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_blockindexed.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_blockindexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_blockindexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_blockindexed.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_contig.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_contig.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_contig.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_contig.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_contig.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_contig.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_contig.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_contig.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_indexed.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_indexed.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_indexed.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_indexed.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_indexed.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_indexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_indexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_indexed.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_struct.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_struct.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_struct.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_struct.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_struct.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_struct.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_struct.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_struct.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_vector.lo: src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_vector.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_vector.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_vector.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_vector.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_vector.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_vector.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_create_vector.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-looputil.lo: src/mpi/datatype/typerep/dataloop/looputil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-looputil.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-looputil.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-looputil.lo `test -f 'src/mpi/datatype/typerep/dataloop/looputil.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/looputil.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-looputil.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-looputil.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/looputil.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-looputil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-looputil.lo `test -f 'src/mpi/datatype/typerep/dataloop/looputil.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/looputil.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment.lo: src/mpi/datatype/typerep/dataloop/segment.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/segment.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_count.lo: src/mpi/datatype/typerep/dataloop/segment_count.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_count.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_count.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_count.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment_count.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment_count.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_count.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_count.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/segment_count.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_count.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_count.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment_count.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment_count.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_flatten.lo: src/mpi/datatype/typerep/dataloop/segment_flatten.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_flatten.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_flatten.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_flatten.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment_flatten.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment_flatten.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_flatten.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_flatten.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/segment_flatten.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_flatten.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-segment_flatten.lo `test -f 'src/mpi/datatype/typerep/dataloop/segment_flatten.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/segment_flatten.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-subarray_support.lo: src/mpi/datatype/typerep/dataloop/subarray_support.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-subarray_support.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-subarray_support.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-subarray_support.lo `test -f 'src/mpi/datatype/typerep/dataloop/subarray_support.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/subarray_support.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-subarray_support.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-subarray_support.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/subarray_support.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-subarray_support.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-subarray_support.lo `test -f 'src/mpi/datatype/typerep/dataloop/subarray_support.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/subarray_support.c + +src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_debug.lo: src/mpi/datatype/typerep/dataloop/dataloop_debug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_debug.lo -MD -MP -MF src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_debug.Tpo -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_debug.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_debug.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_debug.Tpo src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_debug.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/dataloop/dataloop_debug.c' object='src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/dataloop/lib_libpmpi_la-dataloop_debug.lo `test -f 'src/mpi/datatype/typerep/dataloop/dataloop_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/dataloop/dataloop_debug.c + +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_flatten.lo: src/mpi/datatype/typerep/src/typerep_flatten.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_flatten.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_flatten.Tpo -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_flatten.lo `test -f 'src/mpi/datatype/typerep/src/typerep_flatten.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_flatten.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_flatten.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_flatten.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_flatten.c' object='src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_flatten.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_flatten.lo `test -f 'src/mpi/datatype/typerep/src/typerep_flatten.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_flatten.c + +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack.lo: src/mpi/datatype/typerep/src/typerep_pack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack.Tpo -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack.lo `test -f 'src/mpi/datatype/typerep/src/typerep_pack.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_pack.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_pack.c' object='src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack.lo `test -f 'src/mpi/datatype/typerep/src/typerep_pack.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_pack.c + +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack_external.lo: src/mpi/datatype/typerep/src/typerep_pack_external.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack_external.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack_external.Tpo -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack_external.lo `test -f 'src/mpi/datatype/typerep/src/typerep_pack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_pack_external.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack_external.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack_external.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_pack_external.c' object='src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack_external.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_pack_external.lo `test -f 'src/mpi/datatype/typerep/src/typerep_pack_external.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_pack_external.c + +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_iov.lo: src/mpi/datatype/typerep/src/typerep_iov.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_iov.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_iov.Tpo -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_iov.lo `test -f 'src/mpi/datatype/typerep/src/typerep_iov.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_iov.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_iov.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_iov.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_iov.c' object='src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_iov.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_iov.lo `test -f 'src/mpi/datatype/typerep/src/typerep_iov.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_iov.c + +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_create.lo: src/mpi/datatype/typerep/src/typerep_create.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_create.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_create.Tpo -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_create.lo `test -f 'src/mpi/datatype/typerep/src/typerep_create.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_create.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_create.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_create.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_create.c' object='src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_create.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_create.lo `test -f 'src/mpi/datatype/typerep/src/typerep_create.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_create.c + +src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_debug.lo: src/mpi/datatype/typerep/src/typerep_debug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_debug.lo -MD -MP -MF src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_debug.Tpo -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_debug.lo `test -f 'src/mpi/datatype/typerep/src/typerep_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_debug.c + $(AM_V_at)$(am__mv) src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_debug.Tpo src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_debug.Plo +# $(AM_V_CC)source='src/mpi/datatype/typerep/src/typerep_debug.c' object='src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/typerep/src/lib_libpmpi_la-typerep_debug.lo `test -f 'src/mpi/datatype/typerep/src/typerep_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/typerep/src/typerep_debug.c + +src/mpi/datatype/lib_libpmpi_la-typeutil.lo: src/mpi/datatype/typeutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-typeutil.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-typeutil.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-typeutil.lo `test -f 'src/mpi/datatype/typeutil.c' || echo '$(srcdir)/'`src/mpi/datatype/typeutil.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-typeutil.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-typeutil.Plo +# $(AM_V_CC)source='src/mpi/datatype/typeutil.c' object='src/mpi/datatype/lib_libpmpi_la-typeutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-typeutil.lo `test -f 'src/mpi/datatype/typeutil.c' || echo '$(srcdir)/'`src/mpi/datatype/typeutil.c + +src/mpi/datatype/lib_libpmpi_la-ext32_datatype.lo: src/mpi/datatype/ext32_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-ext32_datatype.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-ext32_datatype.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-ext32_datatype.lo `test -f 'src/mpi/datatype/ext32_datatype.c' || echo '$(srcdir)/'`src/mpi/datatype/ext32_datatype.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-ext32_datatype.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-ext32_datatype.Plo +# $(AM_V_CC)source='src/mpi/datatype/ext32_datatype.c' object='src/mpi/datatype/lib_libpmpi_la-ext32_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-ext32_datatype.lo `test -f 'src/mpi/datatype/ext32_datatype.c' || echo '$(srcdir)/'`src/mpi/datatype/ext32_datatype.c + +src/mpi/datatype/lib_libpmpi_la-type_blockindexed.lo: src/mpi/datatype/type_blockindexed.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_blockindexed.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_blockindexed.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_blockindexed.lo `test -f 'src/mpi/datatype/type_blockindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_blockindexed.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_blockindexed.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_blockindexed.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_blockindexed.c' object='src/mpi/datatype/lib_libpmpi_la-type_blockindexed.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_blockindexed.lo `test -f 'src/mpi/datatype/type_blockindexed.c' || echo '$(srcdir)/'`src/mpi/datatype/type_blockindexed.c + +src/mpi/datatype/lib_libpmpi_la-type_create_pairtype.lo: src/mpi/datatype/type_create_pairtype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_create_pairtype.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_pairtype.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_create_pairtype.lo `test -f 'src/mpi/datatype/type_create_pairtype.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_pairtype.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_pairtype.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_pairtype.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_create_pairtype.c' object='src/mpi/datatype/lib_libpmpi_la-type_create_pairtype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_create_pairtype.lo `test -f 'src/mpi/datatype/type_create_pairtype.c' || echo '$(srcdir)/'`src/mpi/datatype/type_create_pairtype.c + +src/mpi/datatype/lib_libpmpi_la-type_debug.lo: src/mpi/datatype/type_debug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/datatype/lib_libpmpi_la-type_debug.lo -MD -MP -MF src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_debug.Tpo -c -o src/mpi/datatype/lib_libpmpi_la-type_debug.lo `test -f 'src/mpi/datatype/type_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/type_debug.c + $(AM_V_at)$(am__mv) src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_debug.Tpo src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_debug.Plo +# $(AM_V_CC)source='src/mpi/datatype/type_debug.c' object='src/mpi/datatype/lib_libpmpi_la-type_debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/datatype/lib_libpmpi_la-type_debug.lo `test -f 'src/mpi/datatype/type_debug.c' || echo '$(srcdir)/'`src/mpi/datatype/type_debug.c + +src/mpi/errhan/lib_libpmpi_la-errutil.lo: src/mpi/errhan/errutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-errutil.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errutil.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-errutil.lo `test -f 'src/mpi/errhan/errutil.c' || echo '$(srcdir)/'`src/mpi/errhan/errutil.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errutil.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errutil.Plo +# $(AM_V_CC)source='src/mpi/errhan/errutil.c' object='src/mpi/errhan/lib_libpmpi_la-errutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-errutil.lo `test -f 'src/mpi/errhan/errutil.c' || echo '$(srcdir)/'`src/mpi/errhan/errutil.c + +src/mpi/errhan/lib_libpmpi_la-dynerrutil.lo: src/mpi/errhan/dynerrutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/errhan/lib_libpmpi_la-dynerrutil.lo -MD -MP -MF src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-dynerrutil.Tpo -c -o src/mpi/errhan/lib_libpmpi_la-dynerrutil.lo `test -f 'src/mpi/errhan/dynerrutil.c' || echo '$(srcdir)/'`src/mpi/errhan/dynerrutil.c + $(AM_V_at)$(am__mv) src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-dynerrutil.Tpo src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-dynerrutil.Plo +# $(AM_V_CC)source='src/mpi/errhan/dynerrutil.c' object='src/mpi/errhan/lib_libpmpi_la-dynerrutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/errhan/lib_libpmpi_la-dynerrutil.lo `test -f 'src/mpi/errhan/dynerrutil.c' || echo '$(srcdir)/'`src/mpi/errhan/dynerrutil.c + +src/mpi/group/lib_libpmpi_la-grouputil.lo: src/mpi/group/grouputil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/group/lib_libpmpi_la-grouputil.lo -MD -MP -MF src/mpi/group/$(DEPDIR)/lib_libpmpi_la-grouputil.Tpo -c -o src/mpi/group/lib_libpmpi_la-grouputil.lo `test -f 'src/mpi/group/grouputil.c' || echo '$(srcdir)/'`src/mpi/group/grouputil.c + $(AM_V_at)$(am__mv) src/mpi/group/$(DEPDIR)/lib_libpmpi_la-grouputil.Tpo src/mpi/group/$(DEPDIR)/lib_libpmpi_la-grouputil.Plo +# $(AM_V_CC)source='src/mpi/group/grouputil.c' object='src/mpi/group/lib_libpmpi_la-grouputil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/group/lib_libpmpi_la-grouputil.lo `test -f 'src/mpi/group/grouputil.c' || echo '$(srcdir)/'`src/mpi/group/grouputil.c + +src/mpi/info/lib_libpmpi_la-infoutil.lo: src/mpi/info/infoutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/info/lib_libpmpi_la-infoutil.lo -MD -MP -MF src/mpi/info/$(DEPDIR)/lib_libpmpi_la-infoutil.Tpo -c -o src/mpi/info/lib_libpmpi_la-infoutil.lo `test -f 'src/mpi/info/infoutil.c' || echo '$(srcdir)/'`src/mpi/info/infoutil.c + $(AM_V_at)$(am__mv) src/mpi/info/$(DEPDIR)/lib_libpmpi_la-infoutil.Tpo src/mpi/info/$(DEPDIR)/lib_libpmpi_la-infoutil.Plo +# $(AM_V_CC)source='src/mpi/info/infoutil.c' object='src/mpi/info/lib_libpmpi_la-infoutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/info/lib_libpmpi_la-infoutil.lo `test -f 'src/mpi/info/infoutil.c' || echo '$(srcdir)/'`src/mpi/info/infoutil.c + +src/mpi/init/lib_libpmpi_la-initinfo.lo: src/mpi/init/initinfo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-initinfo.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initinfo.Tpo -c -o src/mpi/init/lib_libpmpi_la-initinfo.lo `test -f 'src/mpi/init/initinfo.c' || echo '$(srcdir)/'`src/mpi/init/initinfo.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initinfo.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initinfo.Plo +# $(AM_V_CC)source='src/mpi/init/initinfo.c' object='src/mpi/init/lib_libpmpi_la-initinfo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-initinfo.lo `test -f 'src/mpi/init/initinfo.c' || echo '$(srcdir)/'`src/mpi/init/initinfo.c + +src/mpi/init/lib_libpmpi_la-async.lo: src/mpi/init/async.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-async.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-async.Tpo -c -o src/mpi/init/lib_libpmpi_la-async.lo `test -f 'src/mpi/init/async.c' || echo '$(srcdir)/'`src/mpi/init/async.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-async.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-async.Plo +# $(AM_V_CC)source='src/mpi/init/async.c' object='src/mpi/init/lib_libpmpi_la-async.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-async.lo `test -f 'src/mpi/init/async.c' || echo '$(srcdir)/'`src/mpi/init/async.c + +src/mpi/init/lib_libpmpi_la-netloc_util.lo: src/mpi/init/netloc_util.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/init/lib_libpmpi_la-netloc_util.lo -MD -MP -MF src/mpi/init/$(DEPDIR)/lib_libpmpi_la-netloc_util.Tpo -c -o src/mpi/init/lib_libpmpi_la-netloc_util.lo `test -f 'src/mpi/init/netloc_util.c' || echo '$(srcdir)/'`src/mpi/init/netloc_util.c + $(AM_V_at)$(am__mv) src/mpi/init/$(DEPDIR)/lib_libpmpi_la-netloc_util.Tpo src/mpi/init/$(DEPDIR)/lib_libpmpi_la-netloc_util.Plo +# $(AM_V_CC)source='src/mpi/init/netloc_util.c' object='src/mpi/init/lib_libpmpi_la-netloc_util.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/init/lib_libpmpi_la-netloc_util.lo `test -f 'src/mpi/init/netloc_util.c' || echo '$(srcdir)/'`src/mpi/init/netloc_util.c + +src/mpi/pt2pt/lib_libpmpi_la-bsendutil.lo: src/mpi/pt2pt/bsendutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/pt2pt/lib_libpmpi_la-bsendutil.lo -MD -MP -MF src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsendutil.Tpo -c -o src/mpi/pt2pt/lib_libpmpi_la-bsendutil.lo `test -f 'src/mpi/pt2pt/bsendutil.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsendutil.c + $(AM_V_at)$(am__mv) src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsendutil.Tpo src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsendutil.Plo +# $(AM_V_CC)source='src/mpi/pt2pt/bsendutil.c' object='src/mpi/pt2pt/lib_libpmpi_la-bsendutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/pt2pt/lib_libpmpi_la-bsendutil.lo `test -f 'src/mpi/pt2pt/bsendutil.c' || echo '$(srcdir)/'`src/mpi/pt2pt/bsendutil.c + +src/mpi/request/lib_libpmpi_la-mpir_request.lo: src/mpi/request/mpir_request.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/request/lib_libpmpi_la-mpir_request.lo -MD -MP -MF src/mpi/request/$(DEPDIR)/lib_libpmpi_la-mpir_request.Tpo -c -o src/mpi/request/lib_libpmpi_la-mpir_request.lo `test -f 'src/mpi/request/mpir_request.c' || echo '$(srcdir)/'`src/mpi/request/mpir_request.c + $(AM_V_at)$(am__mv) src/mpi/request/$(DEPDIR)/lib_libpmpi_la-mpir_request.Tpo src/mpi/request/$(DEPDIR)/lib_libpmpi_la-mpir_request.Plo +# $(AM_V_CC)source='src/mpi/request/mpir_request.c' object='src/mpi/request/lib_libpmpi_la-mpir_request.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/request/lib_libpmpi_la-mpir_request.lo `test -f 'src/mpi/request/mpir_request.c' || echo '$(srcdir)/'`src/mpi/request/mpir_request.c + +src/mpi/rma/lib_libpmpi_la-winutil.lo: src/mpi/rma/winutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-winutil.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-winutil.Tpo -c -o src/mpi/rma/lib_libpmpi_la-winutil.lo `test -f 'src/mpi/rma/winutil.c' || echo '$(srcdir)/'`src/mpi/rma/winutil.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-winutil.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-winutil.Plo +# $(AM_V_CC)source='src/mpi/rma/winutil.c' object='src/mpi/rma/lib_libpmpi_la-winutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-winutil.lo `test -f 'src/mpi/rma/winutil.c' || echo '$(srcdir)/'`src/mpi/rma/winutil.c + +src/mpi/rma/lib_libpmpi_la-rmatypeutil.lo: src/mpi/rma/rmatypeutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/rma/lib_libpmpi_la-rmatypeutil.lo -MD -MP -MF src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rmatypeutil.Tpo -c -o src/mpi/rma/lib_libpmpi_la-rmatypeutil.lo `test -f 'src/mpi/rma/rmatypeutil.c' || echo '$(srcdir)/'`src/mpi/rma/rmatypeutil.c + $(AM_V_at)$(am__mv) src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rmatypeutil.Tpo src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rmatypeutil.Plo +# $(AM_V_CC)source='src/mpi/rma/rmatypeutil.c' object='src/mpi/rma/lib_libpmpi_la-rmatypeutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/rma/lib_libpmpi_la-rmatypeutil.lo `test -f 'src/mpi/rma/rmatypeutil.c' || echo '$(srcdir)/'`src/mpi/rma/rmatypeutil.c + +src/mpi/topo/lib_libpmpi_la-topoutil.lo: src/mpi/topo/topoutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi/topo/lib_libpmpi_la-topoutil.lo -MD -MP -MF src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topoutil.Tpo -c -o src/mpi/topo/lib_libpmpi_la-topoutil.lo `test -f 'src/mpi/topo/topoutil.c' || echo '$(srcdir)/'`src/mpi/topo/topoutil.c + $(AM_V_at)$(am__mv) src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topoutil.Tpo src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topoutil.Plo +# $(AM_V_CC)source='src/mpi/topo/topoutil.c' object='src/mpi/topo/lib_libpmpi_la-topoutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi/topo/lib_libpmpi_la-topoutil.lo `test -f 'src/mpi/topo/topoutil.c' || echo '$(srcdir)/'`src/mpi/topo/topoutil.c + +src/util/mem/lib_libpmpi_la-handlemem.lo: src/util/mem/handlemem.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/mem/lib_libpmpi_la-handlemem.lo -MD -MP -MF src/util/mem/$(DEPDIR)/lib_libpmpi_la-handlemem.Tpo -c -o src/util/mem/lib_libpmpi_la-handlemem.lo `test -f 'src/util/mem/handlemem.c' || echo '$(srcdir)/'`src/util/mem/handlemem.c + $(AM_V_at)$(am__mv) src/util/mem/$(DEPDIR)/lib_libpmpi_la-handlemem.Tpo src/util/mem/$(DEPDIR)/lib_libpmpi_la-handlemem.Plo +# $(AM_V_CC)source='src/util/mem/handlemem.c' object='src/util/mem/lib_libpmpi_la-handlemem.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/mem/lib_libpmpi_la-handlemem.lo `test -f 'src/util/mem/handlemem.c' || echo '$(srcdir)/'`src/util/mem/handlemem.c + +src/util/mem/lib_libpmpi_la-strerror.lo: src/util/mem/strerror.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/mem/lib_libpmpi_la-strerror.lo -MD -MP -MF src/util/mem/$(DEPDIR)/lib_libpmpi_la-strerror.Tpo -c -o src/util/mem/lib_libpmpi_la-strerror.lo `test -f 'src/util/mem/strerror.c' || echo '$(srcdir)/'`src/util/mem/strerror.c + $(AM_V_at)$(am__mv) src/util/mem/$(DEPDIR)/lib_libpmpi_la-strerror.Tpo src/util/mem/$(DEPDIR)/lib_libpmpi_la-strerror.Plo +# $(AM_V_CC)source='src/util/mem/strerror.c' object='src/util/mem/lib_libpmpi_la-strerror.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/mem/lib_libpmpi_la-strerror.lo `test -f 'src/util/mem/strerror.c' || echo '$(srcdir)/'`src/util/mem/strerror.c + +src/util/cvar/lib_libpmpi_la-mpir_cvars.lo: src/util/cvar/mpir_cvars.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/cvar/lib_libpmpi_la-mpir_cvars.lo -MD -MP -MF src/util/cvar/$(DEPDIR)/lib_libpmpi_la-mpir_cvars.Tpo -c -o src/util/cvar/lib_libpmpi_la-mpir_cvars.lo `test -f 'src/util/cvar/mpir_cvars.c' || echo '$(srcdir)/'`src/util/cvar/mpir_cvars.c + $(AM_V_at)$(am__mv) src/util/cvar/$(DEPDIR)/lib_libpmpi_la-mpir_cvars.Tpo src/util/cvar/$(DEPDIR)/lib_libpmpi_la-mpir_cvars.Plo +# $(AM_V_CC)source='src/util/cvar/mpir_cvars.c' object='src/util/cvar/lib_libpmpi_la-mpir_cvars.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/cvar/lib_libpmpi_la-mpir_cvars.lo `test -f 'src/util/cvar/mpir_cvars.c' || echo '$(srcdir)/'`src/util/cvar/mpir_cvars.c + +src/util/procmap/lib_libpmpi_la-local_proc.lo: src/util/procmap/local_proc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/procmap/lib_libpmpi_la-local_proc.lo -MD -MP -MF src/util/procmap/$(DEPDIR)/lib_libpmpi_la-local_proc.Tpo -c -o src/util/procmap/lib_libpmpi_la-local_proc.lo `test -f 'src/util/procmap/local_proc.c' || echo '$(srcdir)/'`src/util/procmap/local_proc.c + $(AM_V_at)$(am__mv) src/util/procmap/$(DEPDIR)/lib_libpmpi_la-local_proc.Tpo src/util/procmap/$(DEPDIR)/lib_libpmpi_la-local_proc.Plo +# $(AM_V_CC)source='src/util/procmap/local_proc.c' object='src/util/procmap/lib_libpmpi_la-local_proc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/procmap/lib_libpmpi_la-local_proc.lo `test -f 'src/util/procmap/local_proc.c' || echo '$(srcdir)/'`src/util/procmap/local_proc.c + +src/util/assert/lib_libpmpi_la-assert.lo: src/util/assert/assert.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/util/assert/lib_libpmpi_la-assert.lo -MD -MP -MF src/util/assert/$(DEPDIR)/lib_libpmpi_la-assert.Tpo -c -o src/util/assert/lib_libpmpi_la-assert.lo `test -f 'src/util/assert/assert.c' || echo '$(srcdir)/'`src/util/assert/assert.c + $(AM_V_at)$(am__mv) src/util/assert/$(DEPDIR)/lib_libpmpi_la-assert.Tpo src/util/assert/$(DEPDIR)/lib_libpmpi_la-assert.Plo +# $(AM_V_CC)source='src/util/assert/assert.c' object='src/util/assert/lib_libpmpi_la-assert.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/util/assert/lib_libpmpi_la-assert.lo `test -f 'src/util/assert/assert.c' || echo '$(srcdir)/'`src/util/assert/assert.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-fdebug.lo: src/binding/fortran/mpif_h/fdebug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-fdebug.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fdebug.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-fdebug.lo `test -f 'src/binding/fortran/mpif_h/fdebug.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fdebug.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fdebug.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fdebug.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/fdebug.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-fdebug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-fdebug.lo `test -f 'src/binding/fortran/mpif_h/fdebug.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/fdebug.c + +src/binding/fortran/mpif_h/lib_libpmpi_la-setbot.lo: src/binding/fortran/mpif_h/setbot.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/mpif_h/lib_libpmpi_la-setbot.lo -MD -MP -MF src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-setbot.Tpo -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-setbot.lo `test -f 'src/binding/fortran/mpif_h/setbot.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/setbot.c + $(AM_V_at)$(am__mv) src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-setbot.Tpo src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-setbot.Plo +# $(AM_V_CC)source='src/binding/fortran/mpif_h/setbot.c' object='src/binding/fortran/mpif_h/lib_libpmpi_la-setbot.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/mpif_h/lib_libpmpi_la-setbot.lo `test -f 'src/binding/fortran/mpif_h/setbot.c' || echo '$(srcdir)/'`src/binding/fortran/mpif_h/setbot.c + +src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_util.lo: src/binding/fortran/use_mpi/create_f90_util.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_util.lo -MD -MP -MF src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_util.Tpo -c -o src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_util.lo `test -f 'src/binding/fortran/use_mpi/create_f90_util.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_util.c + $(AM_V_at)$(am__mv) src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_util.Tpo src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_util.Plo +# $(AM_V_CC)source='src/binding/fortran/use_mpi/create_f90_util.c' object='src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_util.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/binding/fortran/use_mpi/lib_libpmpi_la-create_f90_util.lo `test -f 'src/binding/fortran/use_mpi/create_f90_util.c' || echo '$(srcdir)/'`src/binding/fortran/use_mpi/create_f90_util.c + +src/glue/romio/lib_libpmpi_la-glue_romio.lo: src/glue/romio/glue_romio.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/glue/romio/lib_libpmpi_la-glue_romio.lo -MD -MP -MF src/glue/romio/$(DEPDIR)/lib_libpmpi_la-glue_romio.Tpo -c -o src/glue/romio/lib_libpmpi_la-glue_romio.lo `test -f 'src/glue/romio/glue_romio.c' || echo '$(srcdir)/'`src/glue/romio/glue_romio.c + $(AM_V_at)$(am__mv) src/glue/romio/$(DEPDIR)/lib_libpmpi_la-glue_romio.Tpo src/glue/romio/$(DEPDIR)/lib_libpmpi_la-glue_romio.Plo +# $(AM_V_CC)source='src/glue/romio/glue_romio.c' object='src/glue/romio/lib_libpmpi_la-glue_romio.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/glue/romio/lib_libpmpi_la-glue_romio.lo `test -f 'src/glue/romio/glue_romio.c' || echo '$(srcdir)/'`src/glue/romio/glue_romio.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_buffer.lo: src/mpid/ch3/src/ch3u_buffer.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_buffer.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_buffer.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_buffer.lo `test -f 'src/mpid/ch3/src/ch3u_buffer.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_buffer.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_buffer.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_buffer.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_buffer.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_buffer.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_buffer.lo `test -f 'src/mpid/ch3/src/ch3u_buffer.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_buffer.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm.lo: src/mpid/ch3/src/ch3u_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm.lo `test -f 'src/mpid/ch3/src/ch3u_comm.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_comm.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm.lo `test -f 'src/mpid/ch3/src/ch3u_comm.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_comm.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm_spawn_multiple.lo: src/mpid/ch3/src/ch3u_comm_spawn_multiple.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm_spawn_multiple.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm_spawn_multiple.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm_spawn_multiple.lo `test -f 'src/mpid/ch3/src/ch3u_comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_comm_spawn_multiple.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm_spawn_multiple.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm_spawn_multiple.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_comm_spawn_multiple.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm_spawn_multiple.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_comm_spawn_multiple.lo `test -f 'src/mpid/ch3/src/ch3u_comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_comm_spawn_multiple.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_connection.lo: src/mpid/ch3/src/ch3u_handle_connection.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_connection.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_connection.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_connection.lo `test -f 'src/mpid/ch3/src/ch3u_handle_connection.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_connection.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_connection.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_connection.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_connection.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_connection.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_connection.lo `test -f 'src/mpid/ch3/src/ch3u_handle_connection.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_connection.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_pkt.lo: src/mpid/ch3/src/ch3u_handle_recv_pkt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_pkt.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_pkt.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_pkt.lo `test -f 'src/mpid/ch3/src/ch3u_handle_recv_pkt.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_recv_pkt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_pkt.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_pkt.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_recv_pkt.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_pkt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_pkt.lo `test -f 'src/mpid/ch3/src/ch3u_handle_recv_pkt.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_recv_pkt.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_req.lo: src/mpid/ch3/src/ch3u_handle_recv_req.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_req.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_req.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_recv_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_recv_req.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_req.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_req.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_recv_req.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_req.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_recv_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_recv_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_recv_req.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_revoke_pkt.lo: src/mpid/ch3/src/ch3u_handle_revoke_pkt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_revoke_pkt.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_revoke_pkt.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_revoke_pkt.lo `test -f 'src/mpid/ch3/src/ch3u_handle_revoke_pkt.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_revoke_pkt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_revoke_pkt.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_revoke_pkt.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_revoke_pkt.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_revoke_pkt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_revoke_pkt.lo `test -f 'src/mpid/ch3/src/ch3u_handle_revoke_pkt.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_revoke_pkt.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_send_req.lo: src/mpid/ch3/src/ch3u_handle_send_req.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_send_req.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_send_req.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_send_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_send_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_send_req.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_send_req.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_send_req.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_send_req.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_send_req.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_send_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_send_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_send_req.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_op_req.lo: src/mpid/ch3/src/ch3u_handle_op_req.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_op_req.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_op_req.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_op_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_op_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_op_req.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_op_req.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_op_req.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_handle_op_req.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_op_req.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_handle_op_req.lo `test -f 'src/mpid/ch3/src/ch3u_handle_op_req.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_handle_op_req.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_port.lo: src/mpid/ch3/src/ch3u_port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_port.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_port.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_port.lo `test -f 'src/mpid/ch3/src/ch3u_port.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_port.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_port.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_port.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_port.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_port.lo `test -f 'src/mpid/ch3/src/ch3u_port.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_port.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_recvq.lo: src/mpid/ch3/src/ch3u_recvq.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_recvq.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_recvq.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_recvq.lo `test -f 'src/mpid/ch3/src/ch3u_recvq.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_recvq.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_recvq.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_recvq.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_recvq.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_recvq.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_recvq.lo `test -f 'src/mpid/ch3/src/ch3u_recvq.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_recvq.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_request.lo: src/mpid/ch3/src/ch3u_request.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_request.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_request.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_request.lo `test -f 'src/mpid/ch3/src/ch3u_request.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_request.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_request.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_request.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_request.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_request.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_request.lo `test -f 'src/mpid/ch3/src/ch3u_request.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_request.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_progress.lo: src/mpid/ch3/src/ch3u_rma_progress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_progress.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_progress.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_progress.lo `test -f 'src/mpid/ch3/src/ch3u_rma_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_progress.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_progress.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_progress.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_progress.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_progress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_progress.lo `test -f 'src/mpid/ch3/src/ch3u_rma_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_progress.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_ops.lo: src/mpid/ch3/src/ch3u_rma_ops.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_ops.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_ops.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_ops.lo `test -f 'src/mpid/ch3/src/ch3u_rma_ops.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_ops.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_ops.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_ops.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_ops.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_ops.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_ops.lo `test -f 'src/mpid/ch3/src/ch3u_rma_ops.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_ops.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_reqops.lo: src/mpid/ch3/src/ch3u_rma_reqops.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_reqops.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_reqops.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_reqops.lo `test -f 'src/mpid/ch3/src/ch3u_rma_reqops.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_reqops.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_reqops.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_reqops.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_reqops.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_reqops.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_reqops.lo `test -f 'src/mpid/ch3/src/ch3u_rma_reqops.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_reqops.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_sync.lo: src/mpid/ch3/src/ch3u_rma_sync.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_sync.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_sync.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_sync.lo `test -f 'src/mpid/ch3/src/ch3u_rma_sync.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_sync.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_sync.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_sync.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_sync.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_sync.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_sync.lo `test -f 'src/mpid/ch3/src/ch3u_rma_sync.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_sync.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_pkthandler.lo: src/mpid/ch3/src/ch3u_rma_pkthandler.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_pkthandler.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_pkthandler.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_pkthandler.lo `test -f 'src/mpid/ch3/src/ch3u_rma_pkthandler.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_pkthandler.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_pkthandler.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_pkthandler.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rma_pkthandler.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_pkthandler.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rma_pkthandler.lo `test -f 'src/mpid/ch3/src/ch3u_rma_pkthandler.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rma_pkthandler.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_rndv.lo: src/mpid/ch3/src/ch3u_rndv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_rndv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rndv.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rndv.lo `test -f 'src/mpid/ch3/src/ch3u_rndv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rndv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rndv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rndv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_rndv.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_rndv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_rndv.lo `test -f 'src/mpid/ch3/src/ch3u_rndv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_rndv.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_eager.lo: src/mpid/ch3/src/ch3u_eager.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_eager.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eager.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_eager.lo `test -f 'src/mpid/ch3/src/ch3u_eager.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_eager.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eager.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eager.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_eager.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_eager.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_eager.lo `test -f 'src/mpid/ch3/src/ch3u_eager.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_eager.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_eagersync.lo: src/mpid/ch3/src/ch3u_eagersync.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_eagersync.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eagersync.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_eagersync.lo `test -f 'src/mpid/ch3/src/ch3u_eagersync.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_eagersync.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eagersync.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eagersync.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_eagersync.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_eagersync.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_eagersync.lo `test -f 'src/mpid/ch3/src/ch3u_eagersync.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_eagersync.c + +src/mpid/ch3/src/lib_libpmpi_la-ch3u_win_fns.lo: src/mpid/ch3/src/ch3u_win_fns.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-ch3u_win_fns.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_win_fns.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_win_fns.lo `test -f 'src/mpid/ch3/src/ch3u_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_win_fns.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_win_fns.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_win_fns.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/ch3u_win_fns.c' object='src/mpid/ch3/src/lib_libpmpi_la-ch3u_win_fns.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-ch3u_win_fns.lo `test -f 'src/mpid/ch3/src/ch3u_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/src/ch3u_win_fns.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_abort.lo: src/mpid/ch3/src/mpid_abort.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_abort.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_abort.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_abort.lo `test -f 'src/mpid/ch3/src/mpid_abort.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_abort.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_abort.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_abort.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_abort.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_abort.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_abort.lo `test -f 'src/mpid/ch3/src/mpid_abort.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_abort.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_datatype.lo: src/mpid/ch3/src/mpid_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_datatype.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_datatype.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_datatype.lo `test -f 'src/mpid/ch3/src/mpid_datatype.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_datatype.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_datatype.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_datatype.lo `test -f 'src/mpid/ch3/src/mpid_datatype.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_datatype.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_op.lo: src/mpid/ch3/src/mpid_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_op.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_op.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_op.lo `test -f 'src/mpid/ch3/src/mpid_op.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_op.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_op.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_op.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_op.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_op.lo `test -f 'src/mpid/ch3/src/mpid_op.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_op.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_recv.lo: src/mpid/ch3/src/mpid_cancel_recv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_recv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_recv.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_recv.lo `test -f 'src/mpid/ch3/src/mpid_cancel_recv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_cancel_recv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_recv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_recv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_cancel_recv.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_recv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_recv.lo `test -f 'src/mpid/ch3/src/mpid_cancel_recv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_cancel_recv.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_send.lo: src/mpid/ch3/src/mpid_cancel_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_send.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_send.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_send.lo `test -f 'src/mpid/ch3/src/mpid_cancel_send.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_cancel_send.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_send.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_send.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_cancel_send.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_cancel_send.lo `test -f 'src/mpid/ch3/src/mpid_cancel_send.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_cancel_send.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_disconnect.lo: src/mpid/ch3/src/mpid_comm_disconnect.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_disconnect.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_disconnect.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_disconnect.lo `test -f 'src/mpid/ch3/src/mpid_comm_disconnect.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_disconnect.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_disconnect.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_disconnect.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_disconnect.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_disconnect.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_disconnect.lo `test -f 'src/mpid/ch3/src/mpid_comm_disconnect.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_disconnect.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_spawn_multiple.lo: src/mpid/ch3/src/mpid_comm_spawn_multiple.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_spawn_multiple.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_spawn_multiple.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_spawn_multiple.lo `test -f 'src/mpid/ch3/src/mpid_comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_spawn_multiple.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_spawn_multiple.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_spawn_multiple.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_spawn_multiple.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_spawn_multiple.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_spawn_multiple.lo `test -f 'src/mpid/ch3/src/mpid_comm_spawn_multiple.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_spawn_multiple.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_failure_ack.lo: src/mpid/ch3/src/mpid_comm_failure_ack.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_failure_ack.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_failure_ack.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_failure_ack.lo `test -f 'src/mpid/ch3/src/mpid_comm_failure_ack.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_failure_ack.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_failure_ack.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_failure_ack.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_failure_ack.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_failure_ack.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_failure_ack.lo `test -f 'src/mpid/ch3/src/mpid_comm_failure_ack.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_failure_ack.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_get_all_failed_procs.lo: src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_get_all_failed_procs.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_get_all_failed_procs.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_get_all_failed_procs.lo `test -f 'src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_get_all_failed_procs.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_get_all_failed_procs.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_get_all_failed_procs.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_get_all_failed_procs.lo `test -f 'src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_revoke.lo: src/mpid/ch3/src/mpid_comm_revoke.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_revoke.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_revoke.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_revoke.lo `test -f 'src/mpid/ch3/src/mpid_comm_revoke.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_revoke.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_revoke.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_revoke.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_comm_revoke.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_revoke.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_comm_revoke.lo `test -f 'src/mpid/ch3/src/mpid_comm_revoke.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_comm_revoke.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_finalize.lo: src/mpid/ch3/src/mpid_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_finalize.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_finalize.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_finalize.lo `test -f 'src/mpid/ch3/src/mpid_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_finalize.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_finalize.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_finalize.lo `test -f 'src/mpid/ch3/src/mpid_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_finalize.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_get_universe_size.lo: src/mpid/ch3/src/mpid_get_universe_size.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_get_universe_size.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_get_universe_size.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_get_universe_size.lo `test -f 'src/mpid/ch3/src/mpid_get_universe_size.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_get_universe_size.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_get_universe_size.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_get_universe_size.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_get_universe_size.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_get_universe_size.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_get_universe_size.lo `test -f 'src/mpid/ch3/src/mpid_get_universe_size.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_get_universe_size.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_getpname.lo: src/mpid/ch3/src/mpid_getpname.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_getpname.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_getpname.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_getpname.lo `test -f 'src/mpid/ch3/src/mpid_getpname.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_getpname.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_getpname.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_getpname.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_getpname.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_getpname.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_getpname.lo `test -f 'src/mpid/ch3/src/mpid_getpname.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_getpname.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_improbe.lo: src/mpid/ch3/src/mpid_improbe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_improbe.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_improbe.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_improbe.lo `test -f 'src/mpid/ch3/src/mpid_improbe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_improbe.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_improbe.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_improbe.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_improbe.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_improbe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_improbe.lo `test -f 'src/mpid/ch3/src/mpid_improbe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_improbe.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_imrecv.lo: src/mpid/ch3/src/mpid_imrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_imrecv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_imrecv.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_imrecv.lo `test -f 'src/mpid/ch3/src/mpid_imrecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_imrecv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_imrecv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_imrecv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_imrecv.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_imrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_imrecv.lo `test -f 'src/mpid/ch3/src/mpid_imrecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_imrecv.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_init.lo: src/mpid/ch3/src/mpid_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_init.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_init.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_init.lo `test -f 'src/mpid/ch3/src/mpid_init.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_init.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_init.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_init.lo `test -f 'src/mpid/ch3/src/mpid_init.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_init.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_iprobe.lo: src/mpid/ch3/src/mpid_iprobe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_iprobe.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_iprobe.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_iprobe.lo `test -f 'src/mpid/ch3/src/mpid_iprobe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_iprobe.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_iprobe.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_iprobe.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_iprobe.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_iprobe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_iprobe.lo `test -f 'src/mpid/ch3/src/mpid_iprobe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_iprobe.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_irecv.lo: src/mpid/ch3/src/mpid_irecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_irecv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irecv.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_irecv.lo `test -f 'src/mpid/ch3/src/mpid_irecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_irecv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irecv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irecv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_irecv.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_irecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_irecv.lo `test -f 'src/mpid/ch3/src/mpid_irecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_irecv.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_irsend.lo: src/mpid/ch3/src/mpid_irsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_irsend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irsend.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_irsend.lo `test -f 'src/mpid/ch3/src/mpid_irsend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_irsend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irsend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irsend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_irsend.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_irsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_irsend.lo `test -f 'src/mpid/ch3/src/mpid_irsend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_irsend.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_isend.lo: src/mpid/ch3/src/mpid_isend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_isend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_isend.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_isend.lo `test -f 'src/mpid/ch3/src/mpid_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_isend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_isend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_isend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_isend.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_isend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_isend.lo `test -f 'src/mpid/ch3/src/mpid_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_isend.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_issend.lo: src/mpid/ch3/src/mpid_issend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_issend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_issend.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_issend.lo `test -f 'src/mpid/ch3/src/mpid_issend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_issend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_issend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_issend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_issend.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_issend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_issend.lo `test -f 'src/mpid/ch3/src/mpid_issend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_issend.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_mprobe.lo: src/mpid/ch3/src/mpid_mprobe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_mprobe.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mprobe.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_mprobe.lo `test -f 'src/mpid/ch3/src/mpid_mprobe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_mprobe.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mprobe.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mprobe.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_mprobe.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_mprobe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_mprobe.lo `test -f 'src/mpid/ch3/src/mpid_mprobe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_mprobe.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_mrecv.lo: src/mpid/ch3/src/mpid_mrecv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_mrecv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mrecv.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_mrecv.lo `test -f 'src/mpid/ch3/src/mpid_mrecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_mrecv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mrecv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mrecv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_mrecv.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_mrecv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_mrecv.lo `test -f 'src/mpid/ch3/src/mpid_mrecv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_mrecv.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_port.lo: src/mpid/ch3/src/mpid_port.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_port.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_port.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_port.lo `test -f 'src/mpid/ch3/src/mpid_port.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_port.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_port.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_port.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_port.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_port.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_port.lo `test -f 'src/mpid/ch3/src/mpid_port.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_port.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_probe.lo: src/mpid/ch3/src/mpid_probe.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_probe.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_probe.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_probe.lo `test -f 'src/mpid/ch3/src/mpid_probe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_probe.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_probe.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_probe.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_probe.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_probe.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_probe.lo `test -f 'src/mpid/ch3/src/mpid_probe.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_probe.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_recv.lo: src/mpid/ch3/src/mpid_recv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_recv.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_recv.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_recv.lo `test -f 'src/mpid/ch3/src/mpid_recv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_recv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_recv.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_recv.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_recv.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_recv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_recv.lo `test -f 'src/mpid/ch3/src/mpid_recv.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_recv.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_rsend.lo: src/mpid/ch3/src/mpid_rsend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_rsend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rsend.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_rsend.lo `test -f 'src/mpid/ch3/src/mpid_rsend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_rsend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rsend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rsend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_rsend.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_rsend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_rsend.lo `test -f 'src/mpid/ch3/src/mpid_rsend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_rsend.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_send.lo: src/mpid/ch3/src/mpid_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_send.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_send.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_send.lo `test -f 'src/mpid/ch3/src/mpid_send.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_send.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_send.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_send.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_send.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_send.lo `test -f 'src/mpid/ch3/src/mpid_send.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_send.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_ssend.lo: src/mpid/ch3/src/mpid_ssend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_ssend.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_ssend.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_ssend.lo `test -f 'src/mpid/ch3/src/mpid_ssend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_ssend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_ssend.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_ssend.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_ssend.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_ssend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_ssend.lo `test -f 'src/mpid/ch3/src/mpid_ssend.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_ssend.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_startall.lo: src/mpid/ch3/src/mpid_startall.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_startall.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_startall.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_startall.lo `test -f 'src/mpid/ch3/src/mpid_startall.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_startall.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_startall.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_startall.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_startall.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_startall.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_startall.lo `test -f 'src/mpid/ch3/src/mpid_startall.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_startall.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_vc.lo: src/mpid/ch3/src/mpid_vc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_vc.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_vc.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_vc.lo `test -f 'src/mpid/ch3/src/mpid_vc.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_vc.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_vc.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_vc.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_vc.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_vc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_vc.lo `test -f 'src/mpid/ch3/src/mpid_vc.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_vc.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_rma.lo: src/mpid/ch3/src/mpid_rma.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_rma.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rma.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_rma.lo `test -f 'src/mpid/ch3/src/mpid_rma.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_rma.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rma.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rma.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_rma.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_rma.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_rma.lo `test -f 'src/mpid/ch3/src/mpid_rma.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_rma.c + +src/mpid/ch3/src/lib_libpmpi_la-mpidi_rma.lo: src/mpid/ch3/src/mpidi_rma.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpidi_rma.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_rma.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpidi_rma.lo `test -f 'src/mpid/ch3/src/mpidi_rma.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_rma.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_rma.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_rma.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpidi_rma.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpidi_rma.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpidi_rma.lo `test -f 'src/mpid/ch3/src/mpidi_rma.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_rma.c + +src/mpid/ch3/src/lib_libpmpi_la-mpid_aint.lo: src/mpid/ch3/src/mpid_aint.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpid_aint.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_aint.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_aint.lo `test -f 'src/mpid/ch3/src/mpid_aint.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_aint.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_aint.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_aint.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpid_aint.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpid_aint.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpid_aint.lo `test -f 'src/mpid/ch3/src/mpid_aint.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpid_aint.c + +src/mpid/ch3/src/lib_libpmpi_la-mpidi_isend_self.lo: src/mpid/ch3/src/mpidi_isend_self.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpidi_isend_self.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_isend_self.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpidi_isend_self.lo `test -f 'src/mpid/ch3/src/mpidi_isend_self.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_isend_self.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_isend_self.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_isend_self.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpidi_isend_self.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpidi_isend_self.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpidi_isend_self.lo `test -f 'src/mpid/ch3/src/mpidi_isend_self.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_isend_self.c + +src/mpid/ch3/src/lib_libpmpi_la-mpidi_pg.lo: src/mpid/ch3/src/mpidi_pg.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpidi_pg.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_pg.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpidi_pg.lo `test -f 'src/mpid/ch3/src/mpidi_pg.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_pg.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_pg.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_pg.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpidi_pg.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpidi_pg.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpidi_pg.lo `test -f 'src/mpid/ch3/src/mpidi_pg.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_pg.c + +src/mpid/ch3/src/lib_libpmpi_la-mpidi_printf.lo: src/mpid/ch3/src/mpidi_printf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/src/lib_libpmpi_la-mpidi_printf.lo -MD -MP -MF src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_printf.Tpo -c -o src/mpid/ch3/src/lib_libpmpi_la-mpidi_printf.lo `test -f 'src/mpid/ch3/src/mpidi_printf.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_printf.c + $(AM_V_at)$(am__mv) src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_printf.Tpo src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_printf.Plo +# $(AM_V_CC)source='src/mpid/ch3/src/mpidi_printf.c' object='src/mpid/ch3/src/lib_libpmpi_la-mpidi_printf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/src/lib_libpmpi_la-mpidi_printf.lo `test -f 'src/mpid/ch3/src/mpidi_printf.c' || echo '$(srcdir)/'`src/mpid/ch3/src/mpidi_printf.c + +src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_init_sock.lo: src/mpid/ch3/util/sock/ch3u_init_sock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_init_sock.lo -MD -MP -MF src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_init_sock.Tpo -c -o src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_init_sock.lo `test -f 'src/mpid/ch3/util/sock/ch3u_init_sock.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_init_sock.c + $(AM_V_at)$(am__mv) src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_init_sock.Tpo src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_init_sock.Plo +# $(AM_V_CC)source='src/mpid/ch3/util/sock/ch3u_init_sock.c' object='src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_init_sock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_init_sock.lo `test -f 'src/mpid/ch3/util/sock/ch3u_init_sock.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_init_sock.c + +src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_connect_sock.lo: src/mpid/ch3/util/sock/ch3u_connect_sock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_connect_sock.lo -MD -MP -MF src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_connect_sock.Tpo -c -o src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_connect_sock.lo `test -f 'src/mpid/ch3/util/sock/ch3u_connect_sock.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_connect_sock.c + $(AM_V_at)$(am__mv) src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_connect_sock.Tpo src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_connect_sock.Plo +# $(AM_V_CC)source='src/mpid/ch3/util/sock/ch3u_connect_sock.c' object='src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_connect_sock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_connect_sock.lo `test -f 'src/mpid/ch3/util/sock/ch3u_connect_sock.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_connect_sock.c + +src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_getinterfaces.lo: src/mpid/ch3/util/sock/ch3u_getinterfaces.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_getinterfaces.lo -MD -MP -MF src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_getinterfaces.Tpo -c -o src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_getinterfaces.lo `test -f 'src/mpid/ch3/util/sock/ch3u_getinterfaces.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_getinterfaces.c + $(AM_V_at)$(am__mv) src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_getinterfaces.Tpo src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_getinterfaces.Plo +# $(AM_V_CC)source='src/mpid/ch3/util/sock/ch3u_getinterfaces.c' object='src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_getinterfaces.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/util/sock/lib_libpmpi_la-ch3u_getinterfaces.lo `test -f 'src/mpid/ch3/util/sock/ch3u_getinterfaces.c' || echo '$(srcdir)/'`src/mpid/ch3/util/sock/ch3u_getinterfaces.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_finalize.lo: src/mpid/ch3/channels/nemesis/src/ch3_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_finalize.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_finalize.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_finalize.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_init.lo: src/mpid/ch3/channels/nemesis/src/ch3_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_init.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_init.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_init.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_init.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_init.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isend.lo: src/mpid/ch3/channels/nemesis/src/ch3_isend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isend.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isend.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_isend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_isend.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isend.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_isend.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isendv.lo: src/mpid/ch3/channels/nemesis/src/ch3_isendv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isendv.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isendv.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_isendv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_isendv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_isendv.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isendv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_isendv.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_isendv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_isendv.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsg.lo: src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsg.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsg.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsg.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsg.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsgv.lo: src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsgv.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsgv.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsgv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_istartmsgv.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_progress.lo: src/mpid/ch3/channels/nemesis/src/ch3_progress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_progress.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_progress.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_progress.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_progress.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_progress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_progress.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_progress.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_rma_shm.lo: src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_rma_shm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_rma_shm.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_rma_shm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_rma_shm.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_rma_shm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_rma_shm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_rma_shm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_win_fns.lo: src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_win_fns.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_win_fns.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_win_fns.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3_win_fns.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_comm.lo: src/mpid/ch3/channels/nemesis/src/ch3i_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_comm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_comm.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_comm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3i_comm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3i_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_comm.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_comm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3i_comm.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_comm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3i_comm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3i_comm.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_eagernoncontig.lo: src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_eagernoncontig.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_eagernoncontig.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_eagernoncontig.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_eagernoncontig.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_eagernoncontig.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_eagernoncontig.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-ch3i_eagernoncontig.lo `test -f 'src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_init.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_init.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_init.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_init.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_init.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_init.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_mpich.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_mpich.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_mpich.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_mpich.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_mpich.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_mpich.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_mpich.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_mpich.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_ckpt.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_ckpt.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_ckpt.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_ckpt.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_ckpt.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_ckpt.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_ckpt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_ckpt.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_finalize.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_finalize.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_finalize.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_finalize.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network_poll.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network_poll.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network_poll.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network_poll.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network_poll.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network_poll.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network_poll.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network_poll.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_network.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_debug.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_debug.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_debug.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_debug.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_debug.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_debug.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_debug.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt_shm.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt_shm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt_shm.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt_shm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt_shm.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt_shm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt_shm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_lmt_shm.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c + +src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_net_array.lo: src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_net_array.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_net_array.Tpo -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_net_array.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_net_array.Tpo src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_net_array.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c' object='src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_net_array.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/src/lib_libpmpi_la-mpid_nem_net_array.lo `test -f 'src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_finalize.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_finalize.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_finalize.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_finalize.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_finalize.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_init.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_init.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_init.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_init.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_init.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_init.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_send.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_send.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_send.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_send.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_send.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_send.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_send.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_send.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_utility.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_utility.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_utility.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_utility.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_utility.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_utility.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_utility.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_utility.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-socksm.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-socksm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-socksm.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-socksm.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-socksm.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-socksm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-socksm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-socksm.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_getip.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_getip.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_getip.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_getip.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_getip.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_getip.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_getip.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_getip.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c + +src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_ckpt.lo: src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_ckpt.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_ckpt.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_ckpt.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_ckpt.Tpo src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_ckpt.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c' object='src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_ckpt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/tcp/lib_libpmpi_la-tcp_ckpt.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c + +src/mpid/ch3/channels/nemesis/netmod/none/lib_libpmpi_la-none.lo: src/mpid/ch3/channels/nemesis/netmod/none/none.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/none/lib_libpmpi_la-none.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libpmpi_la-none.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/none/lib_libpmpi_la-none.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/none/none.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/none/none.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libpmpi_la-none.Tpo src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libpmpi_la-none.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/none/none.c' object='src/mpid/ch3/channels/nemesis/netmod/none/lib_libpmpi_la-none.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/none/lib_libpmpi_la-none.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/none/none.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/none/none.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_init.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_init.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_init.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_init.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_cm.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_cm.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_cm.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_cm.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_cm.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_cm.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_cm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_cm.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_tagged.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_tagged.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_tagged.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_tagged.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_tagged.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_tagged.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_tagged.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_tagged.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_msg.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_msg.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_msg.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_msg.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_msg.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_msg.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_msg.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_msg.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_data.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_data.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_data.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_data.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_data.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_data.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_data.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_data.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c + +src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_progress.lo: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_progress.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_progress.Tpo -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_progress.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_progress.Tpo src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_progress.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c' object='src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_progress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/netmod/ofi/lib_libpmpi_la-ofi_progress.lo `test -f 'src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c + +src/mpid/ch3/channels/nemesis/utils/monitor/lib_libpmpi_la-papi_defs.lo: src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/utils/monitor/lib_libpmpi_la-papi_defs.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libpmpi_la-papi_defs.Tpo -c -o src/mpid/ch3/channels/nemesis/utils/monitor/lib_libpmpi_la-papi_defs.lo `test -f 'src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libpmpi_la-papi_defs.Tpo src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libpmpi_la-papi_defs.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c' object='src/mpid/ch3/channels/nemesis/utils/monitor/lib_libpmpi_la-papi_defs.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/utils/monitor/lib_libpmpi_la-papi_defs.lo `test -f 'src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c + +src/mpid/ch3/channels/nemesis/utils/replacements/lib_libpmpi_la-mkstemp.lo: src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/nemesis/utils/replacements/lib_libpmpi_la-mkstemp.lo -MD -MP -MF src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libpmpi_la-mkstemp.Tpo -c -o src/mpid/ch3/channels/nemesis/utils/replacements/lib_libpmpi_la-mkstemp.lo `test -f 'src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libpmpi_la-mkstemp.Tpo src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libpmpi_la-mkstemp.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c' object='src/mpid/ch3/channels/nemesis/utils/replacements/lib_libpmpi_la-mkstemp.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/nemesis/utils/replacements/lib_libpmpi_la-mkstemp.lo `test -f 'src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-sock.lo: src/mpid/ch3/channels/sock/src/sock.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-sock.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-sock.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-sock.lo `test -f 'src/mpid/ch3/channels/sock/src/sock.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/sock.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-sock.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-sock.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/sock.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-sock.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-sock.lo `test -f 'src/mpid/ch3/channels/sock/src/sock.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/sock.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_finalize.lo: src/mpid/ch3/channels/sock/src/ch3_finalize.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_finalize.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_finalize.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_finalize.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_finalize.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_finalize.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_finalize.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_finalize.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_finalize.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_init.lo: src/mpid/ch3/channels/sock/src/ch3_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_init.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_init.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_init.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_init.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_init.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_init.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_init.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isend.lo: src/mpid/ch3/channels/sock/src/ch3_isend.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isend.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isend.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_isend.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_isend.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isend.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isend.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_isend.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_isend.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isendv.lo: src/mpid/ch3/channels/sock/src/ch3_isendv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isendv.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isendv.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_isendv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_isendv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_isendv.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isendv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_isendv.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_isendv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_isendv.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsg.lo: src/mpid/ch3/channels/sock/src/ch3_istartmsg.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsg.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsg.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_istartmsg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_istartmsg.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_istartmsg.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsg.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsg.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_istartmsg.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_istartmsg.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsgv.lo: src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsgv.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsgv.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsgv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_istartmsgv.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_progress.lo: src/mpid/ch3/channels/sock/src/ch3_progress.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_progress.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_progress.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_progress.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_progress.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_progress.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_progress.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_progress.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_progress.c + +src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_win_fns.lo: src/mpid/ch3/channels/sock/src/ch3_win_fns.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_win_fns.lo -MD -MP -MF src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Tpo -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_win_fns.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_win_fns.c + $(AM_V_at)$(am__mv) src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Tpo src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo +# $(AM_V_CC)source='src/mpid/ch3/channels/sock/src/ch3_win_fns.c' object='src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_win_fns.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch3/channels/sock/src/lib_libpmpi_la-ch3_win_fns.lo `test -f 'src/mpid/ch3/channels/sock/src/ch3_win_fns.c' || echo '$(srcdir)/'`src/mpid/ch3/channels/sock/src/ch3_win_fns.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4_globals.lo: src/mpid/ch4/src/ch4_globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4_globals.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_globals.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_globals.lo `test -f 'src/mpid/ch4/src/ch4_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_globals.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_globals.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4_globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_globals.lo `test -f 'src/mpid/ch4/src/ch4_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_globals.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4_impl.lo: src/mpid/ch4/src/ch4_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4_impl.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_impl.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_impl.lo `test -f 'src/mpid/ch4/src/ch4_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_impl.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_impl.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_impl.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_impl.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_impl.lo `test -f 'src/mpid/ch4/src/ch4_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_impl.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4_init.lo: src/mpid/ch4/src/ch4_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4_init.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_init.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_init.lo `test -f 'src/mpid/ch4/src/ch4_init.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_init.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_init.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_init.lo `test -f 'src/mpid/ch4/src/ch4_init.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_init.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4_comm.lo: src/mpid/ch4/src/ch4_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4_comm.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_comm.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_comm.lo `test -f 'src/mpid/ch4/src/ch4_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_comm.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_comm.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_comm.lo `test -f 'src/mpid/ch4/src/ch4_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_comm.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4_spawn.lo: src/mpid/ch4/src/ch4_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4_spawn.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_spawn.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_spawn.lo `test -f 'src/mpid/ch4/src/ch4_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_spawn.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_spawn.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_spawn.lo `test -f 'src/mpid/ch4/src/ch4_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_spawn.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4_win.lo: src/mpid/ch4/src/ch4_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4_win.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_win.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_win.lo `test -f 'src/mpid/ch4/src/ch4_win.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_win.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_win.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_win.lo `test -f 'src/mpid/ch4/src/ch4_win.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_win.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4i_comm.lo: src/mpid/ch4/src/ch4i_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4i_comm.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4i_comm.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4i_comm.lo `test -f 'src/mpid/ch4/src/ch4i_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4i_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4i_comm.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4i_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4i_comm.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4i_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4i_comm.lo `test -f 'src/mpid/ch4/src/ch4i_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4i_comm.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_buf.lo: src/mpid/ch4/src/ch4r_buf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_buf.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_buf.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_buf.lo `test -f 'src/mpid/ch4/src/ch4r_buf.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_buf.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_buf.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_buf.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_buf.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_buf.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_buf.lo `test -f 'src/mpid/ch4/src/ch4r_buf.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_buf.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_init.lo: src/mpid/ch4/src/ch4r_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_init.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_init.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_init.lo `test -f 'src/mpid/ch4/src/ch4r_init.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_init.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_init.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_init.lo `test -f 'src/mpid/ch4/src/ch4r_init.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_init.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_comm.lo: src/mpid/ch4/src/ch4r_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_comm.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_comm.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_comm.lo `test -f 'src/mpid/ch4/src/ch4r_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_comm.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_comm.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_comm.lo `test -f 'src/mpid/ch4/src/ch4r_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_comm.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_proc.lo: src/mpid/ch4/src/ch4r_proc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_proc.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_proc.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_proc.lo `test -f 'src/mpid/ch4/src/ch4r_proc.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_proc.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_proc.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_proc.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_proc.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_proc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_proc.lo `test -f 'src/mpid/ch4/src/ch4r_proc.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_proc.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_recvq.lo: src/mpid/ch4/src/ch4r_recvq.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_recvq.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_recvq.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_recvq.lo `test -f 'src/mpid/ch4/src/ch4r_recvq.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_recvq.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_recvq.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_recvq.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_recvq.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_recvq.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_recvq.lo `test -f 'src/mpid/ch4/src/ch4r_recvq.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_recvq.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_callbacks.lo: src/mpid/ch4/src/ch4r_callbacks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_callbacks.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_callbacks.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_callbacks.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_callbacks.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_callbacks.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_callbacks.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_callbacks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_callbacks.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_origin_callbacks.lo: src/mpid/ch4/src/ch4r_rma_origin_callbacks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_origin_callbacks.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_origin_callbacks.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_origin_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_rma_origin_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_rma_origin_callbacks.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_origin_callbacks.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_origin_callbacks.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_rma_origin_callbacks.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_origin_callbacks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_origin_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_rma_origin_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_rma_origin_callbacks.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_target_callbacks.lo: src/mpid/ch4/src/ch4r_rma_target_callbacks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_target_callbacks.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_target_callbacks.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_target_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_rma_target_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_rma_target_callbacks.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_target_callbacks.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_target_callbacks.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_rma_target_callbacks.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_target_callbacks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_rma_target_callbacks.lo `test -f 'src/mpid/ch4/src/ch4r_rma_target_callbacks.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_rma_target_callbacks.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_symheap.lo: src/mpid/ch4/src/ch4r_symheap.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_symheap.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_symheap.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_symheap.lo `test -f 'src/mpid/ch4/src/ch4r_symheap.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_symheap.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_symheap.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_symheap.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_symheap.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_symheap.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_symheap.lo `test -f 'src/mpid/ch4/src/ch4r_symheap.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_symheap.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4r_win.lo: src/mpid/ch4/src/ch4r_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4r_win.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_win.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_win.lo `test -f 'src/mpid/ch4/src/ch4r_win.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_win.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4r_win.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4r_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4r_win.lo `test -f 'src/mpid/ch4/src/ch4r_win.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4r_win.c + +src/mpid/ch4/src/lib_libpmpi_la-mpid_ch4_net_array.lo: src/mpid/ch4/src/mpid_ch4_net_array.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-mpid_ch4_net_array.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-mpid_ch4_net_array.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-mpid_ch4_net_array.lo `test -f 'src/mpid/ch4/src/mpid_ch4_net_array.c' || echo '$(srcdir)/'`src/mpid/ch4/src/mpid_ch4_net_array.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-mpid_ch4_net_array.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-mpid_ch4_net_array.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/mpid_ch4_net_array.c' object='src/mpid/ch4/src/lib_libpmpi_la-mpid_ch4_net_array.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-mpid_ch4_net_array.lo `test -f 'src/mpid/ch4/src/mpid_ch4_net_array.c' || echo '$(srcdir)/'`src/mpid/ch4/src/mpid_ch4_net_array.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals.lo: src/mpid/ch4/src/ch4_coll_globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals.lo `test -f 'src/mpid/ch4/src/ch4_coll_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_coll_globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_coll_globals.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals.lo `test -f 'src/mpid/ch4/src/ch4_coll_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_coll_globals.c + +src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals_default.lo: src/mpid/ch4/src/ch4_coll_globals_default.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals_default.lo -MD -MP -MF src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals_default.Tpo -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals_default.lo `test -f 'src/mpid/ch4/src/ch4_coll_globals_default.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_coll_globals_default.c + $(AM_V_at)$(am__mv) src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals_default.Tpo src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals_default.Plo +# $(AM_V_CC)source='src/mpid/ch4/src/ch4_coll_globals_default.c' object='src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals_default.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/src/lib_libpmpi_la-ch4_coll_globals_default.lo `test -f 'src/mpid/ch4/src/ch4_coll_globals_default.c' || echo '$(srcdir)/'`src/mpid/ch4/src/ch4_coll_globals_default.c + +src/mpid/ch4/generic/lib_libpmpi_la-mpidig_globals.lo: src/mpid/ch4/generic/mpidig_globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/generic/lib_libpmpi_la-mpidig_globals.lo -MD -MP -MF src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_globals.Tpo -c -o src/mpid/ch4/generic/lib_libpmpi_la-mpidig_globals.lo `test -f 'src/mpid/ch4/generic/mpidig_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/generic/mpidig_globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_globals.Tpo src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/generic/mpidig_globals.c' object='src/mpid/ch4/generic/lib_libpmpi_la-mpidig_globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/generic/lib_libpmpi_la-mpidig_globals.lo `test -f 'src/mpid/ch4/generic/mpidig_globals.c' || echo '$(srcdir)/'`src/mpid/ch4/generic/mpidig_globals.c + +src/mpid/ch4/generic/lib_libpmpi_la-mpidig_init.lo: src/mpid/ch4/generic/mpidig_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/generic/lib_libpmpi_la-mpidig_init.lo -MD -MP -MF src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_init.Tpo -c -o src/mpid/ch4/generic/lib_libpmpi_la-mpidig_init.lo `test -f 'src/mpid/ch4/generic/mpidig_init.c' || echo '$(srcdir)/'`src/mpid/ch4/generic/mpidig_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_init.Tpo src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/generic/mpidig_init.c' object='src/mpid/ch4/generic/lib_libpmpi_la-mpidig_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/generic/lib_libpmpi_la-mpidig_init.lo `test -f 'src/mpid/ch4/generic/mpidig_init.c' || echo '$(srcdir)/'`src/mpid/ch4/generic/mpidig_init.c + +src/mpid/ch4/netmod/src/lib_libpmpi_la-netmod_impl.lo: src/mpid/ch4/netmod/src/netmod_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/src/lib_libpmpi_la-netmod_impl.lo -MD -MP -MF src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libpmpi_la-netmod_impl.Tpo -c -o src/mpid/ch4/netmod/src/lib_libpmpi_la-netmod_impl.lo `test -f 'src/mpid/ch4/netmod/src/netmod_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/src/netmod_impl.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libpmpi_la-netmod_impl.Tpo src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libpmpi_la-netmod_impl.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/src/netmod_impl.c' object='src/mpid/ch4/netmod/src/lib_libpmpi_la-netmod_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/src/lib_libpmpi_la-netmod_impl.lo `test -f 'src/mpid/ch4/netmod/src/netmod_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/src/netmod_impl.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-func_table.lo: src/mpid/ch4/netmod/ofi/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/ofi/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/func_table.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/ofi/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/func_table.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_init.lo: src/mpid/ch4/netmod/ofi/ofi_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_init.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_init.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_init.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_init.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_init.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_comm.lo: src/mpid/ch4/netmod/ofi/ofi_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_comm.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_comm.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_comm.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_comm.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_comm.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_comm.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_comm.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_datatype.lo: src/mpid/ch4/netmod/ofi/ofi_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_datatype.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_datatype.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_datatype.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_datatype.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_datatype.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_datatype.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_datatype.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_op.lo: src/mpid/ch4/netmod/ofi/ofi_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_op.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_op.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_op.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_op.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_op.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_op.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_op.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_op.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_op.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_spawn.lo: src/mpid/ch4/netmod/ofi/ofi_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_spawn.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_spawn.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_spawn.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_spawn.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_spawn.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_spawn.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_spawn.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_win.lo: src/mpid/ch4/netmod/ofi/ofi_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_win.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_win.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_win.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_win.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/ofi_win.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-ofi_win.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/ofi_win.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-globals.lo: src/mpid/ch4/netmod/ofi/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-globals.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/ofi/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-globals.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/globals.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/ofi/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/globals.c + +src/mpid/ch4/netmod/ofi/lib_libpmpi_la-util.lo: src/mpid/ch4/netmod/ofi/util.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ofi/lib_libpmpi_la-util.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-util.Tpo -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-util.lo `test -f 'src/mpid/ch4/netmod/ofi/util.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/util.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-util.Tpo src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-util.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ofi/util.c' object='src/mpid/ch4/netmod/ofi/lib_libpmpi_la-util.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ofi/lib_libpmpi_la-util.lo `test -f 'src/mpid/ch4/netmod/ofi/util.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ofi/util.c + +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-func_table.lo: src/mpid/ch4/netmod/ucx/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libpmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/ucx/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/func_table.c' object='src/mpid/ch4/netmod/ucx/lib_libpmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/ucx/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/func_table.c + +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_init.lo: src/mpid/ch4/netmod/ucx/ucx_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_init.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_init.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_init.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_init.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_init.c' object='src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_init.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_init.c + +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_comm.lo: src/mpid/ch4/netmod/ucx/ucx_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_comm.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_comm.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_comm.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_comm.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_comm.c' object='src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_comm.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_comm.c + +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_datatype.lo: src/mpid/ch4/netmod/ucx/ucx_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_datatype.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_datatype.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_datatype.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_datatype.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_datatype.c' object='src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_datatype.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_datatype.c + +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_op.lo: src/mpid/ch4/netmod/ucx/ucx_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_op.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_op.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_op.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_op.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_op.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_op.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_op.c' object='src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_op.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_op.c + +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_spawn.lo: src/mpid/ch4/netmod/ucx/ucx_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_spawn.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_spawn.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_spawn.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_spawn.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_spawn.c' object='src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_spawn.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_spawn.c + +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_win.lo: src/mpid/ch4/netmod/ucx/ucx_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_win.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_win.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_win.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_win.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/ucx_win.c' object='src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-ucx_win.lo `test -f 'src/mpid/ch4/netmod/ucx/ucx_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/ucx_win.c + +src/mpid/ch4/netmod/ucx/lib_libpmpi_la-globals.lo: src/mpid/ch4/netmod/ucx/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/ucx/lib_libpmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-globals.Tpo -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/ucx/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-globals.Tpo src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/ucx/globals.c' object='src/mpid/ch4/netmod/ucx/lib_libpmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/ucx/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/ucx/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/ucx/globals.c + +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-func_table.lo: src/mpid/ch4/netmod/stubnm/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/stubnm/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/func_table.c' object='src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/netmod/stubnm/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/func_table.c + +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_init.lo: src/mpid/ch4/netmod/stubnm/stubnm_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_init.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_init.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_init.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_init.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_init.c' object='src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_init.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_init.c + +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_comm.lo: src/mpid/ch4/netmod/stubnm/stubnm_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_comm.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_comm.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_comm.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_comm.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_comm.c' object='src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_comm.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_comm.c + +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_datatype.lo: src/mpid/ch4/netmod/stubnm/stubnm_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_datatype.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_datatype.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_datatype.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_datatype.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_datatype.c' object='src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_datatype.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_datatype.c + +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_op.lo: src/mpid/ch4/netmod/stubnm/stubnm_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_op.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_op.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_op.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_op.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_op.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_op.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_op.c' object='src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_op.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_op.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_op.c + +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_spawn.lo: src/mpid/ch4/netmod/stubnm/stubnm_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_spawn.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_spawn.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_spawn.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_spawn.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_spawn.c' object='src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_spawn.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_spawn.c + +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_win.lo: src/mpid/ch4/netmod/stubnm/stubnm_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_win.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_win.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_win.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_win.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/stubnm_win.c' object='src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-stubnm_win.lo `test -f 'src/mpid/ch4/netmod/stubnm/stubnm_win.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/stubnm_win.c + +src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-globals.lo: src/mpid/ch4/netmod/stubnm/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-globals.Tpo -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/stubnm/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-globals.Tpo src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/netmod/stubnm/globals.c' object='src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/netmod/stubnm/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/netmod/stubnm/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/netmod/stubnm/globals.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-func_table.lo: src/mpid/ch4/shm/src/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/src/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/func_table.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/src/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/func_table.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_init.lo: src/mpid/ch4/shm/src/shm_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-shm_init.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_init.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_init.lo `test -f 'src/mpid/ch4/shm/src/shm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_init.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_init.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-shm_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_init.lo `test -f 'src/mpid/ch4/shm/src/shm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_init.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_hooks.lo: src/mpid/ch4/shm/src/shm_hooks.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-shm_hooks.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_hooks.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_hooks.lo `test -f 'src/mpid/ch4/shm/src/shm_hooks.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_hooks.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_hooks.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_hooks.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_hooks.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-shm_hooks.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_hooks.lo `test -f 'src/mpid/ch4/shm/src/shm_hooks.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_hooks.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_dpm.lo: src/mpid/ch4/shm/src/shm_dpm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-shm_dpm.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_dpm.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_dpm.lo `test -f 'src/mpid/ch4/shm/src/shm_dpm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_dpm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_dpm.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_dpm.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_dpm.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-shm_dpm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_dpm.lo `test -f 'src/mpid/ch4/shm/src/shm_dpm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_dpm.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_mem.lo: src/mpid/ch4/shm/src/shm_mem.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-shm_mem.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_mem.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_mem.lo `test -f 'src/mpid/ch4/shm/src/shm_mem.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_mem.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_mem.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_mem.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_mem.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-shm_mem.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_mem.lo `test -f 'src/mpid/ch4/shm/src/shm_mem.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_mem.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_misc.lo: src/mpid/ch4/shm/src/shm_misc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-shm_misc.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_misc.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_misc.lo `test -f 'src/mpid/ch4/shm/src/shm_misc.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_misc.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_misc.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_misc.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_misc.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-shm_misc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_misc.lo `test -f 'src/mpid/ch4/shm/src/shm_misc.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_misc.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_rma.lo: src/mpid/ch4/shm/src/shm_rma.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-shm_rma.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_rma.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_rma.lo `test -f 'src/mpid/ch4/shm/src/shm_rma.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_rma.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_rma.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_rma.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_rma.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-shm_rma.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_rma.lo `test -f 'src/mpid/ch4/shm/src/shm_rma.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_rma.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-shm_impl.lo: src/mpid/ch4/shm/src/shm_impl.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-shm_impl.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_impl.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_impl.lo `test -f 'src/mpid/ch4/shm/src/shm_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_impl.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_impl.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_impl.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/shm_impl.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-shm_impl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-shm_impl.lo `test -f 'src/mpid/ch4/shm/src/shm_impl.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/shm_impl.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-topotree.lo: src/mpid/ch4/shm/src/topotree.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-topotree.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-topotree.lo `test -f 'src/mpid/ch4/shm/src/topotree.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/topotree.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/topotree.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-topotree.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-topotree.lo `test -f 'src/mpid/ch4/shm/src/topotree.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/topotree.c + +src/mpid/ch4/shm/src/lib_libpmpi_la-topotree_util.lo: src/mpid/ch4/shm/src/topotree_util.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/src/lib_libpmpi_la-topotree_util.lo -MD -MP -MF src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree_util.Tpo -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-topotree_util.lo `test -f 'src/mpid/ch4/shm/src/topotree_util.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/topotree_util.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree_util.Tpo src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree_util.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/src/topotree_util.c' object='src/mpid/ch4/shm/src/lib_libpmpi_la-topotree_util.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/src/lib_libpmpi_la-topotree_util.lo `test -f 'src/mpid/ch4/shm/src/topotree_util.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/src/topotree_util.c + +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-globals.lo: src/mpid/ch4/shm/stubshm/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libpmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-globals.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/stubshm/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-globals.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/globals.c' object='src/mpid/ch4/shm/stubshm/lib_libpmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/stubshm/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/globals.c + +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_comm.lo: src/mpid/ch4/shm/stubshm/stubshm_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_comm.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_comm.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_comm.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_comm.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/stubshm_comm.c' object='src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_comm.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_comm.c + +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_init.lo: src/mpid/ch4/shm/stubshm/stubshm_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_init.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_init.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_init.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_init.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/stubshm_init.c' object='src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_init.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_init.c + +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_spawn.lo: src/mpid/ch4/shm/stubshm/stubshm_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_spawn.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_spawn.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_spawn.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_spawn.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/stubshm_spawn.c' object='src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_spawn.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_spawn.c + +src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_win.lo: src/mpid/ch4/shm/stubshm/stubshm_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_win.lo -MD -MP -MF src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_win.Tpo -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_win.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_win.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_win.Tpo src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/stubshm/stubshm_win.c' object='src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/stubshm/lib_libpmpi_la-stubshm_win.lo `test -f 'src/mpid/ch4/shm/stubshm/stubshm_win.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/stubshm/stubshm_win.c + +src/mpid/ch4/shm/posix/release_gather/lib_libpmpi_la-release_gather.lo: src/mpid/ch4/shm/posix/release_gather/release_gather.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/release_gather/lib_libpmpi_la-release_gather.lo -MD -MP -MF src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libpmpi_la-release_gather.Tpo -c -o src/mpid/ch4/shm/posix/release_gather/lib_libpmpi_la-release_gather.lo `test -f 'src/mpid/ch4/shm/posix/release_gather/release_gather.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/release_gather/release_gather.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libpmpi_la-release_gather.Tpo src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libpmpi_la-release_gather.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/release_gather/release_gather.c' object='src/mpid/ch4/shm/posix/release_gather/lib_libpmpi_la-release_gather.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/release_gather/lib_libpmpi_la-release_gather.lo `test -f 'src/mpid/ch4/shm/posix/release_gather/release_gather.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/release_gather/release_gather.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-globals.lo: src/mpid/ch4/shm/posix/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-globals.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-globals.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/globals.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/globals.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_comm.lo: src/mpid/ch4/shm/posix/posix_comm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_comm.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_comm.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_comm.lo `test -f 'src/mpid/ch4/shm/posix/posix_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_comm.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_comm.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_comm.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_comm.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_comm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_comm.lo `test -f 'src/mpid/ch4/shm/posix/posix_comm.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_comm.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_init.lo: src/mpid/ch4/shm/posix/posix_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_init.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_init.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_init.lo `test -f 'src/mpid/ch4/shm/posix/posix_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_init.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_init.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_init.lo `test -f 'src/mpid/ch4/shm/posix/posix_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_init.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_op.lo: src/mpid/ch4/shm/posix/posix_op.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_op.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_op.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_op.lo `test -f 'src/mpid/ch4/shm/posix/posix_op.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_op.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_op.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_op.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_op.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_op.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_op.lo `test -f 'src/mpid/ch4/shm/posix/posix_op.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_op.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_datatype.lo: src/mpid/ch4/shm/posix/posix_datatype.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_datatype.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_datatype.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_datatype.lo `test -f 'src/mpid/ch4/shm/posix/posix_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_datatype.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_datatype.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_datatype.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_datatype.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_datatype.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_datatype.lo `test -f 'src/mpid/ch4/shm/posix/posix_datatype.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_datatype.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_spawn.lo: src/mpid/ch4/shm/posix/posix_spawn.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_spawn.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_spawn.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_spawn.lo `test -f 'src/mpid/ch4/shm/posix/posix_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_spawn.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_spawn.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_spawn.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_spawn.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_spawn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_spawn.lo `test -f 'src/mpid/ch4/shm/posix/posix_spawn.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_spawn.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_win.lo: src/mpid/ch4/shm/posix/posix_win.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_win.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_win.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_win.lo `test -f 'src/mpid/ch4/shm/posix/posix_win.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_win.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_win.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_win.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_win.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_win.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_win.lo `test -f 'src/mpid/ch4/shm/posix/posix_win.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_win.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_eager_array.lo: src/mpid/ch4/shm/posix/posix_eager_array.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_eager_array.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_eager_array.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_eager_array.lo `test -f 'src/mpid/ch4/shm/posix/posix_eager_array.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_eager_array.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_eager_array.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_eager_array.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_eager_array.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_eager_array.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_eager_array.lo `test -f 'src/mpid/ch4/shm/posix/posix_eager_array.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_eager_array.c + +src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_coll_init.lo: src/mpid/ch4/shm/posix/posix_coll_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_coll_init.lo -MD -MP -MF src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_coll_init.Tpo -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_coll_init.lo `test -f 'src/mpid/ch4/shm/posix/posix_coll_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_coll_init.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_coll_init.Tpo src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_coll_init.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/posix_coll_init.c' object='src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_coll_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/lib_libpmpi_la-posix_coll_init.lo `test -f 'src/mpid/ch4/shm/posix/posix_coll_init.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/posix_coll_init.c + +src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-globals.lo: src/mpid/ch4/shm/posix/eager/fbox/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-globals.Tpo -c -o src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/eager/fbox/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/fbox/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-globals.Tpo src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/eager/fbox/globals.c' object='src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/eager/fbox/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/fbox/globals.c + +src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-func_table.lo: src/mpid/ch4/shm/posix/eager/fbox/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo -c -o src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/posix/eager/fbox/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/fbox/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/eager/fbox/func_table.c' object='src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/eager/fbox/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/posix/eager/fbox/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/fbox/func_table.c + +src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-globals.lo: src/mpid/ch4/shm/posix/eager/stub/globals.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-globals.lo -MD -MP -MF src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-globals.Tpo -c -o src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/eager/stub/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/stub/globals.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-globals.Tpo src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-globals.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/eager/stub/globals.c' object='src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-globals.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-globals.lo `test -f 'src/mpid/ch4/shm/posix/eager/stub/globals.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/stub/globals.c + +src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-func_table.lo: src/mpid/ch4/shm/posix/eager/stub/func_table.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-func_table.lo -MD -MP -MF src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo -c -o src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/posix/eager/stub/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/stub/func_table.c + $(AM_V_at)$(am__mv) src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-func_table.Tpo src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-func_table.Plo +# $(AM_V_CC)source='src/mpid/ch4/shm/posix/eager/stub/func_table.c' object='src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-func_table.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/ch4/shm/posix/eager/stub/lib_libpmpi_la-func_table.lo `test -f 'src/mpid/ch4/shm/posix/eager/stub/func_table.c' || echo '$(srcdir)/'`src/mpid/ch4/shm/posix/eager/stub/func_table.c + +src/mpid/common/sched/lib_libpmpi_la-mpidu_sched.lo: src/mpid/common/sched/mpidu_sched.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/sched/lib_libpmpi_la-mpidu_sched.lo -MD -MP -MF src/mpid/common/sched/$(DEPDIR)/lib_libpmpi_la-mpidu_sched.Tpo -c -o src/mpid/common/sched/lib_libpmpi_la-mpidu_sched.lo `test -f 'src/mpid/common/sched/mpidu_sched.c' || echo '$(srcdir)/'`src/mpid/common/sched/mpidu_sched.c + $(AM_V_at)$(am__mv) src/mpid/common/sched/$(DEPDIR)/lib_libpmpi_la-mpidu_sched.Tpo src/mpid/common/sched/$(DEPDIR)/lib_libpmpi_la-mpidu_sched.Plo +# $(AM_V_CC)source='src/mpid/common/sched/mpidu_sched.c' object='src/mpid/common/sched/lib_libpmpi_la-mpidu_sched.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/sched/lib_libpmpi_la-mpidu_sched.lo `test -f 'src/mpid/common/sched/mpidu_sched.c' || echo '$(srcdir)/'`src/mpid/common/sched/mpidu_sched.c + +src/mpid/common/hcoll/lib_libpmpi_la-hcoll_init.lo: src/mpid/common/hcoll/hcoll_init.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/hcoll/lib_libpmpi_la-hcoll_init.lo -MD -MP -MF src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_init.Tpo -c -o src/mpid/common/hcoll/lib_libpmpi_la-hcoll_init.lo `test -f 'src/mpid/common/hcoll/hcoll_init.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_init.c + $(AM_V_at)$(am__mv) src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_init.Tpo src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_init.Plo +# $(AM_V_CC)source='src/mpid/common/hcoll/hcoll_init.c' object='src/mpid/common/hcoll/lib_libpmpi_la-hcoll_init.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/hcoll/lib_libpmpi_la-hcoll_init.lo `test -f 'src/mpid/common/hcoll/hcoll_init.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_init.c + +src/mpid/common/hcoll/lib_libpmpi_la-hcoll_ops.lo: src/mpid/common/hcoll/hcoll_ops.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/hcoll/lib_libpmpi_la-hcoll_ops.lo -MD -MP -MF src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_ops.Tpo -c -o src/mpid/common/hcoll/lib_libpmpi_la-hcoll_ops.lo `test -f 'src/mpid/common/hcoll/hcoll_ops.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_ops.c + $(AM_V_at)$(am__mv) src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_ops.Tpo src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_ops.Plo +# $(AM_V_CC)source='src/mpid/common/hcoll/hcoll_ops.c' object='src/mpid/common/hcoll/lib_libpmpi_la-hcoll_ops.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/hcoll/lib_libpmpi_la-hcoll_ops.lo `test -f 'src/mpid/common/hcoll/hcoll_ops.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_ops.c + +src/mpid/common/hcoll/lib_libpmpi_la-hcoll_dtypes.lo: src/mpid/common/hcoll/hcoll_dtypes.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/hcoll/lib_libpmpi_la-hcoll_dtypes.lo -MD -MP -MF src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_dtypes.Tpo -c -o src/mpid/common/hcoll/lib_libpmpi_la-hcoll_dtypes.lo `test -f 'src/mpid/common/hcoll/hcoll_dtypes.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_dtypes.c + $(AM_V_at)$(am__mv) src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_dtypes.Tpo src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_dtypes.Plo +# $(AM_V_CC)source='src/mpid/common/hcoll/hcoll_dtypes.c' object='src/mpid/common/hcoll/lib_libpmpi_la-hcoll_dtypes.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/hcoll/lib_libpmpi_la-hcoll_dtypes.lo `test -f 'src/mpid/common/hcoll/hcoll_dtypes.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_dtypes.c + +src/mpid/common/hcoll/lib_libpmpi_la-hcoll_rte.lo: src/mpid/common/hcoll/hcoll_rte.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/hcoll/lib_libpmpi_la-hcoll_rte.lo -MD -MP -MF src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_rte.Tpo -c -o src/mpid/common/hcoll/lib_libpmpi_la-hcoll_rte.lo `test -f 'src/mpid/common/hcoll/hcoll_rte.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_rte.c + $(AM_V_at)$(am__mv) src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_rte.Tpo src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_rte.Plo +# $(AM_V_CC)source='src/mpid/common/hcoll/hcoll_rte.c' object='src/mpid/common/hcoll/lib_libpmpi_la-hcoll_rte.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/hcoll/lib_libpmpi_la-hcoll_rte.lo `test -f 'src/mpid/common/hcoll/hcoll_rte.c' || echo '$(srcdir)/'`src/mpid/common/hcoll/hcoll_rte.c + +src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_alloc.lo: src/mpid/common/shm/mpidu_shm_alloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_alloc.lo -MD -MP -MF src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_alloc.Tpo -c -o src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_alloc.lo `test -f 'src/mpid/common/shm/mpidu_shm_alloc.c' || echo '$(srcdir)/'`src/mpid/common/shm/mpidu_shm_alloc.c + $(AM_V_at)$(am__mv) src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_alloc.Tpo src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_alloc.Plo +# $(AM_V_CC)source='src/mpid/common/shm/mpidu_shm_alloc.c' object='src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_alloc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_alloc.lo `test -f 'src/mpid/common/shm/mpidu_shm_alloc.c' || echo '$(srcdir)/'`src/mpid/common/shm/mpidu_shm_alloc.c + +src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_barrier.lo: src/mpid/common/shm/mpidu_shm_barrier.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_barrier.lo -MD -MP -MF src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_barrier.Tpo -c -o src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_barrier.lo `test -f 'src/mpid/common/shm/mpidu_shm_barrier.c' || echo '$(srcdir)/'`src/mpid/common/shm/mpidu_shm_barrier.c + $(AM_V_at)$(am__mv) src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_barrier.Tpo src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_barrier.Plo +# $(AM_V_CC)source='src/mpid/common/shm/mpidu_shm_barrier.c' object='src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_barrier.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/shm/lib_libpmpi_la-mpidu_shm_barrier.lo `test -f 'src/mpid/common/shm/mpidu_shm_barrier.c' || echo '$(srcdir)/'`src/mpid/common/shm/mpidu_shm_barrier.c + +src/mpid/common/bc/lib_libpmpi_la-mpidu_bc.lo: src/mpid/common/bc/mpidu_bc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpid/common/bc/lib_libpmpi_la-mpidu_bc.lo -MD -MP -MF src/mpid/common/bc/$(DEPDIR)/lib_libpmpi_la-mpidu_bc.Tpo -c -o src/mpid/common/bc/lib_libpmpi_la-mpidu_bc.lo `test -f 'src/mpid/common/bc/mpidu_bc.c' || echo '$(srcdir)/'`src/mpid/common/bc/mpidu_bc.c + $(AM_V_at)$(am__mv) src/mpid/common/bc/$(DEPDIR)/lib_libpmpi_la-mpidu_bc.Tpo src/mpid/common/bc/$(DEPDIR)/lib_libpmpi_la-mpidu_bc.Plo +# $(AM_V_CC)source='src/mpid/common/bc/mpidu_bc.c' object='src/mpid/common/bc/lib_libpmpi_la-mpidu_bc.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpid/common/bc/lib_libpmpi_la-mpidu_bc.lo `test -f 'src/mpid/common/bc/mpidu_bc.c' || echo '$(srcdir)/'`src/mpid/common/bc/mpidu_bc.c + +src/mpi_t/lib_libpmpi_la-mpit.lo: src/mpi_t/mpit.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mpi_t/lib_libpmpi_la-mpit.lo -MD -MP -MF src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit.Tpo -c -o src/mpi_t/lib_libpmpi_la-mpit.lo `test -f 'src/mpi_t/mpit.c' || echo '$(srcdir)/'`src/mpi_t/mpit.c + $(AM_V_at)$(am__mv) src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit.Tpo src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit.Plo +# $(AM_V_CC)source='src/mpi_t/mpit.c' object='src/mpi_t/lib_libpmpi_la-mpit.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/mpi_t/lib_libpmpi_la-mpit.lo `test -f 'src/mpi_t/mpit.c' || echo '$(srcdir)/'`src/mpi_t/mpit.c + +src/nameserv/file/lib_libpmpi_la-file_nameserv.lo: src/nameserv/file/file_nameserv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/nameserv/file/lib_libpmpi_la-file_nameserv.lo -MD -MP -MF src/nameserv/file/$(DEPDIR)/lib_libpmpi_la-file_nameserv.Tpo -c -o src/nameserv/file/lib_libpmpi_la-file_nameserv.lo `test -f 'src/nameserv/file/file_nameserv.c' || echo '$(srcdir)/'`src/nameserv/file/file_nameserv.c + $(AM_V_at)$(am__mv) src/nameserv/file/$(DEPDIR)/lib_libpmpi_la-file_nameserv.Tpo src/nameserv/file/$(DEPDIR)/lib_libpmpi_la-file_nameserv.Plo +# $(AM_V_CC)source='src/nameserv/file/file_nameserv.c' object='src/nameserv/file/lib_libpmpi_la-file_nameserv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/nameserv/file/lib_libpmpi_la-file_nameserv.lo `test -f 'src/nameserv/file/file_nameserv.c' || echo '$(srcdir)/'`src/nameserv/file/file_nameserv.c + +src/nameserv/pmi/lib_libpmpi_la-pmi_nameserv.lo: src/nameserv/pmi/pmi_nameserv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/nameserv/pmi/lib_libpmpi_la-pmi_nameserv.lo -MD -MP -MF src/nameserv/pmi/$(DEPDIR)/lib_libpmpi_la-pmi_nameserv.Tpo -c -o src/nameserv/pmi/lib_libpmpi_la-pmi_nameserv.lo `test -f 'src/nameserv/pmi/pmi_nameserv.c' || echo '$(srcdir)/'`src/nameserv/pmi/pmi_nameserv.c + $(AM_V_at)$(am__mv) src/nameserv/pmi/$(DEPDIR)/lib_libpmpi_la-pmi_nameserv.Tpo src/nameserv/pmi/$(DEPDIR)/lib_libpmpi_la-pmi_nameserv.Plo +# $(AM_V_CC)source='src/nameserv/pmi/pmi_nameserv.c' object='src/nameserv/pmi/lib_libpmpi_la-pmi_nameserv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/nameserv/pmi/lib_libpmpi_la-pmi_nameserv.lo `test -f 'src/nameserv/pmi/pmi_nameserv.c' || echo '$(srcdir)/'`src/nameserv/pmi/pmi_nameserv.c + +src/pmi/pmi2/simple/lib_libpmpi_la-simple2pmi.lo: src/pmi/pmi2/simple/simple2pmi.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pmi/pmi2/simple/lib_libpmpi_la-simple2pmi.lo -MD -MP -MF src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple2pmi.Tpo -c -o src/pmi/pmi2/simple/lib_libpmpi_la-simple2pmi.lo `test -f 'src/pmi/pmi2/simple/simple2pmi.c' || echo '$(srcdir)/'`src/pmi/pmi2/simple/simple2pmi.c + $(AM_V_at)$(am__mv) src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple2pmi.Tpo src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple2pmi.Plo +# $(AM_V_CC)source='src/pmi/pmi2/simple/simple2pmi.c' object='src/pmi/pmi2/simple/lib_libpmpi_la-simple2pmi.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pmi/pmi2/simple/lib_libpmpi_la-simple2pmi.lo `test -f 'src/pmi/pmi2/simple/simple2pmi.c' || echo '$(srcdir)/'`src/pmi/pmi2/simple/simple2pmi.c + +src/pmi/pmi2/simple/lib_libpmpi_la-simple_pmiutil.lo: src/pmi/pmi2/simple/simple_pmiutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pmi/pmi2/simple/lib_libpmpi_la-simple_pmiutil.lo -MD -MP -MF src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Tpo -c -o src/pmi/pmi2/simple/lib_libpmpi_la-simple_pmiutil.lo `test -f 'src/pmi/pmi2/simple/simple_pmiutil.c' || echo '$(srcdir)/'`src/pmi/pmi2/simple/simple_pmiutil.c + $(AM_V_at)$(am__mv) src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Tpo src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo +# $(AM_V_CC)source='src/pmi/pmi2/simple/simple_pmiutil.c' object='src/pmi/pmi2/simple/lib_libpmpi_la-simple_pmiutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pmi/pmi2/simple/lib_libpmpi_la-simple_pmiutil.lo `test -f 'src/pmi/pmi2/simple/simple_pmiutil.c' || echo '$(srcdir)/'`src/pmi/pmi2/simple/simple_pmiutil.c + +src/pmi/simple/lib_libpmpi_la-simple_pmiutil.lo: src/pmi/simple/simple_pmiutil.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pmi/simple/lib_libpmpi_la-simple_pmiutil.lo -MD -MP -MF src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Tpo -c -o src/pmi/simple/lib_libpmpi_la-simple_pmiutil.lo `test -f 'src/pmi/simple/simple_pmiutil.c' || echo '$(srcdir)/'`src/pmi/simple/simple_pmiutil.c + $(AM_V_at)$(am__mv) src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Tpo src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo +# $(AM_V_CC)source='src/pmi/simple/simple_pmiutil.c' object='src/pmi/simple/lib_libpmpi_la-simple_pmiutil.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pmi/simple/lib_libpmpi_la-simple_pmiutil.lo `test -f 'src/pmi/simple/simple_pmiutil.c' || echo '$(srcdir)/'`src/pmi/simple/simple_pmiutil.c + +src/pmi/simple/lib_libpmpi_la-simple_pmi.lo: src/pmi/simple/simple_pmi.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pmi/simple/lib_libpmpi_la-simple_pmi.lo -MD -MP -MF src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmi.Tpo -c -o src/pmi/simple/lib_libpmpi_la-simple_pmi.lo `test -f 'src/pmi/simple/simple_pmi.c' || echo '$(srcdir)/'`src/pmi/simple/simple_pmi.c + $(AM_V_at)$(am__mv) src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmi.Tpo src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmi.Plo +# $(AM_V_CC)source='src/pmi/simple/simple_pmi.c' object='src/pmi/simple/lib_libpmpi_la-simple_pmi.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libpmpi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pmi/simple/lib_libpmpi_la-simple_pmi.lo `test -f 'src/pmi/simple/simple_pmi.c' || echo '$(srcdir)/'`src/pmi/simple/simple_pmi.c + +src/mpi/debugger/lib_libtvmpich_la-dll_mpich.lo: src/mpi/debugger/dll_mpich.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtvmpich_la_CFLAGS) $(CFLAGS) -MT src/mpi/debugger/lib_libtvmpich_la-dll_mpich.lo -MD -MP -MF src/mpi/debugger/$(DEPDIR)/lib_libtvmpich_la-dll_mpich.Tpo -c -o src/mpi/debugger/lib_libtvmpich_la-dll_mpich.lo `test -f 'src/mpi/debugger/dll_mpich.c' || echo '$(srcdir)/'`src/mpi/debugger/dll_mpich.c + $(AM_V_at)$(am__mv) src/mpi/debugger/$(DEPDIR)/lib_libtvmpich_la-dll_mpich.Tpo src/mpi/debugger/$(DEPDIR)/lib_libtvmpich_la-dll_mpich.Plo +# $(AM_V_CC)source='src/mpi/debugger/dll_mpich.c' object='src/mpi/debugger/lib_libtvmpich_la-dll_mpich.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtvmpich_la_CFLAGS) $(CFLAGS) -c -o src/mpi/debugger/lib_libtvmpich_la-dll_mpich.lo `test -f 'src/mpi/debugger/dll_mpich.c' || echo '$(srcdir)/'`src/mpi/debugger/dll_mpich.c + +src/mpi/debugger/libdbginitdummy_la-dbginit.lo: src/mpi/debugger/dbginit.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_mpi_debugger_libdbginitdummy_la_CFLAGS) $(CFLAGS) -MT src/mpi/debugger/libdbginitdummy_la-dbginit.lo -MD -MP -MF src/mpi/debugger/$(DEPDIR)/libdbginitdummy_la-dbginit.Tpo -c -o src/mpi/debugger/libdbginitdummy_la-dbginit.lo `test -f 'src/mpi/debugger/dbginit.c' || echo '$(srcdir)/'`src/mpi/debugger/dbginit.c + $(AM_V_at)$(am__mv) src/mpi/debugger/$(DEPDIR)/libdbginitdummy_la-dbginit.Tpo src/mpi/debugger/$(DEPDIR)/libdbginitdummy_la-dbginit.Plo +# $(AM_V_CC)source='src/mpi/debugger/dbginit.c' object='src/mpi/debugger/libdbginitdummy_la-dbginit.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_mpi_debugger_libdbginitdummy_la_CFLAGS) $(CFLAGS) -c -o src/mpi/debugger/libdbginitdummy_la-dbginit.lo `test -f 'src/mpi/debugger/dbginit.c' || echo '$(srcdir)/'`src/mpi/debugger/dbginit.c + +src/pm/util/libmpiexec_la-cmnargs.lo: src/pm/util/cmnargs.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-cmnargs.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-cmnargs.Tpo -c -o src/pm/util/libmpiexec_la-cmnargs.lo `test -f 'src/pm/util/cmnargs.c' || echo '$(srcdir)/'`src/pm/util/cmnargs.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-cmnargs.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-cmnargs.Plo +# $(AM_V_CC)source='src/pm/util/cmnargs.c' object='src/pm/util/libmpiexec_la-cmnargs.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-cmnargs.lo `test -f 'src/pm/util/cmnargs.c' || echo '$(srcdir)/'`src/pm/util/cmnargs.c + +src/pm/util/libmpiexec_la-process.lo: src/pm/util/process.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-process.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-process.Tpo -c -o src/pm/util/libmpiexec_la-process.lo `test -f 'src/pm/util/process.c' || echo '$(srcdir)/'`src/pm/util/process.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-process.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-process.Plo +# $(AM_V_CC)source='src/pm/util/process.c' object='src/pm/util/libmpiexec_la-process.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-process.lo `test -f 'src/pm/util/process.c' || echo '$(srcdir)/'`src/pm/util/process.c + +src/pm/util/libmpiexec_la-ioloop.lo: src/pm/util/ioloop.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-ioloop.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-ioloop.Tpo -c -o src/pm/util/libmpiexec_la-ioloop.lo `test -f 'src/pm/util/ioloop.c' || echo '$(srcdir)/'`src/pm/util/ioloop.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-ioloop.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-ioloop.Plo +# $(AM_V_CC)source='src/pm/util/ioloop.c' object='src/pm/util/libmpiexec_la-ioloop.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-ioloop.lo `test -f 'src/pm/util/ioloop.c' || echo '$(srcdir)/'`src/pm/util/ioloop.c + +src/pm/util/libmpiexec_la-pmiserv.lo: src/pm/util/pmiserv.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-pmiserv.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-pmiserv.Tpo -c -o src/pm/util/libmpiexec_la-pmiserv.lo `test -f 'src/pm/util/pmiserv.c' || echo '$(srcdir)/'`src/pm/util/pmiserv.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-pmiserv.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-pmiserv.Plo +# $(AM_V_CC)source='src/pm/util/pmiserv.c' object='src/pm/util/libmpiexec_la-pmiserv.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-pmiserv.lo `test -f 'src/pm/util/pmiserv.c' || echo '$(srcdir)/'`src/pm/util/pmiserv.c + +src/pm/util/libmpiexec_la-labelout.lo: src/pm/util/labelout.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-labelout.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-labelout.Tpo -c -o src/pm/util/libmpiexec_la-labelout.lo `test -f 'src/pm/util/labelout.c' || echo '$(srcdir)/'`src/pm/util/labelout.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-labelout.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-labelout.Plo +# $(AM_V_CC)source='src/pm/util/labelout.c' object='src/pm/util/libmpiexec_la-labelout.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-labelout.lo `test -f 'src/pm/util/labelout.c' || echo '$(srcdir)/'`src/pm/util/labelout.c + +src/pm/util/libmpiexec_la-env.lo: src/pm/util/env.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-env.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-env.Tpo -c -o src/pm/util/libmpiexec_la-env.lo `test -f 'src/pm/util/env.c' || echo '$(srcdir)/'`src/pm/util/env.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-env.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-env.Plo +# $(AM_V_CC)source='src/pm/util/env.c' object='src/pm/util/libmpiexec_la-env.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-env.lo `test -f 'src/pm/util/env.c' || echo '$(srcdir)/'`src/pm/util/env.c + +src/pm/util/libmpiexec_la-newsession.lo: src/pm/util/newsession.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-newsession.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-newsession.Tpo -c -o src/pm/util/libmpiexec_la-newsession.lo `test -f 'src/pm/util/newsession.c' || echo '$(srcdir)/'`src/pm/util/newsession.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-newsession.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-newsession.Plo +# $(AM_V_CC)source='src/pm/util/newsession.c' object='src/pm/util/libmpiexec_la-newsession.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-newsession.lo `test -f 'src/pm/util/newsession.c' || echo '$(srcdir)/'`src/pm/util/newsession.c + +src/pm/util/libmpiexec_la-rm.lo: src/pm/util/rm.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-rm.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-rm.Tpo -c -o src/pm/util/libmpiexec_la-rm.lo `test -f 'src/pm/util/rm.c' || echo '$(srcdir)/'`src/pm/util/rm.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-rm.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-rm.Plo +# $(AM_V_CC)source='src/pm/util/rm.c' object='src/pm/util/libmpiexec_la-rm.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-rm.lo `test -f 'src/pm/util/rm.c' || echo '$(srcdir)/'`src/pm/util/rm.c + +src/pm/util/libmpiexec_la-pmiport.lo: src/pm/util/pmiport.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-pmiport.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-pmiport.Tpo -c -o src/pm/util/libmpiexec_la-pmiport.lo `test -f 'src/pm/util/pmiport.c' || echo '$(srcdir)/'`src/pm/util/pmiport.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-pmiport.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-pmiport.Plo +# $(AM_V_CC)source='src/pm/util/pmiport.c' object='src/pm/util/libmpiexec_la-pmiport.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-pmiport.lo `test -f 'src/pm/util/pmiport.c' || echo '$(srcdir)/'`src/pm/util/pmiport.c + +src/pm/util/libmpiexec_la-dbgiface.lo: src/pm/util/dbgiface.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-dbgiface.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-dbgiface.Tpo -c -o src/pm/util/libmpiexec_la-dbgiface.lo `test -f 'src/pm/util/dbgiface.c' || echo '$(srcdir)/'`src/pm/util/dbgiface.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-dbgiface.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-dbgiface.Plo +# $(AM_V_CC)source='src/pm/util/dbgiface.c' object='src/pm/util/libmpiexec_la-dbgiface.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-dbgiface.lo `test -f 'src/pm/util/dbgiface.c' || echo '$(srcdir)/'`src/pm/util/dbgiface.c + +src/pm/util/libmpiexec_la-simple_pmiutil2.lo: src/pm/util/simple_pmiutil2.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -MT src/pm/util/libmpiexec_la-simple_pmiutil2.lo -MD -MP -MF src/pm/util/$(DEPDIR)/libmpiexec_la-simple_pmiutil2.Tpo -c -o src/pm/util/libmpiexec_la-simple_pmiutil2.lo `test -f 'src/pm/util/simple_pmiutil2.c' || echo '$(srcdir)/'`src/pm/util/simple_pmiutil2.c + $(AM_V_at)$(am__mv) src/pm/util/$(DEPDIR)/libmpiexec_la-simple_pmiutil2.Tpo src/pm/util/$(DEPDIR)/libmpiexec_la-simple_pmiutil2.Plo +# $(AM_V_CC)source='src/pm/util/simple_pmiutil2.c' object='src/pm/util/libmpiexec_la-simple_pmiutil2.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_util_libmpiexec_la_CPPFLAGS) $(CPPFLAGS) $(src_pm_util_libmpiexec_la_CFLAGS) $(CFLAGS) -c -o src/pm/util/libmpiexec_la-simple_pmiutil2.lo `test -f 'src/pm/util/simple_pmiutil2.c' || echo '$(srcdir)/'`src/pm/util/simple_pmiutil2.c + +src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.o: src/pm/gforker/mpiexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_gforker_mpiexec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.o -MD -MP -MF src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Tpo -c -o src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.o `test -f 'src/pm/gforker/mpiexec.c' || echo '$(srcdir)/'`src/pm/gforker/mpiexec.c + $(AM_V_at)$(am__mv) src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Tpo src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Po +# $(AM_V_CC)source='src/pm/gforker/mpiexec.c' object='src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_gforker_mpiexec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.o `test -f 'src/pm/gforker/mpiexec.c' || echo '$(srcdir)/'`src/pm/gforker/mpiexec.c + +src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.obj: src/pm/gforker/mpiexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_gforker_mpiexec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.obj -MD -MP -MF src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Tpo -c -o src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.obj `if test -f 'src/pm/gforker/mpiexec.c'; then $(CYGPATH_W) 'src/pm/gforker/mpiexec.c'; else $(CYGPATH_W) '$(srcdir)/src/pm/gforker/mpiexec.c'; fi` + $(AM_V_at)$(am__mv) src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Tpo src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Po +# $(AM_V_CC)source='src/pm/gforker/mpiexec.c' object='src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_gforker_mpiexec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pm/gforker/src_pm_gforker_mpiexec-mpiexec.obj `if test -f 'src/pm/gforker/mpiexec.c'; then $(CYGPATH_W) 'src/pm/gforker/mpiexec.c'; else $(CYGPATH_W) '$(srcdir)/src/pm/gforker/mpiexec.c'; fi` + +src/pm/gforker/mpiexec_gforker-mpiexec.o: src/pm/gforker/mpiexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_gforker_mpiexec_gforker_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pm/gforker/mpiexec_gforker-mpiexec.o -MD -MP -MF src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Tpo -c -o src/pm/gforker/mpiexec_gforker-mpiexec.o `test -f 'src/pm/gforker/mpiexec.c' || echo '$(srcdir)/'`src/pm/gforker/mpiexec.c + $(AM_V_at)$(am__mv) src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Tpo src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Po +# $(AM_V_CC)source='src/pm/gforker/mpiexec.c' object='src/pm/gforker/mpiexec_gforker-mpiexec.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_gforker_mpiexec_gforker_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pm/gforker/mpiexec_gforker-mpiexec.o `test -f 'src/pm/gforker/mpiexec.c' || echo '$(srcdir)/'`src/pm/gforker/mpiexec.c + +src/pm/gforker/mpiexec_gforker-mpiexec.obj: src/pm/gforker/mpiexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_gforker_mpiexec_gforker_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pm/gforker/mpiexec_gforker-mpiexec.obj -MD -MP -MF src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Tpo -c -o src/pm/gforker/mpiexec_gforker-mpiexec.obj `if test -f 'src/pm/gforker/mpiexec.c'; then $(CYGPATH_W) 'src/pm/gforker/mpiexec.c'; else $(CYGPATH_W) '$(srcdir)/src/pm/gforker/mpiexec.c'; fi` + $(AM_V_at)$(am__mv) src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Tpo src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Po +# $(AM_V_CC)source='src/pm/gforker/mpiexec.c' object='src/pm/gforker/mpiexec_gforker-mpiexec.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_gforker_mpiexec_gforker_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pm/gforker/mpiexec_gforker-mpiexec.obj `if test -f 'src/pm/gforker/mpiexec.c'; then $(CYGPATH_W) 'src/pm/gforker/mpiexec.c'; else $(CYGPATH_W) '$(srcdir)/src/pm/gforker/mpiexec.c'; fi` + +src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.o: src/pm/remshell/mpiexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_remshell_mpiexec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.o -MD -MP -MF src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Tpo -c -o src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.o `test -f 'src/pm/remshell/mpiexec.c' || echo '$(srcdir)/'`src/pm/remshell/mpiexec.c + $(AM_V_at)$(am__mv) src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Tpo src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Po +# $(AM_V_CC)source='src/pm/remshell/mpiexec.c' object='src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_remshell_mpiexec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.o `test -f 'src/pm/remshell/mpiexec.c' || echo '$(srcdir)/'`src/pm/remshell/mpiexec.c + +src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.obj: src/pm/remshell/mpiexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_remshell_mpiexec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.obj -MD -MP -MF src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Tpo -c -o src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.obj `if test -f 'src/pm/remshell/mpiexec.c'; then $(CYGPATH_W) 'src/pm/remshell/mpiexec.c'; else $(CYGPATH_W) '$(srcdir)/src/pm/remshell/mpiexec.c'; fi` + $(AM_V_at)$(am__mv) src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Tpo src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Po +# $(AM_V_CC)source='src/pm/remshell/mpiexec.c' object='src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_remshell_mpiexec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pm/remshell/src_pm_remshell_mpiexec-mpiexec.obj `if test -f 'src/pm/remshell/mpiexec.c'; then $(CYGPATH_W) 'src/pm/remshell/mpiexec.c'; else $(CYGPATH_W) '$(srcdir)/src/pm/remshell/mpiexec.c'; fi` + +src/pm/remshell/mpiexec_remshell-mpiexec.o: src/pm/remshell/mpiexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_remshell_mpiexec_remshell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pm/remshell/mpiexec_remshell-mpiexec.o -MD -MP -MF src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Tpo -c -o src/pm/remshell/mpiexec_remshell-mpiexec.o `test -f 'src/pm/remshell/mpiexec.c' || echo '$(srcdir)/'`src/pm/remshell/mpiexec.c + $(AM_V_at)$(am__mv) src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Tpo src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Po +# $(AM_V_CC)source='src/pm/remshell/mpiexec.c' object='src/pm/remshell/mpiexec_remshell-mpiexec.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_remshell_mpiexec_remshell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pm/remshell/mpiexec_remshell-mpiexec.o `test -f 'src/pm/remshell/mpiexec.c' || echo '$(srcdir)/'`src/pm/remshell/mpiexec.c + +src/pm/remshell/mpiexec_remshell-mpiexec.obj: src/pm/remshell/mpiexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_remshell_mpiexec_remshell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/pm/remshell/mpiexec_remshell-mpiexec.obj -MD -MP -MF src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Tpo -c -o src/pm/remshell/mpiexec_remshell-mpiexec.obj `if test -f 'src/pm/remshell/mpiexec.c'; then $(CYGPATH_W) 'src/pm/remshell/mpiexec.c'; else $(CYGPATH_W) '$(srcdir)/src/pm/remshell/mpiexec.c'; fi` + $(AM_V_at)$(am__mv) src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Tpo src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Po +# $(AM_V_CC)source='src/pm/remshell/mpiexec.c' object='src/pm/remshell/mpiexec_remshell-mpiexec.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_pm_remshell_mpiexec_remshell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/pm/remshell/mpiexec_remshell-mpiexec.obj `if test -f 'src/pm/remshell/mpiexec.c'; then $(CYGPATH_W) 'src/pm/remshell/mpiexec.c'; else $(CYGPATH_W) '$(srcdir)/src/pm/remshell/mpiexec.c'; fi` + +.cxx.o: + $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ + $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $< + +.cxx.obj: + $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ + $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cxx.lo: + $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ + $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Plo +# $(AM_V_CXX)source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $< + +.f.o: + $(AM_V_F77)$(F77COMPILE) -c -o $@ $< + +.f.obj: + $(AM_V_F77)$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.f.lo: + $(AM_V_F77)$(LTF77COMPILE) -c -o $@ $< + +.f90.o: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ $< + +.f90.obj: + $(AM_V_FC)$(FCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.f90.lo: + $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf lib/.libs lib/_libs + -rm -rf src/binding/cxx/.libs src/binding/cxx/_libs + -rm -rf src/binding/fortran/mpif_h/.libs src/binding/fortran/mpif_h/_libs + -rm -rf src/binding/fortran/use_mpi/.libs src/binding/fortran/use_mpi/_libs + -rm -rf src/binding/fortran/use_mpi_f08/.libs src/binding/fortran/use_mpi_f08/_libs + -rm -rf src/binding/fortran/use_mpi_f08/wrappers_c/.libs src/binding/fortran/use_mpi_f08/wrappers_c/_libs + -rm -rf src/binding/fortran/use_mpi_f08/wrappers_f/.libs src/binding/fortran/use_mpi_f08/wrappers_f/_libs + -rm -rf src/binding/fortran/use_mpi_f08/wrappers_f/profiling/.libs src/binding/fortran/use_mpi_f08/wrappers_f/profiling/_libs + -rm -rf src/env/.libs src/env/_libs + -rm -rf src/glue/romio/.libs src/glue/romio/_libs + -rm -rf src/mpi/attr/.libs src/mpi/attr/_libs + -rm -rf src/mpi/coll/.libs src/mpi/coll/_libs + -rm -rf src/mpi/coll/algorithms/recexchalgo/.libs src/mpi/coll/algorithms/recexchalgo/_libs + -rm -rf src/mpi/coll/algorithms/stubalgo/.libs src/mpi/coll/algorithms/stubalgo/_libs + -rm -rf src/mpi/coll/algorithms/treealgo/.libs src/mpi/coll/algorithms/treealgo/_libs + -rm -rf src/mpi/coll/allgather/.libs src/mpi/coll/allgather/_libs + -rm -rf src/mpi/coll/allgatherv/.libs src/mpi/coll/allgatherv/_libs + -rm -rf src/mpi/coll/allreduce/.libs src/mpi/coll/allreduce/_libs + -rm -rf src/mpi/coll/allreduce_group/.libs src/mpi/coll/allreduce_group/_libs + -rm -rf src/mpi/coll/alltoall/.libs src/mpi/coll/alltoall/_libs + -rm -rf src/mpi/coll/alltoallv/.libs src/mpi/coll/alltoallv/_libs + -rm -rf src/mpi/coll/alltoallw/.libs src/mpi/coll/alltoallw/_libs + -rm -rf src/mpi/coll/barrier/.libs src/mpi/coll/barrier/_libs + -rm -rf src/mpi/coll/bcast/.libs src/mpi/coll/bcast/_libs + -rm -rf src/mpi/coll/exscan/.libs src/mpi/coll/exscan/_libs + -rm -rf src/mpi/coll/gather/.libs src/mpi/coll/gather/_libs + -rm -rf src/mpi/coll/gatherv/.libs src/mpi/coll/gatherv/_libs + -rm -rf src/mpi/coll/iallgather/.libs src/mpi/coll/iallgather/_libs + -rm -rf src/mpi/coll/iallgatherv/.libs src/mpi/coll/iallgatherv/_libs + -rm -rf src/mpi/coll/iallreduce/.libs src/mpi/coll/iallreduce/_libs + -rm -rf src/mpi/coll/ialltoall/.libs src/mpi/coll/ialltoall/_libs + -rm -rf src/mpi/coll/ialltoallv/.libs src/mpi/coll/ialltoallv/_libs + -rm -rf src/mpi/coll/ialltoallw/.libs src/mpi/coll/ialltoallw/_libs + -rm -rf src/mpi/coll/ibarrier/.libs src/mpi/coll/ibarrier/_libs + -rm -rf src/mpi/coll/ibcast/.libs src/mpi/coll/ibcast/_libs + -rm -rf src/mpi/coll/iexscan/.libs src/mpi/coll/iexscan/_libs + -rm -rf src/mpi/coll/igather/.libs src/mpi/coll/igather/_libs + -rm -rf src/mpi/coll/igatherv/.libs src/mpi/coll/igatherv/_libs + -rm -rf src/mpi/coll/ineighbor_allgather/.libs src/mpi/coll/ineighbor_allgather/_libs + -rm -rf src/mpi/coll/ineighbor_allgatherv/.libs src/mpi/coll/ineighbor_allgatherv/_libs + -rm -rf src/mpi/coll/ineighbor_alltoall/.libs src/mpi/coll/ineighbor_alltoall/_libs + -rm -rf src/mpi/coll/ineighbor_alltoallv/.libs src/mpi/coll/ineighbor_alltoallv/_libs + -rm -rf src/mpi/coll/ineighbor_alltoallw/.libs src/mpi/coll/ineighbor_alltoallw/_libs + -rm -rf src/mpi/coll/ireduce/.libs src/mpi/coll/ireduce/_libs + -rm -rf src/mpi/coll/ireduce_scatter/.libs src/mpi/coll/ireduce_scatter/_libs + -rm -rf src/mpi/coll/ireduce_scatter_block/.libs src/mpi/coll/ireduce_scatter_block/_libs + -rm -rf src/mpi/coll/iscan/.libs src/mpi/coll/iscan/_libs + -rm -rf src/mpi/coll/iscatter/.libs src/mpi/coll/iscatter/_libs + -rm -rf src/mpi/coll/iscatterv/.libs src/mpi/coll/iscatterv/_libs + -rm -rf src/mpi/coll/neighbor_allgather/.libs src/mpi/coll/neighbor_allgather/_libs + -rm -rf src/mpi/coll/neighbor_allgatherv/.libs src/mpi/coll/neighbor_allgatherv/_libs + -rm -rf src/mpi/coll/neighbor_alltoall/.libs src/mpi/coll/neighbor_alltoall/_libs + -rm -rf src/mpi/coll/neighbor_alltoallv/.libs src/mpi/coll/neighbor_alltoallv/_libs + -rm -rf src/mpi/coll/neighbor_alltoallw/.libs src/mpi/coll/neighbor_alltoallw/_libs + -rm -rf src/mpi/coll/op/.libs src/mpi/coll/op/_libs + -rm -rf src/mpi/coll/reduce/.libs src/mpi/coll/reduce/_libs + -rm -rf src/mpi/coll/reduce_local/.libs src/mpi/coll/reduce_local/_libs + -rm -rf src/mpi/coll/reduce_scatter/.libs src/mpi/coll/reduce_scatter/_libs + -rm -rf src/mpi/coll/reduce_scatter_block/.libs src/mpi/coll/reduce_scatter_block/_libs + -rm -rf src/mpi/coll/scan/.libs src/mpi/coll/scan/_libs + -rm -rf src/mpi/coll/scatter/.libs src/mpi/coll/scatter/_libs + -rm -rf src/mpi/coll/scatterv/.libs src/mpi/coll/scatterv/_libs + -rm -rf src/mpi/coll/src/.libs src/mpi/coll/src/_libs + -rm -rf src/mpi/coll/transports/gentran/.libs src/mpi/coll/transports/gentran/_libs + -rm -rf src/mpi/coll/transports/stubtran/.libs src/mpi/coll/transports/stubtran/_libs + -rm -rf src/mpi/comm/.libs src/mpi/comm/_libs + -rm -rf src/mpi/datatype/.libs src/mpi/datatype/_libs + -rm -rf src/mpi/datatype/typerep/dataloop/.libs src/mpi/datatype/typerep/dataloop/_libs + -rm -rf src/mpi/datatype/typerep/src/.libs src/mpi/datatype/typerep/src/_libs + -rm -rf src/mpi/debugger/.libs src/mpi/debugger/_libs + -rm -rf src/mpi/errhan/.libs src/mpi/errhan/_libs + -rm -rf src/mpi/group/.libs src/mpi/group/_libs + -rm -rf src/mpi/info/.libs src/mpi/info/_libs + -rm -rf src/mpi/init/.libs src/mpi/init/_libs + -rm -rf src/mpi/misc/.libs src/mpi/misc/_libs + -rm -rf src/mpi/pt2pt/.libs src/mpi/pt2pt/_libs + -rm -rf src/mpi/request/.libs src/mpi/request/_libs + -rm -rf src/mpi/rma/.libs src/mpi/rma/_libs + -rm -rf src/mpi/spawn/.libs src/mpi/spawn/_libs + -rm -rf src/mpi/timer/.libs src/mpi/timer/_libs + -rm -rf src/mpi/topo/.libs src/mpi/topo/_libs + -rm -rf src/mpi_t/.libs src/mpi_t/_libs + -rm -rf src/mpid/ch3/channels/nemesis/netmod/none/.libs src/mpid/ch3/channels/nemesis/netmod/none/_libs + -rm -rf src/mpid/ch3/channels/nemesis/netmod/ofi/.libs src/mpid/ch3/channels/nemesis/netmod/ofi/_libs + -rm -rf src/mpid/ch3/channels/nemesis/netmod/tcp/.libs src/mpid/ch3/channels/nemesis/netmod/tcp/_libs + -rm -rf src/mpid/ch3/channels/nemesis/src/.libs src/mpid/ch3/channels/nemesis/src/_libs + -rm -rf src/mpid/ch3/channels/nemesis/utils/monitor/.libs src/mpid/ch3/channels/nemesis/utils/monitor/_libs + -rm -rf src/mpid/ch3/channels/nemesis/utils/replacements/.libs src/mpid/ch3/channels/nemesis/utils/replacements/_libs + -rm -rf src/mpid/ch3/channels/sock/src/.libs src/mpid/ch3/channels/sock/src/_libs + -rm -rf src/mpid/ch3/src/.libs src/mpid/ch3/src/_libs + -rm -rf src/mpid/ch3/util/sock/.libs src/mpid/ch3/util/sock/_libs + -rm -rf src/mpid/ch4/generic/.libs src/mpid/ch4/generic/_libs + -rm -rf src/mpid/ch4/netmod/ofi/.libs src/mpid/ch4/netmod/ofi/_libs + -rm -rf src/mpid/ch4/netmod/src/.libs src/mpid/ch4/netmod/src/_libs + -rm -rf src/mpid/ch4/netmod/stubnm/.libs src/mpid/ch4/netmod/stubnm/_libs + -rm -rf src/mpid/ch4/netmod/ucx/.libs src/mpid/ch4/netmod/ucx/_libs + -rm -rf src/mpid/ch4/shm/posix/.libs src/mpid/ch4/shm/posix/_libs + -rm -rf src/mpid/ch4/shm/posix/eager/fbox/.libs src/mpid/ch4/shm/posix/eager/fbox/_libs + -rm -rf src/mpid/ch4/shm/posix/eager/stub/.libs src/mpid/ch4/shm/posix/eager/stub/_libs + -rm -rf src/mpid/ch4/shm/posix/release_gather/.libs src/mpid/ch4/shm/posix/release_gather/_libs + -rm -rf src/mpid/ch4/shm/src/.libs src/mpid/ch4/shm/src/_libs + -rm -rf src/mpid/ch4/shm/stubshm/.libs src/mpid/ch4/shm/stubshm/_libs + -rm -rf src/mpid/ch4/src/.libs src/mpid/ch4/src/_libs + -rm -rf src/mpid/common/bc/.libs src/mpid/common/bc/_libs + -rm -rf src/mpid/common/hcoll/.libs src/mpid/common/hcoll/_libs + -rm -rf src/mpid/common/sched/.libs src/mpid/common/sched/_libs + -rm -rf src/mpid/common/shm/.libs src/mpid/common/shm/_libs + -rm -rf src/nameserv/file/.libs src/nameserv/file/_libs + -rm -rf src/nameserv/pmi/.libs src/nameserv/pmi/_libs + -rm -rf src/pm/gforker/.libs src/pm/gforker/_libs + -rm -rf src/pm/remshell/.libs src/pm/remshell/_libs + -rm -rf src/pm/util/.libs src/pm/util/_libs + -rm -rf src/pmi/pmi2/simple/.libs src/pmi/pmi2/simple/_libs + -rm -rf src/pmi/simple/.libs src/pmi/simple/_libs + -rm -rf src/util/assert/.libs src/util/assert/_libs + -rm -rf src/util/cvar/.libs src/util/cvar/_libs + -rm -rf src/util/mem/.libs src/util/mem/_libs + -rm -rf src/util/procmap/.libs src/util/procmap/_libs + +distclean-libtool: + -rm -f libtool config.lt +install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-nodist_pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) +install-sysconfDATA: $(sysconf_DATA) + @$(NORMAL_INSTALL) + @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ + done + +uninstall-sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +install-modincHEADERS: $(modinc_HEADERS) + @$(NORMAL_INSTALL) + @list='$(modinc_HEADERS)'; test -n "$(modincdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(modincdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(modincdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(modincdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(modincdir)" || exit $$?; \ + done + +uninstall-modincHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(modinc_HEADERS)'; test -n "$(modincdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(modincdir)'; $(am__uninstall_files_from_dir) +install-nodist_includeHEADERS: $(nodist_include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-nodist_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(LTLIBRARIES) $(SCRIPTS) \ + $(DATA) $(HEADERS) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(modincdir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f lib/$(am__dirstamp) + -rm -f src/binding/cxx/$(DEPDIR)/$(am__dirstamp) + -rm -f src/binding/cxx/$(am__dirstamp) + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/$(am__dirstamp) + -rm -f src/binding/fortran/mpif_h/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi_f08/$(DEPDIR)/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi_f08/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_f/$(DEPDIR)/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_f/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(DEPDIR)/$(am__dirstamp) + -rm -f src/binding/fortran/use_mpi_f08/wrappers_f/profiling/$(am__dirstamp) + -rm -f src/env/$(DEPDIR)/$(am__dirstamp) + -rm -f src/env/$(am__dirstamp) + -rm -f src/glue/romio/$(DEPDIR)/$(am__dirstamp) + -rm -f src/glue/romio/$(am__dirstamp) + -rm -f src/mpi/attr/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/attr/$(am__dirstamp) + -rm -f src/mpi/coll/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/$(am__dirstamp) + -rm -f src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/algorithms/recexchalgo/$(am__dirstamp) + -rm -f src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/algorithms/stubalgo/$(am__dirstamp) + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/algorithms/treealgo/$(am__dirstamp) + -rm -f src/mpi/coll/allgather/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/allgather/$(am__dirstamp) + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/allgatherv/$(am__dirstamp) + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/allreduce/$(am__dirstamp) + -rm -f src/mpi/coll/allreduce_group/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/allreduce_group/$(am__dirstamp) + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/alltoall/$(am__dirstamp) + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/alltoallv/$(am__dirstamp) + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/alltoallw/$(am__dirstamp) + -rm -f src/mpi/coll/barrier/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/barrier/$(am__dirstamp) + -rm -f src/mpi/coll/bcast/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/bcast/$(am__dirstamp) + -rm -f src/mpi/coll/exscan/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/exscan/$(am__dirstamp) + -rm -f src/mpi/coll/gather/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/gather/$(am__dirstamp) + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/gatherv/$(am__dirstamp) + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/iallgather/$(am__dirstamp) + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/iallgatherv/$(am__dirstamp) + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/iallreduce/$(am__dirstamp) + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ialltoall/$(am__dirstamp) + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ialltoallv/$(am__dirstamp) + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ialltoallw/$(am__dirstamp) + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ibarrier/$(am__dirstamp) + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ibcast/$(am__dirstamp) + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/iexscan/$(am__dirstamp) + -rm -f src/mpi/coll/igather/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/igather/$(am__dirstamp) + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/igatherv/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_allgather/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_allgatherv/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_alltoall/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_alltoallv/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ineighbor_alltoallw/$(am__dirstamp) + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ireduce/$(am__dirstamp) + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ireduce_scatter/$(am__dirstamp) + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/ireduce_scatter_block/$(am__dirstamp) + -rm -f src/mpi/coll/iscan/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/iscan/$(am__dirstamp) + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/iscatter/$(am__dirstamp) + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/iscatterv/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_allgather/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_allgatherv/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_alltoall/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_alltoallv/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/neighbor_alltoallw/$(am__dirstamp) + -rm -f src/mpi/coll/op/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/op/$(am__dirstamp) + -rm -f src/mpi/coll/reduce/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/reduce/$(am__dirstamp) + -rm -f src/mpi/coll/reduce_local/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/reduce_local/$(am__dirstamp) + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/reduce_scatter/$(am__dirstamp) + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/reduce_scatter_block/$(am__dirstamp) + -rm -f src/mpi/coll/scan/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/scan/$(am__dirstamp) + -rm -f src/mpi/coll/scatter/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/scatter/$(am__dirstamp) + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/scatterv/$(am__dirstamp) + -rm -f src/mpi/coll/src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/src/$(am__dirstamp) + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/transports/gentran/$(am__dirstamp) + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/coll/transports/stubtran/$(am__dirstamp) + -rm -f src/mpi/comm/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/comm/$(am__dirstamp) + -rm -f src/mpi/datatype/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/datatype/$(am__dirstamp) + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/datatype/typerep/dataloop/$(am__dirstamp) + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/datatype/typerep/src/$(am__dirstamp) + -rm -f src/mpi/debugger/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/debugger/$(am__dirstamp) + -rm -f src/mpi/errhan/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/errhan/$(am__dirstamp) + -rm -f src/mpi/group/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/group/$(am__dirstamp) + -rm -f src/mpi/info/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/info/$(am__dirstamp) + -rm -f src/mpi/init/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/init/$(am__dirstamp) + -rm -f src/mpi/misc/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/misc/$(am__dirstamp) + -rm -f src/mpi/pt2pt/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/pt2pt/$(am__dirstamp) + -rm -f src/mpi/request/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/request/$(am__dirstamp) + -rm -f src/mpi/rma/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/rma/$(am__dirstamp) + -rm -f src/mpi/spawn/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/spawn/$(am__dirstamp) + -rm -f src/mpi/timer/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/timer/$(am__dirstamp) + -rm -f src/mpi/topo/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi/topo/$(am__dirstamp) + -rm -f src/mpi_t/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpi_t/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/netmod/none/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/src/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/utils/monitor/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/nemesis/utils/replacements/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/channels/sock/src/$(am__dirstamp) + -rm -f src/mpid/ch3/src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/src/$(am__dirstamp) + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch3/util/sock/$(am__dirstamp) + -rm -f src/mpid/ch4/generic/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/generic/$(am__dirstamp) + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/netmod/ofi/$(am__dirstamp) + -rm -f src/mpid/ch4/netmod/src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/netmod/src/$(am__dirstamp) + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/netmod/stubnm/$(am__dirstamp) + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/netmod/ucx/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/posix/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/posix/release_gather/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/src/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/shm/stubshm/$(am__dirstamp) + -rm -f src/mpid/ch4/src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/ch4/src/$(am__dirstamp) + -rm -f src/mpid/common/bc/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/common/bc/$(am__dirstamp) + -rm -f src/mpid/common/hcoll/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/common/hcoll/$(am__dirstamp) + -rm -f src/mpid/common/sched/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/common/sched/$(am__dirstamp) + -rm -f src/mpid/common/shm/$(DEPDIR)/$(am__dirstamp) + -rm -f src/mpid/common/shm/$(am__dirstamp) + -rm -f src/nameserv/file/$(DEPDIR)/$(am__dirstamp) + -rm -f src/nameserv/file/$(am__dirstamp) + -rm -f src/nameserv/pmi/$(DEPDIR)/$(am__dirstamp) + -rm -f src/nameserv/pmi/$(am__dirstamp) + -rm -f src/pm/gforker/$(DEPDIR)/$(am__dirstamp) + -rm -f src/pm/gforker/$(am__dirstamp) + -rm -f src/pm/remshell/$(DEPDIR)/$(am__dirstamp) + -rm -f src/pm/remshell/$(am__dirstamp) + -rm -f src/pm/util/$(DEPDIR)/$(am__dirstamp) + -rm -f src/pm/util/$(am__dirstamp) + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/$(am__dirstamp) + -rm -f src/pmi/pmi2/simple/$(am__dirstamp) + -rm -f src/pmi/simple/$(DEPDIR)/$(am__dirstamp) + -rm -f src/pmi/simple/$(am__dirstamp) + -rm -f src/util/assert/$(DEPDIR)/$(am__dirstamp) + -rm -f src/util/assert/$(am__dirstamp) + -rm -f src/util/cvar/$(DEPDIR)/$(am__dirstamp) + -rm -f src/util/cvar/$(am__dirstamp) + -rm -f src/util/mem/$(DEPDIR)/$(am__dirstamp) + -rm -f src/util/mem/$(am__dirstamp) + -rm -f src/util/procmap/$(DEPDIR)/$(am__dirstamp) + -rm -f src/util/procmap/$(am__dirstamp) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-local clean-noinstLIBRARIES \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f src/binding/cxx/$(DEPDIR)/initcxx.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-abortf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrclassf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrcodef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrstringf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-addressf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_addf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_difff.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alloc_memf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allreducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_putf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-barrierf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bcastf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufattachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufdetachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cancelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_coordsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_mapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_shiftf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_subf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cartdim_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-close_portf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_acceptf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_agreef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_comparef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_connectf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_create_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dup_with_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_ackf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_get_ackedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_idupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_joinf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_revokef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_shrinkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_spawnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_split_typef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_splitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdiscf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commfreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgetnamf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commnewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commparentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrgroupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrsizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commtesticf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-compare_and_swapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dims_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_create_adjacentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighbors_countf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighborsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_comm_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_type_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_win_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhcreatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhfreef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhgetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhsetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_classf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_stringf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-exscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fetch_and_opf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_closef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_amodef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_atomicityf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_byte_offsetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_position_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_positionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_type_extentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_viewf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_ireadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwritef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_openf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_preallocatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_orderedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_readf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seek_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seekf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_atomicityf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_viewf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_syncf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_orderedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_writef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filegeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fileseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-free_memf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_countf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elements_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elementsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_library_versionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_versionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getaddressf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getpnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_mapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graphdims_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqcompletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqstartf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbcountf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbrsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_comparef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_exclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_inclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_unionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupdifff.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupinterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprexclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprinclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouptranksf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallreducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibarrierf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibcastf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iccreatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-icmergef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iexscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-improbef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-imrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_setf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognthkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infovallenf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initializedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initthreadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iprobef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscattervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-issendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isthrmainf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-lookup_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mprobef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_commutativef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-open_portf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_externalf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packesizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pcontrolf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-probef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-publish_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-putf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-query_threadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-raccumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recv_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-redscatf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_localf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-register_datarepf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reqgetstatf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-request_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rget_accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rgetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rputf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scattervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-send_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sndrcvrplf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-spawnmultf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statgetclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statsetelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-status_set_elements_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testanyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testcancelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testsomef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-topo_testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_commitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_create_hindexed_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_extentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_extent_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_true_extent_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hindexedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hvectorf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_indexedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_lbf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_match_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_size_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_structf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_ubf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_vectorf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechindf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechvecf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecindbf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecontigf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecresizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecstructf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecsubarrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedarrayf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typefreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetcntsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetenvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetextentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegtextf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typenewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackextf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpubnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitanyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitsomef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocate_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_attachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_completef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_create_dynamicf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_detachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_fencef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_local_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_localf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flushf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lock_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_postf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_shared_queryf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_startf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_syncf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlock_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_waitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-windelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winfreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wingeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winnewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtickf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtimef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-fdebug.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-setbot.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusc2f.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusf2c.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-abortf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrclassf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrcodef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrstringf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-addressf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_addf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_difff.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alloc_memf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allreducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_putf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-barrierf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bcastf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufattachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufdetachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cancelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_coordsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_mapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_shiftf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_subf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cartdim_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-close_portf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_acceptf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_agreef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_comparef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_connectf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_create_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_ackf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_ackedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_idupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_joinf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_revokef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_shrinkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_spawnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_split_typef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_splitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdiscf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commfreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgetnamf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commnewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commparentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrgroupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrsizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commtesticf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-compare_and_swapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dims_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_create_adjacentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighbors_countf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighborsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_comm_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_type_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_win_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhcreatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhfreef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhgetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhsetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_classf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_stringf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-exscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fdebug.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fetch_and_opf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_closef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_amodef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_atomicityf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_byte_offsetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_position_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_positionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_type_extentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_viewf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_ireadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwritef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_openf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_preallocatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_orderedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_readf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seek_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seekf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_atomicityf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_viewf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_syncf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_orderedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_writef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filegeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fileseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-free_memf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_countf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elements_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elementsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_library_versionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_versionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getaddressf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getpnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_mapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graphdims_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqcompletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqstartf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbcountf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbrsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_comparef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_exclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_inclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_unionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupdifff.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupinterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprexclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprinclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouptranksf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallreducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibarrierf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibcastf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iccreatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-icmergef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iexscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-improbef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-imrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_setf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognthkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infovallenf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initializedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initthreadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iprobef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscattervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-issendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isthrmainf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-lookup_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mprobef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_commutativef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-open_portf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_externalf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packesizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pcontrolf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-probef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-publish_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-putf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-query_threadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-raccumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recv_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-redscatf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_localf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-register_datarepf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reqgetstatf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-request_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rget_accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rgetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rputf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scattervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-send_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-setbot.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sndrcvrplf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-spawnmultf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statgetclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statsetelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-status_set_elements_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusc2f.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusf2c.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testanyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testcancelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testsomef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-topo_testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_commitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_extentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_extent_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hindexedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hvectorf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_indexedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_lbf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_match_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_size_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_structf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_ubf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_vectorf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechindf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechvecf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecindbf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecontigf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecresizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecstructf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecsubarrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedarrayf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typefreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetcntsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetenvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetextentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegtextf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typenewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackextf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpubnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitanyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitsomef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocate_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_attachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_completef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_create_dynamicf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_detachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_fencef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_local_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_localf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flushf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lock_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_postf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_shared_queryf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_startf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_syncf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlock_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_waitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-windelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winfreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wingeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winnewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtickf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtimef.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90cmplxf.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90intf.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90realf.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_complex.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_int.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_real.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_util.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_complex.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_int.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_real.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_util.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-accumulate_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allreduce_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoall_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallw_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bcast_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-buffer_attach_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_c.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_multiple_c.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-compare_and_swap_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-exscan_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-f_sync_reg_c.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-fetch_and_op_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_shared_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_shared_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_shared_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_shared_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-free_mem_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_accumulate_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_address_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallreduce_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoall_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallw_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibcast_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibsend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iexscan_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-imrecv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoall_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallw_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irecv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_block_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irsend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscan_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatter_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatterv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-isend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-issend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-mrecv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoall_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallw_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_external_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-put_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-raccumulate_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_local_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_block_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_accumulate_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rput_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scan_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatter_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatterv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_replace_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_external_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-utils.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_attach_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_create_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_detach_cdesc.Plo + -rm -f src/env/$(DEPDIR)/mpichversion.Po + -rm -f src/env/$(DEPDIR)/mpivars.Po + -rm -f src/glue/romio/$(DEPDIR)/lib_libmpi_la-all_romio_symbols.Plo + -rm -f src/glue/romio/$(DEPDIR)/lib_libmpi_la-glue_romio.Plo + -rm -f src/glue/romio/$(DEPDIR)/lib_libpmpi_la-all_romio_symbols.Plo + -rm -f src/glue/romio/$(DEPDIR)/lib_libpmpi_la-glue_romio.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_delete.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_get.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_put.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attrutil.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-dup_fn.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_create.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_free.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_delete.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_get.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_put.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attrutil.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-dup_fn.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_create.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_free.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_set_attr.Plo + -rm -f src/mpi/coll/$(DEPDIR)/lib_libmpi_la-helper_fns.Plo + -rm -f src/mpi/coll/$(DEPDIR)/lib_libmpi_la-nbcutil.Plo + -rm -f src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-helper_fns.Plo + -rm -f src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-nbcutil.Plo + -rm -f src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libmpi_la-recexchalgo.Plo + -rm -f src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libpmpi_la-recexchalgo.Plo + -rm -f src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libmpi_la-stubalgo.Plo + -rm -f src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libpmpi_la-stubalgo.Plo + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treealgo.Plo + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treeutil.Plo + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treealgo.Plo + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treeutil.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_allcomm_nb.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_brucks.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_ring.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_allcomm_nb.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_brucks.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_ring.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_brucks.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_ring.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_brucks.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_ring.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_allcomm_nb.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_smp.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_allcomm_nb.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_smp.Plo + -rm -f src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libmpi_la-allreduce_group.Plo + -rm -f src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libpmpi_la-allreduce_group.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_brucks.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_scattered.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_brucks.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_scattered.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_scattered.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_scattered.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_scattered.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_scattered.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_allcomm_nb.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_inter_bcast.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_dissemination.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_smp.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_allcomm_nb.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_inter_bcast.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_dissemination.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_smp.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_allcomm_nb.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_inter_remote_send_local_bcast.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_binomial.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_ring_allgather.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_smp.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_utils.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_allcomm_nb.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_binomial.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_smp.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_utils.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_allcomm_nb.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_allcomm_nb.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_allcomm_nb.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_linear.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_local_gather_remote_send.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_intra_binomial.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_allcomm_nb.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_linear.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_local_gather_remote_send.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_intra_binomial.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_gentran_algos.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_brucks.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_ring.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_ring.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_gentran_algos.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_brucks.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_ring.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_gentran_algos.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_brucks.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_utils.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_gentran_algos.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_brucks.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_utils.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_gentran_algos.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_tree.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_naive.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_smp.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_gentran_algos.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_tree.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_naive.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_smp.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_gentran_algos.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_brucks.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_pairwise.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_gentran_algos.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_brucks.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_pairwise.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_gentran_algos.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_blocked.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_gentran_scattered.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_gentran_algos.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_blocked.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_blocked.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_blocked.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_inplace.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_inter_bcast.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_inter_bcast.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_gentran_algos.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_inter_flat.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_binomial.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_tree.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_smp.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_utils.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_gentran_algos.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_inter_flat.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_binomial.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_tree.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_smp.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_utils.Plo + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan.Plo + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan.Plo + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_gentran_algos.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_long.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_short.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_binomial.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_gentran_tree.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_gentran_algos.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_long.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_short.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_binomial.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_gentran_tree.Plo + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv.Plo + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv.Plo + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_binomial.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_tree.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_smp.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_binomial.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_tree.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_smp.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_noncommutative.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_pairwise.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_pairwise.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_gentran_algos.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_smp.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_gentran_algos.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_smp.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_gentran_algos.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_linear.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_binomial.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_gentran_tree.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_gentran_algos.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_linear.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_binomial.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_gentran_tree.Plo + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv.Plo + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv_allcomm_linear.Plo + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv.Plo + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv_allcomm_linear.Plo + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather.Plo + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather.Plo + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv.Plo + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv.Plo + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall.Plo + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall.Plo + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv.Plo + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv.Plo + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw.Plo + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw.Plo + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_commutative.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_create.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_free.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opband.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbxor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opland.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplxor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmax.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmaxloc.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmin.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opminloc.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opno_op.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opprod.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opreplace.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opsum.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_commutative.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_create.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_free.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opband.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbxor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opland.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplxor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmax.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmaxloc.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmin.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opminloc.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opno_op.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opprod.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opreplace.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opsum.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_inter_local_reduce_remote_send.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_binomial.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_reduce_scatter_gather.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_smp.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_binomial.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_smp.Plo + -rm -f src/mpi/coll/reduce_local/$(DEPDIR)/lib_libmpi_la-reduce_local.Plo + -rm -f src/mpi/coll/reduce_local/$(DEPDIR)/lib_libpmpi_la-reduce_local.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_noncommutative.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_pairwise.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_halving.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_noncommutative.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_pairwise.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_pairwise.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_allcomm_nb.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_smp.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_allcomm_nb.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_smp.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_allcomm_nb.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_linear.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_remote_send_local_scatter.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_intra_binomial.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_allcomm_nb.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_linear.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_intra_binomial.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_linear.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_nb.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_linear.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_nb.Plo + -rm -f src/mpi/coll/src/$(DEPDIR)/lib_libmpi_la-coll_impl.Plo + -rm -f src/mpi/coll/src/$(DEPDIR)/lib_libpmpi_la-coll_impl.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_impl.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_utils.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-tsp_gentran.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_impl.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_utils.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-tsp_gentran.Plo + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-stubtran_impl.Plo + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-tsp_stubtran.Plo + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-stubtran_impl.Plo + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-tsp_stubtran.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_agree.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_compare.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup_with_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_ack.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_get_acked.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_free.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_name.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_idup.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_rank.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_size.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_revoke.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_name.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_shrink.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_size.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split_type.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_test_inter.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-commutil.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-contextid.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_create.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_merge.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_agree.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_compare.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_ack.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_acked.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_free.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_name.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_idup.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_rank.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_size.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_revoke.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_name.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_shrink.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_size.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split_type.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_test_inter.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-commutil.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-contextid.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_create.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_merge.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-address.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-ext32_datatype.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_address.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_count.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_blockindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_commit.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_contiguous.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_darray.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed_block.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hvector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_indexed_block.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_pairtype.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_resized.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_struct.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_subarray.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_debug.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_dup.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_free.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_contents.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_envelope.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_name.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hvector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_indexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_lb.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_match_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_set_name.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_struct.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_ub.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_vector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-typeutil.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack_external.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-address.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-ext32_datatype.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_address.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_count.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_blockindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_commit.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_contiguous.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_darray.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_block.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hvector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_indexed_block.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_pairtype.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_resized.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_struct.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_subarray.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_debug.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_dup.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_free.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_contents.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_envelope.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_name.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hvector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_indexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_lb.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_match_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_set_name.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_struct.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_ub.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_vector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-typeutil.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack_external.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-darray_support.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_blockindexed.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_contig.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_indexed.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_struct.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_vector.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_debug.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-looputil.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_count.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_flatten.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-subarray_support.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-darray_support.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_blockindexed.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_contig.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_indexed.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_struct.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_vector.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_debug.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-looputil.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_count.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_flatten.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-subarray_support.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_create.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_debug.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_flatten.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_iov.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack_external.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_create.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_debug.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_flatten.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_iov.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack_external.Plo + -rm -f src/mpi/debugger/$(DEPDIR)/lib_libtvmpich_la-dll_mpich.Plo + -rm -f src/mpi/debugger/$(DEPDIR)/libdbginitdummy_la-dbginit.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_class.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_code.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_string.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-dynerrutil.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_create.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_free.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_get.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_set.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_class.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_string.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errutil.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_class.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_code.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_string.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-dynerrutil.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_create.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_free.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_get.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_set.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_class.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_string.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errutil.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_set_errhandler.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_compare.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_difference.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_excl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_free.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_incl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_intersection.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_excl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_incl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_rank.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_size.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_translate_ranks.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_union.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-grouputil.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_compare.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_difference.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_excl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_free.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_incl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_intersection.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_excl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_incl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_rank.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_size.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_translate_ranks.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_union.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-grouputil.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_create.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_delete.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_dup.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_free.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_get.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getn.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getnth.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getvallen.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_set.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-infoutil.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_create.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_delete.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_dup.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_free.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_get.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getn.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getnth.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getvallen.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_set.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-infoutil.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-abort.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-async.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalize.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalized.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-init.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-initialized.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-initinfo.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-initthread.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-ismain.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-netloc_util.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-querythread.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-abort.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-async.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalize.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalized.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-init.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initialized.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initinfo.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initthread.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-ismain.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-netloc_util.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-querythread.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_add.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_diff.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-getpname.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-library_version.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-pcontrol.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-utils.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-version.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_add.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_diff.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-getpname.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-library_version.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-pcontrol.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-utils.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-version.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsendutil.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bufattach.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-buffree.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ibsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-improbe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-imrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-iprobe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-isend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-issend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mprobe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-probe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv_rep.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsendutil.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bufattach.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-buffree.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ibsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-improbe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-imrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-iprobe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-isend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-issend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mprobe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-probe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv_rep.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend_init.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-cancel.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_complete.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_start.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-mpir_request.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_free.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_get_status.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-start.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-startall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-status_set_cancelled.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-test.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-test_cancelled.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-testall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-testany.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-testsome.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-wait.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitany.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitsome.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-cancel.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_complete.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_start.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-mpir_request.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_free.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_get_status.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-start.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-startall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-status_set_cancelled.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test_cancelled.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testany.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testsome.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-wait.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitany.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitsome.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-alloc_mem.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-compare_and_swap.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-fetch_and_op.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-free_mem.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get_accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-put.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-raccumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget_accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rmatypeutil.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rput.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate_shared.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_attach.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_complete.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create_dynamic.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_detach.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_fence.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_free.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_group.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_info.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_name.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_post.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_info.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_name.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_shared_query.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_start.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_sync.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_test.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_wait.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-winutil.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-alloc_mem.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-compare_and_swap.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-fetch_and_op.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-free_mem.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get_accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-put.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-raccumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget_accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rmatypeutil.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rput.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate_shared.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_attach.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_complete.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create_dynamic.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_detach.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_fence.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_free.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_group.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_info.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_name.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_post.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_info.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_name.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_shared_query.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_start.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_sync.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_test.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_wait.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-winutil.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-close_port.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_accept.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_connect.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_disconnect.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_get_parent.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_join.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn_multiple.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-lookup_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-open_port.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-publish_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-unpublish_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-close_port.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_accept.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_connect.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_disconnect.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_get_parent.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_join.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn_multiple.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-lookup_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-open_port.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-publish_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-unpublish_name.Plo + -rm -f src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtick.Plo + -rm -f src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtime.Plo + -rm -f src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtick.Plo + -rm -f src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtime.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_coords.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_map.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_rank.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_shift.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_sub.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cartdim_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dims_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create_adj.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb_count.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_map.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_nbr.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphcreate.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphdimsget.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphnbrcnt.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topo_test.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topoutil.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_coords.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_map.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_rank.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_shift.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_sub.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cartdim_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dims_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create_adj.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb_count.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_map.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_nbr.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphcreate.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphdimsget.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphnbrcnt.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topo_test.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topoutil.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_changed.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_categories.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_cvars.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_pvars.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_alloc.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_read.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_write.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_item.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_finalize.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_initthread.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_alloc.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_read.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_readreset.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_reset.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_create.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_start.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_stop.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_write.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_changed.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_categories.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_cvars.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_pvars.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_alloc.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_read.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_write.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_item.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_finalize.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_initthread.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_alloc.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_read.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_readreset.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_reset.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_create.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_start.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_stop.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_write.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libmpi_la-none.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libpmpi_la-none.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_cm.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_data.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_msg.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_progress.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_tagged.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_cm.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_data.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_msg.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_progress.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_tagged.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-socksm.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_ckpt.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_getip.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_send.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_utility.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-socksm.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_ckpt.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_getip.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_send.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_utility.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_rma_shm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_comm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_eagernoncontig.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_ckpt.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_debug.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt_shm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_mpich.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_net_array.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network_poll.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_rma_shm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_comm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_eagernoncontig.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_ckpt.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_debug.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt_shm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_mpich.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_net_array.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network_poll.Plo + -rm -f src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libmpi_la-papi_defs.Plo + -rm -f src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libpmpi_la-papi_defs.Plo + -rm -f src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libmpi_la-mkstemp.Plo + -rm -f src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libpmpi_la-mkstemp.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-sock.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-sock.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_buffer.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm_spawn_multiple.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eager.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eagersync.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_connection.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_op_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_pkt.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_revoke_pkt.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_send_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_port.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_recvq.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_request.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_ops.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_pkthandler.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_progress.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_reqops.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_sync.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rndv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_win_fns.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_abort.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_aint.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_recv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_send.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_disconnect.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_failure_ack.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_get_all_failed_procs.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_revoke.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_spawn_multiple.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_datatype.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_finalize.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_get_universe_size.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_getpname.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_improbe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_imrecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_init.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_iprobe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irsend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_isend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_issend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mprobe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mrecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_op.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_port.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_probe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_recv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rma.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rsend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_send.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_ssend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_startall.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_vc.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_isend_self.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_pg.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_printf.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_rma.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_buffer.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm_spawn_multiple.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eager.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eagersync.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_connection.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_op_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_pkt.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_revoke_pkt.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_send_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_port.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_recvq.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_request.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_ops.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_pkthandler.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_progress.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_reqops.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_sync.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rndv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_win_fns.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_abort.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_aint.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_recv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_send.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_disconnect.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_failure_ack.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_get_all_failed_procs.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_revoke.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_spawn_multiple.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_datatype.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_finalize.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_get_universe_size.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_getpname.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_improbe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_imrecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_init.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_iprobe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irsend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_isend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_issend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mprobe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mrecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_op.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_port.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_probe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_recv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rma.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rsend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_send.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_ssend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_startall.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_vc.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_isend_self.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_pg.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_printf.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_rma.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_connect_sock.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_getinterfaces.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_init_sock.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_connect_sock.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_getinterfaces.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_init_sock.Plo + -rm -f src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_globals.Plo + -rm -f src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_init.Plo + -rm -f src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_globals.Plo + -rm -f src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_init.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_comm.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_datatype.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_op.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_spawn.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_win.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-util.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_comm.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_datatype.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_op.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_spawn.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_win.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-util.Plo + -rm -f src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libmpi_la-netmod_impl.Plo + -rm -f src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libpmpi_la-netmod_impl.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_comm.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_datatype.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_init.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_op.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_spawn.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_win.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_comm.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_datatype.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_init.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_op.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_spawn.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_win.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_comm.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_datatype.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_init.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_op.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_spawn.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_win.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_comm.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_datatype.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_init.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_op.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_spawn.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_win.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_coll_init.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_comm.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_datatype.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_eager_array.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_init.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_op.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_spawn.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_win.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_coll_init.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_comm.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_datatype.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_eager_array.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_init.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_op.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_spawn.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_win.Plo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libmpi_la-release_gather.Plo + -rm -f src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libpmpi_la-release_gather.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_dpm.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_hooks.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_impl.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_init.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_mem.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_misc.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_rma.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree_util.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_dpm.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_hooks.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_impl.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_init.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_mem.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_misc.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_rma.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree_util.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_comm.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_init.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_spawn.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_win.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_comm.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_init.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_spawn.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals_default.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_globals.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_impl.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_init.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_spawn.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4i_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_buf.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_init.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_proc.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_recvq.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_origin_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_target_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_symheap.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-mpid_ch4_net_array.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals_default.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_globals.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_impl.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_init.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_spawn.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4i_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_buf.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_init.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_proc.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_recvq.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_origin_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_target_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_symheap.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-mpid_ch4_net_array.Plo + -rm -f src/mpid/common/bc/$(DEPDIR)/lib_libmpi_la-mpidu_bc.Plo + -rm -f src/mpid/common/bc/$(DEPDIR)/lib_libpmpi_la-mpidu_bc.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_dtypes.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_init.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_ops.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_rte.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_dtypes.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_init.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_ops.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_rte.Plo + -rm -f src/mpid/common/sched/$(DEPDIR)/lib_libmpi_la-mpidu_sched.Plo + -rm -f src/mpid/common/sched/$(DEPDIR)/lib_libpmpi_la-mpidu_sched.Plo + -rm -f src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_alloc.Plo + -rm -f src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_barrier.Plo + -rm -f src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_alloc.Plo + -rm -f src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_barrier.Plo + -rm -f src/nameserv/file/$(DEPDIR)/lib_libmpi_la-file_nameserv.Plo + -rm -f src/nameserv/file/$(DEPDIR)/lib_libpmpi_la-file_nameserv.Plo + -rm -f src/nameserv/pmi/$(DEPDIR)/lib_libmpi_la-pmi_nameserv.Plo + -rm -f src/nameserv/pmi/$(DEPDIR)/lib_libpmpi_la-pmi_nameserv.Plo + -rm -f src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Po + -rm -f src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Po + -rm -f src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Po + -rm -f src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Po + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-cmnargs.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-dbgiface.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-env.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-ioloop.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-labelout.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-newsession.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-pmiport.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-pmiserv.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-process.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-rm.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-simple_pmiutil2.Plo + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple2pmi.Plo + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple2pmi.Plo + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo + -rm -f src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmi.Plo + -rm -f src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo + -rm -f src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmi.Plo + -rm -f src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo + -rm -f src/util/assert/$(DEPDIR)/lib_libmpi_la-assert.Plo + -rm -f src/util/assert/$(DEPDIR)/lib_libpmpi_la-assert.Plo + -rm -f src/util/cvar/$(DEPDIR)/lib_libmpi_la-mpir_cvars.Plo + -rm -f src/util/cvar/$(DEPDIR)/lib_libpmpi_la-mpir_cvars.Plo + -rm -f src/util/mem/$(DEPDIR)/lib_libmpi_la-handlemem.Plo + -rm -f src/util/mem/$(DEPDIR)/lib_libmpi_la-strerror.Plo + -rm -f src/util/mem/$(DEPDIR)/lib_libpmpi_la-handlemem.Plo + -rm -f src/util/mem/$(DEPDIR)/lib_libpmpi_la-strerror.Plo + -rm -f src/util/procmap/$(DEPDIR)/lib_libmpi_la-local_proc.Plo + -rm -f src/util/procmap/$(DEPDIR)/lib_libpmpi_la-local_proc.Plo + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-local distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-data-local install-includeHEADERS \ + install-modincHEADERS install-nodist_includeHEADERS \ + install-nodist_pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-libLTLIBRARIES install-sysconfDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-recursive + +install-html-am: install-html-local + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: install-pdf-local + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f src/binding/cxx/$(DEPDIR)/initcxx.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-abortf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrclassf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrcodef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-adderrstringf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-addressf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_addf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-aint_difff.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alloc_memf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-allreducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-attr_putf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-barrierf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bcastf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufattachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-bufdetachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cancelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_coordsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_mapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_shiftf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cart_subf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-cartdim_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-close_portf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_acceptf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_agreef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_comparef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_connectf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_create_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dup_with_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_ackf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_failure_get_ackedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_idupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_joinf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_revokef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_set_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_shrinkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_spawnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_split_typef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-comm_splitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commcreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commdiscf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commfreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commgetnamf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commnewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commparentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrgroupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commrsizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-commtesticf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-compare_and_swapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dims_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_create_adjacentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighbors_countf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dist_graph_neighborsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_comm_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_type_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-dup_win_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhcreatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhfreef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhgetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-errhsetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_classf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-error_stringf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-exscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fetch_and_opf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_closef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_amodef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_atomicityf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_byte_offsetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_position_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_positionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_type_extentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_get_viewf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iread_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_ireadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwrite_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_iwritef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_openf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_preallocatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_orderedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_read_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_readf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seek_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_seekf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_atomicityf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_set_viewf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_syncf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_orderedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_write_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-file_writef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filecreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-filegeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-fileseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-finalizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-free_memf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-gathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_countf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elements_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_elementsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_library_versionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-get_versionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getaddressf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-getpnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graph_mapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-graphdims_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqcompletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-greqstartf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbcountf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grfnbrsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_comparef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_exclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_inclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-group_unionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupdifff.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-groupinterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprexclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouprinclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-grouptranksf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iallreducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ialltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibarrierf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibcastf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ibsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iccreatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-icmergef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iexscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-igathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-improbef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-imrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-info_setf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infognthkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-infovallenf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initializedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-initthreadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iprobef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireduce_scatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ireducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-irsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-iscattervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-issendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-isthrmainf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-keyval_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-lookup_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mprobef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-mrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_comm_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_type_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-null_win_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_commutativef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-op_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-open_portf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_externalf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pack_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packesizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-packf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-pcontrolf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-probef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-publish_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-putf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-query_threadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-raccumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recv_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-recvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-redscatf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_localf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-register_datarepf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-reqgetstatf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-request_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rget_accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rgetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rputf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-rsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-scattervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-send_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sendrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-sndrcvrplf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-spawnmultf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-ssendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-startf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statgetclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-statsetelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-status_set_elements_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testanyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testcancelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-testsomef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-topo_testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_commitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_create_hindexed_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_extentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_extent_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_get_true_extent_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hindexedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_hvectorf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_indexedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_lbf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_match_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_size_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_structf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_ubf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-type_vectorf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechindf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typechvecf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecindbf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecontigf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecresizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecstructf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typecsubarrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedarrayf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typedelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typefreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetcntsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetenvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegetextentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typegtextf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typenewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-typesetnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackextf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpackf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-unpubnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitanyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-waitsomef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocate_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_allocatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_attachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_completef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_create_dynamicf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_detachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_fencef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_local_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flush_localf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_flushf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_get_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lock_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_lockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_postf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_set_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_shared_queryf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_startf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_syncf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlock_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_unlockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-win_waitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wincreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-windelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winfreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wingeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winnewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-winseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtickf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpifort_la-wtimef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-fdebug.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-setbot.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusc2f.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libmpi_la-statusf2c.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-abortf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrclassf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrcodef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-adderrstringf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-addressf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_addf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-aint_difff.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alloc_memf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-allreducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-attr_putf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-barrierf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bcastf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufattachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-bufdetachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cancelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_coordsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_mapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_shiftf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cart_subf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-cartdim_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-close_portf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_acceptf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_agreef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_comparef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_connectf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_create_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_ackf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_ackedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_idupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_joinf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_revokef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_set_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_shrinkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_spawnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_split_typef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-comm_splitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commcreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commdiscf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commfreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commgetnamf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commnewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commparentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrgroupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commrsizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-commtesticf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-compare_and_swapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dims_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_create_adjacentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighbors_countf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dist_graph_neighborsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_comm_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_type_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-dup_win_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhcreatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhfreef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhgetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-errhsetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_classf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-error_stringf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-exscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fdebug.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fetch_and_opf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_closef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_amodef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_atomicityf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_byte_offsetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_position_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_positionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_type_extentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_get_viewf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iread_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_ireadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwrite_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_iwritef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_openf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_preallocatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_ordered_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_orderedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_read_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_readf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seek_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_seekf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_atomicityf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_set_viewf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_syncf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_all_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_at_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_atf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_beginf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_ordered_endf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_orderedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_write_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-file_writef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filecreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-filegeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-fileseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-finalizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-free_memf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-gathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_countf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elements_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_elementsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_library_versionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-get_versionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getaddressf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-getpnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graph_mapf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-graphdims_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqcompletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-greqstartf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbcountf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grfnbrsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_comparef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_exclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_inclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_rankf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-group_unionf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupdifff.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-groupinterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprexclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouprinclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-grouptranksf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iallreducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ialltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibarrierf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibcastf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ibsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iccreatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-icmergef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iexscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-igathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-improbef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-imrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_deletef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_getf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-info_setf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infognthkf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-infovallenf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initializedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-initthreadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iprobef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireduce_scatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ireducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-irsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-iscattervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-issendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-isthrmainf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-keyval_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-lookup_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mprobef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-mrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_allgathervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallwf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_comm_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_type_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_copy_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-null_win_del_fnf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_commutativef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-op_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-open_portf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_externalf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pack_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packesizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-packf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-pcontrolf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-probef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-publish_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-putf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-query_threadf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-raccumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recv_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-recvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-redscatf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_localf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reducef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-register_datarepf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-reqgetstatf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-request_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rget_accumulatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rgetf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rputf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-rsendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scanf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scatterf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-scattervf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-send_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sendrecvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-setbot.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-sndrcvrplf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-spawnmultf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssend_initf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-ssendf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-startf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statgetclf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statsetelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-status_set_elements_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusc2f.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-statusf2c.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testanyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testcancelf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-testsomef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-topo_testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_commitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_blockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_dupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_extentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_extent_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hindexedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_hvectorf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_indexedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_lbf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_match_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_size_xf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_sizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_structf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_ubf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-type_vectorf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechindf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typechvecf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecindbf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecontigf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecresizef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecstructf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typecsubarrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedarrayf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typedelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typefreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetcntsf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetenvf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegetextentf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typegtextf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typenewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-typesetnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackextf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpackf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-unpubnamef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitallf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitanyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-waitsomef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocate_sharedf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_allocatef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_attachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_completef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_create_dynamicf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_createf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_detachf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_fencef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_local_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flush_localf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_flushf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_freef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_groupf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_get_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lock_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_lockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_postf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_attrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_infof.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_set_namef.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_shared_queryf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_startf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_syncf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_testf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlock_allf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_unlockf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-win_waitf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincallerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wincreerrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-windelattrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winfreekeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wingeterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winnewkeyf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-winseterrf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtickf.Plo + -rm -f src/binding/fortran/mpif_h/$(DEPDIR)/lib_libpmpi_la-wtimef.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90cmplxf.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90intf.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpifort_la-typef90realf.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_complex.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_int.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_real.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libmpi_la-create_f90_util.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_complex.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_int.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_real.Plo + -rm -f src/binding/fortran/use_mpi/$(DEPDIR)/lib_libpmpi_la-create_f90_util.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-accumulate_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allgatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-allreduce_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoall_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-alltoallw_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bcast_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-bsend_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-buffer_attach_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_c.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-comm_spawn_multiple_c.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-compare_and_swap_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-exscan_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-f_sync_reg_c.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-fetch_and_op_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_at_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iread_shared_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_at_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_iwrite_shared_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_all_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_all_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_at_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_ordered_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_read_shared_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_all_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_all_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_at_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_begin_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_ordered_end_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-file_write_shared_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-free_mem_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-gatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_accumulate_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_address_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-get_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallgatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iallreduce_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoall_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ialltoallw_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibcast_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ibsend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iexscan_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-igatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-imrecv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_allgatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoall_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ineighbor_alltoallw_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irecv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_block_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ireduce_scatter_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-irsend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscan_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatter_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-iscatterv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-isend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-issend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-mrecv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgather_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_allgatherv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoall_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-neighbor_alltoallw_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-pack_external_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-put_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-raccumulate_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-recv_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_local_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_block_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-reduce_scatter_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_accumulate_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rget_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rput_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-rsend_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scan_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatter_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-scatterv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-send_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-sendrecv_replace_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-ssend_init_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-unpack_external_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-utils.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_attach_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_create_cdesc.Plo + -rm -f src/binding/fortran/use_mpi_f08/wrappers_c/$(DEPDIR)/lib_libmpifort_la-win_detach_cdesc.Plo + -rm -f src/env/$(DEPDIR)/mpichversion.Po + -rm -f src/env/$(DEPDIR)/mpivars.Po + -rm -f src/glue/romio/$(DEPDIR)/lib_libmpi_la-all_romio_symbols.Plo + -rm -f src/glue/romio/$(DEPDIR)/lib_libmpi_la-glue_romio.Plo + -rm -f src/glue/romio/$(DEPDIR)/lib_libpmpi_la-all_romio_symbols.Plo + -rm -f src/glue/romio/$(DEPDIR)/lib_libpmpi_la-glue_romio.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_delete.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_get.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attr_put.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-attrutil.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-comm_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-dup_fn.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_create.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-keyval_free.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-type_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libmpi_la-win_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_delete.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_get.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attr_put.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-attrutil.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-comm_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-dup_fn.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_create.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-keyval_free.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-type_set_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_create_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_delete_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_free_keyval.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_get_attr.Plo + -rm -f src/mpi/attr/$(DEPDIR)/lib_libpmpi_la-win_set_attr.Plo + -rm -f src/mpi/coll/$(DEPDIR)/lib_libmpi_la-helper_fns.Plo + -rm -f src/mpi/coll/$(DEPDIR)/lib_libmpi_la-nbcutil.Plo + -rm -f src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-helper_fns.Plo + -rm -f src/mpi/coll/$(DEPDIR)/lib_libpmpi_la-nbcutil.Plo + -rm -f src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libmpi_la-recexchalgo.Plo + -rm -f src/mpi/coll/algorithms/recexchalgo/$(DEPDIR)/lib_libpmpi_la-recexchalgo.Plo + -rm -f src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libmpi_la-stubalgo.Plo + -rm -f src/mpi/coll/algorithms/stubalgo/$(DEPDIR)/lib_libpmpi_la-stubalgo.Plo + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treealgo.Plo + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libmpi_la-treeutil.Plo + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treealgo.Plo + -rm -f src/mpi/coll/algorithms/treealgo/$(DEPDIR)/lib_libpmpi_la-treeutil.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_allcomm_nb.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_inter_local_gather_remote_bcast.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_brucks.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libmpi_la-allgather_intra_ring.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_allcomm_nb.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_inter_local_gather_remote_bcast.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_brucks.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allgather/$(DEPDIR)/lib_libpmpi_la-allgather_intra_ring.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_brucks.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libmpi_la-allgatherv_intra_ring.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_inter_remote_gather_local_bcast.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_brucks.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allgatherv/$(DEPDIR)/lib_libpmpi_la-allgatherv_intra_ring.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_allcomm_nb.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_inter_reduce_exchange_bcast.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_reduce_scatter_allgather.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libmpi_la-allreduce_intra_smp.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_allcomm_nb.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_inter_reduce_exchange_bcast.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_reduce_scatter_allgather.Plo + -rm -f src/mpi/coll/allreduce/$(DEPDIR)/lib_libpmpi_la-allreduce_intra_smp.Plo + -rm -f src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libmpi_la-allreduce_group.Plo + -rm -f src/mpi/coll/allreduce_group/$(DEPDIR)/lib_libpmpi_la-allreduce_group.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_brucks.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libmpi_la-alltoall_intra_scattered.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_brucks.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoall/$(DEPDIR)/lib_libpmpi_la-alltoall_intra_scattered.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libmpi_la-alltoallv_intra_scattered.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoallv/$(DEPDIR)/lib_libpmpi_la-alltoallv_intra_scattered.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libmpi_la-alltoallw_intra_scattered.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_allcomm_nb.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_pairwise_sendrecv_replace.Plo + -rm -f src/mpi/coll/alltoallw/$(DEPDIR)/lib_libpmpi_la-alltoallw_intra_scattered.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_allcomm_nb.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_inter_bcast.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_dissemination.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libmpi_la-barrier_intra_smp.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_allcomm_nb.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_inter_bcast.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_dissemination.Plo + -rm -f src/mpi/coll/barrier/$(DEPDIR)/lib_libpmpi_la-barrier_intra_smp.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_allcomm_nb.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_inter_remote_send_local_bcast.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_binomial.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_scatter_ring_allgather.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_intra_smp.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libmpi_la-bcast_utils.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_allcomm_nb.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_inter_remote_send_local_bcast.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_binomial.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_recursive_doubling_allgather.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_scatter_ring_allgather.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_intra_smp.Plo + -rm -f src/mpi/coll/bcast/$(DEPDIR)/lib_libpmpi_la-bcast_utils.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_allcomm_nb.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libmpi_la-exscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_allcomm_nb.Plo + -rm -f src/mpi/coll/exscan/$(DEPDIR)/lib_libpmpi_la-exscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_allcomm_nb.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_linear.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_inter_local_gather_remote_send.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libmpi_la-gather_intra_binomial.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_allcomm_nb.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_linear.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_inter_local_gather_remote_send.Plo + -rm -f src/mpi/coll/gather/$(DEPDIR)/lib_libpmpi_la-gather_intra_binomial.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libmpi_la-gatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/gatherv/$(DEPDIR)/lib_libpmpi_la-gatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_gentran_algos.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_inter_local_gather_remote_bcast.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_brucks.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_doubling.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_recexch_halving.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_gentran_ring.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libmpi_la-iallgather_intra_ring.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_gentran_algos.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_inter_local_gather_remote_bcast.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_brucks.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_doubling.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_recexch_halving.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_gentran_ring.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallgather/$(DEPDIR)/lib_libpmpi_la-iallgather_intra_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_gentran_algos.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_brucks.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_gentran_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_intra_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libmpi_la-iallgatherv_utils.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_gentran_algos.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_inter_remote_gather_local_bcast.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_brucks.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_doubling.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_recexch_halving.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_gentran_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_intra_ring.Plo + -rm -f src/mpi/coll/iallgatherv/$(DEPDIR)/lib_libpmpi_la-iallgatherv_utils.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_gentran_algos.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_gentran_tree.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_naive.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libmpi_la-iallreduce_intra_smp.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_gentran_algos.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_inter_remote_reduce_local_bcast.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_multiple_buffer.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_recexch_single_buffer.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_gentran_tree.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_naive.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_reduce_scatter_allgather.Plo + -rm -f src/mpi/coll/iallreduce/$(DEPDIR)/lib_libpmpi_la-iallreduce_intra_smp.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_gentran_algos.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_brucks.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_pairwise.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libmpi_la-ialltoall_intra_permuted_sendrecv.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_gentran_algos.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_brucks.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_brucks.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_pairwise.Plo + -rm -f src/mpi/coll/ialltoall/$(DEPDIR)/lib_libpmpi_la-ialltoall_intra_permuted_sendrecv.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_gentran_algos.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_blocked.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_gentran_scattered.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libmpi_la-ialltoallv_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_gentran_algos.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_blocked.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_gentran_scattered.Plo + -rm -f src/mpi/coll/ialltoallv/$(DEPDIR)/lib_libpmpi_la-ialltoallv_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_blocked.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libmpi_la-ialltoallw_intra_inplace.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_inter_pairwise_exchange.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_blocked.Plo + -rm -f src/mpi/coll/ialltoallw/$(DEPDIR)/lib_libpmpi_la-ialltoallw_intra_inplace.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_inter_bcast.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libmpi_la-ibarrier_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_inter_bcast.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ibarrier/$(DEPDIR)/lib_libpmpi_la-ibarrier_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_gentran_algos.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_inter_flat.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_binomial.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_gentran_tree.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_scatter_ring_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_intra_smp.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libmpi_la-ibcast_utils.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_gentran_algos.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_inter_flat.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_binomial.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_scatter_recexch_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_gentran_tree.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_recursive_doubling_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_scatter_ring_allgather.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_intra_smp.Plo + -rm -f src/mpi/coll/ibcast/$(DEPDIR)/lib_libpmpi_la-ibcast_utils.Plo + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan.Plo + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/lib_libmpi_la-iexscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan.Plo + -rm -f src/mpi/coll/iexscan/$(DEPDIR)/lib_libpmpi_la-iexscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_gentran_algos.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_long.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_inter_short.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_binomial.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libmpi_la-igather_intra_gentran_tree.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_gentran_algos.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_long.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_inter_short.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_binomial.Plo + -rm -f src/mpi/coll/igather/$(DEPDIR)/lib_libpmpi_la-igather_intra_gentran_tree.Plo + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv.Plo + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/lib_libmpi_la-igatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv.Plo + -rm -f src/mpi/coll/igatherv/$(DEPDIR)/lib_libpmpi_la-igatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libmpi_la-ineighbor_allgather_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgather/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgather_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-ineighbor_allgatherv_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-ineighbor_allgatherv_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoall_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoall_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallv_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallv_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-ineighbor_alltoallw_gentran_algos.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_gentran_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_allcomm_linear.Plo + -rm -f src/mpi/coll/ineighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-ineighbor_alltoallw_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_inter_local_reduce_remote_send.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_binomial.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_gentran_tree.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_reduce_scatter_gather.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libmpi_la-ireduce_intra_smp.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_inter_local_reduce_remote_send.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_binomial.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_ring.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_gentran_tree.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_reduce_scatter_gather.Plo + -rm -f src/mpi/coll/ireduce/$(DEPDIR)/lib_libpmpi_la-ireduce_intra_smp.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_noncommutative.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_pairwise.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_intra_recursive_halving.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_inter_remote_reduce_local_scatterv.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_noncommutative.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_pairwise.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ireduce_scatter/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_intra_recursive_halving.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_noncommutative.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_pairwise.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_gentran_algos.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_inter_remote_reduce_local_scatterv.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_gentran_recexch.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_noncommutative.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_pairwise.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/ireduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-ireduce_scatter_block_intra_recursive_halving.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_gentran_algos.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_gentran_recursive_doubling.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libmpi_la-iscan_intra_smp.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_gentran_algos.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_gentran_recursive_doubling.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/iscan/$(DEPDIR)/lib_libpmpi_la-iscan_intra_smp.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_gentran_algos.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_linear.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_inter_remote_send_local_scatter.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_binomial.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libmpi_la-iscatter_intra_gentran_tree.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_gentran_algos.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_linear.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_inter_remote_send_local_scatter.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_binomial.Plo + -rm -f src/mpi/coll/iscatter/$(DEPDIR)/lib_libpmpi_la-iscatter_intra_gentran_tree.Plo + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv.Plo + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/lib_libmpi_la-iscatterv_allcomm_linear.Plo + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv.Plo + -rm -f src/mpi/coll/iscatterv/$(DEPDIR)/lib_libpmpi_la-iscatterv_allcomm_linear.Plo + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather.Plo + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libmpi_la-neighbor_allgather_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather.Plo + -rm -f src/mpi/coll/neighbor_allgather/$(DEPDIR)/lib_libpmpi_la-neighbor_allgather_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv.Plo + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libmpi_la-neighbor_allgatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv.Plo + -rm -f src/mpi/coll/neighbor_allgatherv/$(DEPDIR)/lib_libpmpi_la-neighbor_allgatherv_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall.Plo + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libmpi_la-neighbor_alltoall_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall.Plo + -rm -f src/mpi/coll/neighbor_alltoall/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoall_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv.Plo + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallv_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv.Plo + -rm -f src/mpi/coll/neighbor_alltoallv/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallv_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw.Plo + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libmpi_la-neighbor_alltoallw_allcomm_nb.Plo + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw.Plo + -rm -f src/mpi/coll/neighbor_alltoallw/$(DEPDIR)/lib_libpmpi_la-neighbor_alltoallw_allcomm_nb.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_commutative.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_create.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-op_free.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opband.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opbxor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opland.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-oplxor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmax.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmaxloc.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opmin.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opminloc.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opno_op.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opprod.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opreplace.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libmpi_la-opsum.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_commutative.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_create.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-op_free.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opband.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opbxor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opland.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-oplxor.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmax.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmaxloc.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opmin.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opminloc.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opno_op.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opprod.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opreplace.Plo + -rm -f src/mpi/coll/op/$(DEPDIR)/lib_libpmpi_la-opsum.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_inter_local_reduce_remote_send.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_binomial.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_reduce_scatter_gather.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libmpi_la-reduce_intra_smp.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_inter_local_reduce_remote_send.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_binomial.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_reduce_scatter_gather.Plo + -rm -f src/mpi/coll/reduce/$(DEPDIR)/lib_libpmpi_la-reduce_intra_smp.Plo + -rm -f src/mpi/coll/reduce_local/$(DEPDIR)/lib_libmpi_la-reduce_local.Plo + -rm -f src/mpi/coll/reduce_local/$(DEPDIR)/lib_libpmpi_la-reduce_local.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_noncommutative.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_pairwise.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libmpi_la-reduce_scatter_intra_recursive_halving.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_inter_remote_reduce_local_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_noncommutative.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_pairwise.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/reduce_scatter/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_intra_recursive_halving.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_noncommutative.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_pairwise.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libmpi_la-reduce_scatter_block_intra_recursive_halving.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_allcomm_nb.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_inter_remote_reduce_local_scatter.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_noncommutative.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_pairwise.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/reduce_scatter_block/$(DEPDIR)/lib_libpmpi_la-reduce_scatter_block_intra_recursive_halving.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_allcomm_nb.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libmpi_la-scan_intra_smp.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_allcomm_nb.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_recursive_doubling.Plo + -rm -f src/mpi/coll/scan/$(DEPDIR)/lib_libpmpi_la-scan_intra_smp.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_allcomm_nb.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_linear.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_inter_remote_send_local_scatter.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libmpi_la-scatter_intra_binomial.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_allcomm_nb.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_linear.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_inter_remote_send_local_scatter.Plo + -rm -f src/mpi/coll/scatter/$(DEPDIR)/lib_libpmpi_la-scatter_intra_binomial.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_linear.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libmpi_la-scatterv_allcomm_nb.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_linear.Plo + -rm -f src/mpi/coll/scatterv/$(DEPDIR)/lib_libpmpi_la-scatterv_allcomm_nb.Plo + -rm -f src/mpi/coll/src/$(DEPDIR)/lib_libmpi_la-coll_impl.Plo + -rm -f src/mpi/coll/src/$(DEPDIR)/lib_libpmpi_la-coll_impl.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_impl.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-gentran_utils.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libmpi_la-tsp_gentran.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_impl.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-gentran_utils.Plo + -rm -f src/mpi/coll/transports/gentran/$(DEPDIR)/lib_libpmpi_la-tsp_gentran.Plo + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-stubtran_impl.Plo + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libmpi_la-tsp_stubtran.Plo + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-stubtran_impl.Plo + -rm -f src/mpi/coll/transports/stubtran/$(DEPDIR)/lib_libpmpi_la-tsp_stubtran.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_agree.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_compare.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_create_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_dup_with_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_ack.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_failure_get_acked.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_free.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_get_name.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_idup.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_rank.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_remote_size.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_revoke.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_set_name.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_shrink.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_size.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_split_type.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-comm_test_inter.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-commutil.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-contextid.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_create.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libmpi_la-intercomm_merge.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_agree.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_compare.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_create_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_dup_with_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_ack.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_failure_get_acked.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_free.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_get_name.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_idup.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_rank.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_group.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_remote_size.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_revoke.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_info.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_set_name.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_shrink.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_size.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_split_type.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-comm_test_inter.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-commutil.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-contextid.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_create.Plo + -rm -f src/mpi/comm/$(DEPDIR)/lib_libpmpi_la-intercomm_merge.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-address.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-ext32_datatype.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_address.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_count.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-get_elements_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_external_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-pack_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-status_set_elements_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_blockindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_commit.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_contiguous.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_darray.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hindexed_block.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_hvector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_indexed_block.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_pairtype.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_resized.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_struct.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_create_subarray.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_debug.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_dup.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_free.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_contents.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_envelope.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_extent_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_name.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_get_true_extent_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_hvector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_indexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_lb.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_match_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_set_name.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_size_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_struct.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_ub.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-type_vector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-typeutil.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libmpi_la-unpack_external.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-address.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-ext32_datatype.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_address.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_count.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-get_elements_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_external_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-pack_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-status_set_elements_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_blockindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_commit.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_contiguous.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_darray.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hindexed_block.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_hvector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_indexed_block.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_pairtype.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_resized.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_struct.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_create_subarray.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_debug.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_dup.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_free.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_contents.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_envelope.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_extent_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_name.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_get_true_extent_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hindexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_hvector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_indexed.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_lb.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_match_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_set_name.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_size_x.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_struct.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_ub.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-type_vector.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-typeutil.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack.Plo + -rm -f src/mpi/datatype/$(DEPDIR)/lib_libpmpi_la-unpack_external.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-darray_support.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_blockindexed.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_contig.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_indexed.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_struct.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_create_vector.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-dataloop_debug.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-looputil.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_count.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-segment_flatten.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libmpi_la-subarray_support.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-darray_support.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_blockindexed.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_contig.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_indexed.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_struct.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_create_vector.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-dataloop_debug.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-looputil.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_count.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-segment_flatten.Plo + -rm -f src/mpi/datatype/typerep/dataloop/$(DEPDIR)/lib_libpmpi_la-subarray_support.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_create.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_debug.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_flatten.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_iov.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libmpi_la-typerep_pack_external.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_create.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_debug.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_flatten.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_iov.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack.Plo + -rm -f src/mpi/datatype/typerep/src/$(DEPDIR)/lib_libpmpi_la-typerep_pack_external.Plo + -rm -f src/mpi/debugger/$(DEPDIR)/lib_libtvmpich_la-dll_mpich.Plo + -rm -f src/mpi/debugger/$(DEPDIR)/libdbginitdummy_la-dbginit.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_class.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_code.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-add_error_string.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-comm_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-dynerrutil.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_create.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_free.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_get.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errhandler_set.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_class.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-error_string.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-errutil.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-file_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libmpi_la-win_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_class.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_code.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-add_error_string.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-comm_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-dynerrutil.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_create.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_free.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_get.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errhandler_set.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_class.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-error_string.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-errutil.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-file_set_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_call_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_create_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_get_errhandler.Plo + -rm -f src/mpi/errhan/$(DEPDIR)/lib_libpmpi_la-win_set_errhandler.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_compare.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_difference.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_excl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_free.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_incl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_intersection.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_excl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_range_incl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_rank.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_size.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_translate_ranks.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-group_union.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libmpi_la-grouputil.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_compare.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_difference.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_excl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_free.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_incl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_intersection.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_excl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_range_incl.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_rank.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_size.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_translate_ranks.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-group_union.Plo + -rm -f src/mpi/group/$(DEPDIR)/lib_libpmpi_la-grouputil.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_create.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_delete.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_dup.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_free.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_get.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getn.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getnth.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_getvallen.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-info_set.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libmpi_la-infoutil.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_create.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_delete.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_dup.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_free.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_get.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getn.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getnth.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_getvallen.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-info_set.Plo + -rm -f src/mpi/info/$(DEPDIR)/lib_libpmpi_la-infoutil.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-abort.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-async.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalize.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-finalized.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-init.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-initialized.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-initinfo.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-initthread.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-ismain.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-netloc_util.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libmpi_la-querythread.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-abort.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-async.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalize.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-finalized.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-init.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initialized.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initinfo.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-initthread.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-ismain.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-netloc_util.Plo + -rm -f src/mpi/init/$(DEPDIR)/lib_libpmpi_la-querythread.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_add.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-aint_diff.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-getpname.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-library_version.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-pcontrol.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-utils.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libmpi_la-version.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_add.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-aint_diff.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-getpname.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-library_version.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-pcontrol.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-utils.Plo + -rm -f src/mpi/misc/$(DEPDIR)/lib_libpmpi_la-version.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bsendutil.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-bufattach.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-buffree.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ibsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-improbe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-imrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-iprobe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-irsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-isend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-issend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mprobe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-mrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-probe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-recv_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-rsend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-send_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-sendrecv_rep.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libmpi_la-ssend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bsendutil.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-bufattach.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-buffree.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ibsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-improbe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-imrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-iprobe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-irsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-isend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-issend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mprobe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-mrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-probe.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-recv_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-rsend_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-send_init.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-sendrecv_rep.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend.Plo + -rm -f src/mpi/pt2pt/$(DEPDIR)/lib_libpmpi_la-ssend_init.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-cancel.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_complete.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-greq_start.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-mpir_request.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_free.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-request_get_status.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-start.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-startall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-status_set_cancelled.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-test.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-test_cancelled.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-testall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-testany.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-testsome.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-wait.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitany.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libmpi_la-waitsome.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-cancel.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_complete.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-greq_start.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-mpir_request.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_free.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-request_get_status.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-start.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-startall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-status_set_cancelled.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-test_cancelled.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testany.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-testsome.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-wait.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitall.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitany.Plo + -rm -f src/mpi/request/$(DEPDIR)/lib_libpmpi_la-waitsome.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-alloc_mem.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-compare_and_swap.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-fetch_and_op.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-free_mem.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-get_accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-put.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-raccumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rget_accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rmatypeutil.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-rput.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_allocate_shared.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_attach.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_complete.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_create_dynamic.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_detach.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_fence.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_flush_local_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_free.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_group.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_info.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_get_name.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_lock_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_post.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_info.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_set_name.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_shared_query.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_start.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_sync.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_test.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_unlock_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-win_wait.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libmpi_la-winutil.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-alloc_mem.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-compare_and_swap.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-fetch_and_op.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-free_mem.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-get_accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-put.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-raccumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rget_accumulate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rmatypeutil.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-rput.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_allocate_shared.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_attach.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_complete.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_create_dynamic.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_detach.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_fence.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_flush_local_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_free.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_group.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_info.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_get_name.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_lock_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_post.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_info.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_set_name.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_shared_query.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_start.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_sync.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_test.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_unlock_all.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-win_wait.Plo + -rm -f src/mpi/rma/$(DEPDIR)/lib_libpmpi_la-winutil.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-close_port.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_accept.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_connect.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_disconnect.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_get_parent.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_join.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-comm_spawn_multiple.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-lookup_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-open_port.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-publish_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libmpi_la-unpublish_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-close_port.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_accept.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_connect.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_disconnect.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_get_parent.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_join.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-comm_spawn_multiple.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-lookup_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-open_port.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-publish_name.Plo + -rm -f src/mpi/spawn/$(DEPDIR)/lib_libpmpi_la-unpublish_name.Plo + -rm -f src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtick.Plo + -rm -f src/mpi/timer/$(DEPDIR)/lib_libmpi_la-wtime.Plo + -rm -f src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtick.Plo + -rm -f src/mpi/timer/$(DEPDIR)/lib_libpmpi_la-wtime.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_coords.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_map.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_rank.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_shift.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cart_sub.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-cartdim_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dims_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_create_adj.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-dist_gr_neighb_count.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_map.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graph_nbr.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphcreate.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphdimsget.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-graphnbrcnt.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topo_test.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libmpi_la-topoutil.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_coords.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_map.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_rank.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_shift.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cart_sub.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-cartdim_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dims_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_create_adj.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-dist_gr_neighb_count.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_get.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_map.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graph_nbr.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphcreate.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphdimsget.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-graphnbrcnt.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topo_test.Plo + -rm -f src/mpi/topo/$(DEPDIR)/lib_libpmpi_la-topoutil.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_changed.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_categories.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_cvars.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cat_get_pvars.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_alloc.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_handle_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_read.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-cvar_write.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-enum_get_item.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_finalize.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-mpit_initthread.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_alloc.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_handle_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_read.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_readreset.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_reset.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_create.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_session_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_start.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_stop.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libmpi_la-pvar_write.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_changed.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_categories.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_cvars.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cat_get_pvars.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_alloc.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_handle_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_read.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-cvar_write.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-enum_get_item.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_finalize.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-mpit_initthread.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_index.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_info.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_get_num.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_alloc.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_handle_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_read.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_readreset.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_reset.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_create.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_session_free.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_start.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_stop.Plo + -rm -f src/mpi_t/$(DEPDIR)/lib_libpmpi_la-pvar_write.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libmpi_la-none.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/none/$(DEPDIR)/lib_libpmpi_la-none.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_cm.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_data.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_msg.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_progress.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_tagged.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_cm.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_data.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_msg.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_progress.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_tagged.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-socksm.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_ckpt.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_getip.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_send.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libmpi_la-tcp_utility.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-socksm.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_ckpt.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_getip.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_send.Plo + -rm -f src/mpid/ch3/channels/nemesis/netmod/tcp/$(DEPDIR)/lib_libpmpi_la-tcp_utility.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_rma_shm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_comm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-ch3i_eagernoncontig.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_ckpt.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_debug.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_lmt_shm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_mpich.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_net_array.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libmpi_la-mpid_nem_network_poll.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_rma_shm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_comm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-ch3i_eagernoncontig.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_ckpt.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_debug.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_finalize.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_init.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_lmt_shm.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_mpich.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_net_array.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network.Plo + -rm -f src/mpid/ch3/channels/nemesis/src/$(DEPDIR)/lib_libpmpi_la-mpid_nem_network_poll.Plo + -rm -f src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libmpi_la-papi_defs.Plo + -rm -f src/mpid/ch3/channels/nemesis/utils/monitor/$(DEPDIR)/lib_libpmpi_la-papi_defs.Plo + -rm -f src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libmpi_la-mkstemp.Plo + -rm -f src/mpid/ch3/channels/nemesis/utils/replacements/$(DEPDIR)/lib_libpmpi_la-mkstemp.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_finalize.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_init.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isend.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_isendv.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsg.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_istartmsgv.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_progress.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-ch3_win_fns.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libmpi_la-sock.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_finalize.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_init.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isend.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_isendv.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsg.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_istartmsgv.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_progress.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-ch3_win_fns.Plo + -rm -f src/mpid/ch3/channels/sock/src/$(DEPDIR)/lib_libpmpi_la-sock.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_buffer.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_comm_spawn_multiple.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eager.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_eagersync.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_connection.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_op_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_pkt.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_recv_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_revoke_pkt.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_handle_send_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_port.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_recvq.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_request.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_ops.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_pkthandler.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_progress.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_reqops.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rma_sync.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_rndv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-ch3u_win_fns.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_abort.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_aint.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_recv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_cancel_send.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_disconnect.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_failure_ack.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_get_all_failed_procs.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_revoke.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_comm_spawn_multiple.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_datatype.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_finalize.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_get_universe_size.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_getpname.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_improbe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_imrecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_init.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_iprobe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_irsend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_isend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_issend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mprobe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_mrecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_op.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_port.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_probe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_recv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rma.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_rsend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_send.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_ssend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_startall.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpid_vc.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_isend_self.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_pg.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_printf.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libmpi_la-mpidi_rma.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_buffer.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_comm_spawn_multiple.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eager.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_eagersync.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_connection.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_op_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_pkt.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_recv_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_revoke_pkt.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_handle_send_req.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_port.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_recvq.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_request.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_ops.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_pkthandler.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_progress.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_reqops.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rma_sync.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_rndv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-ch3u_win_fns.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_abort.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_aint.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_recv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_cancel_send.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_disconnect.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_failure_ack.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_get_all_failed_procs.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_revoke.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_comm_spawn_multiple.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_datatype.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_finalize.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_get_universe_size.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_getpname.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_improbe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_imrecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_init.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_iprobe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_irsend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_isend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_issend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mprobe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_mrecv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_op.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_port.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_probe.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_recv.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rma.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_rsend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_send.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_ssend.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_startall.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpid_vc.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_isend_self.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_pg.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_printf.Plo + -rm -f src/mpid/ch3/src/$(DEPDIR)/lib_libpmpi_la-mpidi_rma.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_connect_sock.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_getinterfaces.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libmpi_la-ch3u_init_sock.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_connect_sock.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_getinterfaces.Plo + -rm -f src/mpid/ch3/util/sock/$(DEPDIR)/lib_libpmpi_la-ch3u_init_sock.Plo + -rm -f src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_globals.Plo + -rm -f src/mpid/ch4/generic/$(DEPDIR)/lib_libmpi_la-mpidig_init.Plo + -rm -f src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_globals.Plo + -rm -f src/mpid/ch4/generic/$(DEPDIR)/lib_libpmpi_la-mpidig_init.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_comm.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_datatype.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_init.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_op.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_spawn.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-ofi_win.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libmpi_la-util.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_comm.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_datatype.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_init.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_op.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_spawn.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-ofi_win.Plo + -rm -f src/mpid/ch4/netmod/ofi/$(DEPDIR)/lib_libpmpi_la-util.Plo + -rm -f src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libmpi_la-netmod_impl.Plo + -rm -f src/mpid/ch4/netmod/src/$(DEPDIR)/lib_libpmpi_la-netmod_impl.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_comm.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_datatype.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_init.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_op.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_spawn.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libmpi_la-stubnm_win.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_comm.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_datatype.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_init.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_op.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_spawn.Plo + -rm -f src/mpid/ch4/netmod/stubnm/$(DEPDIR)/lib_libpmpi_la-stubnm_win.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_comm.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_datatype.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_init.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_op.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_spawn.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libmpi_la-ucx_win.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_comm.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_datatype.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_init.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_op.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_spawn.Plo + -rm -f src/mpid/ch4/netmod/ucx/$(DEPDIR)/lib_libpmpi_la-ucx_win.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_coll_init.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_comm.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_datatype.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_eager_array.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_init.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_op.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_spawn.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libmpi_la-posix_win.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_coll_init.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_comm.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_datatype.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_eager_array.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_init.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_op.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_spawn.Plo + -rm -f src/mpid/ch4/shm/posix/$(DEPDIR)/lib_libpmpi_la-posix_win.Plo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/posix/eager/fbox/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/posix/eager/stub/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libmpi_la-release_gather.Plo + -rm -f src/mpid/ch4/shm/posix/release_gather/$(DEPDIR)/lib_libpmpi_la-release_gather.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_dpm.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_hooks.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_impl.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_init.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_mem.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_misc.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-shm_rma.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libmpi_la-topotree_util.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-func_table.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_dpm.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_hooks.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_impl.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_init.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_mem.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_misc.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-shm_rma.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree.Plo + -rm -f src/mpid/ch4/shm/src/$(DEPDIR)/lib_libpmpi_la-topotree_util.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_comm.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_init.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_spawn.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libmpi_la-stubshm_win.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-globals.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_comm.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_init.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_spawn.Plo + -rm -f src/mpid/ch4/shm/stubshm/$(DEPDIR)/lib_libpmpi_la-stubshm_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_coll_globals_default.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_globals.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_impl.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_init.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_spawn.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4i_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_buf.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_init.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_proc.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_recvq.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_origin_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_rma_target_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_symheap.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-ch4r_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libmpi_la-mpid_ch4_net_array.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_coll_globals_default.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_globals.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_impl.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_init.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_spawn.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4i_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_buf.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_comm.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_init.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_proc.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_recvq.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_origin_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_rma_target_callbacks.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_symheap.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-ch4r_win.Plo + -rm -f src/mpid/ch4/src/$(DEPDIR)/lib_libpmpi_la-mpid_ch4_net_array.Plo + -rm -f src/mpid/common/bc/$(DEPDIR)/lib_libmpi_la-mpidu_bc.Plo + -rm -f src/mpid/common/bc/$(DEPDIR)/lib_libpmpi_la-mpidu_bc.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_dtypes.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_init.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_ops.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libmpi_la-hcoll_rte.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_dtypes.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_init.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_ops.Plo + -rm -f src/mpid/common/hcoll/$(DEPDIR)/lib_libpmpi_la-hcoll_rte.Plo + -rm -f src/mpid/common/sched/$(DEPDIR)/lib_libmpi_la-mpidu_sched.Plo + -rm -f src/mpid/common/sched/$(DEPDIR)/lib_libpmpi_la-mpidu_sched.Plo + -rm -f src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_alloc.Plo + -rm -f src/mpid/common/shm/$(DEPDIR)/lib_libmpi_la-mpidu_shm_barrier.Plo + -rm -f src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_alloc.Plo + -rm -f src/mpid/common/shm/$(DEPDIR)/lib_libpmpi_la-mpidu_shm_barrier.Plo + -rm -f src/nameserv/file/$(DEPDIR)/lib_libmpi_la-file_nameserv.Plo + -rm -f src/nameserv/file/$(DEPDIR)/lib_libpmpi_la-file_nameserv.Plo + -rm -f src/nameserv/pmi/$(DEPDIR)/lib_libmpi_la-pmi_nameserv.Plo + -rm -f src/nameserv/pmi/$(DEPDIR)/lib_libpmpi_la-pmi_nameserv.Plo + -rm -f src/pm/gforker/$(DEPDIR)/mpiexec_gforker-mpiexec.Po + -rm -f src/pm/gforker/$(DEPDIR)/src_pm_gforker_mpiexec-mpiexec.Po + -rm -f src/pm/remshell/$(DEPDIR)/mpiexec_remshell-mpiexec.Po + -rm -f src/pm/remshell/$(DEPDIR)/src_pm_remshell_mpiexec-mpiexec.Po + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-cmnargs.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-dbgiface.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-env.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-ioloop.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-labelout.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-newsession.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-pmiport.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-pmiserv.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-process.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-rm.Plo + -rm -f src/pm/util/$(DEPDIR)/libmpiexec_la-simple_pmiutil2.Plo + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple2pmi.Plo + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple2pmi.Plo + -rm -f src/pmi/pmi2/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo + -rm -f src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmi.Plo + -rm -f src/pmi/simple/$(DEPDIR)/lib_libmpi_la-simple_pmiutil.Plo + -rm -f src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmi.Plo + -rm -f src/pmi/simple/$(DEPDIR)/lib_libpmpi_la-simple_pmiutil.Plo + -rm -f src/util/assert/$(DEPDIR)/lib_libmpi_la-assert.Plo + -rm -f src/util/assert/$(DEPDIR)/lib_libpmpi_la-assert.Plo + -rm -f src/util/cvar/$(DEPDIR)/lib_libmpi_la-mpir_cvars.Plo + -rm -f src/util/cvar/$(DEPDIR)/lib_libpmpi_la-mpir_cvars.Plo + -rm -f src/util/mem/$(DEPDIR)/lib_libmpi_la-handlemem.Plo + -rm -f src/util/mem/$(DEPDIR)/lib_libmpi_la-strerror.Plo + -rm -f src/util/mem/$(DEPDIR)/lib_libpmpi_la-handlemem.Plo + -rm -f src/util/mem/$(DEPDIR)/lib_libpmpi_la-strerror.Plo + -rm -f src/util/procmap/$(DEPDIR)/lib_libmpi_la-local_proc.Plo + -rm -f src/util/procmap/$(DEPDIR)/lib_libpmpi_la-local_proc.Plo + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-local uninstall-modincHEADERS \ + uninstall-nodist_includeHEADERS uninstall-nodist_pkgconfigDATA \ + uninstall-sysconfDATA + +.MAKE: $(am__recursive_targets) all check install install-am \ + install-exec-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles am--refresh check check-am clean \ + clean-binPROGRAMS clean-cscope clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-local \ + clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-local distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am \ + install-data-local install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-hook install-html install-html-am \ + install-html-local install-includeHEADERS install-info \ + install-info-am install-libLTLIBRARIES install-man \ + install-modincHEADERS install-nodist_includeHEADERS \ + install-nodist_pkgconfigDATA install-pdf install-pdf-am \ + install-pdf-local install-ps install-ps-am install-strip \ + install-sysconfDATA installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-local uninstall-modincHEADERS \ + uninstall-nodist_includeHEADERS uninstall-nodist_pkgconfigDATA \ + uninstall-sysconfDATA + +.PRECIOUS: Makefile + + +### TODO FIXME what do we do about these? +#src/mpi/debugger/tvtest: $(tvtest_objs) +# $(bindir)/mpicc -o $@ $(tvtest_objs) -ltvmpich + +#src/mpi/debugger/tvtest.o: src/mpi/debugger/tvtest.c +# $(bindir)/mpicc -c -o $@ $? + +# no rule for dbgstub.o, it needs to be built by suffix rules in the usual +# fashion because it needs direct access to MPICH internal headers + +#src/mpi/debugger/qdemo: src/mpi/debugger/qdemo.c +# $(bindir)/mpicc -o $@ $? + +#src/mpi/debugger/allcommdbg: src/mpi/debugger/allcommdbg.c +# $(bindir)/mpicc -o $@ $? + +# FIXME DUPLICATION +# This code is lifted from autogen.sh. This extra logic should just be +# rolled up into the extracterrmsgs script itself. +$(top_srcdir)/src/mpi/errhan/defmsg.h: $(top_srcdir)/maint/errmsgdirs $(errnames_txt_files) src/mpi/errhan/baseerrnames.txt + ( cd $(top_srcdir) && rm -f .err unusederr.txt ; rm -rf .tmp ) + ( cd $(top_srcdir) && \ + ./maint/extracterrmsgs -careful=unusederr.txt \ + -skip=src/util/multichannel/mpi.c \ + `cat maint/errmsgdirs` > .tmp 2>.err ) + ( cd $(top_srcdir) && if test -s .err ; then rm -f .tmp ; cat .err ; exit 1 ; fi ) + ( cd $(top_srcdir) && test -s .tmp && mv .tmp src/mpi/errhan/defmsg.h ) +$(top_builddir)/src/include/mpio.h: $(top_builddir)/src/mpi/romio/include/mpio.h + if test ! -h $(top_builddir)/src/include/mpio.h ; then \ + rm -f $(top_builddir)/src/include/mpio.h ; \ + ( cd $(top_builddir)/src/include && \ + $(LN_S) ../mpi/romio/include/mpio.h ) ; \ + fi + +# dir is present but currently intentionally unbuilt +#include $(top_srcdir)/src/mpi/io/Makefile.mk + +# normally built by autogen.sh, but this rebuild rule is here +$(top_srcdir)/src/util/cvar/mpir_cvars.c: $(top_srcdir)/maint/extractcvars + ( cd $(top_srcdir) && $(top_srcdir)/maint/extractcvars --dirs="`cat $(top_srcdir)/maint/cvardirs`") + +# include $(top_srcdir)/src/util/logging/Makefile.mk +$(cxx_buildiface_out_files): src/binding/cxx/buildiface-stamp +src/binding/cxx/buildiface-stamp: $(top_srcdir)/src/binding/cxx/buildiface $(top_srcdir)/src/include/mpi.h.in + ( cd $(top_srcdir)/src/binding/cxx && ./buildiface -nosep -initfile=cxx.vlist ) + +# TODO add documentation rules here, old simplemake rules follow: +#doc_sources = +#DOCDESTDIRS = html:www/www1,man:man/man1,latex:doc/refman +#doc_HTML_SOURCES = \${doc_sources} +#doc_MAN_SOURCES = \${doc_sources} +#doc_LATEX_SOURCES = \${doc_sources} + +# FIXME does anything cause mpicovsimple.o to be built? +#mpicovsimple.o: mpicovsimple.cxx mpicovsimple.h +# $(CXXCOMPILE) -c -DCOVERAGE_DIR='"."' ${srcdir}/mpicovsimple.cxx + +# FIXME need to add proper rules to rebuild the fortran sources generated by +# buildiface when buildiface is updated +$(top_srcdir)/src/binding/fortran/mpif_h/Makefile.mk: src/binding/fortran/mpif_h/buildiface-stamp + +src/binding/fortran/mpif_h/buildiface-stamp: $(top_srcdir)/src/binding/fortran/mpif_h/buildiface $(top_srcdir)/src/include/mpi.h.in + ( cd $(top_srcdir)/src/binding/fortran/mpif_h && ./buildiface ) + +# FIXME need to add proper rules to rebuild the fortran sources generated by +# buildiface when buildiface is updated +$(top_srcdir)/src/binding/fortran/use_mpi/Makefile.mk: src/binding/fortran/use_mpi/buildiface-stamp + +src/binding/fortran/use_mpi/buildiface-stamp: $(top_srcdir)/src/binding/fortran/use_mpi/buildiface $(top_srcdir)/src/include/mpi.h.in + ( cd $(top_srcdir)/src/binding/fortran/use_mpi && ./buildiface ) + +# FIXME: We may want to edit the mpif.h to convert Fortran77-specific +# items (such as an integer*8 used for file offsets) into the +# corresponding Fortran 90 KIND type, to accomodate compilers that +# reject non-standard features such as integer*8 (such as the Intel +# Fortran compiler with -std95). +# We need the MPI constants in a separate module for some of the +# interface definitions (the ones that need MPI_ADDRESS_KIND or +# MPI_OFFSET_KIND) +src/binding/fortran/use_mpi/mpi.$(MOD)-stamp: src/binding/fortran/use_mpi/$(MPICONSTMOD).$(MOD) src/binding/fortran/use_mpi/$(MPISIZEOFMOD).$(MOD) src/binding/fortran/use_mpi/$(MPIBASEMOD).$(MOD) $(srcdir)/src/binding/fortran/use_mpi/mpi.f90 src/binding/fortran/use_mpi/mpifnoext.h + @rm -f src/binding/fortran/use_mpi/mpi-tmp + @touch src/binding/fortran/use_mpi/mpi-tmp + @( cd src/binding/fortran/use_mpi && \ + if [ "$(FCEXT)" != "f90" ] || [ ! -f mpi.$(FCEXT) ] ; then \ + rm -f mpi.$(FCEXT) ; \ + $(LN_S) $(abs_top_srcdir)/src/binding/fortran/use_mpi/mpi.f90 mpi.$(FCEXT) ; \ + fi ) + $(mod_verbose)$(FC_COMPILE_MODS) -c src/binding/fortran/use_mpi/mpi.$(FCEXT) -o src/binding/fortran/use_mpi/mpi.lo + @( cd src/binding/fortran/use_mpi && \ + if [ "$(FCEXT)" != "f90" ] || [ ! -f mpi.$(FCEXT) ] ; then \ + rm -f mpi.$(FCEXT) ; \ + fi ) + @mv src/binding/fortran/use_mpi/mpi-tmp src/binding/fortran/use_mpi/mpi.$(MOD)-stamp + +src/binding/fortran/use_mpi/mpi.lo src/binding/fortran/use_mpi/$(MPIMOD).$(MOD): src/binding/fortran/use_mpi/mpi.$(MOD)-stamp + @if test -f $@; then :; else \ + trap 'rm -rf src/binding/fortran/use_mpi/mpi-lock src/binding/fortran/use_mpi/mpi.$(MOD)-stamp' 1 2 13 15; \ + if mkdir src/binding/fortran/use_mpi/mpi-lock 2>/dev/null; then \ + rm -f src/binding/fortran/use_mpi/mpi.$(MOD)-stamp; \ + $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi/mpi.$(MOD)-stamp; \ + rmdir src/binding/fortran/use_mpi/mpi-lock; \ + else \ + while test -d src/binding/fortran/use_mpi/mpi-lock; do sleep 1; done; \ + test -f src/binding/fortran/use_mpi/mpi.$(MOD)-stamp; exit $$?; \ + fi; \ + fi + +src/binding/fortran/use_mpi/mpi_constants.$(MOD)-stamp: src/binding/fortran/use_mpi/mpi_constants.f90 src/binding/fortran/use_mpi/mpifnoext.h + @rm -f src/binding/fortran/use_mpi/mpi_constants-tmp + @touch src/binding/fortran/use_mpi/mpi_constants-tmp + @( cd src/binding/fortran/use_mpi && \ + if [ "$(FCEXT)" != "f90" ] || [ ! -f mpi_constants.$(FCEXT) ] ; then \ + rm -f mpi_constants.$(FCEXT) ; \ + $(LN_S) $(abs_top_srcdir)/src/binding/fortran/use_mpi/mpi_constants.f90 mpi_constants.$(FCEXT) ; \ + fi ) + $(mod_verbose)$(FC_COMPILE_MODS) -c src/binding/fortran/use_mpi/mpi_constants.$(FCEXT) -o src/binding/fortran/use_mpi/mpi_constants.lo + @( cd src/binding/fortran/use_mpi && \ + if [ "$(FCEXT)" != "f90" ] || [ ! -f mpi_constants.$(FCEXT) ] ; then \ + rm -f mpi_constants.$(FCEXT) ; \ + fi ) + @mv src/binding/fortran/use_mpi/mpi_constants-tmp src/binding/fortran/use_mpi/mpi_constants.$(MOD)-stamp + +src/binding/fortran/use_mpi/mpi_constants.lo src/binding/fortran/use_mpi/$(MPICONSTMOD).$(MOD): src/binding/fortran/use_mpi/mpi_constants.$(MOD)-stamp + @if test -f $@; then :; else \ + trap 'rm -rf src/binding/fortran/use_mpi/mpi_constants-lock src/binding/fortran/use_mpi/mpi_constants.$(MOD)-stamp' 1 2 13 15; \ + if mkdir src/binding/fortran/use_mpi/mpi_constants-lock 2>/dev/null; then \ + rm -f src/binding/fortran/use_mpi/mpi_constants.$(MOD)-stamp; \ + $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi/mpi_constants.$(MOD)-stamp; \ + rmdir src/binding/fortran/use_mpi/mpi_constants-lock; \ + else \ + while test -d src/binding/fortran/use_mpi/mpi_constants-lock; do sleep 1; done; \ + test -f src/binding/fortran/use_mpi/mpi_constants.$(MOD)-stamp; exit $$?; \ + fi; \ + fi + +src/binding/fortran/use_mpi/mpi_sizeofs.$(MOD)-stamp: src/binding/fortran/use_mpi/mpi_sizeofs.f90 src/binding/fortran/use_mpi/mpifnoext.h + @rm -f src/binding/fortran/use_mpi/mpi_sizeofs-tmp + @touch src/binding/fortran/use_mpi/mpi_sizeofs-tmp + @( cd src/binding/fortran/use_mpi && \ + if [ "$(FCEXT)" != "f90" ] ; then \ + rm -f mpi_sizeofs.$(FCEXT) ; \ + $(LN_S) mpi_sizeofs.f90 mpi_sizeofs.$(FCEXT) ; \ + fi ) + $(mod_verbose)$(FC_COMPILE_MODS) -c src/binding/fortran/use_mpi/mpi_sizeofs.$(FCEXT) -o src/binding/fortran/use_mpi/mpi_sizeofs.lo + @( cd src/binding/fortran/use_mpi && \ + if [ "$(FCEXT)" != "f90" ] ; then \ + rm -f mpi_sizeofs.$(FCEXT) ; \ + fi ) + @mv src/binding/fortran/use_mpi/mpi_sizeofs-tmp src/binding/fortran/use_mpi/mpi_sizeofs.$(MOD)-stamp + +src/binding/fortran/use_mpi/mpi_sizeofs.lo src/binding/fortran/use_mpi/$(MPISIZEOFMOD).$(MOD): src/binding/fortran/use_mpi/mpi_sizeofs.$(MOD)-stamp + @if test -f $@; then :; else \ + trap 'rm -rf src/binding/fortran/use_mpi/mpi_sizeofs-lock src/binding/fortran/use_mpi/mpi_sizeofs.$(MOD)-stamp' 1 2 13 15; \ + if mkdir src/binding/fortran/use_mpi/mpi_sizeofs-lock 2>/dev/null; then \ + rm -f src/binding/fortran/use_mpi/mpi_sizeofs.$(MOD)-stamp; \ + $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi/mpi_sizeofs.$(MOD)-stamp; \ + rmdir src/binding/fortran/use_mpi/mpi_sizeofs-lock; \ + else \ + while test -d src/binding/fortran/use_mpi/mpi_sizeofs-lock; do sleep 1; done; \ + test -f src/binding/fortran/use_mpi/mpi_sizeofs.$(MOD)-stamp; exit $$?; \ + fi; \ + fi + +src/binding/fortran/use_mpi/mpi_base.$(MOD)-stamp: src/binding/fortran/use_mpi/mpi_base.f90 src/binding/fortran/use_mpi/$(MPICONSTMOD).$(MOD) + @rm -f src/binding/fortran/use_mpi/mpi_base-tmp + @touch src/binding/fortran/use_mpi/mpi_base-tmp + @( cd src/binding/fortran/use_mpi && \ + if [ "$(FCEXT)" != "f90" ] ; then \ + rm -f mpi_base.$(FCEXT) ; \ + $(LN_S) mpi_base.f90 mpi_base.$(FCEXT) ; \ + fi ) + $(mod_verbose)$(FC_COMPILE_MODS) -c src/binding/fortran/use_mpi/mpi_base.$(FCEXT) -o src/binding/fortran/use_mpi/mpi_base.lo + @( cd src/binding/fortran/use_mpi && \ + if [ "$(FCEXT)" != "f90" ] ; then \ + rm -f mpi_base.$(FCEXT) ; \ + fi ) + @mv src/binding/fortran/use_mpi/mpi_base-tmp src/binding/fortran/use_mpi/mpi_base.$(MOD)-stamp + +src/binding/fortran/use_mpi/mpi_base.lo src/binding/fortran/use_mpi/$(MPIBASEMOD).$(MOD): src/binding/fortran/use_mpi/mpi_base.$(MOD)-stamp + @if test -f $@; then :; else \ + trap 'rm -rf src/binding/fortran/use_mpi/mpi_base-lock src/binding/fortran/use_mpi/mpi_base.$(MOD)-stamp' 1 2 13 15; \ + if mkdir src/binding/fortran/use_mpi/mpi_base-lock 2>/dev/null; then \ + rm -f src/binding/fortran/use_mpi/mpi_base.$(MOD)-stamp; \ + $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi/mpi_base.$(MOD)-stamp; \ + rmdir src/binding/fortran/use_mpi/mpi_base-lock; \ + else \ + while test -d src/binding/fortran/use_mpi/mpi_base-lock; do sleep 1; done; \ + test -f src/binding/fortran/use_mpi/mpi_base.$(MOD)-stamp; exit $$?; \ + fi; \ + fi + +# We need a free-format version of mpif.h with no external commands, +# including no wtime/wtick (removing MPI_WTICK also removes MPI_WTIME, +# but leave MPI_WTIME_IS_GLOBAL). +# Also allow REAL*8 or DOUBLE PRECISION for the MPI_WTIME/MPI_WTICK +# declarations +src/binding/fortran/use_mpi/mpifnoext.h: src/binding/fortran/mpif_h/mpif.h + rm -f $@ + sed -e 's/^C/\!/g' -e '/EXTERNAL/d' \ + -e '/REAL\*8/d' \ + -e '/DOUBLE PRECISION/d' \ + -e '/MPI_WTICK/d' src/binding/fortran/mpif_h/mpif.h > $@ + +# Documentation sources +# FIXME disabled for now until we sort out how to handle docs correctly in the +# new build system +#doc_sources = +#DOCDESTDIRS = html:www/www1,man:man/man1,latex:doc/refman +#doc_HTML_SOURCES = ${doc_sources} +#doc_MAN_SOURCES = ${doc_sources} +#doc_LATEX_SOURCES = ${doc_sources} + +#src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp: src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.f90 src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.f90 -o src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.tmp src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_F08_LINK_CONSTANTS_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.lo : src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_f08_link_constants-lock src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_f08_link_constants-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_f08_link_constants-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_f08_link_constants-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/pmpi_f08.stamp: src/binding/fortran/use_mpi_f08/pmpi_f08.f90 src/binding/fortran/use_mpi_f08/mpi_f08_link_constants.stamp +# @rm -f src/binding/fortran/use_mpi_f08/pmpi_f08.tmp +# @touch src/binding/fortran/use_mpi_f08/pmpi_f08.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/pmpi_f08.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/pmpi_f08.f90 -o src/binding/fortran/use_mpi_f08/pmpi_f08.lo +# @mv src/binding/fortran/use_mpi_f08/pmpi_f08.tmp src/binding/fortran/use_mpi_f08/pmpi_f08.stamp + +#src/binding/fortran/use_mpi_f08/$(PMPI_F08_NAME).$(MOD) src/binding/fortran/use_mpi_f08/pmpi_f08.lo : src/binding/fortran/use_mpi_f08/pmpi_f08.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/pmpi_f08-lock src/binding/fortran/use_mpi_f08/pmpi_f08.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/pmpi_f08-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/pmpi_f08.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/pmpi_f08.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/pmpi_f08-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/pmpi_f08-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/pmpi_f08.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp: src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.f90 src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.f90 -o src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.tmp src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_F08_CALLBACKS_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.lo : src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_f08_callbacks-lock src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_f08_callbacks-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_f08_callbacks-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_f08_callbacks-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_f08_callbacks.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_c_interface.stamp: src/binding/fortran/use_mpi_f08/mpi_c_interface.f90 src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_c_interface.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_c_interface.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_c_interface.f90 -o src/binding/fortran/use_mpi_f08/mpi_c_interface.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_c_interface.tmp src/binding/fortran/use_mpi_f08/mpi_c_interface.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_c_interface.lo : src/binding/fortran/use_mpi_f08/mpi_c_interface.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_c_interface-lock src/binding/fortran/use_mpi_f08/mpi_c_interface.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_c_interface-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_c_interface.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_c_interface-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_c_interface-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_c_interface.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp: src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.f90 src/binding/fortran/use_mpi_f08/mpi_f08.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.f90 -o src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.tmp src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_GLUE_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.lo : src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_c_interface_glue-lock src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_c_interface_glue-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_c_interface_glue-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_c_interface_glue-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp: src/binding/fortran/use_mpi_f08/mpi_f08_types.f90 src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_f08_types.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_f08_types.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_f08_types.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_f08_types.f90 -o src/binding/fortran/use_mpi_f08/mpi_f08_types.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_f08_types.tmp src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_F08_TYPES_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_f08_types.lo : src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_f08_types-lock src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_f08_types-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_f08_types-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_f08_types-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp: src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 src/binding/fortran/use_mpi_f08/mpi_c_interface_glue.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.f90 -o src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.tmp src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_NOBUF_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.lo : src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf-lock src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp: src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90 src/binding/fortran/use_mpi_f08/mpi_f08_types.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90 -o src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.tmp src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_F08_COMPILE_CONSTANTS_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.lo : src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants-lock src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_f08.stamp: src/binding/fortran/use_mpi_f08/mpi_f08.f90 src/binding/fortran/use_mpi_f08/pmpi_f08.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_f08.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_f08.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_f08.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_f08.f90 -o src/binding/fortran/use_mpi_f08/mpi_f08.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_f08.tmp src/binding/fortran/use_mpi_f08/mpi_f08.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_F08_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_f08.lo : src/binding/fortran/use_mpi_f08/mpi_f08.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_f08-lock src/binding/fortran/use_mpi_f08/mpi_f08.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_f08-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_f08.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_f08.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_f08-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_f08-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_f08.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp: src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90 +# @rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface_types.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_c_interface_types.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90 -o src/binding/fortran/use_mpi_f08/mpi_c_interface_types.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_c_interface_types.tmp src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_TYPES_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_c_interface_types.lo : src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_c_interface_types-lock src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_c_interface_types-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_c_interface_types-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_c_interface_types-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_c_interface_types.stamp; exit $$?; \ +# fi; \ +# fi + +#src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp: src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.f90 src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.stamp +# @rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.tmp +# @touch src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.tmp +# $(mod_verbose)$(F08_COMPILE_MODS) -c `test -f 'src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.f90' || echo '$(srcdir)/'`src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.f90 -o src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.lo +# @mv src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.tmp src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp + +#src/binding/fortran/use_mpi_f08/$(MPI_C_INTERFACE_CDESC_NAME).$(MOD) src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.lo : src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp +# @if test -f $@; then :; else \ +# trap 'rm -rf src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc-lock src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp' 1 2 13 15; \ +# if mkdir src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc-lock 2>/dev/null; then \ +# rm -f src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp; \ +# $(MAKE) $(AM_MAKEFLAGS) src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp; \ +# rmdir src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc-lock; \ +# else \ +# while test -d src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc-lock; do sleep 1; done; \ +# test -f src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.stamp; exit $$?; \ +# fi; \ +# fi + +# create a local copy of the compiler wrapper that will actually be installed +src/env/mpicc: $(top_builddir)/src/env/mpicc.bash + cp -p $? $@ +src/env/mpicxx: $(top_builddir)/src/env/mpicxx.bash + cp -p $? $@ +src/env/mpif77: $(top_builddir)/src/env/mpif77.bash + cp -p $? $@ +src/env/mpifort: $(top_builddir)/src/env/mpifort.bash + cp -p $? $@ +#src/env/mpicc: $(top_builddir)/src/env/mpicc.sh +# cp -p $? $@ +#src/env/mpicxx: $(top_builddir)/src/env/mpicxx.sh +# cp -p $? $@ +#src/env/mpif77: $(top_builddir)/src/env/mpif77.sh +# cp -p $? $@ +#src/env/mpifort: $(top_builddir)/src/env/mpifort.sh +# cp -p $? $@ + +src/include/mpir_cvars.h: + $(top_srcdir)/maint/extractcvars --dirs="`cat $(top_srcdir)/maint/cvardirs`" +# errnames_txt_files += src/mpid/ch4/netmod/stub/errnames.txt +# errnames_txt_files += src/mpid/ch4/shm/stub/errnames.txt + +# Commented out the installation of mpich.module till Deji has a +# complete solution how mpich.module could be used with modules. +#sysconf_DATA += src/packaging/envmods/mpich.module + +testing: + ( cd test && $(MAKE) $(AM_MAKEFLAGS) testing ) + +test-clean: + ( cd test && $(MAKE) $(AM_MAKEFLAGS) clean ) + +install-exec-hook: + for e in ${DESTDIR}${bindir}/mpicc ${DESTDIR}${bindir}/mpicxx \ + ${DESTDIR}${bindir}/mpif77 ${DESTDIR}${bindir}/mpifort ; do \ + if test -e $${e} ; then \ + sed -e 's|__PREFIX_TO_BE_FILLED_AT_INSTALL_TIME__|${prefix}|g' \ + -e 's|__EXEC_PREFIX_TO_BE_FILLED_AT_INSTALL_TIME__|${exec_prefix}|g' \ + -e 's|__SYSCONFDIR_TO_BE_FILLED_AT_INSTALL_TIME__|${sysconfdir}|g' \ + -e 's|__INCLUDEDIR_TO_BE_FILLED_AT_INSTALL_TIME__|${includedir}|g' \ + -e 's|__LIBDIR_TO_BE_FILLED_AT_INSTALL_TIME__|${libdir}|g' $${e} > $${e}.tmp ; \ + $(INSTALL_SCRIPT) $${e}.tmp $${e} ; \ + rm -f $${e}.tmp ; \ + fi ; \ + done ; \ + if test -e ${DESTDIR}${bindir}/mpicxx ; then \ + if test "mpicxx" != "mpic++" ; then \ + cd ${DESTDIR}${bindir} && ln -f -s mpicxx mpic++ ; \ + fi ; \ + fi ; \ + if test -e ${DESTDIR}${bindir}/mpifort ; then \ + if test "mpifort" != "mpif90" ; then \ + cd ${DESTDIR}${bindir} && ln -f -s mpifort mpif90 ; \ + fi ; \ + fi ; \ + if test -e ${DESTDIR}${bindir}/mpifort -a ! -e ${DESTDIR}${bindir}/mpif77 ; then \ + if test "mpifort" != "mpif77" ; then \ + cd ${DESTDIR}${bindir} && ln -f -s mpifort mpif77 ; \ + fi ; \ + fi ; \ + if test -e ${DESTDIR}${libdir}/libmpi.so ; then \ + if test "mpi" != "mpl" ; then \ + cd ${DESTDIR}${libdir} && ln -f -s libmpi.so libmpl.so ; \ + fi ; \ + if test "mpi" != "opa" ; then \ + cd ${DESTDIR}${libdir} && ln -f -s libmpi.so libopa.so ; \ + fi ; \ + if test "mpi" != "mpich" ; then \ + cd ${DESTDIR}${libdir} && ln -f -s libmpi.so libmpich.so ; \ + fi ; \ + fi ; \ + if test -e ${DESTDIR}${libdir}/libmpifort.so ; then \ + if test "mpifort" != "fmpich" ; then \ + cd ${DESTDIR}${libdir} && ln -f -s libmpifort.so libfmpich.so ; \ + fi ; \ + if test "mpifort" != "mpichf90" ; then \ + cd ${DESTDIR}${libdir} && ln -f -s libmpifort.so libmpichf90.so ; \ + fi ; \ + fi ; \ + if test -e ${DESTDIR}${libdir}/libmpicxx.so ; then \ + if test "mpicxx" != "mpichcxx" ; then \ + cd ${DESTDIR}${libdir} && ln -f -s libmpicxx.so libmpichcxx.so ; \ + fi ; \ + fi + +# the configure step checks for the 'lib' dir to decide whether a source +# directory has been previously used for an in-path build before allowing a +# VPATH build to continue +distclean-local: + -rm -rf $(top_builddir)/lib + -rm -rf $(top_builddir)/bin + -rm -rf $(top_builddir)/include + -rm -rf $(top_builddir)/share + +# we can only have one clean-local, so we hook into it via conditionally +# defined variables in the dependencies section +clean-local: $(CLEAN_LOCAL_TARGETS) + +uninstall-local: + for x in mpic++ mpif90 mpif77 ; do \ + rm -f ${DESTDIR}${bindir}/$$x ; \ + done ; \ + for x in mpl opa mpich fmpich mpichf90 mpichcxx ; do \ + rm -f ${DESTDIR}${libdir}/lib$$x.so ; \ + done + +# -------------------------------------------------------------------------- +# coverage rules +# -------------------------------------------------------------------------- + +.PHONY: coverage + +# local var meaning (for profiling foo/bar/baz.c): +# dir=foo/bar +# bname=baz.c +# aux=baz +# +# Note that we delete all extra ".gcov" files that were not the direct goal, +# even though they contain useful information. A more robust solution is needed +# in the long run, probably one that uses "--long-file-names --preserve-paths" +# and some postprocessing in a perl script. +# +# Gcov has no good way to deal with source files that have been compiled twice +# into two different object files, such as +# bcast.c --> {bcast.o,lib_libpmpi_la-bcast.o} +# It still generates a bcast.c.gcov output for each object file. Long file +# names and preserved paths do not help with this problem. +# What we can do in this case is to move the second files to a separate +# directory, rename name, and run gcov on the new files. +# For the web-based coverage reports, the gcov output for the two files +# needs to be merged; see maint/gcovmerge . +# To make it easier to re-run the coverage generation, we copy, rather than +# move, when there are two object files for each source file. +# A change to the build procedure broke this target. This is a partial though +# nearly complete fix to the broken build process. The generated coverage +# files after the fix appear mostly correct, though there appear to also be +# errors in the gcov output itself (the format of this output changes +# frequently). However, the coverage analysis is still valuable and has +# identified missing tests. +# +# The problem: +# The source file is foo.c +# gcov expects foo.o, foo.gcno, and foo.gcda files +# The MPICH build process, unfortunately, does not produce a foo.o file; +# instead, it produces a .libs/lib_libmpi_la-foo.o file (and +# similarly .libs/lib_libmpi_la_foo.gcno etc. +# This change broke this coverage target. If further changes to the +# naming conventions for object files are made, make sure that the +# coverage target is also modified to correspond to those changes. +# +#coverage: +# @for file in $(gcov_sources) ; do \ +# dir=`dirname $$file` ; \ +# bname=`basename $$file` ; \ +# aux=`echo $$bname | sed -e 's,\.*$$,,'` ; \ +# sname=`echo $$bname | sed -e 's/\.[^\.]*$$//'` ;\ +# if [ -s "$$dir/$$sname.o" ] ; then \ +# echo "( $(GCOV) -b -f -o $$file $$file && mv $$bname.gcov $$dir )" ; \ +# ( $(GCOV) -b -f -o $$file $$file && mv $$bname.gcov $$dir ) ; \ +# elif [ -s "$$dir/lib_libmpi_la-$$sname.o" ] ; then \ +# if [ ! -d $$dir-mpi ] ; then mkdir $$dir-mpi ; fi ; \ +# echo "Copying name-mangled files to $$dir-mpi" ; \ +# for pfile in $$dir/.libs/lib_libmpi_la-$$sname.* ; do \ +# nfile=`echo $$pfile | sed -e 's/lib_libmpi_la-//'` ;\ +# nfile=`basename $$nfile` ; \ +# echo "cp -p $$pfile $$dir-mpi/$$nfile" ; \ +# cp -p $$pfile $$dir-mpi/$$nfile ; \ +# done ; \ +# for pfile in $$dir/lib_libmpi_la-$$sname.o ; do \ +# nfile=`echo $$pfile | sed -e 's/lib_libmpi_la-//'` ;\ +# nfile=`basename $$nfile` ; \ +# echo "( cd $$dir-mpi && $(GCOV) -b -f $$nfile )" ; \ +# ( cd $$dir-mpi && $(GCOV) -b -f $$nfile ) ; \ +# if [ ! -s $$dir-mpi/$$bname.gcov ] ; then \ +# echo "No $$bname.gcov file created" ;\ +# else \ +# mv $$dir-mpi/$$bname.gcov $$dir ; \ +# fi ; \ +# done ; \ +# else \ +# echo "Missing object file for source $$file" ; \ +# fi ; \ +# if [ -s "$$dir/lib_libpmpi_la-$$sname.o" ] ; then \ +# if [ ! -d $$dir-pmpi ] ; then mkdir $$dir-pmpi ; fi ; \ +# echo "Copying name-mangled files to $$dir-pmpi" ; \ +# for pfile in $$dir/.libs/lib_libpmpi_la-$$sname.* ; do \ +# nfile=`echo $$pfile | sed -e 's/lib_libpmpi_la-//'` ;\ +# nfile=`basename $$nfile` ; \ +# echo "cp -p $$pfile $$dir-pmpi/$$nfile" ; \ +# cp -p $$pfile $$dir-pmpi/$$nfile ; \ +# done ; \ +# for pfile in $$dir/lib_libpmpi_la-$$sname.o ; do \ +# nfile=`echo $$pfile | sed -e 's/lib_libpmpi_la-//'` ;\ +# nfile=`basename $$nfile` ; \ +# echo "( cd $$dir-pmpi && $(GCOV) -b -f $$nfile )" ; \ +# ( cd $$dir-pmpi && $(GCOV) -b -f $$nfile ) ; \ +# if [ -s $$dir/$$bname.gcov ] ; then \ +# echo "gcovmerge $$dir-pmpi/$$bname.gcov $$dir/$$bname.gcov > $$dir/$$bname.gcov.merge" ; \ +# $(srcdir)/maint/gcovmerge $$dir-pmpi/$$bname.gcov \ +# $$dir/$$bname.gcov > $$dir/$$bname.gcov.merge ;\ +# else \ +# echo "Did not find file $$dir/$$bname.gcov" ; \ +# echo "mv $$dir-pmpi/$$bname.gcov $$dir/$$bname.gcov";\ +# mv $$dir-pmpi/$$bname.gcov $$dir/$$bname.gcov ; \ +# fi ;\ +# done ; \ +# fi ; \ +# rm -f *.gcov ; \ +# done +# for subdir in $(SUBDIRS) - ; do \ +# if test "x$$subdir" = "x-" ; then break ; fi ; \ +# if test "x$$subdir" = "x." ; then \ +# : ; \ +# else \ +# if grep coverage: $$subdir/Makefile >/dev/null 2>&1 ; then \ +# ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) coverage ) ; \ +# fi \ +# fi \ +# done +# heavy handed, but it gets the job done +#coverage-clean: +# -find $(top_builddir) -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" | \ +# xargs -n 10 rm -f + +coverage: + @echo 'ERROR: MPICH was not configured with "--enable-coverage"' + exit 1 + +# Implicit suffix rules to cause the docs to be built. These are a bit of a +# hack, but using the implicit rules like this instead of a shell for loop +# permits make -jN to work. +.c.man-phony: + $(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path3) -ext 3 \ + -heading MPI -quotefmt -nolocation $(doctext_docnotes) $< +.c.html-phony: + $(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path3) \ + -heading MPI -quotefmt -nolocation \ + -index $(htmldoc_path3)/mpi.cit -indexdir $(htmldoc_root3) \ + $(doctext_docnotes) $< + +.txt.man1-phony: + $(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path1) -ext 1 \ + -heading MPI -quotefmt -nolocation $(doctext_docnotes) $< +.txt.html1-phony: + $(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path1) \ + -heading MPI -quotefmt -nolocation $(doctext_docnotes) $< +.txt.man3-phony: + $(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path3) -ext 3 \ + -heading MPI -quotefmt -nolocation $(doctext_docnotes) $< +.txt.html3-phony: + $(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path3) \ + -heading MPI -quotefmt -nolocation \ + -index $(htmldoc_path3)/mpi.cit -indexdir $(htmldoc_root3) \ + $(doctext_docnotes) $< + +# use mandoc-local target to force directory creation before running DOCTEXT +mandoc: + test -d $(mandoc_path1) || $(MKDIR_P) $(mandoc_path1) + test -d $(mandoc_path3) || $(MKDIR_P) $(mandoc_path3) + $(MAKE) $(AM_MAKEFLAGS) mandoc-local +mandoc-local: $(mpi_sources:.c=.man-phony) $(doc1_src_txt:.txt=.man1-phony) \ + $(doc3_src_txt:.txt=.man3-phony) + for subdir in $(MANDOC_SUBDIRS) - ; do \ + if test "x$$subdir" = "x-" ; then break ; fi ; \ + if test "x$$subdir" = "x." ; then \ + : ; \ + else \ + if grep 'mandoc:' $$subdir/Makefile >/dev/null 2>&1 ; then \ + ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) \ + mandoc_path1=$(mandoc_path1) \ + mandoc_path3=$(mandoc_path3) \ + doctext_docnotes=$(doctext_docnotes) \ + mandoc ) ; \ + fi \ + fi \ + done +# FIXME: the 'mancnst' script need to be committed for this to work +# (cd $(abs_top_builddir) && $(abs_top_srcdir)/doc/mansrc/mancnst) + +# use htmldoc-local target to force directory creation before running DOCTEXT +# Note that the mpi.cit is appended to by each update, so it must be removed +# and recreated when the documentation files are updated +htmldoc: + test -d $(top_builddir)/www/www1 || $(MKDIR_P) $(top_builddir)/www/www1 + test -d $(top_builddir)/www/www3 || $(MKDIR_P) $(top_builddir)/www/www3 + rm -f $(htmldoc_path3)/mpi.cit + $(MAKE) $(AM_MAKEFLAGS) htmldoc-local + +htmldoc-local: $(mpi_sources:.c=.html-phony) $(doc1_src_txt:.txt=.html1-phony) \ + $(doc3_src_txt:.txt=.html3-phony) + for subdir in $(HTMLDOC_SUBDIRS) - ; do \ + if test "x$$subdir" = "x-" ; then break ; fi ; \ + if test "x$$subdir" = "x." ; then \ + : ; \ + else \ + if grep 'htmldoc:' $$subdir/Makefile >/dev/null 2>&1 ; then \ + ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) \ + htmldoc_path1=$(htmldoc_path1) \ + htmldoc_path3=$(htmldoc_path3) \ + doctext_docnotes=$(doctext_docnotes) \ + htmldoc ) ; \ + fi \ + fi \ + done + $(srcdir)/maint/createhtmlindex -wwwroot=$(top_builddir) +# this is a variation on the recipe that was previously generated by simplemake +install-man-local: + @dir= ; \ + if test -d $(builddir)/man ; then \ + dir=$(builddir)/man ; \ + elif test -d $(srcdir)/man ; then \ + dir=$(srcdir)/man ; \ + fi ; \ + export dir ; \ + if test ! -z $$dir && test -d $$dir && cd $$dir ; then \ + for name in * ; do \ + if [ "$$name" = "*" ] ; then continue ; fi ; \ + if [ -f $$name ] ; then \ + echo "$(INSTALL_DATA) $$name ${DESTDIR}${mandir}/$$name" ; \ + $(INSTALL_DATA) $$name ${DESTDIR}${mandir}/$$name ; \ + elif [ -d $$name ] ; then \ + if [ ! -d ${DESTDIR}${mandir}/$$name ] ; then $(MKDIR_P) ${DESTDIR}${mandir}/$$name ; fi ;\ + ( cd $$name && for name2 in * ; do \ + if [ "$$name2" = "*" ] ; then continue ; fi ; \ + if [ -f $$name2 ] ; then \ + echo "$(INSTALL_DATA) $$name2 ${DESTDIR}${mandir}/$$name/$$name2" ; \ + $(INSTALL_DATA) $$name2 ${DESTDIR}${mandir}/$$name/$$name2 ; \ + elif [ -d $$name2 ] ; then \ + echo "cp -rp $$name2 ${DESTDIR}${mandir}/$$name" ; \ + cp -rp $$name2 ${DESTDIR}${mandir}/$$name ; \ + fi \ + done ) ; \ + else \ + echo "Unknown file type for $$name" ; \ + fi ; \ + done ; \ + fi +install-html-local: + @dir= ; \ + if test -d $(builddir)/www ; then \ + dir=$(builddir)/www ; \ + elif test -d $(srcdir)/www ; then \ + dir=$(srcdir)/www ; \ + fi ; \ + export dir ; \ + if test ! -z $$dir && test -d $$dir && cd $$dir ; then \ + if [ ! -e ${DESTDIR}${htmldir} ] ; then $(MKDIR_P) ${DESTDIR}${htmldir} ; fi ; \ + for name in * ; do \ + if [ "$$name" = "*" ] ; then continue ; fi ; \ + if [ -f $$name ] ; then \ + echo "$(INSTALL_DATA) $$name ${DESTDIR}${htmldir}/$$name" ; \ + $(INSTALL_DATA) $$name ${DESTDIR}${htmldir}/$$name ; \ + elif [ -d $$name ] ; then \ + if [ ! -d ${DESTDIR}${htmldir}/$$name ] ; then $(MKDIR_P) ${DESTDIR}${htmldir}/$$name ; fi ;\ + ( cd $$name && for name2 in * ; do \ + if [ "$$name2" = "*" ] ; then continue ; fi ; \ + if [ -f $$name2 ] ; then \ + echo "$(INSTALL_DATA) $$name2 ${DESTDIR}${htmldir}/$$name/$$name2" ; \ + $(INSTALL_DATA) $$name2 ${DESTDIR}${htmldir}/$$name/$$name2 ; \ + elif [ -d $$name2 ] ; then \ + echo "cp -rp $$name2 ${DESTDIR}${htmldir}/$$name" ; \ + cp -rp $$name2 ${DESTDIR}${htmldir}/$$name ; \ + fi \ + done ) ; \ + else \ + echo "Unknown file type for $$name" ; \ + fi ; \ + done ; \ + fi + +.PHONY: mandoc mandoc-local htmldoc htmldoc-local install-html-local install-man-local + +# build the latex docs in the old style +latexdoc: + for dir in $(DOC_SUBDIRS) ; do \ + (cd $$dir && ${MAKE} latexdoc ) ; done +# note that these PDFs are currently built in the srcdir, even in a VPATH +# build... +install-pdf-local: + if [ ! -e ${DESTDIR}${docdir} ] ; then $(MKDIR_P) ${DESTDIR}${docdir} ; fi + if [ -s $(srcdir)/doc/userguide/user.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/userguide/user.pdf ${DESTDIR}${docdir}/user.pdf ; fi + if [ -s $(srcdir)/doc/installguide/install.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/installguide/install.pdf ${DESTDIR}${docdir}/install.pdf ; fi + if [ -s $(srcdir)/doc/logging/logging.pdf ] ; then $(INSTALL_DATA) $(srcdir)/doc/logging/logging.pdf ${DESTDIR}${docdir}/logging.pdf ; fi + +userdocs: + for dir in $(DOC_SUBDIRS) ; do \ + (cd $$dir && $(MAKE) ) ; done + +devdocs: + for dir in $(DEVELOPER_SUBDIRS) ; do \ + (cd $$dir && $(MAKE) ) ; done + +install-devdocs: + if [ -z "$(DEV_INSTALL_PREFIX)" ] ; then \ + echo "DEV_INSTALL_PREFIX must be defined" ; \ + exit 1 ; \ + fi + for dir in $(DEVELOPER_SUBDIRS) ; do \ + export DEV_INSTALL_PREFIX ; \ + ( cd $$dir && $(MAKE) install-devdocs ) ; \ + done + +# use the _TARGETS var as a workaround for being unable to define multiple +# -local targets +install-data-local: $(INSTALL_DATA_LOCAL_TARGETS) + +.c.i: + $(COMPILE) -CC -E -o $@ $< + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/README.md b/README.md new file mode 100755 index 00000000000..81a1fa3241b --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# HPC IO Benchmark Repository [![Build Status](https://travis-ci.org/hpc/ior.svg?branch=master)](https://travis-ci.org/hpc/ior) + +This repo now contains both IOR and mdtest. +See also NOTES.txt + +# Building + +0. If "configure" is missing from the top level directory, you + probably retrieved this code directly from the repository. + Run "./bootstrap". + + If your versions of the autotools are not new enough to run + this script, download and official tarball in which the + configure script is already provided. + +1. Run "./configure" + + See "./configure --help" for configuration options. + +2. Run "make" + +3. Optionally, run "make install". The installation prefix + can be changed as an option to the "configure" script. + +# Testing + + Run "make check" to invoke the unit test framework of Automake. + + * To run basic functionality tests that we use for continuous integration, see ./testing/ + * There are docker scripts provided to test various distributions at once. + * See ./testing/docker/ diff --git a/confdb/libtool.m4.rej b/confdb/libtool.m4.rej new file mode 100644 index 00000000000..9d6ad30e6d4 --- /dev/null +++ b/confdb/libtool.m4.rej @@ -0,0 +1,56 @@ +--- libtool.m4 2019-03-06 15:31:23.000000000 -0600 ++++ libtool.m4 2019-03-07 14:13:16.000000000 -0600 +@@ -2876,9 +2876,50 @@ + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. +- if test -f /etc/ld.so.conf; then +- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ ++ # There is no easy way to reliably detect the sys dlsearch path. We will first ++ # assume ldconfig reports the path correctly, but check it with the current ++ # ld cache. If any cached path is not present in the generated path_spec, then ++ # we know ldconfig is bad and should manually parse the ld.so.conf files. ++ # Note the reported paths can be a superset of the cached paths. ++ # The catch is that the default path may not be in the ld.so.conf. We have to ++ # add any missing one back to the path_spec (from the cached paths). ++ ++ if test -x /sbin/ldconfig; then ++ sys_lib_dlsearch_path_spec=`/sbin/ldconfig -N -X -v 2>/dev/null | grep ^/ | sed -e 's/:.*//g' | tr '\n' ' '` ++ cached_lib_dlsearch_path=`/sbin/ldconfig -p | sed -e 's/.*=> //g' | grep '^/' | while read p; do dirname $p; done | sort | uniq | tr '\n' ' '` ++ for p in `echo $cached_lib_dlsearch_path`; do ++ case "$sys_lib_dlsearch_path_spec" in ++ *$p*) ++ bad_ldconfig=no ++ ;; ++ *) ++ # ldconfig is bad if cached path is not reported ++ bad_ldconfig=yes ++ break ++ ;; ++ esac ++ done ++ else ++ bad_ldconfig=yes ++ fi ++ ++ if test "$bad_ldconfig" = "yes"; then ++ if test -f /etc/ld.so.conf; then ++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` ++ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ fi ++ ++ # catch anything that in the cached path but not in the conf files ++ for p in `echo $cached_lib_dlsearch_path`; do ++ case "$sys_lib_dlsearch_path_spec" in ++ *$p*) ++ ;; ++ *) ++ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $p" ++ ;; ++ esac ++ done + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on diff --git a/config.log-works-leap15 b/config.log-works-leap15 new file mode 100644 index 00000000000..3581031ce01 --- /dev/null +++ b/config.log-works-leap15 @@ -0,0 +1,25864 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by MPICH configure 3.4a2, which was +generated by GNU Autoconf 2.69. Invocation command line was + + + +$ +./configure +--prefix=/home/brian/mpich-install/ +--enable-sharedlibs=gcc +--enable-shared +--enable-static=no +--enable-lib-depend +--disable-silent-rules +--enable-fc +--with-pm=hydra:gforker +--enable-romio +--with-hwloc-prefix=embedded +--enable-fortran=all +--with-file-system=ufs+daos +--with-daos=/usr +--with-cart=/usr +--disable-checkerrors +--disable-perftest +--disable-large-tests +--disable-ft-tests +--disable-comm-overlap-tests +--enable-threads=single +--disable-rpath +--with-device=ch3:nemesis +FC=gfortran +F77=gfortran +CFLAGS=-m64 +-O2 +-fPIC +CXXFLAGS=-m64 +-O2 +-fPIC +FCFLAGS=-m64 +-O2 +-fPIC +FFLAGS=-m64 +-O2 +-fPIC +LDFLAGS=-Wl,-z,noexecstack +MPICHLIB_CFLAGS=-O2 +-g +-pipe +-Wall +-Wp,-D_FORTIFY_SOURCE=2 +-fexceptions +-fstack-protector-strong +--param=ssp-buffer-size=4 +-grecord-gcc-switches + + +-m64 +-mtune=generic +MPICHLIB_CXXFLAGS=-O2 +-g +-pipe +-Wall +-Wp,-D_FORTIFY_SOURCE=2 +-fexceptions +-fstack-protector-strong +--param=ssp-buffer-size=4 +-grecord-gcc-switches + + +-m64 +-mtune=generic +MPICHLIB_FCFLAGS=-O2 +-g +-pipe +-Wall +-Wp,-D_FORTIFY_SOURCE=2 +-fexceptions +-fstack-protector-strong +--param=ssp-buffer-size=4 +-grecord-gcc-switches + + +-m64 +-mtune=generic +MPICHLIB_FFLAGS=-O2 +-g +-pipe +-Wall +-Wp,-D_FORTIFY_SOURCE=2 +-fexceptions +-fstack-protector-strong +--param=ssp-buffer-size=4 +-grecord-gcc-switches + + +-m64 +-mtune=generic + +## --------- ## +## Platform. ## +## --------- ## + +hostname = bmurrell-mobl.amr.corp.intel.com +uname -m = x86_64 +uname -r = 5.6.16-200.fc31.x86_64 +uname -s = Linux +uname -v = #1 SMP Thu Jun 4 18:07:41 UTC 2020 + +/usr/bin/uname -p = x86_64 +/bin/uname -X = unknown + +/bin/arch = x86_64 +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +/usr/bin/hostinfo = unknown +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /usr/lib64/mpi/gcc/mpich/bin +PATH: /home/brian/.local/bin +PATH: /home/brian/git-subrepo/lib +PATH: /home/brian/bin +PATH: /usr/local/bin +PATH: /usr/bin +PATH: /bin + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:4561: loading site script /usr/share/site/x86_64-unknown-linux-gnu +| #!/bin/sh +| # Site script for configure. It is resourced via $CONFIG_SITE environment varaible. +| +| # If user did not specify libdir, guess the correct target: +| # Use lib64 for 64 bit bi-arch targets, keep the default for the rest. +| if test "$libdir" = '${exec_prefix}/lib' ; then +| +| ac_config_site_64bit_host=NONE +| +| case "$host" in +| "" ) +| # User did not specify host target. +| # The native platform x86_64 is a bi-arch platform. +| # Try to detect cross-compilation to inferior architecture. +| +| # We are trying to guess 32-bit target compilation. It's not as easy as +| # it sounds, as there is possible several intermediate combinations. +| ac_config_site_cross_to_32bit_host=NONE +| +| # User defined -m32 in CFLAGS or CXXFLAGS or CC or CXX: +| # (It's sufficient for 32-bit, but alone may cause mis-behavior of some checks.) +| case "$CFLAGS $CXXFLAGS $CC $CXX" in +| *-m32*) +| ac_config_site_cross_to_32bit_host=YES +| ;; +| esac +| +| # Running with linux32: +| # (Changes detected platform, but not the toolchain target.) +| case "`/bin/uname -i`" in +| x86_64 | ppc64 | s390x | aarch64 ) +| ;; +| * ) +| ac_config_site_cross_to_32bit_host=YES +| ;; +| esac +| +| if test "x$ac_config_site_cross_to_32bit_host" = xNONE; then +| ac_config_site_64bit_host=YES +| fi +| +| ;; +| *x86_64* | *ppc64* | *s390x* | *aarch64* ) +| ac_config_site_64bit_host=YES +| ;; +| esac +| +| if test "x$ac_config_site_64bit_host" = xYES; then +| libdir='${exec_prefix}/lib64' +| fi +| fi +| +| # If user did not specify libexecdir, set the correct target: +| # Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib. +| +| if test "$libexecdir" = '${exec_prefix}/libexec' ; then +| libexecdir='${exec_prefix}/lib' +| fi +| +| # Continue with the standard behavior of configure defined in AC_SITE_LOAD: +| if test "x$prefix" != xNONE; then +| ac_site_file1=$prefix/share/config.site +| ac_site_file2=$prefix/etc/config.site +| else +| ac_site_file1=$ac_default_prefix/share/config.site +| ac_site_file2=$ac_default_prefix/etc/config.site +| fi +| for ac_site_file in "$ac_site_file1" "$ac_site_file2" +| do +| test "x$ac_site_file" = xNONE && continue +| if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then +| { $as_echo "/usr/share/site/x86_64-unknown-linux-gnu:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +| $as_echo "/usr/share/site/x86_64-unknown-linux-gnu: loading site script $ac_site_file" >&6;} +| sed 's/^/| /' "$ac_site_file" >&5 +| . "$ac_site_file" \ +| || { { $as_echo "/usr/share/site/x86_64-unknown-linux-gnu:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +| $as_echo "/usr/share/site/x86_64-unknown-linux-gnu: error: in \`$ac_pwd':" >&2;} +| as_fn_error $? "failed to load site script $ac_site_file +| See \`config.log' for more details" "$LINENO" 5; } +| fi +| done +configure:5642: checking build system type +configure:5656: result: x86_64-pc-linux-gnu +configure:5676: checking host system type +configure:5689: result: x86_64-pc-linux-gnu +configure:5709: checking target system type +configure:5722: result: x86_64-pc-linux-gnu +configure:5800: checking for gcc +configure:5816: found /usr/bin/gcc +configure:5827: result: gcc +configure:6056: checking for C compiler version +configure:6065: gcc --version >&5 +gcc (SUSE Linux) 7.5.0 +Copyright (C) 2017 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:6076: $? = 0 +configure:6065: gcc -v >&5 +Using built-in specs. +COLLECT_GCC=gcc +COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper +OFFLOAD_TARGET_NAMES=hsa:nvptx-none +Target: x86_64-suse-linux +Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/7 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --disable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-7 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux +Thread model: posix +gcc version 7.5.0 (SUSE Linux) +configure:6076: $? = 0 +configure:6065: gcc -V >&5 +gcc: error: unrecognized command line option '-V' +gcc: fatal error: no input files +compilation terminated. +configure:6076: $? = 1 +configure:6065: gcc -qversion >&5 +gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? +gcc: fatal error: no input files +compilation terminated. +configure:6076: $? = 1 +configure:6096: checking whether the C compiler works +configure:6118: gcc -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.c >&5 +configure:6122: $? = 0 +configure:6170: result: yes +configure:6173: checking for C compiler default output file name +configure:6175: result: a.out +configure:6181: checking for suffix of executables +configure:6188: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.c >&5 +configure:6192: $? = 0 +configure:6214: result: +configure:6236: checking whether we are cross compiling +configure:6244: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.c >&5 +configure:6248: $? = 0 +configure:6255: ./conftest +configure:6259: $? = 0 +configure:6274: result: no +configure:6279: checking for suffix of object files +configure:6301: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:6305: $? = 0 +configure:6326: result: o +configure:6330: checking whether we are using the GNU C compiler +configure:6349: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:6349: $? = 0 +configure:6358: result: yes +configure:6367: checking whether gcc accepts -g +configure:6387: gcc -c -g conftest.c >&5 +configure:6387: $? = 0 +configure:6428: result: yes +configure:6445: checking for gcc option to accept ISO C89 +configure:6508: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:6508: $? = 0 +configure:6521: result: none needed +configure:6549: checking whether gcc understands -c and -o together +configure:6571: gcc -c conftest.c -o conftest2.o +configure:6574: $? = 0 +configure:6571: gcc -c conftest.c -o conftest2.o +configure:6574: $? = 0 +configure:6586: result: yes +configure:6603: checking for gcc option to accept ISO C99 +configure:6752: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +conftest.c: In function 'test_varargs': +conftest.c:80:9: warning: variable 'fnumber' set but not used [-Wunused-but-set-variable] + float fnumber; + ^~~~~~~ +conftest.c:79:7: warning: variable 'number' set but not used [-Wunused-but-set-variable] + int number; + ^~~~~~ +conftest.c:78:15: warning: variable 'str' set but not used [-Wunused-but-set-variable] + const char *str; + ^~~ +configure:6752: $? = 0 +configure:6765: result: none needed +configure:6792: checking how to run the C preprocessor +configure:6823: gcc -E conftest.c +configure:6823: $? = 0 +configure:6837: gcc -E conftest.c +conftest.c:9:10: fatal error: ac_nonexistent.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:6837: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| /* end confdefs.h. */ +| #include +configure:6862: result: gcc -E +configure:6882: gcc -E conftest.c +configure:6882: $? = 0 +configure:6896: gcc -E conftest.c +conftest.c:9:10: fatal error: ac_nonexistent.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:6896: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| /* end confdefs.h. */ +| #include +configure:6944: checking for grep that handles long lines and -e +configure:7002: result: /usr/bin/grep +configure:7007: checking for egrep +configure:7069: result: /usr/bin/grep -E +configure:7074: checking for ANSI C header files +configure:7094: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7094: $? = 0 +configure:7167: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.c >&5 +configure:7167: $? = 0 +configure:7167: ./conftest +configure:7167: $? = 0 +configure:7178: result: yes +configure:7191: checking for sys/types.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7191: checking for sys/stat.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7191: checking for stdlib.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7191: checking for string.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7191: checking for memory.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7191: checking for strings.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7191: checking for inttypes.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7191: checking for stdint.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7191: checking for unistd.h +configure:7191: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7191: $? = 0 +configure:7191: result: yes +configure:7204: checking minix/config.h usability +configure:7204: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +conftest.c:52:10: fatal error: minix/config.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~ +compilation terminated. +configure:7204: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:7204: result: no +configure:7204: checking minix/config.h presence +configure:7204: gcc -E conftest.c +conftest.c:19:10: fatal error: minix/config.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~ +compilation terminated. +configure:7204: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| /* end confdefs.h. */ +| #include +configure:7204: result: no +configure:7204: checking for minix/config.h +configure:7204: result: no +configure:7225: checking whether it is safe to define __EXTENSIONS__ +configure:7243: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:7243: $? = 0 +configure:7250: result: yes +configure:7281: checking for a BSD-compatible install +configure:7349: result: /usr/bin/install -c +configure:7360: checking whether build environment is sane +configure:7415: result: yes +configure:7563: checking for a thread-safe mkdir -p +configure:7602: result: /usr/bin/mkdir -p +configure:7609: checking for gawk +configure:7625: found /usr/bin/gawk +configure:7636: result: gawk +configure:7647: checking whether make sets $(MAKE) +configure:7669: result: yes +configure:7699: checking for style of include used by make +configure:7727: result: GNU +configure:7761: checking whether make supports nested variables +configure:7778: result: yes +configure:7863: checking dependency style of gcc +configure:7974: result: gcc3 +configure:8033: checking whether to enable maintainer-specific portions of Makefiles +configure:8042: result: yes +configure:8105: checking for ar +configure:8121: found /usr/bin/ar +configure:8132: result: ar +configure:8158: checking the archiver (ar) interface +configure:8174: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:8174: $? = 0 +configure:8176: ar cru libconftest.a conftest.o >&5 +configure:8179: $? = 0 +configure:8207: result: ar +configure:8274: checking how to print strings +configure:8301: result: printf +configure:8322: checking for a sed that does not truncate output +configure:8386: result: /usr/bin/sed +configure:8404: checking for fgrep +configure:8466: result: /usr/bin/grep -F +configure:8501: checking for ld used by gcc +configure:8568: result: /usr/x86_64-suse-linux/bin/ld +configure:8575: checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld +configure:8590: result: yes +configure:8602: checking for BSD- or MS-compatible name lister (nm) +configure:8656: result: /usr/bin/nm -B +configure:8786: checking the name lister (/usr/bin/nm -B) interface +configure:8793: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:8796: /usr/bin/nm -B "conftest.o" +configure:8799: output +0000000000000000 B some_variable +configure:8806: result: BSD nm +configure:8809: checking whether ln -s works +configure:8813: result: yes +configure:8821: checking the maximum length of command line arguments +configure:8952: result: 1572864 +configure:9000: checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format +configure:9040: result: func_convert_file_noop +configure:9047: checking how to convert x86_64-pc-linux-gnu file names to toolchain format +configure:9067: result: func_convert_file_noop +configure:9074: checking for /usr/x86_64-suse-linux/bin/ld option to reload object files +configure:9081: result: -r +configure:9155: checking for objdump +configure:9171: found /usr/bin/objdump +configure:9182: result: objdump +configure:9214: checking how to recognize dependent libraries +configure:9414: result: pass_all +configure:9499: checking for dlltool +configure:9529: result: no +configure:9559: checking how to associate runtime and link libraries +configure:9586: result: printf %s\n +configure:9710: checking for archiver @FILE support +configure:9727: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:9727: $? = 0 +configure:9730: ar cru libconftest.a @conftest.lst >&5 +configure:9733: $? = 0 +configure:9738: ar cru libconftest.a @conftest.lst >&5 +ar: conftest.o: No such file or directory +configure:9741: $? = 1 +configure:9753: result: @ +configure:9811: checking for strip +configure:9827: found /usr/bin/strip +configure:9838: result: strip +configure:9910: checking for ranlib +configure:9926: found /usr/bin/ranlib +configure:9937: result: ranlib +configure:10039: checking command to parse /usr/bin/nm -B output from gcc object +configure:10192: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:10195: $? = 0 +configure:10199: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm +configure:10202: $? = 0 +configure:10268: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.c conftstm.o >&5 +configure:10271: $? = 0 +configure:10309: result: ok +configure:10356: checking for sysroot +configure:10386: result: no +configure:10393: checking for a working dd +configure:10431: result: /usr/bin/dd +configure:10435: checking how to truncate binary pipes +configure:10450: result: /usr/bin/dd bs=4096 count=1 +configure:10586: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:10589: $? = 0 +configure:10779: checking for mt +configure:10795: found /usr/bin/mt +configure:10806: result: mt +configure:10829: checking if mt is a manifest tool +configure:10835: mt '-?' +configure:10843: result: no +configure:11517: checking for dlfcn.h +configure:11517: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:11517: $? = 0 +configure:11517: result: yes +configure:11773: checking for objdir +configure:11788: result: .libs +configure:12052: checking if gcc supports -fno-rtti -fno-exceptions +configure:12070: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-rtti -fno-exceptions conftest.c >&5 +cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C +configure:12074: $? = 0 +configure:12087: result: no +configure:12455: checking for gcc option to produce PIC +configure:12462: result: -fPIC -DPIC +configure:12470: checking if gcc PIC flag -fPIC -DPIC works +configure:12488: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -DPIC -DPIC conftest.c >&5 +configure:12492: $? = 0 +configure:12505: result: yes +configure:12534: checking if gcc static flag -static works +configure:12562: result: no +configure:12577: checking if gcc supports -c -o file.o +configure:12598: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o out/conftest2.o conftest.c >&5 +configure:12602: $? = 0 +configure:12624: result: yes +configure:12632: checking if gcc supports -c -o file.o +configure:12679: result: yes +configure:12712: checking whether the gcc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries +configure:13985: result: yes +configure:14022: checking whether -lc should be explicitly linked in +configure:14030: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +configure:14033: $? = 0 +configure:14048: gcc -shared -fPIC -DPIC conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep -lc \>/dev/null 2\>\&1 +configure:14051: $? = 0 +configure:14065: result: no +configure:14225: checking dynamic linker characteristics +configure:14806: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack -Wl,-rpath -Wl,/foo conftest.c >&5 +configure:14806: $? = 0 +configure:15084: result: GNU/Linux ld.so +configure:15206: checking how to hardcode library paths into programs +configure:15231: result: immediate +configure:15779: checking whether stripping libraries is possible +configure:15784: result: yes +configure:15819: checking if libtool supports shared libraries +configure:15821: result: yes +configure:15824: checking whether to build shared libraries +configure:15849: result: yes +configure:15852: checking whether to build static libraries +configure:15856: result: no +configure:15905: checking whether make supports nested variables +configure:15922: result: yes +configure:16026: checking for g++ +configure:16042: found /usr/bin/g++ +configure:16053: result: g++ +configure:16080: checking for C++ compiler version +configure:16089: g++ --version >&5 +g++ (SUSE Linux) 7.5.0 +Copyright (C) 2017 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:16100: $? = 0 +configure:16089: g++ -v >&5 +Using built-in specs. +COLLECT_GCC=g++ +COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper +OFFLOAD_TARGET_NAMES=hsa:nvptx-none +Target: x86_64-suse-linux +Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/7 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --disable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-7 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux +Thread model: posix +gcc version 7.5.0 (SUSE Linux) +configure:16100: $? = 0 +configure:16089: g++ -V >&5 +g++: error: unrecognized command line option '-V' +g++: fatal error: no input files +compilation terminated. +configure:16100: $? = 1 +configure:16089: g++ -qversion >&5 +g++: error: unrecognized command line option '-qversion'; did you mean '--version'? +g++: fatal error: no input files +compilation terminated. +configure:16100: $? = 1 +configure:16104: checking whether we are using the GNU C++ compiler +configure:16123: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.cpp >&5 +configure:16123: $? = 0 +configure:16132: result: yes +configure:16141: checking whether g++ accepts -g +configure:16161: g++ -c -g conftest.cpp >&5 +configure:16161: $? = 0 +configure:16202: result: yes +configure:16227: checking dependency style of g++ +configure:16338: result: gcc3 +configure:16371: checking how to run the C++ preprocessor +configure:16398: g++ -E conftest.cpp +configure:16398: $? = 0 +configure:16412: g++ -E conftest.cpp +conftest.cpp:28:10: fatal error: ac_nonexistent.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:16412: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| #include +configure:16437: result: g++ -E +configure:16457: g++ -E conftest.cpp +configure:16457: $? = 0 +configure:16471: g++ -E conftest.cpp +conftest.cpp:28:10: fatal error: ac_nonexistent.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:16471: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| #include +configure:16633: checking for ld used by g++ +configure:16700: result: /usr/x86_64-suse-linux/bin/ld -m elf_x86_64 +configure:16707: checking if the linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) is GNU ld +configure:16722: result: yes +configure:16777: checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries +configure:17853: result: yes +configure:17889: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.cpp >&5 +configure:17892: $? = 0 +configure:18373: checking for g++ option to produce PIC +configure:18380: result: -fPIC -DPIC +configure:18388: checking if g++ PIC flag -fPIC -DPIC works +configure:18406: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -DPIC -DPIC conftest.cpp >&5 +configure:18410: $? = 0 +configure:18423: result: yes +configure:18446: checking if g++ static flag -static works +configure:18474: result: no +configure:18486: checking if g++ supports -c -o file.o +configure:18507: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o out/conftest2.o conftest.cpp >&5 +configure:18511: $? = 0 +configure:18533: result: yes +configure:18538: checking if g++ supports -c -o file.o +configure:18585: result: yes +configure:18615: checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries +configure:18655: result: yes +configure:18796: checking dynamic linker characteristics +configure:19582: result: GNU/Linux ld.so +configure:19647: checking how to hardcode library paths into programs +configure:19672: result: immediate +configure:19821: checking for Fortran compiler version +configure:19830: gfortran --version >&5 +GNU Fortran (SUSE Linux) 7.5.0 +Copyright (C) 2017 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:19841: $? = 0 +configure:19830: gfortran -v >&5 +Using built-in specs. +COLLECT_GCC=gfortran +COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper +OFFLOAD_TARGET_NAMES=hsa:nvptx-none +Target: x86_64-suse-linux +Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/7 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --disable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-7 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux +Thread model: posix +gcc version 7.5.0 (SUSE Linux) +configure:19841: $? = 0 +configure:19830: gfortran -V >&5 +gfortran: error: unrecognized command line option '-V' +gfortran: fatal error: no input files +compilation terminated. +configure:19841: $? = 1 +configure:19830: gfortran -qversion >&5 +gfortran: error: unrecognized command line option '-qversion'; did you mean '--version'? +gfortran: fatal error: no input files +compilation terminated. +configure:19841: $? = 1 +configure:19850: checking whether we are using the GNU Fortran compiler +configure:19863: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.F >&5 +configure:19863: $? = 0 +configure:19872: result: yes +configure:19878: checking whether gfortran accepts -g +configure:19889: gfortran -c -g conftest.f >&5 +configure:19889: $? = 0 +configure:19897: result: yes +configure:20029: checking if libtool supports shared libraries +configure:20031: result: yes +configure:20034: checking whether to build shared libraries +configure:20058: result: yes +configure:20061: checking whether to build static libraries +configure:20065: result: no +configure:20099: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.f >&5 +configure:20102: $? = 0 +configure:20572: checking for gfortran option to produce PIC +configure:20579: result: -fPIC +configure:20587: checking if gfortran PIC flag -fPIC works +configure:20605: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC conftest.f >&5 +configure:20609: $? = 0 +configure:20622: result: yes +configure:20645: checking if gfortran static flag -static works +configure:20673: result: no +configure:20685: checking if gfortran supports -c -o file.o +configure:20706: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o out/conftest2.o conftest.f >&5 +configure:20710: $? = 0 +configure:20732: result: yes +configure:20737: checking if gfortran supports -c -o file.o +configure:20784: result: yes +configure:20814: checking whether the gfortran linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries +configure:22037: result: yes +configure:22178: checking dynamic linker characteristics +configure:22958: result: GNU/Linux ld.so +configure:23023: checking how to hardcode library paths into programs +configure:23048: result: immediate +configure:23243: checking for Fortran 77 compiler version +configure:23252: gfortran --version >&5 +GNU Fortran (SUSE Linux) 7.5.0 +Copyright (C) 2017 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:23263: $? = 0 +configure:23252: gfortran -v >&5 +Using built-in specs. +COLLECT_GCC=gfortran +COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper +OFFLOAD_TARGET_NAMES=hsa:nvptx-none +Target: x86_64-suse-linux +Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/7 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --disable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-7 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux +Thread model: posix +gcc version 7.5.0 (SUSE Linux) +configure:23263: $? = 0 +configure:23252: gfortran -V >&5 +gfortran: error: unrecognized command line option '-V' +gfortran: fatal error: no input files +compilation terminated. +configure:23263: $? = 1 +configure:23252: gfortran -qversion >&5 +gfortran: error: unrecognized command line option '-qversion'; did you mean '--version'? +gfortran: fatal error: no input files +compilation terminated. +configure:23263: $? = 1 +configure:23272: checking whether we are using the GNU Fortran 77 compiler +configure:23285: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.F >&5 +configure:23285: $? = 0 +configure:23294: result: yes +configure:23300: checking whether gfortran accepts -g +configure:23311: gfortran -c -g conftest.f >&5 +configure:23311: $? = 0 +configure:23319: result: yes +configure:23448: checking if libtool supports shared libraries +configure:23450: result: yes +configure:23453: checking whether to build shared libraries +configure:23477: result: yes +configure:23480: checking whether to build static libraries +configure:23484: result: no +configure:23846: checking for gfortran option to produce PIC +configure:23853: result: -fPIC +configure:23861: checking if gfortran PIC flag -fPIC works +configure:23879: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC conftest.f >&5 +configure:23883: $? = 0 +configure:23896: result: yes +configure:23919: checking if gfortran static flag -static works +configure:23947: result: no +configure:23959: checking if gfortran supports -c -o file.o +configure:23980: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -o out/conftest2.o conftest.f >&5 +configure:23984: $? = 0 +configure:24006: result: yes +configure:24011: checking if gfortran supports -c -o file.o +configure:24058: result: yes +configure:24088: checking whether the gfortran linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries +configure:25311: result: yes +configure:25452: checking dynamic linker characteristics +configure:26232: result: GNU/Linux ld.so +configure:26297: checking how to hardcode library paths into programs +configure:26322: result: immediate +configure:28317: checking hcoll/api/hcoll_api.h usability +configure:28317: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.c >&5 +conftest.c:61:10: fatal error: hcoll/api/hcoll_api.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:28317: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:28317: result: no +configure:28317: checking hcoll/api/hcoll_api.h presence +configure:28317: gcc -E conftest.c +conftest.c:28:10: fatal error: hcoll/api/hcoll_api.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:28317: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| #include +configure:28317: result: no +configure:28317: checking for hcoll/api/hcoll_api.h +configure:28317: result: no +configure:28325: checking for hcoll_init in -lhcoll +configure:28350: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.c -lhcoll >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lhcoll +collect2: error: ld returned 1 exit status +configure:28350: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char hcoll_init (); +| int +| main () +| { +| return hcoll_init (); +| ; +| return 0; +| } +configure:28359: result: no +configure:28743: RUNNING PREREQ FOR ch3:nemesis +configure:29623: ===== configuring src/mpl ===== +configure:29788: running /bin/sh ./configure --disable-option-checking '--prefix=/home/brian/mpich-install' --disable-versioning --enable-embedded '--enable-sharedlibs=gcc' '--enable-shared' '--enable-static=no' '--enable-lib-depend' '--disable-rpath' '--disable-silent-rules' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--with-hwloc-prefix=embedded' '--enable-fortran=all' '--enable-romio' '--with-file-system=ufs+daos' '--with-daos=/usr' '--with-cart=/usr' '--disable-checkerrors' '--disable-perftest' '--disable-large-tests' '--disable-ft-tests' '--disable-comm-overlap-tests' '--enable-threads=single' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic ' 'CXXFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'FCFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'FFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,noexecstack' 'MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --cache-file=/dev/null --srcdir=. +configure:29808: ===== done with src/mpl configure ===== +configure:29814: sourcing src/mpl/localdefs +CPPFLAGS(=' ') does not contain '-I/home/brian/daos/rpm/mpich/src/mpl/include', appending +CPPFLAGS(=' -I/home/brian/daos/rpm/mpich/src/mpl/include') does not contain '-I/home/brian/daos/rpm/mpich/src/mpl/include', appending +LIBS(='') does not contain '-lopa', prepending +configure:29931: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -Wl,-z,noexecstack conftest.c -lopa >&5 +conftest.c: In function 'main': +conftest.c:38:15: error: incompatible type for argument 1 of 'OPA_store_int' + OPA_store_int(i,10); + ^ +In file included from /usr/include/primitives/opa_gcc_intel_32_64.h:11:0, + from /usr/include/opa_primitives.h:106, + from conftest.c:31: +/usr/include/primitives/opa_gcc_intel_32_64_ops.h:38:25: note: expected 'OPA_int_t * {aka struct *}' but argument is of type 'OPA_int_t {aka struct }' + static _opa_inline void OPA_store_int(OPA_int_t *ptr, int val) + ^~~~~~~~~~~~~ +conftest.c:39:1: error: too many arguments to function 'OPA_fetch_and_incr_int' + OPA_fetch_and_incr_int(&i,5); + ^~~~~~~~~~~~~~~~~~~~~~ +In file included from /usr/include/primitives/opa_gcc_intel_32_64.h:11:0, + from /usr/include/opa_primitives.h:106, + from conftest.c:31: +/usr/include/primitives/opa_emulated.h:113:24: note: declared here + static _opa_inline int OPA_fetch_and_incr_int_by_faa(OPA_int_t *ptr) + ^ +configure:29931: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| /* end confdefs.h. */ +| #include "opa_primitives.h" +| +| int +| main () +| { +| +| OPA_int_t i; +| OPA_store_int(i,10); +| OPA_fetch_and_incr_int(&i,5); +| +| ; +| return 0; +| } +CPPFLAGS(=' -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include') does not contain '-I/home/brian/daos/rpm/mpich/src/openpa/src', appending +CPPFLAGS(=' -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src') does not contain '-I/home/brian/daos/rpm/mpich/src/openpa/src', appending +opa_subdir_args(='--disable-versioning --enable-embedded') does not contain '--with-atomic-primitives=auto_allow_emulation', appending +configure:30005: ===== configuring src/openpa ===== +configure:30170: running /bin/sh ./configure --disable-option-checking '--prefix=/home/brian/mpich-install' --disable-versioning --enable-embedded --with-atomic-primitives=auto_allow_emulation '--enable-sharedlibs=gcc' '--enable-shared' '--enable-static=no' '--enable-lib-depend' '--disable-rpath' '--disable-silent-rules' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--with-hwloc-prefix=embedded' '--enable-fortran=all' '--enable-romio' '--with-file-system=ufs+daos' '--with-daos=/usr' '--with-cart=/usr' '--disable-checkerrors' '--disable-perftest' '--disable-large-tests' '--disable-ft-tests' '--disable-comm-overlap-tests' '--enable-threads=single' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic ' 'CXXFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'FCFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'FFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,noexecstack' 'MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --cache-file=/dev/null --srcdir=. +configure:30190: ===== done with src/openpa configure ===== +configure:30738: ===== configuring modules/yaksa ===== +configure:30903: running /bin/sh ./configure --disable-option-checking '--prefix=/home/brian/mpich-install' --enable-embedded '--enable-sharedlibs=gcc' '--enable-shared' '--enable-static=no' '--enable-lib-depend' '--disable-rpath' '--disable-silent-rules' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--with-hwloc-prefix=embedded' '--enable-fortran=all' '--enable-romio' '--with-file-system=ufs+daos' '--with-daos=/usr' '--with-cart=/usr' '--disable-checkerrors' '--disable-perftest' '--disable-large-tests' '--disable-ft-tests' '--disable-comm-overlap-tests' '--enable-threads=single' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic ' 'CXXFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'FCFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'FFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,noexecstack' 'MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --cache-file=/dev/null --srcdir=. +configure:30923: ===== done with modules/yaksa configure ===== +CPPFLAGS(=' -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src') does not contain '-I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include', appending +CPPFLAGS(=' -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include') does not contain '-I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include', appending +configure:31066: checking for type of weak symbol alias support +configure:31090: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -Wl,-z,noexecstack conftest.c >&5 +configure:31090: $? = 0 +configure:31114: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include conftest.c >&5 +configure:31114: $? = 0 +configure:31117: mv conftest.o pac_conftest.o +configure:31120: $? = 0 +configure:31157: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -Wl,-z,noexecstack conftest.c pac_conftest.o >&5 +configure:31157: $? = 0 +configure:31172: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include conftest.c >&5 +configure:31172: $? = 0 +configure:31175: mv conftest.o pac_conftest.o +configure:31178: $? = 0 +configure:31216: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -Wl,-z,noexecstack conftest.c pac_conftest.o >&5 +configure:31216: $? = 0 +configure:31373: result: pragma weak +configure:31391: checking whether __attribute__ ((weak)) allowed +configure:31408: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:37:5: warning: unused variable 'a' [-Wunused-variable] + int a; + ^ +configure:31408: $? = 0 +configure:31415: result: yes +configure:31419: checking whether __attribute__ ((weak_import)) allowed +configure:31436: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include conftest.c >&5 +conftest.c:33:1: warning: 'weak_import' attribute directive ignored [-Wattributes] + int foo(int) __attribute__ ((weak_import)); + ^~~ +conftest.c: In function 'main': +conftest.c:37:5: warning: unused variable 'a' [-Wunused-variable] + int a; + ^ +configure:31436: $? = 0 +configure:31443: result: yes +configure:31446: checking whether __attribute__((weak,alias(...))) allowed +configure:31472: gcc -c -Werror -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include conftest.c >&5 +configure:31472: $? = 0 +configure:31485: result: yes +configure:31507: checking for multiple weak symbol support +configure:31530: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include conftest.c >&5 +conftest.c: In function 'Foo': +conftest.c:44:5: warning: type of 'a' defaults to 'int' [-Wimplicit-int] + int Foo(a) { return a; } + ^~~ +configure:31530: $? = 0 +configure:31533: mv conftest.o pac_conftest.o +configure:31536: $? = 0 +configure:31573: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -Wl,-z,noexecstack conftest.c pac_conftest.o >&5 +configure:31573: $? = 0 +configure:31623: result: yes +configure:31675: checking if gcc supports -fvisibility=hidden +configure:31691: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fvisibility=hidden -Werror -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -Wl,-z,noexecstack conftest.c >&5 +configure:31691: $? = 0 +configure:31710: result: yes +configure:31719: checking whether to enable symbol visibility +configure:31721: result: yes (via -fvisibility=hidden) +configure:31755: ===== configuring modules/json-c ===== +configure:31920: running /bin/sh ./configure --disable-option-checking '--prefix=/home/brian/mpich-install' --disable-werror '--enable-sharedlibs=gcc' '--enable-shared' '--enable-static=no' '--enable-lib-depend' '--disable-rpath' '--disable-silent-rules' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--with-hwloc-prefix=embedded' '--enable-fortran=all' '--enable-romio' '--with-file-system=ufs+daos' '--with-daos=/usr' '--with-cart=/usr' '--disable-checkerrors' '--disable-perftest' '--disable-large-tests' '--disable-ft-tests' '--disable-comm-overlap-tests' '--enable-threads=single' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic ' 'CXXFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'FCFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'FFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,noexecstack' 'MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --cache-file=/dev/null --srcdir=. +configure:31940: ===== done with modules/json-c configure ===== +CPPFLAGS(=' -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include') does not contain '-I/home/brian/daos/rpm/mpich/modules/json-c', appending +CPPFLAGS(=' -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c') does not contain '-I/home/brian/daos/rpm/mpich/modules/json-c', appending +configure:32103: checking for pkg-config +configure:32121: found /usr/bin/pkg-config +configure:32133: result: /usr/bin/pkg-config +configure:32158: checking pkg-config is at least version 0.9.0 +configure:32161: result: yes +configure:32170: checking for X +configure:32278: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:37:10: fatal error: X11/Xlib.h: No such file or directory + #include + ^~~~~~~~~~~~ +compilation terminated. +configure:32278: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| /* end confdefs.h. */ +| #include +configure:32309: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c -lX11 >&5 +conftest.c:37:10: fatal error: X11/Xlib.h: No such file or directory + #include + ^~~~~~~~~~~~ +compilation terminated. +configure:32309: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| /* end confdefs.h. */ +| #include +| int +| main () +| { +| XrmInitialize () +| ; +| return 0; +| } +configure:32348: result: no +configure:32385: checking hwloc building mode +configure:32387: result: embedded +configure:32416: hwloc builddir: /home/brian/daos/rpm/mpich/src/hwloc +configure:32418: hwloc srcdir: /home/brian/daos/rpm/mpich/src/hwloc +configure:32426: checking for hwloc version +configure:32432: result: 2.0.3rc2-git +configure:32470: checking if want hwloc maintainer support +configure:32498: result: disabled (embedded mode) +configure:32504: checking for hwloc directory prefix +configure:32506: result: src/hwloc/ +configure:32519: checking for hwloc symbol prefix +configure:32541: result: hwloc_ +configure:32556: checking for gcc option to accept ISO C99 +configure:32718: result: none needed +configure:32769: checking size of void * +configure:32774: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:32774: $? = 0 +configure:32774: ./conftest +configure:32774: $? = 0 +configure:32788: result: 8 +configure:32808: checking which OS support to include +configure:32825: result: Linux +configure:32943: checking which CPU support to include +configure:32963: result: x86_64 +configure:32988: checking size of unsigned long +configure:32993: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:32993: $? = 0 +configure:32993: ./conftest +configure:32993: $? = 0 +configure:33007: result: 8 +configure:33026: checking size of unsigned int +configure:33031: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:33031: $? = 0 +configure:33031: ./conftest +configure:33031: $? = 0 +configure:33045: result: 4 +configure:33067: checking for the C compiler vendor +configure:33096: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:57:2: error: #error "symbol __ANDROID__ not defined" + #error "symbol __ANDROID__ not defined" + ^~~~~ +conftest.c:58:1: error: unknown type name 'choke' + choke me + ^~~~~ +conftest.c:58:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input +configure:33096: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| /* end confdefs.h. */ +| +| #ifndef __ANDROID__ +| #error "symbol __ANDROID__ not defined" +| choke me +| #endif +configure:33113: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:57:2: error: #error "condition defined(__INTEL_COMPILER) || defined(__ICC) not met" + #error "condition defined(__INTEL_COMPILER) || defined(__ICC) not met" + ^~~~~ +conftest.c:58:1: error: unknown type name 'choke' + choke me + ^~~~~ +conftest.c:58:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input +configure:33113: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| /* end confdefs.h. */ +| +| #if !( defined(__INTEL_COMPILER) || defined(__ICC) ) +| #error "condition defined(__INTEL_COMPILER) || defined(__ICC) not met" +| choke me +| #endif +configure:33130: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:33130: $? = 0 +configure:33628: result: gnu +configure:33634: checking for __attribute__ +configure:33658: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:33658: $? = 0 +configure:33683: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:33683: $? = 0 +configure:33725: result: yes +configure:33729: checking for __attribute__(aligned) +configure:33749: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:33749: $? = 0 +configure:33837: result: yes +configure:33849: checking for __attribute__(always_inline) +configure:33869: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:33869: $? = 0 +configure:33957: result: yes +configure:33966: checking for __attribute__(cold) +configure:33989: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:33989: $? = 0 +configure:34077: result: yes +configure:34086: checking for __attribute__(const) +configure:34109: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:34109: $? = 0 +configure:34197: result: yes +configure:34207: checking for __attribute__(deprecated) +configure:34230: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:34230: $? = 0 +configure:34318: result: yes +configure:34338: checking for __attribute__(format) +configure:34360: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:34360: $? = 0 +configure:34430: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wall -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'usage': +conftest.c:61:47: warning: format '%d' expects argument of type 'int', but argument 3 has type 'int *' [-Wformat=] + return this_printf (*argument, "%d", argument); /* This should produce a format warning */ + ~^ + %ls +configure:34430: $? = 0 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| /* end confdefs.h. */ +| +| static int usage (int * argument); +| extern int this_printf (int arg1, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); +| +| static int usage (int * argument) { +| return this_printf (*argument, "%d", argument); /* This should produce a format warning */ +| } +| /* The autoconf-generated main-function is int main(), which produces a warning by itself */ +| int main(void); +| +| int +| main () +| { +| +| int i=4711; +| i=usage(&i); +| +| ; +| return 0; +| } +configure:34466: result: yes +configure:34475: checking for __attribute__(hot) +configure:34498: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:34498: $? = 0 +configure:34586: result: yes +configure:34595: checking for __attribute__(malloc) +configure:34621: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:34621: $? = 0 +configure:34709: result: yes +configure:34725: checking for __attribute__(may_alias) +configure:34745: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:34745: $? = 0 +configure:34833: result: yes +configure:34843: checking for __attribute__(no_instrument_function) +configure:34863: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:34863: $? = 0 +configure:34951: result: yes +configure:34976: checking for __attribute__(nonnull) +configure:34999: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:34999: $? = 0 +configure:35071: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wall -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'usage': +conftest.c:62:21: warning: null argument where non-null required (argument 1) [-Wnonnull] + return square( ((void*)0) ); /* This should produce an argument must be nonnull warning */ + ^~~~~~ +configure:35071: $? = 0 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| /* end confdefs.h. */ +| +| static int usage(int * argument); +| int square(int * argument) __attribute__ ((__nonnull__)); +| int square(int * argument) { return (*argument) * (*argument); } +| +| static int usage(int * argument) { +| return square( ((void*)0) ); /* This should produce an argument must be nonnull warning */ +| } +| /* The autoconf-generated main-function is int main(), which produces a warning by itself */ +| int main(void); +| +| int +| main () +| { +| +| int i=4711; +| i=usage(&i); +| +| ; +| return 0; +| } +configure:35107: result: yes +configure:35117: checking for __attribute__(noreturn) +configure:35146: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:35146: $? = 0 +configure:35234: result: yes +configure:35243: checking for __attribute__(packed) +configure:35268: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:35268: $? = 0 +configure:35356: result: yes +configure:35365: checking for __attribute__(pure) +configure:35388: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:35388: $? = 0 +configure:35476: result: yes +configure:35502: checking for __attribute__(sentinel) +configure:35524: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:35524: $? = 0 +configure:35596: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wall -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'usage': +conftest.c:62:14: warning: missing sentinel in function call [-Wformat=] + return my_execlp ("lala", "/home/there", last_arg_should_be_null); /* This should produce a warning */ + ^~~~~~ +configure:35596: $? = 0 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| /* end confdefs.h. */ +| +| static int usage(int * argument); +| int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__)); +| +| static int usage(int * argument) { +| void * last_arg_should_be_null = argument; +| return my_execlp ("lala", "/home/there", last_arg_should_be_null); /* This should produce a warning */ +| } +| /* The autoconf-generated main-function is int main(), which produces a warning by itself */ +| int main(void); +| +| int +| main () +| { +| +| int i=4711; +| i=usage(&i); +| +| ; +| return 0; +| } +configure:35632: result: yes +configure:35641: checking for __attribute__(unused) +configure:35664: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:35664: $? = 0 +configure:35752: result: yes +configure:35777: checking for __attribute__(warn_unused_result) +configure:35800: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:35800: $? = 0 +configure:35876: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wall -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'usage': +conftest.c:62:12: warning: ignoring return value of 'foo', declared with attribute warn_unused_result [-Wunused-result] + foo (*argument); /* Should produce an unused result warning */ + ^~~~~~~~~~~~~~~ +configure:35876: $? = 0 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| /* end confdefs.h. */ +| +| static int usage(int * argument); +| int foo(int arg) __attribute__ ((__warn_unused_result__)); +| +| int foo(int arg) { return arg + 3; } +| static int usage(int * argument) { +| foo (*argument); /* Should produce an unused result warning */ +| return 0; +| } +| +| /* The autoconf-generated main-function is int main(), which produces a warning by itself */ +| int main(void); +| +| int +| main () +| { +| +| int i=4711; +| i=usage(&i); +| +| ; +| return 0; +| } +configure:35912: result: yes +configure:35922: checking for __attribute__(weak_alias) +configure:35946: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:35946: $? = 0 +configure:36034: result: yes +configure:36158: checking whether to enable symbol visibility +configure:36160: result: no (disabled) +configure:36255: checking whether the C compiler rejects function calls with too many arguments +configure:36271: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'foo': +conftest.c:77:32: error: too many arguments to function 'one_arg' + int foo(void) { return one_arg(1, 2); } + ^~~~~~~ +conftest.c:76:20: note: declared here + extern int one_arg(int x); + ^~~~~~~ +configure:36271: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| /* end confdefs.h. */ +| +| extern int one_arg(int x); +| int foo(void) { return one_arg(1, 2); } +| +| int +| main () +| { +| +| ; +| return 0; +| } +configure:36276: result: yes +configure:36280: checking whether the C compiler rejects function calls with too few arguments +configure:36296: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'foo': +conftest.c:77:32: error: too few arguments to function 'two_arg' + int foo(void) { return two_arg(3); } + ^~~~~~~ +conftest.c:76:20: note: declared here + extern int two_arg(int x, int y); + ^~~~~~~ +conftest.c:77:9: warning: control reaches end of non-void function [-Wreturn-type] + int foo(void) { return two_arg(3); } + ^~~ +configure:36296: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| /* end confdefs.h. */ +| +| extern int two_arg(int x, int y); +| int foo(void) { return two_arg(3); } +| +| int +| main () +| { +| +| ; +| return 0; +| } +configure:36301: result: yes +configure:36339: checking for unistd.h +configure:36339: result: yes +configure:36351: checking dirent.h usability +configure:36351: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:36351: $? = 0 +configure:36351: result: yes +configure:36351: checking dirent.h presence +configure:36351: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +configure:36351: $? = 0 +configure:36351: result: yes +configure:36351: checking for dirent.h +configure:36351: result: yes +configure:36363: checking for strings.h +configure:36363: result: yes +configure:36375: checking ctype.h usability +configure:36375: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:36375: $? = 0 +configure:36375: result: yes +configure:36375: checking ctype.h presence +configure:36375: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +configure:36375: $? = 0 +configure:36375: result: yes +configure:36375: checking for ctype.h +configure:36375: result: yes +configure:36388: checking for strcasecmp +configure:36388: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +conftest.c:102:6: warning: conflicting types for built-in function 'strcasecmp' [-Wbuiltin-declaration-mismatch] + char strcasecmp (); + ^~~~~~~~~~ +configure:36388: $? = 0 +configure:36388: result: yes +configure:36395: checking whether strcasecmp is declared +configure:36395: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:36395: $? = 0 +configure:36395: result: yes +configure:36398: checking whether function strcasecmp has a complete prototype +configure:36413: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:116:12: warning: passing argument 1 of 'strcasecmp' makes pointer from integer without a cast [-Wint-conversion] + strcasecmp(1,2,3,4,5,6,7,8,9,10); + ^ +In file included from /usr/include/string.h:431:0, + from conftest.c:99: +/usr/include/strings.h:116:12: note: expected 'const char *' but argument is of type 'int' + extern int strcasecmp (const char *__s1, const char *__s2) + ^~~~~~~~~~ +conftest.c:116:14: warning: passing argument 2 of 'strcasecmp' makes pointer from integer without a cast [-Wint-conversion] + strcasecmp(1,2,3,4,5,6,7,8,9,10); + ^ +In file included from /usr/include/string.h:431:0, + from conftest.c:99: +/usr/include/strings.h:116:12: note: expected 'const char *' but argument is of type 'int' + extern int strcasecmp (const char *__s1, const char *__s2) + ^~~~~~~~~~ +conftest.c:116:1: error: too many arguments to function 'strcasecmp' + strcasecmp(1,2,3,4,5,6,7,8,9,10); + ^~~~~~~~~~ +In file included from /usr/include/string.h:431:0, + from conftest.c:99: +/usr/include/strings.h:116:12: note: declared here + extern int strcasecmp (const char *__s1, const char *__s2) + ^~~~~~~~~~ +conftest.c:116:1: warning: statement with no effect [-Wunused-value] + strcasecmp(1,2,3,4,5,6,7,8,9,10); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +configure:36413: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| strcasecmp(1,2,3,4,5,6,7,8,9,10); +| +| ; +| return 0; +| } +configure:36418: result: yes +configure:36437: checking for strncasecmp +configure:36437: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +conftest.c:104:6: warning: conflicting types for built-in function 'strncasecmp' [-Wbuiltin-declaration-mismatch] + char strncasecmp (); + ^~~~~~~~~~~ +configure:36437: $? = 0 +configure:36437: result: yes +configure:36444: checking whether strncasecmp is declared +configure:36444: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:36444: $? = 0 +configure:36444: result: yes +configure:36447: checking whether function strncasecmp has a complete prototype +configure:36462: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:118:13: warning: passing argument 1 of 'strncasecmp' makes pointer from integer without a cast [-Wint-conversion] + strncasecmp(1,2,3,4,5,6,7,8,9,10); + ^ +In file included from /usr/include/string.h:431:0, + from conftest.c:101: +/usr/include/strings.h:120:12: note: expected 'const char *' but argument is of type 'int' + extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) + ^~~~~~~~~~~ +conftest.c:118:15: warning: passing argument 2 of 'strncasecmp' makes pointer from integer without a cast [-Wint-conversion] + strncasecmp(1,2,3,4,5,6,7,8,9,10); + ^ +In file included from /usr/include/string.h:431:0, + from conftest.c:101: +/usr/include/strings.h:120:12: note: expected 'const char *' but argument is of type 'int' + extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) + ^~~~~~~~~~~ +conftest.c:118:1: error: too many arguments to function 'strncasecmp' + strncasecmp(1,2,3,4,5,6,7,8,9,10); + ^~~~~~~~~~~ +In file included from /usr/include/string.h:431:0, + from conftest.c:101: +/usr/include/strings.h:120:12: note: declared here + extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) + ^~~~~~~~~~~ +conftest.c:118:1: warning: statement with no effect [-Wunused-value] + strncasecmp(1,2,3,4,5,6,7,8,9,10); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +configure:36462: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| strncasecmp(1,2,3,4,5,6,7,8,9,10); +| +| ; +| return 0; +| } +configure:36467: result: yes +configure:36487: checking for strftime +configure:36487: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +conftest.c:106:6: warning: conflicting types for built-in function 'strftime' [-Wbuiltin-declaration-mismatch] + char strftime (); + ^~~~~~~~ +configure:36487: $? = 0 +configure:36487: result: yes +configure:36498: checking for setlocale +configure:36498: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:36498: $? = 0 +configure:36498: result: yes +configure:36508: checking for stdint.h +configure:36508: result: yes +configure:36520: checking sys/mman.h usability +configure:36520: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:36520: $? = 0 +configure:36520: result: yes +configure:36520: checking sys/mman.h presence +configure:36520: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +configure:36520: $? = 0 +configure:36520: result: yes +configure:36520: checking for sys/mman.h +configure:36520: result: yes +configure:36533: checking for KAFFINITY +configure:36533: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36533: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (KAFFINITY)) +| return 0; +| ; +| return 0; +| } +configure:36533: result: no +configure:36543: checking for PROCESSOR_CACHE_TYPE +configure:36543: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36543: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (PROCESSOR_CACHE_TYPE)) +| return 0; +| ; +| return 0; +| } +configure:36543: result: no +configure:36553: checking for CACHE_DESCRIPTOR +configure:36553: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36553: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (CACHE_DESCRIPTOR)) +| return 0; +| ; +| return 0; +| } +configure:36553: result: no +configure:36563: checking for LOGICAL_PROCESSOR_RELATIONSHIP +configure:36563: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36563: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (LOGICAL_PROCESSOR_RELATIONSHIP)) +| return 0; +| ; +| return 0; +| } +configure:36563: result: no +configure:36573: checking for RelationProcessorPackage +configure:36573: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36573: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (RelationProcessorPackage)) +| return 0; +| ; +| return 0; +| } +configure:36573: result: no +configure:36583: checking for SYSTEM_LOGICAL_PROCESSOR_INFORMATION +configure:36583: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36583: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (SYSTEM_LOGICAL_PROCESSOR_INFORMATION)) +| return 0; +| ; +| return 0; +| } +configure:36583: result: no +configure:36593: checking for GROUP_AFFINITY +configure:36593: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36593: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (GROUP_AFFINITY)) +| return 0; +| ; +| return 0; +| } +configure:36593: result: no +configure:36603: checking for PROCESSOR_RELATIONSHIP +configure:36603: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36603: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (PROCESSOR_RELATIONSHIP)) +| return 0; +| ; +| return 0; +| } +configure:36603: result: no +configure:36613: checking for NUMA_NODE_RELATIONSHIP +configure:36613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36613: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (NUMA_NODE_RELATIONSHIP)) +| return 0; +| ; +| return 0; +| } +configure:36613: result: no +configure:36623: checking for CACHE_RELATIONSHIP +configure:36623: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36623: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (CACHE_RELATIONSHIP)) +| return 0; +| ; +| return 0; +| } +configure:36623: result: no +configure:36633: checking for PROCESSOR_GROUP_INFO +configure:36633: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36633: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (PROCESSOR_GROUP_INFO)) +| return 0; +| ; +| return 0; +| } +configure:36633: result: no +configure:36643: checking for GROUP_RELATIONSHIP +configure:36643: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36643: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (GROUP_RELATIONSHIP)) +| return 0; +| ; +| return 0; +| } +configure:36643: result: no +configure:36653: checking for SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX +configure:36653: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36653: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)) +| return 0; +| ; +| return 0; +| } +configure:36653: result: no +configure:36663: checking for PSAPI_WORKING_SET_EX_BLOCK +configure:36663: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36663: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (PSAPI_WORKING_SET_EX_BLOCK)) +| return 0; +| ; +| return 0; +| } +configure:36663: result: no +configure:36673: checking for PSAPI_WORKING_SET_EX_INFORMATION +configure:36673: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36673: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (PSAPI_WORKING_SET_EX_INFORMATION)) +| return 0; +| ; +| return 0; +| } +configure:36673: result: no +configure:36683: checking for PROCESSOR_NUMBER +configure:36683: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -D_WIN32_WINNT=0x0601 conftest.c >&5 +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36683: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof (PROCESSOR_NUMBER)) +| return 0; +| ; +| return 0; +| } +configure:36683: result: no +configure:36695: checking for main in -lgdi32 +configure:36714: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c -lgdi32 >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lgdi32 +collect2: error: ld returned 1 exit status +configure:36714: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| +| +| int +| main () +| { +| return main (); +| ; +| return 0; +| } +configure:36723: result: no +configure:36732: checking for PostQuitMessage in -luser32 +configure:36757: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c -luser32 >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -luser32 +collect2: error: ld returned 1 exit status +configure:36757: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char PostQuitMessage (); +| int +| main () +| { +| return PostQuitMessage (); +| ; +| return 0; +| } +configure:36766: result: no +configure:36773: checking windows.h usability +configure:36773: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:120:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36773: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:36773: result: no +configure:36773: checking windows.h presence +configure:36773: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:87:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:36773: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +configure:36773: result: no +configure:36773: checking for windows.h +configure:36773: result: no +configure:36786: checking sys/lgrp_user.h usability +configure:36786: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:120:10: fatal error: sys/lgrp_user.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~ +compilation terminated. +configure:36786: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:36786: result: no +configure:36786: checking sys/lgrp_user.h presence +configure:36786: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:87:10: fatal error: sys/lgrp_user.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~ +compilation terminated. +configure:36786: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +configure:36786: result: no +configure:36786: checking for sys/lgrp_user.h +configure:36786: result: no +configure:36855: checking kstat.h usability +configure:36855: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:120:10: fatal error: kstat.h: No such file or directory + #include + ^~~~~~~~~ +compilation terminated. +configure:36855: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:36855: result: no +configure:36855: checking kstat.h presence +configure:36855: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:87:10: fatal error: kstat.h: No such file or directory + #include + ^~~~~~~~~ +compilation terminated. +configure:36855: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| /* end confdefs.h. */ +| #include +configure:36855: result: no +configure:36855: checking for kstat.h +configure:36855: result: no +configure:36904: checking whether fabsf is declared +configure:36904: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:36904: $? = 0 +configure:36904: result: yes +configure:36917: checking for fabsf in -lm +configure:36942: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c -lm >&5 +conftest.c:95:6: warning: conflicting types for built-in function 'fabsf' [-Wbuiltin-declaration-mismatch] + char fabsf (); + ^~~~~ +configure:36942: $? = 0 +configure:36951: result: yes +configure:36960: checking whether modff is declared +configure:36960: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:36960: $? = 0 +configure:36960: result: yes +configure:36973: checking for modff in -lm +configure:36998: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c -lm >&5 +conftest.c:96:6: warning: conflicting types for built-in function 'modff' [-Wbuiltin-declaration-mismatch] + char modff (); + ^~~~~ +configure:36998: $? = 0 +configure:37007: result: yes +configure:37022: checking picl.h usability +configure:37022: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:122:10: fatal error: picl.h: No such file or directory + #include + ^~~~~~~~ +compilation terminated. +configure:37022: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:37022: result: no +configure:37022: checking picl.h presence +configure:37022: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:89:10: fatal error: picl.h: No such file or directory + #include + ^~~~~~~~ +compilation terminated. +configure:37022: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| /* end confdefs.h. */ +| #include +configure:37022: result: no +configure:37022: checking for picl.h +configure:37022: result: no +configure:37073: checking whether _SC_NPROCESSORS_ONLN is declared +configure:37073: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37073: $? = 0 +configure:37073: result: yes +configure:37089: checking whether _SC_NPROCESSORS_CONF is declared +configure:37089: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37089: $? = 0 +configure:37089: result: yes +configure:37105: checking whether _SC_NPROC_ONLN is declared +configure:37105: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:100:10: error: '_SC_NPROC_ONLN' undeclared (first use in this function); did you mean '_SC_NPROCESSORS_ONLN'? + (void) _SC_NPROC_ONLN; + ^~~~~~~~~~~~~~ + _SC_NPROCESSORS_ONLN +conftest.c:100:10: note: each undeclared identifier is reported only once for each function it appears in +configure:37105: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| #ifndef _SC_NPROC_ONLN +| #ifdef __cplusplus +| (void) _SC_NPROC_ONLN; +| #else +| (void) _SC_NPROC_ONLN; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:37105: result: no +configure:37121: checking whether _SC_NPROC_CONF is declared +configure:37121: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:101:10: error: '_SC_NPROC_CONF' undeclared (first use in this function); did you mean '_SC_NPROCESSORS_CONF'? + (void) _SC_NPROC_CONF; + ^~~~~~~~~~~~~~ + _SC_NPROCESSORS_CONF +conftest.c:101:10: note: each undeclared identifier is reported only once for each function it appears in +configure:37121: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| #ifndef _SC_NPROC_CONF +| #ifdef __cplusplus +| (void) _SC_NPROC_CONF; +| #else +| (void) _SC_NPROC_CONF; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:37121: result: no +configure:37137: checking whether _SC_PAGESIZE is declared +configure:37137: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37137: $? = 0 +configure:37137: result: yes +configure:37153: checking whether _SC_PAGE_SIZE is declared +configure:37153: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37153: $? = 0 +configure:37153: result: yes +configure:37169: checking whether _SC_LARGE_PAGESIZE is declared +configure:37169: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:104:10: error: '_SC_LARGE_PAGESIZE' undeclared (first use in this function); did you mean '_SC_PAGESIZE'? + (void) _SC_LARGE_PAGESIZE; + ^~~~~~~~~~~~~~~~~~ + _SC_PAGESIZE +conftest.c:104:10: note: each undeclared identifier is reported only once for each function it appears in +configure:37169: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| #ifndef _SC_LARGE_PAGESIZE +| #ifdef __cplusplus +| (void) _SC_LARGE_PAGESIZE; +| #else +| (void) _SC_LARGE_PAGESIZE; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:37169: result: no +configure:37189: checking mach/mach_host.h usability +configure:37189: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:129:10: fatal error: mach/mach_host.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:37189: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:37189: result: no +configure:37189: checking mach/mach_host.h presence +configure:37189: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:96:10: fatal error: mach/mach_host.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:37189: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| /* end confdefs.h. */ +| #include +configure:37189: result: no +configure:37189: checking for mach/mach_host.h +configure:37189: result: no +configure:37201: checking mach/mach_init.h usability +configure:37201: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:129:10: fatal error: mach/mach_init.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:37201: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:37201: result: no +configure:37201: checking mach/mach_init.h presence +configure:37201: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:96:10: fatal error: mach/mach_init.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:37201: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| /* end confdefs.h. */ +| #include +configure:37201: result: no +configure:37201: checking for mach/mach_init.h +configure:37201: result: no +configure:37224: checking whether strtoull is declared +configure:37224: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37224: $? = 0 +configure:37224: result: yes +configure:37253: checking for ssize_t +configure:37253: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37253: $? = 0 +configure:37253: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:133:22: error: expected expression before ')' token + if (sizeof ((ssize_t))) + ^ +configure:37253: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((ssize_t))) +| return 0; +| ; +| return 0; +| } +configure:37253: result: yes +configure:37263: checking whether snprintf is declared +configure:37263: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37263: $? = 0 +configure:37263: result: yes +configure:37276: checking whether _strdup is declared +configure:37276: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:140:10: error: '_strdup' undeclared (first use in this function); did you mean 'strdup'? + (void) _strdup; + ^~~~~~~ + strdup +conftest.c:140:10: note: each undeclared identifier is reported only once for each function it appears in +configure:37276: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| +| int +| main () +| { +| #ifndef _strdup +| #ifdef __cplusplus +| (void) _strdup; +| #else +| (void) _strdup; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:37276: result: no +configure:37288: checking whether _putenv is declared +configure:37288: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:141:10: error: '_putenv' undeclared (first use in this function); did you mean 'putenv'? + (void) _putenv; + ^~~~~~~ + putenv +conftest.c:141:10: note: each undeclared identifier is reported only once for each function it appears in +configure:37288: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| +| int +| main () +| { +| #ifndef _putenv +| #ifdef __cplusplus +| (void) _putenv; +| #else +| (void) _putenv; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:37288: result: no +configure:37441: checking whether getprogname is declared +configure:37441: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:142:10: error: 'getprogname' undeclared (first use in this function); did you mean 'gethostname'? + (void) getprogname; + ^~~~~~~~~~~ + gethostname +conftest.c:142:10: note: each undeclared identifier is reported only once for each function it appears in +configure:37441: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| +| int +| main () +| { +| #ifndef getprogname +| #ifdef __cplusplus +| (void) getprogname; +| #else +| (void) getprogname; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:37441: result: no +configure:37453: checking whether getexecname is declared +configure:37453: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:143:10: error: 'getexecname' undeclared (first use in this function); did you mean 'gethostname'? + (void) getexecname; + ^~~~~~~~~~~ + gethostname +conftest.c:143:10: note: each undeclared identifier is reported only once for each function it appears in +configure:37453: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| +| int +| main () +| { +| #ifndef getexecname +| #ifdef __cplusplus +| (void) getexecname; +| #else +| (void) getexecname; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:37453: result: no +configure:37465: checking whether GetModuleFileName is declared +configure:37465: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:103:10: fatal error: windows.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:37465: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| #ifndef GetModuleFileName +| #ifdef __cplusplus +| (void) GetModuleFileName; +| #else +| (void) GetModuleFileName; +| #endif +| #endif +| +| ; +| return 0; +| } +configure:37465: result: no +configure:37478: checking for program_invocation_name +configure:37500: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:37500: $? = 0 +configure:37504: result: yes +configure:37513: checking for __progname +configure:37531: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:37531: $? = 0 +configure:37535: result: yes +configure:37552: checking for pthread_t +configure:37552: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37552: $? = 0 +configure:37552: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:111:24: error: expected expression before ')' token + if (sizeof ((pthread_t))) + ^ +configure:37552: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| /* end confdefs.h. */ +| #include +| +| int +| main () +| { +| if (sizeof ((pthread_t))) +| return 0; +| ; +| return 0; +| } +configure:37552: result: yes +configure:37580: checking whether sched_getcpu is declared +configure:37580: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37580: $? = 0 +configure:37580: result: yes +configure:37604: checking whether sched_setaffinity is declared +configure:37604: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37604: $? = 0 +configure:37604: result: yes +configure:37614: checking whether function sched_setaffinity has a complete prototype +configure:37635: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:120:23: warning: passing argument 3 of 'sched_setaffinity' makes pointer from integer without a cast [-Wint-conversion] + sched_setaffinity(1,2,3,4,5,6,7,8,9,10); + ^ +In file included from conftest.c:114:0: +/usr/include/sched.h:121:12: note: expected 'const cpu_set_t * {aka const struct *}' but argument is of type 'int' + extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + ^~~~~~~~~~~~~~~~~ +conftest.c:120:1: error: too many arguments to function 'sched_setaffinity' + sched_setaffinity(1,2,3,4,5,6,7,8,9,10); + ^~~~~~~~~~~~~~~~~ +In file included from conftest.c:114:0: +/usr/include/sched.h:121:12: note: declared here + extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + ^~~~~~~~~~~~~~~~~ +configure:37635: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| /* end confdefs.h. */ +| +| #ifndef _GNU_SOURCE +| # define _GNU_SOURCE +| #endif +| #include +| +| +| int +| main () +| { +| sched_setaffinity(1,2,3,4,5,6,7,8,9,10); +| +| ; +| return 0; +| } +configure:37640: result: yes +configure:37655: checking for old prototype of sched_setaffinity +configure:37677: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:122:23: warning: passing argument 2 of 'sched_setaffinity' makes integer from pointer without a cast [-Wint-conversion] + sched_setaffinity(0, (void*) &mask); + ^ +In file included from conftest.c:116:0: +/usr/include/sched.h:121:12: note: expected 'size_t {aka long unsigned int}' but argument is of type 'void *' + extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + ^~~~~~~~~~~~~~~~~ +conftest.c:122:2: error: too few arguments to function 'sched_setaffinity' + sched_setaffinity(0, (void*) &mask); + ^~~~~~~~~~~~~~~~~ +In file included from conftest.c:116:0: +/usr/include/sched.h:121:12: note: declared here + extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + ^~~~~~~~~~~~~~~~~ +configure:37677: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| /* end confdefs.h. */ +| +| +| #ifndef _GNU_SOURCE +| # define _GNU_SOURCE +| #endif +| #include +| static unsigned long mask; +| +| int +| main () +| { +| sched_setaffinity(0, (void*) &mask); +| ; +| return 0; +| } +configure:37684: result: no +configure:37697: checking for working CPU_SET +configure:37714: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:37714: $? = 0 +configure:37718: result: yes +configure:37727: checking for working CPU_SET_S +configure:37749: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:37749: $? = 0 +configure:37753: result: yes +configure:37762: checking for working syscall with 6 parameters +configure:37779: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:37779: $? = 0 +configure:37783: result: yes +configure:37796: checking for lib +configure:37829: result: no +configure:37841: checking for bash +configure:37871: result: /bin/sh +configure:37882: checking for ffs +configure:37882: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +conftest.c:137:6: warning: conflicting types for built-in function 'ffs' [-Wbuiltin-declaration-mismatch] + char ffs (); + ^~~ +configure:37882: $? = 0 +configure:37882: result: yes +configure:37889: checking whether ffs is declared +configure:37889: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37889: $? = 0 +configure:37889: result: yes +configure:37892: checking whether function ffs has a complete prototype +configure:37907: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:151:1: error: too many arguments to function 'ffs' + ffs(1,2,3,4,5,6,7,8,9,10); + ^~~ +In file included from /usr/include/string.h:431:0, + from conftest.c:134: +/usr/include/strings.h:104:12: note: declared here + extern int ffs (int __i) __THROW __attribute_const__; + ^~~ +configure:37907: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| ffs(1,2,3,4,5,6,7,8,9,10); +| +| ; +| return 0; +| } +configure:37912: result: yes +configure:37939: checking for ffsl +configure:37939: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +conftest.c:140:6: warning: conflicting types for built-in function 'ffsl' [-Wbuiltin-declaration-mismatch] + char ffsl (); + ^~~~ +configure:37939: $? = 0 +configure:37939: result: yes +configure:37946: checking whether ffsl is declared +configure:37946: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:37946: $? = 0 +configure:37946: result: yes +configure:37949: checking whether function ffsl has a complete prototype +configure:37964: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c: In function 'main': +conftest.c:154:1: error: too many arguments to function 'ffsl' + ffsl(1,2,3,4,5,6,7,8,9,10); + ^~~~ +In file included from /usr/include/string.h:431:0, + from conftest.c:137: +/usr/include/strings.h:110:12: note: declared here + extern int ffsl (long int __l) __THROW __attribute_const__; + ^~~~ +configure:37964: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| ffsl(1,2,3,4,5,6,7,8,9,10); +| +| ; +| return 0; +| } +configure:37969: result: yes +configure:37992: checking for fls +configure:37992: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/cczGQx9s.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:154: undefined reference to `fls' +collect2: error: ld returned 1 exit status +configure:37992: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| /* end confdefs.h. */ +| /* Define fls to an innocuous variant, in case declares fls. +| For example, HP-UX 11i declares gettimeofday. */ +| #define fls innocuous_fls +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char fls (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef fls +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char fls (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_fls || defined __stub___fls +| choke me +| #endif +| +| int +| main () +| { +| return fls (); +| ; +| return 0; +| } +configure:37992: result: no +configure:38044: checking for flsl +configure:38044: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccGImKau.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:154: undefined reference to `flsl' +collect2: error: ld returned 1 exit status +configure:38044: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| /* end confdefs.h. */ +| /* Define flsl to an innocuous variant, in case declares flsl. +| For example, HP-UX 11i declares gettimeofday. */ +| #define flsl innocuous_flsl +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char flsl (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef flsl +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char flsl (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_flsl || defined __stub___flsl +| choke me +| #endif +| +| int +| main () +| { +| return flsl (); +| ; +| return 0; +| } +configure:38044: result: no +configure:38097: checking for clz +configure:38097: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccQRj0px.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:154: undefined reference to `clz' +collect2: error: ld returned 1 exit status +configure:38097: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| /* end confdefs.h. */ +| /* Define clz to an innocuous variant, in case declares clz. +| For example, HP-UX 11i declares gettimeofday. */ +| #define clz innocuous_clz +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char clz (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef clz +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char clz (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_clz || defined __stub___clz +| choke me +| #endif +| +| int +| main () +| { +| return clz (); +| ; +| return 0; +| } +configure:38097: result: no +configure:38149: checking for clzl +configure:38149: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccZ0eNBz.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:154: undefined reference to `clzl' +collect2: error: ld returned 1 exit status +configure:38149: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| /* end confdefs.h. */ +| /* Define clzl to an innocuous variant, in case declares clzl. +| For example, HP-UX 11i declares gettimeofday. */ +| #define clzl innocuous_clzl +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char clzl (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef clzl +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char clzl (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_clzl || defined __stub___clzl +| choke me +| #endif +| +| int +| main () +| { +| return clzl (); +| ; +| return 0; +| } +configure:38149: result: no +configure:38203: checking for openat +configure:38203: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:38203: $? = 0 +configure:38203: result: yes +configure:38217: checking malloc.h usability +configure:38217: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:38217: $? = 0 +configure:38217: result: yes +configure:38217: checking malloc.h presence +configure:38217: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +configure:38217: $? = 0 +configure:38217: result: yes +configure:38217: checking for malloc.h +configure:38217: result: yes +configure:38230: checking for getpagesize +configure:38230: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:38230: $? = 0 +configure:38230: result: yes +configure:38230: checking for memalign +configure:38230: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:38230: $? = 0 +configure:38230: result: yes +configure:38230: checking for posix_memalign +configure:38230: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +conftest.c:147:6: warning: conflicting types for built-in function 'posix_memalign' [-Wbuiltin-declaration-mismatch] + char posix_memalign (); + ^~~~~~~~~~~~~~ +configure:38230: $? = 0 +configure:38230: result: yes +configure:38242: checking sys/utsname.h usability +configure:38242: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:38242: $? = 0 +configure:38242: result: yes +configure:38242: checking sys/utsname.h presence +configure:38242: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +configure:38242: $? = 0 +configure:38242: result: yes +configure:38242: checking for sys/utsname.h +configure:38242: result: yes +configure:38254: checking for uname +configure:38254: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:38254: $? = 0 +configure:38254: result: yes +configure:38305: checking pthread_np.h usability +configure:38305: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:161:10: fatal error: pthread_np.h: No such file or directory + #include + ^~~~~~~~~~~~~~ +compilation terminated. +configure:38305: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:38305: result: no +configure:38305: checking pthread_np.h presence +configure:38305: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:128:10: fatal error: pthread_np.h: No such file or directory + #include + ^~~~~~~~~~~~~~ +compilation terminated. +configure:38305: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| /* end confdefs.h. */ +| #include +configure:38305: result: no +configure:38305: checking for pthread_np.h +configure:38305: result: no +configure:38315: checking whether pthread_setaffinity_np is declared +configure:38315: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:38315: $? = 0 +configure:38315: result: yes +configure:38337: checking whether pthread_getaffinity_np is declared +configure:38337: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:38337: $? = 0 +configure:38337: result: yes +configure:38359: checking for sched_setaffinity +configure:38359: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:38359: $? = 0 +configure:38359: result: yes +configure:38366: checking for sys/cpuset.h +configure:38366: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:132:10: fatal error: sys/cpuset.h: No such file or directory + #include + ^~~~~~~~~~~~~~ +compilation terminated. +configure:38366: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +| +| #include +configure:38366: result: no +configure:38379: checking for cpuset_setaffinity +configure:38379: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccOS2cNY.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:164: undefined reference to `cpuset_setaffinity' +collect2: error: ld returned 1 exit status +configure:38379: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| /* Define cpuset_setaffinity to an innocuous variant, in case declares cpuset_setaffinity. +| For example, HP-UX 11i declares gettimeofday. */ +| #define cpuset_setaffinity innocuous_cpuset_setaffinity +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char cpuset_setaffinity (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef cpuset_setaffinity +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char cpuset_setaffinity (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_cpuset_setaffinity || defined __stub___cpuset_setaffinity +| choke me +| #endif +| +| int +| main () +| { +| return cpuset_setaffinity (); +| ; +| return 0; +| } +configure:38379: result: no +configure:38388: checking for library containing pthread_getthrds_np +configure:38419: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/cc7k3c61.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:141: undefined reference to `pthread_getthrds_np' +collect2: error: ld returned 1 exit status +configure:38419: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char pthread_getthrds_np (); +| int +| main () +| { +| return pthread_getthrds_np (); +| ; +| return 0; +| } +configure:38419: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c -lpthread >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccDzzrp4.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:141: undefined reference to `pthread_getthrds_np' +collect2: error: ld returned 1 exit status +configure:38419: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char pthread_getthrds_np (); +| int +| main () +| { +| return pthread_getthrds_np (); +| ; +| return 0; +| } +configure:38436: result: no +configure:38449: checking for cpuset_setid +configure:38449: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/cc05UQI9.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:164: undefined reference to `cpuset_setid' +collect2: error: ld returned 1 exit status +configure:38449: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| /* Define cpuset_setid to an innocuous variant, in case declares cpuset_setid. +| For example, HP-UX 11i declares gettimeofday. */ +| #define cpuset_setid innocuous_cpuset_setid +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char cpuset_setid (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef cpuset_setid +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char cpuset_setid (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_cpuset_setid || defined __stub___cpuset_setid +| choke me +| #endif +| +| int +| main () +| { +| return cpuset_setid (); +| ; +| return 0; +| } +configure:38449: result: no +configure:38463: checking libudev.h usability +configure:38463: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:163:10: fatal error: libudev.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:38463: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:38463: result: no +configure:38463: checking libudev.h presence +configure:38463: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:130:10: fatal error: libudev.h: No such file or directory + #include + ^~~~~~~~~~~ +compilation terminated. +configure:38463: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +configure:38463: result: no +configure:38463: checking for libudev.h +configure:38463: result: no +configure:38530: checking for PCIACCESS +configure:38538: $PKG_CONFIG --exists --silence-errors "pciaccess" +configure:38541: $? = 0 +configure:38557: $PKG_CONFIG --exists --silence-errors "pciaccess" +configure:38560: $? = 0 +configure:38598: result: yes +configure:38618: checking pciaccess.h usability +configure:38618: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +configure:38618: $? = 0 +configure:38618: result: yes +configure:38618: checking pciaccess.h presence +configure:38618: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +configure:38618: $? = 0 +configure:38618: result: yes +configure:38618: checking for pciaccess.h +configure:38618: result: yes +configure:38621: checking for pci_slot_match_iterator_create +configure:38621: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c -lpciaccess >&5 +configure:38621: $? = 0 +configure:38621: result: yes +configure:38638: checking for final PCIACCESS support +configure:38643: result: yes +configure:38786: checking CL/cl_ext.h usability +configure:38786: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:163:10: fatal error: CL/cl_ext.h: No such file or directory + #include + ^~~~~~~~~~~~~ +compilation terminated. +configure:38786: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:38786: result: no +configure:38786: checking CL/cl_ext.h presence +configure:38786: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:130:10: fatal error: CL/cl_ext.h: No such file or directory + #include + ^~~~~~~~~~~~~ +compilation terminated. +configure:38786: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +configure:38786: result: no +configure:38786: checking for CL/cl_ext.h +configure:38786: result: no +configure:38875: checking cuda.h usability +configure:38875: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:163:10: fatal error: cuda.h: No such file or directory + #include + ^~~~~~~~ +compilation terminated. +configure:38875: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:38875: result: no +configure:38875: checking cuda.h presence +configure:38875: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:130:10: fatal error: cuda.h: No such file or directory + #include + ^~~~~~~~ +compilation terminated. +configure:38875: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +configure:38875: result: no +configure:38875: checking for cuda.h +configure:38875: result: no +configure:38958: checking cuda_runtime_api.h usability +configure:38958: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:163:10: fatal error: cuda_runtime_api.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:38958: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:38958: result: no +configure:38958: checking cuda_runtime_api.h presence +configure:38958: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:130:10: fatal error: cuda_runtime_api.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:38958: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +configure:38958: result: no +configure:38958: checking for cuda_runtime_api.h +configure:38958: result: no +configure:39063: checking nvml.h usability +configure:39063: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:163:10: fatal error: nvml.h: No such file or directory + #include + ^~~~~~~~ +compilation terminated. +configure:39063: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:39063: result: no +configure:39063: checking nvml.h presence +configure:39063: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:130:10: fatal error: nvml.h: No such file or directory + #include + ^~~~~~~~ +compilation terminated. +configure:39063: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| /* end confdefs.h. */ +| #include +configure:39063: result: no +configure:39063: checking for nvml.h +configure:39063: result: no +configure:39666: checking X11/Xlib.h usability +configure:39666: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:164:10: fatal error: X11/Xlib.h: No such file or directory + #include + ^~~~~~~~~~~~ +compilation terminated. +configure:39666: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:39666: result: no +configure:39666: checking X11/Xlib.h presence +configure:39666: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:131:10: fatal error: X11/Xlib.h: No such file or directory + #include + ^~~~~~~~~~~~ +compilation terminated. +configure:39666: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| /* end confdefs.h. */ +| #include +configure:39666: result: no +configure:39666: checking for X11/Xlib.h +configure:39666: result: no +configure:39760: WARNING: X11 not found; GL disabled +configure:39767: checking NVCtrl/NVCtrl.h usability +configure:39767: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c >&5 +conftest.c:164:10: fatal error: NVCtrl/NVCtrl.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~ +compilation terminated. +configure:39767: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:39767: result: no +configure:39767: checking NVCtrl/NVCtrl.h presence +configure:39767: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c conftest.c +conftest.c:131:10: fatal error: NVCtrl/NVCtrl.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~ +compilation terminated. +configure:39767: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| /* end confdefs.h. */ +| #include +configure:39767: result: no +configure:39767: checking for NVCtrl/NVCtrl.h +configure:39767: result: no +configure:39855: checking for LIBXML2 +configure:39863: $PKG_CONFIG --exists --silence-errors "libxml-2.0" +configure:39866: $? = 0 +configure:39882: $PKG_CONFIG --exists --silence-errors "libxml-2.0" +configure:39885: $? = 0 +configure:39923: result: yes +configure:39943: checking libxml/parser.h usability +configure:39943: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/usr/include/libxml2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/usr/include/libxml2 conftest.c >&5 +configure:39943: $? = 0 +configure:39943: result: yes +configure:39943: checking libxml/parser.h presence +configure:39943: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/usr/include/libxml2 conftest.c +configure:39943: $? = 0 +configure:39943: result: yes +configure:39943: checking for libxml/parser.h +configure:39943: result: yes +configure:39946: checking for xmlNewDoc +configure:39946: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/usr/include/libxml2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/usr/include/libxml2 -Wl,-z,noexecstack conftest.c -lxml2 >&5 +configure:39946: $? = 0 +configure:39946: result: yes +configure:39963: checking for final LIBXML2 support +configure:39968: result: yes +configure:40001: checking for x86 cpuid +configure:40042: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/hwloc/include -Wl,-z,noexecstack conftest.c >&5 +configure:40042: $? = 0 +configure:40043: result: yes +configure:40064: checking for pthread_mutex_lock +configure:40064: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -Wl,-z,noexecstack conftest.c >&5 +configure:40064: $? = 0 +configure:40064: result: yes +configure:40125: checking if plugin support is enabled +configure:40136: result: no +configure:40530: checking components to build statically +configure:40532: result: noos xml synthetic xml_nolibxml linux linuxio pci xml_libxml x86 +configure:40547: checking components to build as plugins +configure:40549: result: +WRAPPER_LIBS(=' -lpthread ') does not contain '-lm -lpciaccess -lxml2', prepending +WRAPPER_LDFLAGS(='-Wl,-z,noexecstack') does not contain '', appending +HWLOC_CFLAGS(=' -I/usr/include/libxml2') does not contain '-fvisibility=hidden', prepending +CPPFLAGS(=' -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c') does not contain '-I/home/brian/daos/rpm/mpich/src/mpi/romio/include', appending +configure:42173: checking whether the compiler defines __func__ +configure:42200: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:42200: $? = 0 +configure:42200: ./conftest +configure:42200: $? = 0 +configure:42237: result: yes +configure:42246: checking whether the compiler defines __FUNC__ +configure:42273: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c: In function 'foo': +conftest.c:147:20: error: '__FUNC__' undeclared (first use in this function); did you mean '__LINE__'? + return (strcmp(__FUNC__, "foo") == 0); + ^~~~~~~~ + __LINE__ +conftest.c:147:20: note: each undeclared identifier is reported only once for each function it appears in +conftest.c:148:1: warning: control reaches end of non-void function [-Wreturn-type] + } + ^ +configure:42273: $? = 1 +configure: program exited with status 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| /* end confdefs.h. */ +| +| +| #include +| int foo(void); +| int foo(void) +| { +| return (strcmp(__FUNC__, "foo") == 0); +| } +| int main(int argc, char ** argv) +| { +| return (foo() ? 0 : 1); +| } +| +| +configure:42310: result: no +configure:42319: checking whether the compiler sets __FUNCTION__ +configure:42346: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:42346: $? = 0 +configure:42346: ./conftest +configure:42346: $? = 0 +configure:42383: result: yes +configure:42398: checking whether C compiler accepts option -O2 +configure:42453: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c > pac_test1.log 2>&1 +configure:42453: $? = 0 +configure:42484: gcc -o conftest -O2 -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c > pac_test2.log 2>&1 +configure:42484: $? = 0 +configure:42492: diff -b pac_test1.log pac_test2.log > pac_test.log +configure:42495: $? = 0 +configure:42595: result: yes +configure:42600: checking whether routines compiled with -O2 can be linked with ones compiled without -O2 +configure:42640: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c > pac_test3.log 2>&1 +configure:42640: $? = 0 +configure:42644: mv conftest.o pac_conftest.o +configure:42647: $? = 0 +configure:42690: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c pac_conftest.o > pac_test4.log 2>&1 +configure:42690: $? = 0 +configure:42732: gcc -o conftest -O2 -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c pac_conftest.o > pac_test5.log 2>&1 +configure:42732: $? = 0 +configure:42740: diff -b pac_test4.log pac_test5.log > pac_test.log +configure:42743: $? = 0 +configure:42882: result: yes +configure:42929: checking for shared library (esp. rpath) characteristics of CC +configure:43020: result: done (results in src/env/cc_shlib.conf) +configure:43180: checking whether Fortran 77 compiler accepts option -O2 +configure:43225: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f > pac_test1.log 2>&1 +configure:43225: $? = 0 +configure:43256: gfortran -o conftest -O2 -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f > pac_test2.log 2>&1 +configure:43256: $? = 0 +configure:43264: diff -b pac_test1.log pac_test2.log > pac_test.log +configure:43267: $? = 0 +configure:43367: result: yes +configure:43372: checking whether routines compiled with -O2 can be linked with ones compiled without -O2 +configure:43411: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.f > pac_test3.log 2>&1 +configure:43411: $? = 0 +configure:43415: mv conftest.o pac_conftest.o +configure:43418: $? = 0 +configure:43456: gfortran -o conftest -O2 -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f pac_conftest.o > pac_test4.log 2>&1 +configure:43456: $? = 0 +configure:43464: diff -b pac_test2.log pac_test4.log > pac_test.log +configure:43467: $? = 0 +configure:43568: result: yes +configure:43606: checking how to get verbose linking output from gfortran +configure:43616: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +configure:43616: $? = 0 +configure:43634: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -v -Wl,-z,noexecstack conftest.f +Using built-in specs. +Target: x86_64-suse-linux +Thread model: posix +gcc version 7.5.0 (SUSE Linux) + /usr/lib64/gcc/x86_64-suse-linux/7/f951 conftest.f -ffixed-form -quiet -dumpbase conftest.f -m64 -mtune=generic -march=x86-64 -auxbase conftest -g -grecord-gcc-switches -O2 -O2 -O2 -Wall -version -fPIC -fexceptions -fstack-protector-strong --param ssp-buffer-size=4 -fintrinsic-modules-path /usr/lib64/gcc/x86_64-suse-linux/7/finclude -o - | + /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/as -v --64 -o /tmp/cc7c7r8o.o +GNU Fortran (SUSE Linux) version 7.5.0 (x86_64-suse-linux) + compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +GNU Fortran2008 (SUSE Linux) version 7.5.0 (x86_64-suse-linux) + compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +GNU assembler version 2.32.0 (x86_64-suse-linux) using BFD version (GNU Binutils; openSUSE Leap 15.1) 2.32.0.20190909-lp151.3.6 +Reading specs from /usr/lib64/gcc/x86_64-suse-linux/7/libgfortran.spec +rename spec lib to liborig + /usr/lib64/gcc/x86_64-suse-linux/7/collect2 -plugin /usr/lib64/gcc/x86_64-suse-linux/7/liblto_plugin.so -plugin-opt=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper -plugin-opt=-fresolution=/tmp/cclr4ov8.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o conftest /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/7/crtbegin.o -L/usr/lib64/gcc/x86_64-suse-linux/7 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. -z noexecstack /tmp/cc7c7r8o.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib64/gcc/x86_64-suse-linux/7/crtend.o /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/crtn.o +configure:43717: result: -v +configure:43719: checking for Fortran 77 libraries of gfortran +configure:43742: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -v -Wl,-z,noexecstack conftest.f +Using built-in specs. +Target: x86_64-suse-linux +Thread model: posix +gcc version 7.5.0 (SUSE Linux) + /usr/lib64/gcc/x86_64-suse-linux/7/f951 conftest.f -ffixed-form -quiet -dumpbase conftest.f -m64 -mtune=generic -march=x86-64 -auxbase conftest -g -grecord-gcc-switches -O2 -O2 -O2 -Wall -version -fPIC -fexceptions -fstack-protector-strong --param ssp-buffer-size=4 -fintrinsic-modules-path /usr/lib64/gcc/x86_64-suse-linux/7/finclude -o - | + /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/as -v --64 -o /tmp/ccy1DJZt.o +GNU Fortran (SUSE Linux) version 7.5.0 (x86_64-suse-linux) + compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +GNU Fortran2008 (SUSE Linux) version 7.5.0 (x86_64-suse-linux) + compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +GNU assembler version 2.32.0 (x86_64-suse-linux) using BFD version (GNU Binutils; openSUSE Leap 15.1) 2.32.0.20190909-lp151.3.6 +Reading specs from /usr/lib64/gcc/x86_64-suse-linux/7/libgfortran.spec +rename spec lib to liborig + /usr/lib64/gcc/x86_64-suse-linux/7/collect2 -plugin /usr/lib64/gcc/x86_64-suse-linux/7/liblto_plugin.so -plugin-opt=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper -plugin-opt=-fresolution=/tmp/ccbcm8vd.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o conftest /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/7/crtbegin.o -L/usr/lib64/gcc/x86_64-suse-linux/7 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. -z noexecstack /tmp/ccy1DJZt.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib64/gcc/x86_64-suse-linux/7/crtend.o /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/crtn.o +configure:43938: result: -L/usr/lib64/gcc/x86_64-suse-linux/7 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. -lgfortran -lm -lquadmath +configure:43954: checking whether gfortran accepts the FLIBS found by autoconf +configure:43970: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f >&5 +configure:43970: $? = 0 +configure:43972: result: yes +configure:44010: checking whether gcc links with FLIBS found by autoconf +configure:44035: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c -L/usr/lib64/gcc/x86_64-suse-linux/7 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. -lgfortran -lm -lquadmath >&5 +conftest.c: In function 'main': +conftest.c:151:5: warning: unused variable 'a' [-Wunused-variable] + int a; + ^ +configure:44035: $? = 0 +configure:44037: result: yes +configure:44087: checking whether Fortran 77 and C objects are compatible +configure:44166: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:44166: $? = 0 +configure:44169: mv conftest.o pac_conftest.o +configure:44172: $? = 0 +configure:44181: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f pac_conftest.o >&5 +configure:44181: $? = 0 +configure:44184: result: yes +configure:44343: checking for linker for Fortran main program +configure:44364: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:151:11: warning: unused variable 'a' [-Wunused-variable] + long long a; + ^ +configure:44364: $? = 0 +configure:44423: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:44423: $? = 0 +configure:44426: mv conftest.o pac_conftest.o +configure:44429: $? = 0 +configure:44438: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f pac_conftest.o >&5 +conftest.f:4:26: + + double precision d + 1 +Warning: Unused variable 'd' declared at (1) [-Wunused-variable] +configure:44438: $? = 0 +configure:44440: result: Use Fortran to link programs +configure:44551: checking for Fortran 77 name mangling +configure:44573: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:3:30: + + subroutine MY_name( ii ) + 1 +Warning: Unused dummy argument 'ii' at (1) [-Wunused-dummy-argument] +configure:44573: $? = 0 +configure:44576: mv conftest.o f77conftest.o +configure:44579: $? = 0 +configure:44604: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c f77conftest.o -L/usr/lib64/gcc/x86_64-suse-linux/7 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. -lgfortran -lm -lquadmath >&5 +configure:44604: $? = 0 +configure:44727: result: lower uscore +configure:44793: checking for libraries to link Fortran main with C stdio routines +configure:44819: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:44819: $? = 0 +configure:44822: mv conftest.o pac_conftest.o +configure:44825: $? = 0 +configure:44844: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f pac_conftest.o >&5 +configure:44844: $? = 0 +configure:44875: result: none +configure:44926: checking whether Fortran init will work with C +configure:44948: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +configure:44948: $? = 0 +configure:44951: mv conftest.o pac_f77conftest.o +configure:44954: $? = 0 +configure:44998: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c pac_f77conftest.o >&5 +configure:44998: $? = 0 +configure:45021: result: yes +configure:45120: checking for extension for Fortran 90 programs +configure:45135: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.f90 >&5 +configure:45135: $? = 0 +configure:45137: result: f90 +configure:45179: checking whether the Fortran 90 compiler (gfortran -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack) works +configure:45190: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 >&5 +conftest.f90:4:35: + + integer, dimension(10) :: n + 1 +Warning: Unused variable 'n' declared at (1) [-Wunused-variable] +configure:45190: $? = 0 +configure:45193: result: yes +configure:45195: checking whether the Fortran 90 compiler (gfortran -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack) is a cross-compiler +configure:45201: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 >&5 +conftest.f90:4:35: + + integer, dimension(10) :: n + 1 +Warning: Unused variable 'n' declared at (1) [-Wunused-variable] +configure:45201: $? = 0 +configure:45201: ./conftest +configure:45201: $? = 0 +configure:45210: result: no +configure:45233: checking whether Fortran 90 compiler works with Fortran 77 compiler +configure:45261: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +configure:45261: $? = 0 +configure:45265: mv conftest.o pac_f77conftest.o +configure:45268: $? = 0 +configure:45289: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 pac_f77conftest.o >&5 +configure:45289: $? = 0 +configure:45331: result: yes +configure:45393: checking for shared library (esp. rpath) characteristics of F77 +configure:45486: result: done (results in src/env/f77_shlib.conf) +configure:45497: checking whether Fortran 77 accepts ! for comments +configure:45515: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +configure:45515: $? = 0 +configure:45532: result: yes +configure:45542: checking for include directory flag for Fortran +configure:45569: gfortran -c -I src -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +configure:45569: $? = 0 +configure:45587: result: -I +configure:45595: checking for Fortran 77 flag for library directories +configure:45614: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +configure:45614: $? = 0 +configure:45618: mv conftest.o pac_f77conftest.o +configure:45621: $? = 0 +configure:45624: test -d conftestdir || mkdir conftestdir +configure:45627: $? = 0 +configure:45630: ar cru conftestdir/libf77conftest.a pac_f77conftest.o +configure:45633: $? = 0 +configure:45636: ranlib conftestdir/libf77conftest.a +configure:45639: $? = 0 +configure:45657: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Lconftestdir -Wl,-z,noexecstack conftest.f -lf77conftest >&5 +configure:45657: $? = 0 +configure:45677: result: -L +configure:45753: checking whether Fortran 77 compiler processes .F files with C preprocessor +configure:45774: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.F >&5 +conftest.F:5:21: + + integer a(ASIZE) + 1 +Warning: Unused variable 'a' declared at (1) [-Wunused-variable] +configure:45774: $? = 0 +configure:45842: result: yes +configure:45850: checking whether gfortran allows mismatched arguments +configure:45873: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +configure:45873: $? = 0 +configure:45917: result: yes +configure:45963: checking for Fortran 2008 support +configure:45994: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:153:10: fatal error: ISO_Fortran_binding.h: No such file or directory + #include + ^~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +configure:45994: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| /* end confdefs.h. */ +| +| +| #include +| +| int foo_c(CFI_cdesc_t * a_desc, CFI_cdesc_t * b_desc) +| { +| char * a_row = (char*) a_desc->base_addr; +| if (a_desc->type != CFI_type_int) { return 1; } +| if (a_desc->rank != 2) { return 2; } +| if (a_desc->dim[1].extent != b_desc->dim[0].extent) { return 3; } +| return 0; +| } +| +| void test_assumed_rank_async_impl_c(CFI_cdesc_t * a_desc) +| { +| return; +| } +| +configure:46102: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 conftest1.o >&5 +gfortran: error: conftest1.o: No such file or directory +configure:46102: $? = 1 +configure: failed program was: +| +| +| MODULE F08TS_MODULE +| IMPLICIT NONE +| +| ! Test public, private, protected +| REAL, PUBLIC :: x +| REAL, PRIVATE :: y +| LOGICAL, PROTECTED :: z +| +| ! Test abstract +| ABSTRACT INTERFACE +| SUBROUTINE user_func(x, y) +| INTEGER :: x(*) +| REAL :: y +| END SUBROUTINE +| END INTERFACE +| +| ! Test TS 29113 assumed type , assumed rank and bind(C) +| INTERFACE +| FUNCTION FOO(A, B, C) & +| BIND(C,name="foo_c") RESULT(err) +| USE, intrinsic :: iso_c_binding, ONLY : c_int +| TYPE(*), DIMENSION(..) :: A, B, C +| INTEGER(c_int) :: err +| END FUNCTION FOO +| END INTERFACE +| +| +| ! Test assumed-rank + asynchronous +| INTERFACE TEST_ASSUMED_RANK_ASYNC +| SUBROUTINE TEST_ASSUMED_RANK_ASYNC_IMPL(BUF) & +| BIND(C,name="test_assumed_rank_async_impl_c") +| IMPLICIT NONE +| TYPE(*), DIMENSION(..), ASYNCHRONOUS :: BUF +| END SUBROUTINE TEST_ASSUMED_RANK_ASYNC_IMPL +| END INTERFACE TEST_ASSUMED_RANK_ASYNC +| +| CONTAINS +| +| ! Test TS 29113 asychronous attribute and optional +| SUBROUTINE test1(buf, count, ierr) +| INTEGER, ASYNCHRONOUS :: buf(*) +| INTEGER :: count +| INTEGER, OPTIONAL :: ierr +| END SUBROUTINE +| +| ! Test procedure type and non-bind(c) x in C_FUNCLOC(x) +| SUBROUTINE test2(func) +| USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_FUNLOC, C_FUNPTR +| PROCEDURE(user_func) :: func +| TYPE(C_FUNPTR) :: errhandler_fn +| errhandler_fn = C_FUNLOC(func) +| END SUBROUTINE +| +| ! Test intrinsic storage_size +| SUBROUTINE test3(x, size) +| CHARACTER, DIMENSION(..) :: x +| INTEGER, INTENT(OUT) :: size +| size = storage_size(x)/8 +| END SUBROUTINE test3 +| +| END MODULE +| +| !============================================== +| PROGRAM MAIN +| USE :: F08TS_MODULE, ONLY : FOO, TEST_ASSUMED_RANK_ASYNC +| IMPLICIT NONE +| +| INTEGER, DIMENSION(4,4) :: A, B +| INTEGER, DIMENSION(2,2) :: C +| INTEGER :: ERRCODE +| INTEGER, DIMENSION(10), ASYNCHRONOUS :: IAR +| +| ! Test contiguous and non-contiguous array section passing +| ! and linkage with C code +| ERRCODE = FOO(A(1:4:2, :), B(:, 2:4:2), C) +| CALL TEST_ASSUMED_RANK_ASYNC(IAR(2:7)) +| +| END PROGRAM +| +configure:46126: result: no +configure:46191: checking for shared library (esp. rpath) characteristics of FC +configure:46284: result: done (results in src/env/fc_shlib.conf) +configure:46300: checking whether the Fortran 90 compiler (gfortran -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack) works +configure:46311: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 >&5 +conftest.f90:4:35: + + integer, dimension(10) :: n + 1 +Warning: Unused variable 'n' declared at (1) [-Wunused-variable] +configure:46311: $? = 0 +configure:46314: result: yes +configure:46316: checking whether the Fortran 90 compiler (gfortran -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack) is a cross-compiler +configure:46322: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 >&5 +conftest.f90:4:35: + + integer, dimension(10) :: n + 1 +Warning: Unused variable 'n' declared at (1) [-Wunused-variable] +configure:46322: $? = 0 +configure:46322: ./conftest +configure:46322: $? = 0 +configure:46331: result: no +configure:46377: checking for Fortran 90 module extension +configure:46399: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.f90 >&5 +configure:46399: $? = 0 +configure:46495: result: mod +configure:46507: checking for Fortran 90 module include flag +configure:46535: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.f90 >&5 +configure:46535: $? = 0 +configure:46572: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Iconftestdir conftest.f90 >&5 +configure:46572: $? = 0 +configure:46631: result: -I +configure:46639: checking for Fortran 90 module output directory flag +configure:46670: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.f90 >&5 +configure:46670: $? = 0 +configure:46724: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Jconftestdir conftest.f90 >&5 +configure:46724: $? = 0 +configure:46764: result: -J +configure:46835: checking whether Fortran 90 compiler accepts option -O2 +configure:46880: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 > pac_test1.log 2>&1 +configure:46880: $? = 0 +configure:46911: gfortran -o conftest -O2 -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 > pac_test2.log 2>&1 +configure:46911: $? = 0 +configure:46919: diff -b pac_test1.log pac_test2.log > pac_test.log +configure:46922: $? = 0 +configure:47022: result: yes +configure:47027: checking whether routines compiled with -O2 can be linked with ones compiled without -O2 +configure:47066: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic conftest.f90 > pac_test3.log 2>&1 +configure:47066: $? = 0 +configure:47070: mv conftest.o pac_conftest.o +configure:47073: $? = 0 +configure:47111: gfortran -o conftest -O2 -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_test4.log 2>&1 +configure:47111: $? = 0 +configure:47119: diff -b pac_test2.log pac_test4.log > pac_test.log +configure:47122: $? = 0 +configure:47223: result: yes +configure:47255: checking whether Fortran 90 compiler processes .F90 files with C preprocessor +configure:47276: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.F90 >&5 +conftest.F90:5:21: + + integer a(ASIZE) + 1 +Warning: Unused variable 'a' declared at (1) [-Wunused-variable] +configure:47276: $? = 0 +configure:47344: result: yes +configure:47365: checking what libraries are needed to link Fortran90 programs with C routines that use stdio +configure:47391: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:47391: $? = 0 +configure:47395: mv conftest.o pac_conftest.o +configure:47398: $? = 0 +configure:47415: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o >&5 +configure:47415: $? = 0 +configure:47456: result: none +configure:47475: checking whether TRUE has been defined +configure:47488: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:156:8: error: 'TRUE' undeclared (first use in this function) + return TRUE; + ^~~~ +conftest.c:156:8: note: each undeclared identifier is reported only once for each function it appears in +configure:47488: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| /* end confdefs.h. */ +| +| int +| main () +| { +| return TRUE; +| ; +| return 0; +| } +configure:47494: result: no +configure:47527: checking whether the C++ compiler g++ can build an executable +configure:47556: g++ -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp >&5 +configure:47556: $? = 0 +configure:47570: result: yes +configure:47577: checking whether C++ compiler works with string +configure:47600: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp >&5 +configure:47600: $? = 0 +configure:47613: result: yes +configure:47626: checking whether the compiler supports exceptions +configure:47649: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp >&5 +configure:47649: $? = 0 +configure:47663: result: yes +configure:47671: checking whether the compiler recognizes bool as a built-in type +configure:47698: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp >&5 +configure:47698: $? = 0 +configure:47712: result: yes +configure:47720: checking whether the compiler implements namespaces +configure:47743: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp >&5 +configure:47743: $? = 0 +configure:47757: result: yes +configure:47774: checking whether available +configure:47793: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp >&5 +configure:47793: $? = 0 +configure:47800: result: yes +configure:47803: checking whether the compiler implements the namespace std +configure:47830: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp >&5 +configure:47830: $? = 0 +configure:47845: result: yes +configure:47854: checking whether available +configure:47873: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp >&5 +conftest.cpp:158:10: fatal error: math: No such file or directory + #include + ^~~~~~ +compilation terminated. +configure:47873: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| /* end confdefs.h. */ +| +| #include +| +| int +| main () +| { +| using namespace std; +| ; +| return 0; +| } +configure:47880: result: no +configure:47905: checking for GNU g++ version +configure:47930: g++ -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp >&5 +configure:47930: $? = 0 +configure:47930: ./conftest +configure:47930: $? = 0 +configure:47940: result: 7 . 5 +configure:47996: checking for shared library (esp. rpath) characteristics of CXX +configure:48089: result: done (results in src/env/cxx_shlib.conf) +configure:48100: checking whether C++ compiler accepts option -O2 +configure:48152: g++ -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp > pac_test1.log 2>&1 +configure:48152: $? = 0 +configure:48183: g++ -o conftest -O2 -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp > pac_test2.log 2>&1 +configure:48183: $? = 0 +configure:48191: diff -b pac_test1.log pac_test2.log > pac_test.log +configure:48194: $? = 0 +configure:48294: result: yes +configure:48299: checking whether routines compiled with -O2 can be linked with ones compiled without -O2 +configure:48339: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp > pac_test3.log 2>&1 +configure:48339: $? = 0 +configure:48343: mv conftest.o pac_conftest.o +configure:48346: $? = 0 +configure:48390: g++ -o conftest -O2 -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp pac_conftest.o > pac_test4.log 2>&1 +configure:48390: $? = 0 +configure:48398: diff -b pac_test2.log pac_test4.log > pac_test.log +configure:48401: $? = 0 +configure:48502: result: yes +configure:48555: checking for perl +configure:48573: found /usr/bin/perl +configure:48585: result: /usr/bin/perl +configure:48600: checking for killall +configure:48630: result: no +configure:48670: checking whether install works +configure:48678: result: yes +configure:48692: checking whether mkdir -p works +configure:48708: result: yes +configure:48726: checking for make +configure:48742: found /usr/bin/make +configure:48753: result: make +configure:48767: checking whether clock skew breaks make +configure:48792: result: no +configure:48802: checking whether make supports include +configure:48830: result: yes +configure:48839: checking whether make allows comments in actions +configure:48866: result: yes +configure:48880: checking for virtual path format +configure:48923: result: VPATH +configure:48933: checking whether make sets CFLAGS +configure:48959: result: yes +configure:49008: checking for bash +configure:49026: found /bin/bash +configure:49038: result: /bin/bash +configure:49061: checking whether /bin/bash supports arrays +configure:49070: result: yes +configure:49287: checking for doctext +configure:49318: result: false +configure:49331: checking for an ANSI C-conforming const +configure:49397: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:49397: $? = 0 +configure:49404: result: yes +configure:49412: checking for working volatile +configure:49431: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:49431: $? = 0 +configure:49438: result: yes +configure:49446: checking for C/C++ restrict keyword +configure:49471: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:49471: $? = 0 +configure:49479: result: __restrict +configure:49492: checking for inline +configure:49508: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:49508: $? = 0 +configure:49516: result: inline +configure:49539: checking whether __attribute__ allowed +configure:49556: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:164:5: warning: unused variable 'a' [-Wunused-variable] + int a; + ^ +configure:49556: $? = 0 +configure:49563: result: yes +configure:49565: checking whether __attribute__((format)) allowed +configure:49582: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:164:5: warning: unused variable 'a' [-Wunused-variable] + int a; + ^ +configure:49582: $? = 0 +configure:49589: result: yes +configure:49599: checking if C compiler supports __builtin_expect +configure:49615: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:49615: $? = 0 +configure:49618: result: yes +configure:49637: checking for C11 _Static_assert functionality +configure:49648: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:49648: $? = 0 +configure:49653: result: yes +configure:49680: checking whether byte ordering is bigendian +configure:49695: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:164:9: error: unknown type name 'not' + not a universal capable compiler + ^~~ +conftest.c:164:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'universal' + not a universal capable compiler + ^~~~~~~~~ +conftest.c:164:15: error: unknown type name 'universal' +configure:49695: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| /* end confdefs.h. */ +| #ifndef __APPLE_CC__ +| not a universal capable compiler +| #endif +| typedef int dummy; +| +configure:49740: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:49740: $? = 0 +configure:49758: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:170:4: error: unknown type name 'not'; did you mean 'ino_t'? + not big endian + ^~~ + ino_t +conftest.c:170:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'endian' + not big endian + ^~~~~~ +configure:49758: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| /* end confdefs.h. */ +| #include +| #include +| +| int +| main () +| { +| #if BYTE_ORDER != BIG_ENDIAN +| not big endian +| #endif +| +| ; +| return 0; +| } +configure:49886: result: no +configure:49924: checking whether C compiler allows unaligned doubles +configure:49957: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:49957: $? = 0 +configure:49957: ./conftest +configure:49957: $? = 0 +configure:49967: result: yes +configure:49986: checking whether gcc supports __func__ +configure:50002: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:168:13: warning: unused variable 'cp' [-Wunused-variable] + const char *cp = __func__; + ^~ +configure:50002: $? = 0 +configure:50009: result: yes +configure:50046: checking whether long double is supported +configure:50063: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:168:13: warning: unused variable 'a' [-Wunused-variable] + long double a; + ^ +configure:50063: $? = 0 +configure:50070: result: yes +configure:50079: checking whether long long is supported +configure:50096: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:169:11: warning: unused variable 'a' [-Wunused-variable] + long long a; + ^ +configure:50096: $? = 0 +configure:50103: result: yes +configure:50113: checking whether _Float16 is supported +configure:50130: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:170:1: error: '_Float16' is not supported on this target + _Float16 a; + ^~~~~~~~ +conftest.c:170:10: warning: unused variable 'a' [-Wunused-variable] + _Float16 a; + ^ +configure:50130: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| /* end confdefs.h. */ +| +| int +| main () +| { +| _Float16 a; +| ; +| return 0; +| } +configure:50137: result: no +configure:50148: checking for max C struct integer alignment +configure:50266: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50266: $? = 0 +configure:50266: ./conftest +configure:50266: $? = 0 +configure:50278: result: eight +configure:50309: checking for max C struct floating point alignment +configure:50411: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50411: $? = 0 +configure:50411: ./conftest +configure:50411: $? = 0 +configure:50423: result: sixteen +configure:50456: checking for max C struct alignment of structs with doubles +configure:50527: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50527: $? = 0 +configure:50527: ./conftest +configure:50527: $? = 0 +configure:50539: result: eight +configure:50546: checking for max C struct floating point alignment with long doubles +configure:50618: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50618: $? = 0 +configure:50618: ./conftest +configure:50618: $? = 0 +configure:50630: result: sixteen +configure:50640: WARNING: Structures containing long doubles may be aligned differently from structures with floats or longs. MPICH does not handle this case automatically and you should avoid assumed extents for structures containing float types. +configure:50675: checking if alignment of structs with doubles is based on position +configure:50709: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50709: $? = 0 +configure:50709: ./conftest +configure:50709: $? = 0 +configure:50721: result: no +configure:50737: checking if alignment of structs with long long ints is based on position +configure:50773: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50773: $? = 0 +configure:50773: ./conftest +configure:50773: $? = 0 +configure:50785: result: no +configure:50801: checking if double alignment breaks rules, find actual alignment +configure:50848: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50848: $? = 0 +configure:50848: ./conftest +configure:50848: $? = 0 +configure:50860: result: no +configure:50889: checking size of char +configure:50894: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50894: $? = 0 +configure:50894: ./conftest +configure:50894: $? = 0 +configure:50908: result: 1 +configure:50922: checking size of unsigned char +configure:50927: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50927: $? = 0 +configure:50927: ./conftest +configure:50927: $? = 0 +configure:50941: result: 1 +configure:50955: checking size of short +configure:50960: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50960: $? = 0 +configure:50960: ./conftest +configure:50960: $? = 0 +configure:50974: result: 2 +configure:50988: checking size of unsigned short +configure:50993: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:50993: $? = 0 +configure:50993: ./conftest +configure:50993: $? = 0 +configure:51007: result: 2 +configure:51021: checking size of int +configure:51026: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51026: $? = 0 +configure:51026: ./conftest +configure:51026: $? = 0 +configure:51040: result: 4 +configure:51054: checking size of unsigned int +configure:51073: result: 4 +configure:51087: checking size of long +configure:51092: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51092: $? = 0 +configure:51092: ./conftest +configure:51092: $? = 0 +configure:51106: result: 8 +configure:51120: checking size of unsigned long +configure:51139: result: 8 +configure:51153: checking size of long long +configure:51158: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51158: $? = 0 +configure:51158: ./conftest +configure:51158: $? = 0 +configure:51172: result: 8 +configure:51186: checking size of unsigned long long +configure:51191: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51191: $? = 0 +configure:51191: ./conftest +configure:51191: $? = 0 +configure:51205: result: 8 +configure:51219: checking size of float +configure:51224: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51224: $? = 0 +configure:51224: ./conftest +configure:51224: $? = 0 +configure:51238: result: 4 +configure:51252: checking size of double +configure:51257: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51257: $? = 0 +configure:51257: ./conftest +configure:51257: $? = 0 +configure:51271: result: 8 +configure:51285: checking size of long double +configure:51290: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51290: $? = 0 +configure:51290: ./conftest +configure:51290: $? = 0 +configure:51304: result: 16 +configure:51318: checking size of void * +configure:51337: result: 8 +configure:51348: checking for ANSI C header files +configure:51452: result: yes +configure:51462: checking stddef.h usability +configure:51462: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51462: $? = 0 +configure:51462: result: yes +configure:51462: checking stddef.h presence +configure:51462: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:51462: $? = 0 +configure:51462: result: yes +configure:51462: checking for stddef.h +configure:51462: result: yes +configure:51476: checking size of wchar_t +configure:51481: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51481: $? = 0 +configure:51481: ./conftest +configure:51481: $? = 0 +configure:51500: result: 4 +configure:51515: checking size of float_int +configure:51520: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51520: $? = 0 +configure:51520: ./conftest +configure:51520: $? = 0 +configure:51535: result: 8 +configure:51549: checking size of double_int +configure:51554: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51554: $? = 0 +configure:51554: ./conftest +configure:51554: $? = 0 +configure:51569: result: 16 +configure:51583: checking size of long_int +configure:51588: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51588: $? = 0 +configure:51588: ./conftest +configure:51588: $? = 0 +configure:51603: result: 16 +configure:51617: checking size of short_int +configure:51622: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51622: $? = 0 +configure:51622: ./conftest +configure:51622: $? = 0 +configure:51637: result: 8 +configure:51651: checking size of two_int +configure:51656: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51656: $? = 0 +configure:51656: ./conftest +configure:51656: $? = 0 +configure:51671: result: 8 +configure:51685: checking size of long_double_int +configure:51690: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51690: $? = 0 +configure:51690: ./conftest +configure:51690: $? = 0 +configure:51705: result: 32 +configure:51718: checking sys/bitypes.h usability +configure:51718: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51718: $? = 0 +configure:51718: result: yes +configure:51718: checking sys/bitypes.h presence +configure:51718: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:51718: $? = 0 +configure:51718: result: yes +configure:51718: checking for sys/bitypes.h +configure:51718: result: yes +configure:51731: checking for inttypes.h +configure:51731: result: yes +configure:51731: checking for stdint.h +configure:51731: result: yes +configure:51743: checking for int8_t +configure:51743: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51743: $? = 0 +configure:51743: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:234:12: error: size of array 'test_array' is negative + static int test_array [1 - 2 * !((int8_t) (((((int8_t) 1 << N) << N) - 1) * 2 + 1) + ^~~~~~~~~~ +configure:51743: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| enum { N = 8 / 2 - 1 }; +| int +| main () +| { +| static int test_array [1 - 2 * !((int8_t) (((((int8_t) 1 << N) << N) - 1) * 2 + 1) +| < (int8_t) (((((int8_t) 1 << N) << N) - 1) * 2 + 2))]; +| test_array [0] = 0; +| return test_array [0]; +| +| ; +| return 0; +| } +configure:51743: result: yes +configure:51754: checking for int16_t +configure:51754: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51754: $? = 0 +configure:51754: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:234:12: error: size of array 'test_array' is negative + static int test_array [1 - 2 * !((int16_t) (((((int16_t) 1 << N) << N) - 1) * 2 + 1) + ^~~~~~~~~~ +configure:51754: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| enum { N = 16 / 2 - 1 }; +| int +| main () +| { +| static int test_array [1 - 2 * !((int16_t) (((((int16_t) 1 << N) << N) - 1) * 2 + 1) +| < (int16_t) (((((int16_t) 1 << N) << N) - 1) * 2 + 2))]; +| test_array [0] = 0; +| return test_array [0]; +| +| ; +| return 0; +| } +configure:51754: result: yes +configure:51765: checking for int32_t +configure:51765: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51765: $? = 0 +configure:51765: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:235:53: warning: integer overflow in expression [-Woverflow] + < (int32_t) (((((int32_t) 1 << N) << N) - 1) * 2 + 2))]; + ^ +conftest.c:234:12: error: storage size of 'test_array' isn't constant + static int test_array [1 - 2 * !((int32_t) (((((int32_t) 1 << N) << N) - 1) * 2 + 1) + ^~~~~~~~~~ +conftest.c:234:12: warning: unused variable 'test_array' [-Wunused-variable] +configure:51765: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| enum { N = 32 / 2 - 1 }; +| int +| main () +| { +| static int test_array [1 - 2 * !((int32_t) (((((int32_t) 1 << N) << N) - 1) * 2 + 1) +| < (int32_t) (((((int32_t) 1 << N) << N) - 1) * 2 + 2))]; +| test_array [0] = 0; +| return test_array [0]; +| +| ; +| return 0; +| } +configure:51765: result: yes +configure:51776: checking for int64_t +configure:51776: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51776: $? = 0 +configure:51776: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:235:53: warning: integer overflow in expression [-Woverflow] + < (int64_t) (((((int64_t) 1 << N) << N) - 1) * 2 + 2))]; + ^ +conftest.c:234:12: error: storage size of 'test_array' isn't constant + static int test_array [1 - 2 * !((int64_t) (((((int64_t) 1 << N) << N) - 1) * 2 + 1) + ^~~~~~~~~~ +conftest.c:234:12: warning: unused variable 'test_array' [-Wunused-variable] +configure:51776: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| enum { N = 64 / 2 - 1 }; +| int +| main () +| { +| static int test_array [1 - 2 * !((int64_t) (((((int64_t) 1 << N) << N) - 1) * 2 + 1) +| < (int64_t) (((((int64_t) 1 << N) << N) - 1) * 2 + 2))]; +| test_array [0] = 0; +| return test_array [0]; +| +| ; +| return 0; +| } +configure:51776: result: yes +configure:51817: checking for uint8_t +configure:51817: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51817: $? = 0 +configure:51817: result: yes +configure:51831: checking for uint16_t +configure:51831: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51831: $? = 0 +configure:51831: result: yes +configure:51843: checking for uint32_t +configure:51843: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51843: $? = 0 +configure:51843: result: yes +configure:51857: checking for uint64_t +configure:51857: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51857: $? = 0 +configure:51857: result: yes +configure:51899: checking stdbool.h usability +configure:51899: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51899: $? = 0 +configure:51899: result: yes +configure:51899: checking stdbool.h presence +configure:51899: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:51899: $? = 0 +configure:51899: result: yes +configure:51899: checking for stdbool.h +configure:51899: result: yes +configure:51899: checking complex.h usability +configure:51899: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:51899: $? = 0 +configure:51899: result: yes +configure:51899: checking complex.h presence +configure:51899: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:51899: $? = 0 +configure:51899: result: yes +configure:51899: checking for complex.h +configure:51899: result: yes +configure:51913: checking size of _Bool +configure:51918: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51918: $? = 0 +configure:51918: ./conftest +configure:51918: $? = 0 +configure:51937: result: 1 +configure:51951: checking size of float _Complex +configure:51956: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51956: $? = 0 +configure:51956: ./conftest +configure:51956: $? = 0 +configure:51975: result: 8 +configure:51989: checking size of double _Complex +configure:51994: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:51994: $? = 0 +configure:51994: ./conftest +configure:51994: $? = 0 +configure:52013: result: 16 +configure:52029: checking size of long double _Complex +configure:52034: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:52034: $? = 0 +configure:52034: ./conftest +configure:52034: $? = 0 +configure:52053: result: 32 +configure:52069: checking size of _Float16 +configure:52074: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c: In function 'longval': +conftest.c:244:57: error: '_Float16' is not supported on this target + static long int longval () { return (long int) (sizeof (_Float16)); } + ^~~~~~~~ +conftest.c: In function 'ulongval': +conftest.c:245:67: error: '_Float16' is not supported on this target + static unsigned long int ulongval () { return (long int) (sizeof (_Float16)); } + ^~~~~~~~ +conftest.c: In function 'main': +conftest.c:255:28: error: '_Float16' is not supported on this target + if (((long int) (sizeof (_Float16))) < 0) + ^~~~~~~~ +conftest.c:258:37: error: '_Float16' is not supported on this target + if (i != ((long int) (sizeof (_Float16)))) + ^~~~~~~~ +conftest.c:265:37: error: '_Float16' is not supported on this target + if (i != ((long int) (sizeof (_Float16)))) + ^~~~~~~~ +configure:52074: $? = 1 +configure: program exited with status 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| static long int longval () { return (long int) (sizeof (_Float16)); } +| static unsigned long int ulongval () { return (long int) (sizeof (_Float16)); } +| #include +| #include +| int +| main () +| { +| +| FILE *f = fopen ("conftest.val", "w"); +| if (! f) +| return 1; +| if (((long int) (sizeof (_Float16))) < 0) +| { +| long int i = longval (); +| if (i != ((long int) (sizeof (_Float16)))) +| return 1; +| fprintf (f, "%ld", i); +| } +| else +| { +| unsigned long int i = ulongval (); +| if (i != ((long int) (sizeof (_Float16)))) +| return 1; +| fprintf (f, "%lu", i); +| } +| /* Do not output a trailing newline, as this causes \r\n confusion +| on some platforms. */ +| return ferror (f) || fclose (f) != 0; +| +| ; +| return 0; +| } +configure:52088: result: 0 +configure:52101: checking for _Bool +configure:52101: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:52101: $? = 0 +configure:52101: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:248:20: error: expected expression before ')' token + if (sizeof ((_Bool))) + ^ +configure:52101: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((_Bool))) +| return 0; +| ; +| return 0; +| } +configure:52101: result: yes +configure:52110: checking for float _Complex +configure:52110: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:52110: $? = 0 +configure:52110: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:249:29: error: expected expression before ')' token + if (sizeof ((float _Complex))) + ^ +configure:52110: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((float _Complex))) +| return 0; +| ; +| return 0; +| } +configure:52110: result: yes +configure:52119: checking for double _Complex +configure:52119: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:52119: $? = 0 +configure:52119: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:250:30: error: expected expression before ')' token + if (sizeof ((double _Complex))) + ^ +configure:52119: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((double _Complex))) +| return 0; +| ; +| return 0; +| } +configure:52119: result: yes +configure:52132: checking for long double _Complex +configure:52132: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:52132: $? = 0 +configure:52132: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:251:35: error: expected expression before ')' token + if (sizeof ((long double _Complex))) + ^ +configure:52132: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((long double _Complex))) +| return 0; +| ; +| return 0; +| } +configure:52132: result: yes +configure:52559: checking for size of Fortran type integer +configure:52600: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:52600: $? = 0 +configure:52604: mv conftest.o pac_conftest.o +configure:52607: $? = 0 +configure:52634: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f pac_conftest.o >&5 +configure:52634: $? = 0 +configure:52634: ./conftest +configure:52634: $? = 0 +configure:52672: result: 4 +configure:52687: checking for size of Fortran type real +configure:52728: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:52728: $? = 0 +configure:52732: mv conftest.o pac_conftest.o +configure:52735: $? = 0 +configure:52762: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f pac_conftest.o >&5 +configure:52762: $? = 0 +configure:52762: ./conftest +configure:52762: $? = 0 +configure:52800: result: 4 +configure:52815: checking for size of Fortran type double precision +configure:52856: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:52856: $? = 0 +configure:52860: mv conftest.o pac_conftest.o +configure:52863: $? = 0 +configure:52890: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f pac_conftest.o >&5 +configure:52890: $? = 0 +configure:52890: ./conftest +configure:52890: $? = 0 +configure:52928: result: 8 +configure:52951: checking whether integer*1 is supported +configure:52962: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:2:17: + + integer*1 i + 1 +Warning: Unused variable 'i' declared at (1) [-Wunused-variable] +configure:52962: $? = 0 +configure:52969: result: yes +configure:52971: checking whether integer*2 is supported +configure:52982: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:2:17: + + integer*2 i + 1 +Warning: Unused variable 'i' declared at (1) [-Wunused-variable] +configure:52982: $? = 0 +configure:52989: result: yes +configure:52991: checking whether integer*4 is supported +configure:53002: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:2:17: + + integer*4 i + 1 +Warning: Unused variable 'i' declared at (1) [-Wunused-variable] +configure:53002: $? = 0 +configure:53009: result: yes +configure:53011: checking whether integer*8 is supported +configure:53022: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:2:17: + + integer*8 i + 1 +Warning: Unused variable 'i' declared at (1) [-Wunused-variable] +configure:53022: $? = 0 +configure:53029: result: yes +configure:53031: checking whether integer*16 is supported +configure:53042: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:2:18: + + integer*16 i + 1 +Warning: Unused variable 'i' declared at (1) [-Wunused-variable] +configure:53042: $? = 0 +configure:53049: result: yes +configure:53051: checking whether real*4 is supported +configure:53062: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:2:14: + + real*4 a + 1 +Warning: Unused variable 'a' declared at (1) [-Wunused-variable] +configure:53062: $? = 0 +configure:53069: result: yes +configure:53071: checking whether real*8 is supported +configure:53082: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:2:14: + + real*8 a + 1 +Warning: Unused variable 'a' declared at (1) [-Wunused-variable] +configure:53082: $? = 0 +configure:53089: result: yes +configure:53091: checking whether real*16 is supported +configure:53102: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:2:15: + + real*16 a + 1 +Warning: Unused variable 'a' declared at (1) [-Wunused-variable] +configure:53102: $? = 0 +configure:53109: result: yes +configure:53208: checking for C type matching Fortran real +configure:53216: result: float +configure:53231: checking for C type matching Fortran double +configure:53238: result: double +configure:53548: checking for C type matching Fortran integer +configure:53555: result: int +configure:53708: checking for values of Fortran logicals +configure:53747: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:53747: $? = 0 +configure:53750: mv conftest.o pac_conftest.o +configure:53753: $? = 0 +configure:53785: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f pac_conftest.o >&5 +configure:53785: $? = 0 +configure:53785: ./conftest +configure:53785: $? = 0 +configure:53823: result: True is 1 and False is 0 +configure:53934: checking for Fortran 90 integer kind for 8-byte integers +configure:53974: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 >&5 +configure:53974: $? = 0 +configure:53974: ./conftest +configure:53974: $? = 0 +configure:53991: result: 8 +configure:54103: checking for Fortran 90 integer kind for 4-byte integers +configure:54143: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 >&5 +configure:54143: $? = 0 +configure:54143: ./conftest +configure:54143: $? = 0 +configure:54160: result: 4 +configure:54193: checking if real*8 is supported in Fortran 90 +configure:54206: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f90 >&5 +conftest.f90:3:14: + + real*8 a + 1 +Warning: Unused variable 'a' declared at (1) [-Wunused-variable] +configure:54206: $? = 0 +configure:54218: result: yes +configure:54374: checking size of bool +configure:54379: g++ -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp >&5 +configure:54379: $? = 0 +configure:54379: ./conftest +configure:54379: $? = 0 +configure:54393: result: 1 +configure:54435: checking complex usability +configure:54435: g++ -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp >&5 +configure:54435: $? = 0 +configure:54435: result: yes +configure:54435: checking complex presence +configure:54435: g++ -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.cpp +configure:54435: $? = 0 +configure:54435: result: yes +configure:54435: checking for complex +configure:54435: result: yes +configure:54448: checking size of Complex +configure:54453: g++ -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp >&5 +configure:54453: $? = 0 +configure:54453: ./conftest +configure:54453: $? = 0 +configure:54472: result: 8 +configure:54486: checking size of DoubleComplex +configure:54491: g++ -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp >&5 +configure:54491: $? = 0 +configure:54491: ./conftest +configure:54491: $? = 0 +configure:54510: result: 16 +configure:54525: checking size of LongDoubleComplex +configure:54530: g++ -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.cpp >&5 +configure:54530: $? = 0 +configure:54530: ./conftest +configure:54530: $? = 0 +configure:54549: result: 32 +configure:54661: checking whether C compiler accepts option -Werror +configure:54716: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c > pac_test1.log 2>&1 +configure:54716: $? = 0 +configure:54747: gcc -o conftest -Werror -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c > pac_test2.log 2>&1 +configure:54747: $? = 0 +configure:54755: diff -b pac_test1.log pac_test2.log > pac_test.log +configure:54758: $? = 0 +configure:54858: result: yes +configure:54863: checking whether routines compiled with -Werror can be linked with ones compiled without -Werror +configure:54903: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c > pac_test3.log 2>&1 +configure:54903: $? = 0 +configure:54907: mv conftest.o pac_conftest.o +configure:54910: $? = 0 +configure:54953: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c pac_conftest.o > pac_test4.log 2>&1 +configure:54953: $? = 0 +configure:54995: gcc -o conftest -Werror -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c pac_conftest.o > pac_test5.log 2>&1 +configure:54995: $? = 0 +configure:55003: diff -b pac_test4.log pac_test5.log > pac_test.log +configure:55006: $? = 0 +configure:55145: result: yes +configure:55181: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Werror -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:247:80: error: expected expression before 'int' + static const TEST_Datatype test_int __attribute__((type_tag_for_datatype(TEST,int))) = TEST_INT; + ^~~ +conftest.c:247:84: error: expected ',' or ';' before ')' token + static const TEST_Datatype test_int __attribute__((type_tag_for_datatype(TEST,int))) = TEST_INT; + ^ +conftest.c:248:1: error: 'pointer_with_type_tag' attribute directive ignored [-Werror=attributes] + void test(const void* buffer, TEST_Datatype datatype)__attribute__((pointer_with_type_tag(TEST,1,2))); + ^~~~ +conftest.c:247:28: error: 'test_int' defined but not used [-Werror=unused-const-variable=] + static const TEST_Datatype test_int __attribute__((type_tag_for_datatype(TEST,int))) = TEST_INT; + ^~~~~~~~ +cc1: all warnings being treated as errors +configure:55181: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| /* end confdefs.h. */ +| +| typedef int TEST_Datatype; +| #define TEST_INT ((TEST_Datatype)0x44) +| static const TEST_Datatype test_int __attribute__((type_tag_for_datatype(TEST,int))) = TEST_INT; +| void test(const void* buffer, TEST_Datatype datatype)__attribute__((pointer_with_type_tag(TEST,1,2))); +| int +| main () +| { +| +| const int buf[10]; +| test(buf, TEST_INT); +| ; +| return 0; +| } +configure:55217: checking for alignment restrictions on int64_t +configure:55251: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:55251: $? = 0 +configure:55251: ./conftest +configure:55251: $? = 0 +configure:55262: result: no +configure:55281: checking for alignment restrictions on int32_t +configure:55315: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:55315: $? = 0 +configure:55315: ./conftest +configure:55315: $? = 0 +configure:55326: result: no +configure:55345: checking for gcov +configure:55361: found /usr/bin/gcov +configure:55372: result: gcov +configure:55494: checking for ANSI C header files +configure:55598: result: yes +configure:55613: checking for stdlib.h +configure:55613: result: yes +configure:55613: checking stdarg.h usability +configure:55613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking stdarg.h presence +configure:55613: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking for stdarg.h +configure:55613: result: yes +configure:55613: checking for sys/types.h +configure:55613: result: yes +configure:55613: checking for string.h +configure:55613: result: yes +configure:55613: checking for inttypes.h +configure:55613: result: yes +configure:55613: checking limits.h usability +configure:55613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking limits.h presence +configure:55613: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking for limits.h +configure:55613: result: yes +configure:55613: checking for stddef.h +configure:55613: result: yes +configure:55613: checking errno.h usability +configure:55613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking errno.h presence +configure:55613: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking for errno.h +configure:55613: result: yes +configure:55613: checking sys/socket.h usability +configure:55613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking sys/socket.h presence +configure:55613: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking for sys/socket.h +configure:55613: result: yes +configure:55613: checking sys/time.h usability +configure:55613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking sys/time.h presence +configure:55613: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking for sys/time.h +configure:55613: result: yes +configure:55613: checking for unistd.h +configure:55613: result: yes +configure:55613: checking endian.h usability +configure:55613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking endian.h presence +configure:55613: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking for endian.h +configure:55613: result: yes +configure:55613: checking assert.h usability +configure:55613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking assert.h presence +configure:55613: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking for assert.h +configure:55613: result: yes +configure:55613: checking sys/param.h usability +configure:55613: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking sys/param.h presence +configure:55613: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:55613: $? = 0 +configure:55613: result: yes +configure:55613: checking for sys/param.h +configure:55613: result: yes +configure:55623: checking for sys/uio.h +configure:55643: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:268:5: warning: unused variable 'a' [-Wunused-variable] + int a; + ^ +configure:55643: $? = 0 +configure:55650: result: yes +configure:55659: checking for size_t +configure:55659: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55659: $? = 0 +configure:55659: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:298:21: error: expected expression before ')' token + if (sizeof ((size_t))) + ^ +configure:55659: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((size_t))) +| return 0; +| ; +| return 0; +| } +configure:55659: result: yes +configure:55675: checking for setitimer +configure:55675: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:55675: $? = 0 +configure:55675: result: yes +configure:55675: checking for alarm +configure:55675: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:55675: $? = 0 +configure:55675: result: yes +configure:55688: checking for vsnprintf +configure:55688: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:287:6: warning: conflicting types for built-in function 'vsnprintf' [-Wbuiltin-declaration-mismatch] + char vsnprintf (); + ^~~~~~~~~ +configure:55688: $? = 0 +configure:55688: result: yes +configure:55688: checking for vsprintf +configure:55688: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:288:6: warning: conflicting types for built-in function 'vsprintf' [-Wbuiltin-declaration-mismatch] + char vsprintf (); + ^~~~~~~~ +configure:55688: $? = 0 +configure:55688: result: yes +configure:55700: checking whether vsnprintf needs a declaration +configure:55719: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55719: $? = 0 +configure:55726: result: no +configure:55743: checking for strerror +configure:55743: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:55743: $? = 0 +configure:55743: result: yes +configure:55743: checking for strncasecmp +configure:55743: result: yes +configure:55752: checking whether strerror_r is declared +configure:55752: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55752: $? = 0 +configure:55752: result: yes +configure:55765: checking for strerror_r +configure:55765: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:55765: $? = 0 +configure:55765: result: yes +configure:55774: checking whether strerror_r returns char * +configure:55798: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55798: $? = 0 +configure:55836: result: yes +configure:55846: checking whether strerror_r needs a declaration +configure:55864: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55864: $? = 0 +configure:55871: result: no +configure:55887: checking for snprintf +configure:55887: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:294:6: warning: conflicting types for built-in function 'snprintf' [-Wbuiltin-declaration-mismatch] + char snprintf (); + ^~~~~~~~ +configure:55887: $? = 0 +configure:55887: result: yes +configure:55898: checking whether snprintf needs a declaration +configure:55916: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:55916: $? = 0 +configure:55923: result: no +configure:55939: checking for qsort +configure:55939: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:55939: $? = 0 +configure:55939: result: yes +configure:55955: checking for va_copy +configure:55981: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:55981: $? = 0 +configure:55989: result: yes +configure:56041: checking for variable argument list macro functionality +configure:56057: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:56057: $? = 0 +configure:56061: result: yes +configure:56074: checking for working alloca.h +configure:56091: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:56091: $? = 0 +configure:56099: result: yes +configure:56107: checking for alloca +configure:56144: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:56144: $? = 0 +configure:56152: result: yes +configure:56276: checking for strdup +configure:56276: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:300:6: warning: conflicting types for built-in function 'strdup' [-Wbuiltin-declaration-mismatch] + char strdup (); + ^~~~~~ +configure:56276: $? = 0 +configure:56276: result: yes +configure:56288: checking whether strdup needs a declaration +configure:56306: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:56306: $? = 0 +configure:56313: result: no +configure:56333: checking for mkstemp +configure:56333: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:56333: $? = 0 +configure:56333: result: yes +configure:56344: checking whether mkstemp needs a declaration +configure:56362: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:56362: $? = 0 +configure:56369: result: no +configure:56384: checking for putenv +configure:56384: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:56384: $? = 0 +configure:56384: result: yes +configure:56395: checking whether putenv needs a declaration +configure:56413: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:56413: $? = 0 +configure:56420: result: no +configure:56542: checking size of MPII_Bsend_data_t +configure:56547: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:56547: $? = 0 +configure:56547: ./conftest +configure:56547: $? = 0 +configure:56580: result: 88 +configure:56609: checking for sched_setaffinity +configure:56609: result: yes +configure:56609: checking for sched_getaffinity +configure:56609: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:56609: $? = 0 +configure:56609: result: yes +configure:56609: checking for bindprocessor +configure:56609: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/cc24KQv7.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:318: undefined reference to `bindprocessor' +collect2: error: ld returned 1 exit status +configure:56609: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| /* end confdefs.h. */ +| /* Define bindprocessor to an innocuous variant, in case declares bindprocessor. +| For example, HP-UX 11i declares gettimeofday. */ +| #define bindprocessor innocuous_bindprocessor +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char bindprocessor (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef bindprocessor +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char bindprocessor (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_bindprocessor || defined __stub___bindprocessor +| choke me +| #endif +| +| int +| main () +| { +| return bindprocessor (); +| ; +| return 0; +| } +configure:56609: result: no +configure:56609: checking for thread_policy_set +configure:56609: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/cc7fmDPc.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:318: undefined reference to `thread_policy_set' +collect2: error: ld returned 1 exit status +configure:56609: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| /* end confdefs.h. */ +| /* Define thread_policy_set to an innocuous variant, in case declares thread_policy_set. +| For example, HP-UX 11i declares gettimeofday. */ +| #define thread_policy_set innocuous_thread_policy_set +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char thread_policy_set (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef thread_policy_set +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char thread_policy_set (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_thread_policy_set || defined __stub___thread_policy_set +| choke me +| #endif +| +| int +| main () +| { +| return thread_policy_set (); +| ; +| return 0; +| } +configure:56609: result: no +configure:56620: checking whether cpu_set_t available +configure:56638: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:289:12: warning: unused variable 't' [-Wunused-variable] + cpu_set_t t; + ^ +configure:56638: $? = 0 +configure:56645: result: yes +configure:56652: checking whether the CPU_SET and CPU_ZERO macros are defined +configure:56670: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:56670: $? = 0 +configure:56678: result: yes +configure:57490: checking for unistd.h +configure:57490: result: yes +configure:57490: checking for string.h +configure:57490: result: yes +configure:57490: checking for stdlib.h +configure:57490: result: yes +configure:57490: checking for sys/socket.h +configure:57490: result: yes +configure:57490: checking for strings.h +configure:57490: result: yes +configure:57490: checking for assert.h +configure:57490: result: yes +configure:57490: checking arpa/inet.h usability +configure:57490: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:57490: $? = 0 +configure:57490: result: yes +configure:57490: checking arpa/inet.h presence +configure:57490: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:57490: $? = 0 +configure:57490: result: yes +configure:57490: checking for arpa/inet.h +configure:57490: result: yes +configure:57502: checking for snprintf +configure:57502: result: yes +configure:57513: checking whether snprintf needs a declaration +configure:57538: result: no +configure:57552: checking for strncasecmp +configure:57552: result: yes +configure:57585: checking for sys/types.h +configure:57585: result: yes +configure:57585: checking for sys/param.h +configure:57585: result: yes +configure:57585: checking for sys/socket.h +configure:57585: result: yes +configure:57585: checking netinet/in.h usability +configure:57585: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:57585: $? = 0 +configure:57585: result: yes +configure:57585: checking netinet/in.h presence +configure:57585: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:57585: $? = 0 +configure:57585: result: yes +configure:57585: checking for netinet/in.h +configure:57585: result: yes +configure:57585: checking netinet/tcp.h usability +configure:57585: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:57585: $? = 0 +configure:57585: result: yes +configure:57585: checking netinet/tcp.h presence +configure:57585: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:57585: $? = 0 +configure:57585: result: yes +configure:57585: checking for netinet/tcp.h +configure:57585: result: yes +configure:57585: checking sys/un.h usability +configure:57585: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:57585: $? = 0 +configure:57585: result: yes +configure:57585: checking sys/un.h presence +configure:57585: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:57585: $? = 0 +configure:57585: result: yes +configure:57585: checking for sys/un.h +configure:57585: result: yes +configure:57585: checking netdb.h usability +configure:57585: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:57585: $? = 0 +configure:57585: result: yes +configure:57585: checking netdb.h presence +configure:57585: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:57585: $? = 0 +configure:57585: result: yes +configure:57585: checking for netdb.h +configure:57585: result: yes +configure:57598: checking for library containing socket +configure:57629: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:57629: $? = 0 +configure:57646: result: none required +configure:57656: checking for library containing gethostbyname +configure:57687: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:57687: $? = 0 +configure:57704: result: none required +configure:57714: checking for library containing setsockopt +configure:57745: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:57745: $? = 0 +configure:57762: result: none required +configure:57784: checking whether socklen_t is defined (in sys/socket.h if present) +configure:57807: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:309:37: error: conflicting types for 'socklen_t' + typedef struct { double a; int b; } socklen_t; + ^~~~~~~~~ +In file included from /usr/include/sys/socket.h:33:0, + from conftest.c:306: +/usr/include/bits/socket.h:33:21: note: previous declaration of 'socklen_t' was here + typedef __socklen_t socklen_t; + ^~~~~~~~~ +conftest.c: In function 'main': +conftest.c:313:11: warning: variable 'a' set but not used [-Wunused-but-set-variable] + socklen_t a;a.a=1.0; + ^ +configure:57807: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_NETINET_TCP_H 1 +| #define HAVE_SYS_UN_H 1 +| #define HAVE_NETDB_H 1 +| #define USE_PMI_PORT 1 +| /* end confdefs.h. */ +| +| #include +| #ifdef HAVE_SYS_SOCKET_H +| #include +| #endif +| +| typedef struct { double a; int b; } socklen_t; +| int +| main () +| { +| socklen_t a;a.a=1.0; +| ; +| return 0; +| } +configure:57814: result: yes +configure:57822: checking whether struct hostent contains h_addr_list +configure:57840: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:308:21: warning: 'hp.h_addr_list' is used uninitialized in this function [-Wuninitialized] + struct hostent hp;hp.h_addr_list[0]=0; + ~~^~~~~~~~~~~~ +configure:57840: $? = 0 +configure:57847: result: yes +configure:57857: checking whether __attribute__ allowed +configure:57881: result: yes +configure:57883: checking whether __attribute__((format)) allowed +configure:57907: result: yes +configure:58383: RUNNING CONFIGURE FOR F90 CODE +configure:58386: checking whether ln -s works +configure:58390: result: yes +configure:58400: checking for extension for Fortran 90 programs +configure:58415: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f90 >&5 +configure:58415: $? = 0 +configure:58417: result: f90 +configure:58462: checking for the precision and range of reals +configure:58489: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 >&5 +configure:58489: $? = 0 +configure:58489: ./conftest +configure:58489: $? = 0 +configure:58493: result: 6 , 37 +configure:58527: checking for the precision and range of double precision +configure:58554: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 >&5 +configure:58554: $? = 0 +configure:58554: ./conftest +configure:58554: $? = 0 +configure:58558: result: 15 , 307 +configure:58592: checking for the range of integer +configure:58619: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 >&5 +configure:58619: $? = 0 +configure:58619: ./conftest +configure:58619: $? = 0 +configure:58623: result: 9 +configure:58658: checking for available integer kinds +configure:58699: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 >&5 +configure:58699: $? = 0 +configure:58699: ./conftest +configure:58699: $? = 0 +configure:58703: result: 2 , 1, 4 , 2, 9 , 4, 18 , 8, +configure:58738: checking for available integer ranges +configure:58767: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:58767: $? = 0 +configure:58770: mv conftest.o pac_conftest.o +configure:58773: $? = 0 +configure:58823: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o >&5 +configure:58823: $? = 0 +configure:58823: ./conftest +configure:58823: $? = 0 +configure:58823: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o >&5 +configure:58823: $? = 0 +configure:58823: ./conftest +configure:58823: $? = 0 +configure:58823: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o >&5 +configure:58823: $? = 0 +configure:58823: ./conftest +configure:58823: $? = 0 +configure:58823: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o >&5 +configure:58823: $? = 0 +configure:58823: ./conftest +configure:58823: $? = 0 +configure:58847: result: { 2 , 1 , 1 }, { 4 , 2 , 2 }, { 9 , 4 , 4 }, { 18 , 8 , 8 }, +configure:60103: RUNNING CONFIGURE FOR src/pm/gforker +configure:60127: checking for library containing socketpair +configure:60158: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60158: $? = 0 +configure:60175: result: none required +configure:60186: checking for sys/types.h +configure:60186: result: yes +configure:60186: checking signal.h usability +configure:60186: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:60186: $? = 0 +configure:60186: result: yes +configure:60186: checking signal.h presence +configure:60186: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:60186: $? = 0 +configure:60186: result: yes +configure:60186: checking for signal.h +configure:60186: result: yes +configure:60186: checking sys/ptrace.h usability +configure:60186: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:60186: $? = 0 +configure:60186: result: yes +configure:60186: checking sys/ptrace.h presence +configure:60186: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:60186: $? = 0 +configure:60186: result: yes +configure:60186: checking for sys/ptrace.h +configure:60186: result: yes +configure:60198: checking for strsignal +configure:60198: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60198: $? = 0 +configure:60198: result: yes +configure:60210: checking for sigaction +configure:60210: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60210: $? = 0 +configure:60210: result: yes +configure:60210: checking for signal +configure:60210: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60210: $? = 0 +configure:60210: result: yes +configure:60210: checking for sigset +configure:60210: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60210: $? = 0 +configure:60210: result: yes +configure:60221: checking for struct sigaction +configure:60239: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:60239: $? = 0 +configure:60246: result: yes +configure:60311: checking for string.h +configure:60311: result: yes +configure:60311: checking for sys/time.h +configure:60311: result: yes +configure:60311: checking for unistd.h +configure:60311: result: yes +configure:60311: checking for stdlib.h +configure:60311: result: yes +configure:60311: checking for sys/socket.h +configure:60311: result: yes +configure:60311: checking wait.h usability +configure:60311: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:60311: $? = 0 +configure:60311: result: yes +configure:60311: checking wait.h presence +configure:60311: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +configure:60311: $? = 0 +configure:60311: result: yes +configure:60311: checking for wait.h +configure:60311: result: yes +configure:60311: checking for errno.h +configure:60311: result: yes +configure:60799: RUNNING CONFIGURE FOR src/pm/util +configure:60818: checking for pid_t +configure:60818: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:60818: $? = 0 +configure:60818: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:357:20: error: expected expression before ')' token + if (sizeof ((pid_t))) + ^ +configure:60818: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_NETINET_TCP_H 1 +| #define HAVE_SYS_UN_H 1 +| #define HAVE_NETDB_H 1 +| #define USE_PMI_PORT 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION 1 +| #define MPIEXEC_ALLOW_PORT 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| int +| main () +| { +| if (sizeof ((pid_t))) +| return 0; +| ; +| return 0; +| } +configure:60818: result: yes +configure:60892: checking for setsid +configure:60892: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60892: $? = 0 +configure:60892: result: yes +configure:60892: checking for isatty +configure:60892: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60892: $? = 0 +configure:60892: result: yes +configure:60892: checking for getsid +configure:60892: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60892: $? = 0 +configure:60892: result: yes +configure:60904: checking whether getsid needs a declaration +configure:60922: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:60922: $? = 0 +configure:60929: result: no +configure:60949: checking for unsetenv +configure:60949: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +configure:60949: $? = 0 +configure:60949: result: yes +configure:60962: checking for cygwin1.dll in /bin +configure:60973: result: yes +configure:60982: checking for environ in unistd.h +configure:60999: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:331:8: warning: unused variable 'ep' [-Wunused-variable] + char **ep = environ; + ^~ +configure:60999: $? = 0 +configure:61006: result: yes +configure:61051: checking for library containing socketpair +configure:61099: result: none required +configure:61107: checking for ANSI C header files +configure:61211: result: yes +configure:61222: checking for sys/types.h +configure:61222: result: yes +configure:61222: checking for signal.h +configure:61222: result: yes +configure:61222: checking for sys/ptrace.h +configure:61222: result: yes +configure:61222: checking for sys/uio.h +configure:61222: result: yes +configure:61222: checking for unistd.h +configure:61222: result: yes +configure:61234: checking whether struct iovec is defined in sys/uio.h +configure:61252: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c: In function 'main': +conftest.c:339:14: warning: unused variable 'v' [-Wunused-variable] + struct iovec v + ^ +configure:61252: $? = 0 +configure:61259: result: yes +configure:61269: checking for strsignal +configure:61269: result: yes +configure:61280: checking whether strsignal needs a declaration +configure:61298: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:61298: $? = 0 +configure:61305: result: no +configure:61320: checking for sigaction +configure:61320: result: yes +configure:61320: checking for signal +configure:61320: result: yes +configure:61320: checking for sigset +configure:61320: result: yes +configure:61332: checking for struct sigaction and sa_handler +configure:61351: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +configure:61351: $? = 0 +configure:61358: result: yes +configure:61419: checking for putenv +configure:61419: result: yes +configure:61430: checking whether putenv needs a declaration +configure:61455: result: no +configure:61470: checking for gethostname +configure:61470: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61470: $? = 0 +configure:61470: result: yes +configure:61482: checking whether gethostname needs a declaration +configure:61500: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61500: $? = 0 +configure:61507: result: no +configure:61525: checking for select +configure:61525: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61525: $? = 0 +configure:61525: result: yes +configure:61536: checking sys/select.h usability +configure:61536: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61536: $? = 0 +configure:61536: result: yes +configure:61536: checking sys/select.h presence +configure:61536: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61536: $? = 0 +configure:61536: result: yes +configure:61536: checking for sys/select.h +configure:61536: result: yes +configure:61557: checking whether FD_ZERO works +configure:61574: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61574: $? = 0 +configure:61582: result: yes +configure:61598: checking for sched_setaffinity +configure:61598: result: yes +configure:61598: checking for sched_getaffinity +configure:61598: result: yes +configure:61598: checking for bindprocessor +configure:61598: result: no +configure:61598: checking for thread_policy_set +configure:61598: result: no +configure:61609: checking whether cpu_set_t available +configure:61634: result: yes +configure:61641: checking whether the CPU_SET and CPU_ZERO macros are defined +configure:61667: result: yes +configure:61718: checking for string.h +configure:61718: result: yes +configure:61718: checking for sys/time.h +configure:61718: result: yes +configure:61718: checking time.h usability +configure:61718: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61718: $? = 0 +configure:61718: result: yes +configure:61718: checking time.h presence +configure:61718: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61718: $? = 0 +configure:61718: result: yes +configure:61718: checking for time.h +configure:61718: result: yes +configure:61718: checking for stdlib.h +configure:61718: result: yes +configure:61718: checking for sys/socket.h +configure:61718: result: yes +configure:61718: checking for wait.h +configure:61718: result: yes +configure:61718: checking for errno.h +configure:61718: result: yes +configure:61730: checking for time +configure:61730: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61730: $? = 0 +configure:61730: result: yes +configure:61741: checking whether socklen_t is defined (in sys/socket.h if present) +configure:61770: result: yes +configure:61806: RUNNING CONFIGURE FOR CH3 DEVICE +configure:61830: checking for assert.h +configure:61830: result: yes +configure:61830: checking for limits.h +configure:61830: result: yes +configure:61830: checking for string.h +configure:61830: result: yes +configure:61830: checking for sys/types.h +configure:61830: result: yes +configure:61830: checking for sys/uio.h +configure:61830: result: yes +configure:61830: checking uuid/uuid.h usability +configure:61830: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61830: $? = 0 +configure:61830: result: yes +configure:61830: checking uuid/uuid.h presence +configure:61830: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61830: $? = 0 +configure:61830: result: yes +configure:61830: checking for uuid/uuid.h +configure:61830: result: yes +configure:61830: checking for time.h +configure:61830: result: yes +configure:61830: checking for ctype.h +configure:61830: result: yes +configure:61830: checking for unistd.h +configure:61830: result: yes +configure:61830: checking for arpa/inet.h +configure:61830: result: yes +configure:61830: checking for sys/socket.h +configure:61830: result: yes +configure:61846: checking for net/if.h +configure:61846: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61846: $? = 0 +configure:61846: result: yes +configure:61871: checking for pid_t +configure:61871: result: yes +configure:61886: checking for inet_pton +configure:61886: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:61886: $? = 0 +configure:61886: result: yes +configure:61897: checking for gethostname +configure:61897: result: yes +configure:61909: checking whether gethostname needs a declaration +configure:61934: result: no +configure:61950: checking for CFUUIDCreate +configure:61950: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/cc72RE8L.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:406: undefined reference to `CFUUIDCreate' +collect2: error: ld returned 1 exit status +configure:61950: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_NETINET_TCP_H 1 +| #define HAVE_SYS_UN_H 1 +| #define HAVE_NETDB_H 1 +| #define USE_PMI_PORT 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION 1 +| #define MPIEXEC_ALLOW_PORT 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SETSID 1 +| #define HAVE_ISATTY 1 +| #define HAVE_GETSID 1 +| #define USE_NEW_SESSION 1 +| #define HAVE_UNSETENV 1 +| #define NEEDS_BIN_IN_PATH 1 +| #define HAVE_EXTERN_ENVIRON 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_IOVEC_DEFINITION 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION /**/ +| #define HAVE_PUTENV 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_SELECT 1 +| #define HAVE_SYS_SELECT_H 1 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_TIME 1 +| #define HAVE_SOCKLEN_T 1 +| #define CH3_RANK_BITS 16 +| #define HAVE_ASSERT_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UUID_UUID_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_INET_PTON 1 +| #define HAVE_GETHOSTNAME 1 +| /* end confdefs.h. */ +| /* Define CFUUIDCreate to an innocuous variant, in case declares CFUUIDCreate. +| For example, HP-UX 11i declares gettimeofday. */ +| #define CFUUIDCreate innocuous_CFUUIDCreate +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char CFUUIDCreate (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef CFUUIDCreate +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char CFUUIDCreate (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_CFUUIDCreate || defined __stub___CFUUIDCreate +| choke me +| #endif +| +| int +| main () +| { +| return CFUUIDCreate (); +| ; +| return 0; +| } +configure:61950: result: no +configure:61950: checking for uuid_generate +configure:61950: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccxMDVPN.o: in function `main': +/home/brian/daos/rpm/mpich/conftest.c:406: undefined reference to `uuid_generate' +collect2: error: ld returned 1 exit status +configure:61950: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_NETINET_TCP_H 1 +| #define HAVE_SYS_UN_H 1 +| #define HAVE_NETDB_H 1 +| #define USE_PMI_PORT 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION 1 +| #define MPIEXEC_ALLOW_PORT 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SETSID 1 +| #define HAVE_ISATTY 1 +| #define HAVE_GETSID 1 +| #define USE_NEW_SESSION 1 +| #define HAVE_UNSETENV 1 +| #define NEEDS_BIN_IN_PATH 1 +| #define HAVE_EXTERN_ENVIRON 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_IOVEC_DEFINITION 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION /**/ +| #define HAVE_PUTENV 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_SELECT 1 +| #define HAVE_SYS_SELECT_H 1 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_TIME 1 +| #define HAVE_SOCKLEN_T 1 +| #define CH3_RANK_BITS 16 +| #define HAVE_ASSERT_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UUID_UUID_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_INET_PTON 1 +| #define HAVE_GETHOSTNAME 1 +| /* end confdefs.h. */ +| /* Define uuid_generate to an innocuous variant, in case declares uuid_generate. +| For example, HP-UX 11i declares gettimeofday. */ +| #define uuid_generate innocuous_uuid_generate +| +| /* System header to define __stub macros and hopefully few prototypes, +| which can conflict with char uuid_generate (); below. +| Prefer to if __STDC__ is defined, since +| exists even on freestanding compilers. */ +| +| #ifdef __STDC__ +| # include +| #else +| # include +| #endif +| +| #undef uuid_generate +| +| /* Override any GCC internal prototype to avoid an error. +| Use char because int might match the return type of a GCC +| builtin and then its argument prototype would still apply. */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char uuid_generate (); +| /* The GNU C library defines this for functions which it implements +| to always fail with ENOSYS. Some functions are actually named +| something starting with __ and the normal name is an alias. */ +| #if defined __stub_uuid_generate || defined __stub___uuid_generate +| choke me +| #endif +| +| int +| main () +| { +| return uuid_generate (); +| ; +| return 0; +| } +configure:61950: result: no +configure:61950: checking for time +configure:61950: result: yes +configure:61961: checking for OpenPA atomic primitive availability +configure:61964: checking whether byte ordering is bigendian +configure:62170: result: no +configure:62212: RUNNING CONFIGURE FOR ch3:nemesis +configure:62237: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62237: $? = 0 +configure:62268: checking for assert.h +configure:62268: result: yes +configure:62268: checking for netdb.h +configure:62268: result: yes +configure:62268: checking for unistd.h +configure:62268: result: yes +configure:62268: checking sched.h usability +configure:62268: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62268: $? = 0 +configure:62268: result: yes +configure:62268: checking sched.h presence +configure:62268: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62268: $? = 0 +configure:62268: result: yes +configure:62268: checking for sched.h +configure:62268: result: yes +configure:62268: checking for sys/mman.h +configure:62268: result: yes +configure:62268: checking sys/ioctl.h usability +configure:62268: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62268: $? = 0 +configure:62268: result: yes +configure:62268: checking sys/ioctl.h presence +configure:62268: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62268: $? = 0 +configure:62268: result: yes +configure:62268: checking for sys/ioctl.h +configure:62268: result: yes +configure:62268: checking for sys/socket.h +configure:62268: result: yes +configure:62268: checking sys/sockio.h usability +configure:62268: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +conftest.c:414:10: fatal error: sys/sockio.h: No such file or directory + #include + ^~~~~~~~~~~~~~ +compilation terminated. +configure:62268: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_NETINET_TCP_H 1 +| #define HAVE_SYS_UN_H 1 +| #define HAVE_NETDB_H 1 +| #define USE_PMI_PORT 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION 1 +| #define MPIEXEC_ALLOW_PORT 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SETSID 1 +| #define HAVE_ISATTY 1 +| #define HAVE_GETSID 1 +| #define USE_NEW_SESSION 1 +| #define HAVE_UNSETENV 1 +| #define NEEDS_BIN_IN_PATH 1 +| #define HAVE_EXTERN_ENVIRON 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_IOVEC_DEFINITION 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION /**/ +| #define HAVE_PUTENV 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_SELECT 1 +| #define HAVE_SYS_SELECT_H 1 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_TIME 1 +| #define HAVE_SOCKLEN_T 1 +| #define CH3_RANK_BITS 16 +| #define HAVE_ASSERT_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UUID_UUID_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_INET_PTON 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_TIME 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_SCHED_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| #include +configure:62268: result: no +configure:62268: checking sys/sockio.h presence +configure:62268: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +conftest.c:381:10: fatal error: sys/sockio.h: No such file or directory + #include + ^~~~~~~~~~~~~~ +compilation terminated. +configure:62268: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_NETINET_TCP_H 1 +| #define HAVE_SYS_UN_H 1 +| #define HAVE_NETDB_H 1 +| #define USE_PMI_PORT 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION 1 +| #define MPIEXEC_ALLOW_PORT 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SETSID 1 +| #define HAVE_ISATTY 1 +| #define HAVE_GETSID 1 +| #define USE_NEW_SESSION 1 +| #define HAVE_UNSETENV 1 +| #define NEEDS_BIN_IN_PATH 1 +| #define HAVE_EXTERN_ENVIRON 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_IOVEC_DEFINITION 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION /**/ +| #define HAVE_PUTENV 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_SELECT 1 +| #define HAVE_SYS_SELECT_H 1 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_TIME 1 +| #define HAVE_SOCKLEN_T 1 +| #define CH3_RANK_BITS 16 +| #define HAVE_ASSERT_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UUID_UUID_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_INET_PTON 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_TIME 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_SCHED_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| /* end confdefs.h. */ +| #include +configure:62268: result: no +configure:62268: checking for sys/sockio.h +configure:62268: result: no +configure:62268: checking for sys/types.h +configure:62268: result: yes +configure:62268: checking for errno.h +configure:62268: result: yes +configure:62268: checking sys/ipc.h usability +configure:62268: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62268: $? = 0 +configure:62268: result: yes +configure:62268: checking sys/ipc.h presence +configure:62268: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62268: $? = 0 +configure:62268: result: yes +configure:62268: checking for sys/ipc.h +configure:62268: result: yes +configure:62268: checking sys/shm.h usability +configure:62268: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62268: $? = 0 +configure:62268: result: yes +configure:62268: checking sys/shm.h presence +configure:62268: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62268: $? = 0 +configure:62268: result: yes +configure:62268: checking for sys/shm.h +configure:62268: result: yes +configure:62284: checking for netinet/in.h +configure:62311: result: yes +configure:62330: checking for signal.h +configure:62330: result: yes +configure:62342: checking for signal +configure:62342: result: yes +configure:62486: checking for mkstemp +configure:62486: result: yes +configure:62497: checking for rand +configure:62497: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62497: $? = 0 +configure:62497: result: yes +configure:62508: checking for srand +configure:62508: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62508: $? = 0 +configure:62508: result: yes +configure:62546: checking whether struct hostent contains h_addr_list +configure:62571: result: yes +configure:62581: checking whether we can use struct ifconf +configure:62604: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +conftest.c: In function 'main': +conftest.c:405:29: warning: variable 's' set but not used [-Wunused-but-set-variable] + struct ifconf conftest; int s; s = sizeof(conftest); + ^ +configure:62604: $? = 0 +configure:62611: result: yes +configure:62625: checking whether we can use struct ifreq +configure:62648: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +conftest.c: In function 'main': +conftest.c:406:28: warning: variable 's' set but not used [-Wunused-but-set-variable] + struct ifreq conftest; int s; s = sizeof(conftest); + ^ +configure:62648: $? = 0 +configure:62655: result: yes +configure:62802: checking for random.h +configure:62802: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +conftest.c:432:10: fatal error: random.h: No such file or directory + #include + ^~~~~~~~~~ +compilation terminated. +configure:62802: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_NETINET_TCP_H 1 +| #define HAVE_SYS_UN_H 1 +| #define HAVE_NETDB_H 1 +| #define USE_PMI_PORT 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION 1 +| #define MPIEXEC_ALLOW_PORT 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SETSID 1 +| #define HAVE_ISATTY 1 +| #define HAVE_GETSID 1 +| #define USE_NEW_SESSION 1 +| #define HAVE_UNSETENV 1 +| #define NEEDS_BIN_IN_PATH 1 +| #define HAVE_EXTERN_ENVIRON 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_IOVEC_DEFINITION 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION /**/ +| #define HAVE_PUTENV 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_SELECT 1 +| #define HAVE_SYS_SELECT_H 1 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_TIME 1 +| #define HAVE_SOCKLEN_T 1 +| #define CH3_RANK_BITS 16 +| #define HAVE_ASSERT_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UUID_UUID_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_INET_PTON 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_TIME 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_SCHED_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_IPC_H 1 +| #define HAVE_SYS_SHM_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_RAND 1 +| #define HAVE_SRAND 1 +| #define MPID_NEM_INLINE 1 +| #define PREFETCH_CELL 1 +| #define USE_FASTBOX 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_STRUCT_IFCONF 1 +| #define HAVE_STRUCT_IFREQ 1 +| #define MPID_NEM_LOCAL_LMT_IMPL MPID_NEM_LOCAL_LMT_SHM_COPY +| /* end confdefs.h. */ +| #include +| #ifdef HAVE_SYS_TYPES_H +| # include +| #endif +| #ifdef HAVE_SYS_STAT_H +| # include +| #endif +| #ifdef STDC_HEADERS +| # include +| # include +| #else +| # ifdef HAVE_STDLIB_H +| # include +| # endif +| #endif +| #ifdef HAVE_STRING_H +| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H +| # include +| # endif +| # include +| #endif +| #ifdef HAVE_STRINGS_H +| # include +| #endif +| #ifdef HAVE_INTTYPES_H +| # include +| #endif +| #ifdef HAVE_STDINT_H +| # include +| #endif +| #ifdef HAVE_UNISTD_H +| # include +| #endif +| +| #include +configure:62802: result: no +configure:62817: checking for struct random_data +configure:62817: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62817: $? = 0 +configure:62817: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +conftest.c: In function 'main': +conftest.c:407:33: error: expected expression before ')' token + if (sizeof ((struct random_data))) + ^ +configure:62817: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "MPICH" +| #define PACKAGE_TARNAME "mpich" +| #define PACKAGE_VERSION "3.4a2" +| #define PACKAGE_STRING "MPICH 3.4a2" +| #define PACKAGE_BUGREPORT "discuss@mpich.org" +| #define PACKAGE_URL "http://www.mpich.org/" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define __EXTENSIONS__ 1 +| #define _ALL_SOURCE 1 +| #define _GNU_SOURCE 1 +| #define _POSIX_PTHREAD_SEMANTICS 1 +| #define _TANDEM_SOURCE 1 +| #define PACKAGE "mpich" +| #define VERSION "3.4a2" +| #define HAVE_DLFCN_H 1 +| #define LT_OBJDIR ".libs/" +| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +| #define HAVE_TAG_ERROR_BITS 1 +| #define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +| #define HAVE_PRAGMA_WEAK 1 +| #define HAVE_WEAK_ATTRIBUTE 1 +| #define USE_WEAK_SYMBOLS 1 +| #define HAVE_MULTIPLE_PRAGMA_WEAK 1 +| #define HAVE_VISIBILITY 1 +| #define HWLOC_VERSION "2.0.3rc2-git" +| #define HWLOC_VERSION_MAJOR 2 +| #define HWLOC_VERSION_MINOR 0 +| #define HWLOC_VERSION_RELEASE 3 +| #define HWLOC_VERSION_GREEK "rc2" +| #define HWLOC_SYM_PREFIX hwloc_ +| #define HWLOC_SYM_PREFIX_CAPS HWLOC_ +| #define HWLOC_SYM_TRANSFORM 0 +| #define _HPUX_SOURCE 1 +| #define SIZEOF_VOID_P 8 +| #define HWLOC_LINUX_SYS 1 +| #define HWLOC_HAVE_LINUXIO 1 +| #define HWLOC_HAVE_LINUXPCI 1 +| #define HWLOC_X86_64_ARCH 1 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define HWLOC_SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_SIZEOF_UNSIGNED_INT 4 +| #define HWLOC_HAVE_ATTRIBUTE 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +| #define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +| #define HWLOC_HAVE_ATTRIBUTE_COLD 1 +| #define HWLOC_HAVE_ATTRIBUTE_CONST 1 +| #define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +| #define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +| #define HWLOC_HAVE_ATTRIBUTE_HOT 1 +| #define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +| #define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +| #define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +| #define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +| #define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +| #define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +| #define HWLOC_HAVE_ATTRIBUTE_PURE 1 +| #define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +| #define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +| #define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +| #define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +| #define HWLOC_C_HAVE_VISIBILITY 0 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DIRENT_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_STRCASECMP 1 +| #define HWLOC_HAVE_DECL_STRCASECMP 1 +| #define HAVE_STRNCASECMP 1 +| #define HWLOC_HAVE_DECL_STRNCASECMP 1 +| #define HAVE_STRFTIME 1 +| #define HAVE_SETLOCALE 1 +| #define HWLOC_HAVE_STDINT_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_DECL_FABSF 1 +| #define HAVE_DECL_MODFF 1 +| #define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +| #define HAVE_DECL__SC_NPROCESSORS_CONF 1 +| #define HAVE_DECL__SC_NPROC_ONLN 0 +| #define HAVE_DECL__SC_NPROC_CONF 0 +| #define HAVE_DECL__SC_PAGESIZE 1 +| #define HAVE_DECL__SC_PAGE_SIZE 1 +| #define HAVE_DECL__SC_LARGE_PAGESIZE 0 +| #define HAVE_DECL_STRTOULL 1 +| #define HAVE_SSIZE_T 1 +| #define HAVE_DECL_SNPRINTF 1 +| #define HAVE_DECL__STRDUP 0 +| #define HAVE_DECL__PUTENV 0 +| #define HAVE_DECL_GETPROGNAME 0 +| #define HAVE_DECL_GETEXECNAME 0 +| #define HAVE_DECL_GETMODULEFILENAME 0 +| #define HAVE_PROGRAM_INVOCATION_NAME 1 +| #define HAVE___PROGNAME 1 +| #define HAVE_PTHREAD_T 1 +| #define hwloc_pid_t pid_t +| #define hwloc_thread_t pthread_t +| #define HAVE_DECL_SCHED_GETCPU 1 +| #define HWLOC_HAVE_SCHED_SETAFFINITY 1 +| #define HWLOC_HAVE_CPU_SET 1 +| #define HWLOC_HAVE_CPU_SET_S 1 +| #define HWLOC_HAVE_SYSCALL 1 +| #define HAVE_FFS 1 +| #define HWLOC_HAVE_DECL_FFS 1 +| #define HWLOC_HAVE_FFS 1 +| #define HAVE_FFSL 1 +| #define HWLOC_HAVE_DECL_FFSL 1 +| #define HWLOC_HAVE_FFSL 1 +| #define HAVE_OPENAT 1 +| #define HAVE_MALLOC_H 1 +| #define HAVE_GETPAGESIZE 1 +| #define HAVE_MEMALIGN 1 +| #define HAVE_POSIX_MEMALIGN 1 +| #define HAVE_SYS_UTSNAME_H 1 +| #define HAVE_UNAME 1 +| #define HAVE_DECL_RUNNING_ON_VALGRIND 0 +| #define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +| #define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +| #define X_DISPLAY_MISSING 1 +| #define HWLOC_HAVE_LIBXML2 1 +| #define HWLOC_HAVE_X86_CPUID 1 +| #define HWLOC_HAVE_PTHREAD_MUTEX 1 +| #define HAVE_HWLOC 1 +| #define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +| #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +| #define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +| #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +| #define HAVE_ROMIO 1 +| #define HAVE__FUNC__ /**/ +| #define HAVE__FUNCTION__ /**/ +| #define ENABLE_PVAR_NEM 0 +| #define ENABLE_PVAR_RECVQ 0 +| #define ENABLE_PVAR_RMA 0 +| #define ENABLE_PVAR_DIMS 0 +| #define HAVE_LONG_LONG 1 +| #define STDCALL +| #define F77_NAME_LOWER_USCORE 1 +| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +| #define HAVE_FORTRAN_BINDING 1 +| #define HAVE_F08_BINDING 0 +| #define TRUE 1 +| #define FALSE 0 +| #define HAVE_CXX_EXCEPTIONS /**/ +| #define HAVE_NAMESPACES /**/ +| #define HAVE_NAMESPACE_STD /**/ +| #define HAVE_CXX_BINDING 1 +| #define HAVE_NAMEPUB_SERVICE 1 +| #define restrict __restrict +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_BUILTIN_EXPECT 1 +| #define HAVE_C11__STATIC_ASSERT 1 +| #define WORDS_LITTLEENDIAN 1 +| #define HAVE_LONG_DOUBLE 1 +| #define HAVE_LONG_LONG_INT 1 +| #define HAVE_MAX_INTEGER_ALIGNMENT 8 +| #define HAVE_MAX_STRUCT_ALIGNMENT 8 +| #define HAVE_MAX_FP_ALIGNMENT 16 +| #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +| #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +| #define SIZEOF_CHAR 1 +| #define SIZEOF_UNSIGNED_CHAR 1 +| #define SIZEOF_SHORT 2 +| #define SIZEOF_UNSIGNED_SHORT 2 +| #define SIZEOF_INT 4 +| #define SIZEOF_UNSIGNED_INT 4 +| #define SIZEOF_LONG 8 +| #define SIZEOF_UNSIGNED_LONG 8 +| #define SIZEOF_LONG_LONG 8 +| #define SIZEOF_UNSIGNED_LONG_LONG 8 +| #define SIZEOF_FLOAT 4 +| #define SIZEOF_DOUBLE 8 +| #define SIZEOF_LONG_DOUBLE 16 +| #define SIZEOF_VOID_P 8 +| #define STDC_HEADERS 1 +| #define HAVE_STDDEF_H 1 +| #define SIZEOF_WCHAR_T 4 +| #define SIZEOF_FLOAT_INT 8 +| #define SIZEOF_DOUBLE_INT 16 +| #define SIZEOF_LONG_INT 16 +| #define SIZEOF_SHORT_INT 8 +| #define SIZEOF_TWO_INT 8 +| #define SIZEOF_LONG_DOUBLE_INT 32 +| #define HAVE_SYS_BITYPES_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_INT8_T 1 +| #define HAVE_INT16_T 1 +| #define HAVE_INT32_T 1 +| #define HAVE_INT64_T 1 +| #define HAVE_UINT8_T 1 +| #define HAVE_UINT16_T 1 +| #define HAVE_UINT32_T 1 +| #define HAVE_UINT64_T 1 +| #define HAVE_STDBOOL_H 1 +| #define HAVE_COMPLEX_H 1 +| #define SIZEOF__BOOL 1 +| #define SIZEOF_FLOAT__COMPLEX 8 +| #define SIZEOF_DOUBLE__COMPLEX 16 +| #define SIZEOF_LONG_DOUBLE__COMPLEX 32 +| #define SIZEOF__FLOAT16 0 +| #define HAVE__BOOL 1 +| #define HAVE_FLOAT__COMPLEX 1 +| #define HAVE_DOUBLE__COMPLEX 1 +| #define HAVE_LONG_DOUBLE__COMPLEX 1 +| #define MPIR_REAL4_CTYPE float +| #define MPIR_REAL8_CTYPE double +| #define MPIR_REAL16_CTYPE long double +| #define MPIR_INTEGER1_CTYPE char +| #define MPIR_INTEGER2_CTYPE short +| #define MPIR_INTEGER4_CTYPE int +| #define MPIR_INTEGER8_CTYPE long +| #define SIZEOF_F77_INTEGER 4 +| #define SIZEOF_F77_REAL 4 +| #define SIZEOF_F77_DOUBLE_PRECISION 8 +| #define MPIR_FC_REAL_CTYPE float +| #define MPIR_FC_DOUBLE_CTYPE double +| #define HAVE_AINT_LARGER_THAN_FINT 1 +| #define HAVE_AINT_DIFFERENT_THAN_FINT 1 +| #define HAVE_FINT_IS_INT 1 +| #define F77_TRUE_VALUE_SET 1 +| #define F77_TRUE_VALUE 1 +| #define F77_FALSE_VALUE 0 +| #define SIZEOF_BOOL 1 +| #define MPIR_CXX_BOOL_CTYPE _Bool +| #define SIZEOF_COMPLEX 8 +| #define SIZEOF_DOUBLECOMPLEX 16 +| #define SIZEOF_LONGDOUBLECOMPLEX 32 +| #define HAVE_CXX_COMPLEX 1 +| #define MPIR_CXX_BOOL_VALUE 0x4c000133 +| #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +| #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +| #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +| #define HAVE_ANY_INT64_T_ALIGNMENT 1 +| #define HAVE_ANY_INT32_T_ALIGNMENT 1 +| #define STDC_HEADERS 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STDARG_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STDDEF_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ENDIAN_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_SETITIMER 1 +| #define HAVE_ALARM 1 +| #define HAVE_VSNPRINTF 1 +| #define HAVE_VSPRINTF 1 +| #define HAVE_STRERROR 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_DECL_STRERROR_R 1 +| #define HAVE_STRERROR_R 1 +| #define STRERROR_R_CHAR_P 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_QSORT 1 +| #define HAVE_VA_COPY 1 +| #define HAVE_MACRO_VA_ARGS 1 +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_STRDUP 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_PUTENV 1 +| #define MPIR_AINT_MAX LONG_MAX +| #define SIZEOF_MPII_BSEND_DATA_T 88 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SNPRINTF 1 +| #define HAVE_STRNCASECMP 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_PARAM_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_NETINET_TCP_H 1 +| #define HAVE_SYS_UN_H 1 +| #define HAVE_NETDB_H 1 +| #define USE_PMI_PORT 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_GCC_ATTRIBUTE 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION 1 +| #define MPIEXEC_ALLOW_PORT 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SETSID 1 +| #define HAVE_ISATTY 1 +| #define HAVE_GETSID 1 +| #define USE_NEW_SESSION 1 +| #define HAVE_UNSETENV 1 +| #define NEEDS_BIN_IN_PATH 1 +| #define HAVE_EXTERN_ENVIRON 1 +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SYS_PTRACE_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_IOVEC_DEFINITION 1 +| #define HAVE_STRSIGNAL 1 +| #define HAVE_SIGACTION 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_SIGSET 1 +| #define USE_SIGACTION /**/ +| #define HAVE_PUTENV 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_SELECT 1 +| #define HAVE_SYS_SELECT_H 1 +| #define HAVE_SCHED_SETAFFINITY 1 +| #define HAVE_SCHED_GETAFFINITY 1 +| #define HAVE_CPU_SET_T 1 +| #define HAVE_CPU_SET_MACROS 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TIME_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_WAIT_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_TIME 1 +| #define HAVE_SOCKLEN_T 1 +| #define CH3_RANK_BITS 16 +| #define HAVE_ASSERT_H 1 +| #define HAVE_LIMITS_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_UIO_H 1 +| #define HAVE_UUID_UUID_H 1 +| #define HAVE_TIME_H 1 +| #define HAVE_CTYPE_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_ARPA_INET_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_INET_PTON 1 +| #define HAVE_GETHOSTNAME 1 +| #define HAVE_TIME 1 +| #define HAVE_NET_IF_H 1 +| #define HAVE_ASSERT_H 1 +| #define HAVE_NETDB_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_SCHED_H 1 +| #define HAVE_SYS_MMAN_H 1 +| #define HAVE_SYS_IOCTL_H 1 +| #define HAVE_SYS_SOCKET_H 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_ERRNO_H 1 +| #define HAVE_SYS_IPC_H 1 +| #define HAVE_SYS_SHM_H 1 +| #define HAVE_NETINET_IN_H 1 +| #define HAVE_SIGNAL_H 1 +| #define HAVE_SIGNAL 1 +| #define HAVE_MKSTEMP 1 +| #define HAVE_RAND 1 +| #define HAVE_SRAND 1 +| #define MPID_NEM_INLINE 1 +| #define PREFETCH_CELL 1 +| #define USE_FASTBOX 1 +| #define HAVE_H_ADDR_LIST 1 +| #define HAVE_STRUCT_IFCONF 1 +| #define HAVE_STRUCT_IFREQ 1 +| #define MPID_NEM_LOCAL_LMT_IMPL MPID_NEM_LOCAL_LMT_SHM_COPY +| /* end confdefs.h. */ +| #include +| #if HAVE_RANDOM_H +| # include +| #endif +| +| +| int +| main () +| { +| if (sizeof ((struct random_data))) +| return 0; +| ; +| return 0; +| } +configure:62817: result: yes +configure:62842: checking for random_r +configure:62842: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:62842: $? = 0 +configure:62842: result: yes +configure:62861: Using a symmetric heap +configure:64180: ===== configuring src/mpi/romio ===== +configure:64345: running /bin/sh ./configure --disable-option-checking '--prefix=/home/brian/mpich-install' '--enable-sharedlibs=gcc' '--enable-shared' '--enable-static=no' '--enable-lib-depend' '--disable-rpath' '--disable-silent-rules' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--with-hwloc-prefix=embedded' '--enable-fortran=all' '--enable-romio' '--with-file-system=ufs+daos' '--with-daos=/usr' '--with-cart=/usr' '--disable-checkerrors' '--disable-perftest' '--disable-large-tests' '--disable-ft-tests' '--disable-comm-overlap-tests' '--enable-threads=single' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' 'CXXFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' 'FCFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' 'FFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' 'LDFLAGS=-Wl,-z,noexecstack' 'MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --cache-file=/dev/null --srcdir=. +configure:64365: ===== done with src/mpi/romio configure ===== +configure:64371: sourcing src/mpi/romio/localdefs +configure:64180: ===== configuring src/pm/hydra ===== +configure:64345: running /bin/sh ./configure --disable-option-checking '--prefix=/home/brian/mpich-install' '--enable-sharedlibs=gcc' '--enable-shared' '--enable-static=no' '--enable-lib-depend' '--disable-rpath' '--disable-silent-rules' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--with-hwloc-prefix=embedded' '--enable-fortran=all' '--enable-romio' '--with-file-system=ufs+daos' '--with-daos=/usr' '--with-cart=/usr' '--disable-checkerrors' '--disable-perftest' '--disable-large-tests' '--disable-ft-tests' '--disable-comm-overlap-tests' '--enable-threads=single' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' 'CXXFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' 'FCFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' 'FFLAGS=-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' 'LDFLAGS=-Wl,-z,noexecstack' 'MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --cache-file=/dev/null --srcdir=. +configure:64365: ===== done with src/pm/hydra configure ===== +configure:64428: checking the sizeof MPI_Offset +configure:64435: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:64435: $? = 0 +configure:64435: ./conftest +configure:64435: $? = 0 +configure:64446: result: 8 +configure:64514: checking whether the Fortran Offset type works with Fortran 77 +configure:64523: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f >&5 +conftest.f:3:17: + + integer*8 i + 1 +Warning: Unused variable 'i' declared at (1) [-Wunused-variable] +configure:64523: $? = 0 +configure:64529: result: yes +configure:64543: checking whether the Fortran Offset type works with Fortran 90 +configure:64552: gfortran -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 conftest.f90 >&5 +conftest.f90:3:17: + + integer*8 i + 1 +Warning: Unused variable 'i' declared at (1) [-Wunused-variable] +configure:64552: $? = 0 +configure:64564: result: yes +configure:64662: checking for size of MPI_Status +configure:64681: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:64681: $? = 0 +configure:64681: ./conftest +configure:64681: $? = 0 +configure:64690: result: 20 +configure:64722: checking for BSD/POSIX style global symbol lister +configure:64764: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:64764: $? = 0 +configure:64808: result: BSD style,/usr/bin/nm -g -B +configure:64848: checking stdio.h usability +configure:64848: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:64848: $? = 0 +configure:64848: result: yes +configure:64848: checking stdio.h presence +configure:64848: gcc -E -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:64848: $? = 0 +configure:64848: result: yes +configure:64848: checking for stdio.h +configure:64848: result: yes +configure:64858: checking for multiple __attribute__((alias)) support +configure:64919: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:64919: $? = 0 +configure:64923: cp conftest.o pac_conftest_other.o +configure:64926: $? = 0 +configure:64989: gcc -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include -Wl,-z,noexecstack conftest.c pac_conftest_other.o >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:64989: $? = 0 +configure:64993: cp conftest pac_conftest_main +configure:64996: $? = 0 +configure:65056: ./pac_conftest_main +configure:65059: $? = 0 +configure:65066: result: yes +configure:65094: checking the minimum alignment of Fortran common block of 1 integers +configure:65133: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65133: $? = 0 +configure:65137: mv conftest.o pac_conftest.o +configure:65140: $? = 0 +configure:65164: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align0.log 2>&1 +configure:65164: $? = 0 +configure:65246: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65246: $? = 0 +configure:65250: mv conftest.o pac_conftest.o +configure:65253: $? = 0 +configure:65278: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align1.log 2>&1 +configure:65278: $? = 0 +configure:65285: diff -b pac_align0.log pac_align1.log > pac_test.log +configure:65288: $? = 1 +configure: program exited with status 1 +*** diff -b pac_align0.log pac_align1.log : +0a1 +> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: alignment 4 of symbol `mpifcmb_' in pac_conftest.o is smaller than 16 in /tmp/ccJE7FUY.o +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: alignment 4 of symbol `mpifcmb_' in pac_conftest.o is smaller than 16 in /tmp/ccJE7FUY.o +failed C program was: +/* confdefs.h */ +#define PACKAGE_NAME "MPICH" +#define PACKAGE_TARNAME "mpich" +#define PACKAGE_VERSION "3.4a2" +#define PACKAGE_STRING "MPICH 3.4a2" +#define PACKAGE_BUGREPORT "discuss@mpich.org" +#define PACKAGE_URL "http://www.mpich.org/" +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define __EXTENSIONS__ 1 +#define _ALL_SOURCE 1 +#define _GNU_SOURCE 1 +#define _POSIX_PTHREAD_SEMANTICS 1 +#define _TANDEM_SOURCE 1 +#define PACKAGE "mpich" +#define VERSION "3.4a2" +#define HAVE_DLFCN_H 1 +#define LT_OBJDIR ".libs/" +#define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +#define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +#define HAVE_TAG_ERROR_BITS 1 +#define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +#define HAVE_PRAGMA_WEAK 1 +#define HAVE_WEAK_ATTRIBUTE 1 +#define USE_WEAK_SYMBOLS 1 +#define HAVE_MULTIPLE_PRAGMA_WEAK 1 +#define HAVE_VISIBILITY 1 +#define HWLOC_VERSION "2.0.3rc2-git" +#define HWLOC_VERSION_MAJOR 2 +#define HWLOC_VERSION_MINOR 0 +#define HWLOC_VERSION_RELEASE 3 +#define HWLOC_VERSION_GREEK "rc2" +#define HWLOC_SYM_PREFIX hwloc_ +#define HWLOC_SYM_PREFIX_CAPS HWLOC_ +#define HWLOC_SYM_TRANSFORM 0 +#define _HPUX_SOURCE 1 +#define SIZEOF_VOID_P 8 +#define HWLOC_LINUX_SYS 1 +#define HWLOC_HAVE_LINUXIO 1 +#define HWLOC_HAVE_LINUXPCI 1 +#define HWLOC_X86_64_ARCH 1 +#define SIZEOF_UNSIGNED_LONG 8 +#define HWLOC_SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_UNSIGNED_INT 4 +#define HWLOC_SIZEOF_UNSIGNED_INT 4 +#define HWLOC_HAVE_ATTRIBUTE 1 +#define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +#define HWLOC_HAVE_ATTRIBUTE_COLD 1 +#define HWLOC_HAVE_ATTRIBUTE_CONST 1 +#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +#define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +#define HWLOC_HAVE_ATTRIBUTE_HOT 1 +#define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +#define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +#define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +#define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +#define HWLOC_HAVE_ATTRIBUTE_PURE 1 +#define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +#define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +#define HWLOC_C_HAVE_VISIBILITY 0 +#define HAVE_UNISTD_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_STRCASECMP 1 +#define HWLOC_HAVE_DECL_STRCASECMP 1 +#define HAVE_STRNCASECMP 1 +#define HWLOC_HAVE_DECL_STRNCASECMP 1 +#define HAVE_STRFTIME 1 +#define HAVE_SETLOCALE 1 +#define HWLOC_HAVE_STDINT_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_DECL_FABSF 1 +#define HAVE_DECL_MODFF 1 +#define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +#define HAVE_DECL__SC_NPROCESSORS_CONF 1 +#define HAVE_DECL__SC_NPROC_ONLN 0 +#define HAVE_DECL__SC_NPROC_CONF 0 +#define HAVE_DECL__SC_PAGESIZE 1 +#define HAVE_DECL__SC_PAGE_SIZE 1 +#define HAVE_DECL__SC_LARGE_PAGESIZE 0 +#define HAVE_DECL_STRTOULL 1 +#define HAVE_SSIZE_T 1 +#define HAVE_DECL_SNPRINTF 1 +#define HAVE_DECL__STRDUP 0 +#define HAVE_DECL__PUTENV 0 +#define HAVE_DECL_GETPROGNAME 0 +#define HAVE_DECL_GETEXECNAME 0 +#define HAVE_DECL_GETMODULEFILENAME 0 +#define HAVE_PROGRAM_INVOCATION_NAME 1 +#define HAVE___PROGNAME 1 +#define HAVE_PTHREAD_T 1 +#define hwloc_pid_t pid_t +#define hwloc_thread_t pthread_t +#define HAVE_DECL_SCHED_GETCPU 1 +#define HWLOC_HAVE_SCHED_SETAFFINITY 1 +#define HWLOC_HAVE_CPU_SET 1 +#define HWLOC_HAVE_CPU_SET_S 1 +#define HWLOC_HAVE_SYSCALL 1 +#define HAVE_FFS 1 +#define HWLOC_HAVE_DECL_FFS 1 +#define HWLOC_HAVE_FFS 1 +#define HAVE_FFSL 1 +#define HWLOC_HAVE_DECL_FFSL 1 +#define HWLOC_HAVE_FFSL 1 +#define HAVE_OPENAT 1 +#define HAVE_MALLOC_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_MEMALIGN 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_SYS_UTSNAME_H 1 +#define HAVE_UNAME 1 +#define HAVE_DECL_RUNNING_ON_VALGRIND 0 +#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +#define X_DISPLAY_MISSING 1 +#define HWLOC_HAVE_LIBXML2 1 +#define HWLOC_HAVE_X86_CPUID 1 +#define HWLOC_HAVE_PTHREAD_MUTEX 1 +#define HAVE_HWLOC 1 +#define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +#define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +#define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +#define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +#define HAVE_ROMIO 1 +#define HAVE__FUNC__ /**/ +#define HAVE__FUNCTION__ /**/ +#define ENABLE_PVAR_NEM 0 +#define ENABLE_PVAR_RECVQ 0 +#define ENABLE_PVAR_RMA 0 +#define ENABLE_PVAR_DIMS 0 +#define HAVE_LONG_LONG 1 +#define STDCALL +#define F77_NAME_LOWER_USCORE 1 +#define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +#define HAVE_FORTRAN_BINDING 1 +#define HAVE_F08_BINDING 0 +#define TRUE 1 +#define FALSE 0 +#define HAVE_CXX_EXCEPTIONS /**/ +#define HAVE_NAMESPACES /**/ +#define HAVE_NAMESPACE_STD /**/ +#define HAVE_CXX_BINDING 1 +#define HAVE_NAMEPUB_SERVICE 1 +#define restrict __restrict +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_BUILTIN_EXPECT 1 +#define HAVE_C11__STATIC_ASSERT 1 +#define WORDS_LITTLEENDIAN 1 +#define HAVE_LONG_DOUBLE 1 +#define HAVE_LONG_LONG_INT 1 +#define HAVE_MAX_INTEGER_ALIGNMENT 8 +#define HAVE_MAX_STRUCT_ALIGNMENT 8 +#define HAVE_MAX_FP_ALIGNMENT 16 +#define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +#define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +#define SIZEOF_CHAR 1 +#define SIZEOF_UNSIGNED_CHAR 1 +#define SIZEOF_SHORT 2 +#define SIZEOF_UNSIGNED_SHORT 2 +#define SIZEOF_INT 4 +#define SIZEOF_UNSIGNED_INT 4 +#define SIZEOF_LONG 8 +#define SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_UNSIGNED_LONG_LONG 8 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_LONG_DOUBLE 16 +#define SIZEOF_VOID_P 8 +#define STDC_HEADERS 1 +#define HAVE_STDDEF_H 1 +#define SIZEOF_WCHAR_T 4 +#define SIZEOF_FLOAT_INT 8 +#define SIZEOF_DOUBLE_INT 16 +#define SIZEOF_LONG_INT 16 +#define SIZEOF_SHORT_INT 8 +#define SIZEOF_TWO_INT 8 +#define SIZEOF_LONG_DOUBLE_INT 32 +#define HAVE_SYS_BITYPES_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_INT8_T 1 +#define HAVE_INT16_T 1 +#define HAVE_INT32_T 1 +#define HAVE_INT64_T 1 +#define HAVE_UINT8_T 1 +#define HAVE_UINT16_T 1 +#define HAVE_UINT32_T 1 +#define HAVE_UINT64_T 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_COMPLEX_H 1 +#define SIZEOF__BOOL 1 +#define SIZEOF_FLOAT__COMPLEX 8 +#define SIZEOF_DOUBLE__COMPLEX 16 +#define SIZEOF_LONG_DOUBLE__COMPLEX 32 +#define SIZEOF__FLOAT16 0 +#define HAVE__BOOL 1 +#define HAVE_FLOAT__COMPLEX 1 +#define HAVE_DOUBLE__COMPLEX 1 +#define HAVE_LONG_DOUBLE__COMPLEX 1 +#define MPIR_REAL4_CTYPE float +#define MPIR_REAL8_CTYPE double +#define MPIR_REAL16_CTYPE long double +#define MPIR_INTEGER1_CTYPE char +#define MPIR_INTEGER2_CTYPE short +#define MPIR_INTEGER4_CTYPE int +#define MPIR_INTEGER8_CTYPE long +#define SIZEOF_F77_INTEGER 4 +#define SIZEOF_F77_REAL 4 +#define SIZEOF_F77_DOUBLE_PRECISION 8 +#define MPIR_FC_REAL_CTYPE float +#define MPIR_FC_DOUBLE_CTYPE double +#define HAVE_AINT_LARGER_THAN_FINT 1 +#define HAVE_AINT_DIFFERENT_THAN_FINT 1 +#define HAVE_FINT_IS_INT 1 +#define F77_TRUE_VALUE_SET 1 +#define F77_TRUE_VALUE 1 +#define F77_FALSE_VALUE 0 +#define SIZEOF_BOOL 1 +#define MPIR_CXX_BOOL_CTYPE _Bool +#define SIZEOF_COMPLEX 8 +#define SIZEOF_DOUBLECOMPLEX 16 +#define SIZEOF_LONGDOUBLECOMPLEX 32 +#define HAVE_CXX_COMPLEX 1 +#define MPIR_CXX_BOOL_VALUE 0x4c000133 +#define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +#define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +#define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +#define HAVE_ANY_INT64_T_ALIGNMENT 1 +#define HAVE_ANY_INT32_T_ALIGNMENT 1 +#define STDC_HEADERS 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_STRING_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ENDIAN_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_SETITIMER 1 +#define HAVE_ALARM 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_VSPRINTF 1 +#define HAVE_STRERROR 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_DECL_STRERROR_R 1 +#define HAVE_STRERROR_R 1 +#define STRERROR_R_CHAR_P 1 +#define HAVE_SNPRINTF 1 +#define HAVE_QSORT 1 +#define HAVE_VA_COPY 1 +#define HAVE_MACRO_VA_ARGS 1 +#define HAVE_ALLOCA_H 1 +#define HAVE_ALLOCA 1 +#define HAVE_STRDUP 1 +#define HAVE_MKSTEMP 1 +#define HAVE_PUTENV 1 +#define MPIR_AINT_MAX LONG_MAX +#define SIZEOF_MPII_BSEND_DATA_T 88 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SNPRINTF 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_NETDB_H 1 +#define USE_PMI_PORT 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION 1 +#define MPIEXEC_ALLOW_PORT 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SETSID 1 +#define HAVE_ISATTY 1 +#define HAVE_GETSID 1 +#define USE_NEW_SESSION 1 +#define HAVE_UNSETENV 1 +#define NEEDS_BIN_IN_PATH 1 +#define HAVE_EXTERN_ENVIRON 1 +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_IOVEC_DEFINITION 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION /**/ +#define HAVE_PUTENV 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_SELECT 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_TIME_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_TIME 1 +#define HAVE_SOCKLEN_T 1 +#define CH3_RANK_BITS 16 +#define HAVE_ASSERT_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_TIME_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_INET_PTON 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_TIME 1 +#define HAVE_NET_IF_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_NETDB_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_SCHED_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_IPC_H 1 +#define HAVE_SYS_SHM_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SIGNAL 1 +#define HAVE_MKSTEMP 1 +#define HAVE_RAND 1 +#define HAVE_SRAND 1 +#define MPID_NEM_INLINE 1 +#define PREFETCH_CELL 1 +#define USE_FASTBOX 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_STRUCT_IFCONF 1 +#define HAVE_STRUCT_IFREQ 1 +#define MPID_NEM_LOCAL_LMT_IMPL MPID_NEM_LOCAL_LMT_SHM_COPY +#define HAVE_STRUCT_RANDOM_DATA 1 +#define HAVE_RANDOM_R 1 +#define USE_SYM_HEAP 1 +#define MPIR_OFFSET_MAX LLONG_MAX +#define MPIR_COUNT_MAX LLONG_MAX +#define MPIR_Ucount unsigned long long +#define MPIF_STATUS_SIZE 5 +#define HAVE_STDIO_H 1 +/* end confdefs.h. */ + + + +struct mpif_cmblk_t_ { int imembers[1]; }; + +typedef struct mpif_cmblk_t_ mpif_cmblk_t; +mpif_cmblk_t mpifcmbr __attribute__((aligned(4))) = {0}; + +extern mpif_cmblk_t _CMPIFCMB __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t MPIFCMB __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t MPIFCMB_ __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t _Cmpifcmb __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t mpifcmb __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t mpifcmb_ __attribute__ ((alias("mpifcmbr"))); + + +failed Fortran program was: + + + program fconftest + integer isize + parameter (isize=1) + integer status_array(isize) + common /mpifcmb/ status_array + save /mpifcmb/ + end + + +configure:65246: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65246: $? = 0 +configure:65250: mv conftest.o pac_conftest.o +configure:65253: $? = 0 +configure:65278: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align1.log 2>&1 +configure:65278: $? = 0 +configure:65285: diff -b pac_align0.log pac_align1.log > pac_test.log +configure:65288: $? = 1 +configure: program exited with status 1 +*** diff -b pac_align0.log pac_align1.log : +0a1 +> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: alignment 8 of symbol `mpifcmb_' in pac_conftest.o is smaller than 16 in /tmp/cctxGa73.o +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: alignment 8 of symbol `mpifcmb_' in pac_conftest.o is smaller than 16 in /tmp/cctxGa73.o +failed C program was: +/* confdefs.h */ +#define PACKAGE_NAME "MPICH" +#define PACKAGE_TARNAME "mpich" +#define PACKAGE_VERSION "3.4a2" +#define PACKAGE_STRING "MPICH 3.4a2" +#define PACKAGE_BUGREPORT "discuss@mpich.org" +#define PACKAGE_URL "http://www.mpich.org/" +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define __EXTENSIONS__ 1 +#define _ALL_SOURCE 1 +#define _GNU_SOURCE 1 +#define _POSIX_PTHREAD_SEMANTICS 1 +#define _TANDEM_SOURCE 1 +#define PACKAGE "mpich" +#define VERSION "3.4a2" +#define HAVE_DLFCN_H 1 +#define LT_OBJDIR ".libs/" +#define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +#define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +#define HAVE_TAG_ERROR_BITS 1 +#define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +#define HAVE_PRAGMA_WEAK 1 +#define HAVE_WEAK_ATTRIBUTE 1 +#define USE_WEAK_SYMBOLS 1 +#define HAVE_MULTIPLE_PRAGMA_WEAK 1 +#define HAVE_VISIBILITY 1 +#define HWLOC_VERSION "2.0.3rc2-git" +#define HWLOC_VERSION_MAJOR 2 +#define HWLOC_VERSION_MINOR 0 +#define HWLOC_VERSION_RELEASE 3 +#define HWLOC_VERSION_GREEK "rc2" +#define HWLOC_SYM_PREFIX hwloc_ +#define HWLOC_SYM_PREFIX_CAPS HWLOC_ +#define HWLOC_SYM_TRANSFORM 0 +#define _HPUX_SOURCE 1 +#define SIZEOF_VOID_P 8 +#define HWLOC_LINUX_SYS 1 +#define HWLOC_HAVE_LINUXIO 1 +#define HWLOC_HAVE_LINUXPCI 1 +#define HWLOC_X86_64_ARCH 1 +#define SIZEOF_UNSIGNED_LONG 8 +#define HWLOC_SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_UNSIGNED_INT 4 +#define HWLOC_SIZEOF_UNSIGNED_INT 4 +#define HWLOC_HAVE_ATTRIBUTE 1 +#define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +#define HWLOC_HAVE_ATTRIBUTE_COLD 1 +#define HWLOC_HAVE_ATTRIBUTE_CONST 1 +#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +#define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +#define HWLOC_HAVE_ATTRIBUTE_HOT 1 +#define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +#define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +#define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +#define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +#define HWLOC_HAVE_ATTRIBUTE_PURE 1 +#define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +#define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +#define HWLOC_C_HAVE_VISIBILITY 0 +#define HAVE_UNISTD_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_STRCASECMP 1 +#define HWLOC_HAVE_DECL_STRCASECMP 1 +#define HAVE_STRNCASECMP 1 +#define HWLOC_HAVE_DECL_STRNCASECMP 1 +#define HAVE_STRFTIME 1 +#define HAVE_SETLOCALE 1 +#define HWLOC_HAVE_STDINT_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_DECL_FABSF 1 +#define HAVE_DECL_MODFF 1 +#define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +#define HAVE_DECL__SC_NPROCESSORS_CONF 1 +#define HAVE_DECL__SC_NPROC_ONLN 0 +#define HAVE_DECL__SC_NPROC_CONF 0 +#define HAVE_DECL__SC_PAGESIZE 1 +#define HAVE_DECL__SC_PAGE_SIZE 1 +#define HAVE_DECL__SC_LARGE_PAGESIZE 0 +#define HAVE_DECL_STRTOULL 1 +#define HAVE_SSIZE_T 1 +#define HAVE_DECL_SNPRINTF 1 +#define HAVE_DECL__STRDUP 0 +#define HAVE_DECL__PUTENV 0 +#define HAVE_DECL_GETPROGNAME 0 +#define HAVE_DECL_GETEXECNAME 0 +#define HAVE_DECL_GETMODULEFILENAME 0 +#define HAVE_PROGRAM_INVOCATION_NAME 1 +#define HAVE___PROGNAME 1 +#define HAVE_PTHREAD_T 1 +#define hwloc_pid_t pid_t +#define hwloc_thread_t pthread_t +#define HAVE_DECL_SCHED_GETCPU 1 +#define HWLOC_HAVE_SCHED_SETAFFINITY 1 +#define HWLOC_HAVE_CPU_SET 1 +#define HWLOC_HAVE_CPU_SET_S 1 +#define HWLOC_HAVE_SYSCALL 1 +#define HAVE_FFS 1 +#define HWLOC_HAVE_DECL_FFS 1 +#define HWLOC_HAVE_FFS 1 +#define HAVE_FFSL 1 +#define HWLOC_HAVE_DECL_FFSL 1 +#define HWLOC_HAVE_FFSL 1 +#define HAVE_OPENAT 1 +#define HAVE_MALLOC_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_MEMALIGN 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_SYS_UTSNAME_H 1 +#define HAVE_UNAME 1 +#define HAVE_DECL_RUNNING_ON_VALGRIND 0 +#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +#define X_DISPLAY_MISSING 1 +#define HWLOC_HAVE_LIBXML2 1 +#define HWLOC_HAVE_X86_CPUID 1 +#define HWLOC_HAVE_PTHREAD_MUTEX 1 +#define HAVE_HWLOC 1 +#define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +#define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +#define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +#define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +#define HAVE_ROMIO 1 +#define HAVE__FUNC__ /**/ +#define HAVE__FUNCTION__ /**/ +#define ENABLE_PVAR_NEM 0 +#define ENABLE_PVAR_RECVQ 0 +#define ENABLE_PVAR_RMA 0 +#define ENABLE_PVAR_DIMS 0 +#define HAVE_LONG_LONG 1 +#define STDCALL +#define F77_NAME_LOWER_USCORE 1 +#define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +#define HAVE_FORTRAN_BINDING 1 +#define HAVE_F08_BINDING 0 +#define TRUE 1 +#define FALSE 0 +#define HAVE_CXX_EXCEPTIONS /**/ +#define HAVE_NAMESPACES /**/ +#define HAVE_NAMESPACE_STD /**/ +#define HAVE_CXX_BINDING 1 +#define HAVE_NAMEPUB_SERVICE 1 +#define restrict __restrict +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_BUILTIN_EXPECT 1 +#define HAVE_C11__STATIC_ASSERT 1 +#define WORDS_LITTLEENDIAN 1 +#define HAVE_LONG_DOUBLE 1 +#define HAVE_LONG_LONG_INT 1 +#define HAVE_MAX_INTEGER_ALIGNMENT 8 +#define HAVE_MAX_STRUCT_ALIGNMENT 8 +#define HAVE_MAX_FP_ALIGNMENT 16 +#define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +#define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +#define SIZEOF_CHAR 1 +#define SIZEOF_UNSIGNED_CHAR 1 +#define SIZEOF_SHORT 2 +#define SIZEOF_UNSIGNED_SHORT 2 +#define SIZEOF_INT 4 +#define SIZEOF_UNSIGNED_INT 4 +#define SIZEOF_LONG 8 +#define SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_UNSIGNED_LONG_LONG 8 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_LONG_DOUBLE 16 +#define SIZEOF_VOID_P 8 +#define STDC_HEADERS 1 +#define HAVE_STDDEF_H 1 +#define SIZEOF_WCHAR_T 4 +#define SIZEOF_FLOAT_INT 8 +#define SIZEOF_DOUBLE_INT 16 +#define SIZEOF_LONG_INT 16 +#define SIZEOF_SHORT_INT 8 +#define SIZEOF_TWO_INT 8 +#define SIZEOF_LONG_DOUBLE_INT 32 +#define HAVE_SYS_BITYPES_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_INT8_T 1 +#define HAVE_INT16_T 1 +#define HAVE_INT32_T 1 +#define HAVE_INT64_T 1 +#define HAVE_UINT8_T 1 +#define HAVE_UINT16_T 1 +#define HAVE_UINT32_T 1 +#define HAVE_UINT64_T 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_COMPLEX_H 1 +#define SIZEOF__BOOL 1 +#define SIZEOF_FLOAT__COMPLEX 8 +#define SIZEOF_DOUBLE__COMPLEX 16 +#define SIZEOF_LONG_DOUBLE__COMPLEX 32 +#define SIZEOF__FLOAT16 0 +#define HAVE__BOOL 1 +#define HAVE_FLOAT__COMPLEX 1 +#define HAVE_DOUBLE__COMPLEX 1 +#define HAVE_LONG_DOUBLE__COMPLEX 1 +#define MPIR_REAL4_CTYPE float +#define MPIR_REAL8_CTYPE double +#define MPIR_REAL16_CTYPE long double +#define MPIR_INTEGER1_CTYPE char +#define MPIR_INTEGER2_CTYPE short +#define MPIR_INTEGER4_CTYPE int +#define MPIR_INTEGER8_CTYPE long +#define SIZEOF_F77_INTEGER 4 +#define SIZEOF_F77_REAL 4 +#define SIZEOF_F77_DOUBLE_PRECISION 8 +#define MPIR_FC_REAL_CTYPE float +#define MPIR_FC_DOUBLE_CTYPE double +#define HAVE_AINT_LARGER_THAN_FINT 1 +#define HAVE_AINT_DIFFERENT_THAN_FINT 1 +#define HAVE_FINT_IS_INT 1 +#define F77_TRUE_VALUE_SET 1 +#define F77_TRUE_VALUE 1 +#define F77_FALSE_VALUE 0 +#define SIZEOF_BOOL 1 +#define MPIR_CXX_BOOL_CTYPE _Bool +#define SIZEOF_COMPLEX 8 +#define SIZEOF_DOUBLECOMPLEX 16 +#define SIZEOF_LONGDOUBLECOMPLEX 32 +#define HAVE_CXX_COMPLEX 1 +#define MPIR_CXX_BOOL_VALUE 0x4c000133 +#define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +#define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +#define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +#define HAVE_ANY_INT64_T_ALIGNMENT 1 +#define HAVE_ANY_INT32_T_ALIGNMENT 1 +#define STDC_HEADERS 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_STRING_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ENDIAN_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_SETITIMER 1 +#define HAVE_ALARM 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_VSPRINTF 1 +#define HAVE_STRERROR 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_DECL_STRERROR_R 1 +#define HAVE_STRERROR_R 1 +#define STRERROR_R_CHAR_P 1 +#define HAVE_SNPRINTF 1 +#define HAVE_QSORT 1 +#define HAVE_VA_COPY 1 +#define HAVE_MACRO_VA_ARGS 1 +#define HAVE_ALLOCA_H 1 +#define HAVE_ALLOCA 1 +#define HAVE_STRDUP 1 +#define HAVE_MKSTEMP 1 +#define HAVE_PUTENV 1 +#define MPIR_AINT_MAX LONG_MAX +#define SIZEOF_MPII_BSEND_DATA_T 88 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SNPRINTF 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_NETDB_H 1 +#define USE_PMI_PORT 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION 1 +#define MPIEXEC_ALLOW_PORT 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SETSID 1 +#define HAVE_ISATTY 1 +#define HAVE_GETSID 1 +#define USE_NEW_SESSION 1 +#define HAVE_UNSETENV 1 +#define NEEDS_BIN_IN_PATH 1 +#define HAVE_EXTERN_ENVIRON 1 +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_IOVEC_DEFINITION 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION /**/ +#define HAVE_PUTENV 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_SELECT 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_TIME_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_TIME 1 +#define HAVE_SOCKLEN_T 1 +#define CH3_RANK_BITS 16 +#define HAVE_ASSERT_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_TIME_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_INET_PTON 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_TIME 1 +#define HAVE_NET_IF_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_NETDB_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_SCHED_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_IPC_H 1 +#define HAVE_SYS_SHM_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SIGNAL 1 +#define HAVE_MKSTEMP 1 +#define HAVE_RAND 1 +#define HAVE_SRAND 1 +#define MPID_NEM_INLINE 1 +#define PREFETCH_CELL 1 +#define USE_FASTBOX 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_STRUCT_IFCONF 1 +#define HAVE_STRUCT_IFREQ 1 +#define MPID_NEM_LOCAL_LMT_IMPL MPID_NEM_LOCAL_LMT_SHM_COPY +#define HAVE_STRUCT_RANDOM_DATA 1 +#define HAVE_RANDOM_R 1 +#define USE_SYM_HEAP 1 +#define MPIR_OFFSET_MAX LLONG_MAX +#define MPIR_COUNT_MAX LLONG_MAX +#define MPIR_Ucount unsigned long long +#define MPIF_STATUS_SIZE 5 +#define HAVE_STDIO_H 1 +/* end confdefs.h. */ + + + +struct mpif_cmblk_t_ { int imembers[1]; }; + +typedef struct mpif_cmblk_t_ mpif_cmblk_t; +mpif_cmblk_t mpifcmbr __attribute__((aligned(8))) = {0}; + +extern mpif_cmblk_t _CMPIFCMB __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t MPIFCMB __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t MPIFCMB_ __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t _Cmpifcmb __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t mpifcmb __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t mpifcmb_ __attribute__ ((alias("mpifcmbr"))); + + +failed Fortran program was: + + + program fconftest + integer isize + parameter (isize=1) + integer status_array(isize) + common /mpifcmb/ status_array + save /mpifcmb/ + end + + +configure:65246: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65246: $? = 0 +configure:65250: mv conftest.o pac_conftest.o +configure:65253: $? = 0 +configure:65278: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align1.log 2>&1 +configure:65278: $? = 0 +configure:65285: diff -b pac_align0.log pac_align1.log > pac_test.log +configure:65288: $? = 0 +configure:65377: result: 16 +configure:65388: checking the minimum alignment of Fortran common block of 5 integers +configure:65427: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65427: $? = 0 +configure:65431: mv conftest.o pac_conftest.o +configure:65434: $? = 0 +configure:65458: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align0.log 2>&1 +configure:65458: $? = 0 +configure:65540: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65540: $? = 0 +configure:65544: mv conftest.o pac_conftest.o +configure:65547: $? = 0 +configure:65572: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align1.log 2>&1 +configure:65572: $? = 0 +configure:65579: diff -b pac_align0.log pac_align1.log > pac_test.log +configure:65582: $? = 1 +configure: program exited with status 1 +*** diff -b pac_align0.log pac_align1.log : +0a1 +> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: alignment 4 of symbol `mpifcmb_' in pac_conftest.o is smaller than 16 in /tmp/ccZrCKAk.o +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: alignment 4 of symbol `mpifcmb_' in pac_conftest.o is smaller than 16 in /tmp/ccZrCKAk.o +failed C program was: +/* confdefs.h */ +#define PACKAGE_NAME "MPICH" +#define PACKAGE_TARNAME "mpich" +#define PACKAGE_VERSION "3.4a2" +#define PACKAGE_STRING "MPICH 3.4a2" +#define PACKAGE_BUGREPORT "discuss@mpich.org" +#define PACKAGE_URL "http://www.mpich.org/" +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define __EXTENSIONS__ 1 +#define _ALL_SOURCE 1 +#define _GNU_SOURCE 1 +#define _POSIX_PTHREAD_SEMANTICS 1 +#define _TANDEM_SOURCE 1 +#define PACKAGE "mpich" +#define VERSION "3.4a2" +#define HAVE_DLFCN_H 1 +#define LT_OBJDIR ".libs/" +#define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +#define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +#define HAVE_TAG_ERROR_BITS 1 +#define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +#define HAVE_PRAGMA_WEAK 1 +#define HAVE_WEAK_ATTRIBUTE 1 +#define USE_WEAK_SYMBOLS 1 +#define HAVE_MULTIPLE_PRAGMA_WEAK 1 +#define HAVE_VISIBILITY 1 +#define HWLOC_VERSION "2.0.3rc2-git" +#define HWLOC_VERSION_MAJOR 2 +#define HWLOC_VERSION_MINOR 0 +#define HWLOC_VERSION_RELEASE 3 +#define HWLOC_VERSION_GREEK "rc2" +#define HWLOC_SYM_PREFIX hwloc_ +#define HWLOC_SYM_PREFIX_CAPS HWLOC_ +#define HWLOC_SYM_TRANSFORM 0 +#define _HPUX_SOURCE 1 +#define SIZEOF_VOID_P 8 +#define HWLOC_LINUX_SYS 1 +#define HWLOC_HAVE_LINUXIO 1 +#define HWLOC_HAVE_LINUXPCI 1 +#define HWLOC_X86_64_ARCH 1 +#define SIZEOF_UNSIGNED_LONG 8 +#define HWLOC_SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_UNSIGNED_INT 4 +#define HWLOC_SIZEOF_UNSIGNED_INT 4 +#define HWLOC_HAVE_ATTRIBUTE 1 +#define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +#define HWLOC_HAVE_ATTRIBUTE_COLD 1 +#define HWLOC_HAVE_ATTRIBUTE_CONST 1 +#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +#define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +#define HWLOC_HAVE_ATTRIBUTE_HOT 1 +#define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +#define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +#define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +#define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +#define HWLOC_HAVE_ATTRIBUTE_PURE 1 +#define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +#define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +#define HWLOC_C_HAVE_VISIBILITY 0 +#define HAVE_UNISTD_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_STRCASECMP 1 +#define HWLOC_HAVE_DECL_STRCASECMP 1 +#define HAVE_STRNCASECMP 1 +#define HWLOC_HAVE_DECL_STRNCASECMP 1 +#define HAVE_STRFTIME 1 +#define HAVE_SETLOCALE 1 +#define HWLOC_HAVE_STDINT_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_DECL_FABSF 1 +#define HAVE_DECL_MODFF 1 +#define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +#define HAVE_DECL__SC_NPROCESSORS_CONF 1 +#define HAVE_DECL__SC_NPROC_ONLN 0 +#define HAVE_DECL__SC_NPROC_CONF 0 +#define HAVE_DECL__SC_PAGESIZE 1 +#define HAVE_DECL__SC_PAGE_SIZE 1 +#define HAVE_DECL__SC_LARGE_PAGESIZE 0 +#define HAVE_DECL_STRTOULL 1 +#define HAVE_SSIZE_T 1 +#define HAVE_DECL_SNPRINTF 1 +#define HAVE_DECL__STRDUP 0 +#define HAVE_DECL__PUTENV 0 +#define HAVE_DECL_GETPROGNAME 0 +#define HAVE_DECL_GETEXECNAME 0 +#define HAVE_DECL_GETMODULEFILENAME 0 +#define HAVE_PROGRAM_INVOCATION_NAME 1 +#define HAVE___PROGNAME 1 +#define HAVE_PTHREAD_T 1 +#define hwloc_pid_t pid_t +#define hwloc_thread_t pthread_t +#define HAVE_DECL_SCHED_GETCPU 1 +#define HWLOC_HAVE_SCHED_SETAFFINITY 1 +#define HWLOC_HAVE_CPU_SET 1 +#define HWLOC_HAVE_CPU_SET_S 1 +#define HWLOC_HAVE_SYSCALL 1 +#define HAVE_FFS 1 +#define HWLOC_HAVE_DECL_FFS 1 +#define HWLOC_HAVE_FFS 1 +#define HAVE_FFSL 1 +#define HWLOC_HAVE_DECL_FFSL 1 +#define HWLOC_HAVE_FFSL 1 +#define HAVE_OPENAT 1 +#define HAVE_MALLOC_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_MEMALIGN 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_SYS_UTSNAME_H 1 +#define HAVE_UNAME 1 +#define HAVE_DECL_RUNNING_ON_VALGRIND 0 +#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +#define X_DISPLAY_MISSING 1 +#define HWLOC_HAVE_LIBXML2 1 +#define HWLOC_HAVE_X86_CPUID 1 +#define HWLOC_HAVE_PTHREAD_MUTEX 1 +#define HAVE_HWLOC 1 +#define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +#define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +#define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +#define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +#define HAVE_ROMIO 1 +#define HAVE__FUNC__ /**/ +#define HAVE__FUNCTION__ /**/ +#define ENABLE_PVAR_NEM 0 +#define ENABLE_PVAR_RECVQ 0 +#define ENABLE_PVAR_RMA 0 +#define ENABLE_PVAR_DIMS 0 +#define HAVE_LONG_LONG 1 +#define STDCALL +#define F77_NAME_LOWER_USCORE 1 +#define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +#define HAVE_FORTRAN_BINDING 1 +#define HAVE_F08_BINDING 0 +#define TRUE 1 +#define FALSE 0 +#define HAVE_CXX_EXCEPTIONS /**/ +#define HAVE_NAMESPACES /**/ +#define HAVE_NAMESPACE_STD /**/ +#define HAVE_CXX_BINDING 1 +#define HAVE_NAMEPUB_SERVICE 1 +#define restrict __restrict +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_BUILTIN_EXPECT 1 +#define HAVE_C11__STATIC_ASSERT 1 +#define WORDS_LITTLEENDIAN 1 +#define HAVE_LONG_DOUBLE 1 +#define HAVE_LONG_LONG_INT 1 +#define HAVE_MAX_INTEGER_ALIGNMENT 8 +#define HAVE_MAX_STRUCT_ALIGNMENT 8 +#define HAVE_MAX_FP_ALIGNMENT 16 +#define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +#define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +#define SIZEOF_CHAR 1 +#define SIZEOF_UNSIGNED_CHAR 1 +#define SIZEOF_SHORT 2 +#define SIZEOF_UNSIGNED_SHORT 2 +#define SIZEOF_INT 4 +#define SIZEOF_UNSIGNED_INT 4 +#define SIZEOF_LONG 8 +#define SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_UNSIGNED_LONG_LONG 8 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_LONG_DOUBLE 16 +#define SIZEOF_VOID_P 8 +#define STDC_HEADERS 1 +#define HAVE_STDDEF_H 1 +#define SIZEOF_WCHAR_T 4 +#define SIZEOF_FLOAT_INT 8 +#define SIZEOF_DOUBLE_INT 16 +#define SIZEOF_LONG_INT 16 +#define SIZEOF_SHORT_INT 8 +#define SIZEOF_TWO_INT 8 +#define SIZEOF_LONG_DOUBLE_INT 32 +#define HAVE_SYS_BITYPES_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_INT8_T 1 +#define HAVE_INT16_T 1 +#define HAVE_INT32_T 1 +#define HAVE_INT64_T 1 +#define HAVE_UINT8_T 1 +#define HAVE_UINT16_T 1 +#define HAVE_UINT32_T 1 +#define HAVE_UINT64_T 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_COMPLEX_H 1 +#define SIZEOF__BOOL 1 +#define SIZEOF_FLOAT__COMPLEX 8 +#define SIZEOF_DOUBLE__COMPLEX 16 +#define SIZEOF_LONG_DOUBLE__COMPLEX 32 +#define SIZEOF__FLOAT16 0 +#define HAVE__BOOL 1 +#define HAVE_FLOAT__COMPLEX 1 +#define HAVE_DOUBLE__COMPLEX 1 +#define HAVE_LONG_DOUBLE__COMPLEX 1 +#define MPIR_REAL4_CTYPE float +#define MPIR_REAL8_CTYPE double +#define MPIR_REAL16_CTYPE long double +#define MPIR_INTEGER1_CTYPE char +#define MPIR_INTEGER2_CTYPE short +#define MPIR_INTEGER4_CTYPE int +#define MPIR_INTEGER8_CTYPE long +#define SIZEOF_F77_INTEGER 4 +#define SIZEOF_F77_REAL 4 +#define SIZEOF_F77_DOUBLE_PRECISION 8 +#define MPIR_FC_REAL_CTYPE float +#define MPIR_FC_DOUBLE_CTYPE double +#define HAVE_AINT_LARGER_THAN_FINT 1 +#define HAVE_AINT_DIFFERENT_THAN_FINT 1 +#define HAVE_FINT_IS_INT 1 +#define F77_TRUE_VALUE_SET 1 +#define F77_TRUE_VALUE 1 +#define F77_FALSE_VALUE 0 +#define SIZEOF_BOOL 1 +#define MPIR_CXX_BOOL_CTYPE _Bool +#define SIZEOF_COMPLEX 8 +#define SIZEOF_DOUBLECOMPLEX 16 +#define SIZEOF_LONGDOUBLECOMPLEX 32 +#define HAVE_CXX_COMPLEX 1 +#define MPIR_CXX_BOOL_VALUE 0x4c000133 +#define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +#define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +#define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +#define HAVE_ANY_INT64_T_ALIGNMENT 1 +#define HAVE_ANY_INT32_T_ALIGNMENT 1 +#define STDC_HEADERS 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_STRING_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ENDIAN_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_SETITIMER 1 +#define HAVE_ALARM 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_VSPRINTF 1 +#define HAVE_STRERROR 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_DECL_STRERROR_R 1 +#define HAVE_STRERROR_R 1 +#define STRERROR_R_CHAR_P 1 +#define HAVE_SNPRINTF 1 +#define HAVE_QSORT 1 +#define HAVE_VA_COPY 1 +#define HAVE_MACRO_VA_ARGS 1 +#define HAVE_ALLOCA_H 1 +#define HAVE_ALLOCA 1 +#define HAVE_STRDUP 1 +#define HAVE_MKSTEMP 1 +#define HAVE_PUTENV 1 +#define MPIR_AINT_MAX LONG_MAX +#define SIZEOF_MPII_BSEND_DATA_T 88 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SNPRINTF 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_NETDB_H 1 +#define USE_PMI_PORT 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION 1 +#define MPIEXEC_ALLOW_PORT 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SETSID 1 +#define HAVE_ISATTY 1 +#define HAVE_GETSID 1 +#define USE_NEW_SESSION 1 +#define HAVE_UNSETENV 1 +#define NEEDS_BIN_IN_PATH 1 +#define HAVE_EXTERN_ENVIRON 1 +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_IOVEC_DEFINITION 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION /**/ +#define HAVE_PUTENV 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_SELECT 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_TIME_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_TIME 1 +#define HAVE_SOCKLEN_T 1 +#define CH3_RANK_BITS 16 +#define HAVE_ASSERT_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_TIME_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_INET_PTON 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_TIME 1 +#define HAVE_NET_IF_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_NETDB_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_SCHED_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_IPC_H 1 +#define HAVE_SYS_SHM_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SIGNAL 1 +#define HAVE_MKSTEMP 1 +#define HAVE_RAND 1 +#define HAVE_SRAND 1 +#define MPID_NEM_INLINE 1 +#define PREFETCH_CELL 1 +#define USE_FASTBOX 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_STRUCT_IFCONF 1 +#define HAVE_STRUCT_IFREQ 1 +#define MPID_NEM_LOCAL_LMT_IMPL MPID_NEM_LOCAL_LMT_SHM_COPY +#define HAVE_STRUCT_RANDOM_DATA 1 +#define HAVE_RANDOM_R 1 +#define USE_SYM_HEAP 1 +#define MPIR_OFFSET_MAX LLONG_MAX +#define MPIR_COUNT_MAX LLONG_MAX +#define MPIR_Ucount unsigned long long +#define MPIF_STATUS_SIZE 5 +#define HAVE_STDIO_H 1 +/* end confdefs.h. */ + + + +struct mpif_cmblk_t_ { int imembers[5]; }; + +typedef struct mpif_cmblk_t_ mpif_cmblk_t; +mpif_cmblk_t mpifcmbr __attribute__((aligned(4))) = {0}; + +extern mpif_cmblk_t _CMPIFCMB __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t MPIFCMB __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t MPIFCMB_ __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t _Cmpifcmb __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t mpifcmb __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t mpifcmb_ __attribute__ ((alias("mpifcmbr"))); + + +failed Fortran program was: + + + program fconftest + integer isize + parameter (isize=5) + integer status_array(isize) + common /mpifcmb/ status_array + save /mpifcmb/ + end + + +configure:65540: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65540: $? = 0 +configure:65544: mv conftest.o pac_conftest.o +configure:65547: $? = 0 +configure:65572: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align1.log 2>&1 +configure:65572: $? = 0 +configure:65579: diff -b pac_align0.log pac_align1.log > pac_test.log +configure:65582: $? = 1 +configure: program exited with status 1 +*** diff -b pac_align0.log pac_align1.log : +0a1 +> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: alignment 8 of symbol `mpifcmb_' in pac_conftest.o is smaller than 16 in /tmp/ccOqvhqo.o +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: alignment 8 of symbol `mpifcmb_' in pac_conftest.o is smaller than 16 in /tmp/ccOqvhqo.o +failed C program was: +/* confdefs.h */ +#define PACKAGE_NAME "MPICH" +#define PACKAGE_TARNAME "mpich" +#define PACKAGE_VERSION "3.4a2" +#define PACKAGE_STRING "MPICH 3.4a2" +#define PACKAGE_BUGREPORT "discuss@mpich.org" +#define PACKAGE_URL "http://www.mpich.org/" +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define __EXTENSIONS__ 1 +#define _ALL_SOURCE 1 +#define _GNU_SOURCE 1 +#define _POSIX_PTHREAD_SEMANTICS 1 +#define _TANDEM_SOURCE 1 +#define PACKAGE "mpich" +#define VERSION "3.4a2" +#define HAVE_DLFCN_H 1 +#define LT_OBJDIR ".libs/" +#define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +#define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +#define HAVE_TAG_ERROR_BITS 1 +#define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +#define HAVE_PRAGMA_WEAK 1 +#define HAVE_WEAK_ATTRIBUTE 1 +#define USE_WEAK_SYMBOLS 1 +#define HAVE_MULTIPLE_PRAGMA_WEAK 1 +#define HAVE_VISIBILITY 1 +#define HWLOC_VERSION "2.0.3rc2-git" +#define HWLOC_VERSION_MAJOR 2 +#define HWLOC_VERSION_MINOR 0 +#define HWLOC_VERSION_RELEASE 3 +#define HWLOC_VERSION_GREEK "rc2" +#define HWLOC_SYM_PREFIX hwloc_ +#define HWLOC_SYM_PREFIX_CAPS HWLOC_ +#define HWLOC_SYM_TRANSFORM 0 +#define _HPUX_SOURCE 1 +#define SIZEOF_VOID_P 8 +#define HWLOC_LINUX_SYS 1 +#define HWLOC_HAVE_LINUXIO 1 +#define HWLOC_HAVE_LINUXPCI 1 +#define HWLOC_X86_64_ARCH 1 +#define SIZEOF_UNSIGNED_LONG 8 +#define HWLOC_SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_UNSIGNED_INT 4 +#define HWLOC_SIZEOF_UNSIGNED_INT 4 +#define HWLOC_HAVE_ATTRIBUTE 1 +#define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +#define HWLOC_HAVE_ATTRIBUTE_COLD 1 +#define HWLOC_HAVE_ATTRIBUTE_CONST 1 +#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +#define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +#define HWLOC_HAVE_ATTRIBUTE_HOT 1 +#define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +#define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +#define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +#define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +#define HWLOC_HAVE_ATTRIBUTE_PURE 1 +#define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +#define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +#define HWLOC_C_HAVE_VISIBILITY 0 +#define HAVE_UNISTD_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_STRCASECMP 1 +#define HWLOC_HAVE_DECL_STRCASECMP 1 +#define HAVE_STRNCASECMP 1 +#define HWLOC_HAVE_DECL_STRNCASECMP 1 +#define HAVE_STRFTIME 1 +#define HAVE_SETLOCALE 1 +#define HWLOC_HAVE_STDINT_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_DECL_FABSF 1 +#define HAVE_DECL_MODFF 1 +#define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +#define HAVE_DECL__SC_NPROCESSORS_CONF 1 +#define HAVE_DECL__SC_NPROC_ONLN 0 +#define HAVE_DECL__SC_NPROC_CONF 0 +#define HAVE_DECL__SC_PAGESIZE 1 +#define HAVE_DECL__SC_PAGE_SIZE 1 +#define HAVE_DECL__SC_LARGE_PAGESIZE 0 +#define HAVE_DECL_STRTOULL 1 +#define HAVE_SSIZE_T 1 +#define HAVE_DECL_SNPRINTF 1 +#define HAVE_DECL__STRDUP 0 +#define HAVE_DECL__PUTENV 0 +#define HAVE_DECL_GETPROGNAME 0 +#define HAVE_DECL_GETEXECNAME 0 +#define HAVE_DECL_GETMODULEFILENAME 0 +#define HAVE_PROGRAM_INVOCATION_NAME 1 +#define HAVE___PROGNAME 1 +#define HAVE_PTHREAD_T 1 +#define hwloc_pid_t pid_t +#define hwloc_thread_t pthread_t +#define HAVE_DECL_SCHED_GETCPU 1 +#define HWLOC_HAVE_SCHED_SETAFFINITY 1 +#define HWLOC_HAVE_CPU_SET 1 +#define HWLOC_HAVE_CPU_SET_S 1 +#define HWLOC_HAVE_SYSCALL 1 +#define HAVE_FFS 1 +#define HWLOC_HAVE_DECL_FFS 1 +#define HWLOC_HAVE_FFS 1 +#define HAVE_FFSL 1 +#define HWLOC_HAVE_DECL_FFSL 1 +#define HWLOC_HAVE_FFSL 1 +#define HAVE_OPENAT 1 +#define HAVE_MALLOC_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_MEMALIGN 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_SYS_UTSNAME_H 1 +#define HAVE_UNAME 1 +#define HAVE_DECL_RUNNING_ON_VALGRIND 0 +#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +#define X_DISPLAY_MISSING 1 +#define HWLOC_HAVE_LIBXML2 1 +#define HWLOC_HAVE_X86_CPUID 1 +#define HWLOC_HAVE_PTHREAD_MUTEX 1 +#define HAVE_HWLOC 1 +#define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +#define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +#define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +#define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +#define HAVE_ROMIO 1 +#define HAVE__FUNC__ /**/ +#define HAVE__FUNCTION__ /**/ +#define ENABLE_PVAR_NEM 0 +#define ENABLE_PVAR_RECVQ 0 +#define ENABLE_PVAR_RMA 0 +#define ENABLE_PVAR_DIMS 0 +#define HAVE_LONG_LONG 1 +#define STDCALL +#define F77_NAME_LOWER_USCORE 1 +#define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +#define HAVE_FORTRAN_BINDING 1 +#define HAVE_F08_BINDING 0 +#define TRUE 1 +#define FALSE 0 +#define HAVE_CXX_EXCEPTIONS /**/ +#define HAVE_NAMESPACES /**/ +#define HAVE_NAMESPACE_STD /**/ +#define HAVE_CXX_BINDING 1 +#define HAVE_NAMEPUB_SERVICE 1 +#define restrict __restrict +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_BUILTIN_EXPECT 1 +#define HAVE_C11__STATIC_ASSERT 1 +#define WORDS_LITTLEENDIAN 1 +#define HAVE_LONG_DOUBLE 1 +#define HAVE_LONG_LONG_INT 1 +#define HAVE_MAX_INTEGER_ALIGNMENT 8 +#define HAVE_MAX_STRUCT_ALIGNMENT 8 +#define HAVE_MAX_FP_ALIGNMENT 16 +#define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +#define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +#define SIZEOF_CHAR 1 +#define SIZEOF_UNSIGNED_CHAR 1 +#define SIZEOF_SHORT 2 +#define SIZEOF_UNSIGNED_SHORT 2 +#define SIZEOF_INT 4 +#define SIZEOF_UNSIGNED_INT 4 +#define SIZEOF_LONG 8 +#define SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_UNSIGNED_LONG_LONG 8 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_LONG_DOUBLE 16 +#define SIZEOF_VOID_P 8 +#define STDC_HEADERS 1 +#define HAVE_STDDEF_H 1 +#define SIZEOF_WCHAR_T 4 +#define SIZEOF_FLOAT_INT 8 +#define SIZEOF_DOUBLE_INT 16 +#define SIZEOF_LONG_INT 16 +#define SIZEOF_SHORT_INT 8 +#define SIZEOF_TWO_INT 8 +#define SIZEOF_LONG_DOUBLE_INT 32 +#define HAVE_SYS_BITYPES_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_INT8_T 1 +#define HAVE_INT16_T 1 +#define HAVE_INT32_T 1 +#define HAVE_INT64_T 1 +#define HAVE_UINT8_T 1 +#define HAVE_UINT16_T 1 +#define HAVE_UINT32_T 1 +#define HAVE_UINT64_T 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_COMPLEX_H 1 +#define SIZEOF__BOOL 1 +#define SIZEOF_FLOAT__COMPLEX 8 +#define SIZEOF_DOUBLE__COMPLEX 16 +#define SIZEOF_LONG_DOUBLE__COMPLEX 32 +#define SIZEOF__FLOAT16 0 +#define HAVE__BOOL 1 +#define HAVE_FLOAT__COMPLEX 1 +#define HAVE_DOUBLE__COMPLEX 1 +#define HAVE_LONG_DOUBLE__COMPLEX 1 +#define MPIR_REAL4_CTYPE float +#define MPIR_REAL8_CTYPE double +#define MPIR_REAL16_CTYPE long double +#define MPIR_INTEGER1_CTYPE char +#define MPIR_INTEGER2_CTYPE short +#define MPIR_INTEGER4_CTYPE int +#define MPIR_INTEGER8_CTYPE long +#define SIZEOF_F77_INTEGER 4 +#define SIZEOF_F77_REAL 4 +#define SIZEOF_F77_DOUBLE_PRECISION 8 +#define MPIR_FC_REAL_CTYPE float +#define MPIR_FC_DOUBLE_CTYPE double +#define HAVE_AINT_LARGER_THAN_FINT 1 +#define HAVE_AINT_DIFFERENT_THAN_FINT 1 +#define HAVE_FINT_IS_INT 1 +#define F77_TRUE_VALUE_SET 1 +#define F77_TRUE_VALUE 1 +#define F77_FALSE_VALUE 0 +#define SIZEOF_BOOL 1 +#define MPIR_CXX_BOOL_CTYPE _Bool +#define SIZEOF_COMPLEX 8 +#define SIZEOF_DOUBLECOMPLEX 16 +#define SIZEOF_LONGDOUBLECOMPLEX 32 +#define HAVE_CXX_COMPLEX 1 +#define MPIR_CXX_BOOL_VALUE 0x4c000133 +#define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +#define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +#define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +#define HAVE_ANY_INT64_T_ALIGNMENT 1 +#define HAVE_ANY_INT32_T_ALIGNMENT 1 +#define STDC_HEADERS 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_STRING_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ENDIAN_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_SETITIMER 1 +#define HAVE_ALARM 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_VSPRINTF 1 +#define HAVE_STRERROR 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_DECL_STRERROR_R 1 +#define HAVE_STRERROR_R 1 +#define STRERROR_R_CHAR_P 1 +#define HAVE_SNPRINTF 1 +#define HAVE_QSORT 1 +#define HAVE_VA_COPY 1 +#define HAVE_MACRO_VA_ARGS 1 +#define HAVE_ALLOCA_H 1 +#define HAVE_ALLOCA 1 +#define HAVE_STRDUP 1 +#define HAVE_MKSTEMP 1 +#define HAVE_PUTENV 1 +#define MPIR_AINT_MAX LONG_MAX +#define SIZEOF_MPII_BSEND_DATA_T 88 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SNPRINTF 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_NETDB_H 1 +#define USE_PMI_PORT 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION 1 +#define MPIEXEC_ALLOW_PORT 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SETSID 1 +#define HAVE_ISATTY 1 +#define HAVE_GETSID 1 +#define USE_NEW_SESSION 1 +#define HAVE_UNSETENV 1 +#define NEEDS_BIN_IN_PATH 1 +#define HAVE_EXTERN_ENVIRON 1 +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_IOVEC_DEFINITION 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION /**/ +#define HAVE_PUTENV 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_SELECT 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_TIME_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_TIME 1 +#define HAVE_SOCKLEN_T 1 +#define CH3_RANK_BITS 16 +#define HAVE_ASSERT_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_TIME_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_INET_PTON 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_TIME 1 +#define HAVE_NET_IF_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_NETDB_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_SCHED_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_IPC_H 1 +#define HAVE_SYS_SHM_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SIGNAL 1 +#define HAVE_MKSTEMP 1 +#define HAVE_RAND 1 +#define HAVE_SRAND 1 +#define MPID_NEM_INLINE 1 +#define PREFETCH_CELL 1 +#define USE_FASTBOX 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_STRUCT_IFCONF 1 +#define HAVE_STRUCT_IFREQ 1 +#define MPID_NEM_LOCAL_LMT_IMPL MPID_NEM_LOCAL_LMT_SHM_COPY +#define HAVE_STRUCT_RANDOM_DATA 1 +#define HAVE_RANDOM_R 1 +#define USE_SYM_HEAP 1 +#define MPIR_OFFSET_MAX LLONG_MAX +#define MPIR_COUNT_MAX LLONG_MAX +#define MPIR_Ucount unsigned long long +#define MPIF_STATUS_SIZE 5 +#define HAVE_STDIO_H 1 +/* end confdefs.h. */ + + + +struct mpif_cmblk_t_ { int imembers[5]; }; + +typedef struct mpif_cmblk_t_ mpif_cmblk_t; +mpif_cmblk_t mpifcmbr __attribute__((aligned(8))) = {0}; + +extern mpif_cmblk_t _CMPIFCMB __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t MPIFCMB __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t MPIFCMB_ __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t _Cmpifcmb __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t mpifcmb __attribute__ ((alias("mpifcmbr"))); +extern mpif_cmblk_t mpifcmb_ __attribute__ ((alias("mpifcmbr"))); + + +failed Fortran program was: + + + program fconftest + integer isize + parameter (isize=5) + integer status_array(isize) + common /mpifcmb/ status_array + save /mpifcmb/ + end + + +configure:65540: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65540: $? = 0 +configure:65544: mv conftest.o pac_conftest.o +configure:65547: $? = 0 +configure:65572: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align1.log 2>&1 +configure:65572: $? = 0 +configure:65579: diff -b pac_align0.log pac_align1.log > pac_test.log +configure:65582: $? = 0 +configure:65540: gcc -c -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include conftest.c >&5 +conftest.c:338:0: warning: "USE_SIGACTION" redefined + #define USE_SIGACTION /**/ + +conftest.c:311:0: note: this is the location of the previous definition + #define USE_SIGACTION 1 + +configure:65540: $? = 0 +configure:65544: mv conftest.o pac_conftest.o +configure:65547: $? = 0 +configure:65572: gfortran -o conftest -m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wl,-z,noexecstack conftest.f90 pac_conftest.o > pac_align1.log 2>&1 +configure:65572: $? = 0 +configure:65579: diff -b pac_align0.log pac_align1.log > pac_test.log +configure:65582: $? = 0 +configure:65683: result: 16, too small! reset to 32 +configure:65734: WARNING: The ch3:nemesis device did not set the maximum size of an error string, 512 being used. +configure:65883: creating ./config.lt + +## ------------------ ## +## Running config.lt. ## +## ------------------ ## +config.lt:789: creating libtool +configure:68390: checking that generated files are newer than configure +configure:68396: result: done +configure:68828: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by MPICH config.status 3.4a2, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on bmurrell-mobl.amr.corp.intel.com + +config.status:2514: creating src/hwloc/Makefile +config.status:2514: creating src/hwloc/include/Makefile +config.status:2514: creating src/hwloc/hwloc/Makefile +config.status:2514: creating src/binding/fortran/use_mpi/mpif90model.h +config.status:2514: creating src/mpid/ch3/channels/nemesis/include/mpid_nem_net_module_defs.h +config.status:2514: creating src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c +config.status:2514: creating Makefile +config.status:2514: creating examples/Makefile +config.status:2514: creating test/Makefile +config.status:2514: creating test/commands/Makefile +config.status:2514: creating src/include/mpichinfo.h +config.status:2514: creating mpich-doxygen +config.status:2514: creating src/include/mpir_ext.h +config.status:2514: creating src/binding/cxx/mpicxx.h +config.status:2514: creating src/binding/fortran/mpif_h/mpif.h +config.status:2514: creating src/binding/fortran/mpif_h/setbotf.f +config.status:2514: creating src/binding/fortran/mpif_h/setbot.c +config.status:2514: creating src/binding/fortran/use_mpi/mpi_sizeofs.f90 +config.status:2514: creating src/binding/fortran/use_mpi/mpi_base.f90 +config.status:2514: creating src/binding/fortran/use_mpi/mpi_constants.f90 +config.status:2514: creating src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90 +config.status:2514: creating src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90 +config.status:2514: creating src/packaging/pkgconfig/mpich.pc +config.status:2514: creating src/packaging/envmods/mpich.module +config.status:2622: WARNING: 'src/packaging/envmods/mpich.module.in' seems to ignore the --datarootdir setting +config.status:2514: creating src/env/mpixxx_opts.conf +config.status:2514: creating src/env/mpicc.sh +config.status:2514: creating src/env/mpicc.bash +config.status:2514: creating src/env/mpicxx.sh +config.status:2514: creating src/env/mpicxx.bash +config.status:2514: creating src/env/mpif77.sh +config.status:2514: creating src/env/mpif77.bash +config.status:2514: creating src/env/mpifort.sh +config.status:2514: creating src/env/mpifort.bash +config.status:2514: creating src/env/parkill +config.status:2514: creating src/include/mpi.h +config.status:2514: creating doc/design/Makefile +config.status:2514: creating doc/installguide/Makefile +config.status:2514: creating doc/logging/Makefile +config.status:2514: creating doc/refman/Makefile +config.status:2514: creating doc/userguide/Makefile +config.status:2514: creating test/commands/cmdtests +config.status:2514: creating src/include/mpichconf.h +config.status:2514: creating src/hwloc/include/private/autogen/config.h +config.status:2700: src/hwloc/include/private/autogen/config.h is unchanged +config.status:2514: creating src/hwloc/include/hwloc/autogen/config.h +config.status:2700: src/hwloc/include/hwloc/autogen/config.h is unchanged +config.status:2748: executing depfiles commands +config.status:2748: executing libtool commands +config.status:2748: executing default-1 commands +config.status:2748: executing default-2 commands +config.status:2748: executing default-3 commands +config.status:2748: executing default-4 commands +configure:71921: === configuring in test/mpi (/home/brian/daos/rpm/mpich/test/mpi) +configure:71984: running /bin/sh ./configure --disable-option-checking '--prefix=/home/brian/mpich-install' '--enable-sharedlibs=gcc' '--enable-shared' '--enable-static=no' '--enable-lib-depend' '--disable-rpath' '--disable-silent-rules' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--with-hwloc-prefix=embedded' '--enable-fortran=all' '--enable-romio' '--with-file-system=ufs+daos' '--with-daos=/usr' '--with-cart=/usr' '--disable-checkerrors' '--disable-perftest' '--disable-large-tests' '--disable-ft-tests' '--disable-comm-overlap-tests' '--enable-threads=single' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -fPIC' 'CXXFLAGS=-m64 -O2 -fPIC' 'FCFLAGS=-m64 -O2 -fPIC' 'FFLAGS=-m64 -O2 -fPIC' 'LDFLAGS=-Wl,-z,noexecstack' 'MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --cache-file=/dev/null --srcdir=. + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +HWLOC_pkg_cv_HWLOC_LIBXML2_CFLAGS=-I/usr/include/libxml2 +HWLOC_pkg_cv_HWLOC_LIBXML2_LIBS=-lxml2 +HWLOC_pkg_cv_HWLOC_PCIACCESS_CFLAGS= +HWLOC_pkg_cv_HWLOC_PCIACCESS_LIBS=-lpciaccess +ac_cv_build=x86_64-pc-linux-gnu +ac_cv_c_bigendian=no +ac_cv_c_compiler_gnu=yes +ac_cv_c_const=yes +ac_cv_c_inline=inline +ac_cv_c_int16_t=yes +ac_cv_c_int32_t=yes +ac_cv_c_int64_t=yes +ac_cv_c_int8_t=yes +ac_cv_c_restrict=__restrict +ac_cv_c_uint16_t=yes +ac_cv_c_uint32_t=yes +ac_cv_c_uint64_t=yes +ac_cv_c_uint8_t=yes +ac_cv_c_volatile=yes +ac_cv_cxx_bool=yes +ac_cv_cxx_compiler_gnu=yes +ac_cv_cxx_exceptions=yes +ac_cv_cxx_namespace_std=yes +ac_cv_cxx_namespaces=yes +ac_cv_env_CCC_set= +ac_cv_env_CCC_value= +ac_cv_env_CC_set= +ac_cv_env_CC_value= +ac_cv_env_CFLAGS_set=set +ac_cv_env_CFLAGS_value='-m64 -O2 -fPIC' +ac_cv_env_CPPFLAGS_set= +ac_cv_env_CPPFLAGS_value= +ac_cv_env_CPP_set= +ac_cv_env_CPP_value= +ac_cv_env_CXXCPP_set= +ac_cv_env_CXXCPP_value= +ac_cv_env_CXXFLAGS_set=set +ac_cv_env_CXXFLAGS_value='-m64 -O2 -fPIC' +ac_cv_env_CXX_set= +ac_cv_env_CXX_value= +ac_cv_env_F77_set=set +ac_cv_env_F77_value=gfortran +ac_cv_env_FCFLAGS_set=set +ac_cv_env_FCFLAGS_value='-m64 -O2 -fPIC' +ac_cv_env_FC_set=set +ac_cv_env_FC_value=gfortran +ac_cv_env_FFLAGS_set=set +ac_cv_env_FFLAGS_value='-m64 -O2 -fPIC' +ac_cv_env_GCOV_set= +ac_cv_env_GCOV_value= +ac_cv_env_HWLOC_LIBXML2_CFLAGS_set= +ac_cv_env_HWLOC_LIBXML2_CFLAGS_value= +ac_cv_env_HWLOC_LIBXML2_LIBS_set= +ac_cv_env_HWLOC_LIBXML2_LIBS_value= +ac_cv_env_HWLOC_MS_LIB_set= +ac_cv_env_HWLOC_MS_LIB_value= +ac_cv_env_HWLOC_PCIACCESS_CFLAGS_set= +ac_cv_env_HWLOC_PCIACCESS_CFLAGS_value= +ac_cv_env_HWLOC_PCIACCESS_LIBS_set= +ac_cv_env_HWLOC_PCIACCESS_LIBS_value= +ac_cv_env_LDFLAGS_set=set +ac_cv_env_LDFLAGS_value=-Wl,-z,noexecstack +ac_cv_env_LIBS_set= +ac_cv_env_LIBS_value= +ac_cv_env_LT_SYS_LIBRARY_PATH_set= +ac_cv_env_LT_SYS_LIBRARY_PATH_value= +ac_cv_env_MPICHLIB_CFLAGS_set=set +ac_cv_env_MPICHLIB_CFLAGS_value='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +ac_cv_env_MPICHLIB_CPPFLAGS_set= +ac_cv_env_MPICHLIB_CPPFLAGS_value= +ac_cv_env_MPICHLIB_CXXFLAGS_set=set +ac_cv_env_MPICHLIB_CXXFLAGS_value='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +ac_cv_env_MPICHLIB_FCFLAGS_set=set +ac_cv_env_MPICHLIB_FCFLAGS_value='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +ac_cv_env_MPICHLIB_FFLAGS_set=set +ac_cv_env_MPICHLIB_FFLAGS_value='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +ac_cv_env_MPICXXLIBNAME_set= +ac_cv_env_MPICXXLIBNAME_value= +ac_cv_env_MPIFCLIBNAME_set= +ac_cv_env_MPIFCLIBNAME_value= +ac_cv_env_MPILIBNAME_set= +ac_cv_env_MPILIBNAME_value= +ac_cv_env_MPLLIBNAME_set= +ac_cv_env_MPLLIBNAME_value= +ac_cv_env_OPALIBNAME_set= +ac_cv_env_OPALIBNAME_value= +ac_cv_env_PKG_CONFIG_set= +ac_cv_env_PKG_CONFIG_value= +ac_cv_env_PMPILIBNAME_set= +ac_cv_env_PMPILIBNAME_value= +ac_cv_env_XMKMF_set= +ac_cv_env_XMKMF_value= +ac_cv_env_YAKSALIBNAME_set= +ac_cv_env_YAKSALIBNAME_value= +ac_cv_env_ZMLIBNAME_set= +ac_cv_env_ZMLIBNAME_value= +ac_cv_env_build_alias_set= +ac_cv_env_build_alias_value= +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_f77_compiler_gnu=yes +ac_cv_f77_libs=' -L/usr/lib64/gcc/x86_64-suse-linux/7 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. -lgfortran -lm -lquadmath' +ac_cv_fc_compiler_gnu=yes +ac_cv_func_CFUUIDCreate=no +ac_cv_func_alarm=yes +ac_cv_func_alloca_works=yes +ac_cv_func_bindprocessor=no +ac_cv_func_clz=no +ac_cv_func_clzl=no +ac_cv_func_cpuset_setaffinity=no +ac_cv_func_cpuset_setid=no +ac_cv_func_ffs=yes +ac_cv_func_ffsl=yes +ac_cv_func_fls=no +ac_cv_func_flsl=no +ac_cv_func_gethostname=yes +ac_cv_func_getpagesize=yes +ac_cv_func_getsid=yes +ac_cv_func_inet_pton=yes +ac_cv_func_isatty=yes +ac_cv_func_memalign=yes +ac_cv_func_mkstemp=yes +ac_cv_func_openat=yes +ac_cv_func_pci_slot_match_iterator_create=yes +ac_cv_func_posix_memalign=yes +ac_cv_func_pthread_mutex_lock=yes +ac_cv_func_putenv=yes +ac_cv_func_qsort=yes +ac_cv_func_rand=yes +ac_cv_func_random_r=yes +ac_cv_func_sched_getaffinity=yes +ac_cv_func_sched_setaffinity=yes +ac_cv_func_select=yes +ac_cv_func_setitimer=yes +ac_cv_func_setlocale=yes +ac_cv_func_setsid=yes +ac_cv_func_sigaction=yes +ac_cv_func_signal=yes +ac_cv_func_sigset=yes +ac_cv_func_snprintf=yes +ac_cv_func_srand=yes +ac_cv_func_strcasecmp=yes +ac_cv_func_strdup=yes +ac_cv_func_strerror=yes +ac_cv_func_strerror_r=yes +ac_cv_func_strerror_r_char_p=yes +ac_cv_func_strftime=yes +ac_cv_func_strncasecmp=yes +ac_cv_func_strsignal=yes +ac_cv_func_thread_policy_set=no +ac_cv_func_time=yes +ac_cv_func_uname=yes +ac_cv_func_unsetenv=yes +ac_cv_func_uuid_generate=no +ac_cv_func_vsnprintf=yes +ac_cv_func_vsprintf=yes +ac_cv_func_xmlNewDoc=yes +ac_cv_have_decl_GetModuleFileName=no +ac_cv_have_decl__SC_LARGE_PAGESIZE=no +ac_cv_have_decl__SC_NPROCESSORS_CONF=yes +ac_cv_have_decl__SC_NPROCESSORS_ONLN=yes +ac_cv_have_decl__SC_NPROC_CONF=no +ac_cv_have_decl__SC_NPROC_ONLN=no +ac_cv_have_decl__SC_PAGESIZE=yes +ac_cv_have_decl__SC_PAGE_SIZE=yes +ac_cv_have_decl__putenv=no +ac_cv_have_decl__strdup=no +ac_cv_have_decl_fabsf=yes +ac_cv_have_decl_ffs=yes +ac_cv_have_decl_ffsl=yes +ac_cv_have_decl_getexecname=no +ac_cv_have_decl_getprogname=no +ac_cv_have_decl_modff=yes +ac_cv_have_decl_pthread_getaffinity_np=yes +ac_cv_have_decl_pthread_setaffinity_np=yes +ac_cv_have_decl_sched_getcpu=yes +ac_cv_have_decl_sched_setaffinity=yes +ac_cv_have_decl_snprintf=yes +ac_cv_have_decl_strcasecmp=yes +ac_cv_have_decl_strerror_r=yes +ac_cv_have_decl_strncasecmp=yes +ac_cv_have_decl_strtoull=yes +ac_cv_have_x=have_x=no +ac_cv_header_CL_cl_ext_h=no +ac_cv_header_NVCtrl_NVCtrl_h=no +ac_cv_header_X11_Xlib_h=no +ac_cv_header_arpa_inet_h=yes +ac_cv_header_assert_h=yes +ac_cv_header_complex=yes +ac_cv_header_complex_h=yes +ac_cv_header_ctype_h=yes +ac_cv_header_cuda_h=no +ac_cv_header_cuda_runtime_api_h=no +ac_cv_header_dirent_h=yes +ac_cv_header_dlfcn_h=yes +ac_cv_header_endian_h=yes +ac_cv_header_errno_h=yes +ac_cv_header_hcoll_api_hcoll_api_h=no +ac_cv_header_inttypes_h=yes +ac_cv_header_kstat_h=no +ac_cv_header_libudev_h=no +ac_cv_header_libxml_parser_h=yes +ac_cv_header_limits_h=yes +ac_cv_header_mach_mach_host_h=no +ac_cv_header_mach_mach_init_h=no +ac_cv_header_malloc_h=yes +ac_cv_header_memory_h=yes +ac_cv_header_minix_config_h=no +ac_cv_header_net_if_h=yes +ac_cv_header_netdb_h=yes +ac_cv_header_netinet_in_h=yes +ac_cv_header_netinet_tcp_h=yes +ac_cv_header_nvml_h=no +ac_cv_header_pciaccess_h=yes +ac_cv_header_picl_h=no +ac_cv_header_pthread_np_h=no +ac_cv_header_random_h=no +ac_cv_header_sched_h=yes +ac_cv_header_signal_h=yes +ac_cv_header_stdarg_h=yes +ac_cv_header_stdbool_h=yes +ac_cv_header_stdc=yes +ac_cv_header_stddef_h=yes +ac_cv_header_stdint_h=yes +ac_cv_header_stdio_h=yes +ac_cv_header_stdlib_h=yes +ac_cv_header_string_h=yes +ac_cv_header_strings_h=yes +ac_cv_header_sys_bitypes_h=yes +ac_cv_header_sys_cpuset_h=no +ac_cv_header_sys_ioctl_h=yes +ac_cv_header_sys_ipc_h=yes +ac_cv_header_sys_lgrp_user_h=no +ac_cv_header_sys_mman_h=yes +ac_cv_header_sys_param_h=yes +ac_cv_header_sys_ptrace_h=yes +ac_cv_header_sys_select_h=yes +ac_cv_header_sys_shm_h=yes +ac_cv_header_sys_socket_h=yes +ac_cv_header_sys_sockio_h=no +ac_cv_header_sys_stat_h=yes +ac_cv_header_sys_time_h=yes +ac_cv_header_sys_types_h=yes +ac_cv_header_sys_uio_h=yes +ac_cv_header_sys_un_h=yes +ac_cv_header_sys_utsname_h=yes +ac_cv_header_time_h=yes +ac_cv_header_unistd_h=yes +ac_cv_header_uuid_uuid_h=yes +ac_cv_header_wait_h=yes +ac_cv_header_windows_h=no +ac_cv_host=x86_64-pc-linux-gnu +ac_cv_lib_gdi32_main=no +ac_cv_lib_hcoll_hcoll_init=no +ac_cv_lib_m_fabsf=yes +ac_cv_lib_m_modff=yes +ac_cv_lib_user32_PostQuitMessage=no +ac_cv_objext=o +ac_cv_path_BASH=/bin/sh +ac_cv_path_BASH_SHELL=/bin/bash +ac_cv_path_DOCTEXT=false +ac_cv_path_EGREP='/usr/bin/grep -E' +ac_cv_path_FGREP='/usr/bin/grep -F' +ac_cv_path_GREP=/usr/bin/grep +ac_cv_path_NM_G='/usr/bin/nm -g' +ac_cv_path_PERL=/usr/bin/perl +ac_cv_path_SED=/usr/bin/sed +ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config +ac_cv_path_install='/usr/bin/install -c' +ac_cv_path_lt_DD=/usr/bin/dd +ac_cv_path_mkdir=/usr/bin/mkdir +ac_cv_prog_AWK=gawk +ac_cv_prog_CPP='gcc -E' +ac_cv_prog_CXXCPP='g++ -E' +ac_cv_prog_GCOV=gcov +ac_cv_prog_MAKE=make +ac_cv_prog_ac_ct_AR=ar +ac_cv_prog_ac_ct_CC=gcc +ac_cv_prog_ac_ct_CXX=g++ +ac_cv_prog_ac_ct_MANIFEST_TOOL=mt +ac_cv_prog_ac_ct_OBJDUMP=objdump +ac_cv_prog_ac_ct_RANLIB=ranlib +ac_cv_prog_ac_ct_STRIP=strip +ac_cv_prog_cc_c89= +ac_cv_prog_cc_c99= +ac_cv_prog_cc_g=yes +ac_cv_prog_cxx_g=yes +ac_cv_prog_f77_g=yes +ac_cv_prog_f77_v=-v +ac_cv_prog_fc_g=yes +ac_cv_prog_make_make_set=yes +ac_cv_safe_to_define___extensions__=yes +ac_cv_search_gethostbyname='none required' +ac_cv_search_pthread_getthrds_np=no +ac_cv_search_setsockopt='none required' +ac_cv_search_socket='none required' +ac_cv_search_socketpair='none required' +ac_cv_sizeof_Complex=8 +ac_cv_sizeof_DoubleComplex=16 +ac_cv_sizeof_LongDoubleComplex=32 +ac_cv_sizeof_MPII_Bsend_data_t=88 +ac_cv_sizeof_MPI_Offset=8 +ac_cv_sizeof__Bool=1 +ac_cv_sizeof__Float16=0 +ac_cv_sizeof_bool=1 +ac_cv_sizeof_char=1 +ac_cv_sizeof_double=8 +ac_cv_sizeof_double__Complex=16 +ac_cv_sizeof_double_int=16 +ac_cv_sizeof_float=4 +ac_cv_sizeof_float__Complex=8 +ac_cv_sizeof_float_int=8 +ac_cv_sizeof_int=4 +ac_cv_sizeof_long=8 +ac_cv_sizeof_long_double=16 +ac_cv_sizeof_long_double__Complex=32 +ac_cv_sizeof_long_double_int=32 +ac_cv_sizeof_long_int=16 +ac_cv_sizeof_long_long=8 +ac_cv_sizeof_short=2 +ac_cv_sizeof_short_int=8 +ac_cv_sizeof_two_int=8 +ac_cv_sizeof_unsigned_char=1 +ac_cv_sizeof_unsigned_int=4 +ac_cv_sizeof_unsigned_long=8 +ac_cv_sizeof_unsigned_long_long=8 +ac_cv_sizeof_unsigned_short=2 +ac_cv_sizeof_void_p=8 +ac_cv_sizeof_wchar_t=4 +ac_cv_target=x86_64-pc-linux-gnu +ac_cv_type_CACHE_DESCRIPTOR=no +ac_cv_type_CACHE_RELATIONSHIP=no +ac_cv_type_GROUP_AFFINITY=no +ac_cv_type_GROUP_RELATIONSHIP=no +ac_cv_type_KAFFINITY=no +ac_cv_type_LOGICAL_PROCESSOR_RELATIONSHIP=no +ac_cv_type_NUMA_NODE_RELATIONSHIP=no +ac_cv_type_PROCESSOR_CACHE_TYPE=no +ac_cv_type_PROCESSOR_GROUP_INFO=no +ac_cv_type_PROCESSOR_NUMBER=no +ac_cv_type_PROCESSOR_RELATIONSHIP=no +ac_cv_type_PSAPI_WORKING_SET_EX_BLOCK=no +ac_cv_type_PSAPI_WORKING_SET_EX_INFORMATION=no +ac_cv_type_RelationProcessorPackage=no +ac_cv_type_SYSTEM_LOGICAL_PROCESSOR_INFORMATION=no +ac_cv_type_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX=no +ac_cv_type__Bool=yes +ac_cv_type_double__Complex=yes +ac_cv_type_float__Complex=yes +ac_cv_type_long_double__Complex=yes +ac_cv_type_pid_t=yes +ac_cv_type_pthread_t=yes +ac_cv_type_size_t=yes +ac_cv_type_ssize_t=yes +ac_cv_type_struct_random_data=yes +ac_cv_working_alloca_h=yes +am_cv_CC_dependencies_compiler_type=gcc3 +am_cv_CXX_dependencies_compiler_type=gcc3 +am_cv_ar_interface=ar +am_cv_make_support_nested_variables=yes +am_cv_prog_cc_c_o=yes +hwloc_cv___attribute__=1 +hwloc_cv___attribute__aligned=1 +hwloc_cv___attribute__always_inline=1 +hwloc_cv___attribute__cold=1 +hwloc_cv___attribute__const=1 +hwloc_cv___attribute__deprecated=1 +hwloc_cv___attribute__format=1 +hwloc_cv___attribute__hot=1 +hwloc_cv___attribute__malloc=1 +hwloc_cv___attribute__may_alias=1 +hwloc_cv___attribute__no_instrument_function=1 +hwloc_cv___attribute__nonnull=1 +hwloc_cv___attribute__noreturn=1 +hwloc_cv___attribute__packed=1 +hwloc_cv___attribute__pure=1 +hwloc_cv___attribute__sentinel=1 +hwloc_cv___attribute__unused=1 +hwloc_cv___attribute__warn_unused_result=1 +hwloc_cv___attribute__weak_alias=1 +hwloc_cv_c_compiler_vendor=gnu +lac_cv_header_net_if_h=yes +lt_cv_ar_at_file=@ +lt_cv_archive_cmds_need_lc=no +lt_cv_deplibs_check_method=pass_all +lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_ld_reload_flag=-r +lt_cv_nm_interface='BSD nm' +lt_cv_objdir=.libs +lt_cv_path_LD=/usr/x86_64-suse-linux/bin/ld +lt_cv_path_LDCXX='/usr/x86_64-suse-linux/bin/ld -m elf_x86_64' +lt_cv_path_NM='/usr/bin/nm -B' +lt_cv_path_mainfest_tool=no +lt_cv_prog_compiler_c_o=yes +lt_cv_prog_compiler_c_o_CXX=yes +lt_cv_prog_compiler_c_o_F77=yes +lt_cv_prog_compiler_c_o_FC=yes +lt_cv_prog_compiler_pic='-fPIC -DPIC' +lt_cv_prog_compiler_pic_CXX='-fPIC -DPIC' +lt_cv_prog_compiler_pic_F77=-fPIC +lt_cv_prog_compiler_pic_FC=-fPIC +lt_cv_prog_compiler_pic_works=yes +lt_cv_prog_compiler_pic_works_CXX=yes +lt_cv_prog_compiler_pic_works_F77=yes +lt_cv_prog_compiler_pic_works_FC=yes +lt_cv_prog_compiler_rtti_exceptions=no +lt_cv_prog_compiler_static_works=no +lt_cv_prog_compiler_static_works_CXX=no +lt_cv_prog_compiler_static_works_F77=no +lt_cv_prog_compiler_static_works_FC=no +lt_cv_prog_gnu_ld=yes +lt_cv_prog_gnu_ldcxx=yes +lt_cv_sharedlib_from_linklib_cmd='printf %s\n' +lt_cv_shlibpath_overrides_runpath=yes +lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\''' +lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\''' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\''' +lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' +lt_cv_sys_global_symbol_to_import= +lt_cv_sys_max_cmd_len=1572864 +lt_cv_to_host_file_cmd=func_convert_file_noop +lt_cv_to_tool_file_cmd=func_convert_file_noop +lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1' +pac_cv_attr_weak=yes +pac_cv_attr_weak_alias=yes +pac_cv_attr_weak_import=yes +pac_cv_c_double_alignment_exception=no +pac_cv_c_double_pos_align=no +pac_cv_c_fp_align_nr=16 +pac_cv_c_llint_pos_align=no +pac_cv_c_max_double_fp_align=eight +pac_cv_c_max_fp_align=sixteen +pac_cv_c_max_integer_align=eight +pac_cv_c_max_longdouble_fp_align=sixteen +pac_cv_c_struct_align_nr=8 +pac_cv_cc_has___func__=yes +pac_cv_cpu_set_defined=yes +pac_cv_cxx_builds_exe=yes +pac_cv_cxx_compiles_string=yes +pac_cv_cxx_has_iostream=yes +pac_cv_cxx_has_math=no +pac_cv_f77_accepts_F=yes +pac_cv_f77_flibs_valid=unknown +pac_cv_f77_sizeof_double_precision=8 +pac_cv_f77_sizeof_integer=4 +pac_cv_f77_sizeof_real=4 +pac_cv_fc_accepts_F90=yes +pac_cv_fc_and_f77=yes +pac_cv_fc_module_case=lower +pac_cv_fc_module_ext=mod +pac_cv_fc_module_incflag=-I +pac_cv_fc_module_outflag=-J +pac_cv_fdzero_works=yes +pac_cv_fort90_real8=yes +pac_cv_fort_integer16=yes +pac_cv_fort_integer1=yes +pac_cv_fort_integer2=yes +pac_cv_fort_integer4=yes +pac_cv_fort_integer8=yes +pac_cv_fort_real16=yes +pac_cv_fort_real4=yes +pac_cv_fort_real8=yes +pac_cv_func_decl_gethostname=no +pac_cv_func_decl_getsid=no +pac_cv_func_decl_mkstemp=no +pac_cv_func_decl_putenv=no +pac_cv_func_decl_snprintf=no +pac_cv_func_decl_strdup=no +pac_cv_func_decl_strerror_r=no +pac_cv_func_decl_strsignal=no +pac_cv_func_decl_vsnprintf=no +pac_cv_func_va_copy=yes +pac_cv_gnu_attr_format=yes +pac_cv_gnu_attr_pure=yes +pac_cv_has_environ_in_unistd=yes +pac_cv_has_extern_environ=yes +pac_cv_has_struct_iovec=yes +pac_cv_have__func__=yes +pac_cv_have__function__=yes +pac_cv_have_cap__func__=no +pac_cv_have_cpu_set_t=yes +pac_cv_have_float16=no +pac_cv_have_haddr_list=yes +pac_cv_have_long_double=yes +pac_cv_have_long_long=yes +pac_cv_have_socklen_t=yes +pac_cv_have_struct_ifconf=yes +pac_cv_have_struct_ifreq=yes +pac_cv_int32_t_alignment=no +pac_cv_int64_t_alignment=no +pac_cv_mkdir_p=yes +pac_cv_my_conf_dir=/home/brian/daos/rpm/mpich +pac_cv_needs_bin_in_path=yes +pac_cv_prog_c_multiple_weak_symbols=yes +pac_cv_prog_c_unaligned_doubles=yes +pac_cv_prog_c_weak_symbols='pragma weak' +pac_cv_prog_f77_and_c_stdio_libs=none +pac_cv_prog_f77_exclaim_comments=yes +pac_cv_prog_f77_has_incdir=-I +pac_cv_prog_f77_library_dir_flag=-L +pac_cv_prog_f77_mismatched_args=yes +pac_cv_prog_f77_mismatched_args_parm= +pac_cv_prog_f77_name_mangle='lower uscore' +pac_cv_prog_f77_true_false_value='1 0' +pac_cv_prog_fc_and_c_stdio_libs=none +pac_cv_prog_fc_cross=no +pac_cv_prog_fc_int_kind_16=8 +pac_cv_prog_fc_int_kind_8=4 +pac_cv_prog_fc_works=yes +pac_cv_prog_make_allows_comments=yes +pac_cv_prog_make_found_clock_skew=no +pac_cv_prog_make_include=yes +pac_cv_prog_make_set_cflags=yes +pac_cv_prog_make_vpath=VPATH +pac_cv_sizeof_mpi_status=20 +pac_cv_struct_sigaction=yes +pac_cv_struct_sigaction_with_sa_handler=yes + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ABIVERSION='0:0:0' +ABIVERSIONFLAGS='-version-info $(ABIVERSION)' +ACLOCAL='${SHELL} /home/brian/daos/rpm/mpich/confdb/missing aclocal-1.15' +ADDRESS_KIND='8' +ALLOCA='' +AMDEPBACKSLASH='\' +AMDEP_FALSE='#' +AMDEP_TRUE='' +AMTAR='$${TAR-tar}' +AM_BACKSLASH='\' +AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +AM_DEFAULT_VERBOSITY='1' +AM_V='$(V)' +AR='ar' +AS='as' +AUTOCONF='${SHELL} /home/brian/daos/rpm/mpich/confdb/missing autoconf' +AUTOHEADER='${SHELL} /home/brian/daos/rpm/mpich/confdb/missing autoheader' +AUTOMAKE='${SHELL} /home/brian/daos/rpm/mpich/confdb/missing automake-1.15' +AWK='gawk' +BASH='/bin/sh' +BASH_SHELL='/bin/bash' +BSEND_OVERHEAD='88' +BUILD_BASH_SCRIPTS_FALSE='#' +BUILD_BASH_SCRIPTS_TRUE='' +BUILD_CH3_FALSE='#' +BUILD_CH3_NEMESIS_FALSE='#' +BUILD_CH3_NEMESIS_TRUE='' +BUILD_CH3_SOCK_FALSE='' +BUILD_CH3_SOCK_TRUE='#' +BUILD_CH3_TRUE='' +BUILD_CH3_UTIL_SOCK_FALSE='' +BUILD_CH3_UTIL_SOCK_TRUE='#' +BUILD_CH4_COLL_TUNING_FALSE='' +BUILD_CH4_COLL_TUNING_TRUE='#' +BUILD_CH4_FALSE='' +BUILD_CH4_NETMOD_OFI_FALSE='' +BUILD_CH4_NETMOD_OFI_TRUE='#' +BUILD_CH4_NETMOD_STUBNM_FALSE='' +BUILD_CH4_NETMOD_STUBNM_TRUE='#' +BUILD_CH4_NETMOD_UCX_FALSE='' +BUILD_CH4_NETMOD_UCX_TRUE='#' +BUILD_CH4_SHM_FALSE='' +BUILD_CH4_SHM_POSIX_EAGER_FBOX_FALSE='' +BUILD_CH4_SHM_POSIX_EAGER_FBOX_TRUE='#' +BUILD_CH4_SHM_POSIX_EAGER_IQUEUE_FALSE='' +BUILD_CH4_SHM_POSIX_EAGER_IQUEUE_TRUE='#' +BUILD_CH4_SHM_POSIX_EAGER_STUB_FALSE='' +BUILD_CH4_SHM_POSIX_EAGER_STUB_TRUE='#' +BUILD_CH4_SHM_TRUE='#' +BUILD_CH4_TRUE='#' +BUILD_COVERAGE_FALSE='' +BUILD_COVERAGE_TRUE='#' +BUILD_CXX_BINDING_FALSE='#' +BUILD_CXX_BINDING_TRUE='' +BUILD_DATALOOP_ENGINE_FALSE='#' +BUILD_DATALOOP_ENGINE_TRUE='' +BUILD_DEBUGGER_DLL_FALSE='' +BUILD_DEBUGGER_DLL_TRUE='#' +BUILD_F08_BINDING_FALSE='' +BUILD_F08_BINDING_TRUE='#' +BUILD_F77_BINDING_FALSE='#' +BUILD_F77_BINDING_TRUE='' +BUILD_FC_BINDING_FALSE='#' +BUILD_FC_BINDING_TRUE='' +BUILD_HCOLL_FALSE='' +BUILD_HCOLL_TRUE='#' +BUILD_MPID_COMMON_BC_FALSE='' +BUILD_MPID_COMMON_BC_TRUE='#' +BUILD_MPID_COMMON_SCHED_FALSE='#' +BUILD_MPID_COMMON_SCHED_TRUE='' +BUILD_MPID_COMMON_SHM_FALSE='#' +BUILD_MPID_COMMON_SHM_TRUE='' +BUILD_MPID_COMMON_THREAD_FALSE='#' +BUILD_MPID_COMMON_THREAD_TRUE='' +BUILD_MPITOOLS_FALSE='' +BUILD_MPITOOLS_TRUE='#' +BUILD_NAMEPUB_FILE_FALSE='' +BUILD_NAMEPUB_FILE_TRUE='#' +BUILD_NAMEPUB_PMI_FALSE='#' +BUILD_NAMEPUB_PMI_TRUE='' +BUILD_NEMESIS_NETMOD_OFI_FALSE='' +BUILD_NEMESIS_NETMOD_OFI_TRUE='#' +BUILD_NEMESIS_NETMOD_TCP_FALSE='#' +BUILD_NEMESIS_NETMOD_TCP_TRUE='' +BUILD_NETLOCSCOTCH_FALSE='' +BUILD_NETLOCSCOTCH_TRUE='#' +BUILD_NETLOC_FALSE='' +BUILD_NETLOC_TRUE='#' +BUILD_PMI_BGQ_FALSE='' +BUILD_PMI_BGQ_TRUE='#' +BUILD_PMI_CRAY_FALSE='' +BUILD_PMI_CRAY_TRUE='#' +BUILD_PMI_PMI2_FALSE='' +BUILD_PMI_PMI2_SIMPLE_FALSE='' +BUILD_PMI_PMI2_SIMPLE_TRUE='#' +BUILD_PMI_PMI2_TRUE='#' +BUILD_PMI_SIMPLE_FALSE='#' +BUILD_PMI_SIMPLE_TRUE='' +BUILD_PMI_SLURM_FALSE='' +BUILD_PMI_SLURM_TRUE='#' +BUILD_PM_GFORKER_FALSE='#' +BUILD_PM_GFORKER_TRUE='' +BUILD_PM_HYDRA2_FALSE='' +BUILD_PM_HYDRA2_TRUE='#' +BUILD_PM_HYDRA_FALSE='#' +BUILD_PM_HYDRA_TRUE='' +BUILD_PM_REMSHELL_FALSE='' +BUILD_PM_REMSHELL_TRUE='#' +BUILD_PM_UTIL_FALSE='#' +BUILD_PM_UTIL_TRUE='' +BUILD_PROFILING_LIB_FALSE='' +BUILD_PROFILING_LIB_TRUE='#' +BUILD_ROMIO_FALSE='#' +BUILD_ROMIO_TRUE='' +BUILD_SHM_POSIX_FALSE='' +BUILD_SHM_POSIX_TRUE='#' +BUILD_SHM_STUBSHM_FALSE='' +BUILD_SHM_STUBSHM_TRUE='#' +BUILD_SHM_XPMEM_FALSE='' +BUILD_SHM_XPMEM_TRUE='#' +BUILD_TYPEREP_DATALOOP_FALSE='#' +BUILD_TYPEREP_DATALOOP_TRUE='' +BUILD_YAKSA_ENGINE_FALSE='' +BUILD_YAKSA_ENGINE_TRUE='#' +CC='gcc' +CCDEPMODE='depmode=gcc3' +CFLAGS='-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' +CMB_1INT_ALIGNMENT='__attribute__((aligned(16)))' +CMB_STATUS_ALIGNMENT='__attribute__((aligned(32)))' +CONFIGURE_ARGS_CLEAN='--prefix=/home/brian/mpich-install/ --enable-sharedlibs=gcc --enable-shared --enable-static=no --enable-lib-depend --disable-rpath --disable-silent-rules --enable-fc --with-device=ch3:nemesis --with-pm=hydra:gforker --with-hwloc-prefix=embedded --enable-fortran=all --enable-romio --with-file-system=ufs+daos --with-daos=/usr --with-cart=/usr --disable-checkerrors --disable-perftest --disable-large-tests --disable-ft-tests --disable-comm-overlap-tests --enable-threads=single FC=gfortran F77=gfortran CFLAGS=-m64 -O2 -fPIC CXXFLAGS=-m64 -O2 -fPIC FCFLAGS=-m64 -O2 -fPIC FFLAGS=-m64 -O2 -fPIC LDFLAGS=-Wl,-z,noexecstack MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +CONFIGURE_ARGUMENTS=' '\''--prefix=/home/brian/mpich-install/'\'' '\''--enable-sharedlibs=gcc'\'' '\''--enable-shared'\'' '\''--enable-static=no'\'' '\''--enable-lib-depend'\'' '\''--disable-rpath'\'' '\''--disable-silent-rules'\'' '\''--enable-fc'\'' '\''--with-device=ch3:nemesis'\'' '\''--with-pm=hydra:gforker'\'' '\''--with-hwloc-prefix=embedded'\'' '\''--enable-fortran=all'\'' '\''--enable-romio'\'' '\''--with-file-system=ufs+daos'\'' '\''--with-daos=/usr'\'' '\''--with-cart=/usr'\'' '\''--disable-checkerrors'\'' '\''--disable-perftest'\'' '\''--disable-large-tests'\'' '\''--disable-ft-tests'\'' '\''--disable-comm-overlap-tests'\'' '\''--enable-threads=single'\'' '\''FC=gfortran'\'' '\''F77=gfortran'\'' '\''CFLAGS=-m64 -O2 -fPIC'\'' '\''CXXFLAGS=-m64 -O2 -fPIC'\'' '\''FCFLAGS=-m64 -O2 -fPIC'\'' '\''FFLAGS=-m64 -O2 -fPIC'\'' '\''LDFLAGS=-Wl,-z,noexecstack'\'' '\''MPICHLIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'\'' '\''MPICHLIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'\'' '\''MPICHLIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'\'' '\''MPICHLIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'\''' +COUNT_KIND='8' +CPP='gcc -E' +CPPFLAGS=' -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/mpl/include -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/src/openpa/src -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/yaksa/src/frontend/include -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/modules/json-c -I/home/brian/daos/rpm/mpich/src/mpi/romio/include' +CXX='g++' +CXXCPP='g++ -E' +CXXDEPMODE='depmode=gcc3' +CXXFLAGS='-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' +CYGPATH_W='echo' +C_LINKPATH_SHL='' +DEFS='-DHAVE_CONFIG_H' +DEPDIR='.deps' +DEVICE='ch3:nemesis' +DISABLE_TAG_SUPPORT='#define NO_TAGS_WITH_MODIFIERS 1' +DLLIMPORT='' +DLLTOOL='false' +DOCTEXT='false' +DSYMUTIL='' +DUMPBIN='' +ECHO_C='' +ECHO_N='-n' +ECHO_T='' +EGREP='/usr/bin/grep -E' +EXEEXT='' +F08_2INT='' +F08_AINT='' +F08_BYTE='' +F08_CHAR='' +F08_COMPLEX16='' +F08_COMPLEX32='' +F08_COMPLEX8='' +F08_COUNT='' +F08_CXX_BOOL='' +F08_CXX_DOUBLE_COMPLEX='' +F08_CXX_FLOAT_COMPLEX='' +F08_CXX_LONG_DOUBLE_COMPLEX='' +F08_C_AINT='' +F08_C_BOOL='' +F08_C_COMPLEX='' +F08_C_COUNT='' +F08_C_DOUBLE_COMPLEX='' +F08_C_FLOAT_COMPLEX='' +F08_C_LONG_DOUBLE_COMPLEX='' +F08_C_OFFSET='' +F08_DOUBLE='' +F08_DOUBLE_INT='' +F08_FLOAT='' +F08_FLOAT_INT='' +F08_INT16_T='' +F08_INT32_T='' +F08_INT64_T='' +F08_INT8_T='' +F08_INT='' +F08_INTEGER16='' +F08_INTEGER1='' +F08_INTEGER2='' +F08_INTEGER4='' +F08_INTEGER8='' +F08_LB='' +F08_LONG='' +F08_LONG_DOUBLE='' +F08_LONG_DOUBLE_INT='' +F08_LONG_INT='' +F08_LONG_LONG='' +F08_LONG_LONG_INT='' +F08_OFFSET='' +F08_PACKED='' +F08_REAL16='' +F08_REAL4='' +F08_REAL8='' +F08_SHORT='' +F08_SHORT_INT='' +F08_SIGNED_CHAR='' +F08_UB='' +F08_UINT16_T='' +F08_UINT32_T='' +F08_UINT64_T='' +F08_UINT8_T='' +F08_UNSIGNED='' +F08_UNSIGNED_CHAR='' +F08_UNSIGNED_INT='' +F08_UNSIGNED_LONG='' +F08_UNSIGNED_LONG_LONG='' +F08_UNSIGNED_SHORT='' +F08_WCHAR='' +F77='gfortran' +F77CPP='' +F77_COMPLEX16='1275072554' +F77_COMPLEX32='1275076652' +F77_COMPLEX8='1275070504' +F77_INCDIR='-I' +F77_INTEGER16='MPI_DATATYPE_NULL' +F77_INTEGER1='1275068717' +F77_INTEGER2='1275068975' +F77_INTEGER4='1275069488' +F77_INTEGER8='1275070513' +F77_LIBDIR_LEADER='-L' +F77_NAME_MANGLE='F77_NAME_LOWER_USCORE' +F77_OTHER_LIBS='' +F77_REAL16='1275072555' +F77_REAL4='1275069479' +F77_REAL8='1275070505' +FC='gfortran' +FCCPP='' +FCEXT='f90' +FCFLAGS='-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' +FCINC='-I' +FCINCFLAG='-I' +FCMODEXT='mod' +FCMODINCFLAG='-I' +FCMODINCSPEC='' +FCMODOUTFLAG='-J' +FC_ALL_INTEGER_MODELS=' 2 , 1, 4 , 2, 9 , 4, 18 , 8,' +FC_DOUBLE_MODEL=' 15 , 307' +FC_INTEGER_MODEL=' 9' +FC_INTEGER_MODEL_MAP=' { 2 , 1 , 1 }, { 4 , 2 , 2 }, { 9 , 4 , 4 }, { 18 , 8 , 8 },' +FC_OTHER_LIBS='' +FC_REAL_MODEL=' 6 , 37' +FC_WORK_FILES_ARG='' +FFLAGS='-m64 -O2 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2' +FGREP='/usr/bin/grep -F' +FILE='' +FLIBS=' -L/usr/lib64/gcc/x86_64-suse-linux/7 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. -lgfortran -lm -lquadmath' +FORTRAN_BINDING='1' +FORTRAN_MPI_OFFSET='integer*8' +FOUND_XZ_FALSE='' +FOUND_XZ_TRUE='#' +GCOV='gcov' +GNUCXX_MINORVERSION='5' +GNUCXX_VERSION='7' +GNULIB_ATOLL='0' +GNULIB_CALLOC_POSIX='0' +GNULIB_CANONICALIZE_FILE_NAME='0' +GNULIB_GETLOADAVG='0' +GNULIB_GETSUBOPT='0' +GNULIB_GRANTPT='0' +GNULIB_MALLOC_POSIX='0' +GNULIB_MBTOWC='0' +GNULIB_MKDTEMP='0' +GNULIB_MKOSTEMP='0' +GNULIB_MKOSTEMPS='0' +GNULIB_MKSTEMP='0' +GNULIB_MKSTEMPS='0' +GNULIB_POSIX_OPENPT='0' +GNULIB_PTSNAME='0' +GNULIB_PTSNAME_R='0' +GNULIB_PUTENV='0' +GNULIB_QSORT_R='0' +GNULIB_RANDOM='0' +GNULIB_RANDOM_R='0' +GNULIB_REALLOC_POSIX='0' +GNULIB_REALPATH='0' +GNULIB_RPMATCH='0' +GNULIB_SECURE_GETENV='0' +GNULIB_SETENV='0' +GNULIB_STRTOD='0' +GNULIB_STRTOLL='0' +GNULIB_STRTOULL='0' +GNULIB_SYSTEM_POSIX='0' +GNULIB_UNLOCKPT='0' +GNULIB_UNSETENV='0' +GNULIB_WCTOMB='0' +GNULIB__EXIT='0' +GREP='/usr/bin/grep' +HAVE_ATOLL='1' +HAVE_CANONICALIZE_FILE_NAME='1' +HAVE_CXX_EXCEPTIONS='1' +HAVE_DECL_GETLOADAVG='1' +HAVE_DECL_SETENV='1' +HAVE_DECL_UNSETENV='1' +HAVE_ERROR_CHECKING='1' +HAVE_GETSUBOPT='1' +HAVE_GRANTPT='1' +HAVE_MKDTEMP='1' +HAVE_MKOSTEMP='1' +HAVE_MKOSTEMPS='1' +HAVE_MKSTEMP='1' +HAVE_MKSTEMPS='1' +HAVE_POSIX_OPENPT='1' +HAVE_PTSNAME='1' +HAVE_PTSNAME_R='1' +HAVE_RANDOM='1' +HAVE_RANDOM_H='0' +HAVE_RANDOM_R='1' +HAVE_REALPATH='1' +HAVE_ROMIO='#include "mpio.h"' +HAVE_RPMATCH='1' +HAVE_SECURE_GETENV='1' +HAVE_SETENV='1' +HAVE_STRTOD='1' +HAVE_STRTOLL='1' +HAVE_STRTOULL='1' +HAVE_STRUCT_RANDOM_DATA='1' +HAVE_SYS_LOADAVG_H='0' +HAVE_UNLOCKPT='1' +HAVE__EXIT='1' +HWLOC_BUILD_DOXYGEN_FALSE='' +HWLOC_BUILD_DOXYGEN_TRUE='#' +HWLOC_BUILD_README_FALSE='' +HWLOC_BUILD_README_TRUE='#' +HWLOC_BUILD_STANDALONE_FALSE='' +HWLOC_BUILD_STANDALONE_TRUE='#' +HWLOC_CFLAGS='-fvisibility=hidden -I/usr/include/libxml2' +HWLOC_CPPFLAGS='-I$(HWLOC_top_builddir)/include -I$(HWLOC_top_srcdir)/include' +HWLOC_CUDA_BUILD_STATIC_FALSE='' +HWLOC_CUDA_BUILD_STATIC_TRUE='#' +HWLOC_CUDA_LIBS='' +HWLOC_EMBEDDED_CFLAGS=' -I/usr/include/libxml2' +HWLOC_EMBEDDED_CPPFLAGS='-I$(HWLOC_top_builddir)/include -I$(HWLOC_top_srcdir)/include' +HWLOC_EMBEDDED_LDADD='$(HWLOC_top_builddir)/hwloc/libhwloc_embedded.la' +HWLOC_EMBEDDED_LDFLAGS='' +HWLOC_EMBEDDED_LIBS='-lm -lpciaccess -lxml2' +HWLOC_GL_BUILD_STATIC_FALSE='' +HWLOC_GL_BUILD_STATIC_TRUE='#' +HWLOC_GL_LIBS='' +HWLOC_HAVE_AIX_FALSE='' +HWLOC_HAVE_AIX_TRUE='#' +HWLOC_HAVE_BGQ_FALSE='' +HWLOC_HAVE_BGQ_TRUE='#' +HWLOC_HAVE_BUNZIPP_FALSE='#' +HWLOC_HAVE_BUNZIPP_TRUE='' +HWLOC_HAVE_CAIRO_FALSE='' +HWLOC_HAVE_CAIRO_TRUE='#' +HWLOC_HAVE_CUDART_FALSE='' +HWLOC_HAVE_CUDART_TRUE='#' +HWLOC_HAVE_CUDA_FALSE='' +HWLOC_HAVE_CUDA_TRUE='#' +HWLOC_HAVE_CXX_FALSE='' +HWLOC_HAVE_CXX_TRUE='#' +HWLOC_HAVE_DARWIN_FALSE='' +HWLOC_HAVE_DARWIN_TRUE='#' +HWLOC_HAVE_FREEBSD_FALSE='' +HWLOC_HAVE_FREEBSD_TRUE='#' +HWLOC_HAVE_GCC_FALSE='#' +HWLOC_HAVE_GCC_TRUE='' +HWLOC_HAVE_GL_FALSE='' +HWLOC_HAVE_GL_TRUE='#' +HWLOC_HAVE_HPUX_FALSE='' +HWLOC_HAVE_HPUX_TRUE='#' +HWLOC_HAVE_IRIX_FALSE='' +HWLOC_HAVE_IRIX_TRUE='#' +HWLOC_HAVE_LIBIBVERBS_FALSE='' +HWLOC_HAVE_LIBIBVERBS_TRUE='#' +HWLOC_HAVE_LIBXML2='1' +HWLOC_HAVE_LIBXML2_FALSE='#' +HWLOC_HAVE_LIBXML2_TRUE='' +HWLOC_HAVE_LINUX_FALSE='#' +HWLOC_HAVE_LINUX_LIBNUMA_FALSE='' +HWLOC_HAVE_LINUX_LIBNUMA_TRUE='#' +HWLOC_HAVE_LINUX_TRUE='' +HWLOC_HAVE_MINGW32_FALSE='' +HWLOC_HAVE_MINGW32_TRUE='#' +HWLOC_HAVE_MS_LIB_FALSE='' +HWLOC_HAVE_MS_LIB_TRUE='#' +HWLOC_HAVE_NETBSD_FALSE='' +HWLOC_HAVE_NETBSD_TRUE='#' +HWLOC_HAVE_NVML='0' +HWLOC_HAVE_NVML_FALSE='' +HWLOC_HAVE_NVML_TRUE='#' +HWLOC_HAVE_OPENAT_FALSE='#' +HWLOC_HAVE_OPENAT_TRUE='' +HWLOC_HAVE_OPENCL='0' +HWLOC_HAVE_OPENCL_FALSE='' +HWLOC_HAVE_OPENCL_TRUE='#' +HWLOC_HAVE_PCIACCESS_FALSE='#' +HWLOC_HAVE_PCIACCESS_TRUE='' +HWLOC_HAVE_PLUGINS_FALSE='' +HWLOC_HAVE_PLUGINS_TRUE='#' +HWLOC_HAVE_PTHREAD_FALSE='' +HWLOC_HAVE_PTHREAD_TRUE='#' +HWLOC_HAVE_SCHED_SETAFFINITY_FALSE='#' +HWLOC_HAVE_SCHED_SETAFFINITY_TRUE='' +HWLOC_HAVE_SOLARIS_FALSE='' +HWLOC_HAVE_SOLARIS_TRUE='#' +HWLOC_HAVE_USER32_FALSE='' +HWLOC_HAVE_USER32_TRUE='#' +HWLOC_HAVE_WINDOWS_FALSE='' +HWLOC_HAVE_WINDOWS_TRUE='#' +HWLOC_HAVE_X86_32_FALSE='' +HWLOC_HAVE_X86_32_TRUE='#' +HWLOC_HAVE_X86_64_FALSE='#' +HWLOC_HAVE_X86_64_TRUE='' +HWLOC_HAVE_X86_CPUID_FALSE='#' +HWLOC_HAVE_X86_CPUID_TRUE='' +HWLOC_HAVE_X86_FALSE='#' +HWLOC_HAVE_X86_TRUE='' +HWLOC_INSTALL_DOXYGEN_FALSE='' +HWLOC_INSTALL_DOXYGEN_TRUE='#' +HWLOC_LDFLAGS='' +HWLOC_LIBS='' +HWLOC_LIBS_PRIVATE=' -lpthread' +HWLOC_LIBXML2_CFLAGS='-I/usr/include/libxml2' +HWLOC_LIBXML2_LIBS='-lxml2' +HWLOC_MS_LIB='' +HWLOC_MS_LIB_ARCH='X64' +HWLOC_NVML_BUILD_STATIC_FALSE='' +HWLOC_NVML_BUILD_STATIC_TRUE='#' +HWLOC_NVML_LIBS='' +HWLOC_OPENCL_BUILD_STATIC_FALSE='' +HWLOC_OPENCL_BUILD_STATIC_TRUE='#' +HWLOC_OPENCL_CFLAGS='' +HWLOC_OPENCL_LDFLAGS='' +HWLOC_OPENCL_LIBS='' +HWLOC_PCIACCESS_CFLAGS='' +HWLOC_PCIACCESS_LIBS='-lpciaccess' +HWLOC_PCI_BUILD_STATIC_FALSE='#' +HWLOC_PCI_BUILD_STATIC_TRUE='' +HWLOC_PLUGINS_DIR='$(libdir)/hwloc' +HWLOC_PLUGINS_PATH='$(libdir)/hwloc' +HWLOC_RELEASE_DATE='Unreleased developer copy' +HWLOC_REQUIRES='libxml-2.0 pciaccess ' +HWLOC_VERSION='2.0.3rc2-git' +HWLOC_X11_CPPFLAGS='' +HWLOC_X11_LIBS='' +HWLOC_XML_LIBXML_BUILD_STATIC_FALSE='#' +HWLOC_XML_LIBXML_BUILD_STATIC_TRUE='' +HWLOC_top_builddir='/home/brian/daos/rpm/mpich/src/hwloc' +HWLOC_top_srcdir='/home/brian/daos/rpm/mpich/src/hwloc' +INCLUDE_MPICXX_H='#include "mpicxx.h"' +INSTALL_DATA='${INSTALL} -m 644' +INSTALL_MPIF77_FALSE='' +INSTALL_MPIF77_TRUE='#' +INSTALL_PROGRAM='${INSTALL}' +INSTALL_SCRIPT='${INSTALL}' +INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' +INTEGER_KIND='4' +INTERLIB_DEPS='yes' +KILLALL='true' +LD='/usr/x86_64-suse-linux/bin/ld -m elf_x86_64' +LDFLAGS='-Wl,-z,noexecstack' +LIBOBJS='' +LIBS='' +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +LIPO='' +LN_S='ln -s' +LPMPILIBNAME='' +LTLIBOBJS='' +LT_SYS_LIBRARY_PATH='' +MAINT='' +MAINTAINER_MODE_FALSE='#' +MAINTAINER_MODE_TRUE='' +MAKE='make' +MAKEINFO='${SHELL} /home/brian/daos/rpm/mpich/confdb/missing makeinfo' +MANIFEST_TOOL=':' +MKDIR_P='mkdir -p' +MPIBASEMODNAME='mpi_base' +MPICC_NAME='mpicc' +MPICHLIB_CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +MPICHLIB_CPPFLAGS='' +MPICHLIB_CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +MPICHLIB_FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +MPICHLIB_FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' +MPICH_CUSTOM_STRING='' +MPICH_MPICC_CFLAGS='' +MPICH_MPICC_CPPFLAGS='' +MPICH_MPICC_LDFLAGS='' +MPICH_MPICC_LIBS='' +MPICH_MPICXX_CPPFLAGS='' +MPICH_MPICXX_CXXFLAGS='' +MPICH_MPICXX_LDFLAGS='' +MPICH_MPICXX_LIBS='' +MPICH_MPIF77_CPPFLAGS='' +MPICH_MPIF77_FFLAGS='' +MPICH_MPIF77_LDFLAGS='' +MPICH_MPIF77_LIBS='' +MPICH_MPIFORT_CPPFLAGS='' +MPICH_MPIFORT_FCFLAGS='' +MPICH_MPIFORT_LDFLAGS='' +MPICH_MPIFORT_LIBS='' +MPICH_NUMVERSION='30400002' +MPICH_RELEASE_DATE='unreleased development copy' +MPICH_VERSION='3.4a2' +MPICONSTMODNAME='mpi_constants' +MPICPP_NAME='mpic++' +MPICXXLIBNAME='mpicxx' +MPICXX_NAME='mpicxx' +MPIF77_NAME='mpif77' +MPIF90_NAME='mpif90' +MPIFCLIBNAME='mpifort' +MPIFORT_NAME='mpifort' +MPIFPMPI=',PMPI_WTIME,PMPI_WTICK' +MPILIBNAME='mpi' +MPIMODNAME='mpi' +MPIR_CXX_BOOL='0x4c000133' +MPIR_CXX_COMPLEX='0x4c000834' +MPIR_CXX_DOUBLE_COMPLEX='0x4c001035' +MPIR_CXX_LONG_DOUBLE_COMPLEX='0x4c002036' +MPISIZEOFMODNAME='mpi_sizeofs' +MPIU_DLL_SPEC_DEF='#define MPIU_DLL_SPEC' +MPIX_C_FLOAT16='0x4c000246' +MPI_2DOUBLE_PRECISION='1275072547' +MPI_2INT='0x4c000816' +MPI_2INTEGER='1275070496' +MPI_2REAL='1275070497' +MPI_AINT='long' +MPI_AINT_DATATYPE='0x4c000843' +MPI_AINT_FMT_DEC_SPEC='%ld' +MPI_AINT_FMT_HEX_SPEC='%lx' +MPI_BYTE='0x4c00010d' +MPI_CHAR='0x4c000101' +MPI_CHARACTER='1275068698' +MPI_COMPLEX16='0x4c00102a' +MPI_COMPLEX32='0x4c00202c' +MPI_COMPLEX8='0x4c000828' +MPI_COMPLEX='1275070494' +MPI_COUNT='long long' +MPI_COUNT_DATATYPE='0x4c000845' +MPI_C_BOOL='0x4c00013f' +MPI_C_DOUBLE_COMPLEX='0x4c001041' +MPI_C_FLOAT_COMPLEX='0x4c000840' +MPI_C_INTERFACE_CDESC_NAME='mpi_c_interface_cdesc' +MPI_C_INTERFACE_GLUE_NAME='mpi_c_interface_glue' +MPI_C_INTERFACE_NAME='mpi_c_interface' +MPI_C_INTERFACE_NOBUF_NAME='mpi_c_interface_nobuf' +MPI_C_INTERFACE_TYPES_NAME='mpi_c_interface_types' +MPI_C_LONG_DOUBLE_COMPLEX='0x4c002042' +MPI_DOUBLE='0x4c00080b' +MPI_DOUBLE_COMPLEX='1275072546' +MPI_DOUBLE_INT='0x8c000001' +MPI_DOUBLE_PRECISION='1275070495' +MPI_F08_CALLBACKS_NAME='mpi_f08_callbacks' +MPI_F08_COMPILE_CONSTANTS_NAME='mpi_f08_compile_constants' +MPI_F08_LINK_CONSTANTS_NAME='mpi_f08_link_constants' +MPI_F08_NAME='mpi_f08' +MPI_F08_TYPES_NAME='mpi_f08_types' +MPI_F77_2INT='1275070486' +MPI_F77_AINT='1275070531' +MPI_F77_BYTE='1275068685' +MPI_F77_CHAR='1275068673' +MPI_F77_COUNT='1275070533' +MPI_F77_CXX_BOOL='1275068723' +MPI_F77_CXX_DOUBLE_COMPLEX='1275072565' +MPI_F77_CXX_FLOAT_COMPLEX='1275070516' +MPI_F77_CXX_LONG_DOUBLE_COMPLEX='1275076662' +MPI_F77_C_BOOL='1275068735' +MPI_F77_C_COMPLEX='1275070528' +MPI_F77_C_DOUBLE_COMPLEX='1275072577' +MPI_F77_C_FLOAT_COMPLEX='1275070528' +MPI_F77_C_LONG_DOUBLE_COMPLEX='1275076674' +MPI_F77_DOUBLE='1275070475' +MPI_F77_DOUBLE_INT='-1946157055' +MPI_F77_FLOAT='1275069450' +MPI_F77_FLOAT_INT='-1946157056' +MPI_F77_INT16_T='1275068984' +MPI_F77_INT32_T='1275069497' +MPI_F77_INT64_T='1275070522' +MPI_F77_INT8_T='1275068727' +MPI_F77_INT='1275069445' +MPI_F77_LB='1275068432' +MPI_F77_LONG='1275070471' +MPI_F77_LONG_DOUBLE='1275072524' +MPI_F77_LONG_DOUBLE_INT='-1946157052' +MPI_F77_LONG_INT='-1946157054' +MPI_F77_LONG_LONG='1275070473' +MPI_F77_LONG_LONG_INT='1275070473' +MPI_F77_OFFSET='1275070532' +MPI_F77_PACKED='1275068687' +MPI_F77_SHORT='1275068931' +MPI_F77_SHORT_INT='-1946157053' +MPI_F77_SIGNED_CHAR='1275068696' +MPI_F77_UB='1275068433' +MPI_F77_UINT16_T='1275068988' +MPI_F77_UINT32_T='1275069501' +MPI_F77_UINT64_T='1275070526' +MPI_F77_UINT8_T='1275068731' +MPI_F77_UNSIGNED='1275069446' +MPI_F77_UNSIGNED_CHAR='1275068674' +MPI_F77_UNSIGNED_LONG='1275070472' +MPI_F77_UNSIGNED_LONG_LONG='1275070489' +MPI_F77_UNSIGNED_SHORT='1275068932' +MPI_F77_WCHAR='1275069454' +MPI_FINT='int' +MPI_FLOAT='0x4c00040a' +MPI_FLOAT_INT='0x8c000000' +MPI_INT16_T='0x4c000238' +MPI_INT32_T='0x4c000439' +MPI_INT64_T='0x4c00083a' +MPI_INT8_T='0x4c000137' +MPI_INT='0x4c000405' +MPI_INTEGER16='MPI_DATATYPE_NULL' +MPI_INTEGER1='0x4c00012d' +MPI_INTEGER2='0x4c00022f' +MPI_INTEGER4='0x4c000430' +MPI_INTEGER8='0x4c000831' +MPI_INTEGER='1275069467' +MPI_LB='0x4c000010' +MPI_LOGICAL='1275069469' +MPI_LONG='0x4c000807' +MPI_LONG_DOUBLE='0x4c00100c' +MPI_LONG_DOUBLE_INT='0x8c000004' +MPI_LONG_INT='0x8c000002' +MPI_LONG_LONG='0x4c000809' +MPI_MAX_ERROR_STRING='512' +MPI_MAX_LIBRARY_VERSION_STRING='8192' +MPI_MAX_PROCESSOR_NAME='128' +MPI_OFFSET='long long' +MPI_OFFSET_DATATYPE='0x4c000844' +MPI_OFFSET_TYPEDEF='typedef long long MPI_Offset;' +MPI_PACKED='0x4c00010f' +MPI_REAL16='0x4c00102b' +MPI_REAL4='0x4c000427' +MPI_REAL8='0x4c000829' +MPI_REAL='1275069468' +MPI_SHORT='0x4c000203' +MPI_SHORT_INT='0x8c000003' +MPI_SIGNED_CHAR='0x4c000118' +MPI_STATUS_SIZE='5' +MPI_UB='0x4c000011' +MPI_UINT16_T='0x4c00023c' +MPI_UINT32_T='0x4c00043d' +MPI_UINT64_T='0x4c00083e' +MPI_UINT8_T='0x4c00013b' +MPI_UNSIGNED_CHAR='0x4c000102' +MPI_UNSIGNED_INT='0x4c000406' +MPI_UNSIGNED_LONG='0x4c000808' +MPI_UNSIGNED_LONG_LONG='0x4c000819' +MPI_UNSIGNED_SHORT='0x4c000204' +MPI_WCHAR='0x4c00040e' +MPLLIBNAME='mpl' +NM='/usr/bin/nm -B' +NMEDIT='' +OBJDUMP='objdump' +OBJEXT='o' +OFFSET_KIND='8' +OPALIBNAME='opa' +OTOOL64='' +OTOOL='' +PACKAGE='mpich' +PACKAGE_BUGREPORT='discuss@mpich.org' +PACKAGE_NAME='MPICH' +PACKAGE_STRING='MPICH 3.4a2' +PACKAGE_TARNAME='mpich' +PACKAGE_URL='http://www.mpich.org/' +PACKAGE_VERSION='3.4a2' +PAPI_INCLUDE='' +PATH_SEPARATOR=':' +PERL='/usr/bin/perl' +PKG_CONFIG='/usr/bin/pkg-config' +PMPILIBNAME='pmpi' +PMPI_F08_NAME='pmpi_f08' +PRIMARY_PM_GFORKER_FALSE='' +PRIMARY_PM_GFORKER_TRUE='#' +PRIMARY_PM_REMSHELL_FALSE='' +PRIMARY_PM_REMSHELL_TRUE='#' +RANLIB='ranlib' +REPLACE_CALLOC='0' +REPLACE_CANONICALIZE_FILE_NAME='0' +REPLACE_MALLOC='0' +REPLACE_MBTOWC='0' +REPLACE_MKSTEMP='0' +REPLACE_PTSNAME='0' +REPLACE_PTSNAME_R='0' +REPLACE_PUTENV='0' +REPLACE_QSORT_R='0' +REPLACE_RANDOM_R='0' +REPLACE_REALLOC='0' +REPLACE_REALPATH='0' +REPLACE_SETENV='0' +REPLACE_STRTOD='0' +REPLACE_UNSETENV='0' +REPLACE_WCTOMB='0' +REQD='' +REQI1='' +REQI2='' +REQI8='' +RSH='' +SED='/usr/bin/sed' +SET_CFLAGS='CFLAGS=' +SET_MAKE='MAKE=make' +SHELL='/bin/sh' +SHLIB_EXT='.so' +SIZEOF_FC_CHARACTER='1' +SIZEOF_FC_DOUBLE_PRECISION='8' +SIZEOF_FC_INTEGER='4' +SIZEOF_FC_REAL='4' +SIZEOF_MPI_STATUS='20' +SSH='' +STRIP='strip' +USER_CFLAGS='-m64 -O2 -fPIC' +USER_CPPFLAGS='' +USER_CXXFLAGS='-m64 -O2 -fPIC' +USER_EXTRA_LIBS='' +USER_FCFLAGS='-m64 -O2 -fPIC' +USER_FFLAGS='-m64 -O2 -fPIC' +USER_LDFLAGS='-Wl,-z,noexecstack' +USER_LIBS='' +VERSION='3.4a2' +VISIBILITY_CFLAGS='-fvisibility=hidden' +VPATH='VPATH=.:${srcdir}' +WRAPPER_CFLAGS='-m64 -O2 -fPIC' +WRAPPER_CPPFLAGS='' +WRAPPER_CXXFLAGS='-m64 -O2 -fPIC' +WRAPPER_C_DYNAMIC_LOADING_FLAGS='-Wl,-rpath -Wl,${exec_prefix}/lib64 -Wl,--enable-new-dtags' +WRAPPER_EXTRA_LIBS='' +WRAPPER_FCFLAGS='-m64 -O2 -fPIC' +WRAPPER_FFLAGS='-m64 -O2 -fPIC' +WRAPPER_LDFLAGS='-Wl,-z,noexecstack ' +WRAPPER_LIBS='-lm -lpciaccess -lxml2 -lpthread -lrt -lduns -ldfs -ldaos -ldaos_common -luuid -lgurt ' +WTIME_DOUBLE_TYPE='REAL*8' +XARGS_NODATA_OPT='-r' +XMKMF='' +X_CFLAGS='' +X_EXTRA_LIBS='' +X_LIBS='' +X_PRE_LIBS='' +YAKSALIBNAME='yaksa' +ZMLIBNAME='zm' +ac_ct_AR='ar' +ac_ct_CC='gcc' +ac_ct_CXX='g++' +ac_ct_DUMPBIN='' +ac_ct_F77='' +ac_ct_FC='' +am__EXEEXT_FALSE='' +am__EXEEXT_TRUE='#' +am__fastdepCC_FALSE='#' +am__fastdepCC_TRUE='' +am__fastdepCXX_FALSE='#' +am__fastdepCXX_TRUE='' +am__include='include' +am__isrc='' +am__leading_dot='.' +am__nodep='_no' +am__quote='' +am__tar='$${TAR-tar} chof - "$$tardir"' +am__untar='$${TAR-tar} xf -' +bindings=' f77 f90 cxx' +bindir='${exec_prefix}/bin' +build='x86_64-pc-linux-gnu' +build_alias='' +build_cpu='x86_64' +build_os='linux-gnu' +build_vendor='pc' +ch4_netmod_addr_decl='' +ch4_netmod_amrequest_decl='' +ch4_netmod_coll_globals_default='' +ch4_netmod_coll_params_include='' +ch4_netmod_comm_decl='' +ch4_netmod_dt_decl='' +ch4_netmod_op_decl='' +ch4_netmod_pre_include='' +ch4_netmod_request_decl='' +ch4_netmod_win_decl='' +ch4_netmods='' +ch4_nets_array='' +ch4_nets_array_sz='' +ch4_nets_func_array='' +ch4_nets_func_decl='' +ch4_nets_native_func_array='' +ch4_nets_native_func_decl='' +ch4_nets_strings='' +ch4_posix_eager_array='' +ch4_posix_eager_array_sz='' +ch4_posix_eager_func_array='' +ch4_posix_eager_func_decl='' +ch4_posix_eager_modules='' +ch4_posix_eager_pre_include='' +ch4_posix_eager_recv_transaction_decl='' +ch4_posix_eager_strings='' +channel_name='nemesis' +datadir='${datarootdir}' +datarootdir='${prefix}/share' +device_name='ch3' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +dvidir='${docdir}' +exec_prefix='${prefix}' +host='x86_64-pc-linux-gnu' +host_alias='' +host_cpu='x86_64' +host_os='linux-gnu' +host_vendor='pc' +htmldir='${docdir}' +hwloclib='$(HWLOC_top_builddir)/hwloc/libhwloc_embedded.la' +hwloclibdir='' +hwlocsrcdir='src/hwloc' +includedir='${prefix}/include' +infodir='${datarootdir}/info' +install_sh='${SHELL} /home/brian/daos/rpm/mpich/confdb/install-sh' +jsonlib='/home/brian/daos/rpm/mpich/modules/json-c/libjson-c.la' +jsonsrcdir='/home/brian/daos/rpm/mpich/modules/json-c' +libdir='${exec_prefix}/lib64' +libexecdir='${exec_prefix}/lib' +libmpi_so_version='0:0:0' +localedir='${datarootdir}/locale' +localstatedir='${prefix}/var' +mandir='${datarootdir}/man' +master_top_builddir='/home/brian/daos/rpm/mpich' +master_top_srcdir='/home/brian/daos/rpm/mpich' +mkdir_p='$(MKDIR_P)' +mmx_copy_s='' +modincdir='${prefix}/include' +mpllib='src/mpl/libmpl.la' +mpllibdir='' +mplsrcdir='src/mpl' +nemesis_nets_array='MPIDI_NEM_TCP' +nemesis_nets_array_sz='1' +nemesis_nets_dirs='tcp' +nemesis_nets_func_array='&MPIDI_nem_tcp_funcs' +nemesis_nets_func_decl='MPIDI_nem_tcp_funcs' +nemesis_nets_macro_defs='#define MPIDI_NEM_TCP 0' +nemesis_nets_strings='"tcp"' +nemesis_networks='tcp' +netloclibdir='' +ofilib='' +ofisrcdir='' +oldincludedir='/usr/include' +opalib='src/openpa/src/libopa.la' +opalibdir='' +opasrcdir='src/openpa' +pdfdir='${docdir}' +pkgconfigdir='${exec_prefix}/lib64/pkgconfig' +pm_name='gforker' +prefix='/home/brian/mpich-install' +program_transform_name='s,x,x,' +psdir='${docdir}' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +subdirs=' test/mpi' +sysconfdir='${prefix}/etc' +target='x86_64-pc-linux-gnu' +target_alias='' +target_cpu='x86_64' +target_os='linux-gnu' +target_vendor='pc' +ucxdir='' +ucxlib='' +with_wrapper_dl_type='runpath' +yaksalib='modules/yaksa/libyaksa.la' +yaksalibdir='' +yaksasrcdir='modules/yaksa' +zmlib='' +zmlibdir='' +zmsrcdir='' + +## ------------------- ## +## File substitutions. ## +## ------------------- ## + +cc_shlib_conf='src/env/cc_shlib.conf' +cxx_shlib_conf='src/env/cxx_shlib.conf' +f77_shlib_conf='src/env/f77_shlib.conf' +fc_shlib_conf='src/env/fc_shlib.conf' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +/* confdefs.h */ +#define PACKAGE_NAME "MPICH" +#define PACKAGE_TARNAME "mpich" +#define PACKAGE_VERSION "3.4a2" +#define PACKAGE_STRING "MPICH 3.4a2" +#define PACKAGE_BUGREPORT "discuss@mpich.org" +#define PACKAGE_URL "http://www.mpich.org/" +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define __EXTENSIONS__ 1 +#define _ALL_SOURCE 1 +#define _GNU_SOURCE 1 +#define _POSIX_PTHREAD_SEMANTICS 1 +#define _TANDEM_SOURCE 1 +#define PACKAGE "mpich" +#define VERSION "3.4a2" +#define HAVE_DLFCN_H 1 +#define LT_OBJDIR ".libs/" +#define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL +#define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL +#define HAVE_TAG_ERROR_BITS 1 +#define MPICH_DATATYPE_ENGINE MPICH_DATATYPE_ENGINE_DATALOOP +#define HAVE_PRAGMA_WEAK 1 +#define HAVE_WEAK_ATTRIBUTE 1 +#define USE_WEAK_SYMBOLS 1 +#define HAVE_MULTIPLE_PRAGMA_WEAK 1 +#define HAVE_VISIBILITY 1 +#define HWLOC_VERSION "2.0.3rc2-git" +#define HWLOC_VERSION_MAJOR 2 +#define HWLOC_VERSION_MINOR 0 +#define HWLOC_VERSION_RELEASE 3 +#define HWLOC_VERSION_GREEK "rc2" +#define HWLOC_SYM_PREFIX hwloc_ +#define HWLOC_SYM_PREFIX_CAPS HWLOC_ +#define HWLOC_SYM_TRANSFORM 0 +#define _HPUX_SOURCE 1 +#define SIZEOF_VOID_P 8 +#define HWLOC_LINUX_SYS 1 +#define HWLOC_HAVE_LINUXIO 1 +#define HWLOC_HAVE_LINUXPCI 1 +#define HWLOC_X86_64_ARCH 1 +#define SIZEOF_UNSIGNED_LONG 8 +#define HWLOC_SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_UNSIGNED_INT 4 +#define HWLOC_SIZEOF_UNSIGNED_INT 4 +#define HWLOC_HAVE_ATTRIBUTE 1 +#define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1 +#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +#define HWLOC_HAVE_ATTRIBUTE_COLD 1 +#define HWLOC_HAVE_ATTRIBUTE_CONST 1 +#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1 +#define HWLOC_HAVE_ATTRIBUTE_FORMAT 1 +#define HWLOC_HAVE_ATTRIBUTE_HOT 1 +#define HWLOC_HAVE_ATTRIBUTE_MALLOC 1 +#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1 +#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1 +#define HWLOC_HAVE_ATTRIBUTE_NONNULL 1 +#define HWLOC_HAVE_ATTRIBUTE_NORETURN 1 +#define HWLOC_HAVE_ATTRIBUTE_PACKED 1 +#define HWLOC_HAVE_ATTRIBUTE_PURE 1 +#define HWLOC_HAVE_ATTRIBUTE_SENTINEL 1 +#define HWLOC_HAVE_ATTRIBUTE_UNUSED 1 +#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1 +#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1 +#define HWLOC_C_HAVE_VISIBILITY 0 +#define HAVE_UNISTD_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_STRCASECMP 1 +#define HWLOC_HAVE_DECL_STRCASECMP 1 +#define HAVE_STRNCASECMP 1 +#define HWLOC_HAVE_DECL_STRNCASECMP 1 +#define HAVE_STRFTIME 1 +#define HAVE_SETLOCALE 1 +#define HWLOC_HAVE_STDINT_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_DECL_FABSF 1 +#define HAVE_DECL_MODFF 1 +#define HAVE_DECL__SC_NPROCESSORS_ONLN 1 +#define HAVE_DECL__SC_NPROCESSORS_CONF 1 +#define HAVE_DECL__SC_NPROC_ONLN 0 +#define HAVE_DECL__SC_NPROC_CONF 0 +#define HAVE_DECL__SC_PAGESIZE 1 +#define HAVE_DECL__SC_PAGE_SIZE 1 +#define HAVE_DECL__SC_LARGE_PAGESIZE 0 +#define HAVE_DECL_STRTOULL 1 +#define HAVE_SSIZE_T 1 +#define HAVE_DECL_SNPRINTF 1 +#define HAVE_DECL__STRDUP 0 +#define HAVE_DECL__PUTENV 0 +#define HAVE_DECL_GETPROGNAME 0 +#define HAVE_DECL_GETEXECNAME 0 +#define HAVE_DECL_GETMODULEFILENAME 0 +#define HAVE_PROGRAM_INVOCATION_NAME 1 +#define HAVE___PROGNAME 1 +#define HAVE_PTHREAD_T 1 +#define hwloc_pid_t pid_t +#define hwloc_thread_t pthread_t +#define HAVE_DECL_SCHED_GETCPU 1 +#define HWLOC_HAVE_SCHED_SETAFFINITY 1 +#define HWLOC_HAVE_CPU_SET 1 +#define HWLOC_HAVE_CPU_SET_S 1 +#define HWLOC_HAVE_SYSCALL 1 +#define HAVE_FFS 1 +#define HWLOC_HAVE_DECL_FFS 1 +#define HWLOC_HAVE_FFS 1 +#define HAVE_FFSL 1 +#define HWLOC_HAVE_DECL_FFSL 1 +#define HWLOC_HAVE_FFSL 1 +#define HAVE_OPENAT 1 +#define HAVE_MALLOC_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_MEMALIGN 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_SYS_UTSNAME_H 1 +#define HAVE_UNAME 1 +#define HAVE_DECL_RUNNING_ON_VALGRIND 0 +#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1 +#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1 +#define X_DISPLAY_MISSING 1 +#define HWLOC_HAVE_LIBXML2 1 +#define HWLOC_HAVE_X86_CPUID 1 +#define HWLOC_HAVE_PTHREAD_MUTEX 1 +#define HAVE_HWLOC 1 +#define MPICH_THREAD_LEVEL MPI_THREAD_SINGLE +#define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__SINGLE +#define MPIDI_CH4_VCI_METHOD MPICH_VCI__ZERO +#define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE +#define HAVE_ROMIO 1 +#define HAVE__FUNC__ /**/ +#define HAVE__FUNCTION__ /**/ +#define ENABLE_PVAR_NEM 0 +#define ENABLE_PVAR_RECVQ 0 +#define ENABLE_PVAR_RMA 0 +#define ENABLE_PVAR_DIMS 0 +#define HAVE_LONG_LONG 1 +#define STDCALL +#define F77_NAME_LOWER_USCORE 1 +#define HAVE_MPI_F_INIT_WORKS_WITH_C 1 +#define HAVE_FORTRAN_BINDING 1 +#define HAVE_F08_BINDING 0 +#define TRUE 1 +#define FALSE 0 +#define HAVE_CXX_EXCEPTIONS /**/ +#define HAVE_NAMESPACES /**/ +#define HAVE_NAMESPACE_STD /**/ +#define HAVE_CXX_BINDING 1 +#define HAVE_NAMEPUB_SERVICE 1 +#define restrict __restrict +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_BUILTIN_EXPECT 1 +#define HAVE_C11__STATIC_ASSERT 1 +#define WORDS_LITTLEENDIAN 1 +#define HAVE_LONG_DOUBLE 1 +#define HAVE_LONG_LONG_INT 1 +#define HAVE_MAX_INTEGER_ALIGNMENT 8 +#define HAVE_MAX_STRUCT_ALIGNMENT 8 +#define HAVE_MAX_FP_ALIGNMENT 16 +#define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 +#define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 +#define SIZEOF_CHAR 1 +#define SIZEOF_UNSIGNED_CHAR 1 +#define SIZEOF_SHORT 2 +#define SIZEOF_UNSIGNED_SHORT 2 +#define SIZEOF_INT 4 +#define SIZEOF_UNSIGNED_INT 4 +#define SIZEOF_LONG 8 +#define SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_UNSIGNED_LONG_LONG 8 +#define SIZEOF_FLOAT 4 +#define SIZEOF_DOUBLE 8 +#define SIZEOF_LONG_DOUBLE 16 +#define SIZEOF_VOID_P 8 +#define STDC_HEADERS 1 +#define HAVE_STDDEF_H 1 +#define SIZEOF_WCHAR_T 4 +#define SIZEOF_FLOAT_INT 8 +#define SIZEOF_DOUBLE_INT 16 +#define SIZEOF_LONG_INT 16 +#define SIZEOF_SHORT_INT 8 +#define SIZEOF_TWO_INT 8 +#define SIZEOF_LONG_DOUBLE_INT 32 +#define HAVE_SYS_BITYPES_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_INT8_T 1 +#define HAVE_INT16_T 1 +#define HAVE_INT32_T 1 +#define HAVE_INT64_T 1 +#define HAVE_UINT8_T 1 +#define HAVE_UINT16_T 1 +#define HAVE_UINT32_T 1 +#define HAVE_UINT64_T 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_COMPLEX_H 1 +#define SIZEOF__BOOL 1 +#define SIZEOF_FLOAT__COMPLEX 8 +#define SIZEOF_DOUBLE__COMPLEX 16 +#define SIZEOF_LONG_DOUBLE__COMPLEX 32 +#define SIZEOF__FLOAT16 0 +#define HAVE__BOOL 1 +#define HAVE_FLOAT__COMPLEX 1 +#define HAVE_DOUBLE__COMPLEX 1 +#define HAVE_LONG_DOUBLE__COMPLEX 1 +#define MPIR_REAL4_CTYPE float +#define MPIR_REAL8_CTYPE double +#define MPIR_REAL16_CTYPE long double +#define MPIR_INTEGER1_CTYPE char +#define MPIR_INTEGER2_CTYPE short +#define MPIR_INTEGER4_CTYPE int +#define MPIR_INTEGER8_CTYPE long +#define SIZEOF_F77_INTEGER 4 +#define SIZEOF_F77_REAL 4 +#define SIZEOF_F77_DOUBLE_PRECISION 8 +#define MPIR_FC_REAL_CTYPE float +#define MPIR_FC_DOUBLE_CTYPE double +#define HAVE_AINT_LARGER_THAN_FINT 1 +#define HAVE_AINT_DIFFERENT_THAN_FINT 1 +#define HAVE_FINT_IS_INT 1 +#define F77_TRUE_VALUE_SET 1 +#define F77_TRUE_VALUE 1 +#define F77_FALSE_VALUE 0 +#define SIZEOF_BOOL 1 +#define MPIR_CXX_BOOL_CTYPE _Bool +#define SIZEOF_COMPLEX 8 +#define SIZEOF_DOUBLECOMPLEX 16 +#define SIZEOF_LONGDOUBLECOMPLEX 32 +#define HAVE_CXX_COMPLEX 1 +#define MPIR_CXX_BOOL_VALUE 0x4c000133 +#define MPIR_CXX_COMPLEX_VALUE 0x4c000834 +#define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 +#define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 +#define HAVE_ANY_INT64_T_ALIGNMENT 1 +#define HAVE_ANY_INT32_T_ALIGNMENT 1 +#define STDC_HEADERS 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_STRING_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ENDIAN_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_SETITIMER 1 +#define HAVE_ALARM 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_VSPRINTF 1 +#define HAVE_STRERROR 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_DECL_STRERROR_R 1 +#define HAVE_STRERROR_R 1 +#define STRERROR_R_CHAR_P 1 +#define HAVE_SNPRINTF 1 +#define HAVE_QSORT 1 +#define HAVE_VA_COPY 1 +#define HAVE_MACRO_VA_ARGS 1 +#define HAVE_ALLOCA_H 1 +#define HAVE_ALLOCA 1 +#define HAVE_STRDUP 1 +#define HAVE_MKSTEMP 1 +#define HAVE_PUTENV 1 +#define MPIR_AINT_MAX LONG_MAX +#define SIZEOF_MPII_BSEND_DATA_T 88 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SNPRINTF 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_NETDB_H 1 +#define USE_PMI_PORT 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_GCC_ATTRIBUTE 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION 1 +#define MPIEXEC_ALLOW_PORT 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SETSID 1 +#define HAVE_ISATTY 1 +#define HAVE_GETSID 1 +#define USE_NEW_SESSION 1 +#define HAVE_UNSETENV 1 +#define NEEDS_BIN_IN_PATH 1 +#define HAVE_EXTERN_ENVIRON 1 +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SYS_PTRACE_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_IOVEC_DEFINITION 1 +#define HAVE_STRSIGNAL 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SIGSET 1 +#define USE_SIGACTION /**/ +#define HAVE_PUTENV 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_SELECT 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SCHED_SETAFFINITY 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_CPU_SET_T 1 +#define HAVE_CPU_SET_MACROS 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_TIME_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_WAIT_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_TIME 1 +#define HAVE_SOCKLEN_T 1 +#define CH3_RANK_BITS 16 +#define HAVE_ASSERT_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_UUID_UUID_H 1 +#define HAVE_TIME_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_INET_PTON 1 +#define HAVE_GETHOSTNAME 1 +#define HAVE_TIME 1 +#define HAVE_NET_IF_H 1 +#define HAVE_ASSERT_H 1 +#define HAVE_NETDB_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_SCHED_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_ERRNO_H 1 +#define HAVE_SYS_IPC_H 1 +#define HAVE_SYS_SHM_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SIGNAL 1 +#define HAVE_MKSTEMP 1 +#define HAVE_RAND 1 +#define HAVE_SRAND 1 +#define MPID_NEM_INLINE 1 +#define PREFETCH_CELL 1 +#define USE_FASTBOX 1 +#define HAVE_H_ADDR_LIST 1 +#define HAVE_STRUCT_IFCONF 1 +#define HAVE_STRUCT_IFREQ 1 +#define MPID_NEM_LOCAL_LMT_IMPL MPID_NEM_LOCAL_LMT_SHM_COPY +#define HAVE_STRUCT_RANDOM_DATA 1 +#define HAVE_RANDOM_R 1 +#define USE_SYM_HEAP 1 +#define MPIR_OFFSET_MAX LLONG_MAX +#define MPIR_COUNT_MAX LLONG_MAX +#define MPIR_Ucount unsigned long long +#define MPIF_STATUS_SIZE 5 +#define HAVE_STDIO_H 1 +#define HAVE_C_MULTI_ATTR_ALIAS 1 +#define HAVE_FC_TYPE_ROUTINES 1 +#define HAVE_MPICHCONF 1 + +configure: exit 0 diff --git a/daos_adio-hwloc.patch b/daos_adio-hwloc.patch new file mode 100644 index 00000000000..9a8a2681e47 --- /dev/null +++ b/daos_adio-hwloc.patch @@ -0,0 +1,5109 @@ +diff --git a/src/hwloc/.gitignore b/src/hwloc/.gitignore +index 44b46fa..4d2bd77 100644 +--- a/src/hwloc/.gitignore ++++ b/src/hwloc/.gitignore +@@ -88,8 +88,10 @@ test-suite.log + /tests/hwloc/hwloc_bitmap_first_last_weight + /tests/hwloc/hwloc_bitmap_singlify + /tests/hwloc/hwloc_type_depth ++/tests/hwloc/hwloc_type_sscanf + /tests/hwloc/hwloc_bind + /tests/hwloc/hwloc_get_last_cpu_location ++/tests/hwloc/hwloc_get_area_memlocation + /tests/hwloc/hwloc_object_userdata + /tests/hwloc/hwloc_synthetic + /tests/hwloc/hwloc_custom +@@ -100,9 +102,11 @@ test-suite.log + /tests/hwloc/hwloc_groups + /tests/hwloc/hwloc_groups2 + /tests/hwloc/hwloc_insert_misc ++/tests/hwloc/hwloc_topology_abi + /tests/hwloc/hwloc_topology_diff + /tests/hwloc/hwloc_topology_dup + /tests/hwloc/hwloc_topology_restrict ++/tests/hwloc/shmem + /tests/hwloc/hwloc_obj_infos + /tests/hwloc/hwloc_iodevs + /tests/hwloc/xmlbuffer +@@ -209,3 +213,5 @@ test-suite.log + /tests/netloc/data/scotch/scotch_get_arch + + /contrib/systemd/hwloc-dump-hwdata.service ++/contrib/misc/hwloc-tweak-osindex ++/contrib/windows/test-windows-version.sh +diff --git a/src/hwloc/Makefile.am b/src/hwloc/Makefile.am +index 25fa1e5..5b65d92 100644 +--- a/src/hwloc/Makefile.am ++++ b/src/hwloc/Makefile.am +@@ -32,6 +32,7 @@ endif + # distribution tarball if we're building in embedded mode. + DIST_SUBDIRS = $(SUBDIRS) + if HWLOC_BUILD_STANDALONE ++DIST_SUBDIRS += contrib/windows + if !BUILD_NETLOC + DIST_SUBDIRS += netloc + endif +diff --git a/src/hwloc/NEWS b/src/hwloc/NEWS +index ff503d8..5057473 100644 +--- a/src/hwloc/NEWS ++++ b/src/hwloc/NEWS +@@ -17,6 +17,28 @@ bug fixes (and other actions) for each version of hwloc since version + in v0.9.1). + + ++Version 2.0.3 (also included in 1.11.12 when appropriate) ++------------- ++* Fix build on Cygwin, thanks to Marco Atzeri for the patches. ++* Fix a corner case of hwloc_topology_restrict() where children would ++ become out-of-order. ++* Fix the return length of export_xmlbuffer() functions to always ++ include the ending \0. ++* Fix lstopo --children-order argument parsing. ++ ++ ++Version 2.0.2 (also included in 1.11.11 when appropriate) ++------------- ++* Add support for Hygon Dhyana processors in the x86 backend, ++ thanks to Pu Wen for the patch. ++* Fix symbol renaming to also rename internal components, ++ thanks to Evan Ramos for the patch. ++* Fix build on HP-UX, thanks to Richard Lloyd for reporting the issues. ++* Detect PCI link speed without being root on Linux >= 4.13. ++* Add HWLOC_VERSION* macros to the public headers, ++ thanks to Gilles Gouaillardet for the suggestion. ++ ++ + Version 2.0.1 (also included in 1.11.10 when relevant) + ------------- + * Bump the library soname to 15:0:0 to avoid conflicts with hwloc 1.11.x +@@ -153,7 +175,7 @@ Version 2.0.0 + - Add get_area_memlocation(). + * Tools + + lstopo and hwloc-info have a new --filter option matching the new filtering API. +- + lstopo can be given --children-layout=plain to force a basic displaying ++ + lstopo can be given --children-order=plain to force a basic displaying + of memory and normal children together below their parent. + + hwloc-distances was removed and replaced with lstopo --distances. + * Misc +diff --git a/src/hwloc/VERSION b/src/hwloc/VERSION +index 56f95f0..acd752a 100644 +--- a/src/hwloc/VERSION ++++ b/src/hwloc/VERSION +@@ -5,11 +5,11 @@ + # major, minor, and release are generally combined in the form + # ... If release is zero, then it is omitted. + +-# Please update HWLOC_VERSION in contrib/windows/private_config.h too. ++# Please update HWLOC_VERSION* in contrib/windows/hwloc_config.h too. + + major=2 + minor=0 +-release=1 ++release=3 + + # greek is used for alpha or beta release tags. If it is non-empty, + # it will be appended to the version number. It does not have to be +@@ -41,7 +41,7 @@ snapshot_version=${major}.${minor}.${release}${greek}-git + # 2. Version numbers are described in the Libtool current:revision:age + # format. + +-libhwloc_so_version=15:0:0 ++libhwloc_so_version=15:2:0 + libnetloc_so_version=0:0:0 + + # Please also update the lines in contrib/windows/libhwloc.vcxproj +diff --git a/src/hwloc/config/hwloc.m4 b/src/hwloc/config/hwloc.m4 +index 63bf11d..8588d57 100644 +--- a/src/hwloc/config/hwloc.m4 ++++ b/src/hwloc/config/hwloc.m4 +@@ -85,12 +85,22 @@ EOF]) + if test "$?" != "0"; then + AC_MSG_ERROR([Cannot continue]) + fi +- HWLOC_RELEASE_DATE="`$HWLOC_top_srcdir/config/hwloc_get_version.sh $HWLOC_top_srcdir/VERSION --release-date`" ++ AC_MSG_RESULT([$HWLOC_VERSION]) + AC_SUBST(HWLOC_VERSION) + AC_DEFINE_UNQUOTED([HWLOC_VERSION], ["$HWLOC_VERSION"], + [The library version, always available, even in embedded mode, contrary to VERSION]) ++ ++ HWLOC_VERSION_MAJOR="`$HWLOC_top_srcdir/config/hwloc_get_version.sh $HWLOC_top_srcdir/VERSION --major`" ++ AC_DEFINE_UNQUOTED([HWLOC_VERSION_MAJOR], [$HWLOC_VERSION_MAJOR], [The library version major number]) ++ HWLOC_VERSION_MINOR="`$HWLOC_top_srcdir/config/hwloc_get_version.sh $HWLOC_top_srcdir/VERSION --minor`" ++ AC_DEFINE_UNQUOTED([HWLOC_VERSION_MINOR], [$HWLOC_VERSION_MINOR], [The library version minor number]) ++ HWLOC_VERSION_RELEASE="`$HWLOC_top_srcdir/config/hwloc_get_version.sh $HWLOC_top_srcdir/VERSION --release`" ++ AC_DEFINE_UNQUOTED([HWLOC_VERSION_RELEASE], [$HWLOC_VERSION_RELEASE], [The library version release number]) ++ HWLOC_VERSION_GREEK="`$HWLOC_top_srcdir/config/hwloc_get_version.sh $HWLOC_top_srcdir/VERSION --greek`" ++ AC_DEFINE_UNQUOTED([HWLOC_VERSION_GREEK], ["$HWLOC_VERSION_GREEK"], [The library version optional greek suffix string]) ++ ++ HWLOC_RELEASE_DATE="`$HWLOC_top_srcdir/config/hwloc_get_version.sh $HWLOC_top_srcdir/VERSION --release-date`" + AC_SUBST(HWLOC_RELEASE_DATE) +- AC_MSG_RESULT([$HWLOC_VERSION]) + + # Debug mode? + AC_MSG_CHECKING([if want hwloc maintainer support]) +@@ -376,6 +386,11 @@ EOF]) + AC_CHECK_HEADERS([strings.h]) + AC_CHECK_HEADERS([ctype.h]) + ++ AC_CHECK_FUNCS([strcasecmp], [ ++ _HWLOC_CHECK_DECL([strcasecmp], [ ++ AC_DEFINE([HWLOC_HAVE_DECL_STRCASECMP], [1], [Define to 1 if function `strcasecmp' is declared by system headers]) ++ ]) ++ ]) + AC_CHECK_FUNCS([strncasecmp], [ + _HWLOC_CHECK_DECL([strncasecmp], [ + AC_DEFINE([HWLOC_HAVE_DECL_STRNCASECMP], [1], [Define to 1 if function `strncasecmp' is declared by system headers]) +@@ -434,8 +449,15 @@ EOF]) + + AC_CHECK_DECLS([fabsf], [ + AC_CHECK_LIB([m], [fabsf], +- [HWLOC_LIBS="-lm $HWLOC_LIBS"]) ++ [need_libm=yes]) + ], [], [[#include ]]) ++ AC_CHECK_DECLS([modff], [ ++ AC_CHECK_LIB([m], [modff], ++ [need_libm=yes]) ++ ], [], [[#include ]]) ++ if test x$need_libm = xyes; then ++ HWLOC_LIBS="-lm $HWLOC_LIBS" ++ fi + + AC_CHECK_HEADERS([picl.h], [ + AC_CHECK_LIB([picl], [picl_initialize], +@@ -474,7 +496,6 @@ EOF]) + # Needed for Windows in private/misc.h + AC_CHECK_TYPES([ssize_t]) + AC_CHECK_DECLS([snprintf], [], [], [AC_INCLUDES_DEFAULT]) +- AC_CHECK_DECLS([strcasecmp], [], [], [AC_INCLUDES_DEFAULT]) + # strdup and putenv are declared in windows headers but marked deprecated + AC_CHECK_DECLS([_strdup], [], [], [AC_INCLUDES_DEFAULT]) + AC_CHECK_DECLS([_putenv], [], [], [AC_INCLUDES_DEFAULT]) +@@ -1169,11 +1190,13 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); + AS_IF([test "$hwloc_mode" = "embedded"], + [HWLOC_EMBEDDED_CFLAGS=$HWLOC_CFLAGS + HWLOC_EMBEDDED_CPPFLAGS=$HWLOC_CPPFLAGS ++ HWLOC_EMBEDDED_LDFLAGS=$HWLOC_LDFLAGS + HWLOC_EMBEDDED_LDADD='$(HWLOC_top_builddir)/hwloc/libhwloc_embedded.la' + HWLOC_EMBEDDED_LIBS=$HWLOC_LIBS + HWLOC_LIBS=]) + AC_SUBST(HWLOC_EMBEDDED_CFLAGS) + AC_SUBST(HWLOC_EMBEDDED_CPPFLAGS) ++ AC_SUBST(HWLOC_EMBEDDED_LDFLAGS) + AC_SUBST(HWLOC_EMBEDDED_LDADD) + AC_SUBST(HWLOC_EMBEDDED_LIBS) + +@@ -1275,32 +1298,6 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[ + + #----------------------------------------------------------------------- + +-AC_DEFUN([_HWLOC_CHECK_DIFF_U], [ +- AC_MSG_CHECKING([whether diff accepts -u]) +- if diff -u /dev/null /dev/null 2> /dev/null +- then +- HWLOC_DIFF_U="-u" +- else +- HWLOC_DIFF_U="" +- fi +- AC_SUBST([HWLOC_DIFF_U]) +- AC_MSG_RESULT([$HWLOC_DIFF_U]) +-]) +- +-AC_DEFUN([_HWLOC_CHECK_DIFF_W], [ +- AC_MSG_CHECKING([whether diff accepts -w]) +- if diff -w /dev/null /dev/null 2> /dev/null +- then +- HWLOC_DIFF_W="-w" +- else +- HWLOC_DIFF_W="" +- fi +- AC_SUBST([HWLOC_DIFF_W]) +- AC_MSG_RESULT([$HWLOC_DIFF_W]) +-]) +- +-#----------------------------------------------------------------------- +- + dnl HWLOC_CHECK_DECL + dnl + dnl Check that the declaration of the given function has a complete prototype +diff --git a/src/hwloc/config/hwloc_components.m4 b/src/hwloc/config/hwloc_components.m4 +index 7d5c1fa..620cc4d 100644 +--- a/src/hwloc/config/hwloc_components.m4 ++++ b/src/hwloc/config/hwloc_components.m4 +@@ -1,4 +1,4 @@ +-# Copyright © 2012 Inria. All rights reserved. ++# Copyright © 2012-2018 Inria. All rights reserved. + # See COPYING in top-level directory. + + +@@ -50,10 +50,8 @@ done + # $2 = list of component names + # + AC_DEFUN([HWLOC_LIST_STATIC_COMPONENTS], [ +-for comp in [$2]; do +- echo "HWLOC_DECLSPEC extern const struct hwloc_component hwloc_${comp}_component;" >>[$1] +-done + cat <>[$1] ++#include + static const struct hwloc_component * hwloc_static_components[[]] = { + EOF + for comp in [$2]; do +diff --git a/src/hwloc/config/hwloc_get_version.sh b/src/hwloc/config/hwloc_get_version.sh +index 74bca53..4bc4f29 100755 +--- a/src/hwloc/config/hwloc_get_version.sh ++++ b/src/hwloc/config/hwloc_get_version.sh +@@ -11,7 +11,7 @@ + # Copyright © 2004-2005 The Regents of the University of California. + # All rights reserved. + # Copyright © 2008-2014 Cisco Systems, Inc. All rights reserved. +-# Copyright © 2014 Inria. All rights reserved. ++# Copyright © 2014-2018 Inria. All rights reserved. + # $COPYRIGHT$ + # + # Additional copyrights may follow +@@ -70,6 +70,18 @@ case "$option" in + --version) + echo $HWLOC_VERSION + ;; ++ --major) ++ echo $HWLOC_MAJOR_VERSION ++ ;; ++ --minor) ++ echo $HWLOC_MINOR_VERSION ++ ;; ++ --release) ++ echo $HWLOC_RELEASE_VERSION ++ ;; ++ --greek) ++ echo $HWLOC_GREEK_VERSION ++ ;; + --release-date) + echo $HWLOC_RELEASE_DATE + ;; +@@ -82,7 +94,11 @@ $0 mlx4_0) and two virtual + network interface software devices (ib0 and ib1). + +-PCI link speed is also reported for some bridges and devices +-because lstopo was privileged when it discovered the topology. +- + + Here is the corresponding textual output: + +@@ -1655,51 +1652,19 @@ The user may additionally add new key-value pairs to any object using + hwloc_obj_add_info() or the \ref cli_hwloc_annotate program. + + Here is a non-exhaustive list of attributes that may be automatically +-added by hwloc (with the usual corresponding object in parentheses). ++added by hwloc. + Note that these attributes heavily depend on the ability of the + operating system to report them. + Many of them will therefore be missing on some OS. ++ ++\htmlonly ++
++\endhtmlonly ++\subsection attributes_info_platform Hardware Platform Information ++ ++These info attributes are attached to the root object (Machine). ++ +
+-
OSName, OSRelease, OSVersion, HostName, Architecture +-(Machine object)
+-
The operating system name, release, version, the hostname and the +-architecture name, as reported by the Unix uname command. +-
+-
Backend (topology root, Machine object)
+-
The name of the hwloc backend/component that filled the topology. +-If several components were combined, multiple Backend keys may exist, +-with different values, for instance x86, Linux +-and pci. +-
+-
LinuxCgroup (Machine object)
+-
The name the Linux control group where the calling process is +-placed. +-
+-
SyntheticDescription (topology root, Machine object)
+-
The description string that was given to hwloc to build this +-synthetic topology. +-
+-
CPUModel (Package or Machine)
+-
The processor model name. +-Usually added to Package objects, but can be in Machine instead if +-hwloc failed to discover any package. +-
+-
CPUType (Package)
+-
+-A Solaris-specific general processor type name, such as "i86pc". +-
+-
CPUVendor, CPUModelNumber, CPUFamilyNumber, CPUStepping (Package or Machine)
+-
The processor vendor name, model number, family number, and stepping number. +-Currently available for x86 and Xeon Phi processors on most systems, +-and for ia64 processors on Linux (except CPUStepping). +-Usually added to Package objects, but can be in Machine instead if +-hwloc failed to discover any package. +-
+-
CPURevision (Package)
+-
+-A POWER/PowerPC-specific general processor revision number, +-currently only available on Linux. +-
+
PlatformName, PlatformModel, PlatformVendor, PlatformBoardID, PlatformRevision,
+
SystemVersionRegister, ProcessorVersionRegister (Machine)
+
Some POWER/PowerPC-specific attributes describing the platform +@@ -1708,7 +1673,12 @@ Currently only available on Linux. + Usually added to Package objects, but can be in Machine instead if + hwloc failed to discover any package. +
+-
MemoryMode, ClusterMode (topology root, Machine object)
++
DMIBoardVendor, DMIBoardName, etc.
++
DMI hardware information such as the motherboard and chassis ++models and vendors, the BIOS revision, etc., ++as reported by Linux under /sys/class/dmi/id/. ++
++
MemoryMode, ClusterMode
+
+ Intel Xeon Phi processor configuration modes. + Available if hwloc-dump-hwdata was used (see \ref faq_knl_dump) +@@ -1721,38 +1691,115 @@ The cluster mode may be Quadrant, Hemisphere, All2All + SNC2 or SNC4. + See doc/examples/get-knl-modes.c in the source directory for an example of retrieving these attributes. +
+-
Inclusive (Caches)
+-
The inclusiveness of a cache (1 if inclusive, 0 otherwise). +-Currently only available on x86 processors. ++
++ ++ ++\htmlonly ++
++\endhtmlonly ++\subsection attributes_info_os Operating System Information ++ ++These info attributes are attached to the root object (Machine). ++ ++
++
OSName, OSRelease, OSVersion, HostName, Architecture
++
The operating system name, release, version, the hostname and the ++architecture name, as reported by the Unix uname command. +
+-
SolarisProcessorGroup (Group)
+-
+-The Solaris kstat processor group name that was used to build this Group object. ++
LinuxCgroup
++
The name the Linux control group where the calling process is ++placed. +
+-
PCIVendor, PCIDevice (PCI devices and bridges)
+-
The vendor and device names of the PCI device. ++
++ ++ ++\htmlonly ++
++\endhtmlonly ++\subsection attributes_info_hwloc hwloc Information ++ ++Unless specified, these info attributes are attached to the root object (Machine). ++ ++
++
Backend (topology root, or specific object added by that backend)
++
The name of the hwloc backend/component that filled the topology. ++If several components were combined, multiple Backend keys may exist, ++with different values, for instance x86 and Linux in the root ++object and CUDA in CUDA OS device objects. ++
++
SyntheticDescription
++
The description string that was given to hwloc to build this ++synthetic topology. ++
++
hwlocVersion
++
The version number of the hwloc library that was used to generate ++the topology. If the topology was loaded from XML, this is not the hwloc ++version that loaded it, but rather the first hwloc instance that exported ++the topology to XML earlier. +
+-
PCISlot
+-
The name/number of the physical slot where the PCI device is plugged. ++
ProcessName
++
The name of the process that contains the hwloc library that was used ++to generate the topology. If the topology was from XML, this is not the ++hwloc process that loaded it, but rather the first process that exported ++the topology to XML earlier. ++
++
++ ++ ++\htmlonly ++
++\endhtmlonly ++\subsection attributes_info_cpu CPU Information ++ ++These info attributes are attached to Package objects, ++or to the root object (Machine) if package locality information is missing. ++ ++
++
CPUModel
++
The processor model name.
++
CPUVendor, CPUModelNumber, CPUFamilyNumber, CPUStepping
++
The processor vendor name, model number, family number, and stepping number. ++Currently available for x86 and Xeon Phi processors on most systems, ++and for ia64 processors on Linux (except CPUStepping). ++
++
CPURevision
++
++A POWER/PowerPC-specific general processor revision number, ++currently only available on Linux. +
+-
Vendor, Model, Revision, SerialNumber, Size, SectorSize
++
CPUType
++
++A Solaris-specific general processor type name, such as "i86pc". ++
++
++ ++ ++\htmlonly ++
++\endhtmlonly ++\subsection attributes_info_osdev OS Device Information ++ ++These info attributes are attached to OS device objects specified in parentheses. ++ ++
++
Vendor, Model, Revision, SerialNumber, Size, SectorSize (Block OS devices)
+
The vendor and model names, revision, serial number, size (in kB) +-and SectorSize (in bytes) of a Block OS device. ++and SectorSize (in bytes). +
+-
LinuxDeviceID
+-
The major/minor device number such as 8:0 on Linux for a Block OS device. ++
LinuxDeviceID (Block OS devices)
++
The major/minor device number such as 8:0 of Linux device. +
+
GPUVendor, GPUModel (GPU or Co-Processor OS devices)
+
The vendor and model names of the GPU device. +
+
OpenCLDeviceType, OpenCLPlatformIndex,
+-
OpenCLPlatformName, OpenCLPlatformDeviceIndex (OpenCL GPU OS devices)
++
OpenCLPlatformName, OpenCLPlatformDeviceIndex (OpenCL OS devices)
+
The type of OpenCL device, + the OpenCL platform index and name, + and the index of the device within the platform. +
+-
OpenCLComputeUnits, OpenCLGlobalMemorySize
+-
The number of compute units and global memory size (in kB) of a OpenCL device. ++
OpenCLComputeUnits, OpenCLGlobalMemorySize (OpenCL OS devices)
++
The number of compute units and global memory size (in kB) of an OpenCL device. +
+
NVIDIAUUID, NVIDIASerial (NVML GPU OS devices)
+
The UUID and Serial of NVIDIA GPUs. +@@ -1765,7 +1812,7 @@ and SectorSize (in bytes) of a Block OS device. + and size of the shared memory in each multiprocessor of a CUDA device. + Sizes are in kB. +
+-
MICSerialNumber
++
MICSerialNumber (MIC coprocessor OS device)
+
+ The serial number of an Intel Xeon Phi (MIC) coprocessor. + hwloc may run either inside the coprocessor itself, or on the host processor. +@@ -1777,16 +1824,11 @@ and SectorSize (in bytes) of a Block OS device. + When running hwloc inside a Xeon Phi coprocessor, the root of the topology + (Machine object) gets this attribute. +
+-
MICFamily, MICSKU, MICActiveCores, MICMemorySize
++
MICFamily, MICSKU, MICActiveCores, MICMemorySize (MIC coprocessor OS device)
+
The family, SKU (model), + number of active cores, and memory size (in kB) + of an Intel Xeon Phi (MIC) coprocessor. +
+-
DMIBoardVendor, DMIBoardName, etc. (Machine object)
+-
DMI hardware information such as the motherboard and chassis +-models and vendors, the BIOS revision, etc., +-as reported by Linux under /sys/class/dmi/id/. +-
+
Address, Port (Network interface OS devices)
+
The MAC address and the port number of a software network + interface, such as eth4 on Linux. +@@ -1798,24 +1840,46 @@ the state of a port #1 (value is 4 when active), + the LID and LID mask count of port #2, + and GID #1 of port #3. +
+-
Vendor, AssetTag, PartNumber, DeviceLocation, BankLocation (MemoryModule Misc objects)
++
++ ++ ++\htmlonly ++
++\endhtmlonly ++\subsection attributes_info_otherobjs Other Object-specific Information ++ ++These info attributes are attached to objects specified in parentheses. ++ ++
++
Inclusive (Caches)
++
The inclusiveness of a cache (1 if inclusive, 0 otherwise). ++Currently only available on x86 processors. ++
++
SolarisProcessorGroup (Group)
+
+-Information about memory modules (DIMMs) extracted from SMBIOS. ++The Solaris kstat processor group name that was used to build this Group object. +
+-
hwlocVersion
+-
The version number of the hwloc library that was used to generate +-the topology. If the topology was loaded from XML, this is not the hwloc +-version that loaded it, but rather the first hwloc instance that exported +-the topology to XML earlier. ++
PCIVendor, PCIDevice (PCI devices and bridges)
++
The vendor and device names of the PCI device. +
+-
ProcessName
+-
The name of the process that contains the hwloc library that was used +-to generate the topology. If the topology was from XML, this is not the +-hwloc version that loaded it, but rather the first process that exported +-the topology to XML earlier. ++
PCISlot (PCI devices or Bridges)
++
The name/number of the physical slot where the device is plugged. ++ If the physical device contains PCI bridges above the actual PCI device, ++ the attribute may be attached to the highest bridge ++ (i.e. the first object that actually appears below the physical slot). ++
++
Vendor, AssetTag, PartNumber, DeviceLocation, BankLocation (MemoryModule Misc objects)
++
++Information about memory modules (DIMMs) extracted from SMBIOS. +
+
+ ++ ++\htmlonly ++
++\endhtmlonly ++\subsection attributes_info_user User-Given Information ++ + Here is a non-exhaustive list of user-provided info attributes + that have a special meaning: +
+@@ -2828,13 +2892,17 @@ be loaded before gathering information and binding tasks or memory. + Fortunately this overhead may be significantly reduced by filtering + non-interesting information out of the topology. + For instance the following code builds a topology that only contains +-Cores, hardware threads (PUs, cannot be filtered-out), +-and NUMA nodes (cannot be filtered-out). ++Cores (explicitly filtered-in below), ++hardware threads (PUs, cannot be filtered-out), ++NUMA nodes (cannot be filtered-out), ++and the root object (usually a Machine; the root cannot be removed without breaking the tree). + + \verbatim + hwloc_topology_t topology; + hwloc_topology_init(&topology); ++/* filter everything out */ + hwloc_topology_set_all_types_filter(topology, HWLOC_TYPE_FILTER_KEEP_NONE); ++/* filter Cores back in */ + hwloc_topology_set_type_filter(topology, HWLOC_OBJ_CORE, HWLOC_TYPE_FILTER_KEEP_ALL); + hwloc_topology_load(topology); + \endverbatim +@@ -3263,7 +3331,7 @@ variable may avoid this. + Also remember that these components may be disabled at build-time with + configure flags such as \--disable-opencl, \--disable-cuda or \--disable-nvml, + and at runtime with the environment variable +-HWLOC_COMPONENTS=-opencl,cuda,nvml. ++HWLOC_COMPONENTS=-opencl,-cuda,-nvml. + + + \subsection faq_privileged Does hwloc require privileged access? +@@ -3271,8 +3339,7 @@ and at runtime with the environment variable + hwloc discovers the topology by querying the operating system. + Some minor features may require privileged access to the operation + system. +-For instance memory module and PCI link speed discovery on Linux +-is reserved to root, ++For instance memory module discovery on Linux is reserved to root, + and the entire PCI discovery on Solaris and BSDs requires access to + some special files that are usually restricted to root + (/dev/pci* or /devices/pci*). +@@ -3311,13 +3378,15 @@ resulting topology will miss some objects and may be asymmetric + + \verbatim + **************************************************************************** +-* hwloc has encountered what looks like an error from the operating system. ++* hwloc received invalid information from the operating system. + * + * L3 (cpuset 0x000003f0) intersects with NUMANode (P#0 cpuset 0x0000003f) without inclusion! + * Error occurred in topology.c line 940 + * + * Please report this error message to the hwloc user's mailing list, + * along with the files generated by the hwloc-gather-topology script. ++* ++* hwloc will now ignore this invalid topology information and continue. + **************************************************************************** + \endverbatim + +@@ -3440,6 +3509,11 @@ and hwloc_get_api_version() came only in 1.1.1. + Also do not use the old cpuset API since it was deprecated and superseded + by the bitmap API in 1.1, and later removed in 1.5. + ++If you ever need to look at the library version instead of the API version, ++you may want to use HWLOC_VERSION instead. ++Two stable releases of the same series usually have the same ::HWLOC_API_VERSION ++even if their HWLOC_VERSION are different. ++ + + + \htmlonly +@@ -3457,7 +3531,7 @@ Processors can be configured in various clustering modes to have up to 4 Clu + Moreover, each Cluster (quarter, half or whole processor) of the processor may have its own local + parts of the DDR and of the MCDRAM. + This memory and clustering configuration may be probed by looking at MemoryMode +-and ClusterMode attributes, see \ref attributes_info and doc/examples/get-knl-modes.c ++and ClusterMode attributes, see \ref attributes_info_platform and doc/examples/get-knl-modes.c + in the source directory. + + Starting with version 2.0, hwloc properly exposes this memory +@@ -3590,6 +3664,20 @@ sysctl variable must be set to 1 to do so. + Otherwise, only the number of logical processors will be detected. + + ++\subsection faq_aix_bind Why does binding fail on AIX? ++ ++The AIX operating system requires specific user capabilities for ++attaching processes to resource sets (CAP_NUMA_ATTACH). ++Otherwise functions such as hwloc_set_cpubind() fail (return -1 with errno set to EPERM). ++ ++This capability must also be inherited (through the additional CAP_PROPAGATE capability) ++if you plan to bind a process before forking another process, ++for instance with hwloc-bind. ++ ++These capabilities may be given by the administrator with: ++\verbatim ++chuser "capabilities=CAP_PROPAGATE,CAP_NUMA_ATTACH" ++\endverbatim + + + \page upgrade_to_api_2x Upgrading to the hwloc 2.0 API +diff --git a/src/hwloc/hwloc/distances.c b/src/hwloc/hwloc/distances.c +index 1091ced..f0b91f0 100644 +--- a/src/hwloc/hwloc/distances.c ++++ b/src/hwloc/hwloc/distances.c +@@ -345,7 +345,7 @@ int hwloc_internal_distances_add(hwloc_topology_t topology, + /* The actual function exported to the user + */ + int hwloc_distances_add(hwloc_topology_t topology, +- unsigned nbobjs, hwloc_obj_t *objs, uint64_t *values, ++ unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t *values, + unsigned long kind, unsigned long flags) + { + hwloc_obj_type_t type; +@@ -671,20 +671,22 @@ hwloc_distances_get_by_depth(hwloc_topology_t topology, int depth, + + static void hwloc_report_user_distance_error(const char *msg, int line) + { +- static int reported = 0; +- +- if (!reported && !hwloc_hide_errors()) { +- fprintf(stderr, "****************************************************************************\n"); +- fprintf(stderr, "* hwloc %s has encountered what looks like an error from user-given distances.\n", HWLOC_VERSION); +- fprintf(stderr, "*\n"); +- fprintf(stderr, "* %s\n", msg); +- fprintf(stderr, "* Error occurred in topology.c line %d\n", line); +- fprintf(stderr, "*\n"); +- fprintf(stderr, "* Please make sure that distances given through the interface or environment\n"); +- fprintf(stderr, "* variables do not contradict any other topology information.\n"); +- fprintf(stderr, "****************************************************************************\n"); +- reported = 1; +- } ++ static int reported = 0; ++ ++ if (!reported && !hwloc_hide_errors()) { ++ fprintf(stderr, "****************************************************************************\n"); ++ fprintf(stderr, "* hwloc %s was given invalid distances by the user.\n", HWLOC_VERSION); ++ fprintf(stderr, "*\n"); ++ fprintf(stderr, "* %s\n", msg); ++ fprintf(stderr, "* Error occurred in topology.c line %d\n", line); ++ fprintf(stderr, "*\n"); ++ fprintf(stderr, "* Please make sure that distances given through the programming API\n"); ++ fprintf(stderr, "* do not contradict any other topology information.\n"); ++ fprintf(stderr, "* \n"); ++ fprintf(stderr, "* hwloc will now ignore this invalid topology information and continue.\n"); ++ fprintf(stderr, "****************************************************************************\n"); ++ reported = 1; ++ } + } + + static int hwloc_compare_values(uint64_t a, uint64_t b, float accuracy) +diff --git a/src/hwloc/hwloc/misc.c b/src/hwloc/hwloc/misc.c +index 1889294..16dacf6 100644 +--- a/src/hwloc/hwloc/misc.c ++++ b/src/hwloc/hwloc/misc.c +@@ -2,7 +2,7 @@ + * Copyright © 2009 CNRS + * Copyright © 2009-2015 Inria. All rights reserved. + * Copyright © 2009-2010 Université Bordeaux +- * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. ++ * Copyright © 2009-2018 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. + */ + +@@ -128,18 +128,18 @@ char * + hwloc_progname(struct hwloc_topology *topology __hwloc_attribute_unused) + { + #if HAVE_DECL_GETMODULEFILENAME +- char name[256], *basename; ++ char name[256], *local_basename; + unsigned res = GetModuleFileName(NULL, name, sizeof(name)); + if (res == sizeof(name) || !res) + return NULL; +- basename = strrchr(name, '\\'); +- if (!basename) +- basename = name; ++ local_basename = strrchr(name, '\\'); ++ if (!local_basename) ++ local_basename = name; + else +- basename++; +- return strdup(basename); ++ local_basename++; ++ return strdup(local_basename); + #else /* !HAVE_GETMODULEFILENAME */ +- const char *name, *basename; ++ const char *name, *local_basename; + #if HAVE_DECL_GETPROGNAME + name = getprogname(); /* FreeBSD, NetBSD, some Solaris */ + #elif HAVE_DECL_GETEXECNAME +@@ -156,11 +156,11 @@ hwloc_progname(struct hwloc_topology *topology __hwloc_attribute_unused) + #endif + if (!name) + return NULL; +- basename = strrchr(name, '/'); +- if (!basename) +- basename = name; ++ local_basename = strrchr(name, '/'); ++ if (!local_basename) ++ local_basename = name; + else +- basename++; +- return strdup(basename); ++ local_basename++; ++ return strdup(local_basename); + #endif /* !HAVE_GETMODULEFILENAME */ + } +diff --git a/src/hwloc/hwloc/pci-common.c b/src/hwloc/hwloc/pci-common.c +index 3eda455..00f08a9 100644 +--- a/src/hwloc/hwloc/pci-common.c ++++ b/src/hwloc/hwloc/pci-common.c +@@ -1,5 +1,5 @@ + /* +- * Copyright © 2009-2017 Inria. All rights reserved. ++ * Copyright © 2009-2018 Inria. All rights reserved. + * See COPYING in top-level directory. + */ + +@@ -16,7 +16,7 @@ + #endif + #include + +-#ifdef HWLOC_WIN_SYS ++#if defined(HWLOC_WIN_SYS) && !defined(__CYGWIN__) + #include + #define open _open + #define read _read +@@ -753,7 +753,6 @@ hwloc_pcidisc_setup_bridge_attr(hwloc_obj_t obj, + pattr->domain, pattr->bus, pattr->dev, pattr->func, config[HWLOC_PCI_PRIMARY_BUS]); + } + +- obj->type = HWLOC_OBJ_BRIDGE; + battr->upstream_type = HWLOC_OBJ_BRIDGE_PCI; + battr->downstream_type = HWLOC_OBJ_BRIDGE_PCI; + battr->downstream.pci.domain = pattr->domain; +diff --git a/src/hwloc/hwloc/shmem.c b/src/hwloc/hwloc/shmem.c +index cdd7fc3..6c507f5 100644 +--- a/src/hwloc/hwloc/shmem.c ++++ b/src/hwloc/hwloc/shmem.c +@@ -1,5 +1,5 @@ + /* +- * Copyright © 2017 Inria. All rights reserved. ++ * Copyright © 2017-2018 Inria. All rights reserved. + * See COPYING in top-level directory. + */ + +@@ -11,7 +11,9 @@ + #ifndef HWLOC_WIN_SYS + + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + + #define HWLOC_SHMEM_HEADER_VERSION 1 +@@ -76,7 +78,7 @@ hwloc_shmem_topology_get_length(hwloc_topology_t topology, + + int + hwloc_shmem_topology_write(hwloc_topology_t topology, +- int fd, uint64_t fileoffset, ++ int fd, hwloc_uint64_t fileoffset, + void *mmap_address, size_t length, + unsigned long flags) + { +@@ -144,7 +146,7 @@ hwloc_shmem_topology_write(hwloc_topology_t topology, + + int + hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp, +- int fd, uint64_t fileoffset, ++ int fd, hwloc_uint64_t fileoffset, + void *mmap_address, size_t length, + unsigned long flags) + { +@@ -259,7 +261,7 @@ hwloc_shmem_topology_get_length(hwloc_topology_t topology __hwloc_attribute_unus + + int + hwloc_shmem_topology_write(hwloc_topology_t topology __hwloc_attribute_unused, +- int fd __hwloc_attribute_unused, uint64_t fileoffset __hwloc_attribute_unused, ++ int fd __hwloc_attribute_unused, hwloc_uint64_t fileoffset __hwloc_attribute_unused, + void *mmap_address __hwloc_attribute_unused, size_t length __hwloc_attribute_unused, + unsigned long flags __hwloc_attribute_unused) + { +@@ -269,7 +271,7 @@ hwloc_shmem_topology_write(hwloc_topology_t topology __hwloc_attribute_unused, + + int + hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp __hwloc_attribute_unused, +- int fd __hwloc_attribute_unused, uint64_t fileoffset __hwloc_attribute_unused, ++ int fd __hwloc_attribute_unused, hwloc_uint64_t fileoffset __hwloc_attribute_unused, + void *mmap_address __hwloc_attribute_unused, size_t length __hwloc_attribute_unused, + unsigned long flags __hwloc_attribute_unused) + { +diff --git a/src/hwloc/hwloc/topology-linux.c b/src/hwloc/hwloc/topology-linux.c +index 2c60b1e..f276b71 100644 +--- a/src/hwloc/hwloc/topology-linux.c ++++ b/src/hwloc/hwloc/topology-linux.c +@@ -2,7 +2,7 @@ + * Copyright © 2009 CNRS + * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2013, 2015 Université Bordeaux +- * Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. ++ * Copyright © 2009-2018 Cisco Systems, Inc. All rights reserved. + * Copyright © 2015 Intel, Inc. All rights reserved. + * Copyright © 2010 IBM + * See COPYING in top-level directory. +@@ -3134,8 +3134,10 @@ list_sysfsnode(struct hwloc_linux_backend_data_s *data, + return NULL; + + nodeset = hwloc_bitmap_alloc(); +- if (!nodeset) ++ if (!nodeset) { ++ closedir(dir); + return NULL; ++ } + + while ((dirent = readdir(dir)) != NULL) { + if (strncmp(dirent->d_name, "node", 4)) +@@ -3569,7 +3571,7 @@ look_sysfscpu(struct hwloc_topology *topology, + sprintf(str, "%s/cpu%d/topology/thread_siblings", path, i); + coreset = hwloc__alloc_read_path_as_cpumask(str, data->root_fd); + if (coreset) { +- unsigned mycoreid; ++ unsigned mycoreid = (unsigned) -1; + int gotcoreid = 0; /* to avoid reading the coreid twice */ + hwloc_bitmap_and(coreset, coreset, cpuset); + if (hwloc_bitmap_weight(coreset) > 1 && threadwithcoreid == -1) { +@@ -4927,7 +4929,7 @@ hwloc_linuxfs_block_class_fillinfos(struct hwloc_backend *backend __hwloc_attrib + struct hwloc_linux_backend_data_s *data = backend->private_data; + #endif + FILE *file; +- char path[256]; ++ char path[296]; /* osdevpath <= 256 */ + char line[128]; + char vendor[64] = ""; + char model[64] = ""; +@@ -5140,7 +5142,7 @@ hwloc_linuxfs_net_class_fillinfos(int root_fd, + struct hwloc_obj *obj, const char *osdevpath) + { + struct stat st; +- char path[256]; ++ char path[296]; /* osdevpath <= 256 */ + char address[128]; + snprintf(path, sizeof(path), "%s/address", osdevpath); + if (!hwloc_read_path_by_length(path, address, sizeof(address), root_fd)) { +@@ -5207,7 +5209,7 @@ static void + hwloc_linuxfs_infiniband_class_fillinfos(int root_fd, + struct hwloc_obj *obj, const char *osdevpath) + { +- char path[256]; ++ char path[296]; /* osdevpath <= 256 */ + char guidvalue[20]; + unsigned i,j; + +@@ -5328,7 +5330,7 @@ static void + hwloc_linuxfs_mic_class_fillinfos(int root_fd, + struct hwloc_obj *obj, const char *osdevpath) + { +- char path[256]; ++ char path[296]; /* osdevpath <= 256 */ + char family[64]; + char sku[64]; + char sn[64]; +@@ -5815,8 +5817,22 @@ hwloc_linuxfs_pci_look_pcidevices(struct hwloc_backend *backend) + + /* try to get the link speed */ + offset = hwloc_pcidisc_find_cap(config_space_cache, HWLOC_PCI_CAP_ID_EXP); +- if (offset > 0 && offset + 20 /* size of PCI express block up to link status */ <= CONFIG_SPACE_CACHESIZE) ++ if (offset > 0 && offset + 20 /* size of PCI express block up to link status */ <= CONFIG_SPACE_CACHESIZE) { + hwloc_pcidisc_find_linkspeed(config_space_cache, offset, &attr->linkspeed); ++ } else { ++ /* if not available from config-space (extended part is root-only), look in sysfs files added in 4.13 */ ++ float speed = 0.f; ++ unsigned width = 0; ++ err = snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/current_link_speed", dirent->d_name); ++ if ((size_t) err < sizeof(path) ++ && !hwloc_read_path_by_length(path, value, sizeof(value), root_fd)) ++ speed = hwloc_linux_pci_link_speed_from_string(value); ++ err = snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/current_link_width", dirent->d_name); ++ if ((size_t) err < sizeof(path) ++ && !hwloc_read_path_by_length(path, value, sizeof(value), root_fd)) ++ width = atoi(value); ++ attr->linkspeed = speed*width/8; ++ } + + hwloc_pcidisc_tree_insert_by_busid(&tree, obj); + } +@@ -5891,12 +5907,23 @@ hwloc_linuxfs_pci_look_pcislots(struct hwloc_backend *backend) + if ((size_t) err < sizeof(path) + && !hwloc_read_path_by_length(path, buf, sizeof(buf), root_fd) + && sscanf(buf, "%x:%x:%x", &domain, &bus, &dev) == 3) { ++ /* may also be %x:%x without a device number but that's only for hotplug when nothing is plugged, ignore those */ + hwloc_obj_t obj = hwloc_linuxfs_pci_find_pcislot_obj(hwloc_get_root_obj(topology)->io_first_child, domain, bus, dev); +- if (obj) { +- while (obj && obj->attr->pcidev.dev == dev /* sibling have same domain+bus */) { +- hwloc_obj_add_info(obj, "PCISlot", dirent->d_name); +- obj = obj->next_sibling; +- } ++ while (obj) { ++ /* Apply the slot to that device and its siblings with same domain/bus/dev ID. ++ * Make sure that siblings are still PCI and on the same bus ++ * (optional bridge filtering can put different things together). ++ */ ++ if (obj->type != HWLOC_OBJ_PCI_DEVICE && ++ (obj->type != HWLOC_OBJ_BRIDGE || obj->attr->bridge.upstream_type != HWLOC_OBJ_BRIDGE_PCI)) ++ break; ++ if (obj->attr->pcidev.domain != domain ++ || obj->attr->pcidev.bus != bus ++ || obj->attr->pcidev.dev != dev) ++ break; ++ ++ hwloc_obj_add_info(obj, "PCISlot", dirent->d_name); ++ obj = obj->next_sibling; + } + } + } +diff --git a/src/hwloc/hwloc/topology-opencl.c b/src/hwloc/hwloc/topology-opencl.c +index e11dc60..6889f65 100644 +--- a/src/hwloc/hwloc/topology-opencl.c ++++ b/src/hwloc/hwloc/topology-opencl.c +@@ -12,6 +12,7 @@ + #include + #include + ++#define CL_TARGET_OPENCL_VERSION 220 + #ifdef __APPLE__ + #include + #else +diff --git a/src/hwloc/hwloc/topology-pci.c b/src/hwloc/hwloc/topology-pci.c +index fdd570e..0e2d554 100644 +--- a/src/hwloc/hwloc/topology-pci.c ++++ b/src/hwloc/hwloc/topology-pci.c +@@ -2,7 +2,7 @@ + * Copyright © 2009 CNRS + * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2011, 2013 Université Bordeaux +- * Copyright © 2014 Cisco Systems, Inc. All rights reserved. ++ * Copyright © 2014-2018 Cisco Systems, Inc. All rights reserved. + * Copyright © 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * See COPYING in top-level directory. +@@ -142,19 +142,21 @@ hwloc_look_pci(struct hwloc_backend *backend) + unsigned char config_space_cache[CONFIG_SPACE_CACHESIZE]; + hwloc_obj_type_t type; + struct hwloc_obj *obj; +- unsigned domain; ++ unsigned domain, bus, dev, func; + unsigned device_class; + unsigned short tmp16; + unsigned offset; + ++ domain = pcidev->domain; ++ bus = pcidev->bus; ++ dev = pcidev->dev; ++ func = pcidev->func; ++ + /* initialize the config space in case we fail to read it (missing permissions, etc). */ + memset(config_space_cache, 0xff, CONFIG_SPACE_CACHESIZE); + pci_device_probe(pcidev); + pci_device_cfg_read(pcidev, config_space_cache, 0, CONFIG_SPACE_CACHESIZE, NULL); + +- /* try to read the domain */ +- domain = pcidev->domain; +- + /* try to read the device_class */ + device_class = pcidev->device_class >> 8; + +@@ -204,26 +206,26 @@ hwloc_look_pci(struct hwloc_backend *backend) + char path[64]; + char value[16]; + FILE *file; +- size_t read; ++ size_t bytes_read; + + snprintf(path, sizeof(path), "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/vendor", +- domain, pcidev->bus, pcidev->dev, pcidev->func); ++ domain, bus, dev, func); + file = fopen(path, "r"); + if (file) { +- read = fread(value, 1, sizeof(value), file); ++ bytes_read = fread(value, 1, sizeof(value), file); + fclose(file); +- if (read) ++ if (bytes_read) + /* fixup the pciaccess struct so that pci_device_get_vendor_name() is correct later. */ + pcidev->vendor_id = strtoul(value, NULL, 16); + } + + snprintf(path, sizeof(path), "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/device", +- domain, pcidev->bus, pcidev->dev, pcidev->func); ++ domain, bus, dev, func); + file = fopen(path, "r"); + if (file) { +- read = fread(value, 1, sizeof(value), file); ++ bytes_read = fread(value, 1, sizeof(value), file); + fclose(file); +- if (read) ++ if (bytes_read) + /* fixup the pciaccess struct so that pci_device_get_device_name() is correct later. */ + pcidev->device_id = strtoul(value, NULL, 16); + } +@@ -232,9 +234,9 @@ hwloc_look_pci(struct hwloc_backend *backend) + + obj = hwloc_alloc_setup_object(topology, type, HWLOC_UNKNOWN_INDEX); + obj->attr->pcidev.domain = domain; +- obj->attr->pcidev.bus = pcidev->bus; +- obj->attr->pcidev.dev = pcidev->dev; +- obj->attr->pcidev.func = pcidev->func; ++ obj->attr->pcidev.bus = bus; ++ obj->attr->pcidev.dev = dev; ++ obj->attr->pcidev.func = func; + obj->attr->pcidev.vendor_id = pcidev->vendor_id; + obj->attr->pcidev.device_id = pcidev->device_id; + obj->attr->pcidev.class_id = device_class; +@@ -243,8 +245,38 @@ hwloc_look_pci(struct hwloc_backend *backend) + obj->attr->pcidev.linkspeed = 0; /* unknown */ + offset = hwloc_pcidisc_find_cap(config_space_cache, PCI_CAP_ID_EXP); + +- if (offset > 0 && offset + 20 /* size of PCI express block up to link status */ <= CONFIG_SPACE_CACHESIZE) ++ if (offset > 0 && offset + 20 /* size of PCI express block up to link status */ <= CONFIG_SPACE_CACHESIZE) { + hwloc_pcidisc_find_linkspeed(config_space_cache, offset, &obj->attr->pcidev.linkspeed); ++#ifdef HWLOC_LINUX_SYS ++ } else { ++ /* if not available from config-space (extended part is root-only), look in Linux sysfs files added in 4.13 */ ++ char path[64]; ++ char value[16]; ++ FILE *file; ++ size_t bytes_read; ++ float speed = 0.f; ++ unsigned width = 0; ++ snprintf(path, sizeof(path), "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/current_link_speed", ++ domain, bus, dev, func); ++ file = fopen(path, "r"); ++ if (file) { ++ bytes_read = fread(value, 1, sizeof(value), file); ++ fclose(file); ++ if (bytes_read) ++ speed = hwloc_linux_pci_link_speed_from_string(value); ++ } ++ snprintf(path, sizeof(path), "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/current_link_width", ++ domain, bus, dev, func); ++ file = fopen(path, "r"); ++ if (file) { ++ bytes_read = fread(value, 1, sizeof(value), file); ++ fclose(file); ++ if (bytes_read) ++ width = atoi(value); ++ } ++ obj->attr->pcidev.linkspeed = speed*width/8; ++#endif ++ } + + if (type == HWLOC_OBJ_BRIDGE) { + if (hwloc_pcidisc_setup_bridge_attr(obj, config_space_cache) < 0) +@@ -274,7 +306,7 @@ hwloc_look_pci(struct hwloc_backend *backend) + hwloc_obj_add_info(obj, "PCIDevice", devicename); + + hwloc_debug(" %04x:%02x:%02x.%01x %04x %04x:%04x %s %s\n", +- domain, pcidev->bus, pcidev->dev, pcidev->func, ++ domain, bus, dev, func, + device_class, pcidev->vendor_id, pcidev->device_id, + vendorname && *vendorname ? vendorname : "??", + devicename && *devicename ? devicename : "??"); +diff --git a/src/hwloc/hwloc/topology-solaris-chiptype.c b/src/hwloc/hwloc/topology-solaris-chiptype.c +index 1ab85b5..1b8e833 100644 +--- a/src/hwloc/hwloc/topology-solaris-chiptype.c ++++ b/src/hwloc/hwloc/topology-solaris-chiptype.c +@@ -1,7 +1,7 @@ + /* + * Copyright © 2009-2010 Oracle and/or its affiliates. All rights reserved. + * Copyright © 2013 Université Bordeaux. All rights reserved. +- * Copyright © 2016-2017 Inria. All rights reserved. ++ * Copyright © 2016-2018 Inria. All rights reserved. + * + * $COPYRIGHT$ + * +@@ -150,8 +150,8 @@ Default values are for Unknown so we can build up from there. + *****************************************************************************/ + + static int called_cpu_probe = 0; +-static char dss_chip_type[PICL_PROPNAMELEN_MAX]; +-static char dss_chip_model[PICL_PROPNAMELEN_MAX]; ++static char dss_chip_type[PICL_PROPNAMELEN_MAX+1]; ++static char dss_chip_model[PICL_PROPNAMELEN_MAX+1]; + static long dss_chip_mode = MODE_UNKNOWN; + + struct hwloc_solaris_chip_info_s chip_info; +@@ -356,7 +356,7 @@ static int probe_cpu(picl_nodehdl_t node_hdl, void* dummy_arg __hwloc_attribute_ + unsigned int index; + int int_val; + int val; +- char string_val[PICL_PROPNAMELEN_MAX]; ++ char string_val[PICL_PROPNAMELEN_MAX+1]; + + val = picl_get_first_prop(node_hdl, &p_hdl); + while (val == PICL_SUCCESS) { +diff --git a/src/hwloc/hwloc/topology-synthetic.c b/src/hwloc/hwloc/topology-synthetic.c +index ebe8eab..2fa7121 100644 +--- a/src/hwloc/hwloc/topology-synthetic.c ++++ b/src/hwloc/hwloc/topology-synthetic.c +@@ -576,7 +576,6 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data, + errno = EINVAL; + goto error; + } +- data->level[count-1].arity = (unsigned)item; + + totalarity *= item; + data->level[count].totalwidth = totalarity; +@@ -602,6 +601,7 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data, + goto error; + } + ++ data->level[count-1].arity = (unsigned)item; + count++; + } + +@@ -783,7 +783,7 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data, + curlevel->attr.memorysize = 32*1024; + else + /* *4 at each level, starting from 1MB for L2, unified */ +- curlevel->attr.memorysize = 256*1024 << (2*curlevel->attr.depth); ++ curlevel->attr.memorysize = 256ULL*1024 << (2*curlevel->attr.depth); + } + + } else if (type == HWLOC_OBJ_NUMANODE && !curlevel->attr.memorysize) { +@@ -1162,8 +1162,8 @@ hwloc__export_synthetic_indexes(hwloc_obj_t *level, unsigned total, + /* dump all indexes */ + cur = level[0]; + while (cur) { +- res = snprintf(tmp, tmplen, "%u%s", cur->os_index, +- cur->next_cousin ? "," : ")"); ++ res = hwloc_snprintf(tmp, tmplen, "%u%s", cur->os_index, ++ cur->next_cousin ? "," : ")"); + if (hwloc__export_synthetic_update_status(&ret, &tmp, &tmplen, res) < 0) + return -1; + cur = cur->next_cousin; +@@ -1225,7 +1225,7 @@ hwloc__export_synthetic_obj_attr(struct hwloc_topology * topology, + level = topology->levels[obj->depth]; + } + +- res = snprintf(tmp, tmplen, "%sindexes=", prefix); ++ res = hwloc_snprintf(tmp, tmplen, "%sindexes=", prefix); + if (hwloc__export_synthetic_update_status(&ret, &tmp, &tmplen, res) < 0) + return -1; + +diff --git a/src/hwloc/hwloc/topology-windows.c b/src/hwloc/hwloc/topology-windows.c +index cb8e23c..d03645c 100644 +--- a/src/hwloc/hwloc/topology-windows.c ++++ b/src/hwloc/hwloc/topology-windows.c +@@ -811,7 +811,7 @@ hwloc_look_windows(struct hwloc_backend *backend) + + obj = hwloc_alloc_setup_object(topology, type, id); + obj->cpuset = hwloc_bitmap_alloc(); +- hwloc_debug("%s#%u mask %lx\n", hwloc_obj_type_string(type), id, procInfo[i].ProcessorMask); ++ hwloc_debug("%s#%u mask %llx\n", hwloc_obj_type_string(type), id, (unsigned long long) procInfo[i].ProcessorMask); + /* ProcessorMask is a ULONG_PTR */ + hwloc_bitmap_set_ith_ULONG_PTR(obj->cpuset, 0, procInfo[i].ProcessorMask); + hwloc_debug_2args_bitmap("%s#%u bitmap %s\n", hwloc_obj_type_string(type), id, obj->cpuset); +diff --git a/src/hwloc/hwloc/topology-x86.c b/src/hwloc/hwloc/topology-x86.c +index 425da4c..0509256 100644 +--- a/src/hwloc/hwloc/topology-x86.c ++++ b/src/hwloc/hwloc/topology-x86.c +@@ -210,6 +210,7 @@ enum cpuid_type { + intel, + amd, + zhaoxin, ++ hygon, + unknown + }; + +@@ -293,13 +294,13 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns + _extendedmodel = (eax>>16) & 0xf; + _family = (eax>>8) & 0xf; + _extendedfamily = (eax>>20) & 0xff; +- if ((cpuid_type == intel || cpuid_type == amd) && _family == 0xf) { ++ if ((cpuid_type == intel || cpuid_type == amd || cpuid_type == hygon) && _family == 0xf) { + infos->cpufamilynumber = _family + _extendedfamily; + } else { + infos->cpufamilynumber = _family; + } + if ((cpuid_type == intel && (_family == 0x6 || _family == 0xf)) +- || (cpuid_type == amd && _family == 0xf) ++ || ((cpuid_type == amd || cpuid_type == hygon) && _family == 0xf) + || (cpuid_type == zhaoxin && (_family == 0x6 || _family == 0x7))) { + infos->cpumodelnumber = _model + (_extendedmodel << 4); + } else { +@@ -387,12 +388,13 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns + node_id = 0; + nodes_per_proc = 1; + } else { ++ /* AMD other families or Hygon family 18h */ + node_id = ecx & 0xff; + nodes_per_proc = ((ecx >> 8) & 7) + 1; + } + infos->nodeid = node_id; + if ((infos->cpufamilynumber == 0x15 && nodes_per_proc > 2) +- || (infos->cpufamilynumber == 0x17 && nodes_per_proc > 4)) { ++ || ((infos->cpufamilynumber == 0x17 || infos->cpufamilynumber == 0x18) && nodes_per_proc > 4)) { + hwloc_debug("warning: undefined nodes_per_proc value %u, assuming it means %u\n", nodes_per_proc, nodes_per_proc); + } + +@@ -492,7 +494,7 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns + /* Get thread/core + cache information from cpuid 0x04 + * (not supported on AMD) + */ +- if (cpuid_type != amd && highest_cpuid >= 0x04) { ++ if ((cpuid_type != amd && cpuid_type != hygon) && highest_cpuid >= 0x04) { + unsigned max_nbcores; + unsigned max_nbthreads; + unsigned level; +@@ -525,7 +527,9 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns + } + + tmpcaches = realloc(infos->cache, infos->numcaches * sizeof(*infos->cache)); +- if (tmpcaches) { ++ if (!tmpcaches) { ++ infos->numcaches = oldnumcaches; ++ } else { + infos->cache = tmpcaches; + cache = &infos->cache[oldnumcaches]; + +@@ -672,6 +676,15 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns + cache->cacheid = (infos->apicid % legacy_max_log_proc) / cache->nbthreads_sharing /* cacheid within the package */ + + 2 * (infos->apicid / legacy_max_log_proc); /* add 2 cache per previous package */ + } ++ } else if (cpuid_type == hygon) { ++ if (infos->cpufamilynumber == 0x18 ++ && cache->level == 3 && cache->nbthreads_sharing == 6) { ++ /* Hygon family 0x18 always shares L3 between 8 APIC ids, ++ * even when only 6 APIC ids are enabled and reported in nbthreads_sharing ++ * (on 24-core CPUs). ++ */ ++ cache->cacheid = infos->apicid / 8; ++ } + } + } + +@@ -816,11 +829,11 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int + } + + if (hwloc_filter_check_keep_object_type(topology, HWLOC_OBJ_GROUP)) { +- /* Look for Compute units inside packages */ + if (fulldiscovery) { + hwloc_bitmap_t unit_cpuset; + hwloc_obj_t unit; + ++ /* Look for Compute units inside packages */ + hwloc_bitmap_copy(remaining_cpuset, complete_cpuset); + while ((i = hwloc_bitmap_first(remaining_cpuset)) != (unsigned) -1) { + unsigned packageid = infos[i].packageid; +@@ -851,33 +864,33 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int + unitid, unit_cpuset); + hwloc_insert_object_by_cpuset(topology, unit); + } +- } + +- /* Look for unknown objects */ +- if (infos[one].otherids) { +- for (level = infos[one].levels-1; level <= infos[one].levels-1; level--) { +- if (infos[one].otherids[level] != UINT_MAX) { +- hwloc_bitmap_t unknown_cpuset; +- hwloc_obj_t unknown_obj; +- +- hwloc_bitmap_copy(remaining_cpuset, complete_cpuset); +- while ((i = hwloc_bitmap_first(remaining_cpuset)) != (unsigned) -1) { +- unsigned unknownid = infos[i].otherids[level]; +- +- unknown_cpuset = hwloc_bitmap_alloc(); +- for (j = i; j < nbprocs; j++) { +- if (infos[j].otherids[level] == unknownid) { +- hwloc_bitmap_set(unknown_cpuset, j); +- hwloc_bitmap_clr(remaining_cpuset, j); ++ /* Look for unknown objects */ ++ if (infos[one].otherids) { ++ for (level = infos[one].levels-1; level <= infos[one].levels-1; level--) { ++ if (infos[one].otherids[level] != UINT_MAX) { ++ hwloc_bitmap_t unknown_cpuset; ++ hwloc_obj_t unknown_obj; ++ ++ hwloc_bitmap_copy(remaining_cpuset, complete_cpuset); ++ while ((i = hwloc_bitmap_first(remaining_cpuset)) != (unsigned) -1) { ++ unsigned unknownid = infos[i].otherids[level]; ++ ++ unknown_cpuset = hwloc_bitmap_alloc(); ++ for (j = i; j < nbprocs; j++) { ++ if (infos[j].otherids[level] == unknownid) { ++ hwloc_bitmap_set(unknown_cpuset, j); ++ hwloc_bitmap_clr(remaining_cpuset, j); ++ } + } ++ unknown_obj = hwloc_alloc_setup_object(topology, HWLOC_OBJ_GROUP, unknownid); ++ unknown_obj->cpuset = unknown_cpuset; ++ unknown_obj->attr->group.kind = HWLOC_GROUP_KIND_INTEL_X2APIC_UNKNOWN; ++ unknown_obj->attr->group.subkind = level; ++ hwloc_debug_2args_bitmap("os unknown%u %u has cpuset %s\n", ++ level, unknownid, unknown_cpuset); ++ hwloc_insert_object_by_cpuset(topology, unknown_obj); + } +- unknown_obj = hwloc_alloc_setup_object(topology, HWLOC_OBJ_GROUP, unknownid); +- unknown_obj->cpuset = unknown_cpuset; +- unknown_obj->attr->group.kind = HWLOC_GROUP_KIND_INTEL_X2APIC_UNKNOWN; +- unknown_obj->attr->group.subkind = level; +- hwloc_debug_2args_bitmap("os unknown%u %u has cpuset %s\n", +- level, unknownid, unknown_cpuset); +- hwloc_insert_object_by_cpuset(topology, unknown_obj); + } + } + } +@@ -1122,6 +1135,11 @@ static void hwloc_x86_os_state_restore(hwloc_x86_os_state_t *state __hwloc_attri + #define AMD_EDX ('e' | ('n'<<8) | ('t'<<16) | ('i'<<24)) + #define AMD_ECX ('c' | ('A'<<8) | ('M'<<16) | ('D'<<24)) + ++/* HYGON "HygonGenuine" */ ++#define HYGON_EBX ('H' | ('y'<<8) | ('g'<<16) | ('o'<<24)) ++#define HYGON_EDX ('n' | ('G'<<8) | ('e'<<16) | ('n'<<24)) ++#define HYGON_ECX ('u' | ('i'<<8) | ('n'<<16) | ('e'<<24)) ++ + /* (Zhaoxin) CentaurHauls */ + #define ZX_EBX ('C' | ('e'<<8) | ('n'<<16) | ('t'<<24)) + #define ZX_EDX ('a' | ('u'<<8) | ('r'<<16) | ('H'<<24)) +@@ -1221,6 +1239,8 @@ int hwloc_look_x86(struct hwloc_backend *backend, int fulldiscovery) + else if ((ebx == ZX_EBX && ecx == ZX_ECX && edx == ZX_EDX) + || (ebx == SH_EBX && ecx == SH_ECX && edx == SH_EDX)) + cpuid_type = zhaoxin; ++ else if (ebx == HYGON_EBX && ecx == HYGON_ECX && edx == HYGON_EDX) ++ cpuid_type = hygon; + + hwloc_debug("highest cpuid %x, cpuid type %u\n", highest_cpuid, cpuid_type); + if (highest_cpuid < 0x01) { +@@ -1362,14 +1382,15 @@ fulldiscovery: + static int + hwloc_x86_check_cpuiddump_input(const char *src_cpuiddump_path, hwloc_bitmap_t set) + { +-#if !(defined HWLOC_WIN_SYS && !defined __MINGW32__) /* needs a lot of work */ ++ ++#if !(defined HWLOC_WIN_SYS && !defined __MINGW32__ && !defined __CYGWIN__) /* needs a lot of work */ + struct dirent *dirent; + DIR *dir; + FILE *file; + char line [32]; + + dir = opendir(src_cpuiddump_path); +- if (!dir) ++ if (!dir) + return -1; + + char path[strlen(src_cpuiddump_path) + strlen("/hwloc-cpuid-info") + 1]; +diff --git a/src/hwloc/hwloc/topology-xml-libxml.c b/src/hwloc/hwloc/topology-xml-libxml.c +index d087678..da3e89c 100644 +--- a/src/hwloc/hwloc/topology-xml-libxml.c ++++ b/src/hwloc/hwloc/topology-xml-libxml.c +@@ -502,6 +502,11 @@ hwloc_libxml_export_buffer(hwloc_topology_t topology, struct hwloc__xml_export_d + xmlDocDumpFormatMemoryEnc(doc, (xmlChar **)xmlbuffer, buflen, "UTF-8", 1); + xmlFreeDoc(doc); + hwloc_libxml2_cleanup(); ++ if (!*xmlbuffer) { ++ *buflen = 0; ++ return -1; ++ } ++ *buflen += 1; /* ending \0 was added but not counted in the length */ + return 0; + } + +@@ -571,6 +576,11 @@ hwloc_libxml_export_diff_buffer(hwloc_topology_diff_t diff, const char *refname, + xmlDocDumpFormatMemoryEnc(doc, (xmlChar **)xmlbuffer, buflen, "UTF-8", 1); + xmlFreeDoc(doc); + hwloc_libxml2_cleanup(); ++ if (!*xmlbuffer) { ++ *buflen = 0; ++ return -1; ++ } ++ *buflen += 1; /* ending \0 was added but not counted in the length */ + return 0; + } + +diff --git a/src/hwloc/hwloc/topology-xml-nolibxml.c b/src/hwloc/hwloc/topology-xml-nolibxml.c +index 4042968..5a0d02d 100644 +--- a/src/hwloc/hwloc/topology-xml-nolibxml.c ++++ b/src/hwloc/hwloc/topology-xml-nolibxml.c +@@ -416,11 +416,12 @@ hwloc_nolibxml_backend_init(struct hwloc_xml_backend_data_s *bdata, + bdata->data = nbdata; + + if (xmlbuffer) { +- nbdata->buffer = malloc(xmlbuflen); ++ nbdata->buffer = malloc(xmlbuflen+1); + if (!nbdata->buffer) + goto out_with_nbdata; +- nbdata->buflen = xmlbuflen; ++ nbdata->buflen = xmlbuflen+1; + memcpy(nbdata->buffer, xmlbuffer, xmlbuflen); ++ nbdata->buffer[xmlbuflen] = '\0'; + + } else { + int err = hwloc_nolibxml_read_file(xmlpath, &nbdata->buffer, &nbdata->buflen); +@@ -429,9 +430,10 @@ hwloc_nolibxml_backend_init(struct hwloc_xml_backend_data_s *bdata, + } + + /* allocate a temporary copy buffer that we may modify during parsing */ +- nbdata->copy = malloc(nbdata->buflen); ++ nbdata->copy = malloc(nbdata->buflen+1); + if (!nbdata->copy) + goto out_with_buffer; ++ nbdata->copy[nbdata->buflen] = '\0'; + + bdata->look_init = hwloc_nolibxml_look_init; + bdata->look_done = hwloc_nolibxml_look_done; +@@ -498,7 +500,7 @@ hwloc_nolibxml_import_diff(struct hwloc__xml_import_state_s *state, + ret = hwloc__nolibxml_import_find_child(state, &childstate, &tag); + if (ret < 0) + goto out_with_buffer; +- if (strcmp(tag, "topologydiff")) ++ if (!tag || strcmp(tag, "topologydiff")) + goto out_with_buffer; + + while (1) { +@@ -523,6 +525,7 @@ hwloc_nolibxml_import_diff(struct hwloc__xml_import_state_s *state, + + out_with_buffer: + free(buffer); ++ free(refname); + out: + return -1; + } +@@ -714,7 +717,7 @@ hwloc___nolibxml_prepare_export(hwloc_topology_t topology, struct hwloc__xml_exp + hwloc__xml_export_topology (&childstate, topology, flags); + hwloc__nolibxml_export_end_object(&childstate, "topology"); + +- return ndata->written+1; ++ return ndata->written+1; /* ending \0 */ + } + + static int +diff --git a/src/hwloc/hwloc/topology-xml.c b/src/hwloc/hwloc/topology-xml.c +index cfa90f8..3e1dbc0 100644 +--- a/src/hwloc/hwloc/topology-xml.c ++++ b/src/hwloc/hwloc/topology-xml.c +@@ -2,7 +2,7 @@ + * Copyright © 2009 CNRS + * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2011 Université Bordeaux +- * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. ++ * Copyright © 2009-2018 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. + */ + +@@ -598,8 +598,11 @@ hwloc__xml_v1import_distances(struct hwloc_xml_backend_data_s *data, + matrix[i] = val * latbase; + + ret = state->global->close_tag(&childstate); +- if (ret < 0) ++ if (ret < 0) { ++ free(matrix); ++ free(v1dist); + return -1; ++ } + + state->global->close_child(&childstate); + } +@@ -1804,18 +1807,18 @@ hwloc_topology_diff_load_xml(const char *xmlpath, + struct hwloc__xml_import_state_s state; + struct hwloc_xml_backend_data_s fakedata; /* only for storing global info during parsing */ + hwloc_localeswitch_declare; +- const char *basename; ++ const char *local_basename; + int force_nolibxml; + int ret; + + state.global = &fakedata; + +- basename = strrchr(xmlpath, '/'); +- if (basename) +- basename++; ++ local_basename = strrchr(xmlpath, '/'); ++ if (local_basename) ++ local_basename++; + else +- basename = xmlpath; +- fakedata.msgprefix = strdup(basename); ++ local_basename = xmlpath; ++ fakedata.msgprefix = strdup(local_basename); + + hwloc_components_init(); + assert(hwloc_nolibxml_callbacks); +@@ -2732,7 +2735,7 @@ hwloc_xml_component_instantiate(struct hwloc_disc_component *component, + const char * xmlpath = (const char *) _data1; + const char * xmlbuffer = (const char *) _data2; + int xmlbuflen = (int)(uintptr_t) _data3; +- const char *basename; ++ const char *local_basename; + int err; + + assert(hwloc_nolibxml_callbacks); /* the core called components_init() for the component's topology */ +@@ -2764,15 +2767,15 @@ hwloc_xml_component_instantiate(struct hwloc_disc_component *component, + backend->is_thissystem = 0; + + if (xmlpath) { +- basename = strrchr(xmlpath, '/'); +- if (basename) +- basename++; ++ local_basename = strrchr(xmlpath, '/'); ++ if (local_basename) ++ local_basename++; + else +- basename = xmlpath; ++ local_basename = xmlpath; + } else { +- basename = "xmlbuffer"; ++ local_basename = "xmlbuffer"; + } +- data->msgprefix = strdup(basename); ++ data->msgprefix = strdup(local_basename); + + force_nolibxml = hwloc_nolibxml_import(); + retry: +diff --git a/src/hwloc/hwloc/topology.c b/src/hwloc/hwloc/topology.c +index fb88c39..6e51aa4 100644 +--- a/src/hwloc/hwloc/topology.c ++++ b/src/hwloc/hwloc/topology.c +@@ -74,26 +74,28 @@ int hwloc_hide_errors(void) + + void hwloc_report_os_error(const char *msg, int line) + { +- static int reported = 0; +- +- if (!reported && !hwloc_hide_errors()) { +- fprintf(stderr, "****************************************************************************\n"); +- fprintf(stderr, "* hwloc %s has encountered what looks like an error from the operating system.\n", HWLOC_VERSION); +- fprintf(stderr, "*\n"); +- fprintf(stderr, "* %s\n", msg); +- fprintf(stderr, "* Error occurred in topology.c line %d\n", line); +- fprintf(stderr, "*\n"); +- fprintf(stderr, "* The following FAQ entry in the hwloc documentation may help:\n"); +- fprintf(stderr, "* What should I do when hwloc reports \"operating system\" warnings?\n"); +- fprintf(stderr, "* Otherwise please report this error message to the hwloc user's mailing list,\n"); ++ static int reported = 0; ++ ++ if (!reported && !hwloc_hide_errors()) { ++ fprintf(stderr, "****************************************************************************\n"); ++ fprintf(stderr, "* hwloc %s received invalid information from the operating system.\n", HWLOC_VERSION); ++ fprintf(stderr, "*\n"); ++ fprintf(stderr, "* %s\n", msg); ++ fprintf(stderr, "* Error occurred in topology.c line %d\n", line); ++ fprintf(stderr, "*\n"); ++ fprintf(stderr, "* The following FAQ entry in the hwloc documentation may help:\n"); ++ fprintf(stderr, "* What should I do when hwloc reports \"operating system\" warnings?\n"); ++ fprintf(stderr, "* Otherwise please report this error message to the hwloc user's mailing list,\n"); + #ifdef HWLOC_LINUX_SYS +- fprintf(stderr, "* along with the files generated by the hwloc-gather-topology script.\n"); ++ fprintf(stderr, "* along with the files generated by the hwloc-gather-topology script.\n"); + #else +- fprintf(stderr, "* along with any relevant topology information from your platform.\n"); ++ fprintf(stderr, "* along with any relevant topology information from your platform.\n"); + #endif +- fprintf(stderr, "****************************************************************************\n"); +- reported = 1; +- } ++ fprintf(stderr, "* \n"); ++ fprintf(stderr, "* hwloc will now ignore this invalid topology information and continue.\n"); ++ fprintf(stderr, "****************************************************************************\n"); ++ reported = 1; ++ } + } + + #if defined(HAVE_SYSCTLBYNAME) +@@ -235,7 +237,7 @@ hwloc_setup_pu_level(struct hwloc_topology *topology, + static void + hwloc_debug_print_object(int indent __hwloc_attribute_unused, hwloc_obj_t obj) + { +- char type[64], idx[10], attr[1024], *cpuset = NULL; ++ char type[64], idx[12], attr[1024], *cpuset = NULL; + hwloc_debug("%*s", 2*indent, ""); + hwloc_obj_type_snprintf(type, sizeof(type), obj, 1); + if (obj->os_index != HWLOC_UNKNOWN_INDEX) +@@ -1377,7 +1379,7 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur + if (report_error) { + char childstr[512]; + char objstr[512]; +- char msg[1024]; ++ char msg[1100]; + hwloc__report_error_format_obj(objstr, sizeof(objstr), obj); + hwloc__report_error_format_obj(childstr, sizeof(childstr), child); + snprintf(msg, sizeof(msg), "%s intersects with %s without inclusion!", objstr, childstr); +@@ -3131,11 +3133,19 @@ next_noncpubackend: + hwloc_filter_bridges(topology, topology->levels[0][0]); + hwloc_debug_print_objects(0, topology->levels[0][0]); + +- hwloc_debug("%s", "\nRemoving empty objects except numa nodes and PCI devices\n"); ++ hwloc_debug("%s", "\nRemoving empty objects\n"); + remove_empty(topology, &topology->levels[0][0]); +- if (!topology->levels[0][0]) { ++ if (!topology->levels[0][0]) { + fprintf(stderr, "Topology became empty, aborting!\n"); +- abort(); ++ return -1; ++ } ++ if (hwloc_bitmap_iszero(topology->levels[0][0]->cpuset)) { ++ fprintf(stderr, "Topology does not contain any PU, aborting!\n"); ++ return -1; ++ } ++ if (hwloc_bitmap_iszero(topology->levels[0][0]->nodeset)) { ++ fprintf(stderr, "Topology does not contain any NUMA node, aborting!\n"); ++ return -1; + } + hwloc_debug_print_objects(0, topology->levels[0][0]); + +@@ -3671,8 +3681,13 @@ restrict_object_by_cpuset(hwloc_topology_t topology, unsigned long flags, hwloc_ + if (modified) { + for_each_child_safe(child, obj, pchild) + restrict_object_by_cpuset(topology, flags, pchild, droppedcpuset, droppednodeset); ++ /* if some hwloc_bitmap_first(child->complete_cpuset) changed, children might need to be reordered */ ++ hwloc__reorder_children(obj); ++ + for_each_memory_child_safe(child, obj, pchild) + restrict_object_by_cpuset(topology, flags, pchild, droppedcpuset, droppednodeset); ++ /* local NUMA nodes have the same cpusets, no need to reorder them */ ++ + /* Nothing to restrict under I/O or Misc */ + } + +diff --git a/src/hwloc/hwloc/traversal.c b/src/hwloc/hwloc/traversal.c +index f5d610a..9c5e626 100644 +--- a/src/hwloc/hwloc/traversal.c ++++ b/src/hwloc/hwloc/traversal.c +@@ -442,7 +442,7 @@ hwloc_obj_type_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t + else + return hwloc_snprintf(string, size, "%s", hwloc_obj_type_string(type)); + case HWLOC_OBJ_BRIDGE: +- return snprintf(string, size, obj->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_PCI ? "PCIBridge" : "HostBridge"); ++ return hwloc_snprintf(string, size, obj->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_PCI ? "PCIBridge" : "HostBridge"); + case HWLOC_OBJ_PCI_DEVICE: + return hwloc_snprintf(string, size, "PCI"); + case HWLOC_OBJ_OS_DEVICE: +@@ -561,9 +561,9 @@ hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t + snprintf(down, sizeof(down), "buses=%04x:[%02x-%02x]", + obj->attr->bridge.downstream.pci.domain, obj->attr->bridge.downstream.pci.secondary_bus, obj->attr->bridge.downstream.pci.subordinate_bus); + if (*up) +- res = snprintf(string, size, "%s%s%s", up, separator, down); ++ res = hwloc_snprintf(string, size, "%s%s%s", up, separator, down); + else +- res = snprintf(string, size, "%s", down); ++ res = hwloc_snprintf(string, size, "%s", down); + } + break; + case HWLOC_OBJ_PCI_DEVICE: +@@ -571,10 +571,10 @@ hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t + char linkspeed[64]= ""; + if (obj->attr->pcidev.linkspeed) + snprintf(linkspeed, sizeof(linkspeed), "%slink=%.2fGB/s", separator, obj->attr->pcidev.linkspeed); +- res = snprintf(string, size, "busid=%04x:%02x:%02x.%01x%sid=%04x:%04x%sclass=%04x(%s)%s", +- obj->attr->pcidev.domain, obj->attr->pcidev.bus, obj->attr->pcidev.dev, obj->attr->pcidev.func, separator, +- obj->attr->pcidev.vendor_id, obj->attr->pcidev.device_id, separator, +- obj->attr->pcidev.class_id, hwloc_pci_class_string(obj->attr->pcidev.class_id), linkspeed); ++ res = hwloc_snprintf(string, size, "busid=%04x:%02x:%02x.%01x%sid=%04x:%04x%sclass=%04x(%s)%s", ++ obj->attr->pcidev.domain, obj->attr->pcidev.bus, obj->attr->pcidev.dev, obj->attr->pcidev.func, separator, ++ obj->attr->pcidev.vendor_id, obj->attr->pcidev.device_id, separator, ++ obj->attr->pcidev.class_id, hwloc_pci_class_string(obj->attr->pcidev.class_id), linkspeed); + } + break; + default: +diff --git a/src/hwloc/include/Makefile.am b/src/hwloc/include/Makefile.am +index 1b79404..1b2017b 100644 +--- a/src/hwloc/include/Makefile.am ++++ b/src/hwloc/include/Makefile.am +@@ -1,4 +1,4 @@ +-# Copyright © 2009-2017 Inria. All rights reserved. ++# Copyright © 2009-2018 Inria. All rights reserved. + # Copyright © 2009-2010 Université Bordeaux + # Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. + # Copyright © 2011 Oracle and/or its affiliates. All rights reserved. +@@ -42,6 +42,7 @@ noinst_HEADERS = \ + private/misc.h \ + private/xml.h \ + private/components.h \ ++ private/internal-components.h \ + private/cpuid-x86.h \ + private/netloc.h \ + netloc/utarray.h \ +diff --git a/src/hwloc/include/hwloc.h b/src/hwloc/include/hwloc.h +index ce475cb..38117e4 100644 +--- a/src/hwloc/include/hwloc.h ++++ b/src/hwloc/include/hwloc.h +@@ -87,6 +87,10 @@ extern "C" { + * + * Users may check for available features at build time using this number + * (see \ref faq_upgrade). ++ * ++ * \note This should not be confused with HWLOC_VERSION, the library version. ++ * Two stable releases of the same series usually have the same ::HWLOC_API_VERSION ++ * even if their HWLOC_VERSION are different. + */ + #define HWLOC_API_VERSION 0x00020000 + +@@ -1025,10 +1029,13 @@ HWLOC_DECLSPEC int hwloc_obj_add_info(hwloc_obj_t obj, const char *name, const c + + /** \defgroup hwlocality_cpubinding CPU binding + * +- * It is often useful to call hwloc_bitmap_singlify() first so that a single CPU +- * remains in the set. This way, the process will not even migrate between +- * different CPUs inside the given set. +- * Some operating systems also only support that kind of binding. ++ * Some operating systems only support binding threads or processes to a single PU. ++ * Others allow binding to larger sets such as entire Cores or Packages or ++ * even random sets of invididual PUs. In such operating system, the scheduler ++ * is free to run the task on one of these PU, then migrate it to another PU, etc. ++ * It is often useful to call hwloc_bitmap_singlify() on the target CPU set before ++ * passing it to the binding function to avoid these expensive migrations. ++ * See the documentation of hwloc_bitmap_singlify() for details. + * + * Some operating systems do not provide all hwloc-supported + * mechanisms to bind processes, threads, etc. +diff --git a/src/hwloc/include/hwloc/autogen/config.h.in b/src/hwloc/include/hwloc/autogen/config.h.in +index 58fa76e..e479efc 100644 +--- a/src/hwloc/include/hwloc/autogen/config.h.in ++++ b/src/hwloc/include/hwloc/autogen/config.h.in +@@ -1,6 +1,6 @@ + /* -*- c -*- + * Copyright © 2009 CNRS +- * Copyright © 2009-2017 Inria. All rights reserved. ++ * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2012 Université Bordeaux + * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. +@@ -11,6 +11,12 @@ + #ifndef HWLOC_CONFIG_H + #define HWLOC_CONFIG_H + ++#undef HWLOC_VERSION ++#undef HWLOC_VERSION_MAJOR ++#undef HWLOC_VERSION_MINOR ++#undef HWLOC_VERSION_RELEASE ++#undef HWLOC_VERSION_GREEK ++ + #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) + # define __hwloc_restrict __restrict + #else +@@ -127,6 +133,7 @@ + # define __hwloc_attribute_pure + #endif + ++#ifndef __hwloc_attribute_deprecated /* allow the user to disable these warnings by defining this macro to nothing */ + #ifdef HWLOC_HAVE_ATTRIBUTE_DEPRECATED + #define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED + #elif defined(__GNUC__) +@@ -139,6 +146,7 @@ + #else + # define __hwloc_attribute_deprecated + #endif ++#endif + + #ifdef HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS + #define __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS +diff --git a/src/hwloc/include/hwloc/bitmap.h b/src/hwloc/include/hwloc/bitmap.h +index d8adf0b..bae623c 100644 +--- a/src/hwloc/include/hwloc/bitmap.h ++++ b/src/hwloc/include/hwloc/bitmap.h +@@ -1,6 +1,6 @@ + /* + * Copyright © 2009 CNRS +- * Copyright © 2009-2017 Inria. All rights reserved. ++ * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2012 Université Bordeaux + * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. +@@ -24,19 +24,31 @@ extern "C" { + + /** \defgroup hwlocality_bitmap The bitmap API + * +- * The ::hwloc_bitmap_t type represents a set of objects, typically OS +- * processors -- which may actually be hardware threads (represented +- * by ::hwloc_cpuset_t, which is a typedef for ::hwloc_bitmap_t) -- or +- * memory nodes (represented by ::hwloc_nodeset_t, which is also a +- * typedef for ::hwloc_bitmap_t). +- * +- * Both CPU and node sets are always indexed by OS physical number. +- * +- * \note CPU sets and nodesets are described in \ref hwlocality_object_sets. +- * ++ * The ::hwloc_bitmap_t type represents a set of integers (positive or null). + * A bitmap may be of infinite size (all bits are set after some point). + * A bitmap may even be full if all bits are set. + * ++ * Bitmaps are used by hwloc for sets of OS processors ++ * (which may actually be hardware threads) as by ::hwloc_cpuset_t ++ * (a typedef for ::hwloc_bitmap_t), or sets of NUMA memory nodes ++ * as ::hwloc_nodeset_t (also a typedef for ::hwloc_bitmap_t). ++ * Those are used for cpuset and nodeset fields in the ::hwloc_obj structure, ++ * see \ref hwlocality_object_sets. ++ * ++ * Both CPU and node sets are always indexed by OS physical number. ++ * However users should usually not build CPU and node sets manually ++ * (e.g. with hwloc_bitmap_set()). ++ * One should rather use existing object sets and combine them with ++ * hwloc_bitmap_or(), etc. ++ * For instance, binding the current thread on a pair of cores may be performed with: ++ * \code ++ * hwloc_obj_t core1 = ... , core2 = ... ; ++ * hwloc_bitmap_t set = hwloc_bitmap_alloc(); ++ * hwloc_bitmap_or(set, core1->cpuset, core2->cpuset); ++ * hwloc_set_cpubind(topology, set, HWLOC_CPUBIND_THREAD); ++ * hwloc_bitmap_free(set); ++ * \endcode ++ * + * \note Most functions below return an int that may be negative in case of + * error. The usual error case would be an internal failure to realloc/extend + * the storage of the bitmap (\p errno would be set to \c ENOMEM). +@@ -217,6 +229,19 @@ HWLOC_DECLSPEC int hwloc_bitmap_clr_range(hwloc_bitmap_t bitmap, unsigned begin, + * May be useful before binding so that the process does not + * have a chance of migrating between multiple logical CPUs + * in the original mask. ++ * Instead of running the task on any PU inside the given CPU set, ++ * the operating system scheduler will be forced to run it on a single ++ * of these PUs. ++ * It avoids a migration overhead and cache-line ping-pongs between PUs. ++ * ++ * \note This function is NOT meant to distribute multiple processes ++ * within a single CPU set. It always return the same single bit when ++ * called multiple times on the same input set. hwloc_distrib() may ++ * be used for generating CPU sets to distribute multiple tasks below ++ * a single multi-PU object. ++ * ++ * \note This function cannot be applied to an object set directly. It ++ * should be applied to a copy (which may be obtained with hwloc_bitmap_dup()). + */ + HWLOC_DECLSPEC int hwloc_bitmap_singlify(hwloc_bitmap_t bitmap); + +@@ -231,14 +256,22 @@ HWLOC_DECLSPEC unsigned long hwloc_bitmap_to_ulong(hwloc_const_bitmap_t bitmap) + /** \brief Convert the \p i -th subset of bitmap \p bitmap into unsigned long mask */ + HWLOC_DECLSPEC unsigned long hwloc_bitmap_to_ith_ulong(hwloc_const_bitmap_t bitmap, unsigned i) __hwloc_attribute_pure; + +-/** \brief Test whether index \p id is part of bitmap \p bitmap */ ++/** \brief Test whether index \p id is part of bitmap \p bitmap. ++ * ++ * \return 1 if the bit at index \p id is set in bitmap \p bitmap, 0 otherwise. ++ */ + HWLOC_DECLSPEC int hwloc_bitmap_isset(hwloc_const_bitmap_t bitmap, unsigned id) __hwloc_attribute_pure; + +-/** \brief Test whether bitmap \p bitmap is empty */ ++/** \brief Test whether bitmap \p bitmap is empty ++ * ++ * \return 1 if bitmap is empty, 0 otherwise. ++ */ + HWLOC_DECLSPEC int hwloc_bitmap_iszero(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure; + + /** \brief Test whether bitmap \p bitmap is completely full + * ++ * \return 1 if bitmap is full, 0 otherwise. ++ * + * \note A full bitmap is always infinitely set. + */ + HWLOC_DECLSPEC int hwloc_bitmap_isfull(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure; +@@ -365,22 +398,42 @@ HWLOC_DECLSPEC int hwloc_bitmap_not (hwloc_bitmap_t res, hwloc_const_bitmap_t bi + * Comparing bitmaps. + */ + +-/** \brief Test whether bitmaps \p bitmap1 and \p bitmap2 intersects */ ++/** \brief Test whether bitmaps \p bitmap1 and \p bitmap2 intersects. ++ * ++ * \return 1 if bitmaps intersect, 0 otherwise. ++ */ + HWLOC_DECLSPEC int hwloc_bitmap_intersects (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure; + + /** \brief Test whether bitmap \p sub_bitmap is part of bitmap \p super_bitmap. + * ++ * \return 1 if \p sub_bitmap is included in \p super_bitmap, 0 otherwise. ++ * + * \note The empty bitmap is considered included in any other bitmap. + */ + HWLOC_DECLSPEC int hwloc_bitmap_isincluded (hwloc_const_bitmap_t sub_bitmap, hwloc_const_bitmap_t super_bitmap) __hwloc_attribute_pure; + +-/** \brief Test whether bitmap \p bitmap1 is equal to bitmap \p bitmap2 */ ++/** \brief Test whether bitmap \p bitmap1 is equal to bitmap \p bitmap2. ++ * ++ * \return 1 if bitmaps are equal, 0 otherwise. ++ */ + HWLOC_DECLSPEC int hwloc_bitmap_isequal (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure; + + /** \brief Compare bitmaps \p bitmap1 and \p bitmap2 using their lowest index. + * +- * Smaller least significant bit is smaller. +- * The empty bitmap is considered higher than anything. ++ * A bitmap is considered smaller if its least significant bit is smaller. ++ * The empty bitmap is considered higher than anything (because its least significant bit does not exist). ++ * ++ * \return -1 if \p bitmap1 is considered smaller than \p bitmap2. ++ * \return 1 if \p bitmap1 is considered larger than \p bitmap2. ++ * ++ * For instance comparing binary bitmaps 0011 and 0110 returns -1 ++ * (hence 0011 is considered smaller than 0110) ++ * because least significant bit of 0011 (0001) is smaller than least significant bit of 0110 (0010). ++ * Comparing 01001 and 00110 would also return -1 for the same reason. ++ * ++ * \return 0 if bitmaps are considered equal, even if they are not strictly equal. ++ * They just need to have the same least significant bit. ++ * For instance, comparing binary bitmaps 0010 and 0110 returns 0 because they have the same least significant bit. + */ + HWLOC_DECLSPEC int hwloc_bitmap_compare_first(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure; + +@@ -390,6 +443,14 @@ HWLOC_DECLSPEC int hwloc_bitmap_compare_first(hwloc_const_bitmap_t bitmap1, hwlo + * Compare last indexes first, then second, etc. + * The empty bitmap is considered lower than anything. + * ++ * \return -1 if \p bitmap1 is considered smaller than \p bitmap2. ++ * \return 1 if \p bitmap1 is considered larger than \p bitmap2. ++ * \return 0 if bitmaps are equal (contrary to hwloc_bitmap_compare_first()). ++ * ++ * For instance comparing binary bitmaps 0011 and 0110 returns -1 ++ * (hence 0011 is considered smaller than 0110). ++ * Comparing 00101 and 01010 returns -1 too. ++ * + * \note This is different from the non-existing hwloc_bitmap_compare_last() + * which would only compare the highest index of each bitmap. + */ +diff --git a/src/hwloc/include/hwloc/diff.h b/src/hwloc/include/hwloc/diff.h +index 3588d26..79f2df3 100644 +--- a/src/hwloc/include/hwloc/diff.h ++++ b/src/hwloc/include/hwloc/diff.h +@@ -1,5 +1,5 @@ + /* +- * Copyright © 2013-2017 Inria. All rights reserved. ++ * Copyright © 2013-2018 Inria. All rights reserved. + * See COPYING in top-level directory. + */ + +@@ -43,6 +43,8 @@ extern "C" { + * More complex differences such as adding or removing objects cannot + * be represented in the difference structures and therefore return + * errors. ++ * Differences between object sets or topology-wide allowed sets, ++ * cannot be represented either. + * + * It means that there is no need to apply the difference when + * looking at the tree organization (how many levels, how many +@@ -269,6 +271,9 @@ HWLOC_DECLSPEC int hwloc_topology_diff_load_xmlbuffer(const char *xmlbuffer, int + * that contains the reference topology. + * This attribute is given back when reading the diff from XML. + * ++ * The returned buffer ends with a \0 that is included in the returned ++ * length. ++ * + * \note The XML buffer should later be freed with hwloc_free_xmlbuffer(). + */ + HWLOC_DECLSPEC int hwloc_topology_diff_export_xmlbuffer(hwloc_topology_diff_t diff, const char *refname, char **xmlbuffer, int *buflen); +diff --git a/src/hwloc/include/hwloc/export.h b/src/hwloc/include/hwloc/export.h +index c7691c0..b178b77 100644 +--- a/src/hwloc/include/hwloc/export.h ++++ b/src/hwloc/include/hwloc/export.h +@@ -1,5 +1,5 @@ + /* +- * Copyright © 2009-2017 Inria. All rights reserved. ++ * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2012 Université Bordeaux + * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. +@@ -86,6 +86,9 @@ HWLOC_DECLSPEC int hwloc_topology_export_xml(hwloc_topology_t topology, const ch + * back by a process using hwloc 1.x, one should consider detecting + * it at runtime and using the corresponding export format. + * ++ * The returned buffer ends with a \0 that is included in the returned ++ * length. ++ * + * \p flags is a OR'ed set of ::hwloc_topology_export_xml_flags_e. + * + * \return -1 if a failure occured. +diff --git a/src/hwloc/include/hwloc/helper.h b/src/hwloc/include/hwloc/helper.h +index 25ca600..57a7643 100644 +--- a/src/hwloc/include/hwloc/helper.h ++++ b/src/hwloc/include/hwloc/helper.h +@@ -367,7 +367,13 @@ hwloc_get_next_obj_covering_cpuset_by_type(hwloc_topology_t topology, hwloc_cons + * package has fewer caches than its peers. + */ + +-/** \brief Returns the ancestor object of \p obj at depth \p depth. */ ++/** \brief Returns the ancestor object of \p obj at depth \p depth. ++ * ++ * \note \p depth should not be the depth of PU or NUMA objects ++ * since they are ancestors of no objects (except Misc or I/O). ++ * This function rather expects an intermediate level depth, ++ * such as the depth of Packages, Cores, or Caches. ++ */ + static __hwloc_inline hwloc_obj_t + hwloc_get_ancestor_obj_by_depth (hwloc_topology_t topology __hwloc_attribute_unused, int depth, hwloc_obj_t obj) __hwloc_attribute_pure; + static __hwloc_inline hwloc_obj_t +@@ -381,7 +387,13 @@ hwloc_get_ancestor_obj_by_depth (hwloc_topology_t topology __hwloc_attribute_unu + return ancestor; + } + +-/** \brief Returns the ancestor object of \p obj with type \p type. */ ++/** \brief Returns the ancestor object of \p obj with type \p type. ++ * ++ * \note \p type should not be ::HWLOC_OBJ_PU or ::HWLOC_OBJ_NUMANODE ++ * since these objects are ancestors of no objects (except Misc or I/O). ++ * This function rather expects an intermediate object type, ++ * such as ::HWLOC_OBJ_PACKAGE, ::HWLOC_OBJ_CORE, etc. ++ */ + static __hwloc_inline hwloc_obj_t + hwloc_get_ancestor_obj_by_type (hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_type_t type, hwloc_obj_t obj) __hwloc_attribute_pure; + static __hwloc_inline hwloc_obj_t +diff --git a/src/hwloc/include/hwloc/rename.h b/src/hwloc/include/hwloc/rename.h +index 04d6a64..7cef1b2 100644 +--- a/src/hwloc/include/hwloc/rename.h ++++ b/src/hwloc/include/hwloc/rename.h +@@ -585,6 +585,7 @@ extern "C" { + #define hwloc_bitmap_compare_inclusion HWLOC_NAME(bitmap_compare_inclusion) + + #define hwloc_pci_class_string HWLOC_NAME(pci_class_string) ++#define hwloc_linux_pci_link_speed_from_string HWLOC_NAME(linux_pci_link_speed_from_string) + + #define hwloc_cache_type_by_depth_type HWLOC_NAME(cache_type_by_depth_type) + #define hwloc__obj_type_is_normal HWLOC_NAME(_obj_type_is_normal) +@@ -636,6 +637,33 @@ extern "C" { + #define hwloc_components_init HWLOC_NAME(components_init) + #define hwloc_components_fini HWLOC_NAME(components_fini) + ++/* private/internal-private.h */ ++ ++#define hwloc_xml_component HWLOC_NAME(xml_component) ++#define hwloc_synthetic_component HWLOC_NAME(synthetic_component) ++ ++#define hwloc_aix_component HWLOC_NAME(aix_component) ++#define hwloc_bgq_component HWLOC_NAME(bgq_component) ++#define hwloc_darwin_component HWLOC_NAME(darwin_component) ++#define hwloc_freebsd_component HWLOC_NAME(freebsd_component) ++#define hwloc_hpux_component HWLOC_NAME(hpux_component) ++#define hwloc_linux_component HWLOC_NAME(linux_component) ++#define hwloc_netbsd_component HWLOC_NAME(netbsd_component) ++#define hwloc_noos_component HWLOC_NAME(noos_component) ++#define hwloc_solaris_component HWLOC_NAME(solaris_component) ++#define hwloc_windows_component HWLOC_NAME(windows_component) ++#define hwloc_x86_component HWLOC_NAME(x86_component) ++ ++#define hwloc_cuda_component HWLOC_NAME(cuda_component) ++#define hwloc_gl_component HWLOC_NAME(gl_component) ++#define hwloc_linuxio_component HWLOC_NAME(linuxio_component) ++#define hwloc_nvml_component HWLOC_NAME(nvml_component) ++#define hwloc_opencl_component HWLOC_NAME(opencl_component) ++#define hwloc_pci_component HWLOC_NAME(pci_component) ++ ++#define hwloc_xml_libxml_component HWLOC_NAME(xml_libxml_component) ++#define hwloc_xml_nolibxml_component HWLOC_NAME(xml_nolibxml_component) ++ + /* private/private.h */ + + #define hwloc_special_level_s HWLOC_NAME(special_level_s) +diff --git a/src/hwloc/include/private/internal-components.h b/src/hwloc/include/private/internal-components.h +new file mode 100644 +index 0000000..b138a0e +--- /dev/null ++++ b/src/hwloc/include/private/internal-components.h +@@ -0,0 +1,41 @@ ++/* ++ * Copyright © 2018 Inria. All rights reserved. ++ * ++ * See COPYING in top-level directory. ++ */ ++ ++/* List of components defined inside hwloc */ ++ ++#ifndef PRIVATE_INTERNAL_COMPONENTS_H ++#define PRIVATE_INTERNAL_COMPONENTS_H ++ ++/* global discovery */ ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_xml_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_synthetic_component; ++ ++/* CPU discovery */ ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_aix_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_bgq_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_darwin_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_freebsd_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_hpux_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_linux_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_netbsd_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_noos_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_solaris_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_windows_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_x86_component; ++ ++/* I/O discovery */ ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_cuda_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_gl_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_linuxio_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_nvml_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_opencl_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_pci_component; ++ ++/* XML backend */ ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_xml_nolibxml_component; ++HWLOC_DECLSPEC extern const struct hwloc_component hwloc_xml_libxml_component; ++ ++#endif /* PRIVATE_INTERNAL_COMPONENTS_H */ +diff --git a/src/hwloc/include/private/misc.h b/src/hwloc/include/private/misc.h +index 70e3037..e9b90b8 100644 +--- a/src/hwloc/include/private/misc.h ++++ b/src/hwloc/include/private/misc.h +@@ -406,6 +406,29 @@ HWLOC_DECLSPEC int hwloc_bitmap_compare_inclusion(hwloc_const_bitmap_t bitmap1, + /* Return a stringified PCI class. */ + HWLOC_DECLSPEC extern const char * hwloc_pci_class_string(unsigned short class_id); + ++/* Parse a PCI link speed (GT/s) string from Linux sysfs */ ++#ifdef HWLOC_LINUX_SYS ++#include /* for atof() */ ++static __hwloc_inline float ++hwloc_linux_pci_link_speed_from_string(const char *string) ++{ ++ /* don't parse Gen1 with atof() since it expects a localized string ++ * while the kernel sysfs files aren't. ++ */ ++ if (!strncmp(string, "2.5 ", 4)) ++ /* "2.5 GT/s" is Gen1 with 8/10 encoding */ ++ return 2.5 * .8; ++ ++ /* also hardwire Gen2 since it also has a specific encoding */ ++ if (!strncmp(string, "5 ", 2)) ++ /* "5 GT/s" is Gen2 with 8/10 encoding */ ++ return 5 * .8; ++ ++ /* handle Gen3+ in a generic way */ ++ return atof(string) * 128./130; /* Gen3+ encoding is 128/130 */ ++} ++#endif ++ + /* Traverse children of a parent */ + #define for_each_child(child, parent) for(child = parent->first_child; child; child = child->next_sibling) + #define for_each_memory_child(child, parent) for(child = parent->memory_first_child; child; child = child->next_sibling) +@@ -494,6 +517,10 @@ hwloc__obj_type_is_icache(hwloc_obj_type_t type) + #define fabsf(f) fabs((double)(f)) + #endif + ++#if !HAVE_DECL_MODFF ++#define modff(x,iptr) (float)modf((double)x,(double *)iptr) ++#endif ++ + #if HAVE_DECL__SC_PAGE_SIZE + #define hwloc_getpagesize() sysconf(_SC_PAGE_SIZE) + #elif HAVE_DECL__SC_PAGESIZE +@@ -528,7 +555,10 @@ typedef SSIZE_T ssize_t; + # ifndef S_ISDIR + # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) + # endif +-# if !HAVE_DECL_STRCASECMP ++# ifndef S_IRWXU ++# define S_IRWXU 00700 ++# endif ++# ifndef HWLOC_HAVE_DECL_STRCASECMP + # define strcasecmp _stricmp + # endif + # if !HAVE_DECL_SNPRINTF +@@ -542,7 +572,7 @@ typedef SSIZE_T ssize_t; + # endif + #endif + +-#if defined HWLOC_WIN_SYS && !defined __MINGW32__ ++#if defined HWLOC_WIN_SYS && !defined __MINGW32__ && !defined(__CYGWIN__) + /* MSVC doesn't support C99 variable-length array */ + #include + #define HWLOC_VLA(_type, _name, _nb) _type *_name = (_type*) _alloca((_nb)*sizeof(_type)) +diff --git a/src/hwloc/netloc/support.c b/src/hwloc/netloc/support.c +index 7ad9513..e17c937 100644 +--- a/src/hwloc/netloc/support.c ++++ b/src/hwloc/netloc/support.c +@@ -1,7 +1,7 @@ + /* + * Copyright © 2013-2014 University of Wisconsin-La Crosse. + * All rights reserved. +- * Copyright © 2016-2017 Inria. All rights reserved. ++ * Copyright © 2016-2018 Inria. All rights reserved. + * + * $COPYRIGHT$ + * +@@ -17,7 +17,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + + char *netloc_line_get_next_token(char **string, char c) + { +diff --git a/src/hwloc/tests/hwloc/hwloc_backends.c b/src/hwloc/tests/hwloc/hwloc_backends.c +index f969c45..745961a 100644 +--- a/src/hwloc/tests/hwloc/hwloc_backends.c ++++ b/src/hwloc/tests/hwloc/hwloc_backends.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include /* for S_IRWXU */ + static inline int mkstemp(char *name) + { + mktemp(name); +diff --git a/src/hwloc/tests/hwloc/hwloc_distances.c b/src/hwloc/tests/hwloc/hwloc_distances.c +index 0a7c8d1..8af0802 100644 +--- a/src/hwloc/tests/hwloc/hwloc_distances.c ++++ b/src/hwloc/tests/hwloc/hwloc_distances.c +@@ -64,7 +64,7 @@ int main(void) + hwloc_topology_t topology; + struct hwloc_distances_s *distances[2]; + hwloc_obj_t objs[16]; +- uint64_t values[16*16], value1, value2; ++ hwloc_uint64_t values[16*16], value1, value2; + int topodepth; + unsigned i, j, k, nr; + int err; +diff --git a/src/hwloc/tests/hwloc/hwloc_get_next_obj_covering_cpuset.c b/src/hwloc/tests/hwloc/hwloc_get_next_obj_covering_cpuset.c +index 68a84ba..144e6cc 100644 +--- a/src/hwloc/tests/hwloc/hwloc_get_next_obj_covering_cpuset.c ++++ b/src/hwloc/tests/hwloc/hwloc_get_next_obj_covering_cpuset.c +@@ -1,6 +1,6 @@ + /* + * Copyright © 2009 CNRS +- * Copyright © 2009-2017 Inria. All rights reserved. ++ * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2010 Université Bordeaux + * Copyright © 2011 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. +@@ -33,7 +33,7 @@ main (void) + err = hwloc_topology_init (&topology); + if (err) + return EXIT_FAILURE; +- hwloc_topology_set_synthetic (topology, "pack:8 cores:2 1"); ++ hwloc_topology_set_synthetic (topology, "pack:8 core:2 1"); + err = hwloc_topology_load (topology); + if (err) + return EXIT_FAILURE; +@@ -60,7 +60,7 @@ main (void) + err = hwloc_topology_init (&topology); + if (err) + return EXIT_FAILURE; +- hwloc_topology_set_synthetic (topology, "nodes:2 pack:5 cores:3 4"); ++ hwloc_topology_set_synthetic (topology, "node:2 pack:5 core:3 4"); + err = hwloc_topology_load (topology); + if (err) + return EXIT_FAILURE; +diff --git a/src/hwloc/tests/hwloc/hwloc_get_obj_inside_cpuset.c b/src/hwloc/tests/hwloc/hwloc_get_obj_inside_cpuset.c +index bd989ce..e6fa4c9 100644 +--- a/src/hwloc/tests/hwloc/hwloc_get_obj_inside_cpuset.c ++++ b/src/hwloc/tests/hwloc/hwloc_get_obj_inside_cpuset.c +@@ -1,6 +1,6 @@ + /* + * Copyright © 2009 CNRS +- * Copyright © 2009-2017 Inria. All rights reserved. ++ * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009 Université Bordeaux + * Copyright © 2011 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. +@@ -28,7 +28,7 @@ main (void) + if (err) + return EXIT_FAILURE; + +- hwloc_topology_set_synthetic (topology, "nodes:2 pack:3 l2:4 cores:5 6"); ++ hwloc_topology_set_synthetic (topology, "node:2 pack:3 l2:4 core:5 6"); + + err = hwloc_topology_load (topology); + if (err) +diff --git a/src/hwloc/tests/hwloc/hwloc_groups.c b/src/hwloc/tests/hwloc/hwloc_groups.c +index 9e713b5..24457a7 100644 +--- a/src/hwloc/tests/hwloc/hwloc_groups.c ++++ b/src/hwloc/tests/hwloc/hwloc_groups.c +@@ -16,7 +16,7 @@ int main(void) + hwloc_topology_t topology; + hwloc_obj_t obj; + hwloc_obj_t objs[32]; +- uint64_t values[32*32]; ++ hwloc_uint64_t values[32*32]; + int depth; + hwloc_obj_type_t type; + unsigned width; +diff --git a/src/hwloc/tests/hwloc/hwloc_topology_dup.c b/src/hwloc/tests/hwloc/hwloc_topology_dup.c +index 3e44b8d..6688839 100644 +--- a/src/hwloc/tests/hwloc/hwloc_topology_dup.c ++++ b/src/hwloc/tests/hwloc/hwloc_topology_dup.c +@@ -17,7 +17,7 @@ int main(void) + hwloc_bitmap_t cpuset = hwloc_bitmap_alloc(); + struct hwloc_distances_s *distances; + hwloc_obj_t nodes[3], cores[6]; +- uint64_t node_distances[9], core_distances[36]; ++ hwloc_uint64_t node_distances[9], core_distances[36]; + unsigned i,j,nr; + int err; + +diff --git a/src/hwloc/tests/hwloc/hwloc_topology_restrict.c b/src/hwloc/tests/hwloc/hwloc_topology_restrict.c +index 131a72a..803ebd9 100644 +--- a/src/hwloc/tests/hwloc/hwloc_topology_restrict.c ++++ b/src/hwloc/tests/hwloc/hwloc_topology_restrict.c +@@ -1,5 +1,5 @@ + /* +- * Copyright © 2011-2017 Inria. All rights reserved. ++ * Copyright © 2011-2018 Inria. All rights reserved. + * Copyright © 2011 Université Bordeaux. All rights reserved. + * See COPYING in top-level directory. + */ +@@ -106,7 +106,7 @@ int main(void) + { + hwloc_bitmap_t cpuset = hwloc_bitmap_alloc(); + hwloc_obj_t nodes[3], cores[6]; +- uint64_t node_distances[9], core_distances[36]; ++ hwloc_uint64_t node_distances[9], core_distances[36]; + hwloc_obj_t obj; + unsigned i,j; + int err; +@@ -224,6 +224,17 @@ int main(void) + hwloc_topology_check(topology); + hwloc_topology_destroy(topology); + ++ /* check that restricting PUs maintains ordering of normal children */ ++ printf("restricting so that PUs get reordered\n"); ++ hwloc_topology_init(&topology); ++ hwloc_topology_set_synthetic(topology, "node:1 core:2 pu:2(indexes=0,2,1,3)"); ++ hwloc_topology_load(topology); ++ hwloc_bitmap_zero(cpuset); ++ hwloc_bitmap_set_range(cpuset, 1, 2); ++ err = hwloc_topology_restrict(topology, cpuset, 0); ++ assert(!err); ++ hwloc_topology_destroy(topology); ++ + hwloc_bitmap_free(cpuset); + + return 0; +diff --git a/src/hwloc/tests/hwloc/linux/allowed/test-topology.sh.in b/src/hwloc/tests/hwloc/linux/allowed/test-topology.sh.in +index 4d67fc4..5ddc9ff 100644 +--- a/src/hwloc/tests/hwloc/linux/allowed/test-topology.sh.in ++++ b/src/hwloc/tests/hwloc/linux/allowed/test-topology.sh.in +@@ -73,10 +73,10 @@ test_topology () + else + if [ "$HWLOC_UPDATE_TEST_TOPOLOGY_OUTPUT" != 1 ] + then +- diff @HWLOC_DIFF_U@ -b "$expected_output" "$output" ++ @DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ "$expected_output" "$output" + result=$? + else +- if ! diff "$expected_output" "$output" >/dev/null ++ if ! @DIFF@ "$expected_output" "$output" >/dev/null + then + cp -f "$output" "$expected_output" + echo "Updated $expected_output" +diff --git a/src/hwloc/tests/hwloc/linux/gather/test-gather-topology.sh.in b/src/hwloc/tests/hwloc/linux/gather/test-gather-topology.sh.in +index 07b6951..90415f1 100644 +--- a/src/hwloc/tests/hwloc/linux/gather/test-gather-topology.sh.in ++++ b/src/hwloc/tests/hwloc/linux/gather/test-gather-topology.sh.in +@@ -2,7 +2,7 @@ + #-*-sh-*- + + # +-# Copyright © 2012-2017 Inria. All rights reserved. ++# Copyright © 2012-2018 Inria. All rights reserved. + # Copyright © 2010-2014 Cisco Systems, Inc. All rights reserved. + # Copyright © 2011 Université Bordeaux + # See COPYING in top-level directory. +@@ -82,7 +82,7 @@ if ! "$lstopo" --no-io "$tmpdir/save2.xml" ; then + fi + + echo "Comparing XML outputs..." +-( cd $tmpdir && diff -u save1.xml save2.xml ) ++( cd $tmpdir && @DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ save1.xml save2.xml ) + result=$? + + rm -rf "$tmpdir" +diff --git a/src/hwloc/tests/hwloc/linux/test-topology.sh.in b/src/hwloc/tests/hwloc/linux/test-topology.sh.in +index cc094aa..107eca9 100644 +--- a/src/hwloc/tests/hwloc/linux/test-topology.sh.in ++++ b/src/hwloc/tests/hwloc/linux/test-topology.sh.in +@@ -65,10 +65,10 @@ test_topology () + else + if [ "$HWLOC_UPDATE_TEST_TOPOLOGY_OUTPUT" != 1 ] + then +- diff @HWLOC_DIFF_U@ -b "$expected_output" "$output" ++ @DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ "$expected_output" "$output" + result=$? + else +- if ! diff "$expected_output" "$output" >/dev/null ++ if ! @DIFF@ "$expected_output" "$output" >/dev/null + then + cp -f "$output" "$expected_output" + echo "Updated $expected_output" +diff --git a/src/hwloc/tests/hwloc/opencl.c b/src/hwloc/tests/hwloc/opencl.c +index 74592b7..322224a 100644 +--- a/src/hwloc/tests/hwloc/opencl.c ++++ b/src/hwloc/tests/hwloc/opencl.c +@@ -5,6 +5,7 @@ + + #include + #include ++#define CL_TARGET_OPENCL_VERSION 220 + #ifdef __APPLE__ + #include + #else +@@ -35,8 +36,10 @@ int main(void) + if (!platform_ids) + return 0; + clret = clGetPlatformIDs(nrp, platform_ids, &nrp); +- if (CL_SUCCESS != clret || !nrp) ++ if (CL_SUCCESS != clret || !nrp) { ++ free(platform_ids); + return 0; ++ } + + count = 0; + for(i=0; i + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +diff --git a/src/hwloc/tests/hwloc/wrapper.sh.in b/src/hwloc/tests/hwloc/wrapper.sh.in +index 1f1b2a9..d175160 100644 +--- a/src/hwloc/tests/hwloc/wrapper.sh.in ++++ b/src/hwloc/tests/hwloc/wrapper.sh.in +@@ -2,11 +2,12 @@ + #-*-sh-*- + + # +-# Copyright © 2012-2017 Inria. All rights reserved. ++# Copyright © 2012-2018 Inria. All rights reserved. + # See COPYING in top-level directory. + # + + HWLOC_top_builddir="@HWLOC_top_builddir@" ++xmlbuffer=xmlbuffer@EXEEXT@ + + HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/src + export HWLOC_PLUGINS_PATH +@@ -17,4 +18,11 @@ export HWLOC_DEBUG_CHECK + HWLOC_LIBXML_CLEANUP=1 + export HWLOC_LIBXML_CLEANUP + +-"$@" ++if test "`basename $1`" = "$xmlbuffer"; then ++ "$@" 1 1 ++ "$@" 0 1 ++ "$@" 1 0 ++ "$@" 0 0 ++else ++ "$@" ++fi +diff --git a/src/hwloc/tests/hwloc/x86/test-topology.sh.in b/src/hwloc/tests/hwloc/x86/test-topology.sh.in +index bfad8af..3e1315b 100644 +--- a/src/hwloc/tests/hwloc/x86/test-topology.sh.in ++++ b/src/hwloc/tests/hwloc/x86/test-topology.sh.in +@@ -61,10 +61,10 @@ test_topology () + else + if [ "$HWLOC_UPDATE_TEST_TOPOLOGY_OUTPUT" != 1 ] + then +- diff -b @HWLOC_DIFF_U@ "$expected_output" "$output" ++ @DIFF@ -b @HWLOC_DIFF_U@ "$expected_output" "$output" + result=$? + else +- if ! diff "$expected_output" "$output" >/dev/null ++ if ! @DIFF@ "$expected_output" "$output" >/dev/null + then + cp -f "$output" "$expected_output" + echo "Updated $expected_output" +diff --git a/src/hwloc/tests/hwloc/xml/test-topology.sh.in b/src/hwloc/tests/hwloc/xml/test-topology.sh.in +index b87d295..c283e63 100644 +--- a/src/hwloc/tests/hwloc/xml/test-topology.sh.in ++++ b/src/hwloc/tests/hwloc/xml/test-topology.sh.in +@@ -3,7 +3,7 @@ + + # + # Copyright © 2009 CNRS +-# Copyright © 2009-2017 Inria. All rights reserved. ++# Copyright © 2009-2018 Inria. All rights reserved. + # Copyright © 2009-2012 Université Bordeaux + # Copyright © 2010-2014 Cisco Systems, Inc. All rights reserved. + # See COPYING in top-level directory. +@@ -85,9 +85,9 @@ do_run() + + if [ "$HWLOC_UPDATE_TEST_TOPOLOGY_OUTPUT" != 1 ] + then +- diff @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ "$output" "$file" ++ @DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ "$output" "$file" + else +- if ! diff "$output" "$file" >/dev/null ++ if ! @DIFF@ "$output" "$file" >/dev/null + then + cp -f "$file" "$output" + echo "Updated $filename" +@@ -110,9 +110,9 @@ do_run_with_output() + + if [ "$HWLOC_UPDATE_TEST_TOPOLOGY_OUTPUT" != 1 ] + then +- diff @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ "$output" "$file" ++ @DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ "$output" "$file" + else +- if ! diff "$output" "$file" >/dev/null ++ if ! @DIFF@ "$output" "$file" >/dev/null + then + cp -f "$file" "$output" + echo "Updated ${basename}.xml" +diff --git a/src/hwloc/tests/hwloc/xmlbuffer.c b/src/hwloc/tests/hwloc/xmlbuffer.c +index b3f3ed2..3b90dbd 100644 +--- a/src/hwloc/tests/hwloc/xmlbuffer.c ++++ b/src/hwloc/tests/hwloc/xmlbuffer.c +@@ -13,7 +13,7 @@ static int one_test(void) + { + hwloc_topology_t topology; + int size1, size2; +- char *buf1, *buf2; ++ char *buf1, *copy1, *buf2; + int err = 0, i; + char s[129]; + char t[10]; +@@ -43,9 +43,16 @@ static int one_test(void) + hwloc_topology_destroy(topology); + printf("exported to buffer %p length %d\n", buf1, size1); + ++ /* copy the returned buffer to a newly malloc'd one ++ * to check that the returned length is correct (contains ending 0, etc). ++ */ ++ copy1 = malloc(size1); ++ assert(copy1); ++ memcpy(copy1, buf1, size1); ++ + hwloc_topology_init(&topology); + hwloc_topology_set_all_types_filter(topology, HWLOC_TYPE_FILTER_KEEP_ALL); +- assert(!hwloc_topology_set_xmlbuffer(topology, buf1, size1)); ++ assert(!hwloc_topology_set_xmlbuffer(topology, copy1, size1)); + hwloc_topology_load(topology); + assert(!hwloc_topology_is_thissystem(topology)); + if (strcmp(hwloc_obj_get_info_by_name(hwloc_get_root_obj(topology), "UglyString"), s)) +@@ -67,42 +74,42 @@ static int one_test(void) + + hwloc_free_xmlbuffer(topology, buf1); + hwloc_free_xmlbuffer(topology, buf2); ++ free(copy1); + + hwloc_topology_destroy(topology); + + return err; + } + +-int main(void) ++int main(int argc, char *argv[]) + { + int err; + +- putenv("HWLOC_LIBXML_CLEANUP=1"); ++ if (argc < 3) { ++ fprintf(stderr, "Need 0 or 1 twice as arguments for enabling/disabling libxml import and export\n"); ++ fprintf(stderr, "For instance `xmlbuffer 0 1' enables libxml for export only\n"); ++ fprintf(stderr, "Those arguments are passed by wrapper.sh during make check\n"); ++ exit(EXIT_FAILURE); ++ } + +- printf("using default import and export\n"); +- putenv("HWLOC_LIBXML_IMPORT=1"); +- putenv("HWLOC_LIBXML_EXPORT=1"); +- err = one_test(); +- if (err < 0) +- return err; ++ putenv("HWLOC_LIBXML_CLEANUP=1"); + +- printf("using minimalistic import and default export\n"); +- putenv("HWLOC_LIBXML_IMPORT=0"); +- putenv("HWLOC_LIBXML_EXPORT=1"); +- err = one_test(); +- if (err < 0) +- return err; ++ if (atoi(argv[1])) { ++ putenv("HWLOC_LIBXML_IMPORT=1"); ++ printf("import=libxml "); ++ } else { ++ putenv("HWLOC_LIBXML_IMPORT=0"); ++ printf("import=nolibxml "); ++ } + +- printf("using default import and minimalistic export\n"); +- putenv("HWLOC_LIBXML_IMPORT=1"); +- putenv("HWLOC_LIBXML_EXPORT=0"); +- err = one_test(); +- if (err < 0) +- return err; ++ if (atoi(argv[2])) { ++ putenv("HWLOC_LIBXML_EXPORT=1"); ++ printf("export=libxml\n"); ++ } else { ++ putenv("HWLOC_LIBXML_EXPORT=0"); ++ printf("export=nolibxml\n"); ++ } + +- printf("using minimalistic import and export\n"); +- putenv("HWLOC_LIBXML_IMPORT=0"); +- putenv("HWLOC_LIBXML_EXPORT=0"); + err = one_test(); + if (err < 0) + return err; +diff --git a/src/hwloc/utils/hwloc/Makefile.am b/src/hwloc/utils/hwloc/Makefile.am +index 3e25454..ed0df3a 100644 +--- a/src/hwloc/utils/hwloc/Makefile.am ++++ b/src/hwloc/utils/hwloc/Makefile.am +@@ -1,4 +1,4 @@ +-# Copyright © 2009-2016 Inria. All rights reserved. ++# Copyright © 2009-2018 Inria. All rights reserved. + # Copyright © 2009-2012, 2014, 2016 Université Bordeaux + # Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. + # +@@ -75,9 +75,9 @@ TESTS += test-fake-plugin.sh + endif HWLOC_HAVE_PLUGINS + endif !HWLOC_HAVE_MINGW32 + +-SEDMAN = $(SED) -e 's/\#PACKAGE_NAME\#/@PACKAGE_NAME@/g' \ +- -e 's/\#PACKAGE_VERSION\#/@PACKAGE_VERSION@/g' \ +- -e 's/\#HWLOC_DATE\#/@HWLOC_RELEASE_DATE@/g' ++SEDMAN = $(SED) -e 's/%PACKAGE_NAME%/@PACKAGE_NAME@/g' \ ++ -e 's/%PACKAGE_VERSION%/@PACKAGE_VERSION@/g' \ ++ -e 's/%HWLOC_DATE%/@HWLOC_RELEASE_DATE@/g' + + # Only install man pages if we're building in standalone mode + man7_pages = hwloc.7 +@@ -130,7 +130,7 @@ nodist_man_MANS += $(hdh_page) + hwloc-dump-hwdata.1: hwloc-dump-hwdata.1in + @ echo Creating $@ man page... + @ $(SEDMAN) \ +- -e 's/#RUNSTATEDIR#/$(subst /,\/,$(HWLOC_runstatedir))/g' \ ++ -e 's/%RUNSTATEDIR%/$(subst /,\/,$(HWLOC_runstatedir))/g' \ + > $@ < $< + endif HWLOC_HAVE_X86 + endif HWLOC_HAVE_LINUX +diff --git a/src/hwloc/utils/hwloc/hwloc-annotate.1in b/src/hwloc/utils/hwloc/hwloc-annotate.1in +index d87f6fe..f78bd08 100644 +--- a/src/hwloc/utils/hwloc/hwloc-annotate.1in ++++ b/src/hwloc/utils/hwloc/hwloc-annotate.1in +@@ -1,9 +1,9 @@ + .\" -*- nroff -*- +-.\" Copyright © 2013-2017 Inria. All rights reserved. ++.\" Copyright © 2013-2018 Inria. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-ANNOTATE "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-ANNOTATE "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME +-hwloc-annotate \- Add info attributes to a XML topology ++hwloc-annotate \- Modify attributes in a XML topology + . + .\" ************************** + .\" Synopsis Section +diff --git a/src/hwloc/utils/hwloc/hwloc-annotate.c b/src/hwloc/utils/hwloc/hwloc-annotate.c +index 00c6af5..11fbd1c 100644 +--- a/src/hwloc/utils/hwloc/hwloc-annotate.c ++++ b/src/hwloc/utils/hwloc/hwloc-annotate.c +@@ -120,7 +120,7 @@ add_distances(hwloc_topology_t topology, int topodepth) + unsigned long kind = 0; + unsigned nbobjs = 0; + hwloc_obj_t *objs = NULL; +- uint64_t *values = NULL; ++ hwloc_uint64_t *values = NULL; + FILE *file; + char line[64]; + unsigned i, x, y, z; +diff --git a/src/hwloc/utils/hwloc/hwloc-bind.1in b/src/hwloc/utils/hwloc/hwloc-bind.1in +index 5f259ac..a1be7d6 100644 +--- a/src/hwloc/utils/hwloc/hwloc-bind.1in ++++ b/src/hwloc/utils/hwloc/hwloc-bind.1in +@@ -3,7 +3,7 @@ + .\" Copyright © 2010 Université of Bordeaux + .\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-BIND "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-BIND "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-bind \- Launch a command that is bound to specific processors + and/or memory, or consult the binding of an existing program +diff --git a/src/hwloc/utils/hwloc/hwloc-bind.c b/src/hwloc/utils/hwloc/hwloc-bind.c +index 5dbf3e5..abc8565 100644 +--- a/src/hwloc/utils/hwloc/hwloc-bind.c ++++ b/src/hwloc/utils/hwloc/hwloc-bind.c +@@ -2,7 +2,7 @@ + * Copyright © 2009 CNRS + * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2010, 2012 Université Bordeaux +- * Copyright © 2009 Cisco Systems, Inc. All rights reserved. ++ * Copyright © 2009-2018 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. + */ + +@@ -66,7 +66,7 @@ int main(int argc, char *argv[]) + { + hwloc_topology_t topology; + int loaded = 0; +- int depth; ++ int depth = -1; + hwloc_bitmap_t cpubind_set, membind_set; + int got_cpubind = 0, got_membind = 0; + int working_on_cpubind = 1; /* membind if 0 */ +@@ -303,7 +303,10 @@ int main(int argc, char *argv[]) + } + + if (pid_number > 0) { +- pid = hwloc_pid_from_number(pid_number, !(get_binding || get_last_cpu_location)); ++ if (hwloc_pid_from_number(&pid, pid_number, !(get_binding || get_last_cpu_location), 1 /* verbose */) < 0) { ++ fprintf(stderr, "failed to use pid\n"); ++ return EXIT_FAILURE; ++ } + /* no need to set_pid() + * the doc just says we're operating on pid, not that we're retrieving the topo/cpuset as seen from inside pid + */ +diff --git a/src/hwloc/utils/hwloc/hwloc-calc.1in b/src/hwloc/utils/hwloc/hwloc-calc.1in +index cb15303..e5943ba 100644 +--- a/src/hwloc/utils/hwloc/hwloc-calc.1in ++++ b/src/hwloc/utils/hwloc/hwloc-calc.1in +@@ -2,7 +2,7 @@ + .\" Copyright © 2010-2016 Inria. All rights reserved. + .\" Copyright © 2009 Cisco Systems, Inc. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-CALC "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-CALC "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-calc \- Operate on cpu mask strings and objects + . +diff --git a/src/hwloc/utils/hwloc/hwloc-compress-dir.1in b/src/hwloc/utils/hwloc/hwloc-compress-dir.1in +index ea67876..1d2e29b 100644 +--- a/src/hwloc/utils/hwloc/hwloc-compress-dir.1in ++++ b/src/hwloc/utils/hwloc/hwloc-compress-dir.1in +@@ -1,7 +1,7 @@ + .\" -*- nroff -*- + .\" Copyright © 2013 inria. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-COMPRESS-DIR "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-COMPRESS-DIR "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-compress-dir \- Compress a directory of XML topologies + . +diff --git a/src/hwloc/utils/hwloc/hwloc-diff.1in b/src/hwloc/utils/hwloc/hwloc-diff.1in +index 2707627..7185351 100644 +--- a/src/hwloc/utils/hwloc/hwloc-diff.1in ++++ b/src/hwloc/utils/hwloc/hwloc-diff.1in +@@ -1,7 +1,7 @@ + .\" -*- nroff -*- + .\" Copyright © 2013-2016 Inria. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-DIFF "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-DIFF "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-diff \- Compute differences between two XML topologies + . +diff --git a/src/hwloc/utils/hwloc/hwloc-diff.c b/src/hwloc/utils/hwloc/hwloc-diff.c +index d6deee4..b5fe380 100644 +--- a/src/hwloc/utils/hwloc/hwloc-diff.c ++++ b/src/hwloc/utils/hwloc/hwloc-diff.c +@@ -13,9 +13,9 @@ void usage(const char *callname __hwloc_attribute_unused, FILE *where) + { + fprintf(where, "Usage: hwloc-diff [options] []\n"); + fprintf(where, "Options:\n"); +- fprintf(where, " --refname Change the XML reference identifier in the output\n"); +- fprintf(where, " (default is the filename of the first topology\n"); +- fprintf(where, " --version Report version and exit\n"); ++ fprintf(where, " --refname Change the XML reference identifier to in the output\n"); ++ fprintf(where, " (default is the filename of the first topology\n"); ++ fprintf(where, " --version Report version and exit\n"); + } + + int main(int argc, char *argv[]) +@@ -40,6 +40,10 @@ int main(int argc, char *argv[]) + + while (argc && *argv[0] == '-') { + if (!strcmp (argv[0], "--refname")) { ++ if (argc < 2) { ++ usage(callname, stderr); ++ exit(EXIT_FAILURE); ++ } + refname = argv[1]; + argc--; + argv++; +diff --git a/src/hwloc/utils/hwloc/hwloc-distrib.1in b/src/hwloc/utils/hwloc/hwloc-distrib.1in +index b1e09d4..6da0332 100644 +--- a/src/hwloc/utils/hwloc/hwloc-distrib.1in ++++ b/src/hwloc/utils/hwloc/hwloc-distrib.1in +@@ -2,7 +2,7 @@ + .\" Copyright © 2010-2017 Inria. All rights reserved. + .\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-DISTRIB "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-DISTRIB "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-distrib \- Build a number of cpu masks distributed on the system + . +diff --git a/src/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c b/src/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c +index e71e514..00e14ea 100644 +--- a/src/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c ++++ b/src/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c +@@ -10,7 +10,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +diff --git a/src/hwloc/utils/hwloc/hwloc-dump-hwdata.1in b/src/hwloc/utils/hwloc/hwloc-dump-hwdata.1in +index f507577..27ced3d 100644 +--- a/src/hwloc/utils/hwloc/hwloc-dump-hwdata.1in ++++ b/src/hwloc/utils/hwloc/hwloc-dump-hwdata.1in +@@ -1,7 +1,7 @@ + .\" -*- nroff -*- + .\" Copyright © 2015-2018 Inria. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-DUMP-HWDATA "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-DUMP-HWDATA "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-dump-hwdata \- Dump topology and locality information from hardware tables + . +@@ -21,7 +21,7 @@ hwloc-dump-hwdata \- Dump topology and locality information from hardware tables + .TP 10 + \fB\-o \fR + save output files to directory instead of the default +-\fI#RUNSTATEDIR#/hwloc/\fR that was specified at configure time. ++\fI%RUNSTATEDIR%/hwloc/\fR that was specified at configure time. + + You may want to set the HWLOC_DUMPED_HWDATA_DIR environment variable + as well so that the hwloc library looks for dumped files in that same +diff --git a/src/hwloc/utils/hwloc/hwloc-dump-hwdata.c b/src/hwloc/utils/hwloc/hwloc-dump-hwdata.c +index fba927c..e29c081 100644 +--- a/src/hwloc/utils/hwloc/hwloc-dump-hwdata.c ++++ b/src/hwloc/utils/hwloc/hwloc-dump-hwdata.c +@@ -11,7 +11,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + +diff --git a/src/hwloc/utils/hwloc/hwloc-gather-cpuid.1in b/src/hwloc/utils/hwloc/hwloc-gather-cpuid.1in +index aa4ca8e..5ce7576 100644 +--- a/src/hwloc/utils/hwloc/hwloc-gather-cpuid.1in ++++ b/src/hwloc/utils/hwloc/hwloc-gather-cpuid.1in +@@ -1,7 +1,7 @@ + .\" -*- nroff -*- + .\" Copyright © 2015-2016 Inria. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-GATHER-CPUID "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-GATHER-CPUID "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-gather-cpuid \- Dumps the relevant x86 cpuid values + for later (possibly offline) usage +diff --git a/src/hwloc/utils/hwloc/hwloc-gather-cpuid.c b/src/hwloc/utils/hwloc/hwloc-gather-cpuid.c +index cfa2d56..7286970 100644 +--- a/src/hwloc/utils/hwloc/hwloc-gather-cpuid.c ++++ b/src/hwloc/utils/hwloc/hwloc-gather-cpuid.c +@@ -15,7 +15,7 @@ + + #include + +-#ifdef HWLOC_WIN_SYS ++#if defined(HWLOC_WIN_SYS) && !defined(__CYGWIN__) + #include + #define mkdir(name, mode) _mkdir(name) + #include +@@ -47,6 +47,10 @@ static int dump_one_proc(hwloc_topology_t topo, hwloc_obj_t pu, const char *path + unsigned regs[4]; + unsigned highest_cpuid, highest_ext_cpuid; + unsigned i; ++ int has_intel_x2apic = 0; ++ int has_intel_pconfig = 0; ++ int has_intel_sgx = 0; ++ int has_amd_topoext = 0; + FILE *output; + int err; + +@@ -88,6 +92,8 @@ static int dump_one_proc(hwloc_topology_t topo, hwloc_obj_t pu, const char *path + if (highest_cpuid >= 0x1) { + regs[0] = 0x1; + dump_one_cpuid(output, regs, 0x1); ++ if (regs[2] & (1 << 21)) ++ has_intel_x2apic = 1; + } + + /* 0x2 = Cache + TLB on Intel ; Reserved on AMD */ +@@ -129,6 +135,10 @@ static int dump_one_proc(hwloc_topology_t topo, hwloc_obj_t pu, const char *path + unsigned max; + regs[0] = 0x7; regs[2] = 0; + dump_one_cpuid(output, regs, 0x5); ++ if (regs[3] & (1<<18)) ++ has_intel_pconfig = 1; ++ if (regs[1] & (1<<2)) ++ has_intel_sgx = 1; + max = regs[0]; + for(i=1; i<=max; i++) { + regs[0] = 0x7; regs[2] = i; +@@ -149,7 +159,7 @@ static int dump_one_proc(hwloc_topology_t topo, hwloc_obj_t pu, const char *path + } + + /* 0xb = Extended topology on Intel ; Reserved on AMD */ +- if (highest_cpuid >= 0xb) { ++ if (has_intel_x2apic && highest_cpuid >= 0xb) { + for(i=0; ; i++) { + regs[0] = 0xb; regs[2] = i; + dump_one_cpuid(output, regs, 0x5); +@@ -194,16 +204,40 @@ static int dump_one_proc(hwloc_topology_t topo, hwloc_obj_t pu, const char *path + + /* 0x10 = Platform/L3 QoS enforcement enumeration on Intel ; Reserved on AMD */ + if (highest_cpuid >= 0x10) { ++ /* Intel Resource Director Technology (Intel RDT) Allocation */ + regs[0] = 0x10; regs[2] = 0; + dump_one_cpuid(output, regs, 0x5); ++ /* L3 Cache Allocation Technology */ + regs[0] = 0x10; regs[2] = 1; + dump_one_cpuid(output, regs, 0x5); ++ /* L2 Cache Allocation Technology */ ++ regs[0] = 0x10; regs[2] = 2; ++ dump_one_cpuid(output, regs, 0x5); ++ /* Memory Bandwidth Allocation */ ++ regs[0] = 0x10; regs[2] = 3; ++ dump_one_cpuid(output, regs, 0x5); ++ } ++ ++ /* 0x12 = SGX Attributes Enumeration on Intel ; Reserved on AMD */ ++ if (has_intel_sgx && highest_cpuid >= 0x12) { ++ regs[0] = 0x12; regs[2] = 0; ++ dump_one_cpuid(output, regs, 0x5); ++ regs[0] = 0x12; regs[2] = 1; ++ dump_one_cpuid(output, regs, 0x5); ++ for(i=2; ; i++) { ++ regs[0] = 0x12; regs[2] = i; ++ dump_one_cpuid(output, regs, 0x5); ++ if (!(regs[0] & 0xf)) ++ break; ++ } + } + + /* 0x14 = Processor trace enumeration on Intel ; Reserved on AMD */ + if (highest_cpuid >= 0x14) { + regs[0] = 0x14; regs[2] = 0; + dump_one_cpuid(output, regs, 0x5); ++ regs[0] = 0x14; regs[2] = 1; ++ dump_one_cpuid(output, regs, 0x5); + } + + /* 0x15 = Timestamp counter/core crystal clock on Intel ; Reserved on AMD */ +@@ -218,7 +252,51 @@ static int dump_one_proc(hwloc_topology_t topo, hwloc_obj_t pu, const char *path + dump_one_cpuid(output, regs, 0x1); + } + +- if (highest_cpuid > 0x16) { ++ /* 0x17 = System-On-Chip Vendor Attribute on Intel ; Reserved on AMD */ ++ if (highest_cpuid >= 0x17) { ++ unsigned maxsocid; ++ regs[0] = 0x17; regs[2] = 0; ++ dump_one_cpuid(output, regs, 0x5); ++ maxsocid = regs[0]; ++ for(i=1; i<=maxsocid; i++) { ++ regs[0] = 0x17; regs[2] = i; ++ dump_one_cpuid(output, regs, 0x5); ++ } ++ } ++ ++ /* 0x18 = Deterministic Address Translation Parameters on Intel ; Reserved on AMD */ ++ if (highest_cpuid >= 0x18) { ++ unsigned max; ++ regs[0] = 0x18; regs[2] = 0; ++ dump_one_cpuid(output, regs, 0x5); ++ max = regs[0]; ++ for(i=1; i<=max; i++) { ++ regs[0] = 0x18; regs[2] = i; ++ dump_one_cpuid(output, regs, 0x5); ++ } ++ } ++ ++ /* 0x1b = PCONFIG Information on Intel ; Reserved on AMD */ ++ if (has_intel_pconfig && highest_cpuid >= 0x1b) { ++ for(i=0; ; i++) { ++ regs[0] = 0x1b; regs[2] = i; ++ dump_one_cpuid(output, regs, 0x5); ++ if (!(regs[0] & 0xfff)) ++ break; ++ } ++ } ++ ++ /* 0x1f = V2 Extended Topology Enumeration on Intel ; Reserved on AMD */ ++ if (highest_cpuid >= 0x1f) { ++ for(i=0; ; i++) { ++ regs[0] = 0x1f; regs[2] = i; ++ dump_one_cpuid(output, regs, 0x5); ++ if (!regs[0] && !regs[1]) ++ break; ++ } ++ } ++ ++ if (highest_cpuid > 0x1f) { + static int reported = 0; + if (!reported) + fprintf(stderr, "WARNING: Processor supports new CPUID leaves upto 0x%x\n", highest_cpuid); +@@ -233,6 +311,8 @@ static int dump_one_proc(hwloc_topology_t topo, hwloc_obj_t pu, const char *path + if (highest_ext_cpuid >= 0x80000001) { + regs[0] = 0x80000001; + dump_one_cpuid(output, regs, 0x1); ++ if (regs[2] & (1 << 22)) ++ has_amd_topoext = 1; + } + + /* 0x80000002-4 = Processor name string */ +@@ -308,12 +388,18 @@ static int dump_one_proc(hwloc_topology_t topo, hwloc_obj_t pu, const char *path + } + + /* 0x8000001e = Topoext on AMD ; Reserved on Intel */ +- if (highest_ext_cpuid >= 0x8000001e) { ++ if (has_amd_topoext && highest_ext_cpuid >= 0x8000001e) { + regs[0] = 0x8000001e; + dump_one_cpuid(output, regs, 0x1); + } + +- if (highest_ext_cpuid > 0x8000001e) { ++ /* 0x8000001f = Encrypted Memory Capabilities ; Reserved on Intel */ ++ if (highest_ext_cpuid >= 0x8000001f) { ++ regs[0] = 0x8000001f; ++ dump_one_cpuid(output, regs, 0x1); ++ } ++ ++ if (highest_ext_cpuid > 0x8000001f) { + static int reported = 0; + if (!reported) + fprintf(stderr, "WARNING: Processor supports new extended CPUID leaves upto 0x%x\n", highest_ext_cpuid); +diff --git a/src/hwloc/utils/hwloc/hwloc-gather-topology.1in b/src/hwloc/utils/hwloc/hwloc-gather-topology.1in +index 0c33e70..9cb729f 100644 +--- a/src/hwloc/utils/hwloc/hwloc-gather-topology.1in ++++ b/src/hwloc/utils/hwloc/hwloc-gather-topology.1in +@@ -2,7 +2,7 @@ + .\" Copyright © 2010 Jirka Hladky + .\" Copyright © 2010-2018 Inria. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-GATHER-TOPOLOGY "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-GATHER-TOPOLOGY "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-gather-topology \- Saves the relevant Linux topology files + and the lstopo textual and XML outputs for later (possibly offline) usage +diff --git a/src/hwloc/utils/hwloc/hwloc-info.1in b/src/hwloc/utils/hwloc/hwloc-info.1in +index d35f9c4..414129b 100644 +--- a/src/hwloc/utils/hwloc/hwloc-info.1in ++++ b/src/hwloc/utils/hwloc/hwloc-info.1in +@@ -3,7 +3,7 @@ + .\" Copyright © 2009-2010 Université of Bordeaux + .\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-INFO "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-INFO "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-info \- Show some information about some objects or about a topology or about support features + . +diff --git a/src/hwloc/utils/hwloc/hwloc-info.c b/src/hwloc/utils/hwloc/hwloc-info.c +index c0e3f41..f032acc 100644 +--- a/src/hwloc/utils/hwloc/hwloc-info.c ++++ b/src/hwloc/utils/hwloc/hwloc-info.c +@@ -47,7 +47,7 @@ void usage(const char *name, FILE *where) + fprintf (where, " --restrict Restrict the topology to processors listed in \n"); + fprintf (where, " --restrict binding Restrict the topology to the current process binding\n"); + fprintf (where, " --filter : Filter objects of the given type, or all.\n"); +- fprintf (where, " may be `all' (keep all), `none' (remove all), `structure' or `basic'\n"); ++ fprintf (where, " may be `all' (keep all), `none' (remove all), `structure' or `important'\n"); + fprintf (where, " --no-icaches Do not show instruction caches\n"); + fprintf (where, " --no-io Do not show any I/O device or bridge\n"); + fprintf (where, " --no-bridges Do not any I/O bridge except hostbridges\n"); +@@ -526,8 +526,8 @@ main (int argc, char *argv[]) + } + + if (pid_number > 0) { +- pid = hwloc_pid_from_number(pid_number, 0); +- if (hwloc_topology_set_pid(topology, pid)) { ++ if (hwloc_pid_from_number(&pid, pid_number, 0, 1 /* verbose */) < 0 ++ || hwloc_topology_set_pid(topology, pid)) { + perror("Setting target pid"); + return EXIT_FAILURE; + } +diff --git a/src/hwloc/utils/hwloc/hwloc-patch.1in b/src/hwloc/utils/hwloc/hwloc-patch.1in +index cf33db2..ca0c59f 100644 +--- a/src/hwloc/utils/hwloc/hwloc-patch.1in ++++ b/src/hwloc/utils/hwloc/hwloc-patch.1in +@@ -1,7 +1,7 @@ + .\" -*- nroff -*- + .\" Copyright © 2013-2016 Inria. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-PATCH "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-PATCH "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-patch \- Apply a topology difference to an existing XML topology + . +diff --git a/src/hwloc/utils/hwloc/hwloc-ps.1in b/src/hwloc/utils/hwloc/hwloc-ps.1in +index 3d8eff2..d6037b7 100644 +--- a/src/hwloc/utils/hwloc/hwloc-ps.1in ++++ b/src/hwloc/utils/hwloc/hwloc-ps.1in +@@ -2,7 +2,7 @@ + .\" Copyright © 2010-2017 Inria. All rights reserved. + .\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC-PS "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC-PS "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc-ps \- List currently-running processes or threads that are bound + . +diff --git a/src/hwloc/utils/hwloc/hwloc.7in b/src/hwloc/utils/hwloc/hwloc.7in +index 7efd71a..d0ad70b 100644 +--- a/src/hwloc/utils/hwloc/hwloc.7in ++++ b/src/hwloc/utils/hwloc/hwloc.7in +@@ -1,9 +1,9 @@ + .\" -*- nroff -*- +-.\" Copyright © 2010-2017 Inria. All rights reserved. ++.\" Copyright © 2010-2018 Inria. All rights reserved. + .\" Copyright © 2010 Université of Bordeaux + .\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. + .\" See COPYING in top-level directory. +-.TH HWLOC "7" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH HWLOC "7" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + hwloc - General information about hwloc ("hardware locality"). + . +diff --git a/src/hwloc/utils/hwloc/misc.h b/src/hwloc/utils/hwloc/misc.h +index 448b460..31379e5 100644 +--- a/src/hwloc/utils/hwloc/misc.h ++++ b/src/hwloc/utils/hwloc/misc.h +@@ -293,7 +293,7 @@ hwloc_utils_enable_input_format(struct hwloc_topology *topology, + } + + static __hwloc_inline void +-hwloc_utils_print_distance_matrix(FILE *output, unsigned nbobjs, hwloc_obj_t *objs, uint64_t *matrix, int logical) ++hwloc_utils_print_distance_matrix(FILE *output, unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t *matrix, int logical) + { + unsigned i, j; + +@@ -320,24 +320,27 @@ hwloc_utils_print_distance_matrix(FILE *output, unsigned nbobjs, hwloc_obj_t *ob + } + } + +-static __hwloc_inline hwloc_pid_t +-hwloc_pid_from_number(int pid_number, int set_info __hwloc_attribute_unused) ++static __hwloc_inline int ++hwloc_pid_from_number(hwloc_pid_t *pidp, int pid_number, int set_info __hwloc_attribute_unused, int verbose __hwloc_attribute_unused) + { + hwloc_pid_t pid; + #ifdef HWLOC_WIN_SYS + pid = OpenProcess(set_info ? PROCESS_SET_INFORMATION : PROCESS_QUERY_INFORMATION, FALSE, pid_number); + if (!pid) { +- DWORD error = GetLastError(); +- char *message; +- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, +- NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (char *)&message, 0, NULL); +- fprintf(stderr, "OpenProcess %d failed %lu: %s\n", pid_number, (unsigned long) error, message); +- exit(EXIT_FAILURE); ++ if (verbose) { ++ DWORD error = GetLastError(); ++ char *message; ++ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, ++ NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (char *)&message, 0, NULL); ++ fprintf(stderr, "OpenProcess %d failed %lu: %s\n", pid_number, (unsigned long) error, message); ++ } ++ return -1; + } + #else + pid = pid_number; + #endif +- return pid; ++ *pidp = pid; ++ return 0; + } + + static __hwloc_inline void +diff --git a/src/hwloc/utils/hwloc/test-hwloc-annotate.sh.in b/src/hwloc/utils/hwloc/test-hwloc-annotate.sh.in +index eaf0893..be72109 100644 +--- a/src/hwloc/utils/hwloc/test-hwloc-annotate.sh.in ++++ b/src/hwloc/utils/hwloc/test-hwloc-annotate.sh.in +@@ -68,5 +68,5 @@ pu:1 + EOF + $annotate $file $file dummy distances $distances + +-diff @HWLOC_DIFF_U@ $srcdir/test-hwloc-annotate.output "$file" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir/test-hwloc-annotate.output "$file" + rm -rf "$tmp" +diff --git a/src/hwloc/utils/hwloc/test-hwloc-calc.sh.in b/src/hwloc/utils/hwloc/test-hwloc-calc.sh.in +index 3d604d9..3f31f7b 100644 +--- a/src/hwloc/utils/hwloc/test-hwloc-calc.sh.in ++++ b/src/hwloc/utils/hwloc/test-hwloc-calc.sh.in +@@ -103,5 +103,5 @@ node:0 node:3 + root + EOF + ) > "$file" +-diff @HWLOC_DIFF_U@ $srcdir/test-hwloc-calc.output "$file" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir/test-hwloc-calc.output "$file" + rm -rf "$tmp" +diff --git a/src/hwloc/utils/hwloc/test-hwloc-compress-dir.sh.in b/src/hwloc/utils/hwloc/test-hwloc-compress-dir.sh.in +index b50fa79..b3cda16 100644 +--- a/src/hwloc/utils/hwloc/test-hwloc-compress-dir.sh.in ++++ b/src/hwloc/utils/hwloc/test-hwloc-compress-dir.sh.in +@@ -2,7 +2,7 @@ + #-*-sh-*- + + # +-# Copyright © 2013 Inria. All rights reserved. ++# Copyright © 2013-2018 Inria. All rights reserved. + # Copyright © 2014 Cisco Systems, Inc. All rights reserved. + # See COPYING in top-level directory. + # +@@ -46,10 +46,10 @@ set -e + + $compress "$tmp/test-hwloc-compress-dir.input" "$tmp/test-hwloc-compress-dir.newoutput" + +-diff @HWLOC_DIFF_U@ -r "$tmp/test-hwloc-compress-dir.output" "$tmp/test-hwloc-compress-dir.newoutput" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ -r "$tmp/test-hwloc-compress-dir.output" "$tmp/test-hwloc-compress-dir.newoutput" + + $compress -R "$tmp/test-hwloc-compress-dir.newoutput" "$tmp/test-hwloc-compress-dir.newoutput2" + +-diff @HWLOC_DIFF_U@ -r "$tmp/test-hwloc-compress-dir.input" "$tmp/test-hwloc-compress-dir.newoutput2" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ -r "$tmp/test-hwloc-compress-dir.input" "$tmp/test-hwloc-compress-dir.newoutput2" + + rm -rf "$tmp" +diff --git a/src/hwloc/utils/hwloc/test-hwloc-diffpatch.sh.in b/src/hwloc/utils/hwloc/test-hwloc-diffpatch.sh.in +index efc8daf..5a7e5e6 100644 +--- a/src/hwloc/utils/hwloc/test-hwloc-diffpatch.sh.in ++++ b/src/hwloc/utils/hwloc/test-hwloc-diffpatch.sh.in +@@ -2,7 +2,7 @@ + #-*-sh-*- + + # +-# Copyright © 2009-2013 Inria. All rights reserved. ++# Copyright © 2009-2018 Inria. All rights reserved. + # Copyright © 2014 Cisco Systems, Inc. All rights reserved. + # See COPYING in top-level directory. + # +@@ -52,8 +52,8 @@ cp $srcdir/test-hwloc-diffpatch.input1 . + cat $diffoutput | $patch refname - $output1 + $patch -R $srcdir/test-hwloc-diffpatch.input2 $diffoutput $output2 + +-diff -u $srcdir/test-hwloc-diffpatch.input1 "$output2" +-diff -u $srcdir/test-hwloc-diffpatch.input2 "$output1" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir/test-hwloc-diffpatch.input1 "$output2" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir/test-hwloc-diffpatch.input2 "$output1" + + cd .. + rm -rf "$tmp" +diff --git a/src/hwloc/utils/hwloc/test-hwloc-distrib.sh.in b/src/hwloc/utils/hwloc/test-hwloc-distrib.sh.in +index 67ffc1b..b6e5a4a 100644 +--- a/src/hwloc/utils/hwloc/test-hwloc-distrib.sh.in ++++ b/src/hwloc/utils/hwloc/test-hwloc-distrib.sh.in +@@ -3,7 +3,7 @@ + + # + # Copyright © 2009 CNRS +-# Copyright © 2009-2017 Inria. All rights reserved. ++# Copyright © 2009-2018 Inria. All rights reserved. + # Copyright © 2009 Université Bordeaux + # Copyright © 2014 Cisco Systems, Inc. All rights reserved. + # See COPYING in top-level directory. +@@ -69,5 +69,5 @@ set -e + $distrib --if synthetic --input "2 2 2 2" --to core 9 + echo + ) > "$file" +-diff @HWLOC_DIFF_U@ $srcdir/test-hwloc-distrib.output "$file" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir/test-hwloc-distrib.output "$file" + rm -rf "$tmp" +diff --git a/src/hwloc/utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.in b/src/hwloc/utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.in +index 0654f6b..bf34a5f 100644 +--- a/src/hwloc/utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.in ++++ b/src/hwloc/utils/hwloc/test-hwloc-dump-hwdata/test-hwloc-dump-hwdata.sh.in +@@ -2,7 +2,7 @@ + #-*-sh-*- + + # +-# Copyright © 2015-2016 Inria. All rights reserved. ++# Copyright © 2015-2018 Inria. All rights reserved. + # See COPYING in top-level directory. + # + +@@ -33,6 +33,6 @@ export HWLOC_FSROOT + + $hdhd -o $tmp/output + +-diff @HWLOC_DIFF_U@ -r "$HWLOC_FSROOT/expected_output" "$tmp/output" ++@DIFF@ @HWLOC_DIFF_U@ -r "$HWLOC_FSROOT/expected_output" "$tmp/output" + + rm -rf "$tmp" +diff --git a/src/hwloc/utils/hwloc/test-hwloc-info.sh.in b/src/hwloc/utils/hwloc/test-hwloc-info.sh.in +index 298f8cf..b5a3ff1 100644 +--- a/src/hwloc/utils/hwloc/test-hwloc-info.sh.in ++++ b/src/hwloc/utils/hwloc/test-hwloc-info.sh.in +@@ -64,5 +64,5 @@ set -e + > "$file" + # filtered hwlocVersion since it often changes + # filtered ProcessName since it may be hwloc-info or lt-hwloc-info +-diff @HWLOC_DIFF_U@ $srcdir/test-hwloc-info.output "$file" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir/test-hwloc-info.output "$file" + rm -rf "$tmp" +diff --git a/src/hwloc/utils/lstopo/Makefile.am b/src/hwloc/utils/lstopo/Makefile.am +index 8b34e64..fc6a9a9 100644 +--- a/src/hwloc/utils/lstopo/Makefile.am ++++ b/src/hwloc/utils/lstopo/Makefile.am +@@ -71,9 +71,9 @@ APPLICATIONSdir = @datarootdir@/applications + dist_APPLICATIONS_DATA = lstopo.desktop + endif + +-SEDMAN = $(SED) -e 's/\#PACKAGE_NAME\#/@PACKAGE_NAME@/g' \ +- -e 's/\#PACKAGE_VERSION\#/@PACKAGE_VERSION@/g' \ +- -e 's/\#HWLOC_DATE\#/@HWLOC_RELEASE_DATE@/g' ++SEDMAN = $(SED) -e 's/%PACKAGE_NAME%/@PACKAGE_NAME@/g' \ ++ -e 's/%PACKAGE_VERSION%/@PACKAGE_VERSION@/g' \ ++ -e 's/%HWLOC_DATE%/@HWLOC_RELEASE_DATE@/g' + + .1in.1: + @ echo Creating $@ man page... +diff --git a/src/hwloc/utils/lstopo/lstopo-draw.c b/src/hwloc/utils/lstopo/lstopo-draw.c +index b35ccd9..06f1cf4 100644 +--- a/src/hwloc/utils/lstopo/lstopo-draw.c ++++ b/src/hwloc/utils/lstopo/lstopo-draw.c +@@ -363,9 +363,8 @@ place_children(struct lstopo_output *loutput, hwloc_obj_t parent, + return; + + +- /* no separator between core or L1 children */ +- if (parent->type == HWLOC_OBJ_CORE +- || (hwloc_obj_type_is_cache(parent->type) && parent->attr->cache.depth == 1)) ++ /* no separator between PUs */ ++ if ((unsigned)parent->depth == loutput->depth-2) + separator = 0; + + /* place non-memory children */ +@@ -559,7 +558,11 @@ lstopo__prepare_custom_styles(struct lstopo_output *loutput, hwloc_obj_t obj) + s->bg.b = forceb & 255; + lud->style_set |= LSTOPO_STYLE_BG; + loutput->methods->declare_color(loutput, &s->bg); +- s->t.r = s->t.g = s->t.b = (s->bg.r + s->bg.g + s->bg.b < 0xff) ? 0xff : 0; ++ /* if there's no style for text, make sure it's not dark over dark bg */ ++ if (!(lud->style_set & LSTOPO_STYLE_T)) { ++ s->t.r = s->t.g = s->t.b = (s->bg.r + s->bg.g + s->bg.b < 0xff) ? 0xff : 0; ++ lud->style_set |= LSTOPO_STYLE_T; ++ } + } else if (sscanf(stylestr, "Text=#%02x%02x%02x", &forcer, &forceg, &forceb) == 3) { + s->t.r = forcer & 255; + s->t.g = forceg & 255; +@@ -1097,7 +1100,7 @@ output_draw(struct lstopo_output *loutput) + time_t t; + char text[3][128]; + unsigned ntext = 0; +- char hostname[128] = ""; ++ char hostname[122] = ""; + const char *forcedhostname = NULL; + unsigned long hostname_size = sizeof(hostname); + unsigned maxtextwidth = 0, textwidth; +diff --git a/src/hwloc/utils/lstopo/lstopo-no-graphics.1in b/src/hwloc/utils/lstopo/lstopo-no-graphics.1in +index 4d5c704..e186ea4 100644 +--- a/src/hwloc/utils/lstopo/lstopo-no-graphics.1in ++++ b/src/hwloc/utils/lstopo/lstopo-no-graphics.1in +@@ -3,7 +3,7 @@ + .\" Copyright © 2009-2010 Université of Bordeaux + .\" Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. + .\" See COPYING in top-level directory. +-.TH LSTOPO "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" ++.TH LSTOPO "1" "%HWLOC_DATE%" "%PACKAGE_VERSION%" "%PACKAGE_NAME%" + .SH NAME + lstopo, lstopo-no-graphics, hwloc-ls \- Show the topology of the system + . +@@ -61,7 +61,7 @@ The string must end with a number of PUs. + Enforce the input in the given format, among \fBxml\fR, \fBfsroot\fR, + \fBcpuid\fR and \fBsynthetic\fR. + .TP +-\fB\-\-export\-synthetic\-flags\fR ++\fB\-\-export\-xml\-flags\fR + Enforce flags when exporting to the XML format. + These flags are passed to \fIhwloc_topology_export_xml()\fR. + A value of 1 reverts to the format of hwloc v1.x. +@@ -214,7 +214,7 @@ machine are shown. On Linux, kernel threads are not shown. + If many processes appear, the output may become hard to read anyway, + making the hwloc-ps program more practical. + .TP +-\fB\-\-children\-order=\fR ++\fB\-\-children\-order \fR + Change the order of the different kinds of children with respect to + their parent in the graphical output. + +@@ -237,54 +237,51 @@ Set size of margin between elements. + .TP + \fB\-\-horiz\fR, \fB\-\-horiz\fR= + Horizontal graphical layout instead of nearly 4/3 ratio. +-If a comma-separated list of types is given, the layout only +-applies to the corresponding containers. ++If a comma-separated list of object types is given, the layout only ++applies to the corresponding container objects. + Ignored for bridges since their children are always vertically aligned. + .TP + \fB\-\-vert\fR, \fB\-\-vert\fR= + Vertical graphical layout instead of nearly 4/3 ratio. +-If a comma-separated list of types is given, the layout only +-applies to the corresponding containers. ++If a comma-separated list of object types is given, the layout only ++applies to the corresponding container objects. + .TP + \fB\-\-rect\fR, \fB\-\-rect\fR= + Rectangular graphical layout with nearly 4/3 ratio. +-If a comma-separated list of types is given, the layout only +-applies to the corresponding containers. ++If a comma-separated list of object types is given, the layout only ++applies to the corresponding container objects. + Ignored for bridges since their children are always vertically aligned. + .TP + \fB\-\-no\-text\fR, \fB\-\-no\-text=\fR + Do not display any text in boxes in the graphical output. +-If a comma-separated list of types is given, indexes are only +-disabled for the given objects. ++If a comma-separated list of object types is given, text is disabled for the corresponding objects. + This is mostly useful for removing text from Group objects. + This feature is currently ignored for Bridges and PCI Devices. + .TP +-\fB\-\-index\fR, \fB\-\-index=\fR ++\fB\-\-text\fR, \fB\-\-text=\fR + Display text in boxes in the graphical output (default). +-If a comma-separated list of types is given, indexes are only +-enabled for the given objects. ++If a comma-separated list of object types is given, text is reenabled for the corresponding objects ++(if it was previously disabled with \fB\-\-no\-text\fR). + .TP + \fB\-\-no\-index\fR, \fB\-\-no\-index=\fR + Do not show object indexes in the graphical output. +-If a comma-separated list of types is given, indexes are only +-disabled for the given objects. ++If a comma-separated list of object types is given, indexes are disabled for the corresponding objects. + .TP + \fB\-\-index\fR, \fB\-\-index=\fR + Show object indexes in the graphical output (default). +-If a comma-separated list of types is given, indexes are only +-enabled for the given objects. ++If a comma-separated list of object types is given, indexes are reenabled for the corresponding objects ++(if they were previously disabled with \fB\-\-no\-index\fR). + .TP + \fB\-\-no\-attrs\fR, \fB\-\-no\-attrs=\fR + Do not show object attributes (such as memory size, cache size, PCI bus ID, PCI link speed, etc.) + in the graphical output. +-If a comma-separated list of types is given, attributes are only +-disabled for the given objects. ++If a comma-separated list of object types is given, attributes are disabled for the corresponding objects. + .TP + \fB\-\-attrs\fR, \fB\-\-attrs=\fR + Show object attributes (such as memory size, cache size, PCI bus ID, PCI link speed, etc.) + in the graphical output (default). +-If a comma-separated list of types is given, attributes are only +-enabled for the given objects. ++If a comma-separated list of object types is given, attributes are reenabled for the corresponding objects ++(if they were previously disabled with \fB\-\-no\-attrs\fR). + .TP + \fB\-\-no\-legend\fR + Remove the text legend at the bottom. +diff --git a/src/hwloc/utils/lstopo/lstopo-windows.c b/src/hwloc/utils/lstopo/lstopo-windows.c +index 8a51dc5..09b406d 100644 +--- a/src/hwloc/utils/lstopo/lstopo-windows.c ++++ b/src/hwloc/utils/lstopo/lstopo-windows.c +@@ -1,6 +1,6 @@ + /* + * Copyright © 2009 CNRS +- * Copyright © 2009-2017 Inria. All rights reserved. ++ * Copyright © 2009-2018 Inria. All rights reserved. + * Copyright © 2009-2010, 2012 Université Bordeaux + * Copyright © 2011 Cisco Systems, Inc. All rights reserved. + * See COPYING in top-level directory. +@@ -394,6 +394,7 @@ output_windows (struct lstopo_output *loutput, const char *dummy __hwloc_attribu + printf(" Scroll to the bottom-right corner . End\n"); + printf(" Exit .............................. q Q Esc\n"); + printf("\n\n"); ++ fflush(stdout); + + /* ready */ + declare_colors(loutput); +diff --git a/src/hwloc/utils/lstopo/lstopo.c b/src/hwloc/utils/lstopo/lstopo.c +index 83cae53..4b4bf6d 100644 +--- a/src/hwloc/utils/lstopo/lstopo.c ++++ b/src/hwloc/utils/lstopo/lstopo.c +@@ -44,6 +44,12 @@ + # endif + #endif + ++#ifdef HAVE_CLOCK_GETTIME ++# ifndef CLOCK_MONOTONIC /* HP-UX doesn't have CLOCK_MONOTONIC */ ++# define CLOCK_MONOTONIC CLOCK_REALTIME ++# endif ++#endif ++ + static unsigned int top = 0; + + FILE *open_output(const char *filename, int overwrite) +@@ -138,7 +144,8 @@ static void add_process_objects(hwloc_topology_t topology) + + snprintf(name, sizeof(name), "%ld", local_pid_number); + +- local_pid = hwloc_pid_from_number(local_pid_number, 0); ++ if (hwloc_pid_from_number(&local_pid, local_pid_number, 0, 0 /* ignore failures */) < 0) ++ continue; + + proc_cpubind = hwloc_get_proc_cpubind(topology, local_pid, cpuset, 0) != -1; + +@@ -468,7 +475,7 @@ void usage(const char *name, FILE *where) + fprintf (where, " --taskset Show taskset-specific cpuset strings\n"); + fprintf (where, "Object filtering options:\n"); + fprintf (where, " --filter : Filter objects of the given type, or all.\n"); +- fprintf (where, " may be `all' (keep all), `none' (remove all), `structure' or `basic'\n"); ++ fprintf (where, " may be `all' (keep all), `none' (remove all), `structure' or `important'\n"); + fprintf (where, " --ignore Ignore objects of the given type\n"); + fprintf (where, " --no-caches Do not show caches\n"); + fprintf (where, " --no-useless-caches Do not show caches which do not have a hierarchical\n" +@@ -490,7 +497,7 @@ void usage(const char *name, FILE *where) + fprintf (where, " --pid Detect topology as seen by process \n"); + fprintf (where, " --whole-system Do not consider administration limitations\n"); + fprintf (where, "Graphical output options:\n"); +- fprintf (where, " --children-order=plain\n" ++ fprintf (where, " --children-order plain\n" + " Display memory children below the parent like any other child\n"); + fprintf (where, " --fontsize 10 Set size of text font\n"); + fprintf (where, " --gridsize 10 Set size of margin between elements\n"); +@@ -897,13 +904,14 @@ main (int argc, char *argv[]) + } + } + +- else if (!strncmp (argv[0], "--children-order=", 18)) { +- char *tmp = argv[0]+18; +- argv[0][17] = '\0'; +- if (!strcmp(tmp, "plain")) ++ else if (!strcmp (argv[0], "--children-order")) { ++ if (argc < 2) ++ goto out_usagefailure; ++ if (!strcmp(argv[1], "plain")) + loutput.plain_children_order = 1; +- else if (strcmp(tmp, "memoryabove")) +- fprintf(stderr, "Unsupported order `%s' passed to %s, ignoring.\n", tmp, argv[0]); ++ else if (strcmp(argv[1], "memoryabove")) ++ fprintf(stderr, "Unsupported order `%s' passed to %s, ignoring.\n", argv[1], argv[0]); ++ opt = 1; + } + else if (!strcmp (argv[0], "--fontsize")) { + if (argc < 2) +@@ -987,8 +995,8 @@ main (int argc, char *argv[]) + } + + if (loutput.pid_number > 0) { +- loutput.pid = hwloc_pid_from_number(loutput.pid_number, 0); +- if (hwloc_topology_set_pid(topology, loutput.pid)) { ++ if (hwloc_pid_from_number(&loutput.pid, loutput.pid_number, 0, 1 /* verbose */) < 0 ++ || hwloc_topology_set_pid(topology, loutput.pid)) { + perror("Setting target pid"); + goto out_with_topology; + } +@@ -1143,6 +1151,7 @@ main (int argc, char *argv[]) + } + + loutput.topology = topology; ++ loutput.depth = hwloc_topology_get_depth(topology); + loutput.file = NULL; + + lstopo_populate_userdata(hwloc_get_root_obj(topology)); +diff --git a/src/hwloc/utils/lstopo/lstopo.h b/src/hwloc/utils/lstopo/lstopo.h +index e491874..c2aa125 100644 +--- a/src/hwloc/utils/lstopo/lstopo.h ++++ b/src/hwloc/utils/lstopo/lstopo.h +@@ -32,6 +32,7 @@ struct draw_methods; + /* if embedded in backend-specific output structure, must be at the beginning */ + struct lstopo_output { + hwloc_topology_t topology; ++ unsigned depth; + + /* file config */ + FILE *file; +diff --git a/src/hwloc/utils/lstopo/test-lstopo.sh.in b/src/hwloc/utils/lstopo/test-lstopo.sh.in +index deff4ef..7530ad7 100644 +--- a/src/hwloc/utils/lstopo/test-lstopo.sh.in ++++ b/src/hwloc/utils/lstopo/test-lstopo.sh.in +@@ -60,5 +60,5 @@ $ls + $ls --export-xml-flags 1 -f $tmp/test.v1.xml + $ls --input "pa:1 no:2 co:1 l2:2 2" $tmp/test.synthetic + ) > "$file" +-diff @HWLOC_DIFF_U@ $srcdir/test-lstopo.output "$file" ++@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir/test-lstopo.output "$file" + rm -rf "$tmp" +diff --git a/src/hwloc/utils/netloc/infiniband/netloc_ib_extract_dats.c b/src/hwloc/utils/netloc/infiniband/netloc_ib_extract_dats.c +index 4620070..6f612d8 100644 +--- a/src/hwloc/utils/netloc/infiniband/netloc_ib_extract_dats.c ++++ b/src/hwloc/utils/netloc/infiniband/netloc_ib_extract_dats.c +@@ -1,5 +1,5 @@ + /* +- * Copyright © 2016 Inria. All rights reserved. ++ * Copyright © 2016-2018 Inria. All rights reserved. + * + * $COPYRIGHT$ + * +@@ -13,7 +13,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include diff --git a/daos_adio-izem.patch b/daos_adio-izem.patch new file mode 100644 index 00000000000..cd3c1cedee6 --- /dev/null +++ b/daos_adio-izem.patch @@ -0,0 +1,23 @@ +diff --git a/src/izem/.gitignore b/src/izem/.gitignore +index 5148250..5bd97e8 100644 +--- a/src/izem/.gitignore ++++ b/src/izem/.gitignore +@@ -11,6 +11,10 @@ config.status + src/include/zm_config.h.in + libtool + stamp-h1 ++Doxyfile ++src/include/common/zm_common.h ++src/include/queue/zm_queue.h ++src/include/zm_config.h + + # m4 additions + m4/ar-lib +@@ -38,6 +42,7 @@ libzm.la + *.lo + *.o + build/ ++maint/izem.pc + + # misc + *~ diff --git a/daos_adio-izem.patch.old b/daos_adio-izem.patch.old new file mode 100644 index 00000000000..cd3c1cedee6 --- /dev/null +++ b/daos_adio-izem.patch.old @@ -0,0 +1,23 @@ +diff --git a/src/izem/.gitignore b/src/izem/.gitignore +index 5148250..5bd97e8 100644 +--- a/src/izem/.gitignore ++++ b/src/izem/.gitignore +@@ -11,6 +11,10 @@ config.status + src/include/zm_config.h.in + libtool + stamp-h1 ++Doxyfile ++src/include/common/zm_common.h ++src/include/queue/zm_queue.h ++src/include/zm_config.h + + # m4 additions + m4/ar-lib +@@ -38,6 +42,7 @@ libzm.la + *.lo + *.o + build/ ++maint/izem.pc + + # misc + *~ diff --git a/daos_adio-libfabric.patch b/daos_adio-libfabric.patch new file mode 100644 index 00000000000..3b3c89a8341 --- /dev/null +++ b/daos_adio-libfabric.patch @@ -0,0 +1,129214 @@ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/.appveyor.yml b/src/mpid/ch4/netmod/ofi/libfabric/.appveyor.yml +index 6f462c6..4a69c2a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/.appveyor.yml ++++ b/src/mpid/ch4/netmod/ofi/libfabric/.appveyor.yml +@@ -23,14 +23,12 @@ before_build: + + after_build: + - set PATH=%CD%\x64\%CONFIGURATION%;%PATH% +- - cd .. + + before_test: +- - git clone https://github.com/ofiwg/fabtests + - cd fabtests +- - git checkout -b v1.6.x origin/v1.6.x + - msbuild fabtests.sln + + test_script: + - set PATH=%CD%\x64\%CONFIGURATION%;%PATH% ++ - set FI_PROVIDER=sockets + - scripts\runfabtests.cmd +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/.gitattributes b/src/mpid/ch4/netmod/ofi/libfabric/.gitattributes +new file mode 100644 +index 0000000..cf1c386 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/.gitattributes +@@ -0,0 +1 @@ ++*.cmd eol=crlf +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/.gitignore b/src/mpid/ch4/netmod/ofi/libfabric/.gitignore +index c478d96..f8c16e5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/.gitignore ++++ b/src/mpid/ch4/netmod/ofi/libfabric/.gitignore +@@ -31,6 +31,7 @@ Makefile + Makefile.in + aclocal.m4 + autom4te.cache ++config/* + config.h + config.h.in + config.h.in~ +@@ -63,3 +64,12 @@ util/fi_pingpong + prov/*/*.spec + + .vs ++fabtests.spec ++ ++fabtests/ubertest/fabtest ++fabtests/ubertest/fi_ubertest ++ ++fabtests/benchmarks/fi_* ++fabtests/functional/fi_* ++fabtests/unit/fi_* ++pingpong/fi_* +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/.travis.yml b/src/mpid/ch4/netmod/ofi/libfabric/.travis.yml +index 307fb1f..4542a99 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/.travis.yml ++++ b/src/mpid/ch4/netmod/ofi/libfabric/.travis.yml +@@ -1,5 +1,4 @@ + dist: trusty +-sudo: false + language: c + compiler: + - clang +@@ -11,13 +10,31 @@ addons: + apt: + packages: + - rpm +- - libibverbs-dev +- - librdmacm-dev + - libnl-3-200 + - libnl-3-dev + - libnl-route-3-200 + - libnl-route-3-dev + - libnuma-dev ++# required for rdma-core ++ - build-essential ++ - debhelper ++ - dh-systemd ++ - fakeroot ++ - gcc ++ - git ++ - libudev-dev ++ - make ++ - ninja-build ++ - pandoc ++ - pkg-config ++ - python ++ - valgrind ++ - sparse ++ - wget ++ - abi-compliance-checker ++ - abi-dumper ++# 32 bit support packages ++ - gcc-multilib + ssh_known_hosts: + - www.openfabrics.org + - git.kernel.org +@@ -39,10 +56,15 @@ before_install: + + install: + - ./autogen.sh ++ # Build rdma-core because ubuntu trusty doesn't have a sufficiently new version of ibverbs/rdma-core + # Build verbs only in linux as OS X doesn't have verbs support +- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then +- LIBRARY_CONFIGURE_ARGS="$LIBFABRIC_CONFIGURE_ARGS --enable-usnic +- --enable-verbs --enable-mlx=$HOME/mlx"; ++ - if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then ++ RDMA_CORE_BRANCH=v13 ; ++ git clone --depth 1 -b $RDMA_CORE_BRANCH https://github.com/linux-rdma/rdma-core.git && cd rdma-core && bash build.sh && cd - ; ++ RDMA_CORE_PATH=$PWD/rdma-core/build ; ++ export LD_LIBRARY_PATH="$RDMA_CORE_PATH/lib:$LD_LIBRARY_PATH" ; ++ LIBFABRIC_CONFIGURE_ARGS="$LIBFABRIC_CONFIGURE_ARGS --enable-usnic ++ --enable-verbs=$RDMA_CORE_PATH --enable-mlx=$HOME/mlx"; + UCX_BRANCH=v1.2.x; + git clone --depth 1 -b $UCX_BRANCH https://github.com/openucx/ucx.git && cd ucx && ./autogen.sh && ./configure --prefix=$HOME/mlx CFLAGS="-w" && make -j2 install && cd -; + fi +@@ -69,11 +91,16 @@ install: + - make test + - make distcheck + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make rpm; fi ++ # Prepare build for fabtests ++ - ./configure $LIBFABRIC_CONFIGURE_ARGS ++ - make -j2 ++ - make install ++ - make test ++ - make distcheck ++ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make rpm; fi + + script: +- - git clone https://github.com/ofiwg/fabtests.git + - cd fabtests +- - git checkout -b v1.6.x origin/v1.6.x + - ./autogen.sh + - ./configure --prefix=$PREFIX --with-libfabric=$PREFIX + - make -j2 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/AUTHORS b/src/mpid/ch4/netmod/ofi/libfabric/AUTHORS +index 559b95e..a796d70 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/AUTHORS ++++ b/src/mpid/ch4/netmod/ofi/libfabric/AUTHORS +@@ -1,26 +1,34 @@ ++aikatz + aingerson + aingerson + Ajay Kulkarni ++aleksandra.justa + Amith Abraham + Ana Guerrero López + Anatoliy Rozanov + Andrew Friedley + Arun C Ilango + arun ilango ++Arun Ilango + Ashley Pittman + Ashley Pittman + Automated bot for the OFIWG organization + Benjamin Drung ++Ben Menadue + Ben Turrubiates + Ben Turrubiates + Brian Li + Chang Hyun Park ++Charles J Archer + Chen Zhao ++Chris Dolan + Chuck Fossen ++Dardo D Kleiner + Dave Goodell + David Noel + Dmitry Durnov + Dmitry Gladkov ++Erik Paulson + Erik Paulson + Evan Harvey + Evan Harvey +@@ -28,11 +36,15 @@ Evan Harvey + Evgeny Leksikov + Ezra Kissel + Frank Zago ++germanafro + Gilles Gouaillardet + Gilles Gouaillardet + Hefty + Holger Hoffstätte + Howard Pritchard ++Ignacio Hernandez ++Ira Weiny ++Jaime Arteaga + James Dinan + James Shimek + James Swaro +@@ -43,20 +55,32 @@ Jay Sternberg + Jeff Hammond + Jeff Hammond + Jeff Squyres ++Jerome Berryhill ++Jerome Boyd Berryhill ++Jerome Soumagne + Jianxin Xiong + Jim Snow + Jithin Jose + Joe Doyle ++Johannes Ziegenbalg ++John Biddiscombe ++John Byrne + Jonathan Behrens ++jose ++jose ++JoZie + Ken Raffenetti + kseager + Latchesar Ionkov + Lisanna Dettwyler + Lisanna Dettwyler ++Marcin Salnik + Martin Kontsek + Miao Luo + Michael Blocksome + Michael Chuvelev ++Mohan Gandhi ++Neil Spruit + Oblomov, Sergey + Oblomov, Sergey + OFIWG Bot +@@ -66,8 +90,10 @@ Patrick McCormick + Paul Coffman + Pierre Roux + Prankur Gupta ++Raghu Raja + Reese Faucette + Richard Halkyard ++Robert Wespetal + Sannikov, Alexander + Sayantan Sur + Sean Hefty +@@ -79,6 +105,7 @@ Spruit, Neil R + Srdjan Milakovic + Stan Smith + Steven Vormwald ++Steve Welch + Sung-Eun Choi + Sung-Eun Choi + Sylvain Didelot +@@ -86,6 +113,8 @@ Sylvain Didelot + Thananon Patinyasakdikul + Thomas Smith + Tony Zinger ++tonyzinger ++Venkata Krishna Nimmagadda + Venkata Krishna Nimmagadda + Wesley Bland + Xuyang Wang +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/COPYING b/src/mpid/ch4/netmod/ofi/libfabric/COPYING +index 767dc09..31bc30a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/COPYING ++++ b/src/mpid/ch4/netmod/ofi/libfabric/COPYING +@@ -3,8 +3,8 @@ licenses. You may choose to be licensed under the terms of the the + BSD license or the GNU General Public License (GPL) Version + 2, both included below. + +-Copyright (c) 2015-2018 Intel Corporation. All rights reserved. +-Copyright (c) 2015-2018 Cisco Systems, Inc. All rights reserved. ++Copyright (c) 2015-2019 Intel Corporation. All rights reserved. ++Copyright (c) 2015-2019 Cisco Systems, Inc. All rights reserved. + + ================================================================== + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/Libfabric.Build.Default.props b/src/mpid/ch4/netmod/ofi/libfabric/Libfabric.Build.Default.props +new file mode 100644 +index 0000000..285dce7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/Libfabric.Build.Default.props +@@ -0,0 +1,49 @@ ++ ++ ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_10_0).0 ++ $(WindowsTargetPlatformVersion_10_0) ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_8_1).0 ++ $(WindowsTargetPlatformVersion_8_1) ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.0@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_8_0).0 ++ $(WindowsTargetPlatformVersion_8_0) ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_7_1).0 ++ $(WindowsTargetPlatformVersion_7_1) ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_7_0).0 ++ $(WindowsTargetPlatformVersion_7_0) ++ ++ +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/Makefile.am b/src/mpid/ch4/netmod/ofi/libfabric/Makefile.am +index 6224aa6..2871c40 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/Makefile.am ++++ b/src/mpid/ch4/netmod/ofi/libfabric/Makefile.am +@@ -1,6 +1,7 @@ + # + # Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +-# Copyright (c) 2017 Intel Corporation, Inc. All right reserved. ++# Copyright (c) 2017-2018 Intel Corporation, Inc. All right reserved. ++# Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + # + # Makefile.am for libfabric + +@@ -41,10 +42,12 @@ common_srcs = \ + src/common.c \ + src/enosys.c \ + src/rbtree.c \ ++ src/tree.c \ + src/fasthash.c \ + src/indexer.c \ + src/mem.c \ + src/iov.c \ ++ src/shared/ofi_str.c \ + prov/util/src/util_atomic.c \ + prov/util/src/util_attr.c \ + prov/util/src/util_av.c \ +@@ -63,17 +66,7 @@ common_srcs = \ + prov/util/src/util_ns.c \ + prov/util/src/util_shm.c \ + prov/util/src/util_mem_monitor.c\ +- prov/util/src/util_mr_cache.c \ +- prov/hook/src/hook.c \ +- prov/hook/src/hook_av.c \ +- prov/hook/src/hook_cm.c \ +- prov/hook/src/hook_cntr.c \ +- prov/hook/src/hook_cq.c \ +- prov/hook/src/hook_domain.c \ +- prov/hook/src/hook_ep.c \ +- prov/hook/src/hook_eq.c \ +- prov/hook/src/hook_wait.c \ +- prov/hook/src/hook_xfer.c ++ prov/util/src/util_mr_cache.c + + + if MACOS +@@ -90,6 +83,7 @@ endif + + if LINUX + common_srcs += src/unix/osd.c ++common_srcs += src/linux/osd.c + if HAVE_LINUX_PERF_RDPMC + common_srcs += src/linux/rdpmc.c + endif +@@ -127,16 +121,21 @@ src_libfabric_la_SOURCES = \ + include/ofi_atom.h \ + include/ofi_enosys.h \ + include/ofi_file.h \ ++ include/ofi_hook.h \ + include/ofi_indexer.h \ + include/ofi_iov.h \ + include/ofi_list.h \ ++ include/shared/ofi_str.h \ + include/ofi_lock.h \ + include/ofi_mem.h \ + include/ofi_osd.h \ + include/ofi_proto.h \ ++ include/ofi_recvwin.h \ + include/ofi_rbuf.h \ + include/ofi_shm.h \ + include/ofi_signal.h \ ++ include/ofi_epoll.h \ ++ include/ofi_tree.h \ + include/ofi_util.h \ + include/ofi_atomic.h \ + include/ofi_mr.h \ +@@ -146,7 +145,6 @@ src_libfabric_la_SOURCES = \ + include/rbtree.h \ + include/uthash.h \ + include/ofi_prov.h \ +- prov/hook/src/hook.h \ + include/rdma/providers/fi_log.h \ + include/rdma/providers/fi_prov.h \ + src/fabric.c \ +@@ -155,6 +153,16 @@ src_libfabric_la_SOURCES = \ + src/log.c \ + src/var.c \ + src/abi_1_0.c \ ++ prov/hook/src/hook.c \ ++ prov/hook/src/hook_av.c \ ++ prov/hook/src/hook_cm.c \ ++ prov/hook/src/hook_cntr.c \ ++ prov/hook/src/hook_cq.c \ ++ prov/hook/src/hook_domain.c \ ++ prov/hook/src/hook_ep.c \ ++ prov/hook/src/hook_eq.c \ ++ prov/hook/src/hook_wait.c \ ++ prov/hook/src/hook_xfer.c \ + $(common_srcs) + + src_libfabric_la_CPPFLAGS = $(AM_CPPFLAGS) +@@ -163,7 +171,7 @@ src_libfabric_la_LIBADD = + src_libfabric_la_DEPENDENCIES = libfabric.map + + if !EMBEDDED +-src_libfabric_la_LDFLAGS += -version-info 10:15:9 ++src_libfabric_la_LDFLAGS += -version-info 11:1:10 + endif + src_libfabric_la_LDFLAGS += -export-dynamic \ + $(libfabric_version_script) +@@ -214,12 +222,14 @@ real_man_pages = \ + man/man3/fi_getinfo.3 \ + man/man3/fi_mr.3 \ + man/man3/fi_msg.3 \ ++ man/man3/fi_nic.3 \ + man/man3/fi_poll.3 \ + man/man3/fi_rma.3 \ + man/man3/fi_tagged.3 \ + man/man3/fi_trigger.3 \ + man/man3/fi_version.3 \ + man/man7/fabric.7 \ ++ man/man7/fi_hook.7 \ + man/man7/fi_provider.7 \ + man/man7/fi_direct.7 + +@@ -369,11 +379,15 @@ include prov/psm/Makefile.include + include prov/psm2/Makefile.include + include prov/gni/Makefile.include + include prov/rxm/Makefile.include ++include prov/mrail/Makefile.include + include prov/rxd/Makefile.include + include prov/bgq/Makefile.include + include prov/mlx/Makefile.include + include prov/shm/Makefile.include + include prov/tcp/Makefile.include ++include prov/rstream/Makefile.include ++include prov/hook/Makefile.include ++include prov/hook/perf/Makefile.include + + man_MANS = $(real_man_pages) $(prov_install_man_pages) $(dummy_man_pages) + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/NEWS.md b/src/mpid/ch4/netmod/ofi/libfabric/NEWS.md +index eada67b..009197d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/NEWS.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/NEWS.md +@@ -5,6 +5,276 @@ This file contains the main features as well as overviews of specific + bug fixes (and other actions) for each version of Libfabric since + version 1.0. + ++v1.7.1, Mon Apr 8, 2019 ++======================== ++ ++## Core ++ ++- Support layered provider names with FI_PROVIDER filter ++- Minor cleanups to man pages ++- Add missing header for FreeBSD support ++- Fix built-in atomic tests ++- Do not overwrite CFLAGS during build ++ ++## Fabtests ++ ++- Fix memory leaks in fi_getinfo_test ++- Fix memory leak in fi_av_xfer error paths ++- Fix memory leaks in fi_cm_data ++- Fix memory leak in fi_poll ++- Add test configuration and exclude files for shm ++ ++## GNI ++ ++- Fix setting supported tag mask ++- Fall back to normal allocations when huge page support is unavailable ++ ++## PSM2 ++ ++- Inline address translation function for performance ++- Create tagged ops specialization for FI_AV_MAP ++- Bring back true FI_AV_MAP support under certain conditions ++- Use psm2_epaddr_to_epid() for epaddr to epid conversion ++- Add runtime parameter for connection timeout ++ ++## MXM ++ ++- Disable provider by default as it is not actively maintained ++ ++## RxD ++ ++- Fix completion generation ++- Use correct flags for *msg APIs ++- Return correct error code if Tx is unable to be accepted ++- Add missing EP attributes ++- Fix use after free error opening an endpoint ++ ++## RxM ++ ++- Avoid unnecessary fi_getinfo calls to avoid possible failures ++- Discard Rx buffers for closed EPs to avoid segfaults ++- Repost receive buffers to avoid possible fabric deadlock ++- Fix crash accessing invalid Tx CQ ++- Use correct flags for *msg APIs ++- Report available inject size, rather than reducing value based on user hints ++- Fix endpoint configuration checks when enabling endpoint ++- Keep eager protocol limit separate from inject size ++- Increment correct atomic counter ++- Discard CQ entries generated by canceled receives ++- Initialize maximum atomic payload size ++- Add connection event progress ++- Fix SAR protocol truncation error ++- Fix setting FI_MSG and fi_RMA caps ++ ++## TCP ++ ++- Fix synchronization verifying MRs ++- Remove duplicate Rx queue removal ++- Return internal buffers to correct buffer pools to avoid data corruption ++- Free internal buffer pools and fix memory leaks ++- Handle peer socket disconnects properly ++- Pass signals through to application threads ++- Cleanup pending events when closing endpoints ++- Only adjust endianness when peers' endianness mismatches ++- Optimize header sizes based on message types to improve performance ++ ++## Sockets ++ ++- Fix acquiring the same lock twice ++- Fix accessing an uninitialized pointer handling CM events ++ ++## SHM ++ ++- Add support for selective completions ++- Fix addressing ++- Set MR key size ++- Fix memory corruption and memory leak ++ ++## Verbs ++ ++- Cleanup from use of memory registration cache ++- Do not update minimum RNR timer for XRC initiator QPs ++- Fix possible CQ overrun issues with hfi1 and qib devices ++- Fix synchronization issue accessing MR cache from multiple threads ++- Fix double free in XRC accept path ++- Add missing include file ++- Make fi_getinfo call thread safe ++- Fix CQ busy issue in MPI finalize when using XRC ++- Return correct attribute values when XRC is enabled ++- Fix sending atomic response protocol message ++- Report flushed receive operations (reverts to behavior in 1.4 and earlier) ++- Fix segfault reading CQ error entries ++- Fix double free of XRC connection request data ++- Set FI_RX_CQ_DATA mode bit correctly ++ ++ ++v1.7.0, Mon Jan 7, 2019 ++======================= ++ ++The 1.7 release provides a few enhancements to the libfabric API. ++Notably, it extends the fi_info structure in order to report NIC ++attributes for domains that have a direct association with network ++hardware. The NIC attributes include details about the device, the ++system bus it's attached to, and link state. NIC attributes are ++automatically reported by the fi_info utility application. See the ++fi_nic.3 man page for additional details. ++ ++An experimental capability bit is added to optimize receive side ++processing. This is known as variable messages, and targets applications ++that do now know what size message a peer with send prior to the ++message arriving. Variable messages can be used to avoid receive ++side data copies and eliminate the need for applications to implement ++their own rendezvous protocol. See the fi_msg.3 man page for details on ++variable messages and it's sister, buffered messages. ++ ++Specific details on changes since the 1.6.2 release are outlined below. ++ ++## Core ++ ++- Add ability to report NIC details with fi_info data ++- Improve MR cache notification mechanisms ++- Set sockaddr address format correctly ++- Avoid possible null dereference in eq_read ++- Handle FI_PEEK in CQ/EQ readerr ++- Add debug messages to name server ++- Feature and performance enhancements added to internal buffer pool ++- Add support for huge pages ++- Decrease memory use for idle buffer pools ++- Refactor utility AV functionality ++- Generic counter support enhancements ++- Optimize EP and CQ locking based on application threading level ++- Enhance common support for EQ error handling ++- Add free/alloc memory notification hooks for MR cache support ++- Fix memory monitor unsubscribe handling ++- Add CQ fd wait support ++- Add CQ overflow protection ++- Enhance IPv6 addressing support for AVs ++- Enhancements to support for AV address lookup ++- Fixes for emulated epoll support ++- Allow layering of multiple utility providers ++- Minor bug fixes and optimization ++ ++## Hook ++ ++- Improved hooking infrastructure ++- Add support for installing multiple hooks ++- Support hooks provided by external libraries. ++ ++## GNI ++ ++- Fix CQ readfrom overwriting src_addr in case of multiple events ++- Signal wait set if error entry is added to CQ ++- Fix state data issue with SMSG buffers ++- Enhance and fix possible misuse of default authorization key ++- Add cancel support for SEP ++- Rework SEP setup ++- Suppress huge page counting for ARM ++- Fix incorrect check of FI_SYNC_ERR flag ++ ++## MRAIL ++ ++- Initial release of mrail provider. The current status is experimental: not all ++ features are supported and performance is not guaranteed. ++- Enables increased bandwidth for an underlying provider by utilizing multiple ++ network ports (rails). ++ ++## NetDir ++ ++- Fix crash in initialization code ++- Update references to NetworkDirect header packaged ++ ++## PSM2 ++ ++- Requires PSM2 library version 10.2.260 or later ++- Clean up connection state in fi_av_remove ++- Use psm2_info_query to read HFI device info ++- Clean up CQ/counter poll list when endpoint is closed ++- Support shared address vector ++- Optimize CQ event conversion with psm2_mq_ipeek_dequeue_multi ++- Lock optimization for FI_THREAD_DOMAIN ++- Use new PSM2 fast path isend/irecv functions for large size RMA ++- Support building with latest PSM2 source code (version 11.2.68) ++- Support fabric direct ++ ++## RxD ++ ++- Initial release of RxD provider ++- Provides reliable datagram semantics over unreliable datagram EPs ++- Target is to improve scalability for very large clusters relative to RxM ++ ++## RxM ++ ++- Decrease memory use needed to maintain large number of connections ++- Set correct op_context and flags on CQ error completions ++- Fix file descriptor memory leaks ++- Introduce new protocol optimized for medium message transfers ++- Improve Rx software performance path ++- Use shared receive contexts if required by underlying provider ++- Handle addresses inserted multiple times into AV (for AV map) ++- Performance optimizations for single-thread applications ++- Rework deferred transmit processing ++- Separate and optimize eager and rendezvous protocol processing. ++- Fix passing incorrect addresses for AV insert/remove ++- Fix CM address handling ++- Fix race condition accessing connection handles ++- Simplify small RMA code path ++- Increment correct counter when processing FI_READ events ++- Dynamically grow the number of connections that can be supported ++- Fix padding in wire protocol structures ++- Report correct fi_addr when FI_SOURCE is requested ++- Fix truncating rendezvous messages ++- Fix use after free error in Rx buffer processing ++- Add support for manual progress ++- Make Tx/Rx queue sizes independent of MSG EP sizes ++- Decrease time needed to repost buffers to the MSG EP Rx queue. ++- Miscellaneous bug fixes ++ ++## Sockets ++ ++- Enable MSG EPs when user calls fi_accept ++- Fix fabric names to be underlying IP address ++- Add connection timeout environment variable. ++- Use size of addresses, not structures ++- Add debug messages to display selected addresses ++- Use loopback address in place of localhost ++- Simplify listen paths ++- Add support for IPv6 ++- Code restructuring ++- Avoid unneeded address to string to address translations ++- Check length of iovec entries prior to access buffers ++- Fix segfault ++- Avoid acquiring nested spinlocks resulting in hangs ++- Fix use after free error in triggered op handling ++- New connection manager for MSG EPs to reduce number of threads ++- Avoid retrying recv operations if connection has been broken ++- Fixes for Windows socket support ++ ++## TCP ++ ++- Initial release of optimized socket based tcp provider ++- Supports MSG EPs, to be used in conjunction with RxM provider ++- Targets eventual replacement of sockets provider ++ ++## Verbs ++ ++- Remove RDM EP support. Use RxM and RxD for RDM EPs. ++- Improve address handling and report in fi_getinfo ++- Handle FI_PEER when calling CQ/EQ readerr functions ++- Add support for XRC QPs. ++- Ignore destination address when allocating a PEP ++- Add workaround for i40iw incorrect return values when posting sends ++- Fix completion handling for FI_SELECTIVE_COMPLETION EP setting ++- Change format of fabric name to use hex instead of decimal values ++- Fix handling of err_data with EQ readerr ++- Report correct size of max_err_data ++- Fast path performance improvements ++- Improve progress under high system load ++- Optimize completion processing when handling hidden completions ++- Optimize RMA and MSG transfers by pre-formatting work requests ++- Remove locks based on application threading model ++- Add overflow support for CQ error events ++- Minor cleanups and bug fixes ++ + v1.6.2, Fri Sep 28, 2018 + ======================== + +@@ -13,6 +283,7 @@ v1.6.2, Fri Sep 28, 2018 + - Cleanup of debug messages + + ## GNI ++ + - Fix problems with Scalable Endpoint creation + - Fix interoperability problem with HPC toolkit + - Improve configuration check for kdreg +@@ -102,6 +373,7 @@ v1.6.1, Wed May 8, 2018 + + - Fix use after free error handling triggered ops. + ++ + v1.6.0, Wed Mar 14, 2018 + ======================== + +@@ -115,9 +387,9 @@ v1.6.0, Wed Mar 14, 2018 + - Add const to fi_getinfo() hints parameter + - Improve use of epoll for better scalability + - Fixes to generic name service +-- Implemented support of MR caching without merging of regions + + ## GNI ++ + - Fix a problem with the GNI waitset implementation + - Enable use of XPMEM for intra node data transfers + - Fix a problem with usage of Crays UDREG registration cache +@@ -211,7 +483,7 @@ v1.6.0, Wed Mar 14, 2018 + + - Scalability enhancements + - Fix issue associating a connection with an AV entry that could result in +- application hangs ++ application hangs + - Add support for new persistent memory capabilities + - Fix fi_cq_signal to unblock threads waiting on cq sread calls + - Fix epoll_wait loop handling to avoid out of memory errors +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/README.md b/src/mpid/ch4/netmod/ofi/libfabric/README.md +index fc4d53d..b6c6401 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/README.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/README.md +@@ -197,6 +197,19 @@ supports all Libfabric provider requirements and interfaces. + + See the `fi_sockets(7)` man page for more details. + ++### tcp ++ ++*** ++ ++The tcp provider is an optimized socket based provider that supports ++reliable connected endpoints. It is intended to be used directly by ++apps that need MSG endpoint support, or in conjunction with the rxm ++provider for apps that need RDM endpoints. The tcp provider targets ++replacing the sockets provider for applications using standard ++networking hardware. ++ ++See the `fi_tcp(7)` man page for more details. ++ + + ### udp + +@@ -309,9 +322,6 @@ Windows OS to expose the capabilities of the networking devices if the hardware + vendors of the devices implemented the Network Direct service provider interface + (SPI) for their hardware. + +-The Network Direct is an experimental provider. The full support of the Network +-Direct provider will be added to 1.6 release version of libfabric. +- + See the `fi_netdir(7)` man page for more details. + + #### Dependencies +@@ -356,4 +366,38 @@ See the `fi_shm(7)` man page for more details. + + - The shared memory provider only works on Linux platforms and makes use of + kernel support for 'cross-memory attach' (CMA) data copies for large +- transfers. +\ No newline at end of file ++ transfers. ++ ++## WINDOWS Instructions ++ ++Even though windows isn't fully supported yet it is possible to compile and link your library. ++ ++- 1. first you need the NetDirect provider: ++ Network Direct SDK/DDK may be obtained as a nuget package (preferred) from: ++ ++ https://www.nuget.org/packages/NetworkDirect ++ ++ or downloaded from: ++ ++ https://www.microsoft.com/en-us/download/details.aspx?id=36043 ++ on page press Download button and select NetworkDirect_DDK.zip. ++ ++ Extract header files from downloaded ++ NetworkDirect_DDK.zip:`\NetDirect\include\` file into `\prov\netdir\NetDirect\`, ++ or add path to NetDirect headers into VS include paths ++ ++- 2. compiling: ++ libfabric has 6 Visual Studio solution configurations: ++ ++ 1-2: Debug/Release ICC (restricted support for Intel Compiler XE 15.0 only) ++ 3-4: Debug/Release v140 (VS 2015 tool set) ++ 5-6: Debug/Release v141 (VS 2017 tool set) ++ ++ make sure you choose the correct target fitting your compiler. ++ By default the library will be compiled to `\x64\` ++ ++- 3. linking your library ++ - right click your project and select properties. ++ - choose C/C++ > General and add `\include` to "Additional include Directories" ++ - choose Linker > Input and add `\x64\\libfabric.lib` to "Additional Dependencies" ++ - depending on what you are building you may also need to copy `libfabric.dll` into the targetfolder of your own project. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-make-nightly-tarball.pl b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-make-nightly-tarball.pl +index b030a05..2db6d24 100755 +--- a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-make-nightly-tarball.pl ++++ b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-make-nightly-tarball.pl +@@ -35,7 +35,6 @@ use File::Basename; + use Getopt::Long; + + my $libfabric_dir_arg; +-my $fabtests_dir_arg; + my $download_dir_arg; + my $libfabric_coverity_token_arg; + my $fabtests_coverity_token_arg; +@@ -45,7 +44,6 @@ my $verbose_arg; + my $debug_arg; + + my $ok = Getopt::Long::GetOptions("libfabric-source-dir=s" => \$libfabric_dir_arg, +- "fabtests-source-dir=s" => \$fabtests_dir_arg, + "download-dir=s" => \$download_dir_arg, + "libfabric-coverity-token=s" => \$libfabric_coverity_token_arg, + "fabtests-coverity-token=s" => \$fabtests_coverity_token_arg, +@@ -56,14 +54,13 @@ my $ok = Getopt::Long::GetOptions("libfabric-source-dir=s" => \$libfabric_dir_ar + ); + + if ($help_arg || !$ok) { +- print "$0 --libfabric-source-dir libfabric_git_tree --fabtests-source-dir fabtests_git_tree --download-dir download_tree\n"; ++ print "$0 --libfabric-source-dir libfabric_git_tree --download-dir download_tree\n"; + exit($ok); + } + + # Sanity checks +-die "Must specify --libfabric-source-dir, --fabtests-source-dir, --download-dir, and --logfile-dir" ++die "Must specify --libfabric-source-dir, --download-dir, and --logfile-dir" + if (!defined($libfabric_dir_arg) || $libfabric_dir_arg eq "" || +- !defined($fabtests_dir_arg) || $fabtests_dir_arg eq "" || + !defined($download_dir_arg) || $download_dir_arg eq "" || + !defined($logfile_dir_arg) || $logfile_dir_arg eq ""); + die "$libfabric_dir_arg is not a valid directory" +@@ -140,7 +137,6 @@ sub get_git_version { + + sub make_tarball { + my $base_name = shift; +- my $source_dir = shift; + my $version = shift; + my $installdir = shift; + +@@ -251,14 +247,13 @@ verbose("*** Building libfabric...\n"); + chdir($libfabric_dir_arg); + git_cleanup(); + my $libfabric_version = get_git_version(); +-my $rebuilt_libfabric = make_tarball("libfabric", $libfabric_dir_arg, +- $libfabric_version, $installdir); ++my $rebuilt_libfabric = make_tarball("libfabric", ++ $libfabric_version, $installdir); + + verbose("\n\n*** Building fabtests...\n"); +-chdir($fabtests_dir_arg); +-git_cleanup(); ++chdir('fabtests'); + my $fabtests_version = get_git_version(); +-my $rebuilt_fabtests = make_tarball("fabtests", $fabtests_dir_arg, ++my $rebuilt_fabtests = make_tarball("fabtests", + $fabtests_version, $installdir); + + if ($rebuilt_libfabric || $rebuilt_fabtests) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-run-all-md2nroff.pl b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-run-all-md2nroff.pl +index b55b431..f1f0c78 100755 +--- a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-run-all-md2nroff.pl ++++ b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-run-all-md2nroff.pl +@@ -148,25 +148,42 @@ if (defined($pages_branch_arg)) { + } + + ##################################################################### ++# Look for all markdown man pages ++##################################################################### + +-# Find all the *.\d.md files in the source repo +-verbose("*** Finding markdown man pages...\n"); ++# Find all libfabric *.\d.md files ++verbose("*** Finding libfabric markdown man pages...\n"); + opendir(DIR, "source/man"); +-my @markdown_files = grep { /\.\d\.md$/ && -f "source/man/$_" } readdir(DIR); ++my @libfabric_markdown_files = ++ map { "source/man/" . $_ } ++ grep { /\.\d\.md$/ && -f "source/man/$_" } readdir(DIR); ++closedir(DIR); ++verbose("Found: @libfabric_markdown_files\n"); ++ ++# Find all fabtests *.\d.md files ++verbose("*** Finding fabtests markdown man pages...\n"); ++opendir(DIR, "source/fabtests/man"); ++my @fabtests_markdown_files = ++ map { "source/fabtests/man/" . $_ } ++ grep { /\.\d\.md$/ && -f "source/fabtests/man/$_" } readdir(DIR); + closedir(DIR); +-verbose("Found: @markdown_files\n"); ++verbose("Found: @fabtests_markdown_files\n"); + + ##################################################################### ++# Publish any changes to man pages to the gh-pages branch ++# (only libfabric -- not fabtests) ++##################################################################### + + # Copy each of the markdown files to the pages branch checkout + if (defined($pages_branch_arg)) { + chdir("pages/master"); +- foreach my $file (@markdown_files) { +- doit(0, "cp ../../source/man/$file man/$file", "loop-cp"); ++ foreach my $file (@libfabric_markdown_files) { ++ my $base = basename($file); ++ doit(0, "cp $tmpdir/$file man/$base", "loop-cp"); + + # Is there a new man page? If so, we need to "git add" it. +- my $out = `git status --porcelain man/$file`; +- doit(0, "git add man/$file", "loop-git-add") ++ my $out = `git status --porcelain man/$base`; ++ doit(0, "git add man/$base", "loop-git-add") + if ($out =~ /^\?\?/); + } + +@@ -190,11 +207,12 @@ if (defined($pages_branch_arg)) { + push(@headings, { section=>3, title=>"API documentation" }); + foreach my $h (@headings) { + print OUT "\n* $h->{title}\n"; +- foreach my $file (sort(@markdown_files)) { +- if ($file =~ /\.$h->{section}\.md$/) { +- $file =~ m/^(.+)\.$h->{section}\.md$/; +- my $base = $1; +- print OUT " * [$base($h->{section})]($base.$h->{section}.html)\n"; ++ foreach my $file (sort(@libfabric_markdown_files)) { ++ my $base = basename($file); ++ if ($base =~ /\.$h->{section}\.md$/) { ++ $base =~ m/^(.+)\.$h->{section}\.md$/; ++ my $shortname = $1; ++ print OUT " * [$shortname($h->{section})]($shortname.$h->{section}.html)\n"; + } + } + } +@@ -210,28 +228,21 @@ if (defined($pages_branch_arg)) { + } + + ##################################################################### ++# Look for changes to .md files and generate nroff files on master ++##################################################################### ++ ++my @markdown_files = (@libfabric_markdown_files, ++ @fabtests_markdown_files); + + # Now process each of the Markdown files in the source repo and + # generate new nroff man pages. +-chdir("$tmpdir/source/man"); ++chdir("$tmpdir"); + foreach my $file (@markdown_files) { +- doit(0, "../config/md2nroff.pl --source $file", "loop2-md2nroff"); +- +- # Did we generate a new man page? If so, we need to "git add" it. +- my $man_file = basename($file); +- +- $man_file =~ m/\.(\d)\.md$/; +- my $section = $1; +- +- $man_file =~ s/\.md$//; +- +- my $full_filename = "man$section/$man_file"; +- +- my $out = `git status --porcelain $full_filename`; +- doit(0, "git add $full_filename", "loop2-git-add") +- if ($out =~ /^\?\?/); ++ doit(0, "$tmpdir/source/config/md2nroff.pl --source $file", "loop2-md2nroff"); + } + ++##################################################################### ++ + # Similar to above: commit the newly-generated nroff pages and push + # them back upstream. If nothing changed, these will be no-ops. Note + # that there are mandatory CI checks on master, which means we can't +@@ -241,6 +252,7 @@ foreach my $file (@markdown_files) { + + # Try to delete the old pr branch first (it's ok to fail -- i.e., if + # it wasn't there). ++chdir("$tmpdir/source"); + my $pr_branch_name = "pr/update-nroff-generated-man-pages"; + doit(1, "git branch -D $pr_branch_name"); + doit(0, "git checkout -b $pr_branch_name"); +@@ -271,7 +283,7 @@ if ($old_head ne $new_head) { + close(GIT); + + # Create a new pull request +- my $cmd_base = "curl "; ++ my $cmd_base = "curl --silent "; + $cmd_base .= "-H 'Content-Type: application/json' "; + $cmd_base .= "-H 'Authorization: token $pat' "; + $cmd_base .= "-H 'User-Agent: OFIWG-bot' "; +@@ -311,18 +323,19 @@ if ($old_head ne $new_head) { + my $pr_num = $json->{'number'}; + verbose("Created PR #$pr_num\n"); + +- # Wait for the required DCO CI to complete on the git hash for the +- # latest commit. ++ # Wait for the required DCO check to complete on the git hash for ++ # the latest commit. + $outfile = "github-ci-status-check.json"; + + $cmd = $cmd_base; + $cmd .= "-o $outfile "; +- $cmd .= "https://api.github.com/repos/$gh_org/$gh_repo/commits/$new_head/statuses"; ++ $cmd .= "-H 'Accept: application/vnd.github.antiope-preview+json' "; ++ $cmd .= "https://api.github.com/repos/$gh_org/$gh_repo/commits/$new_head/check-runs"; + + my $count = 0; + my $max_count = 30; + my $happy = 0; +- verbose("Waiting for DCO CI to complete\n"); ++ verbose("Waiting for DCO check to complete\n"); + + # Only wait for $max_count iterations + while (!$happy && $count < $max_count) { +@@ -330,20 +343,26 @@ if ($old_head ne $new_head) { + sleep(1); + + unlink($outfile); +- doit(0, $cmd, "github-check-ci-status"); ++ doit(0, $cmd, "github-check-run-status"); + my $json = read_json_file($outfile, 1); + +- if ($json and $#{$json} >= 0) { ++ if ($json and $#{$json->{"check_runs"}} >= 0) { + # If we got any statuses back, check them to see if we can + # find a successful DCO signoff. That would indicate that +- # the required CI test run. +- foreach my $j (@$json) { +- if ($j->{"context"} eq "DCO") { ++ # the required check test ran. ++ foreach my $j (@{$json->{"check_runs"}}) { ++ if ($j->{"name"} eq "DCO") { + verbose("Found DCO status on SHA $new_head\n"); +- if ($j->{"state"} eq "success") { +- verbose("DCO is happy!\n"); +- $happy = 1; +- last; ++ if ($j->{"status"} eq "completed") { ++ if ($j->{"conclusion"} eq "success") { ++ verbose("DCO is happy!\n"); ++ $happy = 1; ++ last; ++ } else { ++ verbose("DCO is not happy -- how did that happen?\n"); ++ $happy = 0; ++ last; ++ } + } + } + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-submit-coverity.pl b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-submit-coverity.pl +index 7990574..2e2b87d 100755 +--- a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-submit-coverity.pl ++++ b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-submit-coverity.pl +@@ -18,7 +18,7 @@ my $verbose_arg = 0; + my $debug_arg = 0; + my $logfile_dir_arg; + my $configure_args = ""; +-my $make_args = "-j 32"; ++my $make_args = "-j8"; + my $help_arg = 0; + + &Getopt::Long::Configure("bundling"); +@@ -37,6 +37,8 @@ $ok = 0 + if (!defined($filename_arg)); + $ok = 0 + if (!defined($coverity_token_arg)); ++$ok = 0 ++ if (($debug_arg || $verbose_arg) && !defined($logfile_dir_arg)); + if (!$ok || $help_arg) { + print "Usage: $0 --filename=FILENAME --coverity-token=TOKEN [--dry-run] [--verbose] [--help]\n"; + exit($ok); +@@ -94,9 +96,20 @@ verbose "*** Working in $dir\n"; + + # Get the coverity tool, put it in our path + ++my $new_tool = "$ENV{HOME}/coverity-tool-new.tgz"; ++my $old_tool = "$ENV{HOME}/coverity-tool.tgz"; ++ + verbose "*** Downloading coverity tool\n"; +-doit(0, "wget $coverity_tool_url --post-data \"token=$coverity_token_arg\&project=$project_arg\" -O coverity_tool.tgz"); +-doit(0, "tar xf coverity_tool.tgz"); ++doit(1, "curl --silent $coverity_tool_url --request POST --data \"token=$coverity_token_arg\&project=$project_arg\" -o $new_tool -z $old_tool"); ++# With the -z option, curl will download the coverity tool only if it ++# is newer than what we already have. If there's no newer file to ++# download, it'll just exit(0) (which is a LOT faster, because the ++# coverity tool is giant and it takes a long time to download). ++doit(1, "mv $new_tool $old_tool") ++ if (-f $new_tool); ++ ++verbose "*** Extracting coverity tool\n"; ++doit(0, "tar xf $old_tool"); + opendir(my $dh, ".") || + die "Can't opendir ."; + my @files = grep { /^cov/ && -d "./$_" } readdir($dh); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/config/fi_provider.m4 b/src/mpid/ch4/netmod/ofi/libfabric/config/fi_provider.m4 +index 901de77..704e0ea 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/config/fi_provider.m4 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/config/fi_provider.m4 +@@ -92,7 +92,11 @@ dnl + ) + + # Call the provider's CONFIGURE and CONDITIONALS macros +- m4_include([prov/]$1[/configure.m4]) ++ m4_ifnblank(m4_esyscmd(ls [prov/]$1[/configure.m4] 2> /dev/null), ++ [m4_include([prov/]$1[/configure.m4])]) ++ m4_ifnblank(m4_esyscmd(ls [prov/hook/]$1[/configure.m4] 2> /dev/null), ++ [m4_include([prov/hook/]$1[/configure.m4])]) ++ + _FI_PROVIDER_INVOKE($1, [CONFIGURE], [yes], [yes]) + _FI_PROVIDER_INVOKE($1, [CONDITIONALS], [no], [no]) + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/configure.ac b/src/mpid/ch4/netmod/ofi/libfabric/configure.ac +index 05b8d13..112cc65 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/configure.ac ++++ b/src/mpid/ch4/netmod/ofi/libfabric/configure.ac +@@ -4,7 +4,7 @@ dnl + dnl Process this file with autoconf to produce a configure script. + + AC_PREREQ([2.60]) +-AC_INIT([libfabric], [1.6.2], [ofiwg@lists.openfabrics.org]) ++AC_INIT([libfabric], [1.7.1], [ofiwg@lists.openfabrics.org]) + AC_CONFIG_SRCDIR([src/fabric.c]) + AC_CONFIG_AUX_DIR(config) + AC_CONFIG_MACRO_DIR(config) +@@ -50,9 +50,9 @@ AS_IF([test x"$with_build_id" = x"no"], [with_build_id=""]) + AC_DEFINE_UNQUOTED([BUILD_ID],["$with_build_id"], + [adds build_id to version if it was defined]) + +-# Fix autoconf's habit of setting CFLAGS="-g -O2" by default while still ++# Override autoconf default CFLAG settings (e.g. "-g -O2") while still + # allowing the user to explicitly set CFLAGS="" +-: ${CFLAGS="-fvisibility=hidden -O2 -DNDEBUG ${base_c_warn_flags}"} ++: ${CFLAGS="-fvisibility=hidden ${base_c_warn_flags}"} + + # AM_PROG_AS would set CFLAGS="-g -O2" by default if not set already so it + # should not be called earlier +@@ -95,15 +95,9 @@ AC_ARG_ENABLE([debug], + + AS_IF([test x"$enable_debug" != x"no"], + [dbg=1 +- CFLAGS_save= +- # Remove -DNDEBUG flag if set +- for flag in $CFLAGS; do +- if test "$flag" != "-DNDEBUG"; then +- CFLAGS_save="$CFLAGS_save $flag" +- fi +- done + # See if all the flags in $debug_c_other_flags work + good_flags= ++ CFLAGS_save="$CFLAGS" + for flag in $debug_c_other_flags; do + AC_MSG_CHECKING([to see if compiler supports $flag]) + CFLAGS="$flag $CFLAGS_save" +@@ -113,12 +107,12 @@ AS_IF([test x"$enable_debug" != x"no"], + [AC_MSG_RESULT([no])]) + done + debug_c_other_flags=$good_flags +- CFLAGS=$CFLAGS_save + unset good_flags +- unset CFLAGS_save + +- CFLAGS="-g -O0 ${base_c_warn_flags} ${debug_c_warn_flags} ${debug_c_other_flags} $CFLAGS"], +- [dbg=0]) ++ CFLAGS="-g -O0 ${base_c_warn_flags} ${debug_c_warn_flags} ${debug_c_other_flags} ${CFLAGS_save}" ++ unset CFLAGS_save], ++ [dbg=0 ++ CFLAGS="-O2 -DNDEBUG $CFLAGS"]) + + AC_DEFINE_UNQUOTED([ENABLE_DEBUG],[$dbg], + [defined to 1 if libfabric was configured with --enable-debug, 0 otherwise]) +@@ -246,6 +240,36 @@ AC_TRY_LINK([#include ], + ], + [AC_MSG_RESULT(no)]) + ++dnl Check for gcc memory model aware built-in atomics ++dnl If supported check to see if not internal to compiler ++LIBS_save=$LIBS ++AC_SEARCH_LIBS([__atomic_load_8], [atomic]) ++AC_MSG_CHECKING(compiler support for built-in memory model aware atomics) ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], ++ [[uint64_t d; ++ uint64_t s; ++ uint64_t c; ++ uint64_t r; ++ r = __atomic_fetch_add(&d, s, __ATOMIC_SEQ_CST); ++ r = __atomic_load_8(&d, __ATOMIC_SEQ_CST); ++ __atomic_exchange(&d, &s, &r, __ATOMIC_SEQ_CST); ++ __atomic_compare_exchange(&d,&c,&s,0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); ++ #if defined(__PPC__) && !defined(__PPC64__) ++ #error compiler built-in memory model aware atomics are not supported on PowerPC 32-bit ++ #else ++ return 0; ++ #endif ++ ]])], ++ [ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_BUILTIN_MM_ATOMICS, 1, [Set to 1 to use built-in intrinsics memory model aware atomics]) ++ ], ++ [ ++ AC_MSG_RESULT(no) ++ LIBS=$LIBS_save ++ ]) ++unset LIBS_save ++ + dnl Check for gcc cpuid intrinsics + AC_MSG_CHECKING(compiler support for cpuid) + AC_TRY_LINK([ +@@ -368,9 +392,12 @@ FI_PROVIDER_SETUP([gni]) + FI_PROVIDER_SETUP([udp]) + FI_PROVIDER_SETUP([tcp]) + FI_PROVIDER_SETUP([rxm]) ++FI_PROVIDER_SETUP([mrail]) + FI_PROVIDER_SETUP([rxd]) + FI_PROVIDER_SETUP([bgq]) + FI_PROVIDER_SETUP([shm]) ++FI_PROVIDER_SETUP([rstream]) ++FI_PROVIDER_SETUP([perf]) + FI_PROVIDER_FINI + dnl Configure the .pc file + FI_PROVIDER_SETUP_PC +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/Jenkinsfile.verbs b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/Jenkinsfile.verbs +new file mode 100644 +index 0000000..3d87eb9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/Jenkinsfile.verbs +@@ -0,0 +1,446 @@ ++// Copyright (c) 2018. Cray Inc. All rights reserved. ++// Libfabric Verbs provider Jenkins Pipeline file ++ ++@Library(['CrayNetworkCI@master', 'dst-shared@master']) _ ++ ++pipeline { ++ options { ++ // Generic build options ++ timeout (time: 30, unit: 'MINUTES') ++ buildDiscarder(logRotator(numToKeepStr: '15')) ++ ++ // Build options ++ disableConcurrentBuilds() ++ timestamps() ++ skipStagesAfterUnstable() ++ } ++ agent { ++ node { ++ label 'wham' ++ } ++ } ++ stages { ++ stage('Prologue') { ++ steps { ++ // creating git short hash ++ script { ++ GIT_SHORT_COMMIT = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim() ++ LIBFABRIC_INSTALL = pwd tmp: true ++ } ++ ++ dir ('contrib/cray/bin') { ++ // verify requirements ++ sh './verify_requirements.sh' ++ ++ // install python environment if necessary ++ sh './setup.sh' ++ } ++ } ++ } ++ stage('Build') { ++ options { ++ timeout (time: 5, unit: 'MINUTES') ++ } ++ steps { ++ sh './autogen.sh' ++ sh "./configure --prefix=$LIBFABRIC_INSTALL" ++ sh "make -j 12" ++ sh "make install" ++ dir ("fabtests") { ++ sh './autogen.sh' ++ sh "./configure --with-libfabric=$LIBFABRIC_INSTALL --prefix=$FABTEST_PATH" ++ sh "make -j12" ++ sh "make -j12 install" ++ } ++ } ++ } ++ stage('Test') { ++ environment { ++ LD_LIBRARY_PATH = "$LIBFABRIC_INSTALL/lib:$LD_LIBRARY_PATH" ++ MPIR_CVAR_OFI_USE_PROVIDER = 'verbs;ofi_rxm' ++ LIBFABRIC_INSTALL_PATH = "$LIBFABRIC_INSTALL" ++ SFT_BIN = "${SFT_INSTALL_PATH + '/bin'}" ++ SFT_MAX_JOB_TIME = '3' ++ SFT_NUM_JOBS = '4' ++ SFT_PROVIDER = 'verbs;ofi_rxm' ++ SFT_BASELINE_DIR = "contrib/cray" ++ SFT_BASELINE_RESULTS_FILE = 'sft_test_results_baseline.txt' ++ SFT_PREVIOUS_BASELINE_RESULTS = 'sft_test_results_baseline.txt' ++ SFT_TEST_CMDS = 'sft_test_commands' ++ SFT_TEST_RESULTS = '_test_results.xml' ++ SFT_TEST_RESULTS_EXPECTED = 'expected_' ++ SFT_TEST_RESULTS_PREFIX = 'BUILD_' ++ SFT_TEST_RESULTS_CI = 'sft_ci_results.yaml' ++ } ++ options { ++ timeout (time: 22, unit: 'MINUTES') ++ } ++ parallel { ++ stage('Unit tests') { ++ steps { ++ echo 'placeholder' ++ } ++ } ++ stage('Smoke tests') { ++ steps { ++ tee ('smoketests.tap') { ++ sh '${BATS_INSTALL_PATH}/bats -t contrib/cray/bats/smoketests.bats' ++ } ++ } ++ post { ++ always { ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r smoketests.tap \\ ++ -w smoketests.xml \\ ++ tap simple.smoketests simple""" ++ } ++ } ++ } ++ stage('Functional Tests: RC') { ++ steps { ++ tee ('fabtests-rc.log') { ++ sh 'srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -v -T 60' ++ } ++ tee ('ubertests-rc.log') { ++ sh 'srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -vvv -T 60 -t complex -u all' ++ } ++ } ++ post { ++ always { ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r fabtests-rc.log \\ ++ -w fabtests-rc.xml \\ ++ fabtests \\ ++ functional.fabtests.rc.quick \\ ++ functional""" ++ ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r ubertests-rc.log \\ ++ -w ubertests-rc.xml \\ ++ fabtests \\ ++ functional.fabtests.rc.uber \\ ++ functional""" ++ } ++ } ++ } ++ stage('Functional Tests: XRC') { ++ steps { ++ tee ('fabtests-xrc.log') { ++ sh 'srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -v -T 60 -e FI_VERBS_PREFER_XRC=1 -e FI_OFI_RXM_USE_SRX=1' ++ } ++ tee ('ubertests-xrc.log') { ++ sh 'srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -vvv -T 60 -t complex -u all -e FI_VERBS_PREFER_XRC=1 -e FI_OFI_RXM_USE_SRX=1' ++ } ++ } ++ post { ++ always { ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r fabtests-xrc.log \\ ++ -w fabtests-xrc.xml \\ ++ fabtests \\ ++ functional.fabtests.xrc.quick \\ ++ functional""" ++ ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r ubertests-xrc.log \\ ++ -w ubertests-xrc.xml \\ ++ fabtests \\ ++ functional.fabtests.xrc.uber \\ ++ functional""" ++ } ++ } ++ } ++ stage('SFT tests: RC') { ++ environment { ++ SFT_ADD_ARGS = "--additional-args ' '" ++ SFT_TEST_RESULTS_SUBDIR = "sft_test_results/RC" ++ SFT_TEST_RESULTS_DIR = "${env.WORKSPACE}" + "/" + "${env.SFT_TEST_RESULTS_SUBDIR}" ++ } ++ steps { ++ sh "mkdir -p ${SFT_TEST_RESULTS_DIR}" ++ timeout (time: 20, unit: 'MINUTES') { ++ // run the test ++ script { ++ try { ++ dir ("${SFT_BIN}") { ++ sh """ ++ ./ci-all.sh \\ ++ --provider '${SFT_PROVIDER}' \\ ++ -L ${SFT_TEST_RESULTS_DIR} \\ ++ --num-jobs ${SFT_NUM_JOBS} \\ ++ --max-job-time ${SFT_MAX_JOB_TIME} \\ ++ --output-cmds ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_CMDS} \\ ++ --results-file ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_CI} \\ ++ ${SFT_ADD_ARGS} ++ """ ++ } ++ } catch (exc) { ++ echo 'failed test, ignore result for now' ++ } ++ } ++ } ++ } ++ post { ++ always { ++ sh """ ++ cp ./${SFT_BASELINE_DIR}/${SFT_BASELINE_RESULTS_FILE} ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_RMA${SFT_TEST_RESULTS} -p "TR_RMA" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_TAGGED${SFT_TEST_RESULTS} -p "TR_TAGGED" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_MESSAGE${SFT_TEST_RESULTS} -p "TR_MESSAGE" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_AMO${SFT_TEST_RESULTS} -p "TR_AMO" ++ gzip -r ${SFT_TEST_RESULTS_DIR} ++ gunzip ${SFT_TEST_RESULTS_DIR}/sft_*${SFT_TEST_RESULTS}.gz ++ gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++ """ ++ // archive the results ++ archiveArtifacts artifacts: "${env.SFT_TEST_RESULTS_SUBDIR}/*" ++ } ++ } ++ } ++ stage('SFT tests: XRC') { ++ environment { ++ SFT_ADD_ARGS = "--additional-args '--use-xrc'" ++ SFT_TEST_RESULTS_SUBDIR = "sft_test_results/XRC" ++ SFT_TEST_RESULTS_DIR = "${env.WORKSPACE}" + "/" + "${env.SFT_TEST_RESULTS_SUBDIR}" ++ } ++ steps { ++ sh "mkdir -p ${SFT_TEST_RESULTS_DIR}" ++ timeout (time: 20, unit: 'MINUTES') { ++ // run the test ++ script { ++ try { ++ dir ("${SFT_BIN}") { ++ sh """ ++ ./ci-all.sh \\ ++ --provider '${SFT_PROVIDER}' \\ ++ -L ${SFT_TEST_RESULTS_DIR} \\ ++ --num-jobs ${SFT_NUM_JOBS} \\ ++ --max-job-time ${SFT_MAX_JOB_TIME} \\ ++ --output-cmds ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_CMDS} \\ ++ --results-file ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_CI} \\ ++ ${SFT_ADD_ARGS} ++ """ ++ } ++ } catch (exc) { ++ echo 'failed test, ignore result for now' ++ } ++ } ++ } ++ } ++ post { ++ always { ++ sh """ ++ cp ./${SFT_BASELINE_DIR}/${SFT_BASELINE_RESULTS_FILE} ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_RMA${SFT_TEST_RESULTS} -p "TR_RMA" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_TAGGED${SFT_TEST_RESULTS} -p "TR_TAGGED" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_MESSAGE${SFT_TEST_RESULTS} -p "TR_MESSAGE" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_AMO${SFT_TEST_RESULTS} -p "TR_AMO" ++ gzip -r ${SFT_TEST_RESULTS_DIR} ++ gunzip ${SFT_TEST_RESULTS_DIR}/sft_*${SFT_TEST_RESULTS}.gz ++ gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++ """ ++ // archive the results ++ archiveArtifacts artifacts: "${env.SFT_TEST_RESULTS_SUBDIR}/*" ++ } ++ } ++ } ++ stage("System tests") { ++ steps { ++ echo 'placeholder' ++ } ++ } ++ stage("Applications") { ++ steps { ++ tee ('mpi.tap') { ++ timeout(time: 10, unit: 'MINUTES') { ++ sh '${BATS_INSTALL_PATH}/bats -t contrib/cray/bats/mpi.bats' ++ } ++ } ++ } ++ post { ++ always { ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r mpi.tap \\ ++ -w mpi.xml \\ ++ tap applications.mpi applications""" ++ } ++ } ++ } ++ } ++ post { ++ always { ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "smoketests.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "*-rc.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "*-xrc.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "sft_test_results/RC/sft_*_test_results.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "sft_test_results/XRC/sft_*_test_results.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "mpi.xml"]]]) ++ } ++ } ++ } ++ stage("Install Libfabric Build") { ++ when { ++ allOf { ++ expression { currentBuild.result == 'SUCCESS' } ; ++ anyOf { ++ expression { env.BRANCH_NAME == 'master' } ; ++ buildingTag() ; ++ } ++ } ++ } ++ environment { ++ LIBFABRIC_INSTALL_PATH="${LIBFABRIC_BUILD_PATH + '/' + GIT_SHORT_COMMIT}" ++ } ++ steps { ++ sh './autogen.sh' ++ sh "./configure --prefix=$LIBFABRIC_INSTALL_PATH" ++ sh "make -j 12" ++ sh "make install" ++ } ++ } ++ stage("Deploy") { ++ when { ++ allOf { ++ expression { currentBuild.result == 'SUCCESS' } ; ++ anyOf { ++ expression { env.BRANCH_NAME == 'master' } ; ++ buildingTag() ++ } ++ } ++ } ++ options { ++ timeout (time: 5, unit: 'MINUTES') ++ } ++ environment { ++ TAG_DIRECTORY = "${LIBFABRIC_BUILD_PATH + '/tags'}" ++ } ++ failFast true ++ parallel { ++ stage("Create nightly link") { ++ when { ++ expression { env.BRANCH_NAME == 'master' } ++ } ++ steps { ++ dir (env.TAG_DIRECTORY) { ++ sh "rm -f nightly || true" ++ sh "ln -s ../$GIT_SHORT_COMMIT nightly" ++ } ++ } ++ } ++ stage("Create tagged link") { ++ when { ++ buildingTag() ++ } ++ steps { ++ dir (env.TAG_DIRECTORY) { ++ sh "rm -f $BRANCH_NAME || true" ++ sh "ln -s ../$GIT_SHORT_COMMIT $BRANCH_NAME" ++ } ++ } ++ } ++ stage("Create RPMs") { ++ steps { ++ sh 'make dist-bzip2' ++ sh '$WORKSPACE/contrib/buildrpm/buildrpmLibfabric.sh -i verbs -i sockets -osmv $(ls libfabric-*.tar.bz2)' ++ } ++ post { ++ success { ++ stash name: 'rpms', includes: 'rpmbuild/RPMS/**/*' ++ stash name: 'sources', includes: 'rpmbuild/SOURCES/*' ++ } ++ } ++ } ++ } ++ } ++ stage('Publish') { ++ when { ++ allOf { ++ expression { currentBuild.result == 'SUCCESS' } ; ++ expression { return isRelease("${env.GIT_BRANCH}") } ++ } ++ } ++ agent { ++ node { ++ label 'utility_pod' ++ } ++ } ++ steps { ++ container('utility') { ++ sh 'tar -cvzf /tmp/libfabric-source.tar.gz --exclude "*.log" .' ++ ++ // publishes the source RPM to DST's Artifactory instance ++ transfer(artifactName: '/tmp/libfabric-source.tar.gz') ++ ++ // Sends event to message bus to notify other builds ++ publishEvents(["os-networking-libfabric-verbs-publish"]) ++ } ++ } ++ } ++ } ++ post { ++ success { ++ script { ++ try { ++ unstash 'rpms' ++ unstash 'sources' ++ archiveArtifacts 'rpmbuild/SOURCES/*' ++ archiveArtifacts 'rpmbuild/RPMS/**/*' ++ } ++ catch (Exception e) { ++ echo 'No rpms to archive' ++ } ++ } ++ } ++ changed { ++ script { ++ // send email when the state of the pipeline changes ++ // only sends email to @cray.com ++ ++ def emailBody = createEmail(build : currentBuild) ++ def providers = [] ++ def defaultMailer = '' ++ ++ if (env.BRANCH_NAME == 'master') { ++ defaultMailer = mailingList() ++ } else { ++ providers.add ( [$class: 'CulpritsRecipientProvider'] ) ++ providers.add ( [$class: 'RequesterRecipientProvider'] ) ++ providers.add ( [$class: 'DevelopersRecipientProvider'] ) ++ } ++ emailext subject: '$DEFAULT_SUBJECT', ++ body: emailBody, ++ mimeType: 'text/html', ++ recipientProviders: providers, ++ replyTo: '$DEFAULT_REPLYTO', ++ to: defaultMailer ++ } ++ } ++ } ++ environment { ++ ROOT_BUILD_PATH = "/scratch/jenkins/builds" ++ FABTEST_PATH = "${WORKSPACE + '/installs/fabtests'}" ++ LIBFABRIC_BUILD_PATH = "${ROOT_BUILD_PATH + '/libfabric'}" ++ OMB_BUILD_PATH = "${ROOT_BUILD_PATH + '/osu-micro-benchmarks/5.4.2/libexec/osu-micro-benchmarks/mpi'}" ++ MPICH_PATH = "${ROOT_BUILD_PATH + '/mpich/3.3b3'}" ++ SFT_INSTALL_PATH = "${ROOT_BUILD_PATH + '/libfabric-sft/stable'}" ++ BATS_INSTALL_PATH = "${ROOT_BUILD_PATH + '/bats/stable/bin'}" ++ } ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/mpi.bats b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/mpi.bats +new file mode 100644 +index 0000000..48c96e1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/mpi.bats +@@ -0,0 +1,401 @@ ++#!/usr/bin/env bats ++ ++load test_helper ++ ++# RC ++@test "osu_latency 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_bw 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_mbw_mr 8 ranks, 4 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 8 4) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_mbw_mr ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_get_latency 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_get_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_get_bw 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_get_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_latency 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_bw 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_bibw 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_bibw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allreduce 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allreduce ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allgather 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allgather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allgatherv 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allgatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_alltoall 20 ranks, 5 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_alltoall ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_alltoallv 20 ranks, 5 ranks per node using RC verbs" { ++ skip "fails consistently at 128k message size" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_alltoallv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_barrier 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_barrier ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_bcast 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_bcast ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_gather 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_gather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_gatherv 40 ranks, 10 ranks per node using RC verbs" { ++ skip "fails intermittently" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_gatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iallgather 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iallgather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iallgatherv 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iallgatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoall 20 ranks, 5 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoall ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoallv 20 ranks, 5 ranks per node using RC verbs" { ++ skip "fails consistently at 128k message size" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoallv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoallw 20 ranks, 5 ranks per node using RC verbs" { ++ skip "fails consistently at 128k message size" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoallw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ibarrier 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_ibarrier ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ibcast 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_ibcast ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_igather 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_igather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_igatherv 40 ranks, 10 ranks per node using RC verbs" { ++ skip "fails intermittently" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_igatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iscatter 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iscatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iscatterv 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iscatterv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_reduce 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_reduce ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_reduce_scatter 40 ranks, 10 ranks per node using RC verbs" { ++ skip "fails consistently at 512K message size" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_reduce_scatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_scatter 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_scatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_scatterv 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_scatterv ++ [ "$status" -eq 0 ] ++} ++ ++# XRC ++@test "osu_latency 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_bw 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_mbw_mr 8 ranks, 4 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 8 4) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_mbw_mr ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_get_latency 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_get_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_get_bw 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_get_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_latency 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_bw 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_bibw 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_bibw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allreduce 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allreduce ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allgather 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allgather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allgatherv 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allgatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_alltoall 20 ranks, 5 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_alltoall ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_alltoallv 20 ranks, 5 ranks per node using XRC verbs" { ++ skip "fails consistently at 128k message size" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_alltoallv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_barrier 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_barrier ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_bcast 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_bcast ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_gather 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_gather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_gatherv 40 ranks, 10 ranks per node using XRC verbs" { ++ skip "fails intermittently" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_gatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iallgather 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iallgather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iallgatherv 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iallgatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoall 20 ranks, 5 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoall ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoallv 20 ranks, 5 ranks per node using XRC verbs" { ++ skip "fails consistently at 128k message size" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoallv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoallw 20 ranks, 5 ranks per node using XRC verbs" { ++ skip "fails consistently at 128k message size" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoallw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ibarrier 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_ibarrier ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ibcast 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_ibcast ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_igather 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_igather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_igatherv 40 ranks, 10 ranks per node using XRC verbs" { ++ skip "fails intermittently" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_igatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iscatter 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iscatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iscatterv 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iscatterv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_reduce 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_reduce ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_reduce_scatter 40 ranks, 10 ranks per node using XRC verbs" { ++ skip "fails consistently at 512K message size" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_reduce_scatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_scatter 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_scatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_scatterv 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_scatterv ++ [ "$status" -eq 0 ] ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/smoketests.bats b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/smoketests.bats +new file mode 100644 +index 0000000..40ca2a6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/smoketests.bats +@@ -0,0 +1,27 @@ ++#!/usr/bin/env bats ++ ++load test_helper ++ ++@test "fi_info" { ++ run ${CONTRIB_BIN}/logwrap -w ${BATS_TEST_LOGFILE} -- $(batch_launcher 1 1) ${LIBFABRIC_INSTALL_PATH}/bin/fi_info -p 'verbs;ofi_rxm' ++ [ $(grep 'provider: verbs;ofi_rxm' ${BATS_TEST_LOGFILE} | uniq | wc -l) -gt 0 ] ++ [ "$status" -eq 0 ] ++} ++ ++@test "fi_info_xrc" { ++ FI_OFI_RXM_USE_SRX=1 run ${CONTRIB_BIN}/logwrap -w ${BATS_TEST_LOGFILE} -- $(batch_launcher 1 1) ${LIBFABRIC_INSTALL_PATH}/bin/fi_info -p 'verbs;ofi_rxm' ++ [ $(grep 'domain' ${BATS_TEST_LOGFILE} | grep '\-xrc' | wc -l) -gt 0 ] ++ [ "$status" -eq 0 ] ++} ++ ++@test "prefer_rc" { ++ FI_OFI_RXM_USE_SRX=1 run ${CONTRIB_BIN}/logwrap -w ${BATS_TEST_LOGFILE} -- $(batch_launcher 1 1) ${LIBFABRIC_INSTALL_PATH}/bin/fi_info -p 'verbs;ofi_rxm' ++ [ $(grep 'domain' ${BATS_TEST_LOGFILE} | head -n1 | grep '\-xrc' | wc -l) -eq 0 ] ++ [ "$status" -eq 0 ] ++} ++ ++@test "prefer_xrc" { ++ FI_VERBS_PREFER_XRC=1 FI_OFI_RXM_USE_SRX=1 run ${CONTRIB_BIN}/logwrap -w ${BATS_TEST_LOGFILE} -- $(batch_launcher 1 1) ${LIBFABRIC_INSTALL_PATH}/bin/fi_info -p 'verbs;ofi_rxm' ++ [ $(grep 'domain' ${BATS_TEST_LOGFILE} | head -n1 | grep '\-xrc' | wc -l) -gt 0 ] ++ [ "$status" -eq 0 ] ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/test_helper.bash b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/test_helper.bash +new file mode 100644 +index 0000000..dd104df +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/test_helper.bash +@@ -0,0 +1,44 @@ ++#!/bin/bash ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ ++if [[ -z "$BATS_LOG_DIRECTORY" ]] ; then ++ export BATS_LOG_DIRECTORY=$PWD ++fi ++ ++if [[ ! -d $BATS_LOG_DIRECTORY ]] ; then ++ mkdir -p $BATS_LOG_DIRECTORY ++fi ++ ++export CONTRIB_BIN=$DIR/../bin ++ ++_cancel() { ++ echo caught sigint ++ kill -s SIGKILL ++} ++ ++setup() { ++ export BATS_TEST_LOGFILE="${BATS_LOG_DIRECTORY}/${BATS_TEST_NAME}.log" ++} ++ ++teardown() { ++ cat ${BATS_TEST_LOGFILE} || true ++} ++ ++function batch_launcher { ++ if [[ $# -lt 2 ]] ; then ++ error "not enough arguments" ++ fi ++ NUM_RANKS=$1 ++ NUM_RANKS_PER_NODE=$2 ++ echo "srun -n ${NUM_RANKS} --ntasks-per-node ${NUM_RANKS_PER_NODE}" ++} ++ ++# necessary to avoid deadlocks during termination/interrupt ++trap _cancel SIGINT +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/common.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/common.sh +new file mode 100644 +index 0000000..20f5778 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/common.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++ ++# DIR is expected to be defined by files that include these common variables ++BUILD_VERSION=$(cat $DIR/../share/version) ++ROOT_INSTALL_PATH=$LIBFABRIC_BUILD_PATH/virtualenv/ ++PREREQ_INSTALL_PATH=$ROOT_INSTALL_PATH/prerequisites ++VIRTUALENV_INSTALL_PATH=$ROOT_INSTALL_PATH/venv-${BUILD_VERSION} ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/fabtest_wrapper.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/fabtest_wrapper.sh +new file mode 100755 +index 0000000..078300b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/fabtest_wrapper.sh +@@ -0,0 +1,27 @@ ++#!/bin/bash ++ ++export FABTESTS_PATH=/scratch/jenkins/builds/fabtests/stable ++export PATH=${FABTESTS_PATH}/bin:$PATH ++ ++if [[ -z ${FABTEST_PROVIDER} ]] ; then ++ FABTEST_PROVIDER='verbs;ofi_rxm' ++fi ++ ++if [[ -z ${SLURMD_NODENAME} ]] ; then ++ echo SLURM is the only supported WLM at this point for testing ++ exit 1 ++fi ++ ++SERVER=$(scontrol show hostname ${SLURM_NODELIST} | head -n1) ++CLIENT=$(scontrol show hostname ${SLURM_NODELIST} | tail -n1) ++ ++SERVER_ADDR=$(getent hosts ${SERVER} | awk '{print $1}') ++CLIENT_ADDR=$(getent hosts ${CLIENT} | awk '{print $1}') ++ ++if [[ "${SLURMD_NODENAME}" == "$SERVER" ]] ; then ++ runfabtests.sh \ ++ $@ \ ++ "${FABTEST_PROVIDER}" \ ++ ${SERVER_ADDR} \ ++ ${CLIENT_ADDR} ++fi +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/logwrap b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/logwrap +new file mode 100755 +index 0000000..6d6b37c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/logwrap +@@ -0,0 +1,39 @@ ++#!/bin/bash ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" ++OUTFILE="log" ++OPTS=`getopt -o hw: --long help,outfile -n 'parse-options' -- "$@"` ++HELP=false ++ ++if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi ++ ++eval set -- "$OPTS" ++ ++while true; do ++ case "$1" in ++ -h | --help ) HELP=true; shift ;; ++ -w | --outfile ) OUTFILE="$2" ; shift ; shift ;; ++ * ) break ;; ++ esac ++done ++ ++shift ++ ++if $HELP ; then ++ echo "Usage: logwrap [-hw] command" ++ exit ++fi ++ ++if [[ $# -eq 0 ]] ; then ++ echo failed to provide script to wrap ++ exit 1 ++fi ++ ++$@ 2>&1 | tee $OUTFILE ++exit ${PIPESTATUS[0]} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/parse_logfiles.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/parse_logfiles.sh +new file mode 100755 +index 0000000..0905982 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/parse_logfiles.sh +@@ -0,0 +1,16 @@ ++#!/bin/bash ++ ++set -e ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ ++source $DIR/common.sh ++ ++source $VIRTUALENV_INSTALL_PATH/bin/activate ++python $DIR/../python/parse_results.py $@ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/run_libfabric_pipeline b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/run_libfabric_pipeline +new file mode 100755 +index 0000000..6383aea +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/run_libfabric_pipeline +@@ -0,0 +1,315 @@ ++#!/bin/bash ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ ++# Variables ++HELP=false ++VERBOSE=false ++DEBUG=false ++CLEAN=false ++WORKSPACE=$(pwd) ++SECTIONS='all' ++LIBFABRIC="" ++ ++BUILD=true ++TEST=true ++UNITTEST=true ++SMOKETEST=true ++FABTEST=true ++SFT=true ++MPI=true ++ ++function usage { ++ echo \ ++" ++Usage: $(basename $SOURCE) [-dhv] ++" ++ ++} ++ ++function set_sections_to_run { ++ BUILD=false ++ TEST=false ++ UNITTEST=false ++ SMOKETEST=false ++ FABTEST=false ++ SFT=false ++ MPI=false ++ ++ sections=$(echo $@ | tr ',' ' ') ++ for section in $sections ; do ++ section_name=$(echo $section | awk '{print toupper($0)}') ++ case $section_name in ++ 'UNITTEST'|'SMOKETEST'|'FABTEST'|'SFT'|'MPI') ++ TEST=true ++ eval ${section_name}=true ++ ;; ++ 'ALL') ++ BUILD=true ++ TEST=true ++ UNITTEST=true ++ SMOKETEST=true ++ FABTEST=true ++ SFT=true ++ MPI=true ++ ;; ++ 'TEST') ++ TEST=true ++ UNITTEST=true ++ SMOKETEST=true ++ FABTEST=true ++ SFT=true ++ MPI=true ++ ;; ++ 'BUILD') ++ BUILD=true ++ ;; ++ *) ++ ;; ++ esac ++ done ++ ++ for each in BUILD TEST UNITTEST SMOKETEST SFT MPI ; do ++ if $DEBUG ; then echo ${each} = $(eval echo \$$each) ; fi ++ done ++} ++ ++OPTS=`getopt -o hdvcs:w:l: --long help,debug,verbose,clean,sections,workspace,libfabric -n 'parse-options' -- "$@"` ++ ++if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi ++ ++eval set -- "$OPTS" ++set -e ++ ++while true; do ++ case "$1" in ++ -h | --help ) HELP=true ; shift ;; ++ -v | --verbose ) VERBOSE=true ; shift ;; ++ -d | --debug ) DEBUG=true ; shift ;; ++ -c | --clean ) CLEAN=true ; shift ;; ++ -s | --sections ) SECTIONS="$2" ; shift ; shift ;; ++ -w | --workspace ) WORKSPACE="$2" ; shift ; shift ;; ++ -l | --libfabric ) LIBFABRIC="$2" ; shift ; shift ;; ++ * ) break ;; ++ esac ++done ++ ++shift ++ ++if $HELP ; then ++ usage ++ exit ++fi ++ ++function verbose { ++ if $VERBOSE ; then ++ echo $@ ++ fi ++} ++ ++function debug { ++ if $DEBUG ; then ++ echo $0 ++ fi ++} ++ ++set_sections_to_run "$SECTIONS" ++verbose "HELP: $HELP" ++verbose "VERBOSE: $VERBOSE" ++verbose "DEBUG: $DEBUG" ++verbose "CLEAN: $CLEAN" ++verbose "SECTIONS: $SECTIONS" ++verbose "WORKSPACE: $WORKSPACE" ++ ++for each in BUILD TEST UNITTEST SMOKETEST FABTEST MPI SFT ; do ++ verbose "$each: $(eval echo \$$each)" ++done ++ ++function section_start { ++ echo \ ++" ++############################################################################## ++Start of \"$1\" ++############################################################################## ++" ++} ++ ++function section_end { ++ echo \ ++" ++############################################################################## ++End of \"$1\" ++############################################################################## ++" ++} ++if $CLEAN ; then ++ if [[ -d $WORKSPACE ]] ; then ++ rm -rf $WORKSPACE ++ fi ++fi ++ ++if [[ ! -d $WORKSPACE ]] ; then ++ mkdir -p $WORKSPACE ++fi ++ ++SOURCE_DIR=$DIR/../../.. ++pushd $SOURCE_DIR ++ ++# Start Pipeline variables ++export GIT_SHORT_COMMIT="$GIT_COMMIT" ++export LIBFABRIC_INSTALL_PATH="" ++export ROOT_BUILD_PATH="/scratch/jenkins/builds" ++export FABTEST_PATH="${WORKSPACE}/fabtests" ++export LIBFABRIC_BUILD_PATH="${ROOT_BUILD_PATH}/libfabric" ++export OMB_BUILD_PATH="${ROOT_BUILD_PATH}/osu-micro-benchmarks/5.4.2/libexec/osu-micro-benchmarks/mpi" ++export MPICH_PATH="${ROOT_BUILD_PATH}/mpich/3.3b3" ++export SFT_INSTALL_PATH="${ROOT_BUILD_PATH}/libfabric-sft/stable" ++export BATS_INSTALL_PATH="${ROOT_BUILD_PATH}/bats/stable/bin" ++export BATS_LOG_DIRECTORY="$WORKSPACE/logs" ++# End pipeline variables ++ ++# Start Prologue ++GIT_SHORT_COMMIT=$(git log -n 1 --pretty=format:'%h') ++ ++contrib/cray/bin/verify_requirements.sh ++contrib/cray/bin/setup.sh ++# End Prologue ++ ++if [[ -z $LIBFABRIC ]] ; then ++ LIBFABRIC_INSTALL_PATH="${WORKSPACE}/builds/libfabric/${GIT_SHORT_COMMIT}" ++else ++ LIBFABRIC_INSTALL_PATH="$LIBFABRIC" ++fi ++echo using installed libfabric @ ${LIBFABRIC_INSTALL_PATH} ++ ++if $BUILD ; then ++section_start 'build' ++# Start Build ++./autogen.sh ++./configure --prefix=$LIBFABRIC_INSTALL_PATH ++make -j12 ++make install ++# End Build ++section_end 'build' ++fi ++ ++LF_LIBRARY=${LIBFABRIC_INSTALL_PATH}/lib/libfabric.so ++if [[ ! -f ${LF_LIBRARY} ]] ; then ++ echo could not find libfabric library ++ echo expected file: ${LF_LIBRARY} ++ exit ++fi ++ ++if $TEST ; then ++section_start 'test' ++# Start Test Phase ++export LD_LIBRARY_PATH=$LIBFABRIC_INSTALL_PATH/lib:$LD_LIBRARY_PATH ++export MPIR_CVAR_OFI_USE_PROVIDER='verbs;ofi_rxm' ++ ++if $UNITTEST ; then ++section_start 'unit tests' ++## Start Unit Tests ++sleep 1 ++## End Unit Tests ++section_end 'unit tests' ++fi ++ ++if $SMOKETEST ; then ++section_start 'smoke tests' ++## Start Smoke Tests ++$BATS_INSTALL_PATH/bats $@ -t contrib/cray/bats/smoketests.bats | tee smoketests.tap ++## End Smoke Tests ++section_end 'smoke tests' ++fi ++ ++if $FABTEST ; then ++section_start 'fabtests' ++## Start Fabtests ++if [[ ! -f $FABTEST_PATH/compile-target || "$(cat $FABTEST_PATH/compile-target)" != "$LIBFABRIC_INSTALL_PATH" ]] ; then ++ pushd $SOURCE_DIR/fabtests ++ ./autogen.sh ++ ./configure --with-libfabric=$LIBFABRIC_INSTALL_PATH --prefix=$FABTEST_PATH ++ make -j12 ++ make -j12 install ++ echo $LIBFABRIC_INSTALL_PATH > $FABTEST_PATH/compile-target ++ popd ++fi ++ ++if [[ ! -f $FABTEST_PATH/bin/runfabtests.sh ]] ; then ++ echo run the build step to install a version of fabtests for the current build ++else ++ srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -v -T 60 | tee fabtests.log ++fi ++## End Fabtests ++section_end 'fabtests' ++fi ++ ++if $SFT ; then ++section_start 'sft' ++## Start SFT ++export SFT_BIN="${SFT_INSTALL_PATH}/bin" ++export SFT_ADD_ARGS="--additional-args ' '" ++export SFT_MAX_JOB_TIME='3' ++export SFT_NUM_JOBS='4' ++export SFT_PROVIDER='verbs;ofi_rxm' ++export SFT_BASELINE_DIR="contrib/cray" ++export SFT_BASELINE_RESULTS_FILE='sft_test_results_baseline.txt' ++export SFT_PREVIOUS_BASELINE_RESULTS='sft_test_results_baseline.txt' ++export SFT_TEST_CMDS='sft_test_commands' ++export SFT_TEST_RESULTS='sft_test_results.xml' ++export SFT_TEST_RESULTS_EXPECTED='expected_' ++export SFT_TEST_RESULTS_PREFIX='BUILD_' ++export SFT_TEST_RESULTS_CI='sft_ci_results.yaml' ++export SFT_TEST_RESULTS_BASE_DIR="${ROOT_BUILD_PATH}/sft_test_results/" ++export SFT_TEST_RESULTS_DIR="" ++ ++export SFT_TEST_RESULTS_SUBDIR="${SFT_TEST_RESULTS_PREFIX}_${GIT_SHORT_COMMIT}_DATE_$(date +%Y_%m_%d_%H_%M_%S)" ++export SFT_TEST_RESULTS_DIR="${SFT_TEST_RESULTS_BASE_DIR}${SFT_TEST_RESULTS_SUBDIR}" ++ ++rm -f ${SFT_BIN}/core* ++rm -rf ${SFT_TEST_RESULTS_DIR} ++mkdir -p ${SFT_TEST_RESULTS_DIR} ++ ++pushd ${SFT_BIN} ++timeout 900 ./ci-all.sh \ ++ --provider 'verbs;ofi_rxm' \ ++ -L ${SFT_TEST_RESULTS_DIR} \ ++ --num-jobs ${SFT_NUM_JOBS} \ ++ --max-job-time ${SFT_MAX_JOB_TIME} \ ++ --output-cmds ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_CMDS} \ ++ --results-file ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_CI} ++popd ++ ++cp ./${SFT_BASELINE_DIR}/${SFT_BASELINE_RESULTS_FILE} ${SFT_TEST_RESULTS_DIR}/ \ ++ ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++${SFT_BIN}/sft_parse_test_results.pm \ ++ -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} \ ++ -d ${SFT_TEST_RESULTS_DIR} \ ++ -o ${SFT_TEST_RESULTS} \ ++ -r ${SFT_BASELINE_RESULTS_FILE} ++gzip -r ${SFT_TEST_RESULTS_DIR} ++gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS} ++gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_BASELINE_RESULTS_FILE} ++gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++cp -r ${SFT_TEST_RESULTS_DIR} . ++ ++rm -rf ${SFT_TEST_RESULTS_DIR} || true ++## End SFT ++section_end 'sft' ++fi ++ ++if $MPI ; then ++section_start 'mpi' ++## Start MPI Tests ++$BATS_INSTALL_PATH/bats -t contrib/cray/bats/mpi.bats | tee mpi.tap ++## End MPI Tests ++section_end 'mpi' ++fi ++ ++fi +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/setup.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/setup.sh +new file mode 100755 +index 0000000..e252a0c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/setup.sh +@@ -0,0 +1,43 @@ ++#!/bin/bash ++ ++set -e ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ ++source $DIR/common.sh ++ ++if [[ -z "$(which pip)" ]] ; then ++ echo failed to find pip ++ false ++fi ++ ++if [[ -z "$(which python)" ]] ; then ++ echo failed to find python ++ false ++fi ++ ++function cleanup { ++ echo failed to setup environment ++} ++ ++trap cleanup ERR ++ ++if [[ -z "$(which virtualenv)" ]] ; then ++ pip --isolated install --root $PREREQ_INSTALL_PATH virtualenv ++ export PYTHONPATH=$PREREQ_INSTALL_PATH/usr/lib/python2.7/site-packages:$PYTHONPATH ++ export PATH=$PREREQ_INSTALL_PATH/bin:$PATH ++fi ++ ++if [[ ! -f $VIRTUALENV_INSTALL_PATH/bin/activate ]] ; then ++ virtualenv $VIRTUALENV_INSTALL_PATH ++fi ++ ++source $VIRTUALENV_INSTALL_PATH/bin/activate ++pip install -r $DIR/../share/requirements.txt ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/verify_requirements.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/verify_requirements.sh +new file mode 100755 +index 0000000..c44e133 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/verify_requirements.sh +@@ -0,0 +1,59 @@ ++#!/bin/bash ++ ++set -e ++ ++function check_executable { ++ if [[ ! -x $1 ]] ; then ++ echo could not find executable: $1 ++ exit 1 ++ fi ++} ++ ++function check_directory { ++ if [[ ! -d $1 ]] ; then ++ echo could not find directory: $1 ++ exit 1 ++ fi ++} ++ ++function check_environment { ++ var=$1 ++ val=$(eval "echo \$$var") ++ if [[ -z "$val" ]] ; then ++ echo could not find environment variable: $var ++ exit 1 ++ fi ++} ++ ++function find_executable { ++ if [[ -z "$(which $1)" ]] ; then ++ echo could not find executable: $1 ++ exit 1 ++ fi ++} ++ ++# check prerequisite environment variables ++check_environment ROOT_BUILD_PATH ++check_environment FABTEST_PATH ++check_environment LIBFABRIC_BUILD_PATH ++check_environment OMB_BUILD_PATH ++check_environment MPICH_PATH ++ ++# check directories ++check_directory $ROOT_BUILD_PATH ++check_directory $OMB_BUILD_PATH ++check_directory $MPICH_PATH ++check_directory $SFT_INSTALL_PATH ++check_directory $BATS_INSTALL_PATH ++ ++##### check prerequisite installed software packages ++# SLURM https://slurm.schedmd.com/ ++find_executable srun ++# OMB http://mvapich.cse.ohio-state.edu/benchmarks/ ++check_executable $OMB_BUILD_PATH/pt2pt/osu_bw ++# Cray Proprietary ++check_executable $SFT_INSTALL_PATH/bin/ci-all.sh ++# BATS https://github.com/bats-core/bats-core ++check_executable $BATS_INSTALL_PATH/bats ++ ++exit 0 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/python/parse_results.py b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/python/parse_results.py +new file mode 100755 +index 0000000..f83a812 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/python/parse_results.py +@@ -0,0 +1,200 @@ ++#!/usr/bin/env python ++# encoding: utf-8 ++ ++""" ++parse_results -- script for parsing results from known ++ logfile types to junit xml format ++ ++@author: jswaro ++@copyright: Copyright 2018 Cray Inc. All Rights Reserved. ++@deffield updated: 2018-09-26 ++""" ++ ++from junit_xml import TestSuite, TestCase ++import sys ++import os ++from functools import wraps ++from argparse import ArgumentParser, RawDescriptionHelpFormatter ++ ++__all__ = [] ++__version__ = 1.0 ++__date__ = '2018-09-26' ++__updated__ = '2018-09-26' ++ ++VERSION = '1.0.0' ++DEBUG = False ++ ++known_formats = dict() ++ ++def generate_generic_test_case(name, classname, time, message, result): ++ default_pass_message = 'Test passed, check build log for additional details' ++ default_skip_message = 'Test skipped, check build log for additional details' ++ tc = TestCase(name, classname, time, ++ default_pass_message if result == 'pass' else '') ++ if result == 'fail': ++ tc.add_failure_info(message=message) ++ if result == 'skip': ++ tc.add_skipped_info(message=default_skip_message) ++ ++ return tc ++ ++def tap_delimiter(line): ++ return line.startswith('ok') or line.startswith('not ok') ++ ++def tap_parser(log, classname_prefix): ++ name = "" ++ testname = "" ++ classname = "" ++ result = "" ++ time = 0.0 ++ message = "" ++ for line in log: ++ data = line.strip().split() ++ if tap_delimiter(line): ++ result = 'pass' ++ if data[0] == 'ok' and '# skip' in line: ++ result = 'skip' ++ elif data[0] == 'not': ++ result = 'fail' ++ name_index = 3 if result == 'fail' else 2 ++ testname = " ".join(data[name_index:]) if result != 'skip' else " ".join(data[name_index:data.index('#')]) ++ classname = classname_prefix ++ elif line.startswith('#'): ++ message += " ".join(data) + '\n' ++ ++ tc = generate_generic_test_case(testname, classname, 1.00, message, result) ++ return tc ++ ++def fabtests_test_delimiter(line): ++ return line.startswith('- name: ') ++ ++def fabtests_testcase_parser(log, classname_prefix): ++ name = "" ++ testname = "" ++ classname = "" ++ result = "" ++ time = "" ++ message = "" ++ for line in log: ++ data = line.strip().split() ++ if fabtests_test_delimiter(line): ++ name = " ".join(data[2:]) ++ testname = data[2] ++ classname = "{0}.{1}".format(classname_prefix, testname) ++ elif line.startswith(' result:'): ++ if data[1] == 'Pass': ++ result = 'pass' ++ elif data[1] == 'Notrun': ++ result = 'skip' ++ else: ++ result = 'fail' ++ elif line.startswith(' time:'): ++ time = float(data[1]) ++ else: #recording stdout/stderr ++ message += " ".join(data) + '\n' ++ ++ tc = generate_generic_test_case(name, classname, time, message, result) ++ return tc ++ ++def parse(infile, outfile, format_type, classname, suitename): ++ testcases = list() ++ testcase_logs = list() ++ current = None ++ test_block_delimiter = known_formats[format_type]['tb_delimiter'] ++ ++ # separate log file into test blocks by test block delimiter ++ for line in infile: ++ if test_block_delimiter(line): ++ if current: # non-empty list ++ testcase_logs.append(current) ++ current = list() ++ if current is not None: ++ current.append(line) ++ ++ # add last record if present ++ if current not in testcase_logs: ++ testcase_logs.append(current) ++ ++ # create test cases from test blocks ++ for entry in testcase_logs: ++ testcases.append(known_formats[format_type]['test_parser'](entry, classname)) ++ ++ # generate test suite result using provided test cases ++ test_suite = TestSuite(suitename, testcases) ++ ++ # get rid of unnecessary 'disabled' strings in formatted xml string ++ s = TestSuite.to_xml_string([test_suite]) ++ s = s.replace(' disabled=\"0\"', '') ++ ++ # write xml to outfile ++ outfile.write(s) ++ ++def register_parser(label, func): ++ global known_formats ++ known_formats[label] = func ++ ++ ++def main(argv=None): #IGNORE:C0111 ++ if argv is None: ++ argv = sys.argv ++ else: ++ sys.argv.extend(argv) ++ register_parser('fabtests', ++ {'tb_delimiter': fabtests_test_delimiter, ++ 'test_parser': fabtests_testcase_parser}) ++ register_parser('tap', ++ {'tb_delimiter': tap_delimiter, ++ 'test_parser': tap_parser}) ++ ++ program_name = os.path.basename(sys.argv[0]) ++ program_version = "v%s" % (VERSION) ++ program_build_date = str(__updated__) ++ program_version_message = '%%(prog)s %s (%s)' % (program_version, program_build_date) ++ program_shortdesc = __import__('__main__').__doc__.split("\n")[1] ++ program_license = '''%s ++ ++ Copyright 2018 Cray Inc. All rights reserved. ++ ++ Distributed on an "AS IS" basis without warranties ++ or conditions of any kind, either express or implied. ++ ++USAGE ++''' % program_shortdesc ++ # Setup argument parser ++ parser = ArgumentParser(description=program_license, ++ formatter_class=RawDescriptionHelpFormatter) ++ ++ parser.add_argument("-V", "--version", action="version", version=program_version_message) ++ parser.add_argument("-r", "--infile", action="store", default=None, dest='infile', ++ help="file to read in, defaults to stdin") ++ parser.add_argument("-w", "--outfile", action="store", default=None, dest='outfile', ++ help="junit xml file to write out, defaults to stdout") ++ parser.add_argument("format", ++ help='test format to expect (available: {0})'.format(", ".join(known_formats.keys()))) ++ parser.add_argument("classname", ++ help='class name to associate with generated junit xml tests') ++ parser.add_argument("suitename", ++ help='suite name to associate with generated junit xml tests') ++ # Process arguments ++ args = parser.parse_args() ++ ++ infile = sys.stdin ++ outfile = sys.stdout ++ if args.infile is not None: ++ infile = open(args.infile, 'r') ++ if args.outfile is not None: ++ outfile = open(args.outfile, 'w') ++ ++ parse(infile, outfile, args.format, args.classname, args.suitename) ++ ++ if args.infile is not None: ++ infile.close() ++ if args.outfile is not None: ++ outfile.close() ++ ++if __name__ == "__main__": ++ if DEBUG: ++ sys.argv.append("-h") ++ sys.argv.append("-v") ++ ++ sys.exit(main()) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/sft_test_results_baseline.txt b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/sft_test_results_baseline.txt +new file mode 100644 +index 0000000..8693e94 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/sft_test_results_baseline.txt +@@ -0,0 +1,543 @@ ++# Expected test values can be: 'PASS', 'FAIL', SKIP' or 'INTERMITTENT' ++# PASS: means that the test should pass ++# if the test result is PASS, then Jenkins will report this test as PASSED ++# if the test result is FAIL, then Jenkins will report this test as FAILED ++# FAIL: means that the test currently fails, probably due to incorrect behavior of a feature ++# if the test result is PASS, then Jenkins will report this test as PASSED ++# if the test result is FAIL, then Jenkins will report this test as SKIPPED ++# SKIP: means that the test should be skipped, due to an unimplemented feature ++# if the test result is PASS, then Jenkins will report this test as PASSED ++# if the test result is FAIL, then Jenkins will report this test as SKIPPED ++# INTERMITTENT: means that the test should pass but it fails infrequently ++# if the test result is PASS, then Jenkins will report this test as PASSED ++# if the test result is FAIL, then Jenkins will report this test as SKIPPED ++ ++# The Test Case section contains the list of test cases and their expected results. ++ ++# Test Case Results ++AMO_All-to-All_FI_ATOMIC_MIN=PASS ++AMO_All-to-All_FI_ATOMIC_MAX=PASS ++AMO_All-to-All_FI_ATOMIC_SUM=PASS ++AMO_All-to-All_FI_ATOMIC_PROD=PASS ++AMO_All-to-All_FI_ATOMIC_LOR=PASS ++AMO_All-to-All_FI_ATOMIC_LAND=PASS ++AMO_All-to-All_FI_ATOMIC_BOR=PASS ++AMO_All-to-All_FI_ATOMIC_BAND=PASS ++AMO_All-to-All_FI_ATOMIC_LXOR=PASS ++AMO_All-to-All_FI_ATOMIC_BXOR=PASS ++AMO_All-to-All_FI_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-All_FI_ATOMICV_MIN=PASS ++AMO_All-to-All_FI_ATOMICV_MAX=PASS ++AMO_All-to-All_FI_ATOMICV_SUM=PASS ++AMO_All-to-All_FI_ATOMICV_PROD=PASS ++AMO_All-to-All_FI_ATOMICV_LOR=PASS ++AMO_All-to-All_FI_ATOMICV_LAND=PASS ++AMO_All-to-All_FI_ATOMICV_BOR=PASS ++AMO_All-to-All_FI_ATOMICV_BAND=PASS ++AMO_All-to-All_FI_ATOMICV_LXOR=PASS ++AMO_All-to-All_FI_ATOMICV_BXOR=PASS ++AMO_All-to-All_FI_ATOMICV_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_ATOMICV_ATOMIC_READ=PASS ++AMO_All-to-All_FI_ATOMICMSG_MIN=PASS ++AMO_All-to-All_FI_ATOMICMSG_MAX=PASS ++AMO_All-to-All_FI_ATOMICMSG_SUM=PASS ++AMO_All-to-All_FI_ATOMICMSG_PROD=PASS ++AMO_All-to-All_FI_ATOMICMSG_LOR=PASS ++AMO_All-to-All_FI_ATOMICMSG_LAND=PASS ++AMO_All-to-All_FI_ATOMICMSG_BOR=PASS ++AMO_All-to-All_FI_ATOMICMSG_BAND=PASS ++AMO_All-to-All_FI_ATOMICMSG_LXOR=PASS ++AMO_All-to-All_FI_ATOMICMSG_BXOR=PASS ++AMO_All-to-All_FI_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_ATOMICMSG_ATOMIC_READ=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_MIN=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_MAX=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_SUM=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_PROD=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_LOR=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_LAND=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_BOR=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_BAND=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_LXOR=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_BXOR=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_MIN=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_MAX=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_SUM=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_PROD=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_LOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_LAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_BOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_BAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_LXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_BXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_MIN=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_MAX=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_SUM=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_PROD=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_LOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_LAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_BOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_BAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_LXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_BXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_ATOMIC_READ=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_MIN=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_MAX=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_SUM=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_PROD=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_LOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_LAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_BOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_BAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_LXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_BXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_ATOMIC_READ=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_NE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_LE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_LT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_GE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_GT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_MSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_NE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_LE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_LT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_GE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_GT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_MSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_NE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_LE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_LT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_GE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_GT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_MSWAP=PASS ++AMO_All-to-One_FI_ATOMIC_MIN=PASS ++AMO_All-to-One_FI_ATOMIC_MAX=PASS ++AMO_All-to-One_FI_ATOMIC_SUM=PASS ++AMO_All-to-One_FI_ATOMIC_PROD=PASS ++AMO_All-to-One_FI_ATOMIC_LOR=PASS ++AMO_All-to-One_FI_ATOMIC_LAND=PASS ++AMO_All-to-One_FI_ATOMIC_BOR=PASS ++AMO_All-to-One_FI_ATOMIC_BAND=PASS ++AMO_All-to-One_FI_ATOMIC_LXOR=PASS ++AMO_All-to-One_FI_ATOMIC_BXOR=PASS ++AMO_All-to-One_FI_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-One_FI_ATOMICV_MIN=PASS ++AMO_All-to-One_FI_ATOMICV_MAX=PASS ++AMO_All-to-One_FI_ATOMICV_SUM=PASS ++AMO_All-to-One_FI_ATOMICV_PROD=PASS ++AMO_All-to-One_FI_ATOMICV_LOR=PASS ++AMO_All-to-One_FI_ATOMICV_LAND=PASS ++AMO_All-to-One_FI_ATOMICV_BOR=PASS ++AMO_All-to-One_FI_ATOMICV_BAND=PASS ++AMO_All-to-One_FI_ATOMICV_LXOR=PASS ++AMO_All-to-One_FI_ATOMICV_BXOR=PASS ++AMO_All-to-One_FI_ATOMICV_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_ATOMICV_ATOMIC_READ=PASS ++AMO_All-to-One_FI_ATOMICMSG_MIN=PASS ++AMO_All-to-One_FI_ATOMICMSG_MAX=PASS ++AMO_All-to-One_FI_ATOMICMSG_SUM=PASS ++AMO_All-to-One_FI_ATOMICMSG_PROD=PASS ++AMO_All-to-One_FI_ATOMICMSG_LOR=PASS ++AMO_All-to-One_FI_ATOMICMSG_LAND=PASS ++AMO_All-to-One_FI_ATOMICMSG_BOR=PASS ++AMO_All-to-One_FI_ATOMICMSG_BAND=PASS ++AMO_All-to-One_FI_ATOMICMSG_LXOR=PASS ++AMO_All-to-One_FI_ATOMICMSG_BXOR=PASS ++AMO_All-to-One_FI_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_ATOMICMSG_ATOMIC_READ=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_MIN=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_MAX=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_SUM=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_PROD=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_LOR=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_LAND=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_BOR=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_BAND=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_LXOR=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_BXOR=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_MIN=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_MAX=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_SUM=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_PROD=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_LOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_LAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_BOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_BAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_LXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_BXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_MIN=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_MAX=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_SUM=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_PROD=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_LOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_LAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_BOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_BAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_LXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_BXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_ATOMIC_READ=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_MIN=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_MAX=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_SUM=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_PROD=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_LOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_LAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_BOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_BAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_LXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_BXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_ATOMIC_READ=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_NE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_LE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_LT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_GE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_GT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_MSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_NE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_LE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_LT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_GE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_GT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_MSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_NE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_LE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_LT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_GE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_GT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_MSWAP=PASS ++AMO_One-to-All_FI_ATOMIC_MIN=PASS ++AMO_One-to-All_FI_ATOMIC_MAX=PASS ++AMO_One-to-All_FI_ATOMIC_SUM=PASS ++AMO_One-to-All_FI_ATOMIC_PROD=PASS ++AMO_One-to-All_FI_ATOMIC_LOR=PASS ++AMO_One-to-All_FI_ATOMIC_LAND=PASS ++AMO_One-to-All_FI_ATOMIC_BOR=PASS ++AMO_One-to-All_FI_ATOMIC_BAND=PASS ++AMO_One-to-All_FI_ATOMIC_LXOR=PASS ++AMO_One-to-All_FI_ATOMIC_BXOR=PASS ++AMO_One-to-All_FI_ATOMIC_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_ATOMIC_ATOMIC_READ=PASS ++AMO_One-to-All_FI_ATOMICV_MIN=PASS ++AMO_One-to-All_FI_ATOMICV_MAX=PASS ++AMO_One-to-All_FI_ATOMICV_SUM=PASS ++AMO_One-to-All_FI_ATOMICV_PROD=PASS ++AMO_One-to-All_FI_ATOMICV_LOR=PASS ++AMO_One-to-All_FI_ATOMICV_LAND=PASS ++AMO_One-to-All_FI_ATOMICV_BOR=PASS ++AMO_One-to-All_FI_ATOMICV_BAND=PASS ++AMO_One-to-All_FI_ATOMICV_LXOR=PASS ++AMO_One-to-All_FI_ATOMICV_BXOR=PASS ++AMO_One-to-All_FI_ATOMICV_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_ATOMICV_ATOMIC_READ=PASS ++AMO_One-to-All_FI_ATOMICMSG_MIN=PASS ++AMO_One-to-All_FI_ATOMICMSG_MAX=PASS ++AMO_One-to-All_FI_ATOMICMSG_SUM=PASS ++AMO_One-to-All_FI_ATOMICMSG_PROD=PASS ++AMO_One-to-All_FI_ATOMICMSG_LOR=PASS ++AMO_One-to-All_FI_ATOMICMSG_LAND=PASS ++AMO_One-to-All_FI_ATOMICMSG_BOR=PASS ++AMO_One-to-All_FI_ATOMICMSG_BAND=PASS ++AMO_One-to-All_FI_ATOMICMSG_LXOR=PASS ++AMO_One-to-All_FI_ATOMICMSG_BXOR=PASS ++AMO_One-to-All_FI_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_ATOMICMSG_ATOMIC_READ=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_MIN=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_MAX=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_SUM=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_PROD=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_LOR=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_LAND=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_BOR=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_BAND=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_LXOR=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_BXOR=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_ATOMIC_READ=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_MIN=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_MAX=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_SUM=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_PROD=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_LOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_LAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_BOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_BAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_LXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_BXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_ATOMIC_READ=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_MIN=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_MAX=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_SUM=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_PROD=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_LOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_LAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_BOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_BAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_LXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_BXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_ATOMIC_READ=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_MIN=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_MAX=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_SUM=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_PROD=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_LOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_LAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_BOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_BAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_LXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_BXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_ATOMIC_READ=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_NE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_LE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_LT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_GE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_GT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_MSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_NE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_LE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_LT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_GE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_GT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_MSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_NE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_LE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_LT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_GE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_GT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_MSWAP=PASS ++AMO_Round-Robin_FI_ATOMIC_MIN=PASS ++AMO_Round-Robin_FI_ATOMIC_MAX=PASS ++AMO_Round-Robin_FI_ATOMIC_SUM=PASS ++AMO_Round-Robin_FI_ATOMIC_PROD=PASS ++AMO_Round-Robin_FI_ATOMIC_LOR=PASS ++AMO_Round-Robin_FI_ATOMIC_LAND=PASS ++AMO_Round-Robin_FI_ATOMIC_BOR=PASS ++AMO_Round-Robin_FI_ATOMIC_BAND=PASS ++AMO_Round-Robin_FI_ATOMIC_LXOR=PASS ++AMO_Round-Robin_FI_ATOMIC_BXOR=PASS ++AMO_Round-Robin_FI_ATOMIC_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_ATOMIC_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_ATOMICV_MIN=PASS ++AMO_Round-Robin_FI_ATOMICV_MAX=PASS ++AMO_Round-Robin_FI_ATOMICV_SUM=PASS ++AMO_Round-Robin_FI_ATOMICV_PROD=PASS ++AMO_Round-Robin_FI_ATOMICV_LOR=PASS ++AMO_Round-Robin_FI_ATOMICV_LAND=PASS ++AMO_Round-Robin_FI_ATOMICV_BOR=PASS ++AMO_Round-Robin_FI_ATOMICV_BAND=PASS ++AMO_Round-Robin_FI_ATOMICV_LXOR=PASS ++AMO_Round-Robin_FI_ATOMICV_BXOR=PASS ++AMO_Round-Robin_FI_ATOMICV_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_ATOMICV_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_ATOMICMSG_MIN=PASS ++AMO_Round-Robin_FI_ATOMICMSG_MAX=PASS ++AMO_Round-Robin_FI_ATOMICMSG_SUM=PASS ++AMO_Round-Robin_FI_ATOMICMSG_PROD=PASS ++AMO_Round-Robin_FI_ATOMICMSG_LOR=PASS ++AMO_Round-Robin_FI_ATOMICMSG_LAND=PASS ++AMO_Round-Robin_FI_ATOMICMSG_BOR=PASS ++AMO_Round-Robin_FI_ATOMICMSG_BAND=PASS ++AMO_Round-Robin_FI_ATOMICMSG_LXOR=PASS ++AMO_Round-Robin_FI_ATOMICMSG_BXOR=PASS ++AMO_Round-Robin_FI_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_ATOMICMSG_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_MIN=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_MAX=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_SUM=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_PROD=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_LOR=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_LAND=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_BOR=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_BAND=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_LXOR=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_BXOR=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_MIN=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_MAX=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_SUM=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_PROD=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_LOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_LAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_BOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_BAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_LXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_BXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_MIN=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_MAX=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_SUM=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_PROD=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_LOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_LAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_BOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_BAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_LXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_BXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_MIN=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_MAX=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_SUM=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_PROD=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_LOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_LAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_BOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_BAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_LXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_BXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_NE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_LE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_LT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_GE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_GT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_MSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_NE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_LE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_LT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_GE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_GT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_MSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_NE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_LE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_LT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_GE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_GT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_MSWAP=PASS ++MESSAGE_All-to-All_FI_INJECT=PASS ++MESSAGE_All-to-All_FI_INJECTDATA=PASS ++MESSAGE_All-to-All_FI_SEND=PASS ++MESSAGE_All-to-All_FI_SENDDATA=PASS ++MESSAGE_All-to-All_FI_SENDMSG=PASS ++MESSAGE_All-to-All_FI_SENDV=PASS ++MESSAGE_All-to-One_FI_INJECT=PASS ++MESSAGE_All-to-One_FI_INJECTDATA=PASS ++MESSAGE_All-to-One_FI_SEND=PASS ++MESSAGE_All-to-One_FI_SENDDATA=PASS ++MESSAGE_All-to-One_FI_SENDMSG=PASS ++MESSAGE_All-to-One_FI_SENDV=PASS ++MESSAGE_One-to-All_FI_INJECT=PASS ++MESSAGE_One-to-All_FI_INJECTDATA=PASS ++MESSAGE_One-to-All_FI_SEND=PASS ++MESSAGE_One-to-All_FI_SENDDATA=PASS ++MESSAGE_One-to-All_FI_SENDMSG=PASS ++MESSAGE_One-to-All_FI_SENDV=PASS ++MESSAGE_Round-Robin_FI_INJECT=PASS ++MESSAGE_Round-Robin_FI_INJECTDATA=PASS ++MESSAGE_Round-Robin_FI_SEND=PASS ++MESSAGE_Round-Robin_FI_SENDDATA=PASS ++MESSAGE_Round-Robin_FI_SENDDATA_TRIGGER=SKIP ++MESSAGE_Round-Robin_FI_SENDMSG=PASS ++MESSAGE_Round-Robin_FI_SENDMSG_TRIGGER=SKIP ++MESSAGE_Round-Robin_FI_SENDV=PASS ++MESSAGE_Round-Robin_FI_SENDV_TRIGGER=SKIP ++MESSAGE_Round-Robin_FI_SEND_TRIGGER=SKIP ++RMA_All-to-All_FI_INJECT_WRITE=PASS ++RMA_All-to-All_FI_INJECT_WRITEDATA=PASS ++RMA_All-to-All_FI_READ=PASS ++RMA_All-to-All_FI_READMSG=PASS ++RMA_All-to-All_FI_READV=PASS ++RMA_All-to-All_FI_WRITE=PASS ++RMA_All-to-All_FI_WRITEDATA=PASS ++RMA_All-to-All_FI_WRITEMSG=PASS ++RMA_All-to-All_FI_WRITEV=PASS ++RMA_All-to-One_FI_INJECT_WRITE=PASS ++RMA_All-to-One_FI_INJECT_WRITEDATA=PASS ++RMA_All-to-One_FI_READ=PASS ++RMA_All-to-One_FI_READMSG=PASS ++RMA_All-to-One_FI_READV=PASS ++RMA_All-to-One_FI_WRITE=PASS ++RMA_All-to-One_FI_WRITEDATA=PASS ++RMA_All-to-One_FI_WRITEMSG=PASS ++RMA_All-to-One_FI_WRITEV=PASS ++RMA_One-to-All_FI_INJECT_WRITE=PASS ++RMA_One-to-All_FI_INJECT_WRITEDATA=PASS ++RMA_One-to-All_FI_READ=PASS ++RMA_One-to-All_FI_READMSG=PASS ++RMA_One-to-All_FI_READV=PASS ++RMA_One-to-All_FI_WRITE=PASS ++RMA_One-to-All_FI_WRITEDATA=PASS ++RMA_One-to-All_FI_WRITEMSG=PASS ++RMA_One-to-All_FI_WRITEV=PASS ++RMA_Round-Robin_FI_INJECT_WRITE=PASS ++RMA_Round-Robin_FI_INJECT_WRITEDATA=PASS ++RMA_Round-Robin_FI_READ=PASS ++RMA_Round-Robin_FI_READMSG=PASS ++RMA_Round-Robin_FI_READMSG_TRIGGER=SKIP ++RMA_Round-Robin_FI_READV=PASS ++RMA_Round-Robin_FI_READV_TRIGGER=SKIP ++RMA_Round-Robin_FI_READ_TRIGGER=SKIP ++RMA_Round-Robin_FI_WRITE=PASS ++RMA_Round-Robin_FI_WRITEDATA=PASS ++RMA_Round-Robin_FI_WRITEDATA_TRIGGER=SKIP ++RMA_Round-Robin_FI_WRITEMSG=PASS ++RMA_Round-Robin_FI_WRITEMSG_TRIGGER=SKIP ++RMA_Round-Robin_FI_WRITEV=PASS ++RMA_Round-Robin_FI_WRITEV_TRIGGER=SKIP ++RMA_Round-Robin_FI_WRITE_TRIGGER=SKIP ++TAGGED_All-to-All_FI_TINJECT=PASS ++TAGGED_All-to-All_FI_TINJECTDATA=PASS ++TAGGED_All-to-All_FI_TSEND=PASS ++TAGGED_All-to-All_FI_TSENDDATA=PASS ++TAGGED_All-to-All_FI_TSENDMSG=PASS ++TAGGED_All-to-All_FI_TSENDV=PASS ++TAGGED_All-to-One_FI_TINJECT=PASS ++TAGGED_All-to-One_FI_TINJECTDATA=PASS ++TAGGED_All-to-One_FI_TSEND=PASS ++TAGGED_All-to-One_FI_TSENDDATA=PASS ++TAGGED_All-to-One_FI_TSENDMSG=PASS ++TAGGED_All-to-One_FI_TSENDV=PASS ++TAGGED_One-to-All_FI_TINJECT=PASS ++TAGGED_One-to-All_FI_TINJECTDATA=PASS ++TAGGED_One-to-All_FI_TSEND=PASS ++TAGGED_One-to-All_FI_TSENDDATA=PASS ++TAGGED_One-to-All_FI_TSENDMSG=PASS ++TAGGED_One-to-All_FI_TSENDV=PASS ++TAGGED_Round-Robin_FI_TINJECT=PASS ++TAGGED_Round-Robin_FI_TINJECTDATA=PASS ++TAGGED_Round-Robin_FI_TSEND=PASS ++TAGGED_Round-Robin_FI_TSENDDATA=PASS ++TAGGED_Round-Robin_FI_TSENDDATA_TRIGGER=SKIP ++TAGGED_Round-Robin_FI_TSENDMSG=PASS ++TAGGED_Round-Robin_FI_TSENDMSG_TRIGGER=SKIP ++TAGGED_Round-Robin_FI_TSENDV=PASS ++TAGGED_Round-Robin_FI_TSENDV_TRIGGER=SKIP ++TAGGED_Round-Robin_FI_TSEND_TRIGGER=SKIP ++ ++# The Error Messages section will contain error message that could happen intermittently. ++# However, a test should not encounter errors during libfabric initialization ++# because the test could not execute. ++# If a test encounters one of these error messages, then Jenkins will report this test as SKIPPED ++ ++# Intermittent Error Messages +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/requirements.txt b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/requirements.txt +new file mode 100644 +index 0000000..ac04d3f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/requirements.txt +@@ -0,0 +1 @@ ++junit-xml +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/version b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/version +new file mode 100644 +index 0000000..3eefcb9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/version +@@ -0,0 +1 @@ ++1.0.0 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/AUTHORS b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/AUTHORS +new file mode 100644 +index 0000000..62652be +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/AUTHORS +@@ -0,0 +1,41 @@ ++aingerson ++aingerson ++Arun C Ilango ++arun ilango ++Arun Ilango ++Ben Turrubiates ++Ben Turrubiates ++Charles J Archer ++Chen Zhao ++Chuck Fossen ++Dardo D Kleiner ++Dave Goodell ++Dmitry Gladkov ++Erik Paulson ++Evgeny Leksikov ++Howard Pritchard ++James Shimek ++Jeff Squyres ++Jerome Berryhill ++Jerome Boyd Berryhill ++Jithin Jose ++John Byrne ++jose ++jose ++Ken Raffenetti ++Miao Luo ++Neil Spruit ++Oblomov, Sergey ++Paolo Inaudi ++Patrick MacArthur ++Patrick McCormick ++Prankur Gupta ++Reese Faucette ++Sayantan Sur ++Sean Hefty ++Shantonu Hossain ++Solovyev, Dmitriy ++Spruit, Neil R ++Stan Smith ++Sung-Eun Choi ++Xuyang Wang +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/COPYING b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/COPYING +new file mode 100644 +index 0000000..22e8703 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/COPYING +@@ -0,0 +1,409 @@ ++This software is available to you under a choice of one of two ++licenses. You may choose to be licensed under the terms of the ++BSD license or the GNU General Public License (GPL) Version ++2, both included below. ++ ++Some parts of the source are 3rd party code which uses MIT license. ++The description and requirements of the license are available in ++later part of this file. ++ ++Copyright (c) 2015-2018 Intel Corporation. All rights reserved. ++Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved. ++ ++================================================================== ++ ++ BSD license ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions ++are met: ++ ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ ++ * Redistributions in binary form must reproduce the above ++ copyright notice, this list of conditions and the following ++ disclaimer in the documentation and/or other materials provided ++ with the distribution. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ++FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ++COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ++INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ++ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGE. ++ ++================================================================== ++ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc. ++ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Library General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) year name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ , 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Library General ++Public License instead of this License. ++ ++================================================================== ++ ++ MIT LICENSE ++ ++Applies to: include/jsmn.h, common/jsmn.c ++ ++Copyright (c) 2010 Serge A. Zaitsev ++ ++Permission is hereby granted, free of charge, to any person obtaining a copy ++of this software and associated documentation files (the "Software"), to deal ++in the Software without restriction, including without limitation the rights ++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++copies of the Software, and to permit persons to whom the Software is ++furnished to do so, subject to the following conditions: ++ ++The above copyright notice and this permission notice shall be included in ++all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++THE SOFTWARE. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.am b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.am +new file mode 100644 +index 0000000..7479abc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.am +@@ -0,0 +1,388 @@ ++configdir = $(datarootdir)/${PACKAGE_NAME} ++AM_CFLAGS = -g -Wall -D_GNU_SOURCE -D 'CONFIG_PATH="${configdir}"' -I$(srcdir)/include ++ACLOCAL_AMFLAGS = -I config ++ ++if MACOS ++os_excludes = -f ./test_configs/osx.exclude ++endif ++ ++bin_PROGRAMS = \ ++ functional/fi_av_xfer \ ++ functional/fi_msg \ ++ functional/fi_msg_sockets \ ++ functional/fi_rdm \ ++ functional/fi_rdm_rma_simple \ ++ functional/fi_rdm_rma_trigger \ ++ functional/fi_rdm_deferred_wq \ ++ functional/fi_dgram \ ++ functional/fi_mcast \ ++ functional/fi_dgram_waitset \ ++ functional/fi_rdm_tagged_peek \ ++ functional/fi_cq_data \ ++ functional/fi_poll \ ++ functional/fi_scalable_ep \ ++ functional/fi_shared_ctx \ ++ functional/fi_msg_epoll \ ++ functional/fi_rdm_shared_av \ ++ functional/fi_cm_data \ ++ functional/fi_multi_mr \ ++ functional/fi_rdm_multi_domain \ ++ functional/fi_multi_ep \ ++ functional/fi_recv_cancel \ ++ functional/fi_unexpected_msg \ ++ functional/fi_inj_complete \ ++ functional/fi_resmgmt_test \ ++ functional/fi_rdm_atomic \ ++ functional/fi_rdm_multi_recv \ ++ benchmarks/fi_msg_pingpong \ ++ benchmarks/fi_msg_bw \ ++ benchmarks/fi_rma_bw \ ++ benchmarks/fi_rdm_cntr_pingpong \ ++ benchmarks/fi_dgram_pingpong \ ++ benchmarks/fi_rdm_pingpong \ ++ benchmarks/fi_rdm_tagged_pingpong \ ++ benchmarks/fi_rdm_tagged_bw \ ++ unit/fi_eq_test \ ++ unit/fi_cq_test \ ++ unit/fi_mr_test \ ++ unit/fi_cntr_test \ ++ unit/fi_av_test \ ++ unit/fi_dom_test \ ++ unit/fi_getinfo_test \ ++ unit/fi_resource_freeing \ ++ ubertest/fi_ubertest ++ ++dist_bin_SCRIPTS = \ ++ scripts/runfabtests.sh \ ++ scripts/rft_yaml_to_junit_xml ++ ++dist_noinst_SCRIPTS = \ ++ scripts/parseyaml.py ++ ++nobase_dist_config_DATA = \ ++ test_configs/osx.exclude \ ++ test_configs/eq_cq.test \ ++ test_configs/lat_bw.test \ ++ test_configs/sockets/all.test \ ++ test_configs/sockets/quick.test \ ++ test_configs/sockets/complete.test \ ++ test_configs/sockets/verify.test \ ++ test_configs/udp/all.test \ ++ test_configs/udp/lat_bw.test \ ++ test_configs/udp/quick.test \ ++ test_configs/udp/functional.test \ ++ test_configs/udp/udp.exclude \ ++ test_configs/tcp/tcp.exclude \ ++ test_configs/verbs/all.test \ ++ test_configs/verbs/quick.test \ ++ test_configs/verbs/exclude \ ++ test_configs/usnic/all.test \ ++ test_configs/usnic/quick.test \ ++ test_configs/psm/all.test \ ++ test_configs/psm2/all.test \ ++ test_configs/psm2/verify.test \ ++ test_configs/psm2/psm2.exclude \ ++ test_configs/ofi_rxm/verbs/all.test \ ++ test_configs/ofi_rxm/verbs/exclude \ ++ test_configs/ofi_rxd/ofi_rxd.exclude \ ++ test_configs/ofi_rxd/udp.test \ ++ test_configs/shm/all.test \ ++ test_configs/shm/shm.exclude \ ++ test_configs/shm/quick.test \ ++ test_configs/shm/verify.test ++ ++noinst_LTLIBRARIES = libfabtests.la ++libfabtests_la_SOURCES = \ ++ common/shared.c \ ++ common/jsmn.c \ ++ include/shared.h \ ++ include/jsmn.h \ ++ include/unix/osd.h \ ++ include/ft_osd.h ++ ++benchmarks_srcs = \ ++ benchmarks/benchmark_shared.h \ ++ benchmarks/benchmark_shared.c ++ ++unit_srcs = \ ++ include/unit_common.h \ ++ unit/common.c ++ ++if MACOS ++if !HAVE_CLOCK_GETTIME ++libfabtests_la_SOURCES += common/osx/osd.c ++endif ++endif ++ ++functional_fi_av_xfer_SOURCES = \ ++ functional/av_xfer.c ++functional_fi_av_xfer_LDADD = libfabtests.la ++ ++functional_fi_msg_sockets_SOURCES = \ ++ functional/msg_sockets.c ++functional_fi_msg_sockets_LDADD = libfabtests.la ++ ++functional_fi_msg_epoll_SOURCES = \ ++ functional/msg_epoll.c ++functional_fi_msg_epoll_LDADD = libfabtests.la ++ ++functional_fi_msg_SOURCES = \ ++ functional/msg.c ++functional_fi_msg_LDADD = libfabtests.la ++ ++functional_fi_rdm_SOURCES = \ ++ functional/rdm.c ++functional_fi_rdm_LDADD = libfabtests.la ++ ++functional_fi_rdm_shared_av_SOURCES = \ ++ functional/rdm_shared_av.c ++functional_fi_rdm_shared_av_LDADD = libfabtests.la ++ ++functional_fi_rdm_rma_simple_SOURCES = \ ++ functional/rdm_rma_simple.c ++functional_fi_rdm_rma_simple_LDADD = libfabtests.la ++ ++functional_fi_rdm_rma_trigger_SOURCES = \ ++ functional/rdm_rma_trigger.c ++functional_fi_rdm_rma_trigger_LDADD = libfabtests.la ++ ++functional_fi_rdm_deferred_wq_SOURCES = \ ++ functional/rdm_deferred_wq.c ++functional_fi_rdm_deferred_wq_LDADD = libfabtests.la ++ ++functional_fi_dgram_SOURCES = \ ++ functional/dgram.c ++functional_fi_dgram_LDADD = libfabtests.la ++ ++functional_fi_mcast_SOURCES = \ ++ functional/mcast.c ++functional_fi_mcast_LDADD = libfabtests.la ++ ++functional_fi_dgram_waitset_SOURCES = \ ++ functional/dgram_waitset.c ++functional_fi_dgram_waitset_LDADD = libfabtests.la ++ ++functional_fi_rdm_tagged_peek_SOURCES = \ ++ functional/rdm_tagged_peek.c ++functional_fi_rdm_tagged_peek_LDADD = libfabtests.la ++ ++functional_fi_cq_data_SOURCES = \ ++ functional/cq_data.c ++functional_fi_cq_data_LDADD = libfabtests.la ++ ++functional_fi_cm_data_SOURCES = \ ++ functional/cm_data.c ++functional_fi_cm_data_LDADD = libfabtests.la ++ ++functional_fi_scalable_ep_SOURCES = \ ++ functional/scalable_ep.c ++functional_fi_scalable_ep_LDADD = libfabtests.la ++ ++functional_fi_shared_ctx_SOURCES = \ ++ functional/shared_ctx.c ++functional_fi_shared_ctx_LDADD = libfabtests.la ++ ++functional_fi_poll_SOURCES = \ ++ functional/poll.c ++functional_fi_poll_LDADD = libfabtests.la ++ ++functional_fi_multi_ep_SOURCES = \ ++ functional/multi_ep.c ++functional_fi_multi_ep_LDADD = libfabtests.la ++ ++functional_fi_multi_mr_SOURCES = \ ++ functional/multi_mr.c ++functional_fi_multi_mr_LDADD = libfabtests.la ++ ++functional_fi_unexpected_msg_SOURCES = \ ++ functional/unexpected_msg.c ++functional_fi_unexpected_msg_LDADD = libfabtests.la ++ ++functional_fi_rdm_multi_domain_SOURCES = \ ++ functional/rdm_multi_domain.c ++functional_fi_rdm_multi_domain_LDADD = libfabtests.la ++ ++functional_fi_recv_cancel_SOURCES = \ ++ functional/recv_cancel.c ++functional_fi_recv_cancel_LDADD = libfabtests.la ++ ++functional_fi_inj_complete_SOURCES = \ ++ functional/inj_complete.c ++functional_fi_inj_complete_LDADD = libfabtests.la ++ ++functional_fi_resmgmt_test_SOURCES = \ ++ functional/resmgmt_test.c ++functional_fi_resmgmt_test_LDADD = libfabtests.la ++ ++functional_fi_rdm_atomic_SOURCES = \ ++ functional/rdm_atomic.c ++functional_fi_rdm_atomic_LDADD = libfabtests.la ++ ++functional_fi_rdm_multi_recv_SOURCES = \ ++ functional/rdm_multi_recv.c ++functional_fi_rdm_multi_recv_LDADD = libfabtests.la ++ ++benchmarks_fi_msg_pingpong_SOURCES = \ ++ benchmarks/msg_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_msg_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_msg_bw_SOURCES = \ ++ benchmarks/msg_bw.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_msg_bw_LDADD = libfabtests.la ++ ++benchmarks_fi_rma_bw_SOURCES = \ ++ benchmarks/rma_bw.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rma_bw_LDADD = libfabtests.la ++ ++benchmarks_fi_dgram_pingpong_SOURCES = \ ++ benchmarks/dgram_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_dgram_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_rdm_cntr_pingpong_SOURCES = \ ++ benchmarks/rdm_cntr_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rdm_cntr_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_rdm_pingpong_SOURCES = \ ++ benchmarks/rdm_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rdm_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_rdm_tagged_pingpong_SOURCES = \ ++ benchmarks/rdm_tagged_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rdm_tagged_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_rdm_tagged_bw_SOURCES = \ ++ benchmarks/rdm_tagged_bw.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rdm_tagged_bw_LDADD = libfabtests.la ++ ++ ++unit_fi_eq_test_SOURCES = \ ++ unit/eq_test.c \ ++ $(unit_srcs) ++unit_fi_eq_test_LDADD = libfabtests.la ++ ++unit_fi_cq_test_SOURCES = \ ++ unit/cq_test.c \ ++ $(unit_srcs) ++unit_fi_cq_test_LDADD = libfabtests.la ++ ++unit_fi_mr_test_SOURCES = \ ++ unit/mr_test.c \ ++ $(unit_srcs) ++unit_fi_mr_test_LDADD = libfabtests.la ++ ++unit_fi_cntr_test_SOURCES = \ ++ unit/cntr_test.c \ ++ $(unit_srcs) ++unit_fi_cntr_test_LDADD = libfabtests.la ++ ++unit_fi_av_test_SOURCES = \ ++ unit/av_test.c \ ++ $(unit_srcs) ++unit_fi_av_test_LDADD = libfabtests.la ++ ++unit_fi_dom_test_SOURCES = \ ++ unit/dom_test.c \ ++ $(unit_srcs) ++unit_fi_dom_test_LDADD = libfabtests.la ++ ++unit_fi_getinfo_test_SOURCES = \ ++ unit/getinfo_test.c \ ++ $(unit_srcs) ++unit_fi_getinfo_test_LDADD = libfabtests.la ++ ++unit_fi_resource_freeing_SOURCES = \ ++ unit/resource_freeing.c ++unit_fi_resource_freeing_LDADD = libfabtests.la ++ ++ubertest_fi_ubertest_SOURCES = \ ++ ubertest/fabtest.h \ ++ ubertest/ofi_atomic.h \ ++ ubertest/ofi_atomic.c \ ++ ubertest/uber.c \ ++ ubertest/connect.c \ ++ ubertest/cq.c \ ++ ubertest/config.c \ ++ ubertest/domain.c \ ++ ubertest/ep.c \ ++ ubertest/xfer.c \ ++ ubertest/verify.c \ ++ ubertest/test_ctrl.c ++ubertest_fi_ubertest_LDADD = libfabtests.la ++ ++real_man_pages = \ ++ man/man7/fabtests.7 ++ ++dummy_man_pages = \ ++ man/man1/fi_av_xfer.1 \ ++ man/man1/fi_cm_data.1 \ ++ man/man1/fi_cq_data.1 \ ++ man/man1/fi_dgram.1 \ ++ man/man1/fi_dgram_waitset.1 \ ++ man/man1/fi_inj_complete.1 \ ++ man/man1/fi_mcast.1 \ ++ man/man1/fi_msg.1 \ ++ man/man1/fi_msg_epoll.1 \ ++ man/man1/fi_msg_sockets.1 \ ++ man/man1/fi_multi_ep.1 \ ++ man/man1/fi_multi_mr.1 \ ++ man/man1/fi_poll.1 \ ++ man/man1/fi_rdm.1 \ ++ man/man1/fi_rdm_atomic.1 \ ++ man/man1/fi_rdm_deferred_wq.1 \ ++ man/man1/fi_rdm_multi_domain.1 \ ++ man/man1/fi_rdm_multi_recv.1 \ ++ man/man1/fi_rdm_rma_simple.1 \ ++ man/man1/fi_rdm_rma_trigger.1 \ ++ man/man1/fi_rdm_shared_av.1 \ ++ man/man1/fi_rdm_tagged_peek.1 \ ++ man/man1/fi_recv_cancel.1 \ ++ man/man1/fi_resmgmt_test.1 \ ++ man/man1/fi_scalable_ep.1 \ ++ man/man1/fi_shared_ctx.1 \ ++ man/man1/fi_unexpected_msg.1 \ ++ man/man1/fi_dgram_pingpong.1 \ ++ man/man1/fi_msg_bw.1 \ ++ man/man1/fi_msg_pingpong.1 \ ++ man/man1/fi_rdm_cntr_pingpong.1 \ ++ man/man1/fi_rdm_pingpong.1 \ ++ man/man1/fi_rdm_tagged_bw.1 \ ++ man/man1/fi_rdm_tagged_pingpong.1 \ ++ man/man1/fi_rma_bw.1 \ ++ man/man1/fi_av_test.1 \ ++ man/man1/fi_cntr_test.1 \ ++ man/man1/fi_cq_test.1 \ ++ man/man1/fi_dom_test.1 \ ++ man/man1/fi_eq_test.1 \ ++ man/man1/fi_getinfo_test.1 \ ++ man/man1/fi_mr_test.1 \ ++ man/man1/fi_resource_freeing.1 \ ++ man/man1/fi_ubertest.1 ++ ++nroff: ++ @for file in $(real_man_pages); do \ ++ source=`echo $$file | sed -e 's@/man[0-9]@@'`; \ ++ perl $(top_srcdir)/config/md2nroff.pl --source=$(top_srcdir)/$$source.md; \ ++ done ++ ++ ++man_MANS = $(real_man_pages) $(dummy_man_pages) ++ ++EXTRA_DIST = \ ++ fabtests.spec.in $(real_man_pages) $(dummy_man_pages) ++ ++dist-hook: fabtests.spec ++ cp fabtests.spec $(distdir) ++ ++test: ++ ./scripts/runfabtests.sh -vvv -S $(os_excludes) ++ ./scripts/runfabtests.sh -vvv -S $(os_excludes) -R -f ./test_configs/udp/udp.exclude udp ++ ./scripts/runfabtests.sh -vvv -S $(os_excludes) -R -f ./test_configs/tcp/tcp.exclude tcp ++ ./scripts/runfabtests.sh -vvv -S $(os_excludes) -R -f ./test_configs/ofi_rxd/ofi_rxd.exclude "UDP;ofi_rxd" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.win b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.win +new file mode 100644 +index 0000000..1e59d3c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.win +@@ -0,0 +1,120 @@ ++ ++ ++!if "$(arch)" == "" ++arch = x64 ++!endif ++ ++!if "$(config)" == "" ++config = Debug-v140 ++!endif ++ ++output_root = .\\ ++ ++!if "$(config)" == "Debug-v140" ++outdir = $(output_root)$(arch)\debug-v140 ++CFLAGS = $(CFLAGS) /Zi /Od /MTd ++!endif ++!if "$(config)" == "Debug-v141" ++outdir = $(output_root)$(arch)\debug-v141 ++CFLAGS = $(CFLAGS) /Zi /Od /MTd ++!endif ++!if "$(config)" == "Release-v140" ++outdir = $(output_root)$(arch)\release-v140 ++CFLAGS = $(CFLAGS) /O2 /MT ++!endif ++!if "$(config)" == "Release-v141" ++outdir = $(output_root)$(arch)\release-v141 ++CFLAGS = $(CFLAGS) /O2 /MT ++!endif ++ ++basedeps = common\shared.c common\jsmn.c common\windows\getopt.c \ ++ common\windows\osd.c ++ ++includes = /Iinclude /Iinclude\windows /I..\include /FIft_osd.h \ ++ /Iinclude\windows\getopt ++defines = /DGETOPT_STATIC ++libs = ..\$(arch)\$(config)\libfabric.lib Ws2_32.lib ++ ++CFLAGS = $(CFLAGS) $(includes) $(defines) ++ ++#all: complex functional ++ ++all: benchmarks functional unit ++ ++{benchmarks}.c{$(outdir)}.exe: ++ if not exist $(@D) mkdir $(@D) ++ $(CC) /Fe$@ $** $(baseincludes) $(CFLAGS) $(libs) ++ ++{functional}.c{$(outdir)}.exe: ++ if not exist $(@D) mkdir $(@D) ++ $(CC) /Fe$@ $** $(baseincludes) $(CFLAGS) $(libs) ++ ++{unit}.c{$(outdir)}.exe: ++ if not exist $(@D) mkdir $(@D) ++ $(CC) /Fe$@ $** $(baseincludes) $(CFLAGS) $(libs) ++ ++ ++benchmarks: $(outdir)\msg_pingpong.exe $(outdir)\rdm_cntr_pingpong.exe \ ++ $(outdir)\rdm_pingpong.exe $(outdir)\rdm_tagged_pingpong.exe ++ ++functional: $(outdir)\cq_data.exe $(outdir)\dgram.exe $(outdir)\dgram_waitset.exe $(outdir)\msg.exe \ ++ $(outdir)\msg_epoll.exe $(outdir)\msg_sockets.exe \ ++ $(outdir)\poll.exe $(outdir)\rdm.exe $(outdir)\rdm_rma_simple.exe $(outdir)\rdm_rma_trigger.exe \ ++ $(outdir)\rdm_tagged_peek.exe $(outdir)\scalable_ep.exe $(outdir)\inj_complete.exe ++ ++unit: $(outdir)\av_test.exe $(outdir)\dom_test.exe $(outdir)\eq_test.exe ++ ++complex: $(outdir)\complex.exe ++ ++clean: ++ if exist $(outdir) rmdir /s /q $(outdir) ++ del *.obj ++ ++$(outdir)\msg_pingpong.exe: {benchmarks}msg_pingpong.c $(basedeps) {benchmarks}benchmark_shared.c ++ ++$(outdir)\rdm_cntr_pingpong.exe: {benchmarks}rdm_cntr_pingpong.c $(basedeps) {benchmarks}benchmark_shared.c ++ ++$(outdir)\rdm_pingpong.exe: {benchmarks}rdm_pingpong.c $(basedeps) {benchmarks}benchmark_shared.c ++ ++$(outdir)\rdm_tagged_pingpong.exe: {benchmarks}rdm_tagged_pingpong.c $(basedeps) {benchmarks}benchmark_shared.c ++ ++ ++$(outdir)\cq_data.exe: {functional}cq_data.c $(basedeps) ++ ++$(outdir)\dgram.exe: {functional}dgram.c $(basedeps) ++ ++$(outdir)\dgram_waitset.exe: {functional}dgram_waitset.c $(basedeps) ++ ++$(outdir)\msg.exe: {functional}msg.c $(basedeps) ++ ++$(outdir)\msg_epoll.exe: {functional}msg_epoll.c $(basedeps) ++ ++$(outdir)\msg_sockets.exe: {functional}msg_sockets.c $(basedeps) ++ ++$(outdir)\poll.exe: {functional}poll.c $(basedeps) ++ ++$(outdir)\rdm.exe: {functional}rdm.c $(basedeps) ++ ++$(outdir)\rdm_rma_simple.exe: {functional}rdm_rma_simple.c $(basedeps) ++ ++$(outdir)\rdm_rma_trigger.exe: {functional}rdm_rma_trigger.c $(basedeps) ++ ++$(outdir)\rdm_tagged_peek.exe: {functional}rdm_tagged_peek.c $(basedeps) ++ ++$(outdir)\scalable_ep.exe: {functional}scalable_ep.c $(basedeps) ++ ++$(outdir)\inj_complete.exe: {functional}inj_complete.c $(basedeps) ++ ++$(outdir)\av_test.exe: {unit}av_test.c $(basedeps) {unit}common.c ++ ++$(outdir)\dom_test.exe: {unit}dom_test.c $(basedeps) {unit}common.c ++ ++$(outdir)\eq_test.exe: {unit}eq_test.c $(basedeps) {unit}common.c ++ ++$(outdir)\complex.exe: {complex}ft_comm.c {complex}ft_comp.c {complex}ft_config.c {complex}ft_domain.c {complex}ft_endpoint.c {complex}ft_main.c {complex}ft_msg.c {complex}ft_test.c $(basedeps) ++ if not exist $(@D) mkdir $(@D) ++ $(CC) /Fe$@ $** $(baseincludes) $(CFLAGS) $(libs) ++ ++ ++ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README +new file mode 100644 +index 0000000..f90f7d0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README +@@ -0,0 +1,31 @@ ++Introduction ++============ ++Fabtests provides a set of examples that uses libfabric - a high-performance ++fabric software library. ++ ++Support ++======= ++Fabtests will run on any operating system supported by Libfabric. ++ ++Bugs or issues may be submitted directly to the Github issues list: ++ ++https://github.com/ofiwg/fabtests/issues ++ ++Additionally, users may post questions, comments, bugs, etc. to the Libfabric ++users mailing list. ++ ++libfabric-users@lists.openfabrics.org ++ ++Building ++======== ++ ++To install from a fabtests source package run the following commands: ++ ++./configure && make && make install ++ ++If building directly from the libfabric git tree, run './autogen.sh' before the ++configure step. ++ ++For more detailed build information see the projects home page on Github: ++ ++https://github.com/ofiwg/fabtests +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README.md b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README.md +new file mode 100644 +index 0000000..8448191 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README.md +@@ -0,0 +1,93 @@ ++[![Build Status](https://travis-ci.org/ofiwg/fabtests.svg?branch=master)](https://travis-ci.org/ofiwg/fabtests) ++[![fabtests Coverity scan suild status](https://scan.coverity.com/projects/ofiwg-fabtests/badge.svg)](https://scan.coverity.com/projects/ofiwg-fabtests) ++[![fabtests release version](https://img.shields.io/github/release/ofiwg/fabtests.svg)](https://github.com/ofiwg/fabtests/releases/latest) ++ ++# fabtests ++ ++Fabtests provides a set of examples that uses ++[libfabric](http://libfabric.org) -- a high-performance fabric ++software library. ++ ++## Notes ++ ++Note that the fabtests suite is released paired with a specific ++version of libfabric. For example, libfabric v1.4 and fabtests v1.4 ++were released together. ++ ++Using these paired versions is the best way to test a given version of ++libfabric. Using version-mismatched libfabric/fabtests pairs may ++produce unexpected results. ++ ++## Building fabtests ++ ++Distribution tarballs are available from the Github ++[releases](https://github.com/ofiwg/fabtests/releases) tab. ++ ++If you are building Fabtests from a developer Git clone, you must ++first run the `autogen.sh` script. This will invoke the GNU Autotools ++to bootstrap Fabtests' configuration and build mechanisms. If you are ++building Fabtests from an official distribution tarball, there is no ++need to run `autogen.sh`; Fabtests distribution tarballs are already ++bootstrapped for you. ++ ++Fabtests relies on being able to find an installed version of ++Libfabric. In some cases, Libfabric may be in default compiler / ++linker search paths, and you don't need to tell Fabtests where to find ++it. In other cases, you may need to tell Fabtests where to find the ++installed Libfabric's header and library files using the ++`--with-libfabric=` option, described below. ++ ++### Configure options ++ ++The `configure` script has many built in options (see `./configure ++--help`). Some useful options are: ++ ++``` ++--prefix= ++``` ++ ++By default `make install` will place the files in the `/usr` tree. ++The `--prefix` option specifies that the Fabtests files should be ++installed into the tree specified by named ``. The ++executables will be located at `/bin`. ++ ++``` ++--with-libfabric= ++``` ++ ++Specify the directory where the Libfabric library and header files are ++located. This is necessary if Libfabric was installed in a location ++where the compiler and linker will not search by default. The ++Libfabric library will be searched for in `/lib`, and ++headers will be searched for in `/include`. ++ ++``` ++--with-valgrind= ++``` ++ ++Directory where valgrind is installed. If valgrind is found, then ++valgrind annotations are enabled. This may incur a performance ++penalty. ++ ++### Examples ++ ++Consider the following example: ++ ++``` ++$ ./configure --with-libfabric=/opt/libfabric --prefix=/opt/fabtests && make -j 32 && sudo make install ++``` ++ ++This will tell the Fabtests to look for Libfabric libraries in the ++`/opt/libfabric` tree, and to install the Fabtests in the ++`/opt/fabtests` tree. ++ ++Alternatively: ++ ++``` ++$ ./configure --prefix=/opt/fabtests && make -j 32 && sudo make install ++``` ++ ++Tells the Fabtests that it should be able to find the Libfabric header ++files and libraries in default compiler / linker search paths ++(configure will abort if it is not able to find them), and to install ++Fabtests in `/opt/fabtests`. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/autogen.sh b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/autogen.sh +new file mode 100755 +index 0000000..b717959 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/autogen.sh +@@ -0,0 +1,14 @@ ++#! /bin/sh ++ ++if test ! -d .git && test ! -f common/shared.c; then ++ echo You really need to run this script in the top-level fabtests directory ++ exit 1 ++fi ++ ++set -x ++ ++if test ! -d config; then ++ mkdir config ++fi ++ ++autoreconf -ivf +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.c +new file mode 100644 +index 0000000..ba98bc6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.c +@@ -0,0 +1,320 @@ ++/* ++ * Copyright (c) 2015-2017 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "benchmark_shared.h" ++ ++void ft_parse_benchmark_opts(int op, char *optarg) ++{ ++ switch (op) { ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case 'k': ++ ft_force_prefix(hints, &opts); ++ break; ++ case 'j': ++ hints->tx_attr->inject_size = atoi(optarg); ++ break; ++ case 'W': ++ opts.window_size = atoi(optarg); ++ break; ++ default: ++ break; ++ } ++} ++ ++void ft_benchmark_usage(void) ++{ ++ FT_PRINT_OPTS_USAGE("-v", "enables data_integrity checks"); ++ FT_PRINT_OPTS_USAGE("-k", "force prefix mode"); ++ FT_PRINT_OPTS_USAGE("-j", "maximum inject message size"); ++ FT_PRINT_OPTS_USAGE("-W", "window size* (for bandwidth tests)\n\n" ++ "* The following condition is required to have at least " ++ "one window\nsize # of messsages to be sent: " ++ "# of iterations > window size"); ++} ++ ++int ft_bw_init(void) ++{ ++ if (opts.window_size > 0) { ++ tx_ctx_arr = calloc(opts.window_size, sizeof(struct fi_context)); ++ if (!tx_ctx_arr) ++ return -FI_ENOMEM; ++ } ++ return 0; ++} ++ ++int pingpong(void) ++{ ++ int ret, i; ++ ++ ret = ft_sync(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ for (i = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ if (opts.transfer_size < fi->tx_attr->inject_size) ++ ret = ft_inject(ep, remote_fi_addr, opts.transfer_size); ++ else ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ } else { ++ for (i = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) ++ return ret; ++ ++ if (opts.transfer_size < fi->tx_attr->inject_size) ++ ret = ft_inject(ep, remote_fi_addr, opts.transfer_size); ++ else ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) ++ return ret; ++ } ++ } ++ ft_stop(); ++ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, &start, &end, 2, ++ opts.argc, opts.argv); ++ else ++ show_perf(NULL, opts.transfer_size, opts.iterations, &start, &end, 2); ++ ++ return 0; ++} ++ ++static int bw_tx_comp() ++{ ++ int ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ return ft_rx(ep, 4); ++} ++ ++static int bw_rx_comp() ++{ ++ int ret; ++ ++ /* rx_seq is always one ahead */ ++ ret = ft_get_rx_comp(rx_seq - 1); ++ if (ret) ++ return ret; ++ return ft_tx(ep, remote_fi_addr, 4, &tx_ctx); ++} ++ ++int bandwidth(void) ++{ ++ int ret, i, j; ++ ++ ret = ft_sync(); ++ if (ret) ++ return ret; ++ ++ /* The loop structured allows for the possibility that the sender ++ * immediately overruns the receiving side on the first transfer (or ++ * the entire window). This could result in exercising parts of the ++ * provider's implementation of FI_RM_ENABLED. For better or worse, ++ * some MPI-level benchmarks tend to use this type of loop for measuring ++ * bandwidth. */ ++ ++ if (opts.dst_addr) { ++ for (i = j = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ if (opts.transfer_size < fi->tx_attr->inject_size) ++ ret = ft_inject(ep, remote_fi_addr, opts.transfer_size); ++ else ++ ret = ft_post_tx(ep, remote_fi_addr, opts.transfer_size, ++ NO_CQ_DATA, &tx_ctx_arr[j]); ++ if (ret) ++ return ret; ++ ++ if (++j == opts.window_size) { ++ ret = bw_tx_comp(); ++ if (ret) ++ return ret; ++ j = 0; ++ } ++ } ++ ret = bw_tx_comp(); ++ if (ret) ++ return ret; ++ } else { ++ for (i = j = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ ret = ft_post_rx(ep, opts.transfer_size, &tx_ctx_arr[j]); ++ if (ret) ++ return ret; ++ ++ if (++j == opts.window_size) { ++ ret = bw_rx_comp(); ++ if (ret) ++ return ret; ++ j = 0; ++ } ++ } ++ ret = bw_rx_comp(); ++ if (ret) ++ return ret; ++ } ++ ft_stop(); ++ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, &start, &end, 1, ++ opts.argc, opts.argv); ++ else ++ show_perf(NULL, opts.transfer_size, opts.iterations, &start, &end, 1); ++ ++ return 0; ++} ++ ++static int bw_rma_comp(enum ft_rma_opcodes rma_op) ++{ ++ int ret; ++ ++ if (rma_op == FT_RMA_WRITEDATA) { ++ if (opts.dst_addr) { ++ ret = bw_tx_comp(); ++ } else { ++ ret = bw_rx_comp(); ++ } ++ } else { ++ ret = ft_get_tx_comp(tx_seq); ++ } ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int bandwidth_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote) ++{ ++ int ret, i, j; ++ ++ ret = ft_sync(); ++ if (ret) ++ return ret; ++ ++ for (i = j = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ switch (rma_op) { ++ case FT_RMA_WRITE: ++ if (opts.transfer_size < fi->tx_attr->inject_size) { ++ ret = ft_post_rma_inject(FT_RMA_WRITE, ep, ++ opts.transfer_size, remote); ++ } else { ++ ret = ft_post_rma(rma_op, ep, opts.transfer_size, ++ remote, &tx_ctx_arr[j]); ++ } ++ break; ++ case FT_RMA_WRITEDATA: ++ if (!opts.dst_addr) { ++ if (fi->rx_attr->mode & FI_RX_CQ_DATA) ++ ret = ft_post_rx(ep, 0, &tx_ctx_arr[j]); ++ else ++ /* Just increment the seq # instead of ++ * posting recv so that we wait for ++ * remote write completion on the next ++ * iteration */ ++ rx_seq++; ++ ++ } else { ++ if (opts.transfer_size < fi->tx_attr->inject_size) { ++ ret = ft_post_rma_inject(FT_RMA_WRITEDATA, ++ ep, ++ opts.transfer_size, ++ remote); ++ } else { ++ ret = ft_post_rma(FT_RMA_WRITEDATA, ++ ep, ++ opts.transfer_size, ++ remote, &tx_ctx_arr[j]); ++ } ++ } ++ break; ++ case FT_RMA_READ: ++ ret = ft_post_rma(FT_RMA_READ, ep, opts.transfer_size, ++ remote, &tx_ctx_arr[j]); ++ break; ++ default: ++ FT_ERR("Unknown RMA op type\n"); ++ return EXIT_FAILURE; ++ } ++ if (ret) ++ return ret; ++ ++ if (++j == opts.window_size) { ++ ret = bw_rma_comp(rma_op); ++ if (ret) ++ return ret; ++ j = 0; ++ } ++ } ++ ret = bw_rma_comp(rma_op); ++ if (ret) ++ return ret; ++ ft_stop(); ++ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, &start, &end, 1, ++ opts.argc, opts.argv); ++ else ++ show_perf(NULL, opts.transfer_size, opts.iterations, &start, &end, 1); ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.h +new file mode 100644 +index 0000000..9bc3120 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.h +@@ -0,0 +1,57 @@ ++/* ++ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _BENCHMARK_SHARED_H_ ++#define _BENCHMARK_SHARED_H_ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++#define BENCHMARK_OPTS "vkj:W:" ++#define FT_BENCHMARK_MAX_MSG_SIZE (test_size[TEST_CNT - 1].size) ++ ++void ft_parse_benchmark_opts(int op, char *optarg); ++void ft_benchmark_usage(void); ++int ft_bw_init(void); ++int pingpong(void); ++int bandwidth(void); ++int bandwidth_rma(enum ft_rma_opcodes op, struct fi_rma_iov *remote); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _BENCHMARK_SHARED_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/dgram_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/dgram_pingpong.c +new file mode 100644 +index 0000000..b109cb2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/dgram_pingpong.c +@@ -0,0 +1,130 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2017 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "shared.h" ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ /* Post an extra receive to avoid lacking a posted receive in the ++ * finalize. ++ */ ++ ret = fi_recv(ep, rx_buf, rx_size + ft_rx_prefix_size(), mr_desc, ++ 0, &rx_ctx); ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ ++ opts.transfer_size = test_size[i].size; ++ if (opts.transfer_size > fi->ep_attr->max_msg_size) ++ continue; ++ ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ return ret; ++ } ++ ++ return ft_finalize(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int ret, op; ++ ++ opts = INIT_OPTS; ++ ++ timeout = 5; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "hT:" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != ++ -1) { ++ switch (op) { ++ case 'T': ++ timeout = atoi(optarg); ++ break; ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using UD."); ++ ft_benchmark_usage(); ++ FT_PRINT_OPTS_USAGE("-T ", ++ "seconds before timeout on receive"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_DGRAM; ++ if (opts.options & FT_OPT_SIZE) ++ hints->ep_attr->max_msg_size = opts.transfer_size; ++ hints->caps = FI_MSG; ++ hints->mode |= FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_bw.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_bw.c +new file mode 100644 +index 0000000..c641acc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_bw.c +@@ -0,0 +1,119 @@ ++/* ++ * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ ret = ft_bw_init(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth(); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_BW; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Bandwidth test for MSG endpoints."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_pingpong.c +new file mode 100644 +index 0000000..0c98014 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_pingpong.c +@@ -0,0 +1,115 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "shared.h" ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ ++ ret = ft_finalize(); ++out: ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != ++ -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using message endpoints."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_cntr_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_cntr_pingpong.c +new file mode 100644 +index 0000000..f2f0425 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_cntr_pingpong.c +@@ -0,0 +1,108 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_RX_CNTR | FT_OPT_TX_CNTR; ++ opts.comp_method = FT_COMP_SREAD; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using counters."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_pingpong.c +new file mode 100644 +index 0000000..836a263 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_pingpong.c +@@ -0,0 +1,106 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ return ret; ++ } ++ ++ return ft_finalize(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != ++ -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using RDM."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_bw.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_bw.c +new file mode 100644 +index 0000000..9815a0d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_bw.c +@@ -0,0 +1,113 @@ ++/* ++ * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_bw_init(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth(); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_BW; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Bandwidth test for RDM endpoints using tagged messages."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->caps = FI_TAGGED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_pingpong.c +new file mode 100644 +index 0000000..56ca4e8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_pingpong.c +@@ -0,0 +1,107 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using tagged messages."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_TAGGED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rma_bw.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rma_bw.c +new file mode 100644 +index 0000000..cf073d5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rma_bw.c +@@ -0,0 +1,134 @@ ++/* ++ * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ } else { ++ ret = ft_init_fabric(); ++ } ++ if (ret) ++ return ret; ++ ++ ret = ft_bw_init(); ++ if (ret) ++ return ret; ++ ++ ret = ft_exchange_keys(&remote); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth_rma(opts.rma_op, &remote); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth_rma(opts.rma_op, &remote); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_BW; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ hints->caps = FI_MSG | FI_RMA; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ while ((op = getopt(argc, argv, "ho:" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ ret = ft_parse_rma_opts(op, optarg, hints, &opts); ++ if (ret) ++ return ret; ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Bandwidth test using RMA operations."); ++ ft_benchmark_usage(); ++ FT_PRINT_OPTS_USAGE("-o ", "rma op type: read|write|" ++ "writedata (default: write)\n"); ++ fprintf(stderr, "Note: read/write bw tests are bidirectional.\n" ++ " writedata bw test is unidirectional" ++ " from the client side.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return -ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/jsmn.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/jsmn.c +new file mode 100644 +index 0000000..9fe0fb4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/jsmn.c +@@ -0,0 +1,333 @@ ++/* ++ * Copyright (c) 2010 Serge A. Zaitsev ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to deal ++ * in the Software without restriction, including without limitation the rights ++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ * copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++ * THE SOFTWARE. ++ */ ++ ++#include ++ ++#include "jsmn.h" ++ ++/** ++ * Allocates a fresh unused token from the token pull. ++ */ ++static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, ++ jsmntok_t *tokens, size_t num_tokens) { ++ jsmntok_t *tok; ++ if (parser->toknext >= num_tokens) { ++ return NULL; ++ } ++ tok = &tokens[parser->toknext++]; ++ tok->start = tok->end = -1; ++ tok->size = 0; ++#ifdef JSMN_PARENT_LINKS ++ tok->parent = -1; ++#endif ++ return tok; ++} ++ ++/** ++ * Fills token type and boundaries. ++ */ ++static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, ++ int start, int end) { ++ token->type = type; ++ token->start = start; ++ token->end = end; ++ token->size = 0; ++} ++ ++/** ++ * Fills next available token with JSON primitive. ++ */ ++static jsmnerr_t jsmn_parse_primitive(jsmn_parser *parser, const char *js, ++ size_t len, jsmntok_t *tokens, size_t num_tokens) { ++ jsmntok_t *token; ++ int start; ++ ++ start = parser->pos; ++ ++ for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { ++ switch (js[parser->pos]) { ++#ifndef JSMN_STRICT ++ /* In strict mode primitive must be followed by "," or "}" or "]" */ ++ case ':': ++#endif ++ case '\t' : case '\r' : case '\n' : case ' ' : ++ case ',' : case ']' : case '}' : ++ goto found; ++ } ++ if (js[parser->pos] < 32 || js[parser->pos] >= 127) { ++ parser->pos = start; ++ return JSMN_ERROR_INVAL; ++ } ++ } ++#ifdef JSMN_STRICT ++ /* In strict mode primitive must be followed by a comma/object/array */ ++ parser->pos = start; ++ return JSMN_ERROR_PART; ++#endif ++ ++found: ++ if (tokens == NULL) { ++ parser->pos--; ++ return 0; ++ } ++ token = jsmn_alloc_token(parser, tokens, num_tokens); ++ if (token == NULL) { ++ parser->pos = start; ++ return JSMN_ERROR_NOMEM; ++ } ++ jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos); ++#ifdef JSMN_PARENT_LINKS ++ token->parent = parser->toksuper; ++#endif ++ parser->pos--; ++ return 0; ++} ++ ++/** ++ * Filsl next token with JSON string. ++ */ ++static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js, ++ size_t len, jsmntok_t *tokens, size_t num_tokens) { ++ jsmntok_t *token; ++ ++ int start = parser->pos; ++ ++ parser->pos++; ++ ++ /* Skip starting quote */ ++ for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { ++ char c = js[parser->pos]; ++ ++ /* Quote: end of string */ ++ if (c == '\"') { ++ if (tokens == NULL) { ++ return 0; ++ } ++ token = jsmn_alloc_token(parser, tokens, num_tokens); ++ if (token == NULL) { ++ parser->pos = start; ++ return JSMN_ERROR_NOMEM; ++ } ++ jsmn_fill_token(token, JSMN_STRING, start+1, parser->pos); ++#ifdef JSMN_PARENT_LINKS ++ token->parent = parser->toksuper; ++#endif ++ return 0; ++ } ++ ++ /* Backslash: Quoted symbol expected */ ++ if (c == '\\' && parser->pos + 1 < len) { ++ int i; ++ parser->pos++; ++ switch (js[parser->pos]) { ++ /* Allowed escaped symbols */ ++ case '\"': case '/' : case '\\' : case 'b' : ++ case 'f' : case 'r' : case 'n' : case 't' : ++ break; ++ /* Allows escaped symbol \uXXXX */ ++ case 'u': ++ parser->pos++; ++ for(i = 0; i < 4 && parser->pos < len && js[parser->pos] != '\0'; i++) { ++ /* If it isn't a hex character we have an error */ ++ if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */ ++ (js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */ ++ (js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */ ++ parser->pos = start; ++ return JSMN_ERROR_INVAL; ++ } ++ parser->pos++; ++ } ++ parser->pos--; ++ break; ++ /* Unexpected symbol */ ++ default: ++ parser->pos = start; ++ return JSMN_ERROR_INVAL; ++ } ++ } ++ } ++ parser->pos = start; ++ return JSMN_ERROR_PART; ++} ++ ++/** ++ * Parse JSON string and fill tokens. ++ */ ++jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, ++ jsmntok_t *tokens, unsigned int num_tokens) { ++ jsmnerr_t r; ++ int i; ++ jsmntok_t *token; ++ int count = 0; ++ ++ for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { ++ char c; ++ jsmntype_t type; ++ ++ c = js[parser->pos]; ++ switch (c) { ++ case '{': case '[': ++ count++; ++ if (tokens == NULL) { ++ break; ++ } ++ token = jsmn_alloc_token(parser, tokens, num_tokens); ++ if (token == NULL) ++ return JSMN_ERROR_NOMEM; ++ if (parser->toksuper != -1) { ++ tokens[parser->toksuper].size++; ++#ifdef JSMN_PARENT_LINKS ++ token->parent = parser->toksuper; ++#endif ++ } ++ token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY); ++ token->start = parser->pos; ++ parser->toksuper = parser->toknext - 1; ++ break; ++ case '}': case ']': ++ if (tokens == NULL) ++ break; ++ type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY); ++#ifdef JSMN_PARENT_LINKS ++ if (parser->toknext < 1) { ++ return JSMN_ERROR_INVAL; ++ } ++ token = &tokens[parser->toknext - 1]; ++ for (;;) { ++ if (token->start != -1 && token->end == -1) { ++ if (token->type != type) { ++ return JSMN_ERROR_INVAL; ++ } ++ token->end = parser->pos + 1; ++ parser->toksuper = token->parent; ++ break; ++ } ++ if (token->parent == -1) { ++ break; ++ } ++ token = &tokens[token->parent]; ++ } ++#else ++ for (i = parser->toknext - 1; i >= 0; i--) { ++ token = &tokens[i]; ++ if (token->start != -1 && token->end == -1) { ++ if (token->type != type) { ++ return JSMN_ERROR_INVAL; ++ } ++ parser->toksuper = -1; ++ token->end = parser->pos + 1; ++ break; ++ } ++ } ++ /* Error if unmatched closing bracket */ ++ if (i == -1) return JSMN_ERROR_INVAL; ++ for (; i >= 0; i--) { ++ token = &tokens[i]; ++ if (token->start != -1 && token->end == -1) { ++ parser->toksuper = i; ++ break; ++ } ++ } ++#endif ++ break; ++ case '\"': ++ r = jsmn_parse_string(parser, js, len, tokens, num_tokens); ++ if (r < 0) return r; ++ count++; ++ if (parser->toksuper != -1 && tokens != NULL) ++ tokens[parser->toksuper].size++; ++ break; ++ case '\t' : case '\r' : case '\n' : case ' ': ++ break; ++ case ':': ++ parser->toksuper = parser->toknext - 1; ++ break; ++ case ',': ++ if (tokens != NULL && ++ tokens[parser->toksuper].type != JSMN_ARRAY && ++ tokens[parser->toksuper].type != JSMN_OBJECT) { ++#ifdef JSMN_PARENT_LINKS ++ parser->toksuper = tokens[parser->toksuper].parent; ++#else ++ for (i = parser->toknext - 1; i >= 0; i--) { ++ if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) { ++ if (tokens[i].start != -1 && tokens[i].end == -1) { ++ parser->toksuper = i; ++ break; ++ } ++ } ++ } ++#endif ++ } ++ break; ++#ifdef JSMN_STRICT ++ /* In strict mode primitives are: numbers and booleans */ ++ case '-': case '0': case '1' : case '2': case '3' : case '4': ++ case '5': case '6': case '7' : case '8': case '9': ++ case 't': case 'f': case 'n' : ++ /* And they must not be keys of the object */ ++ if (tokens != NULL) { ++ jsmntok_t *t = &tokens[parser->toksuper]; ++ if (t->type == JSMN_OBJECT || ++ (t->type == JSMN_STRING && t->size != 0)) { ++ return JSMN_ERROR_INVAL; ++ } ++ } ++#else ++ /* In non-strict mode every unquoted value is a primitive */ ++ default: ++#endif ++ r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens); ++ if (r < 0) return r; ++ count++; ++ if (parser->toksuper != -1 && tokens != NULL) ++ tokens[parser->toksuper].size++; ++ break; ++ ++#ifdef JSMN_STRICT ++ /* Unexpected char in strict mode */ ++ default: ++ return JSMN_ERROR_INVAL; ++#endif ++ } ++ } ++ ++ for (i = parser->toknext - 1; i >= 0; i--) { ++ /* Unmatched opened object or array */ ++ if (tokens && tokens[i].start != -1 && tokens[i].end == -1) { ++ return JSMN_ERROR_PART; ++ } ++ } ++ ++ return count; ++} ++ ++/** ++ * Creates a new parser based over a given buffer with an array of tokens ++ * available. ++ */ ++void jsmn_init(jsmn_parser *parser) { ++ parser->pos = 0; ++ parser->toknext = 0; ++ parser->toksuper = -1; ++} ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/osx/osd.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/osx/osd.c +new file mode 100644 +index 0000000..e9f70f0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/osx/osd.c +@@ -0,0 +1,55 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "osx/osd.h" ++#include "config.h" ++ ++/* clock_gettime() does not exist on OS X before the mac OS Sierra release. If ++ * the symbol is not already defined, then define a workaround using ++ * gettimeofday. Ignore the clk_id that is passed in and always return the ++ * system clock time. ++ */ ++#if !HAVE_CLOCK_GETTIME ++int clock_gettime(clockid_t clk_id, struct timespec *tp) { ++ int retval; ++ struct timeval tv; ++ ++ retval = gettimeofday(&tv, NULL); ++ ++ tp->tv_sec = tv.tv_sec; ++ tp->tv_nsec = tv.tv_usec * 1000; ++ ++ return retval; ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/shared.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/shared.c +new file mode 100644 +index 0000000..600b987 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/shared.c +@@ -0,0 +1,3191 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016 Cray Inc. All rights reserved. ++ * Copyright (c) 2014-2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++struct fi_info *fi_pep, *fi, *hints; ++struct fid_fabric *fabric; ++struct fid_wait *waitset; ++struct fid_domain *domain; ++struct fid_poll *pollset; ++struct fid_pep *pep; ++struct fid_ep *ep, *alias_ep; ++struct fid_cq *txcq, *rxcq; ++struct fid_cntr *txcntr, *rxcntr; ++struct fid_mr *mr; ++void *mr_desc = NULL; ++struct fid_av *av; ++struct fid_eq *eq; ++struct fid_mc *mc; ++ ++struct fid_mr no_mr; ++struct fi_context tx_ctx, rx_ctx; ++struct fi_context *tx_ctx_arr = NULL, *rx_ctx_arr = NULL; ++uint64_t remote_cq_data = 0; ++ ++uint64_t tx_seq, rx_seq, tx_cq_cntr, rx_cq_cntr; ++int (*ft_mr_alloc_func)(void); ++uint64_t ft_tag = 0; ++int ft_parent_proc = 0; ++pid_t ft_child_pid = 0; ++int ft_socket_pair[2]; ++ ++fi_addr_t remote_fi_addr = FI_ADDR_UNSPEC; ++char *buf, *tx_buf, *rx_buf; ++size_t buf_size, tx_size, rx_size; ++int rx_fd = -1, tx_fd = -1; ++char default_port[8] = "9228"; ++static char default_oob_port[8] = "3000"; ++const char *greeting = "Hello from Client!"; ++ ++ ++char test_name[50] = "custom"; ++int timeout = -1; ++struct timespec start, end; ++ ++int listen_sock = -1; ++int sock = -1; ++int oob_sock = -1; ++ ++struct fi_av_attr av_attr = { ++ .type = FI_AV_MAP, ++ .count = 1 ++}; ++struct fi_eq_attr eq_attr = { ++ .wait_obj = FI_WAIT_UNSPEC ++}; ++struct fi_cq_attr cq_attr = { ++ .wait_obj = FI_WAIT_NONE ++}; ++struct fi_cntr_attr cntr_attr = { ++ .events = FI_CNTR_EVENTS_COMP, ++ .wait_obj = FI_WAIT_NONE ++}; ++ ++struct fi_rma_iov remote; ++ ++struct ft_opts opts; ++ ++struct test_size_param test_size[] = { ++ { 1 << 0, 0 }, ++ { 1 << 1, 0 }, { (1 << 1) + (1 << 0), 0 }, ++ { 1 << 2, 0 }, { (1 << 2) + (1 << 1), 0 }, ++ { 1 << 3, 0 }, { (1 << 3) + (1 << 2), 0 }, ++ { 1 << 4, 0 }, { (1 << 4) + (1 << 3), 0 }, ++ { 1 << 5, 0 }, { (1 << 5) + (1 << 4), 0 }, ++ { 1 << 6, FT_DEFAULT_SIZE }, { (1 << 6) + (1 << 5), 0 }, ++ { 1 << 7, 0 }, { (1 << 7) + (1 << 6), 0 }, ++ { 1 << 8, FT_DEFAULT_SIZE }, { (1 << 8) + (1 << 7), 0 }, ++ { 1 << 9, 0 }, { (1 << 9) + (1 << 8), 0 }, ++ { 1 << 10, FT_DEFAULT_SIZE }, { (1 << 10) + (1 << 9), 0 }, ++ { 1 << 11, 0 }, { (1 << 11) + (1 << 10), 0 }, ++ { 1 << 12, FT_DEFAULT_SIZE }, { (1 << 12) + (1 << 11), 0 }, ++ { 1 << 13, 0 }, { (1 << 13) + (1 << 12), 0 }, ++ { 1 << 14, 0 }, { (1 << 14) + (1 << 13), 0 }, ++ { 1 << 15, 0 }, { (1 << 15) + (1 << 14), 0 }, ++ { 1 << 16, FT_DEFAULT_SIZE }, { (1 << 16) + (1 << 15), 0 }, ++ { 1 << 17, 0 }, { (1 << 17) + (1 << 16), 0 }, ++ { 1 << 18, 0 }, { (1 << 18) + (1 << 17), 0 }, ++ { 1 << 19, 0 }, { (1 << 19) + (1 << 18), 0 }, ++ { 1 << 20, FT_DEFAULT_SIZE }, { (1 << 20) + (1 << 19), 0 }, ++ { 1 << 21, 0 }, { (1 << 21) + (1 << 20), 0 }, ++ { 1 << 22, 0 }, { (1 << 22) + (1 << 21), 0 }, ++ { 1 << 23, 0 }, ++}; ++ ++const unsigned int test_cnt = (sizeof test_size / sizeof test_size[0]); ++ ++#define INTEG_SEED 7 ++static const char integ_alphabet[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; ++static const int integ_alphabet_length = (sizeof(integ_alphabet)/sizeof(*integ_alphabet)) - 1; ++ ++ ++static int ft_poll_fd(int fd, int timeout) ++{ ++ struct pollfd fds; ++ int ret; ++ ++ fds.fd = fd; ++ fds.events = POLLIN; ++ ret = poll(&fds, 1, timeout); ++ if (ret == -1) { ++ FT_PRINTERR("poll", -errno); ++ ret = -errno; ++ } else if (!ret) { ++ ret = -FI_EAGAIN; ++ } else { ++ ret = 0; ++ } ++ return ret; ++} ++ ++size_t ft_tx_prefix_size(void) ++{ ++ return (fi->tx_attr->mode & FI_MSG_PREFIX) ? ++ fi->ep_attr->msg_prefix_size : 0; ++} ++ ++size_t ft_rx_prefix_size(void) ++{ ++ return (fi->rx_attr->mode & FI_MSG_PREFIX) ? ++ fi->ep_attr->msg_prefix_size : 0; ++} ++ ++int ft_check_opts(uint64_t flags) ++{ ++ return (opts.options & flags) == flags; ++} ++ ++static void ft_cq_set_wait_attr(void) ++{ ++ switch (opts.comp_method) { ++ case FT_COMP_SREAD: ++ cq_attr.wait_obj = FI_WAIT_UNSPEC; ++ cq_attr.wait_cond = FI_CQ_COND_NONE; ++ break; ++ case FT_COMP_WAITSET: ++ assert(waitset); ++ cq_attr.wait_obj = FI_WAIT_SET; ++ cq_attr.wait_cond = FI_CQ_COND_NONE; ++ cq_attr.wait_set = waitset; ++ break; ++ case FT_COMP_WAIT_FD: ++ cq_attr.wait_obj = FI_WAIT_FD; ++ cq_attr.wait_cond = FI_CQ_COND_NONE; ++ break; ++ default: ++ cq_attr.wait_obj = FI_WAIT_NONE; ++ break; ++ } ++} ++ ++static void ft_cntr_set_wait_attr(void) ++{ ++ switch (opts.comp_method) { ++ case FT_COMP_SREAD: ++ cntr_attr.wait_obj = FI_WAIT_UNSPEC; ++ break; ++ case FT_COMP_WAITSET: ++ assert(waitset); ++ cntr_attr.wait_obj = FI_WAIT_SET; ++ break; ++ case FT_COMP_WAIT_FD: ++ cntr_attr.wait_obj = FI_WAIT_FD; ++ break; ++ default: ++ cntr_attr.wait_obj = FI_WAIT_NONE; ++ break; ++ } ++} ++ ++int ft_cntr_open(struct fid_cntr **cntr) ++{ ++ ft_cntr_set_wait_attr(); ++ return fi_cntr_open(domain, &cntr_attr, cntr, cntr); ++} ++ ++static inline int ft_rma_read_target_allowed(uint64_t caps) ++{ ++ if (caps & (FI_RMA | FI_ATOMIC)) { ++ if (caps & FI_REMOTE_READ) ++ return 1; ++ return !(caps & (FI_READ | FI_WRITE | FI_REMOTE_WRITE)); ++ } ++ return 0; ++} ++ ++static inline int ft_rma_write_target_allowed(uint64_t caps) ++{ ++ if (caps & (FI_RMA | FI_ATOMIC)) { ++ if (caps & FI_REMOTE_WRITE) ++ return 1; ++ return !(caps & (FI_READ | FI_WRITE | FI_REMOTE_WRITE)); ++ } ++ return 0; ++} ++ ++static inline int ft_check_mr_local_flag(struct fi_info *info) ++{ ++ return ((info->mode & FI_LOCAL_MR) || ++ (info->domain_attr->mr_mode & FI_MR_LOCAL)); ++} ++ ++uint64_t ft_info_to_mr_access(struct fi_info *info) ++{ ++ uint64_t mr_access = 0; ++ if (ft_check_mr_local_flag(info)) { ++ if (info->caps & (FI_MSG | FI_TAGGED)) { ++ if (info->caps & FT_MSG_MR_ACCESS) { ++ mr_access |= info->caps & FT_MSG_MR_ACCESS; ++ } else { ++ mr_access |= FT_MSG_MR_ACCESS; ++ } ++ } ++ ++ if (info->caps & (FI_RMA | FI_ATOMIC)) { ++ if (info->caps & FT_RMA_MR_ACCESS) { ++ mr_access |= info->caps & FT_RMA_MR_ACCESS; ++ } else { ++ mr_access |= FT_RMA_MR_ACCESS; ++ } ++ } ++ } else { ++ if (info->caps & (FI_RMA | FI_ATOMIC)) { ++ if (ft_rma_read_target_allowed(info->caps)) { ++ mr_access |= FI_REMOTE_READ; ++ } ++ if (ft_rma_write_target_allowed(info->caps)) { ++ mr_access |= FI_REMOTE_WRITE; ++ } ++ } ++ } ++ return mr_access; ++} ++ ++#define bit_isset(x, i) (x >> i & 1) ++#define for_each_bit(x, i) for (i = 0; i < (8 * sizeof(x)); i++) ++ ++static inline int bit_set_count(uint64_t val) ++{ ++ int cnt = 0; ++ while (val) { ++ cnt++; ++ val &= val - 1; ++ } ++ return cnt; ++} ++ ++int ft_alloc_bit_combo(uint64_t fixed, uint64_t opt, ++ uint64_t **combos, int *len) ++{ ++ uint64_t *flags; ++ int i, num_flags; ++ uint64_t index; ++ int ret; ++ ++ num_flags = bit_set_count(opt) + 1; ++ flags = calloc(num_flags, sizeof(fixed)); ++ if (!flags) { ++ perror("calloc"); ++ return -FI_ENOMEM; ++ } ++ ++ *len = 1 << (num_flags - 1); ++ *combos = calloc(*len, sizeof(fixed)); ++ if (!(*combos)) { ++ perror("calloc"); ++ ret = -FI_ENOMEM; ++ goto clean; ++ } ++ ++ num_flags = 0; ++ for_each_bit(opt, i) { ++ if (bit_isset(opt, i)) ++ flags[num_flags++] = 1ULL << i; ++ } ++ ++ for (index = 0; index < (*len); index++) { ++ (*combos)[index] = fixed; ++ for_each_bit(index, i) { ++ if (bit_isset(index, i)) ++ (*combos)[index] |= flags[i]; ++ } ++ } ++ ret = FI_SUCCESS; ++ ++clean: ++ free(flags); ++ return ret; ++} ++ ++void ft_free_bit_combo(uint64_t *combo) ++{ ++ free(combo); ++} ++ ++/* ++ * Include FI_MSG_PREFIX space in the allocated buffer, and ensure that the ++ * buffer is large enough for a control message used to exchange addressing ++ * data. ++ */ ++static int ft_alloc_msgs(void) ++{ ++ int ret; ++ long alignment = 1; ++ ++ if (ft_check_opts(FT_OPT_SKIP_MSG_ALLOC)) ++ return 0; ++ ++ tx_size = opts.options & FT_OPT_SIZE ? ++ opts.transfer_size : test_size[TEST_CNT - 1].size; ++ if (tx_size > fi->ep_attr->max_msg_size) ++ tx_size = fi->ep_attr->max_msg_size; ++ rx_size = tx_size + ft_rx_prefix_size(); ++ tx_size += ft_tx_prefix_size(); ++ buf_size = MAX(tx_size, FT_MAX_CTRL_MSG) + MAX(rx_size, FT_MAX_CTRL_MSG); ++ ++ if (opts.options & FT_OPT_ALIGN) { ++ alignment = sysconf(_SC_PAGESIZE); ++ if (alignment < 0) ++ return -errno; ++ buf_size += alignment; ++ ++ ret = posix_memalign((void **) &buf, (size_t) alignment, ++ buf_size); ++ if (ret) { ++ FT_PRINTERR("posix_memalign", ret); ++ return ret; ++ } ++ } else { ++ buf = malloc(buf_size); ++ if (!buf) { ++ perror("malloc"); ++ return -FI_ENOMEM; ++ } ++ } ++ memset(buf, 0, buf_size); ++ rx_buf = buf; ++ tx_buf = (char *) buf + MAX(rx_size, FT_MAX_CTRL_MSG); ++ tx_buf = (void *) (((uintptr_t) tx_buf + alignment - 1) & ++ ~(alignment - 1)); ++ ++ remote_cq_data = ft_init_cq_data(fi); ++ ++ if (!ft_mr_alloc_func && !ft_check_opts(FT_OPT_SKIP_REG_MR) && ++ ((fi->domain_attr->mr_mode & FI_MR_LOCAL) || ++ (fi->caps & (FI_RMA | FI_ATOMIC)))) { ++ ret = fi_mr_reg(domain, buf, buf_size, ft_info_to_mr_access(fi), ++ 0, FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ mr_desc = ft_check_mr_local_flag(fi) ? fi_mr_desc(mr) : NULL; ++ } else { ++ if (ft_mr_alloc_func) { ++ assert(!ft_check_opts(FT_OPT_SKIP_REG_MR)); ++ ret = ft_mr_alloc_func(); ++ if (ret) ++ return ret; ++ } ++ mr = &no_mr; ++ } ++ ++ return 0; ++} ++ ++int ft_open_fabric_res(void) ++{ ++ int ret; ++ ++ ret = fi_fabric(fi->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_fabric", ret); ++ return ret; ++ } ++ ++ ret = fi_eq_open(fabric, &eq_attr, &eq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_eq_open", ret); ++ return ret; ++ } ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_alloc_ep_res(struct fi_info *fi) ++{ ++ int ret; ++ ++ ret = ft_alloc_msgs(); ++ if (ret) ++ return ret; ++ ++ if (cq_attr.format == FI_CQ_FORMAT_UNSPEC) { ++ if (fi->caps & FI_TAGGED) ++ cq_attr.format = FI_CQ_FORMAT_TAGGED; ++ else ++ cq_attr.format = FI_CQ_FORMAT_CONTEXT; ++ } ++ ++ if (opts.options & FT_OPT_CQ_SHARED) { ++ ft_cq_set_wait_attr(); ++ cq_attr.size = 0; ++ ++ if (opts.tx_cq_size) ++ cq_attr.size += opts.tx_cq_size; ++ else ++ cq_attr.size += fi->tx_attr->size; ++ ++ if (opts.rx_cq_size) ++ cq_attr.size += opts.rx_cq_size; ++ else ++ cq_attr.size += fi->rx_attr->size; ++ ++ ret = fi_cq_open(domain, &cq_attr, &txcq, &txcq); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ rxcq = txcq; ++ } ++ ++ if (!(opts.options & FT_OPT_CQ_SHARED)) { ++ ft_cq_set_wait_attr(); ++ if (opts.tx_cq_size) ++ cq_attr.size = opts.tx_cq_size; ++ else ++ cq_attr.size = fi->tx_attr->size; ++ ++ ret = fi_cq_open(domain, &cq_attr, &txcq, &txcq); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ if (opts.options & FT_OPT_TX_CNTR) { ++ ret = ft_cntr_open(&txcntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ } ++ ++ if (!(opts.options & FT_OPT_CQ_SHARED)) { ++ ft_cq_set_wait_attr(); ++ if (opts.rx_cq_size) ++ cq_attr.size = opts.rx_cq_size; ++ else ++ cq_attr.size = fi->rx_attr->size; ++ ++ ret = fi_cq_open(domain, &cq_attr, &rxcq, &rxcq); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ if (opts.options & FT_OPT_RX_CNTR) { ++ ret = ft_cntr_open(&rxcntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ } ++ ++ if (fi->ep_attr->type == FI_EP_RDM || fi->ep_attr->type == FI_EP_DGRAM) { ++ if (fi->domain_attr->av_type != FI_AV_UNSPEC) ++ av_attr.type = fi->domain_attr->av_type; ++ ++ if (opts.av_name) { ++ av_attr.name = opts.av_name; ++ } ++ av_attr.count = opts.av_size; ++ ret = fi_av_open(domain, &av_attr, &av, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_av_open", ret); ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++int ft_alloc_active_res(struct fi_info *fi) ++{ ++ int ret; ++ ret = ft_alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = fi_endpoint(domain, fi, &ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static void ft_init(void) ++{ ++ tx_seq = 0; ++ rx_seq = 0; ++ tx_cq_cntr = 0; ++ rx_cq_cntr = 0; ++} ++ ++static int ft_init_oob(void) ++{ ++ int ret, op, err; ++ struct addrinfo *ai = NULL; ++ ++ if (!(opts.options & FT_OPT_OOB_SYNC) || oob_sock != -1) ++ return 0; ++ ++ if (!opts.oob_port) ++ opts.oob_port = default_oob_port; ++ ++ if (!opts.dst_addr) { ++ ret = ft_sock_listen(opts.src_addr, opts.oob_port); ++ if (ret) ++ return ret; ++ ++ oob_sock = accept(listen_sock, NULL, 0); ++ if (oob_sock < 0) { ++ perror("accept"); ++ ret = oob_sock; ++ return ret; ++ } ++ ++ close(listen_sock); ++ } else { ++ ++ ret = getaddrinfo(opts.dst_addr, opts.oob_port, NULL, &ai); ++ if (ret) { ++ perror("getaddrinfo"); ++ return ret; ++ } ++ ++ oob_sock = socket(ai->ai_family, SOCK_STREAM, 0); ++ if (oob_sock < 0) { ++ perror("socket"); ++ ret = oob_sock; ++ goto free; ++ } ++ ++ ret = connect(oob_sock, ai->ai_addr, ai->ai_addrlen); ++ if (ret) { ++ perror("connect"); ++ close(oob_sock); ++ goto free; ++ } ++ sleep(1); ++ } ++ ++ op = 1; ++ err = setsockopt(oob_sock, IPPROTO_TCP, TCP_NODELAY, ++ (void *) &op, sizeof(op)); ++ if (err) ++ perror("setsockopt"); /* non-fatal error */ ++ ++free: ++ if (ai) ++ freeaddrinfo(ai); ++ return ret; ++} ++ ++int ft_getinfo(struct fi_info *hints, struct fi_info **info) ++{ ++ char *node, *service; ++ uint64_t flags = 0; ++ int ret; ++ ++ ret = ft_read_addr_opts(&node, &service, hints, &flags, &opts); ++ if (ret) ++ return ret; ++ ++ if (!hints->ep_attr->type) ++ hints->ep_attr->type = FI_EP_RDM; ++ ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, info); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ if (!ft_check_prefix_forced(*info, &opts)) { ++ FT_ERR("Provider disabled requested prefix mode."); ++ return -FI_ENODATA; ++ } ++ ++ return 0; ++} ++ ++int ft_init_fabric_cm(void) ++{ ++ int ret; ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ ++ return ret; ++} ++ ++int ft_start_server(void) ++{ ++ int ret; ++ ++ ft_init(); ++ ret = ft_init_oob(); ++ if (ret) ++ return ret; ++ ++ ret = ft_getinfo(hints, &fi_pep); ++ if (ret) ++ return ret; ++ ++ ret = fi_fabric(fi_pep->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_fabric", ret); ++ return ret; ++ } ++ ++ ret = fi_eq_open(fabric, &eq_attr, &eq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_eq_open", ret); ++ return ret; ++ } ++ ++ ret = fi_passive_ep(fabric, fi_pep, &pep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_passive_ep", ret); ++ return ret; ++ } ++ ++ ret = fi_pep_bind(pep, &eq->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_pep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_listen(pep); ++ if (ret) { ++ FT_PRINTERR("fi_listen", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_complete_connect(struct fid_ep *ep, struct fid_eq *eq) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof(entry), -1, 0); ++ if (rd != sizeof(entry)) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "accept"); ++ ret = (int) rd; ++ return ret; ++ } ++ ++ if (event != FI_CONNECTED || entry.fid != &ep->fid) { ++ fprintf(stderr, "Unexpected CM event %d fid %p (ep %p)\n", ++ event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_retrieve_conn_req(struct fid_eq *eq, struct fi_info **fi) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof(entry), -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "listen"); ++ return (int) rd; ++ } ++ ++ *fi = entry.info; ++ if (event != FI_CONNREQ) { ++ fprintf(stderr, "Unexpected CM event %d\n", event); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_accept_connection(struct fid_ep *ep, struct fid_eq *eq) ++{ ++ int ret; ++ ++ ret = fi_accept(ep, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ return ret; ++ } ++ ++ ret = ft_complete_connect(ep, eq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_server_connect(void) ++{ ++ int ret; ++ ++ ret = ft_retrieve_conn_req(eq, &fi); ++ if (ret) ++ goto err; ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ goto err; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ goto err; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ goto err; ++ ++ ret = ft_accept_connection(ep, eq); ++ if (ret) ++ goto err; ++ ++ return 0; ++ ++err: ++ fi_reject(pep, fi->handle, NULL, 0); ++ return ret; ++} ++ ++int ft_connect_ep(struct fid_ep *ep, ++ struct fid_eq *eq, fi_addr_t *remote_addr) ++{ ++ int ret; ++ ++ ret = fi_connect(ep, remote_addr, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ ret = ft_complete_connect(ep, eq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_client_connect(void) ++{ ++ int ret; ++ ++ ft_init(); ++ ret = ft_init_oob(); ++ if (ret) ++ return ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = ft_connect_ep(ep, eq, fi->dest_addr); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_init_fabric(void) ++{ ++ int ret; ++ ++ ft_init(); ++ ret = ft_init_oob(); ++ if (ret) ++ return ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av(); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_get_cq_fd(struct fid_cq *cq, int *fd) ++{ ++ int ret = FI_SUCCESS; ++ ++ if (cq && opts.comp_method == FT_COMP_WAIT_FD) { ++ ret = fi_control(&cq->fid, FI_GETWAIT, fd); ++ if (ret) ++ FT_PRINTERR("fi_control(FI_GETWAIT)", ret); ++ } ++ ++ return ret; ++} ++ ++int ft_init_alias_ep(uint64_t flags) ++{ ++ int ret; ++ ret = fi_ep_alias(ep, &alias_ep, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_alias", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++int ft_enable_ep(struct fid_ep *ep, struct fid_eq *eq, struct fid_av *av, ++ struct fid_cq *txcq, struct fid_cq *rxcq, ++ struct fid_cntr *txcntr, struct fid_cntr *rxcntr) ++{ ++ uint64_t flags; ++ int ret; ++ ++ if (fi->ep_attr->type == FI_EP_MSG || fi->caps & FI_MULTICAST) ++ FT_EP_BIND(ep, eq, 0); ++ ++ FT_EP_BIND(ep, av, 0); ++ ++ flags = FI_TRANSMIT; ++ if (!(opts.options & FT_OPT_TX_CQ)) ++ flags |= FI_SELECTIVE_COMPLETION; ++ FT_EP_BIND(ep, txcq, flags); ++ ++ flags = FI_RECV; ++ if (!(opts.options & FT_OPT_RX_CQ)) ++ flags |= FI_SELECTIVE_COMPLETION; ++ FT_EP_BIND(ep, rxcq, flags); ++ ++ ret = ft_get_cq_fd(txcq, &tx_fd); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_cq_fd(rxcq, &rx_fd); ++ if (ret) ++ return ret; ++ ++ /* TODO: use control structure to select counter bindings explicitly */ ++ if (opts.options & FT_OPT_TX_CQ) ++ flags = 0; ++ else ++ flags = FI_SEND; ++ if (hints->caps & (FI_WRITE | FI_READ)) ++ flags |= hints->caps & (FI_WRITE | FI_READ); ++ else if (hints->caps & FI_RMA) ++ flags |= FI_WRITE | FI_READ; ++ FT_EP_BIND(ep, txcntr, flags); ++ ++ if (opts.options & FT_OPT_RX_CQ) ++ flags = 0; ++ else ++ flags = FI_RECV; ++ if (hints->caps & (FI_REMOTE_WRITE | FI_REMOTE_READ)) ++ flags |= hints->caps & (FI_REMOTE_WRITE | FI_REMOTE_READ); ++ else if (hints->caps & FI_RMA) ++ flags |= FI_REMOTE_WRITE | FI_REMOTE_READ; ++ FT_EP_BIND(ep, rxcntr, flags); ++ ++ ret = fi_enable(ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_enable_ep_recv(void) ++{ ++ int ret; ++ ++ ret = ft_enable_ep(ep, eq, av, txcq, rxcq, txcntr, rxcntr); ++ if (ret) ++ return ret; ++ ++ if (!ft_check_opts(FT_OPT_SKIP_MSG_ALLOC) && ++ (fi->caps & (FI_MSG | FI_TAGGED))) { ++ /* Initial receive will get remote address for unconnected EPs */ ++ ret = ft_post_rx(ep, MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_join_mc(void) ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ ret = fi_join(ep, fi->dest_addr, 0, &mc, ep->fid.context); ++ if (ret) { ++ FT_PRINTERR("fi_join", ret); ++ return ret; ++ } ++ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "join"); ++ ret = (int) rd; ++ return ret; ++ } ++ ++ if (event != FI_JOIN_COMPLETE || entry.fid != &mc->fid) { ++ fprintf(stderr, "Unexpected join event %d fid %p (mc %p)\n", ++ event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_av_insert(struct fid_av *av, void *addr, size_t count, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ int ret; ++ ++ ret = fi_av_insert(av, addr, count, fi_addr, flags, context); ++ if (ret < 0) { ++ FT_PRINTERR("fi_av_insert", ret); ++ return ret; ++ } else if (ret != count) { ++ FT_ERR("fi_av_insert: number of addresses inserted = %d;" ++ " number of addresses given = %zd\n", ret, count); ++ return -EXIT_FAILURE; ++ } ++ ++ return 0; ++} ++ ++int ft_init_av(void) ++{ ++ return ft_init_av_dst_addr(av, ep, &remote_fi_addr); ++} ++ ++int ft_exchange_addresses_oob(struct fid_av *av_ptr, struct fid_ep *ep_ptr, ++ fi_addr_t *remote_addr) ++{ ++ char buf[FT_MAX_CTRL_MSG]; ++ int ret; ++ size_t addrlen = FT_MAX_CTRL_MSG; ++ ++ ret = fi_getname(&ep_ptr->fid, buf, &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_send(oob_sock, buf, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ ret = ft_sock_recv(oob_sock, buf, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av_ptr, buf, 1, remote_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++/* TODO: retry send for unreliable endpoints */ ++int ft_init_av_dst_addr(struct fid_av *av_ptr, struct fid_ep *ep_ptr, ++ fi_addr_t *remote_addr) ++{ ++ size_t addrlen; ++ int ret; ++ ++ if (opts.oob_port) { ++ ret = ft_exchange_addresses_oob(av_ptr, ep_ptr, remote_addr); ++ if (ret) ++ return ret; ++ else ++ goto set_rx_seq_close; ++ } ++ ++ if (opts.dst_addr) { ++ ret = ft_av_insert(av_ptr, fi->dest_addr, 1, remote_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ addrlen = FT_MAX_CTRL_MSG; ++ ret = fi_getname(&ep_ptr->fid, (char *) tx_buf + ft_tx_prefix_size(), ++ &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = (int) ft_tx(ep, *remote_addr, addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_rx(ep, 1); ++ if (ret) ++ return ret; ++ } else { ++ ret = (int) ft_rx(ep, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ /* Test passing NULL fi_addr on one of the sides (server) if ++ * AV type is FI_AV_TABLE */ ++ ret = ft_av_insert(av_ptr, (char *) rx_buf + ft_rx_prefix_size(), ++ 1, ((fi->domain_attr->av_type == FI_AV_TABLE) ? ++ NULL : remote_addr), 0, NULL); ++ if (ret) ++ return ret; ++ ++ if (fi->domain_attr->av_type == FI_AV_TABLE) ++ *remote_addr = 0; ++ ++ ret = (int) ft_tx(ep, *remote_addr, 1, &tx_ctx); ++ if (ret) ++ return ret; ++ } ++ ++set_rx_seq_close: ++ /* ++ * For a test which does not have MSG or TAGGED ++ * capabilities, but has RMA/Atomics and uses the OOB sync. ++ * If no recv is going to be posted, ++ * then the rx_seq needs to be incremented to wait on the first RMA/Atomic ++ * completion. ++ */ ++ if (!(fi->caps & FI_MSG) && !(fi->caps & FI_TAGGED) && opts.oob_port) ++ rx_seq++; ++ ++ return 0; ++} ++ ++/* TODO: retry send for unreliable endpoints */ ++int ft_init_av_addr(struct fid_av *av_ptr, struct fid_ep *ep_ptr, ++ fi_addr_t *remote_addr) ++{ ++ size_t addrlen; ++ int ret; ++ ++ if (opts.oob_port) ++ return ft_exchange_addresses_oob(av_ptr, ep_ptr, remote_addr); ++ ++ if (opts.dst_addr) { ++ addrlen = FT_MAX_CTRL_MSG; ++ ret = fi_getname(&ep_ptr->fid, (char *) tx_buf + ft_tx_prefix_size(), ++ &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = (int) ft_tx(ep, remote_fi_addr, addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = (int) ft_rx(ep, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av_ptr, (char *) rx_buf + ft_rx_prefix_size(), ++ 1, remote_addr, 0, NULL); ++ if (ret) ++ return ret; ++ } else { ++ ret = (int) ft_rx(ep, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av_ptr, (char *) rx_buf + ft_rx_prefix_size(), ++ 1, remote_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ addrlen = FT_MAX_CTRL_MSG; ++ ret = fi_getname(&ep_ptr->fid, ++ (char *) tx_buf + ft_tx_prefix_size(), ++ &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = (int) ft_tx(ep, remote_fi_addr, addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_exchange_raw_keys(struct fi_rma_iov *peer_iov) ++{ ++ struct fi_rma_iov *rma_iov; ++ size_t key_size; ++ size_t len; ++ uint64_t addr; ++ int ret; ++ ++ /* Get key size */ ++ key_size = 0; ++ ret = fi_mr_raw_attr(mr, &addr, NULL, &key_size, 0); ++ if (ret != -FI_ETOOSMALL) { ++ return ret; ++ } ++ ++ len = sizeof(*rma_iov) + key_size - sizeof(rma_iov->key); ++ /* TODO: make sure this fits in tx_buf and rx_buf */ ++ ++ if (opts.dst_addr) { ++ rma_iov = (struct fi_rma_iov *) (tx_buf + ft_tx_prefix_size()); ++ if ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR)) { ++ rma_iov->addr = (uintptr_t) rx_buf + ft_rx_prefix_size(); ++ } else { ++ rma_iov->addr = 0; ++ } ++ ++ /* Get raw attributes */ ++ ret = fi_mr_raw_attr(mr, &addr, (uint8_t *) &rma_iov->key, ++ &key_size, 0); ++ if (ret) ++ return ret; ++ ++ ret = ft_tx(ep, remote_fi_addr, len, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (rx_buf + ft_rx_prefix_size()); ++ peer_iov->addr = rma_iov->addr; ++ peer_iov->len = rma_iov->len; ++ /* Map remote mr raw locally */ ++ ret = fi_mr_map_raw(domain, rma_iov->addr, ++ (uint8_t *) &rma_iov->key, key_size, ++ &peer_iov->key, 0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ } else { ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (rx_buf + ft_rx_prefix_size()); ++ peer_iov->addr = rma_iov->addr; ++ peer_iov->len = rma_iov->len; ++ /* Map remote mr raw locally */ ++ ret = fi_mr_map_raw(domain, rma_iov->addr, ++ (uint8_t *) &rma_iov->key, key_size, ++ &peer_iov->key, 0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (tx_buf + ft_tx_prefix_size()); ++ if ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR)) { ++ rma_iov->addr = (uintptr_t) rx_buf + ft_rx_prefix_size(); ++ } else { ++ rma_iov->addr = 0; ++ } ++ ++ /* Get raw attributes */ ++ ret = fi_mr_raw_attr(mr, &addr, (uint8_t *) &rma_iov->key, ++ &key_size, 0); ++ if (ret) ++ return ret; ++ ++ ret = ft_tx(ep, remote_fi_addr, len, &tx_ctx); ++ } ++ ++ return ret; ++} ++ ++int ft_exchange_keys(struct fi_rma_iov *peer_iov) ++{ ++ struct fi_rma_iov *rma_iov; ++ int ret; ++ ++ if (fi->domain_attr->mr_mode & FI_MR_RAW) ++ return ft_exchange_raw_keys(peer_iov); ++ ++ if (opts.dst_addr) { ++ rma_iov = (struct fi_rma_iov *) (tx_buf + ft_tx_prefix_size()); ++ if ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR)) { ++ rma_iov->addr = (uintptr_t) rx_buf + ft_rx_prefix_size(); ++ } else { ++ rma_iov->addr = 0; ++ } ++ rma_iov->key = fi_mr_key(mr); ++ ret = ft_tx(ep, remote_fi_addr, sizeof *rma_iov, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (rx_buf + ft_rx_prefix_size()); ++ *peer_iov = *rma_iov; ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ } else { ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (rx_buf + ft_rx_prefix_size()); ++ *peer_iov = *rma_iov; ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (tx_buf + ft_tx_prefix_size()); ++ if ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR)) { ++ rma_iov->addr = (uintptr_t) rx_buf + ft_rx_prefix_size(); ++ } else { ++ rma_iov->addr = 0; ++ } ++ rma_iov->key = fi_mr_key(mr); ++ ret = ft_tx(ep, remote_fi_addr, sizeof *rma_iov, &tx_ctx); ++ } ++ ++ return ret; ++} ++ ++static void ft_close_fids(void) ++{ ++ if (mr != &no_mr) ++ FT_CLOSE_FID(mr); ++ FT_CLOSE_FID(mc); ++ FT_CLOSE_FID(alias_ep); ++ FT_CLOSE_FID(ep); ++ FT_CLOSE_FID(pep); ++ if (opts.options & FT_OPT_CQ_SHARED) { ++ FT_CLOSE_FID(txcq); ++ } else { ++ FT_CLOSE_FID(rxcq); ++ FT_CLOSE_FID(txcq); ++ } ++ FT_CLOSE_FID(rxcntr); ++ FT_CLOSE_FID(txcntr); ++ FT_CLOSE_FID(pollset); ++ FT_CLOSE_FID(av); ++ FT_CLOSE_FID(eq); ++ FT_CLOSE_FID(domain); ++ FT_CLOSE_FID(waitset); ++ FT_CLOSE_FID(fabric); ++} ++ ++void ft_free_res(void) ++{ ++ ft_close_fids(); ++ ++ free(tx_ctx_arr); ++ free(rx_ctx_arr); ++ tx_ctx_arr = NULL; ++ rx_ctx_arr = NULL; ++ ++ if (buf) { ++ free(buf); ++ buf = rx_buf = tx_buf = NULL; ++ buf_size = rx_size = tx_size = 0; ++ } ++ if (fi_pep) { ++ fi_freeinfo(fi_pep); ++ fi_pep = NULL; ++ } ++ if (fi) { ++ fi_freeinfo(fi); ++ fi = NULL; ++ } ++ if (hints) { ++ fi_freeinfo(hints); ++ hints = NULL; ++ } ++} ++ ++static int dupaddr(void **dst_addr, size_t *dst_addrlen, ++ void *src_addr, size_t src_addrlen) ++{ ++ *dst_addr = malloc(src_addrlen); ++ if (!*dst_addr) { ++ FT_ERR("address allocation failed"); ++ return EAI_MEMORY; ++ } ++ *dst_addrlen = src_addrlen; ++ memcpy(*dst_addr, src_addr, src_addrlen); ++ return 0; ++} ++ ++static int getaddr(char *node, char *service, ++ struct fi_info *hints, uint64_t flags) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ if (!node && !service) { ++ if (flags & FI_SOURCE) { ++ hints->src_addr = NULL; ++ hints->src_addrlen = 0; ++ } else { ++ hints->dest_addr = NULL; ++ hints->dest_addrlen = 0; ++ } ++ return 0; ++ } ++ ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ hints->addr_format = fi->addr_format; ++ ++ if (flags & FI_SOURCE) { ++ ret = dupaddr(&hints->src_addr, &hints->src_addrlen, ++ fi->src_addr, fi->src_addrlen); ++ } else { ++ ret = dupaddr(&hints->dest_addr, &hints->dest_addrlen, ++ fi->dest_addr, fi->dest_addrlen); ++ } ++ ++ fi_freeinfo(fi); ++ return ret; ++} ++ ++int ft_getsrcaddr(char *node, char *service, struct fi_info *hints) ++{ ++ return getaddr(node, service, hints, FI_SOURCE); ++} ++ ++int ft_read_addr_opts(char **node, char **service, struct fi_info *hints, ++ uint64_t *flags, struct ft_opts *opts) ++{ ++ int ret; ++ ++ if (opts->dst_addr) { ++ if (!opts->dst_port) ++ opts->dst_port = default_port; ++ ++ ret = ft_getsrcaddr(opts->src_addr, opts->src_port, hints); ++ if (ret) ++ return ret; ++ *node = opts->dst_addr; ++ *service = opts->dst_port; ++ } else { ++ if (!opts->src_port) ++ opts->src_port = default_port; ++ ++ *node = opts->src_addr; ++ *service = opts->src_port; ++ *flags = FI_SOURCE; ++ } ++ ++ return 0; ++} ++ ++char *size_str(char str[FT_STR_LEN], long long size) ++{ ++ long long base, fraction = 0; ++ char mag; ++ ++ memset(str, '\0', FT_STR_LEN); ++ ++ if (size >= (1 << 30)) { ++ base = 1 << 30; ++ mag = 'g'; ++ } else if (size >= (1 << 20)) { ++ base = 1 << 20; ++ mag = 'm'; ++ } else if (size >= (1 << 10)) { ++ base = 1 << 10; ++ mag = 'k'; ++ } else { ++ base = 1; ++ mag = '\0'; ++ } ++ ++ if (size / base < 10) ++ fraction = (size % base) * 10 / base; ++ ++ if (fraction) ++ snprintf(str, FT_STR_LEN, "%lld.%lld%c", size / base, fraction, mag); ++ else ++ snprintf(str, FT_STR_LEN, "%lld%c", size / base, mag); ++ ++ return str; ++} ++ ++char *cnt_str(char str[FT_STR_LEN], long long cnt) ++{ ++ if (cnt >= 1000000000) ++ snprintf(str, FT_STR_LEN, "%lldb", cnt / 1000000000); ++ else if (cnt >= 1000000) ++ snprintf(str, FT_STR_LEN, "%lldm", cnt / 1000000); ++ else if (cnt >= 1000) ++ snprintf(str, FT_STR_LEN, "%lldk", cnt / 1000); ++ else ++ snprintf(str, FT_STR_LEN, "%lld", cnt); ++ ++ return str; ++} ++ ++int size_to_count(int size) ++{ ++ if (size >= (1 << 20)) ++ return (opts.options & FT_OPT_BW) ? 200 : 100; ++ else if (size >= (1 << 16)) ++ return (opts.options & FT_OPT_BW) ? 2000 : 1000; ++ else ++ return (opts.options & FT_OPT_BW) ? 20000: 10000; ++} ++ ++static const size_t datatype_size_table[] = { ++ [FI_INT8] = sizeof(int8_t), ++ [FI_UINT8] = sizeof(uint8_t), ++ [FI_INT16] = sizeof(int16_t), ++ [FI_UINT16] = sizeof(uint16_t), ++ [FI_INT32] = sizeof(int32_t), ++ [FI_UINT32] = sizeof(uint32_t), ++ [FI_INT64] = sizeof(int64_t), ++ [FI_UINT64] = sizeof(uint64_t), ++ [FI_FLOAT] = sizeof(float), ++ [FI_DOUBLE] = sizeof(double), ++ [FI_FLOAT_COMPLEX] = sizeof(OFI_COMPLEX(float)), ++ [FI_DOUBLE_COMPLEX] = sizeof(OFI_COMPLEX(double)), ++ [FI_LONG_DOUBLE] = sizeof(long double), ++ [FI_LONG_DOUBLE_COMPLEX] = sizeof(OFI_COMPLEX(long_double)), ++}; ++ ++size_t datatype_to_size(enum fi_datatype datatype) ++{ ++ if (datatype >= FI_DATATYPE_LAST) ++ return 0; ++ ++ return datatype_size_table[datatype]; ++} ++ ++void init_test(struct ft_opts *opts, char *test_name, size_t test_name_len) ++{ ++ char sstr[FT_STR_LEN]; ++ ++ size_str(sstr, opts->transfer_size); ++ if (!strcmp(test_name, "custom")) ++ snprintf(test_name, test_name_len, "%s_lat", sstr); ++ if (!(opts->options & FT_OPT_ITER)) ++ opts->iterations = size_to_count(opts->transfer_size); ++} ++ ++static int ft_progress(struct fid_cq *cq, uint64_t total, uint64_t *cq_cntr) ++{ ++ struct fi_cq_err_entry comp; ++ int ret; ++ ++ ret = fi_cq_read(cq, &comp, 1); ++ if (ret > 0) ++ (*cq_cntr)++; ++ ++ if (ret >= 0 || ret == -FI_EAGAIN) ++ return 0; ++ ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(cq); ++ (*cq_cntr)++; ++ } else { ++ FT_PRINTERR("fi_cq_read/sread", ret); ++ } ++ return ret; ++} ++ ++#define FT_POST(post_fn, progress_fn, cq, seq, cq_cntr, op_str, ...) \ ++ do { \ ++ int timeout_save; \ ++ int ret, rc; \ ++ \ ++ while (1) { \ ++ ret = post_fn(__VA_ARGS__); \ ++ if (!ret) \ ++ break; \ ++ \ ++ if (ret != -FI_EAGAIN) { \ ++ FT_PRINTERR(op_str, ret); \ ++ return ret; \ ++ } \ ++ \ ++ timeout_save = timeout; \ ++ timeout = 0; \ ++ rc = progress_fn(cq, seq, cq_cntr); \ ++ if (rc && rc != -FI_EAGAIN) { \ ++ FT_ERR("Failed to get " op_str " completion"); \ ++ return rc; \ ++ } \ ++ timeout = timeout_save; \ ++ } \ ++ seq++; \ ++ } while (0) ++ ++ssize_t ft_post_tx_buf(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, ++ uint64_t data, struct fi_context* ctx, ++ void *op_buf, void *op_mr_desc, uint64_t op_tag) ++{ ++ size += ft_tx_prefix_size(); ++ if (hints->caps & FI_TAGGED) { ++ op_tag = op_tag ? op_tag : tx_seq; ++ if (data != NO_CQ_DATA) { ++ FT_POST(fi_tsenddata, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "transmit", ep, op_buf, size, ++ op_mr_desc, data, fi_addr, op_tag, ctx); ++ } else { ++ FT_POST(fi_tsend, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "transmit", ep, op_buf, size, ++ op_mr_desc, fi_addr, op_tag, ctx); ++ } ++ } else { ++ if (data != NO_CQ_DATA) { ++ FT_POST(fi_senddata, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "transmit", ep, op_buf, size, ++ op_mr_desc, data, fi_addr, ctx); ++ ++ } else { ++ FT_POST(fi_send, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "transmit", ep, op_buf, size, ++ op_mr_desc, fi_addr, ctx); ++ } ++ } ++ return 0; ++} ++ ++ssize_t ft_post_tx(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, ++ uint64_t data, struct fi_context* ctx) ++{ ++ return ft_post_tx_buf(ep, fi_addr, size, data, ++ ctx, tx_buf, mr_desc, ft_tag); ++} ++ ++ssize_t ft_tx(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, struct fi_context *ctx) ++{ ++ ssize_t ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA | FT_OPT_ACTIVE)) ++ ft_fill_buf((char *) tx_buf + ft_tx_prefix_size(), size); ++ ++ ret = ft_post_tx(ep, fi_addr, size, NO_CQ_DATA, ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ return ret; ++} ++ ++ssize_t ft_post_inject(struct fid_ep *ep, fi_addr_t fi_addr, size_t size) ++{ ++ if (hints->caps & FI_TAGGED) { ++ FT_POST(fi_tinject, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "inject", ep, tx_buf, size + ft_tx_prefix_size(), ++ fi_addr, tx_seq); ++ } else { ++ FT_POST(fi_inject, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "inject", ep, tx_buf, size + ft_tx_prefix_size(), ++ fi_addr); ++ } ++ ++ tx_cq_cntr++; ++ return 0; ++} ++ ++ssize_t ft_inject(struct fid_ep *ep, fi_addr_t fi_addr, size_t size) ++{ ++ ssize_t ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA | FT_OPT_ACTIVE)) ++ ft_fill_buf((char *) tx_buf + ft_tx_prefix_size(), size); ++ ++ ret = ft_post_inject(ep, fi_addr, size); ++ if (ret) ++ return ret; ++ ++ return ret; ++} ++ ++ssize_t ft_post_rma(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote, void *context) ++{ ++ switch (op) { ++ case FT_RMA_WRITE: ++ FT_POST(fi_write, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_write", ep, tx_buf, opts.transfer_size, mr_desc, ++ remote_fi_addr, remote->addr, remote->key, context); ++ break; ++ case FT_RMA_WRITEDATA: ++ FT_POST(fi_writedata, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_writedata", ep, tx_buf, opts.transfer_size, mr_desc, ++ remote_cq_data, remote_fi_addr, remote->addr, ++ remote->key, context); ++ break; ++ case FT_RMA_READ: ++ FT_POST(fi_read, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_read", ep, rx_buf, opts.transfer_size, mr_desc, ++ remote_fi_addr, remote->addr,remote->key, context); ++ break; ++ default: ++ FT_ERR("Unknown RMA op type\n"); ++ return EXIT_FAILURE; ++ } ++ ++ return 0; ++} ++ ++ssize_t ft_rma(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote, void *context) ++{ ++ int ret; ++ ++ ret = ft_post_rma(op, ep, size, remote, context); ++ if (ret) ++ return ret; ++ ++ if (op == FT_RMA_WRITEDATA) { ++ if (fi->rx_attr->mode & FI_RX_CQ_DATA) { ++ ret = ft_rx(ep, 0); ++ } else { ++ ret = ft_get_rx_comp(rx_seq); ++ /* Just increment the seq # instead of posting recv so ++ * that we wait for remote write completion on the next ++ * iteration. */ ++ rx_seq++; ++ } ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++ssize_t ft_post_rma_inject(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote) ++{ ++ switch (op) { ++ case FT_RMA_WRITE: ++ FT_POST(fi_inject_write, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_inject_write", ep, tx_buf, opts.transfer_size, ++ remote_fi_addr, remote->addr, remote->key); ++ break; ++ case FT_RMA_WRITEDATA: ++ FT_POST(fi_inject_writedata, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "fi_inject_writedata", ep, tx_buf, ++ opts.transfer_size, remote_cq_data, remote_fi_addr, ++ remote->addr, remote->key); ++ break; ++ default: ++ FT_ERR("Unknown RMA inject op type\n"); ++ return EXIT_FAILURE; ++ } ++ ++ tx_cq_cntr++; ++ return 0; ++} ++ ++ssize_t ft_post_atomic(enum ft_atomic_opcodes opcode, struct fid_ep *ep, ++ void *compare, void *compare_desc, void *result, ++ void *result_desc, struct fi_rma_iov *remote, ++ enum fi_datatype datatype, enum fi_op atomic_op, ++ void *context) ++{ ++ size_t size, count; ++ ++ size = datatype_to_size(datatype); ++ if (!size) { ++ FT_ERR("Unknown datatype\n"); ++ return EXIT_FAILURE; ++ } ++ count = opts.transfer_size / size; ++ ++ switch (opcode) { ++ case FT_ATOMIC_BASE: ++ FT_POST(fi_atomic, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_atomic", ep, buf, count, mr_desc, remote_fi_addr, ++ remote->addr, remote->key, datatype, atomic_op, context); ++ break; ++ case FT_ATOMIC_FETCH: ++ FT_POST(fi_fetch_atomic, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_fetch_atomic", ep, buf, count, mr_desc, result, ++ result_desc, remote_fi_addr, remote->addr, remote->key, ++ datatype, atomic_op, context); ++ break; ++ case FT_ATOMIC_COMPARE: ++ FT_POST(fi_compare_atomic, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "fi_compare_atomic", ep, buf, count, ++ mr_desc, compare, compare_desc, result, result_desc, ++ remote_fi_addr, remote->addr, remote->key, datatype, ++ atomic_op, context); ++ break; ++ default: ++ FT_ERR("Unknown atomic opcode\n"); ++ return EXIT_FAILURE; ++ } ++ ++ return 0; ++} ++ ++static int check_atomic_attr(enum fi_op op, enum fi_datatype datatype, ++ uint64_t flags) ++{ ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = fi_query_atomic(domain, datatype, op, &attr, flags); ++ if (ret) { ++ FT_PRINTERR("fi_query_atomic", ret); ++ return ret; ++ } ++ ++ if (attr.size != datatype_to_size(datatype)) { ++ fprintf(stderr, "Provider atomic size mismatch\n"); ++ return -FI_ENOSYS; ++ } ++ ++ return 0; ++} ++ ++int check_base_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count) ++{ ++ int ret; ++ ++ ret = fi_atomicvalid(endpoint, datatype, op, count); ++ if (ret) ++ return ret; ++ ++ return check_atomic_attr(op, datatype, 0); ++} ++ ++int check_fetch_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count) ++{ ++ int ret; ++ ++ ret = fi_fetch_atomicvalid(endpoint, datatype, op, count); ++ if (ret) ++ return ret; ++ ++ return check_atomic_attr(op, datatype, FI_FETCH_ATOMIC); ++} ++ ++int check_compare_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count) ++{ ++ int ret; ++ ++ ret = fi_compare_atomicvalid(endpoint, datatype, op, count); ++ if (ret) ++ return ret; ++ ++ return check_atomic_attr(op, datatype, FI_COMPARE_ATOMIC); ++} ++ ++ssize_t ft_post_rx_buf(struct fid_ep *ep, size_t size, struct fi_context* ctx, ++ void *op_buf, void *op_mr_desc, uint64_t op_tag) ++{ ++ size = MAX(size, FT_MAX_CTRL_MSG) + ft_rx_prefix_size(); ++ if (hints->caps & FI_TAGGED) { ++ op_tag = op_tag ? op_tag : rx_seq; ++ FT_POST(fi_trecv, ft_progress, rxcq, rx_seq, &rx_cq_cntr, ++ "receive", ep, op_buf, size, op_mr_desc, 0, op_tag, ++ 0, ctx); ++ } else { ++ FT_POST(fi_recv, ft_progress, rxcq, rx_seq, &rx_cq_cntr, ++ "receive", ep, op_buf, size, op_mr_desc, 0, ctx); ++ } ++ return 0; ++} ++ ++ssize_t ft_post_rx(struct fid_ep *ep, size_t size, struct fi_context* ctx) ++{ ++ return ft_post_rx_buf(ep, size, ctx, rx_buf, mr_desc, ft_tag); ++} ++ ++ssize_t ft_rx(struct fid_ep *ep, size_t size) ++{ ++ ssize_t ret; ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA | FT_OPT_ACTIVE)) { ++ ret = ft_check_buf((char *) rx_buf + ft_rx_prefix_size(), size); ++ if (ret) ++ return ret; ++ } ++ /* TODO: verify CQ data, if available */ ++ ++ /* Ignore the size arg. Post a buffer large enough to handle all message ++ * sizes. ft_sync() makes use of ft_rx() and gets called in tests just before ++ * message size is updated. The recvs posted are always for the next incoming ++ * message */ ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ return ret; ++} ++ ++/* ++ * Received messages match tagged buffers in order, but the completions can be ++ * reported out of order. A tag is valid if it's within the current window. ++ */ ++static inline int ++ft_tag_is_valid(struct fid_cq * cq, struct fi_cq_err_entry *comp, uint64_t tag) ++{ ++ int valid = 1; ++ ++ if ((hints->caps & FI_TAGGED) && (cq == rxcq)) { ++ if (opts.options & FT_OPT_BW) { ++ /* valid: (tag - window) < comp->tag < (tag + window) */ ++ valid = (tag < comp->tag + opts.window_size) && ++ (comp->tag < tag + opts.window_size); ++ } else { ++ valid = (comp->tag == tag); ++ } ++ ++ if (!valid) { ++ FT_ERR("Tag mismatch!. Expected: %"PRIu64", actual: %" ++ PRIu64, tag, comp->tag); ++ } ++ } ++ ++ return valid; ++} ++/* ++ * fi_cq_err_entry can be cast to any CQ entry format. ++ */ ++static int ft_spin_for_comp(struct fid_cq *cq, uint64_t *cur, ++ uint64_t total, int timeout) ++{ ++ struct fi_cq_err_entry comp; ++ struct timespec a, b; ++ int ret; ++ ++ if (timeout >= 0) ++ clock_gettime(CLOCK_MONOTONIC, &a); ++ ++ do { ++ ret = fi_cq_read(cq, &comp, 1); ++ if (ret > 0) { ++ if (timeout >= 0) ++ clock_gettime(CLOCK_MONOTONIC, &a); ++ if (!ft_tag_is_valid(cq, &comp, ft_tag ? ft_tag : rx_cq_cntr)) ++ return -FI_EOTHER; ++ (*cur)++; ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ return ret; ++ } else if (timeout >= 0) { ++ clock_gettime(CLOCK_MONOTONIC, &b); ++ if ((b.tv_sec - a.tv_sec) > timeout) { ++ fprintf(stderr, "%ds timeout expired\n", timeout); ++ return -FI_ENODATA; ++ } ++ } ++ } while (total - *cur > 0); ++ ++ return 0; ++} ++ ++/* ++ * fi_cq_err_entry can be cast to any CQ entry format. ++ */ ++static int ft_wait_for_comp(struct fid_cq *cq, uint64_t *cur, ++ uint64_t total, int timeout) ++{ ++ struct fi_cq_err_entry comp; ++ int ret; ++ ++ while (total - *cur > 0) { ++ ret = fi_cq_sread(cq, &comp, 1, NULL, timeout); ++ if (ret > 0) { ++ if (!ft_tag_is_valid(cq, &comp, ft_tag ? ft_tag : rx_cq_cntr)) ++ return -FI_EOTHER; ++ (*cur)++; ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++/* ++ * fi_cq_err_entry can be cast to any CQ entry format. ++ */ ++static int ft_fdwait_for_comp(struct fid_cq *cq, uint64_t *cur, ++ uint64_t total, int timeout) ++{ ++ struct fi_cq_err_entry comp; ++ struct fid *fids[1]; ++ int fd, ret; ++ ++ fd = cq == txcq ? tx_fd : rx_fd; ++ fids[0] = &cq->fid; ++ ++ while (total - *cur > 0) { ++ ret = fi_trywait(fabric, fids, 1); ++ if (ret == FI_SUCCESS) { ++ ret = ft_poll_fd(fd, timeout); ++ if (ret && ret != -FI_EAGAIN) ++ return ret; ++ } ++ ++ ret = fi_cq_read(cq, &comp, 1); ++ if (ret > 0) { ++ if (!ft_tag_is_valid(cq, &comp, ft_tag ? ft_tag : rx_cq_cntr)) ++ return -FI_EOTHER; ++ (*cur)++; ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int ft_get_cq_comp(struct fid_cq *cq, uint64_t *cur, ++ uint64_t total, int timeout) ++{ ++ int ret; ++ ++ switch (opts.comp_method) { ++ case FT_COMP_SREAD: ++ ret = ft_wait_for_comp(cq, cur, total, timeout); ++ break; ++ case FT_COMP_WAIT_FD: ++ ret = ft_fdwait_for_comp(cq, cur, total, timeout); ++ break; ++ default: ++ ret = ft_spin_for_comp(cq, cur, total, timeout); ++ break; ++ } ++ ++ if (ret) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(cq); ++ (*cur)++; ++ } else { ++ FT_PRINTERR("ft_get_cq_comp", ret); ++ } ++ } ++ return ret; ++} ++ ++static int ft_spin_for_cntr(struct fid_cntr *cntr, uint64_t total, int timeout) ++{ ++ struct timespec a, b; ++ uint64_t cur; ++ ++ if (timeout >= 0) ++ clock_gettime(CLOCK_MONOTONIC, &a); ++ ++ for (;;) { ++ cur = fi_cntr_read(cntr); ++ if (cur >= total) ++ return 0; ++ ++ if (timeout >= 0) { ++ clock_gettime(CLOCK_MONOTONIC, &b); ++ if ((b.tv_sec - a.tv_sec) > timeout) ++ break; ++ } ++ } ++ ++ fprintf(stderr, "%ds timeout expired\n", timeout); ++ return -FI_ENODATA; ++} ++ ++static int ft_wait_for_cntr(struct fid_cntr *cntr, uint64_t total, int timeout) ++{ ++ int ret; ++ ++ while (fi_cntr_read(cntr) < total) { ++ ret = fi_cntr_wait(cntr, total, timeout); ++ if (ret) ++ FT_PRINTERR("fi_cntr_wait", ret); ++ else ++ break; ++ } ++ return 0; ++} ++ ++static int ft_get_cntr_comp(struct fid_cntr *cntr, uint64_t total, int timeout) ++{ ++ int ret = 0; ++ ++ switch (opts.comp_method) { ++ case FT_COMP_SREAD: ++ case FT_COMP_WAITSET: ++ case FT_COMP_WAIT_FD: ++ ret = ft_wait_for_cntr(cntr, total, timeout); ++ break; ++ default: ++ ret = ft_spin_for_cntr(cntr, total, timeout); ++ break; ++ } ++ ++ if (ret) ++ FT_PRINTERR("fs_get_cntr_comp", ret); ++ ++ return ret; ++} ++ ++int ft_get_rx_comp(uint64_t total) ++{ ++ int ret = FI_SUCCESS; ++ ++ if (opts.options & FT_OPT_RX_CQ) { ++ ret = ft_get_cq_comp(rxcq, &rx_cq_cntr, total, timeout); ++ } else if (rxcntr) { ++ ret = ft_get_cntr_comp(rxcntr, total, timeout); ++ } else { ++ FT_ERR("Trying to get a RX completion when no RX CQ or counter were opened"); ++ ret = -FI_EOTHER; ++ } ++ return ret; ++} ++ ++int ft_get_tx_comp(uint64_t total) ++{ ++ int ret; ++ ++ if (opts.options & FT_OPT_TX_CQ) { ++ ret = ft_get_cq_comp(txcq, &tx_cq_cntr, total, -1); ++ } else if (txcntr) { ++ ret = ft_get_cntr_comp(txcntr, total, -1); ++ } else { ++ FT_ERR("Trying to get a TX completion when no TX CQ or counter were opened"); ++ ret = -FI_EOTHER; ++ } ++ return ret; ++} ++ ++int ft_sendmsg(struct fid_ep *ep, fi_addr_t fi_addr, ++ size_t size, struct fi_context *ctx, int flags) ++{ ++ int ret; ++ struct fi_msg msg; ++ struct fi_msg_tagged tagged_msg; ++ struct iovec msg_iov; ++ ++ msg_iov.iov_base = tx_buf; ++ msg_iov.iov_len = size; ++ ++ if (hints->caps & FI_TAGGED) { ++ tagged_msg.msg_iov = &msg_iov; ++ tagged_msg.desc = &mr_desc; ++ tagged_msg.iov_count = 1; ++ tagged_msg.addr = fi_addr; ++ tagged_msg.data = NO_CQ_DATA; ++ tagged_msg.context = ctx; ++ tagged_msg.tag = ft_tag ? ft_tag : tx_seq; ++ tagged_msg.ignore = 0; ++ ++ ret = fi_tsendmsg(ep, &tagged_msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_tsendmsg", ret); ++ return ret; ++ } ++ } else { ++ msg.msg_iov = &msg_iov; ++ msg.desc = &mr_desc; ++ msg.iov_count = 1; ++ msg.addr = fi_addr; ++ msg.data = NO_CQ_DATA; ++ msg.context = ctx; ++ ++ ret = fi_sendmsg(ep, &msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_sendmsg", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++int ft_recvmsg(struct fid_ep *ep, fi_addr_t fi_addr, ++ size_t size, struct fi_context *ctx, int flags) ++{ ++ int ret; ++ struct fi_msg msg; ++ struct fi_msg_tagged tagged_msg; ++ struct iovec msg_iov; ++ ++ msg_iov.iov_base = rx_buf; ++ msg_iov.iov_len = size; ++ ++ if (hints->caps & FI_TAGGED) { ++ tagged_msg.msg_iov = &msg_iov; ++ tagged_msg.desc = &mr_desc; ++ tagged_msg.iov_count = 1; ++ tagged_msg.addr = fi_addr; ++ tagged_msg.data = NO_CQ_DATA; ++ tagged_msg.context = ctx; ++ tagged_msg.tag = ft_tag ? ft_tag : tx_seq; ++ tagged_msg.ignore = 0; ++ ++ ret = fi_trecvmsg(ep, &tagged_msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_trecvmsg", ret); ++ return ret; ++ } ++ } else { ++ msg.msg_iov = &msg_iov; ++ msg.desc = &mr_desc; ++ msg.iov_count = 1; ++ msg.addr = fi_addr; ++ msg.data = NO_CQ_DATA; ++ msg.context = ctx; ++ ++ ret = fi_recvmsg(ep, &msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_recvmsg", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++int ft_cq_read_verify(struct fid_cq *cq, void *op_context) ++{ ++ int ret; ++ struct fi_cq_err_entry completion; ++ ++ do { ++ /* read events from the completion queue */ ++ ret = fi_cq_read(cq, (void *)&completion, 1); ++ ++ if (ret > 0) { ++ if (op_context != completion.op_context) { ++ fprintf(stderr, "ERROR: op ctx=%p cq_ctx=%p\n", ++ op_context, completion.op_context); ++ return -FI_EOTHER; ++ } ++ if (!ft_tag_is_valid(cq, &completion, ++ ft_tag ? ft_tag : rx_cq_cntr)) ++ return -FI_EOTHER; ++ } else if ((ret <= 0) && (ret != -FI_EAGAIN)) { ++ FT_PRINTERR("POLL: Error\n", ret); ++ if (ret == -FI_EAVAIL) ++ FT_PRINTERR("POLL: error available\n", ret); ++ return -FI_EOTHER; ++ } ++ } while (ret == -FI_EAGAIN); ++ ++ return 0; ++} ++ ++int ft_cq_readerr(struct fid_cq *cq) ++{ ++ struct fi_cq_err_entry cq_err; ++ int ret; ++ ++ memset(&cq_err, 0, sizeof(cq_err)); ++ ret = fi_cq_readerr(cq, &cq_err, 0); ++ if (ret < 0) { ++ FT_PRINTERR("fi_cq_readerr", ret); ++ } else { ++ FT_CQ_ERR(cq, cq_err, NULL, 0); ++ ret = -cq_err.err; ++ } ++ return ret; ++} ++ ++void eq_readerr(struct fid_eq *eq, const char *eq_str) ++{ ++ struct fi_eq_err_entry eq_err; ++ int rd; ++ ++ memset(&eq_err, 0, sizeof(eq_err)); ++ rd = fi_eq_readerr(eq, &eq_err, 0); ++ if (rd != sizeof(eq_err)) { ++ FT_PRINTERR("fi_eq_readerr", rd); ++ } else { ++ FT_EQ_ERR(eq, eq_err, NULL, 0); ++ } ++} ++ ++int ft_sync() ++{ ++ char buf; ++ int ret; ++ ++ if (opts.dst_addr) { ++ if (!opts.oob_port) { ++ ret = ft_tx(ep, remote_fi_addr, 1, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_rx(ep, 1); ++ } else { ++ ret = ft_sock_send(oob_sock, &buf, 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_sock_recv(oob_sock, &buf, 1); ++ if (ret) ++ return ret; ++ } ++ } else { ++ if (!opts.oob_port) { ++ ret = ft_rx(ep, 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_tx(ep, remote_fi_addr, 1, &tx_ctx); ++ } else { ++ ret = ft_sock_recv(oob_sock, &buf, 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_sock_send(oob_sock, &buf, 1); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ return ret; ++} ++ ++int ft_sync_pair(int status) ++{ ++ int ret; ++ int pair_status; ++ ++ if (ft_parent_proc) { ++ ret = write(ft_socket_pair[1], &status, sizeof(int)); ++ if (ret < 0) { ++ FT_PRINTERR("write", errno); ++ return ret; ++ } ++ ret = read(ft_socket_pair[1], &pair_status, sizeof(int)); ++ if (ret < 0) { ++ FT_PRINTERR("read", errno); ++ return ret; ++ } ++ } else { ++ ret = read(ft_socket_pair[0], &pair_status, sizeof(int)); ++ if (ret < 0) { ++ FT_PRINTERR("read", errno); ++ return ret; ++ } ++ ret = write(ft_socket_pair[0], &status, sizeof(int)); ++ if (ret < 0) { ++ FT_PRINTERR("write", errno); ++ return ret; ++ } ++ } ++ ++ /* check status reported the other guy */ ++ if (pair_status != FI_SUCCESS) ++ return pair_status; ++ ++ return 0; ++} ++ ++int ft_fork_and_pair(void) ++{ ++ int ret; ++ ++ ret = socketpair(AF_LOCAL, SOCK_STREAM, 0, ft_socket_pair); ++ if (ret) { ++ FT_PRINTERR("socketpair", errno); ++ return -errno; ++ } ++ ++ ft_child_pid = fork(); ++ if (ft_child_pid < 0) { ++ FT_PRINTERR("fork", ft_child_pid); ++ return -errno; ++ } ++ if (ft_child_pid) ++ ft_parent_proc = 1; ++ ++ return 0; ++} ++ ++int ft_wait_child(void) ++{ ++ int ret; ++ ++ ret = close(ft_socket_pair[0]); ++ if (ret) { ++ FT_PRINTERR("close", errno); ++ return ret; ++ } ++ ret = close(ft_socket_pair[1]); ++ if (ret) { ++ FT_PRINTERR("close", errno); ++ return ret; ++ } ++ if (ft_parent_proc) { ++ ret = waitpid(ft_child_pid, NULL, WCONTINUED); ++ if (ret < 0) { ++ FT_PRINTERR("waitpid", errno); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++int ft_finalize_ep(struct fid_ep *ep) ++{ ++ struct iovec iov; ++ int ret; ++ struct fi_context ctx; ++ ++ strcpy(tx_buf + ft_tx_prefix_size(), "fin"); ++ iov.iov_base = tx_buf; ++ iov.iov_len = 4 + ft_tx_prefix_size(); ++ ++ if (hints->caps & FI_TAGGED) { ++ struct fi_msg_tagged tmsg; ++ ++ memset(&tmsg, 0, sizeof tmsg); ++ tmsg.msg_iov = &iov; ++ tmsg.desc = &mr_desc; ++ tmsg.iov_count = 1; ++ tmsg.addr = remote_fi_addr; ++ tmsg.tag = tx_seq; ++ tmsg.ignore = 0; ++ tmsg.context = &ctx; ++ ++ ret = fi_tsendmsg(ep, &tmsg, FI_INJECT | FI_TRANSMIT_COMPLETE); ++ } else { ++ struct fi_msg msg; ++ ++ memset(&msg, 0, sizeof msg); ++ msg.msg_iov = &iov; ++ msg.desc = &mr_desc; ++ msg.iov_count = 1; ++ msg.addr = remote_fi_addr; ++ msg.context = &ctx; ++ ++ ret = fi_sendmsg(ep, &msg, FI_INJECT | FI_TRANSMIT_COMPLETE); ++ } ++ if (ret) { ++ FT_PRINTERR("transmit", ret); ++ return ret; ++ } ++ ++ ++ ret = ft_get_tx_comp(++tx_seq); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_finalize(void) ++{ ++ int ret; ++ ++ if (fi->domain_attr->mr_mode & FI_MR_RAW) { ++ ret = fi_mr_unmap_key(domain, remote.key); ++ if (ret) ++ return ret; ++ } ++ ++ return ft_finalize_ep(ep); ++} ++ ++int64_t get_elapsed(const struct timespec *b, const struct timespec *a, ++ enum precision p) ++{ ++ int64_t elapsed; ++ ++ elapsed = difftime(a->tv_sec, b->tv_sec) * 1000 * 1000 * 1000; ++ elapsed += a->tv_nsec - b->tv_nsec; ++ return elapsed / p; ++} ++ ++void show_perf(char *name, int tsize, int iters, struct timespec *start, ++ struct timespec *end, int xfers_per_iter) ++{ ++ static int header = 1; ++ char str[FT_STR_LEN]; ++ int64_t elapsed = get_elapsed(start, end, MICRO); ++ long long bytes = (long long) iters * tsize * xfers_per_iter; ++ float usec_per_xfer; ++ ++ if (name) { ++ if (header) { ++ printf("%-50s%-8s%-8s%-8s%8s %10s%13s%13s\n", ++ "name", "bytes", "iters", ++ "total", "time", "MB/sec", ++ "usec/xfer", "Mxfers/sec"); ++ header = 0; ++ } ++ ++ printf("%-50s", name); ++ } else { ++ if (header) { ++ printf("%-8s%-8s%-8s%8s %10s%13s%13s\n", ++ "bytes", "iters", "total", ++ "time", "MB/sec", "usec/xfer", ++ "Mxfers/sec"); ++ header = 0; ++ } ++ } ++ ++ printf("%-8s", size_str(str, tsize)); ++ ++ printf("%-8s", cnt_str(str, iters)); ++ ++ printf("%-8s", size_str(str, bytes)); ++ ++ usec_per_xfer = ((float)elapsed / iters / xfers_per_iter); ++ printf("%8.2fs%10.2f%11.2f%11.2f\n", ++ elapsed / 1000000.0, bytes / (1.0 * elapsed), ++ usec_per_xfer, 1.0/usec_per_xfer); ++} ++ ++void show_perf_mr(int tsize, int iters, struct timespec *start, ++ struct timespec *end, int xfers_per_iter, int argc, char *argv[]) ++{ ++ static int header = 1; ++ int64_t elapsed = get_elapsed(start, end, MICRO); ++ long long total = (long long) iters * tsize * xfers_per_iter; ++ int i; ++ float usec_per_xfer; ++ ++ if (header) { ++ printf("---\n"); ++ ++ for (i = 0; i < argc; ++i) ++ printf("%s ", argv[i]); ++ ++ printf(":\n"); ++ header = 0; ++ } ++ ++ usec_per_xfer = ((float)elapsed / iters / xfers_per_iter); ++ ++ printf("- { "); ++ printf("xfer_size: %d, ", tsize); ++ printf("iterations: %d, ", iters); ++ printf("total: %lld, ", total); ++ printf("time: %f, ", elapsed / 1000000.0); ++ printf("MB/sec: %f, ", (total) / (1.0 * elapsed)); ++ printf("usec/xfer: %f, ", usec_per_xfer); ++ printf("Mxfers/sec: %f", 1.0/usec_per_xfer); ++ printf(" }\n"); ++} ++ ++void ft_addr_usage() ++{ ++ FT_PRINT_OPTS_USAGE("-B ", "non default source port number"); ++ FT_PRINT_OPTS_USAGE("-P ", "non default destination port number"); ++ FT_PRINT_OPTS_USAGE("-s
", "source address"); ++ FT_PRINT_OPTS_USAGE("-b[=]", "enable out-of-band address exchange and " ++ "synchronization over the, optional, port"); ++} ++ ++void ft_usage(char *name, char *desc) ++{ ++ fprintf(stderr, "Usage:\n"); ++ fprintf(stderr, " %s [OPTIONS]\t\tstart server\n", name); ++ fprintf(stderr, " %s [OPTIONS] \tconnect to server\n", name); ++ ++ if (desc) ++ fprintf(stderr, "\n%s\n", desc); ++ ++ fprintf(stderr, "\nOptions:\n"); ++ ft_addr_usage(); ++ FT_PRINT_OPTS_USAGE("-f ", "fabric name"); ++ FT_PRINT_OPTS_USAGE("-d ", "domain name"); ++ FT_PRINT_OPTS_USAGE("-p ", "specific provider name eg sockets, verbs"); ++ FT_PRINT_OPTS_USAGE("-e ", "Endpoint type: msg|rdm|dgram (default:rdm)"); ++ FT_PRINT_OPTS_USAGE("", "Only the following tests support this option for now:"); ++ FT_PRINT_OPTS_USAGE("", "fi_rma_bw"); ++ FT_PRINT_OPTS_USAGE("", "fi_shared_ctx"); ++ FT_PRINT_OPTS_USAGE("", "fi_multi_mr"); ++ FT_PRINT_OPTS_USAGE("", "fi_multi_ep"); ++ FT_PRINT_OPTS_USAGE("", "fi_recv_cancel"); ++ FT_PRINT_OPTS_USAGE("", "fi_unexpected_msg"); ++ FT_PRINT_OPTS_USAGE("", "fi_resmgmt_test"); ++ FT_PRINT_OPTS_USAGE("", "fi_inj_complete"); ++ FT_PRINT_OPTS_USAGE("-a
", "name of address vector"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++ ++ return; ++} ++ ++void ft_mcusage(char *name, char *desc) ++{ ++ fprintf(stderr, "Usage:\n"); ++ fprintf(stderr, " %s [OPTIONS] -M \tstart listener\n", name); ++ fprintf(stderr, " %s [OPTIONS] \tsend to group\n", name); ++ ++ if (desc) ++ fprintf(stderr, "\n%s\n", desc); ++ ++ fprintf(stderr, "\nOptions:\n"); ++ ft_addr_usage(); ++ FT_PRINT_OPTS_USAGE("-f ", "fabric name"); ++ FT_PRINT_OPTS_USAGE("-d ", "domain name"); ++ FT_PRINT_OPTS_USAGE("-p ", "specific provider name eg sockets, verbs"); ++ FT_PRINT_OPTS_USAGE("-d ", "domain name"); ++ FT_PRINT_OPTS_USAGE("-p ", "specific provider name eg sockets, verbs"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++ ++ return; ++} ++ ++void ft_csusage(char *name, char *desc) ++{ ++ ft_usage(name, desc); ++ FT_PRINT_OPTS_USAGE("-I ", "number of iterations"); ++ FT_PRINT_OPTS_USAGE("-w ", "number of warmup iterations"); ++ FT_PRINT_OPTS_USAGE("-S ", "specific transfer size or 'all'"); ++ FT_PRINT_OPTS_USAGE("-l", "align transmit and receive buffers to page size"); ++ FT_PRINT_OPTS_USAGE("-m", "machine readable output"); ++ FT_PRINT_OPTS_USAGE("-t ", "completion type [queue, counter]"); ++ FT_PRINT_OPTS_USAGE("-c ", "completion method [spin, sread, fd]"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++ ++ return; ++} ++ ++void ft_parseinfo(int op, char *optarg, struct fi_info *hints) ++{ ++ switch (op) { ++ case 'f': ++ if (!hints->fabric_attr) { ++ hints->fabric_attr = malloc(sizeof *(hints->fabric_attr)); ++ if (!hints->fabric_attr) { ++ perror("malloc"); ++ exit(EXIT_FAILURE); ++ } ++ } ++ hints->fabric_attr->name = strdup(optarg); ++ break; ++ case 'd': ++ if (!hints->domain_attr) { ++ hints->domain_attr = malloc(sizeof *(hints->domain_attr)); ++ if (!hints->domain_attr) { ++ perror("malloc"); ++ exit(EXIT_FAILURE); ++ } ++ } ++ hints->domain_attr->name = strdup(optarg); ++ break; ++ case 'p': ++ if (!hints->fabric_attr) { ++ hints->fabric_attr = malloc(sizeof *(hints->fabric_attr)); ++ if (!hints->fabric_attr) { ++ perror("malloc"); ++ exit(EXIT_FAILURE); ++ } ++ } ++ hints->fabric_attr->prov_name = strdup(optarg); ++ break; ++ case 'e': ++ if (!strncasecmp("msg", optarg, 3)) ++ hints->ep_attr->type = FI_EP_MSG; ++ if (!strncasecmp("rdm", optarg, 3)) ++ hints->ep_attr->type = FI_EP_RDM; ++ if (!strncasecmp("dgram", optarg, 5)) ++ hints->ep_attr->type = FI_EP_DGRAM; ++ break; ++ default: ++ /* let getopt handle unknown opts*/ ++ break; ++ ++ } ++} ++ ++void ft_parse_addr_opts(int op, char *optarg, struct ft_opts *opts) ++{ ++ switch (op) { ++ case 's': ++ opts->src_addr = optarg; ++ break; ++ case 'B': ++ opts->src_port = optarg; ++ break; ++ case 'P': ++ opts->dst_port = optarg; ++ break; ++ case 'b': ++ opts->options |= FT_OPT_OOB_SYNC; ++ if (optarg && strlen(optarg) > 1) ++ opts->oob_port = optarg + 1; ++ else ++ opts->oob_port = default_oob_port; ++ break; ++ default: ++ /* let getopt handle unknown opts*/ ++ break; ++ } ++} ++ ++void ft_parsecsopts(int op, char *optarg, struct ft_opts *opts) ++{ ++ ft_parse_addr_opts(op, optarg, opts); ++ ++ switch (op) { ++ case 'I': ++ opts->options |= FT_OPT_ITER; ++ opts->iterations = atoi(optarg); ++ break; ++ case 'S': ++ if (!strncasecmp("all", optarg, 3)) { ++ opts->sizes_enabled = FT_ENABLE_ALL; ++ } else { ++ opts->options |= FT_OPT_SIZE; ++ opts->transfer_size = atoi(optarg); ++ } ++ break; ++ case 'm': ++ opts->machr = 1; ++ break; ++ case 'c': ++ if (!strncasecmp("sread", optarg, 5)) ++ opts->comp_method = FT_COMP_SREAD; ++ else if (!strncasecmp("fd", optarg, 2)) ++ opts->comp_method = FT_COMP_WAIT_FD; ++ break; ++ case 't': ++ if (!strncasecmp("counter", optarg, 7)) { ++ opts->options |= FT_OPT_RX_CNTR | FT_OPT_TX_CNTR; ++ opts->options &= ~(FT_OPT_RX_CQ | FT_OPT_TX_CQ); ++ } ++ break; ++ case 'a': ++ opts->av_name = optarg; ++ break; ++ case 'w': ++ opts->warmup_iterations = atoi(optarg); ++ break; ++ case 'l': ++ opts->options |= FT_OPT_ALIGN; ++ break; ++ default: ++ /* let getopt handle unknown opts*/ ++ break; ++ } ++} ++ ++int ft_parse_rma_opts(int op, char *optarg, struct fi_info *hints, ++ struct ft_opts *opts) ++{ ++ switch (op) { ++ case 'o': ++ if (!strcmp(optarg, "read")) { ++ hints->caps |= FI_READ | FI_REMOTE_READ; ++ opts->rma_op = FT_RMA_READ; ++ } else if (!strcmp(optarg, "writedata")) { ++ hints->caps |= FI_WRITE | FI_REMOTE_WRITE; ++ hints->mode |= FI_RX_CQ_DATA; ++ hints->domain_attr->cq_data_size = 4; ++ opts->rma_op = FT_RMA_WRITEDATA; ++ cq_attr.format = FI_CQ_FORMAT_DATA; ++ } else if (!strcmp(optarg, "write")) { ++ hints->caps |= FI_WRITE | FI_REMOTE_WRITE; ++ opts->rma_op = FT_RMA_WRITE; ++ } else { ++ fprintf(stderr, "Invalid operation type: \"%s\". Usage:\n" ++ "-o \trma op type: read|write|writedata " ++ "(default:write)\n", optarg); ++ return EXIT_FAILURE; ++ } ++ break; ++ default: ++ /* let getopt handle unknown opts*/ ++ break; ++ } ++ return 0; ++} ++ ++void ft_fill_buf(void *buf, int size) ++{ ++ char *msg_buf; ++ int msg_index; ++ static unsigned int iter = 0; ++ int i; ++ ++ msg_index = ((iter++)*INTEG_SEED) % integ_alphabet_length; ++ msg_buf = (char *)buf; ++ for (i = 0; i < size; i++) { ++ msg_buf[i] = integ_alphabet[msg_index++]; ++ if (msg_index >= integ_alphabet_length) ++ msg_index = 0; ++ } ++} ++ ++int ft_check_buf(void *buf, int size) ++{ ++ char *recv_data; ++ char c; ++ static unsigned int iter = 0; ++ int msg_index; ++ int i; ++ ++ msg_index = ((iter++)*INTEG_SEED) % integ_alphabet_length; ++ recv_data = (char *)buf; ++ ++ for (i = 0; i < size; i++) { ++ c = integ_alphabet[msg_index++]; ++ if (msg_index >= integ_alphabet_length) ++ msg_index = 0; ++ if (c != recv_data[i]) ++ break; ++ } ++ if (i != size) { ++ printf("Error at iteration=%d size=%d byte=%d\n", ++ iter, size, i); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++uint64_t ft_init_cq_data(struct fi_info *info) ++{ ++ if (info->domain_attr->cq_data_size >= sizeof(uint64_t)) { ++ return 0x0123456789abcdefULL; ++ } else { ++ return 0x0123456789abcdef & ++ ((0x1ULL << (info->domain_attr->cq_data_size * 8)) - 1); ++ } ++} ++ ++int check_recv_msg(const char *message) ++{ ++ size_t recv_len; ++ size_t message_len = strlen(message) + 1; ++ /* Account for null terminated byte. */ ++ recv_len = strlen(rx_buf) + 1; ++ ++ if (recv_len != message_len) { ++ fprintf(stderr, "Received length does not match expected length.\n"); ++ return -1; ++ } ++ ++ if (strncmp(rx_buf, message, message_len)) { ++ fprintf(stderr, "Received message does not match expected message.\n"); ++ return -1; ++ } ++ fprintf(stdout, "Data check OK\n"); ++ return 0; ++} ++ ++int ft_send_greeting(struct fid_ep *ep) ++{ ++ size_t message_len = strlen(greeting) + 1; ++ int ret; ++ ++ fprintf(stdout, "Sending message...\n"); ++ if (snprintf(tx_buf, tx_size, "%s", greeting) >= tx_size) { ++ fprintf(stderr, "Transmit buffer too small.\n"); ++ return -FI_ETOOSMALL; ++ } ++ ++ ret = ft_tx(ep, remote_fi_addr, message_len, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Send completion received\n"); ++ return 0; ++} ++ ++int ft_recv_greeting(struct fid_ep *ep) ++{ ++ int ret; ++ ++ fprintf(stdout, "Waiting for message from client...\n"); ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ ret = check_recv_msg(greeting); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received data from client: %s\n", (char *) rx_buf); ++ return 0; ++} ++ ++int ft_send_recv_greeting(struct fid_ep *ep) ++{ ++ return opts.dst_addr ? ft_send_greeting(ep) : ft_recv_greeting(ep); ++} ++ ++int ft_sock_listen(char *node, char *service) ++{ ++ struct addrinfo *ai, hints; ++ int val, ret; ++ ++ memset(&hints, 0, sizeof hints); ++ hints.ai_flags = AI_PASSIVE; ++ ++ ret = getaddrinfo(node, service, &hints, &ai); ++ if (ret) { ++ fprintf(stderr, "getaddrinfo() %s\n", gai_strerror(ret)); ++ return ret; ++ } ++ ++ listen_sock = socket(ai->ai_family, SOCK_STREAM, 0); ++ if (listen_sock < 0) { ++ perror("socket"); ++ ret = listen_sock; ++ goto out; ++ } ++ ++ val = 1; ++ ret = setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, ++ (void *) &val, sizeof val); ++ if (ret) { ++ perror("setsockopt SO_REUSEADDR"); ++ goto out; ++ } ++ ++ ret = bind(listen_sock, ai->ai_addr, ai->ai_addrlen); ++ if (ret) { ++ perror("bind"); ++ goto out; ++ } ++ ++ ret = listen(listen_sock, 0); ++ if (ret) ++ perror("listen"); ++ ++out: ++ if (ret && listen_sock >= 0) ++ close(listen_sock); ++ freeaddrinfo(ai); ++ return ret; ++} ++ ++int ft_sock_connect(char *node, char *service) ++{ ++ struct addrinfo *ai; ++ int ret; ++ ++ ret = getaddrinfo(node, service, NULL, &ai); ++ if (ret) { ++ perror("getaddrinfo"); ++ return ret; ++ } ++ ++ sock = socket(ai->ai_family, SOCK_STREAM, 0); ++ if (sock < 0) { ++ perror("socket"); ++ ret = sock; ++ goto free; ++ } ++ ++ ret = 1; ++ ret = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *) &ret, sizeof(ret)); ++ if (ret) ++ perror("setsockopt"); ++ ++ ret = connect(sock, ai->ai_addr, ai->ai_addrlen); ++ if (ret) { ++ perror("connect"); ++ close(sock); ++ } ++ ++free: ++ freeaddrinfo(ai); ++ return ret; ++} ++ ++int ft_sock_accept() ++{ ++ int ret, op; ++ ++ sock = accept(listen_sock, NULL, 0); ++ if (sock < 0) { ++ ret = sock; ++ perror("accept"); ++ return ret; ++ } ++ ++ op = 1; ++ ret = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, ++ (void *) &op, sizeof(op)); ++ if (ret) ++ perror("setsockopt"); ++ ++ return 0; ++} ++ ++int ft_sock_send(int fd, void *msg, size_t len) ++{ ++ int ret; ++ ++ ret = send(fd, msg, len, 0); ++ if (ret == len) { ++ return 0; ++ } else if (ret < 0) { ++ perror("send"); ++ return -errno; ++ } else { ++ perror("send aborted"); ++ return -FI_ECONNABORTED; ++ } ++} ++ ++int ft_sock_recv(int fd, void *msg, size_t len) ++{ ++ int ret; ++ ++ ret = recv(fd, msg, len, MSG_WAITALL); ++ if (ret == len) { ++ return 0; ++ } else if (ret == 0) { ++ return -FI_ENOTCONN; ++ } else if (ret < 0) { ++ FT_PRINTERR("ft_fw_recv", ret); ++ perror("recv"); ++ return -errno; ++ } else { ++ perror("recv aborted"); ++ return -FI_ECONNABORTED; ++ } ++} ++ ++int ft_sock_sync(int value) ++{ ++ int result = -FI_EOTHER; ++ ++ if (listen_sock < 0) { ++ ft_sock_send(sock, &value, sizeof value); ++ ft_sock_recv(sock, &result, sizeof result); ++ } else { ++ ft_sock_recv(sock, &result, sizeof result); ++ ft_sock_send(sock, &value, sizeof value); ++ } ++ ++ return result; ++} ++ ++void ft_sock_shutdown(int fd) ++{ ++ shutdown(fd, SHUT_RDWR); ++ close(fd); ++} ++ ++static int ft_has_util_prefix(const char *str) ++{ ++ return !strncasecmp(str, OFI_UTIL_PREFIX, strlen(OFI_UTIL_PREFIX)); ++} ++ ++const char *ft_util_name(const char *str, size_t *len) ++{ ++ char *delim; ++ ++ delim = strchr(str, OFI_NAME_DELIM); ++ if (delim) { ++ if (ft_has_util_prefix(delim + 1)) { ++ *len = strlen(delim + 1); ++ return delim + 1; ++ } else if (ft_has_util_prefix(str)) { ++ *len = delim - str; ++ return str; ++ } ++ } else if (ft_has_util_prefix(str)) { ++ *len = strlen(str); ++ return str; ++ } ++ *len = 0; ++ return NULL; ++} ++ ++const char *ft_core_name(const char *str, size_t *len) ++{ ++ char *delim; ++ ++ delim = strchr(str, OFI_NAME_DELIM); ++ if (delim) { ++ if (!ft_has_util_prefix(delim + 1)) { ++ *len = strlen(delim + 1); ++ return delim + 1; ++ } else if (!ft_has_util_prefix(str)) { ++ *len = delim - str; ++ return str; ++ } ++ } else if (!ft_has_util_prefix(str)) { ++ *len = strlen(str); ++ return str; ++ } ++ *len = 0; ++ return NULL; ++} ++ ++/* Split the given string "s" using the specified delimiter(s) in the string ++ * "delim" and return an array of strings. The array is terminated with a NULL ++ * pointer. Returned array should be freed with ft_free_string_array(). ++ * ++ * Returns NULL on failure. ++ */ ++ ++char **ft_split_and_alloc(const char *s, const char *delim, size_t *count) ++{ ++ int i, n; ++ char *tmp; ++ char *dup = NULL; ++ char **arr = NULL; ++ ++ if (!s || !delim) ++ return NULL; ++ ++ dup = strdup(s); ++ if (!dup) ++ return NULL; ++ ++ /* compute the array size */ ++ n = 1; ++ for (tmp = dup; *tmp != '\0'; ++tmp) { ++ for (i = 0; delim[i] != '\0'; ++i) { ++ if (*tmp == delim[i]) { ++ ++n; ++ break; ++ } ++ } ++ } ++ ++ /* +1 to leave space for NULL terminating pointer */ ++ arr = calloc(n + 1, sizeof(*arr)); ++ if (!arr) ++ goto cleanup; ++ ++ /* set array elts to point inside the dup'ed string */ ++ for (tmp = dup, i = 0; tmp != NULL; ++i) { ++ arr[i] = strsep(&tmp, delim); ++ } ++ assert(i == n); ++ ++ if (count) ++ *count = n; ++ return arr; ++ ++cleanup: ++ free(dup); ++ free(arr); ++ return NULL; ++} ++ ++/* see ft_split_and_alloc() */ ++void ft_free_string_array(char **s) ++{ ++ /* all strings are allocated from the same strdup'ed slab, so just free ++ * the first element */ ++ if (s != NULL) ++ free(s[0]); ++ ++ /* and then the actual array of pointers */ ++ free(s); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/getopt.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/getopt.c +new file mode 100644 +index 0000000..3eb62d1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/getopt.c +@@ -0,0 +1,727 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "getopt.h" ++ ++#ifndef min ++# define min(x,y) (x)<(y) ? (x) : (y) ++#endif // min ++ ++char *optarg = 0; ++int optind = 1; ++int opterr = 1; ++int optopt = '?'; ++static int nextchar = 0; ++ ++typedef struct _getopt_param ++{ ++ const char* optstring; /* effective option string, without prefixes */ ++ int posix; /* POSIX compatible mode (stop at first not detected parameter) */ ++ int process_all; /* process all elements */ ++ int no_report; /* don't report about errors... */ ++ char missing_arg; /* character for return for missing option argument ++ * by default - '?', but may be ':' */ ++} getopt_param; ++ ++ ++/* this function detects for parameters of processing */ ++static getopt_param scan_param(const char* optstring) ++{ ++ assert(optstring); ++ getopt_param param = {optstring, 0, 0, 0, '?'}; ++ size_t len = strlen(optstring); ++ ++ if (!opterr) ++ param.no_report = 1; ++ ++ for (size_t i = 0; i < len; i++) { ++ /* if option string begins with symbols '-+:' then this is special symbols... */ ++ switch (optstring[i]) { ++ case '-': ++ param.process_all = 1; ++ break; ++ case '+': ++ param.posix = 1; ++ break; ++ case ':': ++ param.missing_arg = ':'; ++ param.no_report = 1; /* i don't know why, but if optstrings starts with */ ++ break; /* ':' - original Linux function doesn't report about errors... */ ++ default: /* ok, no more special symbols... save efective format string & return */ ++ param.optstring = optstring + i; ++ return param; ++ } ++ } ++ assert(0); /* no more symbols? not good :( */ ++ return param; ++} ++ ++/* this function detects different between 2 strings: ++ * return values: ++ * -1 - strings differ ++ * 0 - strings same ++ * >0 - str is substring of opt */ ++static int string_diff(const char* opt, const char* str, int len) ++{ ++ assert(opt); ++ assert(str); ++ assert(len); ++ assert(len <= (int)strlen(str)); ++ ++ int olen = strlen(opt); ++ ++ if(olen < len) ++ return -1; ++ ++ for (int i = 0;; i++) { ++ if (!opt[i] && i == len) ++ return 0; /* option == str */ ++ else if (opt[i] && i >= len) ++ return olen - i; /* str is part of option */ ++ else if (opt[i] != str[i]) ++ return -1; /* option is shorter str... ++ * in str specified option name longer that option */ ++ } ++} ++ ++typedef enum _opt_type ++{ ++ opt_not_found = 0, ++ opt_err_no_arg = 1, ++ opt_err_ambiguous = 2, ++ opt_single = 3, ++ opt_inplace_arg = 4, ++ opt_has_arg = 5 ++} opt_type; ++ ++ ++/* check for short option... should be like "-opt_name" */ ++static int is_short_option(const char* str) ++{ ++ return (str[0] == '-' && str[1] && str[1] != '-'); ++} ++ ++/* check for long option... should be like "--opt_name" */ ++static int is_long_option(const char* str) ++{ ++ return (str[0] == '-' && str[1] == '-' && str[2]); ++} ++ ++static int is_option(const char* str) ++{ ++ return (is_short_option(str) || is_long_option(str)); ++} ++ ++static int is_finish(const char* str) ++{ /* if string == "--" - then this is terminator (no more process) */ ++ return (str[0] == '-' && str[1] == '-' && !str[2]); ++} ++ ++static int short_option_begin(const char* str) ++{ /* currently this is fake because supported only '-' as attribute of short option */ ++ (void) str; ++ return 1; ++} ++ ++static int long_option_begin(const char* str) ++{ /* currently this is fake because supported only '--' as attribute of long option */ ++ (void) str; ++ return 2; ++} ++ ++static int option_begin(const char* str) ++{ ++ if (is_short_option(str)) ++ return short_option_begin(str); ++ else if (is_long_option(str)) ++ return long_option_begin(str); ++ assert(0); ++ return 0; ++} ++ ++/* looking for nearest option or terminate sequence ('--') ++ * in argv from optind index if no option found - return -1, ++ * else - index of found option */ ++static int look_for_option(int argc, char* const argv[], int optind) ++{ ++ assert(argv); ++ for (int i = optind; i < argc; i++) ++ if(is_option(argv[i]) || is_finish(argv[i])) ++ return i; ++ return -1; ++} ++ ++/* this function tries to detect short option entry in string */ ++static opt_type check_for_short_option(const char* optstring, const char* str) ++{ ++ assert(optstring); ++ assert(str); ++ ++ size_t olen = strlen(optstring); ++ size_t slen = strlen(str); ++ ++ if (!olen || !slen) ++ return opt_not_found; ++ ++ char sym = str[0]; ++ /* loop for all options in optstring */ ++ for (size_t i = 0; i < olen; i++ ) { ++ /* ok, we found option... */ ++ if (optstring[i] != ':' && optstring[i] == sym) { ++ /* let's check is it valid? */ ++ if (optstring[i + 1] != ':') { ++ /* single option... just return... */ ++ return opt_single; ++ } ++ else if (optstring[i+1] == ':' && optstring[i+2] != ':') { ++ /* mandatory argument */ ++ if (str[1]) /* value of arg is in same argv */ ++ return opt_inplace_arg; ++ else /* else next arg is value of option */ ++ return opt_has_arg; ++ } ++ else { /* optional argument */ ++ if (str[1]) /* value of arg is in same argv */ ++ return opt_inplace_arg; ++ else /* else optional argument is absent */ ++ return opt_single; ++ } ++ } ++ } ++ ++ return opt_not_found; ++} ++ ++/* this function tries to detect long option entry in string */ ++static opt_type check_for_long_option(const struct option *longopts, int *longindex, ++ const char* str, const char** arg) ++{ ++ assert(longindex); ++ assert(str); ++ ++ *arg = 0; ++ ++ if (!longopts) ++ return opt_not_found; ++ ++ /* looking for '=' in string... */ ++ int i; ++ for (i = 0; str[i] && str[i] != '='; i++); ++ assert(str[i] == '=' || !str[i]); ++ ++ int len = i; /* len used for detecting length of option name in string */ ++ ++ if (str[i] == '=' && str[i+1]) /* ok, symbol '=' detected... */ ++ *arg = str + i + 1; /* set potential option name substring length */ ++ ++ /* detecting the nearest option name to string */ ++ int index = 1; ++ const char* opt = longopts->name; ++ ++ if (!opt) ++ return opt_not_found; ++ ++ int diff = string_diff(opt, str, len); ++ int selected = diff >= 0 ? 0 : -1; ++ int ambiguous = 0; ++ ++ while (longopts[index].name) { ++ opt = longopts[index].name; ++ ++ int _diff = string_diff(opt, str, len); ++ if (!_diff) { ++ diff = 0; ++ selected = index; ++ break; ++ } ++ ++ if (_diff > 0 && diff > 0) { ++ ambiguous = 1; /* detected 2 or more options which are confirms string */ ++ } ++ else if (_diff > 0 && (_diff < diff || diff < 0)) { ++ diff = _diff; ++ selected = index; ++ } ++ index++; ++ } ++ ++ if (ambiguous && diff > 0) /* if detected multiple confirms and no exact match - return error */ ++ return opt_err_ambiguous; ++ ++ if (selected >= 0) { ++ if (longopts[selected].has_arg == no_argument && *arg) { ++ return opt_err_no_arg; /* argument is not required but specified */ ++ } ++ else if (longopts[selected].has_arg == no_argument /*&& !arg*/) { ++ *longindex = index; ++ return opt_single; // option without argument ++ } ++ else if (longopts[selected].has_arg == required_argument && *arg) { ++ *longindex = index; ++ return opt_inplace_arg; ++ } ++ else if (longopts[selected].has_arg == required_argument /*&& !arg*/) { ++ *longindex = index; ++ return opt_has_arg; ++ } ++ else if (longopts[selected].has_arg == optional_argument && *arg) { ++ *longindex = index; ++ return opt_inplace_arg; ++ } ++ else if (longopts[selected].has_arg == optional_argument /*&& !arg*/) { ++ *longindex = index; ++ return opt_single; // option without argument ++ } ++ } ++ return opt_not_found; ++} ++ ++/* here stored all numbers of elements which should be placed at end of argv list */ ++static int* swap_list = 0; ++static int swap_num = 0; ++ ++static void clear_swap() ++{ ++ if (swap_list) ++ free( swap_list ); ++ swap_list = 0; ++ swap_num = 0; ++} ++ ++/* adding index to list */ ++static void add_to_swap(int idx, int num) ++{ ++ assert(!swap_list && !swap_num || swap_list && swap_num); ++ assert(num); ++ ++ if (!swap_num) ++ swap_list = (int*)malloc(sizeof(*swap_list) * num); ++ else ++ swap_list = (int*)realloc(swap_list, ++ sizeof(*swap_list) * (swap_num + num)); ++ assert(swap_list); ++ ++ for(int i = 0; i < num; i++) ++ swap_list[swap_num + i] = idx + i; ++ swap_num += num; ++} ++ ++/* swap values in array ++ * this function moves elements enumrated in swap_list to end of ++ * argv vector... ++ * arguments: ++ * argc - size of argv vector (used mostly for control of length, ++ * to be sure that we are inside of vector) ++ * argv - vector to process ++ * optind - bound of process... argv vector is processed in range 0..optind */ ++static void swap_values(int argc, char** argv, int _optind) ++{ ++ assert(_optind >= swap_num); ++ assert(_optind <= argc); ++ ++ int i; /* index for original array */ ++ int j; /* index for temp array */ ++ int k; /* index for swap array */ ++ ++ int vals = min(argc, _optind); ++ ++ char** tmp = (char**)malloc(vals * sizeof(*tmp)); ++ assert(tmp); ++ ++ for (i = j = k = 0; i < vals && j < vals; i++) ++ { ++ /* copying all elements which NOT enumerated in swap_list array to temp array */ ++ if (k >= swap_num || i != swap_list[k]) ++ tmp[j++] = argv[i]; ++ else { ++ /* if index of element is in swap_list array - then just skip this element ++ * NOTE: swap_list array is SORTED, that is why we can to not run ++ * throgh whole swap_list array in every iteration */ ++ assert(k < swap_num); ++ k++; ++ } ++ } ++ ++ /* ok, now copy rest of array (skipped elements) to temp array */ ++ for (k = 0; j < vals && k < swap_num; k++, j++) { ++ assert(swap_list[k] < _optind); ++ assert(swap_list[k] < argc); ++ tmp[j] = argv[swap_list[k]]; ++ } ++ ++ /* and now save tmp array to argv */ ++ for (i = 0; i < vals; i++) ++ argv[i] = tmp[i]; ++ ++ free(tmp); ++ ++ optind -= swap_num; ++ ++ clear_swap(); ++} ++ ++/* this function is called when we need to detect next option entry in argv ++ * return value: ++ * 1 - next option entry found, retval not used ++ * 0 - no more options, retval - reason (-1 no more options, 1 - argument ++ * processed as default option with code 1) */ ++static int detect_next_option(int argc, char* const argv[], ++ const getopt_param* param, int* retval) ++{ ++ if (!is_option(argv[optind])) { ++ /* if optind points to non-option - then check it... */ ++ if (is_finish(argv[optind])) { ++ /* is it terminate sequence ('--')? */ ++ optind++; ++ if (!param->posix && !param->process_all) ++ swap_values(argc, (char**)argv, optind); ++ *retval = -1; ++ return 0; ++ } ++ else if (param->process_all) { ++ /* processing all elements */ ++ optarg = (char*)argv[optind]; ++ optind++; ++ *retval = 1; ++ return 0; ++ } ++ else if (param->posix) { ++ *retval = -1; ++ return 0; ++ } ++ else { ++ int next_ind = look_for_option(argc, argv, optind); ++ assert(next_ind != optind); /* should not be same */ ++ if (next_ind > 0) { ++ /* marking elements for swap */ ++ add_to_swap(optind, next_ind - optind); ++ /* NOTE: in swap_list stored indexes of elements which are not ++ * detected as options and not detected as arguments ++ * (if argv[x] is detected as option - stsrts with '-', ++ * it doesn't added to this list). later, when no more ++ * element may be detected, these stored elements are moved ++ * to end of argv vector */ ++ optind = next_ind; ++ } ++ else { ++ /* no more options found */ ++ swap_values(argc, (char**)argv, optind); ++ *retval = -1; ++ return 0; ++ } ++ } ++ ++ if (is_finish(argv[optind])) { ++ optind++; ++ if (!param->posix && !param->process_all) ++ swap_values(argc, (char**)argv, optind); ++ *retval = -1; ++ return 0; ++ } ++ } ++ return 1; ++} ++ ++/* this function is called when we are sure that option is short... */ ++static int get_short_option(int argc, char* const argv[], const getopt_param* param) ++{ ++ assert(argc); ++ assert(argv); ++ assert(nextchar); ++ assert(optind < argc); ++ ++ const char* str = argv[optind] + nextchar; ++ ++ switch (check_for_short_option(param->optstring, str)) { ++ case opt_not_found: ++ optopt = str[0]; ++ nextchar++; ++ if (!argv[optind][nextchar]) { ++ nextchar = 0; ++ optind++; ++ } ++ if (!param->no_report) ++ printf("%s: invalid option -- %c\n", argv[0], optopt); ++ return '?'; ++ case opt_err_no_arg: ++ /* somethibg wrong... check_for_short_option can't ++ * detect absent external parameter... */ ++ assert(0); ++ break; ++ case opt_single: ++ { ++ nextchar++; ++ if (!argv[optind][nextchar]) { ++ nextchar = 0; ++ optind++; ++ } ++ return str[0]; ++ } ++ case opt_inplace_arg: ++ optarg = (char*)str + 1; ++ optind++; ++ nextchar = 0; ++ return str[0]; ++ case opt_has_arg: ++ if (optind + 1 >= argc) { ++ /* error: option hasn't argument */ ++ optopt = str[0]; ++ optind++; ++ nextchar = 0; ++ if (!param->no_report) ++ printf("%s: option requires an " ++ "argument -- %c\n", argv[0], ++ optopt); ++ return param->missing_arg; ++ } ++ else { ++ optarg = (char*)argv[optind + 1]; ++ optind += 2; ++ nextchar = 0; ++ return str[0]; ++ } ++ } ++ ++ /* should not go here... */ ++ assert(0); ++ return -1; ++} ++ ++static int get_long_option(int argc, char* const argv[], const getopt_param* param, ++ const struct option* longopts, int* longindex) ++{ ++ assert(argc); ++ assert(argv); ++ assert(!nextchar); ++ assert(optind < argc); ++ ++ optopt = 0; ++ *longindex = 0; ++ ++ /* saving current argument for error message */ ++ const char* element = argv[optind]; ++ ++ switch (check_for_long_option(longopts, longindex, ++ argv[optind] + option_begin(argv[optind]), ++ &optarg)) { ++ case opt_not_found: ++ if (!param->no_report) ++ printf("%s: unrecognized option `%s'\n", ++ argv[0], element); ++ optind++; ++ return '?'; ++ case opt_err_no_arg: ++ if (!param->no_report) ++ printf("%s: option `%s' doesn't allow an argument\n", ++ argv[0], element); ++ optind++; ++ return '?'; ++ case opt_has_arg: ++ if (optind + 1 >= argc) { ++ optind++; ++ if (!param->no_report) ++ printf("%s: option `%s' requires an argument\n", ++ argv[0], element); ++ *longindex = 0; ++ return param->missing_arg; ++ } ++ optarg = (char*)(argv[optind + 1]); ++ optind++; ++ /* here should NOT be break because here is same return method */ ++ case opt_single: ++ case opt_inplace_arg: ++ optind++; ++ if(longopts[*longindex].flag) { ++ *longopts[*longindex].flag = longopts[*longindex].val; ++ return 0; ++ } ++ else { ++ return longopts[*longindex].val; ++ } ++ case opt_err_ambiguous: ++ optind++; ++ if (!param->no_report) ++ printf("%s: option `%s' is ambiguous\n", ++ argv[0], element); ++ return '?'; ++ } ++ ++ assert(0); /* should not be here... */ ++ return -1; ++} ++ ++static int get_long_short_option(int argc, char* const argv[], const getopt_param* param, ++ const struct option* longopts, int* longindex) ++{ ++ assert(argc); ++ assert(argv); ++ assert(!nextchar); ++ assert(optind < argc); ++ ++ optopt = 0; ++ *longindex = 0; ++ ++ const char* element = argv[optind]; /* saving current argument for error message */ ++ ++ opt_type ltype = check_for_long_option(longopts, longindex, ++ argv[optind] + option_begin(argv[optind]), ++ &optarg); ++ opt_type stype = check_for_short_option(param->optstring, ++ argv[optind] + option_begin(argv[optind])); ++ ++ if (ltype == opt_not_found && stype == opt_not_found) { ++ if (!param->no_report) ++ printf("%s: unrecognized option `%s'\n", ++ argv[0], element); ++ optind++; ++ return '?'; ++ } ++ else if (ltype != opt_not_found) ++ return get_long_option(argc, argv, param, longopts, longindex); ++ else { ++ nextchar = short_option_begin(argv[optind]); ++ return get_short_option(argc, argv, param); ++ } ++} ++ ++int getopt(int argc, char* const argv[], const char *optstring) ++{ ++ if(!argc || !argv || !optstring ) ++ return -1; ++ ++ getopt_param param = scan_param(optstring ? optstring : ""); ++ ++ if (optind >= argc) { ++ if (!param.posix && !param.process_all) ++ swap_values(argc, (char**)argv, optind); ++ return -1; ++ } ++ ++ optarg = 0; ++ ++ if (!nextchar) { ++ /* we are in begin of argument... ++ * no previous iterations on this arg */ ++ int retval; ++ if (!detect_next_option(argc, argv, ¶m, &retval)) ++ return retval; ++ nextchar = short_option_begin(argv[optind]); ++ } ++ ++ return get_short_option(argc, argv, ¶m); ++} ++ ++int getopt_long(int argc, char * const argv[], ++ const char *optstring, ++ const struct option *longopts, int *longindex) ++{ ++ if(!argc || !argv) ++ return -1; ++ ++ getopt_param param = scan_param(optstring ? optstring : ""); ++ ++ if(optind >= argc) { ++ if(!param.posix && !param.process_all) ++ swap_values(argc, (char**)argv, optind); ++ return -1; ++ } ++ ++ optarg = 0; ++ ++ if (!nextchar) { ++ /* we are in begin of argument... ++ * no previous iterations on this arg */ ++ int retval; ++ if (!detect_next_option(argc, argv, ¶m, &retval)) ++ return retval; ++ ++ const char* str = argv[optind]; ++ if (is_long_option(str)) { ++ int _longindex; ++ /* if no longindex specified - create own temp... */ ++ if (!longindex) ++ longindex = &_longindex; ++ return get_long_option(argc, argv, ¶m, ++ longopts, longindex); ++ } ++ else if (is_short_option(str)) { ++ nextchar = short_option_begin(str); ++ } ++ } ++ ++ return get_short_option(argc, argv, ¶m); ++} ++ ++int getopt_long_only(int argc, char * const argv[], ++ const char *optstring, ++ const struct option *longopts, int *longindex) ++{ ++ if (!argc || !argv) ++ return -1; ++ ++ getopt_param param = scan_param(optstring ? optstring : ""); ++ ++ if (optind >= argc) { ++ if (!param.posix && !param.process_all) ++ swap_values(argc, (char**)argv, optind); ++ return -1; ++ } ++ ++ optarg = 0; ++ ++ if (!nextchar) { ++ int retval; ++ if (!detect_next_option(argc, argv, ¶m, &retval)) ++ return retval; ++ ++ const char* str = argv[optind]; ++ if (is_long_option(str)) { ++ int _longindex; ++ /* if no longindex specified - create own temp... */ ++ if (!longindex) ++ longindex = &_longindex; ++ return get_long_option(argc, argv, ¶m, ++ longopts, longindex); ++ } ++ else if (is_short_option(str)) { ++ return get_long_short_option(argc, argv, ¶m, ++ longopts, longindex); ++ } ++ } ++ ++ return get_short_option(argc, argv, ¶m); ++} ++ ++ ++ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/osd.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/osd.c +new file mode 100644 +index 0000000..0e54de8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/osd.c +@@ -0,0 +1,87 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "ft_osd.h" ++ ++int socketpair(int af, int type, int protocol, int socks[2]) ++{ ++ protocol; /* suppress warning */ ++ struct sockaddr_in in_addr; ++ int lsock; ++ int len = sizeof(in_addr); ++ ++ if (!socks) { ++ WSASetLastError(WSAEINVAL); ++ return SOCKET_ERROR; ++ } ++ ++ socks[0] = socks[1] = (int)INVALID_SOCKET; ++ if ((lsock = socket(af == AF_UNIX ? AF_INET : af, ++ type, 0)) == INVALID_SOCKET) { ++ return SOCKET_ERROR; ++ } ++ ++ memset(&in_addr, 0, sizeof(in_addr)); ++ in_addr.sin_family = AF_INET; ++ in_addr.sin_addr.s_addr = htonl(0x7f000001); ++ ++ if (bind(lsock, (struct sockaddr*)&in_addr, sizeof(in_addr))) { ++ int err = WSAGetLastError(); ++ closesocket(lsock); ++ WSASetLastError(err); ++ return SOCKET_ERROR; ++ } ++ if (getsockname(lsock, (struct sockaddr*) &in_addr, &len)) { ++ int err = WSAGetLastError(); ++ closesocket(lsock); ++ WSASetLastError(err); ++ return SOCKET_ERROR; ++ } ++ ++ if (listen(lsock, 1)) ++ goto err; ++ if ((socks[0] = WSASocket(af == AF_UNIX ? AF_INET : af, ++ type, 0, NULL, 0, 0)) == INVALID_SOCKET) ++ goto err; ++ if (connect(socks[0], (const struct sockaddr*) &in_addr, sizeof(in_addr))) ++ goto err; ++ if ((socks[1] = accept(lsock, NULL, NULL)) == INVALID_SOCKET) ++ goto err; ++ ++ closesocket(lsock); ++ return 0; ++ ++ int err; ++err: ++ err = WSAGetLastError(); ++ closesocket(lsock); ++ closesocket(socks[0]); ++ closesocket(socks[1]); ++ WSASetLastError(err); ++ return SOCKET_ERROR; ++} +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/configure.ac b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/configure.ac +new file mode 100644 +index 0000000..08b52a6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/configure.ac +@@ -0,0 +1,125 @@ ++dnl ++dnl Copyright (c) 2016-2017 Cisco Systems, Inc. All rights reserved. ++dnl Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++dnl ++dnl Process this file with autoconf to produce a configure script. ++ ++AC_PREREQ(2.57) ++AC_INIT([fabtests], [1.7.1], [ofiwg@lists.openfabrics.org]) ++AC_CONFIG_AUX_DIR(config) ++AC_CONFIG_MACRO_DIR(config) ++AC_CONFIG_HEADERS(config.h) ++AM_INIT_AUTOMAKE([1.11 dist-bzip2 foreign -Wall -Werror subdir-objects]) ++m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) ++ ++AC_CANONICAL_HOST ++ ++macos=0 ++linux=0 ++freebsd=0 ++ ++case $host_os in ++*darwin*) ++ macos=1 ++ ;; ++*linux*) ++ linux=1 ++ ;; ++*freebsd*) ++ freebsd=1 ++ ;; ++*) ++ AC_MSG_ERROR([libfabric only builds on Linux & OS X]) ++ ;; ++esac ++ ++AM_CONDITIONAL([MACOS], [test $macos -eq 1]) ++AM_CONDITIONAL([LINUX], [test $linux -eq 1]) ++AM_CONDITIONAL([FREEBSD], [test $freebsd -eq 1]) ++ ++base_c_warn_flags="-Wall -Wundef -Wpointer-arith" ++debug_c_warn_flags="-Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers" ++debug_c_other_flags="-fstack-protector-strong" ++ ++AC_ARG_ENABLE([debug], ++ [AS_HELP_STRING([--enable-debug], ++ [Enable debugging - default NO])], ++ [CFLAGS="-g -O0 ${base_c_warn_flags} ${debug_c_warn_flags} ${debug_c_other_flags} $CFLAGS" ++ dbg=1], ++ [dbg=0]) ++ ++AC_DEFINE_UNQUOTED([ENABLE_DEBUG], [$dbg], ++ [defined to 1 if configured with --enable-debug]) ++ ++dnl Fix autoconf's habit of adding -g -O2 by default ++AS_IF([test -z "$CFLAGS"], ++ [CFLAGS="-O2 -DNDEBUG ${base_c_warn_flags}"]) ++ ++# AM PROG_AR did not exist pre AM 1.11.x (where x is somewhere >0 and ++# <3), but it is necessary in AM 1.12.x. ++m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) ++ ++AM_PROG_LIBTOOL ++ ++AC_ARG_WITH([valgrind], ++ AC_HELP_STRING([--with-valgrind], ++ [Enable valgrind annotations - default NO])) ++ ++if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then ++ AC_DEFINE([INCLUDE_VALGRIND], 1, ++ [Define to 1 to enable valgrind annotations]) ++ if test -d $with_valgrind; then ++ CPPFLAGS="$CPPLFAGS -I$with_valgrind/include" ++ fi ++fi ++ ++dnl Checks for programs ++AC_PROG_CC ++AM_PROG_CC_C_O ++ ++LT_INIT ++ ++have_clock_gettime=0 ++ ++AC_SEARCH_LIBS([clock_gettime],[rt], ++ [have_clock_gettime=1], ++ []) ++ ++AC_DEFINE_UNQUOTED(HAVE_CLOCK_GETTIME, [$have_clock_gettime], ++ [Define to 1 if clock_gettime is available.]) ++AM_CONDITIONAL(HAVE_CLOCK_GETTIME, [test $have_clock_gettime -eq 1]) ++ ++AC_ARG_WITH([libfabric], ++ AC_HELP_STRING([--with-libfabric], [Use non-default libfabric location - default NO]), ++ [AS_IF([test -d $withval/lib64], [fab_libdir="lib64"], [fab_libdir="lib"]) ++ CPPFLAGS="-I $withval/include $CPPFLAGS" ++ LDFLAGS="-L$withval/$fab_libdir $LDFLAGS"], ++ []) ++ ++dnl Checks for libraries ++AC_CHECK_LIB([fabric], fi_getinfo, [], ++ AC_MSG_ERROR([fi_getinfo() not found. fabtests requires libfabric.])) ++ ++dnl Checks for header files. ++AC_HEADER_STDC ++AC_CHECK_HEADER([rdma/fabric.h], [], ++ [AC_MSG_ERROR([ not found. fabtests requires libfabric.])]) ++ ++AC_MSG_CHECKING([for fi_trywait support]) ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], ++ [[fi_trywait(NULL, NULL, 0);]])], ++ [AC_MSG_RESULT([yes])], ++ [AC_MSG_RESULT([no]) ++ AC_MSG_ERROR([fabtests requires fi_trywait support. Cannot continue])]) ++ ++if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then ++AC_CHECK_HEADER(valgrind/memcheck.h, [], ++ AC_MSG_ERROR([valgrind requested but not found.])) ++fi ++ ++AC_CHECK_FUNC([epoll_create1], [have_epoll=1], [have_epoll=0]) ++AC_DEFINE_UNQUOTED([HAVE_EPOLL], [$have_epoll], ++ [Defined to 1 if Linux epoll is available]) ++ ++AC_CONFIG_FILES([Makefile fabtests.spec]) ++AC_OUTPUT +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.sln b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.sln +new file mode 100644 +index 0000000..2e460cb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.sln +@@ -0,0 +1,28 @@ ++ ++Microsoft Visual Studio Solution File, Format Version 12.00 ++# Visual Studio 14 ++VisualStudioVersion = 14.0.25420.1 ++MinimumVisualStudioVersion = 10.0.40219.1 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fabtests", "fabtests.vcxproj", "{076F757A-8827-4D3C-A87F-6E49623C16E1}" ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug-v140|x64 = Debug-v140|x64 ++ Debug-v141|x64 = Debug-v141|x64 ++ Release-v140|x64 = Release-v140|x64 ++ Release-v141|x64 = Release-v141|x64 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Debug-v140|x64.ActiveCfg = Debug-v140|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Debug-v140|x64.Build.0 = Debug-v140|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Debug-v141|x64.ActiveCfg = Debug-v141|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Debug-v141|x64.Build.0 = Debug-v141|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Release-v140|x64.ActiveCfg = Release-v140|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Release-v140|x64.Build.0 = Release-v140|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Release-v141|x64.ActiveCfg = Release-v141|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Release-v141|x64.Build.0 = Release-v141|x64 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.spec.in b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.spec.in +new file mode 100644 +index 0000000..d15c0fb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.spec.in +@@ -0,0 +1,41 @@ ++Name: fabtests ++Version: @VERSION@ ++Release: 1%{?dist} ++Summary: Test suite for libfabric API ++Group: System Environment/Libraries ++License: GPLv2 or BSD ++Url: http://www.github.com/ofiwg/fabtests ++Source: http://www.github.org/ofiwg/%{name}/releases/download/v{%version}/%{name}-%{version}.tar.bz2 ++Requires: libfabric ++BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ++ ++%description ++Fabtests provides a set of examples that uses libfabric - a high-performance fabric software library. ++ ++%prep ++%setup -q -n %{name}-%{version} ++ ++%build ++%configure %{?_with_libfabric} ++make %{?_smp_mflags} ++ ++%install ++rm -rf %{buildroot} ++%makeinstall installdirs ++# remove unpackaged files from the buildroot ++rm -f %{buildroot}%{_libdir}/*.la ++ ++%clean ++rm -rf %{buildroot} ++ ++%files ++%defattr(-,root,root,-) ++%{_bindir}/* ++%{_mandir}/man7/* ++%{_mandir}/man1/* ++%{_datadir}/%{name}/test_configs/* ++%doc AUTHORS COPYING README ++ ++%changelog ++* Sun May 3 2015 Open Fabrics Interfaces Working Group 1.0.0 ++- Release 1.0.0 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj +new file mode 100644 +index 0000000..96374f4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj +@@ -0,0 +1,175 @@ ++ ++ ++ ++ ++ Debug-v140 ++ x64 ++ ++ ++ Debug-v141 ++ x64 ++ ++ ++ Release-v140 ++ x64 ++ ++ ++ Release-v141 ++ x64 ++ ++ ++ ++ {076F757A-8827-4D3C-A87F-6E49623C16E1} ++ MakeFileProj ++ ++ ++ ++ Makefile ++ true ++ v140 ++ true ++ MultiByte ++ ++ ++ Makefile ++ true ++ v141 ++ true ++ MultiByte ++ ++ ++ Makefile ++ false ++ v140 ++ true ++ MultiByte ++ ++ ++ Makefile ++ false ++ v141 ++ true ++ MultiByte ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ WIN32;_DEBUG;$(NMakePreprocessorDefinitions) ++ $(ProjectDir)Include;$(ExecutablePath) ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean ++ ++ ++ WIN32;_DEBUG;$(NMakePreprocessorDefinitions) ++ $(ProjectDir)Include;$(ExecutablePath) ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean ++ ++ ++ WIN32;NDEBUG;$(NMakePreprocessorDefinitions) ++ $(ProjectDir)Include;$(ExecutablePath) ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean ++ ++ ++ WIN32;NDEBUG;$(NMakePreprocessorDefinitions) ++ $(ProjectDir)Include;$(ExecutablePath) ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj.filters b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj.filters +new file mode 100644 +index 0000000..2370a8e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj.filters +@@ -0,0 +1,249 @@ ++ ++ ++ ++ ++ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} ++ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx ++ ++ ++ {93995380-89BD-4b04-88EB-625FBE52EBFB} ++ h;hh;hpp;hxx;hm;inl;inc;xsd ++ ++ ++ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} ++ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms ++ ++ ++ {506aaadf-53cc-4344-941b-011008029037} ++ ++ ++ {660dbead-4d8e-4589-8eb4-43dfab9566bd} ++ ++ ++ {401b54c2-4a43-40a2-b707-50b5f6ebb556} ++ ++ ++ {b3a8fe06-b4cf-48f9-b123-60cb55a123a7} ++ ++ ++ {02aa369d-fd9a-47f4-8fd3-583dcb953179} ++ ++ ++ {fba45a64-c3ed-4d15-827b-ab11ee5e9439} ++ ++ ++ {49185c64-a450-46e4-a685-870b48b52533} ++ ++ ++ {6860bc78-04ef-4ab3-8e81-5c6a0ef80954} ++ ++ ++ {41b0d676-ab4e-4ba1-aeae-ee73272ae273} ++ ++ ++ {f1716194-5311-4a40-a1f3-d4e96c93639f} ++ ++ ++ ++ ++ Source Files\common ++ ++ ++ Source Files\common ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\common ++ ++ ++ Source Files\common ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files\ubertest ++ ++ ++ Header Files\osd ++ ++ ++ Header Files\osd ++ ++ ++ Header Files\osd ++ ++ ++ Header Files\osd ++ ++ ++ Header Files\osd\sys ++ ++ ++ Header Files\osd\sys ++ ++ ++ Header Files\osd\sys ++ ++ ++ Header Files\osd\netinet ++ ++ ++ Header Files\osd\netinet ++ ++ ++ Header Files\osd\getopt ++ ++ ++ Source Files\benchmarks ++ ++ ++ Header Files ++ ++ ++ ++ ++ ++ Source Files\test_configs ++ ++ ++ Source Files\test_configs ++ ++ ++ Source Files\test_configs ++ ++ ++ Source Files\test_configs ++ ++ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/av_xfer.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/av_xfer.c +new file mode 100644 +index 0000000..a42ed48 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/av_xfer.c +@@ -0,0 +1,242 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++static struct fi_info *base_hints; ++ ++ ++static int av_removal_test(void) ++{ ++ int ret; ++ ++ fprintf(stdout, "AV address removal: "); ++ hints = fi_dupinfo(base_hints); ++ if (!hints) ++ return -FI_ENOMEM; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ goto out; ++ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_tx", -ret); ++ goto out; ++ } ++ ++ ret = fi_av_remove(av, &remote_fi_addr, 1, 0); ++ if (ret) { ++ FT_PRINTERR("fi_av_remove", ret); ++ goto out; ++ } ++ ++ ret = ft_sync(); ++ if (ret) ++ goto out; ++ ++ ret = ft_init_av(); ++ if (ret) { ++ FT_PRINTERR("ft_init_av", -ret); ++ goto out; ++ } ++ ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) { ++ FT_PRINTERR("ft_rx", -ret); ++ goto out; ++ } ++ } else { ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) { ++ FT_PRINTERR("ft_rx", -ret); ++ goto out; ++ } ++ ++ ret = fi_av_remove(av, &remote_fi_addr, 1, 0); ++ if (ret) { ++ FT_PRINTERR("fi_av_remove", ret); ++ goto out; ++ } ++ ++ ret = ft_sync(); ++ if (ret) ++ goto out; ++ ++ ret = ft_init_av(); ++ if (ret) { ++ FT_PRINTERR("ft_init_av", -ret); ++ goto out; ++ } ++ ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_tx", -ret); ++ goto out; ++ } ++ } ++ ++ fprintf(stdout, "PASS\n"); ++ (void) ft_sync(); ++out: ++ ft_free_res(); ++ return ret; ++} ++ ++static int av_reinsert_test(void) ++{ ++ int ret; ++ ++ fprintf(stdout, "AV re-insertion address: "); ++ hints = fi_dupinfo(base_hints); ++ if (!hints) ++ return -FI_ENOMEM; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_tx", -ret); ++ goto out; ++ } ++ } else { ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) { ++ FT_PRINTERR("ft_rx", -ret); ++ goto out; ++ } ++ } ++ ++ ret = fi_av_remove(av, &remote_fi_addr, 1, 0); ++ if (ret) { ++ FT_PRINTERR("fi_av_remove", ret); ++ goto out; ++ } ++ ++ ret = ft_sync(); ++ if (ret) ++ goto out; ++ ++ ret = ft_init_av(); ++ if (ret) ++ goto out; ++ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_tx", -ret); ++ goto out; ++ } ++ } else { ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) { ++ FT_PRINTERR("ft_rx", -ret); ++ goto out; ++ } ++ } ++ ++ fprintf(stdout, "PASS\n"); ++ (void) ft_sync(); ++out: ++ ft_free_res(); ++ return ret; ++} ++ ++/* ++ Test flow proposal for directed receive ++ client (dst_addr): ++ recvfrom ++ remove addr ++ insert addr ++ OOB sync ++ recvfrom ++ server (else): ++ tsend ++ OOB sync ++ tsend ++ */ ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE | FT_OPT_OOB_SYNC; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "AV communication unit test."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = hints->ep_attr->type == FI_EP_RDM ? ++ FI_TAGGED : FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ base_hints = hints; ++ ++ ret = av_removal_test(); ++ if (ret && ret != -FI_ENODATA) ++ goto out; ++ ++ if (opts.dst_addr) ++ sleep(1); ++ ret = av_reinsert_test(); ++ if (ret && ret != -FI_ENODATA) ++ goto out; ++ ++out: ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cm_data.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cm_data.c +new file mode 100644 +index 0000000..294db3e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cm_data.c +@@ -0,0 +1,494 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++static char *cm_data; ++static size_t cm_data_size; ++static struct fi_eq_cm_entry *entry; ++static struct fi_eq_err_entry err_entry; ++ ++char *sock_service = "2710"; ++ ++static int read_shutdown_event() ++{ ++ int ret; ++ uint32_t event; ++ ++ memset(entry, 0, sizeof(*entry)); ++ ret = fi_eq_sread(eq, &event, entry, sizeof(*entry), -1, 0); ++ if (ret < 0) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "shutdown"); ++ return ret; ++ } ++ if (event != FI_SHUTDOWN || entry->fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, ++ entry->fid, ep); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ return 0; ++} ++ ++static int server_setup(void) ++{ ++ size_t opt_size; ++ int ret; ++ ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ ++ /* Get the maximum cm_size supported in all domains */ ++ opt_size = sizeof(cm_data_size); ++ return fi_getopt(&pep->fid, FI_OPT_ENDPOINT, FI_OPT_CM_DATA_SIZE, ++ &cm_data_size, &opt_size); ++} ++ ++static int client_setup(void) ++{ ++ size_t opt_size; ++ int ret; ++ ++ /* Get fabric info */ ++ ret = fi_getinfo(FT_FIVERSION, opts.dst_addr, opts.dst_port, 0, hints, ++ &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ /* Get the maximum cm_size for this domain + endpoint combination */ ++ opt_size = sizeof(opt_size); ++ return fi_getopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_CM_DATA_SIZE, ++ &cm_data_size, &opt_size); ++} ++ ++static int server_listen(size_t paramlen) ++{ ++ size_t expected; ++ uint32_t event; ++ int ret; ++ ++ expected = paramlen + sizeof(*entry); ++ memset(entry, 0, expected); ++ ++ ret = fi_eq_sread(eq, &event, entry, expected, -1, 0); ++ if (ret != expected) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "listen"); ++ return ret; ++ } ++ ++ if (event != FI_CONNREQ) { ++ FT_ERR("Unexpected CM event %d", event); ++ return -FI_EOTHER; ++ } ++ ++ ret = ft_check_buf(entry->data, paramlen); ++ if (ret) ++ return ret; ++ ++ fi = entry->info; ++ ++ return 0; ++} ++ ++static int server_reject(size_t paramlen) ++{ ++ int ret; ++ ++ ret = server_listen(paramlen); ++ if (ret) ++ return ret; ++ ++ /* Data will appear in error event generated on remote end. */ ++ ft_fill_buf(cm_data, paramlen); ++ ret = fi_reject(pep, fi->handle, cm_data, paramlen); ++ if (ret) ++ FT_PRINTERR("fi_reject", ret); ++ ++ fi_freeinfo(fi); ++ fi = NULL; ++ return ret; ++} ++ ++static int server_accept(size_t paramlen) ++{ ++ uint32_t event; ++ int ret; ++ ++ ret = server_listen(paramlen); ++ if (ret) ++ return ret; ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ goto err; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) { ++ FT_PRINTERR("alloc_active_res", ret); ++ goto err; ++ } ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) { ++ FT_PRINTERR("init_ep", ret); ++ goto err; ++ } ++ /* Data will appear on accept event on remote end. */ ++ ft_fill_buf(cm_data, paramlen); ++ ++ /* Accept the incoming connection. Also transitions endpoint to active ++ * state. ++ */ ++ ret = fi_accept(ep, cm_data, paramlen); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ goto err; ++ } ++ ++ /* Local FI_CONNECTED event does not have data associated. */ ++ memset(entry, 0, sizeof(*entry)); ++ ret = fi_eq_sread(eq, &event, entry, sizeof(*entry), -1, 0); ++ if (ret != sizeof(*entry)) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "accept"); ++ goto err; ++ } ++ ++ if (event != FI_CONNECTED || entry->fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, ++ entry->fid, ep); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ ++ fi_shutdown(ep, 0); ++ ret = read_shutdown_event(); ++ if (ret) ++ goto err; ++ ++ FT_CLOSE_FID(ep); ++ FT_CLOSE_FID(rxcq); ++ FT_CLOSE_FID(txcq); ++ FT_CLOSE_FID(rxcntr); ++ FT_CLOSE_FID(txcntr); ++ FT_CLOSE_FID(av); ++ if (mr != &no_mr) ++ FT_CLOSE_FID(mr); ++ FT_CLOSE_FID(domain); ++ ++ free(buf); ++ buf = rx_buf = tx_buf = NULL; ++ buf_size = rx_size = tx_size = 0; ++ fi_freeinfo(fi); ++ fi = NULL; ++ ++ return 0; ++ ++err: ++ fi_reject(pep, fi->handle, NULL, 0); ++ return ret; ++} ++ ++static int server(size_t paramlen) ++{ ++ int ret; ++ ++ ret = server_reject(paramlen); ++ if (ret) ++ return ret; ++ ++ return server_accept(paramlen); ++} ++ ++static int client_connect(size_t paramlen) ++{ ++ ft_fill_buf(cm_data, paramlen); ++ ++ /* Connect to server */ ++ return fi_connect(ep, fi->dest_addr, cm_data, paramlen); ++} ++ ++static int client_open_new_ep() ++{ ++ size_t opt_size; ++ int ret; ++ ++ FT_CLOSE_FID(ep); ++ ++ ret = fi_endpoint(domain, fi, &ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ /* Get the maximum cm_size for this domain + endpoint combination */ ++ opt_size = sizeof(opt_size); ++ return fi_getopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_CM_DATA_SIZE, ++ &cm_data_size, &opt_size); ++} ++ ++static int client_expect_reject(size_t paramlen) ++{ ++ uint32_t event; ++ int ret; ++ ++ ret = client_connect(paramlen); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ ret = fi_eq_sread(eq, &event, entry, sizeof(*entry), -1, 0); ++ if (ret != -FI_EAVAIL) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "connect"); ++ return ret; ++ } ++ ++ memset(&err_entry, 0, sizeof(err_entry)); ++ ret = fi_eq_readerr(eq, &err_entry, 0); ++ if (ret != sizeof(err_entry)) { ++ FT_EQ_ERR(eq, err_entry, NULL, 0); ++ return err_entry.err; ++ } ++ ++ if (err_entry.err != FI_ECONNREFUSED) ++ return err_entry.err; ++ ++ /* Check data on FI_ECONNREFUSED error event. */ ++ return ft_check_buf(err_entry.err_data, err_entry.err_data_size); ++} ++ ++static int client_expect_accept(size_t paramlen) ++{ ++ size_t expected; ++ uint32_t event; ++ int ret; ++ ++ expected = paramlen + sizeof(*entry); ++ ++ ret = client_connect(paramlen); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ ret = fi_eq_sread(eq, &event, entry, expected, -1, 0); ++ if (ret != expected) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "connect"); ++ return ret; ++ } ++ ++ if (event != FI_CONNECTED || entry->fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, ++ entry->fid, ep); ++ return -FI_EOTHER; ++ } ++ ++ /* Check data on FI_CONNECTED event. */ ++ ret = ft_check_buf(entry->data, paramlen); ++ if (ret) ++ return ret; ++ ++ fi_shutdown(ep, 0); ++ return read_shutdown_event(); ++} ++ ++/* ++ * After each reject and accept of a connection request we close the endpoint and ++ * open a new one since fi_connect can be called only once in a connected ++ * endpoint's lifetime. ++ */ ++static int client(size_t paramlen) ++{ ++ int ret; ++ ++ ret = client_expect_reject(paramlen); ++ if (ret) ++ return ret; ++ ++ ret = client_open_new_ep(); ++ if (ret) ++ return ret; ++ ++ ret = client_expect_accept(paramlen); ++ if (ret) ++ return ret; ++ ++ return client_open_new_ep(); ++} ++ ++static int run(void) ++{ ++ char *node, *service; ++ uint64_t flags; ++ int ret; ++ size_t i; ++ ++ ret = ft_read_addr_opts(&node, &service, hints, &flags, &opts); ++ if (ret) ++ return ret; ++ ++ ret = opts.dst_addr ? client_setup() : server_setup(); ++ if (ret) { ++ fprintf(stderr, "error: %s\n", fi_strerror(-ret)); ++ return ret; ++ } ++ ++ /* Leave extra space for invalid size test */ ++ cm_data = calloc(1, cm_data_size + 1); ++ if (!cm_data) ++ return -FI_ENOMEM; ++ ++ entry = calloc(1, sizeof(*entry) + cm_data_size); ++ if (!entry) ++ return -FI_ENOMEM; ++ ++ if (opts.dst_addr) { ++ ret = ft_sock_connect(opts.dst_addr, sock_service); ++ if (ret) ++ goto err2; ++ } else { ++ ret = ft_sock_listen(opts.src_addr, sock_service); ++ if (ret) ++ goto err2; ++ ret = ft_sock_accept(); ++ if (ret) ++ goto err1; ++ } ++ ++ for (i = 1; i <= cm_data_size; i <<= 1) { ++ printf("trying with data size: %zu\n", i); ++ ++ if (opts.dst_addr) ++ ret = client(i); ++ else ++ ret = server(i); ++ ++ if (ret) ++ goto err1; ++ ++ ret = ft_sock_sync(0); ++ if (ret) ++ goto err1; ++ } ++ ++ /* Despite server not being setup to handle this, the client should fail ++ * with -FI_EINVAL since this exceeds its max data size. ++ */ ++ if (opts.dst_addr) { ++ printf("trying with data size exceeding maximum: %zu\n", ++ cm_data_size + 1); ++ /* Don't call client since it produces an error message. */ ++ ret = client_connect(cm_data_size + 1); ++ if (ret != -FI_EINVAL) { ++ FT_ERR("expected -FI_EINVAL, got: [%d]:%s\n", ret, ++ fi_strerror(-ret)); ++ } else { ++ ret = FI_SUCCESS; ++ } ++ } ++ ++err1: ++ ft_sock_shutdown(sock); ++err2: ++ free(entry); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE | FT_OPT_SKIP_REG_MR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "q:h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ case 'q': ++ sock_service = optarg; ++ break; ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], ++ "A MSG client-sever example that uses CM data."); ++ FT_PRINT_OPTS_USAGE("-q ", "management port"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cq_data.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cq_data.c +new file mode 100644 +index 0000000..7930a17 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cq_data.c +@@ -0,0 +1,144 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++static int run_test() ++{ ++ int ret; ++ size_t size = 1000; ++ struct fi_cq_data_entry comp; ++ ++ if (opts.dst_addr) { ++ fprintf(stdout, ++ "Posting send with CQ data: 0x%" PRIx64 "\n", ++ remote_cq_data); ++ ret = ft_post_tx(ep, remote_fi_addr, size, remote_cq_data, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ fprintf(stdout, "Done\n"); ++ } else { ++ fprintf(stdout, "Waiting for CQ data from client\n"); ++ ret = fi_cq_sread(rxcq, &comp, 1, NULL, -1); ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(rxcq); ++ } else { ++ FT_PRINTERR("fi_cq_sread", ret); ++ } ++ return ret; ++ } ++ ++ if (comp.flags & FI_REMOTE_CQ_DATA) { ++ if (comp.data == remote_cq_data) { ++ fprintf(stdout, "remote_cq_data: success\n"); ++ ret = 0; ++ } else { ++ fprintf(stdout, "error, Expected data:0x%" PRIx64 ++ ", Received data:0x%" PRIx64 "\n", ++ remote_cq_data, comp.data); ++ ret = -FI_EIO; ++ } ++ } else { ++ fprintf(stdout, "error, CQ data flag not set\n"); ++ ret = -FI_EBADFLAGS; ++ } ++ } ++ ++ return ret; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = run_test(); ++ ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ opts.comp_method = FT_COMP_SREAD; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A client-server example that transfers CQ data.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->domain_attr->cq_data_size = 4; /* required minimum */ ++ hints->mode |= FI_CONTEXT | FI_RX_CQ_DATA; ++ ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ cq_attr.format = FI_CQ_FORMAT_DATA; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram.c +new file mode 100644 +index 0000000..68f8925 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram.c +@@ -0,0 +1,84 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ return ft_send_recv_greeting(ep); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple DRAM client-sever example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_DGRAM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram_waitset.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram_waitset.c +new file mode 100644 +index 0000000..e8f9dbd +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram_waitset.c +@@ -0,0 +1,191 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ struct fi_wait_attr wait_attr; ++ int ret; ++ ++ memset(&wait_attr, 0, sizeof wait_attr); ++ wait_attr.wait_obj = FI_WAIT_UNSPEC; ++ ret = fi_wait_open(fabric, &wait_attr, &waitset); ++ if (ret) { ++ FT_PRINTERR("fi_wait_open", ret); ++ return ret; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int send_recv() ++{ ++ struct fi_cq_entry comp; ++ int ret; ++ ++ ret = fi_recv(ep, rx_buf, rx_size + ft_rx_prefix_size(), ++ mr_desc, 0, &rx_ctx); ++ if (ret) ++ return ret; ++ ++ ft_sync(); ++ ++ fprintf(stdout, "Posting a send...\n"); ++ ret = ft_post_tx(ep, remote_fi_addr, tx_size, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ while ((tx_cq_cntr < tx_seq) || (rx_cq_cntr < rx_seq)) { ++ /* Wait for completion events on CQs */ ++ ret = fi_wait(waitset, -1); ++ if (ret < 0) { ++ FT_PRINTERR("fi_wait", ret); ++ return ret; ++ } ++ ++ /* Read the send completion entry */ ++ ret = fi_cq_read(txcq, &comp, 1); ++ if (ret > 0) { ++ tx_cq_cntr++; ++ fprintf(stdout, "Received send completion event!\n"); ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(txcq); ++ } else { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ return ret; ++ } ++ ++ /* Read the recv completion entry */ ++ ret = fi_cq_read(rxcq, &comp, 1); ++ if (ret > 0) { ++ rx_cq_cntr++; ++ fprintf(stdout, "Received recv completion event!\n"); ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(rxcq); ++ } else { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av(); ++ if (ret) ++ return ret; ++ ++ return send_recv(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ opts.comp_method = FT_COMP_WAITSET; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A DGRAM client-server example that uses waitset.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_DGRAM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/inj_complete.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/inj_complete.c +new file mode 100644 +index 0000000..b7ac469 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/inj_complete.c +@@ -0,0 +1,210 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include "shared.h" ++ ++int use_sendmsg, use_recvmsg, send_inj_count; ++ ++static int send_msg(int sendmsg, size_t size) ++{ ++ int ret; ++ ft_tag = 0xabcd; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) ++ ft_fill_buf(tx_buf, size); ++ ++ if (sendmsg) { ++ ret = ft_sendmsg(ep, remote_fi_addr, size, ++ &tx_ctx, FI_INJECT_COMPLETE); ++ if (ret) { ++ FT_PRINTERR("ft_sendmsg", ret); ++ return ret; ++ } ++ } else { ++ ret = ft_post_tx(ep, remote_fi_addr, size, NO_CQ_DATA, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_post_rx", ret); ++ return ret; ++ } ++ } ++ ret = ft_cq_read_verify(txcq, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_cq_read_verify", ret); ++ return ret; ++ } ++ tx_cq_cntr++; ++ /* ++ Alter the tx buffer contents, if the inject event ++ was properly generated, then the changes to the TX buffer ++ will not be sent to the target. ++ */ ++ memset(tx_buf, 0xb, size); ++ ++ return 0; ++} ++ ++static int receive_msg(int recvmsg, size_t size) ++{ ++ int ret; ++ struct fi_context inj_ctx; ++ ft_tag = 0xabcd; ++ ++ if (recvmsg) { ++ ret = ft_recvmsg(ep, FI_ADDR_UNSPEC, size, ++ &inj_ctx, 0); ++ if (ret) { ++ FT_PRINTERR("ft_recvmsg", ret); ++ return ret; ++ } ++ } else { ++ ret = ft_post_rx(ep, size, &inj_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_post_rx", ret); ++ return ret; ++ } ++ } ++ ++ ret = ft_cq_read_verify(rxcq, &inj_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_cq_read_verify", ret); ++ return ret; ++ } ++ rx_cq_cntr++; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ ret = ft_check_buf(rx_buf, size); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret = 0, i; ++ ++ if (!use_sendmsg) ++ hints->tx_attr->op_flags |= FI_INJECT_COMPLETE; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ ret = ft_init_fabric_cm(); ++ if (ret) ++ return ret; ++ } else { ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ } ++ ++ fprintf(stdout, "Start testing FI_INJECT_COMPLETIONS\n"); ++ for (i = 0; i < send_inj_count; i++) { ++ if (opts.dst_addr) { ++ ret = send_msg(use_sendmsg, opts.transfer_size); ++ if (ret) ++ return ret; ++ } else { ++ ret = receive_msg(use_recvmsg, opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ } ++ fprintf(stdout, "GOOD: Completed FI_INJECT_COMPLETIONS Testing\n"); ++ ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ use_sendmsg = 0; ++ use_recvmsg = 0; ++ send_inj_count = 1; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "m:OSRvh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'O': ++ send_inj_count = 100; ++ break; ++ case 'm': ++ opts.transfer_size = strtoul(optarg, NULL, 0); ++ break; ++ case 'S': ++ use_sendmsg = 1; ++ break; ++ case 'R': ++ use_recvmsg = 1; ++ break; ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "FI_Inject_Completion Functional Test"); ++ FT_PRINT_OPTS_USAGE("-m ", "size of Injection message"); ++ FT_PRINT_OPTS_USAGE("-S", "enable testing with fi_sendmsg"); ++ FT_PRINT_OPTS_USAGE("-R", "enable testing with fi_recvmsg"); ++ FT_PRINT_OPTS_USAGE("-O", "enable testing injection overrun"); ++ FT_PRINT_OPTS_USAGE("-v", "Enable DataCheck testing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->mode = FI_CONTEXT; ++ hints->caps = FI_TAGGED; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/mcast.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/mcast.c +new file mode 100644 +index 0000000..650bbd2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/mcast.c +@@ -0,0 +1,115 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++static int listener; ++ ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ if (!listener) ++ fi->tx_attr->op_flags = FI_MULTICAST; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = ft_join_mc(); ++ if (ret) ++ return ret; ++ ++ remote_fi_addr = fi_mc_addr(mc); ++ return listener ? ft_recv_greeting(ep) : ft_send_greeting(ep); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "Mh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'M': ++ listener = 1; ++ break; ++ case '?': ++ case 'h': ++ goto usage; ++ } ++ } ++ ++ if (optind == argc) ++ goto usage; ++ ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_DGRAM; ++ hints->caps = FI_MSG | FI_MULTICAST; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++usage: ++ ft_mcusage(argv[0], "A simple multicast example."); ++ return EXIT_FAILURE; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg.c +new file mode 100644 +index 0000000..33e8b13 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg.c +@@ -0,0 +1,95 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++ ++static int run(void) ++{ ++ int ret; ++ ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ ret = ft_send_recv_greeting(ep); ++ ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple MSG client-sever example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_epoll.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_epoll.c +new file mode 100644 +index 0000000..3ce6b0b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_epoll.c +@@ -0,0 +1,239 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++ ++#if HAVE_EPOLL == 1 ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static int epfd; ++ ++static int alloc_epoll_res(void) ++{ ++ struct epoll_event event; ++ int ret, fd; ++ ++ epfd = epoll_create1(0); ++ if (epfd < 0) { ++ ret = -errno; ++ FT_PRINTERR("epoll_create1", ret); ++ return ret; ++ } ++ ++ memset((void *) &event, 0, sizeof event); ++ if (opts.dst_addr) { ++ fd = tx_fd; ++ event.data.ptr = (void *) &txcq->fid; ++ } else { ++ fd = rx_fd; ++ event.data.ptr = (void *) &rxcq->fid; ++ } ++ ++ event.events = EPOLLIN; ++ ret = epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &event); ++ if (ret) { ++ ret = -errno; ++ FT_PRINTERR("epoll_ctl", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int send_recv() ++{ ++ struct fi_cq_entry comp; ++ struct epoll_event event; ++ struct fid *fids[1]; ++ int ret; ++ const char *message = "Hello from Client!"; ++ size_t message_len = strlen(message) + 1; ++ ++ if (opts.dst_addr) { ++ fprintf(stdout, "Posting a send...\n"); ++ if (snprintf(tx_buf, tx_size, "%s", message) >= tx_size) { ++ fprintf(stderr, "Transmit buffer too small.\n"); ++ return -FI_ETOOSMALL; ++ } ++ ret = ft_post_tx(ep, remote_fi_addr, message_len, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ memset(&event, 0, sizeof event); ++ fids[0] = &txcq->fid; ++ do { ++ if (fi_trywait(fabric, fids, 1) == FI_SUCCESS) { ++ ret = TEMP_FAILURE_RETRY(epoll_wait(epfd, &event, 1, -1)); ++ if (ret < 0) { ++ ret = -errno; ++ FT_PRINTERR("epoll_wait", ret); ++ return ret; ++ } ++ ++ if (event.data.ptr != &txcq->fid) ++ fprintf(stdout, "unexpected event!\n"); ++ } ++ ++ ret = fi_cq_read(txcq, &comp, 1); ++ } while (ret == -FI_EAGAIN); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) ++ ret = ft_cq_readerr(txcq); ++ return ret; ++ } ++ ++ fprintf(stdout, "Send completion received\n"); ++ } else { ++ fprintf(stdout, "Waiting for client...\n"); ++ ++ memset(&event, 0, sizeof event); ++ fids[0] = &rxcq->fid; ++ do { ++ if (fi_trywait(fabric, fids, 1) == FI_SUCCESS) { ++ ret = TEMP_FAILURE_RETRY(epoll_wait(epfd, &event, 1, -1)); ++ if (ret < 0) { ++ ret = -errno; ++ FT_PRINTERR("epoll_wait", ret); ++ return ret; ++ } ++ ++ if (event.data.ptr != &rxcq->fid) { ++ fprintf(stdout, "unexpected event!\n"); ++ } ++ } ++ ++ ret = fi_cq_read(rxcq, &comp, 1); ++ } while (ret == -FI_EAGAIN); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) ++ ret = ft_cq_readerr(rxcq); ++ return ret; ++ } ++ ++ ret = check_recv_msg(message); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received data from client: %s\n", (char *) rx_buf); ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ ret = alloc_epoll_res(); ++ if (ret) ++ return ret; ++ ++ ret = send_recv(); ++ ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ opts.comp_method = FT_COMP_WAIT_FD; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple MSG client-sever example that " ++ "demonstrates one possible usage of the underlying " ++ "cq wait objects."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ close(epfd); ++ return ft_exit_code(ret); ++} ++ ++#else ++ ++#include ++ ++int main(int argc, char **argv) ++{ ++ return ft_exit_code(FI_ENODATA); ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_sockets.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_sockets.c +new file mode 100644 +index 0000000..ede5e6c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_sockets.c +@@ -0,0 +1,493 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++union sockaddr_any { ++ struct sockaddr sa; ++ struct sockaddr_in sin; ++ struct sockaddr_in6 sin6; ++ struct sockaddr_storage ss; ++}; ++ ++static union sockaddr_any bound_addr; ++static size_t bound_addr_len = sizeof bound_addr; ++ ++ ++/* Wrapper for memcmp for sockaddr. Note that the sockaddr structure may ++ * contain holes, so sockaddr's are expected to have been initialized to all ++ * zeroes prior to being filled with an address. */ ++static int ++sockaddrcmp(const union sockaddr_any *actual, socklen_t actual_len, ++ const union sockaddr_any *expected, socklen_t expected_len) ++{ ++ if (actual->sa.sa_family != expected->sa.sa_family) { ++ return actual->sa.sa_family - expected->sa.sa_family; ++ } else if (actual_len != expected_len) { ++ return actual_len - expected_len; ++ } ++ ++ /* Handle binds to wildcard addresses, for address types we know ++ * about */ ++ switch (expected->sa.sa_family) { ++ case AF_INET: ++ if (expected->sin.sin_addr.s_addr == INADDR_ANY) { ++ return 0; ++ } ++ break; ++ case AF_INET6: ++ if (!memcmp(&expected->sin6.sin6_addr, ++ &in6addr_any, sizeof(struct in6_addr))) { ++ return 0; ++ } ++ break; ++ } ++ return memcmp(actual, expected, actual_len); ++} ++ ++/* Returns a string for the given sockaddr using getnameinfo(). This returns a ++ * static buffer so it is not reentrant or thread-safe. Returns the string on ++ * success and NULL on failure. */ ++static const char * ++sockaddrstr(const union sockaddr_any *addr, socklen_t len, char *buf, size_t buflen) ++{ ++ static char namebuf[BUFSIZ]; ++ static char servbuf[BUFSIZ]; ++ int errcode; ++ ++ if ((errcode = getnameinfo(&addr->sa, len, namebuf, BUFSIZ, ++ servbuf, BUFSIZ, ++ NI_NUMERICHOST | NI_NUMERICSERV))) { ++ if (errcode != EAI_SYSTEM) { ++ fprintf(stderr, "getnameinfo: %s\n", gai_strerror(errcode)); ++ } else { ++ fprintf(stderr, "getnameinfo: %s\n", strerror(errno)); ++ } ++ return NULL; ++ } ++ ++ snprintf(buf, buflen, "[%s]:%s", namebuf, servbuf); ++ return buf; ++} ++ ++static int check_address(struct fid *fid, const char *message) ++{ ++ char buf1[BUFSIZ], buf2[BUFSIZ]; ++ union sockaddr_any tmp; ++ size_t tmplen; ++ const char *ep_addr, *addr_expected; ++ int ret; ++ ++ memset(&tmp, 0, sizeof tmp); ++ tmplen = sizeof tmp; ++ ret = fi_getname(fid, &tmp, &tmplen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ } ++ ++ if (sockaddrcmp(&tmp, tmplen, &bound_addr, bound_addr_len)) { ++ ep_addr = sockaddrstr(&tmp, tmplen, buf1, BUFSIZ); ++ if (!ep_addr) { ++ FT_ERR("Unable to get ep_addr as string!"); ++ return -FI_EINVAL; ++ } ++ ++ addr_expected = sockaddrstr(&bound_addr, bound_addr_len, buf2, BUFSIZ); ++ if (!addr_expected) { ++ FT_ERR("Unable to get addr_expected as string!"); ++ return -FI_EINVAL; ++ } ++ ++ FT_ERR("address changed after %s: got %s expected %s", ++ message, ep_addr, addr_expected); ++ return -FI_EINVAL; ++ } ++ ++ return 0; ++} ++ ++static int server_listen(void) ++{ ++ int ret; ++ ++ ret = fi_pep_bind(pep, &eq->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_pep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_listen(pep); ++ if (ret) { ++ FT_PRINTERR("fi_listen", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int server_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ /* Wait for connection request from client */ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PRINTERR("fi_eq_sread", rd); ++ return (int) rd; ++ } ++ ++ fi = entry.info; ++ if (event != FI_CONNREQ) { ++ FT_ERR("Unexpected CM event %d", event); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ goto err; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ goto err; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ goto err; ++ ++ /* Accept the incoming connection. Also transitions endpoint to active state */ ++ ret = fi_accept(ep, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ goto err; ++ } ++ ++ /* Wait for the connection to be established */ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PRINTERR("fi_eq_sread", rd); ++ goto err; ++ } ++ ++ if (event != FI_CONNECTED || entry.fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ ++ ret = check_address(&ep->fid, "accept"); ++ if (ret) { ++ goto err; ++ } ++ ++ return 0; ++ ++err: ++ fi_reject(pep, fi->handle, NULL, 0); ++ return ret; ++} ++ ++static int client_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ ret = fi_getinfo(FT_FIVERSION, opts.dst_addr, opts.dst_port, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ return ret; ++ } ++ ++ ret = check_address(&pep->fid, "fi_endpoint (pep)"); ++ if (ret) ++ return ret; ++ ++ assert(fi->handle == &pep->fid); ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ /* Close the passive endpoint that we "stole" the source address ++ * from */ ++ FT_CLOSE_FID(pep); ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = check_address(&ep->fid, "fi_endpoint (ep)"); ++ if (ret) ++ return ret; ++ ++ /* Connect to server */ ++ ret = fi_connect(ep, fi->dest_addr, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ /* Wait for the connection to be established */ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "listen"); ++ return (int) rd; ++ } ++ ++ if (event != FI_CONNECTED || entry.fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, entry.fid, ep); ++ return -FI_EOTHER; ++ } ++ ++ ret = check_address(&ep->fid, "connect"); ++ if (ret) { ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int setup_handle(void) ++{ ++ static char buf[BUFSIZ]; ++ struct addrinfo *ai, aihints; ++ const char *bound_addr_str; ++ char *saved_addr; ++ size_t saved_addrlen; ++ int ret; ++ ++ ret = ft_startup(); ++ if (ret) { ++ FT_ERR("ft_startup: %d", ret); ++ return ret; ++ } ++ ++ memset(&aihints, 0, sizeof aihints); ++ aihints.ai_flags = AI_PASSIVE; ++ ret = getaddrinfo(opts.src_addr, opts.src_port, &aihints, &ai); ++ if (ret == EAI_SYSTEM) { ++ FT_ERR("getaddrinfo for %s:%s: %s", ++ opts.src_addr, opts.src_port, strerror(errno)); ++ return -ret; ++ } else if (ret) { ++ FT_ERR("getaddrinfo: %s", gai_strerror(ret)); ++ return -FI_ENODATA; ++ } ++ ++ switch (ai->ai_family) { ++ case AF_INET: ++ hints->addr_format = FI_SOCKADDR_IN; ++ break; ++ case AF_INET6: ++ hints->addr_format = FI_SOCKADDR_IN6; ++ break; ++ } ++ ++ /* Get fabric info */ ++ ret = fi_getinfo(FT_FIVERSION, opts.src_addr, NULL, FI_SOURCE, hints, &fi_pep); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto freeai; ++ } ++ ++ /* Open passive endpoint without source address */ ++ saved_addr = fi_pep->src_addr; ++ saved_addrlen = fi_pep->src_addrlen; ++ fi_pep->src_addr = NULL; ++ fi_pep->src_addrlen = 0; ++ ++ ret = fi_fabric(fi_pep->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_fabric", ret); ++ goto out; ++ } ++ ++ ret = fi_eq_open(fabric, &eq_attr, &eq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_eq_open", ret); ++ goto out; ++ } ++ ++ /* Open a passive endpoint */ ++ ret = fi_passive_ep(fabric, fi_pep, &pep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_passive_ep", ret); ++ goto out; ++ } ++ ++ ret = fi_setname(&pep->fid, ai->ai_addr, ai->ai_addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_setname", ret); ++ goto out; ++ } ++ ++ ret = fi_getname(&pep->fid, &bound_addr, &bound_addr_len); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ goto out; ++ } ++ ++ /* Verify port number */ ++ switch (ai->ai_family) { ++ case AF_INET: ++ if (bound_addr.sin.sin_port == 0) { ++ FT_ERR("port number is 0 after fi_setname()"); ++ ret = -FI_EINVAL; ++ goto out; ++ } ++ break; ++ case AF_INET6: ++ if (bound_addr.sin6.sin6_port == 0) { ++ FT_ERR("port number is 0 after fi_setname()"); ++ ret = -FI_EINVAL; ++ goto out; ++ } ++ break; ++ } ++ ++ bound_addr_str = sockaddrstr(&bound_addr, bound_addr_len, buf, BUFSIZ); ++ if (!bound_addr_str) { ++ FT_ERR("Unable to get bound_addr as string!"); ++ ret = -FI_EINVAL; ++ goto out; ++ } ++ printf("bound_addr: \"%s\"\n", bound_addr_str); ++ ++ hints->handle = &pep->fid; ++out: ++ fi_pep->src_addr = saved_addr; ++ fi_pep->src_addrlen = saved_addrlen; ++freeai: ++ freeaddrinfo(ai); ++ return ret; ++} ++ ++static int run(void) ++{ ++ char *node, *service; ++ uint64_t flags; ++ int ret; ++ ++ ret = ft_read_addr_opts(&node, &service, hints, &flags, &opts); ++ if (ret) ++ return ret; ++ ++ if (!opts.src_port) ++ opts.src_port = "9229"; ++ ++ if (!opts.src_addr) { ++ fprintf(stderr, "Source address (-s) is required for this test\n"); ++ return -EXIT_FAILURE; ++ } ++ ++ ret = setup_handle(); ++ if (ret) ++ return ret; ++ ++ if (!opts.dst_addr) { ++ ret = server_listen(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? client_connect() : server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ ret = ft_send_recv_greeting(ep); ++ ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple MSG client-sever example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->addr_format = FI_SOCKADDR; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_ep.c +new file mode 100644 +index 0000000..fe1c815 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_ep.c +@@ -0,0 +1,319 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++static struct fid_ep **eps; ++static char *data_bufs; ++static char **send_bufs; ++static char **recv_bufs; ++static struct fi_context *recv_ctx; ++static struct fi_context *send_ctx; ++static fi_addr_t *remote_addr; ++int num_eps = 3; ++ ++ ++static int alloc_multi_ep_res() ++{ ++ char *rx_buf_ptr; ++ int i; ++ ++ eps = calloc(num_eps, sizeof(*eps)); ++ remote_addr = calloc(num_eps, sizeof(*remote_addr)); ++ send_bufs = calloc(num_eps, sizeof(*send_bufs)); ++ recv_bufs = calloc(num_eps, sizeof(*recv_bufs)); ++ send_ctx = calloc(num_eps, sizeof(*send_ctx)); ++ recv_ctx = calloc(num_eps, sizeof(*recv_ctx)); ++ data_bufs = calloc(num_eps * 2, opts.transfer_size); ++ ++ if (!eps || !remote_addr || !send_bufs || !recv_bufs || ++ !send_ctx || !recv_ctx || !data_bufs) ++ return -FI_ENOMEM; ++ ++ rx_buf_ptr = data_bufs + opts.transfer_size * num_eps; ++ for (i = 0; i < num_eps; i++) { ++ send_bufs[i] = data_bufs + opts.transfer_size * i; ++ recv_bufs[i] = rx_buf_ptr + opts.transfer_size * i; ++ } ++ ++ return 0; ++} ++ ++static void free_ep_res() ++{ ++ int i; ++ ++ for (i = 0; i < num_eps; i++) ++ FT_CLOSE_FID(eps[i]); ++ ++ free(data_bufs); ++ free(send_bufs); ++ free(recv_bufs); ++ free(send_ctx); ++ free(recv_ctx); ++ free(remote_addr); ++ free(eps); ++} ++ ++static int do_transfers(void) ++{ ++ int i, ret; ++ ++ for (i = 0; i < num_eps; i++) { ++ rx_buf = recv_bufs[i]; ++ ret = ft_post_rx(eps[i], opts.transfer_size, &recv_ctx[i]); ++ if (ret) ++ return ret; ++ } ++ ++ for (i = 0; i < num_eps; i++) { ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) ++ ft_fill_buf(send_bufs[i], opts.transfer_size); ++ ++ tx_buf = send_bufs[i]; ++ ret = ft_post_tx(eps[i], remote_addr[i], opts.transfer_size, NO_CQ_DATA, &send_ctx[i]); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_get_tx_comp(num_eps); ++ if (ret < 0) ++ return ret; ++ ++ ret = ft_get_rx_comp(num_eps); ++ if (ret < 0) ++ return ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ for (i = 0; i < num_eps; i++) { ++ ret = ft_check_buf(recv_bufs[i], opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ for (i = 0; i < num_eps; i++) ++ ft_finalize_ep(eps[i]); ++ ++ printf("PASSED multi ep\n"); ++ return 0; ++} ++ ++static int setup_client_ep(struct fid_ep **ep) ++{ ++ int ret; ++ ++ ret = fi_endpoint(domain, fi, ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ret = ft_enable_ep(*ep, eq, av, txcq, rxcq, txcntr, rxcntr); ++ if (ret) ++ return ret; ++ ++ ret = ft_connect_ep(*ep, eq, fi->dest_addr); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int setup_server_ep(struct fid_ep **ep) ++{ ++ int ret; ++ ++ ret = ft_retrieve_conn_req(eq, &fi); ++ if (ret) ++ goto failed_accept; ++ ++ ret = fi_endpoint(domain, fi, ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ goto failed_accept; ++ } ++ ++ ret = ft_enable_ep(*ep, eq, av, txcq, rxcq, txcntr, rxcntr); ++ if (ret) ++ goto failed_accept; ++ ++ ret = ft_accept_connection(*ep, eq); ++ if (ret) ++ goto failed_accept; ++ ++ return 0; ++ ++failed_accept: ++ fi_reject(pep, fi->handle, NULL, 0); ++ return ret; ++} ++ ++static int setup_av_ep(struct fid_ep **ep, fi_addr_t *remote_addr) ++{ ++ int ret; ++ hints->src_addr = NULL; ++ ++ fi_freeinfo(fi); ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ ret = fi_endpoint(domain, fi, ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ret = ft_enable_ep(*ep, eq, av, txcq, rxcq, txcntr, rxcntr); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av_addr(av, *ep, remote_addr); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int i, ret; ++ ++ ret = alloc_multi_ep_res(); ++ if (ret) ++ return ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ ret = ft_init_fabric_cm(); ++ if (ret) ++ return ret; ++ } else { ++ opts.av_size = num_eps + 1; ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ } ++ ++ /* Create additional endpoints. */ ++ for (i = 0; i < num_eps; i++) { ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ if (opts.dst_addr) { ++ ret = setup_client_ep(&eps[i]); ++ if (ret) ++ return ret; ++ } else { ++ ret = setup_server_ep(&eps[i]); ++ if (ret) ++ return ret; ++ } ++ } else { ++ ret = setup_av_ep(&eps[i], &remote_addr[i]); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ tx_cq_cntr = rx_cq_cntr = 0; ++ tx_seq = rx_seq = 0; ++ ret = do_transfers(); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.transfer_size = 256; ++ opts.options |= FT_OPT_SKIP_REG_MR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "c:vh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'c': ++ num_eps = atoi(optarg); ++ break; ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Multi endpoint test"); ++ FT_PRINT_OPTS_USAGE("-c ", ++ "number of endpoints to create and test (def 3)"); ++ FT_PRINT_OPTS_USAGE("-v", "Enable DataCheck testing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ ++ ret = run_test(); ++ ++ free_ep_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_mr.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_mr.c +new file mode 100644 +index 0000000..de01d7b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_mr.c +@@ -0,0 +1,325 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++struct test_mr { ++ uint8_t *buf; ++ struct fid_cntr *rcntr; ++ uint64_t rcntr_next; ++ struct fid_mr *mr; ++ struct fi_rma_iov *remote; ++}; ++ ++struct test_mr *mr_res_array; ++uint8_t *mr_buf_array; ++struct fi_rma_iov *remote_array; ++uint64_t mr_count; ++int verbose; ++ ++static int wait_cntr(struct fid_cntr *cntr, uint64_t *cntr_next) ++{ ++ /* 30 second wait timeout */ ++ int ret = fi_cntr_wait(cntr, *cntr_next, 30 * 1000); ++ if (ret < 0) ++ return ret; ++ ++ *cntr_next += 1; ++ ++ return 0; ++} ++ ++static int free_mr_res() ++{ ++ int i; ++ ++ if (!mr_res_array) ++ return 0; ++ ++ for (i = 0; i < mr_count; i++) { ++ FT_CLOSE_FID(mr_res_array[i].mr); ++ FT_CLOSE_FID(mr_res_array[i].rcntr); ++ } ++ free(mr_res_array); ++ free(remote_array); ++ free(mr_buf_array); ++ ++ return 0; ++} ++ ++static int alloc_multi_mr_res() ++{ ++ int i = 0; ++ ++ mr_res_array = calloc(mr_count, sizeof(*mr_res_array)); ++ if (!mr_res_array) ++ return -FI_ENOMEM; ++ ++ remote_array = calloc(mr_count, sizeof(*remote_array)); ++ if (!remote_array) ++ return -FI_ENOMEM; ++ ++ mr_buf_array = calloc(mr_count, opts.transfer_size); ++ if (!mr_buf_array) ++ return -FI_ENOMEM; ++ ++ for (i = 0; i < mr_count; i++) { ++ mr_res_array[i].remote = &remote_array[i]; ++ mr_res_array[i].buf = &mr_buf_array[i]; ++ } ++ ++ return 0; ++} ++ ++static int init_multi_mr_res() ++{ ++ int ret = 0, i; ++ ++ if ((1ULL << fi->domain_attr->mr_key_size) < mr_count) { ++ fprintf(stderr, "ERROR: too many memory regions for unique mr keys"); ++ return -FI_EINVAL; ++ } ++ ++ ret = alloc_multi_mr_res(); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < mr_count; i++) { ++ ret = fi_cntr_open(domain, ++ &cntr_attr, ++ &mr_res_array[i].rcntr, ++ NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ ++ mr_res_array[i].remote->len = opts.transfer_size; ++ mr_res_array[i].remote->addr = 0; ++ ++ memset(mr_res_array[i].buf, 0, opts.transfer_size); ++ ++ mr_res_array[i].rcntr_next = 1; ++ ++ mr_res_array[i].remote->key = i + 1; ++ ++ ret = fi_mr_reg(domain, mr_res_array[i].buf, ++ opts.transfer_size, FI_REMOTE_WRITE, ++ 0, mr_res_array[i].remote->key, ++ 0, &mr_res_array[i].mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ if (verbose) { ++ printf("MR_REG:domain_ptr, buf_ptr, mr_size, mr_ptr, mr_key)\n"); ++ printf("%p, %p, %d, %p, %lu)\n", ++ domain, ++ mr_res_array[i].buf, ++ opts.transfer_size, ++ &mr_res_array[i].mr, ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ } ++ ++ ret = fi_mr_bind(mr_res_array[i].mr, ++ &mr_res_array[i].rcntr->fid, ++ FI_REMOTE_WRITE); ++ if (ret) { ++ FT_PRINTERR("fi_mr_bind", ret); ++ return ret; ++ } ++ } ++ ++ return ret; ++} ++ ++static int mr_key_test() ++{ ++ int i, ret = 0; ++ struct fi_context rma_ctx; ++ ++ for (i = 0; i < mr_count; i++) { ++ tx_buf = (char *)mr_res_array[i].buf; ++ ++ if (opts.dst_addr) { ++ ft_fill_buf(mr_res_array[i].buf, ++ opts.transfer_size); ++ ++ if (verbose) ++ printf("write to host's key %lx\n", ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ ++ ft_post_rma(FT_RMA_WRITE, ep, opts.transfer_size, ++ mr_res_array[i].remote, &rma_ctx); ++ ++ if (verbose) ++ printf("sent successfully\n"); ++ ++ ret = wait_cntr(mr_res_array[i].rcntr, ++ &mr_res_array[i].rcntr_next); ++ if (ret) ++ return ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ if (verbose) ++ printf("checking result in buffer %p, key %lx\n", ++ mr_res_array[i].buf, ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ ++ ret = ft_check_buf(mr_res_array[i].buf, ++ opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ } else { ++ ret = wait_cntr(mr_res_array[i].rcntr, ++ &mr_res_array[i].rcntr_next); ++ if (ret) ++ return ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ if (verbose) ++ printf("checking result in buffer %p, key %lx\n", ++ mr_res_array[i].buf, ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ ++ ret = ft_check_buf(mr_res_array[i].buf, ++ opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ ++ ft_fill_buf(mr_res_array[i].buf, ++ opts.transfer_size); ++ ++ if (verbose) ++ printf("write to client's key %lx\n", ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ ++ ft_post_rma(FT_RMA_WRITE, ep, opts.transfer_size, ++ mr_res_array[i].remote, &rma_ctx); ++ ++ if (verbose) ++ printf("sent successfully\n"); ++ } ++ } ++ printf("GOOD, multi mr key test complete\n"); ++ ++ return ret; ++} ++ ++static int run_test(void) ++{ ++ int ret = 0; ++ ++ ft_mr_alloc_func = init_multi_mr_res; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = mr_key_test(); ++ ++ ft_sync(); ++ ft_finalize(); ++ ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.transfer_size = 4096; ++ mr_count = 2; ++ verbose = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "c:Vvh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'c': ++ mr_count = strtoull(optarg, NULL, 10); ++ break; ++ case 'V': ++ verbose = 1; ++ break; ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Ping-pong multi memory region test"); ++ FT_PRINT_OPTS_USAGE("-c ", "number of memory regions to create and test"); ++ FT_PRINT_OPTS_USAGE("-V", "Enable verbose printing"); ++ FT_PRINT_OPTS_USAGE("-v", "Enable DataCheck testing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_RMA | FI_RMA_EVENT | FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ free_mr_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/poll.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/poll.c +new file mode 100644 +index 0000000..30b2e67 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/poll.c +@@ -0,0 +1,278 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++#define MAX_POLL_CNT 10 ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ struct fi_poll_attr poll_attr; ++ int ret; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ memset(&poll_attr, 0, sizeof poll_attr); ++ ret = fi_poll_open(domain, &poll_attr, &pollset); ++ if (ret) { ++ FT_PRINTERR("fi_poll_open", ret); ++ return ret; ++ } ++ ++ if (txcq) { ++ ret = fi_poll_add(pollset, &txcq->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (rxcq) { ++ ret = fi_poll_add(pollset, &rxcq->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (txcntr) { ++ ret = fi_poll_add(pollset, &txcntr->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (rxcntr) { ++ ret = fi_poll_add(pollset, &rxcntr->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ return 0; ++err: ++ FT_PRINTERR("fi_poll_add", ret); ++ return ret; ++} ++ ++static int free_poll_res(void) ++{ ++ int ret; ++ ++ if (txcq) { ++ ret = fi_poll_del(pollset, &txcq->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (rxcq) { ++ ret = fi_poll_del(pollset, &rxcq->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (txcntr) { ++ ret = fi_poll_del(pollset, &txcntr->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (rxcntr) { ++ ret = fi_poll_del(pollset, &rxcntr->fid, 0); ++ if (ret) ++ goto err; ++ } ++ return 0; ++err: ++ FT_PRINTERR("fi_poll_del", ret); ++ return ret; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ return 0; ++} ++ ++static int send_recv() ++{ ++ struct fid_cq *cq; ++ void *context[MAX_POLL_CNT]; ++ struct fi_cq_entry comp; ++ int ret; ++ int ret_count = 0; ++ int i, tx_cntr_val = 0, rx_cntr_val = 0; ++ ++ fprintf(stdout, "Posting a send...\n"); ++ ret = ft_post_tx(ep, remote_fi_addr, tx_size, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ while (((opts.options & FT_OPT_TX_CQ) && (tx_cq_cntr < tx_seq)) || ++ ((opts.options & FT_OPT_TX_CNTR) && (tx_cntr_val < tx_seq)) || ++ ((opts.options & FT_OPT_RX_CQ) && (rx_cq_cntr < rx_seq)) || ++ ((opts.options & FT_OPT_RX_CNTR) && (rx_cntr_val < rx_seq))) { ++ ++ /* Poll send and recv CQs/Cntrs */ ++ do { ++ ret_count = fi_poll(pollset, context, MAX_POLL_CNT); ++ if (ret_count < 0) { ++ FT_PRINTERR("fi_poll", ret_count); ++ return ret_count; ++ } ++ } while (!ret_count); ++ ++ fprintf(stdout, "Retrieved %d event(s)\n", ret_count); ++ ++ for (i = 0; i < ret_count; i++) { ++ if (context[i] == &txcq) { ++ printf("Send completion received\n"); ++ cq = txcq; ++ tx_cq_cntr++; ++ } else if (context[i] == &rxcq) { ++ printf("Recv completion received\n"); ++ cq = rxcq; ++ rx_cq_cntr++; ++ } else if (context[i] == &txcntr) { ++ printf("Send counter poll-event\n"); ++ tx_cntr_val = fi_cntr_read(txcntr); ++ if (tx_cntr_val > tx_seq) { ++ FT_ERR("Invalid tx counter event\n"); ++ FT_ERR("expected: %" PRIu64 ", found: " ++ "%d\n", tx_seq, tx_cntr_val); ++ return -1; ++ } ++ continue; ++ } else if (context[i] == &rxcntr) { ++ printf("Recv counter poll-event\n"); ++ rx_cntr_val = fi_cntr_read(rxcntr); ++ if (rx_cntr_val > rx_seq) { ++ FT_ERR("Invalid rx counter event\n"); ++ FT_ERR("expected: %" PRIu64 ", found: " ++ "%d\n", rx_seq, rx_cntr_val); ++ return -1; ++ } ++ continue; ++ } else { ++ FT_ERR("Unknown completion received\n"); ++ return -1; ++ } ++ ++ /* Read the completion entry */ ++ ret = fi_cq_read(cq, &comp, 1); ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(cq); ++ } else { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ return ret; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av(); ++ if (ret) ++ return ret; ++ ++ return send_recv(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A client-server example that uses poll.\n"); ++ FT_PRINT_OPTS_USAGE("-t ", "completion type [queue, counter]"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ free_poll_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm.c +new file mode 100644 +index 0000000..e9edf9b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm.c +@@ -0,0 +1,84 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ return ft_send_recv_greeting(ep); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple RDM client-sever example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_atomic.c +new file mode 100644 +index 0000000..3750f9a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_atomic.c +@@ -0,0 +1,544 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "shared.h" ++ ++static enum fi_op op_type = FI_MIN; ++static void *result; ++static void *compare; ++ ++static struct fid_mr *mr_result; ++static struct fid_mr *mr_compare; ++static struct fi_context fi_ctx_atomic; ++ ++static enum fi_datatype datatype; ++static size_t *count; ++static int run_all_ops = 1, run_all_datatypes = 1; ++ ++static enum fi_op get_fi_op(char *op) ++{ ++ if (!strcmp(op, "min")) ++ return FI_MIN; ++ else if (!strcmp(op, "max")) ++ return FI_MAX; ++ else if (!strcmp(op, "sum")) ++ return FI_SUM; ++ else if (!strcmp(op, "prod")) ++ return FI_PROD; ++ else if (!strcmp(op, "lor")) ++ return FI_LOR; ++ else if (!strcmp(op, "land")) ++ return FI_LAND; ++ else if (!strcmp(op, "bor")) ++ return FI_BOR; ++ else if (!strcmp(op, "band")) ++ return FI_BAND; ++ else if (!strcmp(op, "lxor")) ++ return FI_LXOR; ++ else if (!strcmp(op, "bxor")) ++ return FI_BXOR; ++ else if (!strcmp(op, "read")) ++ return FI_ATOMIC_READ; ++ else if (!strcmp(op, "write")) ++ return FI_ATOMIC_WRITE; ++ else if (!strcmp(op, "cswap")) ++ return FI_CSWAP; ++ else if (!strcmp(op, "cswap_ne")) ++ return FI_CSWAP_NE; ++ else if (!strcmp(op, "cswap_le")) ++ return FI_CSWAP_LE; ++ else if (!strcmp(op, "cswap_lt")) ++ return FI_CSWAP_LT; ++ else if (!strcmp(op, "cswap_ge")) ++ return FI_CSWAP_GE; ++ else if (!strcmp(op, "cswap_gt")) ++ return FI_CSWAP_GT; ++ else if (!strcmp(op, "mswap")) ++ return FI_MSWAP; ++ else { ++ fprintf(stderr, "Not a valid atomic operation\n"); ++ return FI_ATOMIC_OP_LAST; ++ } ++} ++ ++static enum fi_datatype get_fi_datatype(char *op) ++{ ++ if (!strcmp(op, "int8")) ++ return FI_INT8; ++ else if (!strcmp(op, "uint8")) ++ return FI_UINT8; ++ else if (!strcmp(op, "int16")) ++ return FI_INT16; ++ else if (!strcmp(op, "uint16")) ++ return FI_UINT16; ++ else if (!strcmp(op, "int32")) ++ return FI_INT32; ++ else if (!strcmp(op, "uint32")) ++ return FI_UINT32; ++ else if (!strcmp(op, "int64")) ++ return FI_INT64; ++ else if (!strcmp(op, "uint64")) ++ return FI_UINT64; ++ else if (!strcmp(op, "float")) ++ return FI_FLOAT; ++ else if (!strcmp(op, "double")) ++ return FI_DOUBLE; ++ else if (!strcmp(op, "float_complex")) ++ return FI_FLOAT_COMPLEX; ++ else if (!strcmp(op, "double_complex")) ++ return FI_DOUBLE_COMPLEX; ++ else if (!strcmp(op, "long_double")) ++ return FI_LONG_DOUBLE; ++ else if (!strcmp(op, "long_double_complex")) ++ return FI_LONG_DOUBLE_COMPLEX; ++ else { ++ fprintf(stderr, "Not a valid atomic operation\n"); ++ return FI_DATATYPE_LAST; ++ } ++} ++ ++static void print_opts_usage(char *name) ++{ ++ ft_csusage(name, NULL); ++ /* Atomic op type */ ++ FT_PRINT_OPTS_USAGE("-o ", "atomic op type: all|min|max|sum|prod|lor|"); ++ FT_PRINT_OPTS_USAGE("", "land|bor|band|lxor|bxor|read|write|cswap|cswap_ne|" ++ "cswap_le|cswap_lt|"); ++ FT_PRINT_OPTS_USAGE("", "cswap_ge|cswap_gt|mswap (default: all)"); ++ /* Atomic datatype */ ++ FT_PRINT_OPTS_USAGE("-z ", "atomic datatype: int8|uint8|int16|uint16|"); ++ FT_PRINT_OPTS_USAGE("", "int32|uint32|int64|uint64|float|double|" ++ "float_complex|double_complex|"); ++ FT_PRINT_OPTS_USAGE("", "long_double|long_double_complex (default: all)"); ++} ++ ++#define create_atomic_op_executor(type) \ ++static inline int execute_atomic_ ## type ## _op(enum fi_op op_type, \ ++ enum fi_datatype datatype) \ ++{ \ ++ int ret = FI_SUCCESS, len, i; \ ++ len = snprintf((test_name), sizeof(test_name), "%s_", \ ++ fi_tostr(&(datatype), FI_TYPE_ATOMIC_TYPE)); \ ++ snprintf((test_name) + len, sizeof(test_name) - len, "%s_"#type"_lat", \ ++ fi_tostr(&op_type, FI_TYPE_ATOMIC_OP)); \ ++ opts.transfer_size = datatype_to_size(datatype); \ ++ \ ++ ft_start(); \ ++ for (i = 0; i < opts.iterations; i++) { \ ++ ret = execute_ ## type ## _atomic_op(op_type); \ ++ if (ret) \ ++ break; \ ++ } \ ++ ft_stop(); \ ++ report_perf(); \ ++ \ ++ return ret; \ ++} ++ ++#define create_atomic_op_handler(type) \ ++create_atomic_op_executor(type) \ ++static inline int handle_atomic_ ## type ## _op(int run_all_datatypes, \ ++ enum fi_op op_type, \ ++ size_t *count) \ ++{ \ ++ int ret = FI_SUCCESS; \ ++ \ ++ if (run_all_datatypes) { \ ++ for (datatype = 0; datatype < FI_DATATYPE_LAST; datatype++) { \ ++ ret = check_ ## type ## _atomic_op(ep, op_type, \ ++ datatype, count); \ ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP) { \ ++ fprintf(stderr, \ ++ "Provider doesn't support %s ", \ ++ fi_tostr(&op_type, \ ++ FI_TYPE_ATOMIC_OP)); \ ++ fprintf(stderr, \ ++ #type" atomic operation on %s\n", \ ++ fi_tostr(&datatype, \ ++ FI_TYPE_ATOMIC_TYPE)); \ ++ continue; \ ++ } else if (ret) { \ ++ goto fn; \ ++ } \ ++ \ ++ ret = execute_atomic_ ##type ## _op(op_type, datatype); \ ++ if (ret) \ ++ goto fn; \ ++ } \ ++ } else { \ ++ ret = check_ ## type ## _atomic_op(ep, op_type, \ ++ datatype, count); \ ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP) { \ ++ fprintf(stderr, \ ++ "Provider doesn't support %s ", \ ++ fi_tostr(&op_type, \ ++ FI_TYPE_ATOMIC_OP)); \ ++ fprintf(stderr, \ ++ #type" atomic operation on %s\n", \ ++ fi_tostr(&datatype, \ ++ FI_TYPE_ATOMIC_TYPE)); \ ++ goto fn; \ ++ } else if (ret) { \ ++ goto fn; \ ++ } \ ++ \ ++ ret = execute_atomic_ ## type ##_op(op_type, datatype); \ ++ } \ ++ \ ++fn: \ ++ return ret; \ ++} ++ ++ ++static inline int execute_base_atomic_op(enum fi_op op) ++{ ++ int ret; ++ ++ ret = ft_post_atomic(FT_ATOMIC_BASE, ep, NULL, NULL, NULL, NULL, ++ &remote, datatype, op, &fi_ctx_atomic); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ ++ return ret; ++} ++ ++static inline int execute_fetch_atomic_op(enum fi_op op) ++{ ++ int ret; ++ ++ ret = ft_post_atomic(FT_ATOMIC_FETCH, ep, NULL, NULL, result, ++ fi_mr_desc(mr_result), &remote, datatype, ++ op, &fi_ctx_atomic); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ ++ return ret; ++} ++ ++static inline int execute_compare_atomic_op(enum fi_op op) ++{ ++ int ret; ++ ++ ret = ft_post_atomic(FT_ATOMIC_COMPARE, ep, compare, fi_mr_desc(mr_compare), ++ result, fi_mr_desc(mr_result), &remote, datatype, ++ op, &fi_ctx_atomic); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ ++ return ret; ++} ++ ++static void report_perf(void) ++{ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, &start, &end, 1, opts.argc, ++ opts.argv); ++ else ++ show_perf(test_name, opts.transfer_size, opts.iterations, &start, &end, 1); ++} ++ ++create_atomic_op_handler(base) ++create_atomic_op_handler(fetch) ++create_atomic_op_handler(compare) ++ ++static int run_op(void) ++{ ++ int ret = -FI_EINVAL; ++ ++ count = (size_t *)malloc(sizeof(*count)); ++ if (!count) { ++ ret = -FI_ENOMEM; ++ perror("malloc"); ++ goto fn; ++ } ++ ft_sync(); ++ ++ switch (op_type) { ++ case FI_MIN: ++ case FI_MAX: ++ case FI_SUM: ++ case FI_PROD: ++ case FI_LOR: ++ case FI_LAND: ++ case FI_BOR: ++ case FI_BAND: ++ case FI_LXOR: ++ case FI_BXOR: ++ case FI_ATOMIC_WRITE: ++ ret = handle_atomic_base_op(run_all_datatypes, ++ op_type, count); ++ break; ++ case FI_ATOMIC_READ: ++ ret = handle_atomic_fetch_op(run_all_datatypes, ++ op_type, count); ++ break; ++ case FI_CSWAP: ++ case FI_CSWAP_NE: ++ case FI_CSWAP_LE: ++ case FI_CSWAP_LT: ++ case FI_CSWAP_GE: ++ case FI_CSWAP_GT: ++ case FI_MSWAP: ++ ret = handle_atomic_compare_op(run_all_datatypes, ++ op_type, count); ++ break; ++ default: ++ FT_WARN("Invalid atomic operation type %d\n", op_type); ++ break; ++ } ++ ++ free(count); ++fn: ++ return ret; ++} ++ ++static int run_ops(void) ++{ ++ int ret; ++ ++ for (op_type = FI_MIN; op_type < FI_ATOMIC_OP_LAST; op_type++) { ++ ret = run_op(); ++ if (ret && ret != -FI_ENOSYS && ret != -FI_EOPNOTSUPP) { ++ FT_PRINTERR("run_op", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ return run_all_ops ? run_ops() : run_op(); ++} ++ ++static void free_res(void) ++{ ++ FT_CLOSE_FID(mr_result); ++ FT_CLOSE_FID(mr_compare); ++ if (result) { ++ free(result); ++ result = NULL; ++ } ++ if (compare) { ++ free(compare); ++ compare = NULL; ++ } ++} ++ ++static uint64_t get_mr_key() ++{ ++ static uint64_t user_key = FT_MR_KEY; ++ ++ return ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_PROV_KEY)) ? ++ 0 : user_key++; ++} ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ int ret; ++ int mr_local = !!(fi->domain_attr->mr_mode & FI_MR_LOCAL); ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ result = malloc(buf_size); ++ if (!result) { ++ perror("malloc"); ++ return -1; ++ } ++ ++ compare = malloc(buf_size); ++ if (!compare) { ++ perror("malloc"); ++ return -1; ++ } ++ ++ // registers local data buffer buff that used for send/recv ++ // and local/remote RMA. ++ ret = fi_mr_reg(domain, buf, buf_size, ++ ((mr_local ? ++ FI_SEND | FI_RECV | FI_READ | FI_WRITE : 0) | ++ FI_REMOTE_READ | FI_REMOTE_WRITE), 0, ++ get_mr_key(), 0, &mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ // Set global descriptor for FI_MR_LOCAL. ++ if (mr_local) ++ mr_desc = fi_mr_desc(mr); ++ ++ // registers local data buffer that stores results ++ ret = fi_mr_reg(domain, result, buf_size, ++ (mr_local ? FI_READ : 0) | FI_REMOTE_WRITE, 0, ++ get_mr_key(), 0, &mr_result, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", -ret); ++ return ret; ++ } ++ ++ // registers local data buffer that contains comparison data ++ ret = fi_mr_reg(domain, compare, buf_size, ++ (mr_local ? FI_WRITE : 0) | FI_REMOTE_READ, 0, ++ get_mr_key(), 0, &mr_compare, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av(); ++ if (ret) ++ goto out; ++ ++ ret = ft_exchange_keys(&remote); ++ if (ret) ++ goto out; ++ ++ ret = run_test(); ++ if (ret) ++ goto out; ++ ++ ft_sync(); ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SKIP_REG_MR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "ho:z:" CS_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ case 'o': ++ if (!strncasecmp("all", optarg, 3)) { ++ run_all_ops = 1; ++ } else { ++ run_all_ops = 0; ++ op_type = get_fi_op(optarg); ++ if (op_type == FI_ATOMIC_OP_LAST) { ++ print_opts_usage(argv[0]); ++ return EXIT_FAILURE; ++ } ++ } ++ break; ++ case 'z': ++ if (!strncasecmp("all", optarg, 3)) { ++ run_all_datatypes = 1; ++ } else { ++ run_all_datatypes = 0; ++ datatype = get_fi_datatype(optarg); ++ if (datatype == FI_DATATYPE_LAST) { ++ print_opts_usage(argv[0]); ++ return EXIT_FAILURE; ++ } ++ } ++ break; ++ default: ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ print_opts_usage(argv[0]); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_ATOMICS; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ free_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_deferred_wq.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_deferred_wq.c +new file mode 100644 +index 0000000..1077187 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_deferred_wq.c +@@ -0,0 +1,672 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++struct fi_context2 trig_ctx1, trig_ctx2; ++static char *welcome_text = "Hello from Client!"; ++static char *write_text = "This is a successful trigger"; ++struct fi_deferred_work work; ++struct fid_cntr *test_cntr; ++uint64_t n_trig, rx_exp; ++static char *result_buf, *compare_buf; ++static struct fid_mr *mr_result, *mr_compare; ++int use_alias = 0; ++struct fid_ep *trig_ep; ++enum fi_op_type tested_op; ++ ++static void format_simple_msg(struct fi_msg *msg, struct iovec *iov, void *src, ++ size_t size, void *ctx) ++{ ++ msg->context = ctx; ++ msg->desc = mr_desc; ++ msg->iov_count = 1; ++ msg->addr = remote_fi_addr; ++ msg->data = 0; ++ ++ iov->iov_base = src; ++ iov->iov_len = size; ++ msg->msg_iov = iov; ++} ++ ++static void format_simple_msg_tagged(struct fi_msg_tagged *msg, struct iovec *iov, ++ void *src, size_t size, void *ctx, ++ uint64_t tag) ++{ ++ msg->context = ctx; ++ msg->desc = mr_desc; ++ msg->iov_count = 1; ++ msg->addr = remote_fi_addr; ++ msg->data = 0; ++ msg->tag = tag; ++ ++ iov->iov_base = src; ++ iov->iov_len = size; ++ msg->msg_iov = iov; ++} ++ ++static void format_simple_msg_rma(struct fi_msg_rma *msg, struct iovec *iov, ++ struct fi_rma_iov *rma_iov, void *src, ++ size_t size, void *ctx) ++{ ++ msg->context = ctx; ++ msg->desc = mr_desc; ++ msg->iov_count = 1; ++ msg->addr = remote_fi_addr; ++ msg->rma_iov_count = 1; ++ ++ iov->iov_base = src; ++ iov->iov_len = size; ++ msg->msg_iov = iov; ++ ++ rma_iov->addr = 0; ++ rma_iov->key = FT_MR_KEY; ++ rma_iov->len = size; ++ msg->rma_iov = rma_iov; ++} ++ ++static void format_simple_msg_atomic(struct fi_msg_atomic *msg, struct fi_ioc *iov, ++ struct fi_rma_ioc *rma_iov, void *src, size_t size, ++ void *ctx, enum fi_datatype datatype, ++ enum fi_op op) ++{ ++ msg->context = ctx; ++ msg->desc = mr_desc; ++ msg->iov_count = 1; ++ msg->rma_iov_count = 1; ++ msg->addr = remote_fi_addr; ++ msg->data = 0; ++ msg->datatype = datatype; ++ msg->op = op; ++ msg->data = 0; ++ ++ iov->addr = src; ++ iov->count = size; ++ msg->msg_iov = iov; ++ ++ rma_iov->addr = 0; ++ rma_iov->count = size; ++ rma_iov->key = FT_MR_KEY; ++ msg->rma_iov = rma_iov; ++} ++ ++static void format_simple_msg_fetch(struct fi_msg_fetch *msg, struct fi_ioc *iov, ++ void *src, size_t size) ++{ ++ msg->desc = fi_mr_desc(mr_result); ++ ++ iov->addr = src; ++ iov->count = size; ++ ++ msg->iov_count = 1; ++ msg->msg_iov = iov; ++} ++ ++static void format_simple_msg_compare(struct fi_msg_compare *msg, struct fi_ioc *iov, ++ void *src, size_t size) ++{ ++ msg->desc = fi_mr_desc(mr_compare); ++ ++ iov->addr = src; ++ iov->count = size; ++ ++ msg->iov_count = 1; ++ msg->msg_iov = iov; ++} ++ ++static int check_data() ++{ ++ int ret, i; ++ char c = ~0; ++ ++ switch (tested_op) { ++ case FI_OP_COMPARE_ATOMIC: ++ case FI_OP_FETCH_ATOMIC: ++ if (strncmp(result_buf, welcome_text, strlen(welcome_text))) { ++ printf("Data mismatch in fetch buffer..."); ++ return 1; ++ } ++ /* fall through */ ++ case FI_OP_ATOMIC: ++ for (i = 0; i < strlen(welcome_text); i++) { ++ if (rx_buf[i] != c) { ++ printf("Data mismatch found at byte %d...", i); ++ return 1; ++ } ++ } ++ break; ++ case FI_OP_CNTR_SET: ++ case FI_OP_CNTR_ADD: ++ ret = fi_cntr_wait(test_cntr, 10, -1); ++ if (ret) ++ return ret; ++ break; ++ case FI_OP_READ: ++ case FI_OP_WRITE: ++ if (strncmp(result_buf, write_text, strlen(write_text))) { ++ printf("Data mismatch in read buffer..."); ++ return 1; ++ } ++ /* fall through */ ++ default: ++ if (strncmp(rx_buf, write_text, strlen(write_text))) { ++ printf("Data mismatch in rx_buf, found..."); ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++static int send_wait_check() ++{ ++ int ret; ++ ++ if (opts.dst_addr) { ++ ret = fi_write(ep, tx_buf, strlen(welcome_text), mr_desc, ++ remote_fi_addr, 0, FT_MR_KEY, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("fi_write", ret); ++ return ret; ++ } ++ } ++ ++ ret = fi_cntr_wait(test_cntr, n_trig, -1); ++ if (ret) ++ return ret; ++ ++ ret = fi_cntr_wait(rxcntr, rx_exp, -1); ++ if (ret) ++ return ret; ++ ++ return check_data(); ++} ++ ++static int cntr_trigger() ++{ ++ int ret; ++ struct fi_op_cntr op_cntr; ++ ++ op_cntr.cntr = test_cntr; ++ op_cntr.value = 5; ++ work.op_type = FI_OP_CNTR_SET; ++ ++ work.op.cntr = &op_cntr; ++ ++ ret = fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++ if (ret) ++ return ret; ++ ++ work.op_type = FI_OP_CNTR_ADD; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int rma_trigger() ++{ ++ int ret; ++ struct fi_msg_rma msg; ++ struct fi_rma_iov rma_iov; ++ struct iovec iov; ++ struct fi_op_rma rma; ++ ++ format_simple_msg_rma(&msg, &iov, &rma_iov, ++ tx_buf + strlen(welcome_text), ++ strlen(write_text), &work.context); ++ rma.ep = trig_ep; ++ rma.msg = msg; ++ rma.flags = 0; ++ ++ work.op.rma = &rma; ++ work.op_type = FI_OP_WRITE; ++ ret = fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++ if (ret) ++ return ret; ++ ++ format_simple_msg_rma(&msg, &iov, &rma_iov, ++ result_buf, strlen(write_text), &work.context); ++ work.op_type = FI_OP_READ; ++ work.triggering_cntr = test_cntr; ++ work.threshold = 1; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int atomic_trigger() ++{ ++ int ret; ++ size_t count; ++ struct fi_op_atomic atomic; ++ struct fi_msg_atomic msg; ++ struct fi_ioc iov; ++ struct fi_rma_ioc rma_iov; ++ ++ ret = check_base_atomic_op(ep, FI_BOR, FI_UINT8, &count); ++ if (ret) ++ return ret; ++ ++ format_simple_msg_atomic(&msg, &iov, &rma_iov, ++ tx_buf + strlen(welcome_text), ++ strlen(welcome_text), &work.context, FI_UINT8, FI_BOR); ++ atomic.ep = trig_ep; ++ atomic.msg = msg; ++ atomic.flags = 0; ++ work.op_type = FI_OP_ATOMIC; ++ ++ work.op.atomic = &atomic; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int fetch_atomic_trigger() ++{ ++ int ret; ++ size_t count; ++ struct fi_op_fetch_atomic fetch_atomic; ++ struct fi_msg_atomic msg; ++ struct fi_msg_fetch fetch; ++ struct fi_ioc iov; ++ struct fi_ioc fetch_iov; ++ struct fi_rma_ioc rma_iov; ++ ++ ret = check_fetch_atomic_op(ep, FI_BOR, FI_UINT8, &count); ++ if (ret) ++ return ret; ++ ++ format_simple_msg_atomic(&msg, &iov, &rma_iov, ++ tx_buf + strlen(welcome_text), ++ strlen(welcome_text), &work.context, FI_UINT8, FI_BOR); ++ format_simple_msg_fetch(&fetch, &fetch_iov, result_buf, strlen(welcome_text)); ++ ++ fetch_atomic.ep = trig_ep; ++ fetch_atomic.msg = msg; ++ fetch_atomic.fetch = fetch; ++ fetch_atomic.flags = 0; ++ work.op_type = FI_OP_FETCH_ATOMIC; ++ ++ work.op.fetch_atomic = &fetch_atomic; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int compare_atomic_trigger() ++{ ++ int ret; ++ size_t count; ++ struct fi_op_compare_atomic compare_atomic; ++ struct fi_msg_atomic msg; ++ struct fi_msg_fetch fetch; ++ struct fi_msg_compare compare; ++ struct fi_ioc iov; ++ struct fi_ioc fetch_iov; ++ struct fi_ioc compare_iov; ++ struct fi_rma_ioc rma_iov; ++ ++ ret = check_compare_atomic_op(ep, FI_CSWAP_LE, FI_UINT8, &count); ++ if (ret) ++ return ret; ++ ++ format_simple_msg_atomic(&msg, &iov, &rma_iov, ++ tx_buf + strlen(welcome_text), ++ strlen(welcome_text), &work.context, FI_UINT8, FI_CSWAP_LE); ++ format_simple_msg_fetch(&fetch, &fetch_iov, result_buf, strlen(welcome_text)); ++ format_simple_msg_compare(&compare, &compare_iov, compare_buf, strlen(welcome_text)); ++ ++ compare_atomic.ep = trig_ep; ++ compare_atomic.msg = msg; ++ compare_atomic.fetch = fetch; ++ compare_atomic.compare = compare; ++ compare_atomic.flags = 0; ++ work.op_type = FI_OP_COMPARE_ATOMIC; ++ ++ work.op.compare_atomic = &compare_atomic; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int tsend_trigger() ++{ ++ int ret; ++ struct fi_op_tagged tagged; ++ struct fi_msg_tagged msg; ++ struct iovec msg_iov; ++ ++ format_simple_msg_tagged(&msg, &msg_iov, rx_buf, ++ strlen(write_text), &work.context, 0xCAFE); ++ tagged.ep = trig_ep; ++ tagged.msg = msg; ++ tagged.flags = 0; ++ work.op.tagged = &tagged; ++ ++ work.op_type = FI_OP_TRECV; ++ ret = fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++ if (ret) ++ return ret; ++ ++ work.context = trig_ctx2; ++ ++ format_simple_msg_tagged(&msg, &msg_iov, tx_buf + strlen(welcome_text), ++ strlen(write_text), &work.context, 0xCAFE); ++ work.op_type = FI_OP_TSEND; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int send_trigger() ++{ ++ int ret; ++ struct fi_op_msg op_msg; ++ struct fi_msg msg; ++ struct iovec msg_iov; ++ ++ format_simple_msg(&msg, &msg_iov, rx_buf, ++ strlen(write_text), &work.context); ++ ++ op_msg.ep = trig_ep; ++ op_msg.msg = msg; ++ op_msg.flags = 0; ++ work.op.msg = &op_msg; ++ ++ work.op_type = FI_OP_RECV; ++ ret = fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++ if (ret) ++ return ret; ++ ++ work.context = trig_ctx2; ++ ++ format_simple_msg(&msg, &msg_iov, tx_buf + strlen(welcome_text), ++ strlen(write_text), &work.context); ++ work.op_type = FI_OP_SEND; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int trigger() ++{ ++ int ret; ++ ++ //both sides start with both counters at 2, client will initiate triggering write ++ //which will trigger txcntr on client and rxcntr on server ++ //rx_exp = number of rx completions we should expect on that side ++ //n_trig = total number of triggers on work queue to expect completed ++ if (opts.dst_addr) { ++ work.triggering_cntr = txcntr; ++ rx_exp = 2; ++ } else { ++ work.triggering_cntr = rxcntr; ++ rx_exp = 3; ++ } ++ work.threshold = 3; ++ ++ if (tested_op != FI_OP_CNTR_ADD && tested_op != FI_OP_CNTR_SET) ++ work.completion_cntr = test_cntr; ++ ++ switch (tested_op) { ++ case FI_OP_RECV: ++ case FI_OP_SEND: ++ ret = send_trigger(); ++ n_trig++; ++ break; ++ case FI_OP_TRECV: ++ case FI_OP_TSEND: ++ ret = tsend_trigger(); ++ n_trig++; ++ break; ++ case FI_OP_READ: ++ case FI_OP_WRITE: ++ ret = rma_trigger(); ++ n_trig++; ++ rx_exp += 2; ++ break; ++ case FI_OP_ATOMIC: ++ ret = atomic_trigger(); ++ rx_exp++; ++ break; ++ case FI_OP_FETCH_ATOMIC: ++ ret = fetch_atomic_trigger(); ++ rx_exp++; ++ break; ++ case FI_OP_COMPARE_ATOMIC: ++ ret = compare_atomic_trigger(); ++ rx_exp++; ++ break; ++ default: ++ work.op_type = tested_op; ++ ret = cntr_trigger(); ++ n_trig++; ++ } ++ n_trig++; ++ ++ if (ret) { ++ if (ret == -FI_ENOSYS) ++ fprintf(stdout, "Operation not supported by provider\n"); ++ else ++ FT_PRINTERR("fi_control", ret); ++ return ret; ++ } ++ ++ ret = send_wait_check(); ++ ++ return ret; ++} ++ ++static void init_buf_vals() ++{ ++ switch (tested_op) { ++ case FI_OP_ATOMIC: ++ case FI_OP_FETCH_ATOMIC: ++ case FI_OP_COMPARE_ATOMIC: ++ memset(compare_buf, ~0, strlen(welcome_text) * 2); ++ sprintf(tx_buf, "%s", welcome_text); ++ memset(&tx_buf[strlen(welcome_text)], ~0, strlen(welcome_text)); ++ if (opts.dst_addr) ++ sprintf(rx_buf, "%s", welcome_text); ++ break; ++ default: ++ sprintf(tx_buf, "%s%s", welcome_text, write_text); ++ } ++} ++ ++static int run_test() ++{ ++ int ret; ++ ++ work.context = trig_ctx1; ++ ++ printf("Testing triggered %s", fi_tostr(&tested_op, FI_TYPE_OP_TYPE)); ++ if (tested_op != FI_OP_ATOMIC && tested_op != FI_OP_FETCH_ATOMIC && ++ tested_op != FI_OP_COMPARE_ATOMIC) { ++ tested_op++; ++ printf("/%s", fi_tostr(&tested_op, FI_TYPE_OP_TYPE)); ++ } ++ printf(" with counters..."); ++ ++ init_buf_vals(); ++ ++ //eat up first receive to make sure the triggered op doesn't go there instead ++ ret = ft_tx(ep, remote_fi_addr, strlen(welcome_text), &tx_ctx); ++ if (ret) ++ return ret; ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ ret = trigger(); ++ if (ret) { ++ if (ret != -FI_ENOSYS) { ++ printf("FAIL\n"); ++ if (ret != 1) ++ FT_PRINTERR("cntr_trigger", ret); ++ } ++ } else { ++ printf("PASS\n"); ++ } ++ ++ return ret; ++} ++ ++static int alloc_mr_res() ++{ ++ int ret; ++ ++ result_buf = calloc(buf_size, sizeof(*result_buf)); ++ compare_buf = calloc(buf_size, sizeof(*compare_buf)); ++ if (!result_buf || !compare_buf) { ++ fprintf(stdout, "calloc\n"); ++ return -FI_ENOMEM; ++ } ++ ++ ret = fi_mr_reg(domain, buf, buf_size, FT_RMA_MR_ACCESS | FT_MSG_MR_ACCESS, ++ 0, FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ ret = fi_mr_reg(domain, result_buf, buf_size, FT_RMA_MR_ACCESS, ++ 0, FT_MR_KEY + 1, 0, &mr_result, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ret = fi_mr_reg(domain, compare_buf, buf_size, FT_RMA_MR_ACCESS, ++ 0, FT_MR_KEY + 2, 0, &mr_compare, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++static void free_mr_res() ++{ ++ FT_CLOSE_FID(mr_result); ++ FT_CLOSE_FID(mr_compare); ++ free(result_buf); ++ free(compare_buf); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_SIZE | FT_OPT_RX_CNTR | FT_OPT_TX_CNTR | ++ FT_OPT_SKIP_REG_MR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ tested_op = FI_OP_CNTR_SET; ++ ++ while ((op = getopt(argc, argv, "aT:h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'a': ++ use_alias = 1; ++ break; ++ case 'T': ++ if (!strncasecmp("msg", optarg, 3)) ++ tested_op = FI_OP_RECV; ++ else if (!strncasecmp("tagged", optarg, 6)) ++ tested_op = FI_OP_TRECV; ++ else if (!strncasecmp("rma", optarg, 3)) ++ tested_op = FI_OP_READ; ++ else if (!strncasecmp("atomic", optarg, 6)) ++ tested_op = FI_OP_ATOMIC; ++ else if (!strncasecmp("f_atomic", optarg, 8)) ++ tested_op = FI_OP_FETCH_ATOMIC; ++ else if (!strncasecmp("c_atomic", optarg, 8)) ++ tested_op = FI_OP_COMPARE_ATOMIC; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple RDM client-sever triggered RMA example with alias ep."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_RMA | FI_RMA_EVENT | FI_TRIGGER; ++ ++ if (tested_op == FI_OP_TSEND) ++ hints->caps |= FI_TAGGED; ++ else if (tested_op == FI_OP_ATOMIC || ++ tested_op == FI_OP_FETCH_ATOMIC || ++ tested_op == FI_OP_COMPARE_ATOMIC) ++ hints->caps |= FI_ATOMIC; ++ ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = (FI_MR_LOCAL | FI_MR_VIRT_ADDR | ++ FI_MR_ALLOCATED); ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (use_alias) { ++ ret = ft_init_alias_ep(FI_TRANSMIT | FI_TRIGGER); ++ if (ret) ++ return ret; ++ trig_ep = alias_ep; ++ } else { ++ trig_ep = ep; ++ } ++ ++ ret = ft_cntr_open(&test_cntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ ++ ret = alloc_mr_res(); ++ if (ret) ++ return ret; ++ ++ ret = run_test(); ++ if (ret) ++ return ret; ++ ++ free_mr_res(); ++ ++ ret = fi_close(&test_cntr->fid); ++ if (ret) ++ FT_PRINTERR("fi_cntr_close", ret); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_domain.c +new file mode 100644 +index 0000000..f804bae +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_domain.c +@@ -0,0 +1,441 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++struct test_domain { ++ uint8_t *buf; ++ struct fid_domain *dom; ++ struct fid_ep *ep; ++ struct fid_cntr *rx_cntr; ++ uint64_t rma_op_cnt; ++ struct fid_cntr *tx_cntr; ++ struct fid_av *av; ++ struct fid_mr *mr; ++ struct fid_cq *tx_cq; ++ struct fi_context *rma_ctx; ++}; ++ ++struct test_domain *domain_res_array; ++uint8_t *mr_buf_array; ++fi_addr_t *peer_addrs; ++int domain_cnt; ++int verbose; ++ ++static int alloc_domain_res() ++{ ++ domain_res_array = calloc(domain_cnt, sizeof(*domain_res_array)); ++ if (!domain_res_array) ++ return -FI_ENOMEM; ++ ++ mr_buf_array = calloc(domain_cnt, opts.transfer_size); ++ if (!mr_buf_array) ++ return -FI_ENOMEM; ++ ++ peer_addrs = calloc(domain_cnt, sizeof(*peer_addrs)); ++ if (!peer_addrs) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int open_domain_res(struct test_domain *domain) ++{ ++ int ret; ++ ++ av_attr.type = FI_AV_MAP; ++ av_attr.count = domain_cnt; ++ av_attr.name = NULL; ++ ++ ret = fi_cntr_open(domain->dom, ++ &cntr_attr, &domain->rx_cntr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ ++ ret = fi_cntr_open(domain->dom, ++ &cntr_attr, &domain->tx_cntr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ ++ cq_attr.size = domain_cnt; ++ ret = fi_cq_open(domain->dom, ++ &cq_attr, &domain->tx_cq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ ++ ret = fi_av_open(domain->dom, ++ &av_attr, &domain->av, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_av_open", ret); ++ return ret; ++ } ++ ++ domain->rma_ctx = calloc(domain_cnt, sizeof(*domain->rma_ctx)); ++ if (!domain->rma_ctx) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int init_ep_mr_res(struct test_domain *domain, struct fi_info *info) ++{ ++ int ret; ++ ++ domain->rma_op_cnt = 0; ++ ++ ret = fi_endpoint(domain->dom, info, &domain->ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ret = fi_ep_bind(domain->ep, ++ &domain->av->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_ep_bind(domain->ep, ++ &domain->tx_cntr->fid, FI_WRITE); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_ep_bind(domain->ep, ++ &domain->tx_cq->fid, FI_TRANSMIT); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_enable(domain->ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ ret = fi_mr_reg(domain->dom, domain->buf, ++ opts.transfer_size, FI_REMOTE_WRITE, ++ 0, FT_MR_KEY, 0, &domain->mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ if (verbose) { ++ printf("fi_mr_reg(fi_domain = %p,buffer = %p,size = %d,", ++ domain->dom, domain->buf, opts.transfer_size); ++ printf("memory_region = %p,mr_key %ld)\n", ++ domain->mr, (unsigned long)fi_mr_key(domain->mr)); ++ } ++ ++ ret = fi_mr_bind(domain->mr, ++ &domain->rx_cntr->fid, ++ FI_REMOTE_WRITE); ++ if (ret) { ++ FT_PRINTERR("fi_mr_bind", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int init_peer_addresses() ++{ ++ int dom_idx, ret; ++ int ep_idx; ++ ++ /* ++ Initializes the Address Vectors for each domain ++ with the addresses of the remote hosts' endpoints. ++ The fi_addr_t array peer_addrs gets rewritten ++ in this loop with the same set of addresses for each domain ++ init, but the peer addresses to the remote domains ++ are the same so this is not an issue. ++ The address vectors for each domain must be init even if ++ the peer addresses returned is the same after the first loop. ++ */ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ for (ep_idx = 0; ep_idx < domain_cnt; ep_idx++) { ++ ret = ft_init_av_addr(domain_res_array[dom_idx].av, ++ domain_res_array[ep_idx].ep, &peer_addrs[ep_idx]); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int init_domain_res() ++{ ++ int dom_idx, ret; ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ struct fi_info *info; ++ hints->src_addr = NULL; ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &info); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ info->domain_attr->mr_mode = FI_MR_SCALABLE; ++ ret = fi_domain(fabric, info, ++ &domain_res_array[dom_idx].dom, ++ NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ return ret; ++ } ++ ++ domain_res_array[dom_idx].buf = &mr_buf_array[dom_idx]; ++ ++ ret = open_domain_res(&domain_res_array[dom_idx]); ++ if (ret) ++ return ret; ++ ++ ret = init_ep_mr_res(&domain_res_array[dom_idx], info); ++ if (ret) ++ return ret; ++ ++ fi_freeinfo(info); ++ } ++ ++ return 0; ++} ++ ++static void free_domain_res() ++{ ++ int dom_idx; ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ FT_CLOSE_FID(domain_res_array[dom_idx].ep); ++ FT_CLOSE_FID(domain_res_array[dom_idx].av); ++ FT_CLOSE_FID(domain_res_array[dom_idx].mr); ++ FT_CLOSE_FID(domain_res_array[dom_idx].tx_cntr); ++ FT_CLOSE_FID(domain_res_array[dom_idx].rx_cntr); ++ FT_CLOSE_FID(domain_res_array[dom_idx].tx_cq); ++ FT_CLOSE_FID(domain_res_array[dom_idx].dom); ++ free(domain_res_array[dom_idx].rma_ctx); ++ } ++ free(peer_addrs); ++ free(mr_buf_array); ++ free(domain_res_array); ++} ++ ++static int write_data(void *buffer, size_t size, int dom_idx, ++ int remote_dom_idx, struct fi_context *rma_ctx) ++{ ++ int ret = -FI_EAGAIN; ++ ++ while (ret == -FI_EAGAIN) { ++ ret = fi_write(domain_res_array[dom_idx].ep, buffer, size, ++ fi_mr_desc(domain_res_array[dom_idx].mr), peer_addrs[remote_dom_idx], ++ 0, fi_mr_key(domain_res_array[remote_dom_idx].mr), rma_ctx); ++ } ++ ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int wait_write_cq(struct fid_cq *cq, size_t rma_op_count) ++{ ++ struct fi_cq_tagged_entry entry; ++ int ret; ++ int op_counter = 0; ++ ++ do { ++ ret = fi_cq_read(cq, &entry, 1); ++ if (ret > 0) ++ op_counter++; ++ } while ((ret == -FI_EAGAIN) && (op_counter < rma_op_count)); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(cq); ++ } else { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ } ++ ++ return ret; ++} ++ ++static int multi_domain_test() ++{ ++ int ret, remote_dom_idx, dom_idx; ++ ++ ft_sync(); ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ for (remote_dom_idx = 0; remote_dom_idx < domain_cnt; remote_dom_idx++) { ++ if (verbose) ++ printf("write to host's domain idx %d, memory region\n", remote_dom_idx); ++ ++ ret = write_data(tx_buf, opts.transfer_size, dom_idx, ++ remote_dom_idx, &domain_res_array[dom_idx].rma_ctx[remote_dom_idx]); ++ if (ret) ++ return ret; ++ ++ domain_res_array[dom_idx].rma_op_cnt++; ++ } ++ } ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ ret = fi_cntr_wait(domain_res_array[dom_idx].tx_cntr, ++ domain_res_array[dom_idx].rma_op_cnt, 30 * 1000); ++ if (ret < 0) ++ return ret; ++ ++ ret = wait_write_cq(domain_res_array[dom_idx].tx_cq, ++ domain_res_array[dom_idx].rma_op_cnt); ++ if (ret < 1) ++ return ret; ++ ++ if (verbose) ++ printf("writes from domain idx %d completed\n", dom_idx); ++ } ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ if (verbose) ++ printf("check for writes to domain idx %d\n", dom_idx); ++ ++ ret = fi_cntr_wait(domain_res_array[dom_idx].rx_cntr, ++ domain_res_array[dom_idx].rma_op_cnt, 30 * 1000); ++ if (ret < 0) ++ return ret; ++ ++ if (verbose) ++ printf("got all writes to domain idx %d\n", dom_idx); ++ } ++ printf("GOOD, multi domain test complete\n"); ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_domain_res(); ++ if (ret) ++ return ret; ++ ret = init_domain_res(); ++ if (ret) ++ return ret; ++ ++ ret = init_peer_addresses(); ++ if (ret) ++ return ret; ++ ++ ret = multi_domain_test(); ++ ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ domain_cnt = 2; ++ opts = INIT_OPTS; ++ opts.transfer_size = 4096; ++ verbose = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "c:Vh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'c': ++ domain_cnt = strtoull(optarg, NULL, 10); ++ break; ++ case 'V': ++ verbose = 1; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Ping-pong multi-domain test"); ++ FT_PRINT_OPTS_USAGE("-c ", "number of domains to create and test"); ++ FT_PRINT_OPTS_USAGE("-V", "Enable verbose printing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_RMA | FI_RMA_EVENT | FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ if (domain_res_array) ++ free_domain_res(); ++ ft_free_res(); ++ ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_recv.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_recv.c +new file mode 100644 +index 0000000..0869aac +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_recv.c +@@ -0,0 +1,366 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++// MULTI_BUF_SIZE_FACTOR defines how large the multi recv buffer will be. ++// The minimum value of the factor is 2 which will set the multi recv buffer ++// size to be twice the size of the send buffer. In order to use FI_MULTI_RECV ++// feature efficiently, we need to have a large recv buffer so that we don't ++// to repost the buffer often to get the remaining data when the buffer is full ++#define MULTI_BUF_SIZE_FACTOR 4 ++#define DEFAULT_MULTI_BUF_SIZE (1024 * 1024) ++ ++static struct fid_mr *mr_multi_recv; ++struct fi_context ctx_multi_recv[2]; ++static int use_recvmsg; ++ ++static int repost_recv(int iteration) { ++ struct fi_msg msg; ++ struct iovec msg_iov; ++ int ret; ++ ++ if (use_recvmsg) { ++ msg_iov.iov_base = rx_buf + (rx_size / 2) * iteration; ++ msg_iov.iov_len = rx_size / 2; ++ msg.msg_iov = &msg_iov; ++ msg.desc = fi_mr_desc(mr_multi_recv); ++ msg.iov_count = 1; ++ msg.addr = 0; ++ msg.data = NO_CQ_DATA; ++ msg.context = &ctx_multi_recv[iteration]; ++ ret = fi_recvmsg(ep, &msg, FI_MULTI_RECV); ++ if (ret) { ++ FT_PRINTERR("fi_recvmsg", ret); ++ return ret; ++ } ++ } else { ++ ret = fi_recv(ep, rx_buf + (rx_size / 2) * iteration, ++ rx_size / 2, fi_mr_desc(mr_multi_recv), ++ 0, &ctx_multi_recv[iteration]); ++ if (ret) { ++ FT_PRINTERR("fi_recv", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++ ++int wait_for_recv_completion(int num_completions) ++{ ++ int i, ret; ++ struct fi_cq_data_entry comp; ++ ++ while (num_completions > 0) { ++ ret = fi_cq_read(rxcq, &comp, 1); ++ if (ret == -FI_EAGAIN) ++ continue; ++ ++ if (ret < 0) { ++ FT_PRINTERR("fi_cq_read", ret); ++ return ret; ++ } ++ ++ if (comp.len) ++ num_completions--; ++ ++ if (comp.flags & FI_MULTI_RECV) { ++ i = (comp.op_context == &ctx_multi_recv[0]) ? 0 : 1; ++ ++ ret = repost_recv(i); ++ if (ret) ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++static int sync_test(void) ++{ ++ int ret; ++ ++ ret = opts.dst_addr ? ft_tx(ep, remote_fi_addr, 1, &tx_ctx) : wait_for_recv_completion(1); ++ if (ret) ++ return ret; ++ ++ ret = opts.dst_addr ? wait_for_recv_completion(1) : ft_tx(ep, remote_fi_addr, 1, &tx_ctx); ++ return ret; ++} ++ ++/* ++ * Post buffer as two halves, so that we can repost one half ++ * when the other half is full. ++ */ ++static int post_multi_recv_buffer() ++{ ++ int ret, i; ++ ++ for (i = 0; i < 2; i++) { ++ ret = repost_recv(i); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret, i; ++ ++ ret = sync_test(); ++ if (ret) { ++ fprintf(stderr, "sync_test failed!\n"); ++ goto out; ++ } ++ ++ ft_start(); ++ if (opts.dst_addr) { ++ for (i = 0; i < opts.iterations; i++) { ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) ++ goto out; ++ } ++ } else { ++ ret = wait_for_recv_completion(opts.iterations); ++ if (ret) ++ goto out; ++ } ++ ft_stop(); ++ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, ++ &start, &end, 1, opts.argc, opts.argv); ++ else ++ show_perf(test_name, opts.transfer_size, opts.iterations, ++ &start, &end, 1); ++ ++out: ++ return ret; ++} ++ ++static void free_res(void) ++{ ++ FT_CLOSE_FID(mr_multi_recv); ++ if (tx_buf) { ++ free(tx_buf); ++ tx_buf = NULL; ++ } ++ if (rx_buf) { ++ free(rx_buf); ++ rx_buf = NULL; ++ } ++} ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ int ret; ++ ++ tx_size = MAX(FT_MAX_CTRL_MSG, opts.transfer_size); ++ if (tx_size > fi->ep_attr->max_msg_size) { ++ fprintf(stderr, "transfer size is larger than the maximum size " ++ "of the data transfer supported by the provider\n"); ++ return -1; ++ } ++ ++ tx_buf = malloc(tx_size); ++ if (!tx_buf) { ++ fprintf(stderr, "Cannot allocate tx_buf\n"); ++ return -1; ++ } ++ ++ ret = fi_mr_reg(domain, tx_buf, tx_size, FI_SEND, ++ 0, FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ // set the multi buffer size to be allocated ++ rx_size = MAX(tx_size, DEFAULT_MULTI_BUF_SIZE) * MULTI_BUF_SIZE_FACTOR; ++ rx_buf = malloc(rx_size); ++ if (!rx_buf) { ++ fprintf(stderr, "Cannot allocate rx_buf\n"); ++ return -1; ++ } ++ ++ ret = fi_mr_reg(domain, rx_buf, rx_size, FI_RECV, 0, FT_MR_KEY + 1, 0, ++ &mr_multi_recv, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ // set FI_MULTI_RECV flag for all recv operations ++ fi->rx_attr->op_flags = FI_MULTI_RECV; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = fi_setopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_MIN_MULTI_RECV, ++ &tx_size, sizeof(tx_size)); ++ if (ret) ++ return ret; ++ ++ ret = post_multi_recv_buffer(); ++ return ret; ++} ++ ++static int init_av(void) ++{ ++ size_t addrlen; ++ int ret; ++ ++ if (opts.dst_addr) { ++ ret = ft_av_insert(av, fi->dest_addr, 1, &remote_fi_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ addrlen = 64; ++ ret = fi_getname(&ep->fid, tx_buf, &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = ft_tx(ep, remote_fi_addr, addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ } else { ++ ret = wait_for_recv_completion(1); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av, rx_buf, 1, &remote_fi_addr, 0, NULL); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret = 0; ++ ++ ret = init_fabric(); ++ if (ret) ++ goto out; ++ ++ ret = init_av(); ++ if (ret) ++ goto out; ++ ++ ret = run_test(); ++ ++ rx_seq++; ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE | FT_OPT_SKIP_MSG_ALLOC; ++ use_recvmsg = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "Mh" CS_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case 'M': ++ use_recvmsg = 1; ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Streaming RDM client-server using multi recv buffer."); ++ FT_PRINT_OPTS_USAGE("-M", "enable testing with fi_recvmsg"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_MULTI_RECV; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ cq_attr.format = FI_CQ_FORMAT_DATA; ++ ++ ret = run(); ++ ++ free_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_simple.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_simple.c +new file mode 100644 +index 0000000..efee1ad +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_simple.c +@@ -0,0 +1,127 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++struct fi_rma_iov local; ++ ++struct fi_context fi_ctx_write; ++struct fi_context fi_ctx_read; ++ ++static int run_test(void) ++{ ++ int ret = 0; ++ const char *message = "Hello from Client!"; ++ size_t message_len = strlen(message) + 1; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_exchange_keys(&remote); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ fprintf(stdout, "RMA write to server\n"); ++ if (snprintf(tx_buf, tx_size, "%s", message) >= tx_size) { ++ fprintf(stderr, "Transmit buffer too small.\n"); ++ return -FI_ETOOSMALL; ++ } ++ ret = fi_write(ep, tx_buf, message_len, mr_desc, ++ remote_fi_addr, remote.addr, remote.key, ++ &fi_ctx_write); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(++tx_seq); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received a completion event for RMA write\n"); ++ } else { ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ ret = check_recv_msg(message); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received data from Client: %s\n", (char *) rx_buf); ++ } ++ ++ /* TODO: need support for finalize operation to sync test */ ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_SIZE | FT_OPT_RX_CNTR | FT_OPT_TX_CNTR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple RDM client-server RMA example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_RMA | FI_RMA_EVENT; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_trigger.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_trigger.c +new file mode 100644 +index 0000000..24411a2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_trigger.c +@@ -0,0 +1,160 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++struct fi_triggered_context triggered_ctx; ++ ++static char *welcome_text1 = "Hello1 from Client!"; ++static char *welcome_text2 = "Hello2 from Client!"; ++ ++static int rma_write_trigger(void *src, size_t size, ++ struct fid_cntr *cntr, size_t threshold) ++{ ++ int ret; ++ triggered_ctx.event_type = FI_TRIGGER_THRESHOLD; ++ triggered_ctx.trigger.threshold.cntr = cntr; ++ triggered_ctx.trigger.threshold.threshold = threshold; ++ ret = fi_write(alias_ep, src, size, mr_desc, ++ remote_fi_addr, remote.addr, remote.key, ++ &triggered_ctx); ++ if (ret){ ++ FT_PRINTERR("fi_write", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_alias_ep(FI_TRANSMIT | FI_TRIGGER); ++ if (ret) ++ return ret; ++ ++ ret = ft_exchange_keys(&remote); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ sprintf(tx_buf, "%s%s", welcome_text1, welcome_text2); ++ ++ fprintf(stdout, "Triggered RMA write to server\n"); ++ ret = rma_write_trigger((char *) tx_buf + strlen(welcome_text1), ++ strlen(welcome_text2), txcntr, 3); ++ if (ret) ++ goto out; ++ ++ fprintf(stdout, "RMA write to server\n"); ++ ret = fi_write(ep, tx_buf, strlen(welcome_text1), mr_desc, ++ remote_fi_addr, remote.addr, remote.key, ++ &tx_ctx); ++ if (ret){ ++ FT_PRINTERR("fi_write", ret); ++ goto out; ++ } ++ /* The value of the counter is 4 including a transfer during ++ * init_av and ft_exchange_keys() */ ++ ret = fi_cntr_wait(txcntr, 4, -1); ++ if (ret < 0) { ++ FT_PRINTERR("fi_cntr_wait", ret); ++ goto out; ++ } ++ ++ fprintf(stdout, "Received completion events for RMA write operations\n"); ++ } else { ++ /* The value of the counter is 4 including a transfer during ++ * init_av and ft_exchange_keys() */ ++ ret = fi_cntr_wait(rxcntr, 4, -1); ++ if (ret < 0) { ++ FT_PRINTERR("fi_cntr_wait", ret); ++ goto out; ++ } ++ ++ ret = check_recv_msg(welcome_text2); ++ if (ret) ++ return ret; ++ fprintf(stdout, "Received data from Client: %s\n", (char *) rx_buf); ++ } ++ ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_SIZE | FT_OPT_RX_CNTR | FT_OPT_TX_CNTR; ++ opts.transfer_size = strlen(welcome_text1) + strlen(welcome_text2); ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple RDM client-server triggered RMA example with alias ep."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_RMA | FI_RMA_EVENT | FI_TRIGGER; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_shared_av.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_shared_av.c +new file mode 100644 +index 0000000..861f92a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_shared_av.c +@@ -0,0 +1,208 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++ ++static int init_fabric(void) ++{ ++ int ret; ++ int ret2; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr && !ft_parent_proc) { ++ /* child waits until parent is done creating AV */ ++ ret2 = ft_sync_pair(FI_SUCCESS); ++ if (ret2) ++ return ret2; ++ ++ /* child needs to open AV in read only mode */ ++ av_attr.flags = FI_READ; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (opts.dst_addr && ft_parent_proc) { ++ /* parent lets the child know its status */ ++ ret2 = ft_sync_pair(ret); ++ if (ret2) ++ return ret2; ++ } ++ ++ /* handle the failed alloc_active_res call */ ++ if (ret) ++ return ret; ++ ++ return ft_enable_ep_recv(); ++} ++ ++static int send_recv() ++{ ++ int ret; ++ const char *message = "Hello from Child Client!"; ++ size_t message_len = strlen(message) + 1; ++ ++ if (opts.dst_addr) { ++ fprintf(stdout, "Sending message...\n"); ++ if (snprintf(tx_buf, tx_size, "%s", message) >= tx_size) { ++ fprintf(stderr, "Transmit buffer too small.\n"); ++ return -FI_ETOOSMALL; ++ } ++ ++ ret = ft_tx(ep, remote_fi_addr, message_len, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Send completion received\n"); ++ } else { ++ fprintf(stdout, "Waiting for message from client...\n"); ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ ret = check_recv_msg(message); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received data from client: %s\n", (char *) rx_buf); ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ int ret2; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ if (ft_parent_proc) { ++ /* parent inits AV and lets child proceed, ++ * and itself returns without sending a message */ ++ ret = ft_init_av(); ++ ret2 = ft_sync_pair(ret); ++ if (ret2) ++ return ret2; ++ ++ /* parent doesn't run the send_recv loop, ++ * it waits for the child until it is done ++ * with send_recv */ ++ return ret; ++ } else { ++ ret2 = ft_sync_pair(FI_SUCCESS); ++ if (ret2) ++ return ret2; ++ ++ remote_fi_addr = ((fi_addr_t *)av_attr.map_addr)[0]; ++ } ++ } else { ++ ret = ft_init_av(); ++ if (ret) ++ return ret; ++ } ++ ++ return send_recv(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A shared AV client-server example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ if (opts.dst_addr) { ++ if (!opts.av_name) ++ opts.av_name = "client_av"; ++ ++ ret = ft_fork_and_pair(); ++ if (ret) ++ return ret; ++ } else { ++ if (!opts.av_name) ++ opts.av_name = "server_av"; ++ } ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_SHARED_AV; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ if (opts.dst_addr) { ++ if (ft_wait_child()) { ++ FT_PRINTERR("ft_wait_child", errno); ++ } ++ } ++ ++ ft_free_res(); ++ ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_tagged_peek.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_tagged_peek.c +new file mode 100644 +index 0000000..4f4afbc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_tagged_peek.c +@@ -0,0 +1,267 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++static struct fi_context fi_context; ++ ++static int wait_for_send_comp(int count) ++{ ++ int ret, completions = 0; ++ struct fi_cq_tagged_entry comp; ++ ++ do { ++ ret = fi_cq_sread(txcq, &comp, 1, NULL, -1); ++ if (ret != 1) { ++ FT_PRINTERR("fi_cq_sread", ret); ++ return ret; ++ } ++ completions++; ++ } while (completions < count); ++ ++ return 0; ++} ++ ++static int tag_queue_op(uint64_t tag, int recv, uint64_t flags) ++{ ++ int ret; ++ struct fi_cq_tagged_entry comp; ++ struct fi_msg_tagged msg = {0}; ++ struct fi_cq_err_entry cq_err; ++ struct iovec iov; ++ void *desc; ++ ++ if (recv) { ++ iov.iov_base = buf; ++ iov.iov_len = rx_size; ++ msg.msg_iov = &iov; ++ desc = mr_desc; ++ msg.desc = &desc; ++ msg.iov_count = 1; ++ msg.addr = remote_fi_addr; ++ } ++ msg.tag = tag; ++ msg.context = &fi_context; ++ ++ ret = fi_trecvmsg(ep, &msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_trecvmsg", ret); ++ return ret; ++ } ++ ++ ret = fi_cq_sread(rxcq, &comp, 1, NULL, -1); ++ if (ret != 1) { ++ if (ret == -FI_EAVAIL) { ++ ret = fi_cq_readerr(rxcq, &cq_err, 0); ++ if (ret < 0) ++ FT_PRINTERR("fi_cq_readerr", ret); ++ else ++ ret = -cq_err.err; ++ } else { ++ FT_PRINTERR("fi_cq_sread", ret); ++ } ++ } ++ return ret; ++} ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (!(tx_ctx_arr = calloc(5, sizeof *tx_ctx_arr))) ++ return -FI_ENOMEM; ++ ++ if (opts.dst_addr) { ++ printf("Searching for a bad msg\n"); ++ ret = tag_queue_op(0xbad, 0, FI_PEEK); ++ if (ret != -FI_ENOMSG) { ++ FT_PRINTERR("FI_PEEK", ret); ++ return ret; ++ } ++ ++ printf("Searching for a bad msg with claim\n"); ++ ret = tag_queue_op(0xbad, 0, FI_PEEK | FI_CLAIM); ++ if (ret != -FI_ENOMSG) { ++ FT_PRINTERR("FI_PEEK", ret); ++ return ret; ++ } ++ ++ printf("Retrieving fifth message\n"); ++ ret = tag_queue_op(0x900d+4, 1, 0); ++ if (ret != 1) { ++ FT_PRINTERR("Receive after peek", ret); ++ return ret; ++ } ++ printf("Messages 1-4 should be in unexpected queue\n"); ++ ++ printf("Searching for first msg\n"); ++ ret = tag_queue_op(0x900d, 0, FI_PEEK); ++ if (ret != 1) { ++ FT_PRINTERR("FI_PEEK", ret); ++ return ret; ++ } ++ ++ printf("Receiving first msg\n"); ++ ret = tag_queue_op(0x900d, 1, 0); ++ if (ret != 1) { ++ FT_PRINTERR("Receive after peek", ret); ++ return ret; ++ } ++ ++ printf("Searching for second msg to claim\n"); ++ ret = tag_queue_op(0x900d+1, 0, FI_PEEK | FI_CLAIM); ++ if (ret != 1) { ++ FT_PRINTERR("FI_PEEK | FI_CLAIM", ret); ++ return ret; ++ } ++ ++ printf("Receiving second msg\n"); ++ ret = tag_queue_op(0x900d+1, 1, FI_CLAIM); ++ if (ret != 1) { ++ FT_PRINTERR("FI_CLAIM", ret); ++ return ret; ++ } ++ ++ printf("Searching for third msg to peek and discard\n"); ++ ret = tag_queue_op(0x900d+2, 0, FI_PEEK | FI_DISCARD); ++ if (ret != 1) { ++ FT_PRINTERR("FI_PEEK | FI_DISCARD", ret); ++ return ret; ++ } ++ ++ printf("Checking to see if third msg was discarded\n"); ++ ret = tag_queue_op(0x900d+2, 0, FI_PEEK); ++ if (ret != -FI_ENOMSG) { ++ FT_PRINTERR("FI_PEEK", ret); ++ return ret; ++ } ++ ++ printf("Searching for fourth msg to claim and discard\n"); ++ ret = tag_queue_op(0x900d+3, 0, FI_PEEK | FI_CLAIM); ++ if (ret != 1) { ++ FT_PRINTERR("FI_DISCARD", ret); ++ return ret; ++ } ++ ++ printf("Discarding fourth msg\n"); ++ ret = tag_queue_op(0x900d+3, 0, FI_CLAIM | FI_DISCARD); ++ if (ret != 1) { ++ FT_PRINTERR("FI_CLAIM", ret); ++ return ret; ++ } ++ /* sync with sender before ft_finalize, since we sent ++ * and received messages outside of the sequence numbers ++ * maintained by common code */ ++ ret = fi_tsend(ep, tx_buf, 1, mr_desc, ++ remote_fi_addr, 0xabc, ++ &tx_ctx_arr[0]); ++ if (ret) ++ return ret; ++ ret = wait_for_send_comp(1); ++ if (ret) ++ return ret; ++ } else { ++ printf("Sending five tagged messages\n"); ++ for(i = 0; i < 5; i++) { ++ ret = fi_tsend(ep, tx_buf, tx_size, mr_desc, ++ remote_fi_addr, 0x900d+i, ++ &tx_ctx_arr[i]); ++ if (ret) ++ return ret; ++ } ++ printf("Waiting for messages to complete\n"); ++ ret = wait_for_send_comp(5); ++ if (ret) ++ return ret; ++ ret = tag_queue_op(0xabc, 1, 0); ++ if (ret != 1) { ++ FT_PRINTERR("Receive sync", ret); ++ return ret; ++ } ++ } ++ ++ ft_finalize(); ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int ret, op; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ opts.comp_method = FT_COMP_SREAD; ++ ++ hints = fi_allocinfo(); ++ if (!hints) { ++ FT_PRINTERR("fi_allocinfo", -FI_ENOMEM); ++ return EXIT_FAILURE; ++ } ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parsecsopts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "An RDM client-server example that uses tagged search.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->tx_attr->msg_order = FI_ORDER_SAS; ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_TAGGED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/recv_cancel.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/recv_cancel.c +new file mode 100644 +index 0000000..b44de18 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/recv_cancel.c +@@ -0,0 +1,224 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include "shared.h" ++ ++#define CANCEL_TAG 0xC ++#define STANDARD_TAG 0xA ++ ++static int recv_cancel_client(void) ++{ ++ int ret; ++ ++ /* sync with server */ ++ ret = ft_rx(ep, 1); ++ if (ret) ++ return ret; ++ ++ ft_tag = CANCEL_TAG; ++ ret = ft_post_tx(ep, remote_fi_addr, opts.transfer_size, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ if (opts.verbose) ++ fprintf(stdout, "CANCEL msg posted to server\n"); ++ ++ ft_tag = STANDARD_TAG; ++ ret = ft_post_tx(ep, remote_fi_addr, opts.transfer_size, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ if (opts.verbose) ++ fprintf(stdout, "STANDARD msg posted to server\n"); ++ ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int recv_cancel_host(void) ++{ ++ int ret = 0; ++ int retries = 0; ++ struct fi_cq_err_entry recv_completion, cancel_error_entry; ++ struct fi_context cancel_recv_ctx, standard_recv_ctx; ++ ++ /* Pre-post two recvs, one of which will be cancelled */ ++ ft_tag = CANCEL_TAG; ++ ret = ft_post_rx(ep, opts.transfer_size, &cancel_recv_ctx); ++ if (ret) ++ return ret; ++ ++ ft_tag = STANDARD_TAG; ++ ret = ft_post_rx(ep, opts.transfer_size, &standard_recv_ctx); ++ if (ret) ++ return ret; ++ ++ /* Cancel the first recv*/ ++ ret = fi_cancel((struct fid *)ep, &cancel_recv_ctx); ++ if (ret) { ++ FT_PRINTERR("fi_cancel", ret); ++ return ret; ++ } ++ ++ /* sync with client */ ++ ft_tag = 0; ++ ret = ft_tx(ep, remote_fi_addr, 1, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ /* Wait for fi_cq_read to fail indicating an err entry */ ++ do { ++ ret = fi_cq_read(rxcq, &recv_completion, 1); ++ if (ret == -FI_EAVAIL) ++ break; ++ else ++ retries++; ++ usleep(1000); ++ } while ((ret == -FI_EAGAIN) && (retries < 5000)); ++ if (retries >= 5000) { ++ FT_PRINTERR("ERROR: failed to detect error CQ entry in cq_read", -FI_EOTHER); ++ return -FI_EOTHER; ++ } else { ++ if (opts.verbose) ++ fprintf(stdout, "GOOD: detected error cq entry in cq_read\n"); ++ } ++ ++ /* Verify the error CQ has been populated */ ++ if (fi_cq_readerr(rxcq, &cancel_error_entry, 0) != 1) { ++ FT_PRINTERR("ERROR: No cancel CQ error entry was populated", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ ++ if (cancel_error_entry.err != FI_ECANCELED) { ++ FT_PRINTERR("ERROR: error code is incorrect", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ ++ if (!(cancel_error_entry.flags & FI_RECV)) { ++ FT_PRINTERR("ERROR: cancelled completion flags is incorrect", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ ++ if (opts.verbose) ++ fprintf(stdout, "GOOD: error entry has expected values\n"); ++ ++ /* Verify only one CQ err entry can be read */ ++ if (fi_cq_readerr(rxcq, &cancel_error_entry, 0) != -FI_EAGAIN) { ++ FT_PRINTERR("ERROR: Another CQ error entry was populated", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ ++ if (opts.verbose) ++ fprintf(stdout, "GOOD: no additional error entries have been detected\n"); ++ ++ /* Check for second recv completion*/ ++ do { ++ ret = fi_cq_read(rxcq, &recv_completion, 1); ++ if (ret > 0) { ++ if (recv_completion.op_context != &standard_recv_ctx) { ++ FT_PRINTERR("ERROR: op_context does not match recv ctx", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ } else if ((ret <= 0) && (ret != -FI_EAGAIN)) { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ } while (ret == -FI_EAGAIN); ++ ++ if (opts.verbose) ++ fprintf(stdout, "GOOD: Completed uncancelled recv\n"); ++ ++ fprintf(stdout, "GOOD: Completed Recv Cancel Test\n"); ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret; ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) ++ return recv_cancel_client(); ++ else ++ return recv_cancel_host(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "Vh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'V': ++ opts.verbose = 1; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Recv Cancel Functional test"); ++ FT_PRINT_OPTS_USAGE("-V", "Enable Verbose printing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_TAGGED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | FI_MR_ALLOCATED; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/resmgmt_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/resmgmt_test.c +new file mode 100644 +index 0000000..26c3212 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/resmgmt_test.c +@@ -0,0 +1,272 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include "shared.h" ++ ++static uint16_t max_opts = 100; ++int delay, tagged; ++ ++/* ++ * The general strategy here is that we call send_loop and do as many sends ++ * in a row as we can until we get FI_EAGAIN which prevents us from continuing and ++ * we have to drain the send_cq. Then we do it again, until we've sent ++ * all the messages we were going to send. ++ */ ++static int send_loop(size_t size) { ++ int q_opts = 0; ++ int ret; ++ struct fi_context send_ctx[max_opts]; ++ ++ while (q_opts < max_opts) { ++ do { ++ ft_tag = q_opts + 1; ++ if (tagged) ++ ret = fi_tsend(ep, tx_buf, size, NULL, remote_fi_addr, ++ ft_tag, (void *) &send_ctx[q_opts]); ++ else ++ ret = fi_send(ep, tx_buf, size, NULL, remote_fi_addr, ++ (void *) &send_ctx[q_opts]); ++ ++ if (ret == FI_SUCCESS) { ++ tx_seq++; ++ q_opts++; ++ } ++ } while (!ret && (q_opts != max_opts)); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAGAIN) { ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ } else { ++ FT_PRINTERR("Send OP", ret); ++ return ret; ++ } ++ } ++ } ++ ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ ++ if (opts.verbose) ++ printf("Success: Completed %d queued ops\n", q_opts); ++ ++ return 0; ++} ++ ++static int receive_loop(size_t size) ++{ ++ int ret; ++ int q_opts = 0; ++ struct fi_context recv_ctx[max_opts]; ++ ++ while (q_opts < max_opts) { ++ do { ++ ft_tag = q_opts + 1; ++ if (tagged) ++ ret = fi_trecv(ep, rx_buf, size, NULL, remote_fi_addr, ++ ft_tag, 0x0, (void *) &recv_ctx[q_opts]); ++ else ++ ret = fi_recv(ep, rx_buf, size, NULL, remote_fi_addr, ++ (void *) &recv_ctx[q_opts]); ++ ++ if (ret == FI_SUCCESS) { ++ rx_seq++; ++ q_opts++; ++ } ++ } while (!ret && (q_opts != max_opts)); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAGAIN) { ++ if (delay > 0) ++ sleep(delay); ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ } else { ++ FT_PRINTERR("Recv OP", ret); ++ return ret; ++ } ++ } ++ } ++ ++ if (delay > 0) ++ sleep(delay); ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ if (opts.verbose) ++ printf("Success: Completed %d queued ops\n", q_opts); ++ ++ return 0; ++} ++ ++static int overflow_test(void) ++{ ++ int ret = 0; ++ ++ if (opts.dst_addr) { ++ printf("Start testing for fi_send operations: %d\n", (int) max_opts); ++ ret = send_loop(opts.transfer_size); ++ if (ret) ++ printf("ERROR: calling send_master %d\n", ret); ++ } else { ++ printf("Start testing for fi_recv operations: %d\n", (int) max_opts); ++ ret = receive_loop(opts.transfer_size); ++ if (ret) ++ printf("ERROR: calling receive_loop %d\n", ret); ++ } ++ printf("GOOD, Completed Overflow Testing\n"); ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret = 0; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = overflow_test(); ++ ++ ft_sync(); ++ ft_finalize(); ++ ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.tx_cq_size = max_opts; ++ opts.rx_cq_size = max_opts; ++ delay = 0; ++ tagged = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "S:R:m:l:T:X:ActdjwvVh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'S': ++ opts.tx_cq_size = strtoul(optarg, NULL, 0); ++ printf("send cq size: %d\n", (int) opts.tx_cq_size); ++ break; ++ case 'R': ++ opts.rx_cq_size = strtoul(optarg, NULL, 0); ++ printf("recv cq size: %d\n", (int) opts.rx_cq_size); ++ break; ++ case 'T': ++ hints->tx_attr->size = strtoul(optarg, NULL, 0); ++ printf("tx context size: %d\n", (int) hints->tx_attr->size); ++ break; ++ case 'X': ++ hints->rx_attr->size = strtoul(optarg, NULL, 0); ++ printf("rx context size: %d\n", (int) hints->rx_attr->size); ++ break; ++ case 'm': ++ max_opts = strtoul(optarg, NULL, 0); ++ printf("max_opts set to %d\n", max_opts); ++ break; ++ case 'j': ++ opts.options |= FT_OPT_CQ_SHARED; ++ printf("using single shared CQ\n"); ++ break; ++ case 'l': ++ opts.transfer_size = strtoul(optarg, NULL, 0); ++ printf("Testing Message Size: %d\n", opts.transfer_size); ++ break; ++ case 't': ++ tagged = 1; ++ hints->caps |= FI_TAGGED; ++ printf("tagged messaging enabled\n"); ++ break; ++ case 'd': ++ delay = 1; ++ break; ++ case 'A': ++ hints->domain_attr->av_type = FI_AV_TABLE; ++ printf("AV TABLE enabled\n"); ++ break; ++ case 'V': ++ opts.verbose = 1; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Resource Management Functional Test"); ++ FT_PRINT_OPTS_USAGE("-S ", "Size of send CQ"); ++ FT_PRINT_OPTS_USAGE("-R ", "Size of recv CQ"); ++ FT_PRINT_OPTS_USAGE("-T ", "Number of TX Contexts"); ++ FT_PRINT_OPTS_USAGE("-X ", "Number of RX Contexts"); ++ FT_PRINT_OPTS_USAGE("-m ", "number of operations to post"); ++ FT_PRINT_OPTS_USAGE("-l ", "message length to test"); ++ FT_PRINT_OPTS_USAGE("-j", "Enable shared cq"); ++ FT_PRINT_OPTS_USAGE("-t", "Enable tagged message testing"); ++ FT_PRINT_OPTS_USAGE("-d", "Enable setting a delay"); ++ FT_PRINT_OPTS_USAGE("-A", "Enable av table testing (only RDM/DGRAM EP)"); ++ FT_PRINT_OPTS_USAGE("-V", "Enable verbose printing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/scalable_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/scalable_ep.c +new file mode 100644 +index 0000000..147945c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/scalable_ep.c +@@ -0,0 +1,389 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++ ++static int ctx_cnt = 2; ++static int rx_ctx_bits = 0; ++static struct fid_ep *sep; ++static struct fid_ep **tx_ep, **rx_ep; ++static struct fid_cq **txcq_array; ++static struct fid_cq **rxcq_array; ++static fi_addr_t *remote_rx_addr; ++ ++static void free_res(void) ++{ ++ if (rx_ep) { ++ FT_CLOSEV_FID(rx_ep, ctx_cnt); ++ free(rx_ep); ++ rx_ep = NULL; ++ } ++ if (tx_ep) { ++ FT_CLOSEV_FID(tx_ep, ctx_cnt); ++ free(tx_ep); ++ tx_ep = NULL; ++ } ++ if (rxcq_array) { ++ FT_CLOSEV_FID(rxcq_array, ctx_cnt); ++ free(rxcq_array); ++ rxcq_array = NULL; ++ } ++ if (txcq_array) { ++ FT_CLOSEV_FID(txcq_array, ctx_cnt); ++ free(txcq_array); ++ txcq_array = NULL; ++ } ++} ++ ++static int alloc_ep_res(struct fid_ep *sep) ++{ ++ int i, ret; ++ ++ /* Get number of bits needed to represent ctx_cnt */ ++ while (ctx_cnt >> ++rx_ctx_bits); ++ ++ av_attr.rx_ctx_bits = rx_ctx_bits; ++ ++ ret = ft_alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ txcq_array = calloc(ctx_cnt, sizeof *txcq_array); ++ rxcq_array = calloc(ctx_cnt, sizeof *rxcq_array); ++ tx_ep = calloc(ctx_cnt, sizeof *tx_ep); ++ rx_ep = calloc(ctx_cnt, sizeof *rx_ep); ++ remote_rx_addr = calloc(ctx_cnt, sizeof *remote_rx_addr); ++ ++ if (!buf || !txcq_array || !rxcq_array || !tx_ep || !rx_ep || !remote_rx_addr) { ++ perror("malloc"); ++ return -1; ++ } ++ ++ for (i = 0; i < ctx_cnt; i++) { ++ ret = fi_tx_context(sep, i, NULL, &tx_ep[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_tx_context", ret); ++ return ret; ++ } ++ ++ ret = fi_cq_open(domain, &cq_attr, &txcq_array[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ ++ ret = fi_rx_context(sep, i, NULL, &rx_ep[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_rx_context", ret); ++ return ret; ++ } ++ ++ ret = fi_cq_open(domain, &cq_attr, &rxcq_array[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int bind_ep_res(void) ++{ ++ int i, ret; ++ ++ ret = fi_scalable_ep_bind(sep, &av->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_scalable_ep_bind", ret); ++ return ret; ++ } ++ ++ for (i = 0; i < ctx_cnt; i++) { ++ ret = fi_ep_bind(tx_ep[i], &txcq_array[i]->fid, FI_SEND); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_enable(tx_ep[i]); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ } ++ ++ for (i = 0; i < ctx_cnt; i++) { ++ ret = fi_ep_bind(rx_ep[i], &rxcq_array[i]->fid, FI_RECV); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_enable(rx_ep[i]); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ ret = fi_recv(rx_ep[i], rx_buf, MAX(rx_size, FT_MAX_CTRL_MSG), ++ mr_desc, 0, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_recv", ret); ++ return ret; ++ } ++ } ++ ++ ret = fi_enable(sep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int wait_for_comp(struct fid_cq *cq) ++{ ++ struct fi_cq_entry comp; ++ int ret; ++ ++ do { ++ ret = fi_cq_read(cq, &comp, 1); ++ } while (ret < 0 && ret == -FI_EAGAIN); ++ ++ if (ret != 1) ++ FT_PRINTERR("fi_cq_read", ret); ++ else ++ ret = 0; ++ ++ return ret; ++} ++ ++#define DATA 0x12345670 ++ ++static int run_test() ++{ ++ int ret = 0, i; ++ uint32_t data; ++ uint32_t *tb = (uint32_t *)tx_buf; ++ uint32_t *rb = (uint32_t *)rx_buf; ++ ++ if (opts.dst_addr) { ++ for (i = 0; i < ctx_cnt && !ret; i++) { ++ fprintf(stdout, "Posting send for ctx: %d\n", i); ++ tb[0] = DATA + i; ++ ret = fi_send(tx_ep[i], tx_buf, tx_size, mr_desc, ++ remote_rx_addr[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_send", ret); ++ return ret; ++ } ++ ++ ret = wait_for_comp(txcq_array[i]); ++ } ++ } else { ++ for (i = 0; i < ctx_cnt && !ret; i++) { ++ fprintf(stdout, "wait for recv completion for ctx: %d\n", i); ++ ret = wait_for_comp(rxcq_array[i]); ++ ++ data = DATA + i; ++ if (memcmp(&data, rx_buf, 4) != 0) { ++ fprintf(stdout, "failed compare expected 0x%x," ++ " read 0x%x\n", data, rb[0]); ++ } ++ } ++ } ++ ++ return ret; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ /* Check the optimal number of TX and RX contexts supported by the provider */ ++ ctx_cnt = MIN(ctx_cnt, fi->domain_attr->tx_ctx_cnt); ++ ctx_cnt = MIN(ctx_cnt, fi->domain_attr->rx_ctx_cnt); ++ if (!ctx_cnt) { ++ fprintf(stderr, "Provider doesn't support contexts\n"); ++ return 1; ++ } ++ ++ fi->ep_attr->tx_ctx_cnt = ctx_cnt; ++ fi->ep_attr->rx_ctx_cnt = ctx_cnt; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = fi_scalable_ep(domain, fi, &sep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_scalable_ep", ret); ++ return ret; ++ } ++ ++ ret = alloc_ep_res(sep); ++ if (ret) ++ return ret; ++ ++ ret = bind_ep_res(); ++ return ret; ++} ++ ++static int init_av(void) ++{ ++ size_t addrlen; ++ int ret, i; ++ ++ if (opts.dst_addr) { ++ ret = ft_av_insert(av, fi->dest_addr, 1, &remote_fi_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ addrlen = FT_MAX_CTRL_MSG; ++ ret = fi_getname(&sep->fid, tx_buf, &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = fi_send(tx_ep[0], tx_buf, addrlen, ++ mr_desc, remote_fi_addr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_send", ret); ++ return ret; ++ } ++ ++ ret = wait_for_comp(rxcq_array[0]); ++ if (ret) ++ return ret; ++ } else { ++ ret = wait_for_comp(rxcq_array[0]); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av, rx_buf, 1, &remote_fi_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ ret = fi_send(tx_ep[0], tx_buf, 1, ++ mr_desc, remote_fi_addr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_send", ret); ++ return ret; ++ } ++ } ++ ++ for (i = 0; i < ctx_cnt; i++) ++ remote_rx_addr[i] = fi_rx_addr(remote_fi_addr, i, rx_ctx_bits); ++ ++ ret = fi_recv(rx_ep[0], rx_buf, rx_size, mr_desc, 0, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_recv", ret); ++ return ret; ++ } ++ ++ ret = wait_for_comp(txcq_array[0]); ++ return ret; ++} ++ ++ ++static int run(void) ++{ ++ int ret = 0; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = init_av(); ++ if (ret) ++ return ret; ++ ++ ret = run_test(); ++ ++ /*TODO: Add a local finalize applicable for scalable ep */ ++ //ft_finalize(fi, tx_ep[0], txcq_array[0], rxcq_array[0], remote_rx_addr[0]); ++ ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int ret, op; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "An RDM client-server example with scalable endpoints.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_NAMED_RX_CTX; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ free_res(); ++ /* Closes the scalable ep that was allocated in the test */ ++ FT_CLOSE_FID(sep); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/shared_ctx.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/shared_ctx.c +new file mode 100644 +index 0000000..bbee0c1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/shared_ctx.c +@@ -0,0 +1,665 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++enum { ++ FT_UNSPEC, ++ FT_EP_CNT, ++}; ++ ++enum ft_ep_state { ++ FT_EP_STATE_INIT, ++ FT_EP_CONNECT_RCVD, ++ FT_EP_CONNECTING, ++ FT_EP_CONNECTED, ++}; ++ ++struct ep_info { ++ struct fid_ep *ep; ++ struct fi_info *fi; ++ enum ft_ep_state state; ++}; ++ ++static struct fi_info *fi_dup; ++static int tx_shared_ctx = 1; ++static int rx_shared_ctx = 1; ++static int ep_cnt = 4; ++static struct fid_ep **ep_array, *srx_ctx; ++static struct fid_stx *stx_ctx; ++static size_t addrlen = 0; ++static fi_addr_t *addr_array; ++ ++static int get_dupinfo(void) ++{ ++ struct fi_info *hints_dup; ++ int ret; ++ ++ /* Get a fi_info corresponding to a wild card port. The first endpoint ++ * should use default/given port since that is what is known to both ++ * client and server. For other endpoints we should use addresses with ++ * random ports to avoid collision. fi_getinfo should return a random ++ * port if we don't specify it in the service arg or the hints. This ++ * is used only for non-MSG endpoints. */ ++ ++ hints_dup = fi_dupinfo(hints); ++ if (!hints_dup) ++ return -FI_ENOMEM; ++ ++ free(hints_dup->src_addr); ++ free(hints_dup->dest_addr); ++ hints_dup->src_addr = NULL; ++ hints_dup->dest_addr = NULL; ++ hints_dup->src_addrlen = 0; ++ hints_dup->dest_addrlen = 0; ++ ++ if (opts.dst_addr) { ++ ret = fi_getinfo(FT_FIVERSION, opts.dst_addr, NULL, 0, ++ hints_dup, &fi_dup); ++ } else { ++ ret = fi_getinfo(FT_FIVERSION, opts.src_addr, NULL, FI_SOURCE, ++ hints_dup, &fi_dup); ++ } ++ if (ret) ++ FT_PRINTERR("fi_getinfo", ret); ++ fi_freeinfo(hints_dup); ++ return ret; ++} ++ ++static int alloc_ep(void) ++{ ++ int i, ret; ++ ++ ep_array = calloc(ep_cnt, sizeof(*ep_array)); ++ if (!ep_array) ++ return -FI_ENOMEM; ++ ++ ret = fi_endpoint(domain, fi, &ep_array[0], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ for (i = 1; i < ep_cnt; i++) { ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = fi_endpoint(domain, fi, &ep_array[i], NULL); ++ else ++ ret = fi_endpoint(domain, fi_dup, &ep_array[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ int ret; ++ ++ ret = ft_alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ if (tx_shared_ctx) { ++ ret = fi_stx_context(domain, fi->tx_attr, &stx_ctx, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_stx_context", ret); ++ return ret; ++ } ++ } ++ ++ if (rx_shared_ctx) { ++ ret = fi_srx_context(domain, fi->rx_attr, &srx_ctx, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_srx_context", ret); ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++static int bind_ep_res(struct fid_ep *ep) ++{ ++ int ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ FT_EP_BIND(ep, eq, 0); ++ ++ if (tx_shared_ctx) ++ FT_EP_BIND(ep, stx_ctx, 0); ++ ++ if (rx_shared_ctx) ++ FT_EP_BIND(ep, srx_ctx, 0); ++ ++ FT_EP_BIND(ep, txcq, FI_SEND); ++ FT_EP_BIND(ep, rxcq, FI_RECV); ++ FT_EP_BIND(ep, av, 0); ++ ++ ret = fi_enable(ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++static int bind_ep_array_res(void) ++{ ++ int i, ret; ++ for (i = 0; i < ep_cnt; i++) { ++ ret = bind_ep_res(ep_array[i]); ++ if (ret) ++ return ret; ++ } ++ return 0; ++} ++ ++static int run_test() ++{ ++ int ret, i; ++ ++ if (!(tx_ctx_arr = calloc(ep_cnt, sizeof *tx_ctx_arr))) ++ return -FI_ENOMEM; ++ ++ if (!(rx_ctx_arr = calloc(ep_cnt, sizeof *rx_ctx_arr))) ++ return -FI_ENOMEM; ++ ++ /* Post recvs */ ++ for (i = 0; i < ep_cnt; i++) { ++ if (rx_shared_ctx) { ++ fprintf(stdout, "Posting recv #%d for shared rx ctx\n", i); ++ ret = ft_post_rx(srx_ctx, rx_size, &rx_ctx_arr[i]); ++ } else { ++ fprintf(stdout, "Posting recv for endpoint #%d\n", i); ++ ret = ft_post_rx(ep_array[i], rx_size, &rx_ctx_arr[i]); ++ } ++ if (ret) ++ return ret; ++ } ++ ++ if (opts.dst_addr) { ++ /* Post sends addressed to remote EPs */ ++ for (i = 0; i < ep_cnt; i++) { ++ if (tx_shared_ctx) ++ fprintf(stdout, "Posting send #%d to shared tx ctx\n", i); ++ else ++ fprintf(stdout, "Posting send to endpoint #%d\n", i); ++ ret = ft_tx(ep_array[i], addr_array[i], tx_size, &tx_ctx_arr[i]); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ /* Wait for recv completions */ ++ ret = ft_get_rx_comp(rx_seq - 1); ++ if (ret) ++ return ret; ++ ++ if (!opts.dst_addr) { ++ /* Post sends addressed to remote EPs */ ++ for (i = 0; i < ep_cnt; i++) { ++ if (tx_shared_ctx) ++ fprintf(stdout, "Posting send #%d to shared tx ctx\n", i); ++ else ++ fprintf(stdout, "Posting send to endpoint #%d\n", i); ++ ret = ft_tx(ep_array[i], addr_array[i], tx_size, &tx_ctx_arr[i]); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int init_av(void) ++{ ++ int ret; ++ int i; ++ ++ if (opts.dst_addr) { ++ ret = ft_av_insert(av, fi->dest_addr, 1, &addr_array[0], 0, NULL); ++ if (ret) ++ return ret; ++ } ++ ++ for (i = 0; i < ep_cnt; i++) { ++ addrlen = tx_size; ++ ret = fi_getname(&ep_array[i]->fid, tx_buf + ft_tx_prefix_size(), ++ &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep_array[0], addr_array[0], addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ if (rx_shared_ctx) ++ ret = ft_rx(srx_ctx, rx_size); ++ else ++ ret = ft_rx(ep_array[0], rx_size); ++ if (ret) ++ return ret; ++ ++ /* Skip the first address since we already have it in AV */ ++ if (i) { ++ ret = ft_av_insert(av, rx_buf + ft_rx_prefix_size(), 1, ++ &addr_array[i], 0, NULL); ++ if (ret) ++ return ret; ++ } ++ } else { ++ if (rx_shared_ctx) ++ ret = ft_rx(srx_ctx, rx_size); ++ else ++ ret = ft_rx(ep_array[0], rx_size); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av, rx_buf + ft_rx_prefix_size(), 1, ++ &addr_array[i], 0, NULL); ++ if (ret) ++ return ret; ++ ++ ret = ft_tx(ep_array[0], addr_array[0], addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ } ++ } ++ ++ /* ACK */ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep_array[0], addr_array[0], 1, &tx_ctx); ++ } else { ++ if (rx_shared_ctx) ++ ret = ft_rx(srx_ctx, rx_size); ++ else ++ ret = ft_rx(ep_array[0], rx_size); ++ } ++ ++ return ret; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = get_dupinfo(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ av_attr.count = ep_cnt; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep(); ++ if (ret) ++ return ret; ++ ++ ret = bind_ep_array_res(); ++ if (ret) ++ return ret; ++ ++ /* Post recv */ ++ if (rx_shared_ctx) ++ ret = ft_post_rx(srx_ctx, MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ else ++ ret = ft_post_rx(ep_array[0], MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = init_av(); ++ return ret; ++} ++ ++static int client_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int i, ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = get_dupinfo(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep(); ++ if (ret) ++ return ret; ++ ++ ret = bind_ep_array_res(); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < ep_cnt; i++) { ++ ret = fi_connect(ep_array[i], fi->dest_addr, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "connect"); ++ ret = (int) rd; ++ return ret; ++ } ++ ++ if (event != FI_CONNECTED || entry.fid != &ep_array[i]->fid) { ++ fprintf(stderr, "Unexpected CM event %d fid %p (ep %p)\n", ++ event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ } ++ ++ /* Post recv */ ++ if (rx_shared_ctx) ++ ret = ft_post_rx(srx_ctx, MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ else ++ ret = ft_post_rx(ep_array[0], MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int server_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret, k; ++ int num_conn_reqs = 0, num_connected = 0; ++ struct ep_info *ep_state_array = NULL; ++ ++ ep_array = calloc(ep_cnt, sizeof(*ep_array)); ++ if (!ep_array) ++ return -FI_ENOMEM; ++ ++ ep_state_array = calloc(ep_cnt, sizeof(*ep_state_array)); ++ if (!ep_state_array) ++ return -FI_ENOMEM; ++ ++ while (num_connected != ep_cnt) { ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "cm-event"); ++ ret = (int) rd; ++ goto err; ++ } ++ ++ switch(event) { ++ case FI_CONNREQ: ++ if (num_conn_reqs == ep_cnt) { ++ fprintf(stderr, "Unexpected CM event %d\n", event); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ fi = ep_state_array[num_conn_reqs].fi = entry.info; ++ ep_state_array[num_conn_reqs].state = FT_EP_CONNECT_RCVD; ++ ++ if (num_conn_reqs == 0) { ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ goto err; ++ } ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ goto err; ++ } ++ ++ ret = fi_endpoint(domain, fi, &ep_array[num_conn_reqs], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ goto err; ++ } ++ ++ ep_state_array[num_conn_reqs].ep = ep_array[num_conn_reqs]; ++ ret = bind_ep_res(ep_array[num_conn_reqs]); ++ if (ret) ++ goto err; ++ ++ ret = fi_accept(ep_array[num_conn_reqs], NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ goto err; ++ } ++ ++ ep_state_array[num_conn_reqs].state = FT_EP_CONNECTING; ++ num_conn_reqs++; ++ break; ++ ++ case FI_CONNECTED: ++ if (num_conn_reqs <= num_connected) { ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ ++ for (k = 0; k < num_conn_reqs; k++) { ++ if (ep_state_array[k].state != FT_EP_CONNECTING) ++ continue; ++ if (&ep_state_array[k].ep->fid == entry.fid) { ++ ep_state_array[k].state = FT_EP_CONNECTED; ++ num_connected++; ++ if (num_connected != ep_cnt) ++ fi_freeinfo(ep_state_array[k].fi); ++ break; ++ } ++ } ++ ++ if (k == num_conn_reqs) { ++ fprintf(stderr, "Unexpected CM event %d fid %p (ep %p)\n", ++ event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ break; ++ ++ default: ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ } ++ ++ /* Post recv */ ++ if (rx_shared_ctx) ++ ret = ft_post_rx(srx_ctx, MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ else ++ ret = ft_post_rx(ep_array[0], MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ if (ret) ++ goto err; ++ ++ free(ep_state_array); ++ return 0; ++err: ++ for (k = 0; k < ep_cnt; k++) { ++ switch(ep_state_array[k].state) { ++ case FT_EP_CONNECT_RCVD: ++ fi_reject(pep, ep_state_array[k].fi->handle, NULL, 0); ++ break; ++ ++ case FT_EP_CONNECTING: ++ case FT_EP_CONNECTED: ++ fi_shutdown(ep_state_array[k].ep, 0); ++ break; ++ ++ case FT_EP_STATE_INIT: ++ default: ++ break; ++ } ++ } ++ ++ free(ep_state_array); ++ return ret; ++} ++ ++static int run(void) ++{ ++ int ret = 0; ++ ++ addr_array = calloc(ep_cnt, sizeof(*addr_array)); ++ if (!addr_array) { ++ perror("malloc"); ++ return -FI_ENOMEM; ++ } ++ ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? client_connect() : server_connect(); ++ } else { ++ ret = init_fabric(); ++ } ++ if (ret) ++ return ret; ++ ++ ret = run_test(); ++ ++ /* TODO: Add a local finalize applicable to shared ctx */ ++ //ft_finalize(fi, ep_array[0], txcq, rxcq, addr_array[0]); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int option_index = 0; ++ ++ struct option long_options[] = { ++ {"no-tx-shared-ctx", no_argument, &tx_shared_ctx, 0}, ++ {"no-rx-shared-ctx", no_argument, &rx_shared_ctx, 0}, ++ {"ep-count", required_argument, 0, FT_EP_CNT}, ++ {0, 0, 0, 0}, ++ }; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt_long(argc, argv, "h" ADDR_OPTS INFO_OPTS, ++ long_options, &option_index)) != -1) { ++ switch (op) { ++ case FT_EP_CNT: ++ ep_cnt = atoi(optarg); ++ if (ep_cnt <= 0) { ++ FT_ERR("ep_count needs to be greater than 0\n"); ++ return EXIT_FAILURE; ++ } ++ hints->domain_attr->ep_cnt = ep_cnt; ++ break; ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "An RDM client-server example that uses" ++ " shared context.\n"); ++ FT_PRINT_OPTS_USAGE("--no-tx-shared-ctx", ++ "Disable shared context for TX"); ++ FT_PRINT_OPTS_USAGE("--no-rx-shared-ctx", ++ "Disable shared context for RX"); ++ FT_PRINT_OPTS_USAGE("--ep-count (default: 4)", ++ "# of endpoints to be opened"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ if (tx_shared_ctx) ++ hints->ep_attr->tx_ctx_cnt = FI_SHARED_CONTEXT; ++ if (rx_shared_ctx) ++ hints->ep_attr->rx_ctx_cnt = FI_SHARED_CONTEXT; ++ ++ ret = run(); ++ ++ FT_CLOSEV_FID(ep_array, ep_cnt); ++ if (rx_shared_ctx) ++ FT_CLOSE_FID(srx_ctx); ++ if (tx_shared_ctx) ++ FT_CLOSE_FID(stx_ctx); ++ ft_free_res(); ++ free(addr_array); ++ free(ep_array); ++ fi_freeinfo(fi_dup); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/unexpected_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/unexpected_msg.c +new file mode 100644 +index 0000000..7d917b6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/unexpected_msg.c +@@ -0,0 +1,276 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++ ++static size_t concurrent_msgs = 5; ++static size_t num_iters = 600; ++static bool send_data = false; ++ ++ ++/* Common code will free allocated buffers and MR */ ++static int alloc_bufs(void) ++{ ++ int ret; ++ ++ tx_size = opts.transfer_size + ft_tx_prefix_size(); ++ rx_size = opts.transfer_size + ft_rx_prefix_size(); ++ buf_size = (tx_size + rx_size) * concurrent_msgs; ++ ++ buf = malloc(buf_size); ++ tx_ctx_arr = calloc(concurrent_msgs, sizeof(*tx_ctx_arr)); ++ rx_ctx_arr = calloc(concurrent_msgs, sizeof(*rx_ctx_arr)); ++ if (!buf || !tx_ctx_arr || !rx_ctx_arr) ++ return -FI_ENOMEM; ++ ++ rx_buf = buf; ++ tx_buf = (char *) buf + rx_size * concurrent_msgs; ++ ++ if (fi->domain_attr->mr_mode & FI_MR_LOCAL) { ++ ret = fi_mr_reg(domain, buf, buf_size, FI_SEND | FI_RECV, ++ 0, FT_MR_KEY, 0, &mr, NULL); ++ if (ret) ++ return ret; ++ ++ mr_desc = fi_mr_desc(mr); ++ } ++ ++ return 0; ++} ++ ++static char *get_tx_buf(int index) ++{ ++ return tx_buf + tx_size * index; ++} ++ ++static char *get_rx_buf(int index) ++{ ++ return rx_buf + rx_size * index; ++} ++ ++static int wait_recvs() ++{ ++ struct fi_cq_tagged_entry entry; ++ int ret; ++ ++ if (opts.comp_method == FT_COMP_SREAD) { ++ ret = fi_cq_sread(rxcq, &entry, 1, NULL, -1); ++ } else { ++ do { ++ ret = fi_cq_read(rxcq, &entry, 1); ++ } while (ret == -FI_EAGAIN); ++ } ++ ++ if ((ret == 1) && send_data) { ++ if (entry.data != opts.transfer_size) { ++ printf("ERROR incorrect remote CQ data value. Got %lu, expected %d\n", ++ (unsigned long)entry.data, opts.transfer_size); ++ return -FI_EOTHER; ++ } ++ } ++ ++ if (ret < 1) ++ printf("ERROR fi_cq_(s)read returned %d %s\n", ret, fi_strerror(-ret)); ++ return ret; ++} ++ ++static int run_test_loop(void) ++{ ++ int ret = 0; ++ uint64_t op_data = send_data ? opts.transfer_size : NO_CQ_DATA; ++ uint64_t op_tag = 0x1234; ++ char *op_buf; ++ int i, j; ++ ++ for (i = 0; i < num_iters; i++) { ++ for (j = 0; j < concurrent_msgs; j++) { ++ op_buf = get_tx_buf(j); ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) ++ ft_fill_buf(op_buf + ft_tx_prefix_size(), ++ opts.transfer_size); ++ ++ ret = ft_post_tx_buf(ep, remote_fi_addr, ++ opts.transfer_size, ++ op_data, &tx_ctx_arr[j], ++ op_buf, mr_desc, op_tag); ++ if (ret) { ++ printf("ERROR send_msg returned %d\n", ret); ++ return ret; ++ } ++ } ++ ++ ret = ft_sync(); ++ if (ret) ++ return ret; ++ ++ for (j = 0; j < concurrent_msgs; j++) { ++ op_buf = get_rx_buf(j); ++ ret = ft_post_rx_buf(ep, opts.transfer_size, ++ &rx_ctx_arr[j], op_buf, ++ mr_desc, op_tag); ++ if (ret) { ++ printf("ERROR recv_msg returned %d\n", ret); ++ return ret; ++ } ++ } ++ ++ for (j = 0; j < concurrent_msgs; j++) { ++ ret = wait_recvs(); ++ if (ret < 1) ++ return ret; ++ } ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ for (j = 0; j < concurrent_msgs; j++) { ++ op_buf = get_rx_buf(j); ++ if (ft_check_buf(op_buf + ft_rx_prefix_size(), ++ opts.transfer_size)) ++ return -FI_EOTHER; ++ } ++ } ++ ++ for (j = 0; j < concurrent_msgs; j++) { ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ } ++ ++ if (i % 100 == 0) ++ printf("PID %d GOOD iter %d/%ld completed\n", ++ getpid(), i, num_iters); ++ } ++ ++ (void) ft_sync(); ++ printf("PID %d GOOD all done\n", getpid()); ++ return ret; ++} ++ ++static int run_test(void) ++{ ++ int ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ alloc_bufs(); ++ ret = run_test_loop(); ++ ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_OOB_SYNC | FT_OPT_SKIP_MSG_ALLOC; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "m:i:c:vdSh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'c': ++ concurrent_msgs = strtoul(optarg, NULL, 0); ++ break; ++ case 'i': ++ num_iters = strtoul(optarg, NULL, 0); ++ break; ++ case 'S': ++ opts.comp_method = FT_COMP_SREAD; ++ break; ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case 'm': ++ opts.transfer_size = strtoul(optarg, NULL, 0); ++ break; ++ case 'd': ++ send_data = true; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Unexpected message functional test"); ++ FT_PRINT_OPTS_USAGE("-c ", ++ "Concurrent messages per iteration "); ++ FT_PRINT_OPTS_USAGE("-v", "Enable data verification"); ++ FT_PRINT_OPTS_USAGE("-i ", "Number of iterations"); ++ FT_PRINT_OPTS_USAGE("-S", ++ "Use fi_cq_sread instead of polling fi_cq_read"); ++ FT_PRINT_OPTS_USAGE("-m ", ++ "Size of unexpected messages"); ++ FT_PRINT_OPTS_USAGE("-d", "Send remote CQ data"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | FI_MR_ALLOCATED; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->rx_attr->total_buffered_recv = 0; ++ hints->caps = FI_TAGGED; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/freebsd/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/freebsd/osd.h +new file mode 100644 +index 0000000..f4e7f01 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/freebsd/osd.h +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 2016 Intel Corp, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTESTS_FREEBSD_OSD_H_ ++#define _FABTESTS_FREEBSD_OSD_H_ ++ ++#include ++#include ++#include ++ ++ ++#define bswap_64 bswap64 ++ ++#define ENODATA ENOMSG ++#define HOST_NAME_MAX 128 ++ ++typedef cpuset_t cpu_set_t; ++ ++#endif /* _FABTESTS_FREEBSD_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/ft_osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/ft_osd.h +new file mode 100644 +index 0000000..a71c1c9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/ft_osd.h +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FT_OSD_H_ ++#define _FT_OSD_H_ ++ ++#ifdef __APPLE__ ++#include ++#include ++#elif defined __FreeBSD__ ++#include ++#include ++#elif defined _WIN32 ++#include ++#else ++#include ++#endif ++ ++#endif /* _FT_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/jsmn.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/jsmn.h +new file mode 100644 +index 0000000..48a07c1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/jsmn.h +@@ -0,0 +1,97 @@ ++/* ++ * Copyright (c) 2010 Serge A. Zaitsev ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to deal ++ * in the Software without restriction, including without limitation the rights ++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ * copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++ * THE SOFTWARE. ++ */ ++ ++#ifndef __JSMN_H_ ++#define __JSMN_H_ ++ ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * JSON type identifier. Basic types are: ++ * o Object ++ * o Array ++ * o String ++ * o Other primitive: number, boolean (true/false) or null ++ */ ++typedef enum { ++ JSMN_PRIMITIVE = 0, ++ JSMN_OBJECT = 1, ++ JSMN_ARRAY = 2, ++ JSMN_STRING = 3 ++} jsmntype_t; ++ ++typedef enum { ++ /* Not enough tokens were provided */ ++ JSMN_ERROR_NOMEM = -1, ++ /* Invalid character inside JSON string */ ++ JSMN_ERROR_INVAL = -2, ++ /* The string is not a full JSON packet, more bytes expected */ ++ JSMN_ERROR_PART = -3 ++} jsmnerr_t; ++ ++/** ++ * JSON token description. ++ * @param type type (object, array, string etc.) ++ * @param start start position in JSON data string ++ * @param end end position in JSON data string ++ */ ++typedef struct { ++ jsmntype_t type; ++ int start; ++ int end; ++ int size; ++#ifdef JSMN_PARENT_LINKS ++ int parent; ++#endif ++} jsmntok_t; ++ ++/** ++ * JSON parser. Contains an array of token blocks available. Also stores ++ * the string being parsed now and current position in that string ++ */ ++typedef struct { ++ unsigned int pos; /* offset in the JSON string */ ++ unsigned int toknext; /* next token to allocate */ ++ int toksuper; /* superior token node, e.g parent object or array */ ++} jsmn_parser; ++ ++/** ++ * Create JSON parser over an array of tokens ++ */ ++void jsmn_init(jsmn_parser *parser); ++ ++/** ++ * Run JSON parser. It parses a JSON data string into and array of tokens, each describing ++ * a single JSON object. ++ */ ++jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, ++ jsmntok_t *tokens, unsigned int num_tokens); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* __JSMN_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/osx/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/osx/osd.h +new file mode 100644 +index 0000000..5c425d3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/osx/osd.h +@@ -0,0 +1,59 @@ ++/* ++ * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTESTS_OSX_OSD_H_ ++#define _FABTESTS_OSX_OSD_H_ ++ ++#include ++ ++#include ++#include ++ ++#if !HAVE_CLOCK_GETTIME ++#define CLOCK_REALTIME 0 ++#define CLOCK_REALTIME_COARSE 0 ++#define CLOCK_MONOTONIC 0 ++ ++typedef int clockid_t; ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++int clock_gettime(clockid_t clk_id, struct timespec *tp); ++ ++#ifdef __cplusplus ++} ++#endif ++#endif // !HAVE_CLOCK_GETTIME ++ ++#endif // FABTESTS_OSX_OSD_H +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/shared.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/shared.h +new file mode 100644 +index 0000000..201fe5e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/shared.h +@@ -0,0 +1,504 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _SHARED_H_ ++#define _SHARED_H_ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#ifndef FT_FIVERSION ++#define FT_FIVERSION FI_VERSION(1,5) ++#endif ++ ++#include "ft_osd.h" ++#define OFI_UTIL_PREFIX "ofi_" ++#define OFI_NAME_DELIM ';' ++ ++#define OFI_MR_BASIC_MAP (FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_VIRT_ADDR) ++ ++/* exit codes must be 0-255 */ ++static inline int ft_exit_code(int ret) ++{ ++ int absret = ret < 0 ? -ret : ret; ++ return absret > 255 ? EXIT_FAILURE : absret; ++} ++ ++#define ft_foreach_info(fi, info) \ ++ for (fi = info; fi; fi = fi->next) ++ ++#define ft_sa_family(addr) (((struct sockaddr *)(addr))->sa_family) ++ ++struct test_size_param { ++ int size; ++ int enable_flags; ++}; ++ ++extern struct test_size_param test_size[]; ++extern const unsigned int test_cnt; ++#define TEST_CNT test_cnt ++ ++#define FT_ENABLE_ALL (~0) ++#define FT_DEFAULT_SIZE (1 << 0) ++ ++static inline int ft_use_size(int index, int enable_flags) ++{ ++ return (enable_flags == FT_ENABLE_ALL) || ++ (enable_flags & test_size[index].enable_flags); ++} ++ ++ ++enum precision { ++ NANO = 1, ++ MICRO = 1000, ++ MILLI = 1000000, ++}; ++ ++enum ft_comp_method { ++ FT_COMP_SPIN = 0, ++ FT_COMP_SREAD, ++ FT_COMP_WAITSET, ++ FT_COMP_WAIT_FD ++}; ++ ++enum { ++ FT_OPT_ACTIVE = 1 << 0, ++ FT_OPT_ITER = 1 << 1, ++ FT_OPT_SIZE = 1 << 2, ++ FT_OPT_RX_CQ = 1 << 3, ++ FT_OPT_TX_CQ = 1 << 4, ++ FT_OPT_RX_CNTR = 1 << 5, ++ FT_OPT_TX_CNTR = 1 << 6, ++ FT_OPT_VERIFY_DATA = 1 << 7, ++ FT_OPT_ALIGN = 1 << 8, ++ FT_OPT_BW = 1 << 9, ++ FT_OPT_CQ_SHARED = 1 << 10, ++ FT_OPT_OOB_SYNC = 1 << 11, ++ FT_OPT_SKIP_MSG_ALLOC = 1 << 12, ++ FT_OPT_SKIP_REG_MR = 1 << 13, ++}; ++ ++/* for RMA tests --- we want to be able to select fi_writedata, but there is no ++ * constant in libfabric for this */ ++enum ft_rma_opcodes { ++ FT_RMA_READ = 1, ++ FT_RMA_WRITE, ++ FT_RMA_WRITEDATA, ++}; ++ ++enum ft_atomic_opcodes { ++ FT_ATOMIC_BASE, ++ FT_ATOMIC_FETCH, ++ FT_ATOMIC_COMPARE, ++}; ++ ++struct ft_opts { ++ int iterations; ++ int warmup_iterations; ++ int transfer_size; ++ int window_size; ++ int av_size; ++ int verbose; ++ int tx_cq_size; ++ int rx_cq_size; ++ char *src_port; ++ char *dst_port; ++ char *src_addr; ++ char *dst_addr; ++ char *av_name; ++ int sizes_enabled; ++ int options; ++ enum ft_comp_method comp_method; ++ int machr; ++ enum ft_rma_opcodes rma_op; ++ char *oob_port; ++ int argc; ++ ++ /* Fail if the selected provider does not support FI_MSG_PREFIX. */ ++ int force_prefix; ++ char **argv; ++}; ++ ++extern struct fi_info *fi_pep, *fi, *hints; ++extern struct fid_fabric *fabric; ++extern struct fid_wait *waitset; ++extern struct fid_domain *domain; ++extern struct fid_poll *pollset; ++extern struct fid_pep *pep; ++extern struct fid_ep *ep, *alias_ep; ++extern struct fid_cq *txcq, *rxcq; ++extern struct fid_cntr *txcntr, *rxcntr; ++extern struct fid_mr *mr, no_mr; ++extern void *mr_desc; ++extern struct fid_av *av; ++extern struct fid_eq *eq; ++extern struct fid_mc *mc; ++ ++extern fi_addr_t remote_fi_addr; ++extern char *buf, *tx_buf, *rx_buf; ++extern size_t buf_size, tx_size, rx_size; ++extern int tx_fd, rx_fd; ++extern int timeout; ++ ++extern struct fi_context tx_ctx, rx_ctx; ++extern struct fi_context *tx_ctx_arr, *rx_ctx_arr; ++extern uint64_t remote_cq_data; ++ ++extern uint64_t tx_seq, rx_seq, tx_cq_cntr, rx_cq_cntr; ++extern struct fi_av_attr av_attr; ++extern struct fi_eq_attr eq_attr; ++extern struct fi_cq_attr cq_attr; ++extern struct fi_cntr_attr cntr_attr; ++ ++extern struct fi_rma_iov remote; ++ ++extern char test_name[50]; ++extern struct timespec start, end; ++extern struct ft_opts opts; ++ ++void ft_parseinfo(int op, char *optarg, struct fi_info *hints); ++void ft_parse_addr_opts(int op, char *optarg, struct ft_opts *opts); ++void ft_parsecsopts(int op, char *optarg, struct ft_opts *opts); ++int ft_parse_rma_opts(int op, char *optarg, struct fi_info *hints, ++ struct ft_opts *opts); ++void ft_addr_usage(); ++void ft_usage(char *name, char *desc); ++void ft_mcusage(char *name, char *desc); ++void ft_csusage(char *name, char *desc); ++ ++void ft_fill_buf(void *buf, int size); ++int ft_check_buf(void *buf, int size); ++int ft_check_opts(uint64_t flags); ++uint64_t ft_init_cq_data(struct fi_info *info); ++int ft_sock_listen(char *node, char *service); ++int ft_sock_connect(char *node, char *service); ++int ft_sock_accept(); ++int ft_sock_send(int fd, void *msg, size_t len); ++int ft_sock_recv(int fd, void *msg, size_t len); ++int ft_sock_sync(int value); ++void ft_sock_shutdown(int fd); ++extern int (*ft_mr_alloc_func)(void); ++extern uint64_t ft_tag; ++extern int ft_parent_proc; ++extern int ft_socket_pair[2]; ++extern int sock; ++extern int listen_sock; ++#define ADDR_OPTS "B:P:s:a:b::" ++#define FAB_OPTS "f:d:p:" ++#define INFO_OPTS FAB_OPTS "e:" ++#define CS_OPTS ADDR_OPTS "I:S:mc:t:w:l" ++#define NO_CQ_DATA 0 ++ ++extern char default_port[8]; ++ ++#define INIT_OPTS (struct ft_opts) \ ++ { .options = FT_OPT_RX_CQ | FT_OPT_TX_CQ, \ ++ .iterations = 1000, \ ++ .warmup_iterations = 10, \ ++ .transfer_size = 1024, \ ++ .window_size = 64, \ ++ .av_size = 1, \ ++ .tx_cq_size = 0, \ ++ .rx_cq_size = 0, \ ++ .verbose = 0, \ ++ .sizes_enabled = FT_DEFAULT_SIZE, \ ++ .rma_op = FT_RMA_WRITE, \ ++ .oob_port = NULL, \ ++ .argc = argc, .argv = argv \ ++ } ++ ++#define FT_STR_LEN 32 ++#define FT_MAX_CTRL_MSG 64 ++#define FT_MR_KEY 0xC0DE ++#define FT_MSG_MR_ACCESS (FI_SEND | FI_RECV) ++#define FT_RMA_MR_ACCESS (FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE) ++ ++int ft_getsrcaddr(char *node, char *service, struct fi_info *hints); ++int ft_read_addr_opts(char **node, char **service, struct fi_info *hints, ++ uint64_t *flags, struct ft_opts *opts); ++char *size_str(char str[FT_STR_LEN], long long size); ++char *cnt_str(char str[FT_STR_LEN], long long cnt); ++int size_to_count(int size); ++size_t datatype_to_size(enum fi_datatype datatype); ++ ++#define FT_PRINTERR(call, retv) \ ++ do { fprintf(stderr, call "(): %s:%d, ret=%d (%s)\n", __FILE__, __LINE__, \ ++ (int) (retv), fi_strerror((int) -(retv))); } while (0) ++ ++#define FT_LOG(level, fmt, ...) \ ++ do { fprintf(stderr, "[%s] fabtests:%s:%d: " fmt "\n", level, __FILE__, \ ++ __LINE__, ##__VA_ARGS__); } while (0) ++ ++#define FT_ERR(fmt, ...) FT_LOG("error", fmt, ##__VA_ARGS__) ++#define FT_WARN(fmt, ...) FT_LOG("warn", fmt, ##__VA_ARGS__) ++ ++#if ENABLE_DEBUG ++#define FT_DEBUG(fmt, ...) FT_LOG("debug", fmt, ##__VA_ARGS__) ++#else ++#define FT_DEBUG(fmt, ...) ++#endif ++ ++#define FT_EQ_ERR(eq, entry, buf, len) \ ++ FT_ERR("eq_readerr (Provider errno: %d) : %s", \ ++ entry.prov_errno, fi_eq_strerror(eq, entry.err, \ ++ entry.err_data, \ ++ buf, len)) \ ++ ++#define FT_CQ_ERR(cq, entry, buf, len) \ ++ FT_ERR("cq_readerr (Provider errno: %d) : %s", \ ++ entry.prov_errno, fi_cq_strerror(cq, entry.err, \ ++ entry.err_data, \ ++ buf, len)) \ ++ ++#define FT_CLOSE_FID(fd) \ ++ do { \ ++ int ret; \ ++ if ((fd)) { \ ++ ret = fi_close(&(fd)->fid); \ ++ if (ret) \ ++ FT_ERR("fi_close: %s(%d) fid %d", \ ++ fi_strerror(-ret), \ ++ ret, \ ++ (int) (fd)->fid.fclass); \ ++ fd = NULL; \ ++ } \ ++ } while (0) ++ ++#define FT_CLOSEV_FID(fd, cnt) \ ++ do { \ ++ int i; \ ++ if (!(fd)) \ ++ break; \ ++ for (i = 0; i < (cnt); i++) { \ ++ FT_CLOSE_FID((fd)[i]); \ ++ } \ ++ } while (0) ++ ++#define FT_EP_BIND(ep, fd, flags) \ ++ do { \ ++ int ret; \ ++ if ((fd)) { \ ++ ret = fi_ep_bind((ep), &(fd)->fid, (flags)); \ ++ if (ret) { \ ++ FT_PRINTERR("fi_ep_bind", ret); \ ++ return ret; \ ++ } \ ++ } \ ++ } while (0) ++ ++int ft_alloc_bufs(); ++int ft_open_fabric_res(); ++int ft_getinfo(struct fi_info *hints, struct fi_info **info); ++int ft_init_fabric(); ++int ft_start_server(); ++int ft_server_connect(); ++int ft_client_connect(); ++int ft_init_fabric_cm(void); ++int ft_complete_connect(struct fid_ep *ep, struct fid_eq *eq); ++int ft_retrieve_conn_req(struct fid_eq *eq, struct fi_info **fi); ++int ft_accept_connection(struct fid_ep *ep, struct fid_eq *eq); ++int ft_connect_ep(struct fid_ep *ep, ++ struct fid_eq *eq, fi_addr_t *remote_addr); ++int ft_alloc_ep_res(struct fi_info *fi); ++int ft_alloc_active_res(struct fi_info *fi); ++int ft_enable_ep_recv(void); ++int ft_enable_ep(struct fid_ep *ep, struct fid_eq *eq, struct fid_av *av, ++ struct fid_cq *txcq, struct fid_cq *rxcq, ++ struct fid_cntr *txcntr, struct fid_cntr *rxcntr); ++int ft_init_alias_ep(uint64_t flags); ++int ft_av_insert(struct fid_av *av, void *addr, size_t count, fi_addr_t *fi_addr, ++ uint64_t flags, void *context); ++int ft_init_av(void); ++int ft_join_mc(void); ++int ft_init_av_dst_addr(struct fid_av *av_ptr, struct fid_ep *ep_ptr, ++ fi_addr_t *remote_addr); ++int ft_init_av_addr(struct fid_av *av, struct fid_ep *ep, ++ fi_addr_t *addr); ++int ft_exchange_keys(struct fi_rma_iov *peer_iov); ++void ft_free_res(); ++void init_test(struct ft_opts *opts, char *test_name, size_t test_name_len); ++ ++static inline void ft_start(void) ++{ ++ opts.options |= FT_OPT_ACTIVE; ++ clock_gettime(CLOCK_MONOTONIC, &start); ++} ++static inline void ft_stop(void) ++{ ++ clock_gettime(CLOCK_MONOTONIC, &end); ++ opts.options &= ~FT_OPT_ACTIVE; ++} ++ ++/* Set the FI_MSG_PREFIX mode bit in the given fi_info structure and also set ++ * the option bit in the given opts structure. If using ft_getinfo, it will ++ * return -ENODATA if the provider clears the application requested mdoe bit. ++ */ ++static inline void ft_force_prefix(struct fi_info *info, struct ft_opts *opts) ++{ ++ info->mode |= FI_MSG_PREFIX; ++ opts->force_prefix = 1; ++} ++ ++/* If force_prefix was not requested, just continue. If it was requested, ++ * return true if it was respected by the provider. ++ */ ++static inline bool ft_check_prefix_forced(struct fi_info *info, ++ struct ft_opts *opts) ++{ ++ if (opts->force_prefix) { ++ return (info->tx_attr->mode & FI_MSG_PREFIX) && ++ (info->rx_attr->mode & FI_MSG_PREFIX); ++ } ++ ++ /* Continue if forced prefix wasn't requested. */ ++ return true; ++} ++ ++int ft_sync(void); ++int ft_sync_pair(int status); ++int ft_fork_and_pair(void); ++int ft_wait_child(void); ++int ft_finalize(void); ++int ft_finalize_ep(struct fid_ep *ep); ++ ++size_t ft_rx_prefix_size(void); ++size_t ft_tx_prefix_size(void); ++ssize_t ft_post_rx(struct fid_ep *ep, size_t size, struct fi_context* ctx); ++ssize_t ft_post_rx_buf(struct fid_ep *ep, size_t size, struct fi_context* ctx, ++ void *op_buf, void *op_mr_desc, uint64_t op_tag); ++ssize_t ft_post_tx(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, ++ uint64_t data, struct fi_context* ctx); ++ssize_t ft_post_tx_buf(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, ++ uint64_t data, struct fi_context* ctx, ++ void *op_buf, void *op_mr_desc, uint64_t op_tag); ++ssize_t ft_rx(struct fid_ep *ep, size_t size); ++ssize_t ft_tx(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, struct fi_context *ctx); ++ssize_t ft_inject(struct fid_ep *ep, fi_addr_t fi_addr, size_t size); ++ssize_t ft_post_rma(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote, void *context); ++ssize_t ft_rma(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote, void *context); ++ssize_t ft_post_rma_inject(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote); ++ ++ ++ssize_t ft_post_atomic(enum ft_atomic_opcodes opcode, struct fid_ep *ep, ++ void *compare, void *compare_desc, void *result, ++ void *result_desc, struct fi_rma_iov *remote, ++ enum fi_datatype datatype, enum fi_op atomic_op, ++ void *context); ++int check_base_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count); ++int check_fetch_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count); ++int check_compare_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count); ++ ++int ft_cq_readerr(struct fid_cq *cq); ++int ft_get_rx_comp(uint64_t total); ++int ft_get_tx_comp(uint64_t total); ++int ft_recvmsg(struct fid_ep *ep, fi_addr_t fi_addr, ++ size_t size, struct fi_context *ctx, int flags); ++int ft_sendmsg(struct fid_ep *ep, fi_addr_t fi_addr, ++ size_t size, struct fi_context *ctx, int flags); ++int ft_cq_read_verify(struct fid_cq *cq, void *op_context); ++ ++void eq_readerr(struct fid_eq *eq, const char *eq_str); ++ ++int64_t get_elapsed(const struct timespec *b, const struct timespec *a, ++ enum precision p); ++void show_perf(char *name, int tsize, int iters, struct timespec *start, ++ struct timespec *end, int xfers_per_iter); ++void show_perf_mr(int tsize, int iters, struct timespec *start, ++ struct timespec *end, int xfers_per_iter, int argc, char *argv[]); ++ ++int ft_send_recv_greeting(struct fid_ep *ep); ++int ft_send_greeting(struct fid_ep *ep); ++int ft_recv_greeting(struct fid_ep *ep); ++ ++int check_recv_msg(const char *message); ++uint64_t ft_info_to_mr_access(struct fi_info *info); ++int ft_alloc_bit_combo(uint64_t fixed, uint64_t opt, uint64_t **combos, int *len); ++void ft_free_bit_combo(uint64_t *combo); ++int ft_cntr_open(struct fid_cntr **cntr); ++const char *ft_util_name(const char *str, size_t *len); ++const char *ft_core_name(const char *str, size_t *len); ++char **ft_split_and_alloc(const char *s, const char *delim, size_t *count); ++void ft_free_string_array(char **s); ++ ++#define FT_PROCESS_QUEUE_ERR(readerr, rd, queue, fn, str) \ ++ do { \ ++ if (rd == -FI_EAVAIL) { \ ++ readerr(queue, fn " " str); \ ++ } else { \ ++ FT_PRINTERR(fn, rd); \ ++ } \ ++ } while (0) ++ ++#define FT_PROCESS_EQ_ERR(rd, eq, fn, str) \ ++ FT_PROCESS_QUEUE_ERR(eq_readerr, rd, eq, fn, str) ++ ++#define FT_OPTS_USAGE_FORMAT "%-30s %s" ++#define FT_PRINT_OPTS_USAGE(opt, desc) fprintf(stderr, FT_OPTS_USAGE_FORMAT "\n", opt, desc) ++ ++#define MIN(a,b) (((a)<(b))?(a):(b)) ++#define MAX(a,b) (((a)>(b))?(a):(b)) ++#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A)) ++ ++#define TEST_ENUM_SET_N_RETURN(str, len, enum_val, type, data) \ ++ TEST_SET_N_RETURN(str, len, #enum_val, enum_val, type, data) ++ ++#define TEST_SET_N_RETURN(str, len, val_str, val, type, data) \ ++ do { \ ++ if (!strncmp(str, val_str, len)) { \ ++ *(type *)(data) = val; \ ++ return 0; \ ++ } \ ++ } while (0) ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _SHARED_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unit_common.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unit_common.h +new file mode 100644 +index 0000000..f3774bf +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unit_common.h +@@ -0,0 +1,57 @@ ++/* ++ * Copyright (c) 2013-2014 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _UNIT_COMMON_H_ ++#define _UNIT_COMMON_H_ ++ ++#include ++ ++enum { PASS, FAIL, NOTSUPP, SKIPPED }; ++#define TEST_ENTRY(NAME, DESC) { NAME, #NAME, DESC} ++ ++#define TEST_RET_VAL(_ret, _testret) \ ++ (_ret == -FI_ENOSYS || _ret == -FI_ENODATA) ? SKIPPED : (_testret) ++ ++#define FT_UNIT_STRERR(buf, str, ret) \ ++ sprintf(buf, str ": ret=%d (%s)", (int)-ret, fi_strerror((int)-ret)) ++ ++struct test_entry { ++ int (*test)(); ++ char *name; ++ char *desc; ++}; ++ ++void ft_unit_usage(char *name, char *desc); ++int run_tests(struct test_entry *test_array, char *err_buf); ++ ++#endif /* _UNIT_COMMON_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unix/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unix/osd.h +new file mode 100644 +index 0000000..3d7b415 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unix/osd.h +@@ -0,0 +1,78 @@ ++/* ++ * Copyright (c) 2016 Intel Corp, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTESTS_UNIX_OSD_H_ ++#define _FABTESTS_UNIX_OSD_H_ ++ ++#include ++ ++static inline int ft_startup(void) ++{ ++ return 0; ++} ++ ++/* complex operations implementation */ ++#define OFI_COMPLEX(name) ofi_##name##_complex ++#define OFI_COMPLEX_OP(name, op) ofi_complex_##name##_##op ++#define OFI_COMPLEX_TYPE_DECL(name, type) typedef type complex OFI_COMPLEX(name); ++ ++OFI_COMPLEX_TYPE_DECL(float, float) ++OFI_COMPLEX_TYPE_DECL(double, double) ++OFI_COMPLEX_TYPE_DECL(long_double, long double) ++ ++#define OFI_COMPLEX_OPS(name) \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, sum)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1 + v2; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, mul)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1 * v2; \ ++} \ ++static inline int OFI_COMPLEX_OP(name, equ)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1 == v2; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, land)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2)\ ++{ \ ++ return v1 && v2; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, lor)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1 || v2; \ ++} ++ ++OFI_COMPLEX_OPS(float) ++OFI_COMPLEX_OPS(double) ++OFI_COMPLEX_OPS(long_double) ++ ++#endif /* FABTESTS_UNIX_OSD_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/getopt/getopt.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/getopt/getopt.h +new file mode 100644 +index 0000000..e364288 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/getopt/getopt.h +@@ -0,0 +1,83 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _GETOPT_H_ ++#define _GETOPT_H_ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif __cplusplus ++ ++#if defined WIN32 && !defined GETOPT_STATIC ++#ifdef GETOPT_DLL_EXPORTS ++#define GET_OPT_INTERFACE __declspec(dllexport) ++#else // GETOPT_DLL_EXPORTS ++#define GET_OPT_INTERFACE __declspec(dllimport) ++#endif // GETOPT_DLL_EXPORTS ++#else // WIN32 && not defined GETOPT_STATIC ++#define GET_OPT_INTERFACE ++#endif ++ ++GET_OPT_INTERFACE extern char* optarg; ++extern int optind, opterr, optopt; ++ ++#ifndef no_argument ++# define no_argument 0 ++#endif //no_argument ++ ++#ifndef required_argument ++# define required_argument 1 ++#endif //required_argument ++ ++#ifndef optional_argument ++# define optional_argument 2 ++#endif //optional_argument ++ ++int getopt(int argc, char *const argv[], const char *optstring); ++ ++struct option ++{ ++ const char *name; ++ int has_arg; ++ int *flag; ++ int val; ++}; ++ ++int getopt_long(int argc, char *const argv[], ++ const char *optstring, ++ const struct option *longopts, int *longindex); ++ ++int getopt_long_only(int argc, char *const argv[], ++ const char *optstring, ++ const struct option *longopts, int *longindex); ++ ++#ifdef __cplusplus ++} ++#endif __cplusplus ++ ++#endif //_GETOPT_H_ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netdb.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netdb.h +new file mode 100644 +index 0000000..e42aa58 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netdb.h +@@ -0,0 +1,38 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTESTS_OSD_WINDOWS_NETDB_H_ ++#define _FABTESTS_OSD_WINDOWS_NETDB_H_ ++ ++#include ++ ++/* Error values for `getaddrinfo' function. */ ++# define EAI_MEMORY - 10 /* Memory allocation failure. */ ++ ++#endif /* _FABTESTS_OSD_WINDOWS_NETDB_H_ */ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/in.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/in.h +new file mode 100644 +index 0000000..626c6c2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/in.h +@@ -0,0 +1,35 @@ ++/* ++* Copyright (c) 2017 Intel Corporation. All rights reserved. ++* ++* This software is available to you under the BSD license below: ++* ++* Redistribution and use in source and binary forms, with or ++* without modification, are permitted provided that the following ++* conditions are met: ++* ++* - Redistributions of source code must retain the above ++* copyright notice, this list of conditions and the following ++* disclaimer. ++* ++* - Redistributions in binary form must reproduce the above ++* copyright notice, this list of conditions and the following ++* disclaimer in the documentation and/or other materials ++* provided with the distribution. ++* ++* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++* SOFTWARE. ++*/ ++ ++#ifndef _FABTESTS_OSD_NETINET_IN_H_ ++#define _FABTESTS_OSD_NETINET_IN_H_ ++ ++#include ++ ++#endif /* _FABTESTS_OSD_NETINET_IN_H_ */ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/tcp.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/tcp.h +new file mode 100644 +index 0000000..dfeadf7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/tcp.h +@@ -0,0 +1,34 @@ ++/* ++* Copyright (c) 2017 Intel Corporation. All rights reserved. ++* ++* This software is available to you under the BSD license below: ++* ++* Redistribution and use in source and binary forms, with or ++* without modification, are permitted provided that the following ++* conditions are met: ++* ++* - Redistributions of source code must retain the above ++* copyright notice, this list of conditions and the following ++* disclaimer. ++* ++* - Redistributions in binary form must reproduce the above ++* copyright notice, this list of conditions and the following ++* disclaimer in the documentation and/or other materials ++* provided with the distribution. ++* ++* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++* SOFTWARE. ++*/ ++ ++#ifndef _FABTESTS_OSD_WINDOWS_TCP_H_ ++#define _FABTESTS_OSD_WINDOWS_TCP_H_ ++ ++#include ++ ++#endif /* _FABTESTS_OSD_WINDOWS_TCP_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/osd.h +new file mode 100644 +index 0000000..bf7a114 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/osd.h +@@ -0,0 +1,233 @@ ++/* ++* Copyright (c) 2017 Intel Corporation. All rights reserved. ++* ++* This software is available to you under the BSD license below: ++* ++* Redistribution and use in source and binary forms, with or ++* without modification, are permitted provided that the following ++* conditions are met: ++* ++* - Redistributions of source code must retain the above ++* copyright notice, this list of conditions and the following ++* disclaimer. ++* ++* - Redistributions in binary form must reproduce the above ++* copyright notice, this list of conditions and the following ++* disclaimer in the documentation and/or other materials ++* provided with the distribution. ++* ++* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++* SOFTWARE. ++*/ ++ ++#ifndef _WINDOWS_OSD_H_ ++#define _WINDOWS_OSD_H_ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++struct iovec ++{ ++ void *iov_base; /* Pointer to data. */ ++ size_t iov_len; /* Length of data. */ ++}; ++ ++#define strdup _strdup ++#define strncasecmp _strnicmp ++#define SHUT_RDWR SD_BOTH ++#define CLOCK_MONOTONIC 1 ++ ++#ifndef EAI_SYSTEM ++# define EAI_SYSTEM -11 ++#endif ++ ++typedef int pid_t; ++ ++/* ++ * The FILETIME structure records time in the form of ++ * 100-nanosecond intervals since January 1, 1601 ++ */ ++#define file2unix_time 10000000i64 /* 1E+7 */ ++#define win2unix_epoch 116444736000000000i64 /* 1 Jan 1601 to 1 Jan 1970 */ ++ ++static inline ++int clock_gettime(int which_clock, struct timespec *spec) ++{ ++ __int64 wintime; ++ ++ GetSystemTimeAsFileTime((FILETIME*)&wintime); ++ wintime -= win2unix_epoch; ++ ++ spec->tv_sec = wintime / file2unix_time; ++ spec->tv_nsec = wintime % file2unix_time * 100; ++ ++ return 0; ++} ++ ++static inline int ft_close_fd(int fd) ++{ ++ return closesocket(fd); ++} ++ ++static inline int poll(struct pollfd *fds, int nfds, int timeout) ++{ ++ return WSAPoll(fds, nfds, timeout); ++} ++ ++static inline char* strndup(const char* str, size_t n) ++{ ++ char* res = strdup(str); ++ if (strlen(res) > n) ++ res[n] = '\0'; ++ return res; ++} ++ ++static inline char* strsep(char **stringp, const char *delim) ++{ ++ char* ptr = *stringp; ++ char* p; ++ ++ p = ptr ? strpbrk(ptr, delim) : NULL; ++ ++ if(!p) ++ *stringp = NULL; ++ else ++ { ++ *p = 0; ++ *stringp = p + 1; ++ } ++ ++ return ptr; ++} ++ ++#define _SC_PAGESIZE 30 ++ ++static long int sysconf(int name) ++{ ++ switch (name) { ++ case _SC_PAGESIZE: ++ SYSTEM_INFO info; ++ GetNativeSystemInfo(&info); ++ return (long int)info.dwPageSize; ++ default: ++ assert(0); ++ } ++ errno = EINVAL; ++ return -1; ++} ++ ++#define AF_LOCAL AF_UNIX ++ ++int socketpair(int af, int type, int protocol, int socks[2]); ++ ++/* Bits in the fourth argument to `waitid'. */ ++#define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */ ++#define WEXITED 4 /* Report dead child. */ ++#define WCONTINUED 8 /* Report continued child. */ ++#define WNOWAIT 0x01000000 /* Don't reap, just poll status. */ ++ ++static pid_t waitpid(pid_t pid, int *status, int options) ++{ ++ assert(0); ++ return 0; ++} ++ ++static const char* gai_strerror(int code) ++{ ++ return "Unknown error"; ++} ++ ++static pid_t fork(void) ++{ ++ assert(0); ++ return -1; ++} ++ ++static int posix_memalign(void **memptr, size_t alignment, size_t size) ++{ ++ *memptr = _aligned_malloc(size, alignment); ++ return (*memptr) ? 0 : ENOMEM; ++} ++ ++static inline int ft_startup(void) ++{ ++ int ret = 0; ++ WSADATA data; ++ ++ ret = WSAStartup(MAKEWORD(2, 2), &data); ++ if (ret) ++ return HRESULT_FROM_WIN32(ret); ++ return ret; ++} ++ ++ ++/* complex operations implementation */ ++#define OFI_COMPLEX(name) ofi_##name##_complex ++#define OFI_COMPLEX_BASE(name) OFI_COMPLEX(name)##_base ++#define OFI_COMPLEX_OP(name, op) ofi_complex_##name##_##op ++#define OFI_COMPLEX_TYPE_DECL(name, type) \ ++typedef type OFI_COMPLEX_BASE(name); \ ++typedef struct { \ ++ OFI_COMPLEX_BASE(name) re; \ ++ OFI_COMPLEX_BASE(name) im; \ ++} OFI_COMPLEX(name); ++ ++OFI_COMPLEX_TYPE_DECL(float, float) ++OFI_COMPLEX_TYPE_DECL(double, double) ++OFI_COMPLEX_TYPE_DECL(long_double, long double) ++ ++#define OFI_COMPLEX_OPS(name) \ ++static inline OFI_COMPLEX_BASE(name) OFI_COMPLEX_OP(name, real)(OFI_COMPLEX(name) v) \ ++{ \ ++ return v.re; \ ++} \ ++static inline OFI_COMPLEX_BASE(name) OFI_COMPLEX_OP(name, imag)(OFI_COMPLEX(name) v) \ ++{ \ ++ return v.im; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, sum)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ OFI_COMPLEX(name) ret = {.re = v1.re + v2.re, .im = v1.im + v2.im}; \ ++ return ret; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, mul)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ OFI_COMPLEX(name) ret = {.re = (v1.re * v2.re) - (v1.im * v2.im), \ ++ .im = (v1.re * v2.im) + (v1.im * v2.re)}; \ ++ return ret; \ ++} \ ++static inline int OFI_COMPLEX_OP(name, equ)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1.re == v2.re && v1.im == v2.im; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, land)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ OFI_COMPLEX(name) zero = {.re = 0, .im = 0}; \ ++ int equ = !OFI_COMPLEX_OP(name, equ)(v1, zero) && !OFI_COMPLEX_OP(name, equ)(v2, zero); \ ++ OFI_COMPLEX(name) ret = {.re = equ ? 1.f : 0, .im = 0}; \ ++ return ret; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, lor)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ OFI_COMPLEX(name) zero = {.re = 0, .im = 0}; \ ++ int equ = !OFI_COMPLEX_OP(name, equ)(v1, zero) || !OFI_COMPLEX_OP(name, equ)(v2, zero); \ ++ OFI_COMPLEX(name) ret = {.re = equ ? 1.f : 0, .im = 0}; \ ++ return ret; \ ++} ++ ++OFI_COMPLEX_OPS(float) ++OFI_COMPLEX_OPS(double) ++OFI_COMPLEX_OPS(long_double) ++ ++#endif /* _WINDOWS_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/poll.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/poll.h +new file mode 100644 +index 0000000..b6393fb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/poll.h +@@ -0,0 +1,2 @@ ++ ++#pragma once +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/socket.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/socket.h +new file mode 100644 +index 0000000..b6393fb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/socket.h +@@ -0,0 +1,2 @@ ++ ++#pragma once +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/uio.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/uio.h +new file mode 100644 +index 0000000..b6393fb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/uio.h +@@ -0,0 +1,2 @@ ++ ++#pragma once +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/wait.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/wait.h +new file mode 100644 +index 0000000..b6393fb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/wait.h +@@ -0,0 +1,2 @@ ++ ++#pragma once +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/unistd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/unistd.h +new file mode 100644 +index 0000000..064012f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/unistd.h +@@ -0,0 +1,3 @@ ++#pragma once ++ ++#define sleep(x) Sleep(x * 1000) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/fabtests.7.md b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/fabtests.7.md +new file mode 100644 +index 0000000..ef3b946 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/fabtests.7.md +@@ -0,0 +1,377 @@ ++--- ++layout: page ++title: fabtests(7) ++tagline: Fabtests Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++Fabtests ++ ++# SYNOPSIS ++ ++Fabtests is a set of examples for fabric providers that demonstrates ++various features of libfabric- high-performance fabric software library. ++ ++# OVERVIEW ++ ++Libfabric defines sets of interface that fabric providers can support. ++The purpose of Fabtests examples is to demonstrate some of the major features. ++The goal is to familiarize users with different functionalities libfabric ++offers and how to use them. Although most tests report performance numbers, ++they are designed to test functionality and not performance. The exception ++are the benchmarks and ubertest. ++ ++The tests are divided into the following categories. Except the unit tests ++all of them are client-server tests. Not all providers will support each test. ++ ++The test names try to indicate the type of functionality each test is ++verifying. Although some tests work with any endpoint type, many are ++restricted to verifying a single endpoint type. These tests typically ++include the endpoint type as part of the test name, such as dgram, msg, or ++rdm. ++ ++# Functional ++ ++These tests are a mix of very basic functionality tests that show major ++features of libfabric. ++ ++*fi_av_xfer* ++: Tests communication for unconnected endpoints, as addresses ++ are inserted and removed from the local address vector. ++ ++*fi_cm_data* ++: Verifies exchanging CM data as part of connecting endpoints. ++ ++*fi_cq_data* ++: Tranfers messages with CQ data. ++ ++*fi_dgram* ++: A basic datagram endpoint example. ++ ++*fi_dgram_waitset* ++: Transfers datagrams using waitsets for completion notifcation. ++ ++*fi_inj_complete* ++: Sends messages using the FI_INJECT_COMPLETE operation flag. ++ ++*fi_mcast* ++: A simple multicast test. ++ ++*fi_msg* ++: A basic message endpoint example. ++ ++*fi_msg_epoll* ++: Transfers messages with completion queues configured to use file ++ descriptors as wait objetcts. The file descriptors are retrieved ++ by the program and used directly with the Linux epoll API. ++ ++*fi_msg_sockets* ++: Verifies that the address assigned to a passive endpoint can be ++ transitioned to an active endpoint. This is required applications ++ that need socket API semantics over RDMA implementations (e.g. rsockets). ++ ++*fi_multi_ep* ++: Performs data transfers over multiple endpoints in parallel. ++ ++*fi_multi_mr* ++: Issues RMA write operations to multiple memory regions, using ++ completion counters of inbound writes as the notification ++ mechanism. ++ ++*fi_poll* ++: Exchanges data over RDM endpoints using poll sets to drive ++ completion notifications. ++ ++*fi_rdm* ++: A basic RDM endpoint example. ++ ++*fi_rdm_atomic* ++: Test and verifies atomic operations over an RDM endpoint. ++ ++*fi_rdm_deferred_wq* ++: Test triggered operations and deferred work queue support. ++ ++*fi_rdm_multi_domain* ++: Performs data transfers over multiple endpoints, with each ++ endpoint belonging to a different opened domain. ++ ++*fi_rdm_multi_recv* ++: Transfers multiple messages over an RDM endpoint that are received ++ into a single buffer, posted using the FI_MULTI_RECV flag. ++ ++*fi_rdm_rma_simple* ++: A simple RMA write example over an RDM endpoint. ++ ++*fi_rdm_rma_trigger* ++: A basic example of queuing an RMA write operation that is initiated ++ upon the firing of a triggering completion. Works with RDM endpoints. ++ ++*fi_rdm_shared_av* ++: Spawns child processes to verify basic functionality of using a shared ++ address vector with RDM endpoints. ++ ++*fi_rdm_tagged_peek* ++: Basic test of using the FI_PEEK operation flag with tagged messages. ++ Works with RDM endpoints. ++ ++*fi_recv_cancel* ++: Tests canceling posted receives for tagged messages. ++ ++*fi_resmgmt_test* ++: Tests the resource management enabled feature. This verifies that the ++ provider prevents applications from overruning local and remote command ++ queues and completion queues. This corresponds to setting the domain ++ attribute resource_mgmt to FI_RM_ENABLED. ++ ++*fi_scalable_ep* ++: Performs data transfers over scalable endpoints, endpoints associated ++ with multiple transmit and receive contexts. ++ ++*fi_shared_ctx* ++: Performs data transfers between multiple endpoints, where the endpoints ++ share transmit and/or receive contexts. ++ ++*fi_unexpected_msg* ++: Tests the send and receive handling of unexpected tagged messages. ++ ++# Benchmarks ++ ++The client and the server exchange messages in either a ping-pong manner, ++for pingpong named tests, or transfer messages one-way, for bw named tests. ++These tests can transfer various messages sizes, with controls over which ++features are used by the test, and report performance numbers. The tests ++are structured based on the benchmarks provided by OSU MPI. They are not ++guaranteed to provide the best latency or bandwidth performance numbers a ++given provider or system may achieve. ++ ++*fi_dgram_pingpong* ++: Latency test for datagram endpoints ++ ++*fi_msg_bw* ++: Message transfer bandwidth test for connected (MSG) endpoints. ++ ++*fi_msg_pingpong* ++: Message transfer latency test for connected (MSG) endpoints. ++ ++*fi_rdm_cntr_pingpong* ++: Message transfer latency test for reliable-datagram (RDM) endpoints ++ that uses counters as the completion mechanism. ++ ++*fi_rdm_pingpong* ++: Message transfer latency test for reliable-datagram (RDM) endpoints. ++ ++*fi_rdm_tagged_bw* ++: Tagged message bandwidth test for reliable-datagram (RDM) endpoints. ++ ++*fi_rdm_tagged_pingpong* ++: Tagged message latency test for reliable-datagram (RDM) endpoints. ++ ++*fi_rma_bw* ++: An RMA read and write bandwidth test for reliable (MSG and RDM) endpoints. ++ ++# Unit ++ ++These are simple one-sided unit tests that validate basic behavior of the API. ++Because these are single system tests that do not perform data transfers their ++testing scope is limited. ++ ++*fi_av_test* ++: Verify address vector interfaces. ++ ++*fi_cntr_test* ++: Tests counter creation and destruction. ++ ++*fi_cq_test* ++: Tests completion queue creation and destruction. ++ ++*fi_dom_test* ++: Tests domain creation and destruction. ++ ++*fi_eq_test* ++: Tests event queue creation, destruction, and capabilities. ++ ++*fi_getinfo_test* ++: Tests provider response to fi_getinfo calls with varying hints. ++ ++*fi_mr_test* ++: Tests memory registration. ++ ++*fi_resource_freeing* ++: Allocates and closes fabric resources to check for proper cleanup. ++ ++# Ubertest ++ ++This is a comprehensive latency, bandwidth, and functionality test that can ++handle a variety of test configurations. The test is able to run a large ++number of tests by iterating over a large number of test variables. As a ++result, a full ubertest run can take a significant amount of time. Because ++ubertest iterates over input variables, it relies on a test configuration ++file for control, rather than extensive command line options that are used ++by other fabtests. A configuration file must be constructured for each ++provider. Example test configurations are at /test_configs. ++ ++*fi_ubertest* ++: This test takes a configure file as input. The file contains a list of ++ variables and their values to iterate over. The test will run a set of ++ latency, bandwidth, and functionality tests over a given provider. It ++ will perform one execution for every possible combination of all variables. ++ For example, if there are 8 test variables, with 6 having 2 possible ++ values and 2 having 3 possible values, ubertest will execute 576 total ++ iterations of each test. ++ ++# HOW TO RUN TESTS ++ ++(1) Fabtests requires that libfabric be installed on the system, and at least one provider be usable. ++ ++(2) Install fabtests on the system. By default all the test executables are installed in /usr/bin directory unless specified otherwise. ++ ++(3) All the client-server tests have the following usage model: ++ ++ fi_ [OPTIONS] start server ++ fi_ connect to server ++ ++# COMMAND LINE OPTIONS ++ ++Tests share command line options where appropriate. The following ++command line options are available for one or more test. To see which ++options apply for a given test, you can use the '-h' help option to see ++the list available for that test. ++ ++*-h* ++: Displays help output for the test. ++ ++*-f * ++: Restrict test to the specified fabric name. ++ ++*-d * ++: Restrict test to the specified domain name. ++ ++*-p * ++: Restrict test to the specified provider name. ++ ++*-e * ++: Use the specified endpoint type for the test. Valid options are msg, ++ dgram, and rdm. The default endpoint type is rdm. ++ ++*-a
* ++: The name of a shared address vector. This option only applies to tests ++ that support shared address vectors. ++ ++*-B * ++: Specifies the port number of the local endpoint, overriding the default. ++ ++*-P * ++: Specifies the port number of the peer endpoint, overriding the default. ++ ++*-s
* ++: Specifies the address of the local endpoint. ++ ++*-b[=oob_port]* ++: Enables out-of-band (via sockets) address exchange and test ++ synchronization. A port for the out-of-band connection may be specified ++ as part of this option to override the default. ++ ++*-I * ++: Number of data transfer iterations. ++ ++*-w * ++: Number of warm-up data transfer iterations. ++ ++*-S * ++: Data transfer size or 'all' for a full range of sizes. By default a ++ select number of sizes will be tested. ++ ++*-l* ++: If specified, the starting address of transmit and receive buffers will ++ be aligned along a page boundary. ++ ++*-m* ++: Use machine readable output. This is useful for post-processing the test ++ output with scripts. ++ ++*-t * ++: Specify the type of completion mechanism to use. Valid values are queue ++ and counter. The default is to use completion queues. ++ ++*-c * ++: Indicate the type of processing to use checking for completed operations. ++ Valid values are spin, sread, and fd. The default is to busy wait (spin) ++ until the desired operation has completed. The sread option indicates that ++ the application will invoke a blocking read call in libfabric, such as ++ fi_cq_sread. Fd indicates that the application will retrieve the native ++ operating system wait object (file descriptor) and use either poll() or ++ select() to block until the fd has been signaled, prior to checking for ++ completions. ++ ++*-o * ++: For RMA based tests, specify the type of RMA operation to perform. Valid ++ values are read, write, and writedata. Write operations are the default. ++ ++*-M * ++: For multicast tests, specifies the address of the multicast group to join. ++ ++# USAGE EXAMPLES ++ ++## A simple example ++ ++ run server: -p -s ++ e.g. fi_msg_rma -p sockets -s 192.168.0.123 ++ run client: -p ++ e.g. fi_msg_rma 192.168.0.123 -p sockets ++ ++## An example with various options ++ ++ run server: fi_rdm_atomic -p psm -s 192.168.0.123 -I 1000 -S 1024 ++ run client: fi_rdm_atomic 192.168.0.123 -p psm -I 1000 -S 1024 ++ ++This will run "fi_rdm_atomic" for all atomic operations with ++ ++ - PSM provider ++ - 1000 iterations ++ - 1024 bytes message size ++ - server node as 123.168.0.123 ++ ++## Run fi_ubertest ++ ++ run server: fi_ubertest ++ run client: fi_ubertest -u /usr/share/fabtests/test_configs/sockets/quick.test 192.168.0.123 ++ ++This will run "fi_ubertest" with ++ ++ - sockets provider ++ - configurations defined in /usr/share/fabtests/test_configs/sockets/quick.test ++ - server node as 192.168.0.123 ++ ++The config files are provided in /test_configs for sockets, verbs, udp, ++and usnic providers and distributed with fabtests installation. ++ ++For more usage options: fi_ubertest -h ++ ++## Run the whole fabtests suite ++ ++A runscript scripts/runfabtests.sh is provided that runs all the tests ++in fabtests and reports the number of pass/fail/notrun. ++ ++ Usage: runfabtests.sh [OPTIONS] [provider] [host] [client] ++ ++By default if none of the options are provided, it runs all the tests using ++ ++ - sockets provider ++ - 127.0.0.1 as both server and client address ++ - for small number of optiond and iterations ++ ++Various options can be used to choose provider, subset tests to run, ++level of verbosity etc. ++ ++ runfabtests.sh -vvv -t all psm 192.168.0.123 192.168.0.124 ++ ++This will run all fabtests using ++ ++ - psm provider ++ - for different options and larger iterations ++ - server node as 192.168.0.123 and client node as 192.168.0.124 ++ - print test output for all the tests ++ ++For detailed usage options: runfabtests.sh -h +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_test.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_xfer.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_xfer.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_xfer.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cm_data.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cm_data.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cm_data.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cntr_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cntr_test.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cntr_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_data.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_data.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_data.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_test.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_pingpong.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_waitset.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_waitset.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_waitset.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dom_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dom_test.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dom_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_eq_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_eq_test.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_eq_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_getinfo_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_getinfo_test.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_getinfo_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_inj_complete.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_inj_complete.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_inj_complete.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mcast.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mcast.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mcast.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mr_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mr_test.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mr_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_bw.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_bw.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_bw.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_epoll.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_epoll.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_epoll.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_pingpong.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_sockets.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_sockets.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_sockets.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_ep.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_ep.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_ep.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_mr.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_mr.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_mr.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_poll.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_poll.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_poll.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_atomic.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_atomic.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_atomic.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_cntr_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_cntr_pingpong.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_cntr_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_deferred_wq.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_deferred_wq.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_deferred_wq.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_domain.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_domain.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_domain.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_recv.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_recv.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_recv.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_pingpong.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_simple.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_simple.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_simple.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_trigger.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_trigger.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_trigger.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_shared_av.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_shared_av.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_shared_av.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_bw.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_bw.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_bw.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_peek.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_peek.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_peek.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_pingpong.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_recv_cancel.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_recv_cancel.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_recv_cancel.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resmgmt_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resmgmt_test.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resmgmt_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resource_freeing.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resource_freeing.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resource_freeing.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rma_bw.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rma_bw.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rma_bw.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_scalable_ep.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_scalable_ep.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_scalable_ep.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_shared_ctx.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_shared_ctx.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_shared_ctx.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_ubertest.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_ubertest.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_ubertest.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_unexpected_msg.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_unexpected_msg.1 +new file mode 100644 +index 0000000..3f6ccf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_unexpected_msg.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man7/fabtests.7 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man7/fabtests.7 +new file mode 100644 +index 0000000..64364cb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man7/fabtests.7 +@@ -0,0 +1,550 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fabtests" "7" "2018\-10\-06" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++Fabtests ++.SH SYNOPSIS ++.PP ++Fabtests is a set of examples for fabric providers that demonstrates ++various features of libfabric\- high\-performance fabric software ++library. ++.SH OVERVIEW ++.PP ++Libfabric defines sets of interface that fabric providers can support. ++The purpose of Fabtests examples is to demonstrate some of the major ++features. ++The goal is to familiarize users with different functionalities ++libfabric offers and how to use them. ++Although most tests report performance numbers, they are designed to ++test functionality and not performance. ++The exception are the benchmarks and ubertest. ++.PP ++The tests are divided into the following categories. ++Except the unit tests all of them are client\-server tests. ++Not all providers will support each test. ++.PP ++The test names try to indicate the type of functionality each test is ++verifying. ++Although some tests work with any endpoint type, many are restricted to ++verifying a single endpoint type. ++These tests typically include the endpoint type as part of the test ++name, such as dgram, msg, or rdm. ++.SH Functional ++.PP ++These tests are a mix of very basic functionality tests that show major ++features of libfabric. ++.TP ++.B \f[I]fi_av_xfer\f[] ++Tests communication for unconnected endpoints, as addresses are inserted ++and removed from the local address vector. ++.RS ++.RE ++.TP ++.B \f[I]fi_cm_data\f[] ++Verifies exchanging CM data as part of connecting endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_cq_data\f[] ++Tranfers messages with CQ data. ++.RS ++.RE ++.TP ++.B \f[I]fi_dgram\f[] ++A basic datagram endpoint example. ++.RS ++.RE ++.TP ++.B \f[I]fi_dgram_waitset\f[] ++Transfers datagrams using waitsets for completion notifcation. ++.RS ++.RE ++.TP ++.B \f[I]fi_inj_complete\f[] ++Sends messages using the FI_INJECT_COMPLETE operation flag. ++.RS ++.RE ++.TP ++.B \f[I]fi_mcast\f[] ++A simple multicast test. ++.RS ++.RE ++.TP ++.B \f[I]fi_msg\f[] ++A basic message endpoint example. ++.RS ++.RE ++.TP ++.B \f[I]fi_msg_epoll\f[] ++Transfers messages with completion queues configured to use file ++descriptors as wait objetcts. ++The file descriptors are retrieved by the program and used directly with ++the Linux epoll API. ++.RS ++.RE ++.TP ++.B \f[I]fi_msg_sockets\f[] ++Verifies that the address assigned to a passive endpoint can be ++transitioned to an active endpoint. ++This is required applications that need socket API semantics over RDMA ++implementations (e.g. ++rsockets). ++.RS ++.RE ++.TP ++.B \f[I]fi_multi_ep\f[] ++Performs data transfers over multiple endpoints in parallel. ++.RS ++.RE ++.TP ++.B \f[I]fi_multi_mr\f[] ++Issues RMA write operations to multiple memory regions, using completion ++counters of inbound writes as the notification mechanism. ++.RS ++.RE ++.TP ++.B \f[I]fi_poll\f[] ++Exchanges data over RDM endpoints using poll sets to drive completion ++notifications. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm\f[] ++A basic RDM endpoint example. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_atomic\f[] ++Test and verifies atomic operations over an RDM endpoint. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_deferred_wq\f[] ++Test triggered operations and deferred work queue support. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_multi_domain\f[] ++Performs data transfers over multiple endpoints, with each endpoint ++belonging to a different opened domain. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_multi_recv\f[] ++Transfers multiple messages over an RDM endpoint that are received into ++a single buffer, posted using the FI_MULTI_RECV flag. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_rma_simple\f[] ++A simple RMA write example over an RDM endpoint. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_rma_trigger\f[] ++A basic example of queuing an RMA write operation that is initiated upon ++the firing of a triggering completion. ++Works with RDM endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_shared_av\f[] ++Spawns child processes to verify basic functionality of using a shared ++address vector with RDM endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_tagged_peek\f[] ++Basic test of using the FI_PEEK operation flag with tagged messages. ++Works with RDM endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_recv_cancel\f[] ++Tests canceling posted receives for tagged messages. ++.RS ++.RE ++.TP ++.B \f[I]fi_resmgmt_test\f[] ++Tests the resource management enabled feature. ++This verifies that the provider prevents applications from overruning ++local and remote command queues and completion queues. ++This corresponds to setting the domain attribute resource_mgmt to ++FI_RM_ENABLED. ++.RS ++.RE ++.TP ++.B \f[I]fi_scalable_ep\f[] ++Performs data transfers over scalable endpoints, endpoints associated ++with multiple transmit and receive contexts. ++.RS ++.RE ++.TP ++.B \f[I]fi_shared_ctx\f[] ++Performs data transfers between multiple endpoints, where the endpoints ++share transmit and/or receive contexts. ++.RS ++.RE ++.TP ++.B \f[I]fi_unexpected_msg\f[] ++Tests the send and receive handling of unexpected tagged messages. ++.RS ++.RE ++.SH Benchmarks ++.PP ++The client and the server exchange messages in either a ping\-pong ++manner, for pingpong named tests, or transfer messages one\-way, for bw ++named tests. ++These tests can transfer various messages sizes, with controls over ++which features are used by the test, and report performance numbers. ++The tests are structured based on the benchmarks provided by OSU MPI. ++They are not guaranteed to provide the best latency or bandwidth ++performance numbers a given provider or system may achieve. ++.TP ++.B \f[I]fi_dgram_pingpong\f[] ++Latency test for datagram endpoints ++.RS ++.RE ++.TP ++.B \f[I]fi_msg_bw\f[] ++Message transfer bandwidth test for connected (MSG) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_msg_pingpong\f[] ++Message transfer latency test for connected (MSG) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_cntr_pingpong\f[] ++Message transfer latency test for reliable\-datagram (RDM) endpoints ++that uses counters as the completion mechanism. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_pingpong\f[] ++Message transfer latency test for reliable\-datagram (RDM) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_tagged_bw\f[] ++Tagged message bandwidth test for reliable\-datagram (RDM) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_tagged_pingpong\f[] ++Tagged message latency test for reliable\-datagram (RDM) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rma_bw\f[] ++An RMA read and write bandwidth test for reliable (MSG and RDM) ++endpoints. ++.RS ++.RE ++.SH Unit ++.PP ++These are simple one\-sided unit tests that validate basic behavior of ++the API. ++Because these are single system tests that do not perform data transfers ++their testing scope is limited. ++.TP ++.B \f[I]fi_av_test\f[] ++Verify address vector interfaces. ++.RS ++.RE ++.TP ++.B \f[I]fi_cntr_test\f[] ++Tests counter creation and destruction. ++.RS ++.RE ++.TP ++.B \f[I]fi_cq_test\f[] ++Tests completion queue creation and destruction. ++.RS ++.RE ++.TP ++.B \f[I]fi_dom_test\f[] ++Tests domain creation and destruction. ++.RS ++.RE ++.TP ++.B \f[I]fi_eq_test\f[] ++Tests event queue creation, destruction, and capabilities. ++.RS ++.RE ++.TP ++.B \f[I]fi_getinfo_test\f[] ++Tests provider response to fi_getinfo calls with varying hints. ++.RS ++.RE ++.TP ++.B \f[I]fi_mr_test\f[] ++Tests memory registration. ++.RS ++.RE ++.TP ++.B \f[I]fi_resource_freeing\f[] ++Allocates and closes fabric resources to check for proper cleanup. ++.RS ++.RE ++.SH Ubertest ++.PP ++This is a comprehensive latency, bandwidth, and functionality test that ++can handle a variety of test configurations. ++The test is able to run a large number of tests by iterating over a ++large number of test variables. ++As a result, a full ubertest run can take a significant amount of time. ++Because ubertest iterates over input variables, it relies on a test ++configuration file for control, rather than extensive command line ++options that are used by other fabtests. ++A configuration file must be constructured for each provider. ++Example test configurations are at /test_configs. ++.TP ++.B \f[I]fi_ubertest\f[] ++This test takes a configure file as input. ++The file contains a list of variables and their values to iterate over. ++The test will run a set of latency, bandwidth, and functionality tests ++over a given provider. ++It will perform one execution for every possible combination of all ++variables. ++For example, if there are 8 test variables, with 6 having 2 possible ++values and 2 having 3 possible values, ubertest will execute 576 total ++iterations of each test. ++.RS ++.RE ++.SH HOW TO RUN TESTS ++.IP "(1)" 4 ++Fabtests requires that libfabric be installed on the system, and at ++least one provider be usable. ++.IP "(2)" 4 ++Install fabtests on the system. ++By default all the test executables are installed in /usr/bin directory ++unless specified otherwise. ++.IP "(3)" 4 ++All the client\-server tests have the following usage model: ++.RS 4 ++.PP ++fi_ [OPTIONS] start server fi_ connect to server ++.RE ++.SH COMMAND LINE OPTIONS ++.PP ++Tests share command line options where appropriate. ++The following command line options are available for one or more test. ++To see which options apply for a given test, you can use the ++\[aq]\-h\[aq] help option to see the list available for that test. ++.TP ++.B \f[I]\-h\f[] ++Displays help output for the test. ++.RS ++.RE ++.TP ++.B \f[I]\-f \f[] ++Restrict test to the specified fabric name. ++.RS ++.RE ++.TP ++.B \f[I]\-d \f[] ++Restrict test to the specified domain name. ++.RS ++.RE ++.TP ++.B \f[I]\-p \f[] ++Restrict test to the specified provider name. ++.RS ++.RE ++.TP ++.B \f[I]\-e \f[] ++Use the specified endpoint type for the test. ++Valid options are msg, dgram, and rdm. ++The default endpoint type is rdm. ++.RS ++.RE ++*\-a ++.IP \[bu] 2 ++: The name of a shared address vector. ++This option only applies to tests that support shared address vectors. ++.TP ++.B \f[I]\-B \f[] ++Specifies the port number of the local endpoint, overriding the default. ++.RS ++.RE ++.TP ++.B \f[I]\-P \f[] ++Specifies the port number of the peer endpoint, overriding the default. ++.RS ++.RE ++*\-s ++.IP \[bu] 2 ++: Specifies the address of the local endpoint. ++.TP ++.B \f[I]\-b[=oob_port]\f[] ++Enables out\-of\-band (via sockets) address exchange and test ++synchronization. ++A port for the out\-of\-band connection may be specified as part of this ++option to override the default. ++.RS ++.RE ++.TP ++.B \f[I]\-I \f[] ++Number of data transfer iterations. ++.RS ++.RE ++.TP ++.B \f[I]\-w \f[] ++Number of warm\-up data transfer iterations. ++.RS ++.RE ++.TP ++.B \f[I]\-S \f[] ++Data transfer size or \[aq]all\[aq] for a full range of sizes. ++By default a select number of sizes will be tested. ++.RS ++.RE ++.TP ++.B \f[I]\-l\f[] ++If specified, the starting address of transmit and receive buffers will ++be aligned along a page boundary. ++.RS ++.RE ++.TP ++.B \f[I]\-m\f[] ++Use machine readable output. ++This is useful for post\-processing the test output with scripts. ++.RS ++.RE ++.TP ++.B \f[I]\-t \f[] ++Specify the type of completion mechanism to use. ++Valid values are queue and counter. ++The default is to use completion queues. ++.RS ++.RE ++.TP ++.B \f[I]\-c \f[] ++Indicate the type of processing to use checking for completed ++operations. ++Valid values are spin, sread, and fd. ++The default is to busy wait (spin) until the desired operation has ++completed. ++The sread option indicates that the application will invoke a blocking ++read call in libfabric, such as fi_cq_sread. ++Fd indicates that the application will retrieve the native operating ++system wait object (file descriptor) and use either poll() or select() ++to block until the fd has been signaled, prior to checking for ++completions. ++.RS ++.RE ++.TP ++.B \f[I]\-o \f[] ++For RMA based tests, specify the type of RMA operation to perform. ++Valid values are read, write, and writedata. ++Write operations are the default. ++.RS ++.RE ++.TP ++.B \f[I]\-M \f[] ++For multicast tests, specifies the address of the multicast group to ++join. ++.RS ++.RE ++.SH USAGE EXAMPLES ++.SS A simple example ++.IP ++.nf ++\f[C] ++run\ server:\ \ \-p\ \ \-s\ ++\ \ \ \ e.g.\ \ \ \ fi_msg_rma\ \-p\ sockets\ \-s\ 192.168.0.123 ++run\ client:\ \ \ \-p\ ++\ \ \ \ e.g.\ \ \ \ fi_msg_rma\ 192.168.0.123\ \-p\ sockets ++\f[] ++.fi ++.SS An example with various options ++.IP ++.nf ++\f[C] ++run\ server:\ fi_rdm_atomic\ \-p\ psm\ \-s\ 192.168.0.123\ \-I\ 1000\ \-S\ 1024 ++run\ client:\ fi_rdm_atomic\ 192.168.0.123\ \-p\ psm\ \-I\ 1000\ \-S\ 1024 ++\f[] ++.fi ++.PP ++This will run "fi_rdm_atomic" for all atomic operations with ++.IP ++.nf ++\f[C] ++\-\ PSM\ provider ++\-\ 1000\ iterations ++\-\ 1024\ bytes\ message\ size ++\-\ server\ node\ as\ 123.168.0.123 ++\f[] ++.fi ++.SS Run fi_ubertest ++.IP ++.nf ++\f[C] ++run\ server:\ fi_ubertest ++run\ client:\ fi_ubertest\ \-u\ /usr/share/fabtests/test_configs/sockets/quick.test\ 192.168.0.123 ++\f[] ++.fi ++.PP ++This will run "fi_ubertest" with ++.IP ++.nf ++\f[C] ++\-\ sockets\ provider ++\-\ configurations\ defined\ in\ /usr/share/fabtests/test_configs/sockets/quick.test ++\-\ server\ node\ as\ 192.168.0.123 ++\f[] ++.fi ++.PP ++The config files are provided in /test_configs for sockets, verbs, udp, ++and usnic providers and distributed with fabtests installation. ++.PP ++For more usage options: fi_ubertest \-h ++.SS Run the whole fabtests suite ++.PP ++A runscript scripts/runfabtests.sh is provided that runs all the tests ++in fabtests and reports the number of pass/fail/notrun. ++.IP ++.nf ++\f[C] ++Usage:\ runfabtests.sh\ [OPTIONS]\ [provider]\ [host]\ [client] ++\f[] ++.fi ++.PP ++By default if none of the options are provided, it runs all the tests ++using ++.IP ++.nf ++\f[C] ++\-\ sockets\ provider ++\-\ 127.0.0.1\ as\ both\ server\ and\ client\ address ++\-\ for\ small\ number\ of\ optiond\ and\ iterations ++\f[] ++.fi ++.PP ++Various options can be used to choose provider, subset tests to run, ++level of verbosity etc. ++.IP ++.nf ++\f[C] ++runfabtests.sh\ \-vvv\ \-t\ all\ psm\ 192.168.0.123\ 192.168.0.124 ++\f[] ++.fi ++.PP ++This will run all fabtests using ++.IP ++.nf ++\f[C] ++\-\ psm\ provider ++\-\ for\ different\ options\ and\ larger\ iterations ++\-\ server\ node\ as\ 192.168.0.123\ and\ client\ node\ as\ 192.168.0.124 ++\-\ print\ test\ output\ for\ all\ the\ tests ++\f[] ++.fi ++.PP ++For detailed usage options: runfabtests.sh \-h ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/parseyaml.py b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/parseyaml.py +new file mode 100755 +index 0000000..9ece600 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/parseyaml.py +@@ -0,0 +1,95 @@ ++#!/usr/bin/env python ++ ++import sys ++import pprint ++import operator ++from optparse import OptionParser ++ ++try: ++ import yaml ++except ImportError: ++ print ("PyYAML library missing, try: yum install PyYAML") ++ sys.exit(1) ++ ++# diff two list-of dicts for perf numbers ++# this means just produce xfer_size, MB/sec, usec/xfer ++def _diff(a,b): ++ r = [] ++ ++ for v1, v2 in zip(a,b): ++ d = {} ++ for k in v2.keys(): ++ if k == 'xfer_size': ++ d[k] = v2[k] ++ elif k == 'MB/sec' or k == 'usec/xfer': ++ d[k] = float((v2[k] - v1[k])) / float(v1[k]) * 100 ++ else: ++ continue ++ ++ r.append(d.copy()) ++ ++ return r ++ ++def difference(ystream): ++ """Subtract a from b and print the results""" ++ ++ # reverse stream and split based on key ++ rev = reversed(list(ystream)) ++ a, b = {}, {} ++ for i in rev: ++ if not set(i).issubset(set(b)): ++ b.update(i) ++ else: ++ a.update(i) ++ ++ result = {} ++ for k in b.keys(): ++ result[k] = _diff(a[k], b[k]) ++ ++ return result ++ ++def pretty(stream): ++ """Prety-print given yaml stream and exit""" ++ for i in stream: pprint.pprint(i) ++ return 0 ++ ++def perfprint(d): ++ for k,v in d.items(): ++ print k, ":" ++ for i in v: ++ print 'xfer_size: ', i['xfer_size'], ++ print ', MB/sec: %.2f' % i['MB/sec'] + '%', ++ print ', usec/xfer: %.2f' % i['usec/xfer'] + '%' ++ ++ ++def main(argv=None): ++ ++ parser = OptionParser(description='fabtests yaml parsing utility') ++ parser.add_option('-d', action='store_true', default=False, help=difference.__doc__) ++ parser.add_option('-v', action='store_true', default=False, help=pretty.__doc__) ++ (options, args) = parser.parse_args() ++ ++ if len(args) == 0: ++ fd = sys.stdin ++ elif len(args) > 1: ++ class fd: ++ @staticmethod ++ def read(): ++ r1 = map(open, args) ++ r2 = map(lambda x: x.read(), r1) ++ return reduce(operator.add, r2) ++ else: ++ fd = open(args[0], 'r') ++ ++ yi = yaml.load_all(fd.read()) ++ ++ if options.d: ++ perfprint(difference(yi)) ++ ++ if options.v: ++ pretty(yi) ++ ++ return 0 ++ ++if __name__ == "__main__": ++ sys.exit(main(sys.argv)) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/rft_yaml_to_junit_xml b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/rft_yaml_to_junit_xml +new file mode 100755 +index 0000000..feb6463 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/rft_yaml_to_junit_xml +@@ -0,0 +1,97 @@ ++#!/usr/bin/env ruby ++ ++# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. ++# ++# This software is available to you under a choice of one of two ++# licenses. You may choose to be licensed under the terms of the GNU ++# General Public License (GPL) Version 2, available from the file ++# COPYING in the main directory of this source tree, or the ++# BSD license below: ++# ++# Redistribution and use in source and binary forms, with or ++# without modification, are permitted provided that the following ++# conditions are met: ++# ++# - Redistributions of source code must retain the above ++# copyright notice, this list of conditions and the following ++# disclaimer. ++# ++# - Redistributions in binary form must reproduce the above ++# copyright notice, this list of conditions and the following ++# disclaimer in the documentation and/or other materials ++# provided with the distribution. ++# ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV ++# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++# SOFTWARE. ++ ++# Transform YAML-formatted runfabtests.sh output on STDIN into jUnit-formatted ++# XML on STDOUT. ++ ++require 'yaml' ++ ++results = YAML.load(ARGF); ++ ++suite_duration = 0.0 ++num_tests = 0 ++failures = 0 # jUnit considers failures/errors to be different, we only use ++errors = 0 # failures for right now ++skipped = 0 ++ ++# make an initial pass so we can fill out the tag's attributes ++results.each do |tcase| ++ num_tests += 1 ++ ++ case tcase['result'] ++ when 'Notrun' ++ skipped += 1 ++ when 'Fail' ++ failures += 1 ++ end ++ ++ suite_duration += tcase['time'] ++end ++ ++printf %Q{\n}, ++ num_tests, failures, errors, skipped, suite_duration ++ ++# now emit each ++results.each do |tcase| ++ if tcase.has_key?('client_stdout') ++ output = "SERVER OUTPUT:\n" ++ output += tcase['server_stdout'] ++ output += "\n" ++ output += "CLIENT OUTPUT:\n" ++ output += tcase['client_stdout'] ++ else ++ output = tcase['server_stdout'] ++ end ++ ++ puts <<-EOT ++ ++ EOT ++ case tcase['result'] ++ when 'Notrun' ++ puts <<-EOT ++ ++ EOT ++ when 'Fail' ++ puts <<-EOT ++ "#{tcase['name']}" failed ++ EOT ++ end ++ puts <<-EOT ++ ++ ++ ++ ++ ++ EOT ++end ++ ++puts "" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/run_with_output.cmd b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/run_with_output.cmd +new file mode 100644 +index 0000000..bc105ca +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/run_with_output.cmd +@@ -0,0 +1,11 @@ ++set cmdline=%1 ++set out_file=%2 ++set result_file=%3 ++ ++ ++for /f "tokens=*" %%n in (%cmdline%) do set test_cmdline=%%n ++%test_cmdline% >%out_file% 2>&1 ++echo %errorlevel% >%result_file%.tmp ++ren %result_file%.tmp %result_file% ++ ++exit +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.cmd b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.cmd +new file mode 100644 +index 0000000..8d31b77 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.cmd +@@ -0,0 +1,265 @@ ++@echo off ++setlocal EnableDelayedExpansion ++ ++set PATH=%~dp0;%PATH% ++ ++ ++set S_INTERFACE=127.0.0.1 ++set C_INTERFACE=127.0.0.1 ++ ++set TEST_FAIL_TIMEOUT=90 ++ ++set unit_tests=^ ++ "av_test -g 192.168.10.1 -n 1 -s 127.0.0.1"^ ++ "eq_test" ++rem Disabling this test since it fails on windows (appveyor). Re-enable after root cause is identified and fixed ++rem "dom_test -n 2" ++ ++set functional_tests=^ ++ "cq_data"^ ++ "dgram -p sockets"^ ++ "dgram_waitset -p sockets"^ ++ "msg"^ ++ "msg_sockets"^ ++ "poll -t queue"^ ++ "poll -t counter"^ ++ "rdm"^ ++ "rdm_rma_simple"^ ++ "rdm_rma_trigger"^ ++ "rdm_tagged_peek"^ ++ "scalable_ep" ++rem "msg_epoll" ++ ++set short_tests=^ ++ "msg_pingpong -I 5"^ ++ "msg_pingpong -I 5 -v"^ ++ "rdm_cntr_pingpong -I 5"^ ++ "rdm_pingpong -I 5"^ ++ "rdm_pingpong -I 5 -v"^ ++ "rdm_tagged_pingpong -I 5"^ ++ "rdm_tagged_pingpong -I 5 -v" ++rem "msg_bw -I 5"^ ++rem "msg_bw -I 5 -v"^ ++rem "rma_bw -e msg -o write -I 5"^ ++rem "rma_bw -e msg -o read -I 5"^ ++rem "rma_bw -e msg -o writedata -I 5"^ ++rem "rma_bw -e rdm -o write -I 5"^ ++rem "rma_bw -e rdm -o read -I 5"^ ++rem "rma_bw -e rdm -o writedata -I 5"^ ++rem "msg_rma -o write -I 5"^ ++rem "msg_rma -o read -I 5"^ ++rem "msg_rma -o writedata -I 5"^ ++rem "msg_stream -I 5"^ ++rem "rdm_atomic -I 5 -o all"^ ++rem "rdm_multi_recv -I 5"^ ++rem "rdm_rma -o write -I 5"^ ++rem "rdm_rma -o read -I 5"^ ++rem "rdm_rma -o writedata -I 5"^ ++rem "rdm_tagged_bw -I 5"^ ++rem "rdm_tagged_bw -I 5 -v"^ ++rem "dgram_pingpong -I 5"^ ++ ++ ++set standard_tests=^ ++ "msg_pingpong"^ ++ "msg_pingpong -v"^ ++ "msg_pingpong -k"^ ++ "msg_pingpong -k -v"^ ++ "rdm_cntr_pingpong"^ ++ "rdm_pingpong"^ ++ "rdm_pingpong -v"^ ++ "rdm_pingpong -k"^ ++ "rdm_pingpong -k -v"^ ++ "rdm_tagged_pingpong"^ ++ "rdm_tagged_pingpong -v" ++rem "msg_bw"^ ++rem "msg_bw -v"^ ++rem "rma_bw -e msg -o write"^ ++rem "rma_bw -e msg -o read"^ ++rem "rma_bw -e msg -o writedata"^ ++rem "rma_bw -e rdm -o write"^ ++rem "rma_bw -e rdm -o read"^ ++rem "rma_bw -e rdm -o writedata"^ ++rem "msg_rma -o write"^ ++rem "msg_rma -o read"^ ++rem "msg_rma -o writedata"^ ++rem "msg_stream"^ ++rem "rdm_atomic -o all -I 1000"^ ++rem "rdm_multi_recv"^ ++rem "rdm_rma -o write"^ ++rem "rdm_rma -o read"^ ++rem "rdm_rma -o writedata"^ ++rem "rdm_tagged_bw"^ ++rem "rdm_tagged_bw -v"^ ++rem "dgram_pingpong"^ ++rem "dgram_pingpong -k"^ ++ ++ ++set test_types=unit functional short ++ ++ ++goto :main ++ ++ ++:single__clear_txt ++ del out.txt res.txt >nul 2>nul ++exit /b 0 ++:single__start_job ++ start /b run_with_output.cmd "!test_cmdline!" out.txt res.txt >nul 2>nul ++exit /b 0 ++:single__check_is_job_ended ++ if not exist res.txt exit /b 1 ++exit /b 0 ++:single__print_output ++ echo OUTPUT: & type out.txt & echo ---- ++exit /b 0 ++:single__print_and_check_err_code ++ setlocal ++ set err=0 ++ set /p err_code= &2 & exit /b 2 ) ++ set /a err_code=err_code ++ if not "!err_code!"=="0" ( set err=1 & echo error code = !err_code! ) ++exit /b !err! ++ ++ ++:client_server__clear_txt ++ del out_sv.txt res_sv.txt out_cl.txt res_cl.txt >nul 2>nul ++exit /b 0 ++:client_server__start_job ++ start /b run_with_output.cmd "!test_cmdline! -s !S_INTERFACE!" out_sv.txt res_sv.txt >nul 2>nul ++ start /b run_with_output.cmd "!test_cmdline! -s !C_INTERFACE! !S_INTERFACE!" out_cl.txt res_cl.txt >nul 2>nul ++exit /b 0 ++:client_server__check_is_job_ended ++ if not exist res_sv.txt exit /b 1 ++ if not exist res_cl.txt exit /b 1 ++exit /b 0 ++:client_server__print_output ++ echo SERVER OUTPUT: & type out_sv.txt & echo ---- ++ echo CLIENT OUTPUT: & type out_cl.txt & echo ---- ++exit /b 0 ++:client_server__print_and_check_err_code ++ setlocal ++ set err=0 ++ set /p sv_err_code= &2 & exit /b 2 ) ++ set /p cl_err_code= &2 & exit /b 2 ) ++ set /a sv_err_code=sv_err_code ++ set /a cl_err_code=cl_err_code ++ if not "!sv_err_code!"=="0" ( set err=1 & echo server error code = !sv_err_code! ) ++ if not "!cl_err_code!"=="0" ( set err=1 & echo client error code = !cl_err_code! ) ++exit /b !err! ++ ++ ++:results ++ setlocal ++ set err=%1 ++ call :!test_type!__print_output ++ if "!err!"=="2" ( ++ echo test failed due to timeout ++ ) else ( ++ if not "!err!"=="0" ( ++ echo UNKNOWN ERROR ++ exit -1 ++ ) else ( ++ call :!test_type!__print_and_check_err_code ++ set err=!errorlevel! ++ if not "!err!"=="0" echo test failed ++ ) ++ ) ++exit /b !err! ++ ++ ++ ++ ++:run ++ setlocal ++ for /f "tokens=1" %%n in ("!test_cmdline!") do set test_exename=%%n.exe ++ ++ call :!test_type!__start_job ++ set /a secs=0 ++ :run_client_server__WAIT ++ set /a secs=secs+1 ++ timeout /t 1 >nul ++ if /I !secs! geq %TEST_FAIL_TIMEOUT% ( ++ echo timeout, killing job ++ taskkill /f /im !test_exename! >nul ++ exit /b 2 ++ ) ++ call :!test_type!__check_is_job_ended || goto :run_client_server__WAIT ++ :run_client_server__WAIT_END ++exit /b 0 ++ ++ ++ ++ ++ ++:test ++ setlocal ++ set test_type=%1 ++ for /f "tokens=*" %%n in (%2) do set test_cmdline=%%n ++ echo !test_cmdline! ++ ++ call :!test_type!__clear_txt ++ call :run ++ call :results !errorlevel! ++ set err=!errorlevel! ++ call :!test_type!__clear_txt ++exit /b !err! ++ ++ ++ ++ ++:run_test__unit ++ call :test single %* ++exit /b ++ ++ ++:run_test__functional ++ call :test client_server %* ++exit /b ++ ++ ++:run_test__standard ++ call :test client_server %* ++exit /b ++ ++ ++:run_test__short ++ call :test client_server %* ++exit /b ++ ++ ++ ++ ++:main ++ set /a tests_count=0 ++ set /a failed_tests_count=0 ++ for %%a in (!test_types!) do ( ++ for %%t in (!%%a_tests!) do ( ++ set /a tests_count=tests_count+1 ++ ) ++ ) ++ ++ for %%a in (!test_types!) do ( ++ echo %%a tests: ++ set run=run_test__%%a ++ for %%t in (!%%a_tests!) do ( ++ call :!run! %%t || ( ++ set failed=!failed! %%t ++ set /a failed_tests_count=failed_tests_count+1 ++ ) ++ ) ++ echo. ++ echo ============================== ++ ) ++ ++ ++ if not "!failed!"=="" ( ++ echo !failed_tests_count! of !tests_count! tests failed: ++ for %%t in (!failed!) do ( ++ echo %%t ++ ) ++ exit /b !failed_tests_count! ++ ) ++ ++ echo all !tests_count! tests passed ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.sh b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.sh +new file mode 100755 +index 0000000..813fa53 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.sh +@@ -0,0 +1,668 @@ ++#!/usr/bin/env bash ++ ++# ++# Copyright (c) 2017-2018, Intel Corporation. All rights reserved. ++# Copyright (c) 2016-2018, Cisco Systems, Inc. All rights reserved. ++# Copyright (c) 2016, Cray, Inc. All rights reserved. ++# ++# This software is available to you under a choice of one of two ++# licenses. You may choose to be licensed under the terms of the GNU ++# General Public License (GPL) Version 2, available from the file ++# COPYING in the main directory of this source tree, or the ++# BSD license below: ++# ++# Redistribution and use in source and binary forms, with or ++# without modification, are permitted provided that the following ++# conditions are met: ++# ++# - Redistributions of source code must retain the above ++# copyright notice, this list of conditions and the following ++# disclaimer. ++# ++# - Redistributions in binary form must reproduce the above ++# copyright notice, this list of conditions and the following ++# disclaimer in the documentation and/or other materials ++# provided with the distribution. ++# ++# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ++# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ++# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ++# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++# POSSIBILITY OF SUCH DAMAGE. ++# ++ ++trap cleanup_and_exit SIGINT ++ ++# ++# Default behavior with no args will use sockets provider with loopback ++# ++declare BIN_PATH ++declare PROV="sockets" ++declare TEST_TYPE="quick" ++declare SERVER="127.0.0.1" ++declare CLIENT="127.0.0.1" ++declare EXCLUDE="" ++declare GOOD_ADDR="" ++declare -i VERBOSE=0 ++declare -i SKIP_NEG=0 ++declare COMPLEX_CFG ++declare TIMEOUT_VAL="120" ++declare STRICT_MODE=0 ++declare REGEX=0 ++declare FORK=0 ++ ++declare -r c_outp=$(mktemp fabtests.c_outp.XXXXXX) ++declare -r s_outp=$(mktemp fabtests.s_outp.XXXXXX) ++ ++declare -i skip_count=0 ++declare -i pass_count=0 ++declare -i fail_count=0 ++ ++if [[ "$(uname)" == "FreeBSD" ]]; then ++ declare -ri FI_ENODATA=$(python -c 'import errno; print(errno.ENOMSG)') ++else ++ declare -ri FI_ENODATA=$(python -c 'import errno; print(errno.ENODATA)') ++fi ++declare -ri FI_ENOSYS=$(python -c 'import errno; print(errno.ENOSYS)') ++ ++neg_unit_tests=( ++ "dgram g00n13s" ++ "rdm g00n13s" ++ "msg g00n13s" ++) ++ ++functional_tests=( ++ "av_xfer -e rdm" ++ "av_xfer -e dgram" ++ "cm_data" ++ "cq_data -e msg" ++ "cq_data -e rdm" ++ "cq_data -e dgram" ++ "dgram" ++ "dgram_waitset" ++ "msg" ++ "msg_epoll" ++ "msg_sockets" ++ "poll -t queue" ++ "poll -t counter" ++ "rdm" ++ "rdm_rma_simple" ++ "rdm_rma_trigger" ++ "shared_ctx" ++ "shared_ctx --no-tx-shared-ctx" ++ "shared_ctx --no-rx-shared-ctx" ++ "shared_ctx -e msg" ++ "shared_ctx -e msg --no-tx-shared-ctx" ++ "shared_ctx -e msg --no-rx-shared-ctx" ++ "shared_ctx -e dgram" ++ "shared_ctx -e dgram --no-tx-shared-ctx" ++ "shared_ctx -e dgram --no-rx-shared-ctx" ++ "rdm_tagged_peek" ++ "scalable_ep" ++ "rdm_shared_av" ++ "multi_mr -e msg -V" ++ "multi_mr -e rdm -V" ++ "recv_cancel -e rdm -V" ++ "unexpected_msg -e msg -i 10" ++ "unexpected_msg -e rdm -i 10" ++ "unexpected_msg -e msg -S -i 10" ++ "unexpected_msg -e rdm -S -i 10" ++ "inj_complete -e msg" ++ "inj_complete -e rdm" ++ "inj_complete -e dgram" ++ "inj_complete -e msg -SR" ++ "inj_complete -e rdm -SR" ++ "inj_complete -e dgram -SR" ++) ++ ++short_tests=( ++ "msg_pingpong -I 5" ++ "msg_pingpong -I 5 -v" ++ "msg_bw -I 5" ++ "msg_bw -I 5 -v" ++ "rma_bw -e msg -o write -I 5" ++ "rma_bw -e msg -o read -I 5" ++ "rma_bw -e msg -o writedata -I 5" ++ "rma_bw -e rdm -o write -I 5" ++ "rma_bw -e rdm -o read -I 5" ++ "rma_bw -e rdm -o writedata -I 5" ++ "rdm_atomic -I 5 -o all" ++ "rdm_cntr_pingpong -I 5" ++ "rdm_multi_recv -I 5" ++ "rdm_pingpong -I 5" ++ "rdm_pingpong -I 5 -v" ++ "rdm_tagged_pingpong -I 5" ++ "rdm_tagged_pingpong -I 5 -v" ++ "rdm_tagged_bw -I 5" ++ "rdm_tagged_bw -I 5 -v" ++ "dgram_pingpong -I 5" ++) ++ ++standard_tests=( ++ "msg_pingpong" ++ "msg_pingpong -v" ++ "msg_pingpong -k" ++ "msg_pingpong -k -v" ++ "msg_bw" ++ "msg_bw -v" ++ "rma_bw -e msg -o write" ++ "rma_bw -e msg -o read" ++ "rma_bw -e msg -o writedata" ++ "rma_bw -e rdm -o write" ++ "rma_bw -e rdm -o read" ++ "rma_bw -e rdm -o writedata" ++ "rdm_atomic -o all -I 1000" ++ "rdm_cntr_pingpong" ++ "rdm_multi_recv" ++ "rdm_pingpong" ++ "rdm_pingpong -v" ++ "rdm_pingpong -k" ++ "rdm_pingpong -k -v" ++ "rdm_tagged_pingpong" ++ "rdm_tagged_pingpong -v" ++ "rdm_tagged_bw" ++ "rdm_tagged_bw -v" ++ "dgram_pingpong" ++ "dgram_pingpong -k" ++) ++ ++unit_tests=( ++ "getinfo_test -s SERVER_ADDR GOOD_ADDR" ++ "av_test -g GOOD_ADDR -n 1 -s SERVER_ADDR" ++ "dom_test -n 2" ++ "eq_test" ++ "cq_test" ++ "mr_test" ++ "cntr_test" ++) ++ ++complex_tests=( ++ "ubertest" ++) ++ ++function errcho { ++ >&2 echo $* ++} ++ ++function print_border { ++ printf "# " ++ printf "%.0s-" {1..78} ++ printf "\n" ++} ++ ++function print_results { ++ local test_name=$1 ++ local test_result=$2 ++ local test_time=$3 ++ local server_out_file=$4 ++ local server_cmd=$5 ++ local client_out_file=$6 ++ local client_cmd=$7 ++ ++ if [ $VERBOSE -eq 0 ] ; then ++ # print a simple, single-line format that is still valid YAML ++ printf "%-70s%10s\n" "$test_exe:" "$test_result" ++ else ++ # Print a more detailed YAML format that is not a superset of ++ # the non-verbose output. See ofiwg/fabtests#259 for a ++ # rationale. ++ emit_stdout=0 ++ case $test_result in ++ Pass*) ++ [ $VERBOSE -ge 3 ] && emit_stdout=1 ++ ;; ++ Notrun|Excluded) ++ [ $VERBOSE -ge 2 ] && emit_stdout=1 ++ ;; ++ Fail*) ++ [ $VERBOSE -ge 1 ] && emit_stdout=1 ++ ;; ++ esac ++ ++ printf -- "- name: %s\n" "$test_exe" ++ printf -- " result: %s\n" "$test_result" ++ printf -- " time: %s\n" "$test_time" ++ if [ $emit_stdout -eq 1 -a "$server_out_file" != "" ] ; then ++ if [ "$server_cmd" != "" ] ; then ++ printf -- " server_cmd: %s\n" "$server_cmd" ++ fi ++ printf -- " server_stdout: |\n" ++ sed -e 's/^/ /' < $server_out_file ++ fi ++ if [ $emit_stdout -eq 1 -a "$client_out_file" != "" ] ; then ++ if [ "$client_cmd" != "" ] ; then ++ printf -- " client_cmd: %s\n" "$client_cmd" ++ fi ++ printf -- " client_stdout: |\n" ++ sed -e 's/^/ /' < $client_out_file ++ fi ++ fi ++} ++ ++function cleanup { ++ ${CLIENT_CMD} "ps -eo comm,pid | grep '^fi_' | awk '{print \$2}' | xargs kill -9" >& /dev/null ++ ${SERVER_CMD} "ps -eo comm,pid | grep '^fi_' | awk '{print \$2}' | xargs kill -9" >& /dev/null ++ rm -f $c_outp $s_outp ++} ++ ++function cleanup_and_exit { ++ cleanup ++ exit 1 ++} ++ ++# compute the duration in seconds between two integer values ++# measured since the start of the UNIX epoch and print the result to stdout ++function compute_duration { ++ local -i s=$1 ++ local -i e=$2 ++ echo $(( $2 - $1)) ++} ++ ++function read_exclude_file { ++ exclude_file=$1 ++ ++ if [ ! -f $exclude_file ]; then ++ echo "Given exclusion file does not exist!" ++ exit 1 ++ fi ++ ++ while read -r pattern || [[ -n "$pattern" ]]; do ++ # Ignore patterns that are comments or just whitespaces ++ ignore_pattern="#.*|^[\t ]*$" ++ if [[ ! "$pattern" =~ $ignore_pattern ]]; then ++ if [ -z "$EXCLUDE" ]; then ++ EXCLUDE="$pattern" ++ else ++ EXCLUDE="${EXCLUDE},$pattern" ++ fi ++ fi ++ done < "$exclude_file" ++} ++ ++function is_excluded { ++ test_name=$1 ++ ++ [[ -z "$EXCLUDE" ]] && return 1 ++ ++ IFS="," read -ra exclude_array <<< "$EXCLUDE" ++ for pattern in "${exclude_array[@]}"; do ++ if [[ $REGEX -eq 1 && "$test_name" =~ $pattern ]] || ++ [[ "$test_name" == "$pattern" ]]; then ++ print_results "$test_exe" "Excluded" "0" "" "" ++ skip_count+=1 ++ return 0 ++ fi ++ done ++ return 1 ++} ++ ++function unit_test { ++ local test=$1 ++ local is_neg=$2 ++ local ret1=0 ++ local test_exe=$(echo "fi_${test} -p \"$PROV\"" | \ ++ sed -e "s/GOOD_ADDR/$GOOD_ADDR/g" -e "s/SERVER_ADDR/${S_INTERFACE}/g") ++ local start_time ++ local end_time ++ local test_time ++ ++ is_excluded "$test" && return ++ ++ start_time=$(date '+%s') ++ ++ cmd="${BIN_PATH}${test_exe}" ++ ${SERVER_CMD} "${EXPORT_ENV} $cmd" &> $s_outp & ++ p1=$! ++ ++ wait $p1 ++ ret=$? ++ ++ end_time=$(date '+%s') ++ test_time=$(compute_duration "$start_time" "$end_time") ++ ++ if [ $is_neg -eq 1 -a $ret -eq $FI_ENODATA ]; then ++ # negative test passed ++ ret=0 ++ elif [ $is_neg -eq 1 ]; then ++ # negative test failed ++ ret=1 ++ fi ++ if [[ $STRICT_MODE -eq 0 && $ret -eq $FI_ENODATA || $ret -eq $FI_ENOSYS ]]; then ++ print_results "$test_exe" "Notrun" "$test_time" "$s_outp" "$cmd" ++ skip_count+=1 ++ elif [ $ret -ne 0 ]; then ++ print_results "$test_exe" "Fail" "$test_time" "$s_outp" "$cmd" ++ if [ $ret -eq 124 ]; then ++ cleanup ++ fi ++ fail_count+=1 ++ else ++ print_results "$test_exe" "Pass" "$test_time" "$s_outp" "$cmd" ++ pass_count+=1 ++ fi ++} ++ ++function cs_test { ++ local test=$1 ++ local s_ret=0 ++ local c_ret=0 ++ local test_exe="fi_${test} -p \"${PROV}\"" ++ local start_time ++ local end_time ++ local test_time ++ ++ is_excluded "$test" && return ++ ++ start_time=$(date '+%s') ++ ++ s_cmd="${BIN_PATH}${test_exe} -s $S_INTERFACE" ++ ${SERVER_CMD} "${EXPORT_ENV} $s_cmd" &> $s_outp & ++ s_pid=$! ++ sleep 1 ++ ++ c_cmd="${BIN_PATH}${test_exe} -s $C_INTERFACE $S_INTERFACE" ++ ${CLIENT_CMD} "${EXPORT_ENV} $c_cmd" &> $c_outp & ++ c_pid=$! ++ ++ wait $c_pid ++ c_ret=$? ++ ++ [[ c_ret -ne 0 ]] && kill -9 $s_pid 2> /dev/null ++ ++ wait $s_pid ++ s_ret=$? ++ ++ end_time=$(date '+%s') ++ test_time=$(compute_duration "$start_time" "$end_time") ++ ++ if [[ $STRICT_MODE -eq 0 && $s_ret -eq $FI_ENODATA && $c_ret -eq $FI_ENODATA ]] || ++ [[ $STRICT_MODE -eq 0 && $s_ret -eq $FI_ENOSYS && $c_ret -eq $FI_ENOSYS ]]; then ++ print_results "$test_exe" "Notrun" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ skip_count+=1 ++ elif [ $s_ret -ne 0 -o $c_ret -ne 0 ]; then ++ print_results "$test_exe" "Fail" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ if [ $s_ret -eq 124 -o $c_ret -eq 124 ]; then ++ cleanup ++ fi ++ fail_count+=1 ++ else ++ print_results "$test_exe" "Pass" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ pass_count+=1 ++ fi ++} ++ ++function complex_test { ++ local test=$1 ++ local config=$2 ++ local test_exe="fi_${test}" ++ local s_ret=0 ++ local c_ret=0 ++ local start_time ++ local end_time ++ local test_time ++ ++ is_excluded "$test" && return ++ ++ start_time=$(date '+%s') ++ ++ if [[ $FORK -eq 1 ]]; then ++ opts="-f" ++ else ++ opts="" ++ fi ++ ++ s_cmd="${BIN_PATH}${test_exe} -x $opts" ++ FI_LOG_LEVEL=error ${SERVER_CMD} "${EXPORT_ENV} $s_cmd" &> $s_outp & ++ s_pid=$! ++ sleep 1 ++ ++ c_cmd="${BIN_PATH}${test_exe} -p \"${PROV}\" -t $config $S_INTERFACE $opts" ++ FI_LOG_LEVEL=error ${CLIENT_CMD} "${EXPORT_ENV} $c_cmd" &> $c_outp & ++ c_pid=$! ++ ++ wait $c_pid ++ c_ret=$? ++ ++ [[ c_ret -ne 0 ]] && kill -9 $s_pid ++ ++ wait $s_pid ++ s_ret=$? ++ ++ end_time=$(date '+%s') ++ test_time=$(compute_duration "$start_time" "$end_time") ++ ++ # case: config file doesn't exist or invalid option provided ++ if [ $s_ret -eq 1 -o $c_ret -eq 1 ]; then ++ print_results "$test_exe" "Notrun" "0" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ cleanup ++ skip_count+=1 ++ return ++ # case: test didn't run becasue some error occured ++ elif [ $s_ret -ne 0 -o $c_ret -ne 0 ]; then ++ printf "%-50s%s\n" "$test_exe:" "Server returns $s_ret, client returns $c_ret" ++ print_results "$test_exe" "Fail [$f_cnt/$total]" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ cleanup ++ fail_count+=1 ++ else ++ local f_cnt=$(cat $c_outp | awk -F': ' '/ENOSYS|ERROR/ {total += $2} END {print total}') ++ local s_cnt=$(cat $c_outp | awk -F': ' '/Success/ {total += $2} END {print total}') ++ local total=$(cat $c_outp | awk -F': ' '/Success|ENODATA|ENOSYS|ERROR/ {total += $2} END {print total}') ++ if [ $f_cnt -eq 0 ]; then ++ print_results "$test_exe" "Pass [$s_cnt/$total]" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ pass_count+=1 ++ else ++ print_results "$test_exe" "Fail [$f_cnt/$total]" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ cleanup ++ fail_count+=1 ++ fi ++ fi ++} ++ ++function main { ++ local complex_cfg="quick" ++ ++ if [[ $1 == "quick" ]]; then ++ local -r tests="unit functional short" ++ elif [[ $1 == "verify" ]]; then ++ local -r tests="complex" ++ complex_cfg=$1 ++ else ++ local -r tests=$(echo $1 | sed 's/all/unit,functional,standard,complex/g' | tr ',' ' ') ++ if [[ $1 == "all" ]]; then ++ complex_cfg=$1 ++ fi ++ fi ++ ++ if [[ -n "$COMPLEX_CFG" ]]; then ++ complex_cfg="$COMPLEX_CFG" ++ fi ++ ++ if [ $VERBOSE -eq 0 ] ; then ++ printf "# %-68s%10s\n" "Test" "Result" ++ print_border ++ fi ++ ++ for ts in ${tests}; do ++ case ${ts} in ++ unit) ++ for test in "${unit_tests[@]}"; do ++ unit_test "$test" "0" ++ done ++ ++ if [ $SKIP_NEG -eq 0 ] ; then ++ for test in "${neg_unit_tests[@]}"; do ++ unit_test "$test" "1" ++ done ++ fi ++ ;; ++ functional) ++ for test in "${functional_tests[@]}"; do ++ cs_test "$test" ++ done ++ ;; ++ short) ++ for test in "${short_tests[@]}"; do ++ cs_test "$test" ++ done ++ ;; ++ standard) ++ for test in "${standard_tests[@]}"; do ++ cs_test "$test" ++ done ++ ;; ++ complex) ++ for test in "${complex_tests[@]}"; do ++ complex_test $test $complex_cfg ++ ++ done ++ ;; ++ *) ++ errcho "Unknown test set: ${ts}" ++ exit 1 ++ ;; ++ esac ++ done ++ ++ total=$(( $pass_count + $fail_count )) ++ ++ print_border ++ ++ printf "# %-50s%10d\n" "Total Pass" $pass_count ++ printf "# %-50s%10d\n" "Total Notrun/Excluded" $skip_count ++ printf "# %-50s%10d\n" "Total Fail" $fail_count ++ ++ if [[ "$total" > "0" ]]; then ++ printf "# %-50s%10d\n" "Percentage of Pass" $(( $pass_count * 100 / $total )) ++ fi ++ ++ print_border ++ ++ cleanup ++ exit $fail_count ++} ++ ++function usage { ++ errcho "Usage:" ++ errcho " $0 [OPTIONS] [provider] [host] [client]" ++ errcho ++ errcho "Run fabtests using provider between host and client (default" ++ errcho "'sockets' provider in loopback-mode). Report pass/fail/notrun status." ++ errcho ++ errcho "Options:" ++ errcho -e " -g\tgood IP address from 's perspective (default $GOOD_ADDR)" ++ errcho -e " -v\tprint output of failing" ++ errcho -e " -vv\tprint output of failing/notrun" ++ errcho -e " -vvv\tprint output of failing/notrun/passing" ++ errcho -e " -t\ttest set(s): all,quick,unit,functional,standard,short,complex (default quick)" ++ errcho -e " -e\texclude tests: comma delimited list of test names / ++ regex patterns (with -R) e.g. \"dgram,rma.*write\"" ++ errcho -e " -E\texport provided variable name and value to ssh client and server processes. ++ options must of of the form '-E var=value'" ++ errcho -e " -f\texclude tests file: File containing list of test names / ++ regex patterns (with -R) to exclude (one per line)" ++ errcho -e " -R\tTreat test exclusions as regex patterns" ++ errcho -e " \tNote: the test names / patterns for -e and -f options ++ would be matched with the list of test names defined ++ in this script. They don't have fi_ prefix" ++ errcho -e " -N\tskip negative unit tests" ++ errcho -e " -p\tpath to test bins (default PATH)" ++ errcho -e " -c\tclient interface" ++ errcho -e " -s\tserver/host interface" ++ errcho -e " -u\tconfigure option for complex tests" ++ errcho -e " -T\ttimeout value in seconds" ++ errcho -e " -S\tStrict mode: -FI_ENODATA, -FI_ENOSYS errors would be treated as failures instead of skipped/notrun" ++ exit 1 ++} ++ ++while getopts ":vt:p:g:e:f:c:s:u:T:NRSkE:" opt; do ++case ${opt} in ++ t) TEST_TYPE=$OPTARG ++ ;; ++ v) VERBOSE+=1 ++ ;; ++ p) BIN_PATH="${OPTARG}/" ++ ;; ++ g) GOOD_ADDR=${OPTARG} ++ ;; ++ f) read_exclude_file ${OPTARG} ++ ;; ++ e) [[ -z "$EXCLUDE" ]] && EXCLUDE=${OPTARG} || EXCLUDE="${EXCLUDE},${OPTARG}" ++ ;; ++ c) C_INTERFACE=${OPTARG} ++ ;; ++ s) S_INTERFACE=${OPTARG} ++ ;; ++ u) COMPLEX_CFG=${OPTARG} ++ ;; ++ T) TIMEOUT_VAL=${OPTARG} ++ ;; ++ N) SKIP_NEG+=1 ++ ;; ++ R) REGEX=1 ++ ;; ++ S) STRICT_MODE=1 ++ ;; ++ k) FORK=1 ++ ;; ++ E) ++ delimiter="=" ++ value=${OPTARG#*$delimiter} ++ var=${OPTARG:0:$(( ${#OPTARG} - ${#value} - ${#delimiter} ))} ++ EXPORT_STRING="export $var=\"$value\"" ++ if [[ -z $EXPORT_ENV ]] ; then ++ EXPORT_ENV="$EXPORT_STRING ;" ++ else ++ EXPORT_ENV="$EXPORT_ENV $EXPORT_STRING ;" ++ fi ++ ;; ++ :|\?) usage ++ ;; ++esac ++ ++done ++ ++# base ssh command ++declare bssh="ssh -n -o StrictHostKeyChecking=no -o ConnectTimeout=2 -o BatchMode=yes" ++if [ -z "$(which timeout 2> /dev/null)" ]; then ++ # forego timeout ++ declare SERVER_CMD="eval" ++ declare CLIENT_CMD="eval" ++else ++ declare SERVER_CMD="eval timeout ${TIMEOUT_VAL}" ++ declare CLIENT_CMD="eval timeout ${TIMEOUT_VAL}" ++ bssh="timeout ${TIMEOUT_VAL} ${bssh}" ++fi ++ ++# shift past options ++shift $((OPTIND-1)) ++ ++if [[ $# -ge 4 ]]; then ++ usage ++fi ++ ++if [[ $# -ge 1 ]]; then ++ PROV=$1 ++fi ++ ++if [[ $# -ge 2 ]]; then ++ SERVER=$2 ++ SERVER_CMD="${bssh} ${SERVER}" ++fi ++ ++if [[ $# -ge 3 ]]; then ++ CLIENT=$3 ++ CLIENT_CMD="${bssh} ${CLIENT}" ++fi ++ ++[ -z $C_INTERFACE ] && C_INTERFACE=$CLIENT ++[ -z $S_INTERFACE ] && S_INTERFACE=$SERVER ++[ -z $GOOD_ADDR ] && GOOD_ADDR=$S_INTERFACE ++ ++main ${TEST_TYPE} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/toCSV.py b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/toCSV.py +new file mode 100755 +index 0000000..c3b095e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/toCSV.py +@@ -0,0 +1,37 @@ ++#!/usr/bin/env python ++ ++import sys ++import csv ++from optparse import OptionParser ++ ++try: ++ import yaml ++except ImportError: ++ print ("PyYAML library missing, try: yum install pyyaml") ++ sys.exit(1) ++ ++def main(argv=None): ++ """Convert runfabtests.sh yaml output to CSV. If no argument is given ++ stdin is read, otherwise read from file. ++ """ ++ ++ parser = OptionParser(description=main.__doc__, usage="usage: %prog [file]") ++ (options, args) = parser.parse_args() ++ ++ if len(args) == 0: ++ fd = sys.stdin ++ else: ++ fd = open(args[0], 'r') ++ ++ yi = yaml.load(fd.read()) ++ ++ csv_fd = csv.writer(sys.stdout, delimiter=",", quotechar='"', quoting=csv.QUOTE_NONNUMERIC) ++ csv_fd.writerow(["Test name", "Status"]) ++ ++ for k,v in yi.iteritems(): ++ csv_fd.writerow([k, v]) ++ ++ return 0 ++ ++if __name__ == "__main__": ++ sys.exit(main(sys.argv)) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/eq_cq.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/eq_cq.test +new file mode 100644 +index 0000000..6113eb9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/eq_cq.test +@@ -0,0 +1,132 @@ ++#: "Tests different wait objects for EQ and CQ across sockets and verbs providers" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/lat_bw.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/lat_bw.test +new file mode 100644 +index 0000000..cc184a2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/lat_bw.test +@@ -0,0 +1,79 @@ ++#: "Latency and bandwidth tests for all providers" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ FI_EP_MSG, ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/ofi_rxd.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/ofi_rxd.exclude +new file mode 100644 +index 0000000..a1fa91b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/ofi_rxd.exclude +@@ -0,0 +1,25 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++^msg|-e msg ++^dgram|-e dgram ++ ++# Exclude all prefix tests ++-k ++ ++# Exclude tests that use sread/polling until issues are resolved ++-S ++rdm_cntr_pingpong ++poll ++cq_data ++ ++# Exclude tests with unsupported capabilities ++rdm_tagged_peek ++cm_data ++trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++ ++# Exclude because it takes too long ++ubertest +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/udp.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/udp.test +new file mode 100644 +index 0000000..51c1112 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/udp.test +@@ -0,0 +1,26 @@ ++{ ++ prov_name: UDP;ofi_rxd, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/ofi_rxm.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/ofi_rxm.exclude +new file mode 100644 +index 0000000..15a9a62 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/ofi_rxm.exclude +@@ -0,0 +1,19 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude all prefix tests ++-k ++ ++^msg|-e msg ++^dgram|-e dgram ++ ++cm_data ++rdm_rma_simple ++trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++atomic ++ ++# Remove this once ubertest supports setting MR modes ++ubertest +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/all.test +new file mode 100644 +index 0000000..24a06be +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/all.test +@@ -0,0 +1,110 @@ ++#: "Suite of tests for the verbs provider" ++#: " ++# TODO ++# - Debug WRITEDATA, WRITEMSG, READMSG for RxM before enabling ++# - Test without FI_MR_LOCAL for RxM ++# - disable quick test for some configs (takes long time on some fabric) ++# - Adding more tests results in timeout in runfabtests.sh - fix the script" ++{ ++ prov_name: verbs;ofi_rxm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ progress: [FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO], ++}, ++{ ++ prov_name: verbs;ofi_rxm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ progress: [FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO], ++}, ++{ ++ prov_name: verbs;ofi_rxm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ progress: [FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO], ++ msg_flags: FI_REMOTE_CQ_DATA, ++}, ++{ ++ prov_name: verbs;ofi_rxm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ progress: [FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO], ++ test_flags: FT_FLAG_QUICKTEST, ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/exclude +new file mode 100644 +index 0000000..f30e593 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/exclude +@@ -0,0 +1,16 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude all prefix tests ++-k ++ ++^msg|-e msg ++^dgram|-e dgram ++ ++cm_data ++rdm_rma_simple ++trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++atomic +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/osx.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/osx.exclude +new file mode 100644 +index 0000000..3178270 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/osx.exclude +@@ -0,0 +1,5 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude msg_epoll test as OSX doesn't have epoll system call ++msg_epoll ++msg_sockets +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm/all.test +new file mode 100644 +index 0000000..a65a160 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm/all.test +@@ -0,0 +1,62 @@ ++{ ++ prov_name: psm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/all.test +new file mode 100644 +index 0000000..e573e60 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/all.test +@@ -0,0 +1,93 @@ ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/psm2.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/psm2.exclude +new file mode 100644 +index 0000000..1cee189 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/psm2.exclude +@@ -0,0 +1,15 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude all prefix tests ++-k ++ ++# av_test supports only FI_SOCKADDR ++av_test ++ ++^msg|-e msg ++ ++cm_data ++shared_ctx ++scalable_ep ++shared_av ++rdm_cntr_pingpong +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/verify.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/verify.test +new file mode 100644 +index 0000000..0e2328c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/verify.test +@@ -0,0 +1,246 @@ ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/all.test +new file mode 100644 +index 0000000..5487bbb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/all.test +@@ -0,0 +1,335 @@ ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_FETCH_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_SUM, ++ FI_LOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_FETCH_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_SUM, ++ FI_LOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/quick.test +new file mode 100644 +index 0000000..484b4aa +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/quick.test +@@ -0,0 +1,338 @@ ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_FETCH_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_SUM, ++ FI_LOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_FETCH_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_SUM, ++ FI_LOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_INT16, ++ FI_INT32, ++ FI_INT64, ++ FI_FLOAT, ++ FI_LONG_DOUBLE, ++ FI_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/shm.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/shm.exclude +new file mode 100644 +index 0000000..0c2fa91 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/shm.exclude +@@ -0,0 +1,22 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++^msg|-e msg ++^dgram|-e dgram ++ ++# Exclude tests that use sread/polling ++-S ++rdm_cntr_pingpong ++poll ++cq_data ++ ++# Exclude tests with unsupported capabilities ++-k ++rdm_tagged_peek ++cm_data ++trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++av_test ++rdm_rma_simple +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/verify.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/verify.test +new file mode 100644 +index 0000000..156c441 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/verify.test +@@ -0,0 +1,401 @@ ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/all.test +new file mode 100644 +index 0000000..31080aa +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/all.test +@@ -0,0 +1,102 @@ ++#: "Suite of tests for the sockets provider" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/complete.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/complete.test +new file mode 100644 +index 0000000..f4e7a6a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/complete.test +@@ -0,0 +1,495 @@ ++#: "Suite of tests for the sockets provider" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_CNTR, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cntr_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ rx_cq_bind_flags: [ ++ FI_SELECTIVE_COMPLETION, ++ ], ++ rx_op_flags: [ ++ FI_COMPLETION, ++ ], ++ msg_flags: [ ++ FI_COMPLETION, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ rx_cq_bind_flags: [ ++ FI_SELECTIVE_COMPLETION, ++ ], ++ msg_flags: [ ++ FI_COMPLETION, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ rx_cq_bind_flags: [ ++ FI_SELECTIVE_COMPLETION, ++ ], ++ rx_op_flags: [ ++ FI_COMPLETION, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ tx_cq_bind_flags: [ ++ FI_SELECTIVE_COMPLETION, ++ ], ++ msg_flags: [ ++ FI_COMPLETION, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/quick.test +new file mode 100644 +index 0000000..b913732 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/quick.test +@@ -0,0 +1,251 @@ ++#: "Suite of tests for the sockets provider" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_SUM, ++ FI_PROD, ++ ], ++ datatype:[ ++ FI_INT8, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/verify.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/verify.test +new file mode 100644 +index 0000000..79ad508 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/verify.test +@@ -0,0 +1,279 @@ ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ msg_flags: FI_REMOTE_CQ_DATA, ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ msg_flags: FI_REMOTE_CQ_DATA, ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/tcp/tcp.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/tcp/tcp.exclude +new file mode 100644 +index 0000000..d909078 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/tcp/tcp.exclude +@@ -0,0 +1,19 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++^dgram| -e dgram ++ ++rdm_rma_simple ++rdm_rma_trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++atomic ++inj_complete -e msg ++unexpected_msg -e msg ++ ++# TODO. Following fails with macOS. will fix them later ++cq_data -e rdm ++rdm_tagged_peek ++unexpected_msg -e rdm ++rdm_cntr_pingpong +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/all.test +new file mode 100644 +index 0000000..bb1c20b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/all.test +@@ -0,0 +1,40 @@ ++#: "Suite of tests for the udp provider" ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/functional.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/functional.test +new file mode 100644 +index 0000000..37d7af1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/functional.test +@@ -0,0 +1,32 @@ ++#: "Simple test for the udp provider" ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/lat_bw.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/lat_bw.test +new file mode 100644 +index 0000000..fca389d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/lat_bw.test +@@ -0,0 +1,27 @@ ++#: "Latency and bandwidth tests for the udp provider" ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/quick.test +new file mode 100644 +index 0000000..3a6ae21 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/quick.test +@@ -0,0 +1,41 @@ ++#: "Suite of tests for the udp provider" ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/udp.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/udp.exclude +new file mode 100644 +index 0000000..3d545a9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/udp.exclude +@@ -0,0 +1,16 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++^msg ++-e msg ++rdm ++poll ++av_test.* ++eq_test ++mr_test ++cm_data ++cq_data ++cntr_test ++scalable_ep ++shared_ctx ++unexpected_msg ++inj_complete +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/all.test +new file mode 100644 +index 0000000..958cc7e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/all.test +@@ -0,0 +1,40 @@ ++#: "Suite of tests for the usnic provider" ++{ ++ prov_name: usnic, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ FI_EP_MSG ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/quick.test +new file mode 100644 +index 0000000..9ca00af +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/quick.test +@@ -0,0 +1,41 @@ ++#: "Suite of tests for the usnic provider" ++{ ++ prov_name: usnic, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/all.test +new file mode 100644 +index 0000000..d5ec27b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/all.test +@@ -0,0 +1,151 @@ ++#: "Suite of tests for the verbs provider" ++#: " ++# TODO ++# - Disable INJECT, INJECTDATA for verbs until the failure is debugged ++# In pingpong test, we get a FLUSH error on recv CQ but no error on send ++# queue when we don't read send completions for ibv_post_sends." ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ msg_flags: FI_REMOTE_CQ_DATA, ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITEMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ msg_flags: FI_REMOTE_CQ_DATA, ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/exclude +new file mode 100644 +index 0000000..04bf7d7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/exclude +@@ -0,0 +1,18 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude all prefix tests ++-k ++ ++rdm ++dgram ++ ++trigger ++ ++# Verbs supports only shared receive context ++shared_ctx$|shared_ctx --no|shared_ctx -e msg$|shared_ctx -e msg --no-rx ++ ++scalable_ep ++multi_mr ++recv_cancel ++unexpected_msg ++inj_complete +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/quick.test +new file mode 100644 +index 0000000..a8f0a23 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/quick.test +@@ -0,0 +1,89 @@ ++#: "Suite of tests for the verbs provider" ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE ++ ], ++ mode: [ ++ FT_MODE_ALL ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE ++ ], ++ mode: [ ++ FT_MODE_ALL ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ mode: [ ++ FT_MODE_ALL ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/config.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/config.c +new file mode 100644 +index 0000000..96adee3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/config.c +@@ -0,0 +1,899 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++#include "jsmn.h" ++ ++ ++#define FT_CAP_MSG FI_MSG | FI_SEND | FI_RECV ++#define FT_CAP_TAGGED FI_TAGGED | FI_SEND | FI_RECV ++#define FT_CAP_RMA FI_RMA | FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE ++#define FT_CAP_ATOMIC FI_ATOMICS | FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE ++ ++#define FT_MODE_ALL FI_CONTEXT | FI_LOCAL_MR /*| FI_MSG_PREFIX*/ ++#define FT_MODE_NONE ~0ULL ++ ++struct key_t { ++ char *str; ++ size_t offset; ++ enum { VAL_STRING, VAL_NUM } val_type; ++ int val_size; ++}; ++ ++static struct ft_set test_sets_default[] = { ++ { ++ .prov_name = "sockets", ++ .test_type = { ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH ++ }, ++ .class_function = { ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG ++ }, ++ .ep_type = { ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ FI_EP_RDM ++ }, ++ .av_type = { ++ FI_AV_TABLE, ++ FI_AV_MAP ++ }, ++ .comp_type = { ++ FT_COMP_QUEUE ++ }, ++ .mode = { ++ FT_MODE_ALL ++ }, ++ .test_class = { ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++// FT_CAP_RMA, ++// FT_CAP_ATOMIC ++ }, ++ .test_flags = FT_FLAG_QUICKTEST ++ }, ++ { ++ .prov_name = "verbs", ++ .test_type = { ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH ++ }, ++ .class_function = { ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG ++ }, ++ .ep_type = { ++ FI_EP_MSG, ++ }, ++ .comp_type = { ++ FT_COMP_QUEUE ++ }, ++ .mode = { ++ FT_MODE_ALL ++ }, ++ .test_class = { ++ FT_CAP_MSG, ++ }, ++ .test_flags = FT_FLAG_QUICKTEST ++ }, ++}; ++ ++static struct ft_series test_series; ++ ++size_t sm_size_array[] = { ++ 1 << 0, ++ 1 << 1, ++ 1 << 2, (1 << 2) + (1 << 1), ++ 1 << 3, (1 << 3) + (1 << 2), ++ 1 << 4, (1 << 4) + (1 << 3), ++ 1 << 5, (1 << 5) + (1 << 4), ++ 1 << 6, (1 << 6) + (1 << 5), ++ 1 << 7, (1 << 7) + (1 << 6), ++ 1 << 8 ++}; ++const unsigned int sm_size_cnt = (sizeof sm_size_array / sizeof sm_size_array[0]); ++ ++size_t med_size_array[] = { ++ 1 << 4, ++ 1 << 5, ++ 1 << 6, ++ 1 << 7, (1 << 7) + (1 << 6), ++ 1 << 8, (1 << 8) + (1 << 7), ++ 1 << 9, (1 << 9) + (1 << 8), ++ 1 << 10, (1 << 10) + (1 << 9), ++ 1 << 11, (1 << 11) + (1 << 10), ++ 1 << 12, (1 << 12) + (1 << 11), ++ 1 << 13, (1 << 13) + (1 << 12), ++ 1 << 14 ++}; ++const unsigned int med_size_cnt = (sizeof med_size_array / sizeof med_size_array[0]); ++ ++size_t lg_size_array[] = { ++ 1 << 4, ++ 1 << 5, ++ 1 << 6, ++ 1 << 7, (1 << 7) + (1 << 6), ++ 1 << 8, (1 << 8) + (1 << 7), ++ 1 << 9, (1 << 9) + (1 << 8), ++ 1 << 10, (1 << 10) + (1 << 9), ++ 1 << 11, (1 << 11) + (1 << 10), ++ 1 << 12, (1 << 12) + (1 << 11), ++ 1 << 13, (1 << 13) + (1 << 12), ++ 1 << 14, (1 << 14) + (1 << 13), ++ 1 << 15, (1 << 15) + (1 << 14), ++ 1 << 16, (1 << 16) + (1 << 15), ++ 1 << 17, (1 << 17) + (1 << 16), ++ 1 << 18, (1 << 18) + (1 << 17), ++ 1 << 19, (1 << 19) + (1 << 18), ++ 1 << 20, (1 << 20) + (1 << 19), ++ 1 << 21, (1 << 21) + (1 << 20), ++ 1 << 22, (1 << 22) + (1 << 21), ++}; ++const unsigned int lg_size_cnt = (sizeof lg_size_array / sizeof lg_size_array[0]); ++ ++static struct key_t keys[] = { ++ { ++ .str = "node", ++ .offset = offsetof(struct ft_set, node), ++ .val_type = VAL_STRING, ++ }, ++ { ++ .str = "service", ++ .offset = offsetof(struct ft_set, service), ++ .val_type = VAL_STRING, ++ }, ++ { ++ .str = "prov_name", ++ .offset = offsetof(struct ft_set, prov_name), ++ .val_type = VAL_STRING, ++ }, ++ { ++ .str = "test_type", ++ .offset = offsetof(struct ft_set, test_type), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->test_type) / FT_MAX_TEST, ++ }, ++ { ++ .str = "class_function", ++ .offset = offsetof(struct ft_set, class_function), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->class_function) / FT_MAX_FUNCTIONS, ++ }, ++ { ++ .str = "ep_type", ++ .offset = offsetof(struct ft_set, ep_type), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->ep_type) / FT_MAX_EP_TYPES, ++ }, ++ { ++ .str = "av_type", ++ .offset = offsetof(struct ft_set, av_type), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->av_type) / FT_MAX_AV_TYPES, ++ }, ++ { ++ .str = "comp_type", ++ .offset = offsetof(struct ft_set, comp_type), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->comp_type) / FT_MAX_COMP, ++ }, ++ { ++ .str = "eq_wait_obj", ++ .offset = offsetof(struct ft_set, eq_wait_obj), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->eq_wait_obj) / FT_MAX_WAIT_OBJ, ++ }, ++ { ++ .str = "cq_wait_obj", ++ .offset = offsetof(struct ft_set, cq_wait_obj), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->cq_wait_obj) / FT_MAX_WAIT_OBJ, ++ }, ++ { ++ .str = "cntr_wait_obj", ++ .offset = offsetof(struct ft_set, cntr_wait_obj), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->cntr_wait_obj) / FT_MAX_WAIT_OBJ, ++ }, ++ { ++ .str = "op", ++ .offset = offsetof(struct ft_set, op), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->op) / FI_ATOMIC_OP_LAST, ++ }, ++ { ++ .str = "datatype", ++ .offset = offsetof(struct ft_set, datatype), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->datatype) / FI_DATATYPE_LAST, ++ }, ++ { ++ .str = "mode", ++ .offset = offsetof(struct ft_set, mode), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->mode) / FT_MAX_PROV_MODES, ++ }, ++ { ++ .str = "test_class", ++ .offset = offsetof(struct ft_set, test_class), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->test_class) / FT_MAX_CLASS, ++ }, ++ { ++ .str = "constant_caps", ++ .offset = offsetof(struct ft_set, constant_caps), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->constant_caps) / FT_MAX_CAPS, ++ }, ++ { ++ .str = "rx_cq_bind_flags", ++ .offset = offsetof(struct ft_set, rx_cq_bind_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->rx_cq_bind_flags) / FT_MAX_FLAGS, ++ }, ++ { ++ .str = "tx_cq_bind_flags", ++ .offset = offsetof(struct ft_set, tx_cq_bind_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->tx_cq_bind_flags) / FT_MAX_FLAGS, ++ }, ++ { ++ .str = "rx_op_flags", ++ .offset = offsetof(struct ft_set, rx_op_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->rx_op_flags) / FT_MAX_FLAGS, ++ }, ++ { ++ .str = "tx_op_flags", ++ .offset = offsetof(struct ft_set, tx_op_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->tx_op_flags) / FT_MAX_FLAGS, ++ }, ++ { ++ .str = "test_flags", ++ .offset = offsetof(struct ft_set, test_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->test_flags), ++ }, ++ { ++ .str = "msg_flags", ++ .offset = offsetof(struct ft_set, msg_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->msg_flags), ++ }, ++ { ++ .str = "mr_mode", ++ .offset = offsetof(struct ft_set, mr_mode), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->mr_mode) / FT_MAX_MR_MODES, ++ }, ++ { ++ .str = "progress", ++ .offset = offsetof(struct ft_set, progress), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->progress) / FT_MAX_PROGRESS, ++ } ++}; ++ ++static int ft_parse_num(char *str, int len, struct key_t *key, void *buf) ++{ ++ if (!strncmp(key->str, "test_type", strlen("test_type"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FT_TEST_LATENCY, enum ft_test_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_TEST_BANDWIDTH, enum ft_test_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_TEST_UNIT, enum ft_test_type, buf); ++ FT_ERR("Unknown test_type"); ++ } else if (!strncmp(key->str, "class_function", strlen("class_function"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_SEND, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_SENDV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_SENDMSG, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECT, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECTDATA, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_SENDDATA, enum ft_class_function, buf); ++ ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_WRITE, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_WRITEV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_WRITEMSG, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_WRITEDATA, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECT_WRITE, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECT_WRITEDATA, enum ft_class_function, buf); ++ ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_READ, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_READV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_READMSG, enum ft_class_function, buf); ++ ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_ATOMIC, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_ATOMICV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_ATOMICMSG, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECT_ATOMIC, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_FETCH_ATOMIC, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_FETCH_ATOMICV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_FETCH_ATOMICMSG, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_COMPARE_ATOMIC, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_COMPARE_ATOMICV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_COMPARE_ATOMICMSG, enum ft_class_function, buf); ++ ++ FT_ERR("Unknown class_function"); ++ } else if (!strncmp(key->str, "ep_type", strlen("ep_type"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_EP_MSG, enum fi_ep_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_EP_DGRAM, enum fi_ep_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_EP_RDM, enum fi_ep_type, buf); ++ FT_ERR("Unknown ep_type"); ++ } else if (!strncmp(key->str, "av_type", strlen("av_type"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_AV_MAP, enum fi_av_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_AV_TABLE, enum fi_av_type, buf); ++ FT_ERR("Unknown av_type"); ++ } else if (!strncmp(key->str, "test_class", strlen("test_class"))) { ++ TEST_SET_N_RETURN(str, len, "FT_CAP_MSG", FT_CAP_MSG, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_CAP_TAGGED", FT_CAP_TAGGED, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_CAP_RMA", FT_CAP_RMA, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_CAP_ATOMIC", FT_CAP_ATOMIC, uint64_t, buf); ++ FT_ERR("Unknown test class"); ++ } else if (!strncmp(key->str, "eq_wait_obj", strlen("eq_wait_obj")) || ++ !strncmp(key->str, "cq_wait_obj", strlen("cq_wait_obj")) || ++ !strncmp(key->str, "cntr_wait_obj", strlen("cntr_wait_obj"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WAIT_NONE, enum fi_wait_obj, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WAIT_UNSPEC, enum fi_wait_obj, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WAIT_FD, enum fi_wait_obj, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WAIT_MUTEX_COND, enum fi_wait_obj, buf); ++ FT_ERR("Unknown wait_obj"); ++ } else if (!strncmp(key->str, "op", strlen("op"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MIN, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MAX, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_SUM, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_PROD, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LOR, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LAND, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_BOR, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_BAND, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LXOR, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_BXOR, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_ATOMIC_READ, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_ATOMIC_WRITE, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_NE, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_LE, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_LT, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_GE, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_GT, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MSWAP, enum fi_op, buf); ++ FT_ERR("Unknown op"); ++ } else if (!strncmp(key->str, "datatype", strlen("datatype"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_INT8, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_UINT8, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_INT16, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_UINT16, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_INT32, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_UINT32, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_INT64, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_UINT64, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_FLOAT, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_DOUBLE, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_FLOAT_COMPLEX, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_DOUBLE_COMPLEX, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LONG_DOUBLE, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LONG_DOUBLE_COMPLEX, enum fi_datatype, buf); ++ FT_ERR("Unknown datatype"); ++ } else if (!strncmp(key->str, "msg_flags", strlen("msg_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_REMOTE_CQ_DATA, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown message flag"); ++ } else if (!strncmp(key->str, "mr_mode", strlen("mr_mode"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MR_LOCAL, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MR_VIRT_ADDR, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MR_ALLOCATED, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MR_PROV_KEY, uint64_t, buf); ++ FT_ERR("Unknown MR mode"); ++ } else if (!strncmp(key->str, "progress", strlen("progress"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_PROGRESS_MANUAL, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_PROGRESS_AUTO, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_PROGRESS_UNSPEC, uint64_t, buf); ++ FT_ERR("Unknown progress mode"); ++ } else if (!strncmp(key->str, "constant_caps", strlen("constant_caps"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_RMA, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MSG, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_SEND, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_RECV, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_READ, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WRITE, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_REMOTE_READ, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_REMOTE_WRITE, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_TAGGED, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_DIRECTED_RECV, uint64_t, buf); ++ FT_ERR("Unknown caps"); ++ } else if (!strncmp(key->str, "rx_cq_bind_flags", strlen("rx_cq_bind_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_SELECTIVE_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown rx_cq_bind_flags"); ++ } else if (!strncmp(key->str, "tx_cq_bind_flags", strlen("tx_cq_bind_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_SELECTIVE_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown tx_cq_bind_flags"); ++ } else if (!strncmp(key->str, "rx_op_flags", strlen("rx_op_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown rx_op_flags"); ++ } else if (!strncmp(key->str, "tx_op_flags", strlen("tx_op_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown tx_op_flags"); ++ } else { ++ TEST_ENUM_SET_N_RETURN(str, len, FT_COMP_QUEUE, enum ft_comp_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_COMP_CNTR, enum ft_comp_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_COMP_ALL, enum ft_comp_type, buf); ++ TEST_SET_N_RETURN(str, len, "FT_MODE_ALL", FT_MODE_ALL, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_MODE_NONE", FT_MODE_NONE, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_FLAG_QUICKTEST", FT_FLAG_QUICKTEST, uint64_t, buf); ++ FT_ERR("Unknown comp_type/mode/test_flags"); ++ } ++ ++ return -1; ++} ++ ++static int ft_parse_key_val(char *config, jsmntok_t *token, char *test_set) ++{ ++ int i, parsed = 0; ++ jsmntok_t *key_token = token; ++ jsmntok_t *val_token = token + 1; ++ struct key_t *key = NULL; ++ int size = 0; ++ ++ if (!strncmp(config + key_token->start, "#", 1)) { ++ parsed += 2; ++ return parsed; ++ } ++ ++ for (i = 0; i < sizeof(keys) / sizeof(keys[0]); i++) { ++ if (!strncmp(config + key_token->start, keys[i].str, strlen(keys[i].str))) { ++ key = &keys[i]; ++ parsed++; ++ break; ++ } ++ } ++ ++ if (!key) { ++ FT_ERR("Unknown key"); ++ return -1; ++ } ++ ++ switch(val_token->type) { ++ case JSMN_PRIMITIVE: ++ case JSMN_STRING: ++ size = 1; ++ break; ++ case JSMN_ARRAY: ++ size = val_token->size; ++ val_token++; ++ parsed++; ++ break; ++ default: ++ FT_ERR("[jsmn] Unknown token type"); ++ return -1; ++ } ++ ++ for (i = 0; i < size; i++) { ++ switch(key->val_type) { ++ case VAL_STRING: ++ memcpy(test_set + key->offset + key->val_size * i, ++ config + val_token[i].start, ++ val_token[i].end - val_token[i].start); ++ break; ++ case VAL_NUM: ++ if (ft_parse_num(config + val_token[i].start, ++ val_token[i].end - val_token[i].start, key, ++ test_set + key->offset + key->val_size * i) < 0) ++ return -1; ++ break; ++ default: ++ FT_ERR("Invalid key->val_type"); ++ return -1; ++ } ++ parsed++; ++ } ++ ++ return parsed; ++} ++ ++static int ft_parse_config(char *config, int size, ++ struct ft_set **test_sets_out, int *nsets) ++{ ++ struct ft_set *test_sets; ++ jsmn_parser parser; ++ jsmntok_t *tokens; ++ int num_tokens, num_tokens_parsed; ++ int i, ret, ts_count, ts_index; ++ ++ jsmn_init(&parser); ++ num_tokens = jsmn_parse(&parser, config, size, NULL, 0); ++ if (num_tokens <= 0) ++ return 1; ++ ++ tokens = malloc(sizeof(jsmntok_t) * num_tokens); ++ if (!tokens) ++ return 1; ++ ++ /* jsmn parser returns a list of JSON tokens (jsmntok_t) ++ * e.g. JSMN_OBJECT ++ * JSMN_STRING : ++ * JSMN_STRING : ++ * JSMN_STRING : ++ * JSMN_ARRAY : ++ * JSMN_STRING ++ * JSMN_STRING ++ * JSMN_STRING : ++ * JSMN_STRING : ++ * In our case, JSMN_OBJECT would represent a ft_set structure. The rest ++ * of the tokens would be treated as key-value pairs. The first JSMN_STRING ++ * would represent a key and the next would represent a value. A value ++ * can also be an array. jsmntok_t.size would represent the length of ++ * the array. ++ */ ++ jsmn_init(&parser); ++ ret = jsmn_parse(&parser, config, size, tokens, num_tokens); ++ if (ret < 0) { ++ switch (ret) { ++ case JSMN_ERROR_INVAL: ++ FT_ERR("[jsmn] bad token, JSON string is corrupted!"); ++ break; ++ case JSMN_ERROR_NOMEM: ++ FT_ERR("[jsmn] not enough tokens, JSON string is too large!"); ++ break; ++ case JSMN_ERROR_PART: ++ FT_ERR("[jsmn] JSON string is too short, expecting more JSON data!"); ++ break; ++ default: ++ FT_ERR("[jsmn] Unknown error!"); ++ break; ++ } ++ goto err1; ++ } ++ ++ if (ret != num_tokens) { ++ FT_ERR("[jsmn] Expected # of tokens: %d, Got: %d", num_tokens, ret); ++ goto err1; ++ } ++ ++ for (i = 0, ts_count = 0; i < num_tokens; i++) { ++ if (tokens[i].type == JSMN_OBJECT) ++ ts_count++; ++ } ++ ++ test_sets = calloc(ts_count, sizeof(struct ft_set)); ++ ++ for (i = 0, ts_index = -1; i < num_tokens;) { ++ switch (tokens[i].type) { ++ case JSMN_OBJECT: ++ ts_index++; ++ i++; ++ break; ++ case JSMN_PRIMITIVE: ++ case JSMN_STRING: ++ num_tokens_parsed = ft_parse_key_val(config, &tokens[i], ++ (char *)(test_sets + ts_index)); ++ if (num_tokens_parsed <= 0) { ++ FT_ERR("Error parsing config!"); ++ goto err2; ++ } ++ i += num_tokens_parsed; ++ break; ++ default: ++ FT_ERR("[jsmn] Unknown token!"); ++ goto err2; ++ } ++ } ++ ++ *test_sets_out = test_sets; ++ *nsets = ts_count; ++ ++ free(tokens); ++ return 0; ++err2: ++ free(test_sets); ++err1: ++ free(tokens); ++ return 1; ++} ++ ++struct ft_series *fts_load(char *filename) ++{ ++ int nsets = 0; ++ char *config; ++ FILE *fp; ++ ++ if (filename) { ++ int size; ++ struct ft_set *test_sets = NULL; ++ ++ fp = fopen(filename, "rb"); ++ if (!fp) { ++ FT_ERR("Unable to open config file: %s\n", filename); ++ return NULL; ++ } ++ ++ fseek(fp, 0, SEEK_END); ++ size = ftell(fp); ++ if (size < 0) { ++ FT_ERR("ftell error"); ++ goto err1; ++ } ++ fseek(fp, 0, SEEK_SET); ++ ++ config = malloc(size + 1); ++ if (!config) { ++ FT_ERR("Unable to allocate memory"); ++ goto err1; ++ } ++ ++ if (fread(config, size, 1, fp) != 1) { ++ FT_ERR("Error reading config file"); ++ goto err2; ++ } ++ ++ config[size] = 0; ++ ++ if (ft_parse_config(config, size, &test_sets, &nsets)) { ++ FT_ERR("Unable to parse file"); ++ goto err2; ++ } ++ ++ test_series.sets = test_sets; ++ test_series.nsets = nsets; ++ free(config); ++ fclose(fp); ++ } else { ++ printf("No config file given. Using default tests.\n"); ++ test_series.sets = test_sets_default; ++ test_series.nsets = sizeof(test_sets_default) / sizeof(test_sets_default[0]); ++ } ++ ++ for (fts_start(&test_series, 0); !fts_end(&test_series, 0); ++ fts_next(&test_series)) ++ test_series.test_count++; ++ fts_start(&test_series, 0); ++ ++ printf("Test configurations loaded: %d\n", test_series.test_count); ++ return &test_series; ++ ++err2: ++ free(config); ++err1: ++ fclose(fp); ++ return NULL; ++} ++ ++void fts_close(struct ft_series *series) ++{ ++ if (series->sets != test_sets_default) ++ free(series->sets); ++} ++ ++void fts_start(struct ft_series *series, int index) ++{ ++ series->cur_set = 0; ++ series->cur_type = 0; ++ series->cur_ep = 0; ++ series->cur_av = 0; ++ series->cur_comp = 0; ++ series->cur_eq_wait_obj = 0; ++ series->cur_cq_wait_obj = 0; ++ series->cur_cntr_wait_obj = 0; ++ series->cur_mode = 0; ++ series->cur_class = 0; ++ series->cur_progress = 0; ++ ++ series->test_index = 1; ++ if (index > 1) { ++ for (; !fts_end(series, index - 1); fts_next(series)) ++ ; ++ } ++} ++ ++int fts_info_is_valid(void) ++{ ++ if (test_info.msg_flags && !is_msg_func(test_info.class_function)) ++ return 0; ++ ++ if (test_info.rx_cq_bind_flags & FI_SELECTIVE_COMPLETION && ++ !(test_info.rx_op_flags & FI_COMPLETION) && ++ !(test_info.msg_flags & FI_COMPLETION)) ++ return 0; ++ ++ if (test_info.test_class & (FI_MSG | FI_TAGGED) && ++ !ft_check_rx_completion(test_info) && ++ !ft_use_comp_cntr(test_info.comp_type)) ++ return 0; ++ if (test_info.test_type == FT_TEST_UNIT && ++ test_info.ep_type == FI_EP_DGRAM) ++ return 0; ++ ++ return 1; ++} ++ ++void fts_next(struct ft_series *series) ++{ ++ struct ft_set *set; ++ ++ if (fts_end(series, 0)) ++ return; ++ ++ series->test_index++; ++ set = &series->sets[series->cur_set]; ++ ++ if (set->test_class[++series->cur_class]) ++ return; ++ series->cur_class = 0; ++ ++ if (set->mode[++series->cur_mode]) ++ return; ++ series->cur_mode = 0; ++ ++ if (set->class_function[++series->cur_func]) ++ return; ++ series->cur_func = 0; ++ ++ if (set->op[++series->cur_op]) ++ return; ++ series->cur_op = 0; ++ ++ if (set->datatype[++series->cur_datatype]) ++ return; ++ series->cur_datatype = 0; ++ ++ if (set->comp_type[++series->cur_comp]) ++ return; ++ series->cur_comp = 0; ++ ++ if (set->eq_wait_obj[++series->cur_eq_wait_obj]) ++ return; ++ series->cur_eq_wait_obj = 0; ++ ++ if (set->cq_wait_obj[++series->cur_cq_wait_obj]) ++ return; ++ series->cur_cq_wait_obj = 0; ++ ++ if (set->cntr_wait_obj[++series->cur_cntr_wait_obj]) ++ return; ++ series->cur_cntr_wait_obj = 0; ++ ++ if (set->ep_type[series->cur_ep] == FI_EP_RDM || ++ set->ep_type[series->cur_ep] == FI_EP_DGRAM) { ++ if (set->av_type[++series->cur_av]) ++ return; ++ } ++ series->cur_av = 0; ++ ++ if (set->ep_type[++series->cur_ep]) ++ return; ++ series->cur_ep = 0; ++ ++ if (set->test_type[++series->cur_type]) ++ return; ++ series->cur_type = 0; ++ ++ if (set->test_class[++series->cur_progress]) ++ return; ++ series->cur_progress = 0; ++ ++ series->cur_set++; ++} ++ ++int fts_end(struct ft_series *series, int index) ++{ ++ return (series->cur_set >= series->nsets) || ++ ((index > 0) && (series->test_index > index)); ++} ++ ++void fts_cur_info(struct ft_series *series, struct ft_info *info) ++{ ++ static struct ft_set *set; ++ int i = 0; ++ ++ memset(info, 0, sizeof *info); ++ if (series->cur_set >= series->nsets) ++ return; ++ ++ set = &series->sets[series->cur_set]; ++ info->test_type = set->test_type[series->cur_type]; ++ info->test_index = series->test_index; ++ info->class_function = set->class_function[series->cur_func]; ++ info->msg_flags = set->msg_flags; ++ info->op = set->op[series->cur_op]; ++ info->datatype = set->datatype[series->cur_datatype]; ++ info->test_flags = set->test_flags; ++ info->test_class = set->test_class[series->cur_class]; ++ info->progress = set->progress[series->cur_progress]; ++ ++ if (info->test_class) { ++ info->caps = set->test_class[series->cur_class]; ++ if (info->caps & (FT_CAP_RMA | FT_CAP_ATOMIC)) ++ info->caps |= FT_CAP_MSG; ++ } ++ ++ if (set->constant_caps[0]) { ++ i = 0; ++ while (set->constant_caps[i]) ++ info->caps |= set->constant_caps[i++]; ++ } ++ if (set->mr_mode[0]) { ++ i = 0; ++ while (set->mr_mode[i]) ++ info->mr_mode |= set->mr_mode[i++]; ++ } ++ if (set->rx_cq_bind_flags[0]) { ++ i = 0; ++ while (set->rx_cq_bind_flags[i]) ++ info->rx_cq_bind_flags |= set->rx_cq_bind_flags[i++]; ++ } ++ if (set->tx_cq_bind_flags[0]) { ++ i = 0; ++ while (set->tx_cq_bind_flags[i]) ++ info->tx_cq_bind_flags |= set->tx_cq_bind_flags[i++]; ++ } ++ if (set->rx_op_flags[0]) { ++ i = 0; ++ while (set->rx_op_flags[i]) ++ info->rx_op_flags |= set->rx_op_flags[i++]; ++ } ++ if (set->tx_op_flags[0]) { ++ i = 0; ++ while (set->tx_op_flags[i]) ++ info->tx_op_flags |= set->tx_op_flags[i++]; ++ } ++ ++ info->mode = (set->mode[series->cur_mode] == FT_MODE_NONE) ? ++ 0 : set->mode[series->cur_mode]; ++ ++ info->ep_type = set->ep_type[series->cur_ep]; ++ info->av_type = set->av_type[series->cur_av]; ++ if (set->comp_type[0]) ++ info->comp_type = set->comp_type[series->cur_comp]; ++ else ++ info->comp_type = FT_COMP_QUEUE; ++ ++ if (info->caps & (FT_CAP_RMA | FT_CAP_ATOMIC) && ++ (ft_use_comp_cntr(info->comp_type))) ++ info->caps |= FI_RMA_EVENT; ++ info->eq_wait_obj = set->eq_wait_obj[series->cur_eq_wait_obj]; ++ info->cntr_wait_obj = set->cntr_wait_obj[series->cur_cntr_wait_obj]; ++ ++ if (set->node[0]) ++ strncpy(info->node, set->node, sizeof(info->node) - 1); ++ else if (opts.dst_addr) ++ strncpy(info->node, opts.dst_addr, sizeof(info->node) - 1); ++ if (set->service[0]) ++ strncpy(info->service, set->service, sizeof(info->service) - 1); ++ else if (opts.dst_port) ++ strncpy(info->service, opts.dst_port, sizeof(info->service) - 1); ++ strncpy(info->prov_name, set->prov_name, sizeof(info->prov_name) - 1); ++ ++ info->node[sizeof(info->node) - 1] = '\0'; ++ info->service[sizeof(info->service) - 1] = '\0'; ++ info->prov_name[sizeof(info->prov_name) - 1] = '\0'; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/connect.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/connect.c +new file mode 100644 +index 0000000..a86b576 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/connect.c +@@ -0,0 +1,122 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++static int ft_accept(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ rd = ft_get_event(&event, &entry, sizeof entry, ++ FI_CONNREQ, sizeof entry); ++ if (rd < 0) ++ return (int) rd; ++ ++ fabric_info = entry.info; ++ ret = ft_open_active(); ++ if (ret) ++ return ret; ++ ++ ret = fi_accept(ep, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ return ret; ++ } ++ ++ rd = ft_get_event(&event, &entry, sizeof entry, ++ FI_CONNECTED, sizeof entry); ++ if (rd < 0) ++ return (int) rd; ++ ++ return 0; ++} ++ ++static int ft_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ ret = fi_connect(ep, fabric_info->dest_addr, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ rd = ft_get_event(&event, &entry, sizeof entry, ++ FI_CONNECTED, sizeof entry); ++ if (rd < 0) ++ return (int) rd; ++ ++ return 0; ++} ++ ++static int ft_load_av(void) ++{ ++ struct ft_msg msg; ++ size_t len; ++ int ret; ++ ++ memset(&msg, 0, sizeof(struct ft_msg)); ++ len = sizeof(msg.data); ++ ret = fi_getname(&ep->fid, msg.data, &len); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ msg.len = (uint32_t) len; ++ ret = ft_sock_send(sock, &msg, sizeof msg); ++ if (ret) ++ return ret; ++ ++ ret = ft_sock_recv(sock, &msg, sizeof msg); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av, msg.data, 1, &ft_tx_ctrl.addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_enable_comm(void) ++{ ++ if (test_info.ep_type == FI_EP_MSG) ++ return pep ? ft_accept() : ft_connect(); ++ else ++ return ft_load_av(); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/cq.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/cq.c +new file mode 100644 +index 0000000..ebdfa0d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/cq.c +@@ -0,0 +1,390 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++ ++static size_t comp_entry_cnt[] = { ++ [FI_CQ_FORMAT_UNSPEC] = 0, ++ [FI_CQ_FORMAT_CONTEXT] = FT_COMP_BUF_SIZE / sizeof(struct fi_cq_entry), ++ [FI_CQ_FORMAT_MSG] = FT_COMP_BUF_SIZE / sizeof(struct fi_cq_msg_entry), ++ [FI_CQ_FORMAT_DATA] = FT_COMP_BUF_SIZE / sizeof(struct fi_cq_data_entry), ++ [FI_CQ_FORMAT_TAGGED] = FT_COMP_BUF_SIZE / sizeof(struct fi_cq_tagged_entry) ++}; ++ ++/* ++static size_t comp_entry_size[] = { ++ [FI_CQ_FORMAT_UNSPEC] = 0, ++ [FI_CQ_FORMAT_CONTEXT] = sizeof(struct fi_cq_entry), ++ [FI_CQ_FORMAT_MSG] = sizeof(struct fi_cq_msg_entry), ++ [FI_CQ_FORMAT_DATA] = sizeof(struct fi_cq_data_entry), ++ [FI_CQ_FORMAT_TAGGED] = sizeof(struct fi_cq_tagged_entry) ++}; ++*/ ++ ++int ft_use_comp_cntr(enum ft_comp_type comp_type) ++{ ++ if ((comp_type == FT_COMP_CNTR) || ++ (comp_type == FT_COMP_ALL)) ++ return 1; ++ ++ return 0; ++} ++ ++int ft_use_comp_cq(enum ft_comp_type comp_type) ++{ ++ if ((comp_type == FT_COMP_QUEUE) || ++ (comp_type == FT_COMP_ALL)) ++ return 1; ++ ++ return 0; ++} ++ ++int ft_generates_rx_comp(void) ++{ ++ if (is_data_func(test_info.class_function) || ++ (is_msg_func(test_info.class_function) && ++ test_info.msg_flags & FI_REMOTE_CQ_DATA)) ++ return 1; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) ++ return 0; ++ ++ if (!(test_info.rx_cq_bind_flags & FI_SELECTIVE_COMPLETION)) ++ return 1; ++ if (test_info.rx_op_flags & FI_COMPLETION) { ++ if (is_msg_func(test_info.class_function) && ++ !(test_info.msg_flags & FI_COMPLETION)) ++ return 0; ++ return 1; ++ } ++ if (is_msg_func(test_info.class_function) && ++ test_info.msg_flags & FI_COMPLETION) ++ return 1; ++ return 0; ++} ++ ++int ft_generates_tx_comp(void) ++{ ++ if (!(test_info.tx_cq_bind_flags & FI_SELECTIVE_COMPLETION)) { ++ if (is_inject_func(test_info.class_function)) ++ return 0; ++ return 1; ++ } ++ ++ if (test_info.tx_op_flags & FI_COMPLETION) { ++ if (is_msg_func(test_info.class_function) && ++ !(test_info.msg_flags & FI_COMPLETION)) ++ return 0; ++ return 1; ++ } ++ ++ if (test_info.msg_flags & FI_COMPLETION) ++ return 1; ++ ++ return 0; ++} ++ ++int ft_check_rx_completion(void) ++{ ++ if (ft_use_comp_cntr(test_info.comp_type) || ++ ft_generates_rx_comp()) ++ return 1; ++ else ++ return 0; ++} ++ ++int ft_check_tx_completion(void) ++{ ++ if (ft_use_comp_cntr(test_info.comp_type) || ++ ft_generates_tx_comp()) ++ return 1; ++ else ++ return 0; ++} ++ ++static int ft_open_cntrs(void) ++{ ++ struct fi_cntr_attr attr; ++ int ret; ++ ++ if (!txcntr) { ++ memset(&attr, 0, sizeof attr); ++ attr.wait_obj = test_info.cntr_wait_obj; ++ ret = fi_cntr_open(domain, &attr, &txcntr, &txcntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ } ++ if (!rxcntr) { ++ memset(&attr, 0, sizeof attr); ++ attr.wait_obj = test_info.cntr_wait_obj; ++ ret = fi_cntr_open(domain, &attr, &rxcntr, &rxcntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++static int ft_open_cqs(void) ++{ ++ struct fi_cq_attr attr; ++ int ret; ++ ++ if (!txcq) { ++ memset(&attr, 0, sizeof attr); ++ attr.format = ft_tx_ctrl.cq_format; ++ attr.wait_obj = test_info.cq_wait_obj; ++ attr.size = ft_tx_ctrl.max_credits; ++ ++ ret = fi_cq_open(domain, &attr, &txcq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ if (!rxcq) { ++ memset(&attr, 0, sizeof attr); ++ attr.format = ft_rx_ctrl.cq_format; ++ attr.wait_obj = test_info.cq_wait_obj; ++ attr.size = ft_rx_ctrl.max_credits; ++ ++ ret = fi_cq_open(domain, &attr, &rxcq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++int ft_open_comp(void) ++{ ++ int ret; ++ ++ ret = ft_open_cqs(); ++ if (ret) ++ return ret; ++ ++ switch (test_info.comp_type) { ++ case FT_COMP_QUEUE: ++ break; ++ case FT_COMP_ALL: ++ case FT_COMP_CNTR: ++ ret = ft_open_cntrs(); ++ break; ++ default: ++ ret = -FI_ENOSYS; ++ } ++ ++ return ret; ++} ++ ++int ft_bind_comp(struct fid_ep *ep) ++{ ++ int ret; ++ uint64_t flags; ++ ++ flags = FI_TRANSMIT | test_info.tx_cq_bind_flags; ++ ret = fi_ep_bind(ep, &txcq->fid, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) { ++ flags = FI_TRANSMIT | FI_READ | FI_WRITE; ++ ret = fi_ep_bind(ep, &txcntr->fid, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ } ++ ++ flags = FI_RECV | test_info.rx_cq_bind_flags; ++ ret = fi_ep_bind(ep, &rxcq->fid, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) { ++ flags = FI_RECV | FI_REMOTE_READ | FI_REMOTE_WRITE; ++ ret = fi_ep_bind(ep, &rxcntr->fid, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++/* Read CQ until there are no more completions */ ++#define ft_cq_read(cq_read, cq, buf, count, completions, str, ret, verify,...) \ ++ do { \ ++ ret = cq_read(cq, buf, count, ##__VA_ARGS__); \ ++ if (ret < 0) { \ ++ if (ret == -FI_EAGAIN) \ ++ break; \ ++ if (ret == -FI_EAVAIL) { \ ++ ret = ft_cq_readerr(cq); \ ++ } else { \ ++ FT_PRINTERR(#cq_read, ret); \ ++ } \ ++ return ret; \ ++ } else { \ ++ completions += ret; \ ++ if (verify) \ ++ ft_verify_comp(buf); \ ++ } \ ++ } while (ret == count) ++ ++static int ft_comp_x(struct fid_cq *cq, struct ft_xcontrol *ft_x, ++ const char *x_str, int timeout) ++{ ++ uint8_t buf[FT_COMP_BUF_SIZE], start = 0; ++ struct timespec s, e; ++ int poll_time = 0; ++ int ret, verify = (test_info.test_type == FT_TEST_UNIT && cq == rxcq); ++ size_t cur_credits = ft_x->credits; ++ ++ switch(test_info.cq_wait_obj) { ++ case FI_WAIT_NONE: ++ do { ++ if (!start) { ++ clock_gettime(CLOCK_MONOTONIC, &s); ++ start = 1; ++ } ++ ++ ft_cq_read(fi_cq_read, cq, buf, comp_entry_cnt[ft_x->cq_format], ++ ft_x->credits, x_str, ret, verify); ++ ++ clock_gettime(CLOCK_MONOTONIC, &e); ++ poll_time = get_elapsed(&s, &e, MILLI); ++ } while (ret == -FI_EAGAIN && poll_time < timeout && ++ ft_x->credits == cur_credits); ++ ++ if (ft_x->credits != cur_credits) ++ ret = 0; ++ ++ break; ++ case FI_WAIT_UNSPEC: ++ case FI_WAIT_FD: ++ case FI_WAIT_MUTEX_COND: ++ ft_cq_read(fi_cq_sread, cq, buf, comp_entry_cnt[ft_x->cq_format], ++ ft_x->credits, x_str, ret, verify, NULL, timeout); ++ break; ++ case FI_WAIT_SET: ++ FT_ERR("fi_ubertest: Unsupported cq wait object"); ++ return -1; ++ default: ++ FT_ERR("Unknown cq wait object"); ++ return -1; ++ } ++ ++ return (ret == -FI_EAGAIN && timeout) ? ret : 0; ++} ++ ++static int ft_cntr_x(struct fid_cntr *cntr, struct ft_xcontrol *ft_x, ++ int timeout) ++{ ++ uint64_t cntr_val; ++ struct timespec s, e; ++ int poll_time = clock_gettime(CLOCK_MONOTONIC, &s); ++ ++ do { ++ cntr_val = fi_cntr_read(cntr); ++ clock_gettime(CLOCK_MONOTONIC, &e); ++ poll_time = get_elapsed(&s, &e, MILLI); ++ } while (cntr_val == ft_x->total_comp && poll_time < timeout); ++ ++ ft_x->credits += (cntr_val - ft_x->total_comp); ++ ft_x->total_comp = cntr_val; ++ ++ return 0; ++} ++ ++int ft_comp_rx(int timeout) ++{ ++ int ret; ++ size_t cur_credits = ft_rx_ctrl.credits; ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) { ++ ret = ft_cntr_x(rxcntr, &ft_rx_ctrl, timeout); ++ if (ret) ++ return ret; ++ } ++ if (ft_use_comp_cq(test_info.comp_type)) { ++ if (test_info.comp_type == FT_COMP_ALL) ++ ft_rx_ctrl.credits = cur_credits; ++ ret = ft_comp_x(rxcq, &ft_rx_ctrl, "rxcq", timeout); ++ if (ret) ++ return ret; ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) ++ ft_rx_ctrl.credits = cur_credits; ++ } ++ assert(ft_rx_ctrl.credits <= ft_rx_ctrl.max_credits); ++ ++ return 0; ++} ++ ++int ft_comp_tx(int timeout) ++{ ++ int ret; ++ size_t cur_credits = ft_tx_ctrl.credits; ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) { ++ ret = ft_cntr_x(txcntr, &ft_tx_ctrl, timeout); ++ if (ret) ++ return ret; ++ } ++ ++ if (ft_use_comp_cq(test_info.comp_type)) { ++ if (test_info.comp_type == FT_COMP_ALL) ++ ft_tx_ctrl.credits = cur_credits; ++ ret = ft_comp_x(txcq, &ft_tx_ctrl, "txcq", timeout); ++ if (ret) ++ return ret; ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) ++ ft_tx_ctrl.credits = cur_credits; ++ } ++ assert(ft_tx_ctrl.credits <= ft_tx_ctrl.max_credits); ++ ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/domain.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/domain.c +new file mode 100644 +index 0000000..f724848 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/domain.c +@@ -0,0 +1,354 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++ ++static int ft_open_fabric(void) ++{ ++ int ret; ++ ++ if (fabric) { ++ if (fabric_info->fabric_attr->fabric && ++ fabric_info->fabric_attr->fabric != fabric) { ++ printf("Opened fabric / fabric_attr mismatch\n"); ++ return -FI_EOTHER; ++ } ++ return 0; ++ } ++ ++ ret = fi_fabric(fabric_info->fabric_attr, &fabric, NULL); ++ if (ret) ++ FT_PRINTERR("fi_fabric", ret); ++ ++ return ret; ++} ++ ++static int ft_open_eq(void) ++{ ++ struct fi_eq_attr attr; ++ int ret; ++ ++ if (eq) ++ return 0; ++ ++ memset(&attr, 0, sizeof attr); ++ attr.wait_obj = test_info.eq_wait_obj; ++ ret = fi_eq_open(fabric, &attr, &eq, NULL); ++ if (ret) ++ FT_PRINTERR("fi_eq_open", ret); ++ ++ return ret; ++} ++ ++int ft_eq_readerr(void) ++{ ++ struct fi_eq_err_entry err; ++ ssize_t ret; ++ ++ memset(&err, 0, sizeof(err)); ++ ret = fi_eq_readerr(eq, &err, 0); ++ if (ret != sizeof(err)) { ++ FT_PRINTERR("fi_eq_readerr", ret); ++ return ret; ++ } else { ++ fprintf(stderr, "Error event %d %s\n", ++ err.err, fi_strerror(err.err)); ++ return err.err; ++ } ++} ++ ++ssize_t ft_get_event(uint32_t *event, void *buf, size_t len, ++ uint32_t event_check, size_t len_check) ++{ ++ ssize_t ret; ++ ++ switch(test_info.eq_wait_obj) { ++ case FI_WAIT_NONE: ++ do { ++ ret = fi_eq_read(eq, event, buf, len, 0); ++ if (ret == -FI_EAVAIL) { ++ return ft_eq_readerr(); ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ FT_PRINTERR("fi_eq_read", ret); ++ return ret; ++ } ++ } while (ret == -FI_EAGAIN); ++ break; ++ case FI_WAIT_UNSPEC: ++ case FI_WAIT_FD: ++ case FI_WAIT_MUTEX_COND: ++ ret = fi_eq_sread(eq, event, buf, len, FT_SREAD_TO, 0); ++ if (ret == -FI_EAVAIL) { ++ return ft_eq_readerr(); ++ } else if (ret < 0) { ++ FT_PRINTERR("fi_eq_sread", ret); ++ return ret; ++ } ++ break; ++ case FI_WAIT_SET: ++ FT_ERR("fi_ubertest: Unsupported eq wait object"); ++ return -1; ++ default: ++ FT_ERR("Unknown eq wait object"); ++ return -1; ++ } ++ ++ if (event_check && event_check != *event) { ++ fprintf(stderr, "Unexpected event %d, wanted %d\n", ++ *event, event_check); ++ return -FI_ENOMSG; ++ ++ } ++ ++ if (ret < len_check) { ++ fprintf(stderr, "Reported event too small\n"); ++ return -FI_ETOOSMALL; ++ } ++ ++ return ret; ++} ++ ++static int ft_open_domain(void) ++{ ++ int ret; ++ ++ if (domain) { ++ if (fabric_info->domain_attr->domain && ++ fabric_info->domain_attr->domain != domain) { ++ fprintf(stderr, "Opened domain / domain_attr mismatch\n"); ++ return -FI_EDOMAIN; ++ } ++ return 0; ++ } ++ ++ ret = fi_domain(fabric, fabric_info, &domain, NULL); ++ if (ret) ++ FT_PRINTERR("fi_domain", ret); ++ ++ return ret; ++} ++ ++static int ft_open_av(void) ++{ ++ struct fi_av_attr attr; ++ int ret; ++ ++ if (av) ++ return 0; ++ ++ memset(&attr, 0, sizeof attr); ++ attr.type = test_info.av_type; ++ attr.count = 2; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_av_open", ret); ++ return ret; ++ } ++ ++ return ret; ++} ++ ++static int ft_setup_xcontrol_bufs(struct ft_xcontrol *ctrl) ++{ ++ size_t size; ++ int i, ret; ++ ++ size = ft_ctrl.size_array[ft_ctrl.size_cnt - 1]; ++ if (!ctrl->buf) { ++ ctrl->buf = calloc(1, size); ++ ctrl->cpy_buf = calloc(1, size); ++ if (!ctrl->buf || !ctrl->cpy_buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->buf, 0, size); ++ } ++ ++ if ((fabric_info->domain_attr->mr_mode & FI_MR_LOCAL) && !ctrl->mr) { ++ ret = fi_mr_reg(domain, ctrl->buf, size, ++ ft_info_to_mr_access(fabric_info), ++ 0, 0, 0, &ctrl->mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ctrl->memdesc = fi_mr_desc(ctrl->mr); ++ } ++ ++ for (i = 0; i < ft_ctrl.iov_cnt; i++) ++ ctrl->iov_desc[i] = ctrl->memdesc; ++ ++ return 0; ++} ++ ++static int ft_setup_atomic_control(struct ft_atomic_control *ctrl) ++{ ++ size_t size; ++ int ret = 0; ++ uint64_t access; ++ ++ size = ft_ctrl.size_array[ft_ctrl.size_cnt - 1]; ++ if (!ctrl->res_buf) { ++ ctrl->res_buf = calloc(1, size); ++ if (!ctrl->res_buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->res_buf, 0, size); ++ } ++ ++ if (!ctrl->comp_buf) { ++ ctrl->comp_buf = calloc(1, size); ++ if (!ctrl->comp_buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->comp_buf, 0, size); ++ } ++ ++ if (!ctrl->orig_buf) { ++ ctrl->orig_buf = calloc(1, size); ++ if (!ctrl->orig_buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->orig_buf, 0, size); ++ } ++ ++ if (fabric_info->domain_attr->mr_mode & FI_MR_LOCAL) { ++ access = FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE; ++ if (!ctrl->res_mr) { ++ ret = fi_mr_reg(domain, ctrl->res_buf, size, access, ++ 0, 0, 0, &ctrl->res_mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ctrl->res_memdesc = fi_mr_desc(ctrl->res_mr); ++ } ++ ++ if (!ctrl->comp_mr) { ++ ret = fi_mr_reg(domain, ctrl->comp_buf, size, access, ++ 0, 0, 0, &ctrl->comp_mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ctrl->comp_memdesc = fi_mr_desc(ctrl->comp_mr); ++ } ++ } ++ ft_atom_ctrl.op = test_info.op; ++ ft_atom_ctrl.datatype = test_info.datatype; ++ ++ return ret; ++} ++ ++static int ft_setup_mr_control(struct ft_mr_control *ctrl) ++{ ++ size_t size; ++ int ret; ++ uint64_t access; ++ ++ if (!(fabric_info->caps & (FI_RMA | FI_ATOMIC))) ++ return 0; ++ ++ size = ft_ctrl.size_array[ft_ctrl.size_cnt - 1]; ++ if (!ctrl->buf) { ++ ctrl->buf = calloc(1, size); ++ if (!ctrl->buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->buf, 0, size); ++ } ++ ++ if (!ctrl->mr) { ++ access = FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE; ++ ret = fi_mr_reg(domain, ctrl->buf, size, access, 0, ++ FT_MR_KEY, 0, &ctrl->mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ctrl->memdesc = fi_mr_desc(ctrl->mr); ++ ctrl->peer_mr_key = ctrl->mr_key = fi_mr_key(ctrl->mr); ++ } ++ ++ return 0; ++} ++ ++static int ft_setup_bufs(void) ++{ ++ int ret; ++ ++ ret = ft_setup_xcontrol_bufs(&ft_rx_ctrl); ++ if (ret) ++ return ret; ++ ++ ret = ft_setup_xcontrol_bufs(&ft_tx_ctrl); ++ if (ret) ++ return ret; ++ ++ ret = ft_setup_mr_control(&ft_mr_ctrl); ++ if (ret) ++ return ret; ++ ++ ret = ft_setup_atomic_control(&ft_atom_ctrl); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_open_control(void) ++{ ++ int ret; ++ ++ ret = ft_open_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_eq(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_domain(); ++ if (ret) ++ return ret; ++ ++ ret = ft_setup_bufs(); ++ if (ret) ++ return ret; ++ ++ if (test_info.ep_type != FI_EP_MSG) { ++ ret = ft_open_av(); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ep.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ep.c +new file mode 100644 +index 0000000..91610a6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ep.c +@@ -0,0 +1,140 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++ ++//struct fid_stx *stx; ++//struct fid_sep *sep; ++ ++ ++int ft_open_passive(void) ++{ ++ int ret; ++ ++ if (pep) ++ return 0; ++ ++ ret = fi_passive_ep(fabric, fabric_info, &pep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_passive_ep", ret); ++ return ret; ++ } ++ ++ ret = fi_pep_bind(pep, &eq->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_pep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_listen(pep); ++ if (ret) { ++ FT_PRINTERR("fi_listen", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_open_active(void) ++{ ++ int ret; ++ ++ if (ep) ++ return 0; ++ ++ ret = ft_open_control(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_comp(); ++ if (ret) ++ return ret; ++ ++ ret = fi_endpoint(domain, fabric_info, &ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ft_rx_ctrl.ep = ep; ++ ft_tx_ctrl.ep = ep; ++ ++ if (test_info.ep_type == FI_EP_MSG) { ++ ret = fi_ep_bind(ep, &eq->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ } ++ ++ ret = ft_bind_comp(ep); ++ if (ret) ++ return ret; ++ ++ if (test_info.ep_type != FI_EP_MSG) { ++ ret = fi_ep_bind(ep, &av->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ } ++ ++ ret = fi_enable(ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_reset_ep(void) ++{ ++ int ret; ++ ++ ret = ft_comp_rx(0); ++ if (ret) ++ return ret; ++ ++ while (ft_tx_ctrl.credits < ft_tx_ctrl.max_credits) { ++ ret = ft_comp_tx(0); ++ if (ret) ++ return ret; ++ } ++ ++ memset(ft_tx_ctrl.buf, 0, ft_tx_ctrl.msg_size); ++ memset(ft_rx_ctrl.buf, 0, ft_rx_ctrl.msg_size); ++ ft_tx_ctrl.seqno = 0; ++ ft_rx_ctrl.seqno = 0; ++ ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/fabtest.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/fabtest.h +new file mode 100644 +index 0000000..1ef737a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/fabtest.h +@@ -0,0 +1,380 @@ ++/* ++ * Copyright (c) 2015-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTEST_H_ ++#define _FABTEST_H_ ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* Timeouts in milliseconds */ ++#define FT_SREAD_TO 10000 ++#define FT_COMP_TO 10000 ++#define FT_DGRAM_POLL_TO 1 ++ ++extern int listen_sock, sock; ++ ++//extern struct fid_wait *waitset; ++//extern struct fid_poll *pollset; ++//extern struct fid_stx *stx; ++//extern struct fid_sep *sep; ++ ++extern struct ft_info test_info; ++extern struct fi_info *fabric_info; ++ ++extern size_t sm_size_array[]; ++extern size_t med_size_array[]; ++extern size_t lg_size_array[]; ++extern size_t size_array[]; ++extern const unsigned int sm_size_cnt; ++extern const unsigned int med_size_cnt; ++extern const unsigned int lg_size_cnt; ++ ++struct ft_xcontrol { ++ struct fid_ep *ep; ++ void *buf; ++ void *cpy_buf; ++ struct fid_mr *mr; ++ void *memdesc; ++ struct iovec *iov; ++ void **iov_desc; ++ int iov_iter; ++ size_t msg_size; ++ size_t rma_msg_size; ++ size_t credits; ++ size_t max_credits; ++ fi_addr_t addr; ++ uint64_t tag; ++ uint8_t seqno; ++ uint64_t total_comp; ++ enum fi_cq_format cq_format; ++ uint64_t remote_cq_data; ++ struct fi_context *ctx; ++ int curr_ctx; ++}; ++ ++struct ft_atomic_control { ++ void *orig_buf; ++ void *res_buf; ++ struct fid_mr *res_mr; ++ void *res_memdesc; ++ void *comp_buf; ++ struct fid_mr *comp_mr; ++ void *comp_memdesc; ++ struct fi_ioc *ioc; ++ struct fi_ioc *res_ioc; ++ struct fi_ioc *comp_ioc; ++ enum fi_op op; ++ enum fi_datatype datatype; ++ size_t count; ++ size_t datatype_size; ++}; ++ ++struct ft_mr_control { ++ void *buf; ++ struct fid_mr *mr; ++ void *memdesc; ++ uint64_t mr_key; ++ uint64_t peer_mr_addr; ++ uint64_t peer_mr_key; ++}; ++ ++struct ft_control { ++ size_t *size_array; ++ int size_cnt; ++ size_t *iov_array; ++ int iov_cnt; ++ int inc_step; ++ int xfer_iter; ++ int verify_cnt; ++ int error; ++}; ++ ++extern struct ft_xcontrol ft_rx_ctrl, ft_tx_ctrl; ++extern struct ft_mr_control ft_mr_ctrl; ++extern struct ft_control ft_ctrl; ++extern struct ft_atomic_control ft_atom_ctrl; ++ ++enum { ++ FT_MAX_CAPS = 64, ++ FT_MAX_CLASS = 4, ++ FT_MAX_EP_TYPES = 8, ++ FT_MAX_AV_TYPES = 3, ++ FT_MAX_PROV_MODES = 4, ++ FT_MAX_WAIT_OBJ = 5, ++ FT_MAX_MR_MODES = 11, ++ FT_DEFAULT_CREDITS = 128, ++ FT_COMP_BUF_SIZE = 256, ++ FT_MAX_FLAGS = 64, ++ FT_MAX_PROGRESS = 3, ++}; ++ ++enum ft_comp_type { ++ FT_COMP_UNSPEC, ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ FT_COMP_ALL, ++ FT_MAX_COMP ++}; ++ ++enum ft_test_type { ++ FT_TEST_UNSPEC, ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ FT_TEST_UNIT, ++ FT_MAX_TEST ++}; ++ ++enum ft_class_function { ++ FT_FUNC_UNSPEC, ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ FT_MAX_FUNCTIONS ++}; ++ ++#define FT_FLAG_QUICKTEST (1ULL << 0) ++ ++#define is_inject_func(x) (x == FT_FUNC_INJECT || \ ++ x == FT_FUNC_INJECTDATA || \ ++ x == FT_FUNC_INJECT_WRITE || \ ++ x == FT_FUNC_INJECT_WRITEDATA || \ ++ x == FT_FUNC_INJECT_ATOMIC) ++ ++#define is_read_func(x) (x == FT_FUNC_READ || \ ++ x == FT_FUNC_READV || \ ++ x == FT_FUNC_READMSG) ++ ++#define is_fetch_func(x) (x == FT_FUNC_FETCH_ATOMIC || \ ++ x == FT_FUNC_FETCH_ATOMICV || \ ++ x == FT_FUNC_FETCH_ATOMICMSG) ++ ++#define is_compare_func(x) (x == FT_FUNC_COMPARE_ATOMIC || \ ++ x == FT_FUNC_COMPARE_ATOMICV || \ ++ x == FT_FUNC_COMPARE_ATOMICMSG) ++ ++#define is_data_func(x) (x == FT_FUNC_SENDDATA || \ ++ x == FT_FUNC_INJECTDATA || \ ++ x == FT_FUNC_WRITEDATA || \ ++ x == FT_FUNC_INJECT_WRITEDATA) ++ ++#define is_msg_func(x) (x == FT_FUNC_SENDMSG || \ ++ x == FT_FUNC_WRITEMSG || \ ++ x == FT_FUNC_READMSG || \ ++ x == FT_FUNC_ATOMICMSG || \ ++ x == FT_FUNC_FETCH_ATOMICMSG || \ ++ x == FT_FUNC_COMPARE_ATOMICMSG) ++ ++struct ft_set { ++ char node[FI_NAME_MAX]; ++ char service[FI_NAME_MAX]; ++ char prov_name[FI_NAME_MAX]; ++ enum ft_test_type test_type[FT_MAX_TEST]; ++ enum ft_class_function class_function[FT_MAX_FUNCTIONS]; ++ uint64_t msg_flags; ++ enum fi_op op[FI_ATOMIC_OP_LAST]; ++ enum fi_datatype datatype[FI_DATATYPE_LAST]; ++ enum fi_ep_type ep_type[FT_MAX_EP_TYPES]; ++ enum fi_av_type av_type[FT_MAX_AV_TYPES]; ++ enum ft_comp_type comp_type[FT_MAX_COMP]; ++ enum fi_wait_obj eq_wait_obj[FT_MAX_WAIT_OBJ]; ++ enum fi_wait_obj cq_wait_obj[FT_MAX_WAIT_OBJ]; ++ enum fi_wait_obj cntr_wait_obj[FT_MAX_WAIT_OBJ]; ++ enum fi_progress progress[FT_MAX_PROGRESS]; ++ uint64_t mode[FT_MAX_PROV_MODES]; ++ uint64_t test_class[FT_MAX_CLASS]; ++ uint64_t constant_caps[FT_MAX_CAPS]; ++ uint64_t test_flags; ++ uint64_t mr_mode[FT_MAX_MR_MODES]; ++ uint64_t rx_cq_bind_flags[FT_MAX_FLAGS]; ++ uint64_t tx_cq_bind_flags[FT_MAX_FLAGS]; ++ uint64_t rx_op_flags[FT_MAX_FLAGS]; ++ uint64_t tx_op_flags[FT_MAX_FLAGS]; ++}; ++ ++struct ft_series { ++ struct ft_set *sets; ++ int nsets; ++ int test_count; ++ int test_index; ++ int cur_set; ++ int cur_type; ++ int cur_func; ++ int cur_op; ++ int cur_datatype; ++ int cur_ep; ++ int cur_av; ++ int cur_comp; ++ int cur_eq_wait_obj; ++ int cur_cq_wait_obj; ++ int cur_cntr_wait_obj; ++ int cur_mode; ++ int cur_class; ++ int cur_progress; ++}; ++ ++struct ft_info { ++ enum ft_test_type test_type; ++ int test_index; ++ int test_subindex; ++ enum ft_class_function class_function; ++ uint64_t msg_flags; ++ enum fi_op op; ++ enum fi_datatype datatype; ++ uint64_t test_flags; ++ uint64_t test_class; ++ uint64_t caps; ++ uint64_t mode; ++ uint64_t mr_mode; ++ enum fi_av_type av_type; ++ enum fi_ep_type ep_type; ++ enum ft_comp_type comp_type; ++ enum fi_wait_obj eq_wait_obj; ++ enum fi_wait_obj cq_wait_obj; ++ enum fi_wait_obj cntr_wait_obj; ++ enum fi_progress progress; ++ uint32_t protocol; ++ uint32_t protocol_version; ++ char node[FI_NAME_MAX]; ++ char service[FI_NAME_MAX]; ++ char prov_name[FI_NAME_MAX]; ++ char fabric_name[FI_NAME_MAX]; ++ uint64_t rx_cq_bind_flags; ++ uint64_t tx_cq_bind_flags; ++ uint64_t rx_op_flags; ++ uint64_t tx_op_flags; ++}; ++ ++ ++struct ft_series * fts_load(char *filename); ++void fts_close(struct ft_series *series); ++void fts_start(struct ft_series *series, int index); ++void fts_next(struct ft_series *series); ++int fts_end(struct ft_series *series, int index); ++void fts_cur_info(struct ft_series *series, struct ft_info *info); ++int fts_info_is_valid(void); ++ ++ ++struct ft_msg { ++ uint32_t len; ++ uint8_t data[124]; ++}; ++ ++int ft_fw_send(int fd, void *msg, size_t len); ++int ft_fw_recv(int fd, void *msg, size_t len); ++ ++ ++int ft_open_control(); ++ssize_t ft_get_event(uint32_t *event, void *buf, size_t len, ++ uint32_t event_check, size_t len_check); ++int ft_open_comp(); ++int ft_bind_comp(struct fid_ep *ep); ++int ft_comp_rx(int timeout); ++int ft_comp_tx(int timeout); ++int ft_use_comp_cntr(enum ft_comp_type comp_type); ++int ft_use_comp_cq(enum ft_comp_type comp_type); ++ ++int ft_open_active(); ++int ft_open_passive(); ++int ft_enable_comm(); ++int ft_post_recv_bufs(); ++void ft_format_iov(struct iovec *iov, size_t cnt, char *buf, size_t len); ++void ft_format_iocs(struct iovec *iov, size_t *iov_count); ++void ft_next_iov_cnt(struct ft_xcontrol *ctrl, size_t max_iov_cnt); ++int ft_get_ctx(struct ft_xcontrol *ctrl, struct fi_context **ctx); ++int ft_generates_rx_comp(); ++int ft_generates_tx_comp(); ++int ft_check_rx_completion(); ++int ft_check_tx_completion(); ++ ++int ft_send_sync_msg(); ++int ft_recv_n_msg(); ++int ft_recv_msg(); ++int ft_send_msg(); ++int ft_send_dgram(); ++int ft_send_dgram_done(); ++int ft_recv_dgram(); ++int ft_recv_dgram_flood(size_t *recv_cnt); ++int ft_send_dgram_flood(); ++int ft_sendrecv_dgram(); ++int ft_send_rma(); ++ ++void ft_cleanup(void); ++int ft_open_res(); ++int ft_init_test(); ++int ft_run_test(); ++int ft_reset_ep(); ++void ft_record_error(int error); ++ ++int ft_verify_bufs(); ++int ft_sync_fill_bufs(size_t size); ++void ft_verify_comp(void *buf); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _FABTEST_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.c +new file mode 100644 +index 0000000..075d722 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.c +@@ -0,0 +1,373 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "ofi_atomic.h" ++ ++#ifndef UNREFERENCED_PARAMETER ++#define OFI_UNUSED(var) (void)var ++#else ++#define OFI_UNUSED UNREFERENCED_PARAMETER ++#endif ++ ++/* ++ * Basic atomic operations ++ */ ++ ++#define OFI_OP_MIN(type,dst,src) if ((dst) > (src)) (dst) = (src) ++#define OFI_OP_MAX(type,dst,src) if ((dst) < (src)) (dst) = (src) ++#define OFI_OP_SUM(type,dst,src) (dst) += (src) ++#define OFI_OP_PROD(type,dst,src) (dst) *= (src) ++#define OFI_OP_LOR(type,dst,src) (dst) = (dst) || (src) ++#define OFI_OP_LAND(type,dst,src) (dst) = (dst) && (src) ++#define OFI_OP_BOR(type,dst,src) (dst) |= (src) ++#define OFI_OP_BAND(type,dst,src) (dst) &= (src) ++#define OFI_OP_LXOR(type,dst,src) (dst) = ((dst) && !(src)) || (!(dst) && (src)) ++#define OFI_OP_BXOR(type,dst,src) (dst) ^= (src) ++#define OFI_OP_READ(type,dst,src) /* src unused, dst is written to result */ ++#define OFI_OP_WRITE(type,dst,src) (dst) = (src) ++ ++#define OFI_OP_CSWAP_EQ(type,dst,src,cmp) if ((dst) == (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_NE(type,dst,src,cmp) if ((dst) != (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_LE(type,dst,src,cmp) if ((dst) <= (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_LT(type,dst,src,cmp) if ((dst) < (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_GE(type,dst,src,cmp) if ((dst) >= (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_GT(type,dst,src,cmp) if ((dst) > (cmp)) (dst) = (src) ++#define OFI_OP_MSWAP(type,dst,src,cmp) (dst) = (((src) & (cmp)) | \ ++ ((dst) & ~(cmp))) ++ ++/* Need special handlers for complex datatypes for portability */ ++#define OFI_OP_SUM_COMPLEX(type,dst,src) (dst) = ofi_complex_sum_##type(dst,src) ++#define OFI_OP_PROD_COMPLEX(type,dst,src) (dst) = ofi_complex_prod_##type(dst,src) ++#define OFI_OP_LOR_COMPLEX(type,dst,src) (dst) = ofi_complex_lor_##type(dst,src) ++#define OFI_OP_LAND_COMPLEX(type,dst,src) (dst) = ofi_complex_land_##type(dst,src) ++#define OFI_OP_LXOR_COMPLEX(type,dst,src) (dst) = ofi_complex_lxor_##type(dst,src) ++#define OFI_OP_READ_COMPLEX OFI_OP_READ ++#define OFI_OP_WRITE_COMPLEX OFI_OP_WRITE ++ ++#define OFI_OP_CSWAP_EQ_COMPLEX(type,dst,src,cmp) \ ++ if (ofi_complex_eq_##type(dst,cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_NE_COMPLEX(type,dst,src,cmp) \ ++ if (!ofi_complex_eq_##type(dst,cmp)) (dst) = (src) ++ ++ ++/******************************** ++ * ATOMIC TYPE function templates ++ ********************************/ ++ ++#define OFI_DEF_NOOP_NAME NULL, ++#define OFI_DEF_NOOP_FUNC ++ ++/* ++ * WRITE ++ */ ++#define OFI_DEF_WRITE_NAME(op, type) ofi_write_## op ##_## type, ++#define OFI_DEF_WRITE_COMPLEX_NAME(op, type) ofi_write_## op ##_## type, ++ ++#define OFI_DEF_WRITE_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ for (i = 0; i < cnt; i++) \ ++ op(type, d[i], s[i]); \ ++ } ++ ++#define OFI_DEF_WRITE_COMPLEX_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ const ofi_complex_##type *s = (src); \ ++ for (i = 0; i < cnt; i++) \ ++ op(type, d[i], s[i]); \ ++ } ++ ++/* ++ * READ (fetch) ++ */ ++#define OFI_DEF_READ_NAME(op, type) ofi_read_## op ##_## type, ++#define OFI_DEF_READ_COMPLEX_NAME(op, type) ofi_read_## op ##_## type, ++ ++#define OFI_DEF_READ_FUNC(op, type) \ ++ static void ofi_read_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ type *r = (res); \ ++ OFI_UNUSED(src); \ ++ for (i = 0; i < cnt; i++) \ ++ r[i] = d[i]; \ ++ } ++ ++#define OFI_DEF_READ_COMPLEX_FUNC(op, type) \ ++ static void ofi_read_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ ofi_complex_##type *r = (res); \ ++ OFI_UNUSED(src); \ ++ for (i = 0; i < cnt; i++) \ ++ r[i] = d[i]; \ ++ } ++ ++/* ++ * READWRITE (fetch-write) ++ */ ++#define OFI_DEF_READWRITE_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, ++ ++#define OFI_DEF_READWRITE_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ type *r = (res); \ ++ for (i = 0; i < cnt; i++) { \ ++ r[i] = d[i]; \ ++ op(type, d[i], s[i]); \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITE_COMPLEX_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ const ofi_complex_##type *s = (src); \ ++ ofi_complex_##type *r = (res); \ ++ for (i = 0; i < cnt; i++) { \ ++ r[i] = d[i]; \ ++ op(type, d[i], s[i]); \ ++ } \ ++ } ++ ++/* ++ * CSWAP ++ */ ++#define OFI_DEF_CSWAP_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAP_COMPLEX_NAME(op, type) ofi_cswap_## op ##_## type, ++ ++#define OFI_DEF_CSWAP_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ const type *c = (cmp); \ ++ type *r = (res); \ ++ for (i = 0; i < cnt; i++) { \ ++ r[i] = d[i]; \ ++ op(type, d[i], s[i], c[i]); \ ++ } \ ++ } ++ ++#define OFI_DEF_CSWAP_COMPLEX_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ const ofi_complex_##type *s = (src); \ ++ const ofi_complex_##type *c = (cmp); \ ++ ofi_complex_##type *r = (res); \ ++ for (i = 0; i < cnt; i++) { \ ++ r[i] = d[i]; \ ++ op(type, d[i], s[i], c[i]); \ ++ } \ ++ } ++ ++ ++/********************************************************************* ++ * Macros create atomic functions for each operation for each datatype ++ *********************************************************************/ ++ ++/* ++ * Define all handlers in order to populate the dispatch table correctly. ++ * ++ * ATOMICTYPE - WRITE, READ, READWRITE, CSWAP, MSWAP ++ * FUNCNAME - Define function or simply generate function name ++ * The latter is needed to populate the dispatch table ++ * op - OFI_OP_XXX function should perform (e.g. OFI_OP_MIN) ++ */ ++#define OFI_DEFINE_ALL_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, float) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, double)\ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, long_double) ++ ++#define OFI_DEFINE_REALNO_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ ++ OFI_DEF_NOOP_##FUNCNAME ++ ++#define OFI_DEFINE_INT_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME ++ ++ ++/********************** ++ * Write dispatch table ++ **********************/ ++ ++OFI_DEFINE_REALNO_HANDLERS(WRITE, FUNC, OFI_OP_MIN) ++OFI_DEFINE_REALNO_HANDLERS(WRITE, FUNC, OFI_OP_MAX) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_SUM) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_PROD) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_LOR) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_LAND) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BOR) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BAND) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_LXOR) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BXOR) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_WRITE) ++ ++void (*ofi_atomic_write_handlers[OFI_WRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, size_t cnt) = ++{ ++ { OFI_DEFINE_REALNO_HANDLERS(WRITE, NAME, OFI_OP_MIN) }, ++ { OFI_DEFINE_REALNO_HANDLERS(WRITE, NAME, OFI_OP_MAX) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_SUM) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_PROD) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_LOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_LAND) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BOR) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BAND) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_LXOR) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BXOR) }, ++ /* no-op: FI_ATOMIC_READ */ ++ { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_WRITE) }, ++}; ++ ++ ++/*************************** ++ * Read-write dispatch table ++ ***************************/ ++ ++OFI_DEFINE_REALNO_HANDLERS(READWRITE, FUNC, OFI_OP_MIN) ++OFI_DEFINE_REALNO_HANDLERS(READWRITE, FUNC, OFI_OP_MAX) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_SUM) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_PROD) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_LOR) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_LAND) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BOR) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BAND) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_LXOR) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BXOR) ++OFI_DEFINE_ALL_HANDLERS(READ, FUNC, OFI_OP_READ) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_WRITE) ++ ++void (*ofi_atomic_readwrite_handlers[OFI_READWRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, void *res, size_t cnt) = ++{ ++ { OFI_DEFINE_REALNO_HANDLERS(READWRITE, NAME, OFI_OP_MIN) }, ++ { OFI_DEFINE_REALNO_HANDLERS(READWRITE, NAME, OFI_OP_MAX) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_SUM) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_PROD) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_LOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_LAND) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BOR) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BAND) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_LXOR) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BXOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(READ, NAME, OFI_OP_READ) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_WRITE) }, ++}; ++ ++ ++/***************************** ++ * Compare-swap dispatch table ++ *****************************/ ++ ++OFI_DEFINE_ALL_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_EQ) ++OFI_DEFINE_ALL_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_NE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_LE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_LT) ++OFI_DEFINE_REALNO_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_GE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_GT) ++OFI_DEFINE_INT_HANDLERS(CSWAP, FUNC, OFI_OP_MSWAP) ++ ++void (*ofi_atomic_swap_handlers[OFI_SWAP_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, const void *cmp, void *res, size_t cnt) = ++{ ++ { OFI_DEFINE_ALL_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_EQ) }, ++ { OFI_DEFINE_ALL_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_NE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_LE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_LT) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_GE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_GT) }, ++ { OFI_DEFINE_INT_HANDLERS(CSWAP, NAME, OFI_OP_MSWAP) }, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.h +new file mode 100644 +index 0000000..98966e2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.h +@@ -0,0 +1,100 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistibutions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _OFI_ATOMIC_H_ ++#define _OFI_ATOMIC_H_ ++ ++#include "fabtest.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++typedef long double long_double; ++typedef float complex ofi_complex_float; ++typedef double complex ofi_complex_double; ++typedef long double complex ofi_complex_long_double; ++ ++#define OFI_WRITE_OP_LAST FI_CSWAP ++#define OFI_READWRITE_OP_LAST FI_CSWAP ++#define OFI_SWAP_OP_START FI_CSWAP ++#define OFI_SWAP_OP_LAST (FI_MSWAP - FI_CSWAP + 1) ++ ++extern void (*ofi_atomic_write_handlers[OFI_WRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, size_t cnt); ++extern void (*ofi_atomic_readwrite_handlers[OFI_READWRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, void *res, size_t cnt); ++extern void (*ofi_atomic_swap_handlers[OFI_SWAP_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, const void *cmp, ++ void *res, size_t cnt); ++ ++#define OFI_DEF_COMPLEX_OPS(type) \ ++static inline int ofi_complex_eq_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a == b; \ ++} \ ++static inline ofi_complex_## type ofi_complex_sum_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a + b; \ ++} \ ++static inline ofi_complex_## type ofi_complex_prod_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a * b; \ ++} \ ++static inline ofi_complex_## type ofi_complex_land_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a && b; \ ++} \ ++static inline ofi_complex_## type ofi_complex_lor_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a || b; \ ++} \ ++static inline int ofi_complex_lxor_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return (a && !b) || (!a && b); \ ++} \ ++ ++OFI_DEF_COMPLEX_OPS(float) ++OFI_DEF_COMPLEX_OPS(double) ++OFI_DEF_COMPLEX_OPS(long_double) ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _OFI_ATOMIC_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/test_ctrl.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/test_ctrl.c +new file mode 100644 +index 0000000..2d2388d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/test_ctrl.c +@@ -0,0 +1,1110 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "fabtest.h" ++ ++void ft_record_error(int error) ++{ ++ if (!ft_ctrl.error) { ++ fprintf(stderr, "ERROR [%s], continuing with test", ++ fi_strerror(error)); ++ ft_ctrl.error = error; ++ } ++} ++ ++static int ft_init_xcontrol(struct ft_xcontrol *ctrl) ++{ ++ memset(ctrl, 0, sizeof *ctrl); ++ ctrl->credits = FT_DEFAULT_CREDITS; ++ ctrl->max_credits = FT_DEFAULT_CREDITS; ++ ++ ctrl->iov = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], sizeof *ctrl->iov); ++ ctrl->iov_desc = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], ++ sizeof *ctrl->iov_desc); ++ ctrl->ctx = calloc(ctrl->max_credits, sizeof *ctrl->ctx); ++ if (!ctrl->iov || !ctrl->iov_desc || !ctrl->ctx) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int ft_init_rx_control(void) ++{ ++ int ret; ++ ++ ret = ft_init_xcontrol(&ft_rx_ctrl); ++ if (ret) ++ return ret; ++ ++ ft_rx_ctrl.cq_format = FI_CQ_FORMAT_DATA; ++ ft_rx_ctrl.addr = FI_ADDR_UNSPEC; ++ ++ ft_rx_ctrl.msg_size = med_size_array[med_size_cnt - 1]; ++ if (fabric_info && fabric_info->ep_attr && ++ fabric_info->ep_attr->max_msg_size && ++ fabric_info->ep_attr->max_msg_size < ft_rx_ctrl.msg_size) ++ ft_rx_ctrl.msg_size = fabric_info->ep_attr->max_msg_size; ++ ++ return 0; ++} ++ ++static int ft_init_tx_control(void) ++{ ++ int ret; ++ ++ ret = ft_init_xcontrol(&ft_tx_ctrl); ++ if (ret) ++ return ret; ++ ++ ft_tx_ctrl.cq_format = FI_CQ_FORMAT_CONTEXT; ++ ft_tx_ctrl.remote_cq_data = ft_init_cq_data(fabric_info); ++ return 0; ++} ++ ++static int ft_init_atomic_control(struct ft_atomic_control *ctrl) ++{ ++ memset(ctrl, 0, sizeof *ctrl); ++ ctrl->op = test_info.op; ++ ++ ctrl->ioc = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], sizeof *ctrl->ioc); ++ ctrl->res_ioc = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], ++ sizeof *ctrl->res_ioc); ++ ctrl->comp_ioc = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], ++ sizeof *ctrl->comp_ioc); ++ ++ if (!ctrl->ioc || !ctrl->res_ioc || !ctrl->comp_ioc) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int ft_init_control(void) ++{ ++ int ret; ++ ++ memset(&ft_ctrl, 0, sizeof ft_ctrl); ++ ft_ctrl.xfer_iter = FT_DEFAULT_CREDITS; ++ ft_ctrl.inc_step = test_info.test_flags & FT_FLAG_QUICKTEST ? 4 : 1; ++ ++ ft_ctrl.iov_array = sm_size_array; ++ ft_ctrl.iov_cnt = sm_size_cnt; ++ ++ if (test_info.test_class & FI_RMA) { ++ ft_ctrl.size_array = lg_size_array; ++ ft_ctrl.size_cnt = lg_size_cnt; ++ } else { ++ ft_ctrl.size_array = med_size_array; ++ ft_ctrl.size_cnt = med_size_cnt; ++ } ++ ++ ret = ft_init_rx_control(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_tx_control(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_atomic_control(&ft_atom_ctrl); ++ return ret; ++} ++ ++static void ft_cleanup_xcontrol(struct ft_xcontrol *ctrl) ++{ ++ free(ctrl->buf); ++ free(ctrl->iov); ++ free(ctrl->iov_desc); ++ free(ctrl->ctx); ++ memset(ctrl, 0, sizeof *ctrl); ++} ++ ++static void ft_cleanup_atomic_control(struct ft_atomic_control *ctrl) ++{ ++ free(ctrl->res_buf); ++ free(ctrl->comp_buf); ++ free(ctrl->ioc); ++ free(ctrl->res_ioc); ++ free(ctrl->comp_ioc); ++ free(ctrl->orig_buf); ++ memset(ctrl, 0, sizeof *ctrl); ++} ++ ++static void ft_cleanup_mr_control(struct ft_mr_control *ctrl) ++{ ++ free(ctrl->buf); ++ memset(ctrl, 0, sizeof *ctrl); ++} ++ ++static void ft_format_iov_distributed(struct iovec *iov, size_t cnt, char *buf, ++ size_t len) ++{ ++ size_t offset; ++ int i; ++ ++ for (i = 0, offset = 0; i < cnt - 1; i++) { ++ iov[i].iov_base = buf + offset; ++ iov[i].iov_len = len / cnt; ++ offset += iov[i].iov_len; ++ } ++ iov[i].iov_base = buf + offset; ++ iov[i].iov_len = len - offset; ++} ++ ++/* One class of bugs is issues involving IOV length handling. The regular ++ * ft_format_iov does not catch this class because it evenly partitions the ++ * entries. Instead partition them proportional to their position in the iovec. ++ */ ++static void _ft_format_iov_weighted(struct iovec *iov, size_t cnt, char *buf, ++ size_t len, int reversed) ++{ ++ double total_parts; ++ double portion; ++ size_t offset; ++ size_t weight; ++ size_t size; ++ size_t i; ++ ++ /* Get the sum of the element positions in the list and calculate the ++ * base weight. ++ */ ++ total_parts = ((cnt + 1.0) * cnt) / 2.0; ++ portion = len / total_parts; ++ ++ for (offset = 0, i = 0; i < cnt; i++) { ++ if (reversed) ++ weight = cnt - i; ++ else ++ weight = i + 1; ++ ++ /* Get the weight for this iovec entry and round it to the ++ * nearest integer. ++ */ ++ size = (portion * weight) + .5; ++ ++ iov[i].iov_base = buf + offset; ++ iov[i].iov_len = size; ++ ++ offset += size; ++ } ++} ++ ++static void ft_format_iov_weighted(struct iovec *iov, size_t cnt, char *buf, ++ size_t len) ++{ ++ _ft_format_iov_weighted(iov, cnt, buf, len, 0); ++} ++ ++static void ft_format_iov_reversed(struct iovec *iov, size_t cnt, char *buf, ++ size_t len) ++{ ++ _ft_format_iov_weighted(iov, cnt, buf, len, 1); ++} ++ ++static void ft_format_iov_random(struct iovec *iov, size_t cnt, char *buf, ++ size_t len) ++{ ++ size_t offset; ++ size_t weight; ++ size_t i; ++ ++ offset = 0; ++ for (i = 0; i < cnt; i++) { ++ /* If last IOV then use remaining data. */ ++ if (i == (cnt - 1)) { ++ weight = len; ++ } else { ++ /* Get a weight between 1 and the remaining length minus ++ * the remaining IOV count. This is so we can reserve at ++ * least a length of 1 for every IOV. ++ */ ++ weight = (rand() % (len - (cnt - i) + 1)) + 1; ++ } ++ ++ len -= weight; ++ ++ iov[i].iov_base = buf + offset; ++ iov[i].iov_len = weight; ++ ++ offset += weight; ++ } ++} ++ ++void ft_format_iov(struct iovec *iov, size_t cnt, char *buf, size_t len) ++{ ++ typedef void (*iov_formatter)(struct iovec *iov, size_t cnt, char *buf, ++ size_t len); ++ size_t choice; ++ ++ static iov_formatter options[] = { ++ ft_format_iov_distributed, ++ ft_format_iov_weighted, ++ ft_format_iov_reversed, ++ ft_format_iov_random ++ }; ++ ++ choice = rand() % ARRAY_SIZE(options); ++ ++ options[choice](iov, cnt, buf, len); ++} ++ ++static void ft_iov_to_ioc(struct iovec *iov, struct fi_ioc *ioc, size_t cnt, ++ enum fi_datatype datatype, char *buf) ++{ ++ int i; ++ size_t offset = 0; ++ for (i = 0; i < cnt; i++) { ++ ioc[i].count = iov[i].iov_len; ++ ioc[i].addr = buf + offset; ++ offset += ioc[i].count * ft_atom_ctrl.datatype_size; ++ } ++} ++ ++void ft_format_iocs(struct iovec *iov, size_t *iov_count) ++{ ++ while(ft_ctrl.iov_array[ft_tx_ctrl.iov_iter] > ft_atom_ctrl.count) ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ ++ *iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ ft_format_iov(iov, *iov_count, ft_tx_ctrl.buf, ft_atom_ctrl.count); ++ ft_iov_to_ioc(iov, ft_atom_ctrl.ioc, *iov_count, ++ ft_atom_ctrl.datatype, ft_tx_ctrl.buf); ++ ft_iov_to_ioc(iov, ft_atom_ctrl.res_ioc, *iov_count, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.res_buf); ++ ft_iov_to_ioc(iov, ft_atom_ctrl.comp_ioc, *iov_count, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.comp_buf); ++} ++ ++void ft_next_iov_cnt(struct ft_xcontrol *ctrl, size_t max_iov_cnt) ++{ ++ ctrl->iov_iter++; ++ if (ctrl->iov_iter > ft_ctrl.iov_cnt || ++ ft_ctrl.iov_array[ctrl->iov_iter] > max_iov_cnt) ++ ctrl->iov_iter = 0; ++} ++ ++int ft_get_ctx(struct ft_xcontrol *ctrl, struct fi_context **ctx) ++{ ++ int ret; ++ ++ ctrl->curr_ctx++; ++ if (ctrl->curr_ctx >= ctrl->max_credits) { ++ if (ctrl == &ft_tx_ctrl) { ++ while (ctrl->credits < ctrl->max_credits) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ } ++ ctrl->curr_ctx = 0; ++ } ++ *ctx = &(ctrl->ctx[ctrl->curr_ctx]); ++ return 0; ++} ++ ++static int check_atomic(size_t *count) ++{ ++ int ret; ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_ATOMIC: ++ case FT_FUNC_ATOMICV: ++ case FT_FUNC_ATOMICMSG: ++ case FT_FUNC_INJECT_ATOMIC: ++ ret = check_base_atomic_op(ft_tx_ctrl.ep, ft_atom_ctrl.op, ++ ft_atom_ctrl.datatype, count); ++ break; ++ case FT_FUNC_FETCH_ATOMIC: ++ case FT_FUNC_FETCH_ATOMICV: ++ case FT_FUNC_FETCH_ATOMICMSG: ++ ret = check_fetch_atomic_op(ft_tx_ctrl.ep, ft_atom_ctrl.op, ++ ft_atom_ctrl.datatype, count); ++ break; ++ case FT_FUNC_COMPARE_ATOMIC: ++ case FT_FUNC_COMPARE_ATOMICV: ++ default: ++ ret = check_compare_atomic_op(ft_tx_ctrl.ep, ft_atom_ctrl.op, ++ ft_atom_ctrl.datatype, count); ++ } ++ ++ ft_atom_ctrl.datatype_size = datatype_to_size(ft_atom_ctrl.datatype); ++ ++ return ret; ++} ++ ++static int ft_sync_test(int value) ++{ ++ int ret; ++ ++ ret = ft_reset_ep(); ++ if (ret) ++ return ret; ++ ++ return ft_sock_sync(value); ++} ++ ++static int ft_sync_manual() ++{ ++ int ret, value = 0, result = -FI_EOTHER; ++ ++ if (listen_sock < 0) { ++ ret = send(sock, &value, sizeof(value), 0); ++ if (ret != sizeof(value)) ++ return -FI_EOTHER; ++ ++ do { ++ ret = recv(sock, &result, sizeof(result), MSG_DONTWAIT); ++ if (ret == sizeof(result)) ++ break; ++ ++ ret = ft_comp_rx(0); ++ if (ret) ++ return ret; ++ } while (1); ++ } else { ++ do { ++ ret = recv(sock, &result, sizeof(result), MSG_DONTWAIT); ++ if (ret == sizeof(result)) ++ break; ++ ++ ret = ft_comp_rx(0); ++ if (ret) ++ return ret; ++ } while (1); ++ ++ ret = send(sock, &value, sizeof(value), 0); ++ if (ret != sizeof(value)) ++ return -FI_EOTHER; ++ } ++ return 0; ++} ++ ++static int ft_sync_progress(int value) ++{ ++ if (test_info.progress == FI_PROGRESS_MANUAL) ++ return ft_sync_manual(); ++ return ft_sock_sync(value); ++} ++ ++static int ft_sync_msg_needed(void) ++{ ++ return ft_check_rx_completion() ? 0 : ft_send_sync_msg(); ++} ++ ++static int ft_check_verify_cnt() ++{ ++ if (test_info.msg_flags == FI_REMOTE_CQ_DATA && ++ ft_ctrl.verify_cnt != ft_ctrl.xfer_iter) ++ return -FI_EIO; ++ return 0; ++} ++ ++static int ft_pingpong_rma(void) ++{ ++ int ret = 0, i; ++ size_t count; ++ ++ if (test_info.test_class & FI_ATOMIC) { ++ ret = check_atomic(&count); ++ ++ ft_atom_ctrl.count = ft_tx_ctrl.rma_msg_size / ft_atom_ctrl.datatype_size; ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP || ++ ft_atom_ctrl.count > count || ft_atom_ctrl.count == 0) { ++ return 0; ++ } ++ if (ret) ++ return ret; ++ } ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ } ++ } ++ return ret; ++} ++ ++static int ft_pingpong(void) ++{ ++ int ret, i; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) ++ return ft_pingpong_rma(); ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_send_msg(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_msg(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int ft_pingpong_dgram(void) ++{ ++ int ret, i; ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_sendrecv_dgram(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ for (i = 0; i < 1000; i++) { ++ ret = ft_recv_dgram(); ++ if (!ret) ++ break; ++ else if (ret != -FI_ETIMEDOUT) ++ return ret; ++ } ++ ++ for (i = 0; i < ft_ctrl.xfer_iter - 1; i++) { ++ ret = ft_sendrecv_dgram(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_send_dgram(); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int ft_run_latency(void) ++{ ++ int ret, i; ++ ++ for (i = 0; i < ft_ctrl.size_cnt; i += ft_ctrl.inc_step) { ++ if (ft_ctrl.size_array[i] > fabric_info->ep_attr->max_msg_size) ++ break; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[0]; ++ ft_tx_ctrl.rma_msg_size = ft_ctrl.size_array[i]; ++ } else { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[i]; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ (ft_ctrl.size_array[i] > fabric_info->tx_attr->inject_size)) ++ break; ++ ++ ft_ctrl.xfer_iter = test_info.test_flags & FT_FLAG_QUICKTEST ? ++ 5 : size_to_count(ft_ctrl.size_array[i]); ++ ++ ret = ft_sync_test(0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ ++ clock_gettime(CLOCK_MONOTONIC, &start); ++ ret = (test_info.ep_type == FI_EP_DGRAM) ? ++ ft_pingpong_dgram() : ft_pingpong(); ++ clock_gettime(CLOCK_MONOTONIC, &end); ++ if (ret) { ++ FT_PRINTERR("latency test failed!", ret); ++ return ret; ++ } ++ ++ ret = ft_sync_progress(0); ++ if (ret) ++ return ret; ++ ++ show_perf("lat", ft_ctrl.size_array[i], ft_ctrl.xfer_iter, &start, &end, 2); ++ } ++ ++ return 0; ++} ++ ++static int ft_bw_rma(void) ++{ ++ int ret, i; ++ size_t count; ++ ++ if (test_info.test_class & FI_ATOMIC) { ++ ret = check_atomic(&count); ++ ++ ft_atom_ctrl.count = ft_tx_ctrl.rma_msg_size / ft_atom_ctrl.datatype_size; ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP || ++ ft_atom_ctrl.count > count || ft_atom_ctrl.count == 0) { ++ return 0; ++ } ++ if (ret) ++ return ret; ++ } ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ } ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ } else { ++ ret = ft_recv_n_msg(ft_check_rx_completion() ? ++ ft_ctrl.xfer_iter : 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_sync_msg(); ++ if (ret) ++ return ret; ++ } ++ return 0; ++} ++ ++static int ft_bw(void) ++{ ++ int ret, i; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) ++ return ft_bw_rma(); ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_send_msg(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ } else { ++ ret = ft_recv_n_msg(ft_check_rx_completion() ? ++ ft_ctrl.xfer_iter : 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_sync_msg(); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++/* ++ * The datagram streaming test sends datagrams with the initial byte ++ * of the message cleared until we're ready to end the test. The first ++ * byte is then set to 0xFF. On the receive side, we count the number ++ * of completions until that message is seen. Only the receiving side ++ * reports any performance data. The sender does not know how many ++ * packets were dropped in flight. ++ * ++ * Because we re-use the same buffer for all messages, the receiving ++ * side can notice that the first byte has changed and end the test ++ * before the completion associated with the last message has been ++ * written to the CQ. As a result, the number of messages that were ++ * counted as received may be slightly lower than the number of messages ++ * that were actually received. ++ * ++ * For a significantly large number of transfers, this falls into the ++ * noise, but it is visible if the number of iterations is small, such ++ * as when running the quick test. The fix for this would either to use ++ * CQ data to exchange the end of test marker, or to allocate separate ++ * buffers for each receive operation. ++ * ++ * The message with the end of test marker is retried until until the ++ * receiver acknowledges it. If the receiver ack message is lost, the ++ * bandwidth test will hang. However, this is the only message that the ++ * receiver sends, so there's a reasonably good chance of it being transmitted ++ * successfully. ++ */ ++static int ft_bw_dgram(size_t *recv_cnt) ++{ ++ int ret; ++ ++ if (listen_sock < 0) { ++ *recv_cnt = 0; ++ ret = ft_send_dgram_flood(); ++ if (ret) ++ return ret; ++ ++ ft_tx_ctrl.seqno = ~0; ++ ret = ft_sendrecv_dgram(); ++ } else { ++ ret = ft_recv_dgram_flood(recv_cnt); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_dgram(); ++ } ++ ++ return ret; ++} ++ ++static int ft_run_bandwidth(void) ++{ ++ size_t recv_cnt; ++ int ret, i; ++ ++ for (i = 0; i < ft_ctrl.size_cnt; i += ft_ctrl.inc_step) { ++ if (ft_ctrl.size_array[i] > fabric_info->ep_attr->max_msg_size) ++ break; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[0]; ++ ft_tx_ctrl.rma_msg_size = ft_ctrl.size_array[i]; ++ } else { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[i]; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ (ft_ctrl.size_array[i] > fabric_info->tx_attr->inject_size)) ++ break; ++ ++ ft_ctrl.xfer_iter = test_info.test_flags & FT_FLAG_QUICKTEST ? ++ 5 : size_to_count(ft_ctrl.size_array[i]); ++ recv_cnt = ft_ctrl.xfer_iter; ++ ++ ret = ft_sync_test(0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ ++ clock_gettime(CLOCK_MONOTONIC, &start); ++ ret = (test_info.ep_type == FI_EP_DGRAM) ? ++ ft_bw_dgram(&recv_cnt) : ft_bw(); ++ clock_gettime(CLOCK_MONOTONIC, &end); ++ if (ret) { ++ FT_PRINTERR("bw test failed!", ret); ++ return ret; ++ } ++ ++ ret = ft_sync_progress(0); ++ if (ret) ++ return ret; ++ ++ show_perf("bw", ft_ctrl.size_array[i], recv_cnt, &start, &end, 1); ++ } ++ ++ return 0; ++} ++ ++static int ft_unit_rma(void) ++{ ++ int ret, i, fail = 0; ++ ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ft_sync_fill_bufs(ft_tx_ctrl.rma_msg_size); ++ ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ ++ if (!is_inject_func(test_info.class_function)) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_verify_bufs(); ++ if (ret) ++ fail = -FI_EIO; ++ } ++ ++ ret = ft_check_verify_cnt(); ++ if (ret) ++ return ret; ++ ++ return fail; ++} ++ ++static int ft_unit_atomic(void) ++{ ++ int ret, i, fail = 0; ++ size_t count; ++ ++ ret = check_atomic(&count); ++ ++ ft_atom_ctrl.count = ft_tx_ctrl.rma_msg_size / ft_atom_ctrl.datatype_size; ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP || ++ ft_atom_ctrl.count > count || ft_atom_ctrl.count == 0) { ++ return 0; ++ } ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ft_sync_fill_bufs(ft_tx_ctrl.rma_msg_size); ++ ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ ++ if (!is_inject_func(test_info.class_function)) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_verify_bufs(); ++ if (ret) ++ fail = -FI_EIO; ++ } ++ ++ ret = ft_check_verify_cnt(); ++ if (ret) ++ return ret; ++ return fail; ++} ++ ++static int ft_unit(void) ++{ ++ int ret, i, fail = 0; ++ ++ ft_ctrl.verify_cnt = 0; ++ if (test_info.test_class & FI_RMA) ++ return ft_unit_rma(); ++ else if (test_info.test_class & FI_ATOMIC) ++ return ft_unit_atomic(); ++ ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ft_sync_fill_bufs(ft_tx_ctrl.msg_size); ++ ++ ret = ft_send_msg(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_verify_bufs(); ++ if (ret) ++ fail = -FI_EIO; ++ } ++ ret = ft_check_verify_cnt(); ++ if (ret) ++ return ret; ++ return fail; ++} ++ ++static int ft_run_unit(void) ++{ ++ int i, ret, fail; ++ ++ fail = ret = 0; ++ ++ for (i = 0; i < ft_ctrl.size_cnt; i += ft_ctrl.inc_step) { ++ if (ft_ctrl.size_array[i] > fabric_info->ep_attr->max_msg_size) ++ break; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[0]; ++ ft_tx_ctrl.rma_msg_size = ft_ctrl.size_array[i]; ++ } else { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[i]; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ (ft_ctrl.size_array[i] > fabric_info->tx_attr->inject_size)) ++ break; ++ ++ ft_ctrl.xfer_iter = test_info.test_flags & FT_FLAG_QUICKTEST ? ++ 5 : size_to_count(ft_ctrl.size_array[i]); ++ ++ ret = ft_sync_test(0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ ++ ret = ft_unit(); ++ if (ret) { ++ if (ret != -FI_EIO) ++ return ret; ++ fail = -FI_EIO; ++ } ++ } ++ if (fail) ++ printf("unit test FAILED\n"); ++ else ++ printf("unit test PASSED\n"); ++ ++ return fail; ++} ++ ++void ft_cleanup(void) ++{ ++ FT_CLOSE_FID(ft_rx_ctrl.mr); ++ FT_CLOSE_FID(ft_tx_ctrl.mr); ++ FT_CLOSE_FID(ft_mr_ctrl.mr); ++ FT_CLOSE_FID(ft_atom_ctrl.res_mr); ++ FT_CLOSE_FID(ft_atom_ctrl.comp_mr); ++ ft_free_res(); ++ ft_cleanup_xcontrol(&ft_rx_ctrl); ++ ft_cleanup_xcontrol(&ft_tx_ctrl); ++ ft_cleanup_mr_control(&ft_mr_ctrl); ++ ft_cleanup_atomic_control(&ft_atom_ctrl); ++ memset(&ft_ctrl, 0, sizeof ft_ctrl); ++} ++ ++static int ft_exchange_mr_addr_key(void) ++{ ++ struct fi_rma_iov local_rma_iov = {0}; ++ struct fi_rma_iov peer_rma_iov = {0}; ++ int ret; ++ ++ if (!(test_info.mr_mode & (FI_MR_VIRT_ADDR | FI_MR_PROV_KEY))) ++ return 0; ++ ++ if (test_info.mr_mode & FI_MR_VIRT_ADDR) ++ local_rma_iov.addr = (uint64_t) ft_mr_ctrl.buf; ++ ++ if (test_info.mr_mode & FI_MR_PROV_KEY) ++ local_rma_iov.key = ft_mr_ctrl.mr_key; ++ ++ ret = ft_sock_send(sock, &local_rma_iov, sizeof local_rma_iov); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_recv(sock, &peer_rma_iov, sizeof peer_rma_iov); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ ++ ft_mr_ctrl.peer_mr_addr = peer_rma_iov.addr; ++ if (test_info.mr_mode & FI_MR_PROV_KEY) ++ ft_mr_ctrl.peer_mr_key = peer_rma_iov.key; ++ ++ return 0; ++} ++ ++int ft_open_res() ++{ ++ int ret; ++ ++ ret = ft_init_control(); ++ if (ret) { ++ FT_PRINTERR("ft_init_control", ret); ++ goto cleanup; ++ } ++ ++ ret = ft_open_control(); ++ if (ret) { ++ FT_PRINTERR("ft_open_control", ret); ++ goto cleanup; ++ } ++ if (test_info.ep_type == FI_EP_MSG && listen_sock >= 0) { ++ ret = ft_open_passive(); ++ if (ret) { ++ FT_PRINTERR("ft_open_passive", ret); ++ goto cleanup; ++ } ++ } ++ else { ++ ret = ft_open_active(); ++ if (ret) { ++ FT_PRINTERR("ft_open_active", ret); ++ goto cleanup; ++ } ++ } ++ ++ return 0; ++cleanup: ++ ft_cleanup(); ++ return ret; ++} ++ ++int ft_init_test() ++{ ++ int ret; ++ ++ ft_sock_sync(0); ++ ++ ret = ft_enable_comm(); ++ if (ret) { ++ FT_PRINTERR("ft_enable_comm", ret); ++ goto cleanup; ++ } ++ ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ ++ ret = ft_exchange_mr_addr_key(); ++ if (ret) { ++ FT_PRINTERR("ft_exchange_mr_address", ret); ++ goto cleanup; ++ } ++ ++ return 0; ++cleanup: ++ ft_cleanup(); ++ return ret; ++} ++ ++int ft_run_test() ++{ ++ int ret; ++ ++ switch (test_info.test_type) { ++ case FT_TEST_UNIT: ++ ret = ft_run_unit(); ++ if (ret) ++ FT_PRINTERR("ft_run_unit", ret); ++ break; ++ case FT_TEST_LATENCY: ++ ret = ft_run_latency(); ++ if (ret) ++ FT_PRINTERR("ft_run_latency", ret); ++ break; ++ case FT_TEST_BANDWIDTH: ++ ret = ft_run_bandwidth(); ++ if (ret) ++ FT_PRINTERR("ft_run_bandwidth", ret); ++ break; ++ default: ++ ret = -FI_ENOSYS; ++ break; ++ } ++ ++ ft_sync_test(0); ++ ft_cleanup(); ++ ++ return ret ? ret : -ft_ctrl.error; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/uber.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/uber.c +new file mode 100644 +index 0000000..6a34545 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/uber.c +@@ -0,0 +1,971 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++static int persistent = 1; ++static int do_fork = 0; ++ ++//static struct timespec start, end; ++ ++static struct ft_series *series; ++static int test_start_index, test_end_index = INT_MAX; ++struct ft_info test_info; ++struct fi_info *fabric_info; ++struct ft_xcontrol ft_rx_ctrl, ft_tx_ctrl; ++struct ft_mr_control ft_mr_ctrl; ++struct ft_atomic_control ft_atom_ctrl; ++struct ft_control ft_ctrl; ++ ++size_t recv_size, send_size; ++ ++enum { ++ FT_SUCCESS, ++ FT_SKIP, ++ FT_ENODATA, ++ FT_ENOSYS, ++ FT_ERROR, ++ FT_EIO, ++ FT_MAX_RESULT ++}; ++ ++static int results[FT_MAX_RESULT]; ++static char *filename = NULL; ++static char *provname = NULL; ++static char *testname = NULL; ++ ++ ++static int ft_nullstr(char *str) ++{ ++ return (!str || str[0] == '\0'); ++} ++ ++static char *ft_strptr(char *str) ++{ ++ return ft_nullstr(str) ? NULL : str; ++} ++ ++static char *ft_test_type_str(enum ft_test_type enum_str) ++{ ++ switch (enum_str) { ++ case FT_TEST_LATENCY: ++ return "latency"; ++ case FT_TEST_BANDWIDTH: ++ return "bandwidth"; ++ case FT_TEST_UNIT: ++ return "unit"; ++ default: ++ return "test_unspec"; ++ } ++} ++ ++static char *ft_class_func_str(enum ft_class_function enum_str) ++{ ++ switch (enum_str) { ++ case FT_FUNC_SEND: ++ return (test_info.test_class & FI_TAGGED) ? "tsend" : "send"; ++ case FT_FUNC_SENDV: ++ return (test_info.test_class & FI_TAGGED) ? "tsendv" : "sendv"; ++ case FT_FUNC_SENDMSG: ++ return (test_info.test_class & FI_TAGGED) ? "tsendmsg" : "sendmsg"; ++ case FT_FUNC_INJECT: ++ return (test_info.test_class & FI_TAGGED) ? "tinject" : "inject"; ++ case FT_FUNC_INJECTDATA: ++ return (test_info.test_class & FI_TAGGED) ? "tinjectdata" : "injectdata"; ++ case FT_FUNC_SENDDATA: ++ return (test_info.test_class & FI_TAGGED) ? "tsenddata" : "senddata"; ++ case FT_FUNC_READ: ++ return "read"; ++ case FT_FUNC_READV: ++ return "readv"; ++ case FT_FUNC_READMSG: ++ return "readmsg"; ++ case FT_FUNC_WRITE: ++ return "write"; ++ case FT_FUNC_WRITEV: ++ return "writev"; ++ case FT_FUNC_WRITEMSG: ++ return "writemsg"; ++ case FT_FUNC_INJECT_WRITE: ++ return "inject_write"; ++ case FT_FUNC_WRITEDATA: ++ return "writedata"; ++ case FT_FUNC_INJECT_WRITEDATA: ++ return "inject_writedata"; ++ case FT_FUNC_ATOMIC: ++ return "atomic"; ++ case FT_FUNC_ATOMICV: ++ return "atomicv"; ++ case FT_FUNC_ATOMICMSG: ++ return "atomic_msg"; ++ case FT_FUNC_INJECT_ATOMIC: ++ return "inject_atomic"; ++ case FT_FUNC_FETCH_ATOMIC: ++ return "fetch_atomic"; ++ case FT_FUNC_FETCH_ATOMICV: ++ return "fetch_atomicv"; ++ case FT_FUNC_FETCH_ATOMICMSG: ++ return "fetch_atomicmsg"; ++ case FT_FUNC_COMPARE_ATOMIC: ++ return "compare_atomic"; ++ case FT_FUNC_COMPARE_ATOMICV: ++ return "compare_atomicv"; ++ case FT_FUNC_COMPARE_ATOMICMSG: ++ return "compare_atomicmsg"; ++ default: ++ return "func_unspec"; ++ } ++} ++ ++static char *ft_wait_obj_str(enum fi_wait_obj enum_str) ++{ ++ switch (enum_str) { ++ case FI_WAIT_NONE: ++ return "wait_none"; ++ case FI_WAIT_UNSPEC: ++ return "wait_unspec"; ++ case FI_WAIT_SET: ++ return "wait_set"; ++ case FI_WAIT_FD: ++ return "wait_fd"; ++ case FI_WAIT_MUTEX_COND: ++ return "wait_mutex_cond"; ++ default: ++ return ""; ++ } ++} ++ ++static void ft_print_comp_flag(uint64_t bind, uint64_t op) ++{ ++ printf("(bind-%s, op-%s)", (bind & FI_SELECTIVE_COMPLETION) ? ++ "FI_SELECTIVE_COMPLETION" : "NONE", ++ op ? fi_tostr(&op, FI_TYPE_OP_FLAGS) : "NONE"); ++} ++ ++static void ft_print_comp(struct ft_info *test) ++{ ++ if (ft_use_comp_cq(test->comp_type)) { ++ printf("comp_queue -- tx "); ++ ft_print_comp_flag(test->tx_cq_bind_flags, test->tx_op_flags); ++ printf(", rx: "); ++ ft_print_comp_flag(test->rx_cq_bind_flags, test->rx_op_flags); ++ printf(", "); ++ } ++ if (ft_use_comp_cntr(test->comp_type)) ++ printf("comp_cntr, "); ++} ++ ++static void ft_show_test_info(void) ++{ ++ printf("[%s,", test_info.prov_name); ++ printf(" %s,", ft_test_type_str(test_info.test_type)); ++ if (test_info.test_class & FI_ATOMIC) { ++ printf(" %s ", ft_class_func_str(test_info.class_function)); ++ printf("(%s, ", fi_tostr(&test_info.op, FI_TYPE_ATOMIC_OP)); ++ printf("%s)--", fi_tostr(&test_info.datatype, FI_TYPE_ATOMIC_TYPE)); ++ } else { ++ printf(" %s--", ft_class_func_str(test_info.class_function)); ++ } ++ printf("%s,", fi_tostr(&test_info.msg_flags, FI_TYPE_OP_FLAGS)); ++ printf(" %s,", fi_tostr(&test_info.ep_type, FI_TYPE_EP_TYPE)); ++ printf(" %s,", fi_tostr(&test_info.av_type, FI_TYPE_AV_TYPE)); ++ printf(" eq_%s,", ft_wait_obj_str(test_info.eq_wait_obj)); ++ printf(" cq_%s,", ft_wait_obj_str(test_info.cq_wait_obj)); ++ printf(" cntr_%s, ", ft_wait_obj_str(test_info.cq_wait_obj)); ++ ft_print_comp(&test_info); ++ printf(" %s,", fi_tostr(&test_info.progress, FI_TYPE_PROGRESS)); ++ printf(" [%s],", fi_tostr(&test_info.mr_mode, FI_TYPE_MR_MODE)); ++ printf(" [%s],", fi_tostr(&test_info.mode, FI_TYPE_MODE)); ++ printf(" [%s]]\n", fi_tostr(&test_info.caps, FI_TYPE_CAPS)); ++} ++ ++static int ft_check_info(struct fi_info *hints, struct fi_info *info) ++{ ++ if (info->mode & ~hints->mode) { ++ fprintf(stderr, "fi_getinfo unsupported mode returned:\n"); ++ fprintf(stderr, "hints mode: %s\n", ++ fi_tostr(&hints->mode, FI_TYPE_MODE)); ++ fprintf(stderr, "info mode: %s\n", ++ fi_tostr(&info->mode, FI_TYPE_MODE)); ++ return -FI_EINVAL; ++ } ++ if (hints->caps != (hints->caps & info->caps)) { ++ fprintf(stderr, "fi_getinfo missing caps:\n"); ++ fprintf(stderr, "hints caps: %s\n", ++ fi_tostr(&hints->caps, FI_TYPE_CAPS)); ++ fprintf(stderr, "info caps: %s\n", ++ fi_tostr(&info->caps, FI_TYPE_CAPS)); ++ return -FI_EINVAL; ++ } ++ ++ return 0; ++} ++ ++static void ft_fw_convert_info(struct fi_info *info, struct ft_info *test_info) ++{ ++ info->caps = test_info->caps; ++ ++ info->mode = test_info->mode; ++ ++ info->domain_attr->mr_mode = test_info->mr_mode; ++ info->domain_attr->av_type = test_info->av_type; ++ info->domain_attr->data_progress = test_info->progress; ++ ++ info->ep_attr->type = test_info->ep_type; ++ info->ep_attr->protocol = test_info->protocol; ++ info->ep_attr->protocol_version = test_info->protocol_version; ++ ++ if (!ft_nullstr(test_info->prov_name)) { ++ info->fabric_attr->prov_name = strndup(test_info->prov_name, ++ sizeof test_info->prov_name - 1); ++ } ++ if (!ft_nullstr(test_info->fabric_name)) { ++ info->fabric_attr->name = strndup(test_info->fabric_name, ++ sizeof test_info->fabric_name - 1); ++ } ++ ++ info->tx_attr->op_flags = test_info->tx_op_flags; ++ info->rx_attr->op_flags = test_info->rx_op_flags; ++ ++ if (is_data_func(test_info->class_function) || ++ (is_msg_func(test_info->class_function) && ++ test_info->msg_flags & FI_REMOTE_CQ_DATA)) { ++ info->domain_attr->cq_data_size = 4; ++ info->mode |= FI_RX_CQ_DATA; ++ } ++} ++ ++static void ++ft_fw_update_info(struct ft_info *test_info, struct fi_info *info, int subindex) ++{ ++ test_info->test_subindex = subindex; ++ ++ if (info->ep_attr) { ++ test_info->protocol = info->ep_attr->protocol; ++ test_info->protocol_version = info->ep_attr->protocol_version; ++ } ++ ++ if (info->fabric_attr) { ++ if (info->fabric_attr->prov_name) { ++ strncpy(test_info->prov_name, info->fabric_attr->prov_name, ++ sizeof test_info->prov_name - 1); ++ } ++ if (info->fabric_attr->name) { ++ strncpy(test_info->fabric_name, info->fabric_attr->name, ++ sizeof test_info->fabric_name - 1); ++ } ++ } ++ ++ if (info->domain_attr) ++ test_info->progress = info->domain_attr->data_progress; ++} ++ ++static int ft_fw_result_index(int fi_errno) ++{ ++ switch (fi_errno) { ++ case 0: ++ return FT_SUCCESS; ++ case FI_ENODATA: ++ return FT_ENODATA; ++ case FI_ENOSYS: ++ return FT_ENOSYS; ++ case FI_EIO: ++ return FT_EIO; ++ default: ++ return FT_ERROR; ++ } ++} ++ ++static int ft_recv_test_info(void) ++{ ++ int ret; ++ ++ ret = ft_sock_recv(sock, &test_info, sizeof test_info); ++ if (ret) ++ return ret; ++ ++ test_info.node[sizeof(test_info.node) - 1] = '\0'; ++ test_info.service[sizeof(test_info.service) - 1] = '\0'; ++ test_info.prov_name[sizeof(test_info.prov_name) - 1] = '\0'; ++ test_info.fabric_name[sizeof(test_info.fabric_name) - 1] = '\0'; ++ return 0; ++} ++ ++static int ft_exchange_uint32(uint32_t local, uint32_t *remote) ++{ ++ uint32_t local_net = htonl(local); ++ int ret; ++ ++ ret = ft_sock_send(sock, &local_net, sizeof local); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_recv(sock, remote, sizeof *remote); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ ++ *remote = ntohl(*remote); ++ ++ return 0; ++} ++ ++static int ft_skip_info(struct fi_info *hints, struct fi_info *info) ++{ ++ uint32_t remote_protocol, skip, remote_skip; ++ size_t len; ++ int ret; ++ ++ //make sure remote side is using the same protocol ++ ret = ft_exchange_uint32(info->ep_attr->protocol, &remote_protocol); ++ if (ret) ++ return ret; ++ ++ if (info->ep_attr->protocol != remote_protocol) ++ return 1; ++ ++ //check needed to skip utility providers, unless requested ++ skip = (!ft_util_name(hints->fabric_attr->prov_name, &len) && ++ strcmp(hints->fabric_attr->prov_name, ++ info->fabric_attr->prov_name)); ++ ++ ret = ft_exchange_uint32(skip, &remote_skip); ++ if (ret) ++ return ret; ++ ++ return skip || remote_skip; ++} ++ ++static int ft_transfer_subindex(int subindex, int *remote_idx) ++{ ++ int ret; ++ ++ ret = ft_sock_send(sock, &subindex, sizeof subindex); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_recv(sock, remote_idx, sizeof *remote_idx); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int ft_fw_process_list_server(struct fi_info *hints, struct fi_info *info) ++{ ++ int ret, subindex, remote_idx = 0, result = -FI_ENODATA, end_test = 0; ++ int server_ready = 0; ++ struct fi_info *open_res_info; ++ ++ ret = ft_sock_send(sock, &test_info, sizeof test_info); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ for (subindex = 1, fabric_info = info; fabric_info; ++ fabric_info = fabric_info->next, subindex++) { ++ ++ ret = ft_check_info(hints, fabric_info); ++ if (ret) ++ return ret; ++ ++ /* Stores the fabric_info into a tmp variable, resolves an issue caused ++ * by ft_accept with FI_EP_MSG which overwrites the fabric_info. ++ */ ++ open_res_info = fabric_info; ++ while (1) { ++ fabric_info = open_res_info; ++ ret = ft_open_res(); ++ if (ret) { ++ FT_PRINTERR("ft_open_res", ret); ++ return ret; ++ } ++ ++ if (!server_ready) { ++ server_ready = 1; ++ ret = ft_sock_send(sock, &server_ready, sizeof server_ready); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ } ++ ++ ret = ft_sock_recv(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ if (end_test) { ++ ft_cleanup(); ++ break; ++ } ++ ++ if (ft_skip_info(hints, fabric_info)) { ++ ft_cleanup(); ++ continue; ++ } ++ ++ ret = ft_transfer_subindex(subindex, &remote_idx); ++ if (ret) ++ return ret; ++ ++ ft_fw_update_info(&test_info, fabric_info, subindex); ++ ++ printf("Starting test %d-%d-%d: ", test_info.test_index, ++ subindex, remote_idx); ++ ft_show_test_info(); ++ ++ result = ft_init_test(); ++ if (result) ++ continue; ++ ++ result = ft_run_test(); ++ ++ ret = ft_sock_send(sock, &result, sizeof result); ++ if (result) { ++ FT_PRINTERR("ft_run_test", result); ++ } else if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ } ++ ++ end_test = (fabric_info->next == NULL); ++ ret = ft_sock_send(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ } ++ ++ test_info.prov_name[0] = '\0'; ++ ret = ft_sock_send(sock, &test_info, sizeof test_info); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ if (subindex == 1) ++ return -FI_ENODATA; ++ ++ return result; ++} ++ ++static int ft_fw_process_list_client(struct fi_info *hints, struct fi_info *info) ++{ ++ int ret, subindex, remote_idx = 0, result = -FI_ENODATA, sresult, end_test = 0; ++ ++ while (!end_test) { ++ for (subindex = 1, fabric_info = info; fabric_info; ++ fabric_info = fabric_info->next, subindex++) { ++ ++ end_test = 0; ++ ret = ft_sock_send(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ if (ft_skip_info(hints, fabric_info)) ++ continue; ++ ++ ret = ft_transfer_subindex(subindex, &remote_idx); ++ if (ret) ++ return ret; ++ ++ ret = ft_check_info(hints, fabric_info); ++ if (ret) ++ return ret; ++ ++ ft_fw_update_info(&test_info, fabric_info, subindex); ++ printf("Starting test %d-%d-%d: ", test_info.test_index, ++ subindex, remote_idx); ++ ft_show_test_info(); ++ ++ ret = ft_open_res(); ++ if (ret) { ++ FT_PRINTERR("ft_open_res", ret); ++ return ret; ++ } ++ ++ result = ft_init_test(); ++ if (result) ++ continue; ++ ++ result = ft_run_test(); ++ ++ ret = ft_sock_recv(sock, &sresult, sizeof sresult); ++ if (result && result != -FI_EIO) { ++ FT_PRINTERR("ft_run_test", result); ++ fprintf(stderr, "Node: %s\nService: %s \n", ++ test_info.node, test_info.service); ++ fprintf(stderr, "%s\n", fi_tostr(hints, FI_TYPE_INFO)); ++ return -FI_EOTHER; ++ } else if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ result = ret; ++ return -FI_EOTHER; ++ } else if (sresult) { ++ result = sresult; ++ if (sresult != -FI_EIO) ++ return -FI_EOTHER; ++ } ++ } ++ end_test = 1; ++ ret = ft_sock_send(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_recv(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ } ++ ++ if (subindex == 1) ++ return -FI_ENODATA; ++ ++ return result; ++} ++ ++static int ft_server_child() ++{ ++ struct fi_info *hints, *info; ++ int ret; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return -FI_ENOMEM; ++ ++ ft_fw_convert_info(hints, &test_info); ++ printf("Starting test %d:\n", test_info.test_index); ++ ++ ret = fi_getinfo(FT_FIVERSION, ft_strptr(test_info.node), ++ ft_strptr(test_info.service), FI_SOURCE, ++ hints, &info); ++ if (ret && ret != -FI_ENODATA) { ++ FT_PRINTERR("fi_getinfo", ret); ++ } else { ++ ret = ft_fw_process_list_server(hints, info); ++ if (ret != -FI_ENODATA) ++ fi_freeinfo(info); ++ ++ if (ret && ret != -FI_EIO) { ++ FT_PRINTERR("ft_fw_process_list", ret); ++ printf("Node: %s\nService: %s\n", ++ test_info.node, test_info.service); ++ printf("%s\n", fi_tostr(hints, FI_TYPE_INFO)); ++ } ++ } ++ fi_freeinfo(hints); ++ ++ printf("Ending test %d, result: %s\n", test_info.test_index, ++ fi_strerror(-ret)); ++ ++ return ret; ++} ++ ++static int ft_fw_server(void) ++{ ++ int ret; ++ pid_t pid; ++ ++ do { ++ ret = ft_recv_test_info(); ++ if (ret) { ++ if (ret == -FI_ENOTCONN) ++ ret = 0; ++ break; ++ } ++ ++ if (do_fork) { ++ pid = fork(); ++ if (!pid) { ++ ret = ft_server_child(); ++ _exit(-ret); ++ } else { ++ waitpid(pid, &ret, 0); ++ ret = WEXITSTATUS(ret); ++ } ++ } else { ++ ret = ft_server_child(); ++ } ++ ++ results[ft_fw_result_index(ret)]++; ++ ++ } while (!ret || ret == FI_EIO || ret == FI_ENODATA); ++ ++ return ret; ++} ++ ++static int ft_client_child(void) ++{ ++ struct fi_info *hints, *info; ++ int ret, result, server_ready = 0; ++ ++ result = -FI_ENODATA; ++ hints = fi_allocinfo(); ++ if (!hints) ++ return -FI_ENOMEM; ++ ++ ret = ft_getsrcaddr(opts.src_addr, opts.src_port, hints); ++ if (ret) ++ return ret; ++ ++ ft_fw_convert_info(hints, &test_info); ++ ++ printf("Starting test %d / %d:\n", test_info.test_index, ++ series->test_count); ++ while (!ft_nullstr(test_info.prov_name)) { ++ printf("Starting test %d-%d: ", test_info.test_index, ++ test_info.test_subindex); ++ ft_show_test_info(); ++ ++ ret = ft_sock_recv(sock, &server_ready, sizeof server_ready); ++ if (ret) ++ return ret; ++ ++ if (!server_ready) ++ return -FI_EOTHER; ++ ++ result = fi_getinfo(FT_FIVERSION, ft_strptr(test_info.node), ++ ft_strptr(test_info.service), 0, hints, &info); ++ if (result) { ++ FT_PRINTERR("fi_getinfo", result); ++ } ++ ++ ret = ft_fw_process_list_client(hints, info); ++ if (ret != -FI_ENODATA) ++ fi_freeinfo(info); ++ else ++ goto out; ++ ++ ret = ft_recv_test_info(); ++ if (ret) { ++ FT_PRINTERR("ft_recv_test_info", ret); ++ goto out; ++ } ++ ft_fw_convert_info(hints, &test_info); ++ } ++ ++ printf("Ending test %d / %d, result: %s\n", test_info.test_index, ++ series->test_count, fi_strerror(-result)); ++out: ++ fi_freeinfo(hints); ++ return result; ++} ++ ++static int ft_fw_client(void) ++{ ++ int ret, result; ++ pid_t pid; ++ ++ ++ for (fts_start(series, test_start_index); ++ !fts_end(series, test_end_index); ++ fts_next(series)) { ++ ++ fts_cur_info(series, &test_info); ++ if (!fts_info_is_valid()) { ++ printf("Skipping test %d (invalid):\n", test_info.test_index); ++ ft_show_test_info(); ++ results[FT_SKIP]++; ++ continue; ++ } ++ ++ ret = ft_sock_send(sock, &test_info, sizeof test_info); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_recv_test_info(); ++ if (ret) { ++ FT_PRINTERR("ft_recv_test_info", ret); ++ return ret; ++ } ++ ++ if (do_fork) { ++ pid = fork(); ++ if (!pid) { ++ result = ft_client_child(); ++ _exit(-result); ++ } else { ++ waitpid(pid, &result, 0); ++ result = WEXITSTATUS(result); ++ } ++ } else { ++ result = ft_client_child(); ++ } ++ ++ results[ft_fw_result_index(result)]++; ++ } ++ return 0; ++} ++ ++static void ft_fw_show_results(void) ++{ ++ printf("Success: %d\n", results[FT_SUCCESS]); ++ printf("Skipped: %d\n", results[FT_SKIP]); ++ printf("ENODATA: %d\n", results[FT_ENODATA]); ++ printf("ENOSYS : %d\n", results[FT_ENOSYS]); ++ printf("EIO : %d\n", results[FT_EIO]); ++ printf("ERROR : %d\n", results[FT_ERROR]); ++} ++ ++static void ft_fw_usage(char *program) ++{ ++ fprintf(stderr, "Usage:\n"); ++ fprintf(stderr, " %s [OPTIONS] \t\t\tstart server\n", program); ++ fprintf(stderr, " %s [OPTIONS] \tconnect to server\n", program); ++ fprintf(stderr, "\nOptions:\n"); ++ FT_PRINT_OPTS_USAGE("-q ", "Management port for test"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++ fprintf(stderr, "\nServer only options:\n"); ++ FT_PRINT_OPTS_USAGE("-x", "exit after test run"); ++ fprintf(stderr, "\nClient only options:\n"); ++ FT_PRINT_OPTS_USAGE("-u ", "test configuration file " ++ "(Either config file or both provider and test name are required)"); ++ FT_PRINT_OPTS_USAGE("-p ", " provider name"); ++ FT_PRINT_OPTS_USAGE("-t ", "test name"); ++ FT_PRINT_OPTS_USAGE("-y ", ""); ++ FT_PRINT_OPTS_USAGE("-z ", ""); ++ FT_PRINT_OPTS_USAGE("-s
", "source address"); ++ FT_PRINT_OPTS_USAGE("-B ", "non default source port number"); ++ FT_PRINT_OPTS_USAGE("-P ", "non default destination port number " ++ "(config file service parameter will override this)"); ++} ++ ++void ft_free() ++{ ++ if (filename) ++ free(filename); ++ if (testname) ++ free(testname); ++ if (provname) ++ free(provname); ++} ++ ++static int ft_get_config_file(char *provname, char *testname, char **filename) ++{ ++ char **prov_vec, **path_vec, *str; ++ size_t i, prov_count, path_count, len; ++ int ret = -FI_ENOMEM; ++ ++ // TODO use macro for ";" ++ prov_vec = ft_split_and_alloc(provname, ";", &prov_count); ++ if (!prov_vec) { ++ FT_ERR("Unable to split provname\n"); ++ return -FI_EINVAL; ++ } ++ ++ /* prov_count + count_of(CONFIG_PATH, "test_configs", "testname", ".test") */ ++ path_count = prov_count + 4; ++ path_vec = calloc(path_count, sizeof(*path_vec)); ++ if (!path_vec) ++ goto err1; ++ ++ path_vec[0] = CONFIG_PATH; ++ path_vec[1] = "test_configs"; ++ ++ /* Path for "prov1;prov2;prov3;..." is ".../prov3/prov2/prov1" */ ++ for (i = 0; i < prov_count; i++) ++ path_vec[i + 2] = prov_vec[prov_count - i - 1]; ++ ++ path_vec[prov_count + 2] = testname; ++ path_vec[prov_count + 3] = "test"; ++ ++ for (i = 0, len = 0; i < path_count; i++) ++ len += strlen(path_vec[i]) + 1; ++ ++ // NULL char at the end ++ len++; ++ ++ *filename = calloc(1, len); ++ if (!*filename) ++ goto err2; ++ ++ for (i = 0, str = *filename; i < path_count; i++) { ++ if (i < path_count - 1) ++ ret = snprintf(str, len, "/%s", path_vec[i]); ++ else ++ ret = snprintf(str, len, ".%s", path_vec[i]); ++ if (ret < 0) ++ goto err3; ++ ++ if (ret >= (int)len) { ++ ret = -FI_ETRUNC; ++ goto err3; ++ } ++ str += ret; ++ len -= ret; ++ } ++ free(path_vec); ++ ft_free_string_array(prov_vec); ++ return 0; ++err3: ++ free(*filename); ++ *filename = NULL; ++err2: ++ free(path_vec); ++err1: ++ ft_free_string_array(prov_vec); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ char *service = "2710"; ++ opts = INIT_OPTS; ++ int ret, op; ++ ++ while ((op = getopt(argc, argv, "p:u:t:q:xy:z:hf" ADDR_OPTS)) != -1) { ++ switch (op) { ++ case 'u': ++ filename = strdup(optarg); ++ break; ++ case 'p': ++ provname = strdup(optarg); ++ break; ++ case 't': ++ testname = strdup(optarg); ++ break; ++ case 'q': ++ service = optarg; ++ break; ++ case 'x': ++ persistent = 0; ++ break; ++ case 'y': ++ test_start_index = atoi(optarg); ++ break; ++ case 'z': ++ test_end_index = atoi(optarg); ++ break; ++ case 'f': ++ do_fork = 1; ++ break; ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_fw_usage(argv[0]); ++ ft_free(); ++ exit(1); ++ } ++ } ++ ++ if (optind < argc - 1) { ++ ft_fw_usage(argv[0]); ++ ft_free(); ++ exit(1); ++ } ++ ++ opts.dst_addr = (optind == argc - 1) ? argv[optind] : NULL; ++ if (opts.dst_addr) { ++ if (!opts.dst_port) ++ opts.dst_port = default_port; ++ if (!filename) { ++ if (!testname || !provname) { ++ ft_fw_usage(argv[0]); ++ ft_free(); ++ exit(1); ++ } else { ++ ret = ft_get_config_file(provname, testname, ++ &filename); ++ if (ret < 0) { ++ ft_free(); ++ exit(1); ++ } ++ } ++ } else { ++ testname = NULL; ++ provname = NULL; ++ } ++ series = fts_load(filename); ++ if (!series) { ++ ft_free(); ++ exit(1); ++ } ++ ++ ret = ft_sock_connect(opts.dst_addr, service); ++ if (ret) ++ goto out; ++ ++ ret = ft_fw_client(); ++ if (ret) ++ FT_PRINTERR("ft_fw_client", ret); ++ ft_sock_shutdown(sock); ++ } else { ++ ret = ft_sock_listen(opts.src_addr, service); ++ if (ret) ++ goto out; ++ ++ do { ++ ret = ft_sock_accept(); ++ if (ret) ++ goto out; ++ ++ ret = ft_fw_server(); ++ if (ret) ++ FT_PRINTERR("ft_fw_server", ret); ++ ft_sock_shutdown(sock); ++ } while (persistent); ++ } ++ ++ ft_fw_show_results(); ++out: ++ if (opts.dst_addr) ++ fts_close(series); ++ ft_free(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/verify.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/verify.c +new file mode 100644 +index 0000000..08011b5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/verify.c +@@ -0,0 +1,184 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "ofi_atomic.h" ++#include "fabtest.h" ++ ++static int alph_index = 0; ++static const char integ_alphabet[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; ++static const int integ_alphabet_length = (sizeof(integ_alphabet)/sizeof(*integ_alphabet)) - 1; ++ ++#define CHECK_LOCAL(res,local,cnt,ret,TYPE) \ ++ do { \ ++ int i; \ ++ TYPE *r = (res); \ ++ TYPE *l = (local); \ ++ for (i = 0; i < cnt; i++) { \ ++ if (r[i] != l[i]) { \ ++ ret = -FI_EIO; \ ++ break; \ ++ } \ ++ } \ ++ } while (0) \ ++ ++ ++#define FT_FILL(dst,cnt,TYPE) \ ++ do { \ ++ int i; \ ++ TYPE *d = (dst); \ ++ for (i = 0; i < cnt; i++) { \ ++ d[i] = (TYPE) (integ_alphabet[alph_index++]); \ ++ if (alph_index >= integ_alphabet_length) \ ++ alph_index = 0; \ ++ } \ ++ } while (0) ++ ++#define SWITCH_TYPES(type,FUNC,...) \ ++ switch (type) { \ ++ case FI_INT8: FUNC(__VA_ARGS__,int8_t); break; \ ++ case FI_UINT8: FUNC(__VA_ARGS__,uint8_t); break; \ ++ case FI_INT16: FUNC(__VA_ARGS__,int16_t); break; \ ++ case FI_UINT16: FUNC(__VA_ARGS__,uint16_t); break; \ ++ case FI_INT32: FUNC(__VA_ARGS__,int32_t); break; \ ++ case FI_UINT32: FUNC(__VA_ARGS__,uint32_t); break; \ ++ case FI_INT64: FUNC(__VA_ARGS__,int64_t); break; \ ++ case FI_UINT64: FUNC(__VA_ARGS__,uint64_t); break; \ ++ case FI_FLOAT: FUNC(__VA_ARGS__,float); break; \ ++ case FI_DOUBLE: FUNC(__VA_ARGS__,double); break; \ ++ case FI_LONG_DOUBLE: FUNC(__VA_ARGS__,long_double); break; \ ++ case FI_FLOAT_COMPLEX: FUNC(__VA_ARGS__,ofi_complex_float); break; \ ++ case FI_DOUBLE_COMPLEX: FUNC(__VA_ARGS__,ofi_complex_double); break; \ ++ case FI_LONG_DOUBLE_COMPLEX: FUNC(__VA_ARGS__,ofi_complex_long_double); break;\ ++ default: return -FI_EOPNOTSUPP; \ ++ } ++ ++int ft_sync_fill_bufs(size_t size) ++{ ++ ft_sock_sync(0); ++ ++ if (test_info.caps & FI_ATOMIC) { ++ SWITCH_TYPES(ft_atom_ctrl.datatype, FT_FILL, ft_tx_ctrl.buf, ++ ft_atom_ctrl.count); ++ SWITCH_TYPES(ft_atom_ctrl.datatype, FT_FILL, ft_mr_ctrl.buf, ++ ft_atom_ctrl.count); ++ memcpy(ft_atom_ctrl.orig_buf, ft_mr_ctrl.buf, size); ++ memcpy(ft_tx_ctrl.cpy_buf, ft_tx_ctrl.buf, size); ++ } else if (is_read_func(test_info.class_function)) { ++ ft_fill_buf(ft_mr_ctrl.buf, size); ++ } else { ++ ft_fill_buf(ft_tx_ctrl.buf, size); ++ memcpy(ft_tx_ctrl.cpy_buf, ft_tx_ctrl.buf, size); ++ } ++ ++ ft_sock_sync(0); ++ ++ return 0; ++} ++ ++static int verify_atomic(void) ++{ ++ int ret = 0; ++ void *dst, *src, *cmp, *tmp, *res; ++ enum fi_datatype type; ++ enum fi_op op; ++ size_t count; ++ ++ dst = ft_atom_ctrl.orig_buf; ++ src = ft_tx_ctrl.cpy_buf; ++ cmp = ft_atom_ctrl.comp_buf; ++ tmp = ft_rx_ctrl.buf; ++ res = ft_atom_ctrl.res_buf; ++ ++ type = ft_atom_ctrl.datatype; ++ op = ft_atom_ctrl.op; ++ count = ft_atom_ctrl.count; ++ ++ if (is_fetch_func(test_info.class_function) || ++ is_compare_func(test_info.class_function)) { ++ SWITCH_TYPES(type, CHECK_LOCAL, dst, res, count, ret); ++ if (ret) ++ return ret; ++ } ++ ++ if (is_compare_func(test_info.class_function)) { ++ ofi_atomic_swap_handlers[op - OFI_SWAP_OP_START][type](dst, ++ src, cmp, tmp, count); ++ } else if (is_fetch_func(test_info.class_function)) { ++ ofi_atomic_readwrite_handlers[op][type](dst, ++ src, tmp, count); ++ } else { ++ ofi_atomic_write_handlers[op][type](dst, src, count); ++ } ++ ++ SWITCH_TYPES(type, CHECK_LOCAL, dst, ft_mr_ctrl.buf, count, ret); ++ ++ return ret; ++} ++ ++int ft_verify_bufs() ++{ ++ char *compare_buf; ++ size_t compare_size; ++ ++ if (test_info.caps & FI_ATOMIC) ++ return verify_atomic(); ++ ++ if (test_info.caps & FI_RMA) { ++ compare_size = ft_tx_ctrl.rma_msg_size; ++ if (is_read_func(test_info.class_function)) ++ compare_buf = (char *) ft_tx_ctrl.buf; ++ else ++ compare_buf = (char *) ft_mr_ctrl.buf; ++ } else { ++ compare_size = ft_tx_ctrl.msg_size; ++ compare_buf = (char *) ft_rx_ctrl.buf; ++ } ++ ++ return ft_check_buf(compare_buf, compare_size) ? -FI_EIO : 0; ++} ++ ++void ft_verify_comp(void *buf) ++{ ++ struct fi_cq_data_entry *comp; ++ ++ if (ft_rx_ctrl.cq_format != FI_CQ_FORMAT_DATA) ++ return; ++ ++ comp = (struct fi_cq_data_entry *) buf; ++ ++ if (comp->flags & FI_REMOTE_CQ_DATA) { ++ if (comp->data == ft_tx_ctrl.remote_cq_data) ++ ft_ctrl.verify_cnt++; ++ } ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/xfer.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/xfer.c +new file mode 100644 +index 0000000..7d7bc5f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/xfer.c +@@ -0,0 +1,857 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include "fabtest.h" ++ ++ ++static int ft_post_recv(void) ++{ ++ struct fi_msg msg; ++ int ret; ++ struct fi_context *ctx = NULL; ++ uint64_t flags = 0; ++ ++ if (test_info.msg_flags == FI_COMPLETION) ++ flags = test_info.msg_flags; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC) || ++ ft_generates_rx_comp()) { ++ ret = ft_get_ctx(&ft_rx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ if (fabric_info->caps & FI_DIRECTED_RECV) ++ ft_rx_ctrl.addr = ft_tx_ctrl.addr; ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_SENDV: ++ ft_format_iov(ft_rx_ctrl.iov, ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ++ ft_rx_ctrl.buf, ft_rx_ctrl.msg_size); ++ ret = fi_recvv(ft_rx_ctrl.ep, ft_rx_ctrl.iov, ft_rx_ctrl.iov_desc, ++ ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ft_rx_ctrl.addr, ctx); ++ ft_next_iov_cnt(&ft_rx_ctrl, fabric_info->rx_attr->iov_limit); ++ break; ++ case FT_FUNC_SENDMSG: ++ ft_format_iov(ft_rx_ctrl.iov, ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ++ ft_rx_ctrl.buf, ft_rx_ctrl.msg_size); ++ msg.msg_iov = ft_rx_ctrl.iov; ++ msg.desc = ft_rx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_rx_ctrl.iov_iter]; ++ msg.addr = ft_rx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ ret = fi_recvmsg(ft_rx_ctrl.ep, &msg, flags); ++ ft_next_iov_cnt(&ft_rx_ctrl, fabric_info->rx_attr->iov_limit); ++ break; ++ default: ++ ret = fi_recv(ft_rx_ctrl.ep, ft_rx_ctrl.buf, ft_rx_ctrl.msg_size, ++ ft_rx_ctrl.memdesc, ft_rx_ctrl.addr, ctx); ++ break; ++ } ++ ++ return ret; ++} ++ ++static int ft_post_trecv(void) ++{ ++ struct fi_msg_tagged msg; ++ int ret; ++ struct fi_context *ctx = NULL; ++ uint64_t flags = 0; ++ ++ if (test_info.msg_flags == FI_COMPLETION) ++ flags = test_info.msg_flags; ++ ++ if (ft_generates_rx_comp()) { ++ ret = ft_get_ctx(&ft_rx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ if (fabric_info->caps & FI_DIRECTED_RECV) ++ ft_rx_ctrl.addr = ft_tx_ctrl.addr; ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_SENDV: ++ ft_format_iov(ft_rx_ctrl.iov, ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ++ ft_rx_ctrl.buf, ft_rx_ctrl.msg_size); ++ ret = fi_trecvv(ft_rx_ctrl.ep, ft_rx_ctrl.iov, ft_rx_ctrl.iov_desc, ++ ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ft_rx_ctrl.addr, ++ ft_rx_ctrl.tag, 0, ctx); ++ ft_next_iov_cnt(&ft_rx_ctrl, fabric_info->rx_attr->iov_limit); ++ break; ++ case FT_FUNC_SENDMSG: ++ ft_format_iov(ft_rx_ctrl.iov, ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ++ ft_rx_ctrl.buf, ft_rx_ctrl.msg_size); ++ msg.msg_iov = ft_rx_ctrl.iov; ++ msg.desc = ft_rx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_rx_ctrl.iov_iter]; ++ msg.addr = ft_rx_ctrl.addr; ++ msg.tag = ft_rx_ctrl.tag; ++ msg.ignore = 0; ++ msg.context = ctx; ++ ret = fi_trecvmsg(ft_rx_ctrl.ep, &msg, flags); ++ ft_next_iov_cnt(&ft_rx_ctrl, fabric_info->rx_attr->iov_limit); ++ break; ++ default: ++ ret = fi_trecv(ft_rx_ctrl.ep, ft_rx_ctrl.buf, ft_rx_ctrl.msg_size, ++ ft_rx_ctrl.memdesc, ft_rx_ctrl.addr, ft_rx_ctrl.tag, 0, ctx); ++ break; ++ } ++ return ret; ++} ++ ++#define ft_send_retry(ret, send, ep, ...) \ ++ do { \ ++ ret = send(ep, ##__VA_ARGS__); \ ++ if (ret == -FI_EAGAIN) \ ++ ft_comp_tx(0); \ ++ } while (ret == -FI_EAGAIN) ++ ++static int ft_post_send(void) ++{ ++ struct fi_msg msg; ++ int ret; ++ struct fi_context *ctx = NULL; ++ ++ if (ft_generates_tx_comp()) { ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_SENDV: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.msg_size); ++ ft_send_retry(ret, fi_sendv, ft_tx_ctrl.ep, ft_tx_ctrl.iov, ++ ft_tx_ctrl.iov_desc, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.addr, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_SENDMSG: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.msg_size); ++ msg.msg_iov = ft_tx_ctrl.iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ ft_send_retry(ret, fi_sendmsg, ft_tx_ctrl.ep, &msg, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_INJECT: ++ ft_send_retry(ret, fi_inject, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.addr); ++ break; ++ case FT_FUNC_INJECTDATA: ++ ft_send_retry(ret, fi_injectdata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.remote_cq_data, ++ ft_tx_ctrl.addr); ++ break; ++ case FT_FUNC_SENDDATA: ++ ft_send_retry(ret, fi_senddata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.remote_cq_data, ft_tx_ctrl.addr, ctx); ++ break; ++ default: ++ ft_send_retry(ret, fi_send, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ctx); ++ break; ++ } ++ ++ if (ft_check_tx_completion()) ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++static int ft_post_tsend(void) ++{ ++ struct fi_msg_tagged msg; ++ int ret; ++ struct fi_context *ctx = NULL; ++ ++ if (ft_generates_tx_comp()) { ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_SENDV: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.msg_size); ++ ft_send_retry(ret, fi_tsendv, ft_tx_ctrl.ep, ft_tx_ctrl.iov, ++ ft_tx_ctrl.iov_desc, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.addr, ft_tx_ctrl.tag, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_SENDMSG: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.msg_size); ++ msg.msg_iov = ft_tx_ctrl.iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.tag = ft_tx_ctrl.tag; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ ft_send_retry(ret, fi_tsendmsg, ft_tx_ctrl.ep, &msg, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_INJECT: ++ ft_send_retry(ret, fi_tinject, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.addr, ft_tx_ctrl.tag); ++ break; ++ case FT_FUNC_INJECTDATA: ++ ft_send_retry(ret, fi_tinjectdata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.remote_cq_data, ++ ft_tx_ctrl.addr, ft_tx_ctrl.tag); ++ break; ++ case FT_FUNC_SENDDATA: ++ ft_send_retry(ret, fi_tsenddata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.remote_cq_data, ft_tx_ctrl.addr, ++ ft_tx_ctrl.tag, ctx); ++ break; ++ default: ++ ft_send_retry(ret, fi_tsend, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ft_tx_ctrl.tag, ctx); ++ break; ++ } ++ ++ if (ft_check_tx_completion()) ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++static int ft_post_send_rma(void) ++{ ++ int ret, i; ++ struct fi_msg_rma msg; ++ struct fi_rma_iov rma_iov; ++ struct fi_context *ctx = NULL; ++ uint64_t read_flags = 0; ++ ++ if (test_info.msg_flags == FI_COMPLETION) ++ read_flags = test_info.msg_flags; ++ ++ if (ft_generates_tx_comp()) { ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_READ: ++ ft_send_retry(ret, fi_read, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.rma_msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ctx); ++ break; ++ case FT_FUNC_READV: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size); ++ ft_send_retry(ret, fi_readv, ft_tx_ctrl.ep, ft_tx_ctrl.iov, ++ ft_tx_ctrl.iov_desc, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_READMSG: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size); ++ ++ msg.msg_iov = ft_tx_ctrl.iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ for (i = 0, rma_iov.len = 0; i < msg.iov_count; i++) ++ rma_iov.len += ft_tx_ctrl.iov[i].iov_len; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ft_send_retry(ret, fi_readmsg, ft_tx_ctrl.ep, &msg, read_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_WRITEV: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size); ++ ft_send_retry(ret, fi_writev, ft_tx_ctrl.ep, ft_tx_ctrl.iov, ++ ft_tx_ctrl.iov_desc, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_WRITEMSG: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size); ++ ++ msg.msg_iov = ft_tx_ctrl.iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ for (i = 0, rma_iov.len = 0; i < msg.iov_count; i++) ++ rma_iov.len += ft_tx_ctrl.iov[i].iov_len; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ft_send_retry(ret, fi_writemsg, ft_tx_ctrl.ep, &msg, ++ test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_INJECT_WRITE: ++ ft_send_retry(ret, fi_inject_write, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.rma_msg_size, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key); ++ break; ++ case FT_FUNC_WRITEDATA: ++ ft_send_retry(ret, fi_writedata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.rma_msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.remote_cq_data, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key, ctx); ++ break; ++ case FT_FUNC_INJECT_WRITEDATA: ++ ft_send_retry(ret, fi_inject_writedata, ft_tx_ctrl.ep, ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size, ++ ft_tx_ctrl.remote_cq_data, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key); ++ break; ++ default: ++ ft_send_retry(ret, fi_write, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.rma_msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ctx); ++ break; ++ } ++ ++ if (ft_check_tx_completion()) ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++int ft_post_send_atomic(void) ++{ ++ int ret, i; ++ struct fi_msg_atomic msg; ++ struct fi_rma_ioc rma_iov; ++ size_t iov_count; ++ struct fi_context *ctx = NULL; ++ ++ if (ft_generates_tx_comp()) { ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_ATOMICV: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ ft_send_retry(ret, fi_atomicv, ft_tx_ctrl.ep, ft_atom_ctrl.ioc, ++ ft_tx_ctrl.iov_desc, iov_count, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.op, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_ATOMICMSG: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ msg.msg_iov = ft_atom_ctrl.ioc; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = iov_count; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ msg.op = ft_atom_ctrl.op; ++ msg.datatype = ft_atom_ctrl.datatype; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ ++ for (i = 0, rma_iov.count = 0; i < msg.iov_count; i++) ++ rma_iov.count += ft_atom_ctrl.ioc[i].count; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ft_send_retry(ret, fi_atomicmsg, ft_tx_ctrl.ep, &msg, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_FETCH_ATOMIC: ++ ft_send_retry(ret, fi_fetch_atomic, ft_tx_ctrl.ep, ++ ft_tx_ctrl.buf, ft_atom_ctrl.count, ft_tx_ctrl.memdesc, ++ ft_atom_ctrl.res_buf, ft_atom_ctrl.res_memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ft_atom_ctrl.datatype, ++ ft_atom_ctrl.op, ctx); ++ break; ++ case FT_FUNC_FETCH_ATOMICV: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ ft_send_retry(ret, fi_fetch_atomicv, ft_tx_ctrl.ep, ++ ft_atom_ctrl.ioc, ft_tx_ctrl.iov_desc, iov_count, ++ ft_atom_ctrl.res_ioc, ft_atom_ctrl.res_memdesc, ++ iov_count, ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ft_atom_ctrl.datatype, ++ ft_atom_ctrl.op, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_FETCH_ATOMICMSG: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ msg.msg_iov = ft_atom_ctrl.ioc; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = iov_count; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ msg.op = ft_atom_ctrl.op; ++ msg.datatype = ft_atom_ctrl.datatype; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ ++ for (i = 0, rma_iov.count = 0; i < msg.iov_count; i++) ++ rma_iov.count += ft_atom_ctrl.ioc[i].count; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ++ ft_send_retry(ret, fi_fetch_atomicmsg, ft_tx_ctrl.ep, &msg, ++ ft_atom_ctrl.res_ioc, ft_atom_ctrl.res_memdesc, ++ iov_count, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_COMPARE_ATOMIC: ++ ft_send_retry(ret, fi_compare_atomic, ft_tx_ctrl.ep, ++ ft_tx_ctrl.buf, ft_atom_ctrl.count, ft_tx_ctrl.memdesc, ++ ft_atom_ctrl.comp_buf, ft_atom_ctrl.comp_memdesc, ++ ft_atom_ctrl.res_buf, ft_atom_ctrl.res_memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ft_atom_ctrl.datatype, ++ ft_atom_ctrl.op, ctx); ++ break; ++ case FT_FUNC_COMPARE_ATOMICV: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ ft_send_retry(ret, fi_compare_atomicv, ft_tx_ctrl.ep, ++ ft_atom_ctrl.ioc, ft_tx_ctrl.iov_desc, iov_count, ++ ft_atom_ctrl.comp_ioc, ft_atom_ctrl.comp_memdesc, ++ iov_count, ft_atom_ctrl.res_ioc, ++ ft_atom_ctrl.res_memdesc, iov_count, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.op, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_COMPARE_ATOMICMSG: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ msg.msg_iov = ft_atom_ctrl.ioc; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = iov_count; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ msg.op = ft_atom_ctrl.op; ++ msg.datatype = ft_atom_ctrl.datatype; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ ++ for (i = 0, rma_iov.count = 0; i < msg.iov_count; i++) ++ rma_iov.count += ft_atom_ctrl.ioc[i].count; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ++ ft_send_retry(ret, fi_compare_atomicmsg, ft_tx_ctrl.ep, &msg, ++ ft_atom_ctrl.comp_ioc, ft_atom_ctrl.comp_memdesc, iov_count, ++ ft_atom_ctrl.res_ioc, ft_atom_ctrl.res_memdesc, ++ iov_count, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_INJECT_ATOMIC: ++ ft_send_retry(ret, fi_inject_atomic, ft_tx_ctrl.ep, ++ ft_tx_ctrl.buf, ft_atom_ctrl.count, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.op); ++ break; ++ default: ++ ft_send_retry(ret, fi_atomic, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_atom_ctrl.count, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ft_atom_ctrl.datatype, ++ ft_atom_ctrl.op, ctx); ++ } ++ ++ if (ft_check_tx_completion()) ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++int ft_send_rma(void) ++{ ++ int ret; ++ ++ while (!ft_tx_ctrl.credits) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ if (test_info.test_class & FI_ATOMIC) ++ ret = ft_post_send_atomic(); ++ else ++ ret = ft_post_send_rma(); ++ ++ if (ret) { ++ FT_PRINTERR("send_rma", ret); ++ return ret; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ test_info.test_type == FT_TEST_UNIT) ++ memset(ft_tx_ctrl.buf, 0, ft_tx_ctrl.rma_msg_size); ++ ++ if (!ft_tx_ctrl.credits) { ++ ret = ft_comp_tx(0); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_post_recv_bufs(void) ++{ ++ int ret; ++ ++ for (; ft_rx_ctrl.credits; ft_rx_ctrl.credits--) { ++ if (test_info.test_class & FI_TAGGED) { ++ ret = ft_post_trecv(); ++ if (!ret) ++ ft_rx_ctrl.tag++; ++ } else { ++ ret = ft_post_recv(); ++ } ++ if (ret) { ++ if (ret == -FI_EAGAIN) ++ break; ++ FT_PRINTERR("recv", ret); ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++int ft_recv_n_msg(int n) ++{ ++ int credits, ret, recved = 0; ++ ++ do { ++ if (ft_rx_ctrl.credits > (ft_rx_ctrl.max_credits >> 1)) { ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ } ++ ++ credits = ft_rx_ctrl.credits; ++ ret = ft_comp_rx(0); ++ if (ret) ++ return ret; ++ ++ //ft_comp_rx may have found multiple completions (bw testing) ++ recved += (ft_rx_ctrl.credits - credits); ++ ++ // handle manual progress. we should progress sends if ++ // we don't get any recv completions. the send could have ++ // been lost. ++ // ft_comp_tx(0); ++ } while (recved < n); ++ ++ return 0; ++} ++ ++int ft_recv_msg(void) ++{ ++ return ft_recv_n_msg(1); ++} ++ ++static int ft_rma_sync(void) ++{ ++ int ret; ++ struct fi_msg_rma msg; ++ struct iovec msg_iov; ++ struct fi_rma_iov rma_iov; ++ struct fi_context *ctx; ++ ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ ++ msg_iov.iov_base = (void *) ft_tx_ctrl.buf; ++ msg_iov.iov_len = 0; ++ msg.msg_iov = &msg_iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = 1; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ rma_iov.len = 0; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ++ ft_send_retry(ret, fi_writemsg, ft_tx_ctrl.ep, &msg, FI_COMPLETION); ++ ++ ft_tx_ctrl.credits--; ++ return ret; ++} ++ ++static int ft_msg_sync(void) ++{ ++ int ret; ++ struct fi_msg msg; ++ struct iovec msg_iov; ++ struct fi_context *ctx; ++ ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ ++ msg_iov.iov_base = (void *) buf; ++ msg_iov.iov_len = 0; ++ ++ msg.msg_iov = &msg_iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = 1; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ ++ ft_send_retry(ret, fi_sendmsg, ft_tx_ctrl.ep, &msg, FI_COMPLETION); ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++static int ft_tmsg_sync(void) ++{ ++ int ret; ++ struct fi_msg_tagged msg; ++ struct iovec msg_iov; ++ struct fi_context *ctx; ++ ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ ++ msg_iov.iov_base = (void *) buf; ++ msg_iov.iov_len = 0; ++ ++ msg.msg_iov = &msg_iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = 1; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ msg.tag = ft_tx_ctrl.tag++; ++ msg.context = ctx; ++ ++ ft_send_retry(ret, fi_tsendmsg, ft_tx_ctrl.ep, &msg, FI_COMPLETION); ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++int ft_send_sync_msg(void) ++{ ++ int ret; ++ ++ while (ft_tx_ctrl.credits != ft_tx_ctrl.max_credits) { ++ ret = ft_comp_tx(0); ++ if (ret) ++ return ret; ++ } ++ ++ if (test_info.test_class & FI_TAGGED) ++ ret = ft_tmsg_sync(); ++ else if (test_info.caps & FI_MSG) ++ ret = ft_msg_sync(); ++ else ++ ret = ft_rma_sync(); ++ ++ if (ret) ++ return ret; ++ ++ return ft_comp_tx(FT_COMP_TO); ++} ++ ++int ft_send_msg(void) ++{ ++ int ret; ++ ++ while (!ft_tx_ctrl.credits) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ if (test_info.test_class & FI_TAGGED) { ++ ret = ft_post_tsend(); ++ if (!ret) ++ ft_tx_ctrl.tag++; ++ } else { ++ ret = ft_post_send(); ++ } ++ ++ if (ret) { ++ FT_PRINTERR("send", ret); ++ return ret; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ test_info.test_type == FT_TEST_UNIT) ++ memset(ft_tx_ctrl.buf, 0, ft_tx_ctrl.msg_size); ++ ++ if (!ft_tx_ctrl.credits) { ++ ret = ft_comp_tx(0); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_send_dgram(void) ++{ ++ int ret; ++ ++ *(uint8_t*) ft_tx_ctrl.buf = ft_tx_ctrl.seqno++; ++ ret = ft_send_msg(); ++ return ret; ++} ++ ++int ft_send_dgram_flood(void) ++{ ++ int i, ret = 0; ++ ++ ft_tx_ctrl.seqno = 0; ++ *(uint8_t*) ft_tx_ctrl.buf = 0; ++ for (i = 0; i < ft_ctrl.xfer_iter - 1; i++) { ++ ret = ft_send_msg(); ++ if (ret) ++ break; ++ } ++ ++ return ret; ++} ++ ++int ft_recv_dgram(void) ++{ ++ int credits, ret; ++ ++ do { ++ if (ft_rx_ctrl.credits > (ft_rx_ctrl.max_credits >> 1)) { ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ } ++ ++ credits = ft_rx_ctrl.credits; ++ ++ ret = ft_comp_rx(FT_DGRAM_POLL_TO); ++ if ((credits != ft_rx_ctrl.credits) && ++ (*(uint8_t *) ft_rx_ctrl.buf == ft_rx_ctrl.seqno)) { ++ ft_rx_ctrl.seqno++; ++ return 0; ++ } ++ } while (!ret); ++ ++ return (ret == -FI_EAGAIN) ? -FI_ETIMEDOUT : ret; ++} ++ ++int ft_recv_dgram_flood(size_t *recv_cnt) ++{ ++ int ret; ++ size_t cnt = 0; ++ ++ do { ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ break; ++ ++ ret = ft_comp_rx(0); ++ cnt += ft_rx_ctrl.credits; ++ ++ } while (!ret && ((*(uint8_t *) ft_rx_ctrl.buf != (uint8_t) ~0) || !cnt)); ++ ++ *recv_cnt = cnt; ++ return ret; ++} ++ ++int ft_sendrecv_dgram(void) ++{ ++ int ret, try; ++ ++ for (try = 0; try < 1000; try++) { ++ ret = ft_send_dgram(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_dgram(); ++ if (ret != -FI_ETIMEDOUT) ++ break; ++ ++ /* resend */ ++ if (test_info.test_class & FI_TAGGED) ++ ft_tx_ctrl.tag--; ++ ft_tx_ctrl.seqno--; ++ } ++ ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/av_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/av_test.c +new file mode 100644 +index 0000000..54a115a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/av_test.c +@@ -0,0 +1,989 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "unit_common.h" ++ ++#define MAX_ADDR 256 ++ ++char *good_address; ++int num_good_addr; ++char *bad_address; ++ ++static enum fi_av_type av_type; ++ ++static char err_buf[512]; ++ ++static int ++check_eq_readerr(struct fid_eq *eq, fid_t fid, void *context, int index) ++{ ++ int ret; ++ struct fi_eq_err_entry err_entry; ++ ++ memset(&err_entry, 0, sizeof(err_entry)); ++ ret = fi_eq_readerr(eq, &err_entry, 0); ++ if (ret != sizeof(err_entry)) { ++ sprintf(err_buf, "fi_eq_readerr ret = %d, %s", ret, ++ (ret < 0) ? fi_strerror(-ret) : "unknown"); ++ return -1; ++ } ++ if (err_entry.fid != fid) { ++ sprintf(err_buf, "fi_eq_readerr fid = %p, should be %p", ++ err_entry.fid, fid); ++ return -1; ++ } ++ if (err_entry.context != context) { ++ sprintf(err_buf, "fi_eq_readerr fid = %p, should be %p", ++ err_entry.context, context); ++ return -1; ++ } ++ if (err_entry.data != index) { ++ sprintf(err_buf, "fi_eq_readerr index = %" PRIu64 ", should be %d", ++ err_entry.data, index); ++ return -1; ++ } ++ if (err_entry.err <= 0) { ++ sprintf(err_buf, "fi_eq_readerr err = %d, should be > 0", ++ err_entry.err); ++ return -1; ++ } ++ return 0; ++} ++ ++static int ++check_eq_result(int ret, uint32_t event, struct fi_eq_entry *entry, ++ fid_t fid, void *context, uint32_t count) ++{ ++ if (ret != sizeof(*entry)) { ++ sprintf(err_buf, "fi_eq_sread ret = %d, %s", ret, ++ (ret < 0) ? fi_strerror(-ret) : "unknown"); ++ return -1; ++ } ++ if (event != FI_AV_COMPLETE) { ++ sprintf(err_buf, "fi_eq_sread event = %u, should be %u", event, ++ FI_AV_COMPLETE); ++ return -1; ++ } ++ if (entry->fid != fid) { ++ sprintf(err_buf, "fi_eq_sread fid = %p, should be %p", ++ entry->fid, fid); ++ return -1; ++ } ++ /* context == NULL means skip check */ ++ if (context != NULL && entry->context != context) { ++ sprintf(err_buf, "fi_eq_sread fid = %p, should be %p", entry->context, ++ context); ++ return -1; ++ } ++ if (count != ~0 && entry->data != count) { ++ sprintf(err_buf, "count = %" PRIu64 ", should be %u", entry->data, count); ++ return -1; ++ } ++ return 0; ++} ++ ++static int ++check_eq_sread(struct fid_eq *eq, fid_t fid, void *context, uint32_t count, ++ int timeout, uint64_t flags) ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ int ret; ++ ++ event = ~0; ++ memset(&entry, 0, sizeof(entry)); ++ ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), timeout, flags); ++ return check_eq_result(ret, event, &entry, fid, context, count); ++} ++ ++static int ++av_test_open_close(enum fi_av_type type, int count, uint64_t flags) ++{ ++ int ret; ++ struct fi_av_attr attr; ++ struct fid_av *av; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = type; ++ attr.count = count; ++ attr.flags = flags; ++ ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%d, %s) = %d, %s", ++ count, fi_tostr(&type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ return ret; ++ } ++ ++ ret = fi_close(&av->fid); ++ if (ret != 0) { ++ sprintf(err_buf, "close(av) = %d, %s", ret, fi_strerror(-ret)); ++ return ret; ++ } ++ return 0; ++} ++ ++/* ++ * Tests: ++ * - test open and close of AV ++ */ ++static int ++av_open_close() ++{ ++ int i; ++ int testret; ++ int ret; ++ int count; ++ ++ testret = FAIL; ++ ++ for (i = 0; i < 17; ++i) { ++ count = 1 << i; ++ ret = av_test_open_close(av_type, count, 0); ++ if (ret != 0) { ++ goto fail; ++ } ++ } ++ testret = PASS; ++fail: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int ++av_create_addr_sockaddr_in(char *first_address, int index, void *addr) ++{ ++ struct addrinfo hints; ++ struct addrinfo *ai; ++ struct sockaddr_in *sin; ++ uint32_t tmp; ++ int ret; ++ ++ memset(&hints, 0, sizeof(hints)); ++ ++ /* return all 0's for invalid address */ ++ if (first_address == NULL) { ++ memset(addr, 0, sizeof(*sin)); ++ return 0; ++ } ++ ++ hints.ai_family = AF_INET; ++ /* port doesn't matter, set port to discard port */ ++ ret = getaddrinfo(first_address, "discard", &hints, &ai); ++ if (ret != 0) { ++ sprintf(err_buf, "getaddrinfo: %s", gai_strerror(ret)); ++ return -1; ++ } ++ ++ sin = (struct sockaddr_in *)addr; ++ *sin = *(struct sockaddr_in *)ai->ai_addr; ++ ++ tmp = ntohl(sin->sin_addr.s_addr); ++ tmp += index; ++ sin->sin_addr.s_addr = htonl(tmp); ++ ++ freeaddrinfo(ai); ++ return 0; ++} ++ ++/* ++ * Create an address list ++ */ ++static int ++av_create_address_list(char *first_address, int base, int num_addr, ++ void *addr_array, int offset, int len) ++{ ++ int (*add_address)(char *, int, void *); ++ uint8_t *cur_addr; ++ int addrlen; ++ int ret; ++ int i; ++ ++ switch (fi->addr_format) { ++ case FI_SOCKADDR: ++ case FI_SOCKADDR_IN: ++ addrlen = sizeof(struct sockaddr_in); ++ add_address = av_create_addr_sockaddr_in; ++ break; ++ default: ++ sprintf(err_buf, "test does not yet support %s", ++ fi_tostr(&fi->addr_format, FI_TYPE_ADDR_FORMAT)); ++ return -FI_ENOSYS; ++ } ++ ++ if (len < addrlen * (offset + num_addr)) { ++ sprintf(err_buf, "internal error, not enough room for %d addresses", ++ num_addr); ++ return -FI_ENOMEM; ++ } ++ ++ cur_addr = addr_array; ++ cur_addr += offset * addrlen; ++ for (i = 0; i < num_addr; ++i) { ++ ret = add_address(first_address, base + i, cur_addr); ++ if (ret != 0) { ++ return ret; ++ } ++ cur_addr += addrlen; ++ } ++ ++ return cur_addr - (uint8_t *)addr_array; ++} ++ ++/* ++ * Tests: ++ * - synchronous resolution of good address ++ */ ++static int ++av_good_sync() ++{ ++ int testret; ++ int ret; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ int buflen; ++ fi_addr_t fi_addr; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ fi_addr = FI_ADDR_NOTAVAIL; ++ ++ buflen = sizeof(addrbuf); ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ++ ret = fi_av_insert(av, addrbuf, 1, &fi_addr, 0, NULL); ++ if (ret != 1) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ if (fi_addr == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr == FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int ++av_null_fi_addr() ++{ ++ int testret; ++ int ret; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ int buflen; ++ ++ testret = FAIL; ++ ++ if (av_type != FI_AV_TABLE) { ++ ret = 0; ++ testret = SKIPPED; ++ sprintf(err_buf, "test not valid for AV type FI_AV_MAP"); ++ goto out1; ++ } ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto out1; ++ } ++ ++ buflen = sizeof(addrbuf); ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto out2; // av_create_address_list filled err_buf ++ } ++ ++ ret = fi_av_insert(av, addrbuf, 1, NULL, 0, NULL); ++ if (ret != 1) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto out2; ++ } ++ testret = PASS; ++out2: ++ FT_CLOSE_FID(av); ++out1: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - synchronous resolution of bad address ++ */ ++static int ++av_bad_sync() ++{ ++ int testret; ++ int ret; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ int buflen; ++ fi_addr_t fi_addr; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ fi_addr = ~FI_ADDR_NOTAVAIL; ++ ++ buflen = sizeof(addrbuf); ++ ret = av_create_address_list(bad_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ++ ret = fi_av_insert(av, addrbuf, 1, &fi_addr, 0, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_insert ret=%d, should be 0", ret); ++ goto fail; ++ } ++ if (fi_addr != FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, ++ "fi_addr = 0x%" PRIx64 ", should be 0x%" PRIx64" (FI_ADDR_NOTAVAIL)", ++ fi_addr, FI_ADDR_NOTAVAIL); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - sync vector with 1 good and 1 bad ++ */ ++static int ++av_goodbad_vector_sync() ++{ ++ int testret; ++ int ret; ++ int i; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ int buflen; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ for (i = 0; i < MAX_ADDR; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ fi_addr[1] = ~FI_ADDR_NOTAVAIL; ++ ++ buflen = sizeof(addrbuf); ++ ++ /* vector is good address + bad address */ ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = av_create_address_list(bad_address, 0, 1, addrbuf, 1, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = fi_av_insert(av, addrbuf, 2, fi_addr, 0, NULL); ++ if (ret != 1) { ++ sprintf(err_buf, "fi_av_insert ret=%d, should be 1", ret); ++ goto fail; ++ } ++ ++ /* ++ * Check returned fi_addrs ++ */ ++ if (fi_addr[0] == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[0] = FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ if (fi_addr[1] != FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[1] != FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - async good vector ++ */ ++static int ++av_good_vector_async() ++{ ++ int testret; ++ int ret; ++ int i; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ uint32_t ctx; ++ int buflen; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ attr.flags = FI_EVENT; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ret = fi_av_bind(av, &eq->fid, 0); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_bind() = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ for (i = 0; i < MAX_ADDR; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ ++ buflen = sizeof(addrbuf); ++ ret = av_create_address_list(good_address, 0, num_good_addr, ++ addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ++ for (i = 0; i < num_good_addr; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ ret = fi_av_insert(av, addrbuf, num_good_addr, fi_addr, 0, &ctx); ++ if (ret) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ if (check_eq_sread(eq, &av->fid, &ctx, num_good_addr, 20000, 0) != 0) { ++ goto fail; ++ } ++ for (i = 0; i < num_good_addr; ++i) { ++ if (fi_addr[i] == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[%d] = FI_ADDR_NOTAVAIL", i); ++ goto fail; ++ } ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - async good vector ++ */ ++static int ++av_zero_async() ++{ ++ int testret; ++ int ret; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ uint32_t ctx; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ attr.flags = FI_EVENT; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ret = fi_av_bind(av, &eq->fid, 0); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_bind() = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = fi_av_insert(av, addrbuf, 0, fi_addr, 0, &ctx); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ if (check_eq_sread(eq, &av->fid, &ctx, 0, 20000, 0) != 0) { ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - async 2 good vectors ++ */ ++static int ++av_good_2vector_async() ++{ ++ int testret; ++ int ret; ++ int i; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ uint32_t event; ++ struct fi_eq_entry entry; ++ uint32_t ctx[2]; ++ int buflen; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ attr.flags = FI_EVENT; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ret = fi_av_bind(av, &eq->fid, 0); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_bind() = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ for (i = 0; i < MAX_ADDR; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ ++ buflen = sizeof(addrbuf); ++ ++ /* 1st vector is just first address */ ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = fi_av_insert(av, addrbuf, 1, fi_addr, FI_MORE, &ctx[0]); ++ if (ret) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ctx[0] = 1; ++ ++ /* 2nd vector is remaining addresses */ ++ ret = av_create_address_list(good_address, 1, num_good_addr-1, ++ addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = fi_av_insert(av, addrbuf, num_good_addr-1, &fi_addr[1], 0, &ctx[1]); ++ if (ret != num_good_addr-1) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ctx[1] = num_good_addr-1; ++ ++ /* ++ * Handle completions in either order ++ */ ++ for (i = 0; i < 2; ++i) { ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), 20000, 0); ++ ret = check_eq_result(ret, event, &entry, &av->fid, NULL, ~0); ++ if (ret != 0) { ++ goto fail; ++ } ++ if (entry.context != &ctx[0] && entry.context != &ctx[1]) { ++ sprintf(err_buf, "bad context: %p", entry.context); ++ goto fail; ++ } ++ if (*(uint32_t *)(entry.context) == ~0) { ++ sprintf(err_buf, "duplicate context: %p", entry.context); ++ goto fail; ++ } ++ if (*(uint32_t *)(entry.context) != entry.data) { ++ sprintf(err_buf, "count = %" PRIu64 ", should be %d", entry.data, ++ *(uint32_t *)(entry.context)); ++ goto fail; ++ } ++ *(uint32_t *)(entry.context) = ~0; ++ } ++ for (i = 0; i < num_good_addr; ++i) { ++ if (fi_addr[i] == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[%d] = FI_ADDR_NOTAVAIL", i); ++ goto fail; ++ } ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - async vector with 1 good and 1 bad ++ */ ++static int ++av_goodbad_vector_async() ++{ ++ int testret; ++ int ret; ++ int i; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ uint32_t event; ++ uint32_t ctx; ++ struct fi_eq_entry entry; ++ int buflen; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ attr.flags = FI_EVENT; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ret = fi_av_bind(av, &eq->fid, 0); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_bind() = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ for (i = 0; i < MAX_ADDR; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ fi_addr[1] = ~FI_ADDR_NOTAVAIL; ++ ++ buflen = sizeof(addrbuf); ++ ++ /* vector is good address + bad address */ ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = av_create_address_list(bad_address, 0, 1, addrbuf, 1, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = fi_av_insert(av, addrbuf, 2, fi_addr, 0, &ctx); ++ if (ret) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* ++ * Read event after sync, verify we get FI_EAVAIL, then read and ++ * verify the error completion ++ */ ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), 20000, 0); ++ if (ret != -FI_EAVAIL) { ++ sprintf(err_buf, "fi_eq_sread ret = %d, should be -FI_EAVAIL", ret); ++ goto fail; ++ } ++ ret = check_eq_readerr(eq, &av->fid, &ctx, 1); ++ if (ret != 0) { ++ goto fail; ++ } ++ ++ /* ++ * Now we should get a good completion, and all fi_addr except fd_addr[1] ++ * should have good values. ++ */ ++ if (check_eq_sread(eq, &av->fid, &ctx, 1, 20000, 0) != 0) { ++ goto fail; ++ } ++ if (fi_addr[0] == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[0] = FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ if (fi_addr[1] != FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[1] != FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++struct test_entry test_array_good[] = { ++ TEST_ENTRY(av_open_close, "Test open and close AVs of varying sizes"), ++ TEST_ENTRY(av_good_sync, "Test sync AV insert with good address"), ++ TEST_ENTRY(av_null_fi_addr, "Test AV insert without specifying fi_addr"), ++ TEST_ENTRY(av_good_vector_async, ++ "Test async AV insert with vector of good addresses"), ++ TEST_ENTRY(av_zero_async, "Test async insert AV insert of zero addresses"), ++ TEST_ENTRY(av_good_2vector_async, ++ "Test async AV inserts with two address vectors"), ++ { NULL, "" } ++}; ++ ++struct test_entry test_array_bad[] = { ++ TEST_ENTRY(av_bad_sync, "Test sync AV insert of bad address"), ++ TEST_ENTRY(av_goodbad_vector_sync, ++ "Test sync AV insert of 1 good and 1 bad address"), ++ TEST_ENTRY(av_goodbad_vector_async, ++ "Test async AV insert with good and bad address"), ++ { NULL, "" } ++}; ++ ++int ++run_test_set() ++{ ++ int failed; ++ ++ failed = 0; ++ ++ failed += run_tests(test_array_good, err_buf); ++ if (bad_address != NULL) { ++ printf("\nTesting with bad_address = \"%s\"\n", bad_address); ++ failed += run_tests(test_array_bad, err_buf); ++ } ++ ++ bad_address = NULL; ++ printf("\nTesting with invalid address\n"); ++ failed += run_tests(test_array_bad, err_buf); ++ ++ return failed; ++} ++ ++static void usage(void) ++{ ++ ft_unit_usage("av_test", "Unit test for Address Vector (AV)"); ++ FT_PRINT_OPTS_USAGE("-g ", ""); ++ FT_PRINT_OPTS_USAGE("-G ]", ""); ++ fprintf(stderr, FT_OPTS_USAGE_FORMAT " (max=%d)\n", "-n ", ++ "Number of good addresses", MAX_ADDR - 1); ++ FT_PRINT_OPTS_USAGE("-s ", ""); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "g:G:n:s:h")) != -1) { ++ switch (op) { ++ case 'g': ++ good_address = optarg; ++ break; ++ case 'G': ++ bad_address = optarg; ++ break; ++ case 'n': ++ num_good_addr = atoi(optarg); ++ break; ++ case 's': ++ opts.src_addr = optarg; ++ break; ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ ++ } ++ } ++ ++ if (good_address == NULL || num_good_addr == 0) { ++ printf("Test requires -g and -n\n"); ++ return EXIT_FAILURE; ++ } ++ ++ if (num_good_addr > MAX_ADDR - 1) { ++ printf("num_good_addr = %d is too big, dropped to %d\n", ++ num_good_addr, MAX_ADDR); ++ num_good_addr = MAX_ADDR - 1; ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ hints->addr_format = FI_SOCKADDR; ++ ++ // TODO make this test accept endpoint type argument ++ hints->ep_attr->type = FI_EP_RDM; ++ ret = fi_getinfo(FT_FIVERSION, opts.src_addr, 0, FI_SOURCE, hints, &fi); ++ ++ if (ret && ret != -FI_ENODATA) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ ++ if (ret == -FI_ENODATA) { ++ hints->ep_attr->type = FI_EP_DGRAM; ++ ret = fi_getinfo(FT_FIVERSION, opts.src_addr, 0, FI_SOURCE, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto err; ++ ++ printf("Testing AVs on fabric %s\n", fi->fabric_attr->name); ++ failed = 0; ++ ++ if (fi->domain_attr->av_type == FI_AV_UNSPEC || ++ fi->domain_attr->av_type == FI_AV_MAP) { ++ av_type = FI_AV_MAP; ++ printf("\nTesting with type = FI_AV_MAP\n"); ++ failed += run_test_set(); ++ } ++ ++ if (fi->domain_attr->av_type == FI_AV_UNSPEC || ++ fi->domain_attr->av_type == FI_AV_TABLE) { ++ av_type = FI_AV_TABLE; ++ printf("\nTesting with type = FI_AV_TABLE\n"); ++ failed += run_test_set(); ++ } ++ ++ if (failed > 0) { ++ printf("\nSummary: %d tests failed\n", failed); ++ } else { ++ printf("\nSummary: all tests passed\n"); ++ } ++ ++err: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cntr_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cntr_test.c +new file mode 100644 +index 0000000..52431d9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cntr_test.c +@@ -0,0 +1,203 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "unit_common.h" ++#include "shared.h" ++ ++ ++static char err_buf[512]; ++#define MAX_COUNTER_CHECK 100 ++ ++ ++static int cntr_loop() ++{ ++ size_t i, opened, cntr_cnt; ++ uint64_t value, expected; ++ struct timespec start, stop; ++ int ret, testret = FAIL, timeout = 5000; ++ ++ cntr_cnt = MIN(fi->domain_attr->cntr_cnt, MAX_COUNTER_CHECK); ++ struct fid_cntr **cntrs = calloc(cntr_cnt, sizeof(struct fid_cntr *)); ++ if (!cntrs) { ++ perror("calloc"); ++ return -FI_ENOMEM; ++ } ++ ++ for (opened = 0; opened < cntr_cnt; opened++) { ++ ret = ft_cntr_open(&cntrs[opened]); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ goto close; ++ } ++ } ++ ++ for (i = 0; i < opened; i++) { ++ ret = fi_cntr_set(cntrs[i], i); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_set", ret); ++ goto close; ++ } ++ ++ ret = fi_cntr_seterr(cntrs[i], i << 1); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_seterr", ret); ++ goto close; ++ } ++ } ++ ++ for (i = 0; i < opened; i++) { ++ ret = fi_cntr_add(cntrs[i], i); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_add", ret); ++ goto close; ++ } ++ ++ ret = fi_cntr_adderr(cntrs[i], i); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_adderr", ret); ++ goto close; ++ } ++ } ++ ++ for (i = 0; i < opened; i++) { ++ clock_gettime(CLOCK_MONOTONIC, &start); ++ expected = i + i; ++ do { ++ value = fi_cntr_read(cntrs[i]); ++ clock_gettime(CLOCK_MONOTONIC, &stop); ++ sched_yield(); ++ } while ((value != expected) && ++ ((stop.tv_sec - start.tv_sec) > timeout)); ++ if (value != expected) { ++ FT_PRINTERR("fi_cntr_read", value); ++ goto close; ++ } ++ ++ clock_gettime(CLOCK_MONOTONIC, &start); ++ expected = (i << 1) + i; ++ do { ++ value = fi_cntr_readerr(cntrs[i]); ++ clock_gettime(CLOCK_MONOTONIC, &stop); ++ sched_yield(); ++ } while ((value != expected) && ++ ((stop.tv_sec - start.tv_sec) > timeout)); ++ if (value != expected) { ++ FT_PRINTERR("fi_cntr_readerr", value); ++ goto close; ++ } ++ } ++ testret = PASS; ++ ++close: ++ for (i = 0; i < opened; i++) { ++ ret = fi_close(&(cntrs[i])->fid); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_close", ret); ++ break; ++ } ++ } ++ ++ if (i < cntr_cnt) ++ testret = FAIL; ++ ++ free(cntrs); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++struct test_entry test_array[] = { ++ TEST_ENTRY(cntr_loop, "Test counter open/set/read/close operations"), ++ { NULL, "" } ++}; ++ ++static void usage(void) ++{ ++ ft_unit_usage("cntr_test", "Unit test for counter (cntr)"); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto out; ++ } ++ ++ if (!fi->domain_attr->cntr_cnt) ++ goto out; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto out; ++ ++ printf("Testing CNTRS on fabric %s\n", fi->fabric_attr->name); ++ ++ failed = run_tests(test_array, err_buf); ++ if (failed > 0) ++ printf("Summary: %d tests failed\n", failed); ++ else ++ printf("Summary: all tests passed\n"); ++ ++out: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/common.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/common.c +new file mode 100644 +index 0000000..998a7d7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/common.c +@@ -0,0 +1,91 @@ ++/* ++ * Copyright (c) 2013-2014 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "unit_common.h" ++ ++void ft_unit_usage(char *name, char *desc) ++{ ++ fprintf(stderr, "Usage:\n"); ++ fprintf(stderr, " %s [OPTIONS]\n", name); ++ ++ if (desc) ++ fprintf(stderr, "\n%s\n", desc); ++ ++ fprintf(stderr, "\nOptions:\n"); ++ FT_PRINT_OPTS_USAGE("-f ", "specific fabric to use"); ++ FT_PRINT_OPTS_USAGE("-d ", "domain name"); ++ FT_PRINT_OPTS_USAGE("-p ", "specific provider name eg sockets, verbs"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++} ++ ++int ++run_tests(struct test_entry *test_array, char *err_buf) ++{ ++ int ret; ++ struct test_entry *tep; ++ int failed; ++ ++ failed = 0; ++ ++ tep = test_array; ++ while (tep->test != NULL) { ++ printf("Running %s [%s]...", tep->name, tep->desc); ++ fflush(stdout); ++ ret = tep->test(); ++ switch (ret) { ++ case PASS: ++ printf("PASS!\n"); ++ break; ++ case FAIL: ++ printf("FAIL: %s\n", err_buf); ++ failed++; ++ break; ++ case SKIPPED: ++ printf("skipped because: %s\n", err_buf); ++ break; ++ case NOTSUPP: ++ printf("requires unsupported feature: %s\n", err_buf); ++ break; ++ default: ++ printf("FATAL: unexpected code: %d\n", ret); ++ return failed + 1; ++ break; ++ } ++ ++ ++tep; ++ } ++ ++ return failed; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cq_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cq_test.c +new file mode 100644 +index 0000000..03685a2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cq_test.c +@@ -0,0 +1,261 @@ ++/* ++ * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "unit_common.h" ++#include "shared.h" ++ ++static char err_buf[512]; ++ ++static int ++create_cq(struct fid_cq **cq, size_t size, uint64_t flags, ++ enum fi_cq_format format, enum fi_wait_obj wait_obj) ++{ ++ struct fi_cq_attr cq_attr; ++ ++ memset(&cq_attr, 0, sizeof(cq_attr)); ++ cq_attr.size = size; ++ cq_attr.flags = flags; ++ cq_attr.format = format; ++ cq_attr.wait_obj = wait_obj; ++ ++ return fi_cq_open(domain, &cq_attr, cq, NULL); ++} ++ ++/* Try opening fi->domain_attr->cq_cnt number of completion queues ++ * simultaneously using a size hint of 0 (indicating the provider should choose ++ * the size) ++ */ ++static int cq_open_close_simultaneous(void) ++{ ++ int ret; ++ int opened; ++ size_t count; ++ int testret = FAIL; ++ struct fid_cq **cq_array; ++ ++ count = fi->domain_attr->cq_cnt; ++ FT_DEBUG("testing creation of up to %zu simultaneous CQs\n", count); ++ ++ cq_array = calloc(count, sizeof(*cq_array)); ++ if (!cq_array) ++ return -FI_ENOMEM; ++ ++ ret = 0; ++ for (opened = 0; opened < count && !ret; opened++) { ++ ret = create_cq(&cq_array[opened], 0, 0, FI_CQ_FORMAT_UNSPEC, ++ FI_WAIT_UNSPEC); ++ } ++ if (ret) { ++ FT_WARN("fi_cq_open failed after %d (cq_cnt: %zu): %s", ++ opened, count, fi_strerror(-ret)); ++ } ++ ++ testret = PASS; ++ ++ FT_CLOSEV_FID(cq_array, opened); ++ free(cq_array); ++ ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - test open and close of CQ over a range of sizes ++ */ ++static int ++cq_open_close_sizes() ++{ ++ int i; ++ int ret; ++ int size; ++ int testret; ++ struct fid_cq *cq; ++ ++ testret = FAIL; ++ ++ for (i = -1; i < 17; ++i) { ++ size = (i < 0) ? 0 : 1 << i; ++ ++ ret = create_cq(&cq, size, 0, FI_CQ_FORMAT_UNSPEC, FI_WAIT_UNSPEC); ++ if (ret == -FI_EINVAL) { ++ FT_WARN("\nSuccessfully completed %d iterations up to " ++ "size %d before the provider returned " ++ "EINVAL...", ++ i + 1, size >> 1); ++ ret = 0; ++ goto pass; ++ } ++ if (ret != 0) { ++ sprintf(err_buf, "fi_cq_open(%d, 0, FI_CQ_FORMAT_UNSPEC, " ++ "FI_WAIT_UNSPEC) = %d, %s", ++ size, ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = fi_close(&cq->fid); ++ if (ret != 0) { ++ sprintf(err_buf, "close(cq) = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ cq = NULL; ++ } ++ ++pass: ++ testret = PASS; ++fail: ++ cq = NULL; ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int ++cq_signal() ++{ ++ struct fid_cq *cq; ++ struct fi_cq_tagged_entry entry; ++ int64_t elapsed; ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_cq(&cq, 1, 0, FI_CQ_FORMAT_UNSPEC, FI_WAIT_UNSPEC); ++ if (ret) { ++ sprintf(err_buf, "fi_cq_open(1, 0, FI_CQ_FORMAT_UNSPEC, " ++ "FI_WAIT_UNSPEC) = %d, %s", ++ ret, fi_strerror(-ret)); ++ goto fail1; ++ } ++ ++ ret = fi_cq_signal(cq); ++ if (ret) { ++ sprintf(err_buf, "fi_cq_signal = %d %s", ret, fi_strerror(-ret)); ++ goto fail2; ++ } ++ ++ ft_start(); ++ ret = fi_cq_sread(cq, &entry, 1, NULL, 2000); ++ ft_stop(); ++ elapsed = get_elapsed(&start, &end, MILLI); ++ if (ret != -FI_EAGAIN && ret != -FI_ECANCELED) { ++ sprintf(err_buf, "fi_cq_sread = %d %s", ret, fi_strerror(-ret)); ++ goto fail2; ++ } ++ ++ if (elapsed > 1000) { ++ sprintf(err_buf, "fi_cq_sread - signal ignored"); ++ goto fail2; ++ } ++ ++ ret = fi_close(&cq->fid); ++ if (ret) { ++ sprintf(err_buf, "close(cq) = %d, %s", ret, fi_strerror(-ret)); ++ goto fail1; ++ } ++ cq = NULL; ++ ++ testret = PASS; ++fail2: ++ FT_CLOSE_FID(cq); ++fail1: ++ cq = NULL; ++ return TEST_RET_VAL(ret, testret); ++} ++ ++ ++struct test_entry test_array[] = { ++ TEST_ENTRY(cq_open_close_sizes, "Test open and close of CQ for various sizes"), ++ TEST_ENTRY(cq_open_close_simultaneous, "Test opening several CQs at a time"), ++ TEST_ENTRY(cq_signal, "Test fi_cq_signal"), ++ { NULL, "" } ++}; ++ ++static void usage(void) ++{ ++ ft_unit_usage("cq_test", "Unit test for Completion Queue (CQ)"); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto err; ++ ++ printf("Testing CQs on fabric %s\n", fi->fabric_attr->name); ++ ++ failed = run_tests(test_array, err_buf); ++ if (failed > 0) { ++ printf("Summary: %d tests failed\n", failed); ++ } else { ++ printf("Summary: all tests passed\n"); ++ } ++ ++err: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/dom_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/dom_test.c +new file mode 100644 +index 0000000..6537997 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/dom_test.c +@@ -0,0 +1,134 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "unit_common.h" ++ ++#define MAX_ADDR 256 ++ ++static struct fid_domain **domain_vec = NULL; ++ ++/* ++ * Tests: ++ * - test open and close of a domain ++ */ ++ ++static void usage(void) ++{ ++ ft_unit_usage("dom_test", "Unit test for Domain"); ++ FT_PRINT_OPTS_USAGE("-n ", "num domains to open"); ++} ++ ++int main(int argc, char **argv) ++{ ++ unsigned long i; ++ int op, ret = 0; ++ unsigned long num_domains = 1; ++ char *ptr; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "n:h")) != -1) { ++ switch (op) { ++ case 'n': ++ errno = 0; ++ num_domains = strtol(optarg, &ptr, 10); ++ if (ptr == optarg || *ptr != '\0' || ++ ((num_domains == LONG_MIN || num_domains == LONG_MAX) && errno == ERANGE)) { ++ fprintf(stderr, "Cannot convert from string to long\n"); ++ goto out; ++ } ++ break; ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto out; ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto out; ++ ++ domain_vec = calloc(num_domains, sizeof(*domain_vec)); ++ if (domain_vec == NULL) { ++ perror("malloc"); ++ ret = EXIT_FAILURE; ++ goto out; ++ } ++ ++ /* Common code will open one domain */ ++ for (i = 1; i < num_domains; i++) { ++ ret = fi_domain(fabric, fi, &domain_vec[i], NULL); ++ if (ret != FI_SUCCESS) { ++ printf("fi_domain num %lu %s\n", i, fi_strerror(-ret)); ++ break; ++ } ++ } ++ ++ while (--i > 0) { ++ ret = fi_close(&domain_vec[i]->fid); ++ if (ret != FI_SUCCESS) { ++ printf("Error %d closing domain num %lu: %s\n", ret, ++ i, fi_strerror(-ret)); ++ break; ++ } ++ } ++ ++ free(domain_vec); ++out: ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/eq_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/eq_test.c +new file mode 100644 +index 0000000..f578d9f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/eq_test.c +@@ -0,0 +1,644 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "unit_common.h" ++#include "shared.h" ++ ++static char err_buf[512]; ++ ++static int ++create_eq(size_t size, uint64_t flags, enum fi_wait_obj wait_obj) ++{ ++ struct fi_eq_attr eq_attr; ++ ++ memset(&eq_attr, 0, sizeof(eq_attr)); ++ eq_attr.size = size; ++ eq_attr.flags = flags; ++ eq_attr.wait_obj = wait_obj; ++ ++ return fi_eq_open(fabric, &eq_attr, &eq, NULL); ++} ++ ++/* ++ * Tests: ++ * - test open and close of EQ over a range of sizes ++ */ ++static int ++eq_open_close() ++{ ++ int i; ++ int ret; ++ int size; ++ int testret; ++ ++ testret = FAIL; ++ ++ for (i = 0; i < 17; ++i) { ++ size = 1 << i; ++ ret = create_eq(size, 0, FI_WAIT_UNSPEC); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open(%d, 0, FI_WAIT_UNSPEC) = %d, %s", ++ size, ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = fi_close(&eq->fid); ++ if (ret != 0) { ++ sprintf(err_buf, "close(eq) = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ eq = NULL; ++ } ++ testret = PASS; ++ ++fail: ++ eq = NULL; ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - writing to EQ ++ * - reading from EQ with and without FI_PEEK ++ * - underflow read ++ */ ++static int ++eq_write_read_self() ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ int testret; ++ int ret; ++ int i; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_NONE); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* Insert some events */ ++ for (i = 0; i < 5; ++i) { ++ if (i & 1) { ++ entry.fid = &fabric->fid; ++ } else { ++ entry.fid = &eq->fid; ++ } ++ entry.context = (void *)(uintptr_t)i; ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ } ++ ++ /* Now read them back, peeking first at each one */ ++ for (i = 0; i < 10; ++i) { ++ event = ~0; ++ memset(&entry, 0, sizeof(entry)); ++ ret = fi_eq_read(eq, &event, &entry, sizeof(entry), ++ (i & 1) ? 0 : FI_PEEK); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_read ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ if (event != FI_NOTIFY) { ++ sprintf(err_buf, "iter %d: event = %d, should be %d\n", i, event, ++ FI_NOTIFY); ++ goto fail; ++ } ++ ++ if ((int)(uintptr_t)entry.context != i / 2) { ++ sprintf(err_buf, "iter %d: context mismatch %d != %d", i, ++ (int)(uintptr_t)entry.context, i / 2); ++ goto fail; ++ } ++ ++ if (entry.fid != ((i & 2) ? &fabric->fid : &eq->fid)) { ++ sprintf(err_buf, "iter %d: fid mismatch %p != %p", i, ++ entry.fid, ((i & 2) ? &fabric->fid : &eq->fid)); ++ goto fail; ++ } ++ } ++ ++ /* queue is now empty */ ++ ret = fi_eq_read(eq, &event, &entry, sizeof(entry), 0); ++ if (ret != -FI_EAGAIN) { ++ sprintf(err_buf, "fi_eq_read of empty EQ returned %d", ret); ++ goto fail; ++ } ++ testret = PASS; ++ ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - eq size test ++ */ ++static int ++eq_size_verify() ++{ ++ struct fi_eq_entry entry; ++ int testret; ++ int ret; ++ int i; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_NONE); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* Insert some events */ ++ for (i = 0; i < 32; ++i) { ++ entry.fid = &fabric->fid; ++ entry.context = (void *)(uintptr_t)i; ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ } ++ ++ testret = PASS; ++ ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - extracting FD from EQ with FI_WAIT_FD ++ * - wait on fd with nothing pending ++ * - wait on fd with event pending ++ */ ++static int ++eq_wait_fd_poll() ++{ ++ int fd; ++ struct fi_eq_entry entry; ++ struct pollfd pfd; ++ struct fid *fids[1]; ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_FD); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = fi_control(&eq->fid, FI_GETWAIT, &fd); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_control ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ fids[0] = &eq->fid; ++ if (fi_trywait(fabric, fids, 1) != FI_SUCCESS) { ++ sprintf(err_buf, "fi_trywait ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ pfd.fd = fd; ++ pfd.events = POLLIN; ++ ret = poll(&pfd, 1, 0); ++ if (ret < 0) { ++ sprintf(err_buf, "poll errno=%d, %s", errno, fi_strerror(-errno)); ++ goto fail; ++ } ++ if (ret > 0) { ++ sprintf(err_buf, "poll returned %d, should be 0", ret); ++ goto fail; ++ } ++ ++ /* write an event */ ++ entry.fid = &eq->fid; ++ entry.context = eq; ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ pfd.fd = fd; ++ pfd.events = POLLIN; ++ ret = poll(&pfd, 1, 0); ++ if (ret < 0) { ++ sprintf(err_buf, "poll errno=%d, %s", errno, fi_strerror(-errno)); ++ goto fail; ++ } ++ if (ret != 1) { ++ sprintf(err_buf, "poll returned %d, should be 1", ret); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int insert_events(size_t count) ++{ ++ struct fi_eq_entry entry; ++ size_t i; ++ int ret; ++ ++ for (i = 0; i < count; i++) { ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, ++ fi_strerror(-ret)); ++ return ret; ++ } ++ } ++ ++ return FI_SUCCESS; ++} ++ ++static int read_events(size_t count, uint64_t flags) ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ size_t i; ++ int ret; ++ ++ for (i = 0; i < count; i++) { ++ memset(&entry, 0, sizeof(entry)); ++ event = 0; ++ ++ ret = fi_eq_read(eq, &event, &entry, sizeof(entry), flags); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_read ret=%d, %s", ret, ++ fi_strerror(-ret)); ++ return ret; ++ } ++ ++ if (event != FI_NOTIFY) { ++ sprintf(err_buf, "iter %zu: event = %d, should be %d\n", ++ i, event, FI_NOTIFY); ++ return -FI_EOTHER; ++ } ++ } ++ ++ return FI_SUCCESS; ++} ++ ++static int sread_event(int timeout, uint64_t flags) ++{ ++ struct fi_eq_entry entry; ++ int64_t elapsed; ++ uint32_t event; ++ int ret; ++ ++ ft_start(); ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), timeout, flags); ++ ft_stop(); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_sread returned %d, %s", ret, ++ fi_strerror(-ret)); ++ return ret; ++ } ++ ++ /* check timeout accuracy */ ++ elapsed = get_elapsed(&start, &end, MILLI); ++ if (elapsed > (int) (timeout * 1.25)) { ++ sprintf(err_buf, "fi_eq_sread slept %d ms, expected %d", ++ (int) elapsed, timeout); ++ return -FI_EOTHER; ++ } ++ ++ return FI_SUCCESS; ++} ++ ++/* Make sure the peeking works fine on normal read. */ ++static int eq_wait_read_peek(void) ++{ ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_NONE); ++ if (ret) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, ++ fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = insert_events(5); ++ if (ret) ++ goto fail; ++ ++ ret = read_events(5, FI_PEEK); ++ if (ret) ++ goto fail; ++ ++ ret = read_events(5, 0); ++ if (ret) ++ goto fail; ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* Check that the peeking doesn't affect the waiting. If the peek invalidly ++ * clears the FD, then this will fail. ++ */ ++static int eq_wait_sread_peek(void) ++{ ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_FD); ++ if (ret) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, ++ fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* Write an event */ ++ ret = insert_events(1); ++ if (ret) ++ goto fail; ++ ++ /* Make sure we can read the event */ ++ ret = sread_event(2000, 0); ++ if (ret) ++ goto fail; ++ ++ /* Write another event */ ++ ret = insert_events(1); ++ if (ret) ++ goto fail; ++ ++ /* Peek at the event */ ++ ret = sread_event(2000, FI_PEEK); ++ if (ret) ++ goto fail; ++ ++ /* Make sure the event is still available for reading */ ++ ret = sread_event(2000, 0); ++ if (ret) ++ goto fail; ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - sread with event pending ++ * - sread with no event pending ++ */ ++static int ++eq_wait_fd_sread() ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ int64_t elapsed; ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_FD); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* timed sread on empty EQ, 2s timeout */ ++ ft_start(); ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), 2000, 0); ++ ft_stop(); ++ if (ret != -FI_EAGAIN) { ++ sprintf(err_buf, "fi_eq_read of empty EQ returned %d", ret); ++ goto fail; ++ } ++ ++ /* check timeout accuracy */ ++ elapsed = get_elapsed(&start, &end, MILLI); ++ if (elapsed < 1500 || elapsed > 2500) { ++ sprintf(err_buf, "fi_eq_sread slept %d ms, expected 2000", ++ (int)elapsed); ++ goto fail; ++ } ++ ++ /* write an event */ ++ entry.fid = &eq->fid; ++ entry.context = eq; ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ event = ~0; ++ memset(&entry, 0, sizeof(entry)); ++ /* timed sread on EQ with event, 2s timeout */ ++ ft_start(); ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), 2000, 0); ++ ft_stop(); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_read ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* check that no undue waiting occurred */ ++ elapsed = get_elapsed(&start, &end, MILLI); ++ if (elapsed > 5) { ++ sprintf(err_buf, "fi_eq_sread slept %d ms, expected immediate return", ++ (int)elapsed); ++ goto fail; ++ } ++ ++ if (event != FI_NOTIFY) { ++ sprintf(err_buf, "fi_eq_sread: event = %d, should be %d\n", event, ++ FI_NOTIFY); ++ goto fail; ++ } ++ if (entry.fid != &eq->fid) { ++ sprintf(err_buf, "fi_eq_sread: fid mismatch: %p should be %p\n", ++ entry.fid, &eq->fid); ++ goto fail; ++ } ++ if (entry.context != eq) { ++ sprintf(err_buf, "fi_eq_sread: context mismatch: %p should be %p\n", ++ entry.context, eq); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int ++eq_readerr_ret_eagain() ++{ ++ int testret; ++ int ret; ++ struct fi_eq_err_entry err_entry; ++ ++ testret = FAIL; ++ ++ memset(&err_entry, 0, sizeof(err_entry)); ++ ++ /* create EQ */ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_UNSPEC); ++ if (ret) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = insert_events(5); ++ if (ret) ++ goto fail; ++ ++ ret = read_events(5, 0); ++ if (ret) ++ goto fail; ++ ++ /* Error handling */ ++ ret = fi_eq_readerr(eq, &err_entry, 0); ++ if (ret == -FI_EAGAIN) ++ testret = PASS; ++ else ++ sprintf(err_buf, ", fi_eq_readerr returned: %d: %s, ", ret, ++ fi_eq_strerror(eq, err_entry.prov_errno, err_entry.err_data, NULL, 0)); ++ ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++struct test_entry test_array[] = { ++ TEST_ENTRY(eq_open_close, "Test open and close of EQ for various sizes"), ++ TEST_ENTRY(eq_write_read_self, "Test writing and reading to EQ"), ++ TEST_ENTRY(eq_size_verify, "Test EQ supports writing # of entries = size"), ++ TEST_ENTRY(eq_wait_fd_poll, "Test polling on fd extracted from EQ"), ++ TEST_ENTRY(eq_wait_fd_sread, "Test EQ sread"), ++ TEST_ENTRY(eq_wait_read_peek, "Test EQ read with FI_PEEK"), ++ TEST_ENTRY(eq_wait_sread_peek, "Test EQ sread with FI_PEEK"), ++ TEST_ENTRY(eq_readerr_ret_eagain, "Test EQ readerr with FI_EAGAIN"), ++ { NULL, "" } ++}; ++ ++static void usage(void) ++{ ++ ft_unit_usage("eq_test", "Unit test for Event Queue (EQ)"); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = FI_CONTEXT | FI_CONTEXT2 | FI_MSG_PREFIX | FI_ASYNC_IOV | ++ FI_RX_CQ_DATA | FI_NOTIFY_FLAGS_ONLY | FI_RESTRICTED_COMP | ++ FI_BUFFERED_RECV; ++ hints->domain_attr->mode = FI_RESTRICTED_COMP; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL| FI_MR_RAW | FI_MR_VIRT_ADDR | ++ FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_MMU_NOTIFY | ++ FI_MR_RMA_EVENT | FI_MR_ENDPOINT; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ ++ ret = fi_fabric(fi->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ ++ printf("Testing EQs on fabric %s\n", fi->fabric_attr->name); ++ ++ failed = run_tests(test_array, err_buf); ++ if (failed > 0) { ++ printf("Summary: %d tests failed\n", failed); ++ } else { ++ printf("Summary: all tests passed\n"); ++ } ++ ++err: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/getinfo_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/getinfo_test.c +new file mode 100644 +index 0000000..d09f6d9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/getinfo_test.c +@@ -0,0 +1,803 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2017 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "unit_common.h" ++ ++#define TEST_ENTRY_GETINFO(name) TEST_ENTRY(getinfo_ ## name,\ ++ getinfo_ ## name ## _desc) ++ ++typedef int (*ft_getinfo_init)(struct fi_info *); ++typedef int (*ft_getinfo_test)(char *, char *, uint64_t, struct fi_info *, struct fi_info **); ++typedef int (*ft_getinfo_check)(struct fi_info *); ++ ++static char err_buf[512]; ++static char new_prov_var[128]; ++ ++ ++static int check_addr(void *addr, size_t addrlen, char *str) ++{ ++ if (!addrlen) { ++ sprintf(err_buf, "%s addrlen not set", str); ++ return EXIT_FAILURE; ++ } ++ if (!addr) { ++ sprintf(err_buf, "%s address not set", str); ++ return EXIT_FAILURE; ++ } ++ return 0; ++} ++ ++static int check_srcaddr(struct fi_info *info) ++{ ++ return check_addr(info->src_addr, info->src_addrlen, "source"); ++} ++ ++static int check_src_dest_addr(struct fi_info *info) ++{ ++ int ret; ++ ++ ret = check_addr(info->src_addr, info->src_addrlen, "source"); ++ if (ret) ++ return ret; ++ ++ return check_addr(info->dest_addr, info->dest_addrlen, "destination"); ++} ++ ++static int check_util_prov(struct fi_info *info) ++{ ++ const char *util_name; ++ size_t len; ++ ++ util_name = ft_util_name(info->fabric_attr->prov_name, &len); ++ if (!util_name) { ++ sprintf(err_buf, "Util provider name not appended to core " ++ "provider name: %s", info->fabric_attr->prov_name); ++ return EXIT_FAILURE; ++ } ++ return 0; ++} ++ ++static int check_api_version(struct fi_info *info) ++{ ++ return info->fabric_attr->api_version != FT_FIVERSION; ++} ++ ++static int invalid_dom(struct fi_info *hints) ++{ ++ if (hints->domain_attr->name) ++ free(hints->domain_attr->name); ++ hints->domain_attr->name = strdup("invalid_domain"); ++ if (!hints->domain_attr->name) ++ return -FI_ENOMEM; ++ return 0; ++} ++ ++static int validate_msg_ordering_bits(char *node, char *service, uint64_t flags, ++ struct fi_info *hints, struct fi_info **info) ++{ ++ int i, ret; ++ uint64_t ordering_bits = (FI_ORDER_STRICT | FI_ORDER_DATA); ++ uint64_t *msg_order_combinations; ++ int cnt; ++ ++ ret = ft_alloc_bit_combo(0, ordering_bits, &msg_order_combinations, &cnt); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "ft_alloc_bit_combo failed", ret); ++ return ret; ++ } ++ ++ /* test for what ordering support exists on this provider */ ++ /* test ordering support in TX ATTRIBUTE */ ++ for (i = 0; i < cnt; i++) { ++ hints->tx_attr->msg_order = msg_order_combinations[i]; ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, info); ++ if (ret) { ++ if (ret == -FI_ENODATA) ++ continue; ++ FT_UNIT_STRERR(err_buf, "fi_getinfo failed", ret); ++ goto failed_getinfo; ++ } ++ ++ ft_foreach_info(fi, *info) { ++ FT_DEBUG("\nTesting for fabric: %s, domain: %s, endpoint type: %d", ++ fi->fabric_attr->name, fi->domain_attr->name, ++ fi->ep_attr->type); ++ if (hints->tx_attr->msg_order) { ++ if ((fi->tx_attr->msg_order & hints->tx_attr->msg_order) != ++ hints->tx_attr->msg_order) { ++ FT_DEBUG("tx msg_order not matching - hints: %" ++ PRIx64 " prov: %" PRIx64 "\n", ++ hints->tx_attr->msg_order, ++ fi->tx_attr->msg_order); ++ ret = -FI_EOTHER; ++ fi_freeinfo(*info); ++ goto failed_getinfo; ++ } ++ } ++ } ++ fi_freeinfo(*info); ++ } ++ ++ /* test ordering support in RX ATTRIBUTE */ ++ for (i = 0; i < cnt; i++) { ++ hints->tx_attr->msg_order = 0; ++ hints->rx_attr->msg_order = msg_order_combinations[i]; ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, info); ++ if (ret) { ++ if (ret == -FI_ENODATA) ++ continue; ++ FT_UNIT_STRERR(err_buf, "fi_getinfo failed", ret); ++ goto failed_getinfo; ++ } ++ ft_foreach_info(fi, *info) { ++ FT_DEBUG("\nTesting for fabric: %s, domain: %s, endpoint type: %d", ++ fi->fabric_attr->name, fi->domain_attr->name, ++ fi->ep_attr->type); ++ if (hints->rx_attr->msg_order) { ++ if ((fi->rx_attr->msg_order & hints->rx_attr->msg_order) != ++ hints->rx_attr->msg_order) { ++ FT_DEBUG("rx msg_order not matching - hints: %" ++ PRIx64 " prov: %" PRIx64 "\n", ++ hints->rx_attr->msg_order, ++ fi->rx_attr->msg_order); ++ ret = -FI_EOTHER; ++ fi_freeinfo(*info); ++ goto failed_getinfo; ++ } ++ } ++ } ++ fi_freeinfo(*info); ++ } ++ ++ *info = NULL; ++ ft_free_bit_combo(msg_order_combinations); ++ return 0; ++ ++failed_getinfo: ++ *info = NULL; ++ ft_free_bit_combo(msg_order_combinations); ++ return ret; ++} ++ ++static int init_valid_rma_RAW_ordering_no_set_size(struct fi_info *hints) ++{ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_RAW; ++ hints->rx_attr->msg_order = FI_ORDER_RAW; ++ hints->ep_attr->max_order_raw_size = 0; ++ ++ return 0; ++} ++ ++static int init_valid_rma_RAW_ordering_set_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_RAW; ++ hints->rx_attr->msg_order = FI_ORDER_RAW; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ if (fi->ep_attr->max_order_raw_size > 0) ++ hints->ep_attr->max_order_raw_size = fi->ep_attr->max_order_raw_size - 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int init_valid_rma_WAR_ordering_no_set_size(struct fi_info *hints) ++{ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAR; ++ hints->rx_attr->msg_order = FI_ORDER_WAR; ++ hints->ep_attr->max_order_war_size = 0; ++ ++ return 0; ++} ++ ++static int init_valid_rma_WAR_ordering_set_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAR; ++ hints->rx_attr->msg_order = FI_ORDER_WAR; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ if (fi->ep_attr->max_order_war_size > 0) ++ hints->ep_attr->max_order_war_size = fi->ep_attr->max_order_war_size - 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int init_valid_rma_WAW_ordering_no_set_size(struct fi_info *hints) ++{ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAW; ++ hints->rx_attr->msg_order = FI_ORDER_WAW; ++ hints->ep_attr->max_order_waw_size = 0; ++ ++ return 0; ++} ++ ++static int init_valid_rma_WAW_ordering_set_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAW; ++ hints->rx_attr->msg_order = FI_ORDER_WAW; ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ if (fi->ep_attr->max_order_waw_size > 0) ++ hints->ep_attr->max_order_waw_size = fi->ep_attr->max_order_waw_size - 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int check_valid_rma_ordering_sizes(struct fi_info *info) ++{ ++ if ((info->tx_attr->msg_order & FI_ORDER_RAW) || ++ (info->rx_attr->msg_order & FI_ORDER_RAW)) { ++ if (info->ep_attr->max_order_raw_size <= 0) ++ return EXIT_FAILURE; ++ if (hints->ep_attr->max_order_raw_size) { ++ if (info->ep_attr->max_order_raw_size < hints->ep_attr->max_order_raw_size) ++ return EXIT_FAILURE; ++ } ++ } ++ if ((info->tx_attr->msg_order & FI_ORDER_WAR) || ++ (info->rx_attr->msg_order & FI_ORDER_WAR)) { ++ if (info->ep_attr->max_order_war_size <= 0) ++ return EXIT_FAILURE; ++ if (hints->ep_attr->max_order_war_size) { ++ if (info->ep_attr->max_order_war_size < hints->ep_attr->max_order_war_size) ++ return EXIT_FAILURE; ++ } ++ } ++ if ((info->tx_attr->msg_order & FI_ORDER_WAW) || ++ (info->rx_attr->msg_order & FI_ORDER_WAW)) { ++ if (info->ep_attr->max_order_waw_size <= 0) ++ return EXIT_FAILURE; ++ if (hints->ep_attr->max_order_waw_size) { ++ if (info->ep_attr->max_order_waw_size < hints->ep_attr->max_order_waw_size) ++ return EXIT_FAILURE; ++ } ++ } ++ ++ return 0; ++} ++ ++static int init_invalid_rma_RAW_ordering_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps |= FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_RAW; ++ hints->rx_attr->msg_order = FI_ORDER_RAW; ++ hints->ep_attr->max_order_war_size = 0; ++ hints->ep_attr->max_order_waw_size = 0; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ if (fi->ep_attr->max_order_raw_size) ++ hints->ep_attr->max_order_raw_size = fi->ep_attr->max_order_raw_size + 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int init_invalid_rma_WAR_ordering_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps |= FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAR; ++ hints->rx_attr->msg_order = FI_ORDER_WAR; ++ hints->ep_attr->max_order_raw_size = 0; ++ hints->ep_attr->max_order_waw_size = 0; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ if (fi->ep_attr->max_order_war_size) ++ hints->ep_attr->max_order_war_size = fi->ep_attr->max_order_war_size + 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int init_invalid_rma_WAW_ordering_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps |= FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAW; ++ hints->rx_attr->msg_order = FI_ORDER_WAW; ++ hints->ep_attr->max_order_raw_size = 0; ++ hints->ep_attr->max_order_war_size = 0; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ if (fi->ep_attr->max_order_waw_size) ++ hints->ep_attr->max_order_waw_size = fi->ep_attr->max_order_waw_size + 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++ ++/* ++ * MR mode checks ++ */ ++static int init_mr_basic(struct fi_info *hints) ++{ ++ hints->caps |= FI_RMA; ++ hints->domain_attr->mr_mode = FI_MR_BASIC; ++ return 0; ++} ++ ++static int check_mr_basic(struct fi_info *info) ++{ ++ return (info->domain_attr->mr_mode != FI_MR_BASIC) ? ++ EXIT_FAILURE : 0; ++} ++ ++static int init_mr_scalable(struct fi_info *hints) ++{ ++ hints->caps |= FI_RMA; ++ hints->domain_attr->mr_mode = FI_MR_SCALABLE; ++ return 0; ++} ++ ++static int check_mr_scalable(struct fi_info *info) ++{ ++ return (info->domain_attr->mr_mode != FI_MR_SCALABLE) ? ++ EXIT_FAILURE : 0; ++} ++ ++static int init_mr_unspec(struct fi_info *hints) ++{ ++ hints->caps |= FI_RMA; ++ hints->domain_attr->mr_mode = FI_MR_UNSPEC; ++ return 0; ++} ++ ++static int test_mr_v1_0(char *node, char *service, uint64_t flags, ++ struct fi_info *test_hints, struct fi_info **info) ++{ ++ return fi_getinfo(FI_VERSION(1, 0), node, service, flags, test_hints, info); ++} ++ ++static int check_mr_unspec(struct fi_info *info) ++{ ++ return (info->domain_attr->mr_mode != FI_MR_BASIC && ++ info->domain_attr->mr_mode != FI_MR_SCALABLE) ? ++ EXIT_FAILURE : 0; ++} ++ ++static int test_mr_modes(char *node, char *service, uint64_t flags, ++ struct fi_info *hints, struct fi_info **info) ++{ ++ struct fi_info *fi; ++ uint64_t *mr_modes; ++ int i, cnt, ret; ++ ++ ret = ft_alloc_bit_combo(0, FI_MR_LOCAL | FI_MR_RAW | FI_MR_VIRT_ADDR | ++ FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_MMU_NOTIFY | ++ FI_MR_RMA_EVENT | FI_MR_ENDPOINT, &mr_modes, &cnt); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < cnt; i++) { ++ hints->domain_attr->mr_mode = (uint32_t) mr_modes[i]; ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, info); ++ if (ret) { ++ if (ret == -FI_ENODATA) ++ continue; ++ FT_UNIT_STRERR(err_buf, "fi_getinfo failed", ret); ++ goto out; ++ } ++ ++ ft_foreach_info(fi, *info) { ++ if (fi->domain_attr->mr_mode & ~hints->domain_attr->mr_mode) { ++ ret = -FI_EOTHER; ++ fi_freeinfo(*info); ++ goto out; ++ } ++ } ++ fi_freeinfo(*info); ++ } ++ ++out: ++ *info = NULL; ++ ft_free_bit_combo(mr_modes); ++ return ret; ++} ++ ++ ++/* ++ * getinfo test ++ */ ++static int getinfo_unit_test(char *node, char *service, uint64_t flags, ++ struct fi_info *base_hints, ft_getinfo_init init, ft_getinfo_test test, ++ ft_getinfo_check check, int ret_exp) ++{ ++ struct fi_info *info = NULL, *fi, *test_hints = NULL; ++ int ret; ++ ++ if (base_hints) { ++ test_hints = fi_dupinfo(base_hints); ++ if (!test_hints) ++ return -FI_ENOMEM; ++ } ++ ++ if (init) { ++ ret = init(test_hints); ++ if (ret) ++ goto out; ++ } ++ ++ if (test) ++ ret = test(node, service, flags, test_hints, &info); ++ else ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, test_hints, &info); ++ if (ret) { ++ if (ret == ret_exp) { ++ ret = 0; ++ goto out; ++ } ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ goto out; ++ } ++ ++ if (!info || !check) ++ goto out; ++ ++ ft_foreach_info(fi, info) { ++ FT_DEBUG("\nTesting for fabric: %s, domain: %s, endpoint type: %d", ++ fi->fabric_attr->name, fi->domain_attr->name, ++ fi->ep_attr->type); ++ ret = check(info); ++ if (ret) ++ break; ++ } ++out: ++ fi_freeinfo(test_hints); ++ fi_freeinfo(info); ++ return ret; ++} ++ ++#define getinfo_test(name, num, desc, node, service, flags, hints, init, test, check, \ ++ ret_exp) \ ++char *getinfo_ ## name ## num ## _desc = desc; \ ++static int getinfo_ ## name ## num(void) \ ++{ \ ++ int ret, testret = FAIL; \ ++ ret = getinfo_unit_test(node, service, flags, hints, init, test, check, \ ++ ret_exp); \ ++ if (ret) \ ++ goto fail; \ ++ testret = PASS; \ ++fail: \ ++ return TEST_RET_VAL(ret, testret); \ ++} ++ ++/* ++ * Tests: ++ */ ++ ++ ++/* 1. No hints tests ++ * These tests do not receive hints. If a particular provider has been ++ * requested, the environment variable FI_PROVIDER will be set to restrict ++ * the provider used. Otherwise, test failures may occur for any provider. ++ */ ++ ++/* 1.1 Source address only tests */ ++getinfo_test(no_hints, 1, "Test with no node, service, flags or hints", ++ NULL, NULL, 0, NULL, NULL, NULL, check_srcaddr, 0) ++getinfo_test(no_hints, 2, "Test with node, no service, FI_SOURCE flag and no hints", ++ opts.src_addr ? opts.src_addr : "localhost", NULL, FI_SOURCE, ++ NULL, NULL, NULL, check_srcaddr, 0) ++getinfo_test(no_hints, 3, "Test with service, FI_SOURCE flag and no node or hints", ++ NULL, opts.src_port, FI_SOURCE, NULL, NULL, ++ NULL, check_srcaddr, 0) // TODO should we check for wildcard addr? ++getinfo_test(no_hints, 4, "Test with node, service, FI_SOURCE flags and no hints", ++ opts.src_addr ? opts.src_addr : "localhost", opts.src_port, ++ FI_SOURCE, NULL, NULL, NULL, check_srcaddr, 0) ++ ++/* 1.2 Source and destination address tests */ ++getinfo_test(no_hints, 5, "Test with node, service and no hints", ++ opts.dst_addr ? opts.dst_addr : "localhost", opts.dst_port, ++ 0, NULL, NULL, NULL, check_src_dest_addr, 0) ++ ++/* 2. Test with hints */ ++/* 2.1 Source address only tests */ ++getinfo_test(src, 1, "Test with no node, service, or flags", ++ NULL, NULL, 0, hints, NULL, NULL, check_srcaddr, 0) ++getinfo_test(src, 2, "Test with node, no service, FI_SOURCE flag", ++ opts.src_addr ? opts.src_addr : "localhost", NULL, FI_SOURCE, ++ hints, NULL, NULL, check_srcaddr, 0) ++getinfo_test(src, 3, "Test with service, FI_SOURCE flag and no node", ++ NULL, opts.src_port, FI_SOURCE, hints, NULL, ++ NULL, check_srcaddr, 0) // TODO should we check for wildcard addr? ++getinfo_test(src, 4, "Test with node, service, FI_SOURCE flags", ++ opts.src_addr ? opts.src_addr : "localhost", opts.src_port, ++ FI_SOURCE, hints, NULL, NULL, check_srcaddr, 0) ++ ++/* 2.2 Source and destination address tests */ ++getinfo_test(src_dest, 1, "Test with node, service", ++ opts.dst_addr ? opts.dst_addr : "localhost", opts.dst_port, ++ 0, hints, NULL, NULL, check_src_dest_addr, 0) ++ ++getinfo_test(src_dest, 2, "Test API version", ++ NULL, NULL, 0, hints, NULL, NULL, check_api_version , 0) ++ ++/* Negative tests */ ++getinfo_test(neg, 1, "Test with non-existent domain name", ++ NULL, NULL, 0, hints, invalid_dom, NULL, NULL, -FI_ENODATA) ++ ++/* Utility provider tests */ ++getinfo_test(util, 1, "Test if we get utility provider when requested", ++ NULL, NULL, 0, hints, NULL, NULL, check_util_prov, 0) ++ ++/* Message Ordering Tests */ ++getinfo_test(msg_ordering, 1, "Test msg ordering bits supported are set", ++ NULL, NULL, 0, hints, NULL, validate_msg_ordering_bits, NULL, 0) ++getinfo_test(raw_ordering, 1, "Test rma RAW ordering size is set", ++ NULL, NULL, 0, hints, init_valid_rma_RAW_ordering_no_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(raw_ordering, 2, "Test rma RAW ordering size is set to hints", ++ NULL, NULL, 0, hints, init_valid_rma_RAW_ordering_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(war_ordering, 1, "Test rma WAR ordering size is set", ++ NULL, NULL, 0, hints, init_valid_rma_WAR_ordering_no_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(war_ordering, 2, "Test rma WAR ordering size is set to hints", ++ NULL, NULL, 0, hints, init_valid_rma_WAR_ordering_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(waw_ordering, 1, "Test rma WAW ordering size is set", ++ NULL, NULL, 0, hints, init_valid_rma_WAW_ordering_no_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(waw_ordering, 2, "Test rma WAW ordering size is set to hints", ++ NULL, NULL, 0, hints, init_valid_rma_WAW_ordering_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(bad_raw_ordering, 1, "Test invalid rma RAW ordering size", ++ NULL, NULL, 0, hints, init_invalid_rma_RAW_ordering_size, ++ NULL, NULL, -FI_ENODATA) ++getinfo_test(bad_war_ordering, 1, "Test invalid rma WAR ordering size", ++ NULL, NULL, 0, hints, init_invalid_rma_WAR_ordering_size, ++ NULL, NULL, -FI_ENODATA) ++getinfo_test(bad_waw_ordering, 1, "Test invalid rma WAW ordering size", ++ NULL, NULL, 0, hints, init_invalid_rma_WAW_ordering_size, ++ NULL, NULL, -FI_ENODATA) ++ ++/* MR mode tests */ ++getinfo_test(mr_mode, 1, "Test FI_MR_BASIC", NULL, NULL, 0, ++ hints, init_mr_basic, NULL, check_mr_basic, -FI_ENODATA) ++getinfo_test(mr_mode, 2, "Test FI_MR_SCALABLE", NULL, NULL, 0, ++ hints, init_mr_scalable, NULL, check_mr_scalable, -FI_ENODATA) ++getinfo_test(mr_mode, 3, "Test FI_MR_UNSPEC (v1.0)", NULL, NULL, 0, ++ hints, init_mr_unspec, test_mr_v1_0, check_mr_unspec, -FI_ENODATA) ++getinfo_test(mr_mode, 4, "Test FI_MR_BASIC (v1.0)", NULL, NULL, 0, ++ hints, init_mr_basic, test_mr_v1_0, check_mr_basic, -FI_ENODATA) ++getinfo_test(mr_mode, 5, "Test FI_MR_SCALABLE (v1.0)", NULL, NULL, 0, ++ hints, init_mr_scalable, test_mr_v1_0, check_mr_scalable, -FI_ENODATA) ++getinfo_test(mr_mode, 6, "Test mr_mode bits", NULL, NULL, 0, ++ hints, NULL, test_mr_modes, NULL, 0) ++ ++ ++static void usage(void) ++{ ++ ft_unit_usage("getinfo_test", "Unit tests for fi_getinfo"); ++ FT_PRINT_OPTS_USAGE("-e ", "Endpoint type: msg|rdm|dgram (default:rdm)"); ++ ft_addr_usage(); ++} ++ ++static int set_prov(char *prov_name) ++{ ++ const char *util_name; ++ const char *core_name; ++ char *core_name_dup; ++ size_t len; ++ ++ util_name = ft_util_name(prov_name, &len); ++ core_name = ft_core_name(prov_name, &len); ++ ++ if (util_name && !core_name) ++ return 0; ++ ++ core_name_dup = strndup(core_name, len); ++ if (!core_name_dup) ++ return -FI_ENOMEM; ++ ++ snprintf(new_prov_var, sizeof(new_prov_var) - 1, "FI_PROVIDER=%s", ++ core_name_dup); ++ ++ putenv(new_prov_var); ++ free(core_name_dup); ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int failed; ++ int op; ++ size_t len; ++ const char *util_name; ++ ++ struct test_entry no_hint_tests[] = { ++ TEST_ENTRY_GETINFO(no_hints1), ++ TEST_ENTRY_GETINFO(no_hints2), ++ TEST_ENTRY_GETINFO(no_hints3), ++ TEST_ENTRY_GETINFO(no_hints4), ++ TEST_ENTRY_GETINFO(no_hints5), ++ { NULL, "" } ++ }; ++ ++ struct test_entry hint_tests[] = { ++ TEST_ENTRY_GETINFO(src1), ++ TEST_ENTRY_GETINFO(src2), ++ TEST_ENTRY_GETINFO(src3), ++ TEST_ENTRY_GETINFO(src4), ++ TEST_ENTRY_GETINFO(src_dest1), ++ TEST_ENTRY_GETINFO(src_dest2), ++ TEST_ENTRY_GETINFO(msg_ordering1), ++ TEST_ENTRY_GETINFO(raw_ordering1), ++ TEST_ENTRY_GETINFO(raw_ordering2), ++ TEST_ENTRY_GETINFO(war_ordering1), ++ TEST_ENTRY_GETINFO(war_ordering2), ++ TEST_ENTRY_GETINFO(waw_ordering1), ++ TEST_ENTRY_GETINFO(waw_ordering2), ++ TEST_ENTRY_GETINFO(bad_raw_ordering1), ++ TEST_ENTRY_GETINFO(bad_war_ordering1), ++ TEST_ENTRY_GETINFO(bad_waw_ordering1), ++ TEST_ENTRY_GETINFO(neg1), ++ TEST_ENTRY_GETINFO(mr_mode1), ++ TEST_ENTRY_GETINFO(mr_mode2), ++ TEST_ENTRY_GETINFO(mr_mode3), ++ TEST_ENTRY_GETINFO(mr_mode4), ++ TEST_ENTRY_GETINFO(mr_mode5), ++ TEST_ENTRY_GETINFO(mr_mode6), ++ { NULL, "" } ++ }; ++ ++ struct test_entry util_prov_tests[] = { ++ TEST_ENTRY_GETINFO(util1), ++ { NULL, "" } ++ }; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, ADDR_OPTS INFO_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'h': ++ usage(); ++ return EXIT_SUCCESS; ++ case '?': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ if (!opts.dst_port) ++ opts.dst_port = "9228"; ++ if (!opts.src_port) ++ opts.src_port = "9228"; ++ ++ hints->mode = ~0; ++ ++ if (hints->fabric_attr->prov_name) { ++ if (set_prov(hints->fabric_attr->prov_name)) ++ return EXIT_FAILURE; ++ } else { ++ FT_WARN("\nTests getinfo1 to getinfo5 may not run exclusively " ++ "for a particular provider since we don't pass hints.\n" ++ "So the failures in any of those tests may not be " ++ "attributable to a single provider.\n"); ++ } ++ ++ failed = run_tests(no_hint_tests, err_buf); ++ ++ if (hints->fabric_attr->prov_name) { ++ util_name = ft_util_name(hints->fabric_attr->prov_name, &len); ++ if (util_name) ++ failed += run_tests(util_prov_tests, err_buf); ++ } ++ ++ failed += run_tests(hint_tests, err_buf); ++ ++ if (failed > 0) { ++ printf("\nSummary: %d tests failed\n", failed); ++ } else { ++ printf("\nSummary: all tests passed\n"); ++ } ++ ++ ft_free_res(); ++ return (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/mr_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/mr_test.c +new file mode 100644 +index 0000000..16cfb3f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/mr_test.c +@@ -0,0 +1,273 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "unit_common.h" ++#include "shared.h" ++ ++static char err_buf[512]; ++ ++/* ++ * Tests: ++ */ ++static int mr_reg() ++{ ++ int i, j; ++ int ret = 0; ++ int testret = FAIL; ++ struct fid_mr *mr; ++ uint64_t access; ++ uint64_t *access_combinations; ++ int cnt; ++ ++ access = ft_info_to_mr_access(fi); ++ ret = ft_alloc_bit_combo(0, access, &access_combinations, &cnt); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "ft_alloc_bit_combo failed", ret); ++ goto out; ++ } ++ ++ for (i = 0; i < test_cnt; i++) { ++ buf_size = test_size[i].size; ++ for (j = 0; j < cnt; j++) { ++ ret = fi_mr_reg(domain, buf, buf_size, ++ access_combinations[j], 0, ++ FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_mr_reg failed", ret); ++ goto free; ++ } ++ ++ ret = fi_close(&mr->fid); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_close failed", ret); ++ goto free; ++ } ++ } ++ } ++ testret = PASS; ++free: ++ ft_free_bit_combo(access_combinations); ++out: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int mr_regv() ++{ ++ int i, j, n; ++ int ret = 0; ++ int testret = FAIL; ++ struct fid_mr *mr; ++ struct iovec *iov; ++ char *base; ++ ++ iov = calloc(fi->domain_attr->mr_iov_limit, sizeof(*iov)); ++ if (!iov) { ++ perror("calloc"); ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ ++ for (i = 0; i < test_cnt && ++ test_size[i].size <= fi->domain_attr->mr_iov_limit; i++) { ++ n = test_size[i].size; ++ base = buf; ++ ++ for (j = 0; j < n; j++) { ++ iov[j].iov_base = base; ++ iov[j].iov_len = test_size[test_cnt - 1].size / n; ++ base += iov[j].iov_len; ++ } ++ ++ ret = fi_mr_regv(domain, &iov[0], n, ft_info_to_mr_access(fi), 0, ++ FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_mr_regv failed", ret); ++ goto free; ++ } ++ ++ ret = fi_close(&mr->fid); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_close failed", ret); ++ goto free; ++ } ++ } ++ testret = PASS; ++free: ++ free(iov); ++out: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int mr_regattr() ++{ ++ int i, j, n; ++ int ret = 0; ++ int testret = FAIL; ++ struct fid_mr *mr; ++ struct iovec *iov; ++ struct fi_mr_attr attr; ++ char *base; ++ ++ attr.access = ft_info_to_mr_access(fi); ++ attr.requested_key = FT_MR_KEY; ++ attr.context = NULL; ++ ++ iov = calloc(fi->domain_attr->mr_iov_limit, sizeof(*iov)); ++ if (!iov) { ++ perror("calloc"); ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ ++ for (i = 0; i < test_cnt && ++ test_size[i].size <= fi->domain_attr->mr_iov_limit; i++) { ++ ++ n = test_size[i].size; ++ base = buf; ++ for (j = 0; j < n; j++) { ++ iov[j].iov_base = base; ++ iov[j].iov_len = test_size[test_cnt - 1].size / n; ++ base += iov[j].iov_len; ++ } ++ ++ attr.iov_count = n; ++ attr.mr_iov = &iov[0]; ++ ret = fi_mr_regattr(domain, &attr, 0, &mr); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_mr_regattr failed", ret); ++ goto free; ++ } ++ ++ ret = fi_close(&mr->fid); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_close failed", ret); ++ goto free; ++ } ++ } ++ testret = PASS; ++free: ++ free(iov); ++out: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++struct test_entry test_array[] = { ++ TEST_ENTRY(mr_reg, "Test fi_mr_reg across different access combinations"), ++ TEST_ENTRY(mr_regv, "Test fi_mr_regv across various buffer sizes"), ++ TEST_ENTRY(mr_regattr, "Test fi_mr_regattr across various buffer sizes"), ++ { NULL, "" } ++}; ++ ++static void usage(void) ++{ ++ ft_unit_usage("mr_test", "Unit test for Memory Region (MR)"); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed = 0; ++ ++ buf = NULL; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ ++ hints->caps |= FI_MSG | FI_RMA; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ hints->caps &= ~FI_RMA; ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto out; ++ } ++ } ++ ++ if (!ft_info_to_mr_access(fi)) ++ goto out; ++ ++ if (!fi->domain_attr->mr_iov_limit) { ++ ret = -FI_EINVAL; ++ FT_PRINTERR("mr_iov_limit not set", ret); ++ goto out; ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto out; ++ ++ buf = malloc(test_size[test_cnt - 1].size); ++ if (!buf) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ ++ printf("Testing MR on fabric %s\n", fi->fabric_attr->name); ++ ++ failed = run_tests(test_array, err_buf); ++ if (failed > 0) { ++ printf("Summary: %d tests failed\n", failed); ++ } else { ++ printf("Summary: all tests passed\n"); ++ } ++ ++out: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/resource_freeing.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/resource_freeing.c +new file mode 100644 +index 0000000..f3da76f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/resource_freeing.c +@@ -0,0 +1,303 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include "shared.h" ++ ++#define lengthof(arr) (sizeof(arr) / sizeof(*arr)) ++ ++enum test_depth { ++ DEPTH_FABRIC, ++ DEPTH_DOMAIN, ++ DEPTH_ENABLE_ENDPOINT ++}; ++ ++int test_resource_freeing(enum test_depth test_depth, ++ const char *fabric_service) ++{ ++ int our_ret = FI_SUCCESS; ++ int ret; ++ uint64_t flags; ++ struct fi_info *info; ++ ++ /* Setup fabric */ ++ ++ hints = fi_allocinfo(); ++ if (!hints) { ++ our_ret = -FI_ENOMEM; ++ goto error_return; ++ } ++ ++ flags = FI_SOURCE; ++ hints->caps = FI_RMA; ++ hints->ep_attr->type = FI_EP_RDM; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, fabric_service, flags, ++ hints, &info); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ our_ret = ret; ++ goto free_hints; ++ } ++ ++ ret = fi_fabric(info->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_fabric", ret); ++ our_ret = ret; ++ goto free_info; ++ } ++ ++ if (test_depth == DEPTH_FABRIC) { ++ goto close_fabric; ++ } ++ ++ ret = fi_domain(fabric, info, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ our_ret = ret; ++ goto close_fabric; ++ } ++ ++ if (test_depth == DEPTH_DOMAIN) { ++ goto close_domain; ++ } ++ ++ /* Create pre-endpoint resources */ ++ ++ av_attr.type = info->domain_attr->av_type; ++ av_attr.count = 0; ++ av_attr.name = NULL; ++ ret = fi_av_open(domain, &av_attr, &av, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_av_open", ret); ++ our_ret = ret; ++ goto close_domain; ++ } ++ ++ cntr_attr.events = FI_CNTR_EVENTS_COMP; ++ cntr_attr.wait_obj = FI_WAIT_UNSPEC; ++ ret = fi_cntr_open(domain, &cntr_attr, &txcntr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ our_ret = ret; ++ goto close_av; ++ } ++ ++ ret = fi_cq_open(domain, &cq_attr, &txcq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ our_ret = ret; ++ goto close_txcntr; ++ } ++ ++ ret = fi_endpoint(domain, info, &ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ our_ret = ret; ++ goto close_txcq; ++ } ++ ++ /* Bind pre-endpoint resources to ep */ ++ ++ ret = fi_ep_bind(ep, &txcntr->fid, FI_WRITE); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ our_ret = ret; ++ goto close_ep; ++ } ++ ++ ret = fi_ep_bind(ep, &av->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ our_ret = ret; ++ goto close_ep; ++ } ++ ++ ret = fi_ep_bind(ep, &txcq->fid, FI_TRANSMIT); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ our_ret = ret; ++ goto close_ep; ++ } ++ ++ /* Enable ep */ ++ ++ ret = fi_enable(ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ our_ret = ret; ++ goto close_ep; ++ } ++ ++ if (test_depth == DEPTH_ENABLE_ENDPOINT) { ++ goto close_ep; ++ } ++ ++close_ep: ++ ret = fi_close(&ep->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_txcq: ++ ret = fi_close(&txcq->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_txcntr: ++ ret = fi_close(&txcntr->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_av: ++ ret = fi_close(&av->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_domain: ++ ret = fi_close(&domain->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_fabric: ++ ret = fi_close(&fabric->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++free_info: ++ fi_freeinfo(info); ++ ++free_hints: ++ fi_freeinfo(hints); ++ ++error_return: ++ return our_ret; ++} ++ ++void print_test_resource_freeing_call(enum test_depth test_depth, int iter) ++{ ++ fprintf(stdout, ++ "Running test_resource_freeing with " ++ "[%s] for %d iterations\n", ++ (test_depth == DEPTH_FABRIC) ? "DEPTH_FABRIC" ++ : (test_depth == DEPTH_DOMAIN) ? "DEPTH_DOMAIN" ++ : (test_depth == DEPTH_ENABLE_ENDPOINT) ? "DEPTH_ENABLE_ENDPOINT" ++ : "(unknown test depth)", ++ iter ++ ); ++ ++ fflush(stderr); ++ fflush(stdout); ++} ++ ++void print_test_resource_freeing_result_call(int success, ++ enum test_depth test_depth, ++ int iter) ++{ ++ fprintf(success ? stdout : stderr, ++ "%s: test_resource_freeing %s with " ++ "[%s]\n", ++ success ? "GOOD" : "ERROR", ++ success ? "succeeded" : "failed", ++ (test_depth == DEPTH_FABRIC) ? "DEPTH_FABRIC" ++ : (test_depth == DEPTH_DOMAIN) ? "DEPTH_DOMAIN" ++ : (test_depth == DEPTH_ENABLE_ENDPOINT) ? "DEPTH_ENABLE_ENDPOINT" ++ : "(unknown test depth)" ++ ); ++ ++ fflush(stderr); ++ fflush(stdout); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, i, td_idx, ret = 0, iters = 2, exit_code = 0; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "i:h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'i': ++ iters = atoi(optarg); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Test which exercises resource freeing in a provider\n"); ++ FT_PRINT_OPTS_USAGE("-i ", "number of iterations to test"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ enum test_depth test_depth[] = { ++ DEPTH_FABRIC, DEPTH_DOMAIN, DEPTH_ENABLE_ENDPOINT}; ++ ++ for (td_idx = 0; td_idx < lengthof(test_depth); td_idx += 1) { ++ print_test_resource_freeing_call( ++ test_depth[td_idx], iters); ++ for (i = 0; i < iters; i += 1) { ++ ret = test_resource_freeing( ++ test_depth[td_idx], default_port); ++ if (ret) { ++ exit_code = EXIT_FAILURE; ++ break; ++ } ++ } ++ print_test_resource_freeing_result_call( ++ !ret, /* int success */ ++ test_depth[td_idx], ++ i); ++ } ++ ++ return ft_exit_code(exit_code); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/freebsd/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/freebsd/osd.h +index f3bef8f..d9fca2f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/freebsd/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/freebsd/osd.h +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2016 Intel Corp, Inc. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -37,6 +38,7 @@ + #include + + #include "unix/osd.h" ++#include "rdma/fi_errno.h" + + #define bswap_64 bswap64 + +@@ -51,6 +53,21 @@ static inline int ofi_shm_remap(struct util_shm *shm, size_t newsize, void **map + return -1; + } + ++static inline ssize_t ofi_get_hugepage_size(void) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_alloc_hugepage_buf(void **memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_free_hugepage_buf(void *memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ + #endif /* _FREEBSD_OSD_H_ */ + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/linux/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/linux/osd.h +index bd54c79..3ab0313 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/linux/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/linux/osd.h +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -53,4 +54,22 @@ static inline int ofi_shm_remap(struct util_shm *shm, + return shm->ptr == MAP_FAILED ? -FI_EINVAL : FI_SUCCESS; + } + ++ssize_t ofi_get_hugepage_size(void); ++ ++static inline int ofi_alloc_hugepage_buf(void **memptr, size_t size) ++{ ++ *memptr = mmap(NULL, size, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0); ++ ++ if (*memptr == MAP_FAILED) ++ return -errno; ++ ++ return FI_SUCCESS; ++} ++ ++static inline int ofi_free_hugepage_buf(void *memptr, size_t size) ++{ ++ return munmap(memptr, size); ++} ++ + #endif /* _LINUX_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi.h +index c664fb9..9a7ebc2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi.h +@@ -1,6 +1,6 @@ + /* + * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. +- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -63,6 +64,7 @@ + extern "C" { + #endif + ++#define OFI_GETINFO_INTERNAL (1ULL << 58) + #define OFI_CORE_PROV_ONLY (1ULL << 59) + + #define sizeof_field(type, field) sizeof(((type *)0)->field) +@@ -81,6 +83,23 @@ extern "C" { + _a > _b ? _a : _b; }) + #endif + ++#define ofi_div_ceil(a, b) ((a + b - 1) / b) ++ ++#define OFI_MAGIC_64 (0x0F1C0DE0F1C0DE64) ++ ++#define TAB " " ++ ++#define CASEENUMSTR(SYM) \ ++ case SYM: { ofi_strcatf(buf, #SYM); break; } ++#define IFFLAGSTR(flags, SYM) \ ++ do { if (flags & SYM) ofi_strcatf(buf, #SYM ", "); } while(0) ++#define CASEENUMSTRN(SYM, N) \ ++ case SYM: { ofi_strncatf(buf, N, #SYM); break; } ++#define IFFLAGSTRN(flags, SYM, N) \ ++ do { if (flags & SYM) ofi_strncatf(buf, N, #SYM ", "); } while(0) ++ ++#define ofi_strcatf(dest, ...) \ ++ ofi_strncatf(dest, OFI_BUFSIZ, __VA_ARGS__) + + /* + * CPU specific features +@@ -97,10 +116,16 @@ enum { + int ofi_cpu_supports(unsigned func, unsigned reg, unsigned bit); + + +-/* Restrict to size of struct fi_context */ ++enum ofi_prov_type { ++ OFI_PROV_CORE, ++ OFI_PROV_UTIL, ++ OFI_PROV_HOOK, ++}; ++ ++/* Restrict to size of struct fi_provider::context (struct fi_context) */ + struct fi_prov_context { ++ enum ofi_prov_type type; + int disable_logging; +- int is_util_prov; + }; + + struct fi_filter { +@@ -115,11 +140,23 @@ void ofi_create_filter(struct fi_filter *filter, const char *env_name); + void ofi_free_filter(struct fi_filter *filter); + int ofi_apply_filter(struct fi_filter *filter, const char *name); + ++int ofi_nic_close(struct fid *fid); ++struct fid_nic *ofi_nic_dup(const struct fid_nic *nic); ++int ofi_nic_tostr(const struct fid *fid_nic, char *buf, size_t len); ++ ++struct fi_provider *ofi_get_hook(const char *name); ++ + void fi_log_init(void); + void fi_log_fini(void); + void fi_param_init(void); + void fi_param_fini(void); + void fi_param_undefine(const struct fi_provider *provider); ++void ofi_hook_init(void); ++void ofi_hook_fini(void); ++void ofi_hook_install(struct fid_fabric *hfabric, struct fid_fabric **fabric, ++ struct fi_provider *prov); ++void ofi_remove_comma(char *buffer); ++void ofi_strncatf(char *dest, size_t n, const char *fmt, ...); + + const char *ofi_hex_str(const uint8_t *data, size_t len); + +@@ -150,6 +187,7 @@ static inline size_t fi_get_aligned_sz(size_t size, size_t alignment) + uint64_t ofi_max_tag(uint64_t mem_tag_format); + uint64_t ofi_tag_format(uint64_t max_tag); + uint8_t ofi_msb(uint64_t num); ++uint8_t ofi_lsb(uint64_t num); + + int ofi_send_allowed(uint64_t caps); + int ofi_recv_allowed(uint64_t caps); +@@ -162,7 +200,6 @@ int ofi_check_rx_mode(const struct fi_info *info, uint64_t flags); + uint64_t fi_gettime_ms(void); + uint64_t fi_gettime_us(void); + +- + #define OFI_ENUM_VAL(X) X + #define OFI_STR(X) #X + #define OFI_STR_INT(X) OFI_STR(X) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_abi.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_abi.h +index cd02866..8ba35a4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_abi.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_abi.h +@@ -111,7 +111,7 @@ extern "C" { + * name appended with the ABI version that it is compatible with. + */ + +-#define CURRENT_ABI "FABRIC_1.1" ++#define CURRENT_ABI "FABRIC_1.2" + + #if HAVE_ALIAS_ATTRIBUTE == 1 + #define DEFAULT_SYMVER_PRE(a) a##_ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_atomic.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_atomic.h +index 3f4585b..a146e75 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_atomic.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_atomic.h +@@ -11,7 +11,7 @@ + * without modification, are permitted provided that the following + * conditions are met: + * +- * - Redistibutions of source code must retain the above ++ * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_epoll.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_epoll.h +new file mode 100644 +index 0000000..def823e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_epoll.h +@@ -0,0 +1,149 @@ ++/* ++ * Copyright (c) 2011-s2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ * ++ */ ++ ++#ifndef _OFI_EPOLL_H_ ++#define _OFI_EPOLL_H_ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#ifdef HAVE_EPOLL ++#include ++ ++#define FI_EPOLL_IN EPOLLIN ++#define FI_EPOLL_OUT EPOLLOUT ++ ++typedef int fi_epoll_t; ++ ++static inline int fi_epoll_create(int *ep) ++{ ++ *ep = epoll_create(4); ++ return *ep < 0 ? -ofi_syserr() : 0; ++} ++ ++static inline int fi_epoll_add(int ep, int fd, uint32_t events, void *context) ++{ ++ struct epoll_event event; ++ int ret; ++ ++ event.data.ptr = context; ++ event.events = events; ++ ret = epoll_ctl(ep, EPOLL_CTL_ADD, fd, &event); ++ if ((ret == -1) && (ofi_syserr() != EEXIST)) ++ return -ofi_syserr(); ++ return 0; ++} ++ ++static inline int fi_epoll_mod(int ep, int fd, uint32_t events, void *context) ++{ ++ struct epoll_event event; ++ ++ event.data.ptr = context; ++ event.events = events; ++ return epoll_ctl(ep, EPOLL_CTL_MOD, fd, &event) ? -ofi_syserr() : 0; ++} ++ ++static inline int fi_epoll_del(int ep, int fd) ++{ ++ return epoll_ctl(ep, EPOLL_CTL_DEL, fd, NULL) ? -ofi_syserr() : 0; ++} ++ ++static inline int fi_epoll_wait(int ep, void **contexts, int max_contexts, ++ int timeout) ++{ ++ struct epoll_event events[max_contexts]; ++ int ret; ++ int i; ++ ++ ret = epoll_wait(ep, events, max_contexts, timeout); ++ if (ret == -1) ++ return -ofi_syserr(); ++ ++ for (i = 0; i < ret; i++) ++ contexts[i] = events[i].data.ptr; ++ return ret; ++} ++ ++static inline void fi_epoll_close(int ep) ++{ ++ close(ep); ++} ++ ++#else ++#include ++ ++#define FI_EPOLL_IN POLLIN ++#define FI_EPOLL_OUT POLLOUT ++ ++enum fi_epoll_ctl { ++ EPOLL_CTL_ADD, ++ EPOLL_CTL_DEL, ++ EPOLL_CTL_MOD, ++}; ++ ++struct fi_epoll_work_item { ++ int fd; ++ uint32_t events; ++ void *context; ++ enum fi_epoll_ctl type; ++ struct slist_entry entry; ++}; ++ ++typedef struct fi_epoll { ++ int size; ++ int nfds; ++ struct pollfd *fds; ++ void **context; ++ int index; ++ struct fd_signal signal; ++ struct slist work_item_list; ++ fastlock_t lock; ++} *fi_epoll_t; ++ ++int fi_epoll_create(struct fi_epoll **ep); ++int fi_epoll_add(struct fi_epoll *ep, int fd, uint32_t events, void *context); ++int fi_epoll_mod(struct fi_epoll *ep, int fd, uint32_t events, void *context); ++int fi_epoll_del(struct fi_epoll *ep, int fd); ++int fi_epoll_wait(struct fi_epoll *ep, void **contexts, int max_contexts, ++ int timeout); ++void fi_epoll_close(struct fi_epoll *ep); ++ ++#endif /* HAVE_EPOLL */ ++ ++#endif /* _OFI_EPOLL_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_hook.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_hook.h +new file mode 100644 +index 0000000..abf827d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_hook.h +@@ -0,0 +1,206 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL); Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _OFI_HOOK_H_ ++#define _OFI_HOOK_H_ ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++/* ++ * Hooks are installed from top down. ++ * Values must start at 0 and increment by one. ++ */ ++enum ofi_hook_class { ++ HOOK_NOOP, ++ HOOK_PERF, ++ MAX_HOOKS ++}; ++ ++ ++/* ++ * Define hook structs so we can cast from fid to parent using simple cast. ++ * This lets us have a single close() call. ++ */ ++ ++extern struct fi_ops hook_fid_ops; ++struct fid *hook_to_hfid(const struct fid *fid); ++struct fid_wait *hook_to_hwait(const struct fid_wait *wait); ++ ++ ++struct hook_fabric { ++ struct fid_fabric fabric; ++ struct fid_fabric *hfabric; ++ enum ofi_hook_class hclass; ++ struct fi_provider *prov; ++}; ++ ++void hook_fabric_init(struct hook_fabric *fabric, enum ofi_hook_class hclass, ++ struct fid_fabric *hfabric, struct fi_provider *hprov, ++ struct fi_ops *f_ops); ++ ++ ++struct hook_domain { ++ struct fid_domain domain; ++ struct fid_domain *hdomain; ++ struct hook_fabric *fabric; ++}; ++ ++int hook_domain(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++ ++ ++struct hook_av { ++ struct fid_av av; ++ struct fid_av *hav; ++ struct hook_domain *domain; ++}; ++ ++int hook_av_open(struct fid_domain *domain, struct fi_av_attr *attr, ++ struct fid_av **av, void *context); ++ ++ ++struct hook_wait { ++ struct fid_wait wait; ++ struct fid_wait *hwait; ++ struct hook_fabric *fabric; ++}; ++ ++int hook_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, ++ struct fid_wait **waitset); ++int hook_trywait(struct fid_fabric *fabric, struct fid **fids, int count); ++ ++ ++struct hook_poll { ++ struct fid_poll poll; ++ struct fid_poll *hpoll; ++ struct hook_domain *domain; ++}; ++ ++int hook_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, ++ struct fid_poll **pollset); ++ ++ ++struct hook_eq { ++ struct fid_eq eq; ++ struct fid_eq *heq; ++ struct hook_fabric *fabric; ++}; ++ ++int hook_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, ++ struct fid_eq **eq, void *context); ++ ++ ++struct hook_cq { ++ struct fid_cq cq; ++ struct fid_cq *hcq; ++ struct hook_domain *domain; ++}; ++ ++int hook_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq, void *context); ++const char * ++hook_cq_strerror(struct fid_cq *cq, int prov_errno, ++ const void *err_data, char *buf, size_t len); ++ ++ ++struct hook_cntr { ++ struct fid_cntr cntr; ++ struct fid_cntr *hcntr; ++ struct hook_domain *domain; ++}; ++ ++int hook_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, ++ struct fid_cntr **cntr, void *context); ++ ++ ++struct hook_ep { ++ struct fid_ep ep; ++ struct fid_ep *hep; ++ struct hook_domain *domain; ++}; ++ ++int hook_endpoint(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep, void *context); ++int hook_scalable_ep(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **sep, void *context); ++int hook_srx_ctx(struct fid_domain *domain, ++ struct fi_rx_attr *attr, struct fid_ep **rx_ep, ++ void *context); ++ ++extern struct fi_ops_cm hook_cm_ops; ++extern struct fi_ops_msg hook_msg_ops; ++extern struct fi_ops_rma hook_rma_ops; ++extern struct fi_ops_tagged hook_tagged_ops; ++extern struct fi_ops_atomic hook_atomic_ops; ++ ++ ++struct hook_pep { ++ struct fid_pep pep; ++ struct fid_pep *hpep; ++ struct hook_fabric *fabric; ++}; ++ ++int hook_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context); ++ ++ ++struct hook_stx { ++ struct fid_stx stx; ++ struct fid_stx *hstx; ++ struct hook_domain *domain; ++}; ++ ++int hook_stx_ctx(struct fid_domain *domain, ++ struct fi_tx_attr *attr, struct fid_stx **stx, ++ void *context); ++ ++ ++struct hook_mr { ++ struct fid_mr mr; ++ struct fid_mr *hmr; ++ struct hook_domain *domain; ++}; ++ ++ ++#endif /* _OFI_HOOK_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_iov.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_iov.h +index dbf4b37..b8ca7f5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_iov.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_iov.h +@@ -61,6 +61,15 @@ static inline size_t ofi_total_ioc_cnt(const struct fi_ioc *ioc, size_t ioc_coun + return cnt; + } + ++static inline size_t ofi_total_rma_ioc_cnt(const struct fi_rma_ioc *rma_ioc, ++ size_t ioc_count) ++{ ++ size_t i, cnt = 0; ++ for (i = 0; i < ioc_count; i++) ++ cnt += rma_ioc[i].count; ++ return cnt; ++} ++ + #define OFI_COPY_IOV_TO_BUF 0 + #define OFI_COPY_BUF_TO_IOV 1 + +@@ -99,6 +108,28 @@ ofi_copy_from_iov(void *buf, uint64_t bufsize, + } + } + ++static inline void ofi_ioc_to_iov(const struct fi_ioc *ioc, struct iovec *iov, ++ size_t count, size_t size) ++{ ++ int i; ++ for (i = 0; i < count; i++) { ++ iov[i].iov_base = ioc[i].addr; ++ iov[i].iov_len = ioc[i].count * size; ++ } ++} ++ ++static inline void ofi_rma_ioc_to_iov(const struct fi_rma_ioc *ioc, ++ struct fi_rma_iov *iov, ++ size_t count, size_t size) ++{ ++ int i; ++ for (i = 0; i < count; i++) { ++ iov[i].addr = ioc[i].addr; ++ iov[i].len = ioc[i].count * size; ++ iov[i].key = ioc[i].key; ++ } ++} ++ + static inline void * + ofi_iov_end(const struct iovec *iov) + { +@@ -142,4 +173,13 @@ void ofi_consume_iov(struct iovec *iovec, size_t *iovec_count, size_t offset); + + int ofi_truncate_iov(struct iovec *iov, size_t *iov_count, size_t trim_size); + ++/* Copy 'len' bytes worth of src iovec to dst */ ++int ofi_copy_iov_desc(struct iovec *dst_iov, void **dst_desc, size_t *dst_count, ++ struct iovec *src_iov, void **src_desc, size_t src_count, ++ size_t *index, size_t *offset, size_t len); ++ ++/* Copy 'len' bytes worth of src fi_rma_iov to dst */ ++int ofi_copy_rma_iov(struct fi_rma_iov *dst_iov, size_t *dst_count, ++ struct fi_rma_iov *src_iov, size_t src_count, ++ size_t *index, size_t *offset, size_t len); + #endif /* _OFI_IOV_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_list.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_list.h +index 0797071..fdc405a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_list.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_list.h +@@ -40,8 +40,10 @@ + #include + #include + +-#include ++#include + ++#include ++#include + + /* + * Double-linked list +@@ -104,16 +106,29 @@ static inline void dlist_remove_init(struct dlist_entry *item) + #define dlist_foreach(head, item) \ + for ((item) = (head)->next; (item) != (head); (item) = (item)->next) + ++#define dlist_foreach_reverse(head, item) \ ++ for ((item) = (head)->prev; (item) != (head); (item) = (item)->prev ++ + #define dlist_foreach_container(head, type, container, member) \ + for ((container) = container_of((head)->next, type, member); \ + &((container)->member) != (head); \ + (container) = container_of((container)->member.next, \ + type, member)) + ++#define dlist_foreach_container_reverse(head, type, container, member) \ ++ for ((container) = container_of((head)->prev, type, member); \ ++ &((container)->member) != (head); \ ++ (container) = container_of((container)->member.prev, \ ++ type, member)) ++ + #define dlist_foreach_safe(head, item, tmp) \ + for ((item) = (head)->next, (tmp) = (item)->next; (item) != (head); \ + (item) = (tmp), (tmp) = (item)->next) + ++#define dlist_foreach_reverse_safe(head, item, tmp) \ ++ for ((item) = (head)->prev, (tmp) = (item)->prev; (item) != (head); \ ++ (item) = (tmp), (tmp) = (item)->prev) ++ + #define dlist_foreach_container_safe(head, type, container, member, tmp) \ + for ((container) = container_of((head)->next, type, member), \ + (tmp) = (container)->member.next; \ +@@ -121,6 +136,13 @@ static inline void dlist_remove_init(struct dlist_entry *item) + (container) = container_of((tmp), type, member), \ + (tmp) = (container)->member.next) + ++#define dlist_foreach_container_reverse_safe(head, type, container, member, tmp)\ ++ for ((container) = container_of((head)->prev, type, member), \ ++ (tmp) = (container)->member.prev; \ ++ &((container)->member) != (head); \ ++ (container) = container_of((tmp), type, member), \ ++ (tmp) = (container)->member.prev) ++ + typedef int dlist_func_t(struct dlist_entry *item, const void *arg); + + static inline struct dlist_entry * +@@ -150,6 +172,18 @@ dlist_remove_first_match(struct dlist_entry *head, dlist_func_t *match, + return item; + } + ++static inline void dlist_insert_order(struct dlist_entry *head, dlist_func_t *order, ++ struct dlist_entry *entry) ++{ ++ struct dlist_entry *item; ++ ++ item = dlist_find_first_match(head, order, entry); ++ if (item) ++ dlist_insert_before(entry, item); ++ else ++ dlist_insert_tail(entry, head); ++} ++ + /* splices list at the front of the list 'head' + * + * BEFORE: +@@ -195,6 +229,150 @@ static inline void dlist_splice_tail(struct dlist_entry *head, + } + + /* ++ * Multi-threaded Double-linked list ++ */ ++struct dlist_ts { ++ struct dlist_entry head; ++ fastlock_t lock; ++}; ++ ++static inline void dlist_ts_init(struct dlist_ts *list) ++{ ++ fastlock_init(&list->lock); ++ dlist_init(&list->head); ++} ++ ++static inline int dlist_ts_empty(struct dlist_ts *list) ++{ ++ return dlist_empty(&list->head); ++} ++ ++static inline void ++dlist_ts_insert_after(struct dlist_ts *list, struct dlist_entry *item, ++ struct dlist_entry *head) ++{ ++ fastlock_acquire(&list->lock); ++ dlist_insert_after(item, head); ++ fastlock_release(&list->lock); ++} ++ ++static inline void ++dlist_ts_insert_before(struct dlist_ts *list, struct dlist_entry *item, ++ struct dlist_entry *head) ++{ ++ dlist_ts_insert_after(list, item, head->prev); ++} ++ ++#define dlist_ts_insert_head(list, item) dlist_ts_insert_after(list, item, &(list)->head) ++#define dlist_ts_insert_tail(list, item) dlist_ts_insert_before(list, item, &(list)->head) ++ ++static inline void ++dlist_ts_remove(struct dlist_ts *list, struct dlist_entry *item) ++{ ++ fastlock_acquire(&list->lock); ++ dlist_remove(item); ++ fastlock_release(&list->lock); ++} ++ ++#define dlist_ts_pop_front(list, type, container, member) \ ++ do { \ ++ fastlock_acquire(&(list)->lock); \ ++ if (dlist_ts_empty(list)) { \ ++ container = NULL; \ ++ } else { \ ++ dlist_pop_front(&(list)->head, type, \ ++ container, member); \ ++ } \ ++ fastlock_release(&(list)->lock); \ ++ } while (0) ++ ++#define dlist_ts_foreach_end(list) \ ++ fastlock_release(&(list)->lock); \ ++ } while (0) ++ ++#define dlist_ts_foreach(list, head, item) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach(list, head, item) ++ ++#define dlist_ts_foreach_reverse(list, head, item) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_reverse(list, head, item) ++ ++#define dlist_ts_foreach_container(list, head, type, container, member) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_container(type, container, member) ++ ++#define dlist_ts_foreach_container_reverse(list, head, type, container, member)\ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_container_reverse(type, container, member) ++ ++#define dlist_ts_foreach_safe(list, head, item, tmp) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_safe(head, item, tmp) ++ ++#define dlist_ts_foreach_reverse_safe(list, head, item, tmp) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_reverse_safe(head, item, tmp) ++ ++#define dlist_ts_foreach_container_safe(list, head, type, container, \ ++ member, tmp) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_container_safe(head, type, container, \ ++ member, tmp) ++ ++#define dlist_ts_foreach_container_reverse_safe(list, head, type, container,\ ++ member, tmp) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_container_reverse_safe(head, type, container, \ ++ member, tmp) ++ ++static inline struct dlist_entry * ++dlist_ts_find_first_match(struct dlist_ts *list, struct dlist_entry *head, ++ dlist_func_t *match, const void *arg) ++{ ++ struct dlist_entry *item; ++ ++ fastlock_acquire(&list->lock); ++ item = dlist_find_first_match(head, match, arg); ++ fastlock_release(&list->lock); ++ ++ return item; ++} ++ ++static inline struct dlist_entry * ++dlist_ts_remove_first_match(struct dlist_ts *list, struct dlist_entry *head, ++ dlist_func_t *match, const void *arg) ++{ ++ struct dlist_entry *item; ++ ++ fastlock_acquire(&list->lock); ++ item = dlist_remove_first_match(head, match, arg); ++ fastlock_release(&list->lock); ++ ++ return item; ++} ++ ++#define dlist_ts_splice_head(list, head, to_splice) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_splice_head(head, to_splice); \ ++ fastlock_release(&list->lock); \ ++ } while(0) ++ ++#define dlist_ts_splice_tail(list, head, to_splice) \ ++ { \ ++ dlist_ts_splice_head(head->prev, to_splice); \ ++ } while(0) ++ ++/* + * Single-linked list + */ + struct slist_entry { +@@ -258,6 +436,17 @@ static inline struct slist_entry *slist_remove_head(struct slist *list) + (prev) = (item), (item) = (item)->next) + + ++#define slist_remove_head_container(list, type, container, member) \ ++ do { \ ++ if (slist_empty(list)) { \ ++ container = NULL; \ ++ } else { \ ++ container = container_of((list)->head, type, \ ++ member); \ ++ slist_remove_head(list); \ ++ } \ ++ } while (0) ++ + typedef int slist_func_t(struct slist_entry *item, const void *arg); + + static inline struct slist_entry * +@@ -273,6 +462,26 @@ slist_find_first_match(const struct slist *list, slist_func_t *match, + return NULL; + } + ++static inline void ++slist_insert_before_first_match(struct slist *list, slist_func_t *match, ++ struct slist_entry *entry) ++{ ++ struct slist_entry *cur, *prev; ++ ++ slist_foreach(list, cur, prev) { ++ if (match(cur, entry)) { ++ if (!prev) { ++ slist_insert_head(entry, list); ++ } else { ++ entry->next = prev->next; ++ prev->next = entry; ++ } ++ return; ++ } ++ } ++ slist_insert_tail(entry, list); ++} ++ + static inline void slist_remove(struct slist *list, + struct slist_entry *item, struct slist_entry *prev) + { +@@ -300,6 +509,139 @@ slist_remove_first_match(struct slist *list, slist_func_t *match, const void *ar + return NULL; + } + ++static inline void slist_swap(struct slist *dst, struct slist *src) ++{ ++ struct slist_entry *dst_head = dst->head; ++ struct slist_entry *dst_tail = dst->tail; ++ ++ dst->head = src->head; ++ dst->tail = src->tail; ++ ++ src->head = dst_head; ++ src->tail = dst_tail; ++} ++ ++/* splices src list at the front of the dst list ++ * ++ * BEFORE: ++ * dst: HEAD->a->b->c->TAIL ++ * src: HEAD->d->e->TAIL ++ * ++ * AFTER: ++ * dst: HEAD->d->e->a->b->c->TAIL ++ * src: HEAD->TAIL (empty list) ++ */ ++static inline struct slist * ++slist_splice_head(struct slist *dst, struct slist *src) ++{ ++ if (slist_empty(src)) ++ return dst; ++ ++ if (slist_empty(dst)) { ++ slist_swap(dst, src); ++ return dst; ++ } ++ ++ src->tail->next = dst->head; ++ dst->head = src->head; ++ ++ slist_init(src); ++ ++ return dst; ++} ++ ++/* splices src list at the back of the dst list ++ * ++ * BEFORE: ++ * dst: HEAD->a->b->c->TAIL ++ * src: HEAD->d->e->TAIL ++ * ++ * AFTER: ++ * dst: HEAD->a->b->c->d->e->TAIL ++ * src: HEAD->TAIL (empty list) ++ */ ++static inline struct slist * ++slist_splice_tail(struct slist *dst, struct slist *src) ++{ ++ if (slist_empty(src)) ++ return dst; ++ ++ if (slist_empty(dst)) { ++ slist_swap(dst, src); ++ return dst; ++ } ++ ++ dst->tail->next = src->head; ++ dst->tail = src->tail; ++ ++ slist_init(src); ++ ++ return dst; ++} ++ ++/* ++ * Singly-linked list with blocking wait-until-avail support ++ */ ++ ++struct slistfd { ++ struct slist list; ++ struct fd_signal signal; ++}; ++ ++static inline int slistfd_init(struct slistfd *list) ++{ ++ slist_init(&list->list); ++ return fd_signal_init(&list->signal); ++} ++ ++static inline void slistfd_free(struct slistfd *list) ++{ ++ fd_signal_free(&list->signal); ++} ++ ++static inline int slistfd_empty(struct slistfd *list) ++{ ++ return slist_empty(&list->list); ++} ++ ++static inline void ++slistfd_insert_head(struct slist_entry *item, struct slistfd *list) ++{ ++ slist_insert_head(item, &list->list); ++ fd_signal_set(&list->signal); ++} ++ ++static inline void ++slistfd_insert_tail(struct slist_entry *item, struct slistfd *list) ++{ ++ slist_insert_tail(item, &list->list); ++ fd_signal_set(&list->signal); ++} ++ ++static inline struct slist_entry *slistfd_remove_head(struct slistfd *list) ++{ ++ struct slist_entry *entry = slist_remove_head(&list->list); ++ if (entry) ++ fd_signal_reset(&list->signal); ++ return entry; ++} ++ ++static inline int slistfd_wait_avail(struct slistfd *list, int timeout) ++{ ++ int ret; ++ ++ if (!slistfd_empty(list)) ++ return 1; ++ ++ ret = fd_signal_poll(&list->signal, timeout); ++ return ret ? ret : !slistfd_empty(list); ++} ++ ++static inline int slistfd_get_fd(struct slistfd *list) ++{ ++ return fd_signal_get(&list->signal); ++} ++ + /* + * Double-linked list with blocking wait-until-avail support + */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_lock.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_lock.h +index 9fc7f40..afde786 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_lock.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_lock.h +@@ -76,6 +76,7 @@ int fi_wait_cond(pthread_cond_t *cond, pthread_mutex_t *mut, int timeout_ms); + typedef struct { + fastlock_t_ impl; + int is_initialized; ++ int in_use; + } fastlock_t; + + static inline int fastlock_init(fastlock_t *lock) +@@ -84,6 +85,8 @@ static inline int fastlock_init(fastlock_t *lock) + + ret = fastlock_init_(&lock->impl); + lock->is_initialized = !ret; ++ lock->in_use = 0; ++ + return ret; + } + +@@ -104,19 +107,28 @@ static inline void fastlock_acquire(fastlock_t *lock) + assert(lock->is_initialized); + ret = fastlock_acquire_(&lock->impl); + assert(!ret); ++ lock->in_use++; + } + + static inline int fastlock_tryacquire(fastlock_t *lock) + { ++ int ret; ++ + assert(lock->is_initialized); +- return fastlock_tryacquire_(&lock->impl); ++ ret = fastlock_tryacquire_(&lock->impl); ++ if (!ret) ++ lock->in_use++; ++ ++ return ret; + } + + static inline void fastlock_release(fastlock_t *lock) + { + int ret; + ++ assert(lock->in_use); + assert(lock->is_initialized); ++ lock->in_use--; + ret = fastlock_release_(&lock->impl); + assert(!ret); + } +@@ -132,7 +144,32 @@ static inline void fastlock_release(fastlock_t *lock) + + #endif + ++typedef void(*ofi_fastlock_acquire_t)(fastlock_t *lock); ++typedef void(*ofi_fastlock_release_t)(fastlock_t *lock); + ++static inline void ofi_fastlock_acquire(fastlock_t *lock) ++{ ++ fastlock_acquire(lock); ++} ++static inline void ofi_fastlock_release(fastlock_t *lock) ++{ ++ fastlock_release(lock); ++} ++static inline void ofi_fastlock_acquire_noop(fastlock_t *lock) ++{ ++#if ENABLE_DEBUG ++ /* These non-op routines must be used only by a single-threaded code*/ ++ assert(!lock->in_use); ++ lock->in_use = 1; ++#endif ++} ++static inline void ofi_fastlock_release_noop(fastlock_t *lock) ++{ ++#if ENABLE_DEBUG ++ assert(lock->in_use); ++ lock->in_use = 0; ++#endif ++} + + #ifdef __cplusplus + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mem.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mem.h +index 93c87ee..abe2104 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mem.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mem.h +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2015-2016 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -63,12 +64,34 @@ static inline void *mem_dup(const void *src, size_t size) + return dest; + } + ++static inline int ofi_str_dup(const char *src, char **dst) ++{ ++ if (src) { ++ *dst = strdup(src); ++ if (!*dst) ++ return -FI_ENOMEM; ++ } else { ++ *dst = NULL; ++ } ++ return 0; ++} + + /* + * Buffer pool (free stack) template + */ + #define FREESTACK_EMPTY NULL + ++#define freestack_get_next(user_buf) ((char *)user_buf - sizeof(void *)) ++#define freestack_get_user_buf(entry) ((char *)entry + sizeof(void *)) ++ ++#if ENABLE_DEBUG ++#define freestack_init_next(entry) *((void **)entry) = NULL ++#define freestack_check_next(entry) assert(*((void **)entry) == NULL) ++#else ++#define freestack_init_next(entry) ++#define freestack_check_next(entry) ++#endif ++ + #define FREESTACK_HEADER \ + size_t size; \ + void *next; \ +@@ -76,8 +99,9 @@ static inline void *mem_dup(const void *src, size_t size) + #define freestack_isempty(fs) ((fs)->next == FREESTACK_EMPTY) + #define freestack_push(fs, p) \ + do { \ +- *(void **) p = (fs)->next; \ +- (fs)->next = p; \ ++ freestack_check_next(freestack_get_next(p)); \ ++ *(void **) (freestack_get_next(p)) = (fs)->next; \ ++ (fs)->next = (freestack_get_next(p)); \ + } while (0) + #define freestack_pop(fs) freestack_pop_impl(fs, (fs)->next) + +@@ -88,40 +112,59 @@ static inline void* freestack_pop_impl(void *fs, void *fs_next) + } *freestack = fs; + assert(!freestack_isempty(freestack)); + freestack->next = *((void **)fs_next); +- return fs_next; ++ freestack_init_next(fs_next); ++ return freestack_get_user_buf(fs_next); + } + + #define DECLARE_FREESTACK(entrytype, name) \ ++struct name ## _entry { \ ++ void *next; \ ++ entrytype buf; \ ++}; \ + struct name { \ + FREESTACK_HEADER \ +- entrytype buf[]; \ ++ struct name ## _entry entry[]; \ + }; \ + \ +-static inline void name ## _init(struct name *fs, size_t size) \ ++typedef void (*name ## _entry_init_func)(entrytype *buf, \ ++ void *arg); \ ++ \ ++static inline void \ ++name ## _init(struct name *fs, size_t size, \ ++ name ## _entry_init_func init, void *arg) \ + { \ + ssize_t i; \ + assert(size == roundup_power_of_two(size)); \ +- assert(sizeof(fs->buf[0]) >= sizeof(void *)); \ ++ assert(sizeof(fs->entry[0].buf) >= sizeof(void *)); \ + fs->size = size; \ + fs->next = FREESTACK_EMPTY; \ +- for (i = size - 1; i >= 0; i--) \ +- freestack_push(fs, &fs->buf[i]); \ ++ for (i = size - 1; i >= 0; i--) { \ ++ if (init) \ ++ init(&fs->entry[i].buf, arg); \ ++ freestack_push(fs, &fs->entry[i].buf); \ ++ } \ + } \ + \ +-static inline struct name * name ## _create(size_t size) \ ++static inline struct name * \ ++name ## _create(size_t size, name ## _entry_init_func init, \ ++ void *arg) \ + { \ + struct name *fs; \ +- fs = calloc(1, sizeof(*fs) + sizeof(entrytype) * \ +- (roundup_power_of_two(size))); \ ++ fs = calloc(1, sizeof(*fs) + \ ++ sizeof(struct name ## _entry) * \ ++ (roundup_power_of_two(size))); \ + if (fs) \ +- name ##_init(fs, roundup_power_of_two(size)); \ ++ name ##_init(fs, roundup_power_of_two(size), \ ++ init, arg); \ + return fs; \ + } \ + \ + static inline int name ## _index(struct name *fs, \ +- entrytype *entry) \ ++ entrytype *entry) \ + { \ +- return (int)(entry - fs->buf); \ ++ return (int)((struct name ## _entry *) \ ++ (freestack_get_next(entry)) \ ++ - (struct name ## _entry *)fs->entry); \ + } \ + \ + static inline void name ## _free(struct name *fs) \ +@@ -142,8 +185,10 @@ static inline void name ## _free(struct name *fs) \ + #define smr_freestack_isempty(fs) ((fs)->next == SMR_FREESTACK_EMPTY) + #define smr_freestack_push(fs, local_p) \ + do { \ +- void *p = (char **) fs->base_addr + ((char **) local_p - (char **) fs); \ +- *(void **) local_p = (fs)->next; \ ++ void *p = (char **) fs->base_addr + \ ++ ((char **) freestack_get_next(local_p) - \ ++ (char **) fs); \ ++ *(void **) freestack_get_next(local_p) = (fs)->next; \ + (fs)->next = p; \ + } while (0) + #define smr_freestack_pop(fs) smr_freestack_pop_impl(fs, fs->next) +@@ -160,25 +205,29 @@ static inline void* smr_freestack_pop_impl(void *fs, void *next) + local = (char **) fs + ((char **) next - + (char **) freestack->base_addr); + next = *((void **) local); +- return local; ++ return freestack_get_user_buf(local); + } + + #define DECLARE_SMR_FREESTACK(entrytype, name) \ ++struct name ## _entry { \ ++ void *next; \ ++ entrytype buf; \ ++}; \ + struct name { \ + SMR_FREESTACK_HEADER \ +- entrytype buf[]; \ ++ struct name ## _entry entry[]; \ + }; \ + \ + static inline void name ## _init(struct name *fs, size_t size) \ + { \ + ssize_t i; \ + assert(size == roundup_power_of_two(size)); \ +- assert(sizeof(fs->buf[0]) >= sizeof(void *)); \ ++ assert(sizeof(fs->entry[0].buf) >= sizeof(void *)); \ + fs->size = size; \ + fs->next = SMR_FREESTACK_EMPTY; \ + fs->base_addr = fs; \ + for (i = size - 1; i >= 0; i--) \ +- smr_freestack_push(fs, &fs->buf[i]); \ ++ smr_freestack_push(fs, &fs->entry[i].buf); \ + } \ + \ + static inline struct name * name ## _create(size_t size) \ +@@ -194,7 +243,9 @@ static inline struct name * name ## _create(size_t size) \ + static inline int name ## _index(struct name *fs, \ + entrytype *entry) \ + { \ +- return (int)(entry - fs->buf); \ ++ return (int)((struct name ## _entry *) \ ++ (freestack_get_next(entry)) \ ++ - (struct name ## _entry *)fs->entry); \ + } \ + \ + static inline void name ## _free(struct name *fs) \ +@@ -206,45 +257,72 @@ static inline void name ## _free(struct name *fs) \ + /* + * Buffer Pool + */ ++ ++#define UTIL_BUF_POOL_REGION_CHUNK_CNT 16 ++ + struct util_buf_pool; + typedef int (*util_buf_region_alloc_hndlr) (void *pool_ctx, void *addr, size_t len, + void **context); + typedef void (*util_buf_region_free_hndlr) (void *pool_ctx, void *context); ++typedef void (*util_buf_region_init_func) (void *pool_ctx, void *buf); ++ ++struct util_buf_attr { ++ size_t size; ++ size_t alignment; ++ size_t max_cnt; ++ size_t chunk_cnt; ++ util_buf_region_alloc_hndlr alloc_hndlr; ++ util_buf_region_free_hndlr free_hndlr; ++ util_buf_region_init_func init; ++ void *ctx; ++ uint8_t track_used; ++ uint8_t is_mmap_region; ++ struct { ++ uint8_t used; ++ /* if the `ordered` capability is used, the buffer ++ * with the lowest index is returned */ ++ uint8_t ordered; ++ } indexing; ++}; + + struct util_buf_pool { +- size_t data_sz; +- size_t entry_sz; +- size_t max_cnt; +- size_t chunk_cnt; +- size_t alignment; +- size_t num_allocated; +- struct slist buf_list; +- struct slist region_list; +- util_buf_region_alloc_hndlr alloc_hndlr; +- util_buf_region_free_hndlr free_hndlr; +- void *ctx; ++ size_t entry_sz; ++ size_t num_allocated; ++ union { ++ struct slist buffers; ++ struct dlist_entry regions; ++ } list; ++ struct util_buf_region **regions_table; ++ size_t regions_cnt; ++ struct util_buf_attr attr; + }; + + struct util_buf_region { +- struct slist_entry entry; ++ struct dlist_entry entry; ++ struct dlist_entry buf_list; + char *mem_region; ++ size_t size; + void *context; +-#if ENABLE_DEBUG ++ struct util_buf_pool *pool; ++#ifndef NDEBUG + size_t num_used; + #endif + }; + + struct util_buf_footer { ++ union { ++ struct slist_entry slist; ++ struct dlist_entry dlist; ++ } entry; + struct util_buf_region *region; ++ size_t index; + }; + +-union util_buf { +- struct slist_entry entry; +- uint8_t data[0]; +-}; ++int util_buf_pool_create_attr(struct util_buf_attr *attr, ++ struct util_buf_pool **buf_pool); + + /* create buffer pool with alloc/free handlers */ +-int util_buf_pool_create_ex(struct util_buf_pool **pool, ++int util_buf_pool_create_ex(struct util_buf_pool **buf_pool, + size_t size, size_t alignment, + size_t max_cnt, size_t chunk_cnt, + util_buf_region_alloc_hndlr alloc_hndlr, +@@ -261,91 +339,144 @@ static inline int util_buf_pool_create(struct util_buf_pool **pool, + NULL, NULL, NULL); + } + +-static inline int util_buf_avail(struct util_buf_pool *pool) +-{ +- return !slist_empty(&pool->buf_list); +-} +- + int util_buf_grow(struct util_buf_pool *pool); + +-#if ENABLE_DEBUG +- +-void *util_buf_get(struct util_buf_pool *pool); +-void util_buf_release(struct util_buf_pool *pool, void *buf); ++static inline struct util_buf_footer * ++util_buf_get_ftr(struct util_buf_pool *pool, void *buf) ++{ ++ return (struct util_buf_footer *) ((char *) buf + pool->attr.size); ++} + +-#else ++static inline void *util_buf_get_data(struct util_buf_pool *pool, ++ struct util_buf_footer *buf_ftr) ++{ ++ return ((char *) buf_ftr - pool->attr.size); ++} + + static inline void *util_buf_get(struct util_buf_pool *pool) + { +- struct slist_entry *entry; +- entry = slist_remove_head(&pool->buf_list); +- return entry; ++ struct util_buf_footer *buf_ftr; ++ ++ assert(!pool->attr.indexing.ordered); ++ ++ slist_remove_head_container(&pool->list.buffers, struct util_buf_footer, ++ buf_ftr, entry.slist); ++ assert(++buf_ftr->region->num_used); ++ return util_buf_get_data(pool, buf_ftr); + } + + static inline void util_buf_release(struct util_buf_pool *pool, void *buf) + { +- union util_buf *util_buf = buf; +- slist_insert_head(&util_buf->entry, &pool->buf_list); ++ assert(util_buf_get_ftr(pool, buf)->region->num_used--); ++ assert(!pool->attr.indexing.ordered); ++ slist_insert_head(&util_buf_get_ftr(pool, buf)->entry.slist, &pool->list.buffers); + } +-#endif + +-static inline void *util_buf_get_ex(struct util_buf_pool *pool, void **context) ++static inline void *util_buf_indexed_get(struct util_buf_pool *pool) + { +- union util_buf *buf; + struct util_buf_footer *buf_ftr; +- +- buf = util_buf_get(pool); +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- assert(context); +- *context = buf_ftr->region->context; +- return buf; ++ struct util_buf_region *buf_region; ++ ++ assert(pool->attr.indexing.ordered); ++ ++ buf_region = container_of(pool->list.regions.next, ++ struct util_buf_region, entry); ++ dlist_pop_front(&buf_region->buf_list, struct util_buf_footer, ++ buf_ftr, entry.dlist); ++ assert(++buf_ftr->region->num_used); ++ if (dlist_empty(&buf_region->buf_list)) ++ dlist_remove_init(&buf_region->entry); ++ return util_buf_get_data(pool, buf_ftr); + } + +-static inline void *util_buf_alloc(struct util_buf_pool *pool) ++int util_buf_is_lower(struct dlist_entry *item, const void *arg); ++int util_buf_region_is_lower(struct dlist_entry *item, const void *arg); ++ ++static inline void util_buf_indexed_release(struct util_buf_pool *pool, void *buf) + { +- if (!util_buf_avail(pool)) { +- if (util_buf_grow(pool)) +- return NULL; ++ struct util_buf_footer *buf_ftr; ++ ++ assert(pool->attr.indexing.ordered); ++ ++ buf_ftr = util_buf_get_ftr(pool, buf); ++ ++ assert(buf_ftr->region->num_used--); ++ ++ dlist_insert_order(&buf_ftr->region->buf_list, ++ util_buf_is_lower, &buf_ftr->entry.dlist); ++ ++ if (dlist_empty(&buf_ftr->region->entry)) { ++ dlist_insert_order(&pool->list.regions, ++ util_buf_region_is_lower, ++ &buf_ftr->region->entry); + } +- return util_buf_get(pool); + } + +-static inline void *util_buf_alloc_ex(struct util_buf_pool *pool, void **context) ++static inline size_t util_get_buf_index(struct util_buf_pool *pool, void *buf) + { +- union util_buf *buf; +- struct util_buf_footer *buf_ftr; +- +- buf = util_buf_alloc(pool); +- if (OFI_UNLIKELY(!buf)) +- return NULL; ++ assert(util_buf_get_ftr(pool, buf)->region->num_used); ++ assert(pool->attr.indexing.used); ++ return util_buf_get_ftr(pool, buf)->index; ++} + +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- assert(context); +- *context = buf_ftr->region->context; ++static inline void *util_buf_get_by_index(struct util_buf_pool *pool, size_t index) ++{ ++ void *buf; ++ assert(pool->attr.indexing.used); ++ buf = pool->regions_table[(size_t)(index / pool->attr.chunk_cnt)]-> ++ mem_region + (index % pool->attr.chunk_cnt) * pool->entry_sz; ++ assert(util_buf_get_ftr(pool, buf)->region->num_used); + return buf; + } + +-#if ENABLE_DEBUG +-static inline int util_buf_use_ftr(struct util_buf_pool *pool) ++static inline void *util_buf_get_ctx(struct util_buf_pool *pool, void *buf) + { +- OFI_UNUSED(pool); +- return 1; ++ return util_buf_get_ftr(pool, buf)->region->context; + } +-#else +-static inline int util_buf_use_ftr(struct util_buf_pool *pool) ++ ++static inline int util_buf_avail(struct util_buf_pool *pool) + { +- return (pool->alloc_hndlr || pool->free_hndlr) ? 1 : 0; ++ return !slist_empty(&pool->list.buffers); + } +-#endif + +-static inline void *util_buf_get_ctx(struct util_buf_pool *pool, void *buf) ++static inline int util_buf_indexed_avail(struct util_buf_pool *pool) + { +- struct util_buf_footer *buf_ftr; +- assert(util_buf_use_ftr(pool)); +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- return buf_ftr->region->context; ++ return !dlist_empty(&pool->list.regions); ++} ++ ++#define UTIL_BUF_DEFINE_GETTERS(name) \ ++static inline void *util_buf ## name ## get_ex(struct util_buf_pool *pool, \ ++ void **context) \ ++{ \ ++ void *buf = util_buf ## name ## get(pool); \ ++ assert(context); \ ++ *context = util_buf_get_ctx(pool, buf); \ ++ return buf; \ ++} \ ++ \ ++static inline void *util_buf ## name ## alloc(struct util_buf_pool *pool) \ ++{ \ ++ if (OFI_UNLIKELY(!util_buf ## name ## avail(pool))) { \ ++ if (util_buf_grow(pool)) \ ++ return NULL; \ ++ } \ ++ return util_buf ## name ## get(pool); \ ++} \ ++ \ ++static inline void *util_buf ## name ## alloc_ex(struct util_buf_pool *pool, \ ++ void **context) \ ++{ \ ++ void *buf = util_buf ## name ## alloc(pool); \ ++ if (OFI_UNLIKELY(!buf)) \ ++ return NULL; \ ++ assert(context); \ ++ *context = util_buf_get_ctx(pool, buf); \ ++ return buf; \ + } + ++UTIL_BUF_DEFINE_GETTERS(_); ++UTIL_BUF_DEFINE_GETTERS(_indexed_); ++ + void util_buf_pool_destroy(struct util_buf_pool *pool); + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mr.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mr.h +index 05c1568..4cd05d9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mr.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mr.h +@@ -51,10 +51,23 @@ + + /* FI_LOCAL_MR is valid in pre-libfaric-1.5 and can be valid in + * post-libfabric-1.5 */ +-#define OFI_CHECK_MR_LOCAL(info) \ +- ((info->domain_attr->mr_mode & FI_MR_LOCAL) || \ +- (!(info->domain_attr->mr_mode & ~(FI_MR_BASIC | FI_MR_SCALABLE)) && \ +- (info->mode & FI_LOCAL_MR))) ++static inline int ofi_mr_local(const struct fi_info *info) ++{ ++ if (!info) ++ return 0; ++ ++ if (!info->domain_attr) ++ goto check_local_mr; ++ ++ if (info->domain_attr->mr_mode & FI_MR_LOCAL) ++ return 1; ++ ++ if (info->domain_attr->mr_mode & ~(FI_MR_BASIC | FI_MR_SCALABLE)) ++ return 0; ++ ++check_local_mr: ++ return (info->mode & FI_LOCAL_MR) ? 1 : 0; ++} + + #define OFI_MR_MODE_RMA_TARGET (FI_MR_RAW | FI_MR_VIRT_ADDR | \ + FI_MR_PROV_KEY | FI_MR_RMA_EVENT) +@@ -88,11 +101,10 @@ struct ofi_notification_queue; + struct ofi_mem_monitor { + ofi_atomic32_t refcnt; + +- int (*subscribe)(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription); +- void (*unsubscribe)(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription); +- struct ofi_subscription *(*get_event)(struct ofi_mem_monitor *notifier); ++ int (*subscribe)(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription); ++ void (*unsubscribe)(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription); + }; + + struct ofi_notification_queue { +@@ -105,8 +117,7 @@ struct ofi_notification_queue { + struct ofi_subscription { + struct ofi_notification_queue *nq; + struct dlist_entry entry; +- void *addr; +- size_t len; ++ struct iovec iov; + }; + + void ofi_monitor_init(struct ofi_mem_monitor *monitor); +@@ -120,7 +131,19 @@ int ofi_monitor_subscribe(struct ofi_notification_queue *nq, + struct ofi_subscription *subscription); + void ofi_monitor_unsubscribe(struct ofi_subscription *subscription); + struct ofi_subscription *ofi_monitor_get_event(struct ofi_notification_queue *nq); +- ++static inline void ++ofi_monitor_add_event_to_nq(struct ofi_subscription *subscription) ++{ ++ FI_DBG(&core_prov, FI_LOG_MR, ++ "Add event to NQ, context=%p, addr=%p, len=%"PRIu64" nq=%p\n", ++ subscription, subscription->iov.iov_base, ++ subscription->iov.iov_len, subscription->nq); ++ fastlock_acquire(&subscription->nq->lock); ++ if (dlist_empty(&subscription->entry)) ++ dlist_insert_tail(&subscription->entry, ++ &subscription->nq->list); ++ fastlock_release(&subscription->nq->lock); ++} + + /* + * MR map +@@ -181,6 +204,32 @@ struct ofi_mr_entry { + uint8_t data[]; + }; + ++struct ofi_mr_storage; ++ ++typedef void (*ofi_mr_destroy_t)(struct ofi_mr_storage *storage); ++typedef struct ofi_mr_entry *(*ofi_mr_find_t)(struct ofi_mr_storage *storage, ++ const struct iovec *key); ++typedef int (*ofi_mr_insert_t)(struct ofi_mr_storage *storage, ++ struct iovec *key, ++ struct ofi_mr_entry *entry); ++typedef int (*ofi_mr_erase_t)(struct ofi_mr_storage *storage, ++ struct ofi_mr_entry *entry); ++ ++enum ofi_mr_storage_type { ++ OFI_MR_STORAGE_DEFAULT = 0, ++ OFI_MR_STORAGE_RBT, ++ OFI_MR_STORAGE_USER, ++}; ++ ++struct ofi_mr_storage { ++ enum ofi_mr_storage_type type; ++ void *storage; ++ ofi_mr_destroy_t destroy; ++ ofi_mr_find_t find; ++ ofi_mr_insert_t insert; ++ ofi_mr_erase_t erase; ++}; ++ + struct ofi_mr_cache { + struct util_domain *domain; + struct ofi_notification_queue nq; +@@ -189,7 +238,7 @@ struct ofi_mr_cache { + int merge_regions; + size_t entry_data_size; + +- RbtHandle mr_tree; ++ struct ofi_mr_storage mr_storage; + struct dlist_entry lru_list; + + size_t cached_cnt; +@@ -197,6 +246,7 @@ struct ofi_mr_cache { + size_t search_cnt; + size_t delete_cnt; + size_t hit_cnt; ++ struct util_buf_pool *entry_pool; + + int (*add_region)(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_net.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_net.h +index d962bb3..dbb8cb5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_net.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_net.h +@@ -105,12 +105,17 @@ static inline int ofi_sendall_socket(SOCKET sock, const void *buf, size_t len) + size_t sent; + ssize_t ret; + +- for (sent = 0, ret = 0; (sent < len) && (ret >= 0); sent += ret) ++ for (sent = 0, ret = 0; (sent < len) && (ret >= 0); ) { + ret = ofi_send_socket(sock, ((char *) buf) + sent, len - sent, 0); ++ if (ret > 0) ++ sent += ret; ++ } + +- return (size_t) ret != len; ++ return (size_t) sent != len; + } + ++int ofi_discard_socket(SOCKET sock, size_t len); ++ + /* + * Address utility functions + */ +@@ -119,6 +124,13 @@ static inline int ofi_sendall_socket(SOCKET sock, const void *buf, size_t len) + #define AF_IB 27 + #endif + ++union ofi_sock_ip { ++ struct sockaddr sa; ++ struct sockaddr_in sin; ++ struct sockaddr_in6 sin6; ++ uint8_t align[32]; ++}; ++ + int ofi_addr_cmp(const struct fi_provider *prov, const struct sockaddr *sa1, + const struct sockaddr *sa2); + int ofi_getifaddrs(struct ifaddrs **ifap); +@@ -141,22 +153,21 @@ static inline size_t ofi_sizeofaddr(const struct sockaddr *addr) + return sizeof(struct sockaddr_in6); + default: + FI_WARN(&core_prov, FI_LOG_CORE, "Unknown address format"); +- assert(0); + return 0; + } + } + +-static inline int ofi_equals_ipaddr(const struct sockaddr_in *addr1, +- const struct sockaddr_in *addr2) ++static inline size_t ofi_sizeofip(const struct sockaddr *addr) + { +- return (addr1->sin_addr.s_addr == addr2->sin_addr.s_addr); +-} +- +-static inline int ofi_equals_sockaddr(const struct sockaddr_in *addr1, +- const struct sockaddr_in *addr2) +-{ +- return (ofi_equals_ipaddr(addr1, addr2) && +- (addr1->sin_port == addr2->sin_port)); ++ switch (addr->sa_family) { ++ case AF_INET: ++ return sizeof(struct in_addr); ++ case AF_INET6: ++ return sizeof(struct in6_addr); ++ default: ++ FI_WARN(&core_prov, FI_LOG_CORE, "Unknown address format"); ++ return 0; ++ } + } + + static inline int ofi_translate_addr_format(int family) +@@ -173,19 +184,7 @@ static inline int ofi_translate_addr_format(int family) + } + } + +-static inline int ofi_get_sa_family(uint32_t addr_format) +-{ +- switch (addr_format) { +- case FI_SOCKADDR_IN: +- return AF_INET; +- case FI_SOCKADDR_IN6: +- return AF_INET6; +- case FI_SOCKADDR_IB: +- return AF_IB; +- default: +- return 0; +- } +-} ++uint16_t ofi_get_sa_family(const struct fi_info *info); + + static inline int ofi_ipv4_is_any_addr(struct sockaddr *sa) + { +@@ -226,16 +225,16 @@ static inline int ofi_is_any_addr(struct sockaddr *sa) + } + } + +-static inline uint16_t ofi_addr_get_port(struct sockaddr *addr) ++static inline uint16_t ofi_addr_get_port(const struct sockaddr *addr) + { + if (!addr) + return 0; + + switch (ofi_sa_family(addr)) { + case AF_INET: +- return ntohs(ofi_sin_port(addr)); ++ return ntohs(ofi_sin_port((const struct sockaddr_in *) addr)); + case AF_INET6: +- return ntohs(ofi_sin6_port(addr)); ++ return ntohs(ofi_sin6_port((const struct sockaddr_in6 *) addr)); + default: + FI_WARN(&core_prov, FI_LOG_FABRIC, "Unknown address format\n"); + assert(0); +@@ -258,9 +257,50 @@ static inline void ofi_addr_set_port(struct sockaddr *addr, uint16_t port) + } + } + ++static inline void * ofi_get_ipaddr(const struct sockaddr *addr) ++{ ++ switch (addr->sa_family) { ++ case AF_INET: ++ return &ofi_sin_addr((const struct sockaddr_in *) addr); ++ case AF_INET6: ++ return &ofi_sin6_addr((const struct sockaddr_in6 *) addr); ++ default: ++ return NULL; ++ } ++} ++ ++static inline int ofi_equals_ipaddr(const struct sockaddr *addr1, ++ const struct sockaddr *addr2) ++{ ++ if (addr1->sa_family != addr2->sa_family) ++ return 0; ++ ++ switch (addr1->sa_family) { ++ case AF_INET: ++ return !memcmp(&ofi_sin_addr(addr1), &ofi_sin_addr(addr2), ++ sizeof(ofi_sin_addr(addr1))); ++ case AF_INET6: ++ return !memcmp(&ofi_sin6_addr(addr1), &ofi_sin6_addr(addr2), ++ sizeof(ofi_sin6_addr(addr1))); ++ default: ++ return 0; ++ } ++} ++ ++static inline int ofi_equals_sockaddr(const struct sockaddr *addr1, ++ const struct sockaddr *addr2) ++{ ++ return (ofi_addr_get_port(addr1) == ofi_addr_get_port(addr2)) && ++ ofi_equals_ipaddr(addr1, addr2); ++} ++ + int ofi_is_wildcard_listen_addr(const char *node, const char *service, + uint64_t flags, const struct fi_info *hints); + ++size_t ofi_mask_addr(struct sockaddr *maskaddr, const struct sockaddr *srcaddr, ++ const struct sockaddr *netmask); ++ ++ + /* + * Address logging + */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_osd.h +index 432d809..97be08b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_osd.h +@@ -33,6 +33,7 @@ + #ifndef _OFI_OSD_H_ + #define _OFI_OSD_H_ + ++#include + + /* We use macros to create atomic and complex function definitions, + * and we can't have spaces in function names */ +@@ -76,4 +77,34 @@ typedef long double long_double; + #define OFI_UNLIKELY(x) (x) + #endif + ++enum { ++ OFI_ENDIAN_UNKNOWN, ++ OFI_ENDIAN_BIG, ++ OFI_ENDIAN_LITTLE, ++ OFI_ENDIAN_BIG_WORD, /* Middle-endian, Honeywell 316 style */ ++ OFI_ENDIAN_LITTLE_WORD, /* Middle-endian, PDP-11 style */ ++}; ++ ++static inline int ofi_detect_endianness(void) ++{ ++ union { ++ uint8_t data[sizeof(uint32_t)]; ++ uint32_t value; ++ } checker = { ++ .data = { 0x00, 0x01, 0x02, 0x03 }, ++ }; ++ switch (checker.value) { ++ case 0x00010203UL: ++ return OFI_ENDIAN_BIG; ++ case 0x03020100UL: ++ return OFI_ENDIAN_LITTLE; ++ case 0x02030001UL: ++ return OFI_ENDIAN_BIG_WORD; ++ case 0x01000302UL: ++ return OFI_ENDIAN_LITTLE_WORD; ++ default: ++ return OFI_ENDIAN_UNKNOWN; ++ } ++} ++ + #endif /* _OFI_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_perf.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_perf.h +index 64c4ac1..617d679 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_perf.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_perf.h +@@ -35,6 +35,7 @@ + + #include "config.h" + ++#include + #include + #include + #include +@@ -83,6 +84,12 @@ struct ofi_perf_data { + }; + + ++void ofi_perf_init(void); ++extern enum ofi_perf_domain perf_domain; ++extern uint32_t perf_cntr; ++extern uint32_t perf_flags; ++ ++ + /* + * Performance management unit: + * +@@ -147,9 +154,7 @@ static inline void ofi_perf_end(struct ofi_perf_ctx *ctx, + + struct ofi_perfset { + const struct fi_provider *prov; +- char **names; + size_t size; +- size_t count; + struct ofi_perf_ctx *ctx; + struct ofi_perf_data *data; + }; +@@ -160,9 +165,19 @@ int ofi_perfset_create(const struct fi_provider *prov, + uint32_t flags); + void ofi_perfset_close(struct ofi_perfset *set); + +-struct ofi_perf_data *ofi_perfset_data(struct ofi_perfset *set, +- const char *name); +-void ofi_perfset_log(struct ofi_perfset *set); ++void ofi_perfset_log(struct ofi_perfset *set, const char **names); ++ ++static inline void ofi_perfset_start(struct ofi_perfset *set, size_t index) ++{ ++ assert(index < set->size); ++ ofi_perf_start(set->ctx, &set->data[index]); ++} ++ ++static inline void ofi_perfset_end(struct ofi_perfset *set, size_t index) ++{ ++ assert(index < set->size); ++ ofi_perf_end(set->ctx, &set->data[index]); ++} + + + #ifdef __cplusplus +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_proto.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_proto.h +index 5a569b1..6e63e59 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_proto.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_proto.h +@@ -58,6 +58,9 @@ enum { + ofi_ctrl_ack, + ofi_ctrl_nack, + ofi_ctrl_discard, ++ ofi_ctrl_seg_data, ++ ofi_ctrl_atomic, ++ ofi_ctrl_atomic_resp, + }; + + /* +@@ -66,13 +69,6 @@ enum { + * + * version: OFI_CTRL_VERSION + * type +- * seg_size: +- * Data packets - size of current message, in bytes. +- * Large data packets - size of current message, 2 ^ seg_size, in bytes +- * Ctrl packets - number of segments in window allowed past seg_no. +- * seg_no: +- * Data packets - position 0..(n-1) of segment in current message. +- * Ctrl packets - last segment ack'ed. + * conn_id: Communication identifier. Conn_id values are exchanged between + * peer endpoints as part of communication setup. This field is valid + * as part of the first message in any data transfer. +@@ -80,6 +76,13 @@ enum { + * Unique number identifying all segments of a message + * Message id can be formed using an equation similar to: + * (seq_no++ << tx size) | tx_key ++ * seg_size: ++ * Data packets - size of current message, in bytes. ++ * Large data packets - size of current message, 2 ^ seg_size, in bytes ++ * Ctrl packets - number of segments in window allowed past seg_no. ++ * seg_no: ++ * Data packets - position 0..(n-1) of segment in current message. ++ * Ctrl packets - last segment ack'ed. + * conn_data: Connection specific data. This may be set to the index + * of the transmit endpoint's address in its local AV, which may + * be used as a hint at the Rx side to locate the Tx EP address in +@@ -89,19 +92,21 @@ enum { + * rx_key: This is the receiver's identifier for a message (receive side + * equivalent of msg_id). Key returned by the Rx side, that the + * Tx side includes in subsequent packets. This field is used for +- * rendezvous and segmentation and reassembly protocols. ++ * rendezvous protocol. + * The rx_key may be formed similar to message_id. ++ * ctrl_data: This is provider specific data for remote side + */ + struct ofi_ctrl_hdr { +- uint8_t version; +- uint8_t type; +- uint16_t seg_size; +- uint32_t seg_no; +- uint64_t conn_id; +- uint64_t msg_id; ++ uint8_t version; ++ uint8_t type; ++ uint16_t seg_size; ++ uint32_t seg_no; ++ uint64_t conn_id; ++ uint64_t msg_id; + union { +- uint64_t conn_data; +- uint64_t rx_key; ++ uint64_t conn_data; ++ uint64_t rx_key; ++ uint64_t ctrl_data; + }; + }; + +@@ -128,6 +133,7 @@ enum { + #define OFI_REMOTE_CQ_DATA (1 << 0) + #define OFI_TRANSMIT_COMPLETE (1 << 1) + #define OFI_DELIVERY_COMPLETE (1 << 2) ++#define OFI_COMMIT_COMPLETE (1 << 3) + + /* + * Common command header +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_prov.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_prov.h +index 68281b8..c4c94a4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_prov.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_prov.h +@@ -206,4 +206,38 @@ SHM_INI ; + # define SHM_INIT NULL + #endif + ++#if (HAVE_MRAIL) && (HAVE_MRAIL_DL) ++# define MRAIL_INI FI_EXT_INI ++# define MRAIL_INIT NULL ++#elif (HAVE_MRAIL) ++# define MRAIL_INI INI_SIG(fi_mrail_ini) ++# define MRAIL_INIT fi_mrail_ini() ++MRAIL_INI ; ++#else ++# define MRAIL_INIT NULL ++#endif ++ ++#if (HAVE_RSTREAM) && (HAVE_RSTREAM_DL) ++# define RSTREAM_INI FI_EXT_INI ++# define RSTREAM_INIT NULL ++#elif (HAVE_RSTREAM) ++# define RSTREAM_INI INI_SIG(fi_rstream_ini) ++# define RSTREAM_INIT fi_rstream_ini() ++RSTREAM_INI ; ++#else ++# define RSTREAM_INIT NULL ++#endif ++ ++#if(HAVE_PERF) ++# define PERF_HOOK_INI INI_SIG(fi_perf_hook_ini) ++# define PERF_HOOK_INIT fi_perf_hook_ini() ++PERF_HOOK_INI ; ++#else ++# define PERF_HOOK_INIT NULL ++#endif ++ ++# define NOOP_HOOK_INI INI_SIG(fi_noop_hook_ini) ++# define NOOP_HOOK_INIT fi_noop_hook_ini() ++NOOP_HOOK_INI ; ++ + #endif /* _OFI_PROV_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_recvwin.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_recvwin.h +new file mode 100644 +index 0000000..917a0c3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_recvwin.h +@@ -0,0 +1,118 @@ ++/* ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++/* ++ * This utility provides a sliding receive window implementation. It uses a ++ * circular queue to order incoming messages based on the message ID in the ++ * transport protocol. ++ */ ++ ++#if !defined(FI_RECVWIN_H) ++#define FI_RECVWIN_H ++ ++#include "config.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define OFI_DECL_RECVWIN_BUF(entrytype, name) \ ++OFI_DECLARE_CIRQUE(entrytype, recvwin_cirq); \ ++struct name { \ ++ uint64_t exp_msg_id; \ ++ unsigned int win_size; \ ++ struct recvwin_cirq *pending; \ ++}; \ ++ \ ++static inline struct name * \ ++ofi_recvwin_buf_alloc(struct name *recvq, unsigned int size) \ ++{ \ ++ assert(size == roundup_power_of_two(size)); \ ++ recvq->exp_msg_id = 0; \ ++ recvq->win_size = size; \ ++ recvq->pending = recvwin_cirq_create(recvq->win_size); \ ++ return recvq; \ ++} \ ++ \ ++static inline void \ ++ofi_recvwin_free(struct name *recvq) \ ++{ \ ++ recvwin_cirq_free(recvq->pending); \ ++} \ ++ \ ++static inline int \ ++ofi_recvwin_queue_msg(struct name *recvq, entrytype * msg, uint64_t id) \ ++{ \ ++ int write_idx; \ ++ \ ++ assert(ofi_recvwin_is_allowed(recvq, id)); \ ++ write_idx = (ofi_cirque_rindex(recvq->pending) \ ++ + (id - recvq->exp_msg_id)) \ ++ & recvq->pending->size_mask; \ ++ recvq->pending->buf[write_idx] = *msg; \ ++ ofi_cirque_commit(recvq->pending); \ ++ return 0; \ ++} \ ++ \ ++static inline entrytype * \ ++ofi_recvwin_get_next_msg(struct name *recvq) \ ++{ \ ++ if (ofi_cirque_head(recvq->pending)) { \ ++ ofi_recvwin_exp_inc(recvq); \ ++ return ofi_cirque_remove(recvq->pending); \ ++ } else { \ ++ return NULL; \ ++ } \ ++} \ ++ \ ++static inline void \ ++ofi_recvwin_slide(struct name *recvq) \ ++{ \ ++ ofi_recvwin_exp_inc(recvq); \ ++ ofi_cirque_discard(recvq->pending); \ ++ ofi_cirque_commit(recvq->pending); \ ++} ++ ++#define ofi_recvwin_peek(rq) (ofi_cirque_head(rq->pending)) ++#define ofi_recvwin_is_empty(rq) (ofi_cirque_isempty(rq->pending)) ++#define ofi_recvwin_exp_inc(rq) ((rq)->exp_msg_id++) ++#define ofi_recvwin_is_exp(rq, id) ((rq)->exp_msg_id == id) ++#define ofi_recvwin_next_exp_id(rq) ((rq)->exp_msg_id) ++#define ofi_recvwin_is_delayed(rq, id) ((rq)->exp_msg_id > id) ++#define ofi_recvwin_is_allowed(rq, id) (id >= rq->exp_msg_id \ ++ && id < (rq->win_size + rq->exp_msg_id)) ++ ++#endif /* FI_RECVWIN_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_shm.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_shm.h +index b6e4c47..0f5351c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_shm.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_shm.h +@@ -76,6 +76,9 @@ enum { + + #define SMR_REMOTE_CQ_DATA (1 << 0) + #define SMR_RMA_REQ (1 << 1) ++#define SMR_TX_COMPLETION (1 << 2) ++#define SMR_RX_COMPLETION (1 << 3) ++#define SMR_MULTI_RECV (1 << 4) + + /* + * Unique smr_op_hdr for smr message protocol: +@@ -177,7 +180,12 @@ struct smr_region { + struct smr_map *map; + + size_t total_size; +- size_t cmd_cnt; ++ size_t cmd_cnt; /* Doubles as a tracker for number of cmds AND ++ number of inject buffers available for use, ++ to ensure 1:1 ratio of cmds to inject bufs. ++ Might not always be paired consistently with ++ cmd alloc/free depending on protocol ++ (Ex. unexpected messages, RMA requests) */ + + /* offsets from start of smr_region */ + size_t cmd_queue_offset; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_signal.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_signal.h +index 3a2974f..b4f3ff3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_signal.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_signal.h +@@ -113,74 +113,9 @@ static inline int fd_signal_poll(struct fd_signal *signal, int timeout) + return (ret == 0) ? -FI_ETIMEDOUT : 0; + } + +-#ifdef HAVE_EPOLL +-#include +- +-typedef int fi_epoll_t; +- +-static inline int fi_epoll_create(int *ep) +-{ +- *ep = epoll_create(4); +- return *ep < 0 ? -ofi_syserr() : 0; +-} +- +-static inline int fi_epoll_add(int ep, int fd, void *context) +-{ +- struct epoll_event event; +- int ret; +- +- event.data.ptr = context; +- event.events = EPOLLIN; +- ret = epoll_ctl(ep, EPOLL_CTL_ADD, fd, &event); +- if ((ret == -1) && (ofi_syserr() != EEXIST)) +- return -ofi_syserr(); +- return 0; +-} +- +-static inline int fi_epoll_del(int ep, int fd) ++static inline int fd_signal_get(struct fd_signal *signal) + { +- return epoll_ctl(ep, EPOLL_CTL_DEL, fd, NULL) ? -ofi_syserr() : 0; ++ return signal->fd[FI_READ_FD]; + } + +-static inline int fi_epoll_wait(int ep, void **contexts, int max_contexts, +- int timeout) +-{ +- struct epoll_event events[max_contexts]; +- int ret; +- int i; +- +- ret = epoll_wait(ep, events, max_contexts, timeout); +- if (ret == -1) +- return -ofi_syserr(); +- +- for (i = 0; i < ret; i++) +- contexts[i] = events[i].data.ptr; +- return ret; +-} +- +-static inline void fi_epoll_close(int ep) +-{ +- close(ep); +-} +- +-#else +-#include +- +-typedef struct fi_epoll { +- int size; +- int nfds; +- struct pollfd *fds; +- void **context; +- int index; +-} *fi_epoll_t; +- +-int fi_epoll_create(struct fi_epoll **ep); +-int fi_epoll_add(struct fi_epoll *ep, int fd, void *context); +-int fi_epoll_del(struct fi_epoll *ep, int fd); +-int fi_epoll_wait(struct fi_epoll *ep, void **contexts, int max_contexts, +- int timeout); +-void fi_epoll_close(struct fi_epoll *ep); +- +-#endif /* HAVE_EPOLL */ +- + #endif /* _OFI_SIGNAL_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_tree.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_tree.h +new file mode 100644 +index 0000000..6bb7937 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_tree.h +@@ -0,0 +1,87 @@ ++/* ++ * Copyright (c) 2015 Cray Inc. All rights reserved. ++ * Copyright (c) 2018 Intel Corp, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++/* ++ * Copied from http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/RedBlackTrees_files/s_rbt.htm ++ * ++ * Disclosure from the author's main page: ++ * (http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/RedBlackTrees_files/s_rbt.htm) ++ * ++ * Source code when part of a software project may be used freely ++ * without reference to the author. ++ * ++ */ ++ ++#ifndef _OFI_TREE_H_ ++#define _OFI_TREE_H_ ++ ++#include ++ ++ ++enum ofi_node_color { ++ BLACK, ++ RED ++}; ++ ++struct ofi_rbnode { ++ struct ofi_rbnode *left; ++ struct ofi_rbnode *right; ++ struct ofi_rbnode *parent; ++ enum ofi_node_color color; ++ void *data; ++}; ++ ++struct ofi_rbmap { ++ struct ofi_rbnode *root; ++ struct ofi_rbnode sentinel; ++ ++ /* compare() ++ * = 0: a == b ++ * < 0: a < b ++ * > 0: a > b ++ */ ++ int (*compare)(struct ofi_rbmap *map, ++ void *key, void *data); ++}; ++ ++ ++void ofi_rbmap_init(struct ofi_rbmap *map); ++void ofi_rbmap_cleanup(struct ofi_rbmap *map); ++ ++struct ofi_rbnode *ofi_rbmap_find(struct ofi_rbmap *map, void *key); ++int ofi_rbmap_insert(struct ofi_rbmap *map, void *key, void *data); ++void ofi_rbmap_delete(struct ofi_rbmap *map, struct ofi_rbnode *node); ++int ofi_rbmap_empty(struct ofi_rbmap *map); ++ ++ ++#endif /* OFI_TREE_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_util.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_util.h +index 1db1c9c..0c1e425 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_util.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_util.h +@@ -61,38 +61,16 @@ + #include + #include + #include ++#include ++#include + + #include "rbtree.h" ++#include "uthash.h" + +-#define UTIL_FLAG_ERROR (1ULL << 60) +- +-#define OFI_CNTR_ENABLED (1ULL << 61) +- +-#define OFI_Q_STRERROR(prov, log, q, q_str, entry, strerror) \ +- FI_WARN(prov, log, "fi_" q_str "_readerr: err: %d, prov_err: %s (%d)\n",\ +- entry.err, \ +- strerror(q, entry.prov_errno, entry.err_data, NULL, 0), \ +- entry.prov_errno) ++#define UTIL_FLAG_ERROR (1ULL << 60) ++#define UTIL_FLAG_OVERFLOW (1ULL << 61) + +-#define OFI_Q_READERR(prov, log, q, q_str, readerr, strerror, ret, err_entry) \ +- do { \ +- ret = readerr(q, &err_entry, 0); \ +- if (ret != sizeof(err_entry)) { \ +- FI_WARN(prov, log, \ +- "Unable to fi_" q_str "_readerr\n"); \ +- } else { \ +- OFI_Q_STRERROR(prov, log, q, q_str, \ +- err_entry, strerror); \ +- } \ +- } while (0) +- +-#define OFI_CQ_READERR(prov, log, cq, ret, err_entry) \ +- OFI_Q_READERR(prov, log, cq, "cq", fi_cq_readerr, \ +- fi_cq_strerror, ret, err_entry) +- +-#define OFI_EQ_READERR(prov, log, eq, ret, err_entry) \ +- OFI_Q_READERR(prov, log, eq, "eq", fi_eq_readerr, \ +- fi_eq_strerror, ret, err_entry) ++#define OFI_CNTR_ENABLED (1ULL << 61) + + #define FI_INFO_FIELD(provider, prov_attr, user_attr, prov_str, user_str, type) \ + do { \ +@@ -130,6 +108,9 @@ + FI_INFO_STRING(provider, prov->name, user->name, "Supported", \ + "Requested") + ++#define ofi_after_eq(a,b) ((long)((a) - (b)) >= 0) ++#define ofi_before(a,b) ((long)((a) - (b)) < 0) ++ + enum { + UTIL_TX_SHARED_CTX = 1 << 0, + UTIL_RX_SHARED_CTX = 1 << 1, +@@ -195,6 +176,8 @@ struct util_domain { + uint32_t addr_format; + enum fi_av_type av_type; + struct ofi_mr_map mr_map; ++ enum fi_threading threading; ++ enum fi_progress data_progress; + }; + + int ofi_domain_init(struct fid_fabric *fabric_fid, const struct fi_info *info, +@@ -202,6 +185,23 @@ int ofi_domain_init(struct fid_fabric *fabric_fid, const struct fi_info *info, + int ofi_domain_bind_eq(struct util_domain *domain, struct util_eq *eq); + int ofi_domain_close(struct util_domain *domain); + ++static const uint64_t ofi_rx_mr_flags[] = { ++ [ofi_op_msg] = FI_RECV, ++ [ofi_op_tagged] = FI_RECV, ++ [ofi_op_read_req] = FI_REMOTE_READ, ++ [ofi_op_write] = FI_REMOTE_WRITE, ++ [ofi_op_atomic] = FI_REMOTE_WRITE, ++ [ofi_op_atomic_fetch] = FI_REMOTE_WRITE | FI_REMOTE_READ, ++ [ofi_op_atomic_compare] = FI_REMOTE_WRITE | FI_REMOTE_READ, ++}; ++ ++static inline uint64_t ofi_rx_mr_reg_flags(uint32_t op, uint16_t atomic_op) ++{ ++ if (atomic_op == FI_ATOMIC_READ) ++ return FI_REMOTE_READ; ++ ++ return ofi_rx_mr_flags[op]; ++} + + /* + * Passive Endpoint +@@ -222,8 +222,10 @@ int ofi_pep_close(struct util_pep *pep); + * Endpoint + */ + ++struct util_cntr; + struct util_ep; + typedef void (*ofi_ep_progress_func)(struct util_ep *util_ep); ++typedef void (*ofi_cntr_inc_func)(struct util_cntr *util_cntr); + + struct util_ep { + struct fid_ep ep_fid; +@@ -237,6 +239,12 @@ struct util_ep { + uint64_t rx_op_flags; + struct util_cq *tx_cq; + uint64_t tx_op_flags; ++ uint64_t inject_op_flags; ++ ++ /* flags to be ORed in to flags for *msg API calls ++ * to properly handle FI_SELECTIVE_COMPLETION bind */ ++ uint64_t tx_msg_flags; ++ uint64_t rx_msg_flags; + + /* CNTR entries */ + struct util_cntr *tx_cntr; /* transmit/send */ +@@ -246,11 +254,20 @@ struct util_ep { + struct util_cntr *rem_rd_cntr; /* remote read */ + struct util_cntr *rem_wr_cntr; /* remote write */ + ++ ofi_cntr_inc_func tx_cntr_inc; ++ ofi_cntr_inc_func rx_cntr_inc; ++ ofi_cntr_inc_func rd_cntr_inc; ++ ofi_cntr_inc_func wr_cntr_inc; ++ ofi_cntr_inc_func rem_rd_cntr_inc; ++ ofi_cntr_inc_func rem_wr_cntr_inc; ++ ++ enum fi_ep_type type; + uint64_t caps; + uint64_t flags; + ofi_ep_progress_func progress; +- struct util_cmap *cmap; + fastlock_t lock; ++ ofi_fastlock_acquire_t lock_acquire; ++ ofi_fastlock_release_t lock_release; + }; + + int ofi_ep_bind_av(struct util_ep *util_ep, struct util_av *av); +@@ -264,6 +281,119 @@ int ofi_endpoint_init(struct fid_domain *domain, const struct util_prov *util_pr + + int ofi_endpoint_close(struct util_ep *util_ep); + ++static inline void ofi_ep_lock_acquire(struct util_ep *ep) ++{ ++ ep->lock_acquire(&ep->lock); ++} ++ ++static inline void ofi_ep_lock_release(struct util_ep *ep) ++{ ++ ep->lock_release(&ep->lock); ++} ++ ++static inline void ofi_ep_tx_cntr_inc(struct util_ep *ep) ++{ ++ ep->tx_cntr_inc(ep->tx_cntr); ++} ++ ++static inline void ofi_ep_rx_cntr_inc(struct util_ep *ep) ++{ ++ ep->rx_cntr_inc(ep->rx_cntr); ++} ++ ++static inline void ofi_ep_rd_cntr_inc(struct util_ep *ep) ++{ ++ ep->rd_cntr_inc(ep->rd_cntr); ++} ++ ++static inline void ofi_ep_wr_cntr_inc(struct util_ep *ep) ++{ ++ ep->wr_cntr_inc(ep->wr_cntr); ++} ++ ++static inline void ofi_ep_rem_rd_cntr_inc(struct util_ep *ep) ++{ ++ ep->rem_rd_cntr_inc(ep->rem_rd_cntr); ++} ++ ++static inline void ofi_ep_rem_wr_cntr_inc(struct util_ep *ep) ++{ ++ ep->rem_wr_cntr_inc(ep->rem_wr_cntr); ++} ++ ++typedef void (*ofi_ep_cntr_inc_func)(struct util_ep *); ++ ++static const ofi_ep_cntr_inc_func ofi_ep_cntr_inc_funcs[] = { ++ [FI_TRANSMIT] = ofi_ep_tx_cntr_inc, ++ [FI_RECV] = ofi_ep_rx_cntr_inc, ++ [FI_READ] = ofi_ep_rd_cntr_inc, ++ [FI_WRITE] = ofi_ep_wr_cntr_inc, ++ [FI_REMOTE_READ] = ofi_ep_rem_rd_cntr_inc, ++ [FI_REMOTE_WRITE] = ofi_ep_rem_wr_cntr_inc, ++}; ++ ++/* ++ * Tag and address match ++ */ ++ ++static inline int ofi_match_addr(fi_addr_t recv_addr, fi_addr_t addr) ++{ ++ return (recv_addr == FI_ADDR_UNSPEC) || (recv_addr == addr); ++} ++ ++static inline int ofi_match_tag(uint64_t recv_tag, uint64_t recv_ignore, ++ uint64_t tag) ++{ ++ return ((recv_tag | recv_ignore) == (tag | recv_ignore)); ++} ++ ++/* ++ * Wait set ++ */ ++struct util_wait; ++typedef void (*fi_wait_signal_func)(struct util_wait *wait); ++typedef int (*fi_wait_try_func)(struct util_wait *wait); ++ ++struct util_wait { ++ struct fid_wait wait_fid; ++ struct util_fabric *fabric; ++ struct util_poll *pollset; ++ ofi_atomic32_t ref; ++ const struct fi_provider *prov; ++ ++ enum fi_wait_obj wait_obj; ++ fi_wait_signal_func signal; ++ fi_wait_try_func try; ++}; ++ ++int fi_wait_init(struct util_fabric *fabric, struct fi_wait_attr *attr, ++ struct util_wait *wait); ++int fi_wait_cleanup(struct util_wait *wait); ++ ++struct util_wait_fd { ++ struct util_wait util_wait; ++ struct fd_signal signal; ++ fi_epoll_t epoll_fd; ++ struct dlist_entry fd_list; ++ fastlock_t lock; ++}; ++ ++typedef int (*ofi_wait_fd_try_func)(void *arg); ++ ++struct ofi_wait_fd_entry { ++ struct dlist_entry entry; ++ int fd; ++ ofi_wait_fd_try_func try; ++ void *arg; ++ ofi_atomic32_t ref; ++}; ++ ++int ofi_wait_fd_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, ++ struct fid_wait **waitset); ++int ofi_wait_fd_add(struct util_wait *wait, int fd, uint32_t events, ++ ofi_wait_fd_try_func try, void *arg, void *context); ++int ofi_wait_fd_del(struct util_wait *wait, int fd); ++ + /* + * Completion queue + * +@@ -273,13 +403,14 @@ int ofi_endpoint_close(struct util_ep *util_ep); + * entries on the CQ. This allows poll sets to drive progress + * without introducing private interfaces to the CQ. + */ +-#define FI_DEFAULT_CQ_SIZE 1024 + + typedef void (*fi_cq_read_func)(void **dst, void *src); + +-struct util_cq_err_entry { +- struct fi_cq_err_entry err_entry; +- struct slist_entry list_entry; ++struct util_cq_oflow_err_entry { ++ struct fi_cq_tagged_entry *parent_comp; ++ struct fi_cq_err_entry comp; ++ fi_addr_t src; ++ struct slist_entry list_entry; + }; + + OFI_DECLARE_CIRQUE(struct fi_cq_tagged_entry, util_comp_cirq); +@@ -294,11 +425,13 @@ struct util_cq { + struct dlist_entry ep_list; + fastlock_t ep_list_lock; + fastlock_t cq_lock; ++ ofi_fastlock_acquire_t cq_fastlock_acquire; ++ ofi_fastlock_release_t cq_fastlock_release; + + struct util_comp_cirq *cirq; + fi_addr_t *src; + +- struct slist err_list; ++ struct slist oflow_err_list; + fi_cq_read_func read_entry; + int internal_wait; + ofi_atomic32_t signaled; +@@ -312,6 +445,7 @@ int ofi_check_bind_cq_flags(struct util_ep *ep, struct util_cq *cq, + uint64_t flags); + void ofi_cq_progress(struct util_cq *cq); + int ofi_cq_cleanup(struct util_cq *cq); ++int ofi_cq_control(struct fid *fid, int command, void *arg); + ssize_t ofi_cq_read(struct fid_cq *cq_fid, void *buf, size_t count); + ssize_t ofi_cq_readfrom(struct fid_cq *cq_fid, void *buf, size_t count, + fi_addr_t *src_addr); +@@ -322,8 +456,82 @@ ssize_t ofi_cq_sread(struct fid_cq *cq_fid, void *buf, size_t count, + ssize_t ofi_cq_sreadfrom(struct fid_cq *cq_fid, void *buf, size_t count, + fi_addr_t *src_addr, const void *cond, int timeout); + int ofi_cq_signal(struct fid_cq *cq_fid); +-int ofi_cq_write(struct util_cq *cq, void *context, uint64_t flags, size_t len, +- void *buf, uint64_t data, uint64_t tag); ++ ++int ofi_cq_write_overflow(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag, fi_addr_t src); ++ ++static inline void util_cq_signal(struct util_cq *cq) ++{ ++ assert(cq->wait); ++ cq->wait->signal(cq->wait); ++} ++ ++static inline void ++ofi_cq_write_comp_entry(struct util_cq *cq, void *context, uint64_t flags, ++ size_t len, void *buf, uint64_t data, uint64_t tag) ++{ ++ struct fi_cq_tagged_entry *comp = ofi_cirque_tail(cq->cirq); ++ comp->op_context = context; ++ comp->flags = flags; ++ comp->len = len; ++ comp->buf = buf; ++ comp->data = data; ++ comp->tag = tag; ++ ofi_cirque_commit(cq->cirq); ++} ++ ++static inline int ++ofi_cq_write_thread_unsafe(struct util_cq *cq, void *context, uint64_t flags, ++ size_t len, void *buf, uint64_t data, uint64_t tag) ++{ ++ if (OFI_UNLIKELY(ofi_cirque_isfull(cq->cirq))) { ++ FI_DBG(cq->domain->prov, FI_LOG_CQ, ++ "util_cq cirq is full!\n"); ++ return ofi_cq_write_overflow(cq, context, flags, len, ++ buf, data, tag, 0); ++ } ++ ofi_cq_write_comp_entry(cq, context, flags, len, buf, data, tag); ++ return 0; ++} ++ ++static inline int ++ofi_cq_write(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag) ++{ ++ int ret; ++ cq->cq_fastlock_acquire(&cq->cq_lock); ++ ret = ofi_cq_write_thread_unsafe(cq, context, flags, len, buf, data, tag); ++ cq->cq_fastlock_release(&cq->cq_lock); ++ return ret; ++} ++ ++static inline int ++ofi_cq_write_src_thread_unsafe(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag, fi_addr_t src) ++{ ++ if (OFI_UNLIKELY(ofi_cirque_isfull(cq->cirq))) { ++ FI_DBG(cq->domain->prov, FI_LOG_CQ, ++ "util_cq cirq is full!\n"); ++ return ofi_cq_write_overflow(cq, context, flags, len, ++ buf, data, tag, src); ++ } ++ cq->src[ofi_cirque_windex(cq->cirq)] = src; ++ ofi_cq_write_comp_entry(cq, context, flags, len, buf, data, tag); ++ return 0; ++} ++ ++static inline int ++ofi_cq_write_src(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag, fi_addr_t src) ++{ ++ int ret; ++ cq->cq_fastlock_acquire(&cq->cq_lock); ++ ret = ofi_cq_write_src_thread_unsafe(cq, context, flags, len, ++ buf, data, tag, src); ++ cq->cq_fastlock_release(&cq->cq_lock); ++ return ret; ++} ++ + int ofi_cq_write_error(struct util_cq *cq, + const struct fi_cq_err_entry *err_entry); + int ofi_cq_write_error_peek(struct util_cq *cq, uint64_t tag, void *context); +@@ -338,10 +546,39 @@ static inline int ofi_need_completion(uint64_t cq_flags, uint64_t op_flags) + FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE))); + } + ++static const uint64_t ofi_rx_flags[] = { ++ [ofi_op_msg] = FI_RECV, ++ [ofi_op_tagged] = FI_RECV | FI_TAGGED, ++ [ofi_op_read_req] = FI_RMA | FI_REMOTE_READ, ++ [ofi_op_write] = FI_RMA | FI_REMOTE_WRITE, ++ [ofi_op_atomic] = FI_ATOMIC | FI_REMOTE_WRITE, ++ [ofi_op_atomic_fetch] = FI_ATOMIC | FI_REMOTE_READ, ++ [ofi_op_atomic_compare] = FI_ATOMIC | FI_REMOTE_READ, ++}; ++ ++static inline uint64_t ofi_rx_cq_flags(uint32_t op) ++{ ++ return ofi_rx_flags[op]; ++} ++ ++static const uint64_t ofi_tx_flags[] = { ++ [ofi_op_msg] = FI_SEND, ++ [ofi_op_tagged] = FI_SEND | FI_TAGGED, ++ [ofi_op_read_req] = FI_RMA | FI_READ, ++ [ofi_op_write] = FI_RMA | FI_WRITE, ++ [ofi_op_atomic] = FI_ATOMIC | FI_WRITE, ++ [ofi_op_atomic_fetch] = FI_ATOMIC | FI_READ, ++ [ofi_op_atomic_compare] = FI_ATOMIC | FI_READ, ++}; ++ ++static inline uint64_t ofi_tx_cq_flags(uint32_t op) ++{ ++ return ofi_tx_flags[op]; ++} ++ + /* + * Counter + */ +-struct util_cntr; + typedef void (*ofi_cntr_progress_func)(struct util_cntr *cntr); + + struct util_cntr { +@@ -368,22 +605,30 @@ int ofi_cntr_init(const struct fi_provider *prov, struct fid_domain *domain, + struct fi_cntr_attr *attr, struct util_cntr *cntr, + ofi_cntr_progress_func progress, void *context); + int ofi_cntr_cleanup(struct util_cntr *cntr); ++static inline void util_cntr_signal(struct util_cntr *cntr) ++{ ++ assert(cntr->wait); ++ cntr->wait->signal(cntr->wait); ++} ++ ++static inline void ofi_cntr_inc_noop(struct util_cntr *cntr) ++{ ++ OFI_UNUSED(cntr); ++} + ++static inline void ofi_cntr_inc(struct util_cntr *cntr) ++{ ++ cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); ++} + + /* + * AV / addressing + */ +-struct util_av_hash_entry { +- int index; +- ofi_atomic32_t use_cnt; +- int next; +-}; + +-struct util_av_hash { +- struct util_av_hash_entry *table; +- int free_list; +- int slots; +- int total_count; ++struct util_av_entry { ++ ofi_atomic32_t use_cnt; ++ UT_hash_handle hh; ++ char addr[0]; + }; + + struct util_av { +@@ -394,179 +639,73 @@ struct util_av { + fastlock_t lock; + const struct fi_provider *prov; + ++ struct util_av_entry *hash; ++ struct util_buf_pool *av_entry_pool; ++ + void *context; + uint64_t flags; + size_t count; + size_t addrlen; +- ssize_t free_list; +- struct util_av_hash hash; +- void *data; + struct dlist_entry ep_list; + }; + +-#define OFI_AV_HASH (1 << 0) +- + struct util_av_attr { +- size_t addrlen; +- size_t overhead; +- int flags; ++ size_t addrlen; ++ int flags; + }; + ++typedef int (*ofi_av_apply_func)(struct util_av *av, void *addr, ++ fi_addr_t fi_addr, void *arg); ++ + int ofi_av_init(struct util_domain *domain, + const struct fi_av_attr *attr, const struct util_av_attr *util_attr, + struct util_av *av, void *context); ++int ofi_av_init_lightweight(struct util_domain *domain, const struct fi_av_attr *attr, ++ struct util_av *av, void *context); + int ofi_av_close(struct util_av *av); ++int ofi_av_close_lightweight(struct util_av *av); + +-int ofi_av_insert_addr(struct util_av *av, const void *addr, int slot, int *index); +-int ofi_av_remove_addr(struct util_av *av, int slot, int index); +-int ofi_av_lookup_index(struct util_av *av, const void *addr, int slot); ++int ofi_av_insert_addr(struct util_av *av, const void *addr, fi_addr_t *fi_addr); ++int ofi_av_remove_addr(struct util_av *av, fi_addr_t fi_addr); ++fi_addr_t ofi_av_lookup_fi_addr(struct util_av *av, const void *addr); ++int ofi_av_elements_iter(struct util_av *av, ofi_av_apply_func apply, void *arg); + int ofi_av_bind(struct fid *av_fid, struct fid *eq_fid, uint64_t flags); + void ofi_av_write_event(struct util_av *av, uint64_t data, + int err, void *context); + +-int ip_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context); +-int ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context, int flags); ++int ofi_ip_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context); ++int ofi_ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context, int flags); + +-void *ofi_av_get_addr(struct util_av *av, int index); +-#define ip_av_get_addr ofi_av_get_addr +-int ip_av_get_index(struct util_av *av, const void *addr); ++void *ofi_av_get_addr(struct util_av *av, fi_addr_t fi_addr); ++#define ofi_ip_av_get_addr ofi_av_get_addr ++fi_addr_t ofi_ip_av_get_fi_addr(struct util_av *av, const void *addr); + +-int ofi_get_addr(uint32_t addr_format, uint64_t flags, ++int ofi_get_addr(uint32_t *addr_format, uint64_t flags, + const char *node, const char *service, + void **addr, size_t *addrlen); + int ofi_get_src_addr(uint32_t addr_format, + const void *dest_addr, size_t dest_addrlen, + void **src_addr, size_t *src_addrlen); +-void ofi_getnodename(char *buf, int buflen); ++void ofi_getnodename(uint16_t sa_family, char *buf, int buflen); + int ofi_av_get_index(struct util_av *av, const void *addr); + +-/* +- * Connection Map +- */ +- +-// TODO explore replacing this with a simple connection hash map that is common +-// for both AV and RX only connections. +- +-#define UTIL_CMAP_IDX_BITS OFI_IDX_INDEX_BITS +- +-enum ofi_cmap_signal { +- OFI_CMAP_FREE, +- OFI_CMAP_EXIT, +-}; +- +-enum util_cmap_state { +- CMAP_IDLE, +- CMAP_CONNREQ_SENT, +- CMAP_CONNREQ_RECV, +- CMAP_ACCEPT, +- CMAP_CONNECTED, +- CMAP_SHUTDOWN, +-}; +- +-struct util_cmap_handle { +- struct util_cmap *cmap; +- enum util_cmap_state state; +- /* Unique identifier for a connection. Can be exchanged with a peer +- * during connection setup and can later be used in a message header +- * to identify the source of the message (Used for FI_SOURCE, RNDV +- * protocol, etc.) */ +- uint64_t key; +- uint64_t remote_key; +- fi_addr_t fi_addr; +- struct util_cmap_peer *peer; +-}; +- +-struct util_cmap_peer { +- struct util_cmap_handle *handle; +- struct dlist_entry entry; +- uint8_t addr[]; +-}; +- +-typedef struct util_cmap_handle* (*ofi_cmap_alloc_handle_func)(void); +-typedef void (*ofi_cmap_handle_func)(struct util_cmap_handle *handle); +-typedef int (*ofi_cmap_connect_func)(struct util_ep *cmap, +- struct util_cmap_handle *handle, +- const void *addr, size_t addrlen); +-typedef void *(*ofi_cmap_event_handler_func)(void *arg); +-typedef int (*ofi_cmap_signal_func)(struct util_ep *ep, void *context, +- enum ofi_cmap_signal signal); +- +-struct util_cmap_attr { +- void *name; +- ofi_cmap_alloc_handle_func alloc; +- ofi_cmap_handle_func close; +- ofi_cmap_handle_func free; +- ofi_cmap_connect_func connect; +- ofi_cmap_event_handler_func event_handler; +- ofi_cmap_signal_func signal; +-}; +- +-struct util_cmap { +- struct util_ep *ep; +- struct util_av *av; +- +- /* cmap handles that correspond to addresses in AV */ +- struct util_cmap_handle **handles_av; +- +- /* Store all cmap handles (inclusive of handles_av) in an indexer. +- * This allows reverse lookup of the handle using the index. */ +- struct indexer handles_idx; +- +- struct ofi_key_idx key_idx; +- +- struct dlist_entry peer_list; +- struct util_cmap_attr attr; +- pthread_t event_handler_thread; +- int av_updated; +- fastlock_t lock; +-}; +- +-struct util_cmap_handle *ofi_cmap_key2handle(struct util_cmap *cmap, uint64_t key); +-int ofi_cmap_get_handle(struct util_cmap *cmap, fi_addr_t fi_addr, +- struct util_cmap_handle **handle); +-void ofi_cmap_update(struct util_cmap *cmap, const void *addr, fi_addr_t fi_addr); +- +-void ofi_cmap_process_connect(struct util_cmap *cmap, +- struct util_cmap_handle *handle, +- uint64_t *remote_key); +-void ofi_cmap_process_reject(struct util_cmap *cmap, +- struct util_cmap_handle *handle); +-int ofi_cmap_process_connreq(struct util_cmap *cmap, void *addr, +- struct util_cmap_handle **handle); +-void ofi_cmap_process_shutdown(struct util_cmap *cmap, +- struct util_cmap_handle *handle); +-void ofi_cmap_del_handle(struct util_cmap_handle *handle); +-void ofi_cmap_free(struct util_cmap *cmap); +-struct util_cmap *ofi_cmap_alloc(struct util_ep *ep, +- struct util_cmap_attr *attr); +-extern struct util_cmap_handle * +-util_cmap_get_handle(struct util_cmap *cmap, fi_addr_t fi_addr); +-extern int +-util_cmap_alloc_handle(struct util_cmap *cmap, fi_addr_t fi_addr, +- enum util_cmap_state state, +- struct util_cmap_handle **handle); +-/* Caller must hold `cmap::lock` */ +-static inline struct util_cmap_handle * +-ofi_cmap_acquire_handle(struct util_cmap *cmap, fi_addr_t fi_addr) +- +-{ +- struct util_cmap_handle *handle = +- util_cmap_get_handle(cmap, fi_addr); +- if (!handle) { +- int ret; +- +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "No handle found for given fi_addr\n"); +- ret = util_cmap_alloc_handle(cmap, fi_addr, CMAP_IDLE, &handle); +- if (OFI_UNLIKELY(ret)) +- return NULL; +- } +- return handle; +-} +-int ofi_cmap_handle_connect(struct util_cmap *cmap, fi_addr_t fi_addr, +- struct util_cmap_handle *handle); ++int ofi_verify_av_insert(struct util_av *av, uint64_t flags); ++int ofi_ip_av_insertv(struct util_av *av, const void *addr, size_t addrlen, ++ size_t count, fi_addr_t *fi_addr, void *context); ++/* Caller should free *addr */ ++int ofi_ip_av_sym_getaddr(struct util_av *av, const char *node, ++ size_t nodecnt, const char *service, ++ size_t svccnt, void **addr, size_t *addrlen); ++int ofi_ip_av_insert(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context); ++int ofi_ip_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, ++ size_t count, uint64_t flags); ++int ofi_ip_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, ++ void *addr, size_t *addrlen); ++const char * ++ofi_ip_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len); + + /* + * Poll set +@@ -585,55 +724,6 @@ int fi_poll_create_(const struct fi_provider *prov, struct fid_domain *domain, + int fi_poll_create(struct fid_domain *domain, struct fi_poll_attr *attr, + struct fid_poll **pollset); + +- +-/* +- * Wait set +- */ +-struct util_wait; +-typedef void (*fi_wait_signal_func)(struct util_wait *wait); +-typedef int (*fi_wait_try_func)(struct util_wait *wait); +- +-struct util_wait { +- struct fid_wait wait_fid; +- struct util_fabric *fabric; +- struct util_poll *pollset; +- ofi_atomic32_t ref; +- const struct fi_provider *prov; +- +- enum fi_wait_obj wait_obj; +- fi_wait_signal_func signal; +- fi_wait_try_func try; +-}; +- +-int fi_wait_init(struct util_fabric *fabric, struct fi_wait_attr *attr, +- struct util_wait *wait); +-int fi_wait_cleanup(struct util_wait *wait); +- +-struct util_wait_fd { +- struct util_wait util_wait; +- struct fd_signal signal; +- fi_epoll_t epoll_fd; +- struct dlist_entry fd_list; +- fastlock_t lock; +-}; +- +-typedef int (*ofi_wait_fd_try_func)(void *arg); +- +-struct ofi_wait_fd_entry { +- struct dlist_entry entry; +- int fd; +- ofi_wait_fd_try_func try; +- void *arg; +- ofi_atomic32_t ref; +-}; +- +-int ofi_wait_fd_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, +- struct fid_wait **waitset); +-int ofi_wait_fd_add(struct util_wait *wait, int fd, ofi_wait_fd_try_func try, +- void *arg, void *context); +-int ofi_wait_fd_del(struct util_wait *wait, int fd); +- +- + /* + * EQ + */ +@@ -646,6 +736,9 @@ struct util_eq { + const struct fi_provider *prov; + + struct slist list; ++ /* This contains error data that are read by user and need to ++ * be freed in subsequent fi_eq_readerr call against the EQ */ ++ void *saved_err_data; + int internal_wait; + }; + +@@ -659,6 +752,20 @@ struct util_event { + + int ofi_eq_create(struct fid_fabric *fabric, struct fi_eq_attr *attr, + struct fid_eq **eq_fid, void *context); ++void ofi_eq_remove_fid_events(struct util_eq *eq, fid_t fid); ++void ofi_eq_handle_err_entry(uint32_t api_version, uint64_t flags, ++ struct fi_eq_err_entry *err_entry, ++ struct fi_eq_err_entry *user_err_entry); ++ssize_t ofi_eq_read(struct fid_eq *eq_fid, uint32_t *event, ++ void *buf, size_t len, uint64_t flags); ++ssize_t ofi_eq_sread(struct fid_eq *eq_fid, uint32_t *event, void *buf, ++ size_t len, int timeout, uint64_t flags); ++ssize_t ofi_eq_readerr(struct fid_eq *eq_fid, struct fi_eq_err_entry *buf, ++ uint64_t flags); ++ssize_t ofi_eq_write(struct fid_eq *eq_fid, uint32_t event, ++ const void *buf, size_t len, uint64_t flags); ++const char *ofi_eq_strerror(struct fid_eq *eq_fid, int prov_errno, ++ const void *err_data, char *buf, size_t len); + + /* + +@@ -740,6 +847,14 @@ void ofi_fabric_remove(struct util_fabric *fabric); + * Utility Providers + */ + ++#define OFI_NAME_DELIM ';' ++#define OFI_UTIL_PREFIX "ofi_" ++ ++static inline int ofi_has_util_prefix(const char *str) ++{ ++ return !strncasecmp(str, OFI_UTIL_PREFIX, strlen(OFI_UTIL_PREFIX)); ++} ++ + typedef int (*ofi_alter_info_t)(uint32_t version, const struct fi_info *src_info, + struct fi_info *dest_info); + +@@ -751,18 +866,15 @@ int ofix_getinfo(uint32_t version, const char *node, const char *service, + uint64_t flags, const struct util_prov *util_prov, + const struct fi_info *hints, ofi_alter_info_t info_to_core, + ofi_alter_info_t info_to_util, struct fi_info **info); +-int ofi_get_core_info_fabric(struct fi_fabric_attr *util_attr, ++int ofi_get_core_info_fabric(const struct fi_provider *prov, ++ const struct fi_fabric_attr *util_attr, + struct fi_info **core_info); + + +-#define OFI_NAME_DELIM ';' +-#define OFI_UTIL_PREFIX "ofi_" +- + char *ofi_strdup_append(const char *head, const char *tail); + // char *ofi_strdup_head(const char *str); + // char *ofi_strdup_tail(const char *str); +-const char *ofi_util_name(const char *prov_name, size_t *len); +-const char *ofi_core_name(const char *prov_name, size_t *len); ++int ofi_exclude_prov_name(char **prov_name, const char *util_prov_name); + + + int ofi_shm_map(struct util_shm *shm, const char *name, size_t size, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/osx/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/osx/osd.h +index db70052..8fd0d59 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/osx/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/osx/osd.h +@@ -1,6 +1,7 @@ + /* + * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -67,6 +68,21 @@ static inline int ofi_shm_remap(struct util_shm *shm, size_t newsize, void **map + return -1; + } + ++static inline ssize_t ofi_get_hugepage_size(void) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_alloc_hugepage_buf(void **memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_free_hugepage_buf(void *memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ + #ifdef __cplusplus + } + #endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rbtree.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rbtree.h +index 34ff3db..a0434b7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rbtree.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rbtree.h +@@ -95,5 +95,12 @@ RbtIterator rbtFindLeftmost(RbtHandle h, void *key, + RbtIterator rbtFind(RbtHandle h, void *key); + // returns iterator associated with key + ++void rbtTraversal(RbtHandle h, RbtIterator it, void *handler_arg, ++ void(*handler)(void *arg, RbtIterator it)); ++// tree traversal that visits (applies handler()) each node in the tree data ++// strucutre exactly once. ++ ++void *rbtRoot(RbtHandle h); ++// returns the root of the tree + + #endif /* RBTREE_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fabric.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fabric.h +index 3d29686..8385433 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fabric.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fabric.h +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #ifdef __GNUC__ + #define FI_DEPRECATED_FUNC __attribute__((deprecated)) +@@ -75,11 +76,8 @@ extern "C" { + ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) + #endif + +-/* API version (which is not necessarily the same as the +- * tarball/libfabric package version number). +- */ + #define FI_MAJOR_VERSION 1 +-#define FI_MINOR_VERSION 6 ++#define FI_MINOR_VERSION 7 + + enum { + FI_PATH_MAX = 256, +@@ -91,10 +89,13 @@ enum { + #define FI_MAJOR(version) (version >> 16) + #define FI_MINOR(version) (version & 0xFFFF) + #define FI_VERSION_GE(v1, v2) ((FI_MAJOR(v1) > FI_MAJOR(v2)) || \ +- (FI_MAJOR(v1) == FI_MAJOR(v2) && FI_MINOR(v1) == FI_MINOR(v2)) || \ +- (FI_MAJOR(v1) == FI_MAJOR(v2) && FI_MINOR(v1) > FI_MINOR(v2))) ++ (FI_MAJOR(v1) == FI_MAJOR(v2) && \ ++ FI_MINOR(v1) == FI_MINOR(v2)) || \ ++ (FI_MAJOR(v1) == FI_MAJOR(v2) && \ ++ FI_MINOR(v1) > FI_MINOR(v2))) + #define FI_VERSION_LT(v1, v2) ((FI_MAJOR(v1) < FI_MAJOR(v2)) || \ +- (FI_MAJOR(v1) == FI_MAJOR(v2) && FI_MINOR(v1) < FI_MINOR(v2))) ++ (FI_MAJOR(v1) == FI_MAJOR(v2) && \ ++ FI_MINOR(v1) < FI_MINOR(v2))) + + uint32_t fi_version(void); + +@@ -111,6 +112,7 @@ struct fid_ep; + struct fid_pep; + struct fid_stx; + struct fid_mr; ++struct fid_nic; + + typedef struct fid *fid_t; + +@@ -157,7 +159,9 @@ typedef struct fid *fid_t; + #define FI_DELIVERY_COMPLETE (1ULL << 28) + #define FI_AFFINITY (1ULL << 29) + #define FI_COMMIT_COMPLETE (1ULL << 30) ++#define FI_MATCH_COMPLETE (1ULL << 31) + ++#define FI_VARIABLE_MSG (1ULL << 48) + #define FI_RMA_PMEM (1ULL << 49) + #define FI_SOURCE_ERR (1ULL << 50) + #define FI_LOCAL_COMM (1ULL << 51) +@@ -171,6 +175,11 @@ typedef struct fid *fid_t; + #define FI_DIRECTED_RECV (1ULL << 59) + + ++/* Tagged messages, buffered receives, CQ flags */ ++#define FI_CLAIM (1ULL << 59) ++#define FI_DISCARD (1ULL << 58) ++ ++ + struct fi_ioc { + void *addr; + size_t count; +@@ -289,6 +298,9 @@ enum { + FI_PROTO_NETWORKDIRECT, + FI_PROTO_PSMX2, + FI_PROTO_SHM, ++ FI_PROTO_MRAIL, ++ FI_PROTO_RSTREAM, ++ FI_PROTO_RDMA_CM_IB_XRC, + }; + + /* Mode bits */ +@@ -300,6 +312,7 @@ enum { + #define FI_NOTIFY_FLAGS_ONLY (1ULL << 54) + #define FI_RESTRICTED_COMP (1ULL << 53) + #define FI_CONTEXT2 (1ULL << 52) ++#define FI_BUFFERED_RECV (1ULL << 51) + + struct fi_tx_attr { + uint64_t caps; +@@ -392,6 +405,50 @@ struct fi_info { + struct fi_ep_attr *ep_attr; + struct fi_domain_attr *domain_attr; + struct fi_fabric_attr *fabric_attr; ++ struct fid_nic *nic; ++}; ++ ++struct fi_device_attr { ++ char *name; ++ char *device_id; ++ char *device_version; ++ char *vendor_id; ++ char *driver; ++ char *firmware; ++}; ++ ++enum fi_bus_type { ++ FI_BUS_UNSPEC, ++ FI_BUS_UNKNOWN = FI_BUS_UNSPEC, ++ FI_BUS_PCI, ++}; ++ ++struct fi_pci_attr { ++ uint16_t domain_id; ++ uint8_t bus_id; ++ uint8_t device_id; ++ uint8_t function_id; ++}; ++ ++struct fi_bus_attr { ++ enum fi_bus_type bus_type; ++ union { ++ struct fi_pci_attr pci; ++ } attr; ++}; ++ ++enum fi_link_state { ++ FI_LINK_UNKNOWN, ++ FI_LINK_DOWN, ++ FI_LINK_UP, ++}; ++ ++struct fi_link_attr { ++ char *address; ++ size_t mtu; ++ size_t speed; ++ enum fi_link_state state; ++ char *network_type; + }; + + enum { +@@ -415,6 +472,7 @@ enum { + FI_CLASS_POLL, + FI_CLASS_CONNREQ, + FI_CLASS_MC, ++ FI_CLASS_NIC, + }; + + struct fi_eq_attr; +@@ -429,7 +487,8 @@ struct fi_ops { + int (*bind)(struct fid *fid, struct fid *bfid, uint64_t flags); + int (*control)(struct fid *fid, int command, void *arg); + int (*ops_open)(struct fid *fid, const char *name, +- uint64_t flags, void **ops, void *context); ++ uint64_t flags, void **ops, void *context); ++ int (*tostr)(const struct fid *fid, char *buf, size_t len); + }; + + /* All fabric interface descriptors must start with this structure */ +@@ -472,6 +531,14 @@ struct fid_fabric { + + int fi_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, void *context); + ++struct fid_nic { ++ struct fid fid; ++ struct fi_device_attr *device_attr; ++ struct fi_bus_attr *bus_attr; ++ struct fi_link_attr *link_attr; ++ void *prov_attr; ++}; ++ + #define FI_CHECK_OP(ops, opstype, op) \ + ((ops->size > offsetof(opstype, op)) && ops->op) + +@@ -517,6 +584,7 @@ enum { + FI_CANCEL_WORK, /* struct fi_deferred_work */ + FI_FLUSH_WORK, /* NULL */ + FI_REFRESH, /* mr: fi_mr_modify */ ++ FI_DUP, /* struct fid ** */ + }; + + static inline int fi_control(struct fid *fid, int command, void *arg) +@@ -563,6 +631,7 @@ enum fi_type { + FI_TYPE_CQ_EVENT_FLAGS, + FI_TYPE_MR_MODE, + FI_TYPE_OP_TYPE, ++ FI_TYPE_FID, + }; + + char *fi_tostr(const void *data, enum fi_type datatype); +@@ -599,6 +668,11 @@ struct fi_context2 { + }; + #endif + ++struct fi_recv_context { ++ struct fid_ep *ep; ++ void *context; ++}; ++ + #ifdef __cplusplus + } + #endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_domain.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_domain.h +index 1fecb1f..dc70b2c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_domain.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_domain.h +@@ -267,20 +267,20 @@ fi_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, + + static inline int + fi_mr_reg(struct fid_domain *domain, const void *buf, size_t len, +- uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t acs, uint64_t offset, uint64_t requested_key, + uint64_t flags, struct fid_mr **mr, void *context) + { +- return domain->mr->reg(&domain->fid, buf, len, access, offset, ++ return domain->mr->reg(&domain->fid, buf, len, acs, offset, + requested_key, flags, mr, context); + } + + static inline int + fi_mr_regv(struct fid_domain *domain, const struct iovec *iov, +- size_t count, uint64_t access, ++ size_t count, uint64_t acs, + uint64_t offset, uint64_t requested_key, + uint64_t flags, struct fid_mr **mr, void *context) + { +- return domain->mr->regv(&domain->fid, iov, count, access, ++ return domain->mr->regv(&domain->fid, iov, count, acs, + offset, requested_key, flags, mr, context); + } + +@@ -341,7 +341,9 @@ static inline int + fi_mr_refresh(struct fid_mr *mr, const struct iovec *iov, size_t count, + uint64_t flags) + { +- struct fi_mr_modify modify = {0}; ++ struct fi_mr_modify modify = {0, ++ {NULL, 0, 0, 0, 0, NULL, 0, NULL} ++ }; + modify.flags = flags; + modify.attr.mr_iov = iov; + modify.attr.iov_count = count; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_endpoint.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_endpoint.h +index d2ef6ba..6989840 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_endpoint.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_endpoint.h +@@ -60,6 +60,12 @@ enum { + enum { + FI_OPT_MIN_MULTI_RECV, /* size_t */ + FI_OPT_CM_DATA_SIZE, /* size_t */ ++ FI_OPT_BUFFERED_MIN, /* size_t */ ++ FI_OPT_BUFFERED_LIMIT, /* size_t */ ++ FI_OPT_SEND_BUF_SIZE, ++ FI_OPT_RECV_BUF_SIZE, ++ FI_OPT_TX_SIZE, ++ FI_OPT_RX_SIZE, + }; + + struct fi_ops_ep { +@@ -217,17 +223,17 @@ static inline int fi_ep_alias(struct fid_ep *ep, struct fid_ep **alias_ep, + } + + static inline int +-fi_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *attr, ++fi_tx_context(struct fid_ep *ep, int idx, struct fi_tx_attr *attr, + struct fid_ep **tx_ep, void *context) + { +- return ep->ops->tx_ctx(ep, index, attr, tx_ep, context); ++ return ep->ops->tx_ctx(ep, idx, attr, tx_ep, context); + } + + static inline int +-fi_rx_context(struct fid_ep *ep, int index, struct fi_rx_attr *attr, ++fi_rx_context(struct fid_ep *ep, int idx, struct fi_rx_attr *attr, + struct fid_ep **rx_ep, void *context) + { +- return ep->ops->rx_ctx(ep, index, attr, rx_ep, context); ++ return ep->ops->rx_ctx(ep, idx, attr, rx_ep, context); + } + + static inline FI_DEPRECATED_FUNC ssize_t +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_errno.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_errno.h +index 8ee376c..63a6acb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_errno.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_errno.h +@@ -118,7 +118,7 @@ extern "C" { + //#define FI_EMULTIHOP EMULTIHOP /* Multihop attempted */ + //#define FI_EDOTDOT EDOTDOT /* RFS specific error */ + //#define FI_EBADMSG EBADMSG /* Not a data message */ +-//#define FI_EOVERFLOW EOVERFLOW /* Value too large for defined data type */ ++#define FI_EOVERFLOW EOVERFLOW /* Value too large for defined data type */ + //#define FI_ENOTUNIQ ENOTUNIQ /* Name not unique on network */ + //#define FI_EBADFD EBADFD /* File descriptor in bad state */ + //#define FI_EREMCHG EREMCHG /* Remote address changed */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_tagged.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_tagged.h +index 75e9785..61eba4e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_tagged.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_tagged.h +@@ -41,8 +41,6 @@ + extern "C" { + #endif + +-#define FI_CLAIM (1ULL << 59) +-#define FI_DISCARD (1ULL << 58) + + struct fi_msg_tagged { + const struct iovec *msg_iov; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/shared/ofi_str.h b/src/mpid/ch4/netmod/ofi/libfabric/include/shared/ofi_str.h +new file mode 100644 +index 0000000..d352c07 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/shared/ofi_str.h +@@ -0,0 +1,54 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _OFI_STR_H_ ++#define _OFI_STR_H_ ++ ++#include ++ ++#include "config.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++int ofi_rm_substr(char *str, const char *substr); ++int ofi_rm_substr_delim(char *str, const char *substr, const char delim); ++char **ofi_split_and_alloc(const char *s, const char *delim, size_t *count); ++void ofi_free_string_array(char **s); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _OFI_STR_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/unix/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/unix/osd.h +index dddb25c..e074874 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/unix/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/unix/osd.h +@@ -43,6 +43,10 @@ + #include + #include + ++#ifdef HAVE_GLIBC_MALLOC_HOOKS ++# include ++#endif ++ + /* MSG_NOSIGNAL doesn't exist on OS X */ + #ifndef MSG_NOSIGNAL + #define MSG_NOSIGNAL 0 +@@ -75,6 +79,8 @@ + #define OFI_SOCK_TRY_CONN_AGAIN(err) \ + ((err) == EINPROGRESS) + ++#define OFI_MAX_SOCKET_BUF_SIZE SIZE_MAX ++ + struct util_shm + { + int shared_fd; +@@ -106,6 +112,11 @@ static inline int ofi_getsockname(SOCKET fd, struct sockaddr *addr, socklen_t *l + return getsockname(fd, addr, len); + } + ++static inline int ofi_getpeername(SOCKET fd, struct sockaddr *addr, socklen_t *len) ++{ ++ return getpeername(fd, addr, len); ++} ++ + static inline SOCKET ofi_socket(int domain, int type, int protocol) + { + return socket(domain, type, protocol); +@@ -127,10 +138,10 @@ static inline ssize_t ofi_recv_socket(SOCKET fd, void *buf, size_t count, + return recv(fd, buf, count, flags); + } + +-static inline ssize_t ofi_recvfrom_socket(SOCKET fd, const void *buf, size_t count, int flags, +- const struct sockaddr *to, socklen_t tolen) ++static inline ssize_t ofi_recvfrom_socket(SOCKET fd, void *buf, size_t count, int flags, ++ struct sockaddr *from, socklen_t *fromlen) + { +- return sendto(fd, buf, count, flags, to, tolen); ++ return recvfrom(fd, buf, count, flags, from, fromlen); + } + + static inline ssize_t ofi_send_socket(SOCKET fd, const void *buf, size_t count, +@@ -155,6 +166,30 @@ static inline ssize_t ofi_readv_socket(SOCKET fd, struct iovec *iov, int iov_cnt + return readv(fd, iov, iov_cnt); + } + ++static inline ssize_t ++ofi_sendmsg_tcp(SOCKET fd, const struct msghdr *msg, int flags) ++{ ++ return sendmsg(fd, msg, flags); ++} ++ ++static inline ssize_t ++ofi_sendmsg_udp(SOCKET fd, const struct msghdr *msg, int flags) ++{ ++ return sendmsg(fd, msg, flags); ++} ++ ++static inline ssize_t ++ofi_recvmsg_tcp(SOCKET fd, struct msghdr *msg, int flags) ++{ ++ return recvmsg(fd, msg, flags); ++} ++ ++static inline ssize_t ++ofi_recvmsg_udp(SOCKET fd, struct msghdr *msg, int flags) ++{ ++ return recvmsg(fd, msg, flags); ++} ++ + static inline int ofi_shutdown(SOCKET socket, int how) + { + return shutdown(socket, how); +@@ -279,6 +314,121 @@ ofi_cpuid(unsigned func, unsigned subfunc, unsigned cpuinfo[4]) + + #endif /* defined(__x86_64__) || defined(__amd64__) */ + ++typedef void (*ofi_mem_free_hook)(void *, const void *); ++typedef void *(*ofi_mem_realloc_hook)(void *, size_t, const void *); ++ ++#ifdef HAVE_GLIBC_MALLOC_HOOKS ++ ++static inline void ofi_set_mem_free_hook(ofi_mem_free_hook free_hook) ++{ ++#ifdef __INTEL_COMPILER /* ICC */ ++# pragma warning push ++# pragma warning disable 1478 ++ __free_hook = free_hook; ++# pragma warning pop ++#elif defined __clang__ /* Clang */ ++# pragma clang diagnostic push ++# pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ __free_hook = free_hook; ++# pragma clang diagnostic pop ++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wdeprecated-declarations" ++ __free_hook = free_hook; ++# pragma GCC diagnostic pop ++#else /* others */ ++ __free_hook = free_hook; ++#endif ++} ++ ++static inline void ofi_set_mem_realloc_hook(ofi_mem_realloc_hook realloc_hook) ++{ ++#ifdef __INTEL_COMPILER /* ICC */ ++# pragma warning push ++# pragma warning disable 1478 ++ __realloc_hook = realloc_hook; ++# pragma warning pop ++#elif defined __clang__ /* Clang */ ++# pragma clang diagnostic push ++# pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ __realloc_hook = realloc_hook; ++# pragma clang diagnostic pop ++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wdeprecated-declarations" ++ __realloc_hook = realloc_hook; ++# pragma GCC diagnostic pop ++#else /* others */ ++ __realloc_hook = realloc_hook; ++#endif ++} ++ ++static inline ofi_mem_free_hook ofi_get_mem_free_hook(void) ++{ ++#ifdef __INTEL_COMPILER /* ICC */ ++# pragma warning push ++# pragma warning disable 1478 ++ return __free_hook; ++# pragma warning pop ++#elif defined __clang__ /* Clang */ ++# pragma clang diagnostic push ++# pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ return __free_hook; ++# pragma clang diagnostic pop ++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wdeprecated-declarations" ++ return __free_hook; ++# pragma GCC diagnostic pop ++#else /* others */ ++ return __free_hook; ++#endif ++} ++ ++static inline ofi_mem_realloc_hook ofi_get_mem_realloc_hook(void) ++{ ++#ifdef __INTEL_COMPILER /* ICC */ ++# pragma warning push ++# pragma warning disable 1478 ++ return __realloc_hook; ++# pragma warning pop ++#elif defined __clang__ /* Clang */ ++# pragma clang diagnostic push ++# pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ return __realloc_hook; ++# pragma clang diagnostic pop ++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wdeprecated-declarations" ++ return __realloc_hook; ++# pragma GCC diagnostic pop ++#else /* others */ ++ return __realloc_hook; ++#endif ++} ++ ++#else /* !HAVE_GLIBC_MALLOC_HOOKS */ ++ ++static inline void ofi_set_mem_free_hook(ofi_mem_free_hook free_hook) ++{ ++ OFI_UNUSED(free_hook); ++} ++ ++static inline void ofi_set_mem_realloc_hook(ofi_mem_realloc_hook realloc_hook) ++{ ++ OFI_UNUSED(realloc_hook); ++} ++ ++static inline ofi_mem_free_hook ofi_get_mem_free_hook(void) ++{ ++ return NULL; ++} ++ ++static inline ofi_mem_realloc_hook ofi_get_mem_realloc_hook(void) ++{ ++ return NULL; ++} + ++#endif /* HAVE_GLIBC_MALLOC_HOOKS */ + + #endif /* _FI_UNIX_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/uthash.h b/src/mpid/ch4/netmod/ofi/libfabric/include/uthash.h +index 7e64cac..f34c1f9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/uthash.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/uthash.h +@@ -1,5 +1,5 @@ + /* +-Copyright (c) 2003-2017, Troy D. Hanson http://troydhanson.github.com/uthash/ ++Copyright (c) 2003-2018, Troy D. Hanson http://troydhanson.github.com/uthash/ + All rights reserved. + + Redistribution and use in source and binary forms, with or without +@@ -478,11 +478,20 @@ do { + + /* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ + #define HASH_FIND_STR(head,findstr,out) \ +- HASH_FIND(hh,head,findstr,(unsigned)uthash_strlen(findstr),out) ++do { \ ++ unsigned _uthash_hfstr_keylen = (unsigned)uthash_strlen(findstr); \ ++ HASH_FIND(hh, head, findstr, _uthash_hfstr_keylen, out); \ ++} while (0) + #define HASH_ADD_STR(head,strfield,add) \ +- HASH_ADD(hh,head,strfield[0],(unsigned)uthash_strlen(add->strfield),add) ++do { \ ++ unsigned _uthash_hastr_keylen = (unsigned)uthash_strlen((add)->strfield); \ ++ HASH_ADD(hh, head, strfield[0], _uthash_hastr_keylen, add); \ ++} while (0) + #define HASH_REPLACE_STR(head,strfield,add,replaced) \ +- HASH_REPLACE(hh,head,strfield[0],(unsigned)uthash_strlen(add->strfield),add,replaced) ++do { \ ++ unsigned _uthash_hrstr_keylen = (unsigned)uthash_strlen((add)->strfield); \ ++ HASH_REPLACE(hh, head, strfield[0], _uthash_hrstr_keylen, add, replaced); \ ++} while (0) + #define HASH_FIND_INT(head,findint,out) \ + HASH_FIND(hh,head,findint,sizeof(int),out) + #define HASH_ADD_INT(head,intfield,add) \ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/windows/config.h b/src/mpid/ch4/netmod/ofi/libfabric/include/windows/config.h +index e41c6e9..e9dab37 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/windows/config.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/windows/config.h +@@ -50,6 +50,9 @@ + /* psm provider is built */ + /* #undef HAVE_PSM */ + ++/* perf provider is built */ ++#define HAVE_PERF 1 ++ + /* psm2 provider is built */ + /* #undef HAVE_PSM2 */ + +@@ -68,14 +71,14 @@ + /* Define to 1 if you have the header file. */ + /* #undef HAVE_RDMA_RSOCKET_H */ + +-/* sockets provider is built */ +-#define HAVE_SOCKETS 1 +- + /* UDP provider is built */ + #define HAVE_UDP 1 + +-/* TCP provider is built */ +-#define HAVE_TCP 1 ++/* UDP provider is built as DSO */ ++/* #undef HAVE_UDP_DL */ ++ ++/* sockets provider is built */ ++#define HAVE_SOCKETS 1 + + /* sockets provider is built as DSO */ + /* #undef HAVE_SOCKETS_DL */ +@@ -159,7 +162,7 @@ + #define PACKAGE_NAME "libfabric" + + /* Define to the full name and version of this package. */ +-#define PACKAGE_STRING "libfabric 1.6.2" ++#define PACKAGE_STRING "libfabric 1.7.1" + + /* Define to the one symbol short name of this package. */ + #define PACKAGE_TARNAME "libfabric" +@@ -168,7 +171,7 @@ + #define PACKAGE_URL "" + + /* Define to the version of this package. */ +-#define PACKAGE_VERSION "1.6.2" ++#define PACKAGE_VERSION "1.7.1" + + /* Define to 1 if pthread_spin_init is available. */ + /* #undef PT_LOCK_SPIN */ +@@ -192,7 +195,7 @@ + /* Version number of package */ + #define _FI_EXP(s) #s + #define _FI_TO_STRING(s) _FI_EXP(s) +-#define VERSION _FI_TO_STRING(FI_MAJOR_VERSION) "." _FI_TO_STRING(FI_MINOR_VERSION) ".0" ++#define VERSION _FI_TO_STRING(FI_MAJOR_VERSION) "." _FI_TO_STRING(FI_MINOR_VERSION) ".1a1" + + #ifndef BUILD_ID + #define BUILD_ID "" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/windows/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/windows/osd.h +index 61982fa..2258cbe 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/windows/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/windows/osd.h +@@ -1,6 +1,7 @@ + /* + * Copyright (c) 2016 Intel Corporation. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +@@ -18,6 +19,7 @@ + #include "config.h" + + #include ++#include + #include + #include + #include +@@ -39,6 +41,8 @@ + extern "C" { + #endif + ++#define OFI_MAX_SOCKET_BUF_SIZE INT_MAX ++ + /* + * The following defines redefine the Windows Socket + * errors as BSD errors. +@@ -277,6 +281,7 @@ int fd_set_nonblock(int fd); + int socketpair(int af, int type, int protocol, int socks[2]); + void sock_get_ip_addr_table(struct slist *addr_list); + int ofi_getsockname(SOCKET fd, struct sockaddr *addr, socklen_t *len); ++int ofi_getpeername(SOCKET fd, struct sockaddr *addr, socklen_t *len); + + /* + * Win32 error code should be passed as a parameter. +@@ -712,10 +717,11 @@ static inline ssize_t ofi_recv_socket(SOCKET fd, void *buf, size_t count, + return recv(fd, (char *)buf, (int)count, flags); + } + +-static inline ssize_t ofi_recvfrom_socket(SOCKET fd, const void *buf, size_t count, int flags, +- const struct sockaddr *to, socklen_t tolen) ++static inline ssize_t ++ofi_recvfrom_socket(SOCKET fd, void *buf, size_t count, int flags, ++ struct sockaddr *from, socklen_t *fromlen) + { +- return sendto(fd, (const char*)buf, (int)count, flags, to, tolen); ++ return recvfrom(fd, (char*)buf, (int)count, flags, from, fromlen); + } + + static inline ssize_t ofi_send_socket(SOCKET fd, const void *buf, size_t count, +@@ -724,14 +730,29 @@ static inline ssize_t ofi_send_socket(SOCKET fd, const void *buf, size_t count, + return send(fd, (const char*)buf, (int)count, flags); + } + +-static inline ssize_t ofi_sendto_socket(SOCKET fd, const void *buf, size_t count, int flags, +- const struct sockaddr *to, socklen_t tolen) ++static inline ssize_t ++ofi_sendto_socket(SOCKET fd, const void *buf, size_t count, int flags, ++ const struct sockaddr *to, socklen_t tolen) + { + return sendto(fd, (const char*)buf, (int)count, flags, to, tolen); + } + + ssize_t ofi_writev_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt); + ssize_t ofi_readv_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt); ++ssize_t ofi_sendmsg_tcp(SOCKET fd, const struct msghdr *msg, int flags); ++ssize_t ofi_recvmsg_tcp(SOCKET fd, struct msghdr *msg, int flags); ++ ++static inline ssize_t ++ofi_sendmsg_udp(SOCKET fd, const struct msghdr *msg, int flags) ++{ ++ DWORD bytes; ++ int ret; ++ ++ ret = WSASendMsg(fd, msg, flags, &bytes, NULL, NULL); ++ return ret ? ret : bytes; ++} ++ ++ssize_t ofi_recvmsg_udp(SOCKET fd, struct msghdr *msg, int flags); + + static inline int ofi_shutdown(SOCKET socket, int how) + { +@@ -817,6 +838,21 @@ static inline int ofi_sysconf(int name) + + int ofi_shm_unmap(struct util_shm *shm); + ++static inline ssize_t ofi_get_hugepage_size(void) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_alloc_hugepage_buf(void **memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_free_hugepage_buf(void *memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ + static inline int ofi_is_loopback_addr(struct sockaddr *addr) { + return (addr->sa_family == AF_INET && + ((struct sockaddr_in *)addr)->sin_addr.s_addr == ntohl(INADDR_LOOPBACK)) || +@@ -936,6 +972,28 @@ ofi_cpuid(unsigned func, unsigned subfunc, unsigned cpuinfo[4]) + + #endif /* defined(_M_X64) || defined(_M_AMD64) */ + ++typedef void (*ofi_mem_free_hook)(void *, const void *); ++typedef void *(*ofi_mem_realloc_hook)(void *, size_t, const void *); ++ ++static inline void ofi_set_mem_free_hook(ofi_mem_free_hook free_hook) ++{ ++ OFI_UNUSED(free_hook); ++} ++ ++static inline void ofi_set_mem_realloc_hook(ofi_mem_realloc_hook realloc_hook) ++{ ++ OFI_UNUSED(realloc_hook); ++} ++ ++static inline ofi_mem_free_hook ofi_get_mem_free_hook(void) ++{ ++ return NULL; ++} ++ ++static inline ofi_mem_realloc_hook ofi_get_mem_realloc_hook(void) ++{ ++ return NULL; ++} + + #ifdef __cplusplus + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/info.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/info.vcxproj +index 0beac7e..e772aea 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/info.vcxproj ++++ b/src/mpid/ch4/netmod/ofi/libfabric/info.vcxproj +@@ -30,8 +30,8 @@ + {90850937-D15C-491D-B294-66DCA165254D} + Win32Proj + info +- 8.1 + ++ + + + Application +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.map.in b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.map.in +index ef2f53d..53a3ed3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.map.in ++++ b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.map.in +@@ -24,3 +24,10 @@ FABRIC_1.1 { + fi_dupinfo; + fi_fabric; + } FABRIC_1.0; ++ ++FABRIC_1.2 { ++ global: ++ fi_getinfo; ++ fi_freeinfo; ++ fi_dupinfo; ++} FABRIC_1.1; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj +index 15b84a5..43a05e7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj ++++ b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj +@@ -1,4 +1,4 @@ +- ++ + + + +@@ -30,8 +30,8 @@ + {6B3A874F-B14C-4F16-B7C3-31E94859AE3E} + Win32Proj + libfabric +- 8.1 + ++ + + + DynamicLibrary +@@ -125,7 +125,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include + CompileAsC + 4127;4200;4204;4221;4115;4201;4100 + true +@@ -148,7 +148,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; + CompileAsC + 4127;4200;4204;4221;4115;4201;4100 + true +@@ -171,7 +171,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include + CompileAsC + 4127;4200;94;4204;4221;869 + true +@@ -195,7 +195,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include + 4127;4200;4204;4221;4115;4201;4100 + true + false +@@ -220,7 +220,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; + 4127;4200;4204;4221;4115;4201;4100 + true + false +@@ -245,7 +245,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; + 4127;4200;94;4204;4221;869 + true + false +@@ -262,6 +262,17 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -274,6 +285,10 @@ + + + ++ ++ ++ ++ + + + +@@ -289,14 +304,15 @@ + + + +- + + + + ++ + + + ++ + + + +@@ -312,14 +328,6 @@ + + + +- +- false +- false +- false +- false +- false +- false +- + + + +@@ -509,10 +517,13 @@ + + + ++ + + ++ + + ++ + + + +@@ -555,10 +566,12 @@ + + + ++ + + + + ++ + + + +@@ -568,6 +581,7 @@ + + + ++ + + + +@@ -575,6 +589,7 @@ + + + ++ + + + +@@ -582,6 +597,7 @@ + + + ++ + + + +@@ -619,15 +635,16 @@ + + + ++ + + + + + + ++ + + +- + + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj.filters b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj.filters +index 323fc1c..c034841 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj.filters ++++ b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj.filters +@@ -1,4 +1,4 @@ +- ++ + + + +@@ -97,6 +97,18 @@ + + {8c151366-dd08-48d5-aa21-50a500cbde73} + ++ ++ {b85ecf6c-fb76-4d65-a7f0-cba470a0adee} ++ ++ ++ {b4689956-b61f-4c5b-b827-9af0797ea087} ++ ++ ++ {06bbf944-2165-474f-a574-2e61ec0bec25} ++ ++ ++ {be316a01-6bff-4203-b070-ffaa66bb398e} ++ + + + +@@ -123,12 +135,18 @@ + + Source Files\src + ++ ++ Source Files\src\shared ++ + + Source Files\src + + + Source Files\src + ++ ++ Source Files\src ++ + + Source Files\src + +@@ -273,15 +291,24 @@ + + Source Files\prov\rxd\src + +- ++ + Source Files\prov\rxd\src + +- ++ + Source Files\prov\rxd\src + + + Source Files\prov\rxd\src + ++ ++ Source Files\prov\rxd\src ++ ++ ++ Source Files\prov\rxd\src ++ ++ ++ Source Files\prov\rxd\src ++ + + Source Files\prov\rxm\src + +@@ -291,6 +318,9 @@ + + Source Files\prov\rxm\src + ++ ++ Source Files\prov\rxm\src ++ + + Source Files\prov\rxm\src + +@@ -300,6 +330,9 @@ + + Source Files\prov\rxm\src + ++ ++ Source Files\prov\rxm\src ++ + + Source Files\prov\rxm\src + +@@ -312,9 +345,6 @@ + + Source Files\prov\netdir\src + +- +- Source Files\prov\netdir\src +- + + Source Files\prov\netdir\src + +@@ -384,18 +414,27 @@ + + Source Files\prov\tcp\src + ++ ++ Source Files\prov\tcp\src ++ + + Source Files\prov\tcp\src + + + Source Files\prov\tcp\src + ++ ++ Source Files\prov\tcp\src ++ + + Source Files\prov\tcp\src + + + Source Files\prov\tcp\src + ++ ++ Source Files\prov\tcp\src ++ + + Source Files\prov\tcp\src + +@@ -405,6 +444,39 @@ + + Source Files\prov\util + ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\perf\src ++ + + + +@@ -419,6 +491,9 @@ + + Header Files + ++ ++ Header Files ++ + + Header Files + +@@ -434,6 +509,9 @@ + + Header Files + ++ ++ Header Files ++ + + Header Files\rdma + +@@ -560,6 +638,9 @@ + + Source Files\prov\rxd\include + ++ ++ Source Files\prov\rxd\include ++ + + Source Files\prov\rxm\include + +@@ -572,9 +653,6 @@ + + Source Files\prov\netdir\include + +- +- Source Files\prov\netdir\include +- + + Source Files\prov\netdir\include + +@@ -623,6 +701,9 @@ + + Header Files\windows + ++ ++ Source Files\prov\hook\src ++ + + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fabric.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fabric.7.md +index 9055349..e54c50f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fabric.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fabric.7.md +@@ -238,6 +238,34 @@ FI_LOG_SUBSYS environment variables. + - *mr* + : Provides output specific to memory registration. + ++# PROVIDER INSTALLATION AND SELECTION ++ ++The libfabric build scripts will install all providers that are supported ++by the installation system. Providers that are missing build prerequisites ++will be disabled. Installed providers will dynamically check for necessary ++hardware on library initialization and respond appropriately to application ++queries. ++ ++Users can enable or disable available providers through build configuration ++options. See 'configure --help' for details. In general, a specific provider ++can be controlled using the configure option '--enable-'. For ++example, '--enable-udp' (or '--enable-udp=yes') will add the udp provider to the ++build. To disable the provider, '--enable-udp=no' can be used. ++ ++Providers can also be enable or disabled at run time using the FI_PROVIDER ++environment variable. The FI_PROVIDER variable is set to a comma separated ++list of providers to include. If the list begins with the '^' symbol, then ++the list will be negated. ++ ++ Example: To enable the udp and tcp providers only, set: ++ FI_PROVIDER="udp,tcp" ++ ++The fi_info utility, which is included as part of the libfabric package, can ++be used to retrieve information about which providers are available in the ++system. Additionally, it can retrieve a list of all environment variables ++that may be used to configure libfabric and each provider. See ++[`fi_info`(1)](fi_info.1.html) for more details. ++ + # NOTES + + Because libfabric is designed to provide applications direct access to +@@ -258,6 +286,7 @@ portability across providers. + + # SEE ALSO + ++[`fi_info`(1)](fi_info.1.html), + [`fi_provider`(7)](fi_provider.7.html), + [`fi_getinfo`(3)](fi_getinfo.3.html), + [`fi_endpoint`(3)](fi_endpoint.3.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_atomic.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_atomic.3.md +index 7a3ff9c..85f261e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_atomic.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_atomic.3.md +@@ -143,7 +143,9 @@ int fi_query_atomic(struct fid_domain *domain, + : Additional flags to apply for the atomic operation + + *context* +-: User specified pointer to associate with the operation. ++: User specified pointer to associate with the operation. This parameter is ++ ignored if the operation will not generate a successful completion, unless ++ an op flag specifies the context parameter be used for required input. + + # DESCRIPTION + +@@ -518,19 +520,31 @@ size field indicates the size in bytes of the atomic datatype. + + ## Completions + +-Completed atomic operations are reported to the user through one or +-more event collectors associated with the endpoint. Users provide +-context which are associated with each operation, and is returned to +-the user as part of the event completion. See fi_cq for completion +-event details. +- +-Updates to the target buffer of an atomic operation are visible to +-processes running on the target system either after a completion has +-been generated, or after the completion of an operation initiated +-after the atomic call with a fencing operation occurring in between. +-For example, the target process may be notified by the initiator +-sending a message after the atomic call completes, or sending a fenced +-message immediately after initiating the atomic operation. ++Completed atomic operations are reported to the initiator of the ++request through an associated completion queue or counter. ++Any user provided context specified with the request will be ++returned as part of any completion event written to a CQ. ++See fi_cq for completion event details. ++ ++Any results returned to the initiator as part of an atomic operation ++will be available prior to a completion event being generated. This ++will be true even if the requested completion semantic provides a weaker ++guarantee. That is, atomic fetch operations have FI_DELIVERY_COMPLETE ++semantics. Completions generated for other types of atomic operations ++indicate that it is safe to re-use the source data buffers. ++ ++Any updates to data at the target of an atomic operation will be ++visible to processes running on the target node prior to one of ++the following occurring. If the atomic operation generates a ++completion event or updates a completion counter at the target ++endpoint, the results will be available prior to the completion ++notification. After processing a completion for the atomic, if ++the initiator submits a transfer between the same endpoints that ++generates a completion at the target, the results will be available ++prior to the subsequent transfer's event. Or, if a fenced data ++transfer from the initiator follows the atomic request, the results ++will be available prior to a completion at the target for the ++fenced transfer. + + # FLAGS + +@@ -554,13 +568,15 @@ with atomic message calls. + its access to the fabric hardware. + + *FI_INJECT* +-: Indicates that the outbound non-const data buffers (buf and compare +- parameters) should be returned to user immediately after the call +- returns, even if the operation is handled asynchronously. This may +- require that the underlying provider implementation copy the data +- into a local buffer and transfer out of that buffer. The use of +- output result buffers are not affected by this flag. This flag can only +- be used with messages smaller than inject_size. ++: Indicates that the control of constant data buffers should be returned to ++ the user immediately after the call returns, even if the operation ++ is handled asynchronously. This may require that the underlying ++ provider implementation copy the data into a local buffer and ++ transfer out of that buffer. Constant data buffers refers to any ++ data buffer or iovec used by the atomic APIs that are marked as ++ 'const'. Non-constant or output buffers are unaffected by this flag ++ and may be accessed by the provider at anytime until the operation has ++ completed. This flag can only be used with messages smaller than inject_size. + + *FI_FENCE* + : Applies to transmits. Indicates that the requested operation, also +@@ -622,6 +638,14 @@ parameter. This must be between 1 and the maximum returned through the + relevant valid operation, inclusive. The requested operation and data + type must also be valid for the given provider. + ++The ordering of atomic operations carried as part of different request ++messages is subject to the message and data ordering definitions assigned ++to the transmitting and receiving endpoints. Both message and data ordering ++are required if the results of two atomic operations to the same memory ++buffers are to reflect the second operation acting on the results of the ++first. See [`fi_endpoint`(3)](fi_endpoint.3.html) for further details ++and message size restrictions. ++ + # SEE ALSO + + [`fi_getinfo`(3)](fi_getinfo.3.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cntr.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cntr.3.md +index 0c203ad..cddfaf6 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cntr.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cntr.3.md +@@ -258,8 +258,15 @@ counter values (e.g. fi_cntr_set or fi_cntr_add) may not be immediately + visible to counter read operations (i.e. fi_cntr_read or fi_cntr_readerr). + A small, but undefined, delay may occur between the counter changing and + the reported value being updated. However, a final updated value will +-eventually be reflected in the read counter value, with the order of the +-updates maintained. ++eventually be reflected in the read counter value. ++ ++Additionally, applications should ensure that the value of a counter is ++stable and not subject to change prior to calling fi_cntr_set ++or fi_cntr_seterr. Otherwise, the resulting value of the counter after ++fi_cntr_set / fi_cntr_seterr is undefined, as updates to the counter may ++be lost. A counter value is considered stable if all previous ++updates using fi_cntr_set / fi_cntr_seterr and results of related operations ++are reflected in the observed value of the counter. + + # SEE ALSO + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cq.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cq.3.md +index 1657e28..041ebd3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cq.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cq.3.md +@@ -353,23 +353,26 @@ be the same as the count parameter. + + Returned source addressing data is converted from the native address + used by the underlying fabric into an fi_addr_t, which may be used in +-transmit operations. Typically, returning fi_addr_t requires that +-the source address be inserted into the address vector associated with the +-receiving endpoint. For endpoints allocated using the FI_SOURCE_ERR +-capability, if the source address has not been inserted into the +-address vector, fi_cq_readfrom will return -FI_EAVAIL. The +-completion will then be reported through fi_cq_readerr with error +-code -FI_EADDRNOTAVAIL. See fi_cq_readerr for details. ++transmit operations. Under most circumstances, returning fi_addr_t ++requires that the source address already have been inserted into the ++address vector associated with the receiving endpoint. This is true for ++address vectors of type FI_AV_TABLE. In select providers when FI_AV_MAP is ++used, source addresses may be converted algorithmically into a ++usable fi_addr_t, even though the source address has not been inserted ++into the address vector. This is permitted by the API, as it allows ++the provider to avoid address look-up as part of receive message processing. ++In no case do providers insert addresses into an AV separate from an ++application calling fi_av_insert or similar call. ++ ++For endpoints allocated using the FI_SOURCE_ERR capability, if the ++source address cannot be converted into a valid fi_addr_t value, ++fi_cq_readfrom will return -FI_EAVAIL, even if the data were received ++successfully. The completion will then be reported through fi_cq_readerr ++with error code -FI_EADDRNOTAVAIL. See fi_cq_readerr for details. + + If FI_SOURCE is specified without FI_SOURCE_ERR, source addresses +-which cannot be mapped to a local fi_addr_t will be reported as +-FI_ADDR_NOTAVAIL. The behavior is dependent on the type of address +-vector in use. For AVs of type FI_AV_MAP, source addresses may be +-mapped directly to an fi_addr_t value, even if the source address +-were not inserted into the AV. This allows the provider to optimize +-the reporting of the source fi_addr_t without the overhead of +-verifying whether the address is in the AV. If full address +-validation is necessary, FI_SOURCE_ERR must be used. ++which cannot be mapped to a usable fi_addr_t will be reported as ++FI_ADDR_NOTAVAIL. + + ## fi_cq_sread / fi_cq_sreadfrom + +@@ -415,11 +418,20 @@ convert provider specific error information into a printable string + for debugging purposes. See field details below for more information + on the use of err_data and err_data_size. + ++Note that error completions are generated for all operations, including ++those for which a completion was not requested (e.g. an endpoint ++is configured with FI_SELECTIVE_COMPLETION, but the request did not have ++the FI_COMPLETION flag set). In such cases, providers will return as ++much information as made available by the underlying software and ++hardware about the failure, other fields will be set to NULL or 0. This ++includes the op_context value, which may not have been provided or was ++ignored on input as part of the transfer. ++ + Notable completion error codes are given below. + + *FI_EADDRNOTAVAIL* + : This error code is used by CQs configured with FI_SOURCE_ERR to report +- completions for which a matching fi_addr_t source address could not ++ completions for which a usable fi_addr_t source address could not + be found. An error code of FI_EADDRNOTAVAIL indicates that the data + transfer was successfully received and processed, with the + fi_cq_err_entry fields containing information about the completion. +@@ -594,6 +606,130 @@ operation. The following completion flags are defined. + buffer has been released, and the completion entry is not associated + with a received message. + ++*FI_MORE* ++: See the 'Buffered Receives' section in `fi_msg`(3) for more details. ++ This flag is associated with receive completions on endpoints that ++ have FI_BUFFERED_RECV mode enabled. When set to one, it indicates that ++ the buffer referenced by the completion is limited by the ++ FI_OPT_BUFFERED_LIMIT threshold, and additional message data must be ++ retrieved by the application using an FI_CLAIM operation. ++ ++*FI_CLAIM* ++: See the 'Buffered Receives' section in `fi_msg`(3) for more details. ++ This flag is set on completions associated with receive operations ++ that claim buffered receive data. Note that this flag only applies ++ to endpoints configured with the FI_BUFFERED_RECV mode bit. ++ ++# COMPLETION EVENT SEMANTICS ++ ++Libfabric defines several completion 'levels', identified using operational ++flags. Each flag indicates the soonest that a completion event may be ++generated by a provider, and the assumptions that an application may make ++upon processing a completion. The operational flags are defined below, ++along with an example of how a provider might implement the semantic. Note ++that only meeting the semantic is required of the provider and not the ++implementation. Providers may implement stronger completion semantics ++than necessary for a given operation, but only the behavior defined by the ++completion level is guaranteed. ++ ++To help understand the conceptual differences in completion levels, consider ++mailing a letter. Placing the letter into the local mailbox for pick-up is ++similar to 'inject complete'. Having the letter picked up and dropped off ++at the destination mailbox is equivalent to 'transmit complete'. The ++'delivery complete' semantic is a stronger guarantee, with a person at the ++destination signing for the letter. However, the person who signed for the ++letter is not necessarily the intended recipient. The 'match complete' ++option is similar to delivery complete, but requires the intended recipient ++to sign for the letter. ++ ++The 'commit complete' level has different semantics than the previously ++mentioned levels. Commit complete would be closer to the letter ++arriving at the destination and being placed into a fire proof safe. ++ ++The operational flags for the described completion levels are defined below. ++ ++*FI_INJECT_COMPLETE* ++: Indicates that a completion should be generated when the ++ source buffer(s) may be reused. A completion guarantees that ++ the buffers will not be read from again and the application may ++ reclaim them. No other guarantees are made with respect to the ++ state of the operation. ++ ++ Example: A provider may generate this completion event after copying ++ the source buffer into a network buffer, either in host memory or ++ on the NIC. An inject completion does not indicate that the data has ++ been transmitted onto the network, and a local error could occur after ++ the completion event has been generated that could prevent it from being ++ transmitted. ++ ++ Inject complete allows for the fastest completion reporting (and, hence, ++ buffer reuse), but provides the weakest guarantees against network errors. ++ ++ Note: This flag is used to control when a completion entry is inserted ++ into a completion queue. It does not apply to operations that do not ++ generate a completion queue entry, such as the fi_inject operation, and ++ is not subject to the inject_size message limit restriction. ++ ++*FI_TRANSMIT_COMPLETE* ++: Indicates that a completion should be generated when the transmit ++ operation has completed relative to the local provider. The exact ++ behavior is dependent on the endpoint type. ++ ++ For reliable endpoints: ++ ++ Indicates that a completion should be generated when the operation has ++ been delivered to the peer endpoint. A completion guarantees that the ++ operation is no longer dependent on the fabric or local resources. The ++ state of the operation at the peer endpoint is not defined. ++ ++ Example: A provider may generate a transmit complete event upon receiving ++ an ack from the peer endpoint. The state of the message at the peer is ++ unknown and may be buffered in the target NIC at the time the ack has been ++ generated. ++ ++ For unreliable endpoints: ++ ++ Indicates that a completion should be generated when the operation has ++ been delivered to the fabric. A completion guarantees that the ++ operation is no longer dependent on local resources. The state of the ++ operation within the fabric is not defined. ++ ++*FI_DELIVERY_COMPLETE* ++: Indicates that a completion should not be generated until an operation ++ has been processed by the destination endpoint(s). A completion ++ guarantees that the result of the operation is available; however, ++ additional steps may need to be taken at the destination to retrieve the ++ results. For example, an application may need to provide a receive buffers ++ in order to retrieve messages that were buffered by the provider. ++ ++ Delivery complete indicates that the message has been processed by the peer. ++ If an application buffer was ready to receive the results of the message ++ when it arrived, then delivery complete indicates that the data was placed ++ into the application's buffer. ++ ++ This completion mode applies only to reliable endpoints. For operations ++ that return data to the initiator, such as RMA read or atomic-fetch, ++ the source endpoint is also considered a destination endpoint. This is the ++ default completion mode for such operations. ++ ++*FI_MATCH_COMPLETE* ++: Indicates that a completion should be generated only after the operation ++ has been matched with an application specified buffer. Operations using ++ this completion semantic are dependent on the application at the target ++ claiming the message or results. As a result, match complete may involve ++ additional provider level acknowledgements or lengthy delays. However, this ++ completion model enables peer applications to synchronize their execution. ++ ++*FI_COMMIT_COMPLETE* ++: Indicates that a completion should not be generated (locally or at the ++ peer) until the result of an operation have been made persistent. ++ A completion guarantees that the result is both available and durable, ++ in the case of power failure. ++ ++ This completion mode applies only to operations that target persistent ++ memory regions over reliable endpoints. This completion mode is ++ experimental. ++ + # NOTES + + A completion queue must be bound to at least one enabled endpoint before any +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_endpoint.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_endpoint.3.md +index 33a2c55..d876de1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_endpoint.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_endpoint.3.md +@@ -284,10 +284,11 @@ together when binding an endpoint to a completion domain CQ. + into a completion queue after they have successfully completed. + Applications can use this bind flag to selectively enable when + completions are generated. If FI_SELECTIVE_COMPLETION is specified, +- data transfer operations will not generate entries for successful ++ data transfer operations will not generate entries for _successful_ + completions unless FI_COMPLETION is set as an operational flag for the +- given operation. FI_SELECTIVE_COMPLETION must be OR'ed with FI_TRANSMIT +- and/or FI_RECV flags. ++ given operation. Operations that fail asynchronously will still generate ++ completions, even if a completion is not requested. FI_SELECTIVE_COMPLETION ++ must be OR'ed with FI_TRANSMIT and/or FI_RECV flags. + + When FI_SELECTIVE_COMPLETION is set, the user must determine when a + request that does NOT have FI_COMPLETION set has completed indirectly, +@@ -347,22 +348,22 @@ binding an endpoint to a counter, the following flags may be specified. + and normal message operations. + + *FI_READ* +-: Increments the specified counter whenever an RMA read or atomic fetch +- operation initiated from the endpoint has completed successfully or +- in error. ++: Increments the specified counter whenever an RMA read, atomic fetch, ++ or atomic compare operation initiated from the endpoint has completed ++ successfully or in error. + + *FI_WRITE* +-: Increments the specified counter whenever an RMA write or atomic operation +- initiated from the endpoint has completed successfully or in error. ++: Increments the specified counter whenever an RMA write or base atomic ++ operation initiated from the endpoint has completed successfully or in error. + + *FI_REMOTE_READ* +-: Increments the specified counter whenever an RMA read or +- atomic fetch operation is initiated from a remote endpoint that ++: Increments the specified counter whenever an RMA read, atomic fetch, or ++ atomic compare operation is initiated from a remote endpoint that + targets the given endpoint. Use of this flag requires that the + endpoint be created using FI_RMA_EVENT. + + *FI_REMOTE_WRITE* +-: Increments the specified counter whenever an RMA write or ++: Increments the specified counter whenever an RMA write or base + atomic operation is initiated from a remote endpoint that targets + the given endpoint. Use of this flag requires that the + endpoint be created using FI_RMA_EVENT. +@@ -513,6 +514,35 @@ The following option levels and option names and parameters are defined. + the maximum size of the data that may be present as part of a connection + request event. This option is read only. + ++- *FI_OPT_BUFFERED_LIMIT - size_t* ++: Defines the maximum size of a buffered message that will be reported ++ to users as part of a receive completion when the FI_BUFFERED_RECV mode ++ is enabled on an endpoint. ++ ++ fi_getopt() will return the currently configured threshold, or the ++ provider's default threshold if one has not be set by the application. ++ fi_setopt() allows an application to configure the threshold. If the ++ provider cannot support the requested threshold, it will fail the ++ fi_setopt() call with FI_EMSGSIZE. Calling fi_setopt() with the ++ threshold set to SIZE_MAX will set the threshold to the maximum ++ supported by the provider. fi_getopt() can then be used to retrieve ++ the set size. ++ ++ In most cases, the sending and receiving endpoints must be ++ configured to use the same threshold value, and the threshold must be ++ set prior to enabling the endpoint. ++ ++- *FI_OPT_BUFFERED_MIN - size_t* ++: Defines the minimum size of a buffered message that will be reported. ++ Applications would set this to a size that's big enough to decide whether ++ to discard or claim a buffered receive or when to claim a buffered receive ++ on getting a buffered receive completion. The value is typically used by a ++ provider when sending a rendezvous protocol request where it would send ++ atleast FI_OPT_BUFFERED_MIN bytes of application data along with it. A smaller ++ sized renedezvous protocol message usually results in better latency for the ++ overall transfer of a large message. ++ ++ + ## fi_rx_size_left (DEPRECATED) + + This function has been deprecated and will be removed in a future version +@@ -753,7 +783,9 @@ For example, a mem_tag_format of 0x30FF indicates support for 14 + tagged bits, separated into 3 fields. The first field consists of + 2-bits, the second field 4-bits, and the final field 8-bits. Valid + masks for such a tagged field would be a bitwise OR'ing of zero or +-more of the following values: 0x3000, 0x0F00, and 0x00FF. ++more of the following values: 0x3000, 0x0F00, and 0x00FF. The provider ++may not validate the mask provided by the application for performance ++reasons. + + By identifying fields within a tag, a provider may be able to optimize + their search routines. An application which requests tag fields must +@@ -763,8 +795,9 @@ can request a specific number of fields of a given size. A provider + must return a tag format that supports the requested number of fields, + with each field being at least the size requested, or fail the + request. A provider may increase the size of the fields. When reporting +-completions (see FI_CQ_FORMAT_TAGGED), the provider must provide the +-exact value of the received tag, clearing out any unsupported tag bits. ++completions (see FI_CQ_FORMAT_TAGGED), it is not guaranteed that the ++provider would clear out any unsupported tag bits in the tag field of ++the completion entry. + + It is recommended that field sizes be ordered from smallest to + largest. A generic, unstructured tag and mask can be achieved by +@@ -1311,54 +1344,24 @@ value of transmit or receive context attributes of an endpoint. + + *FI_INJECT_COMPLETE* + : Indicates that a completion should be generated when the +- source buffer(s) may be reused. A completion guarantees that +- the buffers will not be read from again and the application may +- reclaim them. No other guarantees are made with respect to the +- state of the operation. +- +- Note: This flag is used to control when a completion entry is inserted +- into a completion queue. It does not apply to operations that do not +- generate a completion queue entry, such as the fi_inject operation, and +- is not subject to the inject_size message limit restriction. ++ source buffer(s) may be reused. See [`fi_cq`(3)](fi_cq.3.html) for ++ additional details on completion semantics. + + *FI_TRANSMIT_COMPLETE* + : Indicates that a completion should be generated when the transmit +- operation has completed relative to the local provider. The exact +- behavior is dependent on the endpoint type. +- +- For reliable endpoints: +- +- Indicates that a completion should be generated when the operation has +- been delivered to the peer endpoint. A completion guarantees that the +- operation is no longer dependent on the fabric or local resources. The +- state of the operation at the peer endpoint is not defined. +- +- For unreliable endpoints: +- +- Indicates that a completion should be generated when the operation has +- been delivered to the fabric. A completion guarantees that the +- operation is no longer dependent on local resources. The state of the +- operation within the fabric is not defined. ++ operation has completed relative to the local provider. See ++ [`fi_cq`(3)](fi_cq.3.html) for additional details on completion semantics. + + *FI_DELIVERY_COMPLETE* +-: Indicates that a completion should not be generated until an operation +- has been processed by the destination endpoint(s). A completion +- guarantees that the result of the operation is available. +- +- This completion mode applies only to reliable endpoints. For operations +- that return data to the initiator, such as RMA read or atomic-fetch, +- the source endpoint is also considered a destination endpoint. This is the +- default completion mode for such operations. ++: Indicates that a completion should be generated when the operation has been ++ processed by the destination endpoint(s). See [`fi_cq`(3)](fi_cq.3.html) ++ for additional details on completion semantics. + + *FI_COMMIT_COMPLETE* + : Indicates that a completion should not be generated (locally or at the + peer) until the result of an operation have been made persistent. +- A completion guarantees that the result is both available and durable, +- in the case of power failure. +- +- This completion mode applies only to operations that target persistent +- memory regions over reliable endpoints. This completion mode is +- experimental. ++ See [`fi_cq`(3)](fi_cq.3.html) for additional details on completion ++ semantics. + + *FI_MULTICAST* + : Indicates that data transfers will target multicast addresses by default. +@@ -1427,6 +1430,7 @@ Fabric errno values are defined in `rdma/fi_errno.h`. + + [`fi_getinfo`(3)](fi_getinfo.3.html), + [`fi_domain`(3)](fi_domain.3.html), ++[`fi_cq`(3)](fi_cq.3.html) + [`fi_msg`(3)](fi_msg.3.html), + [`fi_tagged`(3)](fi_tagged.3.html), + [`fi_rma`(3)](fi_rma.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_fabric.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_fabric.3.md +index 5ff66b1..bb3aa0a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_fabric.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_fabric.3.md +@@ -70,7 +70,7 @@ values for the datatype are listed below, along with the corresponding + datatype or field value. + + *FI_TYPE_INFO* +-: struct fi_info ++: struct fi_info, including all substructures and fields + + *FI_TYPE_EP_TYPE* + : struct fi_info::type field +@@ -99,25 +99,51 @@ datatype or field value. + *FI_TYPE_FABRIC_ATTR* + : struct fi_fabric_attr + +-*FI_TYPE_DOMAIN_CAP* +-: struct fi_info::domain_cap field +- + *FI_TYPE_THREADING* + : enum fi_threading + + *FI_TYPE_PROGRESS* + : enum fi_progress + +-*FI_TYPE_PROTO* ++*FI_TYPE_PROTOCOL* + : struct fi_ep_attr::protocol field + + *FI_TYPE_MSG_ORDER* + : struct fi_ep_attr::msg_order field + ++*FI_TYPE_MODE* ++: struct fi_info::mode field ++ ++*FI_TYPE_AV_TYPE* ++: enum fi_av_type ++ ++*FI_TYPE_ATOMIC_TYPE* ++: enum fi_datatype ++ ++*FI_TYPE_ATOMIC_OP* ++: enum fi_op ++ + *FI_TYPE_VERSION* + : Returns the library version of libfabric in string form. The data + parameter is ignored. + ++*FI_TYPE_EQ_EVENT* ++: uint32_t event parameter returned from fi_eq_read(). See `fi_eq(3)` ++ for a list of known values. ++ ++*FI_TYPE_CQ_EVENT_FLAGS* ++: uint64_t flags field in fi_cq_xxx_entry structures. See `fi_cq(3)` ++ for valid flags. ++ ++*FI_TYPE_MR_MODE* ++: struct fi_domain_attr::mr_mode flags ++ ++*FI_TYPE_OP_TYPE* ++: enum fi_op_type ++ ++*FI_TYPE_FID* ++: struct fid * ++ + fi_tostr() will return a pointer to an internal libfabric buffer that + should not be modified, and will be overwritten the next time + fi_tostr() is invoked. fi_tostr() is not thread safe. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_getinfo.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_getinfo.3.md +index 6511b45..ce09163 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_getinfo.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_getinfo.3.md +@@ -133,6 +133,7 @@ struct fi_info { + struct fi_ep_attr *ep_attr; + struct fi_domain_attr *domain_attr; + struct fi_fabric_attr *fabric_attr; ++ struct fid_nic *nic; + }; + ``` + +@@ -183,15 +184,15 @@ struct fi_info { + that any returned address is only usable locally. + + *handle - provider context handle* +-: References a provider specific handle. The use of this field +- is operation specific. Unless its use is described for a given operation, +- the handle field must be NULL. It is commonly used by applications +- that make use of connection-oriented endpoints. For other applications, +- the field should usually be NULL. +- +- This field is used when processing connection requests and +- responses. It is also used to inherit endpoint's attributes. +- See fi_eq(3), fi_reject(3), and fi_endpoint(3) . ++: The use of this field is operation specific. If hints->handle is set to struct ++ fid_pep, the hints->handle will be copied to info->handle on output from ++ fi_getinfo. Other values of hints->handle will be handled in a provider ++ specific manner. The fi_info::handle field is also used by fi_endpoint() ++ and fi_reject() calls when processing connection requests or to inherit ++ another endpoint's attributes. See [`fi_eq`(3)](fi_eq.3.html), ++ [`fi_reject`(3)](fi_reject.3.html), and ++ [`fi_endpoint`(3)](fi_endpoint.3.html). The info->handle field will be ++ ignored by fi_dupinfo and fi_freeinfo. + + *tx_attr - transmit context attributes* + : Optionally supplied transmit context attributes. Transmit context +@@ -215,7 +216,7 @@ struct fi_info { + hints, requested values of struct fi_ep_attr should be set. On + output, the actual endpoint attributes that can be provided will be + returned. Output values will be greater than or equal to requested +- input values. See fi_endpoint(3) for details. ++ input values. See [`fi_endpoint`(3)](fi_endpoint.3.html) for details. + + *domain_attr - domain attributes* + : Optionally supplied domain attributes. Domain attributes may be +@@ -223,14 +224,21 @@ struct fi_info { + hints, requested values of struct fi_domain_attr should be set. On + output, the actual domain attributes that can be provided will be + returned. Output values will be greater than or equal to requested +- input values. See fi_domain(3) for details. ++ input values. See [`fi_domain`(3)](fi_domain.3.html) for details. + + *fabric_attr - fabric attributes* + : Optionally supplied fabric attributes. Fabric attributes may be + specified and returned as part of fi_getinfo. When provided as + hints, requested values of struct fi_fabric_attr should be set. On + output, the actual fabric attributes that can be provided will be +- returned. See fi_fabric(3) for details. ++ returned. See [`fi_fabric`(3)](fi_fabric.3.html) for details. ++ ++*nic - network interface details* ++: Optional attributes related to the hardware NIC associated with ++ the specified fabric, domain, and endpoint data. This field is ++ only valid for providers where the corresponding attributes are ++ closely associated with a hardware NIC. See [`fi_nic`(3)] ++ (fi_nic.3.html) for details. + + # CAPABILITIES + +@@ -402,6 +410,16 @@ additional optimizations. + completion semantics. This flag requires that FI_RMA be set. + This capability is experimental. + ++*FI_VARIABLE_MSG* ++ ++: Requests that the provider must notify a receiver when a variable ++ length message is ready to be received prior to attempting to place ++ the data. Such notification will include the size of the message and ++ any associated message tag (for FI_TAGGED). See 'Variable Length ++ Messages' in fi_msg.3 for full details. Variable length messages ++ are any messages larger than an endpoint configurable size. This ++ flag requires that FI_MSG and/or FI_TAGGED be set. ++ + Capabilities may be grouped into two general categories: primary and + secondary. Primary capabilities must explicitly be requested by an + application, and a provider must enable support for only those primary +@@ -413,7 +431,7 @@ would not compromise performance or security. + + Primary capabilities: FI_MSG, FI_RMA, FI_TAGGED, FI_ATOMIC, FI_MULTICAST, + FI_NAMED_RX_CTX, FI_DIRECTED_RECV, FI_READ, FI_WRITE, FI_RECV, FI_SEND, +-FI_REMOTE_READ, and FI_REMOTE_WRITE. ++FI_REMOTE_READ, FI_REMOTE_WRITE, and FI_VARIABLE_MSG. + + Secondary capabilities: FI_MULTI_RECV, FI_SOURCE, FI_RMA_EVENT, FI_SHARED_AV, + FI_TRIGGER, FI_FENCE, FI_LOCAL_COMM, FI_REMOTE_COMM, FI_SOURCE_ERR, FI_RMA_PMEM. +@@ -537,14 +555,25 @@ supported set of modes will be returned in the info structure(s). + completion flags which simply report the type of operation that + completed (e.g. send or receive) may not be set. However, + completion flags that are used for remote notifications will still +- be set when applicable. See `fi_cq`(3) for details on which completion +- flags are valid when this mode bit is enabled. ++ be set when applicable. See [`fi_cq`(3)](fi_cq.3.html) for details on ++ which completion flags are valid when this mode bit is enabled. + + *FI_RESTRICTED_COMP* + : This bit indicates that the application will only share completion queues + and counters among endpoints, transmit contexts, and receive contexts that + have the same set of capability flags. + ++*FI_BUFFERED_RECV* ++: The buffered receive mode bit indicates that the provider owns the ++ data buffer(s) that are accessed by the networking layer for received ++ messages. Typically, this implies that data must be copied from the ++ provider buffer into the application buffer. Applications that can ++ handle message processing from network allocated data buffers can set ++ this mode bit to avoid copies. For full details on application ++ requirements to support this mode, see the 'Buffered Receives' section ++ in [`fi_msg`(3)](fi_msg.3.html). This mode bit applies to FI_MSG and ++ FI_TAGGED receive operations. ++ + # ADDRESSING FORMATS + + Multiple fabric interfaces take as input either a source or +@@ -556,7 +585,7 @@ field indicates the expected address format for these operations. + A provider may support one or more of the following addressing + formats. In some cases, a selected addressing format may need to be + translated or mapped into an address which is native to the +-fabric. See `fi_av`(3). ++fabric. See [`fi_av`(3)](fi_av.3.html). + + *FI_FORMAT_UNSPEC* + : FI_FORMAT_UNSPEC indicates that a provider specific address format +@@ -685,4 +714,5 @@ Multiple threads may call + + [`fi_open`(3)](fi_open.3.html), + [`fi_endpoint`(3)](fi_endpoint.3.html), +-[`fi_domain`(3)](fi_domain.3.html) ++[`fi_domain`(3)](fi_domain.3.html), ++[`fi_nic`(3)](fi_nic.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_gni.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_gni.7.md +index 13676f9..b48340b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_gni.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_gni.7.md +@@ -316,7 +316,7 @@ parsed and converted to FI_ADDR_GNI for use within the GNI provider. + *FI_ADDR_STR* is formatted as follows: + gni;node;service;GNIX_AV_STR_ADDR_VERSION;device_addr;cdm_id;name_type;cm_nic_cdm_id;cookie;rx_ctx_cnt;key_offset + +-The GNI provider sets the domain attribute *cntr_cnt* to the the CQ limit divided by 2. ++The GNI provider sets the domain attribute *cntr_cnt* to the CQ limit divided by 2. + + The GNI provider sets the domain attribute *cq_cnt* to the CQ limit divided by 2. + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_hook.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_hook.7.md +new file mode 100644 +index 0000000..8ab7261 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_hook.7.md +@@ -0,0 +1,71 @@ ++--- ++layout: page ++title: fi_hook(7) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_hook \- The Hook Fabric Provider Utility ++ ++# OVERVIEW ++ ++The hooking provider is a utility function that can intercept calls to any ++provider. The hook provider is always available, but has zero impact on ++calls unless enabled. It is useful for providing performance data on ++selected calls or debugging information. ++ ++# SUPPORTED FEATURES ++ ++Hooking support is enabled through the FI_HOOK environment variable. To ++enable hooking, FI_HOOK must be set to the name of one or more of the ++available hooking providers. When multiple hooks are specified, the ++names must be separated by a semi-colon. To obtain a list of hooking ++providers available on the current system, one can use the fi_info ++utility with the '--env' command line option. Hooking providers are ++usually identified by 'hook' appearing in the provider name. ++ ++Known hooking providers include the following: ++ ++*ofi_perf_hook* ++: This hooks 'fast path' data operation calls. Performance data is ++ captured on call entrance and exit, in order to provide an average of ++ how long each call takes to complete. See the PERFORMANCE HOOKS section ++ for available performance data. ++ ++# PERFORMANCE HOOKS ++ ++The hook provider allows capturing inline performance data by accessing the ++CPU Performance Management Unit (PMU). PMU data is only available on Linux ++systems. Additionally, access to PMU data may be restricted to privileged ++(super-user) applications. ++ ++Performance data is captured for critical data transfer calls: ++fi_msg, fi_rma, fi_tagged, fi_cq, and fi_cntr. Captured data is displayed ++as logged data using the FI_LOG_LEVEL trace level. Performance data is ++logged when the associated fabric is destroyed. ++ ++The environment variable FI_PERF_CNTR is used to identify which performance ++counter is tracked. The following counters are available: ++ ++*cpu_cycles* ++: Counts the number of CPU cycles each function takes to complete. ++ ++*cpu_instr* ++: Counts the number of CPU instructions each function takes to complete. ++ This is the default performance counter if none is specified. ++ ++# LIMITATIONS ++ ++Hooking functionality is not available for providers built using the ++FI_FABRIC_DIRECT feature. That is, directly linking to a provider prevents ++hooking. ++ ++The hooking provider does not work with triggered operations. Application ++that use FI_TRIGGER operations that attempt to hook calls will likely crash. ++ ++# SEE ALSO ++ ++[`fabric`(7)](fabric.7.html), ++[`fi_provider`(7)](fi_provider.7.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mlx.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mlx.7.md +index ba3bdb5..c6688eb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mlx.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mlx.7.md +@@ -49,6 +49,22 @@ Unsupported features + + # RUNTIME PARAMETERS + ++*FI_MLX_CONFIG* ++: The path to the MLX configuration file (default: none). ++ ++*FI_MLX_TINJECT_LIMIT* ++: Maximal tinject message size (default: 1024). ++ ++*FI_MLX_NS_ENABLE* ++: Enforce usage of name server functionality for MLX provider ++ (default: disabled). ++ ++*FI_MLX_NS_PORT* ++: MLX provider's name server port (default: 12345). ++ ++*FI_MLX_NS_IFACE* ++: IPv4 network interface for MLX provider's name server ++ (default: any). + + # SEE ALSO + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mr.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mr.3.md +index 7a0aaae..20cbcae 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mr.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mr.3.md +@@ -361,6 +361,13 @@ this routine. Use of this call is required if the FI_RAW_MR mode bit has + been set by the provider; however, it is safe to use this call with any + memory region. + ++On input, the key_size parameter should indicate the size of the raw_key ++buffer. If the actual key is larger than what can fit into the buffer, it ++will return -FI_ETOOSMALL. On output, key_size is set to the size of the ++buffer needed to store the key, which may be larger than the input value. ++The needed key_size can also be obtained through the mr_key_size domain ++attribute (fi_domain_attr) field. ++ + A raw key must be mapped by a peer before it can be used in data transfer + operations. See fi_mr_map_raw below. + +@@ -440,6 +447,7 @@ struct fi_mr_attr { + const struct iovec *mr_iov; + size_t iov_count; + uint64_t access; ++ uint64_t offset; + uint64_t requested_key; + void *context; + size_t auth_key_size; +@@ -487,6 +495,10 @@ bitwise OR of the following flags: + : The memory buffer may be used as the target buffer of an RMA write + or atomic operation. + ++## offset ++ ++The offset field is reserved for future use and must be 0. ++ + ## requested_key + + An application specified access key associated with the memory region. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mrail.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mrail.7.md +new file mode 100644 +index 0000000..6c12cab +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mrail.7.md +@@ -0,0 +1,87 @@ ++--- ++layout: page ++title: fi_mrail(7) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_mrail \- The Multi-Rail Utility Provider ++ ++# OVERVIEW ++ ++The mrail provider (ofi_mrail) is an utility provider that layers over an underlying ++provider to enable the use of multiple network ports (rails). This increases ++the total available bandwidth of an underlying proivder. The current status of ++mrail provider is experimental - not all libfabric features are supported and ++performance is not guaranteed. ++ ++# REQUIREMENTS ++ ++## Requirements for underlying provider ++ ++mrail provider requires the underlying provider to support the following ++capabilities / modes: ++ ++ * Buffered receive (FI_BUFFERED_RECV) ++ ++ * FI_SOURCE ++ ++ * FI_AV_TABLE ++ ++## Requirements for applications ++ ++Applications need to: ++ * Support FI_MR_RAW MR mode bit to make use of FI_RMA capability. ++ * Set FI_OFI_MRAIL_ADDR_STRC env variable (see RUNTIME PARAMETERS section below). ++ ++# SUPPORTED FEATURES ++ ++*Endpoint types* ++: The provider supports only *FI_EP_RDM*. ++ ++*Endpoint capabilities* ++: The following data transfer interface is supported: *FI_MSG*, *FI_TAGGED*, *FI_RMA*. ++ ++# LIMITATIONS ++ ++: Limitations of the underlying provider may show up as that of mrail provider. ++: mrail provider doesn't allow pass-through of any mode bits to the underlying ++ provider. ++ ++## Unsupported features ++ ++The following are the major libfabric features that are not supported. Any other ++feature not listed in "Supported features" can be assumed as unsupported. ++ ++ * FI_ATOMIC ++ ++ * Scalable endpoints ++ ++ * Shared contexts ++ ++ * FABRIC_DIRECT ++ ++ * Multicast ++ ++ * Triggered operations ++ ++# FUNCTIONALITY OVERVIEW ++ ++For messages (FI_MSG, FI_TAGGED), the provider sends one message per rail in a ++round-robin manner. Ordering is guaranteed through the use of sequence numbers. ++For RMA, the data is striped equally across all rails. ++ ++# RUNTIME PARAMETERS ++ ++The ofi_mrail provider checks for the following environment variables. ++ ++*FI_OFI_MRAIL_ADDR_STRC* ++: Comma delimited list of individual rail addresses in FI_ADDR_STR format. ++ ++# SEE ALSO ++ ++[`fabric`(7)](fabric.7.html), ++[`fi_provider`(7)](fi_provider.7.html), ++[`fi_getinfo`(3)](fi_getinfo.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_msg.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_msg.3.md +index 146fa76..e12b3c1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_msg.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_msg.3.md +@@ -90,7 +90,9 @@ ssize_t fi_injectdata(struct fid_ep *ep, const void *buf, size_t len, + : Additional flags to apply for the send or receive operation. + + *context* +-: User specified pointer to associate with the operation. ++: User specified pointer to associate with the operation. This parameter is ++ ignored if the operation will not generate a successful completion, unless ++ an op flag specifies the context parameter be used for required input. + + # DESCRIPTION + +@@ -161,7 +163,7 @@ struct fi_msg { + The send inject call is an optimized version of fi_send. The + fi_inject function behaves as if the FI_INJECT transfer flag were + set, and FI_COMPLETION were not. That is, the data buffer is +-available for reuse immediately on returning from from fi_inject, and ++available for reuse immediately on returning from fi_inject, and + no completion event will be generated for this send. The completion + event will be suppressed even if the CQ was bound without + FI_SELECTIVE_COMPLETION or the endpoint's op_flags contain +@@ -220,12 +222,24 @@ fi_sendmsg. + request. See fi_getinfo for additional details on + FI_REMOTE_CQ_DATA. + ++*FI_CLAIM* ++: Applies to posted receive operations for endpoints configured ++ for FI_BUFFERED_RECV or FI_VARIABLE_MSG. This flag is used to ++ retrieve a message that was buffered by the provider. See the ++ Buffered Receives section for details. ++ + *FI_COMPLETION* + : Indicates that a completion entry should be generated for the + specified operation. The endpoint must be bound to a completion + queue with FI_SELECTIVE_COMPLETION that corresponds to the + specified operation, or this flag is ignored. + ++*FI_DISCARD* ++: Applies to posted receive operations for endpoints configured ++ for FI_BUFFERED_RECV or FI_VARIABLE_MSG. This flag is used to ++ free a message that was buffered by the provider. See the ++ Buffered Receives section for details. ++ + *FI_MORE* + : Indicates that the user has additional requests that will + immediately be posted after the current call returns. Use of this +@@ -288,6 +302,114 @@ fi_sendmsg. + be used in all multicast transfers, in conjunction with a multicast + fi_addr_t. + ++# Buffered Receives ++ ++Buffered receives indicate that the networking layer allocates and ++manages the data buffers used to receive network data transfers. As ++a result, received messages must be copied from the network buffers ++into application buffers for processing. However, applications can ++avoid this copy if they are able to process the message in place ++(directly from the networking buffers). ++ ++Handling buffered receives differs based on the size of the message ++being sent. In general, smaller messages are passed directly to the ++application for processing. However, for large messages, an application ++will only receive the start of the message and must claim the rest. ++The details for how small messages are reported and large messages may ++be claimed are described below. ++ ++When a provider receives a message, it will write an entry to the completion ++queue associated with the receiving endpoint. For discussion purposes, ++the completion queue is assumed to be configured for FI_CQ_FORMAT_DATA. ++Since buffered receives are not associated with application posted buffers, ++the CQ entry op_context will point to a struct fi_recv_context. ++ ++{% highlight c %} ++struct fi_recv_context { ++ struct fid_ep *ep; ++ void *context; ++}; ++{% endhighlight %} ++ ++The 'ep' field will point to the receiving endpoint or Rx context, and ++'context' will be NULL. The CQ entry's 'buf' will point to a provider ++managed buffer where the start of the received message is located, and ++'len' will be set to the total size of the message. ++ ++The maximum sized message that a provider can buffer is limited by ++an FI_OPT_BUFFERED_LIMIT. This threshold can be obtained and may be adjusted ++by the application using the fi_getopt and fi_setopt calls, respectively. ++Any adjustments must be made prior to enabling the endpoint. The CQ entry 'buf' ++will point to a buffer of received data. If the sent message is larger than the ++buffered amount, the CQ entry 'flags' will have the FI_MORE bit set. When the ++FI_MORE bit is set, 'buf' will reference at least FI_OPT_BUFFERED_MIN bytes ++of data (see fi_endpoint.3 for more info). ++ ++After being notified that a buffered receive has arrived, ++applications must either claim or discard the message. Typically, ++small messages are processed and discarded, while large messages ++are claimed. However, an application is free to claim or discard any ++message regardless of message size. ++ ++To claim a message, an application must post a receive operation with the ++FI_CLAIM flag set. The struct fi_recv_context returned as part of the ++notification must be provided as the receive operation's context. The ++struct fi_recv_context contains a 'context' field. Applications may ++modify this field prior to claiming the message. When the claim ++operation completes, a standard receive completion entry will be ++generated on the completion queue. The 'context' of the associated ++CQ entry will be set to the 'context' value passed in through ++the fi_recv_context structure, and the CQ entry flags will have the ++FI_CLAIM bit set. ++ ++Buffered receives that are not claimed must be discarded by the application ++when it is done processing the CQ entry data. To discard a message, an ++application must post a receive operation with the FI_DISCARD flag set. ++The struct fi_recv_context returned as part of the notification must be ++provided as the receive operation's context. When the FI_DISCARD flag is set ++for a receive operation, the receive input buffer(s) and length parameters ++are ignored. ++ ++IMPORTANT: Buffered receives must be claimed or discarded in a timely manner. ++Failure to do so may result in increased memory usage for network buffering ++or communication stalls. Once a buffered receive has been claimed or ++discarded, the original CQ entry 'buf' or struct fi_recv_context data may no ++longer be accessed by the application. ++ ++The use of the FI_CLAIM and FI_DISCARD operation flags is also ++described with respect to tagged message transfers in fi_tagged.3. ++Buffered receives of tagged messages will include the message tag as part ++of the CQ entry, if available. ++ ++The handling of buffered receives follows all message ordering ++restrictions assigned to an endpoint. For example, completions ++may indicate the order in which received messages arrived at the ++receiver based on the endpoint attributes. ++ ++# Variable Length Messages ++ ++Variable length messages, or simply variable messages, are transfers ++where the size of the message is unknown to the receiver prior to the ++message being sent. It indicates that the recipient of a message does ++not know the amount of data to expect prior to the message arriving. ++It is most commonly used when the size of message transfers varies ++greatly, with very large messages interspersed with much smaller ++messages, making receive side message buffering difficult to manage. ++Variable messages are not subject to max message length ++restrictions (i.e. struct fi_ep_attr::max_msg_size limits), and may ++be up to the maximum value of size_t (e.g. SIZE_MAX) in length. ++ ++Variable length messages support requests that the provider allocate and ++manage the network message buffers. As a result, the application ++requirements and provider behavior is identical as those defined ++for supporting the FI_BUFFERED_RECV mode bit. See the Buffered ++Receive section above for details. The main difference is that buffered ++receives are limited by the fi_ep_attr::max_msg_size threshold, whereas ++variable length messages are not. ++ ++Support for variable messages is indicated through the FI_VARIABLE_MSG ++capability bit. ++ + # NOTES + + If an endpoint has been configured with FI_MSG_PREFIX, the application +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_nic.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_nic.3.md +new file mode 100644 +index 0000000..dcdfef9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_nic.3.md +@@ -0,0 +1,158 @@ ++--- ++layout: page ++title: fi_nic(3) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_nic \- Fabric network interface card attributes ++ ++# NETWORK INTERFACE CARD ATTRIBUTES ++ ++The fid_nic structure defines attributes for a struct fi_info that ++is directly associated with underlying networking hardware and may ++be returned directly from calling [`fi_getinfo`(3)](fi_getinfo.3.html). ++The format of fid_nic and the related substructures are defined below. ++ ++Note that not all fields of all structures may be available. Unavailable ++or fields that are not applicable to the indicated device will be set to ++NULL or 0. ++ ++```c ++struct fid_nic { ++ struct fid fid; ++ struct fi_device_attr *device_attr; ++ struct fi_bus_attr *bus_attr; ++ struct fi_link_attr *link_attr; ++ void *prov_attr; ++}; ++ ++struct fi_device_attr { ++ char *name; ++ char *device_id; ++ char *device_version; ++ char *vendor_id; ++ char *driver; ++ char *firmware; ++}; ++ ++struct fi_pci_attr { ++ uint16_t domain_id; ++ uint8_t bus_id; ++ uint8_t device_id; ++ uint8_t function_id; ++}; ++ ++struct fi_bus_attr { ++ enum fi_bus_type bus_type; ++ union { ++ struct fi_pci_attr pci; ++ } attr; ++}; ++ ++struct fi_link_attr { ++ char *address; ++ size_t mtu; ++ size_t speed; ++ enum fi_link_state state; ++ char *network_type; ++}; ++ ++``` ++ ++## Device Attributes ++ ++Device attributes are used to identify the specific virtual or hardware ++NIC associated with an fi_info structure. ++ ++*name* ++: The operating system name associated with the device. This may be a ++ logical network interface name (e.g. eth0 or eno1) or an absolute ++ filename. ++ ++*device_id* ++: This is a vendor specific identifier for the device or product. ++ ++*device_version* ++: Indicates the version of the device. ++ ++*vendor_id* ++: Indicates the name of the vendor that distributes the NIC. ++ ++*driver* ++: The name of the driver associated with the device ++ ++*firmware* ++: The device's firmware version. ++ ++## Bus Attributes ++ ++The bus attributes are used to identify the physical location of the NIC in ++the system. ++ ++*bus_type* ++: Indicates the type of system bus where the NIC is located. Valid values ++ are FI_BUS_PCI or FI_BUS_UNKNOWN. ++ ++*attr.pci.domain_id* ++: The domain where the PCI bus is located. Valid only if bus_type is ++ FI_BUS_PCI. ++ ++*attr.pci.bus_id* ++: The PCI bus identifier where the device is located. Valid only if ++ bus_type is FI_BUS_PCI. ++ ++*attr.pci.device_id* ++: The identifier on the PCI bus where the device is located. Valid only ++ if bus_type is FI_BUS_PCI. ++ ++*attr.pci.function_id* ++: The function on the device being referenced. Valid only if bus_type is ++ FI_BUS_PCI. ++ ++## Link Attributes ++ ++Link attributes describe low-level details about the network connection ++into the fabric. ++ ++*address* ++: The primary link-level address associated with the NIC, such as a MAC ++ address. If multiple addresses are available, only one will be reported. ++ ++*mtu* ++: The maximum transfer unit of link level frames or packets, in bytes. ++ ++*speed* ++: The active link data rate, given in bits per second. ++ ++*state* ++: The current physical port state. Possible values are FI_LINK_UNKNOWN, ++ FI_LINK_DOWN, and FI_LINK_UP, to indicate if the port state is unknown ++ or not applicable (unknown), inactive (down), or active (up). ++ ++*network_type* ++: Specifies the type of network interface currently active, such as ++ Ethernet or InfiniBand. ++ ++## Provider Attributes ++ ++Provider attributes reference provider specific details of the device. ++These attributes are both provider and device specific. The attributes ++can be interpretted by [`fi_tostr`(3)](fi_tostr.3.html). Applications ++may also use the other attribute fields, such as related fi_fabric_attr: ++prov_name field, to determine an appropriate structure to cast the ++attributes. The format and definition of this field is outside the ++scope of the libfabric core framework, but may be available as part ++of a provider specific header file included with libfabric package. ++ ++# NOTES ++ ++The fid_nic structure is returned as part of a call to ++[`fi_getinfo`(3)](fi_getinfo.3.html). It is automatically freed as part ++of calling [`fi_freeinfo`(3)](fi_freeinfo.3.html) ++ ++# SEE ALSO ++ ++[`fi_getinfo`(3)](fi_getinfo.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_provider.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_provider.7.md +index f20545d..b8e795e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_provider.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_provider.7.md +@@ -65,6 +65,17 @@ This distribution of libfabric contains the following providers + endpoints emulated over MSG endpoints of a core provider. + See [`fi_rxm`(7)](fi_rxm.7.html) for more information. + ++## Special providers ++ ++*Hook* ++: The hook provider is a special type of provider that can layer over any ++ other provider, unless FI_FABRIC_DIRECT is used. The hook provider is ++ always available, but has no impact unless enabled. When enabled, the ++ hook provider will intercept all calls to the underlying core or utility ++ provider(s). The hook provider is useful for capturing performance data ++ or providing debugging information, even in release builds of the library. ++ See [`fi_hook`(7)](fi_hook.7.html) for more information. ++ + # CORE VERSUS UTILITY PROVIDERS + + Core providers implement the libfabric interfaces directly over low-level +@@ -194,6 +205,7 @@ Logging is performed using the FI_ERR, FI_LOG, and FI_DEBUG macros. + # SEE ALSO + + [`fi_gni`(7)](fi_gni.7.html), ++[`fi_hook`(7)](fi_hook.7.html), + [`fi_psm`(7)](fi_psm.7.html), + [`fi_sockets`(7)](fi_sockets.7.html), + [`fi_usnic`(7)](fi_usnic.7.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_psm2.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_psm2.7.md +index f5bc455..11ec9f4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_psm2.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_psm2.7.md +@@ -155,6 +155,11 @@ The *psm2* provider checks for the following environment variables: + + The default setting is 5. + ++*FI_PSM2_CONN_TIMEOUT* ++: Timeout (seconds) for establishing connection between two PSM endpoints. ++ ++ The default setting is 5. ++ + *FI_PSM2_PROG_INTERVAL* + : When auto progress is enabled (asked via the hints to *fi_getinfo*), + a progress thread is created to make progress calls from time to time. +@@ -195,17 +200,19 @@ The *psm2* provider checks for the following environment variables: + The default setting is 2. + + *FI_PSM2_LAZY_CONN* +-: Control when connections are established between PSM2 endpoints that OFI +- endpoints are built on top of. When set to 0, connections are established +- when addresses are inserted into the address vector. This is the eager +- connection mode. When set to 1, connections are established when addresses +- are used the first time in communication. This is the lazy connection mode. +- +- Lazy connection mode may reduce the start-up time on large systems at the +- expense of slightly higher data path overhead. For applications that use +- multiple endpoints, lazy connection mode can be especially helpful with +- the potential of greatly reduce the time to set up address vectors and to +- close endpoints. ++: There are two strategies on when to establish connections between the PSM2 ++ endpoints that OFI endpoints are built on top of. In eager connection mode, ++ connections are established when addresses are inserted into the address ++ vector. In lazy connection mode, connections are established when addresses ++ are used the first time in communication. Eager connection mode has slightly ++ lower critical path overhead but lazy connection mode scales better. ++ ++ This option controls how the two connection modes are used. When set to 1, ++ lazy connection mode is always used. When set to 0, eager connection mode ++ is used when required conditions are all met and lazy connection mode is ++ used otherwise. The conditions for eager connection mode are: (1) multiple ++ endpoint (and scalable endpoint) support is disabled by explicitly setting ++ PSM2_MULTI_EP=0; and (2) the address vector type is FI_AV_MAP. + + The default setting is 0. + +@@ -229,7 +236,7 @@ The *psm2* provider checks for the following environment variables: + available: *tag60* means 32-4-60 partitioning for CQ data, internal protocol + flags, and application tag. *tag64* means 4-28-64 partitioning for internal + protocol flags, CQ data, and application tag. *auto* means to choose either +- *tag60* or *tag64* based on the the hints passed to fi_getinfo -- *tag60* is used ++ *tag60* or *tag64* based on the hints passed to fi_getinfo -- *tag60* is used + if remote CQ data support is requested explicitly, either by passing non-zero value + via *hints->domain_attr->cq_data_size* or by including *FI_REMOTE_CQ_DATA* in + *hints->caps*, otherwise *tag64* is used. If *tag64* is the result of automatic +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rma.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rma.3.md +index 04eca19..1072b4f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rma.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rma.3.md +@@ -101,7 +101,9 @@ ssize_t fi_inject_writedata(struct fid_ep *ep, const void *buf, size_t len, + : Additional flags to apply for the read or write operation. + + *context* +-: User specified pointer to associate with the operation. ++: User specified pointer to associate with the operation. This parameter is ++ ignored if the operation will not generate a successful completion, unless ++ an op flag specifies the context parameter be used for required input. + + # DESCRIPTION + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rstream.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rstream.7.md +new file mode 100644 +index 0000000..9b58e60 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rstream.7.md +@@ -0,0 +1,86 @@ ++--- ++layout: page ++title: fi_rstream(7) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_rstream ++ ++# OVERVIEW ++ ++The rstream provider supports stream messaging over ++ message based RMA. It maps stream to message over ++ a core RMA-based OFI provider. Only Endpoints and EQs ++ are needed for connection start-up and messaging. Unlike other ++ OFI providers, rstream does not support CQs or memory registration ++ of any kind. In order to asynchronously wait for a completion (cm/msg), ++ one can use fi_control on the endpoint/eq to get an fd to use in a poll call. ++ For messaging completions, use FI_PEEK on send/recv after poll to see what type of ++ transaction has transpired. ++ ++# SUPPORTED FEATURES ++ ++The rstream provider currently supports *FI_MSG* capabilities. ++ ++*Endpoint types* ++: The provider supports only endpoint type *FI_EP_SOCK_STREAM*. ++ ++*Endpoint capabilities* : The following data transfer interface is ++supported: *fi_msg*. ++ ++*Modes* ++: The provider does not require the use of any mode bits but supports ++ core providers that require FI_CONTEXT and FI_RX_CQ_DATA. ++ ++*Progress* ++: The rstream provider only supports *FI_PROGRESS_MANUAL*. ++ ++*Threading Model* ++: The provider supports FI_THREAD_SAFE ++ ++*Verbs-iWarp* ++: The provider has added features to enable iWarp. To use this feature, the ep protocol ++ IWARP must be requested in a getinfo call. ++ ++# LIMITATIONS ++ ++The rstream provider is experimental and lacks performance validation and ++ extensive testing. The iWarp protocol may need extra initialization work to re-enable. ++ Currently the rstream provider is used to by the rsockets-OFI library as a ULP and ++ hooks into the core provider verbs. It is not interoperable with the previous rsockets(v1) ++ protocol. There are default settings that limit the message stream (provider ++ memory region size and CQ size). These can be modified by fi_setopt. ++ ++ ++ ++# SETTINGS ++ ++The *rstream* provider settings can be modified via fi_setopt on the ++ endpoint (FI_OPT_ENDPOINT) along with the following parameters: ++ ++*FI_OPT_SEND_BUF_SIZE* ++: Size of the send buffer. Default is 32KB. ++ ++*FI_OPT_RECV_BUF_SIZE* ++: Size of the recv buffer. Default is 32KB. ++ ++*FI_OPT_TX_SIZE* ++: Size of the send queue. Default is 384. ++ ++*FI_OPT_RX_SIZE* ++: Size of the recv queue. Default is 384. ++ ++# OFI EXTENSIONS ++ ++The rstream provider has extended the current OFI API set in order to enable a ++ user implemenation of Poll. Specifically sendmsg(FI_PEEK) is supported which replicates ++ the behavior of the recvmsg(FI_PEEK) feature. ++ ++# SEE ALSO ++ ++[`fabric`(7)](fabric.7.html), ++[`fi_provider`(7)](fi_provider.7.html), ++[`fi_getinfo`(3)](fi_getinfo.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxd.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxd.7.md +index bfa2ca6..40e31cb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxd.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxd.7.md +@@ -16,23 +16,20 @@ emulated over a base DGRAM provider. + + # SUPPORTED FEATURES + +-The RxD provider currently supports *FI_MSG*, *FI_TAGGED* and *FI_RMA* +-capabilities. It requires the base DGRAM provider to support *FI_MSG* +-capabilities. ++The RxD provider currently supports *FI_MSG* capabilities. + + *Endpoint types* + : The provider supports only endpoint type *FI_EP_RDM*. + + *Endpoint capabilities* : The following data transfer interface is +-supported: *fi_msg*, *fi_tagged* and *fi_rma*. ++supported: *fi_msg*. + + *Modes* +-: The provider does not require the use of any mode bits. ++: The provider does not require the use of any mode bits but supports ++ core DGRAM providers that require FI_CONTEXT and FI_MSG_PREFIX. + + *Progress* +-: The RxD provider supports both *FI_PROGRESS_AUTO* and *FI_PROGRESS_MANUAL*, +- with a default set to auto. However, receive side data buffers are not +- modified outside of completion processing routines. ++: The RxD provider only supports *FI_PROGRESS_MANUAL*. + + # LIMITATIONS + +@@ -49,7 +46,21 @@ tested. + + # RUNTIME PARAMETERS + +-No runtime parameters are currently defined. ++The *rxd* provider checks for the following environment variables: ++ ++*FI_OFI_RXD_SPIN_COUNT* ++: Number of times to read the core provider's CQ for a segment completion ++ before trying to progress sends. Default is 1000. ++ ++*FI_OFI_RXD_RETRY* ++: Toggles retrying of packets and assumes reliability of individual packets ++ and will reassemble all received packets. Retrying is turned on by default. ++ ++*FI_OFI_RXD_MAX_PEERS* ++: Maximum number of peers the provider should prepare to track. Default: 1024 ++ ++*FI_OFI_RXD_MAX_UNACKED* ++: Maximum number of packets (per peer) to send at a time. Default: 128 + + # SEE ALSO + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxm.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxm.7.md +index db377a3..64ac34f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxm.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxm.7.md +@@ -11,31 +11,50 @@ fi_rxm \- The RxM (RDM over MSG) Utility Provider + + # OVERVIEW + +-The RxM provider (ofi_rxm) is an utility provider that supports RDM +-endpoint emulated over MSG endpoint of a core provider. ++The RxM provider (ofi_rxm) is an utility provider that supports FI_EP_RDM type ++endpoint emulated over FI_EP_MSG type endpoint(s) of an underlying core provider. ++FI_EP_RDM endpoints have a reliable unconnected messaging interface and RxM ++emulates this by hiding the connection management of underlying FI_EP_MSG ++endpoints from the user. Additionally, RxM can hide memory registration ++requirement from a core provider like verbs if the apps don't support it. + + # REQUIREMENTS + ++## Requirements for core provider ++ + RxM provider requires the core provider to support the following features: + + * MSG endpoints (FI_EP_MSG) + +- * RMA read/write (FI_RMA) ++ * RMA read/write (FI_RMA) - Used for implementing rendezvous protocol for ++ large messages. ++ ++ * FI_OPT_CM_DATA_SIZE of at least 48 bytes ++ ++## Requirements for applications ++ ++Since RxM emulates RDM endpoints by hiding connection management and connections ++are established only on-demand (when app tries to send data), the first several ++data transfer calls would return EAGAIN. Applications should be aware of this and ++retry until the operation succeeds. + +- * FI_OPT_CM_DATA_SIZE of at least 24 bytes ++If an application has chosen manual progress for data progress, it should also ++read the CQ so that the connection establishment progresses. Not doing so would ++result in a stall. See also the ERRORS section in fi_msg(3). + + # SUPPORTED FEATURES + +-The RxM provider currently supports *FI_MSG*, *FI_TAGGED* and *FI_RMA* capabilities. ++The RxM provider currently supports *FI_MSG*, *FI_TAGGED*, *FI_RMA* and *FI_ATOMIC* capabilities. + + *Endpoint types* + : The provider supports only *FI_EP_RDM*. + + *Endpoint capabilities* +-: The following data transfer interface is supported: *FI_MSG*, *FI_TAGGED*, *FI_RMA*. ++: The following data transfer interface is supported: *FI_MSG*, *FI_TAGGED*, *FI_RMA*, *FI_ATOMIC*. + + *Progress* +-: The RxM provider supports *FI_PROGRESS_AUTO*. ++: The RxM provider supports both *FI_PROGRESS_MANUAL* and *FI_PROGRESS_AUTO*. ++ The former is more optimal. + + *Addressing Formats* + : FI_SOCKADDR, FI_SOCKADDR_IN +@@ -55,8 +74,6 @@ RxM provider does not support the following features: + + * op_flags: FI_FENCE. + +- * FI_ATOMIC +- + * Scalable endpoints + + * Shared contexts +@@ -77,11 +94,22 @@ RxM provider does not support the following features: + + * Triggered operations + +-## Auto progress ++## Progress limitations + + When sending large messages, an app doing an sread or waiting on the CQ file descriptor + may not get a completion when reading the CQ after being woken up from the wait. +-The app has to do sread or wait on the file descriptor again. ++The app has to do sread or wait on the file descriptor again. This is needed ++because RxM uses a rendezvous protocol for large message sends. An app would get ++woken up from waiting on CQ fd when rendezvous protocol request completes but it ++would have to wait again to get an ACK from the receiver indicating completion of ++large message transfer by remote RMA read. ++ ++## FI_ATOMIC limitations ++ ++The FI_ATOMIC capability will only be listed in the fi_info if the fi_info ++hints parameter specifies FI_ATOMIC. If FI_ATOMIC is requested, message order ++FI_ORDER_RAR, FI_ORDER_RAW, FI_ORDER_WAR, FI_ORDER_WAW, FI_ORDER_SAR, and ++FI_ORDER_SAW can not be supported. + + # RUNTIME PARAMETERS + +@@ -90,13 +118,22 @@ The ofi_rxm provider checks for the following environment variables. + *FI_OFI_RXM_BUFFER_SIZE* + : Defines the transmit buffer size / inject size. Messages of size less than this + would be transmitted via an eager protocol and those above would be transmitted +- via a rendezvous protocol. Transmit data would be copied up to this size +- (default: ~16k). ++ via a rendezvous or SAR (Segmentation And Reassembly) protocol. Transmit data ++ would be copied up to this size (default: ~16k). + + *FI_OFI_RXM_COMP_PER_PROGRESS* + : Defines the maximum number of MSG provider CQ entries (default: 1) that would + be read per progress (RxM CQ read). + ++*FI_OFI_RXM_SAR_LIMIT* ++: Set this environment variable to control the RxM SAR (Segmentation And Reassembly) ++ protocol. Messages of size greater than this (default: 256 Kb) would be transmitted ++ via rendezvous protocol. ++ ++*FI_OFI_RXM_USE_SRX* ++: Set this to 1 to use shared receive context from MSG provider. This reduces ++ overall memory usage but there may be a slight increase in latency (default: 0). ++ + *FI_OFI_RXM_TX_SIZE* + : Defines default TX context size (default: 1024) + +@@ -122,12 +159,27 @@ FI_OFI_RXM_TX_SIZE, FI_OFI_RXM_RX_SIZE, FI_OFI_RXM_MSG_TX_SIZE, FI_OFI_RXM_MSG_R + subject to memory limits of the system and the tx and rx sizes supported by the + MSG provider. + ++FI_OFI_RXM_SAR_LIMIT is another knob that can be experimented with to optimze for ++bandwidth. ++ + ## Memory + + To conserve memory, ensure FI_UNIVERSE_SIZE set to what is required. Similarly + check that FI_OFI_RXM_TX_SIZE, FI_OFI_RXM_RX_SIZE, FI_OFI_RXM_MSG_TX_SIZE and + FI_OFI_RXM_MSG_RX_SIZE env variables are set to only required values. + ++# NOTES ++ ++The data transfer API may return -FI_EAGAIN during on-demand connection setup ++of the core provider FI_MSG_EP. See [`fi_msg`(3)](fi_msg.3.html) for a detailed ++description of handling FI_EAGAIN. ++ ++# Troubleshooting / Known issues ++ ++If an RxM endpoint is expected to communicate with more peers than the default ++value of FI_UNIVERSE_SIZE (256) CQ overruns can happen. To avoid this set a ++higher value for FI_UNIVERSE_SIZE. CQ overrun can make a MSG endpoint unusable. ++ + # SEE ALSO + + [`fabric`(7)](fabric.7.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_shm.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_shm.7.md +index 3548869..242a3eb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_shm.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_shm.7.md +@@ -105,8 +105,6 @@ structures + + EPs must be bound to both RX and TX CQs. + +-No support for selective completions or multi-recv. +- + No support for counters. + + # RUNTIME PARAMETERS +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_sockets.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_sockets.7.md +index 66041d2..a75c1cb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_sockets.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_sockets.7.md +@@ -60,6 +60,9 @@ The sockets provider checks for the following environment variables - + *FI_SOCKETS_PE_WAITTIME* + : An integer value that specifies how many milliseconds to spin while waiting for progress in *FI_PROGRESS_AUTO* mode. + ++*FI_SOCKETS_CONN_TIMEOUT* ++: An integer value that specifies how many milliseconds to wait for one connection establishment. ++ + *FI_SOCKETS_MAX_CONN_RETRY* + : An integer value that specifies the number of socket connection retries before reporting as failure. + +@@ -93,6 +96,9 @@ The sockets provider checks for the following environment variables - + *FI_SOCKETS_KEEPALIVE_PROBES* + : An integer to specify the maximum number of keepalive probes sent before dropping the connection. Only relevant if *FI_SOCKETS_KEEPALIVE_ENABLE* is enabled. + ++*FI_SOCKETS_IFACE* ++: The prefix or the name of the network interface (default: any) ++ + # LARGE SCALE JOBS + + For large scale runs one can use these environment variables to set the default parameters e.g. size of the address vector(AV), completion queue (CQ), connection map etc. that satisfies the requirement of the particular benchmark. The recommended parameters for large scale runs are *FI_SOCKETS_MAX_CONN_RETRY*, *FI_SOCKETS_DEF_CONN_MAP_SZ*, *FI_SOCKETS_DEF_AV_SZ*, *FI_SOCKETS_DEF_CQ_SZ*, *FI_SOCKETS_DEF_EQ_SZ*. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tagged.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tagged.3.md +index 2bddfe0..d6c3d54 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tagged.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tagged.3.md +@@ -97,7 +97,9 @@ ssize_t fi_tinjectdata(struct fid_ep *ep, const void *buf, size_t len, + : Additional flags to apply for the send or receive operation. + + *context* +-: User specified pointer to associate with the operation. ++: User specified pointer to associate with the operation. This parameter is ++ ignored if the operation will not generate a successful completion, unless ++ an op flag specifies the context parameter be used for required input. + + # DESCRIPTION + +@@ -184,7 +186,7 @@ struct fi_msg_tagged { + The tagged inject call is an optimized version of fi_tsend. The + fi_tinject function behaves as if the FI_INJECT transfer flag were + set, and FI_COMPLETION were not. That is, the data buffer is +-available for reuse immediately on returning from from fi_tinject, and ++available for reuse immediately on returning from fi_tinject, and + no completion event will be generated for this send. The completion + event will be suppressed even if the endpoint has not been configured + with FI_SELECTIVE_COMPLETION. See the flags discussion below for more +@@ -268,6 +270,11 @@ and/or fi_tsendmsg. + generated until the operation has been successfully transmitted and + is no longer being tracked by the provider. + ++*FI_MATCH_COMPLETE* ++: Applies to fi_tsendmsg. Indicates that a completion should be generated ++ only after the message has either been matched with a tagged ++ buffer or was discarded by the target application. ++ + *FI_FENCE* + : Applies to transmits. Indicates that the requested operation, also + known as the fenced operation, and any operation posted after the +@@ -323,21 +330,73 @@ The following flags may be used with fi_trecvmsg. + set is used to retrieve a previously claimed message. + + In order to use the FI_CLAIM flag, an application must supply a struct +- fi_context structure as the context for the receive operation. The same ++ fi_context structure as the context for the receive operation, or a ++ struct fi_recv_context in the case of buffered receives. The same + fi_context structure used for an FI_PEEK + FI_CLAIM operation must be used + by the paired FI_CLAIM request. + ++ This flag also applies to endpoints configured for FI_BUFFERED_RECV or ++ FI_VARIABLE_MSG. When set, it is used to retrieve a tagged message that ++ was buffered by the provider. See Buffered Tagged Receives section for ++ details. ++ + *FI_DISCARD* +-: This flag must be used in conjunction with either FI_PEEK or FI_CLAIM. ++: This flag may be used in conjunction with either FI_PEEK or FI_CLAIM. + If this flag is used in conjunction with FI_PEEK, it indicates if the + peek request completes successfully -- indicating that a matching message + was located -- the message is discarded by the provider, as the data is not + needed by the application. This flag may also be used in conjunction with +- FI_CLAIM in order to retrieve and discard a message previously claimed ++ FI_CLAIM in order to discard a message previously claimed + using an FI_PEEK + FI_CLAIM request. + ++ This flag also applies to endpoints configured for FI_BUFFERED_RECV or ++ FI_VARIABLE_MSG. When set, it indicates that the provider should free ++ a buffered messages. See Buffered Tagged Receives section for details. ++ + If this flag is set, the input buffer(s) and length parameters are ignored. + ++# Buffered Tagged Receives ++ ++See [`fi_msg`(3)](fi_msg.3.html) for an introduction to buffered receives. ++The handling of buffered receives differs between fi_msg operations and ++fi_tagged. Although the provider is responsible for allocating and ++managing network buffers, the application is responsible for identifying ++the tags that will be used to match incoming messages. The provider ++handles matching incoming receives to the application specified tags. ++ ++When FI_BUFFERED_RECV is enabled, the application posts the tags that ++will be used for matching purposes. Tags are posted using fi_trecv, ++fi_trecvv, and fi_trecvmsg; however, parameters related ++to the input buffers are ignored (e.g. buf, len, iov, desc). When ++a provider receives a message for which there is a matching tag, ++it will write an entry to the completion queue associated with the ++receiving endpoint. ++ ++For discussion purposes, the completion queue is assumed to be configured ++for FI_CQ_FORMAT_TAGGED. The op_context field will point to a struct ++fi_recv_contex. ++ ++{% highlight c %} ++struct fi_recv_context { ++ struct fid_ep *ep; ++ void *context; ++}; ++{% endhighlight %} ++ ++The 'ep' field will be NULL. The 'context' field will match the ++application context specified when posting the tag. Other fields are ++set as defined in [`fi_msg`(3)](fi_msg.3.html). ++ ++After being notified that a buffered receive has arrived, ++applications must either claim or discard the message as described in ++[`fi_msg`(3)](fi_msg.3.html). ++ ++# Variable Length Tagged Messages ++ ++Variable length messages are defined in [`fi_msg`(3)](fi_msg.3.html). ++The requirements for handling variable length tagged messages is identical ++to those defined above for buffered tagged receives. ++ + # RETURN VALUE + + The tagged send and receive calls return 0 on success. On error, a +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tcp.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tcp.7.md +new file mode 100644 +index 0000000..99f122d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tcp.7.md +@@ -0,0 +1,45 @@ ++--- ++layout: page ++title: fi_tcp(7) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_tcp \- The msg sockets Fabric Provider ++ ++# OVERVIEW ++ ++The tcp provider can be used on any system that supports TCP sockets. The ++provider is not intended to provide performance improvements over regular ++TCP sockets, but rather to allow developers to write, test,and debug ++application code even on platforms that do not have high-performance ++fabric hardware. ++ ++# SUPPORTED FEATURES ++ ++The following features are supported ++ ++*Endpoint types* ++: *FI_EP_MSG* is the only supported endpoint type. Reliable ++datagram endpoint over TCP sockets can be achieved by layering RxM over ++tcp provider. ++ ++*Endpoint capabilities* ++: The tcp provider currently supports *FI_MSG*, *FI_RMA* ++ ++*Progress* ++: Currently tcp provider supports only *FI_PROGRESS_MANUAL* ++ ++# LIMITATIONS ++ ++tcp provider is implemented over TCP sockets to emulate libfabric API. Hence ++the performance is lower than what an application might see implementing to ++sockets directly. ++ ++# SEE ALSO ++ ++[`fabric`(7)](fabric.7.html), ++[`fi_provider`(7)](fi_provider.7.html), ++[`fi_getinfo`(3)](fi_getinfo.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_verbs.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_verbs.7.md +index d9ce6ef..20c1750 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_verbs.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_verbs.7.md +@@ -159,6 +159,10 @@ The support for fork in the provider has the following limitations: + marks the entire page that a memory region belongs to as not to be re-mapped + when the process is forked (MADV_DONTFORK). + ++### XRC Transport ++The XRC transport is intended to be used when layered with the RXM provider and ++requires the use of shared receive contexts. See [`fi_rxm`(7)](fi_rxm.7.thml). ++ + # RUNTIME PARAMETERS + + The verbs provider checks for the following environment variables. +@@ -203,6 +207,9 @@ The verbs provider checks for the following environment variables. + *FI_VERBS_MR_MAX_CACHED_SIZE* + : Maximum total size of cache entries (default: 4 GB) + ++*FI_VERBS_PREFER_XRC* ++: Prioritize XRC transport fi_info before RC transport fi_info (default: 0, RC fi_info will be before XRC fi_info) ++ + ### Variables specific to RDM (internal - deprecated) endpoints + + *FI_VERBS_RDM_BUFFER_NUM* +@@ -246,6 +253,12 @@ When running an app over verbs provider with Valgrind, there may be reports of + memory leak in functions from dependent libraries (e.g. libibverbs, librdmacm). + These leaks are safe to ignore. + ++The provider protects CQ overruns that may happen because more TX operations were ++posted to endpoints than CQ size. On the receive side, it isn't expected to ++overrun the CQ. In case it happens the application developer should take care ++not to post excess receives without draining the CQ. CQ overruns can make the ++MSG endpoints unusable. ++ + # SEE ALSO + + [`fabric`(7)](fabric.7.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_info.1 b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_info.1 +index 8f55ab2..f878e47 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_info.1 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_info.1 +@@ -1,4 +1,7 @@ +-.TH "fi_info" "1" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_info" "1" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_info \- Simple utility to query for fabric interfaces +@@ -21,59 +24,90 @@ If no filters are specified, then all available fabric interfaces for + all providers and endpoint types will be returned. + .SH OPTIONS + .SS Filtering +-.PP +-\f[I]\-n, \-\-node=\f[] : Node name or address used to filter +-interfaces. ++.TP ++.B \f[I]\-n, \-\-node=\f[] ++Node name or address used to filter interfaces. + Only interfaces which can reach the given node or address will respond. +-.PP +-\f[I]\-P, \-\-port=\f[] : Port number used to filter interfaces. +-.PP +-\f[I]\-c, \-\-caps=..\f[] : Pipe separated list of +-capabilities used to filter interfaces. ++.RS ++.RE ++.TP ++.B \f[I]\-P, \-\-port=\f[] ++Port number used to filter interfaces. ++.RS ++.RE ++.TP ++.B \f[I]\-c, \-\-caps=..\f[] ++Pipe separated list of capabilities used to filter interfaces. + Only interfaces supporting all of the given capabilities will respond. + For more information on capabilities, see fi_getinfo(3). +-.PP +-\f[I]\-m, \-\-mode=..\f[] : Pipe separated list of modes used +-to filter interfaces. ++.RS ++.RE ++.TP ++.B \f[I]\-m, \-\-mode=..\f[] ++Pipe separated list of modes used to filter interfaces. + Only interfaces supporting all of the given modes will respond. + For more information on, modes see fi_getinfo(3). +-.PP +-\f[I]\-t, \-\-ep_type=\f[] : Specifies the type of fabric +-interface communication desired. ++.RS ++.RE ++.TP ++.B \f[I]\-t, \-\-ep_type=\f[] ++Specifies the type of fabric interface communication desired. + For example, specifying FI_EP_DGRAM would return only interfaces which + support unreliable datagram. + For more information on endpoint types, see fi_endpoint(3). +-.PP +-\f[I]\-a, \-\-addr_format=\f[] : Filter fabric interfaces by their +-address format. ++.RS ++.RE ++.TP ++.B \f[I]\-a, \-\-addr_format=\f[] ++Filter fabric interfaces by their address format. + For example, specifying FI_SOCKADDR_IN would return only interfaces + which use sockaddr_in structures for addressing. + For more information on address formats, see fi_getinfo(3). +-.PP +-\f[I]\-p, \-\-provider=\f[] : Filter fabric interfaces by the +-provider implementation. ++.RS ++.RE ++.TP ++.B \f[I]\-p, \-\-provider=\f[] ++Filter fabric interfaces by the provider implementation. + For a list of providers, see the \f[C]\-\-list\f[] option. +-.PP +-\f[I]\-d, \-\-domain=\f[] : Filter interfaces to only those with +-the given domain name. +-.PP +-\f[I]\-f, \-\-fabric=\f[] : Filter interfaces to only those with +-the given fabric name. ++.RS ++.RE ++.TP ++.B \f[I]\-d, \-\-domain=\f[] ++Filter interfaces to only those with the given domain name. ++.RS ++.RE ++.TP ++.B \f[I]\-f, \-\-fabric=\f[] ++Filter interfaces to only those with the given fabric name. ++.RS ++.RE + .SS Discovery +-.PP +-\f[I]\-e, \-\-env\f[] : List libfabric related environment levels which +-can be used to enable extra configuration or tuning. +-.PP +-\f[I]\-l, \-\-list\f[] : List available libfabric providers. +-.PP +-\f[I]\-v, \-\-verbose\f[] : By default, fi_info will display a summary +-of each of the interfaces discovered. ++.TP ++.B \f[I]\-e, \-\-env\f[] ++List libfabric related environment levels which can be used to enable ++extra configuration or tuning. ++.RS ++.RE ++.TP ++.B \f[I]\-l, \-\-list\f[] ++List available libfabric providers. ++.RS ++.RE ++.TP ++.B \f[I]\-v, \-\-verbose\f[] ++By default, fi_info will display a summary of each of the interfaces ++discovered. + If the verbose option is enabled, then all of the contents of the + fi_info structure are displayed. + For more information on the data contained in the fi_info structure, see + fi_getinfo(3). +-.PP +-\f[I]\-\-version\f[] : Display versioning information. ++.RS ++.RE ++.TP ++.B \f[I]\-\-version\f[] ++Display versioning information. ++.RS ++.RE + .SH USAGE EXAMPLES + .IP + .nf +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_pingpong.1 +index e64fb8d..c9b859c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_pingpong.1 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_pingpong.1 +@@ -1,4 +1,7 @@ +-.TH "fi_pingpong" "1" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_pingpong" "1" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_pingpong \- Quick and simple pingpong test for libfabric +@@ -55,44 +58,72 @@ be specified on the server. + If both the server and client specify the \f[C]\-d\f[] option and the + given domains cannot communicate, then the application will fail. + .SS Control Messaging +-.PP +-\f[I]\-B \f[] : The non\-default source port number of the +-control socket. ++.TP ++.B \f[I]\-B \f[] ++The non\-default source port number of the control socket. + If this is not provided then the server will bind to port 47592 by + default and the client will allow the port to be selected automatically. +-.PP +-\f[I]\-P \f[] : The non\-default destination port number of +-the control socket. ++.RS ++.RE ++.TP ++.B \f[I]\-P \f[] ++The non\-default destination port number of the control socket. + If this is not provided then the client will connect to 47592 by + default. + The server ignores this option. ++.RS ++.RE + .SS Fabric Filtering +-.PP +-\f[I]\-p \f[] : The name of the underlying fabric +-provider (e.g., sockets, psm, usnic, etc.). ++.TP ++.B \f[I]\-p \f[] ++The name of the underlying fabric provider (e.g., sockets, psm, usnic, ++etc.). + If a provider is not specified via the \-p switch, the test will pick + one from the list of available providers (as returned by fi_getinfo(3)). +-.PP +-\f[I]\-e \f[] : The type of endpoint to be used for data +-messaging between the two processes. ++.RS ++.RE ++.TP ++.B \f[I]\-e \f[] ++The type of endpoint to be used for data messaging between the two ++processes. + Supported values are dgram, rdm, and msg. + For more information on endpoint types, see fi_endpoint(3). +-.PP +-\f[I]\-d \f[] : The name of the specific domain to be used. ++.RS ++.RE ++.TP ++.B \f[I]\-d \f[] ++The name of the specific domain to be used. ++.RS ++.RE + .SS Test Options +-.PP +-\f[I]\-I \f[] : The number of iterations of the test will run. +-.PP +-\f[I]\-S \f[] : The specific size of the message in bytes the +-test will use or \[aq]all\[aq] to run all the default sizes. +-.PP +-\f[I]\-c\f[] : Activate data integrity checks at the receiver (note: +-this will degrade performance). ++.TP ++.B \f[I]\-I \f[] ++The number of iterations of the test will run. ++.RS ++.RE ++.TP ++.B \f[I]\-S \f[] ++The specific size of the message in bytes the test will use or ++\[aq]all\[aq] to run all the default sizes. ++.RS ++.RE ++.TP ++.B \f[I]\-c\f[] ++Activate data integrity checks at the receiver (note: this will degrade ++performance). ++.RS ++.RE + .SS Utility +-.PP +-\f[I]\-v\f[] : Activate output debugging (warning: highly verbose) +-.PP +-\f[I]\-h\f[] : Displays help output for the pingpong test. ++.TP ++.B \f[I]\-v\f[] ++Activate output debugging (warning: highly verbose) ++.RS ++.RE ++.TP ++.B \f[I]\-h\f[] ++Displays help output for the pingpong test. ++.RS ++.RE + .SH USAGE EXAMPLES + .SS A simple example + .SS Server: \f[C]fi_pingpong\ \-p\ \f[] +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_strerror.1 b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_strerror.1 +index f5ebedc..f2f8676 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_strerror.1 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_strerror.1 +@@ -1,4 +1,7 @@ +-.TH "fi_strerror" "1" "2016\-06\-30" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_strerror" "1" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_strerror \- display libfabric error strings +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_atomic.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_atomic.3 +index 4724d89..063d20c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_atomic.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_atomic.3 +@@ -1,17 +1,27 @@ +-.TH "fi_atomic" "3" "2017\-09\-25" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_atomic" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_atomic \- Remote atomic functions +-.PP +-fi_atomic / fi_atomicv / fi_atomicmsg / fi_inject_atomic : Initiates an +-atomic operation to remote memory +-.PP +-fi_fetch_atomic / fi_fetch_atomicv / fi_fetch_atomicmsg : Initiates an +-atomic operation to remote memory, retrieving the initial value. +-.PP +-fi_compare_atomic / fi_compare_atomicv / fi_compare_atomicmsg : ++.TP ++.B fi_atomic / fi_atomicv / fi_atomicmsg / fi_inject_atomic ++Initiates an atomic operation to remote memory ++.RS ++.RE ++.TP ++.B fi_fetch_atomic / fi_fetch_atomicv / fi_fetch_atomicmsg ++Initiates an atomic operation to remote memory, retrieving the initial ++value. ++.RS ++.RE ++.TP ++.B fi_compare_atomic / fi_compare_atomicv / fi_compare_atomicmsg + Initiates an atomic compare\-operation to remote memory, retrieving the + initial value. ++.RS ++.RE + .PP + fi_atomicvalid / fi_fetch_atomicvalid / fi_compare_atomicvalid / + fi_query_atomic : Indicates if a provider supports a specific atomic +@@ -89,46 +99,88 @@ int\ fi_query_atomic(struct\ fid_domain\ *domain, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]ep\f[] : Fabric endpoint on which to initiate atomic operation. +-.PP +-\f[I]buf\f[] : Local data buffer that specifies first operand of atomic +-operation +-.PP +-\f[I]iov / comparev / resultv\f[] : Vectored data buffer(s). +-.PP +-\f[I]count / compare_count / result_count\f[] : Count of vectored data +-entries. ++.TP ++.B \f[I]ep\f[] ++Fabric endpoint on which to initiate atomic operation. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Local data buffer that specifies first operand of atomic operation ++.RS ++.RE ++.TP ++.B \f[I]iov / comparev / resultv\f[] ++Vectored data buffer(s). ++.RS ++.RE ++.TP ++.B \f[I]count / compare_count / result_count\f[] ++Count of vectored data entries. + The number of elements referenced, where each element is the indicated + datatype. +-.PP +-\f[I]addr\f[] : Address of remote memory to access. +-.PP +-\f[I]key\f[] : Protection key associated with the remote memory. +-.PP +-\f[I]datatype\f[] : Datatype associated with atomic operands +-.PP +-\f[I]op\f[] : Atomic operation to perform +-.PP +-\f[I]compare\f[] : Local compare buffer, containing comparison data. +-.PP +-\f[I]result\f[] : Local data buffer to store initial value of remote +-buffer +-.PP +-\f[I]desc / compare_desc / result_desc\f[] : Data descriptor associated +-with the local data buffer, local compare buffer, and local result +-buffer, respectively. +-.PP +-\f[I]dest_addr\f[] : Destination address for connectionless atomic +-operations. ++.RS ++.RE ++.TP ++.B \f[I]addr\f[] ++Address of remote memory to access. ++.RS ++.RE ++.TP ++.B \f[I]key\f[] ++Protection key associated with the remote memory. ++.RS ++.RE ++.TP ++.B \f[I]datatype\f[] ++Datatype associated with atomic operands ++.RS ++.RE ++.TP ++.B \f[I]op\f[] ++Atomic operation to perform ++.RS ++.RE ++.TP ++.B \f[I]compare\f[] ++Local compare buffer, containing comparison data. ++.RS ++.RE ++.TP ++.B \f[I]result\f[] ++Local data buffer to store initial value of remote buffer ++.RS ++.RE ++.TP ++.B \f[I]desc / compare_desc / result_desc\f[] ++Data descriptor associated with the local data buffer, local compare ++buffer, and local result buffer, respectively. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr\f[] ++Destination address for connectionless atomic operations. + Ignored for connected endpoints. +-.PP +-\f[I]msg\f[] : Message descriptor for atomic operations +-.PP +-\f[I]flags\f[] : Additional flags to apply for the atomic operation +-.PP +-\f[I]context\f[] : User specified pointer to associate with the +-operation. ++.RS ++.RE ++.TP ++.B \f[I]msg\f[] ++Message descriptor for atomic operations ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply for the atomic operation ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified pointer to associate with the operation. ++This parameter is ignored if the operation will not generate a ++successful completion, unless an op flag specifies the context parameter ++be used for required input. ++.RS ++.RE + .SH DESCRIPTION + .PP + Atomic transfers are used to read and update data located in remote +@@ -149,40 +201,73 @@ Atomic functions may operate on one of the following identified data + types. + A given atomic function may support any datatype, subject to provider + implementation constraints. +-.PP +-\f[I]FI_INT8\f[] : Signed 8\-bit integer. +-.PP +-\f[I]FI_UINT8\f[] : Unsigned 8\-bit integer. +-.PP +-\f[I]FI_INT16\f[] : Signed 16\-bit integer. +-.PP +-\f[I]FI_UINT16\f[] : Unsigned 16\-bit integer. +-.PP +-\f[I]FI_INT32\f[] : Signed 32\-bit integer. +-.PP +-\f[I]FI_UINT32\f[] : Unsigned 32\-bit integer. +-.PP +-\f[I]FI_INT64\f[] : Signed 64\-bit integer. +-.PP +-\f[I]FI_UINT64\f[] : Unsigned 64\-bit integer. +-.PP +-\f[I]FI_FLOAT\f[] : A single\-precision floating point value (IEEE 754). +-.PP +-\f[I]FI_DOUBLE\f[] : A double\-precision floating point value (IEEE +-754). +-.PP +-\f[I]FI_FLOAT_COMPLEX\f[] : An ordered pair of single\-precision +-floating point values (IEEE 754), with the first value representing the +-real portion of a complex number and the second representing the +-imaginary portion. +-.PP +-\f[I]FI_DOUBLE_COMPLEX\f[] : An ordered pair of double\-precision +-floating point values (IEEE 754), with the first value representing the +-real portion of a complex number and the second representing the +-imaginary portion. +-.PP +-\f[I]FI_LONG_DOUBLE\f[] : A double\-extended precision floating point +-value (IEEE 754). ++.TP ++.B \f[I]FI_INT8\f[] ++Signed 8\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_UINT8\f[] ++Unsigned 8\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_INT16\f[] ++Signed 16\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_UINT16\f[] ++Unsigned 16\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_INT32\f[] ++Signed 32\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_UINT32\f[] ++Unsigned 32\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_INT64\f[] ++Signed 64\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_UINT64\f[] ++Unsigned 64\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_FLOAT\f[] ++A single\-precision floating point value (IEEE 754). ++.RS ++.RE ++.TP ++.B \f[I]FI_DOUBLE\f[] ++A double\-precision floating point value (IEEE 754). ++.RS ++.RE ++.TP ++.B \f[I]FI_FLOAT_COMPLEX\f[] ++An ordered pair of single\-precision floating point values (IEEE 754), ++with the first value representing the real portion of a complex number ++and the second representing the imaginary portion. ++.RS ++.RE ++.TP ++.B \f[I]FI_DOUBLE_COMPLEX\f[] ++An ordered pair of double\-precision floating point values (IEEE 754), ++with the first value representing the real portion of a complex number ++and the second representing the imaginary portion. ++.RS ++.RE ++.TP ++.B \f[I]FI_LONG_DOUBLE\f[] ++A double\-extended precision floating point value (IEEE 754). + Note that the size of a long double and number of bits used for + precision is compiler, platform, and/or provider specific. + Developers that use long double should ensure that libfabric is built +@@ -190,11 +275,15 @@ using a long double format that is compatible with their application, + and that format is supported by the provider. + The mechanism used for this validation is currently beyond the scope of + the libfabric API. +-.PP +-\f[I]FI_LONG_DOUBLE_COMPLEX\f[] : An ordered pair of double\-extended +-precision floating point values (IEEE 754), with the first value +-representing the real portion of a complex number and the second +-representing the imaginary portion. ++.RS ++.RE ++.TP ++.B \f[I]FI_LONG_DOUBLE_COMPLEX\f[] ++An ordered pair of double\-extended precision floating point values ++(IEEE 754), with the first value representing the real portion of a ++complex number and the second representing the imaginary portion. ++.RS ++.RE + .SS Atomic Operations + .PP + The following atomic operations are defined. +@@ -203,8 +292,11 @@ memory buffer and source value provided with the atomic function. + It may also carry source data to replace the target value in compare and + swap operations. + A conceptual description of each operation is provided. +-.PP +-\f[I]FI_MIN\f[] : Minimum ++.TP ++.B \f[I]FI_MIN\f[] ++Minimum ++.RS ++.RE + .IP + .nf + \f[C] +@@ -212,8 +304,11 @@ if\ (buf[i]\ <\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_MAX\f[] : Maximum ++.TP ++.B \f[I]FI_MAX\f[] ++Maximum ++.RS ++.RE + .IP + .nf + \f[C] +@@ -221,88 +316,121 @@ if\ (buf[i]\ >\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_SUM\f[] : Sum ++.TP ++.B \f[I]FI_SUM\f[] ++Sum ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ +\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_PROD\f[] : Product ++.TP ++.B \f[I]FI_PROD\f[] ++Product ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ *\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_LOR\f[] : Logical OR ++.TP ++.B \f[I]FI_LOR\f[] ++Logical OR ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ (addr[i]\ ||\ buf[i]) + \f[] + .fi +-.PP +-\f[I]FI_LAND\f[] : Logical AND ++.TP ++.B \f[I]FI_LAND\f[] ++Logical AND ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ (addr[i]\ &&\ buf[i]) + \f[] + .fi +-.PP +-\f[I]FI_BOR\f[] : Bitwise OR ++.TP ++.B \f[I]FI_BOR\f[] ++Bitwise OR ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ |\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_BAND\f[] : Bitwise AND ++.TP ++.B \f[I]FI_BAND\f[] ++Bitwise AND ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ &\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_LXOR\f[] : Logical exclusive\-OR (XOR) ++.TP ++.B \f[I]FI_LXOR\f[] ++Logical exclusive\-OR (XOR) ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ ((addr[i]\ &&\ !buf[i])\ ||\ (!addr[i]\ &&\ buf[i])) + \f[] + .fi +-.PP +-\f[I]FI_BXOR\f[] : Bitwise exclusive\-OR (XOR) ++.TP ++.B \f[I]FI_BXOR\f[] ++Bitwise exclusive\-OR (XOR) ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ ^\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_ATOMIC_READ\f[] : Read data atomically ++.TP ++.B \f[I]FI_ATOMIC_READ\f[] ++Read data atomically ++.RS ++.RE + .IP + .nf + \f[C] + result[i]\ =\ addr[i] + \f[] + .fi +-.PP +-\f[I]FI_ATOMIC_WRITE\f[] : Write data atomically ++.TP ++.B \f[I]FI_ATOMIC_WRITE\f[] ++Write data atomically ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP\f[] : Compare values and if equal swap with data ++.TP ++.B \f[I]FI_CSWAP\f[] ++Compare values and if equal swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -310,8 +438,11 @@ if\ (compare[i]\ ==\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_NE\f[] : Compare values and if not equal swap with data ++.TP ++.B \f[I]FI_CSWAP_NE\f[] ++Compare values and if not equal swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -319,9 +450,11 @@ if\ (compare[i]\ !=\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_LE\f[] : Compare values and if less than or equal swap +-with data ++.TP ++.B \f[I]FI_CSWAP_LE\f[] ++Compare values and if less than or equal swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -329,8 +462,11 @@ if\ (compare[i]\ <=\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_LT\f[] : Compare values and if less than swap with data ++.TP ++.B \f[I]FI_CSWAP_LT\f[] ++Compare values and if less than swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -338,9 +474,11 @@ if\ (compare[i]\ <\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_GE\f[] : Compare values and if greater than or equal swap +-with data ++.TP ++.B \f[I]FI_CSWAP_GE\f[] ++Compare values and if greater than or equal swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -348,8 +486,11 @@ if\ (compare[i]\ >=\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_GT\f[] : Compare values and if greater than swap with data ++.TP ++.B \f[I]FI_CSWAP_GT\f[] ++Compare values and if greater than swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -357,8 +498,11 @@ if\ (compare[i]\ >\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_MSWAP\f[] : Swap masked bits with data ++.TP ++.B \f[I]FI_MSWAP\f[] ++Swap masked bits with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -523,19 +667,33 @@ The count attribute field is as defined for the atomic valid calls. + The size field indicates the size in bytes of the atomic datatype. + .SS Completions + .PP +-Completed atomic operations are reported to the user through one or more +-event collectors associated with the endpoint. +-Users provide context which are associated with each operation, and is +-returned to the user as part of the event completion. ++Completed atomic operations are reported to the initiator of the request ++through an associated completion queue or counter. ++Any user provided context specified with the request will be returned as ++part of any completion event written to a CQ. + See fi_cq for completion event details. + .PP +-Updates to the target buffer of an atomic operation are visible to +-processes running on the target system either after a completion has +-been generated, or after the completion of an operation initiated after +-the atomic call with a fencing operation occurring in between. +-For example, the target process may be notified by the initiator sending +-a message after the atomic call completes, or sending a fenced message +-immediately after initiating the atomic operation. ++Any results returned to the initiator as part of an atomic operation ++will be available prior to a completion event being generated. ++This will be true even if the requested completion semantic provides a ++weaker guarantee. ++That is, atomic fetch operations have FI_DELIVERY_COMPLETE semantics. ++Completions generated for other types of atomic operations indicate that ++it is safe to re\-use the source data buffers. ++.PP ++Any updates to data at the target of an atomic operation will be visible ++to processes running on the target node prior to one of the following ++occurring. ++If the atomic operation generates a completion event or updates a ++completion counter at the target endpoint, the results will be available ++prior to the completion notification. ++After processing a completion for the atomic, if the initiator submits a ++transfer between the same endpoints that generates a completion at the ++target, the results will be available prior to the subsequent ++transfer\[aq]s event. ++Or, if a fenced data transfer from the initiator follows the atomic ++request, the results will be available prior to a completion at the ++target for the fenced transfer. + .SH FLAGS + .PP + The fi_atomicmsg, fi_fetch_atomicmsg, and fi_compare_atomicmsg calls +@@ -545,58 +703,83 @@ Flags specified with atomic message operations override most flags + previously configured with the endpoint, except where noted (see + fi_control). + The following list of flags are usable with atomic message calls. +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for the specified operation. ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for the specified ++operation. + The endpoint must be bound to a completion queue with + FI_SELECTIVE_COMPLETION that corresponds to the specified operation, or + this flag is ignored. +-.PP +-\f[I]FI_MORE\f[] : Indicates that the user has additional requests that +-will immediately be posted after the current call returns. ++.RS ++.RE ++.TP ++.B \f[I]FI_MORE\f[] ++Indicates that the user has additional requests that will immediately be ++posted after the current call returns. + Use of this flag may improve performance by enabling the provider to + optimize its access to the fabric hardware. +-.PP +-\f[I]FI_INJECT\f[] : Indicates that the outbound non\-const data buffers +-(buf and compare parameters) should be returned to user immediately +-after the call returns, even if the operation is handled asynchronously. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT\f[] ++Indicates that the control of constant data buffers should be returned ++to the user immediately after the call returns, even if the operation is ++handled asynchronously. + This may require that the underlying provider implementation copy the + data into a local buffer and transfer out of that buffer. +-The use of output result buffers are not affected by this flag. ++Constant data buffers refers to any data buffer or iovec used by the ++atomic APIs that are marked as \[aq]const\[aq]. ++Non\-constant or output buffers are unaffected by this flag and may be ++accessed by the provider at anytime until the operation has completed. + This flag can only be used with messages smaller than inject_size. +-.PP +-\f[I]FI_FENCE\f[] : Applies to transmits. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Applies to transmits. + Indicates that the requested operation, also known as the fenced + operation, and any operation posted after the fenced operation will be + deferred until all previous operations targeting the same peer endpoint + have completed. + Operations posted after the fencing will see and/or replace the results + of any operations initiated prior to the fenced operation. ++.RS ++.RE + .PP + The ordering of operations starting at the posting of the fenced + operation (inclusive) to the posting of a subsequent fenced operation + (exclusive) is controlled by the endpoint\[aq]s ordering semantics. +-.PP +-\f[I]FI_TAGGED\f[] : Specifies that the target of the atomic operation +-is a tagged receive buffer instead of an RMA buffer. ++.TP ++.B \f[I]FI_TAGGED\f[] ++Specifies that the target of the atomic operation is a tagged receive ++buffer instead of an RMA buffer. + When a tagged buffer is the target memory region, the addr parameter is + used as a 0\-based byte offset into the tagged buffer, with the key + parameter specifying the tag. ++.RS ++.RE + .SH RETURN VALUE + .PP + Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_EAGAIN\f[] : See \f[C]fi_msg\f[](3) for a detailed description +-of handling FI_EAGAIN. +-.PP +-\f[I]\-FI_EOPNOTSUPP\f[] : The requested atomic operation is not +-supported on this endpoint. +-.PP +-\f[I]\-FI_EMSGSIZE\f[] : The number of atomic operations in a single +-request exceeds that supported by the underlying provider. ++.TP ++.B \f[I]\-FI_EAGAIN\f[] ++See \f[C]fi_msg\f[](3) for a detailed description of handling FI_EAGAIN. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EOPNOTSUPP\f[] ++The requested atomic operation is not supported on this endpoint. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EMSGSIZE\f[] ++The number of atomic operations in a single request exceeds that ++supported by the underlying provider. ++.RS ++.RE + .SH NOTES + .PP + Atomic operations operate on an array of values of a specific data type. +@@ -625,6 +808,15 @@ This must be between 1 and the maximum returned through the relevant + valid operation, inclusive. + The requested operation and data type must also be valid for the given + provider. ++.PP ++The ordering of atomic operations carried as part of different request ++messages is subject to the message and data ordering definitions ++assigned to the transmitting and receiving endpoints. ++Both message and data ordering are required if the results of two atomic ++operations to the same memory buffers are to reflect the second ++operation acting on the results of the first. ++See \f[C]fi_endpoint\f[](3) for further details and message size ++restrictions. + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_av.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_av.3 +index aa4ec5f..565ed45 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_av.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_av.3 +@@ -1,18 +1,35 @@ +-.TH "fi_av" "3" "2017\-06\-21" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_av" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_av \- Address vector operations +-.PP +-fi_av_open / fi_close : Open or close an address vector +-.PP +-fi_av_bind : Associate an address vector with an event queue. +-.PP +-fi_av_insert / fi_av_insertsvc / fi_av_remove : Insert/remove an address +-into/from the address vector. +-.PP +-fi_av_lookup : Retrieve an address stored in the address vector. +-.PP +-fi_av_straddr : Convert an address into a printable string. ++.TP ++.B fi_av_open / fi_close ++Open or close an address vector ++.RS ++.RE ++.TP ++.B fi_av_bind ++Associate an address vector with an event queue. ++.RS ++.RE ++.TP ++.B fi_av_insert / fi_av_insertsvc / fi_av_remove ++Insert/remove an address into/from the address vector. ++.RS ++.RE ++.TP ++.B fi_av_lookup ++Retrieve an address stored in the address vector. ++.RS ++.RE ++.TP ++.B fi_av_straddr ++Convert an address into a printable string. ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -51,31 +68,60 @@ const\ char\ *\ fi_av_straddr(struct\ fid_av\ *av,\ const\ void\ *addr, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]domain\f[] : Resource domain +-.PP +-\f[I]av\f[] : Address vector +-.PP +-\f[I]eq\f[] : Event queue +-.PP +-\f[I]attr\f[] : Address vector attributes +-.PP +-\f[I]context\f[] : User specified context associated with the address +-vector or insert operation. +-.PP +-\f[I]addr\f[] : Buffer containing one or more addresses to insert into +-address vector. +-.PP +-\f[I]addrlen\f[] : On input, specifies size of addr buffer. ++.TP ++.B \f[I]domain\f[] ++Resource domain ++.RS ++.RE ++.TP ++.B \f[I]av\f[] ++Address vector ++.RS ++.RE ++.TP ++.B \f[I]eq\f[] ++Event queue ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Address vector attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the address vector or insert ++operation. ++.RS ++.RE ++.TP ++.B \f[I]addr\f[] ++Buffer containing one or more addresses to insert into address vector. ++.RS ++.RE ++.TP ++.B \f[I]addrlen\f[] ++On input, specifies size of addr buffer. + On output, stores number of bytes written to addr buffer. +-.PP +-\f[I]fi_addr\f[] : For insert, a reference to an array where returned +-fabric addresses will be written. ++.RS ++.RE ++.TP ++.B \f[I]fi_addr\f[] ++For insert, a reference to an array where returned fabric addresses will ++be written. + For remove, one or more fabric addresses to remove. +-.PP +-\f[I]count\f[] : Number of addresses to insert/remove from an AV. +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Number of addresses to insert/remove from an AV. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation. ++.RS ++.RE + .SH DESCRIPTION + .PP + Address vectors are used to map higher level addresses, which may be +@@ -105,15 +151,19 @@ struct\ fi_av_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]type\f[] : An AV type corresponds to a conceptual implementation of +-an address vector. ++.TP ++.B \f[I]type\f[] ++An AV type corresponds to a conceptual implementation of an address ++vector. + The type specifies how an application views data stored in the AV, + including how it may be accessed. + Valid values are: +-.IP \[bu] 2 +-\f[I]FI_AV_MAP\f[] : Addresses which are inserted into an AV are mapped +-to a native fabric address for use by the application. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AV_MAP\f[] ++Addresses which are inserted into an AV are mapped to a native fabric ++address for use by the application. + The use of FI_AV_MAP requires that an application store the returned + fi_addr_t value that is associated with each inserted address. + The advantage of using FI_AV_MAP is that the returned fi_addr_t value +@@ -126,9 +176,12 @@ store the returned addresses. + Addresses are stored in the AV using a provider specific mechanism, + including, but not limited to a tree, hash table, or maintained on the + heap. +-.IP \[bu] 2 +-\f[I]FI_AV_TABLE\f[] : Addresses which are inserted into an AV of type +-FI_AV_TABLE are accessible using a simple index. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AV_TABLE\f[] ++Addresses which are inserted into an AV of type FI_AV_TABLE are ++accessible using a simple index. + Conceptually, the AV may be treated as an array of addresses, though the + provider may implement the AV using a variety of mechanisms. + When FI_AV_TABLE is used, the returned fi_addr_t is an index, with the +@@ -138,46 +191,64 @@ The index of the first address inserted into an FI_AV_TABLE will be 0, + and successive insertions will be given sequential indices. + Sequential indices will be assigned across insertion calls on the same + AV. +-.IP \[bu] 2 +-\f[I]FI_AV_UNSPEC\f[] : Provider will choose its preferred AV type. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AV_UNSPEC\f[] ++Provider will choose its preferred AV type. + The AV type used will be returned through the type field in fi_av_attr. +-.PP +-\f[I]Receive Context Bits (rx_ctx_bits)\f[] : The receive context bits +-field is only for use with scalable endpoints. ++.RS ++.RE ++.TP ++.B \f[I]Receive Context Bits (rx_ctx_bits)\f[] ++The receive context bits field is only for use with scalable endpoints. + It indicates the number of bits reserved in a returned fi_addr_t, which + will be used to identify a specific target receive context. + See fi_rx_addr() and fi_endpoint(3) for additional details on receive + contexts. + The requested number of bits should be selected such that 2 ^ + rx_ctx_bits >= rx_ctx_cnt for the endpoint. +-.PP +-\f[I]count\f[] : Indicates the expected number of addresses that will be +-inserted into the AV. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Indicates the expected number of addresses that will be inserted into ++the AV. + The provider uses this to optimize resource allocations. +-.PP +-\f[I]ep_per_node\f[] : This field indicates the number of endpoints that +-will be associated with a specific fabric, or network, address. ++.RS ++.RE ++.TP ++.B \f[I]ep_per_node\f[] ++This field indicates the number of endpoints that will be associated ++with a specific fabric, or network, address. + If the number of endpoints per node is unknown, this value should be set + to 0. + The provider uses this value to optimize resource allocations. + For example, distributed, parallel applications may set this to the + number of processes allocated per node, times the number of endpoints + each process will open. +-.PP +-\f[I]name\f[] : An optional system name associated with the address +-vector to create or open. ++.RS ++.RE ++.TP ++.B \f[I]name\f[] ++An optional system name associated with the address vector to create or ++open. + Address vectors may be shared across multiple processes which access the + same named domain on the same node. + The name field allows the underlying provider to identify a shared AV. ++.RS ++.RE + .PP + If the name field is non\-NULL and the AV is not opened for read\-only + access, a named AV will be created, if it does not already exist. +-.PP +-\f[I]map_addr\f[] : The map_addr determines the base fi_addr_t address +-that a provider should use when sharing an AV of type FI_AV_MAP between +-processes. ++.TP ++.B \f[I]map_addr\f[] ++The map_addr determines the base fi_addr_t address that a provider ++should use when sharing an AV of type FI_AV_MAP between processes. + Processes that provide the same value for map_addr to a shared AV may + use the same fi_addr_t values returned from an fi_av_insert call. ++.RS ++.RE + .PP + The map_addr may be used by the provider to mmap memory allocated for a + shared AV between processes; however, the provider is not required to +@@ -191,11 +262,15 @@ defined. + If name is non\-NULL and map_addr is 0, then the map_addr used by the + provider will be returned through the attribute structure. + The map_addr field is ignored if name is NULL. +-.PP +-\f[I]flags\f[] : The following flags may be used when opening an AV. +-.IP \[bu] 2 +-\f[I]FI_EVENT\f[] : When the flag FI_EVENT is specified, all insert +-operations on this AV will occur asynchronously. ++.TP ++.B \f[I]flags\f[] ++The following flags may be used when opening an AV. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_EVENT\f[] ++When the flag FI_EVENT is specified, all insert operations on this AV ++will occur asynchronously. + There will be one EQ error entry generated for each failed address + insertion, followed by one non\-error event indicating that the + insertion operation has completed. +@@ -212,6 +287,8 @@ specified in the insert call; the data field will contain the index of + the failed address. + There will be one error completion returned for each address that fails + to insert into the AV. ++.RS ++.RE + .PP + If an AV is opened with FI_EVENT, any insertions attempted before an EQ + is bound to the AV will fail with \-FI_ENOEQ. +@@ -223,16 +300,26 @@ Note that the order of delivery of insert completions may not match the + order in which the calls to fi_av_insert were made. + The only guarantee is that all error completions for a given call to + fi_av_insert will precede the single associated non\-error completion. +-.IP \[bu] 2 +-\f[I]FI_READ\f[] : Opens an AV for read\-only access. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_READ\f[] ++Opens an AV for read\-only access. + An AV opened for read\-only access must be named (name attribute + specified), and the AV must exist. +-.IP \[bu] 2 +-\f[I]FI_SYMMETRIC\f[] : Indicates that each node will be associated with +-the same number of endpoints, the same transport addresses will be +-allocated on each node, and the transport addresses will be sequential. ++.RS ++.RE ++.RE ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_SYMMETRIC\f[] ++Indicates that each node will be associated with the same number of ++endpoints, the same transport addresses will be allocated on each node, ++and the transport addresses will be sequential. + This feature targets distributed applications on large fabrics and + allows for highly\-optimized storage of remote endpoint addressing. ++.RS ++.RE ++.RE + .SS fi_close + .PP + The fi_close call is used to release all resources associated with an +@@ -304,27 +391,36 @@ to fi_av_insert following a call to fi_av_remove always reference a + valid buffer in the fi_addr parameter. + Otherwise it may be difficult to determine what the next assigned index + will be. +-.PP +-\f[I]flags\f[] : The following flag may be passed to AV insertion calls: +-fi_av_insert, fi_av_insertsvc, or fi_av_insertsym. +-.IP \[bu] 2 +-\f[I]FI_MORE\f[] : In order to allow optimized address insertion, the +-application may specify the FI_MORE flag to the insert call to give a +-hint to the provider that more insertion requests will follow, allowing +-the provider to aggregate insertion requests if desired. ++.TP ++.B \f[I]flags\f[] ++The following flag may be passed to AV insertion calls: fi_av_insert, ++fi_av_insertsvc, or fi_av_insertsym. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_MORE\f[] ++In order to allow optimized address insertion, the application may ++specify the FI_MORE flag to the insert call to give a hint to the ++provider that more insertion requests will follow, allowing the provider ++to aggregate insertion requests if desired. + An application may make any number of insertion calls with FI_MORE set, + provided that they are followed by an insertion call without FI_MORE. + This signifies to the provider that the insertion list is complete. + Providers are free to ignore FI_MORE. +-.IP \[bu] 2 +-\f[I]FI_SYNC_ERR\f[] : This flag applies to synchronous insertions only, +-and is used to retrieve error details of failed insertions. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_SYNC_ERR\f[] ++This flag applies to synchronous insertions only, and is used to ++retrieve error details of failed insertions. + If set, the context parameter of insertion calls references an array of + integers, with context set to address of the first element of the array. + The resulting status of attempting to insert each address will be + written to the corresponding array location. + Successful insertions will be updated to 0. + Failures will contain a fabric errno code. ++.RS ++.RE + .SS fi_av_insertsvc + .PP + The fi_av_insertsvc call behaves similar to fi_av_insert, but allows the +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cm.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cm.3 +index 71042ef..d48f467 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cm.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cm.3 +@@ -1,16 +1,25 @@ +-.TH "fi_cm" "3" "2017\-06\-06" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_cm" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_cm \- Connection management operations +-.PP +-fi_connect / fi_listen / fi_accept / fi_reject / fi_shutdown : Manage +-endpoint connection state. +-.PP +-fi_setname / fi_getname / fi_getpeer : Set local, or return local or +-peer endpoint address. +-.PP +-fi_join / fi_close / fi_mc_addr : Join, leave, or retrieve a multicast +-address. ++.TP ++.B fi_connect / fi_listen / fi_accept / fi_reject / fi_shutdown ++Manage endpoint connection state. ++.RS ++.RE ++.TP ++.B fi_setname / fi_getname / fi_getpeer ++Set local, or return local or peer endpoint address. ++.RS ++.RE ++.TP ++.B fi_join / fi_close / fi_mc_addr ++Join, leave, or retrieve a multicast address. ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -44,34 +53,60 @@ fi_addr_t\ fi_mc_addr(struct\ fid_mc\ *mc); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]ep / pep\f[] : Fabric endpoint on which to change connection state. ++.TP ++.B \f[I]ep / pep\f[] ++Fabric endpoint on which to change connection state. ++.RS ++.RE + .PP + \f[I]fid\f[] Active or passive endpoint to get/set address. +-.PP +-\f[I]addr\f[] : Buffer to address. ++.TP ++.B \f[I]addr\f[] ++Buffer to address. + On a set call, the endpoint will be assigned the specified address. + On a get, the local address will be copied into the buffer, up to the + space provided. + For connect, this parameter indicates the peer address to connect to. + The address must be in the same format as that specified using fi_info: + addr_format when the endpoint was created. +-.PP +-\f[I]addrlen\f[] : On input, specifies size of addr buffer. ++.RS ++.RE ++.TP ++.B \f[I]addrlen\f[] ++On input, specifies size of addr buffer. + On output, stores number of bytes written to addr buffer. +-.PP +-\f[I]param\f[] : User\-specified data exchanged as part of the +-connection exchange. +-.PP +-\f[I]paramlen\f[] : Size of param buffer. +-.PP +-\f[I]info\f[] : Fabric information associated with a connection request. +-.PP +-\f[I]mc\f[] : Multicast group associated with an endpoint. +-.PP +-\f[I]flags\f[] : Additional flags for controlling connection operation. +-.PP +-\f[I]context\f[] : User context associated with the request. ++.RS ++.RE ++.TP ++.B \f[I]param\f[] ++User\-specified data exchanged as part of the connection exchange. ++.RS ++.RE ++.TP ++.B \f[I]paramlen\f[] ++Size of param buffer. ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++Fabric information associated with a connection request. ++.RS ++.RE ++.TP ++.B \f[I]mc\f[] ++Multicast group associated with an endpoint. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags for controlling connection operation. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User context associated with the request. ++.RS ++.RE + .SH DESCRIPTION + .PP + Connection management functions are used to connect an +@@ -232,18 +267,24 @@ and paired with the FI_MULTICAST operation flag. + .SH FLAGS + .PP + Except in functions noted below, flags are reserved and must be 0. +-.PP +-\f[I]FI_SEND\f[] : Applies to fi_join. ++.TP ++.B \f[I]FI_SEND\f[] ++Applies to fi_join. + This flag indicates that the endpoint should join the multicast group as + a send only member. + The endpoint must be configured for transmit operations to use this + flag, or an error will occur. +-.PP +-\f[I]FI_RECV\f[] : Applies to fi_join. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Applies to fi_join. + This flag indicates that the endpoint should join the multicast group + with receive permissions only. + The endpoint must be configured for receive operations to use this flag, + or an error will occur. ++.RS ++.RE + .SH RETURN VALUE + .PP + Returns 0 on success. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cntr.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cntr.3 +index a37a2e3..959f306 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cntr.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cntr.3 +@@ -1,21 +1,40 @@ +-.TH "fi_cntr" "3" "2017\-09\-14" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_cntr" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_cntr \- Completion and event counter operations +-.PP +-fi_cntr_open / fi_close : Allocate/free a counter +-.PP +-fi_cntr_read : Read the current value of a counter +-.PP +-fi_cntr_readerr : Reads the number of operations which have completed in +-error. +-.PP +-fi_cntr_add : Increment a counter by a specified value +-.PP +-fi_cntr_set : Set a counter to a specified value +-.PP +-fi_cntr_wait : Wait for a counter to be greater or equal to a threshold +-value ++.TP ++.B fi_cntr_open / fi_close ++Allocate/free a counter ++.RS ++.RE ++.TP ++.B fi_cntr_read ++Read the current value of a counter ++.RS ++.RE ++.TP ++.B fi_cntr_readerr ++Reads the number of operations which have completed in error. ++.RS ++.RE ++.TP ++.B fi_cntr_add ++Increment a counter by a specified value ++.RS ++.RE ++.TP ++.B fi_cntr_set ++Set a counter to a specified value ++.RS ++.RE ++.TP ++.B fi_cntr_wait ++Wait for a counter to be greater or equal to a threshold value ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -44,21 +63,42 @@ int\ fi_cntr_wait(struct\ fid_cntr\ *cntr,\ uint64_t\ threshold, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]domain\f[] : Fabric domain +-.PP +-\f[I]cntr\f[] : Fabric counter +-.PP +-\f[I]attr\f[] : Counter attributes +-.PP +-\f[I]context\f[] : User specified context associated with the counter +-.PP +-\f[I]value\f[] : Value to increment or set counter +-.PP +-\f[I]threshold\f[] : Value to compare counter against +-.PP +-\f[I]timeout\f[] : Time in milliseconds to wait. ++.TP ++.B \f[I]domain\f[] ++Fabric domain ++.RS ++.RE ++.TP ++.B \f[I]cntr\f[] ++Fabric counter ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Counter attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the counter ++.RS ++.RE ++.TP ++.B \f[I]value\f[] ++Value to increment or set counter ++.RS ++.RE ++.TP ++.B \f[I]threshold\f[] ++Value to compare counter against ++.RS ++.RE ++.TP ++.B \f[I]timeout\f[] ++Time in milliseconds to wait. + A negative value indicates infinite timeout. ++.RS ++.RE + .SH DESCRIPTION + .PP + Counters record the number of requested operations that have completed. +@@ -91,20 +131,26 @@ struct\ fi_cntr_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]events\f[] : A counter captures different types of events. ++.TP ++.B \f[I]events\f[] ++A counter captures different types of events. + The specific type which is to counted are one of the following: +-.IP \[bu] 2 +-\f[I]FI_CNTR_EVENTS_COMP\f[] : The counter increments for every +-successful completion that occurs on an associated bound endpoint. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_CNTR_EVENTS_COMP\f[] ++The counter increments for every successful completion that occurs on an ++associated bound endpoint. + The type of completions \-\- sends and/or receives \-\- which are + counted may be restricted using control flags when binding the counter + and the endpoint. + Counters increment on all successful completions, separately from + whether the operation generates an entry in an event queue. +-.PP +-\f[I]wait_obj\f[] : Counters may be associated with a specific wait +-object. ++.RS ++.RE ++.TP ++.B \f[I]wait_obj\f[] ++Counters may be associated with a specific wait object. + Wait objects allow applications to block until the wait object is + signaled, indicating that a counter has reached a specific threshold. + Users may use fi_control to retrieve the underlying wait object +@@ -113,43 +159,65 @@ The following values may be used to specify the type of wait object + associated with a counter: FI_WAIT_NONE, FI_WAIT_UNSPEC, FI_WAIT_SET, + FI_WAIT_FD, and FI_WAIT_MUTEX_COND. + The default is FI_WAIT_NONE. +-.IP \[bu] 2 +-\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block +-(wait) for events on the counter. +-.IP \[bu] 2 +-\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the +-counter using fabric interface calls, such as fi_cntr_wait. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_NONE\f[] ++Used to indicate that the user will not block (wait) for events on the ++counter. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_UNSPEC\f[] ++Specifies that the user will only wait on the counter using fabric ++interface calls, such as fi_cntr_wait. + In this case, the underlying provider may select the most appropriate or + highest performing wait object available, including custom wait + mechanisms. + Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve + the underlying wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_SET\f[] : Indicates that the event counter should use a +-wait set object to wait for events. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_SET\f[] ++Indicates that the event counter should use a wait set object to wait ++for events. + If specified, the wait_set field must reference an existing wait set + object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_FD\f[] : Indicates that the counter should use a file +-descriptor as its wait mechanism. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_FD\f[] ++Indicates that the counter should use a file descriptor as its wait ++mechanism. + A file descriptor wait object must be usable in select, poll, and epoll + routines. + However, a provider may signal an FD wait object by marking it as + readable, writable, or with an error. +-.IP \[bu] 2 +-\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the counter should use a +-pthread mutex and cond variable as a wait object. +-.PP +-\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a +-wait object to which the event counter should attach. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_MUTEX_COND\f[] ++Specifies that the counter should use a pthread mutex and cond variable ++as a wait object. ++.RS ++.RE ++.TP ++.B \f[I]wait_set\f[] ++If wait_obj is FI_WAIT_SET, this field references a wait object to which ++the event counter should attach. + When an event is added to the event counter, the corresponding wait set + will be signaled if all necessary conditions are met. + The use of a wait_set enables an optimized method of waiting for events + across multiple event counters. + This field is ignored if wait_obj is not FI_WAIT_SET. +-.PP +-\f[I]flags\f[] : Flags are reserved for future use, and must be set to +-0. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Flags are reserved for future use, and must be set to 0. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with a counter. +@@ -166,18 +234,27 @@ Access to the counter should be serialized across all calls when + fi_cntr_control is invoked, as it may redirect the implementation of + counter operations. + The following control commands are usable with a counter: +-.PP +-\f[I]FI_GETOPSFLAG (uint64_t *)\f[] : Returns the current default +-operational flags associated with the counter. +-.PP +-\f[I]FI_SETOPSFLAG (uint64_t *)\f[] : Modifies the current default +-operational flags associated with the counter. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the low\-level wait object associated with the counter. ++.TP ++.B \f[I]FI_GETOPSFLAG (uint64_t *)\f[] ++Returns the current default operational flags associated with the ++counter. ++.RS ++.RE ++.TP ++.B \f[I]FI_SETOPSFLAG (uint64_t *)\f[] ++Modifies the current default operational flags associated with the ++counter. ++.RS ++.RE ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the low\-level wait object ++associated with the counter. + The format of the wait\-object is specified during counter creation, + through the counter attributes. + See fi_eq.3 for addition details using control with FI_GETWAIT. ++.RS ++.RE + .SS fi_cntr_read + .PP + The fi_cntr_read call returns the current value of the counter. +@@ -218,9 +295,11 @@ been configured with a wait object of FI_WAIT_NONE or FI_WAIT_SET. + .PP + Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. +-.PP +-fi_cntr_read / fi_cntr_readerr : Returns the current value of the +-counter. ++.TP ++.B fi_cntr_read / fi_cntr_readerr ++Returns the current value of the counter. ++.RS ++.RE + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH NOTES +@@ -233,7 +312,16 @@ fi_cntr_read or fi_cntr_readerr). + A small, but undefined, delay may occur between the counter changing and + the reported value being updated. + However, a final updated value will eventually be reflected in the read +-counter value, with the order of the updates maintained. ++counter value. ++.PP ++Additionally, applications should ensure that the value of a counter is ++stable and not subject to change prior to calling fi_cntr_set or ++fi_cntr_seterr. ++Otherwise, the resulting value of the counter after fi_cntr_set / ++fi_cntr_seterr is undefined, as updates to the counter may be lost. ++A counter value is considered stable if all previous updates using ++fi_cntr_set / fi_cntr_seterr and results of related operations are ++reflected in the observed value of the counter. + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_control.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_control.3 +index 2669e17..c6bc5b3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_control.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_control.3 +@@ -1,4 +1,7 @@ +-.TH "fi_control" "3" "2016\-02\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_control" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_control \- Perform an operation on a fabric resource. +@@ -12,12 +15,21 @@ int\ fi_control(struct\ fid\ *fid,\ int\ command,\ void\ *arg); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fid\f[] : Fabric resource +-.PP +-\f[I]command\f[] : Operation to perform +-.PP +-\f[I]arg\f[] : Optional argument to the command ++.TP ++.B \f[I]fid\f[] ++Fabric resource ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Operation to perform ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional argument to the command ++.RS ++.RE + .SH DESCRIPTION + .PP + The fi_control operation is used to perform one or more operations on a +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cq.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cq.3 +index 723360c..e1e52a2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cq.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cq.3 +@@ -1,24 +1,41 @@ +-.TH "fi_cq" "3" "2017\-12\-06" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_cq" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_cq \- Completion queue operations +-.PP +-fi_cq_open / fi_close : Open/close a completion queue +-.PP +-fi_control : Control CQ operation or attributes. +-.PP +-fi_cq_read / fi_cq_readfrom / fi_cq_readerr : Read a completion from a +-completion queue +-.PP +-fi_cq_sread / fi_cq_sreadfrom : A synchronous (blocking) read that waits +-until a specified condition has been met before reading a completion +-from a completion queue. +-.PP +-fi_cq_signal : Unblock any thread waiting in fi_cq_sread or +-fi_cq_sreadfrom. +-.PP +-fi_cq_strerror : Converts provider specific error information into a +-printable string ++.TP ++.B fi_cq_open / fi_close ++Open/close a completion queue ++.RS ++.RE ++.TP ++.B fi_control ++Control CQ operation or attributes. ++.RS ++.RE ++.TP ++.B fi_cq_read / fi_cq_readfrom / fi_cq_readerr ++Read a completion from a completion queue ++.RS ++.RE ++.TP ++.B fi_cq_sread / fi_cq_sreadfrom ++A synchronous (blocking) read that waits until a specified condition has ++been met before reading a completion from a completion queue. ++.RS ++.RE ++.TP ++.B fi_cq_signal ++Unblock any thread waiting in fi_cq_sread or fi_cq_sreadfrom. ++.RS ++.RE ++.TP ++.B fi_cq_strerror ++Converts provider specific error information into a printable string ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -53,43 +70,85 @@ const\ char\ *\ fi_cq_strerror(struct\ fid_cq\ *cq,\ int\ prov_errno, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]domain\f[] : Open resource domain +-.PP +-\f[I]cq\f[] : Completion queue +-.PP +-\f[I]attr\f[] : Completion queue attributes +-.PP +-\f[I]context\f[] : User specified context associated with the completion +-queue. +-.PP +-\f[I]buf\f[] : For read calls, the data buffer to write completions +-into. ++.TP ++.B \f[I]domain\f[] ++Open resource domain ++.RS ++.RE ++.TP ++.B \f[I]cq\f[] ++Completion queue ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Completion queue attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the completion queue. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++For read calls, the data buffer to write completions into. + For write calls, a completion to insert into the completion queue. + For fi_cq_strerror, an optional buffer that receives printable error + information. +-.PP +-\f[I]count\f[] : Number of CQ entries. +-.PP +-\f[I]len\f[] : Length of data buffer +-.PP +-\f[I]src_addr\f[] : Source address of a completed receive operation +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation +-.PP +-\f[I]command\f[] : Command of control operation to perform on CQ. +-.PP +-\f[I]arg\f[] : Optional control argument +-.PP +-\f[I]cond\f[] : Condition that must be met before a completion is +-generated +-.PP +-\f[I]timeout\f[] : Time in milliseconds to wait. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Number of CQ entries. ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data buffer ++.RS ++.RE ++.TP ++.B \f[I]src_addr\f[] ++Source address of a completed receive operation ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Command of control operation to perform on CQ. ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional control argument ++.RS ++.RE ++.TP ++.B \f[I]cond\f[] ++Condition that must be met before a completion is generated ++.RS ++.RE ++.TP ++.B \f[I]timeout\f[] ++Time in milliseconds to wait. + A negative value indicates infinite timeout. +-.PP +-\f[I]prov_errno\f[] : Provider specific error value +-.PP +-\f[I]err_data\f[] : Provider specific error data related to a completion ++.RS ++.RE ++.TP ++.B \f[I]prov_errno\f[] ++Provider specific error value ++.RS ++.RE ++.TP ++.B \f[I]err_data\f[] ++Provider specific error data related to a completion ++.RS ++.RE + .SH DESCRIPTION + .PP + Completion queues are used to report events associated with data +@@ -121,17 +180,26 @@ struct\ fi_cq_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]size\f[] : Specifies the minimum size of a completion queue. ++.TP ++.B \f[I]size\f[] ++Specifies the minimum size of a completion queue. + A value of 0 indicates that the provider may choose a default value. +-.PP +-\f[I]flags\f[] : Flags that control the configuration of the CQ. +-.IP \[bu] 2 +-\f[I]FI_AFFINITY\f[] : Indicates that the signaling_vector field (see +-below) is valid. +-.PP +-\f[I]format\f[] : Completion queues allow the application to select the +-amount of detail that it must store and report. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Flags that control the configuration of the CQ. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AFFINITY\f[] ++Indicates that the signaling_vector field (see below) is valid. ++.RS ++.RE ++.TP ++.B \f[I]format\f[] ++Completion queues allow the application to select the amount of detail ++that it must store and report. + The format attribute allows the application to select one of several + completion formats, indicating the structure of the data that the + completion queue should return when read. +@@ -139,12 +207,20 @@ Supported formats and the structures that correspond to each are listed + below. + The meaning of the CQ entry fields are defined in the \f[I]Completion + Fields\f[] section. +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_UNSPEC\f[] : If an unspecified format is requested, +-then the CQ will use a provider selected default format. +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_CONTEXT\f[] : Provides only user specified context +-that was associated with the completion. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_CQ_FORMAT_UNSPEC\f[] ++If an unspecified format is requested, then the CQ will use a provider ++selected default format. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_CQ_FORMAT_CONTEXT\f[] ++Provides only user specified context that was associated with the ++completion. ++.RS ++.RE + .IP + .nf + \f[C] +@@ -153,10 +229,14 @@ struct\ fi_cq_entry\ { + }; + \f[] + .fi +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_MSG\f[] : Provides minimal data for processing +-completions, with expanded support for reporting information about +-received messages. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_CQ_FORMAT_MSG\f[] ++Provides minimal data for processing completions, with expanded support ++for reporting information about received messages. ++.RS ++.RE ++.RE + .IP + .nf + \f[C] +@@ -167,10 +247,15 @@ struct\ fi_cq_msg_entry\ { + }; + \f[] + .fi +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_DATA\f[] : Provides data associated with a completion. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_CQ_FORMAT_DATA\f[] ++Provides data associated with a completion. + Includes support for received message length, remote CQ data, and + multi\-receive buffers. ++.RS ++.RE ++.RE + .IP + .nf + \f[C] +@@ -183,9 +268,14 @@ struct\ fi_cq_data_entry\ { + }; + \f[] + .fi +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_TAGGED\f[] : Expands completion data to include +-support for the tagged message interfaces. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_CQ_FORMAT_TAGGED\f[] ++Expands completion data to include support for the tagged message ++interfaces. ++.RS ++.RE ++.RE + .IP + .nf + \f[C] +@@ -199,9 +289,9 @@ struct\ fi_cq_tagged_entry\ { + }; + \f[] + .fi +-.PP +-\f[I]wait_obj\f[] : CQ\[aq]s may be associated with a specific wait +-object. ++.TP ++.B \f[I]wait_obj\f[] ++CQ\[aq]s may be associated with a specific wait object. + Wait objects allow applications to block until the wait object is + signaled, indicating that a completion is available to be read. + Users may use fi_control to retrieve the underlying wait object +@@ -210,52 +300,77 @@ The following values may be used to specify the type of wait object + associated with a CQ: FI_WAIT_NONE, FI_WAIT_UNSPEC, FI_WAIT_SET, + FI_WAIT_FD, and FI_WAIT_MUTEX_COND. + The default is FI_WAIT_NONE. +-.IP \[bu] 2 +-\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block +-(wait) for completions on the CQ. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_NONE\f[] ++Used to indicate that the user will not block (wait) for completions on ++the CQ. + When FI_WAIT_NONE is specified, the application may not call fi_cq_sread + or fi_cq_sreadfrom. +-.IP \[bu] 2 +-\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the +-CQ using fabric interface calls, such as fi_cq_sread or fi_cq_sreadfrom. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_UNSPEC\f[] ++Specifies that the user will only wait on the CQ using fabric interface ++calls, such as fi_cq_sread or fi_cq_sreadfrom. + In this case, the underlying provider may select the most appropriate or + highest performing wait object available, including custom wait + mechanisms. + Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve + the underlying wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_SET\f[] : Indicates that the completion queue should use a +-wait set object to wait for completions. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_SET\f[] ++Indicates that the completion queue should use a wait set object to wait ++for completions. + If specified, the wait_set field must reference an existing wait set + object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_FD\f[] : Indicates that the CQ should use a file descriptor +-as its wait mechanism. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_FD\f[] ++Indicates that the CQ should use a file descriptor as its wait ++mechanism. + A file descriptor wait object must be usable in select, poll, and epoll + routines. + However, a provider may signal an FD wait object by marking it as + readable, writable, or with an error. +-.IP \[bu] 2 +-\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the CQ should use a pthread +-mutex and cond variable as a wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_CRITSEC_COND\f[] : Windows specific. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_MUTEX_COND\f[] ++Specifies that the CQ should use a pthread mutex and cond variable as a ++wait object. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_CRITSEC_COND\f[] ++Windows specific. + Specifies that the CQ should use a critical section and condition + variable as a wait object. +-.PP +-\f[I]signaling_vector\f[] : If the FI_AFFINITY flag is set, this +-indicates the logical cpu number (0..max cpu \- 1) that interrupts +-associated with the CQ should target. ++.RS ++.RE ++.TP ++.B \f[I]signaling_vector\f[] ++If the FI_AFFINITY flag is set, this indicates the logical cpu number ++(0..max cpu \- 1) that interrupts associated with the CQ should target. + This field should be treated as a hint to the provider and may be + ignored if the provider does not support interrupt affinity. +-.PP +-\f[I]wait_cond\f[] : By default, when a completion is inserted into a CQ +-that supports blocking reads (fi_cq_sread/fi_cq_sreadfrom), the +-corresponding wait object is signaled. ++.RS ++.RE ++.TP ++.B \f[I]wait_cond\f[] ++By default, when a completion is inserted into a CQ that supports ++blocking reads (fi_cq_sread/fi_cq_sreadfrom), the corresponding wait ++object is signaled. + Users may specify a condition that must first be met before the wait is + satisfied. + This field indicates how the provider should interpret the cond field, + which describes the condition needed to signal the wait object. ++.RS ++.RE + .PP + A wait condition should be treated as an optimization. + Providers are not required to meet the requirements of the condition +@@ -272,14 +387,17 @@ The threshold indicates the number of entries that are to be queued + before at the CQ before the wait is satisfied. + .PP + This field is ignored if wait_obj is set to FI_WAIT_NONE. +-.PP +-\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a +-wait object to which the completion queue should attach. ++.TP ++.B \f[I]wait_set\f[] ++If wait_obj is FI_WAIT_SET, this field references a wait object to which ++the completion queue should attach. + When an event is inserted into the completion queue, the corresponding + wait set will be signaled if all necessary conditions are met. + The use of a wait_set enables an optimized method of waiting for events + across multiple event and completion queues. + This field is ignored if wait_obj is not FI_WAIT_SET. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with a completion +@@ -297,14 +415,17 @@ specific details of the completion queue. + Access to the CQ should be serialized across all calls when fi_control + is invoked, as it may redirect the implementation of CQ operations. + The following control commands are usable with a CQ. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the low\-level wait object associated with the CQ. ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the low\-level wait object ++associated with the CQ. + The format of the wait\-object is specified during CQ creation, through + the CQ attributes. + The fi_control arg parameter should be an address where a pointer to the + returned wait object will be written. + See fi_eq.3 for addition details using fi_control with FI_GETWAIT. ++.RS ++.RE + .SS fi_cq_read + .PP + The fi_cq_read operation performs a non\-blocking read of completion +@@ -343,26 +464,29 @@ parameter. + Returned source addressing data is converted from the native address + used by the underlying fabric into an fi_addr_t, which may be used in + transmit operations. +-Typically, returning fi_addr_t requires that the source address be +-inserted into the address vector associated with the receiving endpoint. ++Under most circumstances, returning fi_addr_t requires that the source ++address already have been inserted into the address vector associated ++with the receiving endpoint. ++This is true for address vectors of type FI_AV_TABLE. ++In select providers when FI_AV_MAP is used, source addresses may be ++converted algorithmically into a usable fi_addr_t, even though the ++source address has not been inserted into the address vector. ++This is permitted by the API, as it allows the provider to avoid address ++look\-up as part of receive message processing. ++In no case do providers insert addresses into an AV separate from an ++application calling fi_av_insert or similar call. ++.PP + For endpoints allocated using the FI_SOURCE_ERR capability, if the +-source address has not been inserted into the address vector, +-fi_cq_readfrom will return \-FI_EAVAIL. ++source address cannot be converted into a valid fi_addr_t value, ++fi_cq_readfrom will return \-FI_EAVAIL, even if the data were received ++successfully. + The completion will then be reported through fi_cq_readerr with error + code \-FI_EADDRNOTAVAIL. + See fi_cq_readerr for details. + .PP + If FI_SOURCE is specified without FI_SOURCE_ERR, source addresses which +-cannot be mapped to a local fi_addr_t will be reported as ++cannot be mapped to a usable fi_addr_t will be reported as + FI_ADDR_NOTAVAIL. +-The behavior is dependent on the type of address vector in use. +-For AVs of type FI_AV_MAP, source addresses may be mapped directly to an +-fi_addr_t value, even if the source address were not inserted into the +-AV. +-This allows the provider to optimize the reporting of the source +-fi_addr_t without the overhead of verifying whether the address is in +-the AV. +-If full address validation is necessary, FI_SOURCE_ERR must be used. + .SS fi_cq_sread / fi_cq_sreadfrom + .PP + The fi_cq_sread and fi_cq_sreadfrom calls are the blocking equivalent +@@ -410,11 +534,22 @@ information into a printable string for debugging purposes. + See field details below for more information on the use of err_data and + err_data_size. + .PP +-Notable completion error codes are given below. ++Note that error completions are generated for all operations, including ++those for which a completion was not requested (e.g. ++an endpoint is configured with FI_SELECTIVE_COMPLETION, but the request ++did not have the FI_COMPLETION flag set). ++In such cases, providers will return as much information as made ++available by the underlying software and hardware about the failure, ++other fields will be set to NULL or 0. ++This includes the op_context value, which may not have been provided or ++was ignored on input as part of the transfer. + .PP +-\f[I]FI_EADDRNOTAVAIL\f[] : This error code is used by CQs configured +-with FI_SOURCE_ERR to report completions for which a matching fi_addr_t +-source address could not be found. ++Notable completion error codes are given below. ++.TP ++.B \f[I]FI_EADDRNOTAVAIL\f[] ++This error code is used by CQs configured with FI_SOURCE_ERR to report ++completions for which a usable fi_addr_t source address could not be ++found. + An error code of FI_EADDRNOTAVAIL indicates that the data transfer was + successfully received and processed, with the fi_cq_err_entry fields + containing information about the completion. +@@ -423,6 +558,8 @@ The source address will be in the same format as specified through the + fi_info addr_format field for the opened domain. + This may be passed directly into an fi_av_insert call to add the source + address to the address vector. ++.RS ++.RE + .SS fi_cq_signal + .PP + The fi_cq_signal call will unblock any thread waiting in fi_cq_sread or +@@ -436,81 +573,109 @@ with a wait object. + The CQ entry data structures share many of the same fields. + The meanings of these fields are the same for all CQ entry structure + formats. +-.PP +-\f[I]op_context\f[] : The operation context is the application specified +-context value that was provided with an asynchronous operation. ++.TP ++.B \f[I]op_context\f[] ++The operation context is the application specified context value that ++was provided with an asynchronous operation. + The op_context field is valid for all completions that are associated + with an asynchronous operation. ++.RS ++.RE + .PP + For completion events that are not associated with a posted operation, + this field will be set to NULL. + This includes completions generated at the target in response to RMA + write operations that carry CQ data (FI_REMOTE_WRITE | FI_REMOTE_CQ_DATA + flags set), when the FI_RX_CQ_DATA mode bit is not required. +-.PP +-\f[I]flags\f[] : This specifies flags associated with the completed +-operation. ++.TP ++.B \f[I]flags\f[] ++This specifies flags associated with the completed operation. + The \f[I]Completion Flags\f[] section below lists valid flag values. + Flags are set for all relevant completions. +-.PP +-\f[I]len\f[] : This len field only applies to completed receive +-operations (e.g. ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++This len field only applies to completed receive operations (e.g. + fi_recv, fi_trecv, etc.). + It indicates the size of received \f[I]message\f[] data \-\- i.e. + how many data bytes were placed into the associated receive buffer by a + corresponding fi_send/fi_tsend/et al call. + If an endpoint has been configured with the FI_MSG_PREFIX mode, the len + also reflects the size of the prefix buffer. +-.PP +-\f[I]buf\f[] : The buf field is only valid for completed receive +-operations, and only applies when the receive buffer was posted with the +-FI_MULTI_RECV flag. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++The buf field is only valid for completed receive operations, and only ++applies when the receive buffer was posted with the FI_MULTI_RECV flag. + In this case, buf points to the starting location where the receive data + was placed. +-.PP +-\f[I]data\f[] : The data field is only valid if the FI_REMOTE_CQ_DATA +-completion flag is set, and only applies to receive completions. ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++The data field is only valid if the FI_REMOTE_CQ_DATA completion flag is ++set, and only applies to receive completions. + If FI_REMOTE_CQ_DATA is set, this field will contain the completion data + provided by the peer as part of their transmit request. + The completion data will be given in host byte order. +-.PP +-\f[I]tag\f[] : A tag applies only to received messages that occur using +-the tagged interfaces. ++.RS ++.RE ++.TP ++.B \f[I]tag\f[] ++A tag applies only to received messages that occur using the tagged ++interfaces. + This field contains the tag that was included with the received message. + The tag will be in host byte order. +-.PP +-\f[I]olen\f[] : The olen field applies to received messages. ++.RS ++.RE ++.TP ++.B \f[I]olen\f[] ++The olen field applies to received messages. + It is used to indicate that a received message has overrun the available + buffer space and has been truncated. + The olen specifies the amount of data that did not fit into the + available receive buffer and was discarded. +-.PP +-\f[I]err\f[] : This err code is a positive fabric errno associated with +-a completion. ++.RS ++.RE ++.TP ++.B \f[I]err\f[] ++This err code is a positive fabric errno associated with a completion. + The err value indicates the general reason for an error, if one + occurred. + See fi_errno.3 for a list of possible error codes. +-.PP +-\f[I]prov_errno\f[] : On an error, prov_errno may contain a provider +-specific error code. ++.RS ++.RE ++.TP ++.B \f[I]prov_errno\f[] ++On an error, prov_errno may contain a provider specific error code. + The use of this field and its meaning is provider specific. + It is intended to be used as a debugging aid. + See fi_cq_strerror for additional details on converting this error value + into a human readable string. +-.PP +-\f[I]err_data\f[] : On an error, err_data may reference a provider +-specific amount of data associated with an error. ++.RS ++.RE ++.TP ++.B \f[I]err_data\f[] ++On an error, err_data may reference a provider specific amount of data ++associated with an error. + The use of this field and its meaning is provider specific. + It is intended to be used as a debugging aid. + See fi_cq_strerror for additional details on converting this error data + into a human readable string. +-.PP +-\f[I]err_data_size\f[] : On input, err_data_size indicates the size of +-the err_data buffer in bytes. ++.RS ++.RE ++.TP ++.B \f[I]err_data_size\f[] ++On input, err_data_size indicates the size of the err_data buffer in ++bytes. + On output, err_data_size will be set to the number of bytes copied to + the err_data buffer. + The err_data information is typically used with fi_cq_strerror to + provide details about the type of error that occurred. ++.RS ++.RE + .PP + For compatibility purposes, if err_data_size is 0 on input, or the + fabric was opened with release < 1.5, err_data will be set to a data +@@ -524,62 +689,98 @@ ensure that the buffer referenced by err_data does not change. + Completion flags provide additional details regarding the completed + operation. + The following completion flags are defined. +-.PP +-\f[I]FI_SEND\f[] : Indicates that the completion was for a send +-operation. ++.TP ++.B \f[I]FI_SEND\f[] ++Indicates that the completion was for a send operation. + This flag may be combined with an FI_MSG or FI_TAGGED flag. +-.PP +-\f[I]FI_RECV\f[] : Indicates that the completion was for a receive +-operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Indicates that the completion was for a receive operation. + This flag may be combined with an FI_MSG or FI_TAGGED flag. +-.PP +-\f[I]FI_RMA\f[] : Indicates that an RMA operation completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_RMA\f[] ++Indicates that an RMA operation completed. + This flag may be combined with an FI_READ, FI_WRITE, FI_REMOTE_READ, or + FI_REMOTE_WRITE flag. +-.PP +-\f[I]FI_ATOMIC\f[] : Indicates that an atomic operation completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_ATOMIC\f[] ++Indicates that an atomic operation completed. + This flag may be combined with an FI_READ, FI_WRITE, FI_REMOTE_READ, or + FI_REMOTE_WRITE flag. +-.PP +-\f[I]FI_MSG\f[] : Indicates that a message\-based operation completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_MSG\f[] ++Indicates that a message\-based operation completed. + This flag may be combined with an FI_SEND or FI_RECV flag. +-.PP +-\f[I]FI_TAGGED\f[] : Indicates that a tagged message operation +-completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_TAGGED\f[] ++Indicates that a tagged message operation completed. + This flag may be combined with an FI_SEND or FI_RECV flag. +-.PP +-\f[I]FI_MULTICAST\f[] : Indicates that a multicast operation completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTICAST\f[] ++Indicates that a multicast operation completed. + This flag may be combined with FI_MSG and relevant flags. + This flag is only guaranteed to be valid for received messages if the + endpoint has been configured with FI_SOURCE. +-.PP +-\f[I]FI_READ\f[] : Indicates that a locally initiated RMA or atomic read +-operation has completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_READ\f[] ++Indicates that a locally initiated RMA or atomic read operation has ++completed. + This flag may be combined with an FI_RMA or FI_ATOMIC flag. +-.PP +-\f[I]FI_WRITE\f[] : Indicates that a locally initiated RMA or atomic +-write operation has completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_WRITE\f[] ++Indicates that a locally initiated RMA or atomic write operation has ++completed. + This flag may be combined with an FI_RMA or FI_ATOMIC flag. +-.PP +-\f[I]FI_REMOTE_READ\f[] : Indicates that a remotely initiated RMA or +-atomic read operation has completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_READ\f[] ++Indicates that a remotely initiated RMA or atomic read operation has ++completed. + This flag may be combined with an FI_RMA or FI_ATOMIC flag. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : Indicates that a remotely initiated RMA or +-atomic write operation has completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++Indicates that a remotely initiated RMA or atomic write operation has ++completed. + This flag may be combined with an FI_RMA or FI_ATOMIC flag. +-.PP +-\f[I]FI_REMOTE_CQ_DATA\f[] : This indicates that remote CQ data is +-available as part of the completion. +-.PP +-\f[I]FI_MULTI_RECV\f[] : This flag applies to receive buffers that were +-posted with the FI_MULTI_RECV flag set. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_CQ_DATA\f[] ++This indicates that remote CQ data is available as part of the ++completion. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTI_RECV\f[] ++This flag applies to receive buffers that were posted with the ++FI_MULTI_RECV flag set. + This completion flag indicates that the original receive buffer + referenced by the completion has been consumed and was released by the + provider. + Providers may set this flag on the last message that is received into + the multi\- recv buffer, or may generate a separate completion that + indicates that the buffer has been released. ++.RS ++.RE + .PP + Applications can distinguish between these two cases by examining the + completion entry flags field. +@@ -592,6 +793,165 @@ received message. + If other flag bits are zero, the provider is reporting that the + multi\-recv buffer has been released, and the completion entry is not + associated with a received message. ++.TP ++.B \f[I]FI_MORE\f[] ++See the \[aq]Buffered Receives\[aq] section in \f[C]fi_msg\f[](3) for ++more details. ++This flag is associated with receive completions on endpoints that have ++FI_BUFFERED_RECV mode enabled. ++When set to one, it indicates that the buffer referenced by the ++completion is limited by the FI_OPT_BUFFERED_LIMIT threshold, and ++additional message data must be retrieved by the application using an ++FI_CLAIM operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_CLAIM\f[] ++See the \[aq]Buffered Receives\[aq] section in \f[C]fi_msg\f[](3) for ++more details. ++This flag is set on completions associated with receive operations that ++claim buffered receive data. ++Note that this flag only applies to endpoints configured with the ++FI_BUFFERED_RECV mode bit. ++.RS ++.RE ++.SH COMPLETION EVENT SEMANTICS ++.PP ++Libfabric defines several completion \[aq]levels\[aq], identified using ++operational flags. ++Each flag indicates the soonest that a completion event may be generated ++by a provider, and the assumptions that an application may make upon ++processing a completion. ++The operational flags are defined below, along with an example of how a ++provider might implement the semantic. ++Note that only meeting the semantic is required of the provider and not ++the implementation. ++Providers may implement stronger completion semantics than necessary for ++a given operation, but only the behavior defined by the completion level ++is guaranteed. ++.PP ++To help understand the conceptual differences in completion levels, ++consider mailing a letter. ++Placing the letter into the local mailbox for pick\-up is similar to ++\[aq]inject complete\[aq]. ++Having the letter picked up and dropped off at the destination mailbox ++is equivalent to \[aq]transmit complete\[aq]. ++The \[aq]delivery complete\[aq] semantic is a stronger guarantee, with a ++person at the destination signing for the letter. ++However, the person who signed for the letter is not necessarily the ++intended recipient. ++The \[aq]match complete\[aq] option is similar to delivery complete, but ++requires the intended recipient to sign for the letter. ++.PP ++The \[aq]commit complete\[aq] level has different semantics than the ++previously mentioned levels. ++Commit complete would be closer to the the letter arriving at the ++destination and being placed into a fire proof safe. ++.PP ++The operational flags for the described completion levels are defined ++below. ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Indicates that a completion should be generated when the source ++buffer(s) may be reused. ++A completion guarantees that the buffers will not be read from again and ++the application may reclaim them. ++No other guarantees are made with respect to the state of the operation. ++.RS ++.RE ++.PP ++Example: A provider may generate this completion event after copying the ++source buffer into a network buffer, either in host memory or on the ++NIC. ++An inject completion does not indicate that the data has been ++transmitted onto the network, and a local error could occur after the ++completion event has been generated that could prevent it from being ++transmitted. ++.PP ++Inject complete allows for the fastest completion reporting (and, hence, ++buffer reuse), but provides the weakest guarantees against network ++errors. ++.PP ++Note: This flag is used to control when a completion entry is inserted ++into a completion queue. ++It does not apply to operations that do not generate a completion queue ++entry, such as the fi_inject operation, and is not subject to the ++inject_size message limit restriction. ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Indicates that a completion should be generated when the transmit ++operation has completed relative to the local provider. ++The exact behavior is dependent on the endpoint type. ++.RS ++.RE ++.PP ++For reliable endpoints: ++.PP ++Indicates that a completion should be generated when the operation has ++been delivered to the peer endpoint. ++A completion guarantees that the operation is no longer dependent on the ++fabric or local resources. ++The state of the operation at the peer endpoint is not defined. ++.PP ++Example: A provider may generate a transmit complete event upon ++receiving an ack from the peer endpoint. ++The state of the message at the peer is unknown and may be buffered in ++the target NIC at the time the ack has been generated. ++.PP ++For unreliable endpoints: ++.PP ++Indicates that a completion should be generated when the operation has ++been delivered to the fabric. ++A completion guarantees that the operation is no longer dependent on ++local resources. ++The state of the operation within the fabric is not defined. ++.TP ++.B \f[I]FI_DELIVERY_COMPLETE\f[] ++Indicates that a completion should not be generated until an operation ++has been processed by the destination endpoint(s). ++A completion guarantees that the result of the operation is available; ++however, additional steps may need to be taken at the destination to ++retrieve the results. ++For example, an application may need to provide a receive buffers in ++order to retrieve messages that were buffered by the provider. ++.RS ++.RE ++.PP ++Delivery complete indicates that the message has been processed by the ++peer. ++If an application buffer was ready to receive the results of the message ++when it arrived, then delivery complete indicates that the data was ++placed into the application\[aq]s buffer. ++.PP ++This completion mode applies only to reliable endpoints. ++For operations that return data to the initiator, such as RMA read or ++atomic\-fetch, the source endpoint is also considered a destination ++endpoint. ++This is the default completion mode for such operations. ++.TP ++.B \f[I]FI_MATCH_COMPLETE\f[] ++Indicates that a completion should be generated only after the operation ++has been matched with an application specified buffer. ++Operations using this completion semantic are dependent on the ++application at the target claiming the message or results. ++As a result, match complete may involve additional provider level ++acknowledgements or lengthy delays. ++However, this completion model enables peer applications to synchronize ++their execution. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMMIT_COMPLETE\f[] ++Indicates that a completion should not be generated (locally or at the ++peer) until the result of an operation have been made persistent. ++A completion guarantees that the result is both available and durable, ++in the case of power failure. ++.RS ++.RE ++.PP ++This completion mode applies only to operations that target persistent ++memory regions over reliable endpoints. ++This completion mode is experimental. + .SH NOTES + .PP + A completion queue must be bound to at least one enabled endpoint before +@@ -615,9 +975,12 @@ CQ will result in it returning an FI_EOVERRUN error event. + Overrun completion queues are considered fatal and may not be used to + report additional completions once the overrun occurs. + .SH RETURN VALUES +-.PP +-fi_cq_open / fi_cq_signal : Returns 0 on success. ++.TP ++.B fi_cq_open / fi_cq_signal ++Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. ++.RS ++.RE + .PP + fi_cq_read / fi_cq_readfrom / fi_cq_readerr fi_cq_sread / + fi_cq_sreadfrom : On success, returns the number of completion events +@@ -625,9 +988,12 @@ retrieved from the completion queue. + On error, a negative value corresponding to fabric errno is returned. + If no completions are available to return from the CQ, \-FI_EAGAIN will + be returned. +-.PP +-fi_cq_strerror : Returns a character string interpretation of the +-provider specific error returned with a completion. ++.TP ++.B fi_cq_strerror ++Returns a character string interpretation of the provider specific error ++returned with a completion. ++.RS ++.RE + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH SEE ALSO +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_domain.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_domain.3 +index 9aaae9b..a358698 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_domain.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_domain.3 +@@ -1,5 +1,8 @@ + .\"t +-.TH "fi_domain" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_domain" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_domain \- Open a fabric access domain +@@ -24,24 +27,43 @@ int\ fi_open_ops(struct\ fid\ *domain,\ const\ char\ *name,\ uint64_t\ flags, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fabric\f[] : Fabric domain +-.PP +-\f[I]info\f[] : Fabric information, including domain capabilities and +-attributes. +-.PP +-\f[I]domain\f[] : An opened access domain. +-.PP +-\f[I]context\f[] : User specified context associated with the domain. ++.TP ++.B \f[I]fabric\f[] ++Fabric domain ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++Fabric information, including domain capabilities and attributes. ++.RS ++.RE ++.TP ++.B \f[I]domain\f[] ++An opened access domain. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the domain. + This context is returned as part of any asynchronous event associated + with the domain. +-.PP +-\f[I]eq\f[] : Event queue for asynchronous operations initiated on the +-domain. +-.PP +-\f[I]name\f[] : Name associated with an interface. +-.PP +-\f[I]ops\f[] : Fabric interface operations. ++.RS ++.RE ++.TP ++.B \f[I]eq\f[] ++Event queue for asynchronous operations initiated on the domain. ++.RS ++.RE ++.TP ++.B \f[I]name\f[] ++Name associated with an interface. ++.RS ++.RE ++.TP ++.B \f[I]ops\f[] ++Fabric interface operations. ++.RS ++.RE + .SH DESCRIPTION + .PP + An access domain typically refers to a physical or virtual NIC or +@@ -145,25 +167,33 @@ accessed by multiple threads. + Applications which can guarantee serialization in their access of + provider allocated resources and interfaces enables a provider to + eliminate lower\-level locks. +-.PP +-\f[I]FI_THREAD_UNSPEC\f[] : This value indicates that no threading model +-has been defined. ++.TP ++.B \f[I]FI_THREAD_UNSPEC\f[] ++This value indicates that no threading model has been defined. + It may be used on input hints to the fi_getinfo call. + When specified, providers will return a threading model that allows for + the greatest level of parallelism. +-.PP +-\f[I]FI_THREAD_SAFE\f[] : A thread safe serialization model allows a +-multi\-threaded application to access any allocated resources through +-any interface without restriction. ++.RS ++.RE ++.TP ++.B \f[I]FI_THREAD_SAFE\f[] ++A thread safe serialization model allows a multi\-threaded application ++to access any allocated resources through any interface without ++restriction. + All providers are required to support FI_THREAD_SAFE. +-.PP +-\f[I]FI_THREAD_FID\f[] : A fabric descriptor (FID) serialization model +-requires applications to serialize access to individual fabric resources +-associated with data transfer operations and completions. ++.RS ++.RE ++.TP ++.B \f[I]FI_THREAD_FID\f[] ++A fabric descriptor (FID) serialization model requires applications to ++serialize access to individual fabric resources associated with data ++transfer operations and completions. + Multiple threads must be serialized when accessing the same endpoint, + transmit context, receive context, completion queue, counter, wait set, + or poll set. + Serialization is required only by threads accessing the same object. ++.RS ++.RE + .PP + For example, one thread may be initiating a data transfer on an + endpoint, while another thread reads from a completion queue associated +@@ -181,21 +211,26 @@ needing internal locking when handling data transfers. + Conceptually, FI_THREAD_FID maps well to providers that implement fabric + services in hardware and provide separate command queues to different + data flows. +-.PP +-\f[I]FI_THREAD_ENDPOINT\f[] : The endpoint threading model is similar to +-FI_THREAD_FID, but with the added restriction that serialization is +-required when accessing the same endpoint, even if multiple transmit and +-receive contexts are used. ++.TP ++.B \f[I]FI_THREAD_ENDPOINT\f[] ++The endpoint threading model is similar to FI_THREAD_FID, but with the ++added restriction that serialization is required when accessing the same ++endpoint, even if multiple transmit and receive contexts are used. + Conceptually, FI_THREAD_ENDPOINT maps well to providers that implement + fabric services in hardware but use a single command queue to access + different data flows. +-.PP +-\f[I]FI_THREAD_COMPLETION\f[] : The completion threading model is +-intended for providers that make use of manual progress. ++.RS ++.RE ++.TP ++.B \f[I]FI_THREAD_COMPLETION\f[] ++The completion threading model is intended for providers that make use ++of manual progress. + Applications must serialize access to all objects that are associated + through the use of having a shared completion structure. + This includes endpoint, transmit context, receive context, completion + queue, counter, wait set, and poll set objects. ++.RS ++.RE + .PP + For example, threads must serialize access to an endpoint and its bound + completion queue(s) and/or counters. +@@ -204,9 +239,12 @@ serialized. + .PP + The use of FI_THREAD_COMPLETION can increase parallelism over + FI_THREAD_SAFE, but requires the use of isolated resources. +-.PP +-\f[I]FI_THREAD_DOMAIN\f[] : A domain serialization model requires +-applications to serialize access to all objects belonging to a domain. ++.TP ++.B \f[I]FI_THREAD_DOMAIN\f[] ++A domain serialization model requires applications to serialize access ++to all objects belonging to a domain. ++.RS ++.RE + .SS Progress Models (control_progress / data_progress) + .PP + Progress is the ability of the underlying implementation to complete +@@ -238,33 +276,40 @@ and acknowledgement processing. + .PP + To balance between performance and ease of use, two progress models are + defined. +-.PP +-\f[I]FI_PROGRESS_UNSPEC\f[] : This value indicates that no progress +-model has been defined. ++.TP ++.B \f[I]FI_PROGRESS_UNSPEC\f[] ++This value indicates that no progress model has been defined. + It may be used on input hints to the fi_getinfo call. +-.PP +-\f[I]FI_PROGRESS_AUTO\f[] : This progress model indicates that the +-provider will make forward progress on an asynchronous operation without +-further intervention by the application. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROGRESS_AUTO\f[] ++This progress model indicates that the provider will make forward ++progress on an asynchronous operation without further intervention by ++the application. + When FI_PROGRESS_AUTO is provided as output to fi_getinfo in the absence + of any progress hints, it often indicates that the desired functionality + is implemented by the provider hardware or is a standard service of the + operating system. ++.RS ++.RE + .PP + All providers are required to support FI_PROGRESS_AUTO. + However, if a provider does not natively support automatic progress, + forcing the use of FI_PROGRESS_AUTO may result in threads being + allocated below the fabric interfaces. +-.PP +-\f[I]FI_PROGRESS_MANUAL\f[] : This progress model indicates that the +-provider requires the use of an application thread to complete an +-asynchronous request. ++.TP ++.B \f[I]FI_PROGRESS_MANUAL\f[] ++This progress model indicates that the provider requires the use of an ++application thread to complete an asynchronous request. + When manual progress is set, the provider will attempt to advance an + asynchronous operation forward when the application attempts to wait on + or read an event queue, completion queue, or counter where the completed + operation will be reported. + Progress also occurs when the application processes a poll or wait set + that has been associated with the event or completion queue. ++.RS ++.RE + .PP + Only wait operations defined by the fabric interface will result in an + operation progressing. +@@ -301,18 +346,24 @@ provider implementation and protocol may still provide some level of + protection against overruns. + However, such protection is not guaranteed. + The following values for resource management are defined. +-.PP +-\f[I]FI_RM_UNSPEC\f[] : This value indicates that no resource management +-model has been defined. ++.TP ++.B \f[I]FI_RM_UNSPEC\f[] ++This value indicates that no resource management model has been defined. + It may be used on input hints to the fi_getinfo call. +-.PP +-\f[I]FI_RM_DISABLED\f[] : The provider is free to select an +-implementation and protocol that does not protect against resource +-overruns. ++.RS ++.RE ++.TP ++.B \f[I]FI_RM_DISABLED\f[] ++The provider is free to select an implementation and protocol that does ++not protect against resource overruns. + The application is responsible for resource protection. +-.PP +-\f[I]FI_RM_ENABLED\f[] : Resource management is enabled for this +-provider domain. ++.RS ++.RE ++.TP ++.B \f[I]FI_RM_ENABLED\f[] ++Resource management is enabled for this provider domain. ++.RS ++.RE + .PP + The behavior of the various resource management options depends on + whether the endpoint is reliable or unreliable, as well as provider and +@@ -322,7 +373,7 @@ The table assumes that all peers enable or disable RM the same. + .PP + .TS + tab(@); +-c c c c c. ++cw(8.0n) cw(16.0n) cw(16.0n) cw(15.3n) cw(14.6n). + T{ + Resource + T}@T{ +@@ -438,17 +489,21 @@ T} + .PP + The resource column indicates the resource being accessed by a data + transfer operation. +-.PP +-\f[I]Tx Ctx / Rx Ctx\f[] : Refers to the transmit/receive contexts when +-a data transfer operation is submitted. ++.TP ++.B \f[I]Tx Ctx / Rx Ctx\f[] ++Refers to the transmit/receive contexts when a data transfer operation ++is submitted. + When RM is enabled, attempting to submit a request will fail if the + context is full. + If RM is disabled, an undefined error (provider specific) will occur. + Such errors should be considered fatal to the context, and applications + must take steps to avoid queue overruns. +-.PP +-\f[I]Tx CQ / Rx CQ\f[] : Refers to the completion queue associated with +-the Tx or Rx context when a local operation completes. ++.RS ++.RE ++.TP ++.B \f[I]Tx CQ / Rx CQ\f[] ++Refers to the completion queue associated with the Tx or Rx context when ++a local operation completes. + When RM is disabled, applications must take care to ensure that + completion queues do not get overrun. + When an overrun occurs, an undefined, but fatal, error will occur +@@ -463,9 +518,12 @@ that could result in CQ overruns, or internally retrying requests (which + will be hidden from the application). + See notes at the end of this section regarding CQ resource management + restrictions. +-.PP +-\f[I]Target EP / No Rx Buffer\f[] : Target EP refers to resources +-associated with the endpoint that is the target of a transmit operation. ++.RS ++.RE ++.TP ++.B \f[I]Target EP / No Rx Buffer\f[] ++Target EP refers to resources associated with the endpoint that is the ++target of a transmit operation. + This includes the target endpoint\[aq]s receive queue, posted receive + buffers (no Rx buffers), the receive side completion queue, and other + related packet processing queues. +@@ -475,10 +533,12 @@ incoming messages, received messages will be dropped. + For reliable endpoints, if RM is disabled, the transmit operation will + complete in error. + If RM is enabled, the provider will internally retry the operation. +-.PP +-\f[I]Rx Buffer Overrun\f[] : This refers to buffers posted to receive +-incoming tagged or untagged messages, with the behavior defined from the +-viewpoint of the sender. ++.RS ++.RE ++.TP ++.B \f[I]Rx Buffer Overrun\f[] ++This refers to buffers posted to receive incoming tagged or untagged ++messages, with the behavior defined from the viewpoint of the sender. + The behavior for handling received messages that are larger than the + buffers provided by the application is provider specific. + Providers may either truncate the message and report a successful +@@ -492,13 +552,18 @@ application buffer is made available. + The completion status may also be dependent upon the completion model + selected byt the application (e.g. + FI_DELIVERY_COMPLETE versus FI_TRANSMIT_COMPLETE). +-.PP +-\f[I]Unmatched RMA / RMA Overrun\f[] : Unmatched RMA and RMA overruns +-deal with the processing of RMA and atomic operations. ++.RS ++.RE ++.TP ++.B \f[I]Unmatched RMA / RMA Overrun\f[] ++Unmatched RMA and RMA overruns deal with the processing of RMA and ++atomic operations. + Unlike send operations, RMA operations that attempt to access a memory + address that is either not registered for such operations, or attempt to + access outside of the target memory region will fail, resulting in a + transmit error. ++.RS ++.RE + .PP + When a resource management error occurs on an endpoint, the endpoint is + transitioned into a disabled state. +@@ -533,15 +598,21 @@ size as the endpoint queue(s) that are bound to it. + Specifies the type of address vectors that are usable with this domain. + For additional details on AV type, see \f[C]fi_av\f[](3). + The following values may be specified. +-.PP +-\f[I]FI_AV_UNSPEC\f[] : Any address vector format is requested and +-supported. +-.PP +-\f[I]FI_AV_MAP\f[] : Only address vectors of type AV map are requested +-or supported. +-.PP +-\f[I]FI_AV_TABLE\f[] : Only address vectors of type AV index are +-requested or supported. ++.TP ++.B \f[I]FI_AV_UNSPEC\f[] ++Any address vector format is requested and supported. ++.RS ++.RE ++.TP ++.B \f[I]FI_AV_MAP\f[] ++Only address vectors of type AV map are requested or supported. ++.RS ++.RE ++.TP ++.B \f[I]FI_AV_TABLE\f[] ++Only address vectors of type AV index are requested or supported. ++.RS ++.RE + .PP + Address vectors are only used by connectionless endpoints. + Applications that require the use of a specific type of address vector +@@ -557,60 +628,85 @@ optimal AV type supported by this domain. + Defines memory registration specific mode bits used with this domain. + Full details on MR mode options are available in \f[C]fi_mr\f[](3). + The following values may be specified. +-.PP +-\f[I]FI_MR_LOCAL\f[] : The provider is optimized around having +-applications register memory for locally accessed data buffers. ++.TP ++.B \f[I]FI_MR_LOCAL\f[] ++The provider is optimized around having applications register memory for ++locally accessed data buffers. + Data buffers used in send and receive operations and as the source + buffer for RMA and atomic operations must be registered by the + application for access domains opened with this capability. +-.PP +-\f[I]FI_MR_RAW\f[] : The provider requires additional setup as part of +-their memory registration process. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_RAW\f[] ++The provider requires additional setup as part of their memory ++registration process. + This mode is required by providers that use a memory key that is larger + than 64\-bits. +-.PP +-\f[I]FI_MR_VIRT_ADDR\f[] : Registered memory regions are referenced by +-peers using the virtual address of the registered memory region, rather +-than a 0\-based offset. +-.PP +-\f[I]FI_MR_ALLOCATED\f[] : Indicates that memory registration occurs on +-allocated data buffers, and physical pages must back all virtual +-addresses being registered. +-.PP +-\f[I]FI_MR_PROV_KEY\f[] : Memory registration keys are selected and +-returned by the provider. +-.PP +-\f[I]FI_MR_MMU_NOTIFY\f[] : Indicates that the application is +-responsible for notifying the provider when the page tables referencing +-a registered memory region may have been updated. +-.PP +-\f[I]FI_MR_RMA_EVENT\f[] : Indicates that the memory regions associated +-with completion counters must be explicitly enabled after being bound to +-any counter. +-.PP +-\f[I]FI_MR_ENDPOINT\f[] : Memory registration occurs at the endpoint +-level, rather than domain. +-.PP +-\f[I]FI_MR_UNSPEC\f[] : Defined for compatibility \-\- library versions +-1.4 and earlier. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_VIRT_ADDR\f[] ++Registered memory regions are referenced by peers using the virtual ++address of the registered memory region, rather than a 0\-based offset. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_ALLOCATED\f[] ++Indicates that memory registration occurs on allocated data buffers, and ++physical pages must back all virtual addresses being registered. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_PROV_KEY\f[] ++Memory registration keys are selected and returned by the provider. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_MMU_NOTIFY\f[] ++Indicates that the application is responsible for notifying the provider ++when the page tables referencing a registered memory region may have ++been updated. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_RMA_EVENT\f[] ++Indicates that the memory regions associated with completion counters ++must be explicitly enabled after being bound to any counter. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_ENDPOINT\f[] ++Memory registration occurs at the endpoint level, rather than domain. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_UNSPEC\f[] ++Defined for compatibility \-\- library versions 1.4 and earlier. + Setting mr_mode to 0 indicates that FI_MR_BASIC or FI_MR_SCALABLE are + requested and supported. +-.PP +-\f[I]FI_MR_BASIC\f[] : Defined for compatibility \-\- library versions +-1.4 and earlier. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_BASIC\f[] ++Defined for compatibility \-\- library versions 1.4 and earlier. + Only basic memory registration operations are requested or supported. + This mode is equivalent to the FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, and + FI_MR_PROV_KEY flags being set in later library versions. + This flag may not be used in conjunction with other mr_mode bits. +-.PP +-\f[I]FI_MR_SCALABLE\f[] : Defined for compatibility \-\- library +-versions 1.4 and earlier. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_SCALABLE\f[] ++Defined for compatibility \-\- library versions 1.4 and earlier. + Only scalable memory registration operations are requested or supported. + Scalable registration uses offset based addressing, with application + selectable memory keys. + For library versions 1.5 and later, this is the default if no mr_mode + bits are set. + This flag may not be used in conjunction with other mr_mode bits. ++.RS ++.RE + .PP + Buffers used in data transfer operations may require notifying the + provider of their use before a data transfer can occur. +@@ -710,26 +806,33 @@ a single memory registration operation may reference. + Domain level capabilities. + Domain capabilities indicate domain level features that are supported by + the provider. +-.PP +-\f[I]FI_LOCAL_COMM\f[] : At a conceptual level, this field indicates +-that the underlying device supports loopback communication. ++.TP ++.B \f[I]FI_LOCAL_COMM\f[] ++At a conceptual level, this field indicates that the underlying device ++supports loopback communication. + More specifically, this field indicates that an endpoint may communicate + with other endpoints that are allocated from the same underlying named + domain. + If this field is not set, an application may need to use an alternate + domain or mechanism (e.g. + shared memory) to communicate with peers that execute on the same node. +-.PP +-\f[I]FI_REMOTE_COMM\f[] : This field indicates that the underlying +-provider supports communication with nodes that are reachable over the +-network. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_COMM\f[] ++This field indicates that the underlying provider supports communication ++with nodes that are reachable over the network. + If this field is not set, then the provider only supports communication + between processes that execute on the same node \-\- a shared memory + provider, for example. +-.PP +-\f[I]FI_SHARED_AV\f[] : Indicates that the domain supports the ability +-to share address vectors among multiple processes using the named +-address vector feature. ++.RS ++.RE ++.TP ++.B \f[I]FI_SHARED_AV\f[] ++Indicates that the domain supports the ability to share address vectors ++among multiple processes using the named address vector feature. ++.RS ++.RE + .PP + See \f[C]fi_getinfo\f[](3) for a discussion on primary versus secondary + capabilities. +@@ -737,11 +840,13 @@ All domain capabilities are considered secondary capabilities. + .SS mode + .PP + The operational mode bit related to using the domain. +-.PP +-\f[I]FI_RESTRICTED_COMP\f[] : This bit indicates that the domain limits +-completion queues and counters to only be used with endpoints, transmit +-contexts, and receive contexts that have the same set of capability +-flags. ++.TP ++.B \f[I]FI_RESTRICTED_COMP\f[] ++This bit indicates that the domain limits completion queues and counters ++to only be used with endpoints, transmit contexts, and receive contexts ++that have the same set of capability flags. ++.RS ++.RE + .SS Default authorization key (auth_key) + .PP + The default authorization key to associate with endpoint and memory +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_endpoint.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_endpoint.3 +index d11f7dc..53b3a2c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_endpoint.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_endpoint.3 +@@ -1,4 +1,7 @@ +-.TH "fi_endpoint" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_endpoint" "3" "2018\-11\-30" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_endpoint \- Fabric endpoint operations +@@ -123,41 +126,85 @@ DEPRECATED\ ssize_t\ fi_tx_size_left(struct\ fid_ep\ *ep); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fid\f[] : On creation, specifies a fabric or access domain. ++.TP ++.B \f[I]fid\f[] ++On creation, specifies a fabric or access domain. + On bind, identifies the event queue, completion queue, counter, or + address vector to bind to the endpoint. + In other cases, it\[aq]s a fabric identifier of an associated resource. +-.PP +-\f[I]info\f[] : Details about the fabric interface endpoint to be +-opened, obtained from fi_getinfo. +-.PP +-\f[I]ep\f[] : A fabric endpoint. +-.PP +-\f[I]sep\f[] : A scalable fabric endpoint. +-.PP +-\f[I]pep\f[] : A passive fabric endpoint. +-.PP +-\f[I]context\f[] : Context associated with the endpoint or asynchronous +-operation. +-.PP +-\f[I]index\f[] : Index to retrieve a specific transmit/receive context. +-.PP +-\f[I]attr\f[] : Transmit or receive context attributes. +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation. +-.PP +-\f[I]command\f[] : Command of control operation to perform on endpoint. +-.PP +-\f[I]arg\f[] : Optional control argument. +-.PP +-\f[I]level\f[] : Protocol level at which the desired option resides. +-.PP +-\f[I]optname\f[] : The protocol option to read or set. +-.PP +-\f[I]optval\f[] : The option value that was read or to set. +-.PP +-\f[I]optlen\f[] : The size of the optval buffer. ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++Details about the fabric interface endpoint to be opened, obtained from ++fi_getinfo. ++.RS ++.RE ++.TP ++.B \f[I]ep\f[] ++A fabric endpoint. ++.RS ++.RE ++.TP ++.B \f[I]sep\f[] ++A scalable fabric endpoint. ++.RS ++.RE ++.TP ++.B \f[I]pep\f[] ++A passive fabric endpoint. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++Context associated with the endpoint or asynchronous operation. ++.RS ++.RE ++.TP ++.B \f[I]index\f[] ++Index to retrieve a specific transmit/receive context. ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Transmit or receive context attributes. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation. ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Command of control operation to perform on endpoint. ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional control argument. ++.RS ++.RE ++.TP ++.B \f[I]level\f[] ++Protocol level at which the desired option resides. ++.RS ++.RE ++.TP ++.B \f[I]optname\f[] ++The protocol option to read or set. ++.RS ++.RE ++.TP ++.B \f[I]optval\f[] ++The option value that was read or to set. ++.RS ++.RE ++.TP ++.B \f[I]optlen\f[] ++The size of the optval buffer. ++.RS ++.RE + .SH DESCRIPTION + .PP + Endpoints are transport level communication portals. +@@ -287,27 +334,37 @@ based on the type of operation. + This is specified using fi_ep_bind flags. + The following flags may be used separately or OR\[aq]ed together when + binding an endpoint to a completion domain CQ. +-.PP +-\f[I]FI_TRANSMIT\f[] : Directs the completion of outbound data transfer +-requests to the specified completion queue. ++.TP ++.B \f[I]FI_TRANSMIT\f[] ++Directs the completion of outbound data transfer requests to the ++specified completion queue. + This includes send message, RMA, and atomic operations. +-.PP +-\f[I]FI_RECV\f[] : Directs the notification of inbound data transfers to +-the specified completion queue. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Directs the notification of inbound data transfers to the specified ++completion queue. + This includes received messages. + This binding automatically includes FI_REMOTE_WRITE, if applicable to + the endpoint. +-.PP +-\f[I]FI_SELECTIVE_COMPLETION\f[] : By default, data transfer operations +-generate completion entries into a completion queue after they have +-successfully completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_SELECTIVE_COMPLETION\f[] ++By default, data transfer operations generate completion entries into a ++completion queue after they have successfully completed. + Applications can use this bind flag to selectively enable when + completions are generated. + If FI_SELECTIVE_COMPLETION is specified, data transfer operations will +-not generate entries for successful completions unless FI_COMPLETION is +-set as an operational flag for the given operation. ++not generate entries for \f[I]successful\f[] completions unless ++FI_COMPLETION is set as an operational flag for the given operation. ++Operations that fail asynchronously will still generate completions, ++even if a completion is not requested. + FI_SELECTIVE_COMPLETION must be OR\[aq]ed with FI_TRANSMIT and/or + FI_RECV flags. ++.RS ++.RE + .PP + When FI_SELECTIVE_COMPLETION is set, the user must determine when a + request that does NOT have FI_COMPLETION set has completed indirectly, +@@ -362,35 +419,52 @@ completions for all non\-fi_inject calls: + An endpoint may also be bound to a fabric counter. + When binding an endpoint to a counter, the following flags may be + specified. +-.PP +-\f[I]FI_SEND\f[] : Increments the specified counter whenever a message +-transfer initiated over the endpoint has completed successfully or in +-error. ++.TP ++.B \f[I]FI_SEND\f[] ++Increments the specified counter whenever a message transfer initiated ++over the endpoint has completed successfully or in error. + Sent messages include both tagged and normal message operations. +-.PP +-\f[I]FI_RECV\f[] : Increments the specified counter whenever a message +-is received over the endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Increments the specified counter whenever a message is received over the ++endpoint. + Received messages include both tagged and normal message operations. +-.PP +-\f[I]FI_READ\f[] : Increments the specified counter whenever an RMA read +-or atomic fetch operation initiated from the endpoint has completed +-successfully or in error. +-.PP +-\f[I]FI_WRITE\f[] : Increments the specified counter whenever an RMA +-write or atomic operation initiated from the endpoint has completed ++.RS ++.RE ++.TP ++.B \f[I]FI_READ\f[] ++Increments the specified counter whenever an RMA read, atomic fetch, or ++atomic compare operation initiated from the endpoint has completed + successfully or in error. +-.PP +-\f[I]FI_REMOTE_READ\f[] : Increments the specified counter whenever an +-RMA read or atomic fetch operation is initiated from a remote endpoint +-that targets the given endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_WRITE\f[] ++Increments the specified counter whenever an RMA write or base atomic ++operation initiated from the endpoint has completed successfully or in ++error. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_READ\f[] ++Increments the specified counter whenever an RMA read, atomic fetch, or ++atomic compare operation is initiated from a remote endpoint that ++targets the given endpoint. + Use of this flag requires that the endpoint be created using + FI_RMA_EVENT. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : Increments the specified counter whenever an +-RMA write or atomic operation is initiated from a remote endpoint that +-targets the given endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++Increments the specified counter whenever an RMA write or base atomic ++operation is initiated from a remote endpoint that targets the given ++endpoint. + Use of this flag requires that the endpoint be created using + FI_RMA_EVENT. ++.RS ++.RE + .PP + An endpoint may only be bound to a single CQ or counter for a given type + of operation. +@@ -491,35 +565,45 @@ The base operation of an endpoint is selected during creation using + struct fi_info. + The following control commands and arguments may be assigned to an + endpoint. +-.PP +-**FI_GETOPSFLAG \-\- uint64_t *flags** : Used to retrieve the current +-value of flags associated with the data transfer operations initiated on +-the endpoint. ++.TP ++.B **FI_GETOPSFLAG \-\- uint64_t *flags** ++Used to retrieve the current value of flags associated with the data ++transfer operations initiated on the endpoint. + The control argument must include FI_TRANSMIT or FI_RECV (not both) + flags to indicate the type of data transfer flags to be returned. + See below for a list of control flags. +-.PP +-**FI_SETOPSFLAG \-\- uint64_t *flags** : Used to change the data +-transfer operation flags associated with an endpoint. ++.RS ++.RE ++.TP ++.B **FI_SETOPSFLAG \-\- uint64_t *flags** ++Used to change the data transfer operation flags associated with an ++endpoint. + The control argument must include FI_TRANSMIT or FI_RECV (not both) to + indicate the type of data transfer that the flags should apply to, with + other flags OR\[aq]ed in. + The given flags will override the previous transmit and receive + attributes that were set when the endpoint was created. + Valid control flags are defined below. +-.PP +-**FI_BACKLOG \- int *value** : This option only applies to passive +-endpoints. ++.RS ++.RE ++.TP ++.B **FI_BACKLOG \- int *value** ++This option only applies to passive endpoints. + It is used to set the connection request backlog for listening + endpoints. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the file descriptor associated with a socket endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the file descriptor associated ++with a socket endpoint. + The fi_control arg parameter should be an address where a pointer to the + returned file descriptor will be written. + See fi_eq.3 for addition details using fi_control with FI_GETWAIT. + The file descriptor may be used for notification that the endpoint is + ready to send or receive data. ++.RS ++.RE + .SS fi_getopt / fi_setopt + .PP + Endpoint protocol operations may be retrieved using fi_getopt or set +@@ -532,18 +616,24 @@ and implementation specific details of an endpoint. + The following option levels and option names and parameters are defined. + .PP + \f[I]FI_OPT_ENDPOINT\f[] +-.IP \[bu] 2 +-\f[I]FI_OPT_MIN_MULTI_RECV \- size_t\f[] : Defines the minimum receive +-buffer space available when the receive buffer is released by the +-provider (see FI_MULTI_RECV). ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_OPT_MIN_MULTI_RECV \- size_t\f[] ++Defines the minimum receive buffer space available when the receive ++buffer is released by the provider (see FI_MULTI_RECV). + Modifying this value is only guaranteed to set the minimum buffer space + needed on receives posted after the value has been changed. + It is recommended that applications that want to override the default + MIN_MULTI_RECV value set this option before enabling the corresponding + endpoint. +-.IP \[bu] 2 +-\f[I]FI_OPT_CM_DATA_SIZE \- size_t\f[] : Defines the size of available +-space in CM messages for user\-defined data. ++.RS ++.RE ++.RE ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_OPT_CM_DATA_SIZE \- size_t\f[] ++Defines the size of available space in CM messages for user\-defined ++data. + This value limits the amount of data that applications can exchange + between peer endpoints using the fi_connect, fi_accept, and fi_reject + operations. +@@ -552,6 +642,47 @@ except in the case of passive endpoints, in which the size reflects the + maximum size of the data that may be present as part of a connection + request event. + This option is read only. ++.RS ++.RE ++.RE ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_OPT_BUFFERED_LIMIT \- size_t\f[] ++Defines the maximum size of a buffered message that will be reported to ++users as part of a receive completion when the FI_BUFFERED_RECV mode is ++enabled on an endpoint. ++.RS ++.RE ++.RE ++.PP ++fi_getopt() will return the currently configured threshold, or the ++provider\[aq]s default threshold if one has not be set by the ++application. ++fi_setopt() allows an application to configure the threshold. ++If the provider cannot support the requested threshold, it will fail the ++fi_setopt() call with FI_EMSGSIZE. ++Calling fi_setopt() with the threshold set to SIZE_MAX will set the ++threshold to the maximum supported by the provider. ++fi_getopt() can then be used to retrieve the set size. ++.PP ++In most cases, the sending and receiving endpoints must be configured to ++use the same threshold value, and the threshold must be set prior to ++enabling the endpoint. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_OPT_BUFFERED_MIN \- size_t\f[] ++Defines the minimum size of a buffered message that will be reported. ++Applications would set this to a size that\[aq]s big enough to decide ++whether to discard or claim a buffered receive or when to claim a ++buffered receive on getting a buffered receive completion. ++The value is typically used by a provider when sending a rendezvous ++protocol request where it would send atleast FI_OPT_BUFFERED_MIN bytes ++of application data along with it. ++A smaller sized renedezvous protocol message usually results in better ++latency for the overall transfer of a large message. ++.RS ++.RE ++.RE + .SS fi_rx_size_left (DEPRECATED) + .PP + This function has been deprecated and will be removed in a future +@@ -609,39 +740,55 @@ struct\ fi_ep_attr\ { + If specified, indicates the type of fabric interface communication + desired. + Supported types are: +-.PP +-\f[I]FI_EP_UNSPEC\f[] : The type of endpoint is not specified. ++.TP ++.B \f[I]FI_EP_UNSPEC\f[] ++The type of endpoint is not specified. + This is usually provided as input, with other attributes of the endpoint + or the provider selecting the type. +-.PP +-\f[I]FI_EP_MSG\f[] : Provides a reliable, connection\-oriented data +-transfer service with flow control that maintains message boundaries. +-.PP +-\f[I]FI_EP_DGRAM\f[] : Supports a connectionless, unreliable datagram +-communication. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_MSG\f[] ++Provides a reliable, connection\-oriented data transfer service with ++flow control that maintains message boundaries. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_DGRAM\f[] ++Supports a connectionless, unreliable datagram communication. + Message boundaries are maintained, but the maximum message size may be + limited to the fabric MTU. + Flow control is not guaranteed. +-.PP +-\f[I]FI_EP_RDM\f[] : Reliable datagram message. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_RDM\f[] ++Reliable datagram message. + Provides a reliable, unconnected data transfer service with flow control + that maintains message boundaries. +-.PP +-\f[I]FI_EP_SOCK_STREAM\f[] : Data streaming endpoint with TCP +-socket\-like semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_SOCK_STREAM\f[] ++Data streaming endpoint with TCP socket\-like semantics. + Provides a reliable, connection\-oriented data transfer service that + does not maintain message boundaries. + FI_EP_SOCK_STREAM is most useful for applications designed around using + TCP sockets. + See the SOCKET ENDPOINT section for additional details and restrictions + that apply to stream endpoints. +-.PP +-\f[I]FI_EP_SOCK_DGRAM\f[] : A connectionless, unreliable datagram +-endpoint with UDP socket\-like semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_SOCK_DGRAM\f[] ++A connectionless, unreliable datagram endpoint with UDP socket\-like ++semantics. + FI_EP_SOCK_DGRAM is most useful for applications designed around using + UDP sockets. + See the SOCKET ENDPOINT section for additional details and restrictions + that apply to datagram socket endpoints. ++.RS ++.RE + .SS Protocol + .PP + Specifies the low\-level end to end protocol employed by the provider. +@@ -651,61 +798,96 @@ The following protocol values are defined. + Provider specific protocols are also allowed. + Provider specific protocols will be indicated by having the upper bit of + the protocol value set to one. +-.PP +-\f[I]FI_PROTO_UNSPEC\f[] : The protocol is not specified. ++.TP ++.B \f[I]FI_PROTO_UNSPEC\f[] ++The protocol is not specified. + This is usually provided as input, with other attributes of the socket + or the provider selecting the actual protocol. +-.PP +-\f[I]FI_PROTO_RDMA_CM_IB_RC\f[] : The protocol runs over Infiniband +-reliable\-connected queue pairs, using the RDMA CM protocol for +-connection establishment. +-.PP +-\f[I]FI_PROTO_IWARP\f[] : The protocol runs over the Internet wide area +-RDMA protocol transport. +-.PP +-\f[I]FI_PROTO_IB_UD\f[] : The protocol runs over Infiniband unreliable +-datagram queue pairs. +-.PP +-\f[I]FI_PROTO_PSMX\f[] : The protocol is based on an Intel proprietary +-protocol known as PSM, performance scaled messaging. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_RDMA_CM_IB_RC\f[] ++The protocol runs over Infiniband reliable\-connected queue pairs, using ++the RDMA CM protocol for connection establishment. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_IWARP\f[] ++The protocol runs over the Internet wide area RDMA protocol transport. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_IB_UD\f[] ++The protocol runs over Infiniband unreliable datagram queue pairs. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_PSMX\f[] ++The protocol is based on an Intel proprietary protocol known as PSM, ++performance scaled messaging. + PSMX is an extended version of the PSM protocol to support the libfabric + interfaces. +-.PP +-\f[I]FI_PROTO_UDP\f[] : The protocol sends and receives UDP datagrams. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_UDP\f[] ++The protocol sends and receives UDP datagrams. + For example, an endpoint using \f[I]FI_PROTO_UDP\f[] will be able to + communicate with a remote peer that is using Berkeley + \f[I]SOCK_DGRAM\f[] sockets using \f[I]IPPROTO_UDP\f[]. +-.PP +-\f[I]FI_PROTO_SOCK_TCP\f[] : The protocol is layered over TCP packets. +-.PP +-\f[I]FI_PROTO_IWARP_RDM\f[] : Reliable\-datagram protocol implemented +-over iWarp reliable\-connected queue pairs. +-.PP +-\f[I]FI_PROTO_IB_RDM\f[] : Reliable\-datagram protocol implemented over +-InfiniBand reliable\-connected queue pairs. +-.PP +-\f[I]FI_PROTO_GNI\f[] : Protocol runs over Cray GNI low\-level +-interface. +-.PP +-\f[I]FI_PROTO_RXM\f[] : Reliable\-datagram protocol implemented over +-message endpoints. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_SOCK_TCP\f[] ++The protocol is layered over TCP packets. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_IWARP_RDM\f[] ++Reliable\-datagram protocol implemented over iWarp reliable\-connected ++queue pairs. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_IB_RDM\f[] ++Reliable\-datagram protocol implemented over InfiniBand ++reliable\-connected queue pairs. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_GNI\f[] ++Protocol runs over Cray GNI low\-level interface. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_RXM\f[] ++Reliable\-datagram protocol implemented over message endpoints. + RXM is a libfabric utility component that adds RDM endpoint semantics + over MSG endpoint semantics. +-.PP +-\f[I]FI_PROTO_RXD\f[] : Reliable\-datagram protocol implemented over +-datagram endpoints. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_RXD\f[] ++Reliable\-datagram protocol implemented over datagram endpoints. + RXD is a libfabric utility component that adds RDM endpoint semantics + over DGRAM endpoint semantics. +-.PP +-\f[I]FI_PROTO_NETWORKDIRECT\f[] : Protocol runs over Microsoft +-NetworkDirect service provider interface. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_NETWORKDIRECT\f[] ++Protocol runs over Microsoft NetworkDirect service provider interface. + This adds reliable\-datagram semantics over the NetworkDirect + connection\- oriented endpoint semantics. +-.PP +-\f[I]FI_PROTO_PSMX2\f[] : The protocol is based on an Intel proprietary +-protocol known as PSM2, performance scaled messaging version 2. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_PSMX2\f[] ++The protocol is based on an Intel proprietary protocol known as PSM2, ++performance scaled messaging version 2. + PSMX2 is an extended version of the PSM2 protocol to support the + libfabric interfaces. ++.RS ++.RE + .SS protocol_version \- Protocol Version + .PP + Identifies which version of the protocol is employed by the provider. +@@ -755,28 +937,37 @@ Providers specify when data ordering is maintained through the following + values. + Note that even if data ordering is not maintained, message ordering may + be. +-.PP +-\f[I]max_order_raw_size\f[] : Read after write size. ++.TP ++.B \f[I]max_order_raw_size\f[] ++Read after write size. + If set, an RMA or atomic read operation issued after an RMA or atomic + write operation, both of which are smaller than the size, will be + ordered. + Where the target memory locations overlap, the RMA or atomic read + operation will see the results of the previous RMA or atomic write. +-.PP +-\f[I]max_order_war_size\f[] : Write after read size. ++.RS ++.RE ++.TP ++.B \f[I]max_order_war_size\f[] ++Write after read size. + If set, an RMA or atomic write operation issued after an RMA or atomic + read operation, both of which are smaller than the size, will be + ordered. + The RMA or atomic read operation will see the initial value of the + target memory location before a subsequent RMA or atomic write updates + the value. +-.PP +-\f[I]max_order_waw_size\f[] : Write after write size. ++.RS ++.RE ++.TP ++.B \f[I]max_order_waw_size\f[] ++Write after write size. + If set, an RMA or atomic write operation issued after an RMA or atomic + write operation, both of which are smaller than the size, will be + ordered. + The target memory location will reflect the results of the second RMA or + atomic write. ++.RS ++.RE + .PP + An order size value of 0 indicates that ordering is not guaranteed. + A value of \-1 guarantees ordering for any data size. +@@ -801,6 +992,8 @@ The first field consists of 2\-bits, the second field 4\-bits, and the + final field 8\-bits. + Valid masks for such a tagged field would be a bitwise OR\[aq]ing of + zero or more of the following values: 0x3000, 0x0F00, and 0x00FF. ++The provider may not validate the mask provided by the application for ++performance reasons. + .PP + By identifying fields within a tag, a provider may be able to optimize + their search routines. +@@ -812,9 +1005,9 @@ A provider must return a tag format that supports the requested number + of fields, with each field being at least the size requested, or fail + the request. + A provider may increase the size of the fields. +-When reporting completions (see FI_CQ_FORMAT_TAGGED), the provider must +-provide the exact value of the received tag, clearing out any +-unsupported tag bits. ++When reporting completions (see FI_CQ_FORMAT_TAGGED), it is not ++guaranteed that the provider would clear out any unsupported tag bits in ++the tag field of the completion entry. + .PP + It is recommended that field sizes be ordered from smallest to largest. + A generic, unstructured tag and mask can be achieved by requesting a bit +@@ -943,63 +1136,93 @@ which message data is sent or received by the transport layer. + Message ordering requires matching ordering semantics on the receiving + side of a data transfer operation in order to guarantee that ordering is + met. +-.PP +-\f[I]FI_ORDER_NONE\f[] : No ordering is specified. ++.TP ++.B \f[I]FI_ORDER_NONE\f[] ++No ordering is specified. + This value may be used as input in order to obtain the default message + order supported by the provider. + FI_ORDER_NONE is an alias for the value 0. +-.PP +-\f[I]FI_ORDER_RAR\f[] : Read after read. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_RAR\f[] ++Read after read. + If set, RMA and atomic read operations are transmitted in the order + submitted relative to other RMA and atomic read operations. + If not set, RMA and atomic reads may be transmitted out of order from + their submission. +-.PP +-\f[I]FI_ORDER_RAW\f[] : Read after write. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_RAW\f[] ++Read after write. + If set, RMA and atomic read operations are transmitted in the order + submitted relative to RMA and atomic write operations. + If not set, RMA and atomic reads may be transmitted ahead of RMA and + atomic writes. +-.PP +-\f[I]FI_ORDER_RAS\f[] : Read after send. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_RAS\f[] ++Read after send. + If set, RMA and atomic read operations are transmitted in the order + submitted relative to message send operations, including tagged sends. + If not set, RMA and atomic reads may be transmitted ahead of sends. +-.PP +-\f[I]FI_ORDER_WAR\f[] : Write after read. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_WAR\f[] ++Write after read. + If set, RMA and atomic write operations are transmitted in the order + submitted relative to RMA and atomic read operations. + If not set, RMA and atomic writes may be transmitted ahead of RMA and + atomic reads. +-.PP +-\f[I]FI_ORDER_WAW\f[] : Write after write. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_WAW\f[] ++Write after write. + If set, RMA and atomic write operations are transmitted in the order + submitted relative to other RMA and atomic write operations. + If not set, RMA and atomic writes may be transmitted out of order from + their submission. +-.PP +-\f[I]FI_ORDER_WAS\f[] : Write after send. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_WAS\f[] ++Write after send. + If set, RMA and atomic write operations are transmitted in the order + submitted relative to message send operations, including tagged sends. + If not set, RMA and atomic writes may be transmitted ahead of sends. +-.PP +-\f[I]FI_ORDER_SAR\f[] : Send after read. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_SAR\f[] ++Send after read. + If set, message send operations, including tagged sends, are transmitted + in order submitted relative to RMA and atomic read operations. + If not set, message sends may be transmitted ahead of RMA and atomic + reads. +-.PP +-\f[I]FI_ORDER_SAW\f[] : Send after write. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_SAW\f[] ++Send after write. + If set, message send operations, including tagged sends, are transmitted + in order submitted relative to RMA and atomic write operations. + If not set, message sends may be transmitted ahead of RMA and atomic + writes. +-.PP +-\f[I]FI_ORDER_SAS\f[] : Send after send. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_SAS\f[] ++Send after send. + If set, message send operations, including tagged sends, are transmitted + in the order submitted relative to other message send. + If not set, message sends may be transmitted out of order from their + submission. ++.RS ++.RE + .SS comp_order \- Completion Ordering + .PP + Completion ordering refers to the order in which completed requests are +@@ -1028,13 +1251,18 @@ Providers should return the completion order that they actually provide, + with the constraint that the returned ordering is stricter than that + specified by the application. + Supported completion order values are: +-.PP +-\f[I]FI_ORDER_NONE\f[] : No ordering is defined for completed +-operations. ++.TP ++.B \f[I]FI_ORDER_NONE\f[] ++No ordering is defined for completed operations. + Requests submitted to the transmit context may complete in any order. +-.PP +-\f[I]FI_ORDER_STRICT\f[] : Requests complete in the order in which they +-are submitted to the transmit context. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_STRICT\f[] ++Requests complete in the order in which they are submitted to the ++transmit context. ++.RS ++.RE + .SS inject_size + .PP + The requested inject operation size (see the FI_INJECT flag) that the +@@ -1120,20 +1348,27 @@ FI_ORDER_WAS, FI_ORDER_SAR, FI_ORDER_SAW, and FI_ORDER_SAS. + .PP + For a description of completion ordering, see the comp_order field in + the \f[I]Transmit Context Attribute\f[] section. +-.PP +-\f[I]FI_ORDER_NONE\f[] : No ordering is defined for completed +-operations. ++.TP ++.B \f[I]FI_ORDER_NONE\f[] ++No ordering is defined for completed operations. + Receive operations may complete in any order, regardless of their + submission order. +-.PP +-\f[I]FI_ORDER_STRICT\f[] : Receive operations complete in the order in +-which they are processed by the receive context, based on the receive +-side msg_order attribute. +-.PP +-\f[I]FI_ORDER_DATA\f[] : When set, this bit indicates that received data +-is written into memory in order. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_STRICT\f[] ++Receive operations complete in the order in which they are processed by ++the receive context, based on the receive side msg_order attribute. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_DATA\f[] ++When set, this bit indicates that received data is written into memory ++in order. + Data ordering applies to memory accessed as part of a single operation + and between operations if message ordering is guaranteed. ++.RS ++.RE + .SS total_buffered_recv + .PP + This field is supported for backwards compatibility purposes. +@@ -1355,17 +1590,21 @@ Operation flags define the default flags applied to an endpoint\[aq]s + data transfer operations, where a flags parameter is not available. + Data transfer operations that take flags as input override the op_flags + value of transmit or receive context attributes of an endpoint. +-.PP +-\f[I]FI_INJECT\f[] : Indicates that all outbound data buffers should be +-returned to the user\[aq]s control immediately after a data transfer +-call returns, even if the operation is handled asynchronously. ++.TP ++.B \f[I]FI_INJECT\f[] ++Indicates that all outbound data buffers should be returned to the ++user\[aq]s control immediately after a data transfer call returns, even ++if the operation is handled asynchronously. + This may require that the provider copy the data into a local buffer and + transfer out of that buffer. + A provider can limit the total amount of send data that may be buffered + and/or the size of a single send that can use this flag. + This limit is indicated using inject_size (see inject_size above). +-.PP +-\f[I]FI_MULTI_RECV\f[] : Applies to posted receive operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTI_RECV\f[] ++Applies to posted receive operations. + This flag allows the user to post a single buffer that will receive + multiple incoming messages. + Received messages will be packed into the receive buffer until the +@@ -1376,71 +1615,53 @@ The placement of received data into the buffer may be subjected to + provider specific alignment restrictions. + The buffer will be released by the provider when the available buffer + space falls below the specified minimum (see FI_OPT_MIN_MULTI_RECV). +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for data transfer operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for data transfer ++operations. + This flag only applies to operations issued on endpoints that were bound + to a CQ or counter with the FI_SELECTIVE_COMPLETION flag. + See the fi_ep_bind section above for more detail. +-.PP +-\f[I]FI_INJECT_COMPLETE\f[] : Indicates that a completion should be +-generated when the source buffer(s) may be reused. +-A completion guarantees that the buffers will not be read from again and +-the application may reclaim them. +-No other guarantees are made with respect to the state of the operation. +-.PP +-Note: This flag is used to control when a completion entry is inserted +-into a completion queue. +-It does not apply to operations that do not generate a completion queue +-entry, such as the fi_inject operation, and is not subject to the +-inject_size message limit restriction. +-.PP +-\f[I]FI_TRANSMIT_COMPLETE\f[] : Indicates that a completion should be +-generated when the transmit operation has completed relative to the +-local provider. +-The exact behavior is dependent on the endpoint type. +-.PP +-For reliable endpoints: +-.PP +-Indicates that a completion should be generated when the operation has +-been delivered to the peer endpoint. +-A completion guarantees that the operation is no longer dependent on the +-fabric or local resources. +-The state of the operation at the peer endpoint is not defined. +-.PP +-For unreliable endpoints: +-.PP ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Indicates that a completion should be generated when the source ++buffer(s) may be reused. ++See \f[C]fi_cq\f[](3) for additional details on completion semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Indicates that a completion should be generated when the transmit ++operation has completed relative to the local provider. ++See \f[C]fi_cq\f[](3) for additional details on completion semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_DELIVERY_COMPLETE\f[] + Indicates that a completion should be generated when the operation has +-been delivered to the fabric. +-A completion guarantees that the operation is no longer dependent on +-local resources. +-The state of the operation within the fabric is not defined. +-.PP +-\f[I]FI_DELIVERY_COMPLETE\f[] : Indicates that a completion should not +-be generated until an operation has been processed by the destination +-endpoint(s). +-A completion guarantees that the result of the operation is available. +-.PP +-This completion mode applies only to reliable endpoints. +-For operations that return data to the initiator, such as RMA read or +-atomic\-fetch, the source endpoint is also considered a destination +-endpoint. +-This is the default completion mode for such operations. +-.PP +-\f[I]FI_COMMIT_COMPLETE\f[] : Indicates that a completion should not be +-generated (locally or at the peer) until the result of an operation have +-been made persistent. +-A completion guarantees that the result is both available and durable, +-in the case of power failure. +-.PP +-This completion mode applies only to operations that target persistent +-memory regions over reliable endpoints. +-This completion mode is experimental. +-.PP +-\f[I]FI_MULTICAST\f[] : Indicates that data transfers will target +-multicast addresses by default. ++been processed by the destination endpoint(s). ++See \f[C]fi_cq\f[](3) for additional details on completion semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMMIT_COMPLETE\f[] ++Indicates that a completion should not be generated (locally or at the ++peer) until the result of an operation have been made persistent. ++See \f[C]fi_cq\f[](3) for additional details on completion semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTICAST\f[] ++Indicates that data transfers will target multicast addresses by ++default. + Any fi_addr_t passed into a data transfer operation will be treated as a + multicast address. ++.RS ++.RE + .SH NOTES + .PP + Users should call fi_close to release all resources allocated to the +@@ -1492,18 +1713,25 @@ submitted for processing. + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_EDOMAIN\f[] : A resource domain was not bound to the endpoint +-or an attempt was made to bind multiple domains. +-.PP +-\f[I]\-FI_ENOCQ\f[] : The endpoint has not been configured with +-necessary event queue. +-.PP +-\f[I]\-FI_EOPBADSTATE\f[] : The endpoint\[aq]s state does not permit the +-requested operation. ++.TP ++.B \f[I]\-FI_EDOMAIN\f[] ++A resource domain was not bound to the endpoint or an attempt was made ++to bind multiple domains. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_ENOCQ\f[] ++The endpoint has not been configured with necessary event queue. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EOPBADSTATE\f[] ++The endpoint\[aq]s state does not permit the requested operation. ++.RS ++.RE + .SH SEE ALSO + .PP +-\f[C]fi_getinfo\f[](3), \f[C]fi_domain\f[](3), \f[C]fi_msg\f[](3), +-\f[C]fi_tagged\f[](3), \f[C]fi_rma\f[](3) ++\f[C]fi_getinfo\f[](3), \f[C]fi_domain\f[](3), \f[C]fi_cq\f[](3) ++\f[C]fi_msg\f[](3), \f[C]fi_tagged\f[](3), \f[C]fi_rma\f[](3) + .SH AUTHORS + OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_eq.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_eq.3 +index 9ee3136..ae9a1a0 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_eq.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_eq.3 +@@ -1,20 +1,40 @@ +-.TH "fi_eq" "3" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_eq" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_eq \- Event queue operations +-.PP +-fi_eq_open / fi_close : Open/close an event queue +-.PP +-fi_control : Control operation of EQ +-.PP +-fi_eq_read / fi_eq_readerr : Read an event from an event queue +-.PP +-fi_eq_write : Writes an event to an event queue +-.PP +-fi_eq_sread : A synchronous (blocking) read of an event queue +-.PP +-fi_eq_strerror : Converts provider specific error information into a +-printable string ++.TP ++.B fi_eq_open / fi_close ++Open/close an event queue ++.RS ++.RE ++.TP ++.B fi_control ++Control operation of EQ ++.RS ++.RE ++.TP ++.B fi_eq_read / fi_eq_readerr ++Read an event from an event queue ++.RS ++.RE ++.TP ++.B fi_eq_write ++Writes an event to an event queue ++.RS ++.RE ++.TP ++.B fi_eq_sread ++A synchronous (blocking) read of an event queue ++.RS ++.RE ++.TP ++.B fi_eq_strerror ++Converts provider specific error information into a printable string ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -45,36 +65,74 @@ const\ char\ *\ fi_eq_strerror(struct\ fid_eq\ *eq,\ int\ prov_errno, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fabric\f[] : Opened fabric descriptor +-.PP +-\f[I]eq\f[] : Event queue +-.PP +-\f[I]attr\f[] : Event queue attributes +-.PP +-\f[I]context\f[] : User specified context associated with the event +-queue. +-.PP +-\f[I]event\f[] : Reported event +-.PP +-\f[I]buf\f[] : For read calls, the data buffer to write events into. ++.TP ++.B \f[I]fabric\f[] ++Opened fabric descriptor ++.RS ++.RE ++.TP ++.B \f[I]eq\f[] ++Event queue ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Event queue attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the event queue. ++.RS ++.RE ++.TP ++.B \f[I]event\f[] ++Reported event ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++For read calls, the data buffer to write events into. + For write calls, an event to insert into the event queue. + For fi_eq_strerror, an optional buffer that receives printable error + information. +-.PP +-\f[I]len\f[] : Length of data buffer +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation +-.PP +-\f[I]command\f[] : Command of control operation to perform on EQ. +-.PP +-\f[I]arg\f[] : Optional control argument +-.PP +-\f[I]prov_errno\f[] : Provider specific error value +-.PP +-\f[I]err_data\f[] : Provider specific error data related to a completion +-.PP +-\f[I]timeout\f[] : Timeout specified in milliseconds ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data buffer ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Command of control operation to perform on EQ. ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional control argument ++.RS ++.RE ++.TP ++.B \f[I]prov_errno\f[] ++Provider specific error value ++.RS ++.RE ++.TP ++.B \f[I]err_data\f[] ++Provider specific error data related to a completion ++.RS ++.RE ++.TP ++.B \f[I]timeout\f[] ++Timeout specified in milliseconds ++.RS ++.RE + .SH DESCRIPTION + .PP + Event queues are used to report events associated with control +@@ -102,76 +160,112 @@ struct\ fi_eq_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]size\f[] : Specifies the minimum size of an event queue. +-.PP +-\f[I]flags\f[] : Flags that control the configuration of the EQ. +-.IP \[bu] 2 +-\f[I]FI_WRITE\f[] : Indicates that the application requires support for +-inserting user events into the EQ. ++.TP ++.B \f[I]size\f[] ++Specifies the minimum size of an event queue. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Flags that control the configuration of the EQ. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WRITE\f[] ++Indicates that the application requires support for inserting user ++events into the EQ. + If this flag is set, then the fi_eq_write operation must be supported by + the provider. + If the FI_WRITE flag is not set, then the application may not invoke + fi_eq_write. +-.IP \[bu] 2 +-\f[I]FI_AFFINITY\f[] : Indicates that the signaling_vector field (see +-below) is valid. +-.PP +-\f[I]wait_obj\f[] : EQ\[aq]s may be associated with a specific wait +-object. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AFFINITY\f[] ++Indicates that the signaling_vector field (see below) is valid. ++.RS ++.RE ++.TP ++.B \f[I]wait_obj\f[] ++EQ\[aq]s may be associated with a specific wait object. + Wait objects allow applications to block until the wait object is + signaled, indicating that an event is available to be read. + Users may use fi_control to retrieve the underlying wait object + associated with an EQ, in order to use it in other system calls. + The following values may be used to specify the type of wait object + associated with an EQ: +-.IP \[bu] 2 +-\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block +-(wait) for events on the EQ. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_NONE\f[] ++Used to indicate that the user will not block (wait) for events on the ++EQ. + When FI_WAIT_NONE is specified, the application may not call + fi_eq_sread. + This is the default is no wait object is specified. +-.IP \[bu] 2 +-\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the +-EQ using fabric interface calls, such as fi_eq_sread. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_UNSPEC\f[] ++Specifies that the user will only wait on the EQ using fabric interface ++calls, such as fi_eq_sread. + In this case, the underlying provider may select the most appropriate or + highest performing wait object available, including custom wait + mechanisms. + Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve + the underlying wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_SET\f[] : Indicates that the event queue should use a wait +-set object to wait for events. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_SET\f[] ++Indicates that the event queue should use a wait set object to wait for ++events. + If specified, the wait_set field must reference an existing wait set + object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_FD\f[] : Indicates that the EQ should use a file descriptor +-as its wait mechanism. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_FD\f[] ++Indicates that the EQ should use a file descriptor as its wait ++mechanism. + A file descriptor wait object must be usable in select, poll, and epoll + routines. + However, a provider may signal an FD wait object by marking it as + readable or with an error. +-.IP \[bu] 2 +-\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the EQ should use a pthread +-mutex and cond variable as a wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_CRITSEC_COND\f[] : Windows specific. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_MUTEX_COND\f[] ++Specifies that the EQ should use a pthread mutex and cond variable as a ++wait object. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_CRITSEC_COND\f[] ++Windows specific. + Specifies that the EQ should use a critical section and condition + variable as a wait object. +-.PP +-\f[I]signaling_vector\f[] : If the FI_AFFINITY flag is set, this +-indicates the logical cpu number (0..max cpu \- 1) that interrupts +-associated with the EQ should target. ++.RS ++.RE ++.TP ++.B \f[I]signaling_vector\f[] ++If the FI_AFFINITY flag is set, this indicates the logical cpu number ++(0..max cpu \- 1) that interrupts associated with the EQ should target. + This field should be treated as a hint to the provider and may be + ignored if the provider does not support interrupt affinity. +-.PP +-\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a +-wait object to which the event queue should attach. ++.RS ++.RE ++.TP ++.B \f[I]wait_set\f[] ++If wait_obj is FI_WAIT_SET, this field references a wait object to which ++the event queue should attach. + When an event is inserted into the event queue, the corresponding wait + set will be signaled if all necessary conditions are met. + The use of a wait_set enables an optimized method of waiting for events + across multiple event queues. + This field is ignored if wait_obj is not FI_WAIT_SET. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with an event queue. +@@ -186,15 +280,18 @@ specific details of the event queue. + Access to the EQ should be serialized across all calls when fi_control + is invoked, as it may redirect the implementation of EQ operations. + The following control commands are usable with an EQ. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the low\-level wait object associated with the EQ. ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the low\-level wait object ++associated with the EQ. + The format of the wait\-object is specified during EQ creation, through + the EQ attributes. + The fi_control arg parameter should be an address where a pointer to the + returned wait object will be written. + This should be an \[aq]int *\[aq] for FI_WAIT_FD, or \[aq]struct + fi_mutex_cond\[aq] for FI_WAIT_MUTEX_COND. ++.RS ++.RE + .IP + .nf + \f[C] +@@ -220,12 +317,14 @@ from the EQ. + .PP + The following types of events may be reported to an EQ, along with + information regarding the format associated with each event. +-.PP +-\f[I]Asynchronous Control Operations\f[] : Asynchronous control +-operations are basic requests that simply need to generate an event to +-indicate that they have completed. ++.TP ++.B \f[I]Asynchronous Control Operations\f[] ++Asynchronous control operations are basic requests that simply need to ++generate an event to indicate that they have completed. + These include the following types of events: memory registration, + address vector resolution, and multicast joins. ++.RS ++.RE + .PP + Control requests report their completion by inserting a + \f[C]struct\ \ \ fi_eq_entry\f[] into the EQ. +@@ -254,14 +353,16 @@ the fabric descriptor. + The data field will be set as described in the man page for the + corresponding object type (e.g., see \f[C]fi_av\f[](3) for a description + of how asynchronous address vector insertions are completed). +-.PP +-\f[I]Connection Notification\f[] : Connection notifications are +-connection management notifications used to setup or tear down +-connections between endpoints. ++.TP ++.B \f[I]Connection Notification\f[] ++Connection notifications are connection management notifications used to ++setup or tear down connections between endpoints. + There are three connection notification events: FI_CONNREQ, + FI_CONNECTED, and FI_SHUTDOWN. + Connection notifications are reported using + \f[C]struct\ \ \ fi_eq_cm_entry\f[]: ++.RS ++.RE + .IP + .nf + \f[C] +@@ -318,13 +419,15 @@ is done through the FI_SHUTDOWN event. + Shutdown notification uses struct fi_eq_cm_entry as declared above. + The fid field for a shutdown notification refers to the active + endpoint\[aq]s fid_ep. +-.PP +-\f[I]Asynchronous Error Notification\f[] : Asynchronous errors are used +-to report problems with fabric resources. ++.TP ++.B \f[I]Asynchronous Error Notification\f[] ++Asynchronous errors are used to report problems with fabric resources. + Reported errors may be fatal or transient, based on the error, and + result in the resource becoming disabled. + Disabled resources will fail operations submitted against them until + they are explicitly re\-enabled by the application. ++.RS ++.RE + .PP + Asynchronous errors may be reported for completion queues and endpoints + of all types. +@@ -423,9 +526,9 @@ ensure that the buffer referenced by err_data does not change. + The EQ entry data structures share many of the same fields. + The meanings are the same or similar for all EQ structure formats, with + specific details described below. +-.PP +-\f[I]fid\f[] : This corresponds to the fabric descriptor associated with +-the event. ++.TP ++.B \f[I]fid\f[] ++This corresponds to the fabric descriptor associated with the event. + The type of fid depends on the event being reported. + For FI_CONNREQ this will be the fid of the passive endpoint. + FI_CONNECTED and FI_SHUTDOWN will reference the active endpoint. +@@ -435,42 +538,60 @@ FI_JOIN_COMPLETE will point to the multicast descriptor returned as part + of the join operation. + Applications can use fid\->context value to retrieve the context + associated with the fabric descriptor. +-.PP +-\f[I]context\f[] : The context value is set to the context parameter +-specified with the operation that generated the event. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++The context value is set to the context parameter specified with the ++operation that generated the event. + If no context parameter is associated with the operation, this field + will be NULL. +-.PP +-\f[I]data\f[] : Data is an operation specific value or set of bytes. ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++Data is an operation specific value or set of bytes. + For connection events, data is application data exchanged as part of the + connection protocol. +-.PP +-\f[I]err\f[] : This err code is a positive fabric errno associated with +-an event. ++.RS ++.RE ++.TP ++.B \f[I]err\f[] ++This err code is a positive fabric errno associated with an event. + The err value indicates the general reason for an error, if one + occurred. + See fi_errno.3 for a list of possible error codes. +-.PP +-\f[I]prov_errno\f[] : On an error, prov_errno may contain a provider +-specific error code. ++.RS ++.RE ++.TP ++.B \f[I]prov_errno\f[] ++On an error, prov_errno may contain a provider specific error code. + The use of this field and its meaning is provider specific. + It is intended to be used as a debugging aid. + See fi_eq_strerror for additional details on converting this error value + into a human readable string. +-.PP +-\f[I]err_data\f[] : On an error, err_data may reference a provider +-specific amount of data associated with an error. ++.RS ++.RE ++.TP ++.B \f[I]err_data\f[] ++On an error, err_data may reference a provider specific amount of data ++associated with an error. + The use of this field and its meaning is provider specific. + It is intended to be used as a debugging aid. + See fi_eq_strerror for additional details on converting this error data + into a human readable string. +-.PP +-\f[I]err_data_size\f[] : On input, err_data_size indicates the size of +-the err_data buffer in bytes. ++.RS ++.RE ++.TP ++.B \f[I]err_data_size\f[] ++On input, err_data_size indicates the size of the err_data buffer in ++bytes. + On output, err_data_size will be set to the number of bytes copied to + the err_data buffer. + The err_data information is typically used with fi_eq_strerror to + provide details about the type of error that occurred. ++.RS ++.RE + .PP + For compatibility purposes, if err_data_size is 0 on input, or the + fabric was opened with release < 1.5, err_data will be set to a data +@@ -491,22 +612,32 @@ will result in it returning an FI_EOVERRUN error event. + Overrun event queues are considered fatal and may not be used to report + additional events once the overrun occurs. + .SH RETURN VALUES +-.PP +-fi_eq_open : Returns 0 on success. ++.TP ++.B fi_eq_open ++Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. +-.PP +-fi_eq_read / fi_eq_readerr / fi_eq_sread : On success, returns the +-number of bytes read from the event queue. ++.RS ++.RE ++.TP ++.B fi_eq_read / fi_eq_readerr / fi_eq_sread ++On success, returns the number of bytes read from the event queue. + On error, a negative value corresponding to fabric errno is returned. + If no data is available to be read from the event queue, \-FI_EAGAIN is + returned. +-.PP +-fi_eq_write : On success, returns the number of bytes written to the +-event queue. ++.RS ++.RE ++.TP ++.B fi_eq_write ++On success, returns the number of bytes written to the event queue. + On error, a negative value corresponding to fabric errno is returned. +-.PP +-fi_eq_strerror : Returns a character string interpretation of the +-provider specific error returned with a completion. ++.RS ++.RE ++.TP ++.B fi_eq_strerror ++Returns a character string interpretation of the provider specific error ++returned with a completion. ++.RS ++.RE + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH SEE ALSO +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_errno.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_errno.3 +index b02d361..1b1c2f7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_errno.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_errno.3 +@@ -1,4 +1,7 @@ +-.TH "fi_errno" "3" "2016\-02\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_errno" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_errno \- fabric errors +@@ -14,94 +17,226 @@ const\ char\ *fi_strerror(int\ errno); + \f[] + .fi + .SH ERRORS +-.PP +-\f[I]FI_ENOENT\f[] : No such file or directory. +-.PP +-\f[I]FI_EIO\f[] : I/O error +-.PP +-\f[I]FI_E2BIG\f[] : Argument list too long. +-.PP +-\f[I]FI_EBADF\f[] : Bad file number. +-.PP +-\f[I]FI_EAGAIN\f[] : Try again. +-.PP +-\f[I]FI_ENOMEM\f[] : Out of memory. +-.PP +-\f[I]FI_EACCES\f[] : Permission denied. +-.PP +-\f[I]FI_EBUSY\f[] : Device or resource busy +-.PP +-\f[I]FI_ENODEV\f[] : No such device +-.PP +-\f[I]FI_EINVAL\f[] : Invalid argument +-.PP +-\f[I]FI_EMFILE\f[] : Too many open files +-.PP +-\f[I]FI_ENOSPC\f[] : No space left on device +-.PP +-\f[I]FI_ENOSYS\f[] : Function not implemented +-.PP +-\f[I]FI_ENOMSG\f[] : No message of desired type +-.PP +-\f[I]FI_ENODATA\f[] : No data available +-.PP +-\f[I]FI_EMSGSIZE\f[] : Message too long +-.PP +-\f[I]FI_ENOPROTOOPT\f[] : Protocol not available +-.PP +-\f[I]FI_EOPNOTSUPP\f[] : Operation not supported on transport endpoint +-.PP +-\f[I]FI_EADDRINUSE\f[] : Address already in use +-.PP +-\f[I]FI_EADDRNOTAVAIL\f[] : Cannot assign requested address +-.PP +-\f[I]FI_ENETDOWN\f[] : Network is down +-.PP +-\f[I]FI_ENETUNREACH\f[] : Network is unreachable +-.PP +-\f[I]FI_ECONNABORTED\f[] : Software caused connection abort +-.PP +-\f[I]FI_ECONNRESET\f[] : Connection reset by peer +-.PP +-\f[I]FI_EISCONN\f[] : Transport endpoint is already connected +-.PP +-\f[I]FI_ENOTCONN\f[] : Transport endpoint is not connected +-.PP +-\f[I]FI_ESHUTDOWN\f[] : Cannot send after transport endpoint shutdown +-.PP +-\f[I]FI_ETIMEDOUT\f[] : Operation timed out +-.PP +-\f[I]FI_ECONNREFUSED\f[] : Connection refused +-.PP +-\f[I]FI_EHOSTUNREACH\f[] : No route to host +-.PP +-\f[I]FI_EALREADY\f[] : Operation already in progress +-.PP +-\f[I]FI_EINPROGRESS\f[] : Operation now in progress +-.PP +-\f[I]FI_EREMOTEIO\f[] : Remote I/O error +-.PP +-\f[I]FI_ECANCELED\f[] : Operation Canceled +-.PP +-\f[I]FI_ENOKEY\f[] : Required key not available +-.PP +-\f[I]FI_EKEYREJECTED\f[] : Key was rejected by service +-.PP +-\f[I]FI_EOTHER\f[] : Unspecified error +-.PP +-\f[I]FI_ETOOSMALL\f[] : Provided buffer is too small +-.PP +-\f[I]FI_EOPBADSTATE\f[] : Operation not permitted in current state +-.PP +-\f[I]FI_EAVAIL\f[] : Error available +-.PP +-\f[I]FI_EBADFLAGS\f[] : Flags not supported +-.PP +-\f[I]FI_ENOEQ\f[] : Missing or unavailable event queue +-.PP +-\f[I]FI_EDOMAIN\f[] : Invalid resource domain +-.PP +-\f[I]FI_ENOCQ\f[] : Missing or unavailable completion queue ++.TP ++.B \f[I]FI_ENOENT\f[] ++No such file or directory. ++.RS ++.RE ++.TP ++.B \f[I]FI_EIO\f[] ++I/O error ++.RS ++.RE ++.TP ++.B \f[I]FI_E2BIG\f[] ++Argument list too long. ++.RS ++.RE ++.TP ++.B \f[I]FI_EBADF\f[] ++Bad file number. ++.RS ++.RE ++.TP ++.B \f[I]FI_EAGAIN\f[] ++Try again. ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOMEM\f[] ++Out of memory. ++.RS ++.RE ++.TP ++.B \f[I]FI_EACCES\f[] ++Permission denied. ++.RS ++.RE ++.TP ++.B \f[I]FI_EBUSY\f[] ++Device or resource busy ++.RS ++.RE ++.TP ++.B \f[I]FI_ENODEV\f[] ++No such device ++.RS ++.RE ++.TP ++.B \f[I]FI_EINVAL\f[] ++Invalid argument ++.RS ++.RE ++.TP ++.B \f[I]FI_EMFILE\f[] ++Too many open files ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOSPC\f[] ++No space left on device ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOSYS\f[] ++Function not implemented ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOMSG\f[] ++No message of desired type ++.RS ++.RE ++.TP ++.B \f[I]FI_ENODATA\f[] ++No data available ++.RS ++.RE ++.TP ++.B \f[I]FI_EMSGSIZE\f[] ++Message too long ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOPROTOOPT\f[] ++Protocol not available ++.RS ++.RE ++.TP ++.B \f[I]FI_EOPNOTSUPP\f[] ++Operation not supported on transport endpoint ++.RS ++.RE ++.TP ++.B \f[I]FI_EADDRINUSE\f[] ++Address already in use ++.RS ++.RE ++.TP ++.B \f[I]FI_EADDRNOTAVAIL\f[] ++Cannot assign requested address ++.RS ++.RE ++.TP ++.B \f[I]FI_ENETDOWN\f[] ++Network is down ++.RS ++.RE ++.TP ++.B \f[I]FI_ENETUNREACH\f[] ++Network is unreachable ++.RS ++.RE ++.TP ++.B \f[I]FI_ECONNABORTED\f[] ++Software caused connection abort ++.RS ++.RE ++.TP ++.B \f[I]FI_ECONNRESET\f[] ++Connection reset by peer ++.RS ++.RE ++.TP ++.B \f[I]FI_EISCONN\f[] ++Transport endpoint is already connected ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOTCONN\f[] ++Transport endpoint is not connected ++.RS ++.RE ++.TP ++.B \f[I]FI_ESHUTDOWN\f[] ++Cannot send after transport endpoint shutdown ++.RS ++.RE ++.TP ++.B \f[I]FI_ETIMEDOUT\f[] ++Operation timed out ++.RS ++.RE ++.TP ++.B \f[I]FI_ECONNREFUSED\f[] ++Connection refused ++.RS ++.RE ++.TP ++.B \f[I]FI_EHOSTUNREACH\f[] ++No route to host ++.RS ++.RE ++.TP ++.B \f[I]FI_EALREADY\f[] ++Operation already in progress ++.RS ++.RE ++.TP ++.B \f[I]FI_EINPROGRESS\f[] ++Operation now in progress ++.RS ++.RE ++.TP ++.B \f[I]FI_EREMOTEIO\f[] ++Remote I/O error ++.RS ++.RE ++.TP ++.B \f[I]FI_ECANCELED\f[] ++Operation Canceled ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOKEY\f[] ++Required key not available ++.RS ++.RE ++.TP ++.B \f[I]FI_EKEYREJECTED\f[] ++Key was rejected by service ++.RS ++.RE ++.TP ++.B \f[I]FI_EOTHER\f[] ++Unspecified error ++.RS ++.RE ++.TP ++.B \f[I]FI_ETOOSMALL\f[] ++Provided buffer is too small ++.RS ++.RE ++.TP ++.B \f[I]FI_EOPBADSTATE\f[] ++Operation not permitted in current state ++.RS ++.RE ++.TP ++.B \f[I]FI_EAVAIL\f[] ++Error available ++.RS ++.RE ++.TP ++.B \f[I]FI_EBADFLAGS\f[] ++Flags not supported ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOEQ\f[] ++Missing or unavailable event queue ++.RS ++.RE ++.TP ++.B \f[I]FI_EDOMAIN\f[] ++Invalid resource domain ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOCQ\f[] ++Missing or unavailable completion queue ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fabric\f[](7) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_fabric.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_fabric.3 +index b1e8538..18d4ceb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_fabric.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_fabric.3 +@@ -1,12 +1,20 @@ +-.TH "fi_fabric" "3" "2017\-10\-18" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_fabric" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_fabric \- Fabric domain operations +-.PP +-fi_fabric / fi_close : Open / close a fabric domain +-.PP +-fi_tostr : Convert fabric attributes, flags, and capabilities to +-printable string ++.TP ++.B fi_fabric / fi_close ++Open / close a fabric domain ++.RS ++.RE ++.TP ++.B fi_tostr ++Convert fabric attributes, flags, and capabilities to printable string ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -22,14 +30,22 @@ char\ *\ fi_tostr(const\ void\ *data,\ enum\ fi_type\ datatype); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]attr\f[] : Attributes of fabric to open. +-.PP +-\f[I]fabric\f[] : Fabric domain +-.PP +-\f[I]context\f[] : User specified context associated with the opened +-object. ++.TP ++.B \f[I]attr\f[] ++Attributes of fabric to open. ++.RS ++.RE ++.TP ++.B \f[I]fabric\f[] ++Fabric domain ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the opened object. + This context is returned as part of any associated asynchronous event. ++.RS ++.RE + .SH DESCRIPTION + .PP + A fabric domain represents a collection of hardware and software +@@ -58,41 +74,129 @@ display, with the datatype parameter indicating the type of data + referenced by the data parameter. + Valid values for the datatype are listed below, along with the + corresponding datatype or field value. +-.PP +-\f[I]FI_TYPE_INFO\f[] : struct fi_info +-.PP +-\f[I]FI_TYPE_EP_TYPE\f[] : struct fi_info::type field +-.PP +-\f[I]FI_TYPE_EP_CAP\f[] : struct fi_info::ep_cap field +-.PP +-\f[I]FI_TYPE_OP_FLAGS\f[] : struct fi_info::op_flags field, or general +-uint64_t flags +-.PP +-\f[I]FI_TYPE_ADDR_FORMAT\f[] : struct fi_info::addr_format field +-.PP +-\f[I]FI_TYPE_TX_ATTR\f[] : struct fi_tx_attr +-.PP +-\f[I]FI_TYPE_RX_ATTR\f[] : struct fi_rx_attr +-.PP +-\f[I]FI_TYPE_EP_ATTR\f[] : struct fi_ep_attr +-.PP +-\f[I]FI_TYPE_DOMAIN_ATTR\f[] : struct fi_domain_attr +-.PP +-\f[I]FI_TYPE_FABRIC_ATTR\f[] : struct fi_fabric_attr +-.PP +-\f[I]FI_TYPE_DOMAIN_CAP\f[] : struct fi_info::domain_cap field +-.PP +-\f[I]FI_TYPE_THREADING\f[] : enum fi_threading +-.PP +-\f[I]FI_TYPE_PROGRESS\f[] : enum fi_progress +-.PP +-\f[I]FI_TYPE_PROTO\f[] : struct fi_ep_attr::protocol field +-.PP +-\f[I]FI_TYPE_MSG_ORDER\f[] : struct fi_ep_attr::msg_order field +-.PP +-\f[I]FI_TYPE_VERSION\f[] : Returns the library version of libfabric in +-string form. ++.TP ++.B \f[I]FI_TYPE_INFO\f[] ++struct fi_info, including all substructures and fields ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_EP_TYPE\f[] ++struct fi_info::type field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_EP_CAP\f[] ++struct fi_info::ep_cap field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_OP_FLAGS\f[] ++struct fi_info::op_flags field, or general uint64_t flags ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_ADDR_FORMAT\f[] ++struct fi_info::addr_format field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_TX_ATTR\f[] ++struct fi_tx_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_RX_ATTR\f[] ++struct fi_rx_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_EP_ATTR\f[] ++struct fi_ep_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_DOMAIN_ATTR\f[] ++struct fi_domain_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_FABRIC_ATTR\f[] ++struct fi_fabric_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_THREADING\f[] ++enum fi_threading ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_PROGRESS\f[] ++enum fi_progress ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_PROTOCOL\f[] ++struct fi_ep_attr::protocol field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_MSG_ORDER\f[] ++struct fi_ep_attr::msg_order field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_MODE\f[] ++struct fi_info::mode field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_AV_TYPE\f[] ++enum fi_av_type ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_ATOMIC_TYPE\f[] ++enum fi_datatype ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_ATOMIC_OP\f[] ++enum fi_op ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_VERSION\f[] ++Returns the library version of libfabric in string form. + The data parameter is ignored. ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_EQ_EVENT\f[] ++uint32_t event parameter returned from fi_eq_read(). ++See \f[C]fi_eq(3)\f[] for a list of known values. ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_CQ_EVENT_FLAGS\f[] ++uint64_t flags field in fi_cq_xxx_entry structures. ++See \f[C]fi_cq(3)\f[] for valid flags. ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_MR_MODE\f[] ++struct fi_domain_attr::mr_mode flags ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_OP_TYPE\f[] ++enum fi_op_type ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_FID\f[] ++struct fid * ++.RS ++.RE + .PP + fi_tostr() will return a pointer to an internal libfabric buffer that + should not be modified, and will be overwritten the next time fi_tostr() +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_getinfo.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_getinfo.3 +index 84f0a6d..47fd4f4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_getinfo.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_getinfo.3 +@@ -1,4 +1,7 @@ +-.TH "fi_getinfo" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_getinfo" "3" "2018\-10\-10" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_getinfo, fi_freeinfo \- Obtain / free fabric interface information +@@ -21,20 +24,38 @@ struct\ fi_info\ *fi_dupinfo(const\ struct\ fi_info\ *info); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]version\f[] : Interface version requested by application. +-.PP +-\f[I]node\f[] : Optional, name or fabric address to resolve. +-.PP +-\f[I]service\f[] : Optional, service name or port number of address. +-.PP +-\f[I]flags\f[] : Operation flags for the fi_getinfo call. +-.PP +-\f[I]hints\f[] : Reference to an fi_info structure that specifies +-criteria for selecting the returned fabric information. +-.PP +-\f[I]info\f[] : A pointer to a linked list of fi_info structures +-containing response information. ++.TP ++.B \f[I]version\f[] ++Interface version requested by application. ++.RS ++.RE ++.TP ++.B \f[I]node\f[] ++Optional, name or fabric address to resolve. ++.RS ++.RE ++.TP ++.B \f[I]service\f[] ++Optional, service name or port number of address. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Operation flags for the fi_getinfo call. ++.RS ++.RE ++.TP ++.B \f[I]hints\f[] ++Reference to an fi_info structure that specifies criteria for selecting ++the returned fabric information. ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++A pointer to a linked list of fi_info structures containing response ++information. ++.RS ++.RE + .SH DESCRIPTION + .PP + fi_getinfo returns information about available fabric services for +@@ -130,42 +151,58 @@ struct\ fi_info\ { + \ \ \ \ struct\ fi_ep_attr\ \ \ \ \ *ep_attr; + \ \ \ \ struct\ fi_domain_attr\ *domain_attr; + \ \ \ \ struct\ fi_fabric_attr\ *fabric_attr; ++\ \ \ \ struct\ fid_nic\ \ \ \ \ \ \ \ *nic; + }; + \f[] + .fi +-.PP +-\f[I]next\f[] : Pointer to the next fi_info structure in the list. ++.TP ++.B \f[I]next\f[] ++Pointer to the next fi_info structure in the list. + Will be NULL if no more structures exist. +-.PP +-\f[I]caps \- fabric interface capabilities\f[] : If specified, indicates +-the desired capabilities of the fabric interfaces. ++.RS ++.RE ++.TP ++.B \f[I]caps \- fabric interface capabilities\f[] ++If specified, indicates the desired capabilities of the fabric ++interfaces. + Supported capabilities are listed in the \f[I]Capabilities\f[] section + below. +-.PP +-\f[I]mode\f[] : Operational modes supported by the application. ++.RS ++.RE ++.TP ++.B \f[I]mode\f[] ++Operational modes supported by the application. + See the \f[I]Mode\f[] section below. +-.PP +-\f[I]addr_format \- address format\f[] : If specified, indicates the +-format of addresses referenced by the fabric interfaces and data +-structures. ++.RS ++.RE ++.TP ++.B \f[I]addr_format \- address format\f[] ++If specified, indicates the format of addresses referenced by the fabric ++interfaces and data structures. + Supported formats are listed in the \f[I]Addressing formats\f[] section + below. +-.PP +-\f[I]src_addrlen \- source address length\f[] : Indicates the length of +-the source address. ++.RS ++.RE ++.TP ++.B \f[I]src_addrlen \- source address length\f[] ++Indicates the length of the source address. + This value must be > 0 if \f[I]src_addr\f[] is non\-NULL. + This field will be ignored in hints if FI_SOURCE flag is set, or + \f[I]src_addr\f[] is NULL. +-.PP +-\f[I]dest_addrlen \- destination address length\f[] : Indicates the +-length of the destination address. ++.RS ++.RE ++.TP ++.B \f[I]dest_addrlen \- destination address length\f[] ++Indicates the length of the destination address. + This value must be > 0 if \f[I]dest_addr\f[] is non\-NULL. + This field will be ignored in hints unless the node and service + parameters are NULL or FI_SOURCE flag is set, or if \f[I]dst_addr\f[] is + NULL. +-.PP +-\f[I]src_addr \- source address\f[] : If specified, indicates the source +-address. ++.RS ++.RE ++.TP ++.B \f[I]src_addr \- source address\f[] ++If specified, indicates the source address. + This field will be ignored in hints if FI_SOURCE flag is set. + On output a provider shall return an address that corresponds to the + indicated fabric, domain, node, and/or service fields. +@@ -174,31 +211,37 @@ The format of the address is indicated by the returned + Note that any returned address is only used when opening a local + endpoint. + The address is not guaranteed to be usable by a peer process. +-.PP +-\f[I]dest_addr \- destination address\f[] : If specified, indicates the +-destination address. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr \- destination address\f[] ++If specified, indicates the destination address. + This field will be ignored in hints unless the node and service + parameters are NULL or FI_SOURCE flag is set. + If FI_SOURCE is not specified, on output a provider shall return an + address the corresponds to the indicated node and/or service fields, + relative to the fabric and domain. + Note that any returned address is only usable locally. +-.PP +-\f[I]handle \- provider context handle\f[] : References a provider +-specific handle. ++.RS ++.RE ++.TP ++.B \f[I]handle \- provider context handle\f[] + The use of this field is operation specific. +-Unless its use is described for a given operation, the handle field must +-be NULL. +-It is commonly used by applications that make use of +-connection\-oriented endpoints. +-For other applications, the field should usually be NULL. +-.PP +-This field is used when processing connection requests and responses. +-It is also used to inherit endpoint\[aq]s attributes. +-See fi_eq(3), fi_reject(3), and fi_endpoint(3) . +-.PP +-\f[I]tx_attr \- transmit context attributes\f[] : Optionally supplied +-transmit context attributes. ++If hints\->handle is set to struct fid_pep, the hints\->handle will be ++copied to info\->handle on output from fi_getinfo. ++Other values of hints\->handle will be handled in a provider specific ++manner. ++The fi_info::handle field is also used by fi_endpoint() and fi_reject() ++calls when processing connection requests or to inherit another ++endpoint\[aq]s attributes. ++See \f[C]fi_eq\f[](3), \f[C]fi_reject\f[](3), and ++\f[C]fi_endpoint\f[](3). ++The info\->handle field will be ignored by fi_dupinfo and fi_freeinfo. ++.RS ++.RE ++.TP ++.B \f[I]tx_attr \- transmit context attributes\f[] ++Optionally supplied transmit context attributes. + Transmit context attributes may be specified and returned as part of + fi_getinfo. + When provided as hints, requested values of struct fi_tx_ctx_attr should +@@ -207,9 +250,11 @@ On output, the actual transmit context attributes that can be provided + will be returned. + Output values will be greater than or equal to the requested input + values. +-.PP +-\f[I]rx_attr \- receive context attributes\f[] : Optionally supplied +-receive context attributes. ++.RS ++.RE ++.TP ++.B \f[I]rx_attr \- receive context attributes\f[] ++Optionally supplied receive context attributes. + Receive context attributes may be specified and returned as part of + fi_getinfo. + When provided as hints, requested values of struct fi_rx_ctx_attr should +@@ -218,35 +263,52 @@ On output, the actual receive context attributes that can be provided + will be returned. + Output values will be greater than or or equal to the requested input + values. +-.PP +-\f[I]ep_attr \- endpoint attributes\f[] : Optionally supplied endpoint +-attributes. ++.RS ++.RE ++.TP ++.B \f[I]ep_attr \- endpoint attributes\f[] ++Optionally supplied endpoint attributes. + Endpoint attributes may be specified and returned as part of fi_getinfo. + When provided as hints, requested values of struct fi_ep_attr should be + set. + On output, the actual endpoint attributes that can be provided will be + returned. + Output values will be greater than or equal to requested input values. +-See fi_endpoint(3) for details. +-.PP +-\f[I]domain_attr \- domain attributes\f[] : Optionally supplied domain +-attributes. ++See \f[C]fi_endpoint\f[](3) for details. ++.RS ++.RE ++.TP ++.B \f[I]domain_attr \- domain attributes\f[] ++Optionally supplied domain attributes. + Domain attributes may be specified and returned as part of fi_getinfo. + When provided as hints, requested values of struct fi_domain_attr should + be set. + On output, the actual domain attributes that can be provided will be + returned. + Output values will be greater than or equal to requested input values. +-See fi_domain(3) for details. +-.PP +-\f[I]fabric_attr \- fabric attributes\f[] : Optionally supplied fabric +-attributes. ++See \f[C]fi_domain\f[](3) for details. ++.RS ++.RE ++.TP ++.B \f[I]fabric_attr \- fabric attributes\f[] ++Optionally supplied fabric attributes. + Fabric attributes may be specified and returned as part of fi_getinfo. + When provided as hints, requested values of struct fi_fabric_attr should + be set. + On output, the actual fabric attributes that can be provided will be + returned. +-See fi_fabric(3) for details. ++See \f[C]fi_fabric\f[](3) for details. ++.RS ++.RE ++.TP ++.B \f[I]nic \- network interface details\f[] ++Optional attributes related to the hardware NIC associated with the ++specified fabric, domain, and endpoint data. ++This field is only valid for providers where the corresponding ++attributes are closely associated with a hardware NIC. ++See [\f[C]fi_nic\f[](3)] (fi_nic.3.html) for details. ++.RS ++.RE + .SH CAPABILITIES + .PP + Interface capabilities are obtained by OR\-ing the following flags +@@ -262,12 +324,15 @@ that which was requested. + Applications may use this feature to request a minimal set of + requirements, then check the returned capabilities to enable additional + optimizations. +-.PP +-\f[I]FI_MSG\f[] : Specifies that an endpoint should support sending and +-receiving messages or datagrams. ++.TP ++.B \f[I]FI_MSG\f[] ++Specifies that an endpoint should support sending and receiving messages ++or datagrams. + Message capabilities imply support for send and/or receive queues. + Endpoints supporting this capability support operations defined by + struct fi_ops_msg. ++.RS ++.RE + .PP + The caps may be used to specify or restrict the type of messaging + operations that are supported. +@@ -275,9 +340,10 @@ In the absence of any relevant flags, FI_MSG implies the ability to send + and receive messages. + Applications can use the FI_SEND and FI_RECV flags to optimize an + endpoint as send\-only or receive\-only. +-.PP +-\f[I]FI_RMA\f[] : Specifies that the endpoint should support RMA read +-and write operations. ++.TP ++.B \f[I]FI_RMA\f[] ++Specifies that the endpoint should support RMA read and write ++operations. + Endpoints supporting this capability support operations defined by + struct fi_ops_rma. + In the absence of any relevant flags, FI_RMA implies the ability to +@@ -285,9 +351,11 @@ initiate and be the target of remote memory reads and writes. + Applications can use the FI_READ, FI_WRITE, FI_REMOTE_READ, and + FI_REMOTE_WRITE flags to restrict the types of RMA operations supported + by an endpoint. +-.PP +-\f[I]FI_TAGGED\f[] : Specifies that the endpoint should handle tagged +-message transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_TAGGED\f[] ++Specifies that the endpoint should handle tagged message transfers. + Tagged message transfers associate a user\-specified key or tag with + each message that is used for matching purposes at the remote side. + Endpoints supporting this capability support operations defined by +@@ -296,9 +364,11 @@ In the absence of any relevant flags, FI_TAGGED implies the ability to + send and receive tagged messages. + Applications can use the FI_SEND and FI_RECV flags to optimize an + endpoint as send\-only or receive\-only. +-.PP +-\f[I]FI_ATOMIC\f[] : Specifies that the endpoint supports some set of +-atomic operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_ATOMIC\f[] ++Specifies that the endpoint supports some set of atomic operations. + Endpoints supporting this capability support operations defined by + struct fi_ops_atomic. + In the absence of any relevant flags, FI_ATOMIC implies the ability to +@@ -306,28 +376,41 @@ initiate and be the target of remote atomic reads and writes. + Applications can use the FI_READ, FI_WRITE, FI_REMOTE_READ, and + FI_REMOTE_WRITE flags to restrict the types of atomic operations + supported by an endpoint. +-.PP +-\f[I]FI_MULTICAST\f[] : Indicates that the endpoint support multicast +-data transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTICAST\f[] ++Indicates that the endpoint support multicast data transfers. + This capability must be paired with at least one other data transfer + capability, (e.g. + FI_MSG, FI_SEND, FI_RECV, ...). +-.PP +-\f[I]FI_NAMED_RX_CTX\f[] : Requests that endpoints which support +-multiple receive contexts allow an initiator to target (or name) a +-specific receive context as part of a data transfer operation. +-.PP +-\f[I]FI_DIRECTED_RECV\f[] : Requests that the communication endpoint use +-the source address of an incoming message when matching it with a +-receive buffer. ++.RS ++.RE ++.TP ++.B \f[I]FI_NAMED_RX_CTX\f[] ++Requests that endpoints which support multiple receive contexts allow an ++initiator to target (or name) a specific receive context as part of a ++data transfer operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_DIRECTED_RECV\f[] ++Requests that the communication endpoint use the source address of an ++incoming message when matching it with a receive buffer. + If this capability is not set, then the src_addr parameter for msg and + tagged receive operations is ignored. +-.PP +-\f[I]FI_MULTI_RECV\f[] : Specifies that the endpoint must support the +-FI_MULTI_RECV flag when posting receive buffers. +-.PP +-\f[I]FI_SOURCE\f[] : Requests that the endpoint return source addressing +-data as part of its completion data. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTI_RECV\f[] ++Specifies that the endpoint must support the FI_MULTI_RECV flag when ++posting receive buffers. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOURCE\f[] ++Requests that the endpoint return source addressing data as part of its ++completion data. + This capability only applies to connectionless endpoints. + Note that returning source address information may require that the + provider perform address translation and/or look\-up based on data +@@ -335,58 +418,88 @@ available in the underlying protocol in order to provide the requested + data, which may adversely affect performance. + The performance impact may be greater for address vectors of type + FI_AV_TABLE. +-.PP +-\f[I]FI_READ\f[] : Indicates that the user requires an endpoint capable +-of initiating reads against remote memory regions. ++.RS ++.RE ++.TP ++.B \f[I]FI_READ\f[] ++Indicates that the user requires an endpoint capable of initiating reads ++against remote memory regions. + This flag requires that FI_RMA and/or FI_ATOMIC be set. +-.PP +-\f[I]FI_WRITE\f[] : Indicates that the user requires an endpoint capable +-of initiating writes against remote memory regions. ++.RS ++.RE ++.TP ++.B \f[I]FI_WRITE\f[] ++Indicates that the user requires an endpoint capable of initiating ++writes against remote memory regions. + This flag requires that FI_RMA and/or FI_ATOMIC be set. +-.PP +-\f[I]FI_SEND\f[] : Indicates that the user requires an endpoint capable +-of sending message data transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_SEND\f[] ++Indicates that the user requires an endpoint capable of sending message ++data transfers. + Message transfers include base message operations as well as tagged + message functionality. +-.PP +-\f[I]FI_RECV\f[] : Indicates that the user requires an endpoint capable +-of receiving message data transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Indicates that the user requires an endpoint capable of receiving ++message data transfers. + Message transfers include base message operations as well as tagged + message functionality. +-.PP +-\f[I]FI_REMOTE_READ\f[] : Indicates that the user requires an endpoint +-capable of receiving read memory operations from remote endpoints. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_READ\f[] ++Indicates that the user requires an endpoint capable of receiving read ++memory operations from remote endpoints. + This flag requires that FI_RMA and/or FI_ATOMIC be set. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : Indicates that the user requires an endpoint +-capable of receiving write memory operations from remote endpoints. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++Indicates that the user requires an endpoint capable of receiving write ++memory operations from remote endpoints. + This flag requires that FI_RMA and/or FI_ATOMIC be set. +-.PP +-\f[I]FI_RMA_EVENT\f[] : Requests that an endpoint support the generation +-of completion events when it is the target of an RMA and/or atomic +-operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_RMA_EVENT\f[] ++Requests that an endpoint support the generation of completion events ++when it is the target of an RMA and/or atomic operation. + This flag requires that FI_REMOTE_READ and/or FI_REMOTE_WRITE be enabled + on the endpoint. +-.PP +-\f[I]FI_SHARED_AV\f[] : Requests or indicates support for address +-vectors which may be shared among multiple processes. +-.PP +-\f[I]FI_TRIGGER\f[] : Indicates that the endpoint should support +-triggered operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_SHARED_AV\f[] ++Requests or indicates support for address vectors which may be shared ++among multiple processes. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRIGGER\f[] ++Indicates that the endpoint should support triggered operations. + Endpoints support this capability must meet the usage model as described + by fi_trigger.3. +-.PP +-\f[I]FI_FENCE\f[] : Indicates that the endpoint support the FI_FENCE +-flag on data transfer operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Indicates that the endpoint support the FI_FENCE flag on data transfer ++operations. + Support requires tracking that all previous transmit requests to a + specified remote endpoint complete prior to initiating the fenced + operation. + Fenced operations are often used to enforce ordering between operations + that are not otherwise guaranteed by the underlying provider or + protocol. +-.PP +-\f[I]FI_LOCAL_COMM\f[] : Indicates that the endpoint support host local +-communication. ++.RS ++.RE ++.TP ++.B \f[I]FI_LOCAL_COMM\f[] ++Indicates that the endpoint support host local communication. + This flag may be used in conjunction with FI_REMOTE_COMM to indicate + that local and remote communication are required. + If neither FI_LOCAL_COMM or FI_REMOTE_COMM are specified, then the +@@ -395,31 +508,52 @@ affects performance. + Providers that set FI_LOCAL_COMM but not FI_REMOTE_COMM, for example a + shared memory provider, may only be used to communication between + processes on the same system. +-.PP +-\f[I]FI_REMOTE_COMM\f[] : Indicates that the endpoint support +-communication with endpoints located at remote nodes (across the +-fabric). ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_COMM\f[] ++Indicates that the endpoint support communication with endpoints located ++at remote nodes (across the fabric). + See FI_LOCAL_COMM for additional details. + Providers that set FI_REMOTE_COMM but not FI_LOCAL_COMM, for example + NICs that lack loopback support, cannot be used to communicate with + processes on the same system. +-.PP +-\f[I]FI_SOURCE_ERR\f[] : Must be paired with FI_SOURCE. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOURCE_ERR\f[] ++Must be paired with FI_SOURCE. + When specified, this requests that raw source addressing data be + returned as part of completion data for any address that has not been + inserted into the local address vector. + Use of this capability may require the provider to validate incoming + source address data against addresses stored in the local address + vector, which may adversely affect performance. +-.PP +-\f[I]FI_RMA_PMEM\f[] : Indicates that the provider is \[aq]persistent +-memory aware\[aq] and supports RMA operations to and from persistent +-memory. ++.RS ++.RE ++.TP ++.B \f[I]FI_RMA_PMEM\f[] ++Indicates that the provider is \[aq]persistent memory aware\[aq] and ++supports RMA operations to and from persistent memory. + Persistent memory aware providers must support registration of memory + that is backed by non\- volatile memory, RMA transfers to/from + persistent memory, and enhanced completion semantics. + This flag requires that FI_RMA be set. + This capability is experimental. ++.RS ++.RE ++.TP ++.B \f[I]FI_VARIABLE_MSG\f[] ++Requests that the provider must notify a receiver when a variable length ++message is ready to be received prior to attempting to place the data. ++Such notification will include the size of the message and any ++associated message tag (for FI_TAGGED). ++See \[aq]Variable Length Messages\[aq] in fi_msg.3 for full details. ++Variable length messages are any messages larger than an endpoint ++configurable size. ++This flag requires that FI_MSG and/or FI_TAGGED be set. ++.RS ++.RE + .PP + Capabilities may be grouped into two general categories: primary and + secondary. +@@ -434,7 +568,7 @@ doing so would not compromise performance or security. + .PP + Primary capabilities: FI_MSG, FI_RMA, FI_TAGGED, FI_ATOMIC, + FI_MULTICAST, FI_NAMED_RX_CTX, FI_DIRECTED_RECV, FI_READ, FI_WRITE, +-FI_RECV, FI_SEND, FI_REMOTE_READ, and FI_REMOTE_WRITE. ++FI_RECV, FI_SEND, FI_REMOTE_READ, FI_REMOTE_WRITE, and FI_VARIABLE_MSG. + .PP + Secondary capabilities: FI_MULTI_RECV, FI_SOURCE, FI_RMA_EVENT, + FI_SHARED_AV, FI_TRIGGER, FI_FENCE, FI_LOCAL_COMM, FI_REMOTE_COMM, +@@ -458,10 +592,11 @@ the fabric interfaces created using the returned fi_info. + The set of modes are listed below. + If a NULL hints structure is provided, then the provider\[aq]s supported + set of modes will be returned in the info structure(s). +-.PP +-\f[I]FI_CONTEXT\f[] : Specifies that the provider requires that +-applications use struct fi_context as their per operation context +-parameter for operations that generated full completions. ++.TP ++.B \f[I]FI_CONTEXT\f[] ++Specifies that the provider requires that applications use struct ++fi_context as their per operation context parameter for operations that ++generated full completions. + This structure should be treated as opaque to the application. + For performance reasons, this structure must be allocated by the user, + but may be used by the fabric provider to track the operation. +@@ -479,9 +614,12 @@ the endpoint was configured with FI_SELECTIVE_COMPLETION and the + operation was not initiated with the FI_COMPLETION flag) then the + context parameter is ignored by the fabric provider.The structure is + specified in rdma/fabric.h. +-.PP +-\f[I]FI_CONTEXT2\f[] : This bit is similar to FI_CONTEXT, but doubles +-the provider\[aq]s requirement on the size of the per context structure. ++.RS ++.RE ++.TP ++.B \f[I]FI_CONTEXT2\f[] ++This bit is similar to FI_CONTEXT, but doubles the provider\[aq]s ++requirement on the size of the per context structure. + When set, this specifies that the provider requires that applications + use struct fi_context2 as their per operation context parameter. + Or, optionally, an application can provide an array of two fi_context +@@ -489,9 +627,12 @@ structures (e.g. + struct fi_context[2]) instead. + The requirements for using struct fi_context2 are identical as defined + for FI_CONTEXT above. +-.PP +-\f[I]FI_LOCAL_MR\f[] : The provider is optimized around having +-applications register memory for locally accessed data buffers. ++.RS ++.RE ++.TP ++.B \f[I]FI_LOCAL_MR\f[] ++The provider is optimized around having applications register memory for ++locally accessed data buffers. + Data buffers used in send and receive operations and as the source + buffer for RMA and atomic operations must be registered by the + application for access domains opened with this capability. +@@ -500,16 +641,21 @@ version is 1.5 or later and the domain mr_mode is set to anything other + than FI_MR_BASIC or FI_MR_SCALABLE. + See the domain attribute mr_mode \f[C]fi_domain\f[](3) and + \f[C]fi_mr\f[](3). +-.PP +-\f[I]FI_MSG_PREFIX\f[] : Message prefix mode indicates that an +-application will provide buffer space in front of all message send and +-receive buffers for use by the provider. ++.RS ++.RE ++.TP ++.B \f[I]FI_MSG_PREFIX\f[] ++Message prefix mode indicates that an application will provide buffer ++space in front of all message send and receive buffers for use by the ++provider. + Typically, the provider uses this space to implement a protocol, with + the protocol headers being written into the prefix area. + The contents of the prefix space should be treated as opaque. + The use of FI_MSG_PREFIX may improve application performance over + certain providers by reducing the number of IO vectors referenced by + underlying hardware and eliminating provider buffer allocation. ++.RS ++.RE + .PP + FI_MSG_PREFIX only applies to send and receive operations, including + tagged sends and receives. +@@ -538,9 +684,10 @@ payload). + For scatter\-gather send/recv operations, the prefix buffer must be a + contiguous region, though it may or may not be directly adjacent to the + payload portion of the buffer. +-.PP +-\f[I]FI_ASYNC_IOV\f[] : Applications can reference multiple data buffers +-as part of a single operation through the use of IO vectors (SGEs). ++.TP ++.B \f[I]FI_ASYNC_IOV\f[] ++Applications can reference multiple data buffers as part of a single ++operation through the use of IO vectors (SGEs). + Typically, the contents of an IO vector are copied by the provider into + an internal buffer area, or directly to the underlying hardware. + However, when a large number of IOV entries are supported, IOV buffering +@@ -550,17 +697,21 @@ buffering needed for the IO vectors. + When set, an application must not modify an IO vector of length > 1, + including any related memory descriptor array, until the associated + operation has completed. +-.PP +-\f[I]FI_RX_CQ_DATA\f[] : This mode bit only applies to data transfers +-that set FI_REMOTE_CQ_DATA. ++.RS ++.RE ++.TP ++.B \f[I]FI_RX_CQ_DATA\f[] ++This mode bit only applies to data transfers that set FI_REMOTE_CQ_DATA. + When set, a data transfer that carries remote CQ data will consume a + receive buffer at the target. + This is true even for operations that would normally not consume posted + receive buffers, such as RMA write operations. +-.PP +-\f[I]FI_NOTIFY_FLAGS_ONLY\f[] : This bit indicates that general +-completion flags may not be set by the provider, and are not needed by +-the application. ++.RS ++.RE ++.TP ++.B \f[I]FI_NOTIFY_FLAGS_ONLY\f[] ++This bit indicates that general completion flags may not be set by the ++provider, and are not needed by the application. + If specified, completion flags which simply report the type of operation + that completed (e.g. + send or receive) may not be set. +@@ -568,11 +719,29 @@ However, completion flags that are used for remote notifications will + still be set when applicable. + See \f[C]fi_cq\f[](3) for details on which completion flags are valid + when this mode bit is enabled. +-.PP +-\f[I]FI_RESTRICTED_COMP\f[] : This bit indicates that the application +-will only share completion queues and counters among endpoints, transmit +-contexts, and receive contexts that have the same set of capability +-flags. ++.RS ++.RE ++.TP ++.B \f[I]FI_RESTRICTED_COMP\f[] ++This bit indicates that the application will only share completion ++queues and counters among endpoints, transmit contexts, and receive ++contexts that have the same set of capability flags. ++.RS ++.RE ++.TP ++.B \f[I]FI_BUFFERED_RECV\f[] ++The buffered receive mode bit indicates that the provider owns the data ++buffer(s) that are accessed by the networking layer for received ++messages. ++Typically, this implies that data must be copied from the provider ++buffer into the application buffer. ++Applications that can handle message processing from network allocated ++data buffers can set this mode bit to avoid copies. ++For full details on application requirements to support this mode, see ++the \[aq]Buffered Receives\[aq] section in \f[C]fi_msg\f[](3). ++This mode bit applies to FI_MSG and FI_TAGGED receive operations. ++.RS ++.RE + .SH ADDRESSING FORMATS + .PP + Multiple fabric interfaces take as input either a source or destination +@@ -587,9 +756,10 @@ A provider may support one or more of the following addressing formats. + In some cases, a selected addressing format may need to be translated or + mapped into an address which is native to the fabric. + See \f[C]fi_av\f[](3). +-.PP +-\f[I]FI_FORMAT_UNSPEC\f[] : FI_FORMAT_UNSPEC indicates that a provider +-specific address format should be selected. ++.TP ++.B \f[I]FI_FORMAT_UNSPEC\f[] ++FI_FORMAT_UNSPEC indicates that a provider specific address format ++should be selected. + Provider specific addresses may be protocol specific or a vendor + proprietary format. + Applications that select FI_FORMAT_UNSPEC should be prepared to treat +@@ -598,27 +768,49 @@ FI_FORMAT_UNSPEC targets apps which make use of an out of band address + exchange. + Applications which use FI_FORMAT_UNSPEC may use fi_getname() to obtain a + provider specific address assigned to an allocated endpoint. +-.PP +-\f[I]FI_SOCKADDR\f[] : Address is of type sockaddr. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKADDR\f[] ++Address is of type sockaddr. + The specific socket address format will be determined at run time by + interfaces examining the sa_family field. +-.PP +-\f[I]FI_SOCKADDR_IN\f[] : Address is of type sockaddr_in (IPv4). +-.PP +-\f[I]FI_SOCKADDR_IN6\f[] : Address is of type sockaddr_in6 (IPv6). +-.PP +-\f[I]FI_SOCKADDR_IB\f[] : Address is of type sockaddr_ib (defined in +-Linux kernel source) +-.PP +-\f[I]FI_ADDR_PSMX\f[] : Address is an Intel proprietary format that is +-used with their PSMX (extended performance scaled messaging) protocol. +-.PP +-\f[I]FI_ADDR_GNI\f[] : Address is a Cray proprietary format that is used +-with their GNI protocol. +-.PP +-\f[I]FI_ADDR_STR\f[] : Address is a formatted character string. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKADDR_IN\f[] ++Address is of type sockaddr_in (IPv4). ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKADDR_IN6\f[] ++Address is of type sockaddr_in6 (IPv6). ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKADDR_IB\f[] ++Address is of type sockaddr_ib (defined in Linux kernel source) ++.RS ++.RE ++.TP ++.B \f[I]FI_ADDR_PSMX\f[] ++Address is an Intel proprietary format that is used with their PSMX ++(extended performance scaled messaging) protocol. ++.RS ++.RE ++.TP ++.B \f[I]FI_ADDR_GNI\f[] ++Address is a Cray proprietary format that is used with their GNI ++protocol. ++.RS ++.RE ++.TP ++.B \f[I]FI_ADDR_STR\f[] ++Address is a formatted character string. + The length and content of the string is address and/or provider + specific, but in general follows a URI model: ++.RS ++.RE + .IP + .nf + \f[C] +@@ -638,26 +830,34 @@ should be used to filter by provider if necessary. + The operation of the fi_getinfo call may be controlled through the use + of input flags. + Valid flags include the following. +-.PP +-\f[I]FI_NUMERICHOST\f[] : Indicates that the node parameter is a numeric +-string representation of a fabric address, such as a dotted decimal IP +-address. ++.TP ++.B \f[I]FI_NUMERICHOST\f[] ++Indicates that the node parameter is a numeric string representation of ++a fabric address, such as a dotted decimal IP address. + Use of this flag will suppress any lengthy name resolution protocol. +-.PP +-\f[I]FI_SOURCE\f[] : Indicates that the node and service parameters +-specify the local source address to associate with an endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOURCE\f[] ++Indicates that the node and service parameters specify the local source ++address to associate with an endpoint. + If specified, either the node and/or service parameter must be + non\-NULL. + This flag is often used with passive endpoints. +-.PP +-\f[I]FI_PROV_ATTR_ONLY\f[] : Indicates that the caller is only querying +-for what providers are potentially available. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROV_ATTR_ONLY\f[] ++Indicates that the caller is only querying for what providers are ++potentially available. + All providers will return exactly one fi_info struct, regardless of + whether that provider is usable on the current platform or not. + The returned fi_info struct will contain default values for all members, + with the exception of fabric_attr. + The fabric_attr member will have the prov_name and prov_version values + filled in. ++.RS ++.RE + .SH RETURN VALUE + .PP + fi_getinfo() returns 0 on success. +@@ -673,20 +873,28 @@ structure on success, or NULL on error. + Both calls require that the returned fi_info structure be freed via + fi_freeinfo(). + .SH ERRORS +-.PP +-\f[I]FI_EBADFLAGS\f[] : The specified endpoint or domain capability or +-operation flags are invalid. +-.PP +-\f[I]FI_ENOMEM\f[] : Indicates that there was insufficient memory to +-complete the operation. +-.PP +-\f[I]FI_ENODATA\f[] : Indicates that no providers could be found which +-support the requested fabric information. ++.TP ++.B \f[I]FI_EBADFLAGS\f[] ++The specified endpoint or domain capability or operation flags are ++invalid. ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOMEM\f[] ++Indicates that there was insufficient memory to complete the operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_ENODATA\f[] ++Indicates that no providers could be found which support the requested ++fabric information. ++.RS ++.RE + .SH NOTES + .PP + If hints are provided, the operation will be controlled by the values + that are supplied in the various fields (see section on +-\f[I]fi\f[]info_). ++\f[I]fi_info\f[]). + Applications that require specific communication interfaces, domains, + capabilities or other requirements, can specify them using fields in + \f[I]hints\f[]. +@@ -709,6 +917,7 @@ Multiple threads may call \f[C]fi_getinfo\f[] simultaneously, without + any requirement for serialization. + .SH SEE ALSO + .PP +-\f[C]fi_open\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3) ++\f[C]fi_open\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), ++\f[C]fi_nic\f[](3) + .SH AUTHORS + OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_mr.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_mr.3 +index a6ce08d..9d72acd 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_mr.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_mr.3 +@@ -1,33 +1,61 @@ +-.TH "fi_mr" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_mr" "3" "2018\-10\-15" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_mr \- Memory region operations +-.PP +-fi_mr_reg / fi_mr_regv / fi_mr_regattr : Register local memory buffers +-for direct fabric access +-.PP +-fi_close : Deregister registered memory buffers. +-.PP +-fi_mr_desc : Return a local descriptor associated with a registered +-memory region +-.PP +-fi_mr_key : Return the remote key needed to access a registered memory +-region +-.PP +-fi_mr_raw_attr : Return raw memory region attributes. +-.PP +-fi_mr_map_raw : Converts a raw memory region key into a key that is +-usable for data transfer operations. +-.PP +-fi_mr_unmap_key : Releases a previously mapped raw memory region key. +-.PP +-fi_mr_bind : Associate a registered memory region with a completion +-counter. +-.PP +-fi_mr_refresh : Updates the memory pages associated with a memory +-region. +-.PP +-fi_mr_enable : Enables a memory region for use. ++.TP ++.B fi_mr_reg / fi_mr_regv / fi_mr_regattr ++Register local memory buffers for direct fabric access ++.RS ++.RE ++.TP ++.B fi_close ++Deregister registered memory buffers. ++.RS ++.RE ++.TP ++.B fi_mr_desc ++Return a local descriptor associated with a registered memory region ++.RS ++.RE ++.TP ++.B fi_mr_key ++Return the remote key needed to access a registered memory region ++.RS ++.RE ++.TP ++.B fi_mr_raw_attr ++Return raw memory region attributes. ++.RS ++.RE ++.TP ++.B fi_mr_map_raw ++Converts a raw memory region key into a key that is usable for data ++transfer operations. ++.RS ++.RE ++.TP ++.B fi_mr_unmap_key ++Releases a previously mapped raw memory region key. ++.RS ++.RE ++.TP ++.B fi_mr_bind ++Associate a registered memory region with a completion counter. ++.RS ++.RE ++.TP ++.B fi_mr_refresh ++Updates the memory pages associated with a memory region. ++.RS ++.RE ++.TP ++.B fi_mr_enable ++Enables a memory region for use. ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -68,36 +96,72 @@ int\ fi_mr_enable(struct\ fid_mr\ *mr); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]domain\f[] : Resource domain +-.PP +-\f[I]mr\f[] : Memory region +-.PP +-\f[I]bfid\f[] : Fabric identifier of an associated resource. +-.PP +-\f[I]context\f[] : User specified context associated with the memory +-region. +-.PP +-\f[I]buf\f[] : Memory buffer to register with the fabric hardware +-.PP +-\f[I]len\f[] : Length of memory buffer to register +-.PP +-\f[I]iov\f[] : Vectored memory buffer. +-.PP +-\f[I]count\f[] : Count of vectored buffer entries. +-.PP +-\f[I]access\f[] : Memory access permissions associated with registration +-.PP +-\f[I]offset\f[] : Optional specified offset for accessing specified +-registered buffers. ++.TP ++.B \f[I]domain\f[] ++Resource domain ++.RS ++.RE ++.TP ++.B \f[I]mr\f[] ++Memory region ++.RS ++.RE ++.TP ++.B \f[I]bfid\f[] ++Fabric identifier of an associated resource. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the memory region. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Memory buffer to register with the fabric hardware ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of memory buffer to register ++.RS ++.RE ++.TP ++.B \f[I]iov\f[] ++Vectored memory buffer. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Count of vectored buffer entries. ++.RS ++.RE ++.TP ++.B \f[I]access\f[] ++Memory access permissions associated with registration ++.RS ++.RE ++.TP ++.B \f[I]offset\f[] ++Optional specified offset for accessing specified registered buffers. + This parameter is reserved for future use and must be 0. +-.PP +-\f[I]requested_key\f[] : Optional requested remote key associated with +-registered buffers. +-.PP +-\f[I]attr\f[] : Memory region attributes +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation. ++.RS ++.RE ++.TP ++.B \f[I]requested_key\f[] ++Optional requested remote key associated with registered buffers. ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Memory region attributes ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation. ++.RS ++.RE + .SH DESCRIPTION + .PP + Registered memory regions associate memory buffers with permissions +@@ -110,9 +174,9 @@ Memory registration restrictions are controlled using a separate set of + mode bits, specified through the domain attributes (mr_mode field). + .PP + The following apply to memory registration. +-.PP +-\f[I]Scalable Memory Registration\f[] : By default, memory registration +-is considered scalable. ++.TP ++.B \f[I]Scalable Memory Registration\f[] ++By default, memory registration is considered scalable. + (For library versions 1.4 and earlier, this is indicated by setting + mr_mode to FI_MR_SCALABLE, with the fi_info mode bit FI_LOCAL_MR set to + 0). +@@ -121,6 +185,8 @@ mr_mode bits being set. + The setting of mr_mode bits therefore adjusts application behavior as + described below. + Default, scalable registration has several properties. ++.RS ++.RE + .PP + In scalable mode, registration occurs on memory address ranges. + Because registration refers to memory regions, versus data buffers, the +@@ -144,15 +210,17 @@ registered. + This includes source buffers for all transmit operations \-\- sends, + tagged sends, RMA, and atomics \-\- as well as buffers posted for + receive and tagged receive operations. +-.PP +-\f[I]FI_MR_LOCAL\f[] : When the FI_MR_LOCAL mode bit is set, +-applications must register all data buffers that will be accessed by the +-local hardware and provide a valid mem_desc parameter into applicable +-data transfer operations. ++.TP ++.B \f[I]FI_MR_LOCAL\f[] ++When the FI_MR_LOCAL mode bit is set, applications must register all ++data buffers that will be accessed by the local hardware and provide a ++valid mem_desc parameter into applicable data transfer operations. + When FI_MR_LOCAL is zero, applications are not required to register data + buffers before using them for local operations (e.g. + send and receive data buffers), and the mem_desc parameter into data + transfer operations is ignored. ++.RS ++.RE + .PP + A provider may hide local registration requirements from applications by + making use of an internal registration cache or similar mechanisms. +@@ -166,38 +234,48 @@ registration calls. + Note: the FI_MR_LOCAL mr_mode bit replaces the FI_LOCAL_MR fi_info mode + bit. + When FI_MR_LOCAL is set, FI_LOCAL_MR is ignored. +-.PP +-\f[I]FI_MR_RAW\f[] : Raw memory regions are used to support providers +-with keys larger than 64\-bits or require setup at the peer. ++.TP ++.B \f[I]FI_MR_RAW\f[] ++Raw memory regions are used to support providers with keys larger than ++64\-bits or require setup at the peer. + When the FI_MR_RAW bit is set, applications must use fi_mr_raw_attr() + locally and fi_mr_map_raw() at the peer before targeting a memory region + as part of any data transfer request. +-.PP +-\f[I]FI_MR_VIRT_ADDR\f[] : The FI_MR_VIRT_ADDR bit indicates that the +-provider references memory regions by virtual address, rather than a +-0\-based offset. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_VIRT_ADDR\f[] ++The FI_MR_VIRT_ADDR bit indicates that the provider references memory ++regions by virtual address, rather than a 0\-based offset. + Peers that target memory regions registered with FI_MR_VIRT_ADDR specify + the destination memory buffer using the target\[aq]s virtual address, + with any offset into the region specified as virtual address + offset. + Support of this bit typically implies that peers must exchange + addressing data prior to initiating any RMA or atomic operation. +-.PP +-\f[I]FI_MR_ALLOCATED\f[] : When set, all registered memory regions must +-be backed by physical memory pages at the time the registration call is +-made. +-.PP +-\f[I]FI_MR_PROV_KEY\f[] : This memory region mode indicates that the +-provider does not support application requested MR keys. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_ALLOCATED\f[] ++When set, all registered memory regions must be backed by physical ++memory pages at the time the registration call is made. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_PROV_KEY\f[] ++This memory region mode indicates that the provider does not support ++application requested MR keys. + MR keys are returned by the provider. + Applications that support FI_MR_PROV_KEY can obtain the provider key + using fi_mr_key(), unless FI_MR_RAW is also set. + The returned key should then be exchanged with peers prior to initiating + an RMA or atomic operation. +-.PP +-\f[I]FI_MR_MMU_NOTIFY\f[] : FI_MR_MMU_NOTIFY is typically set by +-providers that support memory registration against memory regions that +-are not necessarily backed by allocated physical pages at the time the +-memory registration occurs. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_MMU_NOTIFY\f[] ++FI_MR_MMU_NOTIFY is typically set by providers that support memory ++registration against memory regions that are not necessarily backed by ++allocated physical pages at the time the memory registration occurs. + (That is, FI_MR_ALLOCATED is typically 0). + However, such providers require that applications notify the provider + prior to the MR being accessed as part of a data transfer operation. +@@ -206,10 +284,12 @@ now back the region. + The notification is necessary for providers that cannot hook directly + into the operating system page tables or memory management unit. + See fi_mr_refresh() for notification details. +-.PP +-\f[I]FI_MR_RMA_EVENT\f[] : This mode bit indicates that the provider +-must configure memory regions that are associated with RMA events prior +-to their use. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_RMA_EVENT\f[] ++This mode bit indicates that the provider must configure memory regions ++that are associated with RMA events prior to their use. + This includes all memory regions that are associated with completion + counters. + When set, applications must indicate if a memory region will be +@@ -217,22 +297,27 @@ associated with a completion counter as part of the region\[aq]s + creation. + This is done by passing in the FI_RMA_EVENT flag to the memory + registration call. ++.RS ++.RE + .PP + Such memory regions will be created in a disabled state and must be + associated with all completion counters prior to being enabled. + To enable a memory region, the application must call fi_mr_enable(). + After calling fi_mr_enable(), no further resource bindings may be made + to the memory region. +-.PP +-\f[I]FI_MR_ENDPOINT\f[] : This mode bit indicates that the provider +-associates memory regions with endpoints rather than domains. ++.TP ++.B \f[I]FI_MR_ENDPOINT\f[] ++This mode bit indicates that the provider associates memory regions with ++endpoints rather than domains. + Memory regions that are registered with the provider are created in a + disabled state and must be bound to an endpoint prior to being enabled. + To bind the MR with an endpoint, the application must use fi_mr_bind(). + To enable the memory region, the application must call fi_mr_enable(). +-.PP +-\f[I]Basic Memory Registration\f[] : Basic memory registration is +-indicated by the FI_MR_BASIC mr_mode bit. ++.RS ++.RE ++.TP ++.B \f[I]Basic Memory Registration\f[] ++Basic memory registration is indicated by the FI_MR_BASIC mr_mode bit. + FI_MR_BASIC is maintained for backwards compatibility (libfabric version + 1.4 or earlier). + The behavior of basic registration is equivalent to setting the +@@ -246,6 +331,8 @@ Other mr_mode bit pairings are invalid. + Unlike other mr_mode bits, if FI_MR_BASIC is set on input to + fi_getinfo(), it will not be cleared by the provider. + That is, setting FI_MR_BASIC to one requests basic registration. ++.RS ++.RE + .PP + The registrations functions \-\- fi_mr_reg, fi_mr_regv, and + fi_mr_regattr \-\- are used to register one or more memory regions with +@@ -363,6 +450,15 @@ Use of this call is required if the FI_RAW_MR mode bit has been set by + the provider; however, it is safe to use this call with any memory + region. + .PP ++On input, the key_size parameter should indicate the size of the raw_key ++buffer. ++If the actual key is larger than what can fit into the buffer, it will ++return \-FI_ETOOSMALL. ++On output, key_size is set to the size of the buffer needed to store the ++key, which may be larger than the input value. ++The needed key_size can also be obtained through the mr_key_size domain ++attribute (fi_domain_attr) field. ++.PP + A raw key must be mapped by a peer before it can be used in data + transfer operations. + See fi_mr_map_raw below. +@@ -394,11 +490,14 @@ with endpoints (see FI_MR_ENDPOINT). + .PP + When binding with a counter, the type of events tracked against the + memory region is based on the bitwise OR of the following flags. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : Generates an event whenever a remote RMA +-write or atomic operation modifies the memory region. ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++Generates an event whenever a remote RMA write or atomic operation ++modifies the memory region. + Use of this flag requires that the endpoint through which the MR is + accessed be created with the FI_RMA_EVENT capability. ++.RS ++.RE + .PP + When binding the memory region to an endpoint, flags should be 0. + .SS fi_mr_refresh +@@ -442,6 +541,7 @@ struct\ fi_mr_attr\ { + \ \ \ \ const\ struct\ iovec\ *mr_iov; + \ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ iov_count; + \ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ access; ++\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ offset; + \ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ requested_key; + \ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *context; + \ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ auth_key_size; +@@ -465,26 +565,45 @@ See \f[C]fi_domain(3)\f[]. + Indicates the type of access that the local or a peer endpoint has to + the registered memory region. + Supported access permissions are the bitwise OR of the following flags: +-.PP +-\f[I]FI_SEND\f[] : The memory buffer may be used in outgoing message +-data transfers. ++.TP ++.B \f[I]FI_SEND\f[] ++The memory buffer may be used in outgoing message data transfers. + This includes fi_msg and fi_tagged operations. +-.PP +-\f[I]FI_RECV\f[] : The memory buffer may be used to receive inbound +-message transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++The memory buffer may be used to receive inbound message transfers. + This includes fi_msg and fi_tagged operations. +-.PP +-\f[I]FI_READ\f[] : The memory buffer may be used as the result buffer +-for RMA read and atomic operations on the initiator side. +-.PP +-\f[I]FI_WRITE\f[] : The memory buffer may be used as the source buffer +-for RMA write and atomic operations on the initiator side. +-.PP +-\f[I]FI_REMOTE_READ\f[] : The memory buffer may be used as the source +-buffer of an RMA read operation on the target side. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : The memory buffer may be used as the target +-buffer of an RMA write or atomic operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_READ\f[] ++The memory buffer may be used as the result buffer for RMA read and ++atomic operations on the initiator side. ++.RS ++.RE ++.TP ++.B \f[I]FI_WRITE\f[] ++The memory buffer may be used as the source buffer for RMA write and ++atomic operations on the initiator side. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_READ\f[] ++The memory buffer may be used as the source buffer of an RMA read ++operation on the target side. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++The memory buffer may be used as the target buffer of an RMA write or ++atomic operation. ++.RS ++.RE ++.SS offset ++.PP ++The offset field is reserved for future use and must be 0. + .SS requested_key + .PP + An application specified access key associated with the memory region. +@@ -547,16 +666,21 @@ footprint overhead, making it less desirable for highly scalable apps. + .SH FLAGS + .PP + The follow flag may be specified to any memory registration call. +-.PP +-\f[I]FI_RMA_EVENT\f[] : This flag indicates that the specified memory +-region will be associated with a completion counter used to count RMA +-operations that access the MR. +-.PP +-\f[I]FI_RMA_PMEM\f[] : This flag indicates that the underlying memory +-region is backed by persistent memory and will be used in RMA +-operations. ++.TP ++.B \f[I]FI_RMA_EVENT\f[] ++This flag indicates that the specified memory region will be associated ++with a completion counter used to count RMA operations that access the ++MR. ++.RS ++.RE ++.TP ++.B \f[I]FI_RMA_PMEM\f[] ++This flag indicates that the underlying memory region is backed by ++persistent memory and will be used in RMA operations. + It must be specified if persistent completion semantics or persistent + data transfers are required when accessing the registered region. ++.RS ++.RE + .SH RETURN VALUES + .PP + Returns 0 on success. +@@ -564,18 +688,29 @@ On error, a negative value corresponding to fabric errno is returned. + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_ENOKEY\f[] : The requested_key is already in use. +-.PP +-\f[I]\-FI_EKEYREJECTED\f[] : The requested_key is not available. ++.TP ++.B \f[I]\-FI_ENOKEY\f[] ++The requested_key is already in use. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EKEYREJECTED\f[] ++The requested_key is not available. + They key may be out of the range supported by the provider, or the + provider may not support user\-requested memory registration keys. +-.PP +-\f[I]\-FI_ENOSYS\f[] : Returned by fi_mr_bind if the provider does not +-support reporting events based on access to registered memory regions. +-.PP +-\f[I]\-FI_EBADFLAGS\f[] : Returned if the specified flags are not +-supported by the provider. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_ENOSYS\f[] ++Returned by fi_mr_bind if the provider does not support reporting events ++based on access to registered memory regions. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EBADFLAGS\f[] ++Returned if the specified flags are not supported by the provider. ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_msg.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_msg.3 +index 4c35ad6..c89d44c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_msg.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_msg.3 +@@ -1,4 +1,7 @@ +-.TH "fi_msg" "3" "2018\-01\-08" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_msg" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_msg \- Message data transfer operations +@@ -48,40 +51,74 @@ ssize_t\ fi_injectdata(struct\ fid_ep\ *ep,\ const\ void\ *buf,\ size_t\ len, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]ep\f[] : Fabric endpoint on which to initiate send or post receive +-buffer. +-.PP +-\f[I]buf\f[] : Data buffer to send or receive. +-.PP +-\f[I]len\f[] : Length of data buffer to send or receive, specified in +-bytes. ++.TP ++.B \f[I]ep\f[] ++Fabric endpoint on which to initiate send or post receive buffer. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Data buffer to send or receive. ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data buffer to send or receive, specified in bytes. + Valid transfers are from 0 bytes up to the endpoint\[aq]s max_msg_size. +-.PP +-\f[I]iov\f[] : Vectored data buffer. +-.PP +-\f[I]count\f[] : Count of vectored data entries. +-.PP +-\f[I]desc\f[] : Descriptor associated with the data buffer +-.PP +-\f[I]data\f[] : Remote CQ data to transfer with the sent message. +-.PP +-\f[I]dest_addr\f[] : Destination address for connectionless transfers. ++.RS ++.RE ++.TP ++.B \f[I]iov\f[] ++Vectored data buffer. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Count of vectored data entries. ++.RS ++.RE ++.TP ++.B \f[I]desc\f[] ++Descriptor associated with the data buffer ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++Remote CQ data to transfer with the sent message. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr\f[] ++Destination address for connectionless transfers. + Ignored for connected endpoints. +-.PP +-\f[I]src_addr\f[] : Source address to receive from for connectionless +-transfers. ++.RS ++.RE ++.TP ++.B \f[I]src_addr\f[] ++Source address to receive from for connectionless transfers. + Applies only to connectionless endpoints with the FI_DIRECTED_RECV + capability enabled, otherwise this field is ignored. + If set to FI_ADDR_UNSPEC, any source address may match. +-.PP +-\f[I]msg\f[] : Message descriptor for send and receive operations. +-.PP +-\f[I]flags\f[] : Additional flags to apply for the send or receive +-operation. +-.PP +-\f[I]context\f[] : User specified pointer to associate with the +-operation. ++.RS ++.RE ++.TP ++.B \f[I]msg\f[] ++Message descriptor for send and receive operations. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply for the send or receive operation. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified pointer to associate with the operation. ++This parameter is ignored if the operation will not generate a ++successful completion, unless an op flag specifies the context parameter ++be used for required input. ++.RS ++.RE + .SH DESCRIPTION + .PP + The send functions \-\- fi_send, fi_sendv, fi_sendmsg, fi_inject, and +@@ -152,8 +189,7 @@ The send inject call is an optimized version of fi_send. + The fi_inject function behaves as if the FI_INJECT transfer flag were + set, and FI_COMPLETION were not. + That is, the data buffer is available for reuse immediately on returning +-from from fi_inject, and no completion event will be generated for this +-send. ++from fi_inject, and no completion event will be generated for this send. + The completion event will be suppressed even if the CQ was bound without + FI_SELECTIVE_COMPLETION or the endpoint\[aq]s op_flags contain + FI_COMPLETION. +@@ -200,32 +236,62 @@ previously configured with the endpoint, except where noted (see + fi_endpoint.3). + The following list of flags are usable with fi_recvmsg and/or + fi_sendmsg. +-.PP +-\f[I]FI_REMOTE_CQ_DATA\f[] : Applies to fi_sendmsg and fi_senddata. ++.TP ++.B \f[I]FI_REMOTE_CQ_DATA\f[] ++Applies to fi_sendmsg and fi_senddata. + Indicates that remote CQ data is available and should be sent as part of + the request. + See fi_getinfo for additional details on FI_REMOTE_CQ_DATA. +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for the specified operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_CLAIM\f[] ++Applies to posted receive operations for endpoints configured for ++FI_BUFFERED_RECV or FI_VARIABLE_MSG. ++This flag is used to retrieve a message that was buffered by the ++provider. ++See the Buffered Receives section for details. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for the specified ++operation. + The endpoint must be bound to a completion queue with + FI_SELECTIVE_COMPLETION that corresponds to the specified operation, or + this flag is ignored. +-.PP +-\f[I]FI_MORE\f[] : Indicates that the user has additional requests that +-will immediately be posted after the current call returns. ++.RS ++.RE ++.TP ++.B \f[I]FI_DISCARD\f[] ++Applies to posted receive operations for endpoints configured for ++FI_BUFFERED_RECV or FI_VARIABLE_MSG. ++This flag is used to free a message that was buffered by the provider. ++See the Buffered Receives section for details. ++.RS ++.RE ++.TP ++.B \f[I]FI_MORE\f[] ++Indicates that the user has additional requests that will immediately be ++posted after the current call returns. + Use of this flag may improve performance by enabling the provider to + optimize its access to the fabric hardware. +-.PP +-\f[I]FI_INJECT\f[] : Applies to fi_sendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT\f[] ++Applies to fi_sendmsg. + Indicates that the outbound data buffer should be returned to user + immediately after the send call returns, even if the operation is + handled asynchronously. + This may require that the underlying provider implementation copy the + data into a local buffer and transfer out of that buffer. + This flag can only be used with messages smaller than inject_size. +-.PP +-\f[I]FI_MULTI_RECV\f[] : Applies to posted receive operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTI_RECV\f[] ++Applies to posted receive operations. + This flag allows the user to post a single buffer that will receive + multiple incoming messages. + Received messages will be packed into the receive buffer until the +@@ -234,6 +300,8 @@ Use of this flag may cause a single posted receive operation to generate + multiple events as messages are placed into the buffer. + The placement of received data into the buffer may be subjected to + provider specific alignment restrictions. ++.RS ++.RE + .PP + The buffer will be released by the provider when the available buffer + space falls below the specified minimum (see FI_OPT_MIN_MULTI_RECV). +@@ -242,37 +310,175 @@ always be generated when the buffer has been consumed, even if other + receive completions have been suppressed (i.e. + the Rx context has been configured for FI_SELECTIVE_COMPLETION). + See the FI_MULTI_RECV completion flag \f[C]fi_cq\f[](3). +-.PP +-\f[I]FI_INJECT_COMPLETE\f[] : Applies to fi_sendmsg. ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Applies to fi_sendmsg. + Indicates that a completion should be generated when the source + buffer(s) may be reused. +-.PP +-\f[I]FI_TRANSMIT_COMPLETE\f[] : Applies to fi_sendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Applies to fi_sendmsg. + Indicates that a completion should not be generated until the operation + has been successfully transmitted and is no longer being tracked by the + provider. +-.PP +-\f[I]FI_DELIVERY_COMPLETE\f[] : Applies to fi_sendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_DELIVERY_COMPLETE\f[] ++Applies to fi_sendmsg. + Indicates that a completion should be generated when the operation has + been processed by the destination. +-.PP +-\f[I]FI_FENCE\f[] : Applies to transmits. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Applies to transmits. + Indicates that the requested operation, also known as the fenced + operation, and any operation posted after the fenced operation will be + deferred until all previous operations targeting the same peer endpoint + have completed. + Operations posted after the fencing will see and/or replace the results + of any operations initiated prior to the fenced operation. ++.RS ++.RE + .PP + The ordering of operations starting at the posting of the fenced + operation (inclusive) to the posting of a subsequent fenced operation + (exclusive) is controlled by the endpoint\[aq]s ordering semantics. +-.PP +-\f[I]FI_MULTICAST\f[] : Applies to transmits. ++.TP ++.B \f[I]FI_MULTICAST\f[] ++Applies to transmits. + This flag indicates that the address specified as the data transfer + destination is a multicast address. + This flag must be used in all multicast transfers, in conjunction with a + multicast fi_addr_t. ++.RS ++.RE ++.SH Buffered Receives ++.PP ++Buffered receives indicate that the networking layer allocates and ++manages the data buffers used to receive network data transfers. ++As a result, received messages must be copied from the network buffers ++into application buffers for processing. ++However, applications can avoid this copy if they are able to process ++the message in place (directly from the networking buffers). ++.PP ++Handling buffered receives differs based on the size of the message ++being sent. ++In general, smaller messages are passed directly to the application for ++processing. ++However, for large messages, an application will only receive the start ++of the message and must claim the rest. ++The details for how small messages are reported and large messages may ++be claimed are described below. ++.PP ++When a provider receives a message, it will write an entry to the ++completion queue associated with the receiving endpoint. ++For discussion purposes, the completion queue is assumed to be ++configured for FI_CQ_FORMAT_DATA. ++Since buffered receives are not associated with application posted ++buffers, the CQ entry op_context will point to a struct fi_recv_context. ++.IP ++.nf ++\f[C] ++struct\ fi_recv_context\ { ++\ \ \ \ struct\ fid_ep\ *ep; ++\ \ \ \ void\ *context; ++}; ++\f[] ++.fi ++.PP ++The \[aq]ep\[aq] field will point to the receiving endpoint or Rx ++context, and \[aq]context\[aq] will be NULL. ++The CQ entry\[aq]s \[aq]buf\[aq] will point to a provider managed buffer ++where the start of the received message is located, and \[aq]len\[aq] ++will be set to the total size of the message. ++.PP ++The maximum sized message that a provider can buffer is limited by an ++FI_OPT_BUFFERED_LIMIT. ++This threshold can be obtained and may be adjusted by the application ++using the fi_getopt and fi_setopt calls, respectively. ++Any adjustments must be made prior to enabling the endpoint. ++The CQ entry \[aq]buf\[aq] will point to a buffer of received data. ++If the sent message is larger than the buffered amount, the CQ entry ++\[aq]flags\[aq] will have the FI_MORE bit set. ++When the FI_MORE bit is set, \[aq]buf\[aq] will reference at least ++FI_OPT_BUFFERED_MIN bytes of data (see fi_endpoint.3 for more info). ++.PP ++After being notified that a buffered receive has arrived, applications ++must either claim or discard the message. ++Typically, small messages are processed and discarded, while large ++messages are claimed. ++However, an application is free to claim or discard any message ++regardless of message size. ++.PP ++To claim a message, an application must post a receive operation with ++the FI_CLAIM flag set. ++The struct fi_recv_context returned as part of the notification must be ++provided as the receive operation\[aq]s context. ++The struct fi_recv_context contains a \[aq]context\[aq] field. ++Applications may modify this field prior to claiming the message. ++When the claim operation completes, a standard receive completion entry ++will be generated on the completion queue. ++The \[aq]context\[aq] of the associated CQ entry will be set to the ++\[aq]context\[aq] value passed in through the fi_recv_context structure, ++and the CQ entry flags will have the FI_CLAIM bit set. ++.PP ++Buffered receives that are not claimed must be discarded by the ++application when it is done processing the CQ entry data. ++To discard a message, an application must post a receive operation with ++the FI_DISCARD flag set. ++The struct fi_recv_context returned as part of the notification must be ++provided as the receive operation\[aq]s context. ++When the FI_DISCARD flag is set for a receive operation, the receive ++input buffer(s) and length parameters are ignored. ++.PP ++IMPORTANT: Buffered receives must be claimed or discarded in a timely ++manner. ++Failure to do so may result in increased memory usage for network ++buffering or communication stalls. ++Once a buffered receive has been claimed or discarded, the original CQ ++entry \[aq]buf\[aq] or struct fi_recv_context data may no longer be ++accessed by the application. ++.PP ++The use of the FI_CLAIM and FI_DISCARD operation flags is also described ++with respect to tagged message transfers in fi_tagged.3. ++Buffered receives of tagged messages will include the message tag as ++part of the CQ entry, if available. ++.PP ++The handling of buffered receives follows all message ordering ++restrictions assigned to an endpoint. ++For example, completions may indicate the order in which received ++messages arrived at the receiver based on the endpoint attributes. ++.SH Variable Length Messages ++.PP ++Variable length messages, or simply variable messages, are transfers ++where the size of the message is unknown to the receiver prior to the ++message being sent. ++It indicates that the recipient of a message does not know the amount of ++data to expect prior to the message arriving. ++It is most commonly used when the size of message transfers varies ++greatly, with very large messages interspersed with much smaller ++messages, making receive side message buffering difficult to manage. ++Variable messages are not subject to max message length restrictions ++(i.e. ++struct fi_ep_attr::max_msg_size limits), and may be up to the maximum ++value of size_t (e.g. ++SIZE_MAX) in length. ++.PP ++Variable length messages support requests that the provider allocate and ++manage the network message buffers. ++As a result, the application requirements and provider behavior is ++identical as those defined for supporting the FI_BUFFERED_RECV mode bit. ++See the Buffered Receive section above for details. ++The main difference is that buffered receives are limited by the ++fi_ep_attr::max_msg_size threshold, whereas variable length messages are ++not. ++.PP ++Support for variable messages is indicated through the FI_VARIABLE_MSG ++capability bit. + .SH NOTES + .PP + If an endpoint has been configured with FI_MSG_PREFIX, the application +@@ -291,12 +497,15 @@ Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .PP + See the discussion below for details handling FI_EAGAIN. + .SH ERRORS +-.PP +-\f[I]\-FI_EAGAIN\f[] : Indicates that the underlying provider currently +-lacks the resources needed to initiate the requested operation. ++.TP ++.B \f[I]\-FI_EAGAIN\f[] ++Indicates that the underlying provider currently lacks the resources ++needed to initiate the requested operation. + The reasons for a provider returning FI_EAGAIN are varied. + However, common reasons include insufficient internal buffering or full + processing queues. ++.RS ++.RE + .PP + Insufficient internal buffering is often associated with operations that + use FI_INJECT. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_nic.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_nic.3 +new file mode 100644 +index 0000000..4f21557 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_nic.3 +@@ -0,0 +1,186 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_nic" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_nic \- Fabric network interface card attributes ++.SH NETWORK INTERFACE CARD ATTRIBUTES ++.PP ++The fid_nic structure defines attributes for a struct fi_info that is ++directly associated with underlying networking hardware and may be ++returned directly from calling \f[C]fi_getinfo\f[](3). ++The format of fid_nic and the related substructures are defined below. ++.PP ++Note that not all fields of all structures may be available. ++Unavailable or fields that are not applicable to the indicated device ++will be set to NULL or 0. ++.IP ++.nf ++\f[C] ++struct\ fid_nic\ { ++\ \ \ \ struct\ fid\ \ \ \ \ \ \ \ \ \ \ \ \ fid; ++\ \ \ \ struct\ fi_device_attr\ *device_attr; ++\ \ \ \ struct\ fi_bus_attr\ \ \ \ *bus_attr; ++\ \ \ \ struct\ fi_link_attr\ \ \ *link_attr; ++\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *prov_attr; ++}; ++ ++struct\ fi_device_attr\ { ++\ \ \ \ char\ *name; ++\ \ \ \ char\ *device_id; ++\ \ \ \ char\ *device_version; ++\ \ \ \ char\ *vendor_id; ++\ \ \ \ char\ *driver; ++\ \ \ \ char\ *firmware; ++}; ++ ++struct\ fi_pci_attr\ { ++\ \ \ \ uint16_t\ domain_id; ++\ \ \ \ uint8_t\ \ bus_id; ++\ \ \ \ uint8_t\ \ device_id; ++\ \ \ \ uint8_t\ \ function_id; ++}; ++ ++struct\ fi_bus_attr\ { ++\ \ \ \ enum\ fi_bus_type\ \ \ \ \ \ \ bus_type; ++\ \ \ \ union\ { ++\ \ \ \ \ \ \ \ struct\ fi_pci_attr\ pci; ++\ \ \ \ }\ attr; ++}; ++ ++struct\ fi_link_attr\ { ++\ \ \ \ char\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *address; ++\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ mtu; ++\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ speed; ++\ \ \ \ enum\ fi_link_state\ state; ++\ \ \ \ char\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *network_type; ++}; ++\f[] ++.fi ++.SS Device Attributes ++.PP ++Device attributes are used to identify the specific virtual or hardware ++NIC associated with an fi_info structure. ++.TP ++.B \f[I]name\f[] ++The operating system name associated with the device. ++This may be a logical network interface name (e.g. ++eth0 or eno1) or an absolute filename. ++.RS ++.RE ++.TP ++.B \f[I]device_id\f[] ++This is a vendor specific identifier for the device or product. ++.RS ++.RE ++.TP ++.B \f[I]device_version\f[] ++Indicates the version of the device. ++.RS ++.RE ++.TP ++.B \f[I]vendor_id\f[] ++Indicates the name of the vendor that distributes the NIC. ++.RS ++.RE ++.TP ++.B \f[I]driver\f[] ++The name of the driver associated with the device ++.RS ++.RE ++.TP ++.B \f[I]firmware\f[] ++The device\[aq]s firmware version. ++.RS ++.RE ++.SS Bus Attributes ++.PP ++The bus attributes are used to identify the physical location of the NIC ++in the system. ++.TP ++.B \f[I]bus_type\f[] ++Indicates the type of system bus where the NIC is located. ++Valid values are FI_BUS_PCI or FI_BUS_UNKNOWN. ++.RS ++.RE ++.TP ++.B \f[I]attr.pci.domain_id\f[] ++The domain where the PCI bus is located. ++Valid only if bus_type is FI_BUS_PCI. ++.RS ++.RE ++.TP ++.B \f[I]attr.pci.bus_id\f[] ++The PCI bus identifier where the device is located. ++Valid only if bus_type is FI_BUS_PCI. ++.RS ++.RE ++.TP ++.B \f[I]attr.pci.device_id\f[] ++The identifier on the PCI bus where the device is located. ++Valid only if bus_type is FI_BUS_PCI. ++.RS ++.RE ++.TP ++.B \f[I]attr.pci.function_id\f[] ++The function on the device being referenced. ++Valid only if bus_type is FI_BUS_PCI. ++.RS ++.RE ++.SS Link Attributes ++.PP ++Link attributes describe low\-level details about the network connection ++into the fabric. ++.TP ++.B \f[I]address\f[] ++The primary link\-level address associated with the NIC, such as a MAC ++address. ++If multiple addresses are available, only one will be reported. ++.RS ++.RE ++.TP ++.B \f[I]mtu\f[] ++The maximum transfer unit of link level frames or packets, in bytes. ++.RS ++.RE ++.TP ++.B \f[I]speed\f[] ++The active link data rate, given in bits per second. ++.RS ++.RE ++.TP ++.B \f[I]state\f[] ++The current physical port state. ++Possible values are FI_LINK_UNKNOWN, FI_LINK_DOWN, and FI_LINK_UP, to ++indicate if the port state is unknown or not applicable (unknown), ++inactive (down), or active (up). ++.RS ++.RE ++.TP ++.B \f[I]network_type\f[] ++Specifies the type of network interface currently active, such as ++Ethernet or InfiniBand. ++.RS ++.RE ++.SS Provider Attributes ++.PP ++Provider attributes reference provider specific details of the device. ++These attributes are both provider and device specific. ++The attributes can be interpretted by \f[C]fi_tostr\f[](3). ++Applications may also use the other attribute fields, such as related ++fi_fabric_attr: prov_name field, to determine an appropriate structure ++to cast the attributes. ++The format and definition of this field is outside the scope of the ++libfabric core framework, but may be available as part of a provider ++specific header file included with libfabric package. ++.SH NOTES ++.PP ++The fid_nic structure is returned as part of a call to ++\f[C]fi_getinfo\f[](3). ++It is automatically freed as part of calling \f[C]fi_freeinfo\f[](3) ++.SH SEE ALSO ++.PP ++\f[C]fi_getinfo\f[](3) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_poll.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_poll.3 +index 2e0231f..30594f1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_poll.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_poll.3 +@@ -1,24 +1,46 @@ +-.TH "fi_poll" "3" "2016\-12\-07" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_poll" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_poll \- Polling and wait set operations +-.PP +-fi_poll_open / fi_close : Open/close a polling set +-.PP +-fi_poll_add / fi_poll_del : Add/remove a completion queue or counter +-to/from a poll set. +-.PP +-fi_poll : Poll for progress and events across multiple completion queues +-and counters. +-.PP +-fi_wait_open / fi_close : Open/close a wait set +-.PP +-fi_wait : Waits for one or more wait objects in a set to be signaled. +-.PP +-fi_trywait : Indicate when it is safe to block on wait objects using +-native OS calls. +-.PP +-fi_control : Control wait set operation or attributes. ++.TP ++.B fi_poll_open / fi_close ++Open/close a polling set ++.RS ++.RE ++.TP ++.B fi_poll_add / fi_poll_del ++Add/remove a completion queue or counter to/from a poll set. ++.RS ++.RE ++.TP ++.B fi_poll ++Poll for progress and events across multiple completion queues and ++counters. ++.RS ++.RE ++.TP ++.B fi_wait_open / fi_close ++Open/close a wait set ++.RS ++.RE ++.TP ++.B fi_wait ++Waits for one or more wait objects in a set to be signaled. ++.RS ++.RE ++.TP ++.B fi_trywait ++Indicate when it is safe to block on wait objects using native OS calls. ++.RS ++.RE ++.TP ++.B fi_control ++Control wait set operation or attributes. ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -51,31 +73,63 @@ int\ fi_control(struct\ fid\ *waitset,\ int\ command,\ void\ *arg); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fabric\f[] : Fabric provider +-.PP +-\f[I]domain\f[] : Resource domain +-.PP +-\f[I]pollset\f[] : Event poll set +-.PP +-\f[I]waitset\f[] : Wait object set +-.PP +-\f[I]attr\f[] : Poll or wait set attributes +-.PP +-\f[I]context\f[] : On success, an array of user context values +-associated with completion queues or counters. +-.PP +-\f[I]fids\f[] : An array of fabric descriptors, each one associated with +-a native wait object. +-.PP +-\f[I]count\f[] : Number of entries in context or fids array. +-.PP +-\f[I]timeout\f[] : Time to wait for a signal, in milliseconds. +-.PP +-\f[I]command\f[] : Command of control operation to perform on the wait +-set. +-.PP +-\f[I]arg\f[] : Optional control argument. ++.TP ++.B \f[I]fabric\f[] ++Fabric provider ++.RS ++.RE ++.TP ++.B \f[I]domain\f[] ++Resource domain ++.RS ++.RE ++.TP ++.B \f[I]pollset\f[] ++Event poll set ++.RS ++.RE ++.TP ++.B \f[I]waitset\f[] ++Wait object set ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Poll or wait set attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++On success, an array of user context values associated with completion ++queues or counters. ++.RS ++.RE ++.TP ++.B \f[I]fids\f[] ++An array of fabric descriptors, each one associated with a native wait ++object. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Number of entries in context or fids array. ++.RS ++.RE ++.TP ++.B \f[I]timeout\f[] ++Time to wait for a signal, in milliseconds. ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Command of control operation to perform on the wait set. ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional control argument. ++.RS ++.RE + .SH DESCRIPTION + .SS fi_poll_open + .PP +@@ -93,9 +147,12 @@ struct\ fi_poll_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]flags\f[] : Flags that set the default operation of the poll set. ++.TP ++.B \f[I]flags\f[] ++Flags that set the default operation of the poll set. + The use of this field is reserved and must be set to 0 by the caller. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with a poll set. +@@ -148,25 +205,31 @@ struct\ fi_wait_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]wait_obj\f[] : Wait sets are associated with specific wait +-object(s). ++.TP ++.B \f[I]wait_obj\f[] ++Wait sets are associated with specific wait object(s). + Wait objects allow applications to block until the wait object is + signaled, indicating that an event is available to be read. + The following values may be used to specify the type of wait object + associated with a wait set: FI_WAIT_UNSPEC, FI_WAIT_FD, and + FI_WAIT_MUTEX_COND. +-.IP \[bu] 2 +-\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the +-wait set using fabric interface calls, such as fi_wait. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_UNSPEC\f[] ++Specifies that the user will only wait on the wait set using fabric ++interface calls, such as fi_wait. + In this case, the underlying provider may select the most appropriate or + highest performing wait object available, including custom wait + mechanisms. + Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve + the underlying wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_FD\f[] : Indicates that the wait set should use file +-descriptor(s) as its wait mechanism. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_FD\f[] ++Indicates that the wait set should use file descriptor(s) as its wait ++mechanism. + It may not always be possible for a wait set to be implemented using a + single underlying file descriptor, but all wait objects will be file + descriptors. +@@ -174,16 +237,27 @@ File descriptor wait objects must be usable in the POSIX select(2), + poll(2), and epoll(7) routines (if available). + However, a provider may signal an FD wait object by marking it as + readable or with an error. +-.IP \[bu] 2 +-\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the wait set should use a +-pthread mutex and cond variable as a wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_CRITSEC_COND\f[] : Windows specific. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_MUTEX_COND\f[] ++Specifies that the wait set should use a pthread mutex and cond variable ++as a wait object. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_CRITSEC_COND\f[] ++Windows specific. + Specifies that the EQ should use a critical section and condition + variable as a wait object. +-.PP +-\f[I]flags\f[] : Flags that set the default operation of the wait set. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Flags that set the default operation of the wait set. + The use of this field is reserved and must be set to 0 by the caller. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with a wait set. +@@ -260,9 +334,10 @@ Access to the wait set should be serialized across all calls when + fi_control is invoked, as it may redirect the implementation of wait set + operations. + The following control commands are usable with a wait set. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the low\-level wait object associated with the wait set. ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the low\-level wait object ++associated with the wait set. + The format of the wait set is specified during wait set creation, + through the wait set attributes. + The fi_control arg parameter should be an address where a pointer to the +@@ -272,15 +347,20 @@ fi_mutex_cond\[aq] for FI_WAIT_MUTEX_COND. + Support for FI_GETWAIT is provider specific and may fail if not + supported or if the wait set is implemented using more than one wait + object. ++.RS ++.RE + .SH RETURN VALUES + .PP + Returns FI_SUCCESS on success. + On error, a negative value corresponding to fabric errno is returned. + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. +-.PP +-fi_poll : On success, if events are available, returns the number of +-entries written to the context array. ++.TP ++.B fi_poll ++On success, if events are available, returns the number of entries ++written to the context array. ++.RS ++.RE + .SH NOTES + .SH SEE ALSO + .PP +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_rma.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_rma.3 +index b1404bd..0bacb8d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_rma.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_rma.3 +@@ -1,4 +1,7 @@ +-.TH "fi_rma" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_rma" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_rma \- Remote memory access operations +@@ -52,46 +55,86 @@ ssize_t\ fi_inject_writedata(struct\ fid_ep\ *ep,\ const\ void\ *buf,\ size_t\ l + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]ep\f[] : Fabric endpoint on which to initiate read or write +-operation. +-.PP +-\f[I]buf\f[] : Local data buffer to read into (read target) or write +-from (write source) +-.PP +-\f[I]len\f[] : Length of data to read or write, specified in bytes. ++.TP ++.B \f[I]ep\f[] ++Fabric endpoint on which to initiate read or write operation. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Local data buffer to read into (read target) or write from (write ++source) ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data to read or write, specified in bytes. + Valid transfers are from 0 bytes up to the endpoint\[aq]s max_msg_size. +-.PP +-\f[I]iov\f[] : Vectored data buffer. +-.PP +-\f[I]count\f[] : Count of vectored data entries. +-.PP +-\f[I]addr\f[] : Address of remote memory to access. ++.RS ++.RE ++.TP ++.B \f[I]iov\f[] ++Vectored data buffer. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Count of vectored data entries. ++.RS ++.RE ++.TP ++.B \f[I]addr\f[] ++Address of remote memory to access. + This will be the virtual address of the remote region in the case of + FI_MR_BASIC, or the offset from the starting address in the case of + FI_MR_SCALABLE. +-.PP +-\f[I]key\f[] : Protection key associated with the remote memory. +-.PP +-\f[I]desc\f[] : Descriptor associated with the local data buffer +-.PP +-\f[I]data\f[] : Remote CQ data to transfer with the operation. +-.PP +-\f[I]dest_addr\f[] : Destination address for connectionless write +-transfers. ++.RS ++.RE ++.TP ++.B \f[I]key\f[] ++Protection key associated with the remote memory. ++.RS ++.RE ++.TP ++.B \f[I]desc\f[] ++Descriptor associated with the local data buffer ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++Remote CQ data to transfer with the operation. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr\f[] ++Destination address for connectionless write transfers. + Ignored for connected endpoints. +-.PP +-\f[I]src_addr\f[] : Source address to read from for connectionless +-transfers. ++.RS ++.RE ++.TP ++.B \f[I]src_addr\f[] ++Source address to read from for connectionless transfers. + Ignored for connected endpoints. +-.PP +-\f[I]msg\f[] : Message descriptor for read and write operations. +-.PP +-\f[I]flags\f[] : Additional flags to apply for the read or write +-operation. +-.PP +-\f[I]context\f[] : User specified pointer to associate with the +-operation. ++.RS ++.RE ++.TP ++.B \f[I]msg\f[] ++Message descriptor for read and write operations. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply for the read or write operation. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified pointer to associate with the operation. ++This parameter is ignored if the operation will not generate a ++successful completion, unless an op flag specifies the context parameter ++be used for required input. ++.RS ++.RE + .SH DESCRIPTION + .PP + RMA (remote memory access) operations are used to transfer data directly +@@ -213,56 +256,82 @@ previously configured with the endpoint, except where noted (see + fi_endpoint.3). + The following list of flags are usable with fi_readmsg and/or + fi_writemsg. +-.PP +-\f[I]FI_REMOTE_CQ_DATA\f[] : Applies to fi_writemsg and fi_writedata. ++.TP ++.B \f[I]FI_REMOTE_CQ_DATA\f[] ++Applies to fi_writemsg and fi_writedata. + Indicates that remote CQ data is available and should be sent as part of + the request. + See fi_getinfo for additional details on FI_REMOTE_CQ_DATA. +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for the specified operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for the specified ++operation. + The endpoint must be bound to a completion queue with + FI_SELECTIVE_COMPLETION that corresponds to the specified operation, or + this flag is ignored. +-.PP +-\f[I]FI_MORE\f[] : Indicates that the user has additional requests that +-will immediately be posted after the current call returns. ++.RS ++.RE ++.TP ++.B \f[I]FI_MORE\f[] ++Indicates that the user has additional requests that will immediately be ++posted after the current call returns. + Use of this flag may improve performance by enabling the provider to + optimize its access to the fabric hardware. +-.PP +-\f[I]FI_INJECT\f[] : Applies to fi_writemsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT\f[] ++Applies to fi_writemsg. + Indicates that the outbound data buffer should be returned to user + immediately after the write call returns, even if the operation is + handled asynchronously. + This may require that the underlying provider implementation copy the + data into a local buffer and transfer out of that buffer. + This flag can only be used with messages smaller than inject_size. +-.PP +-\f[I]FI_INJECT_COMPLETE\f[] : Applies to fi_writemsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Applies to fi_writemsg. + Indicates that a completion should be generated when the source + buffer(s) may be reused. +-.PP +-\f[I]FI_TRANSMIT_COMPLETE\f[] : Applies to fi_writemsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Applies to fi_writemsg. + Indicates that a completion should not be generated until the operation + has been successfully transmitted and is no longer being tracked by the + provider. +-.PP +-\f[I]FI_DELIVERY_COMPLETE\f[] : Applies to fi_writemsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_DELIVERY_COMPLETE\f[] ++Applies to fi_writemsg. + Indicates that a completion should be generated when the operation has + been processed by the destination. +-.PP +-\f[I]FI_COMMIT_COMPLETE\f[] : Applies to fi_writemsg when targeting +-persistent memory regions. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMMIT_COMPLETE\f[] ++Applies to fi_writemsg when targeting persistent memory regions. + Indicates that a completion should be generated only after the result of + the operation has been made durable. +-.PP +-\f[I]FI_FENCE\f[] : Applies to transmits. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Applies to transmits. + Indicates that the requested operation, also known as the fenced + operation, and any operation posted after the fenced operation will be + deferred until all previous operations targeting the same peer endpoint + have completed. + Operations posted after the fencing will see and/or replace the results + of any operations initiated prior to the fenced operation. ++.RS ++.RE + .PP + The ordering of operations starting at the posting of the fenced + operation (inclusive) to the posting of a subsequent fenced operation +@@ -273,9 +342,11 @@ Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_EAGAIN\f[] : See \f[C]fi_msg\f[](3) for a detailed description +-of handling FI_EAGAIN. ++.TP ++.B \f[I]\-FI_EAGAIN\f[] ++See \f[C]fi_msg\f[](3) for a detailed description of handling FI_EAGAIN. ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_tagged.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_tagged.3 +index 652b887..beb8fc4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_tagged.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_tagged.3 +@@ -1,4 +1,7 @@ +-.TH "fi_tagged" "3" "2017\-10\-20" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_tagged" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_tagged \- Tagged data transfer operations +@@ -50,43 +53,83 @@ ssize_t\ fi_tinjectdata(struct\ fid_ep\ *ep,\ const\ void\ *buf,\ size_t\ len, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fid\f[] : Fabric endpoint on which to initiate tagged communication +-operation. +-.PP +-\f[I]buf\f[] : Data buffer to send or receive. +-.PP +-\f[I]len\f[] : Length of data buffer to send or receive. +-.PP +-\f[I]iov\f[] : Vectored data buffer. +-.PP +-\f[I]count\f[] : Count of vectored data entries. +-.PP +-\f[I]tag\f[] : Tag associated with the message. +-.PP +-\f[I]ignore\f[] : Mask of bits to ignore applied to the tag for receive +-operations. +-.PP +-\f[I]desc\f[] : Memory descriptor associated with the data buffer +-.PP +-\f[I]data\f[] : Remote CQ data to transfer with the sent data. +-.PP +-\f[I]dest_addr\f[] : Destination address for connectionless transfers. ++.TP ++.B \f[I]fid\f[] ++Fabric endpoint on which to initiate tagged communication operation. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Data buffer to send or receive. ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data buffer to send or receive. ++.RS ++.RE ++.TP ++.B \f[I]iov\f[] ++Vectored data buffer. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Count of vectored data entries. ++.RS ++.RE ++.TP ++.B \f[I]tag\f[] ++Tag associated with the message. ++.RS ++.RE ++.TP ++.B \f[I]ignore\f[] ++Mask of bits to ignore applied to the tag for receive operations. ++.RS ++.RE ++.TP ++.B \f[I]desc\f[] ++Memory descriptor associated with the data buffer ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++Remote CQ data to transfer with the sent data. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr\f[] ++Destination address for connectionless transfers. + Ignored for connected endpoints. +-.PP +-\f[I]src_addr\f[] : Source address to receive from for connectionless +-transfers. ++.RS ++.RE ++.TP ++.B \f[I]src_addr\f[] ++Source address to receive from for connectionless transfers. + Applies only to connectionless endpoints with the FI_DIRECTED_RECV + capability enabled, otherwise this field is ignored. + If set to FI_ADDR_UNSPEC, any source address may match. +-.PP +-\f[I]msg\f[] : Message descriptor for send and receive operations. +-.PP +-\f[I]flags\f[] : Additional flags to apply for the send or receive +-operation. +-.PP +-\f[I]context\f[] : User specified pointer to associate with the +-operation. ++.RS ++.RE ++.TP ++.B \f[I]msg\f[] ++Message descriptor for send and receive operations. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply for the send or receive operation. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified pointer to associate with the operation. ++This parameter is ignored if the operation will not generate a ++successful completion, unless an op flag specifies the context parameter ++be used for required input. ++.RS ++.RE + .SH DESCRIPTION + .PP + Tagged messages are data transfers which carry a key or tag with the +@@ -177,7 +220,7 @@ The tagged inject call is an optimized version of fi_tsend. + The fi_tinject function behaves as if the FI_INJECT transfer flag were + set, and FI_COMPLETION were not. + That is, the data buffer is available for reuse immediately on returning +-from from fi_tinject, and no completion event will be generated for this ++from fi_tinject, and no completion event will be generated for this + send. + The completion event will be suppressed even if the endpoint has not + been configured with FI_SELECTIVE_COMPLETION. +@@ -223,56 +266,85 @@ previously configured with the endpoint, except where noted (see + fi_endpoint). + The following list of flags are usable with fi_trecvmsg and/or + fi_tsendmsg. +-.PP +-\f[I]FI_REMOTE_CQ_DATA\f[] : Applies to fi_tsendmsg and fi_tsenddata. ++.TP ++.B \f[I]FI_REMOTE_CQ_DATA\f[] ++Applies to fi_tsendmsg and fi_tsenddata. + Indicates that remote CQ data is available and should be sent as part of + the request. + See fi_getinfo for additional details on FI_REMOTE_CQ_DATA. +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for the specified operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for the specified ++operation. + The endpoint must be bound to a completion queue with + FI_SELECTIVE_COMPLETION that corresponds to the specified operation, or + this flag is ignored. +-.PP +-\f[I]FI_MORE\f[] : Indicates that the user has additional requests that +-will immediately be posted after the current call returns. ++.RS ++.RE ++.TP ++.B \f[I]FI_MORE\f[] ++Indicates that the user has additional requests that will immediately be ++posted after the current call returns. + Use of this flag may improve performance by enabling the provider to + optimize its access to the fabric hardware. +-.PP +-\f[I]FI_INJECT\f[] : Applies to fi_tsendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT\f[] ++Applies to fi_tsendmsg. + Indicates that the outbound data buffer should be returned to user + immediately after the send call returns, even if the operation is + handled asynchronously. + This may require that the underlying provider implementation copy the + data into a local buffer and transfer out of that buffer. + This flag can only be used with messages smaller than inject_size. +-.PP +-\f[I]FI_INJECT_COMPLETE\f[] : Applies to fi_tsendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Applies to fi_tsendmsg. + Indicates that a completion should be generated when the source + buffer(s) may be reused. +-.PP +-\f[I]FI_TRANSMIT_COMPLETE\f[] : Applies to fi_tsendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Applies to fi_tsendmsg. + Indicates that a completion should not be generated until the operation + has been successfully transmitted and is no longer being tracked by the + provider. +-.PP +-\f[I]FI_FENCE\f[] : Applies to transmits. ++.RS ++.RE ++.TP ++.B \f[I]FI_MATCH_COMPLETE\f[] ++Applies to fi_tsendmsg. ++Indicates that a completion should be generated only after the message ++has either been matched with a tagged buffer or was discarded by the ++target application. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Applies to transmits. + Indicates that the requested operation, also known as the fenced + operation, and any operation posted after the fenced operation will be + deferred until all previous operations targeting the same peer endpoint + have completed. + Operations posted after the fencing will see and/or replace the results + of any operations initiated prior to the fenced operation. ++.RS ++.RE + .PP + The ordering of operations starting at the posting of the fenced + operation (inclusive) to the posting of a subsequent fenced operation + (exclusive) is controlled by the endpoint\[aq]s ordering semantics. + .PP + The following flags may be used with fi_trecvmsg. +-.PP +-\f[I]FI_PEEK\f[] : The peek flag may be used to see if a specified +-message has arrived. ++.TP ++.B \f[I]FI_PEEK\f[] ++The peek flag may be used to see if a specified message has arrived. + A peek request is often useful on endpoints that have provider allocated + buffering enabled (see fi_rx_attr total_buffered_recv). + Unlike standard receive operations, a receive operation with the FI_PEEK +@@ -284,6 +356,8 @@ endpoint. + If no message is found matching the tags specified in the peek request, + then a completion queue error entry with err field set to FI_ENOMSG will + be available. ++.RS ++.RE + .PP + If a peek request locates a matching message, the operation will + complete successfully. +@@ -308,33 +382,96 @@ A provider may return NULL even if the peek operation completes + successfully. + Note that the CQ entry len field will reference the size of the message, + not necessarily the size of the returned data. +-.PP +-\f[I]FI_CLAIM\f[] : If this flag is used in conjunction with FI_PEEK, it +-indicates if the peek request completes successfully \-\- indicating +-that a matching message was located \-\- the message is claimed by +-caller. ++.TP ++.B \f[I]FI_CLAIM\f[] ++If this flag is used in conjunction with FI_PEEK, it indicates if the ++peek request completes successfully \-\- indicating that a matching ++message was located \-\- the message is claimed by caller. + Claimed messages can only be retrieved using a subsequent, paired + receive operation with the FI_CLAIM flag set. + A receive operation with the FI_CLAIM flag set, but FI_PEEK not set is + used to retrieve a previously claimed message. ++.RS ++.RE + .PP + In order to use the FI_CLAIM flag, an application must supply a struct +-fi_context structure as the context for the receive operation. ++fi_context structure as the context for the receive operation, or a ++struct fi_recv_context in the case of buffered receives. + The same fi_context structure used for an FI_PEEK + FI_CLAIM operation + must be used by the paired FI_CLAIM request. + .PP +-\f[I]FI_DISCARD\f[] : This flag must be used in conjunction with either +-FI_PEEK or FI_CLAIM. ++This flag also applies to endpoints configured for FI_BUFFERED_RECV or ++FI_VARIABLE_MSG. ++When set, it is used to retrieve a tagged message that was buffered by ++the provider. ++See Buffered Tagged Receives section for details. ++.TP ++.B \f[I]FI_DISCARD\f[] ++This flag may be used in conjunction with either FI_PEEK or FI_CLAIM. + If this flag is used in conjunction with FI_PEEK, it indicates if the + peek request completes successfully \-\- indicating that a matching + message was located \-\- the message is discarded by the provider, as + the data is not needed by the application. + This flag may also be used in conjunction with FI_CLAIM in order to +-retrieve and discard a message previously claimed using an FI_PEEK + +-FI_CLAIM request. ++discard a message previously claimed using an FI_PEEK + FI_CLAIM ++request. ++.RS ++.RE ++.PP ++This flag also applies to endpoints configured for FI_BUFFERED_RECV or ++FI_VARIABLE_MSG. ++When set, it indicates that the provider should free a buffered ++messages. ++See Buffered Tagged Receives section for details. + .PP + If this flag is set, the input buffer(s) and length parameters are + ignored. ++.SH Buffered Tagged Receives ++.PP ++See \f[C]fi_msg\f[](3) for an introduction to buffered receives. ++The handling of buffered receives differs between fi_msg operations and ++fi_tagged. ++Although the provider is responsible for allocating and managing network ++buffers, the application is responsible for identifying the tags that ++will be used to match incoming messages. ++The provider handles matching incoming receives to the application ++specified tags. ++.PP ++When FI_BUFFERED_RECV is enabled, the application posts the tags that ++will be used for matching purposes. ++Tags are posted using fi_trecv, fi_trecvv, and fi_trecvmsg; however, ++parameters related to the input buffers are ignored (e.g. ++buf, len, iov, desc). ++When a provider receives a message for which there is a matching tag, it ++will write an entry to the completion queue associated with the ++receiving endpoint. ++.PP ++For discussion purposes, the completion queue is assumed to be ++configured for FI_CQ_FORMAT_TAGGED. ++The op_context field will point to a struct fi_recv_contex. ++.IP ++.nf ++\f[C] ++struct\ fi_recv_context\ { ++\ \ \ \ struct\ fid_ep\ *ep; ++\ \ \ \ void\ *context; ++}; ++\f[] ++.fi ++.PP ++The \[aq]ep\[aq] field will be NULL. ++The \[aq]context\[aq] field will match the application context specified ++when posting the tag. ++Other fields are set as defined in \f[C]fi_msg\f[](3). ++.PP ++After being notified that a buffered receive has arrived, applications ++must either claim or discard the message as described in ++\f[C]fi_msg\f[](3). ++.SH Variable Length Tagged Messages ++.PP ++Variable length messages are defined in \f[C]fi_msg\f[](3). ++The requirements for handling variable length tagged messages is ++identical to those defined above for buffered tagged receives. + .SH RETURN VALUE + .PP + The tagged send and receive calls return 0 on success. +@@ -342,14 +479,21 @@ On error, a negative value corresponding to fabric \f[I]errno \f[] is + returned. + Fabric errno values are defined in \f[C]fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_EAGAIN\f[] : See \f[C]fi_msg\f[](3) for a detailed description +-of handling FI_EAGAIN. +-.PP +-\f[I]\-FI_EINVAL\f[] : Indicates that an invalid argument was supplied +-by the user. +-.PP +-\f[I]\-FI_EOTHER\f[] : Indicates that an unspecified error occurred. ++.TP ++.B \f[I]\-FI_EAGAIN\f[] ++See \f[C]fi_msg\f[](3) for a detailed description of handling FI_EAGAIN. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EINVAL\f[] ++Indicates that an invalid argument was supplied by the user. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EOTHER\f[] ++Indicates that an unspecified error occurred. ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_trigger.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_trigger.3 +index 10a2d29..7015699 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_trigger.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_trigger.3 +@@ -1,4 +1,7 @@ +-.TH "fi_trigger" "3" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_trigger" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_trigger \- Triggered operations +@@ -71,11 +74,13 @@ event type. + .SS TRIGGER EVENTS + .PP + The following trigger events are defined. +-.PP +-\f[I]FI_TRIGGER_THRESHOLD\f[] : This indicates that the data transfer +-operation will be deferred until an event counter crosses an application +-specified threshold value. ++.TP ++.B \f[I]FI_TRIGGER_THRESHOLD\f[] ++This indicates that the data transfer operation will be deferred until ++an event counter crosses an application specified threshold value. + The threshold is specified using struct fi_trigger_threshold: ++.RS ++.RE + .IP + .nf + \f[C] +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_version.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_version.3 +index e2e8fc1..27e5080 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_version.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_version.3 +@@ -1,4 +1,7 @@ +-.TH "fi_version" "3" "2016\-02\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_version" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_version \- Version of the library interfaces +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fabric.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fabric.7 +index 4964e5c..a8e476f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fabric.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fabric.7 +@@ -1,4 +1,7 @@ +-.TH "fabric" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fabric" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fabric \- Fabric Interface Library +@@ -22,10 +25,10 @@ system interventions. + Data transfers can occur directly to and from application memory. + .PP + There are two components to the libfabric software: +-.PP +-\f[I]Fabric Providers\f[] : Conceptually, a fabric provider may be +-viewed as a local hardware NIC driver, though a provider is not limited +-by this definition. ++.TP ++.B \f[I]Fabric Providers\f[] ++Conceptually, a fabric provider may be viewed as a local hardware NIC ++driver, though a provider is not limited by this definition. + The first component of libfabric is a general purpose framework that is + capable of handling different types of fabric hardware. + All fabric hardware devices and their software drivers are required to +@@ -33,14 +36,18 @@ support this framework. + Devices and the drivers that plug into the libfabric framework are + referred to as fabric providers, or simply providers. + Provider details may be found in \f[C]fi_provider\f[](7). +-.PP +-\f[I]Fabric Interfaces\f[] : The second component is a set of +-communication operations. ++.RS ++.RE ++.TP ++.B \f[I]Fabric Interfaces\f[] ++The second component is a set of communication operations. + Libfabric defines several sets of communication functions that providers + can support. + It is not required that providers implement all the interfaces that are + defined; however, providers clearly indicate which interfaces they do + support. ++.RS ++.RE + .SH FABRIC INTERFACES + .PP + The fabric interfaces are designed such that they are cohesive and not +@@ -66,14 +73,16 @@ The control interfaces APIs provide applications access to network + resources. + This involves listing all the interfaces available, obtaining the + capabilities of the interfaces and opening a provider. +-.PP +-\f[I]fi_getinfo \- Fabric Information\f[] : The fi_getinfo call is the +-base call used to discover and request fabric services offered by the +-system. ++.TP ++.B \f[I]fi_getinfo \- Fabric Information\f[] ++The fi_getinfo call is the base call used to discover and request fabric ++services offered by the system. + Applications can use this call to indicate the type of communication + that they desire. + The results from fi_getinfo, fi_info, are used to reserve and configure + fabric resources. ++.RS ++.RE + .PP + fi_getinfo returns a list of fi_info structures. + Each structure references a single fabric provider, indicating the +@@ -81,60 +90,79 @@ interfaces that the provider supports, along with a named set of + resources. + A fabric provider may include multiple fi_info structures in the + returned list. +-.PP +-\f[I]fi_fabric \- Fabric Domain\f[] : A fabric domain represents a +-collection of hardware and software resources that access a single +-physical or virtual network. ++.TP ++.B \f[I]fi_fabric \- Fabric Domain\f[] ++A fabric domain represents a collection of hardware and software ++resources that access a single physical or virtual network. + All network ports on a system that can communicate with each other + through the fabric belong to the same fabric domain. + A fabric domain shares network addresses and can span multiple + providers. + libfabric supports systems connected to multiple fabrics. +-.PP +-\f[I]fi_domain \- Access Domains\f[] : An access domain represents a +-single logical connection into a fabric. ++.RS ++.RE ++.TP ++.B \f[I]fi_domain \- Access Domains\f[] ++An access domain represents a single logical connection into a fabric. + It may map to a single physical or virtual NIC or a port. + An access domain defines the boundary across which fabric resources may + be associated. + Each access domain belongs to a single fabric domain. +-.PP +-\f[I]fi_endpoint \- Fabric Endpoint\f[] : A fabric endpoint is a +-communication portal. ++.RS ++.RE ++.TP ++.B \f[I]fi_endpoint \- Fabric Endpoint\f[] ++A fabric endpoint is a communication portal. + An endpoint may be either active or passive. + Passive endpoints are used to listen for connection requests. + Active endpoints can perform data transfers. + Endpoints are configured with specific communication capabilities and + data transfer interfaces. +-.PP +-\f[I]fi_eq \- Event Queue\f[] : Event queues, are used to collect and +-report the completion of asynchronous operations and events. ++.RS ++.RE ++.TP ++.B \f[I]fi_eq \- Event Queue\f[] ++Event queues, are used to collect and report the completion of ++asynchronous operations and events. + Event queues report events that are not directly associated with data + transfer operations. +-.PP +-\f[I]fi_cq \- Completion Queue\f[] : Completion queues are +-high\-performance event queues used to report the completion of data +-transfer operations. +-.PP +-\f[I]fi_cntr \- Event Counters\f[] : Event counters are used to report +-the number of completed asynchronous operations. ++.RS ++.RE ++.TP ++.B \f[I]fi_cq \- Completion Queue\f[] ++Completion queues are high\-performance event queues used to report the ++completion of data transfer operations. ++.RS ++.RE ++.TP ++.B \f[I]fi_cntr \- Event Counters\f[] ++Event counters are used to report the number of completed asynchronous ++operations. + Event counters are considered light\-weight, in that a completion simply + increments a counter, rather than placing an entry into an event queue. +-.PP +-\f[I]fi_mr \- Memory Region\f[] : Memory regions describe application +-local memory buffers. ++.RS ++.RE ++.TP ++.B \f[I]fi_mr \- Memory Region\f[] ++Memory regions describe application local memory buffers. + In order for fabric resources to access application memory, the + application must first grant permission to the fabric provider by + constructing a memory region. + Memory regions are required for specific types of data transfer + operations, such as RMA transfers (see below). +-.PP +-\f[I]fi_av \- Address Vector\f[] : Address vectors are used to map +-higher level addresses, such as IP addresses, which may be more natural +-for an application to use, into fabric specific addresses. ++.RS ++.RE ++.TP ++.B \f[I]fi_av \- Address Vector\f[] ++Address vectors are used to map higher level addresses, such as IP ++addresses, which may be more natural for an application to use, into ++fabric specific addresses. + The use of address vectors allows providers to reduce the amount of + memory required to maintain large address look\-up tables, and eliminate + expensive address resolution and look\-up methods during data transfer + operations. ++.RS ++.RE + .SH DATA TRANSFER INTERFACES + .PP + Fabric endpoints are associated with multiple data transfer interfaces. +@@ -142,95 +170,184 @@ Each interface set is designed to support a specific style of + communication, with an endpoint allowing the different interfaces to be + used in conjunction. + The following data transfer interfaces are defined by libfabric. +-.PP +-\f[I]fi_msg \- Message Queue\f[] : Message queues expose a simple, +-message\-based FIFO queue interface to the application. ++.TP ++.B \f[I]fi_msg \- Message Queue\f[] ++Message queues expose a simple, message\-based FIFO queue interface to ++the application. + Message data transfers allow applications to send and receive data with + message boundaries being maintained. +-.PP +-\f[I]fi_tagged \- Tagged Message Queues\f[] : Tagged message lists +-expose send/receive data transfer operations built on the concept of +-tagged messaging. ++.RS ++.RE ++.TP ++.B \f[I]fi_tagged \- Tagged Message Queues\f[] ++Tagged message lists expose send/receive data transfer operations built ++on the concept of tagged messaging. + The tagged message queue is conceptually similar to standard message + queues, but with the addition of 64\-bit tags for each message. + Sent messages are matched with receive buffers that are tagged with a + similar value. +-.PP +-\f[I]fi_rma \- Remote Memory Access\f[] : RMA transfers are one\-sided +-operations that read or write data directly to a remote memory region. ++.RS ++.RE ++.TP ++.B \f[I]fi_rma \- Remote Memory Access\f[] ++RMA transfers are one\-sided operations that read or write data directly ++to a remote memory region. + Other than defining the appropriate memory region, RMA operations do not + require interaction at the target side for the data transfer to + complete. +-.PP +-\f[I]fi_atomic \- Atomic\f[] : Atomic operations can perform one of +-several operations on a remote memory region. ++.RS ++.RE ++.TP ++.B \f[I]fi_atomic \- Atomic\f[] ++Atomic operations can perform one of several operations on a remote ++memory region. + Atomic operations include well\-known functionality, such as atomic\-add + and compare\-and\-swap, plus several other pre\-defined calls. + Unlike other data transfer interfaces, atomic operations are aware of + the data formatting at the target memory region. ++.RS ++.RE + .SH LOGGING INTERFACE + .PP + Logging can be controlled using the FI_LOG_LEVEL, FI_LOG_PROV, and + FI_LOG_SUBSYS environment variables. +-.PP +-\f[I]FI_LOG_LEVEL\f[] : FI_LOG_LEVEL controls the amount of logging data +-that is output. ++.TP ++.B \f[I]FI_LOG_LEVEL\f[] ++FI_LOG_LEVEL controls the amount of logging data that is output. + The following log levels are defined. +-.IP \[bu] 2 +-\f[I]Warn\f[] : Warn is the least verbose setting and is intended for +-reporting errors or warnings. +-.IP \[bu] 2 +-\f[I]Trace\f[] : Trace is more verbose and is meant to include +-non\-detailed output helpful to tracing program execution. +-.IP \[bu] 2 +-\f[I]Info\f[] : Info is high traffic and meant for detailed output. +-.IP \[bu] 2 +-\f[I]Debug\f[] : Debug is high traffic and is likely to impact +-application performance. ++.RS ++.RE ++.TP ++.B \- \f[I]Warn\f[] ++Warn is the least verbose setting and is intended for reporting errors ++or warnings. ++.RS ++.RE ++.TP ++.B \- \f[I]Trace\f[] ++Trace is more verbose and is meant to include non\-detailed output ++helpful to tracing program execution. ++.RS ++.RE ++.TP ++.B \- \f[I]Info\f[] ++Info is high traffic and meant for detailed output. ++.RS ++.RE ++.TP ++.B \- \f[I]Debug\f[] ++Debug is high traffic and is likely to impact application performance. + Debug output is only available if the library has been compiled with + debugging enabled. +-.PP +-\f[I]FI_LOG_PROV\f[] : The FI_LOG_PROV environment variable enables or +-disables logging from specific providers. ++.RS ++.RE ++.TP ++.B \f[I]FI_LOG_PROV\f[] ++The FI_LOG_PROV environment variable enables or disables logging from ++specific providers. + Providers can be enabled by listing them in a comma separated fashion. + If the list begins with the \[aq]^\[aq] symbol, then the list will be + negated. + By default all providers are enabled. ++.RS ++.RE + .PP + Example: To enable logging from the psm and sockets provider: + FI_LOG_PROV="psm,sockets" + .PP + Example: To enable logging from providers other than psm: + FI_LOG_PROV="^psm" +-.PP +-\f[I]FI_LOG_SUBSYS\f[] : The FI_LOG_SUBSYS environment variable enables +-or disables logging at the subsystem level. ++.TP ++.B \f[I]FI_LOG_SUBSYS\f[] ++The FI_LOG_SUBSYS environment variable enables or disables logging at ++the subsystem level. + The syntax for enabling or disabling subsystems is similar to that used + for FI_LOG_PROV. + The following subsystems are defined. +-.IP \[bu] 2 +-\f[I]core\f[] : Provides output related to the core framework and its +-management of providers. +-.IP \[bu] 2 +-\f[I]fabric\f[] : Provides output specific to interactions associated +-with the fabric object. +-.IP \[bu] 2 +-\f[I]domain\f[] : Provides output specific to interactions associated +-with the domain object. +-.IP \[bu] 2 +-\f[I]ep_ctrl\f[] : Provides output specific to endpoint non\-data +-transfer operations, such as CM operations. +-.IP \[bu] 2 +-\f[I]ep_data\f[] : Provides output specific to endpoint data transfer +-operations. +-.IP \[bu] 2 +-\f[I]av\f[] : Provides output specific to address vector operations. +-.IP \[bu] 2 +-\f[I]cq\f[] : Provides output specific to completion queue operations. +-.IP \[bu] 2 +-\f[I]eq\f[] : Provides output specific to event queue operations. +-.IP \[bu] 2 +-\f[I]mr\f[] : Provides output specific to memory registration. ++.RS ++.RE ++.TP ++.B \- \f[I]core\f[] ++Provides output related to the core framework and its management of ++providers. ++.RS ++.RE ++.TP ++.B \- \f[I]fabric\f[] ++Provides output specific to interactions associated with the fabric ++object. ++.RS ++.RE ++.TP ++.B \- \f[I]domain\f[] ++Provides output specific to interactions associated with the domain ++object. ++.RS ++.RE ++.TP ++.B \- \f[I]ep_ctrl\f[] ++Provides output specific to endpoint non\-data transfer operations, such ++as CM operations. ++.RS ++.RE ++.TP ++.B \- \f[I]ep_data\f[] ++Provides output specific to endpoint data transfer operations. ++.RS ++.RE ++.TP ++.B \- \f[I]av\f[] ++Provides output specific to address vector operations. ++.RS ++.RE ++.TP ++.B \- \f[I]cq\f[] ++Provides output specific to completion queue operations. ++.RS ++.RE ++.TP ++.B \- \f[I]eq\f[] ++Provides output specific to event queue operations. ++.RS ++.RE ++.TP ++.B \- \f[I]mr\f[] ++Provides output specific to memory registration. ++.RS ++.RE ++.SH PROVIDER INSTALLATION AND SELECTION ++.PP ++The libfabric build scripts will install all providers that are ++supported by the installation system. ++Providers that are missing build prerequisites will be disabled. ++Installed providers will dynamically check for necessary hardware on ++library initialization and respond appropriately to application queries. ++.PP ++Users can enable or disable available providers through build ++configuration options. ++See \[aq]configure \-\-help\[aq] for details. ++In general, a specific provider can be controlled using the configure ++option \[aq]\-\-enable\-\[aq]. ++For example, \[aq]\-\-enable\-udp\[aq] (or ++\[aq]\-\-enable\-udp=yes\[aq]) will add the udp provider to the build. ++To disable the provider, \[aq]\-\-enable\-udp=no\[aq] can be used. ++.PP ++Providers can also be enable or disabled at run time using the ++FI_PROVIDER environment variable. ++The FI_PROVIDER variable is set to a comma separated list of providers ++to include. ++If the list begins with the \[aq]^\[aq] symbol, then the list will be ++negated. ++.PP ++Example: To enable the udp and tcp providers only, set: ++FI_PROVIDER="udp,tcp" ++.PP ++The fi_info utility, which is included as part of the libfabric package, ++can be used to retrieve information about which providers are available ++in the system. ++Additionally, it can retrieve a list of all environment variables that ++may be used to configure libfabric and each provider. ++See \f[C]fi_info\f[](1) for more details. + .SH NOTES + .PP + Because libfabric is designed to provide applications direct access to +@@ -241,18 +358,20 @@ programming to the sockets interface. + Although limits are provider specific, the following restrictions apply + to many providers and should be adhered to by applications desiring + portability across providers. +-.PP +-\f[I]fork\f[] : Fabric resources are not guaranteed to be available by +-child processes. ++.TP ++.B \f[I]fork\f[] ++Fabric resources are not guaranteed to be available by child processes. + This includes objects, such as endpoints and completion queues, as well + as application controlled data buffers which have been assigned to the + network. + For example, data buffers that have been registered with a fabric domain + may not be available in a child process because of copy on write + restrictions. ++.RS ++.RE + .SH SEE ALSO + .PP +-\f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3), ++\f[C]fi_info\f[](1), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3), + \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), \f[C]fi_av\f[](3), + \f[C]fi_eq\f[](3), \f[C]fi_cq\f[](3), \f[C]fi_cntr\f[](3), + \f[C]fi_mr\f[](3) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_bgq.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_bgq.7 +index 8efbd68..33e5156 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_bgq.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_bgq.7 +@@ -1,4 +1,7 @@ +-.TH "fi_bgq" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_bgq" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_bgq \- The Blue Gene/Q Fabric Provider +@@ -17,18 +20,23 @@ via MPICH CH4. + .PP + The bgq provider supports most features defined for the libfabric API. + Key features include: +-.PP +-\f[I]Endpoint types\f[] : The Blue Gene/Q hardware is connectionless and +-reliable. ++.TP ++.B \f[I]Endpoint types\f[] ++The Blue Gene/Q hardware is connectionless and reliable. + Therefore, the bgq provider only supports the \f[I]FI_EP_RDM\f[] + endpoint type. +-.PP +-\f[I]Capabilities\f[] : Supported capabilities include \f[I]FI_MSG\f[], +-\f[I]FI_RMA\f[], \f[I]FI_TAGGED\f[], \f[I]FI_ATOMIC\f[], +-\f[I]FI_NAMED_RX_CTX\f[], \f[I]FI_READ\f[], \f[I]FI_WRITE\f[], +-\f[I]FI_SEND\f[], \f[I]FI_RECV\f[], \f[I]FI_REMOTE_READ\f[], +-\f[I]FI_REMOTE_WRITE\f[], \f[I]FI_MULTI_RECV\f[], +-\f[I]FI_DIRECTED_RECV\f[], \f[I]FI_SOURCE\f[] and \f[I]FI_FENCE\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Capabilities\f[] ++Supported capabilities include \f[I]FI_MSG\f[], \f[I]FI_RMA\f[], ++\f[I]FI_TAGGED\f[], \f[I]FI_ATOMIC\f[], \f[I]FI_NAMED_RX_CTX\f[], ++\f[I]FI_READ\f[], \f[I]FI_WRITE\f[], \f[I]FI_SEND\f[], \f[I]FI_RECV\f[], ++\f[I]FI_REMOTE_READ\f[], \f[I]FI_REMOTE_WRITE\f[], ++\f[I]FI_MULTI_RECV\f[], \f[I]FI_DIRECTED_RECV\f[], \f[I]FI_SOURCE\f[] ++and \f[I]FI_FENCE\f[]. ++.RS ++.RE + .PP + Notes on FI_DIRECTED_RECV capability: The immediate data which is sent + within the \f[I]senddata\f[] call to support FI_DIRECTED_RECV for BGQ +@@ -37,13 +45,15 @@ source address to an exascale\-level number of ranks for tag matching on + the recv and can be managed within the MU packet. + Therefore the domain attribute cq_data_size is set to 4 which is the OFI + standard minimum. +-.PP +-\f[I]Modes\f[] : The bgq provider requires \f[I]FI_CONTEXT\f[] and +-\f[I]FI_ASYNC_IOV\f[] +-.PP +-\f[I]Memory registration modes\f[] : Both FI_MR_SCALABLE and FI_MR_BASIC +-are supported, specified at configuration time with the +-"\-\-with\-bgq\-mr" configure option. ++.TP ++.B \f[I]Modes\f[] ++The bgq provider requires \f[I]FI_CONTEXT\f[] and \f[I]FI_ASYNC_IOV\f[] ++.RS ++.RE ++.TP ++.B \f[I]Memory registration modes\f[] ++Both FI_MR_SCALABLE and FI_MR_BASIC are supported, specified at ++configuration time with the "\-\-with\-bgq\-mr" configure option. + The base address table utilized by FI_MR_SCALABLE for rdma transfers is + completely software emulated, supporting FI_ATOMIC, FI_READ, FI_WRITE, + FI_REMOTE_READ, and FI_REMOTE_WRITE capabilities. +@@ -52,29 +62,47 @@ other rdma transfers are still software emulated but the use of a base + address table is no longer required as the offset is now the virtual + address of the memory from the application and the key is the delta from + which the physical address can be computed if necessary. +-.PP +-\f[I]Additional features\f[] : Supported additional features include +-\f[I]FABRIC_DIRECT\f[], \f[I]scalable endpoints\f[], and +-\f[I]counters\f[]. +-.PP +-\f[I]Progress\f[] : Both progress modes, \f[I]FI_PROGRESS_AUTO\f[] and ++.RS ++.RE ++.TP ++.B \f[I]Additional features\f[] ++Supported additional features include \f[I]FABRIC_DIRECT\f[], ++\f[I]scalable endpoints\f[], and \f[I]counters\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++Both progress modes, \f[I]FI_PROGRESS_AUTO\f[] and + \f[I]FI_PROGRESS_MANUAL\f[], are supported. + The progress mode may be specified via the "\-\-with\-bgq\-progress" + configure option. +-.PP +-\f[I]Address vector\f[] : Only the \f[I]FI_AV_MAP\f[] address vector +-format is supported. ++.RS ++.RE ++.TP ++.B \f[I]Address vector\f[] ++Only the \f[I]FI_AV_MAP\f[] address vector format is supported. ++.RS ++.RE + .SH UNSUPPORTED FEATURES +-.PP +-\f[I]Endpoint types\f[] : Unsupported endpoint types include +-\f[I]FI_EP_DGRAM\f[] and \f[I]FI_EP_MSG\f[] +-.PP +-\f[I]Capabilities\f[] : The bgq provider does not support the +-\f[I]FI_RMA_EVENT\f[], and \f[I]FI_TRIGGER\f[] capabilities. +-.PP +-\f[I]Address vector\f[] : The bgq provider does not support the +-\f[I]FI_AV_TABLE\f[] address vector format. ++.TP ++.B \f[I]Endpoint types\f[] ++Unsupported endpoint types include \f[I]FI_EP_DGRAM\f[] and ++\f[I]FI_EP_MSG\f[] ++.RS ++.RE ++.TP ++.B \f[I]Capabilities\f[] ++The bgq provider does not support the \f[I]FI_RMA_EVENT\f[], and ++\f[I]FI_TRIGGER\f[] capabilities. ++.RS ++.RE ++.TP ++.B \f[I]Address vector\f[] ++The bgq provider does not support the \f[I]FI_AV_TABLE\f[] address ++vector format. + Support for \f[I]FI_AV_TABLE\f[] may be added in the future. ++.RS ++.RE + .SH LIMITATIONS + .PP + The bgq provider only supports \f[I]FABRIC_DIRECT\f[]. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_direct.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_direct.7 +index ca9bd0c..d73cba4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_direct.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_direct.7 +@@ -1,4 +1,7 @@ +-.TH "fi_direct" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_direct" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_direct \- Direct fabric provider access +@@ -56,16 +59,20 @@ direct providers must provide definitions for various capabilities and + modes, if those capabilities are supported. + The following #define values may be used by an application to test for + provider support of supported features. +-.PP +-\f[I]FI_DIRECT_CONTEXT\f[] : The provider sets FI_CONTEXT or FI_CONTEXT2 +-for fi_info:mode. ++.TP ++.B \f[I]FI_DIRECT_CONTEXT\f[] ++The provider sets FI_CONTEXT or FI_CONTEXT2 for fi_info:mode. + See fi_getinfo for additional details. + When FI_DIRECT_CONTEXT is defined, applications should use struct + fi_context in their definitions, even if FI_CONTEXT2 is set. +-.PP +-\f[I]FI_DIRECT_LOCAL_MR\f[] : The provider sets FI_LOCAL_MR for +-fi_info:mode. ++.RS ++.RE ++.TP ++.B \f[I]FI_DIRECT_LOCAL_MR\f[] ++The provider sets FI_LOCAL_MR for fi_info:mode. + See fi_getinfo for additional details. ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_gni.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_gni.7 +index eea2e05..aea1e0d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_gni.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_gni.7 +@@ -1,4 +1,7 @@ +-.TH "fi_gni" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_gni" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_gni \- The GNI Fabric Provider +@@ -28,49 +31,73 @@ Any other value will result in a return value of \-FI_EINVAL. + .PP + The GNI provider supports the following features defined for the + libfabric API: +-.PP +-\f[I]Endpoint types\f[] : The provider supports the \f[I]FI_EP_RDM\f[], +-\f[I]FI_EP_DGRAM\f[], \f[I]FI_EP_MSG\f[] endpoint types, including +-scalable endpoints. +-.PP +-\f[I]Address vectors\f[] : The provider implements both the +-\f[I]FI_AV_MAP\f[] and \f[I]FI_AV_TABLE\f[] address vector types. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports the \f[I]FI_EP_RDM\f[], \f[I]FI_EP_DGRAM\f[], ++\f[I]FI_EP_MSG\f[] endpoint types, including scalable endpoints. ++.RS ++.RE ++.TP ++.B \f[I]Address vectors\f[] ++The provider implements both the \f[I]FI_AV_MAP\f[] and ++\f[I]FI_AV_TABLE\f[] address vector types. + FI_EVENT is unsupported. +-.PP +-\f[I]Memory registration modes\f[] : The provider implements basic and +-scalable memory registration modes. +-.PP +-\f[I]Data transfer operations\f[] : The following data transfer +-interfaces are supported for all endpoint types: \f[I]FI_ATOMIC\f[], +-\f[I]FI_MSG\f[], \f[I]FI_RMA\f[], \f[I]FI_TAGGED\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Memory registration modes\f[] ++The provider implements basic and scalable memory registration modes. ++.RS ++.RE ++.TP ++.B \f[I]Data transfer operations\f[] ++The following data transfer interfaces are supported for all endpoint ++types: \f[I]FI_ATOMIC\f[], \f[I]FI_MSG\f[], \f[I]FI_RMA\f[], ++\f[I]FI_TAGGED\f[]. + See DATA TRANSFER OPERATIONS below for more details. +-.PP +-\f[I]Completion events\f[] : The GNI provider supports +-\f[I]FI_CQ_FORMAT_CONTEXT\f[], \f[I]FI_CQ_FORMAT_MSG\f[], +-\f[I]FI_CQ_FORMAT_DATA\f[] and \f[I]FI_CQ_FORMAT_TAGGED\f[] with wait +-objects of type \f[I]FI_WAIT_NONE\f[], \f[I]FI_WAIT_UNSPEC\f[], +-\f[I]FI_WAIT_SET\f[]. +-.PP +-\f[I]Modes\f[] : The GNI provider does not require any operation modes. +-.PP +-\f[I]Progress\f[] : For both control and data progress, the GNI provider +-supports both \f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], +-with a default set to \f[I]FI_PROGRESS_AUTO\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Completion events\f[] ++The GNI provider supports \f[I]FI_CQ_FORMAT_CONTEXT\f[], ++\f[I]FI_CQ_FORMAT_MSG\f[], \f[I]FI_CQ_FORMAT_DATA\f[] and ++\f[I]FI_CQ_FORMAT_TAGGED\f[] with wait objects of type ++\f[I]FI_WAIT_NONE\f[], \f[I]FI_WAIT_UNSPEC\f[], \f[I]FI_WAIT_SET\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The GNI provider does not require any operation modes. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++For both control and data progress, the GNI provider supports both ++\f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], with a ++default set to \f[I]FI_PROGRESS_AUTO\f[]. + Note that for data progress, progression is only performed when data + transfers use the rendezvous protocol. +-.PP +-\f[I]Wait Objects\f[] : The GNI provider specifically supports wait +-object types \f[I]FI_WAIT_UNSPEC\f[], and \f[I]FI_WAIT_SET\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Wait Objects\f[] ++The GNI provider specifically supports wait object types ++\f[I]FI_WAIT_UNSPEC\f[], and \f[I]FI_WAIT_SET\f[]. + A wait object must be used when calling fi_cntr_wait, fi_cq_sread/from, + fi_eq_sread/from, fi_wait. + The GNI provider spawns an internal wait progress thread that is woken + up when clients utilize the wait system (e.g., calling fi_wait). +-.PP +-\f[I]Additional Features\f[] : The GNI provider also supports the +-following capabilities and features: \- \f[I]FI_MULTI_RECV\f[] \- +-\f[I]FI_SOURCE\f[] \- \f[I]FI_FENCE\f[] \- \f[I]FI_RM_ENABLED\f[] \- +-\f[I]FI_RMA_EVENT\f[] \- \f[I]FI_REMOTE_CQ_DATA\f[] \- +-\f[I]FABRIC_DIRECT\f[] compilation mode \- \f[I]FI_MORE\f[] (For FI_RMA) ++.RS ++.RE ++.TP ++.B \f[I]Additional Features\f[] ++The GNI provider also supports the following capabilities and features: ++\- \f[I]FI_MULTI_RECV\f[] \- \f[I]FI_SOURCE\f[] \- \f[I]FI_FENCE\f[] \- ++\f[I]FI_RM_ENABLED\f[] \- \f[I]FI_RMA_EVENT\f[] \- ++\f[I]FI_REMOTE_CQ_DATA\f[] \- \f[I]FABRIC_DIRECT\f[] compilation mode \- ++\f[I]FI_MORE\f[] (For FI_RMA) ++.RS ++.RE + .SH DATA TRANSFER OPERATIONS + .SS FI_ATOMIC + .PP +@@ -156,92 +183,145 @@ The \f[C]set_val\f[] function sets the value of a given parameter; the + \f[C]get_val\f[] function returns the current value. + .PP + For \f[I]FI_GNI_FABRIC_OPS_1\f[], the currently supported values are: +-.PP +-\f[I]GNI_WAIT_THREAD_SLEEP\f[] : Time in seconds for which the progress +-thread will sleep between periods of inactivity. +-.PP +-\f[I]GNI_DEFAULT_USER_REGISTRATION_LIMIT\f[] : The number of user +-registrations that an authorization key is limited to when using the +-scalable memory mode, if not specified by the user during init. +-.PP +-\f[I]GNI_DEFAULT_PROV_REGISTRATION_LIMIT\f[] : The number of provider +-registration that an authorization key is limited to when using the +-scalable memory mode, if not specified by the user during init. +-.PP +-\f[I]GNI_WAIT_SHARED_MEMORY_TIMEOUT\f[] : The number of seconds that the +-provider should wait when attempting to open mmap\[aq]d shared memory +-files for internal mappings. ++.TP ++.B \f[I]GNI_WAIT_THREAD_SLEEP\f[] ++Time in seconds for which the progress thread will sleep between periods ++of inactivity. ++.RS ++.RE ++.TP ++.B \f[I]GNI_DEFAULT_USER_REGISTRATION_LIMIT\f[] ++The number of user registrations that an authorization key is limited to ++when using the scalable memory mode, if not specified by the user during ++init. ++.RS ++.RE ++.TP ++.B \f[I]GNI_DEFAULT_PROV_REGISTRATION_LIMIT\f[] ++The number of provider registration that an authorization key is limited ++to when using the scalable memory mode, if not specified by the user ++during init. ++.RS ++.RE ++.TP ++.B \f[I]GNI_WAIT_SHARED_MEMORY_TIMEOUT\f[] ++The number of seconds that the provider should wait when attempting to ++open mmap\[aq]d shared memory files for internal mappings. ++.RS ++.RE + .PP + For \f[I]FI_GNI_FABRIC_OPS_2\f[], the currently supported values are: +-.PP +-\f[I]GNIX_USER_KEY_LIMIT\f[] : The number of user registrations that an +-authorization key is limited to when using the scalable memory mode. ++.TP ++.B \f[I]GNIX_USER_KEY_LIMIT\f[] ++The number of user registrations that an authorization key is limited to ++when using the scalable memory mode. + This may only be set prior to the first use of an authorization key in + the initialization of a domain, endpoint, or memory registration. +-.PP +-\f[I]GNIX_PROV_KEY_LIMIT\f[] : The number of provider registrations that +-an authorization key is limited to when using the scalable memory mode. ++.RS ++.RE ++.TP ++.B \f[I]GNIX_PROV_KEY_LIMIT\f[] ++The number of provider registrations that an authorization key is ++limited to when using the scalable memory mode. + This may only be set prior to the first use of an authorization key in + the initialization of a domain, endpoint, or memory registration. ++.RS ++.RE + .PP + For \f[I]FI_GNI_DOMAIN_OPS_1\f[], the currently supported values are: +-.PP +-\f[I]GNI_MSG_RENDEZVOUS_THRESHOLD\f[] : Threshold message size at which +-a rendezvous protocol is used for \f[I]FI_MSG\f[] data transfers. ++.TP ++.B \f[I]GNI_MSG_RENDEZVOUS_THRESHOLD\f[] ++Threshold message size at which a rendezvous protocol is used for ++\f[I]FI_MSG\f[] data transfers. + The value is of type uint32_t. +-.PP +-\f[I]GNI_RMA_RDMA_THRESHOLD\f[] : Threshold message size at which RDMA +-is used for \f[I]FI_RMA\f[] data transfers. +-The value is of type uint32_t. +-.PP +-\f[I]GNI_CONN_TABLE_INITIAL_SIZE\f[] : Initial size of the internal +-table data structure used to manage connections. ++.RS ++.RE ++.TP ++.B \f[I]GNI_RMA_RDMA_THRESHOLD\f[] ++Threshold message size at which RDMA is used for \f[I]FI_RMA\f[] data ++transfers. + The value is of type uint32_t. +-.PP +-\f[I]GNI_CONN_TABLE_MAX_SIZE\f[] : Maximum size of the internal table +-data structure used to manage connections. ++.RS ++.RE ++.TP ++.B \f[I]GNI_CONN_TABLE_INITIAL_SIZE\f[] ++Initial size of the internal table data structure used to manage ++connections. + The value is of type uint32_t. +-.PP +-\f[I]GNI_CONN_TABLE_STEP_SIZE\f[] : Step size for increasing the size of +-the internal table data structure used to manage internal GNI ++.RS ++.RE ++.TP ++.B \f[I]GNI_CONN_TABLE_MAX_SIZE\f[] ++Maximum size of the internal table data structure used to manage + connections. + The value is of type uint32_t. +-.PP +-\f[I]GNI_VC_ID_TABLE_CAPACITY\f[] : Size of the virtual channel (VC) +-table used for managing remote connections. ++.RS ++.RE ++.TP ++.B \f[I]GNI_CONN_TABLE_STEP_SIZE\f[] ++Step size for increasing the size of the internal table data structure ++used to manage internal GNI connections. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MBOX_PAGE_SIZE\f[] : Page size for GNI SMSG mailbox +-allocations. ++.RS ++.RE ++.TP ++.B \f[I]GNI_VC_ID_TABLE_CAPACITY\f[] ++Size of the virtual channel (VC) table used for managing remote ++connections. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MBOX_NUM_PER_SLAB\f[] : Number of GNI SMSG mailboxes per +-allocation slab. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MBOX_PAGE_SIZE\f[] ++Page size for GNI SMSG mailbox allocations. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MBOX_MAX_CREDIT\f[] : Maximum number of credits per GNI SMSG +-mailbox. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MBOX_NUM_PER_SLAB\f[] ++Number of GNI SMSG mailboxes per allocation slab. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MBOX_MSG_MAX_SIZE\f[] : Maximum size of GNI SMSG messages. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MBOX_MAX_CREDIT\f[] ++Maximum number of credits per GNI SMSG mailbox. + The value is of type uint32_t. +-.PP +-\f[I]GNI_RX_CQ_SIZE\f[] : Recommended GNI receive CQ size. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MBOX_MSG_MAX_SIZE\f[] ++Maximum size of GNI SMSG messages. + The value is of type uint32_t. +-.PP +-\f[I]GNI_TX_CQ_SIZE\f[] : Recommended GNI transmit CQ size. ++.RS ++.RE ++.TP ++.B \f[I]GNI_RX_CQ_SIZE\f[] ++Recommended GNI receive CQ size. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MAX_RETRANSMITS\f[] : Maximum number of message retransmits +-before failure. ++.RS ++.RE ++.TP ++.B \f[I]GNI_TX_CQ_SIZE\f[] ++Recommended GNI transmit CQ size. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MR_CACHE_LAZY_DEREG\f[] : Enable or disable lazy deregistration +-of memory. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MAX_RETRANSMITS\f[] ++Maximum number of message retransmits before failure. ++The value is of type uint32_t. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_CACHE_LAZY_DEREG\f[] ++Enable or disable lazy deregistration of memory. + The value is of type int32_t. +-.PP +-\f[I]GNI_MR_CACHE\f[] : Select the type of cache that the domain will +-use. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_CACHE\f[] ++Select the type of cache that the domain will use. + Valid choices are the following: \[aq]internal\[aq], \[aq]udreg\[aq], or + \[aq]none\[aq]. + \[aq]internal\[aq] refers to the GNI provider internal registration +@@ -249,33 +329,51 @@ cache. + \[aq]udreg\[aq] refers to a user level dreg library based cache. + Lastly, \[aq]none\[aq] refers to device direct registration without a + provider cache. +-.PP +-\f[I]GNI_MR_HARD_REG_LIMIT\f[] : Maximum number of registrations. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_HARD_REG_LIMIT\f[] ++Maximum number of registrations. + Applies only to the GNI provider cache. + The value is of type int32_t (\-1 for no limit). +-.PP +-\f[I]GNI_MR_SOFT_REG_LIMIT\f[] : Soft cap on the registration limit. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_SOFT_REG_LIMIT\f[] ++Soft cap on the registration limit. + Applies only to the GNI provider cache. + The value is of type int32_t (\-1 for no limit). +-.PP +-\f[I]GNI_MR_HARD_STALE_REG_LIMIT\f[] : Maximum number of stale +-registrations to be held in cache. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_HARD_STALE_REG_LIMIT\f[] ++Maximum number of stale registrations to be held in cache. + This applies to the GNI provider cache and the udreg cache. + The value is of type int32_t (\-1 for no limit for the GNI provider + cache and udreg cache values must be greater than 0). +-.PP +-\f[I]GNI_MR_UDREG_LIMIT\f[] : Maximum number of registrations. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_UDREG_LIMIT\f[] ++Maximum number of registrations. + Applies only to the udreg cache. + The value is of type int32_t. + The value must be greater than 0. +-.PP +-\f[I]GNI_XPMEM_ENABLE\f[] : Enable or disable use of XPMEM for on node +-messages using the GNI provider internal rendezvous protocol. ++.RS ++.RE ++.TP ++.B \f[I]GNI_XPMEM_ENABLE\f[] ++Enable or disable use of XPMEM for on node messages using the GNI ++provider internal rendezvous protocol. + The value is of type bool. +-.PP +-\f[I]GNI_DGRAM_PROGRESS_TIMEOUT\f[] : Controls timeout value in +-milliseconds for the control progress thread. ++.RS ++.RE ++.TP ++.B \f[I]GNI_DGRAM_PROGRESS_TIMEOUT\f[] ++Controls timeout value in milliseconds for the control progress thread. + The value is of type uint32_t. ++.RS ++.RE + .PP + The \f[C]flush_cache\f[] function allows the user to flush any stale + registration cache entries from the cache. +@@ -302,11 +400,14 @@ The \f[C]native_amo\f[] function allows the user to call GNI native + atomics that are not implemented in the libfabric API. + The parameters for native_amo are the same as the fi_atomic function but + adds the following parameter: +-.PP +-\f[I]enum gnix_fab_req_type req_type\f[] : The req_type\[aq]s supported +-with this call are GNIX_FAB_RQ_NAMO_AX (AND and XOR), and +-GNIX_FAB_RQ_NAMO_AX_S (AND and XOR 32 bit), GNIX_FAB_RQ_NAMO_FAX (Fetch +-AND and XOR) and GNIX_FAB_RQ_NAMO_FAX_S (Fetch AND and XOR 32 bit). ++.TP ++.B \f[I]enum gnix_fab_req_type req_type\f[] ++The req_type\[aq]s supported with this call are GNIX_FAB_RQ_NAMO_AX (AND ++and XOR), and GNIX_FAB_RQ_NAMO_AX_S (AND and XOR 32 bit), ++GNIX_FAB_RQ_NAMO_FAX (Fetch AND and XOR) and GNIX_FAB_RQ_NAMO_FAX_S ++(Fetch AND and XOR 32 bit). ++.RS ++.RE + .SH NOTES + .PP + The default address format is FI_ADDR_GNI. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_hook.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_hook.7 +new file mode 100644 +index 0000000..1fab084 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_hook.7 +@@ -0,0 +1,79 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_hook" "7" "2018\-10\-16" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_hook \- The Hook Fabric Provider Utility ++.SH OVERVIEW ++.PP ++The hooking provider is a utility function that can intercept calls to ++any provider. ++The hook provider is always available, but has zero impact on calls ++unless enabled. ++It is useful for providing performance data on selected calls or ++debugging information. ++.SH SUPPORTED FEATURES ++.PP ++Hooking support is enabled through the FI_HOOK environment variable. ++To enable hooking, FI_HOOK must be set to the name of one or more of the ++available hooking providers. ++When multiple hooks are specified, the names must be separated by a ++semi\-colon. ++To obtain a list of hooking providers available on the current system, ++one can use the fi_info utility with the \[aq]\-\-env\[aq] command line ++option. ++Hooking providers are usually identified by \[aq]hook\[aq] appearing in ++the provider name. ++.PP ++Known hooking providers include the following: ++.TP ++.B \f[I]ofi_perf_hook\f[] ++This hooks \[aq]fast path\[aq] data operation calls. ++Performance data is captured on call entrance and exit, in order to ++provide an average of how long each call takes to complete. ++See the PERFORMANCE HOOKS section for available performance data. ++.RS ++.RE ++.SH PERFORMANCE HOOKS ++.PP ++The hook provider allows capturing inline performance data by accessing ++the CPU Performance Management Unit (PMU). ++PMU data is only available on Linux systems. ++Additionally, access to PMU data may be restricted to privileged ++(super\-user) applications. ++.PP ++Performance data is captured for critical data transfer calls: fi_msg, ++fi_rma, fi_tagged, fi_cq, and fi_cntr. ++Captured data is displayed as logged data using the FI_LOG_LEVEL trace ++level. ++Performance data is logged when the associated fabric is destroyed. ++.PP ++The environment variable FI_PERF_CNTR is used to identify which ++performance counter is tracked. ++The following counters are available: ++.TP ++.B \f[I]cpu_cycles\f[] ++Counts the number of CPU cycles each function takes to complete. ++.RS ++.RE ++.TP ++.B \f[I]cpu_instr\f[] ++Counts the number of CPU instructions each function takes to complete. ++This is the default performance counter if none is specified. ++.RS ++.RE ++.SH LIMITATIONS ++.PP ++Hooking functionality is not available for providers built using the ++FI_FABRIC_DIRECT feature. ++That is, directly linking to a provider prevents hooking. ++.PP ++The hooking provider does not work with triggered operations. ++Application that use FI_TRIGGER operations that attempt to hook calls ++will likely crash. ++.SH SEE ALSO ++.PP ++\f[C]fabric\f[](7), \f[C]fi_provider\f[](7) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mlx.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mlx.7 +index e2d7cee..d38ee44 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mlx.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mlx.7 +@@ -1,4 +1,7 @@ +-.TH "fi_mlx" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_mlx" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_mlx \- The MLX Fabric Provider +@@ -16,24 +19,66 @@ Supported UCP API version: 1.0 + The \f[I]mlx\f[] provider doesn\[aq]t support all the features defined + in the libfabric API. + Here are some of the limitations: +-.PP +-Endpoint types : Only supported type: \f[I]FI_RDM\f[] +-.PP +-Endpoint capabilities : Endpoints can support the only data transfer +-capability \f[I]FI_TAGGED\f[]. +-.PP +-Modes : \f[I]FI_CONTEXT\f[] is required. ++.TP ++.B Endpoint types ++Only supported type: \f[I]FI_RDM\f[] ++.RS ++.RE ++.TP ++.B Endpoint capabilities ++Endpoints can support the only data transfer capability ++\f[I]FI_TAGGED\f[]. ++.RS ++.RE ++.TP ++.B Modes ++\f[I]FI_CONTEXT\f[] is required. + That means, all the requests that generate completions must have a valid + pointer to type \f[I]struct fi_context\f[] passed as the operation + context. +-.PP +-Threading : The supported mode is FI_THREAD_DOMAIN, i.e. ++.RS ++.RE ++.TP ++.B Threading ++The supported mode is FI_THREAD_DOMAIN, i.e. + the \f[I]mlx\f[] provider is not thread safe. +-.PP +-Unsupported features : These features are unsupported: connection +-management, event queue, scalable endpoint, passive endpoint, shared +-receive context, rma, atomics. ++.RS ++.RE ++.TP ++.B Unsupported features ++These features are unsupported: connection management, event queue, ++scalable endpoint, passive endpoint, shared receive context, rma, ++atomics. ++.RS ++.RE + .SH RUNTIME PARAMETERS ++.TP ++.B \f[I]FI_MLX_CONFIG\f[] ++The path to the MLX configuration file (default: none). ++.RS ++.RE ++.TP ++.B \f[I]FI_MLX_TINJECT_LIMIT\f[] ++Maximal tinject message size (default: 1024). ++.RS ++.RE ++.TP ++.B \f[I]FI_MLX_NS_ENABLE\f[] ++Enforce usage of name server functionality for MLX provider (default: ++disabled). ++.RS ++.RE ++.TP ++.B \f[I]FI_MLX_NS_PORT\f[] ++MLX provider\[aq]s name server port (default: 12345). ++.RS ++.RE ++.TP ++.B \f[I]FI_MLX_NS_IFACE\f[] ++IPv4 network interface for MLX provider\[aq]s name server (default: ++any). ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fabric\f[](7), \f[C]fi_provider\f[](7), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mrail.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mrail.7 +new file mode 100644 +index 0000000..1b6e239 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mrail.7 +@@ -0,0 +1,90 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_mrail" "7" "2018\-12\-27" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_mrail \- The Multi\-Rail Utility Provider ++.SH OVERVIEW ++.PP ++The mrail provider (ofi_mrail) is an utility provider that layers over ++an underlying provider to enable the use of multiple network ports ++(rails). ++This increases the total available bandwidth of an underlying proivder. ++The current status of mrail provider is experimental \- not all ++libfabric features are supported and performance is not guaranteed. ++.SH REQUIREMENTS ++.SS Requirements for underlying provider ++.PP ++mrail provider requires the underlying provider to support the following ++capabilities / modes: ++.IP \[bu] 2 ++Buffered receive (FI_BUFFERED_RECV) ++.IP \[bu] 2 ++FI_SOURCE ++.IP \[bu] 2 ++FI_AV_TABLE ++.SS Requirements for applications ++.PP ++Applications need to: * Support FI_MR_RAW MR mode bit to make use of ++FI_RMA capability. ++* Set FI_OFI_MRAIL_ADDR_STRC env variable (see RUNTIME PARAMETERS ++section below). ++.SH SUPPORTED FEATURES ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only \f[I]FI_EP_RDM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The following data transfer interface is supported: \f[I]FI_MSG\f[], ++\f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[]. ++.RS ++.RE ++.TP ++.B # LIMITATIONS ++Limitations of the underlying provider may show up as that of mrail ++provider. ++.RS ++.RE ++mrail provider doesn\[aq]t allow pass\-through of any mode bits to the ++underlying provider. ++.RS ++.RE ++.SS Unsupported features ++.PP ++The following are the major libfabric features that are not supported. ++Any other feature not listed in "Supported features" can be assumed as ++unsupported. ++.IP \[bu] 2 ++FI_ATOMIC ++.IP \[bu] 2 ++Scalable endpoints ++.IP \[bu] 2 ++Shared contexts ++.IP \[bu] 2 ++FABRIC_DIRECT ++.IP \[bu] 2 ++Multicast ++.IP \[bu] 2 ++Triggered operations ++.SH FUNCTIONALITY OVERVIEW ++.PP ++For messages (FI_MSG, FI_TAGGED), the provider sends one message per ++rail in a round\-robin manner. ++Ordering is guaranteed through the use of sequence numbers. ++For RMA, the data is striped equally across all rails. ++.SH RUNTIME PARAMETERS ++.PP ++The ofi_mrail provider checks for the following environment variables. ++.TP ++.B \f[I]FI_OFI_MRAIL_ADDR_STRC\f[] ++Comma delimited list of individual rail addresses in FI_ADDR_STR format. ++.RS ++.RE ++.SH SEE ALSO ++.PP ++\f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_netdir.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_netdir.7 +index a83ae38..3785465 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_netdir.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_netdir.7 +@@ -1,4 +1,7 @@ +-.TH "fi_netdir" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_netdir" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_netdir \- The Network Direct Fabric Provider +@@ -21,75 +24,122 @@ service provider interface (SPI) for their hardware. + .PP + The Network Direct provider support the following features defined for + the libfabric API: +-.PP +-\f[I]Endpoint types\f[] : The provider support the FI_EP_MSG endpoint +-types. +-.PP +-\f[I]Memory registration modes\f[] : The provider implements the +-\f[I]FI_MR_BASIC\f[] memory registration mode. +-.PP +-\f[I]Data transfer operations\f[] : The following data transfer +-interfaces are supported for the following endpoint types: +-\f[I]FI_MSG\f[], \f[I]FI_RMA\f[]. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider support the FI_EP_MSG endpoint types. ++.RS ++.RE ++.TP ++.B \f[I]Memory registration modes\f[] ++The provider implements the \f[I]FI_MR_BASIC\f[] memory registration ++mode. ++.RS ++.RE ++.TP ++.B \f[I]Data transfer operations\f[] ++The following data transfer interfaces are supported for the following ++endpoint types: \f[I]FI_MSG\f[], \f[I]FI_RMA\f[]. + See DATA TRANSFER OPERATIONS below for more details. +-.PP +-\f[I]Modes\f[] : The Network Direct provider requires applications to +-support the following modes: * FI_LOCAL_MR for all applications. +-.PP +-\f[I]Addressing Formats\f[] : Supported addressing formats include +-FI_SOCKADDR, FI_SOCKADDR_IN, FI_SOCKADDR_IN6 +-.PP +-\f[I]Progress\f[] : The Network Direct provider supports +-FI_PROGRESS_AUTO: Asynchronous operations make forward progress +-automatically. +-.PP +-\f[I]Operation flags\f[] : The provider supports FI_INJECT, +-FI_COMPLETION, FI_TRANSMIT_COMPLETE, FI_INJECT_COMPLETE, +-FI_DELIVERY_COMPLETE, FI_SELECTIVE_COMPLETION +-.PP +-\f[I]Completion ordering\f[] : RX/TX contexts: FI_ORDER_STRICT +-.PP +-\f[I]Other supported features\f[] : Multiple input/output vector (IOV) +-is supported for FI_RMA read/write and FI_MSG receive/transmit +-operations. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The Network Direct provider requires applications to support the ++following modes: * FI_LOCAL_MR for all applications. ++.RS ++.RE ++.TP ++.B \f[I]Addressing Formats\f[] ++Supported addressing formats include FI_SOCKADDR, FI_SOCKADDR_IN, ++FI_SOCKADDR_IN6 ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The Network Direct provider supports FI_PROGRESS_AUTO: Asynchronous ++operations make forward progress automatically. ++.RS ++.RE ++.TP ++.B \f[I]Operation flags\f[] ++The provider supports FI_INJECT, FI_COMPLETION, FI_TRANSMIT_COMPLETE, ++FI_INJECT_COMPLETE, FI_DELIVERY_COMPLETE, FI_SELECTIVE_COMPLETION ++.RS ++.RE ++.TP ++.B \f[I]Completion ordering\f[] ++RX/TX contexts: FI_ORDER_STRICT ++.RS ++.RE ++.TP ++.B \f[I]Other supported features\f[] ++Multiple input/output vector (IOV) is supported for FI_RMA read/write ++and FI_MSG receive/transmit operations. ++.RS ++.RE + .SH LIMITATIONS + .PP + The Network Direct is an experimental provider. + The full support of the Network Direct provider will be added to 1.6 + release version of libfabric. +-.PP +-\f[I]Memory Regions\f[] : Only FI_MR_BASIC mode is supported. ++.TP ++.B \f[I]Memory Regions\f[] ++Only FI_MR_BASIC mode is supported. + Adding regions via s/g list is supported only up to a s/g list size of + 1. + No support for binding memory regions to a counter. +-.PP +-\f[I]Wait objects\f[] : Wait object and wait sets are not supported. +-.PP +-\f[I]Resource Management\f[] : Application has to make sure CQs are not +-overrun as this cannot be detected by the provider. +-.PP +-\f[I]Unsupported Endpoint types\f[] : FI_EP_DGRAM, FI_EP_RDM +-.PP +-\f[I]Other unsupported features\f[] : Scalable endpoints, FABRIC_DIRECT +-.PP +-\f[I]Unsupported features specific to MSG endpoints\f[] : FI_SOURCE, +-FI_TAGGED, FI_CLAIM, fi_ep_alias, shared TX context, operations. ++.RS ++.RE ++.TP ++.B \f[I]Wait objects\f[] ++Wait object and wait sets are not supported. ++.RS ++.RE ++.TP ++.B \f[I]Resource Management\f[] ++Application has to make sure CQs are not overrun as this cannot be ++detected by the provider. ++.RS ++.RE ++.TP ++.B \f[I]Unsupported Endpoint types\f[] ++FI_EP_DGRAM, FI_EP_RDM ++.RS ++.RE ++.TP ++.B \f[I]Other unsupported features\f[] ++Scalable endpoints, FABRIC_DIRECT ++.RS ++.RE ++.TP ++.B \f[I]Unsupported features specific to MSG endpoints\f[] ++FI_SOURCE, FI_TAGGED, FI_CLAIM, fi_ep_alias, shared TX context, ++operations. ++.RS ++.RE + .SH RUNTIME PARAMETERS + .PP + The Network Direct provider checks for the following environment + variables. + .SS Variables specific to RDM endpoints +-.PP +-\f[I]FI_NETDIR_INLINETHR\f[] : The size of the (default: 8 Kbyte): * +-Transmitted data that can be inlined * Preposted data for the unexpected +-receive queue +-.PP +-\f[I]FI_NETDIR_PREPOSTCNT\f[] : The number of pre\-registered buffers +-between the endpoints that are not require internal ACK messages, must +-be a power of 2 (default: 8). +-.PP +-\f[I]FI_NETDIR_PREPOSTBUFCNT\f[] : The number of preposted arrays of +-buffers, must be a power of 2 (default: 1). ++.TP ++.B \f[I]FI_NETDIR_INLINETHR\f[] ++The size of the (default: 8 Kbyte): * Transmitted data that can be ++inlined * Preposted data for the unexpected receive queue ++.RS ++.RE ++.TP ++.B \f[I]FI_NETDIR_PREPOSTCNT\f[] ++The number of pre\-registered buffers between the endpoints that are not ++require internal ACK messages, must be a power of 2 (default: 8). ++.RS ++.RE ++.TP ++.B \f[I]FI_NETDIR_PREPOSTBUFCNT\f[] ++The number of preposted arrays of buffers, must be a power of 2 ++(default: 1). ++.RS ++.RE + .SS Environment variables notes + .PP + The fi_info utility would give the up\-to\-date information on +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_provider.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_provider.7 +index 311e619..0a3f08b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_provider.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_provider.7 +@@ -1,4 +1,7 @@ +-.TH "fi_provider" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_provider" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_provider \- Fabric Interface Providers +@@ -16,41 +19,73 @@ referred to as fabric providers, or simply providers. + This distribution of libfabric contains the following providers + (although more may be available via run\-time plug\-ins): + .SS Core providers +-.PP +-\f[I]GNI\f[] : A provider for the Aries interconnect in Cray XC(TM) +-systems utilizing the user\-space \f[I]Generic Networking Interface\f[]. ++.TP ++.B \f[I]GNI\f[] ++A provider for the Aries interconnect in Cray XC(TM) systems utilizing ++the user\-space \f[I]Generic Networking Interface\f[]. + See \f[C]fi_gni\f[](7) for more information. +-.PP +-\f[I]PSM\f[] : High\-speed InfiniBand networking from Intel. ++.RS ++.RE ++.TP ++.B \f[I]PSM\f[] ++High\-speed InfiniBand networking from Intel. + See \f[C]fi_psm\f[](7) for more information. +-.PP +-\f[I]Sockets\f[] : A general purpose provider that can be used on any +-network that supports TCP/UDP sockets. ++.RS ++.RE ++.TP ++.B \f[I]Sockets\f[] ++A general purpose provider that can be used on any network that supports ++TCP/UDP sockets. + This provider is not intended to provide performance improvements over + regular TCP/UDP sockets, but rather to allow developers to write, test, + and debug application code even on platforms that do not have + high\-speed networking. + See \f[C]fi_sockets\f[](7) for more information. +-.PP +-\f[I]usNIC\f[] : Ultra low latency Ethernet networking over Cisco +-userspace VIC adapters. ++.RS ++.RE ++.TP ++.B \f[I]usNIC\f[] ++Ultra low latency Ethernet networking over Cisco userspace VIC adapters. + See \f[C]fi_usnic\f[](7) for more information. +-.PP +-\f[I]Verbs\f[] : This provider uses the Linux Verbs API for network +-transport. ++.RS ++.RE ++.TP ++.B \f[I]Verbs\f[] ++This provider uses the Linux Verbs API for network transport. + Application performance is, obviously expected to be similar to that of + the native Linux Verbs API. + Analogous to the Sockets provider, the Verbs provider is intended to + enable developers to write, test, and debug application code on + platforms that only have Linux Verbs\-based networking. + See \f[C]fi_verbs\f[](7) for more information. +-.PP +-\f[I]Blue Gene/Q\f[] : See \f[C]fi_bgq\f[](7) for more information. ++.RS ++.RE ++.TP ++.B \f[I]Blue Gene/Q\f[] ++See \f[C]fi_bgq\f[](7) for more information. ++.RS ++.RE + .SS Utility providers +-.PP +-\f[I]RxM\f[] : The RxM provider (ofi_rxm) is an utility provider that +-supports RDM endpoints emulated over MSG endpoints of a core provider. ++.TP ++.B \f[I]RxM\f[] ++The RxM provider (ofi_rxm) is an utility provider that supports RDM ++endpoints emulated over MSG endpoints of a core provider. + See \f[C]fi_rxm\f[](7) for more information. ++.RS ++.RE ++.SS Special providers ++.TP ++.B \f[I]Hook\f[] ++The hook provider is a special type of provider that can layer over any ++other provider, unless FI_FABRIC_DIRECT is used. ++The hook provider is always available, but has no impact unless enabled. ++When enabled, the hook provider will intercept all calls to the ++underlying core or utility provider(s). ++The hook provider is useful for capturing performance data or providing ++debugging information, even in release builds of the library. ++See \f[C]fi_hook\f[](7) for more information. ++.RS ++.RE + .SH CORE VERSUS UTILITY PROVIDERS + .PP + Core providers implement the libfabric interfaces directly over +@@ -186,26 +221,47 @@ Logging is performed using the FI_ERR, FI_LOG, and FI_DEBUG macros. + \f[] + .fi + .SS ARGUMENTS +-.PP +-\f[I]prov_name\f[] : String representing the provider name. +-.PP +-\f[I]prov\f[] : Provider context structure. +-.PP +-\f[I]level\f[] : Log level associated with log statement. +-.PP +-\f[I]subsystem\f[] : Subsystem being logged from. ++.TP ++.B \f[I]prov_name\f[] ++String representing the provider name. ++.RS ++.RE ++.TP ++.B \f[I]prov\f[] ++Provider context structure. ++.RS ++.RE ++.TP ++.B \f[I]level\f[] ++Log level associated with log statement. ++.RS ++.RE ++.TP ++.B \f[I]subsystem\f[] ++Subsystem being logged from. ++.RS ++.RE + .SS DESCRIPTION +-.PP +-\f[I]FI_ERR\f[] : Always logged. +-.PP +-\f[I]FI_LOG\f[] : Logged if the intended provider, log level, and +-subsystem parameters match the user supplied values. +-.PP +-\f[I]FI_DEBUG\f[] : Logged if configured with the \-\-enable\-debug +-flag. ++.TP ++.B \f[I]FI_ERR\f[] ++Always logged. ++.RS ++.RE ++.TP ++.B \f[I]FI_LOG\f[] ++Logged if the intended provider, log level, and subsystem parameters ++match the user supplied values. ++.RS ++.RE ++.TP ++.B \f[I]FI_DEBUG\f[] ++Logged if configured with the \-\-enable\-debug flag. ++.RS ++.RE + .SH SEE ALSO + .PP +-\f[C]fi_gni\f[](7), \f[C]fi_psm\f[](7), \f[C]fi_sockets\f[](7), +-\f[C]fi_usnic\f[](7), \f[C]fi_verbs\f[](7), \f[C]fi_bgq\f[](7), ++\f[C]fi_gni\f[](7), \f[C]fi_hook\f[](7), \f[C]fi_psm\f[](7), ++\f[C]fi_sockets\f[](7), \f[C]fi_usnic\f[](7), \f[C]fi_verbs\f[](7), ++\f[C]fi_bgq\f[](7), + .SH AUTHORS + OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm.7 +index 0b849aa..5133552 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm.7 +@@ -1,4 +1,7 @@ +-.TH "fi_psm" "7" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_psm" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_psm \- The PSM Fabric Provider +@@ -23,13 +26,17 @@ exposes a PSM 1.x interface over the Intel Omni\-Path Fabric. + The \f[I]psm\f[] provider doesn\[aq]t support all the features defined + in the libfabric API. + Here are some of the limitations: +-.PP +-Endpoint types : Only support non\-connection based types +-\f[I]FI_DGRAM\f[] and \f[I]FI_RDM\f[] +-.PP +-Endpoint capabilities : Endpoints can support any combination of data +-transfer capabilities \f[I]FI_TAGGED\f[], \f[I]FI_MSG\f[], +-\f[I]FI_ATOMICS\f[], and \f[I]FI_RMA\f[]. ++.TP ++.B Endpoint types ++Only support non\-connection based types \f[I]FI_DGRAM\f[] and ++\f[I]FI_RDM\f[] ++.RS ++.RE ++.TP ++.B Endpoint capabilities ++Endpoints can support any combination of data transfer capabilities ++\f[I]FI_TAGGED\f[], \f[I]FI_MSG\f[], \f[I]FI_ATOMICS\f[], and ++\f[I]FI_RMA\f[]. + These capabilities can be further refined by \f[I]FI_SEND\f[], + \f[I]FI_RECV\f[], \f[I]FI_READ\f[], \f[I]FI_WRITE\f[], + \f[I]FI_REMOTE_READ\f[], and \f[I]FI_REMOTE_WRITE\f[] to limit the +@@ -42,12 +49,15 @@ For example it is fine to have two endpoints with \f[I]FI_TAGGED\f[] | + \f[I]FI_RMA\f[] | \f[I]FI_ATOMICS\f[]. + But it is not allowed to have two endpoints with \f[I]FI_TAGGED\f[], or + two endpoints with \f[I]FI_RMA\f[]. ++.RS ++.RE + .PP + \f[I]FI_MULTI_RECV\f[] is supported for non\-tagged message queue only. + .PP + Other supported capabilities include \f[I]FI_TRIGGER\f[]. +-.PP +-Modes : \f[I]FI_CONTEXT\f[] is required for the \f[I]FI_TAGGED\f[] and ++.TP ++.B Modes ++\f[I]FI_CONTEXT\f[] is required for the \f[I]FI_TAGGED\f[] and + \f[I]FI_MSG\f[] capabilities. + That means, any request belonging to these two categories that generates + a completion must pass as the operation context a valid pointer to type +@@ -55,25 +65,33 @@ a completion must pass as the operation context a valid pointer to type + remain untouched until the request has completed. + If none of \f[I]FI_TAGGED\f[] and \f[I]FI_MSG\f[] is asked for, the + \f[I]FI_CONTEXT\f[] mode is not required. +-.PP +-Progress : The \f[I]psm\f[] provider requires manual progress. ++.RS ++.RE ++.TP ++.B Progress ++The \f[I]psm\f[] provider requires manual progress. + The application is expected to call \f[I]fi_cq_read\f[] or + \f[I]fi_cntr_read\f[] function from time to time when no other libfabric + function is called to ensure progress is made in a timely manner. + The provider does support auto progress mode. + However, the performance can be significantly impacted if the + application purely depends on the provider to make auto progress. +-.PP +-Unsupported features : These features are unsupported: connection +-management, scalable endpoint, passive endpoint, shared receive context, +-send/inject with immediate data. ++.RS ++.RE ++.TP ++.B Unsupported features ++These features are unsupported: connection management, scalable ++endpoint, passive endpoint, shared receive context, send/inject with ++immediate data. ++.RS ++.RE + .SH RUNTIME PARAMETERS + .PP + The \f[I]psm\f[] provider checks for the following environment + variables: +-.PP +-\f[I]FI_PSM_UUID\f[] : PSM requires that each job has a unique ID +-(UUID). ++.TP ++.B \f[I]FI_PSM_UUID\f[] ++PSM requires that each job has a unique ID (UUID). + All the processes in the same job need to use the same UUID in order to + be able to talk to each other. + The PSM reference manual advises to keep UUID unique to each job. +@@ -83,12 +101,15 @@ jobs with the same UUID have exited normally. + If running into "resource busy" or "connection failure" issues with + unknown reason, it is advisable to manually set the UUID to a value + different from the default. ++.RS ++.RE + .PP + The default UUID is 0FFF0FFF\-0000\-0000\-0000\-0FFF0FFF0FFF. +-.PP +-\f[I]FI_PSM_NAME_SERVER\f[] : The \f[I]psm\f[] provider has a simple +-built\-in name server that can be used to resolve an IP address or host +-name into a transport address needed by the \f[I]fi_av_insert\f[] call. ++.TP ++.B \f[I]FI_PSM_NAME_SERVER\f[] ++The \f[I]psm\f[] provider has a simple built\-in name server that can be ++used to resolve an IP address or host name into a transport address ++needed by the \f[I]fi_av_insert\f[] call. + The main purpose of this name server is to allow simple client\-server + type applications (such as those in \f[I]fabtests\f[]) to be written + purely with libfabric, without using any out\-of\-band communication +@@ -104,6 +125,8 @@ Optionally the \f[I]service\f[] parameter can be used in addition to + \f[I]node\f[]. + Notice that the \f[I]service\f[] number is interpreted by the provider + and is not a TCP/IP port number. ++.RS ++.RE + .PP + The name server is on by default. + It can be turned off by setting the variable to 0. +@@ -112,13 +135,16 @@ created when the name server is on. + .PP + The provider detects OpenMPI and MPICH runs and changes the default + setting to off. +-.PP +-\f[I]FI_PSM_TAGGED_RMA\f[] : The RMA functions are implemented on top of +-the PSM Active Message functions. ++.TP ++.B \f[I]FI_PSM_TAGGED_RMA\f[] ++The RMA functions are implemented on top of the PSM Active Message ++functions. + The Active Message functions have limit on the size of data can be + transferred in a single message. + Large transfers can be divided into small chunks and be pipe\-lined. + However, the bandwidth is sub\-optimal by doing this way. ++.RS ++.RE + .PP + The \f[I]psm\f[] provider use PSM tag\-matching message queue functions + to achieve higher bandwidth for large size RMA. +@@ -127,39 +153,50 @@ RMA traffic from the regular tagged message queue. + .PP + The option is on by default. + To turn it off set the variable to 0. +-.PP +-\f[I]FI_PSM_AM_MSG\f[] : The \f[I]psm\f[] provider implements the +-non\-tagged message queue over the PSM tag\-matching message queue. ++.TP ++.B \f[I]FI_PSM_AM_MSG\f[] ++The \f[I]psm\f[] provider implements the non\-tagged message queue over ++the PSM tag\-matching message queue. + One tag bit is reserved for this purpose. + Alternatively, the non\-tagged message queue can be implemented over + Active Message. + This experimental feature has slightly larger latency. ++.RS ++.RE + .PP + This option is off by default. + To turn it on set the variable to 1. +-.PP +-\f[I]FI_PSM_DELAY\f[] : Time (seconds) to sleep before closing PSM +-endpoints. ++.TP ++.B \f[I]FI_PSM_DELAY\f[] ++Time (seconds) to sleep before closing PSM endpoints. + This is a workaround for a bug in some versions of PSM library. ++.RS ++.RE + .PP + The default setting is 1. +-.PP +-\f[I]FI_PSM_TIMEOUT\f[] : Timeout (seconds) for gracefully closing PSM +-endpoints. ++.TP ++.B \f[I]FI_PSM_TIMEOUT\f[] ++Timeout (seconds) for gracefully closing PSM endpoints. + A forced closing will be issued if timeout expires. ++.RS ++.RE + .PP + The default setting is 5. +-.PP +-\f[I]FI_PSM_PROG_INTERVAL\f[] : When auto progress is enabled (asked via +-the hints to \f[I]fi_getinfo\f[]), a progress thread is created to make +-progress calls from time to time. ++.TP ++.B \f[I]FI_PSM_PROG_INTERVAL\f[] ++When auto progress is enabled (asked via the hints to ++\f[I]fi_getinfo\f[]), a progress thread is created to make progress ++calls from time to time. + This option set the interval (microseconds) between progress calls. ++.RS ++.RE + .PP + The default setting is 1 if affinity is set, or 1000 if not. + See \f[I]FI_PSM_PROG_AFFINITY\f[]. +-.PP +-\f[I]FI_PSM_PROG_AFFINITY\f[] : When set, specify the set of CPU cores +-to set the progress thread affinity to. ++.TP ++.B \f[I]FI_PSM_PROG_AFFINITY\f[] ++When set, specify the set of CPU cores to set the progress thread ++affinity to. + The format is + \f[C][:[:]][,[:[:]]]*\f[], where + each triplet \f[C]::\f[] defines a block of +@@ -167,6 +204,8 @@ core_ids. + Both \f[C]\f[] and \f[C]\f[] can be either the + \f[C]core_id\f[] (when >=0) or \f[C]core_id\ \-\ num_cores\f[] (when + <0). ++.RS ++.RE + .PP + By default affinity is not set. + .SH SEE ALSO +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm2.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm2.7 +index cebcb36..7801cce 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm2.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm2.7 +@@ -1,4 +1,7 @@ +-.TH "fi_psm2" "7" "2018\-02\-21" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_psm2" "7" "2018\-10\-23" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_psm2 \- The PSM2 Fabric Provider +@@ -16,17 +19,23 @@ Fabric. + The \f[I]psm2\f[] provider doesn\[aq]t support all the features defined + in the libfabric API. + Here are some of the limitations: +-.PP +-Endpoint types : Only support non\-connection based types +-\f[I]FI_DGRAM\f[] and \f[I]FI_RDM\f[] +-.PP +-Endpoint capabilities : Endpoints can support any combination of data +-transfer capabilities \f[I]FI_TAGGED\f[], \f[I]FI_MSG\f[], +-\f[I]FI_ATOMICS\f[], and \f[I]FI_RMA\f[]. ++.TP ++.B Endpoint types ++Only support non\-connection based types \f[I]FI_DGRAM\f[] and ++\f[I]FI_RDM\f[] ++.RS ++.RE ++.TP ++.B Endpoint capabilities ++Endpoints can support any combination of data transfer capabilities ++\f[I]FI_TAGGED\f[], \f[I]FI_MSG\f[], \f[I]FI_ATOMICS\f[], and ++\f[I]FI_RMA\f[]. + These capabilities can be further refined by \f[I]FI_SEND\f[], + \f[I]FI_RECV\f[], \f[I]FI_READ\f[], \f[I]FI_WRITE\f[], + \f[I]FI_REMOTE_READ\f[], and \f[I]FI_REMOTE_WRITE\f[] to limit the + direction of operations. ++.RS ++.RE + .PP + \f[I]FI_MULTI_RECV\f[] is supported for non\-tagged message queue only. + .PP +@@ -41,8 +50,9 @@ Other supported capabilities include \f[I]FI_TRIGGER\f[], + and \f[I]FI_SOURCE_ERR\f[]. + Furthermore, \f[I]FI_NAMED_RX_CTX\f[] is supported when scalable + endpoints are enabled. +-.PP +-Modes : \f[I]FI_CONTEXT\f[] is required for the \f[I]FI_TAGGED\f[] and ++.TP ++.B Modes ++\f[I]FI_CONTEXT\f[] is required for the \f[I]FI_TAGGED\f[] and + \f[I]FI_MSG\f[] capabilities. + That means, any request belonging to these two categories that generates + a completion must pass as the operation context a valid pointer to type +@@ -50,23 +60,31 @@ a completion must pass as the operation context a valid pointer to type + remain untouched until the request has completed. + If none of \f[I]FI_TAGGED\f[] and \f[I]FI_MSG\f[] is asked for, the + \f[I]FI_CONTEXT\f[] mode is not required. +-.PP +-Progress : The \f[I]psm2\f[] provider requires manual progress. ++.RS ++.RE ++.TP ++.B Progress ++The \f[I]psm2\f[] provider requires manual progress. + The application is expected to call \f[I]fi_cq_read\f[] or + \f[I]fi_cntr_read\f[] function from time to time when no other libfabric + function is called to ensure progress is made in a timely manner. + The provider does support auto progress mode. + However, the performance can be significantly impacted if the + application purely depends on the provider to make auto progress. +-.PP +-Scalable endpoints : Scalable endpoints support depends on the multi\-EP +-feature of the \f[I]PSM2\f[] library. ++.RS ++.RE ++.TP ++.B Scalable endpoints ++Scalable endpoints support depends on the multi\-EP feature of the ++\f[I]PSM2\f[] library. + If the \f[I]PSM2\f[] library supports this feature, the availability is + further controlled by an environment variable \f[I]PSM2_MULTI_EP\f[]. + The \f[I]psm2\f[] provider automatically sets this variable to 1 if it + is not set. + The feature can be disabled explicitly by setting \f[I]PSM2_MULTI_EP\f[] + to 0. ++.RS ++.RE + .PP + When creating a scalable endpoint, the exact number of contexts + requested should be set in the "fi_info" structure passed to the +@@ -81,24 +99,30 @@ For optimal performance, it is advised to avoid having multiple threads + accessing the same context, either directly by posting + send/recv/read/write request, or indirectly by polling associated + completion queues or counters. +-.PP +-Shared Tx contexts : In order to achieve the purpose of saving PSM +-context by using shared Tx context, the endpoints bound to the shared Tx +-contexts need to be Tx only. ++.TP ++.B Shared Tx contexts ++In order to achieve the purpose of saving PSM context by using shared Tx ++context, the endpoints bound to the shared Tx contexts need to be Tx ++only. + The reason is that Rx capability always requires a PSM context, which + can also be automatically used for Tx. + As the result, allocating a shared Tx context for Rx capable endpoints + actually consumes one extra context instead of saving some. +-.PP +-Unsupported features : These features are unsupported: connection +-management, passive endpoint, and shared receive context. ++.RS ++.RE ++.TP ++.B Unsupported features ++These features are unsupported: connection management, passive endpoint, ++and shared receive context. ++.RS ++.RE + .SH RUNTIME PARAMETERS + .PP + The \f[I]psm2\f[] provider checks for the following environment + variables: +-.PP +-\f[I]FI_PSM2_UUID\f[] : PSM requires that each job has a unique ID +-(UUID). ++.TP ++.B \f[I]FI_PSM2_UUID\f[] ++PSM requires that each job has a unique ID (UUID). + All the processes in the same job need to use the same UUID in order to + be able to talk to each other. + The PSM reference manual advises to keep UUID unique to each job. +@@ -108,12 +132,15 @@ jobs with the same UUID have exited normally. + If running into "resource busy" or "connection failure" issues with + unknown reason, it is advisable to manually set the UUID to a value + different from the default. ++.RS ++.RE + .PP + The default UUID is 00FF00FF\-0000\-0000\-0000\-00FF0F0F00FF. +-.PP +-\f[I]FI_PSM2_NAME_SERVER\f[] : The \f[I]psm2\f[] provider has a simple +-built\-in name server that can be used to resolve an IP address or host +-name into a transport address needed by the \f[I]fi_av_insert\f[] call. ++.TP ++.B \f[I]FI_PSM2_NAME_SERVER\f[] ++The \f[I]psm2\f[] provider has a simple built\-in name server that can ++be used to resolve an IP address or host name into a transport address ++needed by the \f[I]fi_av_insert\f[] call. + The main purpose of this name server is to allow simple client\-server + type applications (such as those in \f[I]fabtests\f[]) to be written + purely with libfabric, without using any out\-of\-band communication +@@ -129,6 +156,8 @@ Optionally the \f[I]service\f[] parameter can be used in addition to + \f[I]node\f[]. + Notice that the \f[I]service\f[] number is interpreted by the provider + and is not a TCP/IP port number. ++.RS ++.RE + .PP + The name server is on by default. + It can be turned off by setting the variable to 0. +@@ -137,13 +166,16 @@ created when the name server is on. + .PP + The provider detects OpenMPI and MPICH runs and changes the default + setting to off. +-.PP +-\f[I]FI_PSM2_TAGGED_RMA\f[] : The RMA functions are implemented on top +-of the PSM Active Message functions. ++.TP ++.B \f[I]FI_PSM2_TAGGED_RMA\f[] ++The RMA functions are implemented on top of the PSM Active Message ++functions. + The Active Message functions have limit on the size of data can be + transferred in a single message. + Large transfers can be divided into small chunks and be pipe\-lined. + However, the bandwidth is sub\-optimal by doing this way. ++.RS ++.RE + .PP + The \f[I]psm2\f[] provider use PSM tag\-matching message queue functions + to achieve higher bandwidth for large size RMA. +@@ -152,29 +184,37 @@ the RMA traffic from the regular tagged message queue. + .PP + The option is on by default. + To turn it off set the variable to 0. +-.PP +-\f[I]FI_PSM2_DELAY\f[] : Time (seconds) to sleep before closing PSM +-endpoints. ++.TP ++.B \f[I]FI_PSM2_DELAY\f[] ++Time (seconds) to sleep before closing PSM endpoints. + This is a workaround for a bug in some versions of PSM library. ++.RS ++.RE + .PP + The default setting is 0. +-.PP +-\f[I]FI_PSM2_TIMEOUT\f[] : Timeout (seconds) for gracefully closing PSM +-endpoints. ++.TP ++.B \f[I]FI_PSM2_TIMEOUT\f[] ++Timeout (seconds) for gracefully closing PSM endpoints. + A forced closing will be issued if timeout expires. ++.RS ++.RE + .PP + The default setting is 5. +-.PP +-\f[I]FI_PSM2_PROG_INTERVAL\f[] : When auto progress is enabled (asked +-via the hints to \f[I]fi_getinfo\f[]), a progress thread is created to +-make progress calls from time to time. ++.TP ++.B \f[I]FI_PSM2_PROG_INTERVAL\f[] ++When auto progress is enabled (asked via the hints to ++\f[I]fi_getinfo\f[]), a progress thread is created to make progress ++calls from time to time. + This option set the interval (microseconds) between progress calls. ++.RS ++.RE + .PP + The default setting is 1 if affinity is set, or 1000 if not. + See \f[I]FI_PSM2_PROG_AFFINITY\f[]. +-.PP +-\f[I]FI_PSM2_PROG_AFFINITY\f[] : When set, specify the set of CPU cores +-to set the progress thread affinity to. ++.TP ++.B \f[I]FI_PSM2_PROG_AFFINITY\f[] ++When set, specify the set of CPU cores to set the progress thread ++affinity to. + The format is + \f[C][:[:]][,[:[:]]]*\f[], where + each triplet \f[C]::\f[] defines a block of +@@ -182,52 +222,42 @@ core_ids. + Both \f[C]\f[] and \f[C]\f[] can be either the + \f[C]core_id\f[] (when >=0) or \f[C]core_id\ \-\ num_cores\f[] (when + <0). ++.RS ++.RE + .PP + By default affinity is not set. +-.PP +-\f[I]FI_PSM2_INJECT_SIZE\f[] : Maximum message size allowed for +-fi_inject and fi_tinject calls. ++.TP ++.B \f[I]FI_PSM2_INJECT_SIZE\f[] ++Maximum message size allowed for fi_inject and fi_tinject calls. + This is an experimental feature to allow some applications to override + default inject size limitation. + When the inject size is larger than the default value, some inject calls + might block. ++.RS ++.RE + .PP + The default setting is 64. +-.PP +-\f[I]FI_PSM2_LOCK_LEVEL\f[] : When set, dictate the level of locking +-being used by the provider. ++.TP ++.B \f[I]FI_PSM2_LOCK_LEVEL\f[] ++When set, dictate the level of locking being used by the provider. + Level 2 means all locks are enabled. + Level 1 disables some locks and is suitable for runs that limit the + access to each PSM2 context to a single thread. + Level 0 disables all locks and thus is only suitable for single threaded + runs. ++.RS ++.RE + .PP + To use level 0 or level 1, wait object and auto progress mode cannot be + used because they introduce internal threads that may break the + conditions needed for these levels. + .PP + The default setting is 2. +-.PP +-\f[I]FI_PSM2_LAZY_CONN\f[] : Control when connections are established +-between PSM2 endpoints that OFI endpoints are built on top of. +-When set to 0, connections are established when addresses are inserted +-into the address vector. +-This is the eager connection mode. +-When set to 1, connections are established when addresses are used the +-first time in communication. +-This is the lazy connection mode. +-.PP +-Lazy connection mode may reduce the start\-up time on large systems at +-the expense of slightly higher data path overhead. +-For applications that use multiple endpoints, lazy connection mode can +-be especially helpful with the potential of greatly reduce the time to +-set up address vectors and to close endpoints. +-.PP +-The default setting is 0. +-.PP +-\f[I]FI_PSM2_DISCONNECT\f[] : The provider has a mechanism to +-automatically send disconnection notifications to all connected peers +-before the local endpoint is closed. ++.TP ++.B \f[I]FI_PSM2_DISCONNECT\f[] ++The provider has a mechanism to automatically send disconnection ++notifications to all connected peers before the local endpoint is ++closed. + As the response, the peers call \f[I]psm2_ep_disconnect\f[] to clean up + the connection state at their side. + This allows the same PSM2 epid be used by different dynamically started +@@ -236,6 +266,8 @@ This mechanism, however, introduce extra overhead to the finalization + phase. + For applications that never reuse epids within the same session such + overhead is unnecessary. ++.RS ++.RE + .PP + This option controls whether the automatic disconnection notification + mechanism should be enabled. +@@ -243,9 +275,9 @@ For client\-server application mentioned above, the client side should + set this option to 1, but the server should set it to 0. + .PP + The default setting is 0. +-.PP +-\f[I]FI_PSM2_TAG_LAYOUT\f[] : Select how the 96\-bit PSM2 tag bits are +-organized. ++.TP ++.B \f[I]FI_PSM2_TAG_LAYOUT\f[] ++Select how the 96\-bit PSM2 tag bits are organized. + Currently three choices are available: \f[I]tag60\f[] means 32\-4\-60 + partitioning for CQ data, internal protocol flags, and application tag. + \f[I]tag64\f[] means 4\-28\-64 partitioning for internal protocol flags, +@@ -259,6 +291,8 @@ including \f[I]FI_REMOTE_CQ_DATA\f[] in \f[I]hints\->caps\f[], otherwise + If \f[I]tag64\f[] is the result of automatic selection, + \f[I]fi_getinfo\f[] also returns a second instance of the provider with + \f[I]tag60\f[] layout. ++.RS ++.RE + .PP + The default setting is \f[I]auto\f[]. + .PP +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rstream.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rstream.7 +new file mode 100644 +index 0000000..60ec49c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rstream.7 +@@ -0,0 +1,103 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_rstream" "7" "2018\-11\-21" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_rstream ++.SH OVERVIEW ++.PP ++The rstream provider supports stream messaging over message based RMA. ++It maps stream to message over a core RMA\-based OFI provider. ++Only Endpoints and EQs are needed for connection start\-up and ++messaging. ++Unlike other OFI providers, rstream does not support CQs or memory ++registration of any kind. ++In order to asynchronously wait for a completion (cm/msg), one can use ++fi_control on the endpoint/eq to get an fd to use in a poll call. ++For messaging completions, use FI_PEEK on send/recv after poll to see ++what type of transaction has transpired. ++.SH SUPPORTED FEATURES ++.PP ++The rstream provider currently supports \f[I]FI_MSG\f[] capabilities. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only endpoint type \f[I]FI_EP_SOCK_STREAM\f[]. ++.RS ++.RE ++.PP ++\f[I]Endpoint capabilities\f[] : The following data transfer interface ++is supported: \f[I]fi_msg\f[]. ++.TP ++.B \f[I]Modes\f[] ++The provider does not require the use of any mode bits but supports core ++providers that require FI_CONTEXT and FI_RX_CQ_DATA. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The rstream provider only supports \f[I]FI_PROGRESS_MANUAL\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Threading Model\f[] ++The provider supports FI_THREAD_SAFE ++.RS ++.RE ++.TP ++.B \f[I]Verbs\-iWarp\f[] ++The provider has added features to enable iWarp. ++To use this feature, the ep protocol IWARP must be requested in a ++getinfo call. ++.RS ++.RE ++.SH LIMITATIONS ++.PP ++The rstream provider is experimental and lacks performance validation ++and extensive testing. ++The iWarp protocol may need extra initialization work to re\-enable. ++Currently the rstream provider is used to by the rsockets\-OFI library ++as a ULP and hooks into the core provider verbs. ++It is not interoperable with the previous rsockets(v1) protocol. ++There are default settings that limit the message stream (provider ++memory region size and CQ size). ++These can be modified by fi_setopt. ++.SH SETTINGS ++.PP ++The \f[I]rstream\f[] provider settings can be modified via fi_setopt on ++the endpoint (FI_OPT_ENDPOINT) along with the following parameters: ++.TP ++.B \f[I]FI_OPT_SEND_BUF_SIZE\f[] ++Size of the send buffer. ++Default is 32KB. ++.RS ++.RE ++.TP ++.B \f[I]FI_OPT_RECV_BUF_SIZE\f[] ++Size of the recv buffer. ++Default is 32KB. ++.RS ++.RE ++.TP ++.B \f[I]FI_OPT_TX_SIZE\f[] ++Size of the send queue. ++Default is 384. ++.RS ++.RE ++.TP ++.B \f[I]FI_OPT_RX_SIZE\f[] ++Size of the recv queue. ++Default is 384. ++.RS ++.RE ++.SH OFI EXTENSIONS ++.PP ++The rstream provider has extended the current OFI API set in order to ++enable a user implemenation of Poll. ++Specifically sendmsg(FI_PEEK) is supported which replicates the behavior ++of the recvmsg(FI_PEEK) feature. ++.SH SEE ALSO ++.PP ++\f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxd.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxd.7 +index f385c72..d4723ec 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxd.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxd.7 +@@ -1,4 +1,7 @@ +-.TH "fi_rxd" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_rxd" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_rxd \- The RxD (RDM over DGRAM) Utility Provider +@@ -8,24 +11,26 @@ The RxD provider is a utility provider that supports RDM endpoints + emulated over a base DGRAM provider. + .SH SUPPORTED FEATURES + .PP +-The RxD provider currently supports \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[] +-and \f[I]FI_RMA\f[] capabilities. +-It requires the base DGRAM provider to support \f[I]FI_MSG\f[] +-capabilities. +-.PP +-\f[I]Endpoint types\f[] : The provider supports only endpoint type +-\f[I]FI_EP_RDM\f[]. ++The RxD provider currently supports \f[I]FI_MSG\f[] capabilities. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only endpoint type \f[I]FI_EP_RDM\f[]. ++.RS ++.RE + .PP + \f[I]Endpoint capabilities\f[] : The following data transfer interface +-is supported: \f[I]fi_msg\f[], \f[I]fi_tagged\f[] and \f[I]fi_rma\f[]. +-.PP +-\f[I]Modes\f[] : The provider does not require the use of any mode bits. +-.PP +-\f[I]Progress\f[] : The RxD provider supports both +-\f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], with a +-default set to auto. +-However, receive side data buffers are not modified outside of +-completion processing routines. ++is supported: \f[I]fi_msg\f[]. ++.TP ++.B \f[I]Modes\f[] ++The provider does not require the use of any mode bits but supports core ++DGRAM providers that require FI_CONTEXT and FI_MSG_PREFIX. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The RxD provider only supports \f[I]FI_PROGRESS_MANUAL\f[]. ++.RS ++.RE + .SH LIMITATIONS + .PP + The RxD provider has hard\-coded maximums for supported queue sizes and +@@ -40,7 +45,34 @@ The RxD provider is still under development and is not extensively + tested. + .SH RUNTIME PARAMETERS + .PP +-No runtime parameters are currently defined. ++The \f[I]rxd\f[] provider checks for the following environment ++variables: ++.TP ++.B \f[I]FI_OFI_RXD_SPIN_COUNT\f[] ++Number of times to read the core provider\[aq]s CQ for a segment ++completion before trying to progress sends. ++Default is 1000. ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXD_RETRY\f[] ++Toggles retrying of packets and assumes reliability of individual ++packets and will reassemble all received packets. ++Retrying is turned on by default. ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXD_MAX_PEERS\f[] ++Maximum number of peers the provider should prepare to track. ++Default: 1024 ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXD_MAX_UNACKED\f[] ++Maximum number of packets (per peer) to send at a time. ++Default: 128 ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxm.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxm.7 +index 2d7bc33..9405593 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxm.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxm.7 +@@ -1,38 +1,77 @@ +-.TH "fi_rxm" "7" "2018\-02\-19" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_rxm" "7" "2018\-12\-19" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_rxm \- The RxM (RDM over MSG) Utility Provider + .SH OVERVIEW + .PP +-The RxM provider (ofi_rxm) is an utility provider that supports RDM +-endpoint emulated over MSG endpoint of a core provider. ++The RxM provider (ofi_rxm) is an utility provider that supports ++FI_EP_RDM type endpoint emulated over FI_EP_MSG type endpoint(s) of an ++underlying core provider. ++FI_EP_RDM endpoints have a reliable unconnected messaging interface and ++RxM emulates this by hiding the connection management of underlying ++FI_EP_MSG endpoints from the user. ++Additionally, RxM can hide memory registration requirement from a core ++provider like verbs if the apps don\[aq]t support it. + .SH REQUIREMENTS ++.SS Requirements for core provider + .PP + RxM provider requires the core provider to support the following + features: + .IP \[bu] 2 + MSG endpoints (FI_EP_MSG) + .IP \[bu] 2 +-RMA read/write (FI_RMA) ++RMA read/write (FI_RMA) \- Used for implementing rendezvous protocol for ++large messages. + .IP \[bu] 2 +-FI_OPT_CM_DATA_SIZE of at least 24 bytes ++FI_OPT_CM_DATA_SIZE of at least 48 bytes ++.SS Requirements for applications ++.PP ++Since RxM emulates RDM endpoints by hiding connection management and ++connections are established only on\-demand (when app tries to send ++data), the first several data transfer calls would return EAGAIN. ++Applications should be aware of this and retry until the operation ++succeeds. ++.PP ++If an application has chosen manual progress for data progress, it ++should also read the CQ so that the connection establishment progresses. ++Not doing so would result in a stall. ++See also the ERRORS section in fi_msg(3). + .SH SUPPORTED FEATURES + .PP +-The RxM provider currently supports \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[] +-and \f[I]FI_RMA\f[] capabilities. +-.PP +-\f[I]Endpoint types\f[] : The provider supports only \f[I]FI_EP_RDM\f[]. +-.PP +-\f[I]Endpoint capabilities\f[] : The following data transfer interface +-is supported: \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[]. +-.PP +-\f[I]Progress\f[] : The RxM provider supports \f[I]FI_PROGRESS_AUTO\f[]. +-.PP +-\f[I]Addressing Formats\f[] : FI_SOCKADDR, FI_SOCKADDR_IN +-.PP +-\f[I]Memory Region\f[] : FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, +-FI_MR_PROV_KEY MR mode bits would be required from the app in case the +-core provider requires it. ++The RxM provider currently supports \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[], ++\f[I]FI_RMA\f[] and \f[I]FI_ATOMIC\f[] capabilities. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only \f[I]FI_EP_RDM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The following data transfer interface is supported: \f[I]FI_MSG\f[], ++\f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[], \f[I]FI_ATOMIC\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The RxM provider supports both \f[I]FI_PROGRESS_MANUAL\f[] and ++\f[I]FI_PROGRESS_AUTO\f[]. ++The former is more optimal. ++.RS ++.RE ++.TP ++.B \f[I]Addressing Formats\f[] ++FI_SOCKADDR, FI_SOCKADDR_IN ++.RS ++.RE ++.TP ++.B \f[I]Memory Region\f[] ++FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY MR mode bits would be ++required from the app in case the core provider requires it. ++.RS ++.RE + .SH LIMITATIONS + .PP + When using RxM provider, some limitations from the underlying MSG +@@ -45,8 +84,6 @@ RxM provider does not support the following features: + .IP \[bu] 2 + op_flags: FI_FENCE. + .IP \[bu] 2 +-FI_ATOMIC +-.IP \[bu] 2 + Scalable endpoints + .IP \[bu] 2 + Shared contexts +@@ -66,25 +103,105 @@ FI_ADDR_STR, FI_SYNC_ERR + Reporting unknown source addr data as part of completions + .IP \[bu] 2 + Triggered operations +-.SS Auto progress ++.SS Progress limitations + .PP + When sending large messages, an app doing an sread or waiting on the CQ + file descriptor may not get a completion when reading the CQ after being + woken up from the wait. + The app has to do sread or wait on the file descriptor again. ++This is needed because RxM uses a rendezvous protocol for large message ++sends. ++An app would get woken up from waiting on CQ fd when rendezvous protocol ++request completes but it would have to wait again to get an ACK from the ++receiver indicating completion of large message transfer by remote RMA ++read. ++.SS FI_ATOMIC limitations ++.PP ++The FI_ATOMIC capability will only be listed in the fi_info if the ++fi_info hints parameter specifies FI_ATOMIC. ++If FI_ATOMIC is requested, message order FI_ORDER_RAR, FI_ORDER_RAW, ++FI_ORDER_WAR, FI_ORDER_WAW, FI_ORDER_SAR, and FI_ORDER_SAW can not be ++supported. + .SH RUNTIME PARAMETERS + .PP + The ofi_rxm provider checks for the following environment variables. +-.PP +-\f[I]FI_OFI_RXM_BUFFER_SIZE\f[] : Defines the transmit buffer size / +-inject size. ++.TP ++.B \f[I]FI_OFI_RXM_BUFFER_SIZE\f[] ++Defines the transmit buffer size / inject size. + Messages of size less than this would be transmitted via an eager +-protocol and those above would be transmitted via a rendezvous protocol. ++protocol and those above would be transmitted via a rendezvous or SAR ++(Segmentation And Reassembly) protocol. + Transmit data would be copied up to this size (default: ~16k). +-.PP +-\f[I]FI_OFI_RXM_COMP_PER_PROGRESS\f[] : Defines the maximum number of +-MSG provider CQ entries (default: 1) that would be read per progress +-(RxM CQ read). ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_COMP_PER_PROGRESS\f[] ++Defines the maximum number of MSG provider CQ entries (default: 1) that ++would be read per progress (RxM CQ read). ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_SAR_LIMIT\f[] ++Set this environment variable to control the RxM SAR (Segmentation And ++Reassembly) protocol. ++Messages of size greater than this (default: 256 Kb) would be ++transmitted via rendezvous protocol. ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_USE_SRX\f[] ++Set this to 1 to use shared receive context from MSG provider. ++This reduces overall memory usage but there may be a slight increase in ++latency (default: 0). ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_TX_SIZE\f[] ++Defines default TX context size (default: 1024) ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_RX_SIZE\f[] ++Defines default RX context size (default: 1024) ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_MSG_TX_SIZE\f[] ++Defines FI_EP_MSG TX size that would be requested (default: 128). ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_MSG_RX_SIZE\f[] ++Defines FI_EP_MSG RX size that would be requested (default: 128). ++.RS ++.RE ++.TP ++.B \f[I]FI_UNIVERSE_SIZE\f[] ++Defines the expected number of ranks / peers an endpoint would ++communicate with (default: 256). ++.RS ++.RE ++.SH Tuning ++.SS Bandwidth ++.PP ++To optimize for bandwidth, ensure you use higher values than default for ++FI_OFI_RXM_TX_SIZE, FI_OFI_RXM_RX_SIZE, FI_OFI_RXM_MSG_TX_SIZE, ++FI_OFI_RXM_MSG_RX_SIZE subject to memory limits of the system and the tx ++and rx sizes supported by the MSG provider. ++.PP ++FI_OFI_RXM_SAR_LIMIT is another knob that can be experimented with to ++optimze for bandwidth. ++.SS Memory ++.PP ++To conserve memory, ensure FI_UNIVERSE_SIZE set to what is required. ++Similarly check that FI_OFI_RXM_TX_SIZE, FI_OFI_RXM_RX_SIZE, ++FI_OFI_RXM_MSG_TX_SIZE and FI_OFI_RXM_MSG_RX_SIZE env variables are set ++to only required values. ++.SH NOTES ++.PP ++The data transfer API may return \-FI_EAGAIN during on\-demand ++connection setup of the core provider FI_MSG_EP. ++See \f[C]fi_msg\f[](3) for a detailed description of handling FI_EAGAIN. + .SH SEE ALSO + .PP + \f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_shm.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_shm.7 +index 2d76a7b..61b092d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_shm.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_shm.7 +@@ -1,4 +1,7 @@ +-.TH "fi_shm" "7" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_shm" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_shm \- The SHM Fabric Provider +@@ -13,22 +16,30 @@ between processes on the same system. + .PP + This release contains an initial implementation of the SHM provider that + offers the following support: +-.PP +-\f[I]Endpoint types\f[] : The provider supports only endpoint type +-\f[I]FI_EP_RDM\f[]. +-.PP +-\f[I]Endpoint capabilities\f[] : Endpoints cna support any combinations +-of the following data transfer capabilities: \f[I]FI_MSG\f[], +-\f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[], amd \f[I]FI_ATOMICS\f[]. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only endpoint type \f[I]FI_EP_RDM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++Endpoints cna support any combinations of the following data transfer ++capabilities: \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[], amd ++\f[I]FI_ATOMICS\f[]. + These capabilities can be further defined by \f[I]FI_SEND\f[], + \f[I]FI_RECV\f[], \f[I]FI_READ\f[], \f[I]FI_WRITE\f[], + \f[I]FI_REMOTE_READ\f[], and \f[I]FI_REMOTE_WRITE\f[] to limit the + direction of operations. +-.PP +-\f[I]Modes\f[] : The provider does not require the use of any mode bits. +-.PP +-\f[I]Progress\f[] : The SHM provider supports +-\f[I]FI_PROGRESS_MANUAL\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The provider does not require the use of any mode bits. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The SHM provider supports \f[I]FI_PROGRESS_MANUAL\f[]. + Receive side data buffers are not modified outside of completion + processing routines. + The provider processes messages using three different methods, based on +@@ -37,10 +48,12 @@ For messages smaller than 4096 bytes, tx completions are generated + immediately after the send. + For larger messages, tx completions are not generated until the + receiving side has processed the message. +-.PP +-\f[I]Address Format\f[] : The SHM provider uses the address format +-FI_ADDR_STR, which follows the general format pattern +-"[prefix]://[addr]". ++.RS ++.RE ++.TP ++.B \f[I]Address Format\f[] ++The SHM provider uses the address format FI_ADDR_STR, which follows the ++general format pattern "[prefix]://[addr]". + The application can provide addresses through the node or hints + parameter. + As long as the address is in a valid FI_ADDR_STR format (contains +@@ -48,6 +61,8 @@ As long as the address is in a valid FI_ADDR_STR format (contains + If the application input is incorrectly formatted or no input was + provided, the SHM provider will resolve it according to the following + SHM provider standards: ++.RS ++.RE + .PP + (flags & FI_SOURCE) ? + src_addr : dest_addr = \- if (node && service) : "fi_ns://node:service" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_sockets.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_sockets.7 +index f73ddc8..64acfd6 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_sockets.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_sockets.7 +@@ -1,4 +1,7 @@ +-.TH "fi_sockets" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_sockets" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_sockets \- The Sockets Fabric Provider +@@ -17,24 +20,35 @@ interfaces. + The sockets provider supports all the features defined for the libfabric + API. + Key features include: +-.PP +-\f[I]Endpoint types\f[] : The provider supports all endpoint types: +-\f[I]FI_EP_MSG\f[], \f[I]FI_EP_RDM\f[], and \f[I]FI_EP_DGRAM\f[]. +-.PP +-\f[I]Endpoint capabilities\f[] : The following data transfer interface +-is supported for a all endpoint types: \f[I]fi_msg\f[]. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports all endpoint types: \f[I]FI_EP_MSG\f[], ++\f[I]FI_EP_RDM\f[], and \f[I]FI_EP_DGRAM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The following data transfer interface is supported for a all endpoint ++types: \f[I]fi_msg\f[]. + Additionally, these interfaces are supported for reliable endpoints + (\f[I]FI_EP_MSG\f[] and \f[I]FI_EP_RDM\f[]): \f[I]fi_tagged\f[], + \f[I]fi_atomic\f[], and \f[I]fi_rma\f[]. +-.PP +-\f[I]Modes\f[] : The sockets provider supports all operational modes +-including \f[I]FI_CONTEXT\f[] and \f[I]FI_MSG_PREFIX\f[]. +-.PP +-\f[I]Progress\f[] : Sockets provider supports both +-\f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], with a +-default set to auto. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The sockets provider supports all operational modes including ++\f[I]FI_CONTEXT\f[] and \f[I]FI_MSG_PREFIX\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++Sockets provider supports both \f[I]FI_PROGRESS_AUTO\f[] and ++\f[I]FI_PROGRESS_MANUAL\f[], with a default set to auto. + When progress is set to auto, a background thread runs to ensure that + progress is made for asynchronous requests. ++.RS ++.RE + .SH LIMITATIONS + .PP + Sockets provider attempts to emulate the entire API set, including all +@@ -49,49 +63,90 @@ Does not support FI_ADDR_STR address format. + .SH RUNTIME PARAMETERS + .PP + The sockets provider checks for the following environment variables \- +-.PP +-\f[I]FI_SOCKETS_PE_WAITTIME\f[] : An integer value that specifies how +-many milliseconds to spin while waiting for progress in +-\f[I]FI_PROGRESS_AUTO\f[] mode. +-.PP +-\f[I]FI_SOCKETS_MAX_CONN_RETRY\f[] : An integer value that specifies the +-number of socket connection retries before reporting as failure. +-.PP +-\f[I]FI_SOCKETS_DEF_CONN_MAP_SZ\f[] : An integer to specify the default +-connection map size. +-.PP +-\f[I]FI_SOCKETS_DEF_AV_SZ\f[] : An integer to specify the default +-address vector size. +-.PP +-\f[I]FI_SOCKETS_DEF_CQ_SZ\f[] : An integer to specify the default +-completion queue size. +-.PP +-\f[I]FI_SOCKETS_DEF_EQ_SZ\f[] : An integer to specify the default event +-queue size. +-.PP +-\f[I]FI_SOCKETS_DGRAM_DROP_RATE\f[] : An integer value to specify the +-drop rate of dgram frame when endpoint is \f[I]FI_EP_DGRAM\f[]. ++.TP ++.B \f[I]FI_SOCKETS_PE_WAITTIME\f[] ++An integer value that specifies how many milliseconds to spin while ++waiting for progress in \f[I]FI_PROGRESS_AUTO\f[] mode. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_CONN_TIMEOUT\f[] ++An integer value that specifies how many milliseconds to wait for one ++connection establishment. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_MAX_CONN_RETRY\f[] ++An integer value that specifies the number of socket connection retries ++before reporting as failure. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DEF_CONN_MAP_SZ\f[] ++An integer to specify the default connection map size. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DEF_AV_SZ\f[] ++An integer to specify the default address vector size. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DEF_CQ_SZ\f[] ++An integer to specify the default completion queue size. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DEF_EQ_SZ\f[] ++An integer to specify the default event queue size. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DGRAM_DROP_RATE\f[] ++An integer value to specify the drop rate of dgram frame when endpoint ++is \f[I]FI_EP_DGRAM\f[]. + This is for debugging purpose only. +-.PP +-\f[I]FI_SOCKETS_PE_AFFINITY\f[] : If specified, progress thread is bound +-to the indicated range(s) of Linux virtual processor ID(s). ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_PE_AFFINITY\f[] ++If specified, progress thread is bound to the indicated range(s) of ++Linux virtual processor ID(s). + This option is currently not supported on OS X. + The usage is \- id_start[\-id_end[:stride]][,]. +-.PP +-\f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] : A boolean to enable the keepalive +-support. +-.PP +-\f[I]FI_SOCKETS_KEEPALIVE_TIME\f[] : An integer to specify the idle time +-in seconds before sending the first keepalive probe. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] ++A boolean to enable the keepalive support. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_KEEPALIVE_TIME\f[] ++An integer to specify the idle time in seconds before sending the first ++keepalive probe. + Only relevant if \f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] is enabled. +-.PP +-\f[I]FI_SOCKETS_KEEPALIVE_INTVL\f[] : An integer to specify the time in +-seconds between individual keepalive probes. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_KEEPALIVE_INTVL\f[] ++An integer to specify the time in seconds between individual keepalive ++probes. + Only relevant if \f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] is enabled. +-.PP +-\f[I]FI_SOCKETS_KEEPALIVE_PROBES\f[] : An integer to specify the maximum +-number of keepalive probes sent before dropping the connection. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_KEEPALIVE_PROBES\f[] ++An integer to specify the maximum number of keepalive probes sent before ++dropping the connection. + Only relevant if \f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] is enabled. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_IFACE\f[] ++The prefix or the name of the network interface (default: any) ++.RS ++.RE + .SH LARGE SCALE JOBS + .PP + For large scale runs one can use these environment variables to set the +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_tcp.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_tcp.7 +new file mode 100644 +index 0000000..0963b39 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_tcp.7 +@@ -0,0 +1,44 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_tcp" "7" "2018\-10\-29" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_tcp \- The msg sockets Fabric Provider ++.SH OVERVIEW ++.PP ++The tcp provider can be used on any system that supports TCP sockets. ++The provider is not intended to provide performance improvements over ++regular TCP sockets, but rather to allow developers to write, test,and ++debug application code even on platforms that do not have ++high\-performance fabric hardware. ++.SH SUPPORTED FEATURES ++.PP ++The following features are supported ++.TP ++.B \f[I]Endpoint types\f[] ++\f[I]FI_EP_MSG\f[] is the only supported endpoint type. ++Reliable datagram endpoint over TCP sockets can be achieved by layering ++RxM over tcp provider. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The tcp provider currently supports \f[I]FI_MSG\f[], \f[I]FI_RMA\f[] ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++Currently tcp provider supports only \f[I]FI_PROGRESS_MANUAL\f[] ++.RS ++.RE ++.SH LIMITATIONS ++.PP ++tcp provider is implemented over TCP sockets to emulate libfabric API. ++Hence the performance is lower than what an application might see ++implementing to sockets directly. ++.SH SEE ALSO ++.PP ++\f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_udp.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_udp.7 +index 54d8527..5da716a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_udp.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_udp.7 +@@ -1,4 +1,7 @@ +-.TH "fi_udp" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_udp" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_udp \- The UDP Fabric Provider +@@ -15,22 +18,31 @@ the implementation of libfabric features over any hardware. + .PP + The UDP provider supports a minimal set of features useful for sending + and receiving datagram messages over an unreliable endpoint. +-.PP +-\f[I]Endpoint types\f[] : The provider supports only endpoint type +-\f[I]FI_EP_DGRAM\f[]. +-.PP +-\f[I]Endpoint capabilities\f[] : The following data transfer interface +-is supported: \f[I]fi_msg\f[]. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only endpoint type \f[I]FI_EP_DGRAM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The following data transfer interface is supported: \f[I]fi_msg\f[]. + The provider supports standard unicast datagram transfers, as well as + multicast operations. +-.PP +-\f[I]Modes\f[] : The provider does not require the use of any mode bits. +-.PP +-\f[I]Progress\f[] : The UDP provider supports both +-\f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], with a +-default set to auto. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The provider does not require the use of any mode bits. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The UDP provider supports both \f[I]FI_PROGRESS_AUTO\f[] and ++\f[I]FI_PROGRESS_MANUAL\f[], with a default set to auto. + However, receive side data buffers are not modified outside of + completion processing routines. ++.RS ++.RE + .SH LIMITATIONS + .PP + The UDP provider has hard\-coded maximums for supported queue sizes and +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_usnic.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_usnic.7 +index 40eb9b4..c75126f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_usnic.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_usnic.7 +@@ -1,4 +1,7 @@ +-.TH "fi_usnic" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_usnic" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_usnic \- The usNIC Fabric Provider +@@ -161,13 +164,22 @@ int\ getinfo(uint32_t\ version,\ struct\ fid_fabric\ *fabric, + \ \ \ \ \ \ \ \ struct\ fi_usnic_info\ *info); + \f[] + .fi +-.PP +-\f[I]version\f[] : Version of getinfo to be used +-.PP +-\f[I]fabric\f[] : Fabric descriptor +-.PP +-\f[I]info\f[] : Upon successful return, this parameter will contain +-information about the fabric. ++.TP ++.B \f[I]version\f[] ++Version of getinfo to be used ++.RS ++.RE ++.TP ++.B \f[I]fabric\f[] ++Fabric descriptor ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++Upon successful return, this parameter will contain information about ++the fabric. ++.RS ++.RE + .IP \[bu] 2 + Version 2 + .IP +@@ -327,14 +339,23 @@ vector extension operations. + int\ get_distance(struct\ fid_av\ *av,\ void\ *addr,\ int\ *metric); + \f[] + .fi +-.PP +-\f[I]av\f[] : Address vector +-.PP +-\f[I]addr\f[] : Destination address +-.PP +-\f[I]metric\f[] : On output this will contain \f[C]\-1\f[] if the +-destination host is unreachable, \f[C]0\f[] is the destination host is +-locally connected, and \f[C]1\f[] otherwise. ++.TP ++.B \f[I]av\f[] ++Address vector ++.RS ++.RE ++.TP ++.B \f[I]addr\f[] ++Destination address ++.RS ++.RE ++.TP ++.B \f[I]metric\f[] ++On output this will contain \f[C]\-1\f[] if the destination host is ++unreachable, \f[C]0\f[] is the destination host is locally connected, ++and \f[C]1\f[] otherwise. ++.RS ++.RE + .PP + See fi_ext_usnic.h for more details. + .SH VERSION DIFFERENCES +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_verbs.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_verbs.7 +index db15d5e..f62db59 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_verbs.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_verbs.7 +@@ -1,4 +1,7 @@ +-.TH "fi_verbs" "7" "2018\-03\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_verbs" "7" "2018\-12\-19" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_verbs \- The Verbs Fabric Provider +@@ -158,84 +161,141 @@ should not be used in the forked process. + The memory registered using fi_mr_reg has to be page aligned since + ibv_reg_mr marks the entire page that a memory region belongs to as not + to be re\-mapped when the process is forked (MADV_DONTFORK). ++.SS XRC Transport ++.PP ++The XRC transport is intended to be used when layered with the RXM ++provider and requires the use of shared receive contexts. ++See \f[C]fi_rxm\f[](7). + .SH RUNTIME PARAMETERS + .PP + The verbs provider checks for the following environment variables. + .SS Common variables: +-.PP +-\f[I]FI_VERBS_TX_SIZE\f[] : Default maximum tx context size (default: +-384) +-.PP +-\f[I]FI_VERBS_RX_SIZE\f[] : Default maximum rx context size (default: +-384) +-.PP +-\f[I]FI_VERBS_TX_IOV_LIMIT\f[] : Default maximum tx iov_limit (default: +-4). ++.TP ++.B \f[I]FI_VERBS_TX_SIZE\f[] ++Default maximum tx context size (default: 384) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RX_SIZE\f[] ++Default maximum rx context size (default: 384) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_TX_IOV_LIMIT\f[] ++Default maximum tx iov_limit (default: 4). + Note: RDM (internal \- deprecated) EP type supports only 1 +-.PP +-\f[I]FI_VERBS_RX_IOV_LIMIT\f[] : Default maximum rx iov_limit (default: +-4). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RX_IOV_LIMIT\f[] ++Default maximum rx iov_limit (default: 4). + Note: RDM (internal \- deprecated) EP type supports only 1 +-.PP +-\f[I]FI_VERBS_INLINE_SIZE\f[] : Default maximum inline size. ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_INLINE_SIZE\f[] ++Default maximum inline size. + Actual inject size returned in fi_info may be greater (default: 64) +-.PP +-\f[I]FI_VERBS_MIN_RNR_TIMER\f[] : Set min_rnr_timer QP attribute (0 \- +-31) (default: 12) +-.PP +-\f[I]FI_VERBS_USE_ODP\f[] : Enable On\-Demand\-Paging (ODP) experimental +-feature. ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_MIN_RNR_TIMER\f[] ++Set min_rnr_timer QP attribute (0 \- 31) (default: 12) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_USE_ODP\f[] ++Enable On\-Demand\-Paging (ODP) experimental feature. + The feature is supported only on Mellanox OFED (default: 0) +-.PP +-\f[I]FI_VERBS_CQREAD_BUNCH_SIZE\f[] : The number of entries to be read +-from the verbs completion queue at a time (default: 8). +-.PP +-\f[I]FI_VERBS_IFACE\f[] : The prefix or the full name of the network +-interface associated with the verbs device (default: ib) +-.PP +-\f[I]FI_VERBS_MR_CACHE_ENABLE\f[] : Enable Memory Registration caching +-(default: 0) +-.PP +-\f[I]FI_VERBS_MR_MAX_CACHED_CNT\f[] : Maximum number of cache entries +-(default: 4096) +-.PP +-\f[I]FI_VERBS_MR_MAX_CACHED_SIZE\f[] : Maximum total size of cache +-entries (default: 4 GB) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_CQREAD_BUNCH_SIZE\f[] ++The number of entries to be read from the verbs completion queue at a ++time (default: 8). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_IFACE\f[] ++The prefix or the full name of the network interface associated with the ++verbs device (default: ib) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_MR_CACHE_ENABLE\f[] ++Enable Memory Registration caching (default: 0) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_MR_MAX_CACHED_CNT\f[] ++Maximum number of cache entries (default: 4096) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_MR_MAX_CACHED_SIZE\f[] ++Maximum total size of cache entries (default: 4 GB) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_PREFER_XRC\f[] ++Prioritize XRC transport fi_info before RC transport fi_info (default: ++0, RC fi_info will be before XRC fi_info) ++.RS ++.RE + .SS Variables specific to RDM (internal \- deprecated) endpoints +-.PP +-\f[I]FI_VERBS_RDM_BUFFER_NUM\f[] : The number of pre\-registered buffers +-for buffered operations between the endpoints, must be a power of 2 +-(default: 8). +-.PP +-\f[I]FI_VERBS_RDM_BUFFER_SIZE\f[] : The maximum size of a buffered +-operation (bytes) (default: platform specific). +-.PP +-\f[I]FI_VERBS_RDM_RNDV_SEG_SIZE\f[] : The segment size for zero copy +-protocols (bytes)(default: 1073741824). +-.PP +-\f[I]FI_VERBS_RDM_THREAD_TIMEOUT\f[] : The wake up timeout of the helper +-thread (usec) (default: 100). +-.PP +-\f[I]FI_VERBS_RDM_EAGER_SEND_OPCODE\f[] : The operation code that will +-be used for eager messaging. ++.TP ++.B \f[I]FI_VERBS_RDM_BUFFER_NUM\f[] ++The number of pre\-registered buffers for buffered operations between ++the endpoints, must be a power of 2 (default: 8). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_BUFFER_SIZE\f[] ++The maximum size of a buffered operation (bytes) (default: platform ++specific). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_RNDV_SEG_SIZE\f[] ++The segment size for zero copy protocols (bytes)(default: 1073741824). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_THREAD_TIMEOUT\f[] ++The wake up timeout of the helper thread (usec) (default: 100). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_EAGER_SEND_OPCODE\f[] ++The operation code that will be used for eager messaging. + Only IBV_WR_SEND and IBV_WR_RDMA_WRITE_WITH_IMM are supported. + The last one is not applicable for iWarp. + (default: IBV_WR_SEND) +-.PP +-\f[I]FI_VERBS_RDM_CM_THREAD_AFFINITY\f[] : If specified, bind the CM +-thread to the indicated range(s) of Linux virtual processor ID(s). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_CM_THREAD_AFFINITY\f[] ++If specified, bind the CM thread to the indicated range(s) of Linux ++virtual processor ID(s). + This option is currently not supported on OS X. + Usage: id_start[\-id_end[:stride]][,] ++.RS ++.RE + .SS Variables specific to DGRAM endpoints +-.PP +-\f[I]FI_VERBS_DGRAM_USE_NAME_SERVER\f[] : The option that +-enables/disables OFI Name Server thread. ++.TP ++.B \f[I]FI_VERBS_DGRAM_USE_NAME_SERVER\f[] ++The option that enables/disables OFI Name Server thread. + The NS thread is used to resolve IP\-addresses to provider specific + addresses (default: 1, if "OMPI_COMM_WORLD_RANK" and "PMI_RANK" + environment variables aren\[aq]t defined) +-.PP +-\f[I]FI_VERBS_NAME_SERVER_PORT\f[] : The port on which Name Server +-thread listens incoming connections and requests (default: 5678) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_NAME_SERVER_PORT\f[] ++The port on which Name Server thread listens incoming connections and ++requests (default: 5678) ++.RS ++.RE + .SS Environment variables notes + .PP + The fi_info utility would give the up\-to\-date information on +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/pingpong.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/pingpong.vcxproj +old mode 100644 +new mode 100755 +index 2616245..2e65c22 +--- a/src/mpid/ch4/netmod/ofi/libfabric/pingpong.vcxproj ++++ b/src/mpid/ch4/netmod/ofi/libfabric/pingpong.vcxproj +@@ -30,8 +30,8 @@ + {DBBD5F92-1E78-40ED-8D64-F958D0EF12B2} + Win32Proj + pingpong +- 8.1 + ++ + + + Application +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/fi_ext_gni.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/fi_ext_gni.h +index fc004d1..26939de 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/fi_ext_gni.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/fi_ext_gni.h +@@ -166,8 +166,9 @@ struct fi_gni_auth_key { + }; + }; + +-#define GNIX_PROV_DEFAULT_AUTH_KEY NULL +-#define GNIX_PROV_DEFAULT_AUTH_KEYLEN 0 ++extern uint8_t* gnix_default_auth_key; ++#define GNIX_PROV_DEFAULT_AUTH_KEY gnix_default_auth_key ++#define GNIX_PROV_DEFAULT_AUTH_KEYLEN sizeof(struct fi_gni_auth_key) + + #define FI_GNI_FAB_OPS_2 "fab ops 2" + struct fi_gni_auth_key_ops_fab { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_ep.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_ep.h +index c838679..7bad770 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_ep.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_ep.h +@@ -405,6 +405,17 @@ int gnix_scalable_ep_bind(fid_t fid, struct fid *bfid, uint64_t flags); + */ + int gnix_pep_bind(fid_t fid, struct fid *bfid, uint64_t flags); + ++/** ++ * Cancels a transaction posted to an endpoint, if possible. ++ * ++ * @param[in] fid the endpoint ++ * @param[in] context context of the transaction to be canceled ++ * ++ * @return FI_SUCCESS upon successfully canceling transaction ++ * @return -FI_ENONT no entry to cancel ++ */ ++ssize_t gnix_cancel(fid_t fid, void *context); ++ + DIRECT_FN int gnix_ep_atomic_valid(struct fid_ep *ep, + enum fi_datatype datatype, + enum fi_op op, size_t *count); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_mbox_allocator.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_mbox_allocator.h +index f83ae99..afbb05a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_mbox_allocator.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_mbox_allocator.h +@@ -1,6 +1,7 @@ + /* + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved. + * Copyright (c) 2015-2016 Cray Inc. All rights reserved. ++ * Copyright (c) 2019 Triad National Security, LLC. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -100,6 +101,8 @@ struct gnix_slab { + * @var mbox_size Size per each mailbox. + * @var mpmmap Mailboxes per mmap slab. + * @var slab_list List of slab objects. ++ * ++ * @note If HUGETLBFS is not available, memory is allocated via ANON mmap. + */ + struct gnix_mbox_alloc_handle { + struct gnix_nic *nic_handle; +@@ -190,4 +193,9 @@ int _gnix_mbox_free(struct gnix_mbox *ptr); + */ + extern ofi_atomic32_t file_id_counter; + ++/* ++ * safety valve for disabling mbox allocator fallback to base pages ++ */ ++ ++extern bool gnix_mbox_alloc_allow_fallback; + #endif /* _GNIX_MBOX_ALLOCATOR_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_vc.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_vc.h +index 52955dc..ae9055d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_vc.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_vc.h +@@ -101,6 +101,7 @@ enum gnix_vc_conn_req_type { + * associated + * @var smsg_mbox pointer to GNI SMSG mailbox used by this VC + * to exchange SMSG messages with its peer ++ * @var gnix_ep_name cache for storing remote endpoint name + * @var gni_ep GNI endpoint for this VC + * @var outstanding_fab_reqs Count of outstanding libfabric level requests + * associated with this endpoint. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_auth_key.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_auth_key.c +index 697884f..c1e6f8c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_auth_key.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_auth_key.c +@@ -60,6 +60,8 @@ typedef enum gnix_global_auth_info_version { + + static char *gnix_default_ak_path = GNIX_DEFAULT_AK_PATH; + ++uint8_t* gnix_default_auth_key = NULL; ++ + struct gnix_global_ptag_info { + gnix_bitmap_t prov; + gnix_bitmap_t user; +@@ -386,24 +388,20 @@ int _gnix_auth_key_insert( + return -FI_EINVAL; + } + +- if (auth_key_size == GNIX_PROV_DEFAULT_AUTH_KEYLEN) +- key = 0; +- else { +- if (!auth_key) { +- GNIX_INFO(FI_LOG_FABRIC, "auth key is null\n"); +- return -FI_EINVAL; +- } ++ if (!auth_key) { ++ GNIX_INFO(FI_LOG_FABRIC, "auth key is null\n"); ++ return -FI_EINVAL; ++ } + +- switch (gni_auth_key->type) { +- case GNIX_AKT_RAW: +- key = (gnix_ht_key_t) gni_auth_key->raw.protection_key; +- break; +- default: +- GNIX_INFO(FI_LOG_FABRIC, "unrecognized auth key " +- "type, type=%d\n", +- gni_auth_key->type); +- return -FI_EINVAL; +- } ++ switch (gni_auth_key->type) { ++ case GNIX_AKT_RAW: ++ key = (gnix_ht_key_t) gni_auth_key->raw.protection_key; ++ break; ++ default: ++ GNIX_INFO(FI_LOG_FABRIC, "unrecognized auth key " ++ "type, type=%d\n", ++ gni_auth_key->type); ++ return -FI_EINVAL; + } + + ret = _gnix_ht_insert(&__gnix_auth_key_ht, key, to_insert); +@@ -438,26 +436,19 @@ _gnix_auth_key_lookup(uint8_t *auth_key, size_t auth_key_size) + struct gnix_auth_key *ptr = NULL; + struct fi_gni_auth_key *gni_auth_key = NULL; + +- if (auth_key_size == GNIX_PROV_DEFAULT_AUTH_KEYLEN) { +- key = 0; +- } else { +- if (!auth_key) { +- GNIX_INFO(FI_LOG_FABRIC, +- "null auth key provided, cannot find entry\n"); +- return NULL; +- } +- +- gni_auth_key = (struct fi_gni_auth_key *) auth_key; +- switch (gni_auth_key->type) { +- case GNIX_AKT_RAW: +- key = (gnix_ht_key_t) gni_auth_key->raw.protection_key; +- break; +- default: +- GNIX_INFO(FI_LOG_FABRIC, "unrecognized auth key type, " +- "type=%d\n", gni_auth_key->type); +- return NULL; +- } ++ if (auth_key == NULL || auth_key_size == 0) { ++ auth_key = gnix_default_auth_key; ++ } + ++ gni_auth_key = (struct fi_gni_auth_key *) auth_key; ++ switch (gni_auth_key->type) { ++ case GNIX_AKT_RAW: ++ key = (gnix_ht_key_t) gni_auth_key->raw.protection_key; ++ break; ++ default: ++ GNIX_INFO(FI_LOG_FABRIC, "unrecognized auth key type, " ++ "type=%d\n", gni_auth_key->type); ++ return NULL; + } + + ptr = (struct gnix_auth_key *) _gnix_ht_lookup( +@@ -484,11 +475,18 @@ int _gnix_auth_key_subsys_init(void) + ret = _gnix_ht_init(&__gnix_auth_key_ht, &attr); + assert(ret == FI_SUCCESS); + ++ struct fi_gni_auth_key *gni_auth_key = calloc(1, sizeof(*gni_auth_key)); ++ gni_auth_key->type = GNIX_AKT_RAW; ++ gni_auth_key->raw.protection_key = 0; ++ gnix_default_auth_key = (uint8_t *) gni_auth_key; ++ + return ret; + } + + int _gnix_auth_key_subsys_fini(void) + { ++ free(gnix_default_auth_key); ++ + return FI_SUCCESS; + } + +@@ -503,10 +501,15 @@ struct gnix_auth_key *_gnix_auth_key_create( + uint8_t ptag; + uint32_t cookie; + +- if (auth_key_size == GNIX_PROV_DEFAULT_AUTH_KEYLEN) { ++ if (auth_key == NULL || auth_key_size == 0) { ++ auth_key = gnix_default_auth_key; ++ } ++ ++ gni_auth_key = (struct fi_gni_auth_key *) auth_key; ++ if (auth_key == gnix_default_auth_key) { + gnixu_get_rdma_credentials(NULL, &ptag, &cookie); ++ gni_auth_key->raw.protection_key = cookie; + } else { +- gni_auth_key = (struct fi_gni_auth_key *) auth_key; + switch (gni_auth_key->type) { + case GNIX_AKT_RAW: + cookie = gni_auth_key->raw.protection_key; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_av.c +index ea6d200..bbc8a55 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_av.c +@@ -173,7 +173,7 @@ static int table_insert(struct gnix_fid_av *av_priv, const void *addr, + /* check if this ep_name fits in the av context bits */ + if (ep_name.name_type & GNIX_EPN_TYPE_SEP) { + if ((1 << av_priv->rx_ctx_bits) < ep_name.rx_ctx_cnt) { +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = -FI_EINVAL; + fi_addr[i] = FI_ADDR_NOTAVAIL; + ret = -FI_EINVAL; +@@ -196,7 +196,7 @@ static int table_insert(struct gnix_fid_av *av_priv, const void *addr, + if (fi_addr) + fi_addr[i] = index; + +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = FI_SUCCESS; + } + } +@@ -335,7 +335,7 @@ static int map_insert(struct gnix_fid_av *av_priv, const void *addr, + /* check if this ep_name fits in the av context bits */ + if (ep_name.name_type & GNIX_EPN_TYPE_SEP) { + if ((1 << av_priv->rx_ctx_bits) < ep_name.rx_ctx_cnt) { +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = -FI_EINVAL; + fi_addr[i] = FI_ADDR_NOTAVAIL; + ret_cnt = -FI_EINVAL; +@@ -360,7 +360,7 @@ static int map_insert(struct gnix_fid_av *av_priv, const void *addr, + key, + the_entry); + +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = FI_SUCCESS; + } + +@@ -372,7 +372,7 @@ static int map_insert(struct gnix_fid_av *av_priv, const void *addr, + GNIX_WARN(FI_LOG_AV, + "_gnix_ht_insert failed %d\n", + ret); +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = ret; + fi_addr[i] = FI_ADDR_NOTAVAIL; + ret_cnt = ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_cq.c +index bd9ddc5..07d9565 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_cq.c +@@ -351,6 +351,9 @@ ssize_t _gnix_cq_add_error(struct gnix_fid_cq *cq, void *op_context, + + _gnix_queue_enqueue(cq->errors, &event->item); + ++ if (cq->wait) ++ _gnix_signal_wait_obj(cq->wait); ++ + err: + COND_RELEASE(cq->requires_lock, &cq->lock); + +@@ -455,7 +458,7 @@ static ssize_t __gnix_cq_readfrom(struct fid_cq *cq, void *buf, + assert(event->the_entry); + memcpy(buf, event->the_entry, cq_priv->entry_size); + if (src_addr) +- memcpy(src_addr, &event->src_addr, sizeof(fi_addr_t)); ++ memcpy(&src_addr[read_count], &event->src_addr, sizeof(fi_addr_t)); + + _gnix_queue_enqueue_free(cq_priv->events, &event->item); + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_ep.c +index 6d8b093..219084c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_ep.c +@@ -2888,6 +2888,8 @@ DIRECT_FN STATIC ssize_t gnix_ep_cancel(fid_t fid, void *context) + ssize_t gnix_cancel(fid_t fid, void *context) + { + ssize_t ret; ++ struct gnix_fid_ep *ep; ++ struct gnix_fid_trx *trx_ep; + + GNIX_TRACE(FI_LOG_EP_CTRL, "\n"); + +@@ -2896,10 +2898,14 @@ ssize_t gnix_cancel(fid_t fid, void *context) + ret = gnix_ep_cancel(fid, context); + break; + +- /* not supported yet */ + case FI_CLASS_RX_CTX: +- case FI_CLASS_SRX_CTX: + case FI_CLASS_TX_CTX: ++ trx_ep = container_of(fid, struct gnix_fid_trx, ep_fid); ++ ep = trx_ep->ep; ++ ret = gnix_ep_cancel(&ep->ep_fid.fid, context); ++ break; ++ /* not supported yet */ ++ case FI_CLASS_SRX_CTX: + case FI_CLASS_STX_CTX: + return -FI_ENOENT; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_fabric.c +index 77b2f4e..fac8c74 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_fabric.c +@@ -3,6 +3,8 @@ + * Copyright (c) 2015-2017 Los Alamos National Security, LLC. + * All rights reserved. + * Copyright (c) 2015-2017 Cray Inc. All rights reserved. ++ * Copyrigth (c) 2019 Triad National Security, LLC. All rights ++ * reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -62,6 +64,7 @@ + #include "gnix_nameserver.h" + #include "gnix_wait.h" + #include "gnix_xpmem.h" ++#include "gnix_mbox_allocator.h" + + /* check if only one bit of a set is enabled, when one is required */ + #define IS_EXCLUSIVE(x) \ +@@ -249,8 +252,7 @@ static struct fi_info *_gnix_allocinfo(void) + gnix_info->ep_attr->type = FI_EP_RDM; + gnix_info->ep_attr->protocol = FI_PROTO_GNI; + gnix_info->ep_attr->max_msg_size = GNIX_MAX_MSG_SIZE; +- /* TODO: need to work on this */ +- gnix_info->ep_attr->mem_tag_format = 0x0; ++ gnix_info->ep_attr->mem_tag_format = FI_TAG_GENERIC; + gnix_info->ep_attr->tx_ctx_cnt = 1; + gnix_info->ep_attr->rx_ctx_cnt = 1; + +@@ -722,7 +724,7 @@ static void gnix_fini(void) + struct fi_provider gnix_prov = { + .name = gnix_prov_name, + .version = FI_VERSION(GNI_MAJOR_VERSION, GNI_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = gnix_getinfo, + .fabric = gnix_fabric_open, + .cleanup = gnix_fini +@@ -774,6 +776,8 @@ GNI_INI + + if (getenv("GNIX_DISABLE_XPMEM") != NULL) + gnix_xpmem_disabled = true; ++ if (getenv("GNIX_MBOX_FALLBACK_DISABLE") != NULL) ++ gnix_mbox_alloc_allow_fallback = false; + + return (provider); + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_mbox_allocator.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_mbox_allocator.c +index 2e8b7fa..d398e00 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_mbox_allocator.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_mbox_allocator.c +@@ -2,6 +2,7 @@ + * Copyright (c) 2015-2016 Los Alamos National Security, LLC. + * All rights reserved. + * Copyright (c) 2015,2017-2018 Cray Inc. All rights reserved. ++ * Copyright (c) 2019 Triad National Security, LLC. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -39,6 +40,9 @@ + + #include "gnix_mbox_allocator.h" + #include "gnix_nic.h" ++#include "fi_ext_gni.h" ++ ++bool gnix_mbox_alloc_allow_fallback = true; + + /** + * Will attempt to find a directory in the hugetlbfs with the given page size. +@@ -194,6 +198,9 @@ static int __open_huge_page(struct gnix_mbox_alloc_handle *handle) + + GNIX_TRACE(FI_LOG_EP_CTRL, "\n"); + ++ handle->fd = -1; ++ handle->filename = NULL; ++ + ret = __generate_file_name(handle->page_size, &filename); + if (ret < 0) { + GNIX_WARN(FI_LOG_EP_CTRL, "Error in generating file name.\n"); +@@ -295,10 +302,11 @@ static int __create_slab(struct gnix_mbox_alloc_handle *handle) + char error_buf[256]; + char *error; + size_t total_size; +- int ret; ++ int ret, mflags; + int vmdh_index = -1; + int flags = GNI_MEM_READWRITE; + struct gnix_auth_key *info; ++ struct fi_gni_auth_key key; + + GNIX_TRACE(FI_LOG_EP_CTRL, "\n"); + +@@ -326,7 +334,11 @@ static int __create_slab(struct gnix_mbox_alloc_handle *handle) + goto err_bitmap_calloc; + } + +- slab->base = mmap(0, total_size, (PROT_READ | PROT_WRITE), MAP_SHARED, ++ mflags = MAP_SHARED; ++ if (handle->fd == -1) ++ mflags |= MAP_ANONYMOUS; ++ ++ slab->base = mmap(0, total_size, (PROT_READ | PROT_WRITE), mflags, + handle->fd, handle->last_offset); + if (slab->base == MAP_FAILED) { + error = strerror_r(errno, error_buf, sizeof(error_buf)); +@@ -343,8 +355,10 @@ static int __create_slab(struct gnix_mbox_alloc_handle *handle) + + COND_ACQUIRE(handle->nic_handle->requires_lock, &handle->nic_handle->lock); + if (handle->nic_handle->using_vmdh) { +- info = _gnix_auth_key_lookup(GNIX_PROV_DEFAULT_AUTH_KEY, +- GNIX_PROV_DEFAULT_AUTH_KEYLEN); ++ key.type = GNIX_AKT_RAW; ++ key.raw.protection_key = handle->nic_handle->cookie; ++ ++ info = _gnix_auth_key_lookup((uint8_t *) &key, sizeof(key)); + assert(info); + + if (!handle->nic_handle->mdd_resources_set) { +@@ -616,25 +630,50 @@ int _gnix_mbox_allocator_create(struct gnix_nic *nic, + fastlock_init(&handle->lock); + + ret = __open_huge_page(handle); +- if (ret) { ++ if (ret == FI_SUCCESS) { ++ ret = __create_slab(handle); ++ if (ret != FI_SUCCESS) { ++ GNIX_WARN(FI_LOG_EP_CTRL, "Slab creation failed.\n"); ++ } ++ } else { + GNIX_WARN(FI_LOG_EP_CTRL, "Error opening huge page.\n"); +- goto err_huge_page; + } + +- ret = __create_slab(handle); +- if (ret) { +- GNIX_WARN(FI_LOG_EP_CTRL, "Slab creation failed.\n"); +- goto err_slab_creation; +- } ++ /* ++ * try plan B - try to use anonymous mapping (base page size). ++ * If a file was successfully opened, close fd and free filename ++ * field in the handle. ++ */ ++ ++ if ((ret != FI_SUCCESS) && ++ (gnix_mbox_alloc_allow_fallback == true)) { ++ if (handle->filename != NULL) { ++ free(handle->filename); ++ handle->filename = NULL; ++ } ++ if (handle->fd != -1) { ++ ret = close(handle->fd); ++ handle->fd = -1; ++ if (ret) { ++ GNIX_WARN(FI_LOG_EP_CTRL, ++ "Error closing huge page - %d\n", ++ ret); ++ } ++ } + +- *alloc_handle = handle; ++ ret = __create_slab(handle); ++ if (ret != FI_SUCCESS) { ++ GNIX_WARN(FI_LOG_EP_CTRL, ++ "Slab(anon) creation failed.\n"); ++ } ++ } + +- return ret; ++ if (ret == FI_SUCCESS) { ++ *alloc_handle = handle; ++ } else { ++ free(handle); ++ } + +-err_slab_creation: +- free(handle->filename); +-err_huge_page: +- free(handle); + return ret; + } + +@@ -645,7 +684,7 @@ int _gnix_mbox_allocator_destroy(struct gnix_mbox_alloc_handle *alloc_handle) + char error_buf[256]; + int position; + char *error; +- int ret; ++ int ret = FI_SUCCESS; + + GNIX_TRACE(FI_LOG_EP_CTRL, "\n"); + +@@ -673,9 +712,12 @@ int _gnix_mbox_allocator_destroy(struct gnix_mbox_alloc_handle *alloc_handle) + "Error destroying slab.\n"); + } + +- free(alloc_handle->filename); ++ if (alloc_handle->filename != NULL) ++ free(alloc_handle->filename); ++ ++ if (alloc_handle->fd != -1) ++ ret = close(alloc_handle->fd); + +- ret = close(alloc_handle->fd); + if (ret) { + error = strerror_r(errno, error_buf, sizeof(error_buf)); + GNIX_WARN(FI_LOG_EP_CTRL, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_msg.c +index 80e6e9d..4645d58 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_msg.c +@@ -1,6 +1,6 @@ + /* + * Copyright (c) 2015-2017 Cray Inc. All rights reserved. +- * Copyright (c) 2015-2017 Los Alamos National Security, LLC. ++ * Copyright (c) 2015-2018 Los Alamos National Security, LLC. + * All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -400,11 +400,15 @@ static int __recv_completion_src( + fi_addr_t src_addr) + { + ssize_t rc; ++ char *buffer; + + GNIX_DBG_TRACE(FI_LOG_TRACE, "\n"); + + if ((req->msg.recv_flags & FI_COMPLETION) && ep->recv_cq) { + if (src_addr == FI_ADDR_NOTAVAIL) { ++ buffer = malloc(GNIX_CQ_MAX_ERR_DATA_SIZE); ++ memcpy(buffer, req->vc->gnix_ep_name, ++ sizeof(struct gnix_ep_name)); + rc = _gnix_cq_add_error(ep->recv_cq, + req->user_context, + flags, +@@ -415,7 +419,7 @@ static int __recv_completion_src( + 0, + FI_EADDRNOTAVAIL, + 0, +- req->vc->gnix_ep_name, ++ buffer, + sizeof(struct gnix_ep_name)); + } else { + rc = _gnix_cq_add_event(ep->recv_cq, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_nic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_nic.c +index 9a17d89..f23b0d2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_nic.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_nic.c +@@ -44,6 +44,7 @@ + #include "gnix_vc.h" + #include "gnix_mbox_allocator.h" + #include "gnix_util.h" ++#include "fi_ext_gni.h" + + /* + * TODO: make this a domain parameter +@@ -204,6 +205,7 @@ static int __nic_setup_irq_cq(struct gnix_nic *nic) + int vmdh_index = -1; + int flags = GNI_MEM_READWRITE; + struct gnix_auth_key *info; ++ struct fi_gni_auth_key key; + + len = (size_t)sysconf(_SC_PAGESIZE); + +@@ -224,8 +226,10 @@ static int __nic_setup_irq_cq(struct gnix_nic *nic) + memset(mmap_addr, 0x0, len); + + if (nic->using_vmdh) { +- info = _gnix_auth_key_lookup(GNIX_PROV_DEFAULT_AUTH_KEY, +- GNIX_PROV_DEFAULT_AUTH_KEYLEN); ++ key.type = GNIX_AKT_RAW; ++ key.raw.protection_key = nic->cookie; ++ ++ info = _gnix_auth_key_lookup((uint8_t *) &key, sizeof(key)); + assert(info); + + if (!nic->mdd_resources_set) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_sep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_sep.c +index 1e67c3c..d80530a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_sep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_sep.c +@@ -1597,7 +1597,7 @@ static struct fi_ops gnix_sep_fi_ops = { + + static struct fi_ops_ep gnix_sep_ops = { + .size = sizeof(struct fi_ops_ep), +- .cancel = fi_no_cancel, ++ .cancel = gnix_cancel, + .getopt = fi_no_getopt, + .setopt = fi_no_setopt, + .tx_ctx = gnix_sep_tx_ctx, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_util.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_util.c +index 6ee5f89..f53fd0a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_util.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_util.c +@@ -547,7 +547,7 @@ int _gnix_job_disable_unassigned_cpus(void) + return gnix_write_proc_job("disable_affinity_unassigned_cpus"); + } + +-/* Indicate that the next task spawned should adhere to the the affinity rules. */ ++/* Indicate that the next task spawned should adhere to the affinity rules. */ + int _gnix_job_enable_affinity_apply(void) + { + return gnix_write_proc_job("enable_affinity_apply"); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_vc.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_vc.c +index 5c6b8d4..5dbe682 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_vc.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_vc.c +@@ -53,6 +53,7 @@ + #include "gnix_trigger.h" + #include "gnix_vector.h" + #include "gnix_xpmem.h" ++#include "gnix_cq.h" + + /* + * forward declarations and local struct defs. +@@ -961,9 +962,12 @@ static int __gnix_vc_hndl_conn_req(struct gnix_cm_nic *cm_nic, + + dlist_insert_tail(&vc->list, &ep->unmapped_vcs); + ++ /* ++ * see issue 4521 for the error_data size allocated ++ */ + if (vc->ep->caps & FI_SOURCE) { + error_data = +- calloc(1, sizeof(*error_data)); ++ calloc(1, GNIX_CQ_MAX_ERR_DATA_SIZE); + if (error_data == NULL) { + ret = -FI_ENOMEM; + goto err; +@@ -1506,6 +1510,7 @@ int _gnix_vc_alloc(struct gnix_fid_ep *ep_priv, + if (ret != FI_SUCCESS) + goto err; + vc_ptr->vc_id = remote_id; ++ vc_ptr->gnix_ep_name = NULL; + + *vc = vc_ptr; + +@@ -1637,6 +1642,11 @@ int _gnix_vc_destroy(struct gnix_vc *vc) + + _gnix_free_bitmap(&vc->flags); + ++ if (vc->gnix_ep_name != NULL) { ++ free(vc->gnix_ep_name); ++ vc->gnix_ep_name = NULL; ++ } ++ + /* + * put VC back on the freelist + */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_xpmem.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_xpmem.c +index 825b67f..1803505 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_xpmem.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_xpmem.c +@@ -14,7 +14,7 @@ + * conditions are met: + * + * - Redistributions of source code must retain the above +- * opyright notice, this list of conditions and the following ++ * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/allocator.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/allocator.c +index 6b30b73..7776bb0 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/allocator.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/allocator.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights reserved. ++ * Copyright (c) 2015-2018 Los Alamos National Security, LLC. All rights reserved. + * Copyright (c) 2015-2017 Cray Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -128,9 +128,14 @@ static ptrdiff_t abs_value(ptrdiff_t x) + return x * ((x > 0) - (x < 0)); + } + ++#ifndef __aarch64__ + /* + * Open /proc/self/maps and count the number of times the hugetlbfs + * string is present. Return value is the count; ++ * ++ * TODO: this approach doesn't work on Cray ARM systems. Large ++ * page regions don't show being backed by files in ++ * /var/lib/hugetlbfs. Need to fix with something better. + */ + static int verify_hugepages(void) + { +@@ -162,6 +167,7 @@ static int verify_hugepages(void) + + return ret; + } ++#endif + + /* + * Open an allocator with the given parameters and immediately close it. Verify +@@ -185,13 +191,17 @@ static void open_close_allocator(enum gnix_page_size page_size, + return; + } + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_create failed5."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif + } + + +@@ -264,8 +274,10 @@ static inline void __alloc_mbox(void) + *value is 4 because the provider has internally already opened + * an mbox allocator and 2 rdma slabs at this point. + */ ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + ret = _gnix_mbox_alloc(allocator, &mail_box); + cr_expect_eq(ret, FI_SUCCESS, "_gnix_mbox_alloc failed."); +@@ -307,8 +319,11 @@ static inline void __alloc_mbox(void) + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); + ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif ++ + } + + Test(mbox_creation_basic, alloc_mbox) +@@ -338,8 +353,10 @@ static inline void __page_size_fail(void) + *value is 3 because the provider has internally already opened + * an mbox allocator and two other slabs at this point. + */ ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "Huge page open, but shouldn't be"); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, -FI_EINVAL, +@@ -369,8 +386,10 @@ static inline void __mbox_size_fail(void) + "Creating allocator with zero mbox size succeeded."); + + cr_assert_eq(allocator, NULL); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "Huge page open, but shouldn't be"); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, -FI_EINVAL, +@@ -399,8 +418,10 @@ static inline void __mpmmap_size_fail(void) + cr_assert_eq(ret, -FI_EINVAL, + "Creating allocator with zero mailboxes per mmap succeeded."); + cr_assert_eq(allocator, NULL); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "Huge page open, but shouldn't be"); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, -FI_EINVAL, +@@ -428,8 +449,10 @@ static inline void __null_allocator_fail(void) + 1000, 100, NULL); + cr_assert_eq(ret, -FI_EINVAL, + "Creating allocator with null allocator succeeded."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "Huge page open, but shouldn't be"); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, -FI_EINVAL, +@@ -461,8 +484,10 @@ static inline void __multi_allocation(void) + ret = _gnix_mbox_allocator_create(ep_priv->nic, NULL, GNIX_PAGE_4MB, + mbox_size, array_size, &allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_create failed2."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + /* + * Create an array of mailboxes of size array_size. +@@ -501,8 +526,10 @@ static inline void __multi_allocation(void) + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); + ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif + } + + Test(mbox_creation_basic, multi_allocation) +@@ -527,8 +554,10 @@ static inline void __check_errors(void) + ret = _gnix_mbox_allocator_create(ep_priv->nic, NULL, GNIX_PAGE_4MB, + 1000, 12000, &allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_create failed3"); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + ret = _gnix_mbox_alloc(allocator, &mail_box); + cr_expect_eq(ret, FI_SUCCESS, "_gnix_mbox_alloc failed."); +@@ -565,8 +594,10 @@ static inline void __check_errors(void) + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); + ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif + } + + Test(mbox_creation_basic, check_errors) +@@ -598,8 +629,10 @@ static inline void __two_slabs(void) + ret = _gnix_mbox_allocator_create(ep_priv->nic, NULL, GNIX_PAGE_4MB, + mbox_size, mpmmap, &allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_create failed4."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + /* + * Should use previously allocated slab +@@ -633,8 +666,10 @@ static inline void __two_slabs(void) + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); + ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif + } + + Test(mbox_creation_basic, two_slabs) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/sep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/sep.c +index 05e01c7..6300242 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/sep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/sep.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Los Alamos National Security, LLC. ++ * Copyright (c) 2015-2018 Los Alamos National Security, LLC. + * All rights reserved. + * Copyright (c) 2015-2017 Cray Inc. All rights reserved. + * +@@ -1368,7 +1368,8 @@ void sep_read(int index, int len) + } + + cr_assert_eq(ret, 1); +- sep_check_tcqe(&cqe, (void *)READ_CTX, FI_RMA | FI_READ, 0, tx_ep[0][index]); ++ sep_check_tcqe(&cqe, (void *)READ_CTX, FI_RMA | FI_READ, 0, ++ tx_ep[0][index]); + + r[0] = 1; + sep_check_cntrs(w, r, w_e, r_e, false); +@@ -2146,6 +2147,68 @@ void sep_invalid_fetch_atomic(enum fi_datatype dt, enum fi_op op) + } + } + ++static void cancel_sep_send_sep(int index) ++{ ++ ssize_t ret, len = 16; ++ struct fi_cq_err_entry buf; ++ ++ sep_init_data(source, len, 0xab + index); ++ sep_init_data(target, len, 0); ++ ++ ret = fi_send(tx_ep[0][index], source, len, loc_mr[0], ++ rx_addr[index], target); ++ cr_assert(ret == 0, "fi_send failed err:%ld", ret); ++ ++ ret = fi_cancel(&tx_ep[0][index]->fid, target); ++ fprintf(stderr, "ret = %d %s\n", ret, fi_strerror(-ret)); ++ cr_assert(ret == FI_SUCCESS, "fi_cancel failed"); ++ ++ /* check for event */ ++ ret = fi_cq_readerr(tx_cq[0][index], &buf, FI_SEND); ++ cr_assert(ret == 1, "did not find one error event"); ++ ++ cr_assert(buf.buf == (void *) source, "buffer mismatch"); ++ cr_assert(buf.err == FI_ECANCELED, "error code mismatch"); ++ cr_assert(buf.prov_errno == FI_ECANCELED, "prov error code mismatch"); ++ cr_assert(buf.len == len, "length mismatch"); ++} ++ ++static void cancel_sep_recv_sep(int index) ++{ ++ ssize_t ret, len = 16; ++ struct fi_cq_err_entry buf; ++ ++ sep_init_data(source, len, 0xab + index); ++ sep_init_data(target, len, 0); ++ ++ ret = fi_recv(rx_ep[1][index], target, len, rem_mr[0], ++ FI_ADDR_UNSPEC, source); ++ cr_assert(ret == 0, "fi_recv failed err:%ld", ret); ++ ++ ret = fi_cancel(&rx_ep[1][index]->fid, source); ++ cr_assert(ret == FI_SUCCESS, "fi_cancel failed"); ++ ++ /* check for event */ ++ ret = fi_cq_readerr(rx_cq[1][index], &buf, FI_RECV); ++ cr_assert(ret == 1, "did not find one error event"); ++ ++ cr_assert(buf.buf == (void *) target, "buffer mismatch"); ++ cr_assert(buf.err == FI_ECANCELED, "error code mismatch"); ++ cr_assert(buf.prov_errno == FI_ECANCELED, "prov error code mismatch"); ++ cr_assert(buf.len == len, "length mismatch"); ++} ++ ++static void cancel_sep_no_event(int index) ++{ ++ ssize_t ret; ++ ++ ret = fi_cancel(&tx_ep[0][index]->fid, NULL); ++ cr_assert(ret == -FI_ENOENT, "fi_cancel failed"); ++ ++ ret = fi_cancel(&rx_ep[0][index]->fid, NULL); ++ cr_assert(ret == -FI_ENOENT, "fi_cancel failed"); ++} ++ + void run_tests(void) + { + int i, j; +@@ -2363,6 +2426,27 @@ void run_tests(void) + sep_invalid_fetch_atomic(j, i); + } + } ++ ++} ++ ++void run_cancel_tests(void) ++{ ++ int i; ++ ++ cr_log_info("cancel send test\n"); ++ for (i = 0; i < ctx_cnt; i++) { ++ cancel_sep_send_sep(i); ++ } ++ ++ cr_log_info("cancel recv test\n"); ++ for (i = 0; i < ctx_cnt; i++) { ++ cancel_sep_recv_sep(i); ++ } ++ ++ cr_log_info("cancel no event test\n"); ++ for (i = 0; i < ctx_cnt; i++) { ++ cancel_sep_no_event(i); ++ } + } + + TestSuite(scalablea, +@@ -2434,24 +2518,48 @@ Test(scalablem_basic, all) + run_tests(); + } + ++Test(scalablem_basic, cancel) ++{ ++ cr_log_info(BLUE "sep:basic:FI_AV_MAP cancel tests:\n" COLOR_RESET); ++ run_cancel_tests(); ++} ++ + Test(scalablet_basic, all) + { + cr_log_info(BLUE "sep:basic:FI_AV_TABLE tests:\n" COLOR_RESET); + run_tests(); + } + ++Test(scalablet_basic, cancel) ++{ ++ cr_log_info(BLUE "sep:basic:FI_AV_TABLE cancel tests:\n" COLOR_RESET); ++ run_cancel_tests(); ++} ++ + Test(scalablem_scalable, all) + { + cr_log_info(BLUE "sep:scalable:FI_AV_MAP tests:\n" COLOR_RESET); + run_tests(); + } + ++Test(scalablem_scalable, cancel) ++{ ++ cr_log_info(BLUE "sep:scalable:FI_AV_MAP cancel tests:\n" COLOR_RESET); ++ run_cancel_tests(); ++} ++ + Test(scalablet_scalable, all) + { + cr_log_info(BLUE "sep:scalable:FI_AV_TABLE tests:\n" COLOR_RESET); + run_tests(); + } + ++Test(scalablet_scalable, cancel) ++{ ++ cr_log_info(BLUE "sep:scalable:FI_AV_TABLE cancel tests:\n" COLOR_RESET); ++ run_cancel_tests(); ++} ++ + #define INSERT_ADDR_COUNT (NUMCONTEXTS + 6) + + /* test for inserting an ep_name that doesn't fit in the AV */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/Makefile.include +new file mode 100644 +index 0000000..89ce701 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/Makefile.include +@@ -0,0 +1,2 @@ ++src_libfabric_la_CPPFLAGS += -I$(top_srcdir)/prov/hook/include ++src_libfabric_la_SOURCES += prov/hook/include/hook_prov.h +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/include/hook_prov.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/include/hook_prov.h +new file mode 100644 +index 0000000..a70ae7c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/include/hook_prov.h +@@ -0,0 +1,26 @@ ++#ifndef HOOK_PROV_H ++#define HOOK_PROV_H ++ ++#include ++#include "ofi_hook.h" ++ ++int hook_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++int hook_control(struct fid *fid, int command, void *arg); ++int hook_ops_open(struct fid *fid, const char *name, ++ uint64_t flags, void **ops, void *context); ++int hook_close(struct fid *fid); ++ ++#if HAVE_PERF ++#include "hook_perf.h" ++#else ++#define perf_msg_ops hook_msg_ops ++#define perf_rma_ops hook_rma_ops ++#define perf_tagged_ops hook_tagged_ops ++#define perf_cntr_ops hook_cntr_ops ++#define perf_cq_ops hook_cq_ops ++ ++#define hook_perf_create hook_fabric_create ++#define hook_perf_destroy hook_fabric_destroy ++ ++#endif /* HAVE_PERF */ ++#endif /* HOOK_PROV_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/Makefile.include +new file mode 100644 +index 0000000..65e58b9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/Makefile.include +@@ -0,0 +1,13 @@ ++if HAVE_PERF ++_perfhook_files = \ ++ prov/hook/perf/src/hook_perf.c ++ ++_perfhook_headers = \ ++ prov/hook/perf/include/hook_perf.h ++ ++ ++src_libfabric_la_SOURCES += $(_perfhook_files) \ ++ $(_perfhook_headers) ++src_libfabric_la_CPPFLAGS += -I$(top_srcdir)/prov/hook/perf/include ++src_libfabric_la_LIBADD += $(perfhook_shm_LIBS) ++endif HAVE_PERF +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/configure.m4 +new file mode 100644 +index 0000000..82befb0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/configure.m4 +@@ -0,0 +1,21 @@ ++dnl Configury specific to the libfabrics perf hooking provider ++ ++dnl Called to configure this provider ++dnl ++dnl Arguments: ++dnl ++dnl $1: action if configured successfully ++dnl $2: action if not configured successfully ++dnl ++ ++AC_DEFUN([FI_PERF_CONFIGURE],[ ++ # Determine if we can support the perf hooking provider ++ perf_happy=0 ++ AS_IF([test x"$enable_perf" != x"no"], [perf_happy=1]) ++ AS_IF([test x"$perf_dl" == x"1"], [ ++ perf_happy=0 ++ AC_MSG_ERROR([perf provider cannot be compiled as DL]) ++ ]) ++ AS_IF([test $perf_happy -eq 1], [$1], [$2]) ++ ++]) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/include/hook_perf.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/include/hook_perf.h +new file mode 100644 +index 0000000..56625a8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/include/hook_perf.h +@@ -0,0 +1,105 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL); Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _HOOK_PERF_H_ ++#define _HOOK_PERF_H_ ++ ++#include "ofi_hook.h" ++#include "ofi.h" ++#include "ofi_perf.h" ++ ++ ++struct perf_fabric { ++ struct hook_fabric fabric_hook; ++ struct ofi_perfset perf_set; ++}; ++ ++int perf_hook_destroy(struct fid *fabric); ++ ++ ++#define HOOK_FOREACH(DECL) \ ++ DECL(perf_recv), \ ++ DECL(perf_recvv), \ ++ DECL(perf_recvmsg), \ ++ DECL(perf_send), \ ++ DECL(perf_sendv), \ ++ DECL(perf_sendmsg), \ ++ DECL(perf_inject), \ ++ DECL(perf_senddata), \ ++ DECL(perf_injectdata), \ ++ DECL(perf_read), \ ++ DECL(perf_readv), \ ++ DECL(perf_readmsg), \ ++ DECL(perf_write), \ ++ DECL(perf_writev), \ ++ DECL(perf_writemsg), \ ++ DECL(perf_inject_write), \ ++ DECL(perf_writedata), \ ++ DECL(perf_inject_writedata), \ ++ DECL(perf_trecv), \ ++ DECL(perf_trecvv), \ ++ DECL(perf_trecvmsg), \ ++ DECL(perf_tsend), \ ++ DECL(perf_tsendv), \ ++ DECL(perf_tsendmsg), \ ++ DECL(perf_tinject), \ ++ DECL(perf_tsenddata), \ ++ DECL(perf_tinjectdata), \ ++ DECL(perf_cq_read), \ ++ DECL(perf_cq_readfrom), \ ++ DECL(perf_cq_readerr), \ ++ DECL(perf_cq_sread), \ ++ DECL(perf_cq_sreadfrom), \ ++ DECL(perf_cq_signal), \ ++ DECL(perf_cntr_read), \ ++ DECL(perf_cntr_readerr), \ ++ DECL(perf_cntr_add), \ ++ DECL(perf_cntr_set), \ ++ DECL(perf_cntr_wait), \ ++ DECL(perf_cntr_adderr), \ ++ DECL(perf_cntr_seterr), \ ++ DECL(perf_size) ++ ++enum perf_counters { ++ HOOK_FOREACH(OFI_ENUM_VAL) ++}; ++ ++extern const char *perf_counters_str[]; ++ ++extern struct fi_ops_msg perf_msg_ops; ++extern struct fi_ops_rma perf_rma_ops; ++extern struct fi_ops_tagged perf_tagged_ops; ++extern struct fi_ops_cq perf_cq_ops; ++extern struct fi_ops_cntr perf_cntr_ops; ++ ++ ++#endif /* _HOOK_PERF_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/src/hook_perf.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/src/hook_perf.c +new file mode 100644 +index 0000000..154f163 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/src/hook_perf.c +@@ -0,0 +1,904 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "ofi_perf.h" ++#include "ofi_prov.h" ++#include "hook_prov.h" ++ ++ ++const char *perf_counters_str[] = { ++ HOOK_FOREACH(OFI_STR) ++}; ++ ++ ++static inline struct ofi_perfset *perf_set(struct hook_ep *ep) ++{ ++ return &container_of(ep->domain->fabric, struct perf_fabric, ++ fabric_hook)->perf_set; ++} ++ ++static inline struct ofi_perfset *perf_set_cq(struct hook_cq *cq) ++{ ++ return &container_of(cq->domain->fabric, struct perf_fabric, ++ fabric_hook)->perf_set; ++} ++ ++static inline struct ofi_perfset *perf_set_cntr(struct hook_cntr *cntr) ++{ ++ return &container_of(cntr->domain->fabric, struct perf_fabric, ++ fabric_hook)->perf_set; ++} ++ ++/* ++static ssize_t ++perf_atomic_write(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_atomic(myep->hep, buf, count, desc, dest_addr, ++ addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_writev(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_atomicv(myep->hep, iov, desc, count, dest_addr, ++ addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_writemsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_atomicmsg(myep->hep, msg, flags); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_inject(struct fid_ep *ep, const void *buf, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_inject_atomic(myep->hep, buf, count, dest_addr, ++ addr, key, datatype, op); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_readwrite(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_fetch_atomic(myep->hep, buf, count, desc, ++ result, result_desc, dest_addr, ++ addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_readwritev(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_fetch_atomicv(myep->hep, iov, desc, count, ++ resultv, result_desc, result_count, ++ dest_addr, addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_readwritemsg(struct fid_ep *ep, const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_fetch_atomicmsg(myep->hep, msg, resultv, result_desc, ++ result_count, flags); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_compwrite(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ const void *compare, void *compare_desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_compare_atomic(myep->hep, buf, count, desc, ++ compare, compare_desc, result, result_desc, ++ dest_addr, addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_compwritev(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_compare_atomicv(myep->hep, iov, desc, count, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, result_count, dest_addr, ++ addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_compwritemsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_compare_atomicmsg(myep->hep, msg, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, result_count, flags); ++ return ret; ++} ++ ++static int ++perf_atomic_writevalid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_atomicvalid(myep->hep, datatype, op, count); ++ return ret; ++} ++ ++static int ++perf_atomic_readwritevalid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_fetch_atomicvalid(myep->hep, datatype, op, count); ++ return ret; ++} ++ ++static int ++perf_atomic_compwritevalid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_compare_atomicvalid(myep->hep, datatype, op, count); ++ return ret; ++} ++ ++struct fi_ops_atomic perf_atomic_ops = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = perf_atomic_write, ++ .writev = perf_atomic_writev, ++ .writemsg = perf_atomic_writemsg, ++ .inject = perf_atomic_inject, ++ .readwrite = perf_atomic_readwrite, ++ .readwritev = perf_atomic_readwritev, ++ .readwritemsg = perf_atomic_readwritemsg, ++ .compwrite = perf_atomic_compwrite, ++ .compwritev = perf_atomic_compwritev, ++ .compwritemsg = perf_atomic_compwritemsg, ++ .writevalid = perf_atomic_writevalid, ++ .readwritevalid = perf_atomic_readwritevalid, ++ .compwritevalid = perf_atomic_compwritevalid, ++}; ++*/ ++ ++ ++static ssize_t ++perf_msg_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_recv); ++ ret = fi_recv(myep->hep, buf, len, desc, src_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_recv); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_recvv); ++ ret = fi_recvv(myep->hep, iov, desc, count, src_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_recvv); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_recvmsg); ++ ret = fi_recvmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_recvmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_send); ++ ret = fi_send(myep->hep, buf, len, desc, dest_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_send); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_sendv); ++ ret = fi_sendv(myep->hep, iov, desc, count, dest_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_sendv); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_sendmsg); ++ ret = fi_sendmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_sendmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_inject(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_inject); ++ ret = fi_inject(myep->hep, buf, len, dest_addr); ++ ofi_perfset_end(perf_set(myep), perf_inject); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_senddata); ++ ret = fi_senddata(myep->hep, buf, len, desc, data, dest_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_senddata); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_injectdata); ++ ret = fi_injectdata(myep->hep, buf, len, data, dest_addr); ++ ofi_perfset_end(perf_set(myep), perf_injectdata); ++ return ret; ++} ++ ++struct fi_ops_msg perf_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = perf_msg_recv, ++ .recvv = perf_msg_recvv, ++ .recvmsg = perf_msg_recvmsg, ++ .send = perf_msg_send, ++ .sendv = perf_msg_sendv, ++ .sendmsg = perf_msg_sendmsg, ++ .inject = perf_msg_inject, ++ .senddata = perf_msg_senddata, ++ .injectdata = perf_msg_injectdata, ++}; ++ ++ ++static ssize_t ++perf_rma_read(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_read); ++ ret = fi_read(myep->hep, buf, len, desc, src_addr, addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_read); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_readv); ++ ret = fi_readv(myep->hep, iov, desc, count, src_addr, ++ addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_readv); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_readmsg); ++ ret = fi_readmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_readmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_write(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_write); ++ ret = fi_write(myep->hep, buf, len, desc, dest_addr, ++ addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_write); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_writev(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_writev); ++ ret = fi_writev(myep->hep, iov, desc, count, dest_addr, ++ addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_writev); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_writemsg); ++ ret = fi_writemsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_writemsg); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_inject(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_inject_write); ++ ret = fi_inject_write(myep->hep, buf, len, dest_addr, addr, key); ++ ofi_perfset_end(perf_set(myep), perf_inject_write); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_writedata); ++ ret = fi_writedata(myep->hep, buf, len, desc, data, ++ dest_addr, addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_writedata); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_inject_writedata); ++ ret = fi_inject_writedata(myep->hep, buf, len, data, dest_addr, ++ addr, key); ++ ofi_perfset_end(perf_set(myep), perf_inject_writedata); ++ return ret; ++} ++ ++struct fi_ops_rma perf_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = perf_rma_read, ++ .readv = perf_rma_readv, ++ .readmsg = perf_rma_readmsg, ++ .write = perf_rma_write, ++ .writev = perf_rma_writev, ++ .writemsg = perf_rma_writemsg, ++ .inject = perf_rma_inject, ++ .writedata = perf_rma_writedata, ++ .injectdata = perf_rma_injectdata, ++}; ++ ++ ++static ssize_t ++perf_tagged_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t tag, uint64_t ignore, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_trecv); ++ ret = fi_trecv(myep->hep, buf, len, desc, src_addr, ++ tag, ignore, context); ++ ofi_perfset_end(perf_set(myep), perf_trecv); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t tag, ++ uint64_t ignore, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_trecvv); ++ ret = fi_trecvv(myep->hep, iov, desc, count, src_addr, ++ tag, ignore, context); ++ ofi_perfset_end(perf_set(myep), perf_trecvv); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_recvmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_trecvmsg); ++ ret = fi_trecvmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_trecvmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t tag, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tsend); ++ ret = fi_tsend(myep->hep, buf, len, desc, dest_addr, tag, context); ++ ofi_perfset_end(perf_set(myep), perf_tsend); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t tag, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tsendv); ++ ret = fi_tsendv(myep->hep, iov, desc, count, dest_addr, tag, context); ++ ofi_perfset_end(perf_set(myep), perf_tsendv); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_sendmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tsendmsg); ++ ret = fi_tsendmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_tsendmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_inject(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tinject); ++ ret = fi_tinject(myep->hep, buf, len, dest_addr, tag); ++ ofi_perfset_end(perf_set(myep), perf_tinject); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tsenddata); ++ ret = fi_tsenddata(myep->hep, buf, len, desc, data, ++ dest_addr, tag, context); ++ ofi_perfset_end(perf_set(myep), perf_tsenddata); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tinjectdata); ++ ret = fi_tinjectdata(myep->hep, buf, len, data, dest_addr, tag); ++ ofi_perfset_end(perf_set(myep), perf_tinjectdata); ++ return ret; ++} ++ ++struct fi_ops_tagged perf_tagged_ops = { ++ .size = sizeof(struct fi_ops_tagged), ++ .recv = perf_tagged_recv, ++ .recvv = perf_tagged_recvv, ++ .recvmsg = perf_tagged_recvmsg, ++ .send = perf_tagged_send, ++ .sendv = perf_tagged_sendv, ++ .sendmsg = perf_tagged_sendmsg, ++ .inject = perf_tagged_inject, ++ .senddata = perf_tagged_senddata, ++ .injectdata = perf_tagged_injectdata, ++}; ++ ++ ++static ssize_t perf_cq_read_op(struct fid_cq *cq, void *buf, size_t count) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_read); ++ ret = fi_cq_read(mycq->hcq, buf, count); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_read); ++ return ret; ++} ++ ++static ssize_t ++perf_cq_readerr_op(struct fid_cq *cq, struct fi_cq_err_entry *buf, uint64_t flags) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_readerr); ++ ret = fi_cq_readerr(mycq->hcq, buf, flags); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_readerr); ++ return ret; ++} ++ ++static ssize_t ++perf_cq_readfrom_op(struct fid_cq *cq, void *buf, size_t count, fi_addr_t *src_addr) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_readfrom); ++ ret = fi_cq_readfrom(mycq->hcq, buf, count, src_addr); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_readfrom); ++ return ret; ++} ++ ++static ssize_t ++perf_cq_sread_op(struct fid_cq *cq, void *buf, size_t count, ++ const void *cond, int timeout) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_sread); ++ ret = fi_cq_sread(mycq->hcq, buf, count, cond, timeout); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_sread); ++ return ret; ++} ++ ++static ssize_t ++perf_cq_sreadfrom_op(struct fid_cq *cq, void *buf, size_t count, ++ fi_addr_t *src_addr, const void *cond, int timeout) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_sreadfrom); ++ ret = fi_cq_sreadfrom(mycq->hcq, buf, count, src_addr, cond, timeout); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_sreadfrom); ++ return ret; ++} ++ ++static int perf_cq_signal_op(struct fid_cq *cq) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_signal); ++ ret = fi_cq_signal(mycq->hcq); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_signal); ++ return ret; ++} ++ ++struct fi_ops_cq perf_cq_ops = { ++ .size = sizeof(struct fi_ops_cq), ++ .read = perf_cq_read_op, ++ .readfrom = perf_cq_readfrom_op, ++ .readerr = perf_cq_readerr_op, ++ .sread = perf_cq_sread_op, ++ .sreadfrom = perf_cq_sreadfrom_op, ++ .signal = perf_cq_signal_op, ++ .strerror = hook_cq_strerror, ++}; ++ ++ ++static uint64_t perf_cntr_read_op(struct fid_cntr *cntr) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ uint64_t ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_read); ++ ret = fi_cntr_read(mycntr->hcntr); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_read); ++ return ret; ++} ++ ++static uint64_t perf_cntr_readerr_op(struct fid_cntr *cntr) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ uint64_t ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_readerr); ++ ret = fi_cntr_readerr(mycntr->hcntr); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_readerr); ++ return ret; ++} ++ ++static int perf_cntr_add_op(struct fid_cntr *cntr, uint64_t value) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_add); ++ ret = fi_cntr_add(mycntr->hcntr, value); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_add); ++ return ret; ++} ++ ++static int perf_cntr_set_op(struct fid_cntr *cntr, uint64_t value) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_set); ++ ret = fi_cntr_set(mycntr->hcntr, value); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_set); ++ return ret; ++} ++ ++static int perf_cntr_wait_op(struct fid_cntr *cntr, uint64_t threshold, int timeout) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_wait); ++ ret = fi_cntr_wait(mycntr->hcntr, threshold, timeout); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_wait); ++ return ret; ++} ++ ++static int perf_cntr_adderr_op(struct fid_cntr *cntr, uint64_t value) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_adderr); ++ ret = fi_cntr_adderr(mycntr->hcntr, value); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_adderr); ++ return ret; ++} ++ ++static int perf_cntr_seterr_op(struct fid_cntr *cntr, uint64_t value) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_seterr); ++ ret = fi_cntr_seterr(mycntr->hcntr, value); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_seterr); ++ return ret; ++} ++ ++struct fi_ops_cntr perf_cntr_ops = { ++ .size = sizeof(struct fi_ops_cntr), ++ .read = perf_cntr_read_op, ++ .readerr = perf_cntr_readerr_op, ++ .add = perf_cntr_add_op, ++ .set = perf_cntr_set_op, ++ .wait = perf_cntr_wait_op, ++ .adderr = perf_cntr_adderr_op, ++ .seterr = perf_cntr_seterr_op, ++}; ++ ++ ++static struct fi_ops perf_fabric_fid_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = perf_hook_destroy, ++ .bind = hook_bind, ++ .control = hook_control, ++ .ops_open = hook_ops_open, ++}; ++ ++int perf_hook_destroy(struct fid *fid) ++{ ++ struct perf_fabric *fab; ++ ++ fab = container_of(fid, struct perf_fabric, fabric_hook); ++ ofi_perfset_log(&fab->perf_set, perf_counters_str); ++ ofi_perfset_close(&fab->perf_set); ++ hook_close(fid); ++ ++ return FI_SUCCESS; ++} ++ ++static int perf_hook_fabric(struct fi_fabric_attr *attr, ++ struct fid_fabric **fabric, void *context) ++{ ++ struct fi_provider *hprov = context; ++ struct perf_fabric *fab; ++ int ret; ++ ++ FI_TRACE(hprov, FI_LOG_FABRIC, "Installing perf hook\n"); ++ fab = calloc(1, sizeof *fab); ++ if (!fab) ++ return -FI_ENOMEM; ++ ++ ret = ofi_perfset_create(hprov, &fab->perf_set, perf_size, ++ perf_domain, perf_cntr, perf_flags); ++ if (ret) { ++ free(fab); ++ return ret; ++ } ++ ++ hook_fabric_init(&fab->fabric_hook, HOOK_PERF, attr->fabric, hprov, ++ &perf_fabric_fid_ops); ++ *fabric = &fab->fabric_hook.fabric; ++ return 0; ++} ++ ++struct fi_provider perf_hook_prov = { ++ .version = FI_VERSION(1,0), ++ /* We're a pass-through provider, so the fi_version is always the latest */ ++ .fi_version = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION), ++ .name = "ofi_perf_hook", ++ .getinfo = NULL, ++ .fabric = perf_hook_fabric, ++ .cleanup = NULL, ++}; ++ ++PERF_HOOK_INI ++{ ++ return &perf_hook_prov; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.c +index 3c097d6..05015d9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.c +@@ -33,7 +33,15 @@ + #include + #include + #include +-#include "hook.h" ++#include ++#include ++ ++#include "ofi_hook.h" ++#include "ofi_prov.h" ++ ++ ++static char **hooks; ++static size_t hook_cnt; + + + struct fid *hook_to_hfid(const struct fid *fid) +@@ -80,12 +88,17 @@ struct fid *hook_to_hfid(const struct fid *fid) + return &(container_of(fid, struct hook_mr, mr.fid)-> + hmr->fid); + default: +- assert(0); + return NULL; + } + } + +-static int hook_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++struct fid_wait *hook_to_hwait(const struct fid_wait *wait) ++{ ++ return container_of(wait, struct hook_wait, wait)->hwait; ++} ++ ++ ++int hook_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct fid *hfid, *hbfid; + +@@ -97,7 +110,7 @@ static int hook_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + return hfid->ops->bind(hfid, hbfid, flags); + } + +-static int hook_control(struct fid *fid, int command, void *arg) ++int hook_control(struct fid *fid, int command, void *arg) + { + struct fid *hfid; + +@@ -108,7 +121,7 @@ static int hook_control(struct fid *fid, int command, void *arg) + return hfid->ops->control(hfid, command, arg); + } + +-static int hook_ops_open(struct fid *fid, const char *name, ++int hook_ops_open(struct fid *fid, const char *name, + uint64_t flags, void **ops, void *context) + { + struct fid *hfid; +@@ -120,7 +133,7 @@ static int hook_ops_open(struct fid *fid, const char *name, + return hfid->ops->ops_open(hfid, name, flags, ops, context); + } + +-static int hook_close(struct fid *fid) ++int hook_close(struct fid *fid) + { + struct fid *hfid; + int ret; +@@ -135,6 +148,7 @@ static int hook_close(struct fid *fid) + return ret; + } + ++ + struct fi_ops hook_fid_ops = { + .size = sizeof(struct fi_ops), + .close = hook_close, +@@ -143,6 +157,14 @@ struct fi_ops hook_fid_ops = { + .ops_open = hook_ops_open, + }; + ++static struct fi_ops hook_fabric_fid_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = hook_close, ++ .bind = hook_bind, ++ .control = hook_control, ++ .ops_open = hook_ops_open, ++}; ++ + static struct fi_ops_fabric hook_fabric_ops = { + .size = sizeof(struct fi_ops_fabric), + .domain = hook_domain, +@@ -152,22 +174,104 @@ static struct fi_ops_fabric hook_fabric_ops = { + .trywait = hook_trywait, + }; + +-int hook_fabric(struct fid_fabric *hfabric, struct fid_fabric **fabric) ++void hook_fabric_init(struct hook_fabric *fabric, enum ofi_hook_class hclass, ++ struct fid_fabric *hfabric, struct fi_provider *hprov, ++ struct fi_ops *f_ops) + { ++ fabric->hclass = hclass; ++ fabric->hfabric = hfabric; ++ fabric->prov = hprov; ++ fabric->fabric.fid.fclass = FI_CLASS_FABRIC; ++ fabric->fabric.fid.context = hfabric->fid.context; ++ fabric->fabric.fid.ops = f_ops; ++ fabric->fabric.api_version = hfabric->api_version; ++ fabric->fabric.ops = &hook_fabric_ops; ++ ++ hfabric->fid.context = fabric; ++} ++ ++static int noop_hook_fabric(struct fi_fabric_attr *attr, ++ struct fid_fabric **fabric, void *context) ++{ ++ struct fi_provider *hprov = context; + struct hook_fabric *fab; + ++ FI_TRACE(hprov, FI_LOG_FABRIC, "Installing noop hook\n"); + fab = calloc(1, sizeof *fab); + if (!fab) + return -FI_ENOMEM; + +- fab->fabric.fid.fclass = FI_CLASS_FABRIC; +- fab->fabric.fid.context = hfabric->fid.context; +- fab->fabric.fid.ops = &hook_fid_ops; +- fab->fabric.api_version = hfabric->api_version; +- fab->fabric.ops = &hook_fabric_ops; +- +- hfabric->fid.context = fab; ++ hook_fabric_init(fab, HOOK_NOOP, attr->fabric, hprov, ++ &hook_fabric_fid_ops); + *fabric = &fab->fabric; +- + return 0; + } ++ ++struct fi_provider noop_hook_prov = { ++ .version = FI_VERSION(1,0), ++ /* We're a pass-through provider, so the fi_version is always the latest */ ++ .fi_version = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION), ++ .name = "ofi_noop_hook", ++ .getinfo = NULL, ++ .fabric = noop_hook_fabric, ++ .cleanup = NULL, ++}; ++ ++NOOP_HOOK_INI ++{ ++ return &noop_hook_prov; ++} ++ ++/* ++ * Call the fabric() interface of the hooking provider. We pass in the ++ * fabric being hooked via the fabric attributes and the corresponding ++ * fi_provider structure as the context. ++ */ ++void ofi_hook_install(struct fid_fabric *hfabric, struct fid_fabric **fabric, ++ struct fi_provider *prov) ++{ ++ struct fi_provider *hook_prov; ++ struct fi_fabric_attr attr; ++ int i, ret; ++ ++ *fabric = hfabric; ++ if (!hook_cnt || !hooks) ++ return; ++ ++ memset(&attr, 0, sizeof attr); ++ ++ for (i = 0; i < hook_cnt; i++) { ++ hook_prov = ofi_get_hook(hooks[i]); ++ if (!hook_prov) ++ continue; ++ ++ attr.fabric = hfabric; ++ ret = hook_prov->fabric(&attr, fabric, prov); ++ if (ret) ++ continue; ++ ++ hfabric = *fabric; ++ } ++} ++ ++void ofi_hook_init(void) ++{ ++ char *param_val = NULL; ++ ++ fi_param_define(NULL, "hook", FI_PARAM_STRING, ++ "Intercept calls to underlying provider and apply " ++ "the specified functionality to them. Hook option: " ++ "perf (gather performance data)"); ++ fi_param_get_str(NULL, "hook", ¶m_val); ++ ++ if (!param_val) ++ return; ++ ++ hooks = ofi_split_and_alloc(param_val, ";", &hook_cnt); ++} ++ ++void ofi_hook_fini(void) ++{ ++ if (hooks) ++ ofi_free_string_array(hooks); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.h +deleted file mode 100644 +index 43f83b1..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.h ++++ /dev/null +@@ -1,173 +0,0 @@ +-/* +- * Copyright (c) 2018 Intel Corporation. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL); Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _OFI_HOOK_H_ +-#define _OFI_HOOK_H_ +- +-#include +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +- +-/* +- * Define hook structs so we can cast from fid to parent using simple cast. +- * This lets us have a single close() call. +- */ +- +-extern struct fi_ops hook_fid_ops; +-struct fid *hook_to_hfid(const struct fid *fid); +- +-struct hook_fabric { +- struct fid_fabric fabric; +- struct fid_fabric *hfabric; +-}; +- +-int hook_fabric(struct fid_fabric *hfabric, struct fid_fabric **fabric); +- +- +-struct hook_domain { +- struct fid_domain domain; +- struct fid_domain *hdomain; +-}; +- +-int hook_domain(struct fid_fabric *fabric, struct fi_info *info, +- struct fid_domain **domain, void *context); +- +- +-struct hook_av { +- struct fid_av av; +- struct fid_av *hav; +-}; +- +-int hook_av_open(struct fid_domain *domain, struct fi_av_attr *attr, +- struct fid_av **av, void *context); +- +- +-struct hook_wait { +- struct fid_wait wait; +- struct fid_wait *hwait; +-}; +- +-int hook_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, +- struct fid_wait **waitset); +-int hook_trywait(struct fid_fabric *fabric, struct fid **fids, int count); +- +- +-struct hook_poll { +- struct fid_poll poll; +- struct fid_poll *hpoll; +-}; +- +-int hook_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, +- struct fid_poll **pollset); +- +- +-struct hook_eq { +- struct fid_eq eq; +- struct fid_eq *heq; +-}; +- +-int hook_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, +- struct fid_eq **eq, void *context); +- +- +-struct hook_cq { +- struct fid_cq cq; +- struct fid_cq *hcq; +-}; +- +-int hook_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq, void *context); +- +- +-struct hook_cntr { +- struct fid_cntr cntr; +- struct fid_cntr *hcntr; +-}; +- +-int hook_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, +- struct fid_cntr **cntr, void *context); +- +- +-struct hook_ep { +- struct fid_ep ep; +- struct fid_ep *hep; +-}; +- +-int hook_endpoint(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep, void *context); +-int hook_scalable_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **sep, void *context); +-int hook_srx_ctx(struct fid_domain *domain, +- struct fi_rx_attr *attr, struct fid_ep **rx_ep, +- void *context); +- +-extern struct fi_ops_cm hook_cm_ops; +-extern struct fi_ops_msg hook_msg_ops; +-extern struct fi_ops_rma hook_rma_ops; +-extern struct fi_ops_tagged hook_tagged_ops; +-extern struct fi_ops_atomic hook_atomic_ops; +- +- +-struct hook_pep { +- struct fid_pep pep; +- struct fid_pep *hpep; +-}; +- +-int hook_passive_ep(struct fid_fabric *fabric, struct fi_info *info, +- struct fid_pep **pep, void *context); +- +- +-struct hook_stx { +- struct fid_stx stx; +- struct fid_stx *hstx; +-}; +- +-int hook_stx_ctx(struct fid_domain *domain, +- struct fi_tx_attr *attr, struct fid_stx **stx, +- void *context); +- +- +-struct hook_mr { +- struct fid_mr mr; +- struct fid_mr *hmr; +-}; +- +- +-#endif /* _OFI_HOOK_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_av.c +index ddde273..c57df17 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_av.c +@@ -31,7 +31,7 @@ + */ + + #include +-#include "hook.h" ++#include "ofi_hook.h" + + + static int +@@ -112,6 +112,7 @@ int hook_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + if (!myav) + return -FI_ENOMEM; + ++ myav->domain = dom; + myav->av.fid.fclass = FI_CLASS_AV; + myav->av.fid.context = context; + myav->av.fid.ops = &hook_fid_ops; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cm.c +index 071f9a4..124ef38 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cm.c +@@ -30,7 +30,7 @@ + * SOFTWARE. + */ + +-#include "hook.h" ++#include "ofi_hook.h" + + + static int hook_setname(fid_t fid, void *addr, size_t addrlen) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cntr.c +index 3d7a9f9..781bc94 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cntr.c +@@ -31,7 +31,7 @@ + */ + + #include +-#include "hook.h" ++#include "hook_prov.h" + + + static uint64_t hook_cntr_read(struct fid_cntr *cntr) +@@ -99,18 +99,32 @@ int hook_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + { + struct hook_domain *dom = container_of(domain, struct hook_domain, domain); + struct hook_cntr *mycntr; ++ struct fi_cntr_attr hattr; + int ret; + + mycntr = calloc(1, sizeof *mycntr); + if (!mycntr) + return -FI_ENOMEM; + ++ mycntr->domain = dom; + mycntr->cntr.fid.fclass = FI_CLASS_CNTR; + mycntr->cntr.fid.context = context; + mycntr->cntr.fid.ops = &hook_fid_ops; +- mycntr->cntr.ops = &hook_cntr_ops; + +- ret = fi_cntr_open(dom->hdomain, attr, &mycntr->hcntr, ++ switch (dom->fabric->hclass) { ++ case HOOK_PERF: ++ mycntr->cntr.ops = &perf_cntr_ops; ++ break; ++ default: ++ mycntr->cntr.ops = &hook_cntr_ops; ++ break; ++ } ++ ++ hattr = *attr; ++ if (attr->wait_obj == FI_WAIT_SET) ++ hattr.wait_set = hook_to_hwait(attr->wait_set); ++ ++ ret = fi_cntr_open(dom->hdomain, &hattr, &mycntr->hcntr, + &mycntr->cntr.fid); + if (ret) + free(mycntr); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cq.c +index a23c722..fb3bb83 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cq.c +@@ -31,7 +31,7 @@ + */ + + #include +-#include "hook.h" ++#include "hook_prov.h" + + + static ssize_t hook_cq_read(struct fid_cq *cq, void *buf, size_t count) +@@ -82,7 +82,7 @@ static int hook_cq_signal(struct fid_cq *cq) + return fi_cq_signal(mycq->hcq); + } + +-static const char * ++const char * + hook_cq_strerror(struct fid_cq *cq, int prov_errno, + const void *err_data, char *buf, size_t len) + { +@@ -107,18 +107,32 @@ int hook_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + { + struct hook_domain *dom = container_of(domain, struct hook_domain, domain); + struct hook_cq *mycq; ++ struct fi_cq_attr hattr; + int ret; + + mycq = calloc(1, sizeof *mycq); + if (!mycq) + return -FI_ENOMEM; + ++ mycq->domain = dom; + mycq->cq.fid.fclass = FI_CLASS_CQ; + mycq->cq.fid.context = context; + mycq->cq.fid.ops = &hook_fid_ops; +- mycq->cq.ops = &hook_cq_ops; + +- ret = fi_cq_open(dom->hdomain, attr, &mycq->hcq, &mycq->cq.fid); ++ switch (dom->fabric->hclass) { ++ case HOOK_PERF: ++ mycq->cq.ops = &perf_cq_ops; ++ break; ++ default: ++ mycq->cq.ops = &hook_cq_ops; ++ break; ++ } ++ ++ hattr = *attr; ++ if (attr->wait_obj == FI_WAIT_SET) ++ hattr.wait_set = hook_to_hwait(attr->wait_set); ++ ++ ret = fi_cq_open(dom->hdomain, &hattr, &mycq->hcq, &mycq->cq.fid); + if (ret) + free(mycq); + else +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_domain.c +index e4519a6..0470666 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_domain.c +@@ -32,7 +32,7 @@ + + #include + #include +-#include "hook.h" ++#include "ofi_hook.h" + + + static int hook_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, +@@ -46,6 +46,7 @@ static int hook_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, + if (!mymr) + return -FI_ENOMEM; + ++ mymr->domain = dom; + mymr->mr.fid.fclass = FI_CLASS_MR; + mymr->mr.fid.context = attr->context; + mymr->mr.fid.ops = &hook_fid_ops; +@@ -135,6 +136,7 @@ int hook_domain(struct fid_fabric *fabric, struct fi_info *info, + if (!dom) + return -FI_ENOMEM; + ++ dom->fabric = fab; + dom->domain.fid.fclass = FI_CLASS_DOMAIN; + dom->domain.fid.context = context; + dom->domain.fid.ops = &hook_fid_ops; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_ep.c +index 8916cb5..655a1b4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_ep.c +@@ -32,7 +32,7 @@ + + #include + #include +-#include "hook.h" ++#include "hook_prov.h" + + + static int hook_open_tx_ctx(struct fid_ep *sep, int index, +@@ -86,16 +86,27 @@ static struct fi_ops_ep hook_ep_ops = { + }; + + +-static void hook_setup_ep(struct fid_ep *ep, int fclass, void *context) ++static void hook_setup_ep(enum ofi_hook_class hclass, struct fid_ep *ep, ++ int fclass, void *context) + { + ep->fid.fclass = fclass; + ep->fid.context = context; + ep->fid.ops = &hook_fid_ops; + ep->ops = &hook_ep_ops; + ep->cm = &hook_cm_ops; +- ep->msg = &hook_msg_ops; +- ep->rma = &hook_rma_ops; +- ep->tagged = &hook_tagged_ops; ++ ++ switch (hclass) { ++ case HOOK_PERF: ++ ep->msg = &perf_msg_ops; ++ ep->rma = &perf_rma_ops; ++ ep->tagged = &perf_tagged_ops; ++ break; ++ default: ++ ep->msg = &hook_msg_ops; ++ ep->rma = &hook_rma_ops; ++ ep->tagged = &hook_tagged_ops; ++ break; ++ } + ep->atomic = &hook_atomic_ops; + } + +@@ -110,7 +121,8 @@ int hook_scalable_ep(struct fid_domain *domain, struct fi_info *info, + if (!mysep) + return -FI_ENOMEM; + +- hook_setup_ep(&mysep->ep, FI_CLASS_SEP, context); ++ mysep->domain = dom; ++ hook_setup_ep(dom->fabric->hclass, &mysep->ep, FI_CLASS_SEP, context); + ret = fi_scalable_ep(dom->hdomain, info, &mysep->hep, &mysep->ep.fid); + if (ret) + free(mysep); +@@ -132,6 +144,7 @@ int hook_stx_ctx(struct fid_domain *domain, + if (!mystx) + return -FI_ENOMEM; + ++ mystx->domain = dom; + mystx->stx.fid.fclass = FI_CLASS_STX_CTX; + mystx->stx.fid.context = context; + mystx->stx.fid.ops = &hook_fid_ops; +@@ -157,7 +170,8 @@ int hook_srx_ctx(struct fid_domain *domain, struct fi_rx_attr *attr, + if (!srx) + return -FI_ENOMEM; + +- hook_setup_ep(&srx->ep, FI_CLASS_SRX_CTX, context); ++ srx->domain = dom; ++ hook_setup_ep(dom->fabric->hclass, &srx->ep, FI_CLASS_SRX_CTX, context); + ret = fi_srx_context(dom->hdomain, attr, &srx->hep, &srx->ep.fid); + if (ret) + free(srx); +@@ -179,7 +193,9 @@ static int hook_open_tx_ctx(struct fid_ep *sep, int index, + if (!mytx) + return -FI_ENOMEM; + +- hook_setup_ep(&mytx->ep, FI_CLASS_TX_CTX, context); ++ mytx->domain = mysep->domain; ++ hook_setup_ep(mysep->domain->fabric->hclass, &mytx->ep, ++ FI_CLASS_TX_CTX, context); + ret = fi_tx_context(mysep->hep, index, attr, &mytx->hep, &mytx->ep.fid); + if (ret) + free(mytx); +@@ -201,7 +217,9 @@ static int hook_open_rx_ctx(struct fid_ep *sep, int index, + if (!myrx) + return -FI_ENOMEM; + +- hook_setup_ep(&myrx->ep, FI_CLASS_RX_CTX, context); ++ myrx->domain = mysep->domain; ++ hook_setup_ep(mysep->domain->fabric->hclass, &myrx->ep, ++ FI_CLASS_RX_CTX, context); + ret = fi_rx_context(mysep->hep, index, attr, &myrx->hep, &myrx->ep.fid); + if (ret) + free(myrx); +@@ -222,6 +240,7 @@ int hook_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + if (!mypep) + return -FI_ENOMEM; + ++ mypep->fabric = fab; + mypep->pep.fid.fclass = FI_CLASS_PEP; + mypep->pep.fid.context = context; + mypep->pep.fid.ops = &hook_fid_ops; +@@ -242,18 +261,27 @@ int hook_endpoint(struct fid_domain *domain, struct fi_info *info, + { + struct hook_domain *dom = container_of(domain, struct hook_domain, domain); + struct hook_ep *myep; ++ struct fid *saved_fid; + int ret; + + myep = calloc(1, sizeof *myep); + if (!myep) + return -FI_ENOMEM; + +- hook_setup_ep(&myep->ep, FI_CLASS_EP, context); ++ saved_fid = info->handle; ++ if (saved_fid) { ++ info->handle = hook_to_hfid(info->handle); ++ if (!info->handle) ++ info->handle = saved_fid; ++ } ++ myep->domain = dom; ++ hook_setup_ep(dom->fabric->hclass, &myep->ep, FI_CLASS_EP, context); + ret = fi_endpoint(dom->hdomain, info, &myep->hep, &myep->ep.fid); + if (ret) + free(myep); + else + *ep = &myep->ep; + ++ info->handle = saved_fid; + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_eq.c +index 33460c1..8391099 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_eq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_eq.c +@@ -31,12 +31,12 @@ + */ + + #include +-#include "hook.h" ++#include "ofi_hook.h" + + + static int hook_eq_std_event(uint32_t event) + { +- return event <= FI_JOIN_COMPLETE; ++ return (event > FI_NOTIFY) && (event <= FI_JOIN_COMPLETE); + } + + /* +@@ -121,18 +121,24 @@ int hook_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, + { + struct hook_fabric *fab = container_of(fabric, struct hook_fabric, fabric); + struct hook_eq *myeq; ++ struct fi_eq_attr hattr; + int ret; + + myeq = calloc(1, sizeof *myeq); + if (!myeq) + return -FI_ENOMEM; + ++ myeq->fabric = fab; + myeq->eq.fid.fclass = FI_CLASS_EQ; + myeq->eq.fid.context = context; + myeq->eq.fid.ops = &hook_fid_ops; + myeq->eq.ops = &hook_eq_ops; + +- ret = fi_eq_open(fab->hfabric, attr, &myeq->heq, &myeq->eq.fid); ++ hattr = *attr; ++ if (attr->wait_obj == FI_WAIT_SET) ++ hattr.wait_set = hook_to_hwait(attr->wait_set); ++ ++ ret = fi_eq_open(fab->hfabric, &hattr, &myeq->heq, &myeq->eq.fid); + if (ret) + free(myeq); + else +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_wait.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_wait.c +index e2287e1..31e8fa4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_wait.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_wait.c +@@ -31,7 +31,7 @@ + */ + + #include +-#include "hook.h" ++#include "ofi_hook.h" + + + static int hook_do_poll(struct fid_poll *pollset, void **context, int count) +@@ -83,6 +83,7 @@ int hook_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, + if (!poll) + return -FI_ENOMEM; + ++ poll->domain = dom; + poll->poll.fid.fclass = FI_CLASS_POLL; + poll->poll.fid.ops = &hook_fid_ops; + poll->poll.ops = &hook_poll_ops; +@@ -139,6 +140,7 @@ int hook_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, + if (!wait) + return -FI_ENOMEM; + ++ wait->fabric = fab; + wait->wait.fid.fclass = FI_CLASS_WAIT; + wait->wait.fid.ops = &hook_fid_ops; + wait->wait.ops = &hook_wait_ops; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_xfer.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_xfer.c +index 9f846cd..9c00754 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_xfer.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_xfer.c +@@ -30,7 +30,7 @@ + * SOFTWARE. + */ + +-#include "hook.h" ++#include "ofi_hook.h" + + + static ssize_t +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/configure.m4 +index fae5587..1c13d58 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/configure.m4 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/configure.m4 +@@ -10,7 +10,7 @@ dnl + AC_DEFUN([FI_MLX_CONFIGURE],[ + # Determine if we can support the mxm provider + mlx_happy=0 +- AS_IF([test x"$enable_mlx" != x"no"], ++ AS_IF([test x"$enable_mlx" = x"yes"], + [FI_CHECK_PACKAGE([mlx], + [ucp/api/ucp.h], + [ucp], +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_av.c +index 89ebb80..bb9e944 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_av.c +@@ -118,7 +118,7 @@ static int mlx_av_insert( + { + struct mlx_av *av; + struct mlx_ep *ep; +- int i; ++ size_t i; + ucs_status_t status = UCS_OK; + int added = 0; + +@@ -129,35 +129,34 @@ static int mlx_av_insert( + return -FI_ENOEQ; + } + +- for ( i = 0; i < count ; ++i) { +- ucp_ep_params_t ep_params = {}; ++ for (i = 0; i < count ; ++i) { ++ ucp_ep_params_t ep_params = { 0 }; + + if (mlx_descriptor.use_ns) { + if (mlx_av_resolve_if_addr( + (struct sockaddr*) +- (&(((struct sockaddr_in*)addr)[i])), +- (char**)&ep_params.address) != FI_SUCCESS) ++ (&(((struct sockaddr_in *) addr)[i])), ++ (char**) &ep_params.address) != FI_SUCCESS) + break; + } else { + ep_params.address = (const ucp_address_t *) +- (&(((const char *)addr)[i * FI_MLX_MAX_NAME_LEN])); ++ (&(((const char *) addr)[i * av->addr_len])); + } + + ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- FI_WARN( &mlx_prov, FI_LOG_CORE, +- "Try to insert address #%d, offset=%d (size=%ld)" ++ FI_WARN(&mlx_prov, FI_LOG_CORE, ++ "Try to insert address #%zd, offset=%zd (size=%zd)" + " fi_addr=%p \naddr = %s\n", +- i, i * FI_MLX_MAX_NAME_LEN, count, +- fi_addr, &(((const char *)addr)[i * FI_MLX_MAX_NAME_LEN])); ++ i, i * av->addr_len, count, ++ fi_addr, &(((const char *) addr)[i * av->addr_len])); + +- status = ucp_ep_create( ep->worker, +- &ep_params, +- (ucp_ep_h *)(&(fi_addr[i]))); ++ status = ucp_ep_create(ep->worker, &ep_params, ++ (ucp_ep_h *)(&(fi_addr[i]))); + if (mlx_descriptor.use_ns) { +- free((void*)ep_params.address); ++ free((void *) ep_params.address); + } + if (status == UCS_OK) { +- FI_WARN( &mlx_prov, FI_LOG_CORE, "address inserted\n"); ++ FI_WARN(&mlx_prov, FI_LOG_CORE, "address inserted\n"); + added++; + } else { + if (av->eq) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_callbacks.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_callbacks.c +index 9f0dc31..ab1abc9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_callbacks.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_callbacks.c +@@ -45,7 +45,7 @@ void mlx_send_callback(void *request, + struct util_cq *cq; + struct mlx_request *mlx_req = request; + struct fi_cq_tagged_entry *t_entry; +- struct util_cq_err_entry *err; ++ struct util_cq_oflow_err_entry *err; + + cq = mlx_req->cq; + +@@ -62,18 +62,18 @@ void mlx_send_callback(void *request, + + if (status != UCS_OK){ + t_entry->flags |= UTIL_FLAG_ERROR; +- err = calloc(1, sizeof(struct util_cq_err_entry)); ++ err = calloc(1, sizeof(struct util_cq_oflow_err_entry)); + if (!err) { + FI_WARN(&mlx_prov, FI_LOG_CQ, + "out of memory, cannot report CQ error\n"); + goto fn; + } + +- err->err_entry = (mlx_req->completion.error); +- err->err_entry.prov_errno = (int)status; +- err->err_entry.err = MLX_TRANSLATE_ERRCODE(status); +- err->err_entry.olen = 0; +- slist_insert_tail(&err->list_entry, &cq->err_list); ++ err->comp = (mlx_req->completion.error); ++ err->comp.prov_errno = (int)status; ++ err->comp.err = MLX_TRANSLATE_ERRCODE(status); ++ err->comp.olen = 0; ++ slist_insert_tail(&err->list_entry, &cq->oflow_err_list); + } + fn: + mlx_req->type = MLX_FI_REQ_UNINITIALIZED; +@@ -133,10 +133,10 @@ void mlx_recv_callback(void *request, + *t_entry = (mlx_req->completion.tagged); + + if (status != UCS_OK) { +- struct util_cq_err_entry* err; ++ struct util_cq_oflow_err_entry *err; + t_entry->flags |= UTIL_FLAG_ERROR; + +- err = calloc(1, sizeof(struct util_cq_err_entry)); ++ err = calloc(1, sizeof(struct util_cq_oflow_err_entry)); + if (!err) { + FI_WARN(&mlx_prov, FI_LOG_CQ, + "out of memory, cannot report CQ error\n"); +@@ -144,8 +144,8 @@ void mlx_recv_callback(void *request, + goto fn; + } + +- err->err_entry = (mlx_req->completion.error); +- slist_insert_tail(&err->list_entry, &cq->err_list); ++ err->comp = (mlx_req->completion.error); ++ slist_insert_tail(&err->list_entry, &cq->oflow_err_list); + } + + if (cq->src){ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_cm.c +index 47b5c14..c0b7668 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_cm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_cm.c +@@ -89,11 +89,14 @@ static int mlx_cm_getname_ai_format( + size_t *addrlen) + { + int ofi_status = FI_SUCCESS; +- struct mlx_ep* ep; +- ep = container_of(fid, struct mlx_ep, ep.ep_fid.fid); ++ struct mlx_ep* ep = container_of(fid, struct mlx_ep, ep.ep_fid.fid); ++ + if (ep->addr) { + if (ep->addr_len > *addrlen) { + ofi_status = -FI_ETOOSMALL; ++ FI_WARN(&mlx_prov, FI_LOG_EP_CTRL, ++ "addrlen expected: %"PRIu64", got: %"PRIu64"\n", ++ ep->addr_len, *addrlen); + } else { + memcpy(addr, ep->addr, ep->addr_len); + } +@@ -101,32 +104,35 @@ static int mlx_cm_getname_ai_format( + } else { + char *hostname = mlx_descriptor.localhost; + int service = (((getpid() & 0xFFFF))); +- struct addrinfo hints; ++ struct addrinfo hints = { ++ .ai_family = AF_INET, ++ .ai_socktype = SOCK_STREAM, ++ .ai_protocol = IPPROTO_TCP, ++ }; + struct addrinfo *res; + +- memset(&hints, 0, sizeof(hints)); +- hints.ai_flags = 0; +- hints.ai_family = AF_INET; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_protocol = IPPROTO_TCP; +- hints.ai_addrlen = 0; +- hints.ai_addr = NULL; +- hints.ai_canonname = NULL; +- hints.ai_next = NULL; +- +- if(getaddrinfo(hostname, NULL, &hints, &res) != 0) { +- FI_WARN( &mlx_prov, FI_LOG_CORE, +- "Unable to resolve hostname:%s\n",hostname); ++ if (getaddrinfo(hostname, NULL, &hints, &res) != 0) { ++ FI_WARN(&mlx_prov, FI_LOG_CORE, ++ "Unable to resolve hostname:%s\n", hostname); ++ return -FI_EAVAIL; + } + FI_INFO(&mlx_prov, FI_LOG_CORE, +- "Loaded IPv4 address: [%"PRIu64"]%s:%d\n", +- res->ai_addrlen, hostname, service); ++ "Loaded IPv4 address: [%jd]%s:%d\n", ++ (intmax_t) res->ai_addrlen, hostname, service); + +- memcpy(addr,res->ai_addr,res->ai_addrlen); +- ((struct sockaddr_in*)addr)->sin_port = htons((short)service); +- freeaddrinfo(res); ++ if (res->ai_addrlen > *addrlen) { ++ ofi_status = -FI_ETOOSMALL; ++ FI_WARN(&mlx_prov, FI_LOG_EP_CTRL, ++ "addrlen expected: %jd, got: %"PRIu64"\n", ++ (intmax_t) res->ai_addrlen, *addrlen); ++ } else { ++ memcpy(addr, res->ai_addr, res->ai_addrlen); ++ ((struct sockaddr_in *)addr)->sin_port = htons((short)service); ++ } + +- *addrlen = sizeof(struct sockaddr); ++ *addrlen = res->ai_addrlen; ++ ++ freeaddrinfo(res); + } + + return ofi_status; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_fabric.c +index 527ceb3..f443da7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_fabric.c +@@ -85,7 +85,7 @@ static char* mlx_local_host_resolve() + char *iface = NULL; + char *result = NULL; + +- status = fi_param_get( &mlx_prov, "mlx_ns_iface", ++ status = fi_param_get( &mlx_prov, "ns_iface", + &iface); + if (!status) { + iface = NULL; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_init.c +index dd6cb5c..fbbe14a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_init.c +@@ -79,7 +79,7 @@ struct fi_domain_attr mlx_domain_attrs = { + .data_progress = FI_PROGRESS_MANUAL, + .resource_mgmt = FI_RM_DISABLED, + .av_type = FI_AV_UNSPEC, +- .mr_mode = OFI_MR_BASIC_MAP, ++ .mr_mode = OFI_MR_BASIC_MAP | FI_MR_BASIC, + .mr_key_size = -1, /*Should be setup after init*/ + .tx_ctx_cnt = 1, + .rx_ctx_cnt = 1, +@@ -166,26 +166,26 @@ static int mlx_getinfo ( + mlx_descriptor.config = NULL; + + status = fi_param_get( &mlx_prov, +- "mlx_tinject_limit", ++ "tinject_limit", + &inject_thresh); + if (!status) + inject_thresh = FI_MLX_DEFAULT_INJECT_SIZE; + + FI_INFO( &mlx_prov, FI_LOG_CORE, +- "used inlect size = %d \n", inject_thresh); ++ "used inject size = %d \n", inject_thresh); + +- status = fi_param_get( &mlx_prov, "mlx_config", &configfile_name); ++ status = fi_param_get( &mlx_prov, "config", &configfile_name); + if (!status) { + configfile_name = NULL; + } + + /* NS is disabled by default */ +- status = fi_param_get( &mlx_prov, "mlx_ns_enable", ++ status = fi_param_get( &mlx_prov, "ns_enable", + &mlx_descriptor.use_ns); + if (!status) { + mlx_descriptor.use_ns = 0; + } +- status = fi_param_get( &mlx_prov, "mlx_ns_port", ++ status = fi_param_get( &mlx_prov, "ns_port", + &mlx_descriptor.ns_port); + if (!status) { + mlx_descriptor.ns_port = FI_MLX_DEFAULT_NS_PORT; +@@ -260,7 +260,7 @@ void mlx_cleanup(void) + struct fi_provider mlx_prov = { + .name = FI_MLX_FABRIC_NAME, + .version = FI_MLX_VERSION, +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = mlx_getinfo, + .fabric = mlx_fabric_open, + .cleanup = mlx_cleanup, +@@ -271,23 +271,23 @@ MLX_INI + { + mlx_init_errcodes(); + fi_param_define( &mlx_prov, +- "mlx_config", FI_PARAM_STRING, ++ "config", FI_PARAM_STRING, + "MLX configuration file name"); + + fi_param_define(&mlx_prov, +- "mlx_tinject_limit", FI_PARAM_INT, ++ "tinject_limit", FI_PARAM_INT, + "Maximal tinject message size"); + + fi_param_define(&mlx_prov, +- "mlx_ns_port", FI_PARAM_INT, ++ "ns_port", FI_PARAM_INT, + "MLX Name server port"); + + fi_param_define(&mlx_prov, +- "mlx_ns_enable",FI_PARAM_BOOL, ++ "ns_enable",FI_PARAM_BOOL, + "Enforce usage of name server for MLX provider"); + + fi_param_define(&mlx_prov, +- "mlx_ns_iface",FI_PARAM_STRING, ++ "ns_iface",FI_PARAM_STRING, + "Specify IPv4 network interface for MLX provider's name server'"); + return &mlx_prov; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_tagged.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_tagged.c +index e0d54d4..afb3f09 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_tagged.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_tagged.c +@@ -98,19 +98,19 @@ static ssize_t mlx_tagged_recvmsg( + *t_entry = (req->completion.tagged); + + if (req->type == MLX_FI_REQ_UNEXPECTED_ERR) { +- struct util_cq_err_entry* err; ++ struct util_cq_oflow_err_entry* err; + req->completion.error.olen -= req->completion.tagged.len; + t_entry->flags |= UTIL_FLAG_ERROR; + +- err = calloc(1, sizeof(struct util_cq_err_entry)); ++ err = calloc(1, sizeof(struct util_cq_oflow_err_entry)); + if (!err) { + FI_WARN(&mlx_prov, FI_LOG_CQ, + "out of memory, cannot report CQ error\n"); + fastlock_release(&cq->cq_lock); + return -FI_ENOMEM; + } +- err->err_entry = (req->completion.error); +- slist_insert_tail(&err->list_entry, &cq->err_list); ++ err->comp = (req->completion.error); ++ slist_insert_tail(&err->list_entry, &cq->oflow_err_list); + } + + ofi_cirque_commit(cq->cirq); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/Makefile.include +new file mode 100644 +index 0000000..f993fa9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/Makefile.include +@@ -0,0 +1,28 @@ ++if HAVE_MRAIL ++_mrail_files = \ ++ prov/mrail/src/mrail_init.c \ ++ prov/mrail/src/mrail_attr.c \ ++ prov/mrail/src/mrail_fabric.c \ ++ prov/mrail/src/mrail_domain.c \ ++ prov/mrail/src/mrail_cq.c \ ++ prov/mrail/src/mrail_ep.c \ ++ prov/mrail/src/mrail_av.c \ ++ prov/mrail/src/mrail_rma.c \ ++ prov/mrail/src/mrail.h ++ ++if HAVE_MRAIL_DL ++pkglib_LTLIBRARIES += libmrail-fi.la ++libmrail_fi_la_SOURCES = $(_mrail_files) $(common_srcs) ++libmrail_fi_la_LIBADD = $(linkback) $(mrail_shm_LIBS) ++libmrail_fi_la_LDFLAGS = -module -avoid-version -shared -export-dynamic ++libmrail_fi_la_DEPENDENCIES = $(linkback) ++else !HAVE_MRAIL_DL ++src_libfabric_la_SOURCES += $(_mrail_files) ++src_libfabric_la_LIBADD += $(mrail_shm_LIBS) ++endif !HAVE_MRAIL_DL ++ ++prov_install_man_pages += man/man7/fi_mrail.7 ++ ++endif HAVE_MRAIL ++ ++prov_dist_man_pages += man/man7/fi_mrail.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/configure.m4 +new file mode 100644 +index 0000000..a5f7c1a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/configure.m4 +@@ -0,0 +1,15 @@ ++dnl Configury specific to the libfabric mrail provider ++ ++dnl Called to configure this provider ++dnl ++dnl Arguments: ++dnl ++dnl $1: action if configured successfully ++dnl $2: action if not configured successfully ++dnl ++AC_DEFUN([FI_MRAIL_CONFIGURE],[ ++ # Determine if we can support the mrail provider ++ mrail_h_happy=0 ++ AS_IF([test x"$enable_mrail" != x"no"], [mrail_h_happy=1]) ++ AS_IF([test $mrail_h_happy -eq 1], [$1], [$2]) ++]) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/TODO b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/TODO +new file mode 100644 +index 0000000..ec6f166 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/TODO +@@ -0,0 +1,28 @@ ++TODO: ++----- ++ ++Feature / issue Status ++---------------------------------------------------- ++CQ in-progress ++AV in-progress ++EP in-progress ++small msgs (un-ordered) in-progress ++support for multiple layering - ++(above is needed for multi-rail ++ over ofi_rxm provider) ++OFI_MULTI_RAIL env var - ++fi_dupinfo issue - ++App mode bit to make it aware - ++of list of rails in fi_info ++addressing: - ++ - FI_ADDR_STRV ++ - primary/failover ++small msg ordering: - ++ - bounce buffers ++large msg support: - ++ - use FI_VARIABLE_MSG ++Memory registration - ++RMA - ++rail failure handling - ++rail selection / striping algorithm - ++Atomics - +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail.h +new file mode 100644 +index 0000000..851bf86 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail.h +@@ -0,0 +1,363 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "rdma/providers/fi_log.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define MRAIL_MAJOR_VERSION 1 ++#define MRAIL_MINOR_VERSION 0 ++ ++#define MRAIL_MAX_INFO 100 ++ ++#define MRAIL_PASSTHRU_MODES (0ULL) ++#define MRAIL_PASSTHRU_MR_MODES (OFI_MR_BASIC_MAP) ++ ++#define MRAIL_RAIL_CQ_FORMAT FI_CQ_FORMAT_TAGGED ++ ++extern struct fi_info mrail_info; ++extern struct fi_provider mrail_prov; ++extern struct util_prov mrail_util_prov; ++extern struct fi_fabric_attr mrail_fabric_attr; ++ ++extern struct fi_info *mrail_info_vec[MRAIL_MAX_INFO]; ++extern size_t mrail_num_info; ++ ++extern struct fi_ops_rma mrail_ops_rma; ++ ++struct mrail_match_attr { ++ fi_addr_t addr; ++ uint64_t tag; ++}; ++ ++struct mrail_unexp_msg_entry { ++ struct dlist_entry entry; ++ fi_addr_t addr; ++ uint64_t tag; ++ void *context; ++ char data[]; /* completion entry */ ++}; ++ ++struct mrail_recv_queue; ++ ++typedef struct mrail_unexp_msg_entry * ++(*mrail_get_unexp_msg_entry_func)(struct mrail_recv_queue *recv_queue, void *context); ++ ++struct mrail_recv_queue { ++ struct fi_provider *prov; ++ struct dlist_entry recv_list; ++ struct dlist_entry unexp_msg_list; ++ dlist_func_t *match_recv; ++ dlist_func_t *match_unexp; ++ mrail_get_unexp_msg_entry_func get_unexp_msg_entry; ++}; ++ ++struct mrail_recv * ++mrail_match_recv_handle_unexp(struct mrail_recv_queue *recv_queue, uint64_t tag, ++ uint64_t addr, char *data, size_t len, void *context); ++ ++/* mrail protocol */ ++#define MRAIL_HDR_VERSION 1 ++ ++struct mrail_hdr { ++ uint8_t version; ++ uint8_t op; ++ uint8_t padding[2]; ++ uint32_t seq; ++ uint64_t tag; ++}; ++ ++struct mrail_tx_buf { ++ /* context should stay at top and would get overwritten on ++ * util buf release */ ++ void *context; ++ struct mrail_ep *ep; ++ /* flags would be used for both operation flags (FI_COMPLETION) ++ * and completion flags (FI_MSG, FI_TAGGED, etc) */ ++ uint64_t flags; ++ struct mrail_hdr hdr; ++}; ++ ++struct mrail_pkt { ++ struct mrail_hdr hdr; ++ char data[]; ++}; ++ ++/* TX & RX processing */ ++ ++#define MRAIL_IOV_LIMIT 5 ++ ++struct mrail_rx_buf { ++ struct fid_ep *rail_ep; ++ struct mrail_pkt pkt; ++}; ++ ++struct mrail_recv { ++ struct iovec iov[MRAIL_IOV_LIMIT]; ++ void *desc[MRAIL_IOV_LIMIT]; ++ uint8_t count; ++ void *context; ++ uint64_t flags; ++ uint64_t comp_flags; ++ struct mrail_hdr hdr; ++ struct mrail_ep *ep; ++ struct dlist_entry entry; ++ fi_addr_t addr; ++ uint64_t tag; ++ uint64_t ignore; ++}; ++DECLARE_FREESTACK(struct mrail_recv, mrail_recv_fs); ++ ++int mrail_cq_process_buf_recv(struct fi_cq_tagged_entry *comp, ++ struct mrail_recv *recv); ++ ++struct mrail_fabric { ++ struct util_fabric util_fabric; ++ struct fi_info *info; ++ struct fid_fabric **fabrics; ++ size_t num_fabrics; ++}; ++ ++struct mrail_domain { ++ struct util_domain util_domain; ++ struct fi_info *info; ++ struct fid_domain **domains; ++ size_t num_domains; ++ size_t addrlen; ++}; ++ ++struct mrail_av { ++ struct util_av util_av; ++ struct fid_av **avs; ++ size_t *rail_addrlen; ++ size_t num_avs; ++}; ++ ++struct mrail_peer_info { ++ struct slist ooo_recv_queue; ++ fi_addr_t addr; ++ uint32_t seq_no; ++ uint32_t expected_seq_no; ++}; ++ ++struct mrail_ooo_recv { ++ struct slist_entry entry; ++ struct fi_cq_tagged_entry comp; ++ uint32_t seq_no; ++}; ++ ++typedef int (*mrail_cq_process_comp_func_t)(struct fi_cq_tagged_entry *comp, ++ fi_addr_t src_addr); ++struct mrail_cq { ++ struct util_cq util_cq; ++ struct fid_cq **cqs; ++ size_t num_cqs; ++ mrail_cq_process_comp_func_t process_comp; ++}; ++ ++struct mrail_ep { ++ struct util_ep util_ep; ++ struct fi_info *info; ++ struct { ++ struct fid_ep *ep; ++ struct fi_info *info; ++ } *rails; ++ size_t num_eps; ++ ofi_atomic32_t tx_rail; ++ ofi_atomic32_t rx_rail; ++ ++ struct mrail_recv_fs *recv_fs; ++ struct mrail_recv_queue recv_queue; ++ struct mrail_recv_queue trecv_queue; ++ ++ struct util_buf_pool *req_pool; ++ struct util_buf_pool *ooo_recv_pool; ++ struct util_buf_pool *tx_buf_pool; ++ struct slist deferred_reqs; ++}; ++ ++struct mrail_addr_key { ++ uint64_t base_addr; ++ uint64_t key; ++}; ++ ++struct mrail_mr { ++ struct fid_mr mr_fid; ++ size_t num_mrs; ++ struct { ++ uint64_t base_addr; ++ struct fid_mr *mr; ++ } rails[]; ++}; ++ ++int mrail_get_core_info(uint32_t version, const char *node, const char *service, ++ uint64_t flags, const struct fi_info *hints, ++ struct fi_info **core_info); ++int mrail_fabric_open(struct fi_fabric_attr *attr, struct fid_fabric **fabric, ++ void *context); ++int mrail_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++int mrail_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq_fid, void *context); ++int mrail_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av_fid, void *context); ++int mrail_ep_open(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context); ++ ++static inline struct mrail_recv * ++mrail_pop_recv(struct mrail_ep *mrail_ep) ++{ ++ struct mrail_recv *recv; ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ recv = freestack_isempty(mrail_ep->recv_fs) ? NULL : ++ freestack_pop(mrail_ep->recv_fs); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return recv; ++} ++ ++static inline void ++mrail_push_recv(struct mrail_recv *recv) ++{ ++ ofi_ep_lock_acquire(&recv->ep->util_ep); ++ freestack_push(recv->ep->recv_fs, recv); ++ ofi_ep_lock_release(&recv->ep->util_ep); ++} ++ ++static inline struct fi_info *mrail_get_info_cached(char *name) ++{ ++ struct fi_info *info; ++ size_t i; ++ ++ for (i = 0; i < mrail_num_info; i++) { ++ info = mrail_info_vec[i]; ++ if (!strcmp(info->fabric_attr->name, name)) ++ return info; ++ } ++ ++ FI_WARN(&mrail_prov, FI_LOG_CORE, "Unable to find matching " ++ "fi_info in mrail_info_vec for given fabric name\n"); ++ return NULL; ++} ++ ++static inline int mrail_close_fids(struct fid **fids, size_t count) ++{ ++ int ret, retv = 0; ++ size_t i; ++ ++ for (i = 0; i < count; i++) { ++ if (fids[i]) { ++ ret = fi_close(fids[i]); ++ if (ret) ++ retv = ret; ++ } ++ } ++ return retv; ++} ++ ++static inline size_t mrail_get_tx_rail(struct mrail_ep *mrail_ep) ++{ ++ return (ofi_atomic_inc32(&mrail_ep->tx_rail) - 1) % mrail_ep->num_eps; ++} ++ ++struct mrail_subreq { ++ struct fi_context context; ++ struct mrail_req *parent; ++ void *descs[MRAIL_IOV_LIMIT]; ++ struct iovec iov[MRAIL_IOV_LIMIT]; ++ struct fi_rma_iov rma_iov[MRAIL_IOV_LIMIT]; ++ size_t iov_count; ++ size_t rma_iov_count; ++}; ++ ++struct mrail_req { ++ struct slist_entry entry; ++ uint64_t flags; ++ uint64_t data; ++ struct mrail_ep *mrail_ep; ++ struct mrail_peer_info *peer_info; ++ struct fi_cq_tagged_entry comp; ++ ofi_atomic32_t expected_subcomps; ++ int op_type; ++ int pending_subreq; ++ struct mrail_subreq subreqs[]; ++}; ++ ++static inline ++struct mrail_req *mrail_alloc_req(struct mrail_ep *mrail_ep) ++{ ++ struct mrail_req *req; ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ req = util_buf_alloc(mrail_ep->req_pool); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ return req; ++} ++ ++static inline ++void mrail_free_req(struct mrail_ep *mrail_ep, struct mrail_req *req) ++{ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ util_buf_release(mrail_ep->req_pool, req); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++} ++ ++void mrail_progress_deferred_reqs(struct mrail_ep *mrail_ep); ++ ++void mrail_poll_cq(struct util_cq *cq); ++ ++static inline void mrail_cntr_incerr(struct util_cntr *cntr) ++{ ++ if (cntr) { ++ cntr->cntr_fid.ops->adderr(&cntr->cntr_fid, 1); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_attr.c +new file mode 100644 +index 0000000..7786b37 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_attr.c +@@ -0,0 +1,106 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "mrail.h" ++ ++struct fi_tx_attr mrail_tx_attr = { ++ .caps = ~0x0ULL, ++ .msg_order = ~0x0ULL, ++ .comp_order = ~0x0ULL, ++ .inject_size = SIZE_MAX, ++ .size = SIZE_MAX, ++ .iov_limit = MRAIL_IOV_LIMIT, ++ .rma_iov_limit = SIZE_MAX, ++}; ++ ++struct fi_rx_attr mrail_rx_attr = { ++ .caps = ~0x0ULL, ++ .msg_order = ~0x0ULL, ++ .comp_order = ~0x0ULL, ++ .total_buffered_recv = SIZE_MAX, ++ .size = SIZE_MAX, ++ .iov_limit = SIZE_MAX, ++}; ++ ++struct fi_ep_attr mrail_ep_attr = { ++ .type = FI_EP_UNSPEC, ++ .protocol = FI_PROTO_MRAIL, ++ .protocol_version = 1, ++ .max_msg_size = SIZE_MAX, ++ .msg_prefix_size = SIZE_MAX, ++ .max_order_raw_size = SIZE_MAX, ++ .max_order_war_size = SIZE_MAX, ++ .max_order_waw_size = SIZE_MAX, ++ .tx_ctx_cnt = SIZE_MAX, ++ .rx_ctx_cnt = SIZE_MAX, ++ .auth_key_size = SIZE_MAX, ++}; ++ ++struct fi_domain_attr mrail_domain_attr = { ++ .name = "ofi_mrail_domain", ++ .threading = FI_THREAD_SAFE, ++ .control_progress = FI_PROGRESS_AUTO, ++ .data_progress = FI_PROGRESS_AUTO, ++ .resource_mgmt = FI_RM_ENABLED, ++ .av_type = FI_AV_UNSPEC, ++ .mr_mode = FI_MR_BASIC | FI_MR_SCALABLE | FI_MR_RAW, ++ .mr_key_size = SIZE_MAX, ++ .cq_data_size = SIZE_MAX, ++ .cq_cnt = SIZE_MAX, ++ .ep_cnt = SIZE_MAX, ++ .tx_ctx_cnt = SIZE_MAX, ++ .rx_ctx_cnt = SIZE_MAX, ++ .max_ep_tx_ctx = SIZE_MAX, ++ .max_ep_rx_ctx = SIZE_MAX, ++ .max_ep_stx_ctx = SIZE_MAX, ++ .max_ep_srx_ctx = SIZE_MAX, ++ .cntr_cnt = SIZE_MAX, ++ .mr_iov_limit = SIZE_MAX, ++ .caps = ~0x0ULL, ++ .auth_key_size = SIZE_MAX, ++ .max_err_data = SIZE_MAX, ++ .mr_cnt = SIZE_MAX, ++}; ++ ++struct fi_fabric_attr mrail_fabric_attr = { ++ .prov_version = FI_VERSION(MRAIL_MAJOR_VERSION, MRAIL_MINOR_VERSION), ++ .name = "ofi_mrail_fabric", ++}; ++ ++struct fi_info mrail_info = { ++ .caps = ~0x0ULL, ++ .tx_attr = &mrail_tx_attr, ++ .rx_attr = &mrail_rx_attr, ++ .ep_attr = &mrail_ep_attr, ++ .domain_attr = &mrail_domain_attr, ++ .fabric_attr = &mrail_fabric_attr ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_av.c +new file mode 100644 +index 0000000..d55a5db +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_av.c +@@ -0,0 +1,204 @@ ++#include "mrail.h" ++ ++static int mrail_av_close(struct fid *fid) ++{ ++ struct mrail_av *mrail_av = container_of(fid, struct mrail_av, ++ util_av.av_fid); ++ int ret, retv = 0; ++ ++ ret = mrail_close_fids((struct fid **)mrail_av->avs, mrail_av->num_avs); ++ if (ret) ++ retv = ret; ++ free(mrail_av->avs); ++ free(mrail_av->rail_addrlen); ++ ++ ret = ofi_av_close(&mrail_av->util_av); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_av); ++ return retv; ++} ++ ++static int mrail_av_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++{ ++ return ofi_av_bind(fid, bfid, flags); ++} ++ ++static const char *mrail_av_straddr(struct fid_av *av, const void *addr, ++ char *buf, size_t *len) ++{ ++ return NULL; ++} ++ ++static int mrail_av_insertsvc(struct fid_av *av, const char *node, ++ const char *service, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static int mrail_av_insertsym(struct fid_av *av_fid, const char *node, size_t nodecnt, ++ const char *service, size_t svccnt, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static int mrail_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, ++ size_t *addrlen) ++{ ++ return -FI_ENOSYS; ++ ++} ++ ++static int mrail_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count, ++ uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static int mrail_av_insert(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ struct mrail_domain *mrail_domain; ++ struct mrail_av *mrail_av; ++ struct mrail_peer_info *peer_info; ++ size_t i, j, offset, num_inserted = 0; ++ fi_addr_t index; ++ int ret; ++ ++ mrail_av = container_of(av_fid, struct mrail_av, util_av.av_fid); ++ mrail_domain = container_of(mrail_av->util_av.domain, struct mrail_domain, ++ util_domain); ++ ++ /* TODO if it's more optimal to insert multiple addresses at once ++ * convert ADDR1: ADDR1_RAIL1:ADDR1_RAIL2 ++ * ADDR2: ADDR2_RAIL1:ADDR2_RAIL2 ++ * to ++ * ADDR1: ADDR1_RAIL1:ADDR2_RAIL1 ++ * ADDR2: ADDR1_RAIL2:ADDR2_RAIL2 ++ */ ++ ++ peer_info = calloc(1, mrail_av->util_av.addrlen); ++ if (!peer_info) ++ return -FI_ENOMEM; ++ slist_init(&peer_info->ooo_recv_queue); ++ ++ for (i = 0; i < count; i++) { ++ offset = i * mrail_domain->addrlen; ++ for (j = 0; j < mrail_av->num_avs; j++) { ++ ofi_straddr_dbg(&mrail_prov, FI_LOG_EP_CTRL, ++ "addr", addr); ++ ret = fi_av_insert(mrail_av->avs[j], ++ (char *)addr + offset, 1, ++ NULL, flags, NULL); ++ if (ret != 1) { ++ free(peer_info); ++ return ret; ++ } ++ offset += mrail_av->rail_addrlen[j]; ++ } ++ ret = ofi_av_insert_addr(&mrail_av->util_av, peer_info, ++ &index); ++ if (fi_addr) { ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_AV, \ ++ "Unable to get rail fi_addr\n"); ++ peer_info->addr = FI_ADDR_NOTAVAIL; ++ } else { ++ peer_info->addr = index; ++ num_inserted++; ++ } ++ fi_addr[i] = peer_info->addr; ++ } ++ } ++ ++ free(peer_info); ++ return num_inserted; ++} ++ ++static struct fi_ops_av mrail_av_ops = { ++ .size = sizeof(struct fi_ops_av), ++ .insert = mrail_av_insert, ++ .insertsvc = mrail_av_insertsvc, ++ .insertsym = mrail_av_insertsym, ++ .remove = mrail_av_remove, ++ .lookup = mrail_av_lookup, ++ .straddr = mrail_av_straddr, ++}; ++ ++static struct fi_ops mrail_av_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_av_close, ++ .bind = mrail_av_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++int mrail_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av_fid, void *context) ++{ ++ struct mrail_av *mrail_av; ++ struct mrail_domain *mrail_domain; ++ struct fi_av_attr rail_attr; ++ struct util_av_attr util_attr; ++ struct fi_info *fi; ++ size_t i; ++ int ret; ++ ++ mrail_domain = container_of(domain_fid, struct mrail_domain, ++ util_domain.domain_fid); ++ mrail_av = calloc(1, sizeof(*mrail_av)); ++ if (!mrail_av) ++ return -FI_ENOMEM; ++ ++ mrail_av->num_avs = mrail_domain->num_domains; ++ ++ util_attr.addrlen = sizeof(struct mrail_peer_info); ++ /* We just need a table to store the mapping */ ++ util_attr.flags = 0; ++ ++ if (attr->type == FI_AV_UNSPEC) ++ attr->type = FI_AV_TABLE; ++ ++ ret = ofi_av_init(&mrail_domain->util_domain, attr, &util_attr, ++ &mrail_av->util_av, context); ++ if (ret) { ++ free(mrail_av); ++ return ret; ++ } ++ ++ mrail_av->avs = calloc(mrail_av->num_avs, sizeof(*mrail_av->avs)); ++ if (!mrail_av->avs) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ mrail_av->rail_addrlen = calloc(mrail_av->num_avs, ++ sizeof(*mrail_av->rail_addrlen)); ++ if (!mrail_av->rail_addrlen) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ rail_attr = *attr; ++ rail_attr.type = FI_AV_TABLE; ++ for (i = 0, fi = mrail_domain->info->next; i < mrail_av->num_avs; ++ i++, fi = fi->next) { ++ ret = fi_av_open(mrail_domain->domains[i], &rail_attr, ++ &mrail_av->avs[i], context); ++ if (ret) ++ goto err; ++ mrail_av->rail_addrlen[i] = fi->src_addrlen; ++ } ++ ++ mrail_av->util_av.av_fid.fid.ops = &mrail_av_fi_ops; ++ mrail_av->util_av.av_fid.ops = &mrail_av_ops; ++ *av_fid = &mrail_av->util_av.av_fid; ++ ++ return 0; ++err: ++ mrail_av_close(&mrail_av->util_av.av_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_cq.c +new file mode 100644 +index 0000000..4e03f81 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_cq.c +@@ -0,0 +1,498 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "mrail.h" ++ ++int mrail_cq_write_recv_comp(struct mrail_ep *mrail_ep, struct mrail_hdr *hdr, ++ struct fi_cq_tagged_entry *comp, ++ struct mrail_recv *recv) ++{ ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "finish recv: length: %zu " ++ "tag: 0x%" PRIx64 "\n", comp->len - sizeof(struct mrail_pkt), ++ hdr->tag); ++ ofi_ep_rx_cntr_inc(&mrail_ep->util_ep); ++ if (!(recv->flags & FI_COMPLETION)) ++ return 0; ++ return ofi_cq_write(mrail_ep->util_ep.rx_cq, recv->context, ++ recv->comp_flags | ++ (comp->flags & FI_REMOTE_CQ_DATA), ++ comp->len - sizeof(struct mrail_pkt), ++ NULL, comp->data, hdr->tag); ++} ++ ++int mrail_cq_process_buf_recv(struct fi_cq_tagged_entry *comp, ++ struct mrail_recv *recv) ++{ ++ struct fi_recv_context *recv_ctx = comp->op_context; ++ struct fi_msg msg = { ++ .context = recv_ctx, ++ }; ++ struct mrail_ep *mrail_ep; ++ struct mrail_pkt *mrail_pkt; ++ size_t size, len; ++ int ret, retv = 0; ++ ++ if (comp->flags & FI_MORE) { ++ msg.msg_iov = recv->iov; ++ msg.iov_count = recv->count; ++ msg.addr = recv->addr; ++ ++ recv_ctx->context = recv; ++ ++ ret = fi_recvmsg(recv_ctx->ep, &msg, FI_CLAIM); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to claim buffered recv\n"); ++ assert(0); ++ // TODO write cq error entry ++ } ++ return ret; ++ } ++ ++ mrail_ep = recv_ctx->ep->fid.context; ++ mrail_pkt = (struct mrail_pkt *)comp->buf; ++ ++ len = comp->len - sizeof(*mrail_pkt); ++ ++ size = ofi_copy_to_iov(&recv->iov[1], recv->count - 1, 0, ++ mrail_pkt->data, len); ++ ++ if (size < len) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, "Message truncated recv buf " ++ "size: %zu message length: %zu\n", size, len); ++ ret = ofi_cq_write_error_trunc( ++ mrail_ep->util_ep.rx_cq, recv->context, ++ recv->comp_flags | (comp->flags & FI_REMOTE_CQ_DATA), ++ 0, NULL, comp->data, mrail_pkt->hdr.tag, comp->len - size); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to write truncation error to util cq\n"); ++ retv = ret; ++ } ++ mrail_cntr_incerr(mrail_ep->util_ep.rx_cntr); ++ goto out; ++ } ++ ret = mrail_cq_write_recv_comp(mrail_ep, &mrail_pkt->hdr, comp, recv); ++ if (ret) ++ retv = ret; ++out: ++ ret = fi_recvmsg(recv_ctx->ep, &msg, FI_DISCARD); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to discard buffered recv\n"); ++ retv = ret; ++ } ++ mrail_push_recv(recv); ++ return retv; ++} ++ ++/* Should only be called while holding the EP's lock */ ++static struct mrail_recv *mrail_match_recv(struct mrail_ep *mrail_ep, ++ struct fi_cq_tagged_entry *comp, ++ int src_addr) ++{ ++ struct mrail_hdr *hdr = comp->buf; ++ struct mrail_recv *recv; ++ ++ if (hdr->op == ofi_op_msg) { ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "Got MSG op\n"); ++ recv = mrail_match_recv_handle_unexp(&mrail_ep->recv_queue, 0, ++ src_addr, (char *)comp, ++ sizeof(*comp), NULL); ++ } else { ++ assert(hdr->op == ofi_op_tagged); ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "Got TAGGED op with tag: 0x%" ++ PRIx64 "\n", hdr->tag); ++ recv = mrail_match_recv_handle_unexp(&mrail_ep->trecv_queue, ++ hdr->tag, src_addr, ++ (char *)comp, ++ sizeof(*comp), NULL); ++ } ++ ++ return recv; ++} ++ ++static ++struct mrail_ooo_recv *mrail_get_next_recv(struct mrail_peer_info *peer_info) ++{ ++ struct slist *queue = &peer_info->ooo_recv_queue; ++ struct mrail_ooo_recv *ooo_recv; ++ ++ if (!slist_empty(queue)) { ++ ooo_recv = container_of(queue->head, struct mrail_ooo_recv, ++ entry); ++ if (ooo_recv->seq_no == peer_info->expected_seq_no) { ++ slist_remove_head(queue); ++ peer_info->expected_seq_no++; ++ return ooo_recv; ++ } ++ } ++ return NULL; ++} ++ ++static int mrail_process_ooo_recvs(struct mrail_ep *mrail_ep, ++ struct mrail_peer_info *peer_info) ++{ ++ struct mrail_ooo_recv *ooo_recv; ++ struct mrail_recv *recv; ++ int ret; ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ ooo_recv = mrail_get_next_recv(peer_info); ++ while (ooo_recv) { ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "found ooo_recv seq=%d\n", ++ ooo_recv->seq_no); ++ /* Requesting FI_AV_TABLE from the underlying provider allows ++ * us to use peer_info->addr as an int here. */ ++ recv = mrail_match_recv(mrail_ep, &ooo_recv->comp, ++ (int) peer_info->addr); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ if (recv) { ++ ret = mrail_cq_process_buf_recv(&ooo_recv->comp, recv); ++ if (ret) ++ return ret; ++ } ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ util_buf_release(mrail_ep->ooo_recv_pool, ooo_recv); ++ ooo_recv = mrail_get_next_recv(peer_info); ++ } ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return 0; ++} ++ ++static int mrail_ooo_recv_before(struct slist_entry *item, const void *arg) ++{ ++ struct mrail_ooo_recv *ooo_recv; ++ struct mrail_ooo_recv *new_recv; ++ ++ ooo_recv = container_of(item, struct mrail_ooo_recv, entry); ++ new_recv = container_of(arg, struct mrail_ooo_recv, entry); ++ return (new_recv->seq_no < ooo_recv->seq_no); ++} ++ ++/* Should only be called while holding the EP's lock */ ++static void mrail_save_ooo_recv(struct mrail_ep *mrail_ep, ++ struct mrail_peer_info *peer_info, ++ uint32_t seq_no, ++ struct fi_cq_tagged_entry *comp) ++{ ++ struct slist *queue = &peer_info->ooo_recv_queue; ++ struct mrail_ooo_recv *ooo_recv; ++ ++ ooo_recv = util_buf_alloc(mrail_ep->ooo_recv_pool); ++ if (!ooo_recv) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, "Cannot allocate ooo_recv\n"); ++ assert(0); ++ } ++ ooo_recv->seq_no = seq_no; ++ memcpy(&ooo_recv->comp, comp, sizeof(*comp)); ++ ++ slist_insert_before_first_match(queue, mrail_ooo_recv_before, ++ &ooo_recv->entry); ++ ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "saved ooo_recv seq=%d\n", seq_no); ++} ++ ++static int mrail_handle_recv_completion(struct fi_cq_tagged_entry *comp, ++ fi_addr_t src_addr) ++{ ++ struct fi_recv_context *recv_ctx; ++ struct mrail_peer_info *peer_info; ++ struct mrail_ep *mrail_ep; ++ struct mrail_recv *recv; ++ struct mrail_hdr *hdr; ++ uint32_t seq_no; ++ int ret; ++ ++ if (comp->flags & FI_CLAIM) { ++ /* This message has already been processed and claimed. ++ * See mrail_cq_process_buf_recv(). ++ */ ++ recv = comp->op_context; ++ assert(recv->hdr.version == MRAIL_HDR_VERSION); ++ ret = mrail_cq_write_recv_comp(recv->ep, &recv->hdr, comp, ++ recv); ++ mrail_push_recv(recv); ++ goto exit; ++ } ++ ++ recv_ctx = comp->op_context; ++ mrail_ep = recv_ctx->ep->fid.context; ++ hdr = comp->buf; ++ ++ // TODO make rxm send buffered recv amount of data for large message ++ assert(hdr->version == MRAIL_HDR_VERSION); ++ ++ seq_no = ntohl(hdr->seq); ++ peer_info = ofi_av_get_addr(mrail_ep->util_ep.av, (int) src_addr); ++ FI_DBG(&mrail_prov, FI_LOG_CQ, ++ "ep=%p peer=%d received seq=%d, expected=%d\n", ++ mrail_ep, (int)peer_info->addr, seq_no, ++ peer_info->expected_seq_no); ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ if (seq_no == peer_info->expected_seq_no) { ++ /* This message was received in order */ ++ peer_info->expected_seq_no++; ++ /* Requesting FI_AV_TABLE from the underlying provider allows ++ * us to use src_addr as an int here. */ ++ recv = mrail_match_recv(mrail_ep, comp, (int) src_addr); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ if (recv) { ++ ret = mrail_cq_process_buf_recv(comp, recv); ++ if (ret) ++ goto exit; ++ } ++ ++ /* Process any next-in-order message that had already arrived */ ++ ret = mrail_process_ooo_recvs(mrail_ep, peer_info); ++ } else { ++ /* This message was received early. ++ * Save it into the out-of-order recv queue. ++ */ ++ mrail_save_ooo_recv(mrail_ep, peer_info, seq_no, comp); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ret = 0; ++ } ++exit: ++ return ret; ++} ++ ++static int mrail_cq_close(fid_t fid) ++{ ++ struct mrail_cq *mrail_cq = container_of(fid, struct mrail_cq, util_cq.cq_fid.fid); ++ int ret, retv = 0; ++ ++ ret = mrail_close_fids((struct fid **)mrail_cq->cqs, ++ mrail_cq->num_cqs); ++ if (ret) ++ retv = ret; ++ free(mrail_cq->cqs); ++ ++ ret = ofi_cq_cleanup(&mrail_cq->util_cq); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_cq); ++ return retv; ++} ++ ++static struct fi_ops mrail_cq_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_cq_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_cq mrail_cq_ops = { ++ .size = sizeof(struct fi_ops_cq), ++ .read = ofi_cq_read, ++ .readfrom = ofi_cq_readfrom, ++ .readerr = ofi_cq_readerr, ++ .sread = ofi_cq_sread, ++ .sreadfrom = ofi_cq_sreadfrom, ++ .signal = ofi_cq_signal, ++ // TODO define cq strerror, may need to pass rail index ++ // in err_data ++ .strerror = fi_no_cq_strerror, ++}; ++ ++static void mrail_handle_rma_completion(struct util_cq *cq, ++ struct fi_cq_tagged_entry *comp) ++{ ++ int ret; ++ struct mrail_req *req; ++ struct mrail_subreq *subreq; ++ ++ subreq = comp->op_context; ++ req = subreq->parent; ++ ++ if (ofi_atomic_dec32(&req->expected_subcomps) == 0) { ++ ret = ofi_cq_write(cq, req->comp.op_context, req->comp.flags, ++ req->comp.len, req->comp.buf, req->comp.data, ++ req->comp.tag); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Cannot write to util cq\n"); ++ /* This should not happen unless totally out of memory, ++ * in which case there is nothing we can do. */ ++ assert(0); ++ } ++ ++ if (comp->flags & FI_WRITE) ++ ofi_ep_wr_cntr_inc(&req->mrail_ep->util_ep); ++ else ++ ofi_ep_rd_cntr_inc(&req->mrail_ep->util_ep); ++ ++ mrail_free_req(req->mrail_ep, req); ++ } ++} ++ ++void mrail_poll_cq(struct util_cq *cq) ++{ ++ struct mrail_cq *mrail_cq; ++ struct mrail_tx_buf *tx_buf; ++ struct fi_cq_tagged_entry comp; ++ fi_addr_t src_addr; ++ size_t i; ++ int ret; ++ ++ mrail_cq = container_of(cq, struct mrail_cq, util_cq); ++ ++ for (i = 0; i < mrail_cq->num_cqs; i++) { ++ ret = fi_cq_readfrom(mrail_cq->cqs[i], &comp, 1, &src_addr); ++ if (ret == -FI_EAGAIN || !ret) ++ continue; ++ if (ret < 0) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to read rail completion: %s\n", ++ fi_strerror(-ret)); ++ goto err1; ++ } ++ // TODO handle variable length message ++ if (comp.flags & FI_RECV) { ++ ret = mrail_cq->process_comp(&comp, src_addr); ++ if (ret) ++ goto err1; ++ } else if (comp.flags & (FI_READ | FI_WRITE)) { ++ mrail_handle_rma_completion(cq, &comp); ++ } else if (comp.flags & FI_SEND) { ++ tx_buf = comp.op_context; ++ ++ ofi_ep_tx_cntr_inc(&tx_buf->ep->util_ep); ++ ++ if (tx_buf->flags & FI_COMPLETION) { ++ ret = ofi_cq_write(cq, tx_buf->context, ++ (tx_buf->flags & ++ (FI_TAGGED | FI_MSG)) | ++ FI_SEND, 0, NULL, 0, 0); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to write to util cq\n"); ++ goto err2; ++ } ++ } ++ ofi_ep_lock_acquire(&tx_buf->ep->util_ep); ++ util_buf_release(tx_buf->ep->tx_buf_pool, tx_buf); ++ ofi_ep_lock_release(&tx_buf->ep->util_ep); ++ } else { ++ /* We currently cannot support FI_REMOTE_READ and ++ * FI_REMOTE_WRITE because RMA operations are split ++ * across all rails. We would need to introduce some ++ * sort of protocol to keep track of remotely-initiated ++ * RMA operations. */ ++ assert(comp.flags & (FI_REMOTE_READ | FI_REMOTE_WRITE)); ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unsupported completion flag\n"); ++ } ++ } ++ ++ return; ++ ++err2: ++ ofi_ep_lock_acquire(&tx_buf->ep->util_ep); ++ util_buf_release(tx_buf->ep->tx_buf_pool, tx_buf); ++ ofi_ep_lock_release(&tx_buf->ep->util_ep); ++err1: ++ // TODO write error to cq ++ assert(0); ++} ++ ++static void mrail_cq_progress(struct util_cq *cq) ++{ ++ mrail_poll_cq(cq); ++ ++ /* Progress the bound EPs */ ++ ofi_cq_progress(cq); ++} ++ ++int mrail_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq_fid, void *context) ++{ ++ struct mrail_domain *mrail_domain; ++ struct mrail_cq *mrail_cq; ++ struct fi_cq_attr rail_cq_attr = { ++ .wait_obj = FI_WAIT_NONE, ++ .format = MRAIL_RAIL_CQ_FORMAT, ++ .size = attr->size, ++ }; ++ size_t i; ++ int ret; ++ ++ mrail_cq = calloc(1, sizeof(*mrail_cq)); ++ if (!mrail_cq) ++ return -FI_ENOMEM; ++ ++ ret = ofi_cq_init(&mrail_prov, domain, attr, &mrail_cq->util_cq, ++ &mrail_cq_progress, context); ++ if (ret) { ++ free(mrail_cq); ++ return ret; ++ } ++ ++ mrail_domain = container_of(domain, struct mrail_domain, ++ util_domain.domain_fid); ++ ++ mrail_cq->cqs = calloc(mrail_domain->num_domains, ++ sizeof(*mrail_cq->cqs)); ++ if (!mrail_cq->cqs) ++ goto err; ++ ++ mrail_cq->num_cqs = mrail_domain->num_domains; ++ ++ for (i = 0; i < mrail_cq->num_cqs; i++) { ++ ret = fi_cq_open(mrail_domain->domains[i], &rail_cq_attr, ++ &mrail_cq->cqs[i], NULL); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, ++ "Unable to open rail CQ\n"); ++ goto err; ++ } ++ } ++ ++ // TODO add regular process comp when FI_BUFFERED_RECV not set ++ mrail_cq->process_comp = mrail_handle_recv_completion; ++ ++ *cq_fid = &mrail_cq->util_cq.cq_fid; ++ (*cq_fid)->fid.ops = &mrail_cq_fi_ops; ++ (*cq_fid)->ops = &mrail_cq_ops; ++ ++ return 0; ++err: ++ mrail_cq_close(&mrail_cq->util_cq.cq_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_domain.c +new file mode 100644 +index 0000000..1b73f1c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_domain.c +@@ -0,0 +1,311 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "mrail.h" ++ ++static int mrail_domain_close(fid_t fid) ++{ ++ struct mrail_domain *mrail_domain = ++ container_of(fid, struct mrail_domain, util_domain.domain_fid.fid); ++ int ret, retv = 0; ++ ++ ret = mrail_close_fids((struct fid **)mrail_domain->domains, ++ mrail_domain->num_domains); ++ if (ret) ++ retv = ret; ++ free(mrail_domain->domains); ++ ++ ret = ofi_domain_close(&mrail_domain->util_domain); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_domain); ++ return retv; ++} ++ ++static int mrail_domain_map_raw(struct mrail_domain *mrail_domain, ++ struct fi_mr_map_raw *map) ++{ ++ struct mrail_addr_key *mr_map; ++ ++ /* Copy the raw key and use a pointer as the new key. */ ++ ++ mr_map = calloc(1, map->key_size); ++ if (!mr_map) { ++ return -FI_ENOMEM; ++ } ++ ++ memcpy(mr_map, map->raw_key, map->key_size); ++ ++ *(map->key) = (uint64_t)mr_map; ++ ++ return 0; ++} ++ ++static int mrail_domain_unmap_key(struct mrail_addr_key **mr_map) ++{ ++ assert(mr_map); ++ free(*mr_map); ++ return 0; ++} ++ ++static int mrail_domain_control(struct fid *fid, int command, void *arg) ++{ ++ struct mrail_domain *mrail_domain = container_of(fid, ++ struct mrail_domain, util_domain.domain_fid.fid); ++ ++ switch(command) { ++ case FI_MAP_RAW_MR: ++ return mrail_domain_map_raw(mrail_domain, arg); ++ case FI_UNMAP_KEY: ++ return mrail_domain_unmap_key(arg); ++ } ++ return -FI_EINVAL; ++} ++ ++static struct fi_ops mrail_domain_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_domain_close, ++ .bind = fi_no_bind, ++ .control = mrail_domain_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int mrail_mr_close(fid_t fid) ++{ ++ uint32_t i; ++ struct mrail_mr *mrail_mr = container_of(fid, struct mrail_mr, ++ mr_fid.fid); ++ ++ for (i = 0; i < mrail_mr->num_mrs; ++i) { ++ fi_close(&mrail_mr->rails[i].mr->fid); ++ } ++ return 0; ++} ++ ++static int mrail_mr_raw_attr(struct mrail_mr *mrail_mr, ++ struct fi_mr_raw_attr *attr) ++{ ++ uint32_t num_rails; ++ uint32_t i; ++ struct mrail_addr_key *rail; ++ size_t required_key_size; ++ ++ num_rails = mrail_mr->num_mrs; ++ ++ required_key_size = num_rails * sizeof(struct mrail_addr_key); ++ ++ if (*(attr->key_size) < required_key_size) { ++ *(attr->key_size) = required_key_size; ++ return -FI_ETOOSMALL; ++ } ++ ++ /* The raw key is the concatenation of one "struct mrail_addr_key" per ++ * rail. */ ++ for (i = 0, rail = (struct mrail_addr_key*)attr->raw_key; i < num_rails; ++ ++i, ++rail) { ++ rail->base_addr = mrail_mr->rails[i].base_addr; ++ rail->key = fi_mr_key(mrail_mr->rails[i].mr); ++ } ++ ++ *(attr->key_size) = required_key_size; ++ *(attr->base_addr) = 0; ++ ++ return 0; ++} ++ ++static int mrail_mr_control(struct fid *fid, int command, void *arg) ++{ ++ struct mrail_mr *mrail_mr = container_of(fid, struct mrail_mr, ++ mr_fid.fid); ++ ++ switch(command) { ++ case FI_GET_RAW_MR: ++ return mrail_mr_raw_attr(mrail_mr, arg); ++ } ++ return -FI_EINVAL; ++} ++ ++static struct fi_ops mrail_mr_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_mr_close, ++ .bind = fi_no_bind, ++ .control = mrail_mr_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int mrail_mr_reg(struct fid *domain_fid, const void *buf, size_t len, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ struct mrail_domain *mrail_domain = container_of(domain_fid, ++ struct mrail_domain, util_domain.domain_fid.fid); ++ size_t num_rails = mrail_domain->num_domains; ++ struct mrail_mr *mrail_mr; ++ struct fi_info *fi; ++ uint32_t rail; ++ int ret = 0; ++ ++ mrail_mr = calloc(1, sizeof(*mrail_mr) + ++ num_rails * sizeof(*mrail_mr->rails)); ++ if (!mrail_mr) { ++ return -FI_ENOMEM; ++ } ++ ++ for (rail = 0, fi = mrail_domain->info->next; ++ rail < mrail_domain->num_domains; ++ ++rail, fi = fi->next) { ++ ret = fi_mr_reg(mrail_domain->domains[rail], buf, len, access, ++ offset, requested_key, flags, ++ &mrail_mr->rails[rail].mr, context); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_DOMAIN, ++ "Unable to register memory, rail %" PRIu32 "\n", ++ rail); ++ goto err1; ++ } ++ mrail_mr->rails[rail].base_addr = ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR ? ++ (uint64_t)buf : 0); ++ } ++ ++ mrail_mr->mr_fid.fid.fclass = FI_CLASS_MR; ++ mrail_mr->mr_fid.fid.context = context; ++ mrail_mr->mr_fid.fid.ops = &mrail_mr_ops; ++ mrail_mr->mr_fid.mem_desc = mrail_mr; ++ mrail_mr->mr_fid.key = FI_KEY_NOTAVAIL; ++ mrail_mr->num_mrs = mrail_domain->num_domains; ++ *mr = &mrail_mr->mr_fid; ++ ++ return 0; ++err1: ++ for (; rail != 0; --rail) { ++ fi_close(&mrail_mr->rails[rail].mr->fid); ++ } ++ free(mrail_mr); ++ return ret; ++} ++ ++static struct fi_ops_mr mrail_domain_mr_ops = { ++ .size = sizeof(struct fi_ops_mr), ++ .reg = mrail_mr_reg, ++ .regv = fi_no_mr_regv, ++ .regattr = fi_no_mr_regattr, ++}; ++ ++int mrail_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, ++ struct fid_cntr **cntr_fid, void *context) ++{ ++ int ret; ++ struct util_cntr *cntr; ++ ++ cntr = calloc(1, sizeof(*cntr)); ++ if (!cntr) ++ return -FI_ENOMEM; ++ ++ ret = ofi_cntr_init(&mrail_prov, domain, attr, cntr, ++ &ofi_cntr_progress, context); ++ if (ret) ++ goto error; ++ ++ *cntr_fid = &cntr->cntr_fid; ++ return FI_SUCCESS; ++ ++error: ++ free(cntr); ++ return ret; ++} ++ ++static struct fi_ops_domain mrail_domain_ops = { ++ .size = sizeof(struct fi_ops_domain), ++ .av_open = mrail_av_open, ++ .cq_open = mrail_cq_open, ++ .endpoint = mrail_ep_open, ++ .scalable_ep = fi_no_scalable_ep, ++ .cntr_open = mrail_cntr_open, ++ .poll_open = fi_no_poll_open, ++ .stx_ctx = fi_no_stx_context, ++ .srx_ctx = fi_no_srx_context, ++ .query_atomic = fi_no_query_atomic, ++}; ++ ++int mrail_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context) ++{ ++ struct mrail_fabric *mrail_fabric = ++ container_of(fabric, struct mrail_fabric, util_fabric.fabric_fid); ++ struct mrail_domain *mrail_domain; ++ struct fi_info *fi; ++ size_t i; ++ int ret; ++ ++ assert(!strcmp(mrail_fabric->info->fabric_attr->name, info->fabric_attr->name)); ++ ++ mrail_domain = calloc(1, sizeof(*mrail_domain)); ++ if (!mrail_domain) ++ return -FI_ENOMEM; ++ ++ ret = ofi_domain_init(fabric, info, &mrail_domain->util_domain, context); ++ if (ret) { ++ free(mrail_domain); ++ return ret; ++ } ++ ++ mrail_domain->info = mrail_fabric->info; ++ mrail_domain->num_domains = mrail_fabric->num_fabrics; ++ ++ mrail_domain->domains = calloc(mrail_domain->num_domains, ++ sizeof(*mrail_domain->domains)); ++ if (!mrail_domain->domains) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ for (i = 0, fi = mrail_domain->info->next; fi; fi = fi->next, i++) { ++ ret = fi_domain(mrail_fabric->fabrics[i], fi, ++ &mrail_domain->domains[i], context); ++ if (ret) ++ goto err; ++ ++ mrail_domain->addrlen += fi->src_addrlen; ++ } ++ ++ *domain = &mrail_domain->util_domain.domain_fid; ++ (*domain)->fid.ops = &mrail_domain_fi_ops; ++ (*domain)->mr = &mrail_domain_mr_ops; ++ (*domain)->ops = &mrail_domain_ops; ++ ++ return 0; ++err: ++ mrail_domain_close(&mrail_domain->util_domain.domain_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_ep.c +new file mode 100644 +index 0000000..eae9da4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_ep.c +@@ -0,0 +1,960 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "mrail.h" ++ ++#define MRAIL_HDR_INITIALIZER(op_type, tag_val) \ ++{ \ ++ .version = MRAIL_HDR_VERSION, \ ++ .op = op_type, \ ++ .tag = tag_val, \ ++} ++ ++#define MRAIL_HDR_INITIALIZER_MSG MRAIL_HDR_INITIALIZER(ofi_op_msg, 0) ++ ++#define MRAIL_HDR_INITIALIZER_TAGGED(tag) \ ++ MRAIL_HDR_INITIALIZER(ofi_op_tagged, tag) ++ ++#define mrail_util_ep(ep_fid) \ ++ container_of(ep_fid, struct util_ep, ep_fid.fid) ++ ++#define mrail_comp_flag(ep_fid) \ ++ (mrail_util_ep(ep_fid)->tx_op_flags & FI_COMPLETION) ++ ++#define mrail_inject_flags(ep_fid) \ ++ ((mrail_util_ep(ep_fid)->tx_op_flags & ~FI_COMPLETION) | FI_INJECT) ++ ++static int mrail_match_recv_any(struct dlist_entry *item, const void *arg) ++{ ++ OFI_UNUSED(item); ++ OFI_UNUSED(arg); ++ return 1; ++} ++ ++static int mrail_match_recv_addr(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_match_attr *match_attr = (struct mrail_match_attr *)arg; ++ struct mrail_recv *recv = ++ container_of(item, struct mrail_recv, entry); ++ ++ return ofi_match_addr(recv->addr, match_attr->addr); ++} ++ ++static int mrail_match_recv_tag(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_match_attr *match_attr = (struct mrail_match_attr *)arg; ++ struct mrail_recv *recv = ++ container_of(item, struct mrail_recv, entry); ++ ++ return ofi_match_tag(recv->tag, recv->ignore, match_attr->tag); ++} ++ ++static int mrail_match_recv_addr_tag(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_match_attr *match_attr = (struct mrail_match_attr *)arg; ++ struct mrail_recv *recv = ++ container_of(item, struct mrail_recv, entry); ++ ++ return ofi_match_addr(recv->addr, match_attr->addr) && ++ ofi_match_tag(recv->tag, recv->ignore, match_attr->tag); ++} ++ ++static int mrail_match_unexp_any(struct dlist_entry *item, const void *arg) ++{ ++ OFI_UNUSED(item); ++ OFI_UNUSED(arg); ++ return 1; ++} ++ ++static int mrail_match_unexp_addr(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_recv *recv = (struct mrail_recv *)arg; ++ struct mrail_unexp_msg_entry *unexp_msg_entry = ++ container_of(item, struct mrail_unexp_msg_entry, entry); ++ ++ return ofi_match_addr(unexp_msg_entry->addr, recv->addr); ++} ++ ++static int mrail_match_unexp_tag(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_recv *recv = (struct mrail_recv *)arg; ++ struct mrail_unexp_msg_entry *unexp_msg_entry = ++ container_of(item, struct mrail_unexp_msg_entry, entry); ++ ++ return ofi_match_tag(recv->tag, recv->ignore, unexp_msg_entry->tag); ++} ++ ++static int mrail_match_unexp_addr_tag(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_recv *recv = (struct mrail_recv *)arg; ++ struct mrail_unexp_msg_entry *unexp_msg_entry = ++ container_of(item, struct mrail_unexp_msg_entry, entry); ++ ++ return ofi_match_addr(recv->addr, unexp_msg_entry->addr) && ++ ofi_match_tag(recv->tag, recv->ignore, unexp_msg_entry->tag); ++} ++ ++int mrail_reprocess_directed_recvs(struct mrail_recv_queue *recv_queue) ++{ ++ // TODO ++ return -FI_ENOSYS; ++} ++ ++struct mrail_recv * ++mrail_match_recv_handle_unexp(struct mrail_recv_queue *recv_queue, uint64_t tag, ++ uint64_t addr, char *data, size_t len, void *context) ++{ ++ struct dlist_entry *entry; ++ struct mrail_unexp_msg_entry *unexp_msg_entry; ++ struct mrail_match_attr match_attr = { ++ .tag = tag, ++ .addr = addr, ++ }; ++ ++ entry = dlist_remove_first_match(&recv_queue->recv_list, ++ recv_queue->match_recv, &match_attr); ++ if (OFI_UNLIKELY(!entry)) { ++ unexp_msg_entry = recv_queue->get_unexp_msg_entry(recv_queue, ++ context); ++ if (!unexp_msg_entry) { ++ FI_WARN(recv_queue->prov, FI_LOG_CQ, ++ "Unable to get unexp_msg_entry!"); ++ assert(0); ++ return NULL; ++ } ++ ++ unexp_msg_entry->addr = addr; ++ unexp_msg_entry->tag = tag; ++ unexp_msg_entry->context = context; ++ memcpy(unexp_msg_entry->data, data, len); ++ ++ FI_DBG(recv_queue->prov, FI_LOG_CQ, "No matching recv found for" ++ " incoming msg with addr: 0x%" PRIx64 " tag: 0x%" PRIx64 ++ "\n", unexp_msg_entry->addr, unexp_msg_entry->tag); ++ ++ FI_DBG(recv_queue->prov, FI_LOG_CQ, "Enqueueing unexp_msg_entry to " ++ "unexpected msg list\n"); ++ ++ dlist_insert_tail(&unexp_msg_entry->entry, ++ &recv_queue->unexp_msg_list); ++ return NULL; ++ } ++ return container_of(entry, struct mrail_recv, entry); ++} ++ ++static void mrail_init_recv(struct mrail_recv *recv, void *arg) ++{ ++ recv->ep = arg; ++ recv->iov[0].iov_base = &recv->hdr; ++ recv->iov[0].iov_len = sizeof(recv->hdr); ++ recv->comp_flags = FI_RECV; ++} ++ ++#define mrail_recv_assert(recv) \ ++({ \ ++ assert(recv->ep == mrail_ep); \ ++ assert(recv->iov[0].iov_base == &recv->hdr); \ ++ assert(recv->iov[0].iov_len == sizeof(recv->hdr)); \ ++ assert(recv->comp_flags & FI_RECV); \ ++ assert(recv->count <= mrail_ep->info->rx_attr->iov_limit + 1); \ ++}) ++ ++static void mrail_recv_queue_init(struct fi_provider *prov, ++ struct mrail_recv_queue *recv_queue, ++ dlist_func_t match_recv, ++ dlist_func_t match_unexp, ++ mrail_get_unexp_msg_entry_func get_unexp_msg_entry) ++{ ++ recv_queue->prov = prov; ++ dlist_init(&recv_queue->recv_list); ++ dlist_init(&recv_queue->unexp_msg_list); ++ recv_queue->match_recv = match_recv; ++ recv_queue->match_unexp = match_unexp; ++ recv_queue->get_unexp_msg_entry = get_unexp_msg_entry; ++} ++ ++// TODO go for separate recv functions (recvmsg, recvv, etc) to be optimal ++static ssize_t ++mrail_recv_common(struct mrail_ep *mrail_ep, struct mrail_recv_queue *recv_queue, ++ struct iovec *iov, size_t count, void *context, ++ fi_addr_t src_addr, uint64_t tag, uint64_t ignore, ++ uint64_t flags, uint64_t comp_flags) ++{ ++ struct mrail_recv *recv; ++ struct mrail_unexp_msg_entry *unexp_msg_entry; ++ ++ recv = mrail_pop_recv(mrail_ep); ++ if (!recv) ++ return -FI_EAGAIN; ++ ++ recv->count = count + 1; ++ recv->context = context; ++ recv->flags = flags; ++ recv->comp_flags |= comp_flags; ++ recv->addr = src_addr; ++ recv->tag = tag; ++ recv->ignore = ignore; ++ ++ memcpy(&recv->iov[1], iov, sizeof(*iov) * count); ++ ++ FI_DBG(&mrail_prov, FI_LOG_EP_DATA, "Posting recv of length: %zu " ++ "src_addr: 0x%" PRIx64 " tag: 0x%" PRIx64 " ignore: 0x%" PRIx64 ++ "\n", ofi_total_iov_len(iov, count), recv->addr, ++ recv->tag, recv->ignore); ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ unexp_msg_entry = container_of(dlist_remove_first_match( ++ &recv_queue->unexp_msg_list, ++ recv_queue->match_unexp, ++ recv), ++ struct mrail_unexp_msg_entry, ++ entry); ++ if (!unexp_msg_entry) { ++ dlist_insert_tail(&recv->entry, &recv_queue->recv_list); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return 0; ++ } ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ FI_DBG(recv_queue->prov, FI_LOG_EP_DATA, "Match for posted recv" ++ " with addr: 0x%" PRIx64 ", tag: 0x%" PRIx64 " ignore: " ++ "0x%" PRIx64 " found in unexpected msg queue\n", ++ recv->addr, recv->tag, recv->ignore); ++ ++ return mrail_cq_process_buf_recv((struct fi_cq_tagged_entry *) ++ unexp_msg_entry->data, recv); ++} ++ ++static ssize_t mrail_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ struct iovec iov = { ++ .iov_base = buf, ++ .iov_len = len, ++ }; ++ return mrail_recv_common(mrail_ep, &mrail_ep->recv_queue, &iov, ++ 1, context, src_addr, 0, 0, ++ mrail_ep->util_ep.rx_op_flags, FI_MSG); ++} ++ ++static ssize_t mrail_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ ++ return mrail_recv_common(mrail_ep, &mrail_ep->recv_queue, ++ (struct iovec *)msg->msg_iov, msg->iov_count, ++ msg->context, msg->addr, 0, 0, flags, FI_MSG); ++} ++ ++static ssize_t mrail_trecv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, uint64_t tag, ++ uint64_t ignore, void *context) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ struct iovec iov = { ++ .iov_base = buf, ++ .iov_len = len, ++ }; ++ return mrail_recv_common(mrail_ep, &mrail_ep->trecv_queue, &iov, ++ 1, context, src_addr, tag, ignore, ++ mrail_ep->util_ep.rx_op_flags, FI_TAGGED); ++} ++ ++static ssize_t mrail_trecvmsg(struct fid_ep *ep_fid, ++ const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ ++ return mrail_recv_common(mrail_ep, &mrail_ep->trecv_queue, ++ (struct iovec *)msg->msg_iov, msg->iov_count, ++ msg->context, msg->addr, msg->tag, ++ msg->ignore, ++ (mrail_ep->util_ep.rx_op_flags | flags), ++ FI_TAGGED); ++} ++ ++static void mrail_copy_iov_hdr(struct mrail_hdr *hdr, struct iovec *iov_dest, ++ const struct iovec *iov_src, size_t count) ++{ ++ iov_dest[0].iov_base = hdr; ++ iov_dest[0].iov_len = sizeof(*hdr); ++ memcpy(&iov_dest[1], iov_src, sizeof(*iov_src) * count); ++} ++ ++static struct mrail_tx_buf *mrail_get_tx_buf(struct mrail_ep *mrail_ep, ++ void *context, uint32_t seq, ++ uint8_t op, uint64_t flags) ++{ ++ struct mrail_tx_buf *tx_buf = util_buf_alloc(mrail_ep->tx_buf_pool); ++ if (OFI_UNLIKELY(!tx_buf)) ++ return NULL; ++ ++ assert(tx_buf->ep == mrail_ep); ++ assert(tx_buf->hdr.version == MRAIL_HDR_VERSION); ++ ++ tx_buf->context = context; ++ tx_buf->flags = flags; ++ tx_buf->hdr.op = op; ++ tx_buf->hdr.seq = htonl(seq); ++ return tx_buf; ++} ++ ++static ssize_t ++mrail_send_common(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, size_t len, fi_addr_t dest_addr, uint64_t data, ++ void *context, uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ struct mrail_peer_info *peer_info; ++ struct iovec *iov_dest = alloca(sizeof(*iov_dest) * (count + 1)); ++ struct mrail_tx_buf *tx_buf; ++ uint32_t i = mrail_get_tx_rail(mrail_ep); ++ struct fi_msg msg; ++ ssize_t ret; ++ ++ peer_info = ofi_av_get_addr(mrail_ep->util_ep.av, (int) dest_addr); ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ ++ tx_buf = mrail_get_tx_buf(mrail_ep, context, peer_info->seq_no++, ++ ofi_op_msg, flags | FI_MSG); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ mrail_copy_iov_hdr(&tx_buf->hdr, iov_dest, iov, count); ++ ++ msg.msg_iov = iov_dest; ++ msg.desc = desc; ++ msg.iov_count = count + 1; ++ msg.addr = dest_addr; ++ msg.context = tx_buf; ++ msg.data = data; ++ ++ if (len < mrail_ep->rails[i].info->tx_attr->inject_size) ++ flags |= FI_INJECT; ++ ++ FI_DBG(&mrail_prov, FI_LOG_EP_DATA, "Posting send of length: %" PRIu64 ++ " dest_addr: 0x%" PRIx64 " seq: %d on rail: %d\n", ++ len, dest_addr, peer_info->seq_no - 1, i); ++ ++ ret = fi_sendmsg(mrail_ep->rails[i].ep, &msg, flags); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_DATA, ++ "Unable to fi_sendmsg on rail: %" PRIu32 "\n", i); ++ goto err2; ++ } else if (!(flags & FI_COMPLETION)) { ++ ofi_ep_tx_cntr_inc(&mrail_ep->util_ep); ++ } ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return ret; ++err2: ++ util_buf_release(mrail_ep->tx_buf_pool, tx_buf); ++err1: ++ peer_info->seq_no--; ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return ret; ++} ++ ++static ssize_t ++mrail_tsend_common(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, size_t len, fi_addr_t dest_addr, uint64_t tag, ++ uint64_t data, void *context, uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ struct mrail_peer_info *peer_info; ++ struct iovec *iov_dest = alloca(sizeof(*iov_dest) * (count + 1)); ++ struct mrail_tx_buf *tx_buf; ++ uint32_t i = mrail_get_tx_rail(mrail_ep); ++ struct fi_msg msg; ++ ssize_t ret; ++ ++ peer_info = ofi_av_get_addr(mrail_ep->util_ep.av, (int) dest_addr); ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ ++ tx_buf = mrail_get_tx_buf(mrail_ep, context, peer_info->seq_no++, ++ ofi_op_tagged, flags | FI_TAGGED); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ tx_buf->hdr.tag = tag; ++ mrail_copy_iov_hdr(&tx_buf->hdr, iov_dest, iov, count); ++ ++ msg.msg_iov = iov_dest; ++ msg.desc = desc; ++ msg.iov_count = count + 1; ++ msg.addr = dest_addr; ++ msg.context = tx_buf; ++ msg.data = data; ++ ++ if (len < mrail_ep->rails[i].info->tx_attr->inject_size) ++ flags |= FI_INJECT; ++ ++ FI_DBG(&mrail_prov, FI_LOG_EP_DATA, "Posting tsend of length: %" PRIu64 ++ " dest_addr: 0x%" PRIx64 " tag: 0x%" PRIx64 " seq: %d" ++ " on rail: %d\n", len, dest_addr, tag, peer_info->seq_no - 1, i); ++ ++ ret = fi_sendmsg(mrail_ep->rails[i].ep, &msg, flags); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_DATA, ++ "Unable to fi_sendmsg on rail: %" PRIu32 "\n", i); ++ goto err2; ++ } else if (!(flags & FI_COMPLETION)) { ++ ofi_ep_tx_cntr_inc(&mrail_ep->util_ep); ++ } ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return ret; ++err2: ++ util_buf_release(mrail_ep->tx_buf_pool, tx_buf); ++err1: ++ peer_info->seq_no--; ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return ret; ++} ++ ++static ssize_t mrail_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ return mrail_send_common(ep_fid, msg->msg_iov, msg->desc, msg->iov_count, ++ ofi_total_iov_len(msg->msg_iov, msg->iov_count), ++ msg->addr, msg->data, msg->context, ++ flags | mrail_comp_flag(ep_fid)); ++} ++ ++static ssize_t mrail_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_send_common(ep_fid, &iov, &desc, 1, len, dest_addr, 0, ++ context, mrail_comp_flag(ep_fid)); ++} ++ ++static ssize_t mrail_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_send_common(ep_fid, &iov, NULL, 1, len, dest_addr, 0, ++ NULL, mrail_inject_flags(ep_fid)); ++} ++ ++static ssize_t mrail_injectdata(struct fid_ep *ep_fid, const void *buf, ++ size_t len, uint64_t data, fi_addr_t dest_addr) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_send_common(ep_fid, &iov, NULL, 1, len, dest_addr, data, ++ NULL, (mrail_inject_flags(ep_fid) | ++ FI_REMOTE_CQ_DATA)); ++} ++ ++static ssize_t ++mrail_tsendmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ return mrail_tsend_common(ep_fid, msg->msg_iov, msg->desc, msg->iov_count, ++ ofi_total_iov_len(msg->msg_iov, msg->iov_count), ++ msg->addr, msg->tag, msg->data, msg->context, ++ flags | mrail_comp_flag(ep_fid)); ++} ++ ++static ssize_t mrail_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, ++ void *context) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_tsend_common(ep_fid, &iov, &desc, 1, len, dest_addr, tag, ++ 0, context, mrail_comp_flag(ep_fid)); ++} ++ ++static ssize_t mrail_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_tsend_common(ep_fid, &iov, &desc, 1, len, dest_addr, tag, ++ data, context, (mrail_comp_flag(ep_fid) | ++ FI_REMOTE_CQ_DATA)); ++} ++ ++static ssize_t mrail_tinject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_tsend_common(ep_fid, &iov, NULL, 1, len, dest_addr, tag, ++ 0, NULL, mrail_inject_flags(ep_fid)); ++} ++ ++static ssize_t mrail_tinjectdata(struct fid_ep *ep_fid, const void *buf, ++ size_t len, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_tsend_common(ep_fid, &iov, NULL, 1, len, dest_addr, tag, ++ data, NULL, (mrail_inject_flags(ep_fid) | ++ FI_REMOTE_CQ_DATA)); ++} ++ ++static struct mrail_unexp_msg_entry * ++mrail_get_unexp_msg_entry(struct mrail_recv_queue *recv_queue, void *context) ++{ ++ // TODO use buf pool ++ // context would be mrail_ep from which u can get the buf pool ++ struct mrail_unexp_msg_entry *unexp_msg_entry = ++ malloc(sizeof(*unexp_msg_entry) + sizeof(struct fi_cq_tagged_entry)); ++ return unexp_msg_entry; ++} ++ ++static int mrail_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ struct mrail_ep *mrail_ep = ++ container_of(fid, struct mrail_ep, util_ep.ep_fid.fid); ++ struct mrail_domain *mrail_domain = ++ container_of(mrail_ep->util_ep.domain, struct mrail_domain, ++ util_domain); ++ size_t i, offset = 0, rail_addrlen; ++ int ret; ++ ++ if (*addrlen < mrail_domain->addrlen) ++ return -FI_ETOOSMALL; ++ ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ rail_addrlen = *addrlen - offset; ++ ret = fi_getname(&mrail_ep->rails[i].ep->fid, ++ (char *)addr + offset, &rail_addrlen); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, ++ "Unable to get name for rail: %zd\n", i); ++ return ret; ++ } ++ offset += rail_addrlen; ++ } ++ return 0; ++} ++ ++ ++static void mrail_tx_buf_init(void *pool_ctx, void *buf) ++{ ++ struct mrail_ep *mrail_ep = pool_ctx; ++ struct mrail_tx_buf *tx_buf = buf; ++ ++ tx_buf->ep = mrail_ep; ++ tx_buf->hdr.version = MRAIL_HDR_VERSION; ++} ++ ++static void mrail_ep_free_bufs(struct mrail_ep *mrail_ep) ++{ ++ if (mrail_ep->req_pool) ++ util_buf_pool_destroy(mrail_ep->req_pool); ++ ++ if (mrail_ep->ooo_recv_pool) ++ util_buf_pool_destroy(mrail_ep->ooo_recv_pool); ++ ++ if (mrail_ep->tx_buf_pool) ++ util_buf_pool_destroy(mrail_ep->tx_buf_pool); ++ ++ if (mrail_ep->recv_fs) ++ mrail_recv_fs_free(mrail_ep->recv_fs); ++} ++ ++static int mrail_ep_alloc_bufs(struct mrail_ep *mrail_ep) ++{ ++ struct util_buf_attr attr = { ++ .size = sizeof(struct mrail_tx_buf), ++ .alignment = sizeof(void *), ++ .max_cnt = 0, ++ .chunk_cnt = 64, ++ .alloc_hndlr = NULL, ++ .free_hndlr = NULL, ++ .init = mrail_tx_buf_init, ++ .ctx = mrail_ep, ++ }; ++ size_t buf_size, rxq_total_size = 0; ++ struct fi_info *fi; ++ int ret; ++ ++ for (fi = mrail_ep->info->next; fi; fi = fi->next) ++ rxq_total_size += fi->rx_attr->size; ++ ++ mrail_ep->recv_fs = mrail_recv_fs_create(rxq_total_size, mrail_init_recv, ++ mrail_ep); ++ if (!mrail_ep->recv_fs) ++ return -FI_ENOMEM; ++ ++ ret = util_buf_pool_create(&mrail_ep->ooo_recv_pool, ++ sizeof(struct mrail_ooo_recv), ++ sizeof(void *), 0, 64); ++ if (!mrail_ep->ooo_recv_pool) ++ goto err; ++ ++ ret = util_buf_pool_create_attr(&attr, &mrail_ep->tx_buf_pool); ++ if (!mrail_ep->tx_buf_pool) ++ goto err; ++ ++ buf_size = (sizeof(struct mrail_req) + ++ (mrail_ep->num_eps * sizeof(struct mrail_subreq))); ++ ++ ret = util_buf_pool_create(&mrail_ep->req_pool, buf_size, ++ sizeof(void *), 0, 64); ++ if (ret) ++ goto err; ++ return 0; ++err: ++ mrail_ep_free_bufs(mrail_ep); ++ return ret; ++} ++ ++static int mrail_ep_close(fid_t fid) ++{ ++ struct mrail_ep *mrail_ep = ++ container_of(fid, struct mrail_ep, util_ep.ep_fid.fid); ++ int ret, retv = 0; ++ size_t i; ++ ++ mrail_ep_free_bufs(mrail_ep); ++ ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_close(&mrail_ep->rails[i].ep->fid); ++ if (ret) ++ retv = ret; ++ } ++ free(mrail_ep->rails); ++ ++ ret = ofi_endpoint_close(&mrail_ep->util_ep); ++ if (ret) ++ retv = ret; ++ free(mrail_ep); ++ return retv; ++} ++ ++static int mrail_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = ++ container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ struct mrail_cq *mrail_cq; ++ struct mrail_av *mrail_av; ++ struct util_cntr *cntr; ++ int ret = 0; ++ size_t i; ++ ++ switch (bfid->fclass) { ++ case FI_CLASS_AV: ++ mrail_av = container_of(bfid, struct mrail_av, ++ util_av.av_fid.fid); ++ ret = ofi_ep_bind_av(&mrail_ep->util_ep, &mrail_av->util_av); ++ if (ret) ++ return ret; ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_ep_bind(mrail_ep->rails[i].ep, ++ &mrail_av->avs[i]->fid, flags); ++ if (ret) ++ return ret; ++ } ++ break; ++ case FI_CLASS_CQ: ++ mrail_cq = container_of(bfid, struct mrail_cq, ++ util_cq.cq_fid.fid); ++ ++ ret = ofi_ep_bind_cq(&mrail_ep->util_ep, &mrail_cq->util_cq, ++ flags); ++ if (ret) ++ return ret; ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_ep_bind(mrail_ep->rails[i].ep, ++ &mrail_cq->cqs[i]->fid, flags); ++ if (ret) ++ return ret; ++ } ++ break; ++ case FI_CLASS_CNTR: ++ cntr = container_of(bfid, struct util_cntr, cntr_fid.fid); ++ ++ ret = ofi_ep_bind_cntr(&mrail_ep->util_ep, cntr, flags); ++ if (ret) ++ return ret; ++ break; ++ case FI_CLASS_EQ: ++ ret = -FI_ENOSYS; ++ break; ++ default: ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, "invalid fid class\n"); ++ ret = -FI_EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++static int mrail_ep_ctrl(struct fid *fid, int command, void *arg) ++{ ++ struct mrail_ep *mrail_ep; ++ size_t i, buf_recv_min = sizeof(struct mrail_hdr); ++ int ret; ++ ++ mrail_ep = container_of(fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ switch (command) { ++ case FI_ENABLE: ++ if (!mrail_ep->util_ep.rx_cq || !mrail_ep->util_ep.tx_cq) ++ return -FI_ENOCQ; ++ if (!mrail_ep->util_ep.av) ++ return -FI_ENOAV; ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_setopt(&mrail_ep->rails[i].ep->fid, ++ FI_OPT_ENDPOINT, FI_OPT_BUFFERED_MIN, ++ &buf_recv_min, sizeof(buf_recv_min)); ++ if (ret) ++ return ret; ++ ++ ret = fi_enable(mrail_ep->rails[i].ep); ++ if (ret) ++ return ret; ++ } ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ return 0; ++} ++ ++static struct fi_ops mrail_ep_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_ep_close, ++ .bind = mrail_ep_bind, ++ .control = mrail_ep_ctrl, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int mrail_ep_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) ++{ ++ struct mrail_ep *mrail_ep; ++ size_t i; ++ int ret = 0; ++ ++ mrail_ep = container_of(fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_setopt(&mrail_ep->rails[i].ep->fid, level, optname, ++ optval, optlen); ++ if (ret) ++ return ret; ++ } ++ ++ return ret; ++} ++ ++static struct fi_ops_ep mrail_ops_ep = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = fi_no_cancel, ++ .getopt = fi_no_getopt, ++ .setopt = mrail_ep_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++static struct fi_ops_cm mrail_ops_cm = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = fi_no_setname, ++ .getname = mrail_getname, ++ .getpeer = fi_no_getpeer, ++ .connect = fi_no_connect, ++ .listen = fi_no_listen, ++ .accept = fi_no_accept, ++ .reject = fi_no_reject, ++ .shutdown = fi_no_shutdown, ++ .join = fi_no_join, ++}; ++ ++static struct fi_ops_msg mrail_ops_msg = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = mrail_recv, ++ .recvv = fi_no_msg_recvv, ++ .recvmsg = mrail_recvmsg, ++ .send = mrail_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = mrail_sendmsg, ++ .inject = mrail_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = mrail_injectdata, ++}; ++ ++struct fi_ops_tagged mrail_ops_tagged = { ++ .size = sizeof(struct fi_ops_tagged), ++ .recv = mrail_trecv, ++ .recvv = fi_no_tagged_recvv, ++ .recvmsg = mrail_trecvmsg, ++ .send = mrail_tsend, ++ .sendv = fi_no_tagged_sendv, ++ .sendmsg = mrail_tsendmsg, ++ .inject = mrail_tinject, ++ .senddata = mrail_tsenddata, ++ .injectdata = mrail_tinjectdata, ++}; ++ ++void mrail_ep_progress(struct util_ep *ep) ++{ ++ struct mrail_ep *mrail_ep; ++ mrail_ep = container_of(ep, struct mrail_ep, util_ep); ++ mrail_progress_deferred_reqs(mrail_ep); ++} ++ ++int mrail_ep_open(struct fid_domain *domain_fid, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context) ++{ ++ struct mrail_domain *mrail_domain = ++ container_of(domain_fid, struct mrail_domain, ++ util_domain.domain_fid); ++ struct mrail_ep *mrail_ep; ++ struct fi_info *fi; ++ size_t i; ++ int ret; ++ ++ if (strcmp(mrail_domain->info->domain_attr->name, ++ info->domain_attr->name)) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, "info domain name: %s " ++ "doesn't match fid_domain name: %s!\n", ++ info->domain_attr->name, ++ mrail_domain->info->domain_attr->name); ++ return -FI_EINVAL; ++ } ++ ++ mrail_ep = calloc(1, sizeof(*mrail_ep)); ++ if (!mrail_ep) ++ return -FI_ENOMEM; ++ ++ // TODO detect changes b/w mrail_domain->info and info arg ++ // this may be difficult and we may not support such changes ++ mrail_ep->info = mrail_domain->info; ++ mrail_ep->num_eps = mrail_domain->num_domains; ++ ++ ret = ofi_endpoint_init(domain_fid, &mrail_util_prov, info, &mrail_ep->util_ep, ++ context, &mrail_ep_progress); ++ if (ret) { ++ goto free_ep; ++ } ++ ++ mrail_ep->rails = calloc(mrail_ep->num_eps, sizeof(*mrail_ep->rails)); ++ if (!mrail_ep->rails) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ for (i = 0, fi = mrail_ep->info->next; fi; fi = fi->next, i++) { ++ fi->tx_attr->op_flags &= ~FI_COMPLETION; ++ ret = fi_endpoint(mrail_domain->domains[i], fi, ++ &mrail_ep->rails[i].ep, mrail_ep); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, ++ "Unable to open EP\n"); ++ goto err; ++ } ++ mrail_ep->rails[i].info = fi; ++ } ++ ++ ret = mrail_ep_alloc_bufs(mrail_ep); ++ if (ret) ++ goto err; ++ ++ slist_init(&mrail_ep->deferred_reqs); ++ ++ if (mrail_ep->info->caps & FI_DIRECTED_RECV) { ++ mrail_recv_queue_init(&mrail_prov, &mrail_ep->recv_queue, ++ mrail_match_recv_addr, ++ mrail_match_unexp_addr, ++ mrail_get_unexp_msg_entry); ++ mrail_recv_queue_init(&mrail_prov, &mrail_ep->trecv_queue, ++ mrail_match_recv_addr_tag, ++ mrail_match_unexp_addr_tag, ++ mrail_get_unexp_msg_entry); ++ } else { ++ mrail_recv_queue_init(&mrail_prov, &mrail_ep->recv_queue, ++ mrail_match_recv_any, ++ mrail_match_unexp_any, ++ mrail_get_unexp_msg_entry); ++ mrail_recv_queue_init(&mrail_prov, &mrail_ep->trecv_queue, ++ mrail_match_recv_tag, ++ mrail_match_unexp_tag, ++ mrail_get_unexp_msg_entry); ++ } ++ ++ ofi_atomic_initialize32(&mrail_ep->tx_rail, 0); ++ ofi_atomic_initialize32(&mrail_ep->rx_rail, 0); ++ ++ *ep_fid = &mrail_ep->util_ep.ep_fid; ++ (*ep_fid)->fid.ops = &mrail_ep_fi_ops; ++ (*ep_fid)->ops = &mrail_ops_ep; ++ (*ep_fid)->cm = &mrail_ops_cm; ++ (*ep_fid)->msg = &mrail_ops_msg; ++ (*ep_fid)->tagged = &mrail_ops_tagged; ++ (*ep_fid)->rma = &mrail_ops_rma; ++ ++ return 0; ++err: ++ mrail_ep_close(&mrail_ep->util_ep.ep_fid.fid); ++free_ep: ++ free(mrail_ep); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_fabric.c +new file mode 100644 +index 0000000..14eb7d3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_fabric.c +@@ -0,0 +1,122 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "mrail.h" ++ ++static int mrail_fabric_close(fid_t fid) ++{ ++ struct mrail_fabric *mrail_fabric = ++ container_of(fid, struct mrail_fabric, util_fabric.fabric_fid.fid); ++ int ret, retv = 0; ++ ++ ret = mrail_close_fids((struct fid **)mrail_fabric->fabrics, ++ mrail_fabric->num_fabrics); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_fabric->fabrics); ++ ++ ret = ofi_fabric_close(&mrail_fabric->util_fabric); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_fabric); ++ return retv; ++} ++ ++static struct fi_ops mrail_fabric_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_fabric_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_fabric mrail_fabric_ops = { ++ .size = sizeof(struct fi_ops_fabric), ++ .domain = mrail_domain_open, ++ .passive_ep = fi_no_passive_ep, ++ .eq_open = ofi_eq_create, ++ .wait_open = ofi_wait_fd_open, ++ .trywait = ofi_trywait ++}; ++ ++int mrail_fabric_open(struct fi_fabric_attr *attr, struct fid_fabric **fabric, ++ void *context) ++{ ++ struct fi_info *fi; ++ struct mrail_fabric *mrail_fabric; ++ size_t i; ++ int ret; ++ ++ mrail_fabric = calloc(1, sizeof(*mrail_fabric)); ++ if (!mrail_fabric) ++ return -FI_ENOMEM; ++ ++ mrail_fabric->info = mrail_get_info_cached(attr->name); ++ if (!mrail_fabric->info) { ++ free(mrail_fabric); ++ return -FI_EINVAL; ++ } ++ ++ ret = ofi_fabric_init(&mrail_prov, &mrail_fabric_attr, attr, ++ &mrail_fabric->util_fabric, context); ++ if (ret) { ++ free(mrail_fabric); ++ return ret; ++ } ++ ++ for (fi = mrail_fabric->info->next; fi; fi = fi->next) ++ mrail_fabric->num_fabrics++; ++ ++ mrail_fabric->fabrics = calloc(mrail_fabric->num_fabrics, ++ sizeof(*mrail_fabric->fabrics)); ++ if (!mrail_fabric->fabrics) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ for (i = 0, fi = mrail_fabric->info->next; fi; fi = fi->next, i++) { ++ ret = fi_fabric(fi->fabric_attr, &mrail_fabric->fabrics[i], context); ++ if (ret) ++ goto err; ++ } ++ ++ *fabric = &mrail_fabric->util_fabric.fabric_fid; ++ (*fabric)->fid.ops = &mrail_fabric_fi_ops; ++ (*fabric)->ops = &mrail_fabric_ops; ++ ++ return 0; ++err: ++ mrail_fabric_close(&mrail_fabric->util_fabric.fabric_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_init.c +new file mode 100644 +index 0000000..eaec964 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_init.c +@@ -0,0 +1,363 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "mrail.h" ++ ++static char **mrail_addr_strv = NULL; ++/* Not thread safe */ ++struct fi_info *mrail_info_vec[MRAIL_MAX_INFO] = {0}; ++size_t mrail_num_info = 0; ++ ++static inline char **mrail_split_addr_strc(const char *addr_strc) ++{ ++ char **addr_strv = ofi_split_and_alloc(addr_strc, ",", NULL); ++ if (!addr_strv) { ++ FI_WARN(&mrail_prov, FI_LOG_CORE, ++ "Unable to split a FI_ADDR_STRV string\n"); ++ return NULL; ++ } ++ return addr_strv; ++} ++ ++static int mrail_parse_env_vars(void) ++{ ++ char *addr_strc; ++ int ret; ++ ++ fi_param_define(&mrail_prov, "addr_strc", FI_PARAM_STRING, "List of rail" ++ " addresses of format FI_ADDR_STR delimited by comma"); ++ ret = fi_param_get_str(&mrail_prov, "addr_strc", &addr_strc); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CORE, "Unable to read " ++ "OFI_MRAIL_ADDR_STRC env variable\n"); ++ return ret; ++ } ++ mrail_addr_strv = mrail_split_addr_strc(addr_strc); ++ if (!mrail_addr_strv) ++ return -FI_ENOMEM; ++ return 0; ++} ++ ++int mrail_get_core_info(uint32_t version, const char *node, const char *service, ++ uint64_t flags, const struct fi_info *hints, ++ struct fi_info **core_info) ++{ ++ struct fi_info *core_hints, *info, *fi = NULL; ++ size_t i; ++ int ret = 0; ++ ++ if (!mrail_addr_strv) { ++ FI_WARN(&mrail_prov, FI_LOG_FABRIC, ++ "OFI_MRAIL_ADDR_STRC env variable not set!\n"); ++ return -FI_ENODATA; ++ } ++ ++ core_hints = fi_dupinfo(hints); ++ if (!core_hints) ++ return -FI_ENOMEM; ++ ++ if (!hints) { ++ core_hints->mode = MRAIL_PASSTHRU_MODES; ++ assert(core_hints->domain_attr); ++ core_hints->domain_attr->mr_mode = MRAIL_PASSTHRU_MR_MODES; ++ } else { ++ if (hints->tx_attr) { ++ if (hints->tx_attr->iov_limit) ++ core_hints->tx_attr->iov_limit = ++ hints->tx_attr->iov_limit + 1; ++ if (hints->rx_attr->iov_limit) ++ core_hints->rx_attr->iov_limit = ++ hints->rx_attr->iov_limit + 1; ++ core_hints->tx_attr->op_flags &= ~FI_COMPLETION; ++ } ++ } ++ ++ core_hints->mode |= FI_BUFFERED_RECV; ++ core_hints->caps |= FI_SOURCE; ++ ++ if (!core_hints->fabric_attr) { ++ core_hints->fabric_attr = calloc(1, sizeof(*core_hints->fabric_attr)); ++ if (!core_hints->fabric_attr) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ } ++ ++ if (!core_hints->domain_attr) { ++ core_hints->domain_attr = calloc(1, sizeof(*core_hints->domain_attr)); ++ if (!core_hints->domain_attr) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ } ++ core_hints->domain_attr->av_type = FI_AV_TABLE; ++ ++ ret = ofi_exclude_prov_name(&core_hints->fabric_attr->prov_name, ++ mrail_prov.name); ++ if (ret) ++ goto out; ++ ++ for (i = 0; mrail_addr_strv[i]; i++) { ++ free(core_hints->src_addr); ++ ret = ofi_str_toaddr(mrail_addr_strv[i], ++ &core_hints->addr_format, ++ &core_hints->src_addr, ++ &core_hints->src_addrlen); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_FABRIC, ++ "Unable to convert FI_ADDR_STR to device " ++ "specific address\n"); ++ goto err; ++ } ++ ++ FI_DBG(&mrail_prov, FI_LOG_CORE, ++ "--- Begin fi_getinfo for rail: %zd ---\n", i); ++ ++ ret = fi_getinfo(version, NULL, NULL, 0, core_hints, &info); ++ ++ FI_DBG(&mrail_prov, FI_LOG_CORE, ++ "--- End fi_getinfo for rail: %zd ---\n", i); ++ if (ret) ++ goto err; ++ ++ if (!fi) ++ *core_info = info; ++ else ++ fi->next = info; ++ fi = info; ++ ++ /* We only want the first fi_info entry per rail */ ++ if (info->next) { ++ fi_freeinfo(info->next); ++ info->next = NULL; ++ } ++ ++ } ++ goto out; ++err: ++ if (fi) ++ fi_freeinfo(*core_info); ++out: ++ fi_freeinfo(core_hints); ++ return ret; ++} ++ ++static struct fi_info *mrail_dupinfo(const struct fi_info *info) ++{ ++ struct fi_info *dup, *fi, *head = NULL; ++ ++ while (info) { ++ if (!(dup = fi_dupinfo(info))) ++ goto err; ++ if (!head) ++ head = fi = dup; ++ else ++ fi->next = dup; ++ fi = dup; ++ info = info->next; ++ } ++ return head; ++err: ++ fi_freeinfo(head); ++ return NULL; ++} ++ ++static void mrail_adjust_info(struct fi_info *info, const struct fi_info *hints) ++{ ++ info->mode &= ~FI_BUFFERED_RECV; ++ ++ if (!hints) ++ return; ++ ++ if (hints->domain_attr) { ++ if (hints->domain_attr->av_type) ++ info->domain_attr->av_type = hints->domain_attr->av_type; ++ } ++ ++ if (hints->tx_attr) { ++ if (hints->tx_attr->op_flags & FI_COMPLETION) ++ info->tx_attr->op_flags |= FI_COMPLETION; ++ } ++} ++ ++static struct fi_info *mrail_get_prefix_info(struct fi_info *core_info) ++{ ++ struct fi_info *fi; ++ uint32_t num_rails; ++ ++ for (fi = core_info, num_rails = 0; fi; fi = fi->next, ++num_rails) ++ ; ++ ++ fi = fi_dupinfo(core_info); ++ if (!fi) ++ return NULL; ++ ++ free(fi->fabric_attr->name); ++ free(fi->domain_attr->name); ++ ++ fi->fabric_attr->name = NULL; ++ fi->domain_attr->name = NULL; ++ ++ fi->fabric_attr->name = strdup(mrail_info.fabric_attr->name); ++ if (!fi->fabric_attr->name) ++ goto err; ++ ++ fi->domain_attr->name = strdup(mrail_info.domain_attr->name); ++ if (!fi->domain_attr->name) ++ goto err; ++ ++ fi->ep_attr->protocol = mrail_info.ep_attr->protocol; ++ fi->ep_attr->protocol_version = mrail_info.ep_attr->protocol_version; ++ fi->fabric_attr->prov_version = FI_VERSION(MRAIL_MAJOR_VERSION, ++ MRAIL_MINOR_VERSION); ++ fi->domain_attr->mr_key_size = (num_rails * ++ sizeof(struct mrail_addr_key)); ++ fi->domain_attr->mr_mode |= FI_MR_RAW; ++ ++ /* Account for one iovec buffer used for mrail header */ ++ assert(fi->tx_attr->iov_limit); ++ fi->tx_attr->iov_limit--; ++ ++ /* Claiming messages larger than FI_OPT_BUFFERED_LIMIT would consume ++ * a scatter/gather entry for mrail_hdr */ ++ fi->rx_attr->iov_limit--; ++ ++ if (fi->tx_attr->inject_size < sizeof(struct mrail_hdr)) ++ fi->tx_attr->inject_size = 0; ++ else ++ fi->tx_attr->inject_size -= sizeof(struct mrail_hdr); ++ return fi; ++err: ++ fi_freeinfo(fi); ++ return NULL; ++} ++ ++static int mrail_check_modes(const struct fi_info *hints) ++{ ++ if (!hints) ++ return 0; ++ ++ if (hints->mode & ~MRAIL_PASSTHRU_MODES) { ++ FI_INFO(&mrail_prov, FI_LOG_CORE, ++ "Unable to pass through given modes: %s\n", ++ fi_tostr(&hints->mode, FI_TYPE_MODE)); ++ return -FI_ENODATA; ++ } ++ ++ if (hints->domain_attr && ++ (hints->domain_attr->mr_mode & ~MRAIL_PASSTHRU_MR_MODES)) { ++ FI_INFO(&mrail_prov, FI_LOG_CORE, ++ "Unable to pass through given MR modes: %s\n", ++ fi_tostr(&hints->domain_attr->mr_mode, FI_TYPE_MR_MODE)); ++ return -FI_ENODATA; ++ } ++ return 0; ++} ++ ++static int mrail_getinfo(uint32_t version, const char *node, const char *service, ++ uint64_t flags, const struct fi_info *hints, ++ struct fi_info **info) ++{ ++ struct fi_info *fi; ++ int ret; ++ ++ if (mrail_num_info >= MRAIL_MAX_INFO) { ++ FI_WARN(&mrail_prov, FI_LOG_CORE, ++ "Max mrail_num_info reached\n"); ++ assert(0); ++ return -FI_ENODATA; ++ } ++ ++ ret = mrail_check_modes(hints); ++ if (ret) ++ return ret; ++ ++ ret = mrail_get_core_info(version, node, service, flags, hints, info); ++ if (ret) ++ return ret; ++ ++ fi = mrail_get_prefix_info(*info); ++ if (!fi) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ ++ mrail_adjust_info(fi, hints); ++ ++ // TODO set src_addr to FI_ADDR_STRC address ++ fi->next = *info; ++ *info = fi; ++ ++ mrail_info_vec[mrail_num_info] = mrail_dupinfo(*info); ++ if (!mrail_info_vec[mrail_num_info]) ++ goto err2; ++ ++ mrail_num_info++; ++ ++ return 0; ++err2: ++ fi_freeinfo(fi); ++err1: ++ fi_freeinfo(*info); ++ return ret; ++} ++ ++static void mrail_fini(void) ++{ ++ size_t i; ++ for (i = 0; i < mrail_num_info; i++) ++ fi_freeinfo(mrail_info_vec[i]); ++} ++ ++struct fi_provider mrail_prov = { ++ .name = OFI_UTIL_PREFIX "mrail", ++ .version = FI_VERSION(MRAIL_MAJOR_VERSION, MRAIL_MINOR_VERSION), ++ .fi_version = FI_VERSION(1, 7), ++ .getinfo = mrail_getinfo, ++ .fabric = mrail_fabric_open, ++ .cleanup = mrail_fini ++}; ++ ++struct util_prov mrail_util_prov = { ++ .prov = &mrail_prov, ++ .info = &mrail_info, ++ .flags = 0, ++}; ++ ++MRAIL_INI ++{ ++ mrail_parse_env_vars(); ++ return &mrail_prov; ++} ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_rma.c +new file mode 100644 +index 0000000..4685a8c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_rma.c +@@ -0,0 +1,421 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "mrail.h" ++ ++static void mrail_subreq_to_rail(struct mrail_subreq *subreq, uint32_t rail, ++ struct iovec *out_iovs, void **out_descs, ++ struct fi_rma_iov *out_rma_iovs) ++{ ++ const struct mrail_mr *mrail_mr; ++ struct mrail_addr_key *mr_map; ++ size_t i; ++ ++ for (i = 0; i < subreq->iov_count; ++i) { ++ mrail_mr = subreq->descs[i]; ++ //TODO: add base address from mrail_mr ++ out_iovs[i].iov_len = subreq->iov[i].iov_len; ++ out_iovs[i].iov_base = ++ (void*)((uintptr_t)subreq->iov[i].iov_base); ++ ++ out_descs[i] = (mrail_mr ? ++ fi_mr_desc(mrail_mr->rails[rail].mr) : NULL); ++ } ++ ++ for (i = 0; i < subreq->rma_iov_count; ++i) { ++ mr_map = (struct mrail_addr_key *)subreq->rma_iov[i].key; ++ //TODO: add base address from mrail_addr_key ++ out_rma_iovs[i].addr = subreq->rma_iov[i].addr; ++ out_rma_iovs[i].len = subreq->rma_iov[i].len; ++ out_rma_iovs[i].key = mr_map[rail].key; ++ } ++} ++ ++static ssize_t mrail_post_subreq(uint32_t rail, ++ struct mrail_subreq *subreq) ++{ ++ ssize_t ret; ++ struct iovec rail_iov[MRAIL_IOV_LIMIT]; ++ void *rail_descs[MRAIL_IOV_LIMIT]; ++ struct fi_rma_iov rail_rma_iov[MRAIL_IOV_LIMIT]; ++ struct fi_msg_rma msg; ++ ++ struct mrail_req *req = subreq->parent; ++ struct mrail_ep *mrail_ep = req->mrail_ep; ++ ++ uint64_t flags = req->flags; ++ ++ mrail_subreq_to_rail(subreq, rail, rail_iov, rail_descs, rail_rma_iov); ++ ++ msg.msg_iov = rail_iov; ++ msg.desc = rail_descs; ++ msg.iov_count = subreq->iov_count; ++ msg.addr = req->peer_info->addr; ++ msg.rma_iov = rail_rma_iov; ++ msg.rma_iov_count = subreq->rma_iov_count; ++ msg.context = &subreq->context; ++ ++ if (req->op_type == FI_READ) { ++ ret = fi_readmsg(mrail_ep->rails[rail].ep, &msg, flags); ++ } else { ++ /* Immediate data is sent with the last subreq only */ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ if (req->pending_subreq > 0) { ++ flags &= ~FI_REMOTE_CQ_DATA; ++ } else { ++ msg.data = req->data; ++ } ++ } ++ ret = fi_writemsg(mrail_ep->rails[rail].ep, &msg, flags); ++ } ++ ++ return ret; ++} ++ ++static ssize_t mrail_post_req(struct mrail_req *req) ++{ ++ size_t i; ++ uint32_t rail; ++ ssize_t ret = 0; ++ ++ while (req->pending_subreq >= 0) { ++ /* Try all rails before giving up */ ++ for (i = 0; i < req->mrail_ep->num_eps; ++i) { ++ rail = mrail_get_tx_rail(req->mrail_ep); ++ ++ ret = mrail_post_subreq(rail, ++ &req->subreqs[req->pending_subreq]); ++ if (ret != -FI_EAGAIN) { ++ break; ++ } else { ++ /* One of the rails is busy. Try progressing. */ ++ mrail_poll_cq(req->mrail_ep->util_ep.tx_cq); ++ } ++ } ++ ++ if (ret != 0) { ++ if (ret == -FI_EAGAIN) { ++ break; ++ } ++ /* TODO: Handle errors besides FI_EAGAIN */ ++ assert(0); ++ } ++ req->pending_subreq--; ++ } ++ ++ return ret; ++} ++ ++static inline ++struct mrail_req *mrail_dequeue_deferred_req(struct mrail_ep *mrail_ep) ++{ ++ struct mrail_req *req; ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ slist_remove_head_container(&mrail_ep->deferred_reqs, struct mrail_req, ++ req, entry); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ return req; ++} ++ ++static inline void mrail_requeue_deferred_req(struct mrail_ep *mrail_ep, ++ struct mrail_req *req) ++{ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ slist_insert_head(&req->entry, &mrail_ep->deferred_reqs); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++} ++ ++static inline void mrail_queue_deferred_req(struct mrail_ep *mrail_ep, ++ struct mrail_req *req) ++{ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ slist_insert_tail(&req->entry, &mrail_ep->deferred_reqs); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++} ++ ++void mrail_progress_deferred_reqs(struct mrail_ep *mrail_ep) ++{ ++ struct mrail_req *req; ++ ssize_t ret; ++ ++ req = mrail_dequeue_deferred_req(mrail_ep); ++ while (req) { ++ ret = mrail_post_req(req); ++ if (ret) { ++ mrail_requeue_deferred_req(mrail_ep, req); ++ break; ++ } ++ req = mrail_dequeue_deferred_req(mrail_ep); ++ } ++} ++ ++static ssize_t mrail_prepare_rma_subreqs(struct mrail_ep *mrail_ep, ++ const struct fi_msg_rma *msg, struct mrail_req *req) ++{ ++ ssize_t ret; ++ struct mrail_subreq *subreq; ++ size_t subreq_count; ++ size_t total_len; ++ size_t chunk_len; ++ size_t subreq_len; ++ size_t iov_index; ++ size_t iov_offset; ++ size_t rma_iov_index; ++ size_t rma_iov_offset; ++ int i; ++ ++ /* For now, stripe across all rails. ++ * This could be determined by a dynamic scheduler instead. ++ */ ++ subreq_count = mrail_ep->num_eps; ++ ++ total_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count); ++ chunk_len = total_len / subreq_count; ++ ++ /* The first chunk is the longest */ ++ subreq_len = chunk_len + (total_len % subreq_count); ++ iov_index = 0; ++ iov_offset = 0; ++ rma_iov_index = 0; ++ rma_iov_offset = 0; ++ ++ /* The array is filled in reverse order -- i.e. first subreq at ++ * last position in the array. Filling the array in this order saves ++ * us from having to use two variables, to track the total number of ++ * subreqs, and to know which one to try posting next. ++ * Instead, a single variable (req->pending_subreq) is used to keep ++ * track of which subreq to post next, starting at the end of the ++ * array. ++ */ ++ for (i = (subreq_count - 1); i >= 0; --i) { ++ subreq = &req->subreqs[i]; ++ ++ subreq->parent = req; ++ ++ ret = ofi_copy_iov_desc(subreq->iov, subreq->descs, ++ &subreq->iov_count, ++ (struct iovec *)msg->msg_iov, msg->desc, ++ msg->iov_count, &iov_index, &iov_offset, ++ subreq_len); ++ if (ret) { ++ goto out; ++ } ++ ++ ret = ofi_copy_rma_iov(subreq->rma_iov, &subreq->rma_iov_count, ++ (struct fi_rma_iov *)msg->rma_iov, ++ msg->rma_iov_count, &rma_iov_index, ++ &rma_iov_offset, subreq_len); ++ if (ret) { ++ goto out; ++ } ++ ++ /* All the other chunks have the same length */ ++ subreq_len = chunk_len; ++ } ++ ++ ofi_atomic_initialize32(&req->expected_subcomps, subreq_count); ++ ++ /* pending_subreq is the index of the next subreq to post. ++ * The array was filled in reverse order in mrail_prepare_rma_subreqs() ++ */ ++ req->pending_subreq = subreq_count - 1; ++ ++out: ++ return ret; ++} ++ ++static ssize_t mrail_init_rma_req(struct mrail_ep *mrail_ep, ++ struct mrail_req *req, const struct fi_msg_rma *msg, ++ uint64_t flags, int op_type) ++{ ++ ssize_t ret; ++ ++ req->op_type = op_type; ++ req->flags = flags; ++ req->data = msg->data; ++ req->mrail_ep = mrail_ep; ++ req->peer_info = ofi_av_get_addr(mrail_ep->util_ep.av, ++ (int) msg->addr); ++ req->comp.op_context = msg->context; ++ req->comp.flags = flags; ++ ++ ret = mrail_prepare_rma_subreqs(mrail_ep, msg, req); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_DATA, ++ "Unable to prepare rma subreqs: %s\n", ++ fi_strerror(-ret)); ++ } ++ return ret; ++} ++ ++static ssize_t mrail_ep_post_rma(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags, int op_type) ++{ ++ ssize_t ret; ++ struct mrail_ep *mrail_ep; ++ struct mrail_req *req; ++ ++ mrail_ep = container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ req = mrail_alloc_req(mrail_ep); ++ if (!req) { ++ return -FI_ENOMEM; ++ } ++ ++ ret = mrail_init_rma_req(mrail_ep, req, msg, flags, op_type); ++ if (ret) { ++ mrail_free_req(mrail_ep, req); ++ return ret; ++ } ++ ++ mrail_queue_deferred_req(mrail_ep, req); ++ ++ /* Initiate progress here. See mrail_ep_progress() for any remaining ++ * reqs. ++ */ ++ mrail_progress_deferred_reqs(mrail_ep); ++ ++ return 0; ++} ++ ++static ssize_t mrail_ep_readmsg(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ return mrail_ep_post_rma(ep_fid, msg, flags, FI_READ); ++} ++ ++/* TODO: separate the different operations to optimize performance */ ++static ssize_t mrail_ep_read(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, uint64_t addr, ++ uint64_t key, void *context) ++{ ++ struct mrail_ep *mrail_ep; ++ struct iovec iovec = { ++ .iov_base = (void*)buf, ++ .iov_len = len ++ }; ++ struct fi_rma_iov rma_iov= { ++ .addr = addr, ++ .len = len, ++ .key = key ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &iovec, ++ .desc = &desc, ++ .iov_count = 1, ++ .addr = src_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .context = context, ++ .data = 0 ++ }; ++ ++ mrail_ep = container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ return mrail_ep_readmsg(ep_fid, &msg, mrail_ep->util_ep.tx_op_flags); ++} ++ ++static ssize_t mrail_ep_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ return mrail_ep_post_rma(ep_fid, msg, flags, FI_WRITE); ++} ++ ++static ssize_t mrail_ep_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, void *desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, void *context) ++{ ++ struct mrail_ep *mrail_ep; ++ struct iovec iovec = { ++ .iov_base = (void*)buf, ++ .iov_len = len ++ }; ++ struct fi_rma_iov rma_iov= { ++ .addr = addr, ++ .len = len, ++ .key = key ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &iovec, ++ .desc = &desc, ++ .iov_count = 1, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .context = context, ++ .data = 0 ++ }; ++ ++ mrail_ep = container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ return mrail_ep_writemsg(ep_fid, &msg, mrail_ep->util_ep.tx_op_flags); ++} ++ ++static ssize_t mrail_ep_inject_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct mrail_ep *mrail_ep; ++ struct mrail_addr_key *mr_map; ++ uint32_t rail; ++ ssize_t ret; ++ ++ mrail_ep = container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ mr_map = (struct mrail_addr_key *) key; ++ ++ rail = mrail_get_tx_rail(mrail_ep); ++ ret = fi_inject_write(mrail_ep->rails[rail].ep, buf, len, ++ dest_addr, addr, mr_map[rail].key); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_DATA, ++ "Unable to post inject write on rail: %" PRIu32 "\n", ++ rail); ++ return ret; ++ } ++ ofi_ep_wr_cntr_inc(&mrail_ep->util_ep); ++ ++ return 0; ++} ++ ++struct fi_ops_rma mrail_ops_rma = { ++ .size = sizeof (struct fi_ops_rma), ++ .read = mrail_ep_read, ++ .readv = fi_no_rma_readv, ++ .readmsg = mrail_ep_readmsg, ++ .write = mrail_ep_write, ++ .writev = fi_no_rma_writev, ++ .writemsg = mrail_ep_writemsg, ++ .inject = mrail_ep_inject_write, ++ .writedata = fi_no_rma_writedata, ++ .injectdata = fi_no_rma_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/NetDirect/README.NetworkDirect b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/NetDirect/README.NetworkDirect +index 06472ed..a6d113a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/NetDirect/README.NetworkDirect ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/NetDirect/README.NetworkDirect +@@ -1,6 +1,12 @@ +-Network Direct SDK/DDK may be downloaded from: ++Network Direct SDK/DDK may be obtained as a nuget package (preferred) from: ++ ++https://www.nuget.org/packages/NetworkDirect ++ ++or downloaded from: ++ + https://www.microsoft.com/en-us/download/details.aspx?id=36043 + on page press Download button and select NetworkDirect_DDK.zip. ++ + Extract header files from downloaded + NetworkDirect_DDK.zip:\NetDirect\include\ file into this directory, + or add path to NetDirect headers into VS include paths +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir.h +index f0c4d47..7b17e4c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir.h +@@ -49,23 +49,26 @@ extern "C" { + #endif /* __cplusplus */ + + #define OFI_ND_MAJOR_VERSION 1 +-#define OFI_ND_MINOR_VERSION 5 ++#define OFI_ND_MINOR_VERSION 0 + + #define ND_MSG_IOV_LIMIT (256) + #define ND_MSG_INTERNAL_IOV_LIMIT (512) + #define ND_EP_MAX_CM_DATA_SIZE (256) + #define OFI_ND_MAX_MR_CNT (1 << 16) + +-#define OFI_ND_PRIMARY_CAPS \ +- FI_MSG | FI_RMA | FI_SEND | FI_RECV | \ +- FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE +-#define OFI_ND_CAPS OFI_ND_PRIMARY_CAPS ++#define OFI_ND_DOMAIN_CAPS (FI_LOCAL_COMM | FI_REMOTE_COMM) + +-#define OFI_ND_TX_OP_FLAGS \ +- FI_INJECT | FI_COMPLETION | FI_TRANSMIT_COMPLETE | \ +- FI_INJECT_COMPLETE | FI_DELIVERY_COMPLETE | \ +- FI_SELECTIVE_COMPLETION ++#define OFI_ND_EP_CAPS (FI_MSG | FI_RMA | \ ++ FI_SEND | FI_RECV | \ ++ FI_READ | FI_WRITE | \ ++ FI_REMOTE_READ | FI_REMOTE_WRITE) + ++#define OFI_ND_TX_OP_FLAGS (FI_INJECT | FI_COMPLETION | FI_TRANSMIT_COMPLETE | \ ++ FI_INJECT_COMPLETE | FI_DELIVERY_COMPLETE | \ ++ FI_SELECTIVE_COMPLETION) ++ ++#define OFI_ND_MSG_ORDER (FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_RAS | \ ++ FI_ORDER_WAW | FI_ORDER_WAS | FI_ORDER_SAW | FI_ORDER_SAS ) + + extern struct gl_data { + int inline_thr; +@@ -157,6 +160,25 @@ static inline size_t unique(void *base, size_t num, size_t width, + return n; + } + ++#define H2F(x) ofi_nd_hresult_2_fierror(x) ++ ++static inline int ofi_nd_hresult_2_fierror(HRESULT hr) ++{ ++ switch (hr) { ++ case S_OK: ++ case ND_PENDING: ++ return FI_SUCCESS; ++ case ND_BUFFER_OVERFLOW: ++ return -FI_EOVERFLOW; ++ case ND_CONNECTION_REFUSED: ++ return -FI_ECONNREFUSED; ++ case ND_TIMEOUT: ++ return -FI_ETIMEDOUT; ++ default: ++ return -FI_EOTHER; ++ } ++} ++ + #define OFI_ND_TIMEOUT_INIT(timeout) \ + uint64_t sfinish = ((timeout) >= 0) ? \ + (fi_gettime_ms() + (timeout) * 10000) : -1; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_attr.c +deleted file mode 100644 +index 76823ae..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_attr.c ++++ /dev/null +@@ -1,58 +0,0 @@ +-/* +-* Copyright (c) 2015-2016 Intel Corporation, Inc. All rights reserved. +-* +-* This software is available to you under a choice of one of two +-* licenses. You may choose to be licensed under the terms of the GNU +-* General Public License (GPL) Version 2, available from the file +-* COPYING in the main directory of this source tree, or the +-* BSD license below: +-* +-* Redistribution and use in source and binary forms, with or +-* without modification, are permitted provided that the following +-* conditions are met: +-* +-* - Redistributions of source code must retain the above +-* copyright notice, this list of conditions and the following +-* disclaimer. +-* +-* - Redistributions in binary form must reproduce the above +-* copyright notice, this list of conditions and the following +-* disclaimer in the documentation and/or other materials +-* provided with the distribution. +-* +-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +-* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +-* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +-* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +-* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +-* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-* SOFTWARE. +-*/ +- +-#ifdef _WIN32 +- +-#include "ofi.h" +-#include "ofi_util.h" +-#include "rdma/fabric.h" +- +-#include "netdir.h" +- +-const char ofi_nd_prov_name[] = "netdir"; +- +-struct fi_provider ofi_nd_prov = { +- .name = ofi_nd_prov_name, +- .version = FI_VERSION(OFI_ND_MAJOR_VERSION, OFI_ND_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), +- .getinfo = ofi_nd_getinfo, +- .fabric = ofi_nd_fabric, +- .cleanup = ofi_nd_fini +-}; +- +-struct util_prov ofi_nd_util_prov = { +- .prov = &ofi_nd_prov, +- .info = 0, +- .flags = UTIL_RX_SHARED_CTX, +-}; +- +-#endif /* _WIN32 */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cntr.c +index 5c7f80e..cd3a197 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cntr.c +@@ -34,7 +34,6 @@ + + #include "netdir.h" + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_iface.h" + + #include "rdma/fabric.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cq.c +index 945787d..e69ff4d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cq.c +@@ -34,7 +34,6 @@ + + #include "netdir.h" + #include "netdir_cq.h" +-#include "netdir_err.h" + #include "netdir_iface.h" + #include "netdir_unexp.h" + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_domain.c +index e9d5b4b..590e1aa 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_domain.c +@@ -37,7 +37,6 @@ + + #include "netdir.h" + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_util.h" + #include "netdir_iface.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep.c +index 72729c4..f183078 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep.c +@@ -37,7 +37,6 @@ + + #include "netdir.h" + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_util.h" + #include "netdir_iface.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_msg.c +index 05851d0..3427dbe 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_msg.c +@@ -38,7 +38,6 @@ + #include "netdir.h" + #include "netdir_ov.h" + #include "netdir_cq.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + #include "netdir_unexp.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_rma.c +index 09ff39b..4bc1058 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_rma.c +@@ -35,7 +35,6 @@ + #include "netdir.h" + #include "netdir_ov.h" + #include "netdir_cq.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_srx.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_srx.c +index c5cbbfd..19d19a6 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_srx.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_srx.c +@@ -35,7 +35,6 @@ + #include "netdir.h" + #include "netdir_ov.h" + #include "netdir_cq.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + #include "netdir_unexp.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_eq.c +index 129aa96..9deeef2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_eq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_eq.c +@@ -34,7 +34,6 @@ + + #include "netdir.h" + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_err.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_err.h +deleted file mode 100644 +index 9695dd7..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_err.h ++++ /dev/null +@@ -1,68 +0,0 @@ +-/* +-* Copyright (c) 2015-2016 Intel Corporation, Inc. All rights reserved. +-* +-* This software is available to you under a choice of one of two +-* licenses. You may choose to be licensed under the terms of the GNU +-* General Public License (GPL) Version 2, available from the file +-* COPYING in the main directory of this source tree, or the +-* BSD license below: +-* +-* Redistribution and use in source and binary forms, with or +-* without modification, are permitted provided that the following +-* conditions are met: +-* +-* - Redistributions of source code must retain the above +-* copyright notice, this list of conditions and the following +-* disclaimer. +-* +-* - Redistributions in binary form must reproduce the above +-* copyright notice, this list of conditions and the following +-* disclaimer in the documentation and/or other materials +-* provided with the distribution. +-* +-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +-* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +-* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +-* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +-* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +-* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-* SOFTWARE. +-*/ +- +-#ifndef _FI_NETDIR_ERR_H_ +-#define _FI_NETDIR_ERR_H_ +- +-#include +- +-#include "rdma/fabric.h" +- +-#ifdef __cplusplus +-extern "C" { +-#endif /* __cplusplus */ +- +-#define H2F(x) ofi_nd_hresult_2_fierror(x) +- +-static inline int ofi_nd_hresult_2_fierror(HRESULT hr) +-{ +- switch (hr) { +- case S_OK: +- case ND_PENDING: +- return FI_SUCCESS; +- case ND_BUFFER_OVERFLOW: +- return -EOVERFLOW; /* FI_EOVERFLOW */ +- case ND_CONNECTION_REFUSED: +- return -FI_ECONNREFUSED; +- case ND_TIMEOUT: +- return -FI_ETIMEDOUT; +- default: +- return -FI_EOTHER; +- } +-} +- +-#ifdef __cplusplus +-} +-#endif /* __cplusplus */ +- +-#endif /* _FI_NETDIR_ERR_H_ */ +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_init.c +index 5da3f5a..509b350 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_init.c +@@ -43,6 +43,23 @@ + + #include "netdir_queue.h" + ++const char ofi_nd_prov_name[] = "netdir"; ++ ++struct fi_provider ofi_nd_prov = { ++ .name = ofi_nd_prov_name, ++ .version = FI_VERSION(OFI_ND_MAJOR_VERSION, OFI_ND_MINOR_VERSION), ++ .fi_version = FI_VERSION(1, 7), ++ .getinfo = ofi_nd_getinfo, ++ .fabric = ofi_nd_fabric, ++ .cleanup = ofi_nd_fini ++}; ++ ++struct util_prov ofi_nd_util_prov = { ++ .prov = &ofi_nd_prov, ++ .info = 0, ++ .flags = UTIL_RX_SHARED_CTX, ++}; ++ + struct gl_data gl_data = { + /* 8 KByte */ + .inline_thr = 8192, +@@ -59,8 +76,7 @@ int ofi_nd_getinfo(uint32_t version, const char *node, const char *service, + if (ofi_nd_util_prov.info) { + return util_getinfo(&ofi_nd_util_prov, version, node, service, flags, + hints, info); +- } +- else { ++ } else { + *info = NULL; + return -FI_EINVAL; + } +@@ -93,6 +109,7 @@ static int ofi_nd_adapter_cb(const ND2_ADAPTER_INFO *adapter, const char *name) + info->tx_attr->iov_limit = ND_MSG_IOV_LIMIT; + info->tx_attr->rma_iov_limit = ND_MSG_IOV_LIMIT; + info->tx_attr->op_flags = OFI_ND_TX_OP_FLAGS; ++ info->tx_attr->msg_order = OFI_ND_MSG_ORDER; + + info->rx_attr->caps = FI_MSG | FI_RECV; + info->rx_attr->comp_order = FI_ORDER_STRICT; +@@ -101,12 +118,14 @@ static int ofi_nd_adapter_cb(const ND2_ADAPTER_INFO *adapter, const char *name) + /* TODO: if optimization will be needed, we can use adapter->MaxInitiatorSge, + * and use ND SGE to recv iovecs */ + info->rx_attr->iov_limit = ND_MSG_IOV_LIMIT; ++ info->rx_attr->msg_order = OFI_ND_MSG_ORDER; + + info->ep_attr->type = FI_EP_MSG; + info->ep_attr->protocol = FI_PROTO_NETWORKDIRECT; + info->ep_attr->protocol_version = 0; + info->ep_attr->max_msg_size = (size_t)adapter->MaxTransferLength; + ++ info->domain_attr->caps = OFI_ND_DOMAIN_CAPS; + info->domain_attr->name = strdup(name); + info->domain_attr->threading = FI_THREAD_SAFE; + info->domain_attr->control_progress = FI_PROGRESS_AUTO; +@@ -121,13 +140,12 @@ static int ofi_nd_adapter_cb(const ND2_ADAPTER_INFO *adapter, const char *name) + info->fabric_attr->name = strdup(ofi_nd_prov_name); + info->fabric_attr->prov_version = FI_VERSION(OFI_ND_MAJOR_VERSION, OFI_ND_MINOR_VERSION); + +- info->caps = OFI_ND_CAPS; ++ info->caps = OFI_ND_EP_CAPS | OFI_ND_DOMAIN_CAPS; + info->addr_format = FI_SOCKADDR; + + if (!ofi_nd_util_prov.info) { + ofi_nd_util_prov.info = info; +- } +- else { ++ } else { + struct fi_info *finfo = (struct fi_info *) ofi_nd_util_prov.info; + + while (finfo->next) +@@ -151,9 +169,6 @@ NETDIR_INI + "Count of Entries in Array of Preposted Buffers: number of set of buffer " + "in each entry array of buffers to be preposted per EP"); + +- //fi_param_define(&ofi_nd_prov, "presize", FI_PARAM_INT, +- // "Pre-post vector size, number of elements in pre-post vector"); +- + ofi_nd_startup(ofi_nd_adapter_cb); + return &ofi_nd_prov; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_log.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_log.h +index 32a662c..a56ef41 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_log.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_log.h +@@ -72,19 +72,19 @@ extern struct fi_provider ofi_nd_prov; + */ + static inline char *ofi_nd_strerror(DWORD err, HMODULE module) + { +- static char *message = 0; ++ static char *message = NULL; ++ size_t size; + + /* if message is allocated - free it */ + if (message) + LocalFree(message); + +- size_t size = FormatMessageA( +- FORMAT_MESSAGE_ALLOCATE_BUFFER | +- FORMAT_MESSAGE_FROM_SYSTEM | +- FORMAT_MESSAGE_IGNORE_INSERTS | +- (module ? FORMAT_MESSAGE_FROM_HMODULE : 0), +- module, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), +- (LPSTR)&message, 0, NULL); ++ size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | ++ FORMAT_MESSAGE_FROM_SYSTEM | ++ FORMAT_MESSAGE_IGNORE_INSERTS | ++ (module ? FORMAT_MESSAGE_FROM_HMODULE : 0), ++ module, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), ++ (LPSTR)&message, 0, NULL); + + return size ? message : (char*)""; + } +@@ -122,8 +122,7 @@ ofi_nd_get_last_error_str(HRESULT hr, char *errmsg, SIZE_T max_msg_len) + #define ND_FLUSHED 0x10000L /* undocumented ND error code */ + #define ND_DISCONNECTED 0xc000020C + +-static char * +-ofi_nd_error_str(HRESULT hr) ++static char *ofi_nd_error_str(HRESULT hr) + { + static char lerr[128]; + char *err_str = NULL; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_mr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_mr.c +index 1aa5eab..a35aa14 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_mr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_mr.c +@@ -35,7 +35,6 @@ + #include "netdir.h" + + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_iface.h" + + #include "ofi.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ndinit.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ndinit.c +index 47679fa..a9b8dfd 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ndinit.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ndinit.c +@@ -41,7 +41,6 @@ + + #include "netdir.h" + #include "netdir_log.h" +-#include "netdir_err.h" + + #ifndef ofi_sizeofaddr + #define ofi_sizeofaddr(address) \ +@@ -203,13 +202,8 @@ static inline wchar_t *ofi_nd_get_provider_path(const WSAPROTOCOL_INFOW *proto) + { + assert(proto); + +- int len; +- int lenex; +- int err; +- int res; +- +- wchar_t *prov; +- wchar_t *provex; ++ int len, lenex, err, res; ++ wchar_t *prov, *provex; + + res = WSCGetProviderPath((GUID*)&proto->ProviderId, NULL, &len, &err); + if (err != WSAEFAULT || !len) +@@ -268,6 +262,7 @@ static inline struct module_t *ofi_nd_search_module(const wchar_t* path) + { + size_t i; + size_t j; ++ + for (i = 0; i < ofi_nd_infra.providers.count; i++) { + if (path && ofi_nd_file_exists(path) && + !ofi_nd_is_directory(path)) { +@@ -283,15 +278,20 @@ static inline struct module_t *ofi_nd_search_module(const wchar_t* path) + + static inline struct module_t *ofi_nd_create_module(const wchar_t* path) + { ++ struct module_t *module; ++ HMODULE hmodule; ++ can_unload_now_t unload; ++ get_class_object_t getclass; ++ + assert(ofi_nd_infra.providers.modules); + +- struct module_t *module = ofi_nd_search_module(path); ++ module = ofi_nd_search_module(path); + if (module) + return module; + + /* ok, this is not duplicate. try to + load it and get class factory*/ +- HMODULE hmodule = LoadLibraryW(path); ++ hmodule = LoadLibraryW(path); + if (!hmodule) { + ND_LOG_WARN(FI_LOG_CORE, + "ofi_nd_create_module: provider : %S, failed to load: %s\n", +@@ -299,8 +299,8 @@ static inline struct module_t *ofi_nd_create_module(const wchar_t* path) + return NULL; + } + +- can_unload_now_t unload = (can_unload_now_t)GetProcAddress(hmodule, "DllCanUnloadNow"); +- get_class_object_t getclass = (get_class_object_t)GetProcAddress(hmodule, "DllGetClassObject"); ++ unload = (can_unload_now_t)GetProcAddress(hmodule, "DllCanUnloadNow"); ++ getclass = (get_class_object_t)GetProcAddress(hmodule, "DllGetClassObject"); + if (!unload || !getclass) { + ND_LOG_WARN(FI_LOG_CORE, + "ofi_nd_create_module: provider: %S, failed to import interface\n", +@@ -325,31 +325,36 @@ fn_noiface: + + static inline HRESULT ofi_nd_create_factory(const WSAPROTOCOL_INFOW* proto) + { ++ wchar_t *path; ++ struct module_t *module; ++ IClassFactory* factory; ++ HRESULT hr; ++ struct factory_t *ftr; ++ + assert(proto); + assert(ofi_nd_is_valid_proto(proto)); + assert(ofi_nd_infra.class_factories.factory); + +- wchar_t *path = ofi_nd_get_provider_path(proto); ++ path = ofi_nd_get_provider_path(proto); + if (path) + ND_LOG_INFO(FI_LOG_CORE, +- "ofi_nd_create_factory: provider " FI_ND_GUID_FORMAT " path: %S \n", +- FI_ND_GUID_ARG(proto->ProviderId), path); ++ "ofi_nd_create_factory: provider " FI_ND_GUID_FORMAT " path: %S \n", ++ FI_ND_GUID_ARG(proto->ProviderId), path); + else /* can't get provider path. just return */ + return S_OK; + +- struct module_t *module = ofi_nd_create_module(path); ++ module = ofi_nd_create_module(path); + free(path); + if (!module) +- return S_OK;; ++ return S_OK; + + assert(module->get_class_object); +- IClassFactory* factory; +- HRESULT hr = module->get_class_object(&proto->ProviderId, &IID_IClassFactory, +- (void**)&factory); ++ hr = module->get_class_object(&proto->ProviderId, &IID_IClassFactory, ++ (void**)&factory); + if (FAILED(hr)) + return hr; + +- struct factory_t *ftr = &ofi_nd_infra.class_factories.factory[ofi_nd_infra.class_factories.count]; ++ ftr = &ofi_nd_infra.class_factories.factory[ofi_nd_infra.class_factories.count]; + ofi_nd_infra.class_factories.count++; + ftr->class_factory = factory; + ftr->module = module; +@@ -364,21 +369,21 @@ static int ofi_nd_adapter_cmp(const void *adapter1, const void *adapter2) + &((struct adapter_t*)adapter2)->address); + } + +-static HRESULT ofi_nd_create_adapter() ++static HRESULT ofi_nd_create_adapter(void) + { + size_t addr_count = 0; + HRESULT hr; + + for (size_t i = 0; i < ofi_nd_infra.class_factories.count; i++) { + struct factory_t *factory = &ofi_nd_infra.class_factories.factory[i]; ++ ULONG listsize = 0; ++ + assert(factory->class_factory); + + hr = factory->class_factory->lpVtbl->CreateInstance(factory->class_factory, + NULL, &IID_IND2Provider, (void**)&factory->provider); + if (FAILED(hr)) + return hr; +- +- ULONG listsize = 0; + hr = factory->provider->lpVtbl->QueryAddressList(factory->provider, NULL, &listsize); + if (hr != ND_BUFFER_OVERFLOW) + return hr; +@@ -438,14 +443,17 @@ static HRESULT ofi_nd_create_adapter() + for (size_t i = 0; i < ofi_nd_infra.adapters.count; i++) { + struct adapter_t *adapter = &ofi_nd_infra.adapters.adapter[i]; + struct factory_t *factory = adapter->factory; ++ wchar_t *saddr; ++ DWORD addrlen = 0; ++ UINT64 id; ++ int res; ++ + assert(factory); + assert(factory->provider); + + assert(adapter->address.addr.sa_family == AF_INET || + adapter->address.addr.sa_family == AF_INET6); + +- UINT64 id; +- + hr = factory->provider->lpVtbl->ResolveAddress(factory->provider, + &adapter->address.addr, + ofi_sizeofaddr(&adapter->address.addr), &id); +@@ -471,17 +479,12 @@ static HRESULT ofi_nd_create_adapter() + return hr; + adapter->info = *info; + free(info); +- } +- else if (FAILED(hr)) { ++ } else if (FAILED(hr)) { + return hr; + } + + /* generate adapter's name */ +- wchar_t *saddr; +- +- DWORD addrlen = 0; +- +- int res = WSAAddressToStringW(&adapter->address.addr, ++ res = WSAAddressToStringW(&adapter->address.addr, + ofi_sizeofaddr(&adapter->address.addr), + NULL, NULL, &addrlen); + if (res == SOCKET_ERROR && WSAGetLastError() == WSAEFAULT && addrlen) { +@@ -507,27 +510,22 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + { + DWORD proto_len = 0; + HRESULT hr = ND_INTERNAL_ERROR; +- int i; +- int protonum; +- size_t j; ++ int i, protonum, err; ++ size_t j, prov_count = 0; + WSAPROTOCOL_INFOW *proto = 0; + +- size_t prov_count = 0; +- +- int err; +- +- memset(&ofi_nd_infra, 0, sizeof(*(&ofi_nd_infra))); ++ memset(&ofi_nd_infra, 0, sizeof(ofi_nd_infra)); + + int ret = WSCEnumProtocols(NULL, NULL, &proto_len, &err); + if (ret != SOCKET_ERROR || err != WSAENOBUFS) { + hr = ND_NO_MEMORY; +- goto fn_failed; ++ goto fn_exit; + } + + proto = (WSAPROTOCOL_INFOW*)(malloc(proto_len)); + if (!proto) { + hr = ND_NO_MEMORY; +- goto fn_failed; ++ goto fn_exit; + } + + protonum = WSCEnumProtocols(NULL, proto, &proto_len, &err); +@@ -540,9 +538,7 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + as maximum of existing providers and class factories */ + for (i = 0; i < protonum; i++) { + if (ofi_nd_is_valid_proto(&proto[i])) +- { + prov_count++; +- } + } + + if (!prov_count) { +@@ -555,9 +551,8 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + goto fn_protofail; + + for (i = 0; i < protonum; i++) { +- if (ofi_nd_is_valid_proto(&proto[i])) { ++ if (ofi_nd_is_valid_proto(&proto[i])) + ofi_nd_create_factory(&proto[i]); +- } + } + + free(proto); +@@ -565,7 +560,6 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + /* ok, factories are created, now list all available addresses, try to + create adapters & collect adapter's info */ + hr = ofi_nd_create_adapter(); +- + if (FAILED(hr)) + return hr; + +@@ -577,18 +571,21 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + cb(&ofi_nd_infra.adapters.adapter[j].info, + ofi_nd_infra.adapters.adapter[j].name); + +-fn_exit: + return hr; +- + fn_protofail: + free(proto); +-fn_failed: +- goto fn_exit; ++fn_exit: ++ return hr; + } + ++/* we don't need here exclusive execution because this function ++ * is called from OFI init routine which is single thread */ + HRESULT ofi_nd_startup(ofi_nd_adapter_cb_t cb) +-{ /* we don't need here exclusive execution because this function +- is called from OFI init routine which is single thread */ ++{ ++ WSADATA data; ++ HRESULT hr; ++ int ret; ++ + assert(cb); + + if (ofi_nd_startup_done) +@@ -596,22 +593,20 @@ HRESULT ofi_nd_startup(ofi_nd_adapter_cb_t cb) + + ND_LOG_INFO(FI_LOG_CORE, "ofi_nd_startup: starting initialization\n"); + +- WSADATA data; +- +- int ret = WSAStartup(MAKEWORD(2, 2), &data); ++ ret = WSAStartup(MAKEWORD(2, 2), &data); + if (ret) + return HRESULT_FROM_WIN32(ret); + + ND_LOG_DEBUG(FI_LOG_CORE, "ofi_nd_startup: WSAStartup complete\n"); + +- HRESULT hr = ofi_nd_init(cb); ++ hr = ofi_nd_init(cb); + + ofi_nd_startup_done = 1; + + return hr; + } + +-HRESULT ofi_nd_shutdown() ++HRESULT ofi_nd_shutdown(void) + { + if (!ofi_nd_startup_done) + return S_OK; +@@ -619,25 +614,29 @@ HRESULT ofi_nd_shutdown() + ND_LOG_INFO(FI_LOG_CORE, "ofi_nd_shutdown: shutdown WSA\n"); + + ofi_nd_free_infra(); +- +- int ret = WSACleanup(); +- + ofi_nd_startup_done = 0; +- return HRESULT_FROM_WIN32(ret); ++ ++ return HRESULT_FROM_WIN32(WSACleanup()); + } + + int ofi_nd_lookup_adapter(const char *name, IND2Adapter **adapter, struct sockaddr** addr) + { ++ size_t i; ++ + assert(name); + assert(adapter); + + if (!ofi_nd_startup_done) + return -FI_EOPBADSTATE; + +- size_t i; + for (i = 0; i < ofi_nd_infra.adapters.count; i++) { + struct adapter_t *ada = &ofi_nd_infra.adapters.adapter[i]; + if (ada->name && !strcmp(ada->name, name)) { ++ HRESULT hr; ++ UINT64 adapter_id; ++ IClassFactory* factory = NULL; ++ IND2Provider *provider = NULL; ++ + /* ok, we found good adapter. try to initialize it */ + if (ada->adapter) { + *adapter = ada->adapter; +@@ -650,8 +649,7 @@ int ofi_nd_lookup_adapter(const char *name, IND2Adapter **adapter, struct sockad + assert(ada->factory->module); + assert(ada->factory->module->get_class_object); + +- IClassFactory* factory = NULL; +- HRESULT hr = ada->factory->module->get_class_object( ++ hr = ada->factory->module->get_class_object( + &ada->factory->protocol.ProviderId, + &IID_IClassFactory, + (void**)&factory); +@@ -659,26 +657,24 @@ int ofi_nd_lookup_adapter(const char *name, IND2Adapter **adapter, struct sockad + return H2F(hr); + assert(factory); + +- IND2Provider *provider = NULL; +- hr = factory->lpVtbl->CreateInstance(factory, NULL, &IID_IND2Provider, +- (void**)&provider); ++ hr = factory->lpVtbl->CreateInstance(factory, NULL, ++ &IID_IND2Provider, ++ (void**)&provider); + factory->lpVtbl->Release(factory); + if (FAILED(hr)) + return H2F(hr); + assert(provider); + +- UINT64 adapter_id; +- + hr = provider->lpVtbl->ResolveAddress(provider, &ada->address.addr, +- ofi_sizeofaddr(&ada->address.addr), +- &adapter_id); ++ ofi_sizeofaddr(&ada->address.addr), ++ &adapter_id); + if (FAILED(hr)) { + provider->lpVtbl->Release(provider); + return H2F(hr); + } + + hr = provider->lpVtbl->OpenAdapter(provider, &IID_IND2Adapter, adapter_id, +- (void**)&ada->adapter); ++ (void**)&ada->adapter); + provider->lpVtbl->Release(provider); + if (FAILED(hr)) + return H2F(hr); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_pep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_pep.c +index 9844286..188984f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_pep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_pep.c +@@ -43,7 +43,6 @@ + #include "ofi_util.h" + + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_unexp.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_unexp.c +index 506199a..c74e42f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_unexp.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_unexp.c +@@ -40,7 +40,6 @@ + #include "netdir.h" + #include "netdir_cq.h" + #include "netdir_log.h" +-#include "netdir_err.h" + #include "netdir_util.h" + #include "netdir_queue.h" + #include "netdir_iface.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psm_am.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psm_am.h +index 1bc95e3..ed773ad 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psm_am.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psm_am.h +@@ -126,7 +126,7 @@ void (*psm_am_completion_fn_t)(void *context); + * multiple times to register additonal handlers. The maximum number of handlers + * that can be registered is limited to the max_handlers value returned by + * psm_am_get_parameters(). Handlers are associated with a PSM end-point. The +- * handlers are allocated index numbers in the the handler table for that end-point. ++ * handlers are allocated index numbers in the handler table for that end-point. + * The allocated index for the handler function in handlers[i] is returned in + * handlers_idx[i] for i in (0, num_handlers]. These handler index values are + * used in the psm_am_request_short() and psm_am_reply_short() functions. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx.h +index 3485e3f..9c761b4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx.h +@@ -76,7 +76,7 @@ extern struct fi_provider psmx_prov; + + extern int psmx_am_compat_mode; + +-#define PSMX_VERSION (FI_VERSION(1, 6)) ++#define PSMX_VERSION (FI_VERSION(1, 7)) + + #define PSMX_OP_FLAGS (FI_INJECT | FI_MULTI_RECV | FI_COMPLETION | \ + FI_TRIGGER | FI_INJECT_COMPLETE | \ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_init.c +index daa3465..3e0a89e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_init.c +@@ -53,7 +53,7 @@ struct psmx_env psmx_env = { + + static void psmx_init_env(void) + { +- if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK")) ++ if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK") || getenv("PMIX_RANK")) + psmx_env.name_server = 0; + + fi_param_get_bool(&psmx_prov, "name_server", &psmx_env.name_server); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_wait.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_wait.c +index 470ce8d..7e48c66 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_wait.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_wait.c +@@ -1,9 +1,9 @@ + /* + * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. + * +- * This software is waitailable to you under a choice of one of two ++ * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, waitailable from the file ++ * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * BSD license below: + * +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/Makefile.include +index 167fa34..7e4783c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/Makefile.include +@@ -28,130 +28,69 @@ _psm2_files += \ + + _psm2_nodist_files = \ + prov/psm2/src/psm2/psm_am.c \ +- prov/psm2/src/psm2/psm2_am.h \ +- prov/psm2/src/psm2/psm_am_internal.h \ + prov/psm2/src/psm2/psm.c \ +- prov/psm2/src/psm2/psm2.h \ + prov/psm2/src/psm2/psm_context.c \ +- prov/psm2/src/psm2/psm_context.h \ + prov/psm2/src/psm2/psm_diags.c \ + prov/psm2/src/psm2/psm_ep.c \ +- prov/psm2/src/psm2/psm_ep.h \ + prov/psm2/src/psm2/psm_ep_connect.c \ + prov/psm2/src/psm2/psm_error.c \ +- prov/psm2/src/psm2/psm_error.h \ +- prov/psm2/src/psm2/psm_help.h \ +- prov/psm2/src/psm2/psm_lock.h \ +- prov/psm2/src/psm2/psm_log.h \ + prov/psm2/src/psm2/psm_memcpy.c \ + prov/psm2/src/psm2/psm_mock.c \ + prov/psm2/src/psm2/psm_mpool.c \ +- prov/psm2/src/psm2/psm_mpool.h \ + prov/psm2/src/psm2/psm_mq.c \ +- prov/psm2/src/psm2/psm2_mq.h \ +- prov/psm2/src/psm2/psm_mq_internal.h \ + prov/psm2/src/psm2/psm_mq_recv.c \ + prov/psm2/src/psm2/psm_mq_utils.c \ + prov/psm2/src/psm2/psm_perf.c \ +- prov/psm2/src/psm2/psm_perf.h \ + prov/psm2/src/psm2/psm_stats.c \ +- prov/psm2/src/psm2/psm_stats.h \ + prov/psm2/src/psm2/psm_sysbuf.c \ +- prov/psm2/src/psm2/psm_sysbuf.h \ + prov/psm2/src/psm2/psm_timer.c \ +- prov/psm2/src/psm2/psm_timer.h \ +- prov/psm2/src/psm2/psm_user.h \ + prov/psm2/src/psm2/psm_utils.c \ +- prov/psm2/src/psm2/psm_utils.h \ +- prov/psm2/src/psm2/ptl.h \ + prov/psm2/src/psm2/psmi_wrappers.c \ +- prov/psm2/src/psm2/psmi_wrappers.h \ ++ prov/psm2/src/psm2/psm2_hal.c \ + prov/psm2/src/psm2/ptl_am/am_cuda_memhandle_cache.c \ +- prov/psm2/src/psm2/ptl_am/am_cuda_memhandle_cache.h \ + prov/psm2/src/psm2/ptl_am/am_reqrep.c \ + prov/psm2/src/psm2/ptl_am/am_reqrep_shmem.c \ + prov/psm2/src/psm2/ptl_am/cmarwu.c \ +- prov/psm2/src/psm2/ptl_am/cmarw.h \ +- prov/psm2/src/psm2/ptl_am/psm_am_internal.h \ + prov/psm2/src/psm2/ptl_am/ptl.c \ +- prov/psm2/src/psm2/ptl_am/ptl_fwd.h \ + prov/psm2/src/psm2/ptl_ips/ips_crc32.c \ + prov/psm2/src/psm2/ptl_ips/ips_epstate.c \ +- prov/psm2/src/psm2/ptl_ips/ips_epstate.h \ +- prov/psm2/src/psm2/ptl_ips/ipserror.c \ +- prov/psm2/src/psm2/ptl_ips/ipserror.h \ +- prov/psm2/src/psm2/ptl_ips/ips_expected_proto.h \ + prov/psm2/src/psm2/ptl_ips/ips_opp_path_rec.c \ + prov/psm2/src/psm2/ptl_ips/ips_path_rec.c \ +- prov/psm2/src/psm2/ptl_ips/ips_path_rec.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto.c \ +- prov/psm2/src/psm2/ptl_ips/ips_proto.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto_am.c \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_am.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto_connect.c \ + prov/psm2/src/psm2/ptl_ips/ips_proto_dump.c \ + prov/psm2/src/psm2/ptl_ips/ips_proto_expected.c \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_header.h \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_help.h \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_internal.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto_mq.c \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_params.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto_recv.c \ + prov/psm2/src/psm2/ptl_ips/ips_recvhdrq.c \ +- prov/psm2/src/psm2/ptl_ips/ips_recvhdrq.h \ + prov/psm2/src/psm2/ptl_ips/ips_recvq.c \ +- prov/psm2/src/psm2/ptl_ips/ips_recvq.h \ + prov/psm2/src/psm2/ptl_ips/ips_scb.c \ +- prov/psm2/src/psm2/ptl_ips/ips_scb.h \ +- prov/psm2/src/psm2/ptl_ips/ips_spio.c \ +- prov/psm2/src/psm2/ptl_ips/ips_spio.h \ +- prov/psm2/src/psm2/ptl_ips/ips_stats.h \ +- prov/psm2/src/psm2/ptl_ips/ips_subcontext.c \ +- prov/psm2/src/psm2/ptl_ips/ips_subcontext.h \ + prov/psm2/src/psm2/ptl_ips/ips_tid.c \ +- prov/psm2/src/psm2/ptl_ips/ips_tid.h \ + prov/psm2/src/psm2/ptl_ips/ips_tidcache.c \ +- prov/psm2/src/psm2/ptl_ips/ips_tidcache.h \ + prov/psm2/src/psm2/ptl_ips/ips_tidflow.c \ +- prov/psm2/src/psm2/ptl_ips/ips_tidflow.h \ + prov/psm2/src/psm2/ptl_ips/ips_writehdrq.c \ +- prov/psm2/src/psm2/ptl_ips/ips_writehdrq.h \ + prov/psm2/src/psm2/ptl_ips/ptl.c \ +- prov/psm2/src/psm2/ptl_ips/ptl_fwd.h \ +- prov/psm2/src/psm2/ptl_ips/ptl_ips.h \ + prov/psm2/src/psm2/ptl_ips/ptl_rcvthread.c \ + prov/psm2/src/psm2/ptl_self/ptl.c \ +- prov/psm2/src/psm2/ptl_self/ptl_fwd.h \ + prov/psm2/src/psm2/libuuid/psm_uuid.c \ +- prov/psm2/src/psm2/libuuid/psm_uuid.h \ + prov/psm2/src/psm2/libuuid/parse.c \ + prov/psm2/src/psm2/libuuid/pack.c \ + prov/psm2/src/psm2/libuuid/unpack.c \ + prov/psm2/src/psm2/libuuid/unparse.c \ + prov/psm2/src/psm2/opa/opa_debug.c \ + prov/psm2/src/psm2/opa/opa_dwordcpy-@psm2_ARCH@.c \ +- prov/psm2/src/psm2/opa/opa_i2cflash.c \ +- prov/psm2/src/psm2/opa/opa_proto.c \ + prov/psm2/src/psm2/opa/opa_service.c \ + prov/psm2/src/psm2/opa/opa_sysfs.c \ + prov/psm2/src/psm2/opa/opa_syslog.c \ + prov/psm2/src/psm2/opa/opa_time.c \ + prov/psm2/src/psm2/opa/opa_utils.c \ +- prov/psm2/src/psm2/include/hfi1_deprecated.h \ +- prov/psm2/src/psm2/include/opa_byteorder.h \ +- prov/psm2/src/psm2/include/opa_common.h \ +- prov/psm2/src/psm2/include/opa_debug.h \ +- prov/psm2/src/psm2/include/opa_intf.h \ +- prov/psm2/src/psm2/include/opa_queue.h \ +- prov/psm2/src/psm2/include/opa_revision.h \ +- prov/psm2/src/psm2/include/opa_service.h \ +- prov/psm2/src/psm2/include/opa_udebug.h \ +- prov/psm2/src/psm2/include/opa_user.h \ +- prov/psm2/src/psm2/include/psm2_mock_testing.h \ +- prov/psm2/src/psm2/include/rbtree.h \ +- prov/psm2/src/psm2/include/linux-@psm2_ARCH@/bit_ops.h \ +- prov/psm2/src/psm2/include/linux-@psm2_ARCH@/sysdep.h \ +- prov/psm2/src/psm2/mpspawn/mpspawn_stats.h ++ prov/psm2/src/psm2/psm_hal_gen1/psm_hal_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/opa_i2cflash_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/opa_proto_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/opa_service_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/opa_utils_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/psm_gdrcpy.c + + if HAVE_PSM2_X86_64 + _psm2_nodist_files += \ +@@ -166,8 +105,10 @@ _psm2_cppflags = \ + -I$(top_srcdir)/prov/psm2/src/psm2/ptl_ips \ + -I$(top_srcdir)/prov/psm2/src/psm2/ptl_am \ + -I$(top_srcdir)/prov/psm2/src/psm2/ptl_self \ ++ -I$(top_srcdir)/prov/psm2/src/psm2/psm_hal_gen1 \ + -DNVALGRIND + ++ + endif HAVE_PSM2_SRC + + if HAVE_PSM2_DL +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/configure.m4 +index db0d927..844919d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/configure.m4 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/configure.m4 +@@ -18,6 +18,9 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + AC_DEFINE_UNQUOTED([HAVE_PSM2_SRC], $have_psm2_src, [PSM2 source is built-in]) + psm2_happy=0 + have_psm2_am_register_handlers_2=1 ++ have_psm2_mq_fp_msg=1 ++ have_psm2_mq_req_user=1 ++ have_psm2_info_query=1 + AS_IF([test x"$enable_psm2" != x"no"], + [AS_IF([test x$have_psm2_src = x0], + [ +@@ -25,7 +28,7 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + FI_CHECK_PACKAGE([psm2], + [psm2.h], + [psm2], +- [psm2_am_register_handlers_2], ++ [psm2_info_query], + [], + [$psm2_PREFIX], + [$psm2_LIBDIR], +@@ -33,12 +36,54 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + [psm2_happy=0]) + AS_IF([test x$psm2_happy = x0], + [ +- $as_echo "$as_me: recheck psm2 with reduced feature set." ++ $as_echo "$as_me: recheck psm2 without psm2_info_query." ++ have_psm2_info_query=0 ++ FI_CHECK_PACKAGE([psm2], ++ [psm2.h], ++ [psm2], ++ [psm2_mq_ipeek_dequeue_multi], ++ [], ++ [$psm2_PREFIX], ++ [$psm2_LIBDIR], ++ [psm2_happy=1], ++ [psm2_happy=0]) ++ ]) ++ AS_IF([test x$psm2_happy = x0], ++ [ ++ $as_echo "$as_me: recheck psm2 without psm2_mq_ipeek_dequeue_multi." ++ have_psm2_mq_req_user=0 ++ FI_CHECK_PACKAGE([psm2], ++ [psm2.h], ++ [psm2], ++ [psm2_mq_fp_msg], ++ [], ++ [$psm2_PREFIX], ++ [$psm2_LIBDIR], ++ [psm2_happy=1], ++ [psm2_happy=0]) ++ ]) ++ AS_IF([test x$psm2_happy = x0], ++ [ ++ $as_echo "$as_me: recheck psm2 without psm2_mq_fp_msg." ++ have_psm2_mq_fp_msg=0 ++ FI_CHECK_PACKAGE([psm2], ++ [psm2.h], ++ [psm2], ++ [psm2_am_register_handlers_2], ++ [], ++ [$psm2_PREFIX], ++ [$psm2_LIBDIR], ++ [psm2_happy=1], ++ [psm2_happy=0]) ++ ]) ++ AS_IF([test x$psm2_happy = x0], ++ [ ++ $as_echo "$as_me: recheck psm2 without psm2_am_register_handlers_2." + have_psm2_am_register_handlers_2=0 + FI_CHECK_PACKAGE([psm2], + [psm2.h], + [psm2], +- [psm2_ep_epid_lookup2], ++ [psm2_ep_disconnect2], + [], + [$psm2_PREFIX], + [$psm2_LIBDIR], +@@ -48,8 +93,11 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + ], + [ + dnl build with PSM2 source code included +- psm2_CPPFLAGS="-msse4.2" + psm2_happy=1 ++ have_psm2_mq_req_user=1 ++ AS_IF([test $cc_basename = icc], ++ [psm2_CPPFLAGS="-march=core-avx2"], ++ [psm2_CPPFLAGS="-mavx2"]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include ]], + [[ +@@ -76,30 +124,43 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + psm2_happy=0 + ])]) + AS_IF([test x$psm2_happy = x1], +- AS_IF([test -f $with_psm2_src/libpsm2.spec.in], +- [AS_IF([grep -q psm2_am_register_handlers_2 $with_psm2_src/psm2_am.h], +- [ +- $as_echo "$as_me: creating links for PSM2 source code." +- mkdir -p $srcdir/prov/psm2/src/psm2 +- cp -srf $with_psm2_src/* $srcdir/prov/psm2/src/psm2/ +- ln -sf ../include/rbtree.h $srcdir/prov/psm2/src/psm2/ptl_ips/ +- ln -sf ../include/rbtree.h $srcdir/prov/psm2/src/psm2/ptl_am/ +- ], +- [ +- $as_echo "$as_me: PSM2 source under <$with_psm2_src> is too old." +- psm2_happy=0 +- ]) +- ], +- [ +- $as_echo "$as_me: no PSM2 source under <$with_psm2_src>." ++ [AS_IF([test -f $with_psm2_src/psm_hal_gen1/opa_common_gen1.h], ++ [ ++ $as_echo "$as_me: creating links for PSM2 source code." ++ mkdir -p $srcdir/prov/psm2/src/psm2 ++ cp -srf $with_psm2_src/* $srcdir/prov/psm2/src/psm2/ ++ ln -sf ../include/rbtree.h $srcdir/prov/psm2/src/psm2/ptl_ips/ ++ ln -sf ../include/rbtree.h $srcdir/prov/psm2/src/psm2/ptl_am/ ++ ++ hal_decl_file=$srcdir/prov/psm2/src/psm2/psm2_hal_inlines_d.h ++ hal_impl_file=$srcdir/prov/psm2/src/psm2/psm2_hal_inlines_i.h ++ $as_echo "#define PSMI_HAL_INST_CNT 1" >$hal_decl_file ++ $as_echo "#define PSMI_HAL_INLINE inline" >>$hal_decl_file ++ $as_echo "#define PSMI_HAL_CAT_INL_SYM(KERNEL) hfp_gen1_##KERNEL" >>$hal_decl_file ++ $as_echo "#include \"psm2_hal_inline_t.h\"" >>$hal_decl_file ++ $as_echo "#include \"psm_hal_gen1/psm_hal_inline_i.h\"" >$hal_impl_file ++ ], ++ [ ++ $as_echo "$as_me: PSM2 source under <$with_psm2_src> is missing or too old." ++ $as_echo "$as_me: Please get the latest source from https://github.com/intel/opa-psm2." + psm2_happy=0 +- ])) ++ ]) ++ ]) + ]) + ]) + AS_IF([test $psm2_happy -eq 1], [$1], [$2]) + AC_DEFINE_UNQUOTED([HAVE_PSM2_AM_REGISTER_HANDLERS_2], + $have_psm2_am_register_handlers_2, + [psm2_am_register_handlers_2 function is present]) ++ AC_DEFINE_UNQUOTED([HAVE_PSM2_MQ_FP_MSG], ++ $have_psm2_mq_fp_msg, ++ [psm2_mq_fp_msg function is present]) ++ AC_DEFINE_UNQUOTED([HAVE_PSM2_MQ_REQ_USER], ++ $have_psm2_mq_req_user, ++ [psm2_mq_ipeek_dequeue_multi function is present]) ++ AC_DEFINE_UNQUOTED([HAVE_PSM2_INFO_QUERY], ++ $have_psm2_info_query, ++ [psm2_info_query function is present]) + ]) + + AC_ARG_WITH([psm2-src], +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct.h +new file mode 100644 +index 0000000..620edac +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct.h +@@ -0,0 +1,42 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015-2016 Los Alamos National Security, LLC. ++ * All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_H ++#define FI_DIRECT_H ++ ++/* ++ * use default definitions ++ */ ++ ++#endif /* FI_DIRECT_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic.h +new file mode 100644 +index 0000000..6bbd684 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic.h +@@ -0,0 +1,269 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_ATOMIC_H ++#define FI_DIRECT_ATOMIC_H ++ ++#define FABRIC_DIRECT_ATOMIC ++ ++ssize_t psmx2_atomic_write( ++ struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_writev( ++ struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_writemsg( ++ struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, uint64_t flags); ++ ++ssize_t psmx2_atomic_inject( ++ struct fid_ep *ep, const void *buf, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op); ++ ++ssize_t psmx2_atomic_readwrite( ++ struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_readwritev( ++ struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_readwritemsg( ++ struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ uint64_t flags); ++ ++ssize_t psmx2_atomic_comparewrite( ++ struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ const void *compare, void *compare_desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_compareweitev( ++ struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ const struct fi_ioc *comparev, void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_comparewritemsg( ++ struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ uint64_t flags); ++ ++int psmx2_atomic_writevalid( ++ struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count); ++ ++int psmx2_atomic_readwritevalid( ++ struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count); ++ ++int psmx2_atomic_comparewritevalid( ++ struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count); ++ ++int psmx2_query_atomic( ++ struct fid_domain *domain, ++ enum fi_datatype datatype, enum fi_op op, ++ struct fi_atomic_attr *attr, uint64_t flags); ++ ++ ++static inline ssize_t ++fi_atomic(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_write(ep, buf, count, desc, dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++static inline ssize_t ++fi_atomicv(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_writev(ep, iov, desc, count, dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++static inline ssize_t ++fi_atomicmsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ return psmx2_atomic_writemsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_inject_atomic(struct fid_ep *ep, const void *buf, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op) ++{ ++ return psmx2_atomic_inject(ep, buf, count, dest_addr, addr, ++ key, datatype, op); ++} ++ ++static inline ssize_t ++fi_fetch_atomic(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_readwrite(ep, buf, count, desc, result, result_desc, ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static inline ssize_t ++fi_fetch_atomicv(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_readwritev(ep, iov, desc, count, ++ resultv, result_desc, result_count, ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static inline ssize_t ++fi_fetch_atomicmsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ return psmx2_atomic_readwritemsg(ep, msg, resultv, result_desc, ++ result_count, flags); ++} ++ ++static inline ssize_t ++fi_compare_atomic(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ const void *compare, void *compare_desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_compwrite(ep, buf, count, desc, ++ compare, compare_desc, result, result_desc, ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static inline ssize_t ++fi_compare_atomicv(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ const struct fi_ioc *comparev, void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_compwritev(ep, iov, desc, count, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, result_count, ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static inline ssize_t ++fi_compare_atomicmsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ return psmx2_atomic_compwritemsg(ep, msg, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, result_count, flags); ++} ++ ++static inline int ++fi_atomicvalid(struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count) ++{ ++ return psmx2_atomic_writevalid(ep, datatype, op, count); ++} ++ ++static inline int ++fi_fetch_atomicvalid(struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count) ++{ ++ return psmx2_atomic_readwritevalid(ep, datatype, op, count); ++} ++ ++static inline int ++fi_compare_atomicvalid(struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count) ++{ ++ return psmx2_atomic_compwritevalid(ep, datatype, op, count); ++} ++ ++static inline int ++fi_query_atomic(struct fid_domain *domain, ++ enum fi_datatype datatype, enum fi_op op, ++ struct fi_atomic_attr *attr, uint64_t flags) ++{ ++ return psmx2_query_atomic(domain, datatype, op, attr, flags); ++} ++ ++#endif /* FI_DIRECT_ATOMIC_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic_def.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic_def.h +new file mode 100644 +index 0000000..c8a5d3e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic_def.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_ATOMIC_DEF_H ++#define FI_DIRECT_ATOMIC_DEF_H ++ ++/* ++ * use the default definitions ++ */ ++ ++#endif /* FI_DIRECT_ATOMIC_DEF_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_cm.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_cm.h +new file mode 100644 +index 0000000..a337c5d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_cm.h +@@ -0,0 +1,97 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_CM_H ++#define FI_DIRECT_CM_H ++ ++#define FABRIC_DIRECT_CM ++ ++int psmx2_cm_getname(fid_t fid, void *addr, size_t *addrlen); ++ ++ ++static inline int fi_setname(fid_t fid, void *addr, size_t addrlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ return psmx2_cm_getname(fid, addr, addrlen); ++} ++ ++static inline int fi_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_listen(struct fid_pep *pep) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_connect(struct fid_ep *ep, const void *addr, ++ const void *param, size_t paramlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_accept(struct fid_ep *ep, const void *param, size_t paramlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_reject(struct fid_pep *pep, fid_t handle, ++ const void *param, size_t paramlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_shutdown(struct fid_ep *ep, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_join(struct fid_ep *ep, const void *addr, uint64_t flags, ++ struct fid_mc **mc, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline fi_addr_t fi_mc_addr(struct fid_mc *mc) ++{ ++ return -FI_ENOSYS; ++} ++ ++#endif /* FI_DIRECT_CM_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_domain.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_domain.h +new file mode 100644 +index 0000000..6d5b724 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_domain.h +@@ -0,0 +1,266 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_DOMAIN_H ++#define FI_DIRECT_DOMAIN_H ++ ++#define FABRIC_DIRECT_DOMAIN ++ ++int psmx2_domain_open( ++ struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++ ++int psmx2_cq_open( ++ struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq, void *context); ++ ++int psmx2_cntr_open( ++ struct fid_domain *domain, struct fi_cntr_attr *attr, ++ struct fid_cntr **cntr, void *context); ++ ++int psmx2_wait_open( ++ struct fid_fabric *fabric, struct fi_wait_attr *attr, ++ struct fid_wait **waitset); ++ ++int psmx2_mr_reg( ++ struct fid *fid, const void *buf, size_t len, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context); ++ ++int psmx2_mr_regv( ++ struct fid *fid, const struct iovec *iov, ++ size_t count, uint64_t access, ++ uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context); ++ ++int psmx2_mr_regattr( ++ struct fid *fid, const struct fi_mr_attr *attr, ++ uint64_t flags, struct fid_mr **mr); ++ ++int psmx2_mr_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++ ++int psmx2_av_open( ++ struct fid_domain *domain, struct fi_av_attr *attr, ++ struct fid_av **av, void *context); ++ ++int psmx2_av_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++ ++int psmx2_av_insert( ++ struct fid_av *av, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context); ++ ++int psmx2_av_remove( ++ struct fid_av *av, fi_addr_t *fi_addr, size_t count, ++ uint64_t flags); ++ ++int psmx2_av_lookup( ++ struct fid_av *av, fi_addr_t fi_addr, void *addr, ++ size_t *addrlen); ++ ++const char *psmx2_av_straddr( ++ struct fid_av *av, const void *addr, char *buf, size_t *len); ++ ++ ++static inline int ++fi_domain(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context) ++{ ++ return psmx2_domain_open(fabric, info, domain, context); ++} ++ ++static inline int ++fi_domain_bind(struct fid_domain *domain, struct fid *fid, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq, void *context) ++{ ++ return psmx2_cq_open(domain, attr, cq, context); ++} ++ ++static inline int ++fi_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, ++ struct fid_cntr **cntr, void *context) ++{ ++ return psmx2_cntr_open(domain, attr, cntr, context); ++} ++ ++static inline int ++fi_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, ++ struct fid_wait **waitset) ++{ ++ return psmx2_wait_open(fabric, attr, waitset); ++} ++ ++static inline int ++fi_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, ++ struct fid_poll **pollset) ++{ ++ return domain->ops->poll_open(domain, attr, pollset); ++} ++ ++static inline int ++fi_mr_reg(struct fid_domain *domain, const void *buf, size_t len, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ return psmx2_mr_reg(&domain->fid, buf, len, access, offset, ++ requested_key, flags, mr, context); ++} ++ ++static inline int ++fi_mr_regv(struct fid_domain *domain, const struct iovec *iov, ++ size_t count, uint64_t access, ++ uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ return psmx2_mr_regv(&domain->fid, iov, count, access, ++ offset, requested_key, flags, mr, context); ++} ++ ++static inline int ++fi_mr_regattr(struct fid_domain *domain, const struct fi_mr_attr *attr, ++ uint64_t flags, struct fid_mr **mr) ++{ ++ return psmx2_mr_regattr(&domain->fid, attr, flags, mr); ++} ++ ++static inline void *fi_mr_desc(struct fid_mr *mr) ++{ ++ return mr->mem_desc; ++} ++ ++static inline uint64_t fi_mr_key(struct fid_mr *mr) ++{ ++ return mr->key; ++} ++ ++static inline int ++fi_mr_raw_attr(struct fid_mr *mr, uint64_t *base_addr, ++ uint8_t *raw_key, size_t *key_size, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_mr_map_raw(struct fid_domain *domain, uint64_t base_addr, ++ uint8_t *raw_key, size_t key_size, uint64_t *key, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_mr_unmap_key(struct fid_domain *domain, uint64_t key) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_mr_bind(struct fid_mr *mr, struct fid *bfid, uint64_t flags) ++{ ++ return psmx2_mr_bind(&mr->fid, bfid, flags); ++} ++ ++static inline int ++fi_mr_refresh(struct fid_mr *mr, const struct iovec *iov, size_t count, ++ uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_mr_enable(struct fid_mr *mr) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_av_open(struct fid_domain *domain, struct fi_av_attr *attr, ++ struct fid_av **av, void *context) ++{ ++ return psmx2_av_open(domain, attr, av, context); ++} ++ ++static inline int ++fi_av_bind(struct fid_av *av, struct fid *fid, uint64_t flags) ++{ ++ return psmx2_av_bind(&av->fid, fid, flags); ++} ++ ++static inline int ++fi_av_insert(struct fid_av *av, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ return psmx2_av_insert(av, addr, count, fi_addr, flags, context); ++} ++ ++static inline int ++fi_av_insertsvc(struct fid_av *av, const char *node, const char *service, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_av_insertsym(struct fid_av *av, const char *node, size_t nodecnt, ++ const char *service, size_t svccnt, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, uint64_t flags) ++{ ++ return psmx2_av_remove(av, fi_addr, count, flags); ++} ++ ++static inline int ++fi_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, size_t *addrlen) ++{ ++ return psmx2_av_lookup(av, fi_addr, addr, addrlen); ++} ++ ++static inline const char * ++fi_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len) ++{ ++ return psmx2_av_straddr(av, addr, buf, len); ++} ++ ++static inline fi_addr_t ++fi_rx_addr(fi_addr_t fi_addr, int rx_index, int rx_ctx_bits) ++{ ++ return (fi_addr_t) (((uint64_t) rx_index << (64 - rx_ctx_bits)) | fi_addr); ++} ++ ++#endif /* FI_DIRECT_DOMAIN_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_endpoint.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_endpoint.h +new file mode 100644 +index 0000000..943e836 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_endpoint.h +@@ -0,0 +1,282 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_ENDPOINT_H ++#define FI_DIRECT_ENDPOINT_H ++ ++#define FABRIC_DIRECT_ENDPOINT ++ ++int psmx2_ep_open( ++ struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep, void *context); ++ ++int psmx2_sep_open( ++ struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **sep, void *context); ++ ++int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++ ++int psmx2_sep_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++ ++int psmx2_ep_control(fid_t fid, int command, void *arg); ++ ++ssize_t psmx2_ep_cancel(fid_t fid, void *context); ++ ++int psmx2_ep_setopt( ++ fid_t fid, int level, int optname, const void *optval, ++ size_t optlen); ++ ++int psmx2_ep_getopt( ++ fid_t fid, int level, int optname, void *optval, ++ size_t *optlen); ++ ++int psmx2_tx_context( ++ struct fid_ep *ep, int index, struct fi_tx_attr *attr, ++ struct fid_ep **tx_ep, void *context); ++ ++int psmx2_rx_context( ++ struct fid_ep *ep, int index, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context); ++ ++ssize_t psmx2_rx_size_left(struct fid_ep *ep); ++ ++ssize_t psmx2_tx_size_left(struct fid_ep *ep); ++ ++int psmx2_stx_ctx( ++ struct fid_domain *domain, struct fi_tx_attr *attr, ++ struct fid_stx **stx, void *context); ++ ++ssize_t psmx2_recv( ++ struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, void *context); ++ ++ssize_t psmx2_recvv( ++ struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context); ++ ++ssize_t psmx2_recvmsg( ++ struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags); ++ ++ssize_t psmx2_send( ++ struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, void *context); ++ ++ssize_t psmx2_sendv( ++ struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context); ++ ++ssize_t psmx2_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags); ++ ++ssize_t psmx2_inject( ++ struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr); ++ ++ssize_t psmx2_senddata( ++ struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, void *context); ++ ++ssize_t psmx2_injectdata( ++ struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr); ++ ++ ++static inline int ++fi_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_endpoint(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep, void *context) ++{ ++ return psmx2_ep_open(domain, info, ep, context); ++} ++ ++static inline int ++fi_scalable_ep(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **sep, void *context) ++{ ++ return psmx2_sep_open(domain, info, sep, context); ++} ++ ++static inline int fi_ep_bind(struct fid_ep *ep, struct fid *bfid, uint64_t flags) ++{ ++ return psmx2_ep_bind(&ep->fid, bfid, flags); ++} ++ ++static inline int fi_pep_bind(struct fid_pep *pep, struct fid *bfid, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_scalable_ep_bind(struct fid_ep *sep, struct fid *bfid, uint64_t flags) ++{ ++ return psmx2_sep_bind(&sep->fid, bfid, flags); ++} ++ ++static inline int fi_enable(struct fid_ep *ep) ++{ ++ return psmx2_ep_control(&ep->fid, FI_ENABLE, NULL); ++} ++ ++static inline ssize_t fi_cancel(fid_t fid, void *context) ++{ ++ return psmx2_ep_cancel(fid, context); ++} ++ ++static inline int ++fi_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) ++{ ++ return psmx2_ep_setopt(fid, level, optname, optval, optlen); ++} ++ ++static inline int ++fi_getopt(fid_t fid, int level, int optname, ++ void *optval, size_t *optlen) ++{ ++ return psmx2_ep_getopt(fid, level, optname, optval, optlen); ++} ++ ++static inline int fi_ep_alias(struct fid_ep *ep, struct fid_ep **alias_ep, ++ uint64_t flags) ++{ ++ int ret; ++ struct fid *fid; ++ ret = fi_alias(&ep->fid, &fid, flags); ++ if (!ret) ++ *alias_ep = container_of(fid, struct fid_ep, fid); ++ return ret; ++} ++ ++static inline int ++fi_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *attr, ++ struct fid_ep **tx_ep, void *context) ++{ ++ return psmx2_tx_ctx(ep, index, attr, tx_ep, context); ++} ++ ++static inline int ++fi_rx_context(struct fid_ep *ep, int index, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context) ++{ ++ return psmx2_rx_ctx(ep, index, attr, rx_ep, context); ++} ++ ++static inline FI_DEPRECATED_FUNC ssize_t ++fi_rx_size_left(struct fid_ep *ep) ++{ ++ return psmx2_rx_size_left(ep); ++} ++ ++static inline FI_DEPRECATED_FUNC ssize_t ++fi_tx_size_left(struct fid_ep *ep) ++{ ++ return psmx2_tx_size_left(ep); ++} ++ ++static inline int ++fi_stx_context(struct fid_domain *domain, struct fi_tx_attr *attr, ++ struct fid_stx **stx, void *context) ++{ ++ return psmx2_stx_ctx(domain, attr, stx, context); ++} ++ ++static inline int ++fi_srx_context(struct fid_domain *domain, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline ssize_t ++fi_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, ++ void *context) ++{ ++ return psmx2_recv(ep, buf, len, desc, src_addr, context); ++} ++ ++static inline ssize_t ++fi_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ return psmx2_recvv(ep, iov, desc, count, src_addr, context); ++} ++ ++static inline ssize_t ++fi_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags) ++{ ++ return psmx2_recvmsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, void *context) ++{ ++ return psmx2_send(ep, buf, len, desc, dest_addr, context); ++} ++ ++static inline ssize_t ++fi_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ return psmx2_sendv(ep, iov, desc, count, dest_addr, context); ++} ++ ++static inline ssize_t ++fi_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags) ++{ ++ return psmx2_sendmsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_inject(struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr) ++{ ++ return psmx2_inject(ep, buf, len, dest_addr); ++} ++ ++static inline ssize_t ++fi_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, void *context) ++{ ++ return psmx2_senddata(ep, buf, len, desc, data, dest_addr, context); ++} ++ ++static inline ssize_t ++fi_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ return psmx2_injectdata(ep, buf, len, data, dest_addr); ++} ++ ++#endif /* FI_DIRECT_ENDPOINT */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_eq.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_eq.h +new file mode 100644 +index 0000000..c3c4335 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_eq.h +@@ -0,0 +1,230 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_EQ_H ++#define FI_DIRECT_EQ_H ++ ++#define FABRIC_DIRECT_EQ ++ ++int psmx2_wait_trywait(struct fid_fabric *fabric, struct fid **fids, int count); ++ ++int psmx2_wait_wait(struct fid_wait *waitset, int timeout); ++ ++ssize_t psmx2_cq_read(struct fid_cq *cq, void *buf, size_t count); ++ ++ssize_t psmx2_cq_readfrom( ++ struct fid_cq *cq, void *buf, size_t count, ++ fi_addr_t *src_addr); ++ ++ssize_t psmx2_cq_readerr( ++ struct fid_cq *cq, struct fi_cq_err_entry *buf, ++ uint64_t flags); ++ ++ssize_t psmx2_cq_sread( ++ struct fid_cq *cq, void *buf, size_t count, ++ const void *cond, int timeout); ++ ++ssize_t psmx2_cq_sreadfrom( ++ struct fid_cq *cq, void *buf, size_t count, ++ fi_addr_t *src_addr, const void *cond, int timeout); ++ ++int psmx2_cq_signal(struct fid_cq *cq); ++ ++const char *psmx2_cq_strerror( ++ struct fid_cq *cq, int prov_errno, ++ const void *err_data, char *buf, size_t len); ++ ++uint64_t psmx2_cntr_read(struct fid_cntr *cntr); ++uint64_t psmx2_cntr_readerr(struct fid_cntr *cntr); ++int psmx2_cntr_add(struct fid_cntr *cntr, uint64_t value); ++int psmx2_cntr_adderr(struct fid_cntr *cntr, uint64_t value); ++int psmx2_cntr_set(struct fid_cntr *cntr, uint64_t value); ++int psmx2_cntr_seterr(struct fid_cntr *cntr, uint64_t value); ++int psmx2_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout); ++ ++ ++static inline int ++fi_trywait(struct fid_fabric *fabric, struct fid **fids, int count) ++{ ++ return psmx2_wait_trywait(fabric, fids, count); ++} ++ ++static inline int ++fi_wait(struct fid_wait *waitset, int timeout) ++{ ++ return psmx2_wait_wait(waitset, timeout); ++} ++ ++/* ++ * pollset and eq use util functions ++ */ ++ ++static inline int ++fi_poll(struct fid_poll *pollset, void **context, int count) ++{ ++ return pollset->ops->poll(pollset, context, count); ++} ++ ++static inline int ++fi_poll_add(struct fid_poll *pollset, struct fid *event_fid, uint64_t flags) ++{ ++ return pollset->ops->poll_add(pollset, event_fid, flags); ++} ++ ++static inline int ++fi_poll_del(struct fid_poll *pollset, struct fid *event_fid, uint64_t flags) ++{ ++ return pollset->ops->poll_del(pollset, event_fid, flags); ++} ++ ++static inline int ++fi_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, ++ struct fid_eq **eq, void *context) ++{ ++ return fabric->ops->eq_open(fabric, attr, eq, context); ++} ++ ++static inline ssize_t ++fi_eq_read(struct fid_eq *eq, uint32_t *event, void *buf, ++ size_t len, uint64_t flags) ++{ ++ return eq->ops->read(eq, event, buf, len, flags); ++} ++ ++static inline ssize_t ++fi_eq_readerr(struct fid_eq *eq, struct fi_eq_err_entry *buf, uint64_t flags) ++{ ++ return eq->ops->readerr(eq, buf, flags); ++} ++ ++static inline ssize_t ++fi_eq_write(struct fid_eq *eq, uint32_t event, const void *buf, ++ size_t len, uint64_t flags) ++{ ++ return eq->ops->write(eq, event, buf, len, flags); ++} ++ ++static inline ssize_t ++fi_eq_sread(struct fid_eq *eq, uint32_t *event, void *buf, size_t len, ++ int timeout, uint64_t flags) ++{ ++ return eq->ops->sread(eq, event, buf, len, timeout, flags); ++} ++ ++static inline const char * ++fi_eq_strerror(struct fid_eq *eq, int prov_errno, const void *err_data, ++ char *buf, size_t len) ++{ ++ return eq->ops->strerror(eq, prov_errno, err_data, buf, len); ++} ++ ++ ++static inline ssize_t fi_cq_read(struct fid_cq *cq, void *buf, size_t count) ++{ ++ return psmx2_cq_read(cq, buf, count); ++} ++ ++static inline ssize_t ++fi_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, fi_addr_t *src_addr) ++{ ++ return psmx2_cq_readfrom(cq, buf, count, src_addr); ++} ++ ++static inline ssize_t ++fi_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, uint64_t flags) ++{ ++ return psmx2_cq_readerr(cq, buf, flags); ++} ++ ++static inline ssize_t ++fi_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, int timeout) ++{ ++ return psmx2_cq_sread(cq, buf, count, cond, timeout); ++} ++ ++static inline ssize_t ++fi_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, ++ fi_addr_t *src_addr, const void *cond, int timeout) ++{ ++ return psmx2_cq_sreadfrom(cq, buf, count, src_addr, cond, timeout); ++} ++ ++static inline int fi_cq_signal(struct fid_cq *cq) ++{ ++ return psmx2_cq_signal(cq); ++} ++ ++static inline const char * ++fi_cq_strerror(struct fid_cq *cq, int prov_errno, const void *err_data, ++ char *buf, size_t len) ++{ ++ return psmx2_cq_strerror(cq, prov_errno, err_data, buf, len); ++} ++ ++ ++static inline uint64_t fi_cntr_read(struct fid_cntr *cntr) ++{ ++ return psmx2_cntr_read(cntr); ++} ++ ++static inline uint64_t fi_cntr_readerr(struct fid_cntr *cntr) ++{ ++ return psmx2_cntr_readerr(cntr); ++} ++ ++static inline int fi_cntr_add(struct fid_cntr *cntr, uint64_t value) ++{ ++ return psmx2_cntr_add(cntr, value); ++} ++ ++static inline int fi_cntr_adderr(struct fid_cntr *cntr, uint64_t value) ++{ ++ return psmx2_cntr_adderr(cntr, value); ++} ++ ++static inline int fi_cntr_set(struct fid_cntr *cntr, uint64_t value) ++{ ++ return psmx2_cntr_set(cntr, value); ++} ++ ++static inline int fi_cntr_seterr(struct fid_cntr *cntr, uint64_t value) ++{ ++ return psmx2_cntr_seterr(cntr, value); ++} ++ ++static inline int ++fi_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout) ++{ ++ return psmx2_cntr_wait(cntr, threshold, timeout); ++} ++ ++#endif /* FI_DIRECT_EQ_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_rma.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_rma.h +new file mode 100644 +index 0000000..543b2ac +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_rma.h +@@ -0,0 +1,144 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_RMA_H ++#define FI_DIRECT_RMA_H ++ ++#define FABRIC_DIRECT_RMA ++ ++ssize_t psmx2_read( ++ struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context); ++ ++ssize_t psmx2_readv( ++ struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context); ++ ++ssize_t psmx2_readmsg( ++ struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags); ++ ++ssize_t psmx2_write( ++ struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context); ++ ++ssize_t psmx2_writev( ++ struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context); ++ ++ssize_t psmx2_writemsg( ++ struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags); ++ ++ssize_t psmx2_inject_write( ++ struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key); ++ ++ssize_t psmx2_writedata( ++ struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context); ++ ++ssize_t psmx2_inject_writedata( ++ struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key); ++ ++ ++static inline ssize_t ++fi_read(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ return psmx2_read(ep, buf, len, desc, src_addr, addr, key, context); ++} ++ ++static inline ssize_t ++fi_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ return psmx2_readv(ep, iov, desc, count, src_addr, addr, key, context); ++} ++ ++static inline ssize_t ++fi_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ return psmx2_readmsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_write(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ return psmx2_write(ep, buf, len, desc, dest_addr, addr, key, context); ++} ++ ++static inline ssize_t ++fi_writev(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ return psmx2_writev(ep, iov, desc, count, dest_addr, addr, key, context); ++} ++ ++static inline ssize_t ++fi_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ return psmx2_writemsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_inject_write(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ return psmx2_inject_write(ep, buf, len, dest_addr, addr, key); ++} ++ ++static inline ssize_t ++fi_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ return psmx2_writedata(ep, buf, len, desc,data, dest_addr, ++ addr, key, context); ++} ++ ++static inline ssize_t ++fi_inject_writedata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ return psmx2_inject_writedata(ep, buf, len, data, dest_addr, addr, key); ++} ++ ++#endif /* FI_DIRECT_RMA_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_tagged.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_tagged.h +new file mode 100644 +index 0000000..f77d7a3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_tagged.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_TAGGED_H ++#define FI_DIRECT_TAGGED_H ++ ++/* ++ * use defaults bacause function pointers are needed for specialization ++ */ ++ ++#endif /* FI_DIRECT_TAGGED_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_trigger.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_trigger.h +new file mode 100644 +index 0000000..10f7956 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_trigger.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_TRIGGER_H ++#define FI_DIRECT_TRIGGER_H ++ ++/* ++ * use default definitions ++ */ ++ ++#endif /* FI_DIRECT_TRIGGER_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/provider_FABRIC_1.0.map b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/provider_FABRIC_1.0.map +new file mode 100644 +index 0000000..f26516a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/provider_FABRIC_1.0.map +@@ -0,0 +1,81 @@ ++/* ++ * Included from "libfabric.map" at the top level directory. ++ * Used for fabric direct build only. ++ */ ++ psmx2_atomic_write; ++ psmx2_atomic_writev; ++ psmx2_atomic_writemsg; ++ psmx2_atomic_inject; ++ psmx2_atomic_readwrite; ++ psmx2_atomic_readwritev; ++ psmx2_atomic_readwritemsg; ++ psmx2_atomic_compwrite; ++ psmx2_atomic_compwritev; ++ psmx2_atomic_compwritemsg; ++ psmx2_atomic_writevalid; ++ psmx2_atomic_readwritevalid; ++ psmx2_atomic_compwritevalid; ++ psmx2_query_atomic; ++ psmx2_cm_getname; ++ psmx2_domain_open; ++ psmx2_cq_open; ++ psmx2_cntr_open; ++ psmx2_wait_open; ++ psmx2_mr_reg; ++ psmx2_mr_regv; ++ psmx2_mr_regattr; ++ psmx2_mr_bind; ++ psmx2_av_open; ++ psmx2_av_bind; ++ psmx2_av_insert; ++ psmx2_av_remove; ++ psmx2_av_lookup; ++ psmx2_av_straddr; ++ psmx2_ep_open; ++ psmx2_sep_open; ++ psmx2_ep_bind; ++ psmx2_sep_bind; ++ psmx2_ep_control; ++ psmx2_ep_cancel; ++ psmx2_ep_getopt; ++ psmx2_ep_setopt; ++ psmx2_tx_context; ++ psmx2_rx_context; ++ psmx2_rx_size_left; ++ psmx2_tx_size_left; ++ psmx2_stx_ctx; ++ psmx2_recv; ++ psmx2_recvv; ++ psmx2_recvmsg; ++ psmx2_send; ++ psmx2_sendv; ++ psmx2_sendmsg; ++ psmx2_inject; ++ psmx2_senddata; ++ psmx2_injectdata; ++ psmx2_wait_trywait; ++ psmx2_wait_wait; ++ psmx2_cq_read; ++ psmx2_cq_readfrom; ++ psmx2_cq_readerr; ++ psmx2_cq_sread; ++ psmx2_cq_sreadfrom; ++ psmx2_cq_signal; ++ psmx2_cq_strerror; ++ psmx2_cntr_read; ++ psmx2_cntr_readerr; ++ psmx2_cntr_add; ++ psmx2_cntr_adderr; ++ psmx2_cntr_set; ++ psmx2_cntr_seterr; ++ psmx2_cntr_wait; ++ psmx2_read; ++ psmx2_readv; ++ psmx2_readmsg; ++ psmx2_write; ++ psmx2_writev; ++ psmx2_writemsg; ++ psmx2_inject_write; ++ psmx2_writedata; ++ psmx2_inject_writedata; ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2.h +index 3d824f1..8c0cdf9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2019 Intel Corporation. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -73,9 +73,17 @@ extern "C" { + #include "rbtree.h" + #include "version.h" + ++#ifdef FABRIC_DIRECT_ENABLED ++#define DIRECT_FN __attribute__((visibility ("default"))) ++#define STATIC ++#else ++#define DIRECT_FN ++#define STATIC static ++#endif ++ + extern struct fi_provider psmx2_prov; + +-#define PSMX2_VERSION (FI_VERSION(1, 6)) ++#define PSMX2_VERSION (FI_VERSION(1, 7)) + + #define PSMX2_OP_FLAGS (FI_INJECT | FI_MULTI_RECV | FI_COMPLETION | \ + FI_TRIGGER | FI_INJECT_COMPLETE | \ +@@ -88,7 +96,7 @@ extern struct fi_provider psmx2_prov; + + #define PSMX2_SEC_CAPS (FI_MULTI_RECV | FI_SOURCE | FI_RMA_EVENT | \ + FI_TRIGGER | FI_LOCAL_COMM | FI_REMOTE_COMM | \ +- FI_SOURCE_ERR) ++ FI_SOURCE_ERR | FI_SHARED_AV) + + #define PSMX2_CAPS (PSMX2_PRI_CAPS | PSMX2_SEC_CAPS | FI_REMOTE_CQ_DATA) + +@@ -267,34 +275,12 @@ static inline uint64_t psmx2_get_tag64(psm2_mq_tag_t *tag96) + #define PSMX2_GET_FLAGS(tag96) ((tag96).tag[PSMX2_FLAGS_IDX] & PSMX2_FLAGS_MASK) + #define PSMX2_GET_CQDATA(tag96) ((tag96).tag2 & PSMX2_DATA_MASK) + +-/* +- * Canonical virtual address on X86_64 only uses 48 bits and the higher 16 bits +- * are sign extensions. We can put some extra information into the 16 bits. +- * +- * Here is the layout: AA-B-C-DDDDDDDDDDDD +- * +- * C == 0xE: scalable endpoint, AAB is context index, DDDDDDDDDDDD is the address +- * C != 0xE: regular endpoint, AA is 0, BCDDDDDDDDDDDD is epaddr +- */ +-#define PSMX2_EP_MASK (0x00FFFFFFFFFFFFFFUL) +-#define PSMX2_SIGN_MASK (0x0080000000000000UL) +-#define PSMX2_SIGN_EXT (0xFF00000000000000UL) +- +-#define PSMX2_EP_TO_ADDR(ep) ((uint64_t)ep & PSMX2_EP_MASK) +-#define PSMX2_ADDR_TO_EP(addr) ((psm2_epaddr_t) \ +- ((addr & PSMX2_SIGN_MASK) ? \ +- (addr | PSMX2_SIGN_EXT) : \ +- (addr & PSMX2_EP_MASK))) +- +-#define PSMX2_MAX_RX_CTX_BITS (12) +-#define PSMX2_SEP_ADDR_FLAG (0x000E000000000000UL) +-#define PSMX2_SEP_ADDR_MASK (0x000F000000000000UL) +-#define PSMX2_SEP_CTXT_MASK (0xFFF0000000000000UL) +-#define PSMX2_SEP_IDX_MASK (0x0000FFFFFFFFFFFFUL) +-#define PSMX2_SEP_ADDR_TEST(addr) (((addr) & PSMX2_SEP_ADDR_MASK) == PSMX2_SEP_ADDR_FLAG) +-#define PSMX2_SEP_ADDR_CTXT(addr, ctxt_bits) \ +- (((addr) & PSMX2_SEP_CTXT_MASK) >> (64-(ctxt_bits))) +-#define PSMX2_SEP_ADDR_IDX(addr) ((addr) & PSMX2_SEP_IDX_MASK) ++#define PSMX2_MAX_RX_CTX_BITS (12) ++#define PSMX2_ADDR_IDX_MASK (0x000FFFFFFFFFFFFFUL) ++#define PSMX2_ADDR_CTXT_MASK (0xFFF0000000000000UL) ++#define PSMX2_ADDR_IDX(addr) ((addr) & PSMX2_ADDR_IDX_MASK) ++#define PSMX2_ADDR_CTXT(addr, ctxt_bits) \ ++ (((addr) & PSMX2_ADDR_CTXT_MASK) >> (64-(ctxt_bits))) + + /* Bits 60 .. 63 of the flag are provider specific */ + #define PSMX2_NO_COMPLETION (1ULL << 60) +@@ -332,6 +318,15 @@ union psmx2_pi { + #define PSMX2_CTXT_USER(fi_context) ((fi_context)->internal[2]) + #define PSMX2_CTXT_EP(fi_context) ((fi_context)->internal[3]) + ++/* ++ * Use per-protocol versioning to avoid unnecessary version checking. Only perform ++ * version checking when the current version is greater than zero. ++ */ ++#define PSMX2_AM_RMA_VERSION 0 ++#define PSMX2_AM_ATOMIC_VERSION 0 ++#define PSMX2_AM_SEP_VERSION 1 ++#define PSMX2_AM_TRX_CTXT_VERSION 0 ++ + #define PSMX2_AM_RMA_HANDLER 0 + #define PSMX2_AM_ATOMIC_HANDLER 1 + #define PSMX2_AM_SEP_HANDLER 2 +@@ -339,14 +334,18 @@ union psmx2_pi { + + #define PSMX2_AM_OP_MASK 0x000000FF + #define PSMX2_AM_FLAG_MASK 0xFF000000 ++#define PSMX2_AM_VER_MASK 0x00FF0000 ++#define PSMX2_AM_VER_SHIFT 16 + #define PSMX2_AM_EOM 0x40000000 + #define PSMX2_AM_DATA 0x20000000 + #define PSMX2_AM_FORCE_ACK 0x10000000 + +-#define PSMX2_AM_SET_OP(u32w0,op) do {u32w0 &= ~PSMX2_AM_OP_MASK; u32w0 |= op;} while (0) +-#define PSMX2_AM_SET_FLAG(u32w0,flag) do {u32w0 &= ~PSMX2_AM_FLAG_MASK; u32w0 |= flag;} while (0) +-#define PSMX2_AM_GET_OP(u32w0) (u32w0 & PSMX2_AM_OP_MASK) +-#define PSMX2_AM_GET_FLAG(u32w0) (u32w0 & PSMX2_AM_FLAG_MASK) ++#define PSMX2_AM_SET_OP(u32w0,op) do {(u32w0) &= ~PSMX2_AM_OP_MASK; (u32w0) |= (op);} while (0) ++#define PSMX2_AM_SET_FLAG(u32w0,flag) do {(u32w0) &= ~PSMX2_AM_FLAG_MASK; (u32w0) |= (flag);} while (0) ++#define PSMX2_AM_SET_VER(u32w0,ver) do {(u32w0) &= ~PSMX2_AM_VER_MASK; (u32w0) |= (ver << PSMX2_AM_VER_SHIFT);} while (0) ++#define PSMX2_AM_GET_OP(u32w0) ((u32w0) & PSMX2_AM_OP_MASK) ++#define PSMX2_AM_GET_FLAG(u32w0) ((u32w0) & PSMX2_AM_FLAG_MASK) ++#define PSMX2_AM_GET_VER(u32w0) (((u32w0) & PSMX2_AM_VER_MASK) >> PSMX2_AM_VER_SHIFT) + + enum { + PSMX2_AM_REQ_WRITE = 1, +@@ -405,17 +404,17 @@ struct psmx2_am_request { + int datatype; + } atomic; + }; +- uint64_t cq_flags; +- struct fi_context fi_context; +- struct psmx2_fid_ep *ep; +- int no_event; +- int error; +- struct slist_entry list_entry; ++ uint64_t cq_flags; ++ struct fi_context fi_context; ++ struct psmx2_fid_ep *ep; ++ int no_event; ++ int error; ++ struct slist_entry list_entry; + union { +- struct iovec *iov; /* for readv */ +- struct fi_ioc *ioc; /* for atomic read */ ++ struct iovec *iov; /* for readv */ ++ struct fi_ioc *ioc; /* for atomic read */ + }; +- void *tmpbuf; ++ void *tmpbuf; + }; + + #define PSMX2_IOV_PROTO_PACK 0 +@@ -425,40 +424,40 @@ struct psmx2_am_request { + #define PSMX2_IOV_MAX_COUNT (PSMX2_IOV_BUF_SIZE / sizeof(uint32_t) - 3) + + struct psmx2_iov_info { +- uint32_t seq_num; +- uint32_t total_len; +- uint32_t count; +- uint32_t len[PSMX2_IOV_MAX_COUNT]; ++ uint32_t seq_num; ++ uint32_t total_len; ++ uint32_t count; ++ uint32_t len[PSMX2_IOV_MAX_COUNT]; + }; + + struct psmx2_sendv_request { +- struct fi_context fi_context; +- struct fi_context fi_context_iov; +- PSMX2_STATUS_DECL(status); +- void *user_context; +- int iov_protocol; +- int no_completion; +- int comp_flag; +- uint32_t iov_done; ++ struct fi_context fi_context; ++ struct fi_context fi_context_iov; ++ void *user_context; ++ int iov_protocol; ++ int no_completion; ++ int comp_flag; ++ uint32_t iov_done; ++ psm2_mq_tag_t tag; + union { +- struct psmx2_iov_info iov_info; +- char buf[PSMX2_IOV_BUF_SIZE]; ++ struct psmx2_iov_info iov_info; ++ char buf[PSMX2_IOV_BUF_SIZE]; + }; + }; + + struct psmx2_sendv_reply { +- struct fi_context fi_context; +- int no_completion; +- int multi_recv; +- psm2_mq_tag_t tag; +- uint8_t *buf; +- void *user_context; +- size_t iov_done; +- size_t bytes_received; +- size_t msg_length; +- int error_code; +- int comp_flag; +- struct psmx2_iov_info iov_info; ++ struct fi_context fi_context; ++ int no_completion; ++ int multi_recv; ++ psm2_mq_tag_t tag; ++ uint8_t *buf; ++ void *user_context; ++ size_t iov_done; ++ size_t bytes_received; ++ size_t msg_length; ++ int error_code; ++ int comp_flag; ++ struct psmx2_iov_info iov_info; + }; + + struct psmx2_req_queue { +@@ -506,8 +505,10 @@ struct psmx2_trx_ctxt { + struct psmx2_fid_domain *domain; + struct psmx2_fid_ep *ep; + ++#if !HAVE_PSM2_MQ_FP_MSG + /* incoming req queue for AM based RMA request. */ + struct psmx2_req_queue rma_queue; ++#endif + + /* triggered operations that are ready to be processed */ + struct psmx2_req_queue trigger_queue; +@@ -525,9 +526,19 @@ struct psmx2_trx_ctxt { + struct dlist_entry peer_list; + fastlock_t peer_lock; + ++ /* number of pathes this tx/rx context can be polled. this include ++ * CQs and counters, as well as domain->trx_ctxt_list. ++ */ ++ ofi_atomic32_t poll_refcnt; ++ int poll_active; ++ + struct dlist_entry entry; + }; + ++typedef void (*psmx2_lock_fn_t) (fastlock_t *lock, int lock_level); ++typedef int (*psmx2_trylock_fn_t) (fastlock_t *lock, int lock_level); ++typedef void (*psmx2_unlock_fn_t) (fastlock_t *lock, int lock_level); ++ + struct psmx2_fid_domain { + struct util_domain util_domain; + struct psmx2_fid_fabric *fabric; +@@ -554,6 +565,32 @@ struct psmx2_fid_domain { + uint32_t max_atomic_size; + + struct dlist_entry entry; ++ ++ /* Lock/Unlock function pointers set based on FI_THREAD model */ ++ psmx2_lock_fn_t av_lock_fn; ++ psmx2_unlock_fn_t av_unlock_fn; ++ psmx2_lock_fn_t am_req_pool_lock_fn; ++ psmx2_unlock_fn_t am_req_pool_unlock_fn; ++ psmx2_lock_fn_t trx_ctxt_lock_fn; ++ psmx2_unlock_fn_t trx_ctxt_unlock_fn; ++ psmx2_lock_fn_t rma_queue_lock_fn; ++ psmx2_unlock_fn_t rma_queue_unlock_fn; ++ psmx2_lock_fn_t trigger_queue_lock_fn; ++ psmx2_unlock_fn_t trigger_queue_unlock_fn; ++ psmx2_lock_fn_t peer_lock_fn; ++ psmx2_unlock_fn_t peer_unlock_fn; ++ psmx2_lock_fn_t sep_lock_fn; ++ psmx2_unlock_fn_t sep_unlock_fn; ++ psmx2_lock_fn_t trigger_lock_fn; ++ psmx2_unlock_fn_t trigger_unlock_fn; ++ psmx2_lock_fn_t cq_lock_fn; ++ psmx2_unlock_fn_t cq_unlock_fn; ++ psmx2_lock_fn_t mr_lock_fn; ++ psmx2_unlock_fn_t mr_unlock_fn; ++ psmx2_lock_fn_t context_lock_fn; ++ psmx2_unlock_fn_t context_unlock_fn; ++ psmx2_trylock_fn_t poll_trylock_fn; ++ psmx2_unlock_fn_t poll_unlock_fn; + }; + + #define PSMX2_EP_REGULAR 0 +@@ -579,6 +616,13 @@ struct psmx2_ep_name { + + #define PSMX2_MAX_STRING_NAME_LEN 64 /* "fi_addr_psmx2://:" */ + ++struct psmx2_status_data { ++ struct psmx2_fid_cq *poll_cq; ++ struct psmx2_trx_ctxt *trx_ctxt; ++ fi_addr_t *src_addr; ++ void *event_buffer; ++}; ++ + struct psmx2_cq_event { + union { + struct fi_cq_entry context; +@@ -587,11 +631,11 @@ struct psmx2_cq_event { + struct fi_cq_tagged_entry tagged; + struct fi_cq_err_entry err; + } cqe; +- int error; +- int source_is_valid; +- fi_addr_t source; +- struct psmx2_fid_av *source_av; +- struct slist_entry list_entry; ++ int error; ++ int source_is_valid; ++ psm2_epaddr_t source; ++ struct psmx2_fid_av *source_av; ++ struct slist_entry list_entry; + }; + + #define PSMX2_ERR_DATA_SIZE 64 /* large enough to hold a string address */ +@@ -640,14 +684,30 @@ struct psmx2_fid_cntr { + fastlock_t trigger_lock; + }; + +-struct psmx2_av_peer { ++#define PSMX2_AV_DEFAULT_SIZE 64 ++ ++#define PSMX2_AV_TABLE_SIZE(count, shared) \ ++ (sizeof(struct psmx2_av_hdr) + \ ++ ((shared) ? (count) * sizeof(fi_addr_t) : 0) + \ ++ (count) * sizeof(struct psmx2_av_addr)) ++ ++struct psmx2_av_hdr { ++ uint64_t size; ++ uint64_t last; ++}; ++ ++struct psmx2_av_addr { ++ psm2_epid_t epid; + uint8_t type; + uint8_t sep_id; +- int sep_ctxt_cnt; +- psm2_epid_t *sep_ctxt_epids; + }; + +-struct psmx2_av_table { ++struct psmx2_av_sep { ++ int ctxt_cnt; ++ psm2_epid_t *epids; ++}; ++ ++struct psmx2_av_conn { + struct psmx2_trx_ctxt *trx_ctxt; + psm2_epaddr_t *epaddrs; + psm2_epaddr_t **sepaddrs; +@@ -655,20 +715,24 @@ struct psmx2_av_table { + + struct psmx2_fid_av { + struct fid_av av; ++ int type; + struct psmx2_fid_domain *domain; + struct fid_eq *eq; +- int type; + int addr_format; + int rx_ctx_bits; + int max_trx_ctxt; ++ int shared; + uint64_t flags; + size_t addrlen; + size_t count; +- size_t last; + fastlock_t lock; +- psm2_epid_t *epids; /* one entry per peer */ +- struct psmx2_av_peer *peers; /* one entry per peer */ +- struct psmx2_av_table tables[];/* one entry per context */ ++ struct psmx2_trx_ctxt *av_map_trx_ctxt; ++ struct util_shm shm; ++ struct psmx2_av_hdr *hdr; /* shared AV header */ ++ fi_addr_t *map; /* shared AV address mapping */ ++ struct psmx2_av_addr *table; /* shared AV address table */ ++ struct psmx2_av_sep *sep_info; ++ struct psmx2_av_conn conn_info[]; + }; + + struct psmx2_fid_ep { +@@ -754,45 +818,46 @@ struct psmx2_epaddr_context { + }; + + struct psmx2_env { +- int name_server; +- int tagged_rma; +- char *uuid; +- int delay; +- int timeout; +- int prog_interval; +- char *prog_affinity; +- int multi_ep; +- int max_trx_ctxt; +- int free_trx_ctxt; +- int num_devunits; +- int inject_size; +- int lock_level; +- int lazy_conn; +- int disconnect; ++ int name_server; ++ int tagged_rma; ++ char *uuid; ++ int delay; ++ int timeout; ++ int conn_timeout; ++ int prog_interval; ++ char *prog_affinity; ++ int multi_ep; ++ int max_trx_ctxt; ++ int free_trx_ctxt; ++ int num_devunits; ++ int inject_size; ++ int lock_level; ++ int lazy_conn; ++ int disconnect; + #if (PSMX2_TAG_LAYOUT == PSMX2_TAG_LAYOUT_RUNTIME) +- char *tag_layout; ++ char *tag_layout; + #endif + }; + + extern struct fi_ops_mr psmx2_mr_ops; + extern struct fi_ops_cm psmx2_cm_ops; + extern struct fi_ops_tagged psmx2_tagged_ops; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_av_map_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_av_table_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_event_av_map_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_event_av_table_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_av_map_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_av_table_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_av_map_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_av_table_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_av_map_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_av_table_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_event_av_map_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_event_av_table_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_av_map_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_av_table_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_av_map_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_av_table_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_directed; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_event_directed; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_directed; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_directed; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_event_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_directed_av_map; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_event_directed_av_map; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_directed_av_map; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_directed_av_map; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_undirected_av_map; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_event_undirected_av_map; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_undirected_av_map; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_undirected_av_map; + extern struct fi_ops_msg psmx2_msg_ops; + extern struct fi_ops_msg psmx2_msg2_ops; + extern struct fi_ops_rma psmx2_rma_ops; +@@ -826,6 +891,33 @@ static inline void psmx2_unlock(fastlock_t *lock, int lock_level) + fastlock_release(lock); + } + ++/* Specialized lock functions used based on FI_THREAD model */ ++ ++static inline void psmx2_lock_disabled(fastlock_t *lock, int lock_level) ++{ ++ return; ++} ++ ++static inline int psmx2_trylock_disabled(fastlock_t *lock, int lock_level) ++{ ++ return 0; ++} ++ ++static inline void psmx2_lock_enabled(fastlock_t *lock, int lock_level) ++{ ++ fastlock_acquire(lock); ++} ++ ++static inline void psmx2_unlock_enabled(fastlock_t *lock, int lock_level) ++{ ++ fastlock_release(lock); ++} ++ ++static inline int psmx2_trylock_enabled(fastlock_t *lock, int lock_level) ++{ ++ return fastlock_tryacquire(lock); ++} ++ + int psmx2_init_prov_info(const struct fi_info *hints, struct fi_info **info); + void psmx2_update_prov_info(struct fi_info *info, + struct psmx2_ep_name *src_addr, +@@ -924,42 +1016,69 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, struct psmx2_trx_ctxt *trx_ctxt, + int psmx2_epid_to_epaddr(struct psmx2_trx_ctxt *trx_ctxt, + psm2_epid_t epid, psm2_epaddr_t *epaddr); + +-int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, struct psmx2_trx_ctxt *trx_ctxt, +- int connect_now); +- +-psm2_epaddr_t psmx2_av_translate_sep(struct psmx2_fid_av *av, +- struct psmx2_trx_ctxt *trx_ctxt, fi_addr_t addr); ++int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, struct psmx2_trx_ctxt *trx_ctxt); + + void psmx2_av_remove_conn(struct psmx2_fid_av *av, struct psmx2_trx_ctxt *trx_ctxt, + psm2_epaddr_t epaddr); + +-static inline int psmx2_av_check_table_idx(struct psmx2_fid_av *av, +- struct psmx2_trx_ctxt *trx_ctxt, +- size_t idx) +-{ +- int err = 0; +- +- psmx2_lock(&av->lock, 1); +- +- if (OFI_UNLIKELY(idx >= av->last)) { +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "error: av index %ld out of range(max: %ld).\n", idx, av->last); +- err = -FI_EINVAL; +- goto out; +- } ++int psmx2_av_query_sep(struct psmx2_fid_av *av, struct psmx2_trx_ctxt *trx_ctxt, ++ size_t idx); + +- if (!av->tables[trx_ctxt->id].epaddrs[idx]) { +- err = psmx2_epid_to_epaddr(trx_ctxt, av->epids[idx], +- &av->tables[trx_ctxt->id].epaddrs[idx]); +- if (err) +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "fatal error: unable to translate epid %lx to epaddr.\n", +- av->epids[idx]); ++static inline ++psm2_epaddr_t psmx2_av_translate_addr(struct psmx2_fid_av *av, ++ struct psmx2_trx_ctxt *trx_ctxt, ++ fi_addr_t addr, ++ int av_type) ++{ ++ psm2_epaddr_t epaddr; ++ size_t idx; ++ int ctxt; ++ int err; ++ ++ if (av_type == FI_AV_MAP) ++ return (psm2_epaddr_t) addr; ++ ++ av->domain->av_lock_fn(&av->lock, 1); ++ ++ idx = PSMX2_ADDR_IDX(addr); ++ assert(idx < av->hdr->last); ++ ++ if (OFI_UNLIKELY(av->table[idx].type == PSMX2_EP_SCALABLE)) { ++ if (OFI_UNLIKELY(!av->sep_info[idx].epids)) { ++ psmx2_av_query_sep(av, trx_ctxt, idx); ++ assert(av->sep_info[idx].epids); ++ } ++ ++ if (OFI_UNLIKELY(!av->conn_info[trx_ctxt->id].sepaddrs[idx])) { ++ av->conn_info[trx_ctxt->id].sepaddrs[idx] = ++ calloc(av->sep_info[idx].ctxt_cnt, sizeof(psm2_epaddr_t)); ++ assert(av->conn_info[trx_ctxt->id].sepaddrs[idx]); ++ } ++ ++ ctxt = PSMX2_ADDR_CTXT(addr, av->rx_ctx_bits); ++ assert(ctxt < av->sep_info[idx].ctxt_cnt); ++ ++ if (OFI_UNLIKELY(!av->conn_info[trx_ctxt->id].sepaddrs[idx][ctxt])) { ++ err = psmx2_epid_to_epaddr(trx_ctxt, ++ av->sep_info[idx].epids[ctxt], ++ &av->conn_info[trx_ctxt->id].sepaddrs[idx][ctxt]); ++ assert(!err); ++ } ++ epaddr = av->conn_info[trx_ctxt->id].sepaddrs[idx][ctxt]; ++ } else { ++ if (OFI_UNLIKELY(!av->conn_info[trx_ctxt->id].epaddrs[idx])) { ++ err = psmx2_epid_to_epaddr(trx_ctxt, av->table[idx].epid, ++ &av->conn_info[trx_ctxt->id].epaddrs[idx]); ++ assert(!err); ++ } ++ epaddr = av->conn_info[trx_ctxt->id].epaddrs[idx]; + } + +-out: +- psmx2_unlock(&av->lock, 1); +- return err; ++#ifdef NDEBUG ++ (void) err; ++#endif ++ av->domain->av_unlock_fn(&av->lock, 1); ++ return epaddr; + } + + void psmx2_am_global_init(void); +@@ -992,9 +1111,9 @@ struct psmx2_am_request *psmx2_am_request_alloc(struct psmx2_trx_ctxt *trx_ctxt) + { + struct psmx2_am_request *req; + +- psmx2_lock(&trx_ctxt->am_req_pool_lock, 2); ++ trx_ctxt->domain->am_req_pool_lock_fn(&trx_ctxt->am_req_pool_lock, 0); + req = util_buf_alloc(trx_ctxt->am_req_pool); +- psmx2_unlock(&trx_ctxt->am_req_pool_lock, 2); ++ trx_ctxt->domain->am_req_pool_unlock_fn(&trx_ctxt->am_req_pool_lock, 0); + + if (req) + memset(req, 0, sizeof(*req)); +@@ -1005,9 +1124,9 @@ struct psmx2_am_request *psmx2_am_request_alloc(struct psmx2_trx_ctxt *trx_ctxt) + static inline void psmx2_am_request_free(struct psmx2_trx_ctxt *trx_ctxt, + struct psmx2_am_request *req) + { +- psmx2_lock(&trx_ctxt->am_req_pool_lock, 2); ++ trx_ctxt->domain->am_req_pool_lock_fn(&trx_ctxt->am_req_pool_lock, 0); + util_buf_release(trx_ctxt->am_req_pool, req); +- psmx2_unlock(&trx_ctxt->am_req_pool_lock, 2); ++ trx_ctxt->domain->am_req_pool_unlock_fn(&trx_ctxt->am_req_pool_lock, 0); + } + + struct psmx2_fid_mr *psmx2_mr_get(struct psmx2_fid_domain *domain, uint64_t key); +@@ -1031,24 +1150,21 @@ static inline void psmx2_cntr_inc(struct psmx2_fid_cntr *cntr, int error) + cntr->wait->signal(cntr->wait); + } + +-fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, fi_addr_t source); ++fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, psm2_epaddr_t source); + +-static inline void psmx2_get_source_name(fi_addr_t source, struct psmx2_ep_name *name) ++static inline void psmx2_get_source_name(psm2_epaddr_t source, struct psmx2_ep_name *name) + { +- psm2_epaddr_t epaddr = PSMX2_ADDR_TO_EP(source); +- + memset(name, 0, sizeof(*name)); +- psm2_epaddr_to_epid(epaddr, &name->epid); ++ psm2_epaddr_to_epid(source, &name->epid); + name->type = PSMX2_EP_REGULAR; + } + +-static inline void psmx2_get_source_string_name(fi_addr_t source, char *name, size_t *len) ++static inline void psmx2_get_source_string_name(psm2_epaddr_t source, char *name, size_t *len) + { + struct psmx2_ep_name ep_name; +- psm2_epaddr_t epaddr = PSMX2_ADDR_TO_EP(source); + + memset(&ep_name, 0, sizeof(ep_name)); +- psm2_epaddr_to_epid(epaddr, &ep_name.epid); ++ psm2_epaddr_to_epid(source, &ep_name.epid); + ep_name.type = PSMX2_EP_REGULAR; + + ofi_straddr(name, len, FI_ADDR_PSMX2, &ep_name); +@@ -1056,8 +1172,12 @@ static inline void psmx2_get_source_string_name(fi_addr_t source, char *name, si + + static inline void psmx2_progress(struct psmx2_trx_ctxt *trx_ctxt) + { +- if (trx_ctxt) { ++ if (trx_ctxt && trx_ctxt->poll_active) { ++#if HAVE_PSM2_MQ_REQ_USER ++ psmx2_cq_poll_mq(NULL, trx_ctxt, NULL, 1, NULL); ++#else + psmx2_cq_poll_mq(NULL, trx_ctxt, NULL, 0, NULL); ++#endif + if (trx_ctxt->am_progress) + psmx2_am_progress(trx_ctxt); + } +@@ -1068,12 +1188,12 @@ static inline void psmx2_progress_all(struct psmx2_fid_domain *domain) + struct dlist_entry *item; + struct psmx2_trx_ctxt *trx_ctxt; + +- psmx2_lock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_lock_fn(&domain->trx_ctxt_lock, 1); + dlist_foreach(&domain->trx_ctxt_list, item) { + trx_ctxt = container_of(item, struct psmx2_trx_ctxt, entry); + psmx2_progress(trx_ctxt); + } +- psmx2_unlock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_unlock_fn(&domain->trx_ctxt_lock, 1); + } + + /* +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_am.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_am.c +index 5e4e28d..e1180e4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_am.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_am.c +@@ -71,30 +71,32 @@ int psmx2_am_handler_count = 0; + int psmx2_am_progress(struct psmx2_trx_ctxt *trx_ctxt) + { + struct slist_entry *item; +- struct psmx2_am_request *req; + struct psmx2_trigger *trigger; + ++#if !HAVE_PSM2_MQ_FP_MSG ++ struct psmx2_am_request *req; + if (psmx2_env.tagged_rma) { +- psmx2_lock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_lock_fn(&trx_ctxt->rma_queue.lock, 2); + while (!slist_empty(&trx_ctxt->rma_queue.list)) { + item = slist_remove_head(&trx_ctxt->rma_queue.list); + req = container_of(item, struct psmx2_am_request, list_entry); +- psmx2_unlock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_unlock_fn(&trx_ctxt->rma_queue.lock, 2); + psmx2_am_process_rma(trx_ctxt, req); +- psmx2_lock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_lock_fn(&trx_ctxt->rma_queue.lock, 2); + } +- psmx2_unlock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_unlock_fn(&trx_ctxt->rma_queue.lock, 2); + } ++#endif + +- psmx2_lock(&trx_ctxt->trigger_queue.lock, 2); ++ trx_ctxt->domain->trigger_queue_lock_fn(&trx_ctxt->trigger_queue.lock, 2); + while (!slist_empty(&trx_ctxt->trigger_queue.list)) { + item = slist_remove_head(&trx_ctxt->trigger_queue.list); + trigger = container_of(item, struct psmx2_trigger, list_entry); +- psmx2_unlock(&trx_ctxt->trigger_queue.lock, 2); ++ trx_ctxt->domain->trigger_queue_unlock_fn(&trx_ctxt->trigger_queue.lock, 2); + psmx2_process_trigger(trx_ctxt, trigger); +- psmx2_lock(&trx_ctxt->trigger_queue.lock, 2); ++ trx_ctxt->domain->trigger_queue_lock_fn(&trx_ctxt->trigger_queue.lock, 2); + } +- psmx2_unlock(&trx_ctxt->trigger_queue.lock, 2); ++ trx_ctxt->domain->trigger_queue_unlock_fn(&trx_ctxt->trigger_queue.lock, 2); + + return 0; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_atomic.c +index d0ea0cb..108735f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_atomic.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_atomic.c +@@ -802,14 +802,12 @@ ssize_t psmx2_atomic_write_generic(struct fid_ep *ep, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size, len; +- size_t idx; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -824,21 +822,12 @@ ssize_t psmx2_atomic_write_generic(struct fid_ep *ep, + assert((int)op >= 0 && (int)op < FI_ATOMIC_OP_LAST); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); ++ ++ if (psm2_epid == ep_priv->tx->psm2_epid) + return psmx2_atomic_self(PSMX2_AM_REQ_ATOMIC_WRITE, ep_priv, + buf, count, desc, NULL, NULL, NULL, + NULL, addr, key, datatype, op, +@@ -902,13 +891,12 @@ ssize_t psmx2_atomic_writev_generic(struct fid_ep *ep, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size; +- size_t idx; + size_t len; + uint8_t *buf; + int err; +@@ -930,23 +918,14 @@ ssize_t psmx2_atomic_writev_generic(struct fid_ep *ep, + count--; + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); + + len = psmx2_ioc_size(iov, count, datatype); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) { ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); ++ ++ if (psm2_epid == ep_priv->tx->psm2_epid) { + buf = malloc(len); + if (!buf) + return -FI_ENOMEM; +@@ -1010,7 +989,8 @@ ssize_t psmx2_atomic_writev_generic(struct fid_ep *ep, + return 0; + } + +-static ssize_t psmx2_atomic_write(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_write(struct fid_ep *ep, + const void *buf, + size_t count, void *desc, + fi_addr_t dest_addr, +@@ -1026,7 +1006,8 @@ static ssize_t psmx2_atomic_write(struct fid_ep *ep, + ep_priv->tx_flags); + } + +-static ssize_t psmx2_atomic_writemsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_writemsg(struct fid_ep *ep, + const struct fi_msg_atomic *msg, + uint64_t flags) + { +@@ -1052,7 +1033,8 @@ static ssize_t psmx2_atomic_writemsg(struct fid_ep *ep, + msg->op, msg->context, flags); + } + +-static ssize_t psmx2_atomic_writev(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_writev(struct fid_ep *ep, + const struct fi_ioc *iov, + void **desc, size_t count, + fi_addr_t dest_addr, +@@ -1079,7 +1061,8 @@ static ssize_t psmx2_atomic_writev(struct fid_ep *ep, + ep_priv->tx_flags); + } + +-static ssize_t psmx2_atomic_inject(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_inject(struct fid_ep *ep, + const void *buf, + size_t count, /*void *desc,*/ + fi_addr_t dest_addr, +@@ -1108,14 +1091,12 @@ ssize_t psmx2_atomic_readwrite_generic(struct fid_ep *ep, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size, len; +- size_t idx; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -1132,21 +1113,12 @@ ssize_t psmx2_atomic_readwrite_generic(struct fid_ep *ep, + assert((int)op >= 0 && (int)op < FI_ATOMIC_OP_LAST); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) ++ if (psm2_epid == ep_priv->tx->psm2_epid) + return psmx2_atomic_self(PSMX2_AM_REQ_ATOMIC_READWRITE, ep_priv, + buf, count, desc, NULL, NULL, result, + result_desc, addr, key, datatype, op, +@@ -1217,13 +1189,12 @@ ssize_t psmx2_atomic_readwritev_generic(struct fid_ep *ep, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size; +- size_t idx; + size_t len, result_len, iov_size; + uint8_t *buf, *result; + void *desc0, *result_desc0; +@@ -1269,21 +1240,12 @@ ssize_t psmx2_atomic_readwritev_generic(struct fid_ep *ep, + assert(result_len >= len); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) { ++ if (psm2_epid == ep_priv->tx->psm2_epid) { + if (buf && count > 1) { + buf = malloc(len); + psmx2_ioc_read(iov, count, datatype, buf, len); +@@ -1386,7 +1348,8 @@ ssize_t psmx2_atomic_readwritev_generic(struct fid_ep *ep, + return 0; + } + +-static ssize_t psmx2_atomic_readwrite(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_readwrite(struct fid_ep *ep, + const void *buf, + size_t count, void *desc, + void *result, void *result_desc, +@@ -1404,7 +1367,8 @@ static ssize_t psmx2_atomic_readwrite(struct fid_ep *ep, + context, ep_priv->tx_flags); + } + +-static ssize_t psmx2_atomic_readwritemsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_readwritemsg(struct fid_ep *ep, + const struct fi_msg_atomic *msg, + struct fi_ioc *resultv, + void **result_desc, +@@ -1450,7 +1414,8 @@ static ssize_t psmx2_atomic_readwritemsg(struct fid_ep *ep, + msg->op, msg->context, flags); + } + +-static ssize_t psmx2_atomic_readwritev(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_readwritev(struct fid_ep *ep, + const struct fi_ioc *iov, + void **desc, size_t count, + struct fi_ioc *resultv, +@@ -1505,14 +1470,12 @@ ssize_t psmx2_atomic_compwrite_generic(struct fid_ep *ep, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size, len; +- size_t idx; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -1530,21 +1493,12 @@ ssize_t psmx2_atomic_compwrite_generic(struct fid_ep *ep, + assert((int)op >= 0 && (int)op < FI_ATOMIC_OP_LAST); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) ++ if (psm2_epid == ep_priv->tx->psm2_epid) + return psmx2_atomic_self(PSMX2_AM_REQ_ATOMIC_COMPWRITE, ep_priv, + buf, count, desc, compare, + compare_desc, result, result_desc, +@@ -1619,14 +1573,13 @@ ssize_t psmx2_atomic_compwritev_generic(struct fid_ep *ep, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size; +- size_t idx; +- size_t len, compare_len, result_len, iov_size; ++ size_t len, iov_size; + uint8_t *buf, *compare, *result; + void *desc0, *compare_desc0, *result_desc0; + int err; +@@ -1664,28 +1617,17 @@ ssize_t psmx2_atomic_compwritev_generic(struct fid_ep *ep, + result_count--; + + len = psmx2_ioc_size(iov, count, datatype); +- compare_len = psmx2_ioc_size(comparev, compare_count, datatype); +- result_len = psmx2_ioc_size(resultv, result_count, datatype); + +- assert(compare_len >= len); +- assert(result_len >= len); ++ assert(psmx2_ioc_size(comparev, compare_count, datatype) >= len); ++ assert(psmx2_ioc_size(resultv, result_count, datatype) >= len); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) { ++ if (psm2_epid == ep_priv->tx->psm2_epid) { + if (count > 1) { + buf = malloc(len); + if (!buf) +@@ -1810,7 +1752,8 @@ ssize_t psmx2_atomic_compwritev_generic(struct fid_ep *ep, + return 0; + } + +-static ssize_t psmx2_atomic_compwrite(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_compwrite(struct fid_ep *ep, + const void *buf, + size_t count, void *desc, + const void *compare, void *compare_desc, +@@ -1830,7 +1773,8 @@ static ssize_t psmx2_atomic_compwrite(struct fid_ep *ep, + datatype, op, context, ep_priv->tx_flags); + } + +-static ssize_t psmx2_atomic_compwritemsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_compwritemsg(struct fid_ep *ep, + const struct fi_msg_atomic *msg, + const struct fi_ioc *comparev, + void **compare_desc, +@@ -1871,7 +1815,8 @@ static ssize_t psmx2_atomic_compwritemsg(struct fid_ep *ep, + msg->op, msg->context, flags); + } + +-static ssize_t psmx2_atomic_compwritev(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_compwritev(struct fid_ep *ep, + const struct fi_ioc *iov, + void **desc, size_t count, + const struct fi_ioc *comparev, +@@ -2021,7 +1966,8 @@ static int psmx2_atomic_compwritevalid_internal(size_t chunk_size, + return 0; + } + +-static int psmx2_atomic_writevalid(struct fid_ep *ep, ++DIRECT_FN ++STATIC int psmx2_atomic_writevalid(struct fid_ep *ep, + enum fi_datatype datatype, + enum fi_op op, size_t *count) + { +@@ -2033,7 +1979,8 @@ static int psmx2_atomic_writevalid(struct fid_ep *ep, + return psmx2_atomic_writevalid_internal(chunk_size, datatype, op, count); + } + +-static int psmx2_atomic_readwritevalid(struct fid_ep *ep, ++DIRECT_FN ++STATIC int psmx2_atomic_readwritevalid(struct fid_ep *ep, + enum fi_datatype datatype, + enum fi_op op, size_t *count) + { +@@ -2045,7 +1992,8 @@ static int psmx2_atomic_readwritevalid(struct fid_ep *ep, + return psmx2_atomic_readwritevalid_internal(chunk_size, datatype, op, count); + } + +-static int psmx2_atomic_compwritevalid(struct fid_ep *ep, ++DIRECT_FN ++STATIC int psmx2_atomic_compwritevalid(struct fid_ep *ep, + enum fi_datatype datatype, + enum fi_op op, size_t *count) + { +@@ -2057,6 +2005,7 @@ static int psmx2_atomic_compwritevalid(struct fid_ep *ep, + return psmx2_atomic_compwritevalid_internal(chunk_size, datatype, op, count); + } + ++DIRECT_FN + int psmx2_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, + enum fi_op op, struct fi_atomic_attr *attr, uint64_t flags) + { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_av.c +index 4999bba..bb4fd61 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_av.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2019 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -35,29 +35,21 @@ + /* + * SEP address query protocol: + * +- * SEQ Query REQ: +- * args[0].u32w0 cmd ++ * SEP Query REQ: ++ * args[0].u32w0 cmd, version + * args[0].u32w1 id +- * args[1].u64 req +- * args[2].u64 av_idx ++ * args[1].u64 sep_info ++ * args[2].u64 status + * + * SEP Query REP: +- * args[0].u32w0 cmd ++ * args[0].u32w0 cmd, version + * args[0].u32w1 error +- * args[1].u64 req +- * args[2].u64 av_idx ++ * args[1].u64 sep_info ++ * args[2].u64 status + * args[3].u64 n +- * data epaddrs ++ * data epids + */ + +-struct psmx2_sep_query { +- struct psmx2_fid_av *av; +- void *context; +- psm2_error_t *errors; +- ofi_atomic32_t error_count; +- ofi_atomic32_t pending; +-}; +- + static int psmx2_am_sep_match(struct dlist_entry *entry, const void *arg) + { + struct psmx2_fid_sep *sep; +@@ -75,15 +67,15 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + int nargs, void *src, uint32_t len, void *hctx) + { + struct psmx2_fid_domain *domain; +- psm2_amarg_t rep_args[8]; ++ psm2_amarg_t rep_args[4]; + int op_error = 0; + int err = 0; +- int cmd; ++ int cmd, version; + int n, i, j; + uint8_t sep_id; + struct psmx2_fid_sep *sep; +- struct psmx2_sep_query *req; +- struct psmx2_fid_av *av; ++ struct psmx2_av_sep *sep_info; ++ ofi_atomic32_t *status; + psm2_epid_t *epids; + psm2_epid_t *buf = NULL; + int buflen; +@@ -91,12 +83,20 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + struct psmx2_trx_ctxt *trx_ctxt = hctx; + + cmd = PSMX2_AM_GET_OP(args[0].u32w0); ++ version = PSMX2_AM_GET_VER(args[0].u32w0); ++ if (version != PSMX2_AM_SEP_VERSION) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "AM SEP protocol version mismatch: request %d handler %d\n", ++ version, PSMX2_AM_SEP_VERSION); ++ return -FI_EINVAL; ++ } ++ + domain = trx_ctxt->domain; + + switch (cmd) { + case PSMX2_AM_REQ_SEP_QUERY: + sep_id = args[0].u32w1; +- psmx2_lock(&domain->sep_lock, 1); ++ domain->sep_lock_fn(&domain->sep_lock, 1); + entry = dlist_find_first_match(&domain->sep_list, psmx2_am_sep_match, + (void *)(uintptr_t)sep_id); + if (!entry) { +@@ -110,7 +110,7 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + if (n) { + buf = malloc(buflen); + if (!buf) { +- op_error = -FI_ENOMEM; ++ op_error = PSM2_NO_MEMORY; + buflen = 0; + n = 0; + } +@@ -118,9 +118,10 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + buf[i] = sep->ctxts[i].trx_ctxt->psm2_epid; + } + } +- psmx2_unlock(&domain->sep_lock, 1); ++ domain->sep_unlock_fn(&domain->sep_lock, 1); + + rep_args[0].u32w0 = PSMX2_AM_REP_SEP_QUERY; ++ PSMX2_AM_SET_VER(rep_args[0].u32w0, PSMX2_AM_SEP_VERSION); + rep_args[0].u32w1 = op_error; + rep_args[1].u64 = args[1].u64; + rep_args[2].u64 = args[2].u64; +@@ -132,31 +133,28 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + + case PSMX2_AM_REP_SEP_QUERY: + op_error = args[0].u32w1; +- req = (void *)(uintptr_t)args[1].u64; +- av = req->av; +- i = args[2].u64; ++ sep_info = (struct psmx2_av_sep *)(uintptr_t)args[1].u64; ++ status = (void *)(uintptr_t)args[2].u64; + if (op_error) { +- ofi_atomic_inc32(&req->error_count); +- req->errors[i] = op_error; ++ ofi_atomic_set32(status, psmx2_errno(op_error)); + } else { + n = args[3].u64; + epids = malloc(n * sizeof(psm2_epid_t)); + if (!epids) { +- ofi_atomic_inc32(&req->error_count); +- req->errors[i] = PSM2_NO_MEMORY; ++ ofi_atomic_set32(status, -FI_ENOMEM); + } else { + for (j=0; jpeers[i].sep_ctxt_cnt = n; +- av->peers[i].sep_ctxt_epids = epids; ++ sep_info->ctxt_cnt = n; ++ sep_info->epids = epids; ++ ofi_atomic_set32(status, 0); + } + } +- ofi_atomic_dec32(&req->pending); + break; + + default: +@@ -167,20 +165,6 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + return err; + } + +-#define PSMX2_MIN_CONN_TIMEOUT 5 +-#define PSMX2_MAX_CONN_TIMEOUT 30 +- +-static inline double psmx2_conn_timeout(int sec) +-{ +- if (sec < PSMX2_MIN_CONN_TIMEOUT) +- return PSMX2_MIN_CONN_TIMEOUT * 1e9; +- +- if (sec > PSMX2_MAX_CONN_TIMEOUT) +- return PSMX2_MAX_CONN_TIMEOUT * 1e9; +- +- return sec * 1e9; +-} +- + static void psmx2_set_epaddr_context(struct psmx2_trx_ctxt *trx_ctxt, + psm2_epid_t epid, psm2_epaddr_t epaddr) + { +@@ -210,9 +194,9 @@ static void psmx2_set_epaddr_context(struct psmx2_trx_ctxt *trx_ctxt, + context->epaddr = epaddr; + psm2_epaddr_setctxt(epaddr, context); + +- psmx2_lock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_lock_fn(&trx_ctxt->peer_lock, 2); + dlist_insert_before(&context->entry, &trx_ctxt->peer_list); +- psmx2_unlock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_unlock_fn(&trx_ctxt->peer_lock, 2); + } + + int psmx2_epid_to_epaddr(struct psmx2_trx_ctxt *trx_ctxt, +@@ -232,18 +216,17 @@ int psmx2_epid_to_epaddr(struct psmx2_trx_ctxt *trx_ctxt, + } + } + +- err = psm2_ep_connect(trx_ctxt->psm2_ep, 1, &epid, NULL, &errors, +- epaddr, psmx2_conn_timeout(1)); +- if (err != PSM2_OK) { +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "psm2_ep_connect retured error %s, remote epid=%lx.\n", +- psm2_error_get_string(err), epid); +- return psmx2_errno(err); ++ err = psm2_ep_connect(trx_ctxt->psm2_ep, 1, &epid, NULL, &errors, epaddr, ++ (int64_t) psmx2_env.conn_timeout * 1000000000LL); ++ if (err == PSM2_OK || err == PSM2_EPID_ALREADY_CONNECTED) { ++ psmx2_set_epaddr_context(trx_ctxt, epid, *epaddr); ++ return 0; + } + +- psmx2_set_epaddr_context(trx_ctxt,epid,*epaddr); +- +- return 0; ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "psm2_ep_connect retured error %s, remote epid=%lx.\n", ++ psm2_error_get_string(err), epid); ++ return psmx2_errno(err); + } + + /* +@@ -251,52 +234,67 @@ int psmx2_epid_to_epaddr(struct psmx2_trx_ctxt *trx_ctxt, + */ + static int psmx2_av_check_space(struct psmx2_fid_av *av, size_t count) + { +- psm2_epid_t *new_epids; + psm2_epaddr_t *new_epaddrs; + psm2_epaddr_t **new_sepaddrs; +- struct psmx2_av_peer *new_peers; ++ struct psmx2_av_hdr *new_hdr; ++ struct psmx2_av_sep *new_sep_info; + size_t new_count; ++ size_t old_table_size, new_table_size; + int i; + + new_count = av->count; +- while (new_count < av->last + count) +- new_count = new_count * 2 + 1; ++ while (new_count < av->hdr->last + count) ++ new_count = new_count * 2; + +- if ((new_count <= av->count) && av->epids) ++ if ((new_count <= av->count) && av->table) + return 0; + +- new_epids = realloc(av->epids, new_count * sizeof(*new_epids)); +- if (!new_epids) +- return -FI_ENOMEM; +- av->epids = new_epids; ++ old_table_size = PSMX2_AV_TABLE_SIZE(av->count, av->shared); ++ new_table_size = PSMX2_AV_TABLE_SIZE(new_count, av->shared); ++ if (av->shared) { ++ new_hdr = mremap(av->hdr, old_table_size, new_table_size, 0); ++ if (new_hdr == MAP_FAILED) ++ return -FI_ENOMEM; ++ av->hdr = new_hdr; ++ av->map = (fi_addr_t *)(av->hdr + 1); ++ av->table = (struct psmx2_av_addr *)(av->map + new_count); ++ for (i = 0; i < new_count; i++) ++ av->map[i] = i; ++ } else { ++ new_hdr = realloc(av->hdr, new_table_size); ++ if (!new_hdr) ++ return -FI_ENOMEM; ++ av->hdr = new_hdr; ++ av->table = (struct psmx2_av_addr *)(av->hdr + 1); ++ } + +- new_peers = realloc(av->peers, new_count * sizeof(*new_peers)); +- if (!new_peers) ++ new_sep_info = realloc(av->sep_info, new_count * sizeof(*new_sep_info)); ++ if (!new_sep_info) + return -FI_ENOMEM; +- av->peers = new_peers; ++ av->sep_info = new_sep_info; + + for (i = 0; i < av->max_trx_ctxt; i++) { +- if (!av->tables[i].trx_ctxt) ++ if (!av->conn_info[i].trx_ctxt) + continue; + +- new_epaddrs = realloc(av->tables[i].epaddrs, ++ new_epaddrs = realloc(av->conn_info[i].epaddrs, + new_count * sizeof(*new_epaddrs)); + if (!new_epaddrs) + return -FI_ENOMEM; +- memset(new_epaddrs + av->last, 0, +- (new_count - av->last) * sizeof(*new_epaddrs)); +- av->tables[i].epaddrs = new_epaddrs; ++ memset(new_epaddrs + av->hdr->last, 0, ++ (new_count - av->hdr->last) * sizeof(*new_epaddrs)); ++ av->conn_info[i].epaddrs = new_epaddrs; + +- new_sepaddrs = realloc(av->tables[i].sepaddrs, ++ new_sepaddrs = realloc(av->conn_info[i].sepaddrs, + new_count * sizeof(*new_sepaddrs)); + if (!new_sepaddrs) + return -FI_ENOMEM; +- memset(new_sepaddrs + av->last, 0, +- (new_count - av->last) * sizeof(*new_sepaddrs)); +- av->tables[i].sepaddrs = new_sepaddrs; ++ memset(new_sepaddrs + av->hdr->last, 0, ++ (new_count - av->hdr->last) * sizeof(*new_sepaddrs)); ++ av->conn_info[i].sepaddrs = new_sepaddrs; + } + +- av->count = new_count; ++ av->count = av->hdr->size = new_count; + return 0; + } + +@@ -326,196 +324,60 @@ static void psmx2_av_post_completion(struct psmx2_fid_av *av, void *context, + /* + * Must be called with av->lock held + */ +-static int psmx2_av_connect_trx_ctxt(struct psmx2_fid_av *av, +- int trx_ctxt_id, +- size_t av_idx_start, +- size_t count, +- psm2_error_t *errors) ++int psmx2_av_query_sep(struct psmx2_fid_av *av, ++ struct psmx2_trx_ctxt *trx_ctxt, ++ size_t idx) + { +- struct psmx2_trx_ctxt *trx_ctxt; +- struct psmx2_sep_query *req; +- struct psmx2_av_peer *peers; +- struct psmx2_epaddr_context *epaddr_context; +- psm2_epconn_t epconn; +- psm2_ep_t ep; +- psm2_epid_t *epids; +- psm2_epaddr_t *epaddrs; +- psm2_epaddr_t **sepaddrs; ++ ofi_atomic32_t status; /* 1: pending, 0: succ, <0: error */ + psm2_amarg_t args[3]; +- int *mask; +- int error_count = 0; +- int to_connect = 0; +- int sep_count = 0; +- int i; +- +- trx_ctxt = av->tables[trx_ctxt_id].trx_ctxt; +- ep = trx_ctxt->psm2_ep; +- epids = av->epids + av_idx_start; +- epaddrs = av->tables[trx_ctxt_id].epaddrs + av_idx_start; +- sepaddrs = av->tables[trx_ctxt_id].sepaddrs + av_idx_start; +- peers = av->peers + av_idx_start; +- +- /* set up mask to avoid duplicated connection */ +- +- mask = calloc(count, sizeof(*mask)); +- if (!mask) { +- for (i = 0; i < count; i++) +- errors[i] = PSM2_NO_MEMORY; +- error_count += count; +- return error_count; +- } +- +- for (i = 0; i < count; i++) { +- errors[i] = PSM2_OK; +- +- if (psm2_ep_epid_lookup2(ep, epids[i], &epconn) == PSM2_OK) { +- epaddr_context = psm2_epaddr_getctxt(epconn.addr); +- if (epaddr_context && epaddr_context->epid == epids[i]) +- epaddrs[i] = epconn.addr; +- else +- mask[i] = 1; +- } else { +- mask[i] = 1; +- } +- +- if (peers[i].type == PSMX2_EP_SCALABLE) +- sep_count++; +- +- if (mask[i]) { +- if (peers[i].type == PSMX2_EP_SCALABLE) { +- if (peers[i].sep_ctxt_epids) +- mask[i] = 0; +- else +- to_connect++; +- } else if (psmx2_env.lazy_conn) { +- epaddrs[i] = NULL; +- mask[i] = 0; +- } else { +- to_connect++; +- } +- } +- } +- +- if (to_connect) +- psm2_ep_connect(ep, count, epids, mask, errors, epaddrs, +- psmx2_conn_timeout(count)); +- +- /* check the connection results */ +- +- for (i = 0; i < count; i++) { +- if (!mask[i]) { +- errors[i] = PSM2_OK; +- continue; +- } +- +- if (errors[i] == PSM2_OK || +- errors[i] == PSM2_EPID_ALREADY_CONNECTED) { +- psmx2_set_epaddr_context(trx_ctxt, epids[i], epaddrs[i]); +- errors[i] = PSM2_OK; +- } else { +- /* If duplicated addrs are passed to psm2_ep_connect(), +- * all but one will fail with error "Endpoint could not +- * be reached". This should be treated the same as +- * "Endpoint already connected". +- */ +- if (psm2_ep_epid_lookup2(ep, epids[i], &epconn) == PSM2_OK) { +- epaddr_context = psm2_epaddr_getctxt(epconn.addr); +- if (epaddr_context && +- epaddr_context->epid == epids[i]) { +- epaddrs[i] = epconn.addr; +- errors[i] = PSM2_OK; +- continue; +- } +- } ++ int error; + +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "%d: psm2_ep_connect (%lx --> %lx): %s\n", +- i, trx_ctxt->psm2_epid, epids[i], +- psm2_error_get_string(errors[i])); +- epaddrs[i] = NULL; +- error_count++; +- } ++ if (!av->conn_info[trx_ctxt->id].epaddrs[idx]) { ++ psmx2_epid_to_epaddr(trx_ctxt, av->table[idx].epid, ++ &av->conn_info[trx_ctxt->id].epaddrs[idx]); ++ assert(av->conn_info[trx_ctxt->id].epaddrs[idx]); + } + +- free(mask); +- +- if (sep_count) { +- +- /* query SEP information */ +- +- psmx2_am_init(trx_ctxt); /* check AM handler installation */ +- +- req = malloc(sizeof *req); +- if (req) { +- req->av = av; +- req->errors = errors; +- ofi_atomic_initialize32(&req->error_count, 0); +- ofi_atomic_initialize32(&req->pending, 0); +- } +- +- for (i = 0; i < count; i++) { +- if (peers[i].type != PSMX2_EP_SCALABLE || +- peers[i].sep_ctxt_epids || +- errors[i] != PSM2_OK) +- continue; +- +- if (!req) { +- errors[i] = PSM2_NO_MEMORY; +- error_count++; +- continue; +- } ++ psmx2_am_init(trx_ctxt); /* check AM handler installation */ + +- ofi_atomic_inc32(&req->pending); +- args[0].u32w0 = PSMX2_AM_REQ_SEP_QUERY; +- args[0].u32w1 = peers[i].sep_id; +- args[1].u64 = (uint64_t)(uintptr_t)req; +- args[2].u64 = av_idx_start + i; +- psm2_am_request_short(epaddrs[i], PSMX2_AM_SEP_HANDLER, +- args, 3, NULL, 0, 0, NULL, NULL); +- } ++ ofi_atomic_initialize32(&status, 1); + +- /* +- * make it synchronous for now to: +- * (1) ensure the array "req->errors" is valid; +- * (2) simplify the logic of generating the final completion. +- */ +- +- if (req) { +- /* +- * make sure AM is progressed promptly. don't call +- * psmx2_progress() which may call functions that +- * need to access the address vector. +- */ +- while (ofi_atomic_get32(&req->pending)) +- psm2_poll(trx_ctxt->psm2_ep); +- +- error_count += ofi_atomic_get32(&req->error_count); +- free(req); +- } +- } ++ args[0].u32w0 = PSMX2_AM_REQ_SEP_QUERY; ++ PSMX2_AM_SET_VER(args[0].u32w0, PSMX2_AM_SEP_VERSION); ++ args[0].u32w1 = av->table[idx].sep_id; ++ args[1].u64 = (uint64_t)(uintptr_t)&av->sep_info[idx]; ++ args[2].u64 = (uint64_t)(uintptr_t)&status; ++ psm2_am_request_short(av->conn_info[trx_ctxt->id].epaddrs[idx], ++ PSMX2_AM_SEP_HANDLER, args, 3, NULL, ++ 0, 0, NULL, NULL); + +- /* alloate context specific epaddrs for SEP */ ++ /* ++ * make sure AM is progressed promptly. don't call ++ * psmx2_progress() which may call functions that ++ * need to access the address vector. ++ */ ++ while (ofi_atomic_get32(&status) == 1) ++ psm2_poll(trx_ctxt->psm2_ep); + +- for (i = 0; i < count; i++) { +- if (peers[i].type == PSMX2_EP_SCALABLE && +- peers[i].sep_ctxt_epids && !sepaddrs[i]) +- sepaddrs[i] = calloc(peers[i].sep_ctxt_cnt, +- sizeof(*sepaddrs[i])); +- } ++ error = (int)(int32_t)ofi_atomic_get32(&status); + +- return error_count; ++ return error; + } + + int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, +- struct psmx2_trx_ctxt *trx_ctxt, +- int connect_now) ++ struct psmx2_trx_ctxt *trx_ctxt) + { +- psm2_error_t *errors; +- int id = trx_ctxt->id; ++ int id; + int err = 0; + +- psmx2_lock(&av->lock, 1); ++ av->domain->av_lock_fn(&av->lock, 1); ++ ++ if (av->type == FI_AV_MAP) { ++ av->av_map_trx_ctxt = trx_ctxt; ++ goto out; ++ } + ++ id = trx_ctxt->id; + if (id >= av->max_trx_ctxt) { + FI_WARN(&psmx2_prov, FI_LOG_AV, + "trx_ctxt->id(%d) exceeds av->max_trx_ctxt(%d).\n", +@@ -524,8 +386,8 @@ int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, + goto out; + } + +- if (av->tables[id].trx_ctxt) { +- if (av->tables[id].trx_ctxt == trx_ctxt) { ++ if (av->conn_info[id].trx_ctxt) { ++ if (av->conn_info[id].trx_ctxt == trx_ctxt) { + FI_INFO(&psmx2_prov, FI_LOG_AV, + "trx_ctxt(%p) with id(%d) already added.\n", + trx_ctxt, id); +@@ -539,36 +401,29 @@ int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, + } + } + +- av->tables[id].epaddrs = (psm2_epaddr_t *) calloc(av->count, ++ av->conn_info[id].epaddrs = (psm2_epaddr_t *) calloc(av->count, + sizeof(psm2_epaddr_t)); +- if (!av->tables[id].epaddrs) { ++ if (!av->conn_info[id].epaddrs) { + err = -FI_ENOMEM; + goto out; + } + +- av->tables[id].sepaddrs = (psm2_epaddr_t **)calloc(av->count, ++ av->conn_info[id].sepaddrs = (psm2_epaddr_t **)calloc(av->count, + sizeof(psm2_epaddr_t *)); +- if (!av->tables[id].sepaddrs) { ++ if (!av->conn_info[id].sepaddrs) { + err = -FI_ENOMEM; + goto out; + } + +- av->tables[id].trx_ctxt = trx_ctxt; +- +- if (connect_now) { +- errors = calloc(av->count, sizeof(*errors)); +- if (errors) { +- psmx2_av_connect_trx_ctxt(av, id, 0, av->last, errors); +- free(errors); +- } +- } ++ av->conn_info[id].trx_ctxt = trx_ctxt; + + out: +- psmx2_unlock(&av->lock, 1); ++ av->domain->av_unlock_fn(&av->lock, 1); + return err; + } + +-static int psmx2_av_insert(struct fid_av *av, const void *addr, ++DIRECT_FN ++STATIC int psmx2_av_insert(struct fid_av *av, const void *addr, + size_t count, fi_addr_t *fi_addr, + uint64_t flags, void *context) + { +@@ -579,19 +434,23 @@ static int psmx2_av_insert(struct fid_av *av, const void *addr, + psm2_error_t *errors = NULL; + int error_count = 0; + int i, idx, ret; +- int sep_count = 0; + + assert(addr || !count); + + av_priv = container_of(av, struct psmx2_fid_av, av); + +- psmx2_lock(&av_priv->lock, 1); ++ av_priv->domain->av_lock_fn(&av_priv->lock, 1); + + if ((av_priv->flags & FI_EVENT) && !av_priv->eq) { + ret = -FI_ENOEQ; + goto out; + } + ++ if (av_priv->flags & FI_READ) { ++ ret = -FI_EINVAL; ++ goto out; ++ } ++ + if (psmx2_av_check_space(av_priv, count)) { + ret = -FI_ENOMEM; + goto out; +@@ -605,62 +464,37 @@ static int psmx2_av_insert(struct fid_av *av, const void *addr, + + /* save the peer address information */ + for (i = 0; i < count; i++) { +- idx = av_priv->last + i; ++ idx = av_priv->hdr->last + i; + if (av_priv->addr_format == FI_ADDR_STR) { + ep_name = psmx2_string_to_ep_name(string_names[i]); + if (!ep_name) { + ret = -FI_EINVAL; + goto out; + } +- av_priv->epids[idx] = ep_name->epid; +- av_priv->peers[idx].type = ep_name->type; +- av_priv->peers[idx].sep_id = ep_name->sep_id; ++ av_priv->table[idx].type = ep_name->type; ++ av_priv->table[idx].epid = ep_name->epid; ++ av_priv->table[idx].sep_id = ep_name->sep_id; + free(ep_name); + } else { +- av_priv->epids[idx] = names[i].epid; +- av_priv->peers[idx].type = names[i].type; +- av_priv->peers[idx].sep_id = names[i].sep_id; +- } +- av_priv->peers[idx].sep_ctxt_cnt = 1; +- av_priv->peers[idx].sep_ctxt_epids = NULL; +- if (av_priv->peers[idx].type == PSMX2_EP_SCALABLE) +- sep_count++; +- } +- +- /* +- * try to establish connection when: +- * (1) there are Tx/Rx context(s) bound to the AV; and +- * (2) the connection is desired right now +- */ +- if (sep_count || !psmx2_env.lazy_conn) { +- for (i = 0; i < av_priv->max_trx_ctxt; i++) { +- if (!av_priv->tables[i].trx_ctxt) +- continue; +- +- error_count = psmx2_av_connect_trx_ctxt(av_priv, i, +- av_priv->last, +- count, errors); +- +- if (error_count || psmx2_env.lazy_conn) +- break; ++ av_priv->table[idx].type = names[i].type; ++ av_priv->table[idx].epid = names[i].epid; ++ av_priv->table[idx].sep_id = names[i].sep_id; + } ++ av_priv->sep_info[idx].ctxt_cnt = 1; ++ av_priv->sep_info[idx].epids = NULL; + } + + if (fi_addr) { + for (i = 0; i < count; i++) { +- idx = av_priv->last + i; ++ idx = av_priv->hdr->last + i; + if (errors[i] != PSM2_OK) + fi_addr[i] = FI_ADDR_NOTAVAIL; +- else if (av_priv->peers[idx].type == PSMX2_EP_SCALABLE) +- fi_addr[i] = idx | PSMX2_SEP_ADDR_FLAG; +- else if (av_priv->type == FI_AV_TABLE) +- fi_addr[i] = idx; + else +- fi_addr[i] = PSMX2_EP_TO_ADDR(av_priv->tables[0].epaddrs[idx]); ++ fi_addr[i] = idx; + } + } + +- av_priv->last += count; ++ av_priv->hdr->last += count; + + if (av_priv->flags & FI_EVENT) { + if (error_count) { +@@ -680,23 +514,231 @@ static int psmx2_av_insert(struct fid_av *av, const void *addr, + + out: + free(errors); +- psmx2_unlock(&av_priv->lock, 1); ++ av_priv->domain->av_unlock_fn(&av_priv->lock, 1); + return ret; + } + +-static int psmx2_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, ++DIRECT_FN ++STATIC int psmx2_av_map_insert(struct fid_av *av, const void *addr, ++ size_t count, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ struct psmx2_fid_av *av_priv; ++ struct psmx2_trx_ctxt *trx_ctxt; ++ struct psmx2_ep_name *ep_name; ++ const struct psmx2_ep_name *names = addr; ++ const char **string_names = (void *)addr; ++ psm2_epid_t *epids = NULL; ++ psm2_epaddr_t *epaddrs = NULL; ++ psm2_error_t *errors = NULL; ++ int error_count = 0; ++ int i, ret, err = 0; ++ ++ assert(addr || !count); ++ ++ av_priv = container_of(av, struct psmx2_fid_av, av); ++ ++ av_priv->domain->av_lock_fn(&av_priv->lock, 1); ++ ++ if (!count) ++ goto out; ++ ++ epids = calloc(count, sizeof(*epids)); ++ errors = calloc(count, sizeof(*errors)); ++ if (!epids || !errors) { ++ err = -FI_ENOMEM; ++ goto out; ++ } ++ ++ for (i=0; iaddr_format == FI_ADDR_STR) { ++ ep_name = psmx2_string_to_ep_name(string_names[i]); ++ if (!ep_name) { ++ err = -FI_EINVAL; ++ goto out; ++ } ++ epids[i] = ep_name->epid; ++ free(ep_name); ++ } else { ++ epids[i] = names[i].epid; ++ } ++ } ++ ++ epaddrs = (psm2_epaddr_t *)fi_addr; ++ ++ trx_ctxt = av_priv->av_map_trx_ctxt; ++ if (!trx_ctxt) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "unable to map address without AV-EP binding\n"); ++ err = -FI_ENODEV; ++ goto out; ++ } ++ ++ psm2_ep_connect(trx_ctxt->psm2_ep, count, epids, NULL, errors, epaddrs, ++ (int64_t) psmx2_env.conn_timeout * count * 1000000000LL); ++ ++ for (i=0; iflags & FI_EVENT) { ++ if (!err) { ++ if (error_count) { ++ for (i = 0; i < count; i++) ++ psmx2_av_post_completion(av_priv, context, i, errors[i]); ++ } ++ psmx2_av_post_completion(av_priv, context, count - error_count, 0); ++ } ++ ret = err; ++ } else { ++ if (flags & FI_SYNC_ERR) { ++ int *fi_errors = context; ++ for (i=0; idomain->av_unlock_fn(&av_priv->lock, 1); ++ ++ return ret; ++} ++ ++static int psmx2_av_disconnect_addr(int trx_ctxt_id, psm2_epid_t epid, ++ psm2_epaddr_t epaddr) ++{ ++ struct psmx2_epaddr_context *epaddr_context; ++ psm2_error_t errors; ++ int err; ++ ++ if (!epaddr) ++ return 0; ++ ++ FI_INFO(&psmx2_prov, FI_LOG_AV, ++ "trx_ctxt_id %d epid %lx epaddr %p\n", trx_ctxt_id, epid, epaddr); ++ ++ epaddr_context = psm2_epaddr_getctxt(epaddr); ++ if (!epaddr_context) ++ return -FI_EINVAL; ++ ++ if (trx_ctxt_id != epaddr_context->trx_ctxt->id) ++ return -FI_EINVAL; ++ ++ if (epid != epaddr_context->epid) ++ return -FI_EINVAL; ++ ++ err = psm2_ep_disconnect2(epaddr_context->trx_ctxt->psm2_ep, 1, &epaddr, ++ NULL, &errors, PSM2_EP_DISCONNECT_FORCE, 0); ++ ++ return psmx2_errno(err); ++} ++ ++DIRECT_FN ++STATIC int psmx2_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, + uint64_t flags) + { ++ struct psmx2_fid_av *av_priv; ++ int idx, i, j, k; ++ int err; ++ ++ av_priv = container_of(av, struct psmx2_fid_av, av); ++ ++ av_priv->domain->av_lock_fn(&av_priv->lock, 1); ++ ++ for (i = 0; i < count; i++) { ++ idx = PSMX2_ADDR_IDX(fi_addr[i]); ++ if (idx >= av_priv->hdr->last) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "AV index out of range: fi_addr %lx idx %d last %ld\n", ++ fi_addr[i], idx, av_priv->hdr->last); ++ continue; ++ } ++ ++ if (av_priv->table[idx].type == PSMX2_EP_REGULAR) { ++ for (j = 0; j < av_priv->max_trx_ctxt; j++) { ++ if (!av_priv->conn_info[j].trx_ctxt) ++ continue; ++ ++ err = psmx2_av_disconnect_addr( ++ j, av_priv->table[idx].epid, ++ av_priv->conn_info[j].epaddrs[idx]); ++ if (!err) ++ av_priv->conn_info[j].epaddrs[idx] = NULL; ++ } ++ } else { ++ if (!av_priv->sep_info[idx].epids) ++ continue; ++ ++ for (j = 0; j < av_priv->max_trx_ctxt; j++) { ++ if (!av_priv->conn_info[j].trx_ctxt) ++ continue; ++ ++ if (!av_priv->conn_info[j].sepaddrs[idx]) ++ continue; ++ ++ for (k = 0; k < av_priv->sep_info[idx].ctxt_cnt; k++) { ++ err = psmx2_av_disconnect_addr( ++ j, av_priv->sep_info[idx].epids[k], ++ av_priv->conn_info[j].sepaddrs[idx][k]); ++ if (!err) ++ av_priv->conn_info[j].sepaddrs[idx][k] = NULL; ++ } ++ } ++ } ++ } ++ ++ av_priv->domain->av_unlock_fn(&av_priv->lock, 1); ++ ++ return 0; ++} ++ ++DIRECT_FN ++STATIC int psmx2_av_map_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, ++ uint64_t flags) ++{ ++ struct psmx2_fid_av *av_priv; ++ struct psmx2_trx_ctxt *trx_ctxt; ++ psm2_error_t *errors; ++ ++ av_priv = container_of(av, struct psmx2_fid_av, av); ++ ++ if (!count) ++ return 0; ++ ++ trx_ctxt = av_priv->av_map_trx_ctxt; ++ if (!trx_ctxt) ++ return -FI_ENODEV; ++ ++ errors = calloc(count, sizeof(*errors)); ++ if (!errors) ++ return -FI_ENOMEM; ++ ++ psm2_ep_disconnect2(trx_ctxt->psm2_ep, count, (psm2_epaddr_t *)fi_addr, ++ NULL, errors, PSM2_EP_DISCONNECT_FORCE, 0); ++ ++ free(errors); + return 0; + } + +-static int psmx2_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, ++DIRECT_FN ++STATIC int psmx2_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, + size_t *addrlen) + { + struct psmx2_fid_av *av_priv; +- struct psmx2_epaddr_context *context; + struct psmx2_ep_name name; +- int idx; ++ int idx = PSMX2_ADDR_IDX(fi_addr); + int err = 0; + + assert(addr); +@@ -706,31 +748,17 @@ static int psmx2_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, + + memset(&name, 0, sizeof(name)); + +- psmx2_lock(&av_priv->lock, 1); ++ av_priv->domain->av_lock_fn(&av_priv->lock, 1); + +- if (PSMX2_SEP_ADDR_TEST(fi_addr)) { +- idx = PSMX2_SEP_ADDR_IDX(fi_addr); +- if (idx >= av_priv->last) { +- err = -FI_EINVAL; +- goto out; +- } +- name.type = PSMX2_EP_SCALABLE; +- name.epid = av_priv->epids[idx]; +- name.sep_id = av_priv->peers[idx].sep_id; +- } else if (av_priv->type == FI_AV_TABLE) { +- idx = (int)(int64_t)fi_addr; +- if (idx >= av_priv->last) { +- err = -FI_EINVAL; +- goto out; +- } +- name.type = PSMX2_EP_REGULAR; +- name.epid = av_priv->epids[idx]; +- } else { +- context = psm2_epaddr_getctxt(PSMX2_ADDR_TO_EP(fi_addr)); +- name.type = PSMX2_EP_REGULAR; +- name.epid = context->epid; ++ if (idx >= av_priv->hdr->last) { ++ err = -FI_EINVAL; ++ goto out; + } + ++ name.type = av_priv->table[idx].type; ++ name.epid = av_priv->table[idx].epid; ++ name.sep_id = av_priv->table[idx].sep_id; ++ + if (av_priv->addr_format == FI_ADDR_STR) { + ofi_straddr(addr, addrlen, FI_ADDR_PSMX2, &name); + } else { +@@ -739,75 +767,71 @@ static int psmx2_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, + } + + out: +- psmx2_unlock(&av_priv->lock, 1); ++ av_priv->domain->av_unlock_fn(&av_priv->lock, 1); + return err; + } + +-psm2_epaddr_t psmx2_av_translate_sep(struct psmx2_fid_av *av, +- struct psmx2_trx_ctxt *trx_ctxt, +- fi_addr_t addr) ++DIRECT_FN ++STATIC int psmx2_av_map_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, ++ size_t *addrlen) + { +- int idx = PSMX2_SEP_ADDR_IDX(addr); +- int ctxt = PSMX2_SEP_ADDR_CTXT(addr, av->rx_ctx_bits); +- psm2_epaddr_t epaddr = NULL; +- psm2_error_t errors; +- int err; +- +- psmx2_lock(&av->lock, 1); ++ struct psmx2_fid_av *av_priv; ++ struct psmx2_ep_name name; + +- if (av->peers[idx].type != PSMX2_EP_SCALABLE || +- ctxt >= av->peers[idx].sep_ctxt_cnt) +- goto out; ++ assert(addr); ++ assert(addrlen); + +- /* this can be NULL when lazy connection is enabled */ +- if (!av->tables[trx_ctxt->id].sepaddrs[idx]) { +- psmx2_av_connect_trx_ctxt(av, trx_ctxt->id, idx, 1, &errors); +- assert(av->tables[trx_ctxt->id].sepaddrs[idx]); +- } ++ av_priv = container_of(av, struct psmx2_fid_av, av); + +- if (!av->tables[trx_ctxt->id].sepaddrs[idx][ctxt]) { +- err = psmx2_epid_to_epaddr(trx_ctxt, +- av->peers[idx].sep_ctxt_epids[ctxt], +- &epaddr); +- if (err) { +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "fatal error: unable to translate epid %lx to epaddr.\n", +- av->peers[idx].sep_ctxt_epids[ctxt]); +- goto out; +- } ++ memset(&name, 0, sizeof(name)); ++ psm2_epaddr_to_epid((psm2_epaddr_t)fi_addr, &name.epid); ++ name.type = PSMX2_EP_REGULAR; + +- av->tables[trx_ctxt->id].sepaddrs[idx][ctxt] = epaddr; ++ if (av_priv->addr_format == FI_ADDR_STR) { ++ ofi_straddr(addr, addrlen, FI_ADDR_PSMX2, &name); ++ } else { ++ memcpy(addr, &name, MIN(*addrlen, sizeof(name))); ++ *addrlen = sizeof(name); + } + +- epaddr = av->tables[trx_ctxt->id].sepaddrs[idx][ctxt]; +- +-out: +- psmx2_unlock(&av->lock, 1); +- return epaddr; ++ return 0; + } + +-fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, fi_addr_t source) ++fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, psm2_epaddr_t source) + { +- psm2_epaddr_t epaddr; + psm2_epid_t epid; +- fi_addr_t ret = FI_ADDR_NOTAVAIL; +- int i, j, found = 0; ++ fi_addr_t ret; ++ int i, j, found; + +- epaddr = PSMX2_ADDR_TO_EP(source); +- psm2_epaddr_to_epid(epaddr, &epid); ++ if (av->type == FI_AV_MAP) ++ return (fi_addr_t) source; + +- psmx2_lock(&av->lock, 1); ++ psm2_epaddr_to_epid(source, &epid); + +- for (i = av->last - 1; i >= 0 && !found; i--) { +- if (av->peers[i].type == PSMX2_EP_REGULAR) { +- if (av->epids[i] == epid) { +- ret = (av->type == FI_AV_MAP) ? +- source : (fi_addr_t)i; ++ av->domain->av_lock_fn(&av->lock, 1); ++ ++ ret = FI_ADDR_NOTAVAIL; ++ found = 0; ++ for (i = av->hdr->last - 1; i >= 0 && !found; i--) { ++ if (av->table[i].type == PSMX2_EP_REGULAR) { ++ if (av->table[i].epid == epid) { ++ ret = (fi_addr_t)i; + found = 1; + } + } else { +- for (j=0; jpeers[i].sep_ctxt_cnt; j++) { +- if (av->peers[i].sep_ctxt_epids[j] == epid) { ++ if (!av->sep_info[i].epids) { ++ for (j = 0; j < av->max_trx_ctxt; j++) { ++ if (av->conn_info[j].trx_ctxt) ++ break; ++ } ++ if (j >= av->max_trx_ctxt) ++ continue; ++ psmx2_av_query_sep(av, av->conn_info[j].trx_ctxt, i); ++ if (!av->sep_info[i].epids) ++ continue; ++ } ++ for (j=0; jsep_info[i].ctxt_cnt; j++) { ++ if (av->sep_info[i].epids[j] == epid) { + ret = fi_rx_addr((fi_addr_t)i, j, + av->rx_ctx_bits); + found = 1; +@@ -817,7 +841,7 @@ fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, fi_addr_t source) + } + } + +- psmx2_unlock(&av->lock, 1); ++ av->domain->av_unlock_fn(&av->lock, 1); + return ret; + } + +@@ -828,29 +852,35 @@ void psmx2_av_remove_conn(struct psmx2_fid_av *av, + psm2_epid_t epid; + int i, j; + ++ if (av->type == FI_AV_MAP) ++ return; ++ + psm2_epaddr_to_epid(epaddr, &epid); + +- psmx2_lock(&av->lock, 1); ++ av->domain->av_lock_fn(&av->lock, 1); + +- for (i = 0; i < av->last; i++) { +- if (av->peers[i].type == PSMX2_EP_REGULAR) { +- if (av->epids[i] == epid && +- av->tables[trx_ctxt->id].epaddrs[i] == epaddr) +- av->tables[trx_ctxt->id].epaddrs[i] = NULL; ++ for (i = 0; i < av->hdr->last; i++) { ++ if (av->table[i].type == PSMX2_EP_REGULAR) { ++ if (av->table[i].epid == epid && ++ av->conn_info[trx_ctxt->id].epaddrs[i] == epaddr) ++ av->conn_info[trx_ctxt->id].epaddrs[i] = NULL; + } else { +- for (j=0; jpeers[i].sep_ctxt_cnt; j++) { +- if (av->peers[i].sep_ctxt_epids[j] == epid && +- av->tables[trx_ctxt->id].sepaddrs[i] && +- av->tables[trx_ctxt->id].sepaddrs[i][j] == epaddr) +- av->tables[trx_ctxt->id].sepaddrs[i][j] = NULL; ++ if (!av->sep_info[i].epids) ++ continue; ++ for (j=0; jsep_info[i].ctxt_cnt; j++) { ++ if (av->sep_info[i].epids[j] == epid && ++ av->conn_info[trx_ctxt->id].sepaddrs[i] && ++ av->conn_info[trx_ctxt->id].sepaddrs[i][j] == epaddr) ++ av->conn_info[trx_ctxt->id].sepaddrs[i][j] = NULL; + } + } + } + +- psmx2_unlock(&av->lock, 1); ++ av->domain->av_unlock_fn(&av->lock, 1); + } + +-static const char *psmx2_av_straddr(struct fid_av *av, const void *addr, ++DIRECT_FN ++STATIC const char *psmx2_av_straddr(struct fid_av *av, const void *addr, + char *buf, size_t *len) + { + return ofi_straddr(buf, len, FI_ADDR_PSMX2, addr); +@@ -860,27 +890,42 @@ static int psmx2_av_close(fid_t fid) + { + struct psmx2_fid_av *av; + int i, j; ++ int err; + + av = container_of(fid, struct psmx2_fid_av, av.fid); + psmx2_domain_release(av->domain); + fastlock_destroy(&av->lock); ++ ++ if (av->type == FI_AV_MAP) ++ goto out; ++ + for (i = 0; i < av->max_trx_ctxt; i++) { +- if (!av->tables[i].trx_ctxt) ++ if (!av->conn_info[i].trx_ctxt) + continue; +- free(av->tables[i].epaddrs); +- if (av->tables[i].sepaddrs) { +- for (j = 0; j < av->last; j++) +- free(av->tables[i].sepaddrs[j]); ++ free(av->conn_info[i].epaddrs); ++ if (av->conn_info[i].sepaddrs) { ++ for (j = 0; j < av->hdr->last; j++) ++ free(av->conn_info[i].sepaddrs[j]); + } +- free(av->tables[i].sepaddrs); ++ free(av->conn_info[i].sepaddrs); ++ } ++ if (av->shared) { ++ err = ofi_shm_unmap(&av->shm); ++ if (err) ++ FI_INFO(&psmx2_prov, FI_LOG_AV, ++ "Failed to unmap shared AV: %s.\n", ++ strerror(ofi_syserr())); ++ } else { ++ free(av->hdr); + } +- free(av->peers); +- free(av->epids); ++ ++out: + free(av); + return 0; + } + +-static int psmx2_av_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++DIRECT_FN ++STATIC int psmx2_av_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct psmx2_fid_av *av; + +@@ -918,66 +963,63 @@ static struct fi_ops_av psmx2_av_ops = { + .straddr = psmx2_av_straddr, + }; + ++static struct fi_ops_av psmx2_av_map_ops = { ++ .size = sizeof(struct fi_ops_av), ++ .insert = psmx2_av_map_insert, ++ .insertsvc = fi_no_av_insertsvc, ++ .insertsym = fi_no_av_insertsym, ++ .remove = psmx2_av_map_remove, ++ .lookup = psmx2_av_map_lookup, ++ .straddr = psmx2_av_straddr, ++}; ++ ++DIRECT_FN + int psmx2_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + struct fid_av **av, void *context) + { + struct psmx2_fid_domain *domain_priv; + struct psmx2_fid_av *av_priv; +- int type; +- size_t count = 64; ++ size_t count = PSMX2_AV_DEFAULT_SIZE; + uint64_t flags = 0; ++ int shared = 0; + int rx_ctx_bits = PSMX2_MAX_RX_CTX_BITS; ++ size_t conn_size; + size_t table_size; ++ int av_type = FI_AV_TABLE; ++ int err; ++ int i; + + domain_priv = container_of(domain, struct psmx2_fid_domain, + util_domain.domain_fid); + +- if (psmx2_env.lazy_conn || psmx2_env.max_trx_ctxt > 1) +- type = FI_AV_TABLE; +- else +- type = FI_AV_MAP; +- + if (attr) { +- switch (attr->type) { +- case FI_AV_UNSPEC: +- break; +- +- case FI_AV_MAP: +- if (psmx2_env.lazy_conn) { ++ if (attr->type == FI_AV_MAP) { ++ if (psmx2_env.multi_ep) { + FI_INFO(&psmx2_prov, FI_LOG_AV, +- "Lazy connection is enabled, force FI_AV_TABLE\n"); +- break; +- } +- if (psmx2_env.max_trx_ctxt > 1) { ++ "FI_AV_MAP asked, but force FI_AV_TABLE for multi-EP support\n"); ++ } else if (psmx2_env.lazy_conn) { + FI_INFO(&psmx2_prov, FI_LOG_AV, +- "Multi-EP is enabled, force FI_AV_TABLE\n"); +- break; ++ "FI_AV_MAP asked, but force FI_AV_TABLE for lazy connection\n"); ++ } else if (attr->name) { ++ FI_INFO(&psmx2_prov, FI_LOG_AV, ++ "FI_AV_MAP asked, but force FI_AV_TABLE for shared AV\n"); ++ } else { ++ FI_INFO(&psmx2_prov, FI_LOG_AV, ++ "FI_AV_MAP asked, and granted\n"); ++ av_type = FI_AV_MAP; + } +- /* fall through */ +- case FI_AV_TABLE: +- type = attr->type; +- break; +- default: +- FI_INFO(&psmx2_prov, FI_LOG_AV, +- "attr->type=%d, supported=%d %d\n", +- attr->type, FI_AV_MAP, FI_AV_TABLE); +- return -FI_EINVAL; + } + +- count = attr->count; +- flags = attr->flags; ++ if (attr->count) ++ count = attr->count; + +- if (flags & (FI_READ | FI_SYMMETRIC)) { +- FI_INFO(&psmx2_prov, FI_LOG_AV, +- "attr->flags=%"PRIu64", supported=%llu\n", +- attr->flags, FI_EVENT); +- return -FI_ENOSYS; +- } ++ if (attr->name) ++ shared = 1; + +- if (attr->name) { ++ flags = attr->flags; ++ if (flags & FI_SYMMETRIC) { + FI_INFO(&psmx2_prov, FI_LOG_AV, +- "attr->name=%s, named AV is not supported\n", +- attr->name); ++ "FI_SYMMETRIC flags is no supported\n"); + return -FI_ENOSYS; + } + +@@ -991,36 +1033,96 @@ int psmx2_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + rx_ctx_bits = attr->rx_ctx_bits; + } + +- table_size = psmx2_env.max_trx_ctxt * sizeof(struct psmx2_av_table); +- av_priv = (struct psmx2_fid_av *) calloc(1, sizeof(*av_priv) + table_size); ++ if (av_type == FI_AV_MAP) ++ conn_size = 0; ++ else ++ conn_size = psmx2_env.max_trx_ctxt * sizeof(struct psmx2_av_conn); ++ ++ av_priv = (struct psmx2_fid_av *) calloc(1, sizeof(*av_priv) + conn_size); + if (!av_priv) + return -FI_ENOMEM; + ++ if (av_type == FI_AV_MAP) ++ goto init_lock; ++ ++ av_priv->sep_info = calloc(count, sizeof(struct psmx2_av_sep)); ++ if (!av_priv->sep_info) { ++ err = -FI_ENOMEM; ++ goto errout_free; ++ } ++ ++ table_size = PSMX2_AV_TABLE_SIZE(count, shared); ++ if (attr && attr->name) { ++ err = ofi_shm_map(&av_priv->shm, attr->name, table_size, ++ flags & FI_READ, (void**)&av_priv->hdr); ++ if (err || av_priv->hdr == MAP_FAILED) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "failed to map shared AV: %s\n", attr->name); ++ err = -FI_EINVAL; ++ goto errout_free; ++ } ++ ++ if (flags & FI_READ) { ++ if (av_priv->hdr->size != count) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "AV size doesn't match: shared %ld, asking %ld\n", ++ av_priv->hdr->size, count); ++ err = -FI_EINVAL; ++ goto errout_free; ++ } ++ } else { ++ av_priv->hdr->size = count; ++ av_priv->hdr->last = 0; ++ } ++ av_priv->shared = 1; ++ av_priv->map = (fi_addr_t *)(av_priv->hdr + 1); ++ av_priv->table = (struct psmx2_av_addr *)(av_priv->map + count); ++ for (i = 0; i < count; i++) ++ av_priv->map[i] = i; ++ } else { ++ av_priv->hdr = calloc(1, table_size); ++ if (!av_priv->hdr) { ++ err = -FI_ENOMEM; ++ goto errout_free; ++ } ++ av_priv->hdr->size = count; ++ av_priv->table = (struct psmx2_av_addr *)(av_priv->hdr + 1); ++ } ++ ++init_lock: + fastlock_init(&av_priv->lock); + + psmx2_domain_acquire(domain_priv); + + av_priv->domain = domain_priv; +- av_priv->type = type; + av_priv->addrlen = sizeof(psm2_epaddr_t); + av_priv->count = count; + av_priv->flags = flags; + av_priv->rx_ctx_bits = rx_ctx_bits; + av_priv->max_trx_ctxt = psmx2_env.max_trx_ctxt; + av_priv->addr_format = domain_priv->addr_format; ++ av_priv->type = av_type; + + av_priv->av.fid.fclass = FI_CLASS_AV; + av_priv->av.fid.context = context; + av_priv->av.fid.ops = &psmx2_fi_ops; +- av_priv->av.ops = &psmx2_av_ops; ++ if (av_type == FI_AV_MAP) ++ av_priv->av.ops = &psmx2_av_map_ops; ++ else ++ av_priv->av.ops = &psmx2_av_ops; + + *av = &av_priv->av; +- if (attr) +- attr->type = type; +- +- FI_INFO(&psmx2_prov, FI_LOG_AV, +- "type = %s\n", fi_tostr(&type, FI_TYPE_AV_TYPE)); ++ if (attr) { ++ attr->type = av_type; ++ if (shared) ++ attr->map_addr = av_priv->map; ++ } + + return 0; ++ ++errout_free: ++ free(av_priv->sep_info); ++ free(av_priv); ++ return err; + } + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cm.c +index dba1624..239506e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cm.c +@@ -32,7 +32,8 @@ + + #include "psmx2.h" + +-static int psmx2_cm_getname(fid_t fid, void *addr, size_t *addrlen) ++DIRECT_FN ++STATIC int psmx2_cm_getname(fid_t fid, void *addr, size_t *addrlen) + { + struct psmx2_fid_ep *ep; + struct psmx2_fid_sep *sep; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cntr.c +index cc9d07d..f176630 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cntr.c +@@ -42,7 +42,7 @@ void psmx2_cntr_check_trigger(struct psmx2_fid_cntr *cntr) + if (!cntr->trigger) + return; + +- psmx2_lock(&cntr->trigger_lock, 2); ++ cntr->domain->trigger_lock_fn(&cntr->trigger_lock, 2); + + trigger = cntr->trigger; + while (trigger) { +@@ -65,10 +65,10 @@ void psmx2_cntr_check_trigger(struct psmx2_fid_cntr *cntr) + } + + if (trx_ctxt->am_initialized) { +- psmx2_lock(&trx_ctxt->trigger_queue.lock, 2); ++ cntr->domain->trigger_queue_lock_fn(&trx_ctxt->trigger_queue.lock, 2); + slist_insert_tail(&trigger->list_entry, + &trx_ctxt->trigger_queue.list); +- psmx2_unlock(&trx_ctxt->trigger_queue.lock, 2); ++ cntr->domain->trigger_queue_unlock_fn(&trx_ctxt->trigger_queue.lock, 2); + } else { + psmx2_process_trigger(trx_ctxt, trigger); + } +@@ -76,7 +76,7 @@ void psmx2_cntr_check_trigger(struct psmx2_fid_cntr *cntr) + trigger = cntr->trigger; + } + +- psmx2_unlock(&cntr->trigger_lock, 2); ++ cntr->domain->trigger_unlock_fn(&cntr->trigger_lock, 2); + } + + void psmx2_cntr_add_trigger(struct psmx2_fid_cntr *cntr, +@@ -84,7 +84,7 @@ void psmx2_cntr_add_trigger(struct psmx2_fid_cntr *cntr, + { + struct psmx2_trigger *p, *q; + +- psmx2_lock(&cntr->trigger_lock, 2); ++ cntr->domain->trigger_lock_fn(&cntr->trigger_lock, 2); + + q = NULL; + p = cntr->trigger; +@@ -98,12 +98,13 @@ void psmx2_cntr_add_trigger(struct psmx2_fid_cntr *cntr, + cntr->trigger = trigger; + trigger->next = p; + +- psmx2_unlock(&cntr->trigger_lock, 2); ++ cntr->domain->trigger_unlock_fn(&cntr->trigger_lock, 2); + + psmx2_cntr_check_trigger(cntr); + } + +-static uint64_t psmx2_cntr_read(struct fid_cntr *cntr) ++DIRECT_FN ++STATIC uint64_t psmx2_cntr_read(struct fid_cntr *cntr) + { + struct psmx2_fid_cntr *cntr_priv; + struct psmx2_poll_ctxt *poll_ctxt; +@@ -126,7 +127,8 @@ static uint64_t psmx2_cntr_read(struct fid_cntr *cntr) + return ofi_atomic_get64(&cntr_priv->counter); + } + +-static uint64_t psmx2_cntr_readerr(struct fid_cntr *cntr) ++DIRECT_FN ++STATIC uint64_t psmx2_cntr_readerr(struct fid_cntr *cntr) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -136,7 +138,8 @@ static uint64_t psmx2_cntr_readerr(struct fid_cntr *cntr) + return ofi_atomic_get64(&cntr_priv->error_counter); + } + +-static int psmx2_cntr_add(struct fid_cntr *cntr, uint64_t value) ++DIRECT_FN ++STATIC int psmx2_cntr_add(struct fid_cntr *cntr, uint64_t value) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -151,7 +154,8 @@ static int psmx2_cntr_add(struct fid_cntr *cntr, uint64_t value) + return 0; + } + +-static int psmx2_cntr_set(struct fid_cntr *cntr, uint64_t value) ++DIRECT_FN ++STATIC int psmx2_cntr_set(struct fid_cntr *cntr, uint64_t value) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -166,7 +170,8 @@ static int psmx2_cntr_set(struct fid_cntr *cntr, uint64_t value) + return 0; + } + +-static int psmx2_cntr_adderr(struct fid_cntr *cntr, uint64_t value) ++DIRECT_FN ++STATIC int psmx2_cntr_adderr(struct fid_cntr *cntr, uint64_t value) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -182,7 +187,8 @@ static int psmx2_cntr_adderr(struct fid_cntr *cntr, uint64_t value) + return 0; + } + +-static int psmx2_cntr_seterr(struct fid_cntr *cntr, uint64_t value) ++DIRECT_FN ++STATIC int psmx2_cntr_seterr(struct fid_cntr *cntr, uint64_t value) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -198,7 +204,8 @@ static int psmx2_cntr_seterr(struct fid_cntr *cntr, uint64_t value) + return 0; + } + +-static int psmx2_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout) ++DIRECT_FN ++STATIC int psmx2_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout) + { + struct psmx2_fid_cntr *cntr_priv; + struct psmx2_poll_ctxt *poll_ctxt; +@@ -269,6 +276,8 @@ static int psmx2_cntr_close(fid_t fid) + while (!slist_empty(&cntr->poll_list)) { + entry = slist_remove_head(&cntr->poll_list); + item = container_of(entry, struct psmx2_poll_ctxt, list_entry); ++ if (!ofi_atomic_dec32(&item->trx_ctxt->poll_refcnt)) ++ free(item->trx_ctxt); + free(item); + } + +@@ -335,6 +344,7 @@ static struct fi_ops_cntr psmx2_cntr_ops = { + .seterr = psmx2_cntr_seterr, + }; + ++DIRECT_FN + int psmx2_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + struct fid_cntr **cntr, void *context) + { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cq.c +index 4f1356f..f3d877b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cq.c +@@ -35,10 +35,10 @@ + void psmx2_cq_enqueue_event(struct psmx2_fid_cq *cq, + struct psmx2_cq_event *event) + { +- psmx2_lock(&cq->lock, 2); ++ cq->domain->cq_lock_fn(&cq->lock, 2); + slist_insert_tail(&event->list_entry, &cq->event_queue); + cq->event_count++; +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + + if (cq->wait) + cq->wait->signal(cq->wait); +@@ -48,14 +48,14 @@ static struct psmx2_cq_event *psmx2_cq_dequeue_event(struct psmx2_fid_cq *cq) + { + struct slist_entry *entry; + +- psmx2_lock(&cq->lock, 2); ++ cq->domain->cq_lock_fn(&cq->lock, 2); + if (slist_empty(&cq->event_queue)) { +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + return NULL; + } + entry = slist_remove_head(&cq->event_queue); + cq->event_count--; +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + + return container_of(entry, struct psmx2_cq_event, list_entry); + } +@@ -64,15 +64,15 @@ static struct psmx2_cq_event *psmx2_cq_alloc_event(struct psmx2_fid_cq *cq) + { + struct psmx2_cq_event *event; + +- psmx2_lock(&cq->lock, 2); ++ cq->domain->cq_lock_fn(&cq->lock, 2); + if (!slist_empty(&cq->free_list)) { + event = container_of(slist_remove_head(&cq->free_list), + struct psmx2_cq_event, list_entry); +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + return event; + } + +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + event = calloc(1, sizeof(*event)); + if (!event) + FI_WARN(&psmx2_prov, FI_LOG_CQ, "out of memory.\n"); +@@ -85,9 +85,9 @@ static void psmx2_cq_free_event(struct psmx2_fid_cq *cq, + { + memset(event, 0, sizeof(*event)); + +- psmx2_lock(&cq->lock, 2); ++ cq->domain->cq_lock_fn(&cq->lock, 2); + slist_insert_tail(&event->list_entry, &cq->free_list); +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + } + + struct psmx2_cq_event *psmx2_cq_create_event(struct psmx2_fid_cq *cq, +@@ -152,6 +152,690 @@ out: + return event; + } + ++static uint64_t psmx2_comp_flags[PSMX2_MAX_CONTEXT_TYPE] = { ++ [PSMX2_NOCOMP_SEND_CONTEXT] = FI_SEND | FI_MSG, ++ [PSMX2_NOCOMP_RECV_CONTEXT] = FI_RECV | FI_MSG, ++ [PSMX2_NOCOMP_TSEND_CONTEXT] = FI_SEND | FI_TAGGED, ++ [PSMX2_NOCOMP_TRECV_CONTEXT] = FI_RECV | FI_TAGGED, ++ [PSMX2_NOCOMP_WRITE_CONTEXT] = FI_WRITE | FI_RMA, ++ [PSMX2_NOCOMP_READ_CONTEXT] = FI_READ | FI_RMA, ++ [PSMX2_SEND_CONTEXT] = FI_SEND | FI_MSG, ++ [PSMX2_RECV_CONTEXT] = FI_RECV | FI_MSG, ++ [PSMX2_MULTI_RECV_CONTEXT] = FI_RECV | FI_MSG, ++ [PSMX2_TSEND_CONTEXT] = FI_SEND | FI_TAGGED, ++ [PSMX2_TRECV_CONTEXT] = FI_RECV | FI_TAGGED, ++ [PSMX2_WRITE_CONTEXT] = FI_WRITE | FI_RMA, ++ [PSMX2_READ_CONTEXT] = FI_READ | FI_RMA, ++ [PSMX2_REMOTE_WRITE_CONTEXT] = FI_REMOTE_WRITE | FI_RMA, ++ [PSMX2_REMOTE_READ_CONTEXT] = FI_REMOTE_READ | FI_RMA, ++ [PSMX2_SENDV_CONTEXT] = FI_SEND, ++ [PSMX2_IOV_SEND_CONTEXT] = FI_SEND, ++ [PSMX2_IOV_RECV_CONTEXT] = FI_RECV, ++}; ++ ++ ++#if HAVE_PSM2_MQ_REQ_USER ++ ++/* ++ * Translate "status" into completion event. A few factors determine where to ++ * save the event. ++ * ++ * If: ++ * ++ * (1) the CQE is for the CQ being polled; and ++ * (2) event buffer is supplied (event_in != NULL); and ++ * (3) the CQE is not an error entry, ++ * ++ * then the event is written to the event buffer directly. Otherwise a CQE is ++ * allocated on the corresponding CQ. ++ * ++ * The function doesn't use PSMX2_STATUS_CONTEXT(status) because the context ++ * field could refer to an allocated descriptor that may have already been ++ * freed. All the information that are dependent on the field are obtained ++ * in advance and passed in as separate parameters ("op_context", "buf", ++ * "flags", "data", and "is_recv"). ++ * ++ * The flag "event_saved" is set to indicate to the caller that the event ++ * was saved to the user's provided buffer, otherwise the event was an error ++ * or the event has been saved to the comp_cq slist. ++ */ ++ ++__attribute__((always_inline)) ++static inline int psmx2_cq_any_complete(struct psmx2_fid_cq *poll_cq, ++ struct psmx2_fid_cq *comp_cq, ++ struct psmx2_fid_av *av, ++ PSMX2_STATUS_TYPE *status, ++ void *op_context, ++ void *buf, ++ uint64_t flags, ++ uint64_t data, ++ struct psmx2_cq_event *event_in, ++ int *event_saved, ++ fi_addr_t *src_addr, ++ int is_recv) ++{ ++ struct psmx2_cq_event *event = event_in; ++ ++ *event_saved = 1; ++ ++ if (OFI_UNLIKELY(PSMX2_STATUS_ERROR(status))) { ++ *event_saved = 0; ++ event = psmx2_cq_alloc_event(comp_cq); ++ if (!event) ++ return -FI_ENOMEM; ++ ++ event->error = 1; ++ event->cqe.err.op_context = op_context; ++ event->cqe.err.flags = flags; ++ event->cqe.err.err = -psmx2_errno(PSMX2_STATUS_ERROR(status)); ++ event->cqe.err.prov_errno = PSMX2_STATUS_ERROR(status); ++ event->cqe.err.tag = PSMX2_GET_TAG64(PSMX2_STATUS_TAG(status)); ++ event->cqe.err.olen = PSMX2_STATUS_SNDLEN(status) - PSMX2_STATUS_RCVLEN(status); ++ event->cqe.err.data = data; ++ ++ psmx2_cq_enqueue_event(comp_cq, event); ++ return 0; ++ } ++ ++ if (OFI_UNLIKELY(poll_cq != comp_cq || !event)) { ++ *event_saved = 0; ++ event = psmx2_cq_alloc_event(comp_cq); ++ if (!event) ++ return -FI_ENOMEM; ++ ++ event->error = 0; ++ } ++ ++ if (is_recv) { ++ psm2_epaddr_t source = PSMX2_STATUS_PEER(status); ++ ++ if (event == event_in) { ++ if (src_addr) { ++ src_addr[0] = psmx2_av_translate_source(av, source); ++ if (src_addr[0] == FI_ADDR_NOTAVAIL) { ++ *event_saved = 0; ++ event = psmx2_cq_alloc_event(comp_cq); ++ if (!event) ++ return -FI_ENOMEM; ++ ++ event->cqe = event_in->cqe; ++ event->cqe.err.err = FI_EADDRNOTAVAIL; ++ event->cqe.err.err_data = &comp_cq->error_data; ++ event->error = !!event->cqe.err.err; ++ if (av->addr_format == FI_ADDR_STR) { ++ event->cqe.err.err_data_size = PSMX2_ERR_DATA_SIZE; ++ psmx2_get_source_string_name(source, (void *)&comp_cq->error_data, ++ &event->cqe.err.err_data_size); ++ } else { ++ psmx2_get_source_name(source, (void *)&comp_cq->error_data); ++ event->cqe.err.err_data_size = sizeof(struct psmx2_ep_name); ++ } ++ } ++ } ++ } else { ++ event->source_is_valid = 1; ++ event->source = source; ++ event->source_av = av; ++ } ++ } ++ ++ switch (comp_cq->format) { ++ case FI_CQ_FORMAT_CONTEXT: ++ event->cqe.context.op_context = op_context; ++ break; ++ ++ case FI_CQ_FORMAT_MSG: ++ event->cqe.msg.op_context = op_context; ++ event->cqe.msg.flags = flags; ++ event->cqe.msg.len = PSMX2_STATUS_RCVLEN(status); ++ break; ++ ++ case FI_CQ_FORMAT_DATA: ++ event->cqe.data.op_context = op_context; ++ event->cqe.data.buf = buf; ++ event->cqe.data.flags = flags; ++ event->cqe.data.len = PSMX2_STATUS_RCVLEN(status); ++ event->cqe.data.data = data; ++ break; ++ ++ case FI_CQ_FORMAT_TAGGED: ++ event->cqe.tagged.op_context = op_context; ++ event->cqe.tagged.buf = buf; ++ event->cqe.tagged.flags = flags; ++ event->cqe.tagged.len = PSMX2_STATUS_RCVLEN(status); ++ event->cqe.tagged.data = data; ++ event->cqe.tagged.tag = PSMX2_GET_TAG64(PSMX2_STATUS_TAG(status)); ++ break; ++ ++ default: ++ FI_WARN(&psmx2_prov, FI_LOG_CQ, ++ "unsupported CQ format %d\n", comp_cq->format); ++ if (event != event_in) ++ psmx2_cq_free_event(comp_cq, event); ++ return -FI_EINVAL; ++ } ++ ++ if (OFI_UNLIKELY(event != event_in)) ++ psmx2_cq_enqueue_event(comp_cq, event); ++ ++ return 0; ++} ++ ++static inline int psmx2_cq_tx_complete(struct psmx2_fid_cq *poll_cq, ++ struct psmx2_fid_cq *comp_cq, ++ struct psmx2_fid_av *av, ++ PSMX2_STATUS_TYPE *status, ++ void *op_context, ++ void *buf, ++ uint64_t flags, ++ uint64_t data, ++ struct psmx2_cq_event *event_in, ++ int *event_saved) ++{ ++ return psmx2_cq_any_complete(poll_cq, comp_cq, av, status, ++ op_context, buf, flags, data, ++ event_in, event_saved, NULL, 0); ++} ++ ++static inline int psmx2_cq_rx_complete(struct psmx2_fid_cq *poll_cq, ++ struct psmx2_fid_cq *comp_cq, ++ struct psmx2_fid_av *av, ++ PSMX2_STATUS_TYPE *status, ++ void *op_context, ++ void *buf, ++ uint64_t flags, ++ uint64_t data, ++ struct psmx2_cq_event *event_in, ++ fi_addr_t *src_addr, ++ int *event_saved) ++{ ++ return psmx2_cq_any_complete(poll_cq, comp_cq, av, status, ++ op_context, buf, flags, data, ++ event_in, event_saved, src_addr, 1); ++} ++ ++int ++psmx2_mq_status_copy(struct psm2_mq_req_user *req, void *status_array, int entry_index) ++{ ++ struct fi_context *fi_context; ++ struct psmx2_fid_ep *ep; ++ struct psmx2_fid_mr *mr; ++ struct psmx2_am_request *am_req; ++ struct psmx2_multi_recv *multi_recv_req; ++ struct psmx2_sendv_request *sendv_req; ++ struct psmx2_sendv_reply *sendv_rep; ++ psm2_mq_req_t psm2_req; ++ size_t len_remaining; ++ void *op_context; ++ void *buf; ++ uint64_t flags; ++ uint64_t data; ++ int err; ++ int context_type; ++ int event_saved = 0; ++ void *entry = NULL; ++ ++ struct psmx2_status_data *status_data = status_array; ++ ++ if (OFI_LIKELY(status_data->event_buffer && status_data->poll_cq)) ++ entry = (uint8_t *)status_data->event_buffer + ++ (entry_index * status_data->poll_cq->entry_size); ++ ++ fi_context = PSMX2_STATUS_CONTEXT(req); ++ ++ if (OFI_UNLIKELY(!fi_context)) ++ return 0; ++ ++ context_type = (int)PSMX2_CTXT_TYPE(fi_context); ++ flags = psmx2_comp_flags[context_type]; ++ ep = PSMX2_CTXT_EP(fi_context); ++ ++ switch (context_type) { ++ case PSMX2_SEND_CONTEXT: ++ case PSMX2_TSEND_CONTEXT: ++ if (ep->send_cq) { ++ op_context = fi_context; ++ buf = PSMX2_CTXT_USER(fi_context); ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, buf, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->send_cntr) ++ psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(req)); ++ ++ /* Bi-directional send/recv performance tweak for KNL */ ++ if (event_saved && PSMX2_STATUS_SNDLEN(req) > 16384) ++ event_saved++; ++ break; ++ ++ case PSMX2_NOCOMP_SEND_CONTEXT: ++ case PSMX2_NOCOMP_TSEND_CONTEXT: ++ if (OFI_UNLIKELY(ep->send_cq && PSMX2_STATUS_ERROR(req))) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, NULL, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->send_cntr) ++ psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_RECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 0))) { ++ return 0; ++ } ++ if (ep->recv_cq) { ++ op_context = fi_context; ++ buf = PSMX2_CTXT_USER(fi_context); ++ data = 0; ++ if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req)))) { ++ flags |= FI_REMOTE_CQ_DATA; ++ data = PSMX2_GET_CQDATA(PSMX2_STATUS_TAG(req)); ++ } ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, op_context, buf, flags, data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_TRECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 0))) { ++ return 0; ++ } ++ if (ep->recv_cq) { ++ op_context = fi_context; ++ buf = PSMX2_CTXT_USER(fi_context); ++ data = 0; ++ if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req)))) { ++ flags |= FI_REMOTE_CQ_DATA; ++ data = PSMX2_GET_CQDATA(PSMX2_STATUS_TAG(req)); ++ } ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, op_context, buf, flags, data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_NOCOMP_RECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 0))) { ++ PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); ++ return 0; ++ } ++ PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); ++ if (OFI_UNLIKELY(ep->recv_cq && PSMX2_STATUS_ERROR(req))) { ++ data = 0; ++ if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req)))) { ++ flags |= FI_REMOTE_CQ_DATA; ++ data = PSMX2_GET_CQDATA(PSMX2_STATUS_TAG(req)); ++ } ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, NULL, NULL, flags, data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_NOCOMP_TRECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 0))) { ++ PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); ++ return 0; ++ } ++ PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); ++ if (OFI_UNLIKELY(ep->recv_cq && PSMX2_STATUS_ERROR(req))) { ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, NULL, NULL, flags, 0, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_WRITE_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, ++ fi_context); ++ op_context = PSMX2_CTXT_USER(fi_context); ++ free(am_req->tmpbuf); ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ if (ep->send_cq) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->write_cntr) ++ psmx2_cntr_inc(ep->write_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_NOCOMP_WRITE_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, ++ fi_context); ++ op_context = PSMX2_CTXT_USER(fi_context); ++ free(am_req->tmpbuf); ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ if (OFI_UNLIKELY(ep->send_cq && PSMX2_STATUS_ERROR(req))) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->write_cntr) ++ psmx2_cntr_inc(ep->write_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_READ_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, ++ fi_context); ++ if (OFI_UNLIKELY(am_req->op == PSMX2_AM_REQ_READV)) { ++ am_req->read.len_read += PSMX2_STATUS_RCVLEN(req); ++ if (am_req->read.len_read < am_req->read.len) { ++ FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, ++ "readv: long protocol finishes early\n"); ++ if (PSMX2_STATUS_ERROR(req)) ++ am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(req)); ++ /* Request to be freed in AM handler */ ++ return 0; ++ } ++ } ++ op_context = PSMX2_CTXT_USER(fi_context); ++ free(am_req->tmpbuf); ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ if (ep->send_cq) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->read_cntr) ++ psmx2_cntr_inc(ep->read_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_NOCOMP_READ_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, ++ fi_context); ++ if (OFI_UNLIKELY(am_req->op == PSMX2_AM_REQ_READV)) { ++ am_req->read.len_read += PSMX2_STATUS_RCVLEN(req); ++ if (am_req->read.len_read < am_req->read.len) { ++ FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, ++ "readv: long protocol finishes early\n"); ++ if (PSMX2_STATUS_ERROR(req)) ++ am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(req)); ++ /* Request to be freed in AM handler */ ++ return 0; ++ } ++ } ++ op_context = PSMX2_CTXT_USER(fi_context); ++ free(am_req->tmpbuf); ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ if (OFI_UNLIKELY(ep->send_cq && PSMX2_STATUS_ERROR(req))) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->read_cntr) ++ psmx2_cntr_inc(ep->read_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_MULTI_RECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 1))) { ++ return 0; ++ } ++ multi_recv_req = PSMX2_CTXT_USER(fi_context); ++ if (ep->recv_cq) { ++ op_context = fi_context; ++ buf = multi_recv_req->buf + multi_recv_req->offset; ++ data = 0; ++ if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req)))) { ++ flags |= FI_REMOTE_CQ_DATA; ++ data = PSMX2_GET_CQDATA(PSMX2_STATUS_TAG(req)); ++ } ++ if (multi_recv_req->offset + PSMX2_STATUS_RCVLEN(req) + ++ multi_recv_req->min_buf_size > multi_recv_req->len) ++ flags |= FI_MULTI_RECV; /* buffer used up */ ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, op_context, buf, flags, data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ ++ /* repost multi-recv buffer */ ++ multi_recv_req->offset += PSMX2_STATUS_RCVLEN(req); ++ len_remaining = multi_recv_req->len - multi_recv_req->offset; ++ if (len_remaining >= multi_recv_req->min_buf_size) { ++ if (len_remaining > PSMX2_MAX_MSG_SIZE) ++ len_remaining = PSMX2_MAX_MSG_SIZE; ++ err = psm2_mq_irecv2(ep->rx->psm2_mq, ++ multi_recv_req->src_addr, &multi_recv_req->tag, ++ &multi_recv_req->tagsel, multi_recv_req->flag, ++ multi_recv_req->buf + multi_recv_req->offset, ++ len_remaining, ++ (void *)fi_context, &psm2_req); ++ if (OFI_UNLIKELY(err != PSM2_OK)) ++ return psmx2_errno(err); ++ PSMX2_CTXT_REQ(fi_context) = psm2_req; ++ } else { ++ free(multi_recv_req); ++ } ++ break; ++ ++ case PSMX2_REMOTE_WRITE_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, fi_context); ++ if (am_req->op & PSMX2_AM_FORCE_ACK) { ++ am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(req)); ++ psmx2_am_ack_rma(am_req); ++ } ++ ++ if (am_req->ep->recv_cq && (am_req->cq_flags & FI_REMOTE_CQ_DATA)) { ++ flags |= FI_REMOTE_CQ_DATA; ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, am_req->ep->recv_cq, am_req->ep->av, ++ req, NULL, NULL, flags, am_req->write.data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) { ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ return err; ++ } ++ } ++ ++ if (am_req->ep->caps & FI_RMA_EVENT) { ++ if (am_req->ep->remote_write_cntr) ++ psmx2_cntr_inc(am_req->ep->remote_write_cntr, 0); ++ ++ mr = PSMX2_CTXT_USER(fi_context); ++ if (mr->cntr && mr->cntr != am_req->ep->remote_write_cntr) ++ psmx2_cntr_inc(mr->cntr, 0); ++ } ++ ++ /* NOTE: am_req->tmpbuf is unused here */ ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ break; ++ ++ case PSMX2_REMOTE_READ_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, fi_context); ++ if (am_req->ep->caps & FI_RMA_EVENT) { ++ if (am_req->ep->remote_read_cntr) ++ psmx2_cntr_inc(am_req->ep->remote_read_cntr, 0); ++ } ++ ++ /* NOTE: am_req->tmpbuf is unused here */ ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ break; ++ ++ case PSMX2_SENDV_CONTEXT: ++ sendv_req = PSMX2_CTXT_USER(fi_context); ++ sendv_req->iov_done++; ++ if (sendv_req->iov_protocol == PSMX2_IOV_PROTO_MULTI && ++ sendv_req->iov_done < sendv_req->iov_info.count + 1) { ++ sendv_req->tag = PSMX2_STATUS_TAG(req); ++ return 0; ++ } ++ if (ep->send_cq && !sendv_req->no_completion) { ++ op_context = sendv_req->user_context; ++ flags |= sendv_req->comp_flag; ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) { ++ free(sendv_req); ++ return err; ++ } ++ } ++ if (ep->send_cntr) ++ psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(req)); ++ free(sendv_req); ++ break; ++ ++ case PSMX2_IOV_SEND_CONTEXT: ++ sendv_req = PSMX2_CTXT_USER(fi_context); ++ sendv_req->iov_done++; ++ if (sendv_req->iov_done < sendv_req->iov_info.count + 1) ++ return 0; ++ PSMX2_STATUS_TAG(req) = sendv_req->tag; ++ if (ep->send_cq && !sendv_req->no_completion) { ++ op_context = sendv_req->user_context; ++ flags |= sendv_req->comp_flag; ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) { ++ free(sendv_req); ++ return err; ++ } ++ } ++ if (ep->send_cntr) ++ psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(req)); ++ free(sendv_req); ++ break; ++ ++ case PSMX2_IOV_RECV_CONTEXT: ++ sendv_rep = PSMX2_CTXT_USER(fi_context); ++ sendv_rep->iov_done++; ++ sendv_rep->msg_length += PSMX2_STATUS_SNDLEN(req); ++ sendv_rep->bytes_received += PSMX2_STATUS_RCVLEN(req); ++ if (PSMX2_STATUS_ERROR(req) != PSM2_OK) ++ sendv_rep->error_code = PSMX2_STATUS_ERROR(req); ++ if (sendv_rep->iov_done < sendv_rep->iov_info.count) ++ return 0; ++ ++ PSMX2_STATUS_TAG(req) = sendv_rep->tag; ++ PSMX2_STATUS_RCVLEN(req) = sendv_rep->bytes_received; ++ PSMX2_STATUS_SNDLEN(req) = sendv_rep->msg_length; ++ PSMX2_STATUS_ERROR(req) = sendv_rep->error_code; ++ ++ if (ep->recv_cq && !sendv_rep->no_completion) { ++ op_context = sendv_rep->user_context; ++ buf = sendv_rep->buf; ++ flags |= sendv_rep->comp_flag; ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, op_context, buf, flags, 0, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) { ++ free(sendv_rep); ++ return err; ++ } ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ ++ if (sendv_rep->multi_recv) { ++ /* repost the multi-recv buffer */ ++ fi_context = sendv_rep->user_context; ++ multi_recv_req = PSMX2_CTXT_USER(fi_context); ++ multi_recv_req->offset += PSMX2_STATUS_RCVLEN(req); ++ len_remaining = multi_recv_req->len - multi_recv_req->offset; ++ if (len_remaining >= multi_recv_req->min_buf_size) { ++ if (len_remaining > PSMX2_MAX_MSG_SIZE) ++ len_remaining = PSMX2_MAX_MSG_SIZE; ++ err = psm2_mq_irecv2(ep->rx->psm2_mq, ++ multi_recv_req->src_addr, &multi_recv_req->tag, ++ &multi_recv_req->tagsel, multi_recv_req->flag, ++ multi_recv_req->buf + multi_recv_req->offset, ++ len_remaining, ++ (void *)fi_context, &psm2_req); ++ if (OFI_UNLIKELY(err != PSM2_OK)) { ++ free(sendv_rep); ++ return psmx2_errno(err); ++ } ++ PSMX2_CTXT_REQ(fi_context) = psm2_req; ++ } else { ++ free(multi_recv_req); ++ } ++ } ++ ++ free(sendv_rep); ++ break; ++ } ++ ++ return event_saved; ++} ++ ++int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, ++ struct psmx2_trx_ctxt *trx_ctxt, ++ struct psmx2_cq_event *event_in, ++ int count, fi_addr_t *src_addr) ++{ ++ struct psmx2_status_data status_data; ++ ++ /* psm2_mq_ipeek_dequeue_multi needs non-zero count to make progress */ ++ if (!count) { ++ event_in = NULL; ++ count = 1; ++ } ++ ++ status_data.poll_cq = cq; ++ status_data.event_buffer = event_in; ++ status_data.src_addr = src_addr; ++ status_data.trx_ctxt = trx_ctxt; ++ ++ psm2_mq_ipeek_dequeue_multi(trx_ctxt->psm2_mq, &status_data, ++ psmx2_mq_status_copy, &count); ++ return count; ++} ++ ++#else /* !HAVE_PSM2_MQ_REQ_USER */ ++ + /* + * Translate "status" into completion event. A few factors determine where to + * save the event. +@@ -270,7 +954,7 @@ static inline int psmx2_cq_any_complete(struct psmx2_fid_cq *poll_cq, + } + + if (is_recv) { +- fi_addr_t source = PSMX2_EP_TO_ADDR(PSMX2_STATUS_PEER(status)); ++ psm2_epaddr_t source = PSMX2_STATUS_PEER(status); + + if (event == event_in) { + if (src_addr) { +@@ -353,33 +1037,12 @@ static inline int psmx2_cq_rx_complete(struct psmx2_fid_cq *poll_cq, + read_more, src_addr, 1); + } + +-static uint64_t psmx2_comp_flags[PSMX2_MAX_CONTEXT_TYPE] = { +- [PSMX2_NOCOMP_SEND_CONTEXT] = FI_SEND | FI_MSG, +- [PSMX2_NOCOMP_RECV_CONTEXT] = FI_RECV | FI_MSG, +- [PSMX2_NOCOMP_TSEND_CONTEXT] = FI_SEND | FI_TAGGED, +- [PSMX2_NOCOMP_TRECV_CONTEXT] = FI_RECV | FI_TAGGED, +- [PSMX2_NOCOMP_WRITE_CONTEXT] = FI_WRITE | FI_RMA, +- [PSMX2_NOCOMP_READ_CONTEXT] = FI_READ | FI_RMA, +- [PSMX2_SEND_CONTEXT] = FI_SEND | FI_MSG, +- [PSMX2_RECV_CONTEXT] = FI_RECV | FI_MSG, +- [PSMX2_MULTI_RECV_CONTEXT] = FI_RECV | FI_MSG, +- [PSMX2_TSEND_CONTEXT] = FI_SEND | FI_TAGGED, +- [PSMX2_TRECV_CONTEXT] = FI_RECV | FI_TAGGED, +- [PSMX2_WRITE_CONTEXT] = FI_WRITE | FI_RMA, +- [PSMX2_READ_CONTEXT] = FI_READ | FI_RMA, +- [PSMX2_REMOTE_WRITE_CONTEXT] = FI_REMOTE_WRITE | FI_RMA, +- [PSMX2_REMOTE_READ_CONTEXT] = FI_REMOTE_READ | FI_RMA, +- [PSMX2_SENDV_CONTEXT] = FI_SEND, +- [PSMX2_IOV_SEND_CONTEXT] = FI_SEND, +- [PSMX2_IOV_RECV_CONTEXT] = FI_RECV, +-}; +- + int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + struct psmx2_trx_ctxt *trx_ctxt, + struct psmx2_cq_event *event_in, + int count, fi_addr_t *src_addr) + { +- PSMX2_STATUS_DECL(status); ++ psm2_mq_status2_t status_priv, *status = &status_priv; + struct fi_context *fi_context; + struct psmx2_fid_ep *ep; + struct psmx2_fid_mr *mr; +@@ -398,16 +1061,25 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + int err; + int context_type; + +- PSMX2_STATUS_INIT(status); +- + while (read_more) { + +- PSMX2_POLL_COMPLETION(trx_ctxt, status, err); ++ /* ++ * psm2_mq_test2 is called immediately after psm2_mq_ipeek with a lock held to ++ * prevent psm2_mq_ipeek from returning the same request multiple times under ++ * different threads. ++ */ ++ if (trx_ctxt->domain->poll_trylock_fn(&trx_ctxt->poll_lock, 2)) { ++ err = PSM2_MQ_NO_COMPLETIONS; ++ } else { ++ err = psm2_mq_ipeek(trx_ctxt->psm2_mq, &psm2_req, NULL); ++ if (err == PSM2_OK) ++ psm2_mq_test2(&psm2_req, status); ++ trx_ctxt->domain->poll_unlock_fn(&trx_ctxt->poll_lock, 2); ++ } + + if (err == PSM2_OK) { + fi_context = PSMX2_STATUS_CONTEXT(status); + if (OFI_UNLIKELY(!fi_context)) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + +@@ -426,10 +1098,8 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->send_cntr) + psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(status)); +@@ -438,7 +1108,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + if (PSMX2_STATUS_SNDLEN(status) > 16384) + read_more = 0; + +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_SEND_CONTEXT: +@@ -452,22 +1121,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->send_cntr) + psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_RECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && +- !psmx2_handle_sendv_req(ep, status, 0))) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ !psmx2_handle_sendv_req(ep, status, 0))) + continue; +- } + if (ep->recv_cq) { + op_context = fi_context; + buf = PSMX2_CTXT_USER(fi_context); +@@ -483,22 +1147,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, data, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_TRECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && +- !psmx2_handle_sendv_req(ep, status, 0))) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ !psmx2_handle_sendv_req(ep, status, 0))) + continue; +- } + if (ep->recv_cq) { + op_context = fi_context; + buf = PSMX2_CTXT_USER(fi_context); +@@ -514,21 +1173,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, data, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_RECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && + !psmx2_handle_sendv_req(ep, status, 0))) { + PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); +@@ -547,21 +1202,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, data, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_TRECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && + !psmx2_handle_sendv_req(ep, status, 0))) { + PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); +@@ -574,14 +1225,11 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_WRITE_CONTEXT: +@@ -598,14 +1246,11 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->write_cntr) + psmx2_cntr_inc(ep->write_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_WRITE_CONTEXT: +@@ -622,14 +1267,11 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->write_cntr) + psmx2_cntr_inc(ep->write_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_READ_CONTEXT: +@@ -643,7 +1285,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + if (PSMX2_STATUS_ERROR(status)) + am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(status)); + /* Request to be freed in AM handler */ +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + } +@@ -658,14 +1299,11 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->read_cntr) + psmx2_cntr_inc(ep->read_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_READ_CONTEXT: +@@ -679,7 +1317,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + if (PSMX2_STATUS_ERROR(status)) + am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(status)); + /* Request to be freed in AM handler */ +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + } +@@ -694,22 +1331,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->read_cntr) + psmx2_cntr_inc(ep->read_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_MULTI_RECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && +- !psmx2_handle_sendv_req(ep, status, 1))) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ !psmx2_handle_sendv_req(ep, status, 1))) + continue; +- } + multi_recv_req = PSMX2_CTXT_USER(fi_context); + if (ep->recv_cq) { + op_context = fi_context; +@@ -729,10 +1361,8 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, data, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +@@ -749,15 +1379,12 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + multi_recv_req->buf + multi_recv_req->offset, + len_remaining, + (void *)fi_context, &psm2_req); +- if (err != PSM2_OK) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err != PSM2_OK) + return psmx2_errno(err); +- } + PSMX2_CTXT_REQ(fi_context) = psm2_req; + } else { + free(multi_recv_req); + } +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_REMOTE_WRITE_CONTEXT: +@@ -778,7 +1405,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + &read_more, src_addr); + if (err) { + psmx2_am_request_free(trx_ctxt, am_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return err; + } + } +@@ -794,7 +1420,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + + /* NOTE: am_req->tmpbuf is unused here */ + psmx2_am_request_free(trx_ctxt, am_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_REMOTE_READ_CONTEXT: +@@ -806,7 +1431,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + + /* NOTE: am_req->tmpbuf is unused here */ + psmx2_am_request_free(trx_ctxt, am_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_SENDV_CONTEXT: +@@ -814,7 +1438,7 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + sendv_req->iov_done++; + if (sendv_req->iov_protocol == PSMX2_IOV_PROTO_MULTI && + sendv_req->iov_done < sendv_req->iov_info.count + 1) { +- PSMX2_STATUS_SAVE(status, sendv_req->status); ++ sendv_req->tag = PSMX2_STATUS_TAG(status); + continue; + } + if (ep->send_cq && !sendv_req->no_completion) { +@@ -829,23 +1453,20 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + &read_more); + if (err) { + free(sendv_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return err; + } + } + if (ep->send_cntr) + psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(status)); + free(sendv_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_IOV_SEND_CONTEXT: + sendv_req = PSMX2_CTXT_USER(fi_context); + sendv_req->iov_done++; +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + if (sendv_req->iov_done < sendv_req->iov_info.count + 1) + continue; +- status = sendv_req->status; ++ PSMX2_STATUS_TAG(status) = sendv_req->tag; + if (ep->send_cq && !sendv_req->no_completion) { + op_context = sendv_req->user_context; + buf = NULL; +@@ -858,15 +1479,12 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + &read_more); + if (err) { + free(sendv_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return err; + } + } + if (ep->send_cntr) + psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(status)); + free(sendv_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); +- PSMX2_STATUS_INIT(status); + break; + + case PSMX2_IOV_RECV_CONTEXT: +@@ -876,10 +1494,8 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + sendv_rep->bytes_received += PSMX2_STATUS_RCVLEN(status); + if (PSMX2_STATUS_ERROR(status) != PSM2_OK) + sendv_rep->error_code = PSMX2_STATUS_ERROR(status); +- if (sendv_rep->iov_done < sendv_rep->iov_info.count) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (sendv_rep->iov_done < sendv_rep->iov_info.count) + continue; +- } + + PSMX2_STATUS_TAG(status) = sendv_rep->tag; + PSMX2_STATUS_RCVLEN(status) = sendv_rep->bytes_received; +@@ -898,7 +1514,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + &read_more, src_addr); + if (err) { + free(sendv_rep); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return err; + } + } +@@ -922,7 +1537,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + (void *)fi_context, &psm2_req); + if (err != PSM2_OK) { + free(sendv_rep); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return psmx2_errno(err); + } + PSMX2_CTXT_REQ(fi_context) = psm2_req; +@@ -932,7 +1546,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + } + + free(sendv_rep); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + } + } else if (err == PSM2_MQ_NO_COMPLETIONS) { +@@ -944,8 +1557,10 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + + return read_count; + } ++#endif /* !HAVE_PSM2_MQ_REQ_USER */ + +-static ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, ++DIRECT_FN ++STATIC ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, + fi_addr_t *src_addr) + { + struct psmx2_fid_cq *cq_priv; +@@ -963,6 +1578,10 @@ static ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, + slist_foreach(&cq_priv->poll_list, item, prev) { + poll_ctxt = container_of(item, struct psmx2_poll_ctxt, + list_entry); ++ ++ if (OFI_UNLIKELY(!poll_ctxt->trx_ctxt->poll_active)) ++ continue; ++ + ret = psmx2_cq_poll_mq(cq_priv, poll_ctxt->trx_ctxt, + (struct psmx2_cq_event *)buf, + count, src_addr); +@@ -976,13 +1595,16 @@ static ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, + } + } + +- if (cq_priv->pending_error) ++ if (OFI_UNLIKELY(cq_priv->pending_error != NULL)) + return -FI_EAVAIL; + + assert(buf || !count); + + read_count = 0; + for (i = 0; i < count; i++) { ++ if (slist_empty(&cq_priv->event_queue)) ++ break; ++ + event = psmx2_cq_dequeue_event(cq_priv); + if (event) { + if (!event->error) { +@@ -1040,12 +1662,14 @@ static ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, + return read_count; + } + +-static ssize_t psmx2_cq_read(struct fid_cq *cq, void *buf, size_t count) ++DIRECT_FN ++STATIC ssize_t psmx2_cq_read(struct fid_cq *cq, void *buf, size_t count) + { + return psmx2_cq_readfrom(cq, buf, count, NULL); + } + +-static ssize_t psmx2_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, ++DIRECT_FN ++STATIC ssize_t psmx2_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, + uint64_t flags) + { + struct psmx2_fid_cq *cq_priv; +@@ -1054,7 +1678,7 @@ static ssize_t psmx2_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, + + cq_priv = container_of(cq, struct psmx2_fid_cq, cq); + +- psmx2_lock(&cq_priv->lock, 2); ++ cq_priv->domain->cq_lock_fn(&cq_priv->lock, 2); + if (cq_priv->pending_error) { + api_version = cq_priv->domain->fabric->util_fabric. + fabric_fid.api_version; +@@ -1067,12 +1691,13 @@ static ssize_t psmx2_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, + psmx2_unlock(&cq_priv->lock, 2); + return 1; + } +- psmx2_unlock(&cq_priv->lock, 2); ++ cq_priv->domain->cq_unlock_fn(&cq_priv->lock, 2); + + return -FI_EAGAIN; + } + +-static ssize_t psmx2_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, ++DIRECT_FN ++STATIC ssize_t psmx2_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, + fi_addr_t *src_addr, const void *cond, + int timeout) + { +@@ -1106,6 +1731,10 @@ static ssize_t psmx2_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, + poll_ctxt = container_of(item, + struct psmx2_poll_ctxt, + list_entry); ++ ++ if (OFI_UNLIKELY(!poll_ctxt->trx_ctxt->poll_active)) ++ continue; ++ + sth_happened = + psmx2_cq_poll_mq(cq_priv, + poll_ctxt->trx_ctxt, +@@ -1141,13 +1770,15 @@ static ssize_t psmx2_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, + return psmx2_cq_readfrom(cq, buf, count, src_addr); + } + +-static ssize_t psmx2_cq_sread(struct fid_cq *cq, void *buf, size_t count, ++DIRECT_FN ++STATIC ssize_t psmx2_cq_sread(struct fid_cq *cq, void *buf, size_t count, + const void *cond, int timeout) + { + return psmx2_cq_sreadfrom(cq, buf, count, NULL, cond, timeout); + } + +-static int psmx2_cq_signal(struct fid_cq *cq) ++DIRECT_FN ++STATIC int psmx2_cq_signal(struct fid_cq *cq) + { + struct psmx2_fid_cq *cq_priv; + cq_priv = container_of(cq, struct psmx2_fid_cq, cq); +@@ -1159,7 +1790,8 @@ static int psmx2_cq_signal(struct fid_cq *cq) + return 0; + } + +-static const char *psmx2_cq_strerror(struct fid_cq *cq, int prov_errno, const void *prov_data, ++DIRECT_FN ++STATIC const char *psmx2_cq_strerror(struct fid_cq *cq, int prov_errno, const void *prov_data, + char *buf, size_t len) + { + return psm2_error_get_string(prov_errno); +@@ -1177,6 +1809,8 @@ static int psmx2_cq_close(fid_t fid) + while (!slist_empty(&cq->poll_list)) { + entry = slist_remove_head(&cq->poll_list); + poll_item = container_of(entry, struct psmx2_poll_ctxt, list_entry); ++ if (!ofi_atomic_dec32(&poll_item->trx_ctxt->poll_refcnt)) ++ free(poll_item->trx_ctxt); + free(poll_item); + } + +@@ -1241,6 +1875,7 @@ static struct fi_ops_cq psmx2_cq_ops = { + .strerror = psmx2_cq_strerror, + }; + ++DIRECT_FN + int psmx2_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq, void *context) + { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_domain.c +index 2f760c6..741e79d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_domain.c +@@ -203,7 +203,8 @@ static int psmx2_domain_close(fid_t fid) + return 0; + } + +-static int psmx2_domain_control(fid_t fid, int command, void *arg) ++DIRECT_FN ++STATIC int psmx2_domain_control(fid_t fid, int command, void *arg) + { + struct fi_mr_map_raw *map; + +@@ -292,6 +293,7 @@ err_out: + return err; + } + ++DIRECT_FN + int psmx2_domain_open(struct fid_fabric *fabric, struct fi_info *info, + struct fid_domain **domain, void *context) + { +@@ -299,7 +301,7 @@ int psmx2_domain_open(struct fid_fabric *fabric, struct fi_info *info, + struct psmx2_fid_domain *domain_priv; + struct psmx2_ep_name *src_addr = info->src_addr; + int mr_mode = (info->domain_attr->mr_mode & FI_MR_BASIC) ? FI_MR_BASIC : 0; +- int err; ++ int err, tmp; + + FI_INFO(&psmx2_prov, FI_LOG_DOMAIN, "\n"); + +@@ -337,6 +339,108 @@ int psmx2_domain_open(struct fid_fabric *fabric, struct fi_info *info, + if (info->addr_format == FI_ADDR_STR) + src_addr = psmx2_string_to_ep_name(info->src_addr); + ++ /* Use generic lock/unlock functions by default */ ++ domain_priv->av_lock_fn = psmx2_lock; ++ domain_priv->am_req_pool_lock_fn = psmx2_lock; ++ domain_priv->trx_ctxt_lock_fn = psmx2_lock; ++ domain_priv->rma_queue_lock_fn = psmx2_lock; ++ domain_priv->trigger_queue_lock_fn = psmx2_lock; ++ domain_priv->peer_lock_fn = psmx2_lock; ++ domain_priv->sep_lock_fn = psmx2_lock; ++ domain_priv->trigger_lock_fn = psmx2_lock; ++ domain_priv->cq_lock_fn = psmx2_lock; ++ domain_priv->mr_lock_fn = psmx2_lock; ++ domain_priv->context_lock_fn = psmx2_lock; ++ domain_priv->poll_trylock_fn = psmx2_trylock; ++ ++ domain_priv->av_unlock_fn = psmx2_unlock; ++ domain_priv->am_req_pool_unlock_fn = psmx2_unlock; ++ domain_priv->trx_ctxt_unlock_fn = psmx2_unlock; ++ domain_priv->rma_queue_unlock_fn = psmx2_unlock; ++ domain_priv->trigger_queue_unlock_fn = psmx2_unlock; ++ domain_priv->peer_unlock_fn = psmx2_unlock; ++ domain_priv->sep_unlock_fn = psmx2_unlock; ++ domain_priv->trigger_unlock_fn = psmx2_unlock; ++ domain_priv->cq_unlock_fn = psmx2_unlock; ++ domain_priv->mr_unlock_fn = psmx2_unlock; ++ domain_priv->context_unlock_fn = psmx2_unlock; ++ domain_priv->poll_unlock_fn = psmx2_unlock; ++ ++ /* If lock_level env is unset, then set locks based off threading model*/ ++ err = fi_param_get_bool(&psmx2_prov, "lock_level", &tmp); ++ if (err < 0) { ++ switch (info->domain_attr->threading) { ++ case FI_THREAD_DOMAIN: ++ /* Disable locks not required when serializing access to a domain */ ++ domain_priv->av_lock_fn = psmx2_lock_disabled; ++ domain_priv->trx_ctxt_lock_fn = psmx2_lock_disabled; ++ domain_priv->trigger_queue_lock_fn = psmx2_lock_disabled; ++ domain_priv->peer_lock_fn = psmx2_lock_disabled; ++ domain_priv->sep_lock_fn = psmx2_lock_disabled; ++ domain_priv->trigger_lock_fn = psmx2_lock_disabled; ++ domain_priv->cq_lock_fn = psmx2_lock_disabled; ++ domain_priv->mr_lock_fn = psmx2_lock_disabled; ++ domain_priv->context_lock_fn = psmx2_lock_disabled; ++ domain_priv->poll_trylock_fn = psmx2_trylock_disabled; ++ ++ domain_priv->av_unlock_fn = psmx2_lock_disabled; ++ domain_priv->trx_ctxt_unlock_fn = psmx2_lock_disabled; ++ domain_priv->trigger_queue_unlock_fn = psmx2_lock_disabled; ++ domain_priv->peer_unlock_fn = psmx2_lock_disabled; ++ domain_priv->sep_unlock_fn = psmx2_lock_disabled; ++ domain_priv->trigger_unlock_fn = psmx2_lock_disabled; ++ domain_priv->cq_unlock_fn = psmx2_lock_disabled; ++ domain_priv->mr_unlock_fn = psmx2_lock_disabled; ++ domain_priv->context_unlock_fn = psmx2_lock_disabled; ++ domain_priv->poll_unlock_fn = psmx2_lock_disabled; ++ ++ /* ++ * If FI_RMA or FI_ATOMIC caps are enabled, then locks are ++ * required for the CQ, am_req_poll, & rma_queue ++ * due to the PSM2 Recv thread. ++ * NOTE: am_req_poll & rma_queue are only used when FI_RMA ++ * and FI_ATOMIC capabilities are enabled. ++ */ ++ if ((info->caps & FI_RMA) || (info->caps & FI_ATOMIC)) { ++ domain_priv->cq_lock_fn = psmx2_lock_enabled; ++ domain_priv->am_req_pool_lock_fn = psmx2_lock_enabled; ++ domain_priv->rma_queue_lock_fn = psmx2_lock_enabled; ++ domain_priv->cq_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->am_req_pool_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->rma_queue_unlock_fn = psmx2_unlock_enabled; ++ } ++ break; ++ default: ++ /* Otherwise, enable all locks */ ++ domain_priv->av_lock_fn = psmx2_lock_enabled; ++ domain_priv->am_req_pool_lock_fn = psmx2_lock_enabled; ++ domain_priv->trx_ctxt_lock_fn = psmx2_lock_enabled; ++ domain_priv->rma_queue_lock_fn = psmx2_lock_enabled; ++ domain_priv->trigger_queue_lock_fn = psmx2_lock_enabled; ++ domain_priv->peer_lock_fn = psmx2_lock_enabled; ++ domain_priv->sep_lock_fn = psmx2_lock_enabled; ++ domain_priv->trigger_lock_fn = psmx2_lock_enabled; ++ domain_priv->cq_lock_fn = psmx2_lock_enabled; ++ domain_priv->mr_lock_fn = psmx2_lock_enabled; ++ domain_priv->context_lock_fn = psmx2_lock_enabled; ++ domain_priv->poll_trylock_fn = psmx2_trylock_enabled; ++ ++ domain_priv->av_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->am_req_pool_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->trx_ctxt_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->rma_queue_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->trigger_queue_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->peer_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->sep_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->trigger_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->cq_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->mr_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->context_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->poll_unlock_fn = psmx2_unlock_enabled; ++ break; ++ } ++ } ++ + err = psmx2_domain_init(domain_priv, src_addr); + if (info->addr_format == FI_ADDR_STR) + free(src_addr); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_ep.c +index 6141301..20d4c71 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_ep.c +@@ -32,6 +32,38 @@ + + #include "psmx2.h" + ++#define PSMX2_EP_SET_TAGGED_OPS(suffix, msg_suffix) \ ++ do { \ ++ if (!send_completion && !recv_completion) { \ ++ ep->ep.tagged = &psmx2_tagged_ops_no_event##suffix; \ ++ FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, \ ++ "tagged ops optimized for op_flags=0 " \ ++ "and event suppression " \ ++ msg_suffix \ ++ "\n"); \ ++ } else if (!send_completion) { \ ++ ep->ep.tagged = &psmx2_tagged_ops_no_send_event##suffix;\ ++ FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, \ ++ "tagged ops optimized for op_flags=0 " \ ++ "and send event suppression " \ ++ msg_suffix \ ++ "\n"); \ ++ } else if (!recv_completion) { \ ++ ep->ep.tagged = &psmx2_tagged_ops_no_recv_event##suffix;\ ++ FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, \ ++ "tagged ops optimized for op_flags=0 " \ ++ "and recv event suppression " \ ++ msg_suffix \ ++ "\n"); \ ++ } else { \ ++ ep->ep.tagged = &psmx2_tagged_ops_no_flag##suffix; \ ++ FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, \ ++ "tagged ops optimized for op_flags=0 " \ ++ msg_suffix \ ++ "\n"); \ ++ } \ ++ } while (0) ++ + static void psmx2_ep_optimize_ops(struct psmx2_fid_ep *ep) + { + int send_completion; +@@ -50,73 +82,23 @@ static void psmx2_ep_optimize_ops(struct psmx2_fid_ep *ep) + send_completion = !ep->send_selective_completion || ep->tx_flags & FI_COMPLETION; + recv_completion = !ep->recv_selective_completion || ep->rx_flags & FI_COMPLETION; + +- if (ep->caps & FI_DIRECTED_RECV) { +- if (!send_completion && !recv_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_event_av_table_directed; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_event_av_map_directed; +- FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, +- "tagged ops optimized for op_flags=0 and event suppression and directed receive\n"); +- } else if (!send_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_send_event_av_table_directed; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_send_event_av_map_directed; +- FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, +- "tagged ops optimized for op_flags=0 and send event suppression and directed receive\n"); +- } else if (!recv_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_av_table_directed; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_av_map_directed; +- FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, +- "tagged ops optimized for op_flags=0 and recv event suppression and directed receive\n"); +- } else { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_flag_av_table_directed; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_flag_av_map_directed; +- FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, +- "tagged ops optimized for op_flags=0 and directed receive\n"); +- } ++ if (ep->av && ep->av->type == FI_AV_MAP) { ++ if (ep->caps & FI_DIRECTED_RECV) ++ PSMX2_EP_SET_TAGGED_OPS(_directed_av_map, "and directed receive and av map"); ++ else ++ PSMX2_EP_SET_TAGGED_OPS(_undirected_av_map, "and av map"); + } else { +- if (!send_completion && !recv_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_event_av_table_undirected; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_event_av_map_undirected; +- FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, +- "tagged ops optimized for op_flags=0 and event suppression\n"); +- } else if (!send_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_send_event_av_table_undirected; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_send_event_av_map_undirected; +- FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, +- "tagged ops optimized for op_flags=0 and send event suppression\n"); +- } else if (!recv_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_av_table_undirected; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_av_map_undirected; +- FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, +- "tagged ops optimized for op_flags=0 and recv event suppression\n"); +- } else { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_flag_av_table_undirected; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_flag_av_map_undirected; +- FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, +- "tagged ops optimized for op_flags=0\n"); +- } ++ if (ep->caps & FI_DIRECTED_RECV) ++ PSMX2_EP_SET_TAGGED_OPS(_directed, "and directed receive"); ++ else ++ PSMX2_EP_SET_TAGGED_OPS(_undirected, ""); + } + } +- + } + } + +-static ssize_t psmx2_ep_cancel(fid_t fid, void *context) ++DIRECT_FN ++STATIC ssize_t psmx2_ep_cancel(fid_t fid, void *context) + { + struct psmx2_fid_ep *ep; + psm2_mq_status2_t status; +@@ -165,7 +147,8 @@ static ssize_t psmx2_ep_cancel(fid_t fid, void *context) + return psmx2_errno(err); + } + +-static int psmx2_ep_getopt(fid_t fid, int level, int optname, ++DIRECT_FN ++STATIC int psmx2_ep_getopt(fid_t fid, int level, int optname, + void *optval, size_t *optlen) + { + struct psmx2_fid_ep *ep; +@@ -188,7 +171,8 @@ static int psmx2_ep_getopt(fid_t fid, int level, int optname, + return 0; + } + +-static int psmx2_ep_setopt(fid_t fid, int level, int optname, ++DIRECT_FN ++STATIC int psmx2_ep_setopt(fid_t fid, int level, int optname, + const void *optval, size_t optlen) + { + struct psmx2_fid_ep *ep; +@@ -275,12 +259,14 @@ static int psmx2_add_poll_ctxt(struct slist *list, struct psmx2_trx_ctxt *trx_ct + if (!item) + return -FI_ENOMEM; + ++ ofi_atomic_inc32(&trx_ctxt->poll_refcnt); + item->trx_ctxt = trx_ctxt; + slist_insert_tail(&item->list_entry, list); + return 0; + } + +-static int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++DIRECT_FN ++STATIC int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct psmx2_fid_ep *ep; + struct psmx2_fid_av *av; +@@ -357,9 +343,9 @@ static int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + ep->av = av; + psmx2_ep_optimize_ops(ep); + if (ep->tx) +- psmx2_av_add_trx_ctxt(av, ep->tx, !psmx2_env.lazy_conn); ++ psmx2_av_add_trx_ctxt(av, ep->tx); + if (ep->rx && ep->rx != ep->tx) +- psmx2_av_add_trx_ctxt(av, ep->rx, !psmx2_env.lazy_conn); ++ psmx2_av_add_trx_ctxt(av, ep->rx); + break; + + case FI_CLASS_MR: +@@ -381,7 +367,11 @@ static int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + err = psmx2_domain_enable_ep(ep->domain, ep); + if (err) + return err; ++#if HAVE_PSM2_MQ_FP_MSG ++ if (ep->caps & FI_TRIGGER) ++#else + if (ep->caps & (FI_RMA | FI_TRIGGER)) ++#endif + stx->tx->am_progress = 1; + ofi_atomic_inc32(&stx->ref); + break; +@@ -425,7 +415,8 @@ static inline int psmx2_ep_get_flags(struct psmx2_fid_ep *ep, uint64_t *flags) + return 0; + } + +-static int psmx2_ep_control(fid_t fid, int command, void *arg) ++DIRECT_FN ++STATIC int psmx2_ep_control(fid_t fid, int command, void *arg) + { + struct fi_alias *alias; + struct psmx2_fid_ep *ep, *new_ep; +@@ -477,7 +468,8 @@ static int psmx2_ep_control(fid_t fid, int command, void *arg) + return 0; + } + +-static ssize_t psmx2_rx_size_left(struct fid_ep *ep) ++DIRECT_FN ++STATIC ssize_t psmx2_rx_size_left(struct fid_ep *ep) + { + struct psmx2_fid_ep *ep_priv; + +@@ -488,7 +480,8 @@ static ssize_t psmx2_rx_size_left(struct fid_ep *ep) + return -FI_EOPBADSTATE; + } + +-static ssize_t psmx2_tx_size_left(struct fid_ep *ep) ++DIRECT_FN ++STATIC ssize_t psmx2_tx_size_left(struct fid_ep *ep) + { + struct psmx2_fid_ep *ep_priv; + +@@ -604,8 +597,11 @@ int psmx2_ep_open_internal(struct psmx2_fid_domain *domain_priv, + psmx2_ep_optimize_ops(ep_priv); + + PSMX2_EP_INIT_OP_CONTEXT(ep_priv); +- ++#if HAVE_PSM2_MQ_FP_MSG ++ if ((ep_cap & FI_TRIGGER) && trx_ctxt) ++#else + if ((ep_cap & (FI_RMA | FI_TRIGGER)) && trx_ctxt) ++#endif + trx_ctxt->am_progress = 1; + + *ep_out = ep_priv; +@@ -618,6 +614,7 @@ errout: + return err; + } + ++DIRECT_FN + int psmx2_ep_open(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep, void *context) + { +@@ -741,6 +738,7 @@ static struct fi_ops_ep psmx2_stx_ops = { + .tx_size_left = fi_no_tx_size_left, + }; + ++DIRECT_FN + int psmx2_stx_ctx(struct fid_domain *domain, struct fi_tx_attr *attr, + struct fid_stx **stx, void *context) + { +@@ -819,9 +817,9 @@ static int psmx2_sep_close(fid_t fid) + psmx2_ep_close_internal(sep->ctxts[i].ep); + } + +- psmx2_lock(&sep->domain->sep_lock, 1); ++ sep->domain->sep_lock_fn(&sep->domain->sep_lock, 1); + dlist_remove(&sep->entry); +- psmx2_unlock(&sep->domain->sep_lock, 1); ++ sep->domain->sep_unlock_fn(&sep->domain->sep_lock, 1); + + psmx2_domain_release(sep->domain); + free(sep); +@@ -846,7 +844,8 @@ static int psmx2_sep_control(fid_t fid, int command, void *arg) + return 0; + } + +-static int psmx2_sep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++DIRECT_FN ++STATIC int psmx2_sep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct psmx2_fid_sep *sep; + int i, err = 0; +@@ -862,7 +861,8 @@ static int psmx2_sep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + return err; + } + +-static int psmx2_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *attr, ++DIRECT_FN ++STATIC int psmx2_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *attr, + struct fid_ep **tx_ep, void *context) + { + struct psmx2_fid_sep *sep; +@@ -875,7 +875,8 @@ static int psmx2_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *att + return 0; + } + +-static int psmx2_rx_context(struct fid_ep *ep, int index, struct fi_rx_attr *attr, ++DIRECT_FN ++STATIC int psmx2_rx_context(struct fid_ep *ep, int index, struct fi_rx_attr *attr, + struct fid_ep **rx_ep, void *context) + { + struct psmx2_fid_sep *sep; +@@ -927,6 +928,7 @@ static struct fi_ops_ep psmx2_sep_ops = { + .tx_size_left = fi_no_tx_size_left, + }; + ++DIRECT_FN + int psmx2_sep_open(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **sep, void *context) + { +@@ -1031,9 +1033,9 @@ int psmx2_sep_open(struct fid_domain *domain, struct fi_info *info, + + sep_priv->id = ofi_atomic_inc32(&domain_priv->sep_cnt); + +- psmx2_lock(&domain_priv->sep_lock, 1); ++ domain_priv->sep_lock_fn(&domain_priv->sep_lock, 1); + dlist_insert_before(&sep_priv->entry, &domain_priv->sep_list); +- psmx2_unlock(&domain_priv->sep_lock, 1); ++ domain_priv->sep_unlock_fn(&domain_priv->sep_lock, 1); + + ep_name.epid = sep_priv->ctxts[0].trx_ctxt->psm2_epid; + ep_name.sep_id = sep_priv->id; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_init.c +index 3fa705d..e5abdd4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_init.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2019 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -30,8 +30,8 @@ + * SOFTWARE. + */ + +-#include "psmx2.h" + #include "ofi_prov.h" ++#include "psmx2.h" + #include + #include + +@@ -45,6 +45,7 @@ struct psmx2_env psmx2_env = { + .uuid = PSMX2_DEFAULT_UUID, + .delay = 0, + .timeout = 5, ++ .conn_timeout = 5, + .prog_interval = -1, + .prog_affinity = NULL, + .multi_ep = 0, +@@ -70,7 +71,7 @@ int psmx2_tag_layout_locked = 0; + + static void psmx2_init_env(void) + { +- if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK")) ++ if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK") || getenv("PMIX_RANK")) + psmx2_env.name_server = 0; + + fi_param_get_bool(&psmx2_prov, "name_server", &psmx2_env.name_server); +@@ -78,6 +79,7 @@ static void psmx2_init_env(void) + fi_param_get_str(&psmx2_prov, "uuid", &psmx2_env.uuid); + fi_param_get_int(&psmx2_prov, "delay", &psmx2_env.delay); + fi_param_get_int(&psmx2_prov, "timeout", &psmx2_env.timeout); ++ fi_param_get_int(&psmx2_prov, "conn_timeout", &psmx2_env.conn_timeout); + fi_param_get_int(&psmx2_prov, "prog_interval", &psmx2_env.prog_interval); + fi_param_get_str(&psmx2_prov, "prog_affinity", &psmx2_env.prog_affinity); + fi_param_get_int(&psmx2_prov, "inject_size", &psmx2_env.inject_size); +@@ -188,6 +190,7 @@ static int psmx2_init_lib(void) + { + int major, minor; + int ret = 0, err; ++ glob_t glob_buf; + + if (psmx2_lib_initialized) + return 0; +@@ -197,6 +200,24 @@ static int psmx2_init_lib(void) + if (psmx2_lib_initialized) + goto out; + ++ /* ++ * psm2_init() may wait for 15 seconds before return ++ * when /dev/hfi[0-9]_0 is not present. Check the existence of any hfi ++ * device interface first to avoid this delay. Note that the devices ++ * don't necessarily appear consecutively so we need to check all ++ * possible device names before returning "no device found" error. ++ * This also means if "/dev/hfi[0-9]_0" doesn't exist but other devices ++ * exist, we are still going to see the delay; but that's a rare case. ++ */ ++ if ((glob("/dev/hfi[0-9]_[0-9]", 0, NULL, &glob_buf) != 0) && ++ (glob("/dev/hfi[0-9]_[0-9][0-9]", GLOB_APPEND, NULL, &glob_buf) != 0)) { ++ FI_INFO(&psmx2_prov, FI_LOG_CORE, ++ "no hfi device is found.\n"); ++ ret = -FI_ENODEV; ++ goto out; ++ } ++ globfree(&glob_buf); ++ + /* turn on multi-ep feature, but don't overwrite existing setting */ + setenv("PSM2_MULTI_EP", "1", 0); + +@@ -230,6 +251,7 @@ out: + return ret; + } + ++#if !HAVE_PSM2_INFO_QUERY + #define PSMX2_SYSFS_PATH "/sys/class/infiniband/hfi1" + static int psmx2_read_sysfs_int(int unit, char *entry) + { +@@ -252,6 +274,7 @@ static int psmx2_unit_active(int unit) + { + return (4 == psmx2_read_sysfs_int(unit, "ports/1/state")); + } ++#endif + + #define PSMX2_MAX_UNITS 4 + static int psmx2_active_units[PSMX2_MAX_UNITS]; +@@ -266,6 +289,13 @@ static void psmx2_update_hfi_info(void) + int multirail = 0; + char *s; + ++#if HAVE_PSM2_INFO_QUERY ++ int unit_active; ++ int ret; ++ int tmp_cnt; ++ psm2_info_query_arg_t args[1]; ++#endif ++ + assert(psmx2_env.num_devunits <= PSMX2_MAX_UNITS); + + s = getenv("HFI_UNIT"); +@@ -278,6 +308,50 @@ static void psmx2_update_hfi_info(void) + + psmx2_num_active_units = 0; + for (i = 0; i < psmx2_env.num_devunits; i++) { ++#if HAVE_PSM2_INFO_QUERY ++ args[0].unit = i; ++ ret = psm2_info_query(PSM2_INFO_QUERY_UNIT_STATUS, &unit_active, 1, args); ++ if (ret != PSM2_OK) { ++ FI_WARN(&psmx2_prov, FI_LOG_CORE, ++ "Failed to check active state of HFI unit %d\n", ++ i); ++ continue; ++ } ++ ++ if (!unit_active) { ++ FI_WARN(&psmx2_prov, FI_LOG_CORE, ++ "HFI unit %d STATE = INACTIVE\n", ++ i); ++ continue; ++ } ++ ++ if (hfi_unit >=0 && i != hfi_unit) { ++ FI_INFO(&psmx2_prov, FI_LOG_CORE, ++ "hfi %d skipped: HFI_UNIT=%d\n", ++ i, hfi_unit); ++ continue; ++ } ++ ++ if (PSM2_OK != psm2_info_query(PSM2_INFO_QUERY_NUM_FREE_CONTEXTS, ++ &tmp_cnt, 1, args) || (tmp_cnt < 0)) ++ { ++ FI_WARN(&psmx2_prov, FI_LOG_CORE, ++ "Failed to read number of free contexts from HFI unit %d\n", ++ i); ++ continue; ++ } ++ nfreectxts += tmp_cnt; ++ ++ if (PSM2_OK != psm2_info_query(PSM2_INFO_QUERY_NUM_CONTEXTS, ++ &tmp_cnt, 1, args) || (tmp_cnt < 0)) ++ { ++ FI_WARN(&psmx2_prov, FI_LOG_CORE, ++ "Failed to read number of contexts from HFI unit %d\n", ++ i); ++ continue; ++ } ++ nctxts += tmp_cnt; ++#else + if (!psmx2_unit_active(i)) { + FI_INFO(&psmx2_prov, FI_LOG_CORE, + "hfi %d skipped: inactive\n", i); +@@ -293,6 +367,7 @@ static void psmx2_update_hfi_info(void) + + nctxts += psmx2_read_sysfs_int(i, "nctxts"); + nfreectxts += psmx2_read_sysfs_int(i, "nfreectxts"); ++#endif + psmx2_active_units[psmx2_num_active_units++] = i; + + if (multirail) +@@ -335,7 +410,6 @@ static int psmx2_getinfo(uint32_t api_version, const char *node, + size_t len; + void *addr; + uint32_t fmt; +- glob_t glob_buf; + uint32_t cnt = 0; + + FI_INFO(&psmx2_prov, FI_LOG_CORE,"\n"); +@@ -346,24 +420,12 @@ static int psmx2_getinfo(uint32_t api_version, const char *node, + if (psmx2_init_lib()) + goto err_out; + +- /* +- * psm2_ep_num_devunits() may wait for 15 seconds before return +- * when /dev/hfi1_0 is not present. Check the existence of any hfi1 +- * device interface first to avoid this delay. Note that the devices +- * don't necessarily appear consecutively so we need to check all +- * possible device names before returning "no device found" error. +- * This also means if "/dev/hfi1_0" doesn't exist but other devices +- * exist, we are still going to see the delay; but that's a rare case. +- */ +- if ((glob("/dev/hfi1_[0-9]", 0, NULL, &glob_buf) != 0) && +- (glob("/dev/hfi1_[0-9][0-9]", GLOB_APPEND, NULL, &glob_buf) != 0)) { +- FI_INFO(&psmx2_prov, FI_LOG_CORE, +- "no hfi1 device is found.\n"); +- goto err_out; +- } +- globfree(&glob_buf); +- +- if (psm2_ep_num_devunits(&cnt) || !cnt) { ++#if HAVE_PSM2_INFO_QUERY ++ if (psm2_info_query(PSM2_INFO_QUERY_NUM_UNITS, &cnt, 0, NULL) || !cnt) ++#else ++ if (psm2_ep_num_devunits(&cnt) || !cnt) ++#endif ++ { + FI_INFO(&psmx2_prov, FI_LOG_CORE, + "no PSM2 device is found.\n"); + goto err_out; +@@ -496,7 +558,7 @@ static void psmx2_fini(void) + struct fi_provider psmx2_prov = { + .name = PSMX2_PROV_NAME, + .version = PSMX2_VERSION, +- .fi_version = PSMX2_VERSION, ++ .fi_version = FI_VERSION(1, 7), + .getinfo = psmx2_getinfo, + .fabric = psmx2_fabric, + .cleanup = psmx2_fini +@@ -506,8 +568,9 @@ PROVIDER_INI + { + FI_INFO(&psmx2_prov, FI_LOG_CORE, "build options: HAVE_PSM2_SRC=%d, " + "HAVE_PSM2_AM_REGISTER_HANDLERS_2=%d, " ++ "HAVE_PSM2_MQ_FP_MSG=%d, " + "PSMX2_USE_REQ_CONTEXT=%d\n", HAVE_PSM2_SRC, +- HAVE_PSM2_AM_REGISTER_HANDLERS_2, PSMX2_USE_REQ_CONTEXT); ++ HAVE_PSM2_AM_REGISTER_HANDLERS_2, HAVE_PSM2_MQ_FP_MSG, PSMX2_USE_REQ_CONTEXT); + + fi_param_define(&psmx2_prov, "name_server", FI_PARAM_BOOL, + "Whether to turn on the name server or not " +@@ -526,6 +589,9 @@ PROVIDER_INI + fi_param_define(&psmx2_prov, "timeout", FI_PARAM_INT, + "Timeout (seconds) for gracefully closing the PSM2 endpoint"); + ++ fi_param_define(&psmx2_prov, "conn_timeout", FI_PARAM_INT, ++ "Timeout (seconds) for establishing connection between two PSM2 endpoints"); ++ + fi_param_define(&psmx2_prov, "prog_interval", FI_PARAM_INT, + "Interval (microseconds) between progress calls made in the " + "progress thread (default: 1 if affinity is set, 1000 if not)"); +@@ -546,7 +612,7 @@ PROVIDER_INI + "How internal locking is used. 0 means no locking. (default: 2)."); + + fi_param_define(&psmx2_prov, "lazy_conn", FI_PARAM_BOOL, +- "Whether to use lazy connection or not (default: no)."); ++ "Whether to force lazy connection mode. (default: no)."); + + fi_param_define(&psmx2_prov, "disconnect", FI_PARAM_BOOL, + "Whether to issue disconnect request when process ends (default: no)."); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_mr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_mr.c +index 278b42e..750721a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_mr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_mr.c +@@ -38,14 +38,14 @@ struct psmx2_fid_mr *psmx2_mr_get(struct psmx2_fid_domain *domain, + RbtIterator it; + struct psmx2_fid_mr *mr = NULL; + +- psmx2_lock(&domain->mr_lock, 1); ++ domain->mr_lock_fn(&domain->mr_lock, 1); + it = rbtFind(domain->mr_map, (void *)key); + if (!it) + goto exit; + + rbtKeyValue(domain->mr_map, it, (void **)&key, (void **)&mr); + exit: +- psmx2_unlock(&domain->mr_lock, 1); ++ domain->mr_unlock_fn(&domain->mr_lock, 1); + return mr; + } + +@@ -54,11 +54,11 @@ static inline void psmx2_mr_release_key(struct psmx2_fid_domain *domain, + { + RbtIterator it; + +- psmx2_lock(&domain->mr_lock, 1); ++ domain->mr_lock_fn(&domain->mr_lock, 1); + it = rbtFind(domain->mr_map, (void *)key); + if (it) + rbtErase(domain->mr_map, it); +- psmx2_unlock(&domain->mr_lock, 1); ++ domain->mr_unlock_fn(&domain->mr_lock, 1); + } + + static int psmx2_mr_reserve_key(struct psmx2_fid_domain *domain, +@@ -71,7 +71,7 @@ static int psmx2_mr_reserve_key(struct psmx2_fid_domain *domain, + int try_count; + int err = -FI_ENOKEY; + +- psmx2_lock(&domain->mr_lock, 1); ++ domain->mr_lock_fn(&domain->mr_lock, 1); + + if (domain->mr_mode == FI_MR_BASIC) { + key = domain->mr_reserved_key; +@@ -93,7 +93,7 @@ static int psmx2_mr_reserve_key(struct psmx2_fid_domain *domain, + } + } + +- psmx2_unlock(&domain->mr_lock, 1); ++ domain->mr_unlock_fn(&domain->mr_lock, 1); + + return err; + } +@@ -132,7 +132,8 @@ static int psmx2_mr_close(fid_t fid) + return 0; + } + +-static int psmx2_mr_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++DIRECT_FN ++STATIC int psmx2_mr_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct psmx2_fid_mr *mr; + struct psmx2_fid_ep *ep; +@@ -170,7 +171,8 @@ static int psmx2_mr_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + return 0; + } + +-static int psmx2_mr_control(fid_t fid, int command, void *arg) ++DIRECT_FN ++STATIC int psmx2_mr_control(fid_t fid, int command, void *arg) + { + struct psmx2_fid_mr *mr; + struct fi_mr_raw_attr *attr; +@@ -272,7 +274,8 @@ static void psmx2_mr_normalize_iov(struct iovec *iov, size_t *count) + *count = i; + } + +-static int psmx2_mr_reg(struct fid *fid, const void *buf, size_t len, ++DIRECT_FN ++STATIC int psmx2_mr_reg(struct fid *fid, const void *buf, size_t len, + uint64_t access, uint64_t offset, uint64_t requested_key, + uint64_t flags, struct fid_mr **mr, void *context) + { +@@ -318,7 +321,8 @@ static int psmx2_mr_reg(struct fid *fid, const void *buf, size_t len, + return 0; + } + +-static int psmx2_mr_regv(struct fid *fid, ++DIRECT_FN ++STATIC int psmx2_mr_regv(struct fid *fid, + const struct iovec *iov, size_t count, + uint64_t access, uint64_t offset, + uint64_t requested_key, uint64_t flags, +@@ -372,7 +376,8 @@ static int psmx2_mr_regv(struct fid *fid, + return 0; + } + +-static int psmx2_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, ++DIRECT_FN ++STATIC int psmx2_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, + uint64_t flags, struct fid_mr **mr) + { + struct fid_domain *domain; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_msg.c +index 4e33837..52ae718 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_msg.c +@@ -44,7 +44,6 @@ ssize_t psmx2_recv_generic(struct fid_ep *ep, void *buf, size_t len, + psm2_mq_tag_t psm2_tag, psm2_tagsel; + struct fi_context *fi_context; + int recv_flag = 0; +- size_t idx; + int err; + int enable_completion; + +@@ -56,17 +55,8 @@ ssize_t psmx2_recv_generic(struct fid_ep *ep, void *buf, size_t len, + + if ((ep_priv->caps & FI_DIRECTED_RECV) && src_addr != FI_ADDR_UNSPEC) { + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->rx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->rx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr, av->type); + } else { + psm2_epaddr = 0; + } +@@ -136,7 +126,8 @@ ssize_t psmx2_recv_generic(struct fid_ep *ep, void *buf, size_t len, + return 0; + } + +-static ssize_t psmx2_recv(struct fid_ep *ep, void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_recv(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, void *context) + { + struct psmx2_fid_ep *ep_priv; +@@ -147,7 +138,8 @@ static ssize_t psmx2_recv(struct fid_ep *ep, void *buf, size_t len, + ep_priv->rx_flags); + } + +-static ssize_t psmx2_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, ++DIRECT_FN ++STATIC ssize_t psmx2_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, + uint64_t flags) + { + void *buf; +@@ -170,7 +162,8 @@ static ssize_t psmx2_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, + msg->addr, msg->context, flags); + } + +-static ssize_t psmx2_recvv(struct fid_ep *ep, const struct iovec *iov, ++DIRECT_FN ++STATIC ssize_t psmx2_recvv(struct fid_ep *ep, const struct iovec *iov, + void **desc, size_t count, fi_addr_t src_addr, + void *context) + { +@@ -204,7 +197,6 @@ ssize_t psmx2_send_generic(struct fid_ep *ep, const void *buf, size_t len, + struct fi_context * fi_context; + int send_flag = 0; + int err; +- size_t idx; + int no_completion = 0; + struct psmx2_cq_event *event; + int have_data = (flags & FI_REMOTE_CQ_DATA) > 0; +@@ -216,17 +208,8 @@ ssize_t psmx2_send_generic(struct fid_ep *ep, const void *buf, size_t len, + context, flags, data); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); + + PSMX2_SET_TAG(psm2_tag, 0, data, PSMX2_TYPE_MSG | PSMX2_IMM_BIT_SET(have_data)); + +@@ -301,7 +284,6 @@ ssize_t psmx2_sendv_generic(struct fid_ep *ep, const struct iovec *iov, + struct fi_context * fi_context; + int send_flag = 0; + int err; +- size_t idx; + int no_completion = 0; + struct psmx2_cq_event *event; + size_t real_count; +@@ -337,8 +319,6 @@ ssize_t psmx2_sendv_generic(struct fid_ep *ep, const struct iovec *iov, + if (!req) + return -FI_ENOMEM; + +- PSMX2_STATUS_INIT(req->status); +- + if (total_len <= PSMX2_IOV_BUF_SIZE) { + req->iov_protocol = PSMX2_IOV_PROTO_PACK; + p = req->buf; +@@ -370,19 +350,8 @@ ssize_t psmx2_sendv_generic(struct fid_ep *ep, const struct iovec *iov, + } + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) { +- free(req); +- return err; +- } +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); + + if (flags & FI_REMOTE_CQ_DATA) + msg_flags |= PSMX2_IMM_BIT; +@@ -564,7 +533,8 @@ int psmx2_handle_sendv_req(struct psmx2_fid_ep *ep, + return 0; + } + +-static ssize_t psmx2_send(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_send(struct fid_ep *ep, const void *buf, size_t len, + void *desc, fi_addr_t dest_addr, void *context) + { + struct psmx2_fid_ep *ep_priv; +@@ -575,7 +545,8 @@ static ssize_t psmx2_send(struct fid_ep *ep, const void *buf, size_t len, + ep_priv->tx_flags, 0); + } + +-static ssize_t psmx2_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, ++DIRECT_FN ++STATIC ssize_t psmx2_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, + uint64_t flags) + { + void *buf; +@@ -604,7 +575,8 @@ static ssize_t psmx2_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, + msg->data); + } + +-static ssize_t psmx2_sendv(struct fid_ep *ep, const struct iovec *iov, ++DIRECT_FN ++STATIC ssize_t psmx2_sendv(struct fid_ep *ep, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + void *context) + { +@@ -632,7 +604,8 @@ static ssize_t psmx2_sendv(struct fid_ep *ep, const struct iovec *iov, + dest_addr, context); + } + +-static ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, + fi_addr_t dest_addr) + { + struct psmx2_fid_ep *ep_priv; +@@ -644,7 +617,8 @@ static ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, + 0); + } + +-static ssize_t psmx2_senddata(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_senddata(struct fid_ep *ep, const void *buf, size_t len, + void *desc, uint64_t data, fi_addr_t dest_addr, + void *context) + { +@@ -656,7 +630,8 @@ static ssize_t psmx2_senddata(struct fid_ep *ep, const void *buf, size_t len, + ep_priv->tx_flags | FI_REMOTE_CQ_DATA, data); + } + +-static ssize_t psmx2_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_injectdata(struct fid_ep *ep, const void *buf, size_t len, + uint64_t data, fi_addr_t dest_addr) + { + struct psmx2_fid_ep *ep_priv; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_rma.c +index 0e80fcd..eec369a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_rma.c +@@ -33,13 +33,15 @@ + #include "psmx2.h" + #include "psmx2_trigger.h" + ++#if !HAVE_PSM2_MQ_FP_MSG + static inline void psmx2_am_enqueue_rma(struct psmx2_trx_ctxt *trx_ctxt, + struct psmx2_am_request *req) + { +- psmx2_lock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_lock_fn(&trx_ctxt->rma_queue.lock, 2); + slist_insert_tail(&req->list_entry, &trx_ctxt->rma_queue.list); +- psmx2_unlock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_unlock_fn(&trx_ctxt->rma_queue.lock, 2); + } ++#endif + + static inline void psmx2_iov_copy(struct iovec *iov, size_t count, + size_t offset, const void *src, +@@ -116,6 +118,11 @@ int psmx2_am_rma_handler(psm2_am_token_t token, psm2_amarg_t *args, + psm2_epaddr_t epaddr; + struct psmx2_trx_ctxt *rx; + ++#if HAVE_PSM2_MQ_FP_MSG ++ psm2_mq_req_t psm2_req; ++ psm2_mq_tag_t psm2_tag, psm2_tagsel; ++#endif ++ + psm2_am_get_source(token, &epaddr); + cmd = PSMX2_AM_GET_OP(args[0].u32w0); + eom = args[0].u32w0 & PSMX2_AM_EOM; +@@ -210,7 +217,28 @@ int psmx2_am_rma_handler(psm2_am_token_t token, psm2_amarg_t *args, + (has_data ? FI_REMOTE_CQ_DATA : 0), + PSMX2_CTXT_TYPE(&req->fi_context) = PSMX2_REMOTE_WRITE_CONTEXT; + PSMX2_CTXT_USER(&req->fi_context) = mr; ++#if HAVE_PSM2_MQ_FP_MSG ++ PSMX2_SET_TAG(psm2_tag, (uint64_t)req->write.context, 0, ++ PSMX2_RMA_TYPE_WRITE); ++ PSMX2_SET_MASK(psm2_tagsel, PSMX2_MATCH_ALL, PSMX2_RMA_TYPE_MASK); ++ op_error = psm2_mq_fp_msg(rx->psm2_ep, rx->psm2_mq, ++ (psm2_epaddr_t)epaddr, ++ &psm2_tag, &psm2_tagsel, 0, ++ (void *)rma_addr, rma_len, ++ (void *)&req->fi_context, PSM2_MQ_IRECV_FP, &psm2_req); ++ if (op_error) { ++ rep_args[0].u32w0 = PSMX2_AM_REP_WRITE | eom; ++ rep_args[0].u32w1 = op_error; ++ rep_args[1].u64 = args[1].u64; ++ err = psm2_am_reply_short(token, PSMX2_AM_RMA_HANDLER, ++ rep_args, 2, NULL, 0, 0, ++ NULL, NULL ); ++ psmx2_am_request_free(rx, req); ++ break; ++ } ++#else + psmx2_am_enqueue_rma(rx, req); ++#endif + } + break; + +@@ -282,7 +310,28 @@ int psmx2_am_rma_handler(psm2_am_token_t token, psm2_amarg_t *args, + req->read.peer_addr = (void *)epaddr; + PSMX2_CTXT_TYPE(&req->fi_context) = PSMX2_REMOTE_READ_CONTEXT; + PSMX2_CTXT_USER(&req->fi_context) = mr; ++#if HAVE_PSM2_MQ_FP_MSG ++ PSMX2_SET_TAG(psm2_tag, (uint64_t)req->read.context, 0, ++ PSMX2_RMA_TYPE_READ); ++ op_error = psm2_mq_fp_msg(rx->psm2_ep, rx->psm2_mq, ++ (psm2_epaddr_t)req->read.peer_addr, ++ &psm2_tag, 0, 0, ++ (void *)req->read.addr, req->read.len, ++ (void *)&req->fi_context, PSM2_MQ_ISEND_FP, &psm2_req); ++ if (op_error) { ++ rep_args[0].u32w0 = PSMX2_AM_REP_READ | eom; ++ rep_args[0].u32w1 = op_error; ++ rep_args[1].u64 = args[1].u64; ++ rep_args[2].u64 = 0; ++ err = psm2_am_reply_short(token, PSMX2_AM_RMA_HANDLER, ++ rep_args, 3, NULL, 0, 0, ++ NULL, NULL ); ++ psmx2_am_request_free(rx, req); ++ break; ++ } ++#else + psmx2_am_enqueue_rma(rx, req); ++#endif + } + break; + +@@ -541,6 +590,7 @@ void psmx2_am_ack_rma(struct psmx2_am_request *req) + PSM2_AM_FLAG_NOREPLY, NULL, NULL); + } + ++#if !HAVE_PSM2_MQ_FP_MSG + int psmx2_am_process_rma(struct psmx2_trx_ctxt *trx_ctxt, + struct psmx2_am_request *req) + { +@@ -569,6 +619,7 @@ int psmx2_am_process_rma(struct psmx2_trx_ctxt *trx_ctxt, + + return psmx2_errno(err); + } ++#endif + + ssize_t psmx2_read_generic(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, +@@ -577,16 +628,14 @@ ssize_t psmx2_read_generic(struct fid_ep *ep, void *buf, size_t len, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + int chunk_size; + size_t offset = 0; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag, psm2_tagsel; +- size_t idx; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -597,21 +646,12 @@ ssize_t psmx2_read_generic(struct fid_ep *ep, void *buf, size_t len, + assert(buf); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(src_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, src_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) ++ if (psm2_epid == ep_priv->tx->psm2_epid) + return psmx2_rma_self(PSMX2_AM_REQ_READ, ep_priv, + buf, len, desc, addr, key, + context, flags, 0); +@@ -691,19 +731,17 @@ ssize_t psmx2_readv_generic(struct fid_ep *ep, const struct iovec *iov, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + int chunk_size; + size_t offset = 0; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag, psm2_tagsel; +- size_t idx; + size_t total_len, long_len = 0, short_len; + void *long_buf = NULL; + int i; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -712,21 +750,12 @@ ssize_t psmx2_readv_generic(struct fid_ep *ep, const struct iovec *iov, + addr, key, context, flags); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(src_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, src_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) ++ if (psm2_epid == ep_priv->tx->psm2_epid) + return psmx2_rma_self(PSMX2_AM_REQ_READV, ep_priv, + (void *)iov, count, desc, addr, + key, context, flags, 0); +@@ -829,7 +858,8 @@ ssize_t psmx2_readv_generic(struct fid_ep *ep, const struct iovec *iov, + return 0; + } + +-static ssize_t psmx2_read(struct fid_ep *ep, void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_read(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, + uint64_t addr, uint64_t key, void *context) + { +@@ -841,7 +871,8 @@ static ssize_t psmx2_read(struct fid_ep *ep, void *buf, size_t len, + key, context, ep_priv->tx_flags); + } + +-static ssize_t psmx2_readmsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_readmsg(struct fid_ep *ep, + const struct fi_msg_rma *msg, + uint64_t flags) + { +@@ -867,7 +898,8 @@ static ssize_t psmx2_readmsg(struct fid_ep *ep, + flags); + } + +-static ssize_t psmx2_readv(struct fid_ep *ep, const struct iovec *iov, ++DIRECT_FN ++STATIC ssize_t psmx2_readv(struct fid_ep *ep, const struct iovec *iov, + void **desc, size_t count, fi_addr_t src_addr, + uint64_t addr, uint64_t key, void *context) + { +@@ -894,19 +926,17 @@ ssize_t psmx2_write_generic(struct fid_ep *ep, const void *buf, size_t len, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + int nargs; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag; +- size_t idx; + void *psm2_context; + int no_event; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -918,21 +948,12 @@ ssize_t psmx2_write_generic(struct fid_ep *ep, const void *buf, size_t len, + assert(buf); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); ++ ++ if (psm2_epid == ep_priv->tx->psm2_epid) + return psmx2_rma_self(PSMX2_AM_REQ_WRITE, ep_priv, + (void *)buf, len, desc, addr, + key, context, flags, data); +@@ -1051,22 +1072,20 @@ ssize_t psmx2_writev_generic(struct fid_ep *ep, const struct iovec *iov, + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; +- struct psmx2_epaddr_context *epaddr_context; + struct psmx2_am_request *req; + psm2_amarg_t args[8]; + int nargs; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size; + psm2_epaddr_t psm2_epaddr; ++ psm2_epid_t psm2_epid; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag; +- size_t idx; + void *psm2_context; + int no_event; + size_t total_len, len, len_sent; + uint8_t *buf, *p; + int i; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -1076,21 +1095,12 @@ ssize_t psmx2_writev_generic(struct fid_ep *ep, const struct iovec *iov, + context, flags, data); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); ++ psm2_epaddr_to_epid(psm2_epaddr, &psm2_epid); + +- epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); +- if (epaddr_context->epid == ep_priv->tx->psm2_epid) ++ if (psm2_epid == ep_priv->tx->psm2_epid) + return psmx2_rma_self(PSMX2_AM_REQ_WRITEV, ep_priv, + (void *)iov, count, desc, addr, + key, context, flags, data); +@@ -1265,7 +1275,8 @@ ssize_t psmx2_writev_generic(struct fid_ep *ep, const struct iovec *iov, + return 0; + } + +-static ssize_t psmx2_write(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_write(struct fid_ep *ep, const void *buf, size_t len, + void *desc, fi_addr_t dest_addr, uint64_t addr, + uint64_t key, void *context) + { +@@ -1277,7 +1288,8 @@ static ssize_t psmx2_write(struct fid_ep *ep, const void *buf, size_t len, + key, context, ep_priv->tx_flags, 0); + } + +-static ssize_t psmx2_writemsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_writemsg(struct fid_ep *ep, + const struct fi_msg_rma *msg, + uint64_t flags) + { +@@ -1301,7 +1313,8 @@ static ssize_t psmx2_writemsg(struct fid_ep *ep, + msg->context, flags, msg->data); + } + +-static ssize_t psmx2_writev(struct fid_ep *ep, const struct iovec *iov, ++DIRECT_FN ++STATIC ssize_t psmx2_writev(struct fid_ep *ep, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + uint64_t addr, uint64_t key, void *context) + { +@@ -1321,8 +1334,9 @@ static ssize_t psmx2_writev(struct fid_ep *ep, const struct iovec *iov, + context, ep_priv->tx_flags, 0); + } + +-static ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++DIRECT_FN ++STATIC ssize_t psmx2_inject_write(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) + { + struct psmx2_fid_ep *ep_priv; + +@@ -1333,7 +1347,8 @@ static ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, + 0); + } + +-static ssize_t psmx2_writedata(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_writedata(struct fid_ep *ep, const void *buf, size_t len, + void *desc, uint64_t data, fi_addr_t dest_addr, + uint64_t addr, uint64_t key, void *context) + { +@@ -1346,9 +1361,10 @@ static ssize_t psmx2_writedata(struct fid_ep *ep, const void *buf, size_t len, + data); + } + +-static ssize_t psmx2_injectdata(struct fid_ep *ep, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) ++DIRECT_FN ++STATIC ssize_t psmx2_inject_writedata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) + { + struct psmx2_fid_ep *ep_priv; + +@@ -1367,8 +1383,8 @@ struct fi_ops_rma psmx2_rma_ops = { + .write = psmx2_write, + .writev = psmx2_writev, + .writemsg = psmx2_writemsg, +- .inject = psmx2_inject, ++ .inject = psmx2_inject_write, + .writedata = psmx2_writedata, +- .injectdata = psmx2_injectdata, ++ .injectdata = psmx2_inject_writedata, + }; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_tagged.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_tagged.c +index ded4ddb..4c16773 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_tagged.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_tagged.c +@@ -46,7 +46,6 @@ static ssize_t psmx2_tagged_peek_generic(struct fid_ep *ep, + psm2_mq_req_t req; + psm2_mq_status2_t psm2_status; + psm2_mq_tag_t psm2_tag, psm2_tagsel; +- size_t idx; + uint64_t data; + int err; + +@@ -54,17 +53,8 @@ static ssize_t psmx2_tagged_peek_generic(struct fid_ep *ep, + + if ((ep_priv->caps & FI_DIRECTED_RECV) && src_addr != FI_ADDR_UNSPEC) { + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->rx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->rx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr, av->type); + } else { + psm2_epaddr = 0; + } +@@ -115,7 +105,7 @@ static ssize_t psmx2_tagged_peek_generic(struct fid_ep *ep, + return -FI_ENOMEM; + + event->source_is_valid = 1; +- event->source = PSMX2_EP_TO_ADDR(psm2_status.msg_peer); ++ event->source = psm2_status.msg_peer; + event->source_av = ep_priv->av; + psmx2_cq_enqueue_event(ep_priv->recv_cq, event); + } +@@ -159,7 +149,6 @@ ssize_t psmx2_tagged_recv_generic(struct fid_ep *ep, void *buf, + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag, psm2_tagsel; + struct fi_context *fi_context; +- size_t idx; + int err; + int enable_completion; + +@@ -208,7 +197,7 @@ ssize_t psmx2_tagged_recv_generic(struct fid_ep *ep, void *buf, + return -FI_ENOMEM; + + event->source_is_valid = 1; +- event->source = PSMX2_EP_TO_ADDR(psm2_status.msg_peer); ++ event->source = psm2_status.msg_peer; + event->source_av = ep_priv->av; + psmx2_cq_enqueue_event(ep_priv->recv_cq, event); + } +@@ -255,17 +244,8 @@ ssize_t psmx2_tagged_recv_generic(struct fid_ep *ep, void *buf, + + if ((ep_priv->caps & FI_DIRECTED_RECV) && src_addr != FI_ADDR_UNSPEC) { + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->rx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->rx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr, av->type); + } else { + psm2_epaddr = 0; + } +@@ -302,16 +282,14 @@ psmx2_tagged_recv_specialized(struct fid_ep *ep, void *buf, size_t len, + uint64_t tag, uint64_t ignore, + void *context, + int enable_completion, +- enum fi_av_type av_type, +- int directed_receive) ++ int directed_receive, ++ int av_map) + { + struct psmx2_fid_ep *ep_priv; +- struct psmx2_fid_av *av; + psm2_epaddr_t psm2_epaddr; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag, psm2_tagsel; + struct fi_context *fi_context; +- size_t idx; + int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); +@@ -333,24 +311,11 @@ psmx2_tagged_recv_specialized(struct fid_ep *ep, void *buf, size_t len, + } + + if (directed_receive && src_addr != FI_ADDR_UNSPEC) { +- av = ep_priv->av; +- if (av_type == FI_AV_MAP) { +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } +- } else { /* FI_AV_TABLE */ +- assert(av != NULL); +- if (PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else { +- idx = (size_t)src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->rx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->rx->id].epaddrs[idx]; +- } ++ if (av_map) { ++ psm2_epaddr = (psm2_epaddr_t)src_addr; ++ } else { ++ assert(ep_priv->av); ++ psm2_epaddr = psmx2_av_translate_addr(ep_priv->av, ep_priv->rx, src_addr, FI_AV_TABLE); + } + } else { + psm2_epaddr = 0; +@@ -381,95 +346,93 @@ psmx2_tagged_recv_specialized(struct fid_ep *ep, void *buf, size_t len, + return 0; + } + +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_MAP, FI_DIRECTED_RECEIVE not set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE not set, av table */ + static ssize_t +-psmx2_tagged_recv_no_flag_av_map_undirected(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) +-{ +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 1, FI_AV_MAP, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_TABLE, FI_DIRECTED_RECEIVE not set */ +-static ssize_t +-psmx2_tagged_recv_no_flag_av_table_undirected(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_flag_undirected(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 1, FI_AV_TABLE, 0); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 1, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_MAP, FI_DIRECTED_RECEIVE not set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE not set, av table */ + static ssize_t +-psmx2_tagged_recv_no_event_av_map_undirected(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_event_undirected(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 0, FI_AV_MAP, 0); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 0, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_TABLE, FI_DIRECTED_RECEIVE not set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE set, av_table */ + static ssize_t +-psmx2_tagged_recv_no_event_av_table_undirected(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_flag_directed(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 0, FI_AV_TABLE, 0); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 1, 1, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_MAP, FI_DIRECTED_RECEIVE set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE set, av table */ + static ssize_t +-psmx2_tagged_recv_no_flag_av_map_directed(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_event_directed(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 1, FI_AV_MAP, 1); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 0, 1, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_TABLE, FI_DIRECTED_RECEIVE set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE not set, av map */ + static ssize_t +-psmx2_tagged_recv_no_flag_av_table_directed(struct fid_ep *ep, void *buf, size_t len, ++psmx2_tagged_recv_no_flag_undirected_av_map(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, + uint64_t tag, uint64_t ignore, + void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 1, FI_AV_TABLE, 1); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 1, 0, 1); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_MAP, FI_DIRECTED_RECEIVE set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE not set, av map */ + static ssize_t +-psmx2_tagged_recv_no_event_av_map_directed(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_event_undirected_av_map(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 0, FI_AV_MAP, 1); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 0, 0, 1); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_TABLE, FI_DIRECTED_RECEIVE set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE set, av_map */ + static ssize_t +-psmx2_tagged_recv_no_event_av_table_directed(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_flag_directed_av_map(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 0, FI_AV_TABLE, 1); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 1, 1, 1); + } + ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE set, av map */ ++static ssize_t ++psmx2_tagged_recv_no_event_directed_av_map(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) ++{ ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 0, 1, 1); ++} + + static ssize_t psmx2_tagged_recv(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, uint64_t tag, +@@ -533,16 +496,14 @@ psmx2_tagged_recvv##suffix(struct fid_ep *ep, const struct iovec *iov, \ + } + + PSMX2_TAGGED_RECVV_FUNC() +-PSMX2_TAGGED_RECVV_FUNC(_no_flag_av_map_directed) +-PSMX2_TAGGED_RECVV_FUNC(_no_flag_av_table_directed) +-PSMX2_TAGGED_RECVV_FUNC(_no_event_av_map_directed) +-PSMX2_TAGGED_RECVV_FUNC(_no_event_av_table_directed) +-PSMX2_TAGGED_RECVV_FUNC(_no_flag_av_map_undirected) +-PSMX2_TAGGED_RECVV_FUNC(_no_flag_av_table_undirected) +-PSMX2_TAGGED_RECVV_FUNC(_no_event_av_map_undirected) +-PSMX2_TAGGED_RECVV_FUNC(_no_event_av_table_undirected) +- +- ++PSMX2_TAGGED_RECVV_FUNC(_no_flag_directed) ++PSMX2_TAGGED_RECVV_FUNC(_no_event_directed) ++PSMX2_TAGGED_RECVV_FUNC(_no_flag_undirected) ++PSMX2_TAGGED_RECVV_FUNC(_no_event_undirected) ++PSMX2_TAGGED_RECVV_FUNC(_no_flag_directed_av_map) ++PSMX2_TAGGED_RECVV_FUNC(_no_event_directed_av_map) ++PSMX2_TAGGED_RECVV_FUNC(_no_flag_undirected_av_map) ++PSMX2_TAGGED_RECVV_FUNC(_no_event_undirected_av_map) + + ssize_t psmx2_tagged_send_generic(struct fid_ep *ep, + const void *buf, size_t len, +@@ -556,7 +517,6 @@ ssize_t psmx2_tagged_send_generic(struct fid_ep *ep, + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag; + struct fi_context *fi_context; +- size_t idx; + int err; + int no_completion = 0; + struct psmx2_cq_event *event; +@@ -572,17 +532,8 @@ ssize_t psmx2_tagged_send_generic(struct fid_ep *ep, + flags, data); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); + + PSMX2_SET_TAG(psm2_tag, tag, (uint32_t)data, + PSMX2_TYPE_TAGGED | PSMX2_IMM_BIT_SET(have_data)); +@@ -650,39 +601,25 @@ psmx2_tagged_send_specialized(struct fid_ep *ep, const void *buf, + size_t len, void *desc, + fi_addr_t dest_addr, uint64_t tag, + void *context, +- int enable_completion, +- enum fi_av_type av_type, ++ int enable_completion, int av_map, + int has_data, uint64_t data) + { + struct psmx2_fid_ep *ep_priv; +- struct psmx2_fid_av *av; + psm2_epaddr_t psm2_epaddr; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag; + struct fi_context *fi_context; +- size_t idx; + int err; + + assert((tag & ~PSMX2_TAG_MASK) == 0); + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); +- av = ep_priv->av; +- +- if (av_type == FI_AV_MAP) { +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- else +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } else { /* FI_AV_TABLE */ +- if (PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; + +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } ++ if (av_map) { ++ psm2_epaddr = (psm2_epaddr_t)dest_addr; ++ } else { ++ assert(ep_priv->av); ++ psm2_epaddr = psmx2_av_translate_addr(ep_priv->av, ep_priv->tx, dest_addr, FI_AV_TABLE); + } + + if (has_data) +@@ -712,107 +649,96 @@ psmx2_tagged_send_specialized(struct fid_ep *ep, const void *buf, + return 0; + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_MAP */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, av_table */ + static ssize_t +-psmx2_tagged_send_no_flag_av_map(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_send_no_flag(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, ++ void *context) + { +- return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, +- tag, context, 1, FI_AV_MAP, 0, 0); ++ return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, ++ context, 1, 0, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_TABLE */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, av_table */ + static ssize_t +-psmx2_tagged_send_no_flag_av_table(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_send_no_event(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, ++ void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 1, FI_AV_TABLE, 0, 0); ++ context, 0, 0, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_MAP */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, av_map */ + static ssize_t +-psmx2_tagged_send_no_event_av_map(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_send_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, ++ void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 0, FI_AV_MAP, 0, 0); ++ context, 1, 1, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_TABLE */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, av_map */ + static ssize_t +-psmx2_tagged_send_no_event_av_table(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_send_no_event_av_map(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, ++ void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 0, FI_AV_TABLE, 0, 0); ++ context, 0, 1, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_MAP */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, av_table */ + static ssize_t +-psmx2_tagged_senddata_no_flag_av_map(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_senddata_no_flag(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 1, FI_AV_MAP, 1, data); ++ context, 1, 0, 1, data); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_TABLE */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, av_table */ + static ssize_t +-psmx2_tagged_senddata_no_flag_av_table(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_senddata_no_event(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 1, FI_AV_TABLE, 1, data); ++ context, 0, 0, 1, data); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_MAP */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, av_map */ + static ssize_t +-psmx2_tagged_senddata_no_event_av_map(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_senddata_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 0, FI_AV_MAP, 1, data); ++ context, 1, 1, 1, data); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_TABLE */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, av_map */ + static ssize_t +-psmx2_tagged_senddata_no_event_av_table(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_senddata_no_event_av_map(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 0, FI_AV_TABLE, 1, data); ++ context, 0, 1, 1, data); + } + +-/* op_flags=0, FI_AV_MAP */ + __attribute__((always_inline)) + static inline ssize_t + psmx2_tagged_inject_specialized(struct fid_ep *ep, const void *buf, + size_t len, fi_addr_t dest_addr, +- uint64_t tag, enum fi_av_type av_type, ++ uint64_t tag, int av_map, + int has_data, uint64_t data) + { + struct psmx2_fid_ep *ep_priv; +- struct psmx2_fid_av *av; + psm2_epaddr_t psm2_epaddr; + psm2_mq_tag_t psm2_tag; +- size_t idx; + int err; + + assert((tag & ~PSMX2_TAG_MASK) == 0); +@@ -822,23 +748,11 @@ psmx2_tagged_inject_specialized(struct fid_ep *ep, const void *buf, + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +- av = ep_priv->av; +- +- if (av_type == FI_AV_MAP) { +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- else +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } else { /* FI_AV_TABLE */ +- if (PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } ++ if (av_map) { ++ psm2_epaddr = (psm2_epaddr_t)dest_addr; ++ } else { ++ assert(ep_priv->av); ++ psm2_epaddr = psmx2_av_translate_addr(ep_priv->av, ep_priv->tx, dest_addr, FI_AV_TABLE); + } + + if (has_data) +@@ -858,44 +772,40 @@ psmx2_tagged_inject_specialized(struct fid_ep *ep, const void *buf, + return 0; + } + +-/* op_flags=0, FI_AV_MAP */ ++/* op_flags=0, av_table */ + static ssize_t +-psmx2_tagged_inject_no_flag_av_map(struct fid_ep *ep, const void *buf, +- size_t len, fi_addr_t dest_addr, +- uint64_t tag) ++psmx2_tagged_inject_no_flag(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) + { + return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, +- FI_AV_MAP, 0, 0); ++ 0, 0, 0); + } + +-/* op_flags=0, FI_AV_TABLE */ ++/* op_flags=0, av_map */ + static ssize_t +-psmx2_tagged_inject_no_flag_av_table(struct fid_ep *ep, const void *buf, +- size_t len, fi_addr_t dest_addr, +- uint64_t tag) ++psmx2_tagged_inject_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) + { + return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, +- FI_AV_TABLE, 0, 0); ++ 1, 0, 0); + } + +-/* op_flags=0, FI_AV_MAP */ ++/* op_flags=0, av_table */ + static ssize_t +-psmx2_tagged_injectdata_no_flag_av_map(struct fid_ep *ep, const void *buf, +- size_t len, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag) ++psmx2_tagged_injectdata_no_flag(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) + { + return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, +- FI_AV_MAP, 1, data); ++ 0, 1, data); + } + +-/* op_flags=0, FI_AV_TABLE */ ++/* op_flags=0, av_map */ + static ssize_t +-psmx2_tagged_injectdata_no_flag_av_table(struct fid_ep *ep, const void *buf, +- size_t len, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag) ++psmx2_tagged_injectdata_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) + { + return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, +- FI_AV_TABLE, 1, data); ++ 1, 1, data); + } + + ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, +@@ -912,7 +822,6 @@ ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, + struct fi_context * fi_context; + int send_flag = 0; + int err; +- size_t idx; + int no_completion = 0; + struct psmx2_cq_event *event; + size_t real_count; +@@ -952,8 +861,6 @@ ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, + if (!req) + return -FI_ENOMEM; + +- PSMX2_STATUS_INIT(req->status); +- + if (total_len <= PSMX2_IOV_BUF_SIZE) { + req->iov_protocol = PSMX2_IOV_PROTO_PACK; + p = req->buf; +@@ -985,19 +892,8 @@ ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, + } + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) { +- free(req); +- return err; +- } +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); + + PSMX2_SET_TAG(psm2_tag, tag, (uint32_t)data, + msg_flags | PSMX2_IMM_BIT_SET(have_data)); +@@ -1173,10 +1069,10 @@ psmx2_tagged_sendv##suffix(struct fid_ep *ep, const struct iovec *iov, \ + } + + PSMX2_TAGGED_SENDV_FUNC() ++PSMX2_TAGGED_SENDV_FUNC(_no_flag) ++PSMX2_TAGGED_SENDV_FUNC(_no_event) + PSMX2_TAGGED_SENDV_FUNC(_no_flag_av_map) +-PSMX2_TAGGED_SENDV_FUNC(_no_flag_av_table) + PSMX2_TAGGED_SENDV_FUNC(_no_event_av_map) +-PSMX2_TAGGED_SENDV_FUNC(_no_event_av_table) + + static ssize_t psmx2_tagged_inject(struct fid_ep *ep, + const void *buf, size_t len, +@@ -1222,20 +1118,20 @@ struct fi_ops_tagged psmx2_tagged_ops##suffix = { \ + }; + + PSMX2_TAGGED_OPS(,,,) +-PSMX2_TAGGED_OPS(_no_flag_av_map_directed, _no_flag_av_map, _no_flag_av_map_directed, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_flag_av_table_directed, _no_flag_av_table, _no_flag_av_table_directed, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_event_av_map_directed, _no_event_av_map, _no_event_av_map_directed, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_event_av_table_directed, _no_event_av_table, _no_event_av_table_directed, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_send_event_av_map_directed, _no_event_av_map, _no_flag_av_map_directed, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_send_event_av_table_directed, _no_event_av_table, _no_flag_av_table_directed, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_recv_event_av_map_directed, _no_flag_av_map, _no_event_av_map_directed, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_recv_event_av_table_directed, _no_flag_av_table, _no_event_av_table_directed, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_flag_av_map_undirected, _no_flag_av_map, _no_flag_av_map_undirected, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_flag_av_table_undirected, _no_flag_av_table, _no_flag_av_table_undirected, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_event_av_map_undirected, _no_event_av_map, _no_event_av_map_undirected, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_event_av_table_undirected, _no_event_av_table, _no_event_av_table_undirected, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_send_event_av_map_undirected, _no_event_av_map, _no_flag_av_map_undirected, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_send_event_av_table_undirected, _no_event_av_table, _no_flag_av_table_undirected, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_recv_event_av_map_undirected, _no_flag_av_map, _no_event_av_map_undirected, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_recv_event_av_table_undirected, _no_flag_av_table, _no_event_av_table_undirected, _no_flag_av_table) ++PSMX2_TAGGED_OPS(_no_flag_directed, _no_flag, _no_flag_directed, _no_flag) ++PSMX2_TAGGED_OPS(_no_event_directed, _no_event, _no_event_directed, _no_flag) ++PSMX2_TAGGED_OPS(_no_send_event_directed, _no_event, _no_flag_directed, _no_flag) ++PSMX2_TAGGED_OPS(_no_recv_event_directed, _no_flag, _no_event_directed, _no_flag) ++PSMX2_TAGGED_OPS(_no_flag_undirected, _no_flag, _no_flag_undirected, _no_flag) ++PSMX2_TAGGED_OPS(_no_event_undirected, _no_event, _no_event_undirected, _no_flag) ++PSMX2_TAGGED_OPS(_no_send_event_undirected, _no_event, _no_flag_undirected, _no_flag) ++PSMX2_TAGGED_OPS(_no_recv_event_undirected, _no_flag, _no_event_undirected, _no_flag) ++PSMX2_TAGGED_OPS(_no_flag_directed_av_map, _no_flag_av_map, _no_flag_directed_av_map, _no_flag_av_map) ++PSMX2_TAGGED_OPS(_no_event_directed_av_map, _no_event_av_map, _no_event_directed_av_map, _no_flag_av_map) ++PSMX2_TAGGED_OPS(_no_send_event_directed_av_map, _no_event_av_map, _no_flag_directed_av_map, _no_flag_av_map) ++PSMX2_TAGGED_OPS(_no_recv_event_directed_av_map, _no_flag_av_map, _no_event_directed_av_map, _no_flag_av_map) ++PSMX2_TAGGED_OPS(_no_flag_undirected_av_map, _no_flag_av_map, _no_flag_undirected_av_map, _no_flag_av_map) ++PSMX2_TAGGED_OPS(_no_event_undirected_av_map, _no_event_av_map, _no_event_undirected_av_map, _no_flag_av_map) ++PSMX2_TAGGED_OPS(_no_send_event_undirected_av_map, _no_event_av_map, _no_flag_undirected_av_map, _no_flag_av_map) ++PSMX2_TAGGED_OPS(_no_recv_event_undirected_av_map, _no_flag_av_map, _no_event_undirected_av_map, _no_flag_av_map) + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_trx_ctxt.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_trx_ctxt.c +index 709ced9..d4f2b8f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_trx_ctxt.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_trx_ctxt.c +@@ -96,10 +96,10 @@ int psmx2_am_trx_ctxt_handler(psm2_am_token_t token, psm2_amarg_t *args, + */ + disconn = malloc(sizeof(*disconn)); + if (disconn) { +- psmx2_lock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_lock_fn(&trx_ctxt->peer_lock, 2); + dlist_remove_first_match(&trx_ctxt->peer_list, + psmx2_peer_match, epaddr); +- psmx2_unlock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_unlock_fn(&trx_ctxt->peer_lock, 2); + if (trx_ctxt->ep && trx_ctxt->ep->av) + psmx2_av_remove_conn(trx_ctxt->ep->av, trx_ctxt, epaddr); + disconn->ep = trx_ctxt->psm2_ep; +@@ -129,12 +129,12 @@ void psmx2_trx_ctxt_disconnect_peers(struct psmx2_trx_ctxt *trx_ctxt) + + /* use local peer_list to avoid entering AM handler while holding the lock */ + dlist_init(&peer_list); +- psmx2_lock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_lock_fn(&trx_ctxt->peer_lock, 2); + dlist_foreach_safe(&trx_ctxt->peer_list, item, tmp) { + dlist_remove(item); + dlist_insert_before(item, &peer_list); + } +- psmx2_unlock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_unlock_fn(&trx_ctxt->peer_lock, 2); + + dlist_foreach_safe(&peer_list, item, tmp) { + peer = container_of(item, struct psmx2_epaddr_context, entry); +@@ -176,9 +176,12 @@ void psmx2_trx_ctxt_free(struct psmx2_trx_ctxt *trx_ctxt, int usage_flags) + FI_INFO(&psmx2_prov, FI_LOG_CORE, "epid: %016lx (%s)\n", + trx_ctxt->psm2_epid, psmx2_usage_flags_to_string(old_flags)); + +- psmx2_lock(&trx_ctxt->domain->trx_ctxt_lock, 1); ++ trx_ctxt->am_progress = 0; ++ trx_ctxt->poll_active = 0; ++ ++ trx_ctxt->domain->trx_ctxt_lock_fn(&trx_ctxt->domain->trx_ctxt_lock, 1); + dlist_remove(&trx_ctxt->entry); +- psmx2_unlock(&trx_ctxt->domain->trx_ctxt_lock, 1); ++ trx_ctxt->domain->trx_ctxt_unlock_fn(&trx_ctxt->domain->trx_ctxt_lock, 1); + + if (psmx2_env.disconnect) + psmx2_trx_ctxt_disconnect_peers(trx_ctxt); +@@ -213,7 +216,9 @@ void psmx2_trx_ctxt_free(struct psmx2_trx_ctxt *trx_ctxt, int usage_flags) + fastlock_destroy(&trx_ctxt->am_req_pool_lock); + fastlock_destroy(&trx_ctxt->poll_lock); + fastlock_destroy(&trx_ctxt->peer_lock); +- free(trx_ctxt); ++ ++ if (!ofi_atomic_dec32(&trx_ctxt->poll_refcnt)) ++ free(trx_ctxt); + } + + struct psmx2_trx_ctxt *psmx2_trx_ctxt_alloc(struct psmx2_fid_domain *domain, +@@ -231,12 +236,12 @@ struct psmx2_trx_ctxt *psmx2_trx_ctxt_alloc(struct psmx2_fid_domain *domain, + + /* Check existing allocations first if only Tx or Rx is needed */ + if (compatible_flags) { +- psmx2_lock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_lock_fn(&domain->trx_ctxt_lock, 1); + dlist_foreach(&domain->trx_ctxt_list, item) { + trx_ctxt = container_of(item, struct psmx2_trx_ctxt, entry); + if (compatible_flags == trx_ctxt->usage_flags) { + trx_ctxt->usage_flags |= asked_flags; +- psmx2_unlock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_unlock_fn(&domain->trx_ctxt_lock, 1); + FI_INFO(&psmx2_prov, FI_LOG_CORE, + "use existing context. epid: %016lx " + "(%s -> tx+rx).\n", trx_ctxt->psm2_epid, +@@ -244,7 +249,7 @@ struct psmx2_trx_ctxt *psmx2_trx_ctxt_alloc(struct psmx2_fid_domain *domain, + return trx_ctxt; + } + } +- psmx2_unlock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_unlock_fn(&domain->trx_ctxt_lock, 1); + } + + if (psmx2_trx_ctxt_cnt >= psmx2_env.max_trx_ctxt) { +@@ -323,21 +328,25 @@ struct psmx2_trx_ctxt *psmx2_trx_ctxt_alloc(struct psmx2_fid_domain *domain, + goto err_out_close_ep; + } + ++#if !HAVE_PSM2_MQ_FP_MSG ++ fastlock_init(&trx_ctxt->rma_queue.lock); ++ slist_init(&trx_ctxt->rma_queue.list); ++#endif + fastlock_init(&trx_ctxt->peer_lock); + fastlock_init(&trx_ctxt->poll_lock); + fastlock_init(&trx_ctxt->am_req_pool_lock); +- fastlock_init(&trx_ctxt->rma_queue.lock); + fastlock_init(&trx_ctxt->trigger_queue.lock); + dlist_init(&trx_ctxt->peer_list); +- slist_init(&trx_ctxt->rma_queue.list); + slist_init(&trx_ctxt->trigger_queue.list); + trx_ctxt->id = psmx2_trx_ctxt_cnt++; + trx_ctxt->domain = domain; + trx_ctxt->usage_flags = asked_flags; ++ trx_ctxt->poll_active = 1; ++ ofi_atomic_initialize32(&trx_ctxt->poll_refcnt, 1); /* take one ref for domain->trx_ctxt_list */ + +- psmx2_lock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_lock_fn(&domain->trx_ctxt_lock, 1); + dlist_insert_before(&trx_ctxt->entry, &domain->trx_ctxt_list); +- psmx2_unlock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_unlock_fn(&domain->trx_ctxt_lock, 1); + + return trx_ctxt; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_wait.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_wait.c +index 6798ac0..bd2a6d1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_wait.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_wait.c +@@ -1,9 +1,9 @@ + /* + * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * +- * This software is waitailable to you under a choice of one of two ++ * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, waitailable from the file ++ * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * BSD license below: + * +@@ -140,7 +140,8 @@ static void psmx2_wait_stop_progress(void) + static struct fi_ops_wait *psmx2_wait_ops_save; + static struct fi_ops_wait psmx2_wait_ops; + +-static int psmx2_wait_wait(struct fid_wait *wait, int timeout) ++DIRECT_FN ++STATIC int psmx2_wait_wait(struct fid_wait *wait, int timeout) + { + struct util_wait *wait_priv; + struct psmx2_fid_fabric *fabric; +@@ -158,6 +159,7 @@ static int psmx2_wait_wait(struct fid_wait *wait, int timeout) + return err; + } + ++DIRECT_FN + int psmx2_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, + struct fid_wait **waitset) + { +@@ -177,6 +179,7 @@ int psmx2_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, + return 0; + } + ++DIRECT_FN + int psmx2_wait_trywait(struct fid_fabric *fabric, struct fid **fids, int count) + { + struct psmx2_fid_cq *cq_priv; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/version.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/version.h +index a91ab9f..52e9219 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/version.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/version.h +@@ -40,8 +40,6 @@ + #ifdef VALGRIND_MAKE_MEM_DEFINED + #undef VALGRIND_MAKE_MEM_DEFINED + #endif +-#define PSM_IS_TEST /* keep plain malloc/realloc/calloc/memalign/free/strdup */ +-#include "psm2/psm_mq_internal.h" + #else + #include + #include +@@ -55,16 +53,19 @@ + #define PSMX2_DEFAULT_UUID "00FF00FF-0000-0000-0000-00FF00FF00FF" + #define PROVIDER_INI PSM2_INI + +-#if HAVE_PSM2_SRC ++/* Temporarily disable the use of psm2_mq_fp_msg due to instability */ ++#ifdef HAVE_PSM2_MQ_FP_MSG ++#undef HAVE_PSM2_MQ_FP_MSG ++#endif ++#define HAVE_PSM2_MQ_FP_MSG 0 ++ ++#if HAVE_PSM2_MQ_REQ_USER + + #ifndef PSMX2_USE_REQ_CONTEXT + #define PSMX2_USE_REQ_CONTEXT 1 + #endif + +-#define PSMX2_STATUS_TYPE struct psm2_mq_req +-#define PSMX2_STATUS_DECL(s) struct psm2_mq_req *s +-#define PSMX2_STATUS_INIT(s) +-#define PSMX2_STATUS_SAVE(s,t) do { t = s; } while (0) ++#define PSMX2_STATUS_TYPE struct psm2_mq_req_user + #define PSMX2_STATUS_ERROR(s) ((s)->error_code) + #define PSMX2_STATUS_TAG(s) ((s)->tag) + #define PSMX2_STATUS_RCVLEN(s) ((s)->recv_msglen) +@@ -72,15 +73,7 @@ + #define PSMX2_STATUS_PEER(s) ((s)->peer) + #define PSMX2_STATUS_CONTEXT(s) ((s)->context) + +-#define PSMX2_POLL_COMPLETION(trx_ctxt, status, err) \ +- do { \ +- (err) = psm2_mq_ipeek_dequeue((trx_ctxt)->psm2_mq, &(status)); \ +- } while (0) +- +-#define PSMX2_FREE_COMPLETION(trx_ctxt, status) \ +- psm2_mq_req_free((trx_ctxt)->psm2_mq, status) +- +-#else /* !HAVE_PSM2_SRC */ ++#else /* !HAVE_PSM2_MQ_REQ_USER */ + + #ifdef PSMX2_USE_REQ_CONTEXT + #undef PSMX2_USE_REQ_CONTEXT +@@ -88,9 +81,6 @@ + #define PSMX2_USE_REQ_CONTEXT 0 + + #define PSMX2_STATUS_TYPE psm2_mq_status2_t +-#define PSMX2_STATUS_DECL(s) psm2_mq_status2_t s##_priv, *s +-#define PSMX2_STATUS_INIT(s) do { s = &s##_priv; } while (0) +-#define PSMX2_STATUS_SAVE(s,t) do { *(t) = *(s); } while (0) + #define PSMX2_STATUS_ERROR(s) ((s)->error_code) + #define PSMX2_STATUS_TAG(s) ((s)->msg_tag) + #define PSMX2_STATUS_RCVLEN(s) ((s)->nbytes) +@@ -98,27 +88,7 @@ + #define PSMX2_STATUS_PEER(s) ((s)->msg_peer) + #define PSMX2_STATUS_CONTEXT(s) ((s)->context) + +-/* +- * psm2_mq_test2 is called immediately after psm2_mq_ipeek with a lock held to +- * prevent psm2_mq_ipeek from returning the same request multiple times under +- * different threads. +- */ +-#define PSMX2_POLL_COMPLETION(trx_ctxt, status, err) \ +- do { \ +- if (psmx2_trylock(&(trx_ctxt)->poll_lock, 2)) { \ +- (err) = PSM2_MQ_NO_COMPLETIONS; \ +- } else { \ +- psm2_mq_req_t psm2_req; \ +- (err) = psm2_mq_ipeek((trx_ctxt)->psm2_mq, &psm2_req, NULL); \ +- if ((err) == PSM2_OK) \ +- psm2_mq_test2(&psm2_req, (status)); \ +- psmx2_unlock(&(trx_ctxt)->poll_lock, 2); \ +- } \ +- } while(0) +- +-#define PSMX2_FREE_COMPLETION(trx_ctxt, status) +- +-#endif /* HAVE_PSM2_SRC */ ++#endif /* !HAVE_PSM2_MQ_REQ_USER */ + + /* + * Provide backward compatibility for older PSM2 libraries that lack the +@@ -134,10 +104,10 @@ typedef int (*psm2_am_handler_2_fn_t) ( + psm2_amarg_t *args, int nargs, + void *src, uint32_t len, void *hctx); + +-extern psm2_am_handler_fn_t psmx2_am_handlers[]; +-extern psm2_am_handler_2_fn_t psmx2_am_handlers_2[]; +-extern void *psmx2_am_handler_ctxts[]; +-extern int psmx2_am_handler_count; ++extern psm2_am_handler_fn_t psmx2_am_handlers[]; ++extern psm2_am_handler_2_fn_t psmx2_am_handlers_2[]; ++extern void *psmx2_am_handler_ctxts[]; ++extern int psmx2_am_handler_count; + + static inline + psm2_error_t psm2_am_register_handlers_2( +@@ -166,10 +136,10 @@ psm2_error_t psm2_am_register_handlers_2( + #endif /* !HAVE_PSM2_AM_REGISTER_HANDLERS_2 */ + + /* +- * Use reserved space within psm2_mq_req for fi_context instead of ++ * Use reserved space within psm2_mq_req_user for fi_context instead of + * allocating from a internal queue. + * +- * Only work when compiled with PSM2 source. Can be turned off by ++ * Only work with PSM2 that has psm2_mq_req_user defined. Can be turned off by + * passing "-DPSMX2_USE_REQ_CONTEXT=0" to the compiler. + */ + +@@ -194,14 +164,15 @@ psm2_error_t psm2_am_register_handlers_2( + + #define PSMX2_REQ_GET_OP_CONTEXT(req, ctx) \ + do { \ +- (ctx) = (req)->context = (req)->user_reserved; \ ++ struct psm2_mq_req_user *req_user = (void *)(req); \ ++ (ctx) = req_user->context = req_user->user_reserved; \ + } while (0) + + #else /* !PSMX2_USE_REQ_CONTEXT */ + + struct psmx2_context { +- struct fi_context fi_context; +- struct slist_entry list_entry; ++ struct fi_context fi_context; ++ struct slist_entry list_entry; + }; + + #define PSMX2_EP_DECL_OP_CONTEXT \ +@@ -239,15 +210,15 @@ struct psmx2_context { + #define PSMX2_EP_GET_OP_CONTEXT(ep, ctx) \ + do { \ + struct psmx2_context *context; \ +- psmx2_lock(&(ep)->context_lock, 2); \ ++ ep->domain->context_lock_fn(&(ep)->context_lock, 2); \ + if (!slist_empty(&(ep)->free_context_list)) { \ + context = container_of(slist_remove_head(&(ep)->free_context_list), \ + struct psmx2_context, list_entry); \ +- psmx2_unlock(&(ep)->context_lock, 2); \ ++ ep->domain->context_unlock_fn(&(ep)->context_lock, 2); \ + (ctx) = &context->fi_context; \ + break; \ + } \ +- psmx2_unlock(&(ep)->context_lock, 2); \ ++ ep->domain->context_unlock_fn(&(ep)->context_lock, 2); \ + context = malloc(sizeof(*context)); \ + if (!context) { \ + FI_WARN(&psmx2_prov, FI_LOG_EP_DATA, "out of memory.\n"); \ +@@ -261,12 +232,12 @@ struct psmx2_context { + struct psmx2_context *context; \ + context = container_of((ctx), struct psmx2_context, fi_context); \ + context->list_entry.next = NULL; \ +- psmx2_lock(&(ep)->context_lock, 2); \ ++ ep->domain->context_lock_fn(&(ep)->context_lock, 2); \ + slist_insert_tail(&context->list_entry, &(ep)->free_context_list); \ +- psmx2_unlock(&(ep)->context_lock, 2); \ ++ ep->domain->context_unlock_fn(&(ep)->context_lock, 2); \ + } while (0) + +-#endif /* PSMX2_USE_REQ_CONTEXT */ ++#endif /* !PSMX2_USE_REQ_CONTEXT */ + + #endif + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/Makefile.include +new file mode 100644 +index 0000000..6eac7c0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/Makefile.include +@@ -0,0 +1,28 @@ ++if HAVE_RSTREAM ++_rstream_files = \ ++ prov/rstream/src/rstream_domain.c \ ++ prov/rstream/src/rstream_fabric.c \ ++ prov/rstream/src/rstream_attr.c \ ++ prov/rstream/src/rstream_init.c \ ++ prov/rstream/src/rstream_cm.c \ ++ prov/rstream/src/rstream_msg.c \ ++ prov/rstream/src/rstream_eq.c \ ++ prov/rstream/src/rstream_ep.c \ ++ prov/rstream/src/rstream.h ++ ++if HAVE_RSTREAM_DL ++pkglib_LTLIBRARIES += librstream-fi.la ++librstream_fi_la_SOURCES = $(_rstream_files) $(common_srcs) ++librstream_fi_la_LIBADD = $(linkback) $(rstream_LIBS) ++librstream_fi_la_LDFLAGS = -module -avoid-version -shared -export-dynamic ++librstream_fi_la_DEPENDENCIES = $(linkback) ++else !HAVE_RSTREAM_DL ++src_libfabric_la_SOURCES += $(_rstream_files) ++src_libfabric_la_LIBADD += $(rstream_LIBS) ++endif !HAVE_RSTREAM_DL ++ ++prov_install_man_pages += man/man7/fi_rstream.7 ++ ++endif HAVE_RSTREAM ++ ++prov_dist_man_pages += man/man7/fi_rstream.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/configure.m4 +new file mode 100644 +index 0000000..2543f47 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/configure.m4 +@@ -0,0 +1,15 @@ ++dnl Configury specific to the libfabric rstream provider ++ ++dnl Called to configure this provider ++dnl ++dnl Arguments: ++dnl ++dnl $1: action if configured successfully ++dnl $2: action if not configured successfully ++dnl ++AC_DEFUN([FI_RSTREAM_CONFIGURE],[ ++ # Determine if we can support the rxd provider ++ rstream_h_happy=0 ++ AS_IF([test x"$enable_rstream" != x"no"], [rstream_h_happy=1]) ++ AS_IF([test $rstream_h_happy -eq 1], [$1], [$2]) ++]) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream.h +new file mode 100644 +index 0000000..ddbc1fd +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream.h +@@ -0,0 +1,232 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _RSTREAM_H_ ++#define _RSTREAM_H_ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "rdma/providers/fi_log.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++#define RSTREAM_CAPS (FI_MSG | FI_SEND | FI_RECV | FI_LOCAL_COMM | FI_REMOTE_COMM) ++#define RSTREAM_DEFAULT_QP_SIZE 384 ++#define RSTREAM_MAX_CTRL 2 ++#define RSTREAM_MR_BITS 15 ++#define RSTREAM_DEFAULT_MR_SEG_SIZE (1 << RSTREAM_MR_BITS) ++ ++#define RSTREAM_MAX_POLL_TIME 10 ++ ++#define RSTREAM_MAX_MR_BITS 20 ++#define RSTREAM_MR_MAX (1ULL << RSTREAM_MAX_MR_BITS) ++#define RSTREAM_MR_LEN_MASK (RSTREAM_MR_MAX - 1) ++#define RSTREAM_CREDIT_OFFSET RSTREAM_MAX_MR_BITS ++#define RSTREAM_CREDIT_BITS 9 ++#define RSTREAM_CREDITS_MAX (1ULL << RSTREAM_CREDIT_BITS) ++#define RSTREAM_CREDIT_MASK ((RSTREAM_CREDITS_MAX - 1) << RSTREAM_CREDIT_OFFSET) ++#define RSTREAM_RSOCKETV2 2 ++ ++/*iWARP, have to also track msg len [msglen, target_credits, target_mr_len]*/ ++#define RSTREAM_USING_IWARP (rstream_info.ep_attr->protocol == FI_PROTO_IWARP) ++#define RSTREAM_IWARP_DATA_SIZE sizeof(uint32_t) ++ ++#define RSTREAM_IWARP_MSG_BIT (1ULL << 31) ++#define RSTREAM_IWARP_MSG_BIT_MASK (RSTREAM_IWARP_MSG_BIT - 1) ++#define RSTREAM_IWARP_IMM_MSG_LEN (1ULL << RSTREAM_MAX_MR_BITS) /* max transmission size */ ++ ++extern struct fi_info rstream_info; ++extern struct fi_provider rstream_prov; ++extern struct util_prov rstream_util_prov; ++extern struct fi_fabric_attr rstream_fabric_attr; ++ ++/* util structs ~ user layer fds */ ++ ++struct rstream_fabric { ++ struct util_fabric util_fabric; ++ struct fid_fabric *msg_fabric; ++}; ++ ++struct rstream_domain { ++ struct util_domain util_domain; ++ struct fid_domain *msg_domain; ++}; ++ ++enum rstream_msg_type { ++ RSTREAM_CTRL_MSG, ++ RSTREAM_RX_MSG_COMP, ++ RSTREAM_TX_MSG_COMP, ++ RSTREAM_MSG_UNKNOWN ++}; ++ ++struct rstream_mr_seg { ++ void *data_start; ++ uint32_t size; ++ uint32_t avail_size; ++ uint64_t start_offset; ++ uint64_t end_offset; ++}; ++ ++struct rstream_lmr_data { ++ void *base_addr; ++ void *ldesc; ++ uint64_t rkey; ++ struct fid_mr *mr; ++ struct rstream_mr_seg tx; ++ struct rstream_mr_seg rx; ++ uint64_t recv_buffer_offset; ++}; ++ ++struct rstream_rmr_data { ++ struct rstream_mr_seg mr; ++ uint64_t rkey; ++}; ++ ++struct rstream_cm_data { ++ uint64_t base_addr; ++ uint64_t rkey; ++ uint32_t rmr_size; ++ uint16_t max_rx_credits; ++ uint8_t version; ++ uint8_t reserved; ++}; ++ ++struct rstream_ctx_data { ++ struct fi_context ctx; ++ size_t len; ++}; ++ ++DECLARE_FREESTACK(struct rstream_ctx_data, rstream_tx_ctx_fs); ++ ++struct rstream_tx_ctx { ++ struct rstream_ctx_data *tx_ctxs; ++ uint32_t num_in_use; ++ uint32_t free_index; ++ uint32_t front; ++}; ++ ++struct rstream_window { ++ uint16_t max_tx_credits; ++ uint16_t tx_credits; ++ uint16_t ctrl_credits; ++ uint16_t max_target_rx_credits; ++ uint16_t target_rx_credits; ++ uint16_t max_rx_credits; ++}; ++ ++struct rstream_cq_data { ++ uint32_t total_len; ++ uint16_t num_completions; ++}; ++ ++struct rstream_ep { ++ struct util_ep util_ep; ++ struct fid_ep *ep_fd; ++ struct fid_domain *msg_domain; ++ struct rstream_lmr_data local_mr; ++ struct rstream_rmr_data remote_data; ++ struct fid_cq *cq; ++ struct rstream_window qp_win; ++ struct fi_context *rx_ctxs; ++ uint32_t rx_ctx_index; ++ struct rstream_tx_ctx_fs *tx_ctxs; ++ struct rstream_cq_data rx_cq_data; ++ fastlock_t send_lock; ++ fastlock_t recv_lock; ++ /* must take send/recv lock before cq_lock */ ++ fastlock_t cq_lock; ++}; ++ ++struct rstream_pep { ++ struct util_pep util_pep; ++ struct fid_pep *pep_fd; ++}; ++ ++struct rstream_eq { ++ struct util_eq util_eq; ++ struct fid_eq *eq_fd; ++ uint32_t cm_data_len; ++ struct fi_eq_cm_entry *cm_entry; ++ uint32_t prev_cm_state; ++ RbtHandle ep_map; ++}; ++ ++struct rstream_timer { ++ struct timeval start; ++ struct timeval end; ++ uint32_t poll_time; ++}; ++ ++extern ssize_t rstream_post_cq_data_recv(struct rstream_ep *ep, ++ const struct fi_cq_data_entry *cq_entry); ++ ++extern int rstream_info_to_rstream(uint32_t version, const struct fi_info *core_info, ++ struct fi_info *info); ++extern int rstream_info_to_core(uint32_t version, const struct fi_info *rstream_info, ++ struct fi_info *core_info); ++extern void rstream_set_info(struct fi_info *info); ++extern struct fi_ops_cm rstream_ops_cm; ++extern struct fi_ops_cm rstream_ops_pep_cm; ++extern struct fi_ops_msg rstream_ops_msg; ++extern int rstream_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context); ++extern void rstream_process_cm_event(struct rstream_ep *ep, void *cm_data); ++ ++int rstream_fabric_open(struct fi_fabric_attr *attr, struct fid_fabric **fabric, ++ void *context); ++int rstream_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++int rstream_ep_open(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context); ++int rstream_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, ++ struct fid_eq **eq, void *context); ++int rstream_info_to_core(uint32_t version, const struct fi_info *rstream_info, ++ struct fi_info *core_info); ++ ++#endif /* _RSTREAM_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_attr.c +new file mode 100644 +index 0000000..40a5d96 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_attr.c +@@ -0,0 +1,96 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++struct fi_tx_attr rstream_tx_attr = { ++ .caps = RSTREAM_CAPS, ++ .msg_order = FI_ORDER_SAS, ++ .size = RSTREAM_DEFAULT_QP_SIZE, ++}; ++ ++struct fi_rx_attr rstream_rx_attr = { ++ .caps = RSTREAM_CAPS, ++ .msg_order = FI_ORDER_SAS, ++ .size = RSTREAM_DEFAULT_QP_SIZE, ++}; ++ ++struct fi_ep_attr rstream_ep_attr = { ++ .type = FI_EP_SOCK_STREAM, ++ .protocol = FI_PROTO_RSTREAM, ++ .protocol_version = 1, ++ .tx_ctx_cnt = 1, ++ .rx_ctx_cnt = 1, ++}; ++ ++struct fi_domain_attr rstream_domain_attr = { ++ .caps = FI_LOCAL_COMM | FI_REMOTE_COMM, ++ .threading = FI_THREAD_SAFE, ++ .control_progress = FI_PROGRESS_AUTO, ++ .data_progress = FI_PROGRESS_MANUAL, ++ .resource_mgmt = FI_RM_ENABLED, ++ .av_type = FI_AV_UNSPEC, ++ /* for the ofi mr_check */ ++ .mr_mode = 0, ++ .tx_ctx_cnt = 1, ++ .rx_ctx_cnt = 1, ++ .max_ep_tx_ctx = 1, ++ .mr_iov_limit = 1, ++}; ++ ++struct fi_fabric_attr rstream_fabric_attr = { ++ .prov_version = FI_VERSION(1, 7), ++}; ++ ++struct fi_info rstream_info = { ++ .caps = RSTREAM_CAPS, ++ .addr_format = FI_SOCKADDR, ++ .tx_attr = &rstream_tx_attr, ++ .rx_attr = &rstream_rx_attr, ++ .ep_attr = &rstream_ep_attr, ++ .domain_attr = &rstream_domain_attr, ++ .fabric_attr = &rstream_fabric_attr ++}; ++ ++/* settings post CONNREQ for users */ ++void rstream_set_info(struct fi_info *info) ++{ ++ info->caps = RSTREAM_CAPS; ++ info->mode = 0; ++ info->ep_attr->type = FI_EP_SOCK_STREAM; ++ info->ep_attr->protocol = rstream_info.ep_attr->protocol; ++ info->domain_attr->mr_mode = 0; ++ info->domain_attr->mr_cnt = 0; ++ *info->rx_attr = rstream_rx_attr; ++ *info->tx_attr = rstream_tx_attr; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_cm.c +new file mode 100644 +index 0000000..97635a0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_cm.c +@@ -0,0 +1,188 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++static void rstream_format_data(struct rstream_cm_data *cm, ++ const struct rstream_ep *ep) ++{ ++ assert(cm && ep->local_mr.rx.data_start); ++ ++ cm->version = RSTREAM_RSOCKETV2; ++ cm->max_rx_credits = htons(ep->qp_win.max_rx_credits); ++ cm->base_addr = htonll((uintptr_t)ep->local_mr.rx.data_start); ++ cm->rkey = htonll(ep->local_mr.rkey); ++ cm->rmr_size = htonl(ep->local_mr.rx.size); ++} ++ ++static int rstream_setname(fid_t fid, void *addr, size_t addrlen) ++{ ++ fid_t rstream_fid; ++ struct rstream_pep *rstream_pep; ++ struct rstream_ep *rstream_ep; ++ ++ if (fid->fclass == FI_CLASS_PEP) { ++ rstream_pep = container_of(fid, struct rstream_pep, ++ util_pep.pep_fid); ++ rstream_fid = &rstream_pep->pep_fd->fid; ++ } else if (fid->fclass == FI_CLASS_EP) { ++ rstream_ep = container_of(fid, struct rstream_ep, ++ util_ep.ep_fid); ++ rstream_fid = &rstream_ep->ep_fd->fid; ++ } else { ++ return -FI_ENOSYS; ++ } ++ ++ return fi_setname(rstream_fid, addr, addrlen); ++} ++ ++static int rstream_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ fid_t rstream_fid; ++ struct rstream_pep *rstream_pep; ++ struct rstream_ep *rstream_ep; ++ ++ if (fid->fclass == FI_CLASS_PEP) { ++ rstream_pep = container_of(fid, struct rstream_pep, ++ util_pep.pep_fid); ++ rstream_fid = &rstream_pep->pep_fd->fid; ++ } else if (fid->fclass == FI_CLASS_EP) { ++ rstream_ep = container_of(fid, struct rstream_ep, ++ util_ep.ep_fid); ++ rstream_fid = &rstream_ep->ep_fd->fid; ++ } else { ++ return -FI_ENOSYS; ++ } ++ ++ return fi_getname(rstream_fid, addr, addrlen); ++} ++ ++static int rstream_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) ++{ ++ struct rstream_ep *rstream_ep = ++ container_of(ep, struct rstream_ep, util_ep.ep_fid); ++ ++ return fi_getpeer(rstream_ep->ep_fd, addr, addrlen); ++} ++ ++static int rstream_check_cm_size(struct rstream_ep *ep) ++{ ++ int ret; ++ size_t cm_max_size = 0, opt_size = sizeof(size_t); ++ ++ ret = fi_getopt(&ep->ep_fd->fid, FI_OPT_ENDPOINT, FI_OPT_CM_DATA_SIZE, ++ &cm_max_size, &opt_size); ++ if (ret < 0) ++ return ret; ++ if (cm_max_size < sizeof(struct rstream_cm_data)) ++ return -FI_ETOOSMALL; ++ return ret; ++} ++ ++static int rstream_connect(struct fid_ep *ep, const void *addr, ++ const void *param, size_t paramlen) ++{ ++ struct rstream_ep *rstream_ep = ++ container_of(ep, struct rstream_ep, util_ep.ep_fid); ++ struct rstream_cm_data cm_data; ++ ++ if (param || paramlen > 0 || rstream_check_cm_size(rstream_ep) != 0) ++ return -FI_ENOSYS; ++ ++ rstream_format_data(&cm_data, rstream_ep); ++ ++ return fi_connect(rstream_ep->ep_fd, addr, &cm_data, sizeof(cm_data)); ++} ++ ++static int rstream_listen(struct fid_pep *pep) ++{ ++ struct rstream_pep *rstream_pep = container_of(pep, ++ struct rstream_pep, util_pep.pep_fid); ++ ++ return fi_listen(rstream_pep->pep_fd); ++} ++ ++static int rstream_accept(struct fid_ep *ep, const void *param, ++ size_t paramlen) ++{ ++ struct rstream_cm_data cm_data; ++ struct rstream_ep *rstream_ep = ++ container_of(ep, struct rstream_ep, util_ep.ep_fid); ++ ++ if (param || paramlen > 0 || rstream_check_cm_size(rstream_ep) != 0) ++ return -FI_ENOSYS; ++ ++ rstream_format_data(&cm_data, rstream_ep); ++ ++ return fi_accept(rstream_ep->ep_fd, &cm_data, sizeof(cm_data)); ++} ++ ++static int rstream_reject(struct fid_pep *pep, fid_t handle, ++ const void *param, size_t paramlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static int rstream_shutdown(struct fid_ep *ep, uint64_t flags) ++{ ++ struct rstream_ep *rstream_ep = ++ container_of(ep, struct rstream_ep, util_ep.ep_fid); ++ ++ return fi_shutdown(rstream_ep->ep_fd, flags); ++} ++ ++struct fi_ops_cm rstream_ops_pep_cm = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = rstream_setname, ++ .getname = rstream_getname, ++ .getpeer = fi_no_getpeer, ++ .connect = fi_no_connect, ++ .listen = rstream_listen, ++ .accept = fi_no_accept, ++ .reject = rstream_reject, ++ .shutdown = rstream_shutdown, ++ .join = fi_no_join, ++}; ++ ++struct fi_ops_cm rstream_ops_cm = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = fi_no_setname, ++ .getname = fi_no_getname, ++ .getpeer = rstream_getpeer, ++ .connect = rstream_connect, ++ .listen = fi_no_listen, ++ .accept = rstream_accept, ++ .reject = fi_no_reject, ++ .shutdown = rstream_shutdown, ++ .join = fi_no_join, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_domain.c +new file mode 100644 +index 0000000..17978af +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_domain.c +@@ -0,0 +1,125 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++static int rstream_domain_close(fid_t fid) ++{ ++ struct rstream_domain *rstream_domain = ++ container_of(fid, struct rstream_domain, ++ util_domain.domain_fid.fid); ++ int ret; ++ ++ ret = fi_close(&rstream_domain->msg_domain->fid); ++ if (ret) ++ return ret; ++ ++ ret = ofi_domain_close(&rstream_domain->util_domain); ++ if (ret) ++ return ret; ++ ++ free(rstream_domain); ++ ++ return 0; ++} ++ ++static struct fi_ops_mr rstream_domain_mr_ops = { ++ .size = sizeof(struct fi_ops_mr), ++ .reg = fi_no_mr_reg, ++ .regv = fi_no_mr_regv, ++ .regattr = fi_no_mr_regattr, ++}; ++ ++static struct fi_ops rstream_domain_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_domain_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_domain rstream_domain_ops = { ++ .size = sizeof(struct fi_ops_domain), ++ .av_open = fi_no_av_open, ++ .cq_open = fi_no_cq_open, ++ .endpoint = rstream_ep_open, ++ .scalable_ep = fi_no_scalable_ep, ++ .cntr_open = fi_no_cntr_open, ++ .poll_open = fi_no_poll_open, ++ .stx_ctx = fi_no_stx_context, ++ .srx_ctx = fi_no_srx_context, ++ .query_atomic = fi_no_query_atomic, ++}; ++ ++int rstream_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context) ++{ ++ struct rstream_domain *rstream_domain; ++ struct rstream_fabric *rstream_fabric; ++ int ret; ++ struct fi_info *cinfo = NULL; ++ ++ rstream_domain = calloc(1, sizeof(*rstream_domain)); ++ if (!rstream_domain) ++ return -FI_ENOMEM; ++ ++ rstream_fabric = container_of(fabric, struct rstream_fabric, ++ util_fabric.fabric_fid); ++ ++ ret = ofi_get_core_info(FI_VERSION(1, 7), NULL, NULL, 0, ++ &rstream_util_prov, info, rstream_info_to_core, &cinfo); ++ if (ret) ++ goto err1; ++ ++ ret = fi_domain(rstream_fabric->msg_fabric, cinfo, ++ &rstream_domain->msg_domain, context); ++ if (ret) ++ goto err1; ++ ++ ret = ofi_domain_init(fabric, info, &rstream_domain->util_domain, ++ context); ++ if (ret) ++ goto err1; ++ ++ *domain = &rstream_domain->util_domain.domain_fid; ++ (*domain)->fid.ops = &rstream_domain_fi_ops; ++ (*domain)->mr = &rstream_domain_mr_ops; ++ (*domain)->ops = &rstream_domain_ops; ++ ++ return 0; ++err1: ++ if (cinfo) ++ fi_freeinfo(cinfo); ++ free(rstream_domain); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_ep.c +new file mode 100644 +index 0000000..0979b24 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_ep.c +@@ -0,0 +1,420 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++static int rstream_ep_close(fid_t fid) ++{ ++ int ret; ++ struct rstream_ep *rstream_ep = ++ container_of(fid, struct rstream_ep, util_ep.ep_fid.fid); ++ ++ ret = fi_close(&rstream_ep->local_mr.mr->fid); ++ if (ret) ++ return ret; ++ free(rstream_ep->local_mr.base_addr); ++ ++ ret = fi_close(&rstream_ep->ep_fd->fid); ++ if (ret) ++ return ret; ++ ++ ret = fi_close(&rstream_ep->cq->fid); ++ if (ret) ++ return ret; ++ ++ ofi_endpoint_close(&rstream_ep->util_ep); ++ ++ rstream_tx_ctx_fs_free(rstream_ep->tx_ctxs); ++ ++ fastlock_destroy(&rstream_ep->send_lock); ++ fastlock_destroy(&rstream_ep->recv_lock); ++ fastlock_destroy(&rstream_ep->cq_lock); ++ free(rstream_ep->rx_ctxs); ++ free(rstream_ep); ++ return 0; ++} ++ ++static int rstream_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) ++{ ++ int ret; ++ struct rstream_ep *rstream_ep = ++ container_of(ep_fid, struct rstream_ep, util_ep.ep_fid.fid); ++ struct rstream_eq *rstream_eq = NULL; ++ ++ switch (bfid->fclass) { ++ case FI_CLASS_EQ: ++ rstream_eq = container_of(bfid, struct rstream_eq, ++ util_eq.eq_fid.fid); ++ ret = fi_ep_bind(rstream_ep->ep_fd, &rstream_eq->eq_fd->fid, ++ flags); ++ rbtInsert(rstream_eq->ep_map, &rstream_ep->ep_fd->fid, ++ rstream_ep); ++ break; ++ default: ++ FI_WARN(&rstream_prov, FI_LOG_EP_CTRL, "invalid fid class\n"); ++ ret = -FI_EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++static int rstream_reg_mrs(struct fid_domain *domain, ++ struct rstream_lmr_data *lmr) ++{ ++ int ret; ++ uint64_t rx_meta_data_offset = 0; ++ uint32_t full_mr_size = lmr->tx.size + lmr->rx.size; ++ ++ if (RSTREAM_USING_IWARP) ++ rx_meta_data_offset = RSTREAM_IWARP_DATA_SIZE * lmr->rx.size; ++ ++ full_mr_size = full_mr_size + rx_meta_data_offset; ++ lmr->base_addr = malloc(full_mr_size); ++ ++ ret = fi_mr_reg(domain, lmr->base_addr, full_mr_size, ++ FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE, ++ 0, 0, 0, &lmr->mr, NULL); ++ if (ret) ++ return ret; ++ ++ lmr->ldesc = fi_mr_desc(lmr->mr); ++ lmr->rkey = fi_mr_key(lmr->mr); ++ lmr->tx.data_start = (char *)lmr->base_addr; ++ lmr->tx.avail_size = lmr->tx.size; ++ lmr->rx.data_start = (char *)lmr->tx.data_start + ++ lmr->tx.size + rx_meta_data_offset; ++ ++ return ret; ++} ++ ++static int rstream_cq_init(struct fid_domain *domain, struct rstream_ep *rep) ++{ ++ int ret; ++ struct fi_cq_attr attr; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.format = FI_CQ_FORMAT_DATA; ++ attr.wait_obj = FI_WAIT_FD; ++ attr.size = rep->qp_win.max_rx_credits + rep->qp_win.max_tx_credits; ++ ++ ret = fi_cq_open(domain, &attr, &rep->cq, NULL); ++ if (ret) ++ return ret; ++ ++ ret = fi_ep_bind(rep->ep_fd, &rep->cq->fid, FI_TRANSMIT | FI_RECV); ++ if (ret) ++ return ret; ++ ++ rep->qp_win.tx_credits = ++ rep->qp_win.max_tx_credits - RSTREAM_MAX_CTRL; ++ ++ return ret; ++} ++ ++static int rstream_ep_ctrl(struct fid *fid, int command, void *arg) ++{ ++ struct rstream_ep *rstream_ep; ++ int ret = 0; ++ rstream_ep = container_of(fid, struct rstream_ep, util_ep.ep_fid.fid); ++ ++ switch (command) { ++ case FI_ENABLE: ++ ret = rstream_reg_mrs(rstream_ep->msg_domain, ++ &rstream_ep->local_mr); ++ if (ret) ++ goto err1; ++ ret = rstream_cq_init(rstream_ep->msg_domain, rstream_ep); ++ if (ret) ++ goto err1; ++ ret = fi_enable(rstream_ep->ep_fd); ++ break; ++ case FI_GETWAIT: ++ ret = fi_control(&rstream_ep->cq->fid, FI_GETWAIT, arg); ++ if (ret) ++ return ret; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ return ret; ++ ++err1: ++ if (rstream_ep->local_mr.base_addr) ++ free(rstream_ep->local_mr.base_addr); ++ if (rstream_ep->local_mr.mr) ++ fi_close(&rstream_ep->local_mr.mr->fid); ++ ++ return ret; ++} ++ ++static struct fi_ops rstream_ep_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_ep_close, ++ .bind = rstream_ep_bind, ++ .control = rstream_ep_ctrl, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int rstream_ep_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) ++{ ++ struct rstream_ep *rstream_ep = ++ container_of(fid, struct rstream_ep, util_ep.ep_fid.fid); ++ ++ if (level != FI_OPT_ENDPOINT) ++ return -FI_ENOPROTOOPT; ++ ++ if (optname == FI_OPT_SEND_BUF_SIZE) { ++ if(sizeof(rstream_ep->local_mr.tx.size) != optlen) ++ return -FI_EINVAL; ++ rstream_ep->local_mr.tx.size = *((uint32_t *)optval); ++ } else if (optname == FI_OPT_RECV_BUF_SIZE) { ++ if(sizeof(rstream_ep->local_mr.rx.size) != optlen) ++ return -FI_EINVAL; ++ rstream_ep->local_mr.rx.size = *((uint32_t *)optval); ++ } else if (optname == FI_OPT_TX_SIZE) { ++ if(sizeof(rstream_ep->qp_win.max_tx_credits) != optlen) ++ return -FI_EINVAL; ++ rstream_ep->qp_win.max_tx_credits = *((uint16_t *)optval); ++ } else if (optname == FI_OPT_RX_SIZE) { ++ if(sizeof(rstream_ep->qp_win.max_rx_credits) != optlen) ++ return -FI_EINVAL; ++ rstream_ep->qp_win.max_rx_credits = *((uint16_t *)optval); ++ } else { ++ return -FI_ENOPROTOOPT; ++ } ++ ++ return 0; ++} ++ ++static struct fi_ops_ep rstream_ops_ep = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = fi_no_cancel, ++ .getopt = fi_no_getopt, ++ .setopt = rstream_ep_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++int rstream_ep_open(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context) ++{ ++ struct rstream_ep *rstream_ep; ++ struct rstream_domain *rstream_domain; ++ struct rstream_pep *rstream_pep = NULL; ++ int ret; ++ ++ rstream_domain = container_of(domain, struct rstream_domain, ++ util_domain.domain_fid); ++ ++ rstream_ep = calloc(1, sizeof(*rstream_ep)); ++ if (!rstream_ep) ++ return -FI_ENOMEM; ++ ++ /* manual progress */ ++ ret = ofi_endpoint_init(domain, &rstream_util_prov, info, ++ &rstream_ep->util_ep, context, NULL); ++ if (ret) ++ goto err1; ++ ++ rstream_info_to_core(FI_VERSION(1, 7), NULL, info); ++ ++ if (info->handle && info->handle->fclass == FI_CLASS_PEP) { ++ rstream_pep = container_of(info->handle, ++ struct rstream_pep, util_pep.pep_fid); ++ info->handle = &rstream_pep->pep_fd->fid; ++ } ++ ++ ret = fi_endpoint(rstream_domain->msg_domain, info, ++ &rstream_ep->ep_fd, NULL); ++ if (ret) ++ goto err1; ++ ++ if (rstream_pep) ++ free(rstream_pep); ++ ++ rstream_ep->msg_domain = rstream_domain->msg_domain; ++ rstream_ep->local_mr.tx.size = RSTREAM_DEFAULT_MR_SEG_SIZE; ++ rstream_ep->local_mr.rx.size = RSTREAM_DEFAULT_MR_SEG_SIZE; ++ ++ rstream_ep->qp_win.max_tx_credits = rstream_info.tx_attr->size; ++ rstream_ep->qp_win.ctrl_credits = RSTREAM_MAX_CTRL; ++ rstream_ep->qp_win.max_rx_credits = rstream_info.rx_attr->size; ++ ++ rstream_ep->tx_ctxs = ++ rstream_tx_ctx_fs_create(rstream_ep->qp_win.max_tx_credits, ++ NULL, NULL); ++ ++ assert(rstream_ep->tx_ctxs); ++ rstream_ep->rx_ctxs = (struct fi_context *) ++ calloc(rstream_ep->qp_win.max_rx_credits, ++ sizeof(*rstream_ep->rx_ctxs)); ++ assert(rstream_ep->rx_ctxs); ++ ++ *ep_fid = &rstream_ep->util_ep.ep_fid; ++ (*ep_fid)->fid.ops = &rstream_ep_fi_ops; ++ (*ep_fid)->ops = &rstream_ops_ep; ++ (*ep_fid)->cm = &rstream_ops_cm; ++ (*ep_fid)->msg = &rstream_ops_msg; ++ fastlock_init(&rstream_ep->send_lock); ++ fastlock_init(&rstream_ep->recv_lock); ++ fastlock_init(&rstream_ep->cq_lock); ++ return 0; ++ ++err1: ++ free(rstream_ep); ++ return ret; ++} ++ ++static int rstream_pep_bind(struct fid *pep_fid, struct fid *bfid, ++ uint64_t flags) ++{ ++ struct rstream_pep *rstream_pep = container_of(pep_fid, ++ struct rstream_pep, util_pep.pep_fid); ++ struct rstream_eq *rstream_eq = NULL; ++ int ret; ++ ++ switch (bfid->fclass) { ++ case FI_CLASS_EQ: ++ rstream_eq = container_of(bfid, struct rstream_eq, ++ util_eq.eq_fid.fid); ++ ret = fi_pep_bind(rstream_pep->pep_fd, &rstream_eq->eq_fd->fid, ++ flags); ++ break; ++ default: ++ FI_WARN(&rstream_prov, FI_LOG_EP_CTRL, "invalid fid class\n"); ++ ret = -FI_EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++static int rstream_pep_ctrl(struct fid *fid, int command, void *arg) ++{ ++ struct rstream_pep *rstream_pep; ++ int ret = 0; ++ ++ switch (fid->fclass) { ++ case FI_CLASS_PEP: ++ if (command != FI_BACKLOG) ++ return -FI_EINVAL; ++ rstream_pep = container_of(fid, struct rstream_pep, ++ util_pep.pep_fid.fid); ++ ret = fi_control(&rstream_pep->pep_fd->fid, command, arg); ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ return ret; ++} ++ ++static int rstream_pep_close(fid_t fid) ++{ ++ struct rstream_pep *rstream_pep = ++ container_of(fid, struct rstream_pep, util_pep.pep_fid.fid); ++ int ret; ++ ++ ret = fi_close(&rstream_pep->pep_fd->fid); ++ if (ret) ++ return ret; ++ ++ ofi_pep_close(&rstream_pep->util_pep); ++ free(rstream_pep); ++ ++ return ret; ++} ++ ++static struct fi_ops rstream_pep_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_pep_close, ++ .bind = rstream_pep_bind, ++ .control = rstream_pep_ctrl, ++ .ops_open = fi_no_ops_open, ++}; ++ ++int rstream_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context) ++{ ++ int ret; ++ struct rstream_fabric *rstream_fabric = container_of(fabric, ++ struct rstream_fabric, util_fabric.fabric_fid); ++ struct rstream_pep *rstream_pep; ++ ++ rstream_pep = calloc(1, sizeof(*rstream_pep)); ++ if (!rstream_pep) ++ return -FI_ENOMEM; ++ ++ rstream_info_to_core(FI_VERSION(1, 7), NULL, info); ++ ++ ret = fi_passive_ep(rstream_fabric->msg_fabric, info, ++ &rstream_pep->pep_fd, NULL); ++ if (ret) ++ goto err1; ++ ++ *pep = &rstream_pep->util_pep.pep_fid; ++ (*pep)->fid.fclass = FI_CLASS_PEP; ++ (*pep)->fid.ops = &rstream_pep_fi_ops; ++ (*pep)->ops = &rstream_ops_ep; ++ (*pep)->cm = &rstream_ops_pep_cm; ++ ++ return 0; ++ ++err1: ++ free(rstream_pep); ++ return ret; ++} ++ ++void rstream_process_cm_event(struct rstream_ep *ep, void *cm_data) ++{ ++ assert(ep && cm_data); ++ ++ int i; ++ struct rstream_cm_data *rcv_data = (struct rstream_cm_data *)cm_data; ++ ++ assert(rcv_data->version == RSTREAM_RSOCKETV2); ++ ++ ep->qp_win.target_rx_credits = ntohs(rcv_data->max_rx_credits); ++ ep->qp_win.max_target_rx_credits = ep->qp_win.target_rx_credits; ++ ep->remote_data.rkey = ntohll(rcv_data->rkey); ++ ep->remote_data.mr.data_start = (void *)ntohll(rcv_data->base_addr); ++ ep->remote_data.mr.size = ntohl(rcv_data->rmr_size); ++ ep->remote_data.mr.avail_size = ep->remote_data.mr.size; ++ ++ for(i = 0; i < ep->qp_win.max_rx_credits; i++) { ++ rstream_post_cq_data_recv(ep, NULL); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_eq.c +new file mode 100644 +index 0000000..8aee314 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_eq.c +@@ -0,0 +1,234 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++static int rstream_eq_events(uint32_t *event, struct fi_eq_cm_entry *cm_entry, ++ struct fi_eq_cm_entry *usr_cm_entry, struct rstream_eq *rstream_eq) ++{ ++ int ret = 0; ++ ++ if (*event == FI_CONNREQ) { ++ /* have to store to transfer to ep during FI_CONNECT */ ++ if (cm_entry->info) { ++ usr_cm_entry->info = cm_entry->info; ++ rstream_set_info(usr_cm_entry->info); ++ } ++ } else if (*event == FI_CONNECTED) { ++ struct rstream_ep *rstream_ep = NULL; ++ void *itr = rbtFind(rstream_eq->ep_map, cm_entry->fid); ++ assert(itr); ++ rbtKeyValue(rstream_eq->ep_map, itr, ++ (void **) &cm_entry->fid, (void **) &rstream_ep); ++ rstream_process_cm_event(rstream_ep, cm_entry->data); ++ usr_cm_entry->fid = &rstream_ep->util_ep.ep_fid.fid; ++ } else { ++ ret = -FI_ENODATA; ++ } ++ rstream_eq->prev_cm_state = *event; ++ return ret; ++} ++ ++static ssize_t rstream_read(struct fid_eq *eq, uint32_t *event, ++ void *buf, size_t len, uint64_t flags) ++{ ++ uint32_t rlen = sizeof(struct fi_eq_cm_entry); ++ assert(len == rlen && event); ++ struct fi_eq_cm_entry *usr_cm_entry = (struct fi_eq_cm_entry *) buf; ++ ssize_t ret; ++ struct fi_eq_cm_entry *cm_entry = NULL; ++ ++ struct rstream_eq *rstream_eq = container_of(eq, ++ struct rstream_eq, util_eq.eq_fid); ++ ++ cm_entry = rstream_eq->cm_entry; ++ assert(cm_entry); ++ ++ if (rstream_eq->prev_cm_state != FI_CONNREQ) { ++ rlen = rlen + rstream_eq->cm_data_len; ++ } ++ ++ ret = fi_eq_read(rstream_eq->eq_fd, event, cm_entry, rlen, flags); ++ if (ret == rlen) { ++ ret = rstream_eq_events(event, cm_entry, usr_cm_entry, rstream_eq); ++ if (ret) ++ return ret; ++ } else { ++ return ret; ++ } ++ ++ return len; ++} ++ ++static ssize_t rstream_readerr(struct fid_eq *eq, struct fi_eq_err_entry *buf, ++ uint64_t flags) ++{ ++ struct rstream_eq *rstream_eq = container_of(eq, ++ struct rstream_eq, util_eq.eq_fid); ++ ++ return fi_eq_readerr(rstream_eq->eq_fd, buf, flags); ++} ++ ++static ssize_t rstream_sread(struct fid_eq *eq, uint32_t *event, ++ void *buf, size_t len, int timeout, uint64_t flags) ++{ ++ uint32_t rlen = sizeof(struct fi_eq_cm_entry); ++ assert(len == rlen && event); ++ struct fi_eq_cm_entry *usr_cm_entry = (struct fi_eq_cm_entry *) buf; ++ ssize_t ret; ++ struct fi_eq_cm_entry *cm_entry = NULL; ++ ++ struct rstream_eq *rstream_eq = container_of(eq, ++ struct rstream_eq, util_eq.eq_fid); ++ ++ cm_entry = rstream_eq->cm_entry; ++ assert(cm_entry); ++ ++ if (rstream_eq->prev_cm_state != FI_CONNREQ) { ++ rlen = rlen + rstream_eq->cm_data_len; ++ } ++ ++ ret = fi_eq_sread(rstream_eq->eq_fd, event, cm_entry, rlen, timeout, ++ flags); ++ if (ret == rlen) { ++ ret = rstream_eq_events(event, cm_entry, usr_cm_entry, rstream_eq); ++ if (ret) ++ return ret; ++ } else { ++ return ret; ++ } ++ ++ return len; ++} ++ ++static const char *rstream_strerror(struct fid_eq *eq, int prov_errno, ++ const void *err_data, char *buf, size_t len) ++{ ++ struct rstream_eq *rstream_eq = container_of(eq, struct rstream_eq, ++ util_eq.eq_fid); ++ ++ return fi_eq_strerror(rstream_eq->eq_fd, prov_errno, err_data, buf, len); ++} ++ ++static int rstream_eq_control(fid_t fid, int command, void *arg) ++{ ++ struct rstream_eq *rstream_eq = container_of(fid, struct rstream_eq, ++ util_eq.eq_fid.fid); ++ int ret; ++ ++ switch (command) { ++ case FI_GETWAIT: ++ ret = fi_control(&rstream_eq->eq_fd->fid, FI_GETWAIT, arg); ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ return ret; ++} ++ ++static int rstream_eq_close(fid_t fid) ++{ ++ struct rstream_eq *rstream_eq = ++ container_of(fid, struct rstream_eq, util_eq.eq_fid.fid); ++ int ret; ++ ++ ret = fi_close(&rstream_eq->eq_fd->fid); ++ if (ret) ++ return ret; ++ ++ free(rstream_eq->cm_entry); ++ free(rstream_eq); ++ return ret; ++} ++ ++static struct fi_ops_eq rstream_ops_eq = { ++ .size = sizeof(struct fi_ops_eq), ++ .read = rstream_read, ++ .readerr = rstream_readerr, ++ .write = fi_no_eq_write, ++ .sread = rstream_sread, ++ .strerror = rstream_strerror, ++}; ++ ++static struct fi_ops rstream_fid_ops_eq = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_eq_close, ++ .bind = fi_no_bind, ++ .control = rstream_eq_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++/* assumes uint64_t keys */ ++static int compare_mr_keys(void *key1, void *key2) ++{ ++ uint64_t k1 = *((uint64_t *) key1); ++ uint64_t k2 = *((uint64_t *) key2); ++ ++ return (k1 < k2) ? -1 : (k1 > k2); ++} ++ ++int rstream_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, ++ struct fid_eq **eq, void *context) ++{ ++ struct rstream_fabric *rstream_fabric = NULL; ++ struct rstream_eq *rstream_eq; ++ int ret; ++ ++ rstream_eq = calloc(1, sizeof(*rstream_eq)); ++ if (!rstream_eq) ++ return -FI_ENOMEM; ++ ++ rstream_fabric = container_of(fabric, struct rstream_fabric, ++ util_fabric.fabric_fid); ++ ++ ret = fi_eq_open(rstream_fabric->msg_fabric, attr, &rstream_eq->eq_fd, ++ NULL); ++ if (ret) ++ goto err1; ++ ++ (*eq) = &rstream_eq->util_eq.eq_fid; ++ (*eq)->fid.fclass = FI_CLASS_EQ; ++ (*eq)->fid.context = context; ++ (*eq)->ops = &rstream_ops_eq; ++ (*eq)->fid.ops = &rstream_fid_ops_eq; ++ rstream_eq->cm_data_len = sizeof(struct rstream_cm_data); ++ rstream_eq->cm_entry = calloc(1, sizeof(struct fi_eq_cm_entry) + ++ rstream_eq->cm_data_len); ++ rstream_eq->ep_map = rbtNew(compare_mr_keys); ++ rstream_eq->prev_cm_state = FI_NOTIFY; ++ ++ return ret; ++err1: ++ free(rstream_eq); ++ ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_fabric.c +new file mode 100644 +index 0000000..632ae6c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_fabric.c +@@ -0,0 +1,144 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++static int rstream_fabric_close(fid_t fid) ++{ ++ struct rstream_fabric *rstream_fabric = ++ container_of(fid, struct rstream_fabric, ++ util_fabric.fabric_fid.fid); ++ int ret; ++ ++ ret = fi_close(&rstream_fabric->msg_fabric->fid); ++ if (ret) ++ return ret; ++ ++ ret = ofi_fabric_close(&rstream_fabric->util_fabric); ++ if (ret) ++ return ret; ++ ++ free(rstream_fabric); ++ return 0; ++} ++ ++static int rstream_control(struct fid *fid, int command, void *arg) ++{ ++ return -FI_ENOSYS; ++} ++ ++int rstream_trywait(struct fid_fabric *fabric, struct fid **fids, int count) ++{ ++ int ret; ++ struct rstream_ep *rstream_ep; ++ struct rstream_fabric *rstream_fabric; ++ int num_fids = 1; ++ struct fid *rstream_fids[num_fids]; ++ ++ if (count != num_fids) ++ return -FI_ENOSYS; ++ ++ if (fids[0]->fclass == FI_CLASS_EP) { ++ rstream_ep = container_of(fids[0], struct rstream_ep, ++ util_ep.ep_fid.fid); ++ rstream_fabric = container_of(fabric, struct rstream_fabric, ++ util_fabric.fabric_fid); ++ rstream_fids[0] = &rstream_ep->cq->fid; ++ ret = fi_trywait(rstream_fabric->msg_fabric, rstream_fids, ++ num_fids); ++ return ret; ++ } ++ ++ return -FI_EINVAL; ++} ++ ++static struct fi_ops rstream_fabric_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_fabric_close, ++ .bind = fi_no_bind, ++ .control = rstream_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_fabric rstream_fabric_ops = { ++ .size = sizeof(struct fi_ops_fabric), ++ .domain = rstream_domain_open, ++ .passive_ep = rstream_passive_ep, ++ .eq_open = rstream_eq_open, ++ .wait_open = fi_no_wait_open, ++ .trywait = rstream_trywait ++}; ++ ++int rstream_fabric_open(struct fi_fabric_attr *attr, struct fid_fabric **fabric, ++ void *context) ++{ ++ struct rstream_fabric *rstream_fabric; ++ int ret; ++ struct fi_info *info = NULL; ++ ++ rstream_fabric = calloc(1, sizeof(*rstream_fabric)); ++ if (!rstream_fabric) ++ return -FI_ENOMEM; ++ ++ ret = ofi_fabric_init(&rstream_prov, &rstream_fabric_attr, attr, ++ &rstream_fabric->util_fabric, context); ++ if (ret) ++ goto err1; ++ ++ ret = ofi_get_core_info_fabric(&rstream_prov, attr, &info); ++ if (ret) { ++ FI_WARN(&rstream_prov, FI_LOG_FABRIC, "core info failed\n"); ++ ret = -FI_EINVAL; ++ goto err1; ++ } ++ ++ ret = fi_fabric(info->fabric_attr, &rstream_fabric->msg_fabric, context); ++ if (ret) { ++ FI_WARN(&rstream_prov, FI_LOG_FABRIC, "fi_fabric failed\n"); ++ ret = -FI_EINVAL; ++ goto err1; ++ } ++ ++ *fabric = &rstream_fabric->util_fabric.fabric_fid; ++ (*fabric)->fid.ops = &rstream_fabric_fi_ops; ++ (*fabric)->ops = &rstream_fabric_ops; ++ ++ fi_freeinfo(info); ++ return 0; ++err1: ++ free(rstream_fabric); ++ if (info) ++ fi_freeinfo(info); ++ ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_init.c +new file mode 100644 +index 0000000..08cfe59 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_init.c +@@ -0,0 +1,181 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++#include ++#include ++#include ++ ++ ++static void rstream_iwarp_settings(struct fi_info *core_info) ++{ ++ core_info->ep_attr->max_msg_size = 2147483647; ++ core_info->domain_attr->cq_data_size = 0; ++ core_info->domain_attr->mr_cnt = 2289662; ++ core_info->mode = FI_CONTEXT; ++} ++ ++static void rstream_default_settings(struct fi_info *core_info) ++{ ++ core_info->mode = FI_RX_CQ_DATA | FI_CONTEXT; ++ core_info->rx_attr->mode = FI_RX_CQ_DATA; ++} ++ ++int rstream_info_to_core(uint32_t version, const struct fi_info *irstream_info, ++ struct fi_info *core_info) ++{ ++ core_info->ep_attr->type = FI_EP_MSG; ++ core_info->ep_attr->protocol = FI_PROTO_UNSPEC; ++ core_info->caps = FI_RMA | FI_MSG; ++ core_info->domain_attr->caps = FI_LOCAL_COMM | FI_REMOTE_COMM; ++ core_info->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ core_info->tx_attr->op_flags = FI_COMPLETION; ++ core_info->rx_attr->op_flags = FI_COMPLETION; ++ core_info->fabric_attr->api_version = FI_VERSION(1, 7); ++ core_info->fabric_attr->prov_version = FI_VERSION(1, 0); ++ (RSTREAM_USING_IWARP) ? rstream_iwarp_settings(core_info): ++ rstream_default_settings(core_info); ++ ++ return 0; ++} ++ ++static void update_rstream_info(const struct fi_info *core_info) ++{ ++ rstream_info.tx_attr->iov_limit = core_info->tx_attr->iov_limit; ++ rstream_info.rx_attr->iov_limit = core_info->rx_attr->iov_limit; ++ rstream_info.tx_attr->size = core_info->tx_attr->size; ++ rstream_info.rx_attr->size = core_info->rx_attr->size; ++ rstream_info.domain_attr->max_ep_rx_ctx = ++ core_info->domain_attr->max_ep_rx_ctx; ++ rstream_info.domain_attr->max_ep_srx_ctx = ++ core_info->domain_attr->max_ep_srx_ctx; ++ rstream_info.ep_attr->max_msg_size = ++ core_info->ep_attr->max_msg_size; ++ rstream_info.rx_attr->iov_limit = core_info->rx_attr->iov_limit; ++ rstream_info.domain_attr->cq_data_size = ++ core_info->domain_attr->cq_data_size; ++ rstream_info.domain_attr->cq_cnt = core_info->domain_attr->cq_cnt; ++ rstream_info.domain_attr->ep_cnt = core_info->domain_attr->ep_cnt; ++ rstream_info.domain_attr->max_err_data = ++ core_info->domain_attr->max_err_data; ++} ++ ++int rstream_info_to_rstream(uint32_t version, const struct fi_info *core_info, ++ struct fi_info *info) ++{ ++ info->caps = RSTREAM_CAPS; ++ info->mode = 0; ++ ++ *info->tx_attr = *rstream_info.tx_attr; ++ *info->rx_attr = *rstream_info.rx_attr; ++ *info->domain_attr = *rstream_info.domain_attr; ++ *info->ep_attr = *rstream_info.ep_attr; ++ info->fabric_attr->api_version = FI_VERSION(1, 7); ++ info->fabric_attr->prov_version = FI_VERSION(1, 0); ++ update_rstream_info(core_info); ++ ++ return 0; ++} ++ ++static int rstream_getinfo(uint32_t version, const char *node, ++ const char *service, uint64_t flags, const struct fi_info *hints, ++ struct fi_info **info) ++{ ++ struct fi_info *cur; ++ struct addrinfo *ai; ++ uint16_t port_save = 0; ++ int ret; ++ ++ if (!info) ++ return -FI_EINVAL; ++ ++ if (hints && hints->ep_attr->protocol == FI_PROTO_IWARP) { ++ rstream_info.ep_attr->protocol = FI_PROTO_IWARP; ++ rstream_info.tx_attr->iov_limit = 3; ++ rstream_info.rx_attr->iov_limit = 3; ++ rstream_info.domain_attr->max_ep_srx_ctx = 0; ++ } ++ ++ /* Avoid getting wild card address from MSG provider */ ++ if (ofi_is_wildcard_listen_addr(node, service, flags, hints)) { ++ if (service) { ++ ret = getaddrinfo(NULL, service, NULL, &ai); ++ if (ret) { ++ FI_WARN(&rstream_prov, FI_LOG_CORE, ++ "Unable to getaddrinfo\n"); ++ return ret; ++ } ++ port_save = ofi_addr_get_port(ai->ai_addr); ++ freeaddrinfo(ai); ++ service = NULL; ++ } ++ } ++ ++ ret = ofix_getinfo(version, node, service, flags, &rstream_util_prov, ++ hints, rstream_info_to_core, rstream_info_to_rstream, info); ++ if (ret) ++ return ret; ++ ++ if (port_save) { ++ for (cur = *info; cur; cur = cur->next) { ++ assert(cur->src_addr); ++ ofi_addr_set_port(cur->src_addr, port_save); ++ } ++ } ++ ++ return ret; ++} ++ ++static void rstream_fini(void) ++{ ++ /* yawn */ ++} ++ ++struct fi_provider rstream_prov = { ++ .name = OFI_UTIL_PREFIX "rstream", ++ .version = FI_VERSION(1 ,0), ++ .fi_version = FI_VERSION(1, 7), ++ .getinfo = rstream_getinfo, ++ .fabric = rstream_fabric_open, ++ .cleanup = rstream_fini ++}; ++ ++struct util_prov rstream_util_prov = { ++ .prov = &rstream_prov, ++ .info = &rstream_info, ++ .flags = 0, ++}; ++ ++RSTREAM_INI ++{ ++ return &rstream_prov; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_msg.c +new file mode 100644 +index 0000000..9b5451c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_msg.c +@@ -0,0 +1,742 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++#include ++#include ++ ++ ++ssize_t rstream_process_cq(struct rstream_ep *ep, enum rstream_msg_type type); ++ ++static uint32_t rstream_cq_data_get_len(uint32_t cq_data) ++{ ++ return (cq_data & RSTREAM_MR_LEN_MASK); ++} ++ ++static uint32_t rstream_cq_data_set(struct rstream_cq_data cq_data) ++{ ++ uint32_t credits = cq_data.num_completions; ++ ++ assert(cq_data.num_completions < RSTREAM_CREDITS_MAX); ++ assert(cq_data.total_len < RSTREAM_MR_MAX); ++ ++ credits = credits << RSTREAM_CREDIT_OFFSET; ++ return credits | cq_data.total_len; ++} ++ ++static uint16_t rstream_cq_data_get_credits(uint32_t cq_data) ++{ ++ uint32_t credits = cq_data & RSTREAM_CREDIT_MASK; ++ ++ credits = (credits >> RSTREAM_CREDIT_OFFSET); ++ assert(credits < RSTREAM_CREDITS_MAX); ++ ++ return credits; ++} ++ ++static uint32_t rstream_iwarp_cq_data_is_msg(uint32_t cq_data) { ++ return cq_data & RSTREAM_IWARP_MSG_BIT; ++} ++ ++ ++static uint32_t rstream_iwarp_cq_data_set_msg_len(uint32_t msg_len) ++{ ++ assert(msg_len < RSTREAM_IWARP_IMM_MSG_LEN); ++ ++ uint32_t cq_data = msg_len; ++ ++ return cq_data | RSTREAM_IWARP_MSG_BIT; ++} ++ ++static uint32_t rstream_iwarp_cq_data_get_msg_len(uint32_t cq_data) ++{ ++ uint32_t msg_len = cq_data & RSTREAM_IWARP_MSG_BIT_MASK; ++ ++ assert(msg_len < RSTREAM_IWARP_IMM_MSG_LEN); ++ ++ return msg_len; ++} ++ ++static char *rstream_get_next_recv_buffer(struct rstream_ep *ep) ++{ ++ char *base_ptr = (char *)ep->local_mr.tx.data_start + ++ ep->local_mr.tx.size; ++ uint64_t *offset = &ep->local_mr.recv_buffer_offset; ++ const uint32_t full_size = RSTREAM_IWARP_DATA_SIZE * ++ ep->qp_win.max_rx_credits; ++ char *buffer = base_ptr + *offset; ++ ++ assert((void *)buffer < ep->local_mr.rx.data_start); ++ *offset = (*offset + RSTREAM_IWARP_DATA_SIZE) % full_size; ++ ++ return buffer; ++} ++ ++/*assuming rx_ctxs are always fully used */ ++static struct fi_context *rstream_get_rx_ctx(struct rstream_ep *ep) ++{ ++ struct fi_context *ctx; ++ ++ if (ep->rx_ctx_index == ep->qp_win.max_rx_credits) ++ return NULL; ++ ++ ctx = &ep->rx_ctxs[ep->rx_ctx_index]; ++ ep->rx_ctx_index = ep->rx_ctx_index + 1; ++ ++ return ctx; ++} ++ ++static struct fi_context *rstream_get_tx_ctx(struct rstream_ep *ep, int len) ++{ ++ struct rstream_tx_ctx_fs *fs = ep->tx_ctxs; ++ struct rstream_ctx_data *rtn_ctx = freestack_pop(fs); ++ ++ if (!rtn_ctx) ++ return NULL; ++ ++ rtn_ctx->len = len; ++ return &rtn_ctx->ctx; ++} ++ ++static int rstream_return_tx_ctx(struct fi_context *ctx_ptr, ++ struct rstream_ep *ep) ++{ ++ int len; ++ struct rstream_tx_ctx_fs *fs = ep->tx_ctxs; ++ ++ struct rstream_ctx_data *ctx_data = (struct rstream_ctx_data *)ctx_ptr; ++ len = ctx_data->len; ++ freestack_push(fs, ctx_data); ++ ++ return len; ++} ++ ++static ssize_t rstream_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ return -FI_ENOSYS; ++} ++ ++static ssize_t rstream_print_cq_error(struct fid_cq *cq) ++{ ++ ssize_t ret; ++ struct fi_cq_err_entry cq_entry = {0}; ++ const char *errmsg; ++ ++ ret = fi_cq_readerr(cq, &cq_entry, 0); ++ if (cq_entry.err == FI_ENOMSG) { ++ ret = FI_ENOMSG; ++ return ret; ++ } ++ ++ errmsg = fi_cq_strerror(cq, cq_entry.prov_errno, ++ cq_entry.err_data, NULL, 0); ++ fprintf(stderr, "CQ error msg: %s\n", errmsg); ++ ++ return ret; ++} ++ ++static void rstream_update_tx_credits(struct rstream_ep *ep, ++ uint16_t num_completions) ++{ ++ assert(num_completions == 1); ++ ++ if(ep->qp_win.ctrl_credits < RSTREAM_MAX_CTRL) ++ ep->qp_win.ctrl_credits++; ++ else ++ ep->qp_win.tx_credits++; ++ ++ assert(ep->qp_win.tx_credits <= ep->qp_win.max_tx_credits); ++} ++ ++static int rstream_timer_completed(struct rstream_timer *timer) ++{ ++ if (!timer->poll_time) ++ gettimeofday(&timer->start, NULL); ++ ++ gettimeofday(&timer->end, NULL); ++ timer->poll_time = (timer->end.tv_sec - timer->start.tv_sec) * 1000000 + ++ (timer->end.tv_usec - timer->start.tv_usec); ++ ++ return (timer->poll_time > RSTREAM_MAX_POLL_TIME); ++} ++ ++static int rstream_tx_mr_full(struct rstream_ep *ep) ++{ ++ return !(ep->local_mr.tx.avail_size); ++} ++ ++static int rstream_target_mr_full(struct rstream_ep *ep) ++{ ++ return !(ep->remote_data.mr.avail_size); ++} ++ ++static int rstream_tx_full(struct rstream_ep *ep) ++{ ++ return (ep->qp_win.tx_credits == 0); ++} ++ ++static int rstream_target_rx_full(struct rstream_ep *ep) ++{ ++ return ((ep->qp_win.target_rx_credits - RSTREAM_MAX_CTRL) == 0); ++} ++ ++static uint32_t rstream_calc_contig_len(struct rstream_mr_seg *mr) ++{ ++ if (!mr->avail_size) { ++ assert(mr->start_offset == mr->end_offset); ++ return 0; ++ } else if (mr->start_offset < mr->end_offset) { ++ return (mr->end_offset - mr->start_offset); ++ } else { ++ return (mr->size - mr->start_offset); ++ } ++} ++ ++static uint32_t rstream_alloc_contig_len_available(struct rstream_mr_seg *mr, ++ char **data_addr, uint32_t req_len) ++{ ++ uint32_t len_available = rstream_calc_contig_len(mr); ++ uint32_t len; ++ ++ *data_addr = (char *)mr->data_start; ++ assert(len_available <= mr->avail_size); ++ ++ if (!len_available) ++ return 0; ++ ++ *data_addr = *data_addr + mr->start_offset; ++ len = (len_available < req_len) ? len_available : req_len; ++ assert(mr->avail_size >= len); ++ mr->avail_size = mr->avail_size - len; ++ mr->start_offset = (mr->start_offset + len) % mr->size; ++ ++ return len; ++} ++ ++static void rstream_free_contig_len(struct rstream_mr_seg *mr, uint32_t len) ++{ ++ assert((mr->avail_size + len) <= mr->size); ++ mr->avail_size = mr->avail_size + len; ++ mr->end_offset = (mr->end_offset + len) % mr->size; ++} ++ ++static ssize_t rstream_send_ctrl_msg(struct rstream_ep *ep, uint32_t cq_data) ++{ ++ ssize_t ret = 0; ++ struct fi_msg msg; ++ ++ if (!ep->qp_win.ctrl_credits || (ep->qp_win.target_rx_credits == 0)) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ if (RSTREAM_USING_IWARP) { ++ ret = fi_inject(ep->ep_fd, &cq_data, RSTREAM_IWARP_DATA_SIZE, 0); ++ if (ret != 0) ++ goto out; ++ } else { ++ msg.msg_iov = NULL; ++ msg.desc = NULL; ++ msg.iov_count = 0; ++ msg.context = rstream_get_tx_ctx(ep, 0); ++ msg.data = cq_data; ++ ++ ret = fi_sendmsg(ep->ep_fd, &msg, FI_REMOTE_CQ_DATA); ++ if (ret != 0) ++ goto out; ++ ++ if (ep->qp_win.tx_credits > 0) ++ ep->qp_win.tx_credits--; ++ else ++ ep->qp_win.ctrl_credits--; ++ } ++ ++ assert(ep->qp_win.target_rx_credits > 0); ++ ep->qp_win.target_rx_credits--; ++ ++out: ++ return ret; ++} ++ ++/* accumulate data in tx_cq exhaustion case */ ++static ssize_t rstream_update_target(struct rstream_ep *ep, ++ uint16_t num_completions, uint32_t len) ++{ ++ uint32_t cq_data; ++ ssize_t ret = 0; ++ ++ ep->rx_cq_data.num_completions = ++ ep->rx_cq_data.num_completions + num_completions; ++ ep->rx_cq_data.total_len = ep->rx_cq_data.total_len + len; ++ ++ if ((ep->rx_cq_data.num_completions >= ep->qp_win.max_rx_credits / 2) || ++ (ep->rx_cq_data.total_len >= ep->local_mr.rx.size / 2)) { ++ ++ cq_data = rstream_cq_data_set(ep->rx_cq_data); ++ ++ ret = rstream_send_ctrl_msg(ep, cq_data); ++ if (ret == 0) { ++ FI_DBG(&rstream_prov, FI_LOG_EP_CTRL, ++ "ctrl msg update %u = completions %u = len \n", ++ ep->rx_cq_data.num_completions, ++ ep->rx_cq_data.total_len); ++ ep->rx_cq_data.num_completions = 0; ++ ep->rx_cq_data.total_len = 0; ++ } ++ } ++ ++ return ret; ++} ++ ++ssize_t rstream_process_rx_cq_data(struct rstream_ep *ep, ++ const struct fi_cq_data_entry *cq_entry) ++{ ++ uint16_t recvd_credits; ++ uint32_t recvd_len; ++ ++ if (cq_entry->data != 0) { ++ recvd_credits = rstream_cq_data_get_credits(cq_entry->data); ++ recvd_len = rstream_cq_data_get_len(cq_entry->data); ++ ++ ep->qp_win.target_rx_credits += recvd_credits; ++ assert(ep->qp_win.target_rx_credits <= ++ ep->qp_win.max_target_rx_credits); ++ ++ rstream_free_contig_len(&ep->remote_data.mr, recvd_len); ++ FI_DBG(&rstream_prov, FI_LOG_EP_CTRL, ++ "recvd: ctrl msg %u = completions %u = len \n", ++ recvd_credits, recvd_len); ++ } else { ++ rstream_free_contig_len(&ep->local_mr.rx, cq_entry->len); ++ } ++ ++ return rstream_post_cq_data_recv(ep, cq_entry); ++} ++ ++static void format_iwarp_cq_data(struct rstream_ep *ep, ++ struct fi_cq_data_entry *cq_entry) ++{ ++ uint32_t cq_data; ++ ++ cq_entry->buf = rstream_get_next_recv_buffer(ep); ++ cq_data = *((uint32_t *)cq_entry->buf); ++ ++ if(rstream_iwarp_cq_data_is_msg(cq_data)) { ++ cq_entry->data = 0; ++ cq_entry->len = rstream_iwarp_cq_data_get_msg_len(cq_data); ++ } else { ++ cq_entry->data = cq_data; ++ cq_entry->len = 0; ++ } ++} ++ ++static enum rstream_msg_type rstream_cqe_msg_type(struct rstream_ep *ep, ++ struct fi_cq_data_entry *cq_entry) ++{ ++ enum rstream_msg_type type = RSTREAM_MSG_UNKNOWN; ++ ++ if (cq_entry->flags & FI_REMOTE_WRITE || cq_entry->flags & FI_RECV || ++ cq_entry->flags & FI_REMOTE_CQ_DATA) { ++ if (RSTREAM_USING_IWARP) ++ format_iwarp_cq_data(ep, cq_entry); ++ ++ if (cq_entry->data) { ++ type = RSTREAM_CTRL_MSG; ++ } else { ++ type = RSTREAM_RX_MSG_COMP; ++ } ++ } else if (cq_entry->flags & FI_WRITE || cq_entry->flags & FI_SEND) { ++ type = RSTREAM_TX_MSG_COMP; ++ } ++ ++ return type; ++} ++ ++static ssize_t rstream_check_cq(struct rstream_ep *ep, ++ struct fi_cq_data_entry *completion_entry) ++{ ++ const int max_num = 1; ++ ssize_t ret; ++ ++ ret = fi_cq_read(ep->cq, completion_entry, max_num); ++ if (ret < 0 && ret != -FI_EAGAIN) { ++ if (ret == -FI_EAVAIL) { ++ ret = rstream_print_cq_error(ep->cq); ++ fprintf(stderr, "error from %s:%d\n", __FILE__, __LINE__); ++ return ret; ++ } ++ } ++ assert(ret == -FI_EAGAIN || ret == max_num); ++ ++ return ret; ++} ++ ++ssize_t rstream_process_cq(struct rstream_ep *ep, enum rstream_msg_type type) ++{ ++ struct fi_cq_data_entry cq_entry; ++ ssize_t ret, data_ret; ++ ssize_t found_msg_type = 0; ++ uint16_t rx_completions = 0; ++ struct rstream_timer timer = {.poll_time = 0}; ++ enum rstream_msg_type comp_type; ++ int len; ++ ++ fastlock_acquire(&ep->cq_lock); ++ do { ++ ret = rstream_check_cq(ep, &cq_entry); ++ if (ret == 1) { ++ comp_type = rstream_cqe_msg_type(ep, &cq_entry); ++ ++ if (comp_type == type) ++ found_msg_type++; ++ ++ if (comp_type == RSTREAM_CTRL_MSG || ++ comp_type == RSTREAM_RX_MSG_COMP) { ++ data_ret = rstream_process_rx_cq_data(ep, &cq_entry); ++ if (data_ret) { ++ fprintf(stderr, "error from %s:%d\n", ++ __FILE__, __LINE__); ++ ret = data_ret; ++ goto out; ++ } ++ rx_completions++; ++ } else if (comp_type == RSTREAM_TX_MSG_COMP) { ++ len = rstream_return_tx_ctx(cq_entry.op_context, ep); ++ rstream_update_tx_credits(ep, ret); ++ rstream_free_contig_len(&ep->local_mr.tx, len); ++ } else { ++ ret = -FI_ENOMSG; ++ goto out; ++ } ++ } else if (ret != -FI_EAGAIN) { ++ goto out; ++ } ++ } while ((ret == -FI_EAGAIN && !rstream_timer_completed(&timer) && ++ !found_msg_type) || (found_msg_type && ret > 0)); ++ ++ ret = rstream_update_target(ep, rx_completions, 0); ++ fastlock_release(&ep->cq_lock); ++ if (ret) ++ return ret; ++ ++ if (found_msg_type) ++ return found_msg_type; ++ else ++ return -FI_EAGAIN; ++out: ++ fastlock_release(&ep->cq_lock); ++ return ret; ++} ++ ++static uint32_t get_send_addrs_and_len(struct rstream_ep *ep, char **tx_addr, ++ char **dest_addr, uint32_t requested_len) ++{ ++ uint32_t available_len = 0; ++ ++ requested_len = MIN(MIN(requested_len, ++ rstream_calc_contig_len(&ep->local_mr.tx)), ++ rstream_calc_contig_len(&ep->remote_data.mr)); ++ if (requested_len == 0) ++ return available_len; ++ ++ available_len = rstream_alloc_contig_len_available(&ep->local_mr.tx, ++ tx_addr, requested_len); ++ available_len = rstream_alloc_contig_len_available(&ep->remote_data.mr, ++ dest_addr, requested_len); ++ ++ return available_len; ++} ++ ++static ssize_t rstream_can_send(struct rstream_ep *ep) ++{ ++ ssize_t ret; ++ ++ if (rstream_tx_mr_full(ep) || rstream_target_mr_full(ep) || ++ rstream_target_rx_full(ep)) { ++ ret = rstream_process_cq(ep, RSTREAM_CTRL_MSG); ++ if (ret < 0) ++ return ret; ++ } ++ ++ if (rstream_tx_full(ep)) { ++ ret = rstream_process_cq(ep, RSTREAM_TX_MSG_COMP); ++ if (ret < 0) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static ssize_t rstream_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct rstream_ep *ep = container_of(ep_fid, struct rstream_ep, ++ util_ep.ep_fid); ++ uint32_t cq_data = 0; ++ ssize_t ret; ++ char *tx_addr = NULL; ++ char *remote_addr = NULL; ++ size_t sent_len = 0; ++ uint32_t curr_avail_len = len; ++ void *ctx; ++ ++ fastlock_acquire(&ep->send_lock); ++ do { ++ ret = rstream_can_send(ep); ++ if (ret < 0) { ++ if (ret < 0 && ret != -FI_EAGAIN) { ++ goto err; ++ } else { ++ fastlock_release(&ep->send_lock); ++ return ((sent_len) ? sent_len : ret); ++ } ++ } ++ ++ curr_avail_len = get_send_addrs_and_len(ep, &tx_addr, ++ &remote_addr, curr_avail_len); ++ if (curr_avail_len == 0) ++ break; ++ ++ memcpy(tx_addr, ((char *)buf + sent_len), curr_avail_len); ++ sent_len = sent_len + curr_avail_len; ++ ctx = rstream_get_tx_ctx(ep, curr_avail_len); ++ ++ if (RSTREAM_USING_IWARP) { ++ ret = fi_write(ep->ep_fd, tx_addr, curr_avail_len, ++ ep->local_mr.ldesc, 0, (uint64_t)remote_addr, ++ ep->remote_data.rkey, ctx); ++ ret = rstream_send_ctrl_msg(ep, ++ rstream_iwarp_cq_data_set_msg_len(curr_avail_len)); ++ } else { ++ ret = fi_writedata(ep->ep_fd, tx_addr, curr_avail_len, ++ ep->local_mr.ldesc, cq_data, 0, (uint64_t)remote_addr, ++ ep->remote_data.rkey, ctx); ++ } ++ if (ret != 0) { ++ FI_DBG(&rstream_prov, FI_LOG_EP_DATA, ++ "error: fi_write failed: %zd", ret); ++ goto err; ++ } ++ curr_avail_len = len - sent_len; ++ ++ if (!RSTREAM_USING_IWARP) ++ ep->qp_win.target_rx_credits--; ++ ++ ep->qp_win.tx_credits--; ++ ++ } while(curr_avail_len); /* circle buffer rollover requires two loops */ ++ ++ fastlock_release(&ep->send_lock); ++ return sent_len; ++ ++err: ++ fastlock_release(&ep->send_lock); ++ return ret; ++} ++ ++static ssize_t rstream_sendv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static ssize_t rstream_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ int ret; ++ struct rstream_ep *ep = container_of(ep_fid, struct rstream_ep, ++ util_ep.ep_fid); ++ ++ if (flags == FI_PEEK) { ++ fastlock_acquire(&ep->send_lock); ++ ret = rstream_can_send(ep); ++ fastlock_release(&ep->send_lock); ++ return ret; ++ } else { ++ return -FI_ENOSYS; ++ } ++} ++ ++/* either posting everything at once or reposting after cq completion */ ++ssize_t rstream_post_cq_data_recv(struct rstream_ep *ep, ++ const struct fi_cq_data_entry *cq_entry) ++{ ++ struct fi_context *context = NULL; ++ struct fi_msg msg; ++ struct iovec imsg; ++ void *buffer; ++ ssize_t ret; ++ ++ if (!cq_entry || !cq_entry->op_context) ++ context = rstream_get_rx_ctx(ep); ++ else if (cq_entry && cq_entry->op_context) ++ context = cq_entry->op_context; ++ ++ if (RSTREAM_USING_IWARP) { ++ buffer = (cq_entry && cq_entry->buf) ? cq_entry->buf : ++ rstream_get_next_recv_buffer(ep); ++ assert(buffer); ++ imsg.iov_base = buffer; ++ imsg.iov_len = RSTREAM_IWARP_DATA_SIZE; ++ msg.msg_iov = &imsg; ++ msg.desc = &ep->local_mr.ldesc; ++ msg.iov_count = 1; ++ msg.context = context; ++ } else { ++ msg.msg_iov = NULL; ++ msg.desc = NULL; ++ msg.iov_count = 0; ++ msg.context = context; ++ } ++ ++ ret = fi_recvmsg(ep->ep_fd, &msg, 0); ++ if (ret != 0) ++ return ret; ++ ++ return ret; ++} ++ ++static uint32_t rstream_copy_out_chunk(struct rstream_ep *ep, void *buf, ++ uint32_t len_left) ++{ ++ char *rx_data_ptr = NULL; ++ uint32_t current_chunk = ++ rstream_alloc_contig_len_available(&ep->local_mr.rx, &rx_data_ptr, ++ len_left); ++ ++ if (current_chunk) { ++ memcpy(buf, rx_data_ptr, current_chunk); ++ } ++ ++ return current_chunk; ++} ++ ++static ssize_t rstream_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct rstream_ep *ep = container_of(ep_fid, struct rstream_ep, ++ util_ep.ep_fid); ++ uint32_t copy_out_len = 0; ++ ssize_t ret; ++ ++ fastlock_acquire(&ep->recv_lock); ++ ++ copy_out_len = rstream_copy_out_chunk(ep, buf, len); ++ ++ if ((len - copy_out_len)) { ++ ret = rstream_process_cq(ep, RSTREAM_RX_MSG_COMP); ++ if(ret < 0 && ret != -FI_EAGAIN) { ++ fastlock_release(&ep->recv_lock); ++ return ret; ++ } ++ ++ copy_out_len = copy_out_len + rstream_copy_out_chunk(ep, ++ ((char *)buf + copy_out_len), (len - copy_out_len)); ++ } ++ ++ fastlock_acquire(&ep->send_lock); ++ ret = rstream_update_target(ep, 0, copy_out_len); ++ fastlock_release(&ep->send_lock); ++ fastlock_release(&ep->recv_lock); ++ if(ret < 0 && ret != -FI_EAGAIN) { ++ return ret; ++ } ++ ++ if (copy_out_len) { ++ return copy_out_len; ++ } ++ ++ return -FI_EAGAIN; ++} ++ ++static ssize_t rstream_recvv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t src_addr, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++/* can't recv if you can't send a ctrl message -- only way to force user ++ * to progress ctrl msg, but...Continue to receive any queued data even ++ * if the remote side has disconnected (TODO) */ ++static ssize_t rstream_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ int ret; ++ struct rstream_ep *ep = container_of(ep_fid, struct rstream_ep, ++ util_ep.ep_fid); ++ ++ if (flags == FI_PEEK) { ++ fastlock_acquire(&ep->recv_lock); ++ if (!ep->local_mr.rx.avail_size) { ++ ret = rstream_process_cq(ep, RSTREAM_RX_MSG_COMP); ++ if (ret < 0) { ++ fastlock_release(&ep->recv_lock); ++ return ret; ++ } ++ } ++ fastlock_release(&ep->recv_lock); ++ ++ fastlock_acquire(&ep->send_lock); ++ if (rstream_target_rx_full(ep)) { ++ ret = rstream_process_cq(ep, RSTREAM_RX_MSG_COMP); ++ if (ret < 0) { ++ fastlock_release(&ep->send_lock); ++ return ret; ++ } ++ } ++ ++ if (!ep->qp_win.ctrl_credits) { ++ ret = rstream_process_cq(ep, RSTREAM_TX_MSG_COMP); ++ fastlock_release(&ep->send_lock); ++ return ret; ++ } ++ ++ fastlock_release(&ep->send_lock); ++ return 0; ++ } else { ++ return -FI_ENOSYS; ++ } ++} ++ ++struct fi_ops_msg rstream_ops_msg = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = rstream_recv, ++ .recvv = rstream_recvv, ++ .recvmsg = rstream_recvmsg, ++ .send = rstream_send, ++ .sendv = rstream_sendv, ++ .sendmsg = rstream_sendmsg, ++ .inject = rstream_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/Makefile.include +index d89d6f0..0f2600b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/Makefile.include +@@ -8,8 +8,12 @@ _rxd_files = \ + prov/rxd/src/rxd_cq.c \ + prov/rxd/src/rxd_cntr.c \ + prov/rxd/src/rxd_ep.c \ ++ prov/rxd/src/rxd_msg.c \ ++ prov/rxd/src/rxd_tagged.c \ + prov/rxd/src/rxd_rma.c \ +- prov/rxd/src/rxd.h ++ prov/rxd/src/rxd_atomic.c \ ++ prov/rxd/src/rxd.h \ ++ prov/rxd/src/rxd_proto.h + + if HAVE_RXD_DL + pkglib_LTLIBRARIES += librxd-fi.la +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd.h +index fecb9e5..9f68d12 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2015-2018 Intel Corporation, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -52,6 +52,9 @@ + #include + #include + #include ++#include ++#include ++#include "rxd_proto.h" + + #ifndef _RXD_H_ + #define _RXD_H_ +@@ -59,51 +62,47 @@ + #define RXD_MAJOR_VERSION (1) + #define RXD_MINOR_VERSION (0) + #define RXD_PROTOCOL_VERSION (1) +-#define RXD_FI_VERSION FI_VERSION(1,6) + +-#define RXD_IOV_LIMIT 4 +-#define RXD_MAX_DGRAM_ADDR 128 ++#define RXD_MAX_MTU_SIZE 4096 + + #define RXD_MAX_TX_BITS 10 + #define RXD_MAX_RX_BITS 10 +-#define RXD_TX_ID(seq, id) (((seq) << RXD_MAX_TX_BITS) | id) +-#define RXD_RX_ID(seq, id) (((seq) << RXD_MAX_RX_BITS) | id) +-#define RXD_TX_IDX_BITS ((1ULL << RXD_MAX_TX_BITS) - 1) +-#define RXD_RX_IDX_BITS ((1ULL << RXD_MAX_RX_BITS) - 1) ++#define RXD_DEFAULT_AV_SIZE 1024 + + #define RXD_BUF_POOL_ALIGNMENT 16 + #define RXD_TX_POOL_CHUNK_CNT 1024 + #define RXD_RX_POOL_CHUNK_CNT 1024 +- +-#define RXD_MAX_RX_CREDITS 16 +-#define RXD_MAX_PEER_TX 8 +-#define RXD_MAX_UNACKED 128 +- +-#define RXD_EP_MAX_UNEXP_PKT 512 +-#define RXD_EP_MAX_UNEXP_MSG 128 +- +-#define RXD_USE_OP_FLAGS (1ULL << 61) +-#define RXD_NO_COMPLETION (1ULL << 62) +- ++#define RXD_MAX_PENDING 128 + #define RXD_MAX_PKT_RETRY 50 + +-extern int rxd_progress_spin_count; +-extern int rxd_reposted_bufs; ++#define RXD_PKT_IN_USE (1 << 0) ++#define RXD_PKT_ACKED (1 << 1) ++ ++#define RXD_REMOTE_CQ_DATA (1 << 0) ++#define RXD_NO_TX_COMP (1 << 1) ++#define RXD_NO_RX_COMP (1 << 2) ++#define RXD_INJECT (1 << 3) ++#define RXD_TAG_HDR (1 << 4) ++#define RXD_INLINE (1 << 5) ++#define RXD_MULTI_RECV (1 << 6) ++#define RXD_CANCELLED (1 << 7) ++ ++struct rxd_env { ++ int spin_count; ++ int retry; ++ int max_peers; ++ int max_unacked; ++}; + ++extern struct rxd_env rxd_env; + extern struct fi_provider rxd_prov; + extern struct fi_info rxd_info; + extern struct fi_fabric_attr rxd_fabric_attr; + extern struct util_prov rxd_util_prov; ++extern struct fi_ops_msg rxd_ops_msg; ++extern struct fi_ops_tagged rxd_ops_tagged; + extern struct fi_ops_rma rxd_ops_rma; +- +-enum { +- RXD_TX_CONN = 0, +- RXD_TX_MSG, +- RXD_TX_TAG, +- RXD_TX_WRITE, +- RXD_TX_READ_REQ, +- RXD_TX_READ_RSP, +-}; ++extern struct fi_ops_atomic rxd_ops_atomic; + + struct rxd_fabric { + struct util_fabric util_fabric; +@@ -115,16 +114,55 @@ struct rxd_domain { + struct fid_domain *dg_domain; + + ssize_t max_mtu_sz; ++ ssize_t max_inline_msg; ++ ssize_t max_inline_rma; ++ ssize_t max_inline_atom; ++ ssize_t max_seg_sz; + int mr_mode; + struct ofi_mr_map mr_map;//TODO use util_domain mr_map instead + }; + ++struct rxd_peer { ++ struct dlist_entry entry; ++ fi_addr_t peer_addr; ++ uint64_t tx_seq_no; ++ uint64_t rx_seq_no; ++ uint64_t last_rx_ack; ++ uint64_t last_tx_ack; ++ uint16_t rx_window;//constant at MAX_UNACKED for now ++ uint16_t tx_window;//unused for now, will be used for slow start ++ int retry_cnt; ++ ++ uint16_t unacked_cnt; ++ uint8_t active; ++ ++ uint16_t curr_rx_id; ++ uint16_t curr_tx_id; ++ ++ struct dlist_entry tx_list; ++ struct dlist_entry rx_list; ++ struct dlist_entry rma_rx_list; ++ struct dlist_entry unacked; ++ struct dlist_entry buf_pkts; ++}; ++ ++struct rxd_addr { ++ fi_addr_t fi_addr; ++ fi_addr_t dg_addr; ++}; ++ + struct rxd_av { + struct util_av util_av; + struct fid_av *dg_av; ++ struct ofi_rbmap rbmap; ++ int fi_addr_idx; ++ int rxd_addr_idx; + + int dg_av_used; + size_t dg_addrlen; ++ ++ fi_addr_t *fi_addr_table; ++ struct rxd_addr *rxd_addr_table; + }; + + struct rxd_cq; +@@ -135,54 +173,38 @@ struct rxd_cq { + rxd_cq_write_fn write_fn; + }; + +-struct rxd_peer { +- uint64_t nxt_msg_id; +- uint64_t exp_msg_id; +- uint64_t conn_data; +- fi_addr_t fiaddr; +- +- enum util_cmap_state state; +- uint16_t active_tx_cnt; +-}; +- + struct rxd_ep { + struct util_ep util_ep; + struct fid_ep *dg_ep; + struct fid_cq *dg_cq; + +- struct rxd_peer *peer_info; +- size_t max_peers; +- +- int conn_data_set; +- uint64_t conn_data; +- + size_t rx_size; +- size_t credits; +-// uint64_t num_out; +- ++ size_t tx_size; ++ size_t tx_prefix_size; ++ size_t rx_prefix_size; ++ uint32_t posted_bufs; ++ size_t min_multi_recv_size; + int do_local_mr; +- struct dlist_entry wait_rx_list; +- struct dlist_entry unexp_tag_list; +- struct dlist_entry unexp_msg_list; +- uint16_t num_unexp_pkt; +- uint16_t num_unexp_msg; ++ int next_retry; ++ int dg_cq_fd; ++ size_t pending_cnt; + + struct util_buf_pool *tx_pkt_pool; + struct util_buf_pool *rx_pkt_pool; + struct slist rx_pkt_list; + +- struct rxd_tx_entry_fs *tx_entry_fs; +- struct dlist_entry tx_entry_list; +- +- struct rxd_rx_entry_fs *rx_entry_fs; +- struct dlist_entry rx_entry_list; ++ struct util_buf_pool *tx_entry_pool; ++ struct util_buf_pool *rx_entry_pool; + +- struct rxd_recv_fs *recv_fs; +- struct dlist_entry recv_list; ++ struct dlist_entry unexp_list; ++ struct dlist_entry unexp_tag_list; ++ struct dlist_entry rx_list; ++ struct dlist_entry rx_tag_list; ++ struct dlist_entry active_peers; ++ struct dlist_entry rts_sent_list; ++ struct dlist_entry ctrl_pkts; + +- struct rxd_trecv_fs *trecv_fs; +- struct dlist_entry trecv_list; +- fastlock_t lock; ++ struct rxd_peer peers[]; + }; + + static inline struct rxd_domain *rxd_ep_domain(struct rxd_ep *ep) +@@ -205,146 +227,142 @@ static inline struct rxd_cq *rxd_ep_rx_cq(struct rxd_ep *ep) + return container_of(ep->util_ep.rx_cq, struct rxd_cq, util_cq); + } + +-struct rxd_rx_buf { +- struct fi_context context; +- struct slist_entry entry; +- struct rxd_ep *ep; +- struct fid_mr *mr; +- char buf[]; +-}; ++struct rxd_x_entry { ++ fi_addr_t peer; ++ uint16_t tx_id; ++ uint16_t rx_id; ++ uint64_t bytes_done; ++ uint64_t next_seg_no; ++ uint64_t start_seq; ++ uint64_t offset; ++ uint16_t window; ++ uint64_t num_segs; ++ uint32_t op; ++ ++ uint32_t flags; ++ uint64_t ignore; ++ uint8_t iov_count; ++ uint8_t res_count; + +-struct rxd_rx_entry { +- struct ofi_op_hdr op_hdr; +- uint32_t exp_seg_no; +- uint64_t msg_id; +- uint64_t key; +- uint64_t done; +- uint64_t peer; +- uint16_t credits; +- uint32_t last_win_seg; +- fi_addr_t source; +- struct rxd_peer *peer_info; +- struct rxd_rx_buf *unexp_buf; +- uint64_t nack_stamp; ++ struct iovec iov[RXD_IOV_LIMIT]; ++ struct iovec res_iov[RXD_IOV_LIMIT]; ++ ++ struct fi_cq_tagged_entry cq_entry; ++ ++ struct rxd_pkt_entry *pkt; + struct dlist_entry entry; ++}; + +- union { +- struct rxd_recv_entry *recv; +- struct rxd_trecv_entry *trecv; ++static inline uint32_t rxd_tx_flags(uint64_t fi_flags) ++{ ++ uint32_t rxd_flags = 0; + +- struct { +- struct iovec iov[RXD_IOV_LIMIT]; +- } write; ++ if (fi_flags & FI_REMOTE_CQ_DATA) ++ rxd_flags |= RXD_REMOTE_CQ_DATA; ++ if (fi_flags & FI_INJECT) ++ rxd_flags |= RXD_INJECT; ++ if (fi_flags & FI_COMPLETION) ++ return rxd_flags; + +- struct { +- struct rxd_tx_entry *tx_entry; +- } read_rsp; +- }; ++ return rxd_flags | RXD_NO_TX_COMP; ++} + +- union { +- struct dlist_entry wait_entry; +- struct dlist_entry unexp_entry; +- }; +-}; +-DECLARE_FREESTACK(struct rxd_rx_entry, rxd_rx_entry_fs); ++static inline uint32_t rxd_rx_flags(uint64_t fi_flags) ++{ ++ uint32_t rxd_flags = 0; + +-struct rxd_tx_entry { +- fi_addr_t peer; +- uint64_t msg_id; +- uint64_t flags; +- uint64_t rx_key; +- uint64_t bytes_sent; +- uint32_t seg_no; +- uint32_t window; +- uint64_t retry_time; +- uint8_t retry_cnt; ++ if (fi_flags & FI_MULTI_RECV) ++ rxd_flags |= RXD_MULTI_RECV; ++ if (fi_flags & FI_COMPLETION) ++ return rxd_flags; + +- struct dlist_entry entry; +- struct dlist_entry pkt_list; +- +- uint8_t op_type; +- struct ofi_op_hdr op_hdr; +- +- union { +- struct { +- struct fi_msg msg; +- struct iovec msg_iov[RXD_IOV_LIMIT]; +- } msg; +- +- struct { +- struct fi_msg_tagged tmsg; +- struct iovec msg_iov[RXD_IOV_LIMIT]; +- } tmsg; +- +- struct { +- struct fi_msg_rma msg; +- struct iovec src_iov[RXD_IOV_LIMIT]; +- struct fi_rma_iov dst_iov[RXD_IOV_LIMIT]; +- } write; +- +- struct { +- struct fi_msg_rma msg; +- struct fi_rma_iov src_iov[RXD_IOV_LIMIT]; +- struct iovec dst_iov[RXD_IOV_LIMIT]; +- } read_req; +- +- struct { +- uint64_t peer_msg_id; +- uint8_t iov_count; +- struct iovec src_iov[RXD_IOV_LIMIT]; +- } read_rsp; +- }; +-}; +-DECLARE_FREESTACK(struct rxd_tx_entry, rxd_tx_entry_fs); ++ return rxd_flags | RXD_NO_RX_COMP; ++} + +-struct rxd_recv_entry { +- struct dlist_entry entry; +- struct fi_msg msg; +- uint64_t flags; +- struct iovec iov[RXD_IOV_LIMIT]; +- void *desc[RXD_IOV_LIMIT]; +-}; +-DECLARE_FREESTACK(struct rxd_recv_entry, rxd_recv_fs); ++#define rxd_ep_rx_flags(rxd_ep) (rxd_rx_flags((rxd_ep)->util_ep.rx_op_flags)) ++#define rxd_ep_tx_flags(rxd_ep) (rxd_tx_flags((rxd_ep)->util_ep.tx_op_flags)) + +-struct rxd_trecv_entry { +- struct dlist_entry entry; +- struct fi_msg_tagged msg; +- uint64_t flags; +- struct rxd_rx_entry *rx_entry; +- struct iovec iov[RXD_IOV_LIMIT]; +- void *desc[RXD_IOV_LIMIT]; ++struct rxd_pkt_entry { ++ struct dlist_entry d_entry; ++ struct slist_entry s_entry;//TODO - keep both or make separate tx/rx pkt structs ++ uint8_t flags; ++ size_t pkt_size; ++ uint64_t timestamp; ++ struct fi_context context; ++ struct fid_mr *mr; ++ fi_addr_t peer; ++ void *pkt; + }; +-DECLARE_FREESTACK(struct rxd_trecv_entry, rxd_trecv_fs); + +-struct rxd_pkt_data_start { +- struct ofi_ctrl_hdr ctrl; +- struct ofi_op_hdr op; +- char data[]; +-}; ++static inline int rxd_pkt_type(struct rxd_pkt_entry *pkt_entry) ++{ ++ return ((struct rxd_base_hdr *) (pkt_entry->pkt))->type; ++} + +-struct rxd_pkt_data { +- struct ofi_ctrl_hdr ctrl; +- char data[]; +-}; ++static inline struct rxd_base_hdr *rxd_get_base_hdr(struct rxd_pkt_entry *pkt_entry) ++{ ++ return &((struct rxd_ack_pkt *) (pkt_entry->pkt))->base_hdr; ++} + +-#define RXD_PKT_FIRST (1 << 0) +-#define RXD_PKT_LAST (1 << 1) +-#define RXD_LOCAL_COMP (1 << 2) +-#define RXD_REMOTE_ACK (1 << 3) +-#define RXD_NOT_ACKED RXD_REMOTE_ACK ++static inline uint64_t rxd_set_pkt_seq(struct rxd_peer *peer, ++ struct rxd_pkt_entry *pkt_entry) ++{ ++ rxd_get_base_hdr(pkt_entry)->seq_no = peer->tx_seq_no++; + +-struct rxd_pkt_meta { +- struct fi_context context; +- struct dlist_entry entry; +- struct rxd_tx_entry *tx_entry; +- struct rxd_ep *ep; +- struct fid_mr *mr; +- int flags; ++ return rxd_get_base_hdr(pkt_entry)->seq_no; ++} ++ ++static inline struct rxd_ext_hdr *rxd_get_ext_hdr(struct rxd_pkt_entry *pkt_entry) ++{ ++ return &((struct rxd_ack_pkt *) (pkt_entry->pkt))->ext_hdr; ++} ++ ++static inline struct rxd_sar_hdr *rxd_get_sar_hdr(struct rxd_pkt_entry *pkt_entry) ++{ ++ return (struct rxd_sar_hdr *) ((char *) pkt_entry->pkt + ++ sizeof(struct rxd_base_hdr)); ++} ++ ++static inline struct rxd_tag_hdr *rxd_get_tag_hdr(struct rxd_pkt_entry *pkt_entry) ++{ ++ struct rxd_base_hdr *hdr = rxd_get_base_hdr(pkt_entry); ++ ++ return (struct rxd_tag_hdr *) ((char *) hdr + sizeof(*hdr) + ++ (hdr->flags & RXD_INLINE ? 0 : sizeof(struct rxd_sar_hdr))); ++} ++ ++static inline void rxd_set_tx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) ++{ ++ pkt_entry->pkt = (void *) ((char *) pkt_entry + ++ sizeof(*pkt_entry) + ep->tx_prefix_size); ++} + +- /* TODO: use iov and remove data copies */ +- char pkt_data[]; /* rxd_pkt_data*, followed by data */ ++static inline void rxd_set_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) ++{ ++ pkt_entry->pkt = (void *) ((char *) pkt_entry + ++ sizeof(*pkt_entry) + ep->rx_prefix_size); ++} ++ ++static inline void *rxd_pkt_start(struct rxd_pkt_entry *pkt_entry) ++{ ++ return (void *) ((char *) pkt_entry + sizeof(*pkt_entry)); ++} ++ ++struct rxd_match_attr { ++ fi_addr_t peer; ++ uint64_t tag; + }; + ++static inline int rxd_match_addr(fi_addr_t addr, fi_addr_t match_addr) ++{ ++ return (addr == FI_ADDR_UNSPEC || addr == match_addr); ++} ++ ++static inline int rxd_match_tag(uint64_t tag, uint64_t ignore, uint64_t match_tag) ++{ ++ return ((tag | ignore ) == (match_tag | ignore)); ++} ++ + int rxd_info_to_core(uint32_t version, const struct fi_info *rxd_info, + struct fi_info *core_info); + int rxd_info_to_rxd(uint32_t version, const struct fi_info *core_info, +@@ -362,59 +380,92 @@ int rxd_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq_fid, void *context); + int rxd_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + struct fid_cntr **cntr_fid, void *context); +- ++int rxd_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, uint64_t flags); + + /* AV sub-functions */ +-int rxd_av_insert_dg_addr(struct rxd_av *av, uint64_t hint_index, +- const void *addr, fi_addr_t *dg_fiaddr); +-fi_addr_t rxd_av_dg_addr(struct rxd_av *av, fi_addr_t fi_addr); +-fi_addr_t rxd_av_fi_addr(struct rxd_av *av, fi_addr_t dg_fiaddr); +-int rxd_av_dg_reverse_lookup(struct rxd_av *av, uint64_t start_idx, +- const void *addr, fi_addr_t *dg_fiaddr); +- +-/* EP sub-functions */ +-void rxd_handle_send_comp(struct fi_cq_msg_entry *comp); +-void rxd_handle_recv_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp); +-int rxd_ep_repost_buff(struct rxd_rx_buf *rx_buf); +-int rxd_ep_reply_ack(struct rxd_ep *ep, struct ofi_ctrl_hdr *in_ctrl, +- uint8_t type, uint16_t seg_size, uint64_t rx_key, +- uint64_t source, fi_addr_t dest); +-struct rxd_peer *rxd_ep_getpeer_info(struct rxd_ep *rxd_ep, fi_addr_t addr); +- +-void rxd_ep_check_unexp_msg_list(struct rxd_ep *ep, +- struct rxd_recv_entry *recv_entry); +-void rxd_ep_check_unexp_tag_list(struct rxd_ep *ep, +- struct rxd_trecv_entry *trecv_entry); +-void rxd_ep_handle_data_msg(struct rxd_ep *ep, struct rxd_peer *peer, +- struct rxd_rx_entry *rx_entry, +- struct iovec *iov, size_t iov_count, +- struct ofi_ctrl_hdr *ctrl, void *data, +- struct rxd_rx_buf *rx_buf); +-void rxd_ep_free_acked_pkts(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry, +- uint32_t seg_no); +-ssize_t rxd_ep_start_xfer(struct rxd_ep *ep, struct rxd_peer *peer, +- uint8_t op, struct rxd_tx_entry *tx_entry); +-ssize_t rxd_ep_connect(struct rxd_ep *ep, struct rxd_peer *peer, fi_addr_t addr); +-int rxd_mr_verify(struct rxd_domain *rxd_domain, ssize_t len, +- uintptr_t *io_addr, uint64_t key, uint64_t access); +- ++int rxd_av_insert_dg_addr(struct rxd_av *av, const void *addr, ++ fi_addr_t *dg_fiaddr, uint64_t flags, ++ void *context); ++ ++/* Pkt resource functions */ ++int rxd_ep_post_buf(struct rxd_ep *ep); ++void rxd_release_repost_rx(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry); ++void rxd_ep_send_ack(struct rxd_ep *rxd_ep, fi_addr_t peer); ++struct rxd_pkt_entry *rxd_get_tx_pkt(struct rxd_ep *ep); ++void rxd_release_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt); ++void rxd_release_tx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt); ++struct rxd_x_entry *rxd_get_tx_entry(struct rxd_ep *ep); ++struct rxd_x_entry *rxd_get_rx_entry(struct rxd_ep *ep); ++void rxd_release_rx_entry(struct rxd_ep *ep, struct rxd_x_entry *x_entry); ++int rxd_ep_retry_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry); ++ssize_t rxd_ep_post_data_pkts(struct rxd_ep *ep, struct rxd_x_entry *tx_entry); ++void rxd_insert_unacked(struct rxd_ep *ep, fi_addr_t peer, ++ struct rxd_pkt_entry *pkt_entry); ++ssize_t rxd_send_rts_if_needed(struct rxd_ep *rxd_ep, fi_addr_t rxd_addr); ++int rxd_ep_send_op(struct rxd_ep *rxd_ep, struct rxd_x_entry *tx_entry, ++ const struct fi_rma_iov *rma_iov, size_t rma_count, ++ const struct iovec *comp_iov, size_t comp_count, ++ enum fi_datatype datatype, enum fi_op atomic_op); ++void rxd_init_data_pkt(struct rxd_ep *ep, struct rxd_x_entry *tx_entry, ++ struct rxd_pkt_entry *pkt_entry); ++void rxd_unpack_hdrs(size_t pkt_size, struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr **sar_hdr, struct rxd_tag_hdr **tag_hdr, ++ struct rxd_data_hdr **data_hdr, struct rxd_rma_hdr **rma_hdr, ++ struct rxd_atom_hdr **atom_hdr, void **msg, size_t *msg_size); + + /* Tx/Rx entry sub-functions */ +-struct rxd_tx_entry *rxd_tx_entry_alloc(struct rxd_ep *ep, +- struct rxd_peer *peer, fi_addr_t addr, uint64_t flags, uint8_t op); +-void rxd_tx_entry_progress(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); +-void rxd_tx_entry_discard(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); +-void rxd_tx_entry_free(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); +-void rxd_tx_entry_done(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); +-void rxd_set_timeout(struct rxd_tx_entry *tx_entry); +- +-void rxd_tx_pkt_free(struct rxd_pkt_meta *pkt_meta); +-void rxd_rx_entry_free(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry); +- ++struct rxd_x_entry *rxd_tx_entry_init(struct rxd_ep *ep, const struct iovec *iov, ++ size_t iov_count, const struct iovec *res_iov, ++ size_t res_count, size_t rma_count, ++ uint64_t data, uint64_t tag, void *context, ++ fi_addr_t addr, uint32_t op, uint32_t flags); ++struct rxd_x_entry *rxd_rx_entry_init(struct rxd_ep *ep, ++ const struct iovec *iov, size_t iov_count, uint64_t tag, ++ uint64_t ignore, void *context, fi_addr_t addr, ++ uint32_t op, uint32_t flags); ++void rxd_tx_entry_free(struct rxd_ep *ep, struct rxd_x_entry *tx_entry); ++void rxd_rx_entry_free(struct rxd_ep *ep, struct rxd_x_entry *rx_entry); ++int rxd_get_timeout(uint8_t retry_cnt); ++uint64_t rxd_get_retry_time(uint64_t start, uint8_t retry_cnt); ++ ++/* Generic message functions */ ++ssize_t rxd_ep_generic_recvmsg(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t ignore, void *context, uint32_t op, ++ uint32_t rxd_flags); ++ssize_t rxd_ep_generic_sendmsg(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t data, void *context, uint32_t op, ++ uint32_t rxd_flags); ++ssize_t rxd_ep_generic_inject(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t data, uint32_t op, uint32_t rxd_flags); ++ ++/* Progress functions */ ++void rxd_tx_entry_progress(struct rxd_ep *ep, struct rxd_x_entry *tx_entry, ++ int try_send); ++void rxd_handle_recv_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp); ++void rxd_handle_send_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp); ++void rxd_handle_error(struct rxd_ep *ep); ++void rxd_progress_op(struct rxd_ep *ep, struct rxd_x_entry *rx_entry, ++ struct rxd_pkt_entry *pkt_entry, ++ struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr *sar_hdr, ++ struct rxd_tag_hdr *tag_hdr, ++ struct rxd_data_hdr *data_hdr, ++ struct rxd_rma_hdr *rma_hdr, ++ struct rxd_atom_hdr *atom_hdr, ++ void **msg, size_t size); ++void rxd_progress_tx_list(struct rxd_ep *ep, struct rxd_peer *peer); ++struct rxd_x_entry *rxd_progress_multi_recv(struct rxd_ep *ep, ++ struct rxd_x_entry *rx_entry, ++ size_t total_size); + + /* CQ sub-functions */ + void rxd_cq_report_error(struct rxd_cq *cq, struct fi_cq_err_entry *err_entry); +-void rxd_cq_report_tx_comp(struct rxd_cq *cq, struct rxd_tx_entry *tx_entry); +-void rxd_cntr_report_tx_comp(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); ++void rxd_cq_report_tx_comp(struct rxd_cq *cq, struct rxd_x_entry *tx_entry); ++void rxd_cntr_report_tx_comp(struct rxd_ep *ep, struct rxd_x_entry *tx_entry); ++void rxd_cntr_report_rx_comp(struct rxd_ep *ep, struct rxd_x_entry *rx_entry); + + #endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_atomic.c +new file mode 100644 +index 0000000..e8a22cc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_atomic.c +@@ -0,0 +1,430 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include "ofi_iov.h" ++#include "rxd.h" ++ ++static ssize_t rxd_generic_atomic(struct rxd_ep *rxd_ep, ++ const struct fi_ioc *ioc, void **desc, size_t count, ++ const struct fi_ioc *compare_ioc, void **compare_desc, ++ size_t compare_count, struct fi_ioc *result_ioc, ++ void **result_desc, size_t result_count, ++ fi_addr_t addr, const struct fi_rma_ioc *rma_ioc, ++ size_t rma_count, uint64_t data, enum fi_datatype datatype, ++ enum fi_op atomic_op, void *context, uint32_t op, ++ uint32_t rxd_flags) ++{ ++ struct rxd_x_entry *tx_entry; ++ struct iovec iov[RXD_IOV_LIMIT], res_iov[RXD_IOV_LIMIT], comp_iov[RXD_IOV_LIMIT]; ++ struct fi_rma_iov rma_iov[RXD_IOV_LIMIT]; ++ fi_addr_t rxd_addr; ++ ssize_t ret = -FI_EAGAIN; ++ ++ assert(count <= RXD_IOV_LIMIT); ++ assert(rma_count <= RXD_IOV_LIMIT); ++ ++ ofi_ioc_to_iov(ioc, iov, count, ofi_datatype_size(datatype)); ++ ++ assert(ofi_total_iov_len(iov, count) <= (op == RXD_ATOMIC_COMPARE) ? ++ rxd_ep_domain(rxd_ep)->max_inline_atom / 2 : ++ rxd_ep_domain(rxd_ep)->max_inline_atom); ++ ++ ofi_ioc_to_iov(result_ioc, res_iov, result_count, ofi_datatype_size(datatype)); ++ ofi_ioc_to_iov(compare_ioc, comp_iov, compare_count, ofi_datatype_size(datatype)); ++ ofi_rma_ioc_to_iov(rma_ioc, rma_iov, rma_count, ofi_datatype_size(datatype)); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, count, res_iov, result_count, rma_count, ++ data, 0, context, rxd_addr, op, rxd_flags); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, rma_iov, rma_count, comp_iov, ++ compare_count, datatype, atomic_op); ++ if (ret) ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++static ssize_t rxd_atomic_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, ++ NULL, NULL, 0, NULL, NULL, 0, msg->addr, ++ msg->rma_iov, msg->rma_iov_count, msg->data, ++ msg->datatype, msg->op, msg->context, ++ ofi_op_atomic, rxd_tx_flags(flags | ++ ep->util_ep.tx_msg_flags)); ++} ++ ++static ssize_t rxd_atomic_writev(struct fid_ep *ep_fid, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct rxd_ep *ep; ++ struct fi_rma_ioc rma_iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ rma_iov.addr = addr; ++ rma_iov.count = ofi_total_ioc_cnt(iov, count); ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, iov, desc, count, NULL, NULL, 0, NULL, ++ NULL, 0, dest_addr, &rma_iov, 1, 0, datatype, ++ op, context, ofi_op_atomic, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_ioc iov; ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.addr = (void *) buf; ++ iov.count = count; ++ ++ rma_iov.addr = addr; ++ rma_iov.count = count; ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, &iov, &desc, 1, NULL, NULL, 0, NULL, NULL, 0, ++ dest_addr, &rma_iov, 1, 0, datatype, op, context, ++ ofi_op_atomic, rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_inject(struct fid_ep *ep_fid, const void *buf, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op) ++{ ++ struct rxd_ep *rxd_ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ struct rxd_x_entry *tx_entry; ++ struct iovec iov; ++ struct fi_rma_iov rma_iov; ++ fi_addr_t rxd_addr; ++ ssize_t ret = -FI_EAGAIN; ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = count * ofi_datatype_size(datatype); ++ assert(iov.iov_len <= rxd_ep_domain(rxd_ep)->max_inline_atom); ++ ++ rma_iov.addr = addr; ++ rma_iov.len = count * ofi_datatype_size(datatype); ++ rma_iov.key = key; ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, &iov, 1, NULL, 0, 1, 0, 0, NULL, ++ rxd_addr, ofi_op_atomic, ++ RXD_INJECT | RXD_NO_TX_COMP); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, &rma_iov, 1, NULL, 0, datatype, op); ++ if (ret) ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++static ssize_t rxd_atomic_readwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, ++ NULL, NULL, 0, resultv, result_desc, ++ result_count, msg->addr, ++ msg->rma_iov, msg->rma_iov_count, msg->data, ++ msg->datatype, msg->op, msg->context, ++ ofi_op_atomic_fetch, rxd_tx_flags(flags | ++ ep->util_ep.tx_msg_flags)); ++} ++ ++static ssize_t rxd_atomic_readwritev(struct fid_ep *ep_fid, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ rma_iov.addr = addr; ++ rma_iov.count = ofi_total_ioc_cnt(iov, count); ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, iov, desc, count, NULL, NULL, 0, resultv, ++ result_desc, result_count, dest_addr, ++ &rma_iov, 1, 0, datatype, op, context, ++ ofi_op_atomic_fetch, rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, ++ size_t count, void *desc, void *result, ++ void *result_desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_ioc iov, resultv; ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.addr = (void *) buf; ++ iov.count = count; ++ ++ resultv.addr = result; ++ resultv.count = count; ++ ++ rma_iov.addr = addr; ++ rma_iov.count = count; ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, &iov, &desc, 1, NULL, NULL, 0, &resultv, ++ &result_desc, 1, dest_addr, &rma_iov, 1, 0, ++ datatype, op, context, ofi_op_atomic_fetch, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_compwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, ++ result_count, msg->addr, ++ msg->rma_iov, msg->rma_iov_count, msg->data, ++ msg->datatype, msg->op, msg->context, ++ ofi_op_atomic_compare, rxd_tx_flags(flags | ++ ep->util_ep.tx_msg_flags)); ++} ++ ++static ssize_t rxd_atomic_compwritev(struct fid_ep *ep_fid, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ rma_iov.addr = addr; ++ rma_iov.count = ofi_total_ioc_cnt(iov, count); ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, iov, desc, count, comparev, compare_desc, ++ compare_count, resultv, result_desc, ++ result_count, dest_addr, &rma_iov, 1, 0, ++ datatype, op, context, ofi_op_atomic_compare, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, ++ size_t count, void *desc, const void *compare, ++ void *compare_desc, void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_ioc iov, resultv, comparev; ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.addr = (void *) buf; ++ iov.count = count; ++ ++ resultv.addr = result; ++ resultv.count = count; ++ ++ comparev.addr = (void *) compare; ++ comparev.count = count; ++ ++ rma_iov.addr = addr; ++ rma_iov.count = count; ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, &iov, &desc, 1, &comparev, &compare_desc, ++ 1, &resultv, &result_desc, 1, dest_addr, ++ &rma_iov, 1, 0, datatype, op, context, ++ ofi_op_atomic_compare, rxd_ep_tx_flags(ep)); ++} ++ ++int rxd_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, uint64_t flags) ++{ ++ struct rxd_domain *rxd_domain; ++ int ret; ++ size_t total_size; ++ ++ if (flags & FI_TAGGED) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "tagged atomic op not supported\n"); ++ return -FI_EINVAL; ++ } ++ ++ ret = ofi_atomic_valid(&rxd_prov, datatype, op, flags); ++ if (ret || !attr) ++ return ret; ++ ++ rxd_domain = container_of(domain, struct rxd_domain, ++ util_domain.domain_fid); ++ attr->size = ofi_datatype_size(datatype); ++ ++ total_size = (flags & FI_COMPARE_ATOMIC) ? rxd_domain->max_inline_atom / 2 : ++ rxd_domain->max_inline_atom; ++ attr->count = total_size / attr->size; ++ ++ return ret; ++} ++ ++static int rxd_atomic_valid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxd_query_atomic(&(container_of(ep, ++ struct util_ep, ep_fid))->domain->domain_fid, ++ datatype, op, &attr, 0); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++static int rxd_atomic_fetch_valid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxd_query_atomic(&(container_of(ep, ++ struct util_ep, ep_fid))->domain->domain_fid, ++ datatype, op, &attr, FI_FETCH_ATOMIC); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++static int rxd_atomic_comp_valid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxd_query_atomic(&(container_of(ep, ++ struct util_ep, ep_fid))->domain->domain_fid, ++ datatype, op, &attr, FI_COMPARE_ATOMIC); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++struct fi_ops_atomic rxd_ops_atomic = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = rxd_atomic_write, ++ .writev = rxd_atomic_writev, ++ .writemsg = rxd_atomic_writemsg, ++ .inject = rxd_atomic_inject, ++ .readwrite = rxd_atomic_readwrite, ++ .readwritev = rxd_atomic_readwritev, ++ .readwritemsg = rxd_atomic_readwritemsg, ++ .compwrite = rxd_atomic_compwrite, ++ .compwritev = rxd_atomic_compwritev, ++ .compwritemsg = rxd_atomic_compwritemsg, ++ .writevalid = rxd_atomic_valid, ++ .readwritevalid = rxd_atomic_fetch_valid, ++ .compwritevalid = rxd_atomic_comp_valid, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_attr.c +index 88e49fd..9abac5f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_attr.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -32,21 +32,26 @@ + + #include "rxd.h" + +-#define RXD_EP_CAPS (FI_MSG | FI_TAGGED | FI_DIRECTED_RECV | \ +- FI_RECV | FI_SEND | FI_SOURCE) ++#define RXD_EP_CAPS (FI_MSG | FI_TAGGED | FI_RMA | FI_ATOMIC | FI_SOURCE | \ ++ FI_DIRECTED_RECV | FI_MULTI_RECV | FI_RMA_EVENT) ++#define RXD_TX_CAPS (FI_SEND | FI_WRITE | FI_READ) ++#define RXD_RX_CAPS (FI_RECV | FI_REMOTE_READ | FI_REMOTE_WRITE) ++#define RXD_DOMAIN_CAPS (FI_LOCAL_COMM | FI_REMOTE_COMM) + + struct fi_tx_attr rxd_tx_attr = { +- .caps = RXD_EP_CAPS, +- .comp_order = FI_ORDER_STRICT, +- .inject_size = 0, ++ .caps = RXD_EP_CAPS | RXD_TX_CAPS, ++ .comp_order = FI_ORDER_NONE, ++ .msg_order = FI_ORDER_SAS, ++ .inject_size = RXD_MAX_MTU_SIZE - sizeof(struct rxd_base_hdr), + .size = (1ULL << RXD_MAX_TX_BITS), + .iov_limit = RXD_IOV_LIMIT, +- .rma_iov_limit = 0, ++ .rma_iov_limit = RXD_IOV_LIMIT, + }; + + struct fi_rx_attr rxd_rx_attr = { +- .caps = RXD_EP_CAPS, +- .comp_order = FI_ORDER_STRICT, ++ .caps = RXD_EP_CAPS | RXD_RX_CAPS, ++ .comp_order = FI_ORDER_NONE, ++ .msg_order = FI_ORDER_SAS, + .total_buffered_recv = 0, + .size = (1ULL << RXD_MAX_RX_BITS), + .iov_limit = RXD_IOV_LIMIT +@@ -58,15 +63,21 @@ struct fi_ep_attr rxd_ep_attr = { + .protocol_version = 1, + .max_msg_size = SIZE_MAX, + .tx_ctx_cnt = 1, +- .rx_ctx_cnt = 1 ++ .rx_ctx_cnt = 1, ++ .max_order_raw_size = SIZE_MAX, ++ .max_order_waw_size = SIZE_MAX, ++ .mem_tag_format = FI_TAG_GENERIC, + }; + + struct fi_domain_attr rxd_domain_attr = { ++ .caps = RXD_DOMAIN_CAPS, + .threading = FI_THREAD_SAFE, + .control_progress = FI_PROGRESS_MANUAL, + .data_progress = FI_PROGRESS_MANUAL, + .resource_mgmt = FI_RM_ENABLED, + .av_type = FI_AV_UNSPEC, ++ .mr_mode = FI_MR_BASIC | FI_MR_SCALABLE, ++ .cq_data_size = sizeof_field(struct rxd_data_hdr, cq_data), + .mr_key_size = sizeof(uint64_t), + .cq_cnt = 128, + .ep_cnt = 128, +@@ -82,8 +93,8 @@ struct fi_fabric_attr rxd_fabric_attr = { + }; + + struct fi_info rxd_info = { +- .caps = RXD_EP_CAPS, +- .addr_format = FI_SOCKADDR, ++ .caps = RXD_DOMAIN_CAPS | RXD_EP_CAPS | RXD_TX_CAPS | RXD_RX_CAPS, ++ .addr_format = FI_FORMAT_UNSPEC, + .tx_attr = &rxd_tx_attr, + .rx_attr = &rxd_rx_attr, + .ep_attr = &rxd_ep_attr, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_av.c +index ddf7e11..1593f07 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_av.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -34,6 +34,23 @@ + #include + + ++static int rxd_tree_compare(struct ofi_rbmap *map, void *key, void *data) ++{ ++ struct rxd_av *av; ++ uint8_t addr[RXD_NAME_LENGTH]; ++ size_t len = RXD_NAME_LENGTH; ++ int ret; ++ ++ memset(addr, 0, len); ++ av = container_of(map, struct rxd_av, rbmap); ++ ret = fi_av_lookup(av->dg_av, av->rxd_addr_table[(fi_addr_t) data].dg_addr, ++ addr, &len); ++ if (ret) ++ return -1; ++ ++ return memcmp(key, addr, len); ++} ++ + /* + * The RXD code is agnostic wrt the datagram address format, but we need + * to know the size of the address in order to iterate over them. Because +@@ -46,13 +63,13 @@ static int rxd_av_set_addrlen(struct rxd_av *av, const void *addr) + struct rxd_domain *domain; + struct fid_av *tmp_av; + struct fi_av_attr attr; +- uint8_t tmp_addr[RXD_MAX_DGRAM_ADDR]; ++ uint8_t tmp_addr[RXD_NAME_LENGTH]; ++ fi_addr_t fiaddr; + size_t len; + int ret; + + FI_INFO(&rxd_prov, FI_LOG_AV, "determine dgram address len\n"); + memset(&attr, 0, sizeof attr); +- attr.type = FI_AV_TABLE; + attr.count = 1; + + domain = container_of(av->util_av.domain, struct rxd_domain, util_domain); +@@ -63,15 +80,16 @@ static int rxd_av_set_addrlen(struct rxd_av *av, const void *addr) + return ret; + } + +- ret = fi_av_insert(tmp_av, addr, 1, NULL, 0, NULL); ++ ret = fi_av_insert(tmp_av, addr, 1, &fiaddr, 0, NULL); + if (ret != 1) { + FI_WARN(&rxd_prov, FI_LOG_AV, "addr insert failed: %d (%s)\n", + -ret, fi_strerror(-ret)); ++ ret = -FI_EINVAL; + goto close; + } + + len = sizeof tmp_addr; +- ret = fi_av_lookup(tmp_av, 0, tmp_addr, &len); ++ ret = fi_av_lookup(tmp_av, fiaddr, tmp_addr, &len); + if (ret) { + FI_WARN(&rxd_prov, FI_LOG_AV, "addr lookup failed: %d (%s)\n", + -ret, fi_strerror(-ret)); +@@ -85,77 +103,77 @@ close: + return ret; + } + +-fi_addr_t rxd_av_dg_addr(struct rxd_av *av, fi_addr_t fi_addr) ++static fi_addr_t rxd_av_dg_addr(struct rxd_av *av, fi_addr_t fi_addr) + { +- uint64_t *dg_idx; ++ fi_addr_t rxd_addr = av->fi_addr_table[fi_addr]; + +- dg_idx = ofi_av_get_addr(&av->util_av, (int) fi_addr); +- return *dg_idx; ++ return rxd_addr == FI_ADDR_UNSPEC ? rxd_addr : ++ av->rxd_addr_table[rxd_addr].dg_addr; + } + +-fi_addr_t rxd_av_fi_addr(struct rxd_av *av, fi_addr_t dg_fiaddr) ++static fi_addr_t rxd_set_rxd_addr(struct rxd_av *av, fi_addr_t dg_addr) + { +- int ret; ++ int tries = 0; ++ ++ while (av->rxd_addr_table[av->rxd_addr_idx].dg_addr != FI_ADDR_UNSPEC && ++ tries < av->util_av.count) { ++ if (++av->rxd_addr_idx == av->util_av.count) ++ av->rxd_addr_idx = 0; ++ tries++; ++ } ++ assert(av->rxd_addr_idx < av->util_av.count && tries < av->util_av.count); ++ av->rxd_addr_table[av->rxd_addr_idx].dg_addr = dg_addr; + +- ret = ofi_av_lookup_index(&av->util_av, &dg_fiaddr, (int) dg_fiaddr); +- return (ret < 0) ? FI_ADDR_UNSPEC : ret; ++ return av->rxd_addr_idx; + } + +-int rxd_av_dg_reverse_lookup(struct rxd_av *av, uint64_t start_idx, +- const void *addr, fi_addr_t *dg_fiaddr) ++static fi_addr_t rxd_set_fi_addr(struct rxd_av *av, fi_addr_t rxd_addr) + { +- uint8_t curr_addr[RXD_MAX_DGRAM_ADDR]; +- size_t i, len; +- int ret; ++ int tries = 0; + +- for (i = 0; i < (size_t) av->dg_av_used; i++) { +- len = sizeof curr_addr; +- ret = fi_av_lookup(av->dg_av, (i + start_idx) % av->dg_av_used, +- curr_addr, &len); +- if (!ret) { +- *dg_fiaddr = (i + start_idx) % av->dg_av_used; +- FI_DBG(&rxd_prov, FI_LOG_AV, "found: %" PRIu64 "\n", +- *dg_fiaddr); +- return 0; +- } ++ while (av->fi_addr_table[av->fi_addr_idx] != FI_ADDR_UNSPEC && ++ tries < av->util_av.count) { ++ if (++av->fi_addr_idx == av->util_av.count) ++ av->fi_addr_idx = 0; ++ tries++; + } +- FI_DBG(&rxd_prov, FI_LOG_AV, "addr not found\n"); +- return -FI_ENODATA; ++ assert(av->fi_addr_idx < av->util_av.count && tries < av->util_av.count); ++ av->fi_addr_table[av->fi_addr_idx] = rxd_addr; ++ av->rxd_addr_table[rxd_addr].fi_addr = av->fi_addr_idx; ++ ++ return av->fi_addr_idx; + } + +-int rxd_av_insert_dg_addr(struct rxd_av *av, uint64_t hint_index, +- const void *addr, fi_addr_t *dg_fiaddr) ++int rxd_av_insert_dg_addr(struct rxd_av *av, const void *addr, ++ fi_addr_t *rxd_addr, uint64_t flags, ++ void *context) + { ++ fi_addr_t dg_addr; + int ret; + +- fastlock_acquire(&av->util_av.lock); +- if (!av->dg_addrlen) { +- ret = rxd_av_set_addrlen(av, addr); +- if (ret) +- goto out; +- ret = -FI_ENODATA; +- } else { +- ret = rxd_av_dg_reverse_lookup(av, hint_index, addr, dg_fiaddr); +- } ++ ret = fi_av_insert(av->dg_av, addr, 1, &dg_addr, ++ flags, context); ++ if (ret != 1) ++ return -FI_EINVAL; + +- if (ret == -FI_ENODATA) { +- ret = fi_av_insert(av->dg_av, addr, 1, dg_fiaddr, 0, NULL); +- if (ret == 1) { +- av->dg_av_used++; +- ret = 0; +- } ++ *rxd_addr = rxd_set_rxd_addr(av, dg_addr); ++ ++ ret = ofi_rbmap_insert(&av->rbmap, (void *) addr, (void *) (*rxd_addr)); ++ if (ret && ret != -FI_EALREADY) { ++ fi_av_remove(av->dg_av, &dg_addr, 1, flags); ++ return ret; + } +-out: +- fastlock_release(&av->util_av.lock); +- return ret; ++ ++ return 0; + } + + static int rxd_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + fi_addr_t *fi_addr, uint64_t flags, void *context) + { + struct rxd_av *av; +- int i = 0, index, ret = 0, success_cnt = 0, lookup = 1; +- uint64_t dg_fiaddr; ++ int i = 0, ret = 0, success_cnt = 0; ++ fi_addr_t rxd_addr, util_addr; ++ struct ofi_rbnode *node; + + av = container_of(av_fid, struct rxd_av, util_av.av_fid); + fastlock_acquire(&av->util_av.lock); +@@ -163,27 +181,26 @@ static int rxd_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + ret = rxd_av_set_addrlen(av, addr); + if (ret) + goto out; +- /* Skip lookups if this is the first insertion call. */ +- lookup = 0; + } + + for (; i < count; i++, addr = (uint8_t *) addr + av->dg_addrlen) { +- ret = lookup ? rxd_av_dg_reverse_lookup(av, i, addr, &dg_fiaddr) : +- -FI_ENODATA; +- if (ret) { +- ret = fi_av_insert(av->dg_av, addr, 1, &dg_fiaddr, +- flags, context); +- if (ret != 1) ++ node = ofi_rbmap_find(&av->rbmap, (void *) addr); ++ if (node) { ++ rxd_addr = (fi_addr_t) node->data; ++ } else { ++ ret = rxd_av_insert_dg_addr(av, addr, &rxd_addr, ++ flags, context); ++ if (ret) + break; + } + +- ret = ofi_av_insert_addr(&av->util_av, &dg_fiaddr, dg_fiaddr, &index); +- if (ret) +- break; ++ util_addr = av->rxd_addr_table[rxd_addr].fi_addr == FI_ADDR_UNSPEC ? ++ rxd_set_fi_addr(av, rxd_addr) : ++ av->rxd_addr_table[rxd_addr].fi_addr; ++ if (fi_addr) ++ fi_addr[i] = util_addr; + + success_cnt++; +- if (fi_addr) +- fi_addr[i] = index; + } + + if (ret) { +@@ -233,19 +250,44 @@ static int rxd_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count + uint64_t flags) + { + int ret = 0; +- size_t i; +- fi_addr_t dg_fiaddr; ++ size_t i, addrlen; ++ fi_addr_t rxd_addr; + struct rxd_av *av; ++ uint8_t addr[RXD_NAME_LENGTH]; ++ struct ofi_rbnode *node; + + av = container_of(av_fid, struct rxd_av, util_av.av_fid); + fastlock_acquire(&av->util_av.lock); + for (i = 0; i < count; i++) { +- dg_fiaddr = rxd_av_dg_addr(av, fi_addr[i]); +- ret = fi_av_remove(av->dg_av, &dg_fiaddr, 1, flags); ++ rxd_addr = av->fi_addr_table[fi_addr[i]]; ++ ++ addrlen = RXD_NAME_LENGTH; ++ ret = fi_av_lookup(av->dg_av, av->rxd_addr_table[rxd_addr].dg_addr, ++ addr, &addrlen); ++ if (ret) ++ goto err; ++ ++ node = ofi_rbmap_find(&av->rbmap, (void *) addr); ++ if (!node) ++ goto err; ++ ++ ofi_rbmap_delete(&av->rbmap, node); ++ ++ ret = fi_av_remove(av->dg_av, &av->rxd_addr_table[rxd_addr].dg_addr, ++ 1, flags); + if (ret) +- break; ++ goto err; ++ ++ av->fi_addr_table[fi_addr[i]] = FI_ADDR_UNSPEC; ++ av->rxd_addr_table[rxd_addr].fi_addr = FI_ADDR_UNSPEC; ++ av->rxd_addr_table[rxd_addr].dg_addr = FI_ADDR_UNSPEC; + av->dg_av_used--; + } ++ ++err: ++ if (ret) ++ FI_WARN(&rxd_prov, FI_LOG_AV, "Unable to remove address from AV\n"); ++ + fastlock_release(&av->util_av.lock); + return ret; + } +@@ -262,11 +304,14 @@ static int rxd_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, + size_t *addrlen) + { + struct rxd_av *rxd_av; +- fi_addr_t dg_addr; ++ fi_addr_t dg_fiaddr; + + rxd_av = container_of(av, struct rxd_av, util_av.av_fid); +- dg_addr = rxd_av_dg_addr(rxd_av, fi_addr); +- return fi_av_lookup(rxd_av->dg_av, dg_addr, addr, addrlen); ++ dg_fiaddr = rxd_av_dg_addr(rxd_av, fi_addr); ++ if (dg_fiaddr == FI_ADDR_UNSPEC) ++ return -FI_ENODATA; ++ ++ return fi_av_lookup(rxd_av->dg_av, dg_fiaddr, addr, addrlen); + } + + static struct fi_ops_av rxd_av_ops = { +@@ -293,6 +338,8 @@ static int rxd_av_close(struct fid *fid) + if (ret) + return ret; + ++ free(av->fi_addr_table); ++ free(av->rxd_addr_table); + free(av); + return 0; + } +@@ -313,7 +360,7 @@ static struct fi_ops rxd_av_fi_ops = { + int rxd_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, + struct fid_av **av_fid, void *context) + { +- int ret; ++ int ret, i; + struct rxd_av *av; + struct rxd_domain *domain; + struct util_av_attr util_attr; +@@ -325,24 +372,40 @@ int rxd_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, + if (attr->name) + return -FI_ENOSYS; + ++ attr->count = roundup_power_of_two(attr->count ? ++ attr->count : RXD_DEFAULT_AV_SIZE); + domain = container_of(domain_fid, struct rxd_domain, util_domain.domain_fid); + av = calloc(1, sizeof(*av)); + if (!av) + return -FI_ENOMEM; ++ av->fi_addr_table = calloc(1, attr->count * sizeof(fi_addr_t)); ++ av->rxd_addr_table = calloc(1, rxd_env.max_peers * sizeof(struct rxd_addr)); ++ if (!av->fi_addr_table || !av->rxd_addr_table) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ + + util_attr.addrlen = sizeof(fi_addr_t); +- util_attr.overhead = attr->count; +- util_attr.flags = OFI_AV_HASH; +- if (attr->type == FI_AV_UNSPEC) +- attr->type = FI_AV_TABLE; ++ util_attr.flags = 0; ++ attr->type = domain->util_domain.av_type != FI_AV_UNSPEC ? ++ domain->util_domain.av_type : FI_AV_TABLE; + + ret = ofi_av_init(&domain->util_domain, attr, &util_attr, + &av->util_av, context); + if (ret) + goto err1; + ++ av->rbmap.compare = &rxd_tree_compare; ++ ofi_rbmap_init(&av->rbmap); ++ for (i = 0; i < attr->count; av->fi_addr_table[i++] = FI_ADDR_UNSPEC) ++ ; ++ for (i = 0; i < rxd_env.max_peers; i++) { ++ av->rxd_addr_table[i].fi_addr = FI_ADDR_UNSPEC; ++ av->rxd_addr_table[i].dg_addr = FI_ADDR_UNSPEC; ++ } ++ + av_attr = *attr; +- av_attr.type = FI_AV_TABLE; + av_attr.count = 0; + av_attr.flags = 0; + ret = fi_av_open(domain->dg_domain, &av_attr, &av->dg_av, context); +@@ -357,6 +420,8 @@ int rxd_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, + err2: + ofi_av_close(&av->util_av); + err1: ++ free(av->fi_addr_table); ++ free(av->rxd_addr_table); + free(av); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cntr.c +index bc6ad12..a6f2dcc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cntr.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -35,6 +35,55 @@ + + #define RXD_FLAG(flag, mask) (((flag) & (mask)) == (mask)) + ++static int rxd_cntr_wait(struct fid_cntr *cntr_fid, uint64_t threshold, int timeout) ++{ ++ struct fid_list_entry *fid_entry; ++ struct util_cntr *cntr; ++ struct rxd_ep *ep; ++ uint64_t start, errcnt; ++ int ret, ep_retry; ++ ++ cntr = container_of(cntr_fid, struct util_cntr, cntr_fid); ++ assert(cntr->wait); ++ errcnt = ofi_atomic_get64(&cntr->err); ++ start = (timeout >= 0) ? fi_gettime_ms() : 0; ++ ++ do { ++ cntr->progress(cntr); ++ if (threshold <= ofi_atomic_get64(&cntr->cnt)) ++ return FI_SUCCESS; ++ ++ if (errcnt != ofi_atomic_get64(&cntr->err)) ++ return -FI_EAVAIL; ++ ++ if (timeout >= 0) { ++ timeout -= (int) (fi_gettime_ms() - start); ++ if (timeout <= 0) ++ return -FI_ETIMEDOUT; ++ } ++ ++ ep_retry = -1; ++ fastlock_acquire(&cntr->ep_list_lock); ++ dlist_foreach_container(&cntr->ep_list, struct fid_list_entry, ++ fid_entry, entry) { ++ ep = container_of(fid_entry->fid, struct rxd_ep, ++ util_ep.ep_fid.fid); ++ if (ep->next_retry == -1) ++ continue; ++ ep_retry = ep_retry == -1 ? ep->next_retry : ++ MIN(ep_retry, ep->next_retry); ++ } ++ fastlock_release(&cntr->ep_list_lock); ++ ++ ret = fi_wait(&cntr->wait->wait_fid, ep_retry == -1 ? ++ timeout : rxd_get_timeout(ep_retry)); ++ if (ep_retry != -1 && ret == -FI_ETIMEDOUT) ++ ret = 0; ++ } while (!ret); ++ ++ return ret; ++} ++ + int rxd_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + struct fid_cntr **cntr_fid, void *context) + { +@@ -51,6 +100,7 @@ int rxd_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + goto free; + + *cntr_fid = &cntr->cntr_fid; ++ cntr->cntr_fid.ops->wait = rxd_cntr_wait; + return FI_SUCCESS; + + free: +@@ -58,30 +108,22 @@ free: + return ret; + } + +-void rxd_cntr_report_tx_comp(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry) ++void rxd_cntr_report_tx_comp(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) + { +- struct util_cntr *cntr; ++ uint64_t flags = tx_entry->cq_entry.flags & ++ (FI_SEND | FI_WRITE | FI_READ); + +- switch (tx_entry->op_type) { +- case RXD_TX_MSG: +- case RXD_TX_TAG: +- cntr = ep->util_ep.tx_cntr; +- break; +- case RXD_TX_WRITE: +- cntr = ep->util_ep.wr_cntr; +- break; +- case RXD_TX_READ_REQ: +- cntr = ep->util_ep.rem_rd_cntr; +- break; +- case RXD_TX_READ_RSP: +- return; +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type\n"); +- return; +- } ++ assert(ofi_lsb(flags) == ofi_msb(flags)); ++ ofi_ep_cntr_inc_funcs[flags](&ep->util_ep); ++} + +- if (cntr) +- cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); ++void rxd_cntr_report_rx_comp(struct rxd_ep *ep, struct rxd_x_entry *rx_entry) ++{ ++ uint64_t flags = rx_entry->cq_entry.flags & ++ (FI_RECV | FI_REMOTE_WRITE | FI_REMOTE_READ); ++ ++ assert(ofi_lsb(flags) == ofi_msb(flags)); ++ ofi_ep_cntr_inc_funcs[flags](&ep->util_ep); + } + + void rxd_cntr_report_error(struct rxd_ep *ep, struct fi_cq_err_entry *err) +@@ -98,6 +140,3 @@ void rxd_cntr_report_error(struct rxd_ep *ep, struct fi_cq_err_entry *err) + if (cntr) + cntr->cntr_fid.ops->adderr(&cntr->cntr_fid, 1); + } +- +- +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cq.c +index 6a929b7..18176aa 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cq.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -68,6 +68,7 @@ static int rxd_cq_write_ctx(struct rxd_cq *cq, + struct fi_cq_tagged_entry *cq_entry) + { + struct fi_cq_tagged_entry *comp; ++ + if (ofi_cirque_isfull(cq->util_cq.cirq)) + return -FI_ENOSPC; + +@@ -157,979 +158,1045 @@ static int rxd_cq_write_tagged_signal(struct rxd_cq *cq, + return ret; + } + +-static int rxd_check_start_pkt_order(struct rxd_ep *ep, struct rxd_peer *peer, +- struct ofi_ctrl_hdr *ctrl, +- struct fi_cq_msg_entry *comp) ++void rxd_rx_entry_free(struct rxd_ep *ep, struct rxd_x_entry *rx_entry) + { +- uint64_t msg_id; +- +- msg_id = ctrl->msg_id >> RXD_MAX_TX_BITS; +- if (peer->exp_msg_id == msg_id) +- return 0; +- +- return (peer->exp_msg_id > msg_id) ? +- -FI_EALREADY : -FI_EINVAL; ++ rx_entry->op = RXD_NO_OP; ++ dlist_remove(&rx_entry->entry); ++ rxd_release_rx_entry(ep, rx_entry); + } + +-static int rxd_rx_entry_match(struct dlist_entry *item, const void *arg) ++static int rxd_match_pkt_entry(struct slist_entry *item, const void *arg) + { +- const struct ofi_ctrl_hdr *ctrl = arg; +- struct rxd_rx_entry *rx_entry; ++ return ((struct rxd_pkt_entry *) arg == ++ container_of(item, struct rxd_pkt_entry, s_entry)); ++} + +- rx_entry = container_of(item, struct rxd_rx_entry, entry); +- return (rx_entry->msg_id == ctrl->msg_id && rx_entry->peer == ctrl->conn_id); +-} +- +-static void rxd_handle_dup_datastart(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_buf *rx_buf) ++static void rxd_remove_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- struct dlist_entry *item; +- struct rxd_rx_entry *rx_entry; +- struct rxd_peer *peer; ++ struct slist_entry *item; + +- peer = rxd_ep_getpeer_info(ep, ctrl->conn_id); +- item = dlist_find_first_match(&ep->rx_entry_list, +- rxd_rx_entry_match, ctrl); ++ item = slist_remove_first_match(&ep->rx_pkt_list, rxd_match_pkt_entry, ++ pkt_entry); + if (!item) { +- /* for small (1-packet) messages we may have situation +- * when receiver completed operation and destroyed +- * rx_entry, but ack is lost (not delivered to sender). +- * in this case just send ack with zero window to +- * allow sender complete operation on sender side */ +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, 0, UINT64_MAX, +- peer->conn_data, ctrl->conn_id); +- return; ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "could not find posted rx to release\n"); + } ++} + +- FI_INFO(&rxd_prov, FI_LOG_EP_CTRL, +- "duplicate start-data: msg_id: %" PRIu64 ", seg_no: %d\n", +- ctrl->msg_id, ctrl->seg_no); ++void rxd_release_repost_rx(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) ++{ ++ rxd_release_rx_pkt(ep, pkt_entry); ++ rxd_ep_post_buf(ep); ++} + +- rx_entry = container_of(item, struct rxd_rx_entry, entry); +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, rx_entry->credits, rx_entry->key, +- peer->conn_data, ctrl->conn_id); +- return; ++void rxd_cq_report_error(struct rxd_cq *cq, struct fi_cq_err_entry *err_entry) ++{ ++ struct fi_cq_tagged_entry cq_entry = {0}; ++ struct util_cq_oflow_err_entry *entry = calloc(1, sizeof(*entry)); ++ if (!entry) { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "out of memory, cannot report CQ error\n"); ++ return; ++ } ++ ++ entry->comp = *err_entry; ++ slist_insert_tail(&entry->list_entry, &cq->util_cq.oflow_err_list); ++ cq_entry.flags = UTIL_FLAG_ERROR; ++ cq->write_fn(cq, &cq_entry); + } + +-static void rxd_handle_conn_req(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct fi_cq_msg_entry *comp, +- struct rxd_rx_buf *rx_buf) ++static void rxd_complete_rx(struct rxd_ep *ep, struct rxd_x_entry *rx_entry) + { +- struct rxd_pkt_data *pkt_data; +- struct rxd_peer *peer_info; +- fi_addr_t dg_fiaddr; +- void *addr; +- int ret; ++ struct fi_cq_err_entry err_entry; ++ struct rxd_cq *rx_cq = rxd_ep_rx_cq(ep); + +- FI_INFO(&rxd_prov, FI_LOG_EP_DATA, +- "conn req - rx_key: %" PRIu64 "\n", ctrl->rx_key); ++ if (rx_entry->flags & RXD_CANCELLED) ++ goto out; + +- pkt_data = (struct rxd_pkt_data *) ctrl; +- addr = pkt_data->data; +- if (ctrl->seg_size > RXD_MAX_DGRAM_ADDR) { +- FI_WARN(&rxd_prov, FI_LOG_EP_DATA, "addr too large\n"); +- goto repost; ++ if (rx_entry->bytes_done != rx_entry->cq_entry.len) { ++ memset(&err_entry, 0, sizeof(err_entry)); ++ err_entry.op_context = rx_entry->cq_entry.op_context; ++ err_entry.flags = rx_entry->cq_entry.flags; ++ err_entry.len = rx_entry->bytes_done; ++ err_entry.err = FI_ETRUNC; ++ err_entry.prov_errno = 0; ++ rxd_cq_report_error(rx_cq, &err_entry); ++ goto out; + } + +- ret = rxd_av_insert_dg_addr(rxd_ep_av(ep), ctrl->rx_key, addr, &dg_fiaddr); +- if (ret) { +- FI_WARN(&rxd_prov, FI_LOG_EP_DATA, "failed to insert peer address\n"); +- goto repost; +- } ++ if (rx_entry->cq_entry.flags & FI_REMOTE_CQ_DATA || ++ (!(rx_entry->flags & RXD_NO_RX_COMP) && ++ rx_entry->cq_entry.flags & FI_RECV)) ++ rx_cq->write_fn(rx_cq, &rx_entry->cq_entry); + +- peer_info = rxd_ep_getpeer_info(ep, dg_fiaddr); +- if (peer_info->state != CMAP_CONNECTED) { +- peer_info->state = CMAP_CONNECTED; +- peer_info->conn_data = ctrl->conn_id; +- peer_info->exp_msg_id++; +- } ++ rxd_cntr_report_rx_comp(ep, rx_entry); + +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_connresp, 0, ctrl->conn_id, +- dg_fiaddr, dg_fiaddr); +-repost: +- rxd_ep_repost_buff(rx_buf); ++out: ++ rxd_rx_entry_free(ep, rx_entry); + } + +-int rxd_tx_pkt_match(struct dlist_entry *item, const void *arg) ++static void rxd_complete_tx(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) + { +- const struct ofi_ctrl_hdr *pkt_ctrl, *ack_ctrl = arg; +- struct rxd_pkt_meta *tx_pkt; ++ struct rxd_cq *tx_cq = rxd_ep_tx_cq(ep); ++ ++ if (!(tx_entry->flags & RXD_NO_TX_COMP)) ++ tx_cq->write_fn(tx_cq, &tx_entry->cq_entry); + +- tx_pkt = container_of(item, struct rxd_pkt_meta, entry); +- pkt_ctrl = (struct ofi_ctrl_hdr *) tx_pkt->pkt_data; +- return (ack_ctrl->seg_no == pkt_ctrl->seg_no) ? 1 : 0; ++ rxd_cntr_report_tx_comp(ep, tx_entry); ++ rxd_tx_entry_free(ep, tx_entry); + } + +-static void rxd_handle_ack(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_buf *rx_buf) ++static int rxd_comp_pkt_seq_no(struct dlist_entry *item, const void *arg) + { +- struct rxd_tx_entry *tx_entry; +- uint64_t idx; ++ struct rxd_base_hdr *list_hdr; ++ struct rxd_base_hdr *new_hdr; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "ack- msg_id: %" PRIu64 ", segno: %d, segsz: %d, buf: %p\n", +- ctrl->msg_id, ctrl->seg_no, ctrl->seg_size, rx_buf); ++ list_hdr = rxd_get_base_hdr(container_of(item, ++ struct rxd_pkt_entry, d_entry)); + +- idx = ctrl->msg_id & RXD_TX_IDX_BITS; +- tx_entry = &ep->tx_entry_fs->buf[idx]; +- if (tx_entry->msg_id != ctrl->msg_id) +- goto out; ++ new_hdr = rxd_get_base_hdr(container_of((struct dlist_entry *) arg, ++ struct rxd_pkt_entry, d_entry)); + +- rxd_ep_free_acked_pkts(ep, tx_entry, ctrl->seg_no); +- if ((tx_entry->bytes_sent == tx_entry->op_hdr.size) && +- dlist_empty(&tx_entry->pkt_list)) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "reporting TX completion : %p\n", tx_entry); +- if (tx_entry->op_type != RXD_TX_READ_REQ) { +- rxd_cq_report_tx_comp(rxd_ep_tx_cq(ep), tx_entry); +- rxd_cntr_report_tx_comp(ep, tx_entry); +- rxd_tx_entry_free(ep, tx_entry); +- } ++ return new_hdr->seq_no > list_hdr->seq_no; ++} ++ ++static void rxd_ep_recv_data(struct rxd_ep *ep, struct rxd_x_entry *x_entry, ++ struct rxd_data_pkt *pkt, size_t size) ++{ ++ struct rxd_domain *rxd_domain = rxd_ep_domain(ep); ++ uint64_t done; ++ struct iovec *iov; ++ size_t iov_count; ++ ++ if (x_entry->cq_entry.flags & FI_ATOMIC) { ++ iov = x_entry->res_iov; ++ iov_count = x_entry->res_count; + } else { +- tx_entry->rx_key = ctrl->rx_key; +- /* do not allow reduce window size (on duplicate acks) */ +- tx_entry->window = MAX(tx_entry->window, ctrl->seg_no + ctrl->seg_size); +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "ack- msg_id: %" PRIu64 ", window: %d\n", +- ctrl->msg_id, tx_entry->window); ++ iov = x_entry->iov; ++ iov_count = x_entry->iov_count; ++ } ++ ++ done = ofi_copy_to_iov(iov, iov_count, x_entry->offset + ++ (pkt->ext_hdr.seg_no * rxd_domain->max_seg_sz), ++ pkt->msg, size - sizeof(struct rxd_data_pkt) - ++ ep->rx_prefix_size); ++ ++ x_entry->bytes_done += done; ++ ep->peers[pkt->base_hdr.peer].rx_seq_no++; ++ x_entry->next_seg_no++; ++ ++ if (x_entry->next_seg_no < x_entry->num_segs) { ++ if (!(ep->peers[pkt->base_hdr.peer].rx_seq_no % ++ ep->peers[pkt->base_hdr.peer].rx_window)) ++ rxd_ep_send_ack(ep, pkt->base_hdr.peer); ++ return; ++ } ++ rxd_ep_send_ack(ep, pkt->base_hdr.peer); ++ ++ if (x_entry->cq_entry.flags & FI_READ) { ++ fastlock_acquire(&ep->util_ep.tx_cq->cq_lock); ++ rxd_complete_tx(ep, x_entry); ++ fastlock_release(&ep->util_ep.tx_cq->cq_lock); ++ } else { ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ rxd_complete_rx(ep, x_entry); ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); + } +-out: +- rxd_ep_repost_buff(rx_buf); + } + +-/* +- * Discarded transfers were discarded by the receiving side, so we abort +- * transferring the rest of the data. However, the completion is still +- * reported to the sender as successful. This ensures that short and long +- * messages are treated the same, since short messages would be entirely +- * buffered at the receiver, with no notification that the application later +- * discarded the message. +- */ +-static void rxd_handle_discard(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_buf *rx_buf) ++static void rxd_verify_active(struct rxd_ep *ep, fi_addr_t addr, fi_addr_t peer_addr) + { +- struct rxd_tx_entry *tx_entry; +- uint64_t idx; ++ struct rxd_pkt_entry *pkt_entry; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "discard- msg_id: %" PRIu64 ", segno: %d\n", +- ctrl->msg_id, ctrl->seg_no); +- +- idx = ctrl->msg_id & RXD_TX_IDX_BITS; +- tx_entry = &ep->tx_entry_fs->buf[idx]; +- if (tx_entry->msg_id == ctrl->msg_id) { +- rxd_cq_report_tx_comp(rxd_ep_tx_cq(ep), tx_entry); +- rxd_cntr_report_tx_comp(ep, tx_entry); +- rxd_tx_entry_done(ep, tx_entry); ++ if (ep->peers[addr].peer_addr == peer_addr && ++ ep->peers[addr].peer_addr != FI_ADDR_UNSPEC) ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "overwriting active peer - unexpected behavior\n"); ++ ++ ep->peers[addr].peer_addr = peer_addr; ++ ++ if (!dlist_empty(&ep->peers[addr].unacked) && ++ rxd_get_base_hdr(container_of((&ep->peers[addr].unacked)->next, ++ struct rxd_pkt_entry, d_entry))->type == RXD_RTS) { ++ dlist_pop_front(&ep->peers[addr].unacked, ++ struct rxd_pkt_entry, pkt_entry, d_entry); ++ if (pkt_entry->flags & RXD_PKT_IN_USE) { ++ dlist_insert_tail(&pkt_entry->d_entry, &ep->ctrl_pkts); ++ pkt_entry->flags |= RXD_PKT_ACKED; ++ } else { ++ rxd_release_tx_pkt(ep, pkt_entry); ++ ep->peers[addr].unacked_cnt--; ++ } ++ dlist_remove(&ep->peers[addr].entry); + } + +- rxd_ep_repost_buff(rx_buf); ++ if (!ep->peers[addr].active) { ++ dlist_insert_tail(&ep->peers[addr].entry, &ep->active_peers); ++ ep->peers[addr].retry_cnt = 0; ++ ep->peers[addr].active = 1; ++ } + } + +-void rxd_tx_pkt_free(struct rxd_pkt_meta *pkt_meta) ++static int rxd_move_tx_pkt(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) + { +- util_buf_release(pkt_meta->ep->tx_pkt_pool, pkt_meta); ++ struct rxd_base_hdr *hdr = rxd_get_base_hdr(tx_entry->pkt); ++ ++ if (ep->peers[tx_entry->peer].unacked_cnt >= rxd_env.max_unacked) ++ return 0; ++ ++ tx_entry->start_seq = rxd_set_pkt_seq(&ep->peers[tx_entry->peer], ++ tx_entry->pkt); ++ if (tx_entry->op != RXD_READ_REQ && tx_entry->num_segs > 1) { ++ ep->peers[tx_entry->peer].tx_seq_no = tx_entry->start_seq + ++ tx_entry->num_segs; ++ } ++ hdr->peer = ep->peers[tx_entry->peer].peer_addr; ++ rxd_insert_unacked(ep, tx_entry->peer, tx_entry->pkt); ++ tx_entry->pkt = NULL; ++ ++ if (tx_entry->op == RXD_READ_REQ || tx_entry->op == RXD_ATOMIC_FETCH || ++ tx_entry->op == RXD_ATOMIC_COMPARE) { ++ dlist_remove(&tx_entry->entry); ++ dlist_insert_tail(&tx_entry->entry, ++ &ep->peers[tx_entry->peer].rma_rx_list); ++ } ++ ++ return ep->peers[tx_entry->peer].unacked_cnt < rxd_env.max_unacked; + } + +-void rxd_tx_entry_done(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry) ++void rxd_progress_tx_list(struct rxd_ep *ep, struct rxd_peer *peer) + { +- struct rxd_pkt_meta *pkt_meta; +- +- while (!dlist_empty(&tx_entry->pkt_list)) { +- pkt_meta = container_of(tx_entry->pkt_list.next, +- struct rxd_pkt_meta, entry); +- dlist_remove(&pkt_meta->entry); +- if (pkt_meta->flags & RXD_LOCAL_COMP) +- rxd_tx_pkt_free(pkt_meta); +- else +- pkt_meta->flags |= RXD_REMOTE_ACK; ++ struct dlist_entry *tmp_entry; ++ struct rxd_x_entry *tx_entry; ++ uint64_t head_seq = peer->last_rx_ack; ++ ++ if (!dlist_empty(&peer->unacked)) { ++ head_seq = rxd_get_base_hdr(container_of( ++ (&peer->unacked)->next, ++ struct rxd_pkt_entry, d_entry))->seq_no; + } +- rxd_tx_entry_free(ep, tx_entry); ++ ++ if (peer->peer_addr == FI_ADDR_UNSPEC) ++ return; ++ ++ dlist_foreach_container_safe(&peer->tx_list, struct rxd_x_entry, ++ tx_entry, entry, tmp_entry) { ++ if (tx_entry->pkt) { ++ if (!rxd_move_tx_pkt(ep, tx_entry) || ++ tx_entry->op == RXD_READ_REQ) ++ break; ++ } ++ ++ if (tx_entry->bytes_done == tx_entry->cq_entry.len) { ++ if (ofi_before(tx_entry->start_seq + (tx_entry->num_segs - 1), ++ head_seq)) { ++ if (tx_entry->op == RXD_DATA_READ) { ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ rxd_complete_rx(ep, tx_entry); ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ } else { ++ fastlock_acquire(&ep->util_ep.tx_cq->cq_lock); ++ rxd_complete_tx(ep, tx_entry); ++ fastlock_release(&ep->util_ep.tx_cq->cq_lock); ++ } ++ } ++ continue; ++ } ++ ++ if (!rxd_ep_post_data_pkts(ep, tx_entry)) ++ break; ++ } ++ ++ if (dlist_empty(&peer->tx_list)) ++ peer->retry_cnt = 0; + } + +-static int rxd_conn_msg_match(struct dlist_entry *item, const void *arg) ++static void rxd_update_peer(struct rxd_ep *ep, fi_addr_t peer, fi_addr_t peer_addr) + { +- struct rxd_tx_entry *tx_entry; +- struct ofi_ctrl_hdr *ctrl = (struct ofi_ctrl_hdr *) arg; +- tx_entry = container_of(item, struct rxd_tx_entry, entry); +- return (tx_entry->op_type == RXD_TX_CONN && +- tx_entry->peer == ctrl->rx_key); ++ rxd_verify_active(ep, peer, peer_addr); ++ rxd_progress_tx_list(ep, &ep->peers[peer]); + } + +-static void rxd_handle_connect_ack(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_buf *rx_buf) ++static int rxd_send_cts(struct rxd_ep *rxd_ep, struct rxd_rts_pkt *rts_pkt, ++ fi_addr_t peer) + { +- struct rxd_peer *peer; +- struct dlist_entry *match; +- struct rxd_tx_entry *tx_entry; ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_cts_pkt *cts; ++ int ret = 0; + +- FI_INFO(&rxd_prov, FI_LOG_EP_CTRL, +- "connect ack- msg_id: %" PRIu64 ", segno: %d\n", +- ctrl->msg_id, ctrl->seg_no); ++ rxd_update_peer(rxd_ep, peer, rts_pkt->rts_addr); + +- match = dlist_find_first_match(&ep->tx_entry_list, +- rxd_conn_msg_match, ctrl); +- if (!match) { +- FI_INFO(&rxd_prov, FI_LOG_EP_CTRL, "no matching connect\n"); +- goto out; +- } ++ pkt_entry = rxd_get_tx_pkt(rxd_ep); ++ if (!pkt_entry) ++ return -FI_ENOMEM; + +- tx_entry = container_of(match, struct rxd_tx_entry, entry); +- peer = rxd_ep_getpeer_info(ep, tx_entry->peer); +- peer->state = CMAP_CONNECTED; +- peer->conn_data = ctrl->conn_id; ++ cts = (struct rxd_cts_pkt *) (pkt_entry->pkt); ++ pkt_entry->pkt_size = sizeof(*cts) + rxd_ep->tx_prefix_size; ++ pkt_entry->peer = peer; + +- dlist_remove(match); +- rxd_tx_entry_done(ep, tx_entry); +-out: +- rxd_ep_repost_buff(rx_buf); +-} ++ cts->base_hdr.version = RXD_PROTOCOL_VERSION; ++ cts->base_hdr.type = RXD_CTS; ++ cts->cts_addr = peer; ++ cts->rts_addr = rts_pkt->rts_addr; + +-static void rxd_set_rx_credits(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry) +-{ +- size_t num_pkts, avail, size_left; +- +- size_left = rx_entry->op_hdr.size - rx_entry->done; +- num_pkts = (size_left + rxd_ep_domain(ep)->max_mtu_sz - 1) / +- rxd_ep_domain(ep)->max_mtu_sz; +- avail = MIN(ep->credits, num_pkts); +- rx_entry->credits = MIN(avail, RXD_MAX_RX_CREDITS); +- rx_entry->last_win_seg += rx_entry->credits; +- ep->credits -= rx_entry->credits; ++ dlist_insert_tail(&pkt_entry->d_entry, &rxd_ep->ctrl_pkts); ++ ret = rxd_ep_retry_pkt(rxd_ep, pkt_entry); ++ if (ret) { ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(rxd_ep, pkt_entry); ++ } ++ ++ return ret; + } + +-static struct rxd_rx_entry *rxd_rx_entry_alloc(struct rxd_ep *ep) ++static int rxd_match_msg(struct dlist_entry *item, const void *arg) + { +- struct rxd_rx_entry *rx_entry; ++ struct rxd_match_attr *attr = (struct rxd_match_attr *) arg; ++ struct rxd_x_entry *rx_entry; + +- if (freestack_isempty(ep->rx_entry_fs)) +- return NULL; ++ rx_entry = container_of(item, struct rxd_x_entry, entry); + +- rx_entry = freestack_pop(ep->rx_entry_fs); +- rx_entry->key = rx_entry - &ep->rx_entry_fs->buf[0]; +- dlist_insert_tail(&rx_entry->entry, &ep->rx_entry_list); +- return rx_entry; ++ return rxd_match_addr(rx_entry->peer, attr->peer); + } + +-static void rxd_progress_wait_rx(struct rxd_ep *ep, +- struct rxd_rx_entry *rx_entry) ++static int rxd_match_tmsg(struct dlist_entry *item, const void *arg) + { +- struct ofi_ctrl_hdr ctrl; ++ struct rxd_match_attr *attr = (struct rxd_match_attr *) arg; ++ struct rxd_x_entry *rx_entry; + +- rxd_set_rx_credits(ep, rx_entry); +- if (!rx_entry->credits) +- return; ++ rx_entry = container_of(item, struct rxd_x_entry, entry); + +- dlist_remove(&rx_entry->wait_entry); ++ return rxd_match_addr(rx_entry->peer, attr->peer) && ++ rxd_match_tag(rx_entry->cq_entry.tag, rx_entry->ignore, ++ attr->tag); ++} + +- ctrl.msg_id = rx_entry->msg_id; +- ctrl.seg_no = rx_entry->exp_seg_no - 1; +- ctrl.conn_id = rx_entry->peer; ++static void rxd_check_post_unexp(struct rxd_ep *ep, struct dlist_entry *list, ++ struct rxd_pkt_entry *pkt_entry) ++{ ++ struct rxd_pkt_entry *unexp_entry; ++ struct rxd_base_hdr *new_hdr = rxd_get_base_hdr(pkt_entry); ++ struct rxd_base_hdr *unexp_hdr; ++ ++ if (!rxd_env.retry) ++ goto insert; ++ ++ dlist_foreach_container(list, struct rxd_pkt_entry, unexp_entry, d_entry) { ++ unexp_hdr = rxd_get_base_hdr(unexp_entry); ++ if (unexp_hdr->seq_no == new_hdr->seq_no && ++ unexp_hdr->peer == new_hdr->peer) { ++ rxd_release_repost_rx(ep, pkt_entry); ++ return; ++ } ++ } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "rx-entry wait over [%" PRIx64 "], credits: %d\n", +- rx_entry->msg_id, rx_entry->credits); +- rxd_ep_reply_ack(ep, &ctrl, ofi_ctrl_ack, rx_entry->credits, +- rx_entry->key, rx_entry->peer_info->conn_data, +- ctrl.conn_id); ++insert: ++ dlist_insert_tail(&pkt_entry->d_entry, list); + } + +-static void rxd_check_waiting_rx(struct rxd_ep *ep) ++static void rxd_handle_rts(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- struct dlist_entry *entry; +- struct rxd_rx_entry *rx_entry; ++ struct rxd_av *rxd_av; ++ struct ofi_rbnode *node; ++ fi_addr_t rxd_addr; ++ struct rxd_rts_pkt *pkt = (struct rxd_rts_pkt *) (pkt_entry->pkt); ++ int ret; + +- if (!ep->credits) +- return; ++ rxd_av = rxd_ep_av(ep); ++ node = ofi_rbmap_find(&rxd_av->rbmap, pkt->source); ++ ++ if (node) { ++ rxd_addr = (fi_addr_t) node->data; ++ } else { ++ ret = rxd_av_insert_dg_addr(rxd_av, (void *) pkt->source, ++ &rxd_addr, 0, NULL); ++ if (ret) ++ return; ++ } + +- while(!dlist_empty(&ep->wait_rx_list) && ep->credits) { +- entry = ep->wait_rx_list.next; +- rx_entry = container_of(entry, struct rxd_rx_entry, wait_entry); +- rxd_progress_wait_rx(ep, rx_entry); ++ if (rxd_send_cts(ep, pkt, rxd_addr)) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "error posting CTS\n"); + } + } + +-void rxd_rx_entry_free(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry) ++struct rxd_x_entry *rxd_progress_multi_recv(struct rxd_ep *ep, ++ struct rxd_x_entry *rx_entry, ++ size_t total_size) + { +- rx_entry->key = -1; +- dlist_remove(&rx_entry->entry); +- freestack_push(ep->rx_entry_fs, rx_entry); ++ struct rxd_x_entry *dup_entry; ++ size_t left; ++ uint32_t dup_id; + +- if (ep->credits && !dlist_empty(&ep->wait_rx_list)) +- rxd_check_waiting_rx(ep); +-} ++ left = rx_entry->iov[0].iov_len - total_size; + +-static int rxd_match_recv_entry(struct dlist_entry *item, const void *arg) +-{ +- const struct rxd_rx_entry *rx_entry = arg; +- struct rxd_recv_entry *recv_entry; ++ if (left < ep->min_multi_recv_size) { ++ rx_entry->cq_entry.flags |= FI_MULTI_RECV; ++ return NULL; ++ } + +- recv_entry = container_of(item, struct rxd_recv_entry, entry); +- return (recv_entry->msg.addr == FI_ADDR_UNSPEC || +- rx_entry->source == FI_ADDR_UNSPEC || +- recv_entry->msg.addr == rx_entry->source); ++ dup_entry = rxd_get_rx_entry(ep); ++ if (!dup_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get rx entry\n"); ++ return NULL; ++ } ++ dup_id = dup_entry->rx_id; ++ memcpy(dup_entry, rx_entry, sizeof(*rx_entry)); ++ dup_entry->rx_id = dup_id; ++ dup_entry->iov[0].iov_base = rx_entry->iov[0].iov_base; ++ dup_entry->iov[0].iov_len = total_size; ++ dup_entry->cq_entry.len = total_size; ++ ++ rx_entry->iov[0].iov_base = (char *) rx_entry->iov[0].iov_base + total_size; ++ rx_entry->cq_entry.buf = rx_entry->iov[0].iov_base; ++ rx_entry->iov[0].iov_len = left; ++ rx_entry->cq_entry.len = left; ++ ++ return dup_entry; + } + +-struct rxd_recv_entry *rxd_get_recv_entry(struct rxd_ep *ep, +- struct rxd_rx_entry *rx_entry) ++static struct rxd_x_entry *rxd_match_rx(struct rxd_ep *ep, ++ struct rxd_pkt_entry *pkt_entry, ++ struct rxd_base_hdr *base, ++ struct rxd_tag_hdr *tag, ++ struct rxd_sar_hdr *op, size_t msg_size) + { ++ struct rxd_x_entry *rx_entry, *dup_entry; ++ struct dlist_entry *rx_list; ++ struct dlist_entry *unexp_list; + struct dlist_entry *match; +- struct rxd_recv_entry *recv_entry; ++ struct rxd_match_attr attr; ++ size_t total_size; ++ ++ attr.peer = base->peer; ++ ++ if (tag) { ++ attr.tag = tag->tag; ++ rx_list = &ep->rx_tag_list; ++ match = dlist_find_first_match(rx_list, &rxd_match_tmsg, ++ (void *) &attr); ++ unexp_list = &ep->unexp_tag_list; ++ } else { ++ attr.tag = 0; ++ rx_list = &ep->rx_list; ++ match = dlist_find_first_match(rx_list, &rxd_match_msg, ++ (void *) &attr); ++ unexp_list = &ep->unexp_list; ++ } + +- match = dlist_find_first_match(&ep->recv_list, &rxd_match_recv_entry, +- (void *) rx_entry); + if (!match) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "no matching recv entry\n"); ++ rxd_check_post_unexp(ep, unexp_list, pkt_entry); + return NULL; + } + +- dlist_remove(match); +- recv_entry = container_of(match, struct rxd_recv_entry, entry); +- return recv_entry; ++ rx_entry = container_of(match, struct rxd_x_entry, entry); ++ ++ total_size = op ? op->size : msg_size; ++ if (rx_entry->flags & RXD_CANCELLED) ++ goto out; ++ ++ if (rx_entry->flags & RXD_MULTI_RECV) { ++ dup_entry = rxd_progress_multi_recv(ep, rx_entry, total_size); ++ if (!dup_entry) ++ goto out; ++ ++ dup_entry->start_seq = base->seq_no; ++ dlist_init(&dup_entry->entry); ++ return dup_entry; ++ } ++ ++out: ++ dlist_remove(&rx_entry->entry); ++ rx_entry->cq_entry.len = MIN(rx_entry->cq_entry.len, total_size); ++ return rx_entry; + } + +-static int rxd_match_trecv_entry(struct dlist_entry *item, const void *arg) ++static int rxd_verify_iov(struct rxd_ep *ep, struct ofi_rma_iov *rma, ++ size_t count, uint32_t type, struct iovec *iov) + { +- const struct rxd_rx_entry *rx_entry = arg; +- struct rxd_trecv_entry *trecv_entry; +- +- trecv_entry = container_of(item, struct rxd_trecv_entry, entry); +- return ((trecv_entry->msg.tag | trecv_entry->msg.ignore) == +- (rx_entry->op_hdr.tag | trecv_entry->msg.ignore) && +- ((trecv_entry->msg.addr == FI_ADDR_UNSPEC) || +- (rx_entry->source == FI_ADDR_UNSPEC) || +- (trecv_entry->msg.addr == rx_entry->source))); ++ struct util_domain *util_domain = &rxd_ep_domain(ep)->util_domain; ++ int i, ret; ++ ++ for (i = 0; i < count; i++) { ++ ret = ofi_mr_verify(&util_domain->mr_map, rma[i].len, ++ (uintptr_t *)(&rma[i].addr), rma[i].key, ++ ofi_rx_mr_reg_flags(type, 0)); ++ iov[i].iov_base = (void *) rma[i].addr; ++ iov[i].iov_len = rma[i].len; ++ if (ret) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not verify MR\n"); ++ return -FI_EACCES; ++ } ++ } + return 0; + } + +-struct rxd_trecv_entry *rxd_get_trecv_entry(struct rxd_ep *ep, +- struct rxd_rx_entry *rx_entry) ++static struct rxd_x_entry *rxd_rma_read_entry_init(struct rxd_ep *ep, ++ struct rxd_base_hdr *base_hdr, struct rxd_sar_hdr *sar_hdr, ++ struct rxd_rma_hdr *rma_hdr) + { +- struct dlist_entry *match; +- struct rxd_trecv_entry *trecv_entry; ++ struct rxd_x_entry *rx_entry; ++ struct rxd_domain *rxd_domain = rxd_ep_domain(ep); ++ int ret; + +- match = dlist_find_first_match(&ep->trecv_list, &rxd_match_trecv_entry, +- (void *)rx_entry); +- if (!match) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "no matching trecv entry, tag: %" PRIx64 "\n", +- rx_entry->op_hdr.tag); ++ rx_entry = rxd_get_rx_entry(ep); ++ if (!rx_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get rx entry\n"); + return NULL; + } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "matched - tag: %" PRIx64 "\n", +- rx_entry->op_hdr.tag); ++ rx_entry->tx_id = sar_hdr->tx_id; ++ rx_entry->op = RXD_DATA_READ; ++ rx_entry->peer = base_hdr->peer; ++ rx_entry->flags = RXD_NO_TX_COMP; ++ rx_entry->bytes_done = 0; ++ rx_entry->next_seg_no = 0; ++ rx_entry->num_segs = ofi_div_ceil(sar_hdr->size, rxd_domain->max_seg_sz); ++ rx_entry->pkt = NULL; ++ ++ ret = rxd_verify_iov(ep, rma_hdr->rma, sar_hdr->iov_count, ++ base_hdr->type, rx_entry->iov); ++ if (ret) ++ return NULL; ++ ++ rx_entry->iov_count = sar_hdr->iov_count; ++ rx_entry->cq_entry.flags = ofi_rx_cq_flags(ofi_op_read_req); ++ rx_entry->cq_entry.len = sar_hdr->size; ++ ++ dlist_insert_tail(&rx_entry->entry, &ep->peers[rx_entry->peer].tx_list); + +- dlist_remove(match); +- trecv_entry = container_of(match, struct rxd_trecv_entry, entry); +- trecv_entry->rx_entry = rx_entry; +- return trecv_entry; ++ rxd_progress_tx_list(ep, &ep->peers[rx_entry->peer]); ++ ++ return rx_entry; + } + +-void rxd_cq_report_error(struct rxd_cq *cq, struct fi_cq_err_entry *err_entry) ++static struct rxd_x_entry *rxd_rma_rx_entry_init(struct rxd_ep *ep, ++ struct rxd_base_hdr *base_hdr, struct rxd_sar_hdr *sar_hdr, ++ struct rxd_rma_hdr *rma_hdr) + { +- struct fi_cq_tagged_entry cq_entry = {0}; +- struct util_cq_err_entry *entry = calloc(1, sizeof(*entry)); +- if (!entry) { +- FI_WARN(&rxd_prov, FI_LOG_CQ, +- "out of memory, cannot report CQ error\n"); +- return; +- } ++ struct rxd_x_entry *rx_entry; ++ struct iovec iov[RXD_IOV_LIMIT]; ++ int ret, iov_count; + +- entry->err_entry = *err_entry; +- slist_insert_tail(&entry->list_entry, &cq->util_cq.err_list); +- cq_entry.flags = UTIL_FLAG_ERROR; +- cq->write_fn(cq, &cq_entry); ++ iov_count = sar_hdr ? sar_hdr->iov_count : 1; ++ ret = rxd_verify_iov(ep, rma_hdr->rma, iov_count, ++ base_hdr->type, iov); ++ if (ret) ++ return NULL; ++ ++ rx_entry = rxd_rx_entry_init(ep, iov, iov_count, 0, 0, NULL, ++ base_hdr->peer, base_hdr->type, ++ base_hdr->flags); ++ if (!rx_entry) ++ return NULL; ++ ++ rx_entry->start_seq = base_hdr->seq_no; ++ ++ return rx_entry; + } + +-void rxd_cq_report_tx_comp(struct rxd_cq *cq, struct rxd_tx_entry *tx_entry) ++static struct rxd_x_entry *rxd_rx_atomic_fetch(struct rxd_ep *ep, ++ struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr *sar_hdr, ++ struct rxd_rma_hdr *rma_hdr, ++ struct rxd_atom_hdr *atom_hdr) + { +- struct fi_cq_tagged_entry cq_entry = {0}; ++ struct rxd_x_entry *rx_entry; ++ int ret; + +- /* todo: handle FI_COMPLETION */ +- switch(tx_entry->op_type) { +- case RXD_TX_MSG: +- cq_entry.flags = (FI_TRANSMIT | FI_MSG); +- cq_entry.op_context = tx_entry->msg.msg.context; +- cq_entry.len = tx_entry->op_hdr.size; +- cq_entry.buf = tx_entry->msg.msg_iov[0].iov_base; +- cq_entry.data = tx_entry->op_hdr.data; +- break; +- case RXD_TX_TAG: +- cq_entry.flags = (FI_TRANSMIT | FI_TAGGED); +- cq_entry.op_context = tx_entry->tmsg.tmsg.context; +- cq_entry.len = tx_entry->op_hdr.size; +- cq_entry.buf = tx_entry->tmsg.msg_iov[0].iov_base; +- cq_entry.data = tx_entry->op_hdr.data; +- cq_entry.tag = tx_entry->tmsg.tmsg.tag; +- break; +- case RXD_TX_WRITE: +- cq_entry.flags = (FI_TRANSMIT | FI_RMA | FI_WRITE); +- cq_entry.op_context = tx_entry->write.msg.context; +- cq_entry.len = tx_entry->op_hdr.size; +- cq_entry.buf = tx_entry->write.msg.msg_iov[0].iov_base; +- cq_entry.data = tx_entry->op_hdr.data; +- break; +- case RXD_TX_READ_REQ: +- cq_entry.flags = (FI_TRANSMIT | FI_RMA | FI_READ); +- cq_entry.op_context = tx_entry->read_req.msg.context; +- cq_entry.len = tx_entry->op_hdr.size; +- cq_entry.buf = tx_entry->read_req.msg.msg_iov[0].iov_base; +- cq_entry.data = tx_entry->op_hdr.data; +- break; +- case RXD_TX_READ_RSP: +- return; +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type\n"); +- return; ++ rx_entry = rxd_get_rx_entry(ep); ++ if (!rx_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get tx entry\n"); ++ return NULL; + } + +- cq->write_fn(cq, &cq_entry); ++ rx_entry->pkt = rxd_get_tx_pkt(ep); ++ if (!rx_entry->pkt) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get pkt\n"); ++ rxd_rx_entry_free(ep, rx_entry); ++ return NULL; ++ } ++ rx_entry->tx_id = sar_hdr->tx_id; ++ ++ rx_entry->op = RXD_DATA_READ; ++ rx_entry->peer = base_hdr->peer; ++ rx_entry->flags = RXD_NO_TX_COMP; ++ rx_entry->bytes_done = 0; ++ rx_entry->next_seg_no = 0; ++ rx_entry->num_segs = 1; ++ ++ rx_entry->iov_count = sar_hdr->iov_count; ++ ret = rxd_verify_iov(ep, rma_hdr->rma, rx_entry->iov_count, ++ base_hdr->type, rx_entry->iov); ++ if (ret) ++ return NULL; ++ ++ rx_entry->cq_entry.flags = ofi_rx_cq_flags(ofi_op_atomic_fetch); ++ rx_entry->cq_entry.len = sar_hdr->size; ++ ++ rxd_init_data_pkt(ep, rx_entry, rx_entry->pkt); ++ if (rx_entry->bytes_done != rx_entry->cq_entry.len) ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "fetch data length mismatch\n"); ++ ++ dlist_insert_tail(&rx_entry->entry, &ep->peers[rx_entry->peer].tx_list); ++ ++ rxd_ep_send_ack(ep, base_hdr->peer); ++ ++ rxd_progress_tx_list(ep, &ep->peers[rx_entry->peer]); ++ ++ return rx_entry; + } + +-void rxd_ep_handle_data_msg(struct rxd_ep *ep, struct rxd_peer *peer, +- struct rxd_rx_entry *rx_entry, +- struct iovec *iov, size_t iov_count, +- struct ofi_ctrl_hdr *ctrl, void *data, +- struct rxd_rx_buf *rx_buf) ++void rxd_unpack_hdrs(size_t pkt_size, struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr **sar_hdr, struct rxd_tag_hdr **tag_hdr, ++ struct rxd_data_hdr **data_hdr, struct rxd_rma_hdr **rma_hdr, ++ struct rxd_atom_hdr **atom_hdr, void **msg, size_t *msg_size) + { +- struct fi_cq_tagged_entry cq_entry = {0}; +- struct util_cntr *cntr = NULL; +- uint64_t done; +- struct rxd_cq *rxd_rx_cq = rxd_ep_rx_cq(ep); +- +- ep->credits++; +- done = ofi_copy_to_iov(iov, iov_count, rx_entry->done, data, +- ctrl->seg_size); +- rx_entry->done += done; +- rx_entry->credits--; +- rx_entry->exp_seg_no++; +- +- if (done != ctrl->seg_size) { +- /* todo: generate truncation error */ +- /* inform peer */ +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "TODO: message truncated\n"); +- } ++ char *ptr = (char *) base_hdr + sizeof(*base_hdr); ++ uint8_t rma_count = 1; + +- if (rx_entry->credits == 0) { +- rxd_set_rx_credits(ep, rx_entry); ++ if (!(base_hdr->flags & RXD_INLINE)) { ++ *sar_hdr = (struct rxd_sar_hdr *) ptr; ++ rma_count = (*sar_hdr)->iov_count; ++ ptr += sizeof(**sar_hdr); ++ } else { ++ *sar_hdr = NULL; ++ } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "replying ack [%" PRIx64 "] - %d\n", +- ctrl->msg_id, ctrl->seg_no); ++ if (base_hdr->flags & RXD_TAG_HDR) { ++ *tag_hdr = (struct rxd_tag_hdr *) ptr; ++ ptr += sizeof(**tag_hdr); ++ } else { ++ *tag_hdr = NULL; ++ } + +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, rx_entry->credits, +- rx_entry->key, peer->conn_data, ctrl->conn_id); ++ if (base_hdr->flags & RXD_REMOTE_CQ_DATA) { ++ *data_hdr = (struct rxd_data_hdr *) ptr; ++ ptr += sizeof(**data_hdr); ++ } else { ++ *data_hdr = NULL; + } + +- if (rx_entry->op_hdr.size != rx_entry->done) { +- if (rx_entry->credits == 0) { +- dlist_init(&rx_entry->wait_entry); +- dlist_insert_tail(&rx_entry->wait_entry, &ep->wait_rx_list); +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "rx-entry %" PRIx64 " - %d enqueued\n", +- ctrl->msg_id, ctrl->seg_no); ++ if (base_hdr->type >= RXD_READ_REQ && base_hdr->type <= RXD_ATOMIC_COMPARE) { ++ *rma_hdr = (struct rxd_rma_hdr *) ptr; ++ ptr += (sizeof(*(*rma_hdr)->rma) * rma_count); ++ ++ if (base_hdr->type >= RXD_ATOMIC) { ++ *atom_hdr = (struct rxd_atom_hdr *) ptr; ++ ptr += sizeof(**atom_hdr); + } else { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "rx_entry->op_hdr.size: %" PRIu64 ", rx_entry->done: %" PRId64 "\n", +- rx_entry->op_hdr.size, +- rx_entry->done); ++ *atom_hdr = NULL; + } +- return; ++ } else { ++ *rma_hdr = NULL; ++ *atom_hdr = NULL; + } + +- /* todo: handle FI_COMPLETION for RX CQ comp */ +- switch(rx_entry->op_hdr.op) { +- case ofi_op_msg: +- freestack_push(ep->recv_fs, rx_entry->recv); +- /* Handle cntr */ +- cntr = ep->util_ep.rx_cntr; +- /* Handle CQ comp */ +- cq_entry.flags |= FI_RECV; +- cq_entry.op_context = rx_entry->recv->msg.context; +- cq_entry.len = rx_entry->done; +- cq_entry.buf = rx_entry->recv->iov[0].iov_base; +- cq_entry.data = rx_entry->op_hdr.data; +- rxd_rx_cq->write_fn(rxd_rx_cq, &cq_entry); +- break; +- case ofi_op_tagged: +- freestack_push(ep->trecv_fs, rx_entry->trecv); +- /* Handle cntr */ +- cntr = ep->util_ep.rx_cntr; +- /* Handle CQ comp */ +- cq_entry.flags |= (FI_RECV | FI_TAGGED); +- cq_entry.op_context = rx_entry->trecv->msg.context; +- cq_entry.len = rx_entry->done; +- cq_entry.buf = rx_entry->trecv->iov[0].iov_base; +- cq_entry.data = rx_entry->op_hdr.data; +- cq_entry.tag = rx_entry->trecv->msg.tag;\ +- rxd_rx_cq->write_fn(rxd_rx_cq, &cq_entry); +- break; +- case ofi_op_atomic: +- /* Handle cntr */ +- cntr = ep->util_ep.rem_wr_cntr; +- /* Handle CQ comp */ +- cq_entry.flags |= FI_ATOMIC; +- rxd_rx_cq->write_fn(rxd_rx_cq, &cq_entry); +- break; +- case ofi_op_write: +- /* Handle cntr */ +- cntr = ep->util_ep.rem_wr_cntr; +- /* Handle CQ comp */ +- if (rx_entry->op_hdr.flags & OFI_REMOTE_CQ_DATA) { +- cq_entry.flags |= (FI_RMA | FI_REMOTE_WRITE); +- cq_entry.op_context = rx_entry->trecv->msg.context; +- cq_entry.len = rx_entry->done; +- cq_entry.buf = rx_entry->write.iov[0].iov_base; +- cq_entry.data = rx_entry->op_hdr.data; +- rxd_rx_cq->write_fn(rxd_rx_cq, &cq_entry); +- } +- break; +- case ofi_op_read_rsp: +- rxd_cq_report_tx_comp(rxd_ep_tx_cq(ep), rx_entry->read_rsp.tx_entry); +- rxd_cntr_report_tx_comp(ep, rx_entry->read_rsp.tx_entry); +- rxd_tx_entry_done(ep, rx_entry->read_rsp.tx_entry); +- break; +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type: %d\n", +- rx_entry->op_hdr.op); +- break; ++ if (pkt_size < (ptr - (char *) base_hdr)) { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "Cannot process packet smaller than minimum header size\n"); ++ *msg_size = 0; ++ return; + } + +- if (cntr) +- cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); +- +- rxd_rx_entry_free(ep, rx_entry); ++ *msg = ptr; ++ *msg_size = pkt_size - (ptr - (char *) base_hdr); + } + +-static int rxd_check_data_pkt_order(struct rxd_ep *ep, +- struct rxd_peer *peer, +- struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_entry *rx_entry) ++static struct rxd_x_entry *rxd_unpack_init_rx(struct rxd_ep *ep, ++ struct rxd_pkt_entry *pkt_entry, ++ struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr **sar_hdr, ++ struct rxd_tag_hdr **tag_hdr, ++ struct rxd_data_hdr **data_hdr, ++ struct rxd_rma_hdr **rma_hdr, ++ struct rxd_atom_hdr **atom_hdr, ++ void **msg, size_t *msg_size) + { +- if ((rx_entry->msg_id == ctrl->msg_id) && +- (rx_entry->exp_seg_no == ctrl->seg_no)) +- return 0; +- +- if ((rx_entry->msg_id != ctrl->msg_id) || +- (rx_entry->exp_seg_no > ctrl->seg_no)) +- return -FI_EALREADY; +- +- return -FI_EINVAL; ++ rxd_unpack_hdrs(pkt_entry->pkt_size - ep->rx_prefix_size, base_hdr, sar_hdr, ++ tag_hdr, data_hdr, rma_hdr, atom_hdr, msg, msg_size); ++ ++ switch (base_hdr->type) { ++ case RXD_MSG: ++ case RXD_TAGGED: ++ return rxd_match_rx(ep, pkt_entry, base_hdr, *tag_hdr, *sar_hdr, ++ *msg_size); ++ case RXD_READ_REQ: ++ return rxd_rma_read_entry_init(ep, base_hdr, *sar_hdr, *rma_hdr); ++ case RXD_ATOMIC_FETCH: ++ case RXD_ATOMIC_COMPARE: ++ return rxd_rx_atomic_fetch(ep, base_hdr, *sar_hdr, *rma_hdr, *atom_hdr); ++ default: ++ return rxd_rma_rx_entry_init(ep, base_hdr, *sar_hdr, *rma_hdr); ++ } + } + +-static int rxd_match_unexp_msg(struct dlist_entry *item, const void *arg) ++void rxd_do_atomic(void *src, void *dst, void *cmp, enum fi_datatype datatype, ++ enum fi_op atomic_op, size_t cnt) + { +- const struct rxd_recv_entry *recv_entry = arg; +- struct rxd_rx_entry *rx_entry; ++ char tmp_result[RXD_MAX_MTU_SIZE]; + +- rx_entry = container_of(item, struct rxd_rx_entry, unexp_entry); +- return (recv_entry->msg.addr == FI_ADDR_UNSPEC || +- rx_entry->source == FI_ADDR_UNSPEC || +- rx_entry->source == recv_entry->msg.addr); ++ if (atomic_op >= OFI_SWAP_OP_START) { ++ ofi_atomic_swap_handlers[atomic_op - OFI_SWAP_OP_START][datatype](dst, ++ src, cmp, tmp_result, cnt); ++ } else if (atomic_op != FI_ATOMIC_READ) { ++ ofi_atomic_write_handlers[atomic_op][datatype](dst, src, cnt); ++ } + } + +-void rxd_ep_check_unexp_msg_list(struct rxd_ep *ep, struct rxd_recv_entry *recv_entry) ++void rxd_progress_op_msg(struct rxd_ep *ep, struct rxd_x_entry *rx_entry, ++ void **msg, size_t size) + { +- struct dlist_entry *match; +- struct rxd_rx_entry *rx_entry; +- struct rxd_pkt_data_start *pkt_start; +- +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "ep->num_unexp_msg: %d\n", ep->num_unexp_msg); +- match = dlist_remove_first_match(&ep->unexp_msg_list, &rxd_match_unexp_msg, +- (void *) recv_entry); +- if (match) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "progressing unexp msg entry\n"); +- dlist_remove(&recv_entry->entry); +- ep->num_unexp_msg--; +- +- rx_entry = container_of(match, struct rxd_rx_entry, unexp_entry); +- rx_entry->recv = recv_entry; +- +- pkt_start = (struct rxd_pkt_data_start *) rx_entry->unexp_buf->buf; +- rxd_ep_handle_data_msg(ep, rx_entry->peer_info, rx_entry, rx_entry->recv->iov, +- rx_entry->recv->msg.iov_count, &pkt_start->ctrl, +- pkt_start->data, rx_entry->unexp_buf); +- rxd_ep_repost_buff(rx_entry->unexp_buf); +- } ++ rx_entry->bytes_done = ofi_copy_to_iov(rx_entry->iov, ++ rx_entry->iov_count, 0, *msg, size); + } + +-static int rxd_match_unexp_tag(struct dlist_entry *item, const void *arg) ++void rxd_progress_atom_op(struct rxd_ep *ep, struct rxd_x_entry *rx_entry, ++ struct rxd_base_hdr *base_hdr, struct rxd_sar_hdr *sar_hdr, ++ struct rxd_rma_hdr *rma_hdr, struct rxd_atom_hdr *atom_hdr, ++ void **msg, size_t msg_size) + { +- const struct rxd_trecv_entry *trecv_entry = arg; +- struct rxd_rx_entry *rx_entry; +- +- rx_entry = container_of(item, struct rxd_rx_entry, unexp_entry); +- return ((trecv_entry->msg.tag | trecv_entry->msg.ignore) == +- (rx_entry->op_hdr.tag | trecv_entry->msg.ignore) && +- ((trecv_entry->msg.addr == FI_ADDR_UNSPEC) || +- (rx_entry->source == FI_ADDR_UNSPEC) || +- (trecv_entry->msg.addr == rx_entry->source))); ++ char *src, *cmp; ++ size_t len; ++ int i, iov_count; ++ ++ src = (char *) (*msg); ++ cmp = base_hdr->type == RXD_ATOMIC_COMPARE ? (char *) (*msg) + ++ (msg_size / 2) : NULL; ++ ++ iov_count = sar_hdr ? sar_hdr->iov_count : 1; ++ for (i = len = 0; i < iov_count; i++) { ++ rxd_do_atomic(&src[len], rx_entry->iov[i].iov_base, ++ cmp ? &cmp[len] : NULL, atom_hdr->datatype, ++ atom_hdr->atomic_op, rx_entry->iov[i].iov_len / ++ ofi_datatype_size(atom_hdr->datatype)); ++ len += rx_entry->iov[i].iov_len; ++ } ++ ++ if (base_hdr->type == RXD_ATOMIC) ++ rx_entry->bytes_done = len; + } + +-void rxd_ep_check_unexp_tag_list(struct rxd_ep *ep, struct rxd_trecv_entry *trecv_entry) ++void rxd_progress_op(struct rxd_ep *ep, struct rxd_x_entry *rx_entry, ++ struct rxd_pkt_entry *pkt_entry, ++ struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr *sar_hdr, ++ struct rxd_tag_hdr *tag_hdr, ++ struct rxd_data_hdr *data_hdr, ++ struct rxd_rma_hdr *rma_hdr, ++ struct rxd_atom_hdr *atom_hdr, ++ void **msg, size_t size) + { +- struct dlist_entry *match; +- struct rxd_rx_entry *rx_entry; +- struct rxd_pkt_data_start *pkt_start; +- +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "ep->num_unexp_msg: %d\n", ep->num_unexp_msg); +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "ep->num_unexp_pkt: %d\n", ep->num_unexp_pkt); +- match = dlist_find_first_match(&ep->unexp_tag_list, &rxd_match_unexp_tag, +- (void *) trecv_entry); +- if (match) { +- dlist_remove(match); +- dlist_remove(&trecv_entry->entry); +- ep->num_unexp_msg--; +- +- rx_entry = container_of(match, struct rxd_rx_entry, unexp_entry); +- rx_entry->trecv = trecv_entry; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "progressing unexp tagged recv [%" PRIx64 "]\n", +- rx_entry->msg_id); +- +- pkt_start = (struct rxd_pkt_data_start *) rx_entry->unexp_buf->buf; +- rxd_ep_handle_data_msg(ep, rx_entry->peer_info, rx_entry, rx_entry->trecv->iov, +- rx_entry->trecv->msg.iov_count, &pkt_start->ctrl, +- pkt_start->data, rx_entry->unexp_buf); +- rxd_ep_repost_buff(rx_entry->unexp_buf); ++ ++ if (rx_entry->flags & RXD_CANCELLED) { ++ rxd_complete_rx(ep, rx_entry); ++ ep->peers[base_hdr->peer].rx_seq_no += base_hdr->flags & RXD_INLINE ? ++ 1 : sar_hdr->num_segs; ++ return; ++ } ++ ++ ep->peers[base_hdr->peer].rx_seq_no++; ++ if (sar_hdr) ++ ep->peers[base_hdr->peer].curr_tx_id = sar_hdr->tx_id; ++ ++ ep->peers[base_hdr->peer].curr_rx_id = rx_entry->rx_id; ++ ++ if (base_hdr->type == RXD_READ_REQ) ++ return; ++ ++ if (atom_hdr) ++ rxd_progress_atom_op(ep, rx_entry, base_hdr, sar_hdr, ++ rma_hdr, atom_hdr, msg, size); ++ else ++ rxd_progress_op_msg(ep, rx_entry, msg, size); ++ ++ rx_entry->offset = rx_entry->bytes_done; ++ ++ if (data_hdr) { ++ rx_entry->cq_entry.flags |= FI_REMOTE_CQ_DATA; ++ rx_entry->cq_entry.data = data_hdr->cq_data; ++ } ++ ++ rx_entry->peer = base_hdr->peer; ++ ++ if (tag_hdr) ++ rx_entry->cq_entry.tag = tag_hdr->tag; ++ ++ if (!sar_hdr || sar_hdr->num_segs == 1) { ++ if (!(rx_entry->cq_entry.flags & FI_REMOTE_READ)) ++ rxd_complete_rx(ep, rx_entry); ++ return; + } ++ ++ rx_entry->tx_id = sar_hdr->tx_id; ++ rx_entry->num_segs = sar_hdr->num_segs; ++ rx_entry->next_seg_no++; ++ rx_entry->start_seq = base_hdr->seq_no; ++ ++ dlist_insert_tail(&rx_entry->entry, &ep->peers[base_hdr->peer].rx_list); + } + +-static void rxd_handle_data(struct rxd_ep *ep, struct rxd_peer *peer, +- struct ofi_ctrl_hdr *ctrl, struct fi_cq_msg_entry *comp, +- struct rxd_rx_buf *rx_buf) ++static struct rxd_x_entry *rxd_get_data_x_entry(struct rxd_ep *ep, ++ struct rxd_data_pkt *data_pkt) + { +- struct rxd_rx_entry *rx_entry; +- struct rxd_tx_entry *tx_entry; +- struct rxd_pkt_data *pkt_data = (struct rxd_pkt_data *) ctrl; +- uint16_t credits; +- int ret; ++ if (data_pkt->base_hdr.type == RXD_DATA) ++ return util_buf_get_by_index(ep->rx_entry_pool, ++ ep->peers[data_pkt->base_hdr.peer].curr_rx_id); + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "data pkt- msg_id: %" PRIu64 ", segno: %d, buf: %p\n", +- ctrl->msg_id, ctrl->seg_no, rx_buf); +- +- rx_entry = &ep->rx_entry_fs->buf[ctrl->rx_key]; ++ return util_buf_get_by_index(ep->tx_entry_pool, data_pkt->ext_hdr.tx_id); ++} + +- ret = rxd_check_data_pkt_order(ep, peer, ctrl, rx_entry); +- if (ret) { +- if (ret == -FI_EALREADY) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "duplicate pkt: %d " +- "expected:%d, rx-key:%" PRId64 ", ctrl_msg_id: %" PRIx64 "\n", +- ctrl->seg_no, rx_entry->exp_seg_no, +- ctrl->rx_key, +- ctrl->msg_id); +- +- credits = ((rx_entry->msg_id == ctrl->msg_id) && +- (rx_entry->last_win_seg == ctrl->seg_no)) ? +- rx_entry->credits : 0; +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, credits, +- ctrl->rx_key, peer->conn_data, +- ctrl->conn_id); +- goto repost; ++static void rxd_progress_buf_pkts(struct rxd_ep *ep, fi_addr_t peer) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_base_hdr *base_hdr; ++ struct rxd_sar_hdr *sar_hdr; ++ struct rxd_tag_hdr *tag_hdr; ++ struct rxd_data_hdr *data_hdr; ++ struct rxd_rma_hdr *rma_hdr; ++ struct rxd_atom_hdr *atom_hdr; ++ void *msg; ++ size_t msg_size; ++ struct rxd_x_entry *rx_entry; ++ struct rxd_data_pkt *data_pkt; ++ ++ while (!dlist_empty(&ep->peers[peer].buf_pkts)) { ++ pkt_entry = container_of((&ep->peers[peer].buf_pkts)->next, ++ struct rxd_pkt_entry, d_entry); ++ base_hdr = rxd_get_base_hdr(pkt_entry); ++ if (base_hdr->seq_no != ep->peers[peer].rx_seq_no) ++ return; ++ ++ if (base_hdr->type == RXD_DATA || base_hdr->type == RXD_DATA_READ) { ++ data_pkt = (struct rxd_data_pkt *) (pkt_entry->pkt); ++ rx_entry = rxd_get_data_x_entry(ep, data_pkt); ++ rxd_ep_recv_data(ep, rx_entry, data_pkt, pkt_entry->pkt_size); + } else { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "invalid pkt: segno: %d " +- "expected:%d, rx-key:%" PRId64 ", ctrl_msg_id: %" PRIu64 ", " +- "rx_entry_msg_id: %" PRIx64 "\n", +- ctrl->seg_no, rx_entry->exp_seg_no, +- ctrl->rx_key, +- ctrl->msg_id, rx_entry->msg_id); +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "invalid pkt: " +- "credits: %d, last win: %d\n", +- rx_entry->credits, rx_entry->last_win_seg); +- credits = (rx_entry->msg_id == ctrl->msg_id) ? +- rx_entry->last_win_seg - rx_entry->exp_seg_no : 0; +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, credits, +- ctrl->rx_key, peer->conn_data, +- ctrl->conn_id); +- goto repost; ++ rx_entry = rxd_unpack_init_rx(ep, pkt_entry, base_hdr, &sar_hdr, ++ &tag_hdr, &data_hdr, &rma_hdr, &atom_hdr, ++ &msg, &msg_size); ++ if (!rx_entry) ++ break; ++ ++ rxd_progress_op(ep, rx_entry, pkt_entry, base_hdr, ++ sar_hdr, tag_hdr, data_hdr, rma_hdr, ++ atom_hdr, &msg, msg_size); + } ++ ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_repost_rx(ep, pkt_entry); + } ++} + +- rx_entry->nack_stamp = 0; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "expected pkt: %d\n", ctrl->seg_no); +- switch (rx_entry->op_hdr.op) { +- case ofi_op_msg: +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->recv->iov, +- rx_entry->recv->msg.iov_count, ctrl, +- pkt_data->data, rx_buf); +- break; +- case ofi_op_tagged: +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->trecv->iov, +- rx_entry->trecv->msg.iov_count, ctrl, +- pkt_data->data, rx_buf); +- break; +- case ofi_op_write: +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->write.iov, +- rx_entry->op_hdr.iov_count, ctrl, +- pkt_data->data, rx_buf); +- break; +- case ofi_op_read_rsp: +- tx_entry = rx_entry->read_rsp.tx_entry; +- rxd_ep_handle_data_msg(ep, peer, rx_entry, tx_entry->read_req.dst_iov, +- tx_entry->read_req.msg.iov_count, ctrl, +- pkt_data->data, rx_buf); +- break; +- case ofi_op_atomic: +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type\n"); ++static void rxd_handle_data(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) ++{ ++ struct rxd_data_pkt *pkt = (struct rxd_data_pkt *) (pkt_entry->pkt); ++ struct rxd_x_entry *x_entry; ++ ++ if (pkt_entry->pkt_size < sizeof(*pkt) + ep->rx_prefix_size) { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "Cannot process packet smaller than minimum header size\n"); ++ return; + } + +-repost: +- rxd_ep_repost_buff(rx_buf); ++ if (pkt->base_hdr.seq_no == ep->peers[pkt->base_hdr.peer].rx_seq_no) { ++ x_entry = rxd_get_data_x_entry(ep, pkt); ++ rxd_ep_recv_data(ep, x_entry, pkt, pkt_entry->pkt_size); ++ if (!dlist_empty(&ep->peers[pkt->base_hdr.peer].buf_pkts)) ++ rxd_progress_buf_pkts(ep, pkt->base_hdr.peer); ++ } else if (!rxd_env.retry) { ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ dlist_insert_order(&ep->peers[pkt->base_hdr.peer].buf_pkts, ++ &rxd_comp_pkt_seq_no, &pkt_entry->d_entry); ++ ep->peers[pkt->base_hdr.peer].rx_seq_no++; ++ } else { ++ rxd_ep_send_ack(ep, pkt->base_hdr.peer); ++ } + } + +-int rxd_process_start_data(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry, +- struct rxd_peer *peer, struct ofi_ctrl_hdr *ctrl, +- struct fi_cq_msg_entry *comp, +- struct rxd_rx_buf *rx_buf) ++static void rxd_handle_op(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- uint64_t idx; +- int i, offset, ret; +- struct ofi_rma_iov *rma_iov; +- struct rxd_pkt_data_start *pkt_start; +- struct rxd_tx_entry *tx_entry; +- pkt_start = (struct rxd_pkt_data_start *) ctrl; +- +- switch (rx_entry->op_hdr.op) { +- case ofi_op_msg: +- rx_entry->recv = rxd_get_recv_entry(ep, rx_entry); +- if (!rx_entry->recv) { +- if (ep->num_unexp_msg < RXD_EP_MAX_UNEXP_MSG) { +- dlist_insert_tail(&rx_entry->unexp_entry, &ep->unexp_msg_list); +- rx_entry->unexp_buf = rx_buf; +- ep->num_unexp_msg++; +- return -FI_ENOENT; +- } else { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "dropping msg\n"); +- return -FI_ENOMEM; +- } ++ struct rxd_x_entry *rx_entry; ++ struct rxd_base_hdr *base_hdr = rxd_get_base_hdr(pkt_entry); ++ struct rxd_sar_hdr *sar_hdr; ++ struct rxd_tag_hdr *tag_hdr; ++ struct rxd_data_hdr *data_hdr; ++ struct rxd_rma_hdr *rma_hdr; ++ struct rxd_atom_hdr *atom_hdr; ++ void *msg; ++ size_t msg_size; ++ ++ if (base_hdr->seq_no != ep->peers[base_hdr->peer].rx_seq_no) { ++ if (!rxd_env.retry) { ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ dlist_insert_order(&ep->peers[base_hdr->peer].buf_pkts, ++ &rxd_comp_pkt_seq_no, &pkt_entry->d_entry); ++ ep->peers[base_hdr->peer].rx_seq_no++; ++ return; + } + +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->recv->iov, +- rx_entry->recv->msg.iov_count, ctrl, +- pkt_start->data, rx_buf); +- break; +- case ofi_op_tagged: +- rx_entry->trecv = rxd_get_trecv_entry(ep, rx_entry); +- if (!rx_entry->trecv) { +- if (ep->num_unexp_msg < RXD_EP_MAX_UNEXP_MSG) { +- dlist_insert_tail(&rx_entry->unexp_entry, &ep->unexp_tag_list); +- rx_entry->unexp_buf = rx_buf; +- ep->num_unexp_msg++; +- return -FI_ENOENT; +- } else { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "dropping msg\n"); +- return -FI_ENOMEM; +- } +- } ++ if (ep->peers[base_hdr->peer].peer_addr != FI_ADDR_UNSPEC) ++ goto ack; ++ goto release; ++ } + +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->trecv->iov, +- rx_entry->trecv->msg.iov_count, ctrl, +- pkt_start->data, rx_buf); +- break; +- case ofi_op_write: +- rma_iov = (struct ofi_rma_iov *) pkt_start->data; +- for (i = 0; i < rx_entry->op_hdr.iov_count; i++) { +- ret = rxd_mr_verify(rxd_ep_domain(ep), +- rma_iov[i].len, +- (uintptr_t *) &rma_iov[i].addr, +- rma_iov[i].key, FI_REMOTE_WRITE); +- if (ret) { +- /* todo: handle invalid key case */ +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid key/access permissions\n"); +- return -FI_EACCES; +- } ++ if (ep->peers[base_hdr->peer].peer_addr == FI_ADDR_UNSPEC) ++ goto release; + +- rx_entry->write.iov[i].iov_base = (void *) (uintptr_t) rma_iov[i].addr; +- rx_entry->write.iov[i].iov_len = rma_iov[i].len; ++ rx_entry = rxd_unpack_init_rx(ep, pkt_entry, base_hdr, &sar_hdr, ++ &tag_hdr, &data_hdr, &rma_hdr, &atom_hdr, ++ &msg, &msg_size); ++ if (!rx_entry) { ++ if (base_hdr->type == RXD_MSG || base_hdr->type == RXD_TAGGED) { ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ return; + } ++ goto release; ++ } + +- offset = sizeof(struct ofi_rma_iov) * rx_entry->op_hdr.iov_count; +- ctrl->seg_size -= offset; +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->write.iov, +- rx_entry->op_hdr.iov_count, ctrl, +- pkt_start->data + offset, rx_buf); +- break; +- case ofi_op_read_req: +- rma_iov = (struct ofi_rma_iov *) pkt_start->data; +- tx_entry = rxd_tx_entry_alloc(ep, peer, rx_entry->peer, 0, +- RXD_TX_READ_RSP); +- if (!tx_entry) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "no free tx-entry\n"); +- return -FI_ENOMEM; +- } ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ rxd_progress_op(ep, rx_entry, pkt_entry, base_hdr, sar_hdr, tag_hdr, ++ data_hdr, rma_hdr, atom_hdr, &msg, msg_size); + +- tx_entry->peer = rx_entry->peer; +- tx_entry->read_rsp.iov_count = rx_entry->op_hdr.iov_count; +- for (i = 0; i < rx_entry->op_hdr.iov_count; i++) { +- ret = rxd_mr_verify(rxd_ep_domain(ep), +- rma_iov[i].len, +- (uintptr_t *) &rma_iov[i].addr, +- rma_iov[i].key, FI_REMOTE_READ); +- if (ret) { +- /* todo: handle invalid key case */ +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid key/access permissions\n"); +- return -FI_EACCES; +- } + +- tx_entry->read_rsp.src_iov[i].iov_base = (void *) (uintptr_t) +- rma_iov[i].addr; +- tx_entry->read_rsp.src_iov[i].iov_len = rma_iov[i].len; +- } +- tx_entry->read_rsp.peer_msg_id = ctrl->msg_id; +- ret = rxd_ep_start_xfer(ep, peer, ofi_op_read_rsp, tx_entry); +- if (ret) +- rxd_tx_entry_free(ep, tx_entry); +- rxd_rx_entry_free(ep, rx_entry); +- break; +- case ofi_op_read_rsp: +- idx = rx_entry->op_hdr.remote_idx & RXD_TX_IDX_BITS; +- tx_entry = &ep->tx_entry_fs->buf[idx]; +- if (tx_entry->msg_id != rx_entry->op_hdr.remote_idx) +- return -FI_ENOMEM; +- +- rx_entry->read_rsp.tx_entry = tx_entry; +- rxd_ep_handle_data_msg(ep, peer, rx_entry, tx_entry->read_req.dst_iov, +- tx_entry->read_req.msg.iov_count, ctrl, +- pkt_start->data, rx_buf); +- break; +- case ofi_op_atomic: +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type\n"); +- return -FI_EINVAL; +- } +- return 0; ++ if (!dlist_empty(&ep->peers[base_hdr->peer].buf_pkts)) ++ rxd_progress_buf_pkts(ep, base_hdr->peer); ++ ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ ++ack: ++ rxd_ep_send_ack(ep, base_hdr->peer); ++release: ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ rxd_release_repost_rx(ep, pkt_entry); + } + +-static void rxd_handle_start_data(struct rxd_ep *ep, struct rxd_peer *peer, +- struct ofi_ctrl_hdr *ctrl, +- struct fi_cq_msg_entry *comp, +- struct rxd_rx_buf *rx_buf) ++static void rxd_handle_cts(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- struct rxd_rx_entry *rx_entry; +- struct rxd_pkt_data_start *pkt_start; +- int ret; ++ struct rxd_cts_pkt *cts = (struct rxd_cts_pkt *) (pkt_entry->pkt); + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "start data- msg_id: %" PRIu64 ", segno: %d, buf: %p\n", +- ctrl->msg_id, ctrl->seg_no, rx_buf); ++ rxd_update_peer(ep, cts->rts_addr, cts->cts_addr); ++} + +- pkt_start = (struct rxd_pkt_data_start *) ctrl; +- if (pkt_start->op.version != OFI_OP_VERSION) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "op version mismatch\n"); +- goto repost; +- } ++static void rxd_handle_ack(struct rxd_ep *ep, struct rxd_pkt_entry *ack_entry) ++{ ++ struct rxd_ack_pkt *ack = (struct rxd_ack_pkt *) (ack_entry->pkt); ++ struct rxd_pkt_entry *pkt_entry; ++ fi_addr_t peer = ack->base_hdr.peer; ++ struct rxd_base_hdr *hdr; + +- ret = rxd_check_start_pkt_order(ep, peer, ctrl, comp); +- if (ret) { +- if (ret == -FI_EALREADY) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "duplicate pkt: %d\n", +- ctrl->seg_no); +- rxd_handle_dup_datastart(ep, ctrl, rx_buf); +- goto repost; +- } else { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "unexpected pkt: %d\n", +- ctrl->seg_no); +- goto repost; ++ if (ep->peers[peer].last_rx_ack == ack->base_hdr.seq_no) ++ return; ++ ++ ep->peers[peer].retry_cnt = 0; ++ ep->peers[peer].last_rx_ack = ack->base_hdr.seq_no; ++ ++ if (dlist_empty(&ep->peers[peer].unacked)) ++ return; ++ ++ pkt_entry = container_of((&ep->peers[peer].unacked)->next, ++ struct rxd_pkt_entry, d_entry); ++ ++ while (&pkt_entry->d_entry != &ep->peers[peer].unacked) { ++ hdr = rxd_get_base_hdr(pkt_entry); ++ if (ofi_after_eq(hdr->seq_no, ack->base_hdr.seq_no)) ++ break; ++ ++ if (pkt_entry->flags & RXD_PKT_IN_USE) { ++ pkt_entry->flags |= RXD_PKT_ACKED; ++ pkt_entry = container_of((&pkt_entry->d_entry)->next, ++ struct rxd_pkt_entry, d_entry); ++ continue; + } ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); ++ ep->peers[peer].unacked_cnt--; ++ ++ pkt_entry = container_of((&ep->peers[peer].unacked)->next, ++ struct rxd_pkt_entry, d_entry); + } + +- rx_entry = rxd_rx_entry_alloc(ep); +- if (!rx_entry) +- goto repost; +- +- rx_entry->peer_info = peer; +- rx_entry->op_hdr = pkt_start->op; +- rx_entry->exp_seg_no = 0; +- rx_entry->msg_id = ctrl->msg_id; +- rx_entry->done = 0; +- rx_entry->peer = ctrl->conn_id; +- rx_entry->source = (ep->util_ep.caps & FI_DIRECTED_RECV) ? +- rxd_av_fi_addr(rxd_ep_av(ep), ctrl->conn_id) : FI_ADDR_UNSPEC; +- rx_entry->credits = 1; +- rx_entry->last_win_seg = 1; +- +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "Assign rx_entry :%" PRId64 " for %" PRIx64 "\n", +- rx_entry->key, rx_entry->msg_id); +- +- ep->credits--; +- ret = rxd_process_start_data(ep, rx_entry, peer, ctrl, comp, rx_buf); +- if (ret == -FI_ENOMEM) +- rxd_rx_entry_free(ep, rx_entry); +- else if (ret == -FI_ENOENT) { +- peer->exp_msg_id++; ++ rxd_progress_tx_list(ep, &ep->peers[ack->base_hdr.peer]); ++} + +- /* reply ack, with no window = 0 */ +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "Sending wait-ACK [%" PRIx64 "] - %d\n", +- ctrl->msg_id, ctrl->seg_no); +- goto out; +- } else { +- peer->exp_msg_id++; +- } ++void rxd_handle_send_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ fi_addr_t peer; + +-repost: +- rxd_ep_repost_buff(rx_buf); +-out: +- assert(rxd_reposted_bufs); +- return; ++ pkt_entry = container_of(comp->op_context, struct rxd_pkt_entry, context); ++ ++ switch (rxd_pkt_type(pkt_entry)) { ++ case RXD_CTS: ++ case RXD_ACK: ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); ++ break; ++ default: ++ if (pkt_entry->flags & RXD_PKT_ACKED) { ++ peer = pkt_entry->peer; ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); ++ ep->peers[peer].unacked_cnt--; ++ rxd_progress_tx_list(ep, &ep->peers[peer]); ++ } else { ++ pkt_entry->flags &= ~RXD_PKT_IN_USE; ++ } ++ } ++ ep->pending_cnt--; + } + + void rxd_handle_recv_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp) + { +- struct ofi_ctrl_hdr *ctrl; +- struct rxd_rx_buf *rx_buf; +- struct rxd_peer *peer; ++ struct rxd_pkt_entry *pkt_entry; ++ int release = 1; + + FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "got recv completion\n"); + +- assert(rxd_reposted_bufs); +- rxd_reposted_bufs--; +- +- rx_buf = container_of(comp->op_context, struct rxd_rx_buf, context); +- ctrl = (struct ofi_ctrl_hdr *) rx_buf->buf; +- peer = rxd_ep_getpeer_info(ep, ctrl->conn_id); ++ pkt_entry = container_of(comp->op_context, struct rxd_pkt_entry, context); ++ ep->posted_bufs--; + +- if (ctrl->version != OFI_CTRL_VERSION) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "ctrl version mismatch\n"); +- return; +- } +- +- switch (ctrl->type) { +- case ofi_ctrl_connreq: +- rxd_handle_conn_req(ep, ctrl, comp, rx_buf); +- break; +- case ofi_ctrl_ack: +- rxd_handle_ack(ep, ctrl, rx_buf); +- break; +- case ofi_ctrl_discard: +- rxd_handle_discard(ep, ctrl, rx_buf); ++ pkt_entry->pkt_size = comp->len; ++ switch (rxd_pkt_type(pkt_entry)) { ++ case RXD_RTS: ++ rxd_handle_rts(ep, pkt_entry); + break; +- case ofi_ctrl_connresp: +- rxd_handle_connect_ack(ep, ctrl, rx_buf); ++ case RXD_CTS: ++ rxd_handle_cts(ep, pkt_entry); + break; +- case ofi_ctrl_start_data: +- rxd_handle_start_data(ep, peer, ctrl, comp, rx_buf); ++ case RXD_ACK: ++ rxd_handle_ack(ep, pkt_entry); + break; +- case ofi_ctrl_data: +- rxd_handle_data(ep, peer, ctrl, comp, rx_buf); ++ case RXD_DATA: ++ case RXD_DATA_READ: ++ rxd_handle_data(ep, pkt_entry); + break; + default: +- rxd_ep_repost_buff(rx_buf); +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, +- "invalid ctrl type %u\n", ctrl->type); ++ rxd_handle_op(ep, pkt_entry); ++ release = 0; ++ break; + } + +- rxd_check_waiting_rx(ep); ++ if (release) { ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ rxd_release_repost_rx(ep, pkt_entry); ++ } + } + +-void rxd_handle_send_comp(struct fi_cq_msg_entry *comp) ++void rxd_handle_error(struct rxd_ep *ep) + { +- struct rxd_pkt_meta *pkt_meta; ++ struct fi_cq_err_entry err = {0}; ++ int ret; + +- pkt_meta = container_of(comp->op_context, struct rxd_pkt_meta, context); +- if (pkt_meta->flags & (RXD_REMOTE_ACK | RXD_NOT_ACKED)) +- rxd_tx_pkt_free(pkt_meta); +- else +- pkt_meta->flags |= RXD_LOCAL_COMP; ++ ret = fi_cq_readerr(ep->dg_cq, &err, 0); ++ if (ret < 0) { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "Error reading CQ: %s\n", fi_strerror(-ret)); ++ } else { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "Received %s error from core provider: %s\n", ++ err.flags & FI_SEND ? "tx" : "rx", fi_strerror(-err.err)); ++ } + } + + static int rxd_cq_close(struct fid *fid) +@@ -1153,13 +1220,71 @@ static struct fi_ops rxd_cq_fi_ops = { + .ops_open = fi_no_ops_open, + }; + ++ssize_t rxd_cq_sreadfrom(struct fid_cq *cq_fid, void *buf, size_t count, ++ fi_addr_t *src_addr, const void *cond, int timeout) ++{ ++ struct fid_list_entry *fid_entry; ++ struct util_cq *cq; ++ struct rxd_ep *ep; ++ uint64_t start; ++ int ret, ep_retry; ++ ++ cq = container_of(cq_fid, struct util_cq, cq_fid); ++ assert(cq->wait && cq->internal_wait); ++ start = (timeout >= 0) ? fi_gettime_ms() : 0; ++ ++ do { ++ ret = ofi_cq_readfrom(cq_fid, buf, count, src_addr); ++ if (ret != -FI_EAGAIN) ++ break; ++ ++ if (timeout >= 0) { ++ timeout -= (int) (fi_gettime_ms() - start); ++ if (timeout <= 0) ++ return -FI_EAGAIN; ++ } ++ ++ if (ofi_atomic_get32(&cq->signaled)) { ++ ofi_atomic_set32(&cq->signaled, 0); ++ return -FI_ECANCELED; ++ } ++ ++ ep_retry = -1; ++ cq->cq_fastlock_acquire(&cq->ep_list_lock); ++ dlist_foreach_container(&cq->ep_list, struct fid_list_entry, ++ fid_entry, entry) { ++ ep = container_of(fid_entry->fid, struct rxd_ep, ++ util_ep.ep_fid.fid); ++ if (ep->next_retry == -1) ++ continue; ++ ep_retry = ep_retry == -1 ? ep->next_retry : ++ MIN(ep_retry, ep->next_retry); ++ } ++ cq->cq_fastlock_release(&cq->ep_list_lock); ++ ++ ret = fi_wait(&cq->wait->wait_fid, ep_retry == -1 ? ++ timeout : rxd_get_timeout(ep_retry)); ++ ++ if (ep_retry != -1 && ret == -FI_ETIMEDOUT) ++ ret = 0; ++ } while (!ret); ++ ++ return ret == -FI_ETIMEDOUT ? -FI_EAGAIN : ret; ++} ++ ++ssize_t rxd_cq_sread(struct fid_cq *cq_fid, void *buf, size_t count, ++ const void *cond, int timeout) ++{ ++ return rxd_cq_sreadfrom(cq_fid, buf, count, NULL, cond, timeout); ++} ++ + static struct fi_ops_cq rxd_cq_ops = { + .size = sizeof(struct fi_ops_cq), + .read = ofi_cq_read, + .readfrom = ofi_cq_readfrom, + .readerr = ofi_cq_readerr, +- .sread = ofi_cq_sread, +- .sreadfrom = ofi_cq_sreadfrom, ++ .sread = rxd_cq_sread, ++ .sreadfrom = rxd_cq_sreadfrom, + .signal = ofi_cq_signal, + .strerror = rxd_cq_strerror, + }; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_domain.c +index e0fb34a..f535c02 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_domain.c +@@ -47,6 +47,7 @@ static struct fi_ops_domain rxd_domain_ops = { + .poll_open = fi_poll_create, + .stx_ctx = fi_no_stx_context, + .srx_ctx = fi_no_srx_context, ++ .query_atomic = rxd_query_atomic, + }; + + static int rxd_domain_close(fid_t fid) +@@ -77,119 +78,11 @@ static struct fi_ops rxd_domain_fi_ops = { + .ops_open = fi_no_ops_open, + }; + +-struct rxd_mr_entry { +- struct fid_mr mr_fid; +- struct rxd_domain *domain; +- uint64_t key; +- uint64_t flags; +-}; +- +-static int rxd_mr_close(struct fid *fid) +-{ +- struct rxd_domain *dom; +- struct rxd_mr_entry *mr; +- int err = 0; +- +- mr = container_of(fid, struct rxd_mr_entry, mr_fid.fid); +- dom = mr->domain; +- +- fastlock_acquire(&dom->util_domain.lock); +- err = ofi_mr_map_remove(&dom->mr_map, mr->key); +- fastlock_release(&dom->util_domain.lock); +- if (err) +- return err; +- +- ofi_atomic_dec32(&dom->util_domain.ref); +- free(mr); +- return 0; +-} +- +-static struct fi_ops rxd_mr_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = rxd_mr_close, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +- +-static int rxd_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, +- uint64_t flags, struct fid_mr **mr) +-{ +- struct rxd_domain *dom; +- struct rxd_mr_entry *_mr; +- uint64_t key; +- int ret = 0; +- +- if (fid->fclass != FI_CLASS_DOMAIN || !attr || attr->iov_count <= 0) { +- return -FI_EINVAL; +- } +- +- dom = container_of(fid, struct rxd_domain, util_domain.domain_fid.fid); +- _mr = calloc(1, sizeof(*_mr)); +- if (!_mr) +- return -FI_ENOMEM; +- +- fastlock_acquire(&dom->util_domain.lock); +- +- _mr->mr_fid.fid.fclass = FI_CLASS_MR; +- _mr->mr_fid.fid.context = attr->context; +- _mr->mr_fid.fid.ops = &rxd_mr_fi_ops; +- +- _mr->domain = dom; +- _mr->flags = flags; +- +- ret = ofi_mr_map_insert(&dom->mr_map, attr, &key, _mr); +- if (ret != 0) { +- goto err; +- } +- +- _mr->mr_fid.key = _mr->key = key; +- _mr->mr_fid.mem_desc = (void *) (uintptr_t) key; +- fastlock_release(&dom->util_domain.lock); +- +- *mr = &_mr->mr_fid; +- ofi_atomic_inc32(&dom->util_domain.ref); +- +- return 0; +-err: +- fastlock_release(&dom->util_domain.lock); +- free(_mr); +- return ret; +-} +- +-static int rxd_mr_regv(struct fid *fid, const struct iovec *iov, +- size_t count, uint64_t access, +- uint64_t offset, uint64_t requested_key, +- uint64_t flags, struct fid_mr **mr, void *context) +-{ +- struct fi_mr_attr attr; +- +- attr.mr_iov = iov; +- attr.iov_count = count; +- attr.access = access; +- attr.offset = offset; +- attr.requested_key = requested_key; +- attr.context = context; +- return rxd_mr_regattr(fid, &attr, flags, mr); +-} +- +-static int rxd_mr_reg(struct fid *fid, const void *buf, size_t len, +- uint64_t access, uint64_t offset, uint64_t requested_key, +- uint64_t flags, struct fid_mr **mr, void *context) +-{ +- struct iovec iov; +- +- iov.iov_base = (void *) buf; +- iov.iov_len = len; +- return rxd_mr_regv(fid, &iov, 1, access, offset, requested_key, +- flags, mr, context); +-} +- + static struct fi_ops_mr rxd_mr_ops = { + .size = sizeof(struct fi_ops_mr), +- .reg = rxd_mr_reg, +- .regv = rxd_mr_regv, +- .regattr = rxd_mr_regattr, ++ .reg = ofi_mr_reg, ++ .regv = ofi_mr_regv, ++ .regattr = ofi_mr_regattr, + }; + + int rxd_mr_verify(struct rxd_domain *rxd_domain, ssize_t len, +@@ -214,9 +107,6 @@ int rxd_domain_open(struct fid_fabric *fabric, struct fi_info *info, + + rxd_fabric = container_of(fabric, struct rxd_fabric, + util_fabric.fabric_fid); +- ret = ofi_prov_check_info(&rxd_util_prov, fabric->api_version, info); +- if (ret) +- return ret; + + rxd_domain = calloc(1, sizeof(*rxd_domain)); + if (!rxd_domain) +@@ -234,7 +124,17 @@ int rxd_domain_open(struct fid_fabric *fabric, struct fi_info *info, + if (ret) + goto err2; + +- rxd_domain->max_mtu_sz = dg_info->ep_attr->max_msg_size; ++ rxd_domain->max_mtu_sz = MIN(dg_info->ep_attr->max_msg_size, RXD_MAX_MTU_SIZE); ++ rxd_domain->max_inline_msg = rxd_domain->max_mtu_sz - ++ sizeof(struct rxd_base_hdr) - ++ dg_info->ep_attr->msg_prefix_size; ++ rxd_domain->max_inline_rma = rxd_domain->max_inline_msg - ++ (sizeof(struct rxd_rma_hdr) + ++ (RXD_IOV_LIMIT * sizeof(struct ofi_rma_iov))); ++ rxd_domain->max_inline_atom = rxd_domain->max_inline_rma - ++ sizeof(struct rxd_atom_hdr); ++ rxd_domain->max_seg_sz = rxd_domain->max_mtu_sz - sizeof(struct rxd_data_pkt) - ++ dg_info->ep_attr->msg_prefix_size; + rxd_domain->mr_mode = dg_info->domain_attr->mr_mode; + + ret = ofi_domain_init(fabric, info, &rxd_domain->util_domain, context); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_ep.c +index 5d3c5cd..2e22680 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_ep.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -36,1270 +36,748 @@ + #include + #include "rxd.h" + +-int rxd_progress_spin_count = 1000; +-int rxd_reposted_bufs = 0; +- +-static ssize_t rxd_ep_cancel(fid_t fid, void *context) ++struct rxd_pkt_entry *rxd_get_tx_pkt(struct rxd_ep *ep) + { +- struct rxd_ep *ep; +- struct dlist_entry *entry, *next; +- struct rxd_recv_entry *recv_entry; +- struct rxd_trecv_entry *trecv_entry; +- struct fi_cq_err_entry err_entry = {0}; ++ struct rxd_pkt_entry *pkt_entry; ++ void *mr = NULL; + +- ep = container_of(fid, struct rxd_ep, util_ep.ep_fid.fid); +- fastlock_acquire(&ep->lock); +- if (ep->util_ep.caps & FI_MSG) { +- for (entry = ep->recv_list.next; entry != &ep->recv_list; entry = next) { +- next = entry->next; +- recv_entry = container_of(entry, struct rxd_recv_entry, entry); +- if (recv_entry->msg.context != context) +- continue; +- +- dlist_remove(entry); +- err_entry.op_context = recv_entry->msg.context; +- err_entry.flags = (FI_MSG | FI_RECV); +- err_entry.err = FI_ECANCELED; +- err_entry.prov_errno = -FI_ECANCELED; +- rxd_cq_report_error(rxd_ep_rx_cq(ep), &err_entry); +- goto out; +- } +- } ++ pkt_entry = ep->do_local_mr ? ++ util_buf_alloc_ex(ep->tx_pkt_pool, &mr) : ++ util_buf_alloc(ep->tx_pkt_pool); + +- if (ep->util_ep.caps & FI_TAGGED) { +- for (entry = ep->trecv_list.next; entry != &ep->trecv_list; entry = next) { +- next = entry->next; +- trecv_entry = container_of(entry, struct rxd_trecv_entry, entry); +- if (trecv_entry->msg.context != context) +- continue; +- +- dlist_remove(entry); +- err_entry.op_context = trecv_entry->msg.context; +- err_entry.flags = (FI_MSG | FI_RECV | FI_TAGGED); +- err_entry.tag = trecv_entry->msg.tag; +- err_entry.err = FI_ECANCELED; +- err_entry.prov_errno = -FI_ECANCELED; +- rxd_cq_report_error(rxd_ep_rx_cq(ep), &err_entry); +- goto out; +- } +- } ++ if (!pkt_entry) ++ return NULL; + +-out: +- fastlock_release(&ep->lock); +- return 0; ++ pkt_entry->mr = (struct fid_mr *) mr; ++ pkt_entry->flags = 0; ++ rxd_set_tx_pkt(ep, pkt_entry); ++ ++ return pkt_entry; + } + +-static int rxd_ep_getopt(fid_t fid, int level, int optname, +- void *optval, size_t *optlen) ++static struct rxd_pkt_entry *rxd_get_rx_pkt(struct rxd_ep *ep) + { +- return -FI_ENOSYS; ++ struct rxd_pkt_entry *pkt_entry; ++ void *mr = NULL; ++ ++ pkt_entry = ep->do_local_mr ? ++ util_buf_alloc_ex(ep->rx_pkt_pool, &mr) : ++ util_buf_alloc(ep->rx_pkt_pool); ++ ++ if (!pkt_entry) ++ return NULL; ++ ++ pkt_entry->mr = (struct fid_mr *) mr; ++ rxd_set_rx_pkt(ep, pkt_entry); ++ ++ return pkt_entry; + } + +-static int rxd_ep_setopt(fid_t fid, int level, int optname, +- const void *optval, size_t optlen) ++struct rxd_x_entry *rxd_get_tx_entry(struct rxd_ep *ep) + { +- return -FI_ENOSYS; +-} ++ struct rxd_x_entry *tx_entry; + +-struct fi_ops_ep rxd_ops_ep = { +- .size = sizeof(struct fi_ops_ep), +- .cancel = rxd_ep_cancel, +- .getopt = rxd_ep_getopt, +- .setopt = rxd_ep_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; ++ tx_entry = util_buf_indexed_alloc(ep->tx_entry_pool); ++ if (!tx_entry) ++ return NULL; + +-static ssize_t rxd_ep_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, +- uint64_t flags) +-{ +- ssize_t ret = 0; +- size_t i; +- struct rxd_ep *rxd_ep; +- struct rxd_recv_entry *recv_entry; ++ tx_entry->tx_id = util_get_buf_index(ep->tx_entry_pool, tx_entry); + +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid.fid); ++ return tx_entry; ++} + +- fastlock_acquire(&rxd_ep->lock); +- if (freestack_isempty(rxd_ep->recv_fs)) { +- ret = -FI_EAGAIN; +- goto out; +- } ++struct rxd_x_entry *rxd_get_rx_entry(struct rxd_ep *ep) ++{ ++ struct rxd_x_entry *rx_entry; + +- recv_entry = freestack_pop(rxd_ep->recv_fs); +- recv_entry->msg = *msg; +- recv_entry->flags = flags; +- recv_entry->msg.addr = (rxd_ep->util_ep.caps & FI_DIRECTED_RECV) ? +- recv_entry->msg.addr : FI_ADDR_UNSPEC; +- for (i = 0; i < msg->iov_count; i++) { +- recv_entry->iov[i].iov_base = msg->msg_iov[i].iov_base; +- recv_entry->iov[i].iov_len = msg->msg_iov[i].iov_len; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "post recv: %zu\n", +- msg->msg_iov[i].iov_len); +- } ++ rx_entry = util_buf_indexed_alloc(ep->rx_entry_pool); ++ if (!rx_entry) ++ return NULL; + +- dlist_init(&recv_entry->entry); +- dlist_insert_tail(&recv_entry->entry, &rxd_ep->recv_list); ++ rx_entry->rx_id = util_get_buf_index(ep->rx_entry_pool, rx_entry); + +- if (!dlist_empty(&rxd_ep->unexp_msg_list)) { +- rxd_ep_check_unexp_msg_list(rxd_ep, recv_entry); +- } +-out: +- fastlock_release(&rxd_ep->lock); +- return ret; ++ return rx_entry; + } + +-static ssize_t rxd_ep_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, +- fi_addr_t src_addr, void *context) ++void rxd_release_tx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt) + { +- struct fi_msg msg; +- struct iovec msg_iov; +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = buf; +- msg_iov.iov_len = len; +- +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = src_addr; +- msg.context = context; +- msg.data = 0; +- return rxd_ep_recvmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ util_buf_release(ep->tx_pkt_pool, pkt); + } + +-static ssize_t rxd_ep_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) ++void rxd_release_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt) + { +- struct fi_msg msg; +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = src_addr; +- msg.context = context; +- msg.data = 0; +- return rxd_ep_recvmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ util_buf_release(ep->rx_pkt_pool, pkt); + } + +-static inline void *rxd_mr_desc(struct fid_mr *mr, struct rxd_ep *ep) ++static void rxd_release_tx_entry(struct rxd_ep *ep, struct rxd_x_entry *x_entry) + { +- return (ep->do_local_mr) ? fi_mr_desc(mr) : NULL; ++ util_buf_indexed_release(ep->tx_entry_pool, x_entry); + } + +-int rxd_ep_repost_buff(struct rxd_rx_buf *buf) ++void rxd_release_rx_entry(struct rxd_ep *ep, struct rxd_x_entry *x_entry) + { +- int ret; +- ret = fi_recv(buf->ep->dg_ep, buf->buf, rxd_ep_domain(buf->ep)->max_mtu_sz, +- rxd_mr_desc(buf->mr, buf->ep), +- FI_ADDR_UNSPEC, &buf->context); +- if (ret) +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "failed to repost\n"); +- else +- rxd_reposted_bufs++; +- return ret; ++ util_buf_indexed_release(ep->rx_entry_pool, x_entry); + } + +-/* +- * See ofi_proto.h for how conn_data is being used. +- */ +-static uint64_t rxd_ep_conn_data(struct rxd_ep *ep) ++static int rxd_match_ctx(struct dlist_entry *item, const void *arg) + { +- char name[RXD_MAX_DGRAM_ADDR]; +- size_t addrlen; +- int ret; +- +- if (ep->conn_data_set) +- return ep->conn_data; +- +- addrlen = sizeof name; +- ret = fi_getname(&ep->dg_ep->fid, name, &addrlen); +- if (ret) +- return 0; ++ struct rxd_x_entry *x_entry; + +- ret = rxd_av_dg_reverse_lookup(rxd_ep_av(ep), 0, name, &ep->conn_data); +- if (!ret) +- ep->conn_data_set = 1; ++ x_entry = container_of(item, struct rxd_x_entry, entry); + +- return ep->conn_data; ++ return (x_entry->cq_entry.op_context == arg); + } + +-static int rxd_ep_enable(struct rxd_ep *ep) ++static ssize_t rxd_ep_cancel_recv(struct rxd_ep *ep, struct dlist_entry *list, ++ void *context) + { +- size_t i; +- ssize_t ret; +- void *mr = NULL; +- struct rxd_rx_buf *rx_buf; ++ struct dlist_entry *entry; ++ struct rxd_x_entry *rx_entry; ++ struct fi_cq_err_entry err_entry; ++ int ret = 0; + +- ret = fi_enable(ep->dg_ep); +- if (ret) +- return ret; ++ fastlock_acquire(&ep->util_ep.lock); + +- fastlock_acquire(&ep->lock); +- ep->credits = ep->rx_size; +- for (i = 0; i < ep->rx_size; i++) { +- rx_buf = ep->do_local_mr ? +- util_buf_get_ex(ep->rx_pkt_pool, &mr) : +- util_buf_get(ep->rx_pkt_pool); ++ entry = dlist_find_first_match(list, &rxd_match_ctx, context); ++ if (!entry) ++ goto out; + +- if (!rx_buf) { +- ret = -FI_ENOMEM; +- goto out; +- } ++ rx_entry = container_of(entry, struct rxd_x_entry, entry); ++ memset(&err_entry, 0, sizeof(struct fi_cq_err_entry)); ++ err_entry.op_context = rx_entry->cq_entry.op_context; ++ err_entry.flags = rx_entry->cq_entry.flags; ++ err_entry.err = FI_ECANCELED; ++ err_entry.prov_errno = 0; ++ rxd_cq_report_error(rxd_ep_rx_cq(ep), &err_entry); + +- rx_buf->mr = (struct fid_mr *) mr; +- rx_buf->ep = ep; +- ret = rxd_ep_repost_buff(rx_buf); +- if (ret) +- goto out; +- slist_insert_tail(&rx_buf->entry, &ep->rx_pkt_list); +- } ++ rx_entry->flags |= RXD_CANCELLED; ++ ++ ret = 1; + out: +- fastlock_release(&ep->lock); ++ fastlock_release(&ep->util_ep.lock); + return ret; + } + +-struct rxd_peer *rxd_ep_getpeer_info(struct rxd_ep *ep, fi_addr_t addr) ++static ssize_t rxd_ep_cancel(fid_t fid, void *context) + { +- return &ep->peer_info[addr]; +-} ++ struct rxd_ep *ep; ++ int ret; + +-/* +- * Exponential back-off starting at 1ms, max 4s. +- */ +-void rxd_set_timeout(struct rxd_tx_entry *tx_entry) +-{ +- tx_entry->retry_time = fi_gettime_ms() + +- MIN(1 << tx_entry->retry_cnt, 4000); +-} ++ ep = container_of(fid, struct rxd_ep, util_ep.ep_fid); + +-static void rxd_init_ctrl_hdr(struct ofi_ctrl_hdr *ctrl, +- uint8_t type, uint16_t seg_size, +- uint32_t seg_no, uint64_t msg_id, +- uint64_t rx_key, uint64_t source) +-{ +- ctrl->version = OFI_CTRL_VERSION; +- ctrl->type = type; +- ctrl->seg_size = seg_size; +- ctrl->seg_no = seg_no; +- ctrl->msg_id = msg_id; +- ctrl->rx_key = rx_key; +- ctrl->conn_id = source; +-} ++ ret = rxd_ep_cancel_recv(ep, &ep->rx_tag_list, context); ++ if (ret) ++ goto out; + +-static void rxd_init_op_hdr(struct ofi_op_hdr *op, uint64_t data, +- uint64_t msg_sz, uint8_t rx_index, +- uint8_t op_type, uint64_t tag, uint32_t flags) +-{ +- op->version = OFI_OP_VERSION; +- op->rx_index = rx_index; +- op->op = op_type; +- op->op_data = 0; /* unused */ +- op->flags = flags; +- op->size = msg_sz; +- op->data = data; +- op->tag = tag; +-} ++ ret = rxd_ep_cancel_recv(ep, &ep->rx_list, context); + +-static uint32_t rxd_map_fi_flags(uint64_t fi_flags) +-{ +- uint32_t flags = 0; +- +- if (fi_flags & FI_REMOTE_CQ_DATA) +- flags = OFI_REMOTE_CQ_DATA; +- if (fi_flags & FI_TRANSMIT_COMPLETE) +- flags |= OFI_TRANSMIT_COMPLETE; +- if (fi_flags & FI_DELIVERY_COMPLETE) +- flags |= OFI_DELIVERY_COMPLETE; +- return flags; ++out: ++ return 0; + } + +-static struct rxd_pkt_meta *rxd_tx_pkt_alloc(struct rxd_ep *ep) ++static int rxd_ep_getopt(fid_t fid, int level, int optname, ++ void *optval, size_t *optlen) + { +- struct rxd_pkt_meta *pkt_meta; +- void *mr = NULL; ++ struct rxd_ep *rxd_ep = ++ container_of(fid, struct rxd_ep, util_ep.ep_fid); + +- pkt_meta = ep->do_local_mr ? +- util_buf_alloc_ex(ep->tx_pkt_pool, &mr) : +- util_buf_alloc(ep->tx_pkt_pool); ++ if ((level != FI_OPT_ENDPOINT) || (optname != FI_OPT_MIN_MULTI_RECV)) ++ return -FI_ENOPROTOOPT; + +- if (!pkt_meta) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "No free tx pkt\n"); +- return NULL; +- } ++ *(size_t *)optval = rxd_ep->min_multi_recv_size; ++ *optlen = sizeof(size_t); + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "Acquired tx pkt: %p\n", pkt_meta); +- pkt_meta->ep = ep; +- pkt_meta->mr = (struct fid_mr *) mr; +- pkt_meta->flags = 0; +- return pkt_meta; ++ return FI_SUCCESS; + } + +-static uint64_t rxd_ep_start_seg_size(struct rxd_ep *ep, uint64_t msg_size) +-{ +- return MIN(rxd_ep_domain(ep)->max_mtu_sz - +- sizeof(struct rxd_pkt_data_start), msg_size); +-} +- +-struct rxd_tx_entry *rxd_tx_entry_alloc(struct rxd_ep *ep, +- struct rxd_peer *peer, fi_addr_t addr, uint64_t flags, uint8_t op) ++static int rxd_ep_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) + { +- struct rxd_tx_entry *tx_entry; +- +- if (freestack_isempty(ep->tx_entry_fs)) { +- FI_INFO(&rxd_prov, FI_LOG_EP_CTRL, "no-more tx entries\n"); +- return NULL; +- } ++ struct rxd_ep *rxd_ep = ++ container_of(fid, struct rxd_ep, util_ep.ep_fid); + +- if (peer->active_tx_cnt == RXD_MAX_PEER_TX) +- return NULL; ++ if ((level != FI_OPT_ENDPOINT) || (optname != FI_OPT_MIN_MULTI_RECV)) ++ return -FI_ENOPROTOOPT; + +- peer->active_tx_cnt++; ++ rxd_ep->min_multi_recv_size = *(size_t *)optval; + +- tx_entry = freestack_pop(ep->tx_entry_fs); +- tx_entry->peer = addr; +- tx_entry->flags = flags; +- tx_entry->bytes_sent = 0; +- tx_entry->seg_no = 0; +- tx_entry->window = 1; +- tx_entry->retry_cnt = 0; +- tx_entry->op_type = op; +- dlist_init(&tx_entry->pkt_list); +- return tx_entry; ++ return FI_SUCCESS; + } + +-void rxd_tx_entry_free(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry) +-{ +- struct rxd_peer *peer; +- +- peer = rxd_ep_getpeer_info(ep, tx_entry->peer); +- peer->active_tx_cnt--; +- /* reset ID to invalid state to avoid ID collision */ +- tx_entry->msg_id = UINT64_MAX; +- dlist_remove(&tx_entry->entry); +- freestack_push(ep->tx_entry_fs, tx_entry); +-} ++struct fi_ops_ep rxd_ops_ep = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = rxd_ep_cancel, ++ .getopt = rxd_ep_getopt, ++ .setopt = rxd_ep_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; + +-static size_t rxd_copy_rma_iov(struct ofi_rma_iov *dst, +- const struct fi_rma_iov *src, size_t count) ++struct rxd_x_entry *rxd_rx_entry_init(struct rxd_ep *ep, ++ const struct iovec *iov, size_t iov_count, uint64_t tag, ++ uint64_t ignore, void *context, fi_addr_t addr, ++ uint32_t op, uint32_t flags) + { +- int i; ++ struct rxd_x_entry *rx_entry; + +- for (i = 0; i < count; i++) { +- dst->addr = src->addr; +- dst->len = src->len; +- dst->key = src->key; ++ rx_entry = rxd_get_rx_entry(ep); ++ if (!rx_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get rx entry\n"); ++ return NULL; + } +- return sizeof(*dst) * count; +-} + +-static uint64_t rxd_ep_copy_data(struct rxd_tx_entry *tx_entry, +- char *buf, uint64_t size) +-{ +- const struct iovec *iov; +- size_t iov_count; ++ rx_entry->peer = addr; ++ rx_entry->flags = flags; ++ rx_entry->bytes_done = 0; ++ rx_entry->offset = 0; ++ rx_entry->next_seg_no = 0; ++ rx_entry->window = rxd_env.max_unacked; ++ rx_entry->iov_count = iov_count; ++ rx_entry->op = op; ++ rx_entry->ignore = ignore; + +- switch(tx_entry->op_hdr.op) { +- case ofi_op_msg: +- iov = tx_entry->msg.msg_iov; +- iov_count = tx_entry->msg.msg.iov_count; +- break; +- case ofi_op_tagged: +- iov = tx_entry->tmsg.msg_iov; +- iov_count = tx_entry->tmsg.tmsg.iov_count; +- break; +- case ofi_op_write: +- iov = tx_entry->write.src_iov; +- iov_count = tx_entry->write.msg.iov_count; +- break; +- case ofi_op_read_rsp: +- iov = tx_entry->read_rsp.src_iov; +- iov_count = tx_entry->read_rsp.iov_count; +- break; +- default: +- return 0; +- } ++ memcpy(rx_entry->iov, iov, sizeof(*rx_entry->iov) * iov_count); + +- return ofi_copy_from_iov(buf, size, iov, iov_count, tx_entry->bytes_sent); +-} ++ rx_entry->cq_entry.op_context = context; ++ rx_entry->cq_entry.len = ofi_total_iov_len(iov, iov_count); ++ rx_entry->cq_entry.buf = iov[0].iov_base; ++ rx_entry->cq_entry.tag = tag; + +-static void rxd_ep_init_data_pkt(struct rxd_ep *ep, struct rxd_peer *peer, +- struct rxd_tx_entry *tx_entry, +- struct rxd_pkt_data *pkt) +-{ +- uint16_t seg_size; +- +- seg_size = rxd_ep_domain(ep)->max_mtu_sz - sizeof(struct rxd_pkt_data); +- seg_size = MIN(seg_size, tx_entry->op_hdr.size - tx_entry->bytes_sent); ++ rx_entry->cq_entry.flags = ofi_rx_cq_flags(op); ++ dlist_init(&rx_entry->entry); + +- rxd_init_ctrl_hdr(&pkt->ctrl, ofi_ctrl_data, seg_size, tx_entry->seg_no, +- tx_entry->msg_id, tx_entry->rx_key, peer->conn_data); +- tx_entry->bytes_sent += rxd_ep_copy_data(tx_entry, pkt->data, seg_size); +- tx_entry->seg_no++; ++ return rx_entry; + } + +-static ssize_t rxd_ep_post_data_msg(struct rxd_ep *ep, +- struct rxd_tx_entry *tx_entry) ++static inline void *rxd_mr_desc(struct fid_mr *mr, struct rxd_ep *ep) + { +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_pkt_data *pkt; +- struct rxd_peer *peer; +- int ret; ++ return (ep->do_local_mr) ? fi_mr_desc(mr) : NULL; ++} + +- peer = rxd_ep_getpeer_info(ep, tx_entry->peer); ++int rxd_ep_post_buf(struct rxd_ep *ep) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ ssize_t ret; + +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) ++ pkt_entry = rxd_get_rx_pkt(ep); ++ if (!pkt_entry) + return -FI_ENOMEM; + +- pkt_meta->tx_entry = tx_entry; +- pkt = (struct rxd_pkt_data *) pkt_meta->pkt_data; +- rxd_ep_init_data_pkt(ep, peer, tx_entry, pkt); +- +- if (tx_entry->op_hdr.size == pkt->ctrl.seg_size) +- pkt_meta->flags |= RXD_PKT_LAST; +- +- ret = fi_send(ep->dg_ep, pkt, sizeof(*pkt) + pkt->ctrl.seg_size, +- rxd_mr_desc(pkt_meta->mr, ep), tx_entry->peer, +- &pkt_meta->context); ++ ret = fi_recv(ep->dg_ep, rxd_pkt_start(pkt_entry), ++ rxd_ep_domain(ep)->max_mtu_sz, ++ rxd_mr_desc(pkt_entry->mr, ep), ++ FI_ADDR_UNSPEC, &pkt_entry->context); + if (ret) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "send %d failed\n", +- pkt->ctrl.seg_no); ++ rxd_release_rx_pkt(ep, pkt_entry); ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "failed to repost\n"); ++ return ret; + } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "msg data %" PRIx64 ", seg %d\n", +- pkt->ctrl.msg_id, pkt->ctrl.seg_no); +- dlist_insert_tail(&pkt_meta->entry, &tx_entry->pkt_list); ++ ep->posted_bufs++; ++ slist_insert_tail(&pkt_entry->s_entry, &ep->rx_pkt_list); + +- return ret; ++ return 0; + } + +-void rxd_ep_free_acked_pkts(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry, +- uint32_t last_acked) ++static int rxd_ep_enable(struct rxd_ep *ep) + { +- struct rxd_pkt_meta *pkt; +- struct ofi_ctrl_hdr *ctrl; ++ size_t i; ++ ssize_t ret; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "freeing all [%" PRIx64 "] pkts < %d\n", +- tx_entry->msg_id, last_acked); +- while (!dlist_empty(&tx_entry->pkt_list)) { ++ ret = fi_ep_bind(ep->dg_ep, &ep->dg_cq->fid, FI_TRANSMIT | FI_RECV); ++ if (ret) ++ return ret; + +- pkt = container_of(tx_entry->pkt_list.next, +- struct rxd_pkt_meta, entry); +- ctrl = (struct ofi_ctrl_hdr *) pkt->pkt_data; +- if (ctrl->seg_no >= last_acked) ++ ret = fi_enable(ep->dg_ep); ++ if (ret) ++ return ret; ++ ++ fastlock_acquire(&ep->util_ep.lock); ++ for (i = 0; i < ep->rx_size; i++) { ++ ret = rxd_ep_post_buf(ep); ++ if (ret) + break; ++ } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "freeing [%" PRIx64 "] pkt:%d\n", +- tx_entry->msg_id, ctrl->seg_no); +- dlist_remove(&pkt->entry); +- if (pkt->flags & RXD_LOCAL_COMP) +- rxd_tx_pkt_free(pkt); +- else +- pkt->flags |= RXD_REMOTE_ACK; +- }; ++ fastlock_release(&ep->util_ep.lock); ++ return 0; + } + +-static int rxd_ep_retry_pkt(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry, +- struct rxd_pkt_meta *pkt) ++/* ++ * Exponential back-off starting at 1ms, max 4s. ++ */ ++int rxd_get_timeout(uint8_t retry_cnt) + { +- int ret; +- struct ofi_ctrl_hdr *ctrl; +- +- ctrl = (struct ofi_ctrl_hdr *)pkt->pkt_data; +-// if (pkt->retries > RXD_MAX_PKT_RETRY) { +-// /* todo: report error */ +-// FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "Pkt delivery failed\n", ctrl->seg_no); +-// return -FI_EIO; +-// } +-// +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "retry packet : %2d, size: %zd, tx_id :%" PRIx64 "\n", +- ctrl->seg_no, ctrl->type == ofi_ctrl_start_data ? +- ctrl->seg_size + sizeof(struct rxd_pkt_data_start) : +- ctrl->seg_size + sizeof(struct rxd_pkt_data), +- ctrl->msg_id); +- +- ret = fi_send(ep->dg_ep, ctrl, +- ctrl->type == ofi_ctrl_start_data ? +- ctrl->seg_size + sizeof(struct rxd_pkt_data_start) : +- ctrl->seg_size + sizeof(struct rxd_pkt_data), +- rxd_mr_desc(pkt->mr, ep), +- tx_entry->peer, &pkt->context); +- +-// if (ret != -FI_EAGAIN) +-// pkt->retries++; +- +- if (ret && ret != -FI_EAGAIN) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "Pkt sent failed seg: %d, ret: %d\n", +- ctrl->seg_no, ret); +- } +- +- return ret; ++ return MIN(1 << retry_cnt, 4000); + } + +-//void rxd_resend_pkt(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry ) +-//{ +-// struct dlist_entry *pkt_item; +-// struct rxd_pkt_meta *pkt; +-// struct ofi_ctrl_hdr *ctrl; +-// +-// dlist_foreach(&tx_entry->pkt_list, pkt_item) { +-// pkt = container_of(pkt_item, struct rxd_pkt_meta, entry); +-// ctrl = (struct ofi_ctrl_hdr *) pkt->pkt_data; +-// +-// FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "resending pkt %d, %p\n", +-// ctrl->seg_no, ctrl->msg_id); +-// +-// rxd_ep_retry_pkt(ep, tx_entry, pkt); +-// } +-//} +- +-void rxd_tx_entry_progress(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry) ++uint64_t rxd_get_retry_time(uint64_t start, uint8_t retry_cnt) + { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "tx: %p [%" PRIx64 "]\n", +- tx_entry, tx_entry->msg_id); +- +- while ((tx_entry->seg_no < tx_entry->window) && +- (tx_entry->bytes_sent != tx_entry->op_hdr.size)) { +- if (rxd_ep_post_data_msg(ep, tx_entry)) +- break; +- } +- rxd_set_timeout(tx_entry); ++ return start + rxd_get_timeout(retry_cnt); + } + +-int rxd_ep_reply_ack(struct rxd_ep *ep, struct ofi_ctrl_hdr *in_ctrl, +- uint8_t type, uint16_t seg_size, uint64_t rx_key, +- uint64_t source, fi_addr_t dest) ++void rxd_init_data_pkt(struct rxd_ep *ep, struct rxd_x_entry *tx_entry, ++ struct rxd_pkt_entry *pkt_entry) + { +- ssize_t ret; +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_pkt_data *pkt; +- struct rxd_rx_entry *rx_entry; ++ struct rxd_data_pkt *data_pkt = (struct rxd_data_pkt *) (pkt_entry->pkt); ++ uint32_t seg_size; + +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) +- return -FI_ENOMEM; ++ seg_size = tx_entry->cq_entry.len - tx_entry->bytes_done; ++ seg_size = MIN(rxd_ep_domain(ep)->max_seg_sz, seg_size); + +- rx_entry = (rx_key != UINT64_MAX) ? &ep->rx_entry_fs->buf[rx_key] : NULL; ++ data_pkt->base_hdr.version = RXD_PROTOCOL_VERSION; ++ data_pkt->base_hdr.type = (tx_entry->cq_entry.flags & ++ (FI_READ | FI_REMOTE_READ)) ? ++ RXD_DATA_READ : RXD_DATA; + +- pkt = (struct rxd_pkt_data *)pkt_meta->pkt_data; +- rxd_init_ctrl_hdr(&pkt->ctrl, type, seg_size, +- rx_entry ? rx_entry->exp_seg_no : 0, +- in_ctrl->msg_id, rx_key, source); ++ data_pkt->ext_hdr.rx_id = tx_entry->rx_id; ++ data_pkt->ext_hdr.tx_id = tx_entry->tx_id; ++ data_pkt->ext_hdr.seg_no = tx_entry->next_seg_no++; ++ data_pkt->base_hdr.peer = ep->peers[tx_entry->peer].peer_addr; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "sending ack [%" PRIx64 "] - segno: %d, window: %d\n", +- pkt->ctrl.msg_id, pkt->ctrl.seg_no, pkt->ctrl.seg_size); ++ pkt_entry->pkt_size = ofi_copy_from_iov(data_pkt->msg, seg_size, ++ tx_entry->iov, ++ tx_entry->iov_count, ++ tx_entry->bytes_done); ++ pkt_entry->peer = tx_entry->peer; + +- pkt_meta->flags = RXD_NOT_ACKED; +- ret = fi_send(ep->dg_ep, pkt, sizeof(struct rxd_pkt_data), +- rxd_mr_desc(pkt_meta->mr, ep), +- dest, &pkt_meta->context); +- if (ret) +- util_buf_release(ep->tx_pkt_pool, pkt_meta); ++ tx_entry->bytes_done += pkt_entry->pkt_size; + +- return ret; ++ pkt_entry->pkt_size += sizeof(*data_pkt) + ep->tx_prefix_size; + } + +-#define RXD_TX_ENTRY_ID(ep, tx_entry) (tx_entry - &ep->tx_entry_fs->buf[0]) +- +-static void rxd_ep_init_start_pkt(struct rxd_ep *ep, struct rxd_peer *peer, +- uint8_t op, struct rxd_tx_entry *tx_entry, +- struct rxd_pkt_data_start *pkt, uint32_t flags) ++struct rxd_x_entry *rxd_tx_entry_init(struct rxd_ep *ep, const struct iovec *iov, ++ size_t iov_count, const struct iovec *res_iov, ++ size_t res_count, size_t rma_count, ++ uint64_t data, uint64_t tag, void *context, ++ fi_addr_t addr, uint32_t op, uint32_t flags) + { +- uint64_t msg_size, iov_size; +- uint16_t seg_size; +- +- switch (op) { +- case ofi_op_msg: +- msg_size = ofi_total_iov_len(tx_entry->msg.msg_iov, +- tx_entry->msg.msg.iov_count); +- seg_size = rxd_ep_start_seg_size(ep, msg_size); +- rxd_init_op_hdr(&pkt->op, tx_entry->msg.msg.data, msg_size, 0, +- op, 0, flags); +- break; +- case ofi_op_tagged: +- msg_size = ofi_total_iov_len(tx_entry->tmsg.msg_iov, +- tx_entry->tmsg.tmsg.iov_count); +- seg_size = rxd_ep_start_seg_size(ep, msg_size); +- rxd_init_op_hdr(&pkt->op, tx_entry->tmsg.tmsg.data, msg_size, 0, +- op, tx_entry->tmsg.tmsg.tag, flags); +- break; +- case ofi_op_write: +- msg_size = ofi_total_iov_len(tx_entry->write.msg.msg_iov, +- tx_entry->write.msg.iov_count); +- iov_size = rxd_copy_rma_iov((struct ofi_rma_iov *) pkt->data, +- tx_entry->write.dst_iov, +- tx_entry->write.msg.rma_iov_count); +- seg_size = MIN(rxd_ep_domain(ep)->max_mtu_sz - +- sizeof(struct rxd_pkt_data_start) - iov_size, msg_size); +- rxd_init_op_hdr(&pkt->op, tx_entry->write.msg.data, msg_size, 0, +- op, 0, flags); +- pkt->op.iov_count = tx_entry->write.msg.rma_iov_count; +- break; +- case ofi_op_read_req: +- msg_size = ofi_total_iov_len(tx_entry->read_req.msg.msg_iov, +- tx_entry->read_req.msg.iov_count); +- iov_size = rxd_copy_rma_iov((struct ofi_rma_iov *) pkt->data, +- tx_entry->read_req.src_iov, +- tx_entry->read_req.msg.rma_iov_count); +- seg_size = 0; +- rxd_init_op_hdr(&pkt->op, tx_entry->read_req.msg.data, msg_size, +- 0, op, 0, flags); +- pkt->op.iov_count = tx_entry->read_req.msg.rma_iov_count; +- break; +- case ofi_op_read_rsp: +- msg_size = ofi_total_iov_len(tx_entry->read_rsp.src_iov, +- tx_entry->read_rsp.iov_count); +- seg_size = rxd_ep_start_seg_size(ep, msg_size); +- rxd_init_op_hdr(&pkt->op, 0, msg_size, 0, op, 0, flags); +- pkt->op.remote_idx = tx_entry->read_rsp.peer_msg_id; +- break; +- default: +- seg_size = 0; +- assert(0); ++ struct rxd_x_entry *tx_entry; ++ struct rxd_domain *rxd_domain = rxd_ep_domain(ep); ++ size_t max_inline; ++ ++ tx_entry = rxd_get_tx_entry(ep); ++ if (!tx_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get tx entry\n"); ++ return NULL; + } + +- rxd_init_ctrl_hdr(&pkt->ctrl, ofi_ctrl_start_data, seg_size, 0, +- tx_entry->msg_id, peer->conn_data, +- peer->conn_data); +- /* copy op header here because it is used in ep_copy_data call */ +- tx_entry->op_hdr = pkt->op; +- tx_entry->bytes_sent = rxd_ep_copy_data(tx_entry, pkt->data, +- seg_size); +- tx_entry->seg_no++; +- assert(tx_entry->bytes_sent == seg_size); +-} ++ tx_entry->op = op; ++ tx_entry->peer = addr; ++ tx_entry->flags = flags; ++ tx_entry->bytes_done = 0; ++ tx_entry->offset = 0; ++ tx_entry->next_seg_no = 0; ++ tx_entry->iov_count = iov_count; ++ memcpy(&tx_entry->iov[0], iov, sizeof(*iov) * iov_count); ++ if (res_count) { ++ tx_entry->res_count = res_count; ++ memcpy(&tx_entry->res_iov[0], res_iov, sizeof(*res_iov) * res_count); ++ } + +-ssize_t rxd_ep_start_xfer(struct rxd_ep *ep, struct rxd_peer *peer, +- uint8_t op, struct rxd_tx_entry *tx_entry) +-{ +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_pkt_data_start *pkt; +- uint32_t flags; +- ssize_t ret; ++ tx_entry->cq_entry.op_context = context; ++ tx_entry->cq_entry.len = ofi_total_iov_len(iov, iov_count); ++ tx_entry->cq_entry.buf = iov[0].iov_base; ++ tx_entry->cq_entry.flags = ofi_tx_cq_flags(op); ++ tx_entry->cq_entry.tag = tag; + +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) +- return -FI_ENOMEM; ++ tx_entry->pkt = NULL; + +- pkt_meta->tx_entry = tx_entry; +- pkt = (struct rxd_pkt_data_start *) pkt_meta->pkt_data; +- flags = rxd_map_fi_flags(tx_entry->flags); +- tx_entry->msg_id = RXD_TX_ID(peer->nxt_msg_id, +- RXD_TX_ENTRY_ID(ep, tx_entry)); ++ max_inline = rxd_domain->max_inline_msg; ++ if (tx_entry->cq_entry.flags & FI_RMA) ++ max_inline -= sizeof(struct ofi_rma_iov) * rma_count; + +- rxd_ep_init_start_pkt(ep, peer, op, tx_entry, pkt, flags); ++ if (tx_entry->flags & RXD_TAG_HDR) ++ max_inline -= sizeof(tx_entry->cq_entry.tag); ++ if (tx_entry->flags & RXD_REMOTE_CQ_DATA) { ++ max_inline -= sizeof(tx_entry->cq_entry.data); ++ tx_entry->cq_entry.data = data; ++ } + +- if (tx_entry->op_hdr.size == pkt->ctrl.seg_size) +- pkt_meta->flags |= RXD_PKT_LAST; ++ if (rma_count > 1 || tx_entry->cq_entry.flags & FI_READ || ++ tx_entry->cq_entry.len > max_inline) ++ max_inline -= sizeof(struct rxd_sar_hdr); ++ else ++ tx_entry->flags |= RXD_INLINE; + +- ret = fi_send(ep->dg_ep, pkt, sizeof(*pkt) + pkt->ctrl.seg_size, +- rxd_mr_desc(pkt_meta->mr, ep), +- tx_entry->peer, &pkt_meta->context); +- if (ret) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "send %d failed\n", +- pkt->ctrl.seg_no); +- } ++ if (tx_entry->cq_entry.flags & FI_ATOMIC || tx_entry->cq_entry.len <= max_inline) ++ tx_entry->num_segs = 1; ++ else if (tx_entry->cq_entry.flags & FI_READ) ++ tx_entry->num_segs = ofi_div_ceil(tx_entry->cq_entry.len, ++ rxd_domain->max_seg_sz); ++ else ++ tx_entry->num_segs = ofi_div_ceil(tx_entry->cq_entry.len - max_inline, ++ rxd_domain->max_seg_sz) + 1; ++ ++ if ((tx_entry->op == RXD_READ_REQ || tx_entry->op == RXD_ATOMIC_FETCH || ++ tx_entry->op == RXD_ATOMIC_COMPARE) && ++ ep->peers[tx_entry->peer].unacked_cnt < rxd_env.max_unacked && ++ ep->peers[tx_entry->peer].peer_addr != FI_ADDR_UNSPEC) ++ dlist_insert_tail(&tx_entry->entry, ++ &ep->peers[tx_entry->peer].rma_rx_list); ++ else ++ dlist_insert_tail(&tx_entry->entry, ++ &ep->peers[tx_entry->peer].tx_list); + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "start msg %" PRIx64 ", size: %" PRIu64 "\n", +- pkt->ctrl.msg_id, tx_entry->op_hdr.size); +- rxd_set_timeout(tx_entry); +- dlist_insert_tail(&pkt_meta->entry, &tx_entry->pkt_list); +- dlist_insert_tail(&tx_entry->entry, &ep->tx_entry_list); +- peer->nxt_msg_id++; ++ return tx_entry; ++} + +- return 0; ++void rxd_tx_entry_free(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) ++{ ++ tx_entry->op = RXD_NO_OP; ++ dlist_remove(&tx_entry->entry); ++ rxd_release_tx_entry(ep, tx_entry); + } + +-ssize_t rxd_ep_connect(struct rxd_ep *ep, struct rxd_peer *peer, fi_addr_t addr) ++void rxd_insert_unacked(struct rxd_ep *ep, fi_addr_t peer, ++ struct rxd_pkt_entry *pkt_entry) + { +- struct rxd_pkt_data *pkt; +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_tx_entry *tx_entry; +- size_t addrlen; +- ssize_t ret; ++ dlist_insert_tail(&pkt_entry->d_entry, ++ &ep->peers[peer].unacked); ++ ep->peers[peer].unacked_cnt++; ++ rxd_ep_retry_pkt(ep, pkt_entry); ++} + +- if (peer->state != CMAP_IDLE) +- return -FI_EALREADY; ++ssize_t rxd_ep_post_data_pkts(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_data_pkt *data; + +- tx_entry = rxd_tx_entry_alloc(ep, peer, addr, 0, RXD_TX_CONN); +- if (!tx_entry) +- return -FI_EAGAIN; ++ while (tx_entry->bytes_done != tx_entry->cq_entry.len) { ++ if (ep->peers[tx_entry->peer].unacked_cnt >= rxd_env.max_unacked) ++ return 0; + +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) { +- rxd_tx_entry_free(ep, tx_entry); +- return -FI_ENOMEM; +- } ++ pkt_entry = rxd_get_tx_pkt(ep); ++ if (!pkt_entry) ++ return -FI_ENOMEM; + +- pkt = (struct rxd_pkt_data *) pkt_meta->pkt_data; +- addrlen = RXD_MAX_DGRAM_ADDR; +- ret = fi_getname(&ep->dg_ep->fid, pkt->data, &addrlen); +- if (ret) +- goto err; ++ if (tx_entry->op == RXD_DATA_READ && !tx_entry->bytes_done) { ++ tx_entry->start_seq = ep->peers[tx_entry->peer].tx_seq_no; ++ ep->peers[tx_entry->peer].tx_seq_no = tx_entry->start_seq + ++ tx_entry->num_segs; ++ } + +- tx_entry->msg_id = RXD_TX_ID(peer->nxt_msg_id, +- RXD_TX_ENTRY_ID(ep, tx_entry)); +- rxd_init_ctrl_hdr(&pkt->ctrl, ofi_ctrl_connreq, (uint16_t) addrlen, 0, +- tx_entry->msg_id, rxd_ep_conn_data(ep), addr); ++ rxd_init_data_pkt(ep, tx_entry, pkt_entry); + +- ret = fi_send(ep->dg_ep, pkt, addrlen + sizeof(struct rxd_pkt_data), +- rxd_mr_desc(pkt_meta->mr, ep), +- addr, &pkt_meta->context); +- if (ret) +- goto err; ++ data = (struct rxd_data_pkt *) (pkt_entry->pkt); ++ data->base_hdr.seq_no = tx_entry->start_seq + ++ data->ext_hdr.seg_no; ++ if (data->base_hdr.type != RXD_DATA_READ) ++ data->base_hdr.seq_no++; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "sent conn %" PRIx64 "\n", +- pkt->ctrl.msg_id); +- rxd_set_timeout(tx_entry); +- dlist_insert_tail(&pkt_meta->entry, &tx_entry->pkt_list); +- dlist_insert_tail(&tx_entry->entry, &ep->tx_entry_list); +- peer->nxt_msg_id++; +- peer->state = CMAP_CONNREQ_SENT; +- return 0; +-err: +- rxd_tx_entry_free(ep, tx_entry); +- util_buf_release(ep->tx_pkt_pool, pkt_meta); +- return ret; ++ rxd_insert_unacked(ep, tx_entry->peer, pkt_entry); ++ } ++ ++ return ep->peers[tx_entry->peer].unacked_cnt < rxd_env.max_unacked; + } + +-static ssize_t rxd_ep_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, +- uint64_t flags) ++int rxd_ep_retry_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- struct rxd_ep *rxd_ep; +- struct rxd_peer *peer; +- struct rxd_tx_entry *tx_entry; +- fi_addr_t peer_addr; +- ssize_t ret; +- +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid.fid); ++ int ret; + +- peer_addr = rxd_av_dg_addr(rxd_ep_av(rxd_ep), msg->addr); +- peer = rxd_ep_getpeer_info(rxd_ep, peer_addr); ++ if (ep->pending_cnt >= ep->tx_size) ++ return 1; + +- fastlock_acquire(&rxd_ep->lock); +- if (peer->state != CMAP_CONNECTED) { +- ret = rxd_ep_connect(rxd_ep, peer, peer_addr); +- fastlock_release(&rxd_ep->lock); +- if (ret == -FI_EALREADY) { +- rxd_ep->util_ep.progress(&rxd_ep->util_ep); +- ret = -FI_EAGAIN; +- } +- return ret ? ret : -FI_EAGAIN; +- } ++ pkt_entry->timestamp = fi_gettime_ms(); + +- tx_entry = rxd_tx_entry_alloc(rxd_ep, peer, peer_addr, flags, +- RXD_TX_MSG); +- if (!tx_entry) { +- ret = -FI_EAGAIN; +- goto out; ++ ret = fi_send(ep->dg_ep, (const void *) rxd_pkt_start(pkt_entry), ++ pkt_entry->pkt_size, rxd_mr_desc(pkt_entry->mr, ep), ++ rxd_ep_av(ep)->rxd_addr_table[pkt_entry->peer].dg_addr, ++ &pkt_entry->context); ++ if (ret) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "error sending packet: %d (%s)\n", ++ ret, fi_strerror(-ret)); ++ } else { ++ pkt_entry->flags |= RXD_PKT_IN_USE; ++ ep->pending_cnt++; + } + +- tx_entry->msg.msg = *msg; +- memcpy(&tx_entry->msg.msg_iov[0], msg->msg_iov, +- sizeof(*msg->msg_iov) * msg->iov_count); +- ret = rxd_ep_start_xfer(rxd_ep, peer, ofi_op_msg, tx_entry); +- if (ret) +- rxd_tx_entry_free(rxd_ep, tx_entry); +- +-out: +- fastlock_release(&rxd_ep->lock); + return ret; + } + +-static ssize_t rxd_ep_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, void *context) ++static ssize_t rxd_ep_send_rts(struct rxd_ep *rxd_ep, fi_addr_t rxd_addr) + { +- struct fi_msg msg; ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_rts_pkt *rts_pkt; ++ ssize_t ret; ++ size_t addrlen; + +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = dest_addr; +- msg.context = context; ++ pkt_entry = rxd_get_tx_pkt(rxd_ep); ++ if (!pkt_entry) ++ return -FI_ENOMEM; + +- return rxd_ep_sendmsg(ep, &msg, RXD_USE_OP_FLAGS); +-} ++ rts_pkt = (struct rxd_rts_pkt *) (pkt_entry->pkt); ++ pkt_entry->pkt_size = sizeof(*rts_pkt) + rxd_ep->tx_prefix_size; ++ pkt_entry->peer = rxd_addr; + +-static ssize_t rxd_ep_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, +- fi_addr_t dest_addr, void *context) +-{ +- struct iovec iov; ++ rts_pkt->base_hdr.version = RXD_PROTOCOL_VERSION; ++ rts_pkt->base_hdr.type = RXD_RTS; ++ rts_pkt->rts_addr = rxd_addr; + +- iov.iov_base = (void *) buf; +- iov.iov_len = len; ++ addrlen = RXD_NAME_LENGTH; ++ memset(rts_pkt->source, 0, RXD_NAME_LENGTH); ++ ret = fi_getname(&rxd_ep->dg_ep->fid, (void *) rts_pkt->source, ++ &addrlen); ++ if (ret) { ++ rxd_release_tx_pkt(rxd_ep, pkt_entry); ++ return ret; ++ } + +- return rxd_ep_sendv(ep, &iov, desc, 1, dest_addr, context); ++ rxd_insert_unacked(rxd_ep, rxd_addr, pkt_entry); ++ dlist_insert_tail(&rxd_ep->peers[rxd_addr].entry, &rxd_ep->rts_sent_list); ++ ++ return 0; + } + +-static ssize_t rxd_ep_inject(struct fid_ep *ep, const void *buf, size_t len, +- fi_addr_t dest_addr) ++ssize_t rxd_send_rts_if_needed(struct rxd_ep *ep, fi_addr_t addr) + { +- struct fi_msg msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- +- return rxd_ep_sendmsg(ep, &msg, FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ if (ep->peers[addr].peer_addr == FI_ADDR_UNSPEC && ++ dlist_empty(&ep->peers[addr].unacked)) ++ return rxd_ep_send_rts(ep, addr); ++ return 0; + } + +-static ssize_t rxd_ep_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, +- uint64_t data, fi_addr_t dest_addr, void *context) ++static void rxd_init_base_hdr(struct rxd_ep *rxd_ep, void **ptr, ++ struct rxd_x_entry *tx_entry) + { +- struct fi_msg msg; +- struct iovec msg_iov; +- +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ struct rxd_base_hdr *hdr = (struct rxd_base_hdr *) *ptr; + +- msg.msg_iov = &msg_iov; +- msg.desc = desc; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = context; +- msg.data = data; ++ hdr->version = RXD_PROTOCOL_VERSION; ++ hdr->type = tx_entry->op; ++ hdr->seq_no = 0; ++ hdr->peer = rxd_ep->peers[tx_entry->peer].peer_addr; ++ hdr->flags = tx_entry->flags; + +- return rxd_ep_sendmsg(ep, &msg, FI_REMOTE_CQ_DATA | RXD_USE_OP_FLAGS); ++ *ptr = (char *) (*ptr) + sizeof(*hdr); + } + +-static ssize_t rxd_ep_injectdata(struct fid_ep *ep, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr) ++static void rxd_init_sar_hdr(void **ptr, struct rxd_x_entry *tx_entry, ++ size_t iov_count) + { +- struct fi_msg msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; ++ struct rxd_sar_hdr *hdr = (struct rxd_sar_hdr *) *ptr; + +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.data = data; ++ hdr->size = tx_entry->cq_entry.len; ++ hdr->num_segs = tx_entry->num_segs; ++ hdr->tx_id = tx_entry->tx_id; ++ hdr->iov_count = iov_count; + +- return rxd_ep_sendmsg(ep, &msg, FI_REMOTE_CQ_DATA | FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ *ptr = (char *) (*ptr) + sizeof(*hdr); + } + +-static struct fi_ops_msg rxd_ops_msg = { +- .size = sizeof(struct fi_ops_msg), +- .recv = rxd_ep_recv, +- .recvv = rxd_ep_recvv, +- .recvmsg = rxd_ep_recvmsg, +- .send = rxd_ep_send, +- .sendv = rxd_ep_sendv, +- .sendmsg = rxd_ep_sendmsg, +- .inject = rxd_ep_inject, +- .senddata = rxd_ep_senddata, +- .injectdata = rxd_ep_injectdata, +-}; +- +-static int rxd_peek_trecv(struct dlist_entry *item, const void *arg) ++static void rxd_init_tag_hdr(void **ptr, struct rxd_x_entry *tx_entry) + { +- const struct fi_msg_tagged *msg = (const struct fi_msg_tagged *) arg; +- struct rxd_rx_entry *rx_entry; +- +- rx_entry = container_of(item, struct rxd_rx_entry, unexp_entry); +- return ((rx_entry->op_hdr.tag | msg->ignore) == +- (msg->tag | msg->ignore) && +- ((rx_entry->source == FI_ADDR_UNSPEC) || +- (msg->addr == FI_ADDR_UNSPEC) || +- (rx_entry->source == msg->addr))); +-} +- +-static void rxd_trx_discard_recv(struct rxd_ep *ep, +- struct rxd_rx_entry *rx_entry) +-{ +- struct rxd_rx_buf *rx_buf; +- struct ofi_ctrl_hdr *ctrl; +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_pkt_data *pkt; +- struct rxd_peer *peer; +- ssize_t ret; ++ struct rxd_tag_hdr *hdr = (struct rxd_tag_hdr *) *ptr; + +- rx_buf = rx_entry->unexp_buf; +- ctrl = (struct ofi_ctrl_hdr *) rx_buf->buf; +- peer = rxd_ep_getpeer_info(ep, ctrl->conn_id); ++ hdr->tag = tx_entry->cq_entry.tag; + +- dlist_remove(&rx_entry->unexp_entry); +- ep->num_unexp_msg--; +- +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) +- goto out; +- +- pkt = (struct rxd_pkt_data *) pkt_meta->pkt_data; +- rxd_init_ctrl_hdr(&pkt->ctrl, ofi_ctrl_discard, 0, 0, +- ctrl->msg_id, ctrl->rx_key, peer->conn_data); +- +- pkt_meta->flags = RXD_NOT_ACKED; +- ret = fi_send(ep->dg_ep, pkt, sizeof(struct rxd_pkt_data), +- rxd_mr_desc(pkt_meta->mr, ep), +- peer->fiaddr, &pkt_meta->context); +- if (ret) +- util_buf_release(ep->tx_pkt_pool, pkt_meta); +- +-out: +- rxd_rx_entry_free(ep, rx_entry); +- rxd_ep_repost_buff(rx_buf); ++ *ptr = (char *) (*ptr) + sizeof(*hdr); + } + +-static ssize_t rxd_trx_peek_recv(struct rxd_ep *ep, +- const struct fi_msg_tagged *msg, uint64_t flags) ++static void rxd_init_data_hdr(void **ptr, struct rxd_x_entry *tx_entry) + { +- struct dlist_entry *match; +- struct rxd_rx_entry *rx_entry; +- struct fi_cq_err_entry err_entry = {0}; +- struct fi_cq_tagged_entry cq_entry = {0}; +- struct fi_context *context; +- +- match = dlist_find_first_match(&ep->unexp_tag_list, +- &rxd_peek_trecv, msg); +- if (!match) { +- err_entry.op_context = msg->context; +- err_entry.flags = (FI_MSG | FI_RECV | FI_TAGGED); +- err_entry.tag = msg->tag; +- err_entry.err = FI_ENOMSG; +- err_entry.prov_errno = -FI_ENOMSG; +- rxd_cq_report_error(rxd_ep_rx_cq(ep), &err_entry); +- return 0; +- } ++ struct rxd_data_hdr *hdr = (struct rxd_data_hdr *) *ptr; + +- rx_entry = container_of(match, struct rxd_rx_entry, unexp_entry); +- cq_entry.flags = (FI_MSG | FI_RECV | FI_TAGGED); +- cq_entry.op_context = msg->context; +- cq_entry.len = rx_entry->op_hdr.size; +- cq_entry.buf = NULL; +- cq_entry.data = rx_entry->op_hdr.data; +- cq_entry.tag = rx_entry->op_hdr.tag; +- +- if (flags & FI_CLAIM) { +- context = (struct fi_context *)msg->context; +- context->internal[0] = rx_entry; +- dlist_remove(match); +- } else if (flags & FI_DISCARD) { +- rxd_trx_discard_recv(ep, rx_entry); +- } ++ hdr->cq_data = tx_entry->cq_entry.data; + +- rxd_ep_rx_cq(ep)->write_fn(rxd_ep_rx_cq(ep), &cq_entry); +- return 0; ++ *ptr = (char *) (*ptr) + sizeof(*hdr); + } + +-static ssize_t rxd_trx_claim_recv(struct rxd_ep *ep, +- const struct fi_msg_tagged *msg, uint64_t flags) ++static void rxd_init_rma_hdr(void **ptr, const struct fi_rma_iov *rma_iov, ++ size_t rma_count) + { +- size_t i; +- struct fi_context *context; +- struct rxd_rx_entry *rx_entry; +- struct rxd_trecv_entry *trecv_entry; +- struct rxd_peer *peer; +- struct rxd_rx_buf *rx_buf; +- struct ofi_ctrl_hdr *ctrl; +- struct rxd_pkt_data_start *pkt_start; +- +- if (freestack_isempty(ep->trecv_fs)) +- return -FI_EAGAIN; +- +- trecv_entry = freestack_pop(ep->trecv_fs); +- trecv_entry->msg = *msg; +- trecv_entry->msg.addr = (ep->util_ep.caps & FI_DIRECTED_RECV) ? +- msg->addr : FI_ADDR_UNSPEC; +- trecv_entry->flags = flags; +- for (i = 0; i < msg->iov_count; i++) { +- trecv_entry->iov[i].iov_base = msg->msg_iov[i].iov_base; +- trecv_entry->iov[i].iov_len = msg->msg_iov[i].iov_len; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "post claim trecv: %zu, tag: %" PRIx64 "\n", +- msg->msg_iov[i].iov_len, msg->tag); +- } ++ struct rxd_rma_hdr *hdr = (struct rxd_rma_hdr *) *ptr; + +- context = (struct fi_context *) msg->context; +- rx_entry = context->internal[0]; +- rx_entry->trecv = trecv_entry; ++ memcpy(hdr->rma, rma_iov, sizeof(*rma_iov) * rma_count); + +- rx_buf = rx_entry->unexp_buf; +- peer = rx_entry->peer_info; +- ctrl = (struct ofi_ctrl_hdr *) rx_buf->buf; +- pkt_start = (struct rxd_pkt_data_start *) ctrl; +- +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->trecv->iov, +- rx_entry->trecv->msg.iov_count, ctrl, +- pkt_start->data, rx_buf); +- return 0; ++ *ptr = (char *) (*ptr) + (sizeof(*rma_iov) * rma_count); + } + +-static ssize_t rxd_ep_trecvmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, +- uint64_t flags) ++static void rxd_init_atom_hdr(void **ptr, enum fi_datatype datatype, ++ enum fi_op atomic_op) + { +- ssize_t ret = 0; +- size_t i; +- struct rxd_ep *rxd_ep; +- struct rxd_trecv_entry *trecv_entry; ++ struct rxd_atom_hdr *hdr = (struct rxd_atom_hdr *) *ptr; + +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid.fid); +- fastlock_acquire(&rxd_ep->lock); ++ hdr->datatype = datatype; ++ hdr->atomic_op = atomic_op; + +- if (flags & FI_PEEK) { +- ret = rxd_trx_peek_recv(rxd_ep, msg, flags); +- goto out; +- } else if (flags & FI_CLAIM) { +- ret = rxd_trx_claim_recv(rxd_ep, msg, flags); +- goto out; +- } ++ *ptr = (char *) (*ptr) + sizeof(*hdr); ++} + +- if (freestack_isempty(rxd_ep->trecv_fs)) { +- ret = -FI_EAGAIN; +- goto out; +- } ++static size_t rxd_init_msg(void **ptr, const struct iovec *iov, size_t iov_count, ++ size_t total_len, size_t avail_len) ++{ ++ size_t done; + +- trecv_entry = freestack_pop(rxd_ep->trecv_fs); +- trecv_entry->msg = *msg; +- trecv_entry->msg.addr = (rxd_ep->util_ep.caps & FI_DIRECTED_RECV) ? +- msg->addr : FI_ADDR_UNSPEC; +- trecv_entry->flags = flags; +- for (i = 0; i < msg->iov_count; i++) { +- trecv_entry->iov[i].iov_base = msg->msg_iov[i].iov_base; +- trecv_entry->iov[i].iov_len = msg->msg_iov[i].iov_len; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "post trecv: %zu, tag: %" PRIx64 "\n", +- msg->msg_iov[i].iov_len, msg->tag); +- } +- dlist_init(&trecv_entry->entry); +- dlist_insert_tail(&trecv_entry->entry, &rxd_ep->trecv_list); ++ done = ofi_copy_from_iov(*ptr, MIN(total_len, avail_len), iov, iov_count, 0); + +- if (!dlist_empty(&rxd_ep->unexp_tag_list)) { +- rxd_ep_check_unexp_tag_list(rxd_ep, trecv_entry); +- } +-out: +- fastlock_release(&rxd_ep->lock); +- return ret; +-} ++ *ptr = (char *) (*ptr) + done; + +-static ssize_t rxd_ep_trecv(struct fid_ep *ep, void *buf, size_t len, void *desc, +- fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, void *context) +-{ +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = buf; +- msg_iov.iov_len = len; +- +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = src_addr; +- msg.context = context; +- msg.tag = tag; +- msg.ignore = ignore; +- msg.data = 0; +- +- return rxd_ep_trecvmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return done; + } + +-static ssize_t rxd_ep_trecvv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, void *context) ++int rxd_ep_send_op(struct rxd_ep *rxd_ep, struct rxd_x_entry *tx_entry, ++ const struct fi_rma_iov *rma_iov, size_t rma_count, ++ const struct iovec *comp_iov, size_t comp_count, ++ enum fi_datatype datatype, enum fi_op atomic_op) + { +- struct fi_msg_tagged msg; +- +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = src_addr; +- msg.context = context; +- msg.tag = tag; +- msg.ignore = ignore; +- msg.data = 0; +- +- return rxd_ep_trecvmsg(ep, &msg, RXD_USE_OP_FLAGS); +-} ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_base_hdr *base_hdr; ++ int ret = 0; ++ size_t len, avail; ++ void *ptr; + +-static ssize_t rxd_ep_tsendmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, +- uint64_t flags) +-{ +- struct rxd_ep *rxd_ep; +- struct rxd_peer *peer; +- struct rxd_tx_entry *tx_entry; +- fi_addr_t peer_addr; +- ssize_t ret; ++ pkt_entry = rxd_get_tx_pkt(rxd_ep); ++ if (!pkt_entry) ++ return -FI_ENOMEM; + +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid.fid); ++ base_hdr = rxd_get_base_hdr(pkt_entry); ++ ptr = (void *) base_hdr; ++ rxd_init_base_hdr(rxd_ep, &ptr, tx_entry); + +- peer_addr = rxd_av_dg_addr(rxd_ep_av(rxd_ep), msg->addr); +- peer = rxd_ep_getpeer_info(rxd_ep, peer_addr); ++ avail = rxd_ep_domain(rxd_ep)->max_inline_msg; + +- fastlock_acquire(&rxd_ep->lock); +- if (peer->state != CMAP_CONNECTED) { +- ret = rxd_ep_connect(rxd_ep, peer, peer_addr); +- fastlock_release(&rxd_ep->lock); +- if (ret == -FI_EALREADY) { +- rxd_ep->util_ep.progress(&rxd_ep->util_ep); +- ret = -FI_EAGAIN; ++ if (!(tx_entry->flags & RXD_INLINE)) { ++ rxd_init_sar_hdr(&ptr, tx_entry, rma_count); ++ avail -= sizeof(struct rxd_sar_hdr); ++ } ++ if (tx_entry->flags & RXD_TAG_HDR) { ++ rxd_init_tag_hdr(&ptr, tx_entry); ++ avail -= sizeof(struct rxd_tag_hdr); ++ } ++ if (tx_entry->flags & RXD_REMOTE_CQ_DATA) { ++ rxd_init_data_hdr(&ptr, tx_entry); ++ avail -= sizeof(struct rxd_data_hdr); ++ } ++ if (tx_entry->cq_entry.flags & (FI_RMA | FI_ATOMIC)) { ++ rxd_init_rma_hdr(&ptr, rma_iov, rma_count); ++ avail -= sizeof(struct ofi_rma_iov) * rma_count; ++ if (tx_entry->cq_entry.flags & FI_ATOMIC) { ++ rxd_init_atom_hdr(&ptr, datatype, atomic_op); ++ avail -= sizeof(struct rxd_atom_hdr); + } +- return ret ? ret : -FI_EAGAIN; + } +- +- tx_entry = rxd_tx_entry_alloc(rxd_ep, peer, peer_addr, flags, +- RXD_TX_TAG); +- if (!tx_entry) { +- ret = -FI_EAGAIN; +- goto out; ++ if (tx_entry->op != RXD_READ_REQ && atomic_op != FI_ATOMIC_READ) { ++ tx_entry->bytes_done = rxd_init_msg(&ptr, tx_entry->iov, ++ tx_entry->iov_count, ++ tx_entry->cq_entry.len, avail); ++ if (tx_entry->op == RXD_ATOMIC_COMPARE) { ++ avail -= tx_entry->bytes_done; ++ len = rxd_init_msg(&ptr, comp_iov, comp_count, ++ tx_entry->cq_entry.len, avail); ++ if (len != tx_entry->bytes_done) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "compare data length mismatch\n"); ++ } ++ } + } + +- tx_entry->tmsg.tmsg = *msg; +- memcpy(&tx_entry->tmsg.msg_iov[0], msg->msg_iov, +- sizeof(*msg->msg_iov) * msg->iov_count); +- ret = rxd_ep_start_xfer(rxd_ep, peer, ofi_op_tagged, tx_entry); +- if (ret) +- rxd_tx_entry_free(rxd_ep, tx_entry); +- +-out: +- fastlock_release(&rxd_ep->lock); +- return ret; +-} ++ pkt_entry->peer = tx_entry->peer; ++ pkt_entry->pkt_size = ((char *) ptr - (char *) base_hdr) + rxd_ep->tx_prefix_size; ++ ++ if (rxd_ep->peers[tx_entry->peer].unacked_cnt < rxd_env.max_unacked && ++ rxd_ep->peers[tx_entry->peer].peer_addr != FI_ADDR_UNSPEC) { ++ tx_entry->start_seq = rxd_set_pkt_seq(&rxd_ep->peers[tx_entry->peer], ++ pkt_entry); ++ if (tx_entry->op != RXD_READ_REQ && tx_entry->num_segs > 1) ++ rxd_ep->peers[tx_entry->peer].tx_seq_no = tx_entry->start_seq + ++ tx_entry->num_segs; ++ rxd_insert_unacked(rxd_ep, tx_entry->peer, pkt_entry); ++ if (tx_entry->op != RXD_READ_REQ && tx_entry->num_segs > 1) ++ ret = rxd_ep_post_data_pkts(rxd_ep, tx_entry); ++ } else { ++ tx_entry->pkt = pkt_entry; ++ } + +-static ssize_t rxd_ep_tsend(struct fid_ep *ep, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, uint64_t tag, +- void *context) +-{ +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = context; +- msg.tag = tag; +- +- return rxd_ep_tsendmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return ret == -FI_ENOMEM ? ret : 0; + } + +-static ssize_t rxd_ep_tsendv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t dest_addr, +- uint64_t tag, void *context) ++void rxd_ep_send_ack(struct rxd_ep *rxd_ep, fi_addr_t peer) + { +- struct fi_msg_tagged msg; +- +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = dest_addr; +- msg.context = context; +- msg.tag = tag; +- +- return rxd_ep_tsendmsg(ep, &msg, RXD_USE_OP_FLAGS); +-} ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_ack_pkt *ack; + +-ssize_t rxd_ep_tinject(struct fid_ep *ep, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t tag) +-{ +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.tag = tag; +- return rxd_ep_tsendmsg(ep, &msg, FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); +-} ++ pkt_entry = rxd_get_tx_pkt(rxd_ep); ++ if (!pkt_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "Unable to send ack\n"); ++ return; ++ } + +-ssize_t rxd_ep_tsenddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, +- uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context) +-{ +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = desc; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = context; +- msg.data = data; +- msg.tag = tag; +- +- return rxd_ep_tsendmsg(ep, &msg, FI_REMOTE_CQ_DATA | RXD_USE_OP_FLAGS); ++ ack = (struct rxd_ack_pkt *) (pkt_entry->pkt); ++ pkt_entry->pkt_size = sizeof(*ack) + rxd_ep->tx_prefix_size; ++ pkt_entry->peer = peer; ++ ++ ack->base_hdr.version = RXD_PROTOCOL_VERSION; ++ ack->base_hdr.type = RXD_ACK; ++ ack->base_hdr.peer = rxd_ep->peers[peer].peer_addr; ++ ack->base_hdr.seq_no = rxd_ep->peers[peer].rx_seq_no; ++ ack->ext_hdr.tx_id = rxd_ep->peers[peer].curr_tx_id; ++ ack->ext_hdr.rx_id = rxd_ep->peers[peer].curr_rx_id; ++ rxd_ep->peers[peer].last_tx_ack = ack->base_hdr.seq_no; ++ ++ dlist_insert_tail(&pkt_entry->d_entry, &rxd_ep->ctrl_pkts); ++ if (rxd_ep_retry_pkt(rxd_ep, pkt_entry)) { ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(rxd_ep, pkt_entry); ++ } + } + +-ssize_t rxd_ep_tinjectdata(struct fid_ep *ep, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr, uint64_t tag) ++static void rxd_ep_free_res(struct rxd_ep *ep) + { +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.data = data; +- msg.tag = tag; +- +- return rxd_ep_tsendmsg(ep, &msg, FI_REMOTE_CQ_DATA | FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ util_buf_pool_destroy(ep->tx_pkt_pool); ++ util_buf_pool_destroy(ep->rx_pkt_pool); ++ util_buf_pool_destroy(ep->tx_entry_pool); ++ util_buf_pool_destroy(ep->rx_entry_pool); + } + +-struct fi_ops_tagged rxd_ops_tagged = { +- .size = sizeof(struct fi_ops_tagged), +- .recv = rxd_ep_trecv, +- .recvv = rxd_ep_trecvv, +- .recvmsg = rxd_ep_trecvmsg, +- .send = rxd_ep_tsend, +- .sendv = rxd_ep_tsendv, +- .sendmsg = rxd_ep_tsendmsg, +- .inject = rxd_ep_tinject, +- .senddata = rxd_ep_tsenddata, +- .injectdata = rxd_ep_tinjectdata, +-}; +- +-static void rxd_ep_free_buf_pools(struct rxd_ep *ep) ++static void rxd_close_peer(struct rxd_ep *ep, struct rxd_peer *peer) + { +- util_buf_pool_destroy(ep->tx_pkt_pool); +- util_buf_pool_destroy(ep->rx_pkt_pool); ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_x_entry *x_entry; ++ ++ while (!dlist_empty(&peer->unacked)) { ++ dlist_pop_front(&peer->unacked, struct rxd_pkt_entry, ++ pkt_entry, d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); ++ peer->unacked_cnt--; ++ } + +- if (ep->tx_entry_fs) +- rxd_tx_entry_fs_free(ep->tx_entry_fs); ++ while(!dlist_empty(&peer->tx_list)) { ++ dlist_pop_front(&peer->tx_list, struct rxd_x_entry, ++ x_entry, entry); ++ rxd_tx_entry_free(ep, x_entry); ++ } + +- if (ep->rx_entry_fs) +- rxd_rx_entry_fs_free(ep->rx_entry_fs); ++ while(!dlist_empty(&peer->rx_list)) { ++ dlist_pop_front(&peer->rx_list, struct rxd_x_entry, ++ x_entry, entry); ++ rxd_rx_entry_free(ep, x_entry); ++ } + +- if (ep->recv_fs) +- rxd_recv_fs_free(ep->recv_fs); ++ while(!dlist_empty(&peer->rma_rx_list)) { ++ dlist_pop_front(&peer->rma_rx_list, struct rxd_x_entry, ++ x_entry, entry); ++ rxd_tx_entry_free(ep, x_entry); ++ } + +- if (ep->trecv_fs) +- rxd_trecv_fs_free(ep->trecv_fs); ++ dlist_remove(&peer->entry); ++ peer->active = 0; + } + + static int rxd_ep_close(struct fid *fid) + { + int ret; + struct rxd_ep *ep; ++ struct rxd_pkt_entry *pkt_entry; + struct slist_entry *entry; +- struct rxd_rx_buf *buf; ++ struct rxd_peer *peer; + + ep = container_of(fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ dlist_foreach_container(&ep->active_peers, struct rxd_peer, peer, entry) ++ rxd_close_peer(ep, peer); ++ + ret = fi_close(&ep->dg_ep->fid); + if (ret) + return ret; +@@ -1308,10 +786,28 @@ static int rxd_ep_close(struct fid *fid) + if (ret) + return ret; + +- while(!slist_empty(&ep->rx_pkt_list)) { ++ while (!slist_empty(&ep->rx_pkt_list)) { + entry = slist_remove_head(&ep->rx_pkt_list); +- buf = container_of(entry, struct rxd_rx_buf, entry); +- util_buf_release(ep->rx_pkt_pool, buf); ++ pkt_entry = container_of(entry, struct rxd_pkt_entry, s_entry); ++ rxd_release_rx_pkt(ep, pkt_entry); ++ } ++ ++ while (!dlist_empty(&ep->unexp_list)) { ++ dlist_pop_front(&ep->unexp_list, struct rxd_pkt_entry, ++ pkt_entry, d_entry); ++ rxd_release_rx_pkt(ep, pkt_entry); ++ } ++ ++ while (!dlist_empty(&ep->unexp_tag_list)) { ++ dlist_pop_front(&ep->unexp_tag_list, struct rxd_pkt_entry, ++ pkt_entry, d_entry); ++ rxd_release_rx_pkt(ep, pkt_entry); ++ } ++ ++ while (!dlist_empty(&ep->ctrl_pkts)) { ++ dlist_pop_front(&ep->ctrl_pkts, struct rxd_pkt_entry, ++ pkt_entry, d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); + } + + if (ep->util_ep.tx_cq) { +@@ -1330,54 +826,80 @@ static int rxd_ep_close(struct fid *fid) + } + } + +- fastlock_destroy(&ep->lock); +- rxd_ep_free_buf_pools(ep); +- free(ep->peer_info); ++ rxd_ep_free_res(ep); + ofi_endpoint_close(&ep->util_ep); + free(ep); + return 0; + } + +-static int rxd_ep_bind_cq(struct rxd_ep *ep, struct rxd_cq *cq, uint64_t flags) ++static int rxd_ep_trywait(void *arg) + { +- int ret; ++ struct rxd_fabric *rxd_fabric; ++ struct rxd_ep *rxd_ep = (struct rxd_ep *) arg; ++ struct fid *fids[1] = {&rxd_ep->dg_cq->fid}; + +- if (flags & ~(FI_TRANSMIT | FI_RECV)) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "unsupported flags\n"); +- return -FI_EBADFLAGS; +- } ++ rxd_fabric = container_of(rxd_ep->util_ep.domain->fabric, ++ struct rxd_fabric, util_fabric); ++ ++ return fi_trywait(rxd_fabric->dg_fabric, fids, 1); ++} ++ ++static int rxd_ep_get_wait_cq_fd(struct rxd_ep *rxd_ep, enum fi_wait_obj wait_obj) ++{ ++ int ret = 0; + +- if (((flags & FI_TRANSMIT) && rxd_ep_tx_cq(ep)) || +- ((flags & FI_RECV) && rxd_ep_rx_cq(ep))) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "duplicate CQ binding\n"); +- return -FI_EINVAL; ++ if (wait_obj == FI_WAIT_FD && (!rxd_ep->dg_cq_fd)) { ++ ret = fi_control(&rxd_ep->dg_cq->fid, FI_GETWAIT, ++ &rxd_ep->dg_cq_fd); ++ if (ret) ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "Unable to get dg CQ fd\n"); + } ++ return ret; ++} + +- ret = fid_list_insert(&cq->util_cq.ep_list, +- &cq->util_cq.ep_list_lock, +- &ep->util_ep.ep_fid.fid); ++static int rxd_ep_wait_fd_add(struct rxd_ep *rxd_ep, struct util_wait *wait) ++{ ++ return ofi_wait_fd_add(wait, rxd_ep->dg_cq_fd, FI_EPOLL_IN, ++ rxd_ep_trywait, rxd_ep, ++ &rxd_ep->util_ep.ep_fid.fid); ++} ++ ++static int rxd_dg_cq_open(struct rxd_ep *rxd_ep, enum fi_wait_obj wait_obj) ++{ ++ struct rxd_domain *rxd_domain; ++ struct fi_cq_attr cq_attr = {0}; ++ int ret; ++ ++ assert((wait_obj == FI_WAIT_NONE) || (wait_obj == FI_WAIT_FD)); ++ ++ cq_attr.size = rxd_ep->tx_size + rxd_ep->rx_size; ++ cq_attr.format = FI_CQ_FORMAT_MSG; ++ cq_attr.wait_obj = wait_obj; ++ ++ rxd_domain = container_of(rxd_ep->util_ep.domain, struct rxd_domain, ++ util_domain); ++ ++ ret = fi_cq_open(rxd_domain->dg_domain, &cq_attr, &rxd_ep->dg_cq, rxd_ep); + if (ret) + return ret; + +- if (flags & FI_TRANSMIT) { +- ep->util_ep.tx_cq = &cq->util_cq; +- ofi_atomic_inc32(&cq->util_cq.ref); +- /* TODO: wait handling */ +- } +- +- if (flags & FI_RECV) { +- ep->util_ep.rx_cq = &cq->util_cq; +- ofi_atomic_inc32(&cq->util_cq.ref); +- /* TODO: wait handling */ +- } ++ ret = rxd_ep_get_wait_cq_fd(rxd_ep, wait_obj); ++ if (ret) ++ goto err; + + return 0; ++err: ++ fi_close(&rxd_ep->dg_cq->fid); ++ return ret; + } + + static int rxd_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + { + struct rxd_ep *ep; + struct rxd_av *av; ++ struct util_cq *cq; ++ struct util_cntr *cntr; + int ret = 0; + + ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); +@@ -1391,20 +913,54 @@ static int rxd_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + ret = fi_ep_bind(ep->dg_ep, &av->dg_av->fid, flags); + if (ret) + return ret; +- +- ep->peer_info = calloc(av->util_av.count, sizeof(struct rxd_peer)); +- ep->max_peers = av->util_av.count; +- if (!ep->peer_info) +- return -FI_ENOMEM; + break; + case FI_CLASS_CQ: +- ret = rxd_ep_bind_cq(ep, container_of(bfid, struct rxd_cq, +- util_cq.cq_fid.fid), flags); ++ cq = container_of(bfid, struct util_cq, cq_fid.fid); ++ ++ ret = ofi_ep_bind_cq(&ep->util_ep, cq, flags); ++ if (ret) ++ return ret; ++ ++ if (!ep->dg_cq) { ++ ret = rxd_dg_cq_open(ep, cq->wait ? FI_WAIT_FD : FI_WAIT_NONE); ++ if (ret) ++ return ret; ++ } ++ ++ if (cq->wait) ++ ret = rxd_ep_wait_fd_add(ep, cq->wait); + break; + case FI_CLASS_EQ: + break; + case FI_CLASS_CNTR: +- return ofi_ep_bind(&ep->util_ep, bfid, flags); ++ cntr = container_of(bfid, struct util_cntr, cntr_fid.fid); ++ ++ ret = ofi_ep_bind_cntr(&ep->util_ep, cntr, flags); ++ if (ret) ++ return ret; ++ ++ if (!ep->dg_cq) { ++ ret = rxd_dg_cq_open(ep, cntr->wait ? FI_WAIT_FD : FI_WAIT_NONE); ++ if (ret) ++ return ret; ++ } else if (!ep->dg_cq_fd && cntr->wait) { ++ /* Reopen CQ with WAIT fd set */ ++ ret = fi_close(&ep->dg_cq->fid); ++ if (ret) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "Unable to close dg CQ: %s\n", ++ fi_strerror(-ret)); ++ return ret; ++ } else { ++ ret = rxd_dg_cq_open(ep, FI_WAIT_FD); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ if (cntr->wait) ++ ret = rxd_ep_wait_fd_add(ep, cntr->wait); ++ break; + default: + FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, + "invalid fid class\n"); +@@ -1468,68 +1024,113 @@ struct fi_ops_cm rxd_ep_cm = { + .join = fi_no_join, + }; + ++static void rxd_peer_timeout(struct rxd_ep *rxd_ep, struct rxd_peer *peer) ++{ ++ struct fi_cq_err_entry err_entry; ++ struct rxd_x_entry *tx_entry; ++ struct rxd_pkt_entry *pkt_entry; ++ ++ while (!dlist_empty(&peer->tx_list)) { ++ dlist_pop_front(&peer->tx_list, struct rxd_x_entry, tx_entry, entry); ++ memset(&err_entry, 0, sizeof(struct fi_cq_err_entry)); ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ err_entry.op_context = tx_entry->cq_entry.op_context; ++ err_entry.flags = tx_entry->cq_entry.flags; ++ err_entry.err = FI_ECONNREFUSED; ++ err_entry.prov_errno = 0; ++ rxd_cq_report_error(rxd_ep_tx_cq(rxd_ep), &err_entry); ++ } ++ ++ while (!dlist_empty(&peer->unacked)) { ++ dlist_pop_front(&peer->unacked, struct rxd_pkt_entry, pkt_entry, ++ d_entry); ++ rxd_release_tx_pkt(rxd_ep, pkt_entry); ++ peer->unacked_cnt--; ++ } ++ ++ dlist_remove(&peer->entry); ++} ++ ++static void rxd_progress_pkt_list(struct rxd_ep *ep, struct rxd_peer *peer) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ uint64_t current; ++ int ret, retry = 0; ++ ++ current = fi_gettime_ms(); ++ if (peer->retry_cnt > RXD_MAX_PKT_RETRY) { ++ rxd_peer_timeout(ep, peer); ++ return; ++ } ++ ++ dlist_foreach_container(&peer->unacked, struct rxd_pkt_entry, ++ pkt_entry, d_entry) { ++ if (pkt_entry->flags & (RXD_PKT_IN_USE | RXD_PKT_ACKED) || ++ current < rxd_get_retry_time(pkt_entry->timestamp, peer->retry_cnt)) ++ continue; ++ retry = 1; ++ ret = rxd_ep_retry_pkt(ep, pkt_entry); ++ if (ret) ++ break; ++ } ++ if (retry) ++ peer->retry_cnt++; ++ ++ if (!dlist_empty(&peer->unacked)) ++ ep->next_retry = ep->next_retry == -1 ? peer->retry_cnt : ++ MIN(ep->next_retry, peer->retry_cnt); ++} + + static void rxd_ep_progress(struct util_ep *util_ep) + { +- struct dlist_entry *tx_item, *pkt_item; +- struct rxd_tx_entry *tx_entry; ++ struct rxd_peer *peer; + struct fi_cq_msg_entry cq_entry; +- struct rxd_pkt_meta *pkt; ++ struct dlist_entry *tmp; + struct rxd_ep *ep; +- uint64_t cur_time; + ssize_t ret; + int i; + + ep = container_of(util_ep, struct rxd_ep, util_ep); + +- fastlock_acquire(&ep->lock); ++ fastlock_acquire(&ep->util_ep.lock); + for(ret = 1, i = 0; +- ret > 0 && (!rxd_progress_spin_count || i < rxd_progress_spin_count); ++ ret > 0 && (!rxd_env.spin_count || i < rxd_env.spin_count); + i++) { + ret = fi_cq_read(ep->dg_cq, &cq_entry, 1); + if (ret == -FI_EAGAIN) + break; + +- if (cq_entry.flags & FI_SEND) +- rxd_handle_send_comp(&cq_entry); +- else if (cq_entry.flags & FI_RECV) ++ if (ret == -FI_EAVAIL) { ++ rxd_handle_error(ep); ++ continue; ++ } ++ ++ if (cq_entry.flags & FI_RECV) + rxd_handle_recv_comp(ep, &cq_entry); + else +- assert (0); ++ rxd_handle_send_comp(ep, &cq_entry); + } + +- cur_time = fi_gettime_us(); +- dlist_foreach(&ep->tx_entry_list, tx_item) { +- tx_entry = container_of(tx_item, struct rxd_tx_entry, entry); ++ if (!rxd_env.retry) ++ goto out; + +- if (tx_entry->seg_no < tx_entry->window) { +- rxd_tx_entry_progress(ep, tx_entry); +- } else if ((tx_entry->retry_time > cur_time) /* && +- dlist_empty(&tx_entry->pkt_list)*/ ) { ++ ep->next_retry = -1; ++ dlist_foreach_container_safe(&ep->rts_sent_list, struct rxd_peer, ++ peer, entry, tmp) ++ rxd_progress_pkt_list(ep, peer); + +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "Progressing waiting entry [%" PRIx64 "]\n", +- tx_entry->msg_id); ++ dlist_foreach_container_safe(&ep->active_peers, struct rxd_peer, ++ peer, entry, tmp) { ++ rxd_progress_pkt_list(ep, peer); ++ if (dlist_empty(&peer->unacked)) ++ rxd_progress_tx_list(ep, peer); ++ } + +- rxd_tx_entry_progress(ep, tx_entry); +-// rxd_set_timeout(tx_entry); +- } ++out: ++ while (ep->posted_bufs < ep->rx_size && !ret) ++ ret = rxd_ep_post_buf(ep); + +- dlist_foreach(&tx_entry->pkt_list, pkt_item) { +- pkt = container_of(pkt_item, struct rxd_pkt_meta, entry); +-// /* TODO: This if check is repeated. Create a function +-// * to perform this check, and figure out what the check +-// * is actually doing with the bit-shift, multiply operation. +-// */ +-// if (curr_stamp > pkt->us_stamp && +-// curr_stamp - pkt->us_stamp > +-// (((uint64_t) 1) << ((uint64_t) pkt->retries + 1)) * +-// RXD_RETRY_TIMEOUT) { +-// pkt->us_stamp = curr_stamp; +- rxd_ep_retry_pkt(ep, tx_entry, pkt); +-// } +- } +- } +- fastlock_release(&ep->lock); ++ fastlock_release(&ep->util_ep.lock); + } + + static int rxd_buf_region_alloc_hndlr(void *pool_ctx, void *addr, size_t len, +@@ -1550,49 +1151,58 @@ static void rxd_buf_region_free_hndlr(void *pool_ctx, void *context) + fi_close((struct fid *) context); + } + +-int rxd_ep_create_buf_pools(struct rxd_ep *ep, struct fi_info *fi_info) ++int rxd_ep_init_res(struct rxd_ep *ep, struct fi_info *fi_info) + { ++ struct rxd_domain *rxd_domain = rxd_ep_domain(ep); ++ struct util_buf_attr entry_pool_attr = { ++ .size = sizeof(struct rxd_x_entry), ++ .alignment = RXD_BUF_POOL_ALIGNMENT, ++ .max_cnt = 0, ++ .indexing = { ++ .used = 1, ++ .ordered = 1, ++ }, ++ }; ++ + int ret = util_buf_pool_create_ex( + &ep->tx_pkt_pool, +- rxd_ep_domain(ep)->max_mtu_sz + sizeof(struct rxd_pkt_meta), ++ rxd_domain->max_mtu_sz + sizeof(struct rxd_pkt_entry), + RXD_BUF_POOL_ALIGNMENT, 0, RXD_TX_POOL_CHUNK_CNT, +- (fi_info->mode & FI_LOCAL_MR) ? rxd_buf_region_alloc_hndlr : NULL, +- (fi_info->mode & FI_LOCAL_MR) ? rxd_buf_region_free_hndlr : NULL, +- rxd_ep_domain(ep)); ++ ep->do_local_mr ? rxd_buf_region_alloc_hndlr : NULL, ++ ep->do_local_mr ? rxd_buf_region_free_hndlr : NULL, ++ rxd_domain); + if (ret) + return -FI_ENOMEM; + + ret = util_buf_pool_create_ex( + &ep->rx_pkt_pool, +- rxd_ep_domain(ep)->max_mtu_sz + sizeof (struct rxd_rx_buf), ++ rxd_domain->max_mtu_sz + sizeof (struct rxd_pkt_entry), + RXD_BUF_POOL_ALIGNMENT, 0, RXD_RX_POOL_CHUNK_CNT, +- (fi_info->mode & FI_LOCAL_MR) ? rxd_buf_region_alloc_hndlr : NULL, +- (fi_info->mode & FI_LOCAL_MR) ? rxd_buf_region_free_hndlr : NULL, +- rxd_ep_domain(ep)); ++ ep->do_local_mr ? rxd_buf_region_alloc_hndlr : NULL, ++ ep->do_local_mr ? rxd_buf_region_free_hndlr : NULL, ++ rxd_domain); + if (ret) + goto err; + +- ep->tx_entry_fs = rxd_tx_entry_fs_create(1ULL << RXD_MAX_TX_BITS); +- if (!ep->tx_entry_fs) ++ entry_pool_attr.chunk_cnt = ep->tx_size; ++ ret = util_buf_pool_create_attr(&entry_pool_attr, &ep->tx_entry_pool); ++ if (ret) + goto err; + +- ep->rx_entry_fs = rxd_rx_entry_fs_create(1ULL << RXD_MAX_RX_BITS); +- if (!ep->rx_entry_fs) ++ entry_pool_attr.chunk_cnt = ep->rx_size; ++ ret = util_buf_pool_create_attr(&entry_pool_attr, &ep->rx_entry_pool); ++ if (ret) + goto err; + +- if (ep->util_ep.caps & FI_MSG) { +- ep->recv_fs = rxd_recv_fs_create(ep->rx_size); +- dlist_init(&ep->recv_list); +- if (!ep->recv_fs) +- goto err; +- } + +- if (ep->util_ep.caps & FI_TAGGED) { +- ep->trecv_fs = rxd_trecv_fs_create(ep->rx_size); +- dlist_init(&ep->trecv_list); +- if (!ep->trecv_fs) +- goto err; +- } ++ dlist_init(&ep->rx_list); ++ dlist_init(&ep->rx_tag_list); ++ dlist_init(&ep->active_peers); ++ dlist_init(&ep->rts_sent_list); ++ dlist_init(&ep->unexp_list); ++ dlist_init(&ep->unexp_tag_list); ++ dlist_init(&ep->ctrl_pkts); ++ slist_init(&ep->rx_pkt_list); + + return 0; + err: +@@ -1602,39 +1212,48 @@ err: + if (ep->rx_pkt_pool) + util_buf_pool_destroy(ep->rx_pkt_pool); + +- if (ep->tx_entry_fs) +- rxd_tx_entry_fs_free(ep->tx_entry_fs); ++ if (ep->tx_entry_pool) ++ util_buf_pool_destroy(ep->tx_entry_pool); + +- if (ep->rx_entry_fs) +- rxd_rx_entry_fs_free(ep->rx_entry_fs); +- +- if (ep->recv_fs) +- rxd_recv_fs_free(ep->recv_fs); +- +- if (ep->trecv_fs) +- rxd_trecv_fs_free(ep->trecv_fs); ++ if (ep->rx_entry_pool) ++ util_buf_pool_destroy(ep->rx_entry_pool); + + return -FI_ENOMEM; + } + ++static void rxd_init_peer(struct rxd_ep *ep, uint64_t rxd_addr) ++{ ++ ep->peers[rxd_addr].peer_addr = FI_ADDR_UNSPEC; ++ ep->peers[rxd_addr].tx_seq_no = 0; ++ ep->peers[rxd_addr].rx_seq_no = 0; ++ ep->peers[rxd_addr].last_rx_ack = 0; ++ ep->peers[rxd_addr].last_tx_ack = 0; ++ ep->peers[rxd_addr].rx_window = rxd_env.max_unacked; ++ ep->peers[rxd_addr].unacked_cnt = 0; ++ ep->peers[rxd_addr].retry_cnt = 0; ++ ep->peers[rxd_addr].active = 0; ++ dlist_init(&ep->peers[rxd_addr].unacked); ++ dlist_init(&ep->peers[rxd_addr].tx_list); ++ dlist_init(&ep->peers[rxd_addr].rx_list); ++ dlist_init(&ep->peers[rxd_addr].rma_rx_list); ++ dlist_init(&ep->peers[rxd_addr].buf_pkts); ++} ++ + int rxd_endpoint(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep, void *context) + { + struct fi_info *dg_info; + struct rxd_domain *rxd_domain; + struct rxd_ep *rxd_ep; +- struct fi_cq_attr cq_attr; +- int ret; ++ int ret, i; + +- rxd_ep = calloc(1, sizeof(*rxd_ep)); ++ rxd_ep = calloc(1, sizeof(*rxd_ep) + sizeof(struct rxd_peer) * ++ rxd_env.max_peers); + if (!rxd_ep) + return -FI_ENOMEM; + + rxd_domain = container_of(domain, struct rxd_domain, + util_domain.domain_fid); +- memset(&cq_attr, 0, sizeof cq_attr); +- cq_attr.format = FI_CQ_FORMAT_MSG; +- cq_attr.wait_obj = FI_WAIT_FD; + + ret = ofi_endpoint_init(domain, &rxd_util_prov, info, &rxd_ep->util_ep, + context, rxd_ep_progress); +@@ -1647,27 +1266,28 @@ int rxd_endpoint(struct fid_domain *domain, struct fi_info *info, + if (ret) + goto err2; + ++ memcpy(dg_info->src_addr, info->src_addr, info->src_addrlen); + rxd_ep->do_local_mr = (rxd_domain->mr_mode & FI_MR_LOCAL) ? 1 : 0; + + ret = fi_endpoint(rxd_domain->dg_domain, dg_info, &rxd_ep->dg_ep, rxd_ep); +- cq_attr.size = dg_info->tx_attr->size + dg_info->rx_attr->size; +- fi_freeinfo(dg_info); + if (ret) + goto err2; + +- ret = fi_cq_open(rxd_domain->dg_domain, &cq_attr, &rxd_ep->dg_cq, rxd_ep); +- if (ret) +- goto err3; ++ rxd_ep->tx_prefix_size = dg_info->tx_attr->mode & FI_MSG_PREFIX ? ++ dg_info->ep_attr->msg_prefix_size : 0; ++ rxd_ep->rx_prefix_size = dg_info->rx_attr->mode & FI_MSG_PREFIX ? ++ dg_info->ep_attr->msg_prefix_size : 0; ++ rxd_ep->rx_size = MIN(dg_info->rx_attr->size, info->rx_attr->size); ++ rxd_ep->tx_size = MIN(dg_info->tx_attr->size, info->tx_attr->size); ++ fi_freeinfo(dg_info); + +- ret = fi_ep_bind(rxd_ep->dg_ep, &rxd_ep->dg_cq->fid, +- FI_TRANSMIT | FI_RECV); ++ rxd_ep->next_retry = -1; ++ ret = rxd_ep_init_res(rxd_ep, info); + if (ret) +- goto err4; ++ goto err3; + +- rxd_ep->rx_size = info->rx_attr->size; +- ret = rxd_ep_create_buf_pools(rxd_ep, info); +- if (ret) +- goto err4; ++ for (i = 0; i < rxd_env.max_peers; rxd_init_peer(rxd_ep, i++)) ++ ; + + rxd_ep->util_ep.ep_fid.fid.ops = &rxd_ep_fi_ops; + rxd_ep->util_ep.ep_fid.cm = &rxd_ep_cm; +@@ -1675,20 +1295,11 @@ int rxd_endpoint(struct fid_domain *domain, struct fi_info *info, + rxd_ep->util_ep.ep_fid.msg = &rxd_ops_msg; + rxd_ep->util_ep.ep_fid.tagged = &rxd_ops_tagged; + rxd_ep->util_ep.ep_fid.rma = &rxd_ops_rma; +- +- dlist_init(&rxd_ep->tx_entry_list); +- dlist_init(&rxd_ep->rx_entry_list); +- dlist_init(&rxd_ep->wait_rx_list); +- dlist_init(&rxd_ep->unexp_msg_list); +- dlist_init(&rxd_ep->unexp_tag_list); +- slist_init(&rxd_ep->rx_pkt_list); +- fastlock_init(&rxd_ep->lock); ++ rxd_ep->util_ep.ep_fid.atomic = &rxd_ops_atomic; + + *ep = &rxd_ep->util_ep.ep_fid; + return 0; + +-err4: +- fi_close(&rxd_ep->dg_cq->fid); + err3: + fi_close(&rxd_ep->dg_ep->fid); + err2: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_fabric.c +index dce5a87..fefd0ae 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_fabric.c +@@ -74,7 +74,7 @@ int rxd_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + void *context) + { + struct rxd_fabric *rxd_fabric; +- struct fi_info hints, *dg_info; ++ struct fi_info *dg_info; + int ret; + + rxd_fabric = calloc(1, sizeof(*rxd_fabric)); +@@ -86,41 +86,27 @@ int rxd_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + if (ret) + goto err1; + +- memset(&hints, 0, sizeof hints); +- if (!(hints.fabric_attr = calloc(1, sizeof(*hints.fabric_attr)))) { +- ret = -FI_ENOMEM; +- goto err2; +- } +- hints.fabric_attr->name = attr->name; +- +- ret = ofi_get_core_info(attr->api_version, NULL, NULL, 0, &rxd_util_prov, +- &hints, rxd_info_to_core, &dg_info); ++ ret = ofi_get_core_info_fabric(&rxd_prov, attr, &dg_info); + if (ret) { ++ FI_WARN(&rxd_prov, FI_LOG_FABRIC, "Unable to get core info!\n"); + ret = -FI_EINVAL; +- goto err3; ++ goto err2; + } + + ret = fi_fabric(dg_info->fabric_attr, &rxd_fabric->dg_fabric, context); +- if (ret) { +- goto err4; +- } ++ if (ret) ++ goto err3; + + *fabric = &rxd_fabric->util_fabric.fabric_fid; + (*fabric)->fid.ops = &rxd_fabric_fi_ops; + (*fabric)->ops = &rxd_fabric_ops; + +- free(hints.fabric_attr); + fi_freeinfo(dg_info); +- +- fi_param_get_int(&rxd_prov, "spin_count", &rxd_progress_spin_count); +- + return 0; +-err4: +- fi_freeinfo(dg_info); + err3: +- free(hints.fabric_attr); ++ fi_freeinfo(dg_info); + err2: +- ofi_fabric_close(&rxd_fabric->util_fabric); ++ (void) ofi_fabric_close(&rxd_fabric->util_fabric); + err1: + free(rxd_fabric); + return ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_init.c +index b3486fa..2d08f54 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_init.c +@@ -35,12 +35,29 @@ + #include + #include "rxd.h" + ++struct rxd_env rxd_env = { ++ .spin_count = 1000, ++ .retry = 1, ++ .max_peers = 1024, ++ .max_unacked = 128, ++}; ++ ++static void rxd_init_env(void) ++{ ++ fi_param_get_int(&rxd_prov, "spin_count", &rxd_env.spin_count); ++ fi_param_get_bool(&rxd_prov, "retry", &rxd_env.retry); ++ fi_param_get_int(&rxd_prov, "max_peers", &rxd_env.max_peers); ++ fi_param_get_int(&rxd_prov, "max_unacked", &rxd_env.max_unacked); ++} ++ + int rxd_info_to_core(uint32_t version, const struct fi_info *rxd_info, + struct fi_info *core_info) + { + core_info->caps = FI_MSG; +- core_info->mode = FI_LOCAL_MR; ++ core_info->mode = FI_LOCAL_MR | FI_CONTEXT | FI_MSG_PREFIX; + core_info->ep_attr->type = FI_EP_DGRAM; ++ ++ core_info->domain_attr->mr_mode = FI_MR_LOCAL | FI_MR_ALLOCATED; + return 0; + } + +@@ -51,6 +68,12 @@ int rxd_info_to_rxd(uint32_t version, const struct fi_info *core_info, + info->mode = rxd_info.mode; + + *info->tx_attr = *rxd_info.tx_attr; ++ info->tx_attr->inject_size = MIN(core_info->ep_attr->max_msg_size, ++ RXD_MAX_MTU_SIZE) - (sizeof(struct rxd_base_hdr) + ++ core_info->ep_attr->msg_prefix_size + ++ sizeof(struct rxd_rma_hdr) + (RXD_IOV_LIMIT * ++ sizeof(struct ofi_rma_iov)) + sizeof(struct rxd_atom_hdr)); ++ + *info->rx_attr = *rxd_info.rx_attr; + *info->ep_attr = *rxd_info.ep_attr; + *info->domain_attr = *rxd_info.domain_attr; +@@ -73,7 +96,7 @@ static void rxd_fini(void) + struct fi_provider rxd_prov = { + .name = OFI_UTIL_PREFIX "rxd", + .version = FI_VERSION(RXD_MAJOR_VERSION, RXD_MINOR_VERSION), +- .fi_version = RXD_FI_VERSION, ++ .fi_version = FI_VERSION(1, 7), + .getinfo = rxd_getinfo, + .fabric = rxd_fabric, + .cleanup = rxd_fini +@@ -83,6 +106,14 @@ RXD_INI + { + fi_param_define(&rxd_prov, "spin_count", FI_PARAM_INT, + "Number of iterations to receive packets (0 - infinite)"); ++ fi_param_define(&rxd_prov, "retry", FI_PARAM_BOOL, ++ "Toggle packet retrying (default: yes)"); ++ fi_param_define(&rxd_prov, "max_peers", FI_PARAM_INT, ++ "Maximum number of peers to track (default: 1024)"); ++ fi_param_define(&rxd_prov, "max_unacked", FI_PARAM_INT, ++ "Maximum number of packets to send at once (default: 128)"); ++ ++ rxd_init_env(); + + return &rxd_prov; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_msg.c +new file mode 100644 +index 0000000..5a5b7b6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_msg.c +@@ -0,0 +1,377 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include "rxd.h" ++ ++static int rxd_match_unexp(struct dlist_entry *item, const void *arg) ++{ ++ struct rxd_x_entry *rx_entry = (struct rxd_x_entry *) arg; ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_base_hdr *hdr; ++ ++ pkt_entry = container_of(item, struct rxd_pkt_entry, d_entry); ++ hdr = rxd_get_base_hdr(pkt_entry); ++ ++ if (!rxd_match_addr(rx_entry->peer, hdr->peer)) ++ return 0; ++ ++ if (hdr->type != RXD_TAGGED) ++ return 1; ++ ++ return rxd_match_tag(rx_entry->cq_entry.tag, rx_entry->ignore, ++ rxd_get_tag_hdr(pkt_entry)->tag); ++} ++ ++static int rxd_ep_check_unexp_msg_list(struct rxd_ep *ep, ++ struct dlist_entry *unexp_list, ++ struct dlist_entry *rx_list, ++ struct rxd_x_entry *rx_entry) ++{ ++ struct dlist_entry *match; ++ struct rxd_x_entry *progress_entry, *dup_entry = NULL; ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_base_hdr *base_hdr; ++ struct rxd_sar_hdr *sar_hdr = NULL; ++ struct rxd_tag_hdr *tag_hdr = NULL; ++ struct rxd_data_hdr *data_hdr = NULL; ++ struct rxd_atom_hdr *atom_hdr = NULL; ++ struct rxd_rma_hdr *rma_hdr = NULL; ++ void *msg = NULL; ++ size_t msg_size, total_size; ++ ++ while (!dlist_empty(unexp_list)) { ++ match = dlist_remove_first_match(unexp_list, &rxd_match_unexp, ++ (void *) rx_entry); ++ if (!match) ++ return 0; ++ ++ FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "progressing unexp msg entry\n"); ++ ++ pkt_entry = container_of(match, struct rxd_pkt_entry, d_entry); ++ base_hdr = rxd_get_base_hdr(pkt_entry); ++ ++ rxd_unpack_hdrs(pkt_entry->pkt_size - ep->rx_prefix_size, ++ base_hdr, &sar_hdr, &tag_hdr, ++ &data_hdr, &rma_hdr, &atom_hdr, &msg, &msg_size); ++ ++ total_size = sar_hdr ? sar_hdr->size : msg_size; ++ if (rx_entry->flags & RXD_MULTI_RECV) ++ dup_entry = rxd_progress_multi_recv(ep, rx_entry, total_size); ++ ++ progress_entry = dup_entry ? dup_entry : rx_entry; ++ ++ progress_entry->cq_entry.len = MIN(rx_entry->cq_entry.len, total_size); ++ ++ rxd_progress_op(ep, progress_entry, pkt_entry, base_hdr, sar_hdr, tag_hdr, ++ data_hdr, rma_hdr, atom_hdr, &msg, msg_size); ++ rxd_release_repost_rx(ep, pkt_entry); ++ rxd_ep_send_ack(ep, base_hdr->peer); ++ ++ if (!dup_entry) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++ssize_t rxd_ep_generic_recvmsg(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t ignore, void *context, uint32_t op, ++ uint32_t rxd_flags) ++{ ++ ssize_t ret = 0; ++ struct rxd_x_entry *rx_entry; ++ struct dlist_entry *unexp_list, *rx_list; ++ ++ assert(iov_count <= RXD_IOV_LIMIT); ++ assert(!(rxd_flags & RXD_MULTI_RECV) || iov_count == 1); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.rx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.rx_cq->cirq)) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ rx_entry = rxd_rx_entry_init(rxd_ep, iov, iov_count, tag, ignore, context, ++ (rxd_ep->util_ep.caps & FI_DIRECTED_RECV && ++ addr != FI_ADDR_UNSPEC) ? ++ rxd_ep_av(rxd_ep)->fi_addr_table[addr] : ++ FI_ADDR_UNSPEC, op, rxd_flags); ++ if (!rx_entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ if (op == ofi_op_tagged) { ++ unexp_list = &rxd_ep->unexp_tag_list; ++ rx_list = &rxd_ep->rx_tag_list; ++ } else { ++ unexp_list = &rxd_ep->unexp_list; ++ rx_list = &rxd_ep->rx_list; ++ } ++ ++ if (!dlist_empty(unexp_list) && ++ rxd_ep_check_unexp_msg_list(rxd_ep, unexp_list, rx_list, rx_entry)) ++ goto out; ++ ++ dlist_insert_tail(&rx_entry->entry, rx_list); ++out: ++ fastlock_release(&rxd_ep->util_ep.rx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++static ssize_t rxd_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_recvmsg(ep, msg->msg_iov, msg->iov_count, ++ msg->addr, 0, ~0, msg->context, ofi_op_msg, ++ rxd_rx_flags(flags | ep->util_ep.rx_msg_flags)); ++} ++ ++static ssize_t rxd_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec msg_iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ msg_iov.iov_base = buf; ++ msg_iov.iov_len = len; ++ ++ return rxd_ep_generic_recvmsg(ep, &msg_iov, 1, src_addr, 0, ~0, context, ++ ofi_op_msg, rxd_ep_rx_flags(ep)); ++} ++ ++static ssize_t rxd_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_recvmsg(ep, iov, count, src_addr, ++ 0, ~0, context, ofi_op_msg, rxd_ep_rx_flags(ep)); ++} ++ ++ssize_t rxd_ep_generic_inject(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t data, uint32_t op, uint32_t rxd_flags) ++{ ++ struct rxd_x_entry *tx_entry; ++ ssize_t ret = -FI_EAGAIN; ++ fi_addr_t rxd_addr; ++ ++ assert(iov_count <= RXD_IOV_LIMIT); ++ assert(ofi_total_iov_len(iov, iov_count) <= ++ rxd_ep_domain(rxd_ep)->max_inline_msg); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, iov_count, NULL, 0, 0, data, ++ tag, NULL, rxd_addr, op, rxd_flags | RXD_INJECT); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, NULL, 0, NULL, 0, 0, 0); ++ if (ret) ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++ssize_t rxd_ep_generic_sendmsg(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t data, void *context, uint32_t op, ++ uint32_t rxd_flags) ++{ ++ struct rxd_x_entry *tx_entry; ++ ssize_t ret = -FI_EAGAIN; ++ fi_addr_t rxd_addr; ++ ++ assert(iov_count <= RXD_IOV_LIMIT); ++ ++ if (rxd_flags & RXD_INJECT) ++ return rxd_ep_generic_inject(rxd_ep, iov, iov_count, addr, tag, 0, ++ op, rxd_flags); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, iov_count, NULL, 0, 0, ++ data, tag, context, rxd_addr, op, rxd_flags); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, NULL, 0, NULL, 0, 0, 0); ++ if (ret) ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++static ssize_t rxd_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_sendmsg(ep, msg->msg_iov, msg->iov_count, ++ msg->addr, 0, msg->data, msg->context, ++ ofi_op_msg, rxd_tx_flags(flags | ++ ep->util_ep.tx_msg_flags)); ++ ++} ++ ++static ssize_t rxd_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_sendmsg(ep, iov, count, dest_addr, 0, ++ 0, context, ofi_op_msg, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_sendmsg(ep, &iov, 1, dest_addr, 0, ++ 0, context, ofi_op_msg, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_inject(ep, &iov, 1, dest_addr, 0, 0, ofi_op_msg, ++ RXD_NO_TX_COMP | RXD_INJECT); ++} ++ ++static ssize_t rxd_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_sendmsg(ep, &iov, 1, dest_addr, 0, data, context, ++ ofi_op_msg, rxd_ep_tx_flags(ep) | ++ RXD_REMOTE_CQ_DATA); ++} ++ ++static ssize_t rxd_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_inject(ep, &iov, 1, dest_addr, 0, data, ofi_op_msg, ++ RXD_NO_TX_COMP | RXD_INJECT | ++ RXD_REMOTE_CQ_DATA); ++} ++ ++struct fi_ops_msg rxd_ops_msg = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = rxd_ep_recv, ++ .recvv = rxd_ep_recvv, ++ .recvmsg = rxd_ep_recvmsg, ++ .send = rxd_ep_send, ++ .sendv = rxd_ep_sendv, ++ .sendmsg = rxd_ep_sendmsg, ++ .inject = rxd_ep_inject, ++ .senddata = rxd_ep_senddata, ++ .injectdata = rxd_ep_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_proto.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_proto.h +new file mode 100644 +index 0000000..dcaab88 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_proto.h +@@ -0,0 +1,178 @@ ++/* ++ * Copyright (c) 2015-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++#include ++ ++#ifndef _RXD_PROTO_H_ ++#define _RXD_PROTO_H_ ++ ++#define RXD_IOV_LIMIT 4 ++#define RXD_NAME_LENGTH 64 ++ ++enum rxd_pkt_type { ++ RXD_MSG = ofi_op_msg, ++ RXD_TAGGED = ofi_op_tagged, ++ RXD_READ_REQ = ofi_op_read_req, ++ RXD_WRITE = ofi_op_write, ++ RXD_ATOMIC = ofi_op_atomic, ++ RXD_ATOMIC_FETCH = ofi_op_atomic_fetch, ++ RXD_ATOMIC_COMPARE = ofi_op_atomic_compare, ++ RXD_RTS, ++ RXD_CTS, ++ RXD_ACK, ++ RXD_DATA, ++ RXD_DATA_READ, ++ RXD_NO_OP, ++}; ++ ++/* Base header: all packets must start with base_hdr ++ * - version: RXD version the app is using ++ * - type: type of message (see above definitions) ++ * - flags: any neccesary flags including hdr flags indicating which headers ++ * are included in the packet ++ * - peer: RX side peer address (exchanged during RTS-CTS process) ++ * - seq_no: sequence number (per peer) ++ */ ++struct rxd_base_hdr { ++ uint8_t version; ++ uint8_t type; ++ uint16_t flags; ++ uint32_t peer; ++ uint64_t seq_no; ++}; ++ ++/* ++ * Extended header: used for large transfers and ACKs ++ * - tx_id/rx_id: ++ * - for large messages: the tx/rx index for the messages ++ * - for ACKs: the tx/rx index which the ACK corresponds to ++ */ ++struct rxd_ext_hdr { ++ uint32_t tx_id; ++ uint32_t rx_id; ++ uint64_t seg_no; ++}; ++ ++/* ++ * Ready to send: initialize peer communication and exchange addressing info ++ * - rts_addr: local address for peer sending RTS ++ * - source: name of transmitting endpoint for peer to add to AV ++ */ ++struct rxd_rts_pkt { ++ struct rxd_base_hdr base_hdr; ++ uint64_t rts_addr; ++ uint8_t source[RXD_NAME_LENGTH]; ++}; ++ ++/* ++ * Clear to send: response to RTS request ++ * - rts_addr: peer address packet is responding to ++ * - cts_addr: local address for peer ++ */ ++struct rxd_cts_pkt { ++ struct rxd_base_hdr base_hdr; ++ uint64_t rts_addr; ++ uint64_t cts_addr; ++}; ++ ++/* ++ * ACK: to signal received packets and send tx/rx id info ++ */ ++struct rxd_ack_pkt { ++ struct rxd_base_hdr base_hdr; ++ struct rxd_ext_hdr ext_hdr; ++ //TODO fill in more fields? Selective ack? ++}; ++ ++/* ++ * Data: send larger block of data using known tx/rx ids for matching ++ */ ++struct rxd_data_pkt { ++ struct rxd_base_hdr base_hdr; ++ struct rxd_ext_hdr ext_hdr; ++ ++ char msg[]; ++}; ++ ++/* ++ * The below five headers are used for op pkts and can be used in combination. ++ * The presence of each header is determined by either op type or flags (in base_hr). ++ * The op header order is as follows: ++ * base_hdr (present for all packets) ++ * ++ * sar_hdr: for all messages requiring more than one packet ++ * - lack of the sar_hdr is signaled by base_hdr->flags & RXD_INLINE ++ * tag_hdr: for all tagged messages ++ * - signaled by base_hdr->flags & RXD_TAG_HDR ++ * data_hdr: for messages carrying remote CQ data ++ * - signaled by base_hdr->flags & RXD_REMOTE_CQ_DATA ++ * rma_hdr: for FI_RMA and FI_ATOMIC operations ++ * - signaled by base_hdr->type = RXD_READ_REQ, RXD_WRITE, RXD_ATOMIC, ++ * RXD_ATOMIC_FETCH, and RXD_ATOMIC_COMPARE ++ * atom_hdr: for FI_ATOMIC operations ++ * - signaled by base_hdr->type = RXD_ATOMIC, RXD_ATOMIC_FETCH, ++ * RXD_ATOMIC_COMPARE ++ * ++ * Any data in the packet following these headers is part of the incoming packet message ++ */ ++ ++struct rxd_sar_hdr { ++ uint64_t size; ++ uint64_t num_segs; ++ uint32_t tx_id; ++ uint8_t iov_count; ++ uint8_t resv[3]; ++}; ++ ++struct rxd_tag_hdr { ++ uint64_t tag; ++}; ++ ++struct rxd_data_hdr { ++ uint64_t cq_data; ++}; ++ ++struct rxd_rma_hdr { ++ struct ofi_rma_iov rma[RXD_IOV_LIMIT]; ++}; ++ ++struct rxd_atom_hdr { ++ uint32_t datatype; ++ uint32_t atomic_op; ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_rma.c +index ce4c5b4..b243b4b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_rma.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -33,309 +33,279 @@ + #include + #include + #include ++#include + #include "rxd.h" + +-ssize_t rxd_ep_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, +- uint64_t flags) ++static ssize_t rxd_generic_write_inject(struct rxd_ep *rxd_ep, ++ const struct iovec *iov, size_t iov_count, ++ const struct fi_rma_iov *rma_iov, size_t rma_count, ++ fi_addr_t addr, void *context, uint32_t op, uint64_t data, ++ uint32_t rxd_flags) + { +- struct rxd_ep *rxd_ep; +- struct rxd_peer *peer; +- struct rxd_tx_entry *tx_entry; +- uint64_t peer_addr; +- ssize_t ret; +- +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid); +- +- peer_addr = rxd_av_dg_addr(rxd_ep_av(rxd_ep), msg->addr); +- peer = rxd_ep_getpeer_info(rxd_ep, peer_addr); +- +- fastlock_acquire(&rxd_ep->lock); +- if (peer->state != CMAP_CONNECTED) { +- ret = rxd_ep_connect(rxd_ep, peer, peer_addr); +- fastlock_release(&rxd_ep->lock); +- if (ret == -FI_EALREADY) { +- rxd_ep->util_ep.progress(&rxd_ep->util_ep); +- ret = -FI_EAGAIN; +- } +- return ret ? ret : -FI_EAGAIN; ++ struct rxd_x_entry *tx_entry; ++ fi_addr_t rxd_addr; ++ ssize_t ret = -FI_EAGAIN; ++ ++ assert(iov_count <= RXD_IOV_LIMIT && rma_count <= RXD_IOV_LIMIT); ++ assert(ofi_total_iov_len(iov, iov_count) <= rxd_ep_domain(rxd_ep)->max_inline_rma); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, iov_count, NULL, 0, rma_count, data, ++ 0, context, rxd_addr, op, rxd_flags); ++ if (!tx_entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, rma_iov, rma_count, NULL, 0, 0, 0); ++ if (ret) { ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ goto out; + } + +- tx_entry = rxd_tx_entry_alloc(rxd_ep, peer, peer_addr, flags, +- RXD_TX_READ_REQ); ++ if (tx_entry->op == RXD_READ_REQ) ++ goto out; ++ ++ ret = 0; ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++ssize_t rxd_generic_rma(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, const struct fi_rma_iov *rma_iov, size_t rma_count, ++ void **desc, fi_addr_t addr, void *context, uint32_t op, uint64_t data, ++ uint32_t rxd_flags) ++{ ++ struct rxd_x_entry *tx_entry; ++ fi_addr_t rxd_addr; ++ ssize_t ret = -FI_EAGAIN; ++ ++ if (rxd_flags & RXD_INJECT) ++ return rxd_generic_write_inject(rxd_ep, iov, iov_count, rma_iov, ++ rma_count, addr, context, op, ++ data, rxd_flags); ++ ++ assert(iov_count <= RXD_IOV_LIMIT && rma_count <= RXD_IOV_LIMIT); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, iov_count, NULL, 0, rma_count, ++ data, 0, context, rxd_addr, op, rxd_flags); + if (!tx_entry) { + ret = -FI_EAGAIN; + goto out; + } + +- tx_entry->read_req.msg = *msg; +- memcpy(&tx_entry->read_req.dst_iov[0], msg->msg_iov, +- sizeof(*msg->msg_iov)* msg->iov_count); +- memcpy(&tx_entry->read_req.src_iov[0], msg->rma_iov, +- sizeof(*msg->rma_iov) * msg->rma_iov_count); +- ret = rxd_ep_start_xfer(rxd_ep, peer, ofi_op_read_req, tx_entry); ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, rma_iov, rma_count, NULL, 0, 0, 0); + if (ret) + rxd_tx_entry_free(rxd_ep, tx_entry); + + out: +- fastlock_release(&rxd_ep->lock); ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); + return ret; + } + +-static ssize_t rxd_ep_read(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, uint64_t addr, +- uint64_t key, void *context) ++ssize_t rxd_read(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) + { +- struct fi_msg_rma msg; ++ struct rxd_ep *ep; + struct iovec msg_iov; + struct fi_rma_iov rma_iov; + +- memset(&msg, 0, sizeof(msg)); ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ + msg_iov.iov_base = (void *) buf; + msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- + rma_iov.addr = addr; +- rma_iov.key = key; + rma_iov.len = len; +- msg.rma_iov_count = 1; +- msg.rma_iov = &rma_iov; +- +- msg.addr = src_addr; +- msg.context = context; ++ rma_iov.key = key; + +- return rxd_ep_readmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, &msg_iov, 1, &rma_iov, 1, &desc, ++ src_addr, context, ofi_op_read_req, 0, ++ rxd_ep_tx_flags(ep)); + } + +-static ssize_t rxd_ep_readv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, +- fi_addr_t src_addr, uint64_t addr, uint64_t key, +- void *context) ++ssize_t rxd_readv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context) + { +- size_t len, i; +- struct fi_msg_rma msg; ++ struct rxd_ep *ep; + struct fi_rma_iov rma_iov; + +- assert(count <= RXD_IOV_LIMIT); +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.rma_iov_count = 1; ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + + rma_iov.addr = addr; ++ rma_iov.len = ofi_total_iov_len(iov, count); + rma_iov.key = key; + +- for (i = 0, len = 0; i < count; i++) +- len += iov[i].iov_len; +- rma_iov.len = len; +- +- msg.rma_iov = &rma_iov; +- msg.addr = src_addr; +- msg.context = context; +- +- return rxd_ep_readmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, iov, count, &rma_iov, 1, desc, ++ src_addr, context, ofi_op_read_req, 0, ++ rxd_ep_tx_flags(ep)); + } + +-ssize_t rxd_ep_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, +- uint64_t flags) ++ssize_t rxd_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) + { +- struct rxd_ep *rxd_ep; +- struct rxd_peer *peer; +- struct rxd_tx_entry *tx_entry; +- uint64_t peer_addr; +- ssize_t ret; +- +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid); +- peer_addr = rxd_av_dg_addr(rxd_ep_av(rxd_ep), msg->addr); +- peer = rxd_ep_getpeer_info(rxd_ep, peer_addr); +- +- fastlock_acquire(&rxd_ep->lock); +- if (peer->state != CMAP_CONNECTED) { +- ret = rxd_ep_connect(rxd_ep, peer, peer_addr); +- fastlock_release(&rxd_ep->lock); +- if (ret == -FI_EALREADY) { +- rxd_ep->util_ep.progress(&rxd_ep->util_ep); +- ret = -FI_EAGAIN; +- } +- return ret ? ret : -FI_EAGAIN; +- } +- +- tx_entry = rxd_tx_entry_alloc(rxd_ep, peer, peer_addr, flags, +- RXD_TX_WRITE); +- if (!tx_entry) { +- ret = -FI_EAGAIN; +- goto out; +- } ++ struct rxd_ep *ep; + +- tx_entry->write.msg = *msg; +- memcpy(&tx_entry->write.src_iov[0], msg->msg_iov, +- sizeof(*msg->msg_iov) * msg->iov_count); +- memcpy(&tx_entry->write.dst_iov[0], msg->rma_iov, +- sizeof(*msg->rma_iov) * msg->rma_iov_count); +- ret = rxd_ep_start_xfer(rxd_ep, peer, ofi_op_write, tx_entry); +- if (ret) +- rxd_tx_entry_free(rxd_ep, tx_entry); ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + +-out: +- fastlock_release(&rxd_ep->lock); +- return ret; ++ return rxd_generic_rma(ep, msg->msg_iov, msg->iov_count, ++ msg->rma_iov, msg->rma_iov_count, ++ msg->desc, msg->addr, msg->context, ++ ofi_op_read_req, msg->data, rxd_tx_flags(flags | ++ ep->util_ep.tx_msg_flags)); + } + +-static ssize_t rxd_ep_write(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) ++ssize_t rxd_write(struct fid_ep *ep_fid, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) + { +- struct fi_msg_rma msg; ++ struct rxd_ep *ep; + struct iovec msg_iov; + struct fi_rma_iov rma_iov; + +- memset(&msg, 0, sizeof(msg)); ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ + msg_iov.iov_base = (void *) buf; + msg_iov.iov_len = len; +- +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- + rma_iov.addr = addr; +- rma_iov.key = key; + rma_iov.len = len; ++ rma_iov.key = key; + +- msg.rma_iov_count = 1; +- msg.rma_iov = &rma_iov; +- +- msg.addr = dest_addr; +- msg.context = context; +- +- return rxd_ep_writemsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, &msg_iov, 1, &rma_iov, 1, &desc, ++ dest_addr, context, ofi_op_write, 0, ++ rxd_ep_tx_flags(ep)); + } + +-static ssize_t rxd_ep_writev(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) ++ssize_t rxd_writev(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) + { +- size_t i; +- size_t len; +- struct fi_msg_rma msg; ++ struct rxd_ep *ep; + struct fi_rma_iov rma_iov; + +- assert(count <= RXD_IOV_LIMIT); +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.rma_iov_count = 1; +- +- for (i = 0, len = 0; i < count; i++) +- len += iov[i].iov_len; ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + + rma_iov.addr = addr; ++ rma_iov.len = ofi_total_iov_len(iov, count); + rma_iov.key = key; +- rma_iov.len = len; + +- msg.rma_iov = &rma_iov; +- msg.context = context; +- msg.addr = dest_addr; ++ return rxd_generic_rma(ep, iov, count, &rma_iov, 1, desc, ++ dest_addr, context, ofi_op_write, 0, ++ rxd_ep_tx_flags(ep)); ++} ++ ++ ++ssize_t rxd_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + +- return rxd_ep_writemsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, msg->msg_iov, msg->iov_count, ++ msg->rma_iov, msg->rma_iov_count, ++ msg->desc, msg->addr, msg->context, ++ ofi_op_write, msg->data, rxd_tx_flags(flags | ++ ep->util_ep.tx_msg_flags)); + } + +-static ssize_t rxd_ep_writedata(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t addr, +- uint64_t key, void *context) ++ssize_t rxd_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) + { +- struct fi_msg_rma msg; +- struct iovec msg_iov; ++ struct rxd_ep *ep; ++ struct iovec iov; + struct fi_rma_iov rma_iov; + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.rma_iov_count = 1; ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; + rma_iov.addr = addr; ++ rma_iov.len = len; + rma_iov.key = key; +- rma_iov.len = len; +- +- msg.rma_iov = &rma_iov; +- msg.msg_iov = &msg_iov; +- +- msg.addr = dest_addr; +- msg.context = context; +- msg.data = data; + +- return rxd_ep_writemsg(ep, &msg, FI_REMOTE_CQ_DATA | +- RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, &iov, 1, &rma_iov, 1, &desc, ++ dest_addr, context, ofi_op_write, data, ++ rxd_ep_tx_flags(ep) | RXD_REMOTE_CQ_DATA); + } + +-static ssize_t rxd_ep_inject(struct fid_ep *ep, const void *buf, +- size_t len, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) ++ssize_t rxd_inject_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, fi_addr_t dest_addr, uint64_t addr, uint64_t key) + { +- struct fi_msg_rma msg; +- struct iovec msg_iov; ++ struct rxd_ep *rxd_ep; ++ struct iovec iov; + struct fi_rma_iov rma_iov; + +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.rma_iov_count = 1; ++ rxd_ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; + rma_iov.addr = addr; +- rma_iov.key = key; + rma_iov.len = len; ++ rma_iov.key = key; + +- msg.rma_iov = &rma_iov; +- msg.msg_iov = &msg_iov; +- msg.addr = dest_addr; +- +- return rxd_ep_writemsg(ep, &msg, FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ return rxd_generic_write_inject(rxd_ep, &iov, 1, &rma_iov, 1, ++ dest_addr, NULL, ofi_op_write, 0, ++ RXD_NO_TX_COMP | RXD_INJECT); + } + +-static ssize_t rxd_ep_injectdata(struct fid_ep *ep, const void *buf, +- size_t len, uint64_t data, +- fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) ++ssize_t rxd_inject_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) + { +- struct fi_msg_rma msg; +- struct iovec msg_iov; ++ struct rxd_ep *rxd_ep; ++ struct iovec iov; + struct fi_rma_iov rma_iov; + +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.rma_iov_count = 1; ++ rxd_ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; + rma_iov.addr = addr; +- rma_iov.key = key; + rma_iov.len = len; ++ rma_iov.key = key; + +- msg.rma_iov = &rma_iov; +- msg.msg_iov = &msg_iov; +- msg.addr = dest_addr; +- msg.data = data; +- return rxd_ep_writemsg(ep, &msg, FI_INJECT | FI_REMOTE_CQ_DATA | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ return rxd_generic_write_inject(rxd_ep, &iov, 1, &rma_iov, 1, ++ dest_addr, NULL, ofi_op_write, ++ data, RXD_NO_TX_COMP | RXD_INJECT | ++ RXD_REMOTE_CQ_DATA); + } + + struct fi_ops_rma rxd_ops_rma = { +- .size = sizeof (struct fi_ops_rma), +- .read = rxd_ep_read, +- .readv = rxd_ep_readv, +- .readmsg = rxd_ep_readmsg, +- .write = rxd_ep_write, +- .writev = rxd_ep_writev, +- .writemsg = rxd_ep_writemsg, +- .inject = rxd_ep_inject, +- .writedata = rxd_ep_writedata, +- .injectdata = rxd_ep_injectdata, ++ .size = sizeof(struct fi_ops_rma), ++ .read = rxd_read, ++ .readv = rxd_readv, ++ .readmsg = rxd_readmsg, ++ .write = rxd_write, ++ .writev = rxd_writev, ++ .writemsg = rxd_writemsg, ++ .inject = rxd_inject_write, ++ .writedata = rxd_writedata, ++ .injectdata = rxd_inject_writedata, ++ + }; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_tagged.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_tagged.c +new file mode 100644 +index 0000000..7309b3d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_tagged.c +@@ -0,0 +1,183 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include "rxd.h" ++ ++ssize_t rxd_ep_trecv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec msg_iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ msg_iov.iov_base = (void *) buf; ++ msg_iov.iov_len = len; ++ ++ return rxd_ep_generic_recvmsg(ep, &msg_iov, 1, src_addr, tag, ignore, ++ context, ofi_op_tagged, ++ rxd_ep_tx_flags(ep) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_trecvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, ++ void *context) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_recvmsg(ep, iov, count, src_addr, tag, ignore, ++ context, ofi_op_tagged, ++ rxd_ep_tx_flags(ep) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_trecvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_recvmsg(ep, msg->msg_iov, msg->iov_count, msg->addr, ++ msg->tag, msg->ignore, msg->context, ++ ofi_op_tagged, rxd_rx_flags(flags | ++ ep->util_ep.rx_msg_flags) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec msg_iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ msg_iov.iov_base = (void *) buf; ++ msg_iov.iov_len = len; ++ ++ return rxd_ep_generic_sendmsg(ep, &msg_iov, 1, dest_addr, tag, ++ 0, context, ofi_op_tagged, ++ rxd_ep_tx_flags(ep) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tsendv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, uint64_t tag, ++ void *context) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_sendmsg(ep, iov, count, dest_addr, tag, ++ 0, context, ofi_op_tagged, ++ rxd_ep_tx_flags(ep) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tsendmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_sendmsg(ep, msg->msg_iov, msg->iov_count, ++ msg->addr, msg->tag, msg->data, msg->context, ++ ofi_op_tagged, rxd_tx_flags(flags | ++ ep->util_ep.tx_msg_flags) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tinject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_inject(ep, &iov, 1, dest_addr, tag, 0, ++ ofi_op_tagged, RXD_NO_TX_COMP | RXD_INJECT | ++ RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_sendmsg(ep, &iov, 1, dest_addr, tag, data, context, ++ ofi_op_tagged, rxd_ep_tx_flags(ep) | ++ RXD_REMOTE_CQ_DATA | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tinjectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_inject(ep, &iov, 1, dest_addr, tag, data, ofi_op_tagged, ++ RXD_NO_TX_COMP | RXD_INJECT | ++ RXD_REMOTE_CQ_DATA | RXD_TAG_HDR); ++} ++ ++struct fi_ops_tagged rxd_ops_tagged = { ++ .size = sizeof(struct fi_ops_tagged), ++ .recv = rxd_ep_trecv, ++ .recvv = rxd_ep_trecvv, ++ .recvmsg = rxd_ep_trecvmsg, ++ .send = rxd_ep_tsend, ++ .sendv = rxd_ep_tsendv, ++ .sendmsg = rxd_ep_tsendmsg, ++ .inject = rxd_ep_tinject, ++ .senddata = rxd_ep_tsenddata, ++ .injectdata = rxd_ep_tinjectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/Makefile.include +index 8c77734..36703e8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/Makefile.include +@@ -7,7 +7,9 @@ _rxm_files = \ + prov/rxm/src/rxm_conn.c \ + prov/rxm/src/rxm_ep.c \ + prov/rxm/src/rxm_cq.c \ ++ prov/rxm/src/rxm_av.c \ + prov/rxm/src/rxm_rma.c \ ++ prov/rxm/src/rxm_atomic.c \ + prov/rxm/src/rxm.h + + if HAVE_RXM_DL +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm.h +index 250ed93..6c6e008 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm.h +@@ -1,3 +1,4 @@ ++ + /* + * Copyright (c) 2016 Intel Corporation, Inc. All rights reserved. + * +@@ -60,7 +61,16 @@ + #define RXM_MAJOR_VERSION 1 + #define RXM_MINOR_VERSION 0 + +-#define RXM_BUF_SIZE 16384 ++#define RXM_OP_VERSION 3 ++#define RXM_CTRL_VERSION 3 ++ ++#define RXM_BUF_SIZE 16384 ++extern size_t rxm_eager_limit; ++ ++#define RXM_SAR_LIMIT 131072 ++#define RXM_SAR_TX_ERROR UINT64_MAX ++#define RXM_SAR_RX_INIT UINT64_MAX ++ + #define RXM_IOV_LIMIT 4 + + #define RXM_MR_MODES (OFI_MR_BASIC_MAP | FI_MR_LOCAL) +@@ -71,15 +81,15 @@ + info->domain_attr->mr_mode & FI_MR_PROV_KEY) + + #define RXM_LOG_STATE(subsystem, pkt, prev_state, next_state) \ +- FI_DBG(&rxm_prov, subsystem, "[LMT] msg_id: 0x%" PRIx64 " %s -> %s\n", \ ++ FI_DBG(&rxm_prov, subsystem, "[RNDV] msg_id: 0x%" PRIx64 " %s -> %s\n", \ + pkt.ctrl_hdr.msg_id, rxm_proto_state_str[prev_state], \ + rxm_proto_state_str[next_state]) + +-#define RXM_LOG_STATE_TX(subsystem, tx_entry, next_state) \ +- RXM_LOG_STATE(subsystem, tx_entry->tx_buf->pkt, tx_entry->state,\ ++#define RXM_LOG_STATE_TX(subsystem, tx_buf, next_state) \ ++ RXM_LOG_STATE(subsystem, tx_buf->pkt, tx_buf->hdr.state, \ + next_state) + +-#define RXM_LOG_STATE_RX(subsystem, rx_buf, next_state) \ ++#define RXM_LOG_STATE_RX(subsystem, rx_buf, next_state) \ + RXM_LOG_STATE(subsystem, rx_buf->pkt, rx_buf->hdr.state, \ + next_state) + +@@ -88,10 +98,9 @@ + " (fi_addr: 0x%" PRIx64 " tag: 0x%" PRIx64 ")\n",\ + addr, tag) + +-#define RXM_GET_PROTO_STATE(comp) \ +- (*(enum rxm_proto_state *) \ +- ((unsigned char *)(comp)->op_context + \ +- offsetof(struct rxm_buf, state))) ++#define RXM_GET_PROTO_STATE(context) \ ++ (*(enum rxm_proto_state *) \ ++ ((unsigned char *)context + offsetof(struct rxm_buf, state))) + + #define RXM_SET_PROTO_STATE(comp, new_state) \ + do { \ +@@ -100,45 +109,211 @@ do { \ + offsetof(struct rxm_buf, state))) = (new_state); \ + } while (0) + ++#define rxm_tx_buf_2_msg_id(rxm_ep, pool_type, tx_buf) \ ++ ((uint64_t) rxm_get_buf_index(&(rxm_ep)->buf_pools[pool_type], \ ++ (void *) tx_buf)) ++#define rxm_msg_id_2_tx_buf(rxm_ep, pool_type, msg_id) \ ++ ((void *) rxm_buf_get_by_index(&(rxm_ep)->buf_pools[pool_type], \ ++ (uint64_t) msg_id)) ++ ++#define RXM_Q_STRERROR(prov, log, q, q_str, entry, strerror) \ ++ FI_WARN(prov, log, "fi_" q_str "_readerr: err: %d, prov_err: %s (%d)\n", \ ++ (entry).err,strerror((q), (entry).prov_errno, (entry).err_data, NULL, 0), \ ++ (entry).prov_errno) ++ ++#define RXM_CQ_READERR(prov, log, cq, ret, err_entry) \ ++ do { \ ++ (ret) = fi_cq_readerr((cq), &(err_entry), 0); \ ++ if ((ret) < 0) { \ ++ FI_WARN(prov, log, \ ++ "Unable to fi_cq_readerr: %zd\n", ret); \ ++ } else { \ ++ RXM_Q_STRERROR(prov, log, cq, "cq", \ ++ err_entry, fi_cq_strerror); \ ++ } \ ++ } while (0) ++ ++#define RXM_EQ_READERR(prov, log, eq, ret, err_entry) \ ++ do { \ ++ (ret) = fi_eq_readerr((eq), &(err_entry), 0); \ ++ if ((ret) != sizeof(err_entry)) { \ ++ FI_WARN(prov, log, \ ++ "Unable to fi_eq_readerr: %zd\n", ret); \ ++ } else { \ ++ RXM_Q_STRERROR(prov, log, eq, "eq", \ ++ err_entry, fi_eq_strerror); \ ++ } \ ++ } while (0) ++ + extern struct fi_provider rxm_prov; + extern struct util_prov rxm_util_prov; + extern struct fi_ops_rma rxm_ops_rma; +-extern int rxm_defer_requests; ++extern struct fi_ops_atomic rxm_ops_atomic; + + extern size_t rxm_msg_tx_size; + extern size_t rxm_msg_rx_size; + extern size_t rxm_def_univ_size; + ++/* ++ * Connection Map ++ */ ++ ++#define RXM_CMAP_IDX_BITS OFI_IDX_INDEX_BITS ++ ++enum rxm_cmap_signal { ++ RXM_CMAP_FREE, ++ RXM_CMAP_EXIT, ++}; ++ ++enum rxm_cmap_state { ++ RXM_CMAP_IDLE, ++ RXM_CMAP_CONNREQ_SENT, ++ RXM_CMAP_CONNREQ_RECV, ++ RXM_CMAP_ACCEPT, ++ RXM_CMAP_CONNECTED_NOTIFY, ++ RXM_CMAP_CONNECTED, ++ RXM_CMAP_SHUTDOWN, ++}; ++ ++enum rxm_cmap_reject_flag { ++ RXM_CMAP_REJECT_GENUINE, ++ RXM_CMAP_REJECT_SIMULT_CONN, ++}; ++ ++struct rxm_cmap_handle { ++ struct rxm_cmap *cmap; ++ enum rxm_cmap_state state; ++ /* Unique identifier for a connection. Can be exchanged with a peer ++ * during connection setup and can later be used in a message header ++ * to identify the source of the message (Used for FI_SOURCE, RNDV ++ * protocol, etc.) */ ++ uint64_t key; ++ uint64_t remote_key; ++ fi_addr_t fi_addr; ++ struct rxm_cmap_peer *peer; ++}; ++ ++struct rxm_cmap_peer { ++ struct rxm_cmap_handle *handle; ++ struct dlist_entry entry; ++ uint8_t addr[]; ++}; ++ ++struct rxm_cmap_attr { ++ void *name; ++ /* user guarantee for serializing access to cmap objects */ ++ uint8_t serial_access; ++}; ++ ++struct rxm_cmap { ++ struct util_ep *ep; ++ struct util_av *av; ++ ++ /* cmap handles that correspond to addresses in AV */ ++ struct rxm_cmap_handle **handles_av; ++ size_t num_allocated; ++ ++ /* Store all cmap handles (inclusive of handles_av) in an indexer. ++ * This allows reverse lookup of the handle using the index. */ ++ struct indexer handles_idx; ++ ++ struct ofi_key_idx key_idx; ++ ++ struct dlist_entry peer_list; ++ struct rxm_cmap_attr attr; ++ pthread_t cm_thread; ++ ofi_fastlock_acquire_t acquire; ++ ofi_fastlock_release_t release; ++ fastlock_t lock; ++}; ++ ++struct rxm_ep; ++ ++struct rxm_cmap_handle *rxm_cmap_key2handle(struct rxm_cmap *cmap, uint64_t key); ++int rxm_cmap_get_handle(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ struct rxm_cmap_handle **handle); ++int rxm_cmap_update(struct rxm_cmap *cmap, const void *addr, fi_addr_t fi_addr); ++ ++void rxm_cmap_process_conn_notify(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle); ++void rxm_cmap_process_connect(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle, ++ uint64_t *remote_key); ++void rxm_cmap_process_reject(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle, ++ enum rxm_cmap_reject_flag cm_reject_flag); ++int rxm_cmap_process_connreq(struct rxm_cmap *cmap, void *addr, ++ struct rxm_cmap_handle **handle_ret, ++ enum rxm_cmap_reject_flag *cm_reject_flag); ++void rxm_cmap_process_shutdown(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle); ++int rxm_cmap_handle_unconnected(struct rxm_ep *rxm_ep, struct rxm_cmap_handle *handle, ++ fi_addr_t dest_addr); ++void rxm_cmap_del_handle_ts(struct rxm_cmap_handle *handle); ++void rxm_cmap_free(struct rxm_cmap *cmap); ++int rxm_cmap_alloc(struct rxm_ep *rxm_ep, struct rxm_cmap_attr *attr); ++/* Caller must hold cmap->lock */ ++int rxm_cmap_move_handle_to_peer_list(struct rxm_cmap *cmap, int index); ++ ++static inline struct rxm_cmap_handle * ++rxm_cmap_acquire_handle(struct rxm_cmap *cmap, fi_addr_t fi_addr) ++{ ++ assert(fi_addr < cmap->num_allocated); ++ return cmap->handles_av[fi_addr]; ++} ++ + struct rxm_fabric { + struct util_fabric util_fabric; + struct fid_fabric *msg_fabric; + }; + +-struct rxm_conn { +- struct fid_ep *msg_ep; +- struct dlist_entry postponed_tx_list; +- struct util_cmap_handle handle; +-}; +- + struct rxm_domain { + struct util_domain util_domain; + struct fid_domain *msg_domain; ++ size_t max_atomic_size; + uint8_t mr_local; + }; + ++int rxm_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context); ++ + struct rxm_mr { + struct fid_mr mr_fid; + struct fid_mr *msg_mr; ++ struct rxm_domain *domain; ++}; ++ ++struct rxm_ep_wire_proto { ++ uint8_t ctrl_version; ++ uint8_t op_version; ++ uint8_t endianness; ++ uint8_t padding[5]; ++ uint64_t eager_size; + }; + + struct rxm_cm_data { + struct sockaddr name; + uint64_t conn_id; ++ struct rxm_ep_wire_proto proto; + }; + +-struct rxm_rma_iov { ++struct rxm_rndv_hdr { ++ struct ofi_rma_iov iov[RXM_IOV_LIMIT]; + uint8_t count; +- struct ofi_rma_iov iov[]; ++}; ++ ++#define rxm_pkt_rndv_data(rxm_pkt) \ ++ ((rxm_pkt)->data + sizeof(struct rxm_rndv_hdr)) ++ ++struct rxm_atomic_hdr { ++ struct fi_rma_ioc rma_ioc[RXM_IOV_LIMIT]; ++ char data[]; ++}; ++ ++struct rxm_atomic_resp_hdr { ++ int32_t status; ++ uint32_t result_len; ++ char data[]; + }; + + /* +@@ -160,17 +335,20 @@ struct rxm_rma_iov { + */ + + /* RXM protocol states / tx/rx context */ +-#define RXM_PROTO_STATES(FUNC) \ +- FUNC(RXM_TX_NOBUF), \ +- FUNC(RXM_TX), \ +- FUNC(RXM_TX_RMA), \ +- FUNC(RXM_RX), \ +- FUNC(RXM_LMT_TX), \ +- FUNC(RXM_LMT_ACK_WAIT), \ +- FUNC(RXM_LMT_READ), \ +- FUNC(RXM_LMT_ACK_SENT), \ +- FUNC(RXM_LMT_ACK_RECVD),\ +- FUNC(RXM_LMT_FINISH), ++#define RXM_PROTO_STATES(FUNC) \ ++ FUNC(RXM_TX), \ ++ FUNC(RXM_INJECT_TX), \ ++ FUNC(RXM_RMA), \ ++ FUNC(RXM_RX), \ ++ FUNC(RXM_SAR_TX), \ ++ FUNC(RXM_RNDV_TX), \ ++ FUNC(RXM_RNDV_ACK_WAIT), \ ++ FUNC(RXM_RNDV_READ), \ ++ FUNC(RXM_RNDV_ACK_SENT), \ ++ FUNC(RXM_RNDV_ACK_RECVD), \ ++ FUNC(RXM_RNDV_FINISH), \ ++ FUNC(RXM_ATOMIC_RESP_WAIT), \ ++ FUNC(RXM_ATOMIC_RESP_SENT) + + enum rxm_proto_state { + RXM_PROTO_STATES(OFI_ENUM_VAL) +@@ -184,6 +362,30 @@ struct rxm_pkt { + char data[]; + }; + ++union rxm_sar_ctrl_data { ++ struct { ++ enum rxm_sar_seg_type { ++ RXM_SAR_SEG_FIRST = 1, ++ RXM_SAR_SEG_MIDDLE = 2, ++ RXM_SAR_SEG_LAST = 3, ++ } seg_type : 2; ++ uint32_t offset; ++ }; ++ uint64_t align; ++}; ++ ++static inline enum rxm_sar_seg_type ++rxm_sar_get_seg_type(struct ofi_ctrl_hdr *ctrl_hdr) ++{ ++ return ((union rxm_sar_ctrl_data *)&(ctrl_hdr->ctrl_data))->seg_type; ++} ++ ++static inline void ++rxm_sar_set_seg_type(struct ofi_ctrl_hdr *ctrl_hdr, enum rxm_sar_seg_type seg_type) ++{ ++ ((union rxm_sar_ctrl_data *)&(ctrl_hdr->ctrl_data))->seg_type = seg_type; ++} ++ + struct rxm_recv_match_attr { + fi_addr_t addr; + uint64_t tag; +@@ -202,20 +404,17 @@ struct rxm_iov { + uint8_t count; + }; + +-struct rxm_rma_iov_storage { +- struct fi_rma_iov iov[RXM_IOV_LIMIT]; +- uint8_t count; +-}; +- + enum rxm_buf_pool_type { + RXM_BUF_POOL_RX = 0, + RXM_BUF_POOL_START = RXM_BUF_POOL_RX, +- RXM_BUF_POOL_TX_MSG, +- RXM_BUF_POOL_TX_START = RXM_BUF_POOL_TX_MSG, +- RXM_BUF_POOL_TX_TAGGED, ++ RXM_BUF_POOL_TX, ++ RXM_BUF_POOL_TX_START = RXM_BUF_POOL_TX, ++ RXM_BUF_POOL_TX_INJECT, + RXM_BUF_POOL_TX_ACK, +- RXM_BUF_POOL_TX_LMT, +- RXM_BUF_POOL_TX_END = RXM_BUF_POOL_TX_LMT, ++ RXM_BUF_POOL_TX_RNDV, ++ RXM_BUF_POOL_TX_ATOMIC, ++ RXM_BUF_POOL_TX_SAR, ++ RXM_BUF_POOL_TX_END = RXM_BUF_POOL_TX_SAR, + RXM_BUF_POOL_RMA, + RXM_BUF_POOL_MAX, + }; +@@ -226,82 +425,155 @@ struct rxm_buf { + + enum rxm_proto_state state; + +- struct dlist_entry entry; + void *desc; +- /* MSG EP / shared context to which bufs would be posted to */ +- struct fid_ep *msg_ep; + }; + + struct rxm_rx_buf { + /* Must stay at top */ + struct rxm_buf hdr; +- struct dlist_entry entry; + + struct rxm_ep *ep; ++ /* MSG EP / shared context to which bufs would be posted to */ ++ struct fid_ep *msg_ep; + struct dlist_entry repost_entry; + struct rxm_conn *conn; +- struct rxm_recv_queue *recv_queue; + struct rxm_recv_entry *recv_entry; + struct rxm_unexp_msg unexp_msg; + uint64_t comp_flags; ++ struct fi_recv_context recv_context; ++ // TODO remove this and modify unexp msg handling path to not repost ++ // rx_buf + uint8_t repost; + + /* Used for large messages */ +- struct rxm_iov match_iov[RXM_IOV_LIMIT]; +- struct rxm_rma_iov *rma_iov; +- size_t index; ++ struct rxm_rndv_hdr *rndv_hdr; ++ size_t rndv_rma_index; + struct fid_mr *mr[RXM_IOV_LIMIT]; + + /* Must stay at bottom */ + struct rxm_pkt pkt; + }; + +-struct rxm_tx_buf { ++struct rxm_tx_base_buf { + /* Must stay at top */ + struct rxm_buf hdr; + +- enum rxm_buf_pool_type type; ++ /* Must stay at bottom */ ++ struct rxm_pkt pkt; ++}; ++ ++struct rxm_tx_eager_buf { ++ /* Must stay at top */ ++ struct rxm_buf hdr; ++ ++ void *app_context; ++ uint64_t flags; + + /* Must stay at bottom */ + struct rxm_pkt pkt; + }; + +-struct rxm_rma_buf { ++struct rxm_tx_sar_buf { + /* Must stay at top */ + struct rxm_buf hdr; + +- struct fi_msg_rma msg; +- struct rxm_iov rxm_iov; +- struct rxm_rma_iov_storage rxm_rma_iov; ++ void *app_context; ++ uint64_t flags; + + /* Must stay at bottom */ + struct rxm_pkt pkt; + }; + +-struct rxm_tx_entry { ++struct rxm_tx_rndv_buf { + /* Must stay at top */ +- union { +- struct fi_context fi_context; +- struct dlist_entry postponed_entry; ++ struct rxm_buf hdr; ++ ++ void *app_context; ++ uint64_t flags; ++ struct rxm_rx_buf *rx_buf; ++ struct fid_mr *mr[RXM_IOV_LIMIT]; ++ uint8_t count; ++ ++ /* Must stay at bottom */ ++ struct rxm_pkt pkt; ++}; ++ ++struct rxm_rma_buf { ++ /* Must stay at top */ ++ struct rxm_buf hdr; ++ ++ void *app_context; ++ uint64_t flags; ++ ++ /* Must stay at bottom */ ++ union { ++ struct rxm_pkt pkt; ++ struct { ++ struct fid_mr *mr[RXM_IOV_LIMIT]; ++ uint8_t count; ++ } mr; + }; ++}; + +- enum rxm_proto_state state; ++struct rxm_tx_atomic_buf { ++ /* Must stay at top */ ++ struct rxm_buf hdr; + +- struct rxm_ep *ep; +- uint8_t count; +- void *context; ++ void *app_context; + uint64_t flags; +- uint64_t comp_flags; ++ struct iovec result_iov[RXM_IOV_LIMIT]; ++ uint8_t result_iov_count; ++ ++ /* Must stay at bottom */ ++ struct rxm_pkt pkt; ++}; ++ ++enum rxm_deferred_tx_entry_type { ++ RXM_DEFERRED_TX_RNDV_ACK, ++ RXM_DEFERRED_TX_RNDV_READ, ++ RXM_DEFERRED_TX_SAR_SEG, ++ RXM_DEFERRED_TX_ATOMIC_RESP, ++}; ++ ++struct rxm_deferred_tx_entry { ++ struct rxm_ep *rxm_ep; ++ struct rxm_conn *rxm_conn; ++ struct dlist_entry entry; ++ enum rxm_deferred_tx_entry_type type; ++ + union { +- struct rxm_tx_buf *tx_buf; +- struct rxm_rma_buf *rma_buf; ++ struct { ++ struct rxm_rx_buf *rx_buf; ++ } rndv_ack; ++ struct { ++ struct rxm_rx_buf *rx_buf; ++ struct fi_rma_iov rma_iov; ++ struct rxm_iov rxm_iov; ++ } rndv_read; ++ struct { ++ struct rxm_tx_sar_buf *cur_seg_tx_buf; ++ struct { ++ struct iovec iov[RXM_IOV_LIMIT]; ++ uint8_t count; ++ size_t cur_iov_offset; ++ uint64_t data; ++ uint64_t tag; ++ } payload; ++ size_t next_seg_no; ++ size_t segs_cnt; ++ uint8_t op; ++ size_t total_len; ++ size_t remain_len; ++ uint64_t msg_id; ++ void *app_context; ++ uint64_t flags; ++ } sar_seg; ++ struct { ++ struct rxm_tx_atomic_buf *tx_buf; ++ ssize_t len; ++ } atomic_resp; + }; +- +- /* Used for large messages and RMA */ +- struct fid_mr *mr[RXM_IOV_LIMIT]; +- struct rxm_rx_buf *rx_buf; + }; +-DECLARE_FREESTACK(struct rxm_tx_entry, rxm_txe_fs); + + struct rxm_recv_entry { + struct dlist_entry entry; +@@ -313,16 +585,31 @@ struct rxm_recv_entry { + uint64_t ignore; + uint64_t comp_flags; + size_t total_len; +- void *multi_recv_buf; +-}; +-DECLARE_FREESTACK(struct rxm_recv_entry, rxm_recv_fs); ++ struct rxm_recv_queue *recv_queue; ++ struct { ++ void *buf; ++ size_t len; ++ } multi_recv; + +-struct rxm_send_queue { +- struct rxm_txe_fs *fs; +- fastlock_t lock; ++ union { ++ /* Used for SAR protocol */ ++ struct { ++ struct dlist_entry entry; ++ size_t total_recv_len; ++ struct rxm_conn *conn; ++ uint64_t msg_id; ++ } sar; ++ /* Used for Rendezvous protocol */ ++ struct { ++ /* This is used to send RNDV ACK */ ++ struct rxm_tx_base_buf *tx_buf; ++ } rndv; ++ }; + }; ++DECLARE_FREESTACK(struct rxm_recv_entry, rxm_recv_fs); + + enum rxm_recv_queue_type { ++ RXM_RECV_QUEUE_UNSPEC, + RXM_RECV_QUEUE_MSG, + RXM_RECV_QUEUE_TAGGED, + }; +@@ -335,44 +622,81 @@ struct rxm_recv_queue { + struct dlist_entry unexp_msg_list; + dlist_func_t *match_recv; + dlist_func_t *match_unexp; +- fastlock_t lock; + }; + + struct rxm_buf_pool { +- struct util_buf_pool *pool; + enum rxm_buf_pool_type type; +- struct rxm_ep *ep; +- fastlock_t lock; ++ struct util_buf_pool *pool; ++ struct rxm_ep *rxm_ep; + }; + ++struct rxm_msg_eq_entry { ++ struct slist_entry slist_entry; ++ ssize_t rd; ++ uint32_t event; ++ /* Used for connection refusal */ ++ void *context; ++ struct fi_eq_err_entry err_entry; ++ /* must stay at the bottom */ ++ struct fi_eq_cm_entry cm_entry; ++}; ++ ++#define RXM_MSG_EQ_ENTRY_SZ (sizeof(struct rxm_msg_eq_entry) + \ ++ sizeof(struct rxm_cm_data)) ++#define RXM_CM_ENTRY_SZ (sizeof(struct fi_eq_cm_entry) + \ ++ sizeof(struct rxm_cm_data)) ++ + struct rxm_ep { + struct util_ep util_ep; + struct fi_info *rxm_info; + struct fi_info *msg_info; ++ struct rxm_cmap *cmap; + struct fid_pep *msg_pep; + struct fid_eq *msg_eq; ++ struct slistfd msg_eq_entry_list; ++ fastlock_t msg_eq_entry_list_lock; + struct fid_cq *msg_cq; + int msg_cq_fd; +- struct dlist_entry msg_cq_fd_ref_list; + struct fid_ep *srx_ctx; + size_t comp_per_progress; + int msg_mr_local; + int rxm_mr_local; + size_t min_multi_recv_size; ++ size_t buffered_min; ++ size_t buffered_limit; + +- struct rxm_buf_pool buf_pools[RXM_BUF_POOL_MAX]; ++ size_t inject_limit; ++ size_t eager_limit; ++ size_t sar_limit; ++ ++ struct rxm_buf_pool *buf_pools; + +- struct dlist_entry post_rx_list; + struct dlist_entry repost_ready_list; ++ struct dlist_entry deferred_tx_conn_queue; + +- struct rxm_send_queue send_queue; + struct rxm_recv_queue recv_queue; + struct rxm_recv_queue trecv_queue; + }; + +-struct rxm_ep_wait_ref { +- struct util_wait *wait; +- struct dlist_entry entry; ++struct rxm_conn { ++ /* This should stay at the top */ ++ struct rxm_cmap_handle handle; ++ ++ struct fid_ep *msg_ep; ++ ++ /* This is used only in non-FI_THREAD_SAFE case */ ++ struct rxm_pkt *inject_pkt; ++ struct rxm_pkt *inject_data_pkt; ++ struct rxm_pkt *tinject_pkt; ++ struct rxm_pkt *tinject_data_pkt; ++ ++ struct dlist_entry deferred_conn_entry; ++ struct dlist_entry deferred_tx_queue; ++ struct dlist_entry sar_rx_msg_list; ++ ++ /* This is saved MSG EP fid, that hasn't been closed during ++ * handling of CONN_RECV in RXM_CMAP_CONNREQ_SENT for passive side */ ++ struct fid_ep *saved_msg_ep; + }; + + extern struct fi_provider rxm_prov; +@@ -382,17 +706,6 @@ extern struct fi_domain_attr rxm_domain_attr; + extern struct fi_tx_attr rxm_tx_attr; + extern struct fi_rx_attr rxm_rx_attr; + +-// TODO move to common code? +-static inline int rxm_match_addr(fi_addr_t recv_addr, fi_addr_t rx_addr) +-{ +- return (recv_addr == FI_ADDR_UNSPEC) || (recv_addr == rx_addr); +-} +- +-static inline int rxm_match_tag(uint64_t tag, uint64_t ignore, uint64_t match_tag) +-{ +- return ((tag | ignore) == (match_tag | ignore)); +-} +- + #define rxm_ep_rx_flags(rxm_ep) ((rxm_ep)->util_ep.rx_op_flags) + #define rxm_ep_tx_flags(rxm_ep) ((rxm_ep)->util_ep.tx_op_flags) + +@@ -406,33 +719,139 @@ int rxm_domain_open(struct fid_fabric *fabric, struct fi_info *info, + struct fid_domain **dom, void *context); + int rxm_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq_fid, void *context); +-ssize_t rxm_cq_handle_data(struct rxm_rx_buf *rx_buf); ++ssize_t rxm_cq_handle_rx_buf(struct rxm_rx_buf *rx_buf); + + int rxm_endpoint(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep, void *context); + +-struct util_cmap *rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep); ++int rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep); ++void rxm_cq_write_error(struct util_cq *cq, struct util_cntr *cntr, ++ void *op_context, int err); ++void rxm_ep_progress(struct util_ep *util_ep); ++void rxm_ep_do_progress(struct util_ep *util_ep); + +-void rxm_ep_progress_one(struct util_ep *util_ep); +-void rxm_ep_progress_multi(struct util_ep *util_ep); ++int rxm_msg_ep_prepost_recv(struct rxm_ep *rxm_ep, struct fid_ep *msg_ep); + +-int rxm_ep_prepost_buf(struct rxm_ep *rxm_ep, struct fid_ep *msg_ep); ++int rxm_ep_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, ++ uint64_t flags); ++static inline size_t rxm_ep_max_atomic_size(struct fi_info *info) ++{ ++ size_t overhead = sizeof(struct rxm_atomic_hdr) + ++ sizeof(struct rxm_pkt); + +-int rxm_ep_msg_mr_regv(struct rxm_ep *rxm_ep, const struct iovec *iov, +- size_t count, uint64_t access, struct fid_mr **mr); +-void rxm_ep_msg_mr_closev(struct fid_mr **mr, size_t count); ++ /* Must be set to eager size or less */ ++ return (info->tx_attr && info->tx_attr->inject_size > overhead) ? ++ info->tx_attr->inject_size - overhead : 0; ++} + +-void rxm_ep_handle_postponed_tx_op(struct rxm_ep *rxm_ep, +- struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry); +-void rxm_ep_handle_postponed_rma_op(struct rxm_ep *rxm_ep, +- struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry); ++static inline ssize_t ++rxm_atomic_send_respmsg(struct rxm_ep *rxm_ep, struct rxm_conn *conn, ++ struct rxm_tx_atomic_buf *resp_buf, ssize_t len) ++{ ++ struct iovec iov = { ++ .iov_base = (void *) &resp_buf->pkt, ++ .iov_len = len, ++ }; ++ struct fi_msg msg = { ++ .msg_iov = &iov, ++ .desc = &resp_buf->hdr.desc, ++ .iov_count = 1, ++ .context = resp_buf, ++ .data = 0, ++ }; ++ return fi_sendmsg(conn->msg_ep, &msg, FI_COMPLETION); ++} + +-static inline void rxm_cntr_inc(struct util_cntr *cntr) ++static inline struct rxm_conn *rxm_key2conn(struct rxm_ep *rxm_ep, uint64_t key) + { +- if (cntr) +- cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); ++ return (struct rxm_conn *)rxm_cmap_key2handle(rxm_ep->cmap, key); ++} ++ ++void rxm_ep_progress_deferred_queue(struct rxm_ep *rxm_ep, ++ struct rxm_conn *rxm_conn); ++ ++struct rxm_deferred_tx_entry * ++rxm_ep_alloc_deferred_tx_entry(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ enum rxm_deferred_tx_entry_type type); ++ ++static inline void ++rxm_ep_enqueue_deferred_tx_queue(struct rxm_deferred_tx_entry *tx_entry) ++{ ++ if (dlist_empty(&tx_entry->rxm_conn->deferred_tx_queue)) ++ dlist_insert_tail(&tx_entry->rxm_conn->deferred_conn_entry, ++ &tx_entry->rxm_ep->deferred_tx_conn_queue); ++ dlist_insert_tail(&tx_entry->entry, &tx_entry->rxm_conn->deferred_tx_queue); ++} ++ ++static inline void ++rxm_ep_dequeue_deferred_tx_queue(struct rxm_deferred_tx_entry *tx_entry) ++{ ++ dlist_remove_init(&tx_entry->entry); ++ if (dlist_empty(&tx_entry->rxm_conn->deferred_tx_queue)) ++ dlist_remove(&tx_entry->rxm_conn->deferred_conn_entry); ++} ++ ++int rxm_conn_process_eq_events(struct rxm_ep *rxm_ep); ++ ++static inline void rxm_ep_msg_mr_closev(struct fid_mr **mr, size_t count) ++{ ++ int ret; ++ size_t i; ++ ++ for (i = 0; i < count; i++) { ++ if (mr[i]) { ++ ret = fi_close(&mr[i]->fid); ++ if (ret) ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Unable to close msg mr: %zu\n", i); ++ mr[i] = NULL; ++ } ++ } ++} ++ ++static inline int ++rxm_ep_msg_mr_regv(struct rxm_ep *rxm_ep, const struct iovec *iov, size_t count, ++ uint64_t access, struct fid_mr **mr) ++{ ++ int ret; ++ size_t i; ++ struct rxm_domain *rxm_domain = ++ container_of(rxm_ep->util_ep.domain, struct rxm_domain, util_domain); ++ ++ for (i = 0; i < count; i++) { ++ ret = fi_mr_reg(rxm_domain->msg_domain, iov[i].iov_base, ++ iov[i].iov_len, access, 0, 0, 0, &mr[i], NULL); ++ if (ret) ++ goto err; ++ } ++ return 0; ++err: ++ rxm_ep_msg_mr_closev(mr, count); ++ return ret; ++} ++ ++static inline int ++rxm_ep_msg_mr_regv_lim(struct rxm_ep *rxm_ep, const struct iovec *iov, size_t count, ++ size_t total_reg_len, uint64_t access, struct fid_mr **mr) ++{ ++ int ret; ++ size_t i; ++ struct rxm_domain *rxm_domain = ++ container_of(rxm_ep->util_ep.domain, struct rxm_domain, util_domain); ++ ++ for (i = 0; i < count && total_reg_len; i++) { ++ size_t len = MIN(iov[i].iov_len, total_reg_len); ++ ret = fi_mr_reg(rxm_domain->msg_domain, iov[i].iov_base, ++ len, access, 0, 0, 0, &mr[i], NULL); ++ if (ret) ++ goto err; ++ total_reg_len -= len; ++ } ++ return 0; ++err: ++ rxm_ep_msg_mr_closev(mr, count); ++ return ret; + } + + static inline void rxm_cntr_incerr(struct util_cntr *cntr) +@@ -441,6 +860,18 @@ static inline void rxm_cntr_incerr(struct util_cntr *cntr) + cntr->cntr_fid.ops->adderr(&cntr->cntr_fid, 1); + } + ++ ++ ++static inline void rxm_cq_log_comp(uint64_t flags) ++{ ++#if ENABLE_DEBUG ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting %s completion\n", ++ fi_tostr((void *)&flags, FI_TYPE_CQ_EVENT_FLAGS)); ++#else ++ /* NOP */ ++#endif ++} ++ + /* Caller must hold recv_queue->lock */ + static inline struct rxm_rx_buf * + rxm_check_unexp_msg_list(struct rxm_recv_queue *recv_queue, fi_addr_t addr, +@@ -473,86 +904,198 @@ rxm_process_recv_entry(struct rxm_recv_queue *recv_queue, + { + struct rxm_rx_buf *rx_buf; + +- fastlock_acquire(&recv_queue->lock); + rx_buf = rxm_check_unexp_msg_list(recv_queue, recv_entry->addr, + recv_entry->tag, recv_entry->ignore); + if (rx_buf) { ++ assert((recv_queue->type == RXM_RECV_QUEUE_MSG && ++ rx_buf->pkt.hdr.op == ofi_op_msg) || ++ (recv_queue->type == RXM_RECV_QUEUE_TAGGED && ++ rx_buf->pkt.hdr.op == ofi_op_tagged)); + dlist_remove(&rx_buf->unexp_msg.entry); + rx_buf->recv_entry = recv_entry; +- fastlock_release(&recv_queue->lock); +- return rxm_cq_handle_data(rx_buf); ++ ++ if (rx_buf->pkt.ctrl_hdr.type != ofi_ctrl_seg_data) { ++ return rxm_cq_handle_rx_buf(rx_buf); ++ } else { ++ struct dlist_entry *entry; ++ enum rxm_sar_seg_type last = ++ (rxm_sar_get_seg_type(&rx_buf->pkt.ctrl_hdr) ++ == RXM_SAR_SEG_LAST); ++ ssize_t ret = rxm_cq_handle_rx_buf(rx_buf); ++ struct rxm_recv_match_attr match_attr; ++ ++ if (ret || last) ++ return ret; ++ ++ match_attr.addr = recv_entry->addr; ++ match_attr.tag = recv_entry->tag; ++ match_attr.ignore = recv_entry->ignore; ++ ++ dlist_foreach_container_safe(&recv_queue->unexp_msg_list, ++ struct rxm_rx_buf, rx_buf, ++ unexp_msg.entry, entry) { ++ if (!recv_queue->match_unexp(&rx_buf->unexp_msg.entry, ++ &match_attr)) ++ continue; ++ /* Handle unordered completions from MSG provider */ ++ if ((rx_buf->pkt.ctrl_hdr.msg_id != recv_entry->sar.msg_id) || ++ ((rx_buf->pkt.ctrl_hdr.type != ofi_ctrl_seg_data))) ++ continue; ++ ++ if (!rx_buf->conn) { ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); ++ } ++ if (recv_entry->sar.conn != rx_buf->conn) ++ continue; ++ rx_buf->recv_entry = recv_entry; ++ dlist_remove(&rx_buf->unexp_msg.entry); ++ last = (rxm_sar_get_seg_type(&rx_buf->pkt.ctrl_hdr) ++ == RXM_SAR_SEG_LAST); ++ ret = rxm_cq_handle_rx_buf(rx_buf); ++ if (ret || last) ++ break; ++ } ++ return ret; ++ } + } + +- RXM_DBG_ADDR_TAG(FI_LOG_EP_DATA, "Enqueuing recv", recv_entry->addr, +- recv_entry->tag); ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Enqueuing recv\n"); + dlist_insert_tail(&recv_entry->entry, &recv_queue->recv_list); +- fastlock_release(&recv_queue->lock); + + return FI_SUCCESS; + } + +-static inline +-struct rxm_buf *rxm_buf_get(struct rxm_buf_pool *pool) ++static inline struct rxm_conn * ++rxm_acquire_conn(struct rxm_ep *rxm_ep, fi_addr_t fi_addr) + { +- struct rxm_buf *buf; ++ return (struct rxm_conn *)rxm_cmap_acquire_handle(rxm_ep->cmap, ++ fi_addr); ++} + +- fastlock_acquire(&pool->lock); +- buf = util_buf_alloc(pool->pool); +- if (OFI_UNLIKELY(!buf)) { +- fastlock_release(&pool->lock); +- return NULL; ++static inline int ++rxm_acquire_conn_connect(struct rxm_ep *rxm_ep, fi_addr_t fi_addr, ++ struct rxm_conn **rxm_conn) ++{ ++ *rxm_conn = rxm_acquire_conn(rxm_ep, fi_addr); ++ if (OFI_UNLIKELY(!*rxm_conn || (*rxm_conn)->handle.state != RXM_CMAP_CONNECTED)) { ++ int ret; ++ if (!*rxm_conn) ++ return -FI_EHOSTUNREACH; ++ rxm_ep->cmap->acquire(&rxm_ep->cmap->lock); ++ ret = rxm_cmap_handle_unconnected(rxm_ep, &(*rxm_conn)->handle, fi_addr); ++ rxm_ep->cmap->release(&rxm_ep->cmap->lock); ++ return ret; ++ } ++ return 0; ++} ++ ++static inline ssize_t ++rxm_ep_prepare_tx(struct rxm_ep *rxm_ep, fi_addr_t dest_addr, ++ struct rxm_conn **rxm_conn) ++{ ++ ssize_t ret = rxm_acquire_conn_connect(rxm_ep, dest_addr, rxm_conn); ++ ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ if (OFI_UNLIKELY(!dlist_empty(&(*rxm_conn)->deferred_tx_queue))) { ++ rxm_ep_progress(&rxm_ep->util_ep); ++ if (!dlist_empty(&(*rxm_conn)->deferred_tx_queue)) ++ return -FI_EAGAIN; + } +- fastlock_release(&pool->lock); +- return buf; ++ ++ return 0; ++} ++ ++static inline void ++rxm_ep_format_tx_buf_pkt(struct rxm_conn *rxm_conn, size_t len, uint8_t op, ++ uint64_t data, uint64_t tag, uint64_t flags, ++ struct rxm_pkt *pkt) ++{ ++ pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ pkt->hdr.size = len; ++ pkt->hdr.op = op; ++ pkt->hdr.tag = tag; ++ pkt->hdr.flags = (flags & FI_REMOTE_CQ_DATA); ++ pkt->hdr.data = data; ++} ++ ++static inline struct rxm_buf *rxm_buf_alloc(struct rxm_buf_pool *pool) ++{ ++ return util_buf_alloc(pool->pool); + } + + static inline + void rxm_buf_release(struct rxm_buf_pool *pool, struct rxm_buf *buf) + { +- fastlock_acquire(&pool->lock); + util_buf_release(pool->pool, buf); +- fastlock_release(&pool->lock); + } + +-static inline struct rxm_tx_buf * +-rxm_tx_buf_get(struct rxm_ep *rxm_ep, enum rxm_buf_pool_type type) ++static inline struct rxm_buf * ++rxm_buf_get_by_index(struct rxm_buf_pool *pool, size_t index) ++{ ++ return util_buf_get_by_index(pool->pool, index); ++} ++ ++static inline ++size_t rxm_get_buf_index(struct rxm_buf_pool *pool, struct rxm_buf *buf) ++{ ++ return util_get_buf_index(pool->pool, buf); ++} ++ ++static inline struct rxm_buf * ++rxm_tx_buf_alloc(struct rxm_ep *rxm_ep, enum rxm_buf_pool_type type) + { +- assert((type == RXM_BUF_POOL_TX_MSG) || +- (type == RXM_BUF_POOL_TX_TAGGED) || ++ assert((type == RXM_BUF_POOL_TX) || ++ (type == RXM_BUF_POOL_TX_INJECT) || + (type == RXM_BUF_POOL_TX_ACK) || +- (type == RXM_BUF_POOL_TX_LMT)); +- return (struct rxm_tx_buf *)rxm_buf_get(&rxm_ep->buf_pools[type]); ++ (type == RXM_BUF_POOL_TX_RNDV) || ++ (type == RXM_BUF_POOL_TX_ATOMIC) || ++ (type == RXM_BUF_POOL_TX_SAR)); ++ return rxm_buf_alloc(&rxm_ep->buf_pools[type]); + } + + static inline void +-rxm_tx_buf_release(struct rxm_ep *rxm_ep, struct rxm_tx_buf *tx_buf) ++rxm_tx_buf_release(struct rxm_ep *rxm_ep, enum rxm_buf_pool_type type, void *tx_buf) + { +- assert((tx_buf->type == RXM_BUF_POOL_TX_MSG) || +- (tx_buf->type == RXM_BUF_POOL_TX_TAGGED) || +- (tx_buf->type == RXM_BUF_POOL_TX_ACK) || +- (tx_buf->type == RXM_BUF_POOL_TX_LMT)); +- tx_buf->pkt.hdr.flags &= ~OFI_REMOTE_CQ_DATA; +- rxm_buf_release(&rxm_ep->buf_pools[tx_buf->type], +- (struct rxm_buf *)tx_buf); ++ rxm_buf_release(&rxm_ep->buf_pools[type], (struct rxm_buf *)tx_buf); + } + +-static inline struct rxm_rx_buf *rxm_rx_buf_get(struct rxm_ep *rxm_ep) ++static inline struct rxm_rx_buf * ++rxm_rx_buf_alloc(struct rxm_ep *rxm_ep, struct fid_ep *msg_ep, uint8_t repost) + { +- return (struct rxm_rx_buf *)rxm_buf_get( +- &rxm_ep->buf_pools[RXM_BUF_POOL_RX]); ++ struct rxm_rx_buf *rx_buf = ++ (struct rxm_rx_buf *)rxm_buf_alloc(&rxm_ep->buf_pools[RXM_BUF_POOL_RX]); ++ if (OFI_LIKELY((long int)rx_buf)) { ++ assert(rx_buf->ep == rxm_ep); ++ rx_buf->hdr.state = RXM_RX; ++ rx_buf->msg_ep = msg_ep; ++ rx_buf->repost = repost; ++ ++ if (!rxm_ep->srx_ctx) ++ rx_buf->conn = container_of(msg_ep->fid.context, ++ struct rxm_conn, handle); ++ } ++ return rx_buf; + } + + static inline void + rxm_rx_buf_release(struct rxm_ep *rxm_ep, struct rxm_rx_buf *rx_buf) + { +- rxm_buf_release(&rxm_ep->buf_pools[RXM_BUF_POOL_RX], +- (struct rxm_buf *)rx_buf); ++ if (rx_buf->repost) { ++ dlist_insert_tail(&rx_buf->repost_entry, ++ &rx_buf->ep->repost_ready_list); ++ } else { ++ util_buf_release(rxm_ep->buf_pools[RXM_BUF_POOL_RX].pool, ++ rx_buf); ++ } + } + +-static inline struct rxm_rma_buf *rxm_rma_buf_get(struct rxm_ep *rxm_ep) ++static inline struct rxm_rma_buf *rxm_rma_buf_alloc(struct rxm_ep *rxm_ep) + { +- return (struct rxm_rma_buf *)rxm_buf_get( +- &rxm_ep->buf_pools[RXM_BUF_POOL_RMA]); ++ return (struct rxm_rma_buf *) ++ rxm_buf_alloc(&rxm_ep->buf_pools[RXM_BUF_POOL_RMA]); + } + + static inline void +@@ -562,45 +1105,51 @@ rxm_rma_buf_release(struct rxm_ep *rxm_ep, struct rxm_rma_buf *rx_buf) + (struct rxm_buf *)rx_buf); + } + +-#define rxm_entry_pop(queue, entry) \ +- do { \ +- fastlock_acquire(&queue->lock); \ +- entry = freestack_isempty(queue->fs) ? \ +- NULL : freestack_pop(queue->fs);\ +- fastlock_release(&queue->lock); \ +- } while (0) ++static inline ++struct rxm_tx_atomic_buf *rxm_tx_atomic_buf_alloc(struct rxm_ep *rxm_ep) ++{ ++ return (struct rxm_tx_atomic_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_ATOMIC); ++} + +-#define rxm_entry_push(queue, entry) \ +- do { \ +- fastlock_acquire(&queue->lock); \ +- freestack_push(queue->fs, entry); \ +- fastlock_release(&queue->lock); \ +- } while (0) ++static inline struct rxm_recv_entry *rxm_recv_entry_get(struct rxm_recv_queue *queue) ++{ ++ return (freestack_isempty(queue->fs) ? ++ NULL : freestack_pop(queue->fs)); ++} ++ ++static inline void ++rxm_recv_entry_release(struct rxm_recv_queue *queue, struct rxm_recv_entry *entry) ++{ ++ entry->total_len = 0; ++ freestack_push(queue->fs, entry); ++} ++ ++static inline int rxm_cq_write_recv_comp(struct rxm_rx_buf *rx_buf, ++ void *context, uint64_t flags, ++ size_t len, char *buf) ++{ ++ if (rx_buf->ep->rxm_info->caps & FI_SOURCE) ++ return ofi_cq_write_src(rx_buf->ep->util_ep.rx_cq, context, ++ flags, len, buf, rx_buf->pkt.hdr.data, ++ rx_buf->pkt.hdr.tag, ++ rx_buf->conn->handle.fi_addr); ++ else ++ return ofi_cq_write(rx_buf->ep->util_ep.rx_cq, context, ++ flags, len, buf, rx_buf->pkt.hdr.data, ++ rx_buf->pkt.hdr.tag); ++} + +-#define rxm_tx_entry_cleanup(entry) (entry)->tx_buf = NULL +-#define rxm_recv_entry_cleanup(entry) (entry)->total_len = 0 +- +-#define RXM_DEFINE_QUEUE_ENTRY(type, queue_type) \ +-static inline struct rxm_ ## type ## _entry * \ +-rxm_ ## type ## _entry_get(struct rxm_ ## queue_type ## _queue *queue) \ +-{ \ +- struct rxm_ ## type ## _entry *entry; \ +- rxm_entry_pop(queue, entry); \ +- if (!entry) { \ +- FI_WARN(&rxm_prov, FI_LOG_CQ, \ +- "Exhausted " #type "_entry freestack\n"); \ +- return NULL; \ +- } \ +- return entry; \ +-} \ +- \ +-static inline void \ +-rxm_ ## type ## _entry_release(struct rxm_ ## queue_type ## _queue *queue, \ +- struct rxm_ ## type ## _entry *entry) \ +-{ \ +- rxm_ ## type ## _entry_cleanup(entry); \ +- rxm_entry_push(queue, entry); \ +-} +- +-RXM_DEFINE_QUEUE_ENTRY(tx, send); +-RXM_DEFINE_QUEUE_ENTRY(recv, recv); ++static inline int ++rxm_cq_write_multi_recv_comp(struct rxm_ep *rxm_ep, struct rxm_recv_entry *recv_entry) ++{ ++ if (rxm_ep->rxm_info->caps & FI_SOURCE) ++ return ofi_cq_write_src(rxm_ep->util_ep.rx_cq, recv_entry->context, ++ FI_MULTI_RECV, recv_entry->multi_recv.len, ++ recv_entry->multi_recv.buf, 0, 0, ++ recv_entry->addr); ++ else ++ return ofi_cq_write(rxm_ep->util_ep.rx_cq, recv_entry->context, ++ FI_MULTI_RECV, recv_entry->multi_recv.len, ++ recv_entry->multi_recv.buf, 0, 0); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_atomic.c +new file mode 100644 +index 0000000..3970354 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_atomic.c +@@ -0,0 +1,558 @@ ++/* ++ * Copyright (c) 2018 Cray Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "rxm.h" ++ ++static void ++rxm_ep_format_atomic_pkt_hdr(struct rxm_conn *rxm_conn, ++ struct rxm_tx_atomic_buf *tx_buf, size_t data_len, ++ uint32_t pkt_op, enum fi_datatype datatype, ++ uint8_t atomic_op, uint64_t flags, uint64_t data, ++ const struct fi_rma_ioc *rma_ioc, size_t rma_ioc_count) ++{ ++ struct rxm_atomic_hdr *atomic_hdr; ++ ++ atomic_hdr = (struct rxm_atomic_hdr *)tx_buf->pkt.data; ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, pkt_op, data, 0, ++ flags, &tx_buf->pkt); ++ tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_atomic; ++ tx_buf->pkt.hdr.op = pkt_op; ++ tx_buf->pkt.hdr.atomic.datatype = datatype; ++ tx_buf->pkt.hdr.atomic.op = atomic_op; ++ tx_buf->pkt.hdr.atomic.ioc_count = rma_ioc_count; ++ if (rma_ioc_count) ++ memcpy(atomic_hdr->rma_ioc, rma_ioc, ++ rma_ioc_count * sizeof(struct fi_rma_ioc)); ++ tx_buf->flags = flags; ++} ++ ++static inline int ++rxm_ep_send_atomic_req(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ struct rxm_tx_atomic_buf *tx_buf, uint64_t len) ++{ ++ int ret; ++ ++ /* Atomic request TX completion processing is performed when the ++ * software generated atomic response message is received. */ ++ tx_buf->hdr.state = RXM_ATOMIC_RESP_WAIT; ++ if (len <= rxm_ep->inject_limit) ++ ret = fi_inject(rxm_conn->msg_ep, &tx_buf->pkt, len, 0); ++ else ++ ret = fi_send(rxm_conn->msg_ep, &tx_buf->pkt, len, ++ tx_buf->hdr.desc, 0, tx_buf); ++ if (ret == -FI_EAGAIN) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ ++ if (OFI_LIKELY(!ret)) ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "sent atomic request: op: %" ++ PRIu8 " msg_id: 0x%" PRIx64 "\n", tx_buf->pkt.hdr.op, ++ tx_buf->pkt.ctrl_hdr.msg_id); ++ else if (OFI_UNLIKELY(ret != -FI_EAGAIN)) ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, "unable to send atomic " ++ "request: op: %" PRIu8 " msg_id: 0x%" PRIx64 "\n", ++ tx_buf->pkt.hdr.op, tx_buf->pkt.ctrl_hdr.msg_id); ++ return ret; ++} ++ ++static ssize_t ++rxm_ep_atomic_common(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const struct fi_msg_atomic *msg, const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_iov_count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_iov_count, uint32_t op, uint64_t flags) ++{ ++ struct rxm_tx_atomic_buf *tx_buf; ++ struct rxm_atomic_hdr *atomic_hdr; ++ struct iovec buf_iov[RXM_IOV_LIMIT]; ++ struct iovec cmp_iov[RXM_IOV_LIMIT]; ++ size_t datatype_sz = ofi_datatype_size(msg->datatype); ++ size_t buf_len = 0; ++ size_t cmp_len = 0; ++ size_t tot_len; ++ ssize_t ret; ++ ++ assert(msg->iov_count <= RXM_IOV_LIMIT && ++ msg->rma_iov_count <= RXM_IOV_LIMIT); ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "atomic with remote CQ data not supported\n"); ++ return -FI_EINVAL; ++ } ++ ++ if (msg->op != FI_ATOMIC_READ) { ++ assert(msg->msg_iov); ++ ofi_ioc_to_iov(msg->msg_iov, buf_iov, msg->iov_count, ++ datatype_sz); ++ buf_len = ofi_total_iov_len(buf_iov, msg->iov_count); ++ } ++ ++ if (op == ofi_op_atomic_compare) { ++ assert(comparev); ++ ofi_ioc_to_iov(comparev, cmp_iov, compare_iov_count, ++ datatype_sz); ++ cmp_len = ofi_total_iov_len(cmp_iov, compare_iov_count); ++ assert(buf_len == cmp_len); ++ } ++ ++ tot_len = buf_len + cmp_len + sizeof(struct rxm_atomic_hdr) + ++ sizeof(struct rxm_pkt); ++ ++ if (tot_len > rxm_eager_limit) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "atomic data too large %zu\n", tot_len); ++ return -FI_EINVAL; ++ } ++ ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ tx_buf = (struct rxm_tx_atomic_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_ATOMIC); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from Atomic buffer pool\n"); ++ ret = -FI_EAGAIN; ++ goto unlock; ++ } ++ ++ rxm_ep_format_atomic_pkt_hdr(rxm_conn, tx_buf, tot_len, op, ++ msg->datatype, msg->op, flags, msg->data, ++ msg->rma_iov, msg->rma_iov_count); ++ tx_buf->pkt.ctrl_hdr.msg_id = rxm_tx_buf_2_msg_id(rxm_ep, ++ RXM_BUF_POOL_TX_ATOMIC, tx_buf); ++ tx_buf->app_context = msg->context; ++ ++ atomic_hdr = (struct rxm_atomic_hdr *) tx_buf->pkt.data; ++ ++ ofi_copy_from_iov(atomic_hdr->data, buf_len, buf_iov, ++ msg->iov_count, 0); ++ if (cmp_len) ++ ofi_copy_from_iov(atomic_hdr->data + buf_len, cmp_len, ++ cmp_iov, compare_iov_count, 0); ++ ++ tx_buf->result_iov_count = result_iov_count; ++ if (resultv) ++ ofi_ioc_to_iov(resultv, tx_buf->result_iov, result_iov_count, ++ datatype_sz); ++ ++ ret = rxm_ep_send_atomic_req(rxm_ep, rxm_conn, tx_buf, tot_len); ++ if (ret) ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, tx_buf); ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; ++} ++ ++static ssize_t ++rxm_ep_generic_atomic_writemsg(struct rxm_ep *rxm_ep, const struct fi_msg_atomic *msg, ++ uint64_t flags) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_atomic_common(rxm_ep, rxm_conn, msg, NULL, NULL, 0, ++ NULL, NULL, 0, ofi_op_atomic, flags); ++} ++ ++static ssize_t ++rxm_ep_atomic_writemsg(struct fid_ep *ep_fid, const struct fi_msg_atomic *msg, ++ uint64_t flags) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ return rxm_ep_generic_atomic_writemsg(rxm_ep, msg, ++ flags | rxm_ep->util_ep.tx_msg_flags); ++} ++ ++static ssize_t ++rxm_ep_atomic_writev(struct fid_ep *ep_fid, const struct fi_ioc *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ struct fi_rma_ioc rma_iov = { ++ .addr = addr, ++ .count = ofi_total_ioc_cnt(iov, count), ++ .key = key, ++ }; ++ struct fi_msg_atomic msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .datatype = datatype, ++ .op = op, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return rxm_ep_generic_atomic_writemsg(rxm_ep, &msg, rxm_ep_tx_flags(rxm_ep)); ++} ++ ++static ssize_t ++rxm_ep_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ const struct fi_ioc iov = { ++ .addr = (void *) buf, ++ .count = count, ++ }; ++ ++ return rxm_ep_atomic_writev(ep_fid, &iov, &desc, 1, dest_addr, addr, ++ key, datatype, op, context); ++} ++ ++static ssize_t ++rxm_ep_atomic_inject(struct fid_ep *ep_fid, const void *buf, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ struct fi_ioc msg_iov = { ++ .addr = (void *) buf, ++ .count = count, ++ }; ++ struct fi_rma_ioc rma_iov = { ++ .addr = addr, ++ .count = count, ++ .key = key, ++ }; ++ struct fi_msg_atomic msg = { ++ .msg_iov = &msg_iov, ++ .desc = NULL, ++ .iov_count = 1, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .datatype = datatype, ++ .op = op, ++ .context = NULL, ++ .data = 0, ++ }; ++ ++ ++ return rxm_ep_generic_atomic_writemsg(rxm_ep, &msg, FI_INJECT); ++} ++ ++static ssize_t ++rxm_ep_generic_atomic_readwritemsg(struct rxm_ep *rxm_ep, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_atomic_common(rxm_ep, rxm_conn, msg, NULL, NULL, 0, ++ resultv, result_desc, result_count, ++ ofi_op_atomic_fetch, flags); ++} ++ ++static ssize_t ++rxm_ep_atomic_readwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ return rxm_ep_generic_atomic_readwritemsg(rxm_ep, msg, ++ resultv, result_desc, result_count, ++ flags | rxm_ep->util_ep.tx_msg_flags); ++} ++ ++static ssize_t ++rxm_ep_atomic_readwritev(struct fid_ep *ep_fid, const struct fi_ioc *iov, ++ void **desc, size_t count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ struct fi_rma_ioc rma_iov = { ++ .addr = addr, ++ .count = ofi_total_ioc_cnt(iov, count), ++ .key = key, ++ }; ++ struct fi_msg_atomic msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .datatype = datatype, ++ .op = op, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return rxm_ep_generic_atomic_readwritemsg(rxm_ep, &msg, resultv, ++ result_desc, result_count, rxm_ep_tx_flags(rxm_ep)); ++} ++ ++static ssize_t ++rxm_ep_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_ioc iov = { ++ .addr = (op == FI_ATOMIC_READ) ? NULL : (void *) buf, ++ .count = count, ++ }; ++ struct fi_ioc result_iov = { ++ .addr = result, ++ .count = count, ++ }; ++ ++ if (!buf && op != FI_ATOMIC_READ) ++ return -FI_EINVAL; ++ ++ return rxm_ep_atomic_readwritev(ep_fid, &iov, &desc, 1, &result_iov, ++ &result_desc, 1, dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++static ssize_t ++rxm_ep_generic_atomic_compwritemsg(struct rxm_ep *rxm_ep, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_atomic_common(rxm_ep, rxm_conn, msg, comparev, ++ compare_desc, compare_count, resultv, ++ result_desc, result_count, ++ ofi_op_atomic_compare, flags); ++} ++ ++static ssize_t ++rxm_ep_atomic_compwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ return rxm_ep_generic_atomic_compwritemsg(rxm_ep, msg, comparev, ++ compare_desc, compare_count, resultv, ++ result_desc, result_count, ++ flags | rxm_ep->util_ep.tx_msg_flags); ++} ++ ++static ssize_t ++rxm_ep_atomic_compwritev(struct fid_ep *ep_fid, const struct fi_ioc *iov, ++ void **desc, size_t count, const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ struct fi_rma_ioc rma_iov = { ++ .addr = addr, ++ .count = ofi_total_ioc_cnt(iov, count), ++ .key = key, ++ }; ++ struct fi_msg_atomic msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .datatype = datatype, ++ .op = op, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return rxm_ep_generic_atomic_compwritemsg(rxm_ep, &msg, comparev, ++ compare_desc, compare_count, resultv, result_desc, ++ result_count, rxm_ep_tx_flags(rxm_ep)); ++} ++ ++static ssize_t ++rxm_ep_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, const void *compare, void *compare_desc, ++ void *result, void *result_desc, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_ioc iov = { ++ .addr = (void *) buf, ++ .count = count, ++ }; ++ struct fi_ioc resultv = { ++ .addr = result, ++ .count = count, ++ }; ++ struct fi_ioc comparev = { ++ .addr = (void *) compare, ++ .count = count, ++ }; ++ ++ return rxm_ep_atomic_compwritev(ep_fid, &iov, &desc, 1, ++ &comparev, &compare_desc, 1, ++ &resultv, &result_desc, 1, ++ dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++int rxm_ep_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, ++ uint64_t flags) ++{ ++ struct rxm_domain *rxm_domain = container_of(domain, ++ struct rxm_domain, ++ util_domain.domain_fid); ++ size_t tot_size; ++ int ret; ++ ++ if (flags & FI_TAGGED) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "tagged atomic op not supported\n"); ++ return -FI_EINVAL; ++ } ++ ++ ret = ofi_atomic_valid(&rxm_prov, datatype, op, flags); ++ if (ret || !attr) ++ return ret; ++ ++ tot_size = flags & FI_COMPARE_ATOMIC ? ++ rxm_domain->max_atomic_size / 2 : rxm_domain->max_atomic_size; ++ attr->size = ofi_datatype_size(datatype); ++ attr->count = tot_size / attr->size; ++ ++ return FI_SUCCESS; ++} ++ ++static int rxm_ep_atomic_valid(struct fid_ep *ep_fid, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid); ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxm_ep_query_atomic(&rxm_ep->util_ep.domain->domain_fid, ++ datatype, op, &attr, 0); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++static int rxm_ep_atomic_fetch_valid(struct fid_ep *ep_fid, ++ enum fi_datatype datatype, enum fi_op op, ++ size_t *count) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid); ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxm_ep_query_atomic(&rxm_ep->util_ep.domain->domain_fid, ++ datatype, op, &attr, FI_FETCH_ATOMIC); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++static int rxm_ep_atomic_cswap_valid(struct fid_ep *ep_fid, ++ enum fi_datatype datatype, enum fi_op op, ++ size_t *count) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid); ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxm_ep_query_atomic(&rxm_ep->util_ep.domain->domain_fid, ++ datatype, op, &attr, FI_COMPARE_ATOMIC); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++struct fi_ops_atomic rxm_ops_atomic = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = rxm_ep_atomic_write, ++ .writev = rxm_ep_atomic_writev, ++ .writemsg = rxm_ep_atomic_writemsg, ++ .inject = rxm_ep_atomic_inject, ++ .readwrite = rxm_ep_atomic_readwrite, ++ .readwritev = rxm_ep_atomic_readwritev, ++ .readwritemsg = rxm_ep_atomic_readwritemsg, ++ .compwrite = rxm_ep_atomic_compwrite, ++ .compwritev = rxm_ep_atomic_compwritev, ++ .compwritemsg = rxm_ep_atomic_compwritemsg, ++ .writevalid = rxm_ep_atomic_valid, ++ .readwritevalid = rxm_ep_atomic_fetch_valid, ++ .compwritevalid = rxm_ep_atomic_cswap_valid, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_attr.c +index eb2fd93..0c4f6c9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_attr.c +@@ -32,9 +32,9 @@ + + #include "rxm.h" + +-#define RXM_EP_CAPS (FI_MSG | FI_RMA | FI_TAGGED | FI_DIRECTED_RECV | \ +- FI_READ | FI_WRITE | FI_RECV | FI_SEND | \ +- FI_REMOTE_READ | FI_REMOTE_WRITE | FI_SOURCE) ++#define RXM_EP_CAPS (FI_MSG | FI_RMA | FI_TAGGED | FI_ATOMIC | \ ++ FI_DIRECTED_RECV | FI_READ | FI_WRITE | FI_RECV | \ ++ FI_SEND | FI_REMOTE_READ | FI_REMOTE_WRITE | FI_SOURCE) + + #define RXM_DOMAIN_CAPS (FI_LOCAL_COMM | FI_REMOTE_COMM) + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_av.c +new file mode 100644 +index 0000000..6ae0b7c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_av.c +@@ -0,0 +1,203 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rxm.h" ++ ++static int rxm_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, ++ size_t count, uint64_t flags) ++{ ++ struct util_av *av = container_of(av_fid, struct util_av, av_fid); ++ struct rxm_ep *rxm_ep; ++ int i, ret; ++ ++ /* This should be before ofi_ip_av_remove as we need to know ++ * fi_addr -> addr mapping when moving handle to peer list. */ ++ dlist_foreach_container(&av->ep_list, struct rxm_ep, ++ rxm_ep, util_ep.av_entry) { ++ for (i = 0; i < count; i++) { ++ if (!rxm_ep->cmap->handles_av[fi_addr[i]]) ++ continue; ++ /* TODO this is not optimal. Replace this with something ++ * more deterministic: delete handle if we know that peer ++ * isn't actively communicating with us ++ */ ++ ret = rxm_cmap_move_handle_to_peer_list(rxm_ep->cmap, i); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_DOMAIN, ++ "Unable to move handle to " ++ "peer list. Deleting it.\n"); ++ rxm_cmap_del_handle_ts(rxm_ep->cmap->handles_av[i]); ++ return ret; ++ } ++ } ++ } ++ ++ return ofi_ip_av_remove(av_fid, fi_addr, count, flags); ++} ++ ++static int ++rxm_av_insert_cmap(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags) ++{ ++ struct util_av *av = container_of(av_fid, struct util_av, av_fid); ++ struct rxm_ep *rxm_ep; ++ fi_addr_t fi_addr_tmp; ++ size_t i; ++ int ret = 0; ++ const void *cur_addr; ++ ++ dlist_foreach_container(&av->ep_list, struct rxm_ep, ++ rxm_ep, util_ep.av_entry) { ++ for (i = 0; i < count; i++) { ++ cur_addr = (const void *) ((char *) addr + i * av->addrlen); ++ fi_addr_tmp = (fi_addr ? fi_addr[i] : ++ ofi_av_lookup_fi_addr(av, cur_addr)); ++ if (fi_addr_tmp == FI_ADDR_NOTAVAIL) ++ continue; ++ ret = rxm_cmap_update(rxm_ep->cmap, cur_addr, fi_addr_tmp); ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_AV, ++ "Unable to update CM for OFI endpoints\n"); ++ return ret; ++ } ++ } ++ } ++ return 0; ++} ++ ++static int rxm_av_insert(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ struct util_av *av = container_of(av_fid, struct util_av, av_fid); ++ int ret, retv; ++ ++ ret = ofi_ip_av_insert(av_fid, addr, count, fi_addr, flags, context); ++ if (ret < 0) ++ return ret; ++ ++ if (!av->eq && !ret) ++ return ret; ++ ++ retv = rxm_av_insert_cmap(av_fid, addr, count, fi_addr, flags); ++ if (retv) { ++ ret = rxm_av_remove(av_fid, fi_addr, count, flags); ++ if (ret) ++ FI_WARN(&rxm_prov, FI_LOG_AV, "Failed to remove addr " ++ "from AV during error handling\n"); ++ return retv; ++ } ++ return ret; ++} ++ ++static int rxm_av_insertsym(struct fid_av *av_fid, const char *node, ++ size_t nodecnt, const char *service, size_t svccnt, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ struct util_av *av = container_of(av_fid, struct util_av, av_fid); ++ void *addr; ++ size_t addrlen, count = nodecnt * svccnt; ++ int ret, retv; ++ ++ ret = ofi_verify_av_insert(av, flags); ++ if (ret) ++ return ret; ++ ++ ret = ofi_ip_av_sym_getaddr(av, node, nodecnt, service, ++ svccnt, &addr, &addrlen); ++ if (ret <= 0) ++ return ret; ++ ++ assert(ret == count); ++ ++ ret = ofi_ip_av_insertv(av, addr, addrlen, count, fi_addr, context); ++ if (ret < 0) ++ goto out; ++ ++ if (!av->eq && !ret) ++ goto out; ++ ++ retv = rxm_av_insert_cmap(av_fid, addr, count, fi_addr, flags); ++ if (retv) { ++ ret = rxm_av_remove(av_fid, fi_addr, count, flags); ++ if (ret) ++ FI_WARN(&rxm_prov, FI_LOG_AV, "Failed to remove addr " ++ "from AV during error handling\n"); ++ ret = retv; ++ } ++out: ++ free(addr); ++ return ret; ++ ++} ++ ++int rxm_av_insertsvc(struct fid_av *av, const char *node, const char *service, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ return rxm_av_insertsym(av, node, 1, service, 1, fi_addr, flags, context); ++} ++ ++static const char * ++rxm_av_straddr(struct fid_av *av_fid, const void *addr, char *buf, size_t *len) ++{ ++ return ofi_ip_av_straddr(av_fid, addr, buf, len); ++} ++ ++int rxm_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, ++ void *addr, size_t *addrlen) ++{ ++ return ofi_ip_av_lookup(av_fid, fi_addr, addr, addrlen); ++} ++ ++ ++static struct fi_ops_av rxm_av_ops = { ++ .size = sizeof(struct fi_ops_av), ++ .insert = rxm_av_insert, ++ .insertsvc = rxm_av_insertsvc, ++ .insertsym = rxm_av_insertsym, ++ .remove = rxm_av_remove, ++ .lookup = rxm_av_lookup, ++ .straddr = rxm_av_straddr, ++}; ++ ++int rxm_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context) ++{ ++ int ret; ++ ++ ret = ofi_ip_av_create(domain_fid, attr, av, context); ++ if (ret) ++ return ret; ++ ++ (*av)->ops = &rxm_av_ops; ++ return 0; ++} ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_conn.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_conn.c +index 0d1af1d..05b4ae8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_conn.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_conn.c +@@ -37,6 +37,790 @@ + #include + #include "rxm.h" + ++static struct rxm_cmap_handle *rxm_conn_alloc(struct rxm_cmap *cmap); ++static void rxm_conn_connected_handler(struct rxm_cmap_handle *handle); ++static void rxm_conn_close_saved(struct rxm_cmap_handle *handle); ++static void rxm_conn_close(struct rxm_cmap_handle *handle); ++static void rxm_conn_save(struct rxm_cmap_handle *handle); ++static int ++rxm_conn_connect(struct util_ep *util_ep, struct rxm_cmap_handle *handle, ++ const void *addr); ++static int rxm_conn_signal(struct util_ep *util_ep, void *context, ++ enum rxm_cmap_signal signal); ++static void ++rxm_conn_av_updated_handler(struct rxm_cmap_handle *handle); ++static void *rxm_conn_progress(void *arg); ++static void *rxm_conn_eq_read(void *arg); ++ ++ ++/* ++ * Connection map ++ */ ++ ++/* Caller should hold cmap->lock */ ++static void rxm_cmap_set_key(struct rxm_cmap_handle *handle) ++{ ++ handle->key = ofi_idx2key(&handle->cmap->key_idx, ++ ofi_idx_insert(&handle->cmap->handles_idx, handle)); ++} ++ ++/* Caller should hold cmap->lock */ ++static void rxm_cmap_clear_key(struct rxm_cmap_handle *handle) ++{ ++ int index = ofi_key2idx(&handle->cmap->key_idx, handle->key); ++ ++ if (!ofi_idx_is_valid(&handle->cmap->handles_idx, index)) ++ FI_WARN(handle->cmap->av->prov, FI_LOG_AV, "Invalid key!\n"); ++ else ++ ofi_idx_remove(&handle->cmap->handles_idx, index); ++} ++ ++struct rxm_cmap_handle *rxm_cmap_key2handle(struct rxm_cmap *cmap, uint64_t key) ++{ ++ struct rxm_cmap_handle *handle; ++ ++ cmap->acquire(&cmap->lock); ++ if (!(handle = ofi_idx_lookup(&cmap->handles_idx, ++ ofi_key2idx(&cmap->key_idx, key)))) { ++ FI_WARN(cmap->av->prov, FI_LOG_AV, "Invalid key!\n"); ++ } else { ++ if (handle->key != key) { ++ FI_WARN(cmap->av->prov, FI_LOG_AV, ++ "handle->key not matching given key\n"); ++ handle = NULL; ++ } ++ } ++ cmap->release(&cmap->lock); ++ return handle; ++} ++ ++/* Caller must hold cmap->lock */ ++static void rxm_cmap_init_handle(struct rxm_cmap_handle *handle, ++ struct rxm_cmap *cmap, ++ enum rxm_cmap_state state, ++ fi_addr_t fi_addr, ++ struct rxm_cmap_peer *peer) ++{ ++ handle->cmap = cmap; ++ handle->state = state; ++ rxm_cmap_set_key(handle); ++ handle->fi_addr = fi_addr; ++ handle->peer = peer; ++} ++ ++static int rxm_cmap_match_peer(struct dlist_entry *entry, const void *addr) ++{ ++ struct rxm_cmap_peer *peer; ++ ++ peer = container_of(entry, struct rxm_cmap_peer, entry); ++ return !memcmp(peer->addr, addr, peer->handle->cmap->av->addrlen); ++} ++ ++/* Caller must hold cmap->lock */ ++static int rxm_cmap_del_handle(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_cmap *cmap = handle->cmap; ++ int ret; ++ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Deleting connection handle: %p\n", handle); ++ if (handle->peer) { ++ dlist_remove(&handle->peer->entry); ++ free(handle->peer); ++ handle->peer = NULL; ++ } else { ++ cmap->handles_av[handle->fi_addr] = 0; ++ } ++ rxm_cmap_clear_key(handle); ++ ++ handle->state = RXM_CMAP_SHUTDOWN; ++ /* Signal CM thread to delete the handle. This is required ++ * so that the CM thread handles any pending events for this ++ * ep correctly. Handle would be freed finally after processing the ++ * events */ ++ ret = rxm_conn_signal(cmap->ep, handle, RXM_CMAP_FREE); ++ if (ret) { ++ FI_WARN(cmap->av->prov, FI_LOG_FABRIC, ++ "Unable to signal CM thread\n"); ++ return ret; ++ } ++ return 0; ++} ++ ++static inline int ++rxm_cmap_check_and_realloc_handles_table(struct rxm_cmap *cmap, ++ fi_addr_t fi_addr) ++{ ++ void *new_handles; ++ size_t grow_size; ++ ++ if (OFI_LIKELY(fi_addr < cmap->num_allocated)) ++ return 0; ++ ++ grow_size = MAX(cmap->av->count, fi_addr - cmap->num_allocated + 1); ++ ++ new_handles = realloc(cmap->handles_av, ++ (grow_size + cmap->num_allocated) * ++ sizeof(*cmap->handles_av)); ++ if (OFI_LIKELY(!new_handles)) ++ return -FI_ENOMEM; ++ ++ cmap->handles_av = new_handles; ++ memset(&cmap->handles_av[cmap->num_allocated], 0, ++ sizeof(*cmap->handles_av) * grow_size); ++ cmap->num_allocated += grow_size; ++ return 0; ++} ++ ++void rxm_cmap_del_handle_ts(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_cmap *cmap = handle->cmap; ++ cmap->acquire(&cmap->lock); ++ rxm_cmap_del_handle(handle); ++ cmap->release(&cmap->lock); ++} ++ ++static struct rxm_pkt * ++rxm_conn_inject_pkt_alloc(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ uint8_t op, uint64_t flags) ++{ ++ struct rxm_pkt *inject_pkt; ++ int ret = ofi_memalign((void **) &inject_pkt, 16, ++ rxm_ep->inject_limit + sizeof(*inject_pkt)); ++ ++ if (ret) ++ return NULL; ++ ++ memset(inject_pkt, 0, rxm_ep->inject_limit + sizeof(*inject_pkt)); ++ inject_pkt->ctrl_hdr.version = RXM_CTRL_VERSION; ++ inject_pkt->ctrl_hdr.type = ofi_ctrl_data; ++ inject_pkt->hdr.version = OFI_OP_VERSION; ++ inject_pkt->hdr.op = op; ++ inject_pkt->hdr.flags = flags; ++ ++ return inject_pkt; ++} ++static void rxm_conn_res_free(struct rxm_conn *rxm_conn) ++{ ++ ofi_freealign(rxm_conn->inject_pkt); ++ rxm_conn->inject_pkt = NULL; ++ ofi_freealign(rxm_conn->inject_data_pkt); ++ rxm_conn->inject_data_pkt = NULL; ++ ofi_freealign(rxm_conn->tinject_pkt); ++ rxm_conn->tinject_pkt = NULL; ++ ofi_freealign(rxm_conn->tinject_data_pkt); ++ rxm_conn->tinject_data_pkt = NULL; ++} ++static int rxm_conn_res_alloc(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn) ++{ ++ dlist_init(&rxm_conn->deferred_conn_entry); ++ dlist_init(&rxm_conn->deferred_tx_queue); ++ dlist_init(&rxm_conn->sar_rx_msg_list); ++ ++ if (rxm_ep->util_ep.domain->threading != FI_THREAD_SAFE) { ++ rxm_conn->inject_pkt = ++ rxm_conn_inject_pkt_alloc(rxm_ep, rxm_conn, ++ ofi_op_msg, 0); ++ rxm_conn->inject_data_pkt = ++ rxm_conn_inject_pkt_alloc(rxm_ep, rxm_conn, ++ ofi_op_msg, FI_REMOTE_CQ_DATA); ++ rxm_conn->tinject_pkt = ++ rxm_conn_inject_pkt_alloc(rxm_ep, rxm_conn, ++ ofi_op_tagged, 0); ++ rxm_conn->tinject_data_pkt = ++ rxm_conn_inject_pkt_alloc(rxm_ep, rxm_conn, ++ ofi_op_tagged, FI_REMOTE_CQ_DATA); ++ ++ if (!rxm_conn->inject_pkt || !rxm_conn->inject_data_pkt || ++ !rxm_conn->tinject_pkt || !rxm_conn->tinject_data_pkt) { ++ rxm_conn_res_free(rxm_conn); ++ return -FI_ENOMEM; ++ } ++ } ++ ++ return 0; ++} ++ ++static void rxm_conn_free(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ ++ /* This handles case when saved_msg_ep wasn't closed */ ++ if (rxm_conn->saved_msg_ep) { ++ if (fi_close(&rxm_conn->saved_msg_ep->fid)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to close saved msg_ep\n"); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closed saved msg_ep\n"); ++ } ++ rxm_conn->saved_msg_ep = NULL; ++ } ++ ++ if (!rxm_conn->msg_ep) ++ return; ++ /* Assuming fi_close also shuts down the connection gracefully if the ++ * endpoint is in connected state */ ++ if (fi_close(&rxm_conn->msg_ep->fid)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to close msg_ep\n"); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closed msg_ep\n"); ++ } ++ rxm_conn->msg_ep = NULL; ++ ++ rxm_conn_res_free(rxm_conn); ++ ++ free(container_of(handle, struct rxm_conn, handle)); ++} ++ ++/* Caller must hold cmap->lock */ ++static int rxm_cmap_alloc_handle(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ enum rxm_cmap_state state, ++ struct rxm_cmap_handle **handle) ++{ ++ int ret; ++ ++ *handle = rxm_conn_alloc(cmap); ++ if (OFI_UNLIKELY(!*handle)) ++ return -FI_ENOMEM; ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Allocated handle: %p for fi_addr: %" PRIu64 "\n", ++ *handle, fi_addr); ++ ret = rxm_cmap_check_and_realloc_handles_table(cmap, fi_addr); ++ if (OFI_UNLIKELY(ret)) { ++ rxm_conn_free(*handle); ++ return ret; ++ } ++ rxm_cmap_init_handle(*handle, cmap, state, fi_addr, NULL); ++ cmap->handles_av[fi_addr] = *handle; ++ return 0; ++} ++ ++/* Caller must hold cmap->lock */ ++static int rxm_cmap_alloc_handle_peer(struct rxm_cmap *cmap, void *addr, ++ enum rxm_cmap_state state, ++ struct rxm_cmap_handle **handle) ++{ ++ struct rxm_cmap_peer *peer; ++ ++ peer = calloc(1, sizeof(*peer) + cmap->av->addrlen); ++ if (!peer) ++ return -FI_ENOMEM; ++ *handle = rxm_conn_alloc(cmap); ++ if (!*handle) { ++ free(peer); ++ return -FI_ENOMEM; ++ } ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_AV, "Allocated handle for addr", ++ addr); ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "handle: %p\n", *handle); ++ rxm_cmap_init_handle(*handle, cmap, state, FI_ADDR_NOTAVAIL, peer); ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Adding handle to peer list\n"); ++ peer->handle = *handle; ++ memcpy(peer->addr, addr, cmap->av->addrlen); ++ dlist_insert_tail(&peer->entry, &cmap->peer_list); ++ return 0; ++} ++ ++/* Caller must hold cmap->lock */ ++static struct rxm_cmap_handle * ++rxm_cmap_get_handle_peer(struct rxm_cmap *cmap, const void *addr) ++{ ++ struct rxm_cmap_peer *peer; ++ struct dlist_entry *entry; ++ ++ entry = dlist_find_first_match(&cmap->peer_list, rxm_cmap_match_peer, ++ addr); ++ if (!entry) ++ return NULL; ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_AV, ++ "handle found in peer list for addr", addr); ++ peer = container_of(entry, struct rxm_cmap_peer, entry); ++ return peer->handle; ++} ++ ++int rxm_cmap_move_handle_to_peer_list(struct rxm_cmap *cmap, int index) ++{ ++ struct rxm_cmap_handle *handle; ++ int ret = 0; ++ ++ cmap->acquire(&cmap->lock); ++ handle = cmap->handles_av[index]; ++ if (!handle) ++ goto unlock; ++ ++ handle->peer = calloc(1, sizeof(*handle->peer) + cmap->av->addrlen); ++ if (!handle->peer) { ++ ret = -FI_ENOMEM; ++ goto unlock; ++ } ++ handle->fi_addr = FI_ADDR_NOTAVAIL; ++ cmap->handles_av[index] = NULL; ++ handle->peer->handle = handle; ++ memcpy(handle->peer->addr, ofi_av_get_addr(cmap->av, index), ++ cmap->av->addrlen); ++ dlist_insert_tail(&handle->peer->entry, &cmap->peer_list); ++unlock: ++ cmap->release(&cmap->lock); ++ return ret; ++} ++ ++/* Caller must hold cmap->lock */ ++static int rxm_cmap_move_handle(struct rxm_cmap_handle *handle, ++ fi_addr_t fi_addr) ++{ ++ int ret; ++ ++ dlist_remove(&handle->peer->entry); ++ free(handle->peer); ++ handle->peer = NULL; ++ handle->fi_addr = fi_addr; ++ ret = rxm_cmap_check_and_realloc_handles_table(handle->cmap, fi_addr); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ handle->cmap->handles_av[fi_addr] = handle; ++ return 0; ++} ++ ++int rxm_cmap_update(struct rxm_cmap *cmap, const void *addr, fi_addr_t fi_addr) ++{ ++ struct rxm_cmap_handle *handle; ++ int ret; ++ ++ cmap->acquire(&cmap->lock); ++ /* Check whether we have already allocated a handle for this `fi_addr`. */ ++ /* We rely on the fact that `ofi_ip_av_insert`/`ofi_av_insert_addr` returns ++ * the same `fi_addr` for the equal addresses */ ++ if (fi_addr < cmap->num_allocated) { ++ handle = rxm_cmap_acquire_handle(cmap, fi_addr); ++ if (handle) { ++ cmap->release(&cmap->lock); ++ return 0; ++ } ++ } ++ ++ handle = rxm_cmap_get_handle_peer(cmap, addr); ++ if (!handle) { ++ ret = rxm_cmap_alloc_handle(cmap, fi_addr, ++ RXM_CMAP_IDLE, &handle); ++ cmap->release(&cmap->lock); ++ return ret; ++ } ++ ret = rxm_cmap_move_handle(handle, fi_addr); ++ cmap->release(&cmap->lock); ++ if (ret) ++ return ret; ++ ++ rxm_conn_av_updated_handler(handle); ++ return 0; ++} ++ ++void rxm_cmap_process_shutdown(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle) ++{ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing shutdown for handle: %p\n", handle); ++ cmap->acquire(&cmap->lock); ++ if (handle->state > RXM_CMAP_SHUTDOWN) { ++ FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Invalid handle on shutdown event\n"); ++ } else if (handle->state != RXM_CMAP_SHUTDOWN) { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Got remote shutdown\n"); ++ rxm_cmap_del_handle(handle); ++ } else { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Got local shutdown\n"); ++ } ++ cmap->release(&cmap->lock); ++} ++ ++/* Caller must hold cmap->lock */ ++void rxm_cmap_process_conn_notify(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle) ++{ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing connection notification for handle: %p.\n", handle); ++ handle->state = RXM_CMAP_CONNECTED; ++ rxm_conn_connected_handler(handle); ++} ++ ++/* Caller must hold cmap->lock */ ++void rxm_cmap_process_connect(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle, ++ uint64_t *remote_key) ++{ ++ struct rxm_conn *rxm_conn; ++ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing connect for handle: %p\n", handle); ++ handle->state = RXM_CMAP_CONNECTED_NOTIFY; ++ if (remote_key) ++ handle->remote_key = *remote_key; ++ ++ /* Set the remote key to the inject packets */ ++ if (cmap->ep->domain->threading != FI_THREAD_SAFE) { ++ rxm_conn = container_of(handle, struct rxm_conn, handle); ++ ++ rxm_conn->inject_pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ rxm_conn->inject_data_pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ rxm_conn->tinject_pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ rxm_conn->tinject_data_pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ } ++} ++ ++void rxm_cmap_process_reject(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle, ++ enum rxm_cmap_reject_flag cm_reject_flag) ++{ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing reject for handle: %p\n", handle); ++ cmap->acquire(&cmap->lock); ++ switch (handle->state) { ++ case RXM_CMAP_CONNREQ_RECV: ++ case RXM_CMAP_CONNECTED: ++ case RXM_CMAP_CONNECTED_NOTIFY: ++ /* Handle is being re-used for incoming connection request */ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Connection handle is being re-used. Close saved connection\n"); ++ rxm_conn_close_saved(handle); ++ break; ++ case RXM_CMAP_CONNREQ_SENT: ++ if (cm_reject_flag == RXM_CMAP_REJECT_GENUINE) { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Deleting connection handle\n"); ++ rxm_cmap_del_handle(handle); ++ } else { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Connection handle is being re-used. Close the connection\n"); ++ rxm_conn_close(handle); ++ } ++ break; ++ case RXM_CMAP_SHUTDOWN: ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Connection handle already being deleted\n"); ++ break; ++ default: ++ FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, "Invalid cmap state: " ++ "%d when receiving connection reject\n", handle->state); ++ assert(0); ++ } ++ cmap->release(&cmap->lock); ++} ++ ++int rxm_cmap_process_connreq(struct rxm_cmap *cmap, void *addr, ++ struct rxm_cmap_handle **handle_ret, ++ enum rxm_cmap_reject_flag *cm_reject_flag) ++{ ++ struct rxm_cmap_handle *handle; ++ int ret = 0, cmp; ++ fi_addr_t fi_addr = ofi_ip_av_get_fi_addr(cmap->av, addr); ++ ++ /* Reset flag to initial state */ ++ *cm_reject_flag = RXM_CMAP_REJECT_GENUINE; ++ ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing connreq for addr", addr); ++ ++ cmap->acquire(&cmap->lock); ++ if (fi_addr == FI_ADDR_NOTAVAIL) ++ handle = rxm_cmap_get_handle_peer(cmap, addr); ++ else ++ handle = rxm_cmap_acquire_handle(cmap, fi_addr); ++ ++ if (!handle) { ++ if (fi_addr == FI_ADDR_NOTAVAIL) ++ ret = rxm_cmap_alloc_handle_peer(cmap, addr, ++ RXM_CMAP_CONNREQ_RECV, ++ &handle); ++ else ++ ret = rxm_cmap_alloc_handle(cmap, fi_addr, ++ RXM_CMAP_CONNREQ_RECV, ++ &handle); ++ if (ret) ++ goto unlock; ++ } ++ ++ switch (handle->state) { ++ case RXM_CMAP_CONNECTED_NOTIFY: ++ case RXM_CMAP_CONNECTED: ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Connection already present.\n"); ++ ret = -FI_EALREADY; ++ break; ++ case RXM_CMAP_CONNREQ_SENT: ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, "local_name", ++ cmap->attr.name); ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, "remote_name", ++ addr); ++ ++ cmp = ofi_addr_cmp(cmap->av->prov, addr, cmap->attr.name); ++ ++ if (cmp < 0) { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Remote name lower than local name.\n"); ++ *cm_reject_flag = RXM_CMAP_REJECT_SIMULT_CONN; ++ ret = -FI_EALREADY; ++ break; ++ } else if (cmp > 0) { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Re-using handle: %p to accept remote " ++ "connection\n", handle); ++ /* Re-use handle. If it receives FI_REJECT the handle ++ * would not be deleted in this state */ ++ rxm_conn_save(handle); ++ } else { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Endpoint connects to itself\n"); ++ ret = rxm_cmap_alloc_handle_peer(cmap, addr, ++ RXM_CMAP_CONNREQ_RECV, ++ &handle); ++ if (ret) ++ goto unlock; ++ assert(fi_addr != FI_ADDR_NOTAVAIL); ++ handle->fi_addr = fi_addr; ++ } ++ /* Fall through */ ++ case RXM_CMAP_IDLE: ++ handle->state = RXM_CMAP_CONNREQ_RECV; ++ /* Fall through */ ++ case RXM_CMAP_CONNREQ_RECV: ++ *handle_ret = handle; ++ break; ++ default: ++ FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Invalid cmap state\n"); ++ assert(0); ++ ret = -FI_EOPBADSTATE; ++ } ++unlock: ++ cmap->release(&cmap->lock); ++ return ret; ++} ++ ++/* Caller must hold `cmap::lock` */ ++static int rxm_cmap_handle_connect(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ struct rxm_cmap_handle *handle) ++{ ++ int ret; ++ ++ switch (handle->state) { ++ case RXM_CMAP_CONNECTED_NOTIFY: ++ rxm_cmap_process_conn_notify(cmap, handle); ++ /* Fall through */ ++ case RXM_CMAP_CONNECTED: ++ return FI_SUCCESS; ++ case RXM_CMAP_IDLE: ++ ret = rxm_conn_connect(cmap->ep, handle, ++ ofi_av_get_addr(cmap->av, fi_addr)); ++ if (ret) { ++ rxm_cmap_del_handle(handle); ++ return ret; ++ } ++ handle->state = RXM_CMAP_CONNREQ_SENT; ++ ret = -FI_EAGAIN; ++ // TODO sleep on event fd instead of busy polling ++ break; ++ case RXM_CMAP_CONNREQ_SENT: ++ case RXM_CMAP_CONNREQ_RECV: ++ case RXM_CMAP_ACCEPT: ++ case RXM_CMAP_SHUTDOWN: ++ ret = -FI_EAGAIN; ++ break; ++ default: ++ FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Invalid cmap handle state\n"); ++ assert(0); ++ ret = -FI_EOPBADSTATE; ++ } ++ return ret; ++} ++ ++/* Caller must hold cmap->lock */ ++int rxm_cmap_handle_unconnected(struct rxm_ep *rxm_ep, struct rxm_cmap_handle *handle, ++ fi_addr_t dest_addr) ++{ ++ /* Progress connection events */ ++ rxm_ep->cmap->release(&rxm_ep->cmap->lock); ++ if (!slistfd_empty(&rxm_ep->msg_eq_entry_list)) ++ rxm_conn_process_eq_events(rxm_ep); ++ rxm_ep->cmap->acquire(&rxm_ep->cmap->lock); ++ ++ return rxm_cmap_handle_connect(rxm_ep->cmap, dest_addr, handle); ++} ++ ++int rxm_cmap_get_handle(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ struct rxm_cmap_handle **handle_ret) ++{ ++ int ret; ++ ++ cmap->acquire(&cmap->lock); ++ *handle_ret = rxm_cmap_acquire_handle(cmap, fi_addr); ++ if (OFI_UNLIKELY(!*handle_ret)) { ++ ret = -FI_EAGAIN; ++ goto unlock; ++ } ++ ++ ret = rxm_cmap_handle_connect(cmap, fi_addr, *handle_ret); ++unlock: ++ cmap->release(&cmap->lock); ++ return ret; ++} ++ ++static int rxm_cmap_cm_thread_close(struct rxm_cmap *cmap) ++{ ++ int ret; ++ ++ ret = rxm_conn_signal(cmap->ep, NULL, RXM_CMAP_EXIT); ++ if (ret) { ++ FI_WARN(cmap->av->prov, FI_LOG_FABRIC, ++ "Unable to signal CM thread\n"); ++ return ret; ++ } ++ /* Release lock so that CM thread could process shutdown events */ ++ cmap->release(&cmap->lock); ++ ret = pthread_join(cmap->cm_thread, NULL); ++ cmap->acquire(&cmap->lock); ++ if (ret) { ++ FI_WARN(cmap->av->prov, FI_LOG_FABRIC, ++ "Unable to join CM thread\n"); ++ return ret; ++ } ++ return 0; ++} ++ ++static int rxm_conn_cleanup(void *arg) ++{ ++ return rxm_conn_process_eq_events(container_of(arg, struct rxm_ep, ++ util_ep)); ++} ++ ++ ++void rxm_cmap_free(struct rxm_cmap *cmap) ++{ ++ struct rxm_cmap_peer *peer; ++ struct dlist_entry *entry; ++ size_t i; ++ ++ cmap->acquire(&cmap->lock); ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Closing cmap\n"); ++ for (i = 0; i < cmap->num_allocated; i++) { ++ if (cmap->handles_av[i]) ++ rxm_cmap_del_handle(cmap->handles_av[i]); ++ } ++ while(!dlist_empty(&cmap->peer_list)) { ++ entry = cmap->peer_list.next; ++ peer = container_of(entry, struct rxm_cmap_peer, entry); ++ rxm_cmap_del_handle(peer->handle); ++ } ++ rxm_cmap_cm_thread_close(cmap); ++ cmap->release(&cmap->lock); ++ ++ /* cleanup function would be used in manual progress mode */ ++ if (cmap->ep->domain->data_progress != FI_PROGRESS_AUTO) ++ rxm_conn_cleanup(cmap->ep); ++ ++ free(cmap->handles_av); ++ free(cmap->attr.name); ++ ofi_idx_reset(&cmap->handles_idx); ++ if (!cmap->attr.serial_access) ++ fastlock_destroy(&cmap->lock); ++ free(cmap); ++} ++ ++static int ++rxm_cmap_update_addr(struct util_av *av, void *addr, ++ fi_addr_t fi_addr, void *arg) ++{ ++ return rxm_cmap_update((struct rxm_cmap *)arg, addr, fi_addr); ++} ++ ++int rxm_cmap_bind_to_av(struct rxm_cmap *cmap, struct util_av *av) ++{ ++ cmap->av = av; ++ return ofi_av_elements_iter(av, rxm_cmap_update_addr, (void *)cmap); ++} ++ ++int rxm_cmap_alloc(struct rxm_ep *rxm_ep, struct rxm_cmap_attr *attr) ++{ ++ struct rxm_cmap *cmap; ++ struct util_ep *ep = &rxm_ep->util_ep; ++ int ret; ++ ++ cmap = calloc(1, sizeof *cmap); ++ if (!cmap) ++ return -FI_ENOMEM; ++ ++ cmap->ep = ep; ++ cmap->av = ep->av; ++ ++ cmap->handles_av = calloc(cmap->av->count, sizeof(*cmap->handles_av)); ++ if (!cmap->handles_av) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ cmap->num_allocated = ep->av->count; ++ ++ cmap->attr = *attr; ++ cmap->attr.name = mem_dup(attr->name, ep->av->addrlen); ++ if (!cmap->attr.name) { ++ ret = -FI_ENOMEM; ++ goto err2; ++ } ++ ++ memset(&cmap->handles_idx, 0, sizeof(cmap->handles_idx)); ++ ofi_key_idx_init(&cmap->key_idx, RXM_CMAP_IDX_BITS); ++ ++ dlist_init(&cmap->peer_list); ++ ++ if (cmap->attr.serial_access) { ++ cmap->acquire = ofi_fastlock_acquire_noop; ++ cmap->release = ofi_fastlock_release_noop; ++ } else { ++ fastlock_init(&cmap->lock); ++ cmap->acquire = ofi_fastlock_acquire; ++ cmap->release = ofi_fastlock_release; ++ } ++ ++ rxm_ep->cmap = cmap; ++ ++ if (ep->domain->data_progress == FI_PROGRESS_AUTO) { ++ if (pthread_create(&cmap->cm_thread, 0, ++ rxm_conn_progress, ep)) { ++ FI_WARN(ep->av->prov, FI_LOG_FABRIC, ++ "Unable to create cmap thread\n"); ++ ret = -ofi_syserr(); ++ goto err3; ++ } ++ } else { ++ if (pthread_create(&cmap->cm_thread, 0, ++ rxm_conn_eq_read, ep)) { ++ FI_WARN(ep->av->prov, FI_LOG_FABRIC, ++ "Unable to create cmap thread\n"); ++ ret = -ofi_syserr(); ++ goto err3; ++ } ++ } ++ ++ assert(ep->av); ++ ret = rxm_cmap_bind_to_av(cmap, ep->av); ++ if (ret) ++ goto err4; ++ ++ return FI_SUCCESS; ++err4: ++ rxm_cmap_cm_thread_close(cmap); ++err3: ++ rxm_ep->cmap = NULL; ++ free(cmap->attr.name); ++err2: ++ free(cmap->handles_av); ++err1: ++ free(cmap); ++ return ret; ++} ++ + static int rxm_msg_ep_open(struct rxm_ep *rxm_ep, struct fi_info *msg_info, + struct rxm_conn *rxm_conn, void *context) + { +@@ -82,7 +866,7 @@ static int rxm_msg_ep_open(struct rxm_ep *rxm_ep, struct fi_info *msg_info, + } + + if (!rxm_ep->srx_ctx) { +- ret = rxm_ep_prepost_buf(rxm_ep, msg_ep); ++ ret = rxm_msg_ep_prepost_recv(rxm_ep, msg_ep); + if (ret) + goto err; + } +@@ -94,48 +878,237 @@ err: + return ret; + } + +-void rxm_conn_close(struct util_cmap_handle *handle) ++static void rxm_conn_close(struct rxm_cmap_handle *handle) + { +- struct rxm_conn *rxm_conn = container_of(handle, struct rxm_conn, handle); ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ + if (!rxm_conn->msg_ep) + return; + ++ if (handle->cmap->attr.serial_access) { ++ if (fi_close(&rxm_conn->msg_ep->fid)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to close msg_ep\n"); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closed msg_ep\n"); ++ } ++ } else { ++ rxm_conn->saved_msg_ep = rxm_conn->msg_ep; ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Saved MSG EP fid for further deletion in main thread\n"); ++ } ++ rxm_conn->msg_ep = NULL; ++ ++ rxm_conn_res_free(rxm_conn); ++} ++ ++static void rxm_conn_save(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ ++ if (!rxm_conn->msg_ep) ++ return; ++ ++ rxm_conn->saved_msg_ep = rxm_conn->msg_ep; ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Saved MSG EP fid for further deletion\n"); ++ rxm_conn->msg_ep = NULL; ++} ++ ++static void rxm_conn_close_saved(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ ++ if (!rxm_conn->saved_msg_ep) ++ return; ++ ++ /* If user doesn't guarantee for serializing access to cmap ++ * objects, postpone the closing of the saved MSG EP for ++ * further deletion in main thread */ ++ if (handle->cmap->attr.serial_access) { ++ if (fi_close(&rxm_conn->saved_msg_ep->fid)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to close saved msg_ep\n"); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closed saved msg_ep\n"); ++ } ++ rxm_conn->saved_msg_ep = NULL; ++ } ++} ++ ++static void rxm_conn_connected_handler(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_conn *rxm_conn = container_of(handle, struct rxm_conn, handle); ++ ++ if (!rxm_conn->saved_msg_ep) ++ return; + /* Assuming fi_close also shuts down the connection gracefully if the + * endpoint is in connected state */ +- if (fi_close(&rxm_conn->msg_ep->fid)) +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg_ep\n"); +- FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Closed msg_ep\n"); +- rxm_conn->msg_ep = NULL; ++ if (fi_close(&rxm_conn->saved_msg_ep->fid)) ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close saved msg_ep\n"); ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Closed saved msg_ep\n"); ++ rxm_conn->saved_msg_ep = NULL; + } + +-static void rxm_conn_free(struct util_cmap_handle *handle) ++static int rxm_conn_reprocess_directed_recvs(struct rxm_recv_queue *recv_queue) + { +- rxm_conn_close(handle); +- free(container_of(handle, struct rxm_conn, handle)); ++ struct rxm_rx_buf *rx_buf; ++ struct dlist_entry *entry, *tmp_entry; ++ struct rxm_recv_match_attr match_attr; ++ struct fi_cq_err_entry err_entry = {0}; ++ int ret, count = 0; ++ ++ ofi_ep_lock_acquire(&recv_queue->rxm_ep->util_ep); ++ dlist_foreach_container_safe(&recv_queue->unexp_msg_list, ++ struct rxm_rx_buf, rx_buf, ++ unexp_msg.entry, tmp_entry) { ++ if (rx_buf->unexp_msg.addr == rx_buf->conn->handle.fi_addr) ++ continue; ++ ++ assert(rx_buf->unexp_msg.addr == FI_ADDR_NOTAVAIL); ++ ++ rx_buf->unexp_msg.addr = rx_buf->conn->handle.fi_addr; ++ match_attr.addr = rx_buf->unexp_msg.addr; ++ match_attr.tag = rx_buf->unexp_msg.tag; ++ ++ entry = dlist_remove_first_match(&recv_queue->recv_list, ++ recv_queue->match_recv, ++ &match_attr); ++ if (!entry) ++ continue; ++ ++ dlist_remove(&rx_buf->unexp_msg.entry); ++ rx_buf->recv_entry = container_of(entry, struct rxm_recv_entry, ++ entry); ++ ++ ret = rxm_cq_handle_rx_buf(rx_buf); ++ if (ret) { ++ err_entry.op_context = rx_buf; ++ err_entry.flags = rx_buf->recv_entry->comp_flags; ++ err_entry.len = rx_buf->pkt.hdr.size; ++ err_entry.data = rx_buf->pkt.hdr.data; ++ err_entry.tag = rx_buf->pkt.hdr.tag; ++ err_entry.err = ret; ++ err_entry.prov_errno = ret; ++ ofi_cq_write_error(recv_queue->rxm_ep->util_ep.rx_cq, ++ &err_entry); ++ if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) ++ rxm_cntr_incerr(rx_buf->ep->util_ep.rx_cntr); ++ ++ rxm_rx_buf_release(recv_queue->rxm_ep, rx_buf); ++ ++ if (!(rx_buf->recv_entry->flags & FI_MULTI_RECV)) ++ rxm_recv_entry_release(recv_queue, ++ rx_buf->recv_entry); ++ } ++ count++; ++ } ++ ofi_ep_lock_release(&recv_queue->rxm_ep->util_ep); ++ ++ return count; ++} ++ ++static void ++rxm_conn_av_updated_handler(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_ep *rxm_ep = container_of(handle->cmap->ep, struct rxm_ep, util_ep); ++ int count = 0; ++ ++ if (rxm_ep->rxm_info->caps & FI_DIRECTED_RECV) { ++ count += rxm_conn_reprocess_directed_recvs(&rxm_ep->recv_queue); ++ count += rxm_conn_reprocess_directed_recvs(&rxm_ep->trecv_queue); ++ ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Reprocessed directed recvs - %d\n", count); ++ } + } + +-static struct util_cmap_handle *rxm_conn_alloc(void) ++static struct rxm_cmap_handle *rxm_conn_alloc(struct rxm_cmap *cmap) + { + struct rxm_conn *rxm_conn = calloc(1, sizeof(*rxm_conn)); ++ + if (OFI_UNLIKELY(!rxm_conn)) + return NULL; + +- dlist_init(&rxm_conn->postponed_tx_list); + return &rxm_conn->handle; + } + ++static inline int ++rxm_conn_verify_cm_data(struct rxm_cm_data *remote_cm_data, ++ struct rxm_cm_data *local_cm_data) ++{ ++ if (remote_cm_data->proto.endianness != local_cm_data->proto.endianness) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "endianness of two peers (%"PRIu8" vs %"PRIu8")" ++ "are mismatched\n", ++ remote_cm_data->proto.endianness, ++ local_cm_data->proto.endianness); ++ goto err; ++ } ++ if (remote_cm_data->proto.ctrl_version != local_cm_data->proto.ctrl_version) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "ctrl_version of two peers (%"PRIu8" vs %"PRIu8")" ++ "are mismatched\n", ++ remote_cm_data->proto.ctrl_version, ++ local_cm_data->proto.ctrl_version); ++ goto err; ++ } ++ if (remote_cm_data->proto.op_version != local_cm_data->proto.op_version) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "op_version of two peers (%"PRIu8" vs %"PRIu8")" ++ "are mismatched\n", ++ remote_cm_data->proto.op_version, ++ local_cm_data->proto.op_version); ++ goto err; ++ } ++ if (remote_cm_data->proto.eager_size != local_cm_data->proto.eager_size) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "inject_size of two peers (%"PRIu64" vs %"PRIu64")" ++ "are mismatched\n", ++ remote_cm_data->proto.eager_size, ++ local_cm_data->proto.eager_size); ++ goto err; ++ } ++ return FI_SUCCESS; ++err: ++ return -FI_EINVAL; ++} ++ + static int + rxm_msg_process_connreq(struct rxm_ep *rxm_ep, struct fi_info *msg_info, + void *data) + { + struct rxm_conn *rxm_conn; + struct rxm_cm_data *remote_cm_data = data; +- struct rxm_cm_data cm_data; +- struct util_cmap_handle *handle; ++ struct rxm_cm_data cm_data = { ++ .proto = { ++ .ctrl_version = RXM_CTRL_VERSION, ++ .op_version = RXM_OP_VERSION, ++ .endianness = ofi_detect_endianness(), ++ .eager_size = rxm_ep->rxm_info->tx_attr->inject_size, ++ }, ++ }; ++ struct rxm_cmap_handle *handle; + int ret; ++ enum rxm_cmap_reject_flag cm_reject_flag = RXM_CMAP_REJECT_GENUINE; ++ ++ remote_cm_data->proto.eager_size = ntohll(remote_cm_data->proto.eager_size); + +- ret = ofi_cmap_process_connreq(rxm_ep->util_ep.cmap, +- &remote_cm_data->name, &handle); ++ if (rxm_conn_verify_cm_data(remote_cm_data, &cm_data)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "CM data mismatch was detected\n"); ++ ret = -FI_EINVAL; ++ goto err1; ++ } ++ ++ ret = rxm_cmap_process_connreq(rxm_ep->cmap, ++ &remote_cm_data->name, ++ &handle, &cm_reject_flag); + if (ret) + goto err1; + +@@ -148,143 +1121,262 @@ rxm_msg_process_connreq(struct rxm_ep *rxm_ep, struct fi_info *msg_info, + goto err2; + + cm_data.conn_id = rxm_conn->handle.key; ++ cm_data.proto.eager_size = htonll(cm_data.proto.eager_size); + + ret = fi_accept(rxm_conn->msg_ep, &cm_data, sizeof(cm_data)); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_FABRIC, +- "Unable to accept incoming connection\n"); ++ "Unable to accept incoming connection\n"); ++ goto err2; ++ } ++ ++ ret = rxm_conn_res_alloc(rxm_ep, rxm_conn); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_FABRIC, ++ "Unable to allocate TX/RX resources for connection\n"); + goto err2; + } ++ + return ret; + err2: +- ofi_cmap_del_handle(&rxm_conn->handle); ++ rxm_cmap_del_handle_ts(&rxm_conn->handle); + err1: + FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, +- "Rejecting incoming connection request\n"); +- if (fi_reject(rxm_ep->msg_pep, msg_info->handle, NULL, 0)) ++ "Rejecting incoming connection request (reject flag - %d)\n", ++ cm_reject_flag); ++ if (fi_reject(rxm_ep->msg_pep, msg_info->handle, ++ &cm_reject_flag, sizeof(cm_reject_flag))) + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, +- "Unable to reject incoming connection\n"); ++ "Unable to reject incoming connection\n"); + return ret; + } + + static int rxm_conn_handle_notify(struct fi_eq_entry *eq_entry) + { +- switch((enum ofi_cmap_signal)eq_entry->data) { +- case OFI_CMAP_FREE: +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Freeing handle\n"); +- rxm_conn_free((struct util_cmap_handle *)eq_entry->context); ++ if ((enum rxm_cmap_signal)eq_entry->data == RXM_CMAP_FREE) { ++ rxm_conn_free((struct rxm_cmap_handle *)eq_entry->context); + return 0; +- case OFI_CMAP_EXIT: +- FI_TRACE(&rxm_prov, FI_LOG_FABRIC, "Closing event handler\n"); +- return 1; +- default: ++ } else { + FI_WARN(&rxm_prov, FI_LOG_FABRIC, "Unknown cmap signal\n"); +- return 1; ++ assert(0); ++ return -FI_EOTHER; ++ } ++} ++ ++static void rxm_conn_wake_up_wait_obj(struct rxm_ep *rxm_ep) ++{ ++ if (rxm_ep->util_ep.tx_cq && rxm_ep->util_ep.tx_cq->wait) ++ util_cq_signal(rxm_ep->util_ep.tx_cq); ++ if (rxm_ep->util_ep.tx_cntr && rxm_ep->util_ep.tx_cntr->wait) ++ util_cntr_signal(rxm_ep->util_ep.tx_cntr); ++} ++ ++static int ++rxm_conn_handle_event(struct rxm_ep *rxm_ep, struct rxm_msg_eq_entry *entry) ++{ ++ struct rxm_cm_data *cm_data; ++ ++ if (entry->rd == -FI_ECONNREFUSED) { ++ enum rxm_cmap_reject_flag cm_reject_flag; ++ ++ if (OFI_LIKELY(entry->err_entry.err_data_size >= ++ sizeof(enum rxm_cmap_reject_flag))) { ++ assert(entry->err_entry.err_data); ++ cm_reject_flag = *((enum rxm_cmap_reject_flag *) ++ entry->err_entry.err_data); ++ } else { ++ FI_WARN(&rxm_prov, FI_LOG_FABRIC, ++ "Error -FI_ECONNREFUSED was provided without error data\n"); ++ cm_reject_flag = RXM_CMAP_REJECT_GENUINE; ++ } ++ ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Received reject (reject flag - %d)\n", ++ cm_reject_flag); ++ assert((cm_reject_flag == RXM_CMAP_REJECT_GENUINE) || ++ (cm_reject_flag == RXM_CMAP_REJECT_SIMULT_CONN)); ++ rxm_cmap_process_reject(rxm_ep->cmap, entry->context, ++ cm_reject_flag); ++ return 0; ++ } ++ ++ switch(entry->event) { ++ case FI_NOTIFY: ++ if (rxm_conn_handle_notify((struct fi_eq_entry *)&entry->cm_entry)) ++ goto err; ++ break; ++ case FI_CONNREQ: ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Got new connection\n"); ++ if ((size_t)entry->rd != RXM_CM_ENTRY_SZ) { ++ FI_WARN(&rxm_prov, FI_LOG_FABRIC, ++ "Received size (%zd) not matching " ++ "expected (%zu)\n", entry->rd, RXM_CM_ENTRY_SZ); ++ goto err; ++ } ++ rxm_msg_process_connreq(rxm_ep, entry->cm_entry.info, entry->cm_entry.data); ++ fi_freeinfo(entry->cm_entry.info); ++ break; ++ case FI_CONNECTED: ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Connection successful\n"); ++ rxm_ep->cmap->acquire(&rxm_ep->cmap->lock); ++ cm_data = (void *)entry->cm_entry.data; ++ rxm_cmap_process_connect(rxm_ep->cmap, ++ entry->cm_entry.fid->context, ++ ((entry->rd - sizeof(entry->cm_entry)) ? ++ &cm_data->conn_id : NULL)); ++ rxm_conn_wake_up_wait_obj(rxm_ep); ++ rxm_ep->cmap->release(&rxm_ep->cmap->lock); ++ break; ++ case FI_SHUTDOWN: ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Received connection shutdown\n"); ++ rxm_cmap_process_shutdown(rxm_ep->cmap, ++ entry->cm_entry.fid->context); ++ break; ++ default: ++ FI_WARN(&rxm_prov, FI_LOG_FABRIC, ++ "Unknown event: %u\n", entry->event); ++ goto err; + } ++ return 0; ++err: ++ return -FI_EOTHER; + } + +-static void rxm_conn_handle_eq_err(struct rxm_ep *rxm_ep, ssize_t rd) ++int rxm_conn_process_eq_events(struct rxm_ep *rxm_ep) + { +- struct fi_eq_err_entry err_entry = {0}; ++ struct rxm_msg_eq_entry *entry; ++ struct slist_entry *slist_entry; ++ int ret; ++ ++ fastlock_acquire(&rxm_ep->msg_eq_entry_list_lock); ++ while (!slistfd_empty(&rxm_ep->msg_eq_entry_list)) { ++ slist_entry = slistfd_remove_head(&rxm_ep->msg_eq_entry_list); ++ entry = container_of(slist_entry, struct rxm_msg_eq_entry, ++ slist_entry); ++ ++ fastlock_release(&rxm_ep->msg_eq_entry_list_lock); ++ ++ ret = rxm_conn_handle_event(rxm_ep, entry); ++ free(entry); ++ fastlock_acquire(&rxm_ep->msg_eq_entry_list_lock); ++ if (ret) ++ break; ++ } ++ fastlock_release(&rxm_ep->msg_eq_entry_list_lock); ++ return ret; ++} ++ ++static ssize_t rxm_eq_sread(struct rxm_ep *rxm_ep, size_t len, ++ struct rxm_msg_eq_entry *entry) ++{ ++ ssize_t rd; ++ int once = 1; ++ ++ do { ++ rd = fi_eq_sread(rxm_ep->msg_eq, &entry->event, &entry->cm_entry, ++ len, -1, 0); ++ if (rd >= 0) ++ return rd; ++ if (rd == -FI_EINTR && once) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Ignoring EINTR\n"); ++ once = 0; ++ } ++ } while (rd == -FI_EINTR); + + if (rd != -FI_EAVAIL) { +- FI_WARN(&rxm_prov, FI_LOG_FABRIC, "Unable to fi_eq_sread\n"); +- return; ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to fi_eq_sread: %zu\n", rd); ++ return rd; + } +- OFI_EQ_READERR(&rxm_prov, FI_LOG_FABRIC, rxm_ep->msg_eq, rd, err_entry); +- if (err_entry.err == ECONNREFUSED) { +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Connection refused\n"); +- ofi_cmap_process_reject(rxm_ep->util_ep.cmap, +- err_entry.fid->context); ++ ++ RXM_EQ_READERR(&rxm_prov, FI_LOG_EP_CTRL, rxm_ep->msg_eq, rd, entry->err_entry); ++ ++ if (entry->err_entry.err == ECONNREFUSED) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Connection refused\n"); ++ entry->context = entry->err_entry.fid->context; ++ return -FI_ECONNREFUSED; ++ } else { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unknown error: %d\n", ++ entry->err_entry.err); ++ return rd; + } + } + +-static void rxm_conn_handle_postponed_op(struct rxm_ep *rxm_ep, +- struct util_cmap_handle *handle) ++static void *rxm_conn_eq_read(void *arg) + { +- struct rxm_tx_entry *tx_entry; +- struct rxm_conn *rxm_conn = container_of(handle, struct rxm_conn, handle); ++ struct rxm_ep *rxm_ep = arg; ++ struct rxm_msg_eq_entry *entry; + +- while (!dlist_empty(&rxm_conn->postponed_tx_list)) { +- dlist_pop_front(&rxm_conn->postponed_tx_list, struct rxm_tx_entry, +- tx_entry, postponed_entry); +- if (!(tx_entry->comp_flags & FI_RMA)) +- rxm_ep_handle_postponed_tx_op(rxm_ep, rxm_conn, tx_entry); +- else +- rxm_ep_handle_postponed_rma_op(rxm_ep, rxm_conn, tx_entry); ++ while (1) { ++ entry = calloc(1, RXM_MSG_EQ_ENTRY_SZ); ++ if (!entry) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to allocate memory!\n"); ++ return NULL; ++ } ++ ++ entry->rd = rxm_eq_sread(rxm_ep, RXM_CM_ENTRY_SZ, entry); ++ if (entry->rd < 0 && entry->rd != -FI_ECONNREFUSED) ++ goto exit; ++ ++ if (entry->event == FI_NOTIFY && ++ (enum rxm_cmap_signal)((struct fi_eq_entry *) ++ &entry->cm_entry)->data == RXM_CMAP_EXIT) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Closing CM thread\n"); ++ goto exit; ++ } ++ ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Enqueing event: %d\n", entry->event); ++ fastlock_acquire(&rxm_ep->msg_eq_entry_list_lock); ++ slistfd_insert_tail(&entry->slist_entry, ++ &rxm_ep->msg_eq_entry_list); ++ fastlock_release(&rxm_ep->msg_eq_entry_list_lock); + } ++exit: ++ free(entry); ++ return NULL; + } + +-static void *rxm_conn_event_handler(void *arg) ++static void *rxm_conn_progress(void *arg) + { +- struct fi_eq_cm_entry *entry; +- size_t datalen = sizeof(struct rxm_cm_data); +- size_t len = sizeof(*entry) + datalen; + struct rxm_ep *rxm_ep = container_of(arg, struct rxm_ep, util_ep); +- struct rxm_cm_data *cm_data; +- uint32_t event; +- ssize_t rd; ++ struct rxm_msg_eq_entry *entry; ++ int ret; + +- entry = calloc(1, len); ++ entry = calloc(1, RXM_MSG_EQ_ENTRY_SZ); + if (!entry) { +- FI_WARN(&rxm_prov, FI_LOG_FABRIC, "Unable to allocate memory!\n"); ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to allocate memory!\n"); + return NULL; + } ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Starting conn event handler\n"); + +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Starting conn event handler\n"); + while (1) { +- rd = fi_eq_sread(rxm_ep->msg_eq, &event, entry, len, -1, 0); +- /* We would receive more bytes than sizeof *entry during CONNREQ */ +- if (rd < 0) { +- rxm_conn_handle_eq_err(rxm_ep, rd); +- continue; +- } ++ entry->rd = rxm_eq_sread(rxm_ep, RXM_CM_ENTRY_SZ, entry); ++ if (entry->rd < 0 && entry->rd != -FI_ECONNREFUSED) ++ goto exit; + +- switch(event) { +- case FI_NOTIFY: +- if (rxm_conn_handle_notify((struct fi_eq_entry *)entry)) +- goto exit; +- break; +- case FI_CONNREQ: +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Got new connection\n"); +- if ((size_t)rd != len) { +- FI_WARN(&rxm_prov, FI_LOG_FABRIC, +- "Received size (%zd) not matching " +- "expected (%zu)\n", rd, len); +- goto exit; +- } +- rxm_msg_process_connreq(rxm_ep, entry->info, entry->data); +- break; +- case FI_CONNECTED: +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, +- "Connection successful\n"); +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- cm_data = (void *)entry->data; +- ofi_cmap_process_connect(rxm_ep->util_ep.cmap, +- entry->fid->context, +- ((rd - sizeof(*entry)) ? +- &cm_data->conn_id : NULL)); +- rxm_conn_handle_postponed_op(rxm_ep, entry->fid->context); +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- break; +- case FI_SHUTDOWN: +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, +- "Received connection shutdown\n"); +- ofi_cmap_process_shutdown(rxm_ep->util_ep.cmap, +- entry->fid->context); +- break; +- default: +- FI_WARN(&rxm_prov, FI_LOG_FABRIC, +- "Unknown event: %u\n", event); ++ if (entry->event == FI_NOTIFY && ++ (enum rxm_cmap_signal)((struct fi_eq_entry *) ++ &entry->cm_entry)->data == RXM_CMAP_EXIT) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closing CM thread\n"); + goto exit; + } ++ ret = rxm_conn_handle_event(rxm_ep, entry); ++ if (ret) ++ goto exit; ++ memset(entry, 0, RXM_MSG_EQ_ENTRY_SZ); + } + exit: + free(entry); + return NULL; + } + +-static int rxm_prepare_cm_data(struct fid_pep *pep, struct util_cmap_handle *handle, ++static int rxm_prepare_cm_data(struct fid_pep *pep, struct rxm_cmap_handle *handle, + struct rxm_cm_data *cm_data) + { + size_t cm_data_size = 0; +@@ -315,59 +1407,62 @@ static int rxm_prepare_cm_data(struct fid_pep *pep, struct util_cmap_handle *han + } + + static int +-rxm_conn_connect(struct util_ep *util_ep, struct util_cmap_handle *handle, +- const void *addr, size_t addrlen) ++rxm_conn_connect(struct util_ep *util_ep, struct rxm_cmap_handle *handle, ++ const void *addr) + { +- struct rxm_ep *rxm_ep; +- struct rxm_conn *rxm_conn; +- struct fi_info *msg_info; +- struct rxm_cm_data cm_data; + int ret; +- +- rxm_ep = container_of(util_ep, struct rxm_ep, util_ep); +- +- rxm_conn = container_of(handle, struct rxm_conn, handle); ++ struct rxm_ep *rxm_ep = ++ container_of(util_ep, struct rxm_ep, util_ep); ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ struct rxm_cm_data cm_data = { ++ .proto = { ++ .ctrl_version = RXM_CTRL_VERSION, ++ .op_version = RXM_OP_VERSION, ++ .endianness = ofi_detect_endianness(), ++ .eager_size = rxm_ep->rxm_info->tx_attr->inject_size, ++ }, ++ }; + + free(rxm_ep->msg_info->dest_addr); +- rxm_ep->msg_info->dest_addrlen = addrlen; ++ rxm_ep->msg_info->dest_addrlen = rxm_ep->msg_info->src_addrlen; + + rxm_ep->msg_info->dest_addr = mem_dup(addr, rxm_ep->msg_info->dest_addrlen); + if (!rxm_ep->msg_info->dest_addr) + return -FI_ENOMEM; + +- ret = fi_getinfo(rxm_ep->util_ep.domain->fabric->fabric_fid.api_version, +- NULL, NULL, 0, rxm_ep->msg_info, &msg_info); ++ ret = rxm_msg_ep_open(rxm_ep, rxm_ep->msg_info, rxm_conn, &rxm_conn->handle); + if (ret) + return ret; + +- ret = rxm_msg_ep_open(rxm_ep, msg_info, rxm_conn, &rxm_conn->handle); +- if (ret) +- goto err1; +- + /* We have to send passive endpoint's address to the server since the + * address from which connection request would be sent would have a + * different port. */ + ret = rxm_prepare_cm_data(rxm_ep->msg_pep, &rxm_conn->handle, &cm_data); + if (ret) +- goto err2; ++ goto err; + +- ret = fi_connect(rxm_conn->msg_ep, msg_info->dest_addr, &cm_data, sizeof(cm_data)); ++ cm_data.proto.eager_size = htonll(cm_data.proto.eager_size); ++ ret = fi_connect(rxm_conn->msg_ep, rxm_ep->msg_info->dest_addr, ++ &cm_data, sizeof(cm_data)); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to connect msg_ep\n"); +- goto err2; ++ goto err; + } +- fi_freeinfo(msg_info); ++ ++ ret = rxm_conn_res_alloc(rxm_ep, rxm_conn); ++ if (ret) ++ goto err; ++ + return 0; +-err2: ++err: + fi_close(&rxm_conn->msg_ep->fid); + rxm_conn->msg_ep = NULL; +-err1: +- fi_freeinfo(msg_info); + return ret; + } + + static int rxm_conn_signal(struct util_ep *util_ep, void *context, +- enum ofi_cmap_signal signal) ++ enum rxm_cmap_signal signal) + { + struct rxm_ep *rxm_ep = container_of(util_ep, struct rxm_ep, util_ep); + struct fi_eq_entry entry = {0}; +@@ -384,20 +1479,16 @@ static int rxm_conn_signal(struct util_ep *util_ep, void *context, + return 0; + } + +-struct util_cmap *rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep) ++int rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep) + { +- struct util_cmap_attr attr; +- struct util_cmap *cmap = NULL; +- void *name; +- size_t len; ++ struct rxm_cmap_attr attr; + int ret; +- +- len = rxm_ep->msg_info->src_addrlen; +- name = calloc(1, len); ++ size_t len = rxm_ep->util_ep.av->addrlen; ++ void *name = calloc(1, len); + if (!name) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, + "Unable to allocate memory for EP name\n"); +- return NULL; ++ return -FI_ENOMEM; + } + + /* Passive endpoint should already have fi_setname or fi_listen +@@ -411,18 +1502,18 @@ struct util_cmap *rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep) + ofi_straddr_dbg(&rxm_prov, FI_LOG_EP_CTRL, "local_name", name); + + attr.name = name; +- attr.alloc = rxm_conn_alloc; +- attr.close = rxm_conn_close; +- attr.free = rxm_conn_free; +- attr.connect = rxm_conn_connect; +- attr.event_handler = rxm_conn_event_handler; +- attr.signal = rxm_conn_signal; +- +- cmap = ofi_cmap_alloc(&rxm_ep->util_ep, &attr); +- if (!cmap) ++ ++ if (rxm_ep->util_ep.domain->threading == FI_THREAD_DOMAIN && ++ rxm_ep->util_ep.domain->data_progress == FI_PROGRESS_MANUAL) ++ attr.serial_access = 1; ++ else ++ attr.serial_access = 0; ++ ++ ret = rxm_cmap_alloc(rxm_ep, &attr); ++ if (ret) + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, + "Unable to allocate CMAP\n"); + fn: + free(name); +- return cmap; ++ return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_cq.c +index 1daa279..57e07fd 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_cq.c +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2018 Cray Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -35,18 +36,11 @@ + #include + + #include "ofi.h" ++#include "ofi_iov.h" ++#include "ofi_atomic.h" + + #include "rxm.h" + +-static struct rxm_conn *rxm_key2conn(struct rxm_ep *rxm_ep, uint64_t key) +-{ +- struct util_cmap_handle *handle; +- handle = ofi_cmap_key2handle(rxm_ep->util_ep.cmap, key); +- if (!handle) +- return NULL; +- return container_of(handle, struct rxm_conn, handle); +-} +- + static const char *rxm_cq_strerror(struct fid_cq *cq_fid, int prov_errno, + const void *err_data, char *buf, size_t len) + { +@@ -61,39 +55,6 @@ static const char *rxm_cq_strerror(struct fid_cq *cq_fid, int prov_errno, + return fi_cq_strerror(rxm_ep->msg_cq, prov_errno, err_data, buf, len); + } + +-#if ENABLE_DEBUG +-static void rxm_cq_log_comp(uint64_t flags) +-{ +- flags &= (FI_SEND | FI_WRITE | FI_READ | FI_REMOTE_READ | +- FI_REMOTE_WRITE); +- +- switch (flags) { +- case FI_SEND: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting send completion\n"); +- break; +- case FI_WRITE: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting write completion\n"); +- break; +- case FI_READ: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting read completion\n"); +- break; +- case FI_REMOTE_READ: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting remote read completion\n"); +- break; +- case FI_REMOTE_WRITE: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting remote write completion\n"); +- break; +- default: +- FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown completion\n"); +- } +-} +-#else +-static void rxm_cq_log_comp(uint64_t flags) +-{ +- // NOP +-} +-#endif +- + /* Get a match_iov derived from iov whose size matches given length */ + static int rxm_match_iov(const struct iovec *iov, void **desc, + uint8_t count, uint64_t offset, size_t match_len, +@@ -131,438 +92,636 @@ static int rxm_match_iov(const struct iovec *iov, void **desc, + return FI_SUCCESS; + } + +-static int rxm_match_rma_iov(struct rxm_recv_entry *recv_entry, +- struct rxm_rma_iov *rma_iov, +- struct rxm_iov *match_iov) ++static inline uint64_t ++rxm_cq_get_rx_comp_and_op_flags(struct rxm_rx_buf *rx_buf) + { +- uint64_t offset = 0; +- uint8_t i, j; +- uint8_t count; +- int ret; +- +- assert(rma_iov->count <= RXM_IOV_LIMIT); ++ return (rx_buf->pkt.hdr.flags | ofi_rx_flags[rx_buf->pkt.hdr.op]); ++} + +- for (i = 0, j = 0; i < rma_iov->count; ) { +- ret = rxm_match_iov(&recv_entry->rxm_iov.iov[j], +- &recv_entry->rxm_iov.desc[j], +- recv_entry->rxm_iov.count - j, offset, +- rma_iov->iov[i].len, &match_iov[i]); +- if (ret) +- return ret; ++static inline uint64_t ++rxm_cq_get_rx_comp_flags(struct rxm_rx_buf *rx_buf) ++{ ++ return (rx_buf->pkt.hdr.flags); ++} + +- count = match_iov[i].count; ++static int rxm_finish_buf_recv(struct rxm_rx_buf *rx_buf) ++{ ++ uint64_t flags = rxm_cq_get_rx_comp_and_op_flags(rx_buf); ++ char *data; + +- j += count - 1; +- offset = (((count - 1) == 0) ? offset : 0) + +- match_iov[i].iov[count - 1].iov_len; +- i++; ++ if (rx_buf->pkt.ctrl_hdr.type != ofi_ctrl_data) ++ flags |= FI_MORE; + +- if (j >= recv_entry->rxm_iov.count) +- break; +- } ++ if (rx_buf->pkt.ctrl_hdr.type == ofi_ctrl_large_data) ++ data = rxm_pkt_rndv_data(&rx_buf->pkt); ++ else ++ data = rx_buf->pkt.data; + +- if (i < rma_iov->count) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, "posted recv_entry size < " +- "rndv rma read size!\n"); +- return -FI_ETOOSMALL; +- } ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "writing buffered recv completion: " ++ "length: %" PRIu64 "\n", rx_buf->pkt.hdr.size); ++ rx_buf->recv_context.ep = &rx_buf->ep->util_ep.ep_fid; + +- return FI_SUCCESS; ++ return rxm_cq_write_recv_comp(rx_buf, &rx_buf->recv_context, flags, ++ rx_buf->pkt.hdr.size, data); + } + +-static inline void rxm_enqueue_repost_ready_list(struct rxm_rx_buf *rx_buf) ++static int rxm_cq_write_error_trunc(struct rxm_rx_buf *rx_buf, size_t done_len) + { +- if (!rx_buf->repost) { +- dlist_remove(&rx_buf->entry); +- rxm_rx_buf_release(rx_buf->ep, rx_buf); +- } else { +- fastlock_acquire(&rx_buf->ep->util_ep.lock); +- dlist_insert_tail(&rx_buf->repost_entry, +- &rx_buf->ep->repost_ready_list); +- fastlock_release(&rx_buf->ep->util_ep.lock); ++ int ret; ++ ++ if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) ++ rxm_cntr_incerr(rx_buf->ep->util_ep.rx_cntr); ++ ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Message truncated: " ++ "recv buf length: %zu message length: %" PRIu64 "\n", ++ done_len, rx_buf->pkt.hdr.size); ++ ret = ofi_cq_write_error_trunc(rx_buf->ep->util_ep.rx_cq, ++ rx_buf->recv_entry->context, ++ rx_buf->recv_entry->comp_flags | ++ rxm_cq_get_rx_comp_flags(rx_buf), ++ rx_buf->pkt.hdr.size, ++ rx_buf->recv_entry->rxm_iov.iov[0].iov_base, ++ rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag, ++ rx_buf->pkt.hdr.size - done_len); ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to write recv error CQ\n"); ++ return ret; + } ++ return 0; + } + + static int rxm_finish_recv(struct rxm_rx_buf *rx_buf, size_t done_len) + { + int ret; ++ struct rxm_recv_entry *recv_entry = rx_buf->recv_entry; + + if (OFI_UNLIKELY(done_len < rx_buf->pkt.hdr.size)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, "Message truncated\n"); +- ret = ofi_cq_write_error_trunc(rx_buf->ep->util_ep.rx_cq, +- rx_buf->recv_entry->context, +- rx_buf->recv_entry->comp_flags | +- ((rx_buf->pkt.hdr.flags & OFI_REMOTE_CQ_DATA) ? +- FI_REMOTE_CQ_DATA : 0), +- rx_buf->pkt.hdr.size, +- rx_buf->recv_entry->rxm_iov.iov[0].iov_base, +- rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag, +- rx_buf->pkt.hdr.size - done_len); +- if (OFI_UNLIKELY(ret)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to write recv error CQ\n"); ++ ret = rxm_cq_write_error_trunc(rx_buf, done_len); ++ if (ret) + return ret; +- } +- if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) +- rxm_cntr_incerr(rx_buf->ep->util_ep.rx_cntr); + } else { + if (rx_buf->recv_entry->flags & FI_COMPLETION) { +- FI_DBG(&rxm_prov, FI_LOG_CQ, "writing recv completion\n"); +- ret = ofi_cq_write(rx_buf->ep->util_ep.rx_cq, +- rx_buf->recv_entry->context, +- rx_buf->recv_entry->comp_flags | +- ((rx_buf->pkt.hdr.flags & OFI_REMOTE_CQ_DATA) ? +- FI_REMOTE_CQ_DATA : 0), +- rx_buf->pkt.hdr.size, +- rx_buf->recv_entry->rxm_iov.iov[0].iov_base, +- rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag); +- if (OFI_UNLIKELY(ret)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to write recv completion\n"); ++ ret = rxm_cq_write_recv_comp( ++ rx_buf, rx_buf->recv_entry->context, ++ rx_buf->recv_entry->comp_flags | ++ rxm_cq_get_rx_comp_flags(rx_buf), ++ rx_buf->pkt.hdr.size, ++ rx_buf->recv_entry->rxm_iov.iov[0].iov_base); ++ if (ret) + return ret; +- } + } +- if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) +- rxm_cntr_inc(rx_buf->ep->util_ep.rx_cntr); ++ ofi_ep_rx_cntr_inc(&rx_buf->ep->util_ep); + } + +- rxm_enqueue_repost_ready_list(rx_buf); +- + if (rx_buf->recv_entry->flags & FI_MULTI_RECV) { + struct rxm_iov rxm_iov; ++ size_t recv_size = rx_buf->pkt.hdr.size; ++ struct rxm_ep *rxm_ep = rx_buf->ep; + +- rx_buf->recv_entry->total_len -= rx_buf->pkt.hdr.size; ++ rxm_rx_buf_release(rxm_ep, rx_buf); + +- if (rx_buf->recv_entry->total_len <= rx_buf->ep->min_multi_recv_size) { ++ recv_entry->total_len -= recv_size; ++ ++ if (recv_entry->total_len <= rxm_ep->min_multi_recv_size) { + FI_DBG(&rxm_prov, FI_LOG_CQ, + "Buffer %p has been completely consumed. " + "Reporting Multi-Recv completion\n", +- rx_buf->recv_entry->multi_recv_buf); +- ret = ofi_cq_write(rx_buf->ep->util_ep.rx_cq, +- rx_buf->recv_entry->context, +- FI_MULTI_RECV, rx_buf->pkt.hdr.size, +- rx_buf->recv_entry->multi_recv_buf, +- rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag); ++ recv_entry->multi_recv.buf); ++ ret = rxm_cq_write_multi_recv_comp(rxm_ep, recv_entry); + if (OFI_UNLIKELY(ret)) { + FI_WARN(&rxm_prov, FI_LOG_CQ, + "Unable to write FI_MULTI_RECV completion\n"); + return ret; + } + /* Since buffer is elapsed, release recv_entry */ +- rxm_recv_entry_release(rx_buf->recv_queue, rx_buf->recv_entry); ++ rxm_recv_entry_release(recv_entry->recv_queue, ++ recv_entry); + return ret; + } + + FI_DBG(&rxm_prov, FI_LOG_CQ, +- "Repost Multi-Recv entry: " +- "consumed len = %"PRIu64", remain len = %zu\n", +- rx_buf->pkt.hdr.size, +- rx_buf->recv_entry->total_len); +- +- rxm_iov = rx_buf->recv_entry->rxm_iov; +- ret = rxm_match_iov(rxm_iov.iov, rxm_iov.desc, rxm_iov.count, /* prev iovecs */ +- rx_buf->pkt.hdr.size, /* offset */ +- rx_buf->recv_entry->total_len, /* match_len */ +- &rx_buf->recv_entry->rxm_iov); /* match_iov */ ++ "Repost Multi-Recv entry: %p " ++ "consumed len = %zu, remain len = %zu\n", ++ recv_entry, recv_size, recv_entry->total_len); ++ ++ rxm_iov = recv_entry->rxm_iov; ++ ret = rxm_match_iov(/* prev iovecs */ ++ rxm_iov.iov, rxm_iov.desc, rxm_iov.count, ++ recv_size, /* offset */ ++ recv_entry->total_len, /* match_len */ ++ &recv_entry->rxm_iov); /* match_iov */ + if (OFI_UNLIKELY(ret)) + return ret; + +- return rxm_process_recv_entry(&rx_buf->ep->recv_queue, rx_buf->recv_entry); ++ return rxm_process_recv_entry(recv_entry->recv_queue, recv_entry); + } else { +- rxm_recv_entry_release(rx_buf->recv_queue, rx_buf->recv_entry); ++ rxm_rx_buf_release(rx_buf->ep, rx_buf); ++ rxm_recv_entry_release(recv_entry->recv_queue, recv_entry); + } + + return FI_SUCCESS; + } + +-static int rxm_finish_send_nobuf(struct rxm_tx_entry *tx_entry) ++static inline int ++rxm_cq_tx_comp_write(struct rxm_ep *rxm_ep, uint64_t comp_flags, ++ void *app_context, uint64_t flags) + { +- int ret; +- +- if (tx_entry->flags & FI_COMPLETION) { +- ret = ofi_cq_write(tx_entry->ep->util_ep.tx_cq, +- tx_entry->context, tx_entry->comp_flags, 0, +- NULL, 0, 0); +- if (ret) { ++ if (flags & FI_COMPLETION) { ++ int ret = ofi_cq_write(rxm_ep->util_ep.tx_cq, app_context, ++ comp_flags, 0, NULL, 0, 0); ++ if (OFI_UNLIKELY(ret)) { + FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to report completion\n"); ++ "Unable to report completion\n"); + return ret; + } +- rxm_cq_log_comp(tx_entry->comp_flags); ++ rxm_cq_log_comp(comp_flags); + } +- if (tx_entry->ep->util_ep.flags & OFI_CNTR_ENABLED) { +- if (tx_entry->comp_flags & FI_SEND) +- rxm_cntr_inc(tx_entry->ep->util_ep.tx_cntr); +- else if (tx_entry->comp_flags & FI_WRITE) +- rxm_cntr_inc(tx_entry->ep->util_ep.wr_cntr); +- else +- rxm_cntr_inc(tx_entry->ep->util_ep.rd_cntr); +- } +- rxm_tx_entry_release(&tx_entry->ep->send_queue, tx_entry); + return 0; + } + +-static int rxm_finish_send(struct rxm_tx_entry *tx_entry) ++static inline int rxm_finish_rma(struct rxm_ep *rxm_ep, struct rxm_rma_buf *rma_buf, ++ uint64_t comp_flags) + { +- rxm_tx_buf_release(tx_entry->ep, tx_entry->tx_buf); +- return rxm_finish_send_nobuf(tx_entry); ++ int ret = rxm_cq_tx_comp_write(rxm_ep, comp_flags, ++ rma_buf->app_context, rma_buf->flags); ++ ++ assert(((comp_flags & FI_WRITE) && !(comp_flags & FI_READ)) || ++ ((comp_flags & FI_READ) && !(comp_flags & FI_WRITE))); ++ ofi_ep_cntr_inc_funcs[comp_flags & (FI_WRITE | FI_READ)](&rxm_ep->util_ep); ++ ++ if (!(rma_buf->flags & FI_INJECT) && !rxm_ep->rxm_mr_local && rxm_ep->msg_mr_local) { ++ rxm_ep_msg_mr_closev(rma_buf->mr.mr, rma_buf->mr.count); ++ } ++ ++ rxm_rma_buf_release(rxm_ep, rma_buf); ++ return ret; + } + +-static inline int rxm_finish_send_lmt_ack(struct rxm_rx_buf *rx_buf) ++static inline int rxm_finish_eager_send(struct rxm_ep *rxm_ep, struct rxm_tx_eager_buf *tx_buf) + { +- RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_LMT_ACK_SENT, RXM_LMT_FINISH); +- rx_buf->hdr.state = RXM_LMT_FINISH; +- if (!rx_buf->ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(rx_buf->mr, rx_buf->recv_entry->rxm_iov.count); +- return rxm_finish_recv(rx_buf, rx_buf->recv_entry->total_len); ++ int ret = rxm_cq_tx_comp_write(rxm_ep, ofi_tx_cq_flags(tx_buf->pkt.hdr.op), ++ tx_buf->app_context, tx_buf->flags); ++ ++ assert(ofi_tx_cq_flags(tx_buf->pkt.hdr.op) & FI_SEND); ++ ofi_ep_tx_cntr_inc(&rxm_ep->util_ep); ++ ++ return ret; + } + +-static ssize_t rxm_lmt_rma_read(struct rxm_rx_buf *rx_buf) ++static inline int rxm_finish_sar_segment_send(struct rxm_ep *rxm_ep, struct rxm_tx_sar_buf *tx_buf) + { +- struct rxm_iov *match_iov = &rx_buf->match_iov[rx_buf->index]; +- struct ofi_rma_iov *rma_iov = &rx_buf->rma_iov->iov[rx_buf->index]; +- ssize_t ret; ++ int ret = FI_SUCCESS; ++ struct rxm_tx_sar_buf *first_tx_buf; + +- ret = fi_readv(rx_buf->conn->msg_ep, match_iov->iov, match_iov->desc, +- match_iov->count, 0, rma_iov->addr, rma_iov->key, rx_buf); +- if (ret) +- return ret; +- rx_buf->index++; +- return FI_SUCCESS; ++ switch (rxm_sar_get_seg_type(&tx_buf->pkt.ctrl_hdr)) { ++ case RXM_SAR_SEG_FIRST: ++ break; ++ case RXM_SAR_SEG_MIDDLE: ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, tx_buf); ++ break; ++ case RXM_SAR_SEG_LAST: ++ ret = rxm_cq_tx_comp_write(rxm_ep, ofi_tx_cq_flags(tx_buf->pkt.hdr.op), ++ tx_buf->app_context, tx_buf->flags); ++ ++ assert(ofi_tx_cq_flags(tx_buf->pkt.hdr.op) & FI_SEND); ++ ofi_ep_tx_cntr_inc(&rxm_ep->util_ep); ++ first_tx_buf = rxm_msg_id_2_tx_buf(rxm_ep, RXM_BUF_POOL_TX_SAR, ++ tx_buf->pkt.ctrl_hdr.msg_id); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, first_tx_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, tx_buf); ++ break; ++ } ++ ++ return ret; ++} ++ ++static inline int rxm_finish_send_rndv_ack(struct rxm_rx_buf *rx_buf) ++{ ++ RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_RNDV_ACK_SENT, RXM_RNDV_FINISH); ++ rx_buf->hdr.state = RXM_RNDV_FINISH; ++ if (!rx_buf->ep->rxm_mr_local) ++ rxm_ep_msg_mr_closev(rx_buf->mr, rx_buf->recv_entry->rxm_iov.count); ++ return rxm_finish_recv(rx_buf, rx_buf->recv_entry->total_len); + } + +-static int rxm_lmt_tx_finish(struct rxm_tx_entry *tx_entry) ++static int rxm_rndv_tx_finish(struct rxm_ep *rxm_ep, struct rxm_tx_rndv_buf *tx_buf) + { + int ret; + +- RXM_LOG_STATE_TX(FI_LOG_CQ, tx_entry, RXM_LMT_FINISH); +- tx_entry->state = RXM_LMT_FINISH; ++ RXM_LOG_STATE_TX(FI_LOG_CQ, tx_buf, RXM_RNDV_FINISH); ++ tx_buf->hdr.state = RXM_RNDV_FINISH; + +- if (!tx_entry->ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); ++ if (!rxm_ep->rxm_mr_local) ++ rxm_ep_msg_mr_closev(tx_buf->mr, tx_buf->count); + +- ret = rxm_finish_send(tx_entry); +- if (ret) +- return ret; ++ ret = rxm_cq_tx_comp_write(rxm_ep, ofi_tx_cq_flags(tx_buf->pkt.hdr.op), ++ tx_buf->app_context, tx_buf->flags); ++ ++ assert(ofi_tx_cq_flags(tx_buf->pkt.hdr.op) & FI_SEND); ++ ofi_ep_tx_cntr_inc(&rxm_ep->util_ep); ++ ++ rxm_rx_buf_release(rxm_ep, tx_buf->rx_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_RNDV, tx_buf); + +- rxm_enqueue_repost_ready_list(tx_entry->rx_buf); + return ret; + } + +-static int rxm_lmt_handle_ack(struct rxm_rx_buf *rx_buf) ++static int rxm_rndv_handle_ack(struct rxm_ep *rxm_ep, struct rxm_rx_buf *rx_buf) + { +- struct rxm_tx_entry *tx_entry; ++ struct rxm_tx_rndv_buf *tx_buf = ++ rxm_msg_id_2_tx_buf(rxm_ep, RXM_BUF_POOL_TX_RNDV, ++ rx_buf->pkt.ctrl_hdr.msg_id); + + FI_DBG(&rxm_prov, FI_LOG_CQ, "Got ACK for msg_id: 0x%" PRIx64 "\n", + rx_buf->pkt.ctrl_hdr.msg_id); + +- tx_entry = &rx_buf->ep->send_queue.fs->buf[rx_buf->pkt.ctrl_hdr.msg_id]; +- +- assert(tx_entry->tx_buf->pkt.ctrl_hdr.msg_id == rx_buf->pkt.ctrl_hdr.msg_id); ++ assert(tx_buf->pkt.ctrl_hdr.msg_id == rx_buf->pkt.ctrl_hdr.msg_id); + +- tx_entry->rx_buf = rx_buf; ++ tx_buf->rx_buf = rx_buf; + +- if (tx_entry->state == RXM_LMT_ACK_WAIT) { +- return rxm_lmt_tx_finish(tx_entry); ++ if (tx_buf->hdr.state == RXM_RNDV_ACK_WAIT) { ++ return rxm_rndv_tx_finish(rxm_ep, tx_buf); + } else { +- assert(tx_entry->state == RXM_LMT_TX); +- RXM_LOG_STATE_TX(FI_LOG_CQ, tx_entry, RXM_LMT_ACK_RECVD); +- tx_entry->state = RXM_LMT_ACK_RECVD; ++ assert(tx_buf->hdr.state == RXM_RNDV_TX); ++ RXM_LOG_STATE_TX(FI_LOG_CQ, tx_buf, RXM_RNDV_ACK_RECVD); ++ tx_buf->hdr.state = RXM_RNDV_ACK_RECVD; + return 0; + } + } + +-ssize_t rxm_cq_handle_data(struct rxm_rx_buf *rx_buf) ++static inline ++ssize_t rxm_cq_handle_seg_data(struct rxm_rx_buf *rx_buf) + { +- size_t i; +- int ret; ++ uint64_t done_len = ofi_copy_to_iov(rx_buf->recv_entry->rxm_iov.iov, ++ rx_buf->recv_entry->rxm_iov.count, ++ rx_buf->recv_entry->sar.total_recv_len, ++ rx_buf->pkt.data, ++ rx_buf->pkt.ctrl_hdr.seg_size); ++ rx_buf->recv_entry->sar.total_recv_len += done_len; + +- if (rx_buf->pkt.ctrl_hdr.type == ofi_ctrl_large_data) { +- if (!rx_buf->conn) { +- rx_buf->conn = rxm_key2conn(rx_buf->ep, rx_buf->pkt.ctrl_hdr.conn_id); +- if (OFI_UNLIKELY(!rx_buf->conn)) +- return -FI_EOTHER; +- } ++ if ((rxm_sar_get_seg_type(&rx_buf->pkt.ctrl_hdr) == RXM_SAR_SEG_LAST) || ++ (done_len != rx_buf->pkt.ctrl_hdr.seg_size)) { ++ dlist_remove(&rx_buf->recv_entry->sar.entry); + +- FI_DBG(&rxm_prov, FI_LOG_CQ, +- "Got incoming recv with msg_id: 0x%" PRIx64 "\n", +- rx_buf->pkt.ctrl_hdr.msg_id); ++ /* Mark rxm_recv_entry::msg_id as unknown for futher re-use */ ++ rx_buf->recv_entry->sar.msg_id = RXM_SAR_RX_INIT; + +- rx_buf->rma_iov = (struct rxm_rma_iov *)rx_buf->pkt.data; +- rx_buf->index = 0; ++ done_len = rx_buf->recv_entry->sar.total_recv_len; ++ rx_buf->recv_entry->sar.total_recv_len = 0; + +- if (!rx_buf->ep->rxm_mr_local) { +- ret = rxm_ep_msg_mr_regv(rx_buf->ep, rx_buf->recv_entry->rxm_iov.iov, +- rx_buf->recv_entry->rxm_iov.count, FI_READ, +- rx_buf->mr); +- if (ret) +- return ret; ++ return rxm_finish_recv(rx_buf, done_len); ++ } else { ++ if (rx_buf->recv_entry->sar.msg_id == RXM_SAR_RX_INIT) { ++ if (!rx_buf->conn) { ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); ++ } + +- for (i = 0; i < rx_buf->recv_entry->rxm_iov.count; i++) +- rx_buf->recv_entry->rxm_iov.desc[i] = +- fi_mr_desc(rx_buf->mr[i]); +- } else { +- for (i = 0; i < rx_buf->recv_entry->rxm_iov.count; i++) +- rx_buf->recv_entry->rxm_iov.desc[i] = +- fi_mr_desc(rx_buf->recv_entry->rxm_iov.desc[i]); ++ rx_buf->recv_entry->sar.conn = rx_buf->conn; ++ rx_buf->recv_entry->sar.msg_id = rx_buf->pkt.ctrl_hdr.msg_id; ++ ++ dlist_insert_tail(&rx_buf->recv_entry->sar.entry, ++ &rx_buf->conn->sar_rx_msg_list); + } + +- /* Ignore the case when the posted recv buffer is not large enough, +- * FI_TRUNC error will be generated to user at the end */ +- rxm_match_rma_iov(rx_buf->recv_entry, rx_buf->rma_iov, rx_buf->match_iov); +- RXM_LOG_STATE_RX(FI_LOG_CQ, rx_buf, RXM_LMT_READ); +- rx_buf->hdr.state = RXM_LMT_READ; +- return rxm_lmt_rma_read(rx_buf); +- } else { +- uint64_t done_len = ofi_copy_to_iov(rx_buf->recv_entry->rxm_iov.iov, +- rx_buf->recv_entry->rxm_iov.count, +- 0, rx_buf->pkt.data, +- rx_buf->pkt.hdr.size); +- return rxm_finish_recv(rx_buf, done_len); ++ /* The RX buffer can be reposted for further re-use */ ++ rx_buf->recv_entry = NULL; ++ rxm_rx_buf_release(rx_buf->ep, rx_buf); ++ return FI_SUCCESS; + } + } + +-static ssize_t rxm_handle_recv_comp(struct rxm_rx_buf *rx_buf) ++static inline ssize_t ++rxm_cq_rndv_read_prepare_deferred(struct rxm_deferred_tx_entry **def_tx_entry, size_t index, ++ struct iovec *iov, void *desc[RXM_IOV_LIMIT], ++ size_t count, struct rxm_rx_buf *rx_buf) + { +- struct rxm_recv_match_attr match_attr; +- struct dlist_entry *entry; +- struct util_cq *util_cq; +- struct fid_ep *msg_ep; +- struct rxm_ep *rxm_ep; ++ uint8_t i; ++ ++ *def_tx_entry = rxm_ep_alloc_deferred_tx_entry(rx_buf->ep, rx_buf->conn, ++ RXM_DEFERRED_TX_RNDV_READ); ++ if (OFI_UNLIKELY(!*def_tx_entry)) ++ return -FI_ENOMEM; + +- util_cq = rx_buf->ep->util_ep.rx_cq; ++ (*def_tx_entry)->rndv_read.rx_buf = rx_buf; ++ (*def_tx_entry)->rndv_read.rma_iov.addr = ++ rx_buf->rndv_hdr->iov[index].addr; ++ (*def_tx_entry)->rndv_read.rma_iov.key = ++ rx_buf->rndv_hdr->iov[index].key; ++ for (i = 0; i < count; i++) { ++ (*def_tx_entry)->rndv_read.rxm_iov.iov[i] = iov[i]; ++ (*def_tx_entry)->rndv_read.rxm_iov.desc[i] = desc[i]; ++ } ++ (*def_tx_entry)->rndv_read.rxm_iov.count = count; + +- if ((rx_buf->ep->rxm_info->caps & (FI_SOURCE | FI_DIRECTED_RECV)) && +- !rx_buf->conn) { +- rx_buf->conn = rxm_key2conn(rx_buf->ep, rx_buf->pkt.ctrl_hdr.conn_id); ++ return 0; ++} ++ ++static inline ++ssize_t rxm_cq_handle_large_data(struct rxm_rx_buf *rx_buf) ++{ ++ size_t i, index = 0, offset = 0, count, total_recv_len; ++ struct iovec iov[RXM_IOV_LIMIT]; ++ void *desc[RXM_IOV_LIMIT]; ++ struct rxm_rx_buf *new_rx_buf; ++ int ret = 0; ++ ++ rx_buf->repost = 0; ++ ++ /* En-queue new rx buf to be posted ASAP so that we don't block any ++ * incoming messages. RNDV processing can take a while. */ ++ new_rx_buf = rxm_rx_buf_alloc(rx_buf->ep, rx_buf->msg_ep, 1); ++ if (OFI_UNLIKELY(!new_rx_buf)) ++ return -FI_ENOMEM; ++ dlist_insert_tail(&new_rx_buf->repost_entry, ++ &new_rx_buf->ep->repost_ready_list); ++ ++ if (!rx_buf->conn) { ++ assert(rx_buf->ep->srx_ctx); ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); + if (OFI_UNLIKELY(!rx_buf->conn)) + return -FI_EOTHER; +- match_attr.addr = rx_buf->conn->handle.fi_addr; ++ } ++ assert(rx_buf->conn); ++ ++ FI_DBG(&rxm_prov, FI_LOG_CQ, ++ "Got incoming recv with msg_id: 0x%" PRIx64 "\n", ++ rx_buf->pkt.ctrl_hdr.msg_id); ++ ++ rx_buf->rndv_hdr = (struct rxm_rndv_hdr *)rx_buf->pkt.data; ++ rx_buf->rndv_rma_index = 0; ++ ++ if (!rx_buf->ep->rxm_mr_local) { ++ total_recv_len = MIN(rx_buf->recv_entry->total_len, ++ rx_buf->pkt.hdr.size); ++ ret = rxm_ep_msg_mr_regv_lim(rx_buf->ep, ++ rx_buf->recv_entry->rxm_iov.iov, ++ rx_buf->recv_entry->rxm_iov.count, ++ total_recv_len, ++ FI_READ, rx_buf->mr); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ for (i = 0; i < rx_buf->recv_entry->rxm_iov.count; i++) ++ rx_buf->recv_entry->rxm_iov.desc[i] = ++ fi_mr_desc(rx_buf->mr[i]); + } else { +- match_attr.addr = FI_ADDR_UNSPEC; ++ for (i = 0; i < rx_buf->recv_entry->rxm_iov.count; i++) { ++ rx_buf->recv_entry->rxm_iov.desc[i] = ++ fi_mr_desc(rx_buf->recv_entry->rxm_iov.desc[i]); ++ } ++ total_recv_len = MIN(rx_buf->recv_entry->total_len, ++ rx_buf->pkt.hdr.size); + } + +- if (rx_buf->ep->rxm_info->caps & FI_SOURCE) +- util_cq->src[ofi_cirque_windex(util_cq->cirq)] = rx_buf->conn->handle.fi_addr; ++ assert(rx_buf->rndv_hdr->count && ++ (rx_buf->rndv_hdr->count <= RXM_IOV_LIMIT)); + +- switch(rx_buf->pkt.hdr.op) { +- case ofi_op_msg: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Got MSG op\n"); +- rx_buf->recv_queue = &rx_buf->ep->recv_queue; +- break; +- case ofi_op_tagged: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Got TAGGED op\n"); +- match_attr.tag = rx_buf->pkt.hdr.tag; +- rx_buf->recv_queue = &rx_buf->ep->trecv_queue; +- break; ++ RXM_LOG_STATE_RX(FI_LOG_CQ, rx_buf, RXM_RNDV_READ); ++ rx_buf->hdr.state = RXM_RNDV_READ; ++ ++ for (i = 0; i < rx_buf->rndv_hdr->count; i++) { ++ size_t copy_len = MIN(rx_buf->rndv_hdr->iov[i].len, ++ total_recv_len); ++ ++ ret = ofi_copy_iov_desc(&iov[0], &desc[0], &count, ++ &rx_buf->recv_entry->rxm_iov.iov[0], ++ &rx_buf->recv_entry->rxm_iov.desc[0], ++ rx_buf->recv_entry->rxm_iov.count, ++ &index, &offset, copy_len); ++ if (ret) { ++ assert(ret == -FI_ETOOSMALL); ++ return rxm_cq_write_error_trunc( ++ rx_buf, rx_buf->recv_entry->total_len); ++ } ++ total_recv_len -= copy_len; ++ ret = fi_readv(rx_buf->conn->msg_ep, iov, desc, count, 0, ++ rx_buf->rndv_hdr->iov[i].addr, ++ rx_buf->rndv_hdr->iov[i].key, rx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ struct rxm_deferred_tx_entry *def_tx_entry; ++ ++ ret = rxm_cq_rndv_read_prepare_deferred( ++ &def_tx_entry, i, iov, desc, ++ count, rx_buf); ++ if (ret) ++ goto readv_err; ++ rxm_ep_enqueue_deferred_tx_queue(def_tx_entry); ++ continue; ++ } ++readv_err: ++ rxm_cq_write_error(rx_buf->ep->util_ep.rx_cq, ++ rx_buf->ep->util_ep.rx_cntr, ++ rx_buf->recv_entry->context, ret); ++ break; ++ } ++ } ++ assert(!total_recv_len); ++ return ret; ++} ++ ++static inline ++ssize_t rxm_cq_handle_data(struct rxm_rx_buf *rx_buf) ++{ ++ uint64_t done_len = ofi_copy_to_iov(rx_buf->recv_entry->rxm_iov.iov, ++ rx_buf->recv_entry->rxm_iov.count, ++ 0, rx_buf->pkt.data, ++ rx_buf->pkt.hdr.size); ++ return rxm_finish_recv(rx_buf, done_len); ++} ++ ++ssize_t rxm_cq_handle_rx_buf(struct rxm_rx_buf *rx_buf) ++{ ++ switch (rx_buf->pkt.ctrl_hdr.type) { ++ case ofi_ctrl_data: ++ return rxm_cq_handle_data(rx_buf); ++ case ofi_ctrl_large_data: ++ return rxm_cq_handle_large_data(rx_buf); ++ case ofi_ctrl_seg_data: ++ return rxm_cq_handle_seg_data(rx_buf); + default: +- FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown op!\n"); ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown message type\n"); + assert(0); + return -FI_EINVAL; + } ++} + +- fastlock_acquire(&rx_buf->recv_queue->lock); +- entry = dlist_remove_first_match(&rx_buf->recv_queue->recv_list, +- rx_buf->recv_queue->match_recv, &match_attr); ++static inline ssize_t ++rxm_cq_match_rx_buf(struct rxm_rx_buf *rx_buf, ++ struct rxm_recv_queue *recv_queue, ++ struct rxm_recv_match_attr *match_attr) ++{ ++ struct dlist_entry *entry; ++ struct rxm_ep *rxm_ep; ++ struct fid_ep *msg_ep; ++ ++ entry = dlist_remove_first_match(&recv_queue->recv_list, ++ recv_queue->match_recv, match_attr); + if (!entry) { + RXM_DBG_ADDR_TAG(FI_LOG_CQ, "No matching recv found for " +- "incoming msg", match_attr.addr, +- match_attr.tag); ++ "incoming msg", match_attr->addr, ++ match_attr->tag); + FI_DBG(&rxm_prov, FI_LOG_CQ, "Enqueueing msg to unexpected msg" + "queue\n"); +- rx_buf->unexp_msg.addr = match_attr.addr; +- rx_buf->unexp_msg.tag = match_attr.tag; ++ rx_buf->unexp_msg.addr = match_attr->addr; ++ rx_buf->unexp_msg.tag = match_attr->tag; + rx_buf->repost = 0; + +- msg_ep = rx_buf->hdr.msg_ep; +- rxm_ep = rx_buf->ep; +- + dlist_insert_tail(&rx_buf->unexp_msg.entry, +- &rx_buf->recv_queue->unexp_msg_list); +- fastlock_release(&rx_buf->recv_queue->lock); ++ &recv_queue->unexp_msg_list); + +- rx_buf = rxm_rx_buf_get(rxm_ep); +- if (!rx_buf) +- return -FI_ENOMEM; ++ msg_ep = rx_buf->msg_ep; ++ rxm_ep = rx_buf->ep; + +- rx_buf->hdr.state = RXM_RX; +- rx_buf->hdr.msg_ep = msg_ep; +- rx_buf->repost = 1; +- if (!rxm_ep->srx_ctx) +- rx_buf->conn = container_of(msg_ep->fid.context, +- struct rxm_conn, +- handle); ++ rx_buf = rxm_rx_buf_alloc(rxm_ep, msg_ep, 1); ++ if (OFI_UNLIKELY(!rx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "ran out of buffers from RX buffer pool\n"); ++ return -FI_ENOMEM; ++ } + +- fastlock_acquire(&rx_buf->ep->util_ep.lock); +- dlist_insert_tail(&rx_buf->entry, &rxm_ep->post_rx_list); + dlist_insert_tail(&rx_buf->repost_entry, +- &rx_buf->ep->repost_ready_list); +- fastlock_release(&rx_buf->ep->util_ep.lock); ++ &rxm_ep->repost_ready_list); + return 0; + } +- fastlock_release(&rx_buf->recv_queue->lock); + + rx_buf->recv_entry = container_of(entry, struct rxm_recv_entry, entry); +- return rxm_cq_handle_data(rx_buf); ++ return rxm_cq_handle_rx_buf(rx_buf); + } + +-static ssize_t rxm_lmt_send_ack(struct rxm_rx_buf *rx_buf) ++static inline ssize_t rxm_handle_recv_comp(struct rxm_rx_buf *rx_buf) ++{ ++ struct rxm_recv_match_attr match_attr = { ++ .addr = FI_ADDR_UNSPEC, ++ }; ++ ++ if (rx_buf->ep->rxm_info->caps & (FI_SOURCE | FI_DIRECTED_RECV)) { ++ if (rx_buf->ep->srx_ctx) ++ rx_buf->conn = ++ rxm_key2conn(rx_buf->ep, rx_buf->pkt.ctrl_hdr.conn_id); ++ if (OFI_UNLIKELY(!rx_buf->conn)) ++ return -FI_EOTHER; ++ match_attr.addr = rx_buf->conn->handle.fi_addr; ++ } ++ ++ if (rx_buf->ep->rxm_info->mode & FI_BUFFERED_RECV) ++ return rxm_finish_buf_recv(rx_buf); ++ ++ switch(rx_buf->pkt.hdr.op) { ++ case ofi_op_msg: ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "Got MSG op\n"); ++ return rxm_cq_match_rx_buf(rx_buf, &rx_buf->ep->recv_queue, ++ &match_attr); ++ case ofi_op_tagged: ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "Got TAGGED op\n"); ++ match_attr.tag = rx_buf->pkt.hdr.tag; ++ return rxm_cq_match_rx_buf(rx_buf, &rx_buf->ep->trecv_queue, ++ &match_attr); ++ default: ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown op!\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++} ++ ++static int rxm_sar_match_msg_id(struct dlist_entry *item, const void *arg) ++{ ++ uint64_t msg_id = *((uint64_t *)arg); ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, sar.entry); ++ return (msg_id == recv_entry->sar.msg_id); ++} ++ ++static inline ++ssize_t rxm_sar_handle_segment(struct rxm_rx_buf *rx_buf) ++{ ++ struct dlist_entry *sar_entry; ++ ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); ++ if (OFI_UNLIKELY(!rx_buf->conn)) ++ return -FI_EOTHER; ++ FI_DBG(&rxm_prov, FI_LOG_CQ, ++ "Got incoming recv with msg_id: 0x%" PRIx64 "for conn - %p\n", ++ rx_buf->pkt.ctrl_hdr.msg_id, rx_buf->conn); ++ sar_entry = dlist_find_first_match(&rx_buf->conn->sar_rx_msg_list, ++ rxm_sar_match_msg_id, ++ &rx_buf->pkt.ctrl_hdr.msg_id); ++ if (!sar_entry) ++ return rxm_handle_recv_comp(rx_buf); ++ rx_buf->recv_entry = ++ container_of(sar_entry, struct rxm_recv_entry, sar.entry); ++ return rxm_cq_handle_seg_data(rx_buf); ++} ++ ++static ssize_t rxm_rndv_send_ack(struct rxm_rx_buf *rx_buf) + { +- struct rxm_tx_entry *tx_entry; +- struct rxm_tx_buf *tx_buf; + ssize_t ret; + + assert(rx_buf->conn); + +- tx_buf = rxm_tx_buf_get(rx_buf->ep, RXM_BUF_POOL_TX_ACK); +- if (OFI_UNLIKELY(!tx_buf)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, "TX queue full!\n"); ++ rx_buf->recv_entry->rndv.tx_buf = (struct rxm_tx_base_buf *) ++ rxm_tx_buf_alloc(rx_buf->ep, RXM_BUF_POOL_TX_ACK); ++ if (OFI_UNLIKELY(!rx_buf->recv_entry->rndv.tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Ran out of buffers from ACK buffer pool\n"); + return -FI_EAGAIN; + } +- assert(tx_buf->pkt.ctrl_hdr.type == ofi_ctrl_ack); +- +- tx_entry = rxm_tx_entry_get(&rx_buf->ep->send_queue); +- if (OFI_UNLIKELY(!tx_entry)) { +- ret = -FI_EAGAIN; +- goto err1; +- } +- +- RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_LMT_READ, RXM_LMT_ACK_SENT); +- rx_buf->hdr.state = RXM_LMT_ACK_SENT; ++ assert(rx_buf->recv_entry->rndv.tx_buf->pkt.ctrl_hdr.type == ofi_ctrl_ack); + +- tx_entry->state = rx_buf->hdr.state; +- tx_entry->context = rx_buf; +- tx_entry->tx_buf = tx_buf; ++ RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_RNDV_READ, RXM_RNDV_ACK_SENT); ++ rx_buf->hdr.state = RXM_RNDV_ACK_SENT; + +- tx_buf->pkt.ctrl_hdr.conn_id = rx_buf->conn->handle.remote_key; +- tx_buf->pkt.ctrl_hdr.msg_id = rx_buf->pkt.ctrl_hdr.msg_id; ++ rx_buf->recv_entry->rndv.tx_buf->pkt.ctrl_hdr.conn_id = ++ rx_buf->conn->handle.remote_key; ++ rx_buf->recv_entry->rndv.tx_buf->pkt.ctrl_hdr.msg_id = ++ rx_buf->pkt.ctrl_hdr.msg_id; + +- ret = fi_send(rx_buf->conn->msg_ep, &tx_buf->pkt, sizeof(tx_buf->pkt), +- tx_buf->hdr.desc, 0, tx_entry); ++ ret = fi_send(rx_buf->conn->msg_ep, &rx_buf->recv_entry->rndv.tx_buf->pkt, ++ sizeof(rx_buf->recv_entry->rndv.tx_buf->pkt), ++ rx_buf->recv_entry->rndv.tx_buf->hdr.desc, 0, rx_buf); + if (OFI_UNLIKELY(ret)) { + FI_WARN(&rxm_prov, FI_LOG_CQ, "Unable to send ACK\n"); +- goto err2; ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ struct rxm_deferred_tx_entry *def_tx_entry = ++ rxm_ep_alloc_deferred_tx_entry(rx_buf->ep, rx_buf->conn, ++ RXM_DEFERRED_TX_RNDV_ACK); ++ if (OFI_UNLIKELY(!def_tx_entry)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to allocate TX entry for deferred ACK\n"); ++ ret = -FI_EAGAIN; ++ goto err; ++ } ++ ++ def_tx_entry->rndv_ack.rx_buf = rx_buf; ++ rxm_ep_enqueue_deferred_tx_queue(def_tx_entry); ++ ++ return 0; ++ } ++ goto err; + } + return 0; +-err2: +- rxm_tx_entry_release(&rx_buf->ep->send_queue, tx_entry); +-err1: +- rxm_tx_buf_release(rx_buf->ep, tx_buf); ++err: ++ rxm_tx_buf_release(rx_buf->ep, RXM_BUF_POOL_TX_ACK, ++ rx_buf->recv_entry->rndv.tx_buf); + return ret; + } + +-static ssize_t rxm_lmt_send_ack_fast(struct rxm_rx_buf *rx_buf) ++static ssize_t rxm_rndv_send_ack_fast(struct rxm_rx_buf *rx_buf) + { + struct rxm_pkt pkt; + ssize_t ret; + + assert(rx_buf->conn); + +- RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_LMT_READ, RXM_LMT_ACK_SENT); ++ RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_RNDV_READ, RXM_RNDV_ACK_SENT); + + pkt.hdr.op = ofi_op_msg; + pkt.hdr.version = OFI_OP_VERSION; +- pkt.ctrl_hdr.version = OFI_CTRL_VERSION; ++ pkt.ctrl_hdr.version = RXM_CTRL_VERSION; + pkt.ctrl_hdr.type = ofi_ctrl_ack; + pkt.ctrl_hdr.conn_id = rx_buf->conn->handle.remote_key; + pkt.ctrl_hdr.msg_id = rx_buf->pkt.ctrl_hdr.msg_id; +@@ -571,14 +730,20 @@ static ssize_t rxm_lmt_send_ack_fast(struct rxm_rx_buf *rx_buf) + if (OFI_UNLIKELY(ret)) { + FI_DBG(&rxm_prov, FI_LOG_EP_DATA, + "fi_inject(ack pkt) for MSG provider failed\n"); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ /* Issues the normal RNDV ACK sending to allocate the ++ * TX entry, send it out or insert it to deferred ++ * TX queue for the further processing */ ++ return rxm_rndv_send_ack(rx_buf); ++ } + return ret; + } + +- return rxm_finish_send_lmt_ack(rx_buf); ++ return rxm_finish_send_rndv_ack(rx_buf); + } + + static int rxm_handle_remote_write(struct rxm_ep *rxm_ep, +- struct fi_cq_tagged_entry *comp) ++ struct fi_cq_data_entry *comp) + { + int ret; + +@@ -590,74 +755,347 @@ static int rxm_handle_remote_write(struct rxm_ep *rxm_ep, + "Unable to write remote write completion\n"); + return ret; + } +- rxm_cntr_inc(rxm_ep->util_ep.rem_wr_cntr); +- if (comp->op_context) { +- fastlock_acquire(&rxm_ep->util_ep.lock); +- dlist_insert_tail(&((struct rxm_rx_buf *) +- comp->op_context)->repost_entry, +- &rxm_ep->repost_ready_list); +- fastlock_release(&rxm_ep->util_ep.lock); +- } ++ ofi_ep_rem_wr_cntr_inc(&rxm_ep->util_ep); ++ if (comp->op_context) ++ rxm_rx_buf_release(rxm_ep, comp->op_context); + return 0; + } + ++static inline void rxm_ep_format_atomic_resp_pkt_hdr(struct rxm_conn *rxm_conn, ++ struct rxm_tx_atomic_buf *tx_buf, ++ size_t data_len, uint32_t pkt_op, ++ enum fi_datatype datatype, uint8_t atomic_op) ++{ ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, pkt_op, 0, 0, 0, ++ &tx_buf->pkt); ++ tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_atomic_resp; ++ tx_buf->pkt.hdr.op = pkt_op; ++ tx_buf->pkt.hdr.atomic.datatype = datatype; ++ tx_buf->pkt.hdr.atomic.op = atomic_op; ++ tx_buf->pkt.hdr.atomic.ioc_count = 0; ++} ++ ++static ssize_t rxm_atomic_send_resp(struct rxm_ep *rxm_ep, ++ struct rxm_rx_buf *rx_buf, ++ struct rxm_tx_atomic_buf *resp_buf, ++ ssize_t result_len, uint32_t status) ++{ ++ struct rxm_deferred_tx_entry *def_tx_entry; ++ struct rxm_atomic_resp_hdr *atomic_hdr; ++ ssize_t ret; ++ ssize_t resp_len = result_len + sizeof(struct rxm_atomic_resp_hdr) + ++ sizeof(struct rxm_pkt); ++ ++ resp_buf->hdr.state = RXM_ATOMIC_RESP_SENT; ++ rxm_ep_format_atomic_resp_pkt_hdr(rx_buf->conn, ++ resp_buf, ++ resp_len, ++ rx_buf->pkt.hdr.op, ++ rx_buf->pkt.hdr.atomic.datatype, ++ rx_buf->pkt.hdr.atomic.op); ++ resp_buf->pkt.ctrl_hdr.conn_id = rx_buf->conn->handle.remote_key; ++ resp_buf->pkt.ctrl_hdr.msg_id = rx_buf->pkt.ctrl_hdr.msg_id; ++ atomic_hdr = (struct rxm_atomic_resp_hdr *) resp_buf->pkt.data; ++ atomic_hdr->status = htonl(status); ++ atomic_hdr->result_len = htonl(result_len); ++ ++ if (resp_len < rxm_ep->inject_limit) { ++ ret = fi_inject(rx_buf->conn->msg_ep, &resp_buf->pkt, ++ resp_len, 0); ++ if (OFI_LIKELY(!ret)) ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, ++ resp_buf); ++ } else { ++ ret = rxm_atomic_send_respmsg(rxm_ep, rx_buf->conn, resp_buf, ++ resp_len); ++ } ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to send Atomic Response\n"); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ def_tx_entry = ++ rxm_ep_alloc_deferred_tx_entry(rxm_ep, ++ rx_buf->conn, ++ RXM_DEFERRED_TX_ATOMIC_RESP); ++ if (OFI_UNLIKELY(!def_tx_entry)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to allocate deferred Atomic " ++ "Response\n"); ++ return -FI_ENOMEM; ++ } ++ ++ def_tx_entry->atomic_resp.tx_buf = resp_buf; ++ def_tx_entry->atomic_resp.len = resp_len; ++ rxm_ep_enqueue_deferred_tx_queue(def_tx_entry); ++ ret = 0; ++ } ++ } ++ rxm_rx_buf_release(rxm_ep, rx_buf); ++ ++ return ret; ++} ++ ++static inline void rxm_do_atomic(struct rxm_pkt *pkt, void *dst, void *src, ++ void *cmp, void *res, size_t count, ++ enum fi_datatype datatype, enum fi_op op) ++{ ++ switch (pkt->hdr.op) { ++ case ofi_op_atomic: ++ ofi_atomic_write_handlers[op][datatype](dst, src, count); ++ break; ++ case ofi_op_atomic_fetch: ++ ofi_atomic_readwrite_handlers[op][datatype](dst, src, res, ++ count); ++ break; ++ case ofi_op_atomic_compare: ++ ofi_atomic_swap_handlers[op - OFI_SWAP_OP_START][datatype](dst, ++ src, cmp, res, count); ++ break; ++ default: ++ /* Validated prior to calling function */ ++ break; ++ } ++} ++ ++static inline ssize_t rxm_handle_atomic_req(struct rxm_ep *rxm_ep, ++ struct rxm_rx_buf *rx_buf) ++{ ++ struct rxm_atomic_hdr *req_hdr = ++ (struct rxm_atomic_hdr *) rx_buf->pkt.data; ++ enum fi_datatype datatype = rx_buf->pkt.hdr.atomic.datatype; ++ enum fi_op atomic_op = rx_buf->pkt.hdr.atomic.op; ++ size_t datatype_sz = ofi_datatype_size(datatype); ++ size_t len; ++ ssize_t result_len; ++ uint64_t offset; ++ int i; ++ int ret = 0; ++ struct rxm_tx_atomic_buf *resp_buf; ++ struct rxm_atomic_resp_hdr *resp_hdr; ++ struct rxm_domain *domain = container_of(rxm_ep->util_ep.domain, ++ struct rxm_domain, util_domain); ++ ++ assert(!(rx_buf->comp_flags & ++ ~(FI_RECV | FI_RECV | FI_REMOTE_CQ_DATA))); ++ assert(rx_buf->pkt.hdr.op == ofi_op_atomic || ++ rx_buf->pkt.hdr.op == ofi_op_atomic_fetch || ++ rx_buf->pkt.hdr.op == ofi_op_atomic_compare); ++ ++ if (rx_buf->ep->srx_ctx) ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); ++ if (OFI_UNLIKELY(!rx_buf->conn)) ++ return -FI_EOTHER; ++ ++ resp_buf = (struct rxm_tx_atomic_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_ATOMIC); ++ if (OFI_UNLIKELY(!resp_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Unable to allocate from Atomic buffer pool\n"); ++ /* TODO: Should this be -FI_ENOMEM - how does it get ++ * processed again */ ++ return -FI_EAGAIN; ++ } ++ ++ for (i = 0; i < rx_buf->pkt.hdr.atomic.ioc_count; i++) { ++ ret = ofi_mr_verify(&domain->util_domain.mr_map, ++ req_hdr->rma_ioc[i].count * datatype_sz, ++ (uintptr_t *)&req_hdr->rma_ioc[i].addr, ++ req_hdr->rma_ioc[i].key, ++ ofi_rx_mr_reg_flags(rx_buf->pkt.hdr.op, ++ atomic_op)); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Atomic RMA MR verify error %d\n", ret); ++ ret = -FI_EACCES; ++ goto send_nak; ++ } ++ } ++ ++ len = ofi_total_rma_ioc_cnt(req_hdr->rma_ioc, ++ rx_buf->pkt.hdr.atomic.ioc_count) * datatype_sz; ++ resp_hdr = (struct rxm_atomic_resp_hdr *) resp_buf->pkt.data; ++ ++ for (i = 0, offset = 0; i < rx_buf->pkt.hdr.atomic.ioc_count; i++) { ++ rxm_do_atomic(&rx_buf->pkt, ++ (uintptr_t *) req_hdr->rma_ioc[i].addr, ++ req_hdr->data + offset, ++ req_hdr->data + len + offset, ++ resp_hdr->data + offset, ++ req_hdr->rma_ioc[i].count, datatype, atomic_op); ++ offset += req_hdr->rma_ioc[i].count * datatype_sz; ++ } ++ result_len = rx_buf->pkt.hdr.op == ofi_op_atomic ? 0 : offset; ++ ++ if (rx_buf->pkt.hdr.op == ofi_op_atomic) ++ ofi_ep_rem_wr_cntr_inc(&rxm_ep->util_ep); ++ else ++ ofi_ep_rem_rd_cntr_inc(&rxm_ep->util_ep); ++ ++ return rxm_atomic_send_resp(rxm_ep, rx_buf, resp_buf, ++ result_len, FI_SUCCESS); ++send_nak: ++ return rxm_atomic_send_resp(rxm_ep, rx_buf, resp_buf, 0, ret); ++} ++ ++ ++static inline ssize_t rxm_handle_atomic_resp(struct rxm_ep *rxm_ep, ++ struct rxm_rx_buf *rx_buf) ++{ ++ struct rxm_tx_atomic_buf *tx_buf; ++ struct rxm_atomic_resp_hdr *resp_hdr = ++ (struct rxm_atomic_resp_hdr *) rx_buf->pkt.data; ++ uint64_t len; ++ int ret = 0; ++ ++ tx_buf = rxm_msg_id_2_tx_buf(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, ++ rx_buf->pkt.ctrl_hdr.msg_id); ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "received atomic response: op: %" PRIu8 ++ " msg_id: 0x%" PRIx64 "\n", rx_buf->pkt.hdr.op, ++ rx_buf->pkt.ctrl_hdr.msg_id); ++ ++ assert(!(rx_buf->comp_flags & ~(FI_RECV | FI_REMOTE_CQ_DATA))); ++ ++ if (OFI_UNLIKELY(resp_hdr->status)) { ++ struct util_cntr *cntr = NULL; ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "bad atomic response status %d\n", ntohl(resp_hdr->status)); ++ ++ if (tx_buf->pkt.hdr.op == ofi_op_atomic) { ++ cntr = rxm_ep->util_ep.wr_cntr; ++ } else if (tx_buf->pkt.hdr.op == ofi_op_atomic_compare || ++ tx_buf->pkt.hdr.op == ofi_op_atomic_fetch) { ++ cntr = rxm_ep->util_ep.rd_cntr; ++ } else { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "unknown atomic request op!\n"); ++ assert(0); ++ } ++ rxm_cq_write_error(rxm_ep->util_ep.tx_cq, cntr, ++ tx_buf->app_context, ntohl(resp_hdr->status)); ++ goto err; ++ } ++ ++ len = ofi_total_iov_len(tx_buf->result_iov, tx_buf->result_iov_count); ++ assert(ntohl(resp_hdr->result_len) == len); ++ ofi_copy_to_iov(tx_buf->result_iov, tx_buf->result_iov_count, 0, ++ resp_hdr->data, len); ++ ++ if (!(tx_buf->flags & FI_INJECT)) ++ ret = rxm_cq_tx_comp_write(rxm_ep, ++ ofi_tx_cq_flags(tx_buf->pkt.hdr.op), ++ tx_buf->app_context, tx_buf->flags); ++ ++ if (tx_buf->pkt.hdr.op == ofi_op_atomic) { ++ ofi_ep_wr_cntr_inc(&rxm_ep->util_ep); ++ } else if (tx_buf->pkt.hdr.op == ofi_op_atomic_compare || ++ tx_buf->pkt.hdr.op == ofi_op_atomic_fetch) { ++ ofi_ep_rd_cntr_inc(&rxm_ep->util_ep); ++ } else { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "unknown atomic request op!\n"); ++ rxm_cq_write_error(rxm_ep->util_ep.tx_cq, NULL, ++ tx_buf->app_context, ntohl(resp_hdr->status)); ++ assert(0); ++ } ++err: ++ rxm_rx_buf_release(rxm_ep, rx_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, tx_buf); ++ ++ return ret; ++} ++ + static ssize_t rxm_cq_handle_comp(struct rxm_ep *rxm_ep, +- struct fi_cq_tagged_entry *comp) ++ struct fi_cq_data_entry *comp) + { +- struct rxm_rx_buf *rx_buf = comp->op_context; +- struct rxm_tx_entry *tx_entry = comp->op_context; ++ ssize_t ret; ++ struct rxm_rx_buf *rx_buf; ++ struct rxm_tx_sar_buf *tx_sar_buf; ++ struct rxm_tx_eager_buf *tx_eager_buf; ++ struct rxm_tx_rndv_buf *tx_rndv_buf; ++ struct rxm_tx_atomic_buf *tx_atomic_buf; ++ struct rxm_rma_buf *rma_buf; + + /* Remote write events may not consume a posted recv so op context + * and hence state would be NULL */ + if (comp->flags & FI_REMOTE_WRITE) + return rxm_handle_remote_write(rxm_ep, comp); + +- switch (RXM_GET_PROTO_STATE(comp)) { +- case RXM_TX_NOBUF: +- assert(comp->flags & (FI_SEND | FI_WRITE | FI_READ)); +- if (tx_entry->ep->msg_mr_local && !tx_entry->ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); +- return rxm_finish_send_nobuf(tx_entry); ++ switch (RXM_GET_PROTO_STATE(comp->op_context)) { + case RXM_TX: ++ case RXM_INJECT_TX: ++ tx_eager_buf = comp->op_context; + assert(comp->flags & FI_SEND); +- return rxm_finish_send(tx_entry); +- case RXM_TX_RMA: +- assert(comp->flags & (FI_WRITE | FI_READ)); +- if (tx_entry->ep->msg_mr_local && !tx_entry->ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); +- rxm_rma_buf_release(rxm_ep, tx_entry->rma_buf); +- return rxm_finish_send_nobuf(tx_entry); ++ ret = rxm_finish_eager_send(rxm_ep, tx_eager_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX, tx_eager_buf); ++ return ret; ++ case RXM_SAR_TX: ++ tx_sar_buf = comp->op_context; ++ assert(comp->flags & FI_SEND); ++ return rxm_finish_sar_segment_send(rxm_ep, tx_sar_buf); ++ case RXM_RMA: ++ rma_buf = comp->op_context; ++ assert((comp->flags & (FI_WRITE | FI_RMA)) || ++ (comp->flags & (FI_READ | FI_RMA))); ++ return rxm_finish_rma(rxm_ep, rma_buf, comp->flags); + case RXM_RX: ++ rx_buf = comp->op_context; + assert(!(comp->flags & FI_REMOTE_READ)); + assert((rx_buf->pkt.hdr.version == OFI_OP_VERSION) && +- (rx_buf->pkt.ctrl_hdr.version == OFI_CTRL_VERSION)); ++ (rx_buf->pkt.ctrl_hdr.version == RXM_CTRL_VERSION)); + +- if (rx_buf->pkt.ctrl_hdr.type == ofi_ctrl_ack) +- return rxm_lmt_handle_ack(rx_buf); +- else ++ switch (rx_buf->pkt.ctrl_hdr.type) { ++ case ofi_ctrl_data: ++ case ofi_ctrl_large_data: + return rxm_handle_recv_comp(rx_buf); +- case RXM_LMT_TX: ++ case ofi_ctrl_ack: ++ return rxm_rndv_handle_ack(rxm_ep, rx_buf); ++ case ofi_ctrl_seg_data: ++ return rxm_sar_handle_segment(rx_buf); ++ case ofi_ctrl_atomic: ++ return rxm_handle_atomic_req(rxm_ep, rx_buf); ++ case ofi_ctrl_atomic_resp: ++ return rxm_handle_atomic_resp(rxm_ep, rx_buf); ++ default: ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown message type\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ case RXM_RNDV_TX: ++ tx_rndv_buf = comp->op_context; + assert(comp->flags & FI_SEND); +- RXM_LOG_STATE_TX(FI_LOG_CQ, tx_entry, RXM_LMT_ACK_WAIT); +- RXM_SET_PROTO_STATE(comp, RXM_LMT_ACK_WAIT); ++ RXM_LOG_STATE_TX(FI_LOG_CQ, tx_rndv_buf, RXM_RNDV_ACK_WAIT); ++ RXM_SET_PROTO_STATE(comp, RXM_RNDV_ACK_WAIT); + return 0; +- case RXM_LMT_ACK_RECVD: ++ case RXM_RNDV_ACK_RECVD: ++ tx_rndv_buf = comp->op_context; + assert(comp->flags & FI_SEND); +- return rxm_lmt_tx_finish(tx_entry); +- case RXM_LMT_READ: ++ return rxm_rndv_tx_finish(rxm_ep, tx_rndv_buf); ++ case RXM_RNDV_READ: ++ rx_buf = comp->op_context; + assert(comp->flags & FI_READ); +- if (rx_buf->index < rx_buf->rma_iov->count) +- return rxm_lmt_rma_read(rx_buf); +- else if (sizeof(rx_buf->pkt) > rxm_ep->msg_info->tx_attr->inject_size) +- return rxm_lmt_send_ack(rx_buf); ++ if (++rx_buf->rndv_rma_index < rx_buf->rndv_hdr->count) ++ return 0; ++ else if (sizeof(rx_buf->pkt) <= rxm_ep->inject_limit) ++ return rxm_rndv_send_ack_fast(rx_buf); + else +- return rxm_lmt_send_ack_fast(rx_buf); +- case RXM_LMT_ACK_SENT: ++ return rxm_rndv_send_ack(rx_buf); ++ case RXM_RNDV_ACK_SENT: ++ rx_buf = comp->op_context; ++ assert(comp->flags & FI_SEND); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ACK, ++ rx_buf->recv_entry->rndv.tx_buf); ++ return rxm_finish_send_rndv_ack(rx_buf); ++ case RXM_ATOMIC_RESP_SENT: ++ tx_atomic_buf = comp->op_context; ++ assert(comp->flags & FI_SEND); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, ++ tx_atomic_buf); ++ return 0; ++ case RXM_ATOMIC_RESP_WAIT: ++ /* Optional atomic request completion; TX completion ++ * processing is performed when atomic response is received */ + assert(comp->flags & FI_SEND); +- rx_buf = tx_entry->context; +- rxm_tx_buf_release(rx_buf->ep, tx_entry->tx_buf); +- rxm_tx_entry_release(&tx_entry->ep->send_queue, tx_entry); +- return rxm_finish_send_lmt_ack(rx_buf); ++ return 0; + default: + FI_WARN(&rxm_prov, FI_LOG_CQ, "Invalid state!\n"); + assert(0); +@@ -665,276 +1103,249 @@ static ssize_t rxm_cq_handle_comp(struct rxm_ep *rxm_ep, + } + } + +-static ssize_t rxm_cq_write_error(struct fid_cq *msg_cq, +- struct fi_cq_tagged_entry *comp, +- ssize_t err) ++void rxm_cq_write_error(struct util_cq *cq, struct util_cntr *cntr, ++ void *op_context, int err) ++{ ++ struct fi_cq_err_entry err_entry = {0}; ++ err_entry.op_context = op_context; ++ err_entry.prov_errno = err; ++ err_entry.err = -err; ++ ++ if (cntr) ++ rxm_cntr_incerr(cntr); ++ if (ofi_cq_write_error(cq, &err_entry)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unable to ofi_cq_write_error\n"); ++ assert(0); ++ } ++} ++ ++static void rxm_cq_write_error_all(struct rxm_ep *rxm_ep, int err) + { +- struct rxm_tx_entry *tx_entry; ++ struct fi_cq_err_entry err_entry = {0}; ++ ssize_t ret = 0; ++ ++ err_entry.prov_errno = err; ++ err_entry.err = -err; ++ if (rxm_ep->util_ep.tx_cq) { ++ ret = ofi_cq_write_error(rxm_ep->util_ep.tx_cq, &err_entry); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to ofi_cq_write_error\n"); ++ assert(0); ++ } ++ } ++ if (rxm_ep->util_ep.rx_cq) { ++ ret = ofi_cq_write_error(rxm_ep->util_ep.rx_cq, &err_entry); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to ofi_cq_write_error\n"); ++ assert(0); ++ } ++ } ++ if (rxm_ep->util_ep.tx_cntr) ++ rxm_cntr_incerr(rxm_ep->util_ep.tx_cntr); ++ ++ if (rxm_ep->util_ep.rx_cntr) ++ rxm_cntr_incerr(rxm_ep->util_ep.rx_cntr); ++ ++ if (rxm_ep->util_ep.wr_cntr) ++ rxm_cntr_incerr(rxm_ep->util_ep.wr_cntr); ++ ++ if (rxm_ep->util_ep.rd_cntr) ++ rxm_cntr_incerr(rxm_ep->util_ep.rd_cntr); ++} ++ ++#define RXM_IS_PROTO_STATE_TX(state) \ ++ ((state == RXM_SAR_TX) || \ ++ (state == RXM_TX) || \ ++ (state == RXM_RNDV_TX)) ++ ++static void rxm_cq_read_write_error(struct rxm_ep *rxm_ep) ++{ ++ struct rxm_tx_eager_buf *eager_buf; ++ struct rxm_tx_sar_buf *sar_buf; ++ struct rxm_tx_rndv_buf *rndv_buf; + struct rxm_rx_buf *rx_buf; +- struct fi_cq_err_entry err_entry; +- struct util_cq *util_cq; ++ struct fi_cq_err_entry err_entry = {0}; ++ struct util_cq *util_cq = NULL; + struct util_cntr *util_cntr = NULL; +- void *op_context; ++ enum rxm_proto_state state; + ssize_t ret; + +- op_context = comp->op_context; +- memset(&err_entry, 0, sizeof(err_entry)); ++ RXM_CQ_READERR(&rxm_prov, FI_LOG_CQ, rxm_ep->msg_cq, ret, ++ err_entry); ++ if (ret < 0) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to fi_cq_readerr on msg cq\n"); ++ rxm_cq_write_error_all(rxm_ep, (int)ret); ++ return; ++ } + +- if (err == -FI_EAVAIL) { +- OFI_CQ_READERR(&rxm_prov, FI_LOG_CQ, msg_cq, ret, err_entry); +- if (ret < 0) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to fi_cq_readerr on msg cq\n"); +- err_entry.prov_errno = (int)ret; +- err = ret; +- } else { +- op_context = err_entry.op_context; +- } +- } else { +- err_entry.prov_errno = (int)err; ++ state = RXM_GET_PROTO_STATE(err_entry.op_context); ++ if (RXM_IS_PROTO_STATE_TX(state)) { ++ util_cq = rxm_ep->util_ep.tx_cq; ++ util_cntr = rxm_ep->util_ep.tx_cntr; + } + +- switch (RXM_GET_PROTO_STATE(comp)) { ++ switch (state) { ++ case RXM_SAR_TX: ++ sar_buf = err_entry.op_context; ++ err_entry.op_context = sar_buf->app_context; ++ err_entry.flags = ofi_tx_cq_flags(sar_buf->pkt.hdr.op); ++ break; + case RXM_TX: +- case RXM_LMT_TX: +- tx_entry = (struct rxm_tx_entry *)op_context; +- util_cq = tx_entry->ep->util_ep.tx_cq; +- if (tx_entry->ep->util_ep.flags & OFI_CNTR_ENABLED) { +- if (tx_entry->comp_flags & FI_SEND) +- util_cntr = tx_entry->ep->util_ep.tx_cntr; +- else if (tx_entry->comp_flags & FI_WRITE) +- util_cntr = tx_entry->ep->util_ep.wr_cntr; +- else +- util_cntr = tx_entry->ep->util_ep.rd_cntr; +- } ++ eager_buf = err_entry.op_context; ++ err_entry.op_context = eager_buf->app_context; ++ err_entry.flags = ofi_tx_cq_flags(eager_buf->pkt.hdr.op); + break; +- case RXM_LMT_ACK_SENT: +- tx_entry = (struct rxm_tx_entry *)op_context; +- util_cq = tx_entry->ep->util_ep.rx_cq; +- util_cntr = tx_entry->ep->util_ep.rx_cntr; ++ case RXM_RNDV_TX: ++ rndv_buf = err_entry.op_context; ++ err_entry.op_context = rndv_buf->app_context; ++ err_entry.flags = ofi_tx_cq_flags(rndv_buf->pkt.hdr.op); + break; + case RXM_RX: +- case RXM_LMT_READ: +- rx_buf = (struct rxm_rx_buf *)op_context; ++ /* Silently drop any MSG CQ error entries for canceled receive ++ * operations as these are internal to RxM. This situation can ++ * happen when the MSG EP receives a reject / shutdown and CM ++ * thread hasn't handled the event yet. */ ++ if (err_entry.err == FI_ECANCELED) { ++ /* No need to re-post these buffers. Free directly */ ++ util_buf_release(rxm_ep->buf_pools[RXM_BUF_POOL_RX].pool, ++ err_entry.op_context); ++ return; ++ } ++ /* fall through */ ++ case RXM_RNDV_ACK_SENT: ++ /* fall through */ ++ case RXM_RNDV_READ: ++ rx_buf = (struct rxm_rx_buf *)err_entry.op_context; + util_cq = rx_buf->ep->util_ep.rx_cq; + util_cntr = rx_buf->ep->util_ep.rx_cntr; ++ assert(rx_buf->recv_entry); ++ err_entry.op_context = rx_buf->recv_entry->context; ++ err_entry.flags = rx_buf->recv_entry->comp_flags; + break; + default: + FI_WARN(&rxm_prov, FI_LOG_CQ, "Invalid state!\n"); +- if (err == -FI_EAVAIL) +- FI_WARN(&rxm_prov, FI_LOG_CQ, "msg cq error info: %s\n", +- fi_cq_strerror(msg_cq, err_entry.prov_errno, +- err_entry.err_data, NULL, 0)); +- return -FI_EOPBADSTATE; ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "msg cq error info: %s\n", ++ fi_cq_strerror(rxm_ep->msg_cq, err_entry.prov_errno, ++ err_entry.err_data, NULL, 0)); ++ rxm_cq_write_error_all(rxm_ep, -FI_EOPBADSTATE); ++ } ++ if (util_cntr) ++ rxm_cntr_incerr(util_cntr); ++ if (util_cq) { ++ ret = ofi_cq_write_error(util_cq, &err_entry); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unable to ofi_cq_write_error\n"); ++ assert(0); ++ } + } +- rxm_cntr_incerr(util_cntr); +- return ofi_cq_write_error(util_cq, &err_entry); + } + +-static inline int rxm_ep_repost_buf(struct rxm_rx_buf *rx_buf) ++static inline int rxm_msg_ep_recv(struct rxm_rx_buf *rx_buf) + { +- rx_buf->conn = NULL; ++ int ret; ++ ++ if (rx_buf->ep->srx_ctx) ++ rx_buf->conn = NULL; + rx_buf->hdr.state = RXM_RX; + +- if (fi_recv(rx_buf->hdr.msg_ep, &rx_buf->pkt, +- rx_buf->ep->rxm_info->tx_attr->inject_size + +- sizeof(struct rxm_pkt), rx_buf->hdr.desc, +- FI_ADDR_UNSPEC, rx_buf)) { +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to repost buf\n"); +- return -FI_EAVAIL; +- } +- return FI_SUCCESS; ++ ret = (int)fi_recv(rx_buf->msg_ep, &rx_buf->pkt, ++ rxm_eager_limit + sizeof(struct rxm_pkt), ++ rx_buf->hdr.desc, FI_ADDR_UNSPEC, rx_buf); ++ if (ret) ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "unable to post recv buf: %d\n", ret); ++ return ret; + } + +-int rxm_ep_prepost_buf(struct rxm_ep *rxm_ep, struct fid_ep *msg_ep) ++int rxm_msg_ep_prepost_recv(struct rxm_ep *rxm_ep, struct fid_ep *msg_ep) + { + struct rxm_rx_buf *rx_buf; + int ret; + size_t i; + + for (i = 0; i < rxm_ep->msg_info->rx_attr->size; i++) { +- rx_buf = rxm_rx_buf_get(rxm_ep); ++ rx_buf = rxm_rx_buf_alloc(rxm_ep, msg_ep, 1); + if (OFI_UNLIKELY(!rx_buf)) + return -FI_ENOMEM; + +- rx_buf->hdr.state = RXM_RX; +- rx_buf->hdr.msg_ep = msg_ep; +- rx_buf->repost = 1; +- +- ret = rxm_ep_repost_buf(rx_buf); +- if (ret) { +- rxm_rx_buf_release(rxm_ep, rx_buf); ++ ret = rxm_msg_ep_recv(rx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ rxm_buf_release(&rxm_ep->buf_pools[RXM_BUF_POOL_RX], ++ &rx_buf->hdr); + return ret; + } +- dlist_insert_tail(&rx_buf->entry, &rxm_ep->post_rx_list); + } + return 0; + } + +-static inline void rxm_cq_repost_rx_buffers(struct rxm_ep *rxm_ep) ++void rxm_ep_do_progress(struct util_ep *util_ep) + { ++ struct rxm_ep *rxm_ep = container_of(util_ep, struct rxm_ep, util_ep); ++ struct fi_cq_data_entry comp; ++ struct dlist_entry *conn_entry_tmp; ++ struct rxm_conn *rxm_conn; + struct rxm_rx_buf *buf; +- fastlock_acquire(&rxm_ep->util_ep.lock); ++ ssize_t ret; ++ size_t comp_read = 0; ++ ++ if (!slistfd_empty(&rxm_ep->msg_eq_entry_list)) ++ rxm_conn_process_eq_events(rxm_ep); ++ + while (!dlist_empty(&rxm_ep->repost_ready_list)) { + dlist_pop_front(&rxm_ep->repost_ready_list, struct rxm_rx_buf, + buf, repost_entry); +- (void) rxm_ep_repost_buf(buf); +- } +- fastlock_release(&rxm_ep->util_ep.lock); +-} +- +-static int rxm_cq_reprocess_directed_recvs(struct rxm_recv_queue *recv_queue) +-{ +- struct rxm_rx_buf *rx_buf; +- struct dlist_entry *entry, *tmp_entry; +- struct rxm_recv_match_attr match_attr; +- struct dlist_entry rx_buf_list; +- struct fi_cq_err_entry err_entry = {0}; +- int ret, count = 0; +- +- dlist_init(&rx_buf_list); +- +- fastlock_acquire(&recv_queue->rxm_ep->util_ep.cmap->lock); +- fastlock_acquire(&recv_queue->lock); +- +- dlist_foreach_container_safe(&recv_queue->unexp_msg_list, +- struct rxm_rx_buf, rx_buf, +- unexp_msg.entry, tmp_entry) { +- if (rx_buf->unexp_msg.addr == rx_buf->conn->handle.fi_addr) +- continue; +- +- assert(rx_buf->unexp_msg.addr == FI_ADDR_NOTAVAIL); +- +- match_attr.addr = rx_buf->unexp_msg.addr = +- rx_buf->conn->handle.fi_addr; +- match_attr.tag = rx_buf->unexp_msg.tag; + +- entry = dlist_remove_first_match(&recv_queue->recv_list, +- recv_queue->match_recv, +- &match_attr); +- if (!entry) ++ /* Discard rx buffer if its msg_ep was closed */ ++ if (!buf->conn->msg_ep) { ++ util_buf_release(rxm_ep->buf_pools[RXM_BUF_POOL_RX].pool, ++ buf); + continue; ++ } + +- dlist_remove(&rx_buf->unexp_msg.entry); +- rx_buf->recv_entry = container_of(entry, struct rxm_recv_entry, +- entry); +- dlist_insert_tail(&rx_buf->unexp_msg.entry, &rx_buf_list); +- } +- fastlock_release(&recv_queue->lock); +- fastlock_release(&recv_queue->rxm_ep->util_ep.cmap->lock); +- +- while (!dlist_empty(&rx_buf_list)) { +- dlist_pop_front(&rx_buf_list, struct rxm_rx_buf, +- rx_buf, unexp_msg.entry); +- ret = rxm_cq_handle_data(rx_buf); ++ ret = rxm_msg_ep_recv(buf); + if (ret) { +- err_entry.op_context = rx_buf; +- err_entry.flags = rx_buf->recv_entry->comp_flags; +- err_entry.len = rx_buf->pkt.hdr.size; +- err_entry.data = rx_buf->pkt.hdr.data; +- err_entry.tag = rx_buf->pkt.hdr.tag; +- err_entry.err = ret; +- err_entry.prov_errno = ret; +- ofi_cq_write_error(recv_queue->rxm_ep->util_ep.rx_cq, +- &err_entry); +- if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) +- rxm_cntr_incerr(rx_buf->ep->util_ep.rx_cntr); +- +- rxm_enqueue_repost_ready_list(rx_buf); +- +- if (!(rx_buf->recv_entry->flags & FI_MULTI_RECV)) +- rxm_recv_entry_release(recv_queue, +- rx_buf->recv_entry); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ util_buf_release( ++ rxm_ep->buf_pools[RXM_BUF_POOL_RX].pool, ++ buf); + } +- count++; +- } +- return count; +-} +- +-static int rxm_cq_reprocess_recv_queues(struct rxm_ep *rxm_ep) +-{ +- int count = 0; +- +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- +- if (!rxm_ep->util_ep.cmap->av_updated) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return 0; +- } +- +- rxm_ep->util_ep.cmap->av_updated = 0; +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- +- count += rxm_cq_reprocess_directed_recvs(&rxm_ep->recv_queue); +- count += rxm_cq_reprocess_directed_recvs(&rxm_ep->trecv_queue); +- return count; +-} +- +-void rxm_ep_progress_one(struct util_ep *util_ep) +-{ +- struct rxm_ep *rxm_ep = +- container_of(util_ep, struct rxm_ep, util_ep); +- struct fi_cq_tagged_entry comp; +- ssize_t ret; +- +- rxm_cq_repost_rx_buffers(rxm_ep); +- +- if (OFI_UNLIKELY(rxm_ep->util_ep.cmap->av_updated)) { +- ret = rxm_cq_reprocess_recv_queues(rxm_ep); +- if (ret > 0) +- return; +- } +- +- ret = fi_cq_read(rxm_ep->msg_cq, &comp, 1); +- if (ret == -FI_EAGAIN || !ret) +- return; +- if (OFI_UNLIKELY(ret < 0)) +- goto err; +- +- ret = rxm_cq_handle_comp(rxm_ep, &comp); +- if (OFI_UNLIKELY(ret)) +- goto err; +- +- return; +-err: +- if (rxm_cq_write_error(rxm_ep->msg_cq, &comp, ret)) +- assert(0); +-} +- +-void rxm_ep_progress_multi(struct util_ep *util_ep) +-{ +- struct rxm_ep *rxm_ep = +- container_of(util_ep, struct rxm_ep, util_ep); +- struct fi_cq_tagged_entry comp; +- ssize_t ret; +- size_t comp_read = 0; +- +- rxm_cq_repost_rx_buffers(rxm_ep); +- +- if (OFI_UNLIKELY(rxm_ep->util_ep.cmap->av_updated)) { +- ret = rxm_cq_reprocess_recv_queues(rxm_ep); +- if (ret > 0) +- return; + } + + do { + ret = fi_cq_read(rxm_ep->msg_cq, &comp, 1); +- if (ret == -FI_EAGAIN) +- return; +- if (OFI_UNLIKELY(ret < 0)) +- goto err; +- if (ret) { ++ if (ret > 0) { ++ // We don't have enough info to write a good ++ // error entry to the CQ at this point + ret = rxm_cq_handle_comp(rxm_ep, &comp); +- if (OFI_UNLIKELY(ret)) +- goto err; +- comp_read++; ++ if (OFI_UNLIKELY(ret)) { ++ rxm_cq_write_error_all(rxm_ep, ret); ++ } else { ++ ret = 1; ++ } ++ } else if (ret < 0 && (ret != -FI_EAGAIN)) { ++ if (ret == -FI_EAVAIL) ++ rxm_cq_read_write_error(rxm_ep); ++ else ++ rxm_cq_write_error_all(rxm_ep, ret); + } +- } while (comp_read < rxm_ep->comp_per_progress); ++ } while ((ret > 0) && (++comp_read < rxm_ep->comp_per_progress)); + +- return; +-err: +- if (rxm_cq_write_error(rxm_ep->msg_cq, &comp, ret)) +- assert(0); ++ if (OFI_UNLIKELY(!dlist_empty(&rxm_ep->deferred_tx_conn_queue))) { ++ dlist_foreach_container_safe(&rxm_ep->deferred_tx_conn_queue, ++ struct rxm_conn, rxm_conn, ++ deferred_conn_entry, conn_entry_tmp) ++ rxm_ep_progress_deferred_queue(rxm_ep, rxm_conn); ++ } ++} ++ ++void rxm_ep_progress(struct util_ep *util_ep) ++{ ++ ofi_ep_lock_acquire(util_ep); ++ rxm_ep_do_progress(util_ep); ++ ofi_ep_lock_release(util_ep); + } + + static int rxm_cq_close(struct fid *fid) +@@ -956,7 +1367,7 @@ static struct fi_ops rxm_cq_fi_ops = { + .size = sizeof(struct fi_ops), + .close = rxm_cq_close, + .bind = fi_no_bind, +- .control = fi_no_control, ++ .control = ofi_cq_control, + .ops_open = fi_no_ops_open, + }; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_domain.c +index 5000f45..6c9162c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_domain.c +@@ -60,15 +60,9 @@ free: + return ret; + } + +-int rxm_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context) +-{ +- return ip_av_create_flags(domain_fid, attr, av, context, OFI_AV_HASH); +-} +- + static struct fi_ops_domain rxm_domain_ops = { + .size = sizeof(struct fi_ops_domain), +- .av_open = rxm_av_create, ++ .av_open = rxm_av_open, + .cq_open = rxm_cq_open, + .endpoint = rxm_endpoint, + .scalable_ep = fi_no_scalable_ep, +@@ -76,9 +70,40 @@ static struct fi_ops_domain rxm_domain_ops = { + .poll_open = fi_poll_create, + .stx_ctx = fi_no_stx_context, + .srx_ctx = fi_no_srx_context, +- .query_atomic = fi_no_query_atomic, ++ .query_atomic = rxm_ep_query_atomic, + }; + ++static void rxm_mr_remove_map_entry(struct rxm_mr *mr) ++{ ++ fastlock_acquire(&mr->domain->util_domain.lock); ++ (void) ofi_mr_map_remove(&mr->domain->util_domain.mr_map, ++ mr->mr_fid.key); ++ fastlock_release(&mr->domain->util_domain.lock); ++} ++ ++static int rxm_mr_add_map_entry(struct util_domain *domain, ++ struct fi_mr_attr *msg_attr, ++ struct rxm_mr *rxm_mr) ++{ ++ uint64_t temp_key; ++ int ret; ++ ++ msg_attr->requested_key = rxm_mr->mr_fid.key; ++ ++ fastlock_acquire(&domain->lock); ++ ret = ofi_mr_map_insert(&domain->mr_map, msg_attr, &temp_key, rxm_mr); ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_DOMAIN, ++ "MR map insert for atomic verification failed %d\n", ++ ret); ++ } else { ++ assert(rxm_mr->mr_fid.key == temp_key); ++ } ++ fastlock_release(&domain->lock); ++ ++ return ret; ++} ++ + static int rxm_domain_close(fid_t fid) + { + struct rxm_domain *rxm_domain; +@@ -112,9 +137,15 @@ static int rxm_mr_close(fid_t fid) + int ret; + + rxm_mr = container_of(fid, struct rxm_mr, mr_fid.fid); ++ ++ if (rxm_mr->domain->util_domain.info_domain_caps & FI_ATOMIC) ++ rxm_mr_remove_map_entry(rxm_mr); ++ + ret = fi_close(&rxm_mr->msg_mr->fid); + if (ret) + FI_WARN(&rxm_prov, FI_LOG_DOMAIN, "Unable to close MSG MR\n"); ++ ++ ofi_atomic_dec32(&rxm_mr->domain->util_domain.ref); + free(rxm_mr); + return ret; + } +@@ -127,55 +158,143 @@ static struct fi_ops rxm_mr_ops = { + .ops_open = fi_no_ops_open, + }; + +-static int rxm_mr_reg(struct fid *domain_fid, const void *buf, size_t len, +- uint64_t access, uint64_t offset, uint64_t requested_key, +- uint64_t flags, struct fid_mr **mr, void *context) ++static uint64_t ++rxm_mr_get_msg_access(struct rxm_domain *rxm_domain, uint64_t access) ++{ ++ /* Additional flags to use RMA read for large message transfers */ ++ access |= FI_READ | FI_REMOTE_READ; ++ ++ if (rxm_domain->mr_local) ++ access |= FI_WRITE; ++ return access; ++} ++ ++static void rxm_mr_init(struct rxm_mr *rxm_mr, struct rxm_domain *domain, ++ void *context) ++{ ++ rxm_mr->mr_fid.fid.fclass = FI_CLASS_MR; ++ rxm_mr->mr_fid.fid.context = context; ++ rxm_mr->mr_fid.fid.ops = &rxm_mr_ops; ++ /* Store msg_mr as rxm_mr descriptor so that we can get its key when ++ * the app passes msg_mr as the descriptor in fi_send and friends. ++ * The key would be used in large message transfer protocol and RMA. */ ++ rxm_mr->mr_fid.mem_desc = rxm_mr->msg_mr; ++ rxm_mr->mr_fid.key = fi_mr_key(rxm_mr->msg_mr); ++ rxm_mr->domain = domain; ++ ofi_atomic_inc32(&domain->util_domain.ref); ++} ++ ++static int rxm_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, ++ uint64_t flags, struct fid_mr **mr) + { + struct rxm_domain *rxm_domain; ++ struct fi_mr_attr msg_attr = *attr; + struct rxm_mr *rxm_mr; + int ret; + +- rxm_domain = container_of(domain_fid, struct rxm_domain, +- util_domain.domain_fid.fid); ++ rxm_domain = container_of(fid, struct rxm_domain, ++ util_domain.domain_fid.fid); + + rxm_mr = calloc(1, sizeof(*rxm_mr)); + if (!rxm_mr) + return -FI_ENOMEM; + +- /* Additional flags to use RMA read for large message transfers */ +- access |= FI_READ | FI_REMOTE_READ; +- +- if (rxm_domain->mr_local) +- access |= FI_WRITE; ++ msg_attr.access = rxm_mr_get_msg_access(rxm_domain, attr->access); + +- ret = fi_mr_reg(rxm_domain->msg_domain, buf, len, access, offset, requested_key, +- flags, &rxm_mr->msg_mr, context); ++ ret = fi_mr_regattr(rxm_domain->msg_domain, &msg_attr, ++ flags, &rxm_mr->msg_mr); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_DOMAIN, "Unable to register MSG MR\n"); + goto err; + } ++ rxm_mr_init(rxm_mr, rxm_domain, attr->context); ++ *mr = &rxm_mr->mr_fid; + +- rxm_mr->mr_fid.fid.fclass = FI_CLASS_MR; +- rxm_mr->mr_fid.fid.context = context; +- rxm_mr->mr_fid.fid.ops = &rxm_mr_ops; +- /* Store msg_mr as rxm_mr descriptor so that we can get its key when +- * the app passes msg_mr as the descriptor in fi_send and friends. +- * The key would be used in large message transfer protocol and RMA. */ +- rxm_mr->mr_fid.mem_desc = rxm_mr->msg_mr; +- rxm_mr->mr_fid.key = fi_mr_key(rxm_mr->msg_mr); ++ if (rxm_domain->util_domain.info_domain_caps & FI_ATOMIC) { ++ ret = rxm_mr_add_map_entry(&rxm_domain->util_domain, ++ &msg_attr, rxm_mr); ++ if (ret) ++ goto map_err; ++ } ++ ++ return 0; ++ ++map_err: ++ fi_close(&rxm_mr->mr_fid.fid); ++ return ret; ++err: ++ free(rxm_mr); ++ return ret; ++ ++} ++ ++static int rxm_mr_regv(struct fid *fid, const struct iovec *iov, size_t count, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ struct rxm_domain *rxm_domain; ++ struct rxm_mr *rxm_mr; ++ int ret; ++ struct fi_mr_attr msg_attr = { ++ .mr_iov = iov, ++ .iov_count = count, ++ .access = access, ++ .offset = offset, ++ .requested_key = requested_key, ++ .context = context, ++ }; ++ ++ rxm_domain = container_of(fid, struct rxm_domain, ++ util_domain.domain_fid.fid); ++ ++ rxm_mr = calloc(1, sizeof(*rxm_mr)); ++ if (!rxm_mr) ++ return -FI_ENOMEM; ++ ++ access = rxm_mr_get_msg_access(rxm_domain, access); ++ ++ ret = fi_mr_regv(rxm_domain->msg_domain, iov, count, access, offset, ++ requested_key, flags, &rxm_mr->msg_mr, context); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_DOMAIN, "Unable to register MSG MR\n"); ++ goto err; ++ } ++ rxm_mr_init(rxm_mr, rxm_domain, context); + *mr = &rxm_mr->mr_fid; + ++ if (rxm_domain->util_domain.info_domain_caps & FI_ATOMIC) { ++ ret = rxm_mr_add_map_entry(&rxm_domain->util_domain, ++ &msg_attr, rxm_mr); ++ if (ret) ++ goto map_err; ++ } ++ + return 0; ++map_err: ++ fi_close(&rxm_mr->mr_fid.fid); ++ return ret; + err: + free(rxm_mr); + return ret; + } + ++static int rxm_mr_reg(struct fid *fid, const void *buf, size_t len, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ struct iovec iov; ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ return rxm_mr_regv(fid, &iov, 1, access, offset, requested_key, ++ flags, mr, context); ++} ++ + static struct fi_ops_mr rxm_domain_mr_ops = { + .size = sizeof(struct fi_ops_mr), + .reg = rxm_mr_reg, +- .regv = fi_no_mr_regv, +- .regattr = fi_no_mr_regattr, ++ .regv = rxm_mr_regv, ++ .regattr = rxm_mr_regattr, + }; + + int rxm_domain_open(struct fid_fabric *fabric, struct fi_info *info, +@@ -214,14 +333,19 @@ int rxm_domain_open(struct fid_fabric *fabric, struct fi_info *info, + goto err3; + } + ++ /* We maintain an RMA key to MR map used for emulated atomic access ++ * and bounds validation. We turn off the map mode bit FI_MR_PROV_KEY ++ * since we specify the key used by MSG_EP provider. */ ++ rxm_domain->util_domain.mr_map.mode &= ~FI_MR_PROV_KEY; ++ ++ rxm_domain->max_atomic_size = rxm_ep_max_atomic_size(info); + *domain = &rxm_domain->util_domain.domain_fid; + (*domain)->fid.ops = &rxm_domain_fi_ops; + /* Replace MR ops set by ofi_domain_init() */ + (*domain)->mr = &rxm_domain_mr_ops; + (*domain)->ops = &rxm_domain_ops; + +- rxm_domain->mr_local = OFI_CHECK_MR_LOCAL(msg_info) && +- !OFI_CHECK_MR_LOCAL(info); ++ rxm_domain->mr_local = ofi_mr_local(msg_info) && !ofi_mr_local(info); + + fi_freeinfo(msg_info); + return 0; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_ep.c +index 683cb6c..ed0ad82 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_ep.c +@@ -31,62 +31,76 @@ + */ + + #include ++#include + ++#include + #include "ofi.h" + #include + + #include "rxm.h" + +-#define RXM_EP_RECV_SANITIZE_SRC_ADDR(rxm_ep, src_addr) \ +- ((rxm_ep->rxm_info->caps & FI_DIRECTED_RECV) ? \ +- src_addr : FI_ADDR_UNSPEC) +- +-const size_t rxm_pkt_size = sizeof(struct rxm_pkt); ++static int rxm_match_noop(struct dlist_entry *item, const void *arg) ++{ ++ OFI_UNUSED(item); ++ OFI_UNUSED(arg); ++ return 1; ++} + + static int rxm_match_recv_entry(struct dlist_entry *item, const void *arg) + { + struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *) arg; +- struct rxm_recv_entry *recv_entry; +- +- recv_entry = container_of(item, struct rxm_recv_entry, entry); +- return rxm_match_addr(recv_entry->addr, attr->addr); ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, entry); ++ return ofi_match_addr(recv_entry->addr, attr->addr); + } + +-static int rxm_match_recv_entry_tagged(struct dlist_entry *item, const void *arg) ++static int rxm_match_recv_entry_tag(struct dlist_entry *item, const void *arg) + { + struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; +- struct rxm_recv_entry *recv_entry; ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, entry); ++ return ofi_match_tag(recv_entry->tag, recv_entry->ignore, attr->tag); ++} + +- recv_entry = container_of(item, struct rxm_recv_entry, entry); +- return rxm_match_addr(recv_entry->addr, attr->addr) && +- rxm_match_tag(recv_entry->tag, recv_entry->ignore, attr->tag); ++static int rxm_match_recv_entry_tag_addr(struct dlist_entry *item, const void *arg) ++{ ++ struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, entry); ++ return ofi_match_addr(recv_entry->addr, attr->addr) && ++ ofi_match_tag(recv_entry->tag, recv_entry->ignore, attr->tag); + } + + static int rxm_match_recv_entry_context(struct dlist_entry *item, const void *context) + { +- struct rxm_recv_entry *recv_entry; +- +- recv_entry = container_of(item, struct rxm_recv_entry, entry); ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, entry); + return recv_entry->context == context; + } + + static int rxm_match_unexp_msg(struct dlist_entry *item, const void *arg) + { + struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; +- struct rxm_unexp_msg *unexp_msg; +- +- unexp_msg = container_of(item, struct rxm_unexp_msg, entry); +- return rxm_match_addr(attr->addr, unexp_msg->addr); ++ struct rxm_unexp_msg *unexp_msg = ++ container_of(item, struct rxm_unexp_msg, entry); ++ return ofi_match_addr(attr->addr, unexp_msg->addr); + } + +-static int rxm_match_unexp_msg_tagged(struct dlist_entry *item, const void *arg) ++static int rxm_match_unexp_msg_tag(struct dlist_entry *item, const void *arg) + { + struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; +- struct rxm_unexp_msg *unexp_msg; ++ struct rxm_unexp_msg *unexp_msg = ++ container_of(item, struct rxm_unexp_msg, entry); ++ return ofi_match_tag(attr->tag, attr->ignore, unexp_msg->tag); ++} + +- unexp_msg = container_of(item, struct rxm_unexp_msg, entry); +- return rxm_match_addr(attr->addr, unexp_msg->addr) && +- rxm_match_tag(attr->tag, attr->ignore, unexp_msg->tag); ++static int rxm_match_unexp_msg_tag_addr(struct dlist_entry *item, const void *arg) ++{ ++ struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; ++ struct rxm_unexp_msg *unexp_msg = ++ container_of(item, struct rxm_unexp_msg, entry); ++ return ofi_match_addr(attr->addr, unexp_msg->addr) && ++ ofi_match_tag(attr->tag, attr->ignore, unexp_msg->tag); + } + + static inline int +@@ -111,59 +125,127 @@ rxm_mr_buf_reg(struct rxm_ep *rxm_ep, void *addr, size_t len, void **context) + return ret; + } + ++static void rxm_buf_reg_set_common(struct rxm_buf *hdr, struct rxm_pkt *pkt, ++ uint8_t type, void *mr_desc) ++{ ++ if (pkt) { ++ pkt->ctrl_hdr.version = RXM_CTRL_VERSION; ++ pkt->hdr.version = OFI_OP_VERSION; ++ pkt->ctrl_hdr.type = type; ++ } ++ if (hdr) { ++ hdr->desc = mr_desc; ++ } ++} ++ + static int rxm_buf_reg(void *pool_ctx, void *addr, size_t len, void **context) + { + struct rxm_buf_pool *pool = (struct rxm_buf_pool *)pool_ctx; + size_t i, entry_sz = pool->pool->entry_sz; + int ret; +- struct rxm_tx_buf *tx_buf; +- struct rxm_rx_buf *rx_buf; + void *mr_desc; ++ uint8_t type; ++ struct rxm_buf *hdr; ++ struct rxm_pkt *pkt; ++ struct rxm_rx_buf *rx_buf; ++ struct rxm_tx_base_buf *tx_base_buf; ++ struct rxm_tx_eager_buf *tx_eager_buf; ++ struct rxm_tx_sar_buf *tx_sar_buf; ++ struct rxm_tx_rndv_buf *tx_rndv_buf; ++ struct rxm_tx_atomic_buf *tx_atomic_buf; ++ struct rxm_rma_buf *rma_buf; ++ ++ if ((pool->type != RXM_BUF_POOL_TX_INJECT) && pool->rxm_ep->msg_mr_local) { ++ ret = rxm_mr_buf_reg(pool->rxm_ep, addr, len, context); ++ if (ret) ++ return ret; ++ mr_desc = fi_mr_desc((struct fid_mr *)*context); ++ } else { ++ *context = mr_desc = NULL; ++ } + +- ret = rxm_mr_buf_reg(pool->ep, addr, len, context); +- if (ret) +- return ret; +- +- mr_desc = (*context != NULL) ? fi_mr_desc((struct fid_mr *)*context) : NULL; +- +- for (i = 0; i < pool->pool->chunk_cnt; i++) { +- if (pool->type == RXM_BUF_POOL_RX) { +- rx_buf = (struct rxm_rx_buf *)((char *)addr + i * entry_sz); +- rx_buf->ep = pool->ep; +- rx_buf->hdr.desc = mr_desc; +- } else { +- tx_buf = (struct rxm_tx_buf *)((char *)addr + i * entry_sz); +- tx_buf->type = pool->type; +- tx_buf->pkt.ctrl_hdr.version = OFI_CTRL_VERSION; +- tx_buf->pkt.hdr.version = OFI_OP_VERSION; +- if (rxm_ep_tx_flags(pool->ep) & FI_TRANSMIT_COMPLETE) +- tx_buf->pkt.hdr.flags |= OFI_TRANSMIT_COMPLETE; +- if (rxm_ep_tx_flags(pool->ep) & FI_DELIVERY_COMPLETE) +- tx_buf->pkt.hdr.flags |= OFI_DELIVERY_COMPLETE; +- tx_buf->hdr.desc = mr_desc; +- +- switch (pool->type) { +- case RXM_BUF_POOL_TX_MSG: +- case RXM_BUF_POOL_RMA: +- tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_data; +- tx_buf->pkt.hdr.op = ofi_op_msg; +- break; +- case RXM_BUF_POOL_TX_TAGGED: +- tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_data; +- tx_buf->pkt.hdr.op = ofi_op_tagged; +- break; +- case RXM_BUF_POOL_TX_ACK: +- tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_ack; +- tx_buf->pkt.hdr.op = ofi_op_msg; +- break; +- case RXM_BUF_POOL_TX_LMT: +- tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_large_data; +- break; +- default: +- assert(0); +- break; +- } ++ for (i = 0; i < pool->pool->attr.chunk_cnt; i++) { ++ switch (pool->type) { ++ case RXM_BUF_POOL_RX: ++ rx_buf = (struct rxm_rx_buf *) ++ ((char *)addr + i * entry_sz); ++ rx_buf->ep = pool->rxm_ep; ++ ++ hdr = &rx_buf->hdr; ++ pkt = NULL; ++ type = ofi_ctrl_data; /* This can be any value */ ++ break; ++ case RXM_BUF_POOL_TX: ++ tx_eager_buf = (struct rxm_tx_eager_buf *) ++ ((char *)addr + i * entry_sz); ++ tx_eager_buf->hdr.state = RXM_TX; ++ ++ hdr = &tx_eager_buf->hdr; ++ pkt = &tx_eager_buf->pkt; ++ type = ofi_ctrl_data; ++ break; ++ case RXM_BUF_POOL_TX_INJECT: ++ tx_base_buf = (struct rxm_tx_base_buf *) ++ ((char *)addr + i * entry_sz); ++ tx_base_buf->hdr.state = RXM_INJECT_TX; ++ ++ hdr = NULL; ++ pkt = &tx_base_buf->pkt; ++ type = ofi_ctrl_data; ++ break; ++ case RXM_BUF_POOL_TX_SAR: ++ tx_sar_buf = (struct rxm_tx_sar_buf *) ++ ((char *)addr + i * entry_sz); ++ tx_sar_buf->hdr.state = RXM_SAR_TX; ++ ++ hdr = &tx_sar_buf->hdr; ++ pkt = &tx_sar_buf->pkt; ++ type = ofi_ctrl_seg_data; ++ break; ++ case RXM_BUF_POOL_TX_RNDV: ++ tx_rndv_buf = (struct rxm_tx_rndv_buf *) ++ ((char *)addr + i * entry_sz); ++ ++ hdr = &tx_rndv_buf->hdr; ++ pkt = &tx_rndv_buf->pkt; ++ type = ofi_ctrl_large_data; ++ break; ++ case RXM_BUF_POOL_TX_ATOMIC: ++ tx_atomic_buf = (struct rxm_tx_atomic_buf *) ++ ((char *)addr + i * entry_sz); ++ ++ hdr = &tx_atomic_buf->hdr; ++ pkt = &tx_atomic_buf->pkt; ++ type = ofi_ctrl_atomic; ++ break; ++ case RXM_BUF_POOL_TX_ACK: ++ tx_base_buf = (struct rxm_tx_base_buf *) ++ ((char *)addr + i * entry_sz); ++ tx_base_buf->pkt.hdr.op = ofi_op_msg; ++ ++ hdr = &tx_base_buf->hdr; ++ pkt = &tx_base_buf->pkt; ++ type = ofi_ctrl_ack; ++ break; ++ case RXM_BUF_POOL_RMA: ++ rma_buf = (struct rxm_rma_buf *) ++ ((char *)addr + i * entry_sz); ++ rma_buf->pkt.hdr.op = ofi_op_msg; ++ rma_buf->hdr.state = RXM_RMA; ++ ++ hdr = &rma_buf->hdr; ++ pkt = &rma_buf->pkt; ++ type = ofi_ctrl_data; ++ break; ++ default: ++ assert(0); ++ hdr = NULL; ++ pkt = NULL; ++ mr_desc = NULL; ++ type = ofi_ctrl_data; ++ break; + } ++ rxm_buf_reg_set_common(hdr, pkt, type, mr_desc); + } + + return FI_SUCCESS; +@@ -171,10 +253,10 @@ static int rxm_buf_reg(void *pool_ctx, void *addr, size_t len, void **context) + + static inline void rxm_buf_close(void *pool_ctx, void *context) + { +- struct rxm_ep *rxm_ep = +- (struct rxm_ep *)((struct rxm_buf_pool *)pool_ctx)->ep; ++ struct rxm_buf_pool *pool = (struct rxm_buf_pool *)pool_ctx; ++ struct rxm_ep *rxm_ep = pool->rxm_ep; + +- if (rxm_ep->msg_mr_local) { ++ if ((rxm_ep->msg_mr_local) && (pool->type != RXM_BUF_POOL_TX_INJECT)) { + /* We would get a (fid_mr *) in context but + * it is safe to cast it into (fid *) */ + fi_close((struct fid *)context); +@@ -183,17 +265,9 @@ static inline void rxm_buf_close(void *pool_ctx, void *context) + + static void rxm_buf_pool_destroy(struct rxm_buf_pool *pool) + { +- fastlock_destroy(&pool->lock); +- util_buf_pool_destroy(pool->pool); +-} +- +-static void rxm_ep_cleanup_post_rx_list(struct rxm_ep *rxm_ep) +-{ +- struct rxm_rx_buf *rx_buf; +- while (!dlist_empty(&rxm_ep->post_rx_list)) { +- dlist_pop_front(&rxm_ep->post_rx_list, struct rxm_rx_buf, +- rx_buf, entry); +- rxm_rx_buf_release(rxm_ep, rx_buf); ++ /* This indicates whether the pool is allocated or not */ ++ if (pool->rxm_ep) { ++ util_buf_pool_destroy(pool->pool); + } + } + +@@ -202,131 +276,152 @@ static int rxm_buf_pool_create(struct rxm_ep *rxm_ep, + struct rxm_buf_pool *pool, + enum rxm_buf_pool_type type) + { ++ struct util_buf_attr attr = { ++ .size = size, ++ .alignment = 16, ++ .max_cnt = 0, ++ .chunk_cnt = chunk_count, ++ .alloc_hndlr = rxm_buf_reg, ++ .free_hndlr = rxm_buf_close, ++ .ctx = pool, ++ .track_used = 0, ++ }; + int ret; + +- pool->ep = rxm_ep; ++ switch (type) { ++ case RXM_BUF_POOL_TX_RNDV: ++ case RXM_BUF_POOL_TX_ATOMIC: ++ case RXM_BUF_POOL_TX_SAR: ++ attr.indexing.used = 1; ++ break; ++ default: ++ attr.indexing.used = 0; ++ break; ++ } ++ ++ pool->rxm_ep = rxm_ep; + pool->type = type; +- ret = util_buf_pool_create_ex(&pool->pool, size, 16, 0, chunk_count, +- rxm_buf_reg, rxm_buf_close, pool); ++ ret = util_buf_pool_create_attr(&attr, &pool->pool); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to create buf pool\n"); + return -FI_ENOMEM; + } +- fastlock_init(&pool->lock); ++ + return 0; + } + +-static int rxm_send_queue_init(struct rxm_ep *rxm_ep, struct rxm_send_queue *send_queue, +- size_t size) ++static void rxm_recv_entry_init(struct rxm_recv_entry *entry, void *arg) + { +- ssize_t i; ++ struct rxm_recv_queue *recv_queue = arg; + +- send_queue->fs = rxm_txe_fs_create(size); +- if (!send_queue->fs) +- return -FI_ENOMEM; ++ assert(recv_queue->type != RXM_RECV_QUEUE_UNSPEC); + +- for (i = send_queue->fs->size - 1; i >= 0; i--) +- send_queue->fs->buf[i].ep = rxm_ep; ++ entry->recv_queue = recv_queue; ++ entry->sar.msg_id = RXM_SAR_RX_INIT; ++ entry->sar.total_recv_len = 0; ++ entry->comp_flags = FI_RECV; + +- fastlock_init(&send_queue->lock); +- return 0; ++ if (recv_queue->type == RXM_RECV_QUEUE_MSG) ++ entry->comp_flags |= FI_MSG; ++ else ++ entry->comp_flags |= FI_TAGGED; + } + + static int rxm_recv_queue_init(struct rxm_ep *rxm_ep, struct rxm_recv_queue *recv_queue, + size_t size, enum rxm_recv_queue_type type) + { +- ssize_t i; +- + recv_queue->rxm_ep = rxm_ep; + recv_queue->type = type; +- recv_queue->fs = rxm_recv_fs_create(size); ++ recv_queue->fs = rxm_recv_fs_create(size, rxm_recv_entry_init, recv_queue); + if (!recv_queue->fs) + return -FI_ENOMEM; + + dlist_init(&recv_queue->recv_list); + dlist_init(&recv_queue->unexp_msg_list); + if (type == RXM_RECV_QUEUE_MSG) { +- recv_queue->match_recv = rxm_match_recv_entry; +- recv_queue->match_unexp = rxm_match_unexp_msg; +- for (i = recv_queue->fs->size - 1; i >= 0; i--) +- recv_queue->fs->buf[i].comp_flags = FI_MSG | FI_RECV; ++ if (rxm_ep->rxm_info->caps & FI_DIRECTED_RECV) { ++ recv_queue->match_recv = rxm_match_recv_entry; ++ recv_queue->match_unexp = rxm_match_unexp_msg; ++ } else { ++ recv_queue->match_recv = rxm_match_noop; ++ recv_queue->match_unexp = rxm_match_noop; ++ } + } else { +- recv_queue->match_recv = rxm_match_recv_entry_tagged; +- recv_queue->match_unexp = rxm_match_unexp_msg_tagged; +- for (i = recv_queue->fs->size - 1; i >= 0; i--) +- recv_queue->fs->buf[i].comp_flags = FI_TAGGED | FI_RECV; +- } +- fastlock_init(&recv_queue->lock); +- return 0; +-} +- +-static void rxm_send_queue_close(struct rxm_send_queue *send_queue) +-{ +- if (send_queue->fs) { +- struct rxm_tx_entry *tx_entry; +- ssize_t i; +- +- for (i = send_queue->fs->size - 1; i >= 0; i--) { +- tx_entry = &send_queue->fs->buf[i]; +- if (tx_entry->tx_buf) { +- rxm_tx_buf_release(tx_entry->ep, tx_entry->tx_buf); +- tx_entry->tx_buf = NULL; +- } ++ if (rxm_ep->rxm_info->caps & FI_DIRECTED_RECV) { ++ recv_queue->match_recv = rxm_match_recv_entry_tag_addr; ++ recv_queue->match_unexp = rxm_match_unexp_msg_tag_addr; ++ } else { ++ recv_queue->match_recv = rxm_match_recv_entry_tag; ++ recv_queue->match_unexp = rxm_match_unexp_msg_tag; + } +- rxm_txe_fs_free(send_queue->fs); + } +- fastlock_destroy(&send_queue->lock); ++ ++ return 0; + } + + static void rxm_recv_queue_close(struct rxm_recv_queue *recv_queue) + { +- if (recv_queue->fs) ++ /* It indicates that the recv_queue were allocated */ ++ if (recv_queue->fs) { + rxm_recv_fs_free(recv_queue->fs); +- fastlock_destroy(&recv_queue->lock); ++ } + // TODO cleanup recv_list and unexp msg list + } + + static int rxm_ep_txrx_pool_create(struct rxm_ep *rxm_ep) + { +- size_t i; +- int ret; ++ int ret, i; ++ size_t queue_sizes[] = { ++ [RXM_BUF_POOL_RX] = rxm_ep->msg_info->rx_attr->size, ++ [RXM_BUF_POOL_TX] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_INJECT] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_ACK] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_RNDV] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_ATOMIC] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_SAR] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_RMA] = rxm_ep->msg_info->tx_attr->size, ++ }; ++ size_t entry_sizes[] = { ++ [RXM_BUF_POOL_RX] = rxm_eager_limit + ++ sizeof(struct rxm_rx_buf), ++ [RXM_BUF_POOL_TX] = rxm_eager_limit + ++ sizeof(struct rxm_tx_eager_buf), ++ [RXM_BUF_POOL_TX_INJECT] = rxm_ep->inject_limit + ++ sizeof(struct rxm_tx_base_buf), ++ [RXM_BUF_POOL_TX_ACK] = sizeof(struct rxm_tx_base_buf), ++ [RXM_BUF_POOL_TX_RNDV] = sizeof(struct rxm_rndv_hdr) + ++ rxm_ep->buffered_min + ++ sizeof(struct rxm_tx_rndv_buf), ++ [RXM_BUF_POOL_TX_ATOMIC] = rxm_eager_limit + ++ sizeof(struct rxm_tx_atomic_buf), ++ [RXM_BUF_POOL_TX_SAR] = rxm_eager_limit + ++ sizeof(struct rxm_tx_sar_buf), ++ [RXM_BUF_POOL_RMA] = rxm_eager_limit + ++ sizeof(struct rxm_rma_buf), ++ }; + +- ret = rxm_buf_pool_create(rxm_ep, +- rxm_ep->msg_info->rx_attr->size, +- rxm_ep->rxm_info->tx_attr->inject_size + +- sizeof(struct rxm_rx_buf), +- &rxm_ep->buf_pools[RXM_BUF_POOL_RX], +- RXM_BUF_POOL_RX); +- if (ret) +- return ret; +- dlist_init(&rxm_ep->post_rx_list); + dlist_init(&rxm_ep->repost_ready_list); + +- /* Allocates resources for TX pools */ +- for (i = RXM_BUF_POOL_TX_START; i <= RXM_BUF_POOL_TX_END; i++) { +- ret = rxm_buf_pool_create(rxm_ep, +- rxm_ep->msg_info->tx_attr->size, +- rxm_ep->rxm_info->tx_attr->inject_size + +- sizeof(struct rxm_tx_buf), ++ rxm_ep->buf_pools = calloc(1, RXM_BUF_POOL_MAX * sizeof(*rxm_ep->buf_pools)); ++ if (!rxm_ep->buf_pools) ++ return -FI_ENOMEM; ++ ++ for (i = RXM_BUF_POOL_START; i < RXM_BUF_POOL_MAX; i++) { ++ if ((i == RXM_BUF_POOL_TX_INJECT) && ++ (rxm_ep->util_ep.domain->threading != FI_THREAD_SAFE)) ++ continue; ++ ++ ret = rxm_buf_pool_create(rxm_ep, queue_sizes[i], entry_sizes[i], + &rxm_ep->buf_pools[i], i); + if (ret) + goto err; + } + +- ret = rxm_buf_pool_create(rxm_ep, +- rxm_ep->msg_info->tx_attr->size, +- rxm_ep->rxm_info->tx_attr->inject_size + +- sizeof(struct rxm_rma_buf), +- &rxm_ep->buf_pools[RXM_BUF_POOL_RMA], +- RXM_BUF_POOL_RMA); +- if (ret) +- goto err; +- + return FI_SUCCESS; + err: +- while (--i >= RXM_BUF_POOL_TX_START) ++ while (--i >= RXM_BUF_POOL_START) + rxm_buf_pool_destroy(&rxm_ep->buf_pools[i]); +- rxm_buf_pool_destroy(&rxm_ep->buf_pools[RXM_BUF_POOL_RX]); ++ free(rxm_ep->buf_pools); + return ret; + } + +@@ -336,22 +431,18 @@ static void rxm_ep_txrx_pool_destroy(struct rxm_ep *rxm_ep) + + for (i = RXM_BUF_POOL_START; i < RXM_BUF_POOL_MAX; i++) + rxm_buf_pool_destroy(&rxm_ep->buf_pools[i]); ++ free(rxm_ep->buf_pools); + } + +-static int rxm_ep_txrx_queue_init(struct rxm_ep *rxm_ep) ++static int rxm_ep_rx_queue_init(struct rxm_ep *rxm_ep) + { + int ret; + +- ret = rxm_send_queue_init(rxm_ep, &rxm_ep->send_queue, +- rxm_ep->rxm_info->tx_attr->size); +- if (ret) +- return ret; +- + ret = rxm_recv_queue_init(rxm_ep, &rxm_ep->recv_queue, + rxm_ep->rxm_info->rx_attr->size, + RXM_RECV_QUEUE_MSG); + if (ret) +- goto err_recv_msg; ++ return ret; + + ret = rxm_recv_queue_init(rxm_ep, &rxm_ep->trecv_queue, + rxm_ep->rxm_info->rx_attr->size, +@@ -362,46 +453,22 @@ static int rxm_ep_txrx_queue_init(struct rxm_ep *rxm_ep) + return FI_SUCCESS; + err_recv_tag: + rxm_recv_queue_close(&rxm_ep->recv_queue); +-err_recv_msg: +- rxm_send_queue_close(&rxm_ep->send_queue); + return ret; + } + +-static void rxm_ep_txrx_queue_close(struct rxm_ep *rxm_ep) ++static void rxm_ep_rx_queue_close(struct rxm_ep *rxm_ep) + { + rxm_recv_queue_close(&rxm_ep->trecv_queue); + rxm_recv_queue_close(&rxm_ep->recv_queue); +- rxm_send_queue_close(&rxm_ep->send_queue); +-} +- +-static int rxm_ep_txrx_res_open(struct rxm_ep *rxm_ep) +-{ +- int ret; +- +- FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, +- "MSG provider mr_mode & FI_MR_LOCAL: %d\n", +- rxm_ep->msg_mr_local); +- +- ret = rxm_ep_txrx_pool_create(rxm_ep); +- if (ret) +- return ret; +- +- ret = rxm_ep_txrx_queue_init(rxm_ep); +- if (ret) +- goto err; +- +- return FI_SUCCESS; +-err: +- rxm_ep_txrx_pool_destroy(rxm_ep); +- return ret; + } + ++/* It is safe to call this function, even if `rxm_ep_txrx_res_open` ++ * has not yet been called */ + static void rxm_ep_txrx_res_close(struct rxm_ep *rxm_ep) + { +- rxm_ep_txrx_queue_close(rxm_ep); +- +- rxm_ep_cleanup_post_rx_list(rxm_ep); +- rxm_ep_txrx_pool_destroy(rxm_ep); ++ rxm_ep_rx_queue_close(rxm_ep); ++ if (rxm_ep->buf_pools) ++ rxm_ep_txrx_pool_destroy(rxm_ep); + } + + static int rxm_setname(fid_t fid, void *addr, size_t addrlen) +@@ -439,12 +506,12 @@ static int rxm_ep_cancel_recv(struct rxm_ep *rxm_ep, + struct fi_cq_err_entry err_entry; + struct rxm_recv_entry *recv_entry; + struct dlist_entry *entry; ++ int ret; + +- fastlock_acquire(&recv_queue->lock); ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); + entry = dlist_remove_first_match(&recv_queue->recv_list, + rxm_match_recv_entry_context, + context); +- fastlock_release(&recv_queue->lock); + if (entry) { + recv_entry = container_of(entry, struct rxm_recv_entry, entry); + memset(&err_entry, 0, sizeof(err_entry)); +@@ -454,9 +521,12 @@ static int rxm_ep_cancel_recv(struct rxm_ep *rxm_ep, + err_entry.err = FI_ECANCELED; + err_entry.prov_errno = -FI_ECANCELED; + rxm_recv_entry_release(recv_queue, recv_entry); +- return ofi_cq_write_error(rxm_ep->util_ep.rx_cq, &err_entry); ++ ret = ofi_cq_write_error(rxm_ep->util_ep.rx_cq, &err_entry); ++ } else { ++ ret = 0; + } +- return 0; ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; + } + + static ssize_t rxm_ep_cancel(fid_t fid_ep, void *context) +@@ -481,12 +551,28 @@ static int rxm_ep_getopt(fid_t fid, int level, int optname, void *optval, + struct rxm_ep *rxm_ep = + container_of(fid, struct rxm_ep, util_ep.ep_fid); + +- if ((level != FI_OPT_ENDPOINT) || (optname != FI_OPT_MIN_MULTI_RECV)) ++ if (level != FI_OPT_ENDPOINT) + return -FI_ENOPROTOOPT; + +- *(size_t *)optval = rxm_ep->min_multi_recv_size; +- *optlen = sizeof(size_t); +- ++ switch (optname) { ++ case FI_OPT_MIN_MULTI_RECV: ++ assert(sizeof(rxm_ep->min_multi_recv_size) == sizeof(size_t)); ++ *(size_t *)optval = rxm_ep->min_multi_recv_size; ++ *optlen = sizeof(size_t); ++ break; ++ case FI_OPT_BUFFERED_MIN: ++ assert(sizeof(rxm_ep->buffered_min) == sizeof(size_t)); ++ *(size_t *)optval = rxm_ep->buffered_min; ++ *optlen = sizeof(size_t); ++ break; ++ case FI_OPT_BUFFERED_LIMIT: ++ assert(sizeof(rxm_ep->buffered_limit) == sizeof(size_t)); ++ *(size_t *)optval = rxm_ep->buffered_limit; ++ *optlen = sizeof(size_t); ++ break; ++ default: ++ return -FI_ENOPROTOOPT; ++ } + return FI_SUCCESS; + } + +@@ -495,13 +581,59 @@ static int rxm_ep_setopt(fid_t fid, int level, int optname, + { + struct rxm_ep *rxm_ep = + container_of(fid, struct rxm_ep, util_ep.ep_fid); ++ int ret = FI_SUCCESS; + +- if ((level != FI_OPT_ENDPOINT) || (optname != FI_OPT_MIN_MULTI_RECV)) ++ if (level != FI_OPT_ENDPOINT) + return -FI_ENOPROTOOPT; + +- rxm_ep->min_multi_recv_size = *(size_t *)optval; +- +- return FI_SUCCESS; ++ switch (optname) { ++ case FI_OPT_MIN_MULTI_RECV: ++ rxm_ep->min_multi_recv_size = *(size_t *)optval; ++ FI_INFO(&rxm_prov, FI_LOG_CORE, ++ "FI_OPT_MIN_MULTI_RECV set to %zu\n", ++ rxm_ep->min_multi_recv_size); ++ break; ++ case FI_OPT_BUFFERED_MIN: ++ if (rxm_ep->buf_pools) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Endpoint already enabled. Can't set opt now!\n"); ++ ret = -FI_EOPBADSTATE; ++ } else if (*(size_t *)optval > rxm_ep->buffered_limit) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Invalid value for FI_OPT_BUFFERED_MIN: %zu " ++ "( > FI_OPT_BUFFERED_LIMIT: %zu)\n", ++ *(size_t *)optval, rxm_ep->buffered_limit); ++ ret = -FI_EINVAL; ++ } else { ++ rxm_ep->buffered_min = *(size_t *)optval; ++ FI_INFO(&rxm_prov, FI_LOG_CORE, ++ "FI_OPT_BUFFERED_MIN set to %zu\n", ++ rxm_ep->buffered_min); ++ } ++ break; ++ case FI_OPT_BUFFERED_LIMIT: ++ if (rxm_ep->buf_pools) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Endpoint already enabled. Can't set opt now!\n"); ++ ret = -FI_EOPBADSTATE; ++ /* We do not check for maximum as we allow sizes up to SIZE_MAX */ ++ } else if (*(size_t *)optval < rxm_ep->buffered_min) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Invalid value for FI_OPT_BUFFERED_LIMIT: %zu" ++ " ( < FI_OPT_BUFFERED_MIN: %zu)\n", ++ *(size_t *)optval, rxm_ep->buffered_min); ++ ret = -FI_EINVAL; ++ } else { ++ rxm_ep->buffered_limit = *(size_t *)optval; ++ FI_INFO(&rxm_prov, FI_LOG_CORE, ++ "FI_OPT_BUFFERED_LIMIT set to %zu\n", ++ rxm_ep->buffered_limit); ++ } ++ break; ++ default: ++ ret = -FI_ENOPROTOOPT; ++ } ++ return ret; + } + + static struct fi_ops_ep rxm_ops_ep = { +@@ -521,11 +653,8 @@ static int rxm_ep_discard_recv(struct rxm_ep *rxm_ep, struct rxm_rx_buf *rx_buf, + RXM_DBG_ADDR_TAG(FI_LOG_EP_DATA, "Discarding message", + rx_buf->unexp_msg.addr, rx_buf->unexp_msg.tag); + +- fastlock_acquire(&rxm_ep->util_ep.lock); + dlist_insert_tail(&rx_buf->repost_entry, + &rx_buf->ep->repost_ready_list); +- fastlock_release(&rxm_ep->util_ep.lock); +- + return ofi_cq_write(rxm_ep->util_ep.rx_cq, context, FI_TAGGED | FI_RECV, + 0, NULL, rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag); + } +@@ -538,13 +667,10 @@ static int rxm_ep_peek_recv(struct rxm_ep *rxm_ep, fi_addr_t addr, uint64_t tag, + + RXM_DBG_ADDR_TAG(FI_LOG_EP_DATA, "Peeking message", addr, tag); + +- rxm_ep_progress_multi(&rxm_ep->util_ep); +- +- fastlock_acquire(&recv_queue->lock); ++ rxm_ep_do_progress(&rxm_ep->util_ep); + + rx_buf = rxm_check_unexp_msg_list(recv_queue, addr, tag, ignore); + if (!rx_buf) { +- fastlock_release(&recv_queue->lock); + FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Message not found\n"); + return ofi_cq_write_error_peek(rxm_ep->util_ep.rx_cq, tag, + context); +@@ -554,7 +680,6 @@ static int rxm_ep_peek_recv(struct rxm_ep *rxm_ep, fi_addr_t addr, uint64_t tag, + + if (flags & FI_DISCARD) { + dlist_remove(&rx_buf->unexp_msg.entry); +- fastlock_release(&recv_queue->lock); + return rxm_ep_discard_recv(rxm_ep, rx_buf, context); + } + +@@ -563,7 +688,6 @@ static int rxm_ep_peek_recv(struct rxm_ep *rxm_ep, fi_addr_t addr, uint64_t tag, + ((struct fi_context *)context)->internal[0] = rx_buf; + dlist_remove(&rx_buf->unexp_msg.entry); + } +- fastlock_release(&recv_queue->lock); + + return ofi_cq_write(rxm_ep->util_ep.rx_cq, context, FI_TAGGED | FI_RECV, + rx_buf->pkt.hdr.size, NULL, +@@ -584,12 +708,11 @@ rxm_ep_format_rx_res(struct rxm_ep *rxm_ep, const struct iovec *iov, + return -FI_EAGAIN; + + (*recv_entry)->rxm_iov.count = (uint8_t)count; +- (*recv_entry)->addr = RXM_EP_RECV_SANITIZE_SRC_ADDR(rxm_ep, src_addr); ++ (*recv_entry)->addr = src_addr; + (*recv_entry)->context = context; + (*recv_entry)->flags = flags; + (*recv_entry)->ignore = ignore; + (*recv_entry)->tag = tag; +- (*recv_entry)->multi_recv_buf = iov[0].iov_base; + + for (i = 0; i < count; i++) { + (*recv_entry)->rxm_iov.iov[i].iov_base = iov[i].iov_base; +@@ -599,14 +722,17 @@ rxm_ep_format_rx_res(struct rxm_ep *rxm_ep, const struct iovec *iov, + (*recv_entry)->rxm_iov.desc[i] = desc[i]; + } + ++ (*recv_entry)->multi_recv.len = (*recv_entry)->total_len; ++ (*recv_entry)->multi_recv.buf = iov[0].iov_base; ++ + return FI_SUCCESS; + } + + static inline ssize_t +-rxm_ep_recv_common(struct rxm_ep *rxm_ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, void *context, +- uint64_t op_flags, struct rxm_recv_queue *recv_queue) ++rxm_ep_post_recv(struct rxm_ep *rxm_ep, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, void *context, ++ uint64_t op_flags, struct rxm_recv_queue *recv_queue) + { + struct rxm_recv_entry *recv_entry; + ssize_t ret; +@@ -618,7 +744,38 @@ rxm_ep_recv_common(struct rxm_ep *rxm_ep, const struct iovec *iov, + recv_queue, &recv_entry); + if (OFI_UNLIKELY(ret)) + return ret; +- return rxm_process_recv_entry(recv_queue, recv_entry); ++ ++ if (recv_queue->type == RXM_RECV_QUEUE_MSG) ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Posting recv with length: %zu " ++ "addr: 0x%" PRIx64 "\n", recv_entry->total_len, ++ recv_entry->addr); ++ else ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Posting trecv with " ++ "length: %zu addr: 0x%" PRIx64 " tag: 0x%" PRIx64 ++ " ignore: 0x%" PRIx64 "\n", recv_entry->total_len, ++ recv_entry->addr, recv_entry->tag, recv_entry->ignore); ++ ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "recv op_flags: %s\n", ++ fi_tostr(&recv_entry->flags, FI_TYPE_OP_FLAGS)); ++ ret = rxm_process_recv_entry(recv_queue, recv_entry); ++ ++ return ret; ++} ++ ++static inline ssize_t ++rxm_ep_recv_common(struct rxm_ep *rxm_ep, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, void *context, ++ uint64_t op_flags, struct rxm_recv_queue *recv_queue) ++{ ++ ssize_t ret; ++ ++ assert(rxm_ep->util_ep.rx_cq); ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ ret = rxm_ep_post_recv(rxm_ep, iov, desc, count, src_addr, ++ tag, ignore, context, op_flags, recv_queue); ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; + } + + static ssize_t rxm_ep_recv_common_flags(struct rxm_ep *rxm_ep, const struct iovec *iov, +@@ -628,44 +785,75 @@ static ssize_t rxm_ep_recv_common_flags(struct rxm_ep *rxm_ep, const struct iove + struct rxm_recv_queue *recv_queue) + { + struct rxm_recv_entry *recv_entry; ++ struct fi_recv_context *recv_ctx; + struct rxm_rx_buf *rx_buf; ++ ssize_t ret = 0; + ++ assert(rxm_ep->util_ep.rx_cq); + assert(count <= rxm_ep->rxm_info->rx_attr->iov_limit); +- assert(!(flags & (FI_PEEK | FI_CLAIM | FI_DISCARD)) || ++ assert(!(flags & FI_PEEK) || + (recv_queue->type == RXM_RECV_QUEUE_TAGGED)); + assert(!(flags & (FI_MULTI_RECV)) || + (recv_queue->type == RXM_RECV_QUEUE_MSG)); + +- if (flags & FI_PEEK) +- return rxm_ep_peek_recv(rxm_ep, +- RXM_EP_RECV_SANITIZE_SRC_ADDR(rxm_ep, src_addr), +- tag, ignore, context, +- flags, recv_queue); ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ if (rxm_ep->rxm_info->mode & FI_BUFFERED_RECV) { ++ assert(!(flags & FI_PEEK)); ++ recv_ctx = context; ++ context = recv_ctx->context; ++ rx_buf = container_of(recv_ctx, struct rxm_rx_buf, recv_context); ++ ++ if (flags & FI_CLAIM) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "Claiming buffered receive\n"); ++ goto claim; ++ } + +- if (flags & FI_CLAIM) { +- ssize_t ret; ++ assert(flags & FI_DISCARD); ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Discarding buffered receive\n"); ++ dlist_insert_tail(&rx_buf->repost_entry, ++ &rx_buf->ep->repost_ready_list); ++ goto unlock; ++ } + +- rx_buf = ((struct fi_context *)context)->internal[0]; +- assert(rx_buf); +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Claim message\n"); ++ if (flags & FI_PEEK) { ++ ret = rxm_ep_peek_recv(rxm_ep, src_addr, tag, ignore, ++ context, flags, recv_queue); ++ goto unlock; ++ } + +- if (flags & FI_DISCARD) +- return rxm_ep_discard_recv(rxm_ep, rx_buf, context); ++ if (!(flags & FI_CLAIM)) { ++ ret = rxm_ep_post_recv(rxm_ep, iov, desc, count, src_addr, ++ tag, ignore, context, flags | op_flags, ++ recv_queue); ++ goto unlock; ++ } + +- ret = rxm_ep_format_rx_res(rxm_ep, iov, desc, count, +- RXM_EP_RECV_SANITIZE_SRC_ADDR(rxm_ep, src_addr), +- tag, ignore, context, +- flags | op_flags, +- recv_queue, &recv_entry); +- if (OFI_UNLIKELY(ret)) +- return ret; +- rx_buf->recv_entry = recv_entry; +- return rxm_cq_handle_data(rx_buf); +- } else { +- return rxm_ep_recv_common(rxm_ep, iov, desc, count, src_addr, +- tag, ignore, context, flags | op_flags, +- recv_queue); ++ rx_buf = ((struct fi_context *)context)->internal[0]; ++ assert(rx_buf); ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Claim message\n"); ++ ++ if (flags & FI_DISCARD) { ++ ret = rxm_ep_discard_recv(rxm_ep, rx_buf, context); ++ goto unlock; + } ++ ++claim: ++ ret = rxm_ep_format_rx_res(rxm_ep, iov, desc, count, src_addr, ++ tag, ignore, context, flags | op_flags, ++ recv_queue, &recv_entry); ++ if (OFI_UNLIKELY(ret)) ++ goto unlock; ++ ++ if (rxm_ep->rxm_info->mode & FI_BUFFERED_RECV) ++ recv_entry->comp_flags |= FI_CLAIM; ++ ++ rx_buf->recv_entry = recv_entry; ++ ret = rxm_cq_handle_rx_buf(rx_buf); ++ ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; + } + + static ssize_t rxm_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, +@@ -675,9 +863,8 @@ static ssize_t rxm_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, + util_ep.ep_fid.fid); + + return rxm_ep_recv_common_flags(rxm_ep, msg->msg_iov, msg->desc, msg->iov_count, +- msg->addr, 0, 0, msg->context, +- flags, (rxm_ep_rx_flags(rxm_ep) & FI_COMPLETION), +- &rxm_ep->recv_queue); ++ msg->addr, 0, 0, msg->context, flags, ++ rxm_ep->util_ep.rx_msg_flags, &rxm_ep->recv_queue); + } + + static ssize_t rxm_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, +@@ -706,207 +893,128 @@ static ssize_t rxm_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, + &rxm_ep->recv_queue); + } + +-void rxm_ep_msg_mr_closev(struct fid_mr **mr, size_t count) +-{ +- int ret; +- size_t i; +- +- for (i = 0; i < count; i++) { +- if (mr[i]) { +- ret = fi_close(&mr[i]->fid); +- if (ret) +- FI_WARN(&rxm_prov, FI_LOG_EP_DATA, +- "Unable to close msg mr: %zu\n", i); +- } +- } +-} +- +-int rxm_ep_msg_mr_regv(struct rxm_ep *rxm_ep, const struct iovec *iov, +- size_t count, uint64_t access, struct fid_mr **mr) +-{ +- struct rxm_domain *rxm_domain; +- int ret; +- size_t i; +- +- rxm_domain = container_of(rxm_ep->util_ep.domain, struct rxm_domain, util_domain); +- +- // TODO do fi_mr_regv if provider supports it +- for (i = 0; i < count; i++) { +- ret = fi_mr_reg(rxm_domain->msg_domain, iov[i].iov_base, +- iov[i].iov_len, access, 0, 0, 0, &mr[i], NULL); +- if (ret) +- goto err; +- } +- return 0; +-err: +- rxm_ep_msg_mr_closev(mr, count); +- return ret; +-} +- +-static ssize_t rxm_rma_iov_init(struct rxm_ep *rxm_ep, void *buf, +- const struct iovec *iov, size_t count, +- struct fid_mr **mr) ++static void rxm_rndv_hdr_init(struct rxm_ep *rxm_ep, void *buf, ++ const struct iovec *iov, size_t count, ++ struct fid_mr **mr) + { +- struct rxm_rma_iov *rma_iov = (struct rxm_rma_iov *)buf; ++ struct rxm_rndv_hdr *rndv_hdr = (struct rxm_rndv_hdr *)buf; + size_t i; + + for (i = 0; i < count; i++) { +- rma_iov->iov[i].addr = RXM_MR_VIRT_ADDR(rxm_ep->msg_info) ? ++ rndv_hdr->iov[i].addr = RXM_MR_VIRT_ADDR(rxm_ep->msg_info) ? + (uintptr_t)iov[i].iov_base : 0; +- rma_iov->iov[i].len = (uint64_t)iov[i].iov_len; +- rma_iov->iov[i].key = fi_mr_key(mr[i]); ++ rndv_hdr->iov[i].len = (uint64_t)iov[i].iov_len; ++ rndv_hdr->iov[i].key = fi_mr_key(mr[i]); + } +- rma_iov->count = (uint8_t)count; +- return sizeof(*rma_iov) + sizeof(*rma_iov->iov) * count; ++ rndv_hdr->count = (uint8_t)count; + } + + static inline ssize_t +-rxm_ep_format_tx_res_lightweight(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- size_t len, uint64_t data, uint64_t flags, uint64_t tag, +- struct rxm_tx_buf **tx_buf, struct rxm_buf_pool *pool) ++rxm_ep_msg_inject_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ struct rxm_pkt *tx_pkt, size_t pkt_size, ++ ofi_cntr_inc_func cntr_inc_func) + { +- *tx_buf = (struct rxm_tx_buf *)rxm_buf_get(pool); +- if (OFI_UNLIKELY(!*tx_buf)) { +- FI_WARN(&rxm_prov, FI_LOG_EP_DATA, "TX queue full!\n"); +- return -FI_EAGAIN; +- } +- +- assert((((*tx_buf)->pkt.ctrl_hdr.type == ofi_ctrl_data) && +- (len <= rxm_ep->rxm_info->tx_attr->inject_size)) || +- ((*tx_buf)->pkt.ctrl_hdr.type == ofi_ctrl_large_data)); +- +- (*tx_buf)->pkt.ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Posting inject with length: %" PRIu64 ++ " tag: 0x%" PRIx64 "\n", pkt_size, tx_pkt->hdr.tag); + +- (*tx_buf)->pkt.hdr.size = len; +- (*tx_buf)->pkt.hdr.tag = tag; ++ assert((tx_pkt->hdr.flags & FI_REMOTE_CQ_DATA) || !tx_pkt->hdr.flags); ++ assert(pkt_size <= rxm_ep->inject_limit); + +- if (flags & FI_REMOTE_CQ_DATA) { +- (*tx_buf)->pkt.hdr.flags = OFI_REMOTE_CQ_DATA; +- (*tx_buf)->pkt.hdr.data = data; ++ ssize_t ret = fi_inject(rxm_conn->msg_ep, tx_pkt, pkt_size, 0); ++ if (OFI_LIKELY(!ret)) { ++ cntr_inc_func(rxm_ep->util_ep.tx_cntr); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "fi_inject for MSG provider failed with ret - %" PRId64"\n", ++ ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_do_progress(&rxm_ep->util_ep); + } +- +- return FI_SUCCESS; ++ return ret; + } + + static inline ssize_t +-rxm_ep_format_tx_entry(struct rxm_ep *rxm_ep, void *context, uint8_t count, +- uint64_t flags, uint64_t comp_flags, +- struct rxm_tx_buf *tx_buf, struct rxm_tx_entry **tx_entry) ++rxm_ep_msg_normal_send(struct rxm_conn *rxm_conn, struct rxm_pkt *tx_pkt, ++ size_t pkt_size, void *desc, void *context) + { +- *tx_entry = rxm_tx_entry_get(&rxm_ep->send_queue); +- if (OFI_UNLIKELY(!*tx_entry)) +- return -FI_EAGAIN; ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Posting send with length: %" PRIu64 ++ " tag: 0x%" PRIx64 "\n", pkt_size, tx_pkt->hdr.tag); + +- (*tx_entry)->count = count; +- (*tx_entry)->context = context; +- (*tx_entry)->flags = flags; +- (*tx_entry)->tx_buf = tx_buf; +- (*tx_entry)->comp_flags = comp_flags | FI_SEND; ++ assert((tx_pkt->hdr.flags & FI_REMOTE_CQ_DATA) || !tx_pkt->hdr.flags); + +- return FI_SUCCESS; ++ return fi_send(rxm_conn->msg_ep, tx_pkt, pkt_size, desc, 0, context); + } + + static inline ssize_t +-rxm_ep_format_tx_res(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- void *context, uint8_t count, size_t len, uint64_t data, +- uint64_t flags, uint64_t tag, uint64_t comp_flags, +- struct rxm_tx_buf **tx_buf, struct rxm_tx_entry **tx_entry, +- struct rxm_buf_pool *pool) ++rxm_ep_alloc_rndv_tx_res(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, void *context, ++ uint8_t count, const struct iovec *iov, void **desc, size_t data_len, ++ uint64_t data, uint64_t flags, uint64_t tag, uint8_t op, ++ struct rxm_tx_rndv_buf **tx_rndv_buf) + { ++ struct fid_mr **mr_iov; + ssize_t ret; ++ struct rxm_tx_rndv_buf *tx_buf = (struct rxm_tx_rndv_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_RNDV); + +- ret = rxm_ep_format_tx_res_lightweight(rxm_ep, rxm_conn, len, data, +- flags, tag, tx_buf, pool); +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- ret = rxm_ep_format_tx_entry(rxm_ep, context, count, flags, comp_flags, +- *tx_buf, tx_entry); +- if (OFI_UNLIKELY(ret)) +- goto err; +- +- return FI_SUCCESS; +-err: +- rxm_tx_buf_release(rxm_ep, *tx_buf); +- return ret; +-} +- +-static inline ssize_t +-rxm_ep_normal_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry, size_t pkt_size) +-{ +- ssize_t ret = fi_send(rxm_conn->msg_ep, &tx_entry->tx_buf->pkt, pkt_size, +- tx_entry->tx_buf->hdr.desc, 0, tx_entry); +- if (OFI_UNLIKELY(ret)) { +- if (ret == -FI_EAGAIN) +- rxm_ep_progress_multi(&rxm_ep->util_ep); +- else +- FI_WARN(&rxm_prov, FI_LOG_EP_DATA, +- "fi_send for MSG provider failed\n"); +- rxm_tx_buf_release(rxm_ep, tx_entry->tx_buf); +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from RNDV buffer pool\n"); ++ return -FI_EAGAIN; + } +- return ret; +-} + +-static inline ssize_t +-rxm_ep_alloc_lmt_tx_res(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- void *context, uint8_t count, const struct iovec *iov, +- void **desc, size_t data_len, uint64_t data, uint64_t flags, +- uint64_t tag, uint64_t comp_flags, uint8_t op, +- struct rxm_tx_entry **tx_entry) +-{ +- struct rxm_tx_buf *tx_buf; +- struct fid_mr **mr_iov; +- ssize_t ret; ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, op, data, tag, flags, &(tx_buf)->pkt); ++ tx_buf->pkt.ctrl_hdr.msg_id = rxm_tx_buf_2_msg_id(rxm_ep, RXM_BUF_POOL_TX_RNDV, tx_buf); ++ tx_buf->app_context = context; ++ tx_buf->flags = flags; ++ tx_buf->count = count; + +- /* Use LMT buf pool instead of buf pool provided to the function */ +- ret = rxm_ep_format_tx_res(rxm_ep, rxm_conn, context, (uint8_t)count, +- data_len, data, flags, tag, comp_flags, +- &tx_buf, tx_entry, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_LMT]); +- if (OFI_UNLIKELY(ret)) +- return ret; +- tx_buf->pkt.hdr.op = op; +- tx_buf->pkt.ctrl_hdr.msg_id = rxm_txe_fs_index(rxm_ep->send_queue.fs, +- (*tx_entry)); + if (!rxm_ep->rxm_mr_local) { +- ret = rxm_ep_msg_mr_regv(rxm_ep, iov, (*tx_entry)->count, +- FI_REMOTE_READ, (*tx_entry)->mr); ++ ret = rxm_ep_msg_mr_regv(rxm_ep, iov, tx_buf->count, ++ FI_REMOTE_READ, tx_buf->mr); + if (ret) + goto err; +- mr_iov = (*tx_entry)->mr; ++ mr_iov = tx_buf->mr; + } else { + /* desc is msg fid_mr * array */ + mr_iov = (struct fid_mr **)desc; + } + +- return rxm_rma_iov_init(rxm_ep, &(*tx_entry)->tx_buf->pkt.data, iov, +- count, mr_iov); ++ rxm_rndv_hdr_init(rxm_ep, &tx_buf->pkt.data, iov, tx_buf->count, mr_iov); ++ ++ ret = sizeof(struct rxm_pkt) + sizeof(struct rxm_rndv_hdr); ++ ++ if (rxm_ep->rxm_info->mode & FI_BUFFERED_RECV) { ++ ofi_copy_from_iov(rxm_pkt_rndv_data(&tx_buf->pkt), ++ rxm_ep->buffered_min, iov, count, 0); ++ ret += rxm_ep->buffered_min; ++ } ++ ++ *tx_rndv_buf = tx_buf; ++ return ret; + err: +- rxm_tx_entry_release(&rxm_ep->send_queue, (*tx_entry)); +- rxm_tx_buf_release(rxm_ep, tx_buf); ++ *tx_rndv_buf = NULL; ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_RNDV, tx_buf); + return ret; + } + + static inline ssize_t +-rxm_ep_lmt_tx_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry, size_t pkt_size) ++rxm_ep_rndv_tx_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ struct rxm_tx_rndv_buf *tx_buf, size_t pkt_size) + { + ssize_t ret; + +- RXM_LOG_STATE(FI_LOG_EP_DATA, tx_entry->tx_buf->pkt, +- RXM_TX, RXM_LMT_TX); +- if (pkt_size <= rxm_ep->msg_info->tx_attr->inject_size) { +- RXM_LOG_STATE(FI_LOG_CQ, tx_entry->tx_buf->pkt, +- RXM_LMT_TX, RXM_LMT_ACK_WAIT); +- tx_entry->state = RXM_LMT_ACK_WAIT; ++ RXM_LOG_STATE(FI_LOG_EP_DATA, tx_buf->pkt, RXM_TX, RXM_RNDV_TX); ++ if (pkt_size <= rxm_ep->inject_limit) { ++ RXM_LOG_STATE(FI_LOG_CQ, tx_buf->pkt, RXM_RNDV_TX, RXM_RNDV_ACK_WAIT); ++ tx_buf->hdr.state = RXM_RNDV_ACK_WAIT; + +- ret = fi_inject(rxm_conn->msg_ep, &tx_entry->tx_buf->pkt, pkt_size, 0); ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, &tx_buf->pkt, ++ pkt_size, ofi_cntr_inc_noop); + } else { +- tx_entry->state = RXM_LMT_TX; ++ tx_buf->hdr.state = RXM_RNDV_TX; + +- ret = rxm_ep_normal_send(rxm_ep, rxm_conn, tx_entry, pkt_size); ++ ret = rxm_ep_msg_normal_send(rxm_conn, &tx_buf->pkt, pkt_size, ++ tx_buf->hdr.desc, tx_buf); + } + if (OFI_UNLIKELY(ret)) + goto err; +@@ -915,253 +1023,563 @@ err: + FI_DBG(&rxm_prov, FI_LOG_EP_DATA, + "Transmit for MSG provider failed\n"); + if (!rxm_ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); +- rxm_tx_buf_release(rxm_ep, tx_entry->tx_buf); +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); ++ rxm_ep_msg_mr_closev(tx_buf->mr, tx_buf->count); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_RNDV, tx_buf); + return ret; + } + +-static inline ssize_t +-rxm_ep_inject_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- struct rxm_tx_buf *tx_buf, size_t pkt_size) ++static inline size_t ++rxm_ep_sar_calc_segs_cnt(struct rxm_ep *rxm_ep, size_t data_len) + { +- ssize_t ret = fi_inject(rxm_conn->msg_ep, &tx_buf->pkt, pkt_size, 0); +- if (OFI_LIKELY(!ret)) +- rxm_cntr_inc(rxm_ep->util_ep.tx_cntr); +- /* release allocated buffer for further reuse */ +- rxm_tx_buf_release(rxm_ep, tx_buf); +- return ret; ++ return (data_len + rxm_eager_limit - 1) / ++ rxm_eager_limit; + } + +-void rxm_ep_handle_postponed_tx_op(struct rxm_ep *rxm_ep, +- struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry) ++static inline struct rxm_tx_sar_buf * ++rxm_ep_sar_tx_prepare_segment(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ void *app_context, size_t total_len, size_t seg_len, ++ size_t seg_no, uint64_t data, uint64_t flags, uint64_t tag, ++ uint8_t op, enum rxm_sar_seg_type seg_type, uint64_t *msg_id) + { +- size_t tx_size = rxm_pkt_size + tx_entry->tx_buf->pkt.hdr.size; ++ struct rxm_tx_sar_buf *tx_buf = (struct rxm_tx_sar_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_SAR); + +- tx_entry->tx_buf->pkt.ctrl_hdr.conn_id = rxm_conn->handle.remote_key; +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, +- "Send deffered TX request (len - %"PRIu64") for %p conn\n", +- tx_entry->tx_buf->pkt.hdr.size, rxm_conn); +- +- if ((tx_size <= rxm_ep->msg_info->tx_attr->inject_size) && +- (tx_entry->flags & FI_INJECT) && !(tx_entry->flags & FI_COMPLETION)) { +- (void) rxm_ep_inject_send(rxm_ep, rxm_conn, +- tx_entry->tx_buf, tx_size); +- /* Release TX entry for futher reuse */ +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); +- } else if (tx_entry->tx_buf->pkt.hdr.size > +- rxm_ep->rxm_info->tx_attr->inject_size) { +- struct rxm_rma_iov *rma_iov = +- (struct rxm_rma_iov *)&tx_entry->tx_buf->pkt.data; +- (void) rxm_ep_lmt_tx_send(rxm_ep, rxm_conn, tx_entry, +- rxm_pkt_size + sizeof(*rma_iov) + +- sizeof(*rma_iov->iov) * tx_entry->count); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from SAR buffer pool\n"); ++ return NULL; ++ }; ++ ++ rxm_ep_format_tx_buf_pkt(rxm_conn, total_len, op, data, tag, flags, &tx_buf->pkt); ++ if (seg_type == RXM_SAR_SEG_FIRST) { ++ *msg_id = tx_buf->pkt.ctrl_hdr.msg_id = ++ rxm_tx_buf_2_msg_id(rxm_ep, RXM_BUF_POOL_TX_SAR, tx_buf); + } else { +- (void) rxm_ep_normal_send(rxm_ep, rxm_conn, tx_entry, tx_size); ++ tx_buf->pkt.ctrl_hdr.msg_id = *msg_id; + } ++ tx_buf->pkt.ctrl_hdr.seg_size = seg_len; ++ tx_buf->pkt.ctrl_hdr.seg_no = seg_no; ++ tx_buf->app_context = app_context; ++ tx_buf->flags = flags; ++ rxm_sar_set_seg_type(&tx_buf->pkt.ctrl_hdr, seg_type); ++ ++ return tx_buf; + } + +-static inline ssize_t +-rxm_ep_postpone_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- void *context, uint8_t count, const struct iovec *iov, +- void **desc, size_t len, uint64_t data, uint64_t flags, +- uint64_t tag, uint64_t comp_flags, +- struct rxm_buf_pool *pool, uint8_t op) ++static void ++rxm_ep_sar_tx_cleanup(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ struct rxm_tx_sar_buf *tx_buf) + { +- struct rxm_tx_entry *tx_entry; +- struct rxm_tx_buf *tx_buf; ++ struct rxm_tx_sar_buf *first_tx_buf = ++ rxm_msg_id_2_tx_buf(rxm_ep, RXM_BUF_POOL_TX_SAR, ++ tx_buf->pkt.ctrl_hdr.msg_id); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, first_tx_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, tx_buf); ++} + +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, +- "Buffer TX request (len - %zd) for %p conn\n", len, rxm_conn); ++static inline ssize_t ++rxm_ep_sar_tx_prepare_and_send_segment(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ void *app_context, size_t data_len, size_t remain_len, ++ uint64_t msg_id, size_t seg_len, size_t seg_no, size_t segs_cnt, ++ uint64_t data, uint64_t flags, uint64_t tag, uint8_t op, ++ const struct iovec *iov, uint8_t count, size_t *iov_offset, ++ struct rxm_tx_sar_buf **out_tx_buf) ++{ ++ struct rxm_tx_sar_buf *tx_buf; ++ enum rxm_sar_seg_type seg_type = RXM_SAR_SEG_MIDDLE; ++ ++ if (seg_no == (segs_cnt - 1)) { ++ seg_type = RXM_SAR_SEG_LAST; ++ assert(remain_len <= seg_len); ++ seg_len = remain_len; ++ } + +- if (len > rxm_ep->rxm_info->tx_attr->inject_size) { +- if (rxm_ep_alloc_lmt_tx_res(rxm_ep, rxm_conn, context, +- count, iov, desc, len, data, +- flags, tag, comp_flags, +- op, &tx_entry) < 0) +- return -FI_EAGAIN; +- } else { +- ssize_t ret = rxm_ep_format_tx_res(rxm_ep, rxm_conn, context, count, +- len, data, flags, tag, comp_flags, +- &tx_buf, &tx_entry, pool); +- if (OFI_UNLIKELY(ret)) +- return ret; +- ofi_copy_from_iov(tx_buf->pkt.data, tx_buf->pkt.hdr.size, +- iov, count, 0); +- tx_entry->state = RXM_TX; ++ tx_buf = rxm_ep_sar_tx_prepare_segment(rxm_ep, rxm_conn, app_context, data_len, seg_len, ++ seg_no, data, flags, tag, op, seg_type, &msg_id); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ *out_tx_buf = NULL; ++ return -FI_EAGAIN; + } + +- dlist_insert_tail(&tx_entry->postponed_entry, &rxm_conn->postponed_tx_list); ++ ofi_copy_from_iov(tx_buf->pkt.data, seg_len, iov, count, *iov_offset); ++ *iov_offset += seg_len; + +- return FI_SUCCESS; ++ *out_tx_buf = tx_buf; ++ ++ return fi_send(rxm_conn->msg_ep, &tx_buf->pkt, sizeof(struct rxm_pkt) + ++ tx_buf->pkt.ctrl_hdr.seg_size, tx_buf->hdr.desc, 0, tx_buf); + } + + static inline ssize_t +-rxm_ep_inject_common(struct rxm_ep *rxm_ep, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t data, uint64_t flags, +- uint64_t tag, uint64_t comp_flags, +- struct rxm_buf_pool *pool) ++rxm_ep_sar_tx_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ void *context, uint8_t count, const struct iovec *iov, ++ size_t data_len, size_t segs_cnt, uint64_t data, ++ uint64_t flags, uint64_t tag, uint8_t op) + { +- struct util_cmap_handle *handle; +- struct rxm_conn *rxm_conn; +- struct rxm_tx_entry *tx_entry = NULL; +- struct rxm_tx_buf *tx_buf; +- size_t pkt_size = rxm_pkt_size + len; ++ struct rxm_tx_sar_buf *tx_buf, *first_tx_buf; ++ size_t i, iov_offset = 0, remain_len = data_len; + ssize_t ret; ++ struct rxm_deferred_tx_entry *def_tx_entry; ++ uint64_t msg_id = 0; + +- assert(len <= rxm_ep->rxm_info->tx_attr->inject_size); ++ assert(segs_cnt >= 2); + +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- handle = ofi_cmap_acquire_handle(rxm_ep->util_ep.cmap, dest_addr); +- if (OFI_UNLIKELY(!handle)) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); ++ first_tx_buf = rxm_ep_sar_tx_prepare_segment(rxm_ep, rxm_conn, context, data_len, ++ rxm_eager_limit, 0, data, flags, ++ tag, op, RXM_SAR_SEG_FIRST, &msg_id); ++ if (OFI_UNLIKELY(!first_tx_buf)) + return -FI_EAGAIN; +- } else if (OFI_UNLIKELY(handle->state != CMAP_CONNECTED)) { +- struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len, +- }; +- ret = ofi_cmap_handle_connect(rxm_ep->util_ep.cmap, +- dest_addr, handle); +- if (ret && (!rxm_defer_requests || OFI_UNLIKELY(ret != -FI_EAGAIN))) +- goto cmap_err; +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- ret = rxm_ep_postpone_send(rxm_ep, rxm_conn, NULL, 1, +- &iov, NULL, len, data, flags, +- tag, comp_flags, pool, 0); +-cmap_err: +- fastlock_release(&rxm_ep->util_ep.cmap->lock); ++ ++ ofi_copy_from_iov(first_tx_buf->pkt.data, rxm_eager_limit, ++ iov, count, iov_offset); ++ iov_offset += rxm_eager_limit; ++ ++ ret = fi_send(rxm_conn->msg_ep, &first_tx_buf->pkt, sizeof(struct rxm_pkt) + ++ first_tx_buf->pkt.ctrl_hdr.seg_size, first_tx_buf->hdr.desc, 0, first_tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, first_tx_buf); + return ret; + } +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- +- assert(dlist_empty(&rxm_conn->postponed_tx_list)); +- +- if (pkt_size <= rxm_ep->msg_info->tx_attr->inject_size) { +- ret = rxm_ep_format_tx_res_lightweight(rxm_ep, rxm_conn, len, +- data, flags, tag, +- &tx_buf, pool); +- if (OFI_UNLIKELY(ret)) +- return ret; +- memcpy(tx_buf->pkt.data, buf, tx_buf->pkt.hdr.size); +- return rxm_ep_inject_send(rxm_ep, rxm_conn, tx_buf, pkt_size); +- } else { +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "passed data (size = %zu) " +- "is too big for MSG provider (max inject size = %zd)\n", +- pkt_size, rxm_ep->msg_info->tx_attr->inject_size); +- ret = rxm_ep_format_tx_res(rxm_ep, rxm_conn, NULL, 1, +- len, data, flags, tag, comp_flags, +- &tx_buf, &tx_entry, pool); +- if (OFI_UNLIKELY(ret)) ++ ++ remain_len -= rxm_eager_limit; ++ ++ for (i = 1; i < segs_cnt; i++) { ++ ret = rxm_ep_sar_tx_prepare_and_send_segment( ++ rxm_ep, rxm_conn, context, data_len, remain_len, ++ msg_id, rxm_eager_limit, i, segs_cnt, data, ++ flags, tag, op, iov, count, &iov_offset, &tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ def_tx_entry = rxm_ep_alloc_deferred_tx_entry(rxm_ep, rxm_conn, ++ RXM_DEFERRED_TX_SAR_SEG); ++ if (OFI_UNLIKELY(!def_tx_entry)) { ++ if (tx_buf) ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, ++ tx_buf); ++ return -FI_ENOMEM; ++ } ++ memcpy(def_tx_entry->sar_seg.payload.iov, iov, sizeof(*iov) * count); ++ def_tx_entry->sar_seg.payload.count = count; ++ def_tx_entry->sar_seg.payload.cur_iov_offset = iov_offset; ++ def_tx_entry->sar_seg.payload.tag = tag; ++ def_tx_entry->sar_seg.payload.data = data; ++ def_tx_entry->sar_seg.cur_seg_tx_buf = tx_buf; ++ def_tx_entry->sar_seg.app_context = context; ++ def_tx_entry->sar_seg.flags = flags; ++ def_tx_entry->sar_seg.op = op; ++ def_tx_entry->sar_seg.next_seg_no = i; ++ def_tx_entry->sar_seg.segs_cnt = segs_cnt; ++ def_tx_entry->sar_seg.total_len = data_len; ++ def_tx_entry->sar_seg.remain_len = remain_len; ++ def_tx_entry->sar_seg.msg_id = msg_id; ++ rxm_ep_enqueue_deferred_tx_queue(def_tx_entry); ++ return 0; ++ } ++ ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, first_tx_buf); + return ret; +- memcpy(tx_buf->pkt.data, buf, tx_buf->pkt.hdr.size); +- tx_entry->state = RXM_TX; +- return rxm_ep_normal_send(rxm_ep, rxm_conn, tx_entry, pkt_size); ++ } ++ remain_len -= rxm_eager_limit; + } ++ ++ return 0; + } + +-// TODO handle all flags +-static ssize_t +-rxm_ep_send_common(struct rxm_ep *rxm_ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, void *context, uint64_t data, +- uint64_t flags, uint64_t tag, uint64_t comp_flags, +- struct rxm_buf_pool *pool, uint8_t op) ++static inline ssize_t ++rxm_ep_emulate_inject(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const void *buf, size_t len, size_t pkt_size, ++ uint64_t data, uint64_t flags, uint64_t tag, ++ uint8_t op) + { +- struct util_cmap_handle *handle; +- struct rxm_conn *rxm_conn; +- struct rxm_tx_entry *tx_entry; +- struct rxm_tx_buf *tx_buf; +- size_t data_len = ofi_total_iov_len(iov, count); ++ struct rxm_tx_eager_buf *tx_buf; + ssize_t ret; + +- assert(count <= rxm_ep->rxm_info->tx_attr->iov_limit); ++ assert(pkt_size <= rxm_ep->rxm_info->tx_attr->inject_size); + +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- handle = ofi_cmap_acquire_handle(rxm_ep->util_ep.cmap, dest_addr); +- if (OFI_UNLIKELY(!handle)) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); ++ tx_buf = (struct rxm_tx_eager_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from Eager buffer pool\n"); + return -FI_EAGAIN; +- } else if (OFI_UNLIKELY(handle->state != CMAP_CONNECTED)) { +- ret = ofi_cmap_handle_connect(rxm_ep->util_ep.cmap, +- dest_addr, handle); +- if (ret && (!rxm_defer_requests || OFI_UNLIKELY(ret != -FI_EAGAIN))) +- goto cmap_err; +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- ret = rxm_ep_postpone_send( +- rxm_ep, rxm_conn, context, count, iov, +- desc, data_len, data, flags, tag, comp_flags, +- (data_len <= +- rxm_ep->rxm_info->tx_attr->inject_size ? +- pool : +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_LMT]), op); +-cmap_err: +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return ret; + } +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- rxm_conn = container_of(handle, struct rxm_conn, handle); ++ /* This is needed so that we don't report bogus context in fi_cq_err_entry */ ++ tx_buf->app_context = NULL; ++ ++ rxm_ep_format_tx_buf_pkt(rxm_conn, len, op, data, tag, flags, &tx_buf->pkt); ++ memcpy(tx_buf->pkt.data, buf, len); ++ tx_buf->flags = flags; + +- assert(dlist_empty(&rxm_conn->postponed_tx_list)); ++ ret = rxm_ep_msg_normal_send(rxm_conn, &tx_buf->pkt, pkt_size, ++ tx_buf->hdr.desc, tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX, tx_buf); ++ } ++ return ret; ++} + +- if (data_len > rxm_ep->rxm_info->tx_attr->inject_size) { +- if (OFI_UNLIKELY(flags & FI_INJECT)) { ++static inline ssize_t ++rxm_ep_inject_send_fast(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const void *buf, size_t len, struct rxm_pkt *inject_pkt) ++{ ++ size_t pkt_size = sizeof(struct rxm_pkt) + len; ++ ssize_t ret; ++ ++ assert(len <= rxm_ep->rxm_info->tx_attr->inject_size); ++ ++ if (pkt_size <= rxm_ep->inject_limit) { ++ inject_pkt->hdr.size = len; ++ memcpy(inject_pkt->data, buf, len); ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, inject_pkt, ++ pkt_size, rxm_ep->util_ep.tx_cntr_inc); ++ } else { ++ ret = rxm_ep_emulate_inject(rxm_ep, rxm_conn, buf, len, pkt_size, ++ inject_pkt->hdr.data, inject_pkt->hdr.flags, ++ inject_pkt->hdr.tag, inject_pkt->hdr.op); ++ } ++ return ret; ++} ++ ++static inline ssize_t ++rxm_ep_inject_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const void *buf, size_t len, uint64_t data, ++ uint64_t flags, uint64_t tag, uint8_t op) ++{ ++ size_t pkt_size = sizeof(struct rxm_pkt) + len; ++ ssize_t ret; ++ ++ assert(len <= rxm_ep->rxm_info->tx_attr->inject_size); ++ ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ if (pkt_size <= rxm_ep->inject_limit) { ++ struct rxm_tx_base_buf *tx_buf = (struct rxm_tx_base_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_INJECT); ++ if (OFI_UNLIKELY(!tx_buf)) { + FI_WARN(&rxm_prov, FI_LOG_EP_DATA, +- "inject size supported: %zu, msg size: %zu\n", +- rxm_tx_attr.inject_size, data_len); +- return -FI_EMSGSIZE; ++ "Ran out of buffers from Eager Inject buffer pool\n"); ++ ret = -FI_EAGAIN; ++ goto unlock; + } +- ret = rxm_ep_alloc_lmt_tx_res(rxm_ep, rxm_conn, context, (uint8_t)count, +- iov, desc, data_len, data, flags, tag, +- comp_flags, op, &tx_entry); +- if (OFI_UNLIKELY(ret < 0)) +- return ret; +- return rxm_ep_lmt_tx_send(rxm_ep, rxm_conn, tx_entry, rxm_pkt_size + ret); ++ rxm_ep_format_tx_buf_pkt(rxm_conn, len, op, data, tag, ++ flags, &tx_buf->pkt); ++ memcpy(tx_buf->pkt.data, buf, len); ++ ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, &tx_buf->pkt, ++ pkt_size, rxm_ep->util_ep.tx_cntr_inc); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_INJECT, tx_buf); ++ } else { ++ ret = rxm_ep_emulate_inject(rxm_ep, rxm_conn, buf, len, ++ pkt_size, data, flags, tag, op); ++ } ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; ++ ++} ++ ++static inline ssize_t ++rxm_ep_inject_send_common(struct rxm_ep *rxm_ep, const struct iovec *iov, size_t count, ++ struct rxm_conn *rxm_conn, void *context, uint64_t data, ++ uint64_t flags, uint64_t tag, uint8_t op, size_t data_len, ++ size_t total_len, struct rxm_pkt *inject_pkt) ++{ ++ int ret; ++ ++ if (rxm_ep->util_ep.domain->threading != FI_THREAD_SAFE) { ++ assert((op == inject_pkt->hdr.op) && ++ ((flags & FI_REMOTE_CQ_DATA) == inject_pkt->hdr.flags)); ++ ++ inject_pkt->hdr.data = data; ++ inject_pkt->hdr.tag = tag; ++ inject_pkt->hdr.size = data_len; ++ ofi_copy_from_iov(inject_pkt->data, inject_pkt->hdr.size, ++ iov, count, 0); ++ ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, inject_pkt, ++ total_len, rxm_ep->util_ep.tx_cntr_inc); + } else { +- size_t total_len = rxm_pkt_size + data_len; ++ struct rxm_tx_base_buf *tx_buf = (struct rxm_tx_base_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_INJECT); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from Eager Inject buffer pool\n"); ++ return -FI_EAGAIN; ++ } ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, op, data, tag, ++ flags, &tx_buf->pkt); ++ ofi_copy_from_iov(tx_buf->pkt.data, tx_buf->pkt.hdr.size, ++ iov, count, 0); ++ ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, &tx_buf->pkt, ++ total_len, rxm_ep->util_ep.tx_cntr_inc); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_INJECT, tx_buf); ++ } ++ if (OFI_UNLIKELY(ret)) ++ return ret; + +- ret = rxm_ep_format_tx_res_lightweight(rxm_ep, rxm_conn, data_len, data, +- flags, tag, &tx_buf, pool); +- if (OFI_UNLIKELY(ret)) ++ if (flags & FI_COMPLETION) { ++ ret = ofi_cq_write(rxm_ep->util_ep.tx_cq, context, ++ ofi_tx_flags[op], 0, NULL, 0, 0); ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to report completion\n"); + return ret; ++ } ++ rxm_cq_log_comp(ofi_tx_flags[op]); ++ } ++ return FI_SUCCESS; ++} ++ ++static ssize_t ++rxm_ep_send_common(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const struct iovec *iov, void **desc, size_t count, ++ void *context, uint64_t data, uint64_t flags, uint64_t tag, ++ uint8_t op, struct rxm_pkt *inject_pkt) ++{ ++ size_t data_len = ofi_total_iov_len(iov, count); ++ size_t total_len = sizeof(struct rxm_pkt) + data_len; ++ ssize_t ret; ++ ++ assert(count <= rxm_ep->rxm_info->tx_attr->iov_limit); ++ assert((!(flags & FI_INJECT) && ++ (data_len > rxm_ep->rxm_info->tx_attr->inject_size)) || ++ (data_len <= rxm_ep->rxm_info->tx_attr->inject_size)); ++ ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ if (total_len <= rxm_ep->inject_limit) { ++ ret = rxm_ep_inject_send_common(rxm_ep, iov, count, rxm_conn, ++ context, data, flags, tag, op, ++ data_len, total_len, inject_pkt); ++ } else if (data_len <= rxm_eager_limit) { ++ struct rxm_tx_eager_buf *tx_buf = (struct rxm_tx_eager_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX); ++ ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from Eager buffer pool\n"); ++ ret = -FI_EAGAIN; ++ goto unlock; ++ } ++ ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, op, data, tag, ++ flags, &tx_buf->pkt); + ofi_copy_from_iov(tx_buf->pkt.data, tx_buf->pkt.hdr.size, + iov, count, 0); ++ tx_buf->app_context = context; ++ tx_buf->flags = flags; + +- if ((flags & FI_INJECT) && !(flags & FI_COMPLETION) && +- (total_len <= rxm_ep->msg_info->tx_attr->inject_size)) +- return rxm_ep_inject_send(rxm_ep, rxm_conn, tx_buf, total_len); ++ ret = rxm_ep_msg_normal_send(rxm_conn, &tx_buf->pkt, total_len, ++ tx_buf->hdr.desc, tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (ret == -FI_EAGAIN) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX, tx_buf); ++ } ++ } else if (data_len <= rxm_ep->sar_limit && ++ /* SAR uses eager_limit as segment size */ ++ (rxm_eager_limit < ++ (1ULL << (8 * sizeof_field(struct ofi_ctrl_hdr, seg_size))))) { ++ ret = rxm_ep_sar_tx_send(rxm_ep, rxm_conn, context, ++ count, iov, data_len, ++ rxm_ep_sar_calc_segs_cnt(rxm_ep, data_len), ++ data, flags, tag, op); ++ } else { ++ struct rxm_tx_rndv_buf *tx_buf; ++ ++ ret = rxm_ep_alloc_rndv_tx_res(rxm_ep, rxm_conn, context, (uint8_t)count, ++ iov, desc, data_len, data, flags, tag, op, ++ &tx_buf); ++ if (OFI_LIKELY(ret >= 0)) ++ ret = rxm_ep_rndv_tx_send(rxm_ep, rxm_conn, tx_buf, ret); ++ } ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; ++} + +- ret = rxm_ep_format_tx_entry(rxm_ep, context, (uint8_t)count, +- flags, comp_flags, tx_buf, &tx_entry); ++struct rxm_deferred_tx_entry * ++rxm_ep_alloc_deferred_tx_entry(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ enum rxm_deferred_tx_entry_type type) ++{ ++ struct rxm_deferred_tx_entry *def_tx_entry = ++ calloc(1, sizeof(*def_tx_entry)); ++ if (OFI_UNLIKELY(!def_tx_entry)) ++ return NULL; ++ ++ def_tx_entry->rxm_ep = rxm_ep; ++ def_tx_entry->rxm_conn = rxm_conn; ++ def_tx_entry->type = type; ++ dlist_init(&def_tx_entry->entry); ++ ++ return def_tx_entry; ++} ++ ++static inline void ++rxm_ep_sar_handle_segment_failure(struct rxm_deferred_tx_entry *def_tx_entry, ssize_t ret) ++{ ++ rxm_ep_sar_tx_cleanup(def_tx_entry->rxm_ep, def_tx_entry->rxm_conn, ++ def_tx_entry->sar_seg.cur_seg_tx_buf); ++ rxm_cq_write_error(def_tx_entry->rxm_ep->util_ep.tx_cq, ++ def_tx_entry->rxm_ep->util_ep.tx_cntr, ++ def_tx_entry->sar_seg.app_context, ret); ++} ++ ++/* Returns FI_SUCCESS if the SAR deferred TX queue is empty, ++ * otherwise, it returns -FI_EAGAIN or error from MSG provider */ ++static ssize_t ++rxm_ep_progress_sar_deferred_segments(struct rxm_deferred_tx_entry *def_tx_entry) ++{ ++ ssize_t ret = 0; ++ struct rxm_tx_sar_buf *tx_buf = def_tx_entry->sar_seg.cur_seg_tx_buf; ++ ++ if (tx_buf) { ++ ret = fi_send(def_tx_entry->rxm_conn->msg_ep, &tx_buf->pkt, sizeof(tx_buf->pkt) + ++ tx_buf->pkt.ctrl_hdr.seg_size, tx_buf->hdr.desc, 0, tx_buf); + if (OFI_UNLIKELY(ret)) { +- rxm_tx_buf_release(rxm_ep, tx_buf); ++ if (OFI_LIKELY(ret != -FI_EAGAIN)) { ++ rxm_ep_sar_handle_segment_failure(def_tx_entry, ret); ++ goto sar_finish; ++ } + return ret; + } +- tx_entry->state = RXM_TX; +- return rxm_ep_normal_send(rxm_ep, rxm_conn, tx_entry, total_len); ++ ++ def_tx_entry->sar_seg.next_seg_no++; ++ def_tx_entry->sar_seg.remain_len -= rxm_eager_limit; ++ ++ if (def_tx_entry->sar_seg.next_seg_no == def_tx_entry->sar_seg.segs_cnt) { ++ assert(rxm_sar_get_seg_type(&tx_buf->pkt.ctrl_hdr) == RXM_SAR_SEG_LAST); ++ goto sar_finish; ++ } + } ++ ++ while (def_tx_entry->sar_seg.next_seg_no != def_tx_entry->sar_seg.segs_cnt) { ++ ret = rxm_ep_sar_tx_prepare_and_send_segment( ++ def_tx_entry->rxm_ep, def_tx_entry->rxm_conn, ++ def_tx_entry->sar_seg.app_context, ++ def_tx_entry->sar_seg.total_len, def_tx_entry->sar_seg.remain_len, ++ def_tx_entry->sar_seg.msg_id, rxm_eager_limit, ++ def_tx_entry->sar_seg.next_seg_no, def_tx_entry->sar_seg.segs_cnt, ++ def_tx_entry->sar_seg.payload.data, def_tx_entry->sar_seg.flags, ++ def_tx_entry->sar_seg.payload.tag, def_tx_entry->sar_seg.op, ++ def_tx_entry->sar_seg.payload.iov, ++ def_tx_entry->sar_seg.payload.count, ++ &def_tx_entry->sar_seg.payload.cur_iov_offset, ++ &def_tx_entry->sar_seg.cur_seg_tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret != -FI_EAGAIN)) { ++ rxm_ep_sar_handle_segment_failure(def_tx_entry, ret); ++ goto sar_finish; ++ } ++ ++ return ret; ++ } ++ def_tx_entry->sar_seg.next_seg_no++; ++ def_tx_entry->sar_seg.remain_len -= rxm_eager_limit; ++ } ++ ++sar_finish: ++ rxm_ep_dequeue_deferred_tx_queue(def_tx_entry); ++ free(def_tx_entry); ++ ++ return ret; + } + +-#define rxm_ep_tx_flags_inject(rxm_ep) \ +- ((rxm_ep_tx_flags(rxm_ep) & ~FI_COMPLETION) | FI_INJECT) ++void rxm_ep_progress_deferred_queue(struct rxm_ep *rxm_ep, ++ struct rxm_conn *rxm_conn) ++{ ++ struct rxm_deferred_tx_entry *def_tx_entry; ++ ssize_t ret = 0; ++ ++ while (!dlist_empty(&rxm_conn->deferred_tx_queue) && !ret) { ++ def_tx_entry = container_of(rxm_conn->deferred_tx_queue.next, ++ struct rxm_deferred_tx_entry, entry); ++ switch (def_tx_entry->type) { ++ case RXM_DEFERRED_TX_RNDV_ACK: ++ ret = fi_send(def_tx_entry->rxm_conn->msg_ep, ++ &def_tx_entry->rndv_ack.rx_buf-> ++ recv_entry->rndv.tx_buf->pkt, ++ sizeof(def_tx_entry->rndv_ack.rx_buf-> ++ recv_entry->rndv.tx_buf->pkt), ++ def_tx_entry->rndv_ack.rx_buf->recv_entry-> ++ rndv.tx_buf->hdr.desc, ++ 0, def_tx_entry->rndv_ack.rx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ break; ++ rxm_cq_write_error(def_tx_entry->rxm_ep->util_ep.rx_cq, ++ def_tx_entry->rxm_ep->util_ep.rx_cntr, ++ def_tx_entry->rndv_read.rx_buf-> ++ recv_entry->context, ret); ++ } ++ rxm_ep_dequeue_deferred_tx_queue(def_tx_entry); ++ free(def_tx_entry); ++ break; ++ case RXM_DEFERRED_TX_RNDV_READ: ++ ret = fi_readv(def_tx_entry->rxm_conn->msg_ep, ++ def_tx_entry->rndv_read.rxm_iov.iov, ++ def_tx_entry->rndv_read.rxm_iov.desc, ++ def_tx_entry->rndv_read.rxm_iov.count, 0, ++ def_tx_entry->rndv_read.rma_iov.addr, ++ def_tx_entry->rndv_read.rma_iov.key, ++ def_tx_entry->rndv_read.rx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ break; ++ rxm_cq_write_error(def_tx_entry->rxm_ep->util_ep.rx_cq, ++ def_tx_entry->rxm_ep->util_ep.rx_cntr, ++ def_tx_entry->rndv_read.rx_buf-> ++ recv_entry->context, ret); ++ break; ++ } ++ rxm_ep_dequeue_deferred_tx_queue(def_tx_entry); ++ free(def_tx_entry); ++ break; ++ case RXM_DEFERRED_TX_SAR_SEG: ++ ret = rxm_ep_progress_sar_deferred_segments(def_tx_entry); ++ break; ++ case RXM_DEFERRED_TX_ATOMIC_RESP: ++ ret = rxm_atomic_send_respmsg(rxm_ep, ++ def_tx_entry->rxm_conn, ++ def_tx_entry->atomic_resp.tx_buf, ++ def_tx_entry->atomic_resp.len); ++ if (OFI_UNLIKELY(ret)) ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ break; ++ rxm_ep_dequeue_deferred_tx_queue(def_tx_entry); ++ free(def_tx_entry); ++ break; ++ } ++ } ++} + + static ssize_t rxm_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, + uint64_t flags) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, msg->msg_iov, msg->desc, msg->iov_count, +- msg->addr, msg->context, msg->data, +- flags | (rxm_ep_tx_flags(rxm_ep) & FI_COMPLETION), +- 0, FI_MSG, &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG], +- ofi_op_msg); ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, msg->msg_iov, msg->desc, ++ msg->iov_count, msg->context, msg->data, ++ flags | rxm_ep->util_ep.tx_msg_flags, 0, ofi_op_msg, ++ ((flags & FI_REMOTE_CQ_DATA) ? ++ rxm_conn->inject_data_pkt : rxm_conn->inject_pkt)); + } + + static ssize_t rxm_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, + void *desc, fi_addr_t dest_addr, void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct iovec iov = { + .iov_base = (void *)buf, + .iov_len = len, +@@ -1169,39 +1587,72 @@ static ssize_t rxm_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, &iov, &desc, 1, dest_addr, context, 0, +- rxm_ep_tx_flags(rxm_ep), 0, FI_MSG, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG], +- ofi_op_msg); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, &iov, &desc, 1, context, ++ 0, rxm_ep_tx_flags(rxm_ep), 0, ofi_op_msg, ++ rxm_conn->inject_pkt); + } + + static ssize_t rxm_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, iov, desc, count, dest_addr, context, 0, +- rxm_ep_tx_flags(rxm_ep), 0, FI_MSG, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG], ofi_op_msg); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, iov, desc, count, context, ++ 0, rxm_ep_tx_flags(rxm_ep), 0, ofi_op_msg, ++ rxm_conn->inject_pkt); + } + + static ssize_t rxm_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, + fi_addr_t dest_addr) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_inject_common(rxm_ep, buf, len, dest_addr, 0, +- rxm_ep_tx_flags_inject(rxm_ep), +- 0, FI_MSG, &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG]); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send(rxm_ep, rxm_conn, buf, len, 0, ++ rxm_ep->util_ep.inject_op_flags, ++ 0, ofi_op_msg); ++} ++ ++static ssize_t rxm_ep_inject_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send_fast(rxm_ep, rxm_conn, buf, len, ++ rxm_conn->inject_pkt); + } + + static ssize_t rxm_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, + void *desc, uint64_t data, fi_addr_t dest_addr, + void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct iovec iov = { + .iov_base = (void *)buf, + .iov_len = len, +@@ -1209,21 +1660,48 @@ static ssize_t rxm_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t le + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, &iov, desc, 1, dest_addr, context, data, ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, &iov, desc, 1, context, data, + rxm_ep_tx_flags(rxm_ep) | FI_REMOTE_CQ_DATA, +- 0, FI_MSG, &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG], +- ofi_op_msg); ++ 0, ofi_op_msg, rxm_conn->inject_data_pkt); + } + + static ssize_t rxm_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, + uint64_t data, fi_addr_t dest_addr) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_inject_common(rxm_ep, buf, len, dest_addr, data, +- rxm_ep_tx_flags_inject(rxm_ep) | FI_REMOTE_CQ_DATA, +- 0, FI_MSG, &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG]); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send(rxm_ep, rxm_conn, buf, len, data, ++ rxm_ep->util_ep.inject_op_flags | ++ FI_REMOTE_CQ_DATA, 0, ofi_op_msg); ++} ++ ++static ssize_t rxm_ep_injectdata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ rxm_conn->inject_data_pkt->hdr.data = data; ++ ++ return rxm_ep_inject_send_fast(rxm_ep, rxm_conn, buf, len, ++ rxm_conn->inject_data_pkt); + } + + static struct fi_ops_msg rxm_ops_msg = { +@@ -1239,6 +1717,19 @@ static struct fi_ops_msg rxm_ops_msg = { + .injectdata = rxm_ep_injectdata, + }; + ++static struct fi_ops_msg rxm_ops_msg_thread_unsafe = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = rxm_ep_recv, ++ .recvv = rxm_ep_recvv, ++ .recvmsg = rxm_ep_recvmsg, ++ .send = rxm_ep_send, ++ .sendv = rxm_ep_sendv, ++ .sendmsg = rxm_ep_sendmsg, ++ .inject = rxm_ep_inject_fast, ++ .senddata = rxm_ep_senddata, ++ .injectdata = rxm_ep_injectdata_fast, ++}; ++ + static ssize_t rxm_ep_trecvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, + uint64_t flags) + { +@@ -1247,7 +1738,7 @@ static ssize_t rxm_ep_trecvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged + + return rxm_ep_recv_common_flags(rxm_ep, msg->msg_iov, msg->desc, msg->iov_count, + msg->addr, msg->tag, msg->ignore, msg->context, +- flags, (rxm_ep_rx_flags(rxm_ep) & FI_COMPLETION), ++ flags, rxm_ep->util_ep.rx_msg_flags, + &rxm_ep->trecv_queue); + } + +@@ -1282,21 +1773,28 @@ static ssize_t rxm_ep_trecvv(struct fid_ep *ep_fid, const struct iovec *iov, + static ssize_t rxm_ep_tsendmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, + uint64_t flags) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, msg->msg_iov, msg->desc, msg->iov_count, +- msg->addr, msg->context, msg->data, +- flags | (rxm_ep_tx_flags(rxm_ep) & FI_COMPLETION), +- msg->tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED], +- ofi_op_tagged); ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, msg->msg_iov, msg->desc, ++ msg->iov_count, msg->context, msg->data, ++ flags | rxm_ep->util_ep.tx_msg_flags, msg->tag, ++ ofi_op_tagged, ((flags & FI_REMOTE_CQ_DATA) ? ++ rxm_conn->tinject_data_pkt : rxm_conn->tinject_pkt)); + } + + static ssize_t rxm_ep_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, + void *desc, fi_addr_t dest_addr, uint64_t tag, + void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct iovec iov = { + .iov_base = (void *)buf, + .iov_len = len, +@@ -1304,40 +1802,74 @@ static ssize_t rxm_ep_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, &iov, &desc, 1, dest_addr, context, 0, +- rxm_ep_tx_flags(rxm_ep), tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED], +- ofi_op_tagged); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, &iov, &desc, 1, context, 0, ++ rxm_ep_tx_flags(rxm_ep), tag, ofi_op_tagged, ++ rxm_conn->tinject_pkt); + } + + static ssize_t rxm_ep_tsendv(struct fid_ep *ep_fid, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + uint64_t tag, void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, iov, desc, count, dest_addr, context, 0, +- rxm_ep_tx_flags(rxm_ep), tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED], +- ofi_op_tagged); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, iov, desc, count, context, 0, ++ rxm_ep_tx_flags(rxm_ep), tag, ofi_op_tagged, ++ rxm_conn->tinject_pkt); + } + + static ssize_t rxm_ep_tinject(struct fid_ep *ep_fid, const void *buf, size_t len, + fi_addr_t dest_addr, uint64_t tag) + { ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send(rxm_ep, rxm_conn, buf, len, 0, ++ rxm_ep->util_ep.inject_op_flags, tag, ++ ofi_op_tagged); ++} ++ ++static ssize_t rxm_ep_tinject_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_inject_common(rxm_ep, buf, len, dest_addr, 0, +- rxm_ep_tx_flags_inject(rxm_ep), tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED]); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ rxm_conn->tinject_pkt->hdr.tag = tag; ++ ++ return rxm_ep_inject_send_fast(rxm_ep, rxm_conn, buf, len, ++ rxm_conn->tinject_pkt); + } + + static ssize_t rxm_ep_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t len, + void *desc, uint64_t data, fi_addr_t dest_addr, + uint64_t tag, void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct iovec iov = { + .iov_base = (void *)buf, + .iov_len = len, +@@ -1345,26 +1877,52 @@ static ssize_t rxm_ep_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t l + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, &iov, desc, 1, dest_addr, context, data, ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, &iov, desc, 1, context, data, + rxm_ep_tx_flags(rxm_ep) | FI_REMOTE_CQ_DATA, +- tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED], +- ofi_op_tagged); ++ tag, ofi_op_tagged, rxm_conn->tinject_data_pkt); + } + + static ssize_t rxm_ep_tinjectdata(struct fid_ep *ep_fid, const void *buf, size_t len, + uint64_t data, fi_addr_t dest_addr, uint64_t tag) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_inject_common(rxm_ep, buf, len, dest_addr, data, +- rxm_ep_tx_flags_inject(rxm_ep) | FI_REMOTE_CQ_DATA, +- tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED]); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send(rxm_ep, rxm_conn, buf, len, data, ++ rxm_ep->util_ep.inject_op_flags | ++ FI_REMOTE_CQ_DATA, tag, ofi_op_tagged); ++} ++ ++static ssize_t rxm_ep_tinjectdata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ rxm_conn->tinject_data_pkt->hdr.tag = tag; ++ rxm_conn->tinject_data_pkt->hdr.data = data; ++ ++ return rxm_ep_inject_send_fast(rxm_ep, rxm_conn, buf, len, ++ rxm_conn->tinject_data_pkt); + } + +-struct fi_ops_tagged rxm_ops_tagged = { ++static struct fi_ops_tagged rxm_ops_tagged = { + .size = sizeof(struct fi_ops_tagged), + .recv = rxm_ep_trecv, + .recvv = rxm_ep_trecvv, +@@ -1377,6 +1935,19 @@ struct fi_ops_tagged rxm_ops_tagged = { + .injectdata = rxm_ep_tinjectdata, + }; + ++static struct fi_ops_tagged rxm_ops_tagged_thread_unsafe = { ++ .size = sizeof(struct fi_ops_tagged), ++ .recv = rxm_ep_trecv, ++ .recvv = rxm_ep_trecvv, ++ .recvmsg = rxm_ep_trecvmsg, ++ .send = rxm_ep_tsend, ++ .sendv = rxm_ep_tsendv, ++ .sendmsg = rxm_ep_tsendmsg, ++ .inject = rxm_ep_tinject_fast, ++ .senddata = rxm_ep_tsenddata, ++ .injectdata = rxm_ep_tinjectdata_fast, ++}; ++ + static int rxm_ep_msg_res_close(struct rxm_ep *rxm_ep) + { + int ret, retv = 0; +@@ -1422,23 +1993,14 @@ static int rxm_ep_close(struct fid *fid) + int ret, retv = 0; + struct rxm_ep *rxm_ep = + container_of(fid, struct rxm_ep, util_ep.ep_fid.fid); +- struct rxm_ep_wait_ref *wait_ref; +- struct dlist_entry *tmp_list_entry; +- +- dlist_foreach_container_safe(&rxm_ep->msg_cq_fd_ref_list, +- struct rxm_ep_wait_ref, +- wait_ref, entry, tmp_list_entry) { +- ret = ofi_wait_fd_del(wait_ref->wait, +- rxm_ep->msg_cq_fd); +- if (ret) +- retv = ret; +- dlist_remove(&wait_ref->entry); +- free(wait_ref); +- } +- OFI_UNUSED(tmp_list_entry); /* to avoid "set, but not used" warning*/ + +- if (rxm_ep->util_ep.cmap) +- ofi_cmap_free(rxm_ep->util_ep.cmap); ++ if (rxm_ep->cmap) ++ rxm_cmap_free(rxm_ep->cmap); ++ ++ // TODO move this to cmap_free and encapsulate eq progress fns ++ // these vars shouldn't be accessed outside rxm_conn file ++ fastlock_destroy(&rxm_ep->msg_eq_entry_list_lock); ++ slistfd_free(&rxm_ep->msg_eq_entry_list); + + ret = rxm_listener_close(rxm_ep); + if (ret) +@@ -1446,10 +2008,12 @@ static int rxm_ep_close(struct fid *fid) + + rxm_ep_txrx_res_close(rxm_ep); + +- ret = fi_close(&rxm_ep->msg_cq->fid); +- if (ret) { +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg CQ\n"); +- retv = ret; ++ if (rxm_ep->msg_cq) { ++ ret = fi_close(&rxm_ep->msg_cq->fid); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg CQ\n"); ++ retv = ret; ++ } + } + + ret = rxm_ep_msg_res_close(rxm_ep); +@@ -1457,6 +2021,7 @@ static int rxm_ep_close(struct fid *fid) + retv = ret; + + ofi_endpoint_close(&rxm_ep->util_ep); ++ fi_freeinfo(rxm_ep->rxm_info); + free(rxm_ep); + return retv; + } +@@ -1502,9 +2067,18 @@ static int rxm_ep_msg_cq_open(struct rxm_ep *rxm_ep, enum fi_wait_obj wait_obj) + + return 0; + err: +- ret = fi_close(&rxm_ep->msg_cq->fid); +- if (ret) +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg CQ\n"); ++ fi_close(&rxm_ep->msg_cq->fid); ++ return ret; ++} ++ ++static int rxm_ep_eq_entry_list_trywait(void *arg) ++{ ++ struct rxm_ep *rxm_ep = (struct rxm_ep *)arg; ++ int ret; ++ ++ fastlock_acquire(&rxm_ep->msg_eq_entry_list_lock); ++ ret = slistfd_empty(&rxm_ep->msg_eq_entry_list) ? 0 : -FI_EAGAIN; ++ fastlock_release(&rxm_ep->msg_eq_entry_list_lock); + return ret; + } + +@@ -1519,6 +2093,29 @@ static int rxm_ep_trywait(void *arg) + return fi_trywait(rxm_fabric->msg_fabric, fids, 1); + } + ++static int rxm_ep_wait_fd_add(struct rxm_ep *rxm_ep, struct util_wait *wait) ++{ ++ int ret; ++ ++ ret = ofi_wait_fd_add(wait, rxm_ep->msg_cq_fd, FI_EPOLL_IN, ++ rxm_ep_trywait, rxm_ep, ++ &rxm_ep->util_ep.ep_fid.fid); ++ if (ret) ++ return ret; ++ ++ if (rxm_ep->util_ep.domain->data_progress == FI_PROGRESS_MANUAL) { ++ ret = ofi_wait_fd_add( ++ wait, slistfd_get_fd(&rxm_ep->msg_eq_entry_list), ++ FI_EPOLL_IN, rxm_ep_eq_entry_list_trywait, ++ rxm_ep, &rxm_ep->util_ep.ep_fid.fid); ++ if (ret) { ++ ofi_wait_fd_del(wait, rxm_ep->msg_cq_fd); ++ return ret; ++ } ++ } ++ return 0; ++} ++ + static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + { + struct rxm_ep *rxm_ep = +@@ -1526,7 +2123,6 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + struct util_cq *cq; + struct util_av *av; + struct util_cntr *cntr; +- struct rxm_ep_wait_ref *wait_ref = NULL; + int ret = 0; + + switch (bfid->fclass) { +@@ -1535,6 +2131,18 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + ret = ofi_ep_bind_av(&rxm_ep->util_ep, av); + if (ret) + return ret; ++ ++ ret = fi_listen(rxm_ep->msg_pep); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to set msg PEP to listen state\n"); ++ return ret; ++ } ++ ++ ret = rxm_conn_cmap_alloc(rxm_ep); ++ if (ret) ++ return ret; ++ + break; + case FI_CLASS_CQ: + cq = container_of(bfid, struct util_cq, cq_fid.fid); +@@ -1551,19 +2159,9 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + } + + if (cq->wait) { +- wait_ref = calloc(1, sizeof(struct rxm_ep_wait_ref)); +- if (!wait_ref) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- wait_ref->wait = cq->wait; +- dlist_insert_tail(&wait_ref->entry, +- &rxm_ep->msg_cq_fd_ref_list); +- ret = ofi_wait_fd_add(cq->wait, rxm_ep->msg_cq_fd, +- rxm_ep_trywait, rxm_ep, +- &rxm_ep->util_ep.ep_fid.fid); ++ ret = rxm_ep_wait_fd_add(rxm_ep, cq->wait); + if (ret) +- goto err2; ++ goto err; + } + break; + case FI_CLASS_CNTR: +@@ -1590,19 +2188,9 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + } + + if (cntr->wait) { +- wait_ref = calloc(1, sizeof(struct rxm_ep_wait_ref)); +- if (!wait_ref) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- wait_ref->wait = cntr->wait; +- dlist_insert_tail(&wait_ref->entry, +- &rxm_ep->msg_cq_fd_ref_list); +- ret = ofi_wait_fd_add(cntr->wait, rxm_ep->msg_cq_fd, +- rxm_ep_trywait, rxm_ep, +- &rxm_ep->util_ep.ep_fid.fid); ++ ret = rxm_ep_wait_fd_add(rxm_ep, cntr->wait); + if (ret) +- goto err2; ++ goto err; + } + break; + case FI_CLASS_EQ: +@@ -1613,46 +2201,165 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + break; + } + return ret; +-err2: +- free(wait_ref); +-err1: ++err: + if (fi_close(&rxm_ep->msg_cq->fid)) + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg CQ\n"); + return ret; + } + +-static int rxm_ep_ctrl(struct fid *fid, int command, void *arg) ++static void rxm_ep_sar_init(struct rxm_ep *rxm_ep) ++{ ++ size_t param; ++ ++ if (!fi_param_get_size_t(&rxm_prov, "sar_limit", ¶m)) { ++ if (param <= rxm_eager_limit) { ++ FI_WARN(&rxm_prov, FI_LOG_CORE, ++ "Requsted SAR limit (%zd) less or equal " ++ "Eager limit (%zd). SAR limit won't be used. " ++ "Messages of size <= SAR limit would be " ++ "transmitted via Inject/Eager protocol. " ++ "Messages of size > SAR limit would be " ++ "transmitted via Rendezvous protocol\n", ++ param, rxm_eager_limit); ++ param = rxm_eager_limit; ++ } ++ ++ rxm_ep->sar_limit = param; ++ } else { ++ size_t sar_limit = rxm_ep->msg_info->tx_attr->size * ++ rxm_eager_limit; ++ ++ rxm_ep->sar_limit = (sar_limit > RXM_SAR_LIMIT) ? ++ RXM_SAR_LIMIT : sar_limit; ++ } ++} ++ ++static void rxm_ep_settings_init(struct rxm_ep *rxm_ep) ++{ ++ size_t max_prog_val; ++ ++ assert(rxm_ep->msg_info); ++ ++ max_prog_val = MIN(rxm_ep->msg_info->tx_attr->size, ++ rxm_ep->msg_info->rx_attr->size) / 2; ++ rxm_ep->comp_per_progress = (rxm_ep->comp_per_progress > max_prog_val) ? ++ max_prog_val : rxm_ep->comp_per_progress; ++ ++ rxm_ep->msg_mr_local = ofi_mr_local(rxm_ep->msg_info); ++ rxm_ep->rxm_mr_local = ofi_mr_local(rxm_ep->rxm_info); ++ ++ rxm_ep->inject_limit = rxm_ep->msg_info->tx_attr->inject_size; ++ ++ /* Favor a default buffered_min size that's small enough to be ++ * injected by FI_EP_MSG provider */ ++ assert(!rxm_ep->buffered_min); ++ if (rxm_ep->inject_limit > ++ (sizeof(struct rxm_pkt) + sizeof(struct rxm_rndv_hdr))) ++ rxm_ep->buffered_min = MIN((rxm_ep->inject_limit - ++ (sizeof(struct rxm_pkt) + ++ sizeof(struct rxm_rndv_hdr))), ++ rxm_eager_limit); ++ ++ assert(!rxm_ep->min_multi_recv_size); ++ rxm_ep->min_multi_recv_size = rxm_eager_limit; ++ ++ assert(!rxm_ep->buffered_limit); ++ rxm_ep->buffered_limit = rxm_eager_limit; ++ ++ rxm_ep_sar_init(rxm_ep); ++ ++ FI_INFO(&rxm_prov, FI_LOG_CORE, ++ "Settings:\n" ++ "\t\t MR local: MSG - %d, RxM - %d\n" ++ "\t\t Completions per progress: MSG - %zu\n" ++ "\t\t Buffered min: %zu\n" ++ "\t\t Min multi recv size: %zu\n" ++ "\t\t FI_EP_MSG provider inject size: %zu\n" ++ "\t\t rxm inject size: %zu\n" ++ "\t\t Protocol limits: Eager: %zu, " ++ "SAR: %zu\n", ++ rxm_ep->msg_mr_local, rxm_ep->rxm_mr_local, ++ rxm_ep->comp_per_progress, rxm_ep->buffered_min, ++ rxm_ep->min_multi_recv_size, rxm_ep->inject_limit, ++ rxm_ep->rxm_info->tx_attr->inject_size, ++ rxm_eager_limit, rxm_ep->sar_limit); ++} ++ ++static int rxm_ep_txrx_res_open(struct rxm_ep *rxm_ep) + { +- struct rxm_ep *rxm_ep; + int ret; + +- rxm_ep = container_of(fid, struct rxm_ep, util_ep.ep_fid.fid); ++ ret = rxm_ep_txrx_pool_create(rxm_ep); ++ if (ret) ++ return ret; ++ ++ dlist_init(&rxm_ep->deferred_tx_conn_queue); ++ ++ ret = rxm_ep_rx_queue_init(rxm_ep); ++ if (ret) ++ goto err; ++ ++ return FI_SUCCESS; ++err: ++ rxm_ep_txrx_pool_destroy(rxm_ep); ++ return ret; ++} ++ ++#define RXM_NEED_RX_CQ_PROGRESS(info) \ ++ ((info->rx_attr->caps & (FI_MSG | FI_TAGGED)) || \ ++ (info->rx_attr->caps & FI_ATOMIC)) ++ ++static int rxm_ep_enable_check(struct rxm_ep *rxm_ep) ++{ ++ if (!rxm_ep->util_ep.av || !rxm_ep->cmap) ++ return -FI_EOPBADSTATE; ++ ++ if (rxm_ep->util_ep.rx_cq) ++ return 0; ++ ++ if (RXM_NEED_RX_CQ_PROGRESS(rxm_ep->rxm_info)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "endpoint missing recv CQ" ++ "needed for progress of operations enabled by one " ++ "or more of requested capabilities: %s\n", ++ fi_tostr(&rxm_ep->rxm_info->rx_attr->caps, FI_TYPE_CAPS)); ++ return -FI_ENOCQ; ++ } ++ ++ if (rxm_ep->rxm_info->domain_attr->cq_data_size) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "user hinted that CQ data " ++ "may be used but endpoint is missing recv CQ\n"); ++ return -FI_ENOCQ; ++ } ++ return 0; ++} ++ ++static int rxm_ep_ctrl(struct fid *fid, int command, void *arg) ++{ ++ int ret; ++ struct rxm_ep *rxm_ep ++ = container_of(fid, struct rxm_ep, util_ep.ep_fid.fid); + + switch (command) { + case FI_ENABLE: +- if (!rxm_ep->util_ep.rx_cq || !rxm_ep->util_ep.tx_cq) +- return -FI_ENOCQ; +- if (!rxm_ep->util_ep.av) +- return -FI_EOPBADSTATE; +- +- ret = fi_listen(rxm_ep->msg_pep); +- if (ret) { +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, +- "Unable to set msg PEP to listen state\n"); ++ ret = rxm_ep_enable_check(rxm_ep); ++ if (ret) + return ret; +- } + +- rxm_ep->util_ep.cmap = rxm_conn_cmap_alloc(rxm_ep); +- if (!rxm_ep->util_ep.cmap) +- return -FI_ENOMEM; ++ /* At the time of enabling endpoint, FI_OPT_BUFFERED_MIN, ++ * FI_OPT_BUFFERED_LIMIT should have been frozen so we can ++ * create the rendezvous protocol message pool with the right ++ * size */ ++ ret = rxm_ep_txrx_res_open(rxm_ep); ++ if (ret) ++ return ret; + + if (rxm_ep->srx_ctx) { +- ret = rxm_ep_prepost_buf(rxm_ep, rxm_ep->srx_ctx); ++ ret = rxm_msg_ep_prepost_recv(rxm_ep, rxm_ep->srx_ctx); + if (ret) { +- ofi_cmap_free(rxm_ep->util_ep.cmap); ++ rxm_cmap_free(rxm_ep->cmap); + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, +- "Unable to prepost recv bufs\n"); +- return ret; ++ "unable to prepost recv bufs\n"); ++ goto err; + } + } + break; +@@ -1660,6 +2367,9 @@ static int rxm_ep_ctrl(struct fid *fid, int command, void *arg) + return -FI_ENOSYS; + } + return 0; ++err: ++ rxm_ep_txrx_res_close(rxm_ep); ++ return ret; + } + + static struct fi_ops rxm_ep_fi_ops = { +@@ -1672,14 +2382,14 @@ static struct fi_ops rxm_ep_fi_ops = { + + static int rxm_listener_open(struct rxm_ep *rxm_ep) + { +- struct rxm_fabric *rxm_fabric; +- struct fi_eq_attr eq_attr; +- eq_attr.wait_obj = FI_WAIT_UNSPEC; +- eq_attr.flags = FI_WRITE; ++ struct fi_eq_attr eq_attr = { ++ .wait_obj = FI_WAIT_UNSPEC, ++ .flags = FI_WRITE, ++ }; + int ret; +- +- rxm_fabric = container_of(rxm_ep->util_ep.domain->fabric, +- struct rxm_fabric, util_fabric); ++ struct rxm_fabric *rxm_fabric = ++ container_of(rxm_ep->util_ep.domain->fabric, ++ struct rxm_fabric, util_fabric); + + ret = fi_eq_open(rxm_fabric->msg_fabric, &eq_attr, &rxm_ep->msg_eq, NULL); + if (ret) { +@@ -1697,7 +2407,7 @@ static int rxm_listener_open(struct rxm_ep *rxm_ep) + ret = fi_pep_bind(rxm_ep->msg_pep, &rxm_ep->msg_eq->fid, 0); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, +- "Unable to bind msg PEP to msg EQ\n"); ++ "Unable to bind msg PEP to msg EQ\n"); + goto err; + } + +@@ -1707,56 +2417,19 @@ err: + return ret; + } + +-static int rxm_info_to_core_srx_ctx(uint32_t version, const struct fi_info *rxm_hints, +- struct fi_info *core_hints) +-{ +- int ret; +- +- ret = rxm_info_to_core(version, rxm_hints, core_hints); +- if (ret) +- return ret; +- core_hints->ep_attr->rx_ctx_cnt = FI_SHARED_CONTEXT; +- return 0; +-} +- +-static int rxm_ep_get_core_info(uint32_t version, const struct fi_info *hints, +- struct fi_info **info) +-{ +- int ret; +- +- ret = ofi_get_core_info(version, NULL, NULL, 0, &rxm_util_prov, hints, +- rxm_info_to_core_srx_ctx, info); +- if (!ret) +- return 0; +- +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Shared receive context not " +- "supported by MSG provider.\n"); +- +- return ofi_get_core_info(version, NULL, NULL, 0, &rxm_util_prov, hints, +- rxm_info_to_core, info); +-} +- +-static int rxm_ep_msg_res_open(struct util_domain *util_domain, +- struct rxm_ep *rxm_ep) ++static int rxm_ep_msg_res_open(struct rxm_ep *rxm_ep) + { + int ret; +- size_t max_prog_val; + struct rxm_domain *rxm_domain = +- container_of(util_domain, struct rxm_domain, util_domain); ++ container_of(rxm_ep->util_ep.domain, struct rxm_domain, util_domain); + +- ret = rxm_ep_get_core_info(util_domain->fabric->fabric_fid.api_version, +- rxm_ep->rxm_info, &rxm_ep->msg_info); ++ ret = ofi_get_core_info(rxm_ep->util_ep.domain->fabric->fabric_fid.api_version, ++ NULL, NULL, 0, &rxm_util_prov, rxm_ep->rxm_info, ++ rxm_info_to_core, &rxm_ep->msg_info); + if (ret) + return ret; + +- max_prog_val = MIN(rxm_ep->msg_info->tx_attr->size, +- rxm_ep->msg_info->rx_attr->size) / 2; +- rxm_ep->comp_per_progress = (rxm_ep->comp_per_progress > max_prog_val) ? +- max_prog_val : rxm_ep->comp_per_progress; +- +- dlist_init(&rxm_ep->msg_cq_fd_ref_list); +- +- if (rxm_ep->msg_info->ep_attr->rx_ctx_cnt == FI_SHARED_CONTEXT) { ++ if (rxm_ep->msg_info->ep_attr->rx_ctx_cnt == FI_SHARED_CONTEXT) { + ret = fi_srx_context(rxm_domain->msg_domain, rxm_ep->msg_info->rx_attr, + &rxm_ep->srx_ctx, NULL); + if (ret) { +@@ -1766,11 +2439,11 @@ static int rxm_ep_msg_res_open(struct util_domain *util_domain, + } + } + +- ret = rxm_listener_open(rxm_ep); ++ ret = rxm_listener_open(rxm_ep); + if (ret) + goto err2; + +- /* Zero out the port as we would be creating multiple MSG EPs for a single ++ /* Zero out the port as we would be creating multiple MSG EPs for a single + * RXM EP and we don't want address conflicts. */ + if (rxm_ep->msg_info->src_addr) { + if (((struct sockaddr *)rxm_ep->msg_info->src_addr)->sa_family == AF_INET) +@@ -1778,9 +2451,11 @@ static int rxm_ep_msg_res_open(struct util_domain *util_domain, + else + ((struct sockaddr_in6 *)(rxm_ep->msg_info->src_addr))->sin6_port = 0; + } ++ + return 0; + err2: +- fi_close(&rxm_ep->srx_ctx->fid); ++ if (rxm_ep->srx_ctx) ++ fi_close(&rxm_ep->srx_ctx->fid); + err1: + fi_freeinfo(rxm_ep->msg_info); + return ret; +@@ -1789,7 +2464,6 @@ err1: + int rxm_endpoint(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep_fid, void *context) + { +- struct util_domain *util_domain; + struct rxm_ep *rxm_ep; + int ret; + +@@ -1803,49 +2477,41 @@ int rxm_endpoint(struct fid_domain *domain, struct fi_info *info, + goto err1; + } + +- if (!fi_param_get_int(&rxm_prov, "comp_per_progress", +- (int *)&rxm_ep->comp_per_progress)) { +- ret = ofi_endpoint_init(domain, &rxm_util_prov, +- info, &rxm_ep->util_ep, +- context, &rxm_ep_progress_multi); +- } else { ++ if (fi_param_get_int(&rxm_prov, "comp_per_progress", ++ (int *)&rxm_ep->comp_per_progress)) + rxm_ep->comp_per_progress = 1; +- ret = ofi_endpoint_init(domain, &rxm_util_prov, +- info, &rxm_ep->util_ep, +- context, &rxm_ep_progress_one); +- if (ret) +- goto err1; +- } ++ ++ ret = ofi_endpoint_init(domain, &rxm_util_prov, info, &rxm_ep->util_ep, ++ context, &rxm_ep_progress); + if (ret) + goto err1; + +- +- util_domain = container_of(domain, struct util_domain, domain_fid); +- +- ret = rxm_ep_msg_res_open(util_domain, rxm_ep); ++ ret = rxm_ep_msg_res_open(rxm_ep); + if (ret) + goto err2; + +- rxm_ep->msg_mr_local = OFI_CHECK_MR_LOCAL(rxm_ep->msg_info); +- rxm_ep->rxm_mr_local = OFI_CHECK_MR_LOCAL(rxm_ep->rxm_info); +- +- rxm_ep->min_multi_recv_size = rxm_ep->rxm_info->tx_attr->inject_size; ++ rxm_ep_settings_init(rxm_ep); + +- ret = rxm_ep_txrx_res_open(rxm_ep); +- if (ret) +- goto err3; ++ slistfd_init(&rxm_ep->msg_eq_entry_list); ++ fastlock_init(&rxm_ep->msg_eq_entry_list_lock); + + *ep_fid = &rxm_ep->util_ep.ep_fid; + (*ep_fid)->fid.ops = &rxm_ep_fi_ops; + (*ep_fid)->ops = &rxm_ops_ep; + (*ep_fid)->cm = &rxm_ops_cm; +- (*ep_fid)->msg = &rxm_ops_msg; +- (*ep_fid)->tagged = &rxm_ops_tagged; ++ if (rxm_ep->util_ep.domain->threading != FI_THREAD_SAFE) { ++ (*ep_fid)->msg = &rxm_ops_msg_thread_unsafe; ++ (*ep_fid)->tagged = &rxm_ops_tagged_thread_unsafe; ++ } else { ++ (*ep_fid)->msg = &rxm_ops_msg; ++ (*ep_fid)->tagged = &rxm_ops_tagged; ++ } + (*ep_fid)->rma = &rxm_ops_rma; + ++ if (rxm_ep->rxm_info->caps & FI_ATOMIC) ++ (*ep_fid)->atomic = &rxm_ops_atomic; ++ + return 0; +-err3: +- rxm_ep_msg_res_close(rxm_ep); + err2: + ofi_endpoint_close(&rxm_ep->util_ep); + err1: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_fabric.c +index 0280518..49c0008 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_fabric.c +@@ -89,7 +89,7 @@ int rxm_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + if (ret) + goto err1; + +- ret = ofi_get_core_info_fabric(attr, &msg_info); ++ ret = ofi_get_core_info_fabric(&rxm_prov, attr, &msg_info); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_FABRIC, "Unable to get core info!\n"); + ret = -FI_EINVAL; +@@ -109,7 +109,7 @@ int rxm_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + err3: + fi_freeinfo(msg_info); + err2: +- ofi_fabric_close(&rxm_fabric->util_fabric); ++ (void) ofi_fabric_close(&rxm_fabric->util_fabric); + err1: + free(rxm_fabric); + return ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_init.c +index 70cd28f..d7460a3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_init.c +@@ -38,10 +38,18 @@ + #include + #include "rxm.h" + +-int rxm_defer_requests = 0; ++#define RXM_ATOMIC_UNSUPPORTED_MSG_ORDER (FI_ORDER_RAR | FI_ORDER_RAW | \ ++ FI_ORDER_WAR | FI_ORDER_WAW | \ ++ FI_ORDER_SAR | FI_ORDER_SAW) ++ ++#define RXM_PASSTHRU_CAPS (FI_MSG | FI_RMA | FI_SEND | FI_RECV | \ ++ FI_READ | FI_WRITE | FI_REMOTE_READ | \ ++ FI_REMOTE_WRITE) ++ + size_t rxm_msg_tx_size = 128; + size_t rxm_msg_rx_size = 128; + size_t rxm_def_univ_size = 256; ++size_t rxm_eager_limit = RXM_BUF_SIZE - sizeof(struct rxm_pkt); + + char *rxm_proto_state_str[] = { + RXM_PROTO_STATES(OFI_STR) +@@ -81,20 +89,24 @@ void rxm_info_to_core_mr_modes(uint32_t version, const struct fi_info *hints, + int rxm_info_to_core(uint32_t version, const struct fi_info *hints, + struct fi_info *core_info) + { ++ int use_srx = 0; ++ + rxm_info_to_core_mr_modes(version, hints, core_info); + + core_info->mode |= FI_RX_CQ_DATA | FI_CONTEXT; + + if (hints) { +- if (hints->caps & FI_TAGGED) +- core_info->caps |= FI_MSG; ++ core_info->caps = hints->caps & RXM_PASSTHRU_CAPS; ++ if (hints->caps & (FI_ATOMIC | FI_TAGGED)) ++ core_info->caps |= FI_MSG | FI_SEND | FI_RECV; + + /* FI_RMA cap is needed for large message transfer protocol */ +- if (hints->caps & (FI_MSG | FI_TAGGED)) +- core_info->caps |= FI_RMA; ++ if (core_info->caps & FI_MSG) ++ core_info->caps |= FI_RMA | FI_READ | FI_REMOTE_READ; + + if (hints->domain_attr) { + core_info->domain_attr->caps |= hints->domain_attr->caps; ++ core_info->domain_attr->threading = hints->domain_attr->threading; + } + if (hints->tx_attr) { + core_info->tx_attr->msg_order = hints->tx_attr->msg_order; +@@ -106,6 +118,11 @@ int rxm_info_to_core(uint32_t version, const struct fi_info *hints, + } + } + core_info->ep_attr->type = FI_EP_MSG; ++ if (!fi_param_get_bool(&rxm_prov, "use_srx", &use_srx) && use_srx) { ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Requesting shared receive context from core provider\n"); ++ core_info->ep_attr->rx_ctx_cnt = FI_SHARED_CONTEXT; ++ } + + core_info->tx_attr->size = rxm_msg_tx_size; + core_info->rx_attr->size = rxm_msg_rx_size; +@@ -117,7 +134,8 @@ int rxm_info_to_rxm(uint32_t version, const struct fi_info *core_info, + struct fi_info *info) + { + info->caps = rxm_info.caps; +- info->mode = core_info->mode | rxm_info.mode; ++ // TODO find which other modes should be filtered ++ info->mode = (core_info->mode & ~FI_RX_CQ_DATA) | rxm_info.mode; + + info->tx_attr->caps = rxm_info.tx_attr->caps; + info->tx_attr->mode = info->mode; +@@ -131,7 +149,7 @@ int rxm_info_to_rxm(uint32_t version, const struct fi_info *core_info, + core_info->tx_attr->rma_iov_limit); + + info->rx_attr->caps = rxm_info.rx_attr->caps; +- info->rx_attr->mode = info->mode; ++ info->rx_attr->mode = info->rx_attr->mode & ~FI_RX_CQ_DATA; + info->rx_attr->msg_order = core_info->rx_attr->msg_order; + info->rx_attr->comp_order = rxm_info.rx_attr->comp_order; + info->rx_attr->size = rxm_info.rx_attr->size; +@@ -155,20 +173,18 @@ int rxm_info_to_rxm(uint32_t version, const struct fi_info *core_info, + + static int rxm_init_info(void) + { +- int param; ++ size_t param; + +- if (!fi_param_get_int(&rxm_prov, "buffer_size", ¶m)) { ++ if (!fi_param_get_size_t(&rxm_prov, "buffer_size", ¶m)) { + if (param > sizeof(struct rxm_pkt)) { +- rxm_info.tx_attr->inject_size = param; ++ rxm_eager_limit = param - sizeof(struct rxm_pkt); + } else { + FI_WARN(&rxm_prov, FI_LOG_CORE, + "Requested buffer size too small\n"); + return -FI_EINVAL; + } +- } else { +- rxm_info.tx_attr->inject_size = RXM_BUF_SIZE; + } +- rxm_info.tx_attr->inject_size -= sizeof(struct rxm_pkt); ++ rxm_info.tx_attr->inject_size = rxm_eager_limit; + rxm_util_prov.info = &rxm_info; + return 0; + } +@@ -178,15 +194,54 @@ static void rxm_alter_info(const struct fi_info *hints, struct fi_info *info) + struct fi_info *cur; + + for (cur = info; cur; cur = cur->next) { ++ /* RxM can support higher inject size without any big ++ * performance penalty even if app had requested lower value ++ * in hints. App is still free to reduce this when opening an ++ * endpoint. This overrides setting by ofi_alter_info */ ++ cur->tx_attr->inject_size = rxm_eager_limit; ++ + /* Remove the following caps if they are not requested as they + * may affect performance in fast-path */ + if (!hints) { +- cur->caps &= ~(FI_DIRECTED_RECV | FI_SOURCE); ++ cur->caps &= ~(FI_DIRECTED_RECV | FI_SOURCE | ++ FI_ATOMIC); ++ cur->tx_attr->caps &= ~FI_ATOMIC; ++ cur->rx_attr->caps &= ~FI_ATOMIC; ++ cur->domain_attr->data_progress = FI_PROGRESS_MANUAL; + } else { + if (!(hints->caps & FI_DIRECTED_RECV)) + cur->caps &= ~FI_DIRECTED_RECV; + if (!(hints->caps & FI_SOURCE)) + cur->caps &= ~FI_SOURCE; ++ ++ if (hints->mode & FI_BUFFERED_RECV) ++ cur->mode |= FI_BUFFERED_RECV; ++ ++ if (hints->caps & FI_ATOMIC) { ++ cur->tx_attr->msg_order &= ++ ~(RXM_ATOMIC_UNSUPPORTED_MSG_ORDER); ++ cur->rx_attr->msg_order &= ++ ~(RXM_ATOMIC_UNSUPPORTED_MSG_ORDER); ++ cur->ep_attr->max_order_raw_size = 0; ++ cur->ep_attr->max_order_war_size = 0; ++ cur->ep_attr->max_order_waw_size = 0; ++ } else { ++ cur->caps &= ~FI_ATOMIC; ++ cur->tx_attr->caps &= ~FI_ATOMIC; ++ cur->rx_attr->caps &= ~FI_ATOMIC; ++ } ++ ++ if (!ofi_mr_local(hints)) { ++ cur->mode &= ~FI_LOCAL_MR; ++ cur->tx_attr->mode &= ~FI_LOCAL_MR; ++ cur->rx_attr->mode &= ~FI_LOCAL_MR; ++ cur->domain_attr->mr_mode &= ~FI_MR_LOCAL; ++ } ++ ++ if (!hints->domain_attr || ++ hints->domain_attr->data_progress != FI_PROGRESS_AUTO) ++ cur->domain_attr->data_progress = FI_PROGRESS_MANUAL; ++ + if (hints->ep_attr && hints->ep_attr->mem_tag_format && + (info->caps & FI_TAGGED)) { + FI_INFO(&rxm_prov, FI_LOG_CORE, +@@ -201,11 +256,37 @@ static void rxm_alter_info(const struct fi_info *hints, struct fi_info *info) + } + } + ++static int rxm_validate_atomic_hints(const struct fi_info *hints) ++{ ++ if (!hints || !(hints->caps & FI_ATOMIC)) ++ return 0; ++ ++ if (hints->domain_attr && ++ hints->domain_attr->data_progress == FI_PROGRESS_AUTO) { ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "FI_ATOMIC does not support data FI_PROGRESS_AUTO\n"); ++ return -FI_EINVAL; ++ } ++ if (hints->tx_attr && (hints->tx_attr->msg_order & ++ RXM_ATOMIC_UNSUPPORTED_MSG_ORDER)) { ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Hints tx_attr msg_order not supported for atomics\n"); ++ return -FI_EINVAL; ++ } ++ if (hints->rx_attr && (hints->rx_attr->msg_order & ++ RXM_ATOMIC_UNSUPPORTED_MSG_ORDER)) { ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Hints rx_attr msg_order not supported for atomics\n"); ++ return -FI_EINVAL; ++ } ++ return 0; ++} ++ + static int rxm_getinfo(uint32_t version, const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, + struct fi_info **info) + { +- struct fi_info *cur, *dup; ++ struct fi_info *cur; + struct addrinfo *ai; + uint16_t port_save = 0; + int ret; +@@ -227,6 +308,9 @@ static int rxm_getinfo(uint32_t version, const char *node, const char *service, + ofi_addr_set_port(hints->src_addr, 0); + } + } ++ ret = rxm_validate_atomic_hints(hints); ++ if (ret) ++ return ret; + + ret = ofix_getinfo(version, node, service, flags, &rxm_util_prov, hints, + rxm_info_to_core, rxm_info_to_rxm, info); +@@ -241,33 +325,6 @@ static int rxm_getinfo(uint32_t version, const char *node, const char *service, + } + + rxm_alter_info(hints, *info); +- +- /* If app supports FI_MR_LOCAL, prioritize requiring it for +- * better performance. */ +- if (hints && hints->domain_attr && +- (OFI_CHECK_MR_LOCAL(hints))) { +- for (cur = *info; cur; cur = cur->next) { +- if (!OFI_CHECK_MR_LOCAL(cur)) +- continue; +- dup = fi_dupinfo(cur); +- if (!dup) { +- fi_freeinfo(*info); +- return -FI_ENOMEM; +- } +- +- dup->mode &= ~FI_LOCAL_MR; +- dup->domain_attr->mr_mode &= ~FI_MR_LOCAL; +- +- dup->next = cur->next; +- cur->next = dup; +- cur = dup; +- } +- } else { +- for (cur = *info; cur; cur = cur->next) { +- cur->mode &= ~FI_LOCAL_MR; +- cur->domain_attr->mr_mode &= ~FI_MR_LOCAL; +- } +- } + return 0; + } + +@@ -280,7 +337,7 @@ static void rxm_fini(void) + struct fi_provider rxm_prov = { + .name = OFI_UTIL_PREFIX "rxm", + .version = FI_VERSION(RXM_MAJOR_VERSION, RXM_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = rxm_getinfo, + .fabric = rxm_fabric, + .cleanup = rxm_fini +@@ -288,23 +345,37 @@ struct fi_provider rxm_prov = { + + RXM_INI + { +- fi_param_define(&rxm_prov, "buffer_size", FI_PARAM_INT, +- "Defines the transmit buffer size / inject size. Messages" +- " of size less than this would be transmitted via an " +- "eager protocol and those above would be transmitted " +- "via a rendezvous protocol. Transmit data would be copied" +- " up to this size (default: ~16k)."); ++ fi_param_define(&rxm_prov, "buffer_size", FI_PARAM_SIZE_T, ++ "Defines the transmit buffer size / inject size " ++ "(default: 16 KB). Eager protocol would be used to " ++ "transmit messages of size less than eager limit " ++ "(FI_OFI_RXM_BUFFER_SIZE - RxM header size (64 B)). " ++ "Any message whose size is greater than eager limit would" ++ " be transmitted via rendezvous or SAR " ++ "(Segmentation And Reassembly) protocol depending on " ++ "value of FI_OFI_RXM_SAR_LIMIT). Also, transmit data " ++ "would be copied up to eager limit."); + + fi_param_define(&rxm_prov, "comp_per_progress", FI_PARAM_INT, + "Defines the maximum number of MSG provider CQ entries " + "(default: 1) that would be read per progress " + "(RxM CQ read)."); + +- fi_param_define(&rxm_prov, "defer_requests", FI_PARAM_BOOL, +- "Defer requests when connection is not established " +- "(default: false)\n"); +- +- fi_param_get_bool(&rxm_prov, "defer_requests", &rxm_defer_requests); ++ fi_param_define(&rxm_prov, "sar_limit", FI_PARAM_SIZE_T, ++ "Set this environment variable to enable and control " ++ "RxM SAR (Segmentation And Reassembly) protocol " ++ "(default: 256 KB). This value should be set greater than " ++ " eager limit (FI_OFI_RXM_BUFFER_SIZE - RxM protocol " ++ "header size (64 B)) for SAR to take effect. Messages " ++ "of size greater than this would be transmitted via " ++ "rendezvous protocol."); ++ ++ fi_param_define(&rxm_prov, "use_srx", FI_PARAM_BOOL, ++ "Set this enivronment variable to control the RxM " ++ "receive path. If this variable set to 1 (default: 0), " ++ "the RxM uses Shared Receive Context. This mode improves " ++ "memory consumption, but it may increase small message " ++ "latency as a side-effect."); + + fi_param_define(&rxm_prov, "tx_size", FI_PARAM_SIZE_T, + "Defines default tx context size (default: 1024)."); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_rma.c +index 4e7e56f..4f8fca2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_rma.c +@@ -37,9 +37,8 @@ typedef ssize_t rxm_rma_msg_fn(struct fid_ep *ep_fid, + + static inline ssize_t + rxm_ep_rma_reg_iov(struct rxm_ep *rxm_ep, const struct iovec *msg_iov, +- void **desc, void **desc_storage, +- size_t iov_count, uint64_t comp_flags, +- struct rxm_tx_entry *tx_entry) ++ void **desc, void **desc_storage, size_t iov_count, ++ uint64_t comp_flags, struct rxm_rma_buf *rma_buf) + { + size_t i; + +@@ -48,12 +47,13 @@ rxm_ep_rma_reg_iov(struct rxm_ep *rxm_ep, const struct iovec *msg_iov, + ssize_t ret = + rxm_ep_msg_mr_regv(rxm_ep, msg_iov, iov_count, + comp_flags & (FI_WRITE | FI_READ), +- tx_entry->mr); ++ rma_buf->mr.mr); + if (OFI_UNLIKELY(ret)) + return ret; + + for (i = 0; i < iov_count; i++) +- desc_storage[i] = fi_mr_desc(tx_entry->mr[i]); ++ desc_storage[i] = fi_mr_desc(rma_buf->mr.mr[i]); ++ rma_buf->mr.count = iov_count; + } else { + for (i = 0; i < iov_count; i++) + desc_storage[i] = fi_mr_desc(desc[i]); +@@ -62,323 +62,72 @@ rxm_ep_rma_reg_iov(struct rxm_ep *rxm_ep, const struct iovec *msg_iov, + return FI_SUCCESS; + } + +-static inline void +-rxm_ep_rma_fill_msg(struct fi_msg_rma *msg_rma, struct iovec *iov, +- size_t iov_count, void **desc, +- struct rxm_rma_iov_storage *rma_iov, +- struct rxm_tx_entry *tx_entry, +- const struct fi_msg_rma *orig_msg) +-{ +- msg_rma->msg_iov = iov; +- msg_rma->desc = desc; +- msg_rma->iov_count = iov_count; +- msg_rma->addr = orig_msg->addr; +- msg_rma->rma_iov = rma_iov->iov; +- msg_rma->rma_iov_count = rma_iov->count; +- msg_rma->context = tx_entry; +- msg_rma->data = orig_msg->data; +-} +- +-static inline void +-rxm_ep_rma_fill_msg_no_buf(struct rxm_rma_buf *rma_buf, +- struct rxm_tx_entry *tx_entry, +- const struct fi_msg_rma *orig_msg) +-{ +- rma_buf->rxm_iov.count = (uint8_t)orig_msg->iov_count; +- +- rxm_ep_rma_fill_msg(&rma_buf->msg, rma_buf->rxm_iov.iov, +- rma_buf->rxm_iov.count, rma_buf->rxm_iov.desc, +- &rma_buf->rxm_rma_iov, tx_entry, orig_msg); +-} +- +-static inline void +-rxm_ep_rma_fill_msg_buf(struct rxm_rma_buf *rma_buf, +- struct rxm_tx_entry *tx_entry, +- const struct fi_msg_rma *orig_msg) +-{ +- ofi_copy_from_iov(rma_buf->pkt.data, rma_buf->pkt.hdr.size, +- orig_msg->msg_iov, orig_msg->iov_count, 0); +- +- rma_buf->rxm_iov.iov[0].iov_base = &rma_buf->pkt.data; +- rma_buf->rxm_iov.iov[0].iov_len = rma_buf->pkt.hdr.size; +- +- rxm_ep_rma_fill_msg(&rma_buf->msg, rma_buf->rxm_iov.iov, +- 1, &rma_buf->hdr.desc, &rma_buf->rxm_rma_iov, +- tx_entry, orig_msg); +-} +- + static inline ssize_t +-rxm_ep_format_rma_res_lightweight(struct rxm_ep *rxm_ep, uint64_t flags, +- uint64_t comp_flags, const struct fi_msg_rma *orig_msg, +- struct rxm_tx_entry **tx_entry) +-{ +- *tx_entry = rxm_tx_entry_get(&rxm_ep->send_queue); +- if (OFI_UNLIKELY(!*tx_entry)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to allocate TX entry for RMA!\n"); +- rxm_ep_progress_multi(&rxm_ep->util_ep); +- return -FI_EAGAIN; +- } +- +- (*tx_entry)->state = RXM_TX_NOBUF; +- (*tx_entry)->context = orig_msg->context; +- (*tx_entry)->flags = flags; +- (*tx_entry)->comp_flags = FI_RMA | comp_flags; +- (*tx_entry)->count = orig_msg->iov_count; +- +- return FI_SUCCESS; +-} +- +-static inline ssize_t +-rxm_ep_format_rma_buf(struct rxm_ep *rxm_ep, size_t total_size, +- const struct fi_msg_rma *orig_msg, +- struct rxm_rma_buf **rma_buf, struct rxm_tx_entry *tx_entry) +-{ +- size_t i; +- +- *rma_buf = rxm_rma_buf_get(rxm_ep); +- if (OFI_UNLIKELY(!*rma_buf)) +- return -FI_EAGAIN; +- +- tx_entry->state = RXM_TX_RMA; +- tx_entry->rma_buf = *rma_buf; +- (*rma_buf)->pkt.hdr.size = total_size; +- (*rma_buf)->rxm_iov.count = orig_msg->iov_count; +- (*rma_buf)->rxm_rma_iov.count = orig_msg->rma_iov_count; +- for (i = 0; i < orig_msg->iov_count; i++) +- (*rma_buf)->rxm_iov.iov[i] = orig_msg->msg_iov[i]; +- for (i = 0; i < orig_msg->rma_iov_count; i++) +- (*rma_buf)->rxm_rma_iov.iov[i] = orig_msg->rma_iov[i]; +- +- return FI_SUCCESS; +-} +- +-static inline ssize_t +-rxm_ep_format_rma_res(struct rxm_ep *rxm_ep, size_t total_size, +- uint64_t flags, uint64_t comp_flags, +- const struct fi_msg_rma *orig_msg, +- struct rxm_rma_buf **rma_buf, +- struct rxm_tx_entry **tx_entry) +-{ +- ssize_t ret; +- +- ret = rxm_ep_format_rma_res_lightweight(rxm_ep, flags, comp_flags, +- orig_msg, tx_entry); +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- ret = rxm_ep_format_rma_buf(rxm_ep, total_size, orig_msg, +- rma_buf, *tx_entry); +- if (OFI_UNLIKELY(ret)) +- goto err; +- +- return FI_SUCCESS; +-err: +- FI_WARN(&rxm_prov, FI_LOG_CQ, "Unable to allocate RMA resources!\n"); +- rxm_tx_entry_release(&rxm_ep->send_queue, *tx_entry); +- return ret; +-} +- +-void rxm_ep_handle_postponed_rma_op(struct rxm_ep *rxm_ep, +- struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry) +-{ +- ssize_t ret; +- struct util_cntr *cntr; +- struct util_cq *cq; +- struct fi_cq_err_entry err_entry; +- +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, +- "Perform deffered RMA operation (len - %"PRIu64") for %p conn\n", +- tx_entry->rma_buf->pkt.hdr.size, rxm_conn); +- +- if (tx_entry->comp_flags & FI_WRITE) { +- uint64_t flags = ((tx_entry->flags & FI_INJECT) ? +- ((tx_entry->flags & ~FI_INJECT) | +- FI_COMPLETION) : tx_entry->flags); +- ret = fi_writemsg(rxm_conn->msg_ep, +- &tx_entry->rma_buf->msg, +- flags); +- if (OFI_UNLIKELY(ret)) { +- cntr = rxm_ep->util_ep.wr_cntr; +- cq = rxm_ep->util_ep.tx_cq; +- goto err; +- } +- } else if (tx_entry->comp_flags & FI_READ) { +- ret = fi_readmsg(rxm_conn->msg_ep, +- &tx_entry->rma_buf->msg, +- tx_entry->flags); +- if (OFI_UNLIKELY(ret)) { +- cntr = rxm_ep->util_ep.rd_cntr; +- cq = rxm_ep->util_ep.tx_cq; +- goto err; +- } +- } else { +- assert(0); +- } +- +- return; +-err: +- FI_WARN(&rxm_prov, FI_LOG_EP_DATA, +- "Unable to perform deffered RMA operation\n"); +- +- memset(&err_entry, 0, sizeof(err_entry)); +- err_entry.op_context = tx_entry->context; +- err_entry.prov_errno = (int)ret; +- +- rxm_cntr_incerr(cntr); +- if (ofi_cq_write_error(cq, &err_entry)) +- assert(0); +-} +- +-static inline ssize_t +-rxm_ep_format_rma_inject_res(struct rxm_ep *rxm_ep, size_t total_size, +- uint64_t flags, uint64_t comp_flags, +- const struct fi_msg_rma *orig_msg, +- struct rxm_rma_buf **rma_buf, +- struct rxm_tx_entry **tx_entry) +-{ +- ssize_t ret = rxm_ep_format_rma_res(rxm_ep, total_size, flags, comp_flags, +- orig_msg, rma_buf, tx_entry); +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- rxm_ep_rma_fill_msg_buf(*rma_buf, *tx_entry, orig_msg); +- +- return ret; +-} +- +-static inline ssize_t +-rxm_ep_format_rma_non_inject_res(struct rxm_ep *rxm_ep, size_t total_size, +- uint64_t flags, uint64_t comp_flags, +- const struct fi_msg_rma *orig_msg, +- struct rxm_rma_buf **rma_buf, +- struct rxm_tx_entry **tx_entry) +-{ +- ssize_t ret = rxm_ep_format_rma_res(rxm_ep, total_size, flags, comp_flags, +- orig_msg, rma_buf, tx_entry); +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- ret = rxm_ep_rma_reg_iov(rxm_ep, (*rma_buf)->rxm_iov.iov, +- /* addr of desc from rma_buf will be assign to itself */ +- orig_msg->desc, +- (*rma_buf)->rxm_iov.desc, +- orig_msg->iov_count, +- comp_flags & (FI_WRITE | FI_READ), *tx_entry); +- if (OFI_UNLIKELY(ret)) +- goto err; +- +- rxm_ep_rma_fill_msg_no_buf(*rma_buf, *tx_entry, orig_msg); +- +- return ret; +-err: +- rxm_rma_buf_release(rxm_ep, (*tx_entry)->rma_buf); +- rxm_tx_entry_release(&rxm_ep->send_queue, *tx_entry); +- return ret; +-} +- +-static inline int +-rxm_ep_postpone_rma(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- size_t total_size, uint64_t flags, +- uint64_t comp_flags, const struct fi_msg_rma *orig_msg) +-{ +- struct rxm_tx_entry *tx_entry; +- struct rxm_rma_buf *rma_buf; +- int ret; +- +- if (flags & FI_INJECT) { +- assert(comp_flags & FI_WRITE); +- ret = rxm_ep_format_rma_inject_res(rxm_ep, total_size, +- flags, comp_flags, orig_msg, +- &rma_buf, &tx_entry); +- } else { +- ret = rxm_ep_format_rma_non_inject_res(rxm_ep, total_size, +- flags, comp_flags, orig_msg, +- &rma_buf, &tx_entry); +- } +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- dlist_insert_tail(&tx_entry->postponed_entry, +- &rxm_conn->postponed_tx_list); +- +- return ret; +-} +- +-static ssize_t + rxm_ep_rma_common(struct rxm_ep *rxm_ep, const struct fi_msg_rma *msg, uint64_t flags, + rxm_rma_msg_fn rma_msg, uint64_t comp_flags) + { +- struct rxm_tx_entry *tx_entry; ++ struct rxm_rma_buf *rma_buf; + struct fi_msg_rma msg_rma = *msg; +- struct util_cmap_handle *handle; + struct rxm_conn *rxm_conn; + void *mr_desc[RXM_IOV_LIMIT] = { 0 }; + int ret; + + assert(msg->rma_iov_count <= rxm_ep->rxm_info->tx_attr->rma_iov_limit); + +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- handle = ofi_cmap_acquire_handle(rxm_ep->util_ep.cmap, msg->addr); +- if (OFI_UNLIKELY(!handle)) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return -FI_EAGAIN; +- } else if (OFI_UNLIKELY(handle->state != CMAP_CONNECTED)) { +- ret = ofi_cmap_handle_connect(rxm_ep->util_ep.cmap, +- msg->addr, handle); +- if (OFI_UNLIKELY(ret != -FI_EAGAIN)) +- goto cmap_err; +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- ret = rxm_ep_postpone_rma(rxm_ep, rxm_conn, +- ofi_total_iov_len(msg->msg_iov, +- msg->iov_count), +- flags, comp_flags, msg); +-cmap_err: +- fastlock_release(&rxm_ep->util_ep.cmap->lock); ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) + return ret; +- } +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- rxm_conn = container_of(handle, struct rxm_conn, handle); + +- ret = rxm_ep_format_rma_res_lightweight(rxm_ep, flags, comp_flags, +- msg, &tx_entry); +- if (OFI_UNLIKELY(ret)) +- return -FI_EAGAIN; ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ rma_buf = rxm_rma_buf_alloc(rxm_ep); ++ if (OFI_UNLIKELY(!rma_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from RMA buffer pool\n"); ++ ret = -FI_ENOMEM; ++ goto unlock; ++ } + +- msg_rma.context = tx_entry; ++ rma_buf->app_context = msg->context; ++ rma_buf->flags = flags; + +- ret = rxm_ep_rma_reg_iov(rxm_ep, msg->msg_iov, msg_rma.desc, mr_desc, +- msg->iov_count, comp_flags & (FI_WRITE | FI_READ), +- tx_entry); ++ ret = rxm_ep_rma_reg_iov(rxm_ep, msg_rma.msg_iov, msg_rma.desc, mr_desc, ++ msg_rma.iov_count, comp_flags & (FI_WRITE | FI_READ), ++ rma_buf); + if (OFI_UNLIKELY(ret)) +- goto err; ++ goto release; ++ + msg_rma.desc = mr_desc; ++ msg_rma.context = rma_buf; + + ret = rma_msg(rxm_conn->msg_ep, &msg_rma, flags); + if (OFI_LIKELY(!ret)) +- return ret; ++ goto unlock; + + if ((rxm_ep->msg_mr_local) && (!rxm_ep->rxm_mr_local)) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); +-err: +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); ++ rxm_ep_msg_mr_closev(rma_buf->mr.mr, rma_buf->mr.count); ++release: ++ rxm_rma_buf_release(rxm_ep, rma_buf); ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); + return ret; + } + +-static ssize_t rxm_ep_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) ++static inline ssize_t ++rxm_ep_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, uint64_t flags) + { + struct rxm_ep *rxm_ep = + container_of(ep_fid, struct rxm_ep, util_ep.ep_fid.fid); + +- return rxm_ep_rma_common(rxm_ep, msg, flags, fi_readmsg, FI_READ); ++ return rxm_ep_rma_common(rxm_ep, msg, flags | rxm_ep->util_ep.tx_msg_flags, ++ fi_readmsg, FI_READ); + } + + static ssize_t rxm_ep_readv(struct fid_ep *ep_fid, const struct iovec *iov, + void **desc, size_t count, fi_addr_t src_addr, + uint64_t addr, uint64_t key, void *context) + { ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); + struct fi_rma_iov rma_iov = { + .addr = addr, + .len = ofi_total_iov_len(iov, count), +@@ -394,10 +143,8 @@ static ssize_t rxm_ep_readv(struct fid_ep *ep_fid, const struct iovec *iov, + .context = context, + .data = 0, + }; +- struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, +- util_ep.ep_fid.fid); + +- return rxm_ep_readmsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep)); ++ return rxm_ep_rma_common(rxm_ep, &msg, rxm_ep_tx_flags(rxm_ep), fi_readmsg, FI_READ); + } + + static ssize_t rxm_ep_read(struct fid_ep *ep_fid, void *buf, size_t len, +@@ -426,96 +173,163 @@ static ssize_t rxm_ep_read(struct fid_ep *ep_fid, void *buf, size_t len, + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_readmsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep)); ++ return rxm_ep_rma_common(rxm_ep, &msg, rxm_ep_tx_flags(rxm_ep), fi_readmsg, FI_READ); + } + +-static ssize_t +-rxm_ep_rma_inject(struct rxm_ep *rxm_ep, const struct fi_msg_rma *msg, uint64_t flags) ++static inline void ++rxm_ep_format_rma_msg(struct rxm_rma_buf *rma_buf, const struct fi_msg_rma *orig_msg, ++ struct iovec *rxm_iov, struct fi_msg_rma *rxm_msg) ++{ ++ rxm_msg->context = rma_buf; ++ rxm_msg->addr = orig_msg->addr; ++ rxm_msg->data = orig_msg->data; ++ ++ ofi_copy_from_iov(rma_buf->pkt.data, rma_buf->pkt.hdr.size, ++ orig_msg->msg_iov, orig_msg->iov_count, 0); ++ rxm_iov->iov_base = &rma_buf->pkt.data; ++ rxm_iov->iov_len = rma_buf->pkt.hdr.size; ++ rxm_msg->msg_iov = rxm_iov; ++ rxm_msg->desc = &rma_buf->hdr.desc; ++ rxm_msg->iov_count = 1; ++ ++ rxm_msg->rma_iov = orig_msg->rma_iov; ++ rxm_msg->rma_iov_count = orig_msg->rma_iov_count; ++} ++ ++static inline ssize_t ++rxm_ep_rma_emulate_inject_msg(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, size_t total_size, ++ const struct fi_msg_rma *msg, uint64_t flags) + { +- struct rxm_tx_entry *tx_entry; + struct rxm_rma_buf *rma_buf; +- struct util_cmap_handle *handle; +- struct rxm_conn *rxm_conn; +- size_t total_size = ofi_total_iov_len(msg->msg_iov, msg->iov_count); + ssize_t ret; ++ struct iovec rxm_msg_iov = { 0 }; ++ struct fi_msg_rma rxm_rma_msg = { 0 }; + + assert(msg->rma_iov_count <= rxm_ep->rxm_info->tx_attr->rma_iov_limit); + +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- handle = ofi_cmap_acquire_handle(rxm_ep->util_ep.cmap, msg->addr); +- if (OFI_UNLIKELY(!handle)) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return -FI_EAGAIN; +- } else if (OFI_UNLIKELY(handle->state != CMAP_CONNECTED)) { +- ret = ofi_cmap_handle_connect(rxm_ep->util_ep.cmap, +- msg->addr, handle); +- if (OFI_UNLIKELY(ret != -FI_EAGAIN)) +- goto cmap_err; +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- ret = rxm_ep_postpone_rma(rxm_ep, rxm_conn, total_size, +- flags, FI_WRITE, msg); +-cmap_err: +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return ret; ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ rma_buf = rxm_rma_buf_alloc(rxm_ep); ++ if (OFI_UNLIKELY(!rma_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from RMA buffer pool\n"); ++ ret = -FI_ENOMEM; ++ goto unlock; ++ } ++ ++ rma_buf->pkt.hdr.size = total_size; ++ rma_buf->app_context = msg->context; ++ rma_buf->flags = flags; ++ rxm_ep_format_rma_msg(rma_buf, msg, &rxm_msg_iov, &rxm_rma_msg); ++ ++ flags = (flags & ~FI_INJECT) | FI_COMPLETION; ++ ++ ret = fi_writemsg(rxm_conn->msg_ep, &rxm_rma_msg, flags); ++ if (OFI_UNLIKELY(ret)) { ++ if (ret == -FI_EAGAIN) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ rxm_rma_buf_release(rxm_ep, rma_buf); + } +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- rxm_conn = container_of(handle, struct rxm_conn, handle); ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; ++} ++ ++static inline ssize_t ++rxm_ep_rma_emulate_inject(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const void *buf, size_t len, uint64_t data, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ uint64_t flags) ++{ ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .len = len, ++ .key = key, ++ }; ++ struct iovec iov = { ++ .iov_base = (void*)buf, ++ .iov_len = len, ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &iov, ++ .desc = NULL, ++ .iov_count = 1, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .context = NULL, ++ .data = data, ++ }; + +- if (OFI_UNLIKELY(total_size > rxm_ep->rxm_info->tx_attr->inject_size)) +- return -FI_EMSGSIZE; ++ return rxm_ep_rma_emulate_inject_msg(rxm_ep, rxm_conn, len, &msg, flags); ++} ++ ++static inline ssize_t ++rxm_ep_rma_inject_common(struct rxm_ep *rxm_ep, const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ struct rxm_conn *rxm_conn; ++ size_t total_size = ofi_total_iov_len(msg->msg_iov, msg->iov_count); ++ ssize_t ret; ++ ++ assert(total_size <= rxm_ep->rxm_info->tx_attr->inject_size); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; + +- /* Use fi_inject_write instead of fi_writemsg since the latter generates +- * completion by default */ + if ((total_size <= rxm_ep->msg_info->tx_attr->inject_size) && +- !(flags & FI_COMPLETION)) { +- if (flags & FI_REMOTE_CQ_DATA) ++ !(flags & FI_COMPLETION) && ++ (msg->iov_count == 1) && (msg->rma_iov_count == 1)) { ++ if (flags & FI_REMOTE_CQ_DATA) { + ret = fi_inject_writedata(rxm_conn->msg_ep, + msg->msg_iov->iov_base, + msg->msg_iov->iov_len, msg->data, + msg->addr, msg->rma_iov->addr, + msg->rma_iov->key); +- else ++ } else { + ret = fi_inject_write(rxm_conn->msg_ep, + msg->msg_iov->iov_base, + msg->msg_iov->iov_len, msg->addr, + msg->rma_iov->addr, + msg->rma_iov->key); +- if (OFI_LIKELY(!ret)) +- rxm_cntr_inc(rxm_ep->util_ep.wr_cntr); +- return ret; +- } +- +- ret = rxm_ep_format_rma_inject_res(rxm_ep, total_size, flags, FI_WRITE, +- msg, &rma_buf, &tx_entry); +- if (OFI_UNLIKELY(ret)) ++ } ++ if (OFI_LIKELY(!ret)) { ++ ofi_ep_wr_cntr_inc(&rxm_ep->util_ep); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "fi_inject_write* for MSG provider failed with ret - %" ++ PRId64"\n", ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_progress(&rxm_ep->util_ep); ++ } + return ret; +- flags = (flags & ~FI_INJECT) | FI_COMPLETION; +- ret = fi_writemsg(rxm_conn->msg_ep, &rma_buf->msg, flags); +- if (OFI_UNLIKELY(ret)) { +- if (ret == -FI_EAGAIN) +- rxm_ep_progress_multi(&rxm_ep->util_ep); +- goto err; ++ } else { ++ return rxm_ep_rma_emulate_inject_msg(rxm_ep, rxm_conn, total_size, msg, flags); + } +- return 0; +-err: +- rxm_rma_buf_release(rxm_ep, tx_entry->rma_buf); +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); +- return ret; + } + +-static ssize_t rxm_ep_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) ++static inline ssize_t ++rxm_ep_generic_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) + { + struct rxm_ep *rxm_ep = + container_of(ep_fid, struct rxm_ep, util_ep.ep_fid.fid); + + if (flags & FI_INJECT) +- return rxm_ep_rma_inject(rxm_ep, msg, flags); ++ return rxm_ep_rma_inject_common(rxm_ep, msg, flags); + else + return rxm_ep_rma_common(rxm_ep, msg, flags, + fi_writemsg, FI_WRITE); + } + ++static inline ssize_t ++rxm_ep_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ struct rxm_ep *rxm_ep = ++ container_of(ep_fid, struct rxm_ep, util_ep.ep_fid.fid); ++ ++ return rxm_ep_generic_writemsg(ep_fid, msg, flags | rxm_ep->util_ep.tx_msg_flags); ++} ++ + static ssize_t rxm_ep_writev(struct fid_ep *ep_fid, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + uint64_t addr, uint64_t key, void *context) +@@ -538,7 +352,7 @@ static ssize_t rxm_ep_writev(struct fid_ep *ep_fid, const struct iovec *iov, + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_writemsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep)); ++ return rxm_ep_generic_writemsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep)); + } + + static ssize_t rxm_ep_writedata(struct fid_ep *ep_fid, const void *buf, +@@ -568,8 +382,8 @@ static ssize_t rxm_ep_writedata(struct fid_ep *ep_fid, const void *buf, + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_writemsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep) | +- FI_REMOTE_CQ_DATA); ++ return rxm_ep_generic_writemsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep) | ++ FI_REMOTE_CQ_DATA); + } + + static ssize_t rxm_ep_write(struct fid_ep *ep_fid, const void *buf, +@@ -598,38 +412,39 @@ static ssize_t rxm_ep_write(struct fid_ep *ep_fid, const void *buf, + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_writemsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep)); ++ return rxm_ep_generic_writemsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep)); + } + + static ssize_t rxm_ep_inject_write(struct fid_ep *ep_fid, const void *buf, +- size_t len, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) ++ size_t len, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key) + { +- struct fi_rma_iov rma_iov = { +- .addr = addr, +- .len = len, +- .key = key, +- }; +- struct iovec iov = { +- .iov_base = (void*)buf, +- .iov_len = len, +- }; +- struct fi_msg_rma msg = { +- .msg_iov = &iov, +- .desc = NULL, +- .iov_count = 1, +- .addr = dest_addr, +- .rma_iov = &rma_iov, +- .rma_iov_count = 1, +- .context = NULL, +- .data = 0, +- }; ++ ssize_t ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_writemsg(ep_fid, &msg, +- (rxm_ep_tx_flags(rxm_ep) & ~FI_COMPLETION) | +- FI_INJECT); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ if (len <= rxm_ep->msg_info->tx_attr->inject_size) { ++ ret = fi_inject_write(rxm_conn->msg_ep, buf, len, ++ dest_addr, addr, key); ++ if (OFI_LIKELY(!ret)) { ++ ofi_ep_wr_cntr_inc(&rxm_ep->util_ep); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "fi_inject_write for MSG provider failed with ret - %" ++ PRId64"\n", ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_progress(&rxm_ep->util_ep); ++ } ++ return ret; ++ } else { ++ return rxm_ep_rma_emulate_inject(rxm_ep, rxm_conn, buf, len, ++ 0, dest_addr, addr, key, FI_INJECT); ++ } + } + + static ssize_t rxm_ep_inject_writedata(struct fid_ep *ep_fid, const void *buf, +@@ -637,31 +452,32 @@ static ssize_t rxm_ep_inject_writedata(struct fid_ep *ep_fid, const void *buf, + fi_addr_t dest_addr, uint64_t addr, + uint64_t key) + { +- struct fi_rma_iov rma_iov = { +- .addr = addr, +- .len = len, +- .key = key, +- }; +- struct iovec iov = { +- .iov_base = (void*)buf, +- .iov_len = len, +- }; +- struct fi_msg_rma msg = { +- .msg_iov = &iov, +- .desc = NULL, +- .iov_count = 1, +- .addr = dest_addr, +- .rma_iov = &rma_iov, +- .rma_iov_count = 1, +- .context = NULL, +- .data = data, +- }; ++ ssize_t ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; + +- return rxm_ep_writemsg(ep_fid, &msg, +- (rxm_ep_tx_flags(rxm_ep) & ~FI_COMPLETION) | +- FI_INJECT | FI_REMOTE_CQ_DATA); ++ if (len <= rxm_ep->msg_info->tx_attr->inject_size) { ++ ret = fi_inject_writedata(rxm_conn->msg_ep, buf, len, ++ data, dest_addr, addr, key); ++ if (OFI_LIKELY(!ret)) { ++ ofi_ep_wr_cntr_inc(&rxm_ep->util_ep); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "fi_inject_writedata for MSG provider failed with ret - %" ++ PRId64"\n", ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_progress(&rxm_ep->util_ep); ++ } ++ return ret; ++ } else { ++ return rxm_ep_rma_emulate_inject(rxm_ep, rxm_conn, buf, len, ++ data, dest_addr, addr, key, ++ FI_REMOTE_CQ_DATA | FI_INJECT); ++ } + } + + struct fi_ops_rma rxm_ops_rma = { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr.h +index 6e19f56..c0eb298 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr.h +@@ -101,16 +101,16 @@ struct smr_ep_entry { + uint64_t ignore; + struct iovec iov[SMR_IOV_LIMIT]; + uint32_t iov_count; +- uint32_t flags; ++ uint16_t flags; + uint64_t err; + }; + + struct smr_ep; +-typedef int (*smr_rx_comp_func)(struct smr_ep *ep, void *context, +- uint64_t flags, size_t len, void *buf, void *addr, ++typedef int (*smr_rx_comp_func)(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, + uint64_t tag, uint64_t data, uint64_t err); +-typedef int (*smr_tx_comp_func)(struct smr_ep *ep, void *context, +- uint64_t flags, uint64_t err); ++typedef int (*smr_tx_comp_func)(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, uint64_t err); + + + struct smr_match_attr { +@@ -218,25 +218,23 @@ void smr_format_iov(struct smr_cmd *cmd, fi_addr_t peer_id, + void *context, struct smr_region *smr, struct smr_resp *resp, + struct smr_cmd *pend); + +-int smr_tx_comp(struct smr_ep *ep, void *context, uint64_t flags, uint64_t err); +-int smr_tx_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, +- uint64_t err); +-int smr_rx_comp(struct smr_ep *ep, void *context, uint64_t flags, size_t len, +- void *buf, void *addr, uint64_t tag, uint64_t data, +- uint64_t err); +-int smr_rx_src_comp(struct smr_ep *ep, void *context, uint64_t flags, +- size_t len, void *buf, void *addr, uint64_t tag, +- uint64_t data, uint64_t err); +-int smr_rx_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, +- size_t len, void *buf, void *addr, uint64_t tag, +- uint64_t data, uint64_t err); +-int smr_rx_src_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, +- size_t len, void *buf, void *addr, uint64_t tag, +- uint64_t data, uint64_t err); +- +-uint64_t smr_tx_comp_flags(uint32_t op); +-uint64_t smr_rx_comp_flags(uint32_t op, uint16_t op_flags); +-uint64_t smr_mr_reg_flags(uint32_t op, uint16_t atomic_op); ++int smr_tx_comp(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, uint64_t err); ++int smr_tx_comp_signal(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, uint64_t err); ++int smr_rx_comp(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, ++ uint64_t tag, uint64_t data, uint64_t err); ++int smr_rx_src_comp(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, ++ uint64_t tag, uint64_t data, uint64_t err); ++int smr_rx_comp_signal(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, ++ uint64_t tag, uint64_t data, uint64_t err); ++int smr_rx_src_comp_signal(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, ++ uint64_t tag, uint64_t data, uint64_t err); ++uint64_t smr_rx_cq_flags(uint32_t op, uint16_t op_flags); + + void smr_ep_progress(struct util_ep *util_ep); + int smr_progress_unexp(struct smr_ep *ep, struct smr_ep_entry *entry); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_atomic.c +index f536e93..56f1884 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_atomic.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_atomic.c +@@ -50,12 +50,12 @@ static void smr_format_inline_atomic(struct smr_cmd *cmd, fi_addr_t peer_id, + const struct iovec *compv, + size_t comp_count, uint32_t op, + enum fi_datatype datatype, +- enum fi_op atomic_op) ++ enum fi_op atomic_op, uint64_t op_flags) + { + size_t comp_size; + + smr_generic_format(cmd, peer_id, op, 0, datatype, +- atomic_op, 0, 0); ++ atomic_op, 0, op_flags); + cmd->msg.hdr.op_src = smr_src_inline; + switch (op) { + case ofi_op_atomic: +@@ -87,12 +87,12 @@ static void smr_format_inject_atomic(struct smr_cmd *cmd, fi_addr_t peer_id, + uint32_t op, enum fi_datatype datatype, + enum fi_op atomic_op, + struct smr_region *smr, +- struct smr_inject_buf *tx_buf) ++ struct smr_inject_buf *tx_buf, uint64_t op_flags) + { + size_t comp_size; + + smr_generic_format(cmd, peer_id, op, 0, datatype, +- atomic_op, 0, 0); ++ atomic_op, 0, op_flags); + cmd->msg.hdr.op_src = smr_src_inject; + cmd->msg.hdr.src_data = (char **) tx_buf - (char **) smr; + +@@ -119,16 +119,6 @@ static void smr_format_inject_atomic(struct smr_cmd *cmd, fi_addr_t peer_id, + } + } + +-static void smr_ioc_to_iov(const struct fi_ioc *ioc, struct iovec *iov, +- size_t count, size_t size) +-{ +- int i; +- for (i = 0; i < count; i++) { +- iov[i].iov_base = ioc[i].addr; +- iov[i].iov_len = ioc[i].count * size; +- } +-} +- + static int smr_fetch_result(struct smr_ep *ep, struct smr_region *peer_smr, + struct iovec *iov, size_t iov_count, + const struct fi_rma_ioc *rma_ioc, size_t rma_count, +@@ -180,16 +170,16 @@ static void smr_post_fetch_resp(struct smr_ep *ep, struct smr_cmd *cmd, + ofi_cirque_commit(smr_resp_queue(ep->region)); + } + +-static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, ++static ssize_t smr_generic_atomic(struct smr_ep *ep, + const struct fi_ioc *ioc, void **desc, size_t count, + const struct fi_ioc *compare_ioc, void **compare_desc, + size_t compare_count, struct fi_ioc *result_ioc, + void **result_desc, size_t result_count, + fi_addr_t addr, const struct fi_rma_ioc *rma_ioc, + size_t rma_count, enum fi_datatype datatype, +- enum fi_op atomic_op, void *context, uint32_t op) ++ enum fi_op atomic_op, void *context, uint32_t op, ++ uint64_t op_flags) + { +- struct smr_ep *ep; + struct smr_domain *domain; + struct smr_region *peer_smr; + struct smr_inject_buf *tx_buf; +@@ -207,7 +197,6 @@ static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, + assert(compare_count <= SMR_IOV_LIMIT); + assert(rma_count <= SMR_IOV_LIMIT); + +- ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); + domain = container_of(ep->util_ep.domain, struct smr_domain, util_domain); + + peer_id = (int) addr; +@@ -235,13 +224,13 @@ static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, + switch (op) { + case ofi_op_atomic_compare: + assert(compare_ioc); +- smr_ioc_to_iov(compare_ioc, compare_iov, compare_count, ++ ofi_ioc_to_iov(compare_ioc, compare_iov, compare_count, + ofi_datatype_size(datatype)); + total_len *= 2; + /* fall through */ + case ofi_op_atomic_fetch: + assert(result_ioc); +- smr_ioc_to_iov(result_ioc, result_iov, result_count, ++ ofi_ioc_to_iov(result_ioc, result_iov, result_count, + ofi_datatype_size(datatype)); + if (!domain->fast_rma) + flags |= SMR_RMA_REQ; +@@ -249,7 +238,7 @@ static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, + case ofi_op_atomic: + if (atomic_op != FI_ATOMIC_READ) { + assert(ioc); +- smr_ioc_to_iov(ioc, iov, count, ofi_datatype_size(datatype)); ++ ofi_ioc_to_iov(ioc, iov, count, ofi_datatype_size(datatype)); + } else { + count = 0; + } +@@ -261,13 +250,13 @@ static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, + if (total_len <= SMR_MSG_DATA_LEN && !(flags & SMR_RMA_REQ)) { + smr_format_inline_atomic(cmd, smr_peer_addr(ep->region)[peer_id].addr, + iov, count, compare_iov, compare_count, +- op, datatype, atomic_op); ++ op, datatype, atomic_op, op_flags); + } else if (total_len <= SMR_INJECT_SIZE) { + tx_buf = smr_freestack_pop(smr_inject_pool(peer_smr)); + smr_format_inject_atomic(cmd, smr_peer_addr(ep->region)[peer_id].addr, + iov, count, result_iov, result_count, + compare_iov, compare_count, op, datatype, +- atomic_op, peer_smr, tx_buf); ++ atomic_op, peer_smr, tx_buf, op_flags); + } else { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, + "message too large\n"); +@@ -293,7 +282,7 @@ static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, + "unable to fetch results"); + } + +- ret = ep->tx_comp(ep, context, smr_tx_comp_flags(op), err); ++ ret = ep->tx_comp(ep, context, op, cmd->msg.hdr.op_flags, err); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, + "unable to process tx completion\n"); +@@ -311,40 +300,50 @@ unlock_region: + return ret; + } + +-static ssize_t smr_atomic_writemsg(struct fid_ep *ep, ++static ssize_t smr_atomic_writemsg(struct fid_ep *ep_fid, + const struct fi_msg_atomic *msg, uint64_t flags) + { ++ struct smr_ep *ep; ++ ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + return smr_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, + NULL, NULL, 0, NULL, NULL, 0, msg->addr, + msg->rma_iov, msg->rma_iov_count, + msg->datatype, msg->op, msg->context, +- ofi_op_atomic); ++ ofi_op_atomic, flags | ep->util_ep.tx_msg_flags); + } + +-static ssize_t smr_atomic_writev(struct fid_ep *ep, ++static ssize_t smr_atomic_writev(struct fid_ep *ep_fid, + const struct fi_ioc *iov, void **desc, size_t count, + fi_addr_t dest_addr, uint64_t addr, uint64_t key, + enum fi_datatype datatype, enum fi_op op, void *context) + { ++ struct smr_ep *ep; + struct fi_rma_ioc rma_iov; + ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + rma_iov.addr = addr; + rma_iov.count = ofi_total_ioc_cnt(iov, count); + rma_iov.key = key; + + return smr_generic_atomic(ep, iov, desc, count, NULL, NULL, 0, NULL, + NULL, 0, dest_addr, &rma_iov, 1, datatype, +- op, context, ofi_op_atomic); ++ op, context, ofi_op_atomic, smr_ep_tx_flags(ep)); + } + +-static ssize_t smr_atomic_write(struct fid_ep *ep, const void *buf, size_t count, ++static ssize_t smr_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, + void *desc, fi_addr_t dest_addr, uint64_t addr, + uint64_t key, enum fi_datatype datatype, enum fi_op op, + void *context) + { ++ struct smr_ep *ep; + struct fi_ioc iov; + struct fi_rma_ioc rma_iov; + ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + iov.addr = (void *) buf; + iov.count = count; + +@@ -354,7 +353,7 @@ static ssize_t smr_atomic_write(struct fid_ep *ep, const void *buf, size_t count + + return smr_generic_atomic(ep, &iov, &desc, 1, NULL, NULL, 0, NULL, NULL, 0, + dest_addr, &rma_iov, 1, datatype, op, context, +- ofi_op_atomic); ++ ofi_op_atomic, smr_ep_tx_flags(ep)); + } + + static ssize_t smr_atomic_inject(struct fid_ep *ep_fid, const void *buf, +@@ -400,12 +399,12 @@ static ssize_t smr_atomic_inject(struct fid_ep *ep_fid, const void *buf, + if (total_len <= SMR_MSG_DATA_LEN) { + smr_format_inline_atomic(cmd, smr_peer_addr(ep->region)[peer_id].addr, + &iov, 1, NULL, 0, ofi_op_atomic, +- datatype, op); ++ datatype, op, 0); + } else if (total_len <= SMR_INJECT_SIZE) { + tx_buf = smr_freestack_pop(smr_inject_pool(peer_smr)); + smr_format_inject_atomic(cmd, smr_peer_addr(ep->region)[peer_id].addr, + &iov, 1, NULL, 0, NULL, 0, ofi_op_atomic, +- datatype, op, peer_smr, tx_buf); ++ datatype, op, peer_smr, tx_buf, 0); + } + + ofi_cirque_commit(smr_cmd_queue(peer_smr)); +@@ -420,27 +419,35 @@ unlock_region: + return ret; + } + +-static ssize_t smr_atomic_readwritemsg(struct fid_ep *ep, ++static ssize_t smr_atomic_readwritemsg(struct fid_ep *ep_fid, + const struct fi_msg_atomic *msg, struct fi_ioc *resultv, + void **result_desc, size_t result_count, uint64_t flags) + { ++ struct smr_ep *ep; ++ ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + return smr_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, + NULL, NULL, 0, resultv, result_desc, + result_count, msg->addr, + msg->rma_iov, msg->rma_iov_count, + msg->datatype, msg->op, msg->context, +- ofi_op_atomic_fetch); ++ ofi_op_atomic_fetch, ++ flags | ep->util_ep.tx_msg_flags); + } + +-static ssize_t smr_atomic_readwritev(struct fid_ep *ep, ++static ssize_t smr_atomic_readwritev(struct fid_ep *ep_fid, + const struct fi_ioc *iov, void **desc, size_t count, + struct fi_ioc *resultv, void **result_desc, + size_t result_count, fi_addr_t dest_addr, uint64_t addr, + uint64_t key, enum fi_datatype datatype, enum fi_op op, + void *context) + { ++ struct smr_ep *ep; + struct fi_rma_ioc rma_iov; + ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + rma_iov.addr = addr; + rma_iov.count = ofi_total_ioc_cnt(iov, count); + rma_iov.key = key; +@@ -448,18 +455,21 @@ static ssize_t smr_atomic_readwritev(struct fid_ep *ep, + return smr_generic_atomic(ep, iov, desc, count, NULL, NULL, 0, resultv, + result_desc, result_count, dest_addr, + &rma_iov, 1, datatype, op, context, +- ofi_op_atomic_fetch); ++ ofi_op_atomic_fetch, smr_ep_tx_flags(ep)); + } + +-static ssize_t smr_atomic_readwrite(struct fid_ep *ep, const void *buf, ++static ssize_t smr_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, + size_t count, void *desc, void *result, + void *result_desc, fi_addr_t dest_addr, uint64_t addr, + uint64_t key, enum fi_datatype datatype, enum fi_op op, + void *context) + { ++ struct smr_ep *ep; + struct fi_ioc iov, resultv; + struct fi_rma_ioc rma_iov; + ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + iov.addr = (void *) buf; + iov.count = count; + +@@ -472,25 +482,31 @@ static ssize_t smr_atomic_readwrite(struct fid_ep *ep, const void *buf, + + return smr_generic_atomic(ep, &iov, &desc, 1, NULL, NULL, 0, &resultv, + &result_desc, 1, dest_addr, &rma_iov, 1, +- datatype, op, context, ofi_op_atomic_fetch); ++ datatype, op, context, ofi_op_atomic_fetch, ++ smr_ep_tx_flags(ep)); + } + +-static ssize_t smr_atomic_compwritemsg(struct fid_ep *ep, ++static ssize_t smr_atomic_compwritemsg(struct fid_ep *ep_fid, + const struct fi_msg_atomic *msg, + const struct fi_ioc *comparev, void **compare_desc, + size_t compare_count, struct fi_ioc *resultv, + void **result_desc, size_t result_count, uint64_t flags) + { ++ struct smr_ep *ep; ++ ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + return smr_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, + comparev, compare_desc, compare_count, + resultv, result_desc, + result_count, msg->addr, + msg->rma_iov, msg->rma_iov_count, + msg->datatype, msg->op, msg->context, +- ofi_op_atomic_compare); ++ ofi_op_atomic_compare, ++ flags | ep->util_ep.tx_msg_flags); + } + +-static ssize_t smr_atomic_compwritev(struct fid_ep *ep, ++static ssize_t smr_atomic_compwritev(struct fid_ep *ep_fid, + const struct fi_ioc *iov, void **desc, size_t count, + const struct fi_ioc *comparev, void **compare_desc, + size_t compare_count, struct fi_ioc *resultv, +@@ -498,8 +514,11 @@ static ssize_t smr_atomic_compwritev(struct fid_ep *ep, + fi_addr_t dest_addr, uint64_t addr, uint64_t key, + enum fi_datatype datatype, enum fi_op op, void *context) + { ++ struct smr_ep *ep; + struct fi_rma_ioc rma_iov; + ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + rma_iov.addr = addr; + rma_iov.count = ofi_total_ioc_cnt(iov, count); + rma_iov.key = key; +@@ -507,18 +526,22 @@ static ssize_t smr_atomic_compwritev(struct fid_ep *ep, + return smr_generic_atomic(ep, iov, desc, count, comparev, compare_desc, + compare_count, resultv, result_desc, + result_count, dest_addr, &rma_iov, 1, +- datatype, op, context, ofi_op_atomic_compare); ++ datatype, op, context, ofi_op_atomic_compare, ++ smr_ep_tx_flags(ep)); + } + +-static ssize_t smr_atomic_compwrite(struct fid_ep *ep, const void *buf, ++static ssize_t smr_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, + size_t count, void *desc, const void *compare, + void *compare_desc, void *result, void *result_desc, + fi_addr_t dest_addr, uint64_t addr, uint64_t key, + enum fi_datatype datatype, enum fi_op op, void *context) + { ++ struct smr_ep *ep; + struct fi_ioc iov, resultv, comparev; + struct fi_rma_ioc rma_iov; + ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ + iov.addr = (void *) buf; + iov.count = count; + +@@ -535,7 +558,7 @@ static ssize_t smr_atomic_compwrite(struct fid_ep *ep, const void *buf, + return smr_generic_atomic(ep, &iov, &desc, 1, &comparev, &compare_desc, + 1, &resultv, &result_desc, 1, dest_addr, + &rma_iov, 1, datatype, op, context, +- ofi_op_atomic_compare); ++ ofi_op_atomic_compare, smr_ep_tx_flags(ep)); + } + + int smr_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_attr.c +index 6e7009c..60ecd63 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_attr.c +@@ -75,6 +75,7 @@ struct fi_domain_attr smr_domain_attr = { + .resource_mgmt = FI_RM_ENABLED, + .av_type = FI_AV_UNSPEC, + .mr_mode = FI_MR_SCALABLE, ++ .mr_key_size = sizeof_field(struct fi_rma_iov, key), + .cq_data_size = sizeof_field(struct smr_msg_hdr, data), + .cq_cnt = (1 << 10), + .ep_cnt = (1 << 10), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_av.c +index 505e0eb..b046542 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_av.c +@@ -64,7 +64,8 @@ static int smr_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + struct smr_ep *smr_ep; + struct dlist_entry *av_entry; + const char *ep_name; +- int index, i, ret; ++ fi_addr_t index; ++ int i, ret; + int succ_count = 0; + + util_av = container_of(av_fid, struct util_av, av_fid); +@@ -72,7 +73,7 @@ static int smr_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + + for (i = 0; i < count; i++) { + ep_name = smr_no_prefix((const char *) smr_names[i].name); +- ret = ofi_av_insert_addr(util_av, ep_name, 0, &index); ++ ret = ofi_av_insert_addr(util_av, ep_name, &index); + if (ret) { + if (util_av->eq) + ofi_av_write_event(util_av, i, -ret, context); +@@ -119,7 +120,7 @@ static int smr_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count + + fastlock_acquire(&util_av->lock); + for (i = 0; i < count; i++) { +- ret = ofi_av_remove_addr(util_av, 0, fi_addr[i]); ++ ret = ofi_av_remove_addr(util_av, fi_addr[i]); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_AV, + "Unable to remove address from AV\n"); +@@ -211,8 +212,7 @@ int smr_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + if (!smr_av) + return -FI_ENOMEM; + +- util_attr.addrlen = sizeof(int); +- util_attr.overhead = 0; ++ util_attr.addrlen = SMR_NAME_SIZE; + util_attr.flags = 0; + if (attr->count > SMR_MAX_PEERS) { + ret = -FI_ENOSYS; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_comp.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_comp.c +index 58e44c3..b442960 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_comp.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_comp.c +@@ -37,106 +37,112 @@ + #include "ofi_iov.h" + #include "smr.h" + +- +-int smr_tx_comp(struct smr_ep *ep, void *context, uint64_t flags, uint64_t err) ++int smr_tx_comp(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, uint64_t err) + { + struct fi_cq_tagged_entry *comp; +- struct util_cq_err_entry *entry; ++ struct util_cq_oflow_err_entry *entry; + + comp = ofi_cirque_tail(ep->util_ep.tx_cq->cirq); + if (err) { + if (!(entry = calloc(1, sizeof(*entry)))) + return -FI_ENOMEM; +- entry->err_entry.op_context = context; +- entry->err_entry.flags = flags; +- entry->err_entry.err = err; +- entry->err_entry.prov_errno = -err; ++ entry->comp.op_context = context; ++ entry->comp.flags = ofi_tx_cq_flags(op); ++ entry->comp.err = err; ++ entry->comp.prov_errno = -err; + slist_insert_tail(&entry->list_entry, +- &ep->util_ep.tx_cq->err_list); ++ &ep->util_ep.tx_cq->oflow_err_list); + comp->flags = UTIL_FLAG_ERROR; +- } else { ++ } else if (flags & SMR_TX_COMPLETION) { + comp->op_context = context; +- comp->flags = flags; ++ comp->flags = ofi_tx_cq_flags(op); + comp->len = 0; + comp->buf = NULL; + comp->data = 0; ++ } else { ++ return 0; + } + ofi_cirque_commit(ep->util_ep.tx_cq->cirq); + return 0; + } + +-int smr_tx_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, +- uint64_t err) ++int smr_tx_comp_signal(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, uint64_t err) + { + int ret; + +- ret = smr_tx_comp(ep, context, flags, err); ++ ret = smr_tx_comp(ep, context, op, flags, err); + if (ret) + return ret; + ep->util_ep.tx_cq->wait->signal(ep->util_ep.tx_cq->wait); + return 0; + } + +-int smr_rx_comp(struct smr_ep *ep, void *context, uint64_t flags, size_t len, +- void *buf, void *addr, uint64_t tag, uint64_t data, +- uint64_t err) ++int smr_rx_comp(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, ++ uint64_t tag, uint64_t data, uint64_t err) + { + struct fi_cq_tagged_entry *comp; +- struct util_cq_err_entry *entry; ++ struct util_cq_oflow_err_entry *entry; + + comp = ofi_cirque_tail(ep->util_ep.rx_cq->cirq); + if (err) { + if (!(entry = calloc(1, sizeof(*entry)))) + return -FI_ENOMEM; +- entry->err_entry.op_context = context; +- entry->err_entry.flags = flags; +- entry->err_entry.tag = tag; +- entry->err_entry.err = err; +- entry->err_entry.prov_errno = -err; ++ entry->comp.op_context = context; ++ entry->comp.flags = smr_rx_cq_flags(op, flags); ++ entry->comp.tag = tag; ++ entry->comp.err = err; ++ entry->comp.prov_errno = -err; + slist_insert_tail(&entry->list_entry, +- &ep->util_ep.rx_cq->err_list); ++ &ep->util_ep.rx_cq->oflow_err_list); + comp->flags = UTIL_FLAG_ERROR; +- } else { ++ } else if (flags & SMR_REMOTE_CQ_DATA || flags & SMR_RX_COMPLETION) { + comp->op_context = context; +- comp->flags = flags; ++ comp->flags = smr_rx_cq_flags(op, flags); + comp->len = len; + comp->buf = buf; + comp->data = data; + comp->tag = tag; ++ } else { ++ return 0; + } + ofi_cirque_commit(ep->util_ep.rx_cq->cirq); + return 0; + } + +-int smr_rx_src_comp(struct smr_ep *ep, void *context, uint64_t flags, +- size_t len, void *buf, void *addr, uint64_t tag, +- uint64_t data, uint64_t err) ++int smr_rx_src_comp(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, ++ uint64_t tag, uint64_t data, uint64_t err) + { + ep->util_ep.rx_cq->src[ofi_cirque_windex(ep->util_ep.rx_cq->cirq)] = + (uint32_t) (uintptr_t) addr; +- return smr_rx_comp(ep, context, flags, len, buf, addr, tag, data, err); ++ return smr_rx_comp(ep, context, op, flags, len, buf, addr, tag, ++ data, err); + } + +-int smr_rx_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, +- size_t len, void *buf, void *addr, uint64_t tag, +- uint64_t data, uint64_t err) ++int smr_rx_comp_signal(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, ++ uint64_t tag, uint64_t data, uint64_t err) + { + int ret; + +- ret = smr_rx_comp(ep, context, flags, len, buf, addr, tag, data, err); ++ ret = smr_rx_comp(ep, context, op, flags, len, buf, addr, tag, data, err); + if (ret) + return ret; + ep->util_ep.rx_cq->wait->signal(ep->util_ep.rx_cq->wait); + return 0; + } + +-int smr_rx_src_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, +- size_t len, void *buf, void *addr, uint64_t tag, +- uint64_t data, uint64_t err) ++int smr_rx_src_comp_signal(struct smr_ep *ep, void *context, uint32_t op, ++ uint16_t flags, size_t len, void *buf, void *addr, ++ uint64_t tag, uint64_t data, uint64_t err) + { + int ret; + +- ret = smr_rx_src_comp(ep, context, flags, len, buf, addr, tag, data, err); ++ ret = smr_rx_src_comp(ep, context, op, flags, len, buf, addr, ++ tag, data, err); + if (ret) + return ret; + ep->util_ep.rx_cq->wait->signal(ep->util_ep.rx_cq->wait); +@@ -144,57 +150,17 @@ int smr_rx_src_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, + + } + +-static const uint64_t smr_tx_flags[] = { +- [ofi_op_msg] = FI_SEND, +- [ofi_op_tagged] = FI_SEND | FI_TAGGED, +- [ofi_op_read_req] = FI_RMA | FI_READ, +- [ofi_op_write] = FI_RMA | FI_WRITE, +- [ofi_op_atomic] = FI_ATOMIC | FI_WRITE, +- [ofi_op_atomic_fetch] = FI_ATOMIC | FI_WRITE | FI_READ, +- [ofi_op_atomic_compare] = FI_ATOMIC | FI_WRITE | FI_READ, +-}; +- +-uint64_t smr_tx_comp_flags(uint32_t op) +-{ +- return smr_tx_flags[op]; +-} +- +-static const uint64_t smr_rx_flags[] = { +- [ofi_op_msg] = FI_RECV, +- [ofi_op_tagged] = FI_RECV | FI_TAGGED, +- [ofi_op_read_req] = FI_RMA | FI_REMOTE_READ, +- [ofi_op_write] = FI_RMA | FI_REMOTE_WRITE, +- [ofi_op_atomic] = FI_ATOMIC | FI_REMOTE_WRITE, +- [ofi_op_atomic_fetch] = FI_ATOMIC | FI_REMOTE_WRITE | FI_REMOTE_READ, +- [ofi_op_atomic_compare] = FI_ATOMIC | FI_REMOTE_WRITE | FI_REMOTE_READ, +-}; +- +-uint64_t smr_rx_comp_flags(uint32_t op, uint16_t op_flags) ++uint64_t smr_rx_cq_flags(uint32_t op, uint16_t op_flags) + { + uint64_t flags; + +- flags = smr_rx_flags[op]; ++ flags = ofi_rx_cq_flags(op); + + if (op_flags & SMR_REMOTE_CQ_DATA) + flags |= FI_REMOTE_CQ_DATA; + +- return flags; +-} +- +-static const uint64_t smr_mr_flags[] = { +- [ofi_op_msg] = FI_RECV, +- [ofi_op_tagged] = FI_RECV, +- [ofi_op_read_req] = FI_REMOTE_READ, +- [ofi_op_write] = FI_REMOTE_WRITE, +- [ofi_op_atomic] = FI_REMOTE_WRITE, +- [ofi_op_atomic_fetch] = FI_REMOTE_WRITE | FI_REMOTE_READ, +- [ofi_op_atomic_compare] = FI_REMOTE_WRITE | FI_REMOTE_READ, +-}; +- +-uint64_t smr_mr_reg_flags(uint32_t op, uint16_t atomic_op) +-{ +- if (atomic_op == FI_ATOMIC_READ) +- return FI_REMOTE_READ; ++ if (op_flags & SMR_MULTI_RECV) ++ flags |= FI_MULTI_RECV; + +- return smr_mr_flags[op]; ++ return flags; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_cq.c +index 6f853c3..29ac1b1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_cq.c +@@ -52,8 +52,12 @@ int smr_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + + ret = ofi_cq_init(&smr_prov, domain, attr, util_cq, ofi_cq_progress, context); + if (ret) +- return ret; ++ goto free; + + (*cq_fid) = &util_cq->cq_fid; + return 0; ++ ++free: ++ free(util_cq); ++ return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_ep.c +index 4fae47e..c45eee1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_ep.c +@@ -136,8 +136,8 @@ static int smr_ep_cancel_recv(struct smr_ep *ep, struct smr_queue *queue, + context); + if (entry) { + recv_entry = container_of(entry, struct smr_ep_entry, entry); +- ret = ep->rx_comp(ep, (void *) recv_entry->context, +- recv_entry->flags | FI_RECV, 0, ++ ret = ep->rx_comp(ep, (void *) recv_entry->context, ofi_op_msg, ++ recv_entry->flags, 0, + NULL, (void *) recv_entry->addr, + recv_entry->tag, 0, FI_ECANCELED); + freestack_push(ep->recv_fs, recv_entry); +@@ -237,8 +237,13 @@ void smr_generic_format(struct smr_cmd *cmd, fi_addr_t peer_id, + uint64_t op_flags) + { + cmd->msg.hdr.op = op; +- cmd->msg.hdr.op_flags = op_flags & FI_REMOTE_CQ_DATA ? +- SMR_REMOTE_CQ_DATA : 0; ++ cmd->msg.hdr.op_flags = 0; ++ ++ if (op_flags & FI_REMOTE_CQ_DATA) ++ cmd->msg.hdr.op_flags |= SMR_REMOTE_CQ_DATA; ++ if (op_flags & FI_COMPLETION) ++ cmd->msg.hdr.op_flags |= SMR_TX_COMPLETION; ++ + if (op == ofi_op_tagged) { + cmd->msg.hdr.tag = tag; + } else if (op == ofi_op_atomic || +@@ -312,31 +317,19 @@ static int smr_ep_close(struct fid *fid) + + static int smr_ep_bind_cq(struct smr_ep *ep, struct util_cq *cq, uint64_t flags) + { +- int ret = 0; +- +- if (flags & ~(FI_TRANSMIT | FI_RECV)) { +- FI_WARN(&smr_prov, FI_LOG_EP_CTRL, +- "unsupported flags\n"); +- return -FI_EBADFLAGS; +- } ++ int ret; + +- if (((flags & FI_TRANSMIT) && ep->util_ep.tx_cq) || +- ((flags & FI_RECV) && ep->util_ep.rx_cq)) { +- FI_WARN(&smr_prov, FI_LOG_EP_CTRL, +- "duplicate CQ binding\n"); +- return -FI_EINVAL; +- } ++ ret = ofi_ep_bind_cq(&ep->util_ep, cq, flags); ++ if (ret) ++ return ret; + + if (flags & FI_TRANSMIT) { + ep->util_ep.tx_cq = cq; +- ofi_atomic_inc32(&cq->ref); + ep->tx_comp = cq->wait ? smr_tx_comp_signal : smr_tx_comp; + } + + if (flags & FI_RECV) { + ep->util_ep.rx_cq = cq; +- ofi_atomic_inc32(&cq->ref); +- + if (cq->wait) { + ep->rx_comp = (cq->domain->info_domain_caps & FI_SOURCE) ? + smr_rx_src_comp_signal : +@@ -434,7 +427,7 @@ static int smr_endpoint_name(char *name, char *addr, size_t addrlen, + return -FI_EINVAL; + + start = smr_no_prefix((const char *) addr); +- if (strstr(addr, SMR_PREFIX)) ++ if (strstr(addr, SMR_PREFIX) || dom_idx || ep_idx) + snprintf(name, SMR_NAME_SIZE, "%s:%d:%d", start, dom_idx, + ep_idx); + else +@@ -476,9 +469,9 @@ int smr_endpoint(struct fid_domain *domain, struct fi_info *info, + if (ret) + goto err1; + +- ep->recv_fs = smr_recv_fs_create(info->rx_attr->size); +- ep->unexp_fs = smr_unexp_fs_create(info->rx_attr->size); +- ep->pend_fs = smr_pend_fs_create(info->tx_attr->size); ++ ep->recv_fs = smr_recv_fs_create(info->rx_attr->size, NULL, NULL); ++ ep->unexp_fs = smr_unexp_fs_create(info->rx_attr->size, NULL, NULL); ++ ep->pend_fs = smr_pend_fs_create(info->tx_attr->size, NULL, NULL); + smr_init_queue(&ep->recv_queue, smr_match_msg); + smr_init_queue(&ep->trecv_queue, smr_match_tagged); + smr_init_queue(&ep->unexp_queue, smr_match_unexp); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_init.c +index fc29c4b..c49a97a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_init.c +@@ -112,7 +112,7 @@ static void smr_fini(void) + struct fi_provider smr_prov = { + .name = "shm", + .version = FI_VERSION(SMR_MAJOR_VERSION, SMR_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = smr_getinfo, + .fabric = smr_fabric, + .cleanup = smr_fini +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_msg.c +index 0738ef6..6cf65dc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_msg.c +@@ -38,88 +38,121 @@ + #include "smr.h" + + +-static ssize_t smr_generic_recvmsg(struct smr_ep *ep, const struct iovec *iov, +- size_t iov_count, fi_addr_t addr, uint64_t tag, +- uint64_t ignore, void *context, uint64_t flags) ++static inline uint16_t smr_convert_rx_flags(uint64_t fi_flags) + { +- struct smr_queue *recv_queue; +- struct smr_ep_entry *entry; +- ssize_t ret; ++ uint16_t flags = 0; + +- assert(iov_count <= SMR_IOV_LIMIT); +- assert(!(flags & FI_MULTI_RECV) || iov_count == 1); ++ if (fi_flags & FI_COMPLETION) ++ flags |= SMR_RX_COMPLETION; ++ if (fi_flags & FI_MULTI_RECV) ++ flags |= SMR_MULTI_RECV; + +- fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); +- if (freestack_isempty(ep->recv_fs)) { +- ret = -FI_EAGAIN; +- goto out; +- } +- entry = freestack_pop(ep->recv_fs); +- memset(entry, 0, sizeof(*entry)); ++ return flags; ++} + +- for (entry->iov_count = 0; entry->iov_count < iov_count; +- entry->iov_count++) { +- entry->iov[entry->iov_count] = iov[entry->iov_count]; +- } ++static inline struct smr_ep_entry *smr_get_recv_entry(struct smr_ep *ep, uint64_t flags) ++{ ++ struct smr_ep_entry *entry; + +- entry->context = context; +- entry->flags = flags; +- entry->addr = addr; +- entry->tag = tag; +- entry->ignore = ignore; ++ if (freestack_isempty(ep->recv_fs)) ++ return NULL; + +- if (flags & FI_TAGGED) { +- ret = smr_progress_unexp(ep, entry); +- if (!ret || ret == -FI_EAGAIN) +- goto out; +- recv_queue = &ep->trecv_queue; +- } else { +- recv_queue = &ep->recv_queue; +- } ++ entry = freestack_pop(ep->recv_fs); + +- dlist_insert_tail(&entry->entry, &recv_queue->list); ++ entry->tag = 0; /* does this need to be set? */ ++ entry->ignore = 0; /* does this need to be set? */ ++ entry->err = 0; ++ entry->flags = smr_convert_rx_flags(flags); + +- ret = 0; +-out: +- fastlock_release(&ep->util_ep.rx_cq->cq_lock); +- return ret; ++ return entry; + } + + ssize_t smr_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, + uint64_t flags) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; ++ ssize_t ret = 0; ++ ++ assert(msg->iov_count <= SMR_IOV_LIMIT); ++ assert(!(flags & FI_MULTI_RECV) || msg->iov_count == 1); + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_recv_entry(ep, flags | ep->util_ep.rx_msg_flags); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ entry->iov_count = msg->iov_count; ++ memcpy(&entry->iov, msg->msg_iov, sizeof(*msg->msg_iov) * msg->iov_count); + +- return smr_generic_recvmsg(ep, msg->msg_iov, msg->iov_count, +- msg->addr, 0, 0, msg->context, flags); ++ entry->context = msg->context; ++ entry->addr = msg->addr; ++ ++ dlist_insert_tail(&entry->entry, &ep->recv_queue.list); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, + size_t count, fi_addr_t src_addr, void *context) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; ++ ssize_t ret = 0; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ assert(count <= SMR_IOV_LIMIT); ++ assert(!(smr_ep_rx_flags(ep) & FI_MULTI_RECV) || count == 1); + +- return smr_generic_recvmsg(ep, iov, count, src_addr, +- 0, 0, context, smr_ep_rx_flags(ep)); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_recv_entry(ep, smr_ep_rx_flags(ep)); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ entry->iov_count = count; ++ memcpy(&entry->iov, iov, sizeof(*iov) * count); ++ ++ entry->context = context; ++ entry->addr = src_addr; ++ ++ dlist_insert_tail(&entry->entry, &ep->recv_queue.list); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_recv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, + fi_addr_t src_addr, void *context) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; +- struct iovec msg_iov; ++ ssize_t ret = 0; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_recv_entry(ep, smr_ep_rx_flags(ep)); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ entry->iov_count = 1; ++ entry->iov[0].iov_base = buf; ++ entry->iov[0].iov_len = len; + +- return smr_generic_recvmsg(ep, &msg_iov, 1, src_addr, 0, 0, context, +- smr_ep_rx_flags(ep)); ++ entry->context = context; ++ entry->addr = src_addr; ++ ++ dlist_insert_tail(&entry->entry, &ep->recv_queue.list); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + static ssize_t smr_generic_sendmsg(struct smr_ep *ep, const struct iovec *iov, +@@ -178,7 +211,7 @@ static ssize_t smr_generic_sendmsg(struct smr_ep *ep, const struct iovec *iov, + ofi_cirque_commit(smr_resp_queue(ep->region)); + goto commit; + } +- ret = ep->tx_comp(ep, context, smr_tx_comp_flags(op), 0); ++ ret = ep->tx_comp(ep, context, op, cmd->msg.hdr.op_flags, 0); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, + "unable to process tx completion\n"); +@@ -231,7 +264,7 @@ ssize_t smr_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, + + return smr_generic_sendmsg(ep, msg->msg_iov, msg->iov_count, + msg->addr, 0, msg->data, msg->context, +- ofi_op_msg, flags); ++ ofi_op_msg, flags | ep->util_ep.tx_msg_flags); + } + + static ssize_t smr_generic_inject(struct fid_ep *ep_fid, const void *buf, +@@ -305,7 +338,8 @@ ssize_t smr_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, + iov.iov_len = len; + + return smr_generic_sendmsg(ep, &iov, 1, dest_addr, 0, data, context, +- ofi_op_msg, FI_REMOTE_CQ_DATA); ++ ofi_op_msg, ++ FI_REMOTE_CQ_DATA | smr_ep_tx_flags(ep)); + } + + ssize_t smr_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, +@@ -328,43 +362,126 @@ struct fi_ops_msg smr_msg_ops = { + .injectdata = smr_injectdata, + }; + ++static inline struct smr_ep_entry *smr_get_trecv_entry(struct smr_ep *ep, uint64_t flags) ++{ ++ struct smr_ep_entry *entry; ++ ++ if (freestack_isempty(ep->recv_fs)) ++ return NULL; ++ ++ entry = freestack_pop(ep->recv_fs); ++ entry->err = 0; ++ entry->flags = smr_convert_rx_flags(flags); ++ ++ return entry; ++} ++ ++static inline ssize_t ++smr_proccess_trecv_post(struct smr_ep *ep, struct smr_ep_entry *entry) ++{ ++ ssize_t ret; ++ ++ ret = smr_progress_unexp(ep, entry); ++ if (!ret || ret == -FI_EAGAIN) ++ return ret; ++ ++ dlist_insert_tail(&entry->entry, &ep->trecv_queue.list); ++ return 0; ++} ++ + ssize_t smr_trecv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, + fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; +- struct iovec msg_iov; ++ ssize_t ret; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_trecv_entry(ep, smr_ep_rx_flags(ep)); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ entry->iov_count = 1; ++ entry->iov[0].iov_base = buf; ++ entry->iov[0].iov_len = len; + +- return smr_generic_recvmsg(ep, &msg_iov, 1, src_addr, tag, ignore, +- context, FI_TAGGED | smr_ep_tx_flags(ep)); ++ entry->context = context; ++ entry->addr = src_addr; ++ entry->tag = tag; ++ entry->ignore = ignore; ++ ++ ret = smr_proccess_trecv_post(ep, entry); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_trecvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, + size_t count, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, + void *context) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; ++ ssize_t ret; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ assert(count <= SMR_IOV_LIMIT); ++ assert(!(smr_ep_rx_flags(ep) & FI_MULTI_RECV) || count == 1); + +- return smr_generic_recvmsg(ep, iov, count, src_addr, tag, ignore, +- context, FI_TAGGED | smr_ep_tx_flags(ep)); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_trecv_entry(ep, smr_ep_rx_flags(ep)); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ entry->iov_count = count; ++ memcpy(&entry->iov, iov, sizeof(*iov) * count); ++ ++ entry->context = context; ++ entry->addr = src_addr; ++ entry->tag = tag; ++ entry->ignore = ignore; ++ ++ ret = smr_proccess_trecv_post(ep, entry); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_trecvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, + uint64_t flags) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; ++ ssize_t ret; ++ ++ assert(msg->iov_count <= SMR_IOV_LIMIT); ++ assert(!(flags & FI_MULTI_RECV) || msg->iov_count == 1); + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_trecv_entry(ep, flags | ep->util_ep.rx_msg_flags); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ entry->iov_count = msg->iov_count; ++ memcpy(&entry->iov, msg->msg_iov, sizeof(*msg->msg_iov) * msg->iov_count); ++ ++ entry->context = msg->context; ++ entry->addr = msg->addr; ++ entry->tag = msg->tag; ++ entry->ignore = msg->ignore; + +- return smr_generic_recvmsg(ep, msg->msg_iov, msg->iov_count, msg->addr, +- msg->tag, msg->ignore, msg->context, +- flags | FI_TAGGED); ++ ret = smr_proccess_trecv_post(ep, entry); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, +@@ -405,7 +522,7 @@ ssize_t smr_tsendmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, + + return smr_generic_sendmsg(ep, msg->msg_iov, msg->iov_count, + msg->addr, msg->tag, msg->data, msg->context, +- ofi_op_tagged, flags); ++ ofi_op_tagged, flags | ep->util_ep.tx_msg_flags); + } + + ssize_t smr_tinject(struct fid_ep *ep_fid, const void *buf, size_t len, +@@ -428,7 +545,8 @@ ssize_t smr_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t len, + iov.iov_len = len; + + return smr_generic_sendmsg(ep, &iov, 1, dest_addr, tag, data, context, +- ofi_op_tagged, FI_REMOTE_CQ_DATA); ++ ofi_op_tagged, ++ FI_REMOTE_CQ_DATA | smr_ep_tx_flags(ep)); + } + + ssize_t smr_tinjectdata(struct fid_ep *ep_fid, const void *buf, size_t len, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_progress.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_progress.c +index c2a49e8..49ce56c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_progress.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_progress.c +@@ -95,7 +95,7 @@ static void smr_progress_resp(struct smr_ep *ep) + break; + + ret = ep->tx_comp(ep, (void *) (uintptr_t) pending->msg.hdr.msg_id, +- smr_tx_comp_flags(pending->msg.hdr.op), ++ pending->msg.hdr.op, pending->msg.hdr.op_flags, + -(resp->status)); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, +@@ -207,7 +207,8 @@ static int smr_progress_multi_recv(struct smr_ep *ep, struct smr_queue *queue, + + left = entry->iov[0].iov_len - len; + if (left < ep->min_multi_recv_size) { +- ret = ep->rx_comp(ep, entry->context, FI_MULTI_RECV, 0, 0, ++ ret = ep->rx_comp(ep, entry->context, ofi_op_msg, ++ SMR_MULTI_RECV | entry->flags, 0, 0, + &entry->addr, 0, 0, 0); + freestack_push(ep->recv_fs, entry); + return ret; +@@ -381,9 +382,9 @@ static int smr_progress_cmd_msg(struct smr_ep *ep, struct smr_cmd *cmd) + "unidentified operation type\n"); + err = -FI_EINVAL; + } +- ret = ep->rx_comp(ep, entry->context, smr_rx_comp_flags(cmd->msg.hdr.op, +- cmd->msg.hdr.op_flags), total_len, +- entry->iov[0].iov_base, &addr, cmd->msg.hdr.tag, ++ ret = ep->rx_comp(ep, entry->context, cmd->msg.hdr.op, ++ cmd->msg.hdr.op_flags | (entry->flags & ~SMR_MULTI_RECV), ++ total_len, entry->iov[0].iov_base, &addr, cmd->msg.hdr.tag, + cmd->msg.hdr.data, err); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, +@@ -392,7 +393,7 @@ static int smr_progress_cmd_msg(struct smr_ep *ep, struct smr_cmd *cmd) + ofi_cirque_discard(smr_cmd_queue(ep->region)); + ep->region->cmd_cnt++; + +- if (entry->flags & FI_MULTI_RECV) { ++ if (entry->flags & SMR_MULTI_RECV) { + ret = smr_progress_multi_recv(ep, recv_queue, entry, total_len); + return ret; + } +@@ -430,7 +431,7 @@ static int smr_progress_cmd_rma(struct smr_ep *ep, struct smr_cmd *cmd) + rma_cmd->rma.rma_iov[iov_count].len, + (uintptr_t *) &(rma_cmd->rma.rma_iov[iov_count].addr), + rma_cmd->rma.rma_iov[iov_count].key, +- smr_mr_reg_flags(cmd->msg.hdr.op, 0)); ++ ofi_rx_mr_reg_flags(cmd->msg.hdr.op, 0)); + if (ret) + break; + +@@ -459,9 +460,8 @@ static int smr_progress_cmd_rma(struct smr_ep *ep, struct smr_cmd *cmd) + } + if (cmd->msg.hdr.op_flags & SMR_REMOTE_CQ_DATA) { + ret = ep->rx_comp(ep, (void *) cmd->msg.hdr.msg_id, +- smr_rx_comp_flags(cmd->msg.hdr.op, +- cmd->msg.hdr.op_flags), total_len, +- NULL, &cmd->msg.hdr.addr, 0, ++ cmd->msg.hdr.op, cmd->msg.hdr.op_flags, ++ total_len, iov[0].iov_base, &cmd->msg.hdr.addr, 0, + cmd->msg.hdr.data, err); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, +@@ -496,7 +496,7 @@ static int smr_progress_cmd_atomic(struct smr_ep *ep, struct smr_cmd *cmd) + ofi_datatype_size(cmd->msg.hdr.datatype), + (uintptr_t *) &(rma_cmd->rma.rma_ioc[ioc_count].addr), + rma_cmd->rma.rma_ioc[ioc_count].key, +- smr_mr_reg_flags(cmd->msg.hdr.op, ++ ofi_rx_mr_reg_flags(cmd->msg.hdr.op, + cmd->msg.hdr.atomic_op)); + if (ret) + break; +@@ -642,10 +642,9 @@ int smr_progress_unexp(struct smr_ep *ep, struct smr_ep_entry *entry) + "unidentified operation type\n"); + entry->err = FI_EINVAL; + } +- ret = ep->rx_comp(ep, entry->context, +- smr_rx_comp_flags(unexp_msg->cmd.msg.hdr.op, +- unexp_msg->cmd.msg.hdr.op_flags), total_len, +- entry->iov[0].iov_base, &entry->addr, entry->tag, ++ ret = ep->rx_comp(ep, entry->context, unexp_msg->cmd.msg.hdr.op, ++ unexp_msg->cmd.msg.hdr.op_flags | entry->flags, ++ total_len, entry->iov[0].iov_base, &entry->addr, entry->tag, + unexp_msg->cmd.msg. hdr.data, entry->err); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, +@@ -655,7 +654,7 @@ int smr_progress_unexp(struct smr_ep *ep, struct smr_ep_entry *entry) + ep->region->cmd_cnt++; + freestack_push(ep->unexp_fs, unexp_msg); + +- if (entry->flags & FI_MULTI_RECV) { ++ if (entry->flags & SMR_MULTI_RECV) { + ret = smr_progress_multi_recv(ep, &ep->trecv_queue, entry, + total_len); + return ret ? ret : -FI_ENOMSG; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_rma.c +index d5a86cc..3f92ac1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_rma.c +@@ -47,16 +47,17 @@ static void smr_format_rma_iov(struct smr_cmd *cmd, const struct fi_rma_iov *rma + + static void smr_format_rma_resp(struct smr_cmd *cmd, fi_addr_t peer_id, + const struct fi_rma_iov *rma_iov, size_t count, +- size_t total_len, uint32_t op) ++ size_t total_len, uint32_t op, uint64_t op_flags) + { +- smr_generic_format(cmd, peer_id, op, 0, 0, 0, 0, 0); ++ smr_generic_format(cmd, peer_id, op, 0, 0, 0, 0, op_flags); + cmd->msg.hdr.size = total_len; + } + + ssize_t smr_rma_fast(struct smr_region *peer_smr, struct smr_cmd *cmd, + const struct iovec *iov, size_t iov_count, + const struct fi_rma_iov *rma_iov, size_t rma_count, +- void **desc, int peer_id, void *context, uint32_t op) ++ void **desc, int peer_id, void *context, uint32_t op, ++ uint64_t op_flags) + { + struct iovec rma_iovec[SMR_IOV_LIMIT]; + size_t total_len; +@@ -92,7 +93,7 @@ ssize_t smr_rma_fast(struct smr_region *peer_smr, struct smr_cmd *cmd, + + smr_format_rma_resp(cmd, peer_id, rma_iov, rma_count, total_len, + (op == ofi_op_write) ? ofi_op_write_rsp : +- ofi_op_read_rsp); ++ ofi_op_read_rsp, op_flags); + + return 0; + } +@@ -108,6 +109,7 @@ ssize_t smr_generic_rma(struct smr_ep *ep, const struct iovec *iov, + struct smr_resp *resp; + struct smr_cmd *cmd, *pend; + int peer_id, cmds, err = 0, comp = 1; ++ uint16_t comp_flags; + ssize_t ret = 0; + size_t total_len; + +@@ -141,7 +143,8 @@ ssize_t smr_generic_rma(struct smr_ep *ep, const struct iovec *iov, + + if (cmds == 1) { + err = smr_rma_fast(peer_smr, cmd, iov, iov_count, rma_iov, +- rma_count, desc, peer_id, context, op); ++ rma_count, desc, peer_id, context, op, op_flags); ++ comp_flags = cmd->msg.hdr.op_flags; + goto commit_comp; + } + +@@ -166,6 +169,7 @@ ssize_t smr_generic_rma(struct smr_ep *ep, const struct iovec *iov, + comp = 0; + } + ++ comp_flags = cmd->msg.hdr.op_flags; + ofi_cirque_commit(smr_cmd_queue(peer_smr)); + peer_smr->cmd_cnt--; + cmd = ofi_cirque_tail(smr_cmd_queue(peer_smr)); +@@ -178,7 +182,7 @@ commit_comp: + if (!comp) + goto unlock_cq; + +- ret = ep->tx_comp(ep, context, smr_tx_comp_flags(op), err); ++ ret = ep->tx_comp(ep, context, op, comp_flags, err); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, + "unable to process tx completion\n"); +@@ -239,7 +243,8 @@ ssize_t smr_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, + return smr_generic_rma(ep, msg->msg_iov, msg->iov_count, + msg->rma_iov, msg->rma_iov_count, + msg->desc, msg->addr, msg->context, +- ofi_op_read_req, 0, flags); ++ ofi_op_read_req, 0, ++ flags | ep->util_ep.tx_msg_flags); + } + + ssize_t smr_write(struct fid_ep *ep_fid, const void *buf, size_t len, void *desc, +@@ -287,11 +292,12 @@ ssize_t smr_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, + struct smr_ep *ep; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); +- ++ + return smr_generic_rma(ep, msg->msg_iov, msg->iov_count, + msg->rma_iov, msg->rma_iov_count, + msg->desc, msg->addr, msg->context, +- ofi_op_write, msg->data, flags); ++ ofi_op_write, msg->data, ++ flags | ep->util_ep.tx_msg_flags); + } + + ssize_t smr_generic_rma_inject(struct fid_ep *ep_fid, const void *buf, +@@ -336,7 +342,7 @@ ssize_t smr_generic_rma_inject(struct fid_ep *ep_fid, const void *buf, + + if (cmds == 1) { + ret = smr_rma_fast(peer_smr, cmd, &iov, 1, &rma_iov, 1, NULL, +- peer_id, NULL, ofi_op_write); ++ peer_id, NULL, ofi_op_write, flags); + goto commit; + } + +@@ -380,7 +386,8 @@ ssize_t smr_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, + rma_iov.key = key; + + return smr_generic_rma(ep, &iov, 1, &rma_iov, 1, &desc, dest_addr, context, +- ofi_op_write, data, FI_REMOTE_CQ_DATA); ++ ofi_op_write, data, ++ FI_REMOTE_CQ_DATA | smr_ep_tx_flags(ep)); + } + + ssize_t smr_rma_inject(struct fid_ep *ep_fid, const void *buf, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock.h +index fd4e215..51ece30 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock.h +@@ -64,7 +64,8 @@ + #ifndef _SOCK_H_ + #define _SOCK_H_ + +-#define SOCK_EP_MAX_MSG_SZ (SIZE_MAX - 4096) /* 4k allocated for all sockets headers */ ++/* 4k allocated for all sockets headers */ ++#define SOCK_EP_MAX_MSG_SZ (OFI_MAX_SOCKET_BUF_SIZE - 4096) + #define SOCK_EP_MAX_INJECT_SZ ((1<<8) - 1) + #define SOCK_EP_MAX_BUFF_RECV (1<<26) + #define SOCK_EP_MAX_ORDER_RAW_SZ SOCK_EP_MAX_MSG_SZ +@@ -104,6 +105,7 @@ + #define SOCK_EP_MAX_RETRY (5) + #define SOCK_EP_MAX_CM_DATA_SZ (256) + #define SOCK_CM_DEF_BACKLOG (128) ++#define SOCK_CM_DEF_TIMEOUT (15000) + #define SOCK_CM_DEF_RETRY (5) + #define SOCK_CM_CONN_IN_PROGRESS ((struct sock_conn *)(0x1L)) + +@@ -178,7 +180,7 @@ enum { + #define SOCK_MAJOR_VERSION 2 + #define SOCK_MINOR_VERSION 0 + +-#define SOCK_WIRE_PROTO_VERSION (1) ++#define SOCK_WIRE_PROTO_VERSION (2) + + struct sock_service_entry { + int service; +@@ -200,7 +202,7 @@ struct sock_conn { + int sock_fd; + int connected; + int address_published; +- struct sockaddr_in addr; ++ union ofi_sock_ip addr; + struct sock_pe_entry *rx_pe_entry; + struct sock_pe_entry *tx_pe_entry; + struct sock_ep_attr *ep_attr; +@@ -226,6 +228,15 @@ struct sock_conn_listener { + int do_listen; + }; + ++struct sock_ep_cm_head { ++ fi_epoll_t emap; ++ struct fd_signal signal; ++ fastlock_t signal_lock; ++ pthread_t listener_thread; ++ struct dlist_entry msg_list; ++ int do_listen; ++}; ++ + struct sock_domain { + struct fi_info info; + struct fid_domain dom_fid; +@@ -242,6 +253,7 @@ struct sock_domain { + struct dlist_entry dom_list_entry; + struct fi_domain_attr attr; + struct sock_conn_listener conn_listener; ++ struct sock_ep_cm_head cm_head; + }; + + /* move to fi_trigger.h when removing experimental tag from work queues */ +@@ -339,7 +351,7 @@ struct sock_mr { + }; + + struct sock_av_addr { +- struct sockaddr_storage addr; ++ union ofi_sock_ip addr; + uint8_t valid; + uint8_t reserved[7]; + }; +@@ -511,21 +523,28 @@ struct sock_comp { + struct sock_eq *eq; + }; + +-struct sock_cm_entry { ++enum sock_cm_state { ++ SOCK_CM_STATE_DISCONNECTED = 0, ++ SOCK_CM_STATE_REQUESTED, ++ SOCK_CM_STATE_CONNECTED, ++}; ++ ++struct sock_pep_cm_entry { + int sock; + int do_listen; + int signal_fds[2]; +- uint64_t next_msg_id; +- fastlock_t lock; +- int is_connected; + pthread_t listener_thread; +- struct dlist_entry msg_list; ++}; ++ ++struct sock_ep_cm_entry { ++ int sock; ++ fastlock_t lock; ++ enum sock_cm_state state; + }; + + struct sock_conn_handle { + int sock; + int do_listen; +- char service[NI_MAXSERV]; + }; + + struct sock_ep_attr { +@@ -556,15 +575,15 @@ struct sock_ep_attr { + struct fi_ep_attr ep_attr; + + enum fi_ep_type ep_type; +- struct sockaddr_in *src_addr; +- struct sockaddr_in *dest_addr; ++ union ofi_sock_ip *src_addr; ++ union ofi_sock_ip *dest_addr; + uint16_t msg_src_port; + uint16_t msg_dest_port; + + uint64_t peer_fid; + uint16_t key; + int is_enabled; +- struct sock_cm_entry cm; ++ struct sock_ep_cm_entry cm; + struct sock_conn_handle conn_handle; + fastlock_t lock; + +@@ -584,8 +603,9 @@ struct sock_pep { + struct fid_pep pep; + struct sock_fabric *sock_fab; + +- struct sock_cm_entry cm; +- struct sockaddr_in src_addr; ++ struct sock_ep_cm_head cm_head; ++ struct sock_pep_cm_entry cm; ++ union ofi_sock_ip src_addr; + struct fi_info info; + struct sock_eq *eq; + int name_set; +@@ -905,7 +925,7 @@ struct sock_conn_hdr { + + struct sock_conn_req { + struct sock_conn_hdr hdr; +- struct sockaddr_in src_addr; ++ union ofi_sock_ip src_addr; + uint64_t caps; + char cm_data[0]; + }; +@@ -917,22 +937,34 @@ enum { + SOCK_CONN_SHUTDOWN, + }; + ++enum sock_conn_handle_state { ++ SOCK_CONN_HANDLE_ACTIVE, ++ SOCK_CONN_HANDLE_ACCEPTED, ++ SOCK_CONN_HANDLE_REJECTED, ++ SOCK_CONN_HANDLE_DELETED, ++ SOCK_CONN_HANDLE_FINALIZING, ++ SOCK_CONN_HANDLE_FINALIZED, ++}; ++ + struct sock_conn_req_handle { + struct fid handle; + struct sock_conn_req *req; + int sock_fd; +- int is_accepted; ++ uint8_t monitored; ++ enum sock_conn_handle_state state; ++ pthread_mutex_t finalized_mutex; ++ pthread_cond_t finalized_cond; + struct sock_pep *pep; + struct sock_ep *ep; + size_t paramlen; +- pthread_t req_handler; +- struct sockaddr_in dest_addr; ++ union ofi_sock_ip dest_addr; + struct dlist_entry entry; + char cm_data[SOCK_EP_MAX_CM_DATA_SZ]; + }; + + struct sock_host_list_entry { +- char hostname[HOST_NAME_MAX]; ++ char ipstr[INET6_ADDRSTRLEN]; ++ union ofi_sock_ip ipaddr; + struct slist_entry entry; + }; + +@@ -987,9 +1019,10 @@ int sock_dgram_verify_ep_attr(const struct fi_ep_attr *ep_attr, + int sock_msg_verify_ep_attr(const struct fi_ep_attr *ep_attr, + const struct fi_tx_attr *tx_attr, + const struct fi_rx_attr *rx_attr); +-int sock_get_src_addr(struct sockaddr_in *dest_addr, +- struct sockaddr_in *src_addr); +-int sock_get_src_addr_from_hostname(struct sockaddr_in *src_addr, const char *service); ++int sock_get_src_addr(union ofi_sock_ip *dest_addr, ++ union ofi_sock_ip *src_addr); ++int sock_get_src_addr_from_hostname(union ofi_sock_ip *src_addr, ++ const char *service, uint16_t sa_family); + + struct fi_info *sock_fi_info(uint32_t version, enum fi_ep_type ep_type, + const struct fi_info *hints, void *src_addr, +@@ -1122,10 +1155,10 @@ int sock_wait_close(fid_t fid); + int sock_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + struct fid_av **av, void *context); + int sock_av_compare_addr(struct sock_av *av, fi_addr_t addr1, fi_addr_t addr2); +-int sock_av_get_addr_index(struct sock_av *av, struct sockaddr_in *addr); ++int sock_av_get_addr_index(struct sock_av *av, union ofi_sock_ip *addr); + + struct sock_conn *sock_ep_lookup_conn(struct sock_ep_attr *attr, fi_addr_t index, +- struct sockaddr_in *addr); ++ union ofi_sock_ip *addr); + int sock_ep_get_conn(struct sock_ep_attr *ep_attr, struct sock_tx_ctx *tx_ctx, + fi_addr_t index, struct sock_conn **pconn); + void sock_ep_remove_conn(struct sock_ep_attr *ep_attr, struct sock_conn *conn); +@@ -1221,4 +1254,11 @@ static inline size_t sock_rx_avail_len(struct sock_rx_entry *rx_entry) + return rx_entry->total_len - rx_entry->used; + } + ++int sock_ep_cm_start_thread(struct sock_ep_cm_head *cm_head); ++void sock_ep_cm_signal(struct sock_ep_cm_head *cm_head); ++void sock_ep_cm_signal_locked(struct sock_ep_cm_head *cm_head); ++void sock_ep_cm_stop_thread(struct sock_ep_cm_head *cm_head); ++void sock_ep_cm_wait_handle_finalized(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock_util.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock_util.h +index a4e4284..fc5c586 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock_util.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock_util.h +@@ -44,6 +44,7 @@ extern const char sock_dom_name[]; + extern const char sock_prov_name[]; + extern struct fi_provider sock_prov; + extern int sock_pe_waittime; ++extern int sock_conn_timeout; + extern int sock_conn_retry; + extern int sock_cm_def_map_sz; + extern int sock_av_def_sz; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_av.c +index 2fc025f..e2760e2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_av.c +@@ -63,7 +63,7 @@ + count * sizeof(struct sock_av_addr)) + #define SOCK_IS_SHARED_AV(av_name) ((av_name) ? 1 : 0) + +-int sock_av_get_addr_index(struct sock_av *av, struct sockaddr_in *addr) ++int sock_av_get_addr_index(struct sock_av *av, union ofi_sock_ip *addr) + { + int i; + struct sock_av_addr *av_addr; +@@ -73,7 +73,8 @@ int sock_av_get_addr_index(struct sock_av *av, struct sockaddr_in *addr) + if (!av_addr->valid) + continue; + +- if (ofi_equals_sockaddr(addr, (struct sockaddr_in *)&av_addr->addr)) ++ if (ofi_equals_sockaddr((const struct sockaddr *) addr, ++ (const struct sockaddr *) &av_addr->addr)) + return i; + } + SOCK_LOG_DBG("failed to get index in AV\n"); +@@ -98,8 +99,8 @@ int sock_av_compare_addr(struct sock_av *av, + av_addr1 = &av->table[index1]; + av_addr2 = &av->table[index2]; + +- return memcmp(&av_addr1->addr, &av_addr2->addr, +- sizeof(struct sockaddr_in)); ++ /* Return 0 if the addresses match */ ++ return !ofi_equals_sockaddr(&av_addr1->addr.sa, &av_addr2->addr.sa); + } + + static inline void sock_av_report_success(struct sock_av *av, void *context, +@@ -127,9 +128,9 @@ static inline void sock_av_report_error(struct sock_av *av, + context, index, err, -err, NULL, 0); + } + +-static int sock_av_is_valid_address(struct sockaddr_in *addr) ++static int sock_av_is_valid_address(const struct sockaddr *addr) + { +- return addr->sin_family == AF_INET ? 1 : 0; ++ return ofi_sizeofaddr(addr); + } + + static void sock_update_av_table(struct sock_av *_av, size_t count) +@@ -180,13 +181,13 @@ static int sock_av_get_next_index(struct sock_av *av) + return -1; + } + +-static int sock_check_table_in(struct sock_av *_av, struct sockaddr_in *addr, ++static int sock_check_table_in(struct sock_av *_av, const struct sockaddr *addr, + fi_addr_t *fi_addr, int count, uint64_t flags, + void *context) + { + int i, ret = 0; + uint64_t j; +- char sa_ip[INET_ADDRSTRLEN]; ++ char sa_ip[INET6_ADDRSTRLEN]; + struct sock_av_addr *av_addr; + int index; + +@@ -207,7 +208,7 @@ static int sock_check_table_in(struct sock_av *_av, struct sockaddr_in *addr, + + av_addr = &_av->table[j]; + if (memcmp(&av_addr->addr, &addr[i], +- sizeof(struct sockaddr_in)) == 0) { ++ ofi_sizeofaddr(&addr[i])) == 0) { + SOCK_LOG_DBG("Found addr in shared av\n"); + if (fi_addr) + fi_addr[i] = (fi_addr_t)j; +@@ -242,12 +243,13 @@ static int sock_check_table_in(struct sock_av *_av, struct sockaddr_in *addr, + } + + av_addr = &_av->table[index]; +- inet_ntop(addr[i].sin_family, &addr[i].sin_addr, sa_ip, INET_ADDRSTRLEN); ++ inet_ntop(addr[i].sa_family, ofi_get_ipaddr(&addr[i]), ++ sa_ip, sizeof sa_ip); + SOCK_LOG_DBG("AV-INSERT: dst_addr family: %d, IP %s, port: %d\n", +- ((struct sockaddr_in *)&addr[i])->sin_family, +- sa_ip, ntohs(((struct sockaddr_in *)&addr[i])->sin_port)); ++ (&addr[i])->sa_family, sa_ip, ++ ofi_addr_get_port(&addr[i])); + +- memcpy(&av_addr->addr, &addr[i], sizeof(struct sockaddr_in)); ++ memcpy(&av_addr->addr, &addr[i], ofi_sizeofaddr(&addr[i])); + if (fi_addr) + fi_addr[i] = (fi_addr_t)index; + +@@ -263,7 +265,7 @@ static int sock_av_insert(struct fid_av *av, const void *addr, size_t count, + { + struct sock_av *_av; + _av = container_of(av, struct sock_av, av_fid); +- return sock_check_table_in(_av, (struct sockaddr_in *)addr, ++ return sock_check_table_in(_av, (const struct sockaddr *) addr, + fi_addr, count, flags, context); + } + +@@ -298,6 +300,7 @@ static int _sock_av_insertsvc(struct fid_av *av, const char *node, + + _av = container_of(av, struct sock_av, av_fid); + memset(&sock_hints, 0, sizeof(struct addrinfo)); ++ /* Map all services to IPv4 addresses -- for compatibility */ + sock_hints.ai_family = AF_INET; + sock_hints.ai_socktype = SOCK_STREAM; + +@@ -310,7 +313,7 @@ static int _sock_av_insertsvc(struct fid_av *av, const char *node, + return -ret; + } + +- ret = sock_check_table_in(_av, (struct sockaddr_in *)result->ai_addr, ++ ret = sock_check_table_in(_av, result->ai_addr, + fi_addr, 1, flags, context); + freeaddrinfo(result); + return ret; +@@ -426,15 +429,16 @@ static int sock_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, + static const char *sock_av_straddr(struct fid_av *av, const void *addr, + char *buf, size_t *len) + { +- const struct sockaddr_in *sin; +- char straddr[24]; +- char ipaddr[24]; ++ const struct sockaddr *sa = addr; ++ char straddr[OFI_ADDRSTRLEN]; ++ char ipaddr[INET6_ADDRSTRLEN]; + int size; + +- sin = addr; +- inet_ntop(sin->sin_family, (void*)&sin->sin_addr, ipaddr, sizeof(ipaddr)); ++ if (!inet_ntop(sa->sa_family, ofi_get_ipaddr(sa), ipaddr, sizeof(ipaddr))) ++ return NULL; ++ + size = snprintf(straddr, sizeof(straddr), "%s:%d", +- ipaddr, ntohs(sin->sin_port)); ++ ipaddr, ofi_addr_get_port(sa)); + snprintf(buf, *len, "%s", straddr); + *len = size + 1; + return buf; +@@ -611,8 +615,11 @@ int sock_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + case FI_SOCKADDR_IN: + _av->addrlen = sizeof(struct sockaddr_in); + break; ++ case FI_SOCKADDR_IN6: ++ _av->addrlen = sizeof(struct sockaddr_in6); ++ break; + default: +- SOCK_LOG_ERROR("Invalid address format: only IPv4 supported\n"); ++ SOCK_LOG_ERROR("Invalid address format: only IP supported\n"); + ret = -FI_EINVAL; + goto err2; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_comm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_comm.c +index d5362db..10d5380 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_comm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_comm.c +@@ -55,9 +55,8 @@ static ssize_t sock_comm_send_socket(struct sock_conn *conn, + ret = 0; + } else if (ofi_sockerr() == EPIPE) { + conn->connected = 0; +- SOCK_LOG_DBG("Disconnected: %s:%d\n", +- inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); ++ SOCK_LOG_DBG("Disconnected port: %d\n", ++ ofi_addr_get_port(&conn->addr.sa)); + } else { + SOCK_LOG_DBG("write error: %s\n", + strerror(ofi_sockerr())); +@@ -136,9 +135,8 @@ static ssize_t sock_comm_recv_socket(struct sock_conn *conn, + ret = ofi_recv_socket(conn->sock_fd, buf, len, 0); + if (ret == 0) { + conn->connected = 0; +- SOCK_LOG_DBG("Disconnected: %s:%d\n", +- inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); ++ SOCK_LOG_DBG("Disconnected: port %d\n", ++ ofi_addr_get_port(&conn->addr.sa)); + return ret; + } + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_conn.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_conn.c +index 912f008..5f1c59d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_conn.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_conn.c +@@ -69,7 +69,7 @@ ssize_t sock_conn_send_src_addr(struct sock_ep_attr *ep_attr, struct sock_tx_ctx + SOCK_LOG_DBG("New conn msg on TX: %p using conn: %p\n", tx_ctx, conn); + + total_len = 0; +- tx_op.src_iov_len = sizeof(struct sockaddr_in); ++ tx_op.src_iov_len = sizeof(union ofi_sock_ip); + total_len = tx_op.src_iov_len + sizeof(struct sock_op_send); + + sock_tx_ctx_start(tx_ctx); +@@ -80,7 +80,10 @@ ssize_t sock_conn_send_src_addr(struct sock_ep_attr *ep_attr, struct sock_tx_ctx + + sock_tx_ctx_write_op_send(tx_ctx, &tx_op, 0, (uintptr_t) NULL, 0, 0, + ep_attr, conn); +- sock_tx_ctx_write(tx_ctx, ep_attr->src_addr, sizeof(struct sockaddr_in)); ++ ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "sending src addr: ", ++ ep_attr->src_addr); ++ sock_tx_ctx_write(tx_ctx, ep_attr->src_addr, sizeof(union ofi_sock_ip)); + sock_tx_ctx_commit(tx_ctx); + conn->address_published = 1; + return 0; +@@ -179,7 +182,7 @@ static int sock_conn_get_next_index(struct sock_conn_map *map) + } + + static struct sock_conn *sock_conn_map_insert(struct sock_ep_attr *ep_attr, +- struct sockaddr_in *addr, int conn_fd, ++ union ofi_sock_ip *addr, int conn_fd, + int addr_published) + { + int index; +@@ -207,7 +210,7 @@ static struct sock_conn *sock_conn_map_insert(struct sock_ep_attr *ep_attr, + (ep_attr->ep_type == FI_EP_MSG ? + SOCK_OPTS_KEEPALIVE : 0)); + +- if (fi_epoll_add(map->epoll_set, conn_fd, &map->table[index])) ++ if (fi_epoll_add(map->epoll_set, conn_fd, FI_EPOLL_IN, &map->table[index])) + SOCK_LOG_ERROR("failed to add to epoll set: %d\n", conn_fd); + + map->table[index].address_published = addr_published; +@@ -316,7 +319,7 @@ static void *sock_conn_listener_thread(void *arg) + void *ep_contexts[SOCK_EPOLL_WAIT_EVENTS]; + struct sock_ep_attr *ep_attr; + int num_fds, i, conn_fd; +- struct sockaddr_in remote; ++ union ofi_sock_ip remote; + socklen_t addr_size; + + while (conn_listener->do_listen) { +@@ -336,19 +339,20 @@ static void *sock_conn_listener_thread(void *arg) + continue; + } + ++ memset(&remote, 0, sizeof remote); + addr_size = sizeof(remote); +- conn_fd = accept(conn_handle->sock, (struct sockaddr *) &remote, ++ conn_fd = accept(conn_handle->sock, &remote.sa, + &addr_size); + SOCK_LOG_DBG("CONN: accepted conn-req: %d\n", conn_fd); ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, ++ "accepted peer addr: ", &remote.sa); ++ + if (conn_fd < 0) { + SOCK_LOG_ERROR("failed to accept: %s\n", + strerror(ofi_sockerr())); + continue; + } + +- SOCK_LOG_DBG("ACCEPT: %s, %d\n", inet_ntoa(remote.sin_addr), +- ntohs(remote.sin_port)); +- + ep_attr = container_of(conn_handle, struct sock_ep_attr, conn_handle); + fastlock_acquire(&ep_attr->cmap.lock); + sock_conn_map_insert(ep_attr, &remote, conn_fd, 1); +@@ -380,7 +384,8 @@ int sock_conn_start_listener_thread(struct sock_conn_listener *conn_listener) + } + + ret = fi_epoll_add(conn_listener->emap, +- conn_listener->signal.fd[FI_READ_FD], NULL); ++ conn_listener->signal.fd[FI_READ_FD], ++ FI_EPOLL_IN, NULL); + if (ret != 0){ + SOCK_LOG_ERROR("failed to add signal fd to epoll\n"); + goto err3; +@@ -407,99 +412,59 @@ err1: + + int sock_conn_listen(struct sock_ep_attr *ep_attr) + { +- struct addrinfo *s_res = NULL, *p; +- struct addrinfo hints = { 0 }; +- int listen_fd = 0, ret; ++ int listen_fd, ret; + socklen_t addr_size; +- struct sockaddr_in addr; ++ union ofi_sock_ip addr; + struct sock_conn_handle *conn_handle = &ep_attr->conn_handle; +- char service[NI_MAXSERV] = {0}; +- char *port; +- char ipaddr[24]; +- +- hints.ai_family = AF_INET; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_flags = AI_PASSIVE; +- +- memcpy(&addr, ep_attr->src_addr, sizeof(addr)); +- if (getnameinfo((void *)ep_attr->src_addr, sizeof(*ep_attr->src_addr), +- NULL, 0, conn_handle->service, +- sizeof(conn_handle->service), NI_NUMERICSERV)) { +- SOCK_LOG_ERROR("could not resolve src_addr\n"); +- return -FI_EINVAL; +- } + +- if (ep_attr->ep_type == FI_EP_MSG) { +- memset(conn_handle->service, 0, NI_MAXSERV); +- port = NULL; +- addr.sin_port = 0; +- } else +- port = conn_handle->service; +- +- inet_ntop(addr.sin_family, &addr.sin_addr, ipaddr, sizeof(ipaddr)); +- ret = getaddrinfo(ipaddr, port, &hints, &s_res); +- if (ret) { +- SOCK_LOG_ERROR("no available AF_INET address, service %s, %s\n", +- conn_handle->service, gai_strerror(ret)); +- return -FI_EINVAL; +- } ++ listen_fd = ofi_socket(ep_attr->src_addr->sa.sa_family, ++ SOCK_STREAM, IPPROTO_TCP); ++ if (listen_fd == INVALID_SOCKET) ++ return -ofi_sockerr(); + +- SOCK_LOG_DBG("Binding listener thread to port: %s\n", conn_handle->service); +- for (p = s_res; p; p = p->ai_next) { +- listen_fd = ofi_socket(p->ai_family, p->ai_socktype, p->ai_protocol); +- if (listen_fd >= 0) { +- sock_set_sockopts(listen_fd, SOCK_OPTS_NONBLOCK); ++ sock_set_sockopts(listen_fd, SOCK_OPTS_NONBLOCK); + +- if (!bind(listen_fd, s_res->ai_addr, s_res->ai_addrlen)) +- break; +- ofi_close_socket(listen_fd); +- listen_fd = -1; +- } +- } +- freeaddrinfo(s_res); ++ addr = *ep_attr->src_addr; ++ if (ep_attr->ep_type == FI_EP_MSG) ++ ofi_addr_set_port(&addr.sa, 0); + +- if (listen_fd < 0) { +- SOCK_LOG_ERROR("failed to listen to port: %s\n", +- conn_handle->service); ++ ret = bind(listen_fd, &addr.sa, ofi_sizeofaddr(&addr.sa)); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to bind listener: %s\n", ++ strerror(ofi_sockerr())); ++ ofi_straddr_log(&sock_prov, FI_LOG_WARN, FI_LOG_EP_CTRL, ++ "bind failed to addr: ", &addr.sa); ++ ret = -ofi_sockerr(); + goto err; + } + +- if (atoi(conn_handle->service) == 0) { +- addr_size = sizeof(addr); +- if (getsockname(listen_fd, (struct sockaddr *) &addr, +- &addr_size)) +- goto err; +- snprintf(conn_handle->service, sizeof(conn_handle->service), "%d", +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Bound to port: %s - %d\n", +- conn_handle->service, getpid()); +- ep_attr->msg_src_port = ntohs(addr.sin_port); ++ addr_size = sizeof(addr); ++ ret = ofi_getsockname(listen_fd, &addr.sa, &addr_size); ++ if (ret) { ++ ret = -ofi_sockerr(); ++ goto err; + } + +- if (ep_attr->src_addr->sin_addr.s_addr == 0) { +- snprintf(service, sizeof service, "%s", conn_handle->service); +- ret = sock_get_src_addr_from_hostname(ep_attr->src_addr, service); +- if (ret) +- goto err; +- } ++ ep_attr->msg_src_port = ofi_addr_get_port(&addr.sa); ++ if (!ofi_addr_get_port(&ep_attr->src_addr->sa)) ++ ofi_addr_set_port(&ep_attr->src_addr->sa, ep_attr->msg_src_port); + +- if (listen(listen_fd, sock_cm_def_map_sz)) { ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "listening at addr: ", ++ &addr.sa); ++ ret = listen(listen_fd, sock_cm_def_map_sz); ++ if (ret) { + SOCK_LOG_ERROR("failed to listen socket: %s\n", + strerror(ofi_sockerr())); ++ ret = -ofi_sockerr(); + goto err; + } + +- if (((struct sockaddr_in *) (ep_attr->src_addr))->sin_port == 0) { +- ((struct sockaddr_in *) (ep_attr->src_addr))->sin_port = +- htons(atoi(conn_handle->service)); +- } +- + conn_handle->sock = listen_fd; + conn_handle->do_listen = 1; + + fastlock_acquire(&ep_attr->domain->conn_listener.signal_lock); + ret = fi_epoll_add(ep_attr->domain->conn_listener.emap, +- conn_handle->sock, conn_handle); ++ conn_handle->sock, FI_EPOLL_IN, conn_handle); + fd_signal_set(&ep_attr->domain->conn_listener.signal); + fastlock_release(&ep_attr->domain->conn_listener.signal_lock); + if (ret) { +@@ -509,10 +474,13 @@ int sock_conn_listen(struct sock_ep_attr *ep_attr) + + return 0; + err: +- if (listen_fd >= 0) ++ if (listen_fd != INVALID_SOCKET) { + ofi_close_socket(listen_fd); ++ conn_handle->sock = INVALID_SOCKET; ++ conn_handle->do_listen = 0; ++ } + +- return -FI_EINVAL; ++ return ret; + } + + int sock_ep_connect(struct sock_ep_attr *ep_attr, fi_addr_t index, +@@ -521,7 +489,7 @@ int sock_ep_connect(struct sock_ep_attr *ep_attr, fi_addr_t index, + int conn_fd = -1, ret; + int do_retry = sock_conn_retry; + struct sock_conn *new_conn; +- struct sockaddr_in addr; ++ union ofi_sock_ip addr; + socklen_t lon; + int valopt = 0; + struct pollfd poll_fd; +@@ -531,9 +499,9 @@ int sock_ep_connect(struct sock_ep_attr *ep_attr, fi_addr_t index, + passed to endpoint */ + assert(ep_attr->dest_addr); + addr = *ep_attr->dest_addr; +- addr.sin_port = htons(ep_attr->msg_dest_port); ++ ofi_addr_set_port(&addr.sa, ep_attr->msg_dest_port); + } else { +- addr = *((struct sockaddr_in *)&ep_attr->av->table[index].addr); ++ addr = ep_attr->av->table[index].addr; + } + + do_connect: +@@ -544,7 +512,7 @@ do_connect: + if (*conn != SOCK_CM_CONN_IN_PROGRESS) + return FI_SUCCESS; + +- conn_fd = ofi_socket(AF_INET, SOCK_STREAM, 0); ++ conn_fd = ofi_socket(addr.sa.sa_family, SOCK_STREAM, 0); + if (conn_fd == -1) { + SOCK_LOG_ERROR("failed to create conn_fd, errno: %d\n", + ofi_sockerr()); +@@ -560,18 +528,15 @@ do_connect: + return -FI_EOTHER; + } + +- SOCK_LOG_DBG("Connecting to: %s:%d\n", inet_ntoa(addr.sin_addr), +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Connecting using address:%s\n", +- inet_ntoa(ep_attr->src_addr->sin_addr)); +- +- ret = connect(conn_fd, (struct sockaddr *) &addr, sizeof addr); ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "connecting to addr: ", ++ &addr.sa); ++ ret = connect(conn_fd, &addr.sa, ofi_sizeofaddr(&addr.sa)); + if (ret < 0) { + if (OFI_SOCK_TRY_CONN_AGAIN(ofi_sockerr())) { + poll_fd.fd = conn_fd; + poll_fd.events = POLLOUT; + +- ret = poll(&poll_fd, 1, 15 * 1000); ++ ret = poll(&poll_fd, 1, sock_conn_timeout); + if (ret < 0) { + SOCK_LOG_DBG("poll failed\n"); + goto retry; +@@ -590,22 +555,12 @@ do_connect: + SOCK_LOG_DBG("Error in connection() " + "%d - %s - %d\n", + valopt, strerror(valopt), conn_fd); +- SOCK_LOG_DBG("Connecting to: %s:%d\n", +- inet_ntoa(addr.sin_addr), +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Connecting using address:%s\n", +- inet_ntoa(ep_attr->src_addr->sin_addr)); + goto retry; + } + goto out; + } else { + SOCK_LOG_DBG("Timeout or error() - %s: %d\n", + strerror(ofi_sockerr()), conn_fd); +- SOCK_LOG_DBG("Connecting to: %s:%d\n", +- inet_ntoa(addr.sin_addr), +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Connecting using address:%s\n", +- inet_ntoa(ep_attr->src_addr->sin_addr)); + goto retry; + } + } else { +@@ -614,7 +569,6 @@ do_connect: + + retry: + do_retry--; +- sleep(10); + if (!do_retry) + goto err; + +@@ -625,10 +579,6 @@ retry: + + SOCK_LOG_ERROR("Connect error, retrying - %s - %d\n", + strerror(ofi_sockerr()), conn_fd); +- SOCK_LOG_DBG("Connecting to: %s:%d\n", inet_ntoa(addr.sin_addr), +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Connecting using address:%s\n", +- inet_ntoa(ep_attr->src_addr->sin_addr)); + goto do_connect; + + out: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_dom.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_dom.c +index d28baec..a78bf71 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_dom.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_dom.c +@@ -182,6 +182,7 @@ static int sock_dom_close(struct fid *fid) + return -FI_EBUSY; + + sock_conn_stop_listener_thread(&dom->conn_listener); ++ sock_ep_cm_stop_thread(&dom->cm_head); + + sock_pe_finalize(dom->pe); + fastlock_destroy(&dom->lock); +@@ -336,9 +337,15 @@ int sock_domain(struct fid_fabric *fabric, struct fi_info *info, + if (ret) + goto err2; + ++ ret = sock_ep_cm_start_thread(&sock_domain->cm_head); ++ if (ret) ++ goto err3; ++ + sock_dom_add_to_list(sock_domain); + return 0; + ++err3: ++ sock_conn_stop_listener_thread(&sock_domain->conn_listener); + err2: + sock_pe_finalize(sock_domain->pe); + err1: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep.c +index ff6f3fe..d6eb127 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep.c +@@ -644,8 +644,8 @@ static void sock_ep_clear_eq_list(struct dlistfd_head *list, + + static int sock_ep_close(struct fid *fid) + { ++ struct sock_conn_req_handle *handle; + struct sock_ep *sock_ep; +- char c = 0; + + switch (fid->fclass) { + case FI_CLASS_EP: +@@ -670,17 +670,14 @@ static int sock_ep_close(struct fid *fid) + return -FI_EBUSY; + + if (sock_ep->attr->ep_type == FI_EP_MSG) { +- sock_ep->attr->cm.do_listen = 0; +- if (ofi_write_socket(sock_ep->attr->cm.signal_fds[0], &c, 1) != 1) +- SOCK_LOG_DBG("Failed to signal\n"); +- +- if (sock_ep->attr->cm.listener_thread && +- pthread_join(sock_ep->attr->cm.listener_thread, NULL)) { +- SOCK_LOG_ERROR("pthread join failed (%d)\n", +- ofi_syserr()); ++ if (sock_ep->attr->info.handle) { ++ handle = container_of(sock_ep->attr->info.handle, ++ struct sock_conn_req_handle, handle); ++ sock_ep_cm_wait_handle_finalized(&sock_ep->attr->domain->cm_head, ++ handle); ++ free(handle->req); ++ free(handle); + } +- ofi_close_socket(sock_ep->attr->cm.signal_fds[0]); +- ofi_close_socket(sock_ep->attr->cm.signal_fds[1]); + } else { + if (sock_ep->attr->av) + ofi_atomic_dec32(&sock_ep->attr->av->ref); +@@ -1335,27 +1332,13 @@ int sock_srx_ctx(struct fid_domain *domain, + } + + #if HAVE_GETIFADDRS +-static int sock_get_prefix_len(uint32_t net_addr) +-{ +- uint32_t addr; +- int count = 0; +- +- addr = ntohl(net_addr); +- while (addr > 0) { +- addr = addr << 1; +- count++; +- } +- return count; +-} +- +-char *sock_get_fabric_name(struct sockaddr_in *src_addr) ++static char *sock_get_fabric_name(struct sockaddr *src_addr) + { + int ret; + struct ifaddrs *ifaddrs, *ifa; + char *fabric_name = NULL; +- struct in_addr net_in_addr; +- struct sockaddr_in *host_addr, *net_addr; +- char netbuf[SOCK_MAX_NETWORK_ADDR_SZ]; ++ union ofi_sock_ip net_in_addr; ++ char netbuf[OFI_ADDRSTRLEN]; + int prefix_len; + + ret = ofi_getifaddrs(&ifaddrs); +@@ -1363,20 +1346,32 @@ char *sock_get_fabric_name(struct sockaddr_in *src_addr) + return NULL; + + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { +- if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || +- (ifa->ifa_addr->sa_family != AF_INET)) ++ if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP)) + continue; +- if (ofi_equals_ipaddr((struct sockaddr_in *)ifa->ifa_addr, src_addr)) { +- host_addr = (struct sockaddr_in *)ifa->ifa_addr; +- net_addr = (struct sockaddr_in *)ifa->ifa_netmask; +- /* set fabric name to the network_adress in the format of a.b.c.d/e */ +- net_in_addr.s_addr = (uint32_t)((uint32_t) host_addr->sin_addr.s_addr & +- (uint32_t) net_addr->sin_addr.s_addr); +- inet_ntop(host_addr->sin_family, (void *)&(net_in_addr), netbuf, +- sizeof(netbuf)); +- prefix_len = sock_get_prefix_len(net_addr->sin_addr.s_addr); ++ ++ if (ofi_equals_ipaddr(ifa->ifa_addr, src_addr)) { ++ prefix_len = ofi_mask_addr(&net_in_addr.sa, ++ ifa->ifa_addr, ifa->ifa_netmask); ++ ++ switch (net_in_addr.sa.sa_family) { ++ case AF_INET: ++ inet_ntop(AF_INET, ++ &((struct sockaddr_in *)&net_in_addr)->sin_addr, ++ netbuf, sizeof(netbuf)); ++ break; ++ case AF_INET6: ++ inet_ntop(AF_INET6, ++ &((struct sockaddr_in6 *)&net_in_addr)->sin6_addr, ++ netbuf, sizeof(netbuf)); ++ break; ++ default: ++ snprintf(netbuf, sizeof(netbuf), "%s", ""); ++ netbuf[sizeof(netbuf)-1] = '\0'; ++ break; ++ } + snprintf(netbuf + strlen(netbuf), sizeof(netbuf) - strlen(netbuf), +- "%s%d", "/", prefix_len); ++ "%s%d", "/", prefix_len); ++ netbuf[sizeof(netbuf)-1] = '\0'; + fabric_name = strdup(netbuf); + goto out; + } +@@ -1386,7 +1381,7 @@ out: + return fabric_name; + } + +-char *sock_get_domain_name(struct sockaddr_in *src_addr) ++char *sock_get_domain_name(struct sockaddr *src_addr) + { + int ret; + struct ifaddrs *ifaddrs, *ifa; +@@ -1397,10 +1392,10 @@ char *sock_get_domain_name(struct sockaddr_in *src_addr) + return NULL; + + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { +- if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || +- (ifa->ifa_addr->sa_family != AF_INET)) ++ if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP)) + continue; +- if (ofi_equals_ipaddr((struct sockaddr_in *)ifa->ifa_addr, src_addr)) { ++ ++ if (ofi_equals_ipaddr(ifa->ifa_addr, src_addr)) { + domain_name = strdup(ifa->ifa_name); + goto out; + } +@@ -1410,12 +1405,12 @@ out: + return domain_name; + } + #else +-char *sock_get_fabric_name(struct sockaddr_in *src_addr) ++static char *sock_get_fabric_name(struct sockaddr *src_addr) + { + return NULL; + } + +-char *sock_get_domain_name(struct sockaddr_in *src_addr) ++char *sock_get_domain_name(struct sockaddr *src_addr) + { + return NULL; + } +@@ -1524,25 +1519,32 @@ struct fi_info *sock_fi_info(uint32_t version, enum fi_ep_type ep_type, + if (!info) + return NULL; + +- info->src_addr = calloc(1, sizeof(struct sockaddr_in)); ++ info->src_addr = calloc(1, sizeof(union ofi_sock_ip)); + if (!info->src_addr) + goto err; + + info->mode = SOCK_MODE; +- info->addr_format = FI_SOCKADDR_IN; + +- if (src_addr) +- memcpy(info->src_addr, src_addr, sizeof(struct sockaddr_in)); ++ if (src_addr) { ++ memcpy(info->src_addr, src_addr, ofi_sizeofaddr(src_addr)); ++ } else { ++ sock_get_src_addr_from_hostname(info->src_addr, NULL, ++ dest_addr ? ((struct sockaddr *) dest_addr)->sa_family : ++ ofi_get_sa_family(hints)); ++ } ++ ++ info->src_addrlen = ofi_sizeofaddr(info->src_addr); ++ if (info->src_addrlen == sizeof(struct sockaddr_in6)) ++ info->addr_format = FI_SOCKADDR_IN6; + else +- sock_get_src_addr_from_hostname(info->src_addr, NULL); +- info->src_addrlen = sizeof(struct sockaddr_in); ++ info->addr_format = FI_SOCKADDR_IN; + + if (dest_addr) { +- info->dest_addr = calloc(1, sizeof(struct sockaddr_in)); ++ info->dest_addr = calloc(1, sizeof(union ofi_sock_ip)); + if (!info->dest_addr) + goto err; +- info->dest_addrlen = sizeof(struct sockaddr_in); +- memcpy(info->dest_addr, dest_addr, sizeof(struct sockaddr_in)); ++ info->dest_addrlen = ofi_sizeofaddr(dest_addr); ++ memcpy(info->dest_addr, dest_addr, info->dest_addrlen); + } + + if (hints) { +@@ -1577,39 +1579,39 @@ err: + return NULL; + } + +-int sock_get_src_addr_from_hostname(struct sockaddr_in *src_addr, +- const char *service) ++int sock_get_src_addr_from_hostname(union ofi_sock_ip *src_addr, ++ const char *service, uint16_t sa_family) + { + int ret; + struct addrinfo ai, *rai = NULL; + char hostname[HOST_NAME_MAX]; + + memset(&ai, 0, sizeof(ai)); +- ai.ai_family = AF_INET; ++ ai.ai_family = sa_family; + ai.ai_socktype = SOCK_STREAM; + +- ofi_getnodename(hostname, sizeof(hostname)); ++ ofi_getnodename(sa_family, hostname, sizeof(hostname)); + ret = getaddrinfo(hostname, service, &ai, &rai); + if (ret) { + SOCK_LOG_DBG("getaddrinfo failed!\n"); + return -FI_EINVAL; + } +- memcpy(src_addr, (struct sockaddr_in *)rai->ai_addr, +- sizeof(*src_addr)); ++ memcpy(src_addr, rai->ai_addr, rai->ai_addrlen); + freeaddrinfo(rai); + return 0; + } + + static int sock_ep_assign_src_addr(struct sock_ep *sock_ep, struct fi_info *info) + { +- sock_ep->attr->src_addr = calloc(1, sizeof(struct sockaddr_in)); ++ sock_ep->attr->src_addr = calloc(1, sizeof(union ofi_sock_ip)); + if (!sock_ep->attr->src_addr) + return -FI_ENOMEM; + + if (info && info->dest_addr) + return sock_get_src_addr(info->dest_addr, sock_ep->attr->src_addr); + else +- return sock_get_src_addr_from_hostname(sock_ep->attr->src_addr, NULL); ++ return sock_get_src_addr_from_hostname(sock_ep->attr->src_addr, ++ NULL, 0); + } + + int sock_alloc_endpoint(struct fid_domain *domain, struct fi_info *info, +@@ -1681,23 +1683,25 @@ int sock_alloc_endpoint(struct fid_domain *domain, struct fi_info *info, + } + + if (info->src_addr) { +- sock_ep->attr->src_addr = calloc(1, sizeof(struct sockaddr_in)); ++ sock_ep->attr->src_addr = calloc(1, sizeof(*sock_ep-> ++ attr->src_addr)); + if (!sock_ep->attr->src_addr) { + ret = -FI_ENOMEM; + goto err2; + } + memcpy(sock_ep->attr->src_addr, info->src_addr, +- sizeof(struct sockaddr_in)); ++ info->src_addrlen); + } + + if (info->dest_addr) { +- sock_ep->attr->dest_addr = calloc(1, sizeof(struct sockaddr_in)); ++ sock_ep->attr->dest_addr = calloc(1, sizeof(*sock_ep-> ++ attr->dest_addr)); + if (!sock_ep->attr->dest_addr) { + ret = -FI_ENOMEM; + goto err2; + } + memcpy(sock_ep->attr->dest_addr, info->dest_addr, +- sizeof(struct sockaddr_in)); ++ info->dest_addrlen); + } + + if (info->tx_attr) { +@@ -1789,17 +1793,6 @@ int sock_alloc_endpoint(struct fid_domain *domain, struct fi_info *info, + + sock_ep->attr->domain = sock_dom; + fastlock_init(&sock_ep->attr->cm.lock); +- if (sock_ep->attr->ep_type == FI_EP_MSG) { +- dlist_init(&sock_ep->attr->cm.msg_list); +- if (socketpair(AF_UNIX, SOCK_STREAM, 0, +- sock_ep->attr->cm.signal_fds) < 0) { +- ret = -FI_EINVAL; +- goto err2; +- } +- +- if (fi_fd_nonblock(sock_ep->attr->cm.signal_fds[1])) +- SOCK_LOG_ERROR("fi_fd_nonblock failed"); +- } + + if (sock_conn_map_init(sock_ep, sock_cm_def_map_sz)) { + SOCK_LOG_ERROR("failed to init connection map\n"); +@@ -1828,7 +1821,7 @@ void sock_ep_remove_conn(struct sock_ep_attr *attr, struct sock_conn *conn) + } + + struct sock_conn *sock_ep_lookup_conn(struct sock_ep_attr *attr, fi_addr_t index, +- struct sockaddr_in *addr) ++ union ofi_sock_ip *addr) + { + int i; + uint16_t idx; +@@ -1847,7 +1840,7 @@ struct sock_conn *sock_ep_lookup_conn(struct sock_ep_attr *attr, fi_addr_t index + if (!attr->cmap.table[i].connected) + continue; + +- if (ofi_equals_sockaddr(&attr->cmap.table[i].addr, addr)) { ++ if (ofi_equals_sockaddr(&attr->cmap.table[i].addr.sa, &addr->sa)) { + conn = &attr->cmap.table[i]; + if (conn->av_index == FI_ADDR_NOTAVAIL) + conn->av_index = idx; +@@ -1863,13 +1856,13 @@ int sock_ep_get_conn(struct sock_ep_attr *attr, struct sock_tx_ctx *tx_ctx, + struct sock_conn *conn; + uint64_t av_index = (attr->ep_type == FI_EP_MSG) ? + 0 : (index & attr->av->mask); +- struct sockaddr_in *addr; ++ union ofi_sock_ip *addr; + int ret = FI_SUCCESS; + + if (attr->ep_type == FI_EP_MSG) + addr = attr->dest_addr; + else +- addr = (struct sockaddr_in *)&attr->av->table[av_index].addr; ++ addr = &attr->av->table[av_index].addr; + + fastlock_acquire(&attr->cmap.lock); + conn = sock_ep_lookup_conn(attr, av_index, addr); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep_msg.c +index 1455b90..6b84b40 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep_msg.c +@@ -255,104 +255,79 @@ static int sock_ep_cm_getname(fid_t fid, void *addr, size_t *addrlen) + struct sock_pep *sock_pep = NULL; + size_t len; + +- len = MIN(*addrlen, sizeof(struct sockaddr_in)); + switch (fid->fclass) { + case FI_CLASS_EP: + case FI_CLASS_SEP: + sock_ep = container_of(fid, struct sock_ep, ep.fid); + if (sock_ep->attr->is_enabled == 0) + return -FI_EOPBADSTATE; ++ ++ len = MIN(*addrlen, ofi_sizeofaddr(&sock_ep->attr->src_addr->sa)); + memcpy(addr, sock_ep->attr->src_addr, len); ++ *addrlen = ofi_sizeofaddr(&sock_ep->attr->src_addr->sa); + break; + case FI_CLASS_PEP: + sock_pep = container_of(fid, struct sock_pep, pep.fid); + if (!sock_pep->name_set) + return -FI_EOPBADSTATE; ++ ++ len = MIN(*addrlen, ofi_sizeofaddr(&sock_pep->src_addr.sa)); + memcpy(addr, &sock_pep->src_addr, len); ++ *addrlen = ofi_sizeofaddr(&sock_pep->src_addr.sa); + break; + default: + SOCK_LOG_ERROR("Invalid argument\n"); + return -FI_EINVAL; + } + +- *addrlen = sizeof(struct sockaddr_in); +- return (len == sizeof(struct sockaddr_in)) ? 0 : -FI_ETOOSMALL; ++ return (len == *addrlen) ? 0 : -FI_ETOOSMALL; + } + + static int sock_pep_create_listener(struct sock_pep *pep) + { + int ret; + socklen_t addr_size; +- struct sockaddr_in addr; +- struct addrinfo *s_res = NULL, *p; +- struct addrinfo hints; +- char sa_ip[INET_ADDRSTRLEN]; +- char sa_port[NI_MAXSERV]; + +- pep->cm.do_listen = 1; +- memset(&hints, 0, sizeof(hints)); +- hints.ai_family = AF_INET; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_flags = AI_PASSIVE; ++ pep->cm.sock = ofi_socket(pep->src_addr.sa.sa_family, ++ SOCK_STREAM, IPPROTO_TCP); ++ if (pep->cm.sock == INVALID_SOCKET) ++ return -ofi_sockerr(); + +- memcpy(sa_ip, inet_ntoa(pep->src_addr.sin_addr), INET_ADDRSTRLEN); +- sprintf(sa_port, "%d", ntohs(pep->src_addr.sin_port)); +- sa_ip[INET_ADDRSTRLEN - 1] = '\0'; +- sa_port[NI_MAXSERV - 1] = '\0'; ++ sock_set_sockopts(pep->cm.sock, SOCK_OPTS_NONBLOCK); + +- ret = getaddrinfo(sa_ip, sa_port, &hints, &s_res); ++ ret = bind(pep->cm.sock, &pep->src_addr.sa, ++ ofi_sizeofaddr(&pep->src_addr.sa)); + if (ret) { +- SOCK_LOG_ERROR("no available AF_INET address service:%s, %s\n", +- sa_port, gai_strerror(ret)); +- return -FI_EINVAL; +- } +- +- SOCK_LOG_DBG("binding pep listener to %s\n", sa_port); +- for (p = s_res; p; p = p->ai_next) { +- pep->cm.sock = ofi_socket(p->ai_family, p->ai_socktype, +- p->ai_protocol); +- if (pep->cm.sock >= 0) { +- sock_set_sockopts(pep->cm.sock, SOCK_OPTS_NONBLOCK); +- if (!bind(pep->cm.sock, s_res->ai_addr, s_res->ai_addrlen)) +- break; +- SOCK_LOG_ERROR("failed to bind listener: %s\n", +- strerror(ofi_sockerr())); +- ofi_close_socket(pep->cm.sock); +- pep->cm.sock = -1; +- } +- } +- +- freeaddrinfo(s_res); +- if (pep->cm.sock < 0) { +- SOCK_LOG_ERROR("failed to create listener: %s\n", ++ SOCK_LOG_ERROR("failed to bind listener: %s\n", + strerror(ofi_sockerr())); +- return -FI_EIO; +- } +- +- if (pep->src_addr.sin_port == 0) { +- addr_size = sizeof(addr); +- if (getsockname(pep->cm.sock, (struct sockaddr *)&addr, &addr_size)) +- return -FI_EINVAL; +- pep->src_addr.sin_port = addr.sin_port; +- sprintf(sa_port, "%d", ntohs(pep->src_addr.sin_port)); ++ ret = -ofi_sockerr(); ++ goto err; + } + +- if (pep->src_addr.sin_addr.s_addr == 0) { +- ret = sock_get_src_addr_from_hostname(&pep->src_addr, sa_port); +- if (ret) +- return -FI_EINVAL; ++ addr_size = sizeof(pep->src_addr); ++ if (ofi_getsockname(pep->cm.sock, &pep->src_addr.sa, &addr_size) == ++ SOCKET_ERROR) { ++ ret = -ofi_sockerr(); ++ goto err; + } + + if (listen(pep->cm.sock, sock_cm_def_map_sz)) { + SOCK_LOG_ERROR("failed to listen socket: %s\n", + strerror(ofi_sockerr())); +- return -ofi_sockerr(); ++ ret = -ofi_sockerr(); ++ goto err; + } + ++ pep->cm.do_listen = 1; + pep->name_set = 1; +- SOCK_LOG_DBG("Listener thread bound to %s:%d\n", +- sa_ip, ntohs(pep->src_addr.sin_port)); + return 0; ++err: ++ if (pep->cm.sock) { ++ ofi_close_socket(pep->cm.sock); ++ pep->cm.sock = INVALID_SOCKET; ++ } ++ ++ return ret; + } + + static int sock_ep_cm_setname(fid_t fid, void *addr, size_t addrlen) +@@ -360,7 +335,7 @@ static int sock_ep_cm_setname(fid_t fid, void *addr, size_t addrlen) + struct sock_ep *sock_ep = NULL; + struct sock_pep *sock_pep = NULL; + +- if (addrlen != sizeof(struct sockaddr_in)) ++ if (!addrlen || addrlen != ofi_sizeofaddr(addr)) + return -FI_EINVAL; + + switch (fid->fclass) { +@@ -389,10 +364,10 @@ static int sock_ep_cm_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) + size_t len; + + sock_ep = container_of(ep, struct sock_ep, ep); +- len = MIN(*addrlen, sizeof(struct sockaddr_in)); ++ len = MIN(*addrlen, ofi_sizeofaddr(&sock_ep->attr->dest_addr->sa)); + memcpy(addr, sock_ep->attr->dest_addr, len); +- *addrlen = sizeof(struct sockaddr_in); +- return (len == sizeof(struct sockaddr_in)) ? 0 : -FI_ETOOSMALL; ++ *addrlen = ofi_sizeofaddr(&sock_ep->attr->dest_addr->sa); ++ return (len == *addrlen) ? 0 : -FI_ETOOSMALL; + } + + static int sock_cm_send(int fd, const void *buf, int len) +@@ -431,106 +406,175 @@ static int sock_cm_recv(int fd, void *buf, int len) + return 0; + } + +-static void sock_ep_wait_shutdown(struct sock_ep *ep) ++static void sock_ep_cm_monitor_handle(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle, ++ uint32_t events) + { +- int ret, do_report = 0; +- char tmp = 0; +- struct pollfd poll_fds[2]; +- struct sock_conn_hdr msg; +- struct fi_eq_cm_entry cm_entry = {0}; ++ int ret; + +- poll_fds[0].fd = ep->attr->cm.sock; +- poll_fds[1].fd = ep->attr->cm.signal_fds[1]; +- poll_fds[0].events = poll_fds[1].events = POLLIN; ++ fastlock_acquire(&cm_head->signal_lock); ++ if (handle->monitored) ++ goto unlock; + +- while (*((volatile int*) &ep->attr->cm.do_listen)) { +- ret = poll(poll_fds, 2, -1); +- if (ret > 0) { +- if (poll_fds[1].revents & POLLIN) { +- ret = ofi_read_socket(ep->attr->cm.signal_fds[1], &tmp, 1); +- if (ret != 1) { +- SOCK_LOG_DBG("Invalid signal\n"); +- break; +- } +- continue; +- } +- } else { +- break; +- } ++ /* Mark the handle as monitored before adding it to the pollset */ ++ handle->monitored = 1; ++ ret = fi_epoll_add(cm_head->emap, handle->sock_fd, ++ events, handle); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to monitor fd %d: %d\n", ++ handle->sock_fd, ret); ++ handle->monitored = 0; ++ } else { ++ fd_signal_set(&cm_head->signal); ++ } ++unlock: ++ fastlock_release(&cm_head->signal_lock); ++} + +- if (sock_cm_recv(ep->attr->cm.sock, &msg, sizeof(msg))) +- break; ++static void ++sock_ep_cm_unmonitor_handle_locked(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle, ++ int close_socket) ++{ ++ int ret; + +- if (msg.type == SOCK_CONN_SHUTDOWN) +- break; ++ if (handle->monitored) { ++ ret = fi_epoll_del(cm_head->emap, handle->sock_fd); ++ if (ret) ++ SOCK_LOG_ERROR("failed to unmonitor fd %d: %d\n", ++ handle->sock_fd, ret); ++ handle->monitored = 0; ++ } ++ ++ /* Multiple threads might call sock_ep_cm_unmonitor_handle() at the ++ * same time. Some caution is required to prevent a socket from being ++ * close concurrently, which could cause an unexpected socket to be ++ * closed by mistake. */ ++ if (close_socket && handle->sock_fd != INVALID_SOCKET) { ++ ofi_close_socket(handle->sock_fd); ++ handle->sock_fd = INVALID_SOCKET; + } ++} ++ ++static void sock_ep_cm_unmonitor_handle(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle, ++ int close_socket) ++{ ++ fastlock_acquire(&cm_head->signal_lock); ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, close_socket); ++ fastlock_release(&cm_head->signal_lock); ++} ++ ++static void sock_ep_cm_shutdown_report(struct sock_ep *ep, int send_shutdown) ++{ ++ struct fi_eq_cm_entry cm_entry = {0}; ++ struct sock_conn_hdr msg = {0}; ++ enum sock_cm_state old_state; + + fastlock_acquire(&ep->attr->cm.lock); +- if (ep->attr->cm.is_connected) { +- do_report = 1; +- ep->attr->cm.is_connected = 0; ++ old_state = ep->attr->cm.state; ++ switch (ep->attr->cm.state) { ++ case SOCK_CM_STATE_REQUESTED: ++ /* fallthrough */ ++ case SOCK_CM_STATE_CONNECTED: ++ ep->attr->cm.state = SOCK_CM_STATE_DISCONNECTED; ++ break; ++ case SOCK_CM_STATE_DISCONNECTED: ++ /* Nothing to do, already disconnected */ ++ break; ++ default: ++ assert(0); ++ break; + } + fastlock_release(&ep->attr->cm.lock); + +- if (do_report) { ++ switch (old_state) { ++ case SOCK_CM_STATE_CONNECTED: ++ if (send_shutdown) { ++ msg.type = SOCK_CONN_SHUTDOWN; ++ if (sock_cm_send(ep->attr->cm.sock, &msg, sizeof(msg))) ++ SOCK_LOG_DBG("failed to send shutdown msg\n"); ++ } ++ + cm_entry.fid = &ep->ep.fid; + SOCK_LOG_DBG("reporting FI_SHUTDOWN\n"); + if (sock_eq_report_event(ep->attr->eq, FI_SHUTDOWN, + &cm_entry, sizeof(cm_entry), 0)) + SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ break; ++ case SOCK_CM_STATE_REQUESTED: ++ SOCK_LOG_DBG("reporting FI_REJECT\n"); ++ if (sock_eq_report_error(ep->attr->eq, &ep->ep.fid, NULL, 0, ++ FI_ECONNREFUSED, -FI_ECONNREFUSED, ++ NULL, 0)) ++ SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ break; ++ ++ case SOCK_CM_STATE_DISCONNECTED: ++ /* Nothing to do, already disconnected */ ++ break; ++ default: ++ assert(0); ++ break; + } +- ofi_close_socket(ep->attr->cm.sock); ++} ++ ++static void sock_ep_cm_shutdown_handler(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_hdr *hdr, ++ struct sock_conn_req_handle *handle) ++{ ++ struct sock_ep *ep = handle->ep; ++ assert(ep); ++ ++ assert(hdr->type == SOCK_CONN_SHUTDOWN); ++ sock_ep_cm_shutdown_report(ep, 0); ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 1); + } + + static void sock_ep_cm_report_connect_fail(struct sock_ep *ep, + void *param, size_t paramlen) + { +- SOCK_LOG_DBG("reporting FI_REJECT\n"); +- if (sock_eq_report_error(ep->attr->eq, &ep->ep.fid, NULL, 0, +- FI_ECONNREFUSED, -FI_ECONNREFUSED, +- param, paramlen)) +- SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ int do_report = 0; ++ ++ fastlock_acquire(&ep->attr->cm.lock); ++ if (ep->attr->cm.state == SOCK_CM_STATE_REQUESTED) { ++ do_report = 1; ++ ep->attr->cm.state = SOCK_CM_STATE_DISCONNECTED; ++ } ++ fastlock_release(&ep->attr->cm.lock); ++ ++ if (do_report) { ++ SOCK_LOG_DBG("reporting FI_REJECT\n"); ++ if (sock_eq_report_error(ep->attr->eq, &ep->ep.fid, NULL, 0, ++ FI_ECONNREFUSED, -FI_ECONNREFUSED, ++ param, paramlen)) ++ SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ } + } + +-static void *sock_ep_cm_connect_handler(void *data) ++/* Caller must hold `cm_head::signal_lock` */ ++static void sock_ep_cm_add_to_msg_list(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle) + { +- int sock_fd, ret; +- struct sock_conn_req_handle *handle = data; +- struct sock_conn_req *req = handle->req; +- struct sock_conn_hdr response; ++ dlist_insert_tail(&handle->entry, &cm_head->msg_list); ++ fd_signal_set(&cm_head->signal); ++} ++ ++static void sock_ep_cm_connect_handler(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_hdr *hdr, ++ struct sock_conn_req_handle *handle) ++{ ++ int sock_fd = handle->sock_fd; + struct sock_ep *ep = handle->ep; + void *param = NULL; + struct fi_eq_cm_entry *cm_entry = NULL; + int cm_data_sz, response_port; + +- sock_fd = ofi_socket(AF_INET, SOCK_STREAM, 0); +- if (sock_fd < 0) { +- SOCK_LOG_ERROR("no socket\n"); +- sock_ep_cm_report_connect_fail(handle->ep, NULL, 0); +- goto out; +- } +- +- ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "Connecting to address", +- &handle->dest_addr); +- sock_set_sockopts(sock_fd, SOCK_OPTS_KEEPALIVE); +- ret = connect(sock_fd, (struct sockaddr *)&handle->dest_addr, +- sizeof(handle->dest_addr)); +- if (ret < 0) { +- SOCK_LOG_ERROR("connect failed : %s\n", +- strerror(ofi_sockerr())); +- goto err; +- } +- +- if (sock_cm_send(sock_fd, req, sizeof(*req))) +- goto err; +- if (handle->paramlen && sock_cm_send(sock_fd, handle->cm_data, handle->paramlen)) +- goto err; +- +- if (sock_cm_recv(sock_fd, &response, sizeof(response))) +- goto err; ++ assert(hdr->type == SOCK_CONN_ACCEPT ++ || hdr->type == SOCK_CONN_REJECT); + +- cm_data_sz = ntohs(response.cm_data_sz); +- response_port = ntohs(response.port); ++ cm_data_sz = ntohs(hdr->cm_data_sz); ++ response_port = ntohs(hdr->port); + if (cm_data_sz) { + param = calloc(1, cm_data_sz); + if (!param) +@@ -540,9 +584,9 @@ static void *sock_ep_cm_connect_handler(void *data) + goto err; + } + +- if (response.type == SOCK_CONN_REJECT) { ++ if (hdr->type == SOCK_CONN_REJECT) { + sock_ep_cm_report_connect_fail(handle->ep, param, cm_data_sz); +- ofi_close_socket(sock_fd); ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 1); + } else { + cm_entry = calloc(1, sizeof(*cm_entry) + SOCK_EP_MAX_CM_DATA_SZ); + if (!cm_entry) +@@ -550,8 +594,7 @@ static void *sock_ep_cm_connect_handler(void *data) + + cm_entry->fid = &ep->ep.fid; + memcpy(&cm_entry->data, param, cm_data_sz); +- ep->attr->cm.is_connected = 1; +- ep->attr->cm.do_listen = 1; ++ ep->attr->cm.state = SOCK_CM_STATE_CONNECTED; + ep->attr->cm.sock = sock_fd; + ep->attr->msg_dest_port = response_port; + SOCK_LOG_DBG("got accept - port: %d\n", response_port); +@@ -560,26 +603,43 @@ static void *sock_ep_cm_connect_handler(void *data) + if (sock_eq_report_event(ep->attr->eq, FI_CONNECTED, cm_entry, + sizeof(*cm_entry) + cm_data_sz, 0)) + SOCK_LOG_ERROR("Error in writing to EQ\n"); +- sock_ep_wait_shutdown(ep); + } + goto out; + err: + SOCK_LOG_ERROR("io failed : %s\n", strerror(ofi_sockerr())); + sock_ep_cm_report_connect_fail(handle->ep, NULL, 0); +- ofi_close_socket(sock_fd); ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 1); ++ handle->ep->attr->info.handle = NULL; ++ /* Register handle for later deletion */ ++ handle->state = SOCK_CONN_HANDLE_DELETED; ++ /* `cm_head::signal_lock` has already been held ++ * in `sock_ep_cm_thread` function */ ++ sock_ep_cm_add_to_msg_list(cm_head, handle); + out: + free(param); + free(cm_entry); +- free(handle->req); +- free(handle); +- return NULL; ++} ++ ++static struct sock_conn_req_handle *sock_ep_cm_new_handle(void) ++{ ++ struct sock_conn_req_handle *handle; ++ ++ handle = calloc(1, sizeof(*handle)); ++ if (handle) { ++ pthread_mutex_init(&handle->finalized_mutex, NULL); ++ pthread_cond_init(&handle->finalized_cond, NULL); ++ handle->state = SOCK_CONN_HANDLE_ACTIVE; ++ } ++ return handle; + } + + static int sock_ep_cm_connect(struct fid_ep *ep, const void *addr, + const void *param, size_t paramlen) + { + struct sock_conn_req *req = NULL; ++ struct sock_ep_cm_head *cm_head = NULL; + struct sock_conn_req_handle *handle = NULL; ++ int sock_fd, ret; + struct sock_ep *_ep; + struct sock_eq *_eq; + +@@ -596,23 +656,28 @@ static int sock_ep_cm_connect(struct fid_ep *ep, const void *addr, + if (!_ep->attr->dest_addr) + return -FI_ENOMEM; + } +- memcpy(_ep->attr->dest_addr, addr, sizeof(*_ep->attr->dest_addr)); ++ memcpy(_ep->attr->dest_addr, addr, ofi_sizeofaddr(addr)); + + req = calloc(1, sizeof(*req)); + if (!req) + return -FI_ENOMEM; + +- handle = calloc(1, sizeof(*handle)); +- if (!handle) +- goto out; ++ handle = sock_ep_cm_new_handle(); ++ if (!handle) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } + + req->hdr.type = SOCK_CONN_REQ; + req->hdr.port = htons(_ep->attr->msg_src_port); + req->hdr.cm_data_sz = htons(paramlen); + req->caps = _ep->attr->info.caps; +- memcpy(&req->src_addr, _ep->attr->src_addr, sizeof(req->src_addr)); +- memcpy(&handle->dest_addr, addr, sizeof(handle->dest_addr)); ++ memcpy(&req->src_addr, _ep->attr->src_addr, ++ ofi_sizeofaddr(&_ep->attr->src_addr->sa)); ++ memcpy(&handle->dest_addr, addr, ofi_sizeofaddr(addr)); + ++ cm_head = &_ep->attr->domain->cm_head; ++ _ep->attr->info.handle = (void*) handle; + handle->ep = _ep; + handle->req = req; + if (paramlen) { +@@ -620,67 +685,59 @@ static int sock_ep_cm_connect(struct fid_ep *ep, const void *addr, + memcpy(handle->cm_data, param, paramlen); + } + +- if (_ep->attr->cm.listener_thread && +- pthread_join(_ep->attr->cm.listener_thread, NULL)) +- SOCK_LOG_DBG("failed to join cm listener\n"); +- +- if (pthread_create(&_ep->attr->cm.listener_thread, NULL, +- sock_ep_cm_connect_handler, handle)) { +- SOCK_LOG_ERROR("failed to create cm thread\n"); +- goto out; ++ sock_fd = ofi_socket(handle->dest_addr.sa.sa_family, SOCK_STREAM, 0); ++ if (sock_fd < 0) { ++ SOCK_LOG_ERROR("no socket\n"); ++ ret = -ofi_sockerr(); ++ goto err; + } +- return 0; +-out: +- free(req); +- free(handle); +- return -FI_ENOMEM; +-} +- +-static void *sock_cm_accept_handler(void *data) +-{ +- int ret; +- struct sock_conn_hdr reply; +- struct sock_conn_req_handle *hreq = data; +- struct sock_ep_attr *ep_attr; +- struct fi_eq_cm_entry cm_entry; +- +- ep_attr = hreq->ep->attr; +- ep_attr->msg_dest_port = ntohs(hreq->req->hdr.port); + +- reply.type = SOCK_CONN_ACCEPT; +- reply.port = htons(ep_attr->msg_src_port); +- reply.cm_data_sz = htons(hreq->paramlen); +- ret = sock_cm_send(hreq->sock_fd, &reply, sizeof(reply)); +- if (ret) { +- SOCK_LOG_ERROR("failed to reply\n"); +- return NULL; ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "Connecting to address", ++ &handle->dest_addr); ++ sock_set_sockopts(sock_fd, SOCK_OPTS_KEEPALIVE); ++ ret = connect(sock_fd, &handle->dest_addr.sa, ++ ofi_sizeofaddr(&handle->dest_addr.sa)); ++ if (ret < 0) { ++ SOCK_LOG_ERROR("connect failed : %s\n", ++ strerror(ofi_sockerr())); ++ ret = -ofi_sockerr(); ++ goto close_socket; + } + +- if (hreq->paramlen && sock_cm_send(hreq->sock_fd, hreq->cm_data, hreq->paramlen)) { +- SOCK_LOG_ERROR("failed to send userdata\n"); +- return NULL; ++ ret = sock_cm_send(sock_fd, req, sizeof(*req)); ++ if (ret) ++ goto close_socket; ++ ++ if (handle->paramlen) { ++ ret = sock_cm_send(sock_fd, handle->cm_data, handle->paramlen); ++ if (ret) ++ goto close_socket; + } + +- cm_entry.fid = &hreq->ep->ep.fid; +- SOCK_LOG_DBG("reporting FI_CONNECTED\n"); +- if (sock_eq_report_event(ep_attr->eq, FI_CONNECTED, &cm_entry, +- sizeof(cm_entry), 0)) +- SOCK_LOG_ERROR("Error in writing to EQ\n"); +- ep_attr->cm.is_connected = 1; +- ep_attr->cm.do_listen = 1; +- ep_attr->cm.sock = hreq->sock_fd; +- sock_ep_wait_shutdown(hreq->ep); ++ /* Monitor the connection */ ++ _ep->attr->cm.state = SOCK_CM_STATE_REQUESTED; ++ handle->sock_fd = sock_fd; ++ sock_ep_cm_monitor_handle(cm_head, handle, FI_EPOLL_IN); + +- if (pthread_join(hreq->req_handler, NULL)) +- SOCK_LOG_DBG("failed to join req-handler\n"); +- free(hreq->req); +- free(hreq); +- return NULL; ++ return 0; ++close_socket: ++ SOCK_LOG_ERROR("io failed : %s\n", strerror(errno)); ++ ofi_close_socket(sock_fd); ++err: ++ _ep->attr->info.handle = NULL; ++ free(req); ++ free(handle); ++ return ret; + } + + static int sock_ep_cm_accept(struct fid_ep *ep, const void *param, size_t paramlen) + { ++ int ret; ++ struct sock_ep_cm_head *cm_head = NULL; + struct sock_conn_req_handle *handle; ++ struct sock_ep_attr *ep_attr; ++ struct fi_eq_cm_entry cm_entry; ++ struct sock_conn_hdr reply; + struct sock_ep *_ep; + + _ep = container_of(ep, struct sock_ep, ep); +@@ -699,49 +756,56 @@ static int sock_ep_cm_accept(struct fid_ep *ep, const void *param, size_t paraml + + handle->ep = _ep; + handle->paramlen = 0; +- handle->is_accepted = 1; ++ handle->state = SOCK_CONN_HANDLE_ACCEPTED; + if (paramlen) { + handle->paramlen = paramlen; + memcpy(handle->cm_data, param, paramlen); + } ++ cm_head = &_ep->attr->domain->cm_head; ++ ep_attr = handle->ep->attr; ++ ep_attr->msg_dest_port = ntohs(handle->req->hdr.port); + +- if (_ep->attr->cm.listener_thread && +- pthread_join(_ep->attr->cm.listener_thread, NULL)) +- SOCK_LOG_DBG("failed to join cm listener\n"); ++ reply.type = SOCK_CONN_ACCEPT; ++ reply.port = htons(ep_attr->msg_src_port); ++ reply.cm_data_sz = htons(handle->paramlen); ++ ret = sock_cm_send(handle->sock_fd, &reply, sizeof(reply)); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to reply\n"); ++ return ret; ++ } + +- if (pthread_create(&_ep->attr->cm.listener_thread, NULL, +- sock_cm_accept_handler, handle)) { +- SOCK_LOG_ERROR("Couldnt create accept handler\n"); +- return -FI_ENOMEM; ++ if (handle->paramlen) { ++ ret = sock_cm_send(handle->sock_fd, handle->cm_data, handle->paramlen); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to send userdata\n"); ++ return ret; ++ } + } ++ /* Monitor the handle prior to report the event */ ++ sock_ep_cm_monitor_handle(cm_head, handle, FI_EPOLL_IN); ++ sock_ep_enable(ep); ++ ++ memset(&cm_entry, 0, sizeof(cm_entry)); ++ cm_entry.fid = &handle->ep->ep.fid; ++ SOCK_LOG_DBG("reporting FI_CONNECTED\n"); ++ if (sock_eq_report_event(ep_attr->eq, FI_CONNECTED, &cm_entry, ++ sizeof(cm_entry), 0)) ++ SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ ep_attr->cm.state = SOCK_CM_STATE_CONNECTED; ++ ep_attr->cm.sock = handle->sock_fd; ++ + return 0; + } + + static int sock_ep_cm_shutdown(struct fid_ep *ep, uint64_t flags) + { + struct sock_ep *_ep; +- struct fi_eq_cm_entry cm_entry = {0}; +- struct sock_conn_hdr msg = {0}; +- char c = 0; + + _ep = container_of(ep, struct sock_ep, ep); +- fastlock_acquire(&_ep->attr->cm.lock); +- if (_ep->attr->cm.is_connected) { +- msg.type = SOCK_CONN_SHUTDOWN; +- if (sock_cm_send(_ep->attr->cm.sock, &msg, sizeof(msg))) +- SOCK_LOG_DBG("failed to send shutdown msg\n"); +- _ep->attr->cm.is_connected = 0; +- _ep->attr->cm.do_listen = 0; +- if (ofi_write_socket(_ep->attr->cm.signal_fds[0], &c, 1) != 1) +- SOCK_LOG_DBG("Failed to signal\n"); +- +- cm_entry.fid = &_ep->ep.fid; +- SOCK_LOG_DBG("reporting FI_SHUTDOWN\n"); +- if (sock_eq_report_event(_ep->attr->eq, FI_SHUTDOWN, +- &cm_entry, sizeof(cm_entry), 0)) +- SOCK_LOG_ERROR("Error in writing to EQ\n"); +- } +- fastlock_release(&_ep->attr->cm.lock); ++ sock_ep_cm_shutdown_report(_ep, 1); ++ ++ ofi_close_socket(_ep->attr->cm.sock); ++ _ep->attr->cm.sock = INVALID_SOCKET; + sock_ep_disable(ep); + return 0; + } +@@ -858,9 +922,10 @@ static int sock_pep_fi_close(fid_t fid) + SOCK_LOG_DBG("pthread join failed\n"); + } + ++ sock_ep_cm_stop_thread(&pep->cm_head); ++ + ofi_close_socket(pep->cm.signal_fds[0]); + ofi_close_socket(pep->cm.signal_fds[1]); +- fastlock_destroy(&pep->cm.lock); + + free(pep); + return 0; +@@ -893,15 +958,107 @@ static struct fi_info *sock_ep_msg_get_info(struct sock_pep *pep, + &hints, &pep->src_addr, &req->src_addr); + } + +-static void *sock_pep_req_handler(void *data) ++void sock_ep_cm_signal(struct sock_ep_cm_head *cm_head) ++{ ++ fastlock_acquire(&cm_head->signal_lock); ++ fd_signal_set(&cm_head->signal); ++ fastlock_release(&cm_head->signal_lock); ++} ++ ++static void sock_ep_cm_process_rejected(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *hreq) ++{ ++ struct sock_conn_hdr reply; ++ ++ reply.type = SOCK_CONN_REJECT; ++ reply.cm_data_sz = htons(hreq->paramlen); ++ ++ SOCK_LOG_DBG("sending reject message\n"); ++ if (sock_cm_send(hreq->sock_fd, &reply, sizeof(reply))) { ++ SOCK_LOG_ERROR("failed to reply\n"); ++ goto free_handle; ++ } ++ ++ if (hreq->paramlen && sock_cm_send(hreq->sock_fd, hreq->cm_data, ++ hreq->paramlen)) { ++ SOCK_LOG_ERROR("failed to send userdata\n"); ++ goto free_handle; ++ } ++ ++free_handle: ++ sock_ep_cm_unmonitor_handle(cm_head, hreq, 1); ++ free(hreq->req); ++ free(hreq); ++} ++ ++static void sock_ep_cm_process_deleted(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *hreq) ++{ ++ free(hreq->req); ++ free(hreq); ++} ++ ++static void sock_ep_cm_process_finalizing(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *hreq) ++{ ++ sock_ep_cm_unmonitor_handle(cm_head, hreq, 1); ++ ++ pthread_mutex_lock(&hreq->finalized_mutex); ++ hreq->state = SOCK_CONN_HANDLE_FINALIZED; ++ pthread_cond_signal(&hreq->finalized_cond); ++ pthread_mutex_unlock(&hreq->finalized_mutex); ++} ++ ++static struct sock_conn_req_handle * ++sock_ep_cm_pop_from_msg_list(struct sock_ep_cm_head *cm_head) ++{ ++ struct dlist_entry *entry; ++ struct sock_conn_req_handle *hreq = NULL; ++ ++ fastlock_acquire(&cm_head->signal_lock); ++ if (!dlist_empty(&cm_head->msg_list)) { ++ entry = cm_head->msg_list.next; ++ dlist_remove(entry); ++ hreq = container_of(entry, struct sock_conn_req_handle, entry); ++ } ++ fastlock_release(&cm_head->signal_lock); ++ return hreq; ++} ++ ++static void ++sock_ep_cm_check_closing_rejected_list(struct sock_ep_cm_head *cm_head) ++{ ++ struct sock_conn_req_handle *hreq; ++ ++ while ((hreq = sock_ep_cm_pop_from_msg_list(cm_head)) != NULL) { ++ switch (hreq->state) { ++ case SOCK_CONN_HANDLE_REJECTED: ++ sock_ep_cm_process_rejected(cm_head, hreq); ++ break; ++ case SOCK_CONN_HANDLE_FINALIZING: ++ sock_ep_cm_process_finalizing(cm_head, hreq); ++ break; ++ case SOCK_CONN_HANDLE_DELETED: ++ sock_ep_cm_process_deleted(cm_head, hreq); ++ break; ++ default: ++ assert(0); ++ break; ++ } ++ } ++} ++ ++static void sock_pep_req_handler(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_hdr *hdr, ++ struct sock_conn_req_handle *handle) + { + int ret, entry_sz; + struct fi_info *info; + struct sock_conn_req *conn_req = NULL; + struct fi_eq_cm_entry *cm_entry = NULL; +- struct sock_conn_req_handle *handle = data; + int req_cm_data_sz; +- char c = 0; ++ ++ assert(hdr->type == SOCK_CONN_REQ); + + conn_req = calloc(1, sizeof(*conn_req) + SOCK_EP_MAX_CM_DATA_SZ); + if (!conn_req) { +@@ -909,7 +1066,11 @@ static void *sock_pep_req_handler(void *data) + goto err; + } + +- ret = sock_cm_recv(handle->sock_fd, conn_req, sizeof(*conn_req)); ++ memcpy(&conn_req->hdr, hdr, sizeof(*hdr)); ++ ++ ret = sock_cm_recv(handle->sock_fd, ++ &conn_req->src_addr, ++ sizeof(*conn_req) - sizeof(struct sock_conn_hdr)); + if (ret) { + SOCK_LOG_ERROR("IO failed\n"); + goto err; +@@ -926,16 +1087,15 @@ static void *sock_pep_req_handler(void *data) + } + + info = sock_ep_msg_get_info(handle->pep, conn_req); +- if (info == NULL) { ++ if (!info) { + handle->paramlen = 0; +- fastlock_acquire(&handle->pep->cm.lock); +- dlist_insert_tail(&handle->entry, &handle->pep->cm.msg_list); +- fastlock_release(&handle->pep->cm.lock); ++ handle->state = SOCK_CONN_HANDLE_REJECTED; ++ /* `cm_head::signal_lock` has already been held ++ * in `sock_ep_cm_thread` function */ ++ sock_ep_cm_add_to_msg_list(cm_head, handle); + +- if (ofi_write_socket(handle->pep->cm.signal_fds[0], &c, 1) != 1) +- SOCK_LOG_DBG("Failed to signal\n"); + free(conn_req); +- return NULL; ++ return; + } + + cm_entry = calloc(1, sizeof(*cm_entry) + req_cm_data_sz); +@@ -953,54 +1113,19 @@ static void *sock_pep_req_handler(void *data) + cm_entry->info->handle = &handle->handle; + memcpy(cm_entry->data, conn_req->cm_data, req_cm_data_sz); + ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 0); ++ + SOCK_LOG_DBG("reporting conn-req to EQ\n"); + if (sock_eq_report_event(handle->pep->eq, FI_CONNREQ, cm_entry, entry_sz, 0)) + SOCK_LOG_ERROR("Error in writing to EQ\n"); + + free(cm_entry); +- return NULL; ++ return; + err: + ofi_close_socket(handle->sock_fd); + free(cm_entry); + free(conn_req); + free(handle); +- return NULL; +-} +- +-static void sock_pep_check_msg_list(struct sock_pep *pep) +-{ +- struct dlist_entry *entry; +- struct sock_conn_req_handle *hreq; +- struct sock_conn_hdr reply; +- +- fastlock_acquire(&pep->cm.lock); +- while (!dlist_empty(&pep->cm.msg_list)) { +- entry = pep->cm.msg_list.next; +- dlist_remove(entry); +- hreq = container_of(entry, struct sock_conn_req_handle, entry); +- +- reply.type = SOCK_CONN_REJECT; +- reply.cm_data_sz = htons(hreq->paramlen); +- +- SOCK_LOG_DBG("sending reject message\n"); +- if (sock_cm_send(hreq->sock_fd, &reply, sizeof(reply))) { +- SOCK_LOG_ERROR("failed to reply\n"); +- break; +- } +- +- if (hreq->paramlen && sock_cm_send(hreq->sock_fd, hreq->cm_data, +- hreq->paramlen)) { +- SOCK_LOG_ERROR("failed to send userdata\n"); +- break; +- } +- +- if (pthread_join(hreq->req_handler, NULL)) +- SOCK_LOG_DBG("failed to join req-handler\n"); +- ofi_close_socket(hreq->sock_fd); +- free(hreq->req); +- free(hreq); +- } +- fastlock_release(&pep->cm.lock); + } + + static void *sock_pep_listener_thread(void *data) +@@ -1023,7 +1148,6 @@ static void *sock_pep_listener_thread(void *data) + ret = ofi_read_socket(pep->cm.signal_fds[1], &tmp, 1); + if (ret != 1) + SOCK_LOG_DBG("Invalid signal\n"); +- sock_pep_check_msg_list(pep); + continue; + } + } else { +@@ -1037,7 +1161,7 @@ static void *sock_pep_listener_thread(void *data) + } + + sock_set_sockopts(conn_fd, SOCK_OPTS_KEEPALIVE); +- handle = calloc(1, sizeof(*handle)); ++ handle = sock_ep_cm_new_handle(); + if (!handle) { + SOCK_LOG_ERROR("cannot allocate memory\n"); + ofi_close_socket(conn_fd); +@@ -1047,12 +1171,8 @@ static void *sock_pep_listener_thread(void *data) + handle->sock_fd = conn_fd; + handle->pep = pep; + +- if (pthread_create(&handle->req_handler, NULL, +- sock_pep_req_handler, handle)) { +- SOCK_LOG_ERROR("failed to create req handler\n"); +- ofi_close_socket(conn_fd); +- free(handle); +- } ++ /* Monitor the connection */ ++ sock_ep_cm_monitor_handle(&pep->cm_head, handle, FI_EPOLL_IN); + } + + SOCK_LOG_DBG("PEP listener thread exiting\n"); +@@ -1077,6 +1197,11 @@ static int sock_pep_listen(struct fid_pep *pep) + if (_pep->cm.listener_thread) + return 0; + ++ if (sock_ep_cm_start_thread(&_pep->cm_head)) { ++ SOCK_LOG_ERROR("Couldn't create listener thread\n"); ++ return -FI_EINVAL; ++ } ++ + if (!_pep->cm.do_listen && sock_pep_create_listener(_pep)) { + SOCK_LOG_ERROR("Failed to create pep thread\n"); + return -FI_EINVAL; +@@ -1091,12 +1216,13 @@ static int sock_pep_reject(struct fid_pep *pep, fid_t handle, + struct sock_conn_req_handle *hreq; + struct sock_conn_req *req; + struct sock_pep *_pep; +- char c = 0; ++ struct sock_ep_cm_head *cm_head; + + _pep = container_of(pep, struct sock_pep, pep); + hreq = container_of(handle, struct sock_conn_req_handle, handle); + req = hreq->req; +- if (!req || hreq->handle.fclass != FI_CLASS_CONNREQ || hreq->is_accepted) ++ if (!req || hreq->handle.fclass != FI_CLASS_CONNREQ || ++ hreq->state == SOCK_CONN_HANDLE_ACCEPTED) + return -FI_EINVAL; + + hreq->paramlen = 0; +@@ -1105,12 +1231,11 @@ static int sock_pep_reject(struct fid_pep *pep, fid_t handle, + hreq->paramlen = paramlen; + } + +- fastlock_acquire(&_pep->cm.lock); +- dlist_insert_tail(&hreq->entry, &_pep->cm.msg_list); +- fastlock_release(&_pep->cm.lock); +- +- if (ofi_write_socket(_pep->cm.signal_fds[0], &c, 1) != 1) +- SOCK_LOG_DBG("Failed to signal\n"); ++ cm_head = &_pep->cm_head; ++ hreq->state = SOCK_CONN_HANDLE_REJECTED; ++ fastlock_acquire(&cm_head->signal_lock); ++ sock_ep_cm_add_to_msg_list(cm_head, hreq); ++ fastlock_release(&cm_head->signal_lock); + return 0; + } + +@@ -1192,10 +1317,20 @@ int sock_msg_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + info->src_addrlen); + } else { + memset(&hints, 0, sizeof(hints)); +- hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; +- +- ret = getaddrinfo("localhost", NULL, &hints, &result); ++ hints.ai_family = ofi_get_sa_family(info); ++ if (!hints.ai_family) ++ hints.ai_family = AF_INET; ++ ++ if (hints.ai_family == AF_INET) { ++ ret = getaddrinfo("127.0.0.1", NULL, &hints, ++ &result); ++ } else if (hints.ai_family == AF_INET6) { ++ ret = getaddrinfo("::1", NULL, &hints, &result); ++ } else { ++ ret = getaddrinfo("localhost", NULL, &hints, ++ &result); ++ } + if (ret) { + ret = -FI_EINVAL; + SOCK_LOG_DBG("getaddrinfo failed!\n"); +@@ -1218,14 +1353,12 @@ int sock_msg_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + } + + fd_set_nonblock(_pep->cm.signal_fds[1]); +- dlist_init(&_pep->cm.msg_list); + + _pep->pep.fid.fclass = FI_CLASS_PEP; + _pep->pep.fid.context = context; + _pep->pep.fid.ops = &sock_pep_fi_ops; + _pep->pep.cm = &sock_pep_cm_ops; + _pep->pep.ops = &sock_pep_ops; +- fastlock_init(&_pep->cm.lock); + + _pep->sock_fab = container_of(fabric, struct sock_fabric, fab_fid); + *pep = &_pep->pep; +@@ -1235,3 +1368,158 @@ err: + return ret; + } + ++static void sock_ep_cm_handle_rx(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle) ++{ ++ struct sock_conn_hdr hdr; ++ ++ if (sock_cm_recv(handle->sock_fd, &hdr, sizeof(hdr))) { ++ SOCK_LOG_ERROR("io failed for fd %d\n", handle->sock_fd); ++ if (handle->ep) { ++ sock_ep_cm_shutdown_report(handle->ep, 0); ++ } ++ ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 1); ++ return; ++ } ++ ++ switch(hdr.type) { ++ case SOCK_CONN_REQ: ++ sock_pep_req_handler(cm_head, &hdr, handle); ++ break; ++ case SOCK_CONN_ACCEPT: ++ case SOCK_CONN_REJECT: ++ sock_ep_cm_connect_handler(cm_head, &hdr, handle); ++ break; ++ case SOCK_CONN_SHUTDOWN: ++ sock_ep_cm_shutdown_handler(cm_head, &hdr, handle); ++ break; ++ default: ++ SOCK_LOG_ERROR("Unexpected message type %d\n", hdr.type); ++ break; ++ } ++} ++ ++static void *sock_ep_cm_thread(void *arg) ++{ ++ int num_fds, i; ++ struct sock_ep_cm_head *cm_head = arg; ++ void *ep_contexts[SOCK_EPOLL_WAIT_EVENTS]; ++ struct sock_conn_req_handle *handle; ++ ++ while (cm_head->do_listen) { ++ sock_ep_cm_check_closing_rejected_list(cm_head); ++ ++ num_fds = fi_epoll_wait(cm_head->emap, ep_contexts, ++ SOCK_EPOLL_WAIT_EVENTS, -1); ++ if (num_fds < 0) { ++ SOCK_LOG_ERROR("poll failed : %s\n", strerror(errno)); ++ continue; ++ } ++ ++ fastlock_acquire(&cm_head->signal_lock); ++ for (i = 0; i < num_fds; i++) { ++ handle = ep_contexts[i]; ++ ++ if (handle == NULL) { /* Signal event */ ++ fd_signal_reset(&cm_head->signal); ++ continue; ++ } ++ ++ /* ep_contexts[] may report multiple events for the same handle. ++ * Suppose we received 2 elements for 1 handle: the first will ++ * unmonitor the handle, then the second event will have ++ * handle->monitored set to 0 ++ */ ++ if (!handle->monitored) { ++ assert(handle->sock_fd == INVALID_SOCKET); ++ continue; ++ } ++ ++ assert(handle->sock_fd != INVALID_SOCKET); ++ sock_ep_cm_handle_rx(cm_head, handle); ++ } ++ fastlock_release(&cm_head->signal_lock); ++ } ++ return NULL; ++} ++ ++ ++int sock_ep_cm_start_thread(struct sock_ep_cm_head *cm_head) ++{ ++ assert(cm_head->do_listen == 0); ++ ++ fastlock_init(&cm_head->signal_lock); ++ dlist_init(&cm_head->msg_list); ++ ++ int ret = fi_epoll_create(&cm_head->emap); ++ if (ret < 0) { ++ SOCK_LOG_ERROR("failed to create epoll set\n"); ++ goto err1; ++ } ++ ++ ret = fd_signal_init(&cm_head->signal); ++ if (ret < 0) { ++ ret = -errno; ++ SOCK_LOG_ERROR("failed to init signal\n"); ++ goto err2; ++ } ++ ++ ret = fi_epoll_add(cm_head->emap, ++ cm_head->signal.fd[FI_READ_FD], ++ FI_EPOLL_IN, NULL); ++ if (ret != 0){ ++ SOCK_LOG_ERROR("failed to add signal fd to epoll\n"); ++ goto err3; ++ } ++ ++ cm_head->do_listen = 1; ++ ret = pthread_create(&cm_head->listener_thread, 0, ++ sock_ep_cm_thread, cm_head); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to create conn listener thread\n"); ++ goto err3; ++ } ++ return 0; ++ ++err3: ++ cm_head->do_listen = 0; ++ fd_signal_free(&cm_head->signal); ++err2: ++ fi_epoll_close(cm_head->emap); ++err1: ++ return ret; ++} ++ ++void sock_ep_cm_wait_handle_finalized(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle) ++{ ++ handle->state = SOCK_CONN_HANDLE_FINALIZING; ++ fastlock_acquire(&cm_head->signal_lock); ++ sock_ep_cm_add_to_msg_list(cm_head, handle); ++ fastlock_release(&cm_head->signal_lock); ++ ++ pthread_mutex_lock(&handle->finalized_mutex); ++ while (handle->state != SOCK_CONN_HANDLE_FINALIZED) ++ fi_wait_cond(&handle->finalized_cond, ++ &handle->finalized_mutex, -1); ++ pthread_mutex_unlock(&handle->finalized_mutex); ++} ++ ++void sock_ep_cm_stop_thread(struct sock_ep_cm_head *cm_head) ++{ ++ if (cm_head->do_listen == 0) ++ return; ++ ++ cm_head->do_listen = 0; ++ ++ sock_ep_cm_signal(cm_head); ++ ++ if (cm_head->listener_thread && ++ pthread_join(cm_head->listener_thread, NULL)) { ++ SOCK_LOG_DBG("pthread join failed\n"); ++ } ++ fi_epoll_close(cm_head->emap); ++ fd_signal_free(&cm_head->signal); ++ fastlock_destroy(&cm_head->signal_lock); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_fabric.c +index f99eaa3..ba991b3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_fabric.c +@@ -60,6 +60,7 @@ int sock_pe_waittime = SOCK_PE_WAITTIME; + const char sock_fab_name[] = "IP"; + const char sock_dom_name[] = "sockets"; + const char sock_prov_name[] = "sockets"; ++int sock_conn_timeout = SOCK_CM_DEF_TIMEOUT; + int sock_conn_retry = SOCK_CM_DEF_RETRY; + int sock_cm_def_map_sz = SOCK_CMAP_DEF_SZ; + int sock_av_def_sz = SOCK_AV_DEF_SZ; +@@ -276,6 +277,7 @@ int sock_verify_info(uint32_t version, const struct fi_info *hints) + case FI_FORMAT_UNSPEC: + case FI_SOCKADDR: + case FI_SOCKADDR_IN: ++ case FI_SOCKADDR_IN6: + break; + default: + SOCK_LOG_DBG("Unsupported address format\n"); +@@ -349,6 +351,7 @@ static void sock_read_default_params() + { + if (!read_default_params) { + fi_param_get_int(&sock_prov, "pe_waittime", &sock_pe_waittime); ++ fi_param_get_int(&sock_prov, "conn_timeout", &sock_conn_timeout); + fi_param_get_int(&sock_prov, "max_conn_retry", &sock_conn_retry); + fi_param_get_int(&sock_prov, "def_conn_map_sz", &sock_cm_def_map_sz); + fi_param_get_int(&sock_prov, "def_av_sz", &sock_av_def_sz); +@@ -393,30 +396,32 @@ static int sock_fabric(struct fi_fabric_attr *attr, + return 0; + } + +-int sock_get_src_addr(struct sockaddr_in *dest_addr, +- struct sockaddr_in *src_addr) ++int sock_get_src_addr(union ofi_sock_ip *dest_addr, ++ union ofi_sock_ip *src_addr) + { + int sock, ret; + socklen_t len; + +- sock = ofi_socket(AF_INET, SOCK_DGRAM, 0); ++ sock = ofi_socket(dest_addr->sa.sa_family, SOCK_DGRAM, 0); + if (sock < 0) + return -ofi_sockerr(); + +- len = sizeof(*dest_addr); +- ret = connect(sock, (struct sockaddr *) dest_addr, len); ++ len = ofi_sizeofaddr(&dest_addr->sa); ++ ret = connect(sock, &dest_addr->sa, len); + if (ret) { + SOCK_LOG_DBG("Failed to connect udp socket\n"); +- ret = sock_get_src_addr_from_hostname(src_addr, NULL); ++ ret = sock_get_src_addr_from_hostname(src_addr, NULL, ++ dest_addr->sa.sa_family); + goto out; + } + +- ret = getsockname(sock, (struct sockaddr *) src_addr, &len); +- src_addr->sin_port = 0; ++ ret = getsockname(sock, &src_addr->sa, &len); ++ ofi_addr_set_port(&src_addr->sa, 0); + if (ret) { + SOCK_LOG_DBG("getsockname failed\n"); + ret = -ofi_sockerr(); + } ++ + out: + ofi_close_socket(sock); + return ret; +@@ -442,13 +447,13 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + struct fi_info **info) + { + struct addrinfo ai, *rai = NULL; +- struct sockaddr_in *src_addr = NULL, *dest_addr = NULL; +- struct sockaddr_in sin; ++ union ofi_sock_ip *src_addr = NULL, *dest_addr = NULL; ++ union ofi_sock_ip sip; + int ret; + + memset(&ai, 0, sizeof(ai)); +- ai.ai_family = AF_INET; + ai.ai_socktype = SOCK_STREAM; ++ ai.ai_family = ofi_get_sa_family(hints); + if (flags & FI_NUMERICHOST) + ai.ai_flags |= AI_NUMERICHOST; + +@@ -459,7 +464,7 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + SOCK_LOG_DBG("getaddrinfo failed!\n"); + return -FI_ENODATA; + } +- src_addr = (struct sockaddr_in *) rai->ai_addr; ++ src_addr = (union ofi_sock_ip *) rai->ai_addr; + if (hints && hints->dest_addr) + dest_addr = hints->dest_addr; + } else { +@@ -469,7 +474,7 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + SOCK_LOG_DBG("getaddrinfo failed!\n"); + return -FI_ENODATA; + } +- dest_addr = (struct sockaddr_in *) rai->ai_addr; ++ dest_addr = (union ofi_sock_ip *) rai->ai_addr; + } else if (hints) { + dest_addr = hints->dest_addr; + } +@@ -479,16 +484,19 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + } + + if (dest_addr && !src_addr) { +- ret = sock_get_src_addr(dest_addr, &sin); ++ ret = sock_get_src_addr(dest_addr, &sip); + if (!ret) +- src_addr = &sin; ++ src_addr = &sip; + } + +- if (src_addr) +- SOCK_LOG_DBG("src_addr: %s\n", inet_ntoa(src_addr->sin_addr)); +- if (dest_addr) +- SOCK_LOG_DBG("dest_addr: %s\n", inet_ntoa(dest_addr->sin_addr)); +- ++ if (dest_addr) { ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "dest addr: ", dest_addr); ++ } ++ if (src_addr) { ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "src addr: ", src_addr); ++ } + switch (ep_type) { + case FI_EP_MSG: + ret = sock_msg_fi_info(version, src_addr, dest_addr, hints, info); +@@ -513,14 +521,32 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + return ret; + } + +-void sock_insert_loopback_addr(struct slist *addr_list) ++static void sock_insert_loopback_addr(struct slist *addr_list) + { + struct sock_host_list_entry *addr_entry; + + addr_entry = calloc(1, sizeof(struct sock_host_list_entry)); + if (!addr_entry) + return; +- strncpy(addr_entry->hostname, "127.0.0.1", sizeof(addr_entry->hostname)); ++ ++ addr_entry->ipaddr.sin.sin_family = AF_INET; ++ addr_entry->ipaddr.sin.sin_addr.s_addr = INADDR_LOOPBACK; ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "available addr: ", &addr_entry->ipaddr); ++ ++ strncpy(addr_entry->ipstr, "127.0.0.1", sizeof(addr_entry->ipstr)); ++ slist_insert_tail(&addr_entry->entry, addr_list); ++ ++ addr_entry = calloc(1, sizeof(struct sock_host_list_entry)); ++ if (!addr_entry) ++ return; ++ ++ addr_entry->ipaddr.sin6.sin6_family = AF_INET6; ++ addr_entry->ipaddr.sin6.sin6_addr = in6addr_loopback; ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "available addr: ", &addr_entry->ipaddr); ++ ++ strncpy(addr_entry->ipstr, "::1", sizeof(addr_entry->ipstr)); + slist_insert_tail(&addr_entry->entry, addr_list); + } + +@@ -531,7 +557,7 @@ void sock_get_list_of_addr(struct slist *addr_list) + struct sock_host_list_entry *addr_entry; + struct ifaddrs *ifaddrs, *ifa; + +- fi_param_get_str(&sock_prov, "interface_name", &sock_interface_name); ++ fi_param_get_str(&sock_prov, "iface", &sock_interface_name); + + ret = ofi_getifaddrs(&ifaddrs); + if (!ret) { +@@ -550,9 +576,11 @@ void sock_get_list_of_addr(struct slist *addr_list) + } + } + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { +- if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || +- (ifa->ifa_addr->sa_family != AF_INET) || +- !strcmp(ifa->ifa_name, "lo")) ++ if (ifa->ifa_addr == NULL || ++ !(ifa->ifa_flags & IFF_UP) || ++ (ifa->ifa_flags & IFF_LOOPBACK) || ++ ((ifa->ifa_addr->sa_family != AF_INET) && ++ (ifa->ifa_addr->sa_family != AF_INET6))) + continue; + if (sock_interface_name && + strncmp(sock_interface_name, ifa->ifa_name, +@@ -560,14 +588,21 @@ void sock_get_list_of_addr(struct slist *addr_list) + SOCK_LOG_DBG("Skip (%s) interface\n", ifa->ifa_name); + continue; + } ++ + addr_entry = calloc(1, sizeof(struct sock_host_list_entry)); + if (!addr_entry) + continue; +- ret = getnameinfo(ifa->ifa_addr, sizeof(struct sockaddr_in), +- addr_entry->hostname, sizeof(addr_entry->hostname), +- NULL, 0, NI_NUMERICHOST); +- if (ret) { +- SOCK_LOG_DBG("getnameinfo failed: %d\n", ret); ++ ++ memcpy(&addr_entry->ipaddr, ifa->ifa_addr, ++ ofi_sizeofaddr(ifa->ifa_addr)); ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "available addr: ", ifa->ifa_addr); ++ ++ if (!inet_ntop(ifa->ifa_addr->sa_family, ++ ofi_get_ipaddr(ifa->ifa_addr), ++ addr_entry->ipstr, ++ sizeof(addr_entry->ipstr))) { ++ SOCK_LOG_DBG("inet_ntop failed: %d\n", errno); + free(addr_entry); + continue; + } +@@ -581,8 +616,48 @@ void sock_get_list_of_addr(struct slist *addr_list) + #elif defined HAVE_MIB_IPADDRTABLE + void sock_get_list_of_addr(struct slist *addr_list) + { +- sock_get_ip_addr_table(addr_list); ++ struct sock_host_list_entry *addr_entry; ++ DWORD i; ++ MIB_IPADDRTABLE _iptbl; ++ MIB_IPADDRTABLE *iptbl = &_iptbl; ++ ULONG ips = 1; ++ ULONG res; ++ ++ res = GetIpAddrTable(iptbl, &ips, 0); ++ if (res == ERROR_INSUFFICIENT_BUFFER) { ++ iptbl = malloc(ips); ++ if (!iptbl) ++ return; ++ ++ res = GetIpAddrTable(iptbl, &ips, 0); ++ } ++ ++ if (res != NO_ERROR) ++ goto out; ++ ++ for (i = 0; i < iptbl->dwNumEntries; i++) { ++ if (iptbl->table[i].dwAddr && ++ (iptbl->table[i].dwAddr != ntohl(INADDR_LOOPBACK))) { ++ addr_entry = calloc(1, sizeof(*addr_entry)); ++ if (!addr_entry) ++ break; ++ ++ addr_entry->ipaddr.sin.sin_family = AF_INET; ++ addr_entry->ipaddr.sin.sin_addr.s_addr = ++ iptbl->table[i].dwAddr; ++ inet_ntop(AF_INET, &iptbl->table[i].dwAddr, ++ addr_entry->ipstr, ++ sizeof(addr_entry->ipstr)); ++ slist_insert_tail(&addr_entry->entry, addr_list); ++ } ++ } ++ ++ // Always add loopback address at the end + sock_insert_loopback_addr(addr_list); ++ ++out: ++ if (iptbl != &_iptbl) ++ free(iptbl); + } + #else + void sock_get_list_of_addr(struct slist *addr_list) +@@ -591,6 +666,14 @@ void sock_get_list_of_addr(struct slist *addr_list) + } + #endif + ++static void sock_init_addrlist(void) ++{ ++ fastlock_acquire(&sock_list_lock); ++ if (slist_empty(&sock_addr_list)) ++ sock_get_list_of_addr(&sock_addr_list); ++ fastlock_release(&sock_list_lock); ++} ++ + int sock_node_getinfo(uint32_t version, const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, struct fi_info **info, + struct fi_info **tail) +@@ -655,28 +738,26 @@ static int sock_match_src_addr(struct slist_entry *entry, const void *src_addr) + struct sock_host_list_entry *host_entry; + host_entry = container_of(entry, struct sock_host_list_entry, entry); + +- return (strcmp(host_entry->hostname, (char *) src_addr) == 0); ++ return ofi_equals_ipaddr(&host_entry->ipaddr.sa, src_addr); + } + +-static int sock_addr_matches_interface(struct slist *addr_list, struct sockaddr_in *src_addr) ++static int sock_addr_matches_interface(struct slist *addr_list, ++ struct sockaddr *src_addr) + { + struct slist_entry *entry; + + /* Always match if it's localhost */ +- if (ofi_is_loopback_addr((struct sockaddr *)src_addr)) ++ if (ofi_is_loopback_addr(src_addr)) + return 1; + +- entry = slist_find_first_match(addr_list, sock_match_src_addr, +- inet_ntoa(src_addr->sin_addr)); +- ++ entry = slist_find_first_match(addr_list, sock_match_src_addr, src_addr); + return entry ? 1 : 0; + } + + static int sock_node_matches_interface(struct slist *addr_list, const char *node) + { +- struct sockaddr_in addr = { 0 }; ++ union ofi_sock_ip addr; + struct addrinfo *rai = NULL, ai = { +- .ai_family = AF_INET, + .ai_socktype = SOCK_STREAM, + }; + +@@ -684,10 +765,16 @@ static int sock_node_matches_interface(struct slist *addr_list, const char *node + SOCK_LOG_DBG("getaddrinfo failed!\n"); + return -FI_EINVAL; + } +- addr = *(struct sockaddr_in *)rai->ai_addr; ++ if (rai->ai_addrlen > sizeof(addr)) { ++ freeaddrinfo(rai); ++ return -FI_EINVAL; ++ } ++ ++ memset(&addr, 0, sizeof addr); ++ memcpy(&addr, rai->ai_addr, rai->ai_addrlen); + freeaddrinfo(rai); + +- return sock_addr_matches_interface(addr_list, &addr); ++ return sock_addr_matches_interface(addr_list, &addr.sa); + } + + static void sock_free_addr_list(struct slist *addr_list) +@@ -713,12 +800,12 @@ static int sock_getinfo(uint32_t version, const char *node, const char *service, + struct fi_info *tail; + + if (!(flags & FI_SOURCE) && hints && hints->src_addr && +- (hints->src_addrlen != sizeof(struct sockaddr_in))) ++ (hints->src_addrlen != ofi_sizeofaddr(hints->src_addr))) + return -FI_ENODATA; + + if (((!node && !service) || (flags & FI_SOURCE)) && + hints && hints->dest_addr && +- (hints->dest_addrlen != sizeof(struct sockaddr_in))) ++ (hints->dest_addrlen != ofi_sizeofaddr(hints->dest_addr))) + return -FI_ENODATA; + + ret = sock_verify_info(version, hints); +@@ -726,11 +813,12 @@ static int sock_getinfo(uint32_t version, const char *node, const char *service, + return ret; + + ret = 1; ++ sock_init_addrlist(); + if ((flags & FI_SOURCE) && node) { + ret = sock_node_matches_interface(&sock_addr_list, node); + } else if (hints && hints->src_addr) { + ret = sock_addr_matches_interface(&sock_addr_list, +- (struct sockaddr_in *)hints->src_addr); ++ hints->src_addr); + } + if (!ret) { + SOCK_LOG_ERROR("Couldn't find a match with local interfaces\n"); +@@ -747,7 +835,7 @@ static int sock_getinfo(uint32_t version, const char *node, const char *service, + (void) prev; /* Makes compiler happy */ + slist_foreach(&sock_addr_list, entry, prev) { + host_entry = container_of(entry, struct sock_host_list_entry, entry); +- node = host_entry->hostname; ++ node = host_entry->ipstr; + flags |= FI_SOURCE; + ret = sock_node_getinfo(version, node, service, flags, hints, info, &tail); + if (ret) { +@@ -769,7 +857,7 @@ static void fi_sockets_fini(void) + struct fi_provider sock_prov = { + .name = sock_prov_name, + .version = FI_VERSION(SOCK_MAJOR_VERSION, SOCK_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = sock_getinfo, + .fabric = sock_fabric, + .cleanup = fi_sockets_fini +@@ -784,6 +872,9 @@ SOCKETS_INI + fi_param_define(&sock_prov, "pe_waittime", FI_PARAM_INT, + "How many milliseconds to spin while waiting for progress"); + ++ fi_param_define(&sock_prov, "conn_timeout", FI_PARAM_INT, ++ "How many milliseconds to wait for one connection establishment"); ++ + fi_param_define(&sock_prov, "max_conn_retry", FI_PARAM_INT, + "Number of connection retries before reporting as failure"); + +@@ -815,7 +906,7 @@ SOCKETS_INI + fi_param_define(&sock_prov, "keepalive_probes", FI_PARAM_INT, + "Maximum number of keepalive probes sent before dropping the connection"); + +- fi_param_define(&sock_prov, "interface_name", FI_PARAM_STRING, ++ fi_param_define(&sock_prov, "iface", FI_PARAM_STRING, + "Specify interface name"); + + fastlock_init(&sock_list_lock); +@@ -826,8 +917,6 @@ SOCKETS_INI + SOCK_EP_RDM_CAP |= OFI_RMA_PMEM; + SOCK_EP_MSG_SEC_CAP |= OFI_RMA_PMEM; + SOCK_EP_MSG_CAP |= OFI_RMA_PMEM; +- /* Returns loopback address if no other interfaces are available */ +- sock_get_list_of_addr(&sock_addr_list); + #if ENABLE_DEBUG + fi_param_define(&sock_prov, "dgram_drop_rate", FI_PARAM_INT, + "Drop every Nth dgram frame (debug only)"); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_msg.c +index 2e69d76..0d09300 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_msg.c +@@ -262,8 +262,9 @@ ssize_t sock_ep_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, + } + + sock_tx_ctx_write_op_send(tx_ctx, &tx_op, flags, (uintptr_t) msg->context, +- msg->addr, (uintptr_t) msg->msg_iov[0].iov_base, +- ep_attr, conn); ++ msg->addr, (uintptr_t) ((msg->iov_count > 0) ? ++ msg->msg_iov[0].iov_base : NULL), ++ ep_attr, conn); + + if (flags & FI_REMOTE_CQ_DATA) + sock_tx_ctx_write(tx_ctx, &msg->data, sizeof(msg->data)); +@@ -605,9 +606,10 @@ ssize_t sock_ep_tsendmsg(struct fid_ep *ep, + } + + sock_tx_ctx_write_op_tsend(tx_ctx, &tx_op, flags, +- (uintptr_t) msg->context, msg->addr, +- (uintptr_t) msg->msg_iov[0].iov_base, +- ep_attr, conn, msg->tag); ++ (uintptr_t) msg->context, msg->addr, ++ (uintptr_t) ((msg->iov_count > 0) ? ++ msg->msg_iov[0].iov_base : NULL), ++ ep_attr, conn, msg->tag); + + if (flags & FI_REMOTE_CQ_DATA) + sock_tx_ctx_write(tx_ctx, &msg->data, sizeof(msg->data)); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_progress.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_progress.c +index 19d046f..bab5c3c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_progress.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_progress.c +@@ -867,7 +867,8 @@ static void sock_pe_do_atomic(void *cmp, void *dst, void *src, + if (op >= OFI_SWAP_OP_START) { + ofi_atomic_swap_handlers[op - OFI_SWAP_OP_START][datatype](dst, + src, cmp, tmp_result, cnt); +- memcpy(cmp, tmp_result, ofi_datatype_size(datatype) * cnt); ++ if (cmp != NULL) ++ memcpy(cmp, tmp_result, ofi_datatype_size(datatype) * cnt); + } else if (fetch) { + ofi_atomic_readwrite_handlers[op][datatype](dst, src, + cmp /*results*/, cnt); +@@ -1450,32 +1451,25 @@ static int sock_pe_process_rx_conn_msg(struct sock_pe *pe, + uint64_t len, data_len; + struct sock_ep_attr *ep_attr; + struct sock_conn_map *map; +- struct sockaddr_in *addr; ++ union ofi_sock_ip *addr; + struct sock_conn *conn; + uint64_t index; + + if (!pe_entry->comm_addr) { +- pe_entry->comm_addr = calloc(1, sizeof(struct sockaddr_in)); ++ pe_entry->comm_addr = calloc(1, sizeof(union ofi_sock_ip)); + if (!pe_entry->comm_addr) + return -FI_ENOMEM; + } + + len = sizeof(struct sock_msg_hdr); +- data_len = sizeof(struct sockaddr_in); ++ data_len = sizeof(union ofi_sock_ip); + if (sock_pe_recv_field(pe_entry, pe_entry->comm_addr, data_len, len)) { + return 0; + } + +- SOCK_LOG_DBG("got conn msg from %s:%d\n", +- inet_ntoa(((struct sockaddr_in *)&pe_entry->conn->addr)->sin_addr), +- ntohs(((struct sockaddr_in *)&pe_entry->conn->addr)->sin_port)); +- SOCK_LOG_DBG("on behalf of %s:%d\n", +- inet_ntoa(((struct sockaddr_in *)pe_entry->comm_addr)->sin_addr), +- ntohs(((struct sockaddr_in *)pe_entry->comm_addr)->sin_port)); +- + ep_attr = pe_entry->conn->ep_attr; + map = &ep_attr->cmap; +- addr = (struct sockaddr_in *) pe_entry->comm_addr; ++ addr = pe_entry->comm_addr; + pe_entry->conn->addr = *addr; + + index = (ep_attr->ep_type == FI_EP_MSG) ? 0 : sock_av_get_addr_index(ep_attr->av, addr); +@@ -2283,7 +2277,7 @@ void sock_pe_signal(struct sock_pe *pe) + void sock_pe_poll_add(struct sock_pe *pe, int fd) + { + fastlock_acquire(&pe->signal_lock); +- if (fi_epoll_add(pe->epoll_set, fd, NULL)) ++ if (fi_epoll_add(pe->epoll_set, fd, FI_EPOLL_IN, NULL)) + SOCK_LOG_ERROR("failed to add to epoll set: %d\n", fd); + fastlock_release(&pe->signal_lock); + } +@@ -2731,7 +2725,8 @@ struct sock_pe *sock_pe_init(struct sock_domain *domain) + + if (fd_set_nonblock(pe->signal_fds[SOCK_SIGNAL_RD_FD]) || + fi_epoll_add(pe->epoll_set, +- pe->signal_fds[SOCK_SIGNAL_RD_FD], NULL)) ++ pe->signal_fds[SOCK_SIGNAL_RD_FD], ++ FI_EPOLL_IN, NULL)) + goto err5; + + pe->do_progress = 1; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/Makefile.include +index 7965a64..983ee13 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/Makefile.include +@@ -4,8 +4,11 @@ _tcp_files = \ + prov/tcp/src/tcpx_attr.c \ + prov/tcp/src/tcpx_conn_mgr.c \ + prov/tcp/src/tcpx_domain.c \ ++ prov/tcp/src/tcpx_rma.c \ + prov/tcp/src/tcpx_ep.c \ ++ prov/tcp/src/tcpx_shared_ctx.c \ + prov/tcp/src/tcpx_cq.c \ ++ prov/tcp/src/tcpx_eq.c \ + prov/tcp/src/tcpx_init.c \ + prov/tcp/src/tcpx_progress.c \ + prov/tcp/src/tcpx_comm.c \ +@@ -22,8 +25,8 @@ src_libfabric_la_SOURCES += $(_tcp_files) + src_libfabric_la_LIBADD += $(tcp_shm_LIBS) + endif !HAVE_TCP_DL + +-#prov_install_man_pages += man/man7/fi_tcp.7 ++prov_install_man_pages += man/man7/fi_tcp.7 + + endif HAVE_TCP + +-#prov_dist_man_pages += man/man7/fi_tcp.7 ++prov_dist_man_pages += man/man7/fi_tcp.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx.h +index 4148c7f..c5994e5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx.h +@@ -65,167 +65,209 @@ + #define TCPX_MAJOR_VERSION 0 + #define TCPX_MINOR_VERSION 1 + +- +-extern struct fi_provider tcpx_prov; +-extern struct util_prov tcpx_util_prov; +-extern struct fi_info tcpx_info; +-struct tcpx_fabric; +-struct tcpx_domain; +-struct tcpx_pe_entry; +-struct tcpx_progress; +-struct tcpx_ep; +-struct tcpx_op_send; +- +-#define TCPX_NO_COMPLETION (1ULL << 63) +- +-#define POLL_MGR_FREE (1 << 0) +-#define POLL_MGR_DEL (1 << 1) +-#define POLL_MGR_ACK (1 << 2) +- + #define TCPX_MAX_CM_DATA_SIZE (1<<8) +-#define TCPX_PE_COMM_BUFF_SZ (1<<10) +-#define TCPX_MAX_SOCK_REQS (1<<10) +-#define TCPX_PE_MAX_ENTRIES (128) + #define TCPX_IOV_LIMIT (4) + #define TCPX_MAX_INJECT_SZ (64) +-#define TCPX_MAX_EPOLL_EVENTS (100) +-#define TCPX_MAX_EP_RB_SIZE (1024*sizeof(struct tcpx_op_send)) +- +-int tcpx_create_fabric(struct fi_fabric_attr *attr, +- struct fid_fabric **fabric, +- void *context); +- +-int tcpx_passive_ep(struct fid_fabric *fabric, struct fi_info *info, +- struct fid_pep **pep, void *context); +- +-int tcpx_domain_open(struct fid_fabric *fabric, struct fi_info *info, +- struct fid_domain **domain, void *context); +- +- +-int tcpx_endpoint(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep_fid, void *context); + ++#define MAX_EPOLL_EVENTS 100 ++#define STAGE_BUF_SIZE 512 + +-int tcpx_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq_fid, void *context); +- +-int tcpx_conn_mgr_init(struct tcpx_fabric *tcpx_fabric); +-void tcpx_conn_mgr_close(struct tcpx_fabric *tcpx_fabric); +-int tcpx_recv_msg(struct tcpx_pe_entry *pe_entry); +-int tcpx_send_msg(struct tcpx_pe_entry *pe_entry); +-void posted_rx_find(struct tcpx_pe_entry *pe_entry); +-int tcpx_progress_init(struct tcpx_progress *progress); +-int tcpx_progress_close(struct tcpx_progress *progress); +-struct tcpx_pe_entry *pe_entry_alloc(struct tcpx_progress *progress); +-void pe_entry_release(struct tcpx_pe_entry *pe_entry); +-void tcpx_progress(struct util_ep *util_ep); +- +-enum tcpx_xfer_states { +- TCPX_XFER_IDLE, +- TCPX_XFER_STARTED, +- TCPX_XFER_HDR_SENT, +- TCPX_XFER_FLUSH_COMM_BUF, +- TCPX_XFER_HDR_RECVD, +- TCPX_XFER_COMPLETE, +-}; ++extern struct fi_provider tcpx_prov; ++extern struct util_prov tcpx_util_prov; ++extern struct fi_info tcpx_info; ++struct tcpx_xfer_entry; ++struct tcpx_ep; + + enum tcpx_xfer_op_codes { + TCPX_OP_MSG_SEND, + TCPX_OP_MSG_RECV, ++ TCPX_OP_MSG_RESP, ++ TCPX_OP_WRITE, ++ TCPX_OP_REMOTE_WRITE, ++ TCPX_OP_READ_REQ, ++ TCPX_OP_READ_RSP, ++ TCPX_OP_REMOTE_READ, ++ TCPX_OP_CODE_MAX, + }; + +-enum tcpx_xfer_field { +- TCPX_MSG_HDR_FIELD, +- TCPX_DATA_FIELD, ++enum tcpx_cm_event_type { ++ SERVER_SOCK_ACCEPT, ++ CLIENT_SEND_CONNREQ, ++ SERVER_RECV_CONNREQ, ++ SERVER_SEND_CM_ACCEPT, ++ CLIENT_RECV_CONNRESP, + }; + +-enum poll_fd_type { +- CONNECT_SOCK, +- PASSIVE_SOCK, +- ACCEPT_SOCK, +-}; +- +-enum poll_fd_state { +- ESTABLISH_CONN, +- RCV_RESP, +- CONNECT_DONE, +-}; +- +-struct poll_fd_info { ++struct tcpx_cm_context { + fid_t fid; +- struct dlist_entry entry; +- int flags; +- enum poll_fd_type type; +- enum poll_fd_state state; ++ enum tcpx_cm_event_type type; + size_t cm_data_sz; + char cm_data[TCPX_MAX_CM_DATA_SIZE]; + }; + +-struct poll_fd_mgr { +- struct fd_signal signal; +- struct dlist_entry list; +- fastlock_t lock; +- int run; +- +- struct pollfd *poll_fds; +- struct poll_fd_info *poll_info; +- int nfds; +- int max_nfds; +-}; +- + struct tcpx_conn_handle { + struct fid handle; ++ struct tcpx_pep *pep; + SOCKET conn_fd; + }; + + struct tcpx_pep { + struct util_pep util_pep; +- struct fi_info info; ++ struct fi_info *info; + SOCKET sock; +- struct poll_fd_info poll_info; ++ struct tcpx_cm_context cm_ctx; ++}; ++ ++enum tcpx_cm_state { ++ TCPX_EP_CONNECTING, ++ TCPX_EP_CONNECTED, ++ TCPX_EP_SHUTDOWN, ++ TCPX_EP_ERROR, ++}; ++ ++struct tcpx_msg_hdr { ++ struct ofi_op_hdr hdr; ++ size_t rma_iov_cnt; ++ union { ++ struct fi_rma_iov rma_iov[TCPX_IOV_LIMIT]; ++ struct fi_rma_ioc rma_ioc[TCPX_IOV_LIMIT]; ++ }; ++}; ++ ++struct tcpx_rx_detect { ++ struct tcpx_msg_hdr hdr; ++ uint64_t done_len; ++}; ++ ++struct tcpx_rx_ctx { ++ struct fid_ep rx_fid; ++ struct slist rx_queue; ++ struct util_buf_pool *buf_pool; ++ fastlock_t lock; ++}; ++ ++typedef int (*tcpx_rx_process_fn_t)(struct tcpx_xfer_entry *rx_entry); ++typedef void (*tcpx_ep_progress_func_t)(struct tcpx_ep *ep); ++typedef int (*tcpx_get_rx_func_t)(struct tcpx_ep *ep); ++ ++struct stage_buf { ++ uint8_t buf[STAGE_BUF_SIZE]; ++ size_t size; ++ size_t len; ++ size_t off; + }; + + struct tcpx_ep { + struct util_ep util_ep; + SOCKET conn_fd; ++ struct tcpx_rx_detect rx_detect; ++ struct tcpx_xfer_entry *cur_rx_entry; ++ tcpx_rx_process_fn_t cur_rx_proc_fn; + struct dlist_entry ep_entry; +- struct dlist_entry rx_queue; +- struct dlist_entry tx_queue; ++ struct slist rx_queue; ++ struct slist tx_queue; ++ struct slist tx_rsp_pend_queue; ++ struct slist rma_read_queue; ++ struct tcpx_rx_ctx *srx_ctx; ++ enum tcpx_cm_state cm_state; ++ /* lock for protecting tx/rx queues,rma list,cm_state*/ ++ fastlock_t lock; ++ tcpx_ep_progress_func_t progress_func; ++ tcpx_get_rx_func_t get_rx_entry[ofi_op_write + 1]; ++ struct stage_buf stage_buf; ++ bool send_ready_monitor; + }; + + struct tcpx_fabric { + struct util_fabric util_fabric; +- struct poll_fd_mgr poll_mgr; +- pthread_t conn_mgr_thread; + }; + + struct tcpx_msg_data { +- size_t iov_cnt; +- union { +- struct iovec iov[TCPX_IOV_LIMIT+1]; +- struct fi_rma_iov rma_iov[TCPX_IOV_LIMIT+1]; +- struct fi_rma_ioc ram_ioc[TCPX_IOV_LIMIT+1]; +- }; ++ size_t iov_cnt; ++ struct iovec iov[TCPX_IOV_LIMIT+1]; + uint8_t inject[TCPX_MAX_INJECT_SZ]; + }; + +-struct tcpx_pe_entry { +- struct ofi_op_hdr msg_hdr; ++struct tcpx_xfer_entry { ++ struct slist_entry entry; ++ struct tcpx_msg_hdr msg_hdr; + struct tcpx_msg_data msg_data; +- struct dlist_entry entry; + struct tcpx_ep *ep; + uint64_t flags; + void *context; + uint64_t done_len; + }; + +-struct tcpx_progress { +- struct util_buf_pool *pe_entry_pool; +-}; +- + struct tcpx_domain { + struct util_domain util_domain; +- struct tcpx_progress progress; + }; + ++struct tcpx_buf_pool { ++ struct util_buf_pool *pool; ++ enum tcpx_xfer_op_codes op_type; ++}; ++ ++struct tcpx_cq { ++ struct util_cq util_cq; ++ /* buf_pools protected by util.cq_lock */ ++ struct tcpx_buf_pool buf_pools[TCPX_OP_CODE_MAX]; ++}; ++ ++int tcpx_create_fabric(struct fi_fabric_attr *attr, ++ struct fid_fabric **fabric, ++ void *context); ++ ++int tcpx_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context); ++ ++int tcpx_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++ ++ ++int tcpx_endpoint(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context); ++ ++ ++int tcpx_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq_fid, void *context); ++void tcpx_cq_report_completion(struct util_cq *cq, ++ struct tcpx_xfer_entry *xfer_entry, ++ int err); ++ ++int tcpx_recv_msg_data(struct tcpx_xfer_entry *recv_entry); ++int tcpx_send_msg(struct tcpx_xfer_entry *tx_entry); ++int tcpx_recv_hdr(SOCKET sock, struct stage_buf *sbuf, ++ struct tcpx_rx_detect *rx_detect); ++int tcpx_read_to_buffer(SOCKET sock, struct stage_buf *stage_buf); ++ ++struct tcpx_xfer_entry *tcpx_xfer_entry_alloc(struct tcpx_cq *cq, ++ enum tcpx_xfer_op_codes type); ++void tcpx_xfer_entry_release(struct tcpx_cq *tcpx_cq, ++ struct tcpx_xfer_entry *xfer_entry); ++void tcpx_srx_xfer_release(struct tcpx_rx_ctx *srx_ctx, ++ struct tcpx_xfer_entry *xfer_entry); ++void tcpx_rx_msg_release(struct tcpx_xfer_entry *rx_entry); ++struct tcpx_xfer_entry * ++tcpx_srx_dequeue(struct tcpx_rx_ctx *srx_ctx); ++ ++ ++void tcpx_progress(struct util_ep *util_ep); ++void tcpx_ep_progress(struct tcpx_ep *ep); ++int tcpx_ep_shutdown_report(struct tcpx_ep *ep, fid_t fid); ++int tcpx_cq_wait_ep_add(struct tcpx_ep *ep); ++void tcpx_cq_wait_ep_del(struct tcpx_ep *ep); ++void tcpx_tx_queue_insert(struct tcpx_ep *tcpx_ep, ++ struct tcpx_xfer_entry *tx_entry); ++ ++void tcpx_conn_mgr_run(struct util_eq *eq); ++int tcpx_eq_wait_try_func(void *arg); ++int tcpx_eq_create(struct fid_fabric *fabric_fid, struct fi_eq_attr *attr, ++ struct fid_eq **eq_fid, void *context); ++ ++int tcpx_get_rx_entry_op_invalid(struct tcpx_ep *tcpx_ep); ++int tcpx_get_rx_entry_op_msg(struct tcpx_ep *tcpx_ep); ++int tcpx_get_rx_entry_op_read_req(struct tcpx_ep *tcpx_ep); ++int tcpx_get_rx_entry_op_write(struct tcpx_ep *tcpx_ep); ++int tcpx_get_rx_entry_op_read_rsp(struct tcpx_ep *tcpx_ep); ++ + #endif //_TCP_H_ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_attr.c +index 596e806..ceecac7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_attr.c +@@ -33,17 +33,31 @@ + #include "tcpx.h" + + ++#define TCPX_DOMAIN_CAPS (FI_LOCAL_COMM | FI_REMOTE_COMM) ++#define TCPX_EP_CAPS (FI_MSG | FI_RMA | FI_RMA_PMEM) ++#define TCPX_TX_CAPS (FI_SEND | FI_WRITE | FI_READ) ++#define TCPX_RX_CAPS (FI_RECV | FI_REMOTE_READ | FI_REMOTE_WRITE) ++ ++ ++#define TCPX_MSG_ORDER (FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_RAS | \ ++ FI_ORDER_WAW | FI_ORDER_WAS | \ ++ FI_ORDER_SAW | FI_ORDER_SAS) ++ ++ + static struct fi_tx_attr tcpx_tx_attr = { +- .caps = FI_MSG | FI_SEND, ++ .caps = TCPX_EP_CAPS | TCPX_TX_CAPS, + .comp_order = FI_ORDER_STRICT, ++ .msg_order = TCPX_MSG_ORDER, + .inject_size = 64, + .size = 1024, +- .iov_limit = TCPX_IOV_LIMIT ++ .iov_limit = TCPX_IOV_LIMIT, ++ .rma_iov_limit = TCPX_IOV_LIMIT, + }; + + static struct fi_rx_attr tcpx_rx_attr = { +- .caps = FI_MSG | FI_RECV, ++ .caps = TCPX_EP_CAPS | TCPX_RX_CAPS, + .comp_order = FI_ORDER_STRICT, ++ .msg_order = TCPX_MSG_ORDER, + .total_buffered_recv = 0, + .size = 1024, + .iov_limit = TCPX_IOV_LIMIT +@@ -55,21 +69,27 @@ static struct fi_ep_attr tcpx_ep_attr = { + .protocol_version = 0, + .max_msg_size = SIZE_MAX, + .tx_ctx_cnt = 1, +- .rx_ctx_cnt = 1 ++ .rx_ctx_cnt = 1, ++ .max_order_raw_size = SIZE_MAX, ++ .max_order_waw_size = SIZE_MAX, + }; + + static struct fi_domain_attr tcpx_domain_attr = { + .name = "tcp", ++ .caps = TCPX_DOMAIN_CAPS, + .threading = FI_THREAD_SAFE, + .control_progress = FI_PROGRESS_AUTO, + .data_progress = FI_PROGRESS_AUTO, + .resource_mgmt = FI_RM_ENABLED, ++ .mr_mode = FI_MR_SCALABLE | FI_MR_BASIC, ++ .mr_key_size = sizeof(uint64_t), + .av_type = FI_AV_UNSPEC, +- .mr_mode = 0, ++ .cq_data_size = sizeof(uint64_t), + .cq_cnt = 256, + .ep_cnt = 8192, + .tx_ctx_cnt = 8192, + .rx_ctx_cnt = 8192, ++ .max_ep_srx_ctx = 128, + .max_ep_tx_ctx = 1, + .max_ep_rx_ctx = 1 + }; +@@ -80,7 +100,7 @@ static struct fi_fabric_attr tcpx_fabric_attr = { + }; + + struct fi_info tcpx_info = { +- .caps = FI_MSG | FI_SEND | FI_RECV, ++ .caps = TCPX_DOMAIN_CAPS | TCPX_EP_CAPS | TCPX_TX_CAPS | TCPX_RX_CAPS, + .addr_format = FI_SOCKADDR, + .tx_attr = &tcpx_tx_attr, + .rx_attr = &tcpx_rx_attr, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_comm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_comm.c +index ce10666..a861a72 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_comm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_comm.c +@@ -37,76 +37,128 @@ + #include + #include "tcpx.h" + +-int tcpx_send_msg(struct tcpx_pe_entry *pe_entry) ++int tcpx_send_msg(struct tcpx_xfer_entry *tx_entry) + { + ssize_t bytes_sent; ++ struct msghdr msg = {0}; + +- bytes_sent = ofi_writev_socket(pe_entry->ep->conn_fd, +- pe_entry->msg_data.iov, +- pe_entry->msg_data.iov_cnt); ++ msg.msg_iov = tx_entry->msg_data.iov; ++ msg.msg_iovlen = tx_entry->msg_data.iov_cnt; ++ ++ bytes_sent = ofi_sendmsg_tcp(tx_entry->ep->conn_fd, ++ &msg, MSG_NOSIGNAL); + if (bytes_sent < 0) +- return -errno; ++ return ofi_sockerr() == EPIPE ? -FI_ENOTCONN : -ofi_sockerr(); + +- if (pe_entry->done_len < ntohll(pe_entry->msg_hdr.size)) { +- ofi_consume_iov(pe_entry->msg_data.iov, +- &pe_entry->msg_data.iov_cnt, ++ tx_entry->done_len += bytes_sent; ++ if (tx_entry->done_len < ntohll(tx_entry->msg_hdr.hdr.size)) { ++ ofi_consume_iov(tx_entry->msg_data.iov, ++ &tx_entry->msg_data.iov_cnt, + bytes_sent); ++ return -FI_EAGAIN; + } +- +- pe_entry->done_len += bytes_sent; + return FI_SUCCESS; + } + +-static int tcpx_recv_msg_hdr(struct tcpx_pe_entry *pe_entry) ++static ssize_t tcpx_read_from_buffer(struct stage_buf *sbuf, ++ uint8_t *buf, size_t len) ++{ ++ size_t rem_size; ++ ssize_t ret; ++ ++ assert(sbuf->len >= sbuf->off); ++ rem_size = sbuf->len - sbuf->off; ++ assert(rem_size); ++ ret = (rem_size >= len)? len : rem_size; ++ memcpy(buf, &sbuf->buf[sbuf->off], ret); ++ sbuf->off += ret; ++ return ret; ++} ++ ++int tcpx_recv_hdr(SOCKET sock, struct stage_buf *sbuf, ++ struct tcpx_rx_detect *rx_detect) + { ++ void *rem_buf; ++ size_t rem_len; + ssize_t bytes_recvd; +- void *rem_hdr_buf; +- size_t rem_hdr_len; + +- rem_hdr_buf = (uint8_t *)&pe_entry->msg_hdr + pe_entry->done_len; +- rem_hdr_len = sizeof(pe_entry->msg_hdr) - pe_entry->done_len; ++ rem_buf = (uint8_t *) &rx_detect->hdr + rx_detect->done_len; ++ rem_len = sizeof(rx_detect->hdr) - rx_detect->done_len; + +- bytes_recvd = ofi_recv_socket(pe_entry->ep->conn_fd, +- rem_hdr_buf, rem_hdr_len, 0); +- if (bytes_recvd <= 0) +- return (bytes_recvd)? -errno: -FI_ENOTCONN; ++ if (!rem_len) ++ return FI_SUCCESS; + +- pe_entry->done_len += bytes_recvd; ++ if (sbuf->len != sbuf->off) { ++ bytes_recvd = tcpx_read_from_buffer(sbuf, rem_buf, rem_len); ++ } else { ++ bytes_recvd = ofi_recv_socket(sock, rem_buf, rem_len, 0); ++ } ++ if (bytes_recvd <= 0) ++ return (bytes_recvd)? -ofi_sockerr(): -FI_ENOTCONN; + +- if (pe_entry->done_len < sizeof(pe_entry->msg_hdr)) +- return -FI_EAGAIN; ++ rx_detect->done_len += bytes_recvd; ++ return (rem_len == bytes_recvd)? FI_SUCCESS : -FI_EAGAIN; ++} + +- pe_entry->msg_hdr.op_data = TCPX_OP_MSG_RECV; +- return ofi_truncate_iov(pe_entry->msg_data.iov, +- &pe_entry->msg_data.iov_cnt, +- (ntohll(pe_entry->msg_hdr.size) - +- sizeof(pe_entry->msg_hdr))); ++static ssize_t tcpx_readv_from_buffer(struct stage_buf *sbuf, ++ struct iovec *iov, ++ int iov_cnt) ++{ ++ ssize_t ret = 0; ++ size_t bytes_read; ++ int i; ++ ++ if (iov_cnt == 1) ++ return tcpx_read_from_buffer(sbuf, iov[0].iov_base, ++ iov[0].iov_len); ++ ++ for (i = 0; i < iov_cnt; i++) { ++ bytes_read = tcpx_read_from_buffer(sbuf, iov[i].iov_base, ++ iov[i].iov_len); ++ ret += bytes_read; ++ if ((bytes_read < iov[i].iov_len) || ++ !(sbuf->len - sbuf->off)) ++ break; ++ } ++ return ret; + } + +-int tcpx_recv_msg(struct tcpx_pe_entry *pe_entry) ++int tcpx_recv_msg_data(struct tcpx_xfer_entry *rx_entry) + { + ssize_t bytes_recvd; +- int ret; + +- if (pe_entry->done_len < sizeof(pe_entry->msg_hdr)) { +- ret = tcpx_recv_msg_hdr(pe_entry); +- if (ret) +- return ret; ++ if (rx_entry->ep->stage_buf.len != rx_entry->ep->stage_buf.off) { ++ bytes_recvd = tcpx_readv_from_buffer(&rx_entry->ep->stage_buf, ++ rx_entry->msg_data.iov, ++ rx_entry->msg_data.iov_cnt); ++ }else { ++ bytes_recvd = ofi_readv_socket(rx_entry->ep->conn_fd, ++ rx_entry->msg_data.iov, ++ rx_entry->msg_data.iov_cnt); + } +- +- bytes_recvd = ofi_readv_socket(pe_entry->ep->conn_fd, +- pe_entry->msg_data.iov, +- pe_entry->msg_data.iov_cnt); + if (bytes_recvd <= 0) +- return (bytes_recvd)? -errno: -FI_ENOTCONN; ++ return (bytes_recvd)? -ofi_sockerr(): -FI_ENOTCONN; + +- +- if (pe_entry->done_len < ntohll(pe_entry->msg_hdr.size)) { +- ofi_consume_iov(pe_entry->msg_data.iov, +- &pe_entry->msg_data.iov_cnt, ++ rx_entry->done_len += bytes_recvd; ++ if (rx_entry->done_len < ntohll(rx_entry->msg_hdr.hdr.size)) { ++ ofi_consume_iov(rx_entry->msg_data.iov, ++ &rx_entry->msg_data.iov_cnt, + bytes_recvd); ++ return -FI_EAGAIN; + } ++ return FI_SUCCESS; ++} ++ ++int tcpx_read_to_buffer(SOCKET sock, struct stage_buf *stage_buf) ++{ ++ int bytes_recvd; ++ ++ bytes_recvd = ofi_recv_socket(sock, stage_buf->buf, ++ stage_buf->size, 0); ++ if (bytes_recvd <= 0) ++ return (bytes_recvd)? -ofi_sockerr(): -FI_ENOTCONN; + +- pe_entry->done_len += bytes_recvd; ++ stage_buf->len = bytes_recvd; ++ stage_buf->off = 0; + return FI_SUCCESS; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_conn_mgr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_conn_mgr.c +index 54f1349..72048ba 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_conn_mgr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_conn_mgr.c +@@ -38,157 +38,31 @@ + #include + #include + +-static int poll_fd_resize(struct poll_fd_mgr *poll_mgr, int size) +-{ +- struct pollfd *new_poll_fds; +- struct poll_fd_info *new_poll_info; +- +- new_poll_fds = calloc(size, sizeof(*new_poll_fds)); +- if (!new_poll_fds) +- return -FI_ENOMEM; +- +- new_poll_info = calloc(size, sizeof(*new_poll_info)); +- if (!new_poll_info) { +- free(new_poll_fds); +- return -FI_ENOMEM; +- } +- +- if (poll_mgr->max_nfds) { +- memcpy(new_poll_fds, poll_mgr->poll_fds, +- poll_mgr->max_nfds * sizeof(*new_poll_fds)); +- free(poll_mgr->poll_fds); +- +- memcpy(new_poll_info, poll_mgr->poll_info, +- poll_mgr->max_nfds * sizeof(*new_poll_info)); +- free(poll_mgr->poll_info); +- } +- +- poll_mgr->poll_fds = new_poll_fds; +- poll_mgr->poll_info = new_poll_info; +- poll_mgr->max_nfds = size; +- +- return 0; +-} +- +-static void poll_fds_swap_del_last(struct poll_fd_mgr *poll_mgr, int index) +-{ +- poll_mgr->poll_fds[index] = poll_mgr->poll_fds[(poll_mgr->nfds) - 1]; +- poll_mgr->poll_info[index] = poll_mgr->poll_info[(poll_mgr->nfds) - 1]; +- poll_mgr->nfds--; +-} +- +-static int poll_fds_find_dup(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *fd_info_entry) +-{ +- struct tcpx_ep *tcpx_ep; +- struct tcpx_pep *tcpx_pep; +- int i; +- +- for (i = 1 ; i < poll_mgr->nfds ; i++) { +- switch (fd_info_entry->fid->fclass) { +- case FI_CLASS_EP: +- tcpx_ep = container_of(fd_info_entry->fid, struct tcpx_ep, +- util_ep.ep_fid.fid); +- if (poll_mgr->poll_fds[i].fd == tcpx_ep->conn_fd) +- return i; +- break; +- case FI_CLASS_PEP: +- tcpx_pep = container_of(fd_info_entry->fid, struct tcpx_pep, +- util_pep.pep_fid.fid); +- if (poll_mgr->poll_fds[i].fd == tcpx_pep->sock) +- return i; +- break; +- default: +- continue; +- } +- } +- return -1; +-} + +-static int poll_fds_add_item(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info) ++static int read_cm_data(SOCKET fd, struct tcpx_cm_context *cm_ctx, ++ struct ofi_ctrl_hdr *hdr) + { +- struct tcpx_ep *tcpx_ep; +- struct tcpx_pep *tcpx_pep; +- int ret; +- +- if (poll_mgr->nfds >= poll_mgr->max_nfds) { +- ret = poll_fd_resize(poll_mgr, poll_mgr->max_nfds << 1); +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "memory allocation failed\n"); +- return ret; +- } +- +- poll_mgr->poll_info[poll_mgr->nfds] = *poll_info; +- poll_mgr->poll_fds[poll_mgr->nfds].revents = 0; +- +- switch (poll_mgr->poll_info[poll_mgr->nfds].type) { +- case CONNECT_SOCK: +- case ACCEPT_SOCK: +- tcpx_ep = container_of(poll_info->fid, struct tcpx_ep, +- util_ep.ep_fid.fid); +- poll_mgr->poll_fds[poll_mgr->nfds].fd = tcpx_ep->conn_fd; +- poll_mgr->poll_fds[poll_mgr->nfds].events = POLLOUT; +- break; +- case PASSIVE_SOCK: +- tcpx_pep = container_of(poll_info->fid, struct tcpx_pep, +- util_pep.pep_fid.fid); +- +- poll_mgr->poll_fds[poll_mgr->nfds].fd = tcpx_pep->sock; +- poll_mgr->poll_fds[poll_mgr->nfds].events = POLLIN; +- break; +- default: +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "invalid fd\n"); +- return -FI_EINVAL; +- } +- poll_mgr->nfds++; +- return 0; +-} ++ cm_ctx->cm_data_sz = ntohs(hdr->seg_size); ++ if (cm_ctx->cm_data_sz) { ++ size_t data_sz = MIN(cm_ctx->cm_data_sz, ++ TCPX_MAX_CM_DATA_SIZE); ++ ssize_t ret = ofi_recv_socket(fd, cm_ctx->cm_data, ++ data_sz, MSG_WAITALL); ++ if ((size_t) ret != data_sz) ++ return -FI_EIO; ++ cm_ctx->cm_data_sz = data_sz; + +-static int handle_poll_list(struct poll_fd_mgr *poll_mgr) +-{ +- struct poll_fd_info *poll_item; +- int ret = FI_SUCCESS; +- int id = 0; +- +- fastlock_acquire(&poll_mgr->lock); +- while (!dlist_empty(&poll_mgr->list)) { +- poll_item = container_of(poll_mgr->list.next, +- struct poll_fd_info, entry); +- dlist_remove_init(&poll_item->entry); +- +- if (poll_item->flags & POLL_MGR_DEL) { +- id = poll_fds_find_dup(poll_mgr, poll_item); +- assert(id > 0); +- if (id <= 0) { +- ret = -FI_EINVAL; +- goto err; +- } +- +- poll_fds_swap_del_last(poll_mgr, id); +- poll_item->flags |= POLL_MGR_ACK; +- } else { +- assert(poll_fds_find_dup(poll_mgr, poll_item) < 0); +- ret = poll_fds_add_item(poll_mgr, poll_item); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "Failed to add fd to event polling\n"); +- } ++ if (OFI_UNLIKELY(cm_ctx->cm_data_sz > ++ TCPX_MAX_CM_DATA_SIZE)) { ++ ofi_discard_socket(fd, cm_ctx->cm_data_sz - ++ TCPX_MAX_CM_DATA_SIZE); + } +- +- if (poll_item->flags & POLL_MGR_FREE) +- free(poll_item); +- else +- poll_item->flags |= POLL_MGR_ACK; + } +-err: +- fastlock_release(&poll_mgr->lock); +- return ret; ++ return FI_SUCCESS; + } + + static int rx_cm_data(SOCKET fd, struct ofi_ctrl_hdr *hdr, +- int type, struct poll_fd_info *poll_info) ++ int type, struct tcpx_cm_context *cm_ctx) + { + ssize_t ret; + +@@ -197,26 +71,17 @@ static int rx_cm_data(SOCKET fd, struct ofi_ctrl_hdr *hdr, + if (ret != sizeof(*hdr)) + return -FI_EIO; + +- if (hdr->type != type) +- return -FI_ECONNREFUSED; +- + if (hdr->version != OFI_CTRL_VERSION) + return -FI_ENOPROTOOPT; + +- poll_info->cm_data_sz = ntohs(hdr->seg_size); +- if (poll_info->cm_data_sz) { +- if (poll_info->cm_data_sz > TCPX_MAX_CM_DATA_SIZE) +- return -FI_EINVAL; +- +- ret = ofi_recv_socket(fd, poll_info->cm_data, +- poll_info->cm_data_sz, MSG_WAITALL); +- if ((size_t) ret != poll_info->cm_data_sz) +- return -FI_EIO; ++ ret = read_cm_data(fd, cm_ctx, hdr); ++ if (hdr->type != type) { ++ ret = -FI_ECONNREFUSED; + } +- return FI_SUCCESS; ++ return ret; + } + +-static int tx_cm_data(SOCKET fd, uint8_t type, struct poll_fd_info *poll_info) ++static int tx_cm_data(SOCKET fd, uint8_t type, struct tcpx_cm_context *cm_ctx) + { + struct ofi_ctrl_hdr hdr; + ssize_t ret; +@@ -224,336 +89,391 @@ static int tx_cm_data(SOCKET fd, uint8_t type, struct poll_fd_info *poll_info) + memset(&hdr, 0, sizeof(hdr)); + hdr.version = OFI_CTRL_VERSION; + hdr.type = type; +- hdr.seg_size = htons((uint16_t) poll_info->cm_data_sz); ++ hdr.seg_size = htons((uint16_t) cm_ctx->cm_data_sz); + + ret = ofi_send_socket(fd, &hdr, sizeof(hdr), MSG_NOSIGNAL); + if (ret != sizeof(hdr)) + return -FI_EIO; + +- if (poll_info->cm_data_sz) { +- ret = ofi_send_socket(fd, poll_info->cm_data, +- poll_info->cm_data_sz, MSG_NOSIGNAL); +- if ((size_t) ret != poll_info->cm_data_sz) ++ if (cm_ctx->cm_data_sz) { ++ ret = ofi_send_socket(fd, cm_ctx->cm_data, ++ cm_ctx->cm_data_sz, MSG_NOSIGNAL); ++ if ((size_t) ret != cm_ctx->cm_data_sz) + return -FI_EIO; + } + return FI_SUCCESS; + } + +-static int send_conn_req(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info, +- struct tcpx_ep *ep, +- int index) ++static int tcpx_ep_msg_xfer_enable(struct tcpx_ep *ep) + { +- socklen_t len; +- int status, ret = FI_SUCCESS; +- +- assert(poll_mgr->poll_fds[index].revents == POLLOUT); ++ int ret; + +- len = sizeof(status); +- ret = getsockopt(ep->conn_fd, SOL_SOCKET, SO_ERROR, (char *) &status, &len); +- if (ret < 0 || status) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "connection failure\n"); +- return (ret < 0)? -errno : status; ++ fastlock_acquire(&ep->lock); ++ if (ep->cm_state != TCPX_EP_CONNECTING) { ++ fastlock_release(&ep->lock); ++ return -FI_EINVAL; + } ++ ep->progress_func = tcpx_ep_progress; ++ ret = fi_fd_nonblock(ep->conn_fd); ++ if (ret) ++ goto err; ++ ++ ret = tcpx_cq_wait_ep_add(ep); ++ if (ret) ++ goto err; + +- ret = tx_cm_data(ep->conn_fd, ofi_ctrl_connreq, poll_info); ++ ep->cm_state = TCPX_EP_CONNECTED; ++err: ++ fastlock_release(&ep->lock); + return ret; + } + +-static int proc_conn_resp(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info, +- struct tcpx_ep *ep, +- int index) ++static int proc_conn_resp(struct tcpx_cm_context *cm_ctx, ++ struct tcpx_ep *ep) + { + struct ofi_ctrl_hdr conn_resp; + struct fi_eq_cm_entry *cm_entry; ++ ssize_t len; + int ret = FI_SUCCESS; + +- assert(poll_mgr->poll_fds[index].revents == POLLIN); +- ret = rx_cm_data(ep->conn_fd, &conn_resp, ofi_ctrl_connresp, poll_info); ++ ret = rx_cm_data(ep->conn_fd, &conn_resp, ofi_ctrl_connresp, cm_ctx); + if (ret) + return ret; + +- cm_entry = calloc(1, sizeof(*cm_entry) + poll_info->cm_data_sz); +- if (!cm_entry) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "mem alloc failed\n"); ++ cm_entry = calloc(1, sizeof(*cm_entry) + cm_ctx->cm_data_sz); ++ if (!cm_entry) + return -FI_ENOMEM; +- } + +- cm_entry->fid = poll_info->fid; +- memcpy(cm_entry->data, poll_info->cm_data, poll_info->cm_data_sz); ++ cm_entry->fid = cm_ctx->fid; ++ memcpy(cm_entry->data, cm_ctx->cm_data, cm_ctx->cm_data_sz); + +- ret = (int) fi_eq_write(&ep->util_ep.eq->eq_fid, FI_CONNECTED, cm_entry, +- sizeof(*cm_entry) + poll_info->cm_data_sz, 0); +- if (ret < 0) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Error writing to EQ\n"); ++ ret = tcpx_ep_msg_xfer_enable(ep); ++ if (ret) ++ goto err; ++ ++ len = fi_eq_write(&ep->util_ep.eq->eq_fid, FI_CONNECTED, cm_entry, ++ sizeof(*cm_entry) + cm_ctx->cm_data_sz, 0); ++ if (len < 0) { ++ ret = (int) len; + goto err; + } +- ret = fi_fd_nonblock(ep->conn_fd); + err: + free(cm_entry); + return ret; + } + +-static void handle_connect(struct poll_fd_mgr *poll_mgr, +- int index) ++int tcpx_eq_wait_try_func(void *arg) + { ++ return FI_SUCCESS; ++} ++ ++static void client_recv_connresp(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) ++{ ++ struct fi_eq_err_entry err_entry = { 0 }; + struct tcpx_ep *ep; +- struct poll_fd_info *poll_info = &poll_mgr->poll_info[index]; ++ ssize_t ret; ++ ++ assert(cm_ctx->fid->fclass == FI_CLASS_EP); ++ ep = container_of(cm_ctx->fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ ++ ret = ofi_wait_fd_del(wait, ep->conn_fd); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "Could not remove fd from wait\n"); ++ goto err; ++ } ++ ++ ret = proc_conn_resp(cm_ctx, ep); ++ if (ret) ++ goto err; ++ ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, "Received Accept from server\n"); ++ free(cm_ctx); ++ return; ++err: ++ err_entry.fid = cm_ctx->fid; ++ err_entry.context = cm_ctx->fid->context; ++ err_entry.err = -ret; ++ if (cm_ctx->cm_data_sz) { ++ err_entry.err_data = calloc(1, cm_ctx->cm_data_sz); ++ if (OFI_LIKELY(err_entry.err_data != NULL)) { ++ memcpy(err_entry.err_data, cm_ctx->cm_data, ++ cm_ctx->cm_data_sz); ++ err_entry.err_data_size = cm_ctx->cm_data_sz; ++ } ++ } ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, ++ "fi_eq_write the conn refused %"PRId64"\n", ret); ++ free(cm_ctx); ++ /* `err_entry.err_data` must live until it is passed to user */ ++ ret = fi_eq_write(&ep->util_ep.eq->eq_fid, FI_NOTIFY, ++ &err_entry, sizeof(err_entry), UTIL_FLAG_ERROR); ++ if (OFI_UNLIKELY(ret < 0)) { ++ free(err_entry.err_data); ++ } ++} ++ ++static void server_send_cm_accept(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) ++{ ++ struct fi_eq_cm_entry cm_entry = {0}; + struct fi_eq_err_entry err_entry; ++ struct tcpx_ep *ep; + int ret; + +- assert(poll_info->fid->fclass == FI_CLASS_EP); +- ep = container_of(poll_info->fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ assert(cm_ctx->fid->fclass == FI_CLASS_EP); ++ ep = container_of(cm_ctx->fid, struct tcpx_ep, util_ep.ep_fid.fid); + +- switch (poll_info->state) { +- case ESTABLISH_CONN: +- ret = send_conn_req(poll_mgr, poll_info, ep, index); +- if (ret) +- goto err; ++ ret = tx_cm_data(ep->conn_fd, ofi_ctrl_connresp, cm_ctx); ++ if (ret) ++ goto err; + +- poll_info->state = RCV_RESP; +- poll_mgr->poll_fds[index].events = POLLIN; +- break; +- case RCV_RESP: +- ret = proc_conn_resp(poll_mgr, poll_info, ep, index); +- if (ret) +- goto err; ++ cm_entry.fid = cm_ctx->fid; ++ ret = (int) fi_eq_write(&ep->util_ep.eq->eq_fid, FI_CONNECTED, ++ &cm_entry, sizeof(cm_entry), 0); ++ if (ret < 0) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Error writing to EQ\n"); ++ } + +- poll_info->state = CONNECT_DONE; +- break; +- default: +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Invalid connection state\n"); +- ret = -FI_EINVAL; ++ ret = ofi_wait_fd_del(wait, ep->conn_fd); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "Could not remove fd from wait\n"); + goto err; + } ++ ++ ret = tcpx_ep_msg_xfer_enable(ep); ++ if (ret) ++ goto err; ++ ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, "Connection Accept Successful\n"); ++ free(cm_ctx); + return; + err: + memset(&err_entry, 0, sizeof err_entry); +- err_entry.fid = poll_info->fid; +- err_entry.context = poll_info->fid->context; ++ err_entry.fid = cm_ctx->fid; ++ err_entry.context = cm_ctx->fid->context; + err_entry.err = -ret; + +- poll_info->state = CONNECT_DONE; +- fi_eq_write(&ep->util_ep.eq->eq_fid, FI_SHUTDOWN, ++ free(cm_ctx); ++ fi_eq_write(&ep->util_ep.eq->eq_fid, FI_NOTIFY, + &err_entry, sizeof(err_entry), UTIL_FLAG_ERROR); + } + +-static void handle_connreq(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info) ++static void server_recv_connreq(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) + { + struct tcpx_conn_handle *handle; +- struct tcpx_pep *pep; + struct fi_eq_cm_entry *cm_entry; + struct ofi_ctrl_hdr conn_req; +- SOCKET sock; ++ socklen_t len; + int ret; + +- assert(poll_info->fid->fclass == FI_CLASS_PEP); +- pep = container_of(poll_info->fid, struct tcpx_pep, util_pep.pep_fid.fid); ++ assert(cm_ctx->fid->fclass == FI_CLASS_CONNREQ); + +- sock = accept(pep->sock, NULL, 0); +- if (sock < 0) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "accept error: %d\n", +- ofi_sockerr()); +- return; +- } +- ret = rx_cm_data(sock, &conn_req, ofi_ctrl_connreq, poll_info); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "cm data recv failed \n"); +- goto err1; +- } ++ handle = container_of(cm_ctx->fid, ++ struct tcpx_conn_handle, ++ handle); + +- handle = calloc(1, sizeof(*handle)); +- if (!handle) ++ ret = rx_cm_data(handle->conn_fd, &conn_req, ofi_ctrl_connreq, cm_ctx); ++ if (ret) + goto err1; + +- cm_entry = calloc(1, sizeof(*cm_entry) + poll_info->cm_data_sz); ++ cm_entry = calloc(1, sizeof(*cm_entry) + cm_ctx->cm_data_sz); + if (!cm_entry) +- goto err2; ++ goto err1; + +- handle->conn_fd = sock; +- cm_entry->fid = poll_info->fid; +- cm_entry->info = fi_dupinfo(&pep->info); ++ cm_entry->fid = &handle->pep->util_pep.pep_fid.fid; ++ cm_entry->info = fi_dupinfo(handle->pep->info); + if (!cm_entry->info) ++ goto err2; ++ ++ len = cm_entry->info->dest_addrlen = handle->pep->info->src_addrlen; ++ cm_entry->info->dest_addr = malloc(len); ++ if (!cm_entry->info->dest_addr) ++ goto err3; ++ ++ ret = ofi_getpeername(handle->conn_fd, cm_entry->info->dest_addr, &len); ++ if (ret) + goto err3; + + cm_entry->info->handle = &handle->handle; +- memcpy(cm_entry->data, poll_info->cm_data, poll_info->cm_data_sz); ++ memcpy(cm_entry->data, cm_ctx->cm_data, cm_ctx->cm_data_sz); + +- ret = (int) fi_eq_write(&pep->util_pep.eq->eq_fid, FI_CONNREQ, cm_entry, +- sizeof(*cm_entry) + poll_info->cm_data_sz, 0); ++ ret = (int) fi_eq_write(&handle->pep->util_pep.eq->eq_fid, FI_CONNREQ, cm_entry, ++ sizeof(*cm_entry) + cm_ctx->cm_data_sz, 0); + if (ret < 0) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Error writing to EQ\n"); +- goto err4; ++ goto err3; + } +- ++ ret = ofi_wait_fd_del(wait, handle->conn_fd); ++ if (ret) ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "fd deletion from ofi_wait failed\n"); + free(cm_entry); ++ free(cm_ctx); + return; +-err4: +- fi_freeinfo(cm_entry->info); + err3: +- free(cm_entry); ++ fi_freeinfo(cm_entry->info); + err2: +- free(handle); ++ free(cm_entry); + err1: +- ofi_close_socket(sock); ++ ofi_wait_fd_del(wait, handle->conn_fd); ++ ofi_close_socket(handle->conn_fd); ++ free(cm_ctx); ++ free(handle); + } + +-static void handle_accept_conn(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info) ++static void client_send_connreq(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) + { +- struct fi_eq_cm_entry cm_entry; +- struct fi_eq_err_entry err_entry; + struct tcpx_ep *ep; +- int ret; ++ struct fi_eq_err_entry err_entry; ++ socklen_t len; ++ int status, ret = FI_SUCCESS; ++ ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, "client send connreq\n"); ++ assert(cm_ctx->fid->fclass == FI_CLASS_EP); ++ ++ ep = container_of(cm_ctx->fid, struct tcpx_ep, util_ep.ep_fid.fid); + +- assert(poll_info->fid->fclass == FI_CLASS_EP); +- ep = container_of(poll_info->fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ len = sizeof(status); ++ ret = getsockopt(ep->conn_fd, SOL_SOCKET, SO_ERROR, (char *) &status, &len); ++ if (ret < 0 || status) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "connection failure\n"); ++ ret = (ret < 0)? -ofi_sockerr() : status; ++ goto err; ++ } + +- ret = tx_cm_data(ep->conn_fd, ofi_ctrl_connresp, poll_info); ++ ret = tx_cm_data(ep->conn_fd, ofi_ctrl_connreq, cm_ctx); + if (ret) + goto err; + +- cm_entry.fid = poll_info->fid; ++ ret = ofi_wait_fd_del(wait, ep->conn_fd); ++ if (ret) ++ goto err; + +- ret = (int) fi_eq_write(&ep->util_ep.eq->eq_fid, FI_CONNECTED, +- &cm_entry, sizeof(cm_entry), 0); +- if (ret < 0) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Error writing to EQ\n"); +- } ++ cm_ctx->type = CLIENT_RECV_CONNRESP; ++ ret = ofi_wait_fd_add(wait, ep->conn_fd, FI_EPOLL_IN, ++ tcpx_eq_wait_try_func, NULL, cm_ctx); ++ if (ret) ++ goto err; + +- ret = fi_fd_nonblock(ep->conn_fd); ++ wait->signal(wait); + return; + err: + memset(&err_entry, 0, sizeof err_entry); +- err_entry.fid = poll_info->fid; +- err_entry.context = poll_info->fid->context; +- err_entry.err = ret; ++ err_entry.fid = cm_ctx->fid; ++ err_entry.context = cm_ctx->fid->context; ++ err_entry.err = -ret; + +- fi_eq_write(&ep->util_ep.eq->eq_fid, FI_SHUTDOWN, ++ free(cm_ctx); ++ fi_eq_write(&ep->util_ep.eq->eq_fid, FI_NOTIFY, + &err_entry, sizeof(err_entry), UTIL_FLAG_ERROR); + } + +-static void handle_fd_events(struct poll_fd_mgr *poll_mgr) ++static void server_sock_accept(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) + { +- int i; ++ struct tcpx_conn_handle *handle; ++ struct tcpx_pep *pep; ++ SOCKET sock; ++ int ret; + +- /* Process the fd array from end to start. This allows us to handle +- * removing entries from the array. Also ignore the signal fd at index 0. +- */ +- for (i = poll_mgr->nfds-1; i > 0; i--) { +- if (!poll_mgr->poll_fds[i].revents) +- continue; ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, "Received Connreq\n"); ++ assert(cm_ctx->fid->fclass == FI_CLASS_PEP); ++ pep = container_of(cm_ctx->fid, struct tcpx_pep, ++ util_pep.pep_fid.fid); + +- switch (poll_mgr->poll_info[i].type) { +- case CONNECT_SOCK: +- handle_connect(poll_mgr, i); +- +- if (poll_mgr->poll_info[i].state == CONNECT_DONE) +- poll_fds_swap_del_last(poll_mgr, i); +- break; +- case PASSIVE_SOCK: +- handle_connreq(poll_mgr, &poll_mgr->poll_info[i]); +- break; +- case ACCEPT_SOCK: +- handle_accept_conn(poll_mgr, &poll_mgr->poll_info[i]); +- poll_fds_swap_del_last(poll_mgr, i); +- break; +- default: +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "should never end up here\n"); +- } ++ sock = accept(pep->sock, NULL, 0); ++ if (sock < 0) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "accept error: %d\n", ofi_sockerr()); ++ return; + } +-} +- +-static void *tcpx_conn_mgr_thread(void *data) +-{ +- struct tcpx_fabric *tcpx_fabric = (struct tcpx_fabric *) data; +- struct poll_fd_mgr *poll_mgr = &tcpx_fabric->poll_mgr; +- int ret; + +- ret = poll_fd_resize(poll_mgr, 64); +- if (ret) { ++ handle = calloc(1, sizeof(*handle)); ++ if (!handle) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "poll_fd memory alloc failed\n"); +- return NULL; ++ "cannot allocate memory \n"); ++ goto err1; + } + +- poll_mgr->poll_fds[0].fd = poll_mgr->signal.fd[FI_READ_FD]; +- poll_mgr->poll_fds[0].events = POLLIN; +- poll_mgr->nfds = 1; ++ cm_ctx = calloc(1, sizeof(*cm_ctx)); ++ if (!cm_ctx) ++ goto err2; + +- while (poll_mgr->run) { +- ret = poll(poll_mgr->poll_fds, poll_mgr->nfds, -1); +- if (ret < 0) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "Poll failed\n"); +- break; +- } ++ handle->conn_fd = sock; ++ handle->handle.fclass = FI_CLASS_CONNREQ; ++ handle->pep = pep; ++ cm_ctx->fid = &handle->handle; ++ cm_ctx->type = SERVER_RECV_CONNREQ; ++ ++ ret = ofi_wait_fd_add(wait, sock, FI_EPOLL_IN, ++ tcpx_eq_wait_try_func, ++ NULL, (void *) cm_ctx); ++ if (ret) ++ goto err3; ++ wait->signal(wait); ++ return; ++err3: ++ free(cm_ctx); ++err2: ++ free(handle); ++err1: ++ ofi_close_socket(sock); ++} + +- if (poll_mgr->poll_fds[0].revents & POLLIN) { +- fd_signal_reset(&poll_mgr->signal); +- if (handle_poll_list(poll_mgr)) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "fd list add or remove failed\n"); +- } +- } +- handle_fd_events(poll_mgr); ++static void process_cm_ctx(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) ++{ ++ switch (cm_ctx->type) { ++ case SERVER_SOCK_ACCEPT: ++ server_sock_accept(wait,cm_ctx); ++ break; ++ case CLIENT_SEND_CONNREQ: ++ client_send_connreq(wait, cm_ctx); ++ break; ++ case SERVER_RECV_CONNREQ: ++ server_recv_connreq(wait, cm_ctx); ++ break; ++ case SERVER_SEND_CM_ACCEPT: ++ server_send_cm_accept(wait, cm_ctx); ++ break; ++ case CLIENT_RECV_CONNRESP: ++ client_recv_connresp(wait, cm_ctx); ++ break; ++ default: ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "should never end up here\n"); + } +- return NULL; + } + +-void tcpx_conn_mgr_close(struct tcpx_fabric *tcpx_fabric) ++void tcpx_conn_mgr_run(struct util_eq *eq) + { +- struct poll_fd_info *poll_info; ++ struct util_wait_fd *wait_fd; ++ void *wait_contexts[MAX_EPOLL_EVENTS]; ++ int num_fds = 0, i; + +- tcpx_fabric->poll_mgr.run = 0; +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); ++ assert(eq->wait != NULL); + +- if (tcpx_fabric->conn_mgr_thread && +- pthread_join(tcpx_fabric->conn_mgr_thread, NULL)) { +- FI_DBG(&tcpx_prov, FI_LOG_FABRIC, +- "cm thread failed to join\n"); +- } ++ wait_fd = container_of(eq->wait, struct util_wait_fd, ++ util_wait); + +- while (!dlist_empty(&tcpx_fabric->poll_mgr.list)) { +- poll_info = container_of(tcpx_fabric->poll_mgr.list.next, +- struct poll_fd_info, entry); +- dlist_remove(&poll_info->entry); +- assert(poll_info->flags & POLL_MGR_FREE); +- free(poll_info); +- } +- +- fastlock_destroy(&tcpx_fabric->poll_mgr.lock); +- fd_signal_free(&tcpx_fabric->poll_mgr.signal); +-} +- +-int tcpx_conn_mgr_init(struct tcpx_fabric *tcpx_fabric) +-{ +- int ret; ++ num_fds = fi_epoll_wait(wait_fd->epoll_fd, wait_contexts, ++ MAX_EPOLL_EVENTS, 0); ++ if (num_fds < 0) ++ return; + +- dlist_init(&tcpx_fabric->poll_mgr.list); +- fastlock_init(&tcpx_fabric->poll_mgr.lock); +- ret = fd_signal_init(&tcpx_fabric->poll_mgr.signal); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_FABRIC,"signal init failed\n"); +- goto err; +- } ++ for ( i = 0; i < num_fds; i++) { + +- tcpx_fabric->poll_mgr.run = 1; +- ret = pthread_create(&tcpx_fabric->conn_mgr_thread, 0, +- tcpx_conn_mgr_thread, (void *) tcpx_fabric); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_FABRIC, +- "Failed creating tcpx connection manager thread"); ++ /* skip wake up signals */ ++ if (&wait_fd->util_wait.wait_fid.fid == wait_contexts[i]) ++ continue; + +- goto err1; ++ process_cm_ctx(eq->wait, ++ (struct tcpx_cm_context *) ++ wait_contexts[i]); + } +- return 0; +-err1: +- fd_signal_free(&tcpx_fabric->poll_mgr.signal); +-err: +- fastlock_destroy(&tcpx_fabric->poll_mgr.lock); +- return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_cq.c +index e735783..bad43f5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_cq.c +@@ -35,45 +35,229 @@ + + #include "tcpx.h" + ++#define TCPX_DEF_CQ_SIZE (1024) ++ ++static void tcpx_buf_pools_destroy(struct tcpx_buf_pool *buf_pools) ++{ ++ int i; ++ ++ for (i = 0; i < TCPX_OP_CODE_MAX; i++) ++ util_buf_pool_destroy(buf_pools[i].pool); ++} ++ + static int tcpx_cq_close(struct fid *fid) + { + int ret; +- struct util_cq *cq; ++ struct tcpx_cq *tcpx_cq; + +- cq = container_of(fid, struct util_cq, cq_fid.fid); +- ret = ofi_cq_cleanup(cq); ++ tcpx_cq = container_of(fid, struct tcpx_cq, util_cq.cq_fid.fid); ++ tcpx_buf_pools_destroy(tcpx_cq->buf_pools); ++ ret = ofi_cq_cleanup(&tcpx_cq->util_cq); + if (ret) + return ret; +- free(cq); ++ ++ free(tcpx_cq); + return 0; + } + ++struct tcpx_xfer_entry *tcpx_xfer_entry_alloc(struct tcpx_cq *tcpx_cq, ++ enum tcpx_xfer_op_codes type) ++{ ++ struct tcpx_xfer_entry *xfer_entry; ++ ++ tcpx_cq->util_cq.cq_fastlock_acquire(&tcpx_cq->util_cq.cq_lock); ++ ++ /* optimization: don't allocate queue_entry when cq is full */ ++ if (ofi_cirque_isfull(tcpx_cq->util_cq.cirq)) { ++ tcpx_cq->util_cq.cq_fastlock_release(&tcpx_cq->util_cq.cq_lock); ++ return NULL; ++ } ++ ++ xfer_entry = util_buf_alloc(tcpx_cq->buf_pools[type].pool); ++ if (!xfer_entry) { ++ tcpx_cq->util_cq.cq_fastlock_release(&tcpx_cq->util_cq.cq_lock); ++ FI_INFO(&tcpx_prov, FI_LOG_DOMAIN,"failed to get buffer\n"); ++ return NULL; ++ } ++ tcpx_cq->util_cq.cq_fastlock_release(&tcpx_cq->util_cq.cq_lock); ++ return xfer_entry; ++} ++ ++void tcpx_xfer_entry_release(struct tcpx_cq *tcpx_cq, ++ struct tcpx_xfer_entry *xfer_entry) ++{ ++ if (xfer_entry->ep->cur_rx_entry == xfer_entry) { ++ xfer_entry->ep->cur_rx_entry = NULL; ++ } ++ tcpx_cq->util_cq.cq_fastlock_acquire(&tcpx_cq->util_cq.cq_lock); ++ util_buf_release(tcpx_cq->buf_pools[xfer_entry->msg_hdr.hdr.op_data].pool, ++ xfer_entry); ++ tcpx_cq->util_cq.cq_fastlock_release(&tcpx_cq->util_cq.cq_lock); ++} ++ ++void tcpx_cq_report_completion(struct util_cq *cq, ++ struct tcpx_xfer_entry *xfer_entry, ++ int err) ++{ ++ struct fi_cq_err_entry err_entry; ++ ++ if (!(xfer_entry->flags & FI_COMPLETION)) ++ return; ++ ++ if (err) { ++ err_entry.op_context = xfer_entry->context; ++ err_entry.flags = xfer_entry->flags; ++ err_entry.len = 0; ++ err_entry.buf = NULL; ++ err_entry.data = ntohll(xfer_entry->msg_hdr.hdr.data); ++ err_entry.tag = 0; ++ err_entry.olen = 0; ++ err_entry.err = err; ++ err_entry.prov_errno = ofi_sockerr(); ++ err_entry.err_data = NULL; ++ err_entry.err_data_size = 0; ++ ++ ofi_cq_write_error(cq, &err_entry); ++ } else { ++ ofi_cq_write(cq, xfer_entry->context, ++ xfer_entry->flags, 0, NULL, ++ ntohll(xfer_entry->msg_hdr.hdr.data), 0); ++ ++ if (cq->wait) ++ ofi_cq_signal(&cq->cq_fid); ++ } ++} ++ ++static int tcpx_cq_control(struct fid *fid, int command, void *arg) ++{ ++ struct util_cq *cq; ++ int ret; ++ ++ cq = container_of(fid, struct util_cq, cq_fid.fid); ++ ++ switch(command) { ++ case FI_GETWAIT: ++ if (!cq->wait) ++ return -FI_ENOSYS; ++ ++ ret = fi_control(&cq->wait->wait_fid.fid, ++ command, arg); ++ if (ret) ++ return ret; ++ ++ return FI_SUCCESS; ++ default: ++ return -FI_ENOSYS; ++ } ++} ++ + static struct fi_ops tcpx_cq_fi_ops = { + .size = sizeof(struct fi_ops), + .close = tcpx_cq_close, + .bind = fi_no_bind, +- .control = fi_no_control, ++ .control = tcpx_cq_control, + .ops_open = fi_no_ops_open, + }; + ++/* Using this function to preset some values of buffers managed by util_buf_pool api. ++ * Note that the util_buf_pool uses first sizeof(slist_entry) bytes in every buffer ++ * internally for keeping buf list. So don't try to set those values. They won't stick ++ */ ++static int tcpx_buf_pool_init(void *pool_ctx, void *addr, ++ size_t len, void **context) ++{ ++ struct tcpx_buf_pool *pool = (struct tcpx_buf_pool *)pool_ctx; ++ struct tcpx_xfer_entry *xfer_entry; ++ int i; ++ ++ for (i = 0; i < pool->pool->attr.chunk_cnt; i++) { ++ xfer_entry = (struct tcpx_xfer_entry *) ++ ((char *)addr + i * pool->pool->entry_sz); ++ ++ xfer_entry->msg_hdr.hdr.version = OFI_CTRL_VERSION; ++ xfer_entry->msg_hdr.hdr.op_data = pool->op_type; ++ switch (pool->op_type) { ++ case TCPX_OP_MSG_RECV: ++ case TCPX_OP_MSG_SEND: ++ case TCPX_OP_MSG_RESP: ++ xfer_entry->msg_hdr.hdr.op = ofi_op_msg; ++ break; ++ case TCPX_OP_WRITE: ++ case TCPX_OP_REMOTE_WRITE: ++ xfer_entry->msg_hdr.hdr.op = ofi_op_write; ++ break; ++ case TCPX_OP_READ_REQ: ++ xfer_entry->msg_hdr.hdr.op = ofi_op_read_req; ++ xfer_entry->msg_hdr.hdr.size = ++ htonll(sizeof(xfer_entry->msg_hdr)); ++ break; ++ case TCPX_OP_READ_RSP: ++ xfer_entry->msg_hdr.hdr.op = ofi_op_read_rsp; ++ break; ++ case TCPX_OP_REMOTE_READ: ++ break; ++ default: ++ assert(0); ++ break; ++ } ++ } ++ return FI_SUCCESS; ++} ++ ++static int tcpx_buf_pools_create(struct tcpx_buf_pool *buf_pools) ++{ ++ int i, ret; ++ ++ for (i = 0; i < TCPX_OP_CODE_MAX; i++) { ++ buf_pools[i].op_type = i; ++ ++ ret = util_buf_pool_create_ex(&buf_pools[i].pool, ++ sizeof(struct tcpx_xfer_entry), ++ 16, 0, 1024, tcpx_buf_pool_init, ++ NULL, &buf_pools[i]); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "Unable to create buf pool\n"); ++ goto err; ++ } ++ } ++ return 0; ++err: ++ while (i--) { ++ util_buf_pool_destroy(buf_pools[i].pool); ++ } ++ return -FI_ENOMEM; ++} ++ + int tcpx_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq_fid, void *context) + { + int ret; +- struct util_cq *cq; ++ struct tcpx_cq *tcpx_cq; + +- cq = calloc(1, sizeof(*cq)); +- if (!cq) ++ tcpx_cq = calloc(1, sizeof(*tcpx_cq)); ++ if (!tcpx_cq) + return -FI_ENOMEM; + +- ret = ofi_cq_init(&tcpx_prov, domain, attr, cq, +- &ofi_cq_progress, context); +- if (ret) { +- free(cq); +- return ret; +- } ++ if (!attr->size) ++ attr->size = TCPX_DEF_CQ_SIZE; ++ ++ ret = tcpx_buf_pools_create(tcpx_cq->buf_pools); ++ if (ret) ++ goto free_cq; + +- *cq_fid = &cq->cq_fid; ++ ret = ofi_cq_init(&tcpx_prov, domain, attr, &tcpx_cq->util_cq, ++ &ofi_cq_progress, context); ++ if (ret) ++ goto destroy_pool; ++ ++ *cq_fid = &tcpx_cq->util_cq.cq_fid; + (*cq_fid)->fid.ops = &tcpx_cq_fi_ops; + return 0; ++ ++destroy_pool: ++ tcpx_buf_pools_destroy(tcpx_cq->buf_pools); ++free_cq: ++ free(tcpx_cq); ++ return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_domain.c +index c1e3031..9db4ed1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_domain.c +@@ -34,18 +34,83 @@ + #include + + #include "tcpx.h" ++extern struct fi_ops_msg tcpx_srx_msg_ops; + ++static int tcpx_srx_ctx_close(struct fid *fid) ++{ ++ struct tcpx_rx_ctx *srx_ctx; ++ struct slist_entry *entry; ++ struct tcpx_xfer_entry *xfer_entry; ++ ++ srx_ctx = container_of(fid, struct tcpx_rx_ctx, ++ rx_fid.fid); ++ ++ while (!slist_empty(&srx_ctx->rx_queue)) { ++ entry = slist_remove_head(&srx_ctx->rx_queue); ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ util_buf_release(srx_ctx->buf_pool, xfer_entry); ++ } ++ ++ util_buf_pool_destroy(srx_ctx->buf_pool); ++ fastlock_destroy(&srx_ctx->lock); ++ free(srx_ctx); ++ return FI_SUCCESS; ++} ++ ++static struct fi_ops fi_ops_srx_ctx = { ++ .size = sizeof(struct fi_ops), ++ .close = tcpx_srx_ctx_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int tcpx_srx_ctx(struct fid_domain *domain, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context) ++{ ++ struct tcpx_rx_ctx *srx_ctx; ++ int ret = FI_SUCCESS; ++ ++ srx_ctx = calloc(1, sizeof(*srx_ctx)); ++ if (!srx_ctx) ++ return -FI_ENOMEM; ++ ++ srx_ctx->rx_fid.fid.fclass = FI_CLASS_SRX_CTX; ++ srx_ctx->rx_fid.fid.context = context; ++ srx_ctx->rx_fid.fid.ops = &fi_ops_srx_ctx; ++ ++ srx_ctx->rx_fid.msg = &tcpx_srx_msg_ops; ++ slist_init(&srx_ctx->rx_queue); ++ ++ ret = fastlock_init(&srx_ctx->lock); ++ if (ret) ++ goto err1; ++ ++ ret = util_buf_pool_create(&srx_ctx->buf_pool, ++ sizeof(struct tcpx_xfer_entry), ++ 16, 0, 1024); ++ if (ret) ++ goto err2; ++ ++ *rx_ep = &srx_ctx->rx_fid; ++ return FI_SUCCESS; ++err2: ++ fastlock_destroy(&srx_ctx->lock); ++err1: ++ free(srx_ctx); ++ return ret; ++} + + static struct fi_ops_domain tcpx_domain_ops = { + .size = sizeof(struct fi_ops_domain), +- .av_open = ip_av_create, ++ .av_open = ofi_ip_av_create, + .cq_open = tcpx_cq_open, + .endpoint = tcpx_endpoint, + .scalable_ep = fi_no_scalable_ep, + .cntr_open = fi_no_cntr_open, + .poll_open = fi_poll_create, + .stx_ctx = fi_no_stx_context, +- .srx_ctx = fi_no_srx_context, ++ .srx_ctx = tcpx_srx_ctx, + .query_atomic = fi_no_query_atomic, + }; + +@@ -57,10 +122,6 @@ static int tcpx_domain_close(fid_t fid) + tcpx_domain = container_of(fid, struct tcpx_domain, + util_domain.domain_fid.fid); + +- ret = tcpx_progress_close(&tcpx_domain->progress); +- if (ret) +- return ret; +- + ret = ofi_domain_close(&tcpx_domain->util_domain); + if (ret) + return ret; +@@ -77,6 +138,13 @@ static struct fi_ops tcpx_domain_fi_ops = { + .ops_open = fi_no_ops_open, + }; + ++static struct fi_ops_mr tcpx_domain_fi_ops_mr = { ++ .size = sizeof(struct fi_ops_mr), ++ .reg = ofi_mr_reg, ++ .regv = ofi_mr_regv, ++ .regattr = ofi_mr_regattr, ++}; ++ + int tcpx_domain_open(struct fid_fabric *fabric, struct fi_info *info, + struct fid_domain **domain, void *context) + { +@@ -93,22 +161,15 @@ int tcpx_domain_open(struct fid_fabric *fabric, struct fi_info *info, + + ret = ofi_domain_init(fabric, info, &tcpx_domain->util_domain, context); + if (ret) +- goto err1; ++ goto err; + + *domain = &tcpx_domain->util_domain.domain_fid; + (*domain)->fid.ops = &tcpx_domain_fi_ops; + (*domain)->ops = &tcpx_domain_ops; +- +- ret = tcpx_progress_init(&tcpx_domain->progress); +- if (ret) +- goto err2; ++ (*domain)->mr = &tcpx_domain_fi_ops_mr; + + return 0; +-err2: +- if (ofi_domain_close(&tcpx_domain->util_domain)) +- FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, +- "ofi_domain_close failed\n"); +-err1: ++err: + free(tcpx_domain); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_ep.c +index 23a9380..f468b57 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_ep.c +@@ -49,20 +49,61 @@ + #include + #include + ++extern struct fi_ops_rma tcpx_rma_ops; ++ ++static inline struct tcpx_xfer_entry * ++tcpx_alloc_recv_entry(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_cq *tcpx_cq; ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.rx_cq, struct tcpx_cq, ++ util_cq); ++ ++ recv_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_MSG_RECV); ++ if (recv_entry) { ++ recv_entry->ep = tcpx_ep; ++ recv_entry->done_len = 0; ++ } ++ return recv_entry; ++} ++ ++static inline struct tcpx_xfer_entry * ++tcpx_alloc_send_entry(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *send_entry; ++ struct tcpx_cq *tcpx_cq; ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ ++ send_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_MSG_SEND); ++ if (send_entry) { ++ send_entry->ep = tcpx_ep; ++ send_entry->done_len = 0; ++ } ++ return send_entry; ++} ++ ++static inline void tcpx_queue_recv(struct tcpx_ep *tcpx_ep, ++ struct tcpx_xfer_entry *recv_entry) ++{ ++ fastlock_acquire(&tcpx_ep->lock); ++ slist_insert_tail(&recv_entry->entry, &tcpx_ep->rx_queue); ++ fastlock_release(&tcpx_ep->lock); ++} ++ + static ssize_t tcpx_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, + uint64_t flags) + { +- struct tcpx_domain *tcpx_domain; +- struct tcpx_pe_entry *recv_entry; ++ struct tcpx_xfer_entry *recv_entry; + struct tcpx_ep *tcpx_ep; + + tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); +- tcpx_domain = container_of(tcpx_ep->util_ep.domain, +- struct tcpx_domain, util_domain); + +- assert(msg->iov_count < TCPX_IOV_LIMIT); ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); + +- recv_entry = pe_entry_alloc(&tcpx_domain->progress); ++ recv_entry = tcpx_alloc_recv_entry(tcpx_ep); + if (!recv_entry) + return -FI_EAGAIN; + +@@ -70,201 +111,283 @@ static ssize_t tcpx_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, + memcpy(&recv_entry->msg_data.iov[0], &msg->msg_iov[0], + msg->iov_count * sizeof(struct iovec)); + +- recv_entry->ep = tcpx_ep; +- recv_entry->flags = flags; ++ recv_entry->flags = ((tcpx_ep->util_ep.rx_op_flags & FI_COMPLETION) | ++ flags | FI_MSG | FI_RECV); + recv_entry->context = msg->context; +- recv_entry->done_len = 0; + +- dlist_insert_tail(&recv_entry->entry, &tcpx_ep->rx_queue); ++ tcpx_queue_recv(tcpx_ep, recv_entry); + return FI_SUCCESS; + } + + static ssize_t tcpx_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, + fi_addr_t src_addr, void *context) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_ep *tcpx_ep; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ++ recv_entry = tcpx_alloc_recv_entry(tcpx_ep); ++ if (!recv_entry) ++ return -FI_EAGAIN; + +- msg_iov.iov_base = buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = src_addr; +- msg.context = context; +- msg.data = 0; ++ recv_entry->msg_data.iov_cnt = 1; ++ recv_entry->msg_data.iov[0].iov_base = buf; ++ recv_entry->msg_data.iov[0].iov_len = len; + +- return tcpx_recvmsg(ep, &msg, 0); ++ recv_entry->flags = ((tcpx_ep->util_ep.rx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_RECV); ++ recv_entry->context = context; ++ ++ tcpx_queue_recv(tcpx_ep, recv_entry); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, + size_t count, fi_addr_t src_addr, void *context) + { +- struct fi_msg msg; ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_ep *tcpx_ep; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ++ assert(count <= TCPX_IOV_LIMIT); ++ ++ recv_entry = tcpx_alloc_recv_entry(tcpx_ep); ++ if (!recv_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry->msg_data.iov_cnt = count; ++ memcpy(recv_entry->msg_data.iov, iov, count * sizeof(*iov)); ++ ++ recv_entry->flags = ((tcpx_ep->util_ep.rx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_RECV); ++ recv_entry->context = context; + +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = src_addr; +- msg.context = context; +- msg.data = 0; +- return tcpx_recvmsg(ep, &msg, 0); ++ tcpx_queue_recv(tcpx_ep, recv_entry); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, + uint64_t flags) + { + struct tcpx_ep *tcpx_ep; +- struct tcpx_domain *tcpx_domain; +- struct tcpx_pe_entry *send_entry; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_xfer_entry *tx_entry; + uint64_t data_len; +- int ret = FI_SUCCESS; + + tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); +- tcpx_domain = container_of(tcpx_ep->util_ep.domain, +- struct tcpx_domain, util_domain); +- +- send_entry = pe_entry_alloc(&tcpx_domain->progress); +- if (!send_entry) +- return -FI_ENOMEM; ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); + +- if (msg->iov_count > TCPX_IOV_LIMIT) { +- ret = -FI_EINVAL; +- goto err; +- } ++ tx_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_MSG_SEND); ++ if (!tx_entry) ++ return -FI_EAGAIN; + ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); + data_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count); ++ assert(!(flags & FI_INJECT) || (data_len <= TCPX_MAX_INJECT_SZ)); ++ tx_entry->msg_hdr.hdr.size = htonll(data_len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_hdr.hdr.flags = 0; + +- if (flags & FI_INJECT) { +- if (data_len > TCPX_MAX_INJECT_SZ) +- return -FI_EINVAL; +- } +- send_entry->msg_hdr.version = OFI_CTRL_VERSION; +- send_entry->msg_hdr.op = ofi_op_msg; +- send_entry->msg_hdr.op_data = TCPX_OP_MSG_SEND; +- send_entry->msg_hdr.size = htonll(data_len + sizeof(send_entry->msg_hdr)); +- +- send_entry->msg_data.iov[0].iov_base = (void *) &send_entry->msg_hdr; +- send_entry->msg_data.iov[0].iov_len = sizeof(send_entry->msg_hdr); +- send_entry->msg_data.iov_cnt = msg->iov_count + 1; ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ tx_entry->msg_data.iov_cnt = msg->iov_count + 1; + + if (flags & FI_INJECT) { + ofi_copy_iov_buf(msg->msg_iov, msg->iov_count, 0, +- send_entry->msg_data.inject, ++ tx_entry->msg_data.inject, + data_len, + OFI_COPY_IOV_TO_BUF); + +- send_entry->msg_data.iov[1].iov_base = (void *)send_entry->msg_data.inject; +- send_entry->msg_data.iov[1].iov_len = data_len; +- send_entry->msg_data.iov_cnt = 2; ++ tx_entry->msg_data.iov[1].iov_base = (void *)tx_entry->msg_data.inject; ++ tx_entry->msg_data.iov[1].iov_len = data_len; ++ tx_entry->msg_data.iov_cnt = 2; + } else { +- memcpy(&send_entry->msg_data.iov[1], &msg->msg_iov[0], ++ memcpy(&tx_entry->msg_data.iov[1], &msg->msg_iov[0], + msg->iov_count * sizeof(struct iovec)); + + } + ++ tx_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ flags | FI_MSG | FI_SEND); ++ + if (flags & FI_REMOTE_CQ_DATA) { +- send_entry->msg_hdr.flags |= OFI_REMOTE_CQ_DATA; +- send_entry->msg_hdr.data = htonll(msg->data); ++ tx_entry->msg_hdr.hdr.flags |= OFI_REMOTE_CQ_DATA; ++ tx_entry->msg_hdr.hdr.data = htonll(msg->data); + } + +- send_entry->msg_hdr.flags = htonl(send_entry->msg_hdr.flags); +- send_entry->ep = tcpx_ep; +- send_entry->context = msg->context; +- send_entry->done_len = 0; ++ if (flags & (FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE)) { ++ tx_entry->msg_hdr.hdr.flags |= OFI_DELIVERY_COMPLETE; ++ tx_entry->flags &= ~FI_COMPLETION; ++ } + +- dlist_insert_tail(&send_entry->entry, &tcpx_ep->tx_queue); ++ tx_entry->msg_hdr.hdr.flags = htonl(tx_entry->msg_hdr.hdr.flags); ++ tx_entry->ep = tcpx_ep; ++ tx_entry->context = msg->context; ++ tx_entry->done_len = 0; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); + return FI_SUCCESS; +-err: +- pe_entry_release(send_entry); +- return ret; + } + + static ssize_t tcpx_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, + fi_addr_t dest_addr, void *context) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = context; ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- return tcpx_sendmsg(ep, &msg, 0); ++ tx_entry->msg_hdr.hdr.size = htonll(len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ tx_entry->msg_data.iov[1].iov_base = (void *) buf; ++ tx_entry->msg_data.iov[1].iov_len = len; ++ tx_entry->msg_data.iov_cnt = 2; ++ tx_entry->context = context; ++ tx_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_SEND); ++ ++ tx_entry->msg_hdr.hdr.flags = 0; ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, + size_t count, fi_addr_t dest_addr, void *context) + { +- struct fi_msg msg; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; ++ uint64_t data_len; + +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = dest_addr; +- msg.context = context; ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); + +- return tcpx_sendmsg(ep, &msg, 0); ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; ++ ++ assert(count <= TCPX_IOV_LIMIT); ++ data_len = ofi_total_iov_len(iov, count); ++ tx_entry->msg_hdr.hdr.size = htonll(data_len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ tx_entry->msg_data.iov_cnt = count + 1; ++ memcpy(&tx_entry->msg_data.iov[1], &iov[0], ++ count * sizeof(struct iovec)); ++ ++ tx_entry->msg_hdr.hdr.flags = 0; ++ tx_entry->context = context; ++ tx_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_SEND); ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + + static ssize_t tcpx_inject(struct fid_ep *ep, const void *buf, size_t len, + fi_addr_t dest_addr) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = NULL; ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- return tcpx_sendmsg(ep, &msg, FI_INJECT | TCPX_NO_COMPLETION); ++ assert(len <= TCPX_MAX_INJECT_SZ); ++ tx_entry->msg_hdr.hdr.size = htonll(len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ memcpy(tx_entry->msg_data.inject, (char *) buf, len); ++ tx_entry->msg_data.iov[1].iov_base = (void *)tx_entry->msg_data.inject; ++ tx_entry->msg_data.iov[1].iov_len = len; ++ tx_entry->msg_data.iov_cnt = 2; ++ ++ tx_entry->msg_hdr.hdr.flags = 0; ++ tx_entry->flags = FI_MSG | FI_SEND; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, + uint64_t data, fi_addr_t dest_addr, void *context) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); + +- msg.msg_iov = &msg_iov; +- msg.desc = NULL; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = NULL; +- msg.data = data; ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- return tcpx_sendmsg(ep, &msg, FI_REMOTE_CQ_DATA); ++ tx_entry->msg_hdr.hdr.size = htonll(len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ tx_entry->msg_data.iov[1].iov_base = (void *) buf; ++ tx_entry->msg_data.iov[1].iov_len = len; ++ tx_entry->msg_data.iov_cnt = 2; ++ ++ tx_entry->msg_hdr.hdr.flags = htonl(OFI_REMOTE_CQ_DATA); ++ tx_entry->msg_hdr.hdr.data = htonll(data); ++ ++ tx_entry->context = context; ++ tx_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_SEND); ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_injectdata(struct fid_ep *ep, const void *buf, size_t len, + uint64_t data, fi_addr_t dest_addr) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); + +- msg.msg_iov = &msg_iov; +- msg.desc = NULL; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = NULL; +- msg.data = 0; ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- return tcpx_sendmsg(ep, &msg, FI_REMOTE_CQ_DATA | FI_INJECT | +- TCPX_NO_COMPLETION); ++ assert(len <= TCPX_MAX_INJECT_SZ); ++ tx_entry->msg_hdr.hdr.size = htonll(len + sizeof(tx_entry->msg_hdr)); ++ ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ memcpy(tx_entry->msg_data.inject, (char *) buf, len); ++ tx_entry->msg_data.iov[1].iov_base = (void *)tx_entry->msg_data.inject; ++ tx_entry->msg_data.iov[1].iov_len = len; ++ tx_entry->msg_data.iov_cnt = 2; ++ ++ tx_entry->msg_hdr.hdr.flags = htonl(OFI_REMOTE_CQ_DATA); ++ tx_entry->msg_hdr.hdr.data = htonll(data); ++ tx_entry->flags = FI_MSG | FI_SEND ; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + static struct fi_ops_msg tcpx_msg_ops = { +@@ -305,19 +428,14 @@ static int tcpx_ep_connect(struct fid_ep *ep, const void *addr, + const void *param, size_t paramlen) + { + struct tcpx_ep *tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); +- struct poll_fd_info *fd_info; +- struct util_fabric *util_fabric; +- struct tcpx_fabric *tcpx_fabric; ++ struct tcpx_cm_context *cm_ctx; + int ret; + +- util_fabric = tcpx_ep->util_ep.domain->fabric; +- tcpx_fabric = container_of(util_fabric, struct tcpx_fabric, util_fabric); +- + if (!addr || !tcpx_ep->conn_fd || paramlen > TCPX_MAX_CM_DATA_SIZE) + return -FI_EINVAL; + +- fd_info = calloc(1, sizeof(*fd_info)); +- if (!fd_info) { ++ cm_ctx = calloc(1, sizeof(*cm_ctx)); ++ if (!cm_ctx) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, + "cannot allocate memory \n"); + return -FI_ENOMEM; +@@ -325,91 +443,163 @@ static int tcpx_ep_connect(struct fid_ep *ep, const void *addr, + + ret = connect(tcpx_ep->conn_fd, (struct sockaddr *) addr, + (socklen_t) ofi_sizeofaddr(addr)); +- if (ret && errno != FI_EINPROGRESS) { +- free(fd_info); +- return -errno; ++ if (ret && ofi_sockerr() != FI_EINPROGRESS) { ++ ret = -ofi_sockerr(); ++ goto err; + } + +- fd_info->fid = &tcpx_ep->util_ep.ep_fid.fid; +- fd_info->flags = POLL_MGR_FREE; +- fd_info->type = CONNECT_SOCK; +- fd_info->state = ESTABLISH_CONN; ++ cm_ctx->fid = &tcpx_ep->util_ep.ep_fid.fid; ++ cm_ctx->type = CLIENT_SEND_CONNREQ; + + if (paramlen) { +- fd_info->cm_data_sz = paramlen; +- memcpy(fd_info->cm_data, param, paramlen); ++ cm_ctx->cm_data_sz = paramlen; ++ memcpy(cm_ctx->cm_data, param, paramlen); + } + +- fastlock_acquire(&tcpx_fabric->poll_mgr.lock); +- dlist_insert_tail(&fd_info->entry, &tcpx_fabric->poll_mgr.list); +- fastlock_release(&tcpx_fabric->poll_mgr.lock); +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); ++ ret = ofi_wait_fd_add(tcpx_ep->util_ep.eq->wait, tcpx_ep->conn_fd, ++ FI_EPOLL_OUT, tcpx_eq_wait_try_func, NULL,cm_ctx); ++ if (ret) ++ goto err; ++ ++ tcpx_ep->util_ep.eq->wait->signal(tcpx_ep->util_ep.eq->wait); + return 0; ++err: ++ free(cm_ctx); ++ return ret; + } + + static int tcpx_ep_accept(struct fid_ep *ep, const void *param, size_t paramlen) + { + struct tcpx_ep *tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); +- struct poll_fd_info *fd_info; +- struct util_fabric *util_fabric; +- struct tcpx_fabric *tcpx_fabric; +- +- util_fabric = tcpx_ep->util_ep.domain->fabric; +- tcpx_fabric = container_of(util_fabric, struct tcpx_fabric, util_fabric); ++ struct tcpx_cm_context *cm_ctx; ++ int ret; + + if (tcpx_ep->conn_fd == INVALID_SOCKET) + return -FI_EINVAL; + +- fd_info = calloc(1, sizeof(*fd_info)); +- if (!fd_info) { ++ cm_ctx = calloc(1, sizeof(*cm_ctx)); ++ if (!cm_ctx) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, + "cannot allocate memory \n"); + return -FI_ENOMEM; + } + +- fd_info->fid = &tcpx_ep->util_ep.ep_fid.fid; +- fd_info->flags = POLL_MGR_FREE; +- fd_info->type = ACCEPT_SOCK; ++ cm_ctx->fid = &tcpx_ep->util_ep.ep_fid.fid; ++ cm_ctx->type = SERVER_SEND_CM_ACCEPT; + if (paramlen) { +- fd_info->cm_data_sz = paramlen; +- memcpy(fd_info->cm_data, param, paramlen); ++ cm_ctx->cm_data_sz = paramlen; ++ memcpy(cm_ctx->cm_data, param, paramlen); + } + +- fastlock_acquire(&tcpx_fabric->poll_mgr.lock); +- dlist_insert_tail(&fd_info->entry, &tcpx_fabric->poll_mgr.list); +- fastlock_release(&tcpx_fabric->poll_mgr.lock); +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); ++ ret = ofi_wait_fd_add(tcpx_ep->util_ep.eq->wait, tcpx_ep->conn_fd, ++ FI_EPOLL_OUT, tcpx_eq_wait_try_func, NULL, cm_ctx); ++ if (ret) { ++ free(cm_ctx); ++ return ret; ++ } ++ tcpx_ep->util_ep.eq->wait->signal(tcpx_ep->util_ep.eq->wait); + return 0; + } + + static int tcpx_ep_shutdown(struct fid_ep *ep, uint64_t flags) + { + struct tcpx_ep *tcpx_ep; +- struct fi_eq_cm_entry eq_entry; + int ret; + + tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); + + ret = ofi_shutdown(tcpx_ep->conn_fd, SHUT_RDWR); +- if (ret && errno != ENOTCONN) { ++ if (ret && ofi_sockerr() != ENOTCONN) { + FI_WARN(&tcpx_prov, FI_LOG_EP_DATA, "ep shutdown unsuccessful\n"); +- return -errno; + } + +- eq_entry.fid = &ep->fid; +- ret = fi_eq_write(&tcpx_ep->util_ep.eq->eq_fid, FI_SHUTDOWN, +- &eq_entry, sizeof(eq_entry), 0); +- if (ret < 0) { ++ fastlock_acquire(&tcpx_ep->lock); ++ ret = tcpx_ep_shutdown_report(tcpx_ep, &ep->fid); ++ fastlock_release(&tcpx_ep->lock); ++ if (ret) { + FI_WARN(&tcpx_prov, FI_LOG_EP_DATA, "Error writing to EQ\n"); + } ++ ++ return ret; ++} ++ ++static int tcpx_pep_sock_create(struct tcpx_pep *pep) ++{ ++ int ret, af; ++ ++ switch (pep->info->addr_format) { ++ case FI_SOCKADDR: ++ case FI_SOCKADDR_IN: ++ case FI_SOCKADDR_IN6: ++ af = ((struct sockaddr *)pep->info->src_addr)->sa_family; ++ break; ++ default: ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "invalid source address format\n"); ++ return -FI_EINVAL; ++ } ++ ++ pep->sock = ofi_socket(af, SOCK_STREAM, 0); ++ if (pep->sock == INVALID_SOCKET) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "failed to create listener: %s\n", ++ strerror(ofi_sockerr())); ++ return -FI_EIO; ++ } ++ ++ ret = tcpx_setup_socket(pep->sock); ++ if (ret) { ++ goto err; ++ } ++ ++ ret = bind(pep->sock, pep->info->src_addr, ++ (socklen_t) pep->info->src_addrlen); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "failed to bind listener: %s\n", ++ strerror(ofi_sockerr())); ++ goto err; ++ } + return FI_SUCCESS; ++err: ++ ofi_close_socket(pep->sock); ++ pep->sock = INVALID_SOCKET; ++ return ret; ++} ++ ++static int tcpx_ep_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ struct tcpx_ep *tcpx_ep; ++ size_t addrlen_in = *addrlen; ++ int ret; ++ ++ tcpx_ep = container_of(fid, struct tcpx_ep, util_ep.ep_fid); ++ ret = ofi_getsockname(tcpx_ep->conn_fd, addr, (socklen_t *)addrlen); ++ if (ret) ++ return -ofi_sockerr(); ++ ++ return (addrlen_in < *addrlen)? -FI_ETOOSMALL: FI_SUCCESS; ++} ++ ++static int tcpx_ep_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) ++{ ++ struct tcpx_ep *tcpx_ep; ++ size_t addrlen_in = *addrlen; ++ int ret; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ret = ofi_getpeername(tcpx_ep->conn_fd, addr, (socklen_t *)addrlen); ++ if (ret) ++ return -ofi_sockerr(); ++ ++ return (addrlen_in < *addrlen)? -FI_ETOOSMALL: FI_SUCCESS; + } + + static struct fi_ops_cm tcpx_cm_ops = { + .size = sizeof(struct fi_ops_cm), + .setname = fi_no_setname, +- .getname = fi_no_getname, +- .getpeer = fi_no_getpeer, ++ .getname = tcpx_ep_getname, ++ .getpeer = tcpx_ep_getpeer, + .connect = tcpx_ep_connect, + .listen = fi_no_listen, + .accept = tcpx_ep_accept, +@@ -418,39 +608,82 @@ static struct fi_ops_cm tcpx_cm_ops = { + .join = fi_no_join, + }; + +-static void tcpx_ep_tx_rx_queues_release(struct tcpx_ep *ep, +- struct tcpx_progress *progress) ++void tcpx_rx_msg_release(struct tcpx_xfer_entry *rx_entry) ++{ ++ struct tcpx_cq *tcpx_cq; ++ ++ assert(rx_entry->msg_hdr.hdr.op_data == TCPX_OP_MSG_RECV); ++ ++ if (rx_entry->ep->srx_ctx) { ++ tcpx_srx_xfer_release(rx_entry->ep->srx_ctx, rx_entry); ++ } else { ++ tcpx_cq = container_of(rx_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ } ++} ++ ++static void tcpx_ep_tx_rx_queues_release(struct tcpx_ep *ep) + { +- struct dlist_entry *entry; +- struct tcpx_pe_entry *pe_entry; ++ struct slist_entry *entry; ++ struct tcpx_xfer_entry *xfer_entry; ++ struct tcpx_cq *tcpx_cq; ++ ++ fastlock_acquire(&ep->lock); ++ while (!slist_empty(&ep->tx_queue)) { ++ entry = ep->tx_queue.head; ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ slist_remove_head(&ep->tx_queue); ++ tcpx_cq = container_of(xfer_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, xfer_entry); ++ } + +- while (!dlist_empty(&ep->tx_queue)) { +- entry = ep->tx_queue.next; +- pe_entry = container_of(entry, struct tcpx_pe_entry, entry); +- dlist_remove(entry); +- pe_entry_release(pe_entry); ++ while (!slist_empty(&ep->rx_queue)) { ++ entry = ep->rx_queue.head; ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ slist_remove_head(&ep->rx_queue); ++ tcpx_cq = container_of(xfer_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, xfer_entry); + } + +- while (!dlist_empty(&ep->rx_queue)) { +- entry = ep->rx_queue.next; +- pe_entry = container_of(entry, struct tcpx_pe_entry, entry); +- dlist_remove(entry); +- pe_entry_release(pe_entry); ++ while (!slist_empty(&ep->rma_read_queue)) { ++ entry = ep->rma_read_queue.head; ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ slist_remove_head(&ep->rma_read_queue); ++ tcpx_cq = container_of(xfer_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, xfer_entry); + } ++ ++ while (!slist_empty(&ep->tx_rsp_pend_queue)) { ++ entry = ep->tx_rsp_pend_queue.head; ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ slist_remove_head(&ep->tx_rsp_pend_queue); ++ tcpx_cq = container_of(xfer_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, xfer_entry); ++ } ++ ++ fastlock_release(&ep->lock); + } + + static int tcpx_ep_close(struct fid *fid) + { +- struct tcpx_ep *ep; +- struct tcpx_domain *tcpx_domain; ++ struct tcpx_ep *ep = container_of(fid, struct tcpx_ep, ++ util_ep.ep_fid.fid); + +- ep = container_of(fid, struct tcpx_ep, util_ep.ep_fid.fid); +- tcpx_domain = container_of(ep->util_ep.domain, +- struct tcpx_domain, util_domain); ++ tcpx_ep_tx_rx_queues_release(ep); ++ tcpx_cq_wait_ep_del(ep); ++ if (ep->util_ep.eq->wait) ++ ofi_wait_fd_del(ep->util_ep.eq->wait, ep->conn_fd); + +- tcpx_ep_tx_rx_queues_release(ep, &tcpx_domain->progress); ++ ofi_eq_remove_fid_events(ep->util_ep.eq, ++ &ep->util_ep.ep_fid.fid); + ofi_close_socket(ep->conn_fd); + ofi_endpoint_close(&ep->util_ep); ++ fastlock_destroy(&ep->lock); + + free(ep); + return 0; +@@ -473,10 +706,18 @@ static int tcpx_ep_ctrl(struct fid *fid, int command, void *arg) + } + static int tcpx_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { +- struct util_ep *util_ep; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_rx_ctx *rx_ctx; ++ ++ tcpx_ep = container_of(fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ ++ if (bfid->fclass == FI_CLASS_SRX_CTX) { ++ rx_ctx = container_of(bfid, struct tcpx_rx_ctx, rx_fid.fid); ++ tcpx_ep->srx_ctx = rx_ctx; ++ return FI_SUCCESS; ++ } + +- util_ep = container_of(fid, struct util_ep, ep_fid.fid); +- return ofi_ep_bind(util_ep, bfid, flags); ++ return ofi_ep_bind(&tcpx_ep->util_ep, bfid, flags); + } + + static struct fi_ops tcpx_ep_fi_ops = { +@@ -518,12 +759,17 @@ static struct fi_ops_ep tcpx_ep_ops = { + .tx_size_left = fi_no_tx_size_left, + }; + ++static void tcpx_empty_progress(struct tcpx_ep *ep) ++{ ++} ++ + int tcpx_endpoint(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep_fid, void *context) + { + struct tcpx_ep *ep; ++ struct tcpx_pep *pep; + struct tcpx_conn_handle *handle; +- int af, ret; ++ int ret; + + ep = calloc(1, sizeof(*ep)); + if (!ep) +@@ -535,37 +781,61 @@ int tcpx_endpoint(struct fid_domain *domain, struct fi_info *info, + goto err1; + + if (info->handle) { +- handle = container_of(info->handle, struct tcpx_conn_handle, +- handle); +- ep->conn_fd = handle->conn_fd; +- free(handle); ++ if (((fid_t) info->handle)->fclass == FI_CLASS_PEP) { ++ pep = container_of(info->handle, struct tcpx_pep, ++ util_pep.pep_fid.fid); ++ ++ ep->conn_fd = pep->sock; ++ pep->sock = INVALID_SOCKET; ++ } else { ++ handle = container_of(info->handle, ++ struct tcpx_conn_handle, handle); ++ ep->conn_fd = handle->conn_fd; ++ free(handle); ++ ++ ret = tcpx_setup_socket(ep->conn_fd); ++ if (ret) ++ goto err3; ++ } + } else { +- if (info->src_addr) +- af = ((const struct sockaddr *) info->src_addr)->sa_family; +- else if (info->dest_addr) +- af = ((const struct sockaddr *) info->dest_addr)->sa_family; +- else +- af = ofi_get_sa_family(info->addr_format); +- +- ep->conn_fd = ofi_socket(af, SOCK_STREAM, 0); ++ ep->conn_fd = ofi_socket(ofi_get_sa_family(info), SOCK_STREAM, 0); + if (ep->conn_fd == INVALID_SOCKET) { +- ret = -errno; ++ ret = -ofi_sockerr(); + goto err2; + } ++ ++ ret = tcpx_setup_socket(ep->conn_fd); ++ if (ret) ++ goto err3; + } +- ret = tcpx_setup_socket(ep->conn_fd); ++ ++ ep->cm_state = TCPX_EP_CONNECTING; ++ ep->progress_func = tcpx_empty_progress; ++ ret = fastlock_init(&ep->lock); + if (ret) + goto err3; + +- dlist_init(&ep->rx_queue); +- dlist_init(&ep->tx_queue); ++ ep->stage_buf.size = STAGE_BUF_SIZE; ++ ep->stage_buf.len = 0; ++ ep->stage_buf.off = 0; ++ ++ slist_init(&ep->rx_queue); ++ slist_init(&ep->tx_queue); ++ slist_init(&ep->rma_read_queue); ++ slist_init(&ep->tx_rsp_pend_queue); + + *ep_fid = &ep->util_ep.ep_fid; + (*ep_fid)->fid.ops = &tcpx_ep_fi_ops; + (*ep_fid)->ops = &tcpx_ep_ops; + (*ep_fid)->cm = &tcpx_cm_ops; + (*ep_fid)->msg = &tcpx_msg_ops; ++ (*ep_fid)->rma = &tcpx_rma_ops; + ++ ep->get_rx_entry[ofi_op_msg] = tcpx_get_rx_entry_op_msg; ++ ep->get_rx_entry[ofi_op_tagged] = tcpx_get_rx_entry_op_invalid; ++ ep->get_rx_entry[ofi_op_read_req] = tcpx_get_rx_entry_op_read_req; ++ ep->get_rx_entry[ofi_op_read_rsp] = tcpx_get_rx_entry_op_read_rsp; ++ ep->get_rx_entry[ofi_op_write] =tcpx_get_rx_entry_op_write; + return 0; + err3: + ofi_close_socket(ep->conn_fd); +@@ -579,26 +849,14 @@ err1: + static int tcpx_pep_fi_close(struct fid *fid) + { + struct tcpx_pep *pep; +- struct tcpx_fabric *tcpx_fabric; + + pep = container_of(fid, struct tcpx_pep, util_pep.pep_fid.fid); ++ if (pep->util_pep.eq) ++ ofi_wait_fd_del(pep->util_pep.eq->wait, pep->sock); + +- tcpx_fabric = container_of(pep->util_pep.fabric, struct tcpx_fabric, +- util_fabric); +- +- /* It's possible to close the PEP before adding completes */ +- fastlock_acquire(&tcpx_fabric->poll_mgr.lock); +- pep->poll_info.flags = POLL_MGR_DEL; +- if (pep->poll_info.entry.next == pep->poll_info.entry.prev) +- dlist_insert_tail(&pep->poll_info.entry, &tcpx_fabric->poll_mgr.list); +- +- fastlock_release(&tcpx_fabric->poll_mgr.lock); +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); +- +- while (!(pep->poll_info.flags & POLL_MGR_ACK)) +- sleep(0); +- ++ ofi_close_socket(pep->sock); + ofi_pep_close(&pep->util_pep); ++ fi_freeinfo(pep->info); + free(pep); + return 0; + } +@@ -628,57 +886,105 @@ static struct fi_ops tcpx_pep_fi_ops = { + .ops_open = fi_no_ops_open, + }; + ++static int tcpx_pep_setname(fid_t fid, void *addr, size_t addrlen) ++{ ++ struct tcpx_pep *tcpx_pep; ++ ++ if ((addrlen != sizeof(struct sockaddr_in)) && ++ (addrlen != sizeof(struct sockaddr_in6))) ++ return -FI_EINVAL; ++ ++ tcpx_pep = container_of(fid, struct tcpx_pep, ++ util_pep.pep_fid); ++ ++ if (tcpx_pep->sock != INVALID_SOCKET) { ++ ofi_close_socket(tcpx_pep->sock); ++ tcpx_pep->sock = INVALID_SOCKET; ++ } ++ ++ if (tcpx_pep->info->src_addr) { ++ free(tcpx_pep->info->src_addr); ++ tcpx_pep->info->src_addrlen = 0; ++ } ++ ++ ++ tcpx_pep->info->src_addr = mem_dup(addr, addrlen); ++ if (!tcpx_pep->info->src_addr) ++ return -FI_ENOMEM; ++ tcpx_pep->info->src_addrlen = addrlen; ++ ++ return tcpx_pep_sock_create(tcpx_pep); ++} ++ ++static int tcpx_pep_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ struct tcpx_pep *tcpx_pep; ++ size_t addrlen_in = *addrlen; ++ int ret; ++ ++ tcpx_pep = container_of(fid, struct tcpx_pep, util_pep.pep_fid); ++ ret = ofi_getsockname(tcpx_pep->sock, addr, (socklen_t *)addrlen); ++ if (ret) ++ return -ofi_sockerr(); ++ ++ return (addrlen_in < *addrlen)? -FI_ETOOSMALL: FI_SUCCESS; ++} ++ + static int tcpx_pep_listen(struct fid_pep *pep) + { + struct tcpx_pep *tcpx_pep; +- struct tcpx_fabric *tcpx_fabric; ++ int ret; + + tcpx_pep = container_of(pep,struct tcpx_pep, util_pep.pep_fid); +- tcpx_fabric = container_of(tcpx_pep->util_pep.fabric, +- struct tcpx_fabric, util_fabric); + + if (listen(tcpx_pep->sock, SOMAXCONN)) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, + "socket listen failed\n"); +- return -errno; ++ return -ofi_sockerr(); + } + +- fastlock_acquire(&tcpx_fabric->poll_mgr.lock); +- dlist_insert_tail(&tcpx_pep->poll_info.entry, &tcpx_fabric->poll_mgr.list); +- fastlock_release(&tcpx_fabric->poll_mgr.lock); +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); ++ ret = ofi_wait_fd_add(tcpx_pep->util_pep.eq->wait, tcpx_pep->sock, ++ FI_EPOLL_IN, tcpx_eq_wait_try_func, ++ NULL, &tcpx_pep->cm_ctx); + +- return 0; ++ tcpx_pep->util_pep.eq->wait->signal(tcpx_pep->util_pep.eq->wait); ++ return ret; + } + + static int tcpx_pep_reject(struct fid_pep *pep, fid_t handle, +- const void *param, size_t paramlen) ++ const void *param, size_t paramlen) + { + struct ofi_ctrl_hdr hdr; + struct tcpx_conn_handle *tcpx_handle; ++ int ret; + + tcpx_handle = container_of(handle, struct tcpx_conn_handle, handle); + + memset(&hdr, 0, sizeof(hdr)); + hdr.version = OFI_CTRL_VERSION; + hdr.type = ofi_ctrl_nack; +- hdr.seg_size = paramlen; ++ hdr.seg_size = htons((uint16_t) paramlen); + +- ofi_send_socket(tcpx_handle->conn_fd, &hdr, +- sizeof(hdr), 0); ++ ret = ofi_send_socket(tcpx_handle->conn_fd, &hdr, ++ sizeof(hdr), MSG_NOSIGNAL); + +- if (paramlen) +- ofi_send_socket(tcpx_handle->conn_fd, param, +- paramlen, 0); ++ if ((ret == sizeof(hdr)) && paramlen) ++ (void) ofi_send_socket(tcpx_handle->conn_fd, param, ++ paramlen, MSG_NOSIGNAL); + + ofi_shutdown(tcpx_handle->conn_fd, SHUT_RDWR); +- return ofi_close_socket(tcpx_handle->conn_fd); ++ ret = ofi_close_socket(tcpx_handle->conn_fd); ++ if (ret) ++ return ret; ++ ++ free(tcpx_handle); ++ return FI_SUCCESS; + } + + static struct fi_ops_cm tcpx_pep_cm_ops = { + .size = sizeof(struct fi_ops_cm), +- .setname = fi_no_setname, +- .getname = fi_no_getname, ++ .setname = tcpx_pep_setname, ++ .getname = tcpx_pep_getname, + .getpeer = fi_no_getpeer, + .connect = fi_no_connect, + .listen = tcpx_pep_listen, +@@ -726,15 +1032,11 @@ int tcpx_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + struct fid_pep **pep, void *context) + { + struct tcpx_pep *_pep; +- struct addrinfo hints, *result, *iter; +- char sa_ip[INET_ADDRSTRLEN] = {0}; +- char sa_port[NI_MAXSERV] = {0}; + int ret; + + if (!info) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL,"invalid info\n"); + return -FI_EINVAL; +- + } + + ret = tcpx_verify_info(fabric->api_version, info); +@@ -749,89 +1051,29 @@ int tcpx_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + if (ret) + goto err1; + +- _pep->info = *info; +- _pep->poll_info.fid = &_pep->util_pep.pep_fid.fid; +- _pep->poll_info.type = PASSIVE_SOCK; +- _pep->poll_info.flags = 0; +- _pep->poll_info.cm_data_sz = 0; +- dlist_init(&_pep->poll_info.entry); +- _pep->sock = INVALID_SOCKET; +- +- memset(&hints, 0, sizeof(hints)); +- hints.ai_family = AF_INET; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_flags = AI_PASSIVE; +- +- if (info->src_addr) { +- switch (info->addr_format) { +- case FI_SOCKADDR: +- case FI_SOCKADDR_IN: +- case FI_SOCKADDR_IN6: +- ret = getnameinfo(info->src_addr, +- (socklen_t) info->src_addrlen, +- sa_ip, INET_ADDRSTRLEN, +- sa_port, NI_MAXSERV, 0); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "pep initialization failed\n"); +- goto err2; +- } +- break; +- default: +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "invalid source address format\n"); +- ret = -FI_EINVAL; +- goto err2; +- } +- ret = getaddrinfo(sa_ip, sa_port, &hints, &result); +- } else { +- ret = getaddrinfo("localhost", NULL, &hints, &result); +- } ++ _pep->util_pep.pep_fid.fid.ops = &tcpx_pep_fi_ops; ++ _pep->util_pep.pep_fid.cm = &tcpx_pep_cm_ops; ++ _pep->util_pep.pep_fid.ops = &tcpx_pep_ops; + +- if (ret) { +- ret = -FI_EINVAL; +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL,"getaddrinfo failed"); ++ _pep->info = fi_dupinfo(info); ++ if (!_pep->info) + goto err2; +- } + +- for (iter = result; iter; iter = iter->ai_next) { +- _pep->sock = ofi_socket(iter->ai_family, iter->ai_socktype, +- iter->ai_protocol); +- if (_pep->sock == INVALID_SOCKET) +- continue; +- +- ret = tcpx_setup_socket(_pep->sock); +- if (ret) { +- ofi_close_socket(_pep->sock); +- _pep->sock = INVALID_SOCKET; +- continue; +- } ++ _pep->cm_ctx.fid = &_pep->util_pep.pep_fid.fid; ++ _pep->cm_ctx.type = SERVER_SOCK_ACCEPT; ++ _pep->cm_ctx.cm_data_sz = 0; ++ _pep->sock = INVALID_SOCKET; + +- if (bind(_pep->sock, result->ai_addr, +- (socklen_t) result->ai_addrlen)) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "failed to bind listener: %s\n", strerror(errno)); +- ofi_close_socket(_pep->sock); +- _pep->sock = INVALID_SOCKET; +- } else { +- break; +- } +- } +- freeaddrinfo(result); ++ *pep = &_pep->util_pep.pep_fid; + +- if (_pep->sock == INVALID_SOCKET) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "failed to create listener: %s\n", strerror(errno)); +- ret = -FI_EIO; +- goto err2; ++ if (info->src_addr) { ++ ret = tcpx_pep_sock_create(_pep); ++ if (ret) ++ goto err3; + } +- +- _pep->util_pep.pep_fid.fid.ops = &tcpx_pep_fi_ops; +- _pep->util_pep.pep_fid.cm = &tcpx_pep_cm_ops; +- _pep->util_pep.pep_fid.ops = &tcpx_pep_ops; +- +- *pep = &_pep->util_pep.pep_fid; +- return 0; ++ return FI_SUCCESS; ++err3: ++ fi_freeinfo(_pep->info); + err2: + ofi_pep_close(&_pep->util_pep); + err1: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_eq.c +new file mode 100644 +index 0000000..8e7b16b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_eq.c +@@ -0,0 +1,99 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "tcpx.h" ++ ++static ssize_t tcpx_eq_read(struct fid_eq *eq_fid, uint32_t *event, ++ void *buf, size_t len, uint64_t flags) ++{ ++ struct util_eq *eq; ++ ++ eq = container_of(eq_fid, struct util_eq, eq_fid); ++ ++ fastlock_acquire(&eq->lock); ++ if (slist_empty(&eq->list)) { ++ fastlock_release(&eq->lock); ++ tcpx_conn_mgr_run(eq); ++ } else { ++ fastlock_release(&eq->lock); ++ } ++ return ofi_eq_read(eq_fid, event, buf, len, flags); ++} ++ ++static struct fi_ops_eq tcpx_eq_ops = { ++ .size = sizeof(struct fi_ops_eq), ++ .read = tcpx_eq_read, ++ .readerr = ofi_eq_readerr, ++ .sread = ofi_eq_sread, ++ .write = ofi_eq_write, ++ .strerror = ofi_eq_strerror, ++}; ++ ++int tcpx_eq_create(struct fid_fabric *fabric_fid, struct fi_eq_attr *attr, ++ struct fid_eq **eq_fid, void *context) ++{ ++ struct util_eq *eq; ++ struct fi_wait_attr wait_attr; ++ struct fid_wait *wait; ++ int ret; ++ ++ ret = ofi_eq_create(fabric_fid, attr, eq_fid, context); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EQ, ++ "EQ creation failed\n"); ++ return ret; ++ } ++ ++ eq = container_of(*eq_fid, struct util_eq, eq_fid); ++ eq->eq_fid.ops = &tcpx_eq_ops; ++ ++ if (!eq->wait) { ++ memset(&wait_attr, 0, sizeof wait_attr); ++ wait_attr.wait_obj = FI_WAIT_FD; ++ ret = fi_wait_open(fabric_fid, &wait_attr, &wait); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EQ, ++ "opening wait failed\n"); ++ goto err; ++ } ++ eq->internal_wait = 1; ++ eq->wait = container_of(wait, struct util_wait, ++ wait_fid); ++ } ++ return 0; ++err: ++ fi_close(&eq->eq_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_fabric.c +index 8e8fbdd..3ff1b87 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_fabric.c +@@ -45,7 +45,7 @@ struct fi_ops_fabric tcpx_fabric_ops = { + .size = sizeof(struct fi_ops_fabric), + .domain = tcpx_domain_open, + .passive_ep = tcpx_passive_ep, +- .eq_open = ofi_eq_create, ++ .eq_open = tcpx_eq_create, + .wait_open = ofi_wait_fd_open, + .trywait = ofi_trywait + }; +@@ -58,7 +58,6 @@ static int tcpx_fabric_close(fid_t fid) + tcpx_fabric = container_of(fid, struct tcpx_fabric, + util_fabric.fabric_fid.fid); + +- tcpx_conn_mgr_close(tcpx_fabric); + ret = ofi_fabric_close(&tcpx_fabric->util_fabric); + if (ret) + return ret; +@@ -87,21 +86,14 @@ int tcpx_create_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + + ret = ofi_fabric_init(&tcpx_prov, tcpx_info.fabric_attr, attr, + &tcpx_fabric->util_fabric, context); +- if (ret) +- goto err; ++ if (ret) { ++ free(tcpx_fabric); ++ return ret; ++ } + + *fabric = &tcpx_fabric->util_fabric.fabric_fid; + (*fabric)->fid.ops = &tcpx_fabric_fi_ops; + (*fabric)->ops = &tcpx_fabric_ops; + +- ret = tcpx_conn_mgr_init(tcpx_fabric); +- if (ret) +- goto err1; +- + return 0; +-err1: +- ofi_fabric_close(&tcpx_fabric->util_fabric); +-err: +- free(tcpx_fabric); +- return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_init.c +index e40182e..78b532e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_init.c +@@ -44,12 +44,15 @@ + #if HAVE_GETIFADDRS + static void tcpx_getinfo_ifs(struct fi_info **info) + { ++ char *tcpx_interface_name = NULL; + struct ifaddrs *ifaddrs, *ifa; + struct fi_info *head, *tail, *cur, *loopback; + size_t addrlen; + uint32_t addr_format; + int ret; + ++ fi_param_get_str(&tcpx_prov, "iface", &tcpx_interface_name); ++ + ret = ofi_getifaddrs(&ifaddrs); + if (ret) + return; +@@ -58,6 +61,18 @@ static void tcpx_getinfo_ifs(struct fi_info **info) + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { + if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP)) + continue; ++ if (tcpx_interface_name) { ++ if (strncmp(tcpx_interface_name, ifa->ifa_name, ++ strlen(tcpx_interface_name)) != 0) { ++ FI_DBG(&tcpx_prov, FI_LOG_CORE, ++ "Skip (%s) interface\n", ifa->ifa_name); ++ continue; ++ } else { ++ FI_DBG(&tcpx_prov, FI_LOG_CORE, ++ "Matching interface (%s) found\n", ++ ifa->ifa_name); ++ } ++ } + + switch (ifa->ifa_addr->sa_family) { + case AF_INET: +@@ -107,18 +122,17 @@ static void tcpx_getinfo_ifs(struct fi_info **info) + assert(!tail->next); + tail->next = loopback; + } +- +- fi_freeinfo(*info); +- *info = head; + } ++ fi_freeinfo(*info); ++ *info = head; + } + #else + #define tcpx_getinfo_ifs(info) do{ } while(0) + #endif + + static int tcpx_getinfo(uint32_t version, const char *node, const char *service, +- uint64_t flags, const struct fi_info *hints, +- struct fi_info **info) ++ uint64_t flags, const struct fi_info *hints, ++ struct fi_info **info) + { + int ret; + +@@ -141,7 +155,7 @@ static void fi_tcp_fini(void) + struct fi_provider tcpx_prov = { + .name = "tcp", + .version = FI_VERSION(TCPX_MAJOR_VERSION,TCPX_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = tcpx_getinfo, + .fabric = tcpx_create_fabric, + .cleanup = fi_tcp_fini, +@@ -149,5 +163,11 @@ struct fi_provider tcpx_prov = { + + TCP_INI + { ++#if HAVE_TCP_DL ++ ofi_pmem_init(); ++#endif ++ fi_param_define(&tcpx_prov, "iface", FI_PARAM_STRING, ++ "Specify interface name"); ++ + return &tcpx_prov; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_progress.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_progress.c +index 08c383f..c0df4c9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_progress.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_progress.c +@@ -42,155 +42,631 @@ + #include + #include + +-int tcpx_progress_close(struct tcpx_progress *progress) ++static void tcpx_cq_report_xfer_fail(struct tcpx_ep *tcpx_ep, int err) + { +- util_buf_pool_destroy(progress->pe_entry_pool); ++ struct slist_entry *entry; ++ struct tcpx_xfer_entry *tx_entry; ++ struct tcpx_cq *tcpx_cq; ++ ++ while (!slist_empty(&tcpx_ep->tx_rsp_pend_queue)) { ++ entry = slist_remove_head(&tcpx_ep->tx_rsp_pend_queue); ++ tx_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ tcpx_cq_report_completion(tx_entry->ep->util_ep.tx_cq, ++ tx_entry, -err); ++ ++ tcpx_cq = container_of(tx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, tx_entry); ++ } ++} ++ ++static void tcpx_report_error(struct tcpx_ep *tcpx_ep, int err) ++{ ++ struct fi_eq_err_entry err_entry = {0}; ++ ++ tcpx_cq_report_xfer_fail(tcpx_ep, err); ++ err_entry.fid = &tcpx_ep->util_ep.ep_fid.fid; ++ err_entry.context = tcpx_ep->util_ep.ep_fid.fid.context; ++ err_entry.err = -err; ++ ++ fi_eq_write(&tcpx_ep->util_ep.eq->eq_fid, FI_NOTIFY, ++ &err_entry, sizeof(err_entry), UTIL_FLAG_ERROR); ++} ++ ++int tcpx_ep_shutdown_report(struct tcpx_ep *ep, fid_t fid) ++{ ++ struct fi_eq_cm_entry cm_entry = {0}; ++ ssize_t len; ++ ++ if (ep->cm_state == TCPX_EP_SHUTDOWN) ++ return FI_SUCCESS; ++ tcpx_cq_report_xfer_fail(ep, -FI_ENOTCONN); ++ ep->cm_state = TCPX_EP_SHUTDOWN; ++ cm_entry.fid = fid; ++ len = fi_eq_write(&ep->util_ep.eq->eq_fid, FI_SHUTDOWN, ++ &cm_entry, sizeof(cm_entry), 0); ++ if (len < 0) ++ return (int) len; ++ + return FI_SUCCESS; + } + +-struct tcpx_pe_entry *pe_entry_alloc(struct tcpx_progress *progress) ++void process_tx_entry(struct tcpx_xfer_entry *tx_entry) + { +- struct tcpx_pe_entry *pe_entry; ++ struct tcpx_cq *tcpx_cq; ++ int ret; + +- pe_entry = util_buf_alloc(progress->pe_entry_pool); +- if (!pe_entry) { +- FI_WARN(&tcpx_prov, FI_LOG_DOMAIN,"failed to get buffer\n"); +- return NULL; ++ ret = tcpx_send_msg(tx_entry); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return; ++ ++ if (!ret) ++ goto done; ++ ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg send failed\n"); ++ ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(tx_entry->ep, ++ &tx_entry->ep->util_ep.ep_fid.fid); ++done: ++ tcpx_cq_report_completion(tx_entry->ep->util_ep.tx_cq, ++ tx_entry, -ret); ++ slist_remove_head(&tx_entry->ep->tx_queue); ++ ++ if (ntohl(tx_entry->msg_hdr.hdr.flags) & ++ (OFI_DELIVERY_COMPLETE | OFI_COMMIT_COMPLETE)) { ++ tx_entry->flags |= FI_COMPLETION; ++ slist_insert_tail(&tx_entry->entry, ++ &tx_entry->ep->tx_rsp_pend_queue); ++ return; + } +- memset(pe_entry, 0, sizeof(*pe_entry)); +- return pe_entry; ++ ++ tcpx_cq = container_of(tx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, tx_entry); + } + +-static void report_pe_entry_completion(struct tcpx_pe_entry *pe_entry, int err) ++static int tcpx_prepare_rx_entry_resp(struct tcpx_xfer_entry *rx_entry) + { +- struct fi_cq_err_entry err_entry; +- struct tcpx_ep *ep = pe_entry->ep; +- struct util_cq *cq = NULL; +- struct util_cntr *cntr = NULL; ++ struct tcpx_cq *tcpx_tx_cq; ++ struct tcpx_xfer_entry *resp_entry; + +- if (pe_entry->flags & TCPX_NO_COMPLETION) { +- return; ++ tcpx_tx_cq = container_of(rx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ ++ resp_entry = tcpx_xfer_entry_alloc(tcpx_tx_cq, TCPX_OP_MSG_RESP); ++ if (!resp_entry) ++ return -FI_EAGAIN; ++ ++ resp_entry->msg_data.iov[0].iov_base = (void *) &resp_entry->msg_hdr; ++ resp_entry->msg_data.iov[0].iov_len = sizeof(resp_entry->msg_hdr); ++ resp_entry->msg_data.iov_cnt = 1; ++ ++ resp_entry->msg_hdr.hdr.op = ofi_op_msg; ++ resp_entry->msg_hdr.hdr.size = htonll(sizeof(resp_entry->msg_hdr)); ++ ++ resp_entry->flags = 0; ++ resp_entry->context = NULL; ++ resp_entry->done_len = 0; ++ resp_entry->ep = rx_entry->ep; ++ tcpx_tx_queue_insert(resp_entry->ep, resp_entry); ++ ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, 0); ++ tcpx_rx_msg_release(rx_entry); ++ return FI_SUCCESS; ++} ++ ++static int process_rx_entry(struct tcpx_xfer_entry *rx_entry) ++{ ++ struct tcpx_cq *tcpx_cq; ++ int ret; ++ ++ ret = tcpx_recv_msg_data(rx_entry); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return ret; ++ ++ if (!ret) ++ goto done; ++ ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg recv Failed ret = %d\n", ret); ++ ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(rx_entry->ep, ++ &rx_entry->ep->util_ep.ep_fid.fid); ++done: ++ if (ntohl(rx_entry->msg_hdr.hdr.flags) & OFI_DELIVERY_COMPLETE) { ++ ++ if (tcpx_prepare_rx_entry_resp(rx_entry)) ++ rx_entry->ep->cur_rx_proc_fn = tcpx_prepare_rx_entry_resp; ++ ++ return FI_SUCCESS; + } + +- switch (pe_entry->msg_hdr.op_data) { +- case TCPX_OP_MSG_SEND: +- cq = ep->util_ep.tx_cq; +- cntr = ep->util_ep.tx_cntr; +- break; +- case TCPX_OP_MSG_RECV: +- cq = ep->util_ep.rx_cq; +- cntr = ep->util_ep.rx_cntr; +- break; +- default: ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, -ret); ++ tcpx_cq = container_of(rx_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return FI_SUCCESS; ++} + +- return; ++static int process_srx_entry(struct tcpx_xfer_entry *rx_entry) ++{ ++ int ret; ++ ++ ret = tcpx_recv_msg_data(rx_entry); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return ret; ++ ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, ++ "msg recv Failed ret = %d\n", ret); ++ ++ tcpx_ep_shutdown_report(rx_entry->ep, ++ &rx_entry->ep->util_ep.ep_fid.fid); + } + +- if (cq && err) { +- err_entry.op_context = pe_entry->context; +- err_entry.flags = pe_entry->flags; +- err_entry.len = 0; +- err_entry.buf = NULL; +- err_entry.data = pe_entry->msg_hdr.data; +- err_entry.tag = 0; +- err_entry.olen = 0; +- err_entry.err = err; +- err_entry.prov_errno = errno; +- err_entry.err_data = NULL; +- err_entry.err_data_size = 0; ++ if ((ntohl(rx_entry->msg_hdr.hdr.flags) & ++ OFI_DELIVERY_COMPLETE) && !ret) { ++ if (tcpx_prepare_rx_entry_resp(rx_entry)) ++ rx_entry->ep->cur_rx_proc_fn = tcpx_prepare_rx_entry_resp; + +- ofi_cq_write_error(cq, &err_entry); +- } else if (cq) { +- ofi_cq_write(cq, pe_entry->context, +- pe_entry->flags, 0, NULL, +- pe_entry->msg_hdr.data, 0); ++ return FI_SUCCESS; + } + +- if (cntr && err) { +- cntr->cntr_fid.ops->adderr(&cntr->cntr_fid, 1); +- }else if (cntr) { +- cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, -ret); ++ ++ /* release the shared entry */ ++ if (rx_entry->ep->cur_rx_entry == rx_entry) { ++ rx_entry->ep->cur_rx_entry = NULL; + } ++ ++ tcpx_srx_xfer_release(rx_entry->ep->srx_ctx, rx_entry); ++ return FI_SUCCESS; ++} ++ ++static int tcpx_prepare_rx_write_resp(struct tcpx_xfer_entry *rx_entry) ++{ ++ struct tcpx_cq *tcpx_rx_cq, *tcpx_tx_cq; ++ struct tcpx_xfer_entry *resp_entry; ++ ++ tcpx_tx_cq = container_of(rx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ ++ resp_entry = tcpx_xfer_entry_alloc(tcpx_tx_cq, TCPX_OP_MSG_RESP); ++ if (!resp_entry) ++ return -FI_EAGAIN; ++ ++ resp_entry->msg_data.iov[0].iov_base = (void *) &resp_entry->msg_hdr; ++ resp_entry->msg_data.iov[0].iov_len = sizeof(resp_entry->msg_hdr); ++ resp_entry->msg_data.iov_cnt = 1; ++ ++ resp_entry->msg_hdr.hdr.op = ofi_op_msg; ++ resp_entry->msg_hdr.hdr.size = htonll(sizeof(resp_entry->msg_hdr)); ++ ++ resp_entry->flags &= ~FI_COMPLETION; ++ resp_entry->context = NULL; ++ resp_entry->done_len = 0; ++ resp_entry->ep = rx_entry->ep; ++ tcpx_tx_queue_insert(resp_entry->ep, resp_entry); ++ ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, 0); ++ tcpx_rx_cq = container_of(rx_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_rx_cq, rx_entry); ++ return FI_SUCCESS; + } + +-void pe_entry_release(struct tcpx_pe_entry *pe_entry) ++static void tcpx_pmem_commit(struct tcpx_xfer_entry *rx_entry) + { +- struct tcpx_domain *domain; ++ int i; + +- domain = container_of(pe_entry->ep->util_ep.domain, +- struct tcpx_domain, util_domain); ++ if (!ofi_pmem_commit) ++ return ; + +- memset(&pe_entry->msg_hdr, 0, sizeof(pe_entry->msg_hdr)); +- dlist_remove(&pe_entry->entry); +- memset(pe_entry, 0, sizeof(*pe_entry)); +- util_buf_release(domain->progress.pe_entry_pool, pe_entry); ++ for (i = 0; i < rx_entry->msg_hdr.rma_iov_cnt; i++) { ++ (*ofi_pmem_commit)((const void *) (uintptr_t) ++ rx_entry->msg_hdr.rma_iov[i].addr, ++ rx_entry->msg_hdr.rma_iov[i].len); ++ } + } + +-static void process_tx_pe_entry(struct tcpx_pe_entry *pe_entry) ++static int process_rx_remote_write_entry(struct tcpx_xfer_entry *rx_entry) + { +- uint64_t total_len = ntohll(pe_entry->msg_hdr.size); ++ struct tcpx_cq *tcpx_cq; ++ uint32_t flags; + int ret; + +- ret = tcpx_send_msg(pe_entry); ++ ret = tcpx_recv_msg_data(rx_entry); + if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) +- return; ++ return ret; + +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg send failed\n"); +- report_pe_entry_completion(pe_entry, ret); +- pe_entry_release(pe_entry); +- return; +- } ++ if (!ret) ++ goto done; ++ ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg recv Failed ret = %d\n", ret); ++ ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(rx_entry->ep, ++ &rx_entry->ep->util_ep.ep_fid.fid); ++done: ++ flags = ntohl(rx_entry->msg_hdr.hdr.flags) & ++ (OFI_DELIVERY_COMPLETE | OFI_COMMIT_COMPLETE); ++ ++ if (flags) { ++ if (flags & OFI_COMMIT_COMPLETE) ++ tcpx_pmem_commit(rx_entry); ++ ++ if (tcpx_prepare_rx_write_resp(rx_entry)) ++ rx_entry->ep->cur_rx_proc_fn = tcpx_prepare_rx_write_resp; + +- if (pe_entry->done_len == total_len) { +- report_pe_entry_completion(pe_entry, 0); +- pe_entry_release(pe_entry); ++ return FI_SUCCESS; + } ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, -ret); ++ tcpx_cq = container_of(rx_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return FI_SUCCESS; + } + +-static void process_rx_pe_entry(struct tcpx_pe_entry *pe_entry) ++static int process_rx_read_entry(struct tcpx_xfer_entry *rx_entry) + { ++ struct tcpx_cq *tcpx_cq; + int ret; + +- ret = tcpx_recv_msg(pe_entry); ++ ret = tcpx_recv_msg_data(rx_entry); + if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) +- return; ++ return ret; ++ ++ if (!ret) ++ goto done; ++ ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg recv Failed ret = %d\n", ret); ++ ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(rx_entry->ep, ++ &rx_entry->ep->util_ep.ep_fid.fid); ++done: ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.tx_cq, ++ rx_entry, -ret); ++ slist_remove_head(&rx_entry->ep->rma_read_queue); ++ tcpx_cq = container_of(rx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return FI_SUCCESS; ++} ++ ++static void tcpx_copy_rma_iov_to_msg_iov(struct tcpx_xfer_entry *xfer_entry) ++{ ++ int i; ++ ++ xfer_entry->msg_data.iov_cnt = xfer_entry->msg_hdr.rma_iov_cnt; ++ for ( i = 0 ; i < xfer_entry->msg_hdr.rma_iov_cnt ; i++ ) { ++ xfer_entry->msg_data.iov[i].iov_base = ++ (void *) xfer_entry->msg_hdr.rma_iov[i].addr; ++ xfer_entry->msg_data.iov[i].iov_len = ++ xfer_entry->msg_hdr.rma_iov[i].len; ++ } ++} ++ ++static int tcpx_prepare_rx_remote_read_resp(struct tcpx_xfer_entry *resp_entry) ++{ ++ int i; ++ ++ resp_entry->msg_data.iov[0].iov_base = (void *) &resp_entry->msg_hdr; ++ resp_entry->msg_data.iov[0].iov_len = sizeof(resp_entry->msg_hdr); ++ resp_entry->msg_data.iov_cnt = 1 + resp_entry->msg_hdr.rma_iov_cnt; ++ ++ resp_entry->msg_hdr.hdr.size = resp_entry->msg_data.iov[0].iov_len; ++ for ( i = 0 ; i < resp_entry->msg_hdr.rma_iov_cnt ; i++ ) { ++ resp_entry->msg_data.iov[i+1].iov_base = ++ (void *) (uintptr_t)resp_entry->msg_hdr.rma_iov[i].addr; ++ resp_entry->msg_data.iov[i+1].iov_len = ++ resp_entry->msg_hdr.rma_iov[i].len; ++ resp_entry->msg_hdr.hdr.size += ++ resp_entry->msg_data.iov[i+1].iov_len; ++ } ++ ++ resp_entry->msg_hdr.hdr.op = ofi_op_read_rsp; ++ resp_entry->msg_hdr.hdr.size = ++ htonll(resp_entry->msg_hdr.hdr.size); ++ ++ resp_entry->flags &= ~FI_COMPLETION; ++ resp_entry->context = NULL; ++ resp_entry->done_len = 0; ++ ++ tcpx_tx_queue_insert(resp_entry->ep, resp_entry); ++ resp_entry->ep->cur_rx_entry = NULL; ++ return FI_SUCCESS; ++} ++ ++static int tcpx_validate_rx_rma_data(struct tcpx_xfer_entry *rx_entry, ++ uint64_t access) ++{ ++ struct ofi_mr_map *map = &rx_entry->ep->util_ep.domain->mr_map; ++ struct fi_rma_iov *rma_iov = rx_entry->msg_hdr.rma_iov; ++ int i, ret; ++ ++ for ( i = 0 ; i < rx_entry->msg_hdr.rma_iov_cnt ; i++) { ++ ret = ofi_mr_verify(map, rma_iov[i].len, ++ (uintptr_t *)&rma_iov[i].addr, ++ rma_iov[i].key, access); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_DATA, ++ "invalid rma iov received\n"); ++ return -FI_EINVAL; ++ } ++ } ++ return FI_SUCCESS; ++} ++ ++int tcpx_get_rx_entry_op_invalid(struct tcpx_ep *tcpx_ep) ++{ ++ return -FI_EINVAL; ++} ++ ++int tcpx_get_rx_entry_op_msg(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *rx_entry; ++ struct tcpx_xfer_entry *tx_entry; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_rx_detect *rx_detect = &tcpx_ep->rx_detect; ++ int ret; + ++ tcpx_cq = container_of(tcpx_ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ ++ if (rx_detect->hdr.hdr.op_data == TCPX_OP_MSG_RESP) { ++ assert(!slist_empty(&tcpx_ep->tx_rsp_pend_queue)); ++ tx_entry = container_of(tcpx_ep->tx_rsp_pend_queue.head, ++ struct tcpx_xfer_entry, entry); ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ tcpx_cq_report_completion(tx_entry->ep->util_ep.tx_cq, ++ tx_entry, 0); ++ ++ slist_remove_head(&tx_entry->ep->tx_rsp_pend_queue); ++ tcpx_xfer_entry_release(tcpx_cq, tx_entry); ++ rx_detect->done_len = 0; ++ return -FI_EAGAIN; ++ } ++ ++ if (tcpx_ep->srx_ctx){ ++ tcpx_ep->cur_rx_proc_fn = process_srx_entry; ++ rx_entry = tcpx_srx_dequeue(tcpx_ep->srx_ctx); ++ if (!rx_entry) ++ return -FI_EAGAIN; ++ ++ } else { ++ if (slist_empty(&tcpx_ep->rx_queue)) ++ return -FI_EAGAIN; ++ ++ tcpx_ep->cur_rx_proc_fn = process_rx_entry; ++ rx_entry = container_of(slist_remove_head(&tcpx_ep->rx_queue), ++ struct tcpx_xfer_entry, entry); ++ } ++ ++ rx_entry->msg_hdr = rx_detect->hdr; ++ ++ rx_entry->ep = tcpx_ep; ++ rx_entry->msg_hdr.hdr.op_data = TCPX_OP_MSG_RECV; ++ rx_entry->done_len = sizeof(rx_detect->hdr); ++ if (tcpx_ep->srx_ctx) ++ rx_entry->flags |= tcpx_ep->util_ep.rx_op_flags & FI_COMPLETION; ++ ++ if (ntohl(rx_detect->hdr.hdr.flags) & OFI_REMOTE_CQ_DATA) ++ rx_entry->flags |= FI_REMOTE_CQ_DATA; ++ ++ ret = ofi_truncate_iov(rx_entry->msg_data.iov, ++ &rx_entry->msg_data.iov_cnt, ++ (ntohll(rx_entry->msg_hdr.hdr.size) - ++ sizeof(rx_entry->msg_hdr))); + if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg recv Failed ret = %d\n", ret); +- report_pe_entry_completion(pe_entry, ret); +- pe_entry_release(pe_entry); +- return; ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, ++ "posted rx buffer size is not big enough\n"); ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, -ret); ++ tcpx_rx_msg_release(rx_entry); ++ return ret; ++ } ++ ++ rx_detect->done_len = 0; ++ tcpx_ep->cur_rx_entry = rx_entry; ++ return FI_SUCCESS; ++} ++ ++int tcpx_get_rx_entry_op_read_req(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *rx_entry; ++ struct tcpx_cq *tcpx_cq; ++ int ret; ++ ++ /* The read request will generate a response once done, ++ * so the xfer_entry will become a transmit and returned ++ * to the tx cq buffer pool. ++ */ ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ ++ rx_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_REMOTE_READ); ++ if (!rx_entry) ++ return -FI_EAGAIN; ++ ++ rx_entry->msg_hdr = tcpx_ep->rx_detect.hdr; ++ rx_entry->msg_hdr.hdr.op_data = TCPX_OP_REMOTE_READ; ++ rx_entry->ep = tcpx_ep; ++ rx_entry->done_len = sizeof(tcpx_ep->rx_detect.hdr); ++ ++ ret = tcpx_validate_rx_rma_data(rx_entry, FI_REMOTE_READ); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, ++ "invalid rma data\n"); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return ret; + } + +- if (pe_entry->done_len && +- pe_entry->done_len == ntohll(pe_entry->msg_hdr.size)) { +- report_pe_entry_completion(pe_entry, 0); +- pe_entry_release(pe_entry); ++ tcpx_ep->rx_detect.done_len = 0; ++ tcpx_ep->cur_rx_entry = rx_entry; ++ tcpx_ep->cur_rx_proc_fn = tcpx_prepare_rx_remote_read_resp; ++ return FI_SUCCESS; ++} ++ ++int tcpx_get_rx_entry_op_write(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *rx_entry; ++ struct tcpx_cq *tcpx_cq; ++ int ret; ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ ++ rx_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_REMOTE_WRITE); ++ if (!rx_entry) ++ return -FI_EAGAIN; ++ ++ rx_entry->flags = 0; ++ if (ntohl(tcpx_ep->rx_detect.hdr.hdr.flags) & OFI_REMOTE_CQ_DATA) ++ rx_entry->flags = (FI_COMPLETION | ++ FI_REMOTE_CQ_DATA | FI_REMOTE_WRITE); ++ ++ rx_entry->msg_hdr = tcpx_ep->rx_detect.hdr; ++ rx_entry->msg_hdr.hdr.op_data = TCPX_OP_REMOTE_WRITE; ++ rx_entry->ep = tcpx_ep; ++ rx_entry->done_len = sizeof(tcpx_ep->rx_detect.hdr); ++ ++ ret = tcpx_validate_rx_rma_data(rx_entry, FI_REMOTE_WRITE); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, ++ "invalid rma data\n"); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return ret; + } ++ ++ tcpx_copy_rma_iov_to_msg_iov(rx_entry); ++ tcpx_ep->rx_detect.done_len = 0; ++ tcpx_ep->cur_rx_entry = rx_entry; ++ tcpx_ep->cur_rx_proc_fn = process_rx_remote_write_entry; ++ return FI_SUCCESS; ++ + } + +-static void process_pe_lists(struct tcpx_ep *ep) ++int tcpx_get_rx_entry_op_read_rsp(struct tcpx_ep *tcpx_ep) + { +- struct tcpx_pe_entry *pe_entry; +- struct dlist_entry *entry; ++ struct tcpx_xfer_entry *rx_entry; ++ struct slist_entry *entry; + +- if (dlist_empty(&ep->rx_queue)) +- goto tx_pe_list; ++ if (slist_empty(&tcpx_ep->rma_read_queue)) ++ return -FI_EINVAL; + +- entry = ep->rx_queue.next; +- pe_entry = container_of(entry, struct tcpx_pe_entry, ++ entry = tcpx_ep->rma_read_queue.head; ++ rx_entry = container_of(entry, struct tcpx_xfer_entry, + entry); +- process_rx_pe_entry(pe_entry); + +-tx_pe_list: +- if (dlist_empty(&ep->tx_queue)) +- return ; ++ rx_entry->msg_hdr = tcpx_ep->rx_detect.hdr; ++ rx_entry->msg_hdr.hdr.op_data = TCPX_OP_READ_RSP; ++ rx_entry->done_len = sizeof(tcpx_ep->rx_detect.hdr); ++ ++ tcpx_ep->rx_detect.done_len = 0; ++ tcpx_ep->cur_rx_entry = rx_entry; ++ tcpx_ep->cur_rx_proc_fn = process_rx_read_entry; ++ return FI_SUCCESS; ++} ++ ++static void tcpx_process_stage_buffer(struct tcpx_ep *ep) ++{ ++ int ret; + +- entry = ep->tx_queue.next; +- pe_entry = container_of(entry, struct tcpx_pe_entry, ++ while (ep->stage_buf.len != ep->stage_buf.off) { ++ if (!ep->cur_rx_entry) { ++ ret = tcpx_recv_hdr(ep->conn_fd, &ep->stage_buf, ++ &ep->rx_detect); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return; ++ ++ if (ret) ++ goto err1; ++ ++ ret = ep->get_rx_entry[ep->rx_detect.hdr.hdr.op](ep); ++ if (ret == -FI_EAGAIN) ++ return; ++ if (ret) ++ goto err2; ++ } ++ assert(ep->cur_rx_proc_fn != NULL); ++ ep->cur_rx_proc_fn(ep->cur_rx_entry); ++ } ++ return; ++err2: ++ tcpx_report_error(ep, ret); ++ return; ++err1: ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(ep, &ep->util_ep.ep_fid.fid); ++} ++ ++static void tcpx_process_rx_msg(struct tcpx_ep *ep) ++{ ++ int ret; ++ ++ if (!ep->cur_rx_entry) { ++ if (ep->stage_buf.len == ep->stage_buf.off) { ++ ret = tcpx_read_to_buffer(ep->conn_fd, &ep->stage_buf); ++ if (ret && !OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ goto err1; ++ ++ tcpx_process_stage_buffer(ep); ++ return; ++ } ++ ++ ret = tcpx_recv_hdr(ep->conn_fd, &ep->stage_buf, ++ &ep->rx_detect); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return; ++ ++ if (ret) ++ goto err1; ++ ++ ret = ep->get_rx_entry[ep->rx_detect.hdr.hdr.op](ep); ++ if (ret == -FI_EAGAIN) ++ return; ++ if (ret) ++ goto err2; ++ } ++ ++ assert(ep->cur_rx_proc_fn != NULL); ++ ep->cur_rx_proc_fn(ep->cur_rx_entry); ++ return; ++err2: ++ tcpx_report_error(ep, ret); ++ return; ++err1: ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(ep, &ep->util_ep.ep_fid.fid); ++} ++ ++static void process_tx_queue(struct tcpx_ep *ep) ++{ ++ struct tcpx_xfer_entry *tx_entry; ++ struct slist_entry *entry; ++ ++ if (slist_empty(&ep->tx_queue)) ++ return; ++ ++ entry = ep->tx_queue.head; ++ tx_entry = container_of(entry, struct tcpx_xfer_entry, + entry); +- process_tx_pe_entry(pe_entry); ++ process_tx_entry(tx_entry); ++} ++ ++void tcpx_ep_progress(struct tcpx_ep *ep) ++{ ++ tcpx_process_rx_msg(ep); ++ process_tx_queue(ep); + } + + void tcpx_progress(struct util_ep *util_ep) +@@ -198,13 +674,83 @@ void tcpx_progress(struct util_ep *util_ep) + struct tcpx_ep *ep; + + ep = container_of(util_ep, struct tcpx_ep, util_ep); +- process_pe_lists(ep); ++ fastlock_acquire(&ep->lock); ++ ep->progress_func(ep); ++ fastlock_release(&ep->lock); + return; + } + +-int tcpx_progress_init(struct tcpx_progress *progress) ++static int tcpx_try_func(void *util_ep) + { +- return util_buf_pool_create(&progress->pe_entry_pool, +- sizeof(struct tcpx_pe_entry), +- 16, 0, 1024); ++ uint32_t events; ++ struct util_wait_fd *wait_fd; ++ struct tcpx_ep *ep; ++ int ret; ++ ++ ep = container_of(util_ep, struct tcpx_ep, util_ep); ++ wait_fd = container_of(((struct util_ep *)util_ep)->rx_cq->wait, ++ struct util_wait_fd, util_wait); ++ ++ fastlock_acquire(&ep->lock); ++ if (!slist_empty(&ep->tx_queue) && !ep->send_ready_monitor) { ++ ep->send_ready_monitor = true; ++ events = FI_EPOLL_IN | FI_EPOLL_OUT; ++ goto epoll_mod; ++ } else if (slist_empty(&ep->tx_queue) && ep->send_ready_monitor) { ++ ep->send_ready_monitor = false; ++ events = FI_EPOLL_IN; ++ goto epoll_mod; ++ } ++ fastlock_release(&ep->lock); ++ return FI_SUCCESS; ++ ++epoll_mod: ++ ret = fi_epoll_mod(wait_fd->epoll_fd, ep->conn_fd, events, NULL); ++ if (ret) ++ FI_WARN(&tcpx_prov, FI_LOG_EP_DATA, ++ "invalid op type\n"); ++ fastlock_release(&ep->lock); ++ return ret; ++} ++ ++int tcpx_cq_wait_ep_add(struct tcpx_ep *ep) ++{ ++ if (!ep->util_ep.rx_cq->wait) ++ return FI_SUCCESS; ++ ++ return ofi_wait_fd_add(ep->util_ep.rx_cq->wait, ++ ep->conn_fd, FI_EPOLL_IN, ++ tcpx_try_func, (void *)&ep->util_ep, ++ NULL); ++} ++ ++void tcpx_cq_wait_ep_del(struct tcpx_ep *ep) ++{ ++ fastlock_acquire(&ep->lock); ++ if (ep->cm_state == TCPX_EP_CONNECTING) { ++ goto out; ++ } ++ ++ if (ep->util_ep.rx_cq->wait) { ++ ofi_wait_fd_del(ep->util_ep.rx_cq->wait, ep->conn_fd); ++ } ++out: ++ fastlock_release(&ep->lock); ++} ++ ++void tcpx_tx_queue_insert(struct tcpx_ep *tcpx_ep, ++ struct tcpx_xfer_entry *tx_entry) ++{ ++ int empty; ++ struct util_wait *wait = tcpx_ep->util_ep.tx_cq->wait; ++ ++ empty = slist_empty(&tcpx_ep->tx_queue); ++ slist_insert_tail(&tx_entry->entry, &tcpx_ep->tx_queue); ++ ++ if (empty) { ++ process_tx_entry(tx_entry); ++ ++ if (!slist_empty(&tcpx_ep->tx_queue) && wait) ++ wait->signal(wait); ++ } + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_rma.c +new file mode 100644 +index 0000000..532f2a3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_rma.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include "rdma/fi_eq.h" ++#include "ofi_iov.h" ++#include ++#include "tcpx.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static void tcpx_rma_read_send_entry_fill(struct tcpx_xfer_entry *send_entry, ++ struct tcpx_ep *tcpx_ep, ++ const struct fi_msg_rma *msg) ++{ ++ memcpy(send_entry->msg_hdr.rma_iov, msg->rma_iov, ++ msg->rma_iov_count * sizeof(msg->rma_iov[0])); ++ send_entry->msg_hdr.rma_iov_cnt = msg->rma_iov_count; ++ ++ send_entry->msg_data.iov[0].iov_base = (void *) &send_entry->msg_hdr; ++ send_entry->msg_data.iov[0].iov_len = sizeof(send_entry->msg_hdr); ++ send_entry->msg_data.iov_cnt = 1; ++ send_entry->ep = tcpx_ep; ++ send_entry->done_len = 0; ++ send_entry->flags = 0; ++} ++ ++static void tcpx_rma_read_recv_entry_fill(struct tcpx_xfer_entry *recv_entry, ++ struct tcpx_ep *tcpx_ep, ++ const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ memcpy(&recv_entry->msg_data.iov[0], &msg->msg_iov[0], ++ msg->iov_count * sizeof(struct iovec)); ++ ++ recv_entry->msg_data.iov_cnt = msg->iov_count; ++ recv_entry->ep = tcpx_ep; ++ recv_entry->context = msg->context; ++ recv_entry->done_len = 0; ++ recv_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ flags | FI_RMA | FI_READ); ++} ++ ++static ssize_t tcpx_rma_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_xfer_entry *send_entry; ++ struct tcpx_xfer_entry *recv_entry; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); ++ assert(msg->rma_iov_count <= TCPX_IOV_LIMIT); ++ ++ send_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_READ_REQ); ++ if (!send_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_READ_RSP); ++ if (!recv_entry) { ++ tcpx_xfer_entry_release(tcpx_cq, send_entry); ++ return -FI_EAGAIN; ++ } ++ tcpx_rma_read_send_entry_fill(send_entry, tcpx_ep, msg); ++ tcpx_rma_read_recv_entry_fill(recv_entry, tcpx_ep, msg, flags); ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ slist_insert_tail(&recv_entry->entry, &tcpx_ep->rma_read_queue); ++ tcpx_tx_queue_insert(tcpx_ep, send_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_rma_read(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ struct iovec msg_iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .key = key, ++ .len = len, ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &msg_iov, ++ .desc = &desc, ++ .iov_count = 1, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .addr = src_addr, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return tcpx_rma_readmsg(ep, &msg, 0); ++} ++ ++static ssize_t tcpx_rma_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .len = ofi_total_iov_len(iov, count), ++ .key = key, ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .addr = src_addr, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return tcpx_rma_readmsg(ep, &msg, 0); ++} ++ ++static ssize_t tcpx_rma_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_xfer_entry *send_entry; ++ uint64_t data_len; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ ++ send_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_WRITE); ++ if (!send_entry) ++ return -FI_EAGAIN; ++ ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); ++ assert(msg->rma_iov_count <= TCPX_IOV_LIMIT); ++ ++ data_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count); ++ ++ assert(!(flags & FI_INJECT) || (data_len <= TCPX_MAX_INJECT_SZ)); ++ ++ send_entry->msg_hdr.hdr.size = htonll(data_len + sizeof(send_entry->msg_hdr)); ++ send_entry->msg_hdr.hdr.flags = 0; ++ ++ memcpy(send_entry->msg_hdr.rma_iov, msg->rma_iov, ++ msg->rma_iov_count * sizeof(msg->rma_iov[0])); ++ send_entry->msg_hdr.rma_iov_cnt = msg->rma_iov_count; ++ ++ send_entry->msg_data.iov[0].iov_base = (void *) &send_entry->msg_hdr; ++ send_entry->msg_data.iov[0].iov_len = sizeof(send_entry->msg_hdr); ++ send_entry->msg_data.iov_cnt = msg->iov_count + 1; ++ ++ if (flags & FI_INJECT) { ++ ofi_copy_iov_buf(msg->msg_iov, msg->iov_count, 0, ++ send_entry->msg_data.inject, ++ data_len, ++ OFI_COPY_IOV_TO_BUF); ++ ++ send_entry->msg_data.iov[1].iov_base = (void *)send_entry->msg_data.inject; ++ send_entry->msg_data.iov[1].iov_len = data_len; ++ send_entry->msg_data.iov_cnt++; ++ } else { ++ memcpy(&send_entry->msg_data.iov[1], &msg->msg_iov[0], ++ msg->iov_count * sizeof(struct iovec)); ++ } ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ send_entry->msg_hdr.hdr.flags |= OFI_REMOTE_CQ_DATA; ++ send_entry->msg_hdr.hdr.data = htonll(msg->data); ++ } ++ ++ send_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ flags | FI_RMA | FI_WRITE); ++ ++ if (flags & (FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE)) { ++ send_entry->flags &= ~FI_COMPLETION; ++ send_entry->msg_hdr.hdr.flags |= OFI_DELIVERY_COMPLETE; ++ } ++ ++ if (flags & FI_COMMIT_COMPLETE) { ++ send_entry->flags &= ~FI_COMPLETION; ++ send_entry->msg_hdr.hdr.flags |= OFI_COMMIT_COMPLETE; ++ } ++ ++ send_entry->msg_hdr.hdr.flags = htonl(send_entry->msg_hdr.hdr.flags); ++ send_entry->ep = tcpx_ep; ++ send_entry->context = msg->context; ++ send_entry->done_len = 0; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, send_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_rma_write(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ struct iovec msg_iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .key = key, ++ .len = len, ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &msg_iov, ++ .desc = &desc, ++ .iov_count = 1, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .addr = dest_addr, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return tcpx_rma_writemsg(ep, &msg, 0); ++} ++ ++static ssize_t tcpx_rma_writev(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .key = key, ++ .len = ofi_total_iov_len(iov, count), ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .addr = dest_addr, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return tcpx_rma_writemsg(ep, &msg, 0); ++} ++ ++ ++static ssize_t tcpx_rma_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct iovec msg_iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .key = key, ++ .len = len, ++ }; ++ struct fi_msg_rma msg = { ++ .desc = &desc, ++ .iov_count = 1, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .msg_iov = &msg_iov, ++ .addr = dest_addr, ++ .context = context, ++ .data = data, ++ }; ++ ++ return tcpx_rma_writemsg(ep, &msg, FI_REMOTE_CQ_DATA); ++} ++ ++static ssize_t tcpx_rma_inject_common(struct fid_ep *ep, const void *buf, ++ size_t len, uint64_t data, ++ fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, uint64_t flags) ++{ ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_xfer_entry *send_entry; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ ++ send_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_WRITE); ++ if (!send_entry) ++ return -FI_EAGAIN; ++ ++ assert(len <= TCPX_MAX_INJECT_SZ); ++ send_entry->msg_hdr.hdr.size = htonll(len + sizeof(send_entry->msg_hdr)); ++ send_entry->msg_hdr.hdr.flags = 0; ++ ++ send_entry->msg_hdr.rma_iov[0].addr = addr; ++ send_entry->msg_hdr.rma_iov[0].key = key; ++ send_entry->msg_hdr.rma_iov[0].len = len; ++ send_entry->msg_hdr.rma_iov_cnt = 1; ++ ++ send_entry->msg_data.iov[0].iov_base = (void *) &send_entry->msg_hdr; ++ send_entry->msg_data.iov[0].iov_len = sizeof(send_entry->msg_hdr); ++ ++ memcpy(send_entry->msg_data.inject, (uint8_t *)buf, len); ++ send_entry->msg_data.iov[1].iov_base = (void *)send_entry->msg_data.inject; ++ send_entry->msg_data.iov[1].iov_len = len; ++ ++ send_entry->msg_data.iov_cnt = 2; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ send_entry->msg_hdr.hdr.flags |= OFI_REMOTE_CQ_DATA; ++ send_entry->msg_hdr.hdr.data = htonll(data); ++ } ++ ++ send_entry->msg_hdr.hdr.flags = htonl(send_entry->msg_hdr.hdr.flags); ++ send_entry->ep = tcpx_ep; ++ send_entry->done_len = 0; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, send_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_rma_inject(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ return tcpx_rma_inject_common(ep, buf, len, dest_addr, ++ 0, addr, key, FI_INJECT); ++} ++ ++static ssize_t tcpx_rma_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ return tcpx_rma_inject_common(ep, buf, len, dest_addr, ++ data, addr, key, ++ FI_INJECT | FI_REMOTE_CQ_DATA); ++} ++ ++struct fi_ops_rma tcpx_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = tcpx_rma_read, ++ .readv = tcpx_rma_readv, ++ .readmsg = tcpx_rma_readmsg, ++ .write = tcpx_rma_write, ++ .writev = tcpx_rma_writev, ++ .writemsg = tcpx_rma_writemsg, ++ .inject = tcpx_rma_inject, ++ .writedata = tcpx_rma_writedata, ++ .injectdata = tcpx_rma_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_shared_ctx.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_shared_ctx.c +new file mode 100644 +index 0000000..b0ff955 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_shared_ctx.c +@@ -0,0 +1,165 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++#include ++#include ++#include "tcpx.h" ++ ++#include ++#include ++#include ++ ++static inline struct tcpx_xfer_entry * ++tcpx_srx_xfer_alloc(struct tcpx_rx_ctx *srx_ctx) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ recv_entry = util_buf_alloc(srx_ctx->buf_pool); ++ if (recv_entry) ++ recv_entry->done_len = 0; ++ ++ fastlock_release(&srx_ctx->lock); ++ return recv_entry; ++} ++ ++void tcpx_srx_xfer_release(struct tcpx_rx_ctx *srx_ctx, ++ struct tcpx_xfer_entry *xfer_entry) ++{ ++ fastlock_acquire(&srx_ctx->lock); ++ util_buf_release(srx_ctx->buf_pool, xfer_entry); ++ fastlock_release(&srx_ctx->lock); ++} ++ ++struct tcpx_xfer_entry * ++tcpx_srx_dequeue(struct tcpx_rx_ctx *srx_ctx) ++{ ++ struct tcpx_xfer_entry *xfer_entry; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ if (!slist_empty(&srx_ctx->rx_queue)) { ++ xfer_entry = container_of(slist_remove_head(&srx_ctx->rx_queue), ++ struct tcpx_xfer_entry, entry); ++ } else { ++ xfer_entry = NULL; ++ } ++ fastlock_release(&srx_ctx->lock); ++ return xfer_entry; ++} ++ ++static ssize_t tcpx_srx_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_rx_ctx *srx_ctx; ++ ++ srx_ctx = container_of(ep, struct tcpx_rx_ctx, rx_fid); ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); ++ ++ recv_entry = tcpx_srx_xfer_alloc(srx_ctx); ++ if (!recv_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry->msg_data.iov_cnt = msg->iov_count; ++ memcpy(&recv_entry->msg_data.iov[0], &msg->msg_iov[0], ++ msg->iov_count * sizeof(struct iovec)); ++ ++ recv_entry->flags = flags | FI_MSG | FI_RECV; ++ recv_entry->context = msg->context; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ slist_insert_tail(&recv_entry->entry, &srx_ctx->rx_queue); ++ fastlock_release(&srx_ctx->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_srx_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, void *context) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_rx_ctx *srx_ctx; ++ ++ srx_ctx = container_of(ep, struct tcpx_rx_ctx, rx_fid); ++ ++ recv_entry = tcpx_srx_xfer_alloc(srx_ctx); ++ if (!recv_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry->msg_data.iov_cnt = 1; ++ recv_entry->msg_data.iov[0].iov_base = buf; ++ recv_entry->msg_data.iov[0].iov_len = len; ++ ++ recv_entry->flags = FI_MSG | FI_RECV; ++ recv_entry->context = context; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ slist_insert_tail(&recv_entry->entry, &srx_ctx->rx_queue); ++ fastlock_release(&srx_ctx->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_srx_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_rx_ctx *srx_ctx; ++ ++ srx_ctx = container_of(ep, struct tcpx_rx_ctx, rx_fid); ++ assert(count <= TCPX_IOV_LIMIT); ++ ++ recv_entry = tcpx_srx_xfer_alloc(srx_ctx); ++ if (!recv_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry->msg_data.iov_cnt = count; ++ memcpy(recv_entry->msg_data.iov, iov, count * sizeof(*iov)); ++ ++ recv_entry->flags = FI_MSG | FI_RECV; ++ recv_entry->context = context; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ slist_insert_tail(&recv_entry->entry, &srx_ctx->rx_queue); ++ fastlock_release(&srx_ctx->lock); ++ return FI_SUCCESS; ++} ++ ++struct fi_ops_msg tcpx_srx_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = tcpx_srx_recv, ++ .recvv = tcpx_srx_recvv, ++ .recvmsg = tcpx_srx_recvmsg, ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_cq.c +index af7f442..7a0c755 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_cq.c +@@ -52,7 +52,7 @@ static struct fi_ops udpx_cq_fi_ops = { + .size = sizeof(struct fi_ops), + .close = udpx_cq_close, + .bind = fi_no_bind, +- .control = fi_no_control, ++ .control = ofi_cq_control, + .ops_open = fi_no_ops_open, + }; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_domain.c +index 1f82b7b..a40e8f2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_domain.c +@@ -38,7 +38,7 @@ + + static struct fi_ops_domain udpx_domain_ops = { + .size = sizeof(struct fi_ops_domain), +- .av_open = ip_av_create, ++ .av_open = ofi_ip_av_create, + .cq_open = udpx_cq_open, + .endpoint = udpx_endpoint, + .scalable_ep = fi_no_scalable_ep, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_ep.c +index 59a44da..2a1145f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_ep.c +@@ -42,7 +42,7 @@ static int udpx_setname(fid_t fid, void *addr, size_t addrlen) + int ret; + + ep = container_of(fid, struct udpx_ep, util_ep.ep_fid.fid); +- FI_DBG(&udpx_prov, FI_LOG_EP_CTRL, "%s\n", ofi_hex_str(addr, addrlen)); ++ ofi_straddr_dbg(&udpx_prov, FI_LOG_EP_CTRL, "bind addr: ", addr); + ret = bind(ep->sock, addr, (socklen_t)addrlen); + if (ret) { + FI_WARN(&udpx_prov, FI_LOG_EP_CTRL, "bind %d (%s)\n", +@@ -252,7 +252,7 @@ static void udpx_rx_src_comp(struct udpx_ep *ep, void *context, uint64_t flags, + size_t len, void *buf, void *addr) + { + ep->util_ep.rx_cq->src[ofi_cirque_windex(ep->util_ep.rx_cq->cirq)] = +- ip_av_get_index(ep->util_ep.av, addr); ++ ofi_ip_av_get_fi_addr(ep->util_ep.av, addr); + udpx_rx_comp(ep, context, flags, len, buf, addr); + } + +@@ -293,7 +293,7 @@ static void udpx_ep_progress(struct util_ep *util_ep) + hdr.msg_iov = entry->iov; + hdr.msg_iovlen = entry->iov_count; + +- ret = recvmsg(ep->sock, &hdr, 0); ++ ret = ofi_recvmsg_udp(ep->sock, &hdr, 0); + if (ret >= 0) { + ep->rx_comp(ep, entry->context, 0, ret, NULL, &addr); + ofi_cirque_discard(ep->rxq); +@@ -374,8 +374,9 @@ out: + static const void * + udpx_dest_addr(struct udpx_ep *ep, fi_addr_t addr, uint64_t flags) + { +- return (flags & FI_MULTICAST) ? (const void *) (uintptr_t) addr : +- ip_av_get_addr(ep->util_ep.av, (int)addr); ++ return (flags & FI_MULTICAST) ? ++ (const void *) (uintptr_t) addr : ++ ofi_ip_av_get_addr(ep->util_ep.av, (int)addr); + } + + static size_t +@@ -416,7 +417,7 @@ static ssize_t udpx_send(struct fid_ep *ep_fid, const void *buf, size_t len, + struct udpx_ep *ep; + + ep = container_of(ep_fid, struct udpx_ep, util_ep.ep_fid.fid); +- return udpx_sendto(ep, buf, len, ip_av_get_addr(ep->util_ep.av, (int)dest_addr), ++ return udpx_sendto(ep, buf, len, ofi_ip_av_get_addr(ep->util_ep.av, (int)dest_addr), + ep->util_ep.av->addrlen, context); + } + +@@ -453,7 +454,7 @@ static ssize_t udpx_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, + goto out; + } + +- ret = sendmsg(ep->sock, &hdr, 0); ++ ret = ofi_sendmsg_udp(ep->sock, &hdr, 0); + if (ret >= 0) { + ep->tx_comp(ep, msg->context); + ret = 0; +@@ -501,7 +502,7 @@ static ssize_t udpx_inject(struct fid_ep *ep_fid, const void *buf, size_t len, + + ep = container_of(ep_fid, struct udpx_ep, util_ep.ep_fid.fid); + ret = ofi_sendto_socket(ep->sock, buf, len, 0, +- ip_av_get_addr(ep->util_ep.av, (int)dest_addr), ++ ofi_ip_av_get_addr(ep->util_ep.av, (int)dest_addr), + (socklen_t)ep->util_ep.av->addrlen); + return ret == (ssize_t)len ? 0 : -errno; + } +@@ -604,7 +605,7 @@ static int udpx_ep_bind_cq(struct udpx_ep *ep, struct util_cq *cq, + wait = container_of(cq->wait, + struct util_wait_fd, util_wait); + ret = fi_epoll_add(wait->epoll_fd, (int)ep->sock, +- &ep->util_ep.ep_fid.fid); ++ FI_EPOLL_IN, &ep->util_ep.ep_fid.fid); + if (ret) + return ret; + } else { +@@ -660,22 +661,30 @@ static int udpx_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + static void udpx_bind_src_addr(struct udpx_ep *ep) + { + int ret; +- struct addrinfo ai, *rai = NULL; ++ struct addrinfo ai, *rai = NULL, *cur_ai; + char hostname[HOST_NAME_MAX]; + + memset(&ai, 0, sizeof(ai)); +- ai.ai_family = AF_INET; + ai.ai_socktype = SOCK_DGRAM; + +- ofi_getnodename(hostname, sizeof(hostname)); +- ret = getaddrinfo(hostname, NULL, &ai, &rai); ++ ret = gethostname(hostname, sizeof(hostname)); ++ ret = getaddrinfo(ret ? "127.0.0.1" : hostname, NULL, &ai, &rai); + if (ret) { + FI_WARN(&udpx_prov, FI_LOG_EP_CTRL, + "getaddrinfo failed\n"); + return; + } + +- ret = udpx_setname(&ep->util_ep.ep_fid.fid, rai->ai_addr, rai->ai_addrlen); ++ for (cur_ai = rai; cur_ai && cur_ai->ai_family != AF_INET; ++ cur_ai = cur_ai->ai_next) ++ ; ++ ++ if (cur_ai) { ++ ret = udpx_setname(&ep->util_ep.ep_fid.fid, cur_ai->ai_addr, ++ cur_ai->ai_addrlen); ++ } else { ++ ret = -FI_EADDRNOTAVAIL; ++ } + if (ret) { + FI_WARN(&udpx_prov, FI_LOG_EP_CTRL, "failed to set addr\n"); + } +@@ -763,13 +772,11 @@ int udpx_endpoint(struct fid_domain *domain, struct fi_info *info, + ret = ofi_endpoint_init(domain, &udpx_util_prov, info, &ep->util_ep, + context, udpx_ep_progress); + if (ret) +- goto err; ++ goto err1; + + ret = udpx_ep_init(ep, info); +- if (ret) { +- free(ep); +- return ret; +- } ++ if (ret) ++ goto err2; + + *ep_fid = &ep->util_ep.ep_fid; + (*ep_fid)->fid.ops = &udpx_ep_fi_ops; +@@ -779,7 +786,9 @@ int udpx_endpoint(struct fid_domain *domain, struct fi_info *info, + &udpx_msg_mcast_ops : &udpx_msg_ops; + + return 0; +-err: ++err2: ++ ofi_endpoint_close(&ep->util_ep); ++err1: + free(ep); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_init.c +index 0b0e763..3e00f92 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_init.c +@@ -137,7 +137,7 @@ static void udpx_fini(void) + struct fi_provider udpx_prov = { + .name = "UDP", + .version = FI_VERSION(UDPX_MAJOR_VERSION, UDPX_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = udpx_getinfo, + .fabric = udpx_fabric, + .cleanup = udpx_fini +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_fabric.c +index ba2625c..390ce41 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_fabric.c +@@ -341,6 +341,80 @@ static int validate_modebits(uint32_t version, const struct fi_info *hints, + return FI_SUCCESS; + } + ++static int usdf_alloc_fid_nic(struct fi_info *fi, ++ struct usd_device_attrs *dap) ++{ ++ int ret; ++ struct fid_nic *nic = NULL; ++ struct fi_device_attr *da = NULL; ++ struct fi_link_attr *la = NULL; ++ ++ nic = ofi_nic_dup(NULL); ++ if (!nic) ++ goto nomem; ++ ++ da = nic->device_attr; ++ da->name = strdup(dap->uda_devname); ++ if (!da->name) ++ goto nomem; ++ ret = asprintf(&da->device_id, "%s (%s)", ++ usd_devid_to_pid(dap->uda_vendor_id, ++ dap->uda_device_id), ++ usd_devid_to_nicname(dap->uda_vendor_id, ++ dap->uda_device_id)); ++ if (ret < 0) ++ goto nomem; ++ ret = asprintf(&da->device_version, "0x%x", dap->uda_vendor_part_id); ++ if (ret < 0) ++ goto nomem; ++ ret = asprintf(&da->vendor_id, "0x%x", dap->uda_vendor_id); ++ if (ret < 0) ++ goto nomem; ++ da->driver = strdup("usnic_verbs"); ++ if (!da->driver) ++ goto nomem; ++ da->firmware = strdup(dap->uda_firmware); ++ if (!da->firmware) ++ goto nomem; ++ ++ // usnic does not currently expose PCI bus information, so we ++ // set the bus type to unknown. ++ nic->bus_attr->bus_type = FI_BUS_UNKNOWN; ++ ++ la = nic->link_attr; ++ ++ socklen_t size = INET_ADDRSTRLEN; ++ la->address = calloc(1, size); ++ if (!la->address) ++ goto nomem; ++ inet_ntop(AF_INET, &dap->uda_ipaddr_be, la->address, size); ++ la->mtu = dap->uda_mtu; ++ la->speed = dap->uda_bandwidth; ++ switch (dap->uda_link_state) { ++ case USD_LINK_UP: ++ la->state = FI_LINK_UP; ++ break; ++ case USD_LINK_DOWN: ++ la->state = FI_LINK_DOWN; ++ break; ++ default: ++ la->state = FI_LINK_UNKNOWN; ++ break; ++ } ++ la->network_type = strdup("Ethernet"); ++ if (!la->network_type) ++ goto nomem; ++ ++ fi->nic = nic; ++ ++ return FI_SUCCESS; ++ ++nomem: ++ if (nic) ++ fi_close(&nic->fid); ++ return -FI_ENOMEM; ++} ++ + static int usdf_fill_info_dgram( + uint32_t version, + const struct fi_info *hints, +@@ -419,6 +493,10 @@ static int usdf_fill_info_dgram( + if (ret) + goto fail; + ++ ret = usdf_alloc_fid_nic(fi, dap); ++ if (ret) ++ goto fail; ++ + /* add to tail of list */ + if (*fi_first == NULL) { + *fi_first = fi; +@@ -508,6 +586,10 @@ static int usdf_fill_info_msg( + if (ret) + goto fail; + ++ ret = usdf_alloc_fid_nic(fi, dap); ++ if (ret) ++ goto fail; ++ + /* add to tail of list */ + if (*fi_first == NULL) { + *fi_first = fi; +@@ -595,6 +677,10 @@ static int usdf_fill_info_rdm( + if (ret) + goto fail; + ++ ret = usdf_alloc_fid_nic(fi, dap); ++ if (ret) ++ goto fail; ++ + /* add to tail of list */ + if (*fi_first == NULL) { + *fi_first = fi; +@@ -1162,7 +1248,7 @@ static void usdf_fini(void) + struct fi_provider usdf_ops = { + .name = USDF_PROV_NAME, + .version = USDF_PROV_VERSION, +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = usdf_getinfo, + .fabric = usdf_fabric_open, + .cleanup = usdf_fini +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_rdm.c +index fbb959e..d2eee05 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_rdm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_rdm.c +@@ -688,7 +688,7 @@ static inline ssize_t _usdf_rdm_send_vector(struct fid_ep *fep, + + tot_len = 0; + if (flags & FI_INJECT) { +- /* copy to the the wqe's tiny injection buffer */ ++ /* copy to the wqe's tiny injection buffer */ + for (i = 0; i < count; ++i) { + assert(tot_len + iov[i].iov_len <= + USDF_RDM_MAX_INJECT_SIZE); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c +index 9871a1f..b9dddde 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c +@@ -69,8 +69,8 @@ usd_ib_get_devlist( + DIR *class_dir; + struct dirent *dent; + struct stat sbuf; +- char dev_path[PATH_MAX]; +- char ibdev_path[PATH_MAX]; ++ char *dev_path = NULL; ++ char *ibdev_path = NULL; + char ibdev_buf[32]; + struct usd_ib_dev *idp; + struct usd_ib_dev *last_idp; +@@ -90,14 +90,17 @@ usd_ib_get_devlist( + last_idp = NULL; + fd = -1; + while ((dent = readdir(class_dir)) != NULL) { +- + /* skip "." and ".." */ + if (dent->d_name[0] == '.') + continue; + + /* build path to entry */ +- snprintf(dev_path, sizeof(dev_path), "%s/%s", class_path, +- dent->d_name); ++ if (asprintf(&dev_path, "%s/%s", class_path, ++ dent->d_name) <= 0) { ++ rc = -errno; ++ usd_perror("failed to asprintf"); ++ goto out; ++ } + + /* see if it's a dir */ + rc = stat(dev_path, &sbuf); +@@ -112,7 +115,11 @@ usd_ib_get_devlist( + continue; + + /* read the ibdev */ +- snprintf(ibdev_path, sizeof(ibdev_path), "%s/ibdev", dev_path); ++ if (asprintf(&ibdev_path, "%s/ibdev", dev_path) <= 0) { ++ rc = -errno; ++ usd_perror(ibdev_path); ++ goto out; ++ } + fd = open(ibdev_path, O_RDONLY); + if (fd == -1) { + usd_perror(ibdev_path); +@@ -156,11 +163,17 @@ usd_ib_get_devlist( + idp->id_next = NULL; + last_idp = idp; + } ++ free(dev_path); ++ dev_path = NULL; ++ free(ibdev_path); ++ ibdev_path = NULL; + } + rc = 0; + + out: + /* clean up */ ++ free(dev_path); ++ free(ibdev_path); + if (class_dir != NULL) { + closedir(class_dir); + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_atomic.c +index 87d4336..a419055 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_atomic.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_atomic.c +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2018 Cray Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -32,7 +33,6 @@ + + #include "ofi_atomic.h" + +- + static const size_t ofi_datatype_size_table[] = { + [FI_INT8] = sizeof(int8_t), + [FI_UINT8] = sizeof(uint8_t), +@@ -59,10 +59,60 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + return ofi_datatype_size_table[datatype]; + } + +- + /* + * Basic atomic operations + */ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++#define OFI_OP_MIN(type,dst,src) (dst) > (src) ++#define OFI_OP_MAX(type,dst,src) (dst) < (src) ++#define OFI_OP_SUM(type,dst,src) (dst) + (src) ++#define OFI_OP_PROD(type,dst,src) (dst) * (src) ++#define OFI_OP_LOR(type,dst,src) (dst) || (src) ++#define OFI_OP_LAND(type,dst,src) (dst) && (src) ++ ++#define OFI_OP_BOR(type,dst,src) \ ++ __atomic_fetch_or(&(dst), (src), __ATOMIC_SEQ_CST) ++#define OFI_OP_BAND(type,dst,src) \ ++ __atomic_fetch_and(&(dst), (src), __ATOMIC_SEQ_CST) ++#define OFI_OP_LXOR(type,dst,src) \ ++ ((dst) && !(src)) || (!(dst) && (src)) ++#define OFI_OP_BXOR(type,dst,src) \ ++ __atomic_fetch_xor(&(dst), (src), __ATOMIC_SEQ_CST) ++#define OFI_OP_WRITE(type,dst,src) \ ++ __atomic_store(&(dst), &(src), __ATOMIC_SEQ_CST) ++ ++#define OFI_OP_READ(type,dst,res) \ ++ __atomic_load(&(dst), &(res), __ATOMIC_SEQ_CST) ++#define OFI_OP_READWRITE(type,dst,src,res) \ ++ __atomic_exchange(&(dst), &(src), &(res), __ATOMIC_SEQ_CST) ++ ++#define OFI_OP_CSWAP_EQ(type,dst,src,cmp) \ ++ __atomic_compare_exchange(&(dst),&(cmp),&(src),0, \ ++ __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ++#define OFI_OP_CSWAP_NE(type,dst,src,cmp) ((cmp) != (dst)) ++#define OFI_OP_CSWAP_LE(type,dst,src,cmp) ((cmp) <= (dst)) ++#define OFI_OP_CSWAP_LT(type,dst,src,cmp) ((cmp) < (dst)) ++#define OFI_OP_CSWAP_GE(type,dst,src,cmp) ((cmp) >= (dst)) ++#define OFI_OP_CSWAP_GT(type,dst,src,cmp) ((cmp) > (dst)) ++#define OFI_OP_MSWAP(type,dst,src,cmp) \ ++ (((src) & (cmp)) | ((dst) & ~(cmp))) ++ ++/* Need special handlers for OFI complex datatypes for portability */ ++#define OFI_OP_SUM_COMPLEX(type,dst,src) ofi_complex_sum_##type(dst,src) ++#define OFI_OP_PROD_COMPLEX(type,dst,src) ofi_complex_prod_##type(dst,src) ++#define OFI_OP_LOR_COMPLEX(type,dst,src) ofi_complex_lor_##type(dst,src) ++#define OFI_OP_LAND_COMPLEX(type,dst,src) ofi_complex_land_##type(dst,src) ++#define OFI_OP_LXOR_COMPLEX(type,dst,src) ofi_complex_lxor_##type(dst,src) ++#define OFI_OP_CSWAP_EQ_COMPLEX(type,dst,src,cmp) \ ++ __atomic_compare_exchange(&(dst),&(cmp),&(src),0, \ ++ __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ++#define OFI_OP_CSWAP_NE_COMPLEX(type,dst,src,cmp) \ ++ (!ofi_complex_eq_##type(dst,cmp)) ++ ++#define OFI_OP_READWRITE_COMPLEX OFI_OP_READWRITE ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ + + #define OFI_OP_MIN(type,dst,src) if ((dst) > (src)) (dst) = (src) + #define OFI_OP_MAX(type,dst,src) if ((dst) < (src)) (dst) = (src) +@@ -74,15 +124,15 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + #define OFI_OP_BAND(type,dst,src) (dst) &= (src) + #define OFI_OP_LXOR(type,dst,src) (dst) = ((dst) && !(src)) || (!(dst) && (src)) + #define OFI_OP_BXOR(type,dst,src) (dst) ^= (src) +-#define OFI_OP_READ(type,dst,src) /* src unused, dst is written to result */ ++#define OFI_OP_READ(type,dst,src) (dst) + #define OFI_OP_WRITE(type,dst,src) (dst) = (src) + +-#define OFI_OP_CSWAP_EQ(type,dst,src,cmp) if ((dst) == (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_NE(type,dst,src,cmp) if ((dst) != (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_LE(type,dst,src,cmp) if ((dst) <= (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_LT(type,dst,src,cmp) if ((dst) < (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_GE(type,dst,src,cmp) if ((dst) >= (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_GT(type,dst,src,cmp) if ((dst) > (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_EQ(type,dst,src,cmp) if ((cmp) == (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_NE(type,dst,src,cmp) if ((cmp) != (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_LE(type,dst,src,cmp) if ((cmp) <= (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_LT(type,dst,src,cmp) if ((cmp) < (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_GE(type,dst,src,cmp) if ((cmp) >= (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_GT(type,dst,src,cmp) if ((cmp) > (dst)) (dst) = (src) + #define OFI_OP_MSWAP(type,dst,src,cmp) (dst) = (((src) & (cmp)) | \ + ((dst) & ~(cmp))) + +@@ -92,14 +142,14 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + #define OFI_OP_LOR_COMPLEX(type,dst,src) (dst) = ofi_complex_lor_##type(dst,src) + #define OFI_OP_LAND_COMPLEX(type,dst,src) (dst) = ofi_complex_land_##type(dst,src) + #define OFI_OP_LXOR_COMPLEX(type,dst,src) (dst) = ofi_complex_lxor_##type(dst,src) +-#define OFI_OP_READ_COMPLEX OFI_OP_READ +-#define OFI_OP_WRITE_COMPLEX OFI_OP_WRITE +- + #define OFI_OP_CSWAP_EQ_COMPLEX(type,dst,src,cmp) \ + if (ofi_complex_eq_##type(dst,cmp)) (dst) = (src) + #define OFI_OP_CSWAP_NE_COMPLEX(type,dst,src,cmp) \ + if (!ofi_complex_eq_##type(dst,cmp)) (dst) = (src) ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ + ++#define OFI_OP_READ_COMPLEX OFI_OP_READ ++#define OFI_OP_WRITE_COMPLEX OFI_OP_WRITE + + /******************************** + * ATOMIC TYPE function templates +@@ -112,8 +162,6 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + * WRITE + */ + #define OFI_DEF_WRITE_NAME(op, type) ofi_write_## op ##_## type, +-#define OFI_DEF_WRITE_COMPLEX_NAME(op, type) ofi_write_## op ##_## type, +- + #define OFI_DEF_WRITE_FUNC(op, type) \ + static void ofi_write_## op ##_## type \ + (void *dst, const void *src, size_t cnt) \ +@@ -121,10 +169,14 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + size_t i; \ + type *d = (dst); \ + const type *s = (src); \ +- for (i = 0; i < cnt; i++) \ +- op(type, d[i], s[i]); \ ++ type temp_s; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ op(type, d[i], temp_s); \ ++ } \ + } + ++#define OFI_DEF_WRITE_COMPLEX_NAME(op, type) ofi_write_## op ##_## type, + #define OFI_DEF_WRITE_COMPLEX_FUNC(op, type) \ + static void ofi_write_## op ##_## type \ + (void *dst, const void *src, size_t cnt) \ +@@ -132,26 +184,112 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + size_t i; \ + ofi_complex_##type *d = (dst); \ + const ofi_complex_##type *s = (src); \ +- for (i = 0; i < cnt; i++) \ +- op(type, d[i], s[i]); \ ++ ofi_complex_##type temp_s; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ op(type, d[i], temp_s); \ ++ } \ ++ } ++ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++#define OFI_DEF_WRITEEXT_NAME(op, type) ofi_write_## op ##_## type, ++#define OFI_DEF_WRITEEXT_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ type target; \ ++ type val; \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val,0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ } \ ++ } ++ ++#define OFI_DEF_WRITEEXT_CMP_NAME(op, type) ofi_write_## op ##_## type, ++#define OFI_DEF_WRITEEXT_CMP_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ type target; \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ type temp_s; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ do { \ ++ success = 1; \ ++ target = d[i]; \ ++ if (op(type, d[i], s[i])) { \ ++ temp_s = s[i]; \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&temp_s, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } \ ++ } while (!success); \ ++ } \ ++ } ++ ++#define OFI_DEF_WRITEEXT_COMPLEX_NAME(op, type) ofi_write_## op ##_## type, ++#define OFI_DEF_WRITEEXT_COMPLEX_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ ofi_complex_##type target; \ ++ ofi_complex_##type val; \ ++ ofi_complex_##type *d = (dst); \ ++ const ofi_complex_##type *s = (src); \ ++ size_t i; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val,0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ } \ + } + ++#endif /* HAVE BUILTIN_MM_ATOMICS */ ++ + /* + * READ (fetch) + */ + #define OFI_DEF_READ_NAME(op, type) ofi_read_## op ##_## type, + #define OFI_DEF_READ_COMPLEX_NAME(op, type) ofi_read_## op ##_## type, + ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ + #define OFI_DEF_READ_FUNC(op, type) \ + static void ofi_read_## op ##_## type \ +- (void *dst, const void *src, void *res, size_t cnt) \ ++ (void *dst, const void *src, void *res, size_t cnt) \ + { \ + size_t i; \ + type *d = (dst); \ + type *r = (res); \ + OFI_UNUSED(src); \ + for (i = 0; i < cnt; i++) \ +- r[i] = d[i]; \ ++ op(type, d[i], r[i]); \ + } + + #define OFI_DEF_READ_COMPLEX_FUNC(op, type) \ +@@ -163,15 +301,44 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + ofi_complex_##type *r = (res); \ + OFI_UNUSED(src); \ + for (i = 0; i < cnt; i++) \ +- r[i] = d[i]; \ ++ op(type, d[i], r[i]); \ ++ } ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_DEF_READ_FUNC(op, type) \ ++ static void ofi_read_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ type *r = (res); \ ++ OFI_UNUSED(src); \ ++ for (i = 0; i < cnt; i++) \ ++ r[i] = op(type, d[i], r[i]); \ ++ } ++ ++#define OFI_DEF_READ_COMPLEX_FUNC(op, type) \ ++ static void ofi_read_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ ofi_complex_##type *r = (res); \ ++ OFI_UNUSED(src); \ ++ for (i = 0; i < cnt; i++) \ ++ r[i] = op(type, d[i], s[i]); \ + } + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ ++ + /* + * READWRITE (fetch-write) + */ +-#define OFI_DEF_READWRITE_NAME(op, type) ofi_readwrite_## op ##_## type, +-#define OFI_DEF_READWRITE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, + ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++#define OFI_DEF_READWRITE_NAME(op, type) ofi_readwrite_## op ##_## type, + #define OFI_DEF_READWRITE_FUNC(op, type) \ + static void ofi_readwrite_## op ##_## type \ + (void *dst, const void *src, void *res, size_t cnt) \ +@@ -180,41 +347,333 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + type *d = (dst); \ + const type *s = (src); \ + type *r = (res); \ ++ type temp_s; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ r[i] = op(type, d[i], temp_s); \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITEEXT_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITEEXT_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ type target; \ ++ type val; \ ++ size_t i; \ ++ type *d = (dst); \ ++ type *r = (res); \ ++ const type *s = (src); \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val,0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITEEXT_CMP_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITEEXT_CMP_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ type target; \ ++ size_t i; \ ++ type *d = (dst); \ ++ type *r = (res); \ ++ const type *s = (src); \ ++ type temp_s; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ do { \ ++ target = d[i]; \ ++ success = 1; \ ++ if (op(type, d[i], s[i])) { \ ++ temp_s = s[i]; \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&temp_s, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#define OFI_DEF_EXCHANGE_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_EXCHANGE_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = dst; \ ++ const type *s = src; \ ++ type *r = res; \ ++ type temp_s; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ op(type, d[i], temp_s, r[i]); \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITE_COMPLEX_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ ofi_complex_##type *r = res; \ ++ ofi_complex_##type temp_s; \ ++ size_t i; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ r[i] = op(type, d[i], temp_s); \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITEEXT_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITEEXT_COMPLEX_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type target; \ ++ ofi_complex_##type val; \ ++ ofi_complex_##type *d = dst; \ ++ ofi_complex_##type *r = res; \ ++ const ofi_complex_##type *s = src; \ ++ size_t i; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val,0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#define OFI_DEF_EXCHANGE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_EXCHANGE_COMPLEX_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ ofi_complex_##type *r = res; \ ++ ofi_complex_##type temp_s; \ ++ size_t i; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ op(type, d[i], temp_s, r[i]); \ ++ } \ ++ } ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_DEF_READWRITE_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITE_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = dst; \ ++ const type *s = src; \ ++ type *r = res; \ + for (i = 0; i < cnt; i++) { \ + r[i] = d[i]; \ + op(type, d[i], s[i]); \ + } \ + } + ++#define OFI_DEF_READWRITE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, + #define OFI_DEF_READWRITE_COMPLEX_FUNC(op, type) \ + static void ofi_readwrite_## op ##_## type \ + (void *dst, const void *src, void *res, size_t cnt) \ + { \ + size_t i; \ +- ofi_complex_##type *d = (dst); \ +- const ofi_complex_##type *s = (src); \ +- ofi_complex_##type *r = (res); \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ ofi_complex_##type *r = res; \ + for (i = 0; i < cnt; i++) { \ + r[i] = d[i]; \ + op(type, d[i], s[i]); \ + } \ + } + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ ++ + /* + * CSWAP + */ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ + #define OFI_DEF_CSWAP_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAP_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = dst; \ ++ const type *s = src; \ ++ const type *c = cmp; \ ++ type *r = res; \ ++ type temp_c; \ ++ type temp_s; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_c = c[i]; \ ++ temp_s = s[i]; \ ++ /* We never use weak operations */ \ ++ (void) op(type, d[i], temp_s, temp_c); \ ++ /* If d[i] != temp_c then d[i] -> temp_c */ \ ++ r[i] = temp_c; \ ++ } \ ++ } ++ ++#define OFI_DEF_CSWAPEXT_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAPEXT_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ type target; \ ++ size_t i; \ ++ type *d = dst; \ ++ type *r = res; \ ++ const type *c = cmp; \ ++ const type *s = src; \ ++ type val; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i], c[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#define OFI_DEF_CSWAPEXT_CMP_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAPEXT_CMP_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ type target; \ ++ size_t i; \ ++ type *d = dst; \ ++ type *r = res; \ ++ const type *c = cmp; \ ++ const type *s = src; \ ++ type temp_s; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ do { \ ++ success = 1; \ ++ target = d[i]; \ ++ if (op(type, d[i], s[i], c[i])) { \ ++ temp_s = s[i]; \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&temp_s, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ + #define OFI_DEF_CSWAP_COMPLEX_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAP_COMPLEX_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ const ofi_complex_##type *c = cmp; \ ++ ofi_complex_##type *r = res; \ ++ ofi_complex_##type temp_c; \ ++ ofi_complex_##type temp_s; \ ++ size_t i; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_c = c[i]; \ ++ temp_s = s[i]; \ ++ (void) op(type, d[i], temp_s, temp_c); \ ++ /* If d[i] != temp_c then d[i] -> temp_c */ \ ++ r[i] = temp_c; \ ++ } \ ++ } + ++#define OFI_DEF_CSWAPEXT_CMP_COMPLEX_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAPEXT_CMP_COMPLEX_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type target; \ ++ ofi_complex_##type *d = dst; \ ++ ofi_complex_##type *r = res; \ ++ const ofi_complex_##type *c = cmp; \ ++ const ofi_complex_##type *s = src; \ ++ ofi_complex_##type temp_s; \ ++ size_t i; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ do { \ ++ success = 1; \ ++ target = d[i]; \ ++ if (op(type, d[i], s[i], c[i])) { \ ++ temp_s = s[i]; \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&temp_s, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_DEF_CSWAP_NAME(op, type) ofi_cswap_## op ##_## type, + #define OFI_DEF_CSWAP_FUNC(op, type) \ + static void ofi_cswap_## op ##_## type \ + (void *dst, const void *src, const void *cmp, \ + void *res, size_t cnt) \ + { \ + size_t i; \ +- type *d = (dst); \ +- const type *s = (src); \ +- const type *c = (cmp); \ ++ type *d = dst; \ ++ const type *s = src; \ ++ const type *c = cmp; \ + type *r = (res); \ + for (i = 0; i < cnt; i++) { \ + r[i] = d[i]; \ +@@ -222,22 +681,24 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + } \ + } + ++#define OFI_DEF_CSWAP_COMPLEX_NAME(op, type) ofi_cswap_## op ##_## type, + #define OFI_DEF_CSWAP_COMPLEX_FUNC(op, type) \ + static void ofi_cswap_## op ##_## type \ + (void *dst, const void *src, const void *cmp, \ + void *res, size_t cnt) \ + { \ + size_t i; \ +- ofi_complex_##type *d = (dst); \ +- const ofi_complex_##type *s = (src); \ +- const ofi_complex_##type *c = (cmp); \ +- ofi_complex_##type *r = (res); \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ const ofi_complex_##type *c = cmp; \ ++ ofi_complex_##type *r = res; \ + for (i = 0; i < cnt; i++) { \ + r[i] = d[i]; \ + op(type, d[i], s[i], c[i]); \ + } \ + } + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ + + /********************************************************************* + * Macros create atomic functions for each operation for each datatype +@@ -251,6 +712,25 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + * The latter is needed to populate the dispatch table + * op - OFI_OP_XXX function should perform (e.g. OFI_OP_MIN) + */ ++#define OFI_DEFINE_INT_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME ++ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++/* Only support 8 byte and under datatypes */ + #define OFI_DEFINE_ALL_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ +@@ -263,9 +743,9 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ + OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, float) \ +- OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, double)\ +- OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ +- OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, long_double) ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME + + #define OFI_DEFINE_REALNO_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ +@@ -280,10 +760,12 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ + OFI_DEF_NOOP_##FUNCNAME \ + OFI_DEF_NOOP_##FUNCNAME \ +- OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ ++ OFI_DEF_NOOP_##FUNCNAME \ + OFI_DEF_NOOP_##FUNCNAME + +-#define OFI_DEFINE_INT_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_DEFINE_ALL_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ +@@ -292,13 +774,128 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, float) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, double)\ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, long_double) ++ ++#define OFI_DEFINE_REALNO_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ + OFI_DEF_NOOP_##FUNCNAME \ + OFI_DEF_NOOP_##FUNCNAME \ +- OFI_DEF_NOOP_##FUNCNAME \ +- OFI_DEF_NOOP_##FUNCNAME \ +- OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ + OFI_DEF_NOOP_##FUNCNAME + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_OP_NOT_SUPPORTED(op) NULL, NULL, NULL, NULL, NULL, \ ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ++ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++/********************** ++ * Compiler built-in atomics write dispatch table ++ **********************/ ++ ++OFI_DEFINE_REALNO_HANDLERS(WRITEEXT_CMP, FUNC, OFI_OP_MIN) ++OFI_DEFINE_REALNO_HANDLERS(WRITEEXT_CMP, FUNC, OFI_OP_MAX) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_SUM) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_PROD) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_LOR) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_LAND) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BOR) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BAND) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_LXOR) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BXOR) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_WRITE) ++ ++void (*ofi_atomic_write_handlers[OFI_WRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, size_t cnt) = ++{ ++ { OFI_DEFINE_REALNO_HANDLERS(WRITEEXT_CMP, NAME, OFI_OP_MIN) }, ++ { OFI_DEFINE_REALNO_HANDLERS(WRITEEXT_CMP, NAME, OFI_OP_MAX) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_SUM) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_PROD) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_LOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_LAND) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BOR) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BAND) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_LXOR) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BXOR) }, ++ { OFI_OP_NOT_SUPPORTED(FI_ATOMIC_READ) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_WRITE) }, ++}; ++ ++/*************************** ++ * Compiler built-in atomics read-write dispatch table ++ ***************************/ ++ ++OFI_DEFINE_REALNO_HANDLERS(READWRITEEXT_CMP, FUNC, OFI_OP_MIN) ++OFI_DEFINE_REALNO_HANDLERS(READWRITEEXT_CMP, FUNC, OFI_OP_MAX) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_SUM) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_PROD) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_LOR) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_LAND) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BOR) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BAND) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_LXOR) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BXOR) ++OFI_DEFINE_ALL_HANDLERS(READ, FUNC, OFI_OP_READ) ++OFI_DEFINE_ALL_HANDLERS(EXCHANGE, FUNC, OFI_OP_READWRITE) ++ ++void (*ofi_atomic_readwrite_handlers[OFI_READWRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, void *res, size_t cnt) = ++{ ++ { OFI_DEFINE_REALNO_HANDLERS(READWRITEEXT_CMP, NAME, OFI_OP_MIN) }, ++ { OFI_DEFINE_REALNO_HANDLERS(READWRITEEXT_CMP, NAME, OFI_OP_MAX) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_SUM) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_PROD) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_LOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_LAND) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BOR) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BAND) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_LXOR) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BXOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(READ, NAME, OFI_OP_READ) }, ++ { OFI_DEFINE_ALL_HANDLERS(EXCHANGE, NAME, OFI_OP_READWRITE) }, ++}; ++ ++/***************************** ++ * Compiler built-in atomics compare-swap dispatch table ++ *****************************/ ++ ++OFI_DEFINE_ALL_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_EQ) ++OFI_DEFINE_ALL_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_NE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_LE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_LT) ++OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_GE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_GT) ++OFI_DEFINE_INT_HANDLERS(CSWAPEXT, FUNC, OFI_OP_MSWAP) ++ ++void (*ofi_atomic_swap_handlers[OFI_SWAP_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, const void *cmp, void *res, size_t cnt) = ++{ ++ { OFI_DEFINE_ALL_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_EQ) }, ++ { OFI_DEFINE_ALL_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_NE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_LE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_LT) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_GE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_GT) }, ++ { OFI_DEFINE_INT_HANDLERS(CSWAPEXT, NAME, OFI_OP_MSWAP) }, ++}; ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ + + /********************** + * Write dispatch table +@@ -329,12 +926,10 @@ void (*ofi_atomic_write_handlers[OFI_WRITE_OP_LAST][FI_DATATYPE_LAST]) + { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BAND) }, + { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_LXOR) }, + { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BXOR) }, +- /* no-op: FI_ATOMIC_READ */ +- { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, ++ { OFI_OP_NOT_SUPPORTED(FI_ATOMIC_READ) }, + { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_WRITE) }, + }; + +- + /*************************** + * Read-write dispatch table + ***************************/ +@@ -369,7 +964,6 @@ void (*ofi_atomic_readwrite_handlers[OFI_READWRITE_OP_LAST][FI_DATATYPE_LAST]) + { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_WRITE) }, + }; + +- + /***************************** + * Compare-swap dispatch table + *****************************/ +@@ -394,6 +988,7 @@ void (*ofi_atomic_swap_handlers[OFI_SWAP_OP_LAST][FI_DATATYPE_LAST]) + { OFI_DEFINE_INT_HANDLERS(CSWAP, NAME, OFI_OP_MSWAP) }, + }; + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ + + int ofi_atomic_valid(const struct fi_provider *prov, + enum fi_datatype datatype, enum fi_op op, uint64_t flags) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_attr.c +index 4ed9c14..219ed77 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_attr.c +@@ -33,6 +33,7 @@ + + #include + ++#include + #include + + #define OFI_MSG_CAPS (FI_SEND | FI_RECV) +@@ -40,7 +41,7 @@ + + static int fi_valid_addr_format(uint32_t prov_format, uint32_t user_format) + { +- if (user_format == FI_FORMAT_UNSPEC) ++ if (user_format == FI_FORMAT_UNSPEC || prov_format == FI_FORMAT_UNSPEC) + return 1; + + switch (prov_format) { +@@ -89,52 +90,43 @@ char *ofi_strdup_append(const char *head, const char *tail) + return str; + } + +-static int ofi_has_util_prefix(const char *str) ++int ofi_exclude_prov_name(char **prov_name_list, const char *util_prov_name) + { +- return !strncasecmp(str, OFI_UTIL_PREFIX, strlen(OFI_UTIL_PREFIX)); +-} ++ char *exclude, *name, *temp; + +-const char *ofi_util_name(const char *str, size_t *len) +-{ +- char *delim; ++ exclude = malloc(strlen(util_prov_name) + 2); ++ if (!exclude) ++ return -FI_ENOMEM; + +- delim = strchr(str, OFI_NAME_DELIM); +- if (delim) { +- if (ofi_has_util_prefix(delim + 1)) { +- *len = strlen(delim + 1); +- return delim + 1; +- } else if (ofi_has_util_prefix(str)) { +- *len = delim - str; +- return str; +- } +- } else if (ofi_has_util_prefix(str)) { +- *len = strlen(str); +- return str; +- } +- *len = 0; +- return NULL; +-} ++ exclude[0] = '^'; ++ strcpy(&exclude[1], util_prov_name); + +-const char *ofi_core_name(const char *str, size_t *len) +-{ +- char *delim; ++ if (!*prov_name_list) ++ goto out; + +- delim = strchr(str, OFI_NAME_DELIM); +- if (delim) { +- if (!ofi_has_util_prefix(delim + 1)) { +- *len = strlen(delim + 1); +- return delim + 1; +- } else if (!ofi_has_util_prefix(str)) { +- *len = delim - str; +- return str; +- } +- } else if (!ofi_has_util_prefix(str)) { +- *len = strlen(str); +- return str; +- } +- *len = 0; +- return NULL; ++ name = strdup(*prov_name_list); ++ if (!name) ++ goto err1; ++ ++ ofi_rm_substr_delim(name, util_prov_name, OFI_NAME_DELIM); + ++ if (strlen(name)) { ++ temp = ofi_strdup_append(name, exclude); ++ if (!temp) ++ goto err2; ++ free(exclude); ++ exclude = temp; ++ } ++ free(name); ++ free(*prov_name_list); ++out: ++ *prov_name_list = exclude; ++ return 0; ++err2: ++ free(name); ++err1: ++ free(exclude); ++ return -FI_ENOMEM; + } + + static int ofi_dup_addr(const struct fi_info *info, struct fi_info *dup) +@@ -163,8 +155,7 @@ static int ofi_info_to_core(uint32_t version, const struct fi_provider *prov, + ofi_alter_info_t info_to_core, + struct fi_info **core_hints) + { +- const char *core_name; +- size_t len; ++ int ret = -FI_ENOMEM; + + if (!(*core_hints = fi_allocinfo())) + return -FI_ENOMEM; +@@ -190,17 +181,18 @@ static int ofi_info_to_core(uint32_t version, const struct fi_provider *prov, + } + + if (util_info->fabric_attr->prov_name) { +- core_name = ofi_core_name(util_info->fabric_attr-> +- prov_name, &len); +- if (core_name) { +- (*core_hints)->fabric_attr->prov_name = +- strndup(core_name, len); +- if (!(*core_hints)->fabric_attr->prov_name) { +- FI_WARN(prov, FI_LOG_FABRIC, +- "Unable to alloc prov name\n"); +- goto err; +- } ++ (*core_hints)->fabric_attr->prov_name = ++ strdup(util_info->fabric_attr->prov_name); ++ if (!(*core_hints)->fabric_attr->prov_name) { ++ FI_WARN(prov, FI_LOG_FABRIC, ++ "Unable to alloc prov name\n"); ++ goto err; + } ++ ret = ofi_exclude_prov_name( ++ &(*core_hints)->fabric_attr->prov_name, ++ prov->name); ++ if (ret) ++ goto err; + } + } + +@@ -217,7 +209,7 @@ static int ofi_info_to_core(uint32_t version, const struct fi_provider *prov, + + err: + fi_freeinfo(*core_hints); +- return -FI_ENOMEM; ++ return ret; + } + + static int ofi_info_to_util(uint32_t version, const struct fi_provider *prov, +@@ -335,28 +327,34 @@ int ofix_getinfo(uint32_t version, const char *node, const char *service, + } + + /* Caller should use only fabric_attr in returned core_info */ +-int ofi_get_core_info_fabric(struct fi_fabric_attr *util_attr, ++int ofi_get_core_info_fabric(const struct fi_provider *prov, ++ const struct fi_fabric_attr *util_attr, + struct fi_info **core_info) + { + struct fi_info hints; +- const char *core_name; +- size_t len; + int ret; + +- core_name = ofi_core_name(util_attr->prov_name, &len); +- if (!core_name) ++ /* ofix_getinfo() would append utility provider name after core / lower ++ * layer provider name */ ++ if (!strstr(util_attr->prov_name, prov->name)) + return -FI_ENODATA; + + memset(&hints, 0, sizeof hints); + if (!(hints.fabric_attr = calloc(1, sizeof(*hints.fabric_attr)))) + return -FI_ENOMEM; + +- hints.fabric_attr->name = util_attr->name; +- hints.fabric_attr->api_version = util_attr->api_version; +- if (!(hints.fabric_attr->prov_name = strndup(core_name, len))) { ++ hints.fabric_attr->prov_name = strdup(util_attr->prov_name); ++ if (!hints.fabric_attr->prov_name) { + ret = -FI_ENOMEM; + goto out; + } ++ ++ ret = ofi_exclude_prov_name(&hints.fabric_attr->prov_name, prov->name); ++ if (ret) ++ goto out; ++ ++ hints.fabric_attr->name = util_attr->name; ++ hints.fabric_attr->api_version = util_attr->api_version; + hints.mode = ~0; + + ret = fi_getinfo(util_attr->api_version, NULL, NULL, OFI_CORE_PROV_ONLY, +@@ -621,6 +619,20 @@ int ofi_check_domain_attr(const struct fi_provider *prov, uint32_t api_version, + return 0; + } + ++static int ofi_check_ep_type(const struct fi_provider *prov, ++ const struct fi_ep_attr *prov_attr, ++ const struct fi_ep_attr *user_attr) ++{ ++ if ((user_attr->type != FI_EP_UNSPEC) && ++ (prov_attr->type != FI_EP_UNSPEC) && ++ (user_attr->type != prov_attr->type)) { ++ FI_INFO(prov, FI_LOG_CORE, "Unsupported endpoint type\n"); ++ FI_INFO_CHECK(prov, prov_attr, user_attr, type, FI_TYPE_EP_TYPE); ++ return -FI_ENODATA; ++ } ++ return 0; ++} ++ + int ofi_check_ep_attr(const struct util_prov *util_prov, uint32_t api_version, + const struct fi_info *prov_info, + const struct fi_info *user_info) +@@ -628,13 +640,11 @@ int ofi_check_ep_attr(const struct util_prov *util_prov, uint32_t api_version, + const struct fi_ep_attr *prov_attr = prov_info->ep_attr; + const struct fi_ep_attr *user_attr = user_info->ep_attr; + const struct fi_provider *prov = util_prov->prov; ++ int ret; + +- if ((user_attr->type != FI_EP_UNSPEC) && +- (user_attr->type != prov_attr->type)) { +- FI_INFO(prov, FI_LOG_CORE, "Unsupported endpoint type\n"); +- FI_INFO_CHECK(prov, prov_attr, user_attr, type, FI_TYPE_EP_TYPE); +- return -FI_ENODATA; +- } ++ ret = ofi_check_ep_type(prov, prov_attr, user_attr); ++ if (ret) ++ return ret; + + if ((user_attr->protocol != FI_PROTO_UNSPEC) && + (user_attr->protocol != prov_attr->protocol)) { +@@ -975,6 +985,15 @@ int ofi_check_info(const struct util_prov *util_prov, + if (!user_info) + return 0; + ++ /* Check oft-used endpoint type attribute first to avoid any other ++ * unnecessary check */ ++ if (user_info->ep_attr) { ++ ret = ofi_check_ep_type(prov, prov_info->ep_attr, ++ user_info->ep_attr); ++ if (ret) ++ return ret; ++ } ++ + if (user_info->caps & ~(prov_info->caps)) { + FI_INFO(prov, FI_LOG_CORE, "Unsupported capabilities\n"); + FI_INFO_CHECK(prov, prov_info, user_info, caps, FI_TYPE_CAPS); +@@ -992,6 +1011,8 @@ int ofi_check_info(const struct util_prov *util_prov, + if (!fi_valid_addr_format(prov_info->addr_format, + user_info->addr_format)) { + FI_INFO(prov, FI_LOG_CORE, "address format not supported\n"); ++ FI_INFO_CHECK(prov, prov_info, user_info, addr_format, ++ FI_TYPE_ADDR_FORMAT); + return -FI_ENODATA; + } + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_av.c +index af319f4..5e9fd12 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_av.c +@@ -56,8 +56,6 @@ enum { + UTIL_DEFAULT_AV_SIZE = 1024, + }; + +-static int ofi_cmap_move_handle_to_peer_list(struct util_cmap *cmap, int index); +- + static int fi_get_src_sockaddr(const struct sockaddr *dest_addr, size_t dest_addrlen, + struct sockaddr **src_addr, size_t *src_addrlen) + { +@@ -104,7 +102,7 @@ out: + + } + +-void ofi_getnodename(char *buf, int buflen) ++void ofi_getnodename(uint16_t sa_family, char *buf, int buflen) + { + int ret; + struct addrinfo ai, *rai = NULL; +@@ -115,7 +113,7 @@ void ofi_getnodename(char *buf, int buflen) + buf[buflen - 1] = '\0'; + if (ret == 0) { + memset(&ai, 0, sizeof(ai)); +- ai.ai_family = AF_INET; ++ ai.ai_family = sa_family ? sa_family : AF_INET; + ret = getaddrinfo(buf, NULL, &ai, &rai); + if (!ret) { + freeaddrinfo(rai); +@@ -127,11 +125,18 @@ void ofi_getnodename(char *buf, int buflen) + ret = ofi_getifaddrs(&ifaddrs); + if (!ret) { + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { +- if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || +- (ifa->ifa_addr->sa_family != AF_INET)) ++ if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP)) ++ continue; ++ ++ if (sa_family) { ++ if (ifa->ifa_addr->sa_family != sa_family) ++ continue; ++ } else if ((ifa->ifa_addr->sa_family != AF_INET) && ++ (ifa->ifa_addr->sa_family != AF_INET6)) { + continue; ++ } + +- ret = getnameinfo(ifa->ifa_addr, sizeof(struct sockaddr_in), ++ ret = getnameinfo(ifa->ifa_addr, ofi_sizeofaddr(ifa->ifa_addr), + buf, buflen, NULL, 0, NI_NUMERICHOST); + buf[buflen - 1] = '\0'; + if (ret == 0) { +@@ -142,7 +147,7 @@ void ofi_getnodename(char *buf, int buflen) + freeifaddrs(ifaddrs); + } + #endif +- /* no reasonable address found, try loopback */ ++ /* no reasonable address found, use ipv4 loopback */ + strncpy(buf, "127.0.0.1", buflen); + buf[buflen - 1] = '\0'; + } +@@ -163,7 +168,7 @@ int ofi_get_src_addr(uint32_t addr_format, + } + } + +-static int fi_get_sockaddr(int sa_family, uint64_t flags, ++static int fi_get_sockaddr(int *sa_family, uint64_t flags, + const char *node, const char *service, + struct sockaddr **addr, size_t *addrlen) + { +@@ -171,7 +176,7 @@ static int fi_get_sockaddr(int sa_family, uint64_t flags, + int ret; + + memset(&hints, 0, sizeof hints); +- hints.ai_family = sa_family; ++ hints.ai_family = *sa_family; + hints.ai_socktype = SOCK_STREAM; + if (flags & FI_SOURCE) + hints.ai_flags = AI_PASSIVE; +@@ -186,6 +191,7 @@ static int fi_get_sockaddr(int sa_family, uint64_t flags, + goto out; + } + ++ *sa_family = ai->ai_family; + *addrlen = ai->ai_addrlen; + out: + freeaddrinfo(ai); +@@ -202,19 +208,29 @@ void ofi_get_str_addr(const char *node, const char *service, + *addrlen = strlen(node) + 1; + } + +-int ofi_get_addr(uint32_t addr_format, uint64_t flags, ++int ofi_get_addr(uint32_t *addr_format, uint64_t flags, + const char *node, const char *service, + void **addr, size_t *addrlen) + { +- switch (addr_format) { ++ int sa_family, ret; ++ ++ switch (*addr_format) { + case FI_SOCKADDR: +- return fi_get_sockaddr(0, flags, node, service, +- (struct sockaddr **) addr, addrlen); ++ sa_family = 0; ++ ret = fi_get_sockaddr(&sa_family, flags, node, service, ++ (struct sockaddr **) addr, addrlen); ++ if (ret) ++ return ret; ++ *addr_format = sa_family == AF_INET ? ++ FI_SOCKADDR_IN : FI_SOCKADDR_IN6; ++ return 0; + case FI_SOCKADDR_IN: +- return fi_get_sockaddr(AF_INET, flags, node, service, ++ sa_family = AF_INET; ++ return fi_get_sockaddr(&sa_family, flags, node, service, + (struct sockaddr **) addr, addrlen); + case FI_SOCKADDR_IN6: +- return fi_get_sockaddr(AF_INET6, flags, node, service, ++ sa_family = AF_INET6; ++ return fi_get_sockaddr(&sa_family, flags, node, service, + (struct sockaddr **) addr, addrlen); + case FI_ADDR_STR: + ofi_get_str_addr(node, service, (char **) addr, addrlen); +@@ -224,27 +240,14 @@ int ofi_get_addr(uint32_t addr_format, uint64_t flags, + } + } + +-static void *util_av_get_data(struct util_av *av, int index) +-{ +- return (char *) av->data + (index * av->addrlen); +-} +- +-void *ofi_av_get_addr(struct util_av *av, int index) +-{ +- FI_DBG(av->prov, FI_LOG_AV, "get[%d]:%s\n", index, +- ofi_hex_str(util_av_get_data(av, index), av->addrlen)); +- return util_av_get_data(av, index); +-} +- +-static void util_av_set_data(struct util_av *av, int index, +- const void *data, size_t len) ++void *ofi_av_get_addr(struct util_av *av, fi_addr_t fi_addr) + { +- FI_DBG(av->prov, FI_LOG_AV, "set[%d]:%s\n", index, +- ofi_hex_str(data, len)); +- memcpy(util_av_get_data(av, index), data, len); ++ struct util_av_entry *entry = ++ util_buf_get_by_index(av->av_entry_pool, fi_addr); ++ return entry->addr; + } + +-static int fi_verify_av_insert(struct util_av *av, uint64_t flags) ++int ofi_verify_av_insert(struct util_av *av, uint64_t flags) + { + if ((av->flags & FI_EVENT) && !av->eq) { + FI_WARN(av->prov, FI_LOG_AV, "no EQ bound to AV\n"); +@@ -262,230 +265,79 @@ static int fi_verify_av_insert(struct util_av *av, uint64_t flags) + /* + * Must hold AV lock + */ +-static int util_av_hash_insert(struct util_av_hash *hash, int slot, +- int index, int *table_slot) ++int ofi_av_insert_addr(struct util_av *av, const void *addr, fi_addr_t *fi_addr) + { +- int entry, i; +- +- if (slot < 0 || slot >= hash->slots) +- return -FI_EINVAL; ++ struct util_av_entry *entry = NULL; + +- if (hash->table[slot].index == UTIL_NO_ENTRY) { +- hash->table[slot].index = index; +- if (table_slot) +- *table_slot = slot; ++ HASH_FIND(hh, av->hash, addr, av->addrlen, entry); ++ if (entry) { ++ if (fi_addr) ++ *fi_addr = util_get_buf_index(av->av_entry_pool, entry); ++ ofi_atomic_inc32(&entry->use_cnt); + return 0; ++ } else { ++ entry = util_buf_indexed_alloc(av->av_entry_pool); ++ if (!entry) ++ return -FI_ENOMEM; ++ if (fi_addr) ++ *fi_addr = util_get_buf_index(av->av_entry_pool, entry); ++ memcpy(entry->addr, addr, av->addrlen); ++ ofi_atomic_initialize32(&entry->use_cnt, 1); ++ HASH_ADD(hh, av->hash, addr, av->addrlen, entry); + } +- +- if (hash->free_list == UTIL_NO_ENTRY) +- return -FI_ENOSPC; +- +- entry = hash->free_list; +- hash->free_list = hash->table[hash->free_list].next; +- +- for (i = slot; hash->table[i].next != UTIL_NO_ENTRY; ) +- i = hash->table[i].next; +- +- hash->table[i].next = entry; +- if (table_slot) +- *table_slot = i; +- hash->table[entry].index = index; +- hash->table[entry].next = UTIL_NO_ENTRY; + return 0; + } + +-/* Caller must hold `av::lock` */ +-static inline +-int util_av_lookup_index(struct util_av *av, const void *addr, +- int slot, int *table_slot) ++int ofi_av_elements_iter(struct util_av *av, ofi_av_apply_func apply, void *arg) + { +- int i, ret = -FI_ENODATA; +- +- if (av->hash.table[slot].index == UTIL_NO_ENTRY) { +- FI_DBG(av->prov, FI_LOG_AV, "no entry at slot (%d)\n", slot); +- goto out; +- } +- +- for (i = slot; i != UTIL_NO_ENTRY; i = av->hash.table[i].next) { +- if (!memcmp(ofi_av_get_addr(av, av->hash.table[i].index), addr, +- av->addrlen)) { +- ret = av->hash.table[i].index; +- if (table_slot) +- *table_slot = i; +- FI_DBG(av->prov, FI_LOG_AV, "entry at index (%d)\n", ret); +- break; +- } +- } +-out: +- FI_DBG(av->prov, FI_LOG_AV, "%d\n", ret); +- return ret; +-} +- +-/* +- * Must hold AV lock +- */ +-int ofi_av_insert_addr(struct util_av *av, const void *addr, int slot, int *index) +-{ +- struct dlist_entry *av_entry; +- struct util_ep *ep; ++ struct util_av_entry *av_entry = NULL, *av_entry_tmp = NULL; + int ret; + +- if (OFI_UNLIKELY(av->free_list == UTIL_NO_ENTRY)) { +- FI_WARN(av->prov, FI_LOG_AV, "AV is full\n"); +- return -FI_ENOSPC; +- } +- +- if (av->flags & OFI_AV_HASH) { +- int table_slot; +- +- if (OFI_UNLIKELY(slot < 0 || slot >= av->hash.slots)) { +- FI_WARN(av->prov, FI_LOG_AV, "invalid slot (%d)\n", slot); +- return -FI_EINVAL; +- } +- ret = util_av_lookup_index(av, addr, slot, &table_slot); +- if (ret != -FI_ENODATA) { +- *index = ret; +- ofi_atomic_inc32(&av->hash.table[table_slot].use_cnt); +- return 0; +- } +- ret = util_av_hash_insert(&av->hash, slot, av->free_list, +- &table_slot); +- if (ret) { +- FI_WARN(av->prov, FI_LOG_AV, +- "failed to insert addr into hash table\n"); ++ HASH_ITER(hh, av->hash, av_entry, av_entry_tmp) { ++ ret = apply(av, av_entry->addr, ++ util_get_buf_index(av->av_entry_pool, av_entry), ++ arg); ++ if (OFI_UNLIKELY(ret)) + return ret; +- } +- ofi_atomic_inc32(&av->hash.table[table_slot].use_cnt); +- } +- +- *index = av->free_list; +- av->free_list = *(int *) util_av_get_data(av, av->free_list); +- util_av_set_data(av, *index, addr, av->addrlen); +- +- dlist_foreach(&av->ep_list, av_entry) { +- ep = container_of(av_entry, struct util_ep, av_entry); +- if (ep->cmap) +- ofi_cmap_update(ep->cmap, addr, (fi_addr_t)(*index)); + } + return 0; + } + +-static inline int +-util_av_hash_lookup_table_slot(struct util_av_hash *hash, int slot, int index) +-{ +- int i; +- +- if (hash->table[slot].index == index) { +- return slot; +- } else { +- for (i = slot; hash->table[i].index != index; ) +- i = hash->table[i].next; +- return i; +- } +-} +- + /* + * Must hold AV lock + */ +-static void util_av_hash_remove(struct util_av_hash *hash, int slot, int index) ++int ofi_av_remove_addr(struct util_av *av, fi_addr_t fi_addr) + { +- int table_slot, slot_next; ++ struct util_av_entry *av_entry = ++ util_buf_get_by_index(av->av_entry_pool, fi_addr); ++ if (!av_entry) ++ return -FI_ENOENT; + +- if (OFI_UNLIKELY(slot < 0 || slot >= hash->slots)) +- return; +- +- table_slot = util_av_hash_lookup_table_slot(hash, slot, index); +- if (table_slot == slot) { +- if (hash->table[table_slot].next == UTIL_NO_ENTRY) { +- hash->table[table_slot].index = UTIL_NO_ENTRY; +- return; +- } +- } +- +- slot_next = hash->table[slot].next; +- hash->table[slot] = hash->table[slot_next]; ++ if (ofi_atomic_dec32(&av_entry->use_cnt)) ++ return FI_SUCCESS; + +- hash->table[slot_next].next = hash->free_list; +- hash->free_list = slot_next; ++ HASH_DELETE(hh, av->hash, av_entry); ++ util_buf_indexed_release(av->av_entry_pool, av_entry); ++ return 0; + } + +-/* +- * Must hold AV lock +- */ +-int ofi_av_remove_addr(struct util_av *av, int slot, int index) ++fi_addr_t ofi_av_lookup_fi_addr(struct util_av *av, const void *addr) + { +- struct util_ep *ep; +- int *entry, *next, i; +- int ret = 0; +- +- if (OFI_UNLIKELY(index < 0 || (size_t)index > av->count)) { +- FI_WARN(av->prov, FI_LOG_AV, "index out of range\n"); +- return -FI_EINVAL; +- } ++ struct util_av_entry *entry = NULL; + +- if (av->flags & FI_SOURCE) { +- int table_slot; +- +- if (OFI_UNLIKELY(slot < 0 || slot >= av->hash.slots)) { +- FI_WARN(av->prov, FI_LOG_AV, "invalid slot (%d)\n", slot); +- return -FI_EINVAL; +- } +- +- table_slot = util_av_hash_lookup_table_slot(&av->hash, slot, index); +- if (ofi_atomic_dec32(&av->hash.table[table_slot].use_cnt)) +- return FI_SUCCESS; +- } +- +- /* This should stay at top */ +- dlist_foreach_container(&av->ep_list, struct util_ep, ep, av_entry) { +- if (ep->cmap && ep->cmap->handles_av[index]) { +- /* TODO this is not optimal. Replace this with something +- * more deterministic: delete handle if we know that peer +- * isn't actively communicating with us +- */ +- ret = ofi_cmap_move_handle_to_peer_list(ep->cmap, index); +- if (ret) { +- FI_WARN(av->prov, FI_LOG_DOMAIN, "Unable to move" +- " handle to peer list. Deleting it.\n"); +- ofi_cmap_del_handle(ep->cmap->handles_av[index]); +- return ret; +- } +- } +- } +- +- if (av->flags & OFI_AV_HASH) +- util_av_hash_remove(&av->hash, slot, index); +- +- entry = util_av_get_data(av, index); +- if (av->free_list == UTIL_NO_ENTRY || index < av->free_list) { +- *entry = av->free_list; +- av->free_list = index; +- } else { +- i = av->free_list; +- for (next = util_av_get_data(av, i); index > *next;) { +- i = *next; +- next = util_av_get_data(av, i); +- } +- util_av_set_data(av, index, next, sizeof index); +- *next = index; +- } ++ fastlock_acquire(&av->lock); ++ HASH_FIND(hh, av->hash, addr, av->addrlen, entry); ++ fastlock_release(&av->lock); + +- return ret; ++ return entry ? util_get_buf_index(av->av_entry_pool, entry) : ++ FI_ADDR_NOTAVAIL; + } + +-int ofi_av_lookup_index(struct util_av *av, const void *addr, int slot) ++static void * ++ofi_av_lookup_addr(struct util_av *av, fi_addr_t fi_addr, size_t *addrlen) + { +- int ret; +- +- if (slot < 0 || slot >= av->hash.slots) { +- FI_WARN(av->prov, FI_LOG_AV, "invalid slot (%d)\n", slot); +- return -FI_EINVAL; +- } +- +- fastlock_acquire(&av->lock); +- ret = util_av_lookup_index(av, addr, slot, NULL); +- fastlock_release(&av->lock); +- return ret; ++ *addrlen = av->addrlen; ++ return ofi_av_get_addr(av, fi_addr); + } + + int ofi_av_bind(struct fid *av_fid, struct fid *eq_fid, uint64_t flags) +@@ -510,7 +362,13 @@ int ofi_av_bind(struct fid *av_fid, struct fid *eq_fid, uint64_t flags) + return 0; + } + +-int ofi_av_close(struct util_av *av) ++static void util_av_close(struct util_av *av) ++{ ++ HASH_CLEAR(hh, av->hash); ++ util_buf_pool_destroy(av->av_entry_pool); ++} ++ ++int ofi_av_close_lightweight(struct util_av *av) + { + if (ofi_atomic_get32(&av->ref)) { + FI_WARN(av->prov, FI_LOG_AV, "AV is busy\n"); +@@ -522,35 +380,55 @@ int ofi_av_close(struct util_av *av) + + ofi_atomic_dec32(&av->domain->ref); + fastlock_destroy(&av->lock); +- /* TODO: unmap data? */ +- free(av->data); ++ + return 0; + } + +-static void util_av_hash_init(struct util_av_hash *hash) ++int ofi_av_close(struct util_av *av) + { +- int i; ++ int ret = ofi_av_close_lightweight(av); ++ if (ret) ++ return ret; ++ util_av_close(av); ++ return 0; ++} + +- for (i = 0; i < hash->slots; i++) { +- hash->table[i].index = UTIL_NO_ENTRY; +- hash->table[i].next = UTIL_NO_ENTRY; +- ofi_atomic_initialize32(&hash->table[i].use_cnt, 0); ++static int util_verify_av_util_attr(struct util_domain *domain, ++ const struct util_av_attr *util_attr) ++{ ++ if (util_attr->flags) { ++ FI_WARN(domain->prov, FI_LOG_AV, "invalid internal flags\n"); ++ return -FI_EINVAL; + } + +- hash->free_list = hash->slots; +- for (i = hash->slots; i < hash->total_count; i++) { +- hash->table[i].index = UTIL_NO_ENTRY; +- hash->table[i].next = i + 1; +- ofi_atomic_initialize32(&hash->table[i].use_cnt, 0); +- } +- hash->table[hash->total_count - 1].next = UTIL_NO_ENTRY; ++ return 0; + } + + static int util_av_init(struct util_av *av, const struct fi_av_attr *attr, + const struct util_av_attr *util_attr) + { +- int *entry, i, ret = 0; ++ int ret = 0; + size_t max_count; ++ struct util_buf_attr pool_attr = { ++ .size = util_attr->addrlen + ++ sizeof(struct util_av_entry), ++ .alignment = 16, ++ .max_cnt = 0, ++ /* Don't use track of buffer, because user can close ++ * the AV without prior deletion of addresses */ ++ .track_used = 0, ++ .indexing = { ++ .used = 1, ++ .ordered = 1, ++ }, ++ }; ++ ++ /* TODO: Handle FI_READ */ ++ /* TODO: Handle mmap - shared AV */ ++ ++ ret = util_verify_av_util_attr(av->domain, util_attr); ++ if (ret) ++ return ret; + + if (attr->count) { + max_count = attr->count; +@@ -559,51 +437,25 @@ static int util_av_init(struct util_av *av, const struct fi_av_attr *attr, + max_count = UTIL_DEFAULT_AV_SIZE; + } + +- ofi_atomic_initialize32(&av->ref, 0); +- fastlock_init(&av->lock); +- av->count = max_count ? max_count : UTIL_DEFAULT_AV_SIZE; +- av->count = roundup_power_of_two(av->count); +- av->addrlen = util_attr->addrlen; +- av->flags = util_attr->flags | attr->flags; +- ++ av->count = roundup_power_of_two(max_count ? ++ max_count : ++ UTIL_DEFAULT_AV_SIZE); + FI_INFO(av->prov, FI_LOG_AV, "AV size %zu\n", av->count); + +- /* TODO: Handle FI_READ */ +- /* TODO: Handle mmap - shared AV */ +- +- if (util_attr->flags & OFI_AV_HASH) { +- av->hash.slots = av->count; +- if (util_attr->overhead) +- av->hash.total_count = av->count + util_attr->overhead; +- else +- av->hash.total_count = av->count * 2; +- FI_INFO(av->prov, FI_LOG_AV, +- "OFI_AV_HASH requested, hash size %u\n", av->hash.total_count); +- } +- +- av->data = malloc((av->count * util_attr->addrlen) + +- (av->hash.total_count * sizeof(*av->hash.table))); +- if (!av->data) +- return -FI_ENOMEM; +- +- for (i = 0; i < (int)av->count - 1; i++) { +- entry = util_av_get_data(av, i); +- *entry = i + 1; +- } +- entry = util_av_get_data(av, av->count - 1); +- *entry = UTIL_NO_ENTRY; ++ av->addrlen = util_attr->addrlen; ++ av->flags = util_attr->flags | attr->flags; ++ av->hash = NULL; + +- if (util_attr->flags & OFI_AV_HASH) { +- av->hash.table = util_av_get_data(av, av->count); +- util_av_hash_init(&av->hash); +- } ++ pool_attr.chunk_cnt = av->count; ++ ret = util_buf_pool_create_attr(&pool_attr, &av->av_entry_pool); ++ if (ret) ++ return ret; + + return ret; + } + + static int util_verify_av_attr(struct util_domain *domain, +- const struct fi_av_attr *attr, +- const struct util_av_attr *util_attr) ++ const struct fi_av_attr *attr) + { + switch (attr->type) { + case FI_AV_MAP: +@@ -629,34 +481,21 @@ static int util_verify_av_attr(struct util_domain *domain, + return -FI_EINVAL; + } + +- if (util_attr->flags & ~(OFI_AV_HASH)) { +- FI_WARN(domain->prov, FI_LOG_AV, "invalid internal flags\n"); +- return -FI_EINVAL; +- } +- +- if (util_attr->addrlen < sizeof(int)) { +- FI_WARN(domain->prov, FI_LOG_AV, "unsupported address size\n"); +- return -FI_ENOSYS; +- } +- + return 0; + } + +-int ofi_av_init(struct util_domain *domain, const struct fi_av_attr *attr, +- const struct util_av_attr *util_attr, +- struct util_av *av, void *context) ++int ofi_av_init_lightweight(struct util_domain *domain, const struct fi_av_attr *attr, ++ struct util_av *av, void *context) + { + int ret; + +- ret = util_verify_av_attr(domain, attr, util_attr); ++ ret = util_verify_av_attr(domain, attr); + if (ret) + return ret; + + av->prov = domain->prov; +- ret = util_av_init(av, attr, util_attr); +- if (ret) +- return ret; +- ++ ofi_atomic_initialize32(&av->ref, 0); ++ fastlock_init(&av->lock); + av->av_fid.fid.fclass = FI_CLASS_AV; + /* + * ops set by provider +@@ -670,52 +509,24 @@ int ofi_av_init(struct util_domain *domain, const struct fi_av_attr *attr, + return 0; + } + +- +-/************************************************************************* +- * +- * AV for IP addressing +- * +- *************************************************************************/ +- +-static int ip_av_slot(struct util_av *av, const struct sockaddr *sa) ++int ofi_av_init(struct util_domain *domain, const struct fi_av_attr *attr, ++ const struct util_av_attr *util_attr, ++ struct util_av *av, void *context) + { +- uint32_t host; +- uint16_t port; +- +- if (!sa) +- return UTIL_NO_ENTRY; +- +- switch (((struct sockaddr *) sa)->sa_family) { +- case AF_INET: +- host = (uint16_t) ntohl(((struct sockaddr_in *) sa)-> +- sin_addr.s_addr); +- port = ntohs(((struct sockaddr_in *) sa)->sin_port); +- break; +- case AF_INET6: +- host = (uint16_t) ((struct sockaddr_in6 *) sa)-> +- sin6_addr.s6_addr[15]; +- port = ntohs(((struct sockaddr_in6 *) sa)->sin6_port); +- break; +- default: +- assert(0); +- return UTIL_NO_ENTRY; +- } +- +- /* TODO: Find a good hash function */ +- FI_DBG(av->prov, FI_LOG_AV, "slot %d\n", +- ((host << 16) | port) % av->hash.slots); +- return ((host << 16) | port) % av->hash.slots; +-} ++ int ret = ofi_av_init_lightweight(domain, attr, av, context); ++ if (ret) ++ return ret; + +-int ip_av_get_index(struct util_av *av, const void *addr) +-{ +- return ofi_av_lookup_index(av, addr, ip_av_slot(av, addr)); ++ ret = util_av_init(av, attr, util_attr); ++ if (ret) ++ return ret; ++ return ret; + } + + void ofi_av_write_event(struct util_av *av, uint64_t data, + int err, void *context) + { +- struct fi_eq_err_entry entry; ++ struct fi_eq_err_entry entry = { 0 }; + size_t size; + ssize_t ret; + uint64_t flags; +@@ -741,6 +552,17 @@ void ofi_av_write_event(struct util_av *av, uint64_t data, + FI_WARN(av->prov, FI_LOG_AV, "error writing to EQ\n"); + } + ++/************************************************************************* ++ * ++ * AV for IP addressing ++ * ++ *************************************************************************/ ++ ++fi_addr_t ofi_ip_av_get_fi_addr(struct util_av *av, const void *addr) ++{ ++ return ofi_av_lookup_fi_addr(av, addr); ++} ++ + static int ip_av_valid_addr(struct util_av *av, const void *addr) + { + const struct sockaddr_in *sin = addr; +@@ -760,11 +582,12 @@ static int ip_av_valid_addr(struct util_av *av, const void *addr) + static int ip_av_insert_addr(struct util_av *av, const void *addr, + fi_addr_t *fi_addr, void *context) + { +- int ret, index = -1; ++ int ret; ++ fi_addr_t fi_addr_ret; + + if (ip_av_valid_addr(av, addr)) { + fastlock_acquire(&av->lock); +- ret = ofi_av_insert_addr(av, addr, ip_av_slot(av, addr), &index); ++ ret = ofi_av_insert_addr(av, addr, &fi_addr_ret); + fastlock_release(&av->lock); + } else { + ret = -FI_EADDRNOTAVAIL; +@@ -772,7 +595,7 @@ static int ip_av_insert_addr(struct util_av *av, const void *addr, + } + + if (fi_addr) +- *fi_addr = !ret ? index : FI_ADDR_NOTAVAIL; ++ *fi_addr = !ret ? fi_addr_ret : FI_ADDR_NOTAVAIL; + + ofi_straddr_dbg(av->prov, FI_LOG_AV, "av_insert addr", addr); + if (fi_addr) +@@ -782,21 +605,12 @@ static int ip_av_insert_addr(struct util_av *av, const void *addr, + return ret; + } + +-static int ip_av_insert(struct fid_av *av_fid, const void *addr, size_t count, +- fi_addr_t *fi_addr, uint64_t flags, void *context) ++int ofi_ip_av_insertv(struct util_av *av, const void *addr, size_t addrlen, ++ size_t count, fi_addr_t *fi_addr, void *context) + { +- struct util_av *av; + int ret, success_cnt = 0; + size_t i; +- size_t addrlen; + +- av = container_of(av_fid, struct util_av, av_fid); +- ret = fi_verify_av_insert(av, flags); +- if (ret) +- return ret; +- +- addrlen = ((struct sockaddr *) addr)->sa_family == AF_INET ? +- sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); + FI_DBG(av->prov, FI_LOG_AV, "inserting %zu addresses\n", count); + for (i = 0; i < count; i++) { + ret = ip_av_insert_addr(av, (const char *) addr + i * addrlen, +@@ -817,35 +631,19 @@ static int ip_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + return ret; + } + +-static int ip_av_insert_svc(struct util_av *av, const char *node, +- const char *service, fi_addr_t *fi_addr, +- void *context) ++int ofi_ip_av_insert(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) + { +- struct addrinfo hints, *ai; ++ struct util_av *av; + int ret; + +- FI_INFO(av->prov, FI_LOG_AV, "inserting %s-%s\n", node, service); +- +- memset(&hints, 0, sizeof hints); +- hints.ai_socktype = SOCK_DGRAM; +- switch (av->domain->addr_format) { +- case FI_SOCKADDR_IN: +- hints.ai_family = AF_INET; +- break; +- case FI_SOCKADDR_IN6: +- hints.ai_family = AF_INET6; +- break; +- default: +- break; +- } +- +- ret = getaddrinfo(node, service, &hints, &ai); ++ av = container_of(av_fid, struct util_av, av_fid); ++ ret = ofi_verify_av_insert(av, flags); + if (ret) + return ret; + +- ret = ip_av_insert_addr(av, ai->ai_addr, fi_addr, context); +- freeaddrinfo(ai); +- return ret; ++ return ofi_ip_av_insertv(av, addr, ofi_sizeofaddr(addr), ++ count, fi_addr, context); + } + + static int ip_av_insertsvc(struct fid_av *av, const char *node, +@@ -855,79 +653,98 @@ static int ip_av_insertsvc(struct fid_av *av, const char *node, + return fi_av_insertsym(av, node, 1, service, 1, fi_addr, flags, context); + } + +-static int ip_av_insert_ip4sym(struct util_av *av, +- struct in_addr ip, size_t ipcnt, +- uint16_t port, size_t portcnt, +- fi_addr_t *fi_addr, void *context) ++/* Caller should free *addr */ ++static int ++ip_av_ip4sym_getaddr(struct util_av *av, struct in_addr ip, size_t ipcnt, ++ uint16_t port, size_t portcnt, void **addr, size_t *addrlen) + { +- struct sockaddr_in sin; +- int fi, ret, success_cnt = 0; +- size_t i, p; +- +- memset(&sin, 0, sizeof sin); +- sin.sin_family = AF_INET; +- +- for (i = 0, fi = 0; i < ipcnt; i++) { +- /* TODO: should we skip addresses x.x.x.0 and x.x.x.255? */ +- sin.sin_addr.s_addr = htonl(ntohl(ip.s_addr) + i); +- +- for (p = 0; p < portcnt; p++, fi++) { +- sin.sin_port = htons(port + p); +- ret = ip_av_insert_addr(av, &sin, fi_addr ? +- &fi_addr[fi] : NULL, context); +- if (!ret) +- success_cnt++; +- else if (av->eq) +- ofi_av_write_event(av, fi, -ret, context); ++ struct sockaddr_in *sin; ++ int count = ipcnt * portcnt; ++ size_t i, p, k; ++ ++ *addrlen = sizeof(*sin); ++ sin = calloc(count, *addrlen); ++ if (!sin) ++ return -FI_ENOMEM; ++ ++ for (i = 0, k = 0; i < ipcnt; i++) { ++ for (p = 0; p < portcnt; p++, k++) { ++ sin[k].sin_family = AF_INET; ++ /* TODO: should we skip addresses x.x.x.0 and x.x.x.255? */ ++ sin[k].sin_addr.s_addr = htonl(ntohl(ip.s_addr) + i); ++ sin[k].sin_port = htons(port + p); + } + } +- +- return success_cnt; ++ *addr = sin; ++ return count; + } + +-static int ip_av_insert_ip6sym(struct util_av *av, +- struct in6_addr ip, size_t ipcnt, +- uint16_t port, size_t portcnt, +- fi_addr_t *fi_addr, void *context) ++/* Caller should free *addr */ ++static int ++ip_av_ip6sym_getaddr(struct util_av *av, struct in6_addr ip, size_t ipcnt, ++ uint16_t port, size_t portcnt, void **addr, size_t *addrlen) + { +- struct sockaddr_in6 sin6; +- int j, fi, ret, success_cnt = 0; +- size_t i, p; +- +- memset(&sin6, 0, sizeof sin6); +- sin6.sin6_family = AF_INET6; +- sin6.sin6_addr = ip; +- +- for (i = 0, fi = 0; i < ipcnt; i++) { +- for (p = 0; p < portcnt; p++, fi++) { +- sin6.sin6_port = htons(port + p); +- ret = ip_av_insert_addr(av, &sin6, fi_addr ? +- &fi_addr[fi] : NULL, context); +- if (!ret) +- success_cnt++; +- else if (av->eq) +- ofi_av_write_event(av, fi, -ret, context); +- } ++ struct sockaddr_in6 *sin6, sin6_temp; ++ int j, count = ipcnt * portcnt; ++ size_t i, p, k; ++ ++ *addrlen = sizeof(*sin6); ++ sin6 = calloc(count, *addrlen); ++ if (!sin6) ++ return -FI_ENOMEM; ++ ++ sin6_temp.sin6_addr = ip; + ++ for (i = 0, k = 0; i < ipcnt; i++) { ++ for (p = 0; p < portcnt; p++, k++) { ++ sin6[k].sin6_family = AF_INET6; ++ sin6[k].sin6_addr = sin6_temp.sin6_addr; ++ sin6[k].sin6_port = htons(port + p); ++ } + /* TODO: should we skip addresses x::0 and x::255? */ + for (j = 15; j >= 0; j--) { +- if (++sin6.sin6_addr.s6_addr[j] < 255) ++ if (++sin6_temp.sin6_addr.s6_addr[j] < 255) + break; + } + } +- +- return success_cnt; ++ *addr = sin6; ++ return count; + } + +-static int ip_av_insert_nodesym(struct util_av *av, +- const char *node, size_t nodecnt, +- const char *service, size_t svccnt, +- fi_addr_t *fi_addr, void *context) ++/* Caller should free *addr */ ++static int ip_av_nodesym_getaddr(struct util_av *av, const char *node, ++ size_t nodecnt, const char *service, ++ size_t svccnt, void **addr, size_t *addrlen) + { ++ struct addrinfo hints, *ai; ++ void *addr_temp; + char name[FI_NAME_MAX]; + char svc[FI_NAME_MAX]; + size_t name_len, n, s; +- int fi, ret, name_index, svc_index, success_cnt = 0; ++ int ret, name_index, svc_index, count = nodecnt * svccnt; ++ ++ memset(&hints, 0, sizeof hints); ++ ++ hints.ai_socktype = SOCK_DGRAM; ++ switch (av->domain->addr_format) { ++ case FI_SOCKADDR_IN: ++ hints.ai_family = AF_INET; ++ *addrlen = sizeof(struct sockaddr_in); ++ break; ++ case FI_SOCKADDR_IN6: ++ hints.ai_family = AF_INET6; ++ *addrlen = sizeof(struct sockaddr_in6); ++ break; ++ default: ++ FI_INFO(av->prov, FI_LOG_AV, "Unknown address format!\n"); ++ return -FI_EINVAL; ++ } ++ ++ *addr = calloc(nodecnt * svccnt, *addrlen); ++ if (!*addr) ++ return -FI_ENOMEM; ++ ++ addr_temp = *addr; + + for (name_len = strlen(node); isdigit(node[name_len - 1]); ) + name_len--; +@@ -936,7 +753,7 @@ static int ip_av_insert_nodesym(struct util_av *av, + name_index = atoi(node + name_len); + svc_index = atoi(service); + +- for (n = 0, fi = 0; n < nodecnt; n++) { ++ for (n = 0; n < nodecnt; n++) { + if (nodecnt == 1) { + strncpy(name, node, sizeof(name) - 1); + name[FI_NAME_MAX - 1] = '\0'; +@@ -945,7 +762,7 @@ static int ip_av_insert_nodesym(struct util_av *av, + "%zu", name_index + n); + } + +- for (s = 0; s < svccnt; s++, fi++) { ++ for (s = 0; s < svccnt; s++) { + if (svccnt == 1) { + strncpy(svc, service, sizeof(svc) - 1); + svc[FI_NAME_MAX - 1] = '\0'; +@@ -953,33 +770,33 @@ static int ip_av_insert_nodesym(struct util_av *av, + snprintf(svc, sizeof(svc) - 1, + "%zu", svc_index + s); + } ++ FI_INFO(av->prov, FI_LOG_AV, "resolving %s:%s for AV " ++ "insert\n", node, service); ++ ++ ret = getaddrinfo(node, service, &hints, &ai); ++ if (ret) ++ goto err; + +- ret = ip_av_insert_svc(av, name, svc, fi_addr ? +- &fi_addr[fi] : NULL, context); +- if (!ret) +- success_cnt++; +- else if (av->eq) +- ofi_av_write_event(av, fi, -ret, context); ++ memcpy(addr_temp, ai->ai_addr, *addrlen); ++ addr_temp = (char *)addr_temp + *addrlen; ++ freeaddrinfo(ai); + } + } +- +- return success_cnt; ++ return count; ++err: ++ free(*addr); ++ return ret; + } + +-static int ip_av_insertsym(struct fid_av *av_fid, const char *node, size_t nodecnt, +- const char *service, size_t svccnt, fi_addr_t *fi_addr, +- uint64_t flags, void *context) ++/* Caller should free *addr */ ++int ofi_ip_av_sym_getaddr(struct util_av *av, const char *node, ++ size_t nodecnt, const char *service, ++ size_t svccnt, void **addr, size_t *addrlen) + { +- struct util_av *av; + struct in6_addr ip6; + struct in_addr ip4; + int ret; + +- av = container_of(av_fid, struct util_av, av_fid); +- ret = fi_verify_av_insert(av, flags); +- if (ret) +- return ret; +- + if (strlen(node) >= FI_NAME_MAX || strlen(service) >= FI_NAME_MAX) { + FI_WARN(av->prov, FI_LOG_AV, + "node or service name is too long\n"); +@@ -989,38 +806,54 @@ static int ip_av_insertsym(struct fid_av *av_fid, const char *node, size_t nodec + ret = inet_pton(AF_INET, node, &ip4); + if (ret == 1) { + FI_INFO(av->prov, FI_LOG_AV, "insert symmetric IPv4\n"); +- ret = ip_av_insert_ip4sym(av, ip4, nodecnt, ++ return ip_av_ip4sym_getaddr(av, ip4, nodecnt, + (uint16_t) strtol(service, NULL, 0), +- svccnt, fi_addr, context); +- goto out; ++ svccnt, addr, addrlen); + } + + ret = inet_pton(AF_INET6, node, &ip6); + if (ret == 1) { + FI_INFO(av->prov, FI_LOG_AV, "insert symmetric IPv6\n"); +- ret = ip_av_insert_ip6sym(av, ip6, nodecnt, ++ return ip_av_ip6sym_getaddr(av, ip6, nodecnt, + (uint16_t) strtol(service, NULL, 0), +- svccnt, fi_addr, context); +- goto out; ++ svccnt, addr, addrlen); + } + + FI_INFO(av->prov, FI_LOG_AV, "insert symmetric host names\n"); +- ret = ip_av_insert_nodesym(av, node, nodecnt, service, svccnt, +- fi_addr, context); ++ return ip_av_nodesym_getaddr(av, node, nodecnt, service, ++ svccnt, addr, addrlen); ++} + +-out: +- if (av->eq) { +- ofi_av_write_event(av, ret, 0, context); +- ret = 0; +- } ++static int ip_av_insertsym(struct fid_av *av_fid, const char *node, ++ size_t nodecnt, const char *service, size_t svccnt, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ struct util_av *av; ++ void *addr; ++ size_t addrlen; ++ int ret, count; ++ ++ av = container_of(av_fid, struct util_av, av_fid); ++ ret = ofi_verify_av_insert(av, flags); ++ if (ret) ++ return ret; ++ ++ count = ofi_ip_av_sym_getaddr(av, node, nodecnt, service, ++ svccnt, &addr, &addrlen); ++ if (count <= 0) ++ return count; ++ ++ ret = ofi_ip_av_insertv(av, addr, addrlen, count, ++ fi_addr, context); ++ free(addr); + return ret; + } + +-static int ip_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count, +- uint64_t flags) ++int ofi_ip_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, ++ size_t count, uint64_t flags) + { + struct util_av *av; +- int i, slot, index, ret; ++ int i, ret; + + av = container_of(av_fid, struct util_av, av_fid); + if (flags) { +@@ -1035,52 +868,46 @@ static int ip_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count, + * Thus, we walk through the array backwards. + */ + for (i = count - 1; i >= 0; i--) { +- index = (int) fi_addr[i]; +- slot = ip_av_slot(av, ip_av_get_addr(av, index)); + fastlock_acquire(&av->lock); +- ret = ofi_av_remove_addr(av, slot, index); ++ ret = ofi_av_remove_addr(av, fi_addr[i]); + fastlock_release(&av->lock); + if (ret) { + FI_WARN(av->prov, FI_LOG_AV, +- "removal of fi_addr %d failed\n", index); ++ "removal of fi_addr %"PRIu64" failed\n", ++ fi_addr[i]); + } + } + return 0; + } + +-static int ip_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, void *addr, +- size_t *addrlen) ++int ofi_ip_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, ++ void *addr, size_t *addrlen) + { +- struct util_av *av; +- int index; +- +- av = container_of(av_fid, struct util_av, av_fid); +- index = (int) fi_addr; +- if (index < 0 || (size_t)index > av->count) { +- FI_WARN(av->prov, FI_LOG_AV, "unknown address\n"); +- return -FI_EINVAL; +- } +- +- memcpy(addr, ip_av_get_addr(av, index), +- MIN(*addrlen, av->addrlen)); ++ struct util_av *av = ++ container_of(av_fid, struct util_av, av_fid); ++ size_t av_addrlen; ++ void *av_addr = ofi_av_lookup_addr(av, fi_addr, &av_addrlen); ++ ++ memcpy(addr, av_addr, MIN(*addrlen, av_addrlen)); + *addrlen = av->addrlen; ++ + return 0; + } + +-static const char *ip_av_straddr(struct fid_av *av, const void *addr, char *buf, +- size_t *len) ++const char * ++ofi_ip_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len) + { + return ofi_straddr(buf, len, FI_SOCKADDR, addr); + } + + static struct fi_ops_av ip_av_ops = { + .size = sizeof(struct fi_ops_av), +- .insert = ip_av_insert, ++ .insert = ofi_ip_av_insert, + .insertsvc = ip_av_insertsvc, + .insertsym = ip_av_insertsym, +- .remove = ip_av_remove, +- .lookup = ip_av_lookup, +- .straddr = ip_av_straddr, ++ .remove = ofi_ip_av_remove, ++ .lookup = ofi_ip_av_lookup, ++ .straddr = ofi_ip_av_straddr, + }; + + static int ip_av_close(struct fid *av_fid) +@@ -1104,8 +931,8 @@ static struct fi_ops ip_av_fi_ops = { + .ops_open = fi_no_ops_open, + }; + +-int ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context, int flags) ++int ofi_ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context, int flags) + { + struct util_domain *domain; + struct util_av_attr util_attr; +@@ -1118,7 +945,6 @@ int ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, + else + util_attr.addrlen = sizeof(struct sockaddr_in6); + +- util_attr.overhead = attr->count >> 1; + util_attr.flags = flags; + + if (attr->type == FI_AV_UNSPEC) +@@ -1140,520 +966,8 @@ int ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, + return 0; + } + +-int ip_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context) +-{ +- struct util_domain *domain = container_of(domain_fid, struct util_domain, +- domain_fid); +- +- return ip_av_create_flags(domain_fid, attr, av, context, +- (domain->info_domain_caps & FI_SOURCE) ? +- OFI_AV_HASH : 0); +-} +- +-/* +- * Connection map +- */ +- +-/* Caller should hold cmap->lock */ +-static void util_cmap_set_key(struct util_cmap_handle *handle) +-{ +- handle->key = ofi_idx2key(&handle->cmap->key_idx, +- ofi_idx_insert(&handle->cmap->handles_idx, handle)); +-} +- +-/* Caller should hold cmap->lock */ +-static void util_cmap_clear_key(struct util_cmap_handle *handle) +-{ +- int index = ofi_key2idx(&handle->cmap->key_idx, handle->key); +- +- if (!ofi_idx_is_valid(&handle->cmap->handles_idx, index)) +- FI_WARN(handle->cmap->av->prov, FI_LOG_AV, "Invalid key!\n"); +- else +- ofi_idx_remove(&handle->cmap->handles_idx, index); +-} +- +-struct util_cmap_handle *ofi_cmap_key2handle(struct util_cmap *cmap, uint64_t key) +-{ +- struct util_cmap_handle *handle; +- +- fastlock_acquire(&cmap->lock); +- if (!(handle = ofi_idx_lookup(&cmap->handles_idx, +- ofi_key2idx(&cmap->key_idx, key)))) { +- FI_WARN(cmap->av->prov, FI_LOG_AV, "Invalid key!\n"); +- } else { +- if (handle->key != key) { +- FI_WARN(cmap->av->prov, FI_LOG_AV, +- "handle->key not matching given key\n"); +- handle = NULL; +- } +- } +- fastlock_release(&cmap->lock); +- return handle; +-} +- +-/* Caller must hold cmap->lock */ +-static void util_cmap_init_handle(struct util_cmap_handle *handle, +- struct util_cmap *cmap, +- enum util_cmap_state state, +- fi_addr_t fi_addr, +- struct util_cmap_peer *peer) +-{ +- handle->cmap = cmap; +- handle->state = state; +- util_cmap_set_key(handle); +- handle->fi_addr = fi_addr; +- handle->peer = peer; +-} +- +-static int util_cmap_match_peer(struct dlist_entry *entry, const void *addr) +-{ +- struct util_cmap_peer *peer; +- +- peer = container_of(entry, struct util_cmap_peer, entry); +- return !memcmp(peer->addr, addr, peer->handle->cmap->av->addrlen); +-} +- +-/* Caller must hold cmap->lock */ +-static int util_cmap_del_handle(struct util_cmap_handle *handle) +-{ +- struct util_cmap *cmap = handle->cmap; +- int ret; +- +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Deleting connection handle: %p\n", handle); +- if (handle->peer) { +- dlist_remove(&handle->peer->entry); +- free(handle->peer); +- handle->peer = NULL; +- } else { +- cmap->handles_av[handle->fi_addr] = 0; +- } +- util_cmap_clear_key(handle); +- +- handle->state = CMAP_SHUTDOWN; +- /* Signal event handler thread to delete the handle. This is required +- * so that the event handler thread handles any pending events for this +- * ep correctly. Handle would be freed finally after processing the +- * events */ +- ret = cmap->attr.signal(cmap->ep, handle, OFI_CMAP_FREE); +- if (ret) { +- FI_WARN(cmap->av->prov, FI_LOG_FABRIC, +- "Unable to signal event handler thread\n"); +- return ret; +- } +- return 0; +-} +- +-void ofi_cmap_del_handle(struct util_cmap_handle *handle) +-{ +- struct util_cmap *cmap = handle->cmap; +- fastlock_acquire(&cmap->lock); +- util_cmap_del_handle(handle); +- fastlock_release(&cmap->lock); +-} +- +-/* Caller must hold cmap->lock */ +-int util_cmap_alloc_handle(struct util_cmap *cmap, fi_addr_t fi_addr, +- enum util_cmap_state state, +- struct util_cmap_handle **handle) +-{ +- *handle = cmap->attr.alloc(); +- if (!*handle) +- return -FI_ENOMEM; +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Allocated handle: %p for " +- "fi_addr: %" PRIu64 "\n", *handle, fi_addr); +- util_cmap_init_handle(*handle, cmap, state, fi_addr, NULL); +- cmap->handles_av[fi_addr] = *handle; +- return 0; +-} +- +-/* Caller must hold cmap->lock */ +-static int util_cmap_alloc_handle_peer(struct util_cmap *cmap, void *addr, +- enum util_cmap_state state, +- struct util_cmap_handle **handle) +-{ +- struct util_cmap_peer *peer; +- +- peer = calloc(1, sizeof(*peer) + cmap->av->addrlen); +- if (!peer) +- return -FI_ENOMEM; +- *handle = cmap->attr.alloc(); +- if (!*handle) { +- free(peer); +- return -FI_ENOMEM; +- } +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_AV, "Allocated handle for addr", +- addr); +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "handle: %p\n", *handle); +- util_cmap_init_handle(*handle, cmap, state, FI_ADDR_UNSPEC, peer); +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Adding handle to peer list\n"); +- peer->handle = *handle; +- memcpy(peer->addr, addr, cmap->av->addrlen); +- dlist_insert_tail(&peer->entry, &cmap->peer_list); +- return 0; +-} +- +-/* Caller must hold cmap->lock */ +-static struct util_cmap_handle * +-util_cmap_get_handle_peer(struct util_cmap *cmap, const void *addr) ++int ofi_ip_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context) + { +- struct util_cmap_peer *peer; +- struct dlist_entry *entry; +- +- entry = dlist_find_first_match(&cmap->peer_list, util_cmap_match_peer, +- addr); +- if (!entry) +- return NULL; +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_AV, "handle found in peer list" +- " for addr", addr); +- peer = container_of(entry, struct util_cmap_peer, entry); +- return peer->handle; +-} +- +-static int ofi_cmap_move_handle_to_peer_list(struct util_cmap *cmap, int index) +-{ +- struct util_cmap_handle *handle = cmap->handles_av[index]; +- int ret = 0; +- +- fastlock_acquire(&cmap->lock); +- if (!handle) +- goto unlock; +- +- handle->peer = calloc(1, sizeof(*handle->peer) + cmap->av->addrlen); +- if (!handle->peer) { +- ret = -FI_ENOMEM; +- goto unlock; +- } +- handle->peer->handle = handle; +- memcpy(handle->peer->addr, ofi_av_get_addr(cmap->av, index), +- cmap->av->addrlen); +- dlist_insert_tail(&handle->peer->entry, &cmap->peer_list); +-unlock: +- fastlock_release(&cmap->lock); +- return ret; +-} +- +-/* Caller must hold cmap->lock */ +-static void util_cmap_move_handle(struct util_cmap_handle *handle, +- fi_addr_t fi_addr) +-{ +- dlist_remove(&handle->peer->entry); +- free(handle->peer); +- handle->peer = NULL; +- handle->fi_addr = fi_addr; +- handle->cmap->handles_av[fi_addr] = handle; +-} +- +-void ofi_cmap_update(struct util_cmap *cmap, const void *addr, fi_addr_t fi_addr) +-{ +- struct util_cmap_handle *handle; +- +- fastlock_acquire(&cmap->lock); +- handle = util_cmap_get_handle_peer(cmap, addr); +- if (!handle) +- goto out; +- util_cmap_move_handle(handle, fi_addr); +- cmap->av_updated = 1; +-out: +- fastlock_release(&cmap->lock); +-} +- +-/* Caller must hold cmap->lock */ +-struct util_cmap_handle * +-util_cmap_get_handle(struct util_cmap *cmap, fi_addr_t fi_addr) +-{ +- if (fi_addr > cmap->av->count) { +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, "Invalid fi_addr\n"); +- return NULL; +- } +- return cmap->handles_av[fi_addr]; +-} +- +-void ofi_cmap_process_shutdown(struct util_cmap *cmap, +- struct util_cmap_handle *handle) +-{ +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Processing shutdown for handle: %p\n", handle); +- fastlock_acquire(&cmap->lock); +- if (handle->state > CMAP_SHUTDOWN) { +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, +- "Invalid handle on shutdown event\n"); +- } else if (handle->state != CMAP_SHUTDOWN) { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Got remote shutdown\n"); +- util_cmap_del_handle(handle); +- } else { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Got local shutdown\n"); +- } +- fastlock_release(&cmap->lock); +-} +- +-/* Caller must hold cmap->lock */ +-void ofi_cmap_process_connect(struct util_cmap *cmap, +- struct util_cmap_handle *handle, +- uint64_t *remote_key) +-{ +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Processing connect for handle: %p\n", handle); +- handle->state = CMAP_CONNECTED; +- if (remote_key) +- handle->remote_key = *remote_key; +-} +- +-void ofi_cmap_process_reject(struct util_cmap *cmap, +- struct util_cmap_handle *handle) +-{ +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Processing reject for handle: %p\n", handle); +- fastlock_acquire(&cmap->lock); +- switch (handle->state) { +- case CMAP_CONNREQ_RECV: +- case CMAP_CONNECTED: +- /* Handle is being re-used for incoming connection request */ +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Connection handle is being re-used. Ignoring reject\n"); +- break; +- case CMAP_CONNREQ_SENT: +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Deleting connection handle\n"); +- util_cmap_del_handle(handle); +- break; +- case CMAP_SHUTDOWN: +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Connection handle already being deleted\n"); +- break; +- default: +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, "Invalid cmap state: " +- "%d when receiving connection reject\n", handle->state); +- assert(0); +- } +- fastlock_release(&cmap->lock); +-} +- +-int ofi_cmap_process_connreq(struct util_cmap *cmap, void *addr, +- struct util_cmap_handle **handle_ret) +-{ +- struct util_cmap_handle *handle; +- int ret = 0, index, cmp; +- +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, +- "Processing connreq for addr", addr); +- +- index = ip_av_get_index(cmap->av, addr); +- +- fastlock_acquire(&cmap->lock); +- if (index < 0) +- handle = util_cmap_get_handle_peer(cmap, addr); +- else +- handle = util_cmap_get_handle(cmap, (fi_addr_t)index); +- +- if (!handle) { +- if (index < 0) +- ret = util_cmap_alloc_handle_peer(cmap, addr, +- CMAP_CONNREQ_RECV, +- &handle); +- else +- ret = util_cmap_alloc_handle(cmap, (fi_addr_t)index, +- CMAP_CONNREQ_RECV, +- &handle); +- if (ret) +- goto unlock; +- } +- +- switch (handle->state) { +- case CMAP_CONNECTED: +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Connection already present.\n"); +- ret = -FI_EALREADY; +- break; +- case CMAP_CONNREQ_SENT: +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, "local_name", +- cmap->attr.name); +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, "remote_name", +- addr); +- +- cmp = ofi_addr_cmp(cmap->av->prov, addr, cmap->attr.name); +- +- if (cmp < 0) { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Remote name lower than local name.\n"); +- ret = -FI_EALREADY; +- break; +- } else if (cmp > 0) { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Re-using handle: %p to accept remote " +- "connection\n", handle); +- /* Re-use handle. If it receives FI_REJECT the handle +- * would not be deleted in this state */ +- handle->cmap->attr.close(handle); +- } else { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Endpoint connects to itself\n"); +- ret = util_cmap_alloc_handle_peer(cmap, addr, +- CMAP_CONNREQ_RECV, +- &handle); +- if (ret) +- goto unlock; +- assert(index >= 0 && index != FI_ADDR_NOTAVAIL); +- handle->fi_addr = index; +- } +- /* Fall through */ +- case CMAP_CONNREQ_RECV: +- *handle_ret = handle; +- break; +- default: +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, +- "Invalid cmap state\n"); +- assert(0); +- ret = -FI_EOPBADSTATE; +- } +-unlock: +- fastlock_release(&cmap->lock); +- return ret; +-} +- +-/* Caller must hold `cmap::lock` */ +-int ofi_cmap_handle_connect(struct util_cmap *cmap, fi_addr_t fi_addr, +- struct util_cmap_handle *handle) +-{ +- int ret; +- +- if (handle->state == CMAP_CONNECTED) +- return FI_SUCCESS; +- +- switch (handle->state) { +- case CMAP_IDLE: +- ret = cmap->attr.connect(cmap->ep, handle, +- ofi_av_get_addr(cmap->av, fi_addr), +- cmap->av->addrlen); +- if (ret) { +- util_cmap_del_handle(handle); +- return ret; +- } +- handle->state = CMAP_CONNREQ_SENT; +- ret = -FI_EAGAIN; +- // TODO sleep on event fd instead of busy polling +- break; +- case CMAP_CONNREQ_SENT: +- case CMAP_CONNREQ_RECV: +- case CMAP_ACCEPT: +- case CMAP_SHUTDOWN: +- ret = -FI_EAGAIN; +- break; +- default: +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, +- "Invalid cmap handle state\n"); +- assert(0); +- ret = -FI_EOPBADSTATE; +- } +- return ret; +-} +- +-int ofi_cmap_get_handle(struct util_cmap *cmap, fi_addr_t fi_addr, +- struct util_cmap_handle **handle_ret) +-{ +- int ret; +- +- fastlock_acquire(&cmap->lock); +- *handle_ret = ofi_cmap_acquire_handle(cmap, fi_addr); +- if (OFI_UNLIKELY(!*handle_ret)) { +- ret = -FI_EAGAIN; +- goto unlock; +- } +- +- ret = ofi_cmap_handle_connect(cmap, fi_addr, *handle_ret); +-unlock: +- fastlock_release(&cmap->lock); +- return ret; +-} +- +-static int util_cmap_event_handler_close(struct util_cmap *cmap) +-{ +- int ret; +- +- ret = cmap->attr.signal(cmap->ep, NULL, OFI_CMAP_EXIT); +- if (ret) { +- FI_WARN(cmap->av->prov, FI_LOG_FABRIC, +- "Unable to signal event handler thread\n"); +- return ret; +- } +- /* Release lock so that event handler thread could process shutdown events */ +- fastlock_release(&cmap->lock); +- ret = pthread_join(cmap->event_handler_thread, NULL); +- fastlock_acquire(&cmap->lock); +- if (ret) { +- FI_WARN(cmap->av->prov, FI_LOG_FABRIC, +- "Unable to join event handler thread\n"); +- return ret; +- } +- return 0; +-} +- +-void ofi_cmap_free(struct util_cmap *cmap) +-{ +- struct util_cmap_peer *peer; +- struct dlist_entry *entry; +- size_t i; +- +- fastlock_acquire(&cmap->lock); +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Closing cmap\n"); +- for (i = 0; i < cmap->av->count; i++) { +- if (cmap->handles_av[i]) +- util_cmap_del_handle(cmap->handles_av[i]); +- } +- while(!dlist_empty(&cmap->peer_list)) { +- entry = cmap->peer_list.next; +- peer = container_of(entry, struct util_cmap_peer, entry); +- util_cmap_del_handle(peer->handle); +- } +- util_cmap_event_handler_close(cmap); +- free(cmap->handles_av); +- free(cmap->attr.name); +- fastlock_release(&cmap->lock); +- fastlock_destroy(&cmap->lock); +- free(cmap); +-} +- +-struct util_cmap *ofi_cmap_alloc(struct util_ep *ep, +- struct util_cmap_attr *attr) +-{ +- struct util_cmap *cmap; +- +- cmap = calloc(1, sizeof *cmap); +- if (!cmap) +- return NULL; +- +- cmap->ep = ep; +- cmap->av = ep->av; +- +- cmap->handles_av = calloc(cmap->av->count, sizeof(*cmap->handles_av)); +- if (!cmap->handles_av) +- goto err1; +- +- cmap->attr = *attr; +- cmap->attr.name = mem_dup(attr->name, ep->av->addrlen); +- if (!cmap->attr.name) +- goto err2; +- +- memset(&cmap->handles_idx, 0, sizeof(cmap->handles_idx)); +- ofi_key_idx_init(&cmap->key_idx, UTIL_CMAP_IDX_BITS); +- +- dlist_init(&cmap->peer_list); +- fastlock_init(&cmap->lock); +- +- if (pthread_create(&cmap->event_handler_thread, 0, +- cmap->attr.event_handler, ep)) { +- FI_WARN(ep->av->prov, FI_LOG_FABRIC, +- "Unable to create msg_cm_listener_thread\n"); +- goto err3; +- } +- return cmap; +-err3: +- fastlock_destroy(&cmap->lock); +- free(cmap->attr.name); +-err2: +- free(cmap->handles_av); +-err1: +- free(cmap); +- return NULL; ++ return ofi_ip_av_create_flags(domain_fid, attr, av, context, 0); + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_buf.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_buf.c +index b5f1682..2d468f8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_buf.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_buf.c +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -38,25 +39,17 @@ + #include + #include + +-static inline void util_buf_set_region(union util_buf *buf, +- struct util_buf_region *region, +- struct util_buf_pool *pool) +-{ +- struct util_buf_footer *buf_ftr; +- if (util_buf_use_ftr(pool)) { +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- buf_ftr->region = region; +- } +-} + + int util_buf_grow(struct util_buf_pool *pool) + { ++ void *buf; + int ret; + size_t i; +- union util_buf *util_buf; + struct util_buf_region *buf_region; ++ ssize_t hp_size; ++ struct util_buf_footer *buf_ftr; + +- if (pool->max_cnt && pool->num_allocated >= pool->max_cnt) { ++ if (pool->attr.max_cnt && pool->num_allocated >= pool->attr.max_cnt) { + return -1; + } + +@@ -64,107 +57,230 @@ int util_buf_grow(struct util_buf_pool *pool) + if (!buf_region) + return -1; + +- ret = ofi_memalign((void **)&buf_region->mem_region, pool->alignment, +- pool->chunk_cnt * pool->entry_sz); +- if (ret) +- goto err; ++ buf_region->pool = pool; ++ dlist_init(&buf_region->buf_list); ++ ++ if (pool->attr.is_mmap_region) { ++ hp_size = ofi_get_hugepage_size(); ++ if (hp_size < 0) ++ goto err1; ++ ++ buf_region->size = fi_get_aligned_sz(pool->attr.chunk_cnt * ++ pool->entry_sz, hp_size); ++ ++ ret = ofi_alloc_hugepage_buf((void **)&buf_region->mem_region, ++ buf_region->size); ++ if (ret) { ++ FI_DBG(&core_prov, FI_LOG_CORE, ++ "Huge page allocation failed: %s\n", ++ fi_strerror(-ret)); ++ ++ if (pool->num_allocated > 0) ++ goto err1; ++ ++ pool->attr.is_mmap_region = 0; ++ } ++ } ++ ++ if (!pool->attr.is_mmap_region) { ++ buf_region->size = pool->attr.chunk_cnt * pool->entry_sz; ++ ++ ret = ofi_memalign((void **)&buf_region->mem_region, ++ pool->attr.alignment, buf_region->size); ++ if (ret) ++ goto err1; ++ } + +- if (pool->alloc_hndlr) { +- ret = pool->alloc_hndlr(pool->ctx, buf_region->mem_region, +- pool->chunk_cnt * pool->entry_sz, +- &buf_region->context); ++ if (pool->attr.alloc_hndlr) { ++ ret = pool->attr.alloc_hndlr(pool->attr.ctx, ++ buf_region->mem_region, ++ buf_region->size, ++ &buf_region->context); + if (ret) +- goto err; ++ goto err2; + } + +- for (i = 0; i < pool->chunk_cnt; i++) { +- util_buf = (union util_buf *) +- (buf_region->mem_region + i * pool->entry_sz); +- util_buf_set_region(util_buf, buf_region, pool); +- slist_insert_tail(&util_buf->entry, &pool->buf_list); ++ if (!(pool->regions_cnt % UTIL_BUF_POOL_REGION_CHUNK_CNT)) { ++ struct util_buf_region **new_table = ++ realloc(pool->regions_table, ++ (pool->regions_cnt + ++ UTIL_BUF_POOL_REGION_CHUNK_CNT) * ++ sizeof(*pool->regions_table)); ++ if (!new_table) ++ goto err3; ++ pool->regions_table = new_table; + } ++ pool->regions_table[pool->regions_cnt] = buf_region; ++ pool->regions_cnt++; + +- slist_insert_tail(&buf_region->entry, &pool->region_list); +- pool->num_allocated += pool->chunk_cnt; ++ for (i = 0; i < pool->attr.chunk_cnt; i++) { ++ buf = (buf_region->mem_region + i * pool->entry_sz); ++ buf_ftr = util_buf_get_ftr(pool, buf); ++ ++ if (pool->attr.init) { ++#if ENABLE_DEBUG ++ if (!pool->attr.indexing.ordered) { ++ buf_ftr->entry.slist.next = (void *) OFI_MAGIC_64; ++ ++ pool->attr.init(pool->attr.ctx, buf); ++ ++ assert(buf_ftr->entry.slist.next == (void *) OFI_MAGIC_64); ++ } else { ++ buf_ftr->entry.dlist.next = (void *) OFI_MAGIC_64; ++ buf_ftr->entry.dlist.prev = (void *) OFI_MAGIC_64; ++ ++ pool->attr.init(pool->attr.ctx, buf); ++ ++ assert((buf_ftr->entry.dlist.next == (void *) OFI_MAGIC_64) && ++ (buf_ftr->entry.dlist.prev == (void *) OFI_MAGIC_64)); ++ } ++#else ++ pool->attr.init(pool->attr.ctx, buf); ++#endif ++ } ++ ++ buf_ftr->region = buf_region; ++ buf_ftr->index = pool->num_allocated + i; ++ if (!pool->attr.indexing.ordered) { ++ slist_insert_tail(&buf_ftr->entry.slist, ++ &pool->list.buffers); ++ } else { ++ dlist_insert_tail(&buf_ftr->entry.dlist, ++ &buf_region->buf_list); ++ } ++ } ++ ++ if (pool->attr.indexing.ordered) { ++ dlist_insert_tail(&buf_region->entry, ++ &pool->list.regions); ++ } ++ ++ pool->num_allocated += pool->attr.chunk_cnt; + return 0; +-err: ++err3: ++ if (pool->attr.free_hndlr) ++ pool->attr.free_hndlr(pool->attr.ctx, buf_region->context); ++err2: ++ ofi_freealign(buf_region->mem_region); ++err1: + free(buf_region); + return -1; + } + +-int util_buf_pool_create_ex(struct util_buf_pool **buf_pool, +- size_t size, size_t alignment, +- size_t max_cnt, size_t chunk_cnt, +- util_buf_region_alloc_hndlr alloc_hndlr, +- util_buf_region_free_hndlr free_hndlr, +- void *pool_ctx) ++int util_buf_pool_create_attr(struct util_buf_attr *attr, ++ struct util_buf_pool **buf_pool) + { + size_t entry_sz; ++ ssize_t hp_size; + + (*buf_pool) = calloc(1, sizeof(**buf_pool)); + if (!*buf_pool) + return -FI_ENOMEM; + +- (*buf_pool)->alloc_hndlr = alloc_hndlr; +- (*buf_pool)->free_hndlr = free_hndlr; +- (*buf_pool)->data_sz = size; +- (*buf_pool)->alignment = alignment; +- (*buf_pool)->max_cnt = max_cnt; +- (*buf_pool)->chunk_cnt = chunk_cnt; +- (*buf_pool)->ctx = pool_ctx; ++ (*buf_pool)->attr = *attr; + +- entry_sz = util_buf_use_ftr(*buf_pool) ? +- (size + sizeof(struct util_buf_footer)) : size; +- (*buf_pool)->entry_sz = fi_get_aligned_sz(entry_sz, alignment); ++ entry_sz = (attr->size + sizeof(struct util_buf_footer)); ++ (*buf_pool)->entry_sz = fi_get_aligned_sz(entry_sz, attr->alignment); + +- slist_init(&(*buf_pool)->buf_list); +- slist_init(&(*buf_pool)->region_list); ++ hp_size = ofi_get_hugepage_size(); + +- if (util_buf_grow(*buf_pool)) { +- free(*buf_pool); +- return -FI_ENOMEM; +- } +- return FI_SUCCESS; +-} ++ if ((*buf_pool)->attr.chunk_cnt * (*buf_pool)->entry_sz < hp_size) ++ (*buf_pool)->attr.is_mmap_region = 0; ++ else ++ (*buf_pool)->attr.is_mmap_region = 1; + +-#if ENABLE_DEBUG +-void *util_buf_get(struct util_buf_pool *pool) +-{ +- struct slist_entry *entry; +- struct util_buf_footer *buf_ftr; ++ if (!(*buf_pool)->attr.indexing.ordered) ++ slist_init(&(*buf_pool)->list.buffers); ++ else ++ dlist_init(&(*buf_pool)->list.regions); + +- entry = slist_remove_head(&pool->buf_list); +- buf_ftr = (struct util_buf_footer *) ((char *) entry + pool->data_sz); +- buf_ftr->region->num_used++; +- return entry; ++ return FI_SUCCESS; + } + +-void util_buf_release(struct util_buf_pool *pool, void *buf) ++int util_buf_pool_create_ex(struct util_buf_pool **buf_pool, ++ size_t size, size_t alignment, ++ size_t max_cnt, size_t chunk_cnt, ++ util_buf_region_alloc_hndlr alloc_hndlr, ++ util_buf_region_free_hndlr free_hndlr, ++ void *pool_ctx) + { +- union util_buf *util_buf = buf; +- struct util_buf_footer *buf_ftr; +- +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- buf_ftr->region->num_used--; +- slist_insert_head(&util_buf->entry, &pool->buf_list); ++ struct util_buf_attr attr = { ++ .size = size, ++ .alignment = alignment, ++ .max_cnt = max_cnt, ++ .chunk_cnt = chunk_cnt, ++ .alloc_hndlr = alloc_hndlr, ++ .free_hndlr = free_hndlr, ++ .ctx = pool_ctx, ++ .track_used = 1, ++ .indexing = { ++ .used = 1, ++ .ordered = 0, ++ }, ++ }; ++ return util_buf_pool_create_attr(&attr, buf_pool); + } +-#endif + + void util_buf_pool_destroy(struct util_buf_pool *pool) + { +- struct slist_entry *entry; + struct util_buf_region *buf_region; ++ int ret; ++ size_t i; + +- while (!slist_empty(&pool->region_list)) { +- entry = slist_remove_head(&pool->region_list); +- buf_region = container_of(entry, struct util_buf_region, entry); ++ for (i = 0; i < pool->regions_cnt; i++) { ++ buf_region = pool->regions_table[i]; + #if ENABLE_DEBUG +- assert(buf_region->num_used == 0); ++ if (pool->attr.track_used) ++ assert(buf_region->num_used == 0); + #endif +- if (pool->free_hndlr) +- pool->free_hndlr(pool->ctx, buf_region->context); +- ofi_freealign(buf_region->mem_region); ++ if (pool->attr.free_hndlr) ++ pool->attr.free_hndlr(pool->attr.ctx, buf_region->context); ++ if (pool->attr.is_mmap_region) { ++ ret = ofi_free_hugepage_buf(buf_region->mem_region, ++ buf_region->size); ++ if (ret) { ++ FI_DBG(&core_prov, FI_LOG_CORE, ++ "Huge page free failed: %s\n", ++ fi_strerror(-ret)); ++ assert(0); ++ } ++ } else { ++ ofi_freealign(buf_region->mem_region); ++ } ++ + free(buf_region); + } ++ free(pool->regions_table); + free(pool); + } ++ ++int util_buf_is_lower(struct dlist_entry *item, const void *arg) ++{ ++ struct util_buf_footer *buf_ftr1 = ++ container_of((struct dlist_entry *)arg, ++ struct util_buf_footer, entry.dlist); ++ struct util_buf_footer *buf_ftr2 = ++ container_of(item, struct util_buf_footer, entry.dlist); ++ return (buf_ftr1->index < buf_ftr2->index); ++} ++ ++int util_buf_region_is_lower(struct dlist_entry *item, const void *arg) ++{ ++ struct util_buf_region *buf_region1 = ++ container_of((struct dlist_entry *)arg, ++ struct util_buf_region, entry); ++ struct util_buf_region *buf_region2 = ++ container_of(item, struct util_buf_region, entry); ++ struct util_buf_footer *buf_region1_head = ++ container_of(buf_region1->buf_list.next, ++ struct util_buf_footer, entry.dlist); ++ struct util_buf_footer *buf_region2_head = ++ container_of(buf_region2->buf_list.next, ++ struct util_buf_footer, entry.dlist); ++ size_t buf_region1_index = ++ (size_t)(buf_region1_head->index / buf_region1->pool->attr.chunk_cnt); ++ size_t buf_region2_index = ++ (size_t)(buf_region2_head->index / buf_region2->pool->attr.chunk_cnt); ++ ++ return (buf_region1_index < buf_region2_index); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_cq.c +index 1963f38..9a0d4d9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_cq.c +@@ -38,22 +38,58 @@ + + #define UTIL_DEF_CQ_SIZE (1024) + ++/* Caller must hold `cq_lock` */ ++int ofi_cq_write_overflow(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag, fi_addr_t src) ++{ ++ struct util_cq_oflow_err_entry *entry; ++ ++ assert(ofi_cirque_isfull(cq->cirq)); ++ ++ if (!(entry = calloc(1, sizeof(*entry)))) ++ return -FI_ENOMEM; ++ ++ entry->parent_comp = ofi_cirque_tail(cq->cirq); ++ entry->parent_comp->flags |= UTIL_FLAG_OVERFLOW; ++ ++ entry->comp.op_context = context; ++ entry->comp.flags = flags; ++ entry->comp.len = len; ++ entry->comp.buf = buf; ++ entry->comp.data = data; ++ entry->comp.tag = tag; ++ ++ entry->src = src; ++ slist_insert_tail(&entry->list_entry, &cq->oflow_err_list); ++ ++ return 0; ++} ++ + int ofi_cq_write_error(struct util_cq *cq, + const struct fi_cq_err_entry *err_entry) + { +- struct util_cq_err_entry *entry; ++ struct util_cq_oflow_err_entry *entry; + struct fi_cq_tagged_entry *comp; + ++ assert(err_entry->err); ++ + if (!(entry = calloc(1, sizeof(*entry)))) + return -FI_ENOMEM; + +- entry->err_entry = *err_entry; +- fastlock_acquire(&cq->cq_lock); +- slist_insert_tail(&entry->list_entry, &cq->err_list); +- comp = ofi_cirque_tail(cq->cirq); +- comp->flags = UTIL_FLAG_ERROR; +- ofi_cirque_commit(cq->cirq); +- fastlock_release(&cq->cq_lock); ++ entry->comp = *err_entry; ++ cq->cq_fastlock_acquire(&cq->cq_lock); ++ slist_insert_tail(&entry->list_entry, &cq->oflow_err_list); ++ ++ if (OFI_UNLIKELY(ofi_cirque_isfull(cq->cirq))) { ++ comp = ofi_cirque_tail(cq->cirq); ++ comp->flags |= (UTIL_FLAG_ERROR | UTIL_FLAG_OVERFLOW); ++ entry->parent_comp = ofi_cirque_tail(cq->cirq); ++ } else { ++ comp = ofi_cirque_tail(cq->cirq); ++ comp->flags = UTIL_FLAG_ERROR; ++ ofi_cirque_commit(cq->cirq); ++ } ++ cq->cq_fastlock_release(&cq->cq_lock); + if (cq->wait) + cq->wait->signal(cq->wait); + return 0; +@@ -89,32 +125,6 @@ int ofi_cq_write_error_trunc(struct util_cq *cq, void *context, uint64_t flags, + return ofi_cq_write_error(cq, &err_entry); + } + +-int ofi_cq_write(struct util_cq *cq, void *context, uint64_t flags, size_t len, +- void *buf, uint64_t data, uint64_t tag) +-{ +- struct fi_cq_tagged_entry *comp; +- int ret = 0; +- +- fastlock_acquire(&cq->cq_lock); +- if (ofi_cirque_isfull(cq->cirq)) { +- FI_DBG(cq->domain->prov, FI_LOG_CQ, "util_cq cirq is full!\n"); +- ret = -FI_EAGAIN; +- goto out; +- } +- +- comp = ofi_cirque_tail(cq->cirq); +- comp->op_context = context; +- comp->flags = flags; +- comp->len = len; +- comp->buf = buf; +- comp->data = data; +- comp->tag = tag; +- ofi_cirque_commit(cq->cirq); +-out: +- fastlock_release(&cq->cq_lock); +- return ret; +-} +- + int ofi_check_cq_attr(const struct fi_provider *prov, + const struct fi_cq_attr *attr) + { +@@ -191,8 +201,37 @@ static void util_cq_read_tagged(void **dst, void *src) + *(char **)dst += sizeof(struct fi_cq_tagged_entry); + } + ++static inline ++void util_cq_read_oflow_entry(struct util_cq *cq, ++ struct util_cq_oflow_err_entry *oflow_entry, ++ struct fi_cq_tagged_entry *cirq_entry, ++ void **buf, fi_addr_t *src_addr, ssize_t i) ++{ ++ if (src_addr && cq->src) { ++ src_addr[i] = cq->src[ofi_cirque_rindex(cq->cirq)]; ++ cq->src[ofi_cirque_rindex(cq->cirq)] = oflow_entry->src; ++ } ++ cq->read_entry(buf, cirq_entry); ++ cirq_entry->op_context = oflow_entry->comp.op_context; ++ cirq_entry->flags = oflow_entry->comp.flags; ++ cirq_entry->len = oflow_entry->comp.len; ++ cirq_entry->buf = oflow_entry->comp.buf; ++ cirq_entry->data = oflow_entry->comp.data; ++ cirq_entry->tag = oflow_entry->comp.tag; ++} ++ ++static inline ++void util_cq_read_entry(struct util_cq *cq, struct fi_cq_tagged_entry *entry, ++ void **buf, fi_addr_t *src_addr, ssize_t i) ++{ ++ if (src_addr && cq->src) ++ src_addr[i] = cq->src[ofi_cirque_rindex(cq->cirq)]; ++ cq->read_entry(buf, entry); ++ ofi_cirque_discard(cq->cirq); ++} ++ + ssize_t ofi_cq_readfrom(struct fid_cq *cq_fid, void *buf, size_t count, +- fi_addr_t *src_addr) ++ fi_addr_t *src_addr) + { + struct util_cq *cq; + struct fi_cq_tagged_entry *entry; +@@ -200,11 +239,11 @@ ssize_t ofi_cq_readfrom(struct fid_cq *cq_fid, void *buf, size_t count, + + cq = container_of(cq_fid, struct util_cq, cq_fid); + +- fastlock_acquire(&cq->cq_lock); +- if (ofi_cirque_isempty(cq->cirq)) { +- fastlock_release(&cq->cq_lock); ++ cq->cq_fastlock_acquire(&cq->cq_lock); ++ if (ofi_cirque_isempty(cq->cirq) || !count) { ++ cq->cq_fastlock_release(&cq->cq_lock); + cq->progress(cq); +- fastlock_acquire(&cq->cq_lock); ++ cq->cq_fastlock_acquire(&cq->cq_lock); + if (ofi_cirque_isempty(cq->cirq)) { + i = -FI_EAGAIN; + goto out; +@@ -216,18 +255,55 @@ ssize_t ofi_cq_readfrom(struct fid_cq *cq_fid, void *buf, size_t count, + + for (i = 0; i < (ssize_t)count; i++) { + entry = ofi_cirque_head(cq->cirq); +- if (entry->flags & UTIL_FLAG_ERROR) { +- if (!i) +- i = -FI_EAVAIL; +- break; ++ if (OFI_UNLIKELY(entry->flags & (UTIL_FLAG_ERROR | ++ UTIL_FLAG_OVERFLOW))) { ++ if (entry->flags & UTIL_FLAG_ERROR) { ++ struct util_cq_oflow_err_entry *oflow_err_entry = ++ container_of(cq->oflow_err_list.head, ++ struct util_cq_oflow_err_entry, ++ list_entry); ++ if (oflow_err_entry->comp.err) { ++ /* This handles case when the head of oflow_err_list is ++ * an error entry. ++ * ++ * NOTE: if this isn't an error entry, we have to handle ++ * overflow entries and then the error entries to ensure ++ * ordering. */ ++ if (!i) ++ i = -FI_EAVAIL; ++ break; ++ } ++ } ++ if (entry->flags & UTIL_FLAG_OVERFLOW) { ++ assert(!slist_empty(&cq->oflow_err_list)); ++ struct util_cq_oflow_err_entry *oflow_entry = ++ container_of(cq->oflow_err_list.head, ++ struct util_cq_oflow_err_entry, ++ list_entry); ++ if (oflow_entry->parent_comp != entry) { ++ /* Handle case when all overflow/error CQ entries were read ++ * for particular CIRQ entry */ ++ entry->flags &= ~(UTIL_FLAG_OVERFLOW | UTIL_FLAG_ERROR); ++ } else { ++ uint64_t service_flags = ++ (entry->flags & (UTIL_FLAG_OVERFLOW | UTIL_FLAG_ERROR)); ++ slist_remove_head(&cq->oflow_err_list); ++ ++ entry->flags &= ~(service_flags); ++ util_cq_read_oflow_entry(cq, oflow_entry, entry, ++ &buf, src_addr, i); ++ /* To ensure checking of overflow CQ entries once again */ ++ if (!slist_empty(&cq->oflow_err_list)) ++ entry->flags |= service_flags; ++ free(oflow_entry); ++ continue; ++ } ++ } + } +- if (src_addr && cq->src) +- src_addr[i] = cq->src[ofi_cirque_rindex(cq->cirq)]; +- cq->read_entry(&buf, entry); +- ofi_cirque_discard(cq->cirq); ++ util_cq_read_entry(cq, entry, &buf, src_addr, i); + } + out: +- fastlock_release(&cq->cq_lock); ++ cq->cq_fastlock_release(&cq->cq_lock); + return i; + } + +@@ -237,11 +313,12 @@ ssize_t ofi_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + } + + ssize_t ofi_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *buf, +- uint64_t flags) ++ uint64_t flags) + { + struct util_cq *cq; +- struct util_cq_err_entry *err; ++ struct util_cq_oflow_err_entry *err; + struct slist_entry *entry; ++ struct fi_cq_tagged_entry *cirq_entry; + char *err_buf_save; + size_t err_data_size; + uint32_t api_version; +@@ -250,35 +327,56 @@ ssize_t ofi_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *buf, + cq = container_of(cq_fid, struct util_cq, cq_fid); + api_version = cq->domain->fabric->fabric_fid.api_version; + +- fastlock_acquire(&cq->cq_lock); ++ cq->cq_fastlock_acquire(&cq->cq_lock); + if (ofi_cirque_isempty(cq->cirq) || + !(ofi_cirque_head(cq->cirq)->flags & UTIL_FLAG_ERROR)) { + ret = -FI_EAGAIN; + goto unlock; + } + +- ofi_cirque_discard(cq->cirq); +- entry = slist_remove_head(&cq->err_list); +- err = container_of(entry, struct util_cq_err_entry, list_entry); ++ entry = slist_remove_head(&cq->oflow_err_list); ++ err = container_of(entry, struct util_cq_oflow_err_entry, list_entry); + if ((FI_VERSION_GE(api_version, FI_VERSION(1, 5))) && buf->err_data_size) { +- err_data_size = MIN(buf->err_data_size, err->err_entry.err_data_size); +- memcpy(buf->err_data, err->err_entry.err_data, err_data_size); ++ err_data_size = MIN(buf->err_data_size, err->comp.err_data_size); ++ memcpy(buf->err_data, err->comp.err_data, err_data_size); + err_buf_save = buf->err_data; +- *buf = err->err_entry; ++ *buf = err->comp; + buf->err_data = err_buf_save; + buf->err_data_size = err_data_size; + } else { +- memcpy(buf, &err->err_entry, sizeof(struct fi_cq_err_entry_1_0)); ++ memcpy(buf, &err->comp, sizeof(struct fi_cq_err_entry_1_0)); + } ++ ++ cirq_entry = ofi_cirque_head(cq->cirq); ++ if (!(cirq_entry->flags & UTIL_FLAG_OVERFLOW)) { ++ ofi_cirque_discard(cq->cirq); ++ } else if (!slist_empty(&cq->oflow_err_list)) { ++ struct util_cq_oflow_err_entry *oflow_entry = ++ container_of(cq->oflow_err_list.head, ++ struct util_cq_oflow_err_entry, ++ list_entry); ++ if (oflow_entry->parent_comp != cirq_entry) { ++ /* The normal CQ entry were used to report error due to ++ * out of space in the circular queue. We have to unset ++ * UTIL_FLAG_ERROR and UTIL_FLAG_OVERFLOW flags */ ++ cirq_entry->flags &= ~(UTIL_FLAG_ERROR | UTIL_FLAG_OVERFLOW); ++ } ++ /* If the next entry in the oflow_err_list use the same entry from CIRQ to ++ * report error/overflow, don't unset UTIL_FLAG_ERRO and UTIL_FLAG_OVERFLOW ++ * flags to ensure the next round of handling overflow/error entries */ ++ } else { ++ cirq_entry->flags &= ~(UTIL_FLAG_ERROR | UTIL_FLAG_OVERFLOW); ++ } ++ + ret = 1; + free(err); + unlock: +- fastlock_release(&cq->cq_lock); ++ cq->cq_fastlock_release(&cq->cq_lock); + return ret; + } + + ssize_t ofi_cq_sreadfrom(struct fid_cq *cq_fid, void *buf, size_t count, +- fi_addr_t *src_addr, const void *cond, int timeout) ++ fi_addr_t *src_addr, const void *cond, int timeout) + { + struct util_cq *cq; + uint64_t start; +@@ -318,12 +416,9 @@ ssize_t ofi_cq_sread(struct fid_cq *cq_fid, void *buf, size_t count, + + int ofi_cq_signal(struct fid_cq *cq_fid) + { +- struct util_cq *cq; +- +- cq = container_of(cq_fid, struct util_cq, cq_fid); +- assert(cq->wait); ++ struct util_cq *cq = container_of(cq_fid, struct util_cq, cq_fid); + ofi_atomic_set32(&cq->signaled, 1); +- cq->wait->signal(cq->wait); ++ util_cq_signal(cq); + return 0; + } + +@@ -346,18 +441,15 @@ static struct fi_ops_cq util_cq_ops = { + + int ofi_cq_cleanup(struct util_cq *cq) + { +- struct util_cq_err_entry *err; ++ struct util_cq_oflow_err_entry *err; + struct slist_entry *entry; + + if (ofi_atomic_get32(&cq->ref)) + return -FI_EBUSY; + +- fastlock_destroy(&cq->cq_lock); +- fastlock_destroy(&cq->ep_list_lock); +- +- while (!slist_empty(&cq->err_list)) { +- entry = slist_remove_head(&cq->err_list); +- err = container_of(entry, struct util_cq_err_entry, list_entry); ++ while (!slist_empty(&cq->oflow_err_list)) { ++ entry = slist_remove_head(&cq->oflow_err_list); ++ err = container_of(entry, struct util_cq_oflow_err_entry, list_entry); + free(err); + } + +@@ -370,10 +462,27 @@ int ofi_cq_cleanup(struct util_cq *cq) + + ofi_atomic_dec32(&cq->domain->ref); + util_comp_cirq_free(cq->cirq); ++ fastlock_destroy(&cq->cq_lock); ++ fastlock_destroy(&cq->ep_list_lock); + free(cq->src); + return 0; + } + ++int ofi_cq_control(struct fid *fid, int command, void *arg) ++{ ++ struct util_cq *cq = container_of(fid, struct util_cq, cq_fid.fid); ++ ++ switch (command) { ++ case FI_GETWAIT: ++ if (!cq->wait) ++ return -FI_ENODATA; ++ return fi_control(&cq->wait->wait_fid.fid, FI_GETWAIT, arg); ++ default: ++ FI_INFO(cq->wait->prov, FI_LOG_CQ, "Unsupported command\n"); ++ return -FI_ENOSYS; ++ } ++} ++ + static int util_cq_close(struct fid *fid) + { + struct util_cq *cq; +@@ -392,7 +501,7 @@ static struct fi_ops util_cq_fi_ops = { + .size = sizeof(struct fi_ops), + .close = util_cq_close, + .bind = fi_no_bind, +- .control = fi_no_control, ++ .control = ofi_cq_control, + .ops_open = fi_no_ops_open, + }; + +@@ -410,7 +519,15 @@ static int fi_cq_init(struct fid_domain *domain, struct fi_cq_attr *attr, + dlist_init(&cq->ep_list); + fastlock_init(&cq->ep_list_lock); + fastlock_init(&cq->cq_lock); +- slist_init(&cq->err_list); ++ if (cq->domain->threading == FI_THREAD_COMPLETION || ++ (cq->domain->threading == FI_THREAD_DOMAIN)) { ++ cq->cq_fastlock_acquire = ofi_fastlock_acquire_noop; ++ cq->cq_fastlock_release = ofi_fastlock_release_noop; ++ } else { ++ cq->cq_fastlock_acquire = ofi_fastlock_acquire; ++ cq->cq_fastlock_release = ofi_fastlock_release; ++ } ++ slist_init(&cq->oflow_err_list); + cq->read_entry = read_entry; + + cq->cq_fid.fid.fclass = FI_CLASS_CQ; +@@ -473,14 +590,14 @@ void ofi_cq_progress(struct util_cq *cq) + struct fid_list_entry *fid_entry; + struct dlist_entry *item; + +- fastlock_acquire(&cq->ep_list_lock); ++ cq->cq_fastlock_acquire(&cq->ep_list_lock); + dlist_foreach(&cq->ep_list, item) { + fid_entry = container_of(item, struct fid_list_entry, entry); + ep = container_of(fid_entry->fid, struct util_ep, ep_fid.fid); + ep->progress(ep); + + } +- fastlock_release(&cq->ep_list_lock); ++ cq->cq_fastlock_release(&cq->ep_list_lock); + } + + int ofi_cq_init(const struct fi_provider *prov, struct fid_domain *domain, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_domain.c +index bfbe628..2a7d8de 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_domain.c +@@ -86,6 +86,8 @@ static int util_domain_init(struct util_domain *domain, + domain->addr_format = info->addr_format; + domain->av_type = info->domain_attr->av_type; + domain->name = strdup(info->domain_attr->name); ++ domain->threading = info->domain_attr->threading; ++ domain->data_progress = info->domain_attr->data_progress; + return domain->name ? 0 : -FI_ENOMEM; + } + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ep.c +index 710d95f..ea6f63a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ep.c +@@ -46,15 +46,19 @@ int ofi_ep_bind_cq(struct util_ep *ep, struct util_cq *cq, uint64_t flags) + + if (flags & FI_TRANSMIT) { + ep->tx_cq = cq; +- if (!(flags & FI_SELECTIVE_COMPLETION)) ++ if (!(flags & FI_SELECTIVE_COMPLETION)) { + ep->tx_op_flags |= FI_COMPLETION; ++ ep->tx_msg_flags = FI_COMPLETION; ++ } + ofi_atomic_inc32(&cq->ref); + } + + if (flags & FI_RECV) { + ep->rx_cq = cq; +- if (!(flags & FI_SELECTIVE_COMPLETION)) ++ if (!(flags & FI_SELECTIVE_COMPLETION)) { + ep->rx_op_flags |= FI_COMPLETION; ++ ep->rx_msg_flags = FI_COMPLETION; ++ } + ofi_atomic_inc32(&cq->ref); + } + +@@ -116,31 +120,37 @@ int ofi_ep_bind_cntr(struct util_ep *ep, struct util_cntr *cntr, uint64_t flags) + + if (flags & FI_TRANSMIT) { + ep->tx_cntr = cntr; ++ ep->tx_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_RECV) { + ep->rx_cntr = cntr; ++ ep->rx_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_READ) { + ep->rd_cntr = cntr; ++ ep->rd_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_WRITE) { + ep->wr_cntr = cntr; ++ ep->wr_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_REMOTE_READ) { + ep->rem_rd_cntr = cntr; ++ ep->rem_rd_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_REMOTE_WRITE) { + ep->rem_wr_cntr = cntr; ++ ep->rem_wr_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + +@@ -206,17 +216,35 @@ int ofi_endpoint_init(struct fid_domain *domain, const struct util_prov *util_pr + ep->progress = progress; + ep->tx_op_flags = info->tx_attr->op_flags; + ep->rx_op_flags = info->rx_attr->op_flags; ++ ep->tx_msg_flags = 0; ++ ep->rx_msg_flags = 0; ++ ep->inject_op_flags = ++ ((info->tx_attr->op_flags & ++ ~(FI_COMPLETION | FI_INJECT_COMPLETE | ++ FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE)) | FI_INJECT); ++ ep->tx_cntr_inc = ofi_cntr_inc_noop; ++ ep->rx_cntr_inc = ofi_cntr_inc_noop; ++ ep->rd_cntr_inc = ofi_cntr_inc_noop; ++ ep->wr_cntr_inc = ofi_cntr_inc_noop; ++ ep->rem_rd_cntr_inc = ofi_cntr_inc_noop; ++ ep->rem_wr_cntr_inc = ofi_cntr_inc_noop; ++ ep->type = info->ep_attr->type; + ofi_atomic_inc32(&util_domain->ref); + if (util_domain->eq) + ofi_ep_bind_eq(ep, util_domain->eq); + fastlock_init(&ep->lock); ++ if (ep->domain->threading != FI_THREAD_SAFE) { ++ ep->lock_acquire = ofi_fastlock_acquire_noop; ++ ep->lock_release = ofi_fastlock_release_noop; ++ } else { ++ ep->lock_acquire = ofi_fastlock_acquire; ++ ep->lock_release = ofi_fastlock_release; ++ } + return 0; + } + + int ofi_endpoint_close(struct util_ep *util_ep) + { +- fastlock_destroy(&util_ep->lock); +- + if (util_ep->tx_cq) { + fid_list_remove(&util_ep->tx_cq->ep_list, + &util_ep->tx_cq->ep_list_lock, +@@ -284,5 +312,6 @@ int ofi_endpoint_close(struct util_ep *util_ep) + if (util_ep->eq) + ofi_atomic_dec32(&util_ep->eq->ref); + ofi_atomic_dec32(&util_ep->domain->ref); ++ fastlock_destroy(&util_ep->lock); + return 0; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_eq.c +index 1920294..442127d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_eq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_eq.c +@@ -36,12 +36,43 @@ + #include + #include + ++void ofi_eq_handle_err_entry(uint32_t api_version, uint64_t flags, ++ struct fi_eq_err_entry *err_entry, ++ struct fi_eq_err_entry *user_err_entry) ++{ ++ if ((FI_VERSION_GE(api_version, FI_VERSION(1, 5))) ++ && user_err_entry->err_data && user_err_entry->err_data_size) { ++ void *err_data = user_err_entry->err_data; ++ size_t err_data_size = MIN(err_entry->err_data_size, ++ user_err_entry->err_data_size); ++ ++ memcpy(err_data, err_entry->err_data, err_data_size); ++ ++ *user_err_entry = *err_entry; ++ user_err_entry->err_data = err_data; ++ user_err_entry->err_data_size = err_data_size; ++ ++ if (!(flags & FI_PEEK)) { ++ free(err_entry->err_data); ++ err_entry->err_data = NULL; ++ err_entry->err_data_size = 0; ++ } ++ } else { ++ *user_err_entry = *err_entry; ++ } ++ ++ if (!(flags & FI_PEEK)) { ++ err_entry->err = 0; ++ err_entry->prov_errno = 0; ++ } ++} + +-static ssize_t util_eq_read(struct fid_eq *eq_fid, uint32_t *event, +- void *buf, size_t len, uint64_t flags) ++ssize_t ofi_eq_read(struct fid_eq *eq_fid, uint32_t *event, ++ void *buf, size_t len, uint64_t flags) + { + struct util_eq *eq; + struct util_event *entry; ++ struct fi_eq_err_entry *err_entry; + ssize_t ret; + + eq = container_of(eq_fid, struct util_eq, eq_fid); +@@ -64,8 +95,23 @@ static ssize_t util_eq_read(struct fid_eq *eq_fid, uint32_t *event, + if (event) + *event = entry->event; + if (buf) { +- ret = MIN(len, (size_t)entry->size); +- memcpy(buf, entry->data, ret); ++ if (flags & UTIL_FLAG_ERROR) { ++ free(eq->saved_err_data); ++ eq->saved_err_data = NULL; ++ ++ assert((size_t) entry->size == sizeof(*err_entry)); ++ err_entry = (struct fi_eq_err_entry *) entry->data; ++ ++ ofi_eq_handle_err_entry(eq->fabric->fabric_fid.api_version, ++ flags, err_entry, buf); ++ ret = (ssize_t) entry->size; ++ ++ if (!(flags & FI_PEEK)) ++ eq->saved_err_data = err_entry->err_data; ++ } else { ++ ret = MIN(len, (size_t)entry->size); ++ memcpy(buf, entry->data, ret); ++ } + } else { + ret = 0; + } +@@ -79,22 +125,21 @@ out: + return ret; + } + +-static ssize_t util_eq_readerr(struct fid_eq *eq_fid, struct fi_eq_err_entry *buf, +- uint64_t flags) ++ssize_t ofi_eq_readerr(struct fid_eq *eq_fid, struct fi_eq_err_entry *buf, ++ uint64_t flags) + { +- +- return util_eq_read(eq_fid, NULL, buf, sizeof(*buf), +- flags | UTIL_FLAG_ERROR); ++ return fi_eq_read(eq_fid, NULL, buf, sizeof(*buf), ++ flags | UTIL_FLAG_ERROR); + } + +-static ssize_t util_eq_write(struct fid_eq *eq_fid, uint32_t event, +- const void *buf, size_t len, uint64_t flags) ++ssize_t ofi_eq_write(struct fid_eq *eq_fid, uint32_t event, ++ const void *buf, size_t len, uint64_t flags) + { + struct util_eq *eq; + struct util_event *entry; + + eq = container_of(eq_fid, struct util_eq, eq_fid); +- entry = malloc(sizeof(*entry) + len); ++ entry = calloc(1, sizeof(*entry) + len); + if (!entry) + return -FI_ENOMEM; + +@@ -113,8 +158,8 @@ static ssize_t util_eq_write(struct fid_eq *eq_fid, uint32_t event, + return len; + } + +-static ssize_t util_eq_sread(struct fid_eq *eq_fid, uint32_t *event, void *buf, +- size_t len, int timeout, uint64_t flags) ++ssize_t ofi_eq_sread(struct fid_eq *eq_fid, uint32_t *event, void *buf, ++ size_t len, int timeout, uint64_t flags) + { + struct util_eq *eq; + +@@ -128,8 +173,8 @@ static ssize_t util_eq_sread(struct fid_eq *eq_fid, uint32_t *event, void *buf, + return fi_eq_read(eq_fid, event, buf, len, flags); + } + +-static const char *util_eq_strerror(struct fid_eq *eq_fid, int prov_errno, +- const void *err_data, char *buf, size_t len) ++const char *ofi_eq_strerror(struct fid_eq *eq_fid, int prov_errno, ++ const void *err_data, char *buf, size_t len) + { + return (buf && len) ? strncpy(buf, strerror(prov_errno), len) : + fi_strerror(prov_errno); +@@ -185,11 +230,11 @@ static int util_eq_close(struct fid *fid) + + static struct fi_ops_eq util_eq_ops = { + .size = sizeof(struct fi_ops_eq), +- .read = util_eq_read, +- .readerr = util_eq_readerr, +- .sread = util_eq_sread, +- .write = util_eq_write, +- .strerror = util_eq_strerror, ++ .read = ofi_eq_read, ++ .readerr = ofi_eq_readerr, ++ .sread = ofi_eq_sread, ++ .write = ofi_eq_write, ++ .strerror = ofi_eq_strerror, + }; + + static struct fi_ops util_eq_fi_ops = { +@@ -237,6 +282,51 @@ static int util_eq_init(struct fid_fabric *fabric, struct util_eq *eq, + return 0; + } + ++static int ofi_eq_match_fid_event(struct slist_entry *entry, const void *arg) ++{ ++ fid_t fid = (fid_t) arg; ++ struct util_event *event; ++ struct fi_eq_cm_entry *cm_entry; ++ struct fi_eq_entry *cq_entry; ++ ++ event = container_of(entry, struct util_event, entry); ++ cm_entry = (struct fi_eq_cm_entry *) event->data; ++ ++ if (event->event == FI_CONNREQ && ++ fid == cm_entry->info->handle) ++ return 1; ++ ++ cq_entry = (struct fi_eq_entry *)event->data; ++ return (fid == cq_entry->fid); ++} ++ ++void ofi_eq_remove_fid_events(struct util_eq *eq, fid_t fid) ++{ ++ struct fi_eq_err_entry *err_entry; ++ struct slist_entry *entry; ++ struct util_event *event; ++ struct fi_eq_cm_entry *cm_entry; ++ ++ fastlock_acquire(&eq->lock); ++ while((entry = ++ slist_remove_first_match(&eq->list, ofi_eq_match_fid_event, ++ fid))) { ++ event = container_of(entry, struct util_event, entry); ++ if (event->err) { ++ err_entry = (struct fi_eq_err_entry *) event->data; ++ if (err_entry->err_data) ++ free(err_entry->err_data); ++ ++ } else if (event->event == FI_CONNREQ) { ++ cm_entry = (struct fi_eq_cm_entry *) event->data; ++ assert(cm_entry->info); ++ fi_freeinfo(cm_entry->info); ++ } ++ free(event); ++ } ++ fastlock_release(&eq->lock); ++} ++ + static int util_verify_eq_attr(const struct fi_provider *prov, + const struct fi_eq_attr *attr) + { +@@ -318,4 +408,3 @@ int ofi_eq_create(struct fid_fabric *fabric_fid, struct fi_eq_attr *attr, + *eq_fid = &eq->eq_fid; + return 0; + } +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_main.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_main.c +index 06b5ffa..69273ac 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_main.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_main.c +@@ -192,7 +192,7 @@ int util_getinfo(const struct util_prov *util_prov, uint32_t version, + } + + if (flags & FI_SOURCE) { +- ret = ofi_get_addr((*info)->addr_format, flags, ++ ret = ofi_get_addr(&(*info)->addr_format, flags, + node, service, &(*info)->src_addr, + &(*info)->src_addrlen); + if (ret) { +@@ -204,7 +204,7 @@ int util_getinfo(const struct util_prov *util_prov, uint32_t version, + } else { + if (node || service) { + copy_dest = 0; +- ret = ofi_get_addr((*info)->addr_format, ++ ret = ofi_get_addr(&(*info)->addr_format, + flags, node, service, + &(*info)->dest_addr, + &(*info)->dest_addrlen); +@@ -225,6 +225,7 @@ int util_getinfo(const struct util_prov *util_prov, uint32_t version, + goto err; + } + (*info)->src_addrlen = hints->src_addrlen; ++ (*info)->addr_format = hints->addr_format; + } + } + +@@ -236,6 +237,7 @@ int util_getinfo(const struct util_prov *util_prov, uint32_t version, + goto err; + } + (*info)->dest_addrlen = hints->dest_addrlen; ++ (*info)->addr_format = hints->addr_format; + } + + if ((*info)->dest_addr && !(*info)->src_addr) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mem_monitor.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mem_monitor.c +index 585fb36..d26b2ef 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mem_monitor.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mem_monitor.c +@@ -78,13 +78,13 @@ int ofi_monitor_subscribe(struct ofi_notification_queue *nq, + dlist_init(&subscription->entry); + + subscription->nq = nq; +- subscription->addr = addr; +- subscription->len = len; ++ subscription->iov.iov_base = addr; ++ subscription->iov.iov_len = len; + fastlock_acquire(&nq->lock); + nq->refcnt++; + fastlock_release(&nq->lock); + +- ret = nq->monitor->subscribe(nq->monitor, addr, len, subscription); ++ ret = nq->monitor->subscribe(nq->monitor, subscription); + if (OFI_UNLIKELY(ret)) { + FI_WARN(&core_prov, FI_LOG_MR, + "Failed (ret = %d) to monitor addr=%p len=%zu", +@@ -100,48 +100,20 @@ void ofi_monitor_unsubscribe(struct ofi_subscription *subscription) + { + FI_DBG(&core_prov, FI_LOG_MR, + "unsubscribing addr=%p len=%zu subscription=%p\n", +- subscription->addr, subscription->len, subscription); ++ subscription->iov.iov_base, subscription->iov.iov_len, subscription); + subscription->nq->monitor->unsubscribe(subscription->nq->monitor, +- subscription->addr, +- subscription->len, + subscription); + fastlock_acquire(&subscription->nq->lock); +- dlist_init(&subscription->entry); ++ if (!dlist_empty(&subscription->entry)) ++ dlist_remove_init(&subscription->entry); + subscription->nq->refcnt--; + fastlock_release(&subscription->nq->lock); + } + +-static void util_monitor_read_events(struct ofi_mem_monitor *monitor) +-{ +- struct ofi_subscription *subscription; +- +- do { +- subscription = monitor->get_event(monitor); +- if (!subscription) { +- FI_DBG(&core_prov, FI_LOG_MR, +- "no more events to be read\n"); +- break; +- } +- +- FI_DBG(&core_prov, FI_LOG_MR, +- "found event, context=%p, addr=%p, len=%zu nq=%p\n", +- subscription, subscription->addr, +- subscription->len, subscription->nq); +- +- fastlock_acquire(&subscription->nq->lock); +- if (dlist_empty(&subscription->entry)) +- dlist_insert_tail(&subscription->entry, +- &subscription->nq->list); +- fastlock_release(&subscription->nq->lock); +- } while (1); +-} +- + struct ofi_subscription *ofi_monitor_get_event(struct ofi_notification_queue *nq) + { + struct ofi_subscription *subscription; + +- util_monitor_read_events(nq->monitor); +- + fastlock_acquire(&nq->lock); + if (!dlist_empty(&nq->list)) { + dlist_pop_front(&nq->list, struct ofi_subscription, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mr_cache.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mr_cache.c +index 8de4c6b..84bc28d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mr_cache.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mr_cache.c +@@ -65,30 +65,28 @@ static int util_mr_find_overlap(void *a, void *b) + static void util_mr_free_entry(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry) + { +- FI_DBG(cache->domain->prov, FI_LOG_MR, "free %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "free %p (len: %" PRIu64 ")\n", + entry->iov.iov_base, entry->iov.iov_len); + + assert(!entry->cached); + if (entry->subscribed) { + ofi_monitor_unsubscribe(&entry->subscription); ++ entry->subscribed = 0; + } + cache->delete_region(cache, entry); + assert((cache->cached_cnt != 0) && + (((ssize_t)cache->cached_size - (ssize_t)entry->iov.iov_len) >= 0)); + cache->cached_cnt--; + cache->cached_size -= entry->iov.iov_len; +- free(entry); ++ ++ util_buf_release(cache->entry_pool, entry); + } + + static void util_mr_uncache_entry(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry) + { +- RbtIterator iter; +- + assert(entry->cached); +- iter = rbtFind(cache->mr_tree, &entry->iov); +- assert(iter); +- rbtErase(cache->mr_tree, iter); ++ cache->mr_storage.erase(&cache->mr_storage, entry); + entry->cached = 0; + } + +@@ -121,7 +119,7 @@ bool ofi_mr_cache_flush(struct ofi_mr_cache *cache) + dlist_pop_front(&cache->lru_list, struct ofi_mr_entry, + entry, lru_entry); + dlist_init(&entry->lru_entry); +- FI_DBG(cache->domain->prov, FI_LOG_MR, "flush %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "flush %p (len: %" PRIu64 ")\n", + entry->iov.iov_base, entry->iov.iov_len); + + util_mr_uncache_entry(cache, entry); +@@ -131,7 +129,7 @@ bool ofi_mr_cache_flush(struct ofi_mr_cache *cache) + + void ofi_mr_cache_delete(struct ofi_mr_cache *cache, struct ofi_mr_entry *entry) + { +- FI_DBG(cache->domain->prov, FI_LOG_MR, "delete %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "delete %p (len: %" PRIu64 ")\n", + entry->iov.iov_base, entry->iov.iov_len); + cache->delete_cnt++; + +@@ -152,13 +150,13 @@ util_mr_cache_create(struct ofi_mr_cache *cache, const struct iovec *iov, + { + int ret; + +- FI_DBG(cache->domain->prov, FI_LOG_MR, "create %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "create %p (len: %" PRIu64 ")\n", + iov->iov_base, iov->iov_len); + + util_mr_cache_process_events(cache); + +- *entry = calloc(1, sizeof(**entry) + cache->entry_data_size); +- if (!*entry) ++ *entry = util_buf_alloc(cache->entry_pool); ++ if (OFI_UNLIKELY(!*entry)) + return -FI_ENOMEM; + + (*entry)->iov = *iov; +@@ -166,8 +164,14 @@ util_mr_cache_create(struct ofi_mr_cache *cache, const struct iovec *iov, + + ret = cache->add_region(cache, *entry); + if (ret) { +- free(*entry); +- return ret; ++ while (ret && ofi_mr_cache_flush(cache)) { ++ ret = cache->add_region(cache, *entry); ++ } ++ if (ret) { ++ assert(!ofi_mr_cache_flush(cache)); ++ util_buf_release(cache->entry_pool, *entry); ++ return ret; ++ } + } + + cache->cached_size += iov->iov_len; +@@ -175,17 +179,18 @@ util_mr_cache_create(struct ofi_mr_cache *cache, const struct iovec *iov, + (cache->cached_size > cache->max_cached_size)) { + (*entry)->cached = 0; + } else { ++ if (cache->mr_storage.insert(&cache->mr_storage, ++ &(*entry)->iov, *entry)) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ (*entry)->cached = 1; ++ + ret = ofi_monitor_subscribe(&cache->nq, iov->iov_base, iov->iov_len, + &(*entry)->subscription); + if (ret) + goto err; + (*entry)->subscribed = 1; +- +- if (rbtInsert(cache->mr_tree, &(*entry)->iov, *entry)) { +- ret = -FI_ENOMEM; +- goto err; +- } +- (*entry)->cached = 1; + } + + return 0; +@@ -197,42 +202,40 @@ err: + + static int + util_mr_cache_merge(struct ofi_mr_cache *cache, const struct fi_mr_attr *attr, +- RbtIterator iter, struct ofi_mr_entry **entry) ++ struct ofi_mr_entry *old_entry, struct ofi_mr_entry **entry) + { + struct iovec iov, *old_iov; +- struct ofi_mr_entry *old_entry; + + iov = *attr->mr_iov; + do { +- rbtKeyValue(cache->mr_tree, iter, (void **) &old_iov, +- (void **) &old_entry); +- + FI_DBG(cache->domain->prov, FI_LOG_MR, +- "merging %p (len: %zu) with %p (len: %zu)\n", ++ "merging %p (len: %" PRIu64 ") with %p (len: %" PRIu64 ")\n", + iov.iov_base, iov.iov_len, + old_entry->iov.iov_base, old_entry->iov.iov_len); ++ old_iov = &old_entry->iov; + + iov.iov_len = ((uintptr_t) + MAX(ofi_iov_end(&iov), ofi_iov_end(old_iov))) - + ((uintptr_t) MIN(iov.iov_base, old_iov->iov_base)); + iov.iov_base = MIN(iov.iov_base, old_iov->iov_base); +- FI_DBG(cache->domain->prov, FI_LOG_MR, "merged %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "merged %p (len: %" PRIu64 ")\n", + iov.iov_base, iov.iov_len); + +- rbtErase(cache->mr_tree, iter); ++ if (old_entry->subscribed) { ++ /* old entry will be removed as soon as `use_cnt == 0`. ++ * unsubscribe from the entry */ ++ ofi_monitor_unsubscribe(&old_entry->subscription); ++ old_entry->subscribed = 0; ++ } ++ cache->mr_storage.erase(&cache->mr_storage, old_entry); + old_entry->cached = 0; + + if (old_entry->use_cnt == 0) { + dlist_remove_init(&old_entry->lru_entry); + util_mr_free_entry(cache, old_entry); +- } else if (old_entry->subscribed) { +- /* old entry will be removed as soon as `use_cnt == 0`. +- * unsubscribe from the entry */ +- ofi_monitor_unsubscribe(&old_entry->subscription); +- old_entry->subscribed = 0; + } + +- } while ((iter = rbtFind(cache->mr_tree, &iov))); ++ } while ((old_entry = cache->mr_storage.find(&cache->mr_storage, &iov))); + + return util_mr_cache_create(cache, &iov, attr->access, entry); + } +@@ -240,13 +243,10 @@ util_mr_cache_merge(struct ofi_mr_cache *cache, const struct fi_mr_attr *attr, + int ofi_mr_cache_search(struct ofi_mr_cache *cache, const struct fi_mr_attr *attr, + struct ofi_mr_entry **entry) + { +- RbtIterator iter; +- struct iovec *iov; +- + util_mr_cache_process_events(cache); + + assert(attr->iov_count == 1); +- FI_DBG(cache->domain->prov, FI_LOG_MR, "search %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "search %p (len: %" PRIu64 ")\n", + attr->mr_iov->iov_base, attr->mr_iov->iov_len); + cache->search_cnt++; + +@@ -255,17 +255,15 @@ int ofi_mr_cache_search(struct ofi_mr_cache *cache, const struct fi_mr_attr *att + ofi_mr_cache_flush(cache)) + ; + +- iter = rbtFind(cache->mr_tree, (void *) attr->mr_iov); +- if (!iter) { ++ *entry = cache->mr_storage.find(&cache->mr_storage, attr->mr_iov); ++ if (!*entry) { + return util_mr_cache_create(cache, attr->mr_iov, + attr->access, entry); + } + +- rbtKeyValue(cache->mr_tree, iter, (void **) &iov, (void **) entry); +- + /* This branch is always false if the merging entries wasn't requested */ +- if (!ofi_iov_within(attr->mr_iov, iov)) +- return util_mr_cache_merge(cache, attr, iter, entry); ++ if (!ofi_iov_within(attr->mr_iov, &(*entry)->iov)) ++ return util_mr_cache_merge(cache, attr, *entry, entry); + + cache->hit_cnt++; + if ((*entry)->use_cnt++ == 0) +@@ -292,23 +290,99 @@ void ofi_mr_cache_cleanup(struct ofi_mr_cache *cache) + dlist_remove_init(&entry->lru_entry); + util_mr_free_entry(cache, entry); + } +- rbtDelete(cache->mr_tree); ++ cache->mr_storage.destroy(&cache->mr_storage); + ofi_monitor_del_queue(&cache->nq); + ofi_atomic_dec32(&cache->domain->ref); ++ util_buf_pool_destroy(cache->entry_pool); + assert(cache->cached_cnt == 0); + assert(cache->cached_size == 0); + } + +-int ofi_mr_cache_init(struct util_domain *domain, struct ofi_mem_monitor *monitor, ++static void ofi_mr_rbt_storage_destroy(struct ofi_mr_storage *storage) ++{ ++ rbtDelete((RbtHandle)storage->storage); ++} ++ ++static struct ofi_mr_entry *ofi_mr_rbt_storage_find(struct ofi_mr_storage *storage, ++ const struct iovec *key) ++{ ++ struct ofi_mr_entry *entry; ++ RbtIterator iter = rbtFind((RbtHandle)storage->storage, (void *)key); ++ if (OFI_UNLIKELY(!iter)) ++ return iter; ++ ++ rbtKeyValue(storage->storage, iter, (void *)&key, (void *)&entry); ++ return entry; ++} ++ ++static int ofi_mr_rbt_storage_insert(struct ofi_mr_storage *storage, ++ struct iovec *key, ++ struct ofi_mr_entry *entry) ++{ ++ int ret = rbtInsert((RbtHandle)storage->storage, ++ (void *)&entry->iov, (void *)entry); ++ if (ret != RBT_STATUS_OK) { ++ switch (ret) { ++ case RBT_STATUS_MEM_EXHAUSTED: ++ return -FI_ENOMEM; ++ case RBT_STATUS_DUPLICATE_KEY: ++ return -FI_EALREADY; ++ default: ++ return -FI_EAVAIL; ++ } ++ } ++ return ret; ++} ++ ++static int ofi_mr_rbt_storage_erase(struct ofi_mr_storage *storage, ++ struct ofi_mr_entry *entry) ++{ ++ RbtIterator iter = rbtFind(storage->storage, &entry->iov); ++ assert(iter); ++ return (rbtErase((RbtHandle)storage->storage, iter) != RBT_STATUS_OK) ? ++ -FI_EAVAIL : 0; ++} ++ ++static int ofi_mr_cache_init_rbt_storage(struct ofi_mr_cache *cache) ++{ ++ cache->mr_storage.storage = rbtNew(cache->merge_regions ? ++ util_mr_find_overlap : ++ util_mr_find_within); ++ if (!cache->mr_storage.storage) ++ return -FI_ENOMEM; ++ cache->mr_storage.destroy = ofi_mr_rbt_storage_destroy; ++ cache->mr_storage.find = ofi_mr_rbt_storage_find; ++ cache->mr_storage.insert = ofi_mr_rbt_storage_insert; ++ cache->mr_storage.erase = ofi_mr_rbt_storage_erase; ++ return 0; ++} ++ ++static int ofi_mr_cache_init_storage(struct ofi_mr_cache *cache) ++{ ++ switch (cache->mr_storage.type) { ++ case OFI_MR_STORAGE_DEFAULT: ++ case OFI_MR_STORAGE_RBT: ++ return ofi_mr_cache_init_rbt_storage(cache); ++ case OFI_MR_STORAGE_USER: ++ if (!(cache->mr_storage.storage && ++ cache->mr_storage.destroy && cache->mr_storage.find && ++ cache->mr_storage.insert && cache->mr_storage.erase)) ++ return -FI_EINVAL; ++ break; ++ } ++ return 0; ++} ++ ++int ofi_mr_cache_init(struct util_domain *domain, ++ struct ofi_mem_monitor *monitor, + struct ofi_mr_cache *cache) + { ++ int ret; + assert(cache->add_region && cache->delete_region); + +- cache->mr_tree = rbtNew(cache->merge_regions ? +- util_mr_find_overlap : +- util_mr_find_within); +- if (!cache->mr_tree) +- return -FI_ENOMEM; ++ ret = ofi_mr_cache_init_storage(cache); ++ if (ret) ++ return ret; + + cache->domain = domain; + ofi_atomic_inc32(&domain->ref); +@@ -323,5 +397,17 @@ int ofi_mr_cache_init(struct util_domain *domain, struct ofi_mem_monitor *monito + cache->hit_cnt = 0; + ofi_monitor_add_queue(monitor, &cache->nq); + ++ ret = util_buf_pool_create(&cache->entry_pool, ++ sizeof(struct ofi_mr_entry) + ++ cache->entry_data_size, ++ 16, 0, cache->max_cached_cnt); ++ if (ret) ++ goto err; ++ + return 0; ++err: ++ ofi_atomic_dec32(&cache->domain->ref); ++ ofi_monitor_del_queue(&cache->nq); ++ cache->mr_storage.destroy(&cache->mr_storage); ++ return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ns.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ns.c +index f788074..eb4edd8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ns.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ns.c +@@ -168,8 +168,10 @@ static int util_ns_process_cmd(struct util_ns *ns, struct util_ns_cmd *cmd, + case OFI_UTIL_NS_DEL: + io_len = ns->name_len + ns->service_len; + io_buf = calloc(io_len, 1); +- if (!io_buf) +- return -FI_ENOMEM; ++ if (!io_buf) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } + + ret = ofi_recvall_socket(sock, io_buf, io_len); + if (!ret) { +@@ -185,8 +187,10 @@ static int util_ns_process_cmd(struct util_ns *ns, struct util_ns_cmd *cmd, + case OFI_UTIL_NS_QUERY: + io_len = ns->service_len; + io_buf = calloc(cmd_len + ns->service_len + ns->name_len, 1); +- if (!io_buf) +- return -FI_ENOMEM; ++ if (!io_buf) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } + + memcpy(io_buf, cmd, cmd_len); + cmd = io_buf; +@@ -212,10 +216,15 @@ static int util_ns_process_cmd(struct util_ns *ns, struct util_ns_cmd *cmd, + + default: + assert(0); +- return -FI_ENODATA; ++ ret = -FI_ENODATA; ++ goto out; + } + + free(io_buf); ++ ++out: ++ FI_INFO(&core_prov, FI_LOG_CORE, ++ "Name server processed command - returned %d (%s)\n", ret, fi_strerror(-ret)); + return ret; + } + +@@ -356,8 +365,11 @@ int ofi_ns_add_local_name(struct util_ns *ns, void *service, void *name) + .op = OFI_UTIL_NS_ADD, + }; + +- if (!ns->is_initialized) ++ if (!ns->is_initialized) { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Cannot add local name - name server uninitialized\n"); + return -FI_EINVAL; ++ } + + write_buf = calloc(cmd_len + ns->service_len + ns->name_len, 1); + if (!write_buf) { +@@ -539,6 +551,7 @@ err3: + err2: + rbtDelete(ns->map); + err1: ++ FI_WARN(&core_prov, FI_LOG_CORE, "Error starting name server\n"); + ofi_atomic_dec32(&ns->ref); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_shm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_shm.c +index 75882ad..161277c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_shm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_shm.c +@@ -64,7 +64,7 @@ int smr_create(const struct fi_provider *prov, struct smr_map *map, + inject_pool_offset = resp_queue_offset + sizeof(struct smr_resp_queue) + + sizeof(struct smr_resp) * attr->tx_count; + peer_addr_offset = inject_pool_offset + sizeof(struct smr_inject_pool) + +- sizeof(struct smr_inject_buf) * attr->rx_count; ++ sizeof(struct smr_inject_pool_entry) * attr->rx_count; + name_offset = peer_addr_offset + sizeof(struct smr_addr) * SMR_MAX_PEERS; + total_size = name_offset + strlen(attr->name) + 1; + total_size = roundup_power_of_two(total_size); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_wait.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_wait.c +index 7497e40..088dc16 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_wait.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_wait.c +@@ -181,8 +181,8 @@ out: + return ret; + } + +-int ofi_wait_fd_add(struct util_wait *wait, int fd, ofi_wait_fd_try_func try, +- void *arg, void *context) ++int ofi_wait_fd_add(struct util_wait *wait, int fd, uint32_t events, ++ ofi_wait_fd_try_func try, void *arg, void *context) + { + struct ofi_wait_fd_entry *fd_entry; + struct dlist_entry *entry; +@@ -201,7 +201,7 @@ int ofi_wait_fd_add(struct util_wait *wait, int fd, ofi_wait_fd_try_func try, + goto out; + } + +- ret = fi_epoll_add(wait_fd->epoll_fd, fd, context); ++ ret = fi_epoll_add(wait_fd->epoll_fd, fd, events, context); + if (ret) { + FI_WARN(wait->prov, FI_LOG_FABRIC, "Unable to add fd to epoll\n"); + goto out; +@@ -311,6 +311,7 @@ static int util_wait_fd_control(struct fid *fid, int command, void *arg) + static int util_wait_fd_close(struct fid *fid) + { + struct util_wait_fd *wait; ++ struct ofi_wait_fd_entry *fd_entry; + int ret; + + wait = container_of(fid, struct util_wait_fd, util_wait.wait_fid.fid); +@@ -318,12 +319,19 @@ static int util_wait_fd_close(struct fid *fid) + if (ret) + return ret; + +- assert(dlist_empty(&wait->fd_list)); +- fastlock_destroy(&wait->lock); ++ fastlock_acquire(&wait->lock); ++ while (!dlist_empty(&wait->fd_list)) { ++ dlist_pop_front(&wait->fd_list, struct ofi_wait_fd_entry, ++ fd_entry, entry); ++ fi_epoll_del(wait->epoll_fd, fd_entry->fd); ++ free(fd_entry); ++ } ++ fastlock_release(&wait->lock); + + fi_epoll_del(wait->epoll_fd, wait->signal.fd[FI_READ_FD]); + fd_signal_free(&wait->signal); + fi_epoll_close(wait->epoll_fd); ++ fastlock_destroy(&wait->lock); + free(wait); + return 0; + } +@@ -393,7 +401,7 @@ int ofi_wait_fd_open(struct fid_fabric *fabric_fid, struct fi_wait_attr *attr, + goto err3; + + ret = fi_epoll_add(wait->epoll_fd, wait->signal.fd[FI_READ_FD], +- &wait->util_wait.wait_fid.fid); ++ FI_EPOLL_IN, &wait->util_wait.wait_fid.fid); + if (ret) + goto err4; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/Makefile.include +index bdef9bb..e133d12 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/Makefile.include +@@ -3,33 +3,19 @@ _verbs_files = \ + prov/verbs/src/fi_verbs.h \ + prov/verbs/src/fi_verbs.c \ + prov/verbs/src/verbs_cm.c \ ++ prov/verbs/src/verbs_cm_xrc.c \ + prov/verbs/src/verbs_cq.c \ +- prov/verbs/src/verbs_srq.c \ + prov/verbs/src/verbs_domain.c \ ++ prov/verbs/src/verbs_domain_xrc.c \ + prov/verbs/src/verbs_mr.c \ + prov/verbs/src/verbs_eq.c \ + prov/verbs/src/verbs_info.c \ +- prov/verbs/src/verbs_msg_ep.c \ +- prov/verbs/src/ep_rdm/verbs_av_ep_rdm.c \ +- prov/verbs/src/ep_rdm/verbs_cq_ep_rdm.c \ +- prov/verbs/src/ep_rdm/verbs_ep_rdm.c \ +- prov/verbs/src/ep_rdm/verbs_queuing.h \ +- prov/verbs/src/ep_rdm/verbs_rdm_cm.c \ +- prov/verbs/src/ep_rdm/verbs_rdm_cntr.c \ +- prov/verbs/src/ep_rdm/verbs_rdm_msg.c \ +- prov/verbs/src/ep_rdm/verbs_rdm_rma.c \ +- prov/verbs/src/ep_rdm/verbs_rdm.h \ +- prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.h \ +- prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.c \ +- prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm.c \ +- prov/verbs/src/ep_rdm/verbs_utils.c \ +- prov/verbs/src/ep_rdm/verbs_utils.h \ +- prov/verbs/src/ep_dgram/verbs_dgram.h \ +- prov/verbs/src/ep_dgram/verbs_dgram_ep.c \ +- prov/verbs/src/ep_dgram/verbs_dgram_ep_msg.c \ +- prov/verbs/src/ep_dgram/verbs_dgram_cq.c \ +- prov/verbs/src/ep_dgram/verbs_dgram_cntr.c \ +- prov/verbs/src/ep_dgram/verbs_dgram_av.c ++ prov/verbs/src/verbs_ep.c \ ++ prov/verbs/src/verbs_msg.c \ ++ prov/verbs/src/verbs_rma.c \ ++ prov/verbs/src/verbs_dgram_ep_msg.c \ ++ prov/verbs/src/verbs_dgram_av.c \ ++ prov/verbs/src/ofi_verbs_priv.h + + if HAVE_VERBS_DL + pkglib_LTLIBRARIES += libverbs-fi.la +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/configure.m4 +index 326688d..2ae8f8f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/configure.m4 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/configure.m4 +@@ -65,6 +65,16 @@ AC_DEFUN([FI_VERBS_CONFIGURE],[ + [Experimental verbs features support])], + []) + ++ #See if we have XRC support ++ VERBS_HAVE_XRC=0 ++ AS_IF([test $verbs_ibverbs_happy -eq 1],[ ++ AC_CHECK_DECL([IBV_QPT_XRC_SEND], ++ [VERBS_HAVE_XRC=1],[], ++ [#include ]) ++ ]) ++ AC_DEFINE_UNQUOTED([VERBS_HAVE_XRC],[$VERBS_HAVE_XRC], ++ [Whether infiniband/verbs.h has XRC support or not]) ++ + # Technically, verbs_ibverbs_CPPFLAGS and + # verbs_rdmacm_CPPFLAGS could be different, but it is highly + # unlikely that they ever will be. So only list +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram.h +deleted file mode 100644 +index 007fcd5..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram.h ++++ /dev/null +@@ -1,280 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _OFI_VERBS_DGRAM_H_ +-#define _OFI_VERBS_DGRAM_H_ +- +-#if HAVE_CONFIG_H +-# include +-#endif /* HAVE_CONFIG_H */ +- +-#include "../fi_verbs.h" +-#include +- +-#ifdef __cplusplus +-extern "C" { +-#endif /* __cplusplus */ +- +-/* Verbs-DGRAM Pool functionality */ +-struct fi_ibv_dgram_buf_pool; +- +-typedef void(*fi_ibv_dgram_pool_entry_cancel_hndlr) (struct fi_ibv_dgram_buf_pool *); +- +-struct fi_ibv_dgram_buf_pool { +- struct util_buf_pool *pool; +- struct dlist_entry buf_list; +- +- fi_ibv_dgram_pool_entry_cancel_hndlr cancel_hndlr; +-}; +- +-typedef int(*handle_wr_cb)(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +- +-struct fi_ibv_dgram_wr_entry_hdr { +- struct dlist_entry entry; +- void *desc; +- struct fi_ibv_dgram_ep *ep; +- int32_t comp_unsignaled_cnt; +- void *context; +- uint64_t flags; +- handle_wr_cb suc_cb; +- handle_wr_cb err_cb; +-}; +- +-struct fi_ibv_dgram_pool_attr { +- size_t count; +- size_t size; +- void *pool_ctx; +- +- fi_ibv_dgram_pool_entry_cancel_hndlr cancel_hndlr; +- +- util_buf_region_alloc_hndlr alloc_hndlr; +- util_buf_region_free_hndlr free_hndlr; +-}; +- +-/* +- * The Global Routing Header (GRH) of the incoming message +- * will be placed in the first 40 bytes of the buffer(s) +- * in the scatter list. +- * @note If no GRH is present in the incoming message, +- * then the first bytes will be undefined. +- * This means that in all cases, the actual data of the +- * incoming message will start at an offset of 40 bytes +- * into the buffer(s) in the scatter list. +- */ +- +-struct fi_ibv_dgram_wr_entry { +- struct fi_ibv_dgram_wr_entry_hdr hdr; +- char grh_buf[]; +-}; +- +-#define VERBS_DGRAM_GRH_LENGTH 40 +-#define VERBS_DGRAM_WR_ENTRY_SIZE \ +- (sizeof(struct fi_ibv_dgram_wr_entry) + VERBS_DGRAM_GRH_LENGTH) +- +-static inline struct fi_ibv_dgram_wr_entry_hdr* +-fi_ibv_dgram_wr_entry_get(struct fi_ibv_dgram_buf_pool *pool) +-{ +- struct fi_ibv_dgram_wr_entry_hdr *buf; +- void *mr = NULL; +- +- buf = util_buf_alloc_ex(pool->pool, &mr); +- if (OFI_UNLIKELY(!buf)) +- return NULL; +- buf->desc = fi_mr_desc((struct fid_mr *)mr); +- dlist_insert_tail(&buf->entry, &pool->buf_list); +- +- return buf; +-} +- +-static inline void +-fi_ibv_dgram_wr_entry_release(struct fi_ibv_dgram_buf_pool *pool, +- struct fi_ibv_dgram_wr_entry_hdr *buf) +-{ +- dlist_remove(&buf->entry); +- util_buf_release(pool->pool, buf); +-} +- +-static inline void +-fi_ibv_dgram_mr_buf_close(void *pool_ctx, void *context) +-{ +- /* We would get a (fid_mr *) in context, but +- * it is safe to cast it into (fid *) */ +- fi_close((struct fid *)context); +-} +- +-static inline int +-fi_ibv_dgram_mr_buf_reg(void *pool_ctx, void *addr, +- size_t len, void **context) +-{ +- int ret; +- struct fid_mr *mr; +- struct fid_domain *domain = (struct fid_domain *)pool_ctx; +- +- ret = fi_mr_reg(domain, addr, len, FI_SEND | FI_RECV, +- 0, 0, 0, &mr, NULL); +- *context = mr; +- return ret; +-} +- +-static inline void +-fi_ibv_dgram_pool_wr_entry_cancel(struct fi_ibv_dgram_buf_pool *pool) +-{ +- struct dlist_entry *entry; +- struct fi_ibv_dgram_wr_entry_hdr *buf; +- entry = pool->buf_list.next; +- buf = container_of(entry, struct fi_ibv_dgram_wr_entry_hdr, +- entry); +- fi_ibv_dgram_wr_entry_release(pool, buf); +-} +- +-static inline void +-fi_ibv_dgram_pool_destroy(struct fi_ibv_dgram_buf_pool *pool) +-{ +- if (pool->cancel_hndlr) { +- while (!dlist_empty(&pool->buf_list)) +- pool->cancel_hndlr(pool); +- } +- +- util_buf_pool_destroy(pool->pool); +-} +- +-static inline int +-fi_ibv_dgram_pool_create(struct fi_ibv_dgram_pool_attr *attr, +- struct fi_ibv_dgram_buf_pool *pool) +-{ +- int ret = util_buf_pool_create_ex(&pool->pool, attr->size, +- 16, 0, attr->count, +- attr->alloc_hndlr, +- attr->free_hndlr, +- attr->pool_ctx); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_DATA, +- "Unable to create buf pool\n"); +- return ret; +- } +- pool->cancel_hndlr = attr->cancel_hndlr; +- dlist_init(&pool->buf_list); +- +- return FI_SUCCESS; +-} +-/* ~Verbs UD Pool functionality */ +- +-struct fi_ibv_dgram_cq { +- struct util_cq util_cq; +- struct ibv_cq *ibv_cq; +-}; +- +-struct fi_ibv_dgram_av { +- struct util_av util_av; +-}; +- +-struct fi_ibv_dgram_eq { +- struct util_eq util_eq; +-}; +- +-struct fi_ibv_dgram_cntr { +- struct util_cntr util_cntr; +-}; +- +-struct fi_ibv_dgram_av_entry { +- struct ofi_ib_ud_ep_name *addr; +- struct ibv_ah *ah; +-}; +- +-struct fi_ibv_dgram_ep { +- struct util_ep util_ep; +- struct ibv_qp *ibv_qp; +- struct fi_info *info; +- struct fi_ibv_dgram_av *av; +- struct fi_ibv_domain *domain; +- struct fi_ibv_dgram_buf_pool grh_pool; +- struct ofi_ib_ud_ep_name ep_name; +- int service; +- int ep_flags; +- int32_t max_unsignaled_send_cnt; +- ofi_atomic32_t unsignaled_send_cnt; +-}; +- +-extern struct fi_ops_msg fi_ibv_dgram_msg_ops; +- +-static inline struct fi_ibv_dgram_av_entry* +-fi_ibv_dgram_av_lookup_av_entry(struct fi_ibv_dgram_av *av, int index) +-{ +- assert((index >= 0) && ((size_t)index < av->util_av.count)); +- return ofi_av_get_addr(&av->util_av, index); +-} +- +-static inline +-int fi_ibv_dgram_is_completion(uint64_t cq_flags, uint64_t op_flags) +-{ +- if ((op_flags & FI_COMPLETION) || +- (op_flags & (FI_INJECT_COMPLETE | +- FI_TRANSMIT_COMPLETE | +- FI_DELIVERY_COMPLETE))) +- return 1; +- else if (op_flags & FI_INJECT) +- return 0; +- else if (!(cq_flags & FI_SELECTIVE_COMPLETION)) +- return 1; +- return 0; +-} +- +-int fi_ibv_dgram_rx_cq_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_tx_cq_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_tx_cq_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_rx_cq_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_tx_cq_no_action(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_rx_cq_no_action(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +- +-void fi_ibv_dgram_recv_cq_progress(struct util_ep *util_ep); +-void fi_ibv_dgram_send_cq_progress(struct util_ep *util_ep); +-void fi_ibv_dgram_send_recv_cq_progress(struct util_ep *util_ep); +- +-#ifdef __cplusplus +-} +-#endif /* __cplusplus */ +- +-#endif /* _OFI_VERBS_UD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_av.c +deleted file mode 100644 +index 30c0bec..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_av.c ++++ /dev/null +@@ -1,344 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-const size_t fi_ibv_dgram_av_entry_size = sizeof(struct fi_ibv_dgram_av_entry); +- +-/* TODO: find more deterministic hash function */ +-static inline int +-fi_ibv_dgram_av_slot(struct util_av *av, const struct ofi_ib_ud_ep_name *ep_name) +-{ +- return (ep_name->gid.global.subnet_prefix + ep_name->lid + ep_name->qpn) +- % av->hash.slots; +-} +- +-static inline int fi_ibv_dgram_av_is_addr_valid(struct fi_ibv_dgram_av *av, +- const void *addr) +-{ +- const struct ofi_ib_ud_ep_name *check_name = addr; +- return (check_name->lid > 0); +-} +- +-static inline +-int fi_ibv_dgram_verify_av_insert(struct util_av *av, uint64_t flags) +-{ +- if ((av->flags & FI_EVENT) && !av->eq) { +- VERBS_WARN(FI_LOG_AV, "No EQ bound to AV\n"); +- return -FI_ENOEQ; +- } +- +- if (flags & ~(FI_MORE)) { +- VERBS_WARN(FI_LOG_AV, "Unsupported flags\n"); +- return -FI_ENOEQ; +- } +- +- return FI_SUCCESS; +-} +- +-static int fi_ibv_dgram_av_insert_addr(struct fi_ibv_dgram_av *av, +- const void *addr, +- fi_addr_t *fi_addr, +- void *context) +-{ +- int ret, index = -1; +- struct fi_ibv_domain *domain; +- struct ofi_ib_ud_ep_name *ep_name; +- struct ibv_ah *ah; +- +- domain = container_of(&av->util_av.domain->domain_fid, +- struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) { +- ret = -FI_EINVAL; +- goto fn1; +- } +- +- if (fi_ibv_dgram_av_is_addr_valid(av, addr)) { +- struct fi_ibv_dgram_av_entry av_entry; +- struct ibv_ah_attr ah_attr = { +- .is_global = 0, +- .dlid = ((struct ofi_ib_ud_ep_name *)addr)->lid, +- .sl = ((struct ofi_ib_ud_ep_name *)addr)->sl, +- .src_path_bits = 0, +- .port_num = 1, +- }; +- ep_name = calloc(1, sizeof(*ep_name)); +- if (OFI_UNLIKELY(!ep_name)) { +- ret = -FI_ENOMEM; +- goto fn1; +- } +- memcpy(ep_name, addr, sizeof(*ep_name)); +- if (ep_name->gid.global.interface_id) { +- ah_attr.is_global = 1; +- ah_attr.grh.hop_limit = 64; +- ah_attr.grh.dgid = ep_name->gid; +- ah_attr.grh.sgid_index = 0; +- } +- ah = ibv_create_ah(domain->pd, &ah_attr); +- if (!ah) { +- ret = -errno; +- VERBS_WARN(FI_LOG_AV, "Unable to create " +- "Address Handle, errno - %d\n", errno); +- goto fn2; +- } +- +- av_entry.ah = ah; +- av_entry.addr = ep_name; +- +- ret = ofi_av_insert_addr(&av->util_av, &av_entry, +- fi_ibv_dgram_av_slot(&av->util_av, ep_name), +- &index); +- if (ret) +- goto fn3; +- if (fi_addr) +- *fi_addr = index; +- } else { +- ret = -FI_EADDRNOTAVAIL; +- VERBS_WARN(FI_LOG_AV, "Invalid address\n"); +- goto fn1; +- } +- +- return ret; +-fn3: +- ibv_destroy_ah(ah); +-fn2: +- free(ep_name); +-fn1: +- if (fi_addr) +- *fi_addr = FI_ADDR_NOTAVAIL; +- return ret; +-} +- +-static int fi_ibv_dgram_av_insert(struct fid_av *av_fid, const void *addr, +- size_t count, fi_addr_t *fi_addr, +- uint64_t flags, void *context) +-{ +- struct fi_ibv_dgram_av *av; +- int ret, success_cnt = 0; +- size_t i; +- +- assert(av_fid->fid.fclass == FI_CLASS_AV); +- if (av_fid->fid.fclass != FI_CLASS_AV) +- return -FI_EINVAL; +- +- av = container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); +- if (!av) +- return -FI_EINVAL; +- ret = fi_ibv_dgram_verify_av_insert(&av->util_av, flags); +- if (ret) +- return ret; +- +- VERBS_DBG(FI_LOG_AV, "Inserting %"PRIu64" addresses\n", count); +- for (i = 0; i < count; i++) { +- ret = fi_ibv_dgram_av_insert_addr( +- av, (struct ofi_ib_ud_ep_name *)addr + i, +- fi_addr ? &fi_addr[i] : NULL, context); +- if (!ret) +- success_cnt++; +- else if (av->util_av.eq) +- ofi_av_write_event(&av->util_av, i, -ret, context); +- } +- +- VERBS_DBG(FI_LOG_AV, "%"PRIu64" addresses successful\n", count); +- if (av->util_av.eq) { +- ofi_av_write_event(&av->util_av, success_cnt, 0, context); +- ret = 0; +- } else { +- ret = success_cnt; +- } +- return ret; +-} +- +-static int fi_ibv_dgram_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, +- size_t count, uint64_t flags) +-{ +- struct fi_ibv_dgram_av *av; +- int ret, slot, i, index; +- +- assert(av_fid->fid.fclass == FI_CLASS_AV); +- if (av_fid->fid.fclass != FI_CLASS_AV) +- return -FI_EINVAL; +- +- av = container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); +- if (!av) +- return -FI_EINVAL; +- ret = fi_ibv_dgram_verify_av_insert(&av->util_av, flags); +- if (ret) +- return ret; +- +- for (i = count - 1; i >= 0; i--) { +- struct fi_ibv_dgram_av_entry *av_entry; +- struct ofi_ib_ud_ep_name *ep_name; +- +- index = (int)fi_addr[i]; +- av_entry = ofi_av_get_addr(&av->util_av, index); +- if (!av_entry) { +- VERBS_WARN(FI_LOG_AV, "Unable to find address\n"); +- return -FI_ENOENT; +- } +- ret = ibv_destroy_ah(av_entry->ah); +- if (ret) +- VERBS_WARN(FI_LOG_AV, +- "AH Destroying of fi_addr %d failed " +- "with status - %d\n", index, ret); +- ep_name = av_entry->addr; +- slot = fi_ibv_dgram_av_slot(&av->util_av, av_entry->addr); +- fastlock_acquire(&av->util_av.lock); +- ret = ofi_av_remove_addr(&av->util_av, slot, index); +- fastlock_release(&av->util_av.lock); +- if (ret) +- VERBS_WARN(FI_LOG_AV, +- "Removal of fi_addr %d failed\n", +- index); +- free(ep_name); +- } +- return FI_SUCCESS; +-} +- +-static inline +-int fi_ibv_dgram_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, +- void *addr, size_t *addrlen) +-{ +- struct fi_ibv_dgram_av *av; +- struct fi_ibv_dgram_av_entry *av_entry; +- +- assert(av_fid->fid.fclass == FI_CLASS_AV); +- if (av_fid->fid.fclass != FI_CLASS_AV) +- return -FI_EINVAL; +- +- av = container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); +- if (!av) +- return -FI_EINVAL; +- +- av_entry = fi_ibv_dgram_av_lookup_av_entry(av, (int)fi_addr); +- if (!av_entry) +- return -FI_ENOENT; +- +- memcpy(addr, av_entry->addr, MIN(*addrlen, av->util_av.addrlen)); +- *addrlen = av->util_av.addrlen; +- return FI_SUCCESS; +-} +- +-static inline +-const char *fi_ibv_dgram_av_straddr(struct fid_av *av, const void *addr, +- char *buf, size_t *len) +-{ +- return ofi_straddr(buf, len, FI_ADDR_IB_UD, addr); +-} +- +-static int fi_ibv_dgram_av_close(struct fid *av_fid) +-{ +- int ret; +- struct fi_ibv_dgram_av *av; +- +- assert(av_fid->fclass == FI_CLASS_AV); +- if (av_fid->fclass != FI_CLASS_AV) +- return -FI_EINVAL; +- +- av = container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid.fid); +- if (!av) +- return -FI_EINVAL; +- +- ret = ofi_av_close(&av->util_av); +- if (ret) +- return ret; +- +- free(av); +- +- return FI_SUCCESS; +-} +- +-static struct fi_ops fi_ibv_dgram_fi_ops = { +- .size = sizeof(fi_ibv_dgram_fi_ops), +- .close = fi_ibv_dgram_av_close, +- .bind = ofi_av_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static struct fi_ops_av fi_ibv_dgram_av_ops = { +- .size = sizeof(fi_ibv_dgram_av_ops), +- .insert = fi_ibv_dgram_av_insert, +- .insertsvc = fi_no_av_insertsvc, +- .insertsym = fi_no_av_insertsym, +- .remove = fi_ibv_dgram_av_remove, +- .lookup = fi_ibv_dgram_av_lookup, +- .straddr = fi_ibv_dgram_av_straddr, +-}; +- +-int fi_ibv_dgram_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av_fid, void *context) +-{ +- struct fi_ibv_domain *domain; +- struct fi_ibv_dgram_av *av; +- int ret; +- +- if (!attr || domain_fid->fid.fclass != FI_CLASS_DOMAIN) +- return -FI_EINVAL; +- +- av = calloc(1, sizeof(*av)); +- if (!av) +- return -FI_ENOMEM; +- +- domain = container_of(domain_fid, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) { +- ret = -FI_EINVAL; +- goto err1; +- } +- +- assert(domain->ep_type == FI_EP_DGRAM); +- +- struct util_av_attr util_attr = { +- .overhead = attr->count >> 1, +- .flags = OFI_AV_HASH, +- .addrlen = sizeof(struct fi_ibv_dgram_av_entry), +- }; +- +- if (attr->type == FI_AV_UNSPEC) +- attr->type = FI_AV_MAP; +- +- ret = ofi_av_init(&domain->util_domain, attr, &util_attr, +- &av->util_av, context); +- if (ret) +- goto err1; +- +- *av_fid = &av->util_av.av_fid; +- (*av_fid)->fid.ops = &fi_ibv_dgram_fi_ops; +- (*av_fid)->ops = &fi_ibv_dgram_av_ops; +- +- return FI_SUCCESS; +-err1: +- free(av); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cntr.c +deleted file mode 100644 +index 5ec0efc..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cntr.c ++++ /dev/null +@@ -1,68 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-int fi_ibv_dgram_cntr_open(struct fid_domain *domain_fid, +- struct fi_cntr_attr *attr, +- struct fid_cntr **cntr_fid, +- void *context) +-{ +- int ret; +- struct fi_ibv_dgram_cntr *cntr; +- struct fi_ibv_domain *domain; +- +- cntr = calloc(1, sizeof(*cntr)); +- if (!cntr) +- return -FI_ENOMEM; +- +- domain = container_of(domain_fid, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) { +- ret = -FI_EINVAL; +- goto free; +- } +- +- assert(domain->ep_type == FI_EP_DGRAM); +- +- ret = ofi_cntr_init(&fi_ibv_prov, domain_fid, attr, &cntr->util_cntr, +- &ofi_cntr_progress, context); +- if (ret) +- goto free; +- +- *cntr_fid = &cntr->util_cntr.cntr_fid; +- return FI_SUCCESS; +- +-free: +- free(cntr); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cq.c +deleted file mode 100644 +index f340268..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cq.c ++++ /dev/null +@@ -1,385 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-static inline +-int fi_ibv_dgram_cq_cntr_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_cq_tagged_entry *comp; +- int ret = FI_SUCCESS; +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- if (util_cntr) +- util_cntr->cntr_fid.ops->add(&util_cntr->cntr_fid, 1); +- +- fastlock_acquire(&util_cq->cq_lock); +- if (OFI_UNLIKELY(ofi_cirque_isfull(util_cq->cirq))) { +- VERBS_DBG(FI_LOG_CQ, "util_cq cirq is full!\n"); +- ret = -FI_EAGAIN; +- goto out; +- } +- +- comp = ofi_cirque_tail(util_cq->cirq); +- comp->op_context = wr_entry->hdr.context; +- comp->flags = wr_entry->hdr.flags; +- comp->len = (uint64_t)wc->byte_len; +- comp->buf = NULL; +- if (wc->wc_flags & IBV_WC_WITH_IMM) +- comp->data = ntohl(wc->imm_data); +- ofi_cirque_commit(util_cq->cirq); +- fi_ibv_dgram_wr_entry_release( +- &wr_entry->hdr.ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +-out: +- fastlock_release(&util_cq->cq_lock); +- return ret; +-} +- +-static inline +-int fi_ibv_dgram_cq_cntr_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_cq_err_entry err_entry = { +- .err = EIO, +- .prov_errno = wc->status, +- .err_data_size = sizeof(wc->vendor_err), +- .err_data = (void *)&wc->vendor_err, +- }; +- struct fi_cq_tagged_entry *comp; +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- struct util_cq_err_entry *err = calloc(1, sizeof(*err)); +- if (!err) { +- VERBS_WARN(FI_LOG_CQ, "Unable to allocate " +- "util_cq_err_entry\n"); +- goto out; +- } +- +- err_entry.op_context = wr_entry->hdr.context; +- err_entry.flags = wr_entry->hdr.flags; +- err->err_entry = err_entry; +- +- if (util_cntr) +- util_cntr->cntr_fid.ops->adderr(&util_cntr->cntr_fid, 1); +- +- fastlock_acquire(&util_cq->cq_lock); +- slist_insert_tail(&err->list_entry, &util_cq->err_list); +- +- /* Signal that there is err entry */ +- comp = ofi_cirque_tail(util_cq->cirq); +- comp->flags = UTIL_FLAG_ERROR; +- ofi_cirque_commit(util_cq->cirq); +- +- fastlock_release(&util_cq->cq_lock); +- +-out: +- fi_ibv_dgram_wr_entry_release( +- &wr_entry->hdr.ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- +- return FI_SUCCESS; +-} +- +-int fi_ibv_dgram_rx_cq_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- return fi_ibv_dgram_cq_cntr_comp(util_cq, util_cntr, wc); +-} +- +-int fi_ibv_dgram_tx_cq_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- ofi_atomic_sub32(&wr_entry->hdr.ep->unsignaled_send_cnt, +- wr_entry->hdr.ep->max_unsignaled_send_cnt); +- +- return fi_ibv_dgram_cq_cntr_comp(util_cq, util_cntr, wc); +-} +- +-int fi_ibv_dgram_tx_cq_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- ofi_atomic_sub32(&wr_entry->hdr.ep->unsignaled_send_cnt, +- wr_entry->hdr.ep->max_unsignaled_send_cnt); +- +- return fi_ibv_dgram_cq_cntr_report_error(util_cq, util_cntr, wc); +-} +- +-int fi_ibv_dgram_rx_cq_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- return fi_ibv_dgram_cq_cntr_report_error(util_cq, util_cntr, wc); +-} +- +-int fi_ibv_dgram_tx_cq_no_action(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- +- ofi_atomic_sub32(&wr_entry->hdr.ep->unsignaled_send_cnt, +- wr_entry->hdr.ep->max_unsignaled_send_cnt); +- +- fi_ibv_dgram_wr_entry_release( +- &wr_entry->hdr.ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- +- return FI_SUCCESS; +-} +- +-int fi_ibv_dgram_rx_cq_no_action(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- fi_ibv_dgram_wr_entry_release( +- &wr_entry->hdr.ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- +- return FI_SUCCESS; +-} +- +-static inline +-void fi_ibv_dgram_cq_handle_wc(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- if (OFI_LIKELY(wc->status == IBV_WC_SUCCESS)) +- wr_entry->hdr.suc_cb(util_cq, util_cntr, wc); +- else +- wr_entry->hdr.err_cb(util_cq, util_cntr, wc); +-} +- +-void fi_ibv_dgram_recv_cq_progress(struct util_ep *util_ep) +-{ +- struct fi_ibv_dgram_cq *cq; +- int num_ent, i; +- struct ibv_wc *wcs = alloca(fi_ibv_gl_data.cqread_bunch_size * +- sizeof(struct ibv_wc)); +- +- cq = container_of(&util_ep->rx_cq->cq_fid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- +- num_ent = ibv_poll_cq(cq->ibv_cq, +- fi_ibv_gl_data.cqread_bunch_size, +- wcs); +- for (i = 0; i < num_ent; i++) +- fi_ibv_dgram_cq_handle_wc(util_ep->rx_cq, +- util_ep->rx_cntr, +- &wcs[i]); +-} +- +-void fi_ibv_dgram_send_cq_progress(struct util_ep *util_ep) +-{ +- struct fi_ibv_dgram_cq *cq; +- int num_ent, i; +- struct ibv_wc *wcs = alloca(fi_ibv_gl_data.cqread_bunch_size * +- sizeof(struct ibv_wc)); +- +- cq = container_of(&util_ep->tx_cq->cq_fid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- +- num_ent = ibv_poll_cq(cq->ibv_cq, +- fi_ibv_gl_data.cqread_bunch_size, +- wcs); +- for (i = 0; i < num_ent; i++) +- fi_ibv_dgram_cq_handle_wc(util_ep->tx_cq, +- util_ep->tx_cntr, +- &wcs[i]); +-} +- +-void fi_ibv_dgram_send_recv_cq_progress(struct util_ep *util_ep) +-{ +- struct fi_ibv_dgram_cq *tx_cq, *rx_cq; +- int num_ent, i; +- struct ibv_wc *wcs = alloca(fi_ibv_gl_data.cqread_bunch_size * +- sizeof(struct ibv_wc)); +- +- tx_cq = container_of(&util_ep->tx_cq->cq_fid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- rx_cq = container_of(&util_ep->rx_cq->cq_fid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- +- /* Poll Transmit events */ +- num_ent = ibv_poll_cq(tx_cq->ibv_cq, +- fi_ibv_gl_data.cqread_bunch_size, +- wcs); +- for (i = 0; i < num_ent; i++) +- fi_ibv_dgram_cq_handle_wc(util_ep->tx_cq, +- util_ep->tx_cntr, +- &wcs[i]); +- +- /* Poll Receive events */ +- num_ent = ibv_poll_cq(rx_cq->ibv_cq, +- fi_ibv_gl_data.cqread_bunch_size, +- wcs); +- for (i = 0; i < num_ent; i++) +- fi_ibv_dgram_cq_handle_wc(util_ep->rx_cq, +- util_ep->rx_cntr, +- &wcs[i]); +-} +- +-static inline +-const char *fi_ibv_dgram_cq_strerror(struct fid_cq *cq_fid, int prov_errno, +- const void *err_data, char *buf, size_t len) +-{ +- if (buf && len) +- strncpy(buf, ibv_wc_status_str(prov_errno), len); +- return ibv_wc_status_str(prov_errno); +-} +- +-static int fi_ibv_dgram_cq_close(fid_t cq_fid) +-{ +- int ret = FI_SUCCESS; +- struct fi_ibv_dgram_cq *cq; +- struct fi_ibv_domain *domain; +- +- cq = container_of(cq_fid, struct fi_ibv_dgram_cq, util_cq.cq_fid.fid); +- if (!cq) +- return -FI_EINVAL; +- +- domain = container_of(cq->util_cq.domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) +- return -FI_EINVAL; +- +- ret = ofi_cq_cleanup(&cq->util_cq); +- if (ret) +- return ret; +- +- if (ibv_destroy_cq(cq->ibv_cq)) { +- VERBS_WARN(FI_LOG_CQ, +- "unable to destroy completion queue " +- "(errno %d)\n", errno); +- ret = -errno; +- } +- +- free(cq); +- +- return ret; +-} +- +-static struct fi_ops fi_ibv_dgram_fi_ops = { +- .size = sizeof(fi_ibv_dgram_fi_ops), +- .close = fi_ibv_dgram_cq_close, +- .bind = fi_no_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static struct fi_ops_cq fi_ibv_dgram_cq_ops = { +- .size = sizeof(fi_ibv_dgram_cq_ops), +- .read = ofi_cq_read, +- .readfrom = ofi_cq_readfrom, +- .readerr = ofi_cq_readerr, +- .sread = ofi_cq_sread, +- .sreadfrom = ofi_cq_sreadfrom, +- .signal = ofi_cq_signal, +- .strerror = fi_ibv_dgram_cq_strerror +-}; +- +-int fi_ibv_dgram_cq_open(struct fid_domain *domain_fid, struct fi_cq_attr *attr, +- struct fid_cq **cq_fid, void *context) +-{ +- struct fi_ibv_dgram_cq *cq; +- struct fi_ibv_domain *domain; +- int ret; +- size_t cq_size; +- +- cq = calloc(1, sizeof(*cq)); +- if (!cq) +- return -FI_ENOMEM; +- +- domain = container_of(domain_fid, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain || (domain->ep_type != FI_EP_DGRAM)) { +- ret = -FI_EINVAL; +- goto err1; +- } +- +- assert(domain->ep_type == FI_EP_DGRAM); +- +- ret = ofi_cq_init(&fi_ibv_prov, domain_fid, attr, +- &cq->util_cq, &ofi_cq_progress, +- context); +- if (ret) +- goto err1; +- +- cq_size = attr->size ? +- attr->size : MIN(VERBS_DEF_CQ_SIZE, +- domain->info->domain_attr->cq_cnt); +- +- cq->ibv_cq = ibv_create_cq(domain->verbs, cq_size, cq, +- NULL, attr->signaling_vector); +- if (!cq->ibv_cq) { +- VERBS_WARN(FI_LOG_CQ, +- "unable to create completion queue for " +- "transsmission (errno %d)\n", errno); +- ret = -errno; +- goto err2; +- } +- +- *cq_fid = &cq->util_cq.cq_fid; +- (*cq_fid)->fid.ops = &fi_ibv_dgram_fi_ops; +- (*cq_fid)->ops = &fi_ibv_dgram_cq_ops; +- +- return ret; +-err2: +- ofi_cq_cleanup(&cq->util_cq); +-err1: +- free(cq); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep.c +deleted file mode 100644 +index 6bffba5..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep.c ++++ /dev/null +@@ -1,476 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-static int fi_ibv_dgram_ep_enable(struct fid_ep *ep_fid) +-{ +- struct fi_ibv_dgram_ep *ep; +- struct fi_ibv_dgram_cq *tx_cq = NULL, *rx_cq = NULL; +- struct fi_ibv_fabric *fab; +- int ret = FI_SUCCESS; +- union ibv_gid gid; +- uint16_t p_key; +- +- assert(ep_fid->fid.fclass == FI_CLASS_EP); +- if (ep_fid->fid.fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid); +- if (!ep) +- return -FI_EINVAL; +- +- if (!ep->util_ep.rx_cq && !ep->util_ep.tx_cq) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a send or receive completion queue\n"); +- return -FI_ENOCQ; +- } +- +- if (!ep->util_ep.tx_cq && ofi_send_allowed(ep->util_ep.caps)) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a send completion queue when it has transmit " +- "capabilities enabled (FI_SEND or FI_TRANSMIT).\n"); +- return -FI_ENOCQ; +- } else if (ep->util_ep.tx_cq) { +- tx_cq = container_of(&ep->util_ep.tx_cq->cq_fid, +- struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- } +- +- if (!ep->util_ep.rx_cq && ofi_recv_allowed(ep->util_ep.caps)) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a receive completion queue when it has receive " +- "capabilities enabled. (FI_RECV)\n"); +- return -FI_ENOCQ; +- } else { +- rx_cq = container_of(&ep->util_ep.rx_cq->cq_fid, +- struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- } +- +- const struct fi_info *info = ep->info; +- struct ibv_qp_init_attr init_attr = { +- .send_cq = tx_cq ? tx_cq->ibv_cq : NULL, +- .recv_cq = rx_cq ? rx_cq->ibv_cq : NULL, +- .cap = { +- .max_send_wr = info->tx_attr->size, +- .max_recv_wr = info->rx_attr->size, +- .max_send_sge = info->tx_attr->iov_limit, +- .max_recv_sge = info->rx_attr->iov_limit, +- .max_inline_data = info->tx_attr->inject_size, +- }, +- .qp_type = IBV_QPT_UD, +- }; +- +- ep->ibv_qp = ibv_create_qp(ep->domain->pd, &init_attr); +- if (!ep->ibv_qp) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to create IBV " +- "Queue Pair\n"); +- return -errno; +- } +- +- struct ibv_qp_attr attr = { +- .qp_state = IBV_QPS_INIT, +- .pkey_index = 0, +- .port_num = 1, +- .qkey = 0x11111111, +- }; +- +- ret = ibv_modify_qp(ep->ibv_qp, &attr, +- IBV_QP_STATE | +- IBV_QP_PKEY_INDEX | +- IBV_QP_PORT | +- IBV_QP_QKEY); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " +- "to INIT\n"); +- return -errno; +- } +- +- memset(&attr, 0, sizeof(attr)); +- attr.qp_state = IBV_QPS_RTR; +- ret = ibv_modify_qp(ep->ibv_qp, &attr, +- IBV_QP_STATE); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " +- "to RTR\n"); +- return -errno; +- } +- +- if (tx_cq) { +- memset(&attr, 0, sizeof(attr)); +- attr.qp_state = IBV_QPS_RTS; +- attr.sq_psn = 0xffffff; +- ret = ibv_modify_qp(ep->ibv_qp, &attr, +- IBV_QP_STATE | +- IBV_QP_SQ_PSN); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " +- "to RTS\n"); +- return -errno; +- } +- } +- +- if (ibv_query_gid(ep->domain->verbs, 1, 0, &gid)) { +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Unable to query GID, errno = %d", +- errno); +- return -errno; +- } +- +- if (ibv_query_pkey(ep->domain->verbs, 1, 0, &p_key)) { +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Unable to query P_Key, errno = %d", +- errno); +- return -errno; +- } +- +- struct ibv_port_attr port_attr; +- if (ibv_query_port(ep->domain->verbs, 1, &port_attr)) { +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Unable to query port attributes, errno = %d", +- errno); +- return -errno; +- } +- +- ep->ep_name.lid = port_attr.lid; +- ep->ep_name.sl = port_attr.sm_sl; +- ep->ep_name.gid = gid; +- ep->ep_name.qpn = ep->ibv_qp->qp_num; +- ep->ep_name.pkey = p_key; +- +- fab = container_of(&ep->util_ep.domain->fabric->fabric_fid, +- struct fi_ibv_fabric, util_fabric.fabric_fid.fid); +- +- ofi_ns_add_local_name(&fab->name_server, +- &ep->service, &ep->ep_name); +- +- return ret; +-} +- +-static int fi_ibv_dgram_ep_control(fid_t ep_fid, int command, void *arg) +-{ +- struct fi_ibv_dgram_ep *ep; +- +- assert(ep_fid->fclass == FI_CLASS_EP); +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- switch (command) { +- case FI_ENABLE: +- return fi_ibv_dgram_ep_enable(&ep->util_ep.ep_fid); +- default: +- return -FI_ENOSYS; +- } +-} +- +-static int fi_ibv_dgram_ep_close(fid_t ep_fid) +-{ +- struct fi_ibv_dgram_ep *ep; +- struct fi_ibv_fabric *fab; +- int ret = FI_SUCCESS; +- +- assert(ep_fid->fclass == FI_CLASS_EP); +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- fab = container_of(&ep->util_ep.domain->fabric->fabric_fid, +- struct fi_ibv_fabric, util_fabric.fabric_fid.fid); +- +- ofi_ns_del_local_name(&fab->name_server, +- &ep->service, &ep->ep_name); +- +- fi_ibv_dgram_pool_destroy(&ep->grh_pool); +- +- ret = ofi_endpoint_close(&ep->util_ep); +- if (ret) +- return ret; +- +- ret = ibv_destroy_qp(ep->ibv_qp); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to destroy QP " +- "(errno = %d)\n", errno); +- ret = -errno; +- } +- +- free(ep); +- return ret; +-} +- +-static int fi_ibv_dgram_ep_bind(fid_t ep_fid, struct fid *bfid, uint64_t flags) +-{ +- int ret = FI_SUCCESS; +- struct fi_ibv_dgram_ep *ep; +- struct fi_ibv_dgram_cq *cq; +- struct fi_ibv_dgram_av *av; +- struct fi_ibv_dgram_eq *eq; +- struct fi_ibv_dgram_cntr *cntr; +- +- assert(ep_fid->fclass == FI_CLASS_EP); +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- ret = ofi_ep_bind_valid(&fi_ibv_prov, bfid, flags); +- if (ret) +- return ret; +- +- switch (bfid->fclass) { +- case FI_CLASS_CQ: +- cq = container_of(bfid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid.fid); +- if (!cq) +- return -FI_EINVAL; +- if (flags & (FI_RECV | FI_TRANSMIT)) +- ep->util_ep.progress = +- fi_ibv_dgram_send_recv_cq_progress; +- else if (flags & FI_RECV) +- ep->util_ep.progress = (ep->util_ep.tx_cq) ? +- fi_ibv_dgram_send_recv_cq_progress : +- fi_ibv_dgram_recv_cq_progress; +- else if (flags & FI_TRANSMIT) +- ep->util_ep.progress = (ep->util_ep.rx_cq) ? +- fi_ibv_dgram_send_recv_cq_progress : +- fi_ibv_dgram_send_cq_progress; +- return ofi_ep_bind_cq(&ep->util_ep, &cq->util_cq, flags); +- case FI_CLASS_EQ: +- eq = container_of(bfid, struct fi_ibv_dgram_eq, +- util_eq.eq_fid.fid); +- if (!eq) +- return -FI_EINVAL; +- return ofi_ep_bind_eq(&ep->util_ep, &eq->util_eq); +- break; +- case FI_CLASS_AV: +- av = container_of(bfid, struct fi_ibv_dgram_av, +- util_av.av_fid.fid); +- if (!av) +- return -FI_EINVAL; +- return ofi_ep_bind_av(&ep->util_ep, &av->util_av); +- case FI_CLASS_CNTR: +- cntr = container_of(bfid, struct fi_ibv_dgram_cntr, +- util_cntr.cntr_fid.fid); +- if (!cntr) +- return -FI_EINVAL; +- return ofi_ep_bind_cntr(&ep->util_ep, &cntr->util_cntr, flags); +- default: +- return -FI_EINVAL; +- } +- +- return ret; +-} +- +-static int fi_ibv_dgram_ep_setname(fid_t ep_fid, void *addr, size_t addrlen) +-{ +- struct fi_ibv_dgram_ep *ep; +- void *save_addr; +- int ret = FI_SUCCESS; +- +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- if (addrlen < ep->info->src_addrlen) { +- VERBS_INFO(FI_LOG_EP_CTRL, +- "addrlen expected: %"PRIu64", got: %"PRIu64"\n", +- ep->info->src_addrlen, addrlen); +- return -FI_ETOOSMALL; +- } +- /* +- * save previous address to be able make +- * a roll back on the previous one +- */ +- save_addr = ep->info->src_addr; +- +- ep->info->src_addr = calloc(1, ep->info->src_addrlen); +- if (!ep->info->src_addr) { +- ep->info->src_addr = save_addr; +- ret = -FI_ENOMEM; +- goto err; +- } +- +- memcpy(ep->info->src_addr, addr, ep->info->src_addrlen); +- memcpy(&ep->ep_name, addr, ep->info->src_addrlen); +- +-err: +- ep->info->src_addr = save_addr; +- return ret; +- +-} +- +-static int fi_ibv_dgram_ep_getname(fid_t ep_fid, void *addr, size_t *addrlen) +-{ +- struct fi_ibv_dgram_ep *ep; +- +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- if (*addrlen < sizeof(ep->ep_name)) { +- *addrlen = sizeof(ep->ep_name); +- VERBS_INFO(FI_LOG_EP_CTRL, +- "addrlen expected: %"PRIu64", got: %"PRIu64"\n", +- sizeof(ep->ep_name), *addrlen); +- return -FI_ETOOSMALL; +- } +- +- memset(addr, 0, *addrlen); +- memcpy(addr, &ep->ep_name, sizeof(ep->ep_name)); +- *addrlen = sizeof(ep->ep_name); +- +- return FI_SUCCESS; +-} +- +-static struct fi_ops fi_ibv_dgram_fi_ops = { +- .size = sizeof(fi_ibv_dgram_fi_ops), +- .close = fi_ibv_dgram_ep_close, +- .bind = fi_ibv_dgram_ep_bind, +- .control = fi_ibv_dgram_ep_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static struct fi_ops_cm fi_ibv_dgram_cm_ops = { +- .size = sizeof(fi_ibv_dgram_cm_ops), +- .setname = fi_ibv_dgram_ep_setname, +- .getname = fi_ibv_dgram_ep_getname, +- .getpeer = fi_no_getpeer, +- .connect = fi_no_connect, +- .listen = fi_no_listen, +- .accept = fi_no_accept, +- .reject = fi_no_reject, +- .shutdown = fi_no_shutdown, +- .join = fi_no_join, +-}; +- +-static struct fi_ops_ep fi_ibv_dgram_ep_ops = { +- .size = sizeof(fi_ibv_dgram_ep_ops), +- .cancel = fi_no_cancel, +- .getopt = fi_no_getopt, +- .setopt = fi_no_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-int fi_ibv_dgram_endpoint_open(struct fid_domain *domain_fid, +- struct fi_info *info, +- struct fid_ep **ep_fid, +- void *context) +-{ +- struct fi_ibv_dgram_ep *ep; +- int ret = FI_SUCCESS; +- +- assert(info && info->ep_attr && info->rx_attr && info->tx_attr); +- assert(domain_fid); +- assert(domain_fid->fid.fclass == FI_CLASS_DOMAIN); +- +- if (!info || !info->ep_attr || +- domain_fid->fid.fclass != FI_CLASS_DOMAIN) +- return -FI_EINVAL; +- +- ep = calloc(1, sizeof(*ep)); +- if (!ep) +- return -FI_ENOMEM; +- +- struct fi_ibv_dgram_pool_attr pool_attr = { +- .count = MIN(info->rx_attr->size, info->tx_attr->size), +- .size = VERBS_DGRAM_WR_ENTRY_SIZE, +- .pool_ctx = domain_fid, +- .cancel_hndlr = fi_ibv_dgram_pool_wr_entry_cancel, +- .alloc_hndlr = fi_ibv_dgram_mr_buf_reg, +- .free_hndlr = fi_ibv_dgram_mr_buf_close, +- }; +- +- ret = fi_ibv_dgram_pool_create(&pool_attr, &ep->grh_pool); +- if (ret) +- goto err1; +- +- /* Temporary solution */ +- struct fi_ibv_domain *domain; +- domain = container_of(domain_fid, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) { +- ret = -FI_EINVAL; +- goto err2; +- } +- +- ret = ofi_endpoint_init(domain_fid, &fi_ibv_util_prov, +- info, &ep->util_ep, context, NULL); +- if (ret) +- goto err2; +- +- ep->info = fi_dupinfo(info); +- if (!ep->info) { +- ret = -FI_ENOMEM; +- goto err3; +- } +- ep->domain = domain; +- ep->service = (info->src_addr) ? +- (((struct ofi_ib_ud_ep_name *)info->src_addr)->service) : +- (((getpid() & 0x7FFF) << 16) + ((uintptr_t)ep & 0xFFFF)); +- +- ofi_atomic_initialize32(&ep->unsignaled_send_cnt, 0); +- ep->max_unsignaled_send_cnt = ep->info->tx_attr->size / 2; +- +- *ep_fid = &ep->util_ep.ep_fid; +- (*ep_fid)->cm = &fi_ibv_dgram_cm_ops; +- (*ep_fid)->msg = &fi_ibv_dgram_msg_ops; +- (*ep_fid)->fid.ops = &fi_ibv_dgram_fi_ops; +- (*ep_fid)->ops = &fi_ibv_dgram_ep_ops; +- +- return ret; +-err3: +- ofi_endpoint_close(&ep->util_ep); +-err2: +- fi_ibv_dgram_pool_destroy(&ep->grh_pool); +-err1: +- free(ep); +- return ret; +-} +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep_msg.c +deleted file mode 100644 +index d35832a..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep_msg.c ++++ /dev/null +@@ -1,337 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-static inline +-void fi_ibv_dgram_recv_setup(struct fi_ibv_dgram_wr_entry *wr_entry, +- struct ibv_recv_wr *wr) +-{ +- struct fi_ibv_dgram_ep *ep = wr_entry->hdr.ep; +- +- if (fi_ibv_dgram_is_completion(ep->ep_flags, +- wr_entry->hdr.flags)) { +- wr_entry->hdr.suc_cb = fi_ibv_dgram_rx_cq_comp; +- wr_entry->hdr.err_cb = fi_ibv_dgram_rx_cq_report_error; +- } else { +- wr_entry->hdr.suc_cb = fi_ibv_dgram_rx_cq_no_action; +- wr_entry->hdr.err_cb = fi_ibv_dgram_rx_cq_no_action; +- +- fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- } +-} +- +-static inline ssize_t +-fi_ibv_dgram_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, +- uint64_t flags) +-{ +- struct fi_ibv_dgram_ep *ep; +- struct ibv_recv_wr wr = { 0 }; +- struct ibv_sge *sge; +- struct fi_ibv_dgram_wr_entry *wr_entry; +- ssize_t i; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, +- util_ep.ep_fid.fid); +- assert(ep && ep->util_ep.rx_cq); +- +- wr_entry = (struct fi_ibv_dgram_wr_entry *) +- fi_ibv_dgram_wr_entry_get(&ep->grh_pool); +- if (OFI_UNLIKELY(!wr_entry)) +- return -FI_ENOMEM; +- +- wr_entry->hdr.ep = ep; +- wr_entry->hdr.context = msg->context; +- +- wr.wr_id = (uintptr_t)wr_entry; +- wr.next = NULL; +- +- sge = alloca(sizeof(*sge) * msg->iov_count + 1); +- sge[0].addr = (uintptr_t)(wr_entry->grh_buf); +- sge[0].length = VERBS_DGRAM_GRH_LENGTH; +- sge[0].lkey = (uint32_t)(uintptr_t)(wr_entry->hdr.desc); +- for (i = 0; i < msg->iov_count; i++) { +- sge[i + 1].addr = (uintptr_t)(msg->msg_iov[i].iov_base); +- sge[i + 1].length = (uint32_t)(msg->msg_iov[i].iov_len); +- sge[i + 1].lkey = (uint32_t)(uintptr_t)(msg->desc[i]); +- } +- wr.sg_list = sge; +- wr.num_sge = msg->iov_count + 1; +- +- fi_ibv_dgram_recv_setup(wr_entry, &wr); +- +- return FI_IBV_INVOKE_POST( +- recv, recv, ep->ibv_qp, &wr, +- (fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *) +- wr_entry))); +-} +- +-static inline ssize_t +-fi_ibv_dgram_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) +-{ +- struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_dgram_recvmsg(ep_fid, &msg, 0); +-} +- +-static inline ssize_t +-fi_ibv_dgram_recv(struct fid_ep *ep_fid, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = buf, +- .iov_len = len, +- }; +- +- return fi_ibv_dgram_recvv(ep_fid, &iov, &desc, +- 1, src_addr, context); +-} +- +-static inline +-void fi_ibv_dgram_send_setup(struct fi_ibv_dgram_wr_entry *wr_entry, +- struct ibv_send_wr *wr, +- size_t total_len) +-{ +- struct fi_ibv_dgram_ep *ep = wr_entry->hdr.ep; +- int32_t unsignaled_cnt = ofi_atomic_inc32(&ep->unsignaled_send_cnt) + 1; +- +- if (fi_ibv_dgram_is_completion(ep->ep_flags, +- wr_entry->hdr.flags)) { +- wr->send_flags |= IBV_SEND_SIGNALED; +- wr_entry->hdr.suc_cb = fi_ibv_dgram_tx_cq_comp; +- wr_entry->hdr.err_cb = fi_ibv_dgram_tx_cq_report_error; +- wr_entry->hdr.comp_unsignaled_cnt = unsignaled_cnt; +- } else if (unsignaled_cnt == ep->max_unsignaled_send_cnt) { +- wr->send_flags |= IBV_SEND_SIGNALED; +- wr_entry->hdr.suc_cb = fi_ibv_dgram_tx_cq_no_action; +- wr_entry->hdr.err_cb = fi_ibv_dgram_tx_cq_no_action; +- wr_entry->hdr.comp_unsignaled_cnt = unsignaled_cnt; +- } else { +- /* No need other actions */ +- fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- } +- +- if ((wr_entry->hdr.flags & FI_INJECT) && +- (total_len <= ep->info->tx_attr->inject_size)) +- wr->send_flags |= IBV_SEND_INLINE; +-} +- +-static inline ssize_t +-fi_ibv_dgram_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, +- uint64_t flags) +-{ +- struct fi_ibv_dgram_ep *ep; +- struct ibv_send_wr wr = { 0 }; +- struct ibv_sge *sge; +- struct fi_ibv_dgram_wr_entry *wr_entry = NULL; +- struct fi_ibv_dgram_av_entry *av_entry; +- struct fi_ibv_dgram_av *av; +- size_t total_len = 0, i; +- +- assert(!(flags & FI_FENCE)); +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, +- util_ep.ep_fid.fid); +- assert(ep && ep->util_ep.tx_cq); +- +- wr_entry = (struct fi_ibv_dgram_wr_entry *) +- fi_ibv_dgram_wr_entry_get(&ep->grh_pool); +- if (OFI_UNLIKELY(!wr_entry)) +- return -FI_ENOMEM; +- +- wr_entry->hdr.ep = ep; +- wr_entry->hdr.context = msg->context; +- wr_entry->hdr.flags = flags; +- +- sge = alloca(sizeof(*sge) * msg->iov_count + 1); +- sge[0].addr = (uintptr_t)(wr_entry->grh_buf); +- sge[0].length = 0; +- sge[0].lkey = (uint32_t)(uintptr_t)(wr_entry->hdr.desc); +- if (msg->desc) { +- for (i = 0; i < msg->iov_count; i++) { +- sge[i + 1].addr = (uintptr_t)(msg->msg_iov[i].iov_base); +- sge[i + 1].length = (uint32_t)(msg->msg_iov[i].iov_len); +- sge[i + 1].lkey = (uint32_t)(uintptr_t)(msg->desc[i]); +- total_len += msg->msg_iov[i].iov_len; +- } +- } else { +- for (i = 0; i < msg->iov_count; i++) { +- sge[i + 1].addr = (uintptr_t)(msg->msg_iov[i].iov_base); +- sge[i + 1].length = (uint32_t)(msg->msg_iov[i].iov_len); +- sge[i + 1].lkey = 0; +- total_len += msg->msg_iov[i].iov_len; +- } +- } +- +- wr.wr_id = (uintptr_t)wr_entry; +- wr.next = NULL; +- wr.sg_list = sge; +- wr.num_sge = msg->iov_count + 1; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- wr.opcode = IBV_WR_SEND_WITH_IMM; +- wr.imm_data = htonl((uint32_t)msg->data); +- } else { +- wr.opcode = IBV_WR_SEND; +- } +- +- av = container_of(&ep->util_ep.av->av_fid, struct fi_ibv_dgram_av, +- util_av.av_fid); +- av_entry = fi_ibv_dgram_av_lookup_av_entry(av, (int)msg->addr); +- if (OFI_UNLIKELY(!av_entry)) { +- fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry); +- return -FI_ENOENT; +- } +- +- wr.wr.ud.ah = av_entry->ah; +- wr.wr.ud.remote_qpn = av_entry->addr->qpn; +- wr.wr.ud.remote_qkey = 0x11111111; +- +- fi_ibv_dgram_send_setup(wr_entry, &wr, total_len); +- +- return FI_IBV_INVOKE_POST( +- send, send, ep->ibv_qp, &wr, +- ((wr.send_flags & IBV_SEND_SIGNALED) ? +- fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *) +- wr_entry) : +- NULL)); +-} +- +-static inline ssize_t +-fi_ibv_dgram_sendv(struct fid_ep *ep_fid, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t dest_addr, +- void *context) +-{ +- struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = dest_addr, +- .context = context, +- }; +- +- return fi_ibv_dgram_sendmsg(ep_fid, &msg, 0); +-} +- +-static inline ssize_t +-fi_ibv_dgram_senddata(struct fid_ep *ep_fid, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len, +- }; +- +- struct fi_msg msg = { +- .msg_iov = &iov, +- .desc = &desc, +- .iov_count = 1, +- .addr = dest_addr, +- .context = context, +- .data = data, +- }; +- +- return fi_ibv_dgram_sendmsg(ep_fid, &msg, FI_REMOTE_CQ_DATA); +-} +- +-static inline ssize_t +-fi_ibv_dgram_send(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len, +- }; +- +- return fi_ibv_dgram_sendv(ep_fid, &iov, &desc, +- 1, dest_addr, context); +-} +- +-static inline ssize_t +-fi_ibv_dgram_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr) +-{ +- struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len, +- }; +- +- struct fi_msg msg = { +- .msg_iov = &iov, +- .iov_count = 1, +- .addr = dest_addr, +- .data = data, +- }; +- +- return fi_ibv_dgram_sendmsg(ep_fid, &msg, FI_INJECT | +- FI_REMOTE_CQ_DATA); +-} +- +-static inline ssize_t +-fi_ibv_dgram_inject(struct fid_ep *ep_fid, const void *buf, +- size_t len, fi_addr_t dest_addr) +-{ +- return fi_ibv_dgram_injectdata(ep_fid, buf, len, 0, dest_addr); +-} +- +-struct fi_ops_msg fi_ibv_dgram_msg_ops = { +- .size = sizeof(fi_ibv_dgram_msg_ops), +- .recv = fi_ibv_dgram_recv, +- .recvv = fi_ibv_dgram_recvv, +- .recvmsg = fi_ibv_dgram_recvmsg, +- .send = fi_ibv_dgram_send, +- .sendv = fi_ibv_dgram_sendv, +- .sendmsg = fi_ibv_dgram_sendmsg, +- .inject = fi_ibv_dgram_inject, +- .senddata = fi_ibv_dgram_senddata, +- .injectdata = fi_ibv_dgram_injectdata, +-}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_av_ep_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_av_ep_rdm.c +deleted file mode 100644 +index 8e1926a..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_av_ep_rdm.c ++++ /dev/null +@@ -1,701 +0,0 @@ +-/* +- * Copyright (c) 2013-2016 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +-#include +-#include +-#include +- +-#include "ofi.h" +- +-#include "verbs_rdm.h" +- +- +-extern struct fi_provider fi_ibv_prov; +- +-ssize_t +-fi_ibv_rdm_start_connection(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- struct rdma_cm_id *id = NULL; +- assert(ep->domain->rdm_cm->listener); +- +- if (conn->state != FI_VERBS_CONN_ALLOCATED) +- return FI_SUCCESS; +- +- if (ep->is_closing) { +- VERBS_INFO(FI_LOG_AV, +- "Attempt start connection with %s:%u when ep is closing\n", +- inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- return -FI_EOTHER; +- } +- +- conn->state = FI_VERBS_CONN_STARTED; +- fi_ibv_rdm_conn_init_cm_role(conn, ep); +- +- if (rdma_create_id(ep->domain->rdm_cm->ec, &id, conn, RDMA_PS_TCP)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_create_id\n", errno); +- return -errno; +- } +- +- if (conn->cm_role == FI_VERBS_CM_ACTIVE || +- conn->cm_role == FI_VERBS_CM_SELF) +- conn->id[0] = id; +- +- if (rdma_resolve_addr(id, NULL, (struct sockaddr *)&conn->addr, 30000)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_resolve_addr\n", errno); +- return -errno; +- } +- return FI_SUCCESS; +-} +- +-/* Must call with `rdm_cm::cm_lock` held */ +-ssize_t fi_ibv_rdm_start_overall_disconnection(struct fi_ibv_rdm_av_entry *av_entry) +-{ +- struct fi_ibv_rdm_conn *conn = NULL, *tmp = NULL; +- ssize_t ret = FI_SUCCESS; +- ssize_t err = FI_SUCCESS; +- +- HASH_ITER(hh, av_entry->conn_hash, conn, tmp) { +- ret = fi_ibv_rdm_start_disconnection(conn); +- if (ret) { +- VERBS_INFO(FI_LOG_AV, "Disconnection failed " +- "(%zd) for %p\n", ret, conn); +- err = ret; +- } +- /* +- * do NOT remove entry of connection from HASH. +- * We will refer to the connection during +- * cleanup of the connections. +- */ +- } +- +- return err; +-} +- +-ssize_t fi_ibv_rdm_start_disconnection(struct fi_ibv_rdm_conn *conn) +-{ +- ssize_t ret = FI_SUCCESS; +- +- VERBS_INFO(FI_LOG_AV, "Closing connection %p, state %d\n", +- conn, conn->state); +- +- if (conn->id[0]) { +- if (rdma_disconnect(conn->id[0])) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_disconnect\n", errno); +- ret = -errno; +- } +- } +- +- switch (conn->state) { +- case FI_VERBS_CONN_ESTABLISHED: +- conn->state = FI_VERBS_CONN_LOCAL_DISCONNECT; +- break; +- case FI_VERBS_CONN_REJECTED: +- conn->state = FI_VERBS_CONN_CLOSED; +- break; +- case FI_VERBS_CONN_ALLOCATED: +- case FI_VERBS_CONN_CLOSED: +- break; +- default: +- VERBS_WARN(FI_LOG_EP_CTRL, "Unknown connection state: %d\n", +- (int)conn->state); +- ret = -FI_EOTHER; +- } +- +- return ret; +-} +- +-static inline int fi_ibv_rdm_av_is_valid_address(struct sockaddr_in *addr) +-{ +- return addr->sin_family == AF_INET ? 1 : 0; +-} +- +-int fi_ibv_av_entry_alloc(struct fi_ibv_domain *domain, +- struct fi_ibv_rdm_av_entry **av_entry, +- void *addr) +-{ +- int ret = ofi_memalign((void**)av_entry, +- FI_IBV_MEM_ALIGNMENT, +- sizeof (**av_entry)); +- if (ret) +- return -ret; +- memset((*av_entry), 0, sizeof(**av_entry)); +- memcpy(&(*av_entry)->addr, addr, FI_IBV_RDM_DFLT_ADDRLEN); +- HASH_ADD(hh, domain->rdm_cm->av_hash, addr, +- FI_IBV_RDM_DFLT_ADDRLEN, (*av_entry)); +- (*av_entry)->sends_outgoing = 0; +- (*av_entry)->recv_preposted = 0; +- +- return ret; +-} +- +-static int fi_ibv_rdm_av_insert(struct fid_av *av_fid, const void *addr, +- size_t count, fi_addr_t * fi_addr, +- uint64_t flags, void *context) +-{ +- struct fi_ibv_av *av = container_of(av_fid, struct fi_ibv_av, av_fid); +- size_t i; +- int failed = 0; +- int ret = 0; +- int *fi_errors = context; +- +- if((av->flags & FI_EVENT) && !av->eq) +- return -FI_ENOEQ; +- +- if ((flags & FI_SYNC_ERR) && ((!context) || (flags & FI_EVENT))) +- return -FI_EINVAL; +- else if (flags & FI_SYNC_ERR) +- memset(context, 0, sizeof(int) * count); +- +- pthread_mutex_lock(&av->domain->rdm_cm->cm_lock); +- +- if (av->used + count > av->count) { +- const size_t new_av_count = av->used + count; +- if (av->type == FI_AV_TABLE) { +- void *p = realloc(av->domain->rdm_cm->av_table, +- (new_av_count * +- sizeof(*av->domain->rdm_cm->av_table))); +- if (p) { +- av->domain->rdm_cm->av_table = p; +- } +- else { +- ret = -FI_ENOMEM; +- goto out; +- } +- } +- av->count = new_av_count; +- } +- +- for (i = 0; i < count; i++) { +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- void *addr_i = (uint8_t *) addr + +- i * FI_IBV_RDM_DFLT_ADDRLEN; +- +- if (flags & FI_SYNC_ERR) +- fi_errors[i] = FI_SUCCESS; +- +- if (!fi_ibv_rdm_av_is_valid_address(addr_i)) { +- if (fi_addr) +- fi_addr[i] = FI_ADDR_NOTAVAIL; +- +- VERBS_INFO(FI_LOG_AV, +- "fi_av_insert: bad addr #%zu\n", i); +- +- if (av->flags & FI_EVENT) { +- /* due to limited functionality of +- * verbs EQ notify last failed element +- * only. */ +- /* TODO: what about utils EQ? */ +- struct fi_eq_err_entry err = { +- .fid = &av->av_fid.fid, +- .context = context, +- .data = i, +- .err = FI_EINVAL, +- .prov_errno = FI_EINVAL +- }; +- av->eq->err = err; +- } else if (flags & FI_SYNC_ERR) { +- fi_errors[i] = -FI_EADDRNOTAVAIL; +- } +- +- failed++; +- continue; +- } +- +- HASH_FIND(hh, av->domain->rdm_cm->av_hash, addr_i, +- FI_IBV_RDM_DFLT_ADDRLEN, av_entry); +- +- if (!av_entry) { +- /* If addr_i is not found in HASH then we malloc it. +- * It could be found if the connection was initiated +- * by the remote side. +- */ +- ret = fi_ibv_av_entry_alloc(av->domain, &av_entry, addr_i); +- if (ret) +- goto out; +- } +- +- switch (av->type) { +- case FI_AV_MAP: +- if (fi_addr) +- fi_addr[i] = (uintptr_t) (void *) av_entry; +- break; +- case FI_AV_TABLE: +- if (fi_addr) +- fi_addr[i] = av->used; +- av->domain->rdm_cm->av_table[av->used] = av_entry; +- break; +- default: +- assert(0); +- break; +- } +- +- VERBS_INFO(FI_LOG_AV, +- "fi_av_insert: addr %s:%u; av_entry - %p\n", +- inet_ntoa(av_entry->addr.sin_addr), +- ntohs(av_entry->addr.sin_port), av_entry); +- +- av->used++; +- } +- ret = count - failed; +- +- if (av->flags & FI_EVENT) { +- struct fi_eq_entry entry = { +- .fid = &av->av_fid.fid, +- .context = context, +- .data = count - failed +- }; +- fi_ibv_eq_write_event( +- av->eq, FI_AV_COMPLETE, &entry, sizeof(entry)); +- } +- +-out: +- pthread_mutex_unlock(&av->domain->rdm_cm->cm_lock); +- return (av->flags & FI_EVENT) ? FI_SUCCESS : ret; +-} +- +-static int fi_ibv_rdm_av_insertsvc(struct fid_av *av_fid, const char *node, +- const char *service, fi_addr_t *fi_addr, +- uint64_t flags, void *context) +-{ +- struct addrinfo addrinfo_hints; +- struct addrinfo *result = NULL; +- int ret; +- +- if (!node || !service) { +- VERBS_WARN(FI_LOG_AV, "fi_av_insertsvc: %s provided\n", +- (!node ? (!service ? "node and service weren't" : +- "node wasn't") : +- ("service wasn't"))); +- return -FI_EINVAL; +- } +- +- struct fi_ibv_av *av = container_of(av_fid, struct fi_ibv_av, av_fid); +- +- memset(&addrinfo_hints, 0, sizeof(addrinfo_hints)); +- addrinfo_hints.ai_family = AF_INET; +- ret = getaddrinfo(node, service, &addrinfo_hints, &result); +- if (ret) { +- if ((av->flags & FI_EVENT) && (av->eq)) { +- struct fi_eq_entry entry = { +- .fid = &av->av_fid.fid, +- .context = context, +- .data = 0 +- }; +- struct fi_eq_err_entry err = { +- .fid = &av->av_fid.fid, +- .context = context, +- .data = 0, +- .err = FI_EINVAL, +- .prov_errno = FI_EINVAL +- }; +- av->eq->err = err; +- +- fi_ibv_eq_write_event( +- av->eq, FI_AV_COMPLETE, +- &entry, sizeof(entry)); +- } +- return -ret; +- } +- +- ret = fi_ibv_rdm_av_insert(av_fid, (struct sockaddr_in *)result->ai_addr, +- 1, fi_addr, flags, context); +- freeaddrinfo(result); +- return ret; +-} +- +-static int fi_ibv_rdm_av_insertsym(struct fid_av *av, const char *node, +- size_t nodecnt, const char *service, +- size_t svccnt, fi_addr_t *fi_addr, +- uint64_t flags, void *context) +-{ +- int ret = 0, success = 0, err_code = 0; +- int var_port, var_host, len_port, len_host; +- char base_host[FI_NAME_MAX] = {0}; +- char tmp_host[FI_NAME_MAX] = {0}; +- char tmp_port[FI_NAME_MAX] = {0}; +- int hostlen, offset = 0, fmt; +- size_t i, j; +- +- if (!node || !service || node[0] == '\0') { +- VERBS_WARN(FI_LOG_AV, "fi_av_insertsym: %s provided\n", +- (!service ? (!node ? "node and service weren't" : +- "service wasn't") : +- ("node wasn't"))); +- return -FI_EINVAL; +- } +- +- hostlen = strlen(node); +- while (isdigit(*(node + hostlen - (offset + 1)))) +- offset++; +- +- if (*(node + hostlen - offset) == '.') +- fmt = 0; +- else +- fmt = offset; +- +- assert((hostlen-offset) < FI_NAME_MAX); +- strncpy(base_host, node, hostlen - (offset)); +- var_port = atoi(service); +- var_host = atoi(node + hostlen - offset); +- +- for (i = 0; i < nodecnt; i++) { +- for (j = 0; j < svccnt; j++) { +- int check_host = 0, check_port = 0; +- +- len_host = snprintf(tmp_host, FI_NAME_MAX, "%s%0*d", +- base_host, fmt, +- var_host + (int)i); +- len_port = snprintf(tmp_port, FI_NAME_MAX, "%d", +- var_port + (int)j); +- +- check_host = (len_host > 0 && len_host < FI_NAME_MAX); +- check_port = (len_port > 0 && len_port < FI_NAME_MAX); +- +- if (check_port && check_host) { +- ret = fi_ibv_rdm_av_insertsvc(av, tmp_host, +- tmp_port, fi_addr, +- flags, context); +- if (ret == 1) +- success++; +- else +- err_code = ret; +- } else { +- VERBS_WARN(FI_LOG_AV, +- "fi_av_insertsym: %s is invalid\n", +- (!check_port ? +- (!check_host ? +- "node and service weren't" : +- "service wasn't") : +- ("node wasn't"))); +- err_code = FI_ETOOSMALL; +- } +- } +- } +- return ((success > 0) ? success : err_code); +-} +- +-static int fi_ibv_rdm_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, +- void *addr, size_t *addrlen) +-{ +- struct fi_ibv_av *av = container_of(av_fid, struct fi_ibv_av, av_fid); +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- +- if (fi_addr == FI_ADDR_NOTAVAIL) +- return -FI_EINVAL; +- +- if (av->type == FI_AV_MAP) +- av_entry = (struct fi_ibv_rdm_av_entry *) fi_addr; +- else /* (av->type == FI_AV_TABLE) */ +- av_entry = av->domain->rdm_cm->av_table[fi_addr]; +- +- memcpy(addr, &av_entry->addr, MIN(*addrlen, sizeof(av_entry->addr))); +- *addrlen = sizeof(av_entry->addr); +- +- return 0; +-} +- +-static int fi_ibv_rdm_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, +- size_t count, uint64_t flags) +-{ +- struct fi_ibv_av *av = container_of(av_fid, struct fi_ibv_av, av_fid); +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- int ret = FI_SUCCESS; +- int err = FI_SUCCESS; +- size_t i; +- +- if(av->flags & FI_EVENT && !av->eq) +- return -FI_ENOEQ; +- +- if (!fi_addr || (av->type != FI_AV_MAP && av->type != FI_AV_TABLE)) +- return -FI_EINVAL; +- +- pthread_mutex_lock(&av->domain->rdm_cm->cm_lock); +- for (i = 0; i < count; i++) { +- +- if (fi_addr[i] == FI_ADDR_NOTAVAIL) +- continue; +- +- if (av->type == FI_AV_MAP) +- av_entry = (struct fi_ibv_rdm_av_entry *)fi_addr[i]; +- else /* (av->type == FI_AV_TABLE) */ +- av_entry = av->domain->rdm_cm->av_table[fi_addr[i]]; +- +- VERBS_INFO(FI_LOG_AV, "av_remove conn - %p; addr %s:%u\n", +- av_entry, inet_ntoa(av_entry->addr.sin_addr), +- ntohs(av_entry->addr.sin_port)); +- +- err = fi_ibv_rdm_start_overall_disconnection(av_entry); +- ret = (ret == FI_SUCCESS) ? err : ret; +- /* do not destroy connection here because we may +- * get WC for this connection. just move connection +- * to list of av-removed objects to clean later */ +- +- /* TODO: add cleaning into av_insert */ +- HASH_DEL(av->domain->rdm_cm->av_hash, av_entry); +- slist_insert_tail(&av_entry->removed_next, +- &av->domain->rdm_cm->av_removed_entry_head); +- } +- pthread_mutex_unlock(&av->domain->rdm_cm->cm_lock); +- return ret; +-} +- +-static const char *fi_ibv_rdm_av_straddr(struct fid_av *av, const void *addr, +- char *buf, size_t *len) +-{ +- return ofi_straddr(buf, len, FI_SOCKADDR, addr); +-} +- +-static struct fi_ops_av fi_ibv_rdm_av_ops = { +- .size = sizeof(struct fi_ops_av), +- .insert = fi_ibv_rdm_av_insert, +- .insertsvc = fi_ibv_rdm_av_insertsvc, +- .insertsym = fi_ibv_rdm_av_insertsym, +- .remove = fi_ibv_rdm_av_remove, +- .lookup = fi_ibv_rdm_av_lookup, +- .straddr = fi_ibv_rdm_av_straddr, +-}; +- +-struct fi_ops_av *fi_ibv_rdm_set_av_ops(void) +-{ +- return &fi_ibv_rdm_av_ops; +-} +- +-static int fi_ibv_rdm_av_close(fid_t fid) +-{ +- struct fi_ibv_av *av = container_of(fid, struct fi_ibv_av, av_fid.fid); +- free(av); +- return 0; +-} +- +-static struct fi_ops fi_ibv_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_rdm_av_close, +- .bind = fi_no_bind, +-}; +- +-static inline struct fi_ibv_rdm_av_entry * +-fi_ibv_rdm_av_tbl_idx_to_av_entry(struct fi_ibv_rdm_ep *ep, fi_addr_t addr) +-{ +- return (addr == FI_ADDR_UNSPEC) ? NULL : +- ep->domain->rdm_cm->av_table[addr]; +-} +- +-static inline struct fi_ibv_rdm_av_entry * +-fi_ibv_rdm_av_map_addr_to_av_entry(struct fi_ibv_rdm_ep *ep, fi_addr_t addr) +-{ +- return (struct fi_ibv_rdm_av_entry *) +- (addr == FI_ADDR_UNSPEC ? NULL : (void *)(uintptr_t)addr); +-} +- +-static inline fi_addr_t +-fi_ibv_rdm_av_entry_to_av_tbl_idx(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_av_entry *av_entry) +-{ +- size_t i; +- +- for (i = 0; i < ep->av->used; i++) { +- if (ep->domain->rdm_cm->av_table[i] == av_entry) { +- return i; +- } +- } +- +- return FI_ADDR_UNSPEC; +-} +- +-static inline fi_addr_t +-fi_ibv_rdm_av_entry_to_av_map_addr(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_av_entry *av_entry) +-{ +- return (av_entry == NULL) ? FI_ADDR_UNSPEC : +- (fi_addr_t)(uintptr_t)av_entry; +-} +- +-static inline fi_addr_t +-fi_ibv_rdm_conn_to_av_tbl_idx(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- if (conn == NULL) +- return FI_ADDR_UNSPEC; +- return fi_ibv_rdm_av_entry_to_av_tbl_idx(ep, conn->av_entry); +-} +- +-static inline fi_addr_t +-fi_ibv_rdm_conn_to_av_map_addr(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- return fi_ibv_rdm_av_entry_to_av_map_addr(ep, conn->av_entry); +-} +- +-/* Must call with `rdm_cm::cm_lock` held */ +-static inline struct fi_ibv_rdm_conn * +-fi_ibv_rdm_conn_entry_alloc(struct fi_ibv_rdm_av_entry *av_entry, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn; +- +- if (ofi_memalign((void**) &conn, +- FI_IBV_MEM_ALIGNMENT, +- sizeof(*conn))) +- return NULL; +- memset(conn, 0, sizeof(*conn)); +- memcpy(&conn->addr, &av_entry->addr, +- FI_IBV_RDM_DFLT_ADDRLEN); +- conn->ep = ep; +- conn->av_entry = av_entry; +- conn->state = FI_VERBS_CONN_ALLOCATED; +- dlist_init(&conn->postponed_requests_head); +- HASH_ADD(hh, av_entry->conn_hash, ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- +- /* Initiates connection to the peer */ +- fi_ibv_rdm_start_connection(ep, conn); +- +- return conn; +-} +- +-static inline struct fi_ibv_rdm_conn * +-fi_ibv_rdm_av_map_addr_to_conn_add_new_conn(struct fi_ibv_rdm_ep *ep, +- fi_addr_t addr) +-{ +- struct fi_ibv_rdm_av_entry *av_entry = +- fi_ibv_rdm_av_map_addr_to_av_entry(ep, addr); +- if (av_entry) { +- struct fi_ibv_rdm_conn *conn; +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, +- &ep, sizeof(struct fi_ibv_rdm_ep *), conn); +- if (OFI_UNLIKELY(!conn)) +- conn = fi_ibv_rdm_conn_entry_alloc(av_entry, ep); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- return conn; +- } +- +- return NULL; +-} +- +-static inline struct fi_ibv_rdm_conn * +-fi_ibv_rdm_av_tbl_idx_to_conn_add_new_conn(struct fi_ibv_rdm_ep *ep, +- fi_addr_t addr) +-{ +- struct fi_ibv_rdm_av_entry *av_entry = +- fi_ibv_rdm_av_tbl_idx_to_av_entry(ep, addr); +- if (av_entry) { +- struct fi_ibv_rdm_conn *conn; +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, +- &ep, sizeof(struct fi_ibv_rdm_ep *), conn); +- if (OFI_UNLIKELY(!conn)) +- conn = fi_ibv_rdm_conn_entry_alloc(av_entry, ep); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- return conn; +- } +- +- return NULL; +-} +- +-int fi_ibv_rdm_av_open(struct fid_domain *domain, struct fi_av_attr *attr, +- struct fid_av **av_fid, void *context) +-{ +- struct fi_ibv_domain *fid_domain; +- struct fi_ibv_av *av; +- size_t count = 64; +- +- fid_domain = container_of(domain, struct fi_ibv_domain, util_domain.domain_fid); +- +- if (!attr) +- return -FI_EINVAL; +- +- if (attr->name) { +- VERBS_WARN(FI_LOG_AV, +- "Shared AV is not implemented\n"); +- return -FI_ENOSYS; +- } +- +- switch (attr->type) { +- case FI_AV_UNSPEC: +- attr->type = FI_AV_MAP; +- case FI_AV_MAP: +- case FI_AV_TABLE: +- break; +- default: +- return -EINVAL; +- } +- +- if (attr->count) +- count = attr->count; +- +- av = calloc(1, sizeof *av); +- if (!av) +- return -ENOMEM; +- +- assert(fid_domain->ep_type == FI_EP_RDM); +- av->domain = fid_domain; +- av->type = attr->type; +- av->count = count; +- av->flags = attr->flags; +- av->used = 0; +- +- if (av->type == FI_AV_TABLE && av->count > 0) { +- av->domain->rdm_cm->av_table = +- calloc(av->count, +- sizeof(*av->domain->rdm_cm->av_table)); +- if (!av->domain->rdm_cm->av_table) { +- free(av); +- return -ENOMEM; +- } +- } +- +- if (av->type == FI_AV_MAP) { +- av->addr_to_av_entry = fi_ibv_rdm_av_map_addr_to_av_entry; +- av->av_entry_to_addr = fi_ibv_rdm_av_entry_to_av_map_addr; +- av->addr_to_conn = fi_ibv_rdm_av_map_addr_to_conn_add_new_conn; +- av->conn_to_addr = fi_ibv_rdm_conn_to_av_map_addr; +- } else /* if (av->type == FI_AV_TABLE) */ { +- av->addr_to_av_entry = fi_ibv_rdm_av_tbl_idx_to_av_entry; +- av->av_entry_to_addr = fi_ibv_rdm_av_entry_to_av_tbl_idx; +- av->addr_to_conn = fi_ibv_rdm_av_tbl_idx_to_conn_add_new_conn; +- av->conn_to_addr = fi_ibv_rdm_conn_to_av_tbl_idx; +- } +- +- av->av_fid.fid.fclass = FI_CLASS_AV; +- av->av_fid.fid.context = context; +- av->av_fid.fid.ops = &fi_ibv_fi_ops; +- +- av->av_fid.ops = fi_ibv_rdm_set_av_ops(); +- +- *av_fid = &av->av_fid; +- return 0; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_cq_ep_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_cq_ep_rdm.c +deleted file mode 100644 +index e73199f..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_cq_ep_rdm.c ++++ /dev/null +@@ -1,364 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +- +-#include +-#include +-#include "../fi_verbs.h" +-#include "verbs_queuing.h" +- +-static ssize_t fi_ibv_rdm_tagged_cq_readfrom(struct fid_cq *cq, void *buf, +- size_t count, fi_addr_t * src_addr) +-{ +- struct fi_ibv_rdm_cq *_cq = +- container_of(cq, struct fi_ibv_rdm_cq, cq_fid); +- size_t ret = 0; +- struct fi_ibv_rdm_request *cq_entry = +- count ? fi_ibv_rdm_take_first_from_cq(_cq) : NULL;; +- +- for ( ; cq_entry; cq_entry = (ret < count) ? +- fi_ibv_rdm_take_first_from_cq(_cq) : NULL) { +- VERBS_DBG(FI_LOG_CQ, +- "\t\t-> found in ready: %p op_ctx %p, len %lu, tag 0x%" PRIx64 "\n", +- cq_entry, cq_entry->context, cq_entry->len, +- cq_entry->minfo.tag); +- +- src_addr[ret] = +- _cq->ep->av->conn_to_addr(_cq->ep, cq_entry->minfo.conn); +- _cq->read_entry(cq_entry, ret, buf); +- +- if (cq_entry->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", cq_entry, +- FI_LOG_DEBUG); +- util_buf_release( +- cq_entry->ep->fi_ibv_rdm_request_pool, +- cq_entry); +- } else { +- cq_entry->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- ret++; +- } +- +- if (ret == 0) { +- if (fi_ibv_rdm_tagged_poll(_cq->ep) < 0) +- VERBS_INFO(FI_LOG_CQ, "fi_ibv_rdm_tagged_poll failed\n"); +- if (!dlist_empty(&_cq->request_errcq)) +- ret = -FI_EAVAIL; +- } +- +- return !ret ? -FI_EAGAIN : ret; +-} +- +-static ssize_t fi_ibv_rdm_tagged_cq_read(struct fid_cq *cq, void *buf, +- size_t count) +-{ +- struct fi_ibv_rdm_cq *_cq = +- container_of(cq, struct fi_ibv_rdm_cq, cq_fid); +- const size_t _count = _cq->read_bunch_size; +- fi_addr_t addr[_count]; +- +- return fi_ibv_rdm_tagged_cq_readfrom(cq, buf, MIN(_count, count), addr); +-} +- +-static ssize_t fi_ibv_rdm_cq_sreadfrom(struct fid_cq *cq, void *buf, +- size_t count, fi_addr_t *src_addr, +- const void *cond, int timeout) +-{ +- size_t threshold = count; +- uint64_t time_limit = +- ((timeout < 0) ? SIZE_MAX : (fi_gettime_ms() + timeout)); +- size_t counter = 0; +- ssize_t ret = 0; +- struct fi_ibv_rdm_cq *_cq = container_of(cq, struct fi_ibv_rdm_cq, +- cq_fid); +- switch (_cq->wait_cond) { +- case FI_CQ_COND_THRESHOLD: +- threshold = MIN((uintptr_t) cond, threshold); +- case FI_CQ_COND_NONE: +- break; +- default: +- assert(0); +- return -FI_EOTHER; +- } +- +- do { +- ret = fi_ibv_rdm_tagged_cq_readfrom(cq, +- ((char *)buf + +- (counter * _cq->entry_size)), +- threshold - counter, +- src_addr); +- counter += (ret > 0) ? ret : 0; +- } while ((ret >= 0 || ret == -FI_EAGAIN) && +- (counter < threshold) && +- (fi_gettime_ms() < time_limit)); +- +- if (counter != 0 && ret >= 0) { +- ret = counter; +- } else if (ret == 0) { +- ret = -FI_EAGAIN; +- } +- +- return ret; +-} +- +-static ssize_t fi_ibv_rdm_cq_sread(struct fid_cq *cq, void *buf, size_t count, +- const void *cond, int timeout) +-{ +- struct fi_ibv_rdm_cq *_cq = +- container_of(cq, struct fi_ibv_rdm_cq, cq_fid); +- size_t chunk = MIN(_cq->read_bunch_size, count); +- uint64_t time_limit = fi_gettime_ms() + timeout; +- size_t rest = count; +- fi_addr_t addr[chunk]; +- ssize_t ret; +- +- do { +- ret = fi_ibv_rdm_cq_sreadfrom(cq, buf, chunk, addr, cond, +- timeout); +- if (ret > 0) { +- rest -= ret; +- chunk = MIN(chunk, rest); +- } +- } while (((ret >=0) && (rest != 0)) || +- (timeout >= 0 && fi_gettime_ms() < time_limit)); +- +- return (count != rest) ? (count - rest) : ret; +-} +- +-static const char * +-fi_ibv_rdm_cq_strerror(struct fid_cq *eq, int prov_errno, const void *err_data, +- char *buf, size_t len) +-{ +- /* TODO: */ +- if (buf && len) +- strncpy(buf, ibv_wc_status_str(prov_errno), len); +- return ibv_wc_status_str(prov_errno); +-} +- +-static ssize_t +-fi_ibv_rdm_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *entry, +- uint64_t flags) +-{ +- ssize_t ret = 0; +- uint32_t api_version; +- struct fi_ibv_rdm_cq *cq = +- container_of(cq_fid, struct fi_ibv_rdm_cq, cq_fid.fid); +- +- struct fi_ibv_rdm_request *err_request = +- fi_ibv_rdm_take_first_from_errcq(cq); +- +- if (err_request) { +- entry->op_context = err_request->context; +- entry->flags = (err_request->comp_flags & ~FI_COMPLETION); +- entry->len = err_request->len; +- entry->buf = err_request->unexp_rbuf; +- entry->data = err_request->imm; +- entry->tag = err_request->minfo.tag; +- entry->olen = -1; /* TODO: */ +- entry->err = err_request->state.err; +- entry->prov_errno = -err_request->state.err; +- +- api_version = cq->domain->util_domain.fabric->fabric_fid.api_version; +- +- if (!entry->err_data_size) +- entry->err_data = NULL; +- else if (FI_VERSION_GE(api_version, FI_VERSION(1, 5))) +- entry->err_data_size = 0; +- +- if (err_request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", err_request, +- FI_LOG_DEBUG); +- util_buf_release( +- err_request->ep->fi_ibv_rdm_request_pool, +- err_request); +- } else { +- err_request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- ret++; +- } else { +- return -FI_EAGAIN; +- } +- +- return ret; +-} +- +-static struct fi_ops_cq fi_ibv_rdm_cq_ops = { +- .size = sizeof(struct fi_ops_cq), +- .read = fi_ibv_rdm_tagged_cq_read, +- .readfrom = fi_ibv_rdm_tagged_cq_readfrom, +- .readerr = fi_ibv_rdm_cq_readerr, +- .sread = fi_ibv_rdm_cq_sread, +- .sreadfrom = fi_ibv_rdm_cq_sreadfrom, +- .strerror = fi_ibv_rdm_cq_strerror +-}; +- +-static int fi_ibv_rdm_cq_close(fid_t fid) +-{ +- struct fi_ibv_rdm_cq *cq = +- container_of(fid, struct fi_ibv_rdm_cq, cq_fid.fid); +- +- if(cq->ep) { +- return -FI_EBUSY; +- } +- +- /* TODO: move queues & related pools cleanup from close EP */ +- /* fi_ibv_rdm_clean_queues(); */ +- +- free(cq); +- +- return FI_SUCCESS; +-} +- +-static struct fi_ops fi_ibv_rdm_cq_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_rdm_cq_close, +- .bind = fi_no_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static void fi_ibv_rdm_cq_read_context_entry(struct fi_ibv_rdm_request *cq_entry, +- int i, void *buf) +-{ +- struct fi_cq_entry *entry = buf; +- +- entry[i].op_context = cq_entry->context; +-} +- +-static void fi_ibv_rdm_cq_read_msg_entry(struct fi_ibv_rdm_request *cq_entry, +- int i, void *buf) +-{ +- struct fi_cq_msg_entry *entry = buf; +- +- entry[i].op_context = cq_entry->context; +- entry[i].flags = (cq_entry->comp_flags & ~FI_COMPLETION); +- entry[i].len = cq_entry->len; +-} +- +-static void fi_ibv_rdm_cq_read_data_entry(struct fi_ibv_rdm_request *cq_entry, +- int i, void *buf) +-{ +- struct fi_cq_data_entry *entry = buf; +- +- entry[i].op_context = cq_entry->context; +- entry[i].flags = (cq_entry->comp_flags & ~FI_COMPLETION); +- entry[i].len = cq_entry->len; +- entry[i].buf = (cq_entry->comp_flags & FI_TRANSMIT) ? +- cq_entry->src_addr : cq_entry->dest_buf; +- entry[i].data = cq_entry->imm; +-} +- +-static void fi_ibv_rdm_cq_read_tagged_entry(struct fi_ibv_rdm_request *cq_entry, +- int i, void *buf) +-{ +- struct fi_cq_tagged_entry *entry = buf; +- +- entry[i].op_context = cq_entry->context; +- entry[i].flags = (cq_entry->comp_flags & ~FI_COMPLETION); +- entry[i].len = cq_entry->len; +- entry[i].buf = (cq_entry->comp_flags & FI_TRANSMIT) ? +- cq_entry->src_addr : cq_entry->dest_buf; +- entry[i].data = cq_entry->imm; +- entry[i].tag = cq_entry->minfo.tag; +-} +- +-int fi_ibv_rdm_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq, void *context) +-{ +- struct fi_ibv_rdm_cq *_cq; +- int ret; +- +- _cq = calloc(1, sizeof *_cq); +- if (!_cq) +- return -FI_ENOMEM; +- +- _cq->domain = container_of(domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- assert(_cq->domain->ep_type == FI_EP_RDM); +- +- switch (attr->wait_obj) { +- case FI_WAIT_NONE: +- case FI_WAIT_UNSPEC: +- break; +- case FI_WAIT_SET: +- case FI_WAIT_FD: +- case FI_WAIT_MUTEX_COND: +- default: +- assert(0); +- ret = -FI_ENOSYS; +- goto err; +- } +- +- _cq->flags |= attr->flags; +- _cq->wait_cond = attr->wait_cond; +- _cq->cq_fid.fid.fclass = FI_CLASS_CQ; +- _cq->cq_fid.fid.context = context; +- _cq->cq_fid.fid.ops = &fi_ibv_rdm_cq_fi_ops; +- _cq->cq_fid.ops = &fi_ibv_rdm_cq_ops; +- +- switch (attr->format) { +- case FI_CQ_FORMAT_CONTEXT: +- _cq->entry_size = sizeof(struct fi_cq_entry); +- _cq->read_entry = fi_ibv_rdm_cq_read_context_entry; +- break; +- case FI_CQ_FORMAT_MSG: +- _cq->entry_size = sizeof(struct fi_cq_msg_entry); +- _cq->read_entry = fi_ibv_rdm_cq_read_msg_entry; +- break; +- case FI_CQ_FORMAT_DATA: +- _cq->entry_size = sizeof(struct fi_cq_data_entry); +- _cq->read_entry = fi_ibv_rdm_cq_read_data_entry; +- break; +- case FI_CQ_FORMAT_UNSPEC: +- case FI_CQ_FORMAT_TAGGED: +- _cq->entry_size = sizeof(struct fi_cq_tagged_entry); +- _cq->read_entry = fi_ibv_rdm_cq_read_tagged_entry; +- break; +- default: +- ret = -FI_ENOSYS; +- goto err; +- } +- +- dlist_init(&_cq->request_cq); +- dlist_init(&_cq->request_errcq); +- +- _cq->read_bunch_size = fi_ibv_gl_data.cqread_bunch_size; +- +- *cq = &_cq->cq_fid; +- return 0; +- +-err: +- free(_cq); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_ep_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_ep_rdm.c +deleted file mode 100644 +index 96f8b6b..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_ep_rdm.c ++++ /dev/null +@@ -1,633 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include "../fi_verbs.h" +-#include "verbs_queuing.h" +-#include "verbs_utils.h" +- +- +-extern struct fi_ops_tagged fi_ibv_rdm_tagged_ops; +-extern struct fi_ops_cm fi_ibv_rdm_tagged_ep_cm_ops; +-extern struct fi_provider fi_ibv_prov; +-extern struct fi_ops_msg fi_ibv_rdm_ep_msg_ops; +-extern struct fi_ops_rma fi_ibv_rdm_ep_rma_ops; +- +-static int fi_ibv_rdm_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep; +- struct fi_ibv_rdm_cq *cq; +- struct fi_ibv_av *av; +- struct fi_ibv_rdm_cntr *cntr; +- int ret; +- +- ep = container_of(fid, struct fi_ibv_rdm_ep, ep_fid.fid); +- ret = ofi_ep_bind_valid(&fi_ibv_prov, bfid, flags); +- if (ret) +- return ret; +- +- switch (bfid->fclass) { +- case FI_CLASS_CQ: +- cq = container_of(bfid, struct fi_ibv_rdm_cq, cq_fid); +- if (ep->domain != cq->domain) { +- return -FI_EINVAL; +- } +- +- if (flags & FI_RECV) { +- if (ep->fi_rcq) +- return -EINVAL; +- ep->fi_rcq = cq; +- ep->rx_selective_completion = +- (flags & FI_SELECTIVE_COMPLETION) ? 1 : 0; +- } +- +- if (flags & FI_SEND) { +- if (ep->fi_scq) +- return -EINVAL; +- ep->fi_scq = cq; +- ep->tx_selective_completion = +- (flags & FI_SELECTIVE_COMPLETION) ? 1 : 0; +- } +- +- /* TODO: this is wrong. CQ to EP is 1:n */ +- cq->ep = ep; +- break; +- case FI_CLASS_AV: +- av = container_of(bfid, struct fi_ibv_av, av_fid.fid); +- if (ep->domain != av->domain) +- return -FI_EINVAL; +- ep->av = av; +- break; +- case FI_CLASS_CNTR: +- cntr = container_of(bfid, struct fi_ibv_rdm_cntr, fid.fid); +- if (ep->domain != cntr->domain) { +- return -FI_EINVAL; +- } +- +- if ((flags & FI_REMOTE_READ) || (flags & FI_REMOTE_WRITE)) { +- return -FI_ENOSYS; +- } +- +- if (flags & FI_SEND) { +- ep->send_cntr = cntr; +- ofi_atomic_inc32(&ep->send_cntr->ep_ref); +- } +- if (flags & FI_RECV) { +- ep->recv_cntr = cntr; +- ofi_atomic_inc32(&ep->recv_cntr->ep_ref); +- } +- if (flags & FI_READ) { +- ep->read_cntr = cntr; +- ofi_atomic_inc32(&ep->read_cntr->ep_ref); +- } +- if (flags & FI_WRITE) { +- ep->write_cntr = cntr; +- ofi_atomic_inc32(&ep->write_cntr->ep_ref); +- } +- +- break; +- default: +- return -EINVAL; +- } +- +- return 0; +-} +- +-static ssize_t fi_ibv_rdm_cancel(fid_t fid, void *ctx) +-{ +- struct fi_context *context = (struct fi_context *)ctx; +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- int err = -FI_ENOENT; +- +- if (!ep_rdm->domain) +- return -EBADF; +- +- if (!context) +- return -EINVAL; +- +- if (context->internal[0] == NULL) +- return 0; +- +- struct fi_ibv_rdm_request *request = context->internal[0]; +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "ep_cancel, match %p, tag 0x%" PRIx64 ", len %" PRIu64 ", ctx %p\n", +- request, request->minfo.tag, request->len, request->context); +- +- struct dlist_entry *found = +- dlist_find_first_match(&ep_rdm->fi_ibv_rdm_posted_queue, +- fi_ibv_rdm_req_match, request); +- if (found) { +- uint32_t posted_recvs; +- +- assert(container_of(found, struct fi_ibv_rdm_request, +- queue_entry) == request); +- request->context->internal[0] = NULL; +- posted_recvs = fi_ibv_rdm_remove_from_posted_queue(request, ep_rdm); +- (void)posted_recvs; +- VERBS_DBG(FI_LOG_EP_DATA, "\t\t-> SUCCESS, post recv %"PRIu32"\n", +- posted_recvs); +- err = 0; +- } else { +- request = fi_ibv_rdm_take_first_match_from_postponed_queue +- (fi_ibv_rdm_req_match, request, ep_rdm); +- if (request) { +- fi_ibv_rdm_remove_from_postponed_queue(request); +- err = 0; +- } +- } +- +- if (!err) { +- fi_ibv_rdm_cntr_inc_err(ep_rdm->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(ep_rdm->fi_rcq, request, +- FI_ECANCELED); +- } +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- return err; +-} +- +-static int fi_ibv_rdm_getopt(fid_t fid, int level, int optname, void *optval, +- size_t * optlen) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- +- if (level != FI_OPT_ENDPOINT) { +- return -FI_ENOPROTOOPT; +- } +- +- if (optname != FI_OPT_MIN_MULTI_RECV) { +- return -FI_ENOPROTOOPT; +- } +- +- *(size_t *)optval = ep_rdm->min_multi_recv_size; +- *optlen = sizeof(size_t); +- +- return 0; +-} +- +-static int fi_ibv_rdm_setopt(fid_t fid, int level, int optname, +- const void *optval, size_t optlen) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- +- if (level != FI_OPT_ENDPOINT) { +- return -FI_ENOPROTOOPT; +- } +- +- if (optname != FI_OPT_MIN_MULTI_RECV) { +- return -FI_ENOPROTOOPT; +- } +- +- ep_rdm->min_multi_recv_size = *(size_t *)optval; +- return 0; +-} +- +-static int fi_ibv_rdm_tagged_control(fid_t fid, int command, void *arg) +-{ +- switch (command) { +- case FI_ENABLE: +- return 0; +- default: +- return -FI_ENOSYS; +- } +- +- return 0; +-} +- +-struct fi_ops_ep fi_ibv_rdm_ep_base_ops = { +- .size = sizeof(struct fi_ops_ep), +- .cancel = fi_ibv_rdm_cancel, +- .getopt = fi_ibv_rdm_getopt, +- .setopt = fi_ibv_rdm_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-static int fi_ibv_rdm_ep_match(struct slist_entry *item, +- const void *ep) +-{ +- const struct fi_ibv_rdm_ep *ep_obj = (struct fi_ibv_rdm_ep *)ep; +- return (item == &ep_obj->list_entry); +-} +- +-static int fi_ibv_rdm_ep_close(fid_t fid) +-{ +- int ret = FI_SUCCESS; +- int err = FI_SUCCESS; +- struct fi_ibv_rdm_ep *ep = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid.fid); +- struct fi_ibv_rdm_av_entry *av_entry = NULL, *tmp = NULL; +- struct slist_entry *item, *prev_item; +- struct fi_ibv_rdm_conn *conn = NULL; +- +- if (ep->fi_scq) +- ep->fi_scq->ep = NULL; +- if (ep->fi_rcq) +- ep->fi_rcq->ep = NULL; +- +- ep->is_closing = 1; +- +- /* All posted sends are waiting local completions */ +- while (ep->posted_sends > 0 && ep->num_active_conns > 0) +- fi_ibv_rdm_tagged_poll(ep); +- +- if (ep->send_cntr) { +- ofi_atomic_dec32(&ep->send_cntr->ep_ref); +- ep->send_cntr = 0; +- } +- +- if (ep->recv_cntr) { +- ofi_atomic_dec32(&ep->recv_cntr->ep_ref); +- ep->recv_cntr = 0; +- } +- +- if (ep->read_cntr) { +- ofi_atomic_dec32(&ep->read_cntr->ep_ref); +- ep->read_cntr = 0; +- } +- +- if (ep->write_cntr) { +- ofi_atomic_dec32(&ep->write_cntr->ep_ref); +- ep->write_cntr = 0; +- } +- +- slist_remove_first_match(&ep->domain->ep_list, +- fi_ibv_rdm_ep_match, ep); +- +- HASH_ITER(hh, ep->domain->rdm_cm->av_hash, av_entry, tmp) { +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- if (conn) { +- switch (conn->state) { +- case FI_VERBS_CONN_ALLOCATED: +- case FI_VERBS_CONN_ESTABLISHED: +- ret = fi_ibv_rdm_start_disconnection(conn); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- break; +- case FI_VERBS_CONN_STARTED: +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- /* No need to hold `rdm_cm::cm_lock` during +- * CM progressing of the EP */ +- while (conn->state != FI_VERBS_CONN_ESTABLISHED && +- conn->state != FI_VERBS_CONN_REJECTED && +- conn->state != FI_VERBS_CONN_CLOSED) { +- ret = fi_ibv_rdm_cm_progress(ep); +- if (ret) { +- VERBS_INFO(FI_LOG_AV, +- "cm progress failed\n"); +- break; +- } +- } +- break; +- default: +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- break; +- } +- } else { +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- } +- } +- +- /* ok, all connections are initiated to disconnect. now wait +- * till all connections are switch to state 'closed' */ +- HASH_ITER(hh, ep->domain->rdm_cm->av_hash, av_entry, tmp) { +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- if (conn) { +- /* No need to hold `rdm_cm::cm_lock` during +- * polling of receive CQ */ +- while(conn->state != FI_VERBS_CONN_CLOSED && +- conn->state != FI_VERBS_CONN_ALLOCATED) { +- fi_ibv_rdm_tagged_poll_recv(ep); +- err = fi_ibv_rdm_cm_progress(ep); +- if (err) { +- VERBS_INFO(FI_LOG_AV, "cm progress failed\n"); +- ret = (ret == FI_SUCCESS) ? err : ret; +- } +- } +- } +- } +- +- /* now destroy all connections that wasn't removed from HASH */ +- HASH_ITER(hh, ep->domain->rdm_cm->av_hash, av_entry, tmp) { +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- if (conn) { +- HASH_DEL(av_entry->conn_hash, conn); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- /* No need to hold `rdm_cm::cm_lock` during +- * connection cleanup */ +- fi_ibv_rdm_conn_cleanup(conn); +- } else { +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- } +- } +- +- /* now destroy all connection that was removed from HASH */ +- slist_foreach(&ep->domain->rdm_cm->av_removed_entry_head, +- item, prev_item) { +- OFI_UNUSED(prev_item); /* Compiler complains about unused variable */ +- av_entry = container_of(item, +- struct fi_ibv_rdm_av_entry, +- removed_next); +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- if (conn) { +- HASH_DEL(av_entry->conn_hash, conn); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- /* No need to hold `rdm_cm::cm_lock` during +- * connection cleanup */ +- fi_ibv_rdm_conn_cleanup(conn); +- } else { +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- } +- /* do NOT free av_entry and do NOT remove from +- * the List of removed AV entries, becasue we need to +- * remove remaining connections during domain closure */ +- } +- +- /* TODO: MUST be removed in DOMAIN_CLOSE */ +- /*assert(HASH_COUNT(av_entry->conn_hash) == 0 && +- av_entry->conn_hash == NULL);*/ +- free(ep->domain->rdm_cm->av_table); +- +- VERBS_INFO(FI_LOG_AV, "DISCONNECT complete\n"); +- assert(ep->scq && ep->rcq); +- if (ibv_destroy_cq(ep->scq)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "ep->scq: ibv_destroy_cq failed", +- errno); +- ret = (ret == FI_SUCCESS) ? -errno : ret; +- } +- +- if (ibv_destroy_cq(ep->rcq)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "ep->rcq: ibv_destroy_cq failed", +- errno); +- ret = (ret == FI_SUCCESS) ? -errno : ret; +- } +- +- rdma_freeaddrinfo(ep->rai); +- +- /* TODO: move queues & related pools cleanup to close CQ*/ +- fi_ibv_rdm_clean_queues(ep); +- +- util_buf_pool_destroy(ep->fi_ibv_rdm_request_pool); +- util_buf_pool_destroy(ep->fi_ibv_rdm_multi_request_pool); +- util_buf_pool_destroy(ep->fi_ibv_rdm_extra_buffers_pool); +- util_buf_pool_destroy(ep->fi_ibv_rdm_postponed_pool); +- +- fi_freeinfo(ep->info); +- +- free(ep); +- +- return ret; +-} +- +-struct fi_ops fi_ibv_rdm_ep_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_rdm_ep_close, +- .bind = fi_ibv_rdm_ep_bind, +- .control = fi_ibv_rdm_tagged_control, +- .ops_open = fi_no_ops_open, +-}; +- +-int fi_ibv_rdm_open_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep, void *context) +-{ +- struct fi_ibv_domain *_domain = +- container_of(domain, struct fi_ibv_domain, util_domain.domain_fid); +- int ret = 0; +- +- if (!info || !info->ep_attr || !info->domain_attr || +- strncmp(_domain->verbs->device->name, info->domain_attr->name, +- strlen(_domain->verbs->device->name))) +- { +- return -FI_EINVAL; +- } +- +- struct fi_ibv_rdm_ep *_ep; +- _ep = calloc(1, sizeof *_ep); +- if (!_ep) +- return -FI_ENOMEM; +- +- _ep->info = fi_dupinfo(info); +- if (!_ep->info) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- _ep->domain = _domain; +- _ep->ep_fid.fid.fclass = FI_CLASS_EP; +- _ep->ep_fid.fid.context = context; +- _ep->ep_fid.fid.ops = &fi_ibv_rdm_ep_ops; +- _ep->ep_fid.ops = &fi_ibv_rdm_ep_base_ops; +- _ep->ep_fid.cm = &fi_ibv_rdm_tagged_ep_cm_ops; +- _ep->ep_fid.msg = &fi_ibv_rdm_ep_msg_ops; +- _ep->ep_fid.rma = &fi_ibv_rdm_ep_rma_ops; +- _ep->ep_fid.tagged = &fi_ibv_rdm_tagged_ops; +- _ep->tx_selective_completion = 0; +- _ep->rx_selective_completion = 0; +- _ep->n_buffs = fi_ibv_gl_data.rdm.buffer_num; +- +- VERBS_INFO(FI_LOG_EP_CTRL, "inject_size: %zu\n", +- info->tx_attr->inject_size); +- +- _ep->rndv_threshold = info->tx_attr->inject_size; +- _ep->iov_per_rndv_thr = +- (_ep->rndv_threshold / sizeof(struct iovec)); +- VERBS_INFO(FI_LOG_EP_CTRL, "rndv_threshold: %d\n", +- _ep->rndv_threshold); +- +- _ep->buff_len = rdm_buffer_size(info->tx_attr->inject_size); +- VERBS_INFO(FI_LOG_EP_CTRL, "buff_len: %d\n", _ep->buff_len); +- +- _ep->tx_op_flags = info->tx_attr->op_flags; +- _ep->rx_op_flags = info->rx_attr->op_flags; +- _ep->min_multi_recv_size = (_ep->rx_op_flags & FI_MULTI_RECV) ? +- info->tx_attr->inject_size : 0; +- _ep->rndv_seg_size = fi_ibv_gl_data.rdm.rndv_seg_size; +- _ep->rq_wr_depth = info->rx_attr->size; +- /* one more outstanding slot for releasing eager buffers */ +- _ep->sq_wr_depth = _ep->n_buffs + 1; +- if (!strncmp(fi_ibv_gl_data.rdm.eager_send_opcode, +- "IBV_WR_RDMA_WRITE_WITH_IMM", +- strlen("IBV_WR_RDMA_WRITE_WITH_IMM"))) { +- _ep->eopcode = IBV_WR_RDMA_WRITE_WITH_IMM; +- } else if (!strncmp(fi_ibv_gl_data.rdm.eager_send_opcode, +- "IBV_WR_SEND", +- strlen("IBV_WR_SEND"))) { +- _ep->eopcode = IBV_WR_SEND; +- } else { +- VERBS_INFO(FI_LOG_CORE, +- "Invalid value of rdm_eager_send_opcode\n"); +- ret = -FI_EINVAL; +- goto err2; +- } +- +- switch (info->ep_attr->protocol) { +- case FI_PROTO_IB_RDM: +- if (_ep->eopcode != IBV_WR_RDMA_WRITE_WITH_IMM && +- _ep->eopcode != IBV_WR_SEND) { +- VERBS_INFO(FI_LOG_CORE, +- "Unsupported eager operation code\n"); +- ret = -FI_ENODATA; +- goto err2; +- } +- break; +- case FI_PROTO_IWARP_RDM: +- if (_ep->eopcode != IBV_WR_SEND) { +- VERBS_INFO(FI_LOG_CORE, +- "Unsupported eager operation code\n"); +- ret = -FI_ENODATA; +- goto err1; +- } +- break; +- default: +- VERBS_INFO(FI_LOG_CORE, "Unsupported protocol\n"); +- ret = -FI_ENODATA; +- goto err2; +- } +- +- ret = fi_ibv_get_rdma_rai(NULL, NULL, 0, info, &_ep->rai); +- if (ret) { +- goto err2; +- } +- ret = fi_ibv_rdm_cm_bind_ep(_ep->domain->rdm_cm, _ep); +- if (ret) { +- goto err2; +- } +- +- _ep->posted_sends = 0; +- _ep->posted_recvs = 0; +- _ep->recv_preposted_threshold = MAX(0.2 * _ep->rq_wr_depth, _ep->n_buffs); +- VERBS_INFO(FI_LOG_EP_CTRL, "recv preposted threshold: %d\n", +- _ep->recv_preposted_threshold); +- +- ret = util_buf_pool_create(&_ep->fi_ibv_rdm_request_pool, +- sizeof(struct fi_ibv_rdm_request), +- FI_IBV_MEM_ALIGNMENT, 0, +- FI_IBV_POOL_BUF_CNT); +- if (ret) +- goto err3; +- +- ret = util_buf_pool_create(&_ep->fi_ibv_rdm_multi_request_pool, +- sizeof(struct fi_ibv_rdm_multi_request), +- FI_IBV_MEM_ALIGNMENT, 0, +- FI_IBV_POOL_BUF_CNT); +- if (ret) +- goto err3; +- +- ret = util_buf_pool_create(&_ep->fi_ibv_rdm_postponed_pool, +- sizeof(struct fi_ibv_rdm_postponed_entry), +- FI_IBV_MEM_ALIGNMENT, 0, +- FI_IBV_POOL_BUF_CNT); +- if (ret) +- goto err3; +- +- ret = util_buf_pool_create(&_ep->fi_ibv_rdm_extra_buffers_pool, +- _ep->buff_len, FI_IBV_MEM_ALIGNMENT, +- 0, FI_IBV_POOL_BUF_CNT); +- if (ret) +- goto err3; +- +- dlist_init(&_ep->fi_ibv_rdm_posted_queue); +- dlist_init(&_ep->fi_ibv_rdm_postponed_queue); +- dlist_init(&_ep->fi_ibv_rdm_unexp_queue); +- dlist_init(&_ep->fi_ibv_rdm_multi_recv_list); +- +- _ep->max_inline_rc = +- fi_ibv_find_max_inline(_ep->domain->pd, _ep->domain->verbs, IBV_QPT_RC); +- +- _ep->scq_depth = FI_IBV_RDM_TAGGED_DFLT_SCQ_SIZE; +- _ep->rcq_depth = FI_IBV_RDM_TAGGED_DFLT_RCQ_SIZE; +- +- _ep->scq = ibv_create_cq(_ep->domain->verbs, _ep->scq_depth, _ep, +- NULL, 0); +- if (_ep->scq == NULL) { +- VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, "ibv_create_cq", errno); +- ret = -FI_EOTHER; +- goto err3; +- } +- +- _ep->rcq = +- ibv_create_cq(_ep->domain->verbs, _ep->rcq_depth, _ep, NULL, 0); +- if (_ep->rcq == NULL) { +- VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, "ibv_create_cq", errno); +- ret = -FI_EOTHER; +- goto err4; +- } +- +- *ep = &_ep->ep_fid; +- +- _ep->is_closing = 0; +- fi_ibv_rdm_req_hndls_init(); +- +- slist_insert_tail(&_ep->list_entry, &_domain->ep_list); +- +- return ret; +-err4: +- if (ibv_destroy_cq(_ep->scq)) +- VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, "ibv_destroy_cq", errno); +-err3: +- if (_ep->fi_ibv_rdm_request_pool) +- util_buf_pool_destroy(_ep->fi_ibv_rdm_request_pool); +- if (_ep->fi_ibv_rdm_multi_request_pool) +- util_buf_pool_destroy(_ep->fi_ibv_rdm_multi_request_pool); +- if (_ep->fi_ibv_rdm_postponed_pool) +- util_buf_pool_destroy(_ep->fi_ibv_rdm_postponed_pool); +- if (_ep->fi_ibv_rdm_extra_buffers_pool) +- util_buf_pool_destroy(_ep->fi_ibv_rdm_extra_buffers_pool); +-err2: +- fi_freeinfo(_ep->info); +-err1: +- free(_ep); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_queuing.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_queuing.h +deleted file mode 100644 +index 6ac877e..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_queuing.h ++++ /dev/null +@@ -1,307 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _VERBS_QUEING_H +-#define _VERBS_QUEING_H +- +-#include +-#include +-#include "verbs_rdm.h" +- +-static inline void +-fi_ibv_rdm_move_to_cq(struct fi_ibv_rdm_cq *cq, +- struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("move_to_cq: ", request, FI_LOG_DEBUG); +- dlist_insert_tail(&request->queue_entry, &cq->request_cq); +-} +- +-static inline void +-fi_ibv_rdm_remove_from_cq(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_cq: ", request, FI_LOG_DEBUG); +- dlist_remove(&request->queue_entry); +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_cq(struct fi_ibv_rdm_cq *cq) +-{ +- if (cq && !dlist_empty(&cq->request_cq)) { +- struct fi_ibv_rdm_request *entry = +- container_of(cq->request_cq.next, +- struct fi_ibv_rdm_request, queue_entry); +- fi_ibv_rdm_remove_from_cq(entry); +- return entry; +- } +- return NULL; +-} +- +-static inline void +-fi_ibv_rdm_move_to_errcq(struct fi_ibv_rdm_cq *cq, +- struct fi_ibv_rdm_request *request, ssize_t err) +-{ +- request->state.err = llabs(err); +- FI_IBV_RDM_DBG_REQUEST("move_to_errcq: ", request, FI_LOG_DEBUG); +- assert(request->context); +- dlist_insert_tail(&request->queue_entry, +- &cq->request_errcq); +-} +- +-static inline void +-fi_ibv_rdm_remove_from_errcq(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_errcq: ", request, FI_LOG_DEBUG); +- dlist_remove(&request->queue_entry); +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_errcq(struct fi_ibv_rdm_cq *cq) +-{ +- if (cq && !dlist_empty(&cq->request_errcq)) { +- struct fi_ibv_rdm_request *entry = +- container_of(cq->request_errcq.next, +- struct fi_ibv_rdm_request, queue_entry); +- fi_ibv_rdm_remove_from_errcq(entry); +- return entry; +- } +- return NULL; +-} +- +-static inline void +-fi_ibv_rdm_move_to_unexpected_queue(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- FI_IBV_RDM_DBG_REQUEST("move_to_unexpected_queue: ", request, +- FI_LOG_DEBUG); +- dlist_insert_tail(&request->queue_entry, &ep->fi_ibv_rdm_unexp_queue); +-#if ENABLE_DEBUG +- request->minfo.conn->unexp_counter++; +-#endif // ENABLE_DEBUG +-} +- +-static inline void +-fi_ibv_rdm_remove_from_unexp_queue(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_unexpected_queue: ", request, +- FI_LOG_DEBUG); +- dlist_remove(&request->queue_entry); +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_unexp_queue(struct fi_ibv_rdm_ep *ep) +-{ +- if (!dlist_empty(&ep->fi_ibv_rdm_unexp_queue)) { +- struct fi_ibv_rdm_request *entry = +- container_of(ep->fi_ibv_rdm_unexp_queue.next, +- struct fi_ibv_rdm_request, queue_entry); +- fi_ibv_rdm_remove_from_unexp_queue(entry); +- return entry; +- } +- return NULL; +-} +- +-static inline void +-fi_ibv_rdm_move_to_posted_queue(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- FI_IBV_RDM_DBG_REQUEST("move_to_posted_queue: ", request, FI_LOG_DEBUG); +- dlist_insert_tail(&request->queue_entry, &ep->fi_ibv_rdm_posted_queue); +- ep->posted_recvs++; +-#if ENABLE_DEBUG +- if (request->minfo.conn) { +- request->minfo.conn->exp_counter++; +- } +-#endif // ENABLE_DEBUG +-} +- +-static inline uint32_t +-fi_ibv_rdm_remove_from_posted_queue(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_posted_queue: ", request, +- FI_LOG_DEBUG); +- dlist_remove(&request->queue_entry); +- return ep->posted_recvs--; +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_posted_queue(struct fi_ibv_rdm_ep* ep) +-{ +- if (!dlist_empty(&ep->fi_ibv_rdm_posted_queue)) { +- struct fi_ibv_rdm_request *entry = +- container_of(ep->fi_ibv_rdm_posted_queue.next, +- struct fi_ibv_rdm_request, queue_entry); +- fi_ibv_rdm_remove_from_posted_queue(entry, ep); +- return entry; +- } +- return NULL; +-} +- +-static inline int +-fi_ibv_rdm_move_to_postponed_queue(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("move_to_postponed_queue: ", request, +- FI_LOG_DEBUG); +- assert(request && request->minfo.conn); +- +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- +- if (dlist_empty(&conn->postponed_requests_head)) { +- struct fi_ibv_rdm_postponed_entry *entry = +- util_buf_alloc(conn->ep->fi_ibv_rdm_postponed_pool); +- if (OFI_UNLIKELY(!entry)) { +- VERBS_WARN(FI_LOG_EP_DATA, "Unable to alloc buffer"); +- return -FI_ENOMEM; +- } +- +- entry->conn = conn; +- conn->postponed_entry = entry; +- +- dlist_insert_tail(&entry->queue_entry, +- &conn->ep->fi_ibv_rdm_postponed_queue); +- } +- dlist_insert_tail(&request->queue_entry, +- &conn->postponed_requests_head); +- +- return FI_SUCCESS; +-} +- +-static inline void +-fi_ibv_rdm_remove_from_multi_recv_list(struct fi_ibv_rdm_multi_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- dlist_remove(&request->list_entry); +-} +- +-static inline void +-fi_ibv_rdm_add_to_multi_recv_list(struct fi_ibv_rdm_multi_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- dlist_insert_tail(&request->list_entry, +- &ep->fi_ibv_rdm_multi_recv_list); +-} +- +-static inline struct fi_ibv_rdm_multi_request * +-fi_ibv_rdm_take_first_from_multi_recv_list(struct fi_ibv_rdm_ep *ep) +-{ +- if (!dlist_empty(&ep->fi_ibv_rdm_multi_recv_list)) { +- struct fi_ibv_rdm_multi_request *entry; +- dlist_pop_front(&ep->fi_ibv_rdm_multi_recv_list, +- struct fi_ibv_rdm_multi_request, +- entry, list_entry); +- return entry; +- } +- return NULL; +-} +- +-static inline void +-fi_ibv_rdm_remove_from_postponed_queue(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_postponed_queue: ", request, +- FI_LOG_DEBUG); +- +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- assert(conn); +- assert(!dlist_empty(&conn->postponed_requests_head)); +- +- /* +- * remove from conn->postponed_requests_head at first +- * then if conn->postponed_requests_head is empty +- * clean fi_ibv_rdm_postponed_queue +- */ +- +- dlist_remove(&request->queue_entry); +- request->queue_entry.next = request->queue_entry.prev = NULL; +- +- if (dlist_empty(&conn->postponed_requests_head)) { +- dlist_remove(&conn->postponed_entry->queue_entry); +- conn->postponed_entry->queue_entry.next = +- conn->postponed_entry->queue_entry.prev = NULL; +- conn->postponed_entry->conn = NULL; +- +- util_buf_release(conn->ep->fi_ibv_rdm_postponed_pool, +- conn->postponed_entry); +- conn->postponed_entry = NULL; +- } +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_postponed_queue(struct fi_ibv_rdm_ep *ep) +-{ +- if (!dlist_empty(&ep->fi_ibv_rdm_postponed_queue)) { +- struct fi_ibv_rdm_postponed_entry *entry = +- container_of(ep->fi_ibv_rdm_postponed_queue.next, +- struct fi_ibv_rdm_postponed_entry, queue_entry); +- +- if (!dlist_empty(&entry->conn->postponed_requests_head)) { +- struct dlist_entry *req_entry = +- entry->conn->postponed_requests_head.next; +- +- struct fi_ibv_rdm_request *request = +- container_of(req_entry, struct fi_ibv_rdm_request, +- queue_entry); +- fi_ibv_rdm_remove_from_postponed_queue(request); +- return request; +- } +- } +- +- return NULL; +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_match_from_postponed_queue(dlist_func_t *match, +- const void *arg, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct dlist_entry *i, *j; +- dlist_foreach((&ep->fi_ibv_rdm_postponed_queue), i) { +- struct fi_ibv_rdm_postponed_entry *entry = +- container_of(i, struct fi_ibv_rdm_postponed_entry, +- queue_entry); +- +- j = dlist_find_first_match((&entry->conn->postponed_requests_head), +- match, arg); +- if (j) { +- struct fi_ibv_rdm_request *request = +- container_of(j, struct fi_ibv_rdm_request, +- queue_entry); +- fi_ibv_rdm_remove_from_postponed_queue(request); +- return request; +- } +- } +- +- return NULL; +-} +- +-void fi_ibv_rdm_clean_queues(struct fi_ibv_rdm_ep* ep); +- +-#endif // _VERBS_QUEING_H +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm.h +deleted file mode 100644 +index ef4ba69..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm.h ++++ /dev/null +@@ -1,746 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _VERBS_RDM_H +-#define _VERBS_RDM_H +- +-#include +-#include +-#include +- +-#include "../fi_verbs.h" +-#include "verbs_utils.h" +-#include "verbs_tagged_ep_rdm_states.h" +- +-#define FI_IBV_EP_TYPE_IS_RDM(_info) \ +- (_info && _info->ep_attr && (_info->ep_attr->type == FI_EP_RDM)) +- +-#define FI_IBV_RDM_ST_PKTTYPE_MASK ((uint32_t) 0xFF) +-#define FI_IBV_RDM_EAGER_PKT 0 +-#define FI_IBV_RDM_RNDV_RTS_PKT 1 +-#define FI_IBV_RDM_RNDV_ACK_PKT 2 +-#define FI_IBV_RDM_RMA_PKT 3 +-#define FI_IBV_RDM_MSG_PKT 4 +-#define FI_IBV_RDM_SET_PKTTYPE(dest, type) (dest |= type) +-#define FI_IBV_RDM_GET_PKTTYPE(value) (value & FI_IBV_RDM_ST_PKTTYPE_MASK) +- +- +-/* ------- SERVICE_TAG layout --------- +- * [ 24 bits - Unused at the moment ] [ 8 bits - pkt type ] +- * IBV_RDM_ST_PKTYPE_MASK +- */ +- +-/* WR - work request */ +-#define FI_IBV_RDM_SERVICE_WR_MASK ((uint64_t)0x1) +-#define FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(value) \ +- (value & FI_IBV_RDM_SERVICE_WR_MASK) +- +-#define FI_IBV_RDM_PACK_WR(value) ((uint64_t)(uintptr_t)(void *)value) +-#define FI_IBV_RDM_UNPACK_WR(value) ((void *)(uintptr_t)value) +- +-#define FI_IBV_RDM_PACK_SERVICE_WR(value) \ +- (((uint64_t)(uintptr_t)(void *)value) | FI_IBV_RDM_SERVICE_WR_MASK) +- +-#define FI_IBV_RDM_UNPACK_SERVICE_WR(value) \ +- ((void *)(uintptr_t)(value & (~(FI_IBV_RDM_SERVICE_WR_MASK)))) +- +-/* Send/Recv counters control */ +-#define FI_IBV_RDM_INC_SIG_POST_COUNTERS(_connection, _ep) \ +-do { \ +- (_connection)->av_entry->sends_outgoing++; \ +- (_ep)->posted_sends++; \ +- VERBS_DBG(FI_LOG_CQ, "SEND_COUNTER++, conn %p, sends_outgoing %"PRIu32"\n", \ +- _connection, (_connection)->av_entry->sends_outgoing); \ +-} while (0) +- +-#define FI_IBV_RDM_DEC_SIG_POST_COUNTERS(_connection, _ep) \ +-do { \ +- (_connection)->av_entry->sends_outgoing--; \ +- (_ep)->posted_sends--; \ +- VERBS_DBG(FI_LOG_CQ, "SEND_COUNTER--, conn %p, sends_outgoing %"PRIu32"\n", \ +- _connection, (_connection)->av_entry->sends_outgoing); \ +-} while (0) +- +-#define OUTGOING_POST_LIMIT(_connection, _ep) \ +- ((_connection)->av_entry->sends_outgoing >= (_ep)->sq_wr_depth - 1) +- +-#define PEND_POST_LIMIT(_ep) \ +- ((_ep)->posted_sends > 0.5 * (_ep)->scq_depth) +- +-#define TSEND_RESOURCES_IS_BUSY(_connection, _ep) \ +- (OUTGOING_POST_LIMIT(_connection, _ep) || PEND_POST_LIMIT(_ep)) +- +-#define RMA_RESOURCES_IS_BUSY(_connection, _ep) \ +- (OUTGOING_POST_LIMIT(_connection, _ep) || PEND_POST_LIMIT(_ep)) +- +-#define GET_TX_COMP(ep_rdm) \ +- (!ep_rdm->rx_selective_completion || \ +- (ep_rdm->rx_op_flags & FI_COMPLETION) ? \ +- FI_COMPLETION : 0ULL) +- +-#define GET_TX_COMP_FLAG(ep_rdm, flag) \ +- (!ep_rdm->rx_selective_completion || \ +- (ep_rdm->rx_op_flags & FI_COMPLETION) ? \ +- FI_COMPLETION : (flags & FI_COMPLETION)) +- +-struct fi_ibv_rdm_header { +-/* uint64_t imm_data; TODO: not implemented */ +- uint64_t tag; +- uint32_t service_tag; +- uint32_t padding; +-}; +- +-struct fi_ibv_rdm_rndv_header { +- struct fi_ibv_rdm_header base; +- uint64_t src_addr; +- uint64_t id; /* pointer to request on sender side */ +- uint64_t total_len; +- uint64_t mem_rkey; +- uint32_t is_tagged; +-}; +- +-struct fi_ibv_rdm_multi_request { +- /* working request, will be renewed for every data arriving */ +- struct dlist_entry list_entry; +- struct fi_ibv_rdm_request *prepost; +- struct fi_ibv_rdm_ep *ep; +- uint8_t *buf; +- uint64_t len; +- uint64_t offset; +- uint64_t min_size; +-}; +- +-struct fi_ibv_rdm_request { +- +- /* Accessors and match info */ +- +- /* Request can be an element of only one queue at the moment */ +- struct dlist_entry queue_entry; +- /* multi recv handling */ +- struct fi_ibv_rdm_multi_request *parent; +- struct { +- enum fi_ibv_rdm_request_eager_state eager; +- enum fi_ibv_rdm_request_rndv_state rndv; +- ssize_t err; /* filled in case of moving to errcq */ +- } state; +- +- struct fi_ibv_rdm_ep *ep; +- struct fi_ibv_rdm_minfo minfo; +- +- /* User data: buffers, lens, imm, context */ +- +- union { +- void *src_addr; +- void *dest_buf; +- struct iovec *iovec_arr; +- }; +- +- union { +- void *exp_rbuf; +- struct fi_ibv_rdm_buf *unexp_rbuf; +- struct fi_ibv_rdm_buf *sbuf; +- struct fi_ibv_rdm_buf *rmabuf; +- struct iovec *rmaiovec_arr; +- }; +- +- /* +- * iovec_arr is a mem pool entry if iov_count > 0 +- * and must be freed properly +- */ +- uint64_t iov_count; +- uint64_t len; +- uint64_t rest_len; +- uint64_t comp_flags; +- struct fi_context *context; +- uint32_t post_counter; +- uint32_t imm; +- +- union { +- /* RNDV info */ +- struct { +- /* pointer to request on sender side */ +- uint64_t id; +- /* registered buffer on sender side */ +- void* remote_addr; +- /* registered mr of local src_addr */ +- struct fi_ibv_mem_desc md; +- uint64_t mr_rkey; +- } rndv; +- +- /* RMA info */ +- struct { +- struct fi_ibv_mem_desc md; +- uint64_t mr_rkey; +- uint64_t mr_lkey; +- uint64_t remote_addr; +- enum ibv_wr_opcode opcode; +- } rma; +- }; +-}; +- +-static inline void +-fi_ibv_rdm_zero_request(struct fi_ibv_rdm_request *request) +-{ +- memset(request, 0, sizeof(*request)); +-} +- +-void fi_ibv_rdm_print_request(char *buf, struct fi_ibv_rdm_request *request); +- +-#define BUF_STATUS_FREE ((uint16_t) 0) +-#define BUF_STATUS_BUSY ((uint16_t) 1) +-#define BUF_STATUS_RECEIVED ((uint16_t) 2) +- +-struct fi_ibv_rdm_buf_service_data { +- volatile uint16_t status; +- uint16_t seq_num; +- int32_t pkt_len; +-}; +- +-#define FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE \ +- (offsetof(struct fi_ibv_rdm_buf, header)) +- +-struct fi_ibv_rdm_buf { +- struct fi_ibv_rdm_buf_service_data service_data; +- struct fi_ibv_rdm_header header; +- uint64_t payload; +-}; +- +-struct fi_ibv_rdm_cm { +- struct rdma_event_channel* ec; +- struct rdma_cm_id* listener; +- int is_bound; +- +- /* av_hash has a sockaddr_in -> [ep - conn] associative */ +- struct fi_ibv_rdm_av_entry* av_hash; +- /* Used only for FI_AV_TABLE */ +- struct fi_ibv_rdm_av_entry** av_table; +- +- struct slist av_removed_entry_head; +- pthread_mutex_t cm_lock; +- pthread_t cm_progress_thread; +- int cm_progress_timeout; +- int fi_ibv_rdm_tagged_cm_progress_running; +-}; +- +-struct fi_ibv_rdm_cntr { +- struct fid_cntr fid; +- struct fi_ibv_domain *domain; +- ofi_atomic32_t ep_ref; +- uint64_t value; +- struct fi_cntr_attr attr; +- uint64_t err_count; +-}; +- +-struct fi_ibv_rdm_ep { +- struct fid_ep ep_fid; +- struct fi_ibv_domain *domain; +- struct slist_entry list_entry; +- struct fi_ibv_rdm_cq *fi_scq; +- struct fi_ibv_rdm_cq *fi_rcq; +- +- struct fi_ibv_rdm_cntr *send_cntr; +- struct fi_ibv_rdm_cntr *recv_cntr; +- struct fi_ibv_rdm_cntr *read_cntr; +- struct fi_ibv_rdm_cntr *write_cntr; +- +- struct fi_info *info; +- +- struct util_buf_pool *fi_ibv_rdm_request_pool; +- struct util_buf_pool *fi_ibv_rdm_multi_request_pool; +- struct util_buf_pool *fi_ibv_rdm_postponed_pool; +- /* +- * extra buffer size equal eager buffer size, +- * it is used for any intermediate needs like +- * unexpected recv, pack/unpack noncontig messages, etc +- */ +- struct util_buf_pool *fi_ibv_rdm_extra_buffers_pool; +- +- struct dlist_entry fi_ibv_rdm_posted_queue; +- struct dlist_entry fi_ibv_rdm_postponed_queue; +- struct dlist_entry fi_ibv_rdm_unexp_queue; +- struct dlist_entry fi_ibv_rdm_multi_recv_list; +- +- size_t addrlen; +- struct rdma_addrinfo *rai; +- struct sockaddr_in my_addr; +- +- struct fi_ibv_av *av; +- int tx_selective_completion; +- int rx_selective_completion; +- size_t min_multi_recv_size; +- uint64_t tx_op_flags; +- uint64_t rx_op_flags; +- +- /* +- * ibv_post_send opcode for eager messaging. +- * It must generate work completion in receive CQ +- */ +- enum ibv_wr_opcode eopcode; +- struct ibv_cq *scq; +- struct ibv_cq *rcq; +- +- int buff_len; +- int n_buffs; +- int rq_wr_depth; // RQ depth +- int sq_wr_depth; // SQ depth +- uint32_t posted_sends; +- uint32_t posted_recvs; +- int num_active_conns; +- int max_inline_rc; +- int rndv_threshold; +- int rndv_seg_size; +- size_t iov_per_rndv_thr; +- int scq_depth; +- int rcq_depth; +- +- int is_closing; +- int recv_preposted_threshold; +-}; +- +-enum fi_rdm_cm_conn_state { +- FI_VERBS_CONN_ALLOCATED, +- FI_VERBS_CONN_STARTED, +- FI_VERBS_CONN_REJECTED, +- FI_VERBS_CONN_ESTABLISHED, +- FI_VERBS_CONN_LOCAL_DISCONNECT, +- FI_VERBS_CONN_CLOSED +-}; +- +-enum fi_rdm_cm_role { +- FI_VERBS_CM_UNDEFINED, +- FI_VERBS_CM_ACTIVE, +- FI_VERBS_CM_PASSIVE, +- FI_VERBS_CM_SELF, +-}; +- +-struct fi_ibv_rdm_av_entry { +- /* association of conn and EPs */ +- struct fi_ibv_rdm_conn *conn_hash; +- struct sockaddr_in addr; +- uint32_t sends_outgoing; +- uint32_t recv_preposted; +- struct slist_entry removed_next; +- UT_hash_handle hh; +-}; +- +-struct fi_ibv_rdm_conn { +- +- /* +- * In normal case only qp[0] and id[0] are used. +- * qp[1] and id[1] are used for establishing connection to self +- * like passive side +- */ +- struct ibv_qp *qp[2]; +- struct rdma_cm_id *id[2]; +- struct sockaddr_in addr; +- struct fi_ibv_rdm_ep *ep; +- enum fi_rdm_cm_role cm_role; +- enum fi_rdm_cm_conn_state state; +- +- char *sbuf_mem_reg; +- struct fi_ibv_rdm_buf *sbuf_head; +- uint16_t sbuf_ack_status; +- +- char *rbuf_mem_reg; +- struct fi_ibv_rdm_buf *rbuf_head; +- +- char *rmabuf_mem_reg; +- struct fi_ibv_rdm_buf *rmabuf_head; +- +- struct dlist_entry postponed_requests_head; +- struct fi_ibv_rdm_postponed_entry *postponed_entry; +- +- struct fi_ibv_mem_desc s_md; +- struct fi_ibv_mem_desc r_md; +- struct fi_ibv_mem_desc ack_md; +- struct fi_ibv_mem_desc rma_md; +- +- uint32_t remote_sbuf_rkey; +- uint32_t remote_rbuf_rkey; +- +- char *remote_sbuf_mem_reg; +- char *remote_rbuf_mem_reg; +- struct fi_ibv_rdm_buf *remote_sbuf_head; +- +- /* counter for eager buffer releasing */ +- uint16_t recv_completions; +- /* counter to control OOO behaviour, works in pair with recv_completions */ +- uint16_t recv_processed; +- +- struct fi_ibv_rdm_av_entry *av_entry; +- UT_hash_handle hh; +-#if ENABLE_DEBUG +- size_t unexp_counter; +- size_t exp_counter; +-#endif +-}; +- +-struct fi_ibv_rdm_postponed_entry { +- struct dlist_entry queue_entry; +- +- struct fi_ibv_rdm_conn *conn; +-}; +- +-struct fi_conn_priv_params { +- char addr[FI_IBV_RDM_DFLT_ADDRLEN]; +- +- uint32_t rbuf_rkey; +- uint32_t sbuf_rkey; +- char *rbuf_mem_reg; +- char *sbuf_mem_reg; +-}; +- +-static inline void +-fi_ibv_rdm_set_buffer_status(struct fi_ibv_rdm_buf *buff, uint16_t status) +-{ +- buff->service_data.status = status; +- if (status == BUF_STATUS_FREE) { +- buff->service_data.pkt_len = 0; +- } +-} +- +-static inline int +-fi_ibv_rdm_buffer_check_seq_num(struct fi_ibv_rdm_buf *buff, uint16_t seq_num) +-{ +- VERBS_DBG(FI_LOG_EP_DATA, "seq num: %d <-> %d\n", +- buff->service_data.seq_num, seq_num); +- return (seq_num == buff->service_data.seq_num); +-} +- +-static inline uintptr_t +-fi_ibv_rdm_get_remote_addr(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_buf *local_sbuff) +-{ +- return (uintptr_t) (conn->remote_rbuf_mem_reg + +- ((char *)local_sbuff - conn->sbuf_mem_reg)); +-} +- +-static inline void +-fi_ibv_rdm_push_buff_pointer(char *area_start, size_t area_size, +- struct fi_ibv_rdm_buf **rdm_buff, size_t offset) +-{ +- char *buff = (char*)(*rdm_buff); +- char *buff_tmp = buff + offset; +- +- VERBS_DBG(FI_LOG_EP_DATA, "old_pointer: %p\n", buff); +- +- buff = buff_tmp < (area_start + area_size) ? buff_tmp : area_start; +- +- VERBS_DBG(FI_LOG_EP_DATA, "new_pointer: %p\n", buff); +- +- *rdm_buff = (struct fi_ibv_rdm_buf *)buff; +-} +- +-static inline void +-fi_ibv_rdm_push_sbuff_head(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- fi_ibv_rdm_push_buff_pointer(conn->sbuf_mem_reg, +- ep->buff_len * ep->n_buffs, +- &conn->sbuf_head, ep->buff_len); +-} +- +-static inline void +-fi_ibv_rdm_push_rmabuff_head(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- fi_ibv_rdm_push_buff_pointer(conn->rmabuf_mem_reg, +- ep->buff_len * ep->n_buffs, +- &conn->rmabuf_head, ep->buff_len); +-} +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_get_rmabuf(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, uint16_t seq_num) +-{ +- char *rmabuf = conn->rmabuf_mem_reg + (seq_num * ep->buff_len); +- VERBS_DBG(FI_LOG_EP_DATA, "rma buf %d\n", seq_num); +- return (struct fi_ibv_rdm_buf *) rmabuf; +-} +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_get_rbuf(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, uint16_t seq_num) +-{ +- struct fi_ibv_rdm_buf *rbuf = (struct fi_ibv_rdm_buf *) +- (conn->rbuf_mem_reg + (seq_num * ep->buff_len)); +- +- VERBS_DBG(FI_LOG_EP_DATA, "recv buf %d <-> %d\n", +- seq_num, rbuf->service_data.seq_num); +- +- return rbuf; +-} +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_get_sbuf(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, uint16_t seq_num) +-{ +- char *sbuf = conn->sbuf_mem_reg + (seq_num * ep->buff_len); +- VERBS_DBG(FI_LOG_EP_DATA, "send buf %d\n", seq_num); +- return (struct fi_ibv_rdm_buf *)sbuf; +-} +- +-static inline void +-fi_ibv_rdm_buffer_lists_init(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- int i; +- +- conn->sbuf_head = (struct fi_ibv_rdm_buf *)conn->sbuf_mem_reg; +- conn->rbuf_head = (struct fi_ibv_rdm_buf *)conn->rbuf_mem_reg; +- conn->sbuf_ack_status = BUF_STATUS_FREE; +- +- conn->rmabuf_head = (struct fi_ibv_rdm_buf *)conn->rmabuf_mem_reg; +- +- for (i = 0; i < ep->n_buffs; ++i) { +- fi_ibv_rdm_set_buffer_status(fi_ibv_rdm_get_sbuf(conn, ep, i), +- BUF_STATUS_FREE); +- fi_ibv_rdm_get_sbuf(conn, ep, i)->service_data.seq_num = i; +- +- fi_ibv_rdm_set_buffer_status(fi_ibv_rdm_get_rbuf(conn, ep, i), +- BUF_STATUS_FREE); +- /* should be initialized by sender */ +- fi_ibv_rdm_get_rbuf(conn, ep, i)->service_data.seq_num = +- (uint16_t)(-1); +- +- fi_ibv_rdm_set_buffer_status(fi_ibv_rdm_get_rmabuf(conn, ep, i), +- BUF_STATUS_FREE); +- fi_ibv_rdm_get_rmabuf(conn, ep, i)->service_data.seq_num = i; +- } +-} +- +-static inline void fi_ibv_rdm_cntr_inc(struct fi_ibv_rdm_cntr *cntr) +-{ +- if (cntr) { +- cntr->fid.ops->add(&cntr->fid, 1); +- } +-} +- +-static inline void fi_ibv_rdm_cntr_inc_err(struct fi_ibv_rdm_cntr *cntr) +-{ +- if (cntr) { +- cntr->err_count++; +- } +-} +- +-int fi_ibv_rdm_tagged_poll(struct fi_ibv_rdm_ep *ep); +-int fi_ibv_rdm_tagged_poll_recv(struct fi_ibv_rdm_ep *ep); +-ssize_t fi_ibv_rdm_cm_progress(struct fi_ibv_rdm_ep *ep); +-ssize_t +-fi_ibv_rdm_start_overall_disconnection(struct fi_ibv_rdm_av_entry *av_entry); +-ssize_t fi_ibv_rdm_start_disconnection(struct fi_ibv_rdm_conn *conn); +-int fi_ibv_av_entry_alloc(struct fi_ibv_domain *domain, +- struct fi_ibv_rdm_av_entry **av_entry, +- void *addr); +-ssize_t fi_ibv_rdm_conn_cleanup(struct fi_ibv_rdm_conn *conn); +-ssize_t fi_ibv_rdm_overall_conn_cleanup(struct fi_ibv_rdm_av_entry *av_entry); +-ssize_t fi_ibv_rdm_start_connection(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn); +-ssize_t fi_ibv_rdm_repost_receives(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, +- int num_to_post); +-int fi_ibv_rdm_tagged_open_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep, void *context); +-int fi_ibv_rdm_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq, void *context); +- +-int fi_ibv_rdm_tagged_prepare_send_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep); +-int fi_ibv_rdm_prepare_rma_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep); +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_get_sbuf_head(struct fi_ibv_rdm_conn *conn, struct fi_ibv_rdm_ep *ep) +-{ +- assert(conn); +- +-#if ENABLE_DEBUG +- { +- int i; +- char s[1024]; +- char *p = s; +- sprintf(p, "N:%1d ", ep->n_buffs); +- p += 4; +- for (i = 0; i < ep->n_buffs; ++i, p += 4) { +- struct fi_ibv_rdm_buf *buf = +- fi_ibv_rdm_get_sbuf(conn, ep, i); +- sprintf(p, "%1d:%1d ", buf->service_data.seq_num, +- buf->service_data.status); +- } +- VERBS_DBG(FI_LOG_EP_DATA, +- "conn %p sbufs status before: %s\n", conn, s); +- } +-#endif // ENABLE_DEBUG +- struct fi_ibv_rdm_buf *sbuf = NULL; +- +- if (conn->sbuf_head->service_data.status == BUF_STATUS_FREE) { +- +- /* We have made whole circle. Reset buffer states */ +- if (conn->sbuf_head == fi_ibv_rdm_get_sbuf(conn, ep, 0)) { +- do { +- fi_ibv_rdm_set_buffer_status(conn->sbuf_head, +- BUF_STATUS_FREE); +- fi_ibv_rdm_push_sbuff_head(conn, ep); +- } while (conn->sbuf_head != fi_ibv_rdm_get_sbuf(conn, ep, 0)); +- } +- +- /* notification for receiver */ +- fi_ibv_rdm_set_buffer_status(conn->sbuf_head, BUF_STATUS_RECEIVED); +- +- sbuf = conn->sbuf_head; +- fi_ibv_rdm_push_sbuff_head(conn, ep); +- } +-#if ENABLE_DEBUG +- assert(sbuf ? (sbuf->service_data.status == BUF_STATUS_RECEIVED) : 1); +- { +- int i; +- char s[1024]; +- char *p = s; +- sprintf(p, "N:%1d ", ep->n_buffs); +- p += 4; +- for (i = 0; i < ep->n_buffs; ++i, p += 4) { +- struct fi_ibv_rdm_buf *buf = +- fi_ibv_rdm_get_sbuf(conn, ep, i); +- sprintf(p, "%1d:%1d ", buf->service_data.seq_num, +- buf->service_data.status); +- } +- VERBS_DBG(FI_LOG_EP_DATA, +- "conn %p sbufs status after: %s\n", conn, s); +- } +- +- if (sbuf) { +- VERBS_DBG(FI_LOG_EP_DATA, "sending pkt # %d\n", +- sbuf->service_data.seq_num); +- } +-#endif // ENABLE_DEBUG +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "conn %p sbuf allocated: %p, head: %p, begin: %p\n", +- conn, sbuf, conn->sbuf_head, conn->sbuf_mem_reg); +- +- return sbuf; +-} +- +-static inline void * +-fi_ibv_rdm_rma_get_buf_head(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- assert(conn); +- void *buf = NULL; +- +- if (conn->rmabuf_head->service_data.status == BUF_STATUS_FREE) { +- fi_ibv_rdm_set_buffer_status(conn->rmabuf_head, BUF_STATUS_BUSY); +- buf = conn->rmabuf_head; +- fi_ibv_rdm_push_rmabuff_head(conn, ep); +- } +- return buf; +-} +- +-static inline int +-fi_ibv_rdm_check_connection(struct fi_ibv_rdm_conn *conn) +-{ +- return (conn->state == FI_VERBS_CONN_ESTABLISHED); +-} +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_prepare_send_resources(struct fi_ibv_rdm_conn *conn) +-{ +- return (fi_ibv_rdm_check_connection(conn) && +- !TSEND_RESOURCES_IS_BUSY(conn, conn->ep)) ? +- fi_ibv_rdm_get_sbuf_head(conn, conn->ep) : NULL; +-} +- +-static inline void * +-fi_ibv_rdm_rma_prepare_resources(struct fi_ibv_rdm_conn *conn) +-{ +- return (fi_ibv_rdm_check_connection(conn) && +- !TSEND_RESOURCES_IS_BUSY(conn, conn->ep)) ? +- fi_ibv_rdm_rma_get_buf_head(conn, conn->ep) : NULL; +-} +- +-static inline int +-fi_ibv_rdm_process_send_wc(struct fi_ibv_rdm_ep *ep, +- struct ibv_wc *wc) +-{ +- if (wc->status != IBV_WC_SUCCESS) { +- return 1; +- } +- +- if (FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wc->wr_id)) { +- VERBS_DBG(FI_LOG_EP_DATA, "CQ COMPL: SEND -> 0x1\n"); +- struct fi_ibv_rdm_conn *conn = +- (struct fi_ibv_rdm_conn *) +- FI_IBV_RDM_UNPACK_SERVICE_WR(wc->wr_id); +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(conn, ep); +- +- return 0; +- } else { +- FI_IBV_DBG_OPCODE(wc->opcode, "SEND"); +- struct fi_ibv_rdm_request *request = +- FI_IBV_RDM_UNPACK_WR(wc->wr_id); +- +- struct fi_ibv_rdm_tagged_send_completed_data data = +- { .ep = ep }; +- +- return fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_LC, +- &data); +- } +-} +- +-static inline void +-fi_ibv_rdm_process_err_send_wc(struct fi_ibv_rdm_ep *ep, +- struct ibv_wc *wc) +-{ +- if (wc->status != IBV_WC_SUCCESS) { +- struct fi_ibv_rdm_conn *conn; +- if (FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wc->wr_id)) { +- conn = FI_IBV_RDM_UNPACK_SERVICE_WR(wc->wr_id); +- } else { +- struct fi_ibv_rdm_request *req = +- FI_IBV_RDM_UNPACK_WR(wc->wr_id); +- conn = req->minfo.conn; +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", req, +- FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, req); +- } +- VERBS_INFO(FI_LOG_EP_DATA, "got ibv_wc.status = %d:%s, " +- "pend_send: %"PRIu32", connection: %p, request = %p (%s)\n", +- wc->status, +- ibv_wc_status_str(wc->status), +- ep->posted_sends, conn, +- (void *)wc->wr_id, +- FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wc->wr_id) ? +- "service" : "not service"); +- } +-} +- +-#endif /* _VERBS_RDM_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cm.c +deleted file mode 100644 +index a5ea208..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cm.c ++++ /dev/null +@@ -1,839 +0,0 @@ +-/* +- * Copyright (c) 2013-2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +-#include +- +-#include "../fi_verbs.h" +-#include "verbs_utils.h" +-#include "verbs_rdm.h" +-#include "verbs_queuing.h" +- +-extern struct fi_provider fi_ibv_prov; +- +-static inline ssize_t +-fi_ibv_rdm_batch_repost_receives(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, int num_to_post) +-{ +- const size_t idx = (conn->cm_role == FI_VERBS_CM_SELF) ? 1 : 0; +- struct ibv_recv_wr *bad_wr = NULL; +- struct ibv_recv_wr wr[num_to_post]; +- struct ibv_sge sge[num_to_post]; +- int i, last = num_to_post - 1; +- +- /* IBV_WR_SEND opcode specific */ +- assert((num_to_post % ep->n_buffs) == 0); +- +- assert(ep->eopcode == IBV_WR_SEND || +- ep->eopcode == IBV_WR_RDMA_WRITE_WITH_IMM); +- +- if (ep->eopcode == IBV_WR_SEND) { +- if (last >= 0) { +- sge[last].addr = (uint64_t)(uintptr_t) +- fi_ibv_rdm_get_rbuf(conn, ep, +- last % ep->n_buffs); +- sge[last].length = ep->buff_len; +- sge[last].lkey = +- fi_ibv_mr_internal_lkey(&conn->r_md); +- +- wr[last].wr_id = (uintptr_t)conn; +- wr[last].next = NULL; +- wr[last].sg_list = &sge[last]; +- wr[last].num_sge = 1; +- } +- for (i = num_to_post - 2; i >= 0; i--) { +- sge[i].addr = (uint64_t)(uintptr_t) +- fi_ibv_rdm_get_rbuf(conn, ep, +- i % ep->n_buffs); +- sge[i].length = ep->buff_len; +- sge[i].lkey = +- fi_ibv_mr_internal_lkey(&conn->r_md); +- +- wr[i].wr_id = (uintptr_t)conn; +- wr[i].next = &wr[i + 1]; +- wr[i].sg_list = &sge[i]; +- wr[i].num_sge = 1; +- } +- } else { +- if (last >= 0) { +- wr[last].wr_id = (uintptr_t)conn; +- wr[last].next = NULL; +- wr[last].sg_list = &sge[last]; +- wr[last].num_sge = 1; +- } +- for (i = num_to_post - 2; i >= 0; i--) { +- wr[i].wr_id = (uintptr_t)conn; +- wr[i].next = &wr[i + 1]; +- wr[i].sg_list = &sge[i]; +- wr[i].num_sge = 1; +- } +- } +- +- if (ibv_post_recv(conn->qp[idx], wr, &bad_wr) == 0) { +- conn->av_entry->recv_preposted += num_to_post; +- return num_to_post; +- } +- +- VERBS_INFO(FI_LOG_EP_DATA, "Failed to post recv\n"); +- return -FI_ENOMEM; +-} +- +-ssize_t fi_ibv_rdm_repost_receives(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, int num_to_post) +-{ +- assert(num_to_post > 0); +- const ssize_t batch_size = ep->n_buffs * 10; +- +- ssize_t rest = num_to_post - (num_to_post % ep->n_buffs); +- ssize_t count = 0; +- while (rest) { +- const ssize_t batch = MIN(rest, batch_size); +- const ssize_t ret = +- fi_ibv_rdm_batch_repost_receives(conn, ep, batch); +- +- if (ret < 0) { +- return ret; +- } +- +- count += ret; +- rest -= ret; +- +- assert(ret == batch); +- } +- +- return count; +-} +- +-static ssize_t +-fi_ibv_rdm_prepare_conn_memory(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- assert(conn->s_md.mr == NULL); +- assert(conn->r_md.mr == NULL); +- +- const size_t size = ep->buff_len * ep->n_buffs; +- int ret; +- void *ack_status = &conn->sbuf_ack_status; +- +- ret = fi_ibv_rdm_alloc_and_reg(ep, (void **)&conn->sbuf_mem_reg, +- size, &conn->s_md); +- if (ret) { +- assert(!ret); +- goto s_err; +- } +- +- ret = fi_ibv_rdm_alloc_and_reg(ep, (void **)&conn->rbuf_mem_reg, +- size, &conn->r_md); +- if (ret) { +- assert(!ret); +- goto r_err; +- } +- +- ret = fi_ibv_rdm_alloc_and_reg(ep, &ack_status, +- sizeof(conn->sbuf_ack_status), +- &conn->ack_md); +- if (ret) { +- assert(conn->ack_md.mr); +- goto ack_err; +- } +- +- ret = fi_ibv_rdm_alloc_and_reg(ep, (void **)&conn->rmabuf_mem_reg, +- size, &conn->rma_md); +- if (ret) { +- assert(!ret); +- goto rma_err; +- } +- +- fi_ibv_rdm_buffer_lists_init(conn, ep); +- +- return FI_SUCCESS; +- +-/* Error handling */ +-rma_err: +- free(conn->rmabuf_mem_reg); +-ack_err: /* +- * Ack buffer is a part of connection structure, freeing is not needed +- */ +-r_err: +- free(conn->rbuf_mem_reg); +-s_err: +- free(conn->sbuf_mem_reg); +- +- /* The is a lack of host or HCA memory */ +- return -FI_ENOMEM; +-} +- +-static inline void +-fi_ibv_rdm_tagged_init_qp_attributes(struct ibv_qp_init_attr *qp_attr, +- struct fi_ibv_rdm_ep *ep) +-{ +- assert(ep->scq && ep->rcq); +- memset(qp_attr, 0, sizeof(*qp_attr)); +- qp_attr->send_cq = ep->scq; +- qp_attr->recv_cq = ep->rcq; +- qp_attr->qp_type = IBV_QPT_RC; +- qp_attr->cap.max_send_wr = ep->sq_wr_depth; +- qp_attr->cap.max_recv_wr = ep->rq_wr_depth; +- qp_attr->cap.max_send_sge = 1; +- qp_attr->cap.max_recv_sge = 1; +- qp_attr->cap.max_inline_data = ep->max_inline_rc; +- qp_attr->sq_sig_all = 1; +-} +- +-static void +-fi_ibv_rdm_pack_cm_params(struct rdma_conn_param *cm_params, +- struct fi_conn_priv_params *priv, +- const struct fi_ibv_rdm_conn *conn, +- const struct fi_ibv_rdm_ep *ep) +-{ +- memset(cm_params, 0, sizeof(struct rdma_conn_param)); +- cm_params->responder_resources = 2; +- cm_params->initiator_depth = 2; +- cm_params->private_data = priv; +- +- memcpy(priv->addr, &ep->my_addr, FI_IBV_RDM_DFLT_ADDRLEN); +- +- if ((conn->cm_role != FI_VERBS_CM_SELF) && +- conn->r_md.mr && conn->s_md.mr) { +- cm_params->private_data_len = sizeof(*priv); +- +- priv->rbuf_rkey = fi_ibv_mr_internal_rkey( +- (struct fi_ibv_mem_desc *)&conn->r_md); +- priv->rbuf_mem_reg = conn->rbuf_mem_reg; +- priv->sbuf_rkey = fi_ibv_mr_internal_rkey( +- (struct fi_ibv_mem_desc *)&conn->s_md); +- priv->sbuf_mem_reg = conn->sbuf_mem_reg; +- } else { +- cm_params->private_data_len = FI_IBV_RDM_DFLT_ADDRLEN; +- } +-} +- +- +-static void +-fi_ibv_rdm_unpack_cm_params(const struct rdma_conn_param *cm_param, +- struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- const struct fi_conn_priv_params *priv = cm_param->private_data; +- +- if (conn->cm_role == FI_VERBS_CM_SELF) { +- if (conn->r_md.mr && conn->s_md.mr) { +- memcpy(&conn->addr, &ep->my_addr, +- FI_IBV_RDM_DFLT_ADDRLEN); +- conn->remote_rbuf_rkey = +- fi_ibv_mr_internal_rkey(&conn->r_md); +- conn->remote_rbuf_mem_reg = conn->r_md.mr->addr; +- +- conn->remote_sbuf_rkey = +- fi_ibv_mr_internal_rkey(&conn->s_md); +- conn->remote_sbuf_mem_reg = conn->s_md.mr->addr; +- +- conn->remote_sbuf_head = (struct fi_ibv_rdm_buf *) +- conn->remote_sbuf_mem_reg; +- } +- } else { +- if (conn->state == FI_VERBS_CONN_ALLOCATED) { +- memcpy(&conn->addr, priv->addr, FI_IBV_RDM_DFLT_ADDRLEN); +- } +- +- conn->remote_rbuf_rkey = priv->rbuf_rkey; +- conn->remote_rbuf_mem_reg = priv->rbuf_mem_reg; +- conn->remote_sbuf_rkey = priv->sbuf_rkey; +- conn->remote_sbuf_mem_reg = priv->sbuf_mem_reg; +- +- conn->remote_sbuf_head = (struct fi_ibv_rdm_buf *) +- conn->remote_sbuf_mem_reg; +- } +-} +- +-static ssize_t +-fi_ibv_rdm_process_addr_resolved(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- ssize_t ret = FI_SUCCESS; +- struct ibv_qp_init_attr qp_attr; +- struct fi_ibv_rdm_conn *conn = event->id->context; +- struct rdma_cm_id *id = event->id; +- +- VERBS_INFO(FI_LOG_AV, "ADDR_RESOLVED conn %p, addr %s:%u\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- +- assert(id->verbs == ep->domain->verbs); +- +- fi_ibv_rdm_tagged_init_qp_attributes(&qp_attr, ep); +- if (rdma_create_qp(id, ep->domain->pd, &qp_attr)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, +- "rdma_create_qp failed\n", errno); +- return -errno; +- } +- +- if (conn->cm_role == FI_VERBS_CM_PASSIVE) +- goto resolve_route; +- +- conn->qp[0] = id->qp; +- assert(conn->id[0] == id); +- if (conn->cm_role == FI_VERBS_CM_SELF) +- goto resolve_route; +- +- ret = fi_ibv_rdm_prepare_conn_memory(ep, conn); +- if (ret != FI_SUCCESS) +- goto err; +- +- ret = fi_ibv_rdm_repost_receives(conn, ep, ep->rq_wr_depth); +- if (ret < 0) { +- VERBS_INFO(FI_LOG_AV, "repost receives failed\n"); +- goto err; +- } else { +- ret = FI_SUCCESS; +- } +- +-resolve_route: +- if (rdma_resolve_route(id, FI_IBV_RDM_CM_RESOLVEADDR_TIMEOUT)) { +- VERBS_INFO(FI_LOG_AV, "rdma_resolve_route failed\n"); +- ret = -FI_EHOSTUNREACH; +- goto err; +- } +- +- return ret; +-err: +- rdma_destroy_qp(id); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_process_connect_request(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct ibv_qp_init_attr qp_attr; +- struct rdma_conn_param cm_params; +- struct fi_conn_priv_params priv; +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- struct rdma_cm_id *id = event->id; +- struct fi_ibv_rdm_conn *conn; +- ssize_t ret = FI_SUCCESS; +- +- char *p = (char *) event->param.conn.private_data; +- +- if (ep->is_closing) { +- int rej_message = 0xdeadbeef; +- if (rdma_reject(id, &rej_message, sizeof(rej_message))) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_reject\n", errno); +- ret = -errno; +- if (rdma_destroy_id(id)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id\n", +- errno); +- ret = (ret == FI_SUCCESS) ? -errno : ret; +- } +- } +- assert(ret == FI_SUCCESS); +- return ret; +- } +- +- HASH_FIND(hh, ep->domain->rdm_cm->av_hash, p, +- FI_IBV_RDM_DFLT_ADDRLEN, av_entry); +- +- if (!av_entry) { +- ret = fi_ibv_av_entry_alloc(ep->domain, &av_entry, p); +- if (ret) +- return ret; +- +- ret = ofi_memalign((void**)&conn, +- FI_IBV_MEM_ALIGNMENT, +- sizeof(*conn)); +- if (ret) { +- ofi_freealign(av_entry); +- return -ret; +- } +- +- memset(conn, 0, sizeof(*conn)); +- conn->av_entry = av_entry; +- conn->ep = ep; +- conn->state = FI_VERBS_CONN_ALLOCATED; +- dlist_init(&conn->postponed_requests_head); +- fi_ibv_rdm_unpack_cm_params(&event->param.conn, conn, ep); +- fi_ibv_rdm_conn_init_cm_role(conn, ep); +- HASH_ADD(hh, av_entry->conn_hash, ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- +- VERBS_INFO(FI_LOG_AV, "CONN REQUEST, NOT found in hash, " +- "new conn %p %d, addr %s:%u, HASH ADD\n", +- conn, conn->cm_role, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- } else { +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- if (!conn) { +- ret = ofi_memalign((void**)&conn, +- FI_IBV_MEM_ALIGNMENT, +- sizeof(*conn)); +- if (ret) +- return -ret; +- memset(conn, 0, sizeof(*conn)); +- conn->ep = ep; +- conn->av_entry = av_entry; +- dlist_init(&conn->postponed_requests_head); +- conn->state = FI_VERBS_CONN_ALLOCATED; +- memcpy(&conn->addr, &av_entry->addr, FI_IBV_RDM_DFLT_ADDRLEN); +- HASH_ADD(hh, av_entry->conn_hash, ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- } +- fi_ibv_rdm_conn_init_cm_role(conn, ep); +- if (conn->cm_role != FI_VERBS_CM_ACTIVE) { +- /* +- * Do it before rdma_create_qp since that call would +- * modify event->param.conn.private_data buffer +- */ +- fi_ibv_rdm_unpack_cm_params(&event->param.conn, conn, +- ep); +- } +- +- VERBS_INFO(FI_LOG_AV, +- "CONN REQUEST, FOUND in hash, conn %p %d, addr %s:%u\n", +- conn, conn->cm_role, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- } +- +- if (conn->cm_role == FI_VERBS_CM_ACTIVE) { +- int rej_message = 0xdeadbeef; +- if (rdma_reject(id, &rej_message, sizeof(rej_message))) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_reject\n", errno); +- ret = -errno; +- if (rdma_destroy_id(id)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id\n", +- errno); +- ret = (ret == FI_SUCCESS) ? -errno : ret; +- } +- } +- if (conn->state == FI_VERBS_CONN_ALLOCATED) { +- ret = fi_ibv_rdm_start_connection(ep, conn); +- if (ret != FI_SUCCESS) +- goto err; +- } +- } else { +- assert(conn->state == FI_VERBS_CONN_ALLOCATED || +- conn->state == FI_VERBS_CONN_STARTED); +- +- const size_t idx = (conn->cm_role == FI_VERBS_CM_SELF) ? 1 : 0; +- +- conn->state = FI_VERBS_CONN_STARTED; +- assert (conn->id[idx] == NULL); +- conn->id[idx] = id; +- +- ret = fi_ibv_rdm_prepare_conn_memory(ep, conn); +- if (ret != FI_SUCCESS) +- goto err; +- +- fi_ibv_rdm_tagged_init_qp_attributes(&qp_attr, ep); +- if (rdma_create_qp(id, ep->domain->pd, &qp_attr)) { +- ret = -errno; +- goto err; +- } +- conn->qp[idx] = id->qp; +- +- ret = fi_ibv_rdm_repost_receives(conn, ep, ep->rq_wr_depth); +- if (ret < 0) { +- VERBS_INFO(FI_LOG_AV, "repost receives failed\n"); +- goto err; +- } else { +- ret = FI_SUCCESS; +- } +- +- id->context = conn; +- +- fi_ibv_rdm_pack_cm_params(&cm_params, &priv, conn, ep); +- +- if (rdma_accept(id, &cm_params)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_accept\n", errno); +- ret = -errno; +- goto err; +- } +- } +- +- return ret; +-err: +- /* ret err code is already set here, just cleanup resources */ +- fi_ibv_rdm_conn_cleanup(conn); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_process_route_resolved(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn = event->id->context; +- ssize_t ret = FI_SUCCESS; +- struct rdma_conn_param cm_params; +- struct fi_conn_priv_params priv; +- +- fi_ibv_rdm_pack_cm_params(&cm_params, &priv, conn, ep); +- +- VERBS_INFO(FI_LOG_AV, +- "ROUTE RESOLVED, conn %p, addr %s:%u\n", conn, +- inet_ntoa(conn->addr.sin_addr), ntohs(conn->addr.sin_port)); +- +- if (rdma_connect(event->id, &cm_params)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, +- "rdma_connect failed\n", errno); +- ret = -errno; +- +- assert(0); +- } +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_process_event_established(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn = +- (struct fi_ibv_rdm_conn *)event->id->context; +- +- if (conn->state != FI_VERBS_CONN_STARTED && +- conn->cm_role != FI_VERBS_CM_SELF) { +- VERBS_WARN(FI_LOG_AV, "Wrong state! state = %d, conn %p", +- conn->state, conn); +- assert(0); +- return -FI_ECONNABORTED; +- } +- +- if (conn->cm_role == FI_VERBS_CM_ACTIVE || +- conn->cm_role == FI_VERBS_CM_SELF) +- { +- fi_ibv_rdm_unpack_cm_params(&event->param.conn, conn, ep); +- } +- +- VERBS_INFO(FI_LOG_AV, "CONN ESTABLISHED, conn %p, addr %s:%u\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- +- /* Do not count self twice */ +- if (conn->state != FI_VERBS_CONN_ESTABLISHED) { +- ep->num_active_conns++; +- conn->state = FI_VERBS_CONN_ESTABLISHED; +- } +- return FI_SUCCESS; +-} +- +-/* since the function is invoked only in the `fi_ibv_domain_close` +- * after CM progress thread is closed, it's unnecessary to call this +- * with `rdm_cm::cm_lock held` */ +-ssize_t fi_ibv_rdm_overall_conn_cleanup(struct fi_ibv_rdm_av_entry *av_entry) +-{ +- struct fi_ibv_rdm_conn *conn = NULL, *tmp = NULL; +- ssize_t ret = FI_SUCCESS; +- ssize_t err = FI_SUCCESS; +- +- HASH_ITER(hh, av_entry->conn_hash, conn, tmp) { +- ret = fi_ibv_rdm_conn_cleanup(conn); +- if (ret) { +- VERBS_INFO(FI_LOG_AV, "Conn cleanup failed (%zd) " +- "for av_entry = %p", ret, av_entry); +- err = ret; +- } +- } +- +- return err; +-} +- +-ssize_t fi_ibv_rdm_conn_cleanup(struct fi_ibv_rdm_conn *conn) +-{ +- ssize_t ret = FI_SUCCESS; +- ssize_t err = FI_SUCCESS; +- +- VERBS_DBG(FI_LOG_AV, "conn %p, exp = %zu unexp = %zu\n", conn, +- conn->exp_counter, conn->unexp_counter); +- +- if (conn->id[0]) { +- if (conn->id[0]->qp) +- rdma_destroy_qp(conn->id[0]); +- +- if (rdma_destroy_id(conn->id[0])) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id\n", errno); +- if (ret == FI_SUCCESS) +- ret = -errno; +- } +- conn->id[0] = NULL; +- } +- +- if (conn->id[1]) { +- assert(conn->cm_role == FI_VERBS_CM_SELF); +- if (conn->id[1]->qp) +- rdma_destroy_qp(conn->id[1]); +- +- if (rdma_destroy_id(conn->id[1])) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id\n", errno); +- if (ret == FI_SUCCESS) +- ret = -errno; +- } +- conn->id[1] = NULL; +- } +- +- if (conn->s_md.mr) { +- err = fi_ibv_rdm_dereg_and_free(&conn->s_md, &conn->sbuf_mem_reg); +- if ((err != FI_SUCCESS) && (ret == FI_SUCCESS)) +- ret = err; +- } +- if (conn->r_md.mr) { +- err = fi_ibv_rdm_dereg_and_free(&conn->r_md, &conn->rbuf_mem_reg); +- if ((err != FI_SUCCESS) && (ret == FI_SUCCESS)) +- ret = err; +- } +- if (conn->ack_md.mr) { +- ret = fi_ibv_rdm_dereg_and_free(&conn->ack_md, NULL); +- if (ret) { +- VERBS_WARN(FI_LOG_AV, +- "Unable to dereg MR, ret = %"PRId64"\n", +- ret); +- } +- } +- +- if (conn->rma_md.mr) { +- err = fi_ibv_rdm_dereg_and_free(&conn->rma_md, +- &conn->rmabuf_mem_reg); +- if ((err != FI_SUCCESS) && (ret == FI_SUCCESS)) +- ret = err; +- } +- +- ofi_freealign(conn); +- return ret; +-} +- +-static int fi_ibv_rdm_poll_cq(struct fi_ibv_rdm_ep *ep) +-{ +- int i, ret = 0; +- const int wc_count = ep->fi_scq->read_bunch_size; +- struct ibv_wc wc[wc_count]; +- +- ret = ibv_poll_cq(ep->scq, wc_count, wc); +- for (i = 0; i < ret; ++i) +- if (fi_ibv_rdm_process_send_wc(ep, &wc[i])) +- fi_ibv_rdm_process_err_send_wc(ep, &wc[i]); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_process_event_disconnected(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn = event->id->context; +- int ret = 0; +- +- ep->num_active_conns--; +- conn->state = FI_VERBS_CONN_CLOSED; +- +- VERBS_INFO(FI_LOG_AV, +- "Disconnected from conn %p, addr %s:%u\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- +- /* Retrieve CQ entries from send Completion Queue if any */ +- do { +- ret = fi_ibv_rdm_poll_cq(ep); +- } while (ret > 0); +- +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_process_event_rejected(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +- +-{ +- struct fi_ibv_rdm_conn *conn = event->id->context; +- ssize_t ret = FI_SUCCESS; +- const int *pdata = event->param.conn.private_data; +- +- if (ep->is_closing) { +- conn->state = FI_VERBS_CONN_CLOSED; +- } else if ((pdata && *pdata == 0xdeadbeef) || +- /* +- * TODO: this is a workaround of the case when private_data is not +- * arriving from rdma_reject call on iWarp devices +- */ +- (conn->cm_role == FI_VERBS_CM_PASSIVE && +- event->status == -ECONNREFUSED)) { +- rdma_destroy_qp(event->id); +- +- if (rdma_destroy_id(event->id)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id failed\n", +- errno); +- if (ret == FI_SUCCESS) +- ret = -errno; +- } +- } else { +- VERBS_INFO(FI_LOG_AV, +- "Unexpected REJECT from conn %p, addr %s:%u, cm_role %d, " +- "msg len %d, msg %x, status %d, err %d\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port), +- conn->cm_role, +- event->param.conn.private_data_len, +- event->param.conn.private_data ? +- *(int *)event->param.conn.private_data : 0, +- event->status, errno); +- conn->state = FI_VERBS_CONN_REJECTED; +- return FI_SUCCESS; +- } +- +- VERBS_INFO(FI_LOG_AV, +- "Rejected %s from conn %p, addr %s:%u, cm_role %d, status %d\n", +- (ep->is_closing ? "(not handled)" : ""), +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port), +- conn->cm_role, +- event->status); +- return ret; +-} +- +-static inline void +-fi_ibv_rdm_process_timewait_exit_event(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn = event->id->context; +- struct fi_ibv_rdm_request *request = NULL; +- +- VERBS_INFO(FI_LOG_AV, "Handle TIMEWAIT Exit event " +- "from conn %p, addr %s:%u\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- +- /* Cleanup posted queue */ +- while (NULL != +- (request = fi_ibv_rdm_take_first_from_posted_queue(ep))) { +- request->context->internal[0] = NULL; +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +-} +- +-/* Must call with `rdm_cm::cm_lock held` */ +-static ssize_t +-fi_ibv_rdm_process_event(const struct rdma_cm_event *event, struct fi_ibv_rdm_ep *ep) +-{ +- ssize_t ret = FI_SUCCESS; +- switch (event->event) { +- case RDMA_CM_EVENT_ADDR_RESOLVED: +- ret = fi_ibv_rdm_process_addr_resolved(event, ep); +- break; +- case RDMA_CM_EVENT_ROUTE_RESOLVED: +- ret = fi_ibv_rdm_process_route_resolved(event, ep); +- break; +- case RDMA_CM_EVENT_ESTABLISHED: +- ret = fi_ibv_rdm_process_event_established(event, ep); +- break; +- case RDMA_CM_EVENT_DISCONNECTED: +- ret = fi_ibv_rdm_process_event_disconnected(event, ep); +- break; +- case RDMA_CM_EVENT_CONNECT_REQUEST: +- ret = fi_ibv_rdm_process_connect_request(event, ep); +- break; +- case RDMA_CM_EVENT_REJECTED: +- ret = fi_ibv_rdm_process_event_rejected(event, ep); +- break; +- case RDMA_CM_EVENT_TIMEWAIT_EXIT: +- fi_ibv_rdm_process_timewait_exit_event(event, ep); +- ret = FI_SUCCESS; +- break; +- case RDMA_CM_EVENT_ADDR_ERROR: +- ret = -FI_EADDRNOTAVAIL; +- goto print_err; +- case RDMA_CM_EVENT_ROUTE_ERROR: +- ret = -FI_EHOSTUNREACH; +- goto print_err; +- case RDMA_CM_EVENT_CONNECT_ERROR: +- ret = -FI_ECONNREFUSED; +- goto print_err; +- case RDMA_CM_EVENT_UNREACHABLE: +- ret = -FI_EADDRNOTAVAIL; +- goto print_err; +- default: +- ret = -FI_ECONNABORTED; +-print_err: +- VERBS_INFO(FI_LOG_AV, "got unexpected rdmacm event, %s\n", +- rdma_event_str(event->event)); +- break; +- } +- +- return ret; +-} +- +-ssize_t fi_ibv_rdm_cm_progress(struct fi_ibv_rdm_ep *ep) +-{ +- ssize_t ret; +- +- do { +- struct rdma_cm_event event_copy; +- struct fi_conn_priv_params priv; +- struct rdma_cm_event *event; +- +- if (rdma_get_cm_event(ep->domain->rdm_cm->ec, &event)) { +- if (errno == EAGAIN) { +- usleep(ep->domain->rdm_cm->cm_progress_timeout); +- ret = FI_SUCCESS; +- break; +- } +- +- VERBS_INFO_ERRNO(FI_LOG_AV, +- "rdma_get_cm_event failed\n", errno); +- ret = -errno; +- break; +- } +- +- memcpy(&event_copy, event, sizeof(*event)); +- if (event->param.conn.private_data_len) { +- size_t len = MIN(event->param.conn.private_data_len, +- sizeof(struct fi_conn_priv_params)); +- +- memcpy(&priv, event->param.conn.private_data, len); +- +- event_copy.param.conn.private_data = &priv; +- event_copy.param.conn.private_data_len = len; +- } +- +- if (rdma_ack_cm_event(event)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, +- "rdma_get_cm_event failed\n", errno); +- ret = -errno; +- break; +- } +- +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- ret = fi_ibv_rdm_process_event(&event_copy, ep); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- } while (ret == FI_SUCCESS); +- +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cntr.c +deleted file mode 100644 +index bd763c9..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cntr.c ++++ /dev/null +@@ -1,168 +0,0 @@ +-/* +- * Copyright (c) 2013-2017 Intel Corporation, Inc. All rights reserved. +- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "ofi_enosys.h" +- +-#include "verbs_rdm.h" +- +- +-static uint64_t fi_ibv_rdm_cntr_read(struct fid_cntr *cntr_fid) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- return cntr->value; +-} +- +-static uint64_t fi_ibv_rdm_cntr_readerr(struct fid_cntr *cntr_fid) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- return cntr->err_count; +-} +- +-static int fi_ibv_rdm_cntr_add(struct fid_cntr *cntr_fid, uint64_t value) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- cntr->value += value; +- return 0; +-} +- +-static int fi_ibv_rdm_cntr_set(struct fid_cntr *cntr_fid, uint64_t value) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- cntr->value = value; +- return 0; +-} +- +-static int fi_ibv_rdm_cntr_adderr(struct fid_cntr *cntr_fid, uint64_t value) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- cntr->err_count += value; +- return 0; +-} +- +-static int fi_ibv_rdm_cntr_seterr(struct fid_cntr *cntr_fid, uint64_t value) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- cntr->err_count = value; +- return 0; +-} +- +-static struct fi_ops_cntr fi_ibv_rdm_cntr_ops = { +- .size = sizeof(struct fi_ops_cntr), +- .read = fi_ibv_rdm_cntr_read, +- .readerr = fi_ibv_rdm_cntr_readerr, +- .add = fi_ibv_rdm_cntr_add, +- .set = fi_ibv_rdm_cntr_set, +- .wait = fi_no_cntr_wait, +- .adderr = fi_ibv_rdm_cntr_adderr, +- .seterr = fi_ibv_rdm_cntr_seterr, +-}; +- +-static int fi_ibv_rdm_cntr_close(struct fid *fid) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(fid, struct fi_ibv_rdm_cntr, fid); +- +- if (ofi_atomic_get32(&cntr->ep_ref) > 0) { +- return -FI_EBUSY; +- } +- +- free(cntr); +- return 0; +-} +- +-static struct fi_ops fi_ibv_rdm_cntr_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_rdm_cntr_close, +- .bind = fi_no_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +-int fi_rbv_rdm_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, +- struct fid_cntr **cntr_fid, void *context) +-{ +- struct fi_ibv_rdm_cntr *cntr; +- +- struct fi_ibv_domain *dom = +- container_of(domain, struct fi_ibv_domain, util_domain.domain_fid); +- +- if (attr) { +- switch (attr->events) { +- case FI_CNTR_EVENTS_COMP: +- break; +- default: +- return -FI_ENOSYS; +- } +- +- switch (attr->wait_obj) { +- case FI_WAIT_NONE: +- case FI_WAIT_UNSPEC: +- break; +- case FI_WAIT_MUTEX_COND: +- case FI_WAIT_SET: +- case FI_WAIT_FD: +- default: +- return -FI_ENOSYS; +- } +- +- if (attr->flags) { +- return -FI_EINVAL; +- } +- } +- +- cntr = calloc(1, sizeof(*cntr)); +- if (!cntr) +- return -FI_ENOMEM; +- +- if (attr) { +- assert(sizeof(cntr->attr) == sizeof(*attr)); +- memcpy(&cntr->attr, attr, sizeof(*attr)); +- } +- +- cntr->fid.fid.fclass = FI_CLASS_CNTR; +- cntr->fid.fid.context = context; +- cntr->fid.fid.ops = &fi_ibv_rdm_cntr_fi_ops; +- cntr->fid.ops = &fi_ibv_rdm_cntr_ops; +- cntr->domain = dom; +- ofi_atomic_initialize32(&cntr->ep_ref, 0); +- +- *cntr_fid = &cntr->fid; +- +- return FI_SUCCESS; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_msg.c +deleted file mode 100644 +index 69ee381..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_msg.c ++++ /dev/null +@@ -1,286 +0,0 @@ +-/* +- * Copyright (c) 2013-2016 Intel Corporation, Inc. All rights reserved. +- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "ofi_iov.h" +-#include "ofi_enosys.h" +- +-#include "verbs_rdm.h" +- +-static ssize_t fi_ibv_rdm_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, +- uint64_t flags) +-{ +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- +- if (msg->iov_count > 1) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- struct fi_ibv_rdm_conn *conn = ep_rdm->av->addr_to_conn(ep_rdm, msg->addr); +- +- struct fi_ibv_rdm_tagged_recv_start_data recv_data = { +- .peek_data = { +- .minfo = { +- .conn = conn, +- .tag = 0, +- .tagmask = 0, +- .is_tagged = 0 +- }, +- .context = msg->context, +- .flags = ep_rdm->rx_op_flags | +- (ep_rdm->rx_selective_completion ? flags : +- (flags | FI_COMPLETION)) +- }, +- .dest_addr = +- (msg->iov_count) ? msg->msg_iov[0].iov_base : NULL, +- .data_len = (msg->iov_count) ? msg->msg_iov[0].iov_len : 0, +- .ep = ep_rdm +- }; +- struct fi_ibv_rdm_request *request = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- +- fi_ibv_rdm_zero_request(request); +- request->ep = ep_rdm; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_START, +- &recv_data); +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "conn %p, len %zu, rbuf %p, fi_ctx %p, posted_recv %"PRIu32"\n", +- conn, recv_data.data_len, recv_data.dest_addr, +- msg->context, ep_rdm->posted_recvs); +- +- if (!ret && !request->state.err) +- ret = rdm_trecv_second_event(request, ep_rdm); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_recvv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t src_addr, +- void *context) +-{ +- const struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .context = context, +- .data = 0 +- }; +- +- return fi_ibv_rdm_recvmsg(ep, &msg, 0ULL); +-} +- +-static ssize_t +-fi_ibv_rdm_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, +- fi_addr_t src_addr, void *context) +-{ +- const struct iovec iov = { +- .iov_base = buf, +- .iov_len = len +- }; +- return fi_ibv_rdm_recvv(ep, &iov, &desc, 1, src_addr, context); +-} +- +-static ssize_t fi_ibv_rdm_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, +- uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- size_t i; +- struct fi_ibv_rdm_send_start_data sdata = { +- .ep_rdm = ep_rdm, +- .conn = ep_rdm->av->addr_to_conn(ep_rdm, msg->addr), +- .data_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count), +- .context = msg->context, +- .flags = FI_MSG | FI_SEND | GET_TX_COMP_FLAG(ep_rdm, flags), +- .tag = 0, +- .is_tagged = 0, +- .buf.src_addr = NULL, +- .iov_count = 0, +- .imm = (uint32_t) 0, +- .stype = IBV_RDM_SEND_TYPE_GEN, +- }; +- +- switch (msg->iov_count) { +- case 1: +- sdata.buf.src_addr = msg->msg_iov[0].iov_base; +- /* FALL THROUGH */ +- case 0: +- break; +- default: +- /* TODO: +- * extra allocation & memcpy can be optimized if it's possible +- * to send immediately +- */ +- if ((msg->iov_count > sdata.ep_rdm->iov_per_rndv_thr) || +- (sdata.data_len > sdata.ep_rdm->rndv_threshold)) +- return -FI_EMSGSIZE; +- sdata.buf.iovec_arr = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_extra_buffers_pool); +- for (i = 0; i < msg->iov_count; i++) { +- sdata.buf.iovec_arr[i].iov_base = msg->msg_iov[i].iov_base; +- sdata.buf.iovec_arr[i].iov_len = msg->msg_iov[i].iov_len; +- } +- sdata.iov_count = msg->iov_count; +- sdata.stype = IBV_RDM_SEND_TYPE_VEC; +- break; +- } +- +- return fi_ibv_rdm_send_common(&sdata); +-} +- +-static ssize_t fi_ibv_rdm_sendv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t dest_addr, +- void *context) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- +- const struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = dest_addr, +- .context = context, +- .data = 0 +- }; +- +- return fi_ibv_rdm_sendmsg(ep, &msg, GET_TX_COMP(ep_rdm)); +-} +- +-static ssize_t fi_ibv_rdm_send(struct fid_ep *ep, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, void *context) +-{ +- const struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len +- }; +- return fi_ibv_rdm_sendv(ep, &iov, &desc, 1, dest_addr, context); +-} +- +-static ssize_t fi_ibv_rdm_inject(struct fid_ep *ep_fid, const void *buf, +- size_t len, fi_addr_t dest_addr) +-{ +- struct fi_ibv_rdm_ep *ep = +- container_of(ep_fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_conn *conn = ep->av->addr_to_conn(ep, dest_addr); +- const size_t size = len + sizeof(struct fi_ibv_rdm_header); +- +- if (OFI_UNLIKELY(len > ep->rndv_threshold)) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- if (!conn->postponed_entry) { +- struct fi_ibv_rdm_buf *sbuf = +- fi_ibv_rdm_prepare_send_resources(conn); +- if (sbuf) { +- struct ibv_send_wr *bad_wr = NULL; +- struct ibv_sge sge = { +- .addr = (uintptr_t)(void *)sbuf, +- .length = size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE, +- .lkey = fi_ibv_mr_internal_lkey(&conn->s_md), +- }; +- struct ibv_send_wr wr = { +- .wr_id = FI_IBV_RDM_PACK_SERVICE_WR(conn), +- .sg_list = &sge, +- .num_sge = 1, +- .wr.rdma.remote_addr = (uintptr_t) +- fi_ibv_rdm_get_remote_addr(conn, sbuf), +- .wr.rdma.rkey = conn->remote_rbuf_rkey, +- .send_flags = (sge.length < ep->max_inline_rc) +- ? IBV_SEND_INLINE : 0, +- .opcode = ep->eopcode, +- }; +- +- sbuf->service_data.pkt_len = size; +- sbuf->header.tag = 0; +- sbuf->header.service_tag = 0; +- +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, +- FI_IBV_RDM_MSG_PKT); +- memcpy(&sbuf->payload, buf, len); +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(conn, ep); +- if (OFI_UNLIKELY(ibv_post_send(conn->qp[0], &wr, &bad_wr))) { +- assert(0); +- return -errno; +- } else { +- VERBS_DBG(FI_LOG_EP_DATA, +- "posted %d bytes, conn %p, len %zu\n", +- sge.length, conn, len); +- return FI_SUCCESS; +- } +- } +- } +- +- fi_ibv_rdm_tagged_poll(ep); +- +- return -FI_EAGAIN; +-} +- +-static ssize_t fi_ibv_rdm_senddata(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, void *context) +-{ +- assert(0); +- return -FI_ENOSYS; +-} +- +-static ssize_t fi_ibv_rdm_injectdata(struct fid_ep *ep, const void *buf, +- size_t len, uint64_t data, +- fi_addr_t dest_addr) +-{ +- assert(0); +- return -FI_ENOSYS; +-} +- +-struct fi_ops_msg fi_ibv_rdm_ep_msg_ops = { +- .size = sizeof(struct fi_ops_msg), +- .recv = fi_ibv_rdm_recv, +- .recvv = fi_ibv_rdm_recvv, +- .recvmsg = fi_ibv_rdm_recvmsg, +- .send = fi_ibv_rdm_send, +- .sendv = fi_ibv_rdm_sendv, +- .sendmsg = fi_ibv_rdm_sendmsg, +- .inject = fi_ibv_rdm_inject, +- .senddata = fi_ibv_rdm_senddata, +- .injectdata = fi_ibv_rdm_injectdata +-}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_rma.c +deleted file mode 100644 +index 2fd520b..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_rma.c ++++ /dev/null +@@ -1,346 +0,0 @@ +-/* +- * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +- +-#include "config.h" +- +-#include "verbs_rdm.h" +- +-static inline ssize_t +-fi_ibv_rdm_ep_rma_preinit(void **desc, struct fi_ibv_rdm_buf **rdm_buf, +- size_t len, struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- assert(desc && rdm_buf); +- +- if (*desc == NULL && len < ep->rndv_threshold) { +- *rdm_buf = fi_ibv_rdm_rma_prepare_resources(conn); +- if (*rdm_buf) +- *desc = (void *)(uintptr_t) +- fi_ibv_mr_internal_lkey(&conn->rma_md); +- else +- goto again; +- } else if (!fi_ibv_rdm_check_connection(conn) || +- RMA_RESOURCES_IS_BUSY(conn, ep) || +- conn->postponed_entry) { +- goto again; +- } +- +- return FI_SUCCESS; +-again: +- fi_ibv_rdm_tagged_poll(ep); +- return -FI_EAGAIN; +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep = +- container_of(ep_fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_conn *conn = ep->av->addr_to_conn(ep, msg->addr); +- struct fi_ibv_rdm_rma_start_data start_data = { +- .ep_rdm = ep, +- .conn = conn, +- .context = msg->context, +- .flags = FI_RMA | FI_READ | GET_TX_COMP_FLAG(ep, flags), +- .data_len = (uint64_t)msg->msg_iov[0].iov_len, +- .rbuf = (uintptr_t)msg->rma_iov[0].addr, +- .lbuf = (uintptr_t)msg->msg_iov[0].iov_base, +- .mr_rkey = (uint64_t)(uintptr_t)(msg->rma_iov[0].key), +- .mr_lkey = (uint64_t)(uintptr_t)(msg->desc ? msg->desc[0] : NULL), +- .op_code = IBV_WR_RDMA_READ +- }; +- struct fi_ibv_rma_post_ready_data post_ready_data = { .ep_rdm = ep }; +- +- struct fi_ibv_rdm_buf *rdm_buf = NULL; +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_request *request; +- +- if(msg->iov_count != 1 || msg->rma_iov_count != 1) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- ret = fi_ibv_rdm_ep_rma_preinit((void**)&start_data.mr_lkey, &rdm_buf, +- msg->msg_iov[0].iov_len, +- conn, ep); +- if (ret) { +- return ret; +- } +- +- request = util_buf_alloc(ep->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- +- fi_ibv_rdm_zero_request(request); +- request->ep = ep; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- /* Initial state */ +- request->state.eager = FI_IBV_STATE_EAGER_BEGIN; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- +- request->minfo.is_tagged = 0; +- request->rmabuf = rdm_buf; +- +- fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RMA_START, &start_data); +- +- return fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_READY, +- &post_ready_data); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, +- void *context) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- +- struct fi_rma_iov rma_iov = { +- .addr = addr, +- .len = 0, +- .key = key +- }; +- +- struct fi_msg_rma msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .rma_iov = &rma_iov, +- .rma_iov_count = 1, +- .context = context, +- .data = 0 +- }; +- +- size_t i; +- for (i = 0; i < count; i++) { +- rma_iov.len += iov[i].iov_len; +- } +- +- return fi_ibv_rdm_ep_rma_readmsg(ep, &msg, GET_TX_COMP(ep_rdm)); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_read(struct fid_ep *ep_fid, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- const struct iovec iov = { +- .iov_base = buf, +- .iov_len = len +- }; +- +- return fi_ibv_rdm_ep_rma_readv(ep_fid, &iov, &desc, 1, src_addr, addr, +- key, context); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep = container_of(ep_fid, struct fi_ibv_rdm_ep, +- ep_fid); +- struct fi_ibv_rdm_conn *conn = ep->av->addr_to_conn(ep, msg->addr); +- struct fi_ibv_rdm_request *request = NULL; +- struct fi_ibv_rdm_buf *rdm_buf = NULL; +- ssize_t ret = FI_SUCCESS; +- +- struct fi_ibv_rdm_rma_start_data start_data = { +- .conn = conn, +- .ep_rdm = ep, +- .context = msg->context, +- .flags = FI_RMA | FI_WRITE | (ep->tx_selective_completion ? +- (flags & FI_COMPLETION) : FI_COMPLETION), +- .data_len = (uint64_t)msg->msg_iov[0].iov_len, +- .rbuf = msg->rma_iov[0].addr, +- .lbuf = (uintptr_t)msg->msg_iov[0].iov_base, +- .mr_rkey = msg->rma_iov[0].key, +- .mr_lkey = (uint64_t)(uintptr_t)(msg->desc ? msg->desc[0] : NULL), +- .op_code = IBV_WR_RDMA_WRITE +- }; +- +- if(msg->iov_count != 1 && msg->rma_iov_count != 1) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- ret = fi_ibv_rdm_ep_rma_preinit((void**)&start_data.mr_lkey, &rdm_buf, +- msg->msg_iov[0].iov_len, +- conn, ep); +- if (ret) { +- return ret; +- } +- +- request = util_buf_alloc(ep->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- +- fi_ibv_rdm_zero_request(request); +- request->ep = ep; +- /* Initial state */ +- request->state.eager = FI_IBV_STATE_EAGER_BEGIN; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- request->minfo.is_tagged = 0; +- request->rmabuf = rdm_buf; +- +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RMA_START, &start_data); +- +- struct fi_ibv_rma_post_ready_data post_ready_data = { .ep_rdm = ep }; +- +- return fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_READY, +- &post_ready_data); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_writev(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- void *context) +-{ +- struct fi_rma_iov rma_iov = { +- .addr = addr, +- .len = 0, +- .key = key +- }; +- +- struct fi_msg_rma msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = dest_addr, +- .rma_iov = &rma_iov, +- .rma_iov_count = 1, +- .context = context, +- .data = 0 +- }; +- +- size_t i; +- for (i = 0; i < count; i++) { +- rma_iov.len += iov[i].iov_len; +- } +- +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep_fid, struct fi_ibv_rdm_ep, ep_fid); +- +- return fi_ibv_rdm_ep_rma_writemsg(ep_fid, &msg, GET_TX_COMP(ep_rdm)); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_write(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key, void *context) +-{ +- const struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len +- }; +- +- return fi_ibv_rdm_ep_rma_writev(ep_fid, &iov, &desc, 1, dest_addr, addr, +- key, context); +-} +- +-static ssize_t fi_ibv_rdm_ep_rma_inject_write(struct fid_ep *ep, +- const void *buf, size_t len, +- fi_addr_t dest_addr, +- uint64_t addr, uint64_t key) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = container_of(ep, struct fi_ibv_rdm_ep, +- ep_fid); +- struct fi_ibv_rdm_conn *conn = ep_rdm->av->addr_to_conn(ep_rdm, dest_addr); +- struct fi_ibv_rdm_rma_start_data start_data = { +- .conn = conn, +- .ep_rdm = ep_rdm, +- .flags = 0, /* inject does not generate completion */ +- .data_len = (uint64_t)len, +- .rbuf = addr, +- .lbuf = (uintptr_t)buf, +- .mr_rkey = (uint64_t)key, +- .mr_lkey = 0 +- }; +- ssize_t ret; +- struct fi_ibv_rdm_request *request = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_request_pool); +- +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- +- fi_ibv_rdm_zero_request(request); +- request->ep = ep_rdm; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- /* Initial state */ +- request->state.eager = FI_IBV_STATE_EAGER_RMA_INJECT; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- +- request->minfo.is_tagged = 0; +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RMA_START, &start_data); +- +- switch (ret) +- { +- case FI_SUCCESS: +- return ret; +- case -FI_EAGAIN: +- break; +- default: +- ret = -errno; +- break; +- } +- +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep_rdm->fi_ibv_rdm_request_pool, request); +- +- fi_ibv_rdm_tagged_poll(ep_rdm); +- +- return ret; +-} +- +-struct fi_ops_rma fi_ibv_rdm_ep_rma_ops = { +- .size = sizeof(struct fi_ops_rma), +- .read = fi_ibv_rdm_ep_rma_read, +- .readv = fi_ibv_rdm_ep_rma_readv, +- .readmsg = fi_ibv_rdm_ep_rma_readmsg, +- .write = fi_ibv_rdm_ep_rma_write, +- .writev = fi_ibv_rdm_ep_rma_writev, +- .writemsg = fi_ibv_rdm_ep_rma_writemsg, +- .inject = fi_ibv_rdm_ep_rma_inject_write, +- .writedata = fi_no_rma_writedata, +- .injectdata = fi_no_rma_injectdata, +-}; +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm.c +deleted file mode 100644 +index fe15e93..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm.c ++++ /dev/null +@@ -1,729 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +- +-#include +- +-#include +-#include +-#include +-#include +- +-#include "verbs_queuing.h" +-#include "verbs_tagged_ep_rdm_states.h" +- +-static inline int fi_ibv_rdm_tagged_poll_send(struct fi_ibv_rdm_ep *ep); +- +-int +-fi_ibv_rdm_tagged_prepare_send_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +-#if ENABLE_DEBUG +- int res = OUTGOING_POST_LIMIT(request->minfo.conn, ep); +- if (res) { +- FI_IBV_RDM_DBG_REQUEST +- ("failed because OUTGOING_POST_LIMIT", request, +- FI_LOG_DEBUG); +- return !res; +- } +- res = PEND_POST_LIMIT(ep); +- if (res) { +- FI_IBV_RDM_DBG_REQUEST +- ("failed because PEND_POST_LIMIT", request, +- FI_LOG_DEBUG); +- return !res; +- } +-#endif // ENABLE_DEBUG +- request->sbuf = fi_ibv_rdm_prepare_send_resources(request->minfo.conn); +- return !!request->sbuf; +-} +- +-int +-fi_ibv_rdm_prepare_rma_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- request->rmabuf = +- fi_ibv_rdm_rma_prepare_resources(request->minfo.conn); +- return !!request->rmabuf; +-} +- +-static int fi_ibv_rdm_tagged_getname(fid_t fid, void *addr, size_t * addrlen) +-{ +- struct fi_ibv_rdm_ep *ep; +- +- if (fid->fclass == FI_CLASS_EP) { +- ep = container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- } else { +- VERBS_INFO(FI_LOG_EP_CTRL, "Invalid fid class: %zd\n", +- fid->fclass); +- return -FI_EINVAL; +- } +- +- if (FI_IBV_RDM_DFLT_ADDRLEN > *addrlen) { +- *addrlen = FI_IBV_RDM_DFLT_ADDRLEN; +- return -FI_ETOOSMALL; +- } +- +- memset(addr, 0, *addrlen); +- memcpy(addr, &ep->my_addr, FI_IBV_RDM_DFLT_ADDRLEN); +- *addrlen = FI_IBV_RDM_DFLT_ADDRLEN; +- ep->addrlen = FI_IBV_RDM_DFLT_ADDRLEN; +- +- return 0; +-} +- +-static ssize_t +-fi_ibv_rdm_tagged_recvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, +- uint64_t flags) +-{ +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep_fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_conn *conn = ep_rdm->av->addr_to_conn(ep_rdm, msg->addr); +- +- if (msg->iov_count > 1) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- struct fi_ibv_rdm_tagged_recv_start_data recv_data = { +- .peek_data = { +- .minfo = { +- .conn = conn, +- .tag = msg->tag, +- .tagmask = ~(msg->ignore), +- .is_tagged = 1 +- }, +- .context = msg->context, +- .flags = ep_rdm->rx_op_flags | +- (ep_rdm->rx_selective_completion ? flags : +- (flags | FI_COMPLETION)) +- }, +- .dest_addr = +- (msg->iov_count) ? msg->msg_iov[0].iov_base : NULL, +- .data_len = (msg->iov_count) ? msg->msg_iov[0].iov_len : 0, +- .ep = ep_rdm +- }; +- +- struct fi_ibv_rdm_request *request = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- fi_ibv_rdm_zero_request(request); +- request->ep = ep_rdm; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- if (flags & FI_PEEK) { +- recv_data.peek_data.flags |= FI_COMPLETION; +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_PEEK, +- &recv_data); +- if (ret == -FI_ENOMSG) +- fi_ibv_rdm_tagged_poll(ep_rdm); +- } else if (flags & FI_CLAIM) { +- recv_data.peek_data.flags |= FI_COMPLETION; +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_START, +- &recv_data); +- if (!ret) +- ret = rdm_trecv_second_event(request, ep_rdm); +- } else { +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_START, +- &recv_data); +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "fi_recvfrom: conn %p, tag 0x%" PRIx64 ", len %zu, rbuf %p, " +- "fi_ctx %p, posted_recv %"PRIu32"\n", +- conn, msg->tag, recv_data.data_len, recv_data.dest_addr, +- msg->context, ep_rdm->posted_recvs); +- +- if (!ret && !request->state.err) +- ret = rdm_trecv_second_event(request, ep_rdm); +- } +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_tagged_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, uint64_t tag, +- uint64_t ignore, void *context) +-{ +- const struct fi_msg_tagged msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .tag = tag, +- .ignore = ignore, +- .context = context, +- .data = 0 +- }; +- +- return fi_ibv_rdm_tagged_recvmsg(ep_fid, &msg, 0ULL); +-} +- +-static ssize_t fi_ibv_rdm_tagged_recvfrom(struct fid_ep *ep_fid, void *buf, +- size_t len, void *desc, +- fi_addr_t src_addr, uint64_t tag, +- uint64_t ignore, void *context) +-{ +- const struct iovec iov = { +- .iov_base = buf, +- .iov_len = len +- }; +- +- return fi_ibv_rdm_tagged_recvv(ep_fid, &iov, &desc, 1, src_addr, tag, +- ignore, context); +-} +- +-static inline ssize_t +-fi_ibv_rdm_tagged_inject(struct fid_ep *fid, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t tag) +-{ +- struct fi_ibv_rdm_ep *ep = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_conn *conn = ep->av->addr_to_conn(ep, dest_addr); +- const size_t size = len + sizeof(struct fi_ibv_rdm_header); +- +- if (OFI_UNLIKELY(len > ep->rndv_threshold)) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- if (!conn->postponed_entry) { +- struct fi_ibv_rdm_buf *sbuf = +- fi_ibv_rdm_prepare_send_resources(conn); +- if (sbuf) { +- struct ibv_send_wr *bad_wr = NULL; +- struct ibv_sge sge = { +- .addr = (uintptr_t)(void *)sbuf, +- .length = size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE, +- .lkey = fi_ibv_mr_internal_lkey(&conn->s_md), +- }; +- struct ibv_send_wr wr = { +- .wr_id = FI_IBV_RDM_PACK_SERVICE_WR(conn), +- .sg_list = &sge, +- .num_sge = 1, +- .wr.rdma.remote_addr = (uintptr_t) +- fi_ibv_rdm_get_remote_addr(conn, sbuf), +- .wr.rdma.rkey = conn->remote_rbuf_rkey, +- .send_flags = (sge.length < ep->max_inline_rc) +- ? IBV_SEND_INLINE : 0, +- .opcode = ep->eopcode, +- }; +- +- sbuf->service_data.pkt_len = size; +- sbuf->header.tag = tag; +- sbuf->header.service_tag = 0; +- +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, +- FI_IBV_RDM_EAGER_PKT); +- memcpy(&sbuf->payload, buf, len); +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(conn, ep); +- if (OFI_UNLIKELY(ibv_post_send(conn->qp[0], &wr, &bad_wr))) { +- assert(0); +- return -errno; +- } else { +- VERBS_DBG(FI_LOG_EP_DATA, +- "posted %d bytes, conn %p, len %zu, tag 0x%" PRIx64 "\n", +- sge.length, conn, len, tag); +- return FI_SUCCESS; +- } +- } +- } +- +- fi_ibv_rdm_tagged_poll(ep); +- +- return -FI_EAGAIN; +-} +- +-static ssize_t fi_ibv_rdm_tagged_senddatato(struct fid_ep *fid, const void *buf, +- size_t len, void *desc, +- uint64_t data, fi_addr_t dest_addr, +- uint64_t tag, void *context) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_send_start_data sdata = { +- .ep_rdm = container_of(fid, struct fi_ibv_rdm_ep, ep_fid), +- .conn = ep_rdm->av->addr_to_conn(ep_rdm, dest_addr), +- .data_len = len, +- .context = context, +- .flags = FI_TAGGED | FI_SEND | GET_TX_COMP(ep_rdm), +- .tag = tag, +- .is_tagged = 1, +- .buf.src_addr = (void*)buf, +- .iov_count = 0, +- .imm = (uint32_t) data, +- .stype = IBV_RDM_SEND_TYPE_GEN +- }; +- +- return fi_ibv_rdm_send_common(&sdata); +-} +- +-static ssize_t fi_ibv_rdm_tagged_sendto(struct fid_ep *fid, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) +-{ +- return fi_ibv_rdm_tagged_senddatato(fid, buf, len, desc, 0, dest_addr, +- tag, context); +-} +- +-static ssize_t fi_ibv_rdm_tagged_sendmsg(struct fid_ep *ep, +- const struct fi_msg_tagged *msg, uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- size_t i; +- struct fi_ibv_rdm_send_start_data sdata = { +- .ep_rdm = ep_rdm, +- .conn = ep_rdm->av->addr_to_conn(ep_rdm, msg->addr), +- .data_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count), +- .context = msg->context, +- .flags = FI_TAGGED | FI_SEND | GET_TX_COMP_FLAG(ep_rdm, flags), +- .tag = msg->tag, +- .is_tagged = 1, +- .buf.src_addr = NULL, +- .iov_count = 0, +- .imm = (uint32_t) 0, +- .stype = IBV_RDM_SEND_TYPE_GEN, +- }; +- +- switch (msg->iov_count) { +- case 1: +- sdata.buf.src_addr = msg->msg_iov[0].iov_base; +- /* FALL THROUGH */ +- case 0: +- break; +- default: +- /* TODO: +- * extra allocation & memcpy can be optimized if it's possible +- * to send immediately +- */ +- if ((msg->iov_count > sdata.ep_rdm->iov_per_rndv_thr) || +- (sdata.data_len > sdata.ep_rdm->rndv_threshold)) +- return -FI_EMSGSIZE; +- sdata.buf.iovec_arr = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_extra_buffers_pool); +- for (i = 0; i < msg->iov_count; i++) { +- sdata.buf.iovec_arr[i].iov_base = msg->msg_iov[i].iov_base; +- sdata.buf.iovec_arr[i].iov_len = msg->msg_iov[i].iov_len; +- } +- sdata.iov_count = msg->iov_count; +- sdata.stype = IBV_RDM_SEND_TYPE_VEC; +- break; +- } +- +- return fi_ibv_rdm_send_common(&sdata); +-} +- +-static ssize_t fi_ibv_rdm_tagged_sendv(struct fid_ep *ep, +- const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, +- uint64_t tag, void *context) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- +- const struct fi_msg_tagged msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = dest_addr, +- .tag = tag, +- .ignore = 0, +- .context = context, +- .data = 0 +- }; +- +- return fi_ibv_rdm_tagged_sendmsg(ep, &msg, GET_TX_COMP(ep_rdm)); +-} +- +-struct fi_ops_tagged fi_ibv_rdm_tagged_ops = { +- .size = sizeof(struct fi_ops_tagged), +- .recv = fi_ibv_rdm_tagged_recvfrom, +- .recvv = fi_ibv_rdm_tagged_recvv, +- .recvmsg = fi_ibv_rdm_tagged_recvmsg, +- .send = fi_ibv_rdm_tagged_sendto, +- .sendv = fi_ibv_rdm_tagged_sendv, +- .sendmsg = fi_ibv_rdm_tagged_sendmsg, +- .inject = fi_ibv_rdm_tagged_inject, +- .senddata = fi_ibv_rdm_tagged_senddatato, +- .injectdata = fi_no_tagged_injectdata +-}; +- +-struct fi_ops_cm fi_ibv_rdm_tagged_ep_cm_ops = { +- .size = sizeof(struct fi_ops_cm), +- .getname = fi_ibv_rdm_tagged_getname, +- .setname = fi_no_setname, +- .getpeer = fi_no_getpeer, +- .connect = fi_no_connect, +- .listen = fi_no_listen, +- .accept = fi_no_accept, +- .reject = fi_no_reject, +- .shutdown = fi_no_shutdown, +- .join = fi_no_join, +-}; +- +-static inline void +-fi_ibv_rdm_tagged_release_remote_sbuff(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct ibv_send_wr *bad_wr = NULL; +- struct ibv_sge sge = { +- .addr = (uint64_t)&conn->sbuf_ack_status, +- .length = sizeof(conn->sbuf_ack_status), +- .lkey = fi_ibv_mr_internal_lkey(&conn->ack_md), +- }; +- struct ibv_send_wr wr = { +- .wr_id = FI_IBV_RDM_PACK_SERVICE_WR(conn), +- .sg_list = &sge, +- .num_sge = 1, +- .wr.rdma.remote_addr = (uint64_t) +- &conn->remote_sbuf_head->service_data.status, +- .wr.rdma.rkey = conn->remote_sbuf_rkey, +- .send_flags = +- (sge.length < ep->max_inline_rc) ? IBV_SEND_INLINE : 0, +- .opcode = IBV_WR_RDMA_WRITE, +- }; +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(conn, ep); +- VERBS_DBG(FI_LOG_EP_DATA, +- "posted %d bytes, remote sbuff released\n", sge.length); +- int ret = ibv_post_send(conn->qp[0], &wr, &bad_wr); +- if (ret) { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- assert(0); +- }; +- +- if (conn->av_entry->sends_outgoing > ep->n_buffs) { +- fi_ibv_rdm_tagged_poll_send(ep); +- } +-} +- +-static inline void +-fi_ibv_rdm_process_recv(struct fi_ibv_rdm_ep *ep, struct fi_ibv_rdm_conn *conn, +- int arrived_len, struct fi_ibv_rdm_buf *rbuf) +-{ +- struct fi_ibv_rdm_request *request = NULL; +- +- int pkt_type = FI_IBV_RDM_GET_PKTTYPE(rbuf->header.service_tag); +- +- if (pkt_type == FI_IBV_RDM_RNDV_ACK_PKT) { +- memcpy(&request, &rbuf->payload, sizeof(request)); +- assert(request); +- VERBS_DBG(FI_LOG_EP_DATA, +- "GOT RNDV ACK from conn %p, id %p\n", conn, request); +- } else if (pkt_type != FI_IBV_RDM_RMA_PKT) { +- struct fi_ibv_rdm_minfo minfo = { +- .conn = conn, +- .tag = rbuf->header.tag, +- .tagmask = 0, +- .is_tagged = (pkt_type == FI_IBV_RDM_MSG_PKT) ? 0 : 1 +- }; +- +- if (pkt_type == FI_IBV_RDM_RNDV_RTS_PKT) { +- struct fi_ibv_rdm_rndv_header* h = (void *)&rbuf->header; +- minfo.is_tagged = h->is_tagged; +- } +- +- struct dlist_entry *found_entry = +- dlist_find_first_match(&ep->fi_ibv_rdm_posted_queue, +- fi_ibv_rdm_req_match_by_info, +- &minfo); +- +- if (found_entry) { +- struct fi_ibv_rdm_request *found_request = +- container_of(found_entry, +- struct fi_ibv_rdm_request, +- queue_entry); +- +- fi_ibv_rdm_remove_from_posted_queue(found_request, ep); +- +- request = found_request; +- } else { +- request = util_buf_alloc(ep->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return; +- fi_ibv_rdm_zero_request(request); +- request->ep = ep; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, +- FI_LOG_DEBUG); +- } +- } +- +- /* RMA packets are not handled yet (without IMM) */ +- if (pkt_type != FI_IBV_RDM_RMA_PKT) { +- +- struct fi_ibv_recv_got_pkt_preprocess_data p = { +- .conn = conn, +- .ep = ep, +- .rbuf = rbuf, +- .arrived_len = arrived_len, +- .pkt_type = pkt_type, +- .imm_data = 0 // TODO: +- }; +- +- fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_GOT_PKT_PROCESS, +- &p); +- } +-} +- +-static inline +-void check_and_repost_receives(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- if (conn->av_entry->recv_preposted-- < ep->recv_preposted_threshold) { +- int to_post = ep->rq_wr_depth - conn->av_entry->recv_preposted; +- ssize_t res = fi_ibv_rdm_repost_receives(conn, ep, to_post); +- if (res < 0) { +- VERBS_INFO(FI_LOG_EP_DATA, "repost recv failed %zd\n", res); +- /* TODO: err code propagation */ +- abort(); +- } +- VERBS_DBG(FI_LOG_EP_DATA, +- "reposted_recvs, posted %d, local_credits %"PRIu32"\n", +- to_post, conn->av_entry->recv_preposted); +- } +- /* Since we want to print out here the remaining space for prepost, +- * we try to get up-to-date value of the `recv_preposted` */ +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p remain prepost recvs %"PRIu32"\n", +- conn, conn->av_entry->recv_preposted); +-} +- +-static inline int +-fi_ibv_rdm_process_recv_wc(struct fi_ibv_rdm_ep *ep, struct ibv_wc *wc) +-{ +- struct fi_ibv_rdm_conn *conn = (void *)wc->wr_id; +- +- struct fi_ibv_rdm_buf *rbuf = +- fi_ibv_rdm_get_rbuf(conn, ep, conn->recv_processed); +- +- FI_IBV_PREFETCH_ADDR(rbuf); +- +- FI_IBV_DBG_OPCODE(wc->opcode, "RECV"); +- +- if (!FI_IBV_RDM_CHECK_RECV_WC(wc)) { +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p state %d, wc status %d\n", +- conn, conn->state, wc->status); +- /* on QP error initiate disconnection procedure: +- * flush as many as possible preposted (and failed) +- * entries and after this set connection to 'closed' state */ +- if (!conn->av_entry->recv_preposted) { +- VERBS_DBG(FI_LOG_EP_DATA, "no more preposted entries: " +- "conn %p state %d\n", +- conn, conn->state); +- return 0; +- } +- +- conn->av_entry->recv_preposted--; +- if (wc->status == IBV_WC_WR_FLUSH_ERR && +- conn->state == FI_VERBS_CONN_ESTABLISHED) { +- /* +- * It means that remote side initiated disconnection +- * and QP is flushed earlier then disconnect event was +- * handled or arrived. Just initiate disconnect to +- * opposite direction. +- */ +- fi_ibv_rdm_start_disconnection(conn); +- } else { +- VERBS_DBG(FI_LOG_EP_DATA, "%s recv WC", +- ((!ep->is_closing || +- conn->state != FI_VERBS_CONN_ESTABLISHED) ? +- "Expected" : "Error")); +- assert(!ep->is_closing || +- conn->state != FI_VERBS_CONN_ESTABLISHED); +- } +- conn->state = FI_VERBS_CONN_CLOSED; +- } +- else { +- check_and_repost_receives(ep, conn); +- } +- +- conn->recv_completions++; +- if (conn->recv_completions & ep->n_buffs) { +- conn->recv_completions = 0; +- } +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p recv_completions %d\n", +- conn, conn->recv_completions); +- +- if ((rbuf->service_data.status == BUF_STATUS_RECEIVED) && +- /* NOTE: Bi-direction RNDV messaging may cause "out-of-order" +- * consuming of pre-posts. These are RTS and ACK messages of +- * different requests. In this case we may check seq_num only if +- * send was posted with IBV_WR_RDMA_WRITE_WITH_IMM opcode because +- * the sender controls this. Otherwise, the sender with IBV_WR_SEND +- * opcode consumes pre-posted buffers in the same order as they were +- * pre-posted by recv. So, we should handle it as is. +- */ +- (wc->opcode == IBV_WC_RECV_RDMA_WITH_IMM ? +- fi_ibv_rdm_buffer_check_seq_num(rbuf, conn->recv_processed) : 1)) +- { +- do { +- assert(rbuf->service_data.pkt_len > 0); +- +- fi_ibv_rdm_process_recv(ep, conn, +- rbuf->service_data.pkt_len, rbuf); +- +- VERBS_DBG(FI_LOG_EP_DATA, "processed: conn %p, pkt # %d\n", +- conn, rbuf->service_data.seq_num); +- +- fi_ibv_rdm_set_buffer_status(rbuf, BUF_STATUS_FREE); +- rbuf->service_data.seq_num = (uint16_t)(-1); +- +- conn->recv_processed++; +- if (conn->recv_processed & ep->n_buffs) { +- conn->recv_processed = 0; +- fi_ibv_rdm_tagged_release_remote_sbuff(conn, ep); +- } +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p recv_processed %d\n", +- conn, conn->recv_processed); +- +- rbuf = fi_ibv_rdm_get_rbuf(conn, ep, +- conn->recv_processed); +- +- /* Do not process w/o completion! */ +- } while (conn->recv_processed != conn->recv_completions && +- rbuf->service_data.status == BUF_STATUS_RECEIVED); +- } else { +- VERBS_DBG(FI_LOG_EP_DATA, "not processed: conn %p, status: %d\n", +- conn, rbuf->service_data.status); +- } +- +- return 0; +-} +- +-int fi_ibv_rdm_tagged_poll_recv(struct fi_ibv_rdm_ep *ep) +-{ +- const int wc_count = ep->fi_rcq->read_bunch_size; +- struct ibv_wc wc[wc_count]; +- int ret = 0; +- int err = 0; +- int i = 0; +- +- do { +- ret = ibv_poll_cq(ep->rcq, wc_count, wc); +- for (i = 0; i < ret && !err; ++i) { +- err = fi_ibv_rdm_process_recv_wc(ep, &wc[i]); +- } +- } while (!err && ret == wc_count); +- +- if (!err && ret >= 0) { +- return FI_SUCCESS; +- } +- +- /* error handling */ +- +- VERBS_INFO(FI_LOG_EP_DATA, "ibv_poll_cq returned %d\n", ret); +- +- for(i = 0; i < ret; i++) { +- +- if (wc[i].status != IBV_WC_SUCCESS) { +- struct fi_ibv_rdm_conn *conn = (void *)wc[i].wr_id; +- +- if ((wc[i].status == IBV_WC_WR_FLUSH_ERR) && conn && +- (conn->state != FI_VERBS_CONN_ESTABLISHED)) +- return FI_SUCCESS; +- +- VERBS_INFO(FI_LOG_EP_DATA, "got ibv_wc[%d].status = %d:%s\n", +- i, wc[i].status, ibv_wc_status_str(wc[i].status)); +- return -FI_EOTHER; +- } +- +- if (wc[i].opcode != IBV_WC_RECV_RDMA_WITH_IMM && +- wc[i].opcode != IBV_WC_RECV) +- { +- VERBS_INFO(FI_LOG_EP_DATA, "got ibv_wc[%d].opcode = %d\n", +- i, wc[i].opcode); +- } +- } +- +- return -FI_EOTHER; +-} +- +-static inline int fi_ibv_rdm_tagged_poll_send(struct fi_ibv_rdm_ep *ep) +-{ +- const int wc_count = ep->fi_scq->read_bunch_size; +- struct ibv_wc wc[wc_count]; +- int ret = 0, err = 0, i; +- +- if (ep->posted_sends > 0) { +- do { +- ret = ibv_poll_cq(ep->scq, wc_count, wc); +- for (i = 0; i < ret && !err; ++i) { +- err = fi_ibv_rdm_process_send_wc(ep, &wc[i]); +- } +- } while (!err && ret == wc_count); +- } +- +- if (err || ret < 0) { +- goto wc_error; +- } +- +- struct fi_ibv_rdm_tagged_send_ready_data data = { .ep = ep }; +- struct dlist_entry *item; +- dlist_foreach((&ep->fi_ibv_rdm_postponed_queue), item) { +- if (fi_ibv_rdm_postponed_process(item, &data)) { +- /* we can't process all postponed items till foreach */ +- /* implementation is not safety for removing during */ +- /* iterating */ +- break; +- } +- } +- +- return FI_SUCCESS; +- +-wc_error: +- if (ret < 0) { +- VERBS_INFO(FI_LOG_EP_DATA, "ibv_poll_cq returned %d\n", ret); +- assert(0); +- } +- +- for (i = 0; i < ret; i++) +- fi_ibv_rdm_process_err_send_wc(ep, &wc[i]); +- +- return -FI_EOTHER; +-} +- +-int fi_ibv_rdm_tagged_poll(struct fi_ibv_rdm_ep *ep) +-{ +- int ret = fi_ibv_rdm_tagged_poll_send(ep); +- /* Only already posted sends should be processed during EP closing */ +- if (ret || ep->is_closing) { +- return ret; +- } +- +- return fi_ibv_rdm_tagged_poll_recv(ep); +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.c +deleted file mode 100644 +index 9707665..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.c ++++ /dev/null +@@ -1,1846 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +- +-#include +-#include "../fi_verbs.h" +-#include "verbs_rdm.h" +-#include "verbs_queuing.h" +-#include "verbs_tagged_ep_rdm_states.h" +- +-typedef ssize_t (*fi_ep_rdm_request_handler_t) +- (struct fi_ibv_rdm_request *request, void *data); +- +-static fi_ep_rdm_request_handler_t +- fi_ibv_rdm_req_hndl_arr [FI_IBV_STATE_EAGER_COUNT] +- [FI_IBV_STATE_RNDV_COUNT] +- [FI_IBV_EVENT_COUNT]; +- +-#if ENABLE_DEBUG +- +-enum fi_ibv_rdm_hndl_req_log_state { +- hndl_req_log_state_in = 0, +- hndl_req_log_state_out = 10000 +-}; +- +-#define FI_IBV_RDM_HNDL_REQ_LOG_IN() \ +-enum fi_ibv_rdm_hndl_req_log_state state = hndl_req_log_state_in; \ +-do { \ +- FI_IBV_RDM_DBG_REQUEST("\t> IN\t< ", request, FI_LOG_DEBUG); \ +-} while(0) +- +-#define FI_IBV_RDM_HNDL_REQ_LOG() do { \ +- state++; \ +- char prefix[128]; \ +- snprintf(prefix, 128, "\t> %d\t< ", state); \ +- FI_IBV_RDM_DBG_REQUEST(prefix, request, FI_LOG_DEBUG); \ +-} while(0) +- +-#define FI_IBV_RDM_HNDL_REQ_LOG_OUT() do { \ +- assert(state < hndl_req_log_state_out); \ +- FI_IBV_RDM_DBG_REQUEST("\t> OUT\t< ", request, FI_LOG_DEBUG); \ +-} while(0) +- +-#else // ENABLE_DEBUG +-#define FI_IBV_RDM_HNDL_REQ_LOG_IN() +-#define FI_IBV_RDM_HNDL_REQ_LOG() +-#define FI_IBV_RDM_HNDL_REQ_LOG_OUT() +-#endif // ENABLE_DEBUG +- +-static ssize_t +-fi_ibv_rdm_init_send_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- ssize_t ret; +- struct fi_ibv_rdm_send_start_data *p = data; +- request->minfo.conn = p->conn; +- request->minfo.tag = p->tag; +- request->minfo.is_tagged = p->is_tagged; +- request->iov_count = p->iov_count; +- +- /* Indeed, both branches are the same, just for readability */ +- if (request->iov_count) { +- request->iovec_arr = p->buf.iovec_arr; +- } else { +- request->src_addr = p->buf.src_addr; +- } +- +- request->sbuf = NULL; +- request->len = p->data_len; +- request->comp_flags = p->flags; +- request->imm = p->imm; +- request->context = p->context; +- request->state.eager = FI_IBV_STATE_EAGER_BEGIN; +- request->state.rndv = +- (p->data_len + sizeof(struct fi_ibv_rdm_header) +- <= p->ep_rdm->rndv_threshold) +- ? FI_IBV_STATE_RNDV_NOT_USED : FI_IBV_STATE_RNDV_SEND_BEGIN; +- +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- if (ret) +- return ret; +- request->state.eager = FI_IBV_STATE_EAGER_SEND_POSTPONED; +- if (request->state.rndv == FI_IBV_STATE_RNDV_SEND_BEGIN) { +- request->state.rndv = FI_IBV_STATE_RNDV_SEND_WAIT4SEND; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_send_ready(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_POSTPONED); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- fi_ibv_rdm_remove_from_postponed_queue(request); +- struct fi_ibv_rdm_tagged_send_ready_data *p = data; +- +- ssize_t ret = FI_SUCCESS; +- struct ibv_sge sge; +- +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- const int size = request->len + sizeof(struct fi_ibv_rdm_header); +- +- assert(request->sbuf); +- +- struct ibv_send_wr wr = { 0 }; +- struct ibv_send_wr *bad_wr = NULL; +- +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.wr.rdma.remote_addr = fi_ibv_rdm_get_remote_addr(conn, request->sbuf); +- wr.wr.rdma.rkey = conn->remote_rbuf_rkey; +- wr.send_flags = 0; +- +- sge.addr = (uintptr_t)request->sbuf; +- sge.length = size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE; +- request->sbuf->service_data.pkt_len = size; +- +- if (sge.length <= p->ep->max_inline_rc) { +- wr.send_flags |= IBV_SEND_INLINE; +- } +- +- sge.lkey = fi_ibv_mr_internal_lkey(&conn->s_md); +- +- wr.imm_data = 0; +- wr.opcode = p->ep->eopcode; +- struct fi_ibv_rdm_buf *sbuf = (struct fi_ibv_rdm_buf *)request->sbuf; +- uint64_t *payload = &sbuf->payload; +- +- sbuf->header.service_tag = 0; +- if (request->minfo.is_tagged) { +- sbuf->header.tag = request->minfo.tag; +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, FI_IBV_RDM_EAGER_PKT); +- } else { +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, FI_IBV_RDM_MSG_PKT); +- } +- +- if (request->len > 0) { +- if (request->iov_count == 0) { +- memcpy(payload, request->src_addr, request->len); +- } else { +- size_t i; +- for (i = 0; i < request->iov_count; i++) { +- memcpy(payload, request->iovec_arr[i].iov_base, +- request->iovec_arr[i].iov_len); +- payload += request->iovec_arr[i].iov_len; +- } +- } +- } +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- VERBS_DBG(FI_LOG_EP_DATA, "posted %d bytes, conn %p, tag 0x%" PRIx64 "\n", +- sge.length, request->minfo.conn, request->minfo.tag); +- +- ret = ibv_post_send(conn->qp[0], &wr, &bad_wr); +- if (ret) { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- ret = -errno; +- assert(0); +- }; +- +- fi_ibv_rdm_cntr_inc(p->ep->send_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_cq(p->ep->fi_scq, request); +- request->state.eager = FI_IBV_STATE_EAGER_SEND_WAIT4LC; +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_send_lc(struct fi_ibv_rdm_request *request, +- void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC || +- request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, request->len); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- +- if (request->iov_count) { +- util_buf_release( +- request->ep->fi_ibv_rdm_extra_buffers_pool, +- request->iovec_arr); +- } +- +- if (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_rts_send_ready(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_POSTPONED); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_SEND_WAIT4SEND); +- assert(request->sbuf); +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, request->len); +- +- fi_ibv_rdm_remove_from_postponed_queue(request); +- struct fi_ibv_rdm_tagged_send_ready_data *p = data; +- struct ibv_sge sge; +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- struct fi_ibv_rdm_rndv_header *header = (void *)&request->sbuf->header; +- struct ibv_send_wr wr = { 0 }, *bad_wr = NULL; +- int ret; +- +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.wr.rdma.remote_addr = (uintptr_t) +- fi_ibv_rdm_get_remote_addr(conn, request->sbuf); +- wr.wr.rdma.rkey = conn->remote_rbuf_rkey; +- wr.send_flags = 0; +- wr.opcode = p->ep->eopcode; +- wr.imm_data = 0; +- +- sge.addr = (uintptr_t)request->sbuf; +- sge.length = FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE + sizeof(*header); +- sge.lkey = fi_ibv_mr_internal_lkey(&conn->s_md); +- request->sbuf->service_data.pkt_len = sizeof(*header); +- +- if (request->minfo.is_tagged) { +- header->base.tag = request->minfo.tag; +- header->is_tagged = 1; +- } else { +- header->is_tagged = 0; +- } +- header->base.service_tag = 0; +- header->total_len = request->len; +- header->src_addr = (uintptr_t)request->src_addr; +- +- header->id = (uintptr_t)request; +- request->rndv.id = (uintptr_t)request; +- +- ret = p->ep->domain->internal_mr_reg(p->ep->domain, +- (void *)request->src_addr, +- request->len, +- FI_REMOTE_READ, +- &request->rndv.md); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_DATA, +- "Unable to register MR, ret = %d", ret); +- assert(0); +- return ret; +- } +- header->mem_rkey = fi_ibv_mr_internal_rkey(&request->rndv.md); +- +- FI_IBV_RDM_SET_PKTTYPE(header->base.service_tag, +- FI_IBV_RDM_RNDV_RTS_PKT); +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "fi_senddatato: RNDV conn %p, tag 0x%" PRIx64 ", len %"PRIu64", " +- "src_addr %p, rkey 0x%"PRIx64", fi_ctx %p, imm %d, post_sends %"PRIu32"\n", +- conn, request->minfo.tag, request->len, request->src_addr, +- header->mem_rkey, request->context, (int)wr.imm_data, +- p->ep->posted_sends); +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- VERBS_DBG(FI_LOG_EP_DATA, "posted %d bytes, conn %p, tag 0x%" PRIx64 "\n", +- sge.length, request->minfo.conn, +- request->minfo.tag); +- ret = ibv_post_send(conn->qp[0], &wr, &bad_wr); +- if (ret) { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- assert(0); +- return -errno; +- }; +- +- request->state.eager = FI_IBV_STATE_EAGER_SEND_WAIT4LC; +- request->state.rndv = FI_IBV_STATE_RNDV_SEND_WAIT4ACK; +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_rts_lc(struct fi_ibv_rdm_request *request, +- void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(((request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC) && +- (request->state.rndv == FI_IBV_STATE_RNDV_SEND_WAIT4ACK)) || +- ((request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) && +- (request->state.rndv == FI_IBV_STATE_RNDV_SEND_END)) || +- ((request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC) && +- (request->state.rndv == FI_IBV_STATE_RNDV_SEND_END))); +- assert(request->minfo.conn); +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, +- request->len); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- +- if (request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC) { +- request->state.eager = FI_IBV_STATE_EAGER_SEND_END; +- } else { /* (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) */ +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_end(struct fi_ibv_rdm_request *request, +- void *data) +-{ +- struct fi_ibv_recv_got_pkt_preprocess_data *p = data; +- int ret; +- +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_END || +- (request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC)); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_SEND_WAIT4ACK); +- +- assert((sizeof(struct fi_ibv_rdm_request *) + +- sizeof(struct fi_ibv_rdm_header)) == p->arrived_len); +- assert(request->rndv.md.mr); +- assert(p->rbuf); +- +- ret = p->ep->domain->internal_mr_dereg(&request->rndv.md); +- if (ret) +- VERBS_INFO(FI_LOG_EP_DATA, +- "Unable to deregister MR, ret = %d", ret); +- +- if (request->state.eager == FI_IBV_STATE_EAGER_SEND_END) +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- +- request->state.rndv = FI_IBV_STATE_RNDV_SEND_END; +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- fi_ibv_rdm_cntr_inc(p->ep->send_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_cq(p->ep->fi_scq, request); +- } else if (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return FI_SUCCESS; +-} +- +- +-static inline ssize_t +-fi_ibv_rdm_copy_unexp_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_request *unexp) +-{ +- ssize_t ret = FI_SUCCESS; +- if (request->len && (request->len < unexp->len)) { +- VERBS_INFO(FI_LOG_EP_DATA, +- "RECV TRUNCATE, unexp len %" PRIu64 ", " +- "req->len=%" PRIu64 ", conn %p, tag 0x%" PRIx64 ", " +- "tagmask %" PRIx64 "\n", +- unexp->len, request->len, request->minfo.conn, +- request->minfo.tag, request->minfo.tagmask); +- +- util_buf_release( +- unexp->ep->fi_ibv_rdm_extra_buffers_pool, +- unexp->unexp_rbuf); +- ret = -FI_ETRUNC; +- return ret; +- } +- +- request->minfo.conn = unexp->minfo.conn; +- request->minfo.tag = unexp->minfo.tag; +- request->minfo.is_tagged = unexp->minfo.is_tagged; +- request->len = unexp->len; +- request->rest_len = unexp->rest_len; +- request->unexp_rbuf = unexp->unexp_rbuf; +- request->state = unexp->state; +- +- assert((request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4RECV) || +- (request->state.eager == FI_IBV_STATE_EAGER_RECV_CLAIMED)); +- +- VERBS_DBG(FI_LOG_EP_DATA, "found req: len = %" PRIu64 ", eager_state = %s, rndv_state = %s \n", +- unexp->len, +- fi_ibv_rdm_req_eager_state_to_str(unexp->state.eager), +- fi_ibv_rdm_req_rndv_state_to_str(unexp->state.rndv)); +- +- if (request->state.rndv != FI_IBV_STATE_RNDV_NOT_USED) { +- assert(request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES); +- +- request->rndv.mr_rkey = unexp->rndv.mr_rkey; +- request->rndv.id = unexp->rndv.id; +- request->rndv.remote_addr = unexp->rndv.remote_addr; +- } +- +- return ret; +-} +- +-/* +- * FI_MULTI_RECV path is implemented through a parent multi_request. +- * This is a kind of supervisor which keep another preposted request while multi +- * recv buffer has enough space for incoming data. The last prepost releases +- * the parent and sets FI_MULTI_RECV completion flag. +- */ +-static struct fi_ibv_rdm_request * +-fi_ibv_rdm_repost_multi_recv(struct fi_ibv_rdm_request *request, +- size_t offset, struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_multi_request *parent; +- struct fi_ibv_rdm_request *prepost; +- +- if (!(prepost = util_buf_alloc(ep->fi_ibv_rdm_request_pool))) { +- VERBS_WARN(FI_LOG_EP_DATA, "Unable to allocate memory for " +- "multi recv prepost request\n"); +- return NULL; +- } +- +- fi_ibv_rdm_zero_request(prepost); +- prepost->ep = ep; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", prepost, FI_LOG_DEBUG); +- FI_IBV_RDM_DBG_REQUEST("repost from: ", request, FI_LOG_DEBUG); +- +- parent = request->parent; +- request->parent = NULL; +- parent->prepost = prepost; +- parent->offset += offset; +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "multi_recv parent: prepost %p, buf %p, len %" PRIu64 +- ", offset %" PRIu64 " min_size %" PRIu64 "\n", +- parent->prepost, parent->buf, parent->len, +- parent->offset, parent->min_size); +- +- prepost->parent = parent; +- prepost->minfo = request->minfo; +- prepost->dest_buf = parent->buf + parent->offset; +- +- prepost->comp_flags = request->comp_flags; +- prepost->len = parent->len - parent->offset; +- if (prepost->len < parent->min_size) { +- /* This is the last one, parent can be released */ +- prepost->comp_flags |= FI_MULTI_RECV; +- util_buf_release(ep->fi_ibv_rdm_multi_request_pool, prepost->parent); +- fi_ibv_rdm_remove_from_multi_recv_list(prepost->parent, ep); +- prepost->parent = NULL; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", prepost, FI_LOG_DEBUG); +- } +- prepost->context = request->context; +- prepost->context->internal[0] = (void *)prepost; +- +- /* TODO: way for (RNDV) optimization is do registration only once */ +- //prepost->rndv = request->rndv; +- +- prepost->state.eager = FI_IBV_STATE_EAGER_RECV_WAIT4PKT; +- prepost->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- prepost->state.err = FI_SUCCESS; +- fi_ibv_rdm_move_to_posted_queue(prepost, ep); +- return prepost; +-} +- +-static inline ssize_t +-fi_ibv_rdm_try_unexp_recv(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_tagged_recv_start_data *rdata) +-{ +- struct dlist_entry *found_entry = NULL; +- struct fi_ibv_rdm_request *found_request = NULL; +- struct fi_ibv_rdm_request *repost = NULL; +- ssize_t ret = FI_ENOMSG; +- +- do { +- found_entry = +- dlist_find_first_match(&rdata->ep->fi_ibv_rdm_unexp_queue, +- fi_ibv_rdm_req_match_by_info3, +- &rdata->peek_data); +- if (found_entry) { +- ret = FI_SUCCESS; +- found_request = +- container_of(found_entry, +- struct fi_ibv_rdm_request, +- queue_entry); +- +- fi_ibv_rdm_remove_from_unexp_queue(found_request); +- +- if (request->parent) { +- repost = fi_ibv_rdm_repost_multi_recv(request, +- found_request->len, rdata->ep); +- if (!repost) { +- ret = -FI_ENOMEM; +- break; +- } +- } +- +- ret = fi_ibv_rdm_copy_unexp_request(request, found_request); +- +- assert((ret != FI_SUCCESS) || +- ((rdata->peek_data.flags & FI_CLAIM) && +- (request->state.eager == +- FI_IBV_STATE_EAGER_RECV_CLAIMED) && +- (request->context == found_request->context)) || +- (!(rdata->peek_data.flags & FI_CLAIM) && +- (request->state.eager == +- FI_IBV_STATE_EAGER_RECV_WAIT4RECV))); +- +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", found_request, FI_LOG_DEBUG); +- util_buf_release( +- found_request->ep->fi_ibv_rdm_request_pool, +- found_request); +- +- if (ret == FI_SUCCESS && +- request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES) { +- request->state.eager = FI_IBV_STATE_EAGER_RECV_END; +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- /* Will fail `while` check and return the result */ +- } +- } +- /* +- * Unexpected queue may contain several entries +- * in case of multi recv, we need to handle them all +- */ +- } while (repost && repost->parent && found_entry && !ret); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_init_recv_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_tagged_recv_start_data *p = data; +- +- if (p->peek_data.flags & FI_MULTI_RECV) { +- request->parent = +- util_buf_alloc(request->ep->fi_ibv_rdm_multi_request_pool); +- if (!request->parent) { +- VERBS_WARN(FI_LOG_EP_DATA, "Unable to allocate memory " +- "for parent \n"); +- return -FI_ENOMEM; +- } +- fi_ibv_rdm_add_to_multi_recv_list(request->parent, request->ep); +- request->parent->prepost = request; +- request->parent->buf = p->dest_addr; +- request->parent->len = p->data_len; +- request->parent->offset = 0; +- request->parent->min_size = p->ep->min_multi_recv_size; +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, multi_recv %p, parent %p\n", +- request->minfo.conn, request, request->parent); +- } +- +- request->minfo = p->peek_data.minfo; +- request->context = p->peek_data.context; +- request->context->internal[0] = (void *)request; +- request->dest_buf = p->dest_addr; +- request->len = p->data_len; +- request->comp_flags = +- (p->peek_data.minfo.is_tagged ? FI_TAGGED : FI_MSG ) | FI_RECV | +- (p->peek_data.flags & FI_COMPLETION); +- request->state.eager = FI_IBV_STATE_EAGER_RECV_WAIT4PKT; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, request->len); +- +- ret = fi_ibv_rdm_try_unexp_recv(request, p); +- if (ret == FI_ENOMSG) { +- fi_ibv_rdm_move_to_posted_queue(request, p->ep); +- ret = FI_SUCCESS; +- } else if (ret != FI_SUCCESS) { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- +- fi_ibv_rdm_cntr_inc_err(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(p->ep->fi_rcq, request, ret); +- } +- ret = FI_SUCCESS; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_tagged_peek_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_BEGIN); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- ssize_t ret = FI_SUCCESS; +- +- struct fi_ibv_rdm_tagged_recv_start_data *p = data; +- struct fi_ibv_rdm_tagged_peek_data *peek_data = &p->peek_data; +- struct dlist_entry *found_entry = +- dlist_find_first_match(&p->ep->fi_ibv_rdm_unexp_queue, +- fi_ibv_rdm_req_match_by_info2, +- &peek_data->minfo); +- +- /* TODO: to check behaviour for multi recv */ +- assert(!(peek_data->flags & FI_MULTI_RECV)); +- +- request->context = peek_data->context; +- request->comp_flags = peek_data->flags; +- +- if (found_entry) { +- struct fi_ibv_rdm_request *found_request = +- container_of(found_entry, struct fi_ibv_rdm_request, +- queue_entry); +- assert(found_request); +- +- ret = fi_ibv_rdm_copy_unexp_request(request, found_request); +- +- if (ret) { +- goto err; +- } +- +- if (peek_data->flags & FI_CLAIM) { +- ret = fi_ibv_rdm_req_hndl(found_request, +- FI_IBV_EVENT_RECV_CLAIM, +- peek_data); +- +- if (ret) { +- goto err; +- } +- } +- +- if (peek_data->flags & FI_DISCARD) { +- ret = fi_ibv_rdm_req_hndl(found_request, +- FI_IBV_EVENT_RECV_DISCARD, +- NULL); +- +- if (ret) { +- goto err; +- } +- } +- +- fi_ibv_rdm_cntr_inc(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- fi_ibv_rdm_move_to_cq(p->ep->fi_rcq, request); +- } else { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- } else { +- ret = -FI_ENOMSG; +- goto err; +- } +- +-out: +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-err: +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- +- fi_ibv_rdm_cntr_inc_err(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(p->ep->fi_rcq, request, ret); +- } +- +- ret = FI_SUCCESS; +- goto out; +-} +- +-static ssize_t +-fi_ibv_rdm_init_unexp_recv_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_BEGIN); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- struct fi_ibv_recv_got_pkt_preprocess_data *p = data; +- struct fi_ibv_rdm_buf *rbuf = p->rbuf; +- ssize_t ret = FI_SUCCESS; +- +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- switch (p->pkt_type) { +- case FI_IBV_RDM_EAGER_PKT: +- case FI_IBV_RDM_MSG_PKT: +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- request->minfo.conn = p->conn; +- request->minfo.tag = rbuf->header.tag; +- request->minfo.is_tagged = +- ((p->pkt_type == FI_IBV_RDM_EAGER_PKT) ? 1 : 0); +- request->len = +- p->arrived_len - sizeof(struct fi_ibv_rdm_header); +- request->comp_flags = +- (request->minfo.is_tagged ? FI_TAGGED : +- FI_MSG) | FI_RECV; +- +- assert(request->len <= p->ep->rndv_threshold); +- +- if (request->len > 0) { +- request->unexp_rbuf = +- util_buf_alloc(request->ep->fi_ibv_rdm_extra_buffers_pool); +- if (!request->unexp_rbuf) { +- ret = -FI_ENOMEM; +- VERBS_WARN(FI_LOG_EP_DATA, +- "Unable allocate memory from the pool " +- "for uenxpected buffer"); +- goto fn; +- } +- memcpy(request->unexp_rbuf, &rbuf->payload, +- request->len); +- } else { +- request->unexp_rbuf = NULL; +- } +- request->imm = p->imm_data; +- request->state.eager = FI_IBV_STATE_EAGER_RECV_WAIT4RECV; +- break; +- case FI_IBV_RDM_RNDV_RTS_PKT: +- FI_IBV_RDM_HNDL_REQ_LOG(); +- assert(p->arrived_len == sizeof(struct fi_ibv_rdm_rndv_header)); +- struct fi_ibv_rdm_rndv_header *h = (void *)&rbuf->header; +- +- request->minfo.conn = p->conn; +- request->minfo.tag = h->base.tag; +- request->minfo.is_tagged = h->is_tagged; +- request->rndv.id = (uintptr_t)h->id; +- request->rndv.remote_addr = (void *)h->src_addr; +- request->rndv.mr_rkey = h->mem_rkey; +- request->len = h->total_len; +- request->rest_len = h->total_len; +- request->comp_flags = (h->is_tagged ? FI_TAGGED : +- FI_MSG) | FI_RECV; +- request->imm = p->imm_data; +- request->state.eager = FI_IBV_STATE_EAGER_RECV_WAIT4RECV; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_WAIT4RES; +- break; +- default: +- if (p->pkt_type == FI_IBV_RDM_RNDV_ACK_PKT) { +- FI_IBV_RDM_DBG_REQUEST("Unexpected RNDV ack!!!", +- request, FI_LOG_INFO); +- } +- +- VERBS_INFO(FI_LOG_EP_DATA, +- "Got unknown unexpected pkt: %" PRIu64 "\n", +- p->pkt_type); +- assert(0); +- ret = -FI_EOTHER; +- } +- +- fi_ibv_rdm_move_to_unexpected_queue(request, p->ep); +-fn: +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_recv_got_pkt(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- struct fi_ibv_recv_got_pkt_preprocess_data *p = data; +- struct fi_ibv_rdm_buf *rbuf = p->rbuf; +- ssize_t ret; +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4PKT); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- switch (p->pkt_type) { +- case FI_IBV_RDM_EAGER_PKT: +- case FI_IBV_RDM_MSG_PKT: +- { +- const size_t data_len = p->arrived_len - sizeof(rbuf->header); +- assert(data_len <= p->ep->rndv_threshold); +- +- if (request->parent) { +- if (!fi_ibv_rdm_repost_multi_recv(request, data_len, p->ep)) +- return -FI_ENOMEM; +- +- } +- +- if (request->len >= data_len) { +- request->minfo.conn = p->conn; +- request->minfo.tag = rbuf->header.tag; +- request->minfo.is_tagged = +- ((p->pkt_type == FI_IBV_RDM_EAGER_PKT) ? 1 : 0); +- +- request->len = data_len; +- request->exp_rbuf = &rbuf->payload; +- request->imm = p->imm_data; +- +- if (request->dest_buf) { +- assert(request->exp_rbuf); +- memcpy(request->dest_buf, +- request->exp_rbuf, request->len); +- } +- +- if (request->parent) { +- if (!fi_ibv_rdm_repost_multi_recv(request, data_len, +- p->ep)) +- return -FI_ENOMEM; +- } +- +- fi_ibv_rdm_cntr_inc(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- request->state.eager = +- FI_IBV_STATE_EAGER_READY_TO_FREE; +- fi_ibv_rdm_move_to_cq(p->ep->fi_rcq, request); +- } else { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, +- FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- } else { +- VERBS_INFO(FI_LOG_EP_DATA, +- "%s: %d RECV TRUNCATE, data_len=%zu, " +- "posted_len=%" PRIu64 ", conn %p, tag 0x%" PRIx64 ", " +- "tagmask %" PRIx64 "\n", +- __FUNCTION__, __LINE__, data_len, +- request->len, request->minfo.conn, +- request->minfo.tag, request->minfo.tagmask); +- +- if (request->parent) { +- if (!fi_ibv_rdm_repost_multi_recv(request, data_len, +- p->ep)) +- return -FI_ENOMEM; +- } +- +- request->state.eager = +- FI_IBV_STATE_EAGER_READY_TO_FREE; +- +- fi_ibv_rdm_cntr_inc_err(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(p->ep->fi_rcq, request, +- FI_ETRUNC); +- } +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG(); +- break; +- } +- case FI_IBV_RDM_RNDV_RTS_PKT: +- { +- struct fi_ibv_rdm_rndv_header *rndv_header = +- (void *)&rbuf->header; +- +- assert(p->arrived_len == sizeof(*rndv_header)); +- +- if (request->len < rndv_header->total_len) { +- /* rndv protocol finalization requires memory +- * deregistration, entry in errcq will be generated +- * after acknowledgement in normal flow */ +- request->state.err = FI_ETRUNC; +- } +- +- request->minfo.conn = p->conn; +- request->minfo.tag = rndv_header->base.tag; +- request->minfo.is_tagged = rndv_header->is_tagged; +- request->rndv.remote_addr = (void *)rndv_header->src_addr; +- request->rndv.mr_rkey = rndv_header->mem_rkey; +- request->len = rndv_header->total_len; +- request->rest_len = rndv_header->total_len; +- request->imm = p->imm_data; +- request->rndv.id = rndv_header->id; +- +- if (request->parent) { +- if (!fi_ibv_rdm_repost_multi_recv(request, +- rndv_header->total_len, +- p->ep)) +- return -FI_ENOMEM; +- } +- +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- if (ret) +- return ret; +- +- request->state.eager = FI_IBV_STATE_EAGER_RECV_END; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_WAIT4RES; +- FI_IBV_RDM_HNDL_REQ_LOG(); +- break; +- } +- default: +- VERBS_INFO(FI_LOG_EP_DATA, +- "Got unknown unexpected pkt: %" PRIu64 "\n", +- p->pkt_type); +- assert(0); +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return -FI_EOTHER; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_recv_process_unexp_pkt(struct fi_ibv_rdm_request *request, +- void *data) +-{ +- struct fi_ibv_recv_got_pkt_process_data *p = data; +- +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert((request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4RECV) || +- (request->state.eager == FI_IBV_STATE_EAGER_RECV_CLAIMED)); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- if (request->dest_buf && request->len != 0) { +- memcpy(request->dest_buf, request->unexp_rbuf, request->len); +- } +- +- if (request->unexp_rbuf) { +- util_buf_release( +- request->ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- request->unexp_rbuf = NULL; +- } +- +- fi_ibv_rdm_cntr_inc(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- fi_ibv_rdm_move_to_cq(p->ep->fi_rcq, request); +- } else { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_tagged_recv_claim(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4RECV); +- assert((request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED) || +- (request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES)); +- +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_tagged_peek_data *peek_data = data; +- assert(peek_data->context); +- +- request->state.eager = FI_IBV_STATE_EAGER_RECV_CLAIMED; +- request->context = peek_data->context; +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_recv_discard(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4RECV); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- assert(data == NULL); +- +- fi_ibv_rdm_remove_from_unexp_queue(request); +- +- if (request->unexp_rbuf) { +- util_buf_release( +- request->ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- request->unexp_rbuf = NULL; +- } +- +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static inline ssize_t +-fi_ibv_rdm_rndv_read_reg_mr(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_request *request) +-{ +- return ep->domain->internal_mr_reg(ep->domain, +- (void *)request->src_addr, +- request->len, +- FI_REMOTE_READ, +- &request->rndv.md); +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_recv_post_read(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_END); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES); +- +- struct fi_ibv_rdm_tagged_send_ready_data *p = data; +- const size_t offset = request->len - request->rest_len; +- const size_t seg_cursize = +- MIN(p->ep->rndv_seg_size, request->rest_len); +- struct ibv_send_wr wr = { 0 }; +- struct ibv_send_wr *bad_wr = NULL; +- struct ibv_sge sge; +- ssize_t ret = FI_SUCCESS; +- +- fi_ibv_rdm_remove_from_postponed_queue(request); +- VERBS_DBG(FI_LOG_EP_DATA, +- "\t REQUEST: conn %p, tag 0x%" PRIx64 +- ", len %" PRIu64 ", rest %" PRIu64 +- ", dest_buf %p, src_addr %p, rkey 0x%"PRIx64"\n", +- request->minfo.conn, request->minfo.tag, request->len, +- request->rest_len, request->dest_buf, +- request->rndv.remote_addr, request->rndv.mr_rkey); +- +- assert((request->minfo.conn->cm_role != FI_VERBS_CM_SELF) || +- (request->rndv.remote_addr != request->dest_buf)); +- +- /* First segment */ +- if (offset == 0) { +- ret = fi_ibv_rdm_rndv_read_reg_mr(p->ep, request); +- if (ret) { +- return ret; +- } +- request->post_counter = 0; +- } +- +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.opcode = IBV_WR_RDMA_READ; +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.send_flags = 0; +- wr.wr.rdma.remote_addr = (uintptr_t) +- ((char *)request->rndv.remote_addr + offset); +- wr.wr.rdma.rkey = request->rndv.mr_rkey; +- +- sge.addr = (uintptr_t)((char *)request->dest_buf + offset); +- sge.length = (request->state.err == FI_SUCCESS ? seg_cursize : 0); +- sge.lkey = fi_ibv_mr_internal_lkey(&request->rndv.md); +- +- request->rest_len -= seg_cursize; +- request->post_counter++; +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- VERBS_DBG(FI_LOG_EP_DATA, "posted %d bytes, conn %p, tag 0x%" PRIx64 "\n", +- sge.length, request->minfo.conn, request->minfo.tag); +- ret = ibv_post_send(request->minfo.conn->qp[0], &wr, &bad_wr); +- if (ret) { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- assert(0); +- return -errno; +- }; +- +- if (request->rest_len && request->state.err == FI_SUCCESS) { +- /* Move to postponed queue for the next iteration */ +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_RECV_END; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_WAIT4LC; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_recv_read_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- struct fi_ibv_rdm_buf *sbuf = request->sbuf; +- const int ack_size = +- sizeof(struct fi_ibv_rdm_header) + sizeof(request->rndv.id); +- struct ibv_sge sge = { +- .addr = (uintptr_t)sbuf, +- .length = ack_size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE, +- .lkey = fi_ibv_mr_internal_lkey(&conn->s_md), +- }; +- struct ibv_send_wr wr = { +- .wr_id = FI_IBV_RDM_PACK_WR(request), +- .opcode = p->ep->eopcode, +- .sg_list = &sge, +- .num_sge = 1, +- .wr.rdma.remote_addr = +- (uintptr_t)fi_ibv_rdm_get_remote_addr(conn, +- request->sbuf), +- .wr.rdma.rkey = conn->remote_rbuf_rkey, +- .send_flags = (sge.length < p->ep->max_inline_rc) ? +- IBV_SEND_INLINE : 0, +- }; +- struct ibv_send_wr *bad_wr = NULL; +- ssize_t ret = FI_SUCCESS; +- +- assert(request->len > (p->ep->rndv_threshold +- - sizeof(struct fi_ibv_rdm_header))); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_END); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4LC || +- request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(conn, p->ep); +- request->post_counter--; +- +- if (request->rest_len || request->post_counter) { +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +- } +- +- assert(request->sbuf); +- +- sbuf->header.tag = 0; +- sbuf->header.service_tag = 0; +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, +- FI_IBV_RDM_RNDV_ACK_PKT); +- sbuf->service_data.pkt_len = ack_size; +- memcpy(&sbuf->payload, &request->rndv.id, sizeof(request->rndv.id)); +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- VERBS_DBG(FI_LOG_EP_DATA, +- "posted %d bytes, conn %p, tag 0x%" PRIx64 ", request %p\n", +- sge.length, request->minfo.conn, request->minfo.tag, request); +- ret = ibv_post_send(conn->qp[0], &wr, &bad_wr); +- if (ret == 0) { +- assert(request->rndv.md.mr); +- p->ep->domain->internal_mr_dereg(&request->rndv.md); +- VERBS_DBG(FI_LOG_EP_DATA, +- "SENDING RNDV ACK: conn %p, sends_outgoing = %"PRIu32", " +- "post_sends = %"PRIu32"\n", +- conn, conn->av_entry->sends_outgoing, +- p->ep->posted_sends); +- } else { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- assert(0); +- ret = -errno; +- request->state.err = ret; +- } +- request->state.eager = FI_IBV_STATE_EAGER_SEND_WAIT4LC; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_END; +- +- if (request->state.err == FI_SUCCESS) { +- fi_ibv_rdm_cntr_inc(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_cq(p->ep->fi_rcq, request); +- } +- } else { +- fi_ibv_rdm_cntr_inc_err(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(p->ep->fi_rcq, request, +- request->state.err); +- } +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_recv_ack_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC || +- request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_RECV_END); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- +- if (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_END; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_init_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_BEGIN); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- struct fi_ibv_rdm_rma_start_data *p = +- (struct fi_ibv_rdm_rma_start_data *)data; +- ssize_t ret = FI_SUCCESS; +- int lmr_access = 0; +- +- request->context = p->context; +- request->minfo.conn = p->conn; +- request->len = p->data_len; +- request->rest_len = p->data_len; +- request->post_counter = 0; +- +- request->rma.remote_addr = p->rbuf; +- request->rma.mr_rkey = p->mr_rkey; +- request->rma.mr_lkey = p->mr_lkey; +- request->rma.opcode = p->op_code; +- assert(!request->rma.md.mr); +- +- request->comp_flags = p->flags; +- if (p->op_code == IBV_WR_RDMA_READ) { +- request->dest_buf = (void*)p->lbuf; +- lmr_access |= FI_READ; +- } else { +- assert(p->op_code == IBV_WR_RDMA_WRITE); +- lmr_access |= FI_WRITE; +- request->src_addr = (void*)p->lbuf; +- } +- +- if (request->rmabuf && request->len >= p->ep_rdm->max_inline_rc) { +- memcpy(&request->rmabuf->payload, request->src_addr, +- request->len); +- } else if (!request->rmabuf && !p->mr_lkey) { +- ret = p->ep_rdm->domain->internal_mr_reg(p->ep_rdm->domain, +- (void *)p->lbuf, p->data_len, +- lmr_access, +- &request->rma.md); +- if (!ret) +- request->rma.mr_lkey = +- fi_ibv_mr_internal_lkey(&request->rma.md); +- } +- +- request->state.eager = FI_IBV_STATE_EAGER_RMA_INITIALIZED; +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_inject_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RMA_INJECT); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- +- struct ibv_sge sge = { 0 }; +- struct ibv_send_wr wr = { 0 }; +- struct ibv_send_wr *bad_wr = NULL; +- struct fi_ibv_rdm_rma_start_data *p = data; +- int ret; +- +- request->minfo.conn = p->conn; +- request->len = p->data_len; +- request->comp_flags = p->flags; +- request->rmabuf = NULL; +- +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.wr.rdma.remote_addr = p->rbuf; +- wr.wr.rdma.rkey = p->mr_rkey; +- wr.send_flags = 0; +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.opcode = IBV_WR_RDMA_WRITE; +- sge.length = request->len; +- sge.addr = p->lbuf; +- +- if ((request->len < p->ep_rdm->max_inline_rc) && +- (!RMA_RESOURCES_IS_BUSY(request->minfo.conn, p->ep_rdm)) && +- fi_ibv_rdm_check_connection(request->minfo.conn)) { +- wr.send_flags |= IBV_SEND_INLINE; +- } else if (fi_ibv_rdm_prepare_rma_request(request, p->ep_rdm)) { +- memcpy(&request->rmabuf->payload, (void*)p->lbuf, p->data_len); +- sge.addr = (uintptr_t)&request->rmabuf->payload; +- sge.lkey = fi_ibv_mr_internal_rkey( +- &request->minfo.conn->rma_md); +- } else { +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return -FI_EAGAIN; +- } +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep_rdm); +- +- ret = ibv_post_send(request->minfo.conn->qp[0], &wr, &bad_wr); +- request->state.eager = FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC; +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return (ret == 0) ? FI_SUCCESS : -errno; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_post_ready(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert((request->state.eager == FI_IBV_STATE_EAGER_RMA_INITIALIZED && +- request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED) || +- (request->state.eager == FI_IBV_STATE_EAGER_RMA_POSTPONED && +- request->state.rndv == FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC)); +- +- int ret; +- struct fi_ibv_rma_post_ready_data *p = data; +- +- const size_t offset = request->len - request->rest_len; +- const size_t seg_cursize = +- MIN(p->ep_rdm->rndv_seg_size, request->rest_len); +- +- struct ibv_sge sge = { 0 }; +- struct ibv_send_wr wr = { 0 }; +- struct ibv_send_wr *bad_wr = NULL; +- +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.wr.rdma.remote_addr = request->rma.remote_addr; +- wr.wr.rdma.rkey = request->rma.mr_rkey; +- wr.send_flags = 0; +- wr.opcode = request->rma.opcode; +- +- if (request->state.eager == FI_IBV_STATE_EAGER_RMA_POSTPONED) { +- fi_ibv_rdm_remove_from_postponed_queue(request); +- request->state.eager = FI_IBV_STATE_EAGER_RMA_INITIALIZED; +- } +- +- /* buffered operation */ +- if (request->rmabuf) { +- if (request->rma.opcode == IBV_WR_RDMA_WRITE && +- request->len < p->ep_rdm->max_inline_rc) { +- wr.send_flags |= IBV_SEND_INLINE; +- sge.addr = (uintptr_t)request->src_addr; +- } else { +- sge.addr = (uintptr_t)&request->rmabuf->payload; +- sge.lkey = fi_ibv_mr_internal_lkey( +- &request->minfo.conn->rma_md); +- } +- request->state.eager = FI_IBV_STATE_EAGER_RMA_WAIT4LC; +- } else { +- /* src_addr or dest_buf from an union +- * for write or read properly */ +- sge.addr = ((uintptr_t)request->src_addr) + offset; +- sge.lkey = request->rma.mr_lkey; +- request->state.rndv = FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC; +- } +- +- sge.length = seg_cursize; +- +- request->rest_len -= seg_cursize; +- request->post_counter++; +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep_rdm); +- +- ret = ibv_post_send(request->minfo.conn->qp[0], &wr, &bad_wr); +- if (request->rest_len && !ret) { +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- if (ret) +- return ret; +- request->state.eager = FI_IBV_STATE_EAGER_RMA_POSTPONED; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return (!ret) ? FI_SUCCESS : -errno; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_inject_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- if (request->rmabuf) { +- fi_ibv_rdm_set_buffer_status(request->rmabuf, BUF_STATUS_FREE); +- } /* else inline flag was set */ +- +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_buffered_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_RMA_WAIT4LC); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- +- assert(request->rmabuf); +- if (request->rma.opcode == IBV_WR_RDMA_READ) { +- memcpy(request->dest_buf, &request->rmabuf->payload, request->len); +- } +- fi_ibv_rdm_set_buffer_status(request->rmabuf, BUF_STATUS_FREE); +- +- if (request->rma.opcode == IBV_WR_RDMA_READ) { +- fi_ibv_rdm_cntr_inc(p->ep->read_cntr); +- } else if (request->rma.opcode == IBV_WR_RDMA_WRITE) { +- fi_ibv_rdm_cntr_inc(p->ep->write_cntr); +- } +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_cq(p->ep->fi_scq, request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- FI_IBV_RDM_HNDL_REQ_LOG(); +- } +- +- if (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +- +-static ssize_t +-fi_ibv_rdm_rma_zerocopy_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- ssize_t ret = FI_SUCCESS; +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_RMA_INITIALIZED || +- (request->state.eager == FI_IBV_STATE_EAGER_RMA_POSTPONED)); +- assert(request->state.rndv == FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC); +- assert(!request->rmabuf); +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, request->len); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- request->post_counter--; +- +- if (request->rest_len == 0 && request->post_counter == 0) { +- if (request->rma.md.mr) +- ret = p->ep->domain->internal_mr_dereg(&request->rma.md); +- +- if (request->rma.opcode == IBV_WR_RDMA_READ) +- fi_ibv_rdm_cntr_inc(p->ep->read_cntr); +- else if (request->rma.opcode == IBV_WR_RDMA_WRITE) +- fi_ibv_rdm_cntr_inc(p->ep->write_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- if (ret) +- fi_ibv_rdm_move_to_errcq(p->ep->fi_scq, request, ret); +- else +- fi_ibv_rdm_move_to_cq(p->ep->fi_scq, request); +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- request->state.rndv = FI_IBV_STATE_ZEROCOPY_RMA_END; +- } else { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_req_hndl_err(struct fi_ibv_rdm_request *request, void *data) +-{ +- VERBS_INFO(FI_LOG_EP_DATA, +- "\t> IN\t< eager_state = %s, rndv_state = %s, len = %lu\n", +- fi_ibv_rdm_req_eager_state_to_str(request->state.eager), +- fi_ibv_rdm_req_rndv_state_to_str(request->state.rndv), +- request->len); +- +- assert(0); +- return -FI_EOTHER; +-} +- +-ssize_t fi_ibv_rdm_req_hndls_init(void) +-{ +- size_t i, j, k; +- +- for (i = 0; i < FI_IBV_STATE_EAGER_COUNT; ++i) { +- for (j = 0; j < FI_IBV_STATE_RNDV_COUNT; ++j) { +- for (k = 0; k < FI_IBV_EVENT_COUNT; ++k) { +- fi_ibv_rdm_req_hndl_arr[i][j][k] = +- fi_ibv_rdm_req_hndl_err; +- } +- } +- } +- +- // EAGER_SEND stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_SEND_START] = +- fi_ibv_rdm_init_send_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_POSTPONED] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_eager_send_ready; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_eager_send_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_READY_TO_FREE] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_eager_send_lc; +- +- // EAGER_RECV stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_START] = +- fi_ibv_rdm_init_recv_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_PEEK] = +- fi_ibv_rdm_tagged_peek_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_CLAIM] = +- fi_ibv_rdm_tagged_recv_claim; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_GOT_PKT_PROCESS] = +- fi_ibv_rdm_init_unexp_recv_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4PKT] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_GOT_PKT_PROCESS] = +- fi_ibv_rdm_eager_recv_got_pkt; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4RECV] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_START] = +- fi_ibv_rdm_eager_recv_process_unexp_pkt; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4RECV] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_CLAIM] = +- fi_ibv_rdm_tagged_recv_claim; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_CLAIMED] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_START] = +- fi_ibv_rdm_eager_recv_process_unexp_pkt; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4RECV] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_DISCARD] = +- fi_ibv_rdm_eager_recv_discard; +- +- // RNDV_SEND stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_SEND_BEGIN][FI_IBV_EVENT_SEND_START] = +- fi_ibv_rdm_init_send_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_POSTPONED] +- [FI_IBV_STATE_RNDV_SEND_WAIT4SEND][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rndv_rts_send_ready; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_SEND_WAIT4ACK][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_rts_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_READY_TO_FREE] +- [FI_IBV_STATE_RNDV_SEND_END][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_rts_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_SEND_END][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_rts_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_SEND_WAIT4ACK][FI_IBV_EVENT_RECV_GOT_PKT_PROCESS] +- = fi_ibv_rdm_rndv_end; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_END] +- [FI_IBV_STATE_RNDV_SEND_WAIT4ACK][FI_IBV_EVENT_RECV_GOT_PKT_PROCESS] +- = fi_ibv_rdm_rndv_end; +- +- // RNDV_RECV stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_RECV_BEGIN][FI_IBV_EVENT_RECV_START] = +- fi_ibv_rdm_init_recv_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4RECV] +- [FI_IBV_STATE_RNDV_RECV_WAIT4RES][FI_IBV_EVENT_RECV_CLAIM] = +- fi_ibv_rdm_tagged_recv_claim; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_END] +- [FI_IBV_STATE_RNDV_RECV_WAIT4RES][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rndv_recv_post_read; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_END] +- [FI_IBV_STATE_RNDV_RECV_WAIT4RES][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_recv_read_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_END] +- [FI_IBV_STATE_RNDV_RECV_WAIT4LC][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_recv_read_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_END] +- [FI_IBV_STATE_RNDV_RECV_WAIT4LC][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rndv_recv_read_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_RECV_END][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_recv_ack_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_READY_TO_FREE] +- [FI_IBV_STATE_RNDV_RECV_END][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_recv_ack_lc; +- +- // RMA read/write stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RMA_START] = +- fi_ibv_rdm_rma_init_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_INJECT] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RMA_START] = +- fi_ibv_rdm_rma_inject_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_INITIALIZED] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rma_post_ready; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_POSTPONED] +- [FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rma_post_ready; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_WAIT4LC] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rma_buffered_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rma_inject_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_INITIALIZED] +- [FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rma_zerocopy_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_POSTPONED] +- [FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rma_zerocopy_lc; +- +- return FI_SUCCESS; +-} +- +-ssize_t fi_ibv_rdm_req_hndls_clean(void) +-{ +- size_t i, j, k; +- for (i = 0; i < FI_IBV_STATE_EAGER_COUNT; ++i) { +- for (j = 0; j < FI_IBV_STATE_RNDV_COUNT; ++j) { +- for (k = 0; k < FI_IBV_EVENT_COUNT; ++k) { +- fi_ibv_rdm_req_hndl_arr[i][j][k] = NULL; +- } +- } +- } +- return FI_SUCCESS; +-} +- +-ssize_t +-fi_ibv_rdm_req_hndl(struct fi_ibv_rdm_request * request, +- enum fi_ibv_rdm_request_event event, void *data) +-{ +- VERBS_DBG(FI_LOG_EP_DATA, "\t%p, eager_state = %s, rndv_state = %s, event = %s\n", +- request, +- fi_ibv_rdm_req_eager_state_to_str(request->state.eager), +- fi_ibv_rdm_req_rndv_state_to_str(request->state.rndv), +- fi_ibv_rdm_event_to_str(event)); +- assert(fi_ibv_rdm_req_hndl_arr[request->state.eager] +- [request->state.rndv][event]); +- +- return fi_ibv_rdm_req_hndl_arr[request->state.eager] +- [request->state.rndv] +- [event] (request, data); +-} +- +-char * +-fi_ibv_rdm_req_eager_state_to_str(enum fi_ibv_rdm_request_eager_state state) +-{ +- switch (state) { +- case FI_IBV_STATE_EAGER_BEGIN: +- return "STATE_EAGER_BEGIN"; +- +- case FI_IBV_STATE_EAGER_SEND_POSTPONED: +- return "STATE_EAGER_SEND_POSTPONED"; +- case FI_IBV_STATE_EAGER_SEND_WAIT4LC: +- return "STATE_EAGER_SEND_WAIT4LC"; +- case FI_IBV_STATE_EAGER_SEND_END: +- return "STATE_EAGER_SEND_END"; +- +- case FI_IBV_STATE_EAGER_RECV_BEGIN: +- return "STATE_EAGER_RECV_BEGIN"; +- case FI_IBV_STATE_EAGER_RECV_WAIT4PKT: +- return "STATE_EAGER_RECV_WAIT4PKT"; +- case FI_IBV_STATE_EAGER_RECV_WAIT4RECV: +- return "STATE_EAGER_RECV_WAIT4RECV"; +- case FI_IBV_STATE_EAGER_RECV_CLAIMED: +- return "FI_IBV_STATE_EAGER_RECV_CLAIMED"; +- case FI_IBV_STATE_EAGER_RECV_END: +- return "STATE_EAGER_RECV_END"; +- +- case FI_IBV_STATE_EAGER_RMA_INJECT: +- return "FI_IBV_STATE_EAGER_RMA_INJECT"; +- case FI_IBV_STATE_EAGER_RMA_INITIALIZED: +- return "FI_IBV_STATE_EAGER_RMA_INITIALIZED"; +- case FI_IBV_STATE_EAGER_RMA_POSTPONED: +- return "FI_IBV_STATE_EAGER_RMA_POSTPONED"; +- case FI_IBV_STATE_EAGER_RMA_WAIT4LC: +- return "FI_IBV_STATE_EAGER_RMA_WAIT4LC"; +- case FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC: +- return "FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC"; +- case FI_IBV_STATE_EAGER_RMA_END: +- return "FI_IBV_STATE_EAGER_RMA_END"; +- +- case FI_IBV_STATE_EAGER_READY_TO_FREE: +- return "STATE_EAGER_READY_TO_FREE"; +- +- case FI_IBV_STATE_EAGER_COUNT: +- return "STATE_EAGER_COUNT"; +- default: +- return "STATE_EAGER_UNKNOWN!!!"; +- } +-} +- +-char *fi_ibv_rdm_req_rndv_state_to_str(enum fi_ibv_rdm_request_rndv_state state) +-{ +- switch (state) { +- case FI_IBV_STATE_RNDV_NOT_USED: +- return "STATE_RNDV_NOT_USED"; +- case FI_IBV_STATE_RNDV_SEND_BEGIN: +- return "STATE_RNDV_SEND_BEGIN"; +- case FI_IBV_STATE_RNDV_SEND_WAIT4SEND: +- return "STATE_RNDV_SEND_WAIT4SEND"; +- case FI_IBV_STATE_RNDV_SEND_WAIT4ACK: +- return "STATE_RNDV_SEND_WAIT4ACK"; +- case FI_IBV_STATE_RNDV_SEND_END: +- return "STATE_RNDV_SEND_END"; +- +- case FI_IBV_STATE_RNDV_RECV_BEGIN: +- return "STATE_RNDV_RECV_BEGIN"; +- case FI_IBV_STATE_RNDV_RECV_WAIT4RES: +- return "STATE_RNDV_RECV_WAIT4RES"; +- case FI_IBV_STATE_RNDV_RECV_WAIT4RECV: +- return "STATE_RNDV_RECV_WAIT4RECV"; +- case FI_IBV_STATE_RNDV_RECV_WAIT4LC: +- return "STATE_RNDV_RECV_WAIT4LC"; +- case FI_IBV_STATE_RNDV_RECV_END: +- return "STATE_RNDV_RECV_END"; +- +- case FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC: +- return "FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC"; +- case FI_IBV_STATE_ZEROCOPY_RMA_END: +- return "FI_IBV_STATE_ZEROCOPY_RMA_END"; +- +- case FI_IBV_STATE_RNDV_COUNT: +- return "STATE_RNDV_COUNT"; +- default: +- return "STATE_RNDV_UNKNOWN!!!"; +- } +-} +- +-char *fi_ibv_rdm_event_to_str(enum fi_ibv_rdm_request_event event) +-{ +- switch (event) { +- case FI_IBV_EVENT_SEND_START: +- return "EVENT_SEND_START"; +- case FI_IBV_EVENT_POST_READY: +- return "FI_IBV_EVENT_POST_READY"; +- case FI_IBV_EVENT_POST_LC: +- return "FI_IBV_EVENT_POST_LC"; +- +- case FI_IBV_EVENT_RECV_START: +- return "EVENT_RECV_START"; +- case FI_IBV_EVENT_RECV_GOT_PKT_PREPROCESS: +- return "EVENT_RECV_GOT_PKT_PREPROCESS"; +- case FI_IBV_EVENT_RECV_GOT_PKT_PROCESS: +- return "EVENT_RECV_GOT_PKT_PROCESS"; +- case FI_IBV_EVENT_RECV_GOT_ACK: +- return "EVENT_RECV_GOT_ACK"; +- case FI_IBV_EVENT_RECV_PEEK: +- return "FI_IBV_EVENT_RECV_PEEK"; +- case FI_IBV_EVENT_RECV_CLAIM: +- return "FI_IBV_EVENT_RECV_CLAIM"; +- case FI_IBV_EVENT_RECV_DISCARD: +- return "FI_IBV_EVENT_RECV_DISCARD"; +- +- case FI_IBV_EVENT_RMA_START: +- return "FI_IBV_EVENT_RMA_START"; +- +- case FI_IBV_EVENT_COUNT: +- return "EVENT_COUNT"; +- default: +- return "EVENT_UNKNOWN!!!"; +- } +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.h +deleted file mode 100644 +index a4c84a4..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.h ++++ /dev/null +@@ -1,199 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _VERBS_TAGGED_EP_RDM_STATES_H +-#define _VERBS_TAGGED_EP_RDM_STATES_H +- +-#include +-#include +- +-struct fi_ibv_rdm_request; +-struct fi_verbs_rdm_request_minfo; +- +-enum fi_ibv_rdm_request_eager_state { +- FI_IBV_STATE_EAGER_BEGIN = 0, // must be 0 +- +- FI_IBV_STATE_EAGER_SEND_POSTPONED, +- FI_IBV_STATE_EAGER_SEND_WAIT4LC, // wait for local completion +- FI_IBV_STATE_EAGER_SEND_END, +- +- FI_IBV_STATE_EAGER_RECV_BEGIN, +- FI_IBV_STATE_EAGER_RECV_WAIT4PKT, +- FI_IBV_STATE_EAGER_RECV_WAIT4RECV, +- FI_IBV_STATE_EAGER_RECV_CLAIMED, +- FI_IBV_STATE_EAGER_RECV_END, +- +- FI_IBV_STATE_EAGER_RMA_INJECT, +- FI_IBV_STATE_EAGER_RMA_INITIALIZED, +- FI_IBV_STATE_EAGER_RMA_POSTPONED, +- FI_IBV_STATE_EAGER_RMA_WAIT4LC, +- FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC, +- FI_IBV_STATE_EAGER_RMA_END, +- +- FI_IBV_STATE_EAGER_READY_TO_FREE, +- +- FI_IBV_STATE_EAGER_COUNT // must be last +-}; +- +-char * +-fi_ibv_rdm_req_eager_state_to_str(enum fi_ibv_rdm_request_eager_state state); +- +-enum fi_ibv_rdm_request_rndv_state { +- FI_IBV_STATE_RNDV_NOT_USED = 0, // must be 0 +- FI_IBV_STATE_RNDV_SEND_BEGIN, +- // FI_IBV_STATE_RNDV_SEND_WAIT4CTS, // not implemented yet +- FI_IBV_STATE_RNDV_SEND_WAIT4SEND, +- FI_IBV_STATE_RNDV_SEND_WAIT4ACK, +- FI_IBV_STATE_RNDV_SEND_END, +- +- FI_IBV_STATE_RNDV_RECV_BEGIN, +- FI_IBV_STATE_RNDV_RECV_WAIT4RES, +- FI_IBV_STATE_RNDV_RECV_WAIT4RECV, +- FI_IBV_STATE_RNDV_RECV_WAIT4LC, +- FI_IBV_STATE_RNDV_RECV_END, +- +- FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC, +- FI_IBV_STATE_ZEROCOPY_RMA_END, +- +- FI_IBV_STATE_RNDV_COUNT // must be last +-}; +- +-char * +-fi_ibv_rdm_req_rndv_state_to_str(enum fi_ibv_rdm_request_rndv_state state); +- +-enum fi_ibv_rdm_request_event { +- FI_IBV_EVENT_SEND_START = 0, +- FI_IBV_EVENT_POST_READY, +- FI_IBV_EVENT_POST_LC, +- +- FI_IBV_EVENT_RECV_START, +- FI_IBV_EVENT_RECV_GOT_PKT_PREPROCESS, +- FI_IBV_EVENT_RECV_GOT_PKT_PROCESS, +- FI_IBV_EVENT_RECV_GOT_ACK, +- FI_IBV_EVENT_RECV_PEEK, +- FI_IBV_EVENT_RECV_CLAIM, +- FI_IBV_EVENT_RECV_DISCARD, +- +- FI_IBV_EVENT_RMA_START, +- +- FI_IBV_EVENT_COUNT // must be last +-}; +- +-char *fi_ibv_rdm_event_to_str(enum fi_ibv_rdm_request_event event); +- +-// Send service data types +- +-enum ibv_rdm_send_type +-{ +- IBV_RDM_SEND_TYPE_UND = 0, +- IBV_RDM_SEND_TYPE_GEN, +- IBV_RDM_SEND_TYPE_INJ, +- IBV_RDM_SEND_TYPE_VEC +-}; +- +-struct fi_ibv_rdm_send_start_data { +- struct fi_ibv_rdm_ep *ep_rdm; +- struct fi_ibv_rdm_conn *conn; +- void *context; +- uint64_t flags; +- size_t tag; +- size_t data_len; +- union { +- void *src_addr; +- struct iovec* iovec_arr; +- } buf; +- int iov_count; +- int is_tagged; +- unsigned int imm; +- enum ibv_rdm_send_type stype; +-}; +- +-struct fi_ibv_rdm_tagged_send_ready_data { +- struct fi_ibv_rdm_ep *ep; +-}; +- +-struct fi_ibv_rdm_tagged_send_completed_data { +- struct fi_ibv_rdm_ep *ep; +-}; +- +-// Recv service data types +- +-struct fi_ibv_rdm_tagged_recv_start_data { +- struct fi_ibv_rdm_tagged_peek_data peek_data; +- struct fi_context *context; +- struct fi_ibv_rdm_ep *ep; +- void *dest_addr; +- size_t data_len; +-}; +- +-struct fi_ibv_recv_got_pkt_preprocess_data { +- struct fi_ibv_rdm_conn *conn; +- struct fi_ibv_rdm_ep *ep; +- struct fi_ibv_rdm_buf *rbuf; +- size_t arrived_len; +- uint64_t pkt_type; +- int imm_data; +-}; +- +-struct fi_ibv_recv_got_pkt_process_data { +- struct fi_ibv_rdm_ep *ep; +-} ; +- +-// rma service data types +- +- +-struct fi_ibv_rdm_rma_start_data { +- struct fi_ibv_rdm_ep *ep_rdm; +- struct fi_ibv_rdm_conn *conn; +- void *context; +- uint64_t flags; +- uint64_t data_len; +- uintptr_t rbuf; +- uintptr_t lbuf; +- uint64_t mr_rkey; +- uint64_t mr_lkey; +- enum ibv_wr_opcode op_code; +-}; +- +-struct fi_ibv_rma_post_ready_data { +- struct fi_ibv_rdm_ep *ep_rdm; +-}; +- +-// Interfaces +- +-ssize_t fi_ibv_rdm_req_hndls_init(void); +-ssize_t fi_ibv_rdm_req_hndls_clean(void); +-ssize_t fi_ibv_rdm_req_hndl(struct fi_ibv_rdm_request *request, +- enum fi_ibv_rdm_request_event event, +- void *data); +- +-#endif /* _VERBS_TAGGED_EP_RDM_STATES_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.c +deleted file mode 100644 +index f5e7ff2..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.c ++++ /dev/null +@@ -1,309 +0,0 @@ +-/* +- * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +- +-#include +-#include "../fi_verbs.h" +-#include "verbs_utils.h" +-#include "verbs_rdm.h" +-#include "verbs_queuing.h" +- +-size_t rdm_buffer_size(size_t buf_send_size) +-{ +- size_t size = buf_send_size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE + +- sizeof(struct fi_ibv_rdm_header) + FI_IBV_BUF_ALIGNMENT; +- size -= (size % FI_IBV_BUF_ALIGNMENT); +- return size; +-} +- +-int fi_ibv_rdm_req_match(struct dlist_entry *item, const void *other) +-{ +- const struct fi_ibv_rdm_request *req = other; +- return (item == &req->queue_entry); +-} +- +-int fi_ibv_rdm_req_match_by_info(struct dlist_entry *item, const void *info) +-{ +- struct fi_ibv_rdm_request *request = +- container_of(item, struct fi_ibv_rdm_request, queue_entry); +- +- const struct fi_ibv_rdm_minfo *minfo = info; +- +- return ( +- ((request->minfo.conn == NULL) || +- (request->minfo.conn == minfo->conn)) +- && +- (request->minfo.is_tagged ? +- ((request->minfo.tag & request->minfo.tagmask) == +- (minfo->tag & request->minfo.tagmask)) : +- (request->minfo.is_tagged == minfo->is_tagged)) +- ); +-} +- +-/* +- * The same as fi_ibv_rdm_req_match_by_info but conn and tagmask fields +- * are used for matching instead of request's ones +- */ +-int fi_ibv_rdm_req_match_by_info2(struct dlist_entry *item, const void *info) +-{ +- struct fi_ibv_rdm_request *request = +- container_of(item, struct fi_ibv_rdm_request, queue_entry); +- +- const struct fi_ibv_rdm_minfo *minfo = info; +- +- return ( +- ((minfo->conn == NULL) || +- (request->minfo.conn == minfo->conn)) +- && +- (minfo->is_tagged ? +- ((request->minfo.tag & minfo->tagmask) == +- (minfo->tag & minfo->tagmask)) : +- (request->minfo.is_tagged == minfo->is_tagged)) +- ); +-} +- +-/* +- * The same as fi_ibv_rdm_tagged_req_match_by_info2 but context field is added +- * to compare +- */ +-int fi_ibv_rdm_req_match_by_info3(struct dlist_entry *item, const void *info) +-{ +- struct fi_ibv_rdm_request *request = +- container_of(item, struct fi_ibv_rdm_request, queue_entry); +- +- const struct fi_ibv_rdm_tagged_peek_data *peek_data = info; +- const void *context = (peek_data->flags & FI_CLAIM) ? +- peek_data->context : NULL; +- +- return ((request->context == context) && +- fi_ibv_rdm_req_match_by_info2(item, &peek_data->minfo)); +-} +- +-int fi_ibv_rdm_postponed_process(struct dlist_entry *postponed_item, +- const void *arg) +-{ +- const struct fi_ibv_rdm_tagged_send_ready_data *send_data = arg; +- +- struct fi_ibv_rdm_postponed_entry *postponed_entry = +- container_of(postponed_item, +- struct fi_ibv_rdm_postponed_entry, queue_entry); +- int ret = 0; +- if (!dlist_empty(&postponed_entry->conn->postponed_requests_head)) { +- struct dlist_entry *req_entry = +- postponed_entry->conn->postponed_requests_head.next; +- +- struct fi_ibv_rdm_request *request = +- container_of(req_entry, struct fi_ibv_rdm_request, +- queue_entry); +- +- int res = 0; +- if ((request->state.eager < FI_IBV_STATE_EAGER_RMA_INJECT) && +- (request->sbuf == NULL)) { +- res = fi_ibv_rdm_tagged_prepare_send_request(request, +- send_data->ep); +- } else { +- /* +- * This case is possible only for segmented RNDV msg or +- * RMA operation (> 1GB), connection must be already +- * established +- */ +- assert(request->state.rndv != FI_IBV_STATE_RNDV_NOT_USED); +- assert(fi_ibv_rdm_check_connection(request->minfo.conn)); +- if (request->state.eager <= FI_IBV_STATE_EAGER_RECV_END) { +- res = !TSEND_RESOURCES_IS_BUSY(request->minfo.conn, +- send_data->ep); +- } else { +- res = !RMA_RESOURCES_IS_BUSY(request->minfo.conn, +- send_data->ep); +- } +- } +- +- if (res) { +- fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_READY, +- (void *) send_data); +- ret++; +- } +- } +- return ret; +-} +- +-void fi_ibv_rdm_conn_init_cm_role(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- const int addr_cmp = memcmp(&conn->addr, &ep->my_addr, +- FI_IBV_RDM_DFLT_ADDRLEN); +- +- if (addr_cmp < 0) { +- conn->cm_role = FI_VERBS_CM_ACTIVE; +- } else if (addr_cmp > 0) { +- conn->cm_role = FI_VERBS_CM_PASSIVE; +- } else { +- conn->cm_role = FI_VERBS_CM_SELF; +- } +-} +- +-void fi_ibv_rdm_clean_queues(struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_request *request; +- struct fi_ibv_rdm_multi_request *multi_request; +- +- while ((request = fi_ibv_rdm_take_first_from_unexp_queue(ep))) { +- if (request->unexp_rbuf) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((multi_request = fi_ibv_rdm_take_first_from_multi_recv_list(ep))) +- util_buf_release(ep->fi_ibv_rdm_multi_request_pool, multi_request); +- +- while ((request = fi_ibv_rdm_take_first_from_posted_queue(ep))) { +- /* Check `request->context->internal[0] == NULL` in fi_cancel +- * will handle the case that request was already canceled +- * internally by provider */ +- request->context->internal[0] = NULL; +- if (request->iov_count > 0) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_postponed_queue(ep))) { +- if (request->iov_count > 0) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_cq(ep->fi_scq))) { +- if (request->iov_count > 0) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_cq(ep->fi_rcq))) { +- if (request->iov_count > 0) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_errcq(ep->fi_scq))) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_errcq(ep->fi_rcq))) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +-} +- +-ssize_t +-fi_ibv_rdm_send_common(struct fi_ibv_rdm_send_start_data* sdata) +-{ +- struct fi_ibv_rdm_request *request = +- util_buf_alloc(sdata->ep_rdm->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- request->ep = sdata->ep_rdm; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- /* Initial state */ +- request->state.eager = FI_IBV_STATE_EAGER_BEGIN; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- +- /* postponed_entry means that there are elements postponed to +- * send & current request must be queued */ +- const int in_order = (sdata->conn->postponed_entry) ? 0 : 1; +- int ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_SEND_START, sdata); +- +- if (!ret && in_order && +- fi_ibv_rdm_tagged_prepare_send_request(request, sdata->ep_rdm)) { +- struct fi_ibv_rdm_tagged_send_ready_data req_data = +- { .ep = sdata->ep_rdm }; +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_READY, +- &req_data); +- } +- +- return ret; +-} +- +-ssize_t +-rdm_trecv_second_event(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- ssize_t ret = FI_SUCCESS; +- +- switch (request->state.rndv) +- { +- case FI_IBV_STATE_RNDV_NOT_USED: +- if (request->state.eager != FI_IBV_STATE_EAGER_RECV_WAIT4PKT) { +- struct fi_ibv_recv_got_pkt_process_data data = { +- .ep = ep +- }; +- ret = fi_ibv_rdm_req_hndl(request, +- FI_IBV_EVENT_RECV_START, +- &data); +- } +- break; +- case FI_IBV_STATE_RNDV_RECV_WAIT4RES: +- if (fi_ibv_rdm_tagged_prepare_send_request(request, ep)) { +- struct fi_ibv_rdm_tagged_send_ready_data data = { +- .ep = ep +- }; +- ret = fi_ibv_rdm_req_hndl(request, +- FI_IBV_EVENT_POST_READY, +- &data); +- } +- break; +- default: +- break; +- } +- +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.h +deleted file mode 100644 +index 7a3aeeb..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.h ++++ /dev/null +@@ -1,192 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _VERBS_UTILS_H +-#define _VERBS_UTILS_H +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +- +-#include "../fi_verbs.h" +- +-#if (defined(__ICC) || defined(__INTEL_COMPILER) || \ +- defined(__GNUC__) || defined(__GNUG__)) && \ +- defined(__x86_64__) +-#include "xmmintrin.h" +-#define FI_IBV_PREFETCH_ADDR(_addr) { \ +- _mm_prefetch((const char *)(_addr), _MM_HINT_T0);\ +-} +-#else /* ICC || GCC && x86_64 */ +-#define FI_IBV_PREFETCH_ADDR(_addr) +-#endif /* ICC || GCC && x86_64 */ +- +-/* TODO: Merge anything useful into verbs_rdm.h */ +- +-struct fi_ibv_msg_ep; +- +-#define FI_IBV_RDM_DFLT_ADDRLEN (sizeof (struct sockaddr_in)) +- +-#define FI_IBV_RDM_CM_THREAD_TIMEOUT (100) +- +-#define FI_IBV_RDM_TAGGED_DFLT_BUFFER_NUM (8) +-#define FI_IBV_RDM_DFLT_CQREAD_BUNCH_SIZE (FI_IBV_RDM_TAGGED_DFLT_BUFFER_NUM) +- +-#define FI_IBV_RDM_DFLT_BUFFER_SIZE \ +- (3 * FI_IBV_BUF_ALIGNMENT) +- +-#define FI_IBV_RDM_DFLT_BUFFERED_SIZE \ +- (FI_IBV_RDM_DFLT_BUFFER_SIZE - \ +- FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE - \ +- sizeof(struct fi_ibv_rdm_header)) +- +-/* +- * calculates internal buffer size from user defined buffered send size in +- * consideration of wired protocols, alignment, etc +- */ +-size_t rdm_buffer_size(size_t buf_send_size); +- +-#ifdef HAVE_VERBS_EXP_H +-/* 128MB is ODP MR limitation */ +-#define FI_IBV_RDM_SEG_MAXSIZE (128*1024*1024) +-#else /* HAVE_VERBS_EXP_H */ +-/* 1GB is RC_QP limitation */ +-#define FI_IBV_RDM_SEG_MAXSIZE (1024*1024*1024) +-#endif /* HAVE_VERBS_EXP_H */ +- +-/* TODO: CQs depths increased from 100 to 1000 to prevent +- * "Work Request Flushed Error" in stress tests like alltoall. +- */ +-#define FI_IBV_RDM_TAGGED_DFLT_SCQ_SIZE (1000) +-#define FI_IBV_RDM_TAGGED_DFLT_RCQ_SIZE (1000) +- +-#define FI_IBV_RDM_CM_RESOLVEADDR_TIMEOUT (30000) +- +-#if ENABLE_DEBUG +-#define FI_IBV_RDM_CHECK_RECV_WC(wc) \ +- ((wc->status == IBV_WC_SUCCESS) && \ +- (wc->opcode == IBV_WC_RECV_RDMA_WITH_IMM || wc->opcode == IBV_WC_RECV)) +-#else +-#define FI_IBV_RDM_CHECK_RECV_WC(wc) (wc->status == IBV_WC_SUCCESS) +-#endif /* ENABLE_DEBUG */ +- +-/* TODO: Holy macro batman, use verbs calls */ +-#define FI_IBV_DBG_OPCODE(wc_opcode, str) \ +- VERBS_DBG(FI_LOG_CQ, "CQ COMPL: "str" -> %s\n", \ +- wc_opcode == IBV_WC_SEND ? "IBV_WC_SEND" : \ +- wc_opcode == IBV_WC_RDMA_WRITE ? "IBV_WC_RDMA_WRITE" : \ +- wc_opcode == IBV_WC_RDMA_READ ? "IBV_WC_RDMA_READ" : \ +- wc_opcode == IBV_WC_COMP_SWAP ? "IBV_WC_COMP_SWAP" : \ +- wc_opcode == IBV_WC_FETCH_ADD ? "IBV_WC_FETCH_ADD" : \ +- wc_opcode == IBV_WC_BIND_MW ? "IBV_WC_BIND_MW" : \ +- wc_opcode == IBV_WC_RECV ? "IBV_WC_RECV" : \ +- wc_opcode == IBV_WC_RECV_RDMA_WITH_IMM ? "IBV_WC_RECV_RDMA_WITH_IMM" : \ +- "IBV_WC_UNKNOWN!!!"); +- +-#if ENABLE_DEBUG +- +-#define FI_IBV_RDM_DBG_REQUEST(prefix, request, level) \ +-do { \ +- const size_t max_str_len = 1024; \ +- char str[max_str_len]; \ +- snprintf(str, max_str_len, \ +- "%s request: %p, eager_state: %s, rndv_state: %s," \ +- " err_state: %ld, tag: 0x%lx, len: %lu, rest: %lu," \ +- "context: %p, connection: %p ep: %p\n", \ +- prefix, \ +- request, \ +- fi_ibv_rdm_req_eager_state_to_str(request->state.eager), \ +- fi_ibv_rdm_req_rndv_state_to_str(request->state.rndv), \ +- request->state.err, \ +- request->minfo.tag, \ +- request->len, \ +- request->rest_len, \ +- request->context, \ +- request->minfo.conn, \ +- request->ep); \ +- \ +- switch (level) \ +- { \ +- case FI_LOG_WARN: \ +- case FI_LOG_TRACE: \ +- case FI_LOG_INFO: \ +- VERBS_INFO(FI_LOG_EP_DATA, "%s", str); \ +- break; \ +- case FI_LOG_DEBUG: \ +- default: \ +- VERBS_DBG(FI_LOG_EP_DATA, "%s", str); \ +- break; \ +- } \ +-} while (0); +- +-#else // ENABLE_DEBUG +- +-#define FI_IBV_RDM_DBG_REQUEST(prefix, request, level) +- +-#endif // ENABLE_DEBUG +- +-struct fi_ibv_rdm_minfo { +- struct fi_ibv_rdm_conn *conn; +- uint64_t is_tagged; /* TODO: unexpected RTS for MSG */ +- uint64_t tag; +- uint64_t tagmask; +-}; +- +-struct fi_ibv_rdm_tagged_peek_data { +- struct fi_ibv_rdm_minfo minfo; +- void *context; +- uint64_t flags; +-}; +- +-struct fi_ibv_rdm_cm; +-struct fi_ibv_rdm_request; +-struct fi_ibv_rdm_send_start_data; +- +-int fi_ibv_rdm_req_match(struct dlist_entry *item, const void *other); +-int fi_ibv_rdm_req_match_by_info(struct dlist_entry *item, const void *info); +-int fi_ibv_rdm_req_match_by_info2(struct dlist_entry *item, const void *info); +-int fi_ibv_rdm_req_match_by_info3(struct dlist_entry *item, const void *info); +-int fi_ibv_rdm_postponed_process(struct dlist_entry *item, const void *arg); +-void fi_ibv_rdm_conn_init_cm_role(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep); +- +-ssize_t fi_ibv_rdm_send_common(struct fi_ibv_rdm_send_start_data* sdata); +-ssize_t rdm_trecv_second_event(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep); +- +-#endif /* _VERBS_UTILS_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.c +index cd8b859..e918556 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.c +@@ -35,7 +35,6 @@ + #include + + #include "fi_verbs.h" +-#include "ep_rdm/verbs_rdm.h" + + static void fi_ibv_fini(void); + +@@ -61,26 +60,33 @@ struct fi_ibv_gl_data fi_ibv_gl_data = { + .mr_max_cached_cnt = 4096, + .mr_max_cached_size = ULONG_MAX, + .mr_cache_merge_regions = 0, +- +- .rdm = { +- .buffer_num = FI_IBV_RDM_TAGGED_DFLT_BUFFER_NUM, +- .buffer_size = FI_IBV_RDM_DFLT_BUFFERED_SIZE, +- .rndv_seg_size = FI_IBV_RDM_SEG_MAXSIZE, +- .thread_timeout = FI_IBV_RDM_CM_THREAD_TIMEOUT, +- .eager_send_opcode = "IBV_WR_SEND", +- .cm_thread_affinity = NULL, +- }, +- + .dgram = { + .use_name_server = 1, + .name_server_port = 5678, + }, ++ ++ .msg = { ++ /* Disabled by default. Use XRC transport for message ++ * endpoint only if it is explicitly requested */ ++ .prefer_xrc = 0, ++ .xrcd_filename = "/tmp/verbs_xrcd", ++ }, ++}; ++ ++struct fi_ibv_dev_preset { ++ int max_inline_data; ++ const char *dev_name_prefix; ++} verbs_dev_presets[] = { ++ { ++ .max_inline_data = 48, ++ .dev_name_prefix = "i40iw", ++ }, + }; + + struct fi_provider fi_ibv_prov = { + .name = VERBS_PROV_NAME, + .version = VERBS_PROV_VERS, +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = fi_ibv_getinfo, + .fabric = fi_ibv_fabric, + .cleanup = fi_ibv_fini +@@ -102,50 +108,6 @@ int fi_ibv_sockaddr_len(struct sockaddr *addr) + return ofi_sizeofaddr(addr); + } + +-int fi_ibv_rdm_cm_bind_ep(struct fi_ibv_rdm_cm *cm, struct fi_ibv_rdm_ep *ep) +-{ +- char my_ipoib_addr_str[INET6_ADDRSTRLEN]; +- +- assert(cm->ec && cm->listener); +- +- if (ep->info->src_addr) { +- memcpy(&ep->my_addr, ep->info->src_addr, sizeof(ep->my_addr)); +- +- inet_ntop(ep->my_addr.sin_family, +- &ep->my_addr.sin_addr.s_addr, +- my_ipoib_addr_str, INET_ADDRSTRLEN); +- } else { +- strcpy(my_ipoib_addr_str, "undefined"); +- } +- +- VERBS_INFO(FI_LOG_EP_CTRL, "My IPoIB: %s\n", my_ipoib_addr_str); +- +- if (!cm->is_bound) { +- if (rdma_bind_addr(cm->listener, (struct sockaddr *)&ep->my_addr)) { +- VERBS_INFO(FI_LOG_EP_CTRL, +- "Failed to bind cm listener to my IPoIB addr %s: %s\n", +- my_ipoib_addr_str, strerror(errno)); +- return -FI_EOTHER; +- } +- if (rdma_listen(cm->listener, 1024)) { +- VERBS_INFO(FI_LOG_EP_CTRL, "rdma_listen failed: %s\n", +- strerror(errno)); +- return -FI_EOTHER; +- } +- cm->is_bound = 1; +- } +- +- if (!ep->my_addr.sin_port) { +- ep->my_addr.sin_port = rdma_get_src_port(cm->listener); +- } +- assert(ep->my_addr.sin_family == AF_INET); +- +- VERBS_INFO(FI_LOG_EP_CTRL, "My ep_addr: %s:%u\n", +- inet_ntoa(ep->my_addr.sin_addr), ntohs(ep->my_addr.sin_port)); +- +- return FI_SUCCESS; +-} +- + int fi_ibv_get_rdma_rai(const char *node, const char *service, uint64_t flags, + const struct fi_info *hints, struct rdma_addrinfo **rai) + { +@@ -157,11 +119,8 @@ int fi_ibv_get_rdma_rai(const char *node, const char *service, uint64_t flags, + goto out; + + if (!node && !rai_hints.ai_dst_addr) { +- if ((!rai_hints.ai_src_addr && !service) || +- (!rai_hints.ai_src_addr && FI_IBV_EP_TYPE_IS_RDM(hints))) +- { ++ if (!rai_hints.ai_src_addr && !service) + node = local_node; +- } + rai_hints.ai_flags |= RAI_PASSIVE; + } + +@@ -204,6 +163,50 @@ out: + return ret; + } + ++int fi_ibv_get_rai_id(const char *node, const char *service, uint64_t flags, ++ const struct fi_info *hints, struct rdma_addrinfo **rai, ++ struct rdma_cm_id **id) ++{ ++ int ret; ++ ++ // TODO create a similar function that won't require pruning ib_rai ++ ret = fi_ibv_get_rdma_rai(node, service, flags, hints, rai); ++ if (ret) ++ return ret; ++ ++ ret = rdma_create_id(NULL, id, NULL, RDMA_PS_TCP); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_create_id", errno); ++ ret = -errno; ++ goto err1; ++ } ++ ++ if ((*rai)->ai_flags & RAI_PASSIVE) { ++ ret = rdma_bind_addr(*id, (*rai)->ai_src_addr); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_bind_addr", errno); ++ ret = -errno; ++ goto err2; ++ } ++ return 0; ++ } ++ ++ ret = rdma_resolve_addr(*id, (*rai)->ai_src_addr, ++ (*rai)->ai_dst_addr, 2000); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_resolve_addr", errno); ++ ret = -errno; ++ goto err2; ++ } ++ return 0; ++err2: ++ if (rdma_destroy_id(*id)) ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_destroy_id", errno); ++err1: ++ rdma_freeaddrinfo(*rai); ++ return ret; ++} ++ + int fi_ibv_create_ep(const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, + struct rdma_addrinfo **rai, struct rdma_cm_id **id) +@@ -347,6 +350,10 @@ int fi_ibv_set_rnr_timer(struct ibv_qp *qp) + attr.min_rnr_timer = fi_ibv_gl_data.min_rnr_timer; + } + ++ /* XRC initiator QP do not have responder logic */ ++ if (qp->qp_type == IBV_QPT_XRC_SEND) ++ return 0; ++ + ret = ibv_modify_qp(qp, &attr, IBV_QP_MIN_RNR_TIMER); + if (ret) { + VERBS_WARN(FI_LOG_EQ, "Unable to modify QP attribute\n"); +@@ -359,23 +366,35 @@ int fi_ibv_set_rnr_timer(struct ibv_qp *qp) + } + + int fi_ibv_find_max_inline(struct ibv_pd *pd, struct ibv_context *context, +- enum ibv_qp_type qp_type) ++ enum ibv_qp_type qp_type) + { + struct ibv_qp_init_attr qp_attr; + struct ibv_qp *qp = NULL; +- struct ibv_cq *cq = ibv_create_cq(context, 1, NULL, NULL, 0); +- assert(cq); ++ struct ibv_cq *cq; + int max_inline = 2; + int rst = 0; ++ const char *dev_name = ibv_get_device_name(context->device); ++ uint8_t i; ++ ++ for (i = 0; i < count_of(verbs_dev_presets); i++) { ++ if (!strncmp(dev_name, verbs_dev_presets[i].dev_name_prefix, ++ strlen(verbs_dev_presets[i].dev_name_prefix))) ++ return verbs_dev_presets[i].max_inline_data; ++ } ++ ++ cq = ibv_create_cq(context, 1, NULL, NULL, 0); ++ assert(cq); + + memset(&qp_attr, 0, sizeof(qp_attr)); + qp_attr.send_cq = cq; +- qp_attr.recv_cq = cq; + qp_attr.qp_type = qp_type; + qp_attr.cap.max_send_wr = 1; +- qp_attr.cap.max_recv_wr = 1; + qp_attr.cap.max_send_sge = 1; +- qp_attr.cap.max_recv_sge = 1; ++ if (!fi_ibv_is_xrc_send_qp(qp_type)) { ++ qp_attr.recv_cq = cq; ++ qp_attr.cap.max_recv_wr = 1; ++ qp_attr.cap.max_recv_sge = 1; ++ } + qp_attr.sq_sig_all = 1; + + do { +@@ -575,6 +594,22 @@ static int fi_ibv_read_params(void) + "Invalid value of use_odp\n"); + return -FI_EINVAL; + } ++ ++ if (fi_ibv_get_param_bool("prefer_xrc", "Order XRC transport fi_infos" ++ "ahead of RC. Default orders RC first.", ++ &fi_ibv_gl_data.msg.prefer_xrc)) { ++ VERBS_WARN(FI_LOG_CORE, ++ "Invalid value of prefer_xrc\n"); ++ return -FI_EINVAL; ++ } ++ ++ if (fi_ibv_get_param_str("xrcd_filename", "A file to " ++ "associate with the XRC domain.", ++ &fi_ibv_gl_data.msg.xrcd_filename)) { ++ VERBS_WARN(FI_LOG_CORE, ++ "Invalid value of xrcd_filename\n"); ++ return -FI_EINVAL; ++ } + if (fi_ibv_get_param_int("cqread_bunch_size", "The number of entries to " + "be read from the verbs completion queue at a time", + &fi_ibv_gl_data.cqread_bunch_size) || +@@ -621,61 +656,6 @@ static int fi_ibv_read_params(void) + return -FI_EINVAL; + } + +- /* RDM-specific parameters */ +- if (fi_ibv_get_param_int("rdm_buffer_num", "The number of pre-registered " +- "buffers for buffered operations between " +- "the endpoints, must be a power of 2", +- &fi_ibv_gl_data.rdm.buffer_num) || +- (fi_ibv_gl_data.rdm.buffer_num & (fi_ibv_gl_data.rdm.buffer_num - 1))) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid value of rdm_buffer_num\n"); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_int("rdm_buffer_size", "The maximum size of a " +- "buffered operation (bytes)", +- &fi_ibv_gl_data.rdm.buffer_size) || +- (fi_ibv_gl_data.rdm.buffer_size < sizeof(struct fi_ibv_rdm_rndv_header))) { +- VERBS_WARN(FI_LOG_CORE, +- "rdm_buffer_size should be greater than %"PRIu64"\n", +- sizeof(struct fi_ibv_rdm_rndv_header)); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_int("rdm_rndv_seg_size", "The segment size for " +- "zero copy protocols (bytes)", +- &fi_ibv_gl_data.rdm.rndv_seg_size) || +- (fi_ibv_gl_data.rdm.rndv_seg_size <= 0)) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid value of rdm_rndv_seg_size\n"); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_int("rdm_thread_timeout", "The wake up timeout of " +- "the helper thread (usec)", +- &fi_ibv_gl_data.rdm.thread_timeout) || +- (fi_ibv_gl_data.rdm.thread_timeout < 0)) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid value of rdm_thread_timeout\n"); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_str("rdm_eager_send_opcode", "The operation code that " +- "will be used for eager messaging. Only IBV_WR_SEND " +- "and IBV_WR_RDMA_WRITE_WITH_IMM are supported. " +- "The last one is not applicable for iWarp.", +- &fi_ibv_gl_data.rdm.eager_send_opcode)) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid value of rdm_eager_send_opcode\n"); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_str("rdm_cm_thread_affinity", +- "If specified, bind the CM thread to the indicated " +- "range(s) of Linux virtual processor ID(s). " +- "This option is currently not supported on OS X. " +- "Usage: id_start[-id_end[:stride]][,]", +- &fi_ibv_gl_data.rdm.cm_thread_affinity)) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid thread affinity range provided in the rdm_cm_thread_affinity\n"); +- return -FI_EINVAL; +- } +- + /* DGRAM-specific parameters */ + if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK")) + fi_ibv_gl_data.dgram.use_name_server = 0; +@@ -703,6 +683,8 @@ static int fi_ibv_read_params(void) + + static void fi_ibv_fini(void) + { ++ if (fi_ibv_mem_notifier) ++ fi_ibv_mem_notifier_free(); + fi_freeinfo((void *)fi_ibv_util_prov.info); + fi_ibv_util_prov.info = NULL; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.h +index 9f5aac5..2a5a254 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation, Inc. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -49,7 +49,6 @@ + #include + #include + #include +-#include + + #include + #include +@@ -70,11 +69,15 @@ + #include "ofi_list.h" + #include "ofi_signal.h" + #include "ofi_util.h" ++#include "ofi_tree.h" ++#include "ofi_indexer.h" + + #ifdef HAVE_VERBS_EXP_H + #include + #endif /* HAVE_VERBS_EXP_H */ + ++#include "ofi_verbs_priv.h" ++ + #ifndef AF_IB + #define AF_IB 27 + #endif +@@ -93,24 +96,37 @@ + #define VERBS_WARN(subsys, ...) FI_WARN(&fi_ibv_prov, subsys, __VA_ARGS__) + + +-#define VERBS_INJECT_FLAGS(ep, len, flags) (((flags & FI_INJECT) || \ +- len <= ep->info->tx_attr->inject_size) ? IBV_SEND_INLINE : 0) +-#define VERBS_INJECT(ep, len) VERBS_INJECT_FLAGS(ep, len, ep->info->tx_attr->op_flags) ++#define VERBS_INJECT_FLAGS(ep, len, flags) ((((flags) & FI_INJECT) || \ ++ len <= (ep)->inject_limit) ? IBV_SEND_INLINE : 0) ++#define VERBS_INJECT(ep, len) VERBS_INJECT_FLAGS(ep, len, (ep)->info->tx_attr->op_flags) + +-#define VERBS_SELECTIVE_COMP(ep) (ep->ep_flags & FI_SELECTIVE_COMPLETION) +-#define VERBS_COMP_FLAGS(ep, flags) (ofi_need_completion(ep->ep_flags, flags) ? \ +- IBV_SEND_SIGNALED : 0) +-#define VERBS_COMP(ep) VERBS_COMP_FLAGS(ep, ep->info->tx_attr->op_flags) ++#define VERBS_COMP_FLAGS(ep, flags, context) \ ++ (((ep)->util_ep.tx_op_flags | (flags)) & \ ++ FI_COMPLETION ? context : VERBS_NO_COMP_FLAG) ++#define VERBS_COMP(ep, context) \ ++ VERBS_COMP_FLAGS((ep), (ep)->info->tx_attr->op_flags, context) + + #define VERBS_WCE_CNT 1024 + #define VERBS_WRE_CNT 1024 +-#define VERBS_EPE_CNT 1024 + + #define VERBS_DEF_CQ_SIZE 1024 + #define VERBS_MR_IOV_LIMIT 1 + ++#define VERBS_NO_COMP_FLAG ((uint64_t)-1) ++ ++#define FI_IBV_CM_DATA_SIZE (56) ++#define VERBS_CM_DATA_SIZE (FI_IBV_CM_DATA_SIZE - \ ++ sizeof(struct fi_ibv_cm_data_hdr)) ++ ++#define FI_IBV_CM_REJ_CONSUMER_DEFINED 28 ++ ++#define VERBS_DGRAM_MSG_PREFIX_SIZE (40) ++ + #define FI_IBV_EP_TYPE(info) \ + ((info && info->ep_attr) ? info->ep_attr->type : FI_EP_MSG) ++#define FI_IBV_EP_PROTO(info) \ ++ (((info) && (info)->ep_attr) ? (info)->ep_attr->protocol : \ ++ FI_PROTO_UNSPEC) + + #define FI_IBV_MEM_ALIGNMENT (64) + #define FI_IBV_BUF_ALIGNMENT (4096) /* TODO: Page or MTU size */ +@@ -119,54 +135,16 @@ + #define VERBS_ANY_DOMAIN "verbs_any_domain" + #define VERBS_ANY_FABRIC "verbs_any_fabric" + +-/* NOTE: +- * When ibv_post_send/recv returns '-1' it means the following: +- * Deal with non-compliant libibverbs drivers which set errno +- * instead of directly returning the error value +- */ +-#define FI_IBV_INVOKE_POST(type, wr_type, obj, wr, fail_action) \ +-({ \ +- ssize_t ret; \ +- struct ibv_ ## wr_type ## _wr *bad_wr; \ +- ret = ibv_post_ ## type(obj, wr, &bad_wr); \ +- if (OFI_UNLIKELY(ret)) { \ +- switch (ret) { \ +- case ENOMEM: \ +- ret = -FI_EAGAIN; \ +- break; \ +- case -1: \ +- ret = (errno == ENOMEM) ? -FI_EAGAIN : \ +- -errno; \ +- break; \ +- default: \ +- ret = -ret; \ +- break; \ +- } \ +- (void) fail_action; \ +- } \ +- ret; \ +-}) ++#define FI_IBV_MEMORY_HOOK_BEGIN(notifier) \ ++{ \ ++ pthread_mutex_lock(¬ifier->lock); \ ++ ofi_set_mem_free_hook(notifier->prev_free_hook); \ ++ ofi_set_mem_realloc_hook(notifier->prev_realloc_hook); \ + +-#define FI_IBV_RELEASE_WRE(ep, wre) \ +-({ \ +- if (wre) { \ +- fastlock_acquire(&ep->wre_lock); \ +- dlist_remove(&wre->entry); \ +- util_buf_release(ep->wre_pool, wre); \ +- fastlock_release(&ep->wre_lock); \ +- } \ +-}) +- +-#define FI_IBV_MEMORY_HOOK_BEGIN(notifier) \ +-{ \ +- pthread_mutex_lock(¬ifier->lock); \ +- fi_ibv_mem_notifier_set_free_hook(notifier->prev_free_hook); \ +- fi_ibv_mem_notifier_set_realloc_hook(notifier->prev_realloc_hook); \ +- +-#define FI_IBV_MEMORY_HOOK_END(notifier) \ +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier_realloc_hook); \ +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier_free_hook); \ +- pthread_mutex_unlock(¬ifier->lock); \ ++#define FI_IBV_MEMORY_HOOK_END(notifier) \ ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier_realloc_hook); \ ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier_free_hook); \ ++ pthread_mutex_unlock(¬ifier->lock); \ + } + + extern struct fi_provider fi_ibv_prov; +@@ -201,6 +179,11 @@ extern struct fi_ibv_gl_data { + int use_name_server; + int name_server_port; + } dgram; ++ ++ struct { ++ int prefer_xrc; ++ char *xrcd_filename; ++ } msg; + } fi_ibv_gl_data; + + struct verbs_addr { +@@ -217,7 +200,7 @@ struct verbs_addr { + * - GRH (Global Route Header) - Network Layer: + * - GID - destination Global Identifier + * - BTH (Base Transport Header) - Transport Layer: +- * - QPN - destination Queue Oair number ++ * - QPN - destination Queue Pair number + * - P_key - Partition Key + * + * Note: DON'T change the placement of the fields in the structure. +@@ -261,6 +244,7 @@ struct verbs_dev_info { + struct dlist_entry addrs; + }; + ++ + struct fi_ibv_fabric { + struct util_fabric util_fabric; + const struct fi_info *info; +@@ -280,6 +264,11 @@ struct fi_ibv_eq_entry { + + typedef int (*fi_ibv_trywait_func)(struct fid *fid); + ++/* The number of valid OFI indexer bits in the connection key used during ++ * XRC connection establishment. Note that only the lower 32-bits of the ++ * key are exchanged, so this value must be kept below 32-bits. */ ++#define VERBS_TAG_INDEX_BITS 18 ++ + struct fi_ibv_eq { + struct fid_eq eq_fid; + struct fi_ibv_fabric *fab; +@@ -289,47 +278,28 @@ struct fi_ibv_eq { + uint64_t flags; + struct fi_eq_err_entry err; + int epfd; ++ ++ struct { ++ /* The connection key map is used during the XRC connection ++ * process to map an XRC reciprocal connection request back ++ * to the active endpoint that initiated the original ++ * connection request. It is protected with the eq::lock */ ++ struct ofi_key_idx conn_key_idx; ++ struct indexer *conn_key_map; ++ ++ /* TODO: This is limiting and restricts applications to using ++ * a single listener per EQ. While sufficient for RXM we should ++ * consider using an internal PEP listener for handling the ++ * internally processed reciprocal connections. */ ++ uint16_t pep_port; ++ } xrc; + }; + + int fi_ibv_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, + struct fid_eq **eq, void *context); + +-struct fi_ibv_rdm_ep; +- +-typedef struct fi_ibv_rdm_conn * +- (*fi_ibv_rdm_addr_to_conn_func) +- (struct fi_ibv_rdm_ep *ep, fi_addr_t addr); +- +-typedef fi_addr_t +- (*fi_ibv_rdm_conn_to_addr_func) +- (struct fi_ibv_rdm_ep *ep, struct fi_ibv_rdm_conn *conn); +- +-typedef struct fi_ibv_rdm_av_entry * +- (*fi_ibv_rdm_addr_to_av_entry_func) +- (struct fi_ibv_rdm_ep *ep, fi_addr_t addr); +- +-typedef fi_addr_t +- (*fi_ibv_rdm_av_entry_to_addr_func) +- (struct fi_ibv_rdm_ep *ep, struct fi_ibv_rdm_av_entry *av_entry); +- +-struct fi_ibv_av { +- struct fid_av av_fid; +- struct fi_ibv_domain *domain; +- struct fi_ibv_rdm_ep *ep; +- struct fi_ibv_eq *eq; +- size_t count; +- size_t used; +- uint64_t flags; +- enum fi_av_type type; +- fi_ibv_rdm_addr_to_conn_func addr_to_conn; +- fi_ibv_rdm_conn_to_addr_func conn_to_addr; +- fi_ibv_rdm_addr_to_av_entry_func addr_to_av_entry; +- fi_ibv_rdm_av_entry_to_addr_func av_entry_to_addr; +-}; +- + int fi_ibv_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + struct fid_av **av, void *context); +-struct fi_ops_av *fi_ibv_rdm_set_av_ops(void); + + struct fi_ibv_pep { + struct fid_pep pep_fid; +@@ -342,36 +312,41 @@ struct fi_ibv_pep { + }; + + struct fi_ops_cm *fi_ibv_pep_ops_cm(struct fi_ibv_pep *pep); +-struct fi_ibv_rdm_cm; + + struct fi_ibv_mem_desc; ++struct fi_ibv_domain; + typedef int(*fi_ibv_mr_reg_cb)(struct fi_ibv_domain *domain, void *buf, + size_t len, uint64_t access, + struct fi_ibv_mem_desc *md); + typedef int(*fi_ibv_mr_dereg_cb)(struct fi_ibv_mem_desc *md); + +-void fi_ibv_mem_notifier_free_hook(void *ptr, const void *caller); +-void *fi_ibv_mem_notifier_realloc_hook(void *ptr, size_t size, const void *caller); +- + struct fi_ibv_mem_notifier; + + struct fi_ibv_domain { + struct util_domain util_domain; + struct ibv_context *verbs; + struct ibv_pd *pd; +- /* +- * TODO: Currently, only 1 rdm EP can be created per rdm domain! +- * CM logic should be separated from EP, +- * excluding naming/addressing +- */ ++ + enum fi_ep_type ep_type; +- struct fi_ibv_rdm_cm *rdm_cm; +- struct slist ep_list; + struct fi_info *info; +- /* This EQ is utilized by verbs/RDM and verbs/DGRAM */ ++ /* The EQ is utilized by verbs/MSG */ + struct fi_ibv_eq *eq; + uint64_t eq_flags; + ++ /* Indicates that MSG endpoints should use the XRC transport. ++ * TODO: Move selection of XRC/RC to endpoint info from domain */ ++ int use_xrc; ++ struct { ++ int xrcd_fd; ++ struct ibv_xrcd *xrcd; ++ ++ /* The domain maintains a RBTree for mapping an endpoint ++ * destination addresses to physical XRC INI QP connected ++ * to that host. */ ++ fastlock_t ini_mgmt_lock; ++ struct ofi_rbmap *ini_conn_rbmap; ++ } xrc ; ++ + /* MR stuff */ + int use_odp; + struct ofi_mr_cache cache; +@@ -379,32 +354,25 @@ struct fi_ibv_domain { + fi_ibv_mr_reg_cb internal_mr_reg; + fi_ibv_mr_dereg_cb internal_mr_dereg; + struct fi_ibv_mem_notifier *notifier; ++ int (*post_send)(struct ibv_qp *qp, ++ struct ibv_send_wr *wr, ++ struct ibv_send_wr **bad_wr); ++ int (*poll_cq)(struct ibv_cq *cq, ++ int num_entries, ++ struct ibv_wc *wc); + }; + + struct fi_ibv_cq; +-typedef void (*fi_ibv_cq_read_entry)(struct ibv_wc *wc, int index, void *buf); ++typedef void (*fi_ibv_cq_read_entry)(struct ibv_wc *wc, void *buf); + + struct fi_ibv_wce { + struct slist_entry entry; + struct ibv_wc wc; + }; + +-enum fi_ibv_wre_type { +- IBV_SEND_WR, +- IBV_RECV_WR, +-}; +- +-struct fi_ibv_wre { +- struct dlist_entry entry; +- void *context; +- struct fi_ibv_msg_ep *ep; +- struct fi_ibv_srq_ep *srq; +- enum fi_ibv_wre_type wr_type; +-}; +- ++struct fi_ibv_srq_ep; + struct fi_ibv_cq { +- struct fid_cq cq_fid; +- struct fi_ibv_domain *domain; ++ struct util_cq util_cq; + struct ibv_comp_channel *channel; + struct ibv_cq *cq; + size_t entry_size; +@@ -414,32 +382,19 @@ struct fi_ibv_cq { + int signal_fd[2]; + fi_ibv_cq_read_entry read_entry; + struct slist wcq; +- fastlock_t lock; +- struct slist ep_list; +- uint64_t ep_cnt; +- uint64_t send_signal_wr_id; +- uint64_t wr_id_mask; + fi_ibv_trywait_func trywait; + ofi_atomic32_t nevents; +- struct util_buf_pool *epe_pool; + struct util_buf_pool *wce_pool; +-}; + +-struct fi_ibv_rdm_request; +-typedef void (*fi_ibv_rdm_cq_read_entry)(struct fi_ibv_rdm_request *cq_entry, +- int index, void *buf); +- +-struct fi_ibv_rdm_cq { +- struct fid_cq cq_fid; +- struct fi_ibv_domain *domain; +- struct fi_ibv_rdm_ep *ep; +- struct dlist_entry request_cq; +- struct dlist_entry request_errcq; +- uint64_t flags; +- size_t entry_size; +- fi_ibv_rdm_cq_read_entry read_entry; +- int read_bunch_size; +- enum fi_cq_wait_cond wait_cond; ++ struct { ++ /* The list of XRC SRQ contexts associated with this CQ */ ++ fastlock_t srq_list_lock; ++ struct dlist_entry srq_list; ++ } xrc; ++ /* Track tx credits for verbs devices that can free-up send queue ++ * space after processing WRs even if the app hasn't read the CQ. ++ * Without this tracking we might overrun the CQ */ ++ ofi_atomic32_t credits; + }; + + int fi_ibv_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +@@ -454,12 +409,6 @@ struct fi_ibv_mem_desc { + struct ofi_mr_entry *entry; + }; + +-int fi_ibv_rdm_alloc_and_reg(struct fi_ibv_rdm_ep *ep, +- void **buf, size_t size, +- struct fi_ibv_mem_desc *md); +-ssize_t fi_ibv_rdm_dereg_and_free(struct fi_ibv_mem_desc *md, +- char **buff); +- + static inline uint64_t + fi_ibv_mr_internal_rkey(struct fi_ibv_mem_desc *md) + { +@@ -472,32 +421,36 @@ fi_ibv_mr_internal_lkey(struct fi_ibv_mem_desc *md) + return md->mr->lkey; + } + +-typedef void (*fi_ibv_mem_free_hook)(void *, const void *); +-typedef void *(*fi_ibv_mem_realloc_hook)(void *, size_t, const void *); +- + struct fi_ibv_mr_internal_ops { + struct fi_ops_mr *fi_ops; + fi_ibv_mr_reg_cb internal_mr_reg; + fi_ibv_mr_dereg_cb internal_mr_dereg; + }; + +-struct fi_ibv_mem_ptr_entry { +- struct dlist_entry entry; +- void *addr; +- struct ofi_subscription *subscription; +- UT_hash_handle hh; +-}; +- + struct fi_ibv_mem_notifier { +- struct fi_ibv_mem_ptr_entry *mem_ptrs_hash; +- struct util_buf_pool *mem_ptrs_ent_pool; +- struct dlist_entry event_list; +- fi_ibv_mem_free_hook prev_free_hook; +- fi_ibv_mem_realloc_hook prev_realloc_hook; ++ RbtHandle subscr_storage; ++ ofi_mem_free_hook prev_free_hook; ++ ofi_mem_realloc_hook prev_realloc_hook; + int ref_cnt; + pthread_mutex_t lock; + }; + ++struct fi_ibv_subscr_entry { ++ struct dlist_entry entry; ++ struct ofi_subscription *subscription; ++}; ++ ++struct fi_ibv_monitor_entry { ++ struct dlist_entry subscription_list; ++ struct iovec iov; ++}; ++ ++extern struct fi_ibv_mem_notifier *fi_ibv_mem_notifier; ++ ++void fi_ibv_mem_notifier_free_hook(void *ptr, const void *caller); ++void *fi_ibv_mem_notifier_realloc_hook(void *ptr, size_t size, const void *caller); ++void fi_ibv_mem_notifier_free(void); ++ + extern struct fi_ibv_mr_internal_ops fi_ibv_mr_internal_ops; + extern struct fi_ibv_mr_internal_ops fi_ibv_mr_internal_cache_ops; + extern struct fi_ibv_mr_internal_ops fi_ibv_mr_internal_ex_ops; +@@ -506,191 +459,291 @@ int fi_ibv_mr_cache_entry_reg(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry); + void fi_ibv_mr_cache_entry_dereg(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry); +-int fi_ibv_monitor_subscribe(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription); +-void fi_ibv_monitor_unsubscribe(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription); ++int fi_ibv_monitor_subscribe(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription); ++void fi_ibv_monitor_unsubscribe(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription); + struct ofi_subscription *fi_ibv_monitor_get_event(struct ofi_mem_monitor *notifier); + +-static inline void +-fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_free_hook free_hook) +-{ +-#ifdef HAVE_GLIBC_MALLOC_HOOKS +-# ifdef __INTEL_COMPILER /* ICC */ +-# pragma warning push +-# pragma warning disable 1478 +- __free_hook = free_hook; +-# pragma warning pop +-# elif defined __clang__ /* Clang */ +-# pragma clang diagnostic push +-# pragma clang diagnostic ignored "-Wdeprecated-declarations" +- __free_hook = free_hook; +-# pragma clang diagnostic pop +-# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- __free_hook = free_hook; +-# pragma GCC diagnostic pop +-# else /* others */ +- __free_hook = free_hook; +-# endif +-#else /* !HAVE_GLIBC_MALLOC_HOOKS */ +- OFI_UNUSED(free_hook); +-#endif /* HAVE_GLIBC_MALLOC_HOOKS */ +-} ++/* ++ * An XRC SRQ cannot be created until the associated RX CQ is known, ++ * maintain a list of validated pre-posted receives to post once ++ * the SRQ is created. ++ */ ++struct fi_ibv_xrc_srx_prepost { ++ struct slist_entry prepost_entry; ++ void *buf; ++ void *desc; ++ void *context; ++ size_t len; ++ fi_addr_t src_addr; ++}; + +-static inline void +-fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_realloc_hook realloc_hook) +-{ +-#ifdef HAVE_GLIBC_MALLOC_HOOKS +-# ifdef __INTEL_COMPILER /* ICC */ +-# pragma warning push +-# pragma warning disable 1478 +- __realloc_hook = realloc_hook; +-# pragma warning pop +-# elif defined __clang__ /* Clang */ +-# pragma clang diagnostic push +-# pragma clang diagnostic ignored "-Wdeprecated-declarations" +- __realloc_hook = realloc_hook; +-# pragma clang diagnostic pop +-# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- __realloc_hook = realloc_hook; +-# pragma GCC diagnostic pop +-# else /* others */ +- __realloc_hook = realloc_hook; +-# endif +-#else /* !HAVE_GLIBC_MALLOC_HOOKS */ +- OFI_UNUSED(realloc_hook); +-#endif /* HAVE_GLIBC_MALLOC_HOOKS */ +-} ++struct fi_ibv_srq_ep { ++ struct fid_ep ep_fid; ++ struct ibv_srq *srq; ++ struct fi_ibv_domain *domain; ++ ++ /* For XRC SRQ only */ ++ struct { ++ /* XRC SRQ is not created until endpoint enable */ ++ fastlock_t prepost_lock; ++ struct slist prepost_list; ++ uint32_t max_recv_wr; ++ uint32_t max_sge; ++ uint32_t prepost_count; ++ ++ /* The RX CQ associated with this XRC SRQ. This field ++ * and the srq_entry should only be modified while holding ++ * the associted cq::xrc.srq_list_lock. */ ++ struct fi_ibv_cq *cq; ++ ++ /* The CQ maintains a list of XRC SRQ associated with it */ ++ struct dlist_entry srq_entry; ++ } xrc; ++}; ++ ++int fi_ibv_srq_context(struct fid_domain *domain, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context); + +-static inline fi_ibv_mem_free_hook +-fi_ibv_mem_notifier_get_free_hook(void) ++static inline int fi_ibv_is_xrc(struct fi_info *info) + { +-#ifdef HAVE_GLIBC_MALLOC_HOOKS +-# ifdef __INTEL_COMPILER /* ICC */ +-# pragma warning push +-# pragma warning disable 1478 +- return __free_hook; +-# pragma warning pop +-# elif defined __clang__ /* Clang */ +-# pragma clang diagnostic push +-# pragma clang diagnostic ignored "-Wdeprecated-declarations" +- return __free_hook; +-# pragma clang diagnostic pop +-# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- return __free_hook; +-# pragma GCC diagnostic pop +-# else /* others */ +- return __free_hook; +-# endif +-#else /* !HAVE_GLIBC_MALLOC_HOOKS */ +- return NULL; +-#endif /* HAVE_GLIBC_MALLOC_HOOKS */ ++ return (FI_IBV_EP_TYPE(info) == FI_EP_MSG) && ++ (FI_IBV_EP_PROTO(info) == FI_PROTO_RDMA_CM_IB_XRC); + } + +-static inline fi_ibv_mem_realloc_hook +-fi_ibv_mem_notifier_get_realloc_hook(void) ++static inline int fi_ibv_is_xrc_send_qp(enum ibv_qp_type qp_type) + { +-#ifdef HAVE_GLIBC_MALLOC_HOOKS +-# ifdef __INTEL_COMPILER /* ICC */ +-# pragma warning push +-# pragma warning disable 1478 +- return __realloc_hook; +-# pragma warning pop +-# elif defined __clang__ /* Clang */ +-# pragma clang diagnostic push +-# pragma clang diagnostic ignored "-Wdeprecated-declarations" +- return __realloc_hook; +-# pragma clang diagnostic pop +-# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- return __realloc_hook; +-# pragma GCC diagnostic pop +-# else /* others */ +- return __realloc_hook; +-# endif +-#else /* !HAVE_GLIBC_MALLOC_HOOKS */ +- return NULL; +-#endif /* HAVE_GLIBC_MALLOC_HOOKS */ ++ return qp_type == IBV_QPT_XRC_SEND; + } + +-struct fi_ibv_srq_ep { +- struct fid_ep ep_fid; +- struct ibv_srq *srq; +- fastlock_t wre_lock; +- struct util_buf_pool *wre_pool; +- struct dlist_entry wre_list; ++int fi_ibv_domain_xrc_init(struct fi_ibv_domain *domain); ++int fi_ibv_domain_xrc_cleanup(struct fi_ibv_domain *domain); ++ ++enum fi_ibv_ini_qp_state { ++ FI_IBV_INI_QP_UNCONNECTED, ++ FI_IBV_INI_QP_CONNECTING, ++ FI_IBV_INI_QP_CONNECTED + }; + +-int fi_ibv_srq_context(struct fid_domain *domain, struct fi_rx_attr *attr, +- struct fid_ep **rx_ep, void *context); ++#define FI_IBV_NO_INI_TGT_QPNUM 0 ++#define FI_IBV_RECIP_CONN 1 + +-struct fi_ibv_msg_ep { +- struct fid_ep ep_fid; +- struct rdma_cm_id *id; +- struct fi_ibv_eq *eq; +- struct fi_ibv_cq *rcq; +- struct fi_ibv_cq *scq; +- struct fi_ibv_srq_ep *srq_ep; +- uint64_t ep_flags; +- struct fi_info *info; +- ofi_atomic32_t unsignaled_send_cnt; +- int32_t send_signal_thr; +- int32_t send_comp_thr; +- ofi_atomic32_t comp_pending; +- fastlock_t wre_lock; +- struct util_buf_pool *wre_pool; +- struct dlist_entry wre_list; +- uint64_t ep_id; +- struct fi_ibv_domain *domain; ++/* ++ * An XRC transport INI QP connection can be shared within a process to ++ * communicate with all the ranks on the same remote node. This structure is ++ * only accessed during connection setup and tear down and should be ++ * done while holding the domain:xrc:ini_mgmt_lock. ++ */ ++struct fi_ibv_ini_shared_conn { ++ /* To share, EP must have same remote peer host addr and TX CQ */ ++ struct sockaddr *peer_addr; ++ struct fi_ibv_cq *tx_cq; ++ ++ /* The physical INI/TGT QPN connection. Virtual connections to the ++ * same remote peer and TGT QPN will share this connection, with ++ * the remote end opening the specified XRC TGT QPN for sharing. */ ++ enum fi_ibv_ini_qp_state state; ++ struct ibv_qp *ini_qp; ++ uint32_t tgt_qpn; ++ ++ /* EP waiting on or using this INI/TGT physical connection will be in ++ * one of these list and hold a reference to the shared connection. */ ++ struct dlist_entry pending_list; ++ struct dlist_entry active_list; ++ ofi_atomic32_t ref_cnt; + }; + +-struct fi_ibv_msg_epe { +- struct slist_entry entry; +- struct fi_ibv_msg_ep *ep; ++enum fi_ibv_xrc_ep_conn_state { ++ FI_IBV_XRC_UNCONNECTED, ++ FI_IBV_XRC_ORIG_CONNECTING, ++ FI_IBV_XRC_ORIG_CONNECTED, ++ FI_IBV_XRC_RECIP_CONNECTING, ++ FI_IBV_XRC_CONNECTED ++}; ++ ++/* ++ * The following XRC state is only required during XRC connection ++ * establishment and can be freed once bidirectional connectivity ++ * is established. ++ */ ++struct fi_ibv_xrc_ep_conn_setup { ++ uint32_t conn_tag; ++ ++ /* IB CM message stale/duplicate detection processing requires ++ * that shared INI/TGT connections use unique QP numbers during ++ * RDMA CM connection setup. To avoid conflicts with actual HCA ++ * QP number space, we allocate minimal QP that are left in the ++ * reset state and closed once the setup process completes. */ ++ struct ibv_qp *rsvd_ini_qpn; ++ struct ibv_qp *rsvd_tgt_qpn; ++ ++ ++ /* Delivery of the FI_CONNECTED event is delayed until ++ * bidirectional connectivity is established. */ ++ size_t event_len; ++ uint8_t event_data[FI_IBV_CM_DATA_SIZE]; ++ ++ /* Connection request may have to queue waiting for the ++ * physical XRC INI/TGT QP connection to complete. */ ++ int pending_recip; ++ size_t pending_paramlen; ++ uint8_t pending_param[FI_IBV_CM_DATA_SIZE]; ++}; ++ ++struct fi_ibv_ep { ++ struct util_ep util_ep; ++ struct ibv_qp *ibv_qp; ++ union { ++ struct rdma_cm_id *id; ++ struct { ++ struct ofi_ib_ud_ep_name ep_name; ++ int service; ++ }; ++ }; ++ ++ size_t inject_limit; ++ ++ struct fi_ibv_eq *eq; ++ struct fi_ibv_srq_ep *srq_ep; ++ struct fi_info *info; ++ ++ struct { ++ struct ibv_send_wr rma_wr; ++ struct ibv_send_wr msg_wr; ++ struct ibv_sge sge; ++ } *wrs; ++ size_t rx_size; ++}; ++ ++struct fi_ibv_xrc_ep { ++ /* Must be first */ ++ struct fi_ibv_ep base_ep; ++ ++ /* XRC only fields */ ++ struct rdma_cm_id *tgt_id; ++ struct ibv_qp *tgt_ibv_qp; ++ enum fi_ibv_xrc_ep_conn_state conn_state; ++ uint32_t srqn; ++ uint32_t peer_srqn; ++ ++ /* A reference is held to a shared physical XRC INI/TGT QP connecting ++ * to the destination node. */ ++ struct fi_ibv_ini_shared_conn *ini_conn; ++ struct dlist_entry ini_conn_entry; ++ ++ /* The following state is allocated during XRC bidirectional setup and ++ * freed once the connection is established. */ ++ struct fi_ibv_xrc_ep_conn_setup *conn_setup; + }; + + int fi_ibv_open_ep(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep, void *context); + int fi_ibv_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + struct fid_pep **pep, void *context); +-int fi_ibv_rdm_open_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep, void *context); + int fi_ibv_create_ep(const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, + struct rdma_addrinfo **rai, struct rdma_cm_id **id); + void fi_ibv_destroy_ep(struct rdma_addrinfo *rai, struct rdma_cm_id **id); +-int fi_rbv_rdm_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, +- struct fid_cntr **cntr, void *context); +-int fi_ibv_rdm_av_open(struct fid_domain *domain, struct fi_av_attr *attr, +- struct fid_av **av_fid, void *context); +-int fi_ibv_dgram_endpoint_open(struct fid_domain *domain_fid, +- struct fi_info *info, struct fid_ep **ep_fid, +- void *context); +-int fi_ibv_dgram_cq_open(struct fid_domain *domain_fid, struct fi_cq_attr *attr, +- struct fid_cq **cq_fid, void *context); +-int fi_ibv_dgram_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, +- struct fid_cntr **cntr_fid, void *context); + int fi_ibv_dgram_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, + struct fid_av **av_fid, void *context); ++static inline ++struct fi_ibv_domain *fi_ibv_ep_to_domain(struct fi_ibv_ep *ep) ++{ ++ return container_of(ep->util_ep.domain, struct fi_ibv_domain, ++ util_domain); ++} + + struct fi_ops_atomic fi_ibv_msg_ep_atomic_ops; ++struct fi_ops_atomic fi_ibv_msg_xrc_ep_atomic_ops; + struct fi_ops_cm fi_ibv_msg_ep_cm_ops; +-struct fi_ops_msg fi_ibv_msg_ep_msg_ops; ++struct fi_ops_cm fi_ibv_msg_xrc_ep_cm_ops; ++const struct fi_ops_msg fi_ibv_msg_ep_msg_ops_ts; ++const struct fi_ops_msg fi_ibv_msg_ep_msg_ops; ++const struct fi_ops_msg fi_ibv_dgram_msg_ops_ts; ++const struct fi_ops_msg fi_ibv_dgram_msg_ops; ++const struct fi_ops_msg fi_ibv_msg_xrc_ep_msg_ops; ++const struct fi_ops_msg fi_ibv_msg_xrc_ep_msg_ops_ts; ++const struct fi_ops_msg fi_ibv_msg_srq_xrc_ep_msg_ops; ++struct fi_ops_rma fi_ibv_msg_ep_rma_ops_ts; + struct fi_ops_rma fi_ibv_msg_ep_rma_ops; +-struct fi_ops_msg fi_ibv_msg_srq_ep_msg_ops; ++struct fi_ops_rma fi_ibv_msg_xrc_ep_rma_ops_ts; ++struct fi_ops_rma fi_ibv_msg_xrc_ep_rma_ops; ++ ++#define FI_IBV_XRC_VERSION 1 ++ ++struct fi_ibv_xrc_cm_data { ++ uint8_t version; ++ uint8_t reciprocal; ++ uint16_t port; ++ uint32_t param; ++ uint32_t conn_tag; ++}; ++ ++struct fi_ibv_xrc_conn_info { ++ uint32_t conn_tag; ++ uint32_t is_reciprocal; ++ uint32_t ini_qpn; ++ uint32_t conn_data; ++ uint16_t port; ++ struct rdma_conn_param conn_param; ++}; + + struct fi_ibv_connreq { +- struct fid handle; +- struct rdma_cm_id *id; ++ struct fid handle; ++ struct rdma_cm_id *id; ++ ++ /* Support for XRC bidirectional connections, and ++ * non-RDMA CM managed QP. */ ++ int is_xrc; ++ struct fi_ibv_xrc_conn_info xrc; + }; + ++struct fi_ibv_cm_data_hdr { ++ uint8_t size; ++ char data[]; ++}; ++ ++void fi_ibv_msg_ep_get_qp_attr(struct fi_ibv_ep *ep, ++ struct ibv_qp_init_attr *attr); ++int fi_ibv_process_xrc_connreq(struct fi_ibv_ep *ep, ++ struct fi_ibv_connreq *connreq); ++ ++void fi_ibv_next_xrc_conn_state(struct fi_ibv_xrc_ep *ep); ++void fi_ibv_prev_xrc_conn_state(struct fi_ibv_xrc_ep *ep); ++void fi_ibv_eq_set_xrc_conn_tag(struct fi_ibv_xrc_ep *ep); ++void fi_ibv_eq_clear_xrc_conn_tag(struct fi_ibv_xrc_ep *ep); ++struct fi_ibv_xrc_ep *fi_ibv_eq_xrc_conn_tag2ep(struct fi_ibv_eq *eq, ++ uint32_t conn_tag); ++void fi_ibv_set_xrc_cm_data(struct fi_ibv_xrc_cm_data *local, int reciprocal, ++ uint32_t conn_tag, uint16_t port, uint32_t param); ++int fi_ibv_verify_xrc_cm_data(struct fi_ibv_xrc_cm_data *remote, ++ int private_data_len); ++int fi_ibv_connect_xrc(struct fi_ibv_xrc_ep *ep, struct sockaddr *addr, ++ int reciprocal, void *param, size_t paramlen); ++int fi_ibv_accept_xrc(struct fi_ibv_xrc_ep *ep, int reciprocal, ++ void *param, size_t paramlen); ++void fi_ibv_free_xrc_conn_setup(struct fi_ibv_xrc_ep *ep); ++void fi_ibv_add_pending_ini_conn(struct fi_ibv_xrc_ep *ep, int reciprocal, ++ void *conn_param, size_t conn_paramlen); ++void fi_ibv_sched_ini_conn(struct fi_ibv_ini_shared_conn *ini_conn); ++int fi_ibv_get_shared_ini_conn(struct fi_ibv_xrc_ep *ep, ++ struct fi_ibv_ini_shared_conn **ini_conn); ++void fi_ibv_put_shared_ini_conn(struct fi_ibv_xrc_ep *ep); ++int fi_ibv_reserve_qpn(struct fi_ibv_xrc_ep *ep, struct ibv_qp **qp); ++ ++void fi_ibv_save_priv_data(struct fi_ibv_xrc_ep *ep, const void *data, ++ size_t len); ++int fi_ibv_ep_create_ini_qp(struct fi_ibv_xrc_ep *ep, void *dst_addr, ++ uint32_t *peer_tgt_qpn); ++void fi_ibv_ep_ini_conn_done(struct fi_ibv_xrc_ep *ep, uint32_t peer_srqn, ++ uint32_t peer_tgt_qpn); ++void fi_ibv_ep_ini_conn_rejected(struct fi_ibv_xrc_ep *ep); ++int fi_ibv_ep_create_tgt_qp(struct fi_ibv_xrc_ep *ep, uint32_t tgt_qpn); ++void fi_ibv_ep_tgt_conn_done(struct fi_ibv_xrc_ep *qp); ++int fi_ibv_ep_destroy_xrc_qp(struct fi_ibv_xrc_ep *ep); ++ ++int fi_ibv_xrc_close_srq(struct fi_ibv_srq_ep *srq_ep); + int fi_ibv_sockaddr_len(struct sockaddr *addr); + + +@@ -704,16 +757,15 @@ int fi_ibv_fi_to_rai(const struct fi_info *fi, uint64_t flags, + struct rdma_addrinfo *rai); + int fi_ibv_get_rdma_rai(const char *node, const char *service, uint64_t flags, + const struct fi_info *hints, struct rdma_addrinfo **rai); +-int fi_ibv_rdm_cm_bind_ep(struct fi_ibv_rdm_cm *cm, struct fi_ibv_rdm_ep *ep); +- + struct verbs_ep_domain { + char *suffix; + enum fi_ep_type type; ++ uint32_t protocol; + uint64_t caps; + }; + +-extern const struct verbs_ep_domain verbs_rdm_domain; + extern const struct verbs_ep_domain verbs_dgram_domain; ++extern const struct verbs_ep_domain verbs_msg_xrc_domain; + + int fi_ibv_check_ep_attr(const struct fi_info *hints, + const struct fi_info *info); +@@ -721,7 +773,16 @@ int fi_ibv_check_rx_attr(const struct fi_rx_attr *attr, + const struct fi_info *hints, + const struct fi_info *info); + +-ssize_t fi_ibv_poll_cq(struct fi_ibv_cq *cq, struct ibv_wc *wc); ++static inline int fi_ibv_cmp_xrc_domain_name(const char *domain_name, ++ const char *rdma_name) ++{ ++ size_t domain_len = strlen(domain_name); ++ size_t suffix_len = strlen(verbs_msg_xrc_domain.suffix); ++ ++ return domain_len > suffix_len ? strncmp(domain_name, rdma_name, ++ domain_len - suffix_len) : -1; ++} ++ + int fi_ibv_cq_signal(struct fid_cq *cq); + + ssize_t fi_ibv_eq_write_event(struct fi_ibv_eq *eq, uint32_t event, +@@ -731,29 +792,120 @@ int fi_ibv_query_atomic(struct fid_domain *domain_fid, enum fi_datatype datatype + enum fi_op op, struct fi_atomic_attr *attr, + uint64_t flags); + int fi_ibv_set_rnr_timer(struct ibv_qp *qp); +-void fi_ibv_empty_wre_list(struct util_buf_pool *wre_pool, +- struct dlist_entry *wre_list, +- enum fi_ibv_wre_type wre_type); +-void fi_ibv_cleanup_cq(struct fi_ibv_msg_ep *cur_ep); ++void fi_ibv_cleanup_cq(struct fi_ibv_ep *cur_ep); + int fi_ibv_find_max_inline(struct ibv_pd *pd, struct ibv_context *context, +- enum ibv_qp_type qp_type); ++ enum ibv_qp_type qp_type); ++ ++struct fi_ibv_dgram_av { ++ struct util_av util_av; ++ struct dlist_entry av_entry_list; ++}; ++ ++struct fi_ibv_dgram_av_entry { ++ struct dlist_entry list_entry; ++ struct ofi_ib_ud_ep_name addr; ++ struct ibv_ah *ah; ++}; ++ ++static inline struct fi_ibv_dgram_av_entry* ++fi_ibv_dgram_av_lookup_av_entry(fi_addr_t fi_addr) ++{ ++ return (struct fi_ibv_dgram_av_entry *)fi_addr; ++} ++ ++/* NOTE: ++ * When ibv_post_send/recv returns '-1' it means the following: ++ * Deal with non-compliant libibverbs drivers which set errno ++ * instead of directly returning the error value ++ */ ++static inline ssize_t fi_ibv_handle_post(int ret) ++{ ++ switch (ret) { ++ case -ENOMEM: ++ case ENOMEM: ++ ret = -FI_EAGAIN; ++ break; ++ case -1: ++ ret = (errno == ENOMEM) ? -FI_EAGAIN : ++ -errno; ++ break; ++ default: ++ ret = -abs(ret); ++ break; ++ } ++ return ret; ++} ++ ++/* Returns 0 if it processes WR entry for which user ++ * doesn't request the completion */ ++static inline int ++fi_ibv_process_wc(struct fi_ibv_cq *cq, struct ibv_wc *wc) ++{ ++ return (wc->wr_id == VERBS_NO_COMP_FLAG) ? 0 : 1; ++} ++ ++/* Returns 0 and tries read new completions if it processes ++ * WR entry for which user doesn't request the completion */ ++static inline int ++fi_ibv_process_wc_poll_new(struct fi_ibv_cq *cq, struct ibv_wc *wc) ++{ ++ struct fi_ibv_domain *domain = container_of(cq->util_cq.domain, ++ struct fi_ibv_domain, ++ util_domain); ++ if (wc->wr_id == VERBS_NO_COMP_FLAG) { ++ int ret; ++ ++ while ((ret = domain->poll_cq(cq->cq, 1, wc)) > 0) { ++ if (wc->wr_id != VERBS_NO_COMP_FLAG) ++ return 1; ++ } ++ return ret; ++ } ++ return 1; ++} ++ ++static inline int fi_ibv_wc_2_wce(struct fi_ibv_cq *cq, ++ struct ibv_wc *wc, ++ struct fi_ibv_wce **wce) ++ ++{ ++ *wce = util_buf_alloc(cq->wce_pool); ++ if (OFI_UNLIKELY(!*wce)) ++ return -FI_ENOMEM; ++ memset(*wce, 0, sizeof(**wce)); ++ (*wce)->wc = *wc; ++ ++ return FI_SUCCESS; ++} + + #define fi_ibv_init_sge(buf, len, desc) (struct ibv_sge) \ + { .addr = (uintptr_t)buf, \ + .length = (uint32_t)len, \ + .lkey = (uint32_t)(uintptr_t)desc } + +-#define fi_ibv_set_sge_iov(sg_list, iov, count, desc, len) \ +-({ \ +- size_t i; \ +- sg_list = alloca(sizeof(*sg_list) * count); \ +- for (i = 0; i < count; i++) { \ +- sg_list[i] = fi_ibv_init_sge( \ +- iov[i].iov_base, \ +- iov[i].iov_len, \ +- desc[i]); \ +- len += iov[i].iov_len; \ +- } \ ++#define fi_ibv_set_sge_iov(sg_list, iov, count, desc) \ ++({ \ ++ size_t i; \ ++ sg_list = alloca(sizeof(*sg_list) * count); \ ++ for (i = 0; i < count; i++) { \ ++ sg_list[i] = fi_ibv_init_sge( \ ++ iov[i].iov_base, \ ++ iov[i].iov_len, \ ++ desc[i]); \ ++ } \ ++}) ++ ++#define fi_ibv_set_sge_iov_count_len(sg_list, iov, count, desc, len) \ ++({ \ ++ size_t i; \ ++ sg_list = alloca(sizeof(*sg_list) * count); \ ++ for (i = 0; i < count; i++) { \ ++ sg_list[i] = fi_ibv_init_sge( \ ++ iov[i].iov_base, \ ++ iov[i].iov_len, \ ++ desc[i]); \ ++ len += iov[i].iov_len; \ ++ } \ + }) + + #define fi_ibv_init_sge_inline(buf, len) fi_ibv_init_sge(buf, len, NULL) +@@ -766,16 +918,127 @@ int fi_ibv_find_max_inline(struct ibv_pd *pd, struct ibv_context *context, + sg_list[i] = fi_ibv_init_sge_inline( \ + iov[i].iov_base, \ + iov[i].iov_len); \ +- len += iov[i].iov_len; \ ++ len += iov[i].iov_len; \ + } \ + }) + +-#define fi_ibv_send_iov(ep, wr, iov, desc, count, context) \ +- fi_ibv_send_iov_flags(ep, wr, iov, desc, count, context, \ +- ep->info->tx_attr->op_flags) ++#define fi_ibv_send_iov(ep, wr, iov, desc, count) \ ++ fi_ibv_send_iov_flags(ep, wr, iov, desc, count, \ ++ (ep)->info->tx_attr->op_flags) + + #define fi_ibv_send_msg(ep, wr, msg, flags) \ +- fi_ibv_send_iov_flags(ep, wr, msg->msg_iov, msg->desc, \ +- msg->iov_count, msg->context, flags) ++ fi_ibv_send_iov_flags(ep, wr, (msg)->msg_iov, (msg)->desc, \ ++ (msg)->iov_count, flags) ++ ++ ++static inline int fi_ibv_poll_reap_unsig_cq(struct fi_ibv_ep *ep) ++{ ++ struct fi_ibv_wce *wce; ++ struct ibv_wc wc[10]; ++ int ret, i; ++ struct fi_ibv_cq *cq = ++ container_of(ep->util_ep.tx_cq, struct fi_ibv_cq, util_cq); ++ struct fi_ibv_domain *domain = container_of(cq->util_cq.domain, ++ struct fi_ibv_domain, ++ util_domain); ++ ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); ++ /* TODO: retrieve WCs as much as possible in a single ++ * ibv_poll_cq call */ ++ while (1) { ++ ret = domain->poll_cq(cq->cq, 10, wc); ++ if (ret <= 0) { ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); ++ return ret; ++ } ++ for (i = 0; i < ret; i++) { ++ if (!fi_ibv_process_wc(cq, &wc[i])) ++ continue; ++ if (OFI_LIKELY(!fi_ibv_wc_2_wce(cq, &wc[i], &wce))) ++ slist_insert_tail(&wce->entry, &cq->wcq); ++ } ++ } ++ ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); ++ return FI_SUCCESS; ++} ++ ++/* WR must be filled out by now except for context */ ++static inline ssize_t ++fi_ibv_send_poll_cq_if_needed(struct fi_ibv_ep *ep, struct ibv_send_wr *wr) ++{ ++ struct ibv_send_wr *bad_wr; ++ struct fi_ibv_domain *domain = ++ container_of(ep->util_ep.domain, struct fi_ibv_domain, util_domain); ++ int ret; ++ ++ ret = domain->post_send(ep->ibv_qp, wr, &bad_wr); ++ if (OFI_UNLIKELY(ret)) { ++ ret = fi_ibv_handle_post(ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ ret = fi_ibv_poll_reap_unsig_cq(ep); ++ if (OFI_UNLIKELY(ret)) ++ return -FI_EAGAIN; ++ /* Try again and return control to a caller */ ++ ret = fi_ibv_handle_post( ++ domain->post_send(ep->ibv_qp, wr, &bad_wr)); ++ } ++ } ++ return ret; ++} ++ ++static inline ssize_t ++fi_ibv_send_buf(struct fi_ibv_ep *ep, struct ibv_send_wr *wr, ++ const void *buf, size_t len, void *desc) ++{ ++ struct ibv_sge sge = fi_ibv_init_sge(buf, len, desc); ++ ++ assert(wr->wr_id != VERBS_NO_COMP_FLAG); ++ ++ wr->sg_list = &sge; ++ wr->num_sge = 1; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, wr); ++} ++ ++static inline ssize_t ++fi_ibv_send_buf_inline(struct fi_ibv_ep *ep, struct ibv_send_wr *wr, ++ const void *buf, size_t len) ++{ ++ struct ibv_sge sge = fi_ibv_init_sge_inline(buf, len); ++ ++ assert(wr->wr_id == VERBS_NO_COMP_FLAG); ++ ++ wr->sg_list = &sge; ++ wr->num_sge = 1; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, wr); ++} ++ ++static inline ssize_t ++fi_ibv_send_iov_flags(struct fi_ibv_ep *ep, struct ibv_send_wr *wr, ++ const struct iovec *iov, void **desc, int count, ++ uint64_t flags) ++{ ++ size_t len = 0; ++ ++ if (!desc) ++ fi_ibv_set_sge_iov_inline(wr->sg_list, iov, count, len); ++ else ++ fi_ibv_set_sge_iov_count_len(wr->sg_list, iov, count, desc, len); ++ ++ wr->num_sge = count; ++ wr->send_flags = VERBS_INJECT_FLAGS(ep, len, flags); ++ wr->wr_id = VERBS_COMP_FLAGS(ep, flags, wr->wr_id); ++ ++ if (flags & FI_FENCE) ++ wr->send_flags |= IBV_SEND_FENCE; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, wr); ++} ++ ++int fi_ibv_get_rai_id(const char *node, const char *service, uint64_t flags, ++ const struct fi_info *hints, struct rdma_addrinfo **rai, ++ struct rdma_cm_id **id); + + #endif /* FI_VERBS_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ofi_verbs_priv.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ofi_verbs_priv.h +new file mode 100644 +index 0000000..c19a1f1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ofi_verbs_priv.h +@@ -0,0 +1,63 @@ ++/* ++ * Copyright (c) 2018 Cray Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef OFI_VERBS_PRIV_H ++#define OFI_VERBS_PRIV_H ++ ++#if !VERBS_HAVE_XRC ++#define IBV_QPT_XRC_SEND 9ull ++#define IBV_QPT_XRC_RECV 10ull ++ ++#define IBV_DEVICE_XRC (1 << 20) ++ ++#define IBV_SRQ_INIT_ATTR_TYPE 0ull ++#define IBV_SRQ_INIT_ATTR_PD 1ull ++#define IBV_SRQ_INIT_ATTR_XRCD 2ull ++#define IBV_SRQ_INIT_ATTR_CQ 3ull ++ ++#define IBV_SRQT_XRC 1ull ++#define FI_IBV_SET_REMOTE_SRQN(var, val) do { } while (0) ++#define FI_VERBS_XRC_ONLY __attribute__((unused)) ++ ++#define ibv_get_srq_num(srq, srqn) do { } while (0) ++#define ibv_create_srq_ex(context, attr) (NULL) ++#else /* !VERBS_HAVE_XRC */ ++ ++#define FI_IBV_SET_REMOTE_SRQN(var, val) \ ++ do { \ ++ (var).qp_type.xrc.remote_srqn = (val); \ ++ } while (0) ++ ++#define FI_VERBS_XRC_ONLY ++#endif /* VERBS_HAVE_XRC */ ++ ++#endif /* OFI_VERBS_PRIV_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm.c +index 23f702e..92deef5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm.c +@@ -55,12 +55,11 @@ static int fi_ibv_copy_addr(void *dst_addr, size_t *dst_addrlen, void *src_addr) + + static int fi_ibv_msg_ep_setname(fid_t ep_fid, void *addr, size_t addrlen) + { +- struct fi_ibv_msg_ep *ep; + void *save_addr; + struct rdma_cm_id *id; + int ret; +- +- ep = container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); + + if (addrlen != ep->info->src_addrlen) { + VERBS_INFO(FI_LOG_EP_CTRL,"addrlen expected: %zu, got: %zu.\n", +@@ -86,6 +85,7 @@ static int fi_ibv_msg_ep_setname(fid_t ep_fid, void *addr, size_t addrlen) + rdma_destroy_ep(ep->id); + + ep->id = id; ++ ep->ibv_qp = ep->id->qp; + free(save_addr); + + return 0; +@@ -98,48 +98,68 @@ err1: + + static int fi_ibv_msg_ep_getname(fid_t ep, void *addr, size_t *addrlen) + { +- struct fi_ibv_msg_ep *_ep; + struct sockaddr *sa; +- +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); + sa = rdma_get_local_addr(_ep->id); + return fi_ibv_copy_addr(addr, addrlen, sa); + } + + static int fi_ibv_msg_ep_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) + { +- struct fi_ibv_msg_ep *_ep; + struct sockaddr *sa; +- +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); + sa = rdma_get_peer_addr(_ep->id); + return fi_ibv_copy_addr(addr, addrlen, sa); + } + ++static inline void ++fi_ibv_msg_ep_prepare_cm_data(const void *param, size_t param_size, ++ struct fi_ibv_cm_data_hdr *cm_hdr) ++{ ++ cm_hdr->size = (uint8_t)param_size; ++ memcpy(cm_hdr->data, param, cm_hdr->size); ++} ++ ++static inline void ++fi_ibv_ep_prepare_rdma_cm_param(struct rdma_conn_param *conn_param, ++ struct fi_ibv_cm_data_hdr *cm_hdr, ++ size_t cm_hdr_data_size) ++{ ++ conn_param->private_data = cm_hdr; ++ conn_param->private_data_len = (uint8_t)cm_hdr_data_size; ++ conn_param->responder_resources = RDMA_MAX_RESP_RES; ++ conn_param->initiator_depth = RDMA_MAX_INIT_DEPTH; ++ conn_param->flow_control = 1; ++ conn_param->rnr_retry_count = 7; ++} ++ + static int + fi_ibv_msg_ep_connect(struct fid_ep *ep, const void *addr, +- const void *param, size_t paramlen) ++ const void *param, size_t paramlen) + { +- struct fi_ibv_msg_ep *_ep; +- struct rdma_conn_param conn_param; ++ struct rdma_conn_param conn_param = { 0 }; + struct sockaddr *src_addr, *dst_addr; + int ret; ++ struct fi_ibv_cm_data_hdr *cm_hdr; ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ if (OFI_UNLIKELY(paramlen > VERBS_CM_DATA_SIZE)) ++ return -FI_EINVAL; + +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); + if (!_ep->id->qp) { +- ret = ep->fid.ops->control(&ep->fid, FI_ENABLE, NULL); ++ ret = fi_control(&ep->fid, FI_ENABLE, NULL); + if (ret) + return ret; + } + +- memset(&conn_param, 0, sizeof conn_param); +- conn_param.private_data = param; +- conn_param.private_data_len = paramlen; +- conn_param.responder_resources = RDMA_MAX_RESP_RES; +- conn_param.initiator_depth = RDMA_MAX_INIT_DEPTH; +- conn_param.flow_control = 1; ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ fi_ibv_ep_prepare_rdma_cm_param(&conn_param, cm_hdr, ++ sizeof(*cm_hdr) + paramlen); + conn_param.retry_count = 15; +- conn_param.rnr_retry_count = 7; + + if (_ep->srq_ep) + conn_param.srq = 1; +@@ -164,25 +184,26 @@ fi_ibv_msg_ep_connect(struct fid_ep *ep, const void *addr, + static int + fi_ibv_msg_ep_accept(struct fid_ep *ep, const void *param, size_t paramlen) + { +- struct fi_ibv_msg_ep *_ep; + struct rdma_conn_param conn_param; + struct fi_ibv_connreq *connreq; + int ret; ++ struct fi_ibv_cm_data_hdr *cm_hdr; ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ if (OFI_UNLIKELY(paramlen > VERBS_CM_DATA_SIZE)) ++ return -FI_EINVAL; + +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); + if (!_ep->id->qp) { +- ret = ep->fid.ops->control(&ep->fid, FI_ENABLE, NULL); ++ ret = fi_control(&ep->fid, FI_ENABLE, NULL); + if (ret) + return ret; + } + +- memset(&conn_param, 0, sizeof conn_param); +- conn_param.private_data = param; +- conn_param.private_data_len = paramlen; +- conn_param.responder_resources = RDMA_MAX_RESP_RES; +- conn_param.initiator_depth = RDMA_MAX_INIT_DEPTH; +- conn_param.flow_control = 1; +- conn_param.rnr_retry_count = 7; ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ fi_ibv_ep_prepare_rdma_cm_param(&conn_param, cm_hdr, ++ sizeof(*cm_hdr) + paramlen); + + if (_ep->srq_ep) + conn_param.srq = 1; +@@ -197,24 +218,86 @@ fi_ibv_msg_ep_accept(struct fid_ep *ep, const void *param, size_t paramlen) + return 0; + } + ++static int fi_ibv_msg_alloc_xrc_params(void **adjusted_param, ++ const void *param, size_t *paramlen) ++{ ++ struct fi_ibv_xrc_cm_data *cm_data; ++ size_t cm_datalen = sizeof(*cm_data) + *paramlen; ++ ++ *adjusted_param = NULL; ++ ++ if (cm_datalen > FI_IBV_CM_DATA_SIZE) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "XRC CM data overflow %"PRIu64"\n", ++ cm_datalen); ++ return -FI_EINVAL; ++ } ++ ++ cm_data = malloc(cm_datalen); ++ if (!cm_data) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to allocate XRC CM data\n"); ++ return -FI_ENOMEM; ++ } ++ ++ if (*paramlen) ++ memcpy((cm_data + 1), param, *paramlen); ++ ++ *paramlen = cm_datalen; ++ *adjusted_param = cm_data; ++ return FI_SUCCESS; ++} ++ ++static int ++fi_ibv_msg_xrc_ep_reject(struct fi_ibv_connreq *connreq, ++ const void *param, size_t paramlen) ++{ ++ struct fi_ibv_xrc_cm_data *cm_data; ++ int ret; ++ ++ ret = fi_ibv_msg_alloc_xrc_params((void **)&cm_data, param, ¶mlen); ++ if (ret) ++ return ret; ++ ++ fi_ibv_set_xrc_cm_data(cm_data, connreq->xrc.is_reciprocal, ++ connreq->xrc.conn_tag, connreq->xrc.port, 0); ++ ret = rdma_reject(connreq->id, cm_data, ++ (uint8_t) paramlen) ? -errno : 0; ++ free(cm_data); ++ return ret; ++} ++ + static int + fi_ibv_msg_ep_reject(struct fid_pep *pep, fid_t handle, +- const void *param, size_t paramlen) ++ const void *param, size_t paramlen) + { +- struct fi_ibv_connreq *connreq; ++ struct fi_ibv_connreq *connreq = ++ container_of(handle, struct fi_ibv_connreq, handle); ++ struct fi_ibv_cm_data_hdr *cm_hdr; + int ret; + +- connreq = container_of(handle, struct fi_ibv_connreq, handle); +- ret = rdma_reject(connreq->id, param, (uint8_t) paramlen) ? -errno : 0; ++ if (OFI_UNLIKELY(paramlen > VERBS_CM_DATA_SIZE)) ++ return -FI_EINVAL; ++ ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ ++ if (connreq->is_xrc) ++ ret = fi_ibv_msg_xrc_ep_reject(connreq, cm_hdr, ++ (uint8_t)(sizeof(*cm_hdr) + paramlen)); ++ ++ else ++ ret = rdma_reject(connreq->id, cm_hdr, ++ (uint8_t)(sizeof(*cm_hdr) + paramlen)) ? -errno : 0; + free(connreq); + return ret; + } + + static int fi_ibv_msg_ep_shutdown(struct fid_ep *ep, uint64_t flags) + { +- struct fi_ibv_msg_ep *_ep; +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); +- return rdma_disconnect(_ep->id) ? -errno : 0; ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); ++ if (_ep->id) ++ return rdma_disconnect(_ep->id) ? -errno : 0; ++ return 0; + } + + struct fi_ops_cm fi_ibv_msg_ep_cm_ops = { +@@ -230,6 +313,102 @@ struct fi_ops_cm fi_ibv_msg_ep_cm_ops = { + .join = fi_no_join, + }; + ++static int ++fi_ibv_msg_xrc_cm_common_verify(struct fi_ibv_xrc_ep *ep, size_t paramlen) ++{ ++ int ret; ++ ++ if (!fi_ibv_is_xrc(ep->base_ep.info)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "EP is not using XRC\n"); ++ return -FI_EINVAL; ++ } ++ ++ if (!ep->srqn) { ++ ret = fi_control(&ep->base_ep.util_ep.ep_fid.fid, ++ FI_ENABLE, NULL); ++ if (ret) ++ return ret; ++ } ++ ++ if (OFI_UNLIKELY(paramlen > VERBS_CM_DATA_SIZE - ++ sizeof(struct fi_ibv_xrc_cm_data))) ++ return -FI_EINVAL; ++ ++ return FI_SUCCESS; ++} ++ ++static int ++fi_ibv_msg_xrc_ep_connect(struct fid_ep *ep, const void *addr, ++ const void *param, size_t paramlen) ++{ ++ struct sockaddr *dst_addr; ++ void *adjusted_param; ++ struct fi_ibv_ep *_ep = container_of(ep, struct fi_ibv_ep, ++ util_ep.ep_fid); ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(_ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ int ret; ++ struct fi_ibv_cm_data_hdr *cm_hdr; ++ ++ ret = fi_ibv_msg_xrc_cm_common_verify(xrc_ep, paramlen); ++ if (ret) ++ return ret; ++ ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ paramlen += sizeof(*cm_hdr); ++ ++ ret = fi_ibv_msg_alloc_xrc_params(&adjusted_param, cm_hdr, ¶mlen); ++ if (ret) ++ return ret; ++ ++ dst_addr = rdma_get_peer_addr(_ep->id); ++ ret = fi_ibv_connect_xrc(xrc_ep, dst_addr, 0, adjusted_param, paramlen); ++ free(adjusted_param); ++ return ret; ++} ++ ++static int ++fi_ibv_msg_xrc_ep_accept(struct fid_ep *ep, const void *param, size_t paramlen) ++{ ++ void *adjusted_param; ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(_ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ int ret; ++ struct fi_ibv_cm_data_hdr *cm_hdr; ++ ++ ret = fi_ibv_msg_xrc_cm_common_verify(xrc_ep, paramlen); ++ if (ret) ++ return ret; ++ ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ paramlen += sizeof(*cm_hdr); ++ ++ ret = fi_ibv_msg_alloc_xrc_params(&adjusted_param, cm_hdr, ¶mlen); ++ if (ret) ++ return ret; ++ ++ ret = fi_ibv_accept_xrc(xrc_ep, 0, adjusted_param, paramlen); ++ free(adjusted_param); ++ return ret; ++} ++ ++struct fi_ops_cm fi_ibv_msg_xrc_ep_cm_ops = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = fi_ibv_msg_ep_setname, ++ .getname = fi_ibv_msg_ep_getname, ++ .getpeer = fi_ibv_msg_ep_getpeer, ++ .connect = fi_ibv_msg_xrc_ep_connect, ++ .listen = fi_no_listen, ++ .accept = fi_ibv_msg_xrc_ep_accept, ++ .reject = fi_no_reject, ++ .shutdown = fi_ibv_msg_ep_shutdown, ++ .join = fi_no_join, ++}; ++ + static int fi_ibv_pep_setname(fid_t pep_fid, void *addr, size_t addrlen) + { + struct fi_ibv_pep *pep; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm_xrc.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm_xrc.c +new file mode 100644 +index 0000000..01e9df0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm_xrc.c +@@ -0,0 +1,384 @@ ++/* ++ * Copyright (c) 2018 Cray Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++#include "fi_verbs.h" ++ ++void fi_ibv_next_xrc_conn_state(struct fi_ibv_xrc_ep *ep) ++{ ++ switch (ep->conn_state) { ++ case FI_IBV_XRC_UNCONNECTED: ++ ep->conn_state = FI_IBV_XRC_ORIG_CONNECTING; ++ break; ++ case FI_IBV_XRC_ORIG_CONNECTING: ++ ep->conn_state = FI_IBV_XRC_ORIG_CONNECTED; ++ break; ++ case FI_IBV_XRC_ORIG_CONNECTED: ++ ep->conn_state = FI_IBV_XRC_RECIP_CONNECTING; ++ break; ++ case FI_IBV_XRC_RECIP_CONNECTING: ++ ep->conn_state = FI_IBV_XRC_CONNECTED; ++ break; ++ case FI_IBV_XRC_CONNECTED: ++ break; ++ default: ++ assert(0); ++ VERBS_WARN(FI_LOG_FABRIC, "Unkown XRC connection state %d\n", ++ ep->conn_state); ++ } ++} ++ ++void fi_ibv_prev_xrc_conn_state(struct fi_ibv_xrc_ep *ep) ++{ ++ switch (ep->conn_state) { ++ case FI_IBV_XRC_UNCONNECTED: ++ break; ++ case FI_IBV_XRC_ORIG_CONNECTING: ++ ep->conn_state = FI_IBV_XRC_UNCONNECTED; ++ break; ++ case FI_IBV_XRC_ORIG_CONNECTED: ++ ep->conn_state = FI_IBV_XRC_ORIG_CONNECTING; ++ break; ++ case FI_IBV_XRC_RECIP_CONNECTING: ++ ep->conn_state = FI_IBV_XRC_ORIG_CONNECTED; ++ break; ++ case FI_IBV_XRC_CONNECTED: ++ ep->conn_state = FI_IBV_XRC_RECIP_CONNECTING; ++ break; ++ default: ++ assert(0); ++ VERBS_WARN(FI_LOG_FABRIC, "Unkown XRC connection state %d\n", ++ ep->conn_state); ++ } ++} ++ ++void fi_ibv_save_priv_data(struct fi_ibv_xrc_ep *ep, const void *data, ++ size_t len) ++{ ++ ep->conn_setup->event_len = MIN(sizeof(ep->conn_setup->event_data), ++ len); ++ memcpy(ep->conn_setup->event_data, data, ep->conn_setup->event_len); ++} ++ ++void fi_ibv_set_xrc_cm_data(struct fi_ibv_xrc_cm_data *local, int reciprocal, ++ uint32_t conn_tag, uint16_t port, uint32_t param) ++{ ++ local->version = FI_IBV_XRC_VERSION; ++ local->reciprocal = reciprocal ? 1 : 0; ++ local->port = htons(port); ++ local->conn_tag = htonl(conn_tag); ++ local->param = htonl(param); ++} ++ ++int fi_ibv_verify_xrc_cm_data(struct fi_ibv_xrc_cm_data *remote, ++ int private_data_len) ++{ ++ if (sizeof(*remote) > private_data_len) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "XRC MSG EP CM data length mismatch\n"); ++ return -FI_EINVAL; ++ } ++ ++ if (remote->version != FI_IBV_XRC_VERSION) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "XRC MSG EP connection protocol mismatch " ++ "(local %"PRIu8", remote %"PRIu8")\n", ++ FI_IBV_XRC_VERSION, remote->version); ++ return -FI_EINVAL; ++ } ++ return FI_SUCCESS; ++} ++ ++void fi_ibv_log_ep_conn(struct fi_ibv_xrc_ep *ep, char *desc) ++{ ++ struct sockaddr *addr; ++ char buf[OFI_ADDRSTRLEN]; ++ size_t len = sizeof(buf); ++ ++ if (!fi_log_enabled(&fi_ibv_prov, FI_LOG_INFO, FI_LOG_FABRIC)) ++ return; ++ ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, %s\n", ep, desc); ++ VERBS_INFO(FI_LOG_FABRIC, ++ "EP %p, CM ID %p, TGT CM ID %p, SRQN %d Peer SRQN %d\n", ++ ep, ep->base_ep.id, ep->tgt_id, ep->srqn, ep->peer_srqn); ++ ++ assert(ep->base_ep.id); ++ ++ addr = rdma_get_local_addr(ep->base_ep.id); ++ if (addr) { ++ ofi_straddr(buf, &len, ep->base_ep.info->addr_format, addr); ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p src_addr: %s\n", ep, buf); ++ } ++ addr = rdma_get_peer_addr(ep->base_ep.id); ++ if (addr) { ++ len = sizeof(buf); ++ ofi_straddr(buf, &len, ep->base_ep.info->addr_format, addr); ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p dst_addr: %s\n", ep, buf); ++ } ++ ++ if (ep->base_ep.ibv_qp) { ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, INI QP Num %d\n", ++ ep, ep->base_ep.ibv_qp->qp_num); ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, Remote TGT QP Num %d\n", ep, ++ ep->ini_conn->tgt_qpn); ++ } ++ if (ep->tgt_ibv_qp) ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, TGT QP Num %d\n", ++ ep, ep->tgt_ibv_qp->qp_num); ++ if (ep->conn_setup && ep->conn_setup->rsvd_ini_qpn) ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, Reserved INI QPN %d\n", ++ ep, ep->conn_setup->rsvd_ini_qpn->qp_num); ++ if (ep->conn_setup && ep->conn_setup->rsvd_tgt_qpn) ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, Reserved TGT QPN %d\n", ++ ep, ep->conn_setup->rsvd_tgt_qpn->qp_num); ++} ++ ++void fi_ibv_free_xrc_conn_setup(struct fi_ibv_xrc_ep *ep) ++{ ++ assert(ep->conn_setup); ++ ++ if (ep->conn_setup->rsvd_ini_qpn) ++ ibv_destroy_qp(ep->conn_setup->rsvd_ini_qpn); ++ if (ep->conn_setup->rsvd_tgt_qpn) ++ ibv_destroy_qp(ep->conn_setup->rsvd_tgt_qpn); ++ ++ free(ep->conn_setup); ++ ep->conn_setup = NULL; ++ ++ /*Free RDMA CM IDs releasing their associated resources, RDMA CM ++ * is used for connection setup only with XRC */ ++ if (ep->base_ep.id) { ++ rdma_destroy_id(ep->base_ep.id); ++ ep->base_ep.id = NULL; ++ } ++ if (ep->tgt_id) { ++ rdma_destroy_id(ep->tgt_id); ++ ep->tgt_id = NULL; ++ } ++} ++ ++int fi_ibv_connect_xrc(struct fi_ibv_xrc_ep *ep, struct sockaddr *addr, ++ int reciprocal, void *param, size_t paramlen) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct sockaddr *peer_addr; ++ int ret; ++ ++ assert(ep->base_ep.id && !ep->base_ep.ibv_qp && !ep->ini_conn); ++ ++ peer_addr = rdma_get_local_addr(ep->base_ep.id); ++ if (peer_addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_FABRIC, ++ "XRC connect src_addr", peer_addr); ++ ++ peer_addr = rdma_get_peer_addr(ep->base_ep.id); ++ if (peer_addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_FABRIC, ++ "XRC connect dest_addr", peer_addr); ++ ++ if (!reciprocal) { ++ ep->conn_setup = calloc(1, sizeof(*ep->conn_setup)); ++ if (!ep->conn_setup) ++ return -FI_ENOMEM; ++ } ++ ++ fastlock_acquire(&domain->xrc.ini_mgmt_lock); ++ ret = fi_ibv_get_shared_ini_conn(ep, &ep->ini_conn); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Get of shared XRC INI connection failed %d\n", ret); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++ if (!reciprocal) { ++ free(ep->conn_setup); ++ ep->conn_setup = NULL; ++ } ++ return ret; ++ } ++ fi_ibv_add_pending_ini_conn(ep, reciprocal, param, paramlen); ++ fi_ibv_sched_ini_conn(ep->ini_conn); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++ ++ return FI_SUCCESS; ++} ++ ++void fi_ibv_ep_ini_conn_done(struct fi_ibv_xrc_ep *ep, uint32_t peer_srqn, ++ uint32_t tgt_qpn) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ ++ assert(ep->base_ep.id && ep->ini_conn); ++ ++ fastlock_acquire(&domain->xrc.ini_mgmt_lock); ++ ++ assert(ep->ini_conn->state == FI_IBV_INI_QP_CONNECTING || ++ ep->ini_conn->state == FI_IBV_INI_QP_CONNECTED); ++ ++ /* If this was a physical INI/TGT QP connection, remove the QP ++ * from control of the RDMA CM. We don't want the shared INI QP ++ * to be destroyed if this endpoint closes. */ ++ if (ep->base_ep.id->qp) { ++ ep->ini_conn->state = FI_IBV_INI_QP_CONNECTED; ++ ep->ini_conn->tgt_qpn = tgt_qpn; ++ ep->base_ep.id->qp = NULL; ++ VERBS_DBG(FI_LOG_EP_CTRL, ++ "Set INI Conn QP %d remote TGT QP %d\n", ++ ep->ini_conn->ini_qp->qp_num, ++ ep->ini_conn->tgt_qpn); ++ } ++ ++ fi_ibv_log_ep_conn(ep, "INI Connection Done"); ++ fi_ibv_sched_ini_conn(ep->ini_conn); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++} ++ ++void fi_ibv_ep_ini_conn_rejected(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ ++ assert(ep->base_ep.id && ep->ini_conn); ++ ++ fastlock_acquire(&domain->xrc.ini_mgmt_lock); ++ fi_ibv_log_ep_conn(ep, "INI Connection Rejected"); ++ ++ if (ep->ini_conn->state == FI_IBV_INI_QP_CONNECTING) ++ ep->ini_conn->state = FI_IBV_INI_QP_UNCONNECTED; ++ fi_ibv_put_shared_ini_conn(ep); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++} ++ ++void fi_ibv_ep_tgt_conn_done(struct fi_ibv_xrc_ep *ep) ++{ ++ fi_ibv_log_ep_conn(ep, "TGT Connection Done\n"); ++ ++ if (ep->tgt_id->qp) { ++ assert(ep->tgt_ibv_qp == ep->tgt_id->qp); ++ ep->tgt_id->qp = NULL; ++ } ++} ++ ++int fi_ibv_accept_xrc(struct fi_ibv_xrc_ep *ep, int reciprocal, ++ void *param, size_t paramlen) ++{ ++ struct sockaddr *addr; ++ struct fi_ibv_connreq *connreq; ++ struct rdma_conn_param conn_param = { 0 }; ++ struct fi_ibv_xrc_cm_data *cm_data = param; ++ int ret; ++ ++ addr = rdma_get_local_addr(ep->tgt_id); ++ if (addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_CORE, "src_addr", addr); ++ ++ addr = rdma_get_peer_addr(ep->tgt_id); ++ if (addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_CORE, "dest_addr", addr); ++ ++ connreq = container_of(ep->base_ep.info->handle, ++ struct fi_ibv_connreq, handle); ++ ret = fi_ibv_ep_create_tgt_qp(ep, connreq->xrc.conn_data); ++ if (ret) ++ return ret; ++ ++ fi_ibv_set_xrc_cm_data(cm_data, connreq->xrc.is_reciprocal, ++ connreq->xrc.conn_tag, connreq->xrc.port, ++ ep->srqn); ++ conn_param.private_data = cm_data; ++ conn_param.private_data_len = paramlen; ++ conn_param.responder_resources = RDMA_MAX_RESP_RES; ++ conn_param.initiator_depth = RDMA_MAX_INIT_DEPTH; ++ conn_param.flow_control = 1; ++ conn_param.rnr_retry_count = 7; ++ if (ep->base_ep.srq_ep) ++ conn_param.srq = 1; ++ ++ /* Shared INI/TGT QP connection use a temporarily reserved QP number ++ * avoid the appearance of being a stale/duplicate IB CM message */ ++ if (!ep->tgt_id->qp) ++ conn_param.qp_num = ep->conn_setup->rsvd_tgt_qpn->qp_num; ++ ++ if (connreq->xrc.is_reciprocal) ++ fi_ibv_eq_clear_xrc_conn_tag(ep); ++ else ++ ep->conn_setup->conn_tag = connreq->xrc.conn_tag; ++ ++ assert(ep->conn_state == FI_IBV_XRC_UNCONNECTED || ++ ep->conn_state == FI_IBV_XRC_ORIG_CONNECTED); ++ fi_ibv_next_xrc_conn_state(ep); ++ ++ ret = rdma_accept(ep->tgt_id, &conn_param); ++ if (OFI_UNLIKELY(ret)) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "XRC TGT, rdma_accept", errno); ++ fi_ibv_prev_xrc_conn_state(ep); ++ } else ++ free(connreq); ++ ++ return ret; ++} ++ ++int fi_ibv_process_xrc_connreq(struct fi_ibv_ep *ep, ++ struct fi_ibv_connreq *connreq) ++{ ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ int ret; ++ ++ assert(ep->info->src_addr); ++ assert(ep->info->dest_addr); ++ ++ xrc_ep->conn_setup = calloc(1, sizeof(*xrc_ep->conn_setup)); ++ if (!xrc_ep->conn_setup) ++ return -FI_ENOMEM; ++ ++ /* This endpoint was created on the passive side of a connection ++ * request. The reciprocal connection request will go back to the ++ * passive port indicated by the active side */ ++ ofi_addr_set_port(ep->info->src_addr, 0); ++ ofi_addr_set_port(ep->info->dest_addr, connreq->xrc.port); ++ ++ ret = fi_ibv_create_ep(NULL, NULL, 0, ep->info, NULL, &ep->id); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Creation of INI cm_id failed %d\n", ret); ++ goto create_err; ++ } ++ xrc_ep->tgt_id = connreq->id; ++ xrc_ep->tgt_id->context = &ep->util_ep.ep_fid.fid; ++ ++ return FI_SUCCESS; ++ ++create_err: ++ free(xrc_ep->conn_setup); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cq.c +index 2343da6..7e31b63 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cq.c +@@ -32,6 +32,7 @@ + + #include "config.h" + ++#include + #include + + #include "fi_verbs.h" +@@ -87,9 +88,9 @@ fi_ibv_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *entry, + struct slist_entry *slist_entry; + uint32_t api_version; + +- cq = container_of(cq_fid, struct fi_ibv_cq, cq_fid); ++ cq = container_of(cq_fid, struct fi_ibv_cq, util_cq.cq_fid); + +- fastlock_acquire(&cq->lock); ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); + if (slist_empty(&cq->wcq)) + goto err; + +@@ -97,16 +98,19 @@ fi_ibv_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *entry, + if (!wce->wc.status) + goto err; + +- api_version = cq->domain->util_domain.fabric->fabric_fid.api_version; ++ api_version = cq->util_cq.domain->fabric->fabric_fid.api_version; + + slist_entry = slist_remove_head(&cq->wcq); +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + + wce = container_of(slist_entry, struct fi_ibv_wce, entry); + + entry->op_context = (void *)(uintptr_t)wce->wc.wr_id; +- entry->err = EIO; + entry->prov_errno = wce->wc.status; ++ if (wce->wc.status == IBV_WC_WR_FLUSH_ERR) ++ entry->err = FI_ECANCELED; ++ else ++ entry->err = EIO; + fi_ibv_handle_wc(&wce->wc, &entry->flags, &entry->len, &entry->data); + + if ((FI_VERSION_GE(api_version, FI_VERSION(1, 5))) && +@@ -120,9 +124,9 @@ fi_ibv_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *entry, + } + + util_buf_release(cq->wce_pool, wce); +- return sizeof(*entry); ++ return 1; + err: +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + return -FI_EAGAIN; + } + +@@ -178,7 +182,7 @@ fi_ibv_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, + uint8_t *p; + + p = buf; +- _cq = container_of(cq, struct fi_ibv_cq, cq_fid); ++ _cq = container_of(cq, struct fi_ibv_cq, util_cq.cq_fid); + + if (!_cq->channel) + return -FI_ENOSYS; +@@ -193,7 +197,7 @@ fi_ibv_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, + break; + } + +- ret = _cq->cq_fid.ops->read(&_cq->cq_fid, p, count - cur); ++ ret = _cq->util_cq.cq_fid.ops->read(&_cq->util_cq.cq_fid, p, count - cur); + if (ret > 0) { + p += ret * _cq->entry_size; + cur += ret; +@@ -207,232 +211,95 @@ fi_ibv_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, + return cur ? cur : ret; + } + +-static void fi_ibv_cq_read_context_entry(struct ibv_wc *wc, int i, void *buf) ++static void fi_ibv_cq_read_context_entry(struct ibv_wc *wc, void *buf) + { + struct fi_cq_entry *entry = buf; + +- entry[i].op_context = (void *)(uintptr_t)wc->wr_id; ++ entry->op_context = (void *)(uintptr_t)wc->wr_id; + } + +-static void fi_ibv_cq_read_msg_entry(struct ibv_wc *wc, int i, void *buf) ++static void fi_ibv_cq_read_msg_entry(struct ibv_wc *wc, void *buf) + { + struct fi_cq_msg_entry *entry = buf; + +- entry[i].op_context = (void *)(uintptr_t)wc->wr_id; +- fi_ibv_handle_wc(wc, &entry[i].flags, &entry[i].len, NULL); ++ entry->op_context = (void *)(uintptr_t)wc->wr_id; ++ fi_ibv_handle_wc(wc, &entry->flags, &entry->len, NULL); + } + +-static void fi_ibv_cq_read_data_entry(struct ibv_wc *wc, int i, void *buf) ++static void fi_ibv_cq_read_data_entry(struct ibv_wc *wc, void *buf) + { + struct fi_cq_data_entry *entry = buf; + +- entry[i].op_context = (void *)(uintptr_t)wc->wr_id; +- fi_ibv_handle_wc(wc, &entry[i].flags, &entry[i].len, &entry[i].data); +-} +- +-static int fi_ibv_match_ep_id(struct slist_entry *entry, +- const void *ep_id) +-{ +- struct fi_ibv_msg_epe *epe = +- container_of(entry, struct fi_ibv_msg_epe, entry); +- +- return (epe->ep->ep_id == (uint64_t)ep_id); +-} +- +-static inline int fi_ibv_handle_internal_signal_wc(struct fi_ibv_cq *cq, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_msg_epe *epe; +- struct slist_entry *entry; +- +- entry = slist_remove_first_match(&cq->ep_list, +- fi_ibv_match_ep_id, +- (void *)wc->wr_id); +- if (!entry) { +- VERBS_WARN(FI_LOG_CQ, "No matching EP for :" +- "given signaled send completion\n"); +- return -FI_EOTHER; +- } +- epe = container_of(entry, struct fi_ibv_msg_epe, entry); +- ofi_atomic_sub32(&epe->ep->unsignaled_send_cnt, +- epe->ep->send_signal_thr); +- ofi_atomic_dec32(&epe->ep->comp_pending); +- util_buf_release(cq->epe_pool, epe); +- +- return FI_SUCCESS; +-} +- +-static inline int fi_ibv_wc_2_wce(struct fi_ibv_cq *cq, +- struct ibv_wc *wc, +- struct fi_ibv_wce **wce) +- +-{ +- struct fi_ibv_wre *wre = +- (struct fi_ibv_wre *)(uintptr_t)wc->wr_id; +- +- *wce = util_buf_alloc(cq->wce_pool); +- if (!*wce) +- return -FI_ENOMEM; +- memset(*wce, 0, sizeof(**wce)); +- wc->wr_id = (uintptr_t)wre->context; +- (*wce)->wc = *wc; +- +- return FI_SUCCESS; ++ entry->op_context = (void *)(uintptr_t)wc->wr_id; ++ fi_ibv_handle_wc(wc, &entry->flags, &entry->len, &entry->data); + } + + /* Must call with cq->lock held */ +-static inline int fi_ibv_poll_outstanding_cq(struct fi_ibv_msg_ep *ep, ++static inline int fi_ibv_poll_outstanding_cq(struct fi_ibv_ep *ep, + struct fi_ibv_cq *cq) + { +- struct fi_ibv_wre *wre; ++ struct fi_ibv_domain *domain = container_of(cq->util_cq.domain, ++ struct fi_ibv_domain, ++ util_domain); + struct fi_ibv_wce *wce; +- struct util_buf_pool *wre_pool; + struct ibv_wc wc; + ssize_t ret; + +- ret = ibv_poll_cq(cq->cq, 1, &wc); ++ ret = domain->poll_cq(cq->cq, 1, &wc); + if (ret <= 0) + return ret; + +- if ((wc.opcode == IBV_WC_RECV) || +- (wc.opcode == IBV_WC_RECV_RDMA_WITH_IMM) || +- ((wc.wr_id & cq->wr_id_mask) != cq->send_signal_wr_id)) { +- wre = (struct fi_ibv_wre *)(uintptr_t)wc.wr_id; +- if (wre->ep) { +- wre_pool = wre->ep->wre_pool; +- if ((wre->ep != ep) && +- (wc.status != IBV_WC_WR_FLUSH_ERR)) { +- ret = fi_ibv_wc_2_wce(cq, &wc, &wce); +- if (ret) { +- wre->ep = NULL; +- ret = -FI_EAGAIN; +- goto fn; +- } +- slist_insert_tail(&wce->entry, &cq->wcq); +- } +- wre->ep = NULL; +- } else { +- /* WRE belongs to SRQ's wre pool and should be +- * handled or rejected if status == `IBV_WC_WR_FLUSH_ERR` */ +- assert(wre->srq); +- wre_pool = wre->srq->wre_pool; +- wre->srq = NULL; +- if (wc.status != IBV_WC_WR_FLUSH_ERR) { +- ret = fi_ibv_wc_2_wce(cq, &wc, &wce); +- if (ret) { +- ret = -FI_EAGAIN; +- goto fn; +- } +- slist_insert_tail(&wce->entry, &cq->wcq); +- } +- } +-fn: +- dlist_remove(&wre->entry); +- util_buf_release(wre_pool, wre); +- return ret; +- } else { +- ret = fi_ibv_handle_internal_signal_wc(cq, &wc); +- return ret ? ret : 1; ++ /* Handle WR entry when user doesn't request the completion */ ++ if (wc.wr_id == VERBS_NO_COMP_FLAG) { ++ /* To ensure the new iteration */ ++ return 1; + } +-} + +-/* Must call with `ep|srq::wre_lock` held */ +-void fi_ibv_empty_wre_list(struct util_buf_pool *wre_pool, +- struct dlist_entry *wre_list, +- enum fi_ibv_wre_type wre_type) +-{ +- struct fi_ibv_wre *wre; +- struct dlist_entry *tmp; +- +- dlist_foreach_container_safe(wre_list, struct fi_ibv_wre, +- wre, entry, tmp) { +- if (wre->wr_type == wre_type) { +- dlist_remove(&wre->entry); +- wre->ep = NULL; +- wre->srq = NULL; +- util_buf_release(wre_pool, wre); +- } ++ ret = fi_ibv_wc_2_wce(cq, &wc, &wce); ++ if (OFI_UNLIKELY(ret)) { ++ ret = -FI_EAGAIN; ++ goto fn; + } ++ slist_insert_tail(&wce->entry, &cq->wcq); ++ ret = 1; ++fn: ++ ++ return ret; + } + +-void fi_ibv_cleanup_cq(struct fi_ibv_msg_ep *ep) ++void fi_ibv_cleanup_cq(struct fi_ibv_ep *ep) + { + int ret; + +- fastlock_acquire(&ep->rcq->lock); ++ ep->util_ep.rx_cq->cq_fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); + do { +- ret = fi_ibv_poll_outstanding_cq(ep, ep->rcq); ++ ret = fi_ibv_poll_outstanding_cq(ep, container_of(ep->util_ep.rx_cq, ++ struct fi_ibv_cq, util_cq)); + } while (ret > 0); ++ ep->util_ep.rx_cq->cq_fastlock_release(&ep->util_ep.rx_cq->cq_lock); + +- /* Handle WRs for which there were no appropriate WCs */ +- fastlock_acquire(&ep->wre_lock); +- fi_ibv_empty_wre_list(ep->wre_pool, &ep->wre_list, IBV_RECV_WR); +- fastlock_release(&ep->wre_lock); +- fastlock_release(&ep->rcq->lock); +- +- fastlock_acquire(&ep->scq->lock); ++ ep->util_ep.tx_cq->cq_fastlock_acquire(&ep->util_ep.tx_cq->cq_lock); + do { +- ret = fi_ibv_poll_outstanding_cq(ep, ep->scq); ++ ret = fi_ibv_poll_outstanding_cq(ep, container_of(ep->util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq)); + } while (ret > 0); +- /* Handle WRs for which there were no appropriate WCs */ +- fastlock_acquire(&ep->wre_lock); +- fi_ibv_empty_wre_list(ep->wre_pool, &ep->wre_list, IBV_SEND_WR); +- fastlock_release(&ep->wre_lock); +- fastlock_release(&ep->scq->lock); +- +- fastlock_destroy(&ep->wre_lock); +- util_buf_pool_destroy(ep->wre_pool); ++ ep->util_ep.tx_cq->cq_fastlock_release(&ep->util_ep.tx_cq->cq_lock); + } + + /* Must call with cq->lock held */ +-ssize_t fi_ibv_poll_cq(struct fi_ibv_cq *cq, struct ibv_wc *wc) ++static inline ++ssize_t fi_ibv_poll_cq_process_wc(struct fi_ibv_cq *cq, struct ibv_wc *wc) + { +- struct fi_ibv_wre *wre; +- struct util_buf_pool *wre_pool; +- fastlock_t *wre_lock; ++ struct fi_ibv_domain *domain = container_of(cq->util_cq.domain, ++ struct fi_ibv_domain, ++ util_domain); + ssize_t ret; + +- ret = ibv_poll_cq(cq->cq, 1, wc); ++ ret = domain->poll_cq(cq->cq, 1, wc); + if (ret <= 0) + return ret; + +- /* TODO Handle the case when app posts a send with same wr_id */ +- if ((wc->opcode == IBV_WC_RECV) || +- (wc->opcode == IBV_WC_RECV_RDMA_WITH_IMM) || +- ((wc->wr_id & cq->wr_id_mask) != cq->send_signal_wr_id)) { +- wre = (struct fi_ibv_wre *)(uintptr_t)wc->wr_id; +- assert(wre && (wre->ep || wre->srq)); +- wc->wr_id = (uintptr_t)wre->context; +- +- if (wc->status == IBV_WC_WR_FLUSH_ERR) { +- /* Handles case where remote side destroys +- * the connection, but local side isn't aware +- * about that yet */ +- ret = 0; +- } +- +- if (wre->ep) { +- wre_pool = wre->ep->wre_pool; +- wre_lock = &wre->ep->wre_lock; +- wre->ep = NULL; +- } else if (wre->srq) { +- wre_pool = wre->srq->wre_pool; +- wre_lock = &wre->srq->wre_lock; +- wre->srq = NULL; +- } else { +- assert(0); +- return -FI_EAVAIL; +- } +- +- fastlock_acquire(wre_lock); +- dlist_remove(&wre->entry); +- util_buf_release(wre_pool, wre); +- fastlock_release(wre_lock); +- } else { +- return fi_ibv_handle_internal_signal_wc(cq, wc); +- } +- +- return ret; ++ return fi_ibv_process_wc_poll_new(cq, wc); + } + + static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) +@@ -443,9 +310,9 @@ static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + struct ibv_wc wc; + ssize_t ret = 0, i; + +- cq = container_of(cq_fid, struct fi_ibv_cq, cq_fid); ++ cq = container_of(cq_fid, struct fi_ibv_cq, util_cq.cq_fid); + +- fastlock_acquire(&cq->lock); ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); + + for (i = 0; i < count; i++) { + if (!slist_empty(&cq->wcq)) { +@@ -456,20 +323,20 @@ static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + } + entry = slist_remove_head(&cq->wcq); + wce = container_of(entry, struct fi_ibv_wce, entry); +- cq->read_entry(&wce->wc, i, buf); ++ cq->read_entry(&wce->wc, (char *)buf + i * cq->entry_size); + util_buf_release(cq->wce_pool, wce); + continue; + } + +- ret = fi_ibv_poll_cq(cq, &wc); ++ ret = fi_ibv_poll_cq_process_wc(cq, &wc); + if (ret <= 0) + break; + + /* Insert error entry into wcq */ +- if (wc.status) { ++ if (OFI_UNLIKELY(wc.status)) { + wce = util_buf_alloc(cq->wce_pool); + if (!wce) { +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + return -FI_ENOMEM; + } + memset(wce, 0, sizeof(*wce)); +@@ -479,10 +346,10 @@ static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + break; + } + +- cq->read_entry(&wc, i, buf); ++ cq->read_entry(&wc, (char *)buf + i * cq->entry_size); + } + +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + return i ? i : (ret ? ret : -FI_EAGAIN); + } + +@@ -500,7 +367,7 @@ int fi_ibv_cq_signal(struct fid_cq *cq) + struct fi_ibv_cq *_cq; + char data = '0'; + +- _cq = container_of(cq, struct fi_ibv_cq, cq_fid); ++ _cq = container_of(cq, struct fi_ibv_cq, util_cq.cq_fid); + + if (write(_cq->signal_fd[1], &data, 1) != 1) { + VERBS_WARN(FI_LOG_CQ, "Error signalling CQ\n"); +@@ -517,14 +384,14 @@ static int fi_ibv_cq_trywait(struct fid *fid) + void *context; + int ret = -FI_EAGAIN, rc; + +- cq = container_of(fid, struct fi_ibv_cq, cq_fid.fid); ++ cq = container_of(fid, struct fi_ibv_cq, util_cq.cq_fid); + + if (!cq->channel) { + VERBS_WARN(FI_LOG_CQ, "No wait object object associated with CQ\n"); + return -FI_EINVAL; + } + +- fastlock_acquire(&cq->lock); ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); + if (!slist_empty(&cq->wcq)) + goto out; + +@@ -535,7 +402,7 @@ static int fi_ibv_cq_trywait(struct fid *fid) + } + memset(wce, 0, sizeof(*wce)); + +- rc = fi_ibv_poll_cq(cq, &wce->wc); ++ rc = fi_ibv_poll_cq_process_wc(cq, &wce->wc); + if (rc > 0) { + slist_insert_tail(&wce->entry, &cq->wcq); + goto out; +@@ -555,7 +422,7 @@ static int fi_ibv_cq_trywait(struct fid *fid) + + /* Read again to fetch any completions that we might have missed + * while rearming */ +- rc = fi_ibv_poll_cq(cq, &wce->wc); ++ rc = fi_ibv_poll_cq_process_wc(cq, &wce->wc); + if (rc > 0) { + slist_insert_tail(&wce->entry, &cq->wcq); + goto out; +@@ -567,7 +434,7 @@ static int fi_ibv_cq_trywait(struct fid *fid) + err: + util_buf_release(cq->wce_pool, wce); + out: +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + return ret; + } + +@@ -587,7 +454,7 @@ static int fi_ibv_cq_control(fid_t fid, int command, void *arg) + struct fi_ibv_cq *cq; + int ret = 0; + +- cq = container_of(fid, struct fi_ibv_cq, cq_fid.fid); ++ cq = container_of(fid, struct fi_ibv_cq, util_cq.cq_fid); + switch(command) { + case FI_GETWAIT: + if (!cq->channel) { +@@ -606,36 +473,41 @@ static int fi_ibv_cq_control(fid_t fid, int command, void *arg) + + static int fi_ibv_cq_close(fid_t fid) + { +- struct fi_ibv_cq *cq; +- struct fi_ibv_msg_epe *epe; + struct fi_ibv_wce *wce; + struct slist_entry *entry; + int ret; +- +- cq = container_of(fid, struct fi_ibv_cq, cq_fid.fid); ++ struct fi_ibv_cq *cq = ++ container_of(fid, struct fi_ibv_cq, util_cq.cq_fid); ++ struct fi_ibv_srq_ep *srq_ep; ++ struct dlist_entry *srq_ep_temp; + + if (ofi_atomic_get32(&cq->nevents)) + ibv_ack_cq_events(cq->cq, ofi_atomic_get32(&cq->nevents)); + +- fastlock_acquire(&cq->lock); ++ /* Since an RX CQ and SRX context can be destroyed in any order, ++ * and the XRC SRQ references the RX CQ, we must destroy any ++ * XRC SRQ using this CQ before destroying the CQ. */ ++ fastlock_acquire(&cq->xrc.srq_list_lock); ++ dlist_foreach_container_safe(&cq->xrc.srq_list, struct fi_ibv_srq_ep, ++ srq_ep, xrc.srq_entry, srq_ep_temp) { ++ ret = fi_ibv_xrc_close_srq(srq_ep); ++ if (ret) { ++ fastlock_release(&cq->xrc.srq_list_lock); ++ return -ret; ++ } ++ } ++ fastlock_release(&cq->xrc.srq_list_lock); ++ ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); + while (!slist_empty(&cq->wcq)) { + entry = slist_remove_head(&cq->wcq); + wce = container_of(entry, struct fi_ibv_wce, entry); + util_buf_release(cq->wce_pool, wce); + } ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + +- while (!slist_empty(&cq->ep_list)) { +- entry = slist_remove_head(&cq->ep_list); +- epe = container_of(entry, struct fi_ibv_msg_epe, entry); +- util_buf_release(cq->epe_pool, epe); +- } +- fastlock_release(&cq->lock); +- +- util_buf_pool_destroy(cq->epe_pool); + util_buf_pool_destroy(cq->wce_pool); + +- fastlock_destroy(&cq->lock); +- + if (cq->cq) { + ret = ibv_destroy_cq(cq->cq); + if (ret) +@@ -649,9 +521,12 @@ static int fi_ibv_cq_close(fid_t fid) + ofi_close_socket(cq->signal_fd[1]); + } + ++ ofi_cq_cleanup(&cq->util_cq); ++ + if (cq->channel) + ibv_destroy_comp_channel(cq->channel); + ++ fastlock_destroy(&cq->xrc.srq_list_lock); + free(cq); + return 0; + } +@@ -664,112 +539,111 @@ static struct fi_ops fi_ibv_cq_fi_ops = { + .ops_open = fi_no_ops_open, + }; + +-int fi_ibv_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq, void *context) ++static void fi_ibv_util_cq_progress_noop(struct util_cq *cq) + { +- struct fi_ibv_cq *_cq; +- int ep_cnt_bits = 0; ++ /* This routine shouldn't be called */ ++ assert(0); ++} ++ ++int fi_ibv_cq_open(struct fid_domain *domain_fid, struct fi_cq_attr *attr, ++ struct fid_cq **cq_fid, void *context) ++{ ++ struct fi_ibv_cq *cq; ++ struct fi_ibv_domain *domain = ++ container_of(domain_fid, struct fi_ibv_domain, ++ util_domain.domain_fid); + size_t size; + int ret; ++ struct fi_cq_attr tmp_attr = *attr; + +- _cq = calloc(1, sizeof *_cq); +- if (!_cq) ++ cq = calloc(1, sizeof(*cq)); ++ if (!cq) + return -FI_ENOMEM; + +- _cq->domain = container_of(domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- /* +- * RDM and DGRAM CQ functionalities are moved to correspond +- * separated functions +- */ +- assert(_cq->domain->ep_type == FI_EP_MSG); ++ /* verbs uses its own implementation of wait objects for CQ */ ++ tmp_attr.wait_obj = FI_WAIT_NONE; ++ ret = ofi_cq_init(&fi_ibv_prov, domain_fid, &tmp_attr, &cq->util_cq, ++ fi_ibv_util_cq_progress_noop, context); ++ if (ret) ++ goto err1; + + switch (attr->wait_obj) { + case FI_WAIT_UNSPEC: + case FI_WAIT_FD: +- _cq->channel = ibv_create_comp_channel(_cq->domain->verbs); +- if (!_cq->channel) { ++ cq->channel = ibv_create_comp_channel(domain->verbs); ++ if (!cq->channel) { + ret = -errno; + VERBS_WARN(FI_LOG_CQ, + "Unable to create completion channel\n"); +- goto err1; ++ goto err2; + } + +- ret = fi_fd_nonblock(_cq->channel->fd); ++ ret = fi_fd_nonblock(cq->channel->fd); + if (ret) +- goto err2; ++ goto err3; + +- if (socketpair(AF_UNIX, SOCK_STREAM, 0, _cq->signal_fd)) { ++ if (socketpair(AF_UNIX, SOCK_STREAM, 0, cq->signal_fd)) { + ret = -errno; +- goto err2; ++ goto err3; + } + +- ret = fi_fd_nonblock(_cq->signal_fd[0]); ++ ret = fi_fd_nonblock(cq->signal_fd[0]); + if (ret) +- goto err3; ++ goto err4; + + break; + case FI_WAIT_NONE: + break; + default: + ret = -FI_ENOSYS; +- goto err3; ++ goto err4; + } + + size = attr->size ? attr->size : VERBS_DEF_CQ_SIZE; + +- _cq->cq = ibv_create_cq(_cq->domain->verbs, size, _cq, _cq->channel, +- attr->signaling_vector); +- +- if (!_cq->cq) { ++ cq->cq = ibv_create_cq(domain->verbs, size, cq, cq->channel, ++ attr->signaling_vector); ++ if (!cq->cq) { + ret = -errno; + VERBS_WARN(FI_LOG_CQ, "Unable to create verbs CQ\n"); +- goto err3; ++ goto err4; + } + +- if (_cq->channel) { +- ret = ibv_req_notify_cq(_cq->cq, 0); ++ if (cq->channel) { ++ ret = ibv_req_notify_cq(cq->cq, 0); + if (ret) { + VERBS_WARN(FI_LOG_CQ, + "ibv_req_notify_cq failed\n"); +- goto err4; ++ goto err5; + } + } + +- ret = util_buf_pool_create(&_cq->wce_pool, sizeof(struct fi_ibv_wce), ++ ret = util_buf_pool_create(&cq->wce_pool, sizeof(struct fi_ibv_wce), + 16, 0, VERBS_WCE_CNT); + if (ret) { + VERBS_WARN(FI_LOG_CQ, "Failed to create wce_pool\n"); +- goto err4; +- } +- +- ret = util_buf_pool_create(&_cq->epe_pool, sizeof(struct fi_ibv_msg_epe), +- 16, 0, VERBS_EPE_CNT); +- if (ret) { +- VERBS_WARN(FI_LOG_CQ, "Failed to create epe_pool\n"); + goto err5; + } + +- _cq->flags |= attr->flags; +- _cq->wait_cond = attr->wait_cond; +- _cq->cq_fid.fid.fclass = FI_CLASS_CQ; +- _cq->cq_fid.fid.context = context; +- _cq->cq_fid.fid.ops = &fi_ibv_cq_fi_ops; +- _cq->cq_fid.ops = &fi_ibv_cq_ops; ++ cq->flags |= attr->flags; ++ cq->wait_cond = attr->wait_cond; ++ /* verbs uses its own ops for CQ */ ++ cq->util_cq.cq_fid.fid.ops = &fi_ibv_cq_fi_ops; ++ cq->util_cq.cq_fid.ops = &fi_ibv_cq_ops; + + switch (attr->format) { + case FI_CQ_FORMAT_UNSPEC: + case FI_CQ_FORMAT_CONTEXT: +- _cq->read_entry = fi_ibv_cq_read_context_entry; +- _cq->entry_size = sizeof(struct fi_cq_entry); ++ cq->read_entry = fi_ibv_cq_read_context_entry; ++ cq->entry_size = sizeof(struct fi_cq_entry); + break; + case FI_CQ_FORMAT_MSG: +- _cq->read_entry = fi_ibv_cq_read_msg_entry; +- _cq->entry_size = sizeof(struct fi_cq_msg_entry); ++ cq->read_entry = fi_ibv_cq_read_msg_entry; ++ cq->entry_size = sizeof(struct fi_cq_msg_entry); + break; + case FI_CQ_FORMAT_DATA: +- _cq->read_entry = fi_ibv_cq_read_data_entry; +- _cq->entry_size = sizeof(struct fi_cq_data_entry); ++ cq->read_entry = fi_ibv_cq_read_data_entry; ++ cq->entry_size = sizeof(struct fi_cq_data_entry); + break; + case FI_CQ_FORMAT_TAGGED: + default: +@@ -777,34 +651,31 @@ int fi_ibv_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + goto err6; + } + +- fastlock_init(&_cq->lock); +- +- slist_init(&_cq->wcq); +- slist_init(&_cq->ep_list); +- +- while (_cq->domain->info->domain_attr->ep_cnt >> ++ep_cnt_bits); ++ slist_init(&cq->wcq); ++ dlist_init(&cq->xrc.srq_list); ++ fastlock_init(&cq->xrc.srq_list_lock); + +- _cq->send_signal_wr_id = 0xffffffffffffc0de << ep_cnt_bits; +- _cq->wr_id_mask = (~_cq->wr_id_mask) << ep_cnt_bits; ++ cq->trywait = fi_ibv_cq_trywait; ++ ofi_atomic_initialize32(&cq->nevents, 0); + +- _cq->trywait = fi_ibv_cq_trywait; +- ofi_atomic_initialize32(&_cq->nevents, 0); ++ assert(size < INT32_MAX); ++ ofi_atomic_initialize32(&cq->credits, size); + +- *cq = &_cq->cq_fid; ++ *cq_fid = &cq->util_cq.cq_fid; + return 0; + err6: +- util_buf_pool_destroy(_cq->epe_pool); ++ util_buf_pool_destroy(cq->wce_pool); + err5: +- util_buf_pool_destroy(_cq->wce_pool); ++ ibv_destroy_cq(cq->cq); + err4: +- ibv_destroy_cq(_cq->cq); ++ ofi_close_socket(cq->signal_fd[0]); ++ ofi_close_socket(cq->signal_fd[1]); + err3: +- ofi_close_socket(_cq->signal_fd[0]); +- ofi_close_socket(_cq->signal_fd[1]); ++ if (cq->channel) ++ ibv_destroy_comp_channel(cq->channel); + err2: +- if (_cq->channel) +- ibv_destroy_comp_channel(_cq->channel); ++ ofi_cq_cleanup(&cq->util_cq); + err1: +- free(_cq); ++ free(cq); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_av.c +new file mode 100644 +index 0000000..71b1d5a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_av.c +@@ -0,0 +1,263 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "fi_verbs.h" ++ ++static inline int fi_ibv_dgram_av_is_addr_valid(struct fi_ibv_dgram_av *av, ++ const void *addr) ++{ ++ const struct ofi_ib_ud_ep_name *check_name = addr; ++ return (check_name->lid > 0); ++} ++ ++static inline int ++fi_ibv_dgram_verify_av_flags(struct util_av *av, uint64_t flags) ++{ ++ if ((av->flags & FI_EVENT) && !av->eq) { ++ VERBS_WARN(FI_LOG_AV, "No EQ bound to AV\n"); ++ return -FI_ENOEQ; ++ } ++ ++ if (flags & ~(FI_MORE)) { ++ VERBS_WARN(FI_LOG_AV, "Unsupported flags\n"); ++ return -FI_ENOEQ; ++ } ++ ++ return FI_SUCCESS; ++} ++ ++static int ++fi_ibv_dgram_av_insert_addr(struct fi_ibv_dgram_av *av, const void *addr, ++ fi_addr_t *fi_addr, void *context) ++{ ++ int ret; ++ struct fi_ibv_dgram_av_entry *av_entry; ++ struct fi_ibv_domain *domain = ++ container_of(av->util_av.domain, struct fi_ibv_domain, util_domain); ++ ++ if (OFI_UNLIKELY(!fi_ibv_dgram_av_is_addr_valid(av, addr))) { ++ ret = -FI_EADDRNOTAVAIL; ++ VERBS_WARN(FI_LOG_AV, "Invalid address\n"); ++ goto fn1; ++ } ++ ++ struct ibv_ah_attr ah_attr = { ++ .is_global = 0, ++ .dlid = ((struct ofi_ib_ud_ep_name *)addr)->lid, ++ .sl = ((struct ofi_ib_ud_ep_name *)addr)->sl, ++ .src_path_bits = 0, ++ .port_num = 1, ++ }; ++ ++ if (((struct ofi_ib_ud_ep_name *)addr)->gid.global.interface_id) { ++ ah_attr.is_global = 1; ++ ah_attr.grh.hop_limit = 64; ++ ah_attr.grh.dgid = ((struct ofi_ib_ud_ep_name *)addr)->gid; ++ ah_attr.grh.sgid_index = 0; ++ } ++ ++ av_entry = calloc(1, sizeof(*av_entry)); ++ if (OFI_UNLIKELY(!av_entry)) { ++ ret = -FI_ENOMEM; ++ VERBS_WARN(FI_LOG_AV, "Unable to allocate memory for AV entry\n"); ++ goto fn1; ++ } ++ ++ av_entry->ah = ibv_create_ah(domain->pd, &ah_attr); ++ if (OFI_UNLIKELY(!av_entry->ah)) { ++ ret = -errno; ++ VERBS_WARN(FI_LOG_AV, ++ "Unable to create Address Handle, errno - %d\n", errno); ++ goto fn2; ++ } ++ av_entry->addr = *(struct ofi_ib_ud_ep_name *)addr; ++ dlist_insert_tail(&av_entry->list_entry, &av->av_entry_list); ++ ++ if (fi_addr) ++ *fi_addr = (fi_addr_t)(uintptr_t)av_entry; ++ return 0; ++fn2: ++ free(av_entry); ++fn1: ++ if (fi_addr) ++ *fi_addr = FI_ADDR_NOTAVAIL; ++ return ret; ++} ++ ++static int fi_ibv_dgram_av_insert(struct fid_av *av_fid, const void *addr, ++ size_t count, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ int ret, success_cnt = 0; ++ size_t i; ++ struct fi_ibv_dgram_av *av = ++ container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); ++ ++ ret = fi_ibv_dgram_verify_av_flags(&av->util_av, flags); ++ if (ret) ++ return ret; ++ ++ VERBS_DBG(FI_LOG_AV, "Inserting %"PRIu64" addresses\n", count); ++ for (i = 0; i < count; i++) { ++ ret = fi_ibv_dgram_av_insert_addr( ++ av, (struct ofi_ib_ud_ep_name *)addr + i, ++ fi_addr ? &fi_addr[i] : NULL, context); ++ if (!ret) ++ success_cnt++; ++ } ++ ++ VERBS_DBG(FI_LOG_AV, ++ "%"PRIu64" addresses were inserted successfully\n", count); ++ return success_cnt; ++} ++ ++static inline void ++fi_ibv_dgram_av_remove_addr(struct fi_ibv_dgram_av_entry *av_entry) ++{ ++ int ret = ibv_destroy_ah(av_entry->ah); ++ if (ret) ++ VERBS_WARN(FI_LOG_AV, ++ "AH Destroying failed with status - %d\n", ++ ret); ++ dlist_remove(&av_entry->list_entry); ++ free(av_entry); ++} ++ ++static int fi_ibv_dgram_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, ++ size_t count, uint64_t flags) ++{ ++ int i, ret; ++ struct fi_ibv_dgram_av *av = ++ container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); ++ ++ ret = fi_ibv_dgram_verify_av_flags(&av->util_av, flags); ++ if (ret) ++ return ret; ++ ++ for (i = count - 1; i >= 0; i--) { ++ struct fi_ibv_dgram_av_entry *av_entry = ++ (struct fi_ibv_dgram_av_entry *)fi_addr[i]; ++ fi_ibv_dgram_av_remove_addr(av_entry); ++ } ++ return FI_SUCCESS; ++} ++ ++static inline ++int fi_ibv_dgram_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, ++ void *addr, size_t *addrlen) ++{ ++ struct fi_ibv_dgram_av_entry *av_entry; ++ ++ av_entry = fi_ibv_dgram_av_lookup_av_entry(fi_addr); ++ if (!av_entry) ++ return -FI_ENOENT; ++ ++ memcpy(addr, &av_entry->addr, MIN(*addrlen, sizeof(av_entry->addr))); ++ *addrlen = sizeof(av_entry->addr); ++ return FI_SUCCESS; ++} ++ ++static inline const char * ++fi_ibv_dgram_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len) ++{ ++ return ofi_straddr(buf, len, FI_ADDR_IB_UD, addr); ++} ++ ++static int fi_ibv_dgram_av_close(struct fid *av_fid) ++{ ++ struct fi_ibv_dgram_av_entry *av_entry; ++ struct fi_ibv_dgram_av *av = ++ container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid.fid); ++ int ret = ofi_av_close_lightweight(&av->util_av); ++ if (ret) ++ return ret; ++ ++ while (!dlist_empty(&av->av_entry_list)) { ++ av_entry = container_of(av->av_entry_list.next, ++ struct fi_ibv_dgram_av_entry, ++ list_entry); ++ fi_ibv_dgram_av_remove_addr(av_entry); ++ } ++ ++ free(av); ++ return FI_SUCCESS; ++} ++ ++static struct fi_ops fi_ibv_dgram_fi_ops = { ++ .size = sizeof(fi_ibv_dgram_fi_ops), ++ .close = fi_ibv_dgram_av_close, ++ .bind = ofi_av_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_av fi_ibv_dgram_av_ops = { ++ .size = sizeof(fi_ibv_dgram_av_ops), ++ .insert = fi_ibv_dgram_av_insert, ++ .insertsvc = fi_no_av_insertsvc, ++ .insertsym = fi_no_av_insertsym, ++ .remove = fi_ibv_dgram_av_remove, ++ .lookup = fi_ibv_dgram_av_lookup, ++ .straddr = fi_ibv_dgram_av_straddr, ++}; ++ ++int fi_ibv_dgram_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av_fid, void *context) ++{ ++ struct fi_ibv_domain *domain = ++ container_of(domain_fid, struct fi_ibv_domain, ++ util_domain.domain_fid); ++ struct fi_ibv_dgram_av *av; ++ int ret; ++ ++ av = calloc(1, sizeof(*av)); ++ if (!av) ++ return -FI_ENOMEM; ++ ++ if (attr->type == FI_AV_UNSPEC) ++ attr->type = FI_AV_MAP; ++ ++ ret = ofi_av_init_lightweight(&domain->util_domain, attr, ++ &av->util_av, context); ++ if (ret) ++ goto err_av_init; ++ dlist_init(&av->av_entry_list); ++ ++ av->util_av.av_fid.fid.ops = &fi_ibv_dgram_fi_ops; ++ av->util_av.av_fid.ops = &fi_ibv_dgram_av_ops; ++ *av_fid = &av->util_av.av_fid; ++ ++ return FI_SUCCESS; ++err_av_init: ++ free(av); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_ep_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_ep_msg.c +new file mode 100644 +index 0000000..36ad816 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_ep_msg.c +@@ -0,0 +1,276 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "fi_verbs.h" ++ ++static inline int ++fi_ibv_dgram_ep_set_addr(struct fi_ibv_ep *ep, fi_addr_t addr, ++ struct ibv_send_wr *wr) ++{ ++ struct fi_ibv_dgram_av_entry *av_entry = ++ fi_ibv_dgram_av_lookup_av_entry(addr); ++ if (OFI_UNLIKELY(!av_entry)) ++ return -FI_ENOENT; ++ wr->wr.ud.ah = av_entry->ah; ++ wr->wr.ud.remote_qpn = av_entry->addr.qpn; ++ wr->wr.ud.remote_qkey = 0x11111111; ++ ++ return 0; ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .num_sge = msg->iov_count, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ assert(ep->util_ep.rx_cq); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_handle_post(ibv_post_recv(ep->ibv_qp, &wr, &bad_wr)); ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct fi_msg msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = src_addr, ++ .context = context, ++ }; ++ ++ return fi_ibv_dgram_ep_recvmsg(ep_fid, &msg, 0); ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct iovec iov = { ++ .iov_base = buf, ++ .iov_len = len, ++ }; ++ ++ return fi_ibv_dgram_ep_recvv(ep_fid, &iov, &desc, ++ 1, src_addr, context); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ }; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_SEND_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_SEND; ++ } ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, msg->addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_msg(ep, &wr, msg, flags); ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, ++ void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_SEND, ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_iov(ep, &wr, iov, desc, count); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND, ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_senddata(struct fid_ep *ep_fid, const void *buf, ++ size_t len, void *desc, uint64_t data, ++ fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_injectdata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ ssize_t ret; ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->msg_wr.imm_data = htonl((uint32_t)data); ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND_WITH_IMM; ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &ep->wrs->msg_wr)) ++ return -FI_ENOENT; ++ ++ ret = fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->msg_wr); ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND; ++ return ret; ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_inject_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &ep->wrs->msg_wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->msg_wr); ++} ++ ++const struct fi_ops_msg fi_ibv_dgram_msg_ops = { ++ .size = sizeof(fi_ibv_dgram_msg_ops), ++ .recv = fi_ibv_dgram_ep_recv, ++ .recvv = fi_ibv_dgram_ep_recvv, ++ .recvmsg = fi_ibv_dgram_ep_recvmsg, ++ .send = fi_ibv_dgram_ep_send, ++ .sendv = fi_ibv_dgram_ep_sendv, ++ .sendmsg = fi_ibv_dgram_ep_sendmsg, ++ .inject = fi_ibv_dgram_ep_inject_fast, ++ .senddata = fi_ibv_dgram_ep_senddata, ++ .injectdata = fi_ibv_dgram_ep_injectdata_fast, ++}; ++ ++const struct fi_ops_msg fi_ibv_dgram_msg_ops_ts = { ++ .size = sizeof(fi_ibv_dgram_msg_ops), ++ .recv = fi_ibv_dgram_ep_recv, ++ .recvv = fi_ibv_dgram_ep_recvv, ++ .recvmsg = fi_ibv_dgram_ep_recvmsg, ++ .send = fi_ibv_dgram_ep_send, ++ .sendv = fi_ibv_dgram_ep_sendv, ++ .sendmsg = fi_ibv_dgram_ep_sendmsg, ++ .inject = fi_ibv_dgram_ep_inject, ++ .senddata = fi_ibv_dgram_ep_senddata, ++ .injectdata = fi_ibv_dgram_ep_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain.c +index 2b64379..33f8d48 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain.c +@@ -32,20 +32,18 @@ + + #include "config.h" + +-#include "ep_rdm/verbs_rdm.h" +-#include "ep_dgram/verbs_dgram.h" ++#include "ofi_iov.h" + + #include "fi_verbs.h" + #include + + /* This is the memory notifier for the entire verbs provider */ +-static struct fi_ibv_mem_notifier *fi_ibv_mem_notifier = NULL; ++struct fi_ibv_mem_notifier *fi_ibv_mem_notifier = NULL; + + static int fi_ibv_domain_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct fi_ibv_domain *domain; + struct fi_ibv_eq *eq; +- struct fi_ibv_dgram_eq *dgram_eq; + + domain = container_of(fid, struct fi_ibv_domain, + util_domain.domain_fid.fid); +@@ -54,23 +52,19 @@ static int fi_ibv_domain_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + case FI_CLASS_EQ: + switch (domain->ep_type) { + case FI_EP_MSG: +- case FI_EP_RDM: + eq = container_of(bfid, struct fi_ibv_eq, eq_fid); + domain->eq = eq; + domain->eq_flags = flags; + break; + case FI_EP_DGRAM: +- dgram_eq = container_of(bfid, struct fi_ibv_dgram_eq, +- util_eq.eq_fid); +- if (!dgram_eq) +- return -FI_EINVAL; +- return ofi_domain_bind_eq(&domain->util_domain, +- &dgram_eq->util_eq); ++ return -FI_EINVAL; + default: + /* Shouldn't go here */ + assert(0); + return -FI_EINVAL; + } ++ break; ++ + default: + return -EINVAL; + } +@@ -78,44 +72,43 @@ static int fi_ibv_domain_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + return 0; + } + +-static void fi_ibv_rdm_cm_set_thread_affinity(void) ++void fi_ibv_mem_notifier_handle_hook(void *arg, RbtIterator iter) + { +- if (fi_ibv_gl_data.rdm.cm_thread_affinity == NULL) +- return; ++ struct iovec *key; ++ struct fi_ibv_subscr_entry *subscr_entry; ++ struct fi_ibv_monitor_entry *entry; ++ ++ rbtKeyValue(fi_ibv_mem_notifier->subscr_storage, iter, ++ (void *)&key, (void *)&entry); ++ dlist_foreach_container(&entry->subscription_list, struct fi_ibv_subscr_entry, ++ subscr_entry, entry) { ++ ofi_monitor_add_event_to_nq(subscr_entry->subscription); ++ } + +- if (ofi_set_thread_affinity(fi_ibv_gl_data.rdm.cm_thread_affinity) == -FI_ENOSYS) +- VERBS_WARN(FI_LOG_DOMAIN, +- "FI_VERBS_RDM_CM_THREAD_AFFINITY is not supported on OS X\n"); ++ VERBS_DBG(FI_LOG_MR, "Write event for region %p:%lu\n", ++ key->iov_base, key->iov_len); + } + +-static void *fi_ibv_rdm_cm_progress_thread(void *dom) ++static inline void ++fi_ibv_mem_notifier_search_iov(struct fi_ibv_mem_notifier *notifier, ++ struct iovec *iov) + { +- struct fi_ibv_domain *domain = +- (struct fi_ibv_domain *)dom; +- struct slist_entry *item, *prev; +- +- fi_ibv_rdm_cm_set_thread_affinity(); +- +- while (domain->rdm_cm->fi_ibv_rdm_tagged_cm_progress_running) { +- struct fi_ibv_rdm_ep *ep = NULL; +- slist_foreach(&domain->ep_list, item, prev) { +- (void) prev; +- ep = container_of(item, struct fi_ibv_rdm_ep, +- list_entry); +- if (fi_ibv_rdm_cm_progress(ep)) { +- VERBS_INFO(FI_LOG_EP_DATA, +- "fi_ibv_rdm_cm_progress error\n"); +- abort(); +- } +- } +- usleep(domain->rdm_cm->cm_progress_timeout); ++ RbtIterator iter; ++ iter = rbtFind(notifier->subscr_storage, (void *)iov); ++ if (iter) { ++ VERBS_DBG(FI_LOG_MR, "Catch hook for memory %p:%lu\n", ++ iov->iov_base, iov->iov_len); ++ rbtTraversal(fi_ibv_mem_notifier->subscr_storage, iter, NULL, ++ fi_ibv_mem_notifier_handle_hook); + } +- return NULL; + } + + void fi_ibv_mem_notifier_free_hook(void *ptr, const void *caller) + { +- struct fi_ibv_mem_ptr_entry *entry; ++ struct iovec iov = { ++ .iov_base = ptr, ++ .iov_len = malloc_usable_size(ptr), ++ }; + OFI_UNUSED(caller); + + FI_IBV_MEMORY_HOOK_BEGIN(fi_ibv_mem_notifier) +@@ -124,23 +117,17 @@ void fi_ibv_mem_notifier_free_hook(void *ptr, const void *caller) + + if (!ptr) + goto out; +- +- HASH_FIND(hh, fi_ibv_mem_notifier->mem_ptrs_hash, &ptr, sizeof(void *), entry); +- if (!entry) +- goto out; +- VERBS_DBG(FI_LOG_MR, "Catch free hook for %p, entry - %p\n", ptr, entry); +- +- if (!dlist_empty(&entry->entry)) +- dlist_remove_init(&entry->entry); +- dlist_insert_tail(&entry->entry, +- &fi_ibv_mem_notifier->event_list); ++ fi_ibv_mem_notifier_search_iov(fi_ibv_mem_notifier, &iov); + out: + FI_IBV_MEMORY_HOOK_END(fi_ibv_mem_notifier) + } + + void *fi_ibv_mem_notifier_realloc_hook(void *ptr, size_t size, const void *caller) + { +- struct fi_ibv_mem_ptr_entry *entry; ++ struct iovec iov = { ++ .iov_base = ptr, ++ .iov_len = malloc_usable_size(ptr), ++ }; + void *ret_ptr; + OFI_UNUSED(caller); + +@@ -150,21 +137,25 @@ void *fi_ibv_mem_notifier_realloc_hook(void *ptr, size_t size, const void *calle + + if (!ptr) + goto out; +- +- HASH_FIND(hh, fi_ibv_mem_notifier->mem_ptrs_hash, &ptr, sizeof(void *), entry); +- if (!entry) +- goto out; +- VERBS_DBG(FI_LOG_MR, "Catch realloc hook for %p, entry - %p\n", ptr, entry); +- +- if (!dlist_empty(&entry->entry)) +- dlist_remove_init(&entry->entry); +- dlist_insert_tail(&entry->entry, +- &fi_ibv_mem_notifier->event_list); ++ fi_ibv_mem_notifier_search_iov(fi_ibv_mem_notifier, &iov); + out: + FI_IBV_MEMORY_HOOK_END(fi_ibv_mem_notifier) + return ret_ptr; + } + ++void fi_ibv_mem_notifier_free(void) ++{ ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier->prev_free_hook); ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier->prev_realloc_hook); ++ rbtDelete(fi_ibv_mem_notifier->subscr_storage); ++ fi_ibv_mem_notifier->prev_free_hook = NULL; ++ fi_ibv_mem_notifier->prev_realloc_hook = NULL; ++ pthread_mutex_unlock(&fi_ibv_mem_notifier->lock); ++ pthread_mutex_destroy(&fi_ibv_mem_notifier->lock); ++ free(fi_ibv_mem_notifier); ++ fi_ibv_mem_notifier = NULL; ++} ++ + static void fi_ibv_mem_notifier_finalize(struct fi_ibv_mem_notifier *notifier) + { + #ifdef HAVE_GLIBC_MALLOC_HOOKS +@@ -172,25 +163,42 @@ static void fi_ibv_mem_notifier_finalize(struct fi_ibv_mem_notifier *notifier) + assert(fi_ibv_mem_notifier && (notifier == fi_ibv_mem_notifier)); + pthread_mutex_lock(&fi_ibv_mem_notifier->lock); + if (--fi_ibv_mem_notifier->ref_cnt == 0) { +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier->prev_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier->prev_realloc_hook); +- util_buf_pool_destroy(fi_ibv_mem_notifier->mem_ptrs_ent_pool); +- fi_ibv_mem_notifier->prev_free_hook = NULL; +- fi_ibv_mem_notifier->prev_realloc_hook = NULL; +- pthread_mutex_unlock(&fi_ibv_mem_notifier->lock); +- pthread_mutex_destroy(&fi_ibv_mem_notifier->lock); +- free(fi_ibv_mem_notifier); +- fi_ibv_mem_notifier = NULL; ++ fi_ibv_mem_notifier_free(); + return; + } + pthread_mutex_unlock(&fi_ibv_mem_notifier->lock); + #endif + } + ++#ifdef HAVE_GLIBC_MALLOC_HOOKS ++static int fi_ibv_mem_notifier_find_within(void *a, void *b) ++{ ++ struct iovec *iov1 = a, *iov2 = b; ++ ++ if (ofi_iov_shifted_left(iov1, iov2)) ++ return -1; ++ else if (ofi_iov_shifted_right(iov1, iov2)) ++ return 1; ++ else ++ return 0; ++} ++ ++static int fi_ibv_mem_notifier_find_overlap(void *a, void *b) ++{ ++ struct iovec *iov1 = a, *iov2 = b; ++ ++ if (ofi_iov_left(iov1, iov2)) ++ return -1; ++ else if (ofi_iov_right(iov1, iov2)) ++ return 1; ++ else ++ return 0; ++} ++#endif ++ + static struct fi_ibv_mem_notifier *fi_ibv_mem_notifier_init(void) + { + #ifdef HAVE_GLIBC_MALLOC_HOOKS +- int ret; + pthread_mutexattr_t mutex_attr; + if (fi_ibv_mem_notifier) { + /* already initialized */ +@@ -201,11 +209,11 @@ static struct fi_ibv_mem_notifier *fi_ibv_mem_notifier_init(void) + if (!fi_ibv_mem_notifier) + goto fn; + +- ret = util_buf_pool_create(&fi_ibv_mem_notifier->mem_ptrs_ent_pool, +- sizeof(struct fi_ibv_mem_ptr_entry), +- FI_IBV_MEM_ALIGNMENT, 0, +- fi_ibv_gl_data.mr_max_cached_cnt); +- if (ret) ++ fi_ibv_mem_notifier->subscr_storage = ++ rbtNew(fi_ibv_gl_data.mr_cache_merge_regions ? ++ fi_ibv_mem_notifier_find_overlap : ++ fi_ibv_mem_notifier_find_within); ++ if (!fi_ibv_mem_notifier->subscr_storage) + goto err1; + + pthread_mutexattr_init(&mutex_attr); +@@ -214,20 +222,18 @@ static struct fi_ibv_mem_notifier *fi_ibv_mem_notifier_init(void) + goto err2; + pthread_mutexattr_destroy(&mutex_attr); + +- dlist_init(&fi_ibv_mem_notifier->event_list); +- + pthread_mutex_lock(&fi_ibv_mem_notifier->lock); +- fi_ibv_mem_notifier->prev_free_hook = fi_ibv_mem_notifier_get_free_hook(); +- fi_ibv_mem_notifier->prev_realloc_hook = fi_ibv_mem_notifier_get_realloc_hook(); +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier_realloc_hook); ++ fi_ibv_mem_notifier->prev_free_hook = ofi_get_mem_free_hook(); ++ fi_ibv_mem_notifier->prev_realloc_hook = ofi_get_mem_realloc_hook(); ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier_free_hook); ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier_realloc_hook); + fi_ibv_mem_notifier->ref_cnt++; + pthread_mutex_unlock(&fi_ibv_mem_notifier->lock); + fn: + return fi_ibv_mem_notifier; + + err2: +- util_buf_pool_destroy(fi_ibv_mem_notifier->mem_ptrs_ent_pool); ++ rbtDelete(fi_ibv_mem_notifier->subscr_storage); + err1: + free(fi_ibv_mem_notifier); + fi_ibv_mem_notifier = NULL; +@@ -239,36 +245,13 @@ err1: + + static int fi_ibv_domain_close(fid_t fid) + { +- struct fi_ibv_domain *domain; +- struct fi_ibv_fabric *fab; +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- struct slist_entry *item; +- void *status = NULL; + int ret; +- +- domain = container_of(fid, struct fi_ibv_domain, +- util_domain.domain_fid.fid); ++ struct fi_ibv_fabric *fab; ++ struct fi_ibv_domain *domain = ++ container_of(fid, struct fi_ibv_domain, ++ util_domain.domain_fid.fid); + + switch (domain->ep_type) { +- case FI_EP_RDM: +- domain->rdm_cm->fi_ibv_rdm_tagged_cm_progress_running = 0; +- pthread_join(domain->rdm_cm->cm_progress_thread, &status); +- pthread_mutex_destroy(&domain->rdm_cm->cm_lock); +- +- for (item = slist_remove_head( +- &domain->rdm_cm->av_removed_entry_head); +- item; +- item = slist_remove_head( +- &domain->rdm_cm->av_removed_entry_head)) { +- av_entry = container_of(item, +- struct fi_ibv_rdm_av_entry, +- removed_next); +- fi_ibv_rdm_overall_conn_cleanup(av_entry); +- ofi_freealign(av_entry); +- } +- rdma_destroy_ep(domain->rdm_cm->listener); +- free(domain->rdm_cm); +- break; + case FI_EP_DGRAM: + fab = container_of(&domain->util_domain.fabric->fabric_fid, + struct fi_ibv_fabric, +@@ -280,6 +263,11 @@ static int fi_ibv_domain_close(fid_t fid) + ofi_ns_stop_server(&fab->name_server); + break; + case FI_EP_MSG: ++ if (domain->use_xrc) { ++ ret = fi_ibv_domain_xrc_cleanup(domain); ++ if (ret) ++ return ret; ++ } + break; + default: + /* Never should go here */ +@@ -325,11 +313,9 @@ static int fi_ibv_open_device_by_name(struct fi_ibv_domain *domain, const char * + const char *rdma_name = ibv_get_device_name(dev_list[i]->device); + switch (domain->ep_type) { + case FI_EP_MSG: +- ret = strcmp(name, rdma_name); +- break; +- case FI_EP_RDM: +- ret = strncmp(name, rdma_name, +- strlen(name) - strlen(verbs_rdm_domain.suffix)); ++ ret = domain->use_xrc ? ++ fi_ibv_cmp_xrc_domain_name(name, rdma_name) : ++ strcmp(name, rdma_name); + break; + case FI_EP_DGRAM: + ret = strncmp(name, rdma_name, +@@ -372,26 +358,12 @@ static struct fi_ops_domain fi_ibv_msg_domain_ops = { + .query_atomic = fi_ibv_query_atomic, + }; + +-static struct fi_ops_domain fi_ibv_rdm_domain_ops = { +- .size = sizeof(struct fi_ops_domain), +- .av_open = fi_ibv_rdm_av_open, +- .cq_open = fi_ibv_rdm_cq_open, +- .endpoint = fi_ibv_rdm_open_ep, +- .scalable_ep = fi_no_scalable_ep, +- .cntr_open = fi_rbv_rdm_cntr_open, +- .poll_open = fi_no_poll_open, +- .stx_ctx = fi_no_stx_context, +- .srx_ctx = fi_no_srx_context, +- .query_atomic = fi_ibv_query_atomic, +-}; +- + static struct fi_ops_domain fi_ibv_dgram_domain_ops = { + .size = sizeof(struct fi_ops_domain), + .av_open = fi_ibv_dgram_av_open, +- .cq_open = fi_ibv_dgram_cq_open, +- .endpoint = fi_ibv_dgram_endpoint_open, ++ .cq_open = fi_ibv_cq_open, ++ .endpoint = fi_ibv_open_ep, + .scalable_ep = fi_no_scalable_ep, +- .cntr_open = fi_ibv_dgram_cntr_open, + .poll_open = fi_no_poll_open, + .stx_ctx = fi_no_stx_context, + .srx_ctx = fi_no_srx_context, +@@ -419,21 +391,54 @@ static void fi_ibv_domain_process_exp(struct fi_ibv_domain *domain) + } + + static int ++fi_ibv_post_send_track_credits(struct ibv_qp *qp, struct ibv_send_wr *wr, ++ struct ibv_send_wr **bad_wr) ++{ ++ struct fi_ibv_cq *cq = ++ container_of(((struct fi_ibv_ep *)qp->qp_context)->util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++ int credits = (int)ofi_atomic_dec32(&cq->credits); ++ int ret; ++ ++ if (credits < 0) { ++ FI_DBG(&fi_ibv_prov, FI_LOG_EP_DATA, "CQ credits not available," ++ " retry later\n"); ++ ofi_atomic_inc32(&cq->credits); ++ return ENOMEM; ++ } ++ ret = ibv_post_send(qp, wr, bad_wr); ++ if (ret) ++ ofi_atomic_inc32(&cq->credits); ++ return ret; ++} ++ ++static int ++fi_ibv_poll_cq_track_credits(struct ibv_cq *cq, int num_entries, ++ struct ibv_wc *wc) ++{ ++ struct fi_ibv_cq *verbs_cq = (struct fi_ibv_cq *)cq->cq_context; ++ int i, ret; ++ ++ ret = ibv_poll_cq(cq, num_entries, wc); ++ for (i = 0; i < ret; i++) { ++ if (!(wc[i].opcode & IBV_WC_RECV)) ++ ofi_atomic_inc32(&verbs_cq->credits); ++ } ++ return ret; ++} ++ ++ ++static int + fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + struct fid_domain **domain, void *context) + { + struct fi_ibv_domain *_domain; +- struct fi_ibv_fabric *fab; +- const struct fi_info *fi; +- void *status = NULL; +- pthread_mutexattr_t mutex_attr; + int ret; +- +- fab = container_of(fabric, struct fi_ibv_fabric, +- util_fabric.fabric_fid); +- +- fi = fi_ibv_get_verbs_info(fi_ibv_util_prov.info, +- info->domain_attr->name); ++ struct fi_ibv_fabric *fab = ++ container_of(fabric, struct fi_ibv_fabric, ++ util_fabric.fabric_fid); ++ const struct fi_info *fi = fi_ibv_get_verbs_info(fi_ibv_util_prov.info, ++ info->domain_attr->name); + if (!fi) + return -FI_EINVAL; + +@@ -455,9 +460,12 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + goto err2; + + _domain->ep_type = FI_IBV_EP_TYPE(info); ++ _domain->use_xrc = fi_ibv_is_xrc(info); ++ + ret = fi_ibv_open_device_by_name(_domain, info->domain_attr->name); + if (ret) + goto err3; ++ + _domain->pd = ibv_alloc_pd(_domain->verbs); + if (!_domain->pd) { + ret = -errno; +@@ -474,7 +482,6 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + _domain->notifier = fi_ibv_mem_notifier_init(); + _domain->monitor.subscribe = fi_ibv_monitor_subscribe; + _domain->monitor.unsubscribe = fi_ibv_monitor_unsubscribe; +- _domain->monitor.get_event = fi_ibv_monitor_get_event; + ofi_monitor_init(&_domain->monitor); + + _domain->cache.max_cached_cnt = fi_ibv_gl_data.mr_max_cached_cnt; +@@ -497,57 +504,6 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + } + + switch (_domain->ep_type) { +- case FI_EP_RDM: +- _domain->rdm_cm = calloc(1, sizeof(*_domain->rdm_cm)); +- if (!_domain->rdm_cm) { +- ret = -FI_ENOMEM; +- goto err5; +- } +- _domain->rdm_cm->cm_progress_timeout = +- fi_ibv_gl_data.rdm.thread_timeout; +- slist_init(&_domain->rdm_cm->av_removed_entry_head); +- +- pthread_mutexattr_init(&mutex_attr); +- pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE); +- pthread_mutex_init(&_domain->rdm_cm->cm_lock, &mutex_attr); +- pthread_mutexattr_destroy(&mutex_attr); +- _domain->rdm_cm->fi_ibv_rdm_tagged_cm_progress_running = 1; +- ret = pthread_create(&_domain->rdm_cm->cm_progress_thread, +- NULL, &fi_ibv_rdm_cm_progress_thread, +- (void *)_domain); +- if (ret) { +- VERBS_INFO(FI_LOG_DOMAIN, +- "Failed to launch CM progress thread, " +- "err :%d\n", ret); +- ret = -FI_EOTHER; +- goto err6; +- } +- _domain->util_domain.domain_fid.ops = &fi_ibv_rdm_domain_ops; +- +- _domain->rdm_cm->ec = rdma_create_event_channel(); +- if (!_domain->rdm_cm->ec) { +- VERBS_INFO(FI_LOG_DOMAIN, +- "Failed to create listener event channel: %s\n", +- strerror(errno)); +- ret = -FI_EOTHER; +- goto err7; +- } +- +- if (fi_fd_nonblock(_domain->rdm_cm->ec->fd) != 0) { +- VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "fcntl", errno); +- ret = -FI_EOTHER; +- goto err8; +- } +- +- if (rdma_create_id(_domain->rdm_cm->ec, +- &_domain->rdm_cm->listener, NULL, RDMA_PS_TCP)) { +- VERBS_INFO(FI_LOG_DOMAIN, "Failed to create cm listener: %s\n", +- strerror(errno)); +- ret = -FI_EOTHER; +- goto err8; +- } +- _domain->rdm_cm->is_bound = 0; +- break; + case FI_EP_DGRAM: + if (fi_ibv_gl_data.dgram.use_name_server) { + /* Even if it's invoked not for the first time +@@ -567,26 +523,31 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + _domain->util_domain.domain_fid.ops = &fi_ibv_dgram_domain_ops; + break; + case FI_EP_MSG: ++ if (_domain->use_xrc) { ++ ret = fi_ibv_domain_xrc_init(_domain); ++ if (ret) ++ goto err5; ++ } + _domain->util_domain.domain_fid.ops = &fi_ibv_msg_domain_ops; + break; + default: + VERBS_INFO(FI_LOG_DOMAIN, "Ivalid EP type is provided, " + "EP type :%d\n", _domain->ep_type); + ret = -FI_EINVAL; +- goto err5; ++ goto err3; ++ } ++ ++ if (!strncmp(info->domain_attr->name, "hfi1", strlen("hfi1")) || ++ !strncmp(info->domain_attr->name, "qib", strlen("qib"))) { ++ _domain->post_send = fi_ibv_post_send_track_credits; ++ _domain->poll_cq = fi_ibv_poll_cq_track_credits; ++ } else { ++ _domain->post_send = ibv_post_send; ++ _domain->poll_cq = ibv_poll_cq; + } + + *domain = &_domain->util_domain.domain_fid; + return FI_SUCCESS; +-/* Only verbs/RDM should be able to go through err[5-7] */ +-err8: +- rdma_destroy_event_channel(_domain->rdm_cm->ec); +-err7: +- _domain->rdm_cm->fi_ibv_rdm_tagged_cm_progress_running = 0; +- pthread_join(_domain->rdm_cm->cm_progress_thread, &status); +-err6: +- pthread_mutex_destroy(&_domain->rdm_cm->cm_lock); +- free(_domain->rdm_cm); + err5: + if (fi_ibv_gl_data.mr_cache_enable) + ofi_mr_cache_cleanup(&_domain->cache); +@@ -615,7 +576,7 @@ static int fi_ibv_trywait(struct fid_fabric *fabric, struct fid **fids, int coun + for (i = 0; i < count; i++) { + switch (fids[i]->fclass) { + case FI_CLASS_CQ: +- cq = container_of(fids[i], struct fi_ibv_cq, cq_fid.fid); ++ cq = container_of(fids[i], struct fi_ibv_cq, util_cq.cq_fid.fid); + ret = cq->trywait(fids[i]); + if (ret) + return ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain_xrc.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain_xrc.c +new file mode 100644 +index 0000000..1375a66 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain_xrc.c +@@ -0,0 +1,573 @@ ++/* ++ * Copyright (c) 2018 Cray Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++#include "fi_verbs.h" ++#include ++ ++ ++/* Domain XRC INI QP RBTree key */ ++struct fi_ibv_ini_conn_key { ++ struct sockaddr *addr; ++ struct fi_ibv_cq *tx_cq; ++}; ++ ++static int fi_ibv_process_ini_conn(struct fi_ibv_xrc_ep *ep,int reciprocal, ++ void *param, size_t paramlen); ++ ++/* ++ * This routine is a work around that creates a QP for the only purpose of ++ * reserving the QP number. The QP is not transitioned out of the RESET state. ++ */ ++int fi_ibv_reserve_qpn(struct fi_ibv_xrc_ep *ep, struct ibv_qp **qp) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct fi_ibv_cq *cq = container_of(ep->base_ep.util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++ struct ibv_qp_init_attr attr = { 0 }; ++ int ret; ++ ++ /* Limit library allocated resources and do not INIT QP */ ++ attr.cap.max_send_wr = 1; ++ attr.cap.max_send_sge = 1; ++ attr.cap.max_recv_wr = 0; ++ attr.cap.max_recv_sge = 0; ++ attr.cap.max_inline_data = 0; ++ attr.send_cq = cq->cq; ++ attr.recv_cq = cq->cq; ++ attr.qp_type = IBV_QPT_RC; ++ ++ *qp = ibv_create_qp(domain->pd, &attr); ++ if (!*qp) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "Reservation QP create failed", ret); ++ } ++ return FI_SUCCESS; ++} ++ ++static int fi_ibv_create_ini_qp(struct fi_ibv_xrc_ep *ep) ++{ ++#if VERBS_HAVE_XRC ++ struct ibv_qp_init_attr_ex attr_ex; ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ int ret; ++ ++ fi_ibv_msg_ep_get_qp_attr(&ep->base_ep, ++ (struct ibv_qp_init_attr *)&attr_ex); ++ attr_ex.qp_type = IBV_QPT_XRC_SEND; ++ attr_ex.comp_mask = IBV_QP_INIT_ATTR_PD; ++ attr_ex.pd = domain->pd; ++ attr_ex.qp_context = domain; ++ ++ ret = rdma_create_qp_ex(ep->base_ep.id, &attr_ex); ++ if (ret) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "XRC INI QP, rdma_create_qp_ex()", -ret); ++ return ret; ++ } ++ return FI_SUCCESS; ++#else /* VERBS_HAVE_XRC */ ++ return -FI_ENOSYS; ++#endif /* !VERBS_HAVE_XRC */ ++} ++ ++static inline void fi_ibv_set_ini_conn_key(struct fi_ibv_xrc_ep *ep, ++ struct fi_ibv_ini_conn_key *key) ++{ ++ key->addr = ep->base_ep.info->dest_addr; ++ key->tx_cq = container_of(ep->base_ep.util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++int fi_ibv_get_shared_ini_conn(struct fi_ibv_xrc_ep *ep, ++ struct fi_ibv_ini_shared_conn **ini_conn) { ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct fi_ibv_ini_conn_key key; ++ struct fi_ibv_ini_shared_conn *conn; ++ struct ofi_rbnode *node; ++ int ret; ++ assert(ep->base_ep.id); ++ ++ fi_ibv_set_ini_conn_key(ep, &key); ++ node = ofi_rbmap_find(domain->xrc.ini_conn_rbmap, &key); ++ if (node) { ++ *ini_conn = node->data; ++ ofi_atomic_inc32(&(*ini_conn)->ref_cnt); ++ return FI_SUCCESS; ++ } ++ ++ *ini_conn = NULL; ++ conn = calloc(1, sizeof(*conn)); ++ if (!conn) ++ return -FI_ENOMEM; ++ ++ conn->tgt_qpn = FI_IBV_NO_INI_TGT_QPNUM; ++ conn->peer_addr = mem_dup(key.addr, ofi_sizeofaddr(key.addr)); ++ if (!conn->peer_addr) { ++ free(conn); ++ return -FI_ENOMEM; ++ } ++ conn->tx_cq = container_of(ep->base_ep.util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++ dlist_init(&conn->pending_list); ++ dlist_init(&conn->active_list); ++ ofi_atomic_initialize32(&conn->ref_cnt, 1); ++ ++ ret = ofi_rbmap_insert(domain->xrc.ini_conn_rbmap, ++ (void *) &key, (void *) conn); ++ assert(ret != -FI_EALREADY); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, "INI QP RBTree insert failed %d\n", ++ ret); ++ goto insert_err; ++ } ++ *ini_conn = conn; ++ return FI_SUCCESS; ++ ++insert_err: ++ free(conn->peer_addr); ++ free(conn); ++ return ret; ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++void fi_ibv_put_shared_ini_conn(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct fi_ibv_ini_shared_conn *ini_conn; ++ struct fi_ibv_ini_conn_key key; ++ struct ofi_rbnode *node; ++ ++ if (!ep->ini_conn) ++ return; ++ ++ /* remove from pending or active connection list */ ++ dlist_remove(&ep->ini_conn_entry); ++ ep->conn_state = FI_IBV_XRC_UNCONNECTED; ++ ini_conn = ep->ini_conn; ++ ep->ini_conn = NULL; ++ ep->base_ep.ibv_qp = NULL; ++ ep->base_ep.id->qp = NULL; ++ ++ /* Tear down physical INI/TGT when no longer being used */ ++ if (!ofi_atomic_dec32(&ini_conn->ref_cnt)) { ++ if (ini_conn->ini_qp && ibv_destroy_qp(ini_conn->ini_qp)) ++ VERBS_WARN(FI_LOG_FABRIC, "destroy of QP error %d\n", ++ errno); ++ ++ fi_ibv_set_ini_conn_key(ep, &key); ++ node = ofi_rbmap_find(domain->xrc.ini_conn_rbmap, &key); ++ assert(node); ++ ofi_rbmap_delete(domain->xrc.ini_conn_rbmap, node); ++ free(ini_conn->peer_addr); ++ free(ini_conn); ++ } else { ++ fi_ibv_sched_ini_conn(ini_conn); ++ } ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++void fi_ibv_add_pending_ini_conn(struct fi_ibv_xrc_ep *ep, int reciprocal, ++ void *conn_param, size_t conn_paramlen) ++{ ++ ep->conn_setup->pending_recip = reciprocal; ++ ep->conn_setup->pending_paramlen = MIN(conn_paramlen, ++ sizeof(ep->conn_setup->pending_param)); ++ memcpy(ep->conn_setup->pending_param, conn_param, ++ ep->conn_setup->pending_paramlen); ++ dlist_insert_tail(&ep->ini_conn_entry, &ep->ini_conn->pending_list); ++} ++ ++static void fi_ibv_create_shutdown_event(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_eq_cm_entry entry = { ++ .fid = &ep->base_ep.util_ep.ep_fid.fid, ++ }; ++ ++ fi_ibv_eq_write_event(ep->base_ep.eq, FI_SHUTDOWN, ++ &entry, sizeof(entry)); ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++void fi_ibv_sched_ini_conn(struct fi_ibv_ini_shared_conn *ini_conn) ++{ ++ struct fi_ibv_xrc_ep *ep; ++ enum fi_ibv_ini_qp_state last_state; ++ int ret; ++ ++ /* Continue to schedule shared connections if the physical connection ++ * has completed and there are connection requests pending. We could ++ * implement a throttle here if it is determined that it is better to ++ * limit the number of outstanding connections. */ ++ while (1) { ++ if (dlist_empty(&ini_conn->pending_list) || ++ ini_conn->state == FI_IBV_INI_QP_CONNECTING) ++ return; ++ ++ dlist_pop_front(&ini_conn->pending_list, ++ struct fi_ibv_xrc_ep, ep, ini_conn_entry); ++ ++ dlist_insert_tail(&ep->ini_conn_entry, ++ &ep->ini_conn->active_list); ++ last_state = ep->ini_conn->state; ++ if (last_state == FI_IBV_INI_QP_UNCONNECTED) { ++ if (ep->ini_conn->ini_qp && ++ ibv_destroy_qp(ep->ini_conn->ini_qp)) { ++ VERBS_WARN(FI_LOG_FABRIC, "Failed to destroy " ++ "physical INI QP %d\n", errno); ++ } ++ ret = fi_ibv_create_ini_qp(ep); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, "Failed to create " ++ "physical INI QP %d\n", ret); ++ goto err; ++ } ++ ep->ini_conn->ini_qp = ep->base_ep.id->qp; ++ ep->ini_conn->state = FI_IBV_INI_QP_CONNECTING; ++ } else { ++ if (!ep->base_ep.id->qp) { ++ ret = fi_ibv_reserve_qpn(ep, ++ &ep->conn_setup->rsvd_ini_qpn); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, "rsvd_ini_qpn" ++ " create err %d\n", ret); ++ goto err; ++ } ++ } ++ } ++ ++ assert(ep->ini_conn->ini_qp); ++ ++ ep->base_ep.ibv_qp = ep->ini_conn->ini_qp; ++ ret = fi_ibv_process_ini_conn(ep, ep->conn_setup->pending_recip, ++ ep->conn_setup->pending_param, ++ ep->conn_setup->pending_paramlen); ++err: ++ if (ret) { ++ ep->ini_conn->state = last_state; ++ fi_ibv_put_shared_ini_conn(ep); ++ ++ /* We need to let the application know that the ++ * connect request has failed. */ ++ fi_ibv_create_shutdown_event(ep); ++ } ++ } ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++int fi_ibv_process_ini_conn(struct fi_ibv_xrc_ep *ep,int reciprocal, ++ void *param, size_t paramlen) ++{ ++ struct fi_ibv_xrc_cm_data *cm_data = param; ++ struct rdma_conn_param conn_param = { 0 }; ++ int ret; ++ ++ assert(ep->base_ep.ibv_qp); ++ ++ if (!reciprocal) ++ fi_ibv_eq_set_xrc_conn_tag(ep); ++ ++ fi_ibv_set_xrc_cm_data(cm_data, reciprocal, ep->conn_setup->conn_tag, ++ ep->base_ep.eq->xrc.pep_port, ++ ep->ini_conn->tgt_qpn); ++ conn_param.private_data = cm_data; ++ conn_param.private_data_len = paramlen; ++ conn_param.responder_resources = RDMA_MAX_RESP_RES; ++ conn_param.initiator_depth = RDMA_MAX_INIT_DEPTH; ++ conn_param.flow_control = 1; ++ conn_param.retry_count = 15; ++ conn_param.rnr_retry_count = 7; ++ conn_param.srq = 1; ++ ++ /* Shared connections use reserved temporary QP numbers to ++ * avoid the appearance of stale/duplicate CM messages */ ++ if (!ep->base_ep.id->qp) ++ conn_param.qp_num = ep->conn_setup->rsvd_ini_qpn->qp_num; ++ ++ assert(ep->conn_state == FI_IBV_XRC_UNCONNECTED || ++ ep->conn_state == FI_IBV_XRC_ORIG_CONNECTED); ++ fi_ibv_next_xrc_conn_state(ep); ++ ++ ret = rdma_connect(ep->base_ep.id, &conn_param) ? -errno : 0; ++ if (ret) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_connect", errno); ++ fi_ibv_prev_xrc_conn_state(ep); ++ } ++ return ret; ++} ++ ++int fi_ibv_ep_create_tgt_qp(struct fi_ibv_xrc_ep *ep, uint32_t tgt_qpn) ++{ ++#if VERBS_HAVE_XRC ++ struct ibv_qp_open_attr open_attr; ++ struct ibv_qp_init_attr_ex attr_ex; ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct ibv_qp *rsvd_qpn; ++ int ret; ++ ++ assert(ep->tgt_id && !ep->tgt_id->qp); ++ ++ /* If a target QP number was specified then open that existing ++ * QP for sharing. */ ++ if (tgt_qpn) { ++ ret = fi_ibv_reserve_qpn(ep, &rsvd_qpn); ++ if (!rsvd_qpn) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Create of XRC reserved QPN failed %d\n", ++ ret); ++ return ret; ++ } ++ ++ memset(&open_attr, 0, sizeof(open_attr)); ++ open_attr.qp_num = tgt_qpn; ++ open_attr.comp_mask = IBV_QP_OPEN_ATTR_NUM | ++ IBV_QP_OPEN_ATTR_XRCD | IBV_QP_OPEN_ATTR_TYPE | ++ IBV_QP_OPEN_ATTR_CONTEXT; ++ open_attr.xrcd = domain->xrc.xrcd; ++ open_attr.qp_type = IBV_QPT_XRC_RECV; ++ open_attr.qp_context = ep; ++ ++ ep->tgt_ibv_qp = ibv_open_qp(domain->verbs, &open_attr); ++ if (!ep->tgt_ibv_qp) { ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "XRC TGT QP, ibv_open_qp()", errno); ++ ibv_destroy_qp(rsvd_qpn); ++ return -errno; ++ } ++ ep->conn_setup->rsvd_tgt_qpn = rsvd_qpn; ++ return FI_SUCCESS; ++ } ++ ++ /* An existing XRC target was not specified, create XRC TGT ++ * side of new physical connection. */ ++ fi_ibv_msg_ep_get_qp_attr(&ep->base_ep, ++ (struct ibv_qp_init_attr *)&attr_ex); ++ attr_ex.qp_type = IBV_QPT_XRC_RECV; ++ attr_ex.qp_context = ep; ++ attr_ex.comp_mask = IBV_QP_INIT_ATTR_PD | IBV_QP_INIT_ATTR_XRCD; ++ attr_ex.pd = domain->pd; ++ attr_ex.xrcd = domain->xrc.xrcd; ++ if (rdma_create_qp_ex(ep->tgt_id, &attr_ex)) { ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "Physical XRC TGT QP, rdma_create_ep_ex()", ++ errno); ++ return -errno; ++ } ++ ep->tgt_ibv_qp = ep->tgt_id->qp; ++ ++ return FI_SUCCESS; ++#else /* VERBS_HAVE_XRC */ ++ return -FI_ENOSYS; ++#endif /* !VERBS_HAVE_XRC */ ++} ++ ++static int fi_ibv_put_tgt_qp(struct fi_ibv_xrc_ep *ep) ++{ ++ int ret; ++ ++ if (!ep->tgt_ibv_qp) ++ return FI_SUCCESS; ++ ++ /* The kernel will not destroy the detached TGT QP until all ++ * shared opens have called ibv_destroy_qp. */ ++ ret = ibv_destroy_qp(ep->tgt_ibv_qp); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "Close XRC TGT QP, ibv_destroy_qp()", errno); ++ return -errno; ++ } ++ ep->tgt_ibv_qp = NULL; ++ ++ return FI_SUCCESS; ++} ++ ++int fi_ibv_ep_destroy_xrc_qp(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ ++ if (ep->base_ep.ibv_qp) { ++ fastlock_acquire(&domain->xrc.ini_mgmt_lock); ++ fi_ibv_put_shared_ini_conn(ep); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++ } ++ if (ep->base_ep.id) { ++ rdma_destroy_id(ep->base_ep.id); ++ ep->base_ep.id = NULL; ++ } ++ if (ep->tgt_ibv_qp) ++ fi_ibv_put_tgt_qp(ep); ++ ++ if (ep->tgt_id) { ++ rdma_destroy_id(ep->tgt_id); ++ ep->tgt_id = NULL; ++ } ++ return 0; ++} ++ ++FI_VERBS_XRC_ONLY ++static int fi_ibv_ini_conn_compare(struct ofi_rbmap *map, void *key, void *data) ++{ ++ struct fi_ibv_ini_shared_conn *ini_conn = data; ++ struct fi_ibv_ini_conn_key *_key = key; ++ int ret; ++ ++ assert(_key->addr->sa_family == ini_conn->peer_addr->sa_family); ++ ++ /* Only interested in the interface address and TX CQ */ ++ switch (_key->addr->sa_family) { ++ case AF_INET: ++ ret = memcmp(&ofi_sin_addr(_key->addr), ++ &ofi_sin_addr(ini_conn->peer_addr), ++ sizeof(ofi_sin_addr(_key->addr))); ++ break; ++ case AF_INET6: ++ ret = memcmp(&ofi_sin6_addr(_key->addr), ++ &ofi_sin6_addr(ini_conn->peer_addr), ++ sizeof(ofi_sin6_addr(_key->addr))); ++ break; ++ default: ++ VERBS_WARN(FI_LOG_FABRIC, "Unsupported address format\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ if (ret) ++ return ret; ++ ++ return _key->tx_cq < ini_conn->tx_cq ? ++ -1 : _key->tx_cq > ini_conn->tx_cq; ++} ++ ++FI_VERBS_XRC_ONLY ++static int fi_ibv_domain_xrc_validate_hw(struct fi_ibv_domain *domain) ++{ ++ struct ibv_device_attr attr; ++ int ret; ++ ++ ret = ibv_query_device(domain->verbs, &attr); ++ if (ret || !(attr.device_cap_flags & IBV_DEVICE_XRC)) { ++ VERBS_INFO(FI_LOG_DOMAIN, "XRC is not supported"); ++ return -FI_EINVAL; ++ } ++ return FI_SUCCESS; ++} ++ ++int fi_ibv_domain_xrc_init(struct fi_ibv_domain *domain) ++{ ++#if VERBS_HAVE_XRC ++ struct ibv_xrcd_init_attr attr; ++ int ret; ++ ++ ret = fi_ibv_domain_xrc_validate_hw(domain); ++ if (ret) ++ return ret; ++ ++ domain->xrc.xrcd_fd = -1; ++ if (fi_ibv_gl_data.msg.xrcd_filename) { ++ domain->xrc.xrcd_fd = open(fi_ibv_gl_data.msg.xrcd_filename, ++ O_CREAT, S_IWUSR | S_IRUSR); ++ if (domain->xrc.xrcd_fd < 0) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, ++ "XRCD file open", errno); ++ return -errno; ++ } ++ } ++ ++ attr.comp_mask = IBV_XRCD_INIT_ATTR_FD | IBV_XRCD_INIT_ATTR_OFLAGS; ++ attr.fd = domain->xrc.xrcd_fd; ++ attr.oflags = O_CREAT; ++ domain->xrc.xrcd = ibv_open_xrcd(domain->verbs, &attr); ++ if (!domain->xrc.xrcd) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_open_xrcd", errno); ++ goto xrcd_err; ++ } ++ ++ fastlock_init(&domain->xrc.ini_mgmt_lock); ++ domain->xrc.ini_conn_rbmap = calloc(1, ++ sizeof(*domain->xrc.ini_conn_rbmap)); ++ ++ if (!domain->xrc.ini_conn_rbmap) { ++ ret = -ENOMEM; ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "XRC INI QP RB Tree", -ret); ++ goto rbmap_err; ++ } ++ domain->xrc.ini_conn_rbmap->compare = &fi_ibv_ini_conn_compare; ++ ofi_rbmap_init(domain->xrc.ini_conn_rbmap); ++ ++ domain->use_xrc = 1; ++ return FI_SUCCESS; ++ ++rbmap_err: ++ (void)ibv_close_xrcd(domain->xrc.xrcd); ++xrcd_err: ++ if (domain->xrc.xrcd_fd >= 0) { ++ close(domain->xrc.xrcd_fd); ++ domain->xrc.xrcd_fd = -1; ++ } ++ return ret; ++#else /* VERBS_HAVE_XRC */ ++ return -FI_ENOSYS; ++#endif /* !VERBS_HAVE_XRC */ ++} ++ ++int fi_ibv_domain_xrc_cleanup(struct fi_ibv_domain *domain) ++{ ++#if VERBS_HAVE_XRC ++ int ret; ++ ++ assert(domain->xrc.xrcd); ++ ++ /* All endpoint and hence XRC INI QP should be closed */ ++ if (!ofi_rbmap_empty(domain->xrc.ini_conn_rbmap)) { ++ VERBS_WARN(FI_LOG_DOMAIN, "XRC domain busy\n"); ++ return -FI_EBUSY; ++ } ++ ++ ret = ibv_close_xrcd(domain->xrc.xrcd); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_close_xrcd", ret); ++ return -ret; ++ } ++ if (domain->xrc.xrcd_fd >= 0) { ++ close(domain->xrc.xrcd_fd); ++ domain->xrc.xrcd_fd = -1; ++ } ++ ++ ofi_rbmap_cleanup(domain->xrc.ini_conn_rbmap); ++ fastlock_destroy(&domain->xrc.ini_mgmt_lock); ++#endif /* VERBS_HAVE_XRC */ ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_ep.c +new file mode 100644 +index 0000000..7e37a9b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_ep.c +@@ -0,0 +1,2079 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++ ++#include "fi_verbs.h" ++ ++#define VERBS_RESOLVE_TIMEOUT 2000 // ms ++ ++static struct fi_ops_msg fi_ibv_srq_msg_ops; ++ ++static inline int fi_ibv_msg_ep_cmdata_size(fid_t fid) ++{ ++ struct fi_ibv_pep *pep; ++ struct fi_ibv_ep *ep; ++ struct fi_info *info; ++ ++ switch (fid->fclass) { ++ case FI_CLASS_PEP: ++ pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); ++ info = pep->info; ++ break; ++ case FI_CLASS_EP: ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ info = ep->info; ++ break; ++ default: ++ info = NULL; ++ }; ++ if (fi_ibv_is_xrc(info)) ++ return VERBS_CM_DATA_SIZE - sizeof(struct fi_ibv_xrc_cm_data); ++ else ++ return VERBS_CM_DATA_SIZE; ++} ++ ++static int fi_ibv_ep_getopt(fid_t fid, int level, int optname, ++ void *optval, size_t *optlen) ++{ ++ switch (level) { ++ case FI_OPT_ENDPOINT: ++ switch (optname) { ++ case FI_OPT_CM_DATA_SIZE: ++ if (*optlen < sizeof(size_t)) ++ return -FI_ETOOSMALL; ++ *((size_t *) optval) = fi_ibv_msg_ep_cmdata_size(fid); ++ *optlen = sizeof(size_t); ++ return 0; ++ default: ++ return -FI_ENOPROTOOPT; ++ } ++ default: ++ return -FI_ENOPROTOOPT; ++ } ++ return 0; ++} ++ ++static int fi_ibv_ep_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) ++{ ++ switch (level) { ++ case FI_OPT_ENDPOINT: ++ return -FI_ENOPROTOOPT; ++ default: ++ return -FI_ENOPROTOOPT; ++ } ++ return 0; ++} ++ ++static struct fi_ops_ep fi_ibv_ep_base_ops = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = fi_no_cancel, ++ .getopt = fi_ibv_ep_getopt, ++ .setopt = fi_ibv_ep_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++static struct fi_ops_rma fi_ibv_dgram_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_no_rma_read, ++ .readv = fi_no_rma_readv, ++ .readmsg = fi_no_rma_readmsg, ++ .write = fi_no_rma_write, ++ .writev = fi_no_rma_writev, ++ .writemsg = fi_no_rma_writemsg, ++ .inject = fi_no_rma_inject, ++ .writedata = fi_no_rma_writedata, ++ .injectdata = fi_no_rma_injectdata, ++}; ++ ++static int fi_ibv_alloc_wrs(struct fi_ibv_ep *ep) ++{ ++ ep->wrs = calloc(1, sizeof(*ep->wrs)); ++ if (!ep->wrs) ++ return -FI_ENOMEM; ++ ++ ep->wrs->msg_wr.wr_id = VERBS_NO_COMP_FLAG; ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND; ++ ep->wrs->msg_wr.send_flags = IBV_SEND_INLINE; ++ ep->wrs->msg_wr.sg_list = &ep->wrs->sge; ++ ep->wrs->msg_wr.num_sge = 1; ++ ++ ep->wrs->rma_wr.wr_id = VERBS_NO_COMP_FLAG; ++ ep->wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE; ++ ep->wrs->rma_wr.send_flags = IBV_SEND_INLINE; ++ ep->wrs->rma_wr.sg_list = &ep->wrs->sge; ++ ep->wrs->rma_wr.num_sge = 1; ++ ++ return FI_SUCCESS; ++} ++ ++static void fi_ibv_free_wrs(struct fi_ibv_ep *ep) ++{ ++ free(ep->wrs); ++} ++ ++static void fi_ibv_util_ep_progress_noop(struct util_ep *util_ep) ++{ ++ /* This routine shouldn't be called */ ++ assert(0); ++} ++ ++static struct fi_ibv_ep * ++fi_ibv_alloc_init_ep(struct fi_info *info, struct fi_ibv_domain *domain, ++ void *context) ++{ ++ struct fi_ibv_ep *ep; ++ struct fi_ibv_xrc_ep *xrc_ep; ++ int ret; ++ ++ if (fi_ibv_is_xrc(info)) { ++ xrc_ep = calloc(1, sizeof(*xrc_ep)); ++ if (!xrc_ep) ++ return NULL; ++ ep = &xrc_ep->base_ep; ++ } else { ++ ep = calloc(1, sizeof(*ep)); ++ if (!ep) ++ return NULL; ++ } ++ ++ ep->info = fi_dupinfo(info); ++ if (!ep->info) ++ goto err1; ++ ++ if (domain->util_domain.threading != FI_THREAD_SAFE) { ++ if (fi_ibv_alloc_wrs(ep)) ++ goto err2; ++ } ++ ++ ret = ofi_endpoint_init(&domain->util_domain.domain_fid, &fi_ibv_util_prov, info, ++ &ep->util_ep, context, fi_ibv_util_ep_progress_noop); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to initialize EP, error - %d\n", ret); ++ goto err3; ++ } ++ ++ ep->util_ep.ep_fid.msg = calloc(1, sizeof(*ep->util_ep.ep_fid.msg)); ++ if (!ep->util_ep.ep_fid.msg) ++ goto err4; ++ ++ return ep; ++err4: ++ (void) ofi_endpoint_close(&ep->util_ep); ++err3: ++ fi_ibv_free_wrs(ep); ++err2: ++ fi_freeinfo(ep->info); ++err1: ++ free(ep); ++ return NULL; ++} ++ ++static int fi_ibv_close_free_ep(struct fi_ibv_ep *ep) ++{ ++ int ret; ++ ++ free(ep->util_ep.ep_fid.msg); ++ ep->util_ep.ep_fid.msg = NULL; ++ ++ ret = ofi_endpoint_close(&ep->util_ep); ++ if (ret) ++ return ret; ++ ++ fi_ibv_free_wrs(ep); ++ fi_freeinfo(ep->info); ++ free(ep); ++ ++ return 0; ++} ++ ++static inline void fi_ibv_ep_xrc_close(struct fi_ibv_ep *ep) ++{ ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ ++ fi_ibv_ep_destroy_xrc_qp(xrc_ep); ++ if (xrc_ep->conn_setup) ++ fi_ibv_free_xrc_conn_setup(xrc_ep); ++} ++ ++static int fi_ibv_ep_close(fid_t fid) ++{ ++ int ret; ++ struct fi_ibv_fabric *fab; ++ struct fi_ibv_ep *ep = ++ container_of(fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ ++ switch (ep->util_ep.type) { ++ case FI_EP_MSG: ++ if (fi_ibv_is_xrc(ep->info)) ++ fi_ibv_ep_xrc_close(ep); ++ else ++ rdma_destroy_ep(ep->id); ++ fi_ibv_cleanup_cq(ep); ++ break; ++ case FI_EP_DGRAM: ++ fab = container_of(&ep->util_ep.domain->fabric->fabric_fid, ++ struct fi_ibv_fabric, util_fabric.fabric_fid.fid); ++ ofi_ns_del_local_name(&fab->name_server, ++ &ep->service, &ep->ep_name); ++ ret = ibv_destroy_qp(ep->ibv_qp); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to destroy QP (errno = %d)\n", errno); ++ return -errno; ++ } ++ fi_ibv_cleanup_cq(ep); ++ break; ++ default: ++ VERBS_INFO(FI_LOG_DOMAIN, "Unknown EP type\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ ++ VERBS_INFO(FI_LOG_DOMAIN, "EP %p is being closed\n", ep); ++ ++ ret = fi_ibv_close_free_ep(ep); ++ if (ret) { ++ VERBS_WARN(FI_LOG_DOMAIN, ++ "Unable to close EP (%p), error - %d\n", ep, ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static inline int fi_ibv_ep_xrc_set_tgt_chan(struct fi_ibv_ep *ep) ++{ ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ if (xrc_ep->tgt_id) ++ return rdma_migrate_id(xrc_ep->tgt_id, ep->eq->channel); ++ ++ return FI_SUCCESS; ++} ++ ++static int fi_ibv_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep; ++ struct fi_ibv_cq *cq = ++ container_of(bfid, struct fi_ibv_cq, util_cq.cq_fid.fid); ++ struct fi_ibv_dgram_av *av; ++ int ret; ++ ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ ret = ofi_ep_bind_valid(&fi_ibv_prov, bfid, flags); ++ if (ret) ++ return ret; ++ ++ switch (ep->util_ep.type) { ++ case FI_EP_MSG: ++ switch (bfid->fclass) { ++ case FI_CLASS_CQ: ++ ret = ofi_ep_bind_cq(&ep->util_ep, &cq->util_cq, flags); ++ if (ret) ++ return ret; ++ break; ++ case FI_CLASS_EQ: ++ ep->eq = container_of(bfid, struct fi_ibv_eq, eq_fid.fid); ++ ret = rdma_migrate_id(ep->id, ep->eq->channel); ++ if (ret) ++ return -errno; ++ if (fi_ibv_is_xrc(ep->info)) { ++ ret = fi_ibv_ep_xrc_set_tgt_chan(ep); ++ if (ret) ++ return -errno; ++ } ++ break; ++ case FI_CLASS_SRX_CTX: ++ ep->srq_ep = container_of(bfid, struct fi_ibv_srq_ep, ep_fid.fid); ++ break; ++ default: ++ return -FI_EINVAL; ++ } ++ break; ++ case FI_EP_DGRAM: ++ switch (bfid->fclass) { ++ case FI_CLASS_CQ: ++ ret = ofi_ep_bind_cq(&ep->util_ep, &cq->util_cq, flags); ++ if (ret) ++ return ret; ++ break; ++ case FI_CLASS_AV: ++ av = container_of(bfid, struct fi_ibv_dgram_av, ++ util_av.av_fid.fid); ++ return ofi_ep_bind_av(&ep->util_ep, &av->util_av); ++ default: ++ return -FI_EINVAL; ++ } ++ break; ++ default: ++ VERBS_INFO(FI_LOG_DOMAIN, "Unknown EP type\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ ++ /* Reserve space for receives */ ++ if ((bfid->fclass == FI_CLASS_CQ) && (flags & FI_RECV)) { ++ assert(ep->rx_size < INT32_MAX); ++ ofi_atomic_sub32(&cq->credits, (int32_t)ep->rx_size); ++ } ++ return 0; ++} ++ ++static int fi_ibv_create_dgram_ep(struct fi_ibv_domain *domain, struct fi_ibv_ep *ep, ++ struct ibv_qp_init_attr *init_attr) ++{ ++ struct fi_ibv_fabric *fab; ++ struct ibv_qp_attr attr = { ++ .qp_state = IBV_QPS_INIT, ++ .pkey_index = 0, ++ .port_num = 1, ++ .qkey = 0x11111111, ++ }; ++ int ret = 0; ++ union ibv_gid gid; ++ uint16_t p_key; ++ struct ibv_port_attr port_attr; ++ ++ init_attr->qp_type = IBV_QPT_UD; ++ ++ ep->ibv_qp = ibv_create_qp(domain->pd, init_attr); ++ if (!ep->ibv_qp) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to create IBV " ++ "Queue Pair\n"); ++ return -errno; ++ } ++ ++ ret = ibv_modify_qp(ep->ibv_qp, &attr, ++ IBV_QP_STATE | ++ IBV_QP_PKEY_INDEX | ++ IBV_QP_PORT | ++ IBV_QP_QKEY); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " ++ "to INIT\n"); ++ return -errno; ++ } ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_RTR; ++ ret = ibv_modify_qp(ep->ibv_qp, &attr, ++ IBV_QP_STATE); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " ++ "to RTR\n"); ++ return -errno; ++ } ++ ++ if (ep->util_ep.tx_cq) { ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_RTS; ++ attr.sq_psn = 0xffffff; ++ ret = ibv_modify_qp(ep->ibv_qp, &attr, ++ IBV_QP_STATE | ++ IBV_QP_SQ_PSN); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " ++ "to RTS\n"); ++ return -errno; ++ } ++ } ++ ++ if (ibv_query_gid(domain->verbs, 1, 0, &gid)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to query GID, errno = %d", ++ errno); ++ return -errno; ++ } ++ ++ if (ibv_query_pkey(domain->verbs, 1, 0, &p_key)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to query P_Key, errno = %d", ++ errno); ++ return -errno; ++ } ++ ++ if (ibv_query_port(domain->verbs, 1, &port_attr)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to query port attributes, errno = %d", ++ errno); ++ return -errno; ++ } ++ ++ ep->ep_name.lid = port_attr.lid; ++ ep->ep_name.sl = port_attr.sm_sl; ++ ep->ep_name.gid = gid; ++ ep->ep_name.qpn = ep->ibv_qp->qp_num; ++ ep->ep_name.pkey = p_key; ++ ++ fab = container_of(ep->util_ep.domain->fabric, ++ struct fi_ibv_fabric, util_fabric); ++ ++ ofi_ns_add_local_name(&fab->name_server, ++ &ep->service, &ep->ep_name); ++ ++ return 0; ++} ++ ++/* fi_ibv_srq_ep::xrc.prepost_lock must be held */ ++FI_VERBS_XRC_ONLY ++static int fi_ibv_process_xrc_preposted(struct fi_ibv_srq_ep *srq_ep) ++{ ++ struct fi_ibv_xrc_srx_prepost *recv; ++ struct slist_entry *entry; ++ int ret; ++ ++ /* The pre-post SRQ function ops have been replaced so the ++ * posting here results in adding the RX entries to the SRQ */ ++ while (!slist_empty(&srq_ep->xrc.prepost_list)) { ++ entry = slist_remove_head(&srq_ep->xrc.prepost_list); ++ recv = container_of(entry, struct fi_ibv_xrc_srx_prepost, ++ prepost_entry); ++ ret = fi_recv(&srq_ep->ep_fid, recv->buf, recv->len, ++ recv->desc, recv->src_addr, recv->context); ++ free(recv); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "fi_recv", errno); ++ return -errno; ++ } ++ } ++ return FI_SUCCESS; ++} ++ ++static int fi_ibv_ep_enable_xrc(struct fi_ibv_ep *ep) ++{ ++#if VERBS_HAVE_XRC ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ struct fi_ibv_srq_ep *srq_ep = ep->srq_ep; ++ struct fi_ibv_domain *domain = container_of(ep->util_ep.rx_cq->domain, ++ struct fi_ibv_domain, util_domain); ++ struct fi_ibv_cq *cq = container_of(ep->util_ep.rx_cq, ++ struct fi_ibv_cq, util_cq); ++ struct ibv_srq_init_attr_ex attr; ++ ssize_t ret; ++ ++ /* XRC EP additional initialization */ ++ dlist_init(&xrc_ep->ini_conn_entry); ++ xrc_ep->conn_state = FI_IBV_XRC_UNCONNECTED; ++ ++ fastlock_acquire(&srq_ep->xrc.prepost_lock); ++ if (srq_ep->srq) { ++ /* ++ * Multiple endpoints bound to the same XRC SRX context have ++ * the restriction that they must be bound to the same RX CQ ++ */ ++ if (!srq_ep->xrc.cq || srq_ep->xrc.cq != cq) { ++ fastlock_release(&srq_ep->xrc.prepost_lock); ++ VERBS_WARN(FI_LOG_EP_CTRL, "SRX_CTX/CQ mismatch\n"); ++ return -FI_EINVAL; ++ } ++ ibv_get_srq_num(srq_ep->srq, &xrc_ep->srqn); ++ ret = FI_SUCCESS; ++ goto done; ++ } ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.attr.max_wr = srq_ep->xrc.max_recv_wr; ++ attr.attr.max_sge = srq_ep->xrc.max_sge; ++ attr.comp_mask = IBV_SRQ_INIT_ATTR_TYPE | IBV_SRQ_INIT_ATTR_XRCD | ++ IBV_SRQ_INIT_ATTR_CQ | IBV_SRQ_INIT_ATTR_PD; ++ attr.srq_type = IBV_SRQT_XRC; ++ attr.xrcd = domain->xrc.xrcd; ++ attr.cq = cq->cq; ++ attr.pd = domain->pd; ++ ++ srq_ep->srq = ibv_create_srq_ex(domain->verbs, &attr); ++ if (!srq_ep->srq) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_create_srq_ex", errno); ++ ret = -errno; ++ goto done; ++ } ++ /* The RX CQ maintains a list of all the XRC SRQs that were created ++ * using it as the CQ */ ++ cq->util_cq.cq_fastlock_acquire(&cq->xrc.srq_list_lock); ++ dlist_insert_tail(&srq_ep->xrc.srq_entry, &cq->xrc.srq_list); ++ srq_ep->xrc.cq = cq; ++ cq->util_cq.cq_fastlock_release(&cq->xrc.srq_list_lock); ++ ++ ibv_get_srq_num(srq_ep->srq, &xrc_ep->srqn); ++ ++ /* Swap functions since locking is no longer required */ ++ srq_ep->ep_fid.msg = &fi_ibv_srq_msg_ops; ++ ret = fi_ibv_process_xrc_preposted(srq_ep); ++done: ++ fastlock_release(&srq_ep->xrc.prepost_lock); ++ ++ return ret; ++#else /* VERBS_HAVE_XRC */ ++ return -FI_ENOSYS; ++#endif /* !VERBS_HAVE_XRC */ ++} ++ ++void fi_ibv_msg_ep_get_qp_attr(struct fi_ibv_ep *ep, ++ struct ibv_qp_init_attr *attr) ++{ ++ attr->qp_context = ep; ++ ++ if (ep->util_ep.tx_cq) { ++ struct fi_ibv_cq *cq = container_of(ep->util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++ ++ attr->cap.max_send_wr = ep->info->tx_attr->size; ++ attr->cap.max_send_sge = ep->info->tx_attr->iov_limit; ++ attr->send_cq = cq->cq; ++ } else { ++ struct fi_ibv_cq *cq = ++ container_of(ep->util_ep.rx_cq, struct fi_ibv_cq, util_cq); ++ ++ attr->send_cq = cq->cq; ++ } ++ ++ if (ep->util_ep.rx_cq) { ++ struct fi_ibv_cq *cq = ++ container_of(ep->util_ep.rx_cq, struct fi_ibv_cq, util_cq); ++ ++ attr->cap.max_recv_wr = ep->info->rx_attr->size; ++ attr->cap.max_recv_sge = ep->info->rx_attr->iov_limit; ++ attr->recv_cq = cq->cq; ++ } else { ++ struct fi_ibv_cq *cq = ++ container_of(ep->util_ep.tx_cq, struct fi_ibv_cq, util_cq); ++ ++ attr->recv_cq = cq->cq; ++ } ++ attr->cap.max_inline_data = ep->info->tx_attr->inject_size; ++ attr->qp_type = IBV_QPT_RC; ++ attr->sq_sig_all = 1; ++ ++ if (ep->srq_ep) { ++ attr->srq = ep->srq_ep->srq; ++ /* Recieve posts are done to SRQ not QP RQ */ ++ attr->cap.max_recv_wr = 0; ++ } ++} ++ ++ ++static int fi_ibv_ep_enable(struct fid_ep *ep_fid) ++{ ++ struct ibv_qp_init_attr attr = { 0 }; ++ struct fi_ibv_ep *ep = container_of(ep_fid, struct fi_ibv_ep, ++ util_ep.ep_fid); ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(ep); ++ int ret; ++ ++ if (!ep->eq && (ep->util_ep.type == FI_EP_MSG)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Endpoint is not bound to an event queue\n"); ++ return -FI_ENOEQ; ++ } ++ ++ if (!ep->util_ep.tx_cq && !ep->util_ep.rx_cq) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " ++ "a send or receive completion queue\n"); ++ return -FI_ENOCQ; ++ } ++ ++ if (!ep->util_ep.tx_cq && (ofi_send_allowed(ep->util_ep.caps) || ++ ofi_rma_initiate_allowed(ep->util_ep.caps))) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " ++ "a send completion queue when it has transmit " ++ "capabilities enabled (FI_SEND | FI_RMA).\n"); ++ return -FI_ENOCQ; ++ } ++ ++ if (!ep->util_ep.rx_cq && ofi_recv_allowed(ep->util_ep.caps)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " ++ "a receive completion queue when it has receive " ++ "capabilities enabled. (FI_RECV)\n"); ++ return -FI_ENOCQ; ++ } ++ fi_ibv_msg_ep_get_qp_attr(ep, &attr); ++ ++ switch (ep->util_ep.type) { ++ case FI_EP_MSG: ++ if (ep->srq_ep) { ++ /* Override receive function pointers to prevent the user from ++ * posting Receive WRs to a QP where a SRQ is attached to it */ ++ if (domain->use_xrc) { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_srq_xrc_ep_msg_ops; ++ return fi_ibv_ep_enable_xrc(ep); ++ } else { ++ ep->util_ep.ep_fid.msg->recv = fi_no_msg_recv; ++ ep->util_ep.ep_fid.msg->recvv = fi_no_msg_recvv; ++ ep->util_ep.ep_fid.msg->recvmsg = fi_no_msg_recvmsg; ++ } ++ } else if (domain->use_xrc) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "XRC EP_MSG not bound " ++ "to srx_context\n"); ++ return -FI_EINVAL; ++ } ++ ++ ret = rdma_create_qp(ep->id, domain->pd, &attr); ++ if (ret) { ++ ret = -errno; ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to create rdma qp: %s (%d)\n", ++ fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ /* Allow shared XRC INI QP not controlled by RDMA CM ++ * to share same post functions as RC QP. */ ++ ep->ibv_qp = ep->id->qp; ++ break; ++ case FI_EP_DGRAM: ++ assert(domain); ++ attr.sq_sig_all = 1; ++ ret = fi_ibv_create_dgram_ep(domain, ep, &attr); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to create dgram EP: %s (%d)\n", ++ fi_strerror(-ret), -ret); ++ return ret; ++ } ++ break; ++ default: ++ VERBS_INFO(FI_LOG_DOMAIN, "Unknown EP type\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ return 0; ++} ++ ++static int fi_ibv_ep_control(struct fid *fid, int command, void *arg) ++{ ++ struct fid_ep *ep; ++ ++ switch (fid->fclass) { ++ case FI_CLASS_EP: ++ ep = container_of(fid, struct fid_ep, fid); ++ switch (command) { ++ case FI_ENABLE: ++ return fi_ibv_ep_enable(ep); ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++} ++ ++static int fi_ibv_dgram_ep_setname(fid_t ep_fid, void *addr, size_t addrlen) ++{ ++ struct fi_ibv_ep *ep; ++ void *save_addr; ++ int ret = FI_SUCCESS; ++ ++ if (ep_fid->fclass != FI_CLASS_EP) ++ return -FI_EINVAL; ++ ++ ep = container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ if (!ep) ++ return -FI_EINVAL; ++ ++ if (addrlen < ep->info->src_addrlen) { ++ VERBS_INFO(FI_LOG_EP_CTRL, ++ "addrlen expected: %"PRIu64", got: %"PRIu64"\n", ++ ep->info->src_addrlen, addrlen); ++ return -FI_ETOOSMALL; ++ } ++ /* ++ * save previous address to be able make ++ * a roll back on the previous one ++ */ ++ save_addr = ep->info->src_addr; ++ ++ ep->info->src_addr = calloc(1, ep->info->src_addrlen); ++ if (!ep->info->src_addr) { ++ ep->info->src_addr = save_addr; ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ memcpy(ep->info->src_addr, addr, ep->info->src_addrlen); ++ memcpy(&ep->ep_name, addr, ep->info->src_addrlen); ++ ++err: ++ ep->info->src_addr = save_addr; ++ return ret; ++} ++ ++static int fi_ibv_dgram_ep_getname(fid_t ep_fid, void *addr, size_t *addrlen) ++{ ++ struct fi_ibv_ep *ep; ++ ++ if (ep_fid->fclass != FI_CLASS_EP) ++ return -FI_EINVAL; ++ ++ ep = container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ if (!ep) ++ return -FI_EINVAL; ++ ++ if (*addrlen < sizeof(ep->ep_name)) { ++ *addrlen = sizeof(ep->ep_name); ++ VERBS_INFO(FI_LOG_EP_CTRL, ++ "addrlen expected: %"PRIu64", got: %"PRIu64"\n", ++ sizeof(ep->ep_name), *addrlen); ++ return -FI_ETOOSMALL; ++ } ++ ++ memset(addr, 0, *addrlen); ++ memcpy(addr, &ep->ep_name, sizeof(ep->ep_name)); ++ *addrlen = sizeof(ep->ep_name); ++ ++ return FI_SUCCESS; ++} ++ ++static struct fi_ops fi_ibv_ep_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = fi_ibv_ep_close, ++ .bind = fi_ibv_ep_bind, ++ .control = fi_ibv_ep_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_cm fi_ibv_dgram_cm_ops = { ++ .size = sizeof(fi_ibv_dgram_cm_ops), ++ .setname = fi_ibv_dgram_ep_setname, ++ .getname = fi_ibv_dgram_ep_getname, ++ .getpeer = fi_no_getpeer, ++ .connect = fi_no_connect, ++ .listen = fi_no_listen, ++ .accept = fi_no_accept, ++ .reject = fi_no_reject, ++ .shutdown = fi_no_shutdown, ++ .join = fi_no_join, ++}; ++ ++int fi_ibv_open_ep(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context) ++{ ++ struct fi_ibv_domain *dom; ++ struct fi_ibv_ep *ep; ++ struct fi_ibv_connreq *connreq; ++ struct fi_ibv_pep *pep; ++ struct fi_info *fi; ++ int ret; ++ ++ if (info->src_addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_FABRIC, ++ "open_ep src addr", info->src_addr); ++ if (info->dest_addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_FABRIC, ++ "open_ep dest addr", info->dest_addr); ++ ++ dom = container_of(domain, struct fi_ibv_domain, ++ util_domain.domain_fid); ++ /* strncmp is used here, because the function is used ++ * to allocate DGRAM (has prefix -dgram) and MSG EPs */ ++ if (strncmp(dom->verbs->device->name, info->domain_attr->name, ++ strlen(dom->verbs->device->name))) { ++ VERBS_INFO(FI_LOG_DOMAIN, ++ "Invalid info->domain_attr->name: %s and %s\n", ++ dom->verbs->device->name, info->domain_attr->name); ++ return -FI_EINVAL; ++ } ++ ++ fi = dom->info; ++ ++ if (info->ep_attr) { ++ ret = fi_ibv_check_ep_attr(info, fi); ++ if (ret) ++ return ret; ++ } ++ ++ if (info->tx_attr) { ++ ret = ofi_check_tx_attr(&fi_ibv_prov, fi->tx_attr, ++ info->tx_attr, info->mode); ++ if (ret) ++ return ret; ++ } ++ ++ if (info->rx_attr) { ++ ret = fi_ibv_check_rx_attr(info->rx_attr, info, fi); ++ if (ret) ++ return ret; ++ } ++ ++ ep = fi_ibv_alloc_init_ep(info, dom, context); ++ if (!ep) ++ return -FI_ENOMEM; ++ ++ ep->inject_limit = ep->info->tx_attr->inject_size; ++ ++ switch (info->ep_attr->type) { ++ case FI_EP_MSG: ++ if (dom->use_xrc) { ++ if (dom->util_domain.threading == FI_THREAD_SAFE) { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_xrc_ep_msg_ops_ts; ++ ep->util_ep.ep_fid.rma = &fi_ibv_msg_xrc_ep_rma_ops_ts; ++ } else { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_xrc_ep_msg_ops; ++ ep->util_ep.ep_fid.rma = &fi_ibv_msg_xrc_ep_rma_ops; ++ } ++ ep->util_ep.ep_fid.cm = &fi_ibv_msg_xrc_ep_cm_ops; ++ ep->util_ep.ep_fid.atomic = &fi_ibv_msg_xrc_ep_atomic_ops; ++ } else { ++ if (dom->util_domain.threading == FI_THREAD_SAFE) { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_ep_msg_ops_ts; ++ ep->util_ep.ep_fid.rma = &fi_ibv_msg_ep_rma_ops_ts; ++ } else { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_ep_msg_ops; ++ ep->util_ep.ep_fid.rma = &fi_ibv_msg_ep_rma_ops; ++ } ++ ep->util_ep.ep_fid.cm = &fi_ibv_msg_ep_cm_ops; ++ ep->util_ep.ep_fid.atomic = &fi_ibv_msg_ep_atomic_ops; ++ } ++ ++ if (!info->handle) { ++ ret = fi_ibv_create_ep(NULL, NULL, 0, info, NULL, &ep->id); ++ if (ret) ++ goto err1; ++ } else if (info->handle->fclass == FI_CLASS_CONNREQ) { ++ connreq = container_of(info->handle, ++ struct fi_ibv_connreq, handle); ++ if (dom->use_xrc) { ++ assert(connreq->is_xrc); ++ ++ if (!connreq->xrc.is_reciprocal) { ++ ret = fi_ibv_process_xrc_connreq(ep, ++ connreq); ++ if (ret) ++ goto err1; ++ } ++ } else { ++ ep->id = connreq->id; ++ ep->ibv_qp = ep->id->qp; ++ } ++ } else if (info->handle->fclass == FI_CLASS_PEP) { ++ pep = container_of(info->handle, struct fi_ibv_pep, pep_fid.fid); ++ ep->id = pep->id; ++ ep->ibv_qp = ep->id->qp; ++ pep->id = NULL; ++ ++ if (rdma_resolve_addr(ep->id, info->src_addr, info->dest_addr, ++ VERBS_RESOLVE_TIMEOUT)) { ++ ret = -errno; ++ VERBS_INFO(FI_LOG_DOMAIN, "Unable to rdma_resolve_addr\n"); ++ goto err2; ++ } ++ ++ if (rdma_resolve_route(ep->id, VERBS_RESOLVE_TIMEOUT)) { ++ ret = -errno; ++ VERBS_INFO(FI_LOG_DOMAIN, "Unable to rdma_resolve_route\n"); ++ goto err2; ++ } ++ } else { ++ ret = -FI_ENOSYS; ++ goto err1; ++ } ++ ep->id->context = &ep->util_ep.ep_fid.fid; ++ break; ++ case FI_EP_DGRAM: ++ ep->service = (info->src_addr) ? ++ (((struct ofi_ib_ud_ep_name *)info->src_addr)->service) : ++ (((getpid() & 0x7FFF) << 16) + ((uintptr_t)ep & 0xFFFF)); ++ ++ if (dom->util_domain.threading == FI_THREAD_SAFE) { ++ *ep->util_ep.ep_fid.msg = fi_ibv_dgram_msg_ops_ts; ++ } else { ++ *ep->util_ep.ep_fid.msg = fi_ibv_dgram_msg_ops; ++ } ++ ep->util_ep.ep_fid.rma = &fi_ibv_dgram_rma_ops; ++ ep->util_ep.ep_fid.cm = &fi_ibv_dgram_cm_ops; ++ break; ++ default: ++ VERBS_INFO(FI_LOG_DOMAIN, "Unknown EP type\n"); ++ ret = -FI_EINVAL; ++ assert(0); ++ goto err1; ++ } ++ ++ ep->rx_size = info->rx_attr->size; ++ ++ *ep_fid = &ep->util_ep.ep_fid; ++ ep->util_ep.ep_fid.fid.ops = &fi_ibv_ep_ops; ++ ep->util_ep.ep_fid.ops = &fi_ibv_ep_base_ops; ++ ++ return FI_SUCCESS; ++err2: ++ ep->ibv_qp = NULL; ++ rdma_destroy_ep(ep->id); ++err1: ++ fi_ibv_close_free_ep(ep); ++ return ret; ++} ++ ++static int fi_ibv_pep_bind(fid_t fid, struct fid *bfid, uint64_t flags) ++{ ++ struct fi_ibv_pep *pep; ++ int ret; ++ ++ pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); ++ if (bfid->fclass != FI_CLASS_EQ) ++ return -FI_EINVAL; ++ ++ pep->eq = container_of(bfid, struct fi_ibv_eq, eq_fid.fid); ++ /* ++ * This is a restrictive solution that enables an XRC EP to ++ * inform it's peer the port that should be used in making the ++ * reciprocal connection request. While it meets RXM requirements ++ * it limits an EQ to a single passive endpoint. TODO: implement ++ * a more general solution. ++ */ ++ if (fi_ibv_is_xrc(pep->info)) { ++ if (pep->eq->xrc.pep_port) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "XRC limits EQ binding to a single PEP\n"); ++ return -FI_EINVAL; ++ } ++ pep->eq->xrc.pep_port = ntohs(rdma_get_src_port(pep->id)); ++ } ++ ++ ret = rdma_migrate_id(pep->id, pep->eq->channel); ++ if (ret) ++ return -errno; ++ ++ return 0; ++} ++ ++static int fi_ibv_pep_control(struct fid *fid, int command, void *arg) ++{ ++ struct fi_ibv_pep *pep; ++ int ret = 0; ++ ++ switch (fid->fclass) { ++ case FI_CLASS_PEP: ++ pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); ++ switch (command) { ++ case FI_BACKLOG: ++ if (!arg) ++ return -FI_EINVAL; ++ pep->backlog = *(int *) arg; ++ break; ++ default: ++ ret = -FI_ENOSYS; ++ break; ++ } ++ break; ++ default: ++ ret = -FI_ENOSYS; ++ break; ++ } ++ ++ return ret; ++} ++ ++static int fi_ibv_pep_close(fid_t fid) ++{ ++ struct fi_ibv_pep *pep; ++ ++ pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); ++ if (pep->id) ++ rdma_destroy_ep(pep->id); ++ ++ fi_freeinfo(pep->info); ++ free(pep); ++ return 0; ++} ++ ++static struct fi_ops fi_ibv_pep_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = fi_ibv_pep_close, ++ .bind = fi_ibv_pep_bind, ++ .control = fi_ibv_pep_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_ep fi_ibv_pep_ops = { ++ .size = sizeof(struct fi_ops_ep), ++ .getopt = fi_ibv_ep_getopt, ++ .setopt = fi_no_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++int fi_ibv_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context) ++{ ++ struct fi_ibv_pep *_pep; ++ int ret; ++ ++ _pep = calloc(1, sizeof *_pep); ++ if (!_pep) ++ return -FI_ENOMEM; ++ ++ if (!(_pep->info = fi_dupinfo(info))) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ ++ if (_pep->info->dest_addr || _pep->info->dest_addrlen) { ++ free(_pep->info->dest_addr); ++ _pep->info->dest_addr = NULL; ++ _pep->info->dest_addrlen = 0; ++ } ++ ++ ret = rdma_create_id(NULL, &_pep->id, &_pep->pep_fid.fid, RDMA_PS_TCP); ++ if (ret) { ++ VERBS_INFO(FI_LOG_DOMAIN, "Unable to create rdma_cm_id\n"); ++ goto err2; ++ } ++ ++ if (info->src_addr) { ++ ret = rdma_bind_addr(_pep->id, (struct sockaddr *)info->src_addr); ++ if (ret) { ++ VERBS_INFO(FI_LOG_DOMAIN, "Unable to bind address to rdma_cm_id\n"); ++ goto err3; ++ } ++ _pep->bound = 1; ++ } ++ ++ _pep->pep_fid.fid.fclass = FI_CLASS_PEP; ++ _pep->pep_fid.fid.context = context; ++ _pep->pep_fid.fid.ops = &fi_ibv_pep_fi_ops; ++ _pep->pep_fid.ops = &fi_ibv_pep_ops; ++ _pep->pep_fid.cm = fi_ibv_pep_ops_cm(_pep); ++ ++ _pep->src_addrlen = info->src_addrlen; ++ ++ *pep = &_pep->pep_fid; ++ return 0; ++ ++err3: ++ rdma_destroy_id(_pep->id); ++err2: ++ fi_freeinfo(_pep->info); ++err1: ++ free(_pep); ++ return ret; ++} ++ ++static struct fi_ops_ep fi_ibv_srq_ep_base_ops = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = fi_no_cancel, ++ .getopt = fi_no_getopt, ++ .setopt = fi_no_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++static struct fi_ops_cm fi_ibv_srq_cm_ops = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = fi_no_setname, ++ .getname = fi_no_getname, ++ .getpeer = fi_no_getpeer, ++ .connect = fi_no_connect, ++ .listen = fi_no_listen, ++ .accept = fi_no_accept, ++ .reject = fi_no_reject, ++ .shutdown = fi_no_shutdown, ++ .join = fi_no_join, ++}; ++ ++static struct fi_ops_rma fi_ibv_srq_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_no_rma_read, ++ .readv = fi_no_rma_readv, ++ .readmsg = fi_no_rma_readmsg, ++ .write = fi_no_rma_write, ++ .writev = fi_no_rma_writev, ++ .writemsg = fi_no_rma_writemsg, ++ .inject = fi_no_rma_inject, ++ .writedata = fi_no_rma_writedata, ++ .injectdata = fi_no_rma_injectdata, ++}; ++ ++static struct fi_ops_atomic fi_ibv_srq_atomic_ops = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = fi_no_atomic_write, ++ .writev = fi_no_atomic_writev, ++ .writemsg = fi_no_atomic_writemsg, ++ .inject = fi_no_atomic_inject, ++ .readwrite = fi_no_atomic_readwrite, ++ .readwritev = fi_no_atomic_readwritev, ++ .readwritemsg = fi_no_atomic_readwritemsg, ++ .compwrite = fi_no_atomic_compwrite, ++ .compwritev = fi_no_atomic_compwritev, ++ .compwritemsg = fi_no_atomic_compwritemsg, ++ .writevalid = fi_no_atomic_writevalid, ++ .readwritevalid = fi_no_atomic_readwritevalid, ++ .compwritevalid = fi_no_atomic_compwritevalid, ++}; ++ ++static inline ssize_t ++fi_ibv_srq_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct fi_ibv_srq_ep *ep = ++ container_of(ep_fid, struct fi_ibv_srq_ep, ep_fid); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .num_sge = msg->iov_count, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ assert(ep->srq); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_handle_post(ibv_post_srq_recv(ep->srq, &wr, &bad_wr)); ++} ++ ++static ssize_t ++fi_ibv_srq_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct fi_ibv_srq_ep *ep = ++ container_of(ep_fid, struct fi_ibv_srq_ep, ep_fid); ++ struct ibv_sge sge = fi_ibv_init_sge(buf, len, desc); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .num_sge = 1, ++ .sg_list = &sge, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ return fi_ibv_handle_post(ibv_post_srq_recv(ep->srq, &wr, &bad_wr)); ++} ++ ++static ssize_t ++fi_ibv_srq_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct fi_msg msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = src_addr, ++ .context = context, ++ }; ++ ++ return fi_ibv_srq_ep_recvmsg(ep_fid, &msg, 0); ++} ++ ++static struct fi_ops_msg fi_ibv_srq_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_ibv_srq_ep_recv, ++ .recvv = fi_ibv_srq_ep_recvv, ++ .recvmsg = fi_ibv_srq_ep_recvmsg, ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; ++ ++/* ++ * XRC SRQ semantics differ from basic SRQ semantics in that the SRQ not the ++ * QP selects which CQ will be used for receive completions. An artifact of ++ * this is that the XRC SRQ can not be created until a CQ is bound to the ++ * endpoint. This routine will be swapped out when the first endpoint bound ++ * to the shared receive context is enabled. ++ */ ++static ssize_t ++fi_ibv_xrc_srq_ep_prepost_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct fi_ibv_srq_ep *ep = ++ container_of(ep_fid, struct fi_ibv_srq_ep, ep_fid); ++ struct fi_ibv_xrc_srx_prepost *recv; ++ ssize_t ret; ++ ++ fastlock_acquire(&ep->xrc.prepost_lock); ++ ++ /* Handle race that can occur when SRQ is created and pre-post ++ * receive message function is swapped out. */ ++ if (ep->srq) { ++ fastlock_release(&ep->xrc.prepost_lock); ++ return fi_ibv_handle_post(fi_recv(ep_fid, buf, len, desc, ++ src_addr, context)); ++ } ++ ++ /* The only software error that can occur is overflow */ ++ if (OFI_UNLIKELY(ep->xrc.prepost_count >= ep->xrc.max_recv_wr)) { ++ ret = -FI_EAVAIL; ++ goto done; ++ } ++ ++ recv = calloc(1, sizeof(*recv)); ++ if (OFI_UNLIKELY(!recv)) { ++ ret = -FI_EAGAIN; ++ goto done; ++ } ++ ++ recv->buf = buf; ++ recv->desc = desc; ++ recv->src_addr = src_addr; ++ recv->len = len; ++ recv->context = context; ++ ep->xrc.prepost_count++; ++ slist_insert_tail(&recv->prepost_entry, &ep->xrc.prepost_list); ++ ret = FI_SUCCESS; ++done: ++ fastlock_release(&ep->xrc.prepost_lock); ++ return ret; ++} ++ ++static struct fi_ops_msg fi_ibv_xrc_srq_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_ibv_xrc_srq_ep_prepost_recv, ++ .recvv = fi_no_msg_recvv, /* Not used by RXM */ ++ .recvmsg = fi_no_msg_recvmsg, /* Not used by RXM */ ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; ++ ++static void fi_ibv_cleanup_prepost_bufs(struct fi_ibv_srq_ep *srq_ep) ++{ ++ struct fi_ibv_xrc_srx_prepost *recv; ++ struct slist_entry *entry; ++ ++ while (!slist_empty(&srq_ep->xrc.prepost_list)) { ++ entry = slist_remove_head(&srq_ep->xrc.prepost_list); ++ recv = container_of(entry, struct fi_ibv_xrc_srx_prepost, ++ prepost_entry); ++ free(recv); ++ } ++} ++ ++/* Must hold the associated CQ lock cq::xrc.srq_list_lock */ ++int fi_ibv_xrc_close_srq(struct fi_ibv_srq_ep *srq_ep) ++{ ++ int ret; ++ ++ assert(srq_ep->domain->use_xrc); ++ if (!srq_ep->xrc.cq || !srq_ep->srq) ++ return FI_SUCCESS; ++ ++ ret = ibv_destroy_srq(srq_ep->srq); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Cannot destroy SRQ rc=%d\n", ret); ++ return -ret; ++ } ++ srq_ep->srq = NULL; ++ srq_ep->xrc.cq = NULL; ++ dlist_remove(&srq_ep->xrc.srq_entry); ++ fi_ibv_cleanup_prepost_bufs(srq_ep); ++ ++ return FI_SUCCESS; ++} ++ ++static int fi_ibv_srq_close(fid_t fid) ++{ ++ struct fi_ibv_srq_ep *srq_ep = container_of(fid, struct fi_ibv_srq_ep, ++ ep_fid.fid); ++ int ret; ++ ++ if (srq_ep->domain->use_xrc) { ++ if (srq_ep->xrc.cq) { ++ fastlock_acquire(&srq_ep->xrc.cq->xrc.srq_list_lock); ++ ret = fi_ibv_xrc_close_srq(srq_ep); ++ fastlock_release(&srq_ep->xrc.cq->xrc.srq_list_lock); ++ if (ret) ++ goto err; ++ } ++ fastlock_destroy(&srq_ep->xrc.prepost_lock); ++ } else { ++ ret = ibv_destroy_srq(srq_ep->srq); ++ if (ret) ++ goto err; ++ } ++ free(srq_ep); ++ return FI_SUCCESS; ++ ++err: ++ VERBS_WARN(FI_LOG_EP_CTRL, "Cannot destroy SRQ rc=%d\n", ret); ++ return ret; ++} ++ ++static struct fi_ops fi_ibv_srq_ep_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = fi_ibv_srq_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++int fi_ibv_srq_context(struct fid_domain *domain, struct fi_rx_attr *attr, ++ struct fid_ep **srq_ep_fid, void *context) ++{ ++ struct ibv_srq_init_attr srq_init_attr = { 0 }; ++ struct fi_ibv_domain *dom; ++ struct fi_ibv_srq_ep *srq_ep; ++ int ret; ++ ++ if (!domain) ++ return -FI_EINVAL; ++ ++ srq_ep = calloc(1, sizeof(*srq_ep)); ++ if (!srq_ep) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ ++ dom = container_of(domain, struct fi_ibv_domain, ++ util_domain.domain_fid); ++ ++ srq_ep->ep_fid.fid.fclass = FI_CLASS_SRX_CTX; ++ srq_ep->ep_fid.fid.context = context; ++ srq_ep->ep_fid.fid.ops = &fi_ibv_srq_ep_ops; ++ srq_ep->ep_fid.ops = &fi_ibv_srq_ep_base_ops; ++ srq_ep->ep_fid.cm = &fi_ibv_srq_cm_ops; ++ srq_ep->ep_fid.rma = &fi_ibv_srq_rma_ops; ++ srq_ep->ep_fid.atomic = &fi_ibv_srq_atomic_ops; ++ srq_ep->domain = dom; ++ ++ /* XRC SRQ creation is delayed until the first endpoint it is bound ++ * to is enabled.*/ ++ if (dom->use_xrc) { ++ fastlock_init(&srq_ep->xrc.prepost_lock); ++ slist_init(&srq_ep->xrc.prepost_list); ++ dlist_init(&srq_ep->xrc.srq_entry); ++ srq_ep->xrc.max_recv_wr = attr->size; ++ srq_ep->xrc.max_sge = attr->iov_limit; ++ srq_ep->ep_fid.msg = &fi_ibv_xrc_srq_msg_ops; ++ goto done; ++ } ++ ++ srq_ep->ep_fid.msg = &fi_ibv_srq_msg_ops; ++ srq_init_attr.attr.max_wr = attr->size; ++ srq_init_attr.attr.max_sge = attr->iov_limit; ++ ++ srq_ep->srq = ibv_create_srq(dom->pd, &srq_init_attr); ++ if (!srq_ep->srq) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_create_srq", errno); ++ ret = -errno; ++ goto err2; ++ } ++ ++done: ++ *srq_ep_fid = &srq_ep->ep_fid; ++ ++ return FI_SUCCESS; ++ ++err2: ++ /* Only basic SRQ can take this path */ ++ free(srq_ep); ++err1: ++ return ret; ++} ++ ++ ++#define fi_ibv_atomicvalid(name, flags) \ ++static int fi_ibv_msg_ep_atomic_ ## name(struct fid_ep *ep_fid, \ ++ enum fi_datatype datatype, \ ++ enum fi_op op, size_t *count) \ ++{ \ ++ struct fi_ibv_ep *ep = container_of(ep_fid, struct fi_ibv_ep, \ ++ util_ep.ep_fid); \ ++ struct fi_atomic_attr attr; \ ++ int ret; \ ++ \ ++ ret = fi_ibv_query_atomic(&ep->util_ep.domain->domain_fid, \ ++ datatype, op, &attr, flags); \ ++ if (!ret) \ ++ *count = attr.count; \ ++ return ret; \ ++} ++ ++fi_ibv_atomicvalid(writevalid, 0); ++fi_ibv_atomicvalid(readwritevalid, FI_FETCH_ATOMIC); ++fi_ibv_atomicvalid(compwritevalid, FI_COMPARE_ATOMIC); ++ ++int fi_ibv_query_atomic(struct fid_domain *domain_fid, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, ++ uint64_t flags) ++{ ++ struct fi_ibv_domain *domain = container_of(domain_fid, ++ struct fi_ibv_domain, ++ util_domain.domain_fid); ++ char *log_str_fetch = "fi_fetch_atomic with FI_SUM op"; ++ char *log_str_comp = "fi_compare_atomic"; ++ char *log_str; ++ ++ if (flags & FI_TAGGED) ++ return -FI_ENOSYS; ++ ++ if ((flags & FI_FETCH_ATOMIC) && (flags & FI_COMPARE_ATOMIC)) ++ return -FI_EBADFLAGS; ++ ++ if (!flags) { ++ switch (op) { ++ case FI_ATOMIC_WRITE: ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ } else { ++ if (flags & FI_FETCH_ATOMIC) { ++ switch (op) { ++ case FI_ATOMIC_READ: ++ goto check_datatype; ++ case FI_SUM: ++ log_str = log_str_fetch; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ } else if (flags & FI_COMPARE_ATOMIC) { ++ if (op != FI_CSWAP) ++ return -FI_ENOSYS; ++ log_str = log_str_comp; ++ } else { ++ return -FI_EBADFLAGS; ++ } ++ if (domain->info->tx_attr->op_flags & FI_INJECT) { ++ VERBS_INFO(FI_LOG_EP_DATA, ++ "FI_INJECT not supported for %s\n", log_str); ++ return -FI_EINVAL; ++ } ++ } ++check_datatype: ++ switch (datatype) { ++ case FI_INT64: ++ case FI_UINT64: ++#if __BITS_PER_LONG == 64 ++ case FI_DOUBLE: ++ case FI_FLOAT: ++#endif ++ break; ++ default: ++ return -FI_EINVAL; ++ } ++ ++ attr->size = ofi_datatype_size(datatype); ++ if (attr->size == 0) ++ return -FI_EINVAL; ++ ++ attr->count = 1; ++ return 0; ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)(uintptr_t)key, ++ .send_flags = VERBS_INJECT(ep, sizeof(uint64_t)) | ++ IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ if (OFI_UNLIKELY(op != FI_ATOMIC_WRITE)) ++ return -FI_ENOSYS; ++ ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, datatype, op, &count_copy); ++ if (ret) ++ return ret; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, sizeof(uint64_t), desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_writev(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ if (OFI_UNLIKELY(iov->count != 1)) ++ return -FI_E2BIG; ++ ++ return fi_ibv_msg_ep_atomic_write(ep, iov->addr, count, desc[0], ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(ep, flags, (uintptr_t)msg->context), ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, ++ .send_flags = VERBS_INJECT_FLAGS(ep, sizeof(uint64_t), flags) | ++ IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ if (OFI_UNLIKELY(msg->op != FI_ATOMIC_WRITE)) ++ return -FI_ENOSYS; ++ ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_RDMA_WRITE; ++ } ++ ++ return fi_ibv_send_buf(ep, &wr, msg->msg_iov->addr, sizeof(uint64_t), ++ msg->desc[0]); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, datatype, op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ switch (op) { ++ case FI_ATOMIC_READ: ++ wr.opcode = IBV_WR_RDMA_READ; ++ wr.wr.rdma.remote_addr = addr; ++ wr.wr.rdma.rkey = (uint32_t)(uintptr_t)key; ++ break; ++ case FI_SUM: ++ wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; ++ wr.wr.atomic.remote_addr = addr; ++ wr.wr.atomic.compare_add = (uintptr_t)buf; ++ wr.wr.atomic.swap = 0; ++ wr.wr.atomic.rkey = (uint32_t)(uintptr_t)key; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ return fi_ibv_send_buf(ep, &wr, result, sizeof(uint64_t), result_desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_readwritev(struct fid_ep *ep, const struct fi_ioc *iov, ++ void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ if (OFI_UNLIKELY(iov->count != 1)) ++ return -FI_E2BIG; ++ ++ return fi_ibv_msg_ep_atomic_readwrite(ep, iov->addr, count, ++ desc[0], resultv->addr, result_desc[0], ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_readwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(ep, flags, (uintptr_t)msg->context), ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ switch (msg->op) { ++ case FI_ATOMIC_READ: ++ wr.opcode = IBV_WR_RDMA_READ; ++ wr.wr.rdma.remote_addr = msg->rma_iov->addr; ++ wr.wr.rdma.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; ++ break; ++ case FI_SUM: ++ wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; ++ wr.wr.atomic.remote_addr = msg->rma_iov->addr; ++ wr.wr.atomic.compare_add = (uintptr_t) msg->addr; ++ wr.wr.atomic.swap = 0; ++ wr.wr.atomic.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ if (flags & FI_REMOTE_CQ_DATA) ++ wr.imm_data = htonl((uint32_t) msg->data); ++ ++ return fi_ibv_send_buf(ep, &wr, resultv->addr, ++ sizeof(uint64_t), result_desc[0]); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, const void *compare, ++ void *compare_desc, void *result, ++ void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, ++ .wr.atomic.remote_addr = addr, ++ .wr.atomic.compare_add = (uintptr_t)compare, ++ .wr.atomic.swap = (uintptr_t)buf, ++ .wr.atomic.rkey = (uint32_t)(uintptr_t)key, ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, datatype, op, &count_copy); ++ if (ret) ++ return ret; ++ ++ return fi_ibv_send_buf(ep, &wr, result, sizeof(uint64_t), result_desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_compwritev(struct fid_ep *ep, const struct fi_ioc *iov, ++ void **desc, size_t count, ++ const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ if (OFI_UNLIKELY(iov->count != 1)) ++ return -FI_E2BIG; ++ ++ return fi_ibv_msg_ep_atomic_compwrite(ep, iov->addr, count, desc[0], ++ comparev->addr, compare_desc[0], resultv->addr, ++ result_desc[0], dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_compwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(ep, flags, (uintptr_t)msg->context), ++ .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, ++ .wr.atomic.remote_addr = msg->rma_iov->addr, ++ .wr.atomic.compare_add = (uintptr_t)comparev->addr, ++ .wr.atomic.swap = (uintptr_t)msg->addr, ++ .wr.atomic.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ if (flags & FI_REMOTE_CQ_DATA) ++ wr.imm_data = htonl((uint32_t) msg->data); ++ ++ return fi_ibv_send_buf(ep, &wr, resultv->addr, sizeof(uint64_t), ++ result_desc[0]); ++} ++ ++struct fi_ops_atomic fi_ibv_msg_ep_atomic_ops = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = fi_ibv_msg_ep_atomic_write, ++ .writev = fi_ibv_msg_ep_atomic_writev, ++ .writemsg = fi_ibv_msg_ep_atomic_writemsg, ++ .inject = fi_no_atomic_inject, ++ .readwrite = fi_ibv_msg_ep_atomic_readwrite, ++ .readwritev = fi_ibv_msg_ep_atomic_readwritev, ++ .readwritemsg = fi_ibv_msg_ep_atomic_readwritemsg, ++ .compwrite = fi_ibv_msg_ep_atomic_compwrite, ++ .compwritev = fi_ibv_msg_ep_atomic_compwritev, ++ .compwritemsg = fi_ibv_msg_ep_atomic_compwritemsg, ++ .writevalid = fi_ibv_msg_ep_atomic_writevalid, ++ .readwritevalid = fi_ibv_msg_ep_atomic_readwritevalid, ++ .compwritevalid = fi_ibv_msg_ep_atomic_compwritevalid ++}; ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_write(struct fid_ep *ep_fid, const void *buf, ++ size_t count, void *desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)(uintptr_t)key, ++ .send_flags = VERBS_INJECT(&ep->base_ep, sizeof(uint64_t)) | ++ IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ if (OFI_UNLIKELY(op != FI_ATOMIC_WRITE)) ++ return -FI_ENOSYS; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, datatype, op, &count_copy); ++ if (ret) ++ return ret; ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, sizeof(uint64_t), desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(&ep->base_ep, flags, ++ (uintptr_t)msg->context), ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, ++ .send_flags = VERBS_INJECT_FLAGS(&ep->base_ep, ++ sizeof(uint64_t), flags) | IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ if (OFI_UNLIKELY(msg->op != FI_ATOMIC_WRITE)) ++ return -FI_ENOSYS; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_RDMA_WRITE; ++ } ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, msg->msg_iov->addr, ++ sizeof(uint64_t), msg->desc[0]); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, ++ size_t count, void *desc, void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, datatype, op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ switch (op) { ++ case FI_ATOMIC_READ: ++ wr.opcode = IBV_WR_RDMA_READ; ++ wr.wr.rdma.remote_addr = addr; ++ wr.wr.rdma.rkey = (uint32_t)(uintptr_t)key; ++ break; ++ case FI_SUM: ++ wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; ++ wr.wr.atomic.remote_addr = addr; ++ wr.wr.atomic.compare_add = (uintptr_t)buf; ++ wr.wr.atomic.swap = 0; ++ wr.wr.atomic.rkey = (uint32_t)(uintptr_t)key; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, result, ++ sizeof(uint64_t), result_desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_readwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(&ep->base_ep, flags, ++ (uintptr_t)msg->context), ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ switch (msg->op) { ++ case FI_ATOMIC_READ: ++ wr.opcode = IBV_WR_RDMA_READ; ++ wr.wr.rdma.remote_addr = msg->rma_iov->addr; ++ wr.wr.rdma.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; ++ break; ++ case FI_SUM: ++ wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; ++ wr.wr.atomic.remote_addr = msg->rma_iov->addr; ++ wr.wr.atomic.compare_add = (uintptr_t) msg->addr; ++ wr.wr.atomic.swap = 0; ++ wr.wr.atomic.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ if (flags & FI_REMOTE_CQ_DATA) ++ wr.imm_data = htonl((uint32_t) msg->data); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, resultv->addr, ++ sizeof(uint64_t), result_desc[0]); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, const void *compare, ++ void *compare_desc, void *result, ++ void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, ++ .wr.atomic.remote_addr = addr, ++ .wr.atomic.compare_add = (uintptr_t)compare, ++ .wr.atomic.swap = (uintptr_t)buf, ++ .wr.atomic.rkey = (uint32_t)(uintptr_t)key, ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, datatype, op, &count_copy); ++ if (ret) ++ return ret; ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, result, ++ sizeof(uint64_t), result_desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_compwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(&ep->base_ep, flags, ++ (uintptr_t)msg->context), ++ .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, ++ .wr.atomic.remote_addr = msg->rma_iov->addr, ++ .wr.atomic.compare_add = (uintptr_t)comparev->addr, ++ .wr.atomic.swap = (uintptr_t)msg->addr, ++ .wr.atomic.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ if (flags & FI_REMOTE_CQ_DATA) ++ wr.imm_data = htonl((uint32_t) msg->data); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, resultv->addr, ++ sizeof(uint64_t), result_desc[0]); ++} ++ ++struct fi_ops_atomic fi_ibv_msg_xrc_ep_atomic_ops = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = fi_ibv_msg_xrc_ep_atomic_write, ++ .writev = fi_ibv_msg_ep_atomic_writev, ++ .writemsg = fi_ibv_msg_xrc_ep_atomic_writemsg, ++ .inject = fi_no_atomic_inject, ++ .readwrite = fi_ibv_msg_xrc_ep_atomic_readwrite, ++ .readwritev = fi_ibv_msg_ep_atomic_readwritev, ++ .readwritemsg = fi_ibv_msg_xrc_ep_atomic_readwritemsg, ++ .compwrite = fi_ibv_msg_xrc_ep_atomic_compwrite, ++ .compwritev = fi_ibv_msg_ep_atomic_compwritev, ++ .compwritemsg = fi_ibv_msg_xrc_ep_atomic_compwritemsg, ++ .writevalid = fi_ibv_msg_ep_atomic_writevalid, ++ .readwritevalid = fi_ibv_msg_ep_atomic_readwritevalid, ++ .compwritevalid = fi_ibv_msg_ep_atomic_compwritevalid ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_eq.c +index 911dc95..157ccc3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_eq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_eq.c +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2018 Cray Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -52,32 +53,92 @@ static ssize_t + fi_ibv_eq_readerr(struct fid_eq *eq, struct fi_eq_err_entry *entry, + uint64_t flags) + { +- struct fi_ibv_eq *_eq; +- uint32_t api_version; +- void *err_data = NULL; +- size_t err_data_size = 0; ++ struct fi_ibv_eq *_eq = ++ container_of(eq, struct fi_ibv_eq, eq_fid.fid); ++ ofi_eq_handle_err_entry(_eq->fab->util_fabric.fabric_fid.api_version, ++ flags, &_eq->err, entry); ++ return sizeof(*entry); ++} + +- _eq = container_of(eq, struct fi_ibv_eq, eq_fid.fid); +- if (!_eq->err.err) +- return 0; ++void fi_ibv_eq_set_xrc_conn_tag(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_eq *eq = ep->base_ep.eq; + +- api_version = _eq->fab->util_fabric.fabric_fid.api_version; ++ fastlock_acquire(&eq->lock); ++ ep->conn_setup->conn_tag = ++ (uint32_t)ofi_idx2key(&eq->xrc.conn_key_idx, ++ ofi_idx_insert(eq->xrc.conn_key_map, ep)); ++ fastlock_release(&eq->lock); ++} + +- if ((FI_VERSION_GE(api_version, FI_VERSION(1, 5))) +- && entry->err_data && entry->err_data_size) { +- err_data_size = MIN(entry->err_data_size, _eq->err.err_data_size); +- err_data = _eq->err.err_data; +- } ++void fi_ibv_eq_clear_xrc_conn_tag(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_eq *eq = ep->base_ep.eq; ++ int index; + +- *entry = _eq->err; +- if (err_data) { +- memcpy(entry->err_data, err_data, err_data_size); +- entry->err_data_size = err_data_size; +- } ++ fastlock_acquire(&eq->lock); ++ index = ofi_key2idx(&eq->xrc.conn_key_idx, ++ (uint64_t)ep->conn_setup->conn_tag); ++ if (!ofi_idx_is_valid(eq->xrc.conn_key_map, index)) ++ VERBS_WARN(FI_LOG_EQ, "Invalid XRC connection connection tag\n"); ++ else ++ ofi_idx_remove(eq->xrc.conn_key_map, index); ++ ep->conn_setup->conn_tag = 0; ++ fastlock_release(&eq->lock); ++} + +- _eq->err.err = 0; +- _eq->err.prov_errno = 0; +- return sizeof(*entry); ++struct fi_ibv_xrc_ep *fi_ibv_eq_xrc_conn_tag2ep(struct fi_ibv_eq *eq, ++ uint32_t conn_tag) ++{ ++ struct fi_ibv_xrc_ep *ep; ++ int index; ++ ++ fastlock_acquire(&eq->lock); ++ index = ofi_key2idx(&eq->xrc.conn_key_idx, (uint64_t)conn_tag); ++ ep = ofi_idx_lookup(eq->xrc.conn_key_map, index); ++ if (!ep) ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Invalid XRC connection tag\n"); ++ fastlock_release(&eq->lock); ++ ++ return ep; ++} ++ ++static int fi_ibv_eq_set_xrc_info(struct rdma_cm_event *event, ++ struct fi_ibv_xrc_conn_info *info) ++{ ++ struct fi_ibv_xrc_cm_data *remote = (struct fi_ibv_xrc_cm_data *) ++ event->param.conn.private_data; ++ int ret; ++ ++ ret = fi_ibv_verify_xrc_cm_data(remote, ++ event->param.conn.private_data_len); ++ if (ret) ++ return ret; ++ ++ info->is_reciprocal = remote->reciprocal; ++ info->conn_tag = ntohl(remote->conn_tag); ++ info->port = ntohs(remote->port); ++ info->conn_data = ntohl(remote->param); ++ info->conn_param = event->param.conn; ++ info->conn_param.private_data = NULL; ++ info->conn_param.private_data_len = 0; ++ ++ return FI_SUCCESS; ++} ++ ++static int ++fi_ibv_pep_dev_domain_match(struct fi_info *hints, const char *devname) ++{ ++ int ret; ++ ++ if ((FI_IBV_EP_PROTO(hints)) == FI_PROTO_RDMA_CM_IB_XRC) ++ ret = fi_ibv_cmp_xrc_domain_name(hints->domain_attr->name, ++ devname); ++ else ++ ret = strcmp(hints->domain_attr->name, devname); ++ ++ return ret; + } + + static int +@@ -102,7 +163,7 @@ fi_ibv_eq_cm_getinfo(struct fi_ibv_fabric *fab, struct rdma_cm_event *event, + if (!(hints->domain_attr->name = strdup(devname))) + goto err1; + } else { +- if (strcmp(hints->domain_attr->name, devname)) { ++ if (fi_ibv_pep_dev_domain_match(hints, devname)) { + VERBS_WARN(FI_LOG_EQ, "Passive endpoint domain: %s does" + " not match device: %s where we got a " + "connection request\n", +@@ -144,9 +205,20 @@ fi_ibv_eq_cm_getinfo(struct fi_ibv_fabric *fab, struct rdma_cm_event *event, + + connreq->handle.fclass = FI_CLASS_CONNREQ; + connreq->id = event->id; ++ ++ if (fi_ibv_is_xrc(*info)) { ++ connreq->is_xrc = 1; ++ ret = fi_ibv_eq_set_xrc_info(event, &connreq->xrc); ++ if (ret) ++ goto err3; ++ } ++ + (*info)->handle = &connreq->handle; + fi_freeinfo(hints); + return 0; ++ ++err3: ++ free(connreq); + err2: + fi_freeinfo(*info); + err1: +@@ -154,20 +226,268 @@ err1: + return ret; + } + ++static inline int fi_ibv_eq_copy_event_data(struct fi_eq_cm_entry *entry, ++ size_t max_dest_len, const void *priv_data, ++ size_t priv_datalen) ++{ ++ const struct fi_ibv_cm_data_hdr *cm_hdr = priv_data; ++ ++ size_t datalen = MIN(max_dest_len - sizeof(*entry), cm_hdr->size); ++ if (datalen) ++ memcpy(entry->data, cm_hdr->data, datalen); ++ ++ return datalen; ++} ++ ++static void fi_ibv_eq_skip_xrc_cm_data(const void **priv_data, ++ size_t *priv_data_len) ++{ ++ const struct fi_ibv_xrc_cm_data *cm_data = *priv_data; ++ ++ if (*priv_data_len > sizeof(*cm_data)) { ++ *priv_data = (cm_data + 1); ++ *priv_data_len -= sizeof(*cm_data); ++ } ++} ++ ++static int ++fi_ibv_eq_xrc_connreq_event(struct fi_ibv_eq *eq, struct fi_eq_cm_entry *entry, ++ const void **priv_data, size_t *priv_datalen) ++{ ++ struct fi_ibv_connreq *connreq = container_of(entry->info->handle, ++ struct fi_ibv_connreq, handle); ++ struct fi_ibv_xrc_ep *ep; ++ struct fi_ibv_xrc_cm_data cm_data; ++ int ret; ++ ++ if (!connreq->xrc.is_reciprocal) { ++ fi_ibv_eq_skip_xrc_cm_data(priv_data, priv_datalen); ++ return FI_SUCCESS; ++ } ++ ++ /* ++ * Reciprocal connections are initiated and handled internally by ++ * the provider, get the endpoint that issued the original connection ++ * request. ++ */ ++ ep = fi_ibv_eq_xrc_conn_tag2ep(eq, connreq->xrc.conn_tag); ++ if (!ep) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Reciprocal XRC connection tag not found\n"); ++ goto send_reject; ++ } ++ ep->tgt_id = connreq->id; ++ ep->tgt_id->context = &ep->base_ep.util_ep.ep_fid.fid; ++ ep->base_ep.info->handle = entry->info->handle; ++ ++ ret = rdma_migrate_id(ep->tgt_id, ep->base_ep.eq->channel); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, "Could not migrate CM ID\n"); ++ goto send_reject; ++ } ++ ++ ret = fi_ibv_accept_xrc(ep, FI_IBV_RECIP_CONN, &cm_data, ++ sizeof(cm_data)); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Reciprocal XRC Accept failed %d\n", ret); ++ goto send_reject; ++ } ++ /* Event is handled internally and not passed to the application */ ++ return -FI_EAGAIN; ++ ++send_reject: ++ if (rdma_reject(connreq->id, *priv_data, *priv_datalen)) ++ VERBS_WARN(FI_LOG_FABRIC, "rdma_reject %d\n", -errno); ++ return -FI_EAGAIN; ++} ++ ++static int ++fi_ibv_eq_xrc_conn_event(struct fi_ibv_xrc_ep *ep, ++ struct rdma_cm_event *cma_event, ++ struct fi_eq_cm_entry *entry) ++{ ++ struct fi_ibv_xrc_conn_info xrc_info; ++ struct fi_ibv_xrc_cm_data cm_data; ++ const void *priv_data = cma_event->param.conn.private_data; ++ size_t priv_datalen = cma_event->param.conn.private_data_len; ++ int ret; ++ ++ VERBS_DBG(FI_LOG_FABRIC, "EP %p INITIAL CONNECTION DONE state %d\n", ++ ep, ep->conn_state); ++ fi_ibv_next_xrc_conn_state(ep); ++ ++ /* ++ * Original application initiated connect is done, if the passive ++ * side of that connection initiate the reciprocal connection request ++ * to create bidirectional connectivity. ++ */ ++ if (priv_data) { ++ ret = fi_ibv_eq_set_xrc_info(cma_event, &xrc_info); ++ if (ret) { ++ fi_ibv_prev_xrc_conn_state(ep); ++ rdma_disconnect(ep->base_ep.id); ++ goto err; ++ } ++ ep->peer_srqn = xrc_info.conn_data; ++ fi_ibv_ep_ini_conn_done(ep, xrc_info.conn_data, ++ xrc_info.conn_param.qp_num); ++ fi_ibv_eq_skip_xrc_cm_data(&priv_data, &priv_datalen); ++ fi_ibv_save_priv_data(ep, priv_data, priv_datalen); ++ } else { ++ fi_ibv_ep_tgt_conn_done(ep); ++ ret = fi_ibv_connect_xrc(ep, NULL, FI_IBV_RECIP_CONN, &cm_data, ++ sizeof(cm_data)); ++ if (ret) { ++ fi_ibv_prev_xrc_conn_state(ep); ++ rdma_disconnect(ep->tgt_id); ++ goto err; ++ } ++ } ++err: ++ entry->info = NULL; ++ /* Event is handled internally and not passed to the application */ ++ return -FI_EAGAIN; ++} ++ ++static size_t ++fi_ibv_eq_xrc_recip_conn_event(struct fi_ibv_eq *eq, ++ struct fi_ibv_xrc_ep *ep, ++ struct rdma_cm_event *cma_event, ++ struct fi_eq_cm_entry *entry, size_t len) ++{ ++ fid_t fid = cma_event->id->context; ++ struct fi_ibv_xrc_conn_info xrc_info; ++ int ret; ++ ++ fi_ibv_next_xrc_conn_state(ep); ++ VERBS_DBG(FI_LOG_FABRIC, "EP %p RECIPROCAL CONNECTION DONE state %d\n", ++ ep, ep->conn_state); ++ ++ /* If this is the reciprocal active side notification */ ++ if (cma_event->param.conn.private_data) { ++ ret = fi_ibv_eq_set_xrc_info(cma_event, &xrc_info); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Reciprocal connection protocol mismatch\n"); ++ eq->err.err = -ret; ++ eq->err.prov_errno = ret; ++ eq->err.fid = fid; ++ return -FI_EAVAIL; ++ } ++ ++ ep->peer_srqn = xrc_info.conn_data; ++ fi_ibv_ep_ini_conn_done(ep, xrc_info.conn_data, ++ xrc_info.conn_param.qp_num); ++ } else { ++ fi_ibv_ep_tgt_conn_done(ep); ++ } ++ ++ /* The internal reciprocal XRC connection has completed. Return the ++ * CONNECTED event application data associated with the original ++ * connection. */ ++ entry->fid = fid; ++ len = fi_ibv_eq_copy_event_data(entry, len, ++ ep->conn_setup->event_data, ++ ep->conn_setup->event_len); ++ entry->info = NULL; ++ return sizeof(*entry) + len; ++} ++ ++static int ++fi_ibv_eq_xrc_rej_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event) ++{ ++ struct fi_ibv_xrc_ep *ep; ++ fid_t fid = cma_event->id->context; ++ struct fi_ibv_xrc_conn_info xrc_info; ++ enum fi_ibv_xrc_ep_conn_state state; ++ ++ ep = container_of(fid, struct fi_ibv_xrc_ep, base_ep.util_ep.ep_fid); ++ state = ep->conn_state; ++ ++ if (ep->base_ep.id != cma_event->id || state == FI_IBV_XRC_CONNECTED) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Stale CM Reject %d received\n", cma_event->status); ++ return -FI_EAGAIN; ++ } ++ ++ /* If reject comes from remote provider peer */ ++ if (cma_event->status == FI_IBV_CM_REJ_CONSUMER_DEFINED) { ++ if (cma_event->param.conn.private_data_len && ++ fi_ibv_eq_set_xrc_info(cma_event, &xrc_info)) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "CM REJ private data not valid\n"); ++ return -FI_EAGAIN; ++ } ++ ++ fi_ibv_ep_ini_conn_rejected(ep); ++ return FI_SUCCESS; ++ } ++ ++ VERBS_WARN(FI_LOG_FABRIC, "Non-application generated CM Reject %d\n", ++ cma_event->status); ++ if (cma_event->param.conn.private_data_len) ++ VERBS_WARN(FI_LOG_FABRIC, "Unexpected CM Reject priv_data\n"); ++ ++ fi_ibv_ep_ini_conn_rejected(ep); ++ ++ return state == FI_IBV_XRC_ORIG_CONNECTING ? FI_SUCCESS : -FI_EAGAIN; ++} ++ ++static inline int ++fi_ibv_eq_xrc_connected_event(struct fi_ibv_eq *eq, ++ struct rdma_cm_event *cma_event, ++ struct fi_eq_cm_entry *entry, size_t len, ++ int *acked) ++{ ++ struct fi_ibv_xrc_ep *ep; ++ fid_t fid = cma_event->id->context; ++ int ret; ++ ++ ep = container_of(fid, struct fi_ibv_xrc_ep, base_ep.util_ep.ep_fid); ++ ++ assert(ep->conn_state == FI_IBV_XRC_ORIG_CONNECTING || ++ ep->conn_state == FI_IBV_XRC_RECIP_CONNECTING); ++ ++ if (ep->conn_state == FI_IBV_XRC_ORIG_CONNECTING) ++ return fi_ibv_eq_xrc_conn_event(ep, cma_event, entry); ++ ++ ret = fi_ibv_eq_xrc_recip_conn_event(eq, ep, cma_event, entry, len); ++ ++ /* Bidirectional connection setup is complete, destroy RDMA CM ++ * ID(s) since RDMA CM is used for connection setup only */ ++ *acked = 1; ++ rdma_ack_cm_event(cma_event); ++ ++ /* TODO: Ultimately we will want to initiate freeing of the connection ++ * resources here with fi_ibv_free_xrc_conn_setup(ep); however, timewait ++ * issues in larger fabrics need to be resolved first. The resources ++ * will be freed at EP close if not freed here */ ++ ++ return ret; ++} ++ + static ssize_t +-fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event, +- uint32_t *event, struct fi_eq_cm_entry *entry, size_t len) ++fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, ++ struct rdma_cm_event *cma_event, uint32_t *event, ++ struct fi_eq_cm_entry *entry, size_t len, int *acked) + { +- struct fi_ibv_pep *pep; +- fid_t fid; +- size_t datalen; ++ const struct fi_ibv_cm_data_hdr *cm_hdr; ++ size_t datalen = 0; ++ size_t priv_datalen = cma_event->param.conn.private_data_len; ++ const void *priv_data = cma_event->param.conn.private_data; + int ret; ++ fid_t fid = cma_event->id->context; ++ struct fi_ibv_pep *pep = ++ container_of(fid, struct fi_ibv_pep, pep_fid); ++ struct fi_ibv_ep *ep; ++ ++ *acked = 0; + +- fid = cma_event->id->context; +- pep = container_of(fid, struct fi_ibv_pep, pep_fid); + switch (cma_event->event) { + case RDMA_CM_EVENT_CONNECT_REQUEST: + *event = FI_CONNREQ; ++ + ret = fi_ibv_eq_cm_getinfo(eq->fab, cma_event, pep->info, &entry->info); + if (ret) { + rdma_destroy_id(cma_event->id); +@@ -177,18 +497,34 @@ fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event + eq->err.prov_errno = ret; + goto err; + } ++ ++ if (fi_ibv_is_xrc(entry->info)) { ++ ret = fi_ibv_eq_xrc_connreq_event(eq, entry, &priv_data, ++ &priv_datalen); ++ if (ret == -FI_EAGAIN) ++ return ret; ++ } + break; + case RDMA_CM_EVENT_ESTABLISHED: + *event = FI_CONNECTED; +- entry->info = NULL; +- if (cma_event->id->qp->context->device->transport_type != ++ ++ if (cma_event->id->qp && ++ cma_event->id->qp->context->device->transport_type != + IBV_TRANSPORT_IWARP) { + ret = fi_ibv_set_rnr_timer(cma_event->id->qp); + if (ret) + return ret; + } ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid); ++ if (fi_ibv_is_xrc(ep->info)) ++ return fi_ibv_eq_xrc_connected_event(eq, cma_event, ++ entry, len, acked); ++ entry->info = NULL; + break; + case RDMA_CM_EVENT_DISCONNECTED: ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid); ++ if (fi_ibv_is_xrc(ep->info)) ++ return -FI_EAGAIN; + *event = FI_SHUTDOWN; + entry->info = NULL; + break; +@@ -199,8 +535,29 @@ fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event + eq->err.err = -cma_event->status; + goto err; + case RDMA_CM_EVENT_REJECTED: ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid); ++ if (fi_ibv_is_xrc(ep->info)) { ++ ret = fi_ibv_eq_xrc_rej_event(eq, cma_event); ++ if (ret == -FI_EAGAIN) ++ return ret; ++ fi_ibv_eq_skip_xrc_cm_data(&priv_data, &priv_datalen); ++ } + eq->err.err = ECONNREFUSED; + eq->err.prov_errno = -cma_event->status; ++ if (eq->err.err_data) { ++ free(eq->err.err_data); ++ eq->err.err_data = NULL; ++ eq->err.err_data_size = 0; ++ } ++ if (priv_datalen) { ++ cm_hdr = priv_data; ++ eq->err.err_data = calloc(1, cm_hdr->size); ++ if (OFI_LIKELY(eq->err.err_data != NULL)) { ++ memcpy(eq->err.err_data, cm_hdr->data, ++ cm_hdr->size); ++ eq->err.err_data_size = cm_hdr->size; ++ } ++ } + goto err; + case RDMA_CM_EVENT_DEVICE_REMOVAL: + eq->err.err = ENODEV; +@@ -213,9 +570,11 @@ fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event + } + + entry->fid = fid; +- datalen = MIN(len - sizeof(*entry), cma_event->param.conn.private_data_len); +- if (datalen) +- memcpy(entry->data, cma_event->param.conn.private_data, datalen); ++ ++ /* rdmacm has no way to track how much data is sent by peer */ ++ if (priv_datalen) ++ datalen = fi_ibv_eq_copy_event_data(entry, len, priv_data, ++ priv_datalen); + return sizeof(*entry) + datalen; + err: + eq->err.fid = fid; +@@ -223,7 +582,7 @@ err: + } + + ssize_t fi_ibv_eq_write_event(struct fi_ibv_eq *eq, uint32_t event, +- const void *buf, size_t len) ++ const void *buf, size_t len) + { + struct fi_ibv_eq_entry *entry; + +@@ -292,6 +651,7 @@ fi_ibv_eq_read(struct fid_eq *eq_fid, uint32_t *event, + struct fi_ibv_eq *eq; + struct rdma_cm_event *cma_event; + ssize_t ret = 0; ++ int acked; + + eq = container_of(eq_fid, struct fi_ibv_eq, eq_fid.fid); + +@@ -306,20 +666,23 @@ fi_ibv_eq_read(struct fid_eq *eq_fid, uint32_t *event, + if (ret) + return -errno; + ++ acked = 0; + if (len < sizeof(struct fi_eq_cm_entry)) { + ret = -FI_ETOOSMALL; + goto ack; + } + + ret = fi_ibv_eq_cm_process_event(eq, cma_event, event, +- (struct fi_eq_cm_entry *)buf, len); ++ (struct fi_eq_cm_entry *)buf, len, &acked); + if (ret < 0) + goto ack; + + if (flags & FI_PEEK) + ret = fi_ibv_eq_write_event(eq, *event, buf, len); + ack: +- rdma_ack_cm_event(cma_event); ++ if (!acked) ++ rdma_ack_cm_event(cma_event); ++ + return ret; + } + +@@ -410,6 +773,9 @@ static int fi_ibv_eq_close(fid_t fid) + } + + dlistfd_head_free(&eq->list_head); ++ ++ ofi_idx_reset(eq->xrc.conn_key_map); ++ free(eq->xrc.conn_key_map); + fastlock_destroy(&eq->lock); + free(eq); + +@@ -438,6 +804,12 @@ int fi_ibv_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, + _eq->fab = container_of(fabric, struct fi_ibv_fabric, + util_fabric.fabric_fid); + ++ ofi_key_idx_init(&_eq->xrc.conn_key_idx, VERBS_TAG_INDEX_BITS); ++ _eq->xrc.conn_key_map = calloc(1, sizeof(*_eq->xrc.conn_key_map)); ++ if (!_eq->xrc.conn_key_map) { ++ ret = -ENOMEM; ++ goto err0; ++ } + fastlock_init(&_eq->lock); + ret = dlistfd_head_init(&_eq->list_head); + if (ret) { +@@ -502,6 +874,8 @@ err2: + dlistfd_head_free(&_eq->list_head); + err1: + fastlock_destroy(&_eq->lock); ++ free(_eq->xrc.conn_key_map); ++err0: + free(_eq); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_info.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_info.c +index 65ebdc0..475e809 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_info.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_info.c +@@ -34,9 +34,9 @@ + + #include + #include ++#include + + #include "fi_verbs.h" +-#include "ep_rdm/verbs_rdm.h" + + + #define VERBS_IB_PREFIX "IB-0x" +@@ -47,23 +47,15 @@ + #define VERBS_MSG_CAPS (FI_MSG | FI_RMA | FI_ATOMICS | FI_READ | FI_WRITE | \ + FI_SEND | FI_RECV | FI_REMOTE_READ | FI_REMOTE_WRITE | \ + VERBS_DOMAIN_CAPS) +-#define VERBS_RDM_CAPS (FI_MSG | FI_RMA | FI_TAGGED | FI_READ | FI_WRITE | \ +- FI_RECV | FI_MULTI_RECV | FI_SEND | FI_REMOTE_READ | \ +- FI_REMOTE_WRITE | VERBS_DOMAIN_CAPS) + #define VERBS_DGRAM_CAPS (FI_MSG | FI_RECV | FI_SEND | VERBS_DOMAIN_CAPS) + +-#define VERBS_RDM_MODE (FI_CONTEXT) ++#define VERBS_DGRAM_RX_MODE (FI_MSG_PREFIX) + + #define VERBS_TX_OP_FLAGS (FI_INJECT | FI_COMPLETION | FI_TRANSMIT_COMPLETE) + #define VERBS_TX_OP_FLAGS_IWARP (FI_INJECT | FI_COMPLETION) +-#define VERBS_TX_OP_FLAGS_IWARP_RDM (VERBS_TX_OP_FLAGS) +- +-#define VERBS_TX_RDM_MODE VERBS_RDM_MODE + + #define VERBS_RX_MODE (FI_RX_CQ_DATA) + +-#define VERBS_RX_RDM_OP_FLAGS (FI_COMPLETION) +- + #define VERBS_MSG_ORDER (FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_RAS | \ + FI_ORDER_WAW | FI_ORDER_WAS | FI_ORDER_SAW | FI_ORDER_SAS ) + +@@ -92,8 +84,9 @@ const struct fi_domain_attr verbs_domain_attr = { + .max_ep_tx_ctx = 1, + .max_ep_rx_ctx = 1, + .mr_iov_limit = VERBS_MR_IOV_LIMIT, +- /* max_err_data is size of ibv_wc::vendor_err for CQ, 0 - for EQ */ +- .max_err_data = sizeof_field(struct ibv_wc, vendor_err), ++ /* max_err_data is size of ibv_wc::vendor_err for CQ, UINT8_MAX - for EQ */ ++ .max_err_data = MAX(sizeof_field(struct ibv_wc, vendor_err), ++ UINT8_MAX), + }; + + const struct fi_ep_attr verbs_ep_attr = { +@@ -112,12 +105,11 @@ const struct fi_rx_attr verbs_rx_attr = { + .total_buffered_recv = 0, + }; + +-const struct fi_rx_attr verbs_rdm_rx_attr = { +- .mode = VERBS_RDM_MODE | VERBS_RX_MODE, +- .op_flags = VERBS_RX_RDM_OP_FLAGS, ++const struct fi_rx_attr verbs_dgram_rx_attr = { ++ .mode = VERBS_DGRAM_RX_MODE | VERBS_RX_MODE, + .msg_order = VERBS_MSG_ORDER, ++ .comp_order = FI_ORDER_STRICT | FI_ORDER_DATA, + .total_buffered_recv = 0, +- .iov_limit = 1 + }; + + const struct fi_tx_attr verbs_tx_attr = { +@@ -129,38 +121,36 @@ const struct fi_tx_attr verbs_tx_attr = { + .rma_iov_limit = 1, + }; + +-const struct fi_tx_attr verbs_rdm_tx_attr = { +- .mode = VERBS_TX_RDM_MODE, ++const struct fi_tx_attr verbs_dgram_tx_attr = { ++ .mode = 0, + .op_flags = VERBS_TX_OP_FLAGS, + .msg_order = VERBS_MSG_ORDER, +- .inject_size = FI_IBV_RDM_DFLT_BUFFERED_SIZE, ++ .comp_order = FI_ORDER_STRICT, ++ .inject_size = 0, + .rma_iov_limit = 1, + }; + + const struct verbs_ep_domain verbs_msg_domain = { + .suffix = "", + .type = FI_EP_MSG, ++ .protocol = FI_PROTO_UNSPEC, + .caps = VERBS_MSG_CAPS, + }; + +-const struct verbs_ep_domain verbs_rdm_domain = { +- .suffix = "-rdm", +- .type = FI_EP_RDM, +- .caps = VERBS_RDM_CAPS, ++const struct verbs_ep_domain verbs_msg_xrc_domain = { ++ .suffix = "-xrc", ++ .type = FI_EP_MSG, ++ .protocol = FI_PROTO_RDMA_CM_IB_XRC, ++ .caps = VERBS_MSG_CAPS, + }; + + const struct verbs_ep_domain verbs_dgram_domain = { + .suffix = "-dgram", + .type = FI_EP_DGRAM, ++ .protocol = FI_PROTO_UNSPEC, + .caps = VERBS_DGRAM_CAPS, + }; + +-struct fi_ibv_rdm_sysaddr +-{ +- struct sockaddr_in addr; +- int is_found; +-}; +- + int fi_ibv_check_ep_attr(const struct fi_info *hints, + const struct fi_info *info) + { +@@ -177,10 +167,9 @@ int fi_ibv_check_ep_attr(const struct fi_info *hints, + switch (hints->ep_attr->protocol) { + case FI_PROTO_UNSPEC: + case FI_PROTO_RDMA_CM_IB_RC: ++ case FI_PROTO_RDMA_CM_IB_XRC: + case FI_PROTO_IWARP: + case FI_PROTO_IB_UD: +- case FI_PROTO_IB_RDM: +- case FI_PROTO_IWARP_RDM: + break; + default: + VERBS_INFO(FI_LOG_CORE, +@@ -210,19 +199,23 @@ int fi_ibv_check_rx_attr(const struct fi_rx_attr *attr, + const struct fi_info *hints, + const struct fi_info *info) + { +- /* WARNING: This is not thread safe */ +- uint64_t saved_prov_mode = info->rx_attr->mode; ++ struct fi_info *dup_info; + int ret; + +- info->rx_attr->mode = (hints->domain_attr && +- hints->domain_attr->cq_data_size) ? +- info->rx_attr->mode : +- (info->rx_attr->mode & ~FI_RX_CQ_DATA); +- +- ret = ofi_check_rx_attr(&fi_ibv_prov, info, attr, hints->mode); +- +- info->rx_attr->mode = saved_prov_mode; ++ if ((hints->domain_attr && hints->domain_attr->cq_data_size) || ++ (hints->rx_attr && hints->rx_attr->mode & FI_RX_CQ_DATA) || ++ hints->mode & FI_RX_CQ_DATA) { ++ ret = ofi_check_rx_attr(&fi_ibv_prov, info, attr, hints->mode); ++ } else { ++ dup_info = fi_dupinfo(info); ++ if (!dup_info) ++ return -FI_ENOMEM; + ++ dup_info->rx_attr->mode &= ~FI_RX_CQ_DATA; ++ ret = ofi_check_rx_attr(&fi_ibv_prov, dup_info, attr, ++ hints->mode); ++ fi_freeinfo(dup_info); ++ } + return ret; + } + +@@ -411,7 +404,7 @@ static int fi_ibv_rai_to_fi(struct rdma_addrinfo *rai, struct fi_info *fi) + } + + static inline int fi_ibv_get_qp_cap(struct ibv_context *ctx, +- struct fi_info *info) ++ struct fi_info *info, uint32_t protocol) + { + struct ibv_pd *pd; + struct ibv_cq *cq; +@@ -433,16 +426,21 @@ static inline int fi_ibv_get_qp_cap(struct ibv_context *ctx, + goto err1; + } + +- qp_type = (info->ep_attr->type != FI_EP_DGRAM) ? +- IBV_QPT_RC : IBV_QPT_UD; ++ if (protocol == FI_PROTO_RDMA_CM_IB_XRC) ++ qp_type = IBV_QPT_XRC_SEND; ++ else ++ qp_type = (info->ep_attr->type != FI_EP_DGRAM) ? ++ IBV_QPT_RC : IBV_QPT_UD; + + memset(&init_attr, 0, sizeof init_attr); + init_attr.send_cq = cq; +- init_attr.recv_cq = cq; + init_attr.cap.max_send_wr = fi_ibv_gl_data.def_tx_size; +- init_attr.cap.max_recv_wr = fi_ibv_gl_data.def_rx_size; + init_attr.cap.max_send_sge = fi_ibv_gl_data.def_tx_iov_limit; +- init_attr.cap.max_recv_sge = fi_ibv_gl_data.def_rx_iov_limit; ++ if (!fi_ibv_is_xrc_send_qp(qp_type)) { ++ init_attr.recv_cq = cq; ++ init_attr.cap.max_recv_wr = fi_ibv_gl_data.def_rx_size; ++ init_attr.cap.max_recv_sge = fi_ibv_gl_data.def_rx_iov_limit; ++ } + init_attr.cap.max_inline_data = fi_ibv_find_max_inline(pd, ctx, qp_type); + init_attr.qp_type = qp_type; + +@@ -483,7 +481,7 @@ static int fi_ibv_mtu_type_to_len(enum ibv_mtu mtu_type) + } + + static int fi_ibv_get_device_attrs(struct ibv_context *ctx, +- struct fi_info *info) ++ struct fi_info *info, uint32_t protocol) + { + struct ibv_device_attr device_attr; + struct ibv_port_attr port_attr; +@@ -498,6 +496,13 @@ static int fi_ibv_get_device_attrs(struct ibv_context *ctx, + return -errno; + } + ++ if (protocol == FI_PROTO_RDMA_CM_IB_XRC) { ++ if (!(device_attr.device_cap_flags & IBV_DEVICE_XRC)) { ++ VERBS_WARN(FI_LOG_FABRIC, "XRC not supported\n"); ++ return -FI_EINVAL; ++ } ++ } ++ + info->domain_attr->cq_cnt = device_attr.max_cq; + info->domain_attr->ep_cnt = device_attr.max_qp; + info->domain_attr->tx_ctx_cnt = MIN(info->domain_attr->tx_ctx_cnt, +@@ -510,9 +515,6 @@ static int fi_ibv_get_device_attrs(struct ibv_context *ctx, + device_attr.max_qp); + info->domain_attr->max_ep_srx_ctx = device_attr.max_srq; + info->domain_attr->mr_cnt = device_attr.max_mr; +- if (info->ep_attr->type == FI_EP_RDM) +- info->domain_attr->cntr_cnt = device_attr.max_qp * 4; +- + info->tx_attr->size = device_attr.max_qp_wr; + info->tx_attr->iov_limit = device_attr.max_sge; + +@@ -524,8 +526,12 @@ static int fi_ibv_get_device_attrs(struct ibv_context *ctx, + MIN(device_attr.max_sge, + device_attr.max_srq_sge) : + device_attr.max_sge; ++ if (protocol == FI_PROTO_RDMA_CM_IB_XRC) { ++ info->rx_attr->iov_limit = MIN(info->rx_attr->iov_limit, 1); ++ info->ep_attr->rx_ctx_cnt = FI_SHARED_CONTEXT; ++ } + +- ret = fi_ibv_get_qp_cap(ctx, info); ++ ret = fi_ibv_get_qp_cap(ctx, info, protocol); + if (ret) + return ret; + +@@ -608,47 +614,45 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + int ret; + + if ((ctx->device->transport_type != IBV_TRANSPORT_IB) && +- (ep_dom->type == FI_EP_DGRAM)) ++ ((ep_dom->type == FI_EP_DGRAM) || ++ (ep_dom->protocol == FI_PROTO_RDMA_CM_IB_XRC))) + return -FI_EINVAL; + + if (!(fi = fi_allocinfo())) + return -FI_ENOMEM; + +- fi->caps = ep_dom->caps; +- fi->handle = NULL; +- if (ep_dom->type == FI_EP_RDM) { +- fi->mode = VERBS_RDM_MODE; +- *(fi->tx_attr) = verbs_rdm_tx_attr; +- *(fi->rx_attr) = verbs_rdm_rx_attr; +- } else { +- *(fi->tx_attr) = verbs_tx_attr; +- *(fi->rx_attr) = verbs_rx_attr; +- } +- +- *(fi->ep_attr) = verbs_ep_attr; +- *(fi->domain_attr) = verbs_domain_attr; ++ fi->caps = ep_dom->caps; ++ fi->handle = NULL; ++ *(fi->ep_attr) = verbs_ep_attr; ++ *(fi->domain_attr) = verbs_domain_attr; + +- if (ep_dom->type == FI_EP_RDM) +- fi->domain_attr->mr_mode &= ~FI_MR_LOCAL; ++ switch (ep_dom->type) { ++ case FI_EP_MSG: ++ *(fi->tx_attr) = verbs_tx_attr; ++ *(fi->rx_attr) = verbs_rx_attr; ++ break; ++ case FI_EP_DGRAM: ++ fi->mode = VERBS_DGRAM_RX_MODE; ++ *(fi->tx_attr) = verbs_dgram_tx_attr; ++ *(fi->rx_attr) = verbs_dgram_rx_attr; ++ fi->ep_attr->msg_prefix_size = VERBS_DGRAM_MSG_PREFIX_SIZE; ++ break; ++ default: ++ assert(0); ++ return -FI_EINVAL; ++ } ++ + +- *(fi->fabric_attr) = verbs_fabric_attr; ++ *(fi->fabric_attr) = verbs_fabric_attr; + +- fi->ep_attr->type = ep_dom->type; +- fi->tx_attr->caps = ep_dom->caps; +- fi->rx_attr->caps = ep_dom->caps; ++ fi->ep_attr->type = ep_dom->type; ++ fi->tx_attr->caps = ep_dom->caps; ++ fi->rx_attr->caps = ep_dom->caps; + +- ret = fi_ibv_get_device_attrs(ctx, fi); ++ ret = fi_ibv_get_device_attrs(ctx, fi, ep_dom->protocol); + if (ret) + goto err; + +- if (ep_dom->type == FI_EP_RDM) { +- fi->tx_attr->iov_limit = 1; +- fi->tx_attr->rma_iov_limit = 1; +- fi->tx_attr->inject_size = fi_ibv_gl_data.rdm.buffer_size; +- +- fi->rx_attr->iov_limit = 1; +- } +- + switch (ctx->device->transport_type) { + case IBV_TRANSPORT_IB: + if(ibv_query_gid(ctx, 1, 0, &gid)) { +@@ -664,15 +668,14 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + goto err; + } + +- snprintf(fi->fabric_attr->name, name_len, VERBS_IB_PREFIX "%" PRIu64, ++ snprintf(fi->fabric_attr->name, name_len, VERBS_IB_PREFIX "%" PRIx64, + be64toh(gid.global.subnet_prefix)); + + switch (ep_dom->type) { + case FI_EP_MSG: +- fi->ep_attr->protocol = FI_PROTO_RDMA_CM_IB_RC; +- break; +- case FI_EP_RDM: +- fi->ep_attr->protocol = FI_PROTO_IB_RDM; ++ fi->ep_attr->protocol = ++ ep_dom->protocol == FI_PROTO_UNSPEC ? ++ FI_PROTO_RDMA_CM_IB_RC : ep_dom->protocol; + break; + case FI_EP_DGRAM: + fi->ep_attr->protocol = FI_PROTO_IB_UD; +@@ -689,14 +692,8 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + ret = -FI_ENOMEM; + goto err; + } +- +- if (ep_dom->type == FI_EP_MSG) { +- fi->ep_attr->protocol = FI_PROTO_IWARP; +- fi->tx_attr->op_flags = VERBS_TX_OP_FLAGS_IWARP; +- } else { +- fi->ep_attr->protocol = FI_PROTO_IWARP_RDM; +- fi->tx_attr->op_flags = VERBS_TX_OP_FLAGS_IWARP_RDM; +- } ++ fi->ep_attr->protocol = FI_PROTO_IWARP; ++ fi->tx_attr->op_flags = VERBS_TX_OP_FLAGS_IWARP; + + /* TODO Some iWarp HW may support immediate data as per RFC 7306 + * (RDMA Protocol Extensions). Update this to figure out if the +@@ -710,7 +707,7 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + } + + name_len = strlen(ctx->device->name) + strlen(ep_dom->suffix); +- fi->domain_attr->name = malloc(name_len + 1); ++ fi->domain_attr->name = calloc(1, name_len + 2); + if (!fi->domain_attr->name) { + ret = -FI_ENOMEM; + goto err; +@@ -718,7 +715,6 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + + snprintf(fi->domain_attr->name, name_len + 1, "%s%s", + ctx->device->name, ep_dom->suffix); +- fi->domain_attr->name[name_len] = '\0'; + + *info = fi; + return 0; +@@ -847,27 +843,25 @@ static int fi_ibv_getifaddrs(struct dlist_entry *verbs_devs) + goto err1; + } + +- ret = fi_ibv_create_ep(name, NULL, FI_NUMERICHOST | FI_SOURCE, +- NULL, &rai, &id); ++ ret = fi_ibv_get_rai_id(name, NULL, FI_NUMERICHOST | FI_SOURCE, ++ NULL, &rai, &id); + if (ret) + continue; + + ret = fi_ibv_add_rai(verbs_devs, id, rai); +- if (ret) +- goto err2; +- ++ if (ret) { ++ rdma_freeaddrinfo(rai); ++ rdma_destroy_id(id); ++ goto err1; ++ } + VERBS_DBG(FI_LOG_FABRIC, "Found active interface for verbs device: " + "%s with address: %s\n", + ibv_get_device_name(id->verbs->device), name); +- +- rdma_destroy_ep(id); +- ++ rdma_destroy_id(id); + num_verbs_ifs++; + } + freeifaddrs(ifaddr); + return num_verbs_ifs ? 0 : -FI_ENODATA; +-err2: +- rdma_destroy_ep(id); + err1: + fi_ibv_verbs_devs_free(verbs_devs); + freeifaddrs(ifaddr); +@@ -973,7 +967,7 @@ static void fi_ibv_sockaddr_set_port(struct sockaddr *sa, uint16_t port) + } + } + +-/* the `rai` parameter is used for the MSG/RDM EP types */ ++/* the `rai` parameter is used for the MSG EP type */ + /* the `fmt`, `[src | dest]_addr` parameters are used for the DGRAM EP type */ + /* if the `fmt` parameter isn't used, pass FI_FORMAT_UNSPEC */ + static int fi_ibv_set_info_addrs(struct fi_info *info, +@@ -1053,14 +1047,27 @@ rai_to_fi: + NULL, NULL); + } + ++#define VERBS_NUM_DOMAIN_TYPES 3 ++ + int fi_ibv_init_info(const struct fi_info **all_infos) + { + struct ibv_context **ctx_list; + struct fi_info *fi = NULL, *tail = NULL; +- int ret = 0, i, num_devices; ++ const struct verbs_ep_domain *ep_type[VERBS_NUM_DOMAIN_TYPES]; ++ int ret = 0, i, j, num_devices; + + *all_infos = NULL; + ++ /* List XRC MSG_EP domain before default RC MSG_EP if requested */ ++ if (fi_ibv_gl_data.msg.prefer_xrc) { ++ ep_type[0] = &verbs_msg_xrc_domain; ++ ep_type[1] = &verbs_msg_domain; ++ } else { ++ ep_type[0] = &verbs_msg_domain; ++ ep_type[1] = &verbs_msg_xrc_domain; ++ } ++ ep_type[2] = &verbs_dgram_domain; ++ + if (!fi_ibv_gl_data.fork_unsafe) { + VERBS_INFO(FI_LOG_CORE, "Enabling IB fork support\n"); + ret = ibv_fork_init(); +@@ -1088,25 +1095,13 @@ int fi_ibv_init_info(const struct fi_info **all_infos) + } + + for (i = 0; i < num_devices; i++) { +- ret = fi_ibv_alloc_info(ctx_list[i], &fi, &verbs_msg_domain); +- if (!ret) { +- if (!*all_infos) +- *all_infos = fi; +- else +- tail->next = fi; +- tail = fi; +- +- ret = fi_ibv_alloc_info(ctx_list[i], &fi, +- &verbs_rdm_domain); +- if (!ret) { +- tail->next = fi; +- tail = fi; +- } +- +- ret = fi_ibv_alloc_info(ctx_list[i], &fi, +- &verbs_dgram_domain); ++ for (j = 0; j < VERBS_NUM_DOMAIN_TYPES; j++) { ++ ret = fi_ibv_alloc_info(ctx_list[i], &fi, ep_type[j]); + if (!ret) { +- tail->next = fi; ++ if (!*all_infos) ++ *all_infos = fi; ++ else ++ tail->next = fi; + tail = fi; + } + } +@@ -1124,7 +1119,7 @@ static int fi_ibv_set_default_attr(struct fi_info *info, size_t *attr, + size_t default_attr, char *attr_str) + { + if (default_attr > *attr) { +- VERBS_WARN(FI_LOG_FABRIC, "Ignoring provider default value " ++ VERBS_INFO(FI_LOG_FABRIC, "Ignoring provider default value " + "for %s as it is greater than the value supported " + "by domain: %s\n", attr_str, info->domain_attr->name); + } else { +@@ -1150,34 +1145,26 @@ static int fi_ibv_set_default_info(struct fi_info *info) + "rx context size"); + if (ret) + return ret; ++ ret = fi_ibv_set_default_attr(info, &info->tx_attr->iov_limit, ++ fi_ibv_gl_data.def_tx_iov_limit, ++ "tx iov_limit"); ++ if (ret) ++ return ret; + +- /* Don't set defaults for verb/RDM as +- * it supports an iov limit of just 1 */ +- if (info->ep_attr->type != FI_EP_RDM) { +- ret = fi_ibv_set_default_attr( +- info, &info->tx_attr->iov_limit, +- fi_ibv_gl_data.def_tx_iov_limit, +- "tx iov_limit"); +- if (ret) +- return ret; ++ ret = fi_ibv_set_default_attr(info, &info->rx_attr->iov_limit, ++ fi_ibv_gl_data.def_rx_iov_limit, ++ "rx iov_limit"); ++ if (ret) ++ return ret; + +- ret = fi_ibv_set_default_attr( +- info, &info->rx_attr->iov_limit, +- fi_ibv_gl_data.def_rx_iov_limit, +- "rx iov_limit"); ++ if (info->ep_attr->type == FI_EP_MSG) { ++ /* For verbs iov limit is same for ++ * both regular messages and RMA */ ++ ret = fi_ibv_set_default_attr(info, &info->tx_attr->rma_iov_limit, ++ fi_ibv_gl_data.def_tx_iov_limit, ++ "tx rma_iov_limit"); + if (ret) + return ret; +- +- if (info->ep_attr->type != FI_EP_DGRAM) { +- /* For verbs iov limit is same for +- * both regular messages and RMA */ +- ret = fi_ibv_set_default_attr( +- info, &info->tx_attr->rma_iov_limit, +- fi_ibv_gl_data.def_tx_iov_limit, +- "tx rma_iov_limit"); +- if (ret) +- return ret; +- } + } + return 0; + } +@@ -1225,9 +1212,29 @@ static int fi_ibv_get_matching_info(uint32_t version, + *info = tail = NULL; + + for ( ; check_info; check_info = check_info->next) { ++ VERBS_DBG(FI_LOG_FABRIC, "Checking domain: %s\n", ++ check_info->domain_attr->name); ++ + if (hints) { +- VERBS_DBG(FI_LOG_FABRIC, "Checking domain: %s\n", +- check_info->domain_attr->name); ++ if ((check_info->ep_attr->protocol == ++ FI_PROTO_RDMA_CM_IB_XRC) && ++ (!hints->ep_attr || ++ (hints->ep_attr->rx_ctx_cnt != FI_SHARED_CONTEXT))) { ++ VERBS_INFO(FI_LOG_FABRIC, ++ "hints->ep_attr->rx_ctx_cnt != " ++ "FI_SHARED_CONTEXT. Skipping " ++ "XRC FI_EP_MSG endpoints\n"); ++ continue; ++ } ++ if ((check_info->ep_attr->protocol == ++ FI_PROTO_RDMA_CM_IB_XRC) && !VERBS_HAVE_XRC) { ++ VERBS_INFO(FI_LOG_FABRIC, ++ "XRC not built into provider, " ++ "skipping XRC FI_EP_MSG " ++ "endpoints\n"); ++ continue; ++ } ++ + ret = fi_ibv_check_hints(version, hints, + check_info); + if (ret) +@@ -1255,6 +1262,8 @@ static int fi_ibv_get_matching_info(uint32_t version, + } + } + ++ VERBS_DBG(FI_LOG_FABRIC, "Adding fi_info for domain: %s\n", ++ fi->domain_attr->name); + if (!*info) + *info = fi; + else +@@ -1279,8 +1288,7 @@ static int fi_ibv_del_info_not_belong_to_dev(const char *dev_name, struct fi_inf + *info = NULL; + + while (check_info) { +- /* Use strncmp since verbs RDM domain name +- * would have "-rdm" suffix */ ++ /* Use strncmp since verbs domain names would have "-" suffix */ + if (dev_name && strncmp(dev_name, check_info->domain_attr->name, + strlen(dev_name))) { + /* This branch removing `check_info` entry from the list */ +@@ -1369,8 +1377,15 @@ static int fi_ibv_handle_ib_ud_addr(const char *node, const char *service, + } + + if (flags & FI_SOURCE) { +- if (service) +- sscanf(service, "%" SCNu16, &src_addr->service); ++ if (service) { ++ ret = sscanf(service, "%" SCNu16, ++ &src_addr->service); ++ if (ret != 1) { ++ ret = -errno; ++ goto fn2; ++ } ++ } ++ + VERBS_INFO(FI_LOG_CORE, "node '%s' service '%s' " + "converted to \n", + node, service, src_addr->service); +@@ -1425,23 +1440,41 @@ static int fi_ibv_handle_sock_addr(const char *node, const char *service, + const char *dev_name = NULL; + int ret; + +- ret = fi_ibv_create_ep(node, service, flags, hints, &rai, &id); ++ ret = fi_ibv_get_rai_id(node, service, flags, hints, &rai, &id); + if (ret) + return ret; + if (id->verbs) { + dev_name = ibv_get_device_name(id->verbs->device); + ret = fi_ibv_del_info_not_belong_to_dev(dev_name, info); + if (ret) +- goto fn; ++ goto out; + } + + ret = fi_ibv_fill_addr(rai, info, id); + fi_ibv_remove_nosrc_info(info); +-fn: +- fi_ibv_destroy_ep(rai, &id); ++out: ++ rdma_freeaddrinfo(rai); ++ if (rdma_destroy_id(id)) ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_destroy_id", errno); + return ret; + } + ++static inline int ++fi_ibv_hints_match_dgram_ep(const struct fi_info *hints) ++{ ++ return (hints && ((hints->addr_format == FI_ADDR_IB_UD) || ++ (hints->ep_attr && (hints->ep_attr->type == FI_EP_DGRAM)))); ++} ++ ++static inline int ++fi_ibv_hints_match_msg_ep(const struct fi_info *hints) ++{ ++ return (hints && ((hints->addr_format == FI_SOCKADDR) || ++ (hints->addr_format == FI_SOCKADDR_IN) || ++ (hints->addr_format == FI_SOCKADDR_IN6) || ++ (hints->addr_format == FI_SOCKADDR_IB) || ++ (hints->ep_attr && (hints->ep_attr->type == FI_EP_MSG)))); ++} + + static int fi_ibv_get_match_infos(uint32_t version, const char *node, + const char *service, uint64_t flags, +@@ -1458,21 +1491,45 @@ static int fi_ibv_get_match_infos(uint32_t version, const char *node, + if (ret) + return ret; + +- if (hints && (hints->addr_format == FI_ADDR_IB_UD)) { ++ /* Check if the user requested to support DGRAM EP type only */ ++ if (fi_ibv_hints_match_dgram_ep(hints)) { + /* This is case when only IB UD addresses are passed */ + ret = fi_ibv_handle_ib_ud_addr(node, service, flags, info); +- if (ret) ++ if (ret) { ++ VERBS_INFO(FI_LOG_CORE, ++ "Handling of the IB UD address fails - %d, " ++ "support of this was requested thru the passed hints\n", ++ ret); + fi_freeinfo(*info); ++ } ++ return ret; ++ } ++ ++ /* Check if the user requested to support MSG EP type only */ ++ if (fi_ibv_hints_match_msg_ep(hints)) { ++ ret = fi_ibv_handle_sock_addr(node, service, flags, hints, info); ++ if (ret) { ++ VERBS_INFO(FI_LOG_CORE, ++ "Handling of the socket address fails - %d, but the " ++ "support of this was requested thru the passed hints\n", ++ ret); ++ if (*info) ++ fi_freeinfo(*info); ++ } else { ++ if (!*info) ++ return -FI_ENODATA; ++ } + return ret; + } + + ret_sock_addr = fi_ibv_handle_sock_addr(node, service, flags, hints, info); +- if (ret_sock_addr) ++ if (ret_sock_addr) { + VERBS_INFO(FI_LOG_CORE, "Handling of the socket address fails - %d\n", + ret_sock_addr); +- +- if (!*info) +- return -FI_ENODATA; ++ } else { ++ if (!*info) ++ return -FI_ENODATA; ++ } + + ret_ib_ud_addr = fi_ibv_handle_ib_ud_addr(node, service, flags, info); + if (ret_ib_ud_addr) +@@ -1491,12 +1548,40 @@ static int fi_ibv_get_match_infos(uint32_t version, const char *node, + return FI_SUCCESS; + } + ++static void fi_ibv_alter_info(const struct fi_info *hints, struct fi_info *info) ++{ ++ struct fi_info *cur; ++ ++ if (!ofi_check_rx_mode(hints, FI_RX_CQ_DATA)) { ++ for (cur = info; cur; cur = cur->next) ++ cur->domain_attr->cq_data_size = 0; ++ } else { ++ for (cur = info; cur; cur = cur->next) { ++ /* App may just set rx_attr.mode */ ++ if (!hints || (hints->mode & FI_RX_CQ_DATA)) ++ cur->mode |= FI_RX_CQ_DATA; ++ assert(cur->rx_attr->mode & FI_RX_CQ_DATA); ++ } ++ } ++ ++ if (!hints || !hints->tx_attr || !hints->tx_attr->inject_size) { ++ for (cur = info; cur; cur = cur->next) { ++ if (cur->ep_attr->type != FI_EP_MSG) ++ continue; ++ /* The default inline size is usually smaller. ++ * This is to avoid drop in throughput */ ++ cur->tx_attr->inject_size = ++ MIN(cur->tx_attr->inject_size, ++ fi_ibv_gl_data.def_inline_size); ++ } ++ } ++} ++ + int fi_ibv_getinfo(uint32_t version, const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, + struct fi_info **info) + { + int ret; +- const struct fi_info *cur; + + ret = fi_ibv_get_match_infos(version, node, service, + flags, hints, +@@ -1506,21 +1591,7 @@ int fi_ibv_getinfo(uint32_t version, const char *node, const char *service, + + ofi_alter_info(*info, hints, version); + +- if (!ofi_check_rx_mode(hints, FI_RX_CQ_DATA)) { +- for (cur = *info; cur; cur = cur->next) +- cur->domain_attr->cq_data_size = 0; +- } +- +- if (!hints || !hints->tx_attr || !hints->tx_attr->inject_size) { +- for (cur = *info; cur; cur = cur->next) { +- if (cur->ep_attr->type != FI_EP_MSG) +- continue; +- /* The default inline size is usually smaller. +- * This is to avoid drop in throughput */ +- cur->tx_attr->inject_size = MIN(cur->tx_attr->inject_size, +- fi_ibv_gl_data.def_inline_size); +- } +- } ++ fi_ibv_alter_info(hints, *info); + out: + if (!ret || ret == -FI_ENOMEM || ret == -FI_ENODEV) + return ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_mr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_mr.c +index 05f8514..0d80742 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_mr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_mr.c +@@ -32,7 +32,6 @@ + + #include + #include "fi_verbs.h" +-#include "verbs_rdm.h" + + #define FI_IBV_DEFINE_MR_REG_OPS(type) \ + \ +@@ -180,13 +179,6 @@ fi_ibv_mr_ofi2ibv_access(uint64_t ofi_access, struct fi_ibv_domain *domain) + { + int ibv_access = 0; + +- /* Enable local write access by default for FI_EP_RDM which hides local +- * registration requirements. This allows to avoid buffering or double +- * registration */ +- if (!(domain->info->caps & FI_LOCAL_MR) && +- !(domain->info->domain_attr->mr_mode & FI_MR_LOCAL)) +- ibv_access |= IBV_ACCESS_LOCAL_WRITE; +- + /* Local read access to an MR is enabled by default in verbs */ + if (ofi_access & FI_RECV) + ibv_access |= IBV_ACCESS_LOCAL_WRITE; +@@ -222,7 +214,9 @@ fi_ibv_mr_common_cache_reg(struct fi_ibv_domain *domain, + struct ofi_mr_entry *entry; + int ret; + ++ fastlock_acquire(&domain->util_domain.lock); + ret = ofi_mr_cache_search(&domain->cache, attr, &entry); ++ fastlock_release(&domain->util_domain.lock); + if (OFI_UNLIKELY(ret)) + return NULL; + +@@ -235,7 +229,9 @@ fi_ibv_mr_common_cache_reg(struct fi_ibv_domain *domain, + static inline + void fi_ibv_common_cache_dereg(struct fi_ibv_mem_desc *md) + { ++ fastlock_acquire(&md->domain->util_domain.lock); + ofi_mr_cache_delete(&md->domain->cache, md->entry); ++ fastlock_release(&md->domain->util_domain.lock); + } + + static inline +@@ -261,38 +257,6 @@ int fi_ibv_mr_internal_dereg(struct fi_ibv_mem_desc *md) + return ret; + } + +-int fi_ibv_rdm_alloc_and_reg(struct fi_ibv_rdm_ep *ep, +- void **buf, size_t size, +- struct fi_ibv_mem_desc *md) +-{ +- if (!*buf) { +- if (ofi_memalign((void **)buf, +- FI_IBV_BUF_ALIGNMENT, size)) +- return -FI_ENOMEM; +- } +- +- memset(*buf, 0, size); +- return fi_ibv_mr_internal_reg(ep->domain, *buf, size, +- FI_WRITE | FI_REMOTE_WRITE, md); +-} +- +-ssize_t fi_ibv_rdm_dereg_and_free(struct fi_ibv_mem_desc *md, +- char **buff) +-{ +- ssize_t ret = FI_SUCCESS; +- ret = fi_ibv_mr_internal_dereg(md); +- if (ret) +- VERBS_WARN(FI_LOG_AV, +- "Unable to deregister MR, ret = %"PRId64"\n", ret); +- +- if (buff && *buff) { +- ofi_freealign(*buff); +- *buff = NULL; +- } +- +- return ret; +-} +- + static inline + int fi_ibv_mr_internal_cache_reg(struct fi_ibv_domain *domain, void *buf, + size_t len, uint64_t access, +@@ -376,88 +340,104 @@ static struct fi_ops fi_ibv_mr_cache_ops = { + .ops_open = fi_no_ops_open, + }; + +-int fi_ibv_monitor_subscribe(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription) ++int fi_ibv_monitor_subscribe(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription) + { + struct fi_ibv_domain *domain = + container_of(notifier, struct fi_ibv_domain, monitor); +- struct fi_ibv_mem_ptr_entry *entry; + int ret = FI_SUCCESS; ++ RbtStatus rbt_ret; ++ RbtIterator iter; ++ struct iovec *key; ++ struct fi_ibv_subscr_entry *subscr_entry; ++ struct fi_ibv_monitor_entry *entry = ++ calloc(1, sizeof(*entry)); ++ if (OFI_UNLIKELY(!entry)) ++ return -FI_ENOMEM; + + pthread_mutex_lock(&domain->notifier->lock); +- fi_ibv_mem_notifier_set_free_hook(domain->notifier->prev_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(domain->notifier->prev_realloc_hook); +- +- entry = util_buf_alloc(domain->notifier->mem_ptrs_ent_pool); +- if (OFI_UNLIKELY(!entry)) { +- ret = -FI_ENOMEM; +- goto fn; ++ ofi_set_mem_free_hook(domain->notifier->prev_free_hook); ++ ofi_set_mem_realloc_hook(domain->notifier->prev_realloc_hook); ++ ++ entry->iov = subscription->iov; ++ dlist_init(&entry->subscription_list); ++ ++ rbt_ret = rbtInsert(domain->notifier->subscr_storage, ++ (void *)&entry->iov, (void *)entry); ++ switch (rbt_ret) { ++ case RBT_STATUS_DUPLICATE_KEY: ++ free(entry); ++ iter = rbtFind(domain->notifier->subscr_storage, ++ (void *)&subscription->iov); ++ assert(iter); ++ rbtKeyValue(domain->notifier->subscr_storage, iter, ++ (void *)&key, (void *)&entry); ++ /* fall through */ ++ case RBT_STATUS_OK: ++ subscr_entry = calloc(1, sizeof(*subscr_entry)); ++ if (OFI_LIKELY(subscr_entry != NULL)) { ++ subscr_entry->subscription = subscription; ++ dlist_insert_tail(&subscr_entry->entry, &entry->subscription_list); ++ break; ++ } ++ /* Do not free monitor entry in case of diplicate key */ ++ if (rbt_ret == RBT_STATUS_OK) { ++ iter = rbtFind(domain->notifier->subscr_storage, ++ (void *)&subscription->iov); ++ assert(iter); ++ rbtErase(domain->notifier->subscr_storage, iter); ++ free(entry); ++ } ++ /* fall through */ ++ default: ++ ret = -FI_EAVAIL; ++ break; + } + +- entry->addr = addr; +- entry->subscription = subscription; +- dlist_init(&entry->entry); +- HASH_ADD(hh, domain->notifier->mem_ptrs_hash, addr, sizeof(void *), entry); +- +-fn: +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier_realloc_hook); ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier_free_hook); ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier_realloc_hook); + pthread_mutex_unlock(&domain->notifier->lock); + return ret; + } + +-void fi_ibv_monitor_unsubscribe(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription) ++void fi_ibv_monitor_unsubscribe(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription) + { + struct fi_ibv_domain *domain = + container_of(notifier, struct fi_ibv_domain, monitor); +- struct fi_ibv_mem_ptr_entry *entry; ++ RbtIterator iter; ++ struct fi_ibv_subscr_entry *subscr_entry; ++ struct fi_ibv_monitor_entry *entry; ++ struct iovec *key; + + pthread_mutex_lock(&domain->notifier->lock); +- fi_ibv_mem_notifier_set_free_hook(domain->notifier->prev_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(domain->notifier->prev_realloc_hook); +- +- HASH_FIND(hh, domain->notifier->mem_ptrs_hash, &addr, sizeof(void *), entry); +- assert(entry); +- +- HASH_DEL(domain->notifier->mem_ptrs_hash, entry); +- +- if (!dlist_empty(&entry->entry)) +- dlist_remove_init(&entry->entry); ++ ofi_set_mem_free_hook(domain->notifier->prev_free_hook); ++ ofi_set_mem_realloc_hook(domain->notifier->prev_realloc_hook); ++ ++ iter = rbtFind(domain->notifier->subscr_storage, ++ (void *)&subscription->iov); ++ assert(iter); ++ rbtKeyValue(domain->notifier->subscr_storage, iter, ++ (void *)&key, (void *)&entry); ++ dlist_foreach_container(&entry->subscription_list, struct fi_ibv_subscr_entry, ++ subscr_entry, entry) { ++ if (subscr_entry->subscription == subscription) { ++ dlist_remove(&subscr_entry->entry); ++ free(subscr_entry); ++ break; ++ } ++ } + +- util_buf_release(domain->notifier->mem_ptrs_ent_pool, entry); ++ if (dlist_empty(&entry->subscription_list)) { ++ rbtErase(domain->notifier->subscr_storage, iter); ++ free(entry); ++ } + +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier_realloc_hook); +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier_free_hook); ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier_realloc_hook); ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier_free_hook); + pthread_mutex_unlock(&domain->notifier->lock); + } + +-struct ofi_subscription * +-fi_ibv_monitor_get_event(struct ofi_mem_monitor *notifier) +-{ +- struct fi_ibv_domain *domain = +- container_of(notifier, struct fi_ibv_domain, monitor); +- struct fi_ibv_mem_ptr_entry *entry; +- +- pthread_mutex_lock(&domain->notifier->lock); +- if (!dlist_empty(&domain->notifier->event_list)) { +- dlist_pop_front(&domain->notifier->event_list, +- struct fi_ibv_mem_ptr_entry, +- entry, entry); +- VERBS_DBG(FI_LOG_MR, +- "Retrieve %p (entry %p) from event list\n", +- entry->addr, entry); +- /* needed to protect against double insertions */ +- dlist_init(&entry->entry); +- +- pthread_mutex_unlock(&domain->notifier->lock); +- return entry->subscription; +- } else { +- pthread_mutex_unlock(&domain->notifier->lock); +- return NULL; +- } +-} +- + int fi_ibv_mr_cache_entry_reg(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry) + { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg.c +new file mode 100644 +index 0000000..e8b79b5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg.c +@@ -0,0 +1,385 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++ ++#include "fi_verbs.h" ++ ++ ++static inline ssize_t ++fi_ibv_msg_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .num_sge = msg->iov_count, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ assert(ep->util_ep.rx_cq); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_handle_post(ibv_post_recv(ep->ibv_qp, &wr, &bad_wr)); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_sge sge = fi_ibv_init_sge(buf, len, desc); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .num_sge = 1, ++ .sg_list = &sge, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ assert(ep->util_ep.rx_cq); ++ ++ return fi_ibv_handle_post(ibv_post_recv(ep->ibv_qp, &wr, &bad_wr)); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct fi_msg msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = src_addr, ++ .context = context, ++ }; ++ ++ return fi_ibv_msg_ep_recvmsg(ep_fid, &msg, 0); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ }; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_SEND_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_SEND; ++ } ++ ++ return fi_ibv_send_msg(ep, &wr, msg, flags); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND, ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_SEND, ++ }; ++ ++ return fi_ibv_send_iov(ep, &wr, iov, desc, count); ++} ++ ++static ssize_t fi_ibv_msg_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t fi_ibv_msg_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_msg_inject_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->msg_wr); ++} ++ ++static ssize_t fi_ibv_msg_ep_injectdata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ ssize_t ret; ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->msg_wr.imm_data = htonl((uint32_t)data); ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND_WITH_IMM; ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ ret = fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->msg_wr); ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND; ++ return ret; ++} ++ ++const struct fi_ops_msg fi_ibv_msg_ep_msg_ops_ts = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_ibv_msg_ep_recv, ++ .recvv = fi_ibv_msg_ep_recvv, ++ .recvmsg = fi_ibv_msg_ep_recvmsg, ++ .send = fi_ibv_msg_ep_send, ++ .sendv = fi_ibv_msg_ep_sendv, ++ .sendmsg = fi_ibv_msg_ep_sendmsg, ++ .inject = fi_ibv_msg_ep_inject, ++ .senddata = fi_ibv_msg_ep_senddata, ++ .injectdata = fi_ibv_msg_ep_injectdata, ++}; ++ ++const struct fi_ops_msg fi_ibv_msg_ep_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_ibv_msg_ep_recv, ++ .recvv = fi_ibv_msg_ep_recvv, ++ .recvmsg = fi_ibv_msg_ep_recvmsg, ++ .send = fi_ibv_msg_ep_send, ++ .sendv = fi_ibv_msg_ep_sendv, ++ .sendmsg = fi_ibv_msg_ep_sendmsg, ++ .inject = fi_ibv_msg_inject_fast, ++ .senddata = fi_ibv_msg_ep_senddata, ++ .injectdata = fi_ibv_msg_ep_injectdata_fast, ++}; ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_SEND_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_SEND; ++ } ++ ++ return fi_ibv_send_msg(&ep->base_ep, &wr, msg, flags); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND, ++ .send_flags = VERBS_INJECT(&ep->base_ep, len), ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = VERBS_INJECT(&ep->base_ep, len), ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_SEND, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_iov(&ep->base_ep, &wr, iov, desc, count); ++} ++ ++static ssize_t fi_ibv_msg_xrc_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf_inline(&ep->base_ep, &wr, buf, len); ++} ++ ++static ssize_t fi_ibv_msg_xrc_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf_inline(&ep->base_ep, &wr, buf, len); ++} ++ ++/* NOTE: Initially the XRC endpoint must be used with a SRQ. */ ++const struct fi_ops_msg fi_ibv_msg_xrc_ep_msg_ops_ts = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_no_msg_recv, ++ .recvv = fi_no_msg_recvv, ++ .recvmsg = fi_no_msg_recvmsg, ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; ++ ++const struct fi_ops_msg fi_ibv_msg_xrc_ep_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_no_msg_recv, ++ .recvv = fi_no_msg_recvv, ++ .recvmsg = fi_no_msg_recvmsg, ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; ++ ++const struct fi_ops_msg fi_ibv_msg_srq_xrc_ep_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_no_msg_recv, ++ .recvv = fi_no_msg_recvv, ++ .recvmsg = fi_no_msg_recvmsg, ++ .send = fi_ibv_msg_xrc_ep_send, ++ .sendv = fi_ibv_msg_xrc_ep_sendv, ++ .sendmsg = fi_ibv_msg_xrc_ep_sendmsg, ++ .inject = fi_ibv_msg_xrc_ep_inject, ++ .senddata = fi_ibv_msg_xrc_ep_senddata, ++ .injectdata = fi_ibv_msg_xrc_ep_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg_ep.c +deleted file mode 100644 +index 385acbd..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg_ep.c ++++ /dev/null +@@ -1,1457 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "config.h" +- +-#include "fi_verbs.h" +- +- +-#define VERBS_CM_DATA_SIZE 56 +-#define VERBS_RESOLVE_TIMEOUT 2000 // ms +- +- +-static int +-fi_ibv_msg_ep_getopt(fid_t fid, int level, int optname, +- void *optval, size_t *optlen) +-{ +- switch (level) { +- case FI_OPT_ENDPOINT: +- switch (optname) { +- case FI_OPT_CM_DATA_SIZE: +- if (*optlen < sizeof(size_t)) +- return -FI_ETOOSMALL; +- *((size_t *) optval) = VERBS_CM_DATA_SIZE; +- *optlen = sizeof(size_t); +- return 0; +- default: +- return -FI_ENOPROTOOPT; +- } +- default: +- return -FI_ENOPROTOOPT; +- } +- return 0; +-} +- +-static int +-fi_ibv_msg_ep_setopt(fid_t fid, int level, int optname, +- const void *optval, size_t optlen) +-{ +- switch (level) { +- case FI_OPT_ENDPOINT: +- return -FI_ENOPROTOOPT; +- default: +- return -FI_ENOPROTOOPT; +- } +- return 0; +-} +- +-static struct fi_ops_ep fi_ibv_msg_ep_base_ops = { +- .size = sizeof(struct fi_ops_ep), +- .cancel = fi_no_cancel, +- .getopt = fi_ibv_msg_ep_getopt, +- .setopt = fi_ibv_msg_ep_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-static struct fi_ibv_msg_ep *fi_ibv_alloc_msg_ep(struct fi_info *info) +-{ +- struct fi_ibv_msg_ep *ep; +- +- ep = calloc(1, sizeof *ep); +- if (!ep) +- return NULL; +- +- ep->info = fi_dupinfo(info); +- if (!ep->info) +- goto err; +- +- return ep; +-err: +- free(ep); +- return NULL; +-} +- +-static void fi_ibv_free_msg_ep(struct fi_ibv_msg_ep *ep) +-{ +- fi_freeinfo(ep->info); +- free(ep); +-} +- +-static int fi_ibv_msg_ep_close(fid_t fid) +-{ +- struct fi_ibv_msg_ep *ep; +- +- ep = container_of(fid, struct fi_ibv_msg_ep, ep_fid.fid); +- rdma_destroy_ep(ep->id); +- +- fi_ibv_cleanup_cq(ep); +- +- VERBS_INFO(FI_LOG_DOMAIN, "EP %p was closed \n", ep); +- +- fi_ibv_free_msg_ep(ep); +- +- return 0; +-} +- +-static int fi_ibv_msg_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep; +- int ret; +- +- ep = container_of(fid, struct fi_ibv_msg_ep, ep_fid.fid); +- ret = ofi_ep_bind_valid(&fi_ibv_prov, bfid, flags); +- if (ret) +- return ret; +- +- switch (bfid->fclass) { +- case FI_CLASS_CQ: +- /* Must bind a CQ to either RECV or SEND completions, and +- * the FI_SELECTIVE_COMPLETION flag is only valid when binding the +- * FI_SEND CQ. */ +- if (!(flags & (FI_RECV|FI_SEND)) +- || (flags & (FI_SEND|FI_SELECTIVE_COMPLETION)) +- == FI_SELECTIVE_COMPLETION) { +- return -EINVAL; +- } +- if (flags & FI_RECV) { +- if (ep->rcq) +- return -EINVAL; +- ep->rcq = container_of(bfid, struct fi_ibv_cq, cq_fid.fid); +- } +- if (flags & FI_SEND) { +- if (ep->scq) +- return -EINVAL; +- ep->scq = container_of(bfid, struct fi_ibv_cq, cq_fid.fid); +- if (flags & FI_SELECTIVE_COMPLETION) +- ep->ep_flags |= FI_SELECTIVE_COMPLETION; +- else +- ep->info->tx_attr->op_flags |= FI_COMPLETION; +- ep->ep_id = ep->scq->send_signal_wr_id | ep->scq->ep_cnt++; +- } +- break; +- case FI_CLASS_EQ: +- ep->eq = container_of(bfid, struct fi_ibv_eq, eq_fid.fid); +- ret = rdma_migrate_id(ep->id, ep->eq->channel); +- if (ret) +- return -errno; +- break; +- case FI_CLASS_SRX_CTX: +- ep->srq_ep = container_of(bfid, struct fi_ibv_srq_ep, ep_fid.fid); +- break; +- default: +- return -EINVAL; +- } +- +- return 0; +-} +- +-static int fi_ibv_msg_ep_enable(struct fid_ep *ep_fid) +-{ +- struct ibv_qp_init_attr attr = { 0 }; +- struct fi_ibv_msg_ep *ep; +- struct ibv_pd *pd; +- int ret; +- +- ep = container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- if (!ep->eq) { +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Endpoint is not bound to an event queue\n"); +- return -FI_ENOEQ; +- } +- +- if (!ep->scq && !ep->rcq) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a send or receive completion queue\n"); +- return -FI_ENOCQ; +- } +- +- if (!ep->scq && (ofi_send_allowed(ep->info->caps) || +- ofi_rma_initiate_allowed(ep->info->caps))) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a send completion queue when it has transmit " +- "capabilities enabled (FI_SEND | FI_RMA).\n"); +- return -FI_ENOCQ; +- } +- +- if (!ep->rcq && ofi_recv_allowed(ep->info->caps)) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a receive completion queue when it has receive " +- "capabilities enabled. (FI_RECV)\n"); +- return -FI_ENOCQ; +- } +- +- if (ep->scq) { +- attr.cap.max_send_wr = ep->info->tx_attr->size; +- attr.cap.max_send_sge = ep->info->tx_attr->iov_limit; +- attr.send_cq = ep->scq->cq; +- pd = ep->scq->domain->pd; +- } else { +- attr.send_cq = ep->rcq->cq; +- pd = ep->rcq->domain->pd; +- } +- +- if (ep->rcq) { +- attr.cap.max_recv_wr = ep->info->rx_attr->size; +- attr.cap.max_recv_sge = ep->info->rx_attr->iov_limit; +- attr.recv_cq = ep->rcq->cq; +- } else { +- attr.recv_cq = ep->scq->cq; +- } +- +- attr.cap.max_inline_data = ep->info->tx_attr->inject_size; +- +- if (ep->srq_ep) { +- attr.srq = ep->srq_ep->srq; +- /* Use of SRQ, no need to allocate recv_wr entries in the QP */ +- attr.cap.max_recv_wr = 0; +- +- /* Override the default ops to prevent the user from posting WRs to a +- * QP where a SRQ is attached to */ +- ep->ep_fid.msg = &fi_ibv_msg_srq_ep_msg_ops; +- } +- +- attr.qp_type = IBV_QPT_RC; +- attr.sq_sig_all = 0; +- attr.qp_context = ep; +- +- ret = rdma_create_qp(ep->id, pd, &attr); +- if (ret) { +- ret = -errno; +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to create rdma qp: %s (%d)\n", +- fi_strerror(-ret), -ret); +- return ret; +- } +- return 0; +-} +- +-static int fi_ibv_msg_ep_control(struct fid *fid, int command, void *arg) +-{ +- struct fid_ep *ep; +- +- switch (fid->fclass) { +- case FI_CLASS_EP: +- ep = container_of(fid, struct fid_ep, fid); +- switch (command) { +- case FI_ENABLE: +- return fi_ibv_msg_ep_enable(ep); +- break; +- default: +- return -FI_ENOSYS; +- } +- break; +- default: +- return -FI_ENOSYS; +- } +-} +- +-static struct fi_ops fi_ibv_msg_ep_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_msg_ep_close, +- .bind = fi_ibv_msg_ep_bind, +- .control = fi_ibv_msg_ep_control, +- .ops_open = fi_no_ops_open, +-}; +- +-int fi_ibv_open_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep_fid, void *context) +-{ +- struct fi_ibv_domain *dom; +- struct fi_ibv_msg_ep *ep; +- struct fi_ibv_connreq *connreq; +- struct fi_ibv_pep *pep; +- struct fi_info *fi; +- int ret; +- +- dom = container_of(domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (strcmp(dom->verbs->device->name, info->domain_attr->name)) { +- VERBS_INFO(FI_LOG_DOMAIN, "Invalid info->domain_attr->name\n"); +- return -FI_EINVAL; +- } +- +- fi = dom->info; +- +- if (info->ep_attr) { +- ret = fi_ibv_check_ep_attr(info, fi); +- if (ret) +- return ret; +- } +- +- if (info->tx_attr) { +- ret = ofi_check_tx_attr(&fi_ibv_prov, fi->tx_attr, +- info->tx_attr, info->mode); +- if (ret) +- return ret; +- } +- +- if (info->rx_attr) { +- ret = fi_ibv_check_rx_attr(info->rx_attr, info, fi); +- if (ret) +- return ret; +- } +- +- ep = fi_ibv_alloc_msg_ep(info); +- if (!ep) +- return -FI_ENOMEM; +- +- if (!info->handle) { +- ret = fi_ibv_create_ep(NULL, NULL, 0, info, NULL, &ep->id); +- if (ret) +- goto err1; +- } else if (info->handle->fclass == FI_CLASS_CONNREQ) { +- connreq = container_of(info->handle, struct fi_ibv_connreq, handle); +- ep->id = connreq->id; +- } else if (info->handle->fclass == FI_CLASS_PEP) { +- pep = container_of(info->handle, struct fi_ibv_pep, pep_fid.fid); +- ep->id = pep->id; +- pep->id = NULL; +- +- if (rdma_resolve_addr(ep->id, info->src_addr, info->dest_addr, +- VERBS_RESOLVE_TIMEOUT)) { +- ret = -errno; +- VERBS_INFO(FI_LOG_DOMAIN, "Unable to rdma_resolve_addr\n"); +- goto err2; +- } +- +- if (rdma_resolve_route(ep->id, VERBS_RESOLVE_TIMEOUT)) { +- ret = -errno; +- VERBS_INFO(FI_LOG_DOMAIN, "Unable to rdma_resolve_route\n"); +- goto err2; +- } +- } else { +- ret = -FI_ENOSYS; +- goto err1; +- } +- +- fastlock_init(&ep->wre_lock); +- ret = util_buf_pool_create(&ep->wre_pool, sizeof(struct fi_ibv_wre), +- 16, 0, VERBS_WRE_CNT); +- if (ret) { +- VERBS_WARN(FI_LOG_CQ, "Failed to create wre_pool\n"); +- goto err3; +- } +- dlist_init(&ep->wre_list); +- +- ep->id->context = &ep->ep_fid.fid; +- ep->ep_fid.fid.fclass = FI_CLASS_EP; +- ep->ep_fid.fid.context = context; +- ep->ep_fid.fid.ops = &fi_ibv_msg_ep_ops; +- ep->ep_fid.ops = &fi_ibv_msg_ep_base_ops; +- ep->ep_fid.msg = &fi_ibv_msg_ep_msg_ops; +- ep->ep_fid.cm = &fi_ibv_msg_ep_cm_ops; +- ep->ep_fid.rma = &fi_ibv_msg_ep_rma_ops; +- ep->ep_fid.atomic = &fi_ibv_msg_ep_atomic_ops; +- +- ofi_atomic_initialize32(&ep->unsignaled_send_cnt, 0); +- ofi_atomic_initialize32(&ep->comp_pending, 0); +- /* The `send_signal_thr` and `send_comp_thr` values are necessary to avoid +- * overrun the send queue size */ +- /* A signaled Send Request must be posted when the `send_signal_thr` +- * value is reached */ +- ep->send_signal_thr = (ep->info->tx_attr->size * 4) / 5; +- /* Polling of CQ for internal signaled Send Requests must be initiated upon +- * reaching the `send_comp_thr` value */ +- ep->send_comp_thr = (ep->info->tx_attr->size * 9) / 10; +- +- ep->domain = dom; +- *ep_fid = &ep->ep_fid; +- +- return FI_SUCCESS; +-err3: +- fastlock_destroy(&ep->wre_lock); +-err2: +- rdma_destroy_ep(ep->id); +-err1: +- fi_ibv_free_msg_ep(ep); +- return ret; +-} +- +-static int fi_ibv_pep_bind(fid_t fid, struct fid *bfid, uint64_t flags) +-{ +- struct fi_ibv_pep *pep; +- int ret; +- +- pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); +- if (bfid->fclass != FI_CLASS_EQ) +- return -FI_EINVAL; +- +- pep->eq = container_of(bfid, struct fi_ibv_eq, eq_fid.fid); +- ret = rdma_migrate_id(pep->id, pep->eq->channel); +- if (ret) +- return -errno; +- +- return 0; +-} +- +-static int fi_ibv_pep_control(struct fid *fid, int command, void *arg) +-{ +- struct fi_ibv_pep *pep; +- int ret = 0; +- +- switch (fid->fclass) { +- case FI_CLASS_PEP: +- pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); +- switch (command) { +- case FI_BACKLOG: +- if (!arg) +- return -FI_EINVAL; +- pep->backlog = *(int *) arg; +- break; +- default: +- ret = -FI_ENOSYS; +- break; +- } +- break; +- default: +- ret = -FI_ENOSYS; +- break; +- } +- +- return ret; +-} +- +-static int fi_ibv_pep_close(fid_t fid) +-{ +- struct fi_ibv_pep *pep; +- +- pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); +- if (pep->id) +- rdma_destroy_ep(pep->id); +- +- fi_freeinfo(pep->info); +- free(pep); +- return 0; +-} +- +-static struct fi_ops fi_ibv_pep_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_pep_close, +- .bind = fi_ibv_pep_bind, +- .control = fi_ibv_pep_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static struct fi_ops_ep fi_ibv_pep_ops = { +- .size = sizeof(struct fi_ops_ep), +- .getopt = fi_ibv_msg_ep_getopt, +- .setopt = fi_no_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-int fi_ibv_passive_ep(struct fid_fabric *fabric, struct fi_info *info, +- struct fid_pep **pep, void *context) +-{ +- struct fi_ibv_pep *_pep; +- int ret; +- +- _pep = calloc(1, sizeof *_pep); +- if (!_pep) +- return -FI_ENOMEM; +- +- if (!(_pep->info = fi_dupinfo(info))) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- +- ret = rdma_create_id(NULL, &_pep->id, &_pep->pep_fid.fid, RDMA_PS_TCP); +- if (ret) { +- VERBS_INFO(FI_LOG_DOMAIN, "Unable to create rdma_cm_id\n"); +- goto err2; +- } +- +- if (info->src_addr) { +- ret = rdma_bind_addr(_pep->id, (struct sockaddr *)info->src_addr); +- if (ret) { +- VERBS_INFO(FI_LOG_DOMAIN, "Unable to bind address to rdma_cm_id\n"); +- goto err3; +- } +- _pep->bound = 1; +- } +- +- _pep->pep_fid.fid.fclass = FI_CLASS_PEP; +- _pep->pep_fid.fid.context = context; +- _pep->pep_fid.fid.ops = &fi_ibv_pep_fi_ops; +- _pep->pep_fid.ops = &fi_ibv_pep_ops; +- _pep->pep_fid.cm = fi_ibv_pep_ops_cm(_pep); +- +- _pep->src_addrlen = info->src_addrlen; +- +- *pep = &_pep->pep_fid; +- return 0; +- +-err3: +- rdma_destroy_id(_pep->id); +-err2: +- fi_freeinfo(_pep->info); +-err1: +- free(_pep); +- return ret; +-} +- +-#define VERBS_SIGNAL_SEND(ep) \ +- (ofi_atomic_get32(&ep->unsignaled_send_cnt) >= (ep)->send_signal_thr && \ +- !ofi_atomic_get32(&ep->comp_pending)) +- +-static inline int +-fi_ibv_signal_send(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr) +-{ +- struct fi_ibv_msg_epe *epe; +- +- fastlock_acquire(&ep->scq->lock); +- if (VERBS_SIGNAL_SEND(ep)) { +- epe = util_buf_alloc(ep->scq->epe_pool); +- if (!epe) { +- fastlock_release(&ep->scq->lock); +- return -FI_ENOMEM; +- } +- memset(epe, 0, sizeof(*epe)); +- wr->send_flags |= IBV_SEND_SIGNALED; +- wr->wr_id = ep->ep_id; +- epe->ep = ep; +- slist_insert_tail(&epe->entry, &ep->scq->ep_list); +- ofi_atomic_inc32(&ep->comp_pending); +- } +- fastlock_release(&ep->scq->lock); +- return 0; +-} +- +-static inline int +-fi_ibv_prepare_signal_send(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, +- struct fi_ibv_wre **wre, void *context) +-{ +- fastlock_acquire(&ep->wre_lock); +- *wre = util_buf_alloc(ep->wre_pool); +- if (OFI_UNLIKELY(!*wre)) { +- fastlock_release(&ep->wre_lock); +- return -FI_EAGAIN; +- } +- dlist_insert_tail(&(*wre)->entry, &ep->wre_list); +- fastlock_release(&ep->wre_lock); +- +- (*wre)->context = context; +- (*wre)->ep = ep; +- (*wre)->wr_type = IBV_SEND_WR; +- wr->wr_id = (uintptr_t)*wre; +- +- assert((wr->wr_id & ep->scq->wr_id_mask) != ep->scq->send_signal_wr_id); +- ofi_atomic_set32(&ep->unsignaled_send_cnt, 0); +- +- return FI_SUCCESS; +-} +- +-static int fi_ibv_reap_comp(struct fi_ibv_msg_ep *ep) +-{ +- struct fi_ibv_wce *wce = NULL; +- int got_wc = 0; +- int ret = 0; +- +- fastlock_acquire(&ep->scq->lock); +- while (ofi_atomic_get32(&ep->comp_pending) > 0) { +- if (!wce) { +- wce = util_buf_alloc(ep->scq->wce_pool); +- if (!wce) { +- fastlock_release(&ep->scq->lock); +- return -FI_ENOMEM; +- } +- memset(wce, 0, sizeof(*wce)); +- } +- ret = fi_ibv_poll_cq(ep->scq, &wce->wc); +- if (ret < 0) { +- VERBS_WARN(FI_LOG_EP_DATA, +- "Failed to read completion for signaled send\n"); +- util_buf_release(ep->scq->wce_pool, wce); +- fastlock_release(&ep->scq->lock); +- return ret; +- } else if (ret > 0) { +- slist_insert_tail(&wce->entry, &ep->scq->wcq); +- got_wc = 1; +- wce = NULL; +- } +- } +- if (wce) +- util_buf_release(ep->scq->wce_pool, wce); +- +- if (got_wc && ep->scq->channel) +- ret = fi_ibv_cq_signal(&ep->scq->cq_fid); +- +- fastlock_release(&ep->scq->lock); +- return ret; +-} +- +-/* WR must be filled out by now except for context */ +-static inline ssize_t +-fi_ibv_send(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, void *context) +-{ +- struct fi_ibv_wre *wre = NULL; +- int ret; +- +- if (wr->send_flags & IBV_SEND_SIGNALED) { +- ret = fi_ibv_prepare_signal_send(ep, wr, &wre, context); +- if (OFI_UNLIKELY(ret)) +- return ret; +- } else { +- if (VERBS_SIGNAL_SEND(ep)) { +- ret = fi_ibv_signal_send(ep, wr); +- if (ret) +- return ret; +- } else { +- wr->wr_id = 0ULL; +- if (ofi_atomic_inc32(&ep->unsignaled_send_cnt) >= +- ep->send_comp_thr) { +- ret = fi_ibv_reap_comp(ep); +- if (ret) +- return ret; +- } +- } +- } +- +- return FI_IBV_INVOKE_POST(send, send, ep->id->qp, wr, +- FI_IBV_RELEASE_WRE(ep, wre)); +-} +- +-static inline ssize_t +-fi_ibv_send_buf(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, +- const void *buf, size_t len, void *desc, void *context) +-{ +- struct ibv_sge sge = fi_ibv_init_sge(buf, len, desc); +- +- wr->sg_list = &sge; +- wr->num_sge = 1; +- +- return fi_ibv_send(ep, wr, context); +-} +- +-static inline ssize_t +-fi_ibv_send_buf_inline(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, +- const void *buf, size_t len) +-{ +- struct ibv_sge sge = fi_ibv_init_sge_inline(buf, len); +- +- wr->sg_list = &sge; +- wr->num_sge = 1; +- +- return fi_ibv_send(ep, wr, NULL); +-} +- +-static inline ssize_t +-fi_ibv_send_iov_flags(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, +- const struct iovec *iov, void **desc, int count, +- void *context, uint64_t flags) +-{ +- size_t len = 0; +- +- if (!desc) +- fi_ibv_set_sge_iov_inline(wr->sg_list, iov, count, len); +- else +- fi_ibv_set_sge_iov(wr->sg_list, iov, count, desc, len); +- +- wr->num_sge = count; +- wr->send_flags = VERBS_INJECT_FLAGS(ep, len, flags) | VERBS_COMP_FLAGS(ep, flags); +- +- if (flags & FI_FENCE) +- wr->send_flags |= IBV_SEND_FENCE; +- +- return fi_ibv_send(ep, wr, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct fi_ibv_wre *wre; +- struct ibv_sge *sge = NULL; +- struct ibv_recv_wr wr = { +- .num_sge = msg->iov_count, +- .next = NULL, +- }; +- size_t i; +- +- assert(ep->rcq); +- +- fastlock_acquire(&ep->wre_lock); +- wre = util_buf_alloc(ep->wre_pool); +- if (OFI_UNLIKELY(!wre)) { +- fastlock_release(&ep->wre_lock); +- return -FI_EAGAIN; +- } +- dlist_insert_tail(&wre->entry, &ep->wre_list); +- fastlock_release(&ep->wre_lock); +- +- wre->ep = ep; +- wre->srq = NULL; +- wre->context = msg->context; +- wre->wr_type = IBV_RECV_WR; +- +- wr.wr_id = (uintptr_t)wre; +- sge = alloca(sizeof(*sge) * msg->iov_count); +- for (i = 0; i < msg->iov_count; i++) { +- sge[i].addr = (uintptr_t)msg->msg_iov[i].iov_base; +- sge[i].length = (uint32_t)msg->msg_iov[i].iov_len; +- sge[i].lkey = (uint32_t)(uintptr_t)(msg->desc[i]); +- } +- wr.sg_list = sge; +- +- return FI_IBV_INVOKE_POST(recv, recv, ep->id->qp, &wr, +- FI_IBV_RELEASE_WRE(ep, wre)); +-} +- +-static ssize_t +-fi_ibv_msg_ep_recv(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = buf, +- .iov_len = len, +- }; +- struct fi_msg msg = { +- .msg_iov = &iov, +- .desc = &desc, +- .iov_count = 1, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_msg_ep_recvmsg(ep, &msg, 0); +-} +- +-static ssize_t +-fi_ibv_msg_ep_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) +-{ +- struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_msg_ep_recvmsg(ep, &msg, 0); +-} +- +-static ssize_t +-fi_ibv_msg_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { 0 }; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- wr.opcode = IBV_WR_SEND_WITH_IMM; +- wr.imm_data = htonl((uint32_t)msg->data); +- } else { +- wr.opcode = IBV_WR_SEND; +- } +- +- return fi_ibv_send_msg(ep, &wr, msg, flags); +-} +- +-static ssize_t +-fi_ibv_msg_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_SEND, +- .send_flags = VERBS_INJECT(ep, len) | VERBS_COMP(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, uint64_t data, fi_addr_t dest_addr, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_SEND_WITH_IMM, +- .imm_data = htonl((uint32_t)data), +- .send_flags = VERBS_INJECT(ep, len) | VERBS_COMP(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, void *context) +-{ +- struct fi_ibv_msg_ep *ep; +- struct ibv_send_wr wr = { 0 }; +- +- wr.opcode = IBV_WR_SEND; +- +- ep = container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- return fi_ibv_send_iov(ep, &wr, iov, desc, count, context); +-} +- +-static ssize_t fi_ibv_msg_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, +- fi_addr_t dest_addr) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_SEND, +- .send_flags = IBV_SEND_INLINE, +- }; +- +- return fi_ibv_send_buf_inline(ep, &wr, buf, len); +-} +- +-static ssize_t fi_ibv_msg_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_SEND_WITH_IMM, +- .imm_data = htonl((uint32_t)data), +- .send_flags = IBV_SEND_INLINE, +- }; +- +- return fi_ibv_send_buf_inline(ep, &wr, buf, len); +-} +- +-struct fi_ops_msg fi_ibv_msg_ep_msg_ops = { +- .size = sizeof(struct fi_ops_msg), +- .recv = fi_ibv_msg_ep_recv, +- .recvv = fi_ibv_msg_ep_recvv, +- .recvmsg = fi_ibv_msg_ep_recvmsg, +- .send = fi_ibv_msg_ep_send, +- .sendv = fi_ibv_msg_ep_sendv, +- .sendmsg = fi_ibv_msg_ep_sendmsg, +- .inject = fi_ibv_msg_ep_inject, +- .senddata = fi_ibv_msg_ep_senddata, +- .injectdata = fi_ibv_msg_ep_injectdata, +-}; +- +-struct fi_ops_msg fi_ibv_msg_srq_ep_msg_ops = { +- .size = sizeof(struct fi_ops_msg), +- .recv = fi_no_msg_recv, +- .recvv = fi_no_msg_recvv, +- .recvmsg = fi_no_msg_recvmsg, +- .send = fi_ibv_msg_ep_send, +- .sendv = fi_ibv_msg_ep_sendv, +- .sendmsg = fi_ibv_msg_ep_sendmsg, +- .inject = fi_ibv_msg_ep_inject, +- .senddata = fi_ibv_msg_ep_senddata, +- .injectdata = fi_ibv_msg_ep_injectdata, +-}; +- +-#define VERBS_COMP_READ_FLAGS(ep, flags) \ +- ((!VERBS_SELECTIVE_COMP(ep) || (flags & \ +- (FI_COMPLETION | FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE))) ? \ +- IBV_SEND_SIGNALED : 0) +-#define VERBS_COMP_READ(ep) \ +- VERBS_COMP_READ_FLAGS(ep, ep->info->tx_attr->op_flags) +- +-static ssize_t +-fi_ibv_msg_ep_rma_write(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = VERBS_INJECT(ep, len) | VERBS_COMP(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_writev(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key +- }; +- +- return fi_ibv_send_iov(ep, &wr, iov, desc, count, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .wr.rdma.remote_addr = msg->rma_iov->addr, +- .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, +- }; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; +- wr.imm_data = htonl((uint32_t)msg->data); +- } else { +- wr.opcode = IBV_WR_RDMA_WRITE; +- } +- +- return fi_ibv_send_msg(ep, &wr, msg, flags); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_read(struct fid_ep *ep_fid, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_READ, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = VERBS_COMP_READ(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_readv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_READ, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = VERBS_COMP_READ(ep), +- .num_sge = count, +- }; +- size_t len = 0; +- +- fi_ibv_set_sge_iov(wr.sg_list, iov, count, desc, len); +- +- return fi_ibv_send(ep, &wr, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_READ, +- .wr.rdma.remote_addr = msg->rma_iov->addr, +- .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, +- .send_flags = VERBS_COMP_READ_FLAGS(ep, flags), +- .num_sge = msg->iov_count, +- }; +- size_t len = 0; +- +- fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc, len); +- +- return fi_ibv_send(ep, &wr, msg->context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, uint64_t data, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, +- .imm_data = htonl((uint32_t)data), +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = VERBS_INJECT(ep, len) | VERBS_COMP(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_inject_write(struct fid_ep *ep_fid, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = IBV_SEND_INLINE, +- }; +- +- return fi_ibv_send_buf_inline(ep, &wr, buf, len); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_inject_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, +- .imm_data = htonl((uint32_t)data), +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = IBV_SEND_INLINE, +- }; +- +- return fi_ibv_send_buf_inline(ep, &wr, buf, len); +-} +- +-struct fi_ops_rma fi_ibv_msg_ep_rma_ops = { +- .size = sizeof(struct fi_ops_rma), +- .read = fi_ibv_msg_ep_rma_read, +- .readv = fi_ibv_msg_ep_rma_readv, +- .readmsg = fi_ibv_msg_ep_rma_readmsg, +- .write = fi_ibv_msg_ep_rma_write, +- .writev = fi_ibv_msg_ep_rma_writev, +- .writemsg = fi_ibv_msg_ep_rma_writemsg, +- .inject = fi_ibv_msg_ep_rma_inject_write, +- .writedata = fi_ibv_msg_ep_rma_writedata, +- .injectdata = fi_ibv_msg_ep_rma_inject_writedata, +-}; +- +-#define fi_ibv_atomicvalid(name, flags) \ +-static int fi_ibv_msg_ep_atomic_ ## name(struct fid_ep *ep_fid, \ +- enum fi_datatype datatype, \ +- enum fi_op op, size_t *count) \ +-{ \ +- struct fi_ibv_msg_ep *ep = container_of(ep_fid, \ +- struct fi_ibv_msg_ep, \ +- ep_fid); \ +- struct fi_atomic_attr attr; \ +- int ret; \ +- \ +- ret = fi_ibv_query_atomic(&ep->domain->util_domain.domain_fid, \ +- datatype, op, &attr, flags); \ +- if (!ret) \ +- *count = attr.count; \ +- return ret; \ +-} \ +- +-fi_ibv_atomicvalid(writevalid, 0); +-fi_ibv_atomicvalid(readwritevalid, FI_FETCH_ATOMIC); +-fi_ibv_atomicvalid(compwritevalid, FI_COMPARE_ATOMIC); +- +-int fi_ibv_query_atomic(struct fid_domain *domain_fid, enum fi_datatype datatype, +- enum fi_op op, struct fi_atomic_attr *attr, +- uint64_t flags) +-{ +- struct fi_ibv_domain *domain = container_of(domain_fid, +- struct fi_ibv_domain, +- util_domain.domain_fid); +- char *log_str_fetch = "fi_fetch_atomic with FI_SUM op"; +- char *log_str_comp = "fi_compare_atomic"; +- char *log_str; +- +- if (flags & FI_TAGGED) +- return -FI_ENOSYS; +- +- if ((flags & FI_FETCH_ATOMIC) && (flags & FI_COMPARE_ATOMIC)) +- return -FI_EBADFLAGS; +- +- if (!flags) { +- switch (op) { +- case FI_ATOMIC_WRITE: +- break; +- default: +- return -FI_ENOSYS; +- } +- } else { +- if (flags & FI_FETCH_ATOMIC) { +- switch (op) { +- case FI_ATOMIC_READ: +- goto check_datatype; +- case FI_SUM: +- log_str = log_str_fetch; +- break; +- default: +- return -FI_ENOSYS; +- } +- } else if (flags & FI_COMPARE_ATOMIC) { +- if (op != FI_CSWAP) +- return -FI_ENOSYS; +- log_str = log_str_comp; +- } else { +- return -FI_EBADFLAGS; +- } +- if (domain->info->tx_attr->op_flags & FI_INJECT) { +- VERBS_INFO(FI_LOG_EP_DATA, +- "FI_INJECT not supported for %s\n", log_str); +- return -FI_EINVAL; +- } +- } +-check_datatype: +- switch (datatype) { +- case FI_INT64: +- case FI_UINT64: +-#if __BITS_PER_LONG == 64 +- case FI_DOUBLE: +- case FI_FLOAT: +-#endif +- break; +- default: +- return -FI_EINVAL; +- } +- +- attr->size = ofi_datatype_size(datatype); +- if (attr->size == 0) +- return -FI_EINVAL; +- +- attr->count = 1; +- return 0; +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, +- void *desc, fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, enum fi_op op, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)(uintptr_t)key, +- .send_flags = VERBS_INJECT(ep, sizeof(uint64_t)) | +- VERBS_COMP(ep) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(count != 1)) +- return -FI_E2BIG; +- +- if (OFI_UNLIKELY(op != FI_ATOMIC_WRITE)) +- return -FI_ENOSYS; +- +- count_copy = count; +- +- ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, datatype, op, &count_copy); +- if (ret) +- return ret; +- +- return fi_ibv_send_buf(ep, &wr, buf, sizeof(uint64_t), desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_writev(struct fid_ep *ep, +- const struct fi_ioc *iov, void **desc, size_t count, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, enum fi_op op, void *context) +-{ +- if (OFI_UNLIKELY(iov->count != 1)) +- return -FI_E2BIG; +- +- return fi_ibv_msg_ep_atomic_write(ep, iov->addr, count, desc[0], +- dest_addr, addr, key, datatype, op, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_writemsg(struct fid_ep *ep_fid, +- const struct fi_msg_atomic *msg, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .wr.rdma.remote_addr = msg->rma_iov->addr, +- .wr.rdma.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, +- .send_flags = VERBS_INJECT_FLAGS(ep, sizeof(uint64_t), flags) | +- VERBS_COMP_FLAGS(ep, flags) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) +- return -FI_E2BIG; +- +- if (OFI_UNLIKELY(msg->op != FI_ATOMIC_WRITE)) +- return -FI_ENOSYS; +- +- count_copy = msg->iov_count; +- +- ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, msg->datatype, msg->op, +- &count_copy); +- if (ret) +- return ret; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; +- wr.imm_data = htonl((uint32_t)msg->data); +- } else { +- wr.opcode = IBV_WR_RDMA_WRITE; +- } +- +- return fi_ibv_send_buf(ep, &wr, msg->msg_iov->addr, sizeof(uint64_t), +- msg->desc[0], msg->context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, size_t count, +- void *desc, void *result, void *result_desc, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, +- enum fi_op op, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .send_flags = VERBS_COMP(ep) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(count != 1)) +- return -FI_E2BIG; +- +- count_copy = count; +- +- ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, datatype, op, +- &count_copy); +- if (ret) +- return ret; +- +- switch (op) { +- case FI_ATOMIC_READ: +- wr.opcode = IBV_WR_RDMA_READ; +- wr.wr.rdma.remote_addr = addr; +- wr.wr.rdma.rkey = (uint32_t)(uintptr_t)key; +- break; +- case FI_SUM: +- wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; +- wr.wr.atomic.remote_addr = addr; +- wr.wr.atomic.compare_add = (uintptr_t)buf; +- wr.wr.atomic.swap = 0; +- wr.wr.atomic.rkey = (uint32_t)(uintptr_t)key; +- break; +- default: +- return -FI_ENOSYS; +- } +- +- return fi_ibv_send_buf(ep, &wr, result, sizeof(uint64_t), result_desc, +- context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_readwritev(struct fid_ep *ep, const struct fi_ioc *iov, +- void **desc, size_t count, +- struct fi_ioc *resultv, void **result_desc, +- size_t result_count, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key, enum fi_datatype datatype, +- enum fi_op op, void *context) +-{ +- if (OFI_UNLIKELY(iov->count != 1)) +- return -FI_E2BIG; +- +- return fi_ibv_msg_ep_atomic_readwrite(ep, iov->addr, count, +- desc[0], resultv->addr, result_desc[0], +- dest_addr, addr, key, datatype, op, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_readwritemsg(struct fid_ep *ep_fid, +- const struct fi_msg_atomic *msg, +- struct fi_ioc *resultv, void **result_desc, +- size_t result_count, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .send_flags = VERBS_COMP_FLAGS(ep, flags) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) +- return -FI_E2BIG; +- +- count_copy = msg->iov_count; +- +- ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, msg->datatype, msg->op, +- &count_copy); +- if (ret) +- return ret; +- +- switch (msg->op) { +- case FI_ATOMIC_READ: +- wr.opcode = IBV_WR_RDMA_READ; +- wr.wr.rdma.remote_addr = msg->rma_iov->addr; +- wr.wr.rdma.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; +- break; +- case FI_SUM: +- wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; +- wr.wr.atomic.remote_addr = msg->rma_iov->addr; +- wr.wr.atomic.compare_add = (uintptr_t) msg->addr; +- wr.wr.atomic.swap = 0; +- wr.wr.atomic.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; +- break; +- default: +- return -FI_ENOSYS; +- } +- +- if (flags & FI_REMOTE_CQ_DATA) +- wr.imm_data = htonl((uint32_t) msg->data); +- +- return fi_ibv_send_buf(ep, &wr, resultv->addr, sizeof(uint64_t), +- result_desc[0], msg->context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, size_t count, +- void *desc, const void *compare, +- void *compare_desc, void *result, +- void *result_desc, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, +- enum fi_op op, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, +- .wr.atomic.remote_addr = addr, +- .wr.atomic.compare_add = (uintptr_t)compare, +- .wr.atomic.swap = (uintptr_t)buf, +- .wr.atomic.rkey = (uint32_t)(uintptr_t)key, +- .send_flags = VERBS_COMP(ep) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(count != 1)) +- return -FI_E2BIG; +- +- count_copy = count; +- +- ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, datatype, op, &count_copy); +- if (ret) +- return ret; +- +- return fi_ibv_send_buf(ep, &wr, result, sizeof(uint64_t), result_desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_compwritev(struct fid_ep *ep, const struct fi_ioc *iov, +- void **desc, size_t count, +- const struct fi_ioc *comparev, +- void **compare_desc, size_t compare_count, +- struct fi_ioc *resultv, void **result_desc, +- size_t result_count, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, +- enum fi_op op, void *context) +-{ +- if (OFI_UNLIKELY(iov->count != 1)) +- return -FI_E2BIG; +- +- return fi_ibv_msg_ep_atomic_compwrite(ep, iov->addr, count, desc[0], +- comparev->addr, compare_desc[0], resultv->addr, +- result_desc[0], dest_addr, addr, key, +- datatype, op, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_compwritemsg(struct fid_ep *ep_fid, +- const struct fi_msg_atomic *msg, +- const struct fi_ioc *comparev, +- void **compare_desc, size_t compare_count, +- struct fi_ioc *resultv, +- void **result_desc, size_t result_count, +- uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, +- .wr.atomic.remote_addr = msg->rma_iov->addr, +- .wr.atomic.compare_add = (uintptr_t)comparev->addr, +- .wr.atomic.swap = (uintptr_t)msg->addr, +- .wr.atomic.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, +- .send_flags = VERBS_COMP_FLAGS(ep, flags) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) +- return -FI_E2BIG; +- +- count_copy = msg->iov_count; +- +- ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, msg->datatype, msg->op, +- &count_copy); +- if (ret) +- return ret; +- +- if (flags & FI_REMOTE_CQ_DATA) +- wr.imm_data = htonl((uint32_t) msg->data); +- +- return fi_ibv_send_buf(ep, &wr, resultv->addr, sizeof(uint64_t), +- result_desc[0], msg->context); +-} +- +-struct fi_ops_atomic fi_ibv_msg_ep_atomic_ops = { +- .size = sizeof(struct fi_ops_atomic), +- .write = fi_ibv_msg_ep_atomic_write, +- .writev = fi_ibv_msg_ep_atomic_writev, +- .writemsg = fi_ibv_msg_ep_atomic_writemsg, +- .inject = fi_no_atomic_inject, +- .readwrite = fi_ibv_msg_ep_atomic_readwrite, +- .readwritev = fi_ibv_msg_ep_atomic_readwritev, +- .readwritemsg = fi_ibv_msg_ep_atomic_readwritemsg, +- .compwrite = fi_ibv_msg_ep_atomic_compwrite, +- .compwritev = fi_ibv_msg_ep_atomic_compwritev, +- .compwritemsg = fi_ibv_msg_ep_atomic_compwritemsg, +- .writevalid = fi_ibv_msg_ep_atomic_writevalid, +- .readwritevalid = fi_ibv_msg_ep_atomic_readwritevalid, +- .compwritevalid = fi_ibv_msg_ep_atomic_compwritevalid +-}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_rma.c +new file mode 100644 +index 0000000..702c895 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_rma.c +@@ -0,0 +1,533 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++ ++#include "fi_verbs.h" ++ ++ ++#define VERBS_COMP_READ_FLAGS(ep, flags, context) \ ++ (((ep)->util_ep.tx_op_flags | (flags)) & \ ++ (FI_COMPLETION | FI_TRANSMIT_COMPLETE | \ ++ FI_DELIVERY_COMPLETE) ? context : VERBS_NO_COMP_FLAG) ++ ++#define VERBS_COMP_READ(ep, context) \ ++ VERBS_COMP_READ_FLAGS(ep, 0, context) ++ ++static ssize_t ++fi_ibv_msg_ep_rma_write(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_writev(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ }; ++ ++ return fi_ibv_send_iov(ep, &wr, iov, desc, count); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, ++ }; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_RDMA_WRITE; ++ } ++ ++ return fi_ibv_send_msg(ep, &wr, msg, flags); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_read(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_readv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .num_sge = count, ++ }; ++ ++ fi_ibv_set_sge_iov(wr.sg_list, iov, count, desc); ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &wr); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ_FLAGS(ep, flags, (uintptr_t)msg->context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, ++ .num_sge = msg->iov_count, ++ }; ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &wr); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_inject_write(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_rma_write_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct fi_ibv_ep *ep; ++ ++ ep = container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->rma_wr.wr.rdma.remote_addr = addr; ++ ep->wrs->rma_wr.wr.rdma.rkey = (uint32_t) key; ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->rma_wr); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_inject_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_inject_writedata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) ++{ ++ ssize_t ret; ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ep->wrs->rma_wr.wr.rdma.remote_addr = addr; ++ ep->wrs->rma_wr.wr.rdma.rkey = (uint32_t) key; ++ ++ ep->wrs->rma_wr.imm_data = htonl((uint32_t) data); ++ ep->wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ ret = fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->rma_wr); ++ ep->wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE; ++ return ret; ++} ++ ++struct fi_ops_rma fi_ibv_msg_ep_rma_ops_ts = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_ibv_msg_ep_rma_read, ++ .readv = fi_ibv_msg_ep_rma_readv, ++ .readmsg = fi_ibv_msg_ep_rma_readmsg, ++ .write = fi_ibv_msg_ep_rma_write, ++ .writev = fi_ibv_msg_ep_rma_writev, ++ .writemsg = fi_ibv_msg_ep_rma_writemsg, ++ .inject = fi_ibv_msg_ep_rma_inject_write, ++ .writedata = fi_ibv_msg_ep_rma_writedata, ++ .injectdata = fi_ibv_msg_ep_rma_inject_writedata, ++}; ++ ++struct fi_ops_rma fi_ibv_msg_ep_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_ibv_msg_ep_rma_read, ++ .readv = fi_ibv_msg_ep_rma_readv, ++ .readmsg = fi_ibv_msg_ep_rma_readmsg, ++ .write = fi_ibv_msg_ep_rma_write, ++ .writev = fi_ibv_msg_ep_rma_writev, ++ .writemsg = fi_ibv_msg_ep_rma_writemsg, ++ .inject = fi_ibv_rma_write_fast, ++ .writedata = fi_ibv_msg_ep_rma_writedata, ++ .injectdata = fi_ibv_msg_ep_rma_inject_writedata_fast, ++}; ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, void *desc, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = VERBS_INJECT(&ep->base_ep, len), ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_writev(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_iov(&ep->base_ep, &wr, iov, desc, count); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_RDMA_WRITE; ++ } ++ ++ return fi_ibv_send_msg(&ep->base_ep, &wr, msg, flags); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_read(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, uint64_t addr, ++ uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_readv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t src_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .num_sge = count, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, iov, count, desc); ++ ++ return fi_ibv_send_poll_cq_if_needed(&ep->base_ep, &wr); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_readmsg(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ_FLAGS(&ep->base_ep, flags, ++ (uintptr_t)msg->context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, ++ .num_sge = msg->iov_count, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_send_poll_cq_if_needed(&ep->base_ep, &wr); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_writedata(struct fid_ep *ep_fid, const void *buf, ++ size_t len, void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = VERBS_INJECT(&ep->base_ep, len), ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_inject_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf_inline(&ep->base_ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_xrc_rma_write_fast(struct fid_ep *ep_fid, const void *buf, ++ size_t len, fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ ++ ep->base_ep.wrs->rma_wr.wr.rdma.remote_addr = addr; ++ ep->base_ep.wrs->rma_wr.wr.rdma.rkey = (uint32_t) key; ++ FI_IBV_SET_REMOTE_SRQN(ep->base_ep.wrs->rma_wr, ep->peer_srqn); ++ ep->base_ep.wrs->sge.addr = (uintptr_t) buf; ++ ep->base_ep.wrs->sge.length = (uint32_t) len; ++ ++ return fi_ibv_send_poll_cq_if_needed(&ep->base_ep, ++ &ep->base_ep.wrs->rma_wr); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_inject_writedata(struct fid_ep *ep_fid, ++ const void *buf, size_t len, uint64_t data, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf_inline(&ep->base_ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_inject_writedata_fast(struct fid_ep *ep_fid, ++ const void *buf, size_t len, uint64_t data, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ ssize_t ret; ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ ep->base_ep.wrs->rma_wr.wr.rdma.remote_addr = addr; ++ ep->base_ep.wrs->rma_wr.wr.rdma.rkey = (uint32_t) key; ++ FI_IBV_SET_REMOTE_SRQN(ep->base_ep.wrs->rma_wr, ep->peer_srqn); ++ ++ ep->base_ep.wrs->rma_wr.imm_data = htonl((uint32_t) data); ++ ep->base_ep.wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ ++ ep->base_ep.wrs->sge.addr = (uintptr_t) buf; ++ ep->base_ep.wrs->sge.length = (uint32_t) len; ++ ++ ret = fi_ibv_send_poll_cq_if_needed(&ep->base_ep, ++ &ep->base_ep.wrs->rma_wr); ++ ep->base_ep.wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE; ++ return ret; ++} ++ ++struct fi_ops_rma fi_ibv_msg_xrc_ep_rma_ops_ts = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_ibv_msg_xrc_ep_rma_read, ++ .readv = fi_ibv_msg_xrc_ep_rma_readv, ++ .readmsg = fi_ibv_msg_xrc_ep_rma_readmsg, ++ .write = fi_ibv_msg_xrc_ep_rma_write, ++ .writev = fi_ibv_msg_xrc_ep_rma_writev, ++ .writemsg = fi_ibv_msg_xrc_ep_rma_writemsg, ++ .inject = fi_ibv_msg_xrc_ep_rma_inject_write, ++ .writedata = fi_ibv_msg_xrc_ep_rma_writedata, ++ .injectdata = fi_ibv_msg_xrc_ep_rma_inject_writedata, ++}; ++ ++struct fi_ops_rma fi_ibv_msg_xrc_ep_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_ibv_msg_xrc_ep_rma_read, ++ .readv = fi_ibv_msg_xrc_ep_rma_readv, ++ .readmsg = fi_ibv_msg_xrc_ep_rma_readmsg, ++ .write = fi_ibv_msg_xrc_ep_rma_write, ++ .writev = fi_ibv_msg_xrc_ep_rma_writev, ++ .writemsg = fi_ibv_msg_xrc_ep_rma_writemsg, ++ .inject = fi_ibv_xrc_rma_write_fast, ++ .writedata = fi_ibv_msg_xrc_ep_rma_writedata, ++ .injectdata = fi_ibv_msg_xrc_ep_rma_inject_writedata_fast, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_srq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_srq.c +deleted file mode 100644 +index 23712da..0000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_srq.c ++++ /dev/null +@@ -1,275 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "config.h" +- +-#include "fi_verbs.h" +- +-static struct fi_ops_ep fi_ibv_srq_ep_base_ops = { +- .size = sizeof(struct fi_ops_ep), +- .cancel = fi_no_cancel, +- .getopt = fi_no_getopt, +- .setopt = fi_no_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-static struct fi_ops_cm fi_ibv_srq_cm_ops = { +- .size = sizeof(struct fi_ops_cm), +- .setname = fi_no_setname, +- .getname = fi_no_getname, +- .getpeer = fi_no_getpeer, +- .connect = fi_no_connect, +- .listen = fi_no_listen, +- .accept = fi_no_accept, +- .reject = fi_no_reject, +- .shutdown = fi_no_shutdown, +- .join = fi_no_join, +-}; +- +-static struct fi_ops_rma fi_ibv_srq_rma_ops = { +- .size = sizeof(struct fi_ops_rma), +- .read = fi_no_rma_read, +- .readv = fi_no_rma_readv, +- .readmsg = fi_no_rma_readmsg, +- .write = fi_no_rma_write, +- .writev = fi_no_rma_writev, +- .writemsg = fi_no_rma_writemsg, +- .inject = fi_no_rma_inject, +- .writedata = fi_no_rma_writedata, +- .injectdata = fi_no_rma_injectdata, +-}; +- +-static struct fi_ops_atomic fi_ibv_srq_atomic_ops = { +- .size = sizeof(struct fi_ops_atomic), +- .write = fi_no_atomic_write, +- .writev = fi_no_atomic_writev, +- .writemsg = fi_no_atomic_writemsg, +- .inject = fi_no_atomic_inject, +- .readwrite = fi_no_atomic_readwrite, +- .readwritev = fi_no_atomic_readwritev, +- .readwritemsg = fi_no_atomic_readwritemsg, +- .compwrite = fi_no_atomic_compwrite, +- .compwritev = fi_no_atomic_compwritev, +- .compwritemsg = fi_no_atomic_compwritemsg, +- .writevalid = fi_no_atomic_writevalid, +- .readwritevalid = fi_no_atomic_readwritevalid, +- .compwritevalid = fi_no_atomic_compwritevalid, +-}; +- +-static ssize_t +-fi_ibv_srq_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) +-{ +- struct fi_ibv_srq_ep *ep = +- container_of(ep_fid, struct fi_ibv_srq_ep, ep_fid); +- struct fi_ibv_wre *wre; +- struct ibv_sge *sge = NULL; +- struct ibv_recv_wr wr = { +- .num_sge = msg->iov_count, +- .next = NULL, +- }; +- size_t i; +- +- assert(ep->srq); +- +- fastlock_acquire(&ep->wre_lock); +- wre = util_buf_alloc(ep->wre_pool); +- if (!wre) { +- fastlock_release(&ep->wre_lock); +- return -FI_EAGAIN; +- } +- dlist_insert_tail(&wre->entry, &ep->wre_list); +- fastlock_release(&ep->wre_lock); +- +- wre->srq = ep; +- wre->ep = NULL; +- wre->context = msg->context; +- wre->wr_type = IBV_RECV_WR; +- +- wr.wr_id = (uintptr_t)wre; +- sge = alloca(sizeof(*sge) * msg->iov_count); +- for (i = 0; i < msg->iov_count; i++) { +- sge[i].addr = (uintptr_t)msg->msg_iov[i].iov_base; +- sge[i].length = (uint32_t)msg->msg_iov[i].iov_len; +- sge[i].lkey = (uint32_t)(uintptr_t)(msg->desc[i]); +- } +- wr.sg_list = sge; +- +- return FI_IBV_INVOKE_POST(srq_recv, recv, ep->srq, &wr, +- FI_IBV_RELEASE_WRE(ep, wre)); +-} +- +-static ssize_t +-fi_ibv_srq_ep_recv(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = buf, +- .iov_len = len, +- }; +- struct fi_msg msg = { +- .msg_iov = &iov, +- .desc = &desc, +- .iov_count = 1, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_srq_ep_recvmsg(ep, &msg, 0); +-} +- +-static ssize_t +-fi_ibv_srq_ep_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) +-{ +- struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_srq_ep_recvmsg(ep, &msg, 0); +-} +- +-static struct fi_ops_msg fi_ibv_srq_msg_ops = { +- .size = sizeof(struct fi_ops_msg), +- .recv = fi_ibv_srq_ep_recv, +- .recvv = fi_ibv_srq_ep_recvv, +- .recvmsg = fi_ibv_srq_ep_recvmsg, +- .send = fi_no_msg_send, +- .sendv = fi_no_msg_sendv, +- .sendmsg = fi_no_msg_sendmsg, +- .inject = fi_no_msg_inject, +- .senddata = fi_no_msg_senddata, +- .injectdata = fi_no_msg_injectdata, +-}; +- +-static int fi_ibv_srq_close(fid_t fid) +-{ +- struct fi_ibv_srq_ep *srq_ep; +- int ret; +- +- srq_ep = container_of(fid, struct fi_ibv_srq_ep, ep_fid.fid); +- ret = ibv_destroy_srq(srq_ep->srq); +- if (ret) +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Cannot destroy SRQ rc=%d\n", ret); +- +- /* All WCs from Receive CQ belongs to SRQ, no need to check EP. */ +- /* Assumes that all EP that associated with the SRQ have +- * already been closed (therefore, no more completions would +- * arrive in CQ for the recv posted to SRQ) */ +- /* Just to be clear, passes `IBV_RECV_WR`, because SRQ's WREs +- * have `IBV_RECV_WR` type only */ +- fi_ibv_empty_wre_list(srq_ep->wre_pool, &srq_ep->wre_list, IBV_RECV_WR); +- util_buf_pool_destroy(srq_ep->wre_pool); +- fastlock_destroy(&srq_ep->wre_lock); +- +- free(srq_ep); +- +- return FI_SUCCESS; +-} +- +-static struct fi_ops fi_ibv_srq_ep_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_srq_close, +- .bind = fi_no_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +- +-int fi_ibv_srq_context(struct fid_domain *domain, struct fi_rx_attr *attr, +- struct fid_ep **srq_ep_fid, void *context) +-{ +- struct ibv_srq_init_attr srq_init_attr = { 0 }; +- struct fi_ibv_domain *dom; +- struct fi_ibv_srq_ep *srq_ep; +- int ret; +- +- if (!domain) +- return -FI_EINVAL; +- +- srq_ep = calloc(1, sizeof(*srq_ep)); +- if (!srq_ep) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- +- dom = container_of(domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- +- srq_ep->ep_fid.fid.fclass = FI_CLASS_SRX_CTX; +- srq_ep->ep_fid.fid.context = context; +- srq_ep->ep_fid.fid.ops = &fi_ibv_srq_ep_ops; +- srq_ep->ep_fid.ops = &fi_ibv_srq_ep_base_ops; +- srq_ep->ep_fid.msg = &fi_ibv_srq_msg_ops; +- srq_ep->ep_fid.cm = &fi_ibv_srq_cm_ops; +- srq_ep->ep_fid.rma = &fi_ibv_srq_rma_ops; +- srq_ep->ep_fid.atomic = &fi_ibv_srq_atomic_ops; +- +- srq_init_attr.attr.max_wr = attr->size; +- srq_init_attr.attr.max_sge = attr->iov_limit; +- +- srq_ep->srq = ibv_create_srq(dom->pd, &srq_init_attr); +- if (!srq_ep->srq) { +- VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_create_srq", errno); +- ret = -errno; +- goto err2; +- } +- +- fastlock_init(&srq_ep->wre_lock); +- ret = util_buf_pool_create(&srq_ep->wre_pool, sizeof(struct fi_ibv_wre), +- 16, 0, VERBS_WRE_CNT); +- if (ret) { +- VERBS_WARN(FI_LOG_DOMAIN, "Failed to create wre_pool\n"); +- goto err3; +- } +- dlist_init(&srq_ep->wre_list); +- +- *srq_ep_fid = &srq_ep->ep_fid; +- +- return FI_SUCCESS; +-err3: +- fastlock_destroy(&srq_ep->wre_lock); +- if (ibv_destroy_srq(srq_ep->srq)) +- VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_destroy_srq", errno); +-err2: +- free(srq_ep); +-err1: +- return ret; +-} +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/abi_1_0.c b/src/mpid/ch4/netmod/ofi/libfabric/src/abi_1_0.c +index fb73b48..c0fdd83 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/abi_1_0.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/abi_1_0.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016-2018 Intel Corporation. All rights reserved. + * Copyright (c) 2017, Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -105,6 +105,23 @@ struct fi_info_1_0 { + struct fi_fabric_attr_1_0 *fabric_attr; + }; + ++struct fi_info_1_1 { ++ struct fi_info *next; ++ uint64_t caps; ++ uint64_t mode; ++ uint32_t addr_format; ++ size_t src_addrlen; ++ size_t dest_addrlen; ++ void *src_addr; ++ void *dest_addr; ++ fid_t handle; ++ struct fi_tx_attr *tx_attr; ++ struct fi_rx_attr *rx_attr; ++ struct fi_ep_attr_1_0 *ep_attr; ++ struct fi_domain_attr_1_0 *domain_attr; ++ struct fi_fabric_attr_1_0 *fabric_attr; ++}; ++ + #define ofi_dup_attr(dst, src) \ + do { \ + dst = calloc(1, sizeof(*dst)); \ +@@ -113,6 +130,9 @@ struct fi_info_1_0 { + } while (0); + + ++/* ++ * ABI 1.0 ++ */ + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + void fi_freeinfo_1_0(struct fi_info_1_0 *info) + { +@@ -120,7 +140,6 @@ void fi_freeinfo_1_0(struct fi_info_1_0 *info) + } + COMPAT_SYMVER(fi_freeinfo_1_0, fi_freeinfo, FABRIC_1.0); + +- + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + struct fi_info_1_0 *fi_dupinfo_1_0(const struct fi_info_1_0 *info) + { +@@ -244,3 +263,56 @@ int fi_fabric_1_0(struct fi_fabric_attr_1_0 *attr_1_0, + return fi_fabric(&attr, fabric, context); + } + COMPAT_SYMVER(fi_fabric_1_0, fi_fabric, FABRIC_1.0); ++ ++ ++/* ++ * ABI 1.1 ++ */ ++__attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) ++void fi_freeinfo_1_1(struct fi_info_1_1 *info) ++{ ++ fi_freeinfo((struct fi_info *) info); ++} ++COMPAT_SYMVER(fi_freeinfo_1_1, fi_freeinfo, FABRIC_1.1); ++ ++__attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) ++struct fi_info_1_1 *fi_dupinfo_1_1(const struct fi_info_1_1 *info) ++{ ++ struct fi_info *dup, *base; ++ ++ if (!info) ++ return (struct fi_info_1_1 *) ofi_allocinfo_internal(); ++ ++ ofi_dup_attr(base, info); ++ if (base == NULL) ++ return NULL; ++ ++ dup = fi_dupinfo(base); ++ ++ free(base); ++ return (struct fi_info_1_1 *) dup; ++} ++COMPAT_SYMVER(fi_dupinfo_1_1, fi_dupinfo, FABRIC_1.1); ++ ++__attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) ++int fi_getinfo_1_1(uint32_t version, const char *node, const char *service, ++ uint64_t flags, const struct fi_info_1_1 *hints_1_1, ++ struct fi_info_1_1 **info) ++{ ++ struct fi_info *hints; ++ int ret; ++ ++ if (hints_1_1) { ++ hints = (struct fi_info *) fi_dupinfo_1_1(hints_1_1); ++ if (!hints) ++ return -FI_ENOMEM; ++ } else { ++ hints = NULL; ++ } ++ ret = fi_getinfo(version, node, service, flags, hints, ++ (struct fi_info **) info); ++ fi_freeinfo(hints); ++ ++ return ret; ++} ++COMPAT_SYMVER(fi_getinfo_1_1, fi_getinfo, FABRIC_1.1); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/common.c b/src/mpid/ch4/netmod/ofi/libfabric/src/common.c +index 0a85fcb..5bbb002 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/common.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/common.c +@@ -1,7 +1,7 @@ + /* + * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. + * Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved. +- * Copyright (c) 2013 Intel Corp., Inc. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corp., Inc. All rights reserved. + * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -58,6 +58,8 @@ + #include + #include + #include ++#include ++#include + + struct fi_provider core_prov = { + .name = "core", +@@ -102,6 +104,11 @@ uint8_t ofi_msb(uint64_t num) + return msb; + } + ++uint8_t ofi_lsb(uint64_t num) ++{ ++ return ofi_msb(num & (~(num - 1))); ++} ++ + int ofi_send_allowed(uint64_t caps) + { + if (caps & FI_MSG || +@@ -220,6 +227,31 @@ uint64_t fi_gettime_us(void) + return now.tv_sec * 1000000 + now.tv_usec; + } + ++uint16_t ofi_get_sa_family(const struct fi_info *info) ++{ ++ if (!info) ++ return 0; ++ ++ switch (info->addr_format) { ++ case FI_SOCKADDR_IN: ++ return AF_INET; ++ case FI_SOCKADDR_IN6: ++ return AF_INET6; ++ case FI_SOCKADDR_IB: ++ return AF_IB; ++ case FI_SOCKADDR: ++ case FI_FORMAT_UNSPEC: ++ if (info->src_addr) ++ return ((struct sockaddr *) info->src_addr)->sa_family; ++ ++ if (info->dest_addr) ++ return ((struct sockaddr *) info->dest_addr)->sa_family; ++ /* fall through */ ++ default: ++ return 0; ++ } ++} ++ + const char *ofi_straddr(char *buf, size_t *len, + uint32_t addr_format, const void *addr) + { +@@ -433,6 +465,8 @@ static int ofi_str_to_sin(const char *str, void **addr, size_t *len) + if (ret == 1) + goto match_ip; + ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Malformed FI_ADDR_STR: %s\n", str); + err: + free(sin); + return -FI_EINVAL; +@@ -440,8 +474,11 @@ err: + match_ip: + ip[sizeof(ip) - 1] = '\0'; + ret = inet_pton(AF_INET, ip, &sin->sin_addr); +- if (ret != 1) ++ if (ret != 1) { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Unable to convert IPv4 address: %s\n", ip); + goto err; ++ } + + match_port: + sin->sin_port = htons(sin->sin_port); +@@ -473,6 +510,8 @@ static int ofi_str_to_sin6(const char *str, void **addr, size_t *len) + if (ret == 1) + goto match_ip; + ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Malformed FI_ADDR_STR: %s\n", str); + err: + free(sin6); + return -FI_EINVAL; +@@ -480,8 +519,11 @@ err: + match_ip: + ip[sizeof(ip) - 1] = '\0'; + ret = inet_pton(AF_INET6, ip, &sin6->sin6_addr); +- if (ret != 1) ++ if (ret != 1) { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Unable to convert IPv6 address: %s\n", ip); + goto err; ++ } + + match_port: + sin6->sin6_port = htons(sin6->sin6_port); +@@ -584,6 +626,14 @@ int ofi_is_wildcard_listen_addr(const char *node, const char *service, + struct addrinfo *res = NULL; + int ret; + ++ if (hints && hints->addr_format != FI_FORMAT_UNSPEC && ++ hints->addr_format != FI_SOCKADDR && ++ hints->addr_format != FI_SOCKADDR_IN && ++ hints->addr_format != FI_SOCKADDR_IN6) ++ return 0; ++ ++ /* else it's okay to call getaddrinfo, proceed with processing */ ++ + if (node) { + ret = getaddrinfo(node, service, NULL, &res); + if (ret) { +@@ -612,6 +662,35 @@ out: + return ((flags & FI_SOURCE) && service) ? 1 : 0; + } + ++size_t ofi_mask_addr(struct sockaddr *maskaddr, const struct sockaddr *srcaddr, ++ const struct sockaddr *netmask) ++{ ++ size_t i, size, len = 0; ++ uint8_t *ip, *mask, bits; ++ ++ memcpy(maskaddr, srcaddr, ofi_sizeofaddr(srcaddr)); ++ size = ofi_sizeofip(srcaddr); ++ ip = ofi_get_ipaddr(maskaddr); ++ mask = ofi_get_ipaddr(netmask); ++ ++ if (!size || !ip || !mask) ++ return 0; ++ ++ for (i = 0; i < size; i++) { ++ ip[i] &= mask[i]; ++ ++ if (mask[i] == 0xff) { ++ len += 8; ++ } else { ++ for (bits = mask[i]; bits; bits >>= 1) { ++ if (bits & 0x1) ++ len++; ++ } ++ } ++ } ++ return len; ++} ++ + void ofi_straddr_log_internal(const char *func, int line, + const struct fi_provider *prov, + enum fi_log_level level, +@@ -629,53 +708,175 @@ void ofi_straddr_log_internal(const char *func, int line, + } + } + ++int ofi_discard_socket(SOCKET sock, size_t len) ++{ ++ char buf; ++ ssize_t ret = 0; ++ ++ for (; len && !ret; len--) ++ ret = ofi_recvall_socket(sock, &buf, 1); ++ return ret; ++} ++ ++ + #ifndef HAVE_EPOLL + + int fi_epoll_create(struct fi_epoll **ep) + { ++ int ret; ++ + *ep = calloc(1, sizeof(struct fi_epoll)); +- return *ep ? 0 : -FI_ENOMEM; ++ if (!*ep) ++ return -FI_ENOMEM; ++ ++ (*ep)->size = 64; ++ (*ep)->fds = calloc((*ep)->size, sizeof(*(*ep)->fds) + ++ sizeof(*(*ep)->context)); ++ if (!(*ep)->fds) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ (*ep)->context = (void *)((*ep)->fds + (*ep)->size); ++ ++ ret = fd_signal_init(&(*ep)->signal); ++ if (ret) ++ goto err2; ++ ++ (*ep)->fds[(*ep)->nfds].fd = (*ep)->signal.fd[FI_READ_FD]; ++ (*ep)->fds[(*ep)->nfds].events = FI_EPOLL_IN; ++ (*ep)->context[(*ep)->nfds++] = NULL; ++ slist_init(&(*ep)->work_item_list); ++ fastlock_init(&(*ep)->lock); ++ return FI_SUCCESS; ++err2: ++ free((*ep)->fds); ++err1: ++ free(*ep); ++ return ret; + } + +-int fi_epoll_add(struct fi_epoll *ep, int fd, void *context) ++ ++static int fi_epoll_ctl(struct fi_epoll *ep, enum fi_epoll_ctl op, ++ int fd, uint32_t events, void *context) + { +- struct pollfd *fds; +- void *contexts; ++ struct fi_epoll_work_item *item; + +- if (ep->nfds == ep->size) { +- fds = calloc(ep->size + 64, +- sizeof(*ep->fds) + sizeof(*ep->context)); +- if (!fds) +- return -FI_ENOMEM; ++ item = calloc(1,sizeof(*item)); ++ if (!item) ++ return -FI_ENOMEM; + +- ep->size += 64; +- contexts = fds + ep->size; ++ item->fd = fd; ++ item->events = events; ++ item->context = context; ++ item->type = op; ++ fastlock_acquire(&ep->lock); ++ slist_insert_tail(&item->entry, &ep->work_item_list); ++ fd_signal_set(&ep->signal); ++ fastlock_release(&ep->lock); ++ return 0; ++} + +- memcpy(fds, ep->fds, ep->nfds * sizeof(*ep->fds)); +- memcpy(contexts, ep->context, ep->nfds * sizeof(*ep->context)); +- free(ep->fds); +- ep->fds = fds; +- ep->context = contexts; +- } ++int fi_epoll_add(struct fi_epoll *ep, int fd, uint32_t events, void *context) ++{ ++ return fi_epoll_ctl(ep, EPOLL_CTL_ADD, fd, events, context); ++} + +- ep->fds[ep->nfds].fd = fd; +- ep->fds[ep->nfds].events = POLLIN; +- ep->context[ep->nfds++] = context; +- return 0; ++int fi_epoll_mod(struct fi_epoll *ep, int fd, uint32_t events, void *context) ++{ ++ return fi_epoll_ctl(ep, EPOLL_CTL_MOD, fd, events, context); + } + + int fi_epoll_del(struct fi_epoll *ep, int fd) + { ++ return fi_epoll_ctl(ep, EPOLL_CTL_DEL, fd, 0, NULL); ++} ++ ++static int fi_epoll_fd_array_grow(struct fi_epoll *ep) ++{ ++ struct pollfd *fds; ++ void *contexts; ++ ++ fds = calloc(ep->size + 64, ++ sizeof(*ep->fds) + sizeof(*ep->context)); ++ if (!fds) ++ return -FI_ENOMEM; ++ ++ ep->size += 64; ++ contexts = fds + ep->size; ++ ++ memcpy(fds, ep->fds, ep->nfds * sizeof(*ep->fds)); ++ memcpy(contexts, ep->context, ep->nfds * sizeof(*ep->context)); ++ free(ep->fds); ++ ep->fds = fds; ++ ep->context = contexts; ++ return FI_SUCCESS; ++} ++ ++static void fi_epoll_cleanup_array(struct fi_epoll *ep) ++{ + int i; + + for (i = 0; i < ep->nfds; i++) { +- if (ep->fds[i].fd == fd) { +- ep->fds[i].fd = ep->fds[ep->nfds - 1].fd; +- ep->context[i] = ep->context[--ep->nfds]; +- return 0; ++ while (ep->fds[i].fd == INVALID_SOCKET) { ++ ep->fds[i].fd = ep->fds[ep->nfds-1].fd; ++ ep->fds[i].events = ep->fds[ep->nfds-1].events; ++ ep->fds[i].revents = ep->fds[ep->nfds-1].revents; ++ ep->context[i] = ep->context[ep->nfds-1]; ++ ep->nfds--; ++ if (i == ep->nfds) ++ break; + } +- } +- return -FI_EINVAL; ++ } ++} ++ ++static void fi_epoll_process_work_item_list(struct fi_epoll *ep) ++{ ++ struct slist_entry *entry; ++ struct fi_epoll_work_item *item; ++ int i; ++ ++ while (!slist_empty(&ep->work_item_list)) { ++ if ((ep->nfds == ep->size) && ++ fi_epoll_fd_array_grow(ep)) ++ continue; ++ ++ entry = slist_remove_head(&ep->work_item_list); ++ item = container_of(entry, struct fi_epoll_work_item, entry); ++ ++ switch (item->type) { ++ case EPOLL_CTL_ADD: ++ ep->fds[ep->nfds].fd = item->fd; ++ ep->fds[ep->nfds].events = item->events; ++ ep->context[ep->nfds] = item->context; ++ ep->nfds++; ++ break; ++ case EPOLL_CTL_DEL: ++ for (i = 0; i < ep->nfds; i++) { ++ if (ep->fds[i].fd == item->fd) { ++ ep->fds[i].fd = INVALID_SOCKET; ++ break; ++ } ++ } ++ break; ++ case EPOLL_CTL_MOD: ++ for (i = 0; i < ep->nfds; i++) { ++ if (ep->fds[i].fd == item->fd) { ++ ++ ep->fds[i].events = item->events; ++ ep->fds[i].revents &= item->events; ++ ep->context = item->context; ++ break; ++ } ++ } ++ break; ++ default: ++ assert(0); ++ goto out; ++ } ++ free(item); ++ } ++out: ++ fi_epoll_cleanup_array(ep); + } + + int fi_epoll_wait(struct fi_epoll *ep, void **contexts, int max_contexts, +@@ -683,31 +884,59 @@ int fi_epoll_wait(struct fi_epoll *ep, void **contexts, int max_contexts, + { + int i, ret; + int found = 0; ++ uint64_t start = (timeout >= 0) ? fi_gettime_ms() : 0; + +- ret = poll(ep->fds, ep->nfds, timeout); +- if (ret == SOCKET_ERROR) +- return -ofi_sockerr(); +- else if (ret == 0) +- return 0; ++ do { ++ ret = poll(ep->fds, ep->nfds, timeout); ++ if (ret == SOCKET_ERROR) ++ return -ofi_sockerr(); ++ else if (ret == 0) ++ return 0; ++ ++ if (ep->fds[0].revents) ++ fd_signal_reset(&ep->signal); ++ ++ fastlock_acquire(&ep->lock); ++ if (!slist_empty(&ep->work_item_list)) ++ fi_epoll_process_work_item_list(ep); + +- for (i = ep->index; i < ep->nfds && found < max_contexts; i++) { +- if (ep->fds[i].revents) { +- contexts[found++] = ep->context[i]; +- ep->index = i; ++ fastlock_release(&ep->lock); ++ ++ for (i = ep->index; i < ep->nfds && found < max_contexts; i++) { ++ if (ep->fds[i].revents && i) { ++ contexts[found++] = ep->context[i]; ++ ep->index = i; ++ } + } +- } +- for (i = 0; i < ep->index && found < max_contexts; i++) { +- if (ep->fds[i].revents) { +- contexts[found++] = ep->context[i]; +- ep->index = i; ++ for (i = 0; i < ep->index && found < max_contexts; i++) { ++ if (ep->fds[i].revents && i) { ++ contexts[found++] = ep->context[i]; ++ ep->index = i; ++ } + } +- } ++ ++ if (timeout > 0) ++ timeout -= (int) (fi_gettime_ms() - start); ++ ++ } while (timeout > 0 && !found); ++ + return found; + } + + void fi_epoll_close(struct fi_epoll *ep) + { ++ struct fi_epoll_work_item *item; ++ struct slist_entry *entry; + if (ep) { ++ while (!slist_empty(&ep->work_item_list)) { ++ entry = slist_remove_head(&ep->work_item_list); ++ item = container_of(entry, ++ struct fi_epoll_work_item, ++ entry); ++ free(item); ++ } ++ fastlock_destroy(&ep->lock); ++ fd_signal_free(&ep->signal); + free(ep->fds); + free(ep); + } +@@ -758,3 +987,275 @@ int ofi_cpu_supports(unsigned func, unsigned reg, unsigned bit) + ofi_cpuid(func, 0, cpuinfo); + return cpuinfo[reg] & bit; + } ++ ++void ofi_remove_comma(char *buffer) ++{ ++ size_t sz = strlen(buffer); ++ if (sz < 2) ++ return; ++ if (strcmp(&buffer[sz-2], ", ") == 0) ++ buffer[sz-2] = '\0'; ++} ++ ++void ofi_strncatf(char *dest, size_t n, const char *fmt, ...) ++{ ++ size_t len = strnlen(dest, n); ++ va_list arglist; ++ ++ va_start(arglist, fmt); ++ vsnprintf(&dest[len], n - 1 - len, fmt, arglist); ++ va_end(arglist); ++} ++ ++/* The provider must free any prov_attr data prior to calling this ++ * routine. ++ */ ++int ofi_nic_close(struct fid *fid) ++{ ++ struct fid_nic *nic = (struct fid_nic *) fid; ++ ++ assert(fid && fid->fclass == FI_CLASS_NIC); ++ ++ if (nic->device_attr) { ++ free(nic->device_attr->name); ++ free(nic->device_attr->device_id); ++ free(nic->device_attr->device_version); ++ free(nic->device_attr->vendor_id); ++ free(nic->device_attr->driver); ++ free(nic->device_attr->firmware); ++ free(nic->device_attr); ++ } ++ ++ free(nic->bus_attr); ++ ++ if (nic->link_attr) { ++ free(nic->link_attr->address); ++ free(nic->link_attr->network_type); ++ free(nic->link_attr); ++ } ++ ++ free(nic); ++ return 0; ++} ++ ++int ofi_nic_control(struct fid *fid, int command, void *arg) ++{ ++ struct fid_nic *nic = container_of(fid, struct fid_nic, fid); ++ struct fid_nic **dup = (struct fid_nic **) arg; ++ ++ switch(command) { ++ case FI_DUP: ++ *dup = ofi_nic_dup(nic); ++ return *dup ? FI_SUCCESS : -FI_ENOMEM; ++ default: ++ return -FI_ENOSYS; ++ } ++} ++ ++static void ofi_tostr_device_attr(char *buf, size_t len, ++ const struct fi_device_attr *attr) ++{ ++ const char *prefix = TAB TAB; ++ ++ ofi_strncatf(buf, len, "%sfi_device_attr:\n", prefix); ++ ++ prefix = TAB TAB TAB; ++ ofi_strncatf(buf, len, "%sname: %s\n", prefix, attr->name); ++ ofi_strncatf(buf, len, "%sdevice_id: %s\n", prefix, attr->device_id); ++ ofi_strncatf(buf, len, "%sdevice_version: %s\n", prefix, ++ attr->device_version); ++ ofi_strncatf(buf, len, "%svendor_id: %s\n", prefix, attr->vendor_id); ++ ofi_strncatf(buf, len, "%sdriver: %s\n", prefix, attr->driver); ++ ofi_strncatf(buf, len, "%sfirmware: %s\n", prefix, attr->firmware); ++} ++ ++static void ofi_tostr_pci_attr(char *buf, size_t len, ++ const struct fi_pci_attr *attr) ++{ ++ const char *prefix = TAB TAB TAB; ++ ++ ofi_strncatf(buf, len, "%sfi_pci_attr:\n", prefix); ++ ++ prefix = TAB TAB TAB TAB; ++ ofi_strncatf(buf, len, "%sdomain_id: %u\n", prefix, attr->domain_id); ++ ofi_strncatf(buf, len, "%sbus_id: %u\n", prefix, attr->bus_id); ++ ofi_strncatf(buf, len, "%sdevice_id: %u\n", prefix, attr->device_id); ++ ofi_strncatf(buf, len, "%sfunction_id: %u\n", prefix, attr->function_id); ++} ++ ++static void ofi_tostr_bus_type(char *buf, size_t len, int type) ++{ ++ switch (type) { ++ CASEENUMSTRN(FI_BUS_UNKNOWN, len); ++ CASEENUMSTRN(FI_BUS_PCI, len); ++ default: ++ ofi_strncatf(buf, len, "Unknown"); ++ break; ++ } ++} ++ ++static void ofi_tostr_bus_attr(char *buf, size_t len, ++ const struct fi_bus_attr *attr) ++{ ++ const char *prefix = TAB TAB; ++ ++ ofi_strncatf(buf, len, "%sfi_bus_attr:\n", prefix); ++ ++ prefix = TAB TAB TAB; ++ ofi_strncatf(buf, len, "%sfi_bus_type: ", prefix); ++ ofi_tostr_bus_type(buf, len, attr->bus_type); ++ ofi_strncatf(buf, len, "\n"); ++ ++ switch (attr->bus_type) { ++ case FI_BUS_PCI: ++ ofi_tostr_pci_attr(buf, len, &attr->attr.pci); ++ break; ++ default: ++ break; ++ } ++} ++ ++static void ofi_tostr_link_state(char *buf, size_t len, int state) ++{ ++ switch (state) { ++ CASEENUMSTRN(FI_LINK_UNKNOWN, len); ++ CASEENUMSTRN(FI_LINK_DOWN, len); ++ CASEENUMSTRN(FI_LINK_UP, len); ++ default: ++ ofi_strncatf(buf, len, "Unknown"); ++ break; ++ } ++} ++ ++static void ofi_tostr_link_attr(char *buf, size_t len, ++ const struct fi_link_attr *attr) ++{ ++ const char *prefix = TAB TAB; ++ ofi_strncatf(buf, len, "%sfi_link_attr:\n", prefix); ++ ++ prefix = TAB TAB TAB; ++ ofi_strncatf(buf, len, "%saddress: %s\n", prefix, attr->address); ++ ofi_strncatf(buf, len, "%smtu: %zu\n", prefix, attr->mtu); ++ ofi_strncatf(buf, len, "%sspeed: %zu\n", prefix, attr->speed); ++ ofi_strncatf(buf, len, "%sstate: ", prefix); ++ ofi_tostr_link_state(buf, len, attr->state); ++ ofi_strncatf(buf, len, "\n%snetwork_type: %s\n", prefix, ++ attr->network_type); ++} ++ ++int ofi_nic_tostr(const struct fid *fid_nic, char *buf, size_t len) ++{ ++ const struct fid_nic *nic = (const struct fid_nic*) fid_nic; ++ ++ assert(fid_nic->fclass == FI_CLASS_NIC); ++ ofi_strncatf(buf, len, "%sfid_nic:\n", TAB); ++ ++ ofi_tostr_device_attr(buf, len, nic->device_attr); ++ ofi_tostr_bus_attr(buf, len, nic->bus_attr); ++ ofi_tostr_link_attr(buf, len, nic->link_attr); ++ return 0; ++} ++ ++struct fi_ops default_nic_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = ofi_nic_close, ++ .control = ofi_nic_control, ++ .tostr = ofi_nic_tostr, ++}; ++ ++static int ofi_dup_dev_attr(const struct fi_device_attr *attr, ++ struct fi_device_attr **dup_attr) ++{ ++ *dup_attr = calloc(1, sizeof(**dup_attr)); ++ if (!*dup_attr) ++ return -FI_ENOMEM; ++ ++ if (ofi_str_dup(attr->name, &(*dup_attr)->name) || ++ ofi_str_dup(attr->device_id, &(*dup_attr)->device_id) || ++ ofi_str_dup(attr->device_version, &(*dup_attr)->device_version) || ++ ofi_str_dup(attr->vendor_id, &(*dup_attr)->vendor_id) || ++ ofi_str_dup(attr->driver, &(*dup_attr)->driver) || ++ ofi_str_dup(attr->firmware, &(*dup_attr)->firmware)) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int ofi_dup_bus_attr(const struct fi_bus_attr *attr, ++ struct fi_bus_attr **dup_attr) ++{ ++ *dup_attr = calloc(1, sizeof(**dup_attr)); ++ if (!*dup_attr) ++ return -FI_ENOMEM; ++ ++ **dup_attr = *attr; ++ return 0; ++} ++ ++static int ofi_dup_link_attr(const struct fi_link_attr *attr, ++ struct fi_link_attr **dup_attr) ++{ ++ *dup_attr = calloc(1, sizeof(**dup_attr)); ++ if (!*dup_attr) ++ return -FI_ENOMEM; ++ ++ if (ofi_str_dup(attr->address, &(*dup_attr)->address) || ++ ofi_str_dup(attr->network_type, &(*dup_attr)->network_type)) ++ return -FI_ENOMEM; ++ ++ (*dup_attr)->mtu = attr->mtu; ++ (*dup_attr)->speed = attr->speed; ++ (*dup_attr)->state = attr->state; ++ return 0; ++} ++ ++struct fid_nic *ofi_nic_dup(const struct fid_nic *nic) ++{ ++ struct fid_nic *dup_nic; ++ int ret; ++ ++ dup_nic = calloc(1, sizeof(*dup_nic)); ++ if (!dup_nic) ++ return NULL; ++ ++ if (!nic) { ++ dup_nic->fid.fclass = FI_CLASS_NIC; ++ dup_nic->device_attr = calloc(1, sizeof(*dup_nic->device_attr)); ++ dup_nic->bus_attr = calloc(1, sizeof(*dup_nic->bus_attr)); ++ dup_nic->link_attr = calloc(1, sizeof(*dup_nic->link_attr)); ++ ++ if (!dup_nic->device_attr || !dup_nic->bus_attr || ++ !dup_nic->link_attr) ++ goto fail; ++ ++ dup_nic->fid.ops = &default_nic_ops; ++ return dup_nic; ++ } ++ ++ assert(nic->fid.fclass == FI_CLASS_NIC); ++ dup_nic->fid = nic->fid; ++ ++ if (nic->device_attr) { ++ ret = ofi_dup_dev_attr(nic->device_attr, &dup_nic->device_attr); ++ if (ret) ++ goto fail; ++ } ++ ++ if (nic->bus_attr) { ++ ret = ofi_dup_bus_attr(nic->bus_attr, &dup_nic->bus_attr); ++ if (ret) ++ goto fail; ++ } ++ ++ if (nic->link_attr) { ++ ret = ofi_dup_link_attr(nic->link_attr, &dup_nic->link_attr); ++ if (ret) ++ goto fail; ++ } ++ ++ return dup_nic; ++ ++fail: ++ ofi_nic_close(&dup_nic->fid); ++ return NULL; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/src/fabric.c +index b235715..c01b047 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/fabric.c +@@ -43,7 +43,9 @@ + #include + #include "ofi_util.h" + #include "ofi.h" ++#include "shared/ofi_str.h" + #include "ofi_prov.h" ++#include "ofi_perf.h" + + #ifdef HAVE_LIBDL + #include +@@ -73,35 +75,157 @@ static int ofi_find_name(char **names, const char *name) + return -1; + } + +-static int ofi_is_util_prov(const struct fi_provider *provider) ++/* matches if names[i] == "xxx;yyy" and name == "xxx" */ ++static int ofi_find_layered_name(char **names, const char *name) ++{ ++ int i, len; ++ ++ len = strlen(name); ++ for (i = 0; names[i]; i++) { ++ if (!strncasecmp(name, names[i], len) && names[i][len] == ';' ) ++ return i; ++ } ++ return -1; ++} ++ ++/* matches if names[i] == "xxx" and name == "xxx;yyy" */ ++static int ofi_find_core_name(char **names, const char *name) ++{ ++ int i, len; ++ ++ for (i = 0; names[i]; i++) { ++ len = strlen(names[i]); ++ if (!strncasecmp(name, names[i], len) && name[len] == ';' ) ++ return i; ++ } ++ return -1; ++} ++ ++static enum ofi_prov_type ofi_prov_type(const struct fi_provider *provider) + { + const struct fi_prov_context *ctx; + ctx = (const struct fi_prov_context *) &provider->context; +- return ctx->is_util_prov; ++ return ctx->type; ++} ++ ++static int ofi_is_util_prov(const struct fi_provider *provider) ++{ ++ return ofi_prov_type(provider) == OFI_PROV_UTIL; ++} ++ ++static int ofi_is_core_prov(const struct fi_provider *provider) ++{ ++ return ofi_prov_type(provider) == OFI_PROV_CORE; ++} ++ ++static int ofi_is_hook_prov(const struct fi_provider *provider) ++{ ++ return ofi_prov_type(provider) == OFI_PROV_HOOK; + } + + int ofi_apply_filter(struct fi_filter *filter, const char *name) + { +- if (filter->names) { +- if (ofi_find_name(filter->names, name) >= 0) +- return filter->negated ? 1 : 0; ++ if (!filter->names) ++ return 0; + +- return filter->negated ? 0 : 1; +- } +- return 0; ++ if (ofi_find_name(filter->names, name) >= 0) ++ return filter->negated ? 1 : 0; ++ ++ return filter->negated ? 0 : 1; + } + + /* +- * Utility providers may be disabled, but do not need to be explicitly +- * enabled. This allows them to always be available when only a core +- * provider is enabled. ++ * The provider init filter is used to filter out unnecessary core providers ++ * at the initialization time. Utility providers are not concerned. ++ * ++ * Special handling is needed for layered provider names: ++ * ++ * If the filter is not negated, a name "xxx;yyy" in the filter should match ++ * input "xxx" to ensure that the core provider "xxx" is included. ++ * ++ * If the filter is negated, a name "xxx;yyy" in the filter should not match ++ * input "xxx" otherwise the core provider "xxx" may be incorrectly filtered ++ * out. + */ ++int ofi_apply_prov_init_filter(struct fi_filter *filter, const char *name) ++{ ++ if (!filter->names) ++ return 0; ++ ++ if (ofi_find_name(filter->names, name) >= 0) ++ return filter->negated ? 1 : 0; ++ ++ if (filter->negated) ++ return 0; ++ ++ if (ofi_find_layered_name(filter->names, name) >= 0) ++ return 0; ++ ++ return 1; ++} ++ ++/* ++ * The provider post filter is used to remove unwanted entries from the fi_info ++ * list before returning from fi_getinfo(). ++ * ++ * Layered provider names are handled in the same way as non-layered provider ++ * names -- requiring full match. ++ * ++ * In addition, a name "xxx" in the filter should be able to match an input ++ * "xxx;yyy" to allow extra layering on top of what is requested by the user. ++ */ ++int ofi_apply_prov_post_filter(struct fi_filter *filter, const char *name) ++{ ++ if (!filter->names) ++ return 0; ++ ++ if (ofi_find_name(filter->names, name) >= 0 || ++ ofi_find_core_name(filter->names, name) >= 0) ++ return filter->negated ? 1 : 0; ++ ++ return filter->negated ? 0 : 1; ++} ++ + static int ofi_getinfo_filter(const struct fi_provider *provider) + { +- if (!prov_filter.negated && ofi_is_util_prov(provider)) ++ /* Positive filters only apply to core providers. They must be ++ * explicitly enabled by the filter. Other providers (i.e. utility) ++ * are automatically enabled in this case, so that they can work ++ * over any enabled core filter. Negative filters may be used ++ * to disable any provider. ++ */ ++ if (!prov_filter.negated && !ofi_is_core_prov(provider)) + return 0; + +- return ofi_apply_filter(&prov_filter, provider->name); ++ return ofi_apply_prov_init_filter(&prov_filter, provider->name); ++} ++ ++static void ofi_filter_info(struct fi_info **info) ++{ ++ struct fi_info *cur, *prev, *tmp; ++ ++ if (!prov_filter.names) ++ return; ++ ++ prev = NULL; ++ cur = *info; ++ while (cur) { ++ assert(cur->fabric_attr && cur->fabric_attr->prov_name); ++ ++ if (ofi_apply_prov_post_filter(&prov_filter, cur->fabric_attr->prov_name)) { ++ tmp = cur; ++ cur = cur->next; ++ if (prev) ++ prev->next = cur; ++ else ++ *info = cur; ++ tmp->next = NULL; ++ fi_freeinfo(tmp); ++ } else { ++ prev = cur; ++ cur = cur->next; ++ } ++ } + } + + static struct ofi_prov *ofi_getprov(const char *prov_name, size_t len) +@@ -117,6 +241,38 @@ static struct ofi_prov *ofi_getprov(const char *prov_name, size_t len) + return NULL; + } + ++struct fi_provider *ofi_get_hook(const char *name) ++{ ++ struct ofi_prov *prov; ++ struct fi_provider *provider = NULL; ++ char *try_name = NULL; ++ int ret; ++ ++ prov = ofi_getprov(name, strlen(name)); ++ if (!prov) { ++ ret = asprintf(&try_name, "ofi_%s_hook", name); ++ if (ret > 0) ++ prov = ofi_getprov(try_name, ret); ++ else ++ try_name = NULL; ++ } ++ ++ if (prov) { ++ if (prov->provider && ofi_is_hook_prov(prov->provider)) { ++ provider = prov->provider; ++ } else { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Specified provider is not a hook: %s\n", name); ++ } ++ } else { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "No hook found for: %s\n", name); ++ } ++ ++ free(try_name); ++ return provider; ++} ++ + static void cleanup_provider(struct fi_provider *provider, void *dlhandle) + { + OFI_UNUSED(dlhandle); +@@ -166,26 +322,44 @@ static struct ofi_prov *ofi_create_prov_entry(const char *prov_name) + */ + static void ofi_ordered_provs_init(void) + { +- char *ordered_prov_names[] = +- {"psm2", "psm", "usnic", "mlx", "gni", +- "bgq", "netdir", "ofi_rxm", "ofi_rxd", "verbs", +- /* Initialize the socket(s) provider last. This will result in +- * it being the least preferred provider. */ ++ char *ordered_prov_names[] = { ++ "psm2", "psm", "usnic", "mlx", "gni", ++ "bgq", "netdir", "ofi_rxm", "ofi_rxd", "verbs", ++ /* Initialize the socket based providers last of the ++ * standard providers. This will result in them being ++ * the least preferred providers. ++ */ ++ ++ /* Before you add ANYTHING here, read the comment above!!! */ ++ "UDP", "sockets", "tcp", /* NOTHING GOES HERE! */ ++ /* Seriously, read it! */ + +- /* Before you add ANYTHING here, read the comment above!!! */ +- "UDP", "sockets", "tcp" /* NOTHING GOES HERE! */}; +- /* Seriously, read it! */ ++ /* These are hooking providers only. Their order ++ * doesn't matter ++ */ ++ "ofi_perf_hook", "ofi_noop_hook", ++ }; + int num_provs = sizeof(ordered_prov_names)/sizeof(ordered_prov_names[0]), i; + + for (i = 0; i < num_provs; i++) + ofi_create_prov_entry(ordered_prov_names[i]); + } + ++static void ofi_set_prov_type(struct fi_prov_context *ctx, ++ struct fi_provider *provider) ++{ ++ if (!provider->getinfo) ++ ctx->type = OFI_PROV_HOOK; ++ else if (ofi_has_util_prefix(provider->name)) ++ ctx->type = OFI_PROV_UTIL; ++ else ++ ctx->type = OFI_PROV_CORE; ++} ++ + static int ofi_register_provider(struct fi_provider *provider, void *dlhandle) + { + struct fi_prov_context *ctx; + struct ofi_prov *prov = NULL; +- size_t len; + int ret; + + if (!provider || !provider->name) { +@@ -199,7 +373,7 @@ static int ofi_register_provider(struct fi_provider *provider, void *dlhandle) + "registering provider: %s (%d.%d)\n", provider->name, + FI_MAJOR(provider->version), FI_MINOR(provider->version)); + +- if (!provider->getinfo || !provider->fabric) { ++ if (!provider->fabric) { + FI_WARN(&core_prov, FI_LOG_CORE, + "provider missing mandatory entry points\n"); + ret = -FI_EINVAL; +@@ -223,7 +397,7 @@ static int ofi_register_provider(struct fi_provider *provider, void *dlhandle) + } + + ctx = (struct fi_prov_context *) &provider->context; +- ctx->is_util_prov = (ofi_util_name(provider->name, &len) != NULL); ++ ofi_set_prov_type(ctx, provider); + + if (ofi_getinfo_filter(provider)) { + FI_INFO(&core_prov, FI_LOG_CORE, +@@ -295,75 +469,9 @@ static int lib_filter(const struct dirent *entry) + } + #endif + +-/* split the given string "s" using the specified delimiter(s) in the string +- * "delim" and return an array of strings. The array is terminated with a NULL +- * pointer. You can clean this array up with a call to free_string_array(). +- * +- * Returns NULL on failure. +- */ +-static char **split_and_alloc(const char *s, const char *delim) +-{ +- int i, n; +- char *tmp; +- char *dup = NULL; +- char **arr = NULL; +- +- if (!s || !delim) +- return NULL; +- +- dup = strdup(s); +- if (!dup) { +- FI_WARN(&core_prov, FI_LOG_CORE, "failed to allocate memory\n"); +- return NULL; +- } +- +- /* compute the array size */ +- n = 1; +- for (tmp = dup; *tmp != '\0'; ++tmp) { +- for (i = 0; delim[i] != '\0'; ++i) { +- if (*tmp == delim[i]) { +- ++n; +- break; +- } +- } +- } +- +- /* +1 to leave space for NULL terminating pointer */ +- arr = calloc(n + 1, sizeof(*arr)); +- if (!arr) { +- FI_WARN(&core_prov, FI_LOG_CORE, "failed to allocate memory\n"); +- goto cleanup; +- } +- +- /* set array elts to point inside the dup'ed string */ +- for (tmp = dup, i = 0; tmp != NULL; ++i) { +- arr[i] = strsep(&tmp, delim); +- } +- assert(i == n); +- +- return arr; +- +-cleanup: +- free(dup); +- free(arr); +- return NULL; +-} +- +-/* see split_and_alloc() */ +-static void free_string_array(char **s) +-{ +- /* all strings are allocated from the same strdup'ed slab, so just free +- * the first element */ +- if (s != NULL) +- free(s[0]); +- +- /* and then the actual array of pointers */ +- free(s); +-} +- + void ofi_free_filter(struct fi_filter *filter) + { +- free_string_array(filter->names); ++ ofi_free_string_array(filter->names); + } + + void ofi_create_filter(struct fi_filter *filter, const char *raw_filter) +@@ -377,7 +485,7 @@ void ofi_create_filter(struct fi_filter *filter, const char *raw_filter) + ++raw_filter; + } + +- filter->names = split_and_alloc(raw_filter, ","); ++ filter->names= ofi_split_and_alloc(raw_filter, ",", NULL); + if (!filter->names) + FI_WARN(&core_prov, FI_LOG_CORE, + "unable to parse filter from: %s\n", raw_filter); +@@ -444,6 +552,8 @@ void fi_ini(void) + fi_log_init(); + ofi_osd_init(); + ofi_pmem_init(); ++ ofi_perf_init(); ++ ofi_hook_init(); + + fi_param_define(NULL, "provider", FI_PARAM_STRING, + "Only use specified provider (default: all available)"); +@@ -481,12 +591,12 @@ void fi_ini(void) + if (!provdir) + provdir = PROVDLDIR; + +- dirs = split_and_alloc(provdir, ":"); ++ dirs = ofi_split_and_alloc(provdir, ":", NULL); + if (dirs) { + for (n = 0; dirs[n]; ++n) { + ofi_ini_dir(dirs[n]); + } +- free_string_array(dirs); ++ ofi_free_string_array(dirs); + } + libdl_done: + #endif +@@ -501,19 +611,16 @@ libdl_done: + ofi_register_provider(SHM_INIT, NULL); + ofi_register_provider(RXM_INIT, NULL); + ofi_register_provider(VERBS_INIT, NULL); +- +- { +- /* TODO: RXD is not stable for now. Disable it by default */ +- int enable_rxd = 0; +- fi_param_define(NULL, "rxd_enable", FI_PARAM_BOOL, +- "Enable RXD provider (default: no)"); +- fi_param_get_bool(NULL, "rxd_enable", &enable_rxd); +- if (enable_rxd) +- ofi_register_provider(RXD_INIT, NULL); +- } ++ /* ofi_register_provider(RSTREAM_INIT, NULL); - no support */ ++ ofi_register_provider(MRAIL_INIT, NULL); ++ ofi_register_provider(RXD_INIT, NULL); + + ofi_register_provider(UDP_INIT, NULL); + ofi_register_provider(SOCKETS_INIT, NULL); ++ ofi_register_provider(TCP_INIT, NULL); ++ ++ ofi_register_provider(PERF_HOOK_INIT, NULL); ++ ofi_register_provider(NOOP_HOOK_INIT, NULL); + + ofi_init = 1; + +@@ -568,6 +675,10 @@ void DEFAULT_SYMVER_PRE(fi_freeinfo)(struct fi_info *info) + free(info->fabric_attr->prov_name); + free(info->fabric_attr); + } ++ if (info->nic && ++ FI_CHECK_OP(info->nic->fid.ops, struct fi_ops, close)) { ++ fi_close(&info->nic->fid); ++ } + free(info); + } + } +@@ -630,7 +741,7 @@ static void ofi_set_prov_attr(struct fi_fabric_attr *attr, + attr->prov_name = ofi_strdup_append(core_name, prov->name); + free(core_name); + } else { +- assert(!ofi_is_util_prov(prov)); ++ assert(ofi_is_core_prov(prov)); + attr->prov_name = strdup(prov->name); + } + attr->prov_version = prov->version; +@@ -638,59 +749,81 @@ static void ofi_set_prov_attr(struct fi_fabric_attr *attr, + + /* + * The layering of utility providers over core providers follows these rules. +- * 1. If both are specified, then only return that layering +- * 2. If a utility provider is specified, return it over any* core provider. +- * 3. If a core provider is specified, return any utility provider that can +- * layer over it, plus the core provider itself, if possible. +- * 4* A utility provider will not layer over the sockets provider unless the +- * user explicitly requests that combination. +- * +- * Utility providers use an internal flag, OFI_CORE_PROV_ONLY, to indicate +- * that only core providers should respond to an fi_getinfo query. This +- * prevents utility providers from layering over other utility providers. ++ * 0. Provider names are delimited by ";" ++ * 1. Rules when # of providers <= 2: ++ * 1a. If both are specified, then only return that layering ++ * 1b. If a utility provider is specified, return it over any* core provider. ++ * 1c. If a core provider is specified, return any utility provider that can ++ * layer over it, plus the core provider itself, if possible. ++ * 1d. A utility provider will not layer over the sockets provider unless the ++ * user explicitly requests that combination. ++ * 1e. OFI_CORE_PROV_ONLY flag prevents utility providers layering over other ++ * utility providers. ++ * 2. If both the providers are utility providers or if more than two providers ++ * are specified, the rightmost provider would be compared. ++ * 3. If any provider has a caret symbol "^" is prefixed before any provider ++ * name it would be excluded (internal use only). These excluded providers ++ * should be listed only at the end. + */ + static int ofi_layering_ok(const struct fi_provider *provider, +- const char *util_name, size_t util_len, +- const char *core_name, size_t core_len, ++ char **prov_vec, size_t count, + uint64_t flags) + { ++ char *prov_name; ++ int i; ++ ++ /* Excluded providers must be at the end */ ++ for (i = count - 1; i >= 0; i--) { ++ if (prov_vec[i][0] != '^') ++ break; ++ ++ if (!strcasecmp(&prov_vec[i][1], provider->name)) ++ return 0; ++ } ++ count = i + 1; ++ + if (flags & OFI_CORE_PROV_ONLY) { +- if (ofi_is_util_prov(provider)) { ++ assert((count == 1) || (count == 0)); ++ if (!ofi_is_core_prov(provider)) { + FI_INFO(&core_prov, FI_LOG_CORE, +- "Need core provider, skipping util %s\n", ++ "Need core provider, skipping %s\n", + provider->name); + return 0; + } + +- if ((!core_len || !core_name) && +- !strcasecmp(provider->name, "sockets")) { ++ if ((count == 0) && !strcasecmp(provider->name, "sockets")) { + FI_INFO(&core_prov, FI_LOG_CORE, + "Skipping util;sockets layering\n"); + return 0; + } + } + +- if (util_len && util_name) { +- assert(!(flags & OFI_CORE_PROV_ONLY)); +- if ((strlen(provider->name) != util_len) || +- strncasecmp(util_name, provider->name, util_len)) +- return 0; ++ if (!count) ++ return 1; ++ ++ /* To maintain backward compatibility with the previous behavior of ++ * ofi_layering_ok we need to check if the # of providers is two or ++ * fewer. In such a case, we have to be agnostic to the ordering of ++ * core and utility providers */ + +- } else if (core_len && core_name) { +- if (!strncasecmp(core_name, "sockets", core_len) && +- ofi_is_util_prov(provider)) { ++ if ((count == 1) && ofi_is_util_prov(provider) && ++ !ofi_has_util_prefix(prov_vec[0])) { ++ if (!strcasecmp(prov_vec[0], "sockets")) { + FI_INFO(&core_prov, FI_LOG_CORE, + "Sockets requested, skipping util layering\n"); + return 0; ++ } else { ++ return 1; + } +- +- if (!ofi_is_util_prov(provider) && +- ((strlen(provider->name) != core_len) || +- strncasecmp(core_name, provider->name, core_len))) +- return 0; + } + +- return 1; ++ if ((count == 2) && ofi_has_util_prefix(prov_vec[0]) && ++ !ofi_has_util_prefix(prov_vec[1])) ++ prov_name = prov_vec[0]; ++ else ++ prov_name = prov_vec[count - 1]; ++ ++ return !strcasecmp(provider->name, prov_name); + } + + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) +@@ -700,8 +833,8 @@ int DEFAULT_SYMVER_PRE(fi_getinfo)(uint32_t version, const char *node, + { + struct ofi_prov *prov; + struct fi_info *tail, *cur; +- const char *util_name = NULL, *core_name = NULL; +- size_t util_len = 0, core_len = 0; ++ char **prov_vec = NULL; ++ size_t count = 0; + int ret; + + if (!ofi_init) +@@ -718,19 +851,20 @@ int DEFAULT_SYMVER_PRE(fi_getinfo)(uint32_t version, const char *node, + } + + if (hints && hints->fabric_attr && hints->fabric_attr->prov_name) { +- util_name = ofi_util_name(hints->fabric_attr->prov_name, +- &util_len); +- core_name = ofi_core_name(hints->fabric_attr->prov_name, +- &core_len); ++ prov_vec = ofi_split_and_alloc(hints->fabric_attr->prov_name, ++ ";", &count); ++ if (!prov_vec) ++ return -FI_ENOMEM; ++ FI_DBG(&core_prov, FI_LOG_CORE, "hints prov_name: %s\n", ++ hints->fabric_attr->prov_name); + } + + *info = tail = NULL; + for (prov = prov_head; prov; prov = prov->next) { +- if (!prov->provider) ++ if (!prov->provider || !prov->provider->getinfo) + continue; + +- if (!ofi_layering_ok(prov->provider, util_name, util_len, +- core_name, core_len, flags)) ++ if (!ofi_layering_ok(prov->provider, prov_vec, count, flags)) + continue; + + if (FI_VERSION_LT(prov->provider->fi_version, version)) { +@@ -771,6 +905,10 @@ int DEFAULT_SYMVER_PRE(fi_getinfo)(uint32_t version, const char *node, + ofi_set_prov_attr(tail->fabric_attr, prov->provider); + tail->fabric_attr->api_version = version; + } ++ ofi_free_string_array(prov_vec); ++ ++ if (!(flags & (OFI_CORE_PROV_ONLY | OFI_GETINFO_INTERNAL))) ++ ofi_filter_info(info); + + return *info ? 0 : -FI_ENODATA; + } +@@ -804,6 +942,7 @@ __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + struct fi_info *DEFAULT_SYMVER_PRE(fi_dupinfo)(const struct fi_info *info) + { + struct fi_info *dup; ++ int ret; + + if (!info) + return ofi_allocinfo_internal(); +@@ -891,6 +1030,13 @@ struct fi_info *DEFAULT_SYMVER_PRE(fi_dupinfo)(const struct fi_info *info) + goto fail; + } + } ++ ++ if (info->nic) { ++ ret = fi_control(&info->nic->fid, FI_DUP, &dup->nic); ++ if (ret && ret != -FI_ENOSYS) ++ goto fail; ++ } ++ + return dup; + + fail: +@@ -905,7 +1051,6 @@ int DEFAULT_SYMVER_PRE(fi_fabric)(struct fi_fabric_attr *attr, + { + struct ofi_prov *prov; + const char *top_name; +- size_t len; + int ret; + + if (!attr || !attr->prov_name || !attr->name) +@@ -914,23 +1059,32 @@ int DEFAULT_SYMVER_PRE(fi_fabric)(struct fi_fabric_attr *attr, + if (!ofi_init) + fi_ini(); + +- top_name = ofi_util_name(attr->prov_name, &len); +- if (!top_name) +- top_name = ofi_core_name(attr->prov_name, &len); ++ top_name = strrchr(attr->prov_name, OFI_NAME_DELIM); ++ if (top_name) ++ top_name++; ++ else ++ top_name = attr->prov_name; + + if (!top_name) + return -FI_EINVAL; + +- prov = ofi_getprov(top_name, len); ++ prov = ofi_getprov(top_name, strlen(top_name)); + if (!prov || !prov->provider || !prov->provider->fabric) + return -FI_ENODEV; + + ret = prov->provider->fabric(attr, fabric, context); +- if (!ret && FI_VERSION_GE(prov->provider->fi_version, FI_VERSION(1, 5))) +- (*fabric)->api_version = attr->api_version; ++ if (!ret) { ++ if (FI_VERSION_GE(prov->provider->fi_version, FI_VERSION(1, 5))) ++ (*fabric)->api_version = attr->api_version; ++ FI_INFO(&core_prov, FI_LOG_CORE, "Opened fabric: %s\n", ++ attr->name); ++ ++ ofi_hook_install(*fabric, fabric, prov->provider); ++ } ++ + return ret; + } +-CURRENT_SYMVER(fi_fabric_, fi_fabric); ++DEFAULT_SYMVER(fi_fabric_, fi_fabric, FABRIC_1.1); + + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + uint32_t DEFAULT_SYMVER_PRE(fi_version)(void) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/fi_tostr.c b/src/mpid/ch4/netmod/ofi/libfabric/src/fi_tostr.c +index b43ed72..3333a34 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/fi_tostr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/fi_tostr.c +@@ -64,53 +64,24 @@ + * + * Printing functions are generally named after this pattern: + * +- * struct fi_info : fi_tostr_info(..., struct fi_info, ...) +- * fi_info->caps : fi_tostr_caps(..., typeof(caps), ...) ++ * struct fi_info : ofi_tostr_info(..., struct fi_info, ...) ++ * fi_info->caps : ofi_tostr_caps(..., typeof(caps), ...) + */ + +-#define FI_BUFSIZ 8192 ++#define OFI_BUFSIZ 8192 + +-#define TAB " " +- +-#define CASEENUMSTR(SYM) \ +- case SYM: { strcatf(buf, #SYM); break; } +-#define IFFLAGSTR(flags, SYM) \ +- do { if (flags & SYM) strcatf(buf, #SYM ", "); } while(0) +- +-static void fi_remove_comma(char *buffer) ++static void ofi_tostr_fid(const char *label, char *buf, const struct fid *fid) + { +- size_t sz = strlen(buffer); +- if (sz < 2) +- return; +- if (strcmp(&buffer[sz-2], ", ") == 0) +- buffer[sz-2] = '\0'; +-} +- +-static void strcatf(char *dest, const char *fmt, ...) +-{ +- size_t len = strnlen(dest,FI_BUFSIZ); +- va_list arglist; +- +- va_start (arglist, fmt); +- vsnprintf(&dest[len], FI_BUFSIZ - 1 - len, fmt, arglist); +- va_end (arglist); ++ if (!fid || !FI_CHECK_OP(fid->ops, struct fi_ops, tostr)) ++ ofi_strcatf(buf, "%s%p\n", label, fid); ++ else ++ fid->ops->tostr(fid, buf, OFI_BUFSIZ - strnlen(buf, OFI_BUFSIZ)); + } + +-static void fi_tostr_flags(char *buf, uint64_t flags) ++static void ofi_tostr_opflags(char *buf, uint64_t flags) + { +- IFFLAGSTR(flags, FI_MSG); +- IFFLAGSTR(flags, FI_RMA); +- IFFLAGSTR(flags, FI_TAGGED); +- IFFLAGSTR(flags, FI_ATOMIC); + IFFLAGSTR(flags, FI_MULTICAST); + +- IFFLAGSTR(flags, FI_READ); +- IFFLAGSTR(flags, FI_WRITE); +- IFFLAGSTR(flags, FI_RECV); +- IFFLAGSTR(flags, FI_SEND); +- IFFLAGSTR(flags, FI_REMOTE_READ); +- IFFLAGSTR(flags, FI_REMOTE_WRITE); +- + IFFLAGSTR(flags, FI_MULTI_RECV); + IFFLAGSTR(flags, FI_REMOTE_CQ_DATA); + IFFLAGSTR(flags, FI_MORE); +@@ -125,12 +96,13 @@ static void fi_tostr_flags(char *buf, uint64_t flags) + IFFLAGSTR(flags, FI_DELIVERY_COMPLETE); + IFFLAGSTR(flags, FI_AFFINITY); + +- IFFLAGSTR(flags, FI_RMA_PMEM); ++ IFFLAGSTR(flags, FI_CLAIM); ++ IFFLAGSTR(flags, FI_DISCARD); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_addr_format(char *buf, uint32_t addr_format) ++static void oofi_tostr_addr_format(char *buf, uint32_t addr_format) + { + switch (addr_format) { + CASEENUMSTR(FI_FORMAT_UNSPEC); +@@ -146,26 +118,26 @@ static void fi_tostr_addr_format(char *buf, uint32_t addr_format) + CASEENUMSTR(FI_ADDR_STR); + default: + if (addr_format & FI_PROV_SPECIFIC) +- strcatf(buf, "Provider specific"); ++ ofi_strcatf(buf, "Provider specific"); + else +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_progress(char *buf, enum fi_progress progress) ++static void ofi_tostr_progress(char *buf, enum fi_progress progress) + { + switch (progress) { + CASEENUMSTR(FI_PROGRESS_UNSPEC); + CASEENUMSTR(FI_PROGRESS_AUTO); + CASEENUMSTR(FI_PROGRESS_MANUAL); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_threading(char *buf, enum fi_threading threading) ++static void ofi_tostr_threading(char *buf, enum fi_threading threading) + { + switch (threading) { + CASEENUMSTR(FI_THREAD_UNSPEC); +@@ -175,14 +147,13 @@ static void fi_tostr_threading(char *buf, enum fi_threading threading) + CASEENUMSTR(FI_THREAD_COMPLETION); + CASEENUMSTR(FI_THREAD_ENDPOINT); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_order(char *buf, uint64_t flags) ++static void ofi_tostr_msgorder(char *buf, uint64_t flags) + { +- IFFLAGSTR(flags, FI_ORDER_NONE); + IFFLAGSTR(flags, FI_ORDER_RAR); + IFFLAGSTR(flags, FI_ORDER_RAW); + IFFLAGSTR(flags, FI_ORDER_RAS); +@@ -192,30 +163,59 @@ static void fi_tostr_order(char *buf, uint64_t flags) + IFFLAGSTR(flags, FI_ORDER_SAR); + IFFLAGSTR(flags, FI_ORDER_SAW); + IFFLAGSTR(flags, FI_ORDER_SAS); +- IFFLAGSTR(flags, FI_ORDER_STRICT); ++ ++ ++ ofi_remove_comma(buf); ++} ++ ++static void ofi_tostr_comporder(char *buf, uint64_t flags) ++{ ++ if ((flags & FI_ORDER_STRICT) == FI_ORDER_NONE) { ++ ofi_strcatf(buf, "FI_ORDER_NONE, "); ++ } else if ((flags & FI_ORDER_STRICT) == FI_ORDER_STRICT) { ++ ofi_strcatf(buf, "FI_ORDER_STRICT, "); ++ } ++ + IFFLAGSTR(flags, FI_ORDER_DATA); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_caps(char *buf, uint64_t caps) ++static void ofi_tostr_caps(char *buf, uint64_t caps) + { ++ IFFLAGSTR(caps, FI_MSG); ++ IFFLAGSTR(caps, FI_RMA); ++ IFFLAGSTR(caps, FI_TAGGED); ++ IFFLAGSTR(caps, FI_ATOMIC); ++ IFFLAGSTR(caps, FI_MULTICAST); ++ ++ IFFLAGSTR(caps, FI_READ); ++ IFFLAGSTR(caps, FI_WRITE); ++ IFFLAGSTR(caps, FI_RECV); ++ IFFLAGSTR(caps, FI_SEND); ++ IFFLAGSTR(caps, FI_REMOTE_READ); ++ IFFLAGSTR(caps, FI_REMOTE_WRITE); ++ ++ IFFLAGSTR(caps, FI_MULTI_RECV); ++ IFFLAGSTR(caps, FI_REMOTE_CQ_DATA); ++ IFFLAGSTR(caps, FI_TRIGGER); ++ IFFLAGSTR(caps, FI_FENCE); ++ ++ IFFLAGSTR(caps, FI_VARIABLE_MSG); + IFFLAGSTR(caps, FI_RMA_PMEM); + IFFLAGSTR(caps, FI_SOURCE_ERR); + IFFLAGSTR(caps, FI_LOCAL_COMM); + IFFLAGSTR(caps, FI_REMOTE_COMM); + IFFLAGSTR(caps, FI_SHARED_AV); +- IFFLAGSTR(caps, FI_NUMERICHOST); + IFFLAGSTR(caps, FI_RMA_EVENT); + IFFLAGSTR(caps, FI_SOURCE); + IFFLAGSTR(caps, FI_NAMED_RX_CTX); + IFFLAGSTR(caps, FI_DIRECTED_RECV); +- fi_tostr_flags(buf, caps); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_ep_type(char *buf, enum fi_ep_type ep_type) ++static void ofi_tostr_ep_type(char *buf, enum fi_ep_type ep_type) + { + switch (ep_type) { + CASEENUMSTR(FI_EP_UNSPEC); +@@ -225,12 +225,12 @@ static void fi_tostr_ep_type(char *buf, enum fi_ep_type ep_type) + CASEENUMSTR(FI_EP_SOCK_STREAM); + CASEENUMSTR(FI_EP_SOCK_DGRAM); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_protocol(char *buf, uint32_t protocol) ++static void ofi_tostr_protocol(char *buf, uint32_t protocol) + { + switch (protocol) { + CASEENUMSTR(FI_PROTO_UNSPEC); +@@ -249,16 +249,18 @@ static void fi_tostr_protocol(char *buf, uint32_t protocol) + CASEENUMSTR(FI_PROTO_MLX); + CASEENUMSTR(FI_PROTO_NETWORKDIRECT); + CASEENUMSTR(FI_PROTO_SHM); ++ CASEENUMSTR(FI_PROTO_RSTREAM); ++ CASEENUMSTR(FI_PROTO_RDMA_CM_IB_XRC); + default: + if (protocol & FI_PROV_SPECIFIC) +- strcatf(buf, "Provider specific"); ++ ofi_strcatf(buf, "Provider specific"); + else +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_mode(char *buf, uint64_t mode) ++static void ofi_tostr_mode(char *buf, uint64_t mode) + { + IFFLAGSTR(mode, FI_CONTEXT); + IFFLAGSTR(mode, FI_MSG_PREFIX); +@@ -268,11 +270,12 @@ static void fi_tostr_mode(char *buf, uint64_t mode) + IFFLAGSTR(mode, FI_NOTIFY_FLAGS_ONLY); + IFFLAGSTR(mode, FI_RESTRICTED_COMP); + IFFLAGSTR(mode, FI_CONTEXT2); ++ IFFLAGSTR(mode, FI_BUFFERED_RECV); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_addr(char *buf, uint32_t addr_format, void *addr) ++static void ofi_tostr_addr(char *buf, uint32_t addr_format, void *addr) + { + char *p; + size_t len; +@@ -280,7 +283,7 @@ static void fi_tostr_addr(char *buf, uint32_t addr_format, void *addr) + p = buf + strlen(buf); + + if (addr == NULL) { +- strcatf(p, "(null)"); ++ ofi_strcatf(p, "(null)"); + return; + } + +@@ -288,128 +291,128 @@ static void fi_tostr_addr(char *buf, uint32_t addr_format, void *addr) + ofi_straddr(p, &len, addr_format, addr); + } + +-static void fi_tostr_tx_attr(char *buf, const struct fi_tx_attr *attr, ++static void ofi_tostr_tx_attr(char *buf, const struct fi_tx_attr *attr, + const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_tx_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_tx_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_tx_attr:\n", prefix); +- strcatf(buf, "%s%scaps: [ ", prefix, TAB); +- fi_tostr_caps(buf, attr->caps); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%sfi_tx_attr:\n", prefix); ++ ofi_strcatf(buf, "%s%scaps: [ ", prefix, TAB); ++ ofi_tostr_caps(buf, attr->caps); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%smode: [ ", prefix, TAB); +- fi_tostr_mode(buf, attr->mode); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%smode: [ ", prefix, TAB); ++ ofi_tostr_mode(buf, attr->mode); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%sop_flags: [ ", prefix, TAB); +- fi_tostr_flags(buf, attr->op_flags); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%sop_flags: [ ", prefix, TAB); ++ ofi_tostr_opflags(buf, attr->op_flags); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%smsg_order: [ ", prefix, TAB); +- fi_tostr_order(buf, attr->msg_order); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%smsg_order: [ ", prefix, TAB); ++ ofi_tostr_msgorder(buf, attr->msg_order); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%scomp_order: [ ", prefix, TAB); +- fi_tostr_order(buf, attr->comp_order); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%scomp_order: [ ", prefix, TAB); ++ ofi_tostr_comporder(buf, attr->comp_order); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%sinject_size: %zd\n", prefix, TAB, attr->inject_size); +- strcatf(buf, "%s%ssize: %zd\n", prefix, TAB, attr->size); +- strcatf(buf, "%s%siov_limit: %zd\n", prefix, TAB, attr->iov_limit); +- strcatf(buf, "%s%srma_iov_limit: %zd\n", prefix, TAB, attr->rma_iov_limit); ++ ofi_strcatf(buf, "%s%sinject_size: %zu\n", prefix, TAB, attr->inject_size); ++ ofi_strcatf(buf, "%s%ssize: %zu\n", prefix, TAB, attr->size); ++ ofi_strcatf(buf, "%s%siov_limit: %zu\n", prefix, TAB, attr->iov_limit); ++ ofi_strcatf(buf, "%s%srma_iov_limit: %zu\n", prefix, TAB, attr->rma_iov_limit); + } + +-static void fi_tostr_rx_attr(char *buf, const struct fi_rx_attr *attr, ++static void ofi_tostr_rx_attr(char *buf, const struct fi_rx_attr *attr, + const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_rx_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_rx_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_rx_attr:\n", prefix); +- strcatf(buf, "%s%scaps: [ ", prefix, TAB); +- fi_tostr_caps(buf, attr->caps); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%sfi_rx_attr:\n", prefix); ++ ofi_strcatf(buf, "%s%scaps: [ ", prefix, TAB); ++ ofi_tostr_caps(buf, attr->caps); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%smode: [ ", prefix, TAB); +- fi_tostr_mode(buf, attr->mode); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%smode: [ ", prefix, TAB); ++ ofi_tostr_mode(buf, attr->mode); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%sop_flags: [ ", prefix, TAB); +- fi_tostr_flags(buf, attr->op_flags); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%sop_flags: [ ", prefix, TAB); ++ ofi_tostr_opflags(buf, attr->op_flags); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%smsg_order: [ ", prefix, TAB); +- fi_tostr_order(buf, attr->msg_order); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%smsg_order: [ ", prefix, TAB); ++ ofi_tostr_msgorder(buf, attr->msg_order); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%scomp_order: [ ", prefix, TAB); +- fi_tostr_order(buf, attr->comp_order); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%scomp_order: [ ", prefix, TAB); ++ ofi_tostr_comporder(buf, attr->comp_order); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%stotal_buffered_recv: %zd\n", prefix, TAB, attr->total_buffered_recv); +- strcatf(buf, "%s%ssize: %zd\n", prefix, TAB, attr->size); +- strcatf(buf, "%s%siov_limit: %zd\n", prefix, TAB, attr->iov_limit); ++ ofi_strcatf(buf, "%s%stotal_buffered_recv: %zu\n", prefix, TAB, attr->total_buffered_recv); ++ ofi_strcatf(buf, "%s%ssize: %zu\n", prefix, TAB, attr->size); ++ ofi_strcatf(buf, "%s%siov_limit: %zu\n", prefix, TAB, attr->iov_limit); + } + +-static void fi_tostr_ep_attr(char *buf, const struct fi_ep_attr *attr, const char *prefix) ++static void ofi_tostr_ep_attr(char *buf, const struct fi_ep_attr *attr, const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_ep_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_ep_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_ep_attr:\n", prefix); +- strcatf(buf, "%s%stype: ", prefix, TAB); +- fi_tostr_ep_type(buf, attr->type); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sprotocol: ", prefix, TAB); +- fi_tostr_protocol(buf, attr->protocol); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sprotocol_version: %d\n", prefix, TAB, attr->protocol_version); +- strcatf(buf, "%s%smax_msg_size: %zd\n", prefix, TAB, attr->max_msg_size); +- strcatf(buf, "%s%smsg_prefix_size: %zd\n", prefix, TAB, attr->msg_prefix_size); +- strcatf(buf, "%s%smax_order_raw_size: %zd\n", prefix, TAB, attr->max_order_raw_size); +- strcatf(buf, "%s%smax_order_war_size: %zd\n", prefix, TAB, attr->max_order_war_size); +- strcatf(buf, "%s%smax_order_waw_size: %zd\n", prefix, TAB, attr->max_order_waw_size); +- strcatf(buf, "%s%smem_tag_format: 0x%016llx\n", prefix, TAB, attr->mem_tag_format); +- +- strcatf(buf, "%s%stx_ctx_cnt: %zd\n", prefix, TAB, attr->tx_ctx_cnt); +- strcatf(buf, "%s%srx_ctx_cnt: %zd\n", prefix, TAB, attr->rx_ctx_cnt); +- +- strcatf(buf, "%s%sauth_key_size: %zd\n", prefix, TAB, attr->auth_key_size); ++ ofi_strcatf(buf, "%sfi_ep_attr:\n", prefix); ++ ofi_strcatf(buf, "%s%stype: ", prefix, TAB); ++ ofi_tostr_ep_type(buf, attr->type); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sprotocol: ", prefix, TAB); ++ ofi_tostr_protocol(buf, attr->protocol); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sprotocol_version: %d\n", prefix, TAB, attr->protocol_version); ++ ofi_strcatf(buf, "%s%smax_msg_size: %zu\n", prefix, TAB, attr->max_msg_size); ++ ofi_strcatf(buf, "%s%smsg_prefix_size: %zu\n", prefix, TAB, attr->msg_prefix_size); ++ ofi_strcatf(buf, "%s%smax_order_raw_size: %zu\n", prefix, TAB, attr->max_order_raw_size); ++ ofi_strcatf(buf, "%s%smax_order_war_size: %zu\n", prefix, TAB, attr->max_order_war_size); ++ ofi_strcatf(buf, "%s%smax_order_waw_size: %zu\n", prefix, TAB, attr->max_order_waw_size); ++ ofi_strcatf(buf, "%s%smem_tag_format: 0x%016llx\n", prefix, TAB, attr->mem_tag_format); ++ ++ ofi_strcatf(buf, "%s%stx_ctx_cnt: %zu\n", prefix, TAB, attr->tx_ctx_cnt); ++ ofi_strcatf(buf, "%s%srx_ctx_cnt: %zu\n", prefix, TAB, attr->rx_ctx_cnt); ++ ++ ofi_strcatf(buf, "%s%sauth_key_size: %zu\n", prefix, TAB, attr->auth_key_size); + } + +-static void fi_tostr_resource_mgmt(char *buf, enum fi_resource_mgmt rm) ++static void ofi_tostr_resource_mgmt(char *buf, enum fi_resource_mgmt rm) + { + switch (rm) { + CASEENUMSTR(FI_RM_UNSPEC); + CASEENUMSTR(FI_RM_DISABLED); + CASEENUMSTR(FI_RM_ENABLED); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_av_type(char *buf, enum fi_av_type type) ++static void ofi_tostr_av_type(char *buf, enum fi_av_type type) + { + switch (type) { + CASEENUMSTR(FI_AV_UNSPEC); + CASEENUMSTR(FI_AV_MAP); + CASEENUMSTR(FI_AV_TABLE); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_mr_mode(char *buf, int mr_mode) ++static void ofi_tostr_mr_mode(char *buf, int mr_mode) + { + IFFLAGSTR(mr_mode, FI_MR_BASIC); + IFFLAGSTR(mr_mode, FI_MR_SCALABLE); +@@ -421,10 +424,10 @@ static void fi_tostr_mr_mode(char *buf, int mr_mode) + IFFLAGSTR(mr_mode, FI_MR_MMU_NOTIFY); + IFFLAGSTR(mr_mode, FI_MR_RMA_EVENT); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_op_type(char *buf, int op_type) ++static void ofi_tostr_op_type(char *buf, int op_type) + { + switch (op_type) { + CASEENUMSTR(FI_OP_RECV); +@@ -439,120 +442,121 @@ static void fi_tostr_op_type(char *buf, int op_type) + CASEENUMSTR(FI_OP_CNTR_SET); + CASEENUMSTR(FI_OP_CNTR_ADD); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_domain_attr(char *buf, const struct fi_domain_attr *attr, ++static void ofi_tostr_domain_attr(char *buf, const struct fi_domain_attr *attr, + const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_domain_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_domain_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_domain_attr:\n", prefix); +- +- strcatf(buf, "%s%sdomain: 0x%x\n", prefix, TAB, attr->domain); +- +- strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name); +- strcatf(buf, "%s%sthreading: ", prefix, TAB); +- fi_tostr_threading(buf, attr->threading); +- strcatf(buf, "\n"); +- +- strcatf(buf, "%s%scontrol_progress: ", prefix,TAB); +- fi_tostr_progress(buf, attr->control_progress); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sdata_progress: ", prefix, TAB); +- fi_tostr_progress(buf, attr->data_progress); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sresource_mgmt: ", prefix, TAB); +- fi_tostr_resource_mgmt(buf, attr->resource_mgmt); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sav_type: ", prefix, TAB); +- fi_tostr_av_type(buf, attr->av_type); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%smr_mode: [ ", prefix, TAB); +- fi_tostr_mr_mode(buf, attr->mr_mode); +- strcatf(buf, " ]\n"); +- +- strcatf(buf, "%s%smr_key_size: %zd\n", prefix, TAB, attr->mr_key_size); +- strcatf(buf, "%s%scq_data_size: %zd\n", prefix, TAB, attr->cq_data_size); +- strcatf(buf, "%s%scq_cnt: %zd\n", prefix, TAB, attr->cq_cnt); +- strcatf(buf, "%s%sep_cnt: %zd\n", prefix, TAB, attr->ep_cnt); +- strcatf(buf, "%s%stx_ctx_cnt: %zd\n", prefix, TAB, attr->tx_ctx_cnt); +- strcatf(buf, "%s%srx_ctx_cnt: %zd\n", prefix, TAB, attr->rx_ctx_cnt); +- strcatf(buf, "%s%smax_ep_tx_ctx: %zd\n", prefix, TAB, attr->max_ep_tx_ctx); +- strcatf(buf, "%s%smax_ep_rx_ctx: %zd\n", prefix, TAB, attr->max_ep_rx_ctx); +- strcatf(buf, "%s%smax_ep_stx_ctx: %zd\n", prefix, TAB, attr->max_ep_stx_ctx); +- strcatf(buf, "%s%smax_ep_srx_ctx: %zd\n", prefix, TAB, attr->max_ep_srx_ctx); +- strcatf(buf, "%s%scntr_cnt: %zd\n", prefix, TAB, attr->cntr_cnt); +- strcatf(buf, "%s%smr_iov_limit: %zd\n", prefix, TAB, attr->mr_iov_limit); +- +- strcatf(buf, "%scaps: [ ", TAB); +- fi_tostr_caps(buf, attr->caps); +- strcatf(buf, " ]\n"); +- +- strcatf(buf, "%smode: [ ", TAB); +- fi_tostr_mode(buf, attr->mode); +- strcatf(buf, " ]\n"); +- +- strcatf(buf, "%s%sauth_key_size: %zd\n", prefix, TAB, attr->auth_key_size); +- strcatf(buf, "%s%smax_err_data: %zd\n", prefix, TAB, attr->max_err_data); +- strcatf(buf, "%s%smr_cnt: %zd\n", prefix, TAB, attr->mr_cnt); ++ ofi_strcatf(buf, "%sfi_domain_attr:\n", prefix); ++ ++ ofi_strcatf(buf, "%s%sdomain: 0x%x\n", prefix, TAB, attr->domain); ++ ++ ofi_strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name); ++ ofi_strcatf(buf, "%s%sthreading: ", prefix, TAB); ++ ofi_tostr_threading(buf, attr->threading); ++ ofi_strcatf(buf, "\n"); ++ ++ ofi_strcatf(buf, "%s%scontrol_progress: ", prefix,TAB); ++ ofi_tostr_progress(buf, attr->control_progress); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sdata_progress: ", prefix, TAB); ++ ofi_tostr_progress(buf, attr->data_progress); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sresource_mgmt: ", prefix, TAB); ++ ofi_tostr_resource_mgmt(buf, attr->resource_mgmt); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sav_type: ", prefix, TAB); ++ ofi_tostr_av_type(buf, attr->av_type); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%smr_mode: [ ", prefix, TAB); ++ ofi_tostr_mr_mode(buf, attr->mr_mode); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%s%smr_key_size: %zu\n", prefix, TAB, attr->mr_key_size); ++ ofi_strcatf(buf, "%s%scq_data_size: %zu\n", prefix, TAB, attr->cq_data_size); ++ ofi_strcatf(buf, "%s%scq_cnt: %zu\n", prefix, TAB, attr->cq_cnt); ++ ofi_strcatf(buf, "%s%sep_cnt: %zu\n", prefix, TAB, attr->ep_cnt); ++ ofi_strcatf(buf, "%s%stx_ctx_cnt: %zu\n", prefix, TAB, attr->tx_ctx_cnt); ++ ofi_strcatf(buf, "%s%srx_ctx_cnt: %zu\n", prefix, TAB, attr->rx_ctx_cnt); ++ ofi_strcatf(buf, "%s%smax_ep_tx_ctx: %zu\n", prefix, TAB, attr->max_ep_tx_ctx); ++ ofi_strcatf(buf, "%s%smax_ep_rx_ctx: %zu\n", prefix, TAB, attr->max_ep_rx_ctx); ++ ofi_strcatf(buf, "%s%smax_ep_stx_ctx: %zu\n", prefix, TAB, attr->max_ep_stx_ctx); ++ ofi_strcatf(buf, "%s%smax_ep_srx_ctx: %zu\n", prefix, TAB, attr->max_ep_srx_ctx); ++ ofi_strcatf(buf, "%s%scntr_cnt: %zu\n", prefix, TAB, attr->cntr_cnt); ++ ofi_strcatf(buf, "%s%smr_iov_limit: %zu\n", prefix, TAB, attr->mr_iov_limit); ++ ++ ofi_strcatf(buf, "%scaps: [ ", TAB); ++ ofi_tostr_caps(buf, attr->caps); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%smode: [ ", TAB); ++ ofi_tostr_mode(buf, attr->mode); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%s%sauth_key_size: %zu\n", prefix, TAB, attr->auth_key_size); ++ ofi_strcatf(buf, "%s%smax_err_data: %zu\n", prefix, TAB, attr->max_err_data); ++ ofi_strcatf(buf, "%s%smr_cnt: %zu\n", prefix, TAB, attr->mr_cnt); + } + +-static void fi_tostr_fabric_attr(char *buf, const struct fi_fabric_attr *attr, ++static void ofi_tostr_fabric_attr(char *buf, const struct fi_fabric_attr *attr, + const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_fabric_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_fabric_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_fabric_attr:\n", prefix); +- strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name); +- strcatf(buf, "%s%sprov_name: %s\n", prefix, TAB, attr->prov_name); +- strcatf(buf, "%s%sprov_version: %d.%d\n", prefix, TAB, ++ ofi_strcatf(buf, "%sfi_fabric_attr:\n", prefix); ++ ofi_strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name); ++ ofi_strcatf(buf, "%s%sprov_name: %s\n", prefix, TAB, attr->prov_name); ++ ofi_strcatf(buf, "%s%sprov_version: %d.%d\n", prefix, TAB, + FI_MAJOR(attr->prov_version), FI_MINOR(attr->prov_version)); +- strcatf(buf, "%s%sapi_version: %d.%d\n", prefix, TAB, ++ ofi_strcatf(buf, "%s%sapi_version: %d.%d\n", prefix, TAB, + FI_MAJOR(attr->api_version), FI_MINOR(attr->api_version)); + } + +-static void fi_tostr_info(char *buf, const struct fi_info *info) ++static void ofi_tostr_info(char *buf, const struct fi_info *info) + { +- strcatf(buf, "fi_info:\n"); +- strcatf(buf, "%scaps: [ ", TAB); +- fi_tostr_caps(buf, info->caps); +- strcatf(buf, " ]\n"); +- +- strcatf(buf, "%smode: [ ", TAB); +- fi_tostr_mode(buf, info->mode); +- strcatf(buf, " ]\n"); +- +- strcatf(buf, "%saddr_format: ", TAB); +- fi_tostr_addr_format(buf, info->addr_format); +- strcatf(buf, "\n"); +- +- strcatf(buf, "%ssrc_addrlen: %zd\n", TAB, info->src_addrlen); +- strcatf(buf, "%sdest_addrlen: %zd\n", TAB, info->dest_addrlen); +- strcatf(buf, "%ssrc_addr: ", TAB); +- fi_tostr_addr(buf, info->addr_format, info->src_addr); +- strcatf(buf, "\n"); +- strcatf(buf, "%sdest_addr: ", TAB); +- fi_tostr_addr(buf, info->addr_format, info->dest_addr); +- strcatf(buf, "\n"); +- strcatf(buf, "%shandle: %s\n", TAB, info->handle); +- +- fi_tostr_tx_attr(buf, info->tx_attr, TAB); +- fi_tostr_rx_attr(buf, info->rx_attr, TAB); +- fi_tostr_ep_attr(buf, info->ep_attr, TAB); +- fi_tostr_domain_attr(buf, info->domain_attr, TAB); +- fi_tostr_fabric_attr(buf, info->fabric_attr, TAB); ++ ofi_strcatf(buf, "fi_info:\n"); ++ ofi_strcatf(buf, "%scaps: [ ", TAB); ++ ofi_tostr_caps(buf, info->caps); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%smode: [ ", TAB); ++ ofi_tostr_mode(buf, info->mode); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%saddr_format: ", TAB); ++ oofi_tostr_addr_format(buf, info->addr_format); ++ ofi_strcatf(buf, "\n"); ++ ++ ofi_strcatf(buf, "%ssrc_addrlen: %zu\n", TAB, info->src_addrlen); ++ ofi_strcatf(buf, "%sdest_addrlen: %zu\n", TAB, info->dest_addrlen); ++ ofi_strcatf(buf, "%ssrc_addr: ", TAB); ++ ofi_tostr_addr(buf, info->addr_format, info->src_addr); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%sdest_addr: ", TAB); ++ ofi_tostr_addr(buf, info->addr_format, info->dest_addr); ++ ofi_strcatf(buf, "\n"); ++ ofi_tostr_fid(TAB "handle: ", buf, info->handle); ++ ++ ofi_tostr_tx_attr(buf, info->tx_attr, TAB); ++ ofi_tostr_rx_attr(buf, info->rx_attr, TAB); ++ ofi_tostr_ep_attr(buf, info->ep_attr, TAB); ++ ofi_tostr_domain_attr(buf, info->domain_attr, TAB); ++ ofi_tostr_fabric_attr(buf, info->fabric_attr, TAB); ++ ofi_tostr_fid(TAB "nic_fid: ", buf, &info->nic->fid); + } + +-static void fi_tostr_atomic_type(char *buf, enum fi_datatype type) ++static void ofi_tostr_atomic_type(char *buf, enum fi_datatype type) + { + switch (type) { + CASEENUMSTR(FI_INT8); +@@ -570,12 +574,12 @@ static void fi_tostr_atomic_type(char *buf, enum fi_datatype type) + CASEENUMSTR(FI_LONG_DOUBLE); + CASEENUMSTR(FI_LONG_DOUBLE_COMPLEX); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_atomic_op(char *buf, enum fi_op op) ++static void ofi_tostr_atomic_op(char *buf, enum fi_op op) + { + switch (op) { + CASEENUMSTR(FI_MIN); +@@ -598,18 +602,18 @@ static void fi_tostr_atomic_op(char *buf, enum fi_op op) + CASEENUMSTR(FI_CSWAP_GT); + CASEENUMSTR(FI_MSWAP); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_version(char *buf) ++static void ofi_tostr_version(char *buf) + { +- strcatf(buf, VERSION); +- strcatf(buf, BUILD_ID); ++ ofi_strcatf(buf, VERSION); ++ ofi_strcatf(buf, BUILD_ID); + } + +-static void fi_tostr_eq_event(char *buf, int type) ++static void ofi_tostr_eq_event(char *buf, int type) + { + switch (type) { + CASEENUMSTR(FI_NOTIFY); +@@ -619,12 +623,12 @@ static void fi_tostr_eq_event(char *buf, int type) + CASEENUMSTR(FI_MR_COMPLETE); + CASEENUMSTR(FI_AV_COMPLETE); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_cq_event_flags(char *buf, uint64_t flags) ++static void ofi_tostr_cq_event_flags(char *buf, uint64_t flags) + { + IFFLAGSTR(flags, FI_SEND); + IFFLAGSTR(flags, FI_RECV); +@@ -638,7 +642,9 @@ static void fi_tostr_cq_event_flags(char *buf, uint64_t flags) + IFFLAGSTR(flags, FI_REMOTE_WRITE); + IFFLAGSTR(flags, FI_REMOTE_CQ_DATA); + IFFLAGSTR(flags, FI_MULTI_RECV); +- fi_remove_comma(buf); ++ IFFLAGSTR(flags, FI_MORE); ++ IFFLAGSTR(flags, FI_CLAIM); ++ ofi_remove_comma(buf); + } + + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) +@@ -657,7 +663,7 @@ char *DEFAULT_SYMVER_PRE(fi_tostr)(const void *data, enum fi_type datatype) + enumval = (const int *) data; + + if (!buf) { +- buf = calloc(FI_BUFSIZ, 1); ++ buf = calloc(OFI_BUFSIZ, 1); + if (!buf) + return NULL; + } +@@ -665,77 +671,80 @@ char *DEFAULT_SYMVER_PRE(fi_tostr)(const void *data, enum fi_type datatype) + + switch (datatype) { + case FI_TYPE_INFO: +- fi_tostr_info(buf, data); ++ ofi_tostr_info(buf, data); + break; + case FI_TYPE_EP_TYPE: +- fi_tostr_ep_type(buf, *enumval); ++ ofi_tostr_ep_type(buf, *enumval); + break; + case FI_TYPE_CAPS: +- fi_tostr_caps(buf, *val64); ++ ofi_tostr_caps(buf, *val64); + break; + case FI_TYPE_OP_FLAGS: +- fi_tostr_flags(buf, *val64); ++ ofi_tostr_opflags(buf, *val64); + break; + case FI_TYPE_ADDR_FORMAT: +- fi_tostr_addr_format(buf, *val32); ++ oofi_tostr_addr_format(buf, *val32); + break; + case FI_TYPE_TX_ATTR: +- fi_tostr_tx_attr(buf, data, ""); ++ ofi_tostr_tx_attr(buf, data, ""); + break; + case FI_TYPE_RX_ATTR: +- fi_tostr_rx_attr(buf, data, ""); ++ ofi_tostr_rx_attr(buf, data, ""); + break; + case FI_TYPE_EP_ATTR: +- fi_tostr_ep_attr(buf, data, ""); ++ ofi_tostr_ep_attr(buf, data, ""); + break; + case FI_TYPE_DOMAIN_ATTR: +- fi_tostr_domain_attr(buf, data, ""); ++ ofi_tostr_domain_attr(buf, data, ""); + break; + case FI_TYPE_FABRIC_ATTR: +- fi_tostr_fabric_attr(buf, data, ""); ++ ofi_tostr_fabric_attr(buf, data, ""); + break; + case FI_TYPE_THREADING: +- fi_tostr_threading(buf, *enumval); ++ ofi_tostr_threading(buf, *enumval); + break; + case FI_TYPE_PROGRESS: +- fi_tostr_progress(buf, *enumval); ++ ofi_tostr_progress(buf, *enumval); + break; + case FI_TYPE_PROTOCOL: +- fi_tostr_protocol(buf, *val32); ++ ofi_tostr_protocol(buf, *val32); + break; + case FI_TYPE_MSG_ORDER: +- fi_tostr_order(buf, *val64); ++ ofi_tostr_msgorder(buf, *val64); + break; + case FI_TYPE_MODE: +- fi_tostr_mode(buf, *val64); ++ ofi_tostr_mode(buf, *val64); + break; + case FI_TYPE_AV_TYPE: +- fi_tostr_av_type(buf, *enumval); ++ ofi_tostr_av_type(buf, *enumval); + break; + case FI_TYPE_ATOMIC_TYPE: +- fi_tostr_atomic_type(buf, *enumval); ++ ofi_tostr_atomic_type(buf, *enumval); + break; + case FI_TYPE_ATOMIC_OP: +- fi_tostr_atomic_op(buf, *enumval); ++ ofi_tostr_atomic_op(buf, *enumval); + break; + case FI_TYPE_VERSION: +- fi_tostr_version(buf); ++ ofi_tostr_version(buf); + break; + case FI_TYPE_EQ_EVENT: +- fi_tostr_eq_event(buf, *enumval); ++ ofi_tostr_eq_event(buf, *enumval); + break; + case FI_TYPE_CQ_EVENT_FLAGS: +- fi_tostr_cq_event_flags(buf, *val64); ++ ofi_tostr_cq_event_flags(buf, *val64); + break; + case FI_TYPE_MR_MODE: + /* mr_mode was an enum converted to int flags */ +- fi_tostr_mr_mode(buf, *enumval); ++ ofi_tostr_mr_mode(buf, *enumval); + break; + case FI_TYPE_OP_TYPE: +- fi_tostr_op_type(buf, *enumval); ++ ofi_tostr_op_type(buf, *enumval); ++ break; ++ case FI_TYPE_FID: ++ ofi_tostr_fid("fid: ", buf, data); + break; + default: +- strcatf(buf, "Unknown type"); ++ ofi_strcatf(buf, "Unknown type"); + break; + } + return buf; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/iov.c b/src/mpid/ch4/netmod/ofi/libfabric/src/iov.c +index c65c885..b40c219 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/iov.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/iov.c +@@ -101,3 +101,72 @@ int ofi_truncate_iov(struct iovec *iov, size_t *iov_count, size_t trim_size) + } + return -FI_ETRUNC; + } ++ ++/* Copy 'len' bytes worth of src iovec to dst */ ++int ofi_copy_iov_desc(struct iovec *dst_iov, void **dst_desc, size_t *dst_count, ++ struct iovec *src_iov, void **src_desc, size_t src_count, ++ size_t *index, size_t *offset, size_t len) ++{ ++ size_t i, j; ++ ++ assert(*index < src_count); ++ assert(*offset <= src_iov[*index].iov_len); ++ ++ for (i = 0, j = *index; j < src_count; i++, j++) { ++ dst_iov[i].iov_base = (uint8_t *)src_iov[j].iov_base + *offset; ++ if (src_desc) ++ dst_desc[i] = src_desc[j]; ++ ++ if (len <= src_iov[j].iov_len - *offset) { ++ dst_iov[i].iov_len = len; ++ *dst_count = i + 1; ++ ++ if (len == src_iov[j].iov_len - *offset) { ++ *index = j + 1; ++ *offset = 0; ++ } else { ++ *index = j; ++ *offset += len; ++ } ++ return 0; ++ } ++ dst_iov[i].iov_len = src_iov[j].iov_len - *offset; ++ len -= dst_iov[i].iov_len; ++ *offset = 0; ++ } ++ return -FI_ETOOSMALL; ++} ++ ++/* Copy 'len' bytes worth of src fi_rma_iov to dst */ ++int ofi_copy_rma_iov(struct fi_rma_iov *dst_iov, size_t *dst_count, ++ struct fi_rma_iov *src_iov, size_t src_count, ++ size_t *index, size_t *offset, size_t len) ++{ ++ size_t i, j; ++ ++ assert(*index < src_count); ++ assert(*offset <= src_iov[*index].len); ++ ++ for (i = 0, j = *index; j < src_count; i++, j++) { ++ dst_iov[i].addr = src_iov[j].addr + *offset; ++ dst_iov[i].key = src_iov[j].key; ++ ++ if (len <= src_iov[j].len - *offset) { ++ dst_iov[i].len = len; ++ *dst_count = i + 1; ++ ++ if (len == src_iov[j].len - *offset) { ++ *index = j + 1; ++ *offset = 0; ++ } else { ++ *index = j; ++ *offset += len; ++ } ++ return 0; ++ } ++ dst_iov[i].len = src_iov[j].len - *offset; ++ len -= dst_iov[i].len; ++ *offset = 0; ++ } ++ return -FI_ETOOSMALL; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/linux/osd.c b/src/mpid/ch4/netmod/ofi/libfabric/src/linux/osd.c +new file mode 100644 +index 0000000..977193c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/linux/osd.c +@@ -0,0 +1,66 @@ ++/* ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif /* _GNU_SOURCE */ ++ ++#include ++#include ++#include ++ ++#include "ofi.h" ++#include "ofi_osd.h" ++ ++ssize_t ofi_get_hugepage_size(void) ++{ ++ FILE *fd; ++ char *line = NULL; ++ size_t len = 0; ++ ssize_t val = -1; ++ ++ fd = fopen("/proc/meminfo", "r"); ++ if (!fd) ++ return -errno; ++ ++ while (getline(&line, &len, fd) != -1) ++ if (sscanf(line, "Hugepagesize: %lu kB", &val) == 1) ++ break; ++ ++ free(line); ++ fclose(fd); ++ ++ if (val == -1) ++ return -FI_ENOENT; ++ ++ return val * 1024; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/perf.c b/src/mpid/ch4/netmod/ofi/libfabric/src/perf.c +index 5416510..1cd2a65 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/perf.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/perf.c +@@ -42,6 +42,28 @@ + #include + + ++enum ofi_perf_domain perf_domain = OFI_PMU_CPU; ++uint32_t perf_cntr = OFI_PMC_CPU_INSTR; ++uint32_t perf_flags; ++ ++ ++void ofi_perf_init(void) ++{ ++ char *param_val = NULL; ++ ++ fi_param_define(NULL, "perf_cntr", FI_PARAM_STRING, ++ "Performance counter to analyze (default: cpu_instr). " ++ "Options: cpu_instr, cpu_cycles."); ++ fi_param_get_str(NULL, "perf_cntr", ¶m_val); ++ if (!param_val) ++ return; ++ ++ if (!strcasecmp(param_val, "cpu_cycles")) { ++ perf_domain = OFI_PMU_CPU; ++ perf_cntr = OFI_PMC_CPU_CYCLES; ++ } ++} ++ + int ofi_perfset_create(const struct fi_provider *prov, + struct ofi_perfset *set, size_t size, + enum ofi_perf_domain domain, uint32_t cntr_id, +@@ -56,7 +78,7 @@ int ofi_perfset_create(const struct fi_provider *prov, + return ret; + } + +- set->data = calloc(size, sizeof(*set->data) + sizeof(*set->names)); ++ set->data = calloc(size, sizeof(*set->data)); + if (!set->data) { + ofi_pmu_close(set->ctx); + return -FI_ENOMEM; +@@ -64,46 +86,65 @@ int ofi_perfset_create(const struct fi_provider *prov, + + set->prov = prov; + set->size = size; +- set->count = 0; +- set->names = (char **)(set->data + size); + return 0; + } + + void ofi_perfset_close(struct ofi_perfset *set) + { +- while (set->count--) +- free(set->names[set->count]); + ofi_pmu_close(set->ctx); + free(set->data); + } + +-struct ofi_perf_data *ofi_perfset_data(struct ofi_perfset *set, +- const char *name) ++static const char *ofi_perf_name(void) + { +- if (set->count == set->size) +- return NULL; +- +- if (name) { +- set->names[set->count] = strdup(name); +- if (!set->names[set->count]) +- return NULL; ++ switch (perf_domain) { ++ case OFI_PMU_CPU: ++ switch (perf_cntr) { ++ case OFI_PMC_CPU_CYCLES: ++ return "CPU cycles"; ++ case OFI_PMC_CPU_INSTR: ++ return "CPU instr"; ++ } ++ break; ++ case OFI_PMU_CACHE: ++ switch (perf_cntr) { ++ case OFI_PMC_CACHE_L1_DATA: ++ return "L1 data cache"; ++ case OFI_PMC_CACHE_L1_INSTR: ++ return "L1 instr cache"; ++ case OFI_PMC_CACHE_TLB_DATA: ++ return "TLB data cache"; ++ case OFI_PMC_CACHE_TLB_INSTR: ++ return "TLB instr cache"; ++ } ++ break; ++ case OFI_PMU_OS: ++ switch (perf_cntr) { ++ case OFI_PMC_OS_PAGE_FAULT: ++ return "page faults"; ++ } ++ break; ++ case OFI_PMU_NIC: ++ break; + } +- +- return &set->data[set->count++]; ++ return "unknown"; + } + +-void ofi_perfset_log(struct ofi_perfset *set) ++void ofi_perfset_log(struct ofi_perfset *set, const char *names[]) + { + size_t i; + +- for (i = 0; i < set->count; i++) { +- if (!set->data[i].sum) ++ FI_TRACE(set->prov, FI_LOG_CORE, "\n"); ++ FI_TRACE(set->prov, FI_LOG_CORE, "\tPERF: %s\n", ofi_perf_name()); ++ FI_TRACE(set->prov, FI_LOG_CORE, "\t%-20s%-10s%s\n", "Name", "Avg", "Events"); ++ ++ for (i = 0; i < set->size; i++) { ++ if (!set->data[i].events) + continue; + +- FI_INFO(set->prov, FI_LOG_CORE, "PERF (%s) " +- "events=%" PRIu64 " avg=%g\n", +- set->names[i] ? set->names[i] : "unknown", +- set->data[i].events, +- (double) set->data[i].sum / set->data[i].events); ++ FI_TRACE(set->prov, FI_LOG_CORE, "\t%-20s%-10g%" PRIu64 "\n", ++ names && names[i] ? names[i] : "unknown", ++ (double) set->data[i].sum / set->data[i].events, ++ set->data[i].events); + } + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/rbtree.c b/src/mpid/ch4/netmod/ofi/libfabric/src/rbtree.c +index 6b88fb8..c6377fa 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/rbtree.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/rbtree.c +@@ -434,3 +434,24 @@ void *rbtFind(RbtHandle h, void *key) { + } + return NULL; + } ++ ++void rbtTraversal(RbtHandle h, RbtIterator it, void *handler_arg, ++ void(*handler)(void *arg, RbtIterator it)) { ++ RbtType *rbt = h; ++ NodeType *root = it; ++ ++ // apply handler for: ++ // -o the root of the tree/subtree ++ handler(handler_arg, it); ++ // - the left subtree ++ if (root->left != SENTINEL) ++ rbtTraversal(h, root->left, handler_arg, handler); ++ // - the right subtree ++ if (root->right != SENTINEL) ++ rbtTraversal(h, root->right, handler_arg, handler); ++} ++ ++void *rbtRoot(RbtHandle h) { ++ RbtType *rbt = h; ++ return rbt->root; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/shared/ofi_str.c b/src/mpid/ch4/netmod/ofi/libfabric/src/shared/ofi_str.c +new file mode 100644 +index 0000000..80218f9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/shared/ofi_str.c +@@ -0,0 +1,171 @@ ++/* ++ * Copyright (c) 2018 Intel Corp., Inc. All rights reserved. ++ * Copyright (c) 2018 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++/* ++ * TODO remove this and include ofi_osd.h which would require merging osd.h ++ * files in libfabric and fabtests ++ */ ++#if defined _WIN32 ++#define strdup _strdup ++ ++static inline char* strsep(char **stringp, const char *delim) ++{ ++ char* ptr = *stringp; ++ char* p; ++ ++ p = ptr ? strpbrk(ptr, delim) : NULL; ++ ++ if(!p) ++ *stringp = NULL; ++ else ++ { ++ *p = 0; ++ *stringp = p + 1; ++ } ++ ++ return ptr; ++} ++#endif ++ ++/* String utility functions */ ++ ++int ofi_rm_substr(char *str, const char *substr) ++{ ++ char *dest, *src; ++ ++ dest = strstr(str, substr); ++ if (!dest) ++ return -FI_EINVAL; ++ ++ src = dest + strlen(substr); ++ memmove(dest, src, strlen(src) + 1); ++ return 0; ++} ++ ++int ofi_rm_substr_delim(char *str, const char *substr, const char delim) ++{ ++ char *pattern; ++ size_t len = strlen(substr) + 2; // account for delim and null char ++ int ret; ++ ++ pattern = malloc(len); ++ if (!pattern) ++ return -FI_ENOMEM; ++ ++ snprintf(pattern, len, "%c%s", delim, substr); ++ ret = ofi_rm_substr(str, pattern); ++ if (!ret) ++ goto out; ++ ++ snprintf(pattern, len, "%s%c", substr, delim); ++ ret = ofi_rm_substr(str, pattern); ++ if (!ret) ++ goto out; ++ ++ ret = ofi_rm_substr(str, substr); ++out: ++ free(pattern); ++ return ret; ++} ++ ++/* Split the given string "s" using the specified delimiter(s) in the string ++ * "delim" and return an array of strings. The array is terminated with a NULL ++ * pointer. Returned array should be freed with ofi_free_string_array(). ++ * ++ * Returns NULL on failure. ++ */ ++ ++char **ofi_split_and_alloc(const char *s, const char *delim, size_t *count) ++{ ++ int i, n; ++ char *tmp; ++ char *dup = NULL; ++ char **arr = NULL; ++ ++ if (!s || !delim) ++ return NULL; ++ ++ dup = strdup(s); ++ if (!dup) ++ return NULL; ++ ++ /* compute the array size */ ++ n = 1; ++ for (tmp = dup; *tmp != '\0'; ++tmp) { ++ for (i = 0; delim[i] != '\0'; ++i) { ++ if (*tmp == delim[i]) { ++ ++n; ++ break; ++ } ++ } ++ } ++ ++ /* +1 to leave space for NULL terminating pointer */ ++ arr = calloc(n + 1, sizeof(*arr)); ++ if (!arr) ++ goto cleanup; ++ ++ /* set array elts to point inside the dup'ed string */ ++ for (tmp = dup, i = 0; tmp != NULL; ++i) { ++ arr[i] = strsep(&tmp, delim); ++ } ++ assert(i == n); ++ ++ if (count) ++ *count = n; ++ return arr; ++ ++cleanup: ++ free(dup); ++ free(arr); ++ return NULL; ++} ++ ++/* see ofi_split_and_alloc() */ ++void ofi_free_string_array(char **s) ++{ ++ /* all strings are allocated from the same strdup'ed slab, so just free ++ * the first element */ ++ if (s != NULL) ++ free(s[0]); ++ ++ /* and then the actual array of pointers */ ++ free(s); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/tree.c b/src/mpid/ch4/netmod/ofi/libfabric/src/tree.c +new file mode 100644 +index 0000000..ce31090 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/tree.c +@@ -0,0 +1,326 @@ ++/* ++ * Copyright (c) 2015 Cray Inc. All rights reserved. ++ * Copyright (c) 2018 Intel Corp, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++/* ++ * Copied from http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/RedBlackTrees_files/s_rbt.htm ++ * ++ * Disclosure from the author's main page: ++ * (http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/RedBlackTrees_files/s_rbt.htm) ++ * ++ * Source code when part of a software project may be used freely ++ * without reference to the author. ++ * ++ */ ++ ++// reentrant red-black tree ++ ++#include ++ ++#include ++#include ++ ++ ++void ofi_rbmap_init(struct ofi_rbmap *map) ++{ ++ assert(map->compare); ++ ++ map->root = &map->sentinel; ++ map->sentinel.left = &map->sentinel; ++ map->sentinel.right = &map->sentinel; ++ map->sentinel.parent = NULL; ++ map->sentinel.color = BLACK; ++ map->sentinel.data = NULL; ++} ++ ++static void ofi_delete_tree(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ if (node == &map->sentinel) ++ return; ++ ++ ofi_delete_tree(map, node->left); ++ ofi_delete_tree(map, node->right); ++ free(node); ++} ++ ++void ofi_rbmap_cleanup(struct ofi_rbmap *map) ++{ ++ ofi_delete_tree(map, map->root); ++ free(map); ++} ++ ++int ofi_rbmap_empty(struct ofi_rbmap *map) ++{ ++ return map->root == &map->sentinel; ++} ++ ++static void ofi_rotate_left(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ struct ofi_rbnode *y = node->right; ++ ++ node->right = y->left; ++ if (y->left != &map->sentinel) ++ y->left->parent = node; ++ ++ if (y != &map->sentinel) ++ y->parent = node->parent; ++ if (node->parent) { ++ if (node== node->parent->left) ++ node->parent->left = y; ++ else ++ node->parent->right = y; ++ } else { ++ map->root = y; ++ } ++ ++ y->left = node; ++ if (node != &map->sentinel) ++ node->parent = y; ++} ++ ++static void ofi_rotate_right(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ struct ofi_rbnode *y = node->left; ++ ++ node->left = y->right; ++ if (y->right != &map->sentinel) ++ y->right->parent = node; ++ ++ if (y != &map->sentinel) ++ y->parent = node->parent; ++ if (node->parent) { ++ if (node == node->parent->right) ++ node->parent->right = y; ++ else ++ node->parent->left = y; ++ } else { ++ map->root = y; ++ } ++ ++ y->right = node; ++ if (node != &map->sentinel) ++ node->parent = y; ++} ++ ++static void ++ofi_insert_rebalance(struct ofi_rbmap *map, struct ofi_rbnode *x) ++{ ++ struct ofi_rbnode *y; ++ ++ while (x != map->root && x->parent->color == RED) { ++ if (x->parent == x->parent->parent->left) { ++ y = x->parent->parent->right; ++ if (y->color == RED) { ++ x->parent->color = BLACK; ++ y->color = BLACK; ++ x->parent->parent->color = RED; ++ x = x->parent->parent; ++ } else { ++ if (x == x->parent->right) { ++ x = x->parent; ++ ofi_rotate_left(map, x); ++ } ++ ++ x->parent->color = BLACK; ++ x->parent->parent->color = RED; ++ ofi_rotate_right(map, x->parent->parent); ++ } ++ } else { ++ y = x->parent->parent->left; ++ if (y->color == RED) { ++ x->parent->color = BLACK; ++ y->color = BLACK; ++ x->parent->parent->color = RED; ++ x = x->parent->parent; ++ } else { ++ if (x == x->parent->left) { ++ x = x->parent; ++ ofi_rotate_right(map, x); ++ } ++ x->parent->color = BLACK; ++ x->parent->parent->color = RED; ++ ofi_rotate_left(map, x->parent->parent); ++ } ++ } ++ } ++ map->root->color = BLACK; ++} ++ ++int ofi_rbmap_insert(struct ofi_rbmap *map, void *key, void *data) ++{ ++ struct ofi_rbnode *current, *parent, *node; ++ int ret; ++ ++ current = map->root; ++ parent = NULL; ++ ++ while (current != &map->sentinel) { ++ ret = map->compare(map, key, current->data); ++ if (ret == 0) ++ return -FI_EALREADY; ++ ++ parent = current; ++ current = (ret < 0) ? current->left : current->right; ++ } ++ ++ node = malloc(sizeof(*node)); ++ if (!node) ++ return -FI_ENOMEM; ++ ++ node->parent = parent; ++ node->left = &map->sentinel; ++ node->right = &map->sentinel; ++ node->color = RED; ++ node->data = data; ++ ++ if (parent) { ++ if (map->compare(map, key, parent->data) < 0) ++ parent->left = node; ++ else ++ parent->right = node; ++ } else { ++ map->root = node; ++ } ++ ++ ofi_insert_rebalance(map, node); ++ return 0; ++} ++ ++static void ofi_delete_rebalance(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ struct ofi_rbnode *w; ++ ++ while (node != map->root && node->color == BLACK) { ++ if (node == node->parent->left) { ++ w = node->parent->right; ++ if (w->color == RED) { ++ w->color = BLACK; ++ node->parent->color = RED; ++ ofi_rotate_left(map, node->parent); ++ w = node->parent->right; ++ } ++ if (w->left->color == BLACK && w->right->color == BLACK) { ++ w->color = RED; ++ node = node->parent; ++ } else { ++ if (w->right->color == BLACK) { ++ w->left->color = BLACK; ++ w->color = RED; ++ ofi_rotate_right(map, w); ++ w = node->parent->right; ++ } ++ w->color = node->parent->color; ++ node->parent->color = BLACK; ++ w->right->color = BLACK; ++ ofi_rotate_left(map, node->parent); ++ node = map->root; ++ } ++ } else { ++ w = node->parent->left; ++ if (w->color == RED) { ++ w->color = BLACK; ++ node->parent->color = RED; ++ ofi_rotate_right(map, node->parent); ++ w = node->parent->left; ++ } ++ if (w->right->color == BLACK && w->left->color == BLACK) { ++ w->color = RED; ++ node = node->parent; ++ } else { ++ if (w->left->color == BLACK) { ++ w->right->color = BLACK; ++ w->color = RED; ++ ofi_rotate_left(map, w); ++ w = node->parent->left; ++ } ++ w->color = node->parent->color; ++ node->parent->color = BLACK; ++ w->left->color = BLACK; ++ ofi_rotate_right(map, node->parent); ++ node = map->root; ++ } ++ } ++ } ++ node->color = BLACK; ++} ++ ++void ofi_rbmap_delete(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ struct ofi_rbnode *x, *y; ++ ++ if (node->left == &map->sentinel || node->right == &map->sentinel) { ++ y = node; ++ } else { ++ y = node->right; ++ while (y->left != &map->sentinel) ++ y = y->left; ++ } ++ ++ if (y->left != &map->sentinel) ++ x = y->left; ++ else ++ x = y->right; ++ ++ x->parent = y->parent; ++ if (y->parent) { ++ if (y == y->parent->left) ++ y->parent->left = x; ++ else ++ y->parent->right = x; ++ } else { ++ map->root = x; ++ } ++ ++ if (y != node) ++ node->data = y->data; ++ ++ if (y->color == BLACK) ++ ofi_delete_rebalance(map, x); ++ ++ free (y); ++} ++ ++struct ofi_rbnode *ofi_rbmap_find(struct ofi_rbmap *map, void *key) ++{ ++ struct ofi_rbnode *node; ++ int ret; ++ ++ node = map->root; ++ while (node != &map->sentinel) { ++ ret = map->compare(map, key, node->data); ++ if (ret == 0) ++ return node; ++ ++ node = (ret < 0) ? node->left : node->right; ++ } ++ return NULL; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/windows/osd.c b/src/mpid/ch4/netmod/ofi/libfabric/src/windows/osd.c +index 815a916..f387a28 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/windows/osd.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/windows/osd.c +@@ -42,8 +42,7 @@ + #include "ofi_osd.h" + #include "ofi_file.h" + #include "ofi_list.h" +- +-#include "prov/sockets/include/sock.h" ++#include "ofi_util.h" + + #include "rdma/providers/fi_log.h" + +@@ -132,6 +131,23 @@ int ofi_getsockname(SOCKET fd, struct sockaddr *addr, socklen_t *len) + return FI_SUCCESS; + } + ++int ofi_getpeername(SOCKET fd, struct sockaddr *addr, socklen_t *len) ++{ ++ struct sockaddr_storage sock_addr; ++ socklen_t sock_addr_len = sizeof(sock_addr); ++ int ret; ++ ++ ret = getpeername(fd, (struct sockaddr *) &sock_addr, &sock_addr_len); ++ if (ret) ++ return ret; ++ ++ if (addr) ++ memcpy(addr, &sock_addr, MIN(*len, sock_addr_len)); ++ *len = sock_addr_len; ++ ++ return FI_SUCCESS; ++} ++ + int fi_read_file(const char *dir, const char *file, char *buf, size_t size) + { + char *path = 0; +@@ -386,48 +402,6 @@ fn_nomem: + goto fn_complete; + } + +-/* enumerate existing addresses */ +-/* in case if GetIpAddrTable is not enough, try to use +- GetAdaptersInfo or GetAdaptersAddresses */ +-void sock_get_ip_addr_table(struct slist *addr_list) +-{ +- DWORD i; +- MIB_IPADDRTABLE _iptbl; +- MIB_IPADDRTABLE *iptbl = &_iptbl; +- ULONG ips = 1; +- ULONG res = GetIpAddrTable(iptbl, &ips, 0); +- if (res == ERROR_INSUFFICIENT_BUFFER) { +- iptbl = malloc(ips); +- if (!iptbl) +- goto failed_no_mem; +- res = GetIpAddrTable(iptbl, &ips, 0); +- if (res != NO_ERROR) +- goto failed_get_addr; +- } +- else if (res != NO_ERROR) { +- goto failed; +- } +- +- for (i = 0; i < iptbl->dwNumEntries; i++) { +- if (iptbl->table[i].dwAddr && iptbl->table[i].dwAddr != ntohl(INADDR_LOOPBACK)) { +- struct sock_host_list_entry *addr_entry; +- addr_entry = calloc(1, sizeof(struct sock_host_list_entry)); +- inet_ntop(AF_INET, &iptbl->table[i].dwAddr, addr_entry->hostname, sizeof(addr_entry->hostname)); +- slist_insert_tail(&addr_entry->entry, addr_list); +- } +- } +- +- if (iptbl != &_iptbl) +- free(iptbl); +- return; +- +-failed_get_addr: +- free(iptbl); +-failed_no_mem: +-failed: +- return; +-} +- + int getifaddrs(struct ifaddrs **ifap) + { + DWORD i; +@@ -500,44 +474,94 @@ void freeifaddrs(struct ifaddrs *ifa) + } + } + +-ssize_t ofi_writev_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt) ++static ssize_t ++ofi_sendv_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt, int flags) + { +- ssize_t size; ++ ssize_t size = 0; + int ret, i; +- WSABUF *wsa_buf; +- DWORD flags = 0; + +- wsa_buf = (WSABUF *)alloca(iov_cnt * sizeof(WSABUF)); ++ if (iov_cnt == 1) ++ return send(fd, iovec[0].iov_base, iovec[0].iov_len, flags); + + for (i = 0; i < iov_cnt; i++) { +- wsa_buf[i].buf = (char *)iovec[i].iov_base; +- wsa_buf[i].len = iovec[i].iov_len; ++ ret = send(fd, iovec[i].iov_base, iovec[i].iov_len, flags); ++ if (ret >= 0) { ++ size += ret; ++ if (ret != iovec[i].iov_len) ++ return size; ++ } else { ++ return size ? size : ret; ++ } + } ++ return size; ++} + +- ret = WSASend(fd, wsa_buf, iov_cnt, &size, &flags, NULL, NULL); +- if (ret) +- size = (ssize_t)ret; ++static ssize_t ++ofi_recvv_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt, int flags) ++{ ++ ssize_t size = 0; ++ int ret, i; + ++ if (iov_cnt == 1) ++ return recv(fd, iovec[0].iov_base, iovec[0].iov_len, flags); ++ ++ for (i = 0; i < iov_cnt; i++) { ++ ret = recv(fd, iovec[i].iov_base, iovec[i].iov_len, flags); ++ if (ret >= 0) { ++ size += ret; ++ if (ret != iovec[i].iov_len) ++ return size; ++ } else { ++ return size ? size : ret; ++ } ++ } + return size; + } + ++ssize_t ofi_writev_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt) ++{ ++ return ofi_sendv_socket(fd, iovec, iov_cnt, 0); ++} ++ + ssize_t ofi_readv_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt) + { +- ssize_t size; +- int ret,i; +- WSABUF *wsa_buf; +- DWORD flags = 0; ++ return ofi_recvv_socket(fd, iovec, iov_cnt, 0); ++} + +- wsa_buf = (WSABUF *)alloca(iov_cnt *sizeof(WSABUF)); ++ssize_t ofi_sendmsg_tcp(SOCKET fd, const struct msghdr *msg, int flags) ++{ ++ return ofi_sendv_socket(fd, msg->msg_iov, msg->msg_iovlen, flags); ++} + +- for (i = 0; i msg_iov, msg->msg_iovlen, flags); ++} + +- ret = WSARecv(fd, wsa_buf, iov_cnt, &size, &flags, NULL, NULL); +- if (ret) +- size = (ssize_t)ret; ++/* ++ * We assume that the same WSARecvMsg pointer will work for all UDP sockets. ++ */ ++ssize_t ofi_recvmsg_udp(SOCKET fd, struct msghdr *msg, int flags) ++{ ++ static LPFN_WSARECVMSG WSARecvMsg = NULL; ++ GUID guid = WSAID_WSARECVMSG; ++ DWORD bytes; ++ int ret; + +- return size; ++ if (!WSARecvMsg) { ++ pthread_mutex_lock(&common_locks.ini_lock); ++ if (!WSARecvMsg) { ++ ret = WSAIoctl(fd, SIO_GET_EXTENSION_FUNCTION_POINTER, &guid, ++ sizeof(guid), &WSARecvMsg, sizeof(WSARecvMsg), ++ &bytes, NULL, NULL); ++ } else { ++ ret = 0; ++ } ++ pthread_mutex_unlock(&common_locks.ini_lock); ++ if (ret) ++ return ret; ++ } ++ ++ ret = WSARecvMsg(fd, msg, &bytes, NULL, NULL); ++ return ret ? ret : bytes; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/strerror.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/strerror.vcxproj +index 92d685d..ed0f356 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/strerror.vcxproj ++++ b/src/mpid/ch4/netmod/ofi/libfabric/strerror.vcxproj +@@ -30,8 +30,8 @@ + {C835FB00-8E80-4D4A-9791-4B7D6D37168A} + Win32Proj + strerror +- 8.1 + ++ + + + Application +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/util/info.c b/src/mpid/ch4/netmod/ofi/libfabric/util/info.c +index ae66bfb..131591d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/util/info.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/util/info.c +@@ -19,7 +19,7 @@ + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +@@ -219,6 +219,8 @@ static const char *param_type(enum fi_param_type type) + return "String"; + case FI_PARAM_INT: + return "Integer"; ++ case FI_PARAM_SIZE_T: ++ return "size_t"; + case FI_PARAM_BOOL: + return "Boolean (0/1, on/off, true/false, yes/no)"; + default: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/util/pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/util/pingpong.c +index 9651e62..0b0631f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/util/pingpong.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/util/pingpong.c +@@ -21,7 +21,7 @@ + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +@@ -65,10 +65,6 @@ + #define OFI_MR_BASIC_MAP (FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_VIRT_ADDR) + #endif + +-#ifndef PP_FIVERSION +-#define PP_FIVERSION FI_VERSION(1, 5) +-#endif +- + static const uint64_t TAG = 1234; + + enum precision { +@@ -182,7 +178,8 @@ struct ct_pingpong { + + fi_addr_t remote_fi_addr; + void *buf, *tx_buf, *rx_buf; +- size_t buf_size, tx_size, rx_size, msg_prefix_size; ++ size_t buf_size, tx_size, rx_size; ++ size_t rx_prefix_size, tx_prefix_size; + + int timeout_sec; + uint64_t start, end; +@@ -245,13 +242,8 @@ static long parse_ulong(char *str, long max) + + static void pp_banner_fabric_info(struct ct_pingpong *ct) + { +- PP_DEBUG( +- "Running pingpong test with the %s provider and %s endpoint type\n", +- ct->fi->fabric_attr->prov_name, +- fi_tostr(&ct->fi->ep_attr->type, FI_TYPE_EP_TYPE)); +- PP_DEBUG("%s", fi_tostr(ct->fi->fabric_attr, FI_TYPE_FABRIC_ATTR)); +- PP_DEBUG("%s", fi_tostr(ct->fi->domain_attr, FI_TYPE_DOMAIN_ATTR)); +- PP_DEBUG("%s", fi_tostr(ct->fi->ep_attr, FI_TYPE_EP_ATTR)); ++ PP_DEBUG("Running pingpong test with fi_info:\n%s\n", ++ fi_tostr(ct->fi, FI_TYPE_INFO)); + } + + static void pp_banner_options(struct ct_pingpong *ct) +@@ -331,7 +323,7 @@ static int pp_ctrl_init_client(struct ct_pingpong *ct) + struct sockaddr_in in_addr = {0}; + struct addrinfo *results; + struct addrinfo *rp; +- int errno_save; ++ int errno_save = 0; + int ret; + + ret = pp_getaddrinfo(ct->opts.dst_addr, ct->opts.dst_port, &results); +@@ -565,6 +557,18 @@ static int pp_send_name(struct ct_pingpong *ct, struct fid *endpoint) + if (ret < 0) + goto fn; + ++ PP_DEBUG("Sending address format\n"); ++ if (ct->fi) { ++ ret = pp_ctrl_send(ct, (char *) &ct->fi->addr_format, ++ sizeof(ct->fi->addr_format)); ++ } else { ++ ret = pp_ctrl_send(ct, (char *) &ct->fi_pep->addr_format, ++ sizeof(ct->fi_pep->addr_format)); ++ ++ } ++ if (ret < 0) ++ goto fn; ++ + PP_DEBUG("Sending name\n"); + ret = pp_ctrl_send(ct, local_name, addrlen); + PP_DEBUG("Sent name\n"); +@@ -592,6 +596,12 @@ static int pp_recv_name(struct ct_pingpong *ct) + return -ENOMEM; + } + ++ PP_DEBUG("Receiving address format\n"); ++ ret = pp_ctrl_recv(ct, (char *) &ct->hints->addr_format, ++ sizeof(ct->hints->addr_format)); ++ if (ret < 0) ++ return ret; ++ + PP_DEBUG("Receiving name\n"); + ret = pp_ctrl_recv(ct, ct->rem_name, len); + if (ret < 0) +@@ -856,7 +866,7 @@ static int pp_check_buf(void *buf, int size) + + static void eq_readerr(struct fid_eq *eq) + { +- struct fi_eq_err_entry eq_err; ++ struct fi_eq_err_entry eq_err = { 0 }; + int rd; + + rd = fi_eq_readerr(eq, &eq_err, 0); +@@ -1042,7 +1052,7 @@ static void show_perf(char *name, int tsize, int sent, int acked, + + static int pp_cq_readerr(struct fid_cq *cq) + { +- struct fi_cq_err_entry cq_err; ++ struct fi_cq_err_entry cq_err = { 0 }; + int ret; + + ret = fi_cq_readerr(cq, &cq_err, 0); +@@ -1067,7 +1077,7 @@ static int pp_get_cq_comp(struct fid_cq *cq, uint64_t *cur, uint64_t total, + if (timeout_sec >= 0) + a = pp_gettime_us(); + +- while (total - *cur > 0) { ++ do { + ret = fi_cq_read(cq, &comp, 1); + if (ret > 0) { + if (timeout_sec >= 0) +@@ -1091,7 +1101,7 @@ static int pp_get_cq_comp(struct fid_cq *cq, uint64_t *cur, uint64_t total, + return -FI_ENODATA; + } + } +- } ++ } while (total - *cur > 0); + + return 0; + } +@@ -1171,9 +1181,9 @@ static ssize_t pp_tx(struct ct_pingpong *ct, struct fid_ep *ep, size_t size) + ssize_t ret; + + if (pp_check_opts(ct, PP_OPT_VERIFY_DATA | PP_OPT_ACTIVE)) +- pp_fill_buf((char *)ct->tx_buf + ct->msg_prefix_size, size); ++ pp_fill_buf((char *)ct->tx_buf + ct->tx_prefix_size, size); + +- ret = pp_post_tx(ct, ep, size + ct->msg_prefix_size, ct->tx_ctx_ptr); ++ ret = pp_post_tx(ct, ep, size + ct->tx_prefix_size, ct->tx_ctx_ptr); + if (ret) + return ret; + +@@ -1200,9 +1210,9 @@ static ssize_t pp_inject(struct ct_pingpong *ct, struct fid_ep *ep, size_t size) + ssize_t ret; + + if (pp_check_opts(ct, PP_OPT_VERIFY_DATA | PP_OPT_ACTIVE)) +- pp_fill_buf((char *)ct->tx_buf + ct->msg_prefix_size, size); ++ pp_fill_buf((char *)ct->tx_buf + ct->tx_prefix_size, size); + +- ret = pp_post_inject(ct, ep, size + ct->msg_prefix_size); ++ ret = pp_post_inject(ct, ep, size + ct->tx_prefix_size); + if (ret) + return ret; + +@@ -1214,12 +1224,10 @@ static ssize_t pp_post_rx(struct ct_pingpong *ct, struct fid_ep *ep, + { + if (!(ct->fi->caps & FI_TAGGED)) + PP_POST(fi_recv, pp_get_rx_comp, ct->rx_seq, "receive", ep, +- ct->rx_buf, MAX(size, PP_MAX_CTRL_MSG + ct->msg_prefix_size), +- fi_mr_desc(ct->mr), 0, ctx); ++ ct->rx_buf, size, fi_mr_desc(ct->mr), 0, ctx); + else + PP_POST(fi_trecv, pp_get_rx_comp, ct->rx_seq, "t-receive", ep, +- ct->rx_buf, MAX(size, PP_MAX_CTRL_MSG + ct->msg_prefix_size), +- fi_mr_desc(ct->mr), 0, TAG, 0, ctx); ++ ct->rx_buf, size, fi_mr_desc(ct->mr), 0, TAG, 0, ctx); + return 0; + } + +@@ -1232,7 +1240,7 @@ static ssize_t pp_rx(struct ct_pingpong *ct, struct fid_ep *ep, size_t size) + return ret; + + if (pp_check_opts(ct, PP_OPT_VERIFY_DATA | PP_OPT_ACTIVE)) { +- ret = pp_check_buf((char *)ct->rx_buf + ct->msg_prefix_size, ++ ret = pp_check_buf((char *)ct->rx_buf + ct->rx_prefix_size, + size); + if (ret) + return ret; +@@ -1244,8 +1252,8 @@ static ssize_t pp_rx(struct ct_pingpong *ct, struct fid_ep *ep, size_t size) + * before message size is updated. The recvs posted are always for the + * next incoming message. + */ +- ret = pp_post_rx(ct, ct->ep, ct->rx_size + ct->msg_prefix_size, +- ct->rx_ctx_ptr); ++ ret = pp_post_rx(ct, ct->ep, MAX(ct->rx_size , PP_MAX_CTRL_MSG) + ++ ct->rx_prefix_size, ct->rx_ctx_ptr); + if (!ret) + ct->cnt_ack_msg++; + +@@ -1287,7 +1295,7 @@ static int pp_alloc_msgs(struct ct_pingpong *ct) + ct->rx_size = ct->tx_size; + ct->buf_size = MAX(ct->tx_size, PP_MAX_CTRL_MSG) + + MAX(ct->rx_size, PP_MAX_CTRL_MSG) + +- 2 * ct->msg_prefix_size; ++ ct->tx_prefix_size + ct->rx_prefix_size; + + alignment = ofi_sysconf(_SC_PAGESIZE); + if (alignment < 0) { +@@ -1307,7 +1315,7 @@ static int pp_alloc_msgs(struct ct_pingpong *ct) + ct->rx_buf = ct->buf; + ct->tx_buf = (char *)ct->buf + + MAX(ct->rx_size, PP_MAX_CTRL_MSG) + +- ct->msg_prefix_size; ++ ct->tx_prefix_size; + ct->tx_buf = (void *)(((uintptr_t)ct->tx_buf + alignment - 1) & + ~(alignment - 1)); + +@@ -1395,7 +1403,11 @@ static int pp_alloc_active_res(struct ct_pingpong *ct, struct fi_info *fi) + return ret; + } + } +- ct->msg_prefix_size = fi->ep_attr->msg_prefix_size; ++ ++ if (fi->tx_attr->mode & FI_MSG_PREFIX) ++ ct->tx_prefix_size = fi->ep_attr->msg_prefix_size; ++ if (fi->rx_attr->mode & FI_MSG_PREFIX) ++ ct->rx_prefix_size = fi->ep_attr->msg_prefix_size; + + ret = fi_endpoint(ct->domain, fi, &(ct->ep), NULL); + if (ret) { +@@ -1415,7 +1427,8 @@ static int pp_getinfo(struct ct_pingpong *ct, struct fi_info *hints, + if (!hints->ep_attr->type) + hints->ep_attr->type = FI_EP_DGRAM; + +- ret = fi_getinfo(PP_FIVERSION, NULL, NULL, flags, hints, info); ++ ret = fi_getinfo(FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION), ++ NULL, NULL, flags, hints, info); + if (ret) { + PP_PRINTERR("fi_getinfo", ret); + return ret; +@@ -1445,7 +1458,7 @@ static int pp_getinfo(struct ct_pingpong *ct, struct fi_info *hints, + ct->rx_ctx_ptr = NULL; + } + +- if (hints && ((hints->caps & FI_DIRECTED_RECV) == 0)) { ++ if ((hints->caps & FI_DIRECTED_RECV) == 0) { + (*info)->caps &= ~FI_DIRECTED_RECV; + (*info)->rx_attr->caps &= ~FI_DIRECTED_RECV; + } +@@ -1483,8 +1496,8 @@ static int pp_init_ep(struct ct_pingpong *ct) + return ret; + } + +- ret = pp_post_rx(ct, ct->ep, MAX(ct->rx_size, PP_MAX_CTRL_MSG), +- ct->rx_ctx_ptr); ++ ret = pp_post_rx(ct, ct->ep, MAX(ct->rx_size, PP_MAX_CTRL_MSG) + ++ ct->rx_prefix_size, ct->rx_ctx_ptr); + if (ret) + return ret; + +@@ -1522,10 +1535,6 @@ static int pp_exchange_names_connected(struct ct_pingpong *ct) + + PP_DEBUG("Connection-based endpoint: setting up connection\n"); + +- ret = pp_ctrl_sync(ct); +- if (ret) +- return ret; +- + if (ct->opts.dst_addr) { + ret = pp_recv_name(ct); + if (ret < 0) +@@ -1599,26 +1608,21 @@ static int pp_server_connect(struct ct_pingpong *ct) + + ret = pp_exchange_names_connected(ct); + if (ret) +- goto err; +- +- ret = pp_ctrl_sync(ct); +- if (ret) +- goto err; ++ return ret; + + /* Listen */ + rd = fi_eq_sread(ct->eq, &event, &entry, sizeof(entry), -1, 0); + if (rd != sizeof(entry)) { + pp_process_eq_err(rd, ct->eq, "fi_eq_sread"); +- return (int)rd; ++ return (int) rd; + } + +- ct->fi = entry.info; + if (event != FI_CONNREQ) { + fprintf(stderr, "Unexpected CM event %d\n", event); +- ret = -FI_EOTHER; +- goto err; ++ return -FI_EOTHER; + } + ++ ct->fi = entry.info; + ret = fi_domain(ct->fabric, ct->fi, &(ct->domain), NULL); + if (ret) { + PP_PRINTERR("fi_domain", ret); +@@ -1641,10 +1645,6 @@ static int pp_server_connect(struct ct_pingpong *ct) + goto err; + } + +- ret = pp_ctrl_sync(ct); +- if (ret) +- goto err; +- + /* Accept */ + rd = fi_eq_sread(ct->eq, &event, &entry, sizeof(entry), -1, 0); + if (rd != sizeof(entry)) { +@@ -1679,11 +1679,6 @@ static int pp_client_connect(struct ct_pingpong *ct) + if (ret) + return ret; + +- /* Check that the remote is still up */ +- ret = pp_ctrl_sync(ct); +- if (ret) +- return ret; +- + ret = pp_open_fabric_res(ct); + if (ret) + return ret; +@@ -1702,10 +1697,6 @@ static int pp_client_connect(struct ct_pingpong *ct) + return ret; + } + +- ret = pp_ctrl_sync(ct); +- if (ret) +- return ret; +- + /* Connect */ + rd = fi_eq_sread(ct->eq, &event, &entry, sizeof(entry), -1, 0); + if (rd != sizeof(entry)) { +@@ -1846,7 +1837,7 @@ static int pp_finalize(struct ct_pingpong *ct) + { + struct iovec iov; + int ret; +- struct fi_context ctx; ++ struct fi_context ctx[2]; + struct fi_msg msg; + struct fi_msg_tagged tmsg; + +@@ -1854,14 +1845,14 @@ static int pp_finalize(struct ct_pingpong *ct) + + strcpy(ct->tx_buf, "fin"); + iov.iov_base = ct->tx_buf; +- iov.iov_len = 4 + ct->msg_prefix_size; ++ iov.iov_len = 4 + ct->tx_prefix_size; + + if (!(ct->fi->caps & FI_TAGGED)) { + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = &iov; + msg.iov_count = 1; + msg.addr = ct->remote_fi_addr; +- msg.context = &ctx; ++ msg.context = ctx; + + ret = fi_sendmsg(ct->ep, &msg, FI_INJECT | FI_TRANSMIT_COMPLETE); + if (ret) { +@@ -1873,7 +1864,7 @@ static int pp_finalize(struct ct_pingpong *ct) + tmsg.msg_iov = &iov; + tmsg.iov_count = 1; + tmsg.addr = ct->remote_fi_addr; +- tmsg.context = &ctx; ++ tmsg.context = ctx; + tmsg.tag = TAG; + + ret = fi_tsendmsg(ct->ep, &tmsg, FI_INJECT | FI_TRANSMIT_COMPLETE); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/util/strerror.c b/src/mpid/ch4/netmod/ofi/libfabric/util/strerror.c +index ed8d338..a890968 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/util/strerror.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/util/strerror.c +@@ -19,7 +19,7 @@ + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN diff --git a/daos_adio-libfabric.patch.old b/daos_adio-libfabric.patch.old new file mode 100644 index 00000000000..071facb8c63 --- /dev/null +++ b/daos_adio-libfabric.patch.old @@ -0,0 +1,125629 @@ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/.appveyor.yml b/src/mpid/ch4/netmod/ofi/libfabric/.appveyor.yml +index 6f462c6b6..4a69c2ae3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/.appveyor.yml ++++ b/src/mpid/ch4/netmod/ofi/libfabric/.appveyor.yml +@@ -23,14 +23,12 @@ before_build: + + after_build: + - set PATH=%CD%\x64\%CONFIGURATION%;%PATH% +- - cd .. + + before_test: +- - git clone https://github.com/ofiwg/fabtests + - cd fabtests +- - git checkout -b v1.6.x origin/v1.6.x + - msbuild fabtests.sln + + test_script: + - set PATH=%CD%\x64\%CONFIGURATION%;%PATH% ++ - set FI_PROVIDER=sockets + - scripts\runfabtests.cmd +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/.gitattributes b/src/mpid/ch4/netmod/ofi/libfabric/.gitattributes +new file mode 100644 +index 000000000..cf1c38625 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/.gitattributes +@@ -0,0 +1 @@ ++*.cmd eol=crlf +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/.gitignore b/src/mpid/ch4/netmod/ofi/libfabric/.gitignore +index c478d96ef..f8c16e564 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/.gitignore ++++ b/src/mpid/ch4/netmod/ofi/libfabric/.gitignore +@@ -31,6 +31,7 @@ Makefile + Makefile.in + aclocal.m4 + autom4te.cache ++config/* + config.h + config.h.in + config.h.in~ +@@ -63,3 +64,12 @@ util/fi_pingpong + prov/*/*.spec + + .vs ++fabtests.spec ++ ++fabtests/ubertest/fabtest ++fabtests/ubertest/fi_ubertest ++ ++fabtests/benchmarks/fi_* ++fabtests/functional/fi_* ++fabtests/unit/fi_* ++pingpong/fi_* +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/.travis.yml b/src/mpid/ch4/netmod/ofi/libfabric/.travis.yml +index 307fb1fa3..4542a996a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/.travis.yml ++++ b/src/mpid/ch4/netmod/ofi/libfabric/.travis.yml +@@ -1,5 +1,4 @@ + dist: trusty +-sudo: false + language: c + compiler: + - clang +@@ -11,13 +10,31 @@ addons: + apt: + packages: + - rpm +- - libibverbs-dev +- - librdmacm-dev + - libnl-3-200 + - libnl-3-dev + - libnl-route-3-200 + - libnl-route-3-dev + - libnuma-dev ++# required for rdma-core ++ - build-essential ++ - debhelper ++ - dh-systemd ++ - fakeroot ++ - gcc ++ - git ++ - libudev-dev ++ - make ++ - ninja-build ++ - pandoc ++ - pkg-config ++ - python ++ - valgrind ++ - sparse ++ - wget ++ - abi-compliance-checker ++ - abi-dumper ++# 32 bit support packages ++ - gcc-multilib + ssh_known_hosts: + - www.openfabrics.org + - git.kernel.org +@@ -39,10 +56,15 @@ before_install: + + install: + - ./autogen.sh ++ # Build rdma-core because ubuntu trusty doesn't have a sufficiently new version of ibverbs/rdma-core + # Build verbs only in linux as OS X doesn't have verbs support +- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then +- LIBRARY_CONFIGURE_ARGS="$LIBFABRIC_CONFIGURE_ARGS --enable-usnic +- --enable-verbs --enable-mlx=$HOME/mlx"; ++ - if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then ++ RDMA_CORE_BRANCH=v13 ; ++ git clone --depth 1 -b $RDMA_CORE_BRANCH https://github.com/linux-rdma/rdma-core.git && cd rdma-core && bash build.sh && cd - ; ++ RDMA_CORE_PATH=$PWD/rdma-core/build ; ++ export LD_LIBRARY_PATH="$RDMA_CORE_PATH/lib:$LD_LIBRARY_PATH" ; ++ LIBFABRIC_CONFIGURE_ARGS="$LIBFABRIC_CONFIGURE_ARGS --enable-usnic ++ --enable-verbs=$RDMA_CORE_PATH --enable-mlx=$HOME/mlx"; + UCX_BRANCH=v1.2.x; + git clone --depth 1 -b $UCX_BRANCH https://github.com/openucx/ucx.git && cd ucx && ./autogen.sh && ./configure --prefix=$HOME/mlx CFLAGS="-w" && make -j2 install && cd -; + fi +@@ -69,11 +91,16 @@ install: + - make test + - make distcheck + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make rpm; fi ++ # Prepare build for fabtests ++ - ./configure $LIBFABRIC_CONFIGURE_ARGS ++ - make -j2 ++ - make install ++ - make test ++ - make distcheck ++ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make rpm; fi + + script: +- - git clone https://github.com/ofiwg/fabtests.git + - cd fabtests +- - git checkout -b v1.6.x origin/v1.6.x + - ./autogen.sh + - ./configure --prefix=$PREFIX --with-libfabric=$PREFIX + - make -j2 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/AUTHORS b/src/mpid/ch4/netmod/ofi/libfabric/AUTHORS +index 559b95ea6..348227f51 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/AUTHORS ++++ b/src/mpid/ch4/netmod/ofi/libfabric/AUTHORS +@@ -1,12 +1,15 @@ ++aikatz + aingerson + aingerson + Ajay Kulkarni ++aleksandra.justa + Amith Abraham + Ana Guerrero López + Anatoliy Rozanov + Andrew Friedley + Arun C Ilango + arun ilango ++Arun Ilango + Ashley Pittman + Ashley Pittman + Automated bot for the OFIWG organization +@@ -15,8 +18,10 @@ Ben Turrubiates + Ben Turrubiates + Brian Li + Chang Hyun Park ++Charles J Archer + Chen Zhao + Chuck Fossen ++Dardo D Kleiner + Dave Goodell + David Noel + Dmitry Durnov +@@ -28,11 +33,15 @@ Evan Harvey + Evgeny Leksikov + Ezra Kissel + Frank Zago ++germanafro + Gilles Gouaillardet + Gilles Gouaillardet + Hefty + Holger Hoffstätte + Howard Pritchard ++Ignacio Hernandez ++Ira Weiny ++Jaime Arteaga + James Dinan + James Shimek + James Swaro +@@ -43,20 +52,32 @@ Jay Sternberg + Jeff Hammond + Jeff Hammond + Jeff Squyres ++Jerome Berryhill ++Jerome Boyd Berryhill ++Jerome Soumagne + Jianxin Xiong + Jim Snow + Jithin Jose + Joe Doyle ++Johannes Ziegenbalg ++John Biddiscombe ++John Byrne + Jonathan Behrens ++jose ++jose ++JoZie + Ken Raffenetti + kseager + Latchesar Ionkov + Lisanna Dettwyler + Lisanna Dettwyler ++Marcin Salnik + Martin Kontsek + Miao Luo + Michael Blocksome + Michael Chuvelev ++Mohan Gandhi ++Neil Spruit + Oblomov, Sergey + Oblomov, Sergey + OFIWG Bot +@@ -66,8 +87,10 @@ Patrick McCormick + Paul Coffman + Pierre Roux + Prankur Gupta ++Raghu Raja + Reese Faucette + Richard Halkyard ++Robert Wespetal + Sannikov, Alexander + Sayantan Sur + Sean Hefty +@@ -79,6 +102,7 @@ Spruit, Neil R + Srdjan Milakovic + Stan Smith + Steven Vormwald ++Steve Welch + Sung-Eun Choi + Sung-Eun Choi + Sylvain Didelot +@@ -86,6 +110,8 @@ Sylvain Didelot + Thananon Patinyasakdikul + Thomas Smith + Tony Zinger ++tonyzinger ++Venkata Krishna Nimmagadda + Venkata Krishna Nimmagadda + Wesley Bland + Xuyang Wang +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/COPYING b/src/mpid/ch4/netmod/ofi/libfabric/COPYING +index 767dc0971..31bc30a75 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/COPYING ++++ b/src/mpid/ch4/netmod/ofi/libfabric/COPYING +@@ -3,8 +3,8 @@ licenses. You may choose to be licensed under the terms of the the + BSD license or the GNU General Public License (GPL) Version + 2, both included below. + +-Copyright (c) 2015-2018 Intel Corporation. All rights reserved. +-Copyright (c) 2015-2018 Cisco Systems, Inc. All rights reserved. ++Copyright (c) 2015-2019 Intel Corporation. All rights reserved. ++Copyright (c) 2015-2019 Cisco Systems, Inc. All rights reserved. + + ================================================================== + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/Libfabric.Build.Default.props b/src/mpid/ch4/netmod/ofi/libfabric/Libfabric.Build.Default.props +new file mode 100644 +index 000000000..285dce7b3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/Libfabric.Build.Default.props +@@ -0,0 +1,49 @@ ++ ++ ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_10_0).0 ++ $(WindowsTargetPlatformVersion_10_0) ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_8_1).0 ++ $(WindowsTargetPlatformVersion_8_1) ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.0@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_8_0).0 ++ $(WindowsTargetPlatformVersion_8_0) ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_7_1).0 ++ $(WindowsTargetPlatformVersion_7_1) ++ ++ ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0@InstallationFolder) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0@ProductVersion) ++ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0@ProductVersion) ++ ++ $(WindowsTargetPlatformVersion_7_0).0 ++ $(WindowsTargetPlatformVersion_7_0) ++ ++ +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/Makefile.am b/src/mpid/ch4/netmod/ofi/libfabric/Makefile.am +index 6224aa60a..afa52a7a7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/Makefile.am ++++ b/src/mpid/ch4/netmod/ofi/libfabric/Makefile.am +@@ -1,6 +1,7 @@ + # + # Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +-# Copyright (c) 2017 Intel Corporation, Inc. All right reserved. ++# Copyright (c) 2017-2018 Intel Corporation, Inc. All right reserved. ++# Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + # + # Makefile.am for libfabric + +@@ -41,10 +42,12 @@ common_srcs = \ + src/common.c \ + src/enosys.c \ + src/rbtree.c \ ++ src/tree.c \ + src/fasthash.c \ + src/indexer.c \ + src/mem.c \ + src/iov.c \ ++ src/shared/ofi_str.c \ + prov/util/src/util_atomic.c \ + prov/util/src/util_attr.c \ + prov/util/src/util_av.c \ +@@ -63,17 +66,7 @@ common_srcs = \ + prov/util/src/util_ns.c \ + prov/util/src/util_shm.c \ + prov/util/src/util_mem_monitor.c\ +- prov/util/src/util_mr_cache.c \ +- prov/hook/src/hook.c \ +- prov/hook/src/hook_av.c \ +- prov/hook/src/hook_cm.c \ +- prov/hook/src/hook_cntr.c \ +- prov/hook/src/hook_cq.c \ +- prov/hook/src/hook_domain.c \ +- prov/hook/src/hook_ep.c \ +- prov/hook/src/hook_eq.c \ +- prov/hook/src/hook_wait.c \ +- prov/hook/src/hook_xfer.c ++ prov/util/src/util_mr_cache.c + + + if MACOS +@@ -90,6 +83,7 @@ endif + + if LINUX + common_srcs += src/unix/osd.c ++common_srcs += src/linux/osd.c + if HAVE_LINUX_PERF_RDPMC + common_srcs += src/linux/rdpmc.c + endif +@@ -127,16 +121,21 @@ src_libfabric_la_SOURCES = \ + include/ofi_atom.h \ + include/ofi_enosys.h \ + include/ofi_file.h \ ++ include/ofi_hook.h \ + include/ofi_indexer.h \ + include/ofi_iov.h \ + include/ofi_list.h \ ++ include/shared/ofi_str.h \ + include/ofi_lock.h \ + include/ofi_mem.h \ + include/ofi_osd.h \ + include/ofi_proto.h \ ++ include/ofi_recvwin.h \ + include/ofi_rbuf.h \ + include/ofi_shm.h \ + include/ofi_signal.h \ ++ include/ofi_epoll.h \ ++ include/ofi_tree.h \ + include/ofi_util.h \ + include/ofi_atomic.h \ + include/ofi_mr.h \ +@@ -146,7 +145,6 @@ src_libfabric_la_SOURCES = \ + include/rbtree.h \ + include/uthash.h \ + include/ofi_prov.h \ +- prov/hook/src/hook.h \ + include/rdma/providers/fi_log.h \ + include/rdma/providers/fi_prov.h \ + src/fabric.c \ +@@ -155,6 +153,16 @@ src_libfabric_la_SOURCES = \ + src/log.c \ + src/var.c \ + src/abi_1_0.c \ ++ prov/hook/src/hook.c \ ++ prov/hook/src/hook_av.c \ ++ prov/hook/src/hook_cm.c \ ++ prov/hook/src/hook_cntr.c \ ++ prov/hook/src/hook_cq.c \ ++ prov/hook/src/hook_domain.c \ ++ prov/hook/src/hook_ep.c \ ++ prov/hook/src/hook_eq.c \ ++ prov/hook/src/hook_wait.c \ ++ prov/hook/src/hook_xfer.c \ + $(common_srcs) + + src_libfabric_la_CPPFLAGS = $(AM_CPPFLAGS) +@@ -163,7 +171,7 @@ src_libfabric_la_LIBADD = + src_libfabric_la_DEPENDENCIES = libfabric.map + + if !EMBEDDED +-src_libfabric_la_LDFLAGS += -version-info 10:15:9 ++src_libfabric_la_LDFLAGS += -version-info 11:0:10 + endif + src_libfabric_la_LDFLAGS += -export-dynamic \ + $(libfabric_version_script) +@@ -214,12 +222,14 @@ real_man_pages = \ + man/man3/fi_getinfo.3 \ + man/man3/fi_mr.3 \ + man/man3/fi_msg.3 \ ++ man/man3/fi_nic.3 \ + man/man3/fi_poll.3 \ + man/man3/fi_rma.3 \ + man/man3/fi_tagged.3 \ + man/man3/fi_trigger.3 \ + man/man3/fi_version.3 \ + man/man7/fabric.7 \ ++ man/man7/fi_hook.7 \ + man/man7/fi_provider.7 \ + man/man7/fi_direct.7 + +@@ -369,11 +379,15 @@ include prov/psm/Makefile.include + include prov/psm2/Makefile.include + include prov/gni/Makefile.include + include prov/rxm/Makefile.include ++include prov/mrail/Makefile.include + include prov/rxd/Makefile.include + include prov/bgq/Makefile.include + include prov/mlx/Makefile.include + include prov/shm/Makefile.include + include prov/tcp/Makefile.include ++include prov/rstream/Makefile.include ++include prov/hook/Makefile.include ++include prov/hook/perf/Makefile.include + + man_MANS = $(real_man_pages) $(prov_install_man_pages) $(dummy_man_pages) + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/NEWS.md b/src/mpid/ch4/netmod/ofi/libfabric/NEWS.md +index eada67bff..457303543 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/NEWS.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/NEWS.md +@@ -5,6 +5,173 @@ This file contains the main features as well as overviews of specific + bug fixes (and other actions) for each version of Libfabric since + version 1.0. + ++v1.7.0, Mon Jan 7, 2018 ++======================= ++ ++The 1.7 release provides a few enhancements to the libfabric API. ++Notably, it extends the fi_info structure in order to report NIC ++attributes for domains that have a direct association with network ++hardware. The NIC attributes include details about the device, the ++system bus it's attached to, and link state. NIC attributes are ++automatically reported by the fi_info utility application. See the ++fi_nic.3 man page for additional details. ++ ++An experimental capability bit is added to optimize receive side ++processing. This is known as variable messages, and targets applications ++that do now know what size message a peer with send prior to the ++message arriving. Variable messages can be used to avoid receive ++side data copies and eliminate the need for applications to implement ++their own rendezvous protocol. See the fi_msg.3 man page for details on ++variable messages and it's sister, buffered messages. ++ ++Specific details on changes since the 1.6.2 release are outlined below. ++ ++## Core ++ ++- Add ability to report NIC details with fi_info data ++- Improve MR cache notification mechanisms ++- Set sockaddr address format correctly ++- Avoid possible null dereference in eq_read ++- Handle FI_PEEK in CQ/EQ readerr ++- Add debug messages to name server ++- Feature and performance enhancements added to internal buffer pool ++- Add support for huge pages ++- Decrease memory use for idle buffer pools ++- Refactor utility AV functionality ++- Generic counter support enhancements ++- Optimize EP and CQ locking based on application threading level ++- Enhance common support for EQ error handling ++- Add free/alloc memory notification hooks for MR cache support ++- Fix memory monitor unsubscribe handling ++- Add CQ fd wait support ++- Add CQ overflow protection ++- Enhance IPv6 addressing support for AVs ++- Enhancements to support for AV address lookup ++- Fixes for emulated epoll support ++- Allow layering of multiple utility providers ++- Minor bug fixes and optimization ++ ++## Hook ++ ++- Improved hooking infrastructure ++- Add support for installing multiple hooks ++- Support hooks provided by external libraries. ++ ++## GNI ++ ++- Fix CQ readfrom overwriting src_addr in case of multiple events ++- Signal wait set if error entry is added to CQ ++- Fix state data issue with SMSG buffers ++- Enhance and fix possible misuse of default authorization key ++- Add cancel support for SEP ++- Rework SEP setup ++- Suppress huge page counting for ARM ++- Fix incorrect check of FI_SYNC_ERR flag ++ ++## MRAIL ++ ++- Initial release of mrail provider. The current status is experimental: not all ++ features are supported and performance is not guaranteed. ++- Enables increased bandwidth for an underlying provider by utilizing multiple ++ network ports (rails). ++ ++## NetDir ++ ++- Fix crash in initialization code ++- Update references to NetworkDirect header packaged ++ ++## PSM2 ++ ++- Requires PSM2 library version 10.2.260 or later ++- Clean up connection state in fi_av_remove ++- Use psm2_info_query to read HFI device info ++- Clean up CQ/counter poll list when endpoint is closed ++- Support shared address vector ++- Optimize CQ event conversion with psm2_mq_ipeek_dequeue_multi ++- Lock optimization for FI_THREAD_DOMAIN ++- Use new PSM2 fast path isend/irecv functions for large size RMA ++- Support building with latest PSM2 source code (version 11.2.68) ++- Support fabric direct ++ ++## RxD ++ ++- Initial release of RxD provider ++- Provides reliable datagram semantics over unreliable datagram EPs ++- Target is to improve scalability for very large clusters relative to RxM ++ ++## RxM ++ ++- Decrease memory use needed to maintain large number of connections ++- Set correct op_context and flags on CQ error completions ++- Fix file descriptor memory leaks ++- Introduce new protocol optimized for medium message transfers ++- Improve Rx software performance path ++- Use shared receive contexts if required by underlying provider ++- Handle addresses inserted multiple times into AV (for AV map) ++- Performance optimizations for single-thread applications ++- Rework deferred transmit processing ++- Separate and optimize eager and rendezvous protocol processing. ++- Fix passing incorrect addresses for AV insert/remove ++- Fix CM address handling ++- Fix race condition accessing connection handles ++- Simplify small RMA code path ++- Increment correct counter when processing FI_READ events ++- Dynamically grow the number of connections that can be supported ++- Fix padding in wire protocol structures ++- Report correct fi_addr when FI_SOURCE is requested ++- Fix truncating rendezvous messages ++- Fix use after free error in Rx buffer processing ++- Add support for manual progress ++- Make Tx/Rx queue sizes independent of MSG EP sizes ++- Decrease time needed to repost buffers to the MSG EP Rx queue. ++- Miscellaneous bug fixes ++ ++## Sockets ++ ++- Enable MSG EPs when user calls fi_accept ++- Fix fabric names to be underlying IP address ++- Add connection timeout environment variable. ++- Use size of addresses, not structures ++- Add debug messages to display selected addresses ++- Use loopback address in place of localhost ++- Simplify listen paths ++- Add support for IPv6 ++- Code restructuring ++- Avoid unneeded address to string to address translations ++- Check length of iovec entries prior to access buffers ++- Fix segfault ++- Avoid acquiring nested spinlocks resulting in hangs ++- Fix use after free error in triggered op handling ++- New connection manager for MSG EPs to reduce number of threads ++- Avoid retrying recv operations if connection has been broken ++- Fixes for Windows socket support ++ ++## TCP ++ ++- Initial release of optimized socket based tcp provider ++- Supports MSG EPs, to be used in conjunction with RxM provider ++- Targets eventual replacement of sockets provider ++ ++## Verbs ++ ++- Remove RDM EP support. Use RxM and RxD for RDM EPs. ++- Improve address handling and report in fi_getinfo ++- Handle FI_PEER when calling CQ/EQ readerr functions ++- Add support for XRC QPs. ++- Ignore destination address when allocating a PEP ++- Add workaround for i40iw incorrect return values when posting sends ++- Fix completion handling for FI_SELECTIVE_COMPLETION EP setting ++- Change format of fabric name to use hex instead of decimal values ++- Fix handling of err_data with EQ readerr ++- Report correct size of max_err_data ++- Fast path performance improvements ++- Improve progress under high system load ++- Optimize completion processing when handling hidden completions ++- Optimize RMA and MSG transfers by pre-formatting work requests ++- Remove locks based on application threading model ++- Add overflow support for CQ error events ++- Minor cleanups and bug fixes ++ + v1.6.2, Fri Sep 28, 2018 + ======================== + +@@ -13,6 +180,7 @@ v1.6.2, Fri Sep 28, 2018 + - Cleanup of debug messages + + ## GNI ++ + - Fix problems with Scalable Endpoint creation + - Fix interoperability problem with HPC toolkit + - Improve configuration check for kdreg +@@ -102,6 +270,7 @@ v1.6.1, Wed May 8, 2018 + + - Fix use after free error handling triggered ops. + ++ + v1.6.0, Wed Mar 14, 2018 + ======================== + +@@ -115,9 +284,9 @@ v1.6.0, Wed Mar 14, 2018 + - Add const to fi_getinfo() hints parameter + - Improve use of epoll for better scalability + - Fixes to generic name service +-- Implemented support of MR caching without merging of regions + + ## GNI ++ + - Fix a problem with the GNI waitset implementation + - Enable use of XPMEM for intra node data transfers + - Fix a problem with usage of Crays UDREG registration cache +@@ -211,7 +380,7 @@ v1.6.0, Wed Mar 14, 2018 + + - Scalability enhancements + - Fix issue associating a connection with an AV entry that could result in +- application hangs ++ application hangs + - Add support for new persistent memory capabilities + - Fix fi_cq_signal to unblock threads waiting on cq sread calls + - Fix epoll_wait loop handling to avoid out of memory errors +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/README.md b/src/mpid/ch4/netmod/ofi/libfabric/README.md +index fc4d53d4e..b6c640101 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/README.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/README.md +@@ -197,6 +197,19 @@ supports all Libfabric provider requirements and interfaces. + + See the `fi_sockets(7)` man page for more details. + ++### tcp ++ ++*** ++ ++The tcp provider is an optimized socket based provider that supports ++reliable connected endpoints. It is intended to be used directly by ++apps that need MSG endpoint support, or in conjunction with the rxm ++provider for apps that need RDM endpoints. The tcp provider targets ++replacing the sockets provider for applications using standard ++networking hardware. ++ ++See the `fi_tcp(7)` man page for more details. ++ + + ### udp + +@@ -309,9 +322,6 @@ Windows OS to expose the capabilities of the networking devices if the hardware + vendors of the devices implemented the Network Direct service provider interface + (SPI) for their hardware. + +-The Network Direct is an experimental provider. The full support of the Network +-Direct provider will be added to 1.6 release version of libfabric. +- + See the `fi_netdir(7)` man page for more details. + + #### Dependencies +@@ -356,4 +366,38 @@ See the `fi_shm(7)` man page for more details. + + - The shared memory provider only works on Linux platforms and makes use of + kernel support for 'cross-memory attach' (CMA) data copies for large +- transfers. +\ No newline at end of file ++ transfers. ++ ++## WINDOWS Instructions ++ ++Even though windows isn't fully supported yet it is possible to compile and link your library. ++ ++- 1. first you need the NetDirect provider: ++ Network Direct SDK/DDK may be obtained as a nuget package (preferred) from: ++ ++ https://www.nuget.org/packages/NetworkDirect ++ ++ or downloaded from: ++ ++ https://www.microsoft.com/en-us/download/details.aspx?id=36043 ++ on page press Download button and select NetworkDirect_DDK.zip. ++ ++ Extract header files from downloaded ++ NetworkDirect_DDK.zip:`\NetDirect\include\` file into `\prov\netdir\NetDirect\`, ++ or add path to NetDirect headers into VS include paths ++ ++- 2. compiling: ++ libfabric has 6 Visual Studio solution configurations: ++ ++ 1-2: Debug/Release ICC (restricted support for Intel Compiler XE 15.0 only) ++ 3-4: Debug/Release v140 (VS 2015 tool set) ++ 5-6: Debug/Release v141 (VS 2017 tool set) ++ ++ make sure you choose the correct target fitting your compiler. ++ By default the library will be compiled to `\x64\` ++ ++- 3. linking your library ++ - right click your project and select properties. ++ - choose C/C++ > General and add `\include` to "Additional include Directories" ++ - choose Linker > Input and add `\x64\\libfabric.lib` to "Additional Dependencies" ++ - depending on what you are building you may also need to copy `libfabric.dll` into the targetfolder of your own project. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-make-nightly-tarball.pl b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-make-nightly-tarball.pl +index b030a0534..2db6d2414 100755 +--- a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-make-nightly-tarball.pl ++++ b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-make-nightly-tarball.pl +@@ -35,7 +35,6 @@ use File::Basename; + use Getopt::Long; + + my $libfabric_dir_arg; +-my $fabtests_dir_arg; + my $download_dir_arg; + my $libfabric_coverity_token_arg; + my $fabtests_coverity_token_arg; +@@ -45,7 +44,6 @@ my $verbose_arg; + my $debug_arg; + + my $ok = Getopt::Long::GetOptions("libfabric-source-dir=s" => \$libfabric_dir_arg, +- "fabtests-source-dir=s" => \$fabtests_dir_arg, + "download-dir=s" => \$download_dir_arg, + "libfabric-coverity-token=s" => \$libfabric_coverity_token_arg, + "fabtests-coverity-token=s" => \$fabtests_coverity_token_arg, +@@ -56,14 +54,13 @@ my $ok = Getopt::Long::GetOptions("libfabric-source-dir=s" => \$libfabric_dir_ar + ); + + if ($help_arg || !$ok) { +- print "$0 --libfabric-source-dir libfabric_git_tree --fabtests-source-dir fabtests_git_tree --download-dir download_tree\n"; ++ print "$0 --libfabric-source-dir libfabric_git_tree --download-dir download_tree\n"; + exit($ok); + } + + # Sanity checks +-die "Must specify --libfabric-source-dir, --fabtests-source-dir, --download-dir, and --logfile-dir" ++die "Must specify --libfabric-source-dir, --download-dir, and --logfile-dir" + if (!defined($libfabric_dir_arg) || $libfabric_dir_arg eq "" || +- !defined($fabtests_dir_arg) || $fabtests_dir_arg eq "" || + !defined($download_dir_arg) || $download_dir_arg eq "" || + !defined($logfile_dir_arg) || $logfile_dir_arg eq ""); + die "$libfabric_dir_arg is not a valid directory" +@@ -140,7 +137,6 @@ sub get_git_version { + + sub make_tarball { + my $base_name = shift; +- my $source_dir = shift; + my $version = shift; + my $installdir = shift; + +@@ -251,14 +247,13 @@ verbose("*** Building libfabric...\n"); + chdir($libfabric_dir_arg); + git_cleanup(); + my $libfabric_version = get_git_version(); +-my $rebuilt_libfabric = make_tarball("libfabric", $libfabric_dir_arg, +- $libfabric_version, $installdir); ++my $rebuilt_libfabric = make_tarball("libfabric", ++ $libfabric_version, $installdir); + + verbose("\n\n*** Building fabtests...\n"); +-chdir($fabtests_dir_arg); +-git_cleanup(); ++chdir('fabtests'); + my $fabtests_version = get_git_version(); +-my $rebuilt_fabtests = make_tarball("fabtests", $fabtests_dir_arg, ++my $rebuilt_fabtests = make_tarball("fabtests", + $fabtests_version, $installdir); + + if ($rebuilt_libfabric || $rebuilt_fabtests) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-run-all-md2nroff.pl b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-run-all-md2nroff.pl +index b55b4317e..f1f0c7837 100755 +--- a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-run-all-md2nroff.pl ++++ b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-run-all-md2nroff.pl +@@ -147,26 +147,43 @@ if (defined($pages_branch_arg)) { + doit(0, "git clone --single-branch --branch $pages_branch_arg $repo_arg pages", "git-clone-pages"); + } + ++##################################################################### ++# Look for all markdown man pages + ##################################################################### + +-# Find all the *.\d.md files in the source repo +-verbose("*** Finding markdown man pages...\n"); ++# Find all libfabric *.\d.md files ++verbose("*** Finding libfabric markdown man pages...\n"); + opendir(DIR, "source/man"); +-my @markdown_files = grep { /\.\d\.md$/ && -f "source/man/$_" } readdir(DIR); ++my @libfabric_markdown_files = ++ map { "source/man/" . $_ } ++ grep { /\.\d\.md$/ && -f "source/man/$_" } readdir(DIR); ++closedir(DIR); ++verbose("Found: @libfabric_markdown_files\n"); ++ ++# Find all fabtests *.\d.md files ++verbose("*** Finding fabtests markdown man pages...\n"); ++opendir(DIR, "source/fabtests/man"); ++my @fabtests_markdown_files = ++ map { "source/fabtests/man/" . $_ } ++ grep { /\.\d\.md$/ && -f "source/fabtests/man/$_" } readdir(DIR); + closedir(DIR); +-verbose("Found: @markdown_files\n"); ++verbose("Found: @fabtests_markdown_files\n"); + ++##################################################################### ++# Publish any changes to man pages to the gh-pages branch ++# (only libfabric -- not fabtests) + ##################################################################### + + # Copy each of the markdown files to the pages branch checkout + if (defined($pages_branch_arg)) { + chdir("pages/master"); +- foreach my $file (@markdown_files) { +- doit(0, "cp ../../source/man/$file man/$file", "loop-cp"); ++ foreach my $file (@libfabric_markdown_files) { ++ my $base = basename($file); ++ doit(0, "cp $tmpdir/$file man/$base", "loop-cp"); + + # Is there a new man page? If so, we need to "git add" it. +- my $out = `git status --porcelain man/$file`; +- doit(0, "git add man/$file", "loop-git-add") ++ my $out = `git status --porcelain man/$base`; ++ doit(0, "git add man/$base", "loop-git-add") + if ($out =~ /^\?\?/); + } + +@@ -190,11 +207,12 @@ if (defined($pages_branch_arg)) { + push(@headings, { section=>3, title=>"API documentation" }); + foreach my $h (@headings) { + print OUT "\n* $h->{title}\n"; +- foreach my $file (sort(@markdown_files)) { +- if ($file =~ /\.$h->{section}\.md$/) { +- $file =~ m/^(.+)\.$h->{section}\.md$/; +- my $base = $1; +- print OUT " * [$base($h->{section})]($base.$h->{section}.html)\n"; ++ foreach my $file (sort(@libfabric_markdown_files)) { ++ my $base = basename($file); ++ if ($base =~ /\.$h->{section}\.md$/) { ++ $base =~ m/^(.+)\.$h->{section}\.md$/; ++ my $shortname = $1; ++ print OUT " * [$shortname($h->{section})]($shortname.$h->{section}.html)\n"; + } + } + } +@@ -210,28 +228,21 @@ if (defined($pages_branch_arg)) { + } + + ##################################################################### ++# Look for changes to .md files and generate nroff files on master ++##################################################################### ++ ++my @markdown_files = (@libfabric_markdown_files, ++ @fabtests_markdown_files); + + # Now process each of the Markdown files in the source repo and + # generate new nroff man pages. +-chdir("$tmpdir/source/man"); ++chdir("$tmpdir"); + foreach my $file (@markdown_files) { +- doit(0, "../config/md2nroff.pl --source $file", "loop2-md2nroff"); +- +- # Did we generate a new man page? If so, we need to "git add" it. +- my $man_file = basename($file); +- +- $man_file =~ m/\.(\d)\.md$/; +- my $section = $1; +- +- $man_file =~ s/\.md$//; +- +- my $full_filename = "man$section/$man_file"; +- +- my $out = `git status --porcelain $full_filename`; +- doit(0, "git add $full_filename", "loop2-git-add") +- if ($out =~ /^\?\?/); ++ doit(0, "$tmpdir/source/config/md2nroff.pl --source $file", "loop2-md2nroff"); + } + ++##################################################################### ++ + # Similar to above: commit the newly-generated nroff pages and push + # them back upstream. If nothing changed, these will be no-ops. Note + # that there are mandatory CI checks on master, which means we can't +@@ -241,6 +252,7 @@ foreach my $file (@markdown_files) { + + # Try to delete the old pr branch first (it's ok to fail -- i.e., if + # it wasn't there). ++chdir("$tmpdir/source"); + my $pr_branch_name = "pr/update-nroff-generated-man-pages"; + doit(1, "git branch -D $pr_branch_name"); + doit(0, "git checkout -b $pr_branch_name"); +@@ -271,7 +283,7 @@ if ($old_head ne $new_head) { + close(GIT); + + # Create a new pull request +- my $cmd_base = "curl "; ++ my $cmd_base = "curl --silent "; + $cmd_base .= "-H 'Content-Type: application/json' "; + $cmd_base .= "-H 'Authorization: token $pat' "; + $cmd_base .= "-H 'User-Agent: OFIWG-bot' "; +@@ -311,18 +323,19 @@ if ($old_head ne $new_head) { + my $pr_num = $json->{'number'}; + verbose("Created PR #$pr_num\n"); + +- # Wait for the required DCO CI to complete on the git hash for the +- # latest commit. ++ # Wait for the required DCO check to complete on the git hash for ++ # the latest commit. + $outfile = "github-ci-status-check.json"; + + $cmd = $cmd_base; + $cmd .= "-o $outfile "; +- $cmd .= "https://api.github.com/repos/$gh_org/$gh_repo/commits/$new_head/statuses"; ++ $cmd .= "-H 'Accept: application/vnd.github.antiope-preview+json' "; ++ $cmd .= "https://api.github.com/repos/$gh_org/$gh_repo/commits/$new_head/check-runs"; + + my $count = 0; + my $max_count = 30; + my $happy = 0; +- verbose("Waiting for DCO CI to complete\n"); ++ verbose("Waiting for DCO check to complete\n"); + + # Only wait for $max_count iterations + while (!$happy && $count < $max_count) { +@@ -330,20 +343,26 @@ if ($old_head ne $new_head) { + sleep(1); + + unlink($outfile); +- doit(0, $cmd, "github-check-ci-status"); ++ doit(0, $cmd, "github-check-run-status"); + my $json = read_json_file($outfile, 1); + +- if ($json and $#{$json} >= 0) { ++ if ($json and $#{$json->{"check_runs"}} >= 0) { + # If we got any statuses back, check them to see if we can + # find a successful DCO signoff. That would indicate that +- # the required CI test run. +- foreach my $j (@$json) { +- if ($j->{"context"} eq "DCO") { ++ # the required check test ran. ++ foreach my $j (@{$json->{"check_runs"}}) { ++ if ($j->{"name"} eq "DCO") { + verbose("Found DCO status on SHA $new_head\n"); +- if ($j->{"state"} eq "success") { +- verbose("DCO is happy!\n"); +- $happy = 1; +- last; ++ if ($j->{"status"} eq "completed") { ++ if ($j->{"conclusion"} eq "success") { ++ verbose("DCO is happy!\n"); ++ $happy = 1; ++ last; ++ } else { ++ verbose("DCO is not happy -- how did that happen?\n"); ++ $happy = 0; ++ last; ++ } + } + } + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-submit-coverity.pl b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-submit-coverity.pl +index 799057456..2e2b87d32 100755 +--- a/src/mpid/ch4/netmod/ofi/libfabric/config/cron-submit-coverity.pl ++++ b/src/mpid/ch4/netmod/ofi/libfabric/config/cron-submit-coverity.pl +@@ -18,7 +18,7 @@ my $verbose_arg = 0; + my $debug_arg = 0; + my $logfile_dir_arg; + my $configure_args = ""; +-my $make_args = "-j 32"; ++my $make_args = "-j8"; + my $help_arg = 0; + + &Getopt::Long::Configure("bundling"); +@@ -37,6 +37,8 @@ $ok = 0 + if (!defined($filename_arg)); + $ok = 0 + if (!defined($coverity_token_arg)); ++$ok = 0 ++ if (($debug_arg || $verbose_arg) && !defined($logfile_dir_arg)); + if (!$ok || $help_arg) { + print "Usage: $0 --filename=FILENAME --coverity-token=TOKEN [--dry-run] [--verbose] [--help]\n"; + exit($ok); +@@ -94,9 +96,20 @@ verbose "*** Working in $dir\n"; + + # Get the coverity tool, put it in our path + ++my $new_tool = "$ENV{HOME}/coverity-tool-new.tgz"; ++my $old_tool = "$ENV{HOME}/coverity-tool.tgz"; ++ + verbose "*** Downloading coverity tool\n"; +-doit(0, "wget $coverity_tool_url --post-data \"token=$coverity_token_arg\&project=$project_arg\" -O coverity_tool.tgz"); +-doit(0, "tar xf coverity_tool.tgz"); ++doit(1, "curl --silent $coverity_tool_url --request POST --data \"token=$coverity_token_arg\&project=$project_arg\" -o $new_tool -z $old_tool"); ++# With the -z option, curl will download the coverity tool only if it ++# is newer than what we already have. If there's no newer file to ++# download, it'll just exit(0) (which is a LOT faster, because the ++# coverity tool is giant and it takes a long time to download). ++doit(1, "mv $new_tool $old_tool") ++ if (-f $new_tool); ++ ++verbose "*** Extracting coverity tool\n"; ++doit(0, "tar xf $old_tool"); + opendir(my $dh, ".") || + die "Can't opendir ."; + my @files = grep { /^cov/ && -d "./$_" } readdir($dh); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/config/fi_provider.m4 b/src/mpid/ch4/netmod/ofi/libfabric/config/fi_provider.m4 +index 901de770b..704e0eaaa 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/config/fi_provider.m4 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/config/fi_provider.m4 +@@ -92,7 +92,11 @@ dnl + ) + + # Call the provider's CONFIGURE and CONDITIONALS macros +- m4_include([prov/]$1[/configure.m4]) ++ m4_ifnblank(m4_esyscmd(ls [prov/]$1[/configure.m4] 2> /dev/null), ++ [m4_include([prov/]$1[/configure.m4])]) ++ m4_ifnblank(m4_esyscmd(ls [prov/hook/]$1[/configure.m4] 2> /dev/null), ++ [m4_include([prov/hook/]$1[/configure.m4])]) ++ + _FI_PROVIDER_INVOKE($1, [CONFIGURE], [yes], [yes]) + _FI_PROVIDER_INVOKE($1, [CONDITIONALS], [no], [no]) + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/configure.ac b/src/mpid/ch4/netmod/ofi/libfabric/configure.ac +index 05b8d1316..060e1d85e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/configure.ac ++++ b/src/mpid/ch4/netmod/ofi/libfabric/configure.ac +@@ -4,7 +4,7 @@ dnl + dnl Process this file with autoconf to produce a configure script. + + AC_PREREQ([2.60]) +-AC_INIT([libfabric], [1.6.2], [ofiwg@lists.openfabrics.org]) ++AC_INIT([libfabric], [1.7.0], [ofiwg@lists.openfabrics.org]) + AC_CONFIG_SRCDIR([src/fabric.c]) + AC_CONFIG_AUX_DIR(config) + AC_CONFIG_MACRO_DIR(config) +@@ -50,9 +50,9 @@ AS_IF([test x"$with_build_id" = x"no"], [with_build_id=""]) + AC_DEFINE_UNQUOTED([BUILD_ID],["$with_build_id"], + [adds build_id to version if it was defined]) + +-# Fix autoconf's habit of setting CFLAGS="-g -O2" by default while still ++# Override autoconf default CFLAG settings (e.g. "-g -O2") while still + # allowing the user to explicitly set CFLAGS="" +-: ${CFLAGS="-fvisibility=hidden -O2 -DNDEBUG ${base_c_warn_flags}"} ++: ${CFLAGS="-fvisibility=hidden ${base_c_warn_flags}"} + + # AM_PROG_AS would set CFLAGS="-g -O2" by default if not set already so it + # should not be called earlier +@@ -95,30 +95,22 @@ AC_ARG_ENABLE([debug], + + AS_IF([test x"$enable_debug" != x"no"], + [dbg=1 +- CFLAGS_save= +- # Remove -DNDEBUG flag if set +- for flag in $CFLAGS; do +- if test "$flag" != "-DNDEBUG"; then +- CFLAGS_save="$CFLAGS_save $flag" +- fi +- done + # See if all the flags in $debug_c_other_flags work + good_flags= + for flag in $debug_c_other_flags; do + AC_MSG_CHECKING([to see if compiler supports $flag]) +- CFLAGS="$flag $CFLAGS_save" ++ CFLAGS="$flag $CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int i = 3;]])], + [AC_MSG_RESULT([yes]) + good_flags="$flag $good_flags"], + [AC_MSG_RESULT([no])]) + done + debug_c_other_flags=$good_flags +- CFLAGS=$CFLAGS_save + unset good_flags +- unset CFLAGS_save + + CFLAGS="-g -O0 ${base_c_warn_flags} ${debug_c_warn_flags} ${debug_c_other_flags} $CFLAGS"], +- [dbg=0]) ++ [dbg=0 ++ CFLAGS="-O2 -DNDEBUG $CFLAGS"]) + + AC_DEFINE_UNQUOTED([ENABLE_DEBUG],[$dbg], + [defined to 1 if libfabric was configured with --enable-debug, 0 otherwise]) +@@ -246,6 +238,31 @@ AC_TRY_LINK([#include ], + ], + [AC_MSG_RESULT(no)]) + ++dnl Check for gcc memory model aware built-in atomics ++dnl If supported check to see if not internal to compiler ++AC_MSG_CHECKING(compiler support for built-in memory model aware atomics) ++AC_TRY_LINK([#include ], ++ [uint64_t d; ++ uint64_t s; ++ uint64_t c; ++ uint64_t r; ++ r = __atomic_fetch_add(&d, s, __ATOMIC_SEQ_CST); ++ __atomic_load(&d, &r, __ATOMIC_SEQ_CST); ++ __atomic_exchange(&d, &s, &r, __ATOMIC_SEQ_CST); ++ __atomic_compare_exchange(&d,&c,&s,0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); ++ #if defined(__PPC__) && !defined(__PPC64__) ++ #error compiler built-in memory model aware atomics are not supported on PowerPC 32-bit ++ #else ++ return 0; ++ #endif ++ ], ++ [ ++ AC_MSG_RESULT(yes) ++ AC_SEARCH_LIBS([__atomic_load_8], [atomic]) ++ AC_DEFINE(HAVE_BUILTIN_MM_ATOMICS, 1, [Set to 1 to use built-in intrinsics memory model aware atomics]) ++ ], ++ [AC_MSG_RESULT(no)]) ++ + dnl Check for gcc cpuid intrinsics + AC_MSG_CHECKING(compiler support for cpuid) + AC_TRY_LINK([ +@@ -368,9 +385,12 @@ FI_PROVIDER_SETUP([gni]) + FI_PROVIDER_SETUP([udp]) + FI_PROVIDER_SETUP([tcp]) + FI_PROVIDER_SETUP([rxm]) ++FI_PROVIDER_SETUP([mrail]) + FI_PROVIDER_SETUP([rxd]) + FI_PROVIDER_SETUP([bgq]) + FI_PROVIDER_SETUP([shm]) ++FI_PROVIDER_SETUP([rstream]) ++FI_PROVIDER_SETUP([perf]) + FI_PROVIDER_FINI + dnl Configure the .pc file + FI_PROVIDER_SETUP_PC +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/Jenkinsfile.verbs b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/Jenkinsfile.verbs +new file mode 100644 +index 000000000..3d87eb988 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/Jenkinsfile.verbs +@@ -0,0 +1,446 @@ ++// Copyright (c) 2018. Cray Inc. All rights reserved. ++// Libfabric Verbs provider Jenkins Pipeline file ++ ++@Library(['CrayNetworkCI@master', 'dst-shared@master']) _ ++ ++pipeline { ++ options { ++ // Generic build options ++ timeout (time: 30, unit: 'MINUTES') ++ buildDiscarder(logRotator(numToKeepStr: '15')) ++ ++ // Build options ++ disableConcurrentBuilds() ++ timestamps() ++ skipStagesAfterUnstable() ++ } ++ agent { ++ node { ++ label 'wham' ++ } ++ } ++ stages { ++ stage('Prologue') { ++ steps { ++ // creating git short hash ++ script { ++ GIT_SHORT_COMMIT = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim() ++ LIBFABRIC_INSTALL = pwd tmp: true ++ } ++ ++ dir ('contrib/cray/bin') { ++ // verify requirements ++ sh './verify_requirements.sh' ++ ++ // install python environment if necessary ++ sh './setup.sh' ++ } ++ } ++ } ++ stage('Build') { ++ options { ++ timeout (time: 5, unit: 'MINUTES') ++ } ++ steps { ++ sh './autogen.sh' ++ sh "./configure --prefix=$LIBFABRIC_INSTALL" ++ sh "make -j 12" ++ sh "make install" ++ dir ("fabtests") { ++ sh './autogen.sh' ++ sh "./configure --with-libfabric=$LIBFABRIC_INSTALL --prefix=$FABTEST_PATH" ++ sh "make -j12" ++ sh "make -j12 install" ++ } ++ } ++ } ++ stage('Test') { ++ environment { ++ LD_LIBRARY_PATH = "$LIBFABRIC_INSTALL/lib:$LD_LIBRARY_PATH" ++ MPIR_CVAR_OFI_USE_PROVIDER = 'verbs;ofi_rxm' ++ LIBFABRIC_INSTALL_PATH = "$LIBFABRIC_INSTALL" ++ SFT_BIN = "${SFT_INSTALL_PATH + '/bin'}" ++ SFT_MAX_JOB_TIME = '3' ++ SFT_NUM_JOBS = '4' ++ SFT_PROVIDER = 'verbs;ofi_rxm' ++ SFT_BASELINE_DIR = "contrib/cray" ++ SFT_BASELINE_RESULTS_FILE = 'sft_test_results_baseline.txt' ++ SFT_PREVIOUS_BASELINE_RESULTS = 'sft_test_results_baseline.txt' ++ SFT_TEST_CMDS = 'sft_test_commands' ++ SFT_TEST_RESULTS = '_test_results.xml' ++ SFT_TEST_RESULTS_EXPECTED = 'expected_' ++ SFT_TEST_RESULTS_PREFIX = 'BUILD_' ++ SFT_TEST_RESULTS_CI = 'sft_ci_results.yaml' ++ } ++ options { ++ timeout (time: 22, unit: 'MINUTES') ++ } ++ parallel { ++ stage('Unit tests') { ++ steps { ++ echo 'placeholder' ++ } ++ } ++ stage('Smoke tests') { ++ steps { ++ tee ('smoketests.tap') { ++ sh '${BATS_INSTALL_PATH}/bats -t contrib/cray/bats/smoketests.bats' ++ } ++ } ++ post { ++ always { ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r smoketests.tap \\ ++ -w smoketests.xml \\ ++ tap simple.smoketests simple""" ++ } ++ } ++ } ++ stage('Functional Tests: RC') { ++ steps { ++ tee ('fabtests-rc.log') { ++ sh 'srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -v -T 60' ++ } ++ tee ('ubertests-rc.log') { ++ sh 'srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -vvv -T 60 -t complex -u all' ++ } ++ } ++ post { ++ always { ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r fabtests-rc.log \\ ++ -w fabtests-rc.xml \\ ++ fabtests \\ ++ functional.fabtests.rc.quick \\ ++ functional""" ++ ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r ubertests-rc.log \\ ++ -w ubertests-rc.xml \\ ++ fabtests \\ ++ functional.fabtests.rc.uber \\ ++ functional""" ++ } ++ } ++ } ++ stage('Functional Tests: XRC') { ++ steps { ++ tee ('fabtests-xrc.log') { ++ sh 'srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -v -T 60 -e FI_VERBS_PREFER_XRC=1 -e FI_OFI_RXM_USE_SRX=1' ++ } ++ tee ('ubertests-xrc.log') { ++ sh 'srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -vvv -T 60 -t complex -u all -e FI_VERBS_PREFER_XRC=1 -e FI_OFI_RXM_USE_SRX=1' ++ } ++ } ++ post { ++ always { ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r fabtests-xrc.log \\ ++ -w fabtests-xrc.xml \\ ++ fabtests \\ ++ functional.fabtests.xrc.quick \\ ++ functional""" ++ ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r ubertests-xrc.log \\ ++ -w ubertests-xrc.xml \\ ++ fabtests \\ ++ functional.fabtests.xrc.uber \\ ++ functional""" ++ } ++ } ++ } ++ stage('SFT tests: RC') { ++ environment { ++ SFT_ADD_ARGS = "--additional-args ' '" ++ SFT_TEST_RESULTS_SUBDIR = "sft_test_results/RC" ++ SFT_TEST_RESULTS_DIR = "${env.WORKSPACE}" + "/" + "${env.SFT_TEST_RESULTS_SUBDIR}" ++ } ++ steps { ++ sh "mkdir -p ${SFT_TEST_RESULTS_DIR}" ++ timeout (time: 20, unit: 'MINUTES') { ++ // run the test ++ script { ++ try { ++ dir ("${SFT_BIN}") { ++ sh """ ++ ./ci-all.sh \\ ++ --provider '${SFT_PROVIDER}' \\ ++ -L ${SFT_TEST_RESULTS_DIR} \\ ++ --num-jobs ${SFT_NUM_JOBS} \\ ++ --max-job-time ${SFT_MAX_JOB_TIME} \\ ++ --output-cmds ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_CMDS} \\ ++ --results-file ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_CI} \\ ++ ${SFT_ADD_ARGS} ++ """ ++ } ++ } catch (exc) { ++ echo 'failed test, ignore result for now' ++ } ++ } ++ } ++ } ++ post { ++ always { ++ sh """ ++ cp ./${SFT_BASELINE_DIR}/${SFT_BASELINE_RESULTS_FILE} ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_RMA${SFT_TEST_RESULTS} -p "TR_RMA" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_TAGGED${SFT_TEST_RESULTS} -p "TR_TAGGED" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_MESSAGE${SFT_TEST_RESULTS} -p "TR_MESSAGE" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_AMO${SFT_TEST_RESULTS} -p "TR_AMO" ++ gzip -r ${SFT_TEST_RESULTS_DIR} ++ gunzip ${SFT_TEST_RESULTS_DIR}/sft_*${SFT_TEST_RESULTS}.gz ++ gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++ """ ++ // archive the results ++ archiveArtifacts artifacts: "${env.SFT_TEST_RESULTS_SUBDIR}/*" ++ } ++ } ++ } ++ stage('SFT tests: XRC') { ++ environment { ++ SFT_ADD_ARGS = "--additional-args '--use-xrc'" ++ SFT_TEST_RESULTS_SUBDIR = "sft_test_results/XRC" ++ SFT_TEST_RESULTS_DIR = "${env.WORKSPACE}" + "/" + "${env.SFT_TEST_RESULTS_SUBDIR}" ++ } ++ steps { ++ sh "mkdir -p ${SFT_TEST_RESULTS_DIR}" ++ timeout (time: 20, unit: 'MINUTES') { ++ // run the test ++ script { ++ try { ++ dir ("${SFT_BIN}") { ++ sh """ ++ ./ci-all.sh \\ ++ --provider '${SFT_PROVIDER}' \\ ++ -L ${SFT_TEST_RESULTS_DIR} \\ ++ --num-jobs ${SFT_NUM_JOBS} \\ ++ --max-job-time ${SFT_MAX_JOB_TIME} \\ ++ --output-cmds ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_CMDS} \\ ++ --results-file ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_CI} \\ ++ ${SFT_ADD_ARGS} ++ """ ++ } ++ } catch (exc) { ++ echo 'failed test, ignore result for now' ++ } ++ } ++ } ++ } ++ post { ++ always { ++ sh """ ++ cp ./${SFT_BASELINE_DIR}/${SFT_BASELINE_RESULTS_FILE} ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_RMA${SFT_TEST_RESULTS} -p "TR_RMA" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_TAGGED${SFT_TEST_RESULTS} -p "TR_TAGGED" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_MESSAGE${SFT_TEST_RESULTS} -p "TR_MESSAGE" ++ ${SFT_BIN}/sft_parse_test_results.pm -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} -d ${SFT_TEST_RESULTS_DIR} -o sft_AMO${SFT_TEST_RESULTS} -p "TR_AMO" ++ gzip -r ${SFT_TEST_RESULTS_DIR} ++ gunzip ${SFT_TEST_RESULTS_DIR}/sft_*${SFT_TEST_RESULTS}.gz ++ gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++ """ ++ // archive the results ++ archiveArtifacts artifacts: "${env.SFT_TEST_RESULTS_SUBDIR}/*" ++ } ++ } ++ } ++ stage("System tests") { ++ steps { ++ echo 'placeholder' ++ } ++ } ++ stage("Applications") { ++ steps { ++ tee ('mpi.tap') { ++ timeout(time: 10, unit: 'MINUTES') { ++ sh '${BATS_INSTALL_PATH}/bats -t contrib/cray/bats/mpi.bats' ++ } ++ } ++ } ++ post { ++ always { ++ sh """contrib/cray/bin/parse_logfiles.sh \\ ++ -r mpi.tap \\ ++ -w mpi.xml \\ ++ tap applications.mpi applications""" ++ } ++ } ++ } ++ } ++ post { ++ always { ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "smoketests.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "*-rc.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "*-xrc.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "sft_test_results/RC/sft_*_test_results.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "sft_test_results/XRC/sft_*_test_results.xml"]]]) ++ step ([$class: 'XUnitBuilder', ++ thresholds: [ ++ [$class: 'FailedThreshold', unstableThreshold: '0']], ++ tools: [[$class: 'JUnitType', pattern: "mpi.xml"]]]) ++ } ++ } ++ } ++ stage("Install Libfabric Build") { ++ when { ++ allOf { ++ expression { currentBuild.result == 'SUCCESS' } ; ++ anyOf { ++ expression { env.BRANCH_NAME == 'master' } ; ++ buildingTag() ; ++ } ++ } ++ } ++ environment { ++ LIBFABRIC_INSTALL_PATH="${LIBFABRIC_BUILD_PATH + '/' + GIT_SHORT_COMMIT}" ++ } ++ steps { ++ sh './autogen.sh' ++ sh "./configure --prefix=$LIBFABRIC_INSTALL_PATH" ++ sh "make -j 12" ++ sh "make install" ++ } ++ } ++ stage("Deploy") { ++ when { ++ allOf { ++ expression { currentBuild.result == 'SUCCESS' } ; ++ anyOf { ++ expression { env.BRANCH_NAME == 'master' } ; ++ buildingTag() ++ } ++ } ++ } ++ options { ++ timeout (time: 5, unit: 'MINUTES') ++ } ++ environment { ++ TAG_DIRECTORY = "${LIBFABRIC_BUILD_PATH + '/tags'}" ++ } ++ failFast true ++ parallel { ++ stage("Create nightly link") { ++ when { ++ expression { env.BRANCH_NAME == 'master' } ++ } ++ steps { ++ dir (env.TAG_DIRECTORY) { ++ sh "rm -f nightly || true" ++ sh "ln -s ../$GIT_SHORT_COMMIT nightly" ++ } ++ } ++ } ++ stage("Create tagged link") { ++ when { ++ buildingTag() ++ } ++ steps { ++ dir (env.TAG_DIRECTORY) { ++ sh "rm -f $BRANCH_NAME || true" ++ sh "ln -s ../$GIT_SHORT_COMMIT $BRANCH_NAME" ++ } ++ } ++ } ++ stage("Create RPMs") { ++ steps { ++ sh 'make dist-bzip2' ++ sh '$WORKSPACE/contrib/buildrpm/buildrpmLibfabric.sh -i verbs -i sockets -osmv $(ls libfabric-*.tar.bz2)' ++ } ++ post { ++ success { ++ stash name: 'rpms', includes: 'rpmbuild/RPMS/**/*' ++ stash name: 'sources', includes: 'rpmbuild/SOURCES/*' ++ } ++ } ++ } ++ } ++ } ++ stage('Publish') { ++ when { ++ allOf { ++ expression { currentBuild.result == 'SUCCESS' } ; ++ expression { return isRelease("${env.GIT_BRANCH}") } ++ } ++ } ++ agent { ++ node { ++ label 'utility_pod' ++ } ++ } ++ steps { ++ container('utility') { ++ sh 'tar -cvzf /tmp/libfabric-source.tar.gz --exclude "*.log" .' ++ ++ // publishes the source RPM to DST's Artifactory instance ++ transfer(artifactName: '/tmp/libfabric-source.tar.gz') ++ ++ // Sends event to message bus to notify other builds ++ publishEvents(["os-networking-libfabric-verbs-publish"]) ++ } ++ } ++ } ++ } ++ post { ++ success { ++ script { ++ try { ++ unstash 'rpms' ++ unstash 'sources' ++ archiveArtifacts 'rpmbuild/SOURCES/*' ++ archiveArtifacts 'rpmbuild/RPMS/**/*' ++ } ++ catch (Exception e) { ++ echo 'No rpms to archive' ++ } ++ } ++ } ++ changed { ++ script { ++ // send email when the state of the pipeline changes ++ // only sends email to @cray.com ++ ++ def emailBody = createEmail(build : currentBuild) ++ def providers = [] ++ def defaultMailer = '' ++ ++ if (env.BRANCH_NAME == 'master') { ++ defaultMailer = mailingList() ++ } else { ++ providers.add ( [$class: 'CulpritsRecipientProvider'] ) ++ providers.add ( [$class: 'RequesterRecipientProvider'] ) ++ providers.add ( [$class: 'DevelopersRecipientProvider'] ) ++ } ++ emailext subject: '$DEFAULT_SUBJECT', ++ body: emailBody, ++ mimeType: 'text/html', ++ recipientProviders: providers, ++ replyTo: '$DEFAULT_REPLYTO', ++ to: defaultMailer ++ } ++ } ++ } ++ environment { ++ ROOT_BUILD_PATH = "/scratch/jenkins/builds" ++ FABTEST_PATH = "${WORKSPACE + '/installs/fabtests'}" ++ LIBFABRIC_BUILD_PATH = "${ROOT_BUILD_PATH + '/libfabric'}" ++ OMB_BUILD_PATH = "${ROOT_BUILD_PATH + '/osu-micro-benchmarks/5.4.2/libexec/osu-micro-benchmarks/mpi'}" ++ MPICH_PATH = "${ROOT_BUILD_PATH + '/mpich/3.3b3'}" ++ SFT_INSTALL_PATH = "${ROOT_BUILD_PATH + '/libfabric-sft/stable'}" ++ BATS_INSTALL_PATH = "${ROOT_BUILD_PATH + '/bats/stable/bin'}" ++ } ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/mpi.bats b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/mpi.bats +new file mode 100644 +index 000000000..48c96e143 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/mpi.bats +@@ -0,0 +1,401 @@ ++#!/usr/bin/env bats ++ ++load test_helper ++ ++# RC ++@test "osu_latency 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_bw 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_mbw_mr 8 ranks, 4 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 8 4) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_mbw_mr ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_get_latency 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_get_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_get_bw 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_get_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_latency 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_bw 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_bibw 2 ranks, 1 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_bibw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allreduce 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allreduce ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allgather 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allgather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allgatherv 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allgatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_alltoall 20 ranks, 5 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_alltoall ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_alltoallv 20 ranks, 5 ranks per node using RC verbs" { ++ skip "fails consistently at 128k message size" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_alltoallv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_barrier 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_barrier ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_bcast 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_bcast ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_gather 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_gather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_gatherv 40 ranks, 10 ranks per node using RC verbs" { ++ skip "fails intermittently" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_gatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iallgather 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iallgather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iallgatherv 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iallgatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoall 20 ranks, 5 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoall ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoallv 20 ranks, 5 ranks per node using RC verbs" { ++ skip "fails consistently at 128k message size" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoallv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoallw 20 ranks, 5 ranks per node using RC verbs" { ++ skip "fails consistently at 128k message size" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoallw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ibarrier 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_ibarrier ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ibcast 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_ibcast ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_igather 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_igather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_igatherv 40 ranks, 10 ranks per node using RC verbs" { ++ skip "fails intermittently" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_igatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iscatter 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iscatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iscatterv 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iscatterv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_reduce 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_reduce ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_reduce_scatter 40 ranks, 10 ranks per node using RC verbs" { ++ skip "fails consistently at 512K message size" ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_reduce_scatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_scatter 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_scatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_scatterv 40 ranks, 10 ranks per node using RC verbs" { ++ run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_scatterv ++ [ "$status" -eq 0 ] ++} ++ ++# XRC ++@test "osu_latency 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_bw 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_mbw_mr 8 ranks, 4 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 8 4) timeout 300 $OMB_BUILD_PATH/pt2pt/osu_mbw_mr ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_get_latency 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_get_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_get_bw 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_get_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_latency 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_latency ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_bw 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_bw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_put_bibw 2 ranks, 1 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 2 1) timeout 300 $OMB_BUILD_PATH/one-sided/osu_put_bibw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allreduce 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allreduce ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allgather 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allgather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_allgatherv 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_allgatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_alltoall 20 ranks, 5 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_alltoall ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_alltoallv 20 ranks, 5 ranks per node using XRC verbs" { ++ skip "fails consistently at 128k message size" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_alltoallv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_barrier 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_barrier ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_bcast 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_bcast ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_gather 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_gather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_gatherv 40 ranks, 10 ranks per node using XRC verbs" { ++ skip "fails intermittently" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_gatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iallgather 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iallgather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iallgatherv 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iallgatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoall 20 ranks, 5 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoall ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoallv 20 ranks, 5 ranks per node using XRC verbs" { ++ skip "fails consistently at 128k message size" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoallv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ialltoallw 20 ranks, 5 ranks per node using XRC verbs" { ++ skip "fails consistently at 128k message size" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 20 5) timeout 300 $OMB_BUILD_PATH/collective/osu_ialltoallw ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ibarrier 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_ibarrier ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_ibcast 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_ibcast ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_igather 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_igather ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_igatherv 40 ranks, 10 ranks per node using XRC verbs" { ++ skip "fails intermittently" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_igatherv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iscatter 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iscatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_iscatterv 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_iscatterv ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_reduce 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_reduce ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_reduce_scatter 40 ranks, 10 ranks per node using XRC verbs" { ++ skip "fails consistently at 512K message size" ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_reduce_scatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_scatter 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_scatter ++ [ "$status" -eq 0 ] ++} ++ ++@test "osu_scatterv 40 ranks, 10 ranks per node using XRC verbs" { ++ FI_OFI_RXM_USE_SRX=1 FI_VERBS_PREFER_XRC=1 run $CONTRIB_BIN/logwrap -w ${BATS_TEST_LOGFILE} -- \ ++ $(batch_launcher 40 10) timeout 300 $OMB_BUILD_PATH/collective/osu_scatterv ++ [ "$status" -eq 0 ] ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/smoketests.bats b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/smoketests.bats +new file mode 100644 +index 000000000..40ca2a65c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/smoketests.bats +@@ -0,0 +1,27 @@ ++#!/usr/bin/env bats ++ ++load test_helper ++ ++@test "fi_info" { ++ run ${CONTRIB_BIN}/logwrap -w ${BATS_TEST_LOGFILE} -- $(batch_launcher 1 1) ${LIBFABRIC_INSTALL_PATH}/bin/fi_info -p 'verbs;ofi_rxm' ++ [ $(grep 'provider: verbs;ofi_rxm' ${BATS_TEST_LOGFILE} | uniq | wc -l) -gt 0 ] ++ [ "$status" -eq 0 ] ++} ++ ++@test "fi_info_xrc" { ++ FI_OFI_RXM_USE_SRX=1 run ${CONTRIB_BIN}/logwrap -w ${BATS_TEST_LOGFILE} -- $(batch_launcher 1 1) ${LIBFABRIC_INSTALL_PATH}/bin/fi_info -p 'verbs;ofi_rxm' ++ [ $(grep 'domain' ${BATS_TEST_LOGFILE} | grep '\-xrc' | wc -l) -gt 0 ] ++ [ "$status" -eq 0 ] ++} ++ ++@test "prefer_rc" { ++ FI_OFI_RXM_USE_SRX=1 run ${CONTRIB_BIN}/logwrap -w ${BATS_TEST_LOGFILE} -- $(batch_launcher 1 1) ${LIBFABRIC_INSTALL_PATH}/bin/fi_info -p 'verbs;ofi_rxm' ++ [ $(grep 'domain' ${BATS_TEST_LOGFILE} | head -n1 | grep '\-xrc' | wc -l) -eq 0 ] ++ [ "$status" -eq 0 ] ++} ++ ++@test "prefer_xrc" { ++ FI_VERBS_PREFER_XRC=1 FI_OFI_RXM_USE_SRX=1 run ${CONTRIB_BIN}/logwrap -w ${BATS_TEST_LOGFILE} -- $(batch_launcher 1 1) ${LIBFABRIC_INSTALL_PATH}/bin/fi_info -p 'verbs;ofi_rxm' ++ [ $(grep 'domain' ${BATS_TEST_LOGFILE} | head -n1 | grep '\-xrc' | wc -l) -gt 0 ] ++ [ "$status" -eq 0 ] ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/test_helper.bash b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/test_helper.bash +new file mode 100644 +index 000000000..dd104dfb6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bats/test_helper.bash +@@ -0,0 +1,44 @@ ++#!/bin/bash ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ ++if [[ -z "$BATS_LOG_DIRECTORY" ]] ; then ++ export BATS_LOG_DIRECTORY=$PWD ++fi ++ ++if [[ ! -d $BATS_LOG_DIRECTORY ]] ; then ++ mkdir -p $BATS_LOG_DIRECTORY ++fi ++ ++export CONTRIB_BIN=$DIR/../bin ++ ++_cancel() { ++ echo caught sigint ++ kill -s SIGKILL ++} ++ ++setup() { ++ export BATS_TEST_LOGFILE="${BATS_LOG_DIRECTORY}/${BATS_TEST_NAME}.log" ++} ++ ++teardown() { ++ cat ${BATS_TEST_LOGFILE} || true ++} ++ ++function batch_launcher { ++ if [[ $# -lt 2 ]] ; then ++ error "not enough arguments" ++ fi ++ NUM_RANKS=$1 ++ NUM_RANKS_PER_NODE=$2 ++ echo "srun -n ${NUM_RANKS} --ntasks-per-node ${NUM_RANKS_PER_NODE}" ++} ++ ++# necessary to avoid deadlocks during termination/interrupt ++trap _cancel SIGINT +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/common.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/common.sh +new file mode 100644 +index 000000000..20f57783e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/common.sh +@@ -0,0 +1,8 @@ ++#!/bin/bash ++ ++# DIR is expected to be defined by files that include these common variables ++BUILD_VERSION=$(cat $DIR/../share/version) ++ROOT_INSTALL_PATH=$LIBFABRIC_BUILD_PATH/virtualenv/ ++PREREQ_INSTALL_PATH=$ROOT_INSTALL_PATH/prerequisites ++VIRTUALENV_INSTALL_PATH=$ROOT_INSTALL_PATH/venv-${BUILD_VERSION} ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/fabtest_wrapper.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/fabtest_wrapper.sh +new file mode 100755 +index 000000000..078300bc7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/fabtest_wrapper.sh +@@ -0,0 +1,27 @@ ++#!/bin/bash ++ ++export FABTESTS_PATH=/scratch/jenkins/builds/fabtests/stable ++export PATH=${FABTESTS_PATH}/bin:$PATH ++ ++if [[ -z ${FABTEST_PROVIDER} ]] ; then ++ FABTEST_PROVIDER='verbs;ofi_rxm' ++fi ++ ++if [[ -z ${SLURMD_NODENAME} ]] ; then ++ echo SLURM is the only supported WLM at this point for testing ++ exit 1 ++fi ++ ++SERVER=$(scontrol show hostname ${SLURM_NODELIST} | head -n1) ++CLIENT=$(scontrol show hostname ${SLURM_NODELIST} | tail -n1) ++ ++SERVER_ADDR=$(getent hosts ${SERVER} | awk '{print $1}') ++CLIENT_ADDR=$(getent hosts ${CLIENT} | awk '{print $1}') ++ ++if [[ "${SLURMD_NODENAME}" == "$SERVER" ]] ; then ++ runfabtests.sh \ ++ $@ \ ++ "${FABTEST_PROVIDER}" \ ++ ${SERVER_ADDR} \ ++ ${CLIENT_ADDR} ++fi +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/logwrap b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/logwrap +new file mode 100755 +index 000000000..6d6b37c1a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/logwrap +@@ -0,0 +1,39 @@ ++#!/bin/bash ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" ++OUTFILE="log" ++OPTS=`getopt -o hw: --long help,outfile -n 'parse-options' -- "$@"` ++HELP=false ++ ++if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi ++ ++eval set -- "$OPTS" ++ ++while true; do ++ case "$1" in ++ -h | --help ) HELP=true; shift ;; ++ -w | --outfile ) OUTFILE="$2" ; shift ; shift ;; ++ * ) break ;; ++ esac ++done ++ ++shift ++ ++if $HELP ; then ++ echo "Usage: logwrap [-hw] command" ++ exit ++fi ++ ++if [[ $# -eq 0 ]] ; then ++ echo failed to provide script to wrap ++ exit 1 ++fi ++ ++$@ 2>&1 | tee $OUTFILE ++exit ${PIPESTATUS[0]} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/parse_logfiles.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/parse_logfiles.sh +new file mode 100755 +index 000000000..09059822e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/parse_logfiles.sh +@@ -0,0 +1,16 @@ ++#!/bin/bash ++ ++set -e ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ ++source $DIR/common.sh ++ ++source $VIRTUALENV_INSTALL_PATH/bin/activate ++python $DIR/../python/parse_results.py $@ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/run_libfabric_pipeline b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/run_libfabric_pipeline +new file mode 100755 +index 000000000..6383aea9c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/run_libfabric_pipeline +@@ -0,0 +1,315 @@ ++#!/bin/bash ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ ++# Variables ++HELP=false ++VERBOSE=false ++DEBUG=false ++CLEAN=false ++WORKSPACE=$(pwd) ++SECTIONS='all' ++LIBFABRIC="" ++ ++BUILD=true ++TEST=true ++UNITTEST=true ++SMOKETEST=true ++FABTEST=true ++SFT=true ++MPI=true ++ ++function usage { ++ echo \ ++" ++Usage: $(basename $SOURCE) [-dhv] ++" ++ ++} ++ ++function set_sections_to_run { ++ BUILD=false ++ TEST=false ++ UNITTEST=false ++ SMOKETEST=false ++ FABTEST=false ++ SFT=false ++ MPI=false ++ ++ sections=$(echo $@ | tr ',' ' ') ++ for section in $sections ; do ++ section_name=$(echo $section | awk '{print toupper($0)}') ++ case $section_name in ++ 'UNITTEST'|'SMOKETEST'|'FABTEST'|'SFT'|'MPI') ++ TEST=true ++ eval ${section_name}=true ++ ;; ++ 'ALL') ++ BUILD=true ++ TEST=true ++ UNITTEST=true ++ SMOKETEST=true ++ FABTEST=true ++ SFT=true ++ MPI=true ++ ;; ++ 'TEST') ++ TEST=true ++ UNITTEST=true ++ SMOKETEST=true ++ FABTEST=true ++ SFT=true ++ MPI=true ++ ;; ++ 'BUILD') ++ BUILD=true ++ ;; ++ *) ++ ;; ++ esac ++ done ++ ++ for each in BUILD TEST UNITTEST SMOKETEST SFT MPI ; do ++ if $DEBUG ; then echo ${each} = $(eval echo \$$each) ; fi ++ done ++} ++ ++OPTS=`getopt -o hdvcs:w:l: --long help,debug,verbose,clean,sections,workspace,libfabric -n 'parse-options' -- "$@"` ++ ++if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; usage ; exit 1 ; fi ++ ++eval set -- "$OPTS" ++set -e ++ ++while true; do ++ case "$1" in ++ -h | --help ) HELP=true ; shift ;; ++ -v | --verbose ) VERBOSE=true ; shift ;; ++ -d | --debug ) DEBUG=true ; shift ;; ++ -c | --clean ) CLEAN=true ; shift ;; ++ -s | --sections ) SECTIONS="$2" ; shift ; shift ;; ++ -w | --workspace ) WORKSPACE="$2" ; shift ; shift ;; ++ -l | --libfabric ) LIBFABRIC="$2" ; shift ; shift ;; ++ * ) break ;; ++ esac ++done ++ ++shift ++ ++if $HELP ; then ++ usage ++ exit ++fi ++ ++function verbose { ++ if $VERBOSE ; then ++ echo $@ ++ fi ++} ++ ++function debug { ++ if $DEBUG ; then ++ echo $0 ++ fi ++} ++ ++set_sections_to_run "$SECTIONS" ++verbose "HELP: $HELP" ++verbose "VERBOSE: $VERBOSE" ++verbose "DEBUG: $DEBUG" ++verbose "CLEAN: $CLEAN" ++verbose "SECTIONS: $SECTIONS" ++verbose "WORKSPACE: $WORKSPACE" ++ ++for each in BUILD TEST UNITTEST SMOKETEST FABTEST MPI SFT ; do ++ verbose "$each: $(eval echo \$$each)" ++done ++ ++function section_start { ++ echo \ ++" ++############################################################################## ++Start of \"$1\" ++############################################################################## ++" ++} ++ ++function section_end { ++ echo \ ++" ++############################################################################## ++End of \"$1\" ++############################################################################## ++" ++} ++if $CLEAN ; then ++ if [[ -d $WORKSPACE ]] ; then ++ rm -rf $WORKSPACE ++ fi ++fi ++ ++if [[ ! -d $WORKSPACE ]] ; then ++ mkdir -p $WORKSPACE ++fi ++ ++SOURCE_DIR=$DIR/../../.. ++pushd $SOURCE_DIR ++ ++# Start Pipeline variables ++export GIT_SHORT_COMMIT="$GIT_COMMIT" ++export LIBFABRIC_INSTALL_PATH="" ++export ROOT_BUILD_PATH="/scratch/jenkins/builds" ++export FABTEST_PATH="${WORKSPACE}/fabtests" ++export LIBFABRIC_BUILD_PATH="${ROOT_BUILD_PATH}/libfabric" ++export OMB_BUILD_PATH="${ROOT_BUILD_PATH}/osu-micro-benchmarks/5.4.2/libexec/osu-micro-benchmarks/mpi" ++export MPICH_PATH="${ROOT_BUILD_PATH}/mpich/3.3b3" ++export SFT_INSTALL_PATH="${ROOT_BUILD_PATH}/libfabric-sft/stable" ++export BATS_INSTALL_PATH="${ROOT_BUILD_PATH}/bats/stable/bin" ++export BATS_LOG_DIRECTORY="$WORKSPACE/logs" ++# End pipeline variables ++ ++# Start Prologue ++GIT_SHORT_COMMIT=$(git log -n 1 --pretty=format:'%h') ++ ++contrib/cray/bin/verify_requirements.sh ++contrib/cray/bin/setup.sh ++# End Prologue ++ ++if [[ -z $LIBFABRIC ]] ; then ++ LIBFABRIC_INSTALL_PATH="${WORKSPACE}/builds/libfabric/${GIT_SHORT_COMMIT}" ++else ++ LIBFABRIC_INSTALL_PATH="$LIBFABRIC" ++fi ++echo using installed libfabric @ ${LIBFABRIC_INSTALL_PATH} ++ ++if $BUILD ; then ++section_start 'build' ++# Start Build ++./autogen.sh ++./configure --prefix=$LIBFABRIC_INSTALL_PATH ++make -j12 ++make install ++# End Build ++section_end 'build' ++fi ++ ++LF_LIBRARY=${LIBFABRIC_INSTALL_PATH}/lib/libfabric.so ++if [[ ! -f ${LF_LIBRARY} ]] ; then ++ echo could not find libfabric library ++ echo expected file: ${LF_LIBRARY} ++ exit ++fi ++ ++if $TEST ; then ++section_start 'test' ++# Start Test Phase ++export LD_LIBRARY_PATH=$LIBFABRIC_INSTALL_PATH/lib:$LD_LIBRARY_PATH ++export MPIR_CVAR_OFI_USE_PROVIDER='verbs;ofi_rxm' ++ ++if $UNITTEST ; then ++section_start 'unit tests' ++## Start Unit Tests ++sleep 1 ++## End Unit Tests ++section_end 'unit tests' ++fi ++ ++if $SMOKETEST ; then ++section_start 'smoke tests' ++## Start Smoke Tests ++$BATS_INSTALL_PATH/bats $@ -t contrib/cray/bats/smoketests.bats | tee smoketests.tap ++## End Smoke Tests ++section_end 'smoke tests' ++fi ++ ++if $FABTEST ; then ++section_start 'fabtests' ++## Start Fabtests ++if [[ ! -f $FABTEST_PATH/compile-target || "$(cat $FABTEST_PATH/compile-target)" != "$LIBFABRIC_INSTALL_PATH" ]] ; then ++ pushd $SOURCE_DIR/fabtests ++ ./autogen.sh ++ ./configure --with-libfabric=$LIBFABRIC_INSTALL_PATH --prefix=$FABTEST_PATH ++ make -j12 ++ make -j12 install ++ echo $LIBFABRIC_INSTALL_PATH > $FABTEST_PATH/compile-target ++ popd ++fi ++ ++if [[ ! -f $FABTEST_PATH/bin/runfabtests.sh ]] ; then ++ echo run the build step to install a version of fabtests for the current build ++else ++ srun -n 2 --ntasks-per-node=1 contrib/cray/bin/fabtest_wrapper.sh -p ${FABTEST_PATH}/bin -v -T 60 | tee fabtests.log ++fi ++## End Fabtests ++section_end 'fabtests' ++fi ++ ++if $SFT ; then ++section_start 'sft' ++## Start SFT ++export SFT_BIN="${SFT_INSTALL_PATH}/bin" ++export SFT_ADD_ARGS="--additional-args ' '" ++export SFT_MAX_JOB_TIME='3' ++export SFT_NUM_JOBS='4' ++export SFT_PROVIDER='verbs;ofi_rxm' ++export SFT_BASELINE_DIR="contrib/cray" ++export SFT_BASELINE_RESULTS_FILE='sft_test_results_baseline.txt' ++export SFT_PREVIOUS_BASELINE_RESULTS='sft_test_results_baseline.txt' ++export SFT_TEST_CMDS='sft_test_commands' ++export SFT_TEST_RESULTS='sft_test_results.xml' ++export SFT_TEST_RESULTS_EXPECTED='expected_' ++export SFT_TEST_RESULTS_PREFIX='BUILD_' ++export SFT_TEST_RESULTS_CI='sft_ci_results.yaml' ++export SFT_TEST_RESULTS_BASE_DIR="${ROOT_BUILD_PATH}/sft_test_results/" ++export SFT_TEST_RESULTS_DIR="" ++ ++export SFT_TEST_RESULTS_SUBDIR="${SFT_TEST_RESULTS_PREFIX}_${GIT_SHORT_COMMIT}_DATE_$(date +%Y_%m_%d_%H_%M_%S)" ++export SFT_TEST_RESULTS_DIR="${SFT_TEST_RESULTS_BASE_DIR}${SFT_TEST_RESULTS_SUBDIR}" ++ ++rm -f ${SFT_BIN}/core* ++rm -rf ${SFT_TEST_RESULTS_DIR} ++mkdir -p ${SFT_TEST_RESULTS_DIR} ++ ++pushd ${SFT_BIN} ++timeout 900 ./ci-all.sh \ ++ --provider 'verbs;ofi_rxm' \ ++ -L ${SFT_TEST_RESULTS_DIR} \ ++ --num-jobs ${SFT_NUM_JOBS} \ ++ --max-job-time ${SFT_MAX_JOB_TIME} \ ++ --output-cmds ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_CMDS} \ ++ --results-file ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_CI} ++popd ++ ++cp ./${SFT_BASELINE_DIR}/${SFT_BASELINE_RESULTS_FILE} ${SFT_TEST_RESULTS_DIR}/ \ ++ ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++${SFT_BIN}/sft_parse_test_results.pm \ ++ -b ${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} \ ++ -d ${SFT_TEST_RESULTS_DIR} \ ++ -o ${SFT_TEST_RESULTS} \ ++ -r ${SFT_BASELINE_RESULTS_FILE} ++gzip -r ${SFT_TEST_RESULTS_DIR} ++gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS} ++gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_BASELINE_RESULTS_FILE} ++gunzip ${SFT_TEST_RESULTS_DIR}/${SFT_TEST_RESULTS_EXPECTED}${SFT_BASELINE_RESULTS_FILE} ++cp -r ${SFT_TEST_RESULTS_DIR} . ++ ++rm -rf ${SFT_TEST_RESULTS_DIR} || true ++## End SFT ++section_end 'sft' ++fi ++ ++if $MPI ; then ++section_start 'mpi' ++## Start MPI Tests ++$BATS_INSTALL_PATH/bats -t contrib/cray/bats/mpi.bats | tee mpi.tap ++## End MPI Tests ++section_end 'mpi' ++fi ++ ++fi +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/setup.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/setup.sh +new file mode 100755 +index 000000000..e252a0caa +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/setup.sh +@@ -0,0 +1,43 @@ ++#!/bin/bash ++ ++set -e ++ ++SOURCE="${BASH_SOURCE[0]}" ++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink ++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ SOURCE="$(readlink "$SOURCE")" ++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located ++done ++DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null && pwd )" ++ ++source $DIR/common.sh ++ ++if [[ -z "$(which pip)" ]] ; then ++ echo failed to find pip ++ false ++fi ++ ++if [[ -z "$(which python)" ]] ; then ++ echo failed to find python ++ false ++fi ++ ++function cleanup { ++ echo failed to setup environment ++} ++ ++trap cleanup ERR ++ ++if [[ -z "$(which virtualenv)" ]] ; then ++ pip --isolated install --root $PREREQ_INSTALL_PATH virtualenv ++ export PYTHONPATH=$PREREQ_INSTALL_PATH/usr/lib/python2.7/site-packages:$PYTHONPATH ++ export PATH=$PREREQ_INSTALL_PATH/bin:$PATH ++fi ++ ++if [[ ! -f $VIRTUALENV_INSTALL_PATH/bin/activate ]] ; then ++ virtualenv $VIRTUALENV_INSTALL_PATH ++fi ++ ++source $VIRTUALENV_INSTALL_PATH/bin/activate ++pip install -r $DIR/../share/requirements.txt ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/verify_requirements.sh b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/verify_requirements.sh +new file mode 100755 +index 000000000..c44e1339a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/bin/verify_requirements.sh +@@ -0,0 +1,59 @@ ++#!/bin/bash ++ ++set -e ++ ++function check_executable { ++ if [[ ! -x $1 ]] ; then ++ echo could not find executable: $1 ++ exit 1 ++ fi ++} ++ ++function check_directory { ++ if [[ ! -d $1 ]] ; then ++ echo could not find directory: $1 ++ exit 1 ++ fi ++} ++ ++function check_environment { ++ var=$1 ++ val=$(eval "echo \$$var") ++ if [[ -z "$val" ]] ; then ++ echo could not find environment variable: $var ++ exit 1 ++ fi ++} ++ ++function find_executable { ++ if [[ -z "$(which $1)" ]] ; then ++ echo could not find executable: $1 ++ exit 1 ++ fi ++} ++ ++# check prerequisite environment variables ++check_environment ROOT_BUILD_PATH ++check_environment FABTEST_PATH ++check_environment LIBFABRIC_BUILD_PATH ++check_environment OMB_BUILD_PATH ++check_environment MPICH_PATH ++ ++# check directories ++check_directory $ROOT_BUILD_PATH ++check_directory $OMB_BUILD_PATH ++check_directory $MPICH_PATH ++check_directory $SFT_INSTALL_PATH ++check_directory $BATS_INSTALL_PATH ++ ++##### check prerequisite installed software packages ++# SLURM https://slurm.schedmd.com/ ++find_executable srun ++# OMB http://mvapich.cse.ohio-state.edu/benchmarks/ ++check_executable $OMB_BUILD_PATH/pt2pt/osu_bw ++# Cray Proprietary ++check_executable $SFT_INSTALL_PATH/bin/ci-all.sh ++# BATS https://github.com/bats-core/bats-core ++check_executable $BATS_INSTALL_PATH/bats ++ ++exit 0 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/python/parse_results.py b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/python/parse_results.py +new file mode 100755 +index 000000000..f83a81208 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/python/parse_results.py +@@ -0,0 +1,200 @@ ++#!/usr/bin/env python ++# encoding: utf-8 ++ ++""" ++parse_results -- script for parsing results from known ++ logfile types to junit xml format ++ ++@author: jswaro ++@copyright: Copyright 2018 Cray Inc. All Rights Reserved. ++@deffield updated: 2018-09-26 ++""" ++ ++from junit_xml import TestSuite, TestCase ++import sys ++import os ++from functools import wraps ++from argparse import ArgumentParser, RawDescriptionHelpFormatter ++ ++__all__ = [] ++__version__ = 1.0 ++__date__ = '2018-09-26' ++__updated__ = '2018-09-26' ++ ++VERSION = '1.0.0' ++DEBUG = False ++ ++known_formats = dict() ++ ++def generate_generic_test_case(name, classname, time, message, result): ++ default_pass_message = 'Test passed, check build log for additional details' ++ default_skip_message = 'Test skipped, check build log for additional details' ++ tc = TestCase(name, classname, time, ++ default_pass_message if result == 'pass' else '') ++ if result == 'fail': ++ tc.add_failure_info(message=message) ++ if result == 'skip': ++ tc.add_skipped_info(message=default_skip_message) ++ ++ return tc ++ ++def tap_delimiter(line): ++ return line.startswith('ok') or line.startswith('not ok') ++ ++def tap_parser(log, classname_prefix): ++ name = "" ++ testname = "" ++ classname = "" ++ result = "" ++ time = 0.0 ++ message = "" ++ for line in log: ++ data = line.strip().split() ++ if tap_delimiter(line): ++ result = 'pass' ++ if data[0] == 'ok' and '# skip' in line: ++ result = 'skip' ++ elif data[0] == 'not': ++ result = 'fail' ++ name_index = 3 if result == 'fail' else 2 ++ testname = " ".join(data[name_index:]) if result != 'skip' else " ".join(data[name_index:data.index('#')]) ++ classname = classname_prefix ++ elif line.startswith('#'): ++ message += " ".join(data) + '\n' ++ ++ tc = generate_generic_test_case(testname, classname, 1.00, message, result) ++ return tc ++ ++def fabtests_test_delimiter(line): ++ return line.startswith('- name: ') ++ ++def fabtests_testcase_parser(log, classname_prefix): ++ name = "" ++ testname = "" ++ classname = "" ++ result = "" ++ time = "" ++ message = "" ++ for line in log: ++ data = line.strip().split() ++ if fabtests_test_delimiter(line): ++ name = " ".join(data[2:]) ++ testname = data[2] ++ classname = "{0}.{1}".format(classname_prefix, testname) ++ elif line.startswith(' result:'): ++ if data[1] == 'Pass': ++ result = 'pass' ++ elif data[1] == 'Notrun': ++ result = 'skip' ++ else: ++ result = 'fail' ++ elif line.startswith(' time:'): ++ time = float(data[1]) ++ else: #recording stdout/stderr ++ message += " ".join(data) + '\n' ++ ++ tc = generate_generic_test_case(name, classname, time, message, result) ++ return tc ++ ++def parse(infile, outfile, format_type, classname, suitename): ++ testcases = list() ++ testcase_logs = list() ++ current = None ++ test_block_delimiter = known_formats[format_type]['tb_delimiter'] ++ ++ # separate log file into test blocks by test block delimiter ++ for line in infile: ++ if test_block_delimiter(line): ++ if current: # non-empty list ++ testcase_logs.append(current) ++ current = list() ++ if current is not None: ++ current.append(line) ++ ++ # add last record if present ++ if current not in testcase_logs: ++ testcase_logs.append(current) ++ ++ # create test cases from test blocks ++ for entry in testcase_logs: ++ testcases.append(known_formats[format_type]['test_parser'](entry, classname)) ++ ++ # generate test suite result using provided test cases ++ test_suite = TestSuite(suitename, testcases) ++ ++ # get rid of unnecessary 'disabled' strings in formatted xml string ++ s = TestSuite.to_xml_string([test_suite]) ++ s = s.replace(' disabled=\"0\"', '') ++ ++ # write xml to outfile ++ outfile.write(s) ++ ++def register_parser(label, func): ++ global known_formats ++ known_formats[label] = func ++ ++ ++def main(argv=None): #IGNORE:C0111 ++ if argv is None: ++ argv = sys.argv ++ else: ++ sys.argv.extend(argv) ++ register_parser('fabtests', ++ {'tb_delimiter': fabtests_test_delimiter, ++ 'test_parser': fabtests_testcase_parser}) ++ register_parser('tap', ++ {'tb_delimiter': tap_delimiter, ++ 'test_parser': tap_parser}) ++ ++ program_name = os.path.basename(sys.argv[0]) ++ program_version = "v%s" % (VERSION) ++ program_build_date = str(__updated__) ++ program_version_message = '%%(prog)s %s (%s)' % (program_version, program_build_date) ++ program_shortdesc = __import__('__main__').__doc__.split("\n")[1] ++ program_license = '''%s ++ ++ Copyright 2018 Cray Inc. All rights reserved. ++ ++ Distributed on an "AS IS" basis without warranties ++ or conditions of any kind, either express or implied. ++ ++USAGE ++''' % program_shortdesc ++ # Setup argument parser ++ parser = ArgumentParser(description=program_license, ++ formatter_class=RawDescriptionHelpFormatter) ++ ++ parser.add_argument("-V", "--version", action="version", version=program_version_message) ++ parser.add_argument("-r", "--infile", action="store", default=None, dest='infile', ++ help="file to read in, defaults to stdin") ++ parser.add_argument("-w", "--outfile", action="store", default=None, dest='outfile', ++ help="junit xml file to write out, defaults to stdout") ++ parser.add_argument("format", ++ help='test format to expect (available: {0})'.format(", ".join(known_formats.keys()))) ++ parser.add_argument("classname", ++ help='class name to associate with generated junit xml tests') ++ parser.add_argument("suitename", ++ help='suite name to associate with generated junit xml tests') ++ # Process arguments ++ args = parser.parse_args() ++ ++ infile = sys.stdin ++ outfile = sys.stdout ++ if args.infile is not None: ++ infile = open(args.infile, 'r') ++ if args.outfile is not None: ++ outfile = open(args.outfile, 'w') ++ ++ parse(infile, outfile, args.format, args.classname, args.suitename) ++ ++ if args.infile is not None: ++ infile.close() ++ if args.outfile is not None: ++ outfile.close() ++ ++if __name__ == "__main__": ++ if DEBUG: ++ sys.argv.append("-h") ++ sys.argv.append("-v") ++ ++ sys.exit(main()) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/sft_test_results_baseline.txt b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/sft_test_results_baseline.txt +new file mode 100644 +index 000000000..8693e9463 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/sft_test_results_baseline.txt +@@ -0,0 +1,543 @@ ++# Expected test values can be: 'PASS', 'FAIL', SKIP' or 'INTERMITTENT' ++# PASS: means that the test should pass ++# if the test result is PASS, then Jenkins will report this test as PASSED ++# if the test result is FAIL, then Jenkins will report this test as FAILED ++# FAIL: means that the test currently fails, probably due to incorrect behavior of a feature ++# if the test result is PASS, then Jenkins will report this test as PASSED ++# if the test result is FAIL, then Jenkins will report this test as SKIPPED ++# SKIP: means that the test should be skipped, due to an unimplemented feature ++# if the test result is PASS, then Jenkins will report this test as PASSED ++# if the test result is FAIL, then Jenkins will report this test as SKIPPED ++# INTERMITTENT: means that the test should pass but it fails infrequently ++# if the test result is PASS, then Jenkins will report this test as PASSED ++# if the test result is FAIL, then Jenkins will report this test as SKIPPED ++ ++# The Test Case section contains the list of test cases and their expected results. ++ ++# Test Case Results ++AMO_All-to-All_FI_ATOMIC_MIN=PASS ++AMO_All-to-All_FI_ATOMIC_MAX=PASS ++AMO_All-to-All_FI_ATOMIC_SUM=PASS ++AMO_All-to-All_FI_ATOMIC_PROD=PASS ++AMO_All-to-All_FI_ATOMIC_LOR=PASS ++AMO_All-to-All_FI_ATOMIC_LAND=PASS ++AMO_All-to-All_FI_ATOMIC_BOR=PASS ++AMO_All-to-All_FI_ATOMIC_BAND=PASS ++AMO_All-to-All_FI_ATOMIC_LXOR=PASS ++AMO_All-to-All_FI_ATOMIC_BXOR=PASS ++AMO_All-to-All_FI_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-All_FI_ATOMICV_MIN=PASS ++AMO_All-to-All_FI_ATOMICV_MAX=PASS ++AMO_All-to-All_FI_ATOMICV_SUM=PASS ++AMO_All-to-All_FI_ATOMICV_PROD=PASS ++AMO_All-to-All_FI_ATOMICV_LOR=PASS ++AMO_All-to-All_FI_ATOMICV_LAND=PASS ++AMO_All-to-All_FI_ATOMICV_BOR=PASS ++AMO_All-to-All_FI_ATOMICV_BAND=PASS ++AMO_All-to-All_FI_ATOMICV_LXOR=PASS ++AMO_All-to-All_FI_ATOMICV_BXOR=PASS ++AMO_All-to-All_FI_ATOMICV_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_ATOMICV_ATOMIC_READ=PASS ++AMO_All-to-All_FI_ATOMICMSG_MIN=PASS ++AMO_All-to-All_FI_ATOMICMSG_MAX=PASS ++AMO_All-to-All_FI_ATOMICMSG_SUM=PASS ++AMO_All-to-All_FI_ATOMICMSG_PROD=PASS ++AMO_All-to-All_FI_ATOMICMSG_LOR=PASS ++AMO_All-to-All_FI_ATOMICMSG_LAND=PASS ++AMO_All-to-All_FI_ATOMICMSG_BOR=PASS ++AMO_All-to-All_FI_ATOMICMSG_BAND=PASS ++AMO_All-to-All_FI_ATOMICMSG_LXOR=PASS ++AMO_All-to-All_FI_ATOMICMSG_BXOR=PASS ++AMO_All-to-All_FI_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_ATOMICMSG_ATOMIC_READ=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_MIN=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_MAX=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_SUM=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_PROD=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_LOR=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_LAND=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_BOR=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_BAND=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_LXOR=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_BXOR=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_INJECT_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_MIN=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_MAX=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_SUM=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_PROD=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_LOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_LAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_BOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_BAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_LXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_BXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_FETCH_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_MIN=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_MAX=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_SUM=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_PROD=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_LOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_LAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_BOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_BAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_LXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_BXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_FETCH_ATOMICV_ATOMIC_READ=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_MIN=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_MAX=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_SUM=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_PROD=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_LOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_LAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_BOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_BAND=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_LXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_BXOR=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_All-to-All_FI_FETCH_ATOMICMSG_ATOMIC_READ=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_NE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_LE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_LT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_GE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_CSWAP_GT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMIC_MSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_NE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_LE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_LT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_GE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_CSWAP_GT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICV_MSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_NE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_LE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_LT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_GE=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_CSWAP_GT=PASS ++AMO_All-to-All_FI_COMPARE_ATOMICMSG_MSWAP=PASS ++AMO_All-to-One_FI_ATOMIC_MIN=PASS ++AMO_All-to-One_FI_ATOMIC_MAX=PASS ++AMO_All-to-One_FI_ATOMIC_SUM=PASS ++AMO_All-to-One_FI_ATOMIC_PROD=PASS ++AMO_All-to-One_FI_ATOMIC_LOR=PASS ++AMO_All-to-One_FI_ATOMIC_LAND=PASS ++AMO_All-to-One_FI_ATOMIC_BOR=PASS ++AMO_All-to-One_FI_ATOMIC_BAND=PASS ++AMO_All-to-One_FI_ATOMIC_LXOR=PASS ++AMO_All-to-One_FI_ATOMIC_BXOR=PASS ++AMO_All-to-One_FI_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-One_FI_ATOMICV_MIN=PASS ++AMO_All-to-One_FI_ATOMICV_MAX=PASS ++AMO_All-to-One_FI_ATOMICV_SUM=PASS ++AMO_All-to-One_FI_ATOMICV_PROD=PASS ++AMO_All-to-One_FI_ATOMICV_LOR=PASS ++AMO_All-to-One_FI_ATOMICV_LAND=PASS ++AMO_All-to-One_FI_ATOMICV_BOR=PASS ++AMO_All-to-One_FI_ATOMICV_BAND=PASS ++AMO_All-to-One_FI_ATOMICV_LXOR=PASS ++AMO_All-to-One_FI_ATOMICV_BXOR=PASS ++AMO_All-to-One_FI_ATOMICV_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_ATOMICV_ATOMIC_READ=PASS ++AMO_All-to-One_FI_ATOMICMSG_MIN=PASS ++AMO_All-to-One_FI_ATOMICMSG_MAX=PASS ++AMO_All-to-One_FI_ATOMICMSG_SUM=PASS ++AMO_All-to-One_FI_ATOMICMSG_PROD=PASS ++AMO_All-to-One_FI_ATOMICMSG_LOR=PASS ++AMO_All-to-One_FI_ATOMICMSG_LAND=PASS ++AMO_All-to-One_FI_ATOMICMSG_BOR=PASS ++AMO_All-to-One_FI_ATOMICMSG_BAND=PASS ++AMO_All-to-One_FI_ATOMICMSG_LXOR=PASS ++AMO_All-to-One_FI_ATOMICMSG_BXOR=PASS ++AMO_All-to-One_FI_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_ATOMICMSG_ATOMIC_READ=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_MIN=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_MAX=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_SUM=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_PROD=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_LOR=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_LAND=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_BOR=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_BAND=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_LXOR=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_BXOR=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_INJECT_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_MIN=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_MAX=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_SUM=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_PROD=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_LOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_LAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_BOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_BAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_LXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_BXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_FETCH_ATOMIC_ATOMIC_READ=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_MIN=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_MAX=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_SUM=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_PROD=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_LOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_LAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_BOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_BAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_LXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_BXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_FETCH_ATOMICV_ATOMIC_READ=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_MIN=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_MAX=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_SUM=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_PROD=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_LOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_LAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_BOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_BAND=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_LXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_BXOR=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_All-to-One_FI_FETCH_ATOMICMSG_ATOMIC_READ=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_NE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_LE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_LT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_GE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_CSWAP_GT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMIC_MSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_NE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_LE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_LT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_GE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_CSWAP_GT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICV_MSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_NE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_LE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_LT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_GE=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_CSWAP_GT=PASS ++AMO_All-to-One_FI_COMPARE_ATOMICMSG_MSWAP=PASS ++AMO_One-to-All_FI_ATOMIC_MIN=PASS ++AMO_One-to-All_FI_ATOMIC_MAX=PASS ++AMO_One-to-All_FI_ATOMIC_SUM=PASS ++AMO_One-to-All_FI_ATOMIC_PROD=PASS ++AMO_One-to-All_FI_ATOMIC_LOR=PASS ++AMO_One-to-All_FI_ATOMIC_LAND=PASS ++AMO_One-to-All_FI_ATOMIC_BOR=PASS ++AMO_One-to-All_FI_ATOMIC_BAND=PASS ++AMO_One-to-All_FI_ATOMIC_LXOR=PASS ++AMO_One-to-All_FI_ATOMIC_BXOR=PASS ++AMO_One-to-All_FI_ATOMIC_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_ATOMIC_ATOMIC_READ=PASS ++AMO_One-to-All_FI_ATOMICV_MIN=PASS ++AMO_One-to-All_FI_ATOMICV_MAX=PASS ++AMO_One-to-All_FI_ATOMICV_SUM=PASS ++AMO_One-to-All_FI_ATOMICV_PROD=PASS ++AMO_One-to-All_FI_ATOMICV_LOR=PASS ++AMO_One-to-All_FI_ATOMICV_LAND=PASS ++AMO_One-to-All_FI_ATOMICV_BOR=PASS ++AMO_One-to-All_FI_ATOMICV_BAND=PASS ++AMO_One-to-All_FI_ATOMICV_LXOR=PASS ++AMO_One-to-All_FI_ATOMICV_BXOR=PASS ++AMO_One-to-All_FI_ATOMICV_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_ATOMICV_ATOMIC_READ=PASS ++AMO_One-to-All_FI_ATOMICMSG_MIN=PASS ++AMO_One-to-All_FI_ATOMICMSG_MAX=PASS ++AMO_One-to-All_FI_ATOMICMSG_SUM=PASS ++AMO_One-to-All_FI_ATOMICMSG_PROD=PASS ++AMO_One-to-All_FI_ATOMICMSG_LOR=PASS ++AMO_One-to-All_FI_ATOMICMSG_LAND=PASS ++AMO_One-to-All_FI_ATOMICMSG_BOR=PASS ++AMO_One-to-All_FI_ATOMICMSG_BAND=PASS ++AMO_One-to-All_FI_ATOMICMSG_LXOR=PASS ++AMO_One-to-All_FI_ATOMICMSG_BXOR=PASS ++AMO_One-to-All_FI_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_ATOMICMSG_ATOMIC_READ=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_MIN=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_MAX=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_SUM=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_PROD=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_LOR=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_LAND=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_BOR=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_BAND=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_LXOR=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_BXOR=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_INJECT_ATOMIC_ATOMIC_READ=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_MIN=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_MAX=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_SUM=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_PROD=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_LOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_LAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_BOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_BAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_LXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_BXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_FETCH_ATOMIC_ATOMIC_READ=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_MIN=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_MAX=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_SUM=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_PROD=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_LOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_LAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_BOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_BAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_LXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_BXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_FETCH_ATOMICV_ATOMIC_READ=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_MIN=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_MAX=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_SUM=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_PROD=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_LOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_LAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_BOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_BAND=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_LXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_BXOR=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_One-to-All_FI_FETCH_ATOMICMSG_ATOMIC_READ=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_NE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_LE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_LT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_GE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_CSWAP_GT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMIC_MSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_NE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_LE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_LT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_GE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_CSWAP_GT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICV_MSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_NE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_LE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_LT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_GE=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_CSWAP_GT=PASS ++AMO_One-to-All_FI_COMPARE_ATOMICMSG_MSWAP=PASS ++AMO_Round-Robin_FI_ATOMIC_MIN=PASS ++AMO_Round-Robin_FI_ATOMIC_MAX=PASS ++AMO_Round-Robin_FI_ATOMIC_SUM=PASS ++AMO_Round-Robin_FI_ATOMIC_PROD=PASS ++AMO_Round-Robin_FI_ATOMIC_LOR=PASS ++AMO_Round-Robin_FI_ATOMIC_LAND=PASS ++AMO_Round-Robin_FI_ATOMIC_BOR=PASS ++AMO_Round-Robin_FI_ATOMIC_BAND=PASS ++AMO_Round-Robin_FI_ATOMIC_LXOR=PASS ++AMO_Round-Robin_FI_ATOMIC_BXOR=PASS ++AMO_Round-Robin_FI_ATOMIC_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_ATOMIC_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_ATOMICV_MIN=PASS ++AMO_Round-Robin_FI_ATOMICV_MAX=PASS ++AMO_Round-Robin_FI_ATOMICV_SUM=PASS ++AMO_Round-Robin_FI_ATOMICV_PROD=PASS ++AMO_Round-Robin_FI_ATOMICV_LOR=PASS ++AMO_Round-Robin_FI_ATOMICV_LAND=PASS ++AMO_Round-Robin_FI_ATOMICV_BOR=PASS ++AMO_Round-Robin_FI_ATOMICV_BAND=PASS ++AMO_Round-Robin_FI_ATOMICV_LXOR=PASS ++AMO_Round-Robin_FI_ATOMICV_BXOR=PASS ++AMO_Round-Robin_FI_ATOMICV_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_ATOMICV_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_ATOMICMSG_MIN=PASS ++AMO_Round-Robin_FI_ATOMICMSG_MAX=PASS ++AMO_Round-Robin_FI_ATOMICMSG_SUM=PASS ++AMO_Round-Robin_FI_ATOMICMSG_PROD=PASS ++AMO_Round-Robin_FI_ATOMICMSG_LOR=PASS ++AMO_Round-Robin_FI_ATOMICMSG_LAND=PASS ++AMO_Round-Robin_FI_ATOMICMSG_BOR=PASS ++AMO_Round-Robin_FI_ATOMICMSG_BAND=PASS ++AMO_Round-Robin_FI_ATOMICMSG_LXOR=PASS ++AMO_Round-Robin_FI_ATOMICMSG_BXOR=PASS ++AMO_Round-Robin_FI_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_ATOMICMSG_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_MIN=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_MAX=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_SUM=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_PROD=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_LOR=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_LAND=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_BOR=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_BAND=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_LXOR=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_BXOR=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_INJECT_ATOMIC_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_MIN=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_MAX=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_SUM=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_PROD=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_LOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_LAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_BOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_BAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_LXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_BXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_FETCH_ATOMIC_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_MIN=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_MAX=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_SUM=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_PROD=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_LOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_LAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_BOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_BAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_LXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_BXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICV_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_MIN=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_MAX=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_SUM=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_PROD=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_LOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_LAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_BOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_BAND=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_LXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_BXOR=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_ATOMIC_WRITE=PASS ++AMO_Round-Robin_FI_FETCH_ATOMICMSG_ATOMIC_READ=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_NE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_LE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_LT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_GE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_CSWAP_GT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMIC_MSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_NE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_LE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_LT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_GE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_CSWAP_GT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICV_MSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_NE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_LE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_LT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_GE=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_CSWAP_GT=PASS ++AMO_Round-Robin_FI_COMPARE_ATOMICMSG_MSWAP=PASS ++MESSAGE_All-to-All_FI_INJECT=PASS ++MESSAGE_All-to-All_FI_INJECTDATA=PASS ++MESSAGE_All-to-All_FI_SEND=PASS ++MESSAGE_All-to-All_FI_SENDDATA=PASS ++MESSAGE_All-to-All_FI_SENDMSG=PASS ++MESSAGE_All-to-All_FI_SENDV=PASS ++MESSAGE_All-to-One_FI_INJECT=PASS ++MESSAGE_All-to-One_FI_INJECTDATA=PASS ++MESSAGE_All-to-One_FI_SEND=PASS ++MESSAGE_All-to-One_FI_SENDDATA=PASS ++MESSAGE_All-to-One_FI_SENDMSG=PASS ++MESSAGE_All-to-One_FI_SENDV=PASS ++MESSAGE_One-to-All_FI_INJECT=PASS ++MESSAGE_One-to-All_FI_INJECTDATA=PASS ++MESSAGE_One-to-All_FI_SEND=PASS ++MESSAGE_One-to-All_FI_SENDDATA=PASS ++MESSAGE_One-to-All_FI_SENDMSG=PASS ++MESSAGE_One-to-All_FI_SENDV=PASS ++MESSAGE_Round-Robin_FI_INJECT=PASS ++MESSAGE_Round-Robin_FI_INJECTDATA=PASS ++MESSAGE_Round-Robin_FI_SEND=PASS ++MESSAGE_Round-Robin_FI_SENDDATA=PASS ++MESSAGE_Round-Robin_FI_SENDDATA_TRIGGER=SKIP ++MESSAGE_Round-Robin_FI_SENDMSG=PASS ++MESSAGE_Round-Robin_FI_SENDMSG_TRIGGER=SKIP ++MESSAGE_Round-Robin_FI_SENDV=PASS ++MESSAGE_Round-Robin_FI_SENDV_TRIGGER=SKIP ++MESSAGE_Round-Robin_FI_SEND_TRIGGER=SKIP ++RMA_All-to-All_FI_INJECT_WRITE=PASS ++RMA_All-to-All_FI_INJECT_WRITEDATA=PASS ++RMA_All-to-All_FI_READ=PASS ++RMA_All-to-All_FI_READMSG=PASS ++RMA_All-to-All_FI_READV=PASS ++RMA_All-to-All_FI_WRITE=PASS ++RMA_All-to-All_FI_WRITEDATA=PASS ++RMA_All-to-All_FI_WRITEMSG=PASS ++RMA_All-to-All_FI_WRITEV=PASS ++RMA_All-to-One_FI_INJECT_WRITE=PASS ++RMA_All-to-One_FI_INJECT_WRITEDATA=PASS ++RMA_All-to-One_FI_READ=PASS ++RMA_All-to-One_FI_READMSG=PASS ++RMA_All-to-One_FI_READV=PASS ++RMA_All-to-One_FI_WRITE=PASS ++RMA_All-to-One_FI_WRITEDATA=PASS ++RMA_All-to-One_FI_WRITEMSG=PASS ++RMA_All-to-One_FI_WRITEV=PASS ++RMA_One-to-All_FI_INJECT_WRITE=PASS ++RMA_One-to-All_FI_INJECT_WRITEDATA=PASS ++RMA_One-to-All_FI_READ=PASS ++RMA_One-to-All_FI_READMSG=PASS ++RMA_One-to-All_FI_READV=PASS ++RMA_One-to-All_FI_WRITE=PASS ++RMA_One-to-All_FI_WRITEDATA=PASS ++RMA_One-to-All_FI_WRITEMSG=PASS ++RMA_One-to-All_FI_WRITEV=PASS ++RMA_Round-Robin_FI_INJECT_WRITE=PASS ++RMA_Round-Robin_FI_INJECT_WRITEDATA=PASS ++RMA_Round-Robin_FI_READ=PASS ++RMA_Round-Robin_FI_READMSG=PASS ++RMA_Round-Robin_FI_READMSG_TRIGGER=SKIP ++RMA_Round-Robin_FI_READV=PASS ++RMA_Round-Robin_FI_READV_TRIGGER=SKIP ++RMA_Round-Robin_FI_READ_TRIGGER=SKIP ++RMA_Round-Robin_FI_WRITE=PASS ++RMA_Round-Robin_FI_WRITEDATA=PASS ++RMA_Round-Robin_FI_WRITEDATA_TRIGGER=SKIP ++RMA_Round-Robin_FI_WRITEMSG=PASS ++RMA_Round-Robin_FI_WRITEMSG_TRIGGER=SKIP ++RMA_Round-Robin_FI_WRITEV=PASS ++RMA_Round-Robin_FI_WRITEV_TRIGGER=SKIP ++RMA_Round-Robin_FI_WRITE_TRIGGER=SKIP ++TAGGED_All-to-All_FI_TINJECT=PASS ++TAGGED_All-to-All_FI_TINJECTDATA=PASS ++TAGGED_All-to-All_FI_TSEND=PASS ++TAGGED_All-to-All_FI_TSENDDATA=PASS ++TAGGED_All-to-All_FI_TSENDMSG=PASS ++TAGGED_All-to-All_FI_TSENDV=PASS ++TAGGED_All-to-One_FI_TINJECT=PASS ++TAGGED_All-to-One_FI_TINJECTDATA=PASS ++TAGGED_All-to-One_FI_TSEND=PASS ++TAGGED_All-to-One_FI_TSENDDATA=PASS ++TAGGED_All-to-One_FI_TSENDMSG=PASS ++TAGGED_All-to-One_FI_TSENDV=PASS ++TAGGED_One-to-All_FI_TINJECT=PASS ++TAGGED_One-to-All_FI_TINJECTDATA=PASS ++TAGGED_One-to-All_FI_TSEND=PASS ++TAGGED_One-to-All_FI_TSENDDATA=PASS ++TAGGED_One-to-All_FI_TSENDMSG=PASS ++TAGGED_One-to-All_FI_TSENDV=PASS ++TAGGED_Round-Robin_FI_TINJECT=PASS ++TAGGED_Round-Robin_FI_TINJECTDATA=PASS ++TAGGED_Round-Robin_FI_TSEND=PASS ++TAGGED_Round-Robin_FI_TSENDDATA=PASS ++TAGGED_Round-Robin_FI_TSENDDATA_TRIGGER=SKIP ++TAGGED_Round-Robin_FI_TSENDMSG=PASS ++TAGGED_Round-Robin_FI_TSENDMSG_TRIGGER=SKIP ++TAGGED_Round-Robin_FI_TSENDV=PASS ++TAGGED_Round-Robin_FI_TSENDV_TRIGGER=SKIP ++TAGGED_Round-Robin_FI_TSEND_TRIGGER=SKIP ++ ++# The Error Messages section will contain error message that could happen intermittently. ++# However, a test should not encounter errors during libfabric initialization ++# because the test could not execute. ++# If a test encounters one of these error messages, then Jenkins will report this test as SKIPPED ++ ++# Intermittent Error Messages +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/requirements.txt b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/requirements.txt +new file mode 100644 +index 000000000..ac04d3fa9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/requirements.txt +@@ -0,0 +1 @@ ++junit-xml +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/version b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/version +new file mode 100644 +index 000000000..3eefcb9dd +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/contrib/cray/share/version +@@ -0,0 +1 @@ ++1.0.0 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/AUTHORS b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/AUTHORS +new file mode 100644 +index 000000000..62652be6c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/AUTHORS +@@ -0,0 +1,41 @@ ++aingerson ++aingerson ++Arun C Ilango ++arun ilango ++Arun Ilango ++Ben Turrubiates ++Ben Turrubiates ++Charles J Archer ++Chen Zhao ++Chuck Fossen ++Dardo D Kleiner ++Dave Goodell ++Dmitry Gladkov ++Erik Paulson ++Evgeny Leksikov ++Howard Pritchard ++James Shimek ++Jeff Squyres ++Jerome Berryhill ++Jerome Boyd Berryhill ++Jithin Jose ++John Byrne ++jose ++jose ++Ken Raffenetti ++Miao Luo ++Neil Spruit ++Oblomov, Sergey ++Paolo Inaudi ++Patrick MacArthur ++Patrick McCormick ++Prankur Gupta ++Reese Faucette ++Sayantan Sur ++Sean Hefty ++Shantonu Hossain ++Solovyev, Dmitriy ++Spruit, Neil R ++Stan Smith ++Sung-Eun Choi ++Xuyang Wang +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/COPYING b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/COPYING +new file mode 100644 +index 000000000..c8cfa7428 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/COPYING +@@ -0,0 +1,409 @@ ++This software is available to you under a choice of one of two ++licenses. You may choose to be licensed under the terms of the the ++BSD license or the GNU General Public License (GPL) Version ++2, both included below. ++ ++Some parts of the source are 3rd party code which uses MIT license. ++The description and requirements of the license are available in ++later part of this file. ++ ++Copyright (c) 2015-2018 Intel Corporation. All rights reserved. ++Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved. ++ ++================================================================== ++ ++ BSD license ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions ++are met: ++ ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ ++ * Redistributions in binary form must reproduce the above ++ copyright notice, this list of conditions and the following ++ disclaimer in the documentation and/or other materials provided ++ with the distribution. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ++FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ++COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ++INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ++ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGE. ++ ++================================================================== ++ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc. ++ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Library General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) year name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ , 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Library General ++Public License instead of this License. ++ ++================================================================== ++ ++ MIT LICENSE ++ ++Applies to: include/jsmn.h, common/jsmn.c ++ ++Copyright (c) 2010 Serge A. Zaitsev ++ ++Permission is hereby granted, free of charge, to any person obtaining a copy ++of this software and associated documentation files (the "Software"), to deal ++in the Software without restriction, including without limitation the rights ++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++copies of the Software, and to permit persons to whom the Software is ++furnished to do so, subject to the following conditions: ++ ++The above copyright notice and this permission notice shall be included in ++all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++THE SOFTWARE. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.am b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.am +new file mode 100644 +index 000000000..5d3f8034a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.am +@@ -0,0 +1,386 @@ ++configdir = $(datarootdir)/${PACKAGE_NAME} ++AM_CFLAGS = -g -Wall -D_GNU_SOURCE -D 'CONFIG_PATH="${configdir}"' -I$(srcdir)/include ++ACLOCAL_AMFLAGS = -I config ++ ++if MACOS ++os_excludes = -f ./test_configs/osx.exclude ++endif ++ ++bin_PROGRAMS = \ ++ functional/fi_av_xfer \ ++ functional/fi_msg \ ++ functional/fi_msg_sockets \ ++ functional/fi_rdm \ ++ functional/fi_rdm_rma_simple \ ++ functional/fi_rdm_rma_trigger \ ++ functional/fi_rdm_deferred_wq \ ++ functional/fi_dgram \ ++ functional/fi_mcast \ ++ functional/fi_dgram_waitset \ ++ functional/fi_rdm_tagged_peek \ ++ functional/fi_cq_data \ ++ functional/fi_poll \ ++ functional/fi_scalable_ep \ ++ functional/fi_shared_ctx \ ++ functional/fi_msg_epoll \ ++ functional/fi_rdm_shared_av \ ++ functional/fi_cm_data \ ++ functional/fi_multi_mr \ ++ functional/fi_rdm_multi_domain \ ++ functional/fi_multi_ep \ ++ functional/fi_recv_cancel \ ++ functional/fi_unexpected_msg \ ++ functional/fi_inj_complete \ ++ functional/fi_resmgmt_test \ ++ functional/fi_rdm_atomic \ ++ functional/fi_rdm_multi_recv \ ++ benchmarks/fi_msg_pingpong \ ++ benchmarks/fi_msg_bw \ ++ benchmarks/fi_rma_bw \ ++ benchmarks/fi_rdm_cntr_pingpong \ ++ benchmarks/fi_dgram_pingpong \ ++ benchmarks/fi_rdm_pingpong \ ++ benchmarks/fi_rdm_tagged_pingpong \ ++ benchmarks/fi_rdm_tagged_bw \ ++ unit/fi_eq_test \ ++ unit/fi_cq_test \ ++ unit/fi_mr_test \ ++ unit/fi_cntr_test \ ++ unit/fi_av_test \ ++ unit/fi_dom_test \ ++ unit/fi_getinfo_test \ ++ unit/fi_resource_freeing \ ++ ubertest/fi_ubertest ++ ++dist_bin_SCRIPTS = \ ++ scripts/runfabtests.sh \ ++ scripts/rft_yaml_to_junit_xml ++ ++dist_noinst_SCRIPTS = \ ++ scripts/parseyaml.py ++ ++nobase_dist_config_DATA = \ ++ test_configs/osx.exclude \ ++ test_configs/eq_cq.test \ ++ test_configs/lat_bw.test \ ++ test_configs/sockets/all.test \ ++ test_configs/sockets/quick.test \ ++ test_configs/sockets/complete.test \ ++ test_configs/sockets/verify.test \ ++ test_configs/udp/all.test \ ++ test_configs/udp/lat_bw.test \ ++ test_configs/udp/quick.test \ ++ test_configs/udp/functional.test \ ++ test_configs/udp/udp.exclude \ ++ test_configs/tcp/tcp.exclude \ ++ test_configs/verbs/all.test \ ++ test_configs/verbs/quick.test \ ++ test_configs/verbs/exclude \ ++ test_configs/usnic/all.test \ ++ test_configs/usnic/quick.test \ ++ test_configs/psm/all.test \ ++ test_configs/psm2/all.test \ ++ test_configs/psm2/verify.test \ ++ test_configs/psm2/psm2.exclude \ ++ test_configs/ofi_rxm/verbs/all.test \ ++ test_configs/ofi_rxm/verbs/exclude \ ++ test_configs/ofi_rxd/ofi_rxd.exclude \ ++ test_configs/ofi_rxd/udp.test \ ++ test_configs/shm/all.test \ ++ test_configs/shm/verify.test ++ ++noinst_LTLIBRARIES = libfabtests.la ++libfabtests_la_SOURCES = \ ++ common/shared.c \ ++ common/jsmn.c \ ++ include/shared.h \ ++ include/jsmn.h \ ++ include/unix/osd.h \ ++ include/ft_osd.h ++ ++benchmarks_srcs = \ ++ benchmarks/benchmark_shared.h \ ++ benchmarks/benchmark_shared.c ++ ++unit_srcs = \ ++ include/unit_common.h \ ++ unit/common.c ++ ++if MACOS ++if !HAVE_CLOCK_GETTIME ++libfabtests_la_SOURCES += common/osx/osd.c ++endif ++endif ++ ++functional_fi_av_xfer_SOURCES = \ ++ functional/av_xfer.c ++functional_fi_av_xfer_LDADD = libfabtests.la ++ ++functional_fi_msg_sockets_SOURCES = \ ++ functional/msg_sockets.c ++functional_fi_msg_sockets_LDADD = libfabtests.la ++ ++functional_fi_msg_epoll_SOURCES = \ ++ functional/msg_epoll.c ++functional_fi_msg_epoll_LDADD = libfabtests.la ++ ++functional_fi_msg_SOURCES = \ ++ functional/msg.c ++functional_fi_msg_LDADD = libfabtests.la ++ ++functional_fi_rdm_SOURCES = \ ++ functional/rdm.c ++functional_fi_rdm_LDADD = libfabtests.la ++ ++functional_fi_rdm_shared_av_SOURCES = \ ++ functional/rdm_shared_av.c ++functional_fi_rdm_shared_av_LDADD = libfabtests.la ++ ++functional_fi_rdm_rma_simple_SOURCES = \ ++ functional/rdm_rma_simple.c ++functional_fi_rdm_rma_simple_LDADD = libfabtests.la ++ ++functional_fi_rdm_rma_trigger_SOURCES = \ ++ functional/rdm_rma_trigger.c ++functional_fi_rdm_rma_trigger_LDADD = libfabtests.la ++ ++functional_fi_rdm_deferred_wq_SOURCES = \ ++ functional/rdm_deferred_wq.c ++functional_fi_rdm_deferred_wq_LDADD = libfabtests.la ++ ++functional_fi_dgram_SOURCES = \ ++ functional/dgram.c ++functional_fi_dgram_LDADD = libfabtests.la ++ ++functional_fi_mcast_SOURCES = \ ++ functional/mcast.c ++functional_fi_mcast_LDADD = libfabtests.la ++ ++functional_fi_dgram_waitset_SOURCES = \ ++ functional/dgram_waitset.c ++functional_fi_dgram_waitset_LDADD = libfabtests.la ++ ++functional_fi_rdm_tagged_peek_SOURCES = \ ++ functional/rdm_tagged_peek.c ++functional_fi_rdm_tagged_peek_LDADD = libfabtests.la ++ ++functional_fi_cq_data_SOURCES = \ ++ functional/cq_data.c ++functional_fi_cq_data_LDADD = libfabtests.la ++ ++functional_fi_cm_data_SOURCES = \ ++ functional/cm_data.c ++functional_fi_cm_data_LDADD = libfabtests.la ++ ++functional_fi_scalable_ep_SOURCES = \ ++ functional/scalable_ep.c ++functional_fi_scalable_ep_LDADD = libfabtests.la ++ ++functional_fi_shared_ctx_SOURCES = \ ++ functional/shared_ctx.c ++functional_fi_shared_ctx_LDADD = libfabtests.la ++ ++functional_fi_poll_SOURCES = \ ++ functional/poll.c ++functional_fi_poll_LDADD = libfabtests.la ++ ++functional_fi_multi_ep_SOURCES = \ ++ functional/multi_ep.c ++functional_fi_multi_ep_LDADD = libfabtests.la ++ ++functional_fi_multi_mr_SOURCES = \ ++ functional/multi_mr.c ++functional_fi_multi_mr_LDADD = libfabtests.la ++ ++functional_fi_unexpected_msg_SOURCES = \ ++ functional/unexpected_msg.c ++functional_fi_unexpected_msg_LDADD = libfabtests.la ++ ++functional_fi_rdm_multi_domain_SOURCES = \ ++ functional/rdm_multi_domain.c ++functional_fi_rdm_multi_domain_LDADD = libfabtests.la ++ ++functional_fi_recv_cancel_SOURCES = \ ++ functional/recv_cancel.c ++functional_fi_recv_cancel_LDADD = libfabtests.la ++ ++functional_fi_inj_complete_SOURCES = \ ++ functional/inj_complete.c ++functional_fi_inj_complete_LDADD = libfabtests.la ++ ++functional_fi_resmgmt_test_SOURCES = \ ++ functional/resmgmt_test.c ++functional_fi_resmgmt_test_LDADD = libfabtests.la ++ ++functional_fi_rdm_atomic_SOURCES = \ ++ functional/rdm_atomic.c ++functional_fi_rdm_atomic_LDADD = libfabtests.la ++ ++functional_fi_rdm_multi_recv_SOURCES = \ ++ functional/rdm_multi_recv.c ++functional_fi_rdm_multi_recv_LDADD = libfabtests.la ++ ++benchmarks_fi_msg_pingpong_SOURCES = \ ++ benchmarks/msg_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_msg_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_msg_bw_SOURCES = \ ++ benchmarks/msg_bw.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_msg_bw_LDADD = libfabtests.la ++ ++benchmarks_fi_rma_bw_SOURCES = \ ++ benchmarks/rma_bw.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rma_bw_LDADD = libfabtests.la ++ ++benchmarks_fi_dgram_pingpong_SOURCES = \ ++ benchmarks/dgram_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_dgram_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_rdm_cntr_pingpong_SOURCES = \ ++ benchmarks/rdm_cntr_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rdm_cntr_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_rdm_pingpong_SOURCES = \ ++ benchmarks/rdm_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rdm_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_rdm_tagged_pingpong_SOURCES = \ ++ benchmarks/rdm_tagged_pingpong.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rdm_tagged_pingpong_LDADD = libfabtests.la ++ ++benchmarks_fi_rdm_tagged_bw_SOURCES = \ ++ benchmarks/rdm_tagged_bw.c \ ++ $(benchmarks_srcs) ++benchmarks_fi_rdm_tagged_bw_LDADD = libfabtests.la ++ ++ ++unit_fi_eq_test_SOURCES = \ ++ unit/eq_test.c \ ++ $(unit_srcs) ++unit_fi_eq_test_LDADD = libfabtests.la ++ ++unit_fi_cq_test_SOURCES = \ ++ unit/cq_test.c \ ++ $(unit_srcs) ++unit_fi_cq_test_LDADD = libfabtests.la ++ ++unit_fi_mr_test_SOURCES = \ ++ unit/mr_test.c \ ++ $(unit_srcs) ++unit_fi_mr_test_LDADD = libfabtests.la ++ ++unit_fi_cntr_test_SOURCES = \ ++ unit/cntr_test.c \ ++ $(unit_srcs) ++unit_fi_cntr_test_LDADD = libfabtests.la ++ ++unit_fi_av_test_SOURCES = \ ++ unit/av_test.c \ ++ $(unit_srcs) ++unit_fi_av_test_LDADD = libfabtests.la ++ ++unit_fi_dom_test_SOURCES = \ ++ unit/dom_test.c \ ++ $(unit_srcs) ++unit_fi_dom_test_LDADD = libfabtests.la ++ ++unit_fi_getinfo_test_SOURCES = \ ++ unit/getinfo_test.c \ ++ $(unit_srcs) ++unit_fi_getinfo_test_LDADD = libfabtests.la ++ ++unit_fi_resource_freeing_SOURCES = \ ++ unit/resource_freeing.c ++unit_fi_resource_freeing_LDADD = libfabtests.la ++ ++ubertest_fi_ubertest_SOURCES = \ ++ ubertest/fabtest.h \ ++ ubertest/ofi_atomic.h \ ++ ubertest/ofi_atomic.c \ ++ ubertest/uber.c \ ++ ubertest/connect.c \ ++ ubertest/cq.c \ ++ ubertest/config.c \ ++ ubertest/domain.c \ ++ ubertest/ep.c \ ++ ubertest/xfer.c \ ++ ubertest/verify.c \ ++ ubertest/test_ctrl.c ++ubertest_fi_ubertest_LDADD = libfabtests.la ++ ++real_man_pages = \ ++ man/man7/fabtests.7 ++ ++dummy_man_pages = \ ++ man/man1/fi_av_xfer.1 \ ++ man/man1/fi_cm_data.1 \ ++ man/man1/fi_cq_data.1 \ ++ man/man1/fi_dgram.1 \ ++ man/man1/fi_dgram_waitset.1 \ ++ man/man1/fi_inj_complete.1 \ ++ man/man1/fi_mcast.1 \ ++ man/man1/fi_msg.1 \ ++ man/man1/fi_msg_epoll.1 \ ++ man/man1/fi_msg_sockets.1 \ ++ man/man1/fi_multi_ep.1 \ ++ man/man1/fi_multi_mr.1 \ ++ man/man1/fi_poll.1 \ ++ man/man1/fi_rdm.1 \ ++ man/man1/fi_rdm_atomic.1 \ ++ man/man1/fi_rdm_deferred_wq.1 \ ++ man/man1/fi_rdm_multi_domain.1 \ ++ man/man1/fi_rdm_multi_recv.1 \ ++ man/man1/fi_rdm_rma_simple.1 \ ++ man/man1/fi_rdm_rma_trigger.1 \ ++ man/man1/fi_rdm_shared_av.1 \ ++ man/man1/fi_rdm_tagged_peek.1 \ ++ man/man1/fi_recv_cancel.1 \ ++ man/man1/fi_resmgmt_test.1 \ ++ man/man1/fi_scalable_ep.1 \ ++ man/man1/fi_shared_ctx.1 \ ++ man/man1/fi_unexpected_msg.1 \ ++ man/man1/fi_dgram_pingpong.1 \ ++ man/man1/fi_msg_bw.1 \ ++ man/man1/fi_msg_pingpong.1 \ ++ man/man1/fi_rdm_cntr_pingpong.1 \ ++ man/man1/fi_rdm_pingpong.1 \ ++ man/man1/fi_rdm_tagged_bw.1 \ ++ man/man1/fi_rdm_tagged_pingpong.1 \ ++ man/man1/fi_rma_bw.1 \ ++ man/man1/fi_av_test.1 \ ++ man/man1/fi_cntr_test.1 \ ++ man/man1/fi_cq_test.1 \ ++ man/man1/fi_dom_test.1 \ ++ man/man1/fi_eq_test.1 \ ++ man/man1/fi_getinfo_test.1 \ ++ man/man1/fi_mr_test.1 \ ++ man/man1/fi_resource_freeing.1 \ ++ man/man1/fi_ubertest.1 ++ ++nroff: ++ @for file in $(real_man_pages); do \ ++ source=`echo $$file | sed -e 's@/man[0-9]@@'`; \ ++ perl $(top_srcdir)/config/md2nroff.pl --source=$(top_srcdir)/$$source.md; \ ++ done ++ ++ ++man_MANS = $(real_man_pages) $(dummy_man_pages) ++ ++EXTRA_DIST = \ ++ fabtests.spec.in $(real_man_pages) $(dummy_man_pages) ++ ++dist-hook: fabtests.spec ++ cp fabtests.spec $(distdir) ++ ++test: ++ ./scripts/runfabtests.sh -vvv -S $(os_excludes) ++ ./scripts/runfabtests.sh -vvv -S $(os_excludes) -R -f ./test_configs/udp/udp.exclude udp ++ ./scripts/runfabtests.sh -vvv -S $(os_excludes) -R -f ./test_configs/tcp/tcp.exclude tcp ++ ./scripts/runfabtests.sh -vvv -S $(os_excludes) -R -f ./test_configs/ofi_rxd/ofi_rxd.exclude "UDP;ofi_rxd" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.win b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.win +new file mode 100644 +index 000000000..1e59d3c56 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/Makefile.win +@@ -0,0 +1,120 @@ ++ ++ ++!if "$(arch)" == "" ++arch = x64 ++!endif ++ ++!if "$(config)" == "" ++config = Debug-v140 ++!endif ++ ++output_root = .\\ ++ ++!if "$(config)" == "Debug-v140" ++outdir = $(output_root)$(arch)\debug-v140 ++CFLAGS = $(CFLAGS) /Zi /Od /MTd ++!endif ++!if "$(config)" == "Debug-v141" ++outdir = $(output_root)$(arch)\debug-v141 ++CFLAGS = $(CFLAGS) /Zi /Od /MTd ++!endif ++!if "$(config)" == "Release-v140" ++outdir = $(output_root)$(arch)\release-v140 ++CFLAGS = $(CFLAGS) /O2 /MT ++!endif ++!if "$(config)" == "Release-v141" ++outdir = $(output_root)$(arch)\release-v141 ++CFLAGS = $(CFLAGS) /O2 /MT ++!endif ++ ++basedeps = common\shared.c common\jsmn.c common\windows\getopt.c \ ++ common\windows\osd.c ++ ++includes = /Iinclude /Iinclude\windows /I..\include /FIft_osd.h \ ++ /Iinclude\windows\getopt ++defines = /DGETOPT_STATIC ++libs = ..\$(arch)\$(config)\libfabric.lib Ws2_32.lib ++ ++CFLAGS = $(CFLAGS) $(includes) $(defines) ++ ++#all: complex functional ++ ++all: benchmarks functional unit ++ ++{benchmarks}.c{$(outdir)}.exe: ++ if not exist $(@D) mkdir $(@D) ++ $(CC) /Fe$@ $** $(baseincludes) $(CFLAGS) $(libs) ++ ++{functional}.c{$(outdir)}.exe: ++ if not exist $(@D) mkdir $(@D) ++ $(CC) /Fe$@ $** $(baseincludes) $(CFLAGS) $(libs) ++ ++{unit}.c{$(outdir)}.exe: ++ if not exist $(@D) mkdir $(@D) ++ $(CC) /Fe$@ $** $(baseincludes) $(CFLAGS) $(libs) ++ ++ ++benchmarks: $(outdir)\msg_pingpong.exe $(outdir)\rdm_cntr_pingpong.exe \ ++ $(outdir)\rdm_pingpong.exe $(outdir)\rdm_tagged_pingpong.exe ++ ++functional: $(outdir)\cq_data.exe $(outdir)\dgram.exe $(outdir)\dgram_waitset.exe $(outdir)\msg.exe \ ++ $(outdir)\msg_epoll.exe $(outdir)\msg_sockets.exe \ ++ $(outdir)\poll.exe $(outdir)\rdm.exe $(outdir)\rdm_rma_simple.exe $(outdir)\rdm_rma_trigger.exe \ ++ $(outdir)\rdm_tagged_peek.exe $(outdir)\scalable_ep.exe $(outdir)\inj_complete.exe ++ ++unit: $(outdir)\av_test.exe $(outdir)\dom_test.exe $(outdir)\eq_test.exe ++ ++complex: $(outdir)\complex.exe ++ ++clean: ++ if exist $(outdir) rmdir /s /q $(outdir) ++ del *.obj ++ ++$(outdir)\msg_pingpong.exe: {benchmarks}msg_pingpong.c $(basedeps) {benchmarks}benchmark_shared.c ++ ++$(outdir)\rdm_cntr_pingpong.exe: {benchmarks}rdm_cntr_pingpong.c $(basedeps) {benchmarks}benchmark_shared.c ++ ++$(outdir)\rdm_pingpong.exe: {benchmarks}rdm_pingpong.c $(basedeps) {benchmarks}benchmark_shared.c ++ ++$(outdir)\rdm_tagged_pingpong.exe: {benchmarks}rdm_tagged_pingpong.c $(basedeps) {benchmarks}benchmark_shared.c ++ ++ ++$(outdir)\cq_data.exe: {functional}cq_data.c $(basedeps) ++ ++$(outdir)\dgram.exe: {functional}dgram.c $(basedeps) ++ ++$(outdir)\dgram_waitset.exe: {functional}dgram_waitset.c $(basedeps) ++ ++$(outdir)\msg.exe: {functional}msg.c $(basedeps) ++ ++$(outdir)\msg_epoll.exe: {functional}msg_epoll.c $(basedeps) ++ ++$(outdir)\msg_sockets.exe: {functional}msg_sockets.c $(basedeps) ++ ++$(outdir)\poll.exe: {functional}poll.c $(basedeps) ++ ++$(outdir)\rdm.exe: {functional}rdm.c $(basedeps) ++ ++$(outdir)\rdm_rma_simple.exe: {functional}rdm_rma_simple.c $(basedeps) ++ ++$(outdir)\rdm_rma_trigger.exe: {functional}rdm_rma_trigger.c $(basedeps) ++ ++$(outdir)\rdm_tagged_peek.exe: {functional}rdm_tagged_peek.c $(basedeps) ++ ++$(outdir)\scalable_ep.exe: {functional}scalable_ep.c $(basedeps) ++ ++$(outdir)\inj_complete.exe: {functional}inj_complete.c $(basedeps) ++ ++$(outdir)\av_test.exe: {unit}av_test.c $(basedeps) {unit}common.c ++ ++$(outdir)\dom_test.exe: {unit}dom_test.c $(basedeps) {unit}common.c ++ ++$(outdir)\eq_test.exe: {unit}eq_test.c $(basedeps) {unit}common.c ++ ++$(outdir)\complex.exe: {complex}ft_comm.c {complex}ft_comp.c {complex}ft_config.c {complex}ft_domain.c {complex}ft_endpoint.c {complex}ft_main.c {complex}ft_msg.c {complex}ft_test.c $(basedeps) ++ if not exist $(@D) mkdir $(@D) ++ $(CC) /Fe$@ $** $(baseincludes) $(CFLAGS) $(libs) ++ ++ ++ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README +new file mode 100644 +index 000000000..f90f7d047 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README +@@ -0,0 +1,31 @@ ++Introduction ++============ ++Fabtests provides a set of examples that uses libfabric - a high-performance ++fabric software library. ++ ++Support ++======= ++Fabtests will run on any operating system supported by Libfabric. ++ ++Bugs or issues may be submitted directly to the Github issues list: ++ ++https://github.com/ofiwg/fabtests/issues ++ ++Additionally, users may post questions, comments, bugs, etc. to the Libfabric ++users mailing list. ++ ++libfabric-users@lists.openfabrics.org ++ ++Building ++======== ++ ++To install from a fabtests source package run the following commands: ++ ++./configure && make && make install ++ ++If building directly from the libfabric git tree, run './autogen.sh' before the ++configure step. ++ ++For more detailed build information see the projects home page on Github: ++ ++https://github.com/ofiwg/fabtests +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README.md b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README.md +new file mode 100644 +index 000000000..8448191b0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/README.md +@@ -0,0 +1,93 @@ ++[![Build Status](https://travis-ci.org/ofiwg/fabtests.svg?branch=master)](https://travis-ci.org/ofiwg/fabtests) ++[![fabtests Coverity scan suild status](https://scan.coverity.com/projects/ofiwg-fabtests/badge.svg)](https://scan.coverity.com/projects/ofiwg-fabtests) ++[![fabtests release version](https://img.shields.io/github/release/ofiwg/fabtests.svg)](https://github.com/ofiwg/fabtests/releases/latest) ++ ++# fabtests ++ ++Fabtests provides a set of examples that uses ++[libfabric](http://libfabric.org) -- a high-performance fabric ++software library. ++ ++## Notes ++ ++Note that the fabtests suite is released paired with a specific ++version of libfabric. For example, libfabric v1.4 and fabtests v1.4 ++were released together. ++ ++Using these paired versions is the best way to test a given version of ++libfabric. Using version-mismatched libfabric/fabtests pairs may ++produce unexpected results. ++ ++## Building fabtests ++ ++Distribution tarballs are available from the Github ++[releases](https://github.com/ofiwg/fabtests/releases) tab. ++ ++If you are building Fabtests from a developer Git clone, you must ++first run the `autogen.sh` script. This will invoke the GNU Autotools ++to bootstrap Fabtests' configuration and build mechanisms. If you are ++building Fabtests from an official distribution tarball, there is no ++need to run `autogen.sh`; Fabtests distribution tarballs are already ++bootstrapped for you. ++ ++Fabtests relies on being able to find an installed version of ++Libfabric. In some cases, Libfabric may be in default compiler / ++linker search paths, and you don't need to tell Fabtests where to find ++it. In other cases, you may need to tell Fabtests where to find the ++installed Libfabric's header and library files using the ++`--with-libfabric=` option, described below. ++ ++### Configure options ++ ++The `configure` script has many built in options (see `./configure ++--help`). Some useful options are: ++ ++``` ++--prefix= ++``` ++ ++By default `make install` will place the files in the `/usr` tree. ++The `--prefix` option specifies that the Fabtests files should be ++installed into the tree specified by named ``. The ++executables will be located at `/bin`. ++ ++``` ++--with-libfabric= ++``` ++ ++Specify the directory where the Libfabric library and header files are ++located. This is necessary if Libfabric was installed in a location ++where the compiler and linker will not search by default. The ++Libfabric library will be searched for in `/lib`, and ++headers will be searched for in `/include`. ++ ++``` ++--with-valgrind= ++``` ++ ++Directory where valgrind is installed. If valgrind is found, then ++valgrind annotations are enabled. This may incur a performance ++penalty. ++ ++### Examples ++ ++Consider the following example: ++ ++``` ++$ ./configure --with-libfabric=/opt/libfabric --prefix=/opt/fabtests && make -j 32 && sudo make install ++``` ++ ++This will tell the Fabtests to look for Libfabric libraries in the ++`/opt/libfabric` tree, and to install the Fabtests in the ++`/opt/fabtests` tree. ++ ++Alternatively: ++ ++``` ++$ ./configure --prefix=/opt/fabtests && make -j 32 && sudo make install ++``` ++ ++Tells the Fabtests that it should be able to find the Libfabric header ++files and libraries in default compiler / linker search paths ++(configure will abort if it is not able to find them), and to install ++Fabtests in `/opt/fabtests`. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/autogen.sh b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/autogen.sh +new file mode 100755 +index 000000000..b71795912 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/autogen.sh +@@ -0,0 +1,14 @@ ++#! /bin/sh ++ ++if test ! -d .git && test ! -f common/shared.c; then ++ echo You really need to run this script in the top-level fabtests directory ++ exit 1 ++fi ++ ++set -x ++ ++if test ! -d config; then ++ mkdir config ++fi ++ ++autoreconf -ivf +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.c +new file mode 100644 +index 000000000..ba98bc6a3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.c +@@ -0,0 +1,320 @@ ++/* ++ * Copyright (c) 2015-2017 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "benchmark_shared.h" ++ ++void ft_parse_benchmark_opts(int op, char *optarg) ++{ ++ switch (op) { ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case 'k': ++ ft_force_prefix(hints, &opts); ++ break; ++ case 'j': ++ hints->tx_attr->inject_size = atoi(optarg); ++ break; ++ case 'W': ++ opts.window_size = atoi(optarg); ++ break; ++ default: ++ break; ++ } ++} ++ ++void ft_benchmark_usage(void) ++{ ++ FT_PRINT_OPTS_USAGE("-v", "enables data_integrity checks"); ++ FT_PRINT_OPTS_USAGE("-k", "force prefix mode"); ++ FT_PRINT_OPTS_USAGE("-j", "maximum inject message size"); ++ FT_PRINT_OPTS_USAGE("-W", "window size* (for bandwidth tests)\n\n" ++ "* The following condition is required to have at least " ++ "one window\nsize # of messsages to be sent: " ++ "# of iterations > window size"); ++} ++ ++int ft_bw_init(void) ++{ ++ if (opts.window_size > 0) { ++ tx_ctx_arr = calloc(opts.window_size, sizeof(struct fi_context)); ++ if (!tx_ctx_arr) ++ return -FI_ENOMEM; ++ } ++ return 0; ++} ++ ++int pingpong(void) ++{ ++ int ret, i; ++ ++ ret = ft_sync(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ for (i = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ if (opts.transfer_size < fi->tx_attr->inject_size) ++ ret = ft_inject(ep, remote_fi_addr, opts.transfer_size); ++ else ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ } else { ++ for (i = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) ++ return ret; ++ ++ if (opts.transfer_size < fi->tx_attr->inject_size) ++ ret = ft_inject(ep, remote_fi_addr, opts.transfer_size); ++ else ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) ++ return ret; ++ } ++ } ++ ft_stop(); ++ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, &start, &end, 2, ++ opts.argc, opts.argv); ++ else ++ show_perf(NULL, opts.transfer_size, opts.iterations, &start, &end, 2); ++ ++ return 0; ++} ++ ++static int bw_tx_comp() ++{ ++ int ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ return ft_rx(ep, 4); ++} ++ ++static int bw_rx_comp() ++{ ++ int ret; ++ ++ /* rx_seq is always one ahead */ ++ ret = ft_get_rx_comp(rx_seq - 1); ++ if (ret) ++ return ret; ++ return ft_tx(ep, remote_fi_addr, 4, &tx_ctx); ++} ++ ++int bandwidth(void) ++{ ++ int ret, i, j; ++ ++ ret = ft_sync(); ++ if (ret) ++ return ret; ++ ++ /* The loop structured allows for the possibility that the sender ++ * immediately overruns the receiving side on the first transfer (or ++ * the entire window). This could result in exercising parts of the ++ * provider's implementation of FI_RM_ENABLED. For better or worse, ++ * some MPI-level benchmarks tend to use this type of loop for measuring ++ * bandwidth. */ ++ ++ if (opts.dst_addr) { ++ for (i = j = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ if (opts.transfer_size < fi->tx_attr->inject_size) ++ ret = ft_inject(ep, remote_fi_addr, opts.transfer_size); ++ else ++ ret = ft_post_tx(ep, remote_fi_addr, opts.transfer_size, ++ NO_CQ_DATA, &tx_ctx_arr[j]); ++ if (ret) ++ return ret; ++ ++ if (++j == opts.window_size) { ++ ret = bw_tx_comp(); ++ if (ret) ++ return ret; ++ j = 0; ++ } ++ } ++ ret = bw_tx_comp(); ++ if (ret) ++ return ret; ++ } else { ++ for (i = j = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ ret = ft_post_rx(ep, opts.transfer_size, &tx_ctx_arr[j]); ++ if (ret) ++ return ret; ++ ++ if (++j == opts.window_size) { ++ ret = bw_rx_comp(); ++ if (ret) ++ return ret; ++ j = 0; ++ } ++ } ++ ret = bw_rx_comp(); ++ if (ret) ++ return ret; ++ } ++ ft_stop(); ++ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, &start, &end, 1, ++ opts.argc, opts.argv); ++ else ++ show_perf(NULL, opts.transfer_size, opts.iterations, &start, &end, 1); ++ ++ return 0; ++} ++ ++static int bw_rma_comp(enum ft_rma_opcodes rma_op) ++{ ++ int ret; ++ ++ if (rma_op == FT_RMA_WRITEDATA) { ++ if (opts.dst_addr) { ++ ret = bw_tx_comp(); ++ } else { ++ ret = bw_rx_comp(); ++ } ++ } else { ++ ret = ft_get_tx_comp(tx_seq); ++ } ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int bandwidth_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote) ++{ ++ int ret, i, j; ++ ++ ret = ft_sync(); ++ if (ret) ++ return ret; ++ ++ for (i = j = 0; i < opts.iterations + opts.warmup_iterations; i++) { ++ if (i == opts.warmup_iterations) ++ ft_start(); ++ ++ switch (rma_op) { ++ case FT_RMA_WRITE: ++ if (opts.transfer_size < fi->tx_attr->inject_size) { ++ ret = ft_post_rma_inject(FT_RMA_WRITE, ep, ++ opts.transfer_size, remote); ++ } else { ++ ret = ft_post_rma(rma_op, ep, opts.transfer_size, ++ remote, &tx_ctx_arr[j]); ++ } ++ break; ++ case FT_RMA_WRITEDATA: ++ if (!opts.dst_addr) { ++ if (fi->rx_attr->mode & FI_RX_CQ_DATA) ++ ret = ft_post_rx(ep, 0, &tx_ctx_arr[j]); ++ else ++ /* Just increment the seq # instead of ++ * posting recv so that we wait for ++ * remote write completion on the next ++ * iteration */ ++ rx_seq++; ++ ++ } else { ++ if (opts.transfer_size < fi->tx_attr->inject_size) { ++ ret = ft_post_rma_inject(FT_RMA_WRITEDATA, ++ ep, ++ opts.transfer_size, ++ remote); ++ } else { ++ ret = ft_post_rma(FT_RMA_WRITEDATA, ++ ep, ++ opts.transfer_size, ++ remote, &tx_ctx_arr[j]); ++ } ++ } ++ break; ++ case FT_RMA_READ: ++ ret = ft_post_rma(FT_RMA_READ, ep, opts.transfer_size, ++ remote, &tx_ctx_arr[j]); ++ break; ++ default: ++ FT_ERR("Unknown RMA op type\n"); ++ return EXIT_FAILURE; ++ } ++ if (ret) ++ return ret; ++ ++ if (++j == opts.window_size) { ++ ret = bw_rma_comp(rma_op); ++ if (ret) ++ return ret; ++ j = 0; ++ } ++ } ++ ret = bw_rma_comp(rma_op); ++ if (ret) ++ return ret; ++ ft_stop(); ++ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, &start, &end, 1, ++ opts.argc, opts.argv); ++ else ++ show_perf(NULL, opts.transfer_size, opts.iterations, &start, &end, 1); ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.h +similarity index 63% +rename from prov/verbs/src/ep_dgram/verbs_dgram_cntr.c +rename to fabtests/benchmarks/benchmark_shared.h +index 5ec0efc34..9bc31201f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/benchmark_shared.h +@@ -1,5 +1,6 @@ + /* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -30,39 +31,27 @@ + * SOFTWARE. + */ + +-#include "verbs_dgram.h" ++#ifndef _BENCHMARK_SHARED_H_ ++#define _BENCHMARK_SHARED_H_ + +-int fi_ibv_dgram_cntr_open(struct fid_domain *domain_fid, +- struct fi_cntr_attr *attr, +- struct fid_cntr **cntr_fid, +- void *context) +-{ +- int ret; +- struct fi_ibv_dgram_cntr *cntr; +- struct fi_ibv_domain *domain; ++#ifdef __cplusplus ++extern "C" { ++#endif + +- cntr = calloc(1, sizeof(*cntr)); +- if (!cntr) +- return -FI_ENOMEM; ++#include + +- domain = container_of(domain_fid, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) { +- ret = -FI_EINVAL; +- goto free; +- } ++#define BENCHMARK_OPTS "vkj:W:" ++#define FT_BENCHMARK_MAX_MSG_SIZE (test_size[TEST_CNT - 1].size) + +- assert(domain->ep_type == FI_EP_DGRAM); ++void ft_parse_benchmark_opts(int op, char *optarg); ++void ft_benchmark_usage(void); ++int ft_bw_init(void); ++int pingpong(void); ++int bandwidth(void); ++int bandwidth_rma(enum ft_rma_opcodes op, struct fi_rma_iov *remote); + +- ret = ofi_cntr_init(&fi_ibv_prov, domain_fid, attr, &cntr->util_cntr, +- &ofi_cntr_progress, context); +- if (ret) +- goto free; +- +- *cntr_fid = &cntr->util_cntr.cntr_fid; +- return FI_SUCCESS; +- +-free: +- free(cntr); +- return ret; ++#ifdef __cplusplus + } ++#endif ++ ++#endif /* _BENCHMARK_SHARED_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/dgram_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/dgram_pingpong.c +new file mode 100644 +index 000000000..b109cb26b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/dgram_pingpong.c +@@ -0,0 +1,130 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2017 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "shared.h" ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ /* Post an extra receive to avoid lacking a posted receive in the ++ * finalize. ++ */ ++ ret = fi_recv(ep, rx_buf, rx_size + ft_rx_prefix_size(), mr_desc, ++ 0, &rx_ctx); ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ ++ opts.transfer_size = test_size[i].size; ++ if (opts.transfer_size > fi->ep_attr->max_msg_size) ++ continue; ++ ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ return ret; ++ } ++ ++ return ft_finalize(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int ret, op; ++ ++ opts = INIT_OPTS; ++ ++ timeout = 5; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "hT:" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != ++ -1) { ++ switch (op) { ++ case 'T': ++ timeout = atoi(optarg); ++ break; ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using UD."); ++ ft_benchmark_usage(); ++ FT_PRINT_OPTS_USAGE("-T ", ++ "seconds before timeout on receive"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_DGRAM; ++ if (opts.options & FT_OPT_SIZE) ++ hints->ep_attr->max_msg_size = opts.transfer_size; ++ hints->caps = FI_MSG; ++ hints->mode |= FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_bw.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_bw.c +new file mode 100644 +index 000000000..c641acc57 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_bw.c +@@ -0,0 +1,119 @@ ++/* ++ * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ ret = ft_bw_init(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth(); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_BW; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Bandwidth test for MSG endpoints."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_pingpong.c +new file mode 100644 +index 000000000..0c98014a4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/msg_pingpong.c +@@ -0,0 +1,115 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "shared.h" ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ ++ ret = ft_finalize(); ++out: ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != ++ -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using message endpoints."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_cntr_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_cntr_pingpong.c +new file mode 100644 +index 000000000..f2f04255a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_cntr_pingpong.c +@@ -0,0 +1,108 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_RX_CNTR | FT_OPT_TX_CNTR; ++ opts.comp_method = FT_COMP_SREAD; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using counters."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_pingpong.c +new file mode 100644 +index 000000000..836a263b1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_pingpong.c +@@ -0,0 +1,106 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ return ret; ++ } ++ ++ return ft_finalize(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != ++ -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using RDM."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_bw.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_bw.c +new file mode 100644 +index 000000000..9815a0df1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_bw.c +@@ -0,0 +1,113 @@ ++/* ++ * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_bw_init(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth(); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_BW; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Bandwidth test for RDM endpoints using tagged messages."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->caps = FI_TAGGED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_pingpong.c +new file mode 100644 +index 000000000..56ca4e854 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rdm_tagged_pingpong.c +@@ -0,0 +1,107 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = pingpong(); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Ping pong client and server using tagged messages."); ++ ft_benchmark_usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_TAGGED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rma_bw.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rma_bw.c +new file mode 100644 +index 000000000..cf073d507 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/benchmarks/rma_bw.c +@@ -0,0 +1,134 @@ ++/* ++ * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include "benchmark_shared.h" ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ } else { ++ ret = ft_init_fabric(); ++ } ++ if (ret) ++ return ret; ++ ++ ret = ft_bw_init(); ++ if (ret) ++ return ret; ++ ++ ret = ft_exchange_keys(&remote); ++ if (ret) ++ return ret; ++ ++ if (!(opts.options & FT_OPT_SIZE)) { ++ for (i = 0; i < TEST_CNT; i++) { ++ if (!ft_use_size(i, opts.sizes_enabled)) ++ continue; ++ opts.transfer_size = test_size[i].size; ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth_rma(opts.rma_op, &remote); ++ if (ret) ++ goto out; ++ } ++ } else { ++ init_test(&opts, test_name, sizeof(test_name)); ++ ret = bandwidth_rma(opts.rma_op, &remote); ++ if (ret) ++ goto out; ++ } ++ ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_BW; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ hints->caps = FI_MSG | FI_RMA; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ ++ while ((op = getopt(argc, argv, "ho:" CS_OPTS INFO_OPTS BENCHMARK_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_benchmark_opts(op, optarg); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ ret = ft_parse_rma_opts(op, optarg, hints, &opts); ++ if (ret) ++ return ret; ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Bandwidth test using RMA operations."); ++ ft_benchmark_usage(); ++ FT_PRINT_OPTS_USAGE("-o ", "rma op type: read|write|" ++ "writedata (default: write)\n"); ++ fprintf(stderr, "Note: read/write bw tests are bidirectional.\n" ++ " writedata bw test is unidirectional" ++ " from the client side.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return -ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/jsmn.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/jsmn.c +new file mode 100644 +index 000000000..9fe0fb4d4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/jsmn.c +@@ -0,0 +1,333 @@ ++/* ++ * Copyright (c) 2010 Serge A. Zaitsev ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to deal ++ * in the Software without restriction, including without limitation the rights ++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ * copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++ * THE SOFTWARE. ++ */ ++ ++#include ++ ++#include "jsmn.h" ++ ++/** ++ * Allocates a fresh unused token from the token pull. ++ */ ++static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, ++ jsmntok_t *tokens, size_t num_tokens) { ++ jsmntok_t *tok; ++ if (parser->toknext >= num_tokens) { ++ return NULL; ++ } ++ tok = &tokens[parser->toknext++]; ++ tok->start = tok->end = -1; ++ tok->size = 0; ++#ifdef JSMN_PARENT_LINKS ++ tok->parent = -1; ++#endif ++ return tok; ++} ++ ++/** ++ * Fills token type and boundaries. ++ */ ++static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, ++ int start, int end) { ++ token->type = type; ++ token->start = start; ++ token->end = end; ++ token->size = 0; ++} ++ ++/** ++ * Fills next available token with JSON primitive. ++ */ ++static jsmnerr_t jsmn_parse_primitive(jsmn_parser *parser, const char *js, ++ size_t len, jsmntok_t *tokens, size_t num_tokens) { ++ jsmntok_t *token; ++ int start; ++ ++ start = parser->pos; ++ ++ for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { ++ switch (js[parser->pos]) { ++#ifndef JSMN_STRICT ++ /* In strict mode primitive must be followed by "," or "}" or "]" */ ++ case ':': ++#endif ++ case '\t' : case '\r' : case '\n' : case ' ' : ++ case ',' : case ']' : case '}' : ++ goto found; ++ } ++ if (js[parser->pos] < 32 || js[parser->pos] >= 127) { ++ parser->pos = start; ++ return JSMN_ERROR_INVAL; ++ } ++ } ++#ifdef JSMN_STRICT ++ /* In strict mode primitive must be followed by a comma/object/array */ ++ parser->pos = start; ++ return JSMN_ERROR_PART; ++#endif ++ ++found: ++ if (tokens == NULL) { ++ parser->pos--; ++ return 0; ++ } ++ token = jsmn_alloc_token(parser, tokens, num_tokens); ++ if (token == NULL) { ++ parser->pos = start; ++ return JSMN_ERROR_NOMEM; ++ } ++ jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos); ++#ifdef JSMN_PARENT_LINKS ++ token->parent = parser->toksuper; ++#endif ++ parser->pos--; ++ return 0; ++} ++ ++/** ++ * Filsl next token with JSON string. ++ */ ++static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js, ++ size_t len, jsmntok_t *tokens, size_t num_tokens) { ++ jsmntok_t *token; ++ ++ int start = parser->pos; ++ ++ parser->pos++; ++ ++ /* Skip starting quote */ ++ for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { ++ char c = js[parser->pos]; ++ ++ /* Quote: end of string */ ++ if (c == '\"') { ++ if (tokens == NULL) { ++ return 0; ++ } ++ token = jsmn_alloc_token(parser, tokens, num_tokens); ++ if (token == NULL) { ++ parser->pos = start; ++ return JSMN_ERROR_NOMEM; ++ } ++ jsmn_fill_token(token, JSMN_STRING, start+1, parser->pos); ++#ifdef JSMN_PARENT_LINKS ++ token->parent = parser->toksuper; ++#endif ++ return 0; ++ } ++ ++ /* Backslash: Quoted symbol expected */ ++ if (c == '\\' && parser->pos + 1 < len) { ++ int i; ++ parser->pos++; ++ switch (js[parser->pos]) { ++ /* Allowed escaped symbols */ ++ case '\"': case '/' : case '\\' : case 'b' : ++ case 'f' : case 'r' : case 'n' : case 't' : ++ break; ++ /* Allows escaped symbol \uXXXX */ ++ case 'u': ++ parser->pos++; ++ for(i = 0; i < 4 && parser->pos < len && js[parser->pos] != '\0'; i++) { ++ /* If it isn't a hex character we have an error */ ++ if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */ ++ (js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */ ++ (js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */ ++ parser->pos = start; ++ return JSMN_ERROR_INVAL; ++ } ++ parser->pos++; ++ } ++ parser->pos--; ++ break; ++ /* Unexpected symbol */ ++ default: ++ parser->pos = start; ++ return JSMN_ERROR_INVAL; ++ } ++ } ++ } ++ parser->pos = start; ++ return JSMN_ERROR_PART; ++} ++ ++/** ++ * Parse JSON string and fill tokens. ++ */ ++jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, ++ jsmntok_t *tokens, unsigned int num_tokens) { ++ jsmnerr_t r; ++ int i; ++ jsmntok_t *token; ++ int count = 0; ++ ++ for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { ++ char c; ++ jsmntype_t type; ++ ++ c = js[parser->pos]; ++ switch (c) { ++ case '{': case '[': ++ count++; ++ if (tokens == NULL) { ++ break; ++ } ++ token = jsmn_alloc_token(parser, tokens, num_tokens); ++ if (token == NULL) ++ return JSMN_ERROR_NOMEM; ++ if (parser->toksuper != -1) { ++ tokens[parser->toksuper].size++; ++#ifdef JSMN_PARENT_LINKS ++ token->parent = parser->toksuper; ++#endif ++ } ++ token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY); ++ token->start = parser->pos; ++ parser->toksuper = parser->toknext - 1; ++ break; ++ case '}': case ']': ++ if (tokens == NULL) ++ break; ++ type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY); ++#ifdef JSMN_PARENT_LINKS ++ if (parser->toknext < 1) { ++ return JSMN_ERROR_INVAL; ++ } ++ token = &tokens[parser->toknext - 1]; ++ for (;;) { ++ if (token->start != -1 && token->end == -1) { ++ if (token->type != type) { ++ return JSMN_ERROR_INVAL; ++ } ++ token->end = parser->pos + 1; ++ parser->toksuper = token->parent; ++ break; ++ } ++ if (token->parent == -1) { ++ break; ++ } ++ token = &tokens[token->parent]; ++ } ++#else ++ for (i = parser->toknext - 1; i >= 0; i--) { ++ token = &tokens[i]; ++ if (token->start != -1 && token->end == -1) { ++ if (token->type != type) { ++ return JSMN_ERROR_INVAL; ++ } ++ parser->toksuper = -1; ++ token->end = parser->pos + 1; ++ break; ++ } ++ } ++ /* Error if unmatched closing bracket */ ++ if (i == -1) return JSMN_ERROR_INVAL; ++ for (; i >= 0; i--) { ++ token = &tokens[i]; ++ if (token->start != -1 && token->end == -1) { ++ parser->toksuper = i; ++ break; ++ } ++ } ++#endif ++ break; ++ case '\"': ++ r = jsmn_parse_string(parser, js, len, tokens, num_tokens); ++ if (r < 0) return r; ++ count++; ++ if (parser->toksuper != -1 && tokens != NULL) ++ tokens[parser->toksuper].size++; ++ break; ++ case '\t' : case '\r' : case '\n' : case ' ': ++ break; ++ case ':': ++ parser->toksuper = parser->toknext - 1; ++ break; ++ case ',': ++ if (tokens != NULL && ++ tokens[parser->toksuper].type != JSMN_ARRAY && ++ tokens[parser->toksuper].type != JSMN_OBJECT) { ++#ifdef JSMN_PARENT_LINKS ++ parser->toksuper = tokens[parser->toksuper].parent; ++#else ++ for (i = parser->toknext - 1; i >= 0; i--) { ++ if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) { ++ if (tokens[i].start != -1 && tokens[i].end == -1) { ++ parser->toksuper = i; ++ break; ++ } ++ } ++ } ++#endif ++ } ++ break; ++#ifdef JSMN_STRICT ++ /* In strict mode primitives are: numbers and booleans */ ++ case '-': case '0': case '1' : case '2': case '3' : case '4': ++ case '5': case '6': case '7' : case '8': case '9': ++ case 't': case 'f': case 'n' : ++ /* And they must not be keys of the object */ ++ if (tokens != NULL) { ++ jsmntok_t *t = &tokens[parser->toksuper]; ++ if (t->type == JSMN_OBJECT || ++ (t->type == JSMN_STRING && t->size != 0)) { ++ return JSMN_ERROR_INVAL; ++ } ++ } ++#else ++ /* In non-strict mode every unquoted value is a primitive */ ++ default: ++#endif ++ r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens); ++ if (r < 0) return r; ++ count++; ++ if (parser->toksuper != -1 && tokens != NULL) ++ tokens[parser->toksuper].size++; ++ break; ++ ++#ifdef JSMN_STRICT ++ /* Unexpected char in strict mode */ ++ default: ++ return JSMN_ERROR_INVAL; ++#endif ++ } ++ } ++ ++ for (i = parser->toknext - 1; i >= 0; i--) { ++ /* Unmatched opened object or array */ ++ if (tokens && tokens[i].start != -1 && tokens[i].end == -1) { ++ return JSMN_ERROR_PART; ++ } ++ } ++ ++ return count; ++} ++ ++/** ++ * Creates a new parser based over a given buffer with an array of tokens ++ * available. ++ */ ++void jsmn_init(jsmn_parser *parser) { ++ parser->pos = 0; ++ parser->toknext = 0; ++ parser->toksuper = -1; ++} ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/osx/osd.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/osx/osd.c +new file mode 100644 +index 000000000..e9f70f0a9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/osx/osd.c +@@ -0,0 +1,55 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "osx/osd.h" ++#include "config.h" ++ ++/* clock_gettime() does not exist on OS X before the mac OS Sierra release. If ++ * the symbol is not already defined, then define a workaround using ++ * gettimeofday. Ignore the clk_id that is passed in and always return the ++ * system clock time. ++ */ ++#if !HAVE_CLOCK_GETTIME ++int clock_gettime(clockid_t clk_id, struct timespec *tp) { ++ int retval; ++ struct timeval tv; ++ ++ retval = gettimeofday(&tv, NULL); ++ ++ tp->tv_sec = tv.tv_sec; ++ tp->tv_nsec = tv.tv_usec * 1000; ++ ++ return retval; ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/shared.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/shared.c +new file mode 100644 +index 000000000..9dc580466 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/shared.c +@@ -0,0 +1,3191 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016 Cray Inc. All rights reserved. ++ * Copyright (c) 2014-2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++struct fi_info *fi_pep, *fi, *hints; ++struct fid_fabric *fabric; ++struct fid_wait *waitset; ++struct fid_domain *domain; ++struct fid_poll *pollset; ++struct fid_pep *pep; ++struct fid_ep *ep, *alias_ep; ++struct fid_cq *txcq, *rxcq; ++struct fid_cntr *txcntr, *rxcntr; ++struct fid_mr *mr; ++void *mr_desc = NULL; ++struct fid_av *av; ++struct fid_eq *eq; ++struct fid_mc *mc; ++ ++struct fid_mr no_mr; ++struct fi_context tx_ctx, rx_ctx; ++struct fi_context *tx_ctx_arr = NULL, *rx_ctx_arr = NULL; ++uint64_t remote_cq_data = 0; ++ ++uint64_t tx_seq, rx_seq, tx_cq_cntr, rx_cq_cntr; ++int (*ft_mr_alloc_func)(void); ++uint64_t ft_tag = 0; ++int ft_parent_proc = 0; ++pid_t ft_child_pid = 0; ++int ft_socket_pair[2]; ++ ++fi_addr_t remote_fi_addr = FI_ADDR_UNSPEC; ++char *buf, *tx_buf, *rx_buf; ++size_t buf_size, tx_size, rx_size; ++int rx_fd = -1, tx_fd = -1; ++char default_port[8] = "9228"; ++static char default_oob_port[8] = "3000"; ++const char *greeting = "Hello from Client!"; ++ ++ ++char test_name[50] = "custom"; ++int timeout = -1; ++struct timespec start, end; ++ ++int listen_sock = -1; ++int sock = -1; ++int oob_sock = -1; ++ ++struct fi_av_attr av_attr = { ++ .type = FI_AV_MAP, ++ .count = 1 ++}; ++struct fi_eq_attr eq_attr = { ++ .wait_obj = FI_WAIT_UNSPEC ++}; ++struct fi_cq_attr cq_attr = { ++ .wait_obj = FI_WAIT_NONE ++}; ++struct fi_cntr_attr cntr_attr = { ++ .events = FI_CNTR_EVENTS_COMP, ++ .wait_obj = FI_WAIT_NONE ++}; ++ ++struct fi_rma_iov remote; ++ ++struct ft_opts opts; ++ ++struct test_size_param test_size[] = { ++ { 1 << 0, 0 }, ++ { 1 << 1, 0 }, { (1 << 1) + (1 << 0), 0 }, ++ { 1 << 2, 0 }, { (1 << 2) + (1 << 1), 0 }, ++ { 1 << 3, 0 }, { (1 << 3) + (1 << 2), 0 }, ++ { 1 << 4, 0 }, { (1 << 4) + (1 << 3), 0 }, ++ { 1 << 5, 0 }, { (1 << 5) + (1 << 4), 0 }, ++ { 1 << 6, FT_DEFAULT_SIZE }, { (1 << 6) + (1 << 5), 0 }, ++ { 1 << 7, 0 }, { (1 << 7) + (1 << 6), 0 }, ++ { 1 << 8, FT_DEFAULT_SIZE }, { (1 << 8) + (1 << 7), 0 }, ++ { 1 << 9, 0 }, { (1 << 9) + (1 << 8), 0 }, ++ { 1 << 10, FT_DEFAULT_SIZE }, { (1 << 10) + (1 << 9), 0 }, ++ { 1 << 11, 0 }, { (1 << 11) + (1 << 10), 0 }, ++ { 1 << 12, FT_DEFAULT_SIZE }, { (1 << 12) + (1 << 11), 0 }, ++ { 1 << 13, 0 }, { (1 << 13) + (1 << 12), 0 }, ++ { 1 << 14, 0 }, { (1 << 14) + (1 << 13), 0 }, ++ { 1 << 15, 0 }, { (1 << 15) + (1 << 14), 0 }, ++ { 1 << 16, FT_DEFAULT_SIZE }, { (1 << 16) + (1 << 15), 0 }, ++ { 1 << 17, 0 }, { (1 << 17) + (1 << 16), 0 }, ++ { 1 << 18, 0 }, { (1 << 18) + (1 << 17), 0 }, ++ { 1 << 19, 0 }, { (1 << 19) + (1 << 18), 0 }, ++ { 1 << 20, FT_DEFAULT_SIZE }, { (1 << 20) + (1 << 19), 0 }, ++ { 1 << 21, 0 }, { (1 << 21) + (1 << 20), 0 }, ++ { 1 << 22, 0 }, { (1 << 22) + (1 << 21), 0 }, ++ { 1 << 23, 0 }, ++}; ++ ++const unsigned int test_cnt = (sizeof test_size / sizeof test_size[0]); ++ ++#define INTEG_SEED 7 ++static const char integ_alphabet[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; ++static const int integ_alphabet_length = (sizeof(integ_alphabet)/sizeof(*integ_alphabet)) - 1; ++ ++ ++static int ft_poll_fd(int fd, int timeout) ++{ ++ struct pollfd fds; ++ int ret; ++ ++ fds.fd = fd; ++ fds.events = POLLIN; ++ ret = poll(&fds, 1, timeout); ++ if (ret == -1) { ++ FT_PRINTERR("poll", -errno); ++ ret = -errno; ++ } else if (!ret) { ++ ret = -FI_EAGAIN; ++ } else { ++ ret = 0; ++ } ++ return ret; ++} ++ ++size_t ft_tx_prefix_size(void) ++{ ++ return (fi->tx_attr->mode & FI_MSG_PREFIX) ? ++ fi->ep_attr->msg_prefix_size : 0; ++} ++ ++size_t ft_rx_prefix_size(void) ++{ ++ return (fi->rx_attr->mode & FI_MSG_PREFIX) ? ++ fi->ep_attr->msg_prefix_size : 0; ++} ++ ++int ft_check_opts(uint64_t flags) ++{ ++ return (opts.options & flags) == flags; ++} ++ ++static void ft_cq_set_wait_attr(void) ++{ ++ switch (opts.comp_method) { ++ case FT_COMP_SREAD: ++ cq_attr.wait_obj = FI_WAIT_UNSPEC; ++ cq_attr.wait_cond = FI_CQ_COND_NONE; ++ break; ++ case FT_COMP_WAITSET: ++ assert(waitset); ++ cq_attr.wait_obj = FI_WAIT_SET; ++ cq_attr.wait_cond = FI_CQ_COND_NONE; ++ cq_attr.wait_set = waitset; ++ break; ++ case FT_COMP_WAIT_FD: ++ cq_attr.wait_obj = FI_WAIT_FD; ++ cq_attr.wait_cond = FI_CQ_COND_NONE; ++ break; ++ default: ++ cq_attr.wait_obj = FI_WAIT_NONE; ++ break; ++ } ++} ++ ++static void ft_cntr_set_wait_attr(void) ++{ ++ switch (opts.comp_method) { ++ case FT_COMP_SREAD: ++ cntr_attr.wait_obj = FI_WAIT_UNSPEC; ++ break; ++ case FT_COMP_WAITSET: ++ assert(waitset); ++ cntr_attr.wait_obj = FI_WAIT_SET; ++ break; ++ case FT_COMP_WAIT_FD: ++ cntr_attr.wait_obj = FI_WAIT_FD; ++ break; ++ default: ++ cntr_attr.wait_obj = FI_WAIT_NONE; ++ break; ++ } ++} ++ ++int ft_cntr_open(struct fid_cntr **cntr) ++{ ++ ft_cntr_set_wait_attr(); ++ return fi_cntr_open(domain, &cntr_attr, cntr, cntr); ++} ++ ++static inline int ft_rma_read_target_allowed(uint64_t caps) ++{ ++ if (caps & (FI_RMA | FI_ATOMIC)) { ++ if (caps & FI_REMOTE_READ) ++ return 1; ++ return !(caps & (FI_READ | FI_WRITE | FI_REMOTE_WRITE)); ++ } ++ return 0; ++} ++ ++static inline int ft_rma_write_target_allowed(uint64_t caps) ++{ ++ if (caps & (FI_RMA | FI_ATOMIC)) { ++ if (caps & FI_REMOTE_WRITE) ++ return 1; ++ return !(caps & (FI_READ | FI_WRITE | FI_REMOTE_WRITE)); ++ } ++ return 0; ++} ++ ++static inline int ft_check_mr_local_flag(struct fi_info *info) ++{ ++ return ((info->mode & FI_LOCAL_MR) || ++ (info->domain_attr->mr_mode & FI_MR_LOCAL)); ++} ++ ++uint64_t ft_info_to_mr_access(struct fi_info *info) ++{ ++ uint64_t mr_access = 0; ++ if (ft_check_mr_local_flag(info)) { ++ if (info->caps & (FI_MSG | FI_TAGGED)) { ++ if (info->caps & FT_MSG_MR_ACCESS) { ++ mr_access |= info->caps & FT_MSG_MR_ACCESS; ++ } else { ++ mr_access |= FT_MSG_MR_ACCESS; ++ } ++ } ++ ++ if (info->caps & (FI_RMA | FI_ATOMIC)) { ++ if (info->caps & FT_RMA_MR_ACCESS) { ++ mr_access |= info->caps & FT_RMA_MR_ACCESS; ++ } else { ++ mr_access |= FT_RMA_MR_ACCESS; ++ } ++ } ++ } else { ++ if (info->caps & (FI_RMA | FI_ATOMIC)) { ++ if (ft_rma_read_target_allowed(info->caps)) { ++ mr_access |= FI_REMOTE_READ; ++ } ++ if (ft_rma_write_target_allowed(info->caps)) { ++ mr_access |= FI_REMOTE_WRITE; ++ } ++ } ++ } ++ return mr_access; ++} ++ ++#define bit_isset(x, i) (x >> i & 1) ++#define for_each_bit(x, i) for (i = 0; i < (8 * sizeof(x)); i++) ++ ++static inline int bit_set_count(uint64_t val) ++{ ++ int cnt = 0; ++ while (val) { ++ cnt++; ++ val &= val - 1; ++ } ++ return cnt; ++} ++ ++int ft_alloc_bit_combo(uint64_t fixed, uint64_t opt, ++ uint64_t **combos, int *len) ++{ ++ uint64_t *flags; ++ int i, num_flags; ++ uint64_t index; ++ int ret; ++ ++ num_flags = bit_set_count(opt) + 1; ++ flags = calloc(num_flags, sizeof(fixed)); ++ if (!flags) { ++ perror("calloc"); ++ return -FI_ENOMEM; ++ } ++ ++ *len = 1 << (num_flags - 1); ++ *combos = calloc(*len, sizeof(fixed)); ++ if (!(*combos)) { ++ perror("calloc"); ++ ret = -FI_ENOMEM; ++ goto clean; ++ } ++ ++ num_flags = 0; ++ for_each_bit(opt, i) { ++ if (bit_isset(opt, i)) ++ flags[num_flags++] = 1ULL << i; ++ } ++ ++ for (index = 0; index < (*len); index++) { ++ (*combos)[index] = fixed; ++ for_each_bit(index, i) { ++ if (bit_isset(index, i)) ++ (*combos)[index] |= flags[i]; ++ } ++ } ++ ret = FI_SUCCESS; ++ ++clean: ++ free(flags); ++ return ret; ++} ++ ++void ft_free_bit_combo(uint64_t *combo) ++{ ++ free(combo); ++} ++ ++/* ++ * Include FI_MSG_PREFIX space in the allocated buffer, and ensure that the ++ * buffer is large enough for a control message used to exchange addressing ++ * data. ++ */ ++static int ft_alloc_msgs(void) ++{ ++ int ret; ++ long alignment = 1; ++ ++ if (ft_check_opts(FT_OPT_SKIP_MSG_ALLOC)) ++ return 0; ++ ++ tx_size = opts.options & FT_OPT_SIZE ? ++ opts.transfer_size : test_size[TEST_CNT - 1].size; ++ if (tx_size > fi->ep_attr->max_msg_size) ++ tx_size = fi->ep_attr->max_msg_size; ++ rx_size = tx_size + ft_rx_prefix_size(); ++ tx_size += ft_tx_prefix_size(); ++ buf_size = MAX(tx_size, FT_MAX_CTRL_MSG) + MAX(rx_size, FT_MAX_CTRL_MSG); ++ ++ if (opts.options & FT_OPT_ALIGN) { ++ alignment = sysconf(_SC_PAGESIZE); ++ if (alignment < 0) ++ return -errno; ++ buf_size += alignment; ++ ++ ret = posix_memalign((void **) &buf, (size_t) alignment, ++ buf_size); ++ if (ret) { ++ FT_PRINTERR("posix_memalign", ret); ++ return ret; ++ } ++ } else { ++ buf = malloc(buf_size); ++ if (!buf) { ++ perror("malloc"); ++ return -FI_ENOMEM; ++ } ++ } ++ memset(buf, 0, buf_size); ++ rx_buf = buf; ++ tx_buf = (char *) buf + MAX(rx_size, FT_MAX_CTRL_MSG); ++ tx_buf = (void *) (((uintptr_t) tx_buf + alignment - 1) & ++ ~(alignment - 1)); ++ ++ remote_cq_data = ft_init_cq_data(fi); ++ ++ if (!ft_mr_alloc_func && !ft_check_opts(FT_OPT_SKIP_REG_MR) && ++ ((fi->domain_attr->mr_mode & FI_MR_LOCAL) || ++ (fi->caps & (FI_RMA | FI_ATOMIC)))) { ++ ret = fi_mr_reg(domain, buf, buf_size, ft_info_to_mr_access(fi), ++ 0, FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ mr_desc = ft_check_mr_local_flag(fi) ? fi_mr_desc(mr) : NULL; ++ } else { ++ if (ft_mr_alloc_func) { ++ assert(!ft_check_opts(FT_OPT_SKIP_REG_MR)); ++ ret = ft_mr_alloc_func(); ++ if (ret) ++ return ret; ++ } ++ mr = &no_mr; ++ } ++ ++ return 0; ++} ++ ++int ft_open_fabric_res(void) ++{ ++ int ret; ++ ++ ret = fi_fabric(fi->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_fabric", ret); ++ return ret; ++ } ++ ++ ret = fi_eq_open(fabric, &eq_attr, &eq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_eq_open", ret); ++ return ret; ++ } ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_alloc_ep_res(struct fi_info *fi) ++{ ++ int ret; ++ ++ ret = ft_alloc_msgs(); ++ if (ret) ++ return ret; ++ ++ if (cq_attr.format == FI_CQ_FORMAT_UNSPEC) { ++ if (fi->caps & FI_TAGGED) ++ cq_attr.format = FI_CQ_FORMAT_TAGGED; ++ else ++ cq_attr.format = FI_CQ_FORMAT_CONTEXT; ++ } ++ ++ if (opts.options & FT_OPT_CQ_SHARED) { ++ ft_cq_set_wait_attr(); ++ cq_attr.size = 0; ++ ++ if (opts.tx_cq_size) ++ cq_attr.size += opts.tx_cq_size; ++ else ++ cq_attr.size += fi->tx_attr->size; ++ ++ if (opts.rx_cq_size) ++ cq_attr.size += opts.rx_cq_size; ++ else ++ cq_attr.size += fi->rx_attr->size; ++ ++ ret = fi_cq_open(domain, &cq_attr, &txcq, &txcq); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ rxcq = txcq; ++ } ++ ++ if (!(opts.options & FT_OPT_CQ_SHARED)) { ++ ft_cq_set_wait_attr(); ++ if (opts.tx_cq_size) ++ cq_attr.size = opts.tx_cq_size; ++ else ++ cq_attr.size = fi->tx_attr->size; ++ ++ ret = fi_cq_open(domain, &cq_attr, &txcq, &txcq); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ if (opts.options & FT_OPT_TX_CNTR) { ++ ret = ft_cntr_open(&txcntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ } ++ ++ if (!(opts.options & FT_OPT_CQ_SHARED)) { ++ ft_cq_set_wait_attr(); ++ if (opts.rx_cq_size) ++ cq_attr.size = opts.rx_cq_size; ++ else ++ cq_attr.size = fi->rx_attr->size; ++ ++ ret = fi_cq_open(domain, &cq_attr, &rxcq, &rxcq); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ if (opts.options & FT_OPT_RX_CNTR) { ++ ret = ft_cntr_open(&rxcntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ } ++ ++ if (fi->ep_attr->type == FI_EP_RDM || fi->ep_attr->type == FI_EP_DGRAM) { ++ if (fi->domain_attr->av_type != FI_AV_UNSPEC) ++ av_attr.type = fi->domain_attr->av_type; ++ ++ if (opts.av_name) { ++ av_attr.name = opts.av_name; ++ } ++ av_attr.count = opts.av_size; ++ ret = fi_av_open(domain, &av_attr, &av, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_av_open", ret); ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++int ft_alloc_active_res(struct fi_info *fi) ++{ ++ int ret; ++ ret = ft_alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = fi_endpoint(domain, fi, &ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static void ft_init(void) ++{ ++ tx_seq = 0; ++ rx_seq = 0; ++ tx_cq_cntr = 0; ++ rx_cq_cntr = 0; ++} ++ ++static int ft_init_oob(void) ++{ ++ int ret, op, err; ++ struct addrinfo *ai = NULL; ++ ++ if (!(opts.options & FT_OPT_OOB_SYNC) || oob_sock != -1) ++ return 0; ++ ++ if (!opts.oob_port) ++ opts.oob_port = default_oob_port; ++ ++ if (!opts.dst_addr) { ++ ret = ft_sock_listen(opts.src_addr, opts.oob_port); ++ if (ret) ++ return ret; ++ ++ oob_sock = accept(listen_sock, NULL, 0); ++ if (oob_sock < 0) { ++ perror("accept"); ++ ret = oob_sock; ++ return ret; ++ } ++ ++ close(listen_sock); ++ } else { ++ ++ ret = getaddrinfo(opts.dst_addr, opts.oob_port, NULL, &ai); ++ if (ret) { ++ perror("getaddrinfo"); ++ return ret; ++ } ++ ++ oob_sock = socket(ai->ai_family, SOCK_STREAM, 0); ++ if (oob_sock < 0) { ++ perror("socket"); ++ ret = oob_sock; ++ goto free; ++ } ++ ++ ret = connect(oob_sock, ai->ai_addr, ai->ai_addrlen); ++ if (ret) { ++ perror("connect"); ++ close(oob_sock); ++ goto free; ++ } ++ sleep(1); ++ } ++ ++ op = 1; ++ err = setsockopt(oob_sock, IPPROTO_TCP, TCP_NODELAY, ++ (void *) &op, sizeof(op)); ++ if (err) ++ perror("setsockopt"); /* non-fatal error */ ++ ++free: ++ if (ai) ++ freeaddrinfo(ai); ++ return ret; ++} ++ ++int ft_getinfo(struct fi_info *hints, struct fi_info **info) ++{ ++ char *node, *service; ++ uint64_t flags = 0; ++ int ret; ++ ++ ret = ft_read_addr_opts(&node, &service, hints, &flags, &opts); ++ if (ret) ++ return ret; ++ ++ if (!hints->ep_attr->type) ++ hints->ep_attr->type = FI_EP_RDM; ++ ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, info); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ if (!ft_check_prefix_forced(*info, &opts)) { ++ FT_ERR("Provider disabled requested prefix mode."); ++ return -FI_ENODATA; ++ } ++ ++ return 0; ++} ++ ++int ft_init_fabric_cm(void) ++{ ++ int ret; ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ ++ return ret; ++} ++ ++int ft_start_server(void) ++{ ++ int ret; ++ ++ ft_init(); ++ ret = ft_init_oob(); ++ if (ret) ++ return ret; ++ ++ ret = ft_getinfo(hints, &fi_pep); ++ if (ret) ++ return ret; ++ ++ ret = fi_fabric(fi_pep->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_fabric", ret); ++ return ret; ++ } ++ ++ ret = fi_eq_open(fabric, &eq_attr, &eq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_eq_open", ret); ++ return ret; ++ } ++ ++ ret = fi_passive_ep(fabric, fi_pep, &pep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_passive_ep", ret); ++ return ret; ++ } ++ ++ ret = fi_pep_bind(pep, &eq->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_pep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_listen(pep); ++ if (ret) { ++ FT_PRINTERR("fi_listen", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_complete_connect(struct fid_ep *ep, struct fid_eq *eq) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof(entry), -1, 0); ++ if (rd != sizeof(entry)) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "accept"); ++ ret = (int) rd; ++ return ret; ++ } ++ ++ if (event != FI_CONNECTED || entry.fid != &ep->fid) { ++ fprintf(stderr, "Unexpected CM event %d fid %p (ep %p)\n", ++ event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_retrieve_conn_req(struct fid_eq *eq, struct fi_info **fi) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof(entry), -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "listen"); ++ return (int) rd; ++ } ++ ++ *fi = entry.info; ++ if (event != FI_CONNREQ) { ++ fprintf(stderr, "Unexpected CM event %d\n", event); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_accept_connection(struct fid_ep *ep, struct fid_eq *eq) ++{ ++ int ret; ++ ++ ret = fi_accept(ep, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ return ret; ++ } ++ ++ ret = ft_complete_connect(ep, eq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_server_connect(void) ++{ ++ int ret; ++ ++ ret = ft_retrieve_conn_req(eq, &fi); ++ if (ret) ++ goto err; ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ goto err; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ goto err; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ goto err; ++ ++ ret = ft_accept_connection(ep, eq); ++ if (ret) ++ goto err; ++ ++ return 0; ++ ++err: ++ fi_reject(pep, fi->handle, NULL, 0); ++ return ret; ++} ++ ++int ft_connect_ep(struct fid_ep *ep, ++ struct fid_eq *eq, fi_addr_t *remote_addr) ++{ ++ int ret; ++ ++ ret = fi_connect(ep, remote_addr, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ ret = ft_complete_connect(ep, eq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_client_connect(void) ++{ ++ int ret; ++ ++ ft_init(); ++ ret = ft_init_oob(); ++ if (ret) ++ return ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = ft_connect_ep(ep, eq, fi->dest_addr); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_init_fabric(void) ++{ ++ int ret; ++ ++ ft_init(); ++ ret = ft_init_oob(); ++ if (ret) ++ return ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av(); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_get_cq_fd(struct fid_cq *cq, int *fd) ++{ ++ int ret = FI_SUCCESS; ++ ++ if (cq && opts.comp_method == FT_COMP_WAIT_FD) { ++ ret = fi_control(&cq->fid, FI_GETWAIT, fd); ++ if (ret) ++ FT_PRINTERR("fi_control(FI_GETWAIT)", ret); ++ } ++ ++ return ret; ++} ++ ++int ft_init_alias_ep(uint64_t flags) ++{ ++ int ret; ++ ret = fi_ep_alias(ep, &alias_ep, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_alias", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++int ft_enable_ep(struct fid_ep *ep, struct fid_eq *eq, struct fid_av *av, ++ struct fid_cq *txcq, struct fid_cq *rxcq, ++ struct fid_cntr *txcntr, struct fid_cntr *rxcntr) ++{ ++ uint64_t flags; ++ int ret; ++ ++ if (fi->ep_attr->type == FI_EP_MSG || fi->caps & FI_MULTICAST) ++ FT_EP_BIND(ep, eq, 0); ++ ++ FT_EP_BIND(ep, av, 0); ++ ++ flags = FI_TRANSMIT; ++ if (!(opts.options & FT_OPT_TX_CQ)) ++ flags |= FI_SELECTIVE_COMPLETION; ++ FT_EP_BIND(ep, txcq, flags); ++ ++ flags = FI_RECV; ++ if (!(opts.options & FT_OPT_RX_CQ)) ++ flags |= FI_SELECTIVE_COMPLETION; ++ FT_EP_BIND(ep, rxcq, flags); ++ ++ ret = ft_get_cq_fd(txcq, &tx_fd); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_cq_fd(rxcq, &rx_fd); ++ if (ret) ++ return ret; ++ ++ /* TODO: use control structure to select counter bindings explicitly */ ++ if (opts.options & FT_OPT_TX_CQ) ++ flags = 0; ++ else ++ flags = FI_SEND; ++ if (hints->caps & (FI_WRITE | FI_READ)) ++ flags |= hints->caps & (FI_WRITE | FI_READ); ++ else if (hints->caps & FI_RMA) ++ flags |= FI_WRITE | FI_READ; ++ FT_EP_BIND(ep, txcntr, flags); ++ ++ if (opts.options & FT_OPT_RX_CQ) ++ flags = 0; ++ else ++ flags = FI_RECV; ++ if (hints->caps & (FI_REMOTE_WRITE | FI_REMOTE_READ)) ++ flags |= hints->caps & (FI_REMOTE_WRITE | FI_REMOTE_READ); ++ else if (hints->caps & FI_RMA) ++ flags |= FI_REMOTE_WRITE | FI_REMOTE_READ; ++ FT_EP_BIND(ep, rxcntr, flags); ++ ++ ret = fi_enable(ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_enable_ep_recv(void) ++{ ++ int ret; ++ ++ ret = ft_enable_ep(ep, eq, av, txcq, rxcq, txcntr, rxcntr); ++ if (ret) ++ return ret; ++ ++ if (!ft_check_opts(FT_OPT_SKIP_MSG_ALLOC) && ++ (fi->caps & (FI_MSG | FI_TAGGED))) { ++ /* Initial receive will get remote address for unconnected EPs */ ++ ret = ft_post_rx(ep, MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_join_mc(void) ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ ret = fi_join(ep, fi->dest_addr, 0, &mc, ep->fid.context); ++ if (ret) { ++ FT_PRINTERR("fi_join", ret); ++ return ret; ++ } ++ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "join"); ++ ret = (int) rd; ++ return ret; ++ } ++ ++ if (event != FI_JOIN_COMPLETE || entry.fid != &mc->fid) { ++ fprintf(stderr, "Unexpected join event %d fid %p (mc %p)\n", ++ event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_av_insert(struct fid_av *av, void *addr, size_t count, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ int ret; ++ ++ ret = fi_av_insert(av, addr, count, fi_addr, flags, context); ++ if (ret < 0) { ++ FT_PRINTERR("fi_av_insert", ret); ++ return ret; ++ } else if (ret != count) { ++ FT_ERR("fi_av_insert: number of addresses inserted = %d;" ++ " number of addresses given = %zd\n", ret, count); ++ return -EXIT_FAILURE; ++ } ++ ++ return 0; ++} ++ ++int ft_init_av(void) ++{ ++ return ft_init_av_dst_addr(av, ep, &remote_fi_addr); ++} ++ ++int ft_exchange_addresses_oob(struct fid_av *av_ptr, struct fid_ep *ep_ptr, ++ fi_addr_t *remote_addr) ++{ ++ char buf[FT_MAX_CTRL_MSG]; ++ int ret; ++ size_t addrlen = FT_MAX_CTRL_MSG; ++ ++ ret = fi_getname(&ep_ptr->fid, buf, &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_send(oob_sock, buf, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ ret = ft_sock_recv(oob_sock, buf, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av_ptr, buf, 1, remote_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++/* TODO: retry send for unreliable endpoints */ ++int ft_init_av_dst_addr(struct fid_av *av_ptr, struct fid_ep *ep_ptr, ++ fi_addr_t *remote_addr) ++{ ++ size_t addrlen; ++ int ret; ++ ++ if (opts.oob_port) { ++ ret = ft_exchange_addresses_oob(av_ptr, ep_ptr, remote_addr); ++ if (ret) ++ return ret; ++ else ++ goto set_rx_seq_close; ++ } ++ ++ if (opts.dst_addr) { ++ ret = ft_av_insert(av_ptr, fi->dest_addr, 1, remote_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ addrlen = FT_MAX_CTRL_MSG; ++ ret = fi_getname(&ep_ptr->fid, (char *) tx_buf + ft_tx_prefix_size(), ++ &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = (int) ft_tx(ep, *remote_addr, addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_rx(ep, 1); ++ if (ret) ++ return ret; ++ } else { ++ ret = (int) ft_rx(ep, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ /* Test passing NULL fi_addr on one of the sides (server) if ++ * AV type is FI_AV_TABLE */ ++ ret = ft_av_insert(av_ptr, (char *) rx_buf + ft_rx_prefix_size(), ++ 1, ((fi->domain_attr->av_type == FI_AV_TABLE) ? ++ NULL : remote_addr), 0, NULL); ++ if (ret) ++ return ret; ++ ++ if (fi->domain_attr->av_type == FI_AV_TABLE) ++ *remote_addr = 0; ++ ++ ret = (int) ft_tx(ep, *remote_addr, 1, &tx_ctx); ++ if (ret) ++ return ret; ++ } ++ ++set_rx_seq_close: ++ /* ++ * For a test which does not have MSG or TAGGED ++ * capabilities, but has RMA/Atomics and uses the OOB sync. ++ * If no recv is going to be posted, ++ * then the rx_seq needs to be incremented to wait on the first RMA/Atomic ++ * completion. ++ */ ++ if (!(fi->caps & FI_MSG) && !(fi->caps & FI_TAGGED) && opts.oob_port) ++ rx_seq++; ++ ++ return 0; ++} ++ ++/* TODO: retry send for unreliable endpoints */ ++int ft_init_av_addr(struct fid_av *av_ptr, struct fid_ep *ep_ptr, ++ fi_addr_t *remote_addr) ++{ ++ size_t addrlen; ++ int ret; ++ ++ if (opts.oob_port) ++ return ft_exchange_addresses_oob(av_ptr, ep_ptr, remote_addr); ++ ++ if (opts.dst_addr) { ++ addrlen = FT_MAX_CTRL_MSG; ++ ret = fi_getname(&ep_ptr->fid, (char *) tx_buf + ft_tx_prefix_size(), ++ &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = (int) ft_tx(ep, remote_fi_addr, addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = (int) ft_rx(ep, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av_ptr, (char *) rx_buf + ft_rx_prefix_size(), ++ 1, remote_addr, 0, NULL); ++ if (ret) ++ return ret; ++ } else { ++ ret = (int) ft_rx(ep, FT_MAX_CTRL_MSG); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av_ptr, (char *) rx_buf + ft_rx_prefix_size(), ++ 1, remote_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ addrlen = FT_MAX_CTRL_MSG; ++ ret = fi_getname(&ep_ptr->fid, ++ (char *) tx_buf + ft_tx_prefix_size(), ++ &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = (int) ft_tx(ep, remote_fi_addr, addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_exchange_raw_keys(struct fi_rma_iov *peer_iov) ++{ ++ struct fi_rma_iov *rma_iov; ++ size_t key_size; ++ size_t len; ++ uint64_t addr; ++ int ret; ++ ++ /* Get key size */ ++ key_size = 0; ++ ret = fi_mr_raw_attr(mr, &addr, NULL, &key_size, 0); ++ if (ret != -FI_ETOOSMALL) { ++ return ret; ++ } ++ ++ len = sizeof(*rma_iov) + key_size - sizeof(rma_iov->key); ++ /* TODO: make sure this fits in tx_buf and rx_buf */ ++ ++ if (opts.dst_addr) { ++ rma_iov = (struct fi_rma_iov *) (tx_buf + ft_tx_prefix_size()); ++ if ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR)) { ++ rma_iov->addr = (uintptr_t) rx_buf + ft_rx_prefix_size(); ++ } else { ++ rma_iov->addr = 0; ++ } ++ ++ /* Get raw attributes */ ++ ret = fi_mr_raw_attr(mr, &addr, (uint8_t *) &rma_iov->key, ++ &key_size, 0); ++ if (ret) ++ return ret; ++ ++ ret = ft_tx(ep, remote_fi_addr, len, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (rx_buf + ft_rx_prefix_size()); ++ peer_iov->addr = rma_iov->addr; ++ peer_iov->len = rma_iov->len; ++ /* Map remote mr raw locally */ ++ ret = fi_mr_map_raw(domain, rma_iov->addr, ++ (uint8_t *) &rma_iov->key, key_size, ++ &peer_iov->key, 0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ } else { ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (rx_buf + ft_rx_prefix_size()); ++ peer_iov->addr = rma_iov->addr; ++ peer_iov->len = rma_iov->len; ++ /* Map remote mr raw locally */ ++ ret = fi_mr_map_raw(domain, rma_iov->addr, ++ (uint8_t *) &rma_iov->key, key_size, ++ &peer_iov->key, 0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (tx_buf + ft_tx_prefix_size()); ++ if ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR)) { ++ rma_iov->addr = (uintptr_t) rx_buf + ft_rx_prefix_size(); ++ } else { ++ rma_iov->addr = 0; ++ } ++ ++ /* Get raw attributes */ ++ ret = fi_mr_raw_attr(mr, &addr, (uint8_t *) &rma_iov->key, ++ &key_size, 0); ++ if (ret) ++ return ret; ++ ++ ret = ft_tx(ep, remote_fi_addr, len, &tx_ctx); ++ } ++ ++ return ret; ++} ++ ++int ft_exchange_keys(struct fi_rma_iov *peer_iov) ++{ ++ struct fi_rma_iov *rma_iov; ++ int ret; ++ ++ if (fi->domain_attr->mr_mode & FI_MR_RAW) ++ return ft_exchange_raw_keys(peer_iov); ++ ++ if (opts.dst_addr) { ++ rma_iov = (struct fi_rma_iov *) (tx_buf + ft_tx_prefix_size()); ++ if ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR)) { ++ rma_iov->addr = (uintptr_t) rx_buf + ft_rx_prefix_size(); ++ } else { ++ rma_iov->addr = 0; ++ } ++ rma_iov->key = fi_mr_key(mr); ++ ret = ft_tx(ep, remote_fi_addr, sizeof *rma_iov, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (rx_buf + ft_rx_prefix_size()); ++ *peer_iov = *rma_iov; ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ } else { ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (rx_buf + ft_rx_prefix_size()); ++ *peer_iov = *rma_iov; ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ if (ret) ++ return ret; ++ ++ rma_iov = (struct fi_rma_iov *) (tx_buf + ft_tx_prefix_size()); ++ if ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR)) { ++ rma_iov->addr = (uintptr_t) rx_buf + ft_rx_prefix_size(); ++ } else { ++ rma_iov->addr = 0; ++ } ++ rma_iov->key = fi_mr_key(mr); ++ ret = ft_tx(ep, remote_fi_addr, sizeof *rma_iov, &tx_ctx); ++ } ++ ++ return ret; ++} ++ ++static void ft_close_fids(void) ++{ ++ if (mr != &no_mr) ++ FT_CLOSE_FID(mr); ++ FT_CLOSE_FID(mc); ++ FT_CLOSE_FID(alias_ep); ++ FT_CLOSE_FID(ep); ++ FT_CLOSE_FID(pep); ++ FT_CLOSE_FID(pollset); ++ if (opts.options & FT_OPT_CQ_SHARED) { ++ FT_CLOSE_FID(txcq); ++ } else { ++ FT_CLOSE_FID(rxcq); ++ FT_CLOSE_FID(txcq); ++ } ++ FT_CLOSE_FID(rxcntr); ++ FT_CLOSE_FID(txcntr); ++ FT_CLOSE_FID(av); ++ FT_CLOSE_FID(eq); ++ FT_CLOSE_FID(domain); ++ FT_CLOSE_FID(waitset); ++ FT_CLOSE_FID(fabric); ++} ++ ++void ft_free_res(void) ++{ ++ ft_close_fids(); ++ ++ free(tx_ctx_arr); ++ free(rx_ctx_arr); ++ tx_ctx_arr = NULL; ++ rx_ctx_arr = NULL; ++ ++ if (buf) { ++ free(buf); ++ buf = rx_buf = tx_buf = NULL; ++ buf_size = rx_size = tx_size = 0; ++ } ++ if (fi_pep) { ++ fi_freeinfo(fi_pep); ++ fi_pep = NULL; ++ } ++ if (fi) { ++ fi_freeinfo(fi); ++ fi = NULL; ++ } ++ if (hints) { ++ fi_freeinfo(hints); ++ hints = NULL; ++ } ++} ++ ++static int dupaddr(void **dst_addr, size_t *dst_addrlen, ++ void *src_addr, size_t src_addrlen) ++{ ++ *dst_addr = malloc(src_addrlen); ++ if (!*dst_addr) { ++ FT_ERR("address allocation failed"); ++ return EAI_MEMORY; ++ } ++ *dst_addrlen = src_addrlen; ++ memcpy(*dst_addr, src_addr, src_addrlen); ++ return 0; ++} ++ ++static int getaddr(char *node, char *service, ++ struct fi_info *hints, uint64_t flags) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ if (!node && !service) { ++ if (flags & FI_SOURCE) { ++ hints->src_addr = NULL; ++ hints->src_addrlen = 0; ++ } else { ++ hints->dest_addr = NULL; ++ hints->dest_addrlen = 0; ++ } ++ return 0; ++ } ++ ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ hints->addr_format = fi->addr_format; ++ ++ if (flags & FI_SOURCE) { ++ ret = dupaddr(&hints->src_addr, &hints->src_addrlen, ++ fi->src_addr, fi->src_addrlen); ++ } else { ++ ret = dupaddr(&hints->dest_addr, &hints->dest_addrlen, ++ fi->dest_addr, fi->dest_addrlen); ++ } ++ ++ fi_freeinfo(fi); ++ return ret; ++} ++ ++int ft_getsrcaddr(char *node, char *service, struct fi_info *hints) ++{ ++ return getaddr(node, service, hints, FI_SOURCE); ++} ++ ++int ft_read_addr_opts(char **node, char **service, struct fi_info *hints, ++ uint64_t *flags, struct ft_opts *opts) ++{ ++ int ret; ++ ++ if (opts->dst_addr) { ++ if (!opts->dst_port) ++ opts->dst_port = default_port; ++ ++ ret = ft_getsrcaddr(opts->src_addr, opts->src_port, hints); ++ if (ret) ++ return ret; ++ *node = opts->dst_addr; ++ *service = opts->dst_port; ++ } else { ++ if (!opts->src_port) ++ opts->src_port = default_port; ++ ++ *node = opts->src_addr; ++ *service = opts->src_port; ++ *flags = FI_SOURCE; ++ } ++ ++ return 0; ++} ++ ++char *size_str(char str[FT_STR_LEN], long long size) ++{ ++ long long base, fraction = 0; ++ char mag; ++ ++ memset(str, '\0', FT_STR_LEN); ++ ++ if (size >= (1 << 30)) { ++ base = 1 << 30; ++ mag = 'g'; ++ } else if (size >= (1 << 20)) { ++ base = 1 << 20; ++ mag = 'm'; ++ } else if (size >= (1 << 10)) { ++ base = 1 << 10; ++ mag = 'k'; ++ } else { ++ base = 1; ++ mag = '\0'; ++ } ++ ++ if (size / base < 10) ++ fraction = (size % base) * 10 / base; ++ ++ if (fraction) ++ snprintf(str, FT_STR_LEN, "%lld.%lld%c", size / base, fraction, mag); ++ else ++ snprintf(str, FT_STR_LEN, "%lld%c", size / base, mag); ++ ++ return str; ++} ++ ++char *cnt_str(char str[FT_STR_LEN], long long cnt) ++{ ++ if (cnt >= 1000000000) ++ snprintf(str, FT_STR_LEN, "%lldb", cnt / 1000000000); ++ else if (cnt >= 1000000) ++ snprintf(str, FT_STR_LEN, "%lldm", cnt / 1000000); ++ else if (cnt >= 1000) ++ snprintf(str, FT_STR_LEN, "%lldk", cnt / 1000); ++ else ++ snprintf(str, FT_STR_LEN, "%lld", cnt); ++ ++ return str; ++} ++ ++int size_to_count(int size) ++{ ++ if (size >= (1 << 20)) ++ return (opts.options & FT_OPT_BW) ? 200 : 100; ++ else if (size >= (1 << 16)) ++ return (opts.options & FT_OPT_BW) ? 2000 : 1000; ++ else ++ return (opts.options & FT_OPT_BW) ? 20000: 10000; ++} ++ ++static const size_t datatype_size_table[] = { ++ [FI_INT8] = sizeof(int8_t), ++ [FI_UINT8] = sizeof(uint8_t), ++ [FI_INT16] = sizeof(int16_t), ++ [FI_UINT16] = sizeof(uint16_t), ++ [FI_INT32] = sizeof(int32_t), ++ [FI_UINT32] = sizeof(uint32_t), ++ [FI_INT64] = sizeof(int64_t), ++ [FI_UINT64] = sizeof(uint64_t), ++ [FI_FLOAT] = sizeof(float), ++ [FI_DOUBLE] = sizeof(double), ++ [FI_FLOAT_COMPLEX] = sizeof(OFI_COMPLEX(float)), ++ [FI_DOUBLE_COMPLEX] = sizeof(OFI_COMPLEX(double)), ++ [FI_LONG_DOUBLE] = sizeof(long double), ++ [FI_LONG_DOUBLE_COMPLEX] = sizeof(OFI_COMPLEX(long_double)), ++}; ++ ++size_t datatype_to_size(enum fi_datatype datatype) ++{ ++ if (datatype >= FI_DATATYPE_LAST) ++ return 0; ++ ++ return datatype_size_table[datatype]; ++} ++ ++void init_test(struct ft_opts *opts, char *test_name, size_t test_name_len) ++{ ++ char sstr[FT_STR_LEN]; ++ ++ size_str(sstr, opts->transfer_size); ++ if (!strcmp(test_name, "custom")) ++ snprintf(test_name, test_name_len, "%s_lat", sstr); ++ if (!(opts->options & FT_OPT_ITER)) ++ opts->iterations = size_to_count(opts->transfer_size); ++} ++ ++static int ft_progress(struct fid_cq *cq, uint64_t total, uint64_t *cq_cntr) ++{ ++ struct fi_cq_err_entry comp; ++ int ret; ++ ++ ret = fi_cq_read(cq, &comp, 1); ++ if (ret > 0) ++ (*cq_cntr)++; ++ ++ if (ret >= 0 || ret == -FI_EAGAIN) ++ return 0; ++ ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(cq); ++ (*cq_cntr)++; ++ } else { ++ FT_PRINTERR("fi_cq_read/sread", ret); ++ } ++ return ret; ++} ++ ++#define FT_POST(post_fn, progress_fn, cq, seq, cq_cntr, op_str, ...) \ ++ do { \ ++ int timeout_save; \ ++ int ret, rc; \ ++ \ ++ while (1) { \ ++ ret = post_fn(__VA_ARGS__); \ ++ if (!ret) \ ++ break; \ ++ \ ++ if (ret != -FI_EAGAIN) { \ ++ FT_PRINTERR(op_str, ret); \ ++ return ret; \ ++ } \ ++ \ ++ timeout_save = timeout; \ ++ timeout = 0; \ ++ rc = progress_fn(cq, seq, cq_cntr); \ ++ if (rc && rc != -FI_EAGAIN) { \ ++ FT_ERR("Failed to get " op_str " completion"); \ ++ return rc; \ ++ } \ ++ timeout = timeout_save; \ ++ } \ ++ seq++; \ ++ } while (0) ++ ++ssize_t ft_post_tx_buf(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, ++ uint64_t data, struct fi_context* ctx, ++ void *op_buf, void *op_mr_desc, uint64_t op_tag) ++{ ++ size += ft_tx_prefix_size(); ++ if (hints->caps & FI_TAGGED) { ++ op_tag = op_tag ? op_tag : tx_seq; ++ if (data != NO_CQ_DATA) { ++ FT_POST(fi_tsenddata, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "transmit", ep, op_buf, size, ++ op_mr_desc, data, fi_addr, op_tag, ctx); ++ } else { ++ FT_POST(fi_tsend, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "transmit", ep, op_buf, size, ++ op_mr_desc, fi_addr, op_tag, ctx); ++ } ++ } else { ++ if (data != NO_CQ_DATA) { ++ FT_POST(fi_senddata, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "transmit", ep, op_buf, size, ++ op_mr_desc, data, fi_addr, ctx); ++ ++ } else { ++ FT_POST(fi_send, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "transmit", ep, op_buf, size, ++ op_mr_desc, fi_addr, ctx); ++ } ++ } ++ return 0; ++} ++ ++ssize_t ft_post_tx(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, ++ uint64_t data, struct fi_context* ctx) ++{ ++ return ft_post_tx_buf(ep, fi_addr, size, data, ++ ctx, tx_buf, mr_desc, ft_tag); ++} ++ ++ssize_t ft_tx(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, struct fi_context *ctx) ++{ ++ ssize_t ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA | FT_OPT_ACTIVE)) ++ ft_fill_buf((char *) tx_buf + ft_tx_prefix_size(), size); ++ ++ ret = ft_post_tx(ep, fi_addr, size, NO_CQ_DATA, ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ return ret; ++} ++ ++ssize_t ft_post_inject(struct fid_ep *ep, fi_addr_t fi_addr, size_t size) ++{ ++ if (hints->caps & FI_TAGGED) { ++ FT_POST(fi_tinject, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "inject", ep, tx_buf, size + ft_tx_prefix_size(), ++ fi_addr, tx_seq); ++ } else { ++ FT_POST(fi_inject, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "inject", ep, tx_buf, size + ft_tx_prefix_size(), ++ fi_addr); ++ } ++ ++ tx_cq_cntr++; ++ return 0; ++} ++ ++ssize_t ft_inject(struct fid_ep *ep, fi_addr_t fi_addr, size_t size) ++{ ++ ssize_t ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA | FT_OPT_ACTIVE)) ++ ft_fill_buf((char *) tx_buf + ft_tx_prefix_size(), size); ++ ++ ret = ft_post_inject(ep, fi_addr, size); ++ if (ret) ++ return ret; ++ ++ return ret; ++} ++ ++ssize_t ft_post_rma(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote, void *context) ++{ ++ switch (op) { ++ case FT_RMA_WRITE: ++ FT_POST(fi_write, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_write", ep, tx_buf, opts.transfer_size, mr_desc, ++ remote_fi_addr, remote->addr, remote->key, context); ++ break; ++ case FT_RMA_WRITEDATA: ++ FT_POST(fi_writedata, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_writedata", ep, tx_buf, opts.transfer_size, mr_desc, ++ remote_cq_data, remote_fi_addr, remote->addr, ++ remote->key, context); ++ break; ++ case FT_RMA_READ: ++ FT_POST(fi_read, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_read", ep, rx_buf, opts.transfer_size, mr_desc, ++ remote_fi_addr, remote->addr,remote->key, context); ++ break; ++ default: ++ FT_ERR("Unknown RMA op type\n"); ++ return EXIT_FAILURE; ++ } ++ ++ return 0; ++} ++ ++ssize_t ft_rma(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote, void *context) ++{ ++ int ret; ++ ++ ret = ft_post_rma(op, ep, size, remote, context); ++ if (ret) ++ return ret; ++ ++ if (op == FT_RMA_WRITEDATA) { ++ if (fi->rx_attr->mode & FI_RX_CQ_DATA) { ++ ret = ft_rx(ep, 0); ++ } else { ++ ret = ft_get_rx_comp(rx_seq); ++ /* Just increment the seq # instead of posting recv so ++ * that we wait for remote write completion on the next ++ * iteration. */ ++ rx_seq++; ++ } ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++ssize_t ft_post_rma_inject(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote) ++{ ++ switch (op) { ++ case FT_RMA_WRITE: ++ FT_POST(fi_inject_write, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_inject_write", ep, tx_buf, opts.transfer_size, ++ remote_fi_addr, remote->addr, remote->key); ++ break; ++ case FT_RMA_WRITEDATA: ++ FT_POST(fi_inject_writedata, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "fi_inject_writedata", ep, tx_buf, ++ opts.transfer_size, remote_cq_data, remote_fi_addr, ++ remote->addr, remote->key); ++ break; ++ default: ++ FT_ERR("Unknown RMA inject op type\n"); ++ return EXIT_FAILURE; ++ } ++ ++ tx_cq_cntr++; ++ return 0; ++} ++ ++ssize_t ft_post_atomic(enum ft_atomic_opcodes opcode, struct fid_ep *ep, ++ void *compare, void *compare_desc, void *result, ++ void *result_desc, struct fi_rma_iov *remote, ++ enum fi_datatype datatype, enum fi_op atomic_op, ++ void *context) ++{ ++ size_t size, count; ++ ++ size = datatype_to_size(datatype); ++ if (!size) { ++ FT_ERR("Unknown datatype\n"); ++ return EXIT_FAILURE; ++ } ++ count = opts.transfer_size / size; ++ ++ switch (opcode) { ++ case FT_ATOMIC_BASE: ++ FT_POST(fi_atomic, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_atomic", ep, buf, count, mr_desc, remote_fi_addr, ++ remote->addr, remote->key, datatype, atomic_op, context); ++ break; ++ case FT_ATOMIC_FETCH: ++ FT_POST(fi_fetch_atomic, ft_progress, txcq, tx_seq, &tx_cq_cntr, ++ "fi_fetch_atomic", ep, buf, count, mr_desc, result, ++ result_desc, remote_fi_addr, remote->addr, remote->key, ++ datatype, atomic_op, context); ++ break; ++ case FT_ATOMIC_COMPARE: ++ FT_POST(fi_compare_atomic, ft_progress, txcq, tx_seq, ++ &tx_cq_cntr, "fi_compare_atomic", ep, buf, count, ++ mr_desc, compare, compare_desc, result, result_desc, ++ remote_fi_addr, remote->addr, remote->key, datatype, ++ atomic_op, context); ++ break; ++ default: ++ FT_ERR("Unknown atomic opcode\n"); ++ return EXIT_FAILURE; ++ } ++ ++ return 0; ++} ++ ++static int check_atomic_attr(enum fi_op op, enum fi_datatype datatype, ++ uint64_t flags) ++{ ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = fi_query_atomic(domain, datatype, op, &attr, flags); ++ if (ret) { ++ FT_PRINTERR("fi_query_atomic", ret); ++ return ret; ++ } ++ ++ if (attr.size != datatype_to_size(datatype)) { ++ fprintf(stderr, "Provider atomic size mismatch\n"); ++ return -FI_ENOSYS; ++ } ++ ++ return 0; ++} ++ ++int check_base_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count) ++{ ++ int ret; ++ ++ ret = fi_atomicvalid(endpoint, datatype, op, count); ++ if (ret) ++ return ret; ++ ++ return check_atomic_attr(op, datatype, 0); ++} ++ ++int check_fetch_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count) ++{ ++ int ret; ++ ++ ret = fi_fetch_atomicvalid(endpoint, datatype, op, count); ++ if (ret) ++ return ret; ++ ++ return check_atomic_attr(op, datatype, FI_FETCH_ATOMIC); ++} ++ ++int check_compare_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count) ++{ ++ int ret; ++ ++ ret = fi_compare_atomicvalid(endpoint, datatype, op, count); ++ if (ret) ++ return ret; ++ ++ return check_atomic_attr(op, datatype, FI_COMPARE_ATOMIC); ++} ++ ++ssize_t ft_post_rx_buf(struct fid_ep *ep, size_t size, struct fi_context* ctx, ++ void *op_buf, void *op_mr_desc, uint64_t op_tag) ++{ ++ size = MAX(size, FT_MAX_CTRL_MSG) + ft_rx_prefix_size(); ++ if (hints->caps & FI_TAGGED) { ++ op_tag = op_tag ? op_tag : rx_seq; ++ FT_POST(fi_trecv, ft_progress, rxcq, rx_seq, &rx_cq_cntr, ++ "receive", ep, op_buf, size, op_mr_desc, 0, op_tag, ++ 0, ctx); ++ } else { ++ FT_POST(fi_recv, ft_progress, rxcq, rx_seq, &rx_cq_cntr, ++ "receive", ep, op_buf, size, op_mr_desc, 0, ctx); ++ } ++ return 0; ++} ++ ++ssize_t ft_post_rx(struct fid_ep *ep, size_t size, struct fi_context* ctx) ++{ ++ return ft_post_rx_buf(ep, size, ctx, rx_buf, mr_desc, ft_tag); ++} ++ ++ssize_t ft_rx(struct fid_ep *ep, size_t size) ++{ ++ ssize_t ret; ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA | FT_OPT_ACTIVE)) { ++ ret = ft_check_buf((char *) rx_buf + ft_rx_prefix_size(), size); ++ if (ret) ++ return ret; ++ } ++ /* TODO: verify CQ data, if available */ ++ ++ /* Ignore the size arg. Post a buffer large enough to handle all message ++ * sizes. ft_sync() makes use of ft_rx() and gets called in tests just before ++ * message size is updated. The recvs posted are always for the next incoming ++ * message */ ++ ret = ft_post_rx(ep, rx_size, &rx_ctx); ++ return ret; ++} ++ ++/* ++ * Received messages match tagged buffers in order, but the completions can be ++ * reported out of order. A tag is valid if it's within the current window. ++ */ ++static inline int ++ft_tag_is_valid(struct fid_cq * cq, struct fi_cq_err_entry *comp, uint64_t tag) ++{ ++ int valid = 1; ++ ++ if ((hints->caps & FI_TAGGED) && (cq == rxcq)) { ++ if (opts.options & FT_OPT_BW) { ++ /* valid: (tag - window) < comp->tag < (tag + window) */ ++ valid = (tag < comp->tag + opts.window_size) && ++ (comp->tag < tag + opts.window_size); ++ } else { ++ valid = (comp->tag == tag); ++ } ++ ++ if (!valid) { ++ FT_ERR("Tag mismatch!. Expected: %"PRIu64", actual: %" ++ PRIu64, tag, comp->tag); ++ } ++ } ++ ++ return valid; ++} ++/* ++ * fi_cq_err_entry can be cast to any CQ entry format. ++ */ ++static int ft_spin_for_comp(struct fid_cq *cq, uint64_t *cur, ++ uint64_t total, int timeout) ++{ ++ struct fi_cq_err_entry comp; ++ struct timespec a, b; ++ int ret; ++ ++ if (timeout >= 0) ++ clock_gettime(CLOCK_MONOTONIC, &a); ++ ++ do { ++ ret = fi_cq_read(cq, &comp, 1); ++ if (ret > 0) { ++ if (timeout >= 0) ++ clock_gettime(CLOCK_MONOTONIC, &a); ++ if (!ft_tag_is_valid(cq, &comp, ft_tag ? ft_tag : rx_cq_cntr)) ++ return -FI_EOTHER; ++ (*cur)++; ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ return ret; ++ } else if (timeout >= 0) { ++ clock_gettime(CLOCK_MONOTONIC, &b); ++ if ((b.tv_sec - a.tv_sec) > timeout) { ++ fprintf(stderr, "%ds timeout expired\n", timeout); ++ return -FI_ENODATA; ++ } ++ } ++ } while (total - *cur > 0); ++ ++ return 0; ++} ++ ++/* ++ * fi_cq_err_entry can be cast to any CQ entry format. ++ */ ++static int ft_wait_for_comp(struct fid_cq *cq, uint64_t *cur, ++ uint64_t total, int timeout) ++{ ++ struct fi_cq_err_entry comp; ++ int ret; ++ ++ while (total - *cur > 0) { ++ ret = fi_cq_sread(cq, &comp, 1, NULL, timeout); ++ if (ret > 0) { ++ if (!ft_tag_is_valid(cq, &comp, ft_tag ? ft_tag : rx_cq_cntr)) ++ return -FI_EOTHER; ++ (*cur)++; ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++/* ++ * fi_cq_err_entry can be cast to any CQ entry format. ++ */ ++static int ft_fdwait_for_comp(struct fid_cq *cq, uint64_t *cur, ++ uint64_t total, int timeout) ++{ ++ struct fi_cq_err_entry comp; ++ struct fid *fids[1]; ++ int fd, ret; ++ ++ fd = cq == txcq ? tx_fd : rx_fd; ++ fids[0] = &cq->fid; ++ ++ while (total - *cur > 0) { ++ ret = fi_trywait(fabric, fids, 1); ++ if (ret == FI_SUCCESS) { ++ ret = ft_poll_fd(fd, timeout); ++ if (ret && ret != -FI_EAGAIN) ++ return ret; ++ } ++ ++ ret = fi_cq_read(cq, &comp, 1); ++ if (ret > 0) { ++ if (!ft_tag_is_valid(cq, &comp, ft_tag ? ft_tag : rx_cq_cntr)) ++ return -FI_EOTHER; ++ (*cur)++; ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int ft_get_cq_comp(struct fid_cq *cq, uint64_t *cur, ++ uint64_t total, int timeout) ++{ ++ int ret; ++ ++ switch (opts.comp_method) { ++ case FT_COMP_SREAD: ++ ret = ft_wait_for_comp(cq, cur, total, timeout); ++ break; ++ case FT_COMP_WAIT_FD: ++ ret = ft_fdwait_for_comp(cq, cur, total, timeout); ++ break; ++ default: ++ ret = ft_spin_for_comp(cq, cur, total, timeout); ++ break; ++ } ++ ++ if (ret) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(cq); ++ (*cur)++; ++ } else { ++ FT_PRINTERR("ft_get_cq_comp", ret); ++ } ++ } ++ return ret; ++} ++ ++static int ft_spin_for_cntr(struct fid_cntr *cntr, uint64_t total, int timeout) ++{ ++ struct timespec a, b; ++ uint64_t cur; ++ ++ if (timeout >= 0) ++ clock_gettime(CLOCK_MONOTONIC, &a); ++ ++ for (;;) { ++ cur = fi_cntr_read(cntr); ++ if (cur >= total) ++ return 0; ++ ++ if (timeout >= 0) { ++ clock_gettime(CLOCK_MONOTONIC, &b); ++ if ((b.tv_sec - a.tv_sec) > timeout) ++ break; ++ } ++ } ++ ++ fprintf(stderr, "%ds timeout expired\n", timeout); ++ return -FI_ENODATA; ++} ++ ++static int ft_wait_for_cntr(struct fid_cntr *cntr, uint64_t total, int timeout) ++{ ++ int ret; ++ ++ while (fi_cntr_read(cntr) < total) { ++ ret = fi_cntr_wait(cntr, total, timeout); ++ if (ret) ++ FT_PRINTERR("fi_cntr_wait", ret); ++ else ++ break; ++ } ++ return 0; ++} ++ ++static int ft_get_cntr_comp(struct fid_cntr *cntr, uint64_t total, int timeout) ++{ ++ int ret = 0; ++ ++ switch (opts.comp_method) { ++ case FT_COMP_SREAD: ++ case FT_COMP_WAITSET: ++ case FT_COMP_WAIT_FD: ++ ret = ft_wait_for_cntr(cntr, total, timeout); ++ break; ++ default: ++ ret = ft_spin_for_cntr(cntr, total, timeout); ++ break; ++ } ++ ++ if (ret) ++ FT_PRINTERR("fs_get_cntr_comp", ret); ++ ++ return ret; ++} ++ ++int ft_get_rx_comp(uint64_t total) ++{ ++ int ret = FI_SUCCESS; ++ ++ if (opts.options & FT_OPT_RX_CQ) { ++ ret = ft_get_cq_comp(rxcq, &rx_cq_cntr, total, timeout); ++ } else if (rxcntr) { ++ ret = ft_get_cntr_comp(rxcntr, total, timeout); ++ } else { ++ FT_ERR("Trying to get a RX completion when no RX CQ or counter were opened"); ++ ret = -FI_EOTHER; ++ } ++ return ret; ++} ++ ++int ft_get_tx_comp(uint64_t total) ++{ ++ int ret; ++ ++ if (opts.options & FT_OPT_TX_CQ) { ++ ret = ft_get_cq_comp(txcq, &tx_cq_cntr, total, -1); ++ } else if (txcntr) { ++ ret = ft_get_cntr_comp(txcntr, total, -1); ++ } else { ++ FT_ERR("Trying to get a TX completion when no TX CQ or counter were opened"); ++ ret = -FI_EOTHER; ++ } ++ return ret; ++} ++ ++int ft_sendmsg(struct fid_ep *ep, fi_addr_t fi_addr, ++ size_t size, struct fi_context *ctx, int flags) ++{ ++ int ret; ++ struct fi_msg msg; ++ struct fi_msg_tagged tagged_msg; ++ struct iovec msg_iov; ++ ++ msg_iov.iov_base = tx_buf; ++ msg_iov.iov_len = size; ++ ++ if (hints->caps & FI_TAGGED) { ++ tagged_msg.msg_iov = &msg_iov; ++ tagged_msg.desc = &mr_desc; ++ tagged_msg.iov_count = 1; ++ tagged_msg.addr = fi_addr; ++ tagged_msg.data = NO_CQ_DATA; ++ tagged_msg.context = ctx; ++ tagged_msg.tag = ft_tag ? ft_tag : tx_seq; ++ tagged_msg.ignore = 0; ++ ++ ret = fi_tsendmsg(ep, &tagged_msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_tsendmsg", ret); ++ return ret; ++ } ++ } else { ++ msg.msg_iov = &msg_iov; ++ msg.desc = &mr_desc; ++ msg.iov_count = 1; ++ msg.addr = fi_addr; ++ msg.data = NO_CQ_DATA; ++ msg.context = ctx; ++ ++ ret = fi_sendmsg(ep, &msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_sendmsg", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++int ft_recvmsg(struct fid_ep *ep, fi_addr_t fi_addr, ++ size_t size, struct fi_context *ctx, int flags) ++{ ++ int ret; ++ struct fi_msg msg; ++ struct fi_msg_tagged tagged_msg; ++ struct iovec msg_iov; ++ ++ msg_iov.iov_base = rx_buf; ++ msg_iov.iov_len = size; ++ ++ if (hints->caps & FI_TAGGED) { ++ tagged_msg.msg_iov = &msg_iov; ++ tagged_msg.desc = &mr_desc; ++ tagged_msg.iov_count = 1; ++ tagged_msg.addr = fi_addr; ++ tagged_msg.data = NO_CQ_DATA; ++ tagged_msg.context = ctx; ++ tagged_msg.tag = ft_tag ? ft_tag : tx_seq; ++ tagged_msg.ignore = 0; ++ ++ ret = fi_trecvmsg(ep, &tagged_msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_trecvmsg", ret); ++ return ret; ++ } ++ } else { ++ msg.msg_iov = &msg_iov; ++ msg.desc = &mr_desc; ++ msg.iov_count = 1; ++ msg.addr = fi_addr; ++ msg.data = NO_CQ_DATA; ++ msg.context = ctx; ++ ++ ret = fi_recvmsg(ep, &msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_recvmsg", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++int ft_cq_read_verify(struct fid_cq *cq, void *op_context) ++{ ++ int ret; ++ struct fi_cq_err_entry completion; ++ ++ do { ++ /* read events from the completion queue */ ++ ret = fi_cq_read(cq, (void *)&completion, 1); ++ ++ if (ret > 0) { ++ if (op_context != completion.op_context) { ++ fprintf(stderr, "ERROR: op ctx=%p cq_ctx=%p\n", ++ op_context, completion.op_context); ++ return -FI_EOTHER; ++ } ++ if (!ft_tag_is_valid(cq, &completion, ++ ft_tag ? ft_tag : rx_cq_cntr)) ++ return -FI_EOTHER; ++ } else if ((ret <= 0) && (ret != -FI_EAGAIN)) { ++ FT_PRINTERR("POLL: Error\n", ret); ++ if (ret == -FI_EAVAIL) ++ FT_PRINTERR("POLL: error available\n", ret); ++ return -FI_EOTHER; ++ } ++ } while (ret == -FI_EAGAIN); ++ ++ return 0; ++} ++ ++int ft_cq_readerr(struct fid_cq *cq) ++{ ++ struct fi_cq_err_entry cq_err; ++ int ret; ++ ++ memset(&cq_err, 0, sizeof(cq_err)); ++ ret = fi_cq_readerr(cq, &cq_err, 0); ++ if (ret < 0) { ++ FT_PRINTERR("fi_cq_readerr", ret); ++ } else { ++ FT_CQ_ERR(cq, cq_err, NULL, 0); ++ ret = -cq_err.err; ++ } ++ return ret; ++} ++ ++void eq_readerr(struct fid_eq *eq, const char *eq_str) ++{ ++ struct fi_eq_err_entry eq_err; ++ int rd; ++ ++ memset(&eq_err, 0, sizeof(eq_err)); ++ rd = fi_eq_readerr(eq, &eq_err, 0); ++ if (rd != sizeof(eq_err)) { ++ FT_PRINTERR("fi_eq_readerr", rd); ++ } else { ++ FT_EQ_ERR(eq, eq_err, NULL, 0); ++ } ++} ++ ++int ft_sync() ++{ ++ char buf; ++ int ret; ++ ++ if (opts.dst_addr) { ++ if (!opts.oob_port) { ++ ret = ft_tx(ep, remote_fi_addr, 1, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_rx(ep, 1); ++ } else { ++ ret = ft_sock_send(oob_sock, &buf, 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_sock_recv(oob_sock, &buf, 1); ++ if (ret) ++ return ret; ++ } ++ } else { ++ if (!opts.oob_port) { ++ ret = ft_rx(ep, 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_tx(ep, remote_fi_addr, 1, &tx_ctx); ++ } else { ++ ret = ft_sock_recv(oob_sock, &buf, 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_sock_send(oob_sock, &buf, 1); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ return ret; ++} ++ ++int ft_sync_pair(int status) ++{ ++ int ret; ++ int pair_status; ++ ++ if (ft_parent_proc) { ++ ret = write(ft_socket_pair[1], &status, sizeof(int)); ++ if (ret < 0) { ++ FT_PRINTERR("write", errno); ++ return ret; ++ } ++ ret = read(ft_socket_pair[1], &pair_status, sizeof(int)); ++ if (ret < 0) { ++ FT_PRINTERR("read", errno); ++ return ret; ++ } ++ } else { ++ ret = read(ft_socket_pair[0], &pair_status, sizeof(int)); ++ if (ret < 0) { ++ FT_PRINTERR("read", errno); ++ return ret; ++ } ++ ret = write(ft_socket_pair[0], &status, sizeof(int)); ++ if (ret < 0) { ++ FT_PRINTERR("write", errno); ++ return ret; ++ } ++ } ++ ++ /* check status reported the other guy */ ++ if (pair_status != FI_SUCCESS) ++ return pair_status; ++ ++ return 0; ++} ++ ++int ft_fork_and_pair(void) ++{ ++ int ret; ++ ++ ret = socketpair(AF_LOCAL, SOCK_STREAM, 0, ft_socket_pair); ++ if (ret) { ++ FT_PRINTERR("socketpair", errno); ++ return -errno; ++ } ++ ++ ft_child_pid = fork(); ++ if (ft_child_pid < 0) { ++ FT_PRINTERR("fork", ft_child_pid); ++ return -errno; ++ } ++ if (ft_child_pid) ++ ft_parent_proc = 1; ++ ++ return 0; ++} ++ ++int ft_wait_child(void) ++{ ++ int ret; ++ ++ ret = close(ft_socket_pair[0]); ++ if (ret) { ++ FT_PRINTERR("close", errno); ++ return ret; ++ } ++ ret = close(ft_socket_pair[1]); ++ if (ret) { ++ FT_PRINTERR("close", errno); ++ return ret; ++ } ++ if (ft_parent_proc) { ++ ret = waitpid(ft_child_pid, NULL, WCONTINUED); ++ if (ret < 0) { ++ FT_PRINTERR("waitpid", errno); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++int ft_finalize_ep(struct fid_ep *ep) ++{ ++ struct iovec iov; ++ int ret; ++ struct fi_context ctx; ++ ++ strcpy(tx_buf + ft_tx_prefix_size(), "fin"); ++ iov.iov_base = tx_buf; ++ iov.iov_len = 4 + ft_tx_prefix_size(); ++ ++ if (hints->caps & FI_TAGGED) { ++ struct fi_msg_tagged tmsg; ++ ++ memset(&tmsg, 0, sizeof tmsg); ++ tmsg.msg_iov = &iov; ++ tmsg.desc = &mr_desc; ++ tmsg.iov_count = 1; ++ tmsg.addr = remote_fi_addr; ++ tmsg.tag = tx_seq; ++ tmsg.ignore = 0; ++ tmsg.context = &ctx; ++ ++ ret = fi_tsendmsg(ep, &tmsg, FI_INJECT | FI_TRANSMIT_COMPLETE); ++ } else { ++ struct fi_msg msg; ++ ++ memset(&msg, 0, sizeof msg); ++ msg.msg_iov = &iov; ++ msg.desc = &mr_desc; ++ msg.iov_count = 1; ++ msg.addr = remote_fi_addr; ++ msg.context = &ctx; ++ ++ ret = fi_sendmsg(ep, &msg, FI_INJECT | FI_TRANSMIT_COMPLETE); ++ } ++ if (ret) { ++ FT_PRINTERR("transmit", ret); ++ return ret; ++ } ++ ++ ++ ret = ft_get_tx_comp(++tx_seq); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_finalize(void) ++{ ++ int ret; ++ ++ if (fi->domain_attr->mr_mode & FI_MR_RAW) { ++ ret = fi_mr_unmap_key(domain, remote.key); ++ if (ret) ++ return ret; ++ } ++ ++ return ft_finalize_ep(ep); ++} ++ ++int64_t get_elapsed(const struct timespec *b, const struct timespec *a, ++ enum precision p) ++{ ++ int64_t elapsed; ++ ++ elapsed = difftime(a->tv_sec, b->tv_sec) * 1000 * 1000 * 1000; ++ elapsed += a->tv_nsec - b->tv_nsec; ++ return elapsed / p; ++} ++ ++void show_perf(char *name, int tsize, int iters, struct timespec *start, ++ struct timespec *end, int xfers_per_iter) ++{ ++ static int header = 1; ++ char str[FT_STR_LEN]; ++ int64_t elapsed = get_elapsed(start, end, MICRO); ++ long long bytes = (long long) iters * tsize * xfers_per_iter; ++ float usec_per_xfer; ++ ++ if (name) { ++ if (header) { ++ printf("%-50s%-8s%-8s%-8s%8s %10s%13s%13s\n", ++ "name", "bytes", "iters", ++ "total", "time", "MB/sec", ++ "usec/xfer", "Mxfers/sec"); ++ header = 0; ++ } ++ ++ printf("%-50s", name); ++ } else { ++ if (header) { ++ printf("%-8s%-8s%-8s%8s %10s%13s%13s\n", ++ "bytes", "iters", "total", ++ "time", "MB/sec", "usec/xfer", ++ "Mxfers/sec"); ++ header = 0; ++ } ++ } ++ ++ printf("%-8s", size_str(str, tsize)); ++ ++ printf("%-8s", cnt_str(str, iters)); ++ ++ printf("%-8s", size_str(str, bytes)); ++ ++ usec_per_xfer = ((float)elapsed / iters / xfers_per_iter); ++ printf("%8.2fs%10.2f%11.2f%11.2f\n", ++ elapsed / 1000000.0, bytes / (1.0 * elapsed), ++ usec_per_xfer, 1.0/usec_per_xfer); ++} ++ ++void show_perf_mr(int tsize, int iters, struct timespec *start, ++ struct timespec *end, int xfers_per_iter, int argc, char *argv[]) ++{ ++ static int header = 1; ++ int64_t elapsed = get_elapsed(start, end, MICRO); ++ long long total = (long long) iters * tsize * xfers_per_iter; ++ int i; ++ float usec_per_xfer; ++ ++ if (header) { ++ printf("---\n"); ++ ++ for (i = 0; i < argc; ++i) ++ printf("%s ", argv[i]); ++ ++ printf(":\n"); ++ header = 0; ++ } ++ ++ usec_per_xfer = ((float)elapsed / iters / xfers_per_iter); ++ ++ printf("- { "); ++ printf("xfer_size: %d, ", tsize); ++ printf("iterations: %d, ", iters); ++ printf("total: %lld, ", total); ++ printf("time: %f, ", elapsed / 1000000.0); ++ printf("MB/sec: %f, ", (total) / (1.0 * elapsed)); ++ printf("usec/xfer: %f, ", usec_per_xfer); ++ printf("Mxfers/sec: %f", 1.0/usec_per_xfer); ++ printf(" }\n"); ++} ++ ++void ft_addr_usage() ++{ ++ FT_PRINT_OPTS_USAGE("-B ", "non default source port number"); ++ FT_PRINT_OPTS_USAGE("-P ", "non default destination port number"); ++ FT_PRINT_OPTS_USAGE("-s
", "source address"); ++ FT_PRINT_OPTS_USAGE("-b[=]", "enable out-of-band address exchange and " ++ "synchronization over the, optional, port"); ++} ++ ++void ft_usage(char *name, char *desc) ++{ ++ fprintf(stderr, "Usage:\n"); ++ fprintf(stderr, " %s [OPTIONS]\t\tstart server\n", name); ++ fprintf(stderr, " %s [OPTIONS] \tconnect to server\n", name); ++ ++ if (desc) ++ fprintf(stderr, "\n%s\n", desc); ++ ++ fprintf(stderr, "\nOptions:\n"); ++ ft_addr_usage(); ++ FT_PRINT_OPTS_USAGE("-f ", "fabric name"); ++ FT_PRINT_OPTS_USAGE("-d ", "domain name"); ++ FT_PRINT_OPTS_USAGE("-p ", "specific provider name eg sockets, verbs"); ++ FT_PRINT_OPTS_USAGE("-e ", "Endpoint type: msg|rdm|dgram (default:rdm)"); ++ FT_PRINT_OPTS_USAGE("", "Only the following tests support this option for now:"); ++ FT_PRINT_OPTS_USAGE("", "fi_rma_bw"); ++ FT_PRINT_OPTS_USAGE("", "fi_shared_ctx"); ++ FT_PRINT_OPTS_USAGE("", "fi_multi_mr"); ++ FT_PRINT_OPTS_USAGE("", "fi_multi_ep"); ++ FT_PRINT_OPTS_USAGE("", "fi_recv_cancel"); ++ FT_PRINT_OPTS_USAGE("", "fi_unexpected_msg"); ++ FT_PRINT_OPTS_USAGE("", "fi_resmgmt_test"); ++ FT_PRINT_OPTS_USAGE("", "fi_inj_complete"); ++ FT_PRINT_OPTS_USAGE("-a
", "name of address vector"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++ ++ return; ++} ++ ++void ft_mcusage(char *name, char *desc) ++{ ++ fprintf(stderr, "Usage:\n"); ++ fprintf(stderr, " %s [OPTIONS] -M \tstart listener\n", name); ++ fprintf(stderr, " %s [OPTIONS] \tsend to group\n", name); ++ ++ if (desc) ++ fprintf(stderr, "\n%s\n", desc); ++ ++ fprintf(stderr, "\nOptions:\n"); ++ ft_addr_usage(); ++ FT_PRINT_OPTS_USAGE("-f ", "fabric name"); ++ FT_PRINT_OPTS_USAGE("-d ", "domain name"); ++ FT_PRINT_OPTS_USAGE("-p ", "specific provider name eg sockets, verbs"); ++ FT_PRINT_OPTS_USAGE("-d ", "domain name"); ++ FT_PRINT_OPTS_USAGE("-p ", "specific provider name eg sockets, verbs"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++ ++ return; ++} ++ ++void ft_csusage(char *name, char *desc) ++{ ++ ft_usage(name, desc); ++ FT_PRINT_OPTS_USAGE("-I ", "number of iterations"); ++ FT_PRINT_OPTS_USAGE("-w ", "number of warmup iterations"); ++ FT_PRINT_OPTS_USAGE("-S ", "specific transfer size or 'all'"); ++ FT_PRINT_OPTS_USAGE("-l", "align transmit and receive buffers to page size"); ++ FT_PRINT_OPTS_USAGE("-m", "machine readable output"); ++ FT_PRINT_OPTS_USAGE("-t ", "completion type [queue, counter]"); ++ FT_PRINT_OPTS_USAGE("-c ", "completion method [spin, sread, fd]"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++ ++ return; ++} ++ ++void ft_parseinfo(int op, char *optarg, struct fi_info *hints) ++{ ++ switch (op) { ++ case 'f': ++ if (!hints->fabric_attr) { ++ hints->fabric_attr = malloc(sizeof *(hints->fabric_attr)); ++ if (!hints->fabric_attr) { ++ perror("malloc"); ++ exit(EXIT_FAILURE); ++ } ++ } ++ hints->fabric_attr->name = strdup(optarg); ++ break; ++ case 'd': ++ if (!hints->domain_attr) { ++ hints->domain_attr = malloc(sizeof *(hints->domain_attr)); ++ if (!hints->domain_attr) { ++ perror("malloc"); ++ exit(EXIT_FAILURE); ++ } ++ } ++ hints->domain_attr->name = strdup(optarg); ++ break; ++ case 'p': ++ if (!hints->fabric_attr) { ++ hints->fabric_attr = malloc(sizeof *(hints->fabric_attr)); ++ if (!hints->fabric_attr) { ++ perror("malloc"); ++ exit(EXIT_FAILURE); ++ } ++ } ++ hints->fabric_attr->prov_name = strdup(optarg); ++ break; ++ case 'e': ++ if (!strncasecmp("msg", optarg, 3)) ++ hints->ep_attr->type = FI_EP_MSG; ++ if (!strncasecmp("rdm", optarg, 3)) ++ hints->ep_attr->type = FI_EP_RDM; ++ if (!strncasecmp("dgram", optarg, 5)) ++ hints->ep_attr->type = FI_EP_DGRAM; ++ break; ++ default: ++ /* let getopt handle unknown opts*/ ++ break; ++ ++ } ++} ++ ++void ft_parse_addr_opts(int op, char *optarg, struct ft_opts *opts) ++{ ++ switch (op) { ++ case 's': ++ opts->src_addr = optarg; ++ break; ++ case 'B': ++ opts->src_port = optarg; ++ break; ++ case 'P': ++ opts->dst_port = optarg; ++ break; ++ case 'b': ++ opts->options |= FT_OPT_OOB_SYNC; ++ if (optarg && strlen(optarg) > 1) ++ opts->oob_port = optarg + 1; ++ else ++ opts->oob_port = default_oob_port; ++ break; ++ default: ++ /* let getopt handle unknown opts*/ ++ break; ++ } ++} ++ ++void ft_parsecsopts(int op, char *optarg, struct ft_opts *opts) ++{ ++ ft_parse_addr_opts(op, optarg, opts); ++ ++ switch (op) { ++ case 'I': ++ opts->options |= FT_OPT_ITER; ++ opts->iterations = atoi(optarg); ++ break; ++ case 'S': ++ if (!strncasecmp("all", optarg, 3)) { ++ opts->sizes_enabled = FT_ENABLE_ALL; ++ } else { ++ opts->options |= FT_OPT_SIZE; ++ opts->transfer_size = atoi(optarg); ++ } ++ break; ++ case 'm': ++ opts->machr = 1; ++ break; ++ case 'c': ++ if (!strncasecmp("sread", optarg, 5)) ++ opts->comp_method = FT_COMP_SREAD; ++ else if (!strncasecmp("fd", optarg, 2)) ++ opts->comp_method = FT_COMP_WAIT_FD; ++ break; ++ case 't': ++ if (!strncasecmp("counter", optarg, 7)) { ++ opts->options |= FT_OPT_RX_CNTR | FT_OPT_TX_CNTR; ++ opts->options &= ~(FT_OPT_RX_CQ | FT_OPT_TX_CQ); ++ } ++ break; ++ case 'a': ++ opts->av_name = optarg; ++ break; ++ case 'w': ++ opts->warmup_iterations = atoi(optarg); ++ break; ++ case 'l': ++ opts->options |= FT_OPT_ALIGN; ++ break; ++ default: ++ /* let getopt handle unknown opts*/ ++ break; ++ } ++} ++ ++int ft_parse_rma_opts(int op, char *optarg, struct fi_info *hints, ++ struct ft_opts *opts) ++{ ++ switch (op) { ++ case 'o': ++ if (!strcmp(optarg, "read")) { ++ hints->caps |= FI_READ | FI_REMOTE_READ; ++ opts->rma_op = FT_RMA_READ; ++ } else if (!strcmp(optarg, "writedata")) { ++ hints->caps |= FI_WRITE | FI_REMOTE_WRITE; ++ hints->mode |= FI_RX_CQ_DATA; ++ hints->domain_attr->cq_data_size = 4; ++ opts->rma_op = FT_RMA_WRITEDATA; ++ cq_attr.format = FI_CQ_FORMAT_DATA; ++ } else if (!strcmp(optarg, "write")) { ++ hints->caps |= FI_WRITE | FI_REMOTE_WRITE; ++ opts->rma_op = FT_RMA_WRITE; ++ } else { ++ fprintf(stderr, "Invalid operation type: \"%s\". Usage:\n" ++ "-o \trma op type: read|write|writedata " ++ "(default:write)\n", optarg); ++ return EXIT_FAILURE; ++ } ++ break; ++ default: ++ /* let getopt handle unknown opts*/ ++ break; ++ } ++ return 0; ++} ++ ++void ft_fill_buf(void *buf, int size) ++{ ++ char *msg_buf; ++ int msg_index; ++ static unsigned int iter = 0; ++ int i; ++ ++ msg_index = ((iter++)*INTEG_SEED) % integ_alphabet_length; ++ msg_buf = (char *)buf; ++ for (i = 0; i < size; i++) { ++ msg_buf[i] = integ_alphabet[msg_index++]; ++ if (msg_index >= integ_alphabet_length) ++ msg_index = 0; ++ } ++} ++ ++int ft_check_buf(void *buf, int size) ++{ ++ char *recv_data; ++ char c; ++ static unsigned int iter = 0; ++ int msg_index; ++ int i; ++ ++ msg_index = ((iter++)*INTEG_SEED) % integ_alphabet_length; ++ recv_data = (char *)buf; ++ ++ for (i = 0; i < size; i++) { ++ c = integ_alphabet[msg_index++]; ++ if (msg_index >= integ_alphabet_length) ++ msg_index = 0; ++ if (c != recv_data[i]) ++ break; ++ } ++ if (i != size) { ++ printf("Error at iteration=%d size=%d byte=%d\n", ++ iter, size, i); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++uint64_t ft_init_cq_data(struct fi_info *info) ++{ ++ if (info->domain_attr->cq_data_size >= sizeof(uint64_t)) { ++ return 0x0123456789abcdefULL; ++ } else { ++ return 0x0123456789abcdef & ++ ((0x1ULL << (info->domain_attr->cq_data_size * 8)) - 1); ++ } ++} ++ ++int check_recv_msg(const char *message) ++{ ++ size_t recv_len; ++ size_t message_len = strlen(message) + 1; ++ /* Account for null terminated byte. */ ++ recv_len = strlen(rx_buf) + 1; ++ ++ if (recv_len != message_len) { ++ fprintf(stderr, "Received length does not match expected length.\n"); ++ return -1; ++ } ++ ++ if (strncmp(rx_buf, message, message_len)) { ++ fprintf(stderr, "Received message does not match expected message.\n"); ++ return -1; ++ } ++ fprintf(stdout, "Data check OK\n"); ++ return 0; ++} ++ ++int ft_send_greeting(struct fid_ep *ep) ++{ ++ size_t message_len = strlen(greeting) + 1; ++ int ret; ++ ++ fprintf(stdout, "Sending message...\n"); ++ if (snprintf(tx_buf, tx_size, "%s", greeting) >= tx_size) { ++ fprintf(stderr, "Transmit buffer too small.\n"); ++ return -FI_ETOOSMALL; ++ } ++ ++ ret = ft_tx(ep, remote_fi_addr, message_len, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Send completion received\n"); ++ return 0; ++} ++ ++int ft_recv_greeting(struct fid_ep *ep) ++{ ++ int ret; ++ ++ fprintf(stdout, "Waiting for message from client...\n"); ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ ret = check_recv_msg(greeting); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received data from client: %s\n", (char *) rx_buf); ++ return 0; ++} ++ ++int ft_send_recv_greeting(struct fid_ep *ep) ++{ ++ return opts.dst_addr ? ft_send_greeting(ep) : ft_recv_greeting(ep); ++} ++ ++int ft_sock_listen(char *node, char *service) ++{ ++ struct addrinfo *ai, hints; ++ int val, ret; ++ ++ memset(&hints, 0, sizeof hints); ++ hints.ai_flags = AI_PASSIVE; ++ ++ ret = getaddrinfo(node, service, &hints, &ai); ++ if (ret) { ++ fprintf(stderr, "getaddrinfo() %s\n", gai_strerror(ret)); ++ return ret; ++ } ++ ++ listen_sock = socket(ai->ai_family, SOCK_STREAM, 0); ++ if (listen_sock < 0) { ++ perror("socket"); ++ ret = listen_sock; ++ goto out; ++ } ++ ++ val = 1; ++ ret = setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, ++ (void *) &val, sizeof val); ++ if (ret) { ++ perror("setsockopt SO_REUSEADDR"); ++ goto out; ++ } ++ ++ ret = bind(listen_sock, ai->ai_addr, ai->ai_addrlen); ++ if (ret) { ++ perror("bind"); ++ goto out; ++ } ++ ++ ret = listen(listen_sock, 0); ++ if (ret) ++ perror("listen"); ++ ++out: ++ if (ret && listen_sock >= 0) ++ close(listen_sock); ++ freeaddrinfo(ai); ++ return ret; ++} ++ ++int ft_sock_connect(char *node, char *service) ++{ ++ struct addrinfo *ai; ++ int ret; ++ ++ ret = getaddrinfo(node, service, NULL, &ai); ++ if (ret) { ++ perror("getaddrinfo"); ++ return ret; ++ } ++ ++ sock = socket(ai->ai_family, SOCK_STREAM, 0); ++ if (sock < 0) { ++ perror("socket"); ++ ret = sock; ++ goto free; ++ } ++ ++ ret = 1; ++ ret = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *) &ret, sizeof(ret)); ++ if (ret) ++ perror("setsockopt"); ++ ++ ret = connect(sock, ai->ai_addr, ai->ai_addrlen); ++ if (ret) { ++ perror("connect"); ++ close(sock); ++ } ++ ++free: ++ freeaddrinfo(ai); ++ return ret; ++} ++ ++int ft_sock_accept() ++{ ++ int ret, op; ++ ++ sock = accept(listen_sock, NULL, 0); ++ if (sock < 0) { ++ ret = sock; ++ perror("accept"); ++ return ret; ++ } ++ ++ op = 1; ++ ret = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, ++ (void *) &op, sizeof(op)); ++ if (ret) ++ perror("setsockopt"); ++ ++ return 0; ++} ++ ++int ft_sock_send(int fd, void *msg, size_t len) ++{ ++ int ret; ++ ++ ret = send(fd, msg, len, 0); ++ if (ret == len) { ++ return 0; ++ } else if (ret < 0) { ++ perror("send"); ++ return -errno; ++ } else { ++ perror("send aborted"); ++ return -FI_ECONNABORTED; ++ } ++} ++ ++int ft_sock_recv(int fd, void *msg, size_t len) ++{ ++ int ret; ++ ++ ret = recv(fd, msg, len, MSG_WAITALL); ++ if (ret == len) { ++ return 0; ++ } else if (ret == 0) { ++ return -FI_ENOTCONN; ++ } else if (ret < 0) { ++ FT_PRINTERR("ft_fw_recv", ret); ++ perror("recv"); ++ return -errno; ++ } else { ++ perror("recv aborted"); ++ return -FI_ECONNABORTED; ++ } ++} ++ ++int ft_sock_sync(int value) ++{ ++ int result = -FI_EOTHER; ++ ++ if (listen_sock < 0) { ++ ft_sock_send(sock, &value, sizeof value); ++ ft_sock_recv(sock, &result, sizeof result); ++ } else { ++ ft_sock_recv(sock, &result, sizeof result); ++ ft_sock_send(sock, &value, sizeof value); ++ } ++ ++ return result; ++} ++ ++void ft_sock_shutdown(int fd) ++{ ++ shutdown(fd, SHUT_RDWR); ++ close(fd); ++} ++ ++static int ft_has_util_prefix(const char *str) ++{ ++ return !strncasecmp(str, OFI_UTIL_PREFIX, strlen(OFI_UTIL_PREFIX)); ++} ++ ++const char *ft_util_name(const char *str, size_t *len) ++{ ++ char *delim; ++ ++ delim = strchr(str, OFI_NAME_DELIM); ++ if (delim) { ++ if (ft_has_util_prefix(delim + 1)) { ++ *len = strlen(delim + 1); ++ return delim + 1; ++ } else if (ft_has_util_prefix(str)) { ++ *len = delim - str; ++ return str; ++ } ++ } else if (ft_has_util_prefix(str)) { ++ *len = strlen(str); ++ return str; ++ } ++ *len = 0; ++ return NULL; ++} ++ ++const char *ft_core_name(const char *str, size_t *len) ++{ ++ char *delim; ++ ++ delim = strchr(str, OFI_NAME_DELIM); ++ if (delim) { ++ if (!ft_has_util_prefix(delim + 1)) { ++ *len = strlen(delim + 1); ++ return delim + 1; ++ } else if (!ft_has_util_prefix(str)) { ++ *len = delim - str; ++ return str; ++ } ++ } else if (!ft_has_util_prefix(str)) { ++ *len = strlen(str); ++ return str; ++ } ++ *len = 0; ++ return NULL; ++} ++ ++/* Split the given string "s" using the specified delimiter(s) in the string ++ * "delim" and return an array of strings. The array is terminated with a NULL ++ * pointer. Returned array should be freed with ft_free_string_array(). ++ * ++ * Returns NULL on failure. ++ */ ++ ++char **ft_split_and_alloc(const char *s, const char *delim, size_t *count) ++{ ++ int i, n; ++ char *tmp; ++ char *dup = NULL; ++ char **arr = NULL; ++ ++ if (!s || !delim) ++ return NULL; ++ ++ dup = strdup(s); ++ if (!dup) ++ return NULL; ++ ++ /* compute the array size */ ++ n = 1; ++ for (tmp = dup; *tmp != '\0'; ++tmp) { ++ for (i = 0; delim[i] != '\0'; ++i) { ++ if (*tmp == delim[i]) { ++ ++n; ++ break; ++ } ++ } ++ } ++ ++ /* +1 to leave space for NULL terminating pointer */ ++ arr = calloc(n + 1, sizeof(*arr)); ++ if (!arr) ++ goto cleanup; ++ ++ /* set array elts to point inside the dup'ed string */ ++ for (tmp = dup, i = 0; tmp != NULL; ++i) { ++ arr[i] = strsep(&tmp, delim); ++ } ++ assert(i == n); ++ ++ if (count) ++ *count = n; ++ return arr; ++ ++cleanup: ++ free(dup); ++ free(arr); ++ return NULL; ++} ++ ++/* see ft_split_and_alloc() */ ++void ft_free_string_array(char **s) ++{ ++ /* all strings are allocated from the same strdup'ed slab, so just free ++ * the first element */ ++ if (s != NULL) ++ free(s[0]); ++ ++ /* and then the actual array of pointers */ ++ free(s); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/getopt.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/getopt.c +new file mode 100644 +index 000000000..3eb62d12d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/getopt.c +@@ -0,0 +1,727 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "getopt.h" ++ ++#ifndef min ++# define min(x,y) (x)<(y) ? (x) : (y) ++#endif // min ++ ++char *optarg = 0; ++int optind = 1; ++int opterr = 1; ++int optopt = '?'; ++static int nextchar = 0; ++ ++typedef struct _getopt_param ++{ ++ const char* optstring; /* effective option string, without prefixes */ ++ int posix; /* POSIX compatible mode (stop at first not detected parameter) */ ++ int process_all; /* process all elements */ ++ int no_report; /* don't report about errors... */ ++ char missing_arg; /* character for return for missing option argument ++ * by default - '?', but may be ':' */ ++} getopt_param; ++ ++ ++/* this function detects for parameters of processing */ ++static getopt_param scan_param(const char* optstring) ++{ ++ assert(optstring); ++ getopt_param param = {optstring, 0, 0, 0, '?'}; ++ size_t len = strlen(optstring); ++ ++ if (!opterr) ++ param.no_report = 1; ++ ++ for (size_t i = 0; i < len; i++) { ++ /* if option string begins with symbols '-+:' then this is special symbols... */ ++ switch (optstring[i]) { ++ case '-': ++ param.process_all = 1; ++ break; ++ case '+': ++ param.posix = 1; ++ break; ++ case ':': ++ param.missing_arg = ':'; ++ param.no_report = 1; /* i don't know why, but if optstrings starts with */ ++ break; /* ':' - original Linux function doesn't report about errors... */ ++ default: /* ok, no more special symbols... save efective format string & return */ ++ param.optstring = optstring + i; ++ return param; ++ } ++ } ++ assert(0); /* no more symbols? not good :( */ ++ return param; ++} ++ ++/* this function detects different between 2 strings: ++ * return values: ++ * -1 - strings differ ++ * 0 - strings same ++ * >0 - str is substring of opt */ ++static int string_diff(const char* opt, const char* str, int len) ++{ ++ assert(opt); ++ assert(str); ++ assert(len); ++ assert(len <= (int)strlen(str)); ++ ++ int olen = strlen(opt); ++ ++ if(olen < len) ++ return -1; ++ ++ for (int i = 0;; i++) { ++ if (!opt[i] && i == len) ++ return 0; /* option == str */ ++ else if (opt[i] && i >= len) ++ return olen - i; /* str is part of option */ ++ else if (opt[i] != str[i]) ++ return -1; /* option is shorter str... ++ * in str specified option name longer that option */ ++ } ++} ++ ++typedef enum _opt_type ++{ ++ opt_not_found = 0, ++ opt_err_no_arg = 1, ++ opt_err_ambiguous = 2, ++ opt_single = 3, ++ opt_inplace_arg = 4, ++ opt_has_arg = 5 ++} opt_type; ++ ++ ++/* check for short option... should be like "-opt_name" */ ++static int is_short_option(const char* str) ++{ ++ return (str[0] == '-' && str[1] && str[1] != '-'); ++} ++ ++/* check for long option... should be like "--opt_name" */ ++static int is_long_option(const char* str) ++{ ++ return (str[0] == '-' && str[1] == '-' && str[2]); ++} ++ ++static int is_option(const char* str) ++{ ++ return (is_short_option(str) || is_long_option(str)); ++} ++ ++static int is_finish(const char* str) ++{ /* if string == "--" - then this is terminator (no more process) */ ++ return (str[0] == '-' && str[1] == '-' && !str[2]); ++} ++ ++static int short_option_begin(const char* str) ++{ /* currently this is fake because supported only '-' as attribute of short option */ ++ (void) str; ++ return 1; ++} ++ ++static int long_option_begin(const char* str) ++{ /* currently this is fake because supported only '--' as attribute of long option */ ++ (void) str; ++ return 2; ++} ++ ++static int option_begin(const char* str) ++{ ++ if (is_short_option(str)) ++ return short_option_begin(str); ++ else if (is_long_option(str)) ++ return long_option_begin(str); ++ assert(0); ++ return 0; ++} ++ ++/* looking for nearest option or terminate sequence ('--') ++ * in argv from optind index if no option found - return -1, ++ * else - index of found option */ ++static int look_for_option(int argc, char* const argv[], int optind) ++{ ++ assert(argv); ++ for (int i = optind; i < argc; i++) ++ if(is_option(argv[i]) || is_finish(argv[i])) ++ return i; ++ return -1; ++} ++ ++/* this function tries to detect short option entry in string */ ++static opt_type check_for_short_option(const char* optstring, const char* str) ++{ ++ assert(optstring); ++ assert(str); ++ ++ size_t olen = strlen(optstring); ++ size_t slen = strlen(str); ++ ++ if (!olen || !slen) ++ return opt_not_found; ++ ++ char sym = str[0]; ++ /* loop for all options in optstring */ ++ for (size_t i = 0; i < olen; i++ ) { ++ /* ok, we found option... */ ++ if (optstring[i] != ':' && optstring[i] == sym) { ++ /* let's check is it valid? */ ++ if (optstring[i + 1] != ':') { ++ /* single option... just return... */ ++ return opt_single; ++ } ++ else if (optstring[i+1] == ':' && optstring[i+2] != ':') { ++ /* mandatory argument */ ++ if (str[1]) /* value of arg is in same argv */ ++ return opt_inplace_arg; ++ else /* else next arg is value of option */ ++ return opt_has_arg; ++ } ++ else { /* optional argument */ ++ if (str[1]) /* value of arg is in same argv */ ++ return opt_inplace_arg; ++ else /* else optional argument is absent */ ++ return opt_single; ++ } ++ } ++ } ++ ++ return opt_not_found; ++} ++ ++/* this function tries to detect long option entry in string */ ++static opt_type check_for_long_option(const struct option *longopts, int *longindex, ++ const char* str, const char** arg) ++{ ++ assert(longindex); ++ assert(str); ++ ++ *arg = 0; ++ ++ if (!longopts) ++ return opt_not_found; ++ ++ /* looking for '=' in string... */ ++ int i; ++ for (i = 0; str[i] && str[i] != '='; i++); ++ assert(str[i] == '=' || !str[i]); ++ ++ int len = i; /* len used for detecting length of option name in string */ ++ ++ if (str[i] == '=' && str[i+1]) /* ok, symbol '=' detected... */ ++ *arg = str + i + 1; /* set potential option name substring length */ ++ ++ /* detecting the nearest option name to string */ ++ int index = 1; ++ const char* opt = longopts->name; ++ ++ if (!opt) ++ return opt_not_found; ++ ++ int diff = string_diff(opt, str, len); ++ int selected = diff >= 0 ? 0 : -1; ++ int ambiguous = 0; ++ ++ while (longopts[index].name) { ++ opt = longopts[index].name; ++ ++ int _diff = string_diff(opt, str, len); ++ if (!_diff) { ++ diff = 0; ++ selected = index; ++ break; ++ } ++ ++ if (_diff > 0 && diff > 0) { ++ ambiguous = 1; /* detected 2 or more options which are confirms string */ ++ } ++ else if (_diff > 0 && (_diff < diff || diff < 0)) { ++ diff = _diff; ++ selected = index; ++ } ++ index++; ++ } ++ ++ if (ambiguous && diff > 0) /* if detected multiple confirms and no exact match - return error */ ++ return opt_err_ambiguous; ++ ++ if (selected >= 0) { ++ if (longopts[selected].has_arg == no_argument && *arg) { ++ return opt_err_no_arg; /* argument is not required but specified */ ++ } ++ else if (longopts[selected].has_arg == no_argument /*&& !arg*/) { ++ *longindex = index; ++ return opt_single; // option without argument ++ } ++ else if (longopts[selected].has_arg == required_argument && *arg) { ++ *longindex = index; ++ return opt_inplace_arg; ++ } ++ else if (longopts[selected].has_arg == required_argument /*&& !arg*/) { ++ *longindex = index; ++ return opt_has_arg; ++ } ++ else if (longopts[selected].has_arg == optional_argument && *arg) { ++ *longindex = index; ++ return opt_inplace_arg; ++ } ++ else if (longopts[selected].has_arg == optional_argument /*&& !arg*/) { ++ *longindex = index; ++ return opt_single; // option without argument ++ } ++ } ++ return opt_not_found; ++} ++ ++/* here stored all numbers of elements which should be placed at end of argv list */ ++static int* swap_list = 0; ++static int swap_num = 0; ++ ++static void clear_swap() ++{ ++ if (swap_list) ++ free( swap_list ); ++ swap_list = 0; ++ swap_num = 0; ++} ++ ++/* adding index to list */ ++static void add_to_swap(int idx, int num) ++{ ++ assert(!swap_list && !swap_num || swap_list && swap_num); ++ assert(num); ++ ++ if (!swap_num) ++ swap_list = (int*)malloc(sizeof(*swap_list) * num); ++ else ++ swap_list = (int*)realloc(swap_list, ++ sizeof(*swap_list) * (swap_num + num)); ++ assert(swap_list); ++ ++ for(int i = 0; i < num; i++) ++ swap_list[swap_num + i] = idx + i; ++ swap_num += num; ++} ++ ++/* swap values in array ++ * this function moves elements enumrated in swap_list to end of ++ * argv vector... ++ * arguments: ++ * argc - size of argv vector (used mostly for control of length, ++ * to be sure that we are inside of vector) ++ * argv - vector to process ++ * optind - bound of process... argv vector is processed in range 0..optind */ ++static void swap_values(int argc, char** argv, int _optind) ++{ ++ assert(_optind >= swap_num); ++ assert(_optind <= argc); ++ ++ int i; /* index for original array */ ++ int j; /* index for temp array */ ++ int k; /* index for swap array */ ++ ++ int vals = min(argc, _optind); ++ ++ char** tmp = (char**)malloc(vals * sizeof(*tmp)); ++ assert(tmp); ++ ++ for (i = j = k = 0; i < vals && j < vals; i++) ++ { ++ /* copying all elements which NOT enumerated in swap_list array to temp array */ ++ if (k >= swap_num || i != swap_list[k]) ++ tmp[j++] = argv[i]; ++ else { ++ /* if index of element is in swap_list array - then just skip this element ++ * NOTE: swap_list array is SORTED, that is why we can to not run ++ * throgh whole swap_list array in every iteration */ ++ assert(k < swap_num); ++ k++; ++ } ++ } ++ ++ /* ok, now copy rest of array (skipped elements) to temp array */ ++ for (k = 0; j < vals && k < swap_num; k++, j++) { ++ assert(swap_list[k] < _optind); ++ assert(swap_list[k] < argc); ++ tmp[j] = argv[swap_list[k]]; ++ } ++ ++ /* and now save tmp array to argv */ ++ for (i = 0; i < vals; i++) ++ argv[i] = tmp[i]; ++ ++ free(tmp); ++ ++ optind -= swap_num; ++ ++ clear_swap(); ++} ++ ++/* this function is called when we need to detect next option entry in argv ++ * return value: ++ * 1 - next option entry found, retval not used ++ * 0 - no more options, retval - reason (-1 no more options, 1 - argument ++ * processed as default option with code 1) */ ++static int detect_next_option(int argc, char* const argv[], ++ const getopt_param* param, int* retval) ++{ ++ if (!is_option(argv[optind])) { ++ /* if optind points to non-option - then check it... */ ++ if (is_finish(argv[optind])) { ++ /* is it terminate sequence ('--')? */ ++ optind++; ++ if (!param->posix && !param->process_all) ++ swap_values(argc, (char**)argv, optind); ++ *retval = -1; ++ return 0; ++ } ++ else if (param->process_all) { ++ /* processing all elements */ ++ optarg = (char*)argv[optind]; ++ optind++; ++ *retval = 1; ++ return 0; ++ } ++ else if (param->posix) { ++ *retval = -1; ++ return 0; ++ } ++ else { ++ int next_ind = look_for_option(argc, argv, optind); ++ assert(next_ind != optind); /* should not be same */ ++ if (next_ind > 0) { ++ /* marking elements for swap */ ++ add_to_swap(optind, next_ind - optind); ++ /* NOTE: in swap_list stored indexes of elements which are not ++ * detected as options and not detected as arguments ++ * (if argv[x] is detected as option - stsrts with '-', ++ * it doesn't added to this list). later, when no more ++ * element may be detected, these stored elements are moved ++ * to end of argv vector */ ++ optind = next_ind; ++ } ++ else { ++ /* no more options found */ ++ swap_values(argc, (char**)argv, optind); ++ *retval = -1; ++ return 0; ++ } ++ } ++ ++ if (is_finish(argv[optind])) { ++ optind++; ++ if (!param->posix && !param->process_all) ++ swap_values(argc, (char**)argv, optind); ++ *retval = -1; ++ return 0; ++ } ++ } ++ return 1; ++} ++ ++/* this function is called when we are sure that option is short... */ ++static int get_short_option(int argc, char* const argv[], const getopt_param* param) ++{ ++ assert(argc); ++ assert(argv); ++ assert(nextchar); ++ assert(optind < argc); ++ ++ const char* str = argv[optind] + nextchar; ++ ++ switch (check_for_short_option(param->optstring, str)) { ++ case opt_not_found: ++ optopt = str[0]; ++ nextchar++; ++ if (!argv[optind][nextchar]) { ++ nextchar = 0; ++ optind++; ++ } ++ if (!param->no_report) ++ printf("%s: invalid option -- %c\n", argv[0], optopt); ++ return '?'; ++ case opt_err_no_arg: ++ /* somethibg wrong... check_for_short_option can't ++ * detect absent external parameter... */ ++ assert(0); ++ break; ++ case opt_single: ++ { ++ nextchar++; ++ if (!argv[optind][nextchar]) { ++ nextchar = 0; ++ optind++; ++ } ++ return str[0]; ++ } ++ case opt_inplace_arg: ++ optarg = (char*)str + 1; ++ optind++; ++ nextchar = 0; ++ return str[0]; ++ case opt_has_arg: ++ if (optind + 1 >= argc) { ++ /* error: option hasn't argument */ ++ optopt = str[0]; ++ optind++; ++ nextchar = 0; ++ if (!param->no_report) ++ printf("%s: option requires an " ++ "argument -- %c\n", argv[0], ++ optopt); ++ return param->missing_arg; ++ } ++ else { ++ optarg = (char*)argv[optind + 1]; ++ optind += 2; ++ nextchar = 0; ++ return str[0]; ++ } ++ } ++ ++ /* should not go here... */ ++ assert(0); ++ return -1; ++} ++ ++static int get_long_option(int argc, char* const argv[], const getopt_param* param, ++ const struct option* longopts, int* longindex) ++{ ++ assert(argc); ++ assert(argv); ++ assert(!nextchar); ++ assert(optind < argc); ++ ++ optopt = 0; ++ *longindex = 0; ++ ++ /* saving current argument for error message */ ++ const char* element = argv[optind]; ++ ++ switch (check_for_long_option(longopts, longindex, ++ argv[optind] + option_begin(argv[optind]), ++ &optarg)) { ++ case opt_not_found: ++ if (!param->no_report) ++ printf("%s: unrecognized option `%s'\n", ++ argv[0], element); ++ optind++; ++ return '?'; ++ case opt_err_no_arg: ++ if (!param->no_report) ++ printf("%s: option `%s' doesn't allow an argument\n", ++ argv[0], element); ++ optind++; ++ return '?'; ++ case opt_has_arg: ++ if (optind + 1 >= argc) { ++ optind++; ++ if (!param->no_report) ++ printf("%s: option `%s' requires an argument\n", ++ argv[0], element); ++ *longindex = 0; ++ return param->missing_arg; ++ } ++ optarg = (char*)(argv[optind + 1]); ++ optind++; ++ /* here should NOT be break because here is same return method */ ++ case opt_single: ++ case opt_inplace_arg: ++ optind++; ++ if(longopts[*longindex].flag) { ++ *longopts[*longindex].flag = longopts[*longindex].val; ++ return 0; ++ } ++ else { ++ return longopts[*longindex].val; ++ } ++ case opt_err_ambiguous: ++ optind++; ++ if (!param->no_report) ++ printf("%s: option `%s' is ambiguous\n", ++ argv[0], element); ++ return '?'; ++ } ++ ++ assert(0); /* should not be here... */ ++ return -1; ++} ++ ++static int get_long_short_option(int argc, char* const argv[], const getopt_param* param, ++ const struct option* longopts, int* longindex) ++{ ++ assert(argc); ++ assert(argv); ++ assert(!nextchar); ++ assert(optind < argc); ++ ++ optopt = 0; ++ *longindex = 0; ++ ++ const char* element = argv[optind]; /* saving current argument for error message */ ++ ++ opt_type ltype = check_for_long_option(longopts, longindex, ++ argv[optind] + option_begin(argv[optind]), ++ &optarg); ++ opt_type stype = check_for_short_option(param->optstring, ++ argv[optind] + option_begin(argv[optind])); ++ ++ if (ltype == opt_not_found && stype == opt_not_found) { ++ if (!param->no_report) ++ printf("%s: unrecognized option `%s'\n", ++ argv[0], element); ++ optind++; ++ return '?'; ++ } ++ else if (ltype != opt_not_found) ++ return get_long_option(argc, argv, param, longopts, longindex); ++ else { ++ nextchar = short_option_begin(argv[optind]); ++ return get_short_option(argc, argv, param); ++ } ++} ++ ++int getopt(int argc, char* const argv[], const char *optstring) ++{ ++ if(!argc || !argv || !optstring ) ++ return -1; ++ ++ getopt_param param = scan_param(optstring ? optstring : ""); ++ ++ if (optind >= argc) { ++ if (!param.posix && !param.process_all) ++ swap_values(argc, (char**)argv, optind); ++ return -1; ++ } ++ ++ optarg = 0; ++ ++ if (!nextchar) { ++ /* we are in begin of argument... ++ * no previous iterations on this arg */ ++ int retval; ++ if (!detect_next_option(argc, argv, ¶m, &retval)) ++ return retval; ++ nextchar = short_option_begin(argv[optind]); ++ } ++ ++ return get_short_option(argc, argv, ¶m); ++} ++ ++int getopt_long(int argc, char * const argv[], ++ const char *optstring, ++ const struct option *longopts, int *longindex) ++{ ++ if(!argc || !argv) ++ return -1; ++ ++ getopt_param param = scan_param(optstring ? optstring : ""); ++ ++ if(optind >= argc) { ++ if(!param.posix && !param.process_all) ++ swap_values(argc, (char**)argv, optind); ++ return -1; ++ } ++ ++ optarg = 0; ++ ++ if (!nextchar) { ++ /* we are in begin of argument... ++ * no previous iterations on this arg */ ++ int retval; ++ if (!detect_next_option(argc, argv, ¶m, &retval)) ++ return retval; ++ ++ const char* str = argv[optind]; ++ if (is_long_option(str)) { ++ int _longindex; ++ /* if no longindex specified - create own temp... */ ++ if (!longindex) ++ longindex = &_longindex; ++ return get_long_option(argc, argv, ¶m, ++ longopts, longindex); ++ } ++ else if (is_short_option(str)) { ++ nextchar = short_option_begin(str); ++ } ++ } ++ ++ return get_short_option(argc, argv, ¶m); ++} ++ ++int getopt_long_only(int argc, char * const argv[], ++ const char *optstring, ++ const struct option *longopts, int *longindex) ++{ ++ if (!argc || !argv) ++ return -1; ++ ++ getopt_param param = scan_param(optstring ? optstring : ""); ++ ++ if (optind >= argc) { ++ if (!param.posix && !param.process_all) ++ swap_values(argc, (char**)argv, optind); ++ return -1; ++ } ++ ++ optarg = 0; ++ ++ if (!nextchar) { ++ int retval; ++ if (!detect_next_option(argc, argv, ¶m, &retval)) ++ return retval; ++ ++ const char* str = argv[optind]; ++ if (is_long_option(str)) { ++ int _longindex; ++ /* if no longindex specified - create own temp... */ ++ if (!longindex) ++ longindex = &_longindex; ++ return get_long_option(argc, argv, ¶m, ++ longopts, longindex); ++ } ++ else if (is_short_option(str)) { ++ return get_long_short_option(argc, argv, ¶m, ++ longopts, longindex); ++ } ++ } ++ ++ return get_short_option(argc, argv, ¶m); ++} ++ ++ ++ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/osd.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/osd.c +new file mode 100644 +index 000000000..0e54de8bf +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/common/windows/osd.c +@@ -0,0 +1,87 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "ft_osd.h" ++ ++int socketpair(int af, int type, int protocol, int socks[2]) ++{ ++ protocol; /* suppress warning */ ++ struct sockaddr_in in_addr; ++ int lsock; ++ int len = sizeof(in_addr); ++ ++ if (!socks) { ++ WSASetLastError(WSAEINVAL); ++ return SOCKET_ERROR; ++ } ++ ++ socks[0] = socks[1] = (int)INVALID_SOCKET; ++ if ((lsock = socket(af == AF_UNIX ? AF_INET : af, ++ type, 0)) == INVALID_SOCKET) { ++ return SOCKET_ERROR; ++ } ++ ++ memset(&in_addr, 0, sizeof(in_addr)); ++ in_addr.sin_family = AF_INET; ++ in_addr.sin_addr.s_addr = htonl(0x7f000001); ++ ++ if (bind(lsock, (struct sockaddr*)&in_addr, sizeof(in_addr))) { ++ int err = WSAGetLastError(); ++ closesocket(lsock); ++ WSASetLastError(err); ++ return SOCKET_ERROR; ++ } ++ if (getsockname(lsock, (struct sockaddr*) &in_addr, &len)) { ++ int err = WSAGetLastError(); ++ closesocket(lsock); ++ WSASetLastError(err); ++ return SOCKET_ERROR; ++ } ++ ++ if (listen(lsock, 1)) ++ goto err; ++ if ((socks[0] = WSASocket(af == AF_UNIX ? AF_INET : af, ++ type, 0, NULL, 0, 0)) == INVALID_SOCKET) ++ goto err; ++ if (connect(socks[0], (const struct sockaddr*) &in_addr, sizeof(in_addr))) ++ goto err; ++ if ((socks[1] = accept(lsock, NULL, NULL)) == INVALID_SOCKET) ++ goto err; ++ ++ closesocket(lsock); ++ return 0; ++ ++ int err; ++err: ++ err = WSAGetLastError(); ++ closesocket(lsock); ++ closesocket(socks[0]); ++ closesocket(socks[1]); ++ WSASetLastError(err); ++ return SOCKET_ERROR; ++} +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/configure.ac b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/configure.ac +new file mode 100644 +index 000000000..392375724 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/configure.ac +@@ -0,0 +1,125 @@ ++dnl ++dnl Copyright (c) 2016-2017 Cisco Systems, Inc. All rights reserved. ++dnl Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++dnl ++dnl Process this file with autoconf to produce a configure script. ++ ++AC_PREREQ(2.57) ++AC_INIT([fabtests], [1.7.0], [ofiwg@lists.openfabrics.org]) ++AC_CONFIG_AUX_DIR(config) ++AC_CONFIG_MACRO_DIR(config) ++AC_CONFIG_HEADERS(config.h) ++AM_INIT_AUTOMAKE([1.11 dist-bzip2 foreign -Wall -Werror subdir-objects]) ++m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) ++ ++AC_CANONICAL_HOST ++ ++macos=0 ++linux=0 ++freebsd=0 ++ ++case $host_os in ++*darwin*) ++ macos=1 ++ ;; ++*linux*) ++ linux=1 ++ ;; ++*freebsd*) ++ freebsd=1 ++ ;; ++*) ++ AC_MSG_ERROR([libfabric only builds on Linux & OS X]) ++ ;; ++esac ++ ++AM_CONDITIONAL([MACOS], [test $macos -eq 1]) ++AM_CONDITIONAL([LINUX], [test $linux -eq 1]) ++AM_CONDITIONAL([FREEBSD], [test $freebsd -eq 1]) ++ ++base_c_warn_flags="-Wall -Wundef -Wpointer-arith" ++debug_c_warn_flags="-Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers" ++debug_c_other_flags="-fstack-protector-strong" ++ ++AC_ARG_ENABLE([debug], ++ [AS_HELP_STRING([--enable-debug], ++ [Enable debugging - default NO])], ++ [CFLAGS="-g -O0 ${base_c_warn_flags} ${debug_c_warn_flags} ${debug_c_other_flags} $CFLAGS" ++ dbg=1], ++ [dbg=0]) ++ ++AC_DEFINE_UNQUOTED([ENABLE_DEBUG], [$dbg], ++ [defined to 1 if configured with --enable-debug]) ++ ++dnl Fix autoconf's habit of adding -g -O2 by default ++AS_IF([test -z "$CFLAGS"], ++ [CFLAGS="-O2 -DNDEBUG ${base_c_warn_flags}"]) ++ ++# AM PROG_AR did not exist pre AM 1.11.x (where x is somewhere >0 and ++# <3), but it is necessary in AM 1.12.x. ++m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) ++ ++AM_PROG_LIBTOOL ++ ++AC_ARG_WITH([valgrind], ++ AC_HELP_STRING([--with-valgrind], ++ [Enable valgrind annotations - default NO])) ++ ++if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then ++ AC_DEFINE([INCLUDE_VALGRIND], 1, ++ [Define to 1 to enable valgrind annotations]) ++ if test -d $with_valgrind; then ++ CPPFLAGS="$CPPLFAGS -I$with_valgrind/include" ++ fi ++fi ++ ++dnl Checks for programs ++AC_PROG_CC ++AM_PROG_CC_C_O ++ ++LT_INIT ++ ++have_clock_gettime=0 ++ ++AC_SEARCH_LIBS([clock_gettime],[rt], ++ [have_clock_gettime=1], ++ []) ++ ++AC_DEFINE_UNQUOTED(HAVE_CLOCK_GETTIME, [$have_clock_gettime], ++ [Define to 1 if clock_gettime is available.]) ++AM_CONDITIONAL(HAVE_CLOCK_GETTIME, [test $have_clock_gettime -eq 1]) ++ ++AC_ARG_WITH([libfabric], ++ AC_HELP_STRING([--with-libfabric], [Use non-default libfabric location - default NO]), ++ [AS_IF([test -d $withval/lib64], [fab_libdir="lib64"], [fab_libdir="lib"]) ++ CPPFLAGS="-I $withval/include $CPPFLAGS" ++ LDFLAGS="-L$withval/$fab_libdir $LDFLAGS"], ++ []) ++ ++dnl Checks for libraries ++AC_CHECK_LIB([fabric], fi_getinfo, [], ++ AC_MSG_ERROR([fi_getinfo() not found. fabtests requires libfabric.])) ++ ++dnl Checks for header files. ++AC_HEADER_STDC ++AC_CHECK_HEADER([rdma/fabric.h], [], ++ [AC_MSG_ERROR([ not found. fabtests requires libfabric.])]) ++ ++AC_MSG_CHECKING([for fi_trywait support]) ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], ++ [[fi_trywait(NULL, NULL, 0);]])], ++ [AC_MSG_RESULT([yes])], ++ [AC_MSG_RESULT([no]) ++ AC_MSG_ERROR([fabtests requires fi_trywait support. Cannot continue])]) ++ ++if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then ++AC_CHECK_HEADER(valgrind/memcheck.h, [], ++ AC_MSG_ERROR([valgrind requested but not found.])) ++fi ++ ++AC_CHECK_FUNC([epoll_create1], [have_epoll=1], [have_epoll=0]) ++AC_DEFINE_UNQUOTED([HAVE_EPOLL], [$have_epoll], ++ [Defined to 1 if Linux epoll is available]) ++ ++AC_CONFIG_FILES([Makefile fabtests.spec]) ++AC_OUTPUT +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.sln b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.sln +new file mode 100644 +index 000000000..2e460cb02 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.sln +@@ -0,0 +1,28 @@ ++ ++Microsoft Visual Studio Solution File, Format Version 12.00 ++# Visual Studio 14 ++VisualStudioVersion = 14.0.25420.1 ++MinimumVisualStudioVersion = 10.0.40219.1 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fabtests", "fabtests.vcxproj", "{076F757A-8827-4D3C-A87F-6E49623C16E1}" ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug-v140|x64 = Debug-v140|x64 ++ Debug-v141|x64 = Debug-v141|x64 ++ Release-v140|x64 = Release-v140|x64 ++ Release-v141|x64 = Release-v141|x64 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Debug-v140|x64.ActiveCfg = Debug-v140|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Debug-v140|x64.Build.0 = Debug-v140|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Debug-v141|x64.ActiveCfg = Debug-v141|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Debug-v141|x64.Build.0 = Debug-v141|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Release-v140|x64.ActiveCfg = Release-v140|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Release-v140|x64.Build.0 = Release-v140|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Release-v141|x64.ActiveCfg = Release-v141|x64 ++ {076F757A-8827-4D3C-A87F-6E49623C16E1}.Release-v141|x64.Build.0 = Release-v141|x64 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.spec.in b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.spec.in +new file mode 100644 +index 000000000..d15c0fb2a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.spec.in +@@ -0,0 +1,41 @@ ++Name: fabtests ++Version: @VERSION@ ++Release: 1%{?dist} ++Summary: Test suite for libfabric API ++Group: System Environment/Libraries ++License: GPLv2 or BSD ++Url: http://www.github.com/ofiwg/fabtests ++Source: http://www.github.org/ofiwg/%{name}/releases/download/v{%version}/%{name}-%{version}.tar.bz2 ++Requires: libfabric ++BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ++ ++%description ++Fabtests provides a set of examples that uses libfabric - a high-performance fabric software library. ++ ++%prep ++%setup -q -n %{name}-%{version} ++ ++%build ++%configure %{?_with_libfabric} ++make %{?_smp_mflags} ++ ++%install ++rm -rf %{buildroot} ++%makeinstall installdirs ++# remove unpackaged files from the buildroot ++rm -f %{buildroot}%{_libdir}/*.la ++ ++%clean ++rm -rf %{buildroot} ++ ++%files ++%defattr(-,root,root,-) ++%{_bindir}/* ++%{_mandir}/man7/* ++%{_mandir}/man1/* ++%{_datadir}/%{name}/test_configs/* ++%doc AUTHORS COPYING README ++ ++%changelog ++* Sun May 3 2015 Open Fabrics Interfaces Working Group 1.0.0 ++- Release 1.0.0 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj +new file mode 100644 +index 000000000..96374f465 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj +@@ -0,0 +1,175 @@ ++ ++ ++ ++ ++ Debug-v140 ++ x64 ++ ++ ++ Debug-v141 ++ x64 ++ ++ ++ Release-v140 ++ x64 ++ ++ ++ Release-v141 ++ x64 ++ ++ ++ ++ {076F757A-8827-4D3C-A87F-6E49623C16E1} ++ MakeFileProj ++ ++ ++ ++ Makefile ++ true ++ v140 ++ true ++ MultiByte ++ ++ ++ Makefile ++ true ++ v141 ++ true ++ MultiByte ++ ++ ++ Makefile ++ false ++ v140 ++ true ++ MultiByte ++ ++ ++ Makefile ++ false ++ v141 ++ true ++ MultiByte ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ WIN32;_DEBUG;$(NMakePreprocessorDefinitions) ++ $(ProjectDir)Include;$(ExecutablePath) ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean ++ ++ ++ WIN32;_DEBUG;$(NMakePreprocessorDefinitions) ++ $(ProjectDir)Include;$(ExecutablePath) ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean ++ ++ ++ WIN32;NDEBUG;$(NMakePreprocessorDefinitions) ++ $(ProjectDir)Include;$(ExecutablePath) ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean ++ ++ ++ WIN32;NDEBUG;$(NMakePreprocessorDefinitions) ++ $(ProjectDir)Include;$(ExecutablePath) ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean all ++ nmake /F Makefile.win config=$(Configuration) arch=x$(PlatformArchitecture) clean ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj.filters b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj.filters +new file mode 100644 +index 000000000..2370a8e23 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/fabtests.vcxproj.filters +@@ -0,0 +1,249 @@ ++ ++ ++ ++ ++ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} ++ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx ++ ++ ++ {93995380-89BD-4b04-88EB-625FBE52EBFB} ++ h;hh;hpp;hxx;hm;inl;inc;xsd ++ ++ ++ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} ++ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms ++ ++ ++ {506aaadf-53cc-4344-941b-011008029037} ++ ++ ++ {660dbead-4d8e-4589-8eb4-43dfab9566bd} ++ ++ ++ {401b54c2-4a43-40a2-b707-50b5f6ebb556} ++ ++ ++ {b3a8fe06-b4cf-48f9-b123-60cb55a123a7} ++ ++ ++ {02aa369d-fd9a-47f4-8fd3-583dcb953179} ++ ++ ++ {fba45a64-c3ed-4d15-827b-ab11ee5e9439} ++ ++ ++ {49185c64-a450-46e4-a685-870b48b52533} ++ ++ ++ {6860bc78-04ef-4ab3-8e81-5c6a0ef80954} ++ ++ ++ {41b0d676-ab4e-4ba1-aeae-ee73272ae273} ++ ++ ++ {f1716194-5311-4a40-a1f3-d4e96c93639f} ++ ++ ++ ++ ++ Source Files\common ++ ++ ++ Source Files\common ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\ubertest ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\common ++ ++ ++ Source Files\common ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\benchmarks ++ ++ ++ Source Files\functional ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ Source Files\unit ++ ++ ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files\ubertest ++ ++ ++ Header Files\osd ++ ++ ++ Header Files\osd ++ ++ ++ Header Files\osd ++ ++ ++ Header Files\osd ++ ++ ++ Header Files\osd\sys ++ ++ ++ Header Files\osd\sys ++ ++ ++ Header Files\osd\sys ++ ++ ++ Header Files\osd\netinet ++ ++ ++ Header Files\osd\netinet ++ ++ ++ Header Files\osd\getopt ++ ++ ++ Source Files\benchmarks ++ ++ ++ Header Files ++ ++ ++ ++ ++ ++ Source Files\test_configs ++ ++ ++ Source Files\test_configs ++ ++ ++ Source Files\test_configs ++ ++ ++ Source Files\test_configs ++ ++ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/av_xfer.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/av_xfer.c +new file mode 100644 +index 000000000..812bad317 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/av_xfer.c +@@ -0,0 +1,242 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++static struct fi_info *base_hints; ++ ++ ++static int av_removal_test(void) ++{ ++ int ret; ++ ++ fprintf(stdout, "AV address removal: "); ++ hints = fi_dupinfo(base_hints); ++ if (!hints) ++ return -FI_ENOMEM; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_tx", -ret); ++ goto out; ++ } ++ ++ ret = fi_av_remove(av, &remote_fi_addr, 1, 0); ++ if (ret) { ++ FT_PRINTERR("fi_av_remove", ret); ++ goto out; ++ } ++ ++ ret = ft_sync(); ++ if (ret) ++ goto out; ++ ++ ret = ft_init_av(); ++ if (ret) { ++ FT_PRINTERR("ft_init_av", -ret); ++ goto out; ++ } ++ ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) { ++ FT_PRINTERR("ft_rx", -ret); ++ goto out; ++ } ++ } else { ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) { ++ FT_PRINTERR("ft_rx", -ret); ++ goto out; ++ } ++ ++ ret = fi_av_remove(av, &remote_fi_addr, 1, 0); ++ if (ret) { ++ FT_PRINTERR("fi_av_remove", ret); ++ goto out; ++ } ++ ++ ret = ft_sync(); ++ if (ret) ++ goto out; ++ ++ ret = ft_init_av(); ++ if (ret) { ++ FT_PRINTERR("ft_init_av", -ret); ++ goto out; ++ } ++ ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_tx", -ret); ++ goto out; ++ } ++ } ++ ++ fprintf(stdout, "PASS\n"); ++ (void) ft_sync(); ++out: ++ ft_free_res(); ++ return ret; ++} ++ ++static int av_reinsert_test(void) ++{ ++ int ret; ++ ++ fprintf(stdout, "AV re-insertion address: "); ++ hints = fi_dupinfo(base_hints); ++ if (!hints) ++ return -FI_ENOMEM; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_tx", -ret); ++ goto out; ++ } ++ } else { ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) { ++ FT_PRINTERR("ft_rx", -ret); ++ goto out; ++ } ++ } ++ ++ ret = fi_av_remove(av, &remote_fi_addr, 1, 0); ++ if (ret) { ++ FT_PRINTERR("fi_av_remove", ret); ++ goto out; ++ } ++ ++ ret = ft_sync(); ++ if (ret) ++ goto out; ++ ++ ret = ft_init_av(); ++ if (ret) ++ goto out; ++ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_tx", -ret); ++ goto out; ++ } ++ } else { ++ ret = ft_rx(ep, opts.transfer_size); ++ if (ret) { ++ FT_PRINTERR("ft_rx", -ret); ++ goto out; ++ } ++ } ++ ++ fprintf(stdout, "PASS\n"); ++ (void) ft_sync(); ++out: ++ ft_free_res(); ++ return ret; ++} ++ ++/* ++ Test flow proposal for directed receive ++ client (dst_addr): ++ recvfrom ++ remove addr ++ insert addr ++ OOB sync ++ recvfrom ++ server (else): ++ tsend ++ OOB sync ++ tsend ++ */ ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE | FT_OPT_OOB_SYNC; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "AV communication unit test."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = hints->ep_attr->type == FI_EP_RDM ? ++ FI_TAGGED : FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ base_hints = hints; ++ ++ ret = av_removal_test(); ++ if (ret && ret != -FI_ENODATA) ++ goto out; ++ ++ if (opts.dst_addr) ++ sleep(1); ++ ret = av_reinsert_test(); ++ if (ret && ret != -FI_ENODATA) ++ goto out; ++ ++out: ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cm_data.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cm_data.c +new file mode 100644 +index 000000000..ed7a62bb6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cm_data.c +@@ -0,0 +1,484 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++static char *cm_data; ++static size_t cm_data_size; ++static struct fi_eq_cm_entry *entry; ++static struct fi_eq_err_entry err_entry; ++ ++char *sock_service = "2710"; ++ ++static int read_shutdown_event() ++{ ++ int ret; ++ uint32_t event; ++ ++ memset(entry, 0, sizeof(*entry)); ++ ret = fi_eq_sread(eq, &event, entry, sizeof(*entry), -1, 0); ++ if (ret < 0) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "shutdown"); ++ return ret; ++ } ++ if (event != FI_SHUTDOWN || entry->fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, ++ entry->fid, ep); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ return 0; ++} ++ ++static int server_setup(void) ++{ ++ size_t opt_size; ++ int ret; ++ ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ ++ /* Get the maximum cm_size supported in all domains */ ++ opt_size = sizeof(cm_data_size); ++ return fi_getopt(&pep->fid, FI_OPT_ENDPOINT, FI_OPT_CM_DATA_SIZE, ++ &cm_data_size, &opt_size); ++} ++ ++static int client_setup(void) ++{ ++ size_t opt_size; ++ int ret; ++ ++ /* Get fabric info */ ++ ret = fi_getinfo(FT_FIVERSION, opts.dst_addr, opts.dst_port, 0, hints, ++ &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ /* Get the maximum cm_size for this domain + endpoint combination */ ++ opt_size = sizeof(opt_size); ++ return fi_getopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_CM_DATA_SIZE, ++ &cm_data_size, &opt_size); ++} ++ ++static int server_listen(size_t paramlen) ++{ ++ size_t expected; ++ uint32_t event; ++ int ret; ++ ++ expected = paramlen + sizeof(*entry); ++ memset(entry, 0, expected); ++ ++ ret = fi_eq_sread(eq, &event, entry, expected, -1, 0); ++ if (ret != expected) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "listen"); ++ return ret; ++ } ++ ++ if (event != FI_CONNREQ) { ++ FT_ERR("Unexpected CM event %d", event); ++ return -FI_EOTHER; ++ } ++ ++ ret = ft_check_buf(entry->data, paramlen); ++ if (ret) ++ return ret; ++ ++ fi = entry->info; ++ ++ return 0; ++} ++ ++static int server_reject(size_t paramlen) ++{ ++ int ret; ++ ++ ret = server_listen(paramlen); ++ if (ret) ++ return ret; ++ ++ /* Data will appear in error event generated on remote end. */ ++ ft_fill_buf(cm_data, paramlen); ++ ret = fi_reject(pep, fi->handle, cm_data, paramlen); ++ if (ret) ++ FT_PRINTERR("fi_reject", ret); ++ ++ return ret; ++} ++ ++static int server_accept(size_t paramlen) ++{ ++ uint32_t event; ++ int ret; ++ ++ ret = server_listen(paramlen); ++ if (ret) ++ return ret; ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ goto err; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) { ++ FT_PRINTERR("alloc_active_res", ret); ++ goto err; ++ } ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) { ++ FT_PRINTERR("init_ep", ret); ++ goto err; ++ } ++ /* Data will apppear on accept event on remote end. */ ++ ft_fill_buf(cm_data, paramlen); ++ ++ /* Accept the incoming connection. Also transitions endpoint to active ++ * state. ++ */ ++ ret = fi_accept(ep, cm_data, paramlen); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ goto err; ++ } ++ ++ /* Local FI_CONNECTED event does not have data associated. */ ++ memset(entry, 0, sizeof(*entry)); ++ ret = fi_eq_sread(eq, &event, entry, sizeof(*entry), -1, 0); ++ if (ret != sizeof(*entry)) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "accept"); ++ goto err; ++ } ++ ++ if (event != FI_CONNECTED || entry->fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, ++ entry->fid, ep); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ ++ fi_shutdown(ep, 0); ++ ret = read_shutdown_event(); ++ if (ret) ++ goto err; ++ ++ FT_CLOSE_FID(ep); ++ FT_CLOSE_FID(rxcq); ++ FT_CLOSE_FID(txcq); ++ FT_CLOSE_FID(rxcntr); ++ FT_CLOSE_FID(txcntr); ++ FT_CLOSE_FID(av); ++ FT_CLOSE_FID(domain); ++ ++ return 0; ++ ++err: ++ fi_reject(pep, fi->handle, NULL, 0); ++ return ret; ++} ++ ++static int server(size_t paramlen) ++{ ++ int ret; ++ ++ ret = server_reject(paramlen); ++ if (ret) ++ return ret; ++ ++ return server_accept(paramlen); ++} ++ ++static int client_connect(size_t paramlen) ++{ ++ ft_fill_buf(cm_data, paramlen); ++ ++ /* Connect to server */ ++ return fi_connect(ep, fi->dest_addr, cm_data, paramlen); ++} ++ ++static int client_open_new_ep() ++{ ++ size_t opt_size; ++ int ret; ++ ++ FT_CLOSE_FID(ep); ++ ++ ret = fi_endpoint(domain, fi, &ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ /* Get the maximum cm_size for this domain + endpoint combination */ ++ opt_size = sizeof(opt_size); ++ return fi_getopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_CM_DATA_SIZE, ++ &cm_data_size, &opt_size); ++} ++ ++static int client_expect_reject(size_t paramlen) ++{ ++ uint32_t event; ++ int ret; ++ ++ ret = client_connect(paramlen); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ ret = fi_eq_sread(eq, &event, entry, sizeof(*entry), -1, 0); ++ if (ret != -FI_EAVAIL) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "connect"); ++ return ret; ++ } ++ ++ memset(&err_entry, 0, sizeof(err_entry)); ++ ret = fi_eq_readerr(eq, &err_entry, 0); ++ if (ret != sizeof(err_entry)) { ++ FT_EQ_ERR(eq, err_entry, NULL, 0); ++ return err_entry.err; ++ } ++ ++ if (err_entry.err != FI_ECONNREFUSED) ++ return err_entry.err; ++ ++ /* Check data on FI_ECONNREFUSED error event. */ ++ return ft_check_buf(err_entry.err_data, err_entry.err_data_size); ++} ++ ++static int client_expect_accept(size_t paramlen) ++{ ++ size_t expected; ++ uint32_t event; ++ int ret; ++ ++ expected = paramlen + sizeof(*entry); ++ ++ ret = client_connect(paramlen); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ ret = fi_eq_sread(eq, &event, entry, expected, -1, 0); ++ if (ret != expected) { ++ FT_PROCESS_EQ_ERR(ret, eq, "fi_eq_sread", "connect"); ++ return ret; ++ } ++ ++ if (event != FI_CONNECTED || entry->fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, ++ entry->fid, ep); ++ return -FI_EOTHER; ++ } ++ ++ /* Check data on FI_CONNECTED event. */ ++ ret = ft_check_buf(entry->data, paramlen); ++ if (ret) ++ return ret; ++ ++ fi_shutdown(ep, 0); ++ return read_shutdown_event(); ++} ++ ++/* ++ * After each reject and accept of a connection request we close the endpoint and ++ * open a new one since fi_connect can be called only once in a connected ++ * endpoint's lifetime. ++ */ ++static int client(size_t paramlen) ++{ ++ int ret; ++ ++ ret = client_expect_reject(paramlen); ++ if (ret) ++ return ret; ++ ++ ret = client_open_new_ep(); ++ if (ret) ++ return ret; ++ ++ ret = client_expect_accept(paramlen); ++ if (ret) ++ return ret; ++ ++ return client_open_new_ep(); ++} ++ ++static int run(void) ++{ ++ char *node, *service; ++ uint64_t flags; ++ int ret; ++ size_t i; ++ ++ ret = ft_read_addr_opts(&node, &service, hints, &flags, &opts); ++ if (ret) ++ return ret; ++ ++ ret = opts.dst_addr ? client_setup() : server_setup(); ++ if (ret) { ++ fprintf(stderr, "error: %s\n", fi_strerror(-ret)); ++ return ret; ++ } ++ ++ /* Leave extra space for invalid size test */ ++ cm_data = calloc(1, cm_data_size + 1); ++ if (!cm_data) ++ return -FI_ENOMEM; ++ ++ entry = calloc(1, sizeof(*entry) + cm_data_size); ++ if (!entry) ++ return -FI_ENOMEM; ++ ++ if (opts.dst_addr) { ++ ret = ft_sock_connect(opts.dst_addr, sock_service); ++ if (ret) ++ goto err2; ++ } else { ++ ret = ft_sock_listen(opts.src_addr, sock_service); ++ if (ret) ++ goto err2; ++ ret = ft_sock_accept(); ++ if (ret) ++ goto err1; ++ } ++ ++ for (i = 1; i <= cm_data_size; i <<= 1) { ++ printf("trying with data size: %zu\n", i); ++ ++ if (opts.dst_addr) ++ ret = client(i); ++ else ++ ret = server(i); ++ ++ if (ret) ++ goto err1; ++ ++ ret = ft_sock_sync(0); ++ if (ret) ++ goto err1; ++ } ++ ++ /* Despite server not being setup to handle this, the client should fail ++ * with -FI_EINVAL since this exceeds its max data size. ++ */ ++ if (opts.dst_addr) { ++ printf("trying with data size exceeding maximum: %zu\n", ++ cm_data_size + 1); ++ /* Don't call client since it produces an error message. */ ++ ret = client_connect(cm_data_size + 1); ++ if (ret != -FI_EINVAL) { ++ FT_ERR("expected -FI_EINVAL, got: [%d]:%s\n", ret, ++ fi_strerror(-ret)); ++ } else { ++ ret = FI_SUCCESS; ++ } ++ } ++ ++err1: ++ ft_sock_shutdown(sock); ++err2: ++ free(entry); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE | FT_OPT_SKIP_REG_MR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "q:h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ case 'q': ++ sock_service = optarg; ++ break; ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], ++ "A MSG client-sever example that uses CM data."); ++ FT_PRINT_OPTS_USAGE("-q ", "management port"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cq_data.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cq_data.c +new file mode 100644 +index 000000000..7930a176e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/cq_data.c +@@ -0,0 +1,144 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++static int run_test() ++{ ++ int ret; ++ size_t size = 1000; ++ struct fi_cq_data_entry comp; ++ ++ if (opts.dst_addr) { ++ fprintf(stdout, ++ "Posting send with CQ data: 0x%" PRIx64 "\n", ++ remote_cq_data); ++ ret = ft_post_tx(ep, remote_fi_addr, size, remote_cq_data, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ fprintf(stdout, "Done\n"); ++ } else { ++ fprintf(stdout, "Waiting for CQ data from client\n"); ++ ret = fi_cq_sread(rxcq, &comp, 1, NULL, -1); ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(rxcq); ++ } else { ++ FT_PRINTERR("fi_cq_sread", ret); ++ } ++ return ret; ++ } ++ ++ if (comp.flags & FI_REMOTE_CQ_DATA) { ++ if (comp.data == remote_cq_data) { ++ fprintf(stdout, "remote_cq_data: success\n"); ++ ret = 0; ++ } else { ++ fprintf(stdout, "error, Expected data:0x%" PRIx64 ++ ", Received data:0x%" PRIx64 "\n", ++ remote_cq_data, comp.data); ++ ret = -FI_EIO; ++ } ++ } else { ++ fprintf(stdout, "error, CQ data flag not set\n"); ++ ret = -FI_EBADFLAGS; ++ } ++ } ++ ++ return ret; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = run_test(); ++ ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ opts.comp_method = FT_COMP_SREAD; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A client-server example that transfers CQ data.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->domain_attr->cq_data_size = 4; /* required minimum */ ++ hints->mode |= FI_CONTEXT | FI_RX_CQ_DATA; ++ ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ cq_attr.format = FI_CQ_FORMAT_DATA; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram.c +new file mode 100644 +index 000000000..68f892506 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram.c +@@ -0,0 +1,84 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ return ft_send_recv_greeting(ep); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple DRAM client-sever example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_DGRAM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram_waitset.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram_waitset.c +new file mode 100644 +index 000000000..e8f9dbd4a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/dgram_waitset.c +@@ -0,0 +1,191 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ struct fi_wait_attr wait_attr; ++ int ret; ++ ++ memset(&wait_attr, 0, sizeof wait_attr); ++ wait_attr.wait_obj = FI_WAIT_UNSPEC; ++ ret = fi_wait_open(fabric, &wait_attr, &waitset); ++ if (ret) { ++ FT_PRINTERR("fi_wait_open", ret); ++ return ret; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int send_recv() ++{ ++ struct fi_cq_entry comp; ++ int ret; ++ ++ ret = fi_recv(ep, rx_buf, rx_size + ft_rx_prefix_size(), ++ mr_desc, 0, &rx_ctx); ++ if (ret) ++ return ret; ++ ++ ft_sync(); ++ ++ fprintf(stdout, "Posting a send...\n"); ++ ret = ft_post_tx(ep, remote_fi_addr, tx_size, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ while ((tx_cq_cntr < tx_seq) || (rx_cq_cntr < rx_seq)) { ++ /* Wait for completion events on CQs */ ++ ret = fi_wait(waitset, -1); ++ if (ret < 0) { ++ FT_PRINTERR("fi_wait", ret); ++ return ret; ++ } ++ ++ /* Read the send completion entry */ ++ ret = fi_cq_read(txcq, &comp, 1); ++ if (ret > 0) { ++ tx_cq_cntr++; ++ fprintf(stdout, "Received send completion event!\n"); ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(txcq); ++ } else { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ return ret; ++ } ++ ++ /* Read the recv completion entry */ ++ ret = fi_cq_read(rxcq, &comp, 1); ++ if (ret > 0) { ++ rx_cq_cntr++; ++ fprintf(stdout, "Received recv completion event!\n"); ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(rxcq); ++ } else { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av(); ++ if (ret) ++ return ret; ++ ++ return send_recv(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ opts.comp_method = FT_COMP_WAITSET; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A DGRAM client-server example that uses waitset.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_DGRAM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/inj_complete.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/inj_complete.c +new file mode 100644 +index 000000000..b7ac46948 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/inj_complete.c +@@ -0,0 +1,210 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include "shared.h" ++ ++int use_sendmsg, use_recvmsg, send_inj_count; ++ ++static int send_msg(int sendmsg, size_t size) ++{ ++ int ret; ++ ft_tag = 0xabcd; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) ++ ft_fill_buf(tx_buf, size); ++ ++ if (sendmsg) { ++ ret = ft_sendmsg(ep, remote_fi_addr, size, ++ &tx_ctx, FI_INJECT_COMPLETE); ++ if (ret) { ++ FT_PRINTERR("ft_sendmsg", ret); ++ return ret; ++ } ++ } else { ++ ret = ft_post_tx(ep, remote_fi_addr, size, NO_CQ_DATA, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_post_rx", ret); ++ return ret; ++ } ++ } ++ ret = ft_cq_read_verify(txcq, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_cq_read_verify", ret); ++ return ret; ++ } ++ tx_cq_cntr++; ++ /* ++ Alter the tx buffer contents, if the inject event ++ was properly generated, then the changes to the TX buffer ++ will not be sent to the target. ++ */ ++ memset(tx_buf, 0xb, size); ++ ++ return 0; ++} ++ ++static int receive_msg(int recvmsg, size_t size) ++{ ++ int ret; ++ struct fi_context inj_ctx; ++ ft_tag = 0xabcd; ++ ++ if (recvmsg) { ++ ret = ft_recvmsg(ep, FI_ADDR_UNSPEC, size, ++ &inj_ctx, 0); ++ if (ret) { ++ FT_PRINTERR("ft_recvmsg", ret); ++ return ret; ++ } ++ } else { ++ ret = ft_post_rx(ep, size, &inj_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_post_rx", ret); ++ return ret; ++ } ++ } ++ ++ ret = ft_cq_read_verify(rxcq, &inj_ctx); ++ if (ret) { ++ FT_PRINTERR("ft_cq_read_verify", ret); ++ return ret; ++ } ++ rx_cq_cntr++; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ ret = ft_check_buf(rx_buf, size); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret = 0, i; ++ ++ if (!use_sendmsg) ++ hints->tx_attr->op_flags |= FI_INJECT_COMPLETE; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ ret = ft_init_fabric_cm(); ++ if (ret) ++ return ret; ++ } else { ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ } ++ ++ fprintf(stdout, "Start testing FI_INJECT_COMPLETIONS\n"); ++ for (i = 0; i < send_inj_count; i++) { ++ if (opts.dst_addr) { ++ ret = send_msg(use_sendmsg, opts.transfer_size); ++ if (ret) ++ return ret; ++ } else { ++ ret = receive_msg(use_recvmsg, opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ } ++ fprintf(stdout, "GOOD: Completed FI_INJECT_COMPLETIONS Testing\n"); ++ ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ use_sendmsg = 0; ++ use_recvmsg = 0; ++ send_inj_count = 1; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "m:OSRvh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'O': ++ send_inj_count = 100; ++ break; ++ case 'm': ++ opts.transfer_size = strtoul(optarg, NULL, 0); ++ break; ++ case 'S': ++ use_sendmsg = 1; ++ break; ++ case 'R': ++ use_recvmsg = 1; ++ break; ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "FI_Inject_Completion Functional Test"); ++ FT_PRINT_OPTS_USAGE("-m ", "size of Injection message"); ++ FT_PRINT_OPTS_USAGE("-S", "enable testing with fi_sendmsg"); ++ FT_PRINT_OPTS_USAGE("-R", "enable testing with fi_recvmsg"); ++ FT_PRINT_OPTS_USAGE("-O", "enable testing injection overrun"); ++ FT_PRINT_OPTS_USAGE("-v", "Enable DataCheck testing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->mode = FI_CONTEXT; ++ hints->caps = FI_TAGGED; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/mcast.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/mcast.c +new file mode 100644 +index 000000000..650bbd25e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/mcast.c +@@ -0,0 +1,115 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++static int listener; ++ ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ if (!listener) ++ fi->tx_attr->op_flags = FI_MULTICAST; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = ft_join_mc(); ++ if (ret) ++ return ret; ++ ++ remote_fi_addr = fi_mc_addr(mc); ++ return listener ? ft_recv_greeting(ep) : ft_send_greeting(ep); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "Mh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'M': ++ listener = 1; ++ break; ++ case '?': ++ case 'h': ++ goto usage; ++ } ++ } ++ ++ if (optind == argc) ++ goto usage; ++ ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_DGRAM; ++ hints->caps = FI_MSG | FI_MULTICAST; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++usage: ++ ft_mcusage(argv[0], "A simple multicast example."); ++ return EXIT_FAILURE; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg.c +new file mode 100644 +index 000000000..33e8b1307 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg.c +@@ -0,0 +1,95 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++ ++static int run(void) ++{ ++ int ret; ++ ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ ret = ft_send_recv_greeting(ep); ++ ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple MSG client-sever example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_epoll.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_epoll.c +new file mode 100644 +index 000000000..3ce6b0be2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_epoll.c +@@ -0,0 +1,239 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++ ++#if HAVE_EPOLL == 1 ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static int epfd; ++ ++static int alloc_epoll_res(void) ++{ ++ struct epoll_event event; ++ int ret, fd; ++ ++ epfd = epoll_create1(0); ++ if (epfd < 0) { ++ ret = -errno; ++ FT_PRINTERR("epoll_create1", ret); ++ return ret; ++ } ++ ++ memset((void *) &event, 0, sizeof event); ++ if (opts.dst_addr) { ++ fd = tx_fd; ++ event.data.ptr = (void *) &txcq->fid; ++ } else { ++ fd = rx_fd; ++ event.data.ptr = (void *) &rxcq->fid; ++ } ++ ++ event.events = EPOLLIN; ++ ret = epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &event); ++ if (ret) { ++ ret = -errno; ++ FT_PRINTERR("epoll_ctl", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int send_recv() ++{ ++ struct fi_cq_entry comp; ++ struct epoll_event event; ++ struct fid *fids[1]; ++ int ret; ++ const char *message = "Hello from Client!"; ++ size_t message_len = strlen(message) + 1; ++ ++ if (opts.dst_addr) { ++ fprintf(stdout, "Posting a send...\n"); ++ if (snprintf(tx_buf, tx_size, "%s", message) >= tx_size) { ++ fprintf(stderr, "Transmit buffer too small.\n"); ++ return -FI_ETOOSMALL; ++ } ++ ret = ft_post_tx(ep, remote_fi_addr, message_len, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ memset(&event, 0, sizeof event); ++ fids[0] = &txcq->fid; ++ do { ++ if (fi_trywait(fabric, fids, 1) == FI_SUCCESS) { ++ ret = TEMP_FAILURE_RETRY(epoll_wait(epfd, &event, 1, -1)); ++ if (ret < 0) { ++ ret = -errno; ++ FT_PRINTERR("epoll_wait", ret); ++ return ret; ++ } ++ ++ if (event.data.ptr != &txcq->fid) ++ fprintf(stdout, "unexpected event!\n"); ++ } ++ ++ ret = fi_cq_read(txcq, &comp, 1); ++ } while (ret == -FI_EAGAIN); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) ++ ret = ft_cq_readerr(txcq); ++ return ret; ++ } ++ ++ fprintf(stdout, "Send completion received\n"); ++ } else { ++ fprintf(stdout, "Waiting for client...\n"); ++ ++ memset(&event, 0, sizeof event); ++ fids[0] = &rxcq->fid; ++ do { ++ if (fi_trywait(fabric, fids, 1) == FI_SUCCESS) { ++ ret = TEMP_FAILURE_RETRY(epoll_wait(epfd, &event, 1, -1)); ++ if (ret < 0) { ++ ret = -errno; ++ FT_PRINTERR("epoll_wait", ret); ++ return ret; ++ } ++ ++ if (event.data.ptr != &rxcq->fid) { ++ fprintf(stdout, "unexpected event!\n"); ++ } ++ } ++ ++ ret = fi_cq_read(rxcq, &comp, 1); ++ } while (ret == -FI_EAGAIN); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) ++ ret = ft_cq_readerr(rxcq); ++ return ret; ++ } ++ ++ ret = check_recv_msg(message); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received data from client: %s\n", (char *) rx_buf); ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? ft_client_connect() : ft_server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ ret = alloc_epoll_res(); ++ if (ret) ++ return ret; ++ ++ ret = send_recv(); ++ ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ opts.comp_method = FT_COMP_WAIT_FD; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple MSG client-sever example that " ++ "demonstrates one possible usage of the underlying " ++ "cq wait objects."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ close(epfd); ++ return ft_exit_code(ret); ++} ++ ++#else ++ ++#include ++ ++int main(int argc, char **argv) ++{ ++ return ft_exit_code(FI_ENODATA); ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_sockets.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_sockets.c +new file mode 100644 +index 000000000..ede5e6c06 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/msg_sockets.c +@@ -0,0 +1,493 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++union sockaddr_any { ++ struct sockaddr sa; ++ struct sockaddr_in sin; ++ struct sockaddr_in6 sin6; ++ struct sockaddr_storage ss; ++}; ++ ++static union sockaddr_any bound_addr; ++static size_t bound_addr_len = sizeof bound_addr; ++ ++ ++/* Wrapper for memcmp for sockaddr. Note that the sockaddr structure may ++ * contain holes, so sockaddr's are expected to have been initialized to all ++ * zeroes prior to being filled with an address. */ ++static int ++sockaddrcmp(const union sockaddr_any *actual, socklen_t actual_len, ++ const union sockaddr_any *expected, socklen_t expected_len) ++{ ++ if (actual->sa.sa_family != expected->sa.sa_family) { ++ return actual->sa.sa_family - expected->sa.sa_family; ++ } else if (actual_len != expected_len) { ++ return actual_len - expected_len; ++ } ++ ++ /* Handle binds to wildcard addresses, for address types we know ++ * about */ ++ switch (expected->sa.sa_family) { ++ case AF_INET: ++ if (expected->sin.sin_addr.s_addr == INADDR_ANY) { ++ return 0; ++ } ++ break; ++ case AF_INET6: ++ if (!memcmp(&expected->sin6.sin6_addr, ++ &in6addr_any, sizeof(struct in6_addr))) { ++ return 0; ++ } ++ break; ++ } ++ return memcmp(actual, expected, actual_len); ++} ++ ++/* Returns a string for the given sockaddr using getnameinfo(). This returns a ++ * static buffer so it is not reentrant or thread-safe. Returns the string on ++ * success and NULL on failure. */ ++static const char * ++sockaddrstr(const union sockaddr_any *addr, socklen_t len, char *buf, size_t buflen) ++{ ++ static char namebuf[BUFSIZ]; ++ static char servbuf[BUFSIZ]; ++ int errcode; ++ ++ if ((errcode = getnameinfo(&addr->sa, len, namebuf, BUFSIZ, ++ servbuf, BUFSIZ, ++ NI_NUMERICHOST | NI_NUMERICSERV))) { ++ if (errcode != EAI_SYSTEM) { ++ fprintf(stderr, "getnameinfo: %s\n", gai_strerror(errcode)); ++ } else { ++ fprintf(stderr, "getnameinfo: %s\n", strerror(errno)); ++ } ++ return NULL; ++ } ++ ++ snprintf(buf, buflen, "[%s]:%s", namebuf, servbuf); ++ return buf; ++} ++ ++static int check_address(struct fid *fid, const char *message) ++{ ++ char buf1[BUFSIZ], buf2[BUFSIZ]; ++ union sockaddr_any tmp; ++ size_t tmplen; ++ const char *ep_addr, *addr_expected; ++ int ret; ++ ++ memset(&tmp, 0, sizeof tmp); ++ tmplen = sizeof tmp; ++ ret = fi_getname(fid, &tmp, &tmplen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ } ++ ++ if (sockaddrcmp(&tmp, tmplen, &bound_addr, bound_addr_len)) { ++ ep_addr = sockaddrstr(&tmp, tmplen, buf1, BUFSIZ); ++ if (!ep_addr) { ++ FT_ERR("Unable to get ep_addr as string!"); ++ return -FI_EINVAL; ++ } ++ ++ addr_expected = sockaddrstr(&bound_addr, bound_addr_len, buf2, BUFSIZ); ++ if (!addr_expected) { ++ FT_ERR("Unable to get addr_expected as string!"); ++ return -FI_EINVAL; ++ } ++ ++ FT_ERR("address changed after %s: got %s expected %s", ++ message, ep_addr, addr_expected); ++ return -FI_EINVAL; ++ } ++ ++ return 0; ++} ++ ++static int server_listen(void) ++{ ++ int ret; ++ ++ ret = fi_pep_bind(pep, &eq->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_pep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_listen(pep); ++ if (ret) { ++ FT_PRINTERR("fi_listen", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int server_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ /* Wait for connection request from client */ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PRINTERR("fi_eq_sread", rd); ++ return (int) rd; ++ } ++ ++ fi = entry.info; ++ if (event != FI_CONNREQ) { ++ FT_ERR("Unexpected CM event %d", event); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ goto err; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ goto err; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ goto err; ++ ++ /* Accept the incoming connection. Also transitions endpoint to active state */ ++ ret = fi_accept(ep, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ goto err; ++ } ++ ++ /* Wait for the connection to be established */ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PRINTERR("fi_eq_sread", rd); ++ goto err; ++ } ++ ++ if (event != FI_CONNECTED || entry.fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ ++ ret = check_address(&ep->fid, "accept"); ++ if (ret) { ++ goto err; ++ } ++ ++ return 0; ++ ++err: ++ fi_reject(pep, fi->handle, NULL, 0); ++ return ret; ++} ++ ++static int client_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ ret = fi_getinfo(FT_FIVERSION, opts.dst_addr, opts.dst_port, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ return ret; ++ } ++ ++ ret = check_address(&pep->fid, "fi_endpoint (pep)"); ++ if (ret) ++ return ret; ++ ++ assert(fi->handle == &pep->fid); ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ /* Close the passive endpoint that we "stole" the source address ++ * from */ ++ FT_CLOSE_FID(pep); ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = check_address(&ep->fid, "fi_endpoint (ep)"); ++ if (ret) ++ return ret; ++ ++ /* Connect to server */ ++ ret = fi_connect(ep, fi->dest_addr, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ /* Wait for the connection to be established */ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "listen"); ++ return (int) rd; ++ } ++ ++ if (event != FI_CONNECTED || entry.fid != &ep->fid) { ++ FT_ERR("Unexpected CM event %d fid %p (ep %p)", event, entry.fid, ep); ++ return -FI_EOTHER; ++ } ++ ++ ret = check_address(&ep->fid, "connect"); ++ if (ret) { ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int setup_handle(void) ++{ ++ static char buf[BUFSIZ]; ++ struct addrinfo *ai, aihints; ++ const char *bound_addr_str; ++ char *saved_addr; ++ size_t saved_addrlen; ++ int ret; ++ ++ ret = ft_startup(); ++ if (ret) { ++ FT_ERR("ft_startup: %d", ret); ++ return ret; ++ } ++ ++ memset(&aihints, 0, sizeof aihints); ++ aihints.ai_flags = AI_PASSIVE; ++ ret = getaddrinfo(opts.src_addr, opts.src_port, &aihints, &ai); ++ if (ret == EAI_SYSTEM) { ++ FT_ERR("getaddrinfo for %s:%s: %s", ++ opts.src_addr, opts.src_port, strerror(errno)); ++ return -ret; ++ } else if (ret) { ++ FT_ERR("getaddrinfo: %s", gai_strerror(ret)); ++ return -FI_ENODATA; ++ } ++ ++ switch (ai->ai_family) { ++ case AF_INET: ++ hints->addr_format = FI_SOCKADDR_IN; ++ break; ++ case AF_INET6: ++ hints->addr_format = FI_SOCKADDR_IN6; ++ break; ++ } ++ ++ /* Get fabric info */ ++ ret = fi_getinfo(FT_FIVERSION, opts.src_addr, NULL, FI_SOURCE, hints, &fi_pep); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto freeai; ++ } ++ ++ /* Open passive endpoint without source address */ ++ saved_addr = fi_pep->src_addr; ++ saved_addrlen = fi_pep->src_addrlen; ++ fi_pep->src_addr = NULL; ++ fi_pep->src_addrlen = 0; ++ ++ ret = fi_fabric(fi_pep->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_fabric", ret); ++ goto out; ++ } ++ ++ ret = fi_eq_open(fabric, &eq_attr, &eq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_eq_open", ret); ++ goto out; ++ } ++ ++ /* Open a passive endpoint */ ++ ret = fi_passive_ep(fabric, fi_pep, &pep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_passive_ep", ret); ++ goto out; ++ } ++ ++ ret = fi_setname(&pep->fid, ai->ai_addr, ai->ai_addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_setname", ret); ++ goto out; ++ } ++ ++ ret = fi_getname(&pep->fid, &bound_addr, &bound_addr_len); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ goto out; ++ } ++ ++ /* Verify port number */ ++ switch (ai->ai_family) { ++ case AF_INET: ++ if (bound_addr.sin.sin_port == 0) { ++ FT_ERR("port number is 0 after fi_setname()"); ++ ret = -FI_EINVAL; ++ goto out; ++ } ++ break; ++ case AF_INET6: ++ if (bound_addr.sin6.sin6_port == 0) { ++ FT_ERR("port number is 0 after fi_setname()"); ++ ret = -FI_EINVAL; ++ goto out; ++ } ++ break; ++ } ++ ++ bound_addr_str = sockaddrstr(&bound_addr, bound_addr_len, buf, BUFSIZ); ++ if (!bound_addr_str) { ++ FT_ERR("Unable to get bound_addr as string!"); ++ ret = -FI_EINVAL; ++ goto out; ++ } ++ printf("bound_addr: \"%s\"\n", bound_addr_str); ++ ++ hints->handle = &pep->fid; ++out: ++ fi_pep->src_addr = saved_addr; ++ fi_pep->src_addrlen = saved_addrlen; ++freeai: ++ freeaddrinfo(ai); ++ return ret; ++} ++ ++static int run(void) ++{ ++ char *node, *service; ++ uint64_t flags; ++ int ret; ++ ++ ret = ft_read_addr_opts(&node, &service, hints, &flags, &opts); ++ if (ret) ++ return ret; ++ ++ if (!opts.src_port) ++ opts.src_port = "9229"; ++ ++ if (!opts.src_addr) { ++ fprintf(stderr, "Source address (-s) is required for this test\n"); ++ return -EXIT_FAILURE; ++ } ++ ++ ret = setup_handle(); ++ if (ret) ++ return ret; ++ ++ if (!opts.dst_addr) { ++ ret = server_listen(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? client_connect() : server_connect(); ++ if (ret) { ++ return ret; ++ } ++ ++ ret = ft_send_recv_greeting(ep); ++ ++ fi_shutdown(ep, 0); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple MSG client-sever example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_MSG; ++ hints->caps = FI_MSG; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ hints->addr_format = FI_SOCKADDR; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_ep.c +new file mode 100644 +index 000000000..fe1c8158b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_ep.c +@@ -0,0 +1,319 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++static struct fid_ep **eps; ++static char *data_bufs; ++static char **send_bufs; ++static char **recv_bufs; ++static struct fi_context *recv_ctx; ++static struct fi_context *send_ctx; ++static fi_addr_t *remote_addr; ++int num_eps = 3; ++ ++ ++static int alloc_multi_ep_res() ++{ ++ char *rx_buf_ptr; ++ int i; ++ ++ eps = calloc(num_eps, sizeof(*eps)); ++ remote_addr = calloc(num_eps, sizeof(*remote_addr)); ++ send_bufs = calloc(num_eps, sizeof(*send_bufs)); ++ recv_bufs = calloc(num_eps, sizeof(*recv_bufs)); ++ send_ctx = calloc(num_eps, sizeof(*send_ctx)); ++ recv_ctx = calloc(num_eps, sizeof(*recv_ctx)); ++ data_bufs = calloc(num_eps * 2, opts.transfer_size); ++ ++ if (!eps || !remote_addr || !send_bufs || !recv_bufs || ++ !send_ctx || !recv_ctx || !data_bufs) ++ return -FI_ENOMEM; ++ ++ rx_buf_ptr = data_bufs + opts.transfer_size * num_eps; ++ for (i = 0; i < num_eps; i++) { ++ send_bufs[i] = data_bufs + opts.transfer_size * i; ++ recv_bufs[i] = rx_buf_ptr + opts.transfer_size * i; ++ } ++ ++ return 0; ++} ++ ++static void free_ep_res() ++{ ++ int i; ++ ++ for (i = 0; i < num_eps; i++) ++ FT_CLOSE_FID(eps[i]); ++ ++ free(data_bufs); ++ free(send_bufs); ++ free(recv_bufs); ++ free(send_ctx); ++ free(recv_ctx); ++ free(remote_addr); ++ free(eps); ++} ++ ++static int do_transfers(void) ++{ ++ int i, ret; ++ ++ for (i = 0; i < num_eps; i++) { ++ rx_buf = recv_bufs[i]; ++ ret = ft_post_rx(eps[i], opts.transfer_size, &recv_ctx[i]); ++ if (ret) ++ return ret; ++ } ++ ++ for (i = 0; i < num_eps; i++) { ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) ++ ft_fill_buf(send_bufs[i], opts.transfer_size); ++ ++ tx_buf = send_bufs[i]; ++ ret = ft_post_tx(eps[i], remote_addr[i], opts.transfer_size, NO_CQ_DATA, &send_ctx[i]); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_get_tx_comp(num_eps); ++ if (ret < 0) ++ return ret; ++ ++ ret = ft_get_rx_comp(num_eps); ++ if (ret < 0) ++ return ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ for (i = 0; i < num_eps; i++) { ++ ret = ft_check_buf(recv_bufs[i], opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ for (i = 0; i < num_eps; i++) ++ ft_finalize_ep(eps[i]); ++ ++ printf("PASSED multi ep\n"); ++ return 0; ++} ++ ++static int setup_client_ep(struct fid_ep **ep) ++{ ++ int ret; ++ ++ ret = fi_endpoint(domain, fi, ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ret = ft_enable_ep(*ep, eq, av, txcq, rxcq, txcntr, rxcntr); ++ if (ret) ++ return ret; ++ ++ ret = ft_connect_ep(*ep, eq, fi->dest_addr); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int setup_server_ep(struct fid_ep **ep) ++{ ++ int ret; ++ ++ ret = ft_retrieve_conn_req(eq, &fi); ++ if (ret) ++ goto failed_accept; ++ ++ ret = fi_endpoint(domain, fi, ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ goto failed_accept; ++ } ++ ++ ret = ft_enable_ep(*ep, eq, av, txcq, rxcq, txcntr, rxcntr); ++ if (ret) ++ goto failed_accept; ++ ++ ret = ft_accept_connection(*ep, eq); ++ if (ret) ++ goto failed_accept; ++ ++ return 0; ++ ++failed_accept: ++ fi_reject(pep, fi->handle, NULL, 0); ++ return ret; ++} ++ ++static int setup_av_ep(struct fid_ep **ep, fi_addr_t *remote_addr) ++{ ++ int ret; ++ hints->src_addr = NULL; ++ ++ fi_freeinfo(fi); ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ ret = fi_endpoint(domain, fi, ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ret = ft_enable_ep(*ep, eq, av, txcq, rxcq, txcntr, rxcntr); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av_addr(av, *ep, remote_addr); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int i, ret; ++ ++ ret = alloc_multi_ep_res(); ++ if (ret) ++ return ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ ret = ft_init_fabric_cm(); ++ if (ret) ++ return ret; ++ } else { ++ opts.av_size = num_eps + 1; ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ } ++ ++ /* Create additional endpoints. */ ++ for (i = 0; i < num_eps; i++) { ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ if (opts.dst_addr) { ++ ret = setup_client_ep(&eps[i]); ++ if (ret) ++ return ret; ++ } else { ++ ret = setup_server_ep(&eps[i]); ++ if (ret) ++ return ret; ++ } ++ } else { ++ ret = setup_av_ep(&eps[i], &remote_addr[i]); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ tx_cq_cntr = rx_cq_cntr = 0; ++ tx_seq = rx_seq = 0; ++ ret = do_transfers(); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.transfer_size = 256; ++ opts.options |= FT_OPT_SKIP_REG_MR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "c:vh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'c': ++ num_eps = atoi(optarg); ++ break; ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Multi endpoint test"); ++ FT_PRINT_OPTS_USAGE("-c ", ++ "number of endpoints to create and test (def 3)"); ++ FT_PRINT_OPTS_USAGE("-v", "Enable DataCheck testing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ ++ ret = run_test(); ++ ++ free_ep_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_mr.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_mr.c +new file mode 100644 +index 000000000..de01d7b62 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/multi_mr.c +@@ -0,0 +1,325 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++struct test_mr { ++ uint8_t *buf; ++ struct fid_cntr *rcntr; ++ uint64_t rcntr_next; ++ struct fid_mr *mr; ++ struct fi_rma_iov *remote; ++}; ++ ++struct test_mr *mr_res_array; ++uint8_t *mr_buf_array; ++struct fi_rma_iov *remote_array; ++uint64_t mr_count; ++int verbose; ++ ++static int wait_cntr(struct fid_cntr *cntr, uint64_t *cntr_next) ++{ ++ /* 30 second wait timeout */ ++ int ret = fi_cntr_wait(cntr, *cntr_next, 30 * 1000); ++ if (ret < 0) ++ return ret; ++ ++ *cntr_next += 1; ++ ++ return 0; ++} ++ ++static int free_mr_res() ++{ ++ int i; ++ ++ if (!mr_res_array) ++ return 0; ++ ++ for (i = 0; i < mr_count; i++) { ++ FT_CLOSE_FID(mr_res_array[i].mr); ++ FT_CLOSE_FID(mr_res_array[i].rcntr); ++ } ++ free(mr_res_array); ++ free(remote_array); ++ free(mr_buf_array); ++ ++ return 0; ++} ++ ++static int alloc_multi_mr_res() ++{ ++ int i = 0; ++ ++ mr_res_array = calloc(mr_count, sizeof(*mr_res_array)); ++ if (!mr_res_array) ++ return -FI_ENOMEM; ++ ++ remote_array = calloc(mr_count, sizeof(*remote_array)); ++ if (!remote_array) ++ return -FI_ENOMEM; ++ ++ mr_buf_array = calloc(mr_count, opts.transfer_size); ++ if (!mr_buf_array) ++ return -FI_ENOMEM; ++ ++ for (i = 0; i < mr_count; i++) { ++ mr_res_array[i].remote = &remote_array[i]; ++ mr_res_array[i].buf = &mr_buf_array[i]; ++ } ++ ++ return 0; ++} ++ ++static int init_multi_mr_res() ++{ ++ int ret = 0, i; ++ ++ if ((1ULL << fi->domain_attr->mr_key_size) < mr_count) { ++ fprintf(stderr, "ERROR: too many memory regions for unique mr keys"); ++ return -FI_EINVAL; ++ } ++ ++ ret = alloc_multi_mr_res(); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < mr_count; i++) { ++ ret = fi_cntr_open(domain, ++ &cntr_attr, ++ &mr_res_array[i].rcntr, ++ NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ ++ mr_res_array[i].remote->len = opts.transfer_size; ++ mr_res_array[i].remote->addr = 0; ++ ++ memset(mr_res_array[i].buf, 0, opts.transfer_size); ++ ++ mr_res_array[i].rcntr_next = 1; ++ ++ mr_res_array[i].remote->key = i + 1; ++ ++ ret = fi_mr_reg(domain, mr_res_array[i].buf, ++ opts.transfer_size, FI_REMOTE_WRITE, ++ 0, mr_res_array[i].remote->key, ++ 0, &mr_res_array[i].mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ if (verbose) { ++ printf("MR_REG:domain_ptr, buf_ptr, mr_size, mr_ptr, mr_key)\n"); ++ printf("%p, %p, %d, %p, %lu)\n", ++ domain, ++ mr_res_array[i].buf, ++ opts.transfer_size, ++ &mr_res_array[i].mr, ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ } ++ ++ ret = fi_mr_bind(mr_res_array[i].mr, ++ &mr_res_array[i].rcntr->fid, ++ FI_REMOTE_WRITE); ++ if (ret) { ++ FT_PRINTERR("fi_mr_bind", ret); ++ return ret; ++ } ++ } ++ ++ return ret; ++} ++ ++static int mr_key_test() ++{ ++ int i, ret = 0; ++ struct fi_context rma_ctx; ++ ++ for (i = 0; i < mr_count; i++) { ++ tx_buf = (char *)mr_res_array[i].buf; ++ ++ if (opts.dst_addr) { ++ ft_fill_buf(mr_res_array[i].buf, ++ opts.transfer_size); ++ ++ if (verbose) ++ printf("write to host's key %lx\n", ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ ++ ft_post_rma(FT_RMA_WRITE, ep, opts.transfer_size, ++ mr_res_array[i].remote, &rma_ctx); ++ ++ if (verbose) ++ printf("sent successfully\n"); ++ ++ ret = wait_cntr(mr_res_array[i].rcntr, ++ &mr_res_array[i].rcntr_next); ++ if (ret) ++ return ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ if (verbose) ++ printf("checking result in buffer %p, key %lx\n", ++ mr_res_array[i].buf, ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ ++ ret = ft_check_buf(mr_res_array[i].buf, ++ opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ } else { ++ ret = wait_cntr(mr_res_array[i].rcntr, ++ &mr_res_array[i].rcntr_next); ++ if (ret) ++ return ret; ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ if (verbose) ++ printf("checking result in buffer %p, key %lx\n", ++ mr_res_array[i].buf, ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ ++ ret = ft_check_buf(mr_res_array[i].buf, ++ opts.transfer_size); ++ if (ret) ++ return ret; ++ } ++ ++ ft_fill_buf(mr_res_array[i].buf, ++ opts.transfer_size); ++ ++ if (verbose) ++ printf("write to client's key %lx\n", ++ (unsigned long)fi_mr_key(mr_res_array[i].mr)); ++ ++ ft_post_rma(FT_RMA_WRITE, ep, opts.transfer_size, ++ mr_res_array[i].remote, &rma_ctx); ++ ++ if (verbose) ++ printf("sent successfully\n"); ++ } ++ } ++ printf("GOOD, multi mr key test complete\n"); ++ ++ return ret; ++} ++ ++static int run_test(void) ++{ ++ int ret = 0; ++ ++ ft_mr_alloc_func = init_multi_mr_res; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = mr_key_test(); ++ ++ ft_sync(); ++ ft_finalize(); ++ ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.transfer_size = 4096; ++ mr_count = 2; ++ verbose = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "c:Vvh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'c': ++ mr_count = strtoull(optarg, NULL, 10); ++ break; ++ case 'V': ++ verbose = 1; ++ break; ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Ping-pong multi memory region test"); ++ FT_PRINT_OPTS_USAGE("-c ", "number of memory regions to create and test"); ++ FT_PRINT_OPTS_USAGE("-V", "Enable verbose printing"); ++ FT_PRINT_OPTS_USAGE("-v", "Enable DataCheck testing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_RMA | FI_RMA_EVENT | FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ free_mr_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/poll.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/poll.c +new file mode 100644 +index 000000000..5fd01c17d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/poll.c +@@ -0,0 +1,244 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++#define MAX_POLL_CNT 10 ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ struct fi_poll_attr poll_attr; ++ int ret; ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ memset(&poll_attr, 0, sizeof poll_attr); ++ ret = fi_poll_open(domain, &poll_attr, &pollset); ++ if (ret) { ++ FT_PRINTERR("fi_poll_open", ret); ++ return ret; ++ } ++ ++ if (txcq) { ++ ret = fi_poll_add(pollset, &txcq->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (rxcq) { ++ ret = fi_poll_add(pollset, &rxcq->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (txcntr) { ++ ret = fi_poll_add(pollset, &txcntr->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ if (rxcntr) { ++ ret = fi_poll_add(pollset, &rxcntr->fid, 0); ++ if (ret) ++ goto err; ++ } ++ ++ return 0; ++err: ++ FT_PRINTERR("fi_poll_add", ret); ++ return ret; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ return 0; ++} ++ ++static int send_recv() ++{ ++ struct fid_cq *cq; ++ void *context[MAX_POLL_CNT]; ++ struct fi_cq_entry comp; ++ int ret; ++ int ret_count = 0; ++ int i, tx_cntr_val = 0, rx_cntr_val = 0; ++ ++ fprintf(stdout, "Posting a send...\n"); ++ ret = ft_post_tx(ep, remote_fi_addr, tx_size, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ while (((opts.options & FT_OPT_TX_CQ) && (tx_cq_cntr < tx_seq)) || ++ ((opts.options & FT_OPT_TX_CNTR) && (tx_cntr_val < tx_seq)) || ++ ((opts.options & FT_OPT_RX_CQ) && (rx_cq_cntr < rx_seq)) || ++ ((opts.options & FT_OPT_RX_CNTR) && (rx_cntr_val < rx_seq))) { ++ ++ /* Poll send and recv CQs/Cntrs */ ++ do { ++ ret_count = fi_poll(pollset, context, MAX_POLL_CNT); ++ if (ret_count < 0) { ++ FT_PRINTERR("fi_poll", ret_count); ++ return ret_count; ++ } ++ } while (!ret_count); ++ ++ fprintf(stdout, "Retrieved %d event(s)\n", ret_count); ++ ++ for (i = 0; i < ret_count; i++) { ++ if (context[i] == &txcq) { ++ printf("Send completion received\n"); ++ cq = txcq; ++ tx_cq_cntr++; ++ } else if (context[i] == &rxcq) { ++ printf("Recv completion received\n"); ++ cq = rxcq; ++ rx_cq_cntr++; ++ } else if (context[i] == &txcntr) { ++ printf("Send counter poll-event\n"); ++ tx_cntr_val = fi_cntr_read(txcntr); ++ if (tx_cntr_val > tx_seq) { ++ FT_ERR("Invalid tx counter event\n"); ++ FT_ERR("expected: %" PRIu64 ", found: " ++ "%d\n", tx_seq, tx_cntr_val); ++ return -1; ++ } ++ continue; ++ } else if (context[i] == &rxcntr) { ++ printf("Recv counter poll-event\n"); ++ rx_cntr_val = fi_cntr_read(rxcntr); ++ if (rx_cntr_val > rx_seq) { ++ FT_ERR("Invalid rx counter event\n"); ++ FT_ERR("expected: %" PRIu64 ", found: " ++ "%d\n", rx_seq, rx_cntr_val); ++ return -1; ++ } ++ continue; ++ } else { ++ FT_ERR("Unknown completion received\n"); ++ return -1; ++ } ++ ++ /* Read the completion entry */ ++ ret = fi_cq_read(cq, &comp, 1); ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(cq); ++ } else { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ return ret; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av(); ++ if (ret) ++ return ret; ++ ++ return send_recv(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A client-server example that uses poll.\n"); ++ FT_PRINT_OPTS_USAGE("-t ", "completion type [queue, counter]"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm.c +new file mode 100644 +index 000000000..e9edf9b4c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm.c +@@ -0,0 +1,84 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ return ft_send_recv_greeting(ep); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple RDM client-sever example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_atomic.c +new file mode 100644 +index 000000000..3750f9a66 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_atomic.c +@@ -0,0 +1,544 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "shared.h" ++ ++static enum fi_op op_type = FI_MIN; ++static void *result; ++static void *compare; ++ ++static struct fid_mr *mr_result; ++static struct fid_mr *mr_compare; ++static struct fi_context fi_ctx_atomic; ++ ++static enum fi_datatype datatype; ++static size_t *count; ++static int run_all_ops = 1, run_all_datatypes = 1; ++ ++static enum fi_op get_fi_op(char *op) ++{ ++ if (!strcmp(op, "min")) ++ return FI_MIN; ++ else if (!strcmp(op, "max")) ++ return FI_MAX; ++ else if (!strcmp(op, "sum")) ++ return FI_SUM; ++ else if (!strcmp(op, "prod")) ++ return FI_PROD; ++ else if (!strcmp(op, "lor")) ++ return FI_LOR; ++ else if (!strcmp(op, "land")) ++ return FI_LAND; ++ else if (!strcmp(op, "bor")) ++ return FI_BOR; ++ else if (!strcmp(op, "band")) ++ return FI_BAND; ++ else if (!strcmp(op, "lxor")) ++ return FI_LXOR; ++ else if (!strcmp(op, "bxor")) ++ return FI_BXOR; ++ else if (!strcmp(op, "read")) ++ return FI_ATOMIC_READ; ++ else if (!strcmp(op, "write")) ++ return FI_ATOMIC_WRITE; ++ else if (!strcmp(op, "cswap")) ++ return FI_CSWAP; ++ else if (!strcmp(op, "cswap_ne")) ++ return FI_CSWAP_NE; ++ else if (!strcmp(op, "cswap_le")) ++ return FI_CSWAP_LE; ++ else if (!strcmp(op, "cswap_lt")) ++ return FI_CSWAP_LT; ++ else if (!strcmp(op, "cswap_ge")) ++ return FI_CSWAP_GE; ++ else if (!strcmp(op, "cswap_gt")) ++ return FI_CSWAP_GT; ++ else if (!strcmp(op, "mswap")) ++ return FI_MSWAP; ++ else { ++ fprintf(stderr, "Not a valid atomic operation\n"); ++ return FI_ATOMIC_OP_LAST; ++ } ++} ++ ++static enum fi_datatype get_fi_datatype(char *op) ++{ ++ if (!strcmp(op, "int8")) ++ return FI_INT8; ++ else if (!strcmp(op, "uint8")) ++ return FI_UINT8; ++ else if (!strcmp(op, "int16")) ++ return FI_INT16; ++ else if (!strcmp(op, "uint16")) ++ return FI_UINT16; ++ else if (!strcmp(op, "int32")) ++ return FI_INT32; ++ else if (!strcmp(op, "uint32")) ++ return FI_UINT32; ++ else if (!strcmp(op, "int64")) ++ return FI_INT64; ++ else if (!strcmp(op, "uint64")) ++ return FI_UINT64; ++ else if (!strcmp(op, "float")) ++ return FI_FLOAT; ++ else if (!strcmp(op, "double")) ++ return FI_DOUBLE; ++ else if (!strcmp(op, "float_complex")) ++ return FI_FLOAT_COMPLEX; ++ else if (!strcmp(op, "double_complex")) ++ return FI_DOUBLE_COMPLEX; ++ else if (!strcmp(op, "long_double")) ++ return FI_LONG_DOUBLE; ++ else if (!strcmp(op, "long_double_complex")) ++ return FI_LONG_DOUBLE_COMPLEX; ++ else { ++ fprintf(stderr, "Not a valid atomic operation\n"); ++ return FI_DATATYPE_LAST; ++ } ++} ++ ++static void print_opts_usage(char *name) ++{ ++ ft_csusage(name, NULL); ++ /* Atomic op type */ ++ FT_PRINT_OPTS_USAGE("-o ", "atomic op type: all|min|max|sum|prod|lor|"); ++ FT_PRINT_OPTS_USAGE("", "land|bor|band|lxor|bxor|read|write|cswap|cswap_ne|" ++ "cswap_le|cswap_lt|"); ++ FT_PRINT_OPTS_USAGE("", "cswap_ge|cswap_gt|mswap (default: all)"); ++ /* Atomic datatype */ ++ FT_PRINT_OPTS_USAGE("-z ", "atomic datatype: int8|uint8|int16|uint16|"); ++ FT_PRINT_OPTS_USAGE("", "int32|uint32|int64|uint64|float|double|" ++ "float_complex|double_complex|"); ++ FT_PRINT_OPTS_USAGE("", "long_double|long_double_complex (default: all)"); ++} ++ ++#define create_atomic_op_executor(type) \ ++static inline int execute_atomic_ ## type ## _op(enum fi_op op_type, \ ++ enum fi_datatype datatype) \ ++{ \ ++ int ret = FI_SUCCESS, len, i; \ ++ len = snprintf((test_name), sizeof(test_name), "%s_", \ ++ fi_tostr(&(datatype), FI_TYPE_ATOMIC_TYPE)); \ ++ snprintf((test_name) + len, sizeof(test_name) - len, "%s_"#type"_lat", \ ++ fi_tostr(&op_type, FI_TYPE_ATOMIC_OP)); \ ++ opts.transfer_size = datatype_to_size(datatype); \ ++ \ ++ ft_start(); \ ++ for (i = 0; i < opts.iterations; i++) { \ ++ ret = execute_ ## type ## _atomic_op(op_type); \ ++ if (ret) \ ++ break; \ ++ } \ ++ ft_stop(); \ ++ report_perf(); \ ++ \ ++ return ret; \ ++} ++ ++#define create_atomic_op_handler(type) \ ++create_atomic_op_executor(type) \ ++static inline int handle_atomic_ ## type ## _op(int run_all_datatypes, \ ++ enum fi_op op_type, \ ++ size_t *count) \ ++{ \ ++ int ret = FI_SUCCESS; \ ++ \ ++ if (run_all_datatypes) { \ ++ for (datatype = 0; datatype < FI_DATATYPE_LAST; datatype++) { \ ++ ret = check_ ## type ## _atomic_op(ep, op_type, \ ++ datatype, count); \ ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP) { \ ++ fprintf(stderr, \ ++ "Provider doesn't support %s ", \ ++ fi_tostr(&op_type, \ ++ FI_TYPE_ATOMIC_OP)); \ ++ fprintf(stderr, \ ++ #type" atomic operation on %s\n", \ ++ fi_tostr(&datatype, \ ++ FI_TYPE_ATOMIC_TYPE)); \ ++ continue; \ ++ } else if (ret) { \ ++ goto fn; \ ++ } \ ++ \ ++ ret = execute_atomic_ ##type ## _op(op_type, datatype); \ ++ if (ret) \ ++ goto fn; \ ++ } \ ++ } else { \ ++ ret = check_ ## type ## _atomic_op(ep, op_type, \ ++ datatype, count); \ ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP) { \ ++ fprintf(stderr, \ ++ "Provider doesn't support %s ", \ ++ fi_tostr(&op_type, \ ++ FI_TYPE_ATOMIC_OP)); \ ++ fprintf(stderr, \ ++ #type" atomic operation on %s\n", \ ++ fi_tostr(&datatype, \ ++ FI_TYPE_ATOMIC_TYPE)); \ ++ goto fn; \ ++ } else if (ret) { \ ++ goto fn; \ ++ } \ ++ \ ++ ret = execute_atomic_ ## type ##_op(op_type, datatype); \ ++ } \ ++ \ ++fn: \ ++ return ret; \ ++} ++ ++ ++static inline int execute_base_atomic_op(enum fi_op op) ++{ ++ int ret; ++ ++ ret = ft_post_atomic(FT_ATOMIC_BASE, ep, NULL, NULL, NULL, NULL, ++ &remote, datatype, op, &fi_ctx_atomic); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ ++ return ret; ++} ++ ++static inline int execute_fetch_atomic_op(enum fi_op op) ++{ ++ int ret; ++ ++ ret = ft_post_atomic(FT_ATOMIC_FETCH, ep, NULL, NULL, result, ++ fi_mr_desc(mr_result), &remote, datatype, ++ op, &fi_ctx_atomic); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ ++ return ret; ++} ++ ++static inline int execute_compare_atomic_op(enum fi_op op) ++{ ++ int ret; ++ ++ ret = ft_post_atomic(FT_ATOMIC_COMPARE, ep, compare, fi_mr_desc(mr_compare), ++ result, fi_mr_desc(mr_result), &remote, datatype, ++ op, &fi_ctx_atomic); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(tx_seq); ++ ++ return ret; ++} ++ ++static void report_perf(void) ++{ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, &start, &end, 1, opts.argc, ++ opts.argv); ++ else ++ show_perf(test_name, opts.transfer_size, opts.iterations, &start, &end, 1); ++} ++ ++create_atomic_op_handler(base) ++create_atomic_op_handler(fetch) ++create_atomic_op_handler(compare) ++ ++static int run_op(void) ++{ ++ int ret = -FI_EINVAL; ++ ++ count = (size_t *)malloc(sizeof(*count)); ++ if (!count) { ++ ret = -FI_ENOMEM; ++ perror("malloc"); ++ goto fn; ++ } ++ ft_sync(); ++ ++ switch (op_type) { ++ case FI_MIN: ++ case FI_MAX: ++ case FI_SUM: ++ case FI_PROD: ++ case FI_LOR: ++ case FI_LAND: ++ case FI_BOR: ++ case FI_BAND: ++ case FI_LXOR: ++ case FI_BXOR: ++ case FI_ATOMIC_WRITE: ++ ret = handle_atomic_base_op(run_all_datatypes, ++ op_type, count); ++ break; ++ case FI_ATOMIC_READ: ++ ret = handle_atomic_fetch_op(run_all_datatypes, ++ op_type, count); ++ break; ++ case FI_CSWAP: ++ case FI_CSWAP_NE: ++ case FI_CSWAP_LE: ++ case FI_CSWAP_LT: ++ case FI_CSWAP_GE: ++ case FI_CSWAP_GT: ++ case FI_MSWAP: ++ ret = handle_atomic_compare_op(run_all_datatypes, ++ op_type, count); ++ break; ++ default: ++ FT_WARN("Invalid atomic operation type %d\n", op_type); ++ break; ++ } ++ ++ free(count); ++fn: ++ return ret; ++} ++ ++static int run_ops(void) ++{ ++ int ret; ++ ++ for (op_type = FI_MIN; op_type < FI_ATOMIC_OP_LAST; op_type++) { ++ ret = run_op(); ++ if (ret && ret != -FI_ENOSYS && ret != -FI_EOPNOTSUPP) { ++ FT_PRINTERR("run_op", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ return run_all_ops ? run_ops() : run_op(); ++} ++ ++static void free_res(void) ++{ ++ FT_CLOSE_FID(mr_result); ++ FT_CLOSE_FID(mr_compare); ++ if (result) { ++ free(result); ++ result = NULL; ++ } ++ if (compare) { ++ free(compare); ++ compare = NULL; ++ } ++} ++ ++static uint64_t get_mr_key() ++{ ++ static uint64_t user_key = FT_MR_KEY; ++ ++ return ((fi->domain_attr->mr_mode == FI_MR_BASIC) || ++ (fi->domain_attr->mr_mode & FI_MR_PROV_KEY)) ? ++ 0 : user_key++; ++} ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ int ret; ++ int mr_local = !!(fi->domain_attr->mr_mode & FI_MR_LOCAL); ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ result = malloc(buf_size); ++ if (!result) { ++ perror("malloc"); ++ return -1; ++ } ++ ++ compare = malloc(buf_size); ++ if (!compare) { ++ perror("malloc"); ++ return -1; ++ } ++ ++ // registers local data buffer buff that used for send/recv ++ // and local/remote RMA. ++ ret = fi_mr_reg(domain, buf, buf_size, ++ ((mr_local ? ++ FI_SEND | FI_RECV | FI_READ | FI_WRITE : 0) | ++ FI_REMOTE_READ | FI_REMOTE_WRITE), 0, ++ get_mr_key(), 0, &mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ // Set global descriptor for FI_MR_LOCAL. ++ if (mr_local) ++ mr_desc = fi_mr_desc(mr); ++ ++ // registers local data buffer that stores results ++ ret = fi_mr_reg(domain, result, buf_size, ++ (mr_local ? FI_READ : 0) | FI_REMOTE_WRITE, 0, ++ get_mr_key(), 0, &mr_result, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", -ret); ++ return ret; ++ } ++ ++ // registers local data buffer that contains comparison data ++ ret = fi_mr_reg(domain, compare, buf_size, ++ (mr_local ? FI_WRITE : 0) | FI_REMOTE_READ, 0, ++ get_mr_key(), 0, &mr_compare, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_av(); ++ if (ret) ++ goto out; ++ ++ ret = ft_exchange_keys(&remote); ++ if (ret) ++ goto out; ++ ++ ret = run_test(); ++ if (ret) ++ goto out; ++ ++ ft_sync(); ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SKIP_REG_MR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "ho:z:" CS_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ case 'o': ++ if (!strncasecmp("all", optarg, 3)) { ++ run_all_ops = 1; ++ } else { ++ run_all_ops = 0; ++ op_type = get_fi_op(optarg); ++ if (op_type == FI_ATOMIC_OP_LAST) { ++ print_opts_usage(argv[0]); ++ return EXIT_FAILURE; ++ } ++ } ++ break; ++ case 'z': ++ if (!strncasecmp("all", optarg, 3)) { ++ run_all_datatypes = 1; ++ } else { ++ run_all_datatypes = 0; ++ datatype = get_fi_datatype(optarg); ++ if (datatype == FI_DATATYPE_LAST) { ++ print_opts_usage(argv[0]); ++ return EXIT_FAILURE; ++ } ++ } ++ break; ++ default: ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ print_opts_usage(argv[0]); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_ATOMICS; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ free_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_deferred_wq.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_deferred_wq.c +new file mode 100644 +index 000000000..1077187d2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_deferred_wq.c +@@ -0,0 +1,672 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++struct fi_context2 trig_ctx1, trig_ctx2; ++static char *welcome_text = "Hello from Client!"; ++static char *write_text = "This is a successful trigger"; ++struct fi_deferred_work work; ++struct fid_cntr *test_cntr; ++uint64_t n_trig, rx_exp; ++static char *result_buf, *compare_buf; ++static struct fid_mr *mr_result, *mr_compare; ++int use_alias = 0; ++struct fid_ep *trig_ep; ++enum fi_op_type tested_op; ++ ++static void format_simple_msg(struct fi_msg *msg, struct iovec *iov, void *src, ++ size_t size, void *ctx) ++{ ++ msg->context = ctx; ++ msg->desc = mr_desc; ++ msg->iov_count = 1; ++ msg->addr = remote_fi_addr; ++ msg->data = 0; ++ ++ iov->iov_base = src; ++ iov->iov_len = size; ++ msg->msg_iov = iov; ++} ++ ++static void format_simple_msg_tagged(struct fi_msg_tagged *msg, struct iovec *iov, ++ void *src, size_t size, void *ctx, ++ uint64_t tag) ++{ ++ msg->context = ctx; ++ msg->desc = mr_desc; ++ msg->iov_count = 1; ++ msg->addr = remote_fi_addr; ++ msg->data = 0; ++ msg->tag = tag; ++ ++ iov->iov_base = src; ++ iov->iov_len = size; ++ msg->msg_iov = iov; ++} ++ ++static void format_simple_msg_rma(struct fi_msg_rma *msg, struct iovec *iov, ++ struct fi_rma_iov *rma_iov, void *src, ++ size_t size, void *ctx) ++{ ++ msg->context = ctx; ++ msg->desc = mr_desc; ++ msg->iov_count = 1; ++ msg->addr = remote_fi_addr; ++ msg->rma_iov_count = 1; ++ ++ iov->iov_base = src; ++ iov->iov_len = size; ++ msg->msg_iov = iov; ++ ++ rma_iov->addr = 0; ++ rma_iov->key = FT_MR_KEY; ++ rma_iov->len = size; ++ msg->rma_iov = rma_iov; ++} ++ ++static void format_simple_msg_atomic(struct fi_msg_atomic *msg, struct fi_ioc *iov, ++ struct fi_rma_ioc *rma_iov, void *src, size_t size, ++ void *ctx, enum fi_datatype datatype, ++ enum fi_op op) ++{ ++ msg->context = ctx; ++ msg->desc = mr_desc; ++ msg->iov_count = 1; ++ msg->rma_iov_count = 1; ++ msg->addr = remote_fi_addr; ++ msg->data = 0; ++ msg->datatype = datatype; ++ msg->op = op; ++ msg->data = 0; ++ ++ iov->addr = src; ++ iov->count = size; ++ msg->msg_iov = iov; ++ ++ rma_iov->addr = 0; ++ rma_iov->count = size; ++ rma_iov->key = FT_MR_KEY; ++ msg->rma_iov = rma_iov; ++} ++ ++static void format_simple_msg_fetch(struct fi_msg_fetch *msg, struct fi_ioc *iov, ++ void *src, size_t size) ++{ ++ msg->desc = fi_mr_desc(mr_result); ++ ++ iov->addr = src; ++ iov->count = size; ++ ++ msg->iov_count = 1; ++ msg->msg_iov = iov; ++} ++ ++static void format_simple_msg_compare(struct fi_msg_compare *msg, struct fi_ioc *iov, ++ void *src, size_t size) ++{ ++ msg->desc = fi_mr_desc(mr_compare); ++ ++ iov->addr = src; ++ iov->count = size; ++ ++ msg->iov_count = 1; ++ msg->msg_iov = iov; ++} ++ ++static int check_data() ++{ ++ int ret, i; ++ char c = ~0; ++ ++ switch (tested_op) { ++ case FI_OP_COMPARE_ATOMIC: ++ case FI_OP_FETCH_ATOMIC: ++ if (strncmp(result_buf, welcome_text, strlen(welcome_text))) { ++ printf("Data mismatch in fetch buffer..."); ++ return 1; ++ } ++ /* fall through */ ++ case FI_OP_ATOMIC: ++ for (i = 0; i < strlen(welcome_text); i++) { ++ if (rx_buf[i] != c) { ++ printf("Data mismatch found at byte %d...", i); ++ return 1; ++ } ++ } ++ break; ++ case FI_OP_CNTR_SET: ++ case FI_OP_CNTR_ADD: ++ ret = fi_cntr_wait(test_cntr, 10, -1); ++ if (ret) ++ return ret; ++ break; ++ case FI_OP_READ: ++ case FI_OP_WRITE: ++ if (strncmp(result_buf, write_text, strlen(write_text))) { ++ printf("Data mismatch in read buffer..."); ++ return 1; ++ } ++ /* fall through */ ++ default: ++ if (strncmp(rx_buf, write_text, strlen(write_text))) { ++ printf("Data mismatch in rx_buf, found..."); ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++static int send_wait_check() ++{ ++ int ret; ++ ++ if (opts.dst_addr) { ++ ret = fi_write(ep, tx_buf, strlen(welcome_text), mr_desc, ++ remote_fi_addr, 0, FT_MR_KEY, &tx_ctx); ++ if (ret) { ++ FT_PRINTERR("fi_write", ret); ++ return ret; ++ } ++ } ++ ++ ret = fi_cntr_wait(test_cntr, n_trig, -1); ++ if (ret) ++ return ret; ++ ++ ret = fi_cntr_wait(rxcntr, rx_exp, -1); ++ if (ret) ++ return ret; ++ ++ return check_data(); ++} ++ ++static int cntr_trigger() ++{ ++ int ret; ++ struct fi_op_cntr op_cntr; ++ ++ op_cntr.cntr = test_cntr; ++ op_cntr.value = 5; ++ work.op_type = FI_OP_CNTR_SET; ++ ++ work.op.cntr = &op_cntr; ++ ++ ret = fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++ if (ret) ++ return ret; ++ ++ work.op_type = FI_OP_CNTR_ADD; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int rma_trigger() ++{ ++ int ret; ++ struct fi_msg_rma msg; ++ struct fi_rma_iov rma_iov; ++ struct iovec iov; ++ struct fi_op_rma rma; ++ ++ format_simple_msg_rma(&msg, &iov, &rma_iov, ++ tx_buf + strlen(welcome_text), ++ strlen(write_text), &work.context); ++ rma.ep = trig_ep; ++ rma.msg = msg; ++ rma.flags = 0; ++ ++ work.op.rma = &rma; ++ work.op_type = FI_OP_WRITE; ++ ret = fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++ if (ret) ++ return ret; ++ ++ format_simple_msg_rma(&msg, &iov, &rma_iov, ++ result_buf, strlen(write_text), &work.context); ++ work.op_type = FI_OP_READ; ++ work.triggering_cntr = test_cntr; ++ work.threshold = 1; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int atomic_trigger() ++{ ++ int ret; ++ size_t count; ++ struct fi_op_atomic atomic; ++ struct fi_msg_atomic msg; ++ struct fi_ioc iov; ++ struct fi_rma_ioc rma_iov; ++ ++ ret = check_base_atomic_op(ep, FI_BOR, FI_UINT8, &count); ++ if (ret) ++ return ret; ++ ++ format_simple_msg_atomic(&msg, &iov, &rma_iov, ++ tx_buf + strlen(welcome_text), ++ strlen(welcome_text), &work.context, FI_UINT8, FI_BOR); ++ atomic.ep = trig_ep; ++ atomic.msg = msg; ++ atomic.flags = 0; ++ work.op_type = FI_OP_ATOMIC; ++ ++ work.op.atomic = &atomic; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int fetch_atomic_trigger() ++{ ++ int ret; ++ size_t count; ++ struct fi_op_fetch_atomic fetch_atomic; ++ struct fi_msg_atomic msg; ++ struct fi_msg_fetch fetch; ++ struct fi_ioc iov; ++ struct fi_ioc fetch_iov; ++ struct fi_rma_ioc rma_iov; ++ ++ ret = check_fetch_atomic_op(ep, FI_BOR, FI_UINT8, &count); ++ if (ret) ++ return ret; ++ ++ format_simple_msg_atomic(&msg, &iov, &rma_iov, ++ tx_buf + strlen(welcome_text), ++ strlen(welcome_text), &work.context, FI_UINT8, FI_BOR); ++ format_simple_msg_fetch(&fetch, &fetch_iov, result_buf, strlen(welcome_text)); ++ ++ fetch_atomic.ep = trig_ep; ++ fetch_atomic.msg = msg; ++ fetch_atomic.fetch = fetch; ++ fetch_atomic.flags = 0; ++ work.op_type = FI_OP_FETCH_ATOMIC; ++ ++ work.op.fetch_atomic = &fetch_atomic; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int compare_atomic_trigger() ++{ ++ int ret; ++ size_t count; ++ struct fi_op_compare_atomic compare_atomic; ++ struct fi_msg_atomic msg; ++ struct fi_msg_fetch fetch; ++ struct fi_msg_compare compare; ++ struct fi_ioc iov; ++ struct fi_ioc fetch_iov; ++ struct fi_ioc compare_iov; ++ struct fi_rma_ioc rma_iov; ++ ++ ret = check_compare_atomic_op(ep, FI_CSWAP_LE, FI_UINT8, &count); ++ if (ret) ++ return ret; ++ ++ format_simple_msg_atomic(&msg, &iov, &rma_iov, ++ tx_buf + strlen(welcome_text), ++ strlen(welcome_text), &work.context, FI_UINT8, FI_CSWAP_LE); ++ format_simple_msg_fetch(&fetch, &fetch_iov, result_buf, strlen(welcome_text)); ++ format_simple_msg_compare(&compare, &compare_iov, compare_buf, strlen(welcome_text)); ++ ++ compare_atomic.ep = trig_ep; ++ compare_atomic.msg = msg; ++ compare_atomic.fetch = fetch; ++ compare_atomic.compare = compare; ++ compare_atomic.flags = 0; ++ work.op_type = FI_OP_COMPARE_ATOMIC; ++ ++ work.op.compare_atomic = &compare_atomic; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int tsend_trigger() ++{ ++ int ret; ++ struct fi_op_tagged tagged; ++ struct fi_msg_tagged msg; ++ struct iovec msg_iov; ++ ++ format_simple_msg_tagged(&msg, &msg_iov, rx_buf, ++ strlen(write_text), &work.context, 0xCAFE); ++ tagged.ep = trig_ep; ++ tagged.msg = msg; ++ tagged.flags = 0; ++ work.op.tagged = &tagged; ++ ++ work.op_type = FI_OP_TRECV; ++ ret = fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++ if (ret) ++ return ret; ++ ++ work.context = trig_ctx2; ++ ++ format_simple_msg_tagged(&msg, &msg_iov, tx_buf + strlen(welcome_text), ++ strlen(write_text), &work.context, 0xCAFE); ++ work.op_type = FI_OP_TSEND; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int send_trigger() ++{ ++ int ret; ++ struct fi_op_msg op_msg; ++ struct fi_msg msg; ++ struct iovec msg_iov; ++ ++ format_simple_msg(&msg, &msg_iov, rx_buf, ++ strlen(write_text), &work.context); ++ ++ op_msg.ep = trig_ep; ++ op_msg.msg = msg; ++ op_msg.flags = 0; ++ work.op.msg = &op_msg; ++ ++ work.op_type = FI_OP_RECV; ++ ret = fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++ if (ret) ++ return ret; ++ ++ work.context = trig_ctx2; ++ ++ format_simple_msg(&msg, &msg_iov, tx_buf + strlen(welcome_text), ++ strlen(write_text), &work.context); ++ work.op_type = FI_OP_SEND; ++ return fi_control(&domain->fid, FI_QUEUE_WORK, &work); ++} ++ ++static int trigger() ++{ ++ int ret; ++ ++ //both sides start with both counters at 2, client will initiate triggering write ++ //which will trigger txcntr on client and rxcntr on server ++ //rx_exp = number of rx completions we should expect on that side ++ //n_trig = total number of triggers on work queue to expect completed ++ if (opts.dst_addr) { ++ work.triggering_cntr = txcntr; ++ rx_exp = 2; ++ } else { ++ work.triggering_cntr = rxcntr; ++ rx_exp = 3; ++ } ++ work.threshold = 3; ++ ++ if (tested_op != FI_OP_CNTR_ADD && tested_op != FI_OP_CNTR_SET) ++ work.completion_cntr = test_cntr; ++ ++ switch (tested_op) { ++ case FI_OP_RECV: ++ case FI_OP_SEND: ++ ret = send_trigger(); ++ n_trig++; ++ break; ++ case FI_OP_TRECV: ++ case FI_OP_TSEND: ++ ret = tsend_trigger(); ++ n_trig++; ++ break; ++ case FI_OP_READ: ++ case FI_OP_WRITE: ++ ret = rma_trigger(); ++ n_trig++; ++ rx_exp += 2; ++ break; ++ case FI_OP_ATOMIC: ++ ret = atomic_trigger(); ++ rx_exp++; ++ break; ++ case FI_OP_FETCH_ATOMIC: ++ ret = fetch_atomic_trigger(); ++ rx_exp++; ++ break; ++ case FI_OP_COMPARE_ATOMIC: ++ ret = compare_atomic_trigger(); ++ rx_exp++; ++ break; ++ default: ++ work.op_type = tested_op; ++ ret = cntr_trigger(); ++ n_trig++; ++ } ++ n_trig++; ++ ++ if (ret) { ++ if (ret == -FI_ENOSYS) ++ fprintf(stdout, "Operation not supported by provider\n"); ++ else ++ FT_PRINTERR("fi_control", ret); ++ return ret; ++ } ++ ++ ret = send_wait_check(); ++ ++ return ret; ++} ++ ++static void init_buf_vals() ++{ ++ switch (tested_op) { ++ case FI_OP_ATOMIC: ++ case FI_OP_FETCH_ATOMIC: ++ case FI_OP_COMPARE_ATOMIC: ++ memset(compare_buf, ~0, strlen(welcome_text) * 2); ++ sprintf(tx_buf, "%s", welcome_text); ++ memset(&tx_buf[strlen(welcome_text)], ~0, strlen(welcome_text)); ++ if (opts.dst_addr) ++ sprintf(rx_buf, "%s", welcome_text); ++ break; ++ default: ++ sprintf(tx_buf, "%s%s", welcome_text, write_text); ++ } ++} ++ ++static int run_test() ++{ ++ int ret; ++ ++ work.context = trig_ctx1; ++ ++ printf("Testing triggered %s", fi_tostr(&tested_op, FI_TYPE_OP_TYPE)); ++ if (tested_op != FI_OP_ATOMIC && tested_op != FI_OP_FETCH_ATOMIC && ++ tested_op != FI_OP_COMPARE_ATOMIC) { ++ tested_op++; ++ printf("/%s", fi_tostr(&tested_op, FI_TYPE_OP_TYPE)); ++ } ++ printf(" with counters..."); ++ ++ init_buf_vals(); ++ ++ //eat up first receive to make sure the triggered op doesn't go there instead ++ ret = ft_tx(ep, remote_fi_addr, strlen(welcome_text), &tx_ctx); ++ if (ret) ++ return ret; ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ ret = trigger(); ++ if (ret) { ++ if (ret != -FI_ENOSYS) { ++ printf("FAIL\n"); ++ if (ret != 1) ++ FT_PRINTERR("cntr_trigger", ret); ++ } ++ } else { ++ printf("PASS\n"); ++ } ++ ++ return ret; ++} ++ ++static int alloc_mr_res() ++{ ++ int ret; ++ ++ result_buf = calloc(buf_size, sizeof(*result_buf)); ++ compare_buf = calloc(buf_size, sizeof(*compare_buf)); ++ if (!result_buf || !compare_buf) { ++ fprintf(stdout, "calloc\n"); ++ return -FI_ENOMEM; ++ } ++ ++ ret = fi_mr_reg(domain, buf, buf_size, FT_RMA_MR_ACCESS | FT_MSG_MR_ACCESS, ++ 0, FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ ret = fi_mr_reg(domain, result_buf, buf_size, FT_RMA_MR_ACCESS, ++ 0, FT_MR_KEY + 1, 0, &mr_result, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ret = fi_mr_reg(domain, compare_buf, buf_size, FT_RMA_MR_ACCESS, ++ 0, FT_MR_KEY + 2, 0, &mr_compare, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++static void free_mr_res() ++{ ++ FT_CLOSE_FID(mr_result); ++ FT_CLOSE_FID(mr_compare); ++ free(result_buf); ++ free(compare_buf); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_SIZE | FT_OPT_RX_CNTR | FT_OPT_TX_CNTR | ++ FT_OPT_SKIP_REG_MR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ tested_op = FI_OP_CNTR_SET; ++ ++ while ((op = getopt(argc, argv, "aT:h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'a': ++ use_alias = 1; ++ break; ++ case 'T': ++ if (!strncasecmp("msg", optarg, 3)) ++ tested_op = FI_OP_RECV; ++ else if (!strncasecmp("tagged", optarg, 6)) ++ tested_op = FI_OP_TRECV; ++ else if (!strncasecmp("rma", optarg, 3)) ++ tested_op = FI_OP_READ; ++ else if (!strncasecmp("atomic", optarg, 6)) ++ tested_op = FI_OP_ATOMIC; ++ else if (!strncasecmp("f_atomic", optarg, 8)) ++ tested_op = FI_OP_FETCH_ATOMIC; ++ else if (!strncasecmp("c_atomic", optarg, 8)) ++ tested_op = FI_OP_COMPARE_ATOMIC; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple RDM client-sever triggered RMA example with alias ep."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_RMA | FI_RMA_EVENT | FI_TRIGGER; ++ ++ if (tested_op == FI_OP_TSEND) ++ hints->caps |= FI_TAGGED; ++ else if (tested_op == FI_OP_ATOMIC || ++ tested_op == FI_OP_FETCH_ATOMIC || ++ tested_op == FI_OP_COMPARE_ATOMIC) ++ hints->caps |= FI_ATOMIC; ++ ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = (FI_MR_LOCAL | FI_MR_VIRT_ADDR | ++ FI_MR_ALLOCATED); ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (use_alias) { ++ ret = ft_init_alias_ep(FI_TRANSMIT | FI_TRIGGER); ++ if (ret) ++ return ret; ++ trig_ep = alias_ep; ++ } else { ++ trig_ep = ep; ++ } ++ ++ ret = ft_cntr_open(&test_cntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ ++ ret = alloc_mr_res(); ++ if (ret) ++ return ret; ++ ++ ret = run_test(); ++ if (ret) ++ return ret; ++ ++ free_mr_res(); ++ ++ ret = fi_close(&test_cntr->fid); ++ if (ret) ++ FT_PRINTERR("fi_cntr_close", ret); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_domain.c +new file mode 100644 +index 000000000..f804bae7c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_domain.c +@@ -0,0 +1,441 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++struct test_domain { ++ uint8_t *buf; ++ struct fid_domain *dom; ++ struct fid_ep *ep; ++ struct fid_cntr *rx_cntr; ++ uint64_t rma_op_cnt; ++ struct fid_cntr *tx_cntr; ++ struct fid_av *av; ++ struct fid_mr *mr; ++ struct fid_cq *tx_cq; ++ struct fi_context *rma_ctx; ++}; ++ ++struct test_domain *domain_res_array; ++uint8_t *mr_buf_array; ++fi_addr_t *peer_addrs; ++int domain_cnt; ++int verbose; ++ ++static int alloc_domain_res() ++{ ++ domain_res_array = calloc(domain_cnt, sizeof(*domain_res_array)); ++ if (!domain_res_array) ++ return -FI_ENOMEM; ++ ++ mr_buf_array = calloc(domain_cnt, opts.transfer_size); ++ if (!mr_buf_array) ++ return -FI_ENOMEM; ++ ++ peer_addrs = calloc(domain_cnt, sizeof(*peer_addrs)); ++ if (!peer_addrs) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int open_domain_res(struct test_domain *domain) ++{ ++ int ret; ++ ++ av_attr.type = FI_AV_MAP; ++ av_attr.count = domain_cnt; ++ av_attr.name = NULL; ++ ++ ret = fi_cntr_open(domain->dom, ++ &cntr_attr, &domain->rx_cntr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ ++ ret = fi_cntr_open(domain->dom, ++ &cntr_attr, &domain->tx_cntr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ ++ cq_attr.size = domain_cnt; ++ ret = fi_cq_open(domain->dom, ++ &cq_attr, &domain->tx_cq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ ++ ret = fi_av_open(domain->dom, ++ &av_attr, &domain->av, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_av_open", ret); ++ return ret; ++ } ++ ++ domain->rma_ctx = calloc(domain_cnt, sizeof(*domain->rma_ctx)); ++ if (!domain->rma_ctx) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int init_ep_mr_res(struct test_domain *domain, struct fi_info *info) ++{ ++ int ret; ++ ++ domain->rma_op_cnt = 0; ++ ++ ret = fi_endpoint(domain->dom, info, &domain->ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ret = fi_ep_bind(domain->ep, ++ &domain->av->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_ep_bind(domain->ep, ++ &domain->tx_cntr->fid, FI_WRITE); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_ep_bind(domain->ep, ++ &domain->tx_cq->fid, FI_TRANSMIT); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_enable(domain->ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ ret = fi_mr_reg(domain->dom, domain->buf, ++ opts.transfer_size, FI_REMOTE_WRITE, ++ 0, FT_MR_KEY, 0, &domain->mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ if (verbose) { ++ printf("fi_mr_reg(fi_domain = %p,buffer = %p,size = %d,", ++ domain->dom, domain->buf, opts.transfer_size); ++ printf("memory_region = %p,mr_key %ld)\n", ++ domain->mr, (unsigned long)fi_mr_key(domain->mr)); ++ } ++ ++ ret = fi_mr_bind(domain->mr, ++ &domain->rx_cntr->fid, ++ FI_REMOTE_WRITE); ++ if (ret) { ++ FT_PRINTERR("fi_mr_bind", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int init_peer_addresses() ++{ ++ int dom_idx, ret; ++ int ep_idx; ++ ++ /* ++ Initializes the Address Vectors for each domain ++ with the addresses of the remote hosts' endpoints. ++ The fi_addr_t array peer_addrs gets rewritten ++ in this loop with the same set of addresses for each domain ++ init, but the peer addresses to the remote domains ++ are the same so this is not an issue. ++ The address vectors for each domain must be init even if ++ the peer addresses returned is the same after the first loop. ++ */ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ for (ep_idx = 0; ep_idx < domain_cnt; ep_idx++) { ++ ret = ft_init_av_addr(domain_res_array[dom_idx].av, ++ domain_res_array[ep_idx].ep, &peer_addrs[ep_idx]); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int init_domain_res() ++{ ++ int dom_idx, ret; ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ struct fi_info *info; ++ hints->src_addr = NULL; ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &info); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ return ret; ++ } ++ ++ info->domain_attr->mr_mode = FI_MR_SCALABLE; ++ ret = fi_domain(fabric, info, ++ &domain_res_array[dom_idx].dom, ++ NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ return ret; ++ } ++ ++ domain_res_array[dom_idx].buf = &mr_buf_array[dom_idx]; ++ ++ ret = open_domain_res(&domain_res_array[dom_idx]); ++ if (ret) ++ return ret; ++ ++ ret = init_ep_mr_res(&domain_res_array[dom_idx], info); ++ if (ret) ++ return ret; ++ ++ fi_freeinfo(info); ++ } ++ ++ return 0; ++} ++ ++static void free_domain_res() ++{ ++ int dom_idx; ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ FT_CLOSE_FID(domain_res_array[dom_idx].ep); ++ FT_CLOSE_FID(domain_res_array[dom_idx].av); ++ FT_CLOSE_FID(domain_res_array[dom_idx].mr); ++ FT_CLOSE_FID(domain_res_array[dom_idx].tx_cntr); ++ FT_CLOSE_FID(domain_res_array[dom_idx].rx_cntr); ++ FT_CLOSE_FID(domain_res_array[dom_idx].tx_cq); ++ FT_CLOSE_FID(domain_res_array[dom_idx].dom); ++ free(domain_res_array[dom_idx].rma_ctx); ++ } ++ free(peer_addrs); ++ free(mr_buf_array); ++ free(domain_res_array); ++} ++ ++static int write_data(void *buffer, size_t size, int dom_idx, ++ int remote_dom_idx, struct fi_context *rma_ctx) ++{ ++ int ret = -FI_EAGAIN; ++ ++ while (ret == -FI_EAGAIN) { ++ ret = fi_write(domain_res_array[dom_idx].ep, buffer, size, ++ fi_mr_desc(domain_res_array[dom_idx].mr), peer_addrs[remote_dom_idx], ++ 0, fi_mr_key(domain_res_array[remote_dom_idx].mr), rma_ctx); ++ } ++ ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int wait_write_cq(struct fid_cq *cq, size_t rma_op_count) ++{ ++ struct fi_cq_tagged_entry entry; ++ int ret; ++ int op_counter = 0; ++ ++ do { ++ ret = fi_cq_read(cq, &entry, 1); ++ if (ret > 0) ++ op_counter++; ++ } while ((ret == -FI_EAGAIN) && (op_counter < rma_op_count)); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAVAIL) { ++ ret = ft_cq_readerr(cq); ++ } else { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ } ++ ++ return ret; ++} ++ ++static int multi_domain_test() ++{ ++ int ret, remote_dom_idx, dom_idx; ++ ++ ft_sync(); ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ for (remote_dom_idx = 0; remote_dom_idx < domain_cnt; remote_dom_idx++) { ++ if (verbose) ++ printf("write to host's domain idx %d, memory region\n", remote_dom_idx); ++ ++ ret = write_data(tx_buf, opts.transfer_size, dom_idx, ++ remote_dom_idx, &domain_res_array[dom_idx].rma_ctx[remote_dom_idx]); ++ if (ret) ++ return ret; ++ ++ domain_res_array[dom_idx].rma_op_cnt++; ++ } ++ } ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ ret = fi_cntr_wait(domain_res_array[dom_idx].tx_cntr, ++ domain_res_array[dom_idx].rma_op_cnt, 30 * 1000); ++ if (ret < 0) ++ return ret; ++ ++ ret = wait_write_cq(domain_res_array[dom_idx].tx_cq, ++ domain_res_array[dom_idx].rma_op_cnt); ++ if (ret < 1) ++ return ret; ++ ++ if (verbose) ++ printf("writes from domain idx %d completed\n", dom_idx); ++ } ++ ++ for (dom_idx = 0; dom_idx < domain_cnt; dom_idx++) { ++ if (verbose) ++ printf("check for writes to domain idx %d\n", dom_idx); ++ ++ ret = fi_cntr_wait(domain_res_array[dom_idx].rx_cntr, ++ domain_res_array[dom_idx].rma_op_cnt, 30 * 1000); ++ if (ret < 0) ++ return ret; ++ ++ if (verbose) ++ printf("got all writes to domain idx %d\n", dom_idx); ++ } ++ printf("GOOD, multi domain test complete\n"); ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_domain_res(); ++ if (ret) ++ return ret; ++ ret = init_domain_res(); ++ if (ret) ++ return ret; ++ ++ ret = init_peer_addresses(); ++ if (ret) ++ return ret; ++ ++ ret = multi_domain_test(); ++ ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ domain_cnt = 2; ++ opts = INIT_OPTS; ++ opts.transfer_size = 4096; ++ verbose = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "c:Vh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'c': ++ domain_cnt = strtoull(optarg, NULL, 10); ++ break; ++ case 'V': ++ verbose = 1; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Ping-pong multi-domain test"); ++ FT_PRINT_OPTS_USAGE("-c ", "number of domains to create and test"); ++ FT_PRINT_OPTS_USAGE("-V", "Enable verbose printing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_RMA | FI_RMA_EVENT | FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ if (domain_res_array) ++ free_domain_res(); ++ ft_free_res(); ++ ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_recv.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_recv.c +new file mode 100644 +index 000000000..0869aac6f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_multi_recv.c +@@ -0,0 +1,366 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++// MULTI_BUF_SIZE_FACTOR defines how large the multi recv buffer will be. ++// The minimum value of the factor is 2 which will set the multi recv buffer ++// size to be twice the size of the send buffer. In order to use FI_MULTI_RECV ++// feature efficiently, we need to have a large recv buffer so that we don't ++// to repost the buffer often to get the remaining data when the buffer is full ++#define MULTI_BUF_SIZE_FACTOR 4 ++#define DEFAULT_MULTI_BUF_SIZE (1024 * 1024) ++ ++static struct fid_mr *mr_multi_recv; ++struct fi_context ctx_multi_recv[2]; ++static int use_recvmsg; ++ ++static int repost_recv(int iteration) { ++ struct fi_msg msg; ++ struct iovec msg_iov; ++ int ret; ++ ++ if (use_recvmsg) { ++ msg_iov.iov_base = rx_buf + (rx_size / 2) * iteration; ++ msg_iov.iov_len = rx_size / 2; ++ msg.msg_iov = &msg_iov; ++ msg.desc = fi_mr_desc(mr_multi_recv); ++ msg.iov_count = 1; ++ msg.addr = 0; ++ msg.data = NO_CQ_DATA; ++ msg.context = &ctx_multi_recv[iteration]; ++ ret = fi_recvmsg(ep, &msg, FI_MULTI_RECV); ++ if (ret) { ++ FT_PRINTERR("fi_recvmsg", ret); ++ return ret; ++ } ++ } else { ++ ret = fi_recv(ep, rx_buf + (rx_size / 2) * iteration, ++ rx_size / 2, fi_mr_desc(mr_multi_recv), ++ 0, &ctx_multi_recv[iteration]); ++ if (ret) { ++ FT_PRINTERR("fi_recv", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++ ++int wait_for_recv_completion(int num_completions) ++{ ++ int i, ret; ++ struct fi_cq_data_entry comp; ++ ++ while (num_completions > 0) { ++ ret = fi_cq_read(rxcq, &comp, 1); ++ if (ret == -FI_EAGAIN) ++ continue; ++ ++ if (ret < 0) { ++ FT_PRINTERR("fi_cq_read", ret); ++ return ret; ++ } ++ ++ if (comp.len) ++ num_completions--; ++ ++ if (comp.flags & FI_MULTI_RECV) { ++ i = (comp.op_context == &ctx_multi_recv[0]) ? 0 : 1; ++ ++ ret = repost_recv(i); ++ if (ret) ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++static int sync_test(void) ++{ ++ int ret; ++ ++ ret = opts.dst_addr ? ft_tx(ep, remote_fi_addr, 1, &tx_ctx) : wait_for_recv_completion(1); ++ if (ret) ++ return ret; ++ ++ ret = opts.dst_addr ? wait_for_recv_completion(1) : ft_tx(ep, remote_fi_addr, 1, &tx_ctx); ++ return ret; ++} ++ ++/* ++ * Post buffer as two halves, so that we can repost one half ++ * when the other half is full. ++ */ ++static int post_multi_recv_buffer() ++{ ++ int ret, i; ++ ++ for (i = 0; i < 2; i++) { ++ ret = repost_recv(i); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret, i; ++ ++ ret = sync_test(); ++ if (ret) { ++ fprintf(stderr, "sync_test failed!\n"); ++ goto out; ++ } ++ ++ ft_start(); ++ if (opts.dst_addr) { ++ for (i = 0; i < opts.iterations; i++) { ++ ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx); ++ if (ret) ++ goto out; ++ } ++ } else { ++ ret = wait_for_recv_completion(opts.iterations); ++ if (ret) ++ goto out; ++ } ++ ft_stop(); ++ ++ if (opts.machr) ++ show_perf_mr(opts.transfer_size, opts.iterations, ++ &start, &end, 1, opts.argc, opts.argv); ++ else ++ show_perf(test_name, opts.transfer_size, opts.iterations, ++ &start, &end, 1); ++ ++out: ++ return ret; ++} ++ ++static void free_res(void) ++{ ++ FT_CLOSE_FID(mr_multi_recv); ++ if (tx_buf) { ++ free(tx_buf); ++ tx_buf = NULL; ++ } ++ if (rx_buf) { ++ free(rx_buf); ++ rx_buf = NULL; ++ } ++} ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ int ret; ++ ++ tx_size = MAX(FT_MAX_CTRL_MSG, opts.transfer_size); ++ if (tx_size > fi->ep_attr->max_msg_size) { ++ fprintf(stderr, "transfer size is larger than the maximum size " ++ "of the data transfer supported by the provider\n"); ++ return -1; ++ } ++ ++ tx_buf = malloc(tx_size); ++ if (!tx_buf) { ++ fprintf(stderr, "Cannot allocate tx_buf\n"); ++ return -1; ++ } ++ ++ ret = fi_mr_reg(domain, tx_buf, tx_size, FI_SEND, ++ 0, FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ // set the multi buffer size to be allocated ++ rx_size = MAX(tx_size, DEFAULT_MULTI_BUF_SIZE) * MULTI_BUF_SIZE_FACTOR; ++ rx_buf = malloc(rx_size); ++ if (!rx_buf) { ++ fprintf(stderr, "Cannot allocate rx_buf\n"); ++ return -1; ++ } ++ ++ ret = fi_mr_reg(domain, rx_buf, rx_size, FI_RECV, 0, FT_MR_KEY + 1, 0, ++ &mr_multi_recv, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ // set FI_MULTI_RECV flag for all recv operations ++ fi->rx_attr->op_flags = FI_MULTI_RECV; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_enable_ep_recv(); ++ if (ret) ++ return ret; ++ ++ ret = fi_setopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_MIN_MULTI_RECV, ++ &tx_size, sizeof(tx_size)); ++ if (ret) ++ return ret; ++ ++ ret = post_multi_recv_buffer(); ++ return ret; ++} ++ ++static int init_av(void) ++{ ++ size_t addrlen; ++ int ret; ++ ++ if (opts.dst_addr) { ++ ret = ft_av_insert(av, fi->dest_addr, 1, &remote_fi_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ addrlen = 64; ++ ret = fi_getname(&ep->fid, tx_buf, &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = ft_tx(ep, remote_fi_addr, addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ } else { ++ ret = wait_for_recv_completion(1); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av, rx_buf, 1, &remote_fi_addr, 0, NULL); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret = 0; ++ ++ ret = init_fabric(); ++ if (ret) ++ goto out; ++ ++ ret = init_av(); ++ if (ret) ++ goto out; ++ ++ ret = run_test(); ++ ++ rx_seq++; ++ ft_finalize(); ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE | FT_OPT_SKIP_MSG_ALLOC; ++ use_recvmsg = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "Mh" CS_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case 'M': ++ use_recvmsg = 1; ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "Streaming RDM client-server using multi recv buffer."); ++ FT_PRINT_OPTS_USAGE("-M", "enable testing with fi_recvmsg"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_MULTI_RECV; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ cq_attr.format = FI_CQ_FORMAT_DATA; ++ ++ ret = run(); ++ ++ free_res(); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_simple.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_simple.c +new file mode 100644 +index 000000000..efee1ad3a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_simple.c +@@ -0,0 +1,127 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++struct fi_rma_iov local; ++ ++struct fi_context fi_ctx_write; ++struct fi_context fi_ctx_read; ++ ++static int run_test(void) ++{ ++ int ret = 0; ++ const char *message = "Hello from Client!"; ++ size_t message_len = strlen(message) + 1; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_exchange_keys(&remote); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ fprintf(stdout, "RMA write to server\n"); ++ if (snprintf(tx_buf, tx_size, "%s", message) >= tx_size) { ++ fprintf(stderr, "Transmit buffer too small.\n"); ++ return -FI_ETOOSMALL; ++ } ++ ret = fi_write(ep, tx_buf, message_len, mr_desc, ++ remote_fi_addr, remote.addr, remote.key, ++ &fi_ctx_write); ++ if (ret) ++ return ret; ++ ++ ret = ft_get_tx_comp(++tx_seq); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received a completion event for RMA write\n"); ++ } else { ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ ret = check_recv_msg(message); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received data from Client: %s\n", (char *) rx_buf); ++ } ++ ++ /* TODO: need support for finalize operation to sync test */ ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_SIZE | FT_OPT_RX_CNTR | FT_OPT_TX_CNTR; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple RDM client-server RMA example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_RMA | FI_RMA_EVENT; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_trigger.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_trigger.c +new file mode 100644 +index 000000000..24411a2f0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_rma_trigger.c +@@ -0,0 +1,160 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++struct fi_triggered_context triggered_ctx; ++ ++static char *welcome_text1 = "Hello1 from Client!"; ++static char *welcome_text2 = "Hello2 from Client!"; ++ ++static int rma_write_trigger(void *src, size_t size, ++ struct fid_cntr *cntr, size_t threshold) ++{ ++ int ret; ++ triggered_ctx.event_type = FI_TRIGGER_THRESHOLD; ++ triggered_ctx.trigger.threshold.cntr = cntr; ++ triggered_ctx.trigger.threshold.threshold = threshold; ++ ret = fi_write(alias_ep, src, size, mr_desc, ++ remote_fi_addr, remote.addr, remote.key, ++ &triggered_ctx); ++ if (ret){ ++ FT_PRINTERR("fi_write", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret = 0; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_alias_ep(FI_TRANSMIT | FI_TRIGGER); ++ if (ret) ++ return ret; ++ ++ ret = ft_exchange_keys(&remote); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ sprintf(tx_buf, "%s%s", welcome_text1, welcome_text2); ++ ++ fprintf(stdout, "Triggered RMA write to server\n"); ++ ret = rma_write_trigger((char *) tx_buf + strlen(welcome_text1), ++ strlen(welcome_text2), txcntr, 3); ++ if (ret) ++ goto out; ++ ++ fprintf(stdout, "RMA write to server\n"); ++ ret = fi_write(ep, tx_buf, strlen(welcome_text1), mr_desc, ++ remote_fi_addr, remote.addr, remote.key, ++ &tx_ctx); ++ if (ret){ ++ FT_PRINTERR("fi_write", ret); ++ goto out; ++ } ++ /* The value of the counter is 4 including a transfer during ++ * init_av and ft_exchange_keys() */ ++ ret = fi_cntr_wait(txcntr, 4, -1); ++ if (ret < 0) { ++ FT_PRINTERR("fi_cntr_wait", ret); ++ goto out; ++ } ++ ++ fprintf(stdout, "Received completion events for RMA write operations\n"); ++ } else { ++ /* The value of the counter is 4 including a transfer during ++ * init_av and ft_exchange_keys() */ ++ ret = fi_cntr_wait(rxcntr, 4, -1); ++ if (ret < 0) { ++ FT_PRINTERR("fi_cntr_wait", ret); ++ goto out; ++ } ++ ++ ret = check_recv_msg(welcome_text2); ++ if (ret) ++ return ret; ++ fprintf(stdout, "Received data from Client: %s\n", (char *) rx_buf); ++ } ++ ++out: ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_SIZE | FT_OPT_RX_CNTR | FT_OPT_TX_CNTR; ++ opts.transfer_size = strlen(welcome_text1) + strlen(welcome_text2); ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A simple RDM client-server triggered RMA example with alias ep."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_RMA | FI_RMA_EVENT | FI_TRIGGER; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_shared_av.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_shared_av.c +new file mode 100644 +index 000000000..861f92a50 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_shared_av.c +@@ -0,0 +1,208 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++ ++static int init_fabric(void) ++{ ++ int ret; ++ int ret2; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr && !ft_parent_proc) { ++ /* child waits until parent is done creating AV */ ++ ret2 = ft_sync_pair(FI_SUCCESS); ++ if (ret2) ++ return ret2; ++ ++ /* child needs to open AV in read only mode */ ++ av_attr.flags = FI_READ; ++ } ++ ++ ret = ft_alloc_active_res(fi); ++ if (opts.dst_addr && ft_parent_proc) { ++ /* parent lets the child know its status */ ++ ret2 = ft_sync_pair(ret); ++ if (ret2) ++ return ret2; ++ } ++ ++ /* handle the failed alloc_active_res call */ ++ if (ret) ++ return ret; ++ ++ return ft_enable_ep_recv(); ++} ++ ++static int send_recv() ++{ ++ int ret; ++ const char *message = "Hello from Child Client!"; ++ size_t message_len = strlen(message) + 1; ++ ++ if (opts.dst_addr) { ++ fprintf(stdout, "Sending message...\n"); ++ if (snprintf(tx_buf, tx_size, "%s", message) >= tx_size) { ++ fprintf(stderr, "Transmit buffer too small.\n"); ++ return -FI_ETOOSMALL; ++ } ++ ++ ret = ft_tx(ep, remote_fi_addr, message_len, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Send completion received\n"); ++ } else { ++ fprintf(stdout, "Waiting for message from client...\n"); ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ ret = check_recv_msg(message); ++ if (ret) ++ return ret; ++ ++ fprintf(stdout, "Received data from client: %s\n", (char *) rx_buf); ++ } ++ ++ return 0; ++} ++ ++static int run(void) ++{ ++ int ret; ++ int ret2; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) { ++ if (ft_parent_proc) { ++ /* parent inits AV and lets child proceed, ++ * and itself returns without sending a message */ ++ ret = ft_init_av(); ++ ret2 = ft_sync_pair(ret); ++ if (ret2) ++ return ret2; ++ ++ /* parent doesn't run the send_recv loop, ++ * it waits for the child until it is done ++ * with send_recv */ ++ return ret; ++ } else { ++ ret2 = ft_sync_pair(FI_SUCCESS); ++ if (ret2) ++ return ret2; ++ ++ remote_fi_addr = ((fi_addr_t *)av_attr.map_addr)[0]; ++ } ++ } else { ++ ret = ft_init_av(); ++ if (ret) ++ return ret; ++ } ++ ++ return send_recv(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ ft_parsecsopts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "A shared AV client-server example."); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ if (opts.dst_addr) { ++ if (!opts.av_name) ++ opts.av_name = "client_av"; ++ ++ ret = ft_fork_and_pair(); ++ if (ret) ++ return ret; ++ } else { ++ if (!opts.av_name) ++ opts.av_name = "server_av"; ++ } ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_SHARED_AV; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ if (opts.dst_addr) { ++ if (ft_wait_child()) { ++ FT_PRINTERR("ft_wait_child", errno); ++ } ++ } ++ ++ ft_free_res(); ++ ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_tagged_peek.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_tagged_peek.c +new file mode 100644 +index 000000000..4f4afbcfe +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/rdm_tagged_peek.c +@@ -0,0 +1,267 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++static struct fi_context fi_context; ++ ++static int wait_for_send_comp(int count) ++{ ++ int ret, completions = 0; ++ struct fi_cq_tagged_entry comp; ++ ++ do { ++ ret = fi_cq_sread(txcq, &comp, 1, NULL, -1); ++ if (ret != 1) { ++ FT_PRINTERR("fi_cq_sread", ret); ++ return ret; ++ } ++ completions++; ++ } while (completions < count); ++ ++ return 0; ++} ++ ++static int tag_queue_op(uint64_t tag, int recv, uint64_t flags) ++{ ++ int ret; ++ struct fi_cq_tagged_entry comp; ++ struct fi_msg_tagged msg = {0}; ++ struct fi_cq_err_entry cq_err; ++ struct iovec iov; ++ void *desc; ++ ++ if (recv) { ++ iov.iov_base = buf; ++ iov.iov_len = rx_size; ++ msg.msg_iov = &iov; ++ desc = mr_desc; ++ msg.desc = &desc; ++ msg.iov_count = 1; ++ msg.addr = remote_fi_addr; ++ } ++ msg.tag = tag; ++ msg.context = &fi_context; ++ ++ ret = fi_trecvmsg(ep, &msg, flags); ++ if (ret) { ++ FT_PRINTERR("fi_trecvmsg", ret); ++ return ret; ++ } ++ ++ ret = fi_cq_sread(rxcq, &comp, 1, NULL, -1); ++ if (ret != 1) { ++ if (ret == -FI_EAVAIL) { ++ ret = fi_cq_readerr(rxcq, &cq_err, 0); ++ if (ret < 0) ++ FT_PRINTERR("fi_cq_readerr", ret); ++ else ++ ret = -cq_err.err; ++ } else { ++ FT_PRINTERR("fi_cq_sread", ret); ++ } ++ } ++ return ret; ++} ++ ++static int run(void) ++{ ++ int i, ret; ++ ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (!(tx_ctx_arr = calloc(5, sizeof *tx_ctx_arr))) ++ return -FI_ENOMEM; ++ ++ if (opts.dst_addr) { ++ printf("Searching for a bad msg\n"); ++ ret = tag_queue_op(0xbad, 0, FI_PEEK); ++ if (ret != -FI_ENOMSG) { ++ FT_PRINTERR("FI_PEEK", ret); ++ return ret; ++ } ++ ++ printf("Searching for a bad msg with claim\n"); ++ ret = tag_queue_op(0xbad, 0, FI_PEEK | FI_CLAIM); ++ if (ret != -FI_ENOMSG) { ++ FT_PRINTERR("FI_PEEK", ret); ++ return ret; ++ } ++ ++ printf("Retrieving fifth message\n"); ++ ret = tag_queue_op(0x900d+4, 1, 0); ++ if (ret != 1) { ++ FT_PRINTERR("Receive after peek", ret); ++ return ret; ++ } ++ printf("Messages 1-4 should be in unexpected queue\n"); ++ ++ printf("Searching for first msg\n"); ++ ret = tag_queue_op(0x900d, 0, FI_PEEK); ++ if (ret != 1) { ++ FT_PRINTERR("FI_PEEK", ret); ++ return ret; ++ } ++ ++ printf("Receiving first msg\n"); ++ ret = tag_queue_op(0x900d, 1, 0); ++ if (ret != 1) { ++ FT_PRINTERR("Receive after peek", ret); ++ return ret; ++ } ++ ++ printf("Searching for second msg to claim\n"); ++ ret = tag_queue_op(0x900d+1, 0, FI_PEEK | FI_CLAIM); ++ if (ret != 1) { ++ FT_PRINTERR("FI_PEEK | FI_CLAIM", ret); ++ return ret; ++ } ++ ++ printf("Receiving second msg\n"); ++ ret = tag_queue_op(0x900d+1, 1, FI_CLAIM); ++ if (ret != 1) { ++ FT_PRINTERR("FI_CLAIM", ret); ++ return ret; ++ } ++ ++ printf("Searching for third msg to peek and discard\n"); ++ ret = tag_queue_op(0x900d+2, 0, FI_PEEK | FI_DISCARD); ++ if (ret != 1) { ++ FT_PRINTERR("FI_PEEK | FI_DISCARD", ret); ++ return ret; ++ } ++ ++ printf("Checking to see if third msg was discarded\n"); ++ ret = tag_queue_op(0x900d+2, 0, FI_PEEK); ++ if (ret != -FI_ENOMSG) { ++ FT_PRINTERR("FI_PEEK", ret); ++ return ret; ++ } ++ ++ printf("Searching for fourth msg to claim and discard\n"); ++ ret = tag_queue_op(0x900d+3, 0, FI_PEEK | FI_CLAIM); ++ if (ret != 1) { ++ FT_PRINTERR("FI_DISCARD", ret); ++ return ret; ++ } ++ ++ printf("Discarding fourth msg\n"); ++ ret = tag_queue_op(0x900d+3, 0, FI_CLAIM | FI_DISCARD); ++ if (ret != 1) { ++ FT_PRINTERR("FI_CLAIM", ret); ++ return ret; ++ } ++ /* sync with sender before ft_finalize, since we sent ++ * and received messages outside of the sequence numbers ++ * maintained by common code */ ++ ret = fi_tsend(ep, tx_buf, 1, mr_desc, ++ remote_fi_addr, 0xabc, ++ &tx_ctx_arr[0]); ++ if (ret) ++ return ret; ++ ret = wait_for_send_comp(1); ++ if (ret) ++ return ret; ++ } else { ++ printf("Sending five tagged messages\n"); ++ for(i = 0; i < 5; i++) { ++ ret = fi_tsend(ep, tx_buf, tx_size, mr_desc, ++ remote_fi_addr, 0x900d+i, ++ &tx_ctx_arr[i]); ++ if (ret) ++ return ret; ++ } ++ printf("Waiting for messages to complete\n"); ++ ret = wait_for_send_comp(5); ++ if (ret) ++ return ret; ++ ret = tag_queue_op(0xabc, 1, 0); ++ if (ret != 1) { ++ FT_PRINTERR("Receive sync", ret); ++ return ret; ++ } ++ } ++ ++ ft_finalize(); ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int ret, op; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ opts.comp_method = FT_COMP_SREAD; ++ ++ hints = fi_allocinfo(); ++ if (!hints) { ++ FT_PRINTERR("fi_allocinfo", -FI_ENOMEM); ++ return EXIT_FAILURE; ++ } ++ ++ while ((op = getopt(argc, argv, "h" CS_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parsecsopts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_csusage(argv[0], "An RDM client-server example that uses tagged search.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->tx_attr->msg_order = FI_ORDER_SAS; ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_TAGGED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/recv_cancel.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/recv_cancel.c +new file mode 100644 +index 000000000..b44de188e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/recv_cancel.c +@@ -0,0 +1,224 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include "shared.h" ++ ++#define CANCEL_TAG 0xC ++#define STANDARD_TAG 0xA ++ ++static int recv_cancel_client(void) ++{ ++ int ret; ++ ++ /* sync with server */ ++ ret = ft_rx(ep, 1); ++ if (ret) ++ return ret; ++ ++ ft_tag = CANCEL_TAG; ++ ret = ft_post_tx(ep, remote_fi_addr, opts.transfer_size, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ if (opts.verbose) ++ fprintf(stdout, "CANCEL msg posted to server\n"); ++ ++ ft_tag = STANDARD_TAG; ++ ret = ft_post_tx(ep, remote_fi_addr, opts.transfer_size, NO_CQ_DATA, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ if (opts.verbose) ++ fprintf(stdout, "STANDARD msg posted to server\n"); ++ ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int recv_cancel_host(void) ++{ ++ int ret = 0; ++ int retries = 0; ++ struct fi_cq_err_entry recv_completion, cancel_error_entry; ++ struct fi_context cancel_recv_ctx, standard_recv_ctx; ++ ++ /* Pre-post two recvs, one of which will be cancelled */ ++ ft_tag = CANCEL_TAG; ++ ret = ft_post_rx(ep, opts.transfer_size, &cancel_recv_ctx); ++ if (ret) ++ return ret; ++ ++ ft_tag = STANDARD_TAG; ++ ret = ft_post_rx(ep, opts.transfer_size, &standard_recv_ctx); ++ if (ret) ++ return ret; ++ ++ /* Cancel the first recv*/ ++ ret = fi_cancel((struct fid *)ep, &cancel_recv_ctx); ++ if (ret) { ++ FT_PRINTERR("fi_cancel", ret); ++ return ret; ++ } ++ ++ /* sync with client */ ++ ft_tag = 0; ++ ret = ft_tx(ep, remote_fi_addr, 1, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ /* Wait for fi_cq_read to fail indicating an err entry */ ++ do { ++ ret = fi_cq_read(rxcq, &recv_completion, 1); ++ if (ret == -FI_EAVAIL) ++ break; ++ else ++ retries++; ++ usleep(1000); ++ } while ((ret == -FI_EAGAIN) && (retries < 5000)); ++ if (retries >= 5000) { ++ FT_PRINTERR("ERROR: failed to detect error CQ entry in cq_read", -FI_EOTHER); ++ return -FI_EOTHER; ++ } else { ++ if (opts.verbose) ++ fprintf(stdout, "GOOD: detected error cq entry in cq_read\n"); ++ } ++ ++ /* Verify the error CQ has been populated */ ++ if (fi_cq_readerr(rxcq, &cancel_error_entry, 0) != 1) { ++ FT_PRINTERR("ERROR: No cancel CQ error entry was populated", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ ++ if (cancel_error_entry.err != FI_ECANCELED) { ++ FT_PRINTERR("ERROR: error code is incorrect", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ ++ if (!(cancel_error_entry.flags & FI_RECV)) { ++ FT_PRINTERR("ERROR: cancelled completion flags is incorrect", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ ++ if (opts.verbose) ++ fprintf(stdout, "GOOD: error entry has expected values\n"); ++ ++ /* Verify only one CQ err entry can be read */ ++ if (fi_cq_readerr(rxcq, &cancel_error_entry, 0) != -FI_EAGAIN) { ++ FT_PRINTERR("ERROR: Another CQ error entry was populated", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ ++ if (opts.verbose) ++ fprintf(stdout, "GOOD: no additional error entries have been detected\n"); ++ ++ /* Check for second recv completion*/ ++ do { ++ ret = fi_cq_read(rxcq, &recv_completion, 1); ++ if (ret > 0) { ++ if (recv_completion.op_context != &standard_recv_ctx) { ++ FT_PRINTERR("ERROR: op_context does not match recv ctx", -FI_EOTHER); ++ return -FI_EOTHER; ++ } ++ } else if ((ret <= 0) && (ret != -FI_EAGAIN)) { ++ FT_PRINTERR("fi_cq_read", ret); ++ } ++ } while (ret == -FI_EAGAIN); ++ ++ if (opts.verbose) ++ fprintf(stdout, "GOOD: Completed uncancelled recv\n"); ++ ++ fprintf(stdout, "GOOD: Completed Recv Cancel Test\n"); ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret; ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ if (opts.dst_addr) ++ return recv_cancel_client(); ++ else ++ return recv_cancel_host(); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "Vh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'V': ++ opts.verbose = 1; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Recv Cancel Functional test"); ++ FT_PRINT_OPTS_USAGE("-V", "Enable Verbose printing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_TAGGED; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | FI_MR_ALLOCATED; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/resmgmt_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/resmgmt_test.c +new file mode 100644 +index 000000000..26c32120b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/resmgmt_test.c +@@ -0,0 +1,272 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include "shared.h" ++ ++static uint16_t max_opts = 100; ++int delay, tagged; ++ ++/* ++ * The general strategy here is that we call send_loop and do as many sends ++ * in a row as we can until we get FI_EAGAIN which prevents us from continuing and ++ * we have to drain the send_cq. Then we do it again, until we've sent ++ * all the messages we were going to send. ++ */ ++static int send_loop(size_t size) { ++ int q_opts = 0; ++ int ret; ++ struct fi_context send_ctx[max_opts]; ++ ++ while (q_opts < max_opts) { ++ do { ++ ft_tag = q_opts + 1; ++ if (tagged) ++ ret = fi_tsend(ep, tx_buf, size, NULL, remote_fi_addr, ++ ft_tag, (void *) &send_ctx[q_opts]); ++ else ++ ret = fi_send(ep, tx_buf, size, NULL, remote_fi_addr, ++ (void *) &send_ctx[q_opts]); ++ ++ if (ret == FI_SUCCESS) { ++ tx_seq++; ++ q_opts++; ++ } ++ } while (!ret && (q_opts != max_opts)); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAGAIN) { ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ } else { ++ FT_PRINTERR("Send OP", ret); ++ return ret; ++ } ++ } ++ } ++ ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ ++ if (opts.verbose) ++ printf("Success: Completed %d queued ops\n", q_opts); ++ ++ return 0; ++} ++ ++static int receive_loop(size_t size) ++{ ++ int ret; ++ int q_opts = 0; ++ struct fi_context recv_ctx[max_opts]; ++ ++ while (q_opts < max_opts) { ++ do { ++ ft_tag = q_opts + 1; ++ if (tagged) ++ ret = fi_trecv(ep, rx_buf, size, NULL, remote_fi_addr, ++ ft_tag, 0x0, (void *) &recv_ctx[q_opts]); ++ else ++ ret = fi_recv(ep, rx_buf, size, NULL, remote_fi_addr, ++ (void *) &recv_ctx[q_opts]); ++ ++ if (ret == FI_SUCCESS) { ++ rx_seq++; ++ q_opts++; ++ } ++ } while (!ret && (q_opts != max_opts)); ++ ++ if (ret < 0) { ++ if (ret == -FI_EAGAIN) { ++ if (delay > 0) ++ sleep(delay); ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ } else { ++ FT_PRINTERR("Recv OP", ret); ++ return ret; ++ } ++ } ++ } ++ ++ if (delay > 0) ++ sleep(delay); ++ ++ ret = ft_get_rx_comp(rx_seq); ++ if (ret) ++ return ret; ++ ++ if (opts.verbose) ++ printf("Success: Completed %d queued ops\n", q_opts); ++ ++ return 0; ++} ++ ++static int overflow_test(void) ++{ ++ int ret = 0; ++ ++ if (opts.dst_addr) { ++ printf("Start testing for fi_send operations: %d\n", (int) max_opts); ++ ret = send_loop(opts.transfer_size); ++ if (ret) ++ printf("ERROR: calling send_master %d\n", ret); ++ } else { ++ printf("Start testing for fi_recv operations: %d\n", (int) max_opts); ++ ret = receive_loop(opts.transfer_size); ++ if (ret) ++ printf("ERROR: calling receive_loop %d\n", ret); ++ } ++ printf("GOOD, Completed Overflow Testing\n"); ++ ++ return 0; ++} ++ ++static int run_test(void) ++{ ++ int ret = 0; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = overflow_test(); ++ ++ ft_sync(); ++ ft_finalize(); ++ ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret = 0; ++ ++ opts = INIT_OPTS; ++ opts.tx_cq_size = max_opts; ++ opts.rx_cq_size = max_opts; ++ delay = 0; ++ tagged = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "S:R:m:l:T:X:ActdjwvVh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'S': ++ opts.tx_cq_size = strtoul(optarg, NULL, 0); ++ printf("send cq size: %d\n", (int) opts.tx_cq_size); ++ break; ++ case 'R': ++ opts.rx_cq_size = strtoul(optarg, NULL, 0); ++ printf("recv cq size: %d\n", (int) opts.rx_cq_size); ++ break; ++ case 'T': ++ hints->tx_attr->size = strtoul(optarg, NULL, 0); ++ printf("tx context size: %d\n", (int) hints->tx_attr->size); ++ break; ++ case 'X': ++ hints->rx_attr->size = strtoul(optarg, NULL, 0); ++ printf("rx context size: %d\n", (int) hints->rx_attr->size); ++ break; ++ case 'm': ++ max_opts = strtoul(optarg, NULL, 0); ++ printf("max_opts set to %d\n", max_opts); ++ break; ++ case 'j': ++ opts.options |= FT_OPT_CQ_SHARED; ++ printf("using single shared CQ\n"); ++ break; ++ case 'l': ++ opts.transfer_size = strtoul(optarg, NULL, 0); ++ printf("Testing Message Size: %d\n", opts.transfer_size); ++ break; ++ case 't': ++ tagged = 1; ++ hints->caps |= FI_TAGGED; ++ printf("tagged messaging enabled\n"); ++ break; ++ case 'd': ++ delay = 1; ++ break; ++ case 'A': ++ hints->domain_attr->av_type = FI_AV_TABLE; ++ printf("AV TABLE enabled\n"); ++ break; ++ case 'V': ++ opts.verbose = 1; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Resource Management Functional Test"); ++ FT_PRINT_OPTS_USAGE("-S ", "Size of send CQ"); ++ FT_PRINT_OPTS_USAGE("-R ", "Size of recv CQ"); ++ FT_PRINT_OPTS_USAGE("-T ", "Number of TX Contexts"); ++ FT_PRINT_OPTS_USAGE("-X ", "Number of RX Contexts"); ++ FT_PRINT_OPTS_USAGE("-m ", "number of operations to post"); ++ FT_PRINT_OPTS_USAGE("-l ", "message length to test"); ++ FT_PRINT_OPTS_USAGE("-j", "Enable shared cq"); ++ FT_PRINT_OPTS_USAGE("-t", "Enable tagged message testing"); ++ FT_PRINT_OPTS_USAGE("-d", "Enable setting a delay"); ++ FT_PRINT_OPTS_USAGE("-A", "Enable av table testing (only RDM/DGRAM EP)"); ++ FT_PRINT_OPTS_USAGE("-V", "Enable verbose printing"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/scalable_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/scalable_ep.c +new file mode 100644 +index 000000000..147945c3e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/scalable_ep.c +@@ -0,0 +1,389 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++ ++static int ctx_cnt = 2; ++static int rx_ctx_bits = 0; ++static struct fid_ep *sep; ++static struct fid_ep **tx_ep, **rx_ep; ++static struct fid_cq **txcq_array; ++static struct fid_cq **rxcq_array; ++static fi_addr_t *remote_rx_addr; ++ ++static void free_res(void) ++{ ++ if (rx_ep) { ++ FT_CLOSEV_FID(rx_ep, ctx_cnt); ++ free(rx_ep); ++ rx_ep = NULL; ++ } ++ if (tx_ep) { ++ FT_CLOSEV_FID(tx_ep, ctx_cnt); ++ free(tx_ep); ++ tx_ep = NULL; ++ } ++ if (rxcq_array) { ++ FT_CLOSEV_FID(rxcq_array, ctx_cnt); ++ free(rxcq_array); ++ rxcq_array = NULL; ++ } ++ if (txcq_array) { ++ FT_CLOSEV_FID(txcq_array, ctx_cnt); ++ free(txcq_array); ++ txcq_array = NULL; ++ } ++} ++ ++static int alloc_ep_res(struct fid_ep *sep) ++{ ++ int i, ret; ++ ++ /* Get number of bits needed to represent ctx_cnt */ ++ while (ctx_cnt >> ++rx_ctx_bits); ++ ++ av_attr.rx_ctx_bits = rx_ctx_bits; ++ ++ ret = ft_alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ txcq_array = calloc(ctx_cnt, sizeof *txcq_array); ++ rxcq_array = calloc(ctx_cnt, sizeof *rxcq_array); ++ tx_ep = calloc(ctx_cnt, sizeof *tx_ep); ++ rx_ep = calloc(ctx_cnt, sizeof *rx_ep); ++ remote_rx_addr = calloc(ctx_cnt, sizeof *remote_rx_addr); ++ ++ if (!buf || !txcq_array || !rxcq_array || !tx_ep || !rx_ep || !remote_rx_addr) { ++ perror("malloc"); ++ return -1; ++ } ++ ++ for (i = 0; i < ctx_cnt; i++) { ++ ret = fi_tx_context(sep, i, NULL, &tx_ep[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_tx_context", ret); ++ return ret; ++ } ++ ++ ret = fi_cq_open(domain, &cq_attr, &txcq_array[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ ++ ret = fi_rx_context(sep, i, NULL, &rx_ep[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_rx_context", ret); ++ return ret; ++ } ++ ++ ret = fi_cq_open(domain, &cq_attr, &rxcq_array[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int bind_ep_res(void) ++{ ++ int i, ret; ++ ++ ret = fi_scalable_ep_bind(sep, &av->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_scalable_ep_bind", ret); ++ return ret; ++ } ++ ++ for (i = 0; i < ctx_cnt; i++) { ++ ret = fi_ep_bind(tx_ep[i], &txcq_array[i]->fid, FI_SEND); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_enable(tx_ep[i]); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ } ++ ++ for (i = 0; i < ctx_cnt; i++) { ++ ret = fi_ep_bind(rx_ep[i], &rxcq_array[i]->fid, FI_RECV); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_enable(rx_ep[i]); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ ret = fi_recv(rx_ep[i], rx_buf, MAX(rx_size, FT_MAX_CTRL_MSG), ++ mr_desc, 0, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_recv", ret); ++ return ret; ++ } ++ } ++ ++ ret = fi_enable(sep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int wait_for_comp(struct fid_cq *cq) ++{ ++ struct fi_cq_entry comp; ++ int ret; ++ ++ do { ++ ret = fi_cq_read(cq, &comp, 1); ++ } while (ret < 0 && ret == -FI_EAGAIN); ++ ++ if (ret != 1) ++ FT_PRINTERR("fi_cq_read", ret); ++ else ++ ret = 0; ++ ++ return ret; ++} ++ ++#define DATA 0x12345670 ++ ++static int run_test() ++{ ++ int ret = 0, i; ++ uint32_t data; ++ uint32_t *tb = (uint32_t *)tx_buf; ++ uint32_t *rb = (uint32_t *)rx_buf; ++ ++ if (opts.dst_addr) { ++ for (i = 0; i < ctx_cnt && !ret; i++) { ++ fprintf(stdout, "Posting send for ctx: %d\n", i); ++ tb[0] = DATA + i; ++ ret = fi_send(tx_ep[i], tx_buf, tx_size, mr_desc, ++ remote_rx_addr[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_send", ret); ++ return ret; ++ } ++ ++ ret = wait_for_comp(txcq_array[i]); ++ } ++ } else { ++ for (i = 0; i < ctx_cnt && !ret; i++) { ++ fprintf(stdout, "wait for recv completion for ctx: %d\n", i); ++ ret = wait_for_comp(rxcq_array[i]); ++ ++ data = DATA + i; ++ if (memcmp(&data, rx_buf, 4) != 0) { ++ fprintf(stdout, "failed compare expected 0x%x," ++ " read 0x%x\n", data, rb[0]); ++ } ++ } ++ } ++ ++ return ret; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ /* Check the optimal number of TX and RX contexts supported by the provider */ ++ ctx_cnt = MIN(ctx_cnt, fi->domain_attr->tx_ctx_cnt); ++ ctx_cnt = MIN(ctx_cnt, fi->domain_attr->rx_ctx_cnt); ++ if (!ctx_cnt) { ++ fprintf(stderr, "Provider doesn't support contexts\n"); ++ return 1; ++ } ++ ++ fi->ep_attr->tx_ctx_cnt = ctx_cnt; ++ fi->ep_attr->rx_ctx_cnt = ctx_cnt; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = fi_scalable_ep(domain, fi, &sep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_scalable_ep", ret); ++ return ret; ++ } ++ ++ ret = alloc_ep_res(sep); ++ if (ret) ++ return ret; ++ ++ ret = bind_ep_res(); ++ return ret; ++} ++ ++static int init_av(void) ++{ ++ size_t addrlen; ++ int ret, i; ++ ++ if (opts.dst_addr) { ++ ret = ft_av_insert(av, fi->dest_addr, 1, &remote_fi_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ addrlen = FT_MAX_CTRL_MSG; ++ ret = fi_getname(&sep->fid, tx_buf, &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ ret = fi_send(tx_ep[0], tx_buf, addrlen, ++ mr_desc, remote_fi_addr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_send", ret); ++ return ret; ++ } ++ ++ ret = wait_for_comp(rxcq_array[0]); ++ if (ret) ++ return ret; ++ } else { ++ ret = wait_for_comp(rxcq_array[0]); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av, rx_buf, 1, &remote_fi_addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ ret = fi_send(tx_ep[0], tx_buf, 1, ++ mr_desc, remote_fi_addr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_send", ret); ++ return ret; ++ } ++ } ++ ++ for (i = 0; i < ctx_cnt; i++) ++ remote_rx_addr[i] = fi_rx_addr(remote_fi_addr, i, rx_ctx_bits); ++ ++ ret = fi_recv(rx_ep[0], rx_buf, rx_size, mr_desc, 0, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_recv", ret); ++ return ret; ++ } ++ ++ ret = wait_for_comp(txcq_array[0]); ++ return ret; ++} ++ ++ ++static int run(void) ++{ ++ int ret = 0; ++ ++ ret = init_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = init_av(); ++ if (ret) ++ return ret; ++ ++ ret = run_test(); ++ ++ /*TODO: Add a local finalize applicable for scalable ep */ ++ //ft_finalize(fi, tx_ep[0], txcq_array[0], rxcq_array[0], remote_rx_addr[0]); ++ ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int ret, op; ++ ++ opts = INIT_OPTS; ++ opts.options = FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "An RDM client-server example with scalable endpoints.\n"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->caps = FI_MSG | FI_NAMED_RX_CTX; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ ret = run(); ++ ++ free_res(); ++ /* Closes the scalable ep that was allocated in the test */ ++ FT_CLOSE_FID(sep); ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/shared_ctx.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/shared_ctx.c +new file mode 100644 +index 000000000..bbee0c10c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/shared_ctx.c +@@ -0,0 +1,665 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license ++ * below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++enum { ++ FT_UNSPEC, ++ FT_EP_CNT, ++}; ++ ++enum ft_ep_state { ++ FT_EP_STATE_INIT, ++ FT_EP_CONNECT_RCVD, ++ FT_EP_CONNECTING, ++ FT_EP_CONNECTED, ++}; ++ ++struct ep_info { ++ struct fid_ep *ep; ++ struct fi_info *fi; ++ enum ft_ep_state state; ++}; ++ ++static struct fi_info *fi_dup; ++static int tx_shared_ctx = 1; ++static int rx_shared_ctx = 1; ++static int ep_cnt = 4; ++static struct fid_ep **ep_array, *srx_ctx; ++static struct fid_stx *stx_ctx; ++static size_t addrlen = 0; ++static fi_addr_t *addr_array; ++ ++static int get_dupinfo(void) ++{ ++ struct fi_info *hints_dup; ++ int ret; ++ ++ /* Get a fi_info corresponding to a wild card port. The first endpoint ++ * should use default/given port since that is what is known to both ++ * client and server. For other endpoints we should use addresses with ++ * random ports to avoid collision. fi_getinfo should return a random ++ * port if we don't specify it in the service arg or the hints. This ++ * is used only for non-MSG endpoints. */ ++ ++ hints_dup = fi_dupinfo(hints); ++ if (!hints_dup) ++ return -FI_ENOMEM; ++ ++ free(hints_dup->src_addr); ++ free(hints_dup->dest_addr); ++ hints_dup->src_addr = NULL; ++ hints_dup->dest_addr = NULL; ++ hints_dup->src_addrlen = 0; ++ hints_dup->dest_addrlen = 0; ++ ++ if (opts.dst_addr) { ++ ret = fi_getinfo(FT_FIVERSION, opts.dst_addr, NULL, 0, ++ hints_dup, &fi_dup); ++ } else { ++ ret = fi_getinfo(FT_FIVERSION, opts.src_addr, NULL, FI_SOURCE, ++ hints_dup, &fi_dup); ++ } ++ if (ret) ++ FT_PRINTERR("fi_getinfo", ret); ++ fi_freeinfo(hints_dup); ++ return ret; ++} ++ ++static int alloc_ep(void) ++{ ++ int i, ret; ++ ++ ep_array = calloc(ep_cnt, sizeof(*ep_array)); ++ if (!ep_array) ++ return -FI_ENOMEM; ++ ++ ret = fi_endpoint(domain, fi, &ep_array[0], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ for (i = 1; i < ep_cnt; i++) { ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = fi_endpoint(domain, fi, &ep_array[i], NULL); ++ else ++ ret = fi_endpoint(domain, fi_dup, &ep_array[i], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int alloc_ep_res(struct fi_info *fi) ++{ ++ int ret; ++ ++ ret = ft_alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ if (tx_shared_ctx) { ++ ret = fi_stx_context(domain, fi->tx_attr, &stx_ctx, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_stx_context", ret); ++ return ret; ++ } ++ } ++ ++ if (rx_shared_ctx) { ++ ret = fi_srx_context(domain, fi->rx_attr, &srx_ctx, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_srx_context", ret); ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++static int bind_ep_res(struct fid_ep *ep) ++{ ++ int ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ FT_EP_BIND(ep, eq, 0); ++ ++ if (tx_shared_ctx) ++ FT_EP_BIND(ep, stx_ctx, 0); ++ ++ if (rx_shared_ctx) ++ FT_EP_BIND(ep, srx_ctx, 0); ++ ++ FT_EP_BIND(ep, txcq, FI_SEND); ++ FT_EP_BIND(ep, rxcq, FI_RECV); ++ FT_EP_BIND(ep, av, 0); ++ ++ ret = fi_enable(ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++static int bind_ep_array_res(void) ++{ ++ int i, ret; ++ for (i = 0; i < ep_cnt; i++) { ++ ret = bind_ep_res(ep_array[i]); ++ if (ret) ++ return ret; ++ } ++ return 0; ++} ++ ++static int run_test() ++{ ++ int ret, i; ++ ++ if (!(tx_ctx_arr = calloc(ep_cnt, sizeof *tx_ctx_arr))) ++ return -FI_ENOMEM; ++ ++ if (!(rx_ctx_arr = calloc(ep_cnt, sizeof *rx_ctx_arr))) ++ return -FI_ENOMEM; ++ ++ /* Post recvs */ ++ for (i = 0; i < ep_cnt; i++) { ++ if (rx_shared_ctx) { ++ fprintf(stdout, "Posting recv #%d for shared rx ctx\n", i); ++ ret = ft_post_rx(srx_ctx, rx_size, &rx_ctx_arr[i]); ++ } else { ++ fprintf(stdout, "Posting recv for endpoint #%d\n", i); ++ ret = ft_post_rx(ep_array[i], rx_size, &rx_ctx_arr[i]); ++ } ++ if (ret) ++ return ret; ++ } ++ ++ if (opts.dst_addr) { ++ /* Post sends addressed to remote EPs */ ++ for (i = 0; i < ep_cnt; i++) { ++ if (tx_shared_ctx) ++ fprintf(stdout, "Posting send #%d to shared tx ctx\n", i); ++ else ++ fprintf(stdout, "Posting send to endpoint #%d\n", i); ++ ret = ft_tx(ep_array[i], addr_array[i], tx_size, &tx_ctx_arr[i]); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ /* Wait for recv completions */ ++ ret = ft_get_rx_comp(rx_seq - 1); ++ if (ret) ++ return ret; ++ ++ if (!opts.dst_addr) { ++ /* Post sends addressed to remote EPs */ ++ for (i = 0; i < ep_cnt; i++) { ++ if (tx_shared_ctx) ++ fprintf(stdout, "Posting send #%d to shared tx ctx\n", i); ++ else ++ fprintf(stdout, "Posting send to endpoint #%d\n", i); ++ ret = ft_tx(ep_array[i], addr_array[i], tx_size, &tx_ctx_arr[i]); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++static int init_av(void) ++{ ++ int ret; ++ int i; ++ ++ if (opts.dst_addr) { ++ ret = ft_av_insert(av, fi->dest_addr, 1, &addr_array[0], 0, NULL); ++ if (ret) ++ return ret; ++ } ++ ++ for (i = 0; i < ep_cnt; i++) { ++ addrlen = tx_size; ++ ret = fi_getname(&ep_array[i]->fid, tx_buf + ft_tx_prefix_size(), ++ &addrlen); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep_array[0], addr_array[0], addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ if (rx_shared_ctx) ++ ret = ft_rx(srx_ctx, rx_size); ++ else ++ ret = ft_rx(ep_array[0], rx_size); ++ if (ret) ++ return ret; ++ ++ /* Skip the first address since we already have it in AV */ ++ if (i) { ++ ret = ft_av_insert(av, rx_buf + ft_rx_prefix_size(), 1, ++ &addr_array[i], 0, NULL); ++ if (ret) ++ return ret; ++ } ++ } else { ++ if (rx_shared_ctx) ++ ret = ft_rx(srx_ctx, rx_size); ++ else ++ ret = ft_rx(ep_array[0], rx_size); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av, rx_buf + ft_rx_prefix_size(), 1, ++ &addr_array[i], 0, NULL); ++ if (ret) ++ return ret; ++ ++ ret = ft_tx(ep_array[0], addr_array[0], addrlen, &tx_ctx); ++ if (ret) ++ return ret; ++ ++ } ++ } ++ ++ /* ACK */ ++ if (opts.dst_addr) { ++ ret = ft_tx(ep_array[0], addr_array[0], 1, &tx_ctx); ++ } else { ++ if (rx_shared_ctx) ++ ret = ft_rx(srx_ctx, rx_size); ++ else ++ ret = ft_rx(ep_array[0], rx_size); ++ } ++ ++ return ret; ++} ++ ++static int init_fabric(void) ++{ ++ int ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = get_dupinfo(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ av_attr.count = ep_cnt; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep(); ++ if (ret) ++ return ret; ++ ++ ret = bind_ep_array_res(); ++ if (ret) ++ return ret; ++ ++ /* Post recv */ ++ if (rx_shared_ctx) ++ ret = ft_post_rx(srx_ctx, MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ else ++ ret = ft_post_rx(ep_array[0], MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ if (ret) ++ return ret; ++ ++ ret = init_av(); ++ return ret; ++} ++ ++static int client_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int i, ret; ++ ++ ret = ft_getinfo(hints, &fi); ++ if (ret) ++ return ret; ++ ++ ret = get_dupinfo(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ return ret; ++ ++ ret = alloc_ep(); ++ if (ret) ++ return ret; ++ ++ ret = bind_ep_array_res(); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < ep_cnt; i++) { ++ ret = fi_connect(ep_array[i], fi->dest_addr, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "connect"); ++ ret = (int) rd; ++ return ret; ++ } ++ ++ if (event != FI_CONNECTED || entry.fid != &ep_array[i]->fid) { ++ fprintf(stderr, "Unexpected CM event %d fid %p (ep %p)\n", ++ event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ return ret; ++ } ++ } ++ ++ /* Post recv */ ++ if (rx_shared_ctx) ++ ret = ft_post_rx(srx_ctx, MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ else ++ ret = ft_post_rx(ep_array[0], MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int server_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret, k; ++ int num_conn_reqs = 0, num_connected = 0; ++ struct ep_info *ep_state_array = NULL; ++ ++ ep_array = calloc(ep_cnt, sizeof(*ep_array)); ++ if (!ep_array) ++ return -FI_ENOMEM; ++ ++ ep_state_array = calloc(ep_cnt, sizeof(*ep_state_array)); ++ if (!ep_state_array) ++ return -FI_ENOMEM; ++ ++ while (num_connected != ep_cnt) { ++ rd = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0); ++ if (rd != sizeof entry) { ++ FT_PROCESS_EQ_ERR(rd, eq, "fi_eq_sread", "cm-event"); ++ ret = (int) rd; ++ goto err; ++ } ++ ++ switch(event) { ++ case FI_CONNREQ: ++ if (num_conn_reqs == ep_cnt) { ++ fprintf(stderr, "Unexpected CM event %d\n", event); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ fi = ep_state_array[num_conn_reqs].fi = entry.info; ++ ep_state_array[num_conn_reqs].state = FT_EP_CONNECT_RCVD; ++ ++ if (num_conn_reqs == 0) { ++ ret = fi_domain(fabric, fi, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ goto err; ++ } ++ ++ ret = alloc_ep_res(fi); ++ if (ret) ++ goto err; ++ } ++ ++ ret = fi_endpoint(domain, fi, &ep_array[num_conn_reqs], NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ goto err; ++ } ++ ++ ep_state_array[num_conn_reqs].ep = ep_array[num_conn_reqs]; ++ ret = bind_ep_res(ep_array[num_conn_reqs]); ++ if (ret) ++ goto err; ++ ++ ret = fi_accept(ep_array[num_conn_reqs], NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ goto err; ++ } ++ ++ ep_state_array[num_conn_reqs].state = FT_EP_CONNECTING; ++ num_conn_reqs++; ++ break; ++ ++ case FI_CONNECTED: ++ if (num_conn_reqs <= num_connected) { ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ ++ for (k = 0; k < num_conn_reqs; k++) { ++ if (ep_state_array[k].state != FT_EP_CONNECTING) ++ continue; ++ if (&ep_state_array[k].ep->fid == entry.fid) { ++ ep_state_array[k].state = FT_EP_CONNECTED; ++ num_connected++; ++ if (num_connected != ep_cnt) ++ fi_freeinfo(ep_state_array[k].fi); ++ break; ++ } ++ } ++ ++ if (k == num_conn_reqs) { ++ fprintf(stderr, "Unexpected CM event %d fid %p (ep %p)\n", ++ event, entry.fid, ep); ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ break; ++ ++ default: ++ ret = -FI_EOTHER; ++ goto err; ++ } ++ } ++ ++ /* Post recv */ ++ if (rx_shared_ctx) ++ ret = ft_post_rx(srx_ctx, MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ else ++ ret = ft_post_rx(ep_array[0], MAX(rx_size, FT_MAX_CTRL_MSG), &rx_ctx); ++ if (ret) ++ goto err; ++ ++ free(ep_state_array); ++ return 0; ++err: ++ for (k = 0; k < ep_cnt; k++) { ++ switch(ep_state_array[k].state) { ++ case FT_EP_CONNECT_RCVD: ++ fi_reject(pep, ep_state_array[k].fi->handle, NULL, 0); ++ break; ++ ++ case FT_EP_CONNECTING: ++ case FT_EP_CONNECTED: ++ fi_shutdown(ep_state_array[k].ep, 0); ++ break; ++ ++ case FT_EP_STATE_INIT: ++ default: ++ break; ++ } ++ } ++ ++ free(ep_state_array); ++ return ret; ++} ++ ++static int run(void) ++{ ++ int ret = 0; ++ ++ addr_array = calloc(ep_cnt, sizeof(*addr_array)); ++ if (!addr_array) { ++ perror("malloc"); ++ return -FI_ENOMEM; ++ } ++ ++ if (hints->ep_attr->type == FI_EP_MSG) { ++ if (!opts.dst_addr) { ++ ret = ft_start_server(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = opts.dst_addr ? client_connect() : server_connect(); ++ } else { ++ ret = init_fabric(); ++ } ++ if (ret) ++ return ret; ++ ++ ret = run_test(); ++ ++ /* TODO: Add a local finalize applicable to shared ctx */ ++ //ft_finalize(fi, ep_array[0], txcq, rxcq, addr_array[0]); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int option_index = 0; ++ ++ struct option long_options[] = { ++ {"no-tx-shared-ctx", no_argument, &tx_shared_ctx, 0}, ++ {"no-rx-shared-ctx", no_argument, &rx_shared_ctx, 0}, ++ {"ep-count", required_argument, 0, FT_EP_CNT}, ++ {0, 0, 0, 0}, ++ }; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt_long(argc, argv, "h" ADDR_OPTS INFO_OPTS, ++ long_options, &option_index)) != -1) { ++ switch (op) { ++ case FT_EP_CNT: ++ ep_cnt = atoi(optarg); ++ if (ep_cnt <= 0) { ++ FT_ERR("ep_count needs to be greater than 0\n"); ++ return EXIT_FAILURE; ++ } ++ hints->domain_attr->ep_cnt = ep_cnt; ++ break; ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "An RDM client-server example that uses" ++ " shared context.\n"); ++ FT_PRINT_OPTS_USAGE("--no-tx-shared-ctx", ++ "Disable shared context for TX"); ++ FT_PRINT_OPTS_USAGE("--no-rx-shared-ctx", ++ "Disable shared context for RX"); ++ FT_PRINT_OPTS_USAGE("--ep-count (default: 4)", ++ "# of endpoints to be opened"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->caps = FI_MSG; ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ ++ if (tx_shared_ctx) ++ hints->ep_attr->tx_ctx_cnt = FI_SHARED_CONTEXT; ++ if (rx_shared_ctx) ++ hints->ep_attr->rx_ctx_cnt = FI_SHARED_CONTEXT; ++ ++ ret = run(); ++ ++ FT_CLOSEV_FID(ep_array, ep_cnt); ++ if (rx_shared_ctx) ++ FT_CLOSE_FID(srx_ctx); ++ if (tx_shared_ctx) ++ FT_CLOSE_FID(stx_ctx); ++ ft_free_res(); ++ free(addr_array); ++ free(ep_array); ++ fi_freeinfo(fi_dup); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/unexpected_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/unexpected_msg.c +new file mode 100644 +index 000000000..7d917b653 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/functional/unexpected_msg.c +@@ -0,0 +1,276 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "shared.h" ++ ++ ++static size_t concurrent_msgs = 5; ++static size_t num_iters = 600; ++static bool send_data = false; ++ ++ ++/* Common code will free allocated buffers and MR */ ++static int alloc_bufs(void) ++{ ++ int ret; ++ ++ tx_size = opts.transfer_size + ft_tx_prefix_size(); ++ rx_size = opts.transfer_size + ft_rx_prefix_size(); ++ buf_size = (tx_size + rx_size) * concurrent_msgs; ++ ++ buf = malloc(buf_size); ++ tx_ctx_arr = calloc(concurrent_msgs, sizeof(*tx_ctx_arr)); ++ rx_ctx_arr = calloc(concurrent_msgs, sizeof(*rx_ctx_arr)); ++ if (!buf || !tx_ctx_arr || !rx_ctx_arr) ++ return -FI_ENOMEM; ++ ++ rx_buf = buf; ++ tx_buf = (char *) buf + rx_size * concurrent_msgs; ++ ++ if (fi->domain_attr->mr_mode & FI_MR_LOCAL) { ++ ret = fi_mr_reg(domain, buf, buf_size, FI_SEND | FI_RECV, ++ 0, FT_MR_KEY, 0, &mr, NULL); ++ if (ret) ++ return ret; ++ ++ mr_desc = fi_mr_desc(mr); ++ } ++ ++ return 0; ++} ++ ++static char *get_tx_buf(int index) ++{ ++ return tx_buf + tx_size * index; ++} ++ ++static char *get_rx_buf(int index) ++{ ++ return rx_buf + rx_size * index; ++} ++ ++static int wait_recvs() ++{ ++ struct fi_cq_tagged_entry entry; ++ int ret; ++ ++ if (opts.comp_method == FT_COMP_SREAD) { ++ ret = fi_cq_sread(rxcq, &entry, 1, NULL, -1); ++ } else { ++ do { ++ ret = fi_cq_read(rxcq, &entry, 1); ++ } while (ret == -FI_EAGAIN); ++ } ++ ++ if ((ret == 1) && send_data) { ++ if (entry.data != opts.transfer_size) { ++ printf("ERROR incorrect remote CQ data value. Got %lu, expected %d\n", ++ (unsigned long)entry.data, opts.transfer_size); ++ return -FI_EOTHER; ++ } ++ } ++ ++ if (ret < 1) ++ printf("ERROR fi_cq_(s)read returned %d %s\n", ret, fi_strerror(-ret)); ++ return ret; ++} ++ ++static int run_test_loop(void) ++{ ++ int ret = 0; ++ uint64_t op_data = send_data ? opts.transfer_size : NO_CQ_DATA; ++ uint64_t op_tag = 0x1234; ++ char *op_buf; ++ int i, j; ++ ++ for (i = 0; i < num_iters; i++) { ++ for (j = 0; j < concurrent_msgs; j++) { ++ op_buf = get_tx_buf(j); ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) ++ ft_fill_buf(op_buf + ft_tx_prefix_size(), ++ opts.transfer_size); ++ ++ ret = ft_post_tx_buf(ep, remote_fi_addr, ++ opts.transfer_size, ++ op_data, &tx_ctx_arr[j], ++ op_buf, mr_desc, op_tag); ++ if (ret) { ++ printf("ERROR send_msg returned %d\n", ret); ++ return ret; ++ } ++ } ++ ++ ret = ft_sync(); ++ if (ret) ++ return ret; ++ ++ for (j = 0; j < concurrent_msgs; j++) { ++ op_buf = get_rx_buf(j); ++ ret = ft_post_rx_buf(ep, opts.transfer_size, ++ &rx_ctx_arr[j], op_buf, ++ mr_desc, op_tag); ++ if (ret) { ++ printf("ERROR recv_msg returned %d\n", ret); ++ return ret; ++ } ++ } ++ ++ for (j = 0; j < concurrent_msgs; j++) { ++ ret = wait_recvs(); ++ if (ret < 1) ++ return ret; ++ } ++ ++ if (ft_check_opts(FT_OPT_VERIFY_DATA)) { ++ for (j = 0; j < concurrent_msgs; j++) { ++ op_buf = get_rx_buf(j); ++ if (ft_check_buf(op_buf + ft_rx_prefix_size(), ++ opts.transfer_size)) ++ return -FI_EOTHER; ++ } ++ } ++ ++ for (j = 0; j < concurrent_msgs; j++) { ++ ret = ft_get_tx_comp(tx_seq); ++ if (ret) ++ return ret; ++ } ++ ++ if (i % 100 == 0) ++ printf("PID %d GOOD iter %d/%ld completed\n", ++ getpid(), i, num_iters); ++ } ++ ++ (void) ft_sync(); ++ printf("PID %d GOOD all done\n", getpid()); ++ return ret; ++} ++ ++static int run_test(void) ++{ ++ int ret; ++ ++ if (hints->ep_attr->type == FI_EP_MSG) ++ ret = ft_init_fabric_cm(); ++ else ++ ret = ft_init_fabric(); ++ if (ret) ++ return ret; ++ ++ alloc_bufs(); ++ ret = run_test_loop(); ++ ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ int op; ++ int ret; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_OOB_SYNC | FT_OPT_SKIP_MSG_ALLOC; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "m:i:c:vdSh" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'c': ++ concurrent_msgs = strtoul(optarg, NULL, 0); ++ break; ++ case 'i': ++ num_iters = strtoul(optarg, NULL, 0); ++ break; ++ case 'S': ++ opts.comp_method = FT_COMP_SREAD; ++ break; ++ case 'v': ++ opts.options |= FT_OPT_VERIFY_DATA; ++ break; ++ case 'm': ++ opts.transfer_size = strtoul(optarg, NULL, 0); ++ break; ++ case 'd': ++ send_data = true; ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Unexpected message functional test"); ++ FT_PRINT_OPTS_USAGE("-c ", ++ "Concurrent messages per iteration "); ++ FT_PRINT_OPTS_USAGE("-v", "Enable data verification"); ++ FT_PRINT_OPTS_USAGE("-i ", "Number of iterations"); ++ FT_PRINT_OPTS_USAGE("-S", ++ "Use fi_cq_sread instead of polling fi_cq_read"); ++ FT_PRINT_OPTS_USAGE("-m ", ++ "Size of unexpected messages"); ++ FT_PRINT_OPTS_USAGE("-d", "Send remote CQ data"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ ++ hints->mode = FI_CONTEXT; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL | FI_MR_ALLOCATED; ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->rx_attr->total_buffered_recv = 0; ++ hints->caps = FI_TAGGED; ++ ++ ret = run_test(); ++ ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/freebsd/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/freebsd/osd.h +new file mode 100644 +index 000000000..f4e7f0182 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/freebsd/osd.h +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 2016 Intel Corp, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTESTS_FREEBSD_OSD_H_ ++#define _FABTESTS_FREEBSD_OSD_H_ ++ ++#include ++#include ++#include ++ ++ ++#define bswap_64 bswap64 ++ ++#define ENODATA ENOMSG ++#define HOST_NAME_MAX 128 ++ ++typedef cpuset_t cpu_set_t; ++ ++#endif /* _FABTESTS_FREEBSD_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/ft_osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/ft_osd.h +new file mode 100644 +index 000000000..a71c1c9d3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/ft_osd.h +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FT_OSD_H_ ++#define _FT_OSD_H_ ++ ++#ifdef __APPLE__ ++#include ++#include ++#elif defined __FreeBSD__ ++#include ++#include ++#elif defined _WIN32 ++#include ++#else ++#include ++#endif ++ ++#endif /* _FT_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/jsmn.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/jsmn.h +new file mode 100644 +index 000000000..48a07c1d2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/jsmn.h +@@ -0,0 +1,97 @@ ++/* ++ * Copyright (c) 2010 Serge A. Zaitsev ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy ++ * of this software and associated documentation files (the "Software"), to deal ++ * in the Software without restriction, including without limitation the rights ++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ * copies of the Software, and to permit persons to whom the Software is ++ * furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++ * THE SOFTWARE. ++ */ ++ ++#ifndef __JSMN_H_ ++#define __JSMN_H_ ++ ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * JSON type identifier. Basic types are: ++ * o Object ++ * o Array ++ * o String ++ * o Other primitive: number, boolean (true/false) or null ++ */ ++typedef enum { ++ JSMN_PRIMITIVE = 0, ++ JSMN_OBJECT = 1, ++ JSMN_ARRAY = 2, ++ JSMN_STRING = 3 ++} jsmntype_t; ++ ++typedef enum { ++ /* Not enough tokens were provided */ ++ JSMN_ERROR_NOMEM = -1, ++ /* Invalid character inside JSON string */ ++ JSMN_ERROR_INVAL = -2, ++ /* The string is not a full JSON packet, more bytes expected */ ++ JSMN_ERROR_PART = -3 ++} jsmnerr_t; ++ ++/** ++ * JSON token description. ++ * @param type type (object, array, string etc.) ++ * @param start start position in JSON data string ++ * @param end end position in JSON data string ++ */ ++typedef struct { ++ jsmntype_t type; ++ int start; ++ int end; ++ int size; ++#ifdef JSMN_PARENT_LINKS ++ int parent; ++#endif ++} jsmntok_t; ++ ++/** ++ * JSON parser. Contains an array of token blocks available. Also stores ++ * the string being parsed now and current position in that string ++ */ ++typedef struct { ++ unsigned int pos; /* offset in the JSON string */ ++ unsigned int toknext; /* next token to allocate */ ++ int toksuper; /* superior token node, e.g parent object or array */ ++} jsmn_parser; ++ ++/** ++ * Create JSON parser over an array of tokens ++ */ ++void jsmn_init(jsmn_parser *parser); ++ ++/** ++ * Run JSON parser. It parses a JSON data string into and array of tokens, each describing ++ * a single JSON object. ++ */ ++jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, ++ jsmntok_t *tokens, unsigned int num_tokens); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* __JSMN_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/osx/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/osx/osd.h +new file mode 100644 +index 000000000..5c425d35c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/osx/osd.h +@@ -0,0 +1,59 @@ ++/* ++ * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTESTS_OSX_OSD_H_ ++#define _FABTESTS_OSX_OSD_H_ ++ ++#include ++ ++#include ++#include ++ ++#if !HAVE_CLOCK_GETTIME ++#define CLOCK_REALTIME 0 ++#define CLOCK_REALTIME_COARSE 0 ++#define CLOCK_MONOTONIC 0 ++ ++typedef int clockid_t; ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++int clock_gettime(clockid_t clk_id, struct timespec *tp); ++ ++#ifdef __cplusplus ++} ++#endif ++#endif // !HAVE_CLOCK_GETTIME ++ ++#endif // FABTESTS_OSX_OSD_H +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/shared.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/shared.h +new file mode 100644 +index 000000000..201fe5e6f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/shared.h +@@ -0,0 +1,504 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2017, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _SHARED_H_ ++#define _SHARED_H_ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#ifndef FT_FIVERSION ++#define FT_FIVERSION FI_VERSION(1,5) ++#endif ++ ++#include "ft_osd.h" ++#define OFI_UTIL_PREFIX "ofi_" ++#define OFI_NAME_DELIM ';' ++ ++#define OFI_MR_BASIC_MAP (FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_VIRT_ADDR) ++ ++/* exit codes must be 0-255 */ ++static inline int ft_exit_code(int ret) ++{ ++ int absret = ret < 0 ? -ret : ret; ++ return absret > 255 ? EXIT_FAILURE : absret; ++} ++ ++#define ft_foreach_info(fi, info) \ ++ for (fi = info; fi; fi = fi->next) ++ ++#define ft_sa_family(addr) (((struct sockaddr *)(addr))->sa_family) ++ ++struct test_size_param { ++ int size; ++ int enable_flags; ++}; ++ ++extern struct test_size_param test_size[]; ++extern const unsigned int test_cnt; ++#define TEST_CNT test_cnt ++ ++#define FT_ENABLE_ALL (~0) ++#define FT_DEFAULT_SIZE (1 << 0) ++ ++static inline int ft_use_size(int index, int enable_flags) ++{ ++ return (enable_flags == FT_ENABLE_ALL) || ++ (enable_flags & test_size[index].enable_flags); ++} ++ ++ ++enum precision { ++ NANO = 1, ++ MICRO = 1000, ++ MILLI = 1000000, ++}; ++ ++enum ft_comp_method { ++ FT_COMP_SPIN = 0, ++ FT_COMP_SREAD, ++ FT_COMP_WAITSET, ++ FT_COMP_WAIT_FD ++}; ++ ++enum { ++ FT_OPT_ACTIVE = 1 << 0, ++ FT_OPT_ITER = 1 << 1, ++ FT_OPT_SIZE = 1 << 2, ++ FT_OPT_RX_CQ = 1 << 3, ++ FT_OPT_TX_CQ = 1 << 4, ++ FT_OPT_RX_CNTR = 1 << 5, ++ FT_OPT_TX_CNTR = 1 << 6, ++ FT_OPT_VERIFY_DATA = 1 << 7, ++ FT_OPT_ALIGN = 1 << 8, ++ FT_OPT_BW = 1 << 9, ++ FT_OPT_CQ_SHARED = 1 << 10, ++ FT_OPT_OOB_SYNC = 1 << 11, ++ FT_OPT_SKIP_MSG_ALLOC = 1 << 12, ++ FT_OPT_SKIP_REG_MR = 1 << 13, ++}; ++ ++/* for RMA tests --- we want to be able to select fi_writedata, but there is no ++ * constant in libfabric for this */ ++enum ft_rma_opcodes { ++ FT_RMA_READ = 1, ++ FT_RMA_WRITE, ++ FT_RMA_WRITEDATA, ++}; ++ ++enum ft_atomic_opcodes { ++ FT_ATOMIC_BASE, ++ FT_ATOMIC_FETCH, ++ FT_ATOMIC_COMPARE, ++}; ++ ++struct ft_opts { ++ int iterations; ++ int warmup_iterations; ++ int transfer_size; ++ int window_size; ++ int av_size; ++ int verbose; ++ int tx_cq_size; ++ int rx_cq_size; ++ char *src_port; ++ char *dst_port; ++ char *src_addr; ++ char *dst_addr; ++ char *av_name; ++ int sizes_enabled; ++ int options; ++ enum ft_comp_method comp_method; ++ int machr; ++ enum ft_rma_opcodes rma_op; ++ char *oob_port; ++ int argc; ++ ++ /* Fail if the selected provider does not support FI_MSG_PREFIX. */ ++ int force_prefix; ++ char **argv; ++}; ++ ++extern struct fi_info *fi_pep, *fi, *hints; ++extern struct fid_fabric *fabric; ++extern struct fid_wait *waitset; ++extern struct fid_domain *domain; ++extern struct fid_poll *pollset; ++extern struct fid_pep *pep; ++extern struct fid_ep *ep, *alias_ep; ++extern struct fid_cq *txcq, *rxcq; ++extern struct fid_cntr *txcntr, *rxcntr; ++extern struct fid_mr *mr, no_mr; ++extern void *mr_desc; ++extern struct fid_av *av; ++extern struct fid_eq *eq; ++extern struct fid_mc *mc; ++ ++extern fi_addr_t remote_fi_addr; ++extern char *buf, *tx_buf, *rx_buf; ++extern size_t buf_size, tx_size, rx_size; ++extern int tx_fd, rx_fd; ++extern int timeout; ++ ++extern struct fi_context tx_ctx, rx_ctx; ++extern struct fi_context *tx_ctx_arr, *rx_ctx_arr; ++extern uint64_t remote_cq_data; ++ ++extern uint64_t tx_seq, rx_seq, tx_cq_cntr, rx_cq_cntr; ++extern struct fi_av_attr av_attr; ++extern struct fi_eq_attr eq_attr; ++extern struct fi_cq_attr cq_attr; ++extern struct fi_cntr_attr cntr_attr; ++ ++extern struct fi_rma_iov remote; ++ ++extern char test_name[50]; ++extern struct timespec start, end; ++extern struct ft_opts opts; ++ ++void ft_parseinfo(int op, char *optarg, struct fi_info *hints); ++void ft_parse_addr_opts(int op, char *optarg, struct ft_opts *opts); ++void ft_parsecsopts(int op, char *optarg, struct ft_opts *opts); ++int ft_parse_rma_opts(int op, char *optarg, struct fi_info *hints, ++ struct ft_opts *opts); ++void ft_addr_usage(); ++void ft_usage(char *name, char *desc); ++void ft_mcusage(char *name, char *desc); ++void ft_csusage(char *name, char *desc); ++ ++void ft_fill_buf(void *buf, int size); ++int ft_check_buf(void *buf, int size); ++int ft_check_opts(uint64_t flags); ++uint64_t ft_init_cq_data(struct fi_info *info); ++int ft_sock_listen(char *node, char *service); ++int ft_sock_connect(char *node, char *service); ++int ft_sock_accept(); ++int ft_sock_send(int fd, void *msg, size_t len); ++int ft_sock_recv(int fd, void *msg, size_t len); ++int ft_sock_sync(int value); ++void ft_sock_shutdown(int fd); ++extern int (*ft_mr_alloc_func)(void); ++extern uint64_t ft_tag; ++extern int ft_parent_proc; ++extern int ft_socket_pair[2]; ++extern int sock; ++extern int listen_sock; ++#define ADDR_OPTS "B:P:s:a:b::" ++#define FAB_OPTS "f:d:p:" ++#define INFO_OPTS FAB_OPTS "e:" ++#define CS_OPTS ADDR_OPTS "I:S:mc:t:w:l" ++#define NO_CQ_DATA 0 ++ ++extern char default_port[8]; ++ ++#define INIT_OPTS (struct ft_opts) \ ++ { .options = FT_OPT_RX_CQ | FT_OPT_TX_CQ, \ ++ .iterations = 1000, \ ++ .warmup_iterations = 10, \ ++ .transfer_size = 1024, \ ++ .window_size = 64, \ ++ .av_size = 1, \ ++ .tx_cq_size = 0, \ ++ .rx_cq_size = 0, \ ++ .verbose = 0, \ ++ .sizes_enabled = FT_DEFAULT_SIZE, \ ++ .rma_op = FT_RMA_WRITE, \ ++ .oob_port = NULL, \ ++ .argc = argc, .argv = argv \ ++ } ++ ++#define FT_STR_LEN 32 ++#define FT_MAX_CTRL_MSG 64 ++#define FT_MR_KEY 0xC0DE ++#define FT_MSG_MR_ACCESS (FI_SEND | FI_RECV) ++#define FT_RMA_MR_ACCESS (FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE) ++ ++int ft_getsrcaddr(char *node, char *service, struct fi_info *hints); ++int ft_read_addr_opts(char **node, char **service, struct fi_info *hints, ++ uint64_t *flags, struct ft_opts *opts); ++char *size_str(char str[FT_STR_LEN], long long size); ++char *cnt_str(char str[FT_STR_LEN], long long cnt); ++int size_to_count(int size); ++size_t datatype_to_size(enum fi_datatype datatype); ++ ++#define FT_PRINTERR(call, retv) \ ++ do { fprintf(stderr, call "(): %s:%d, ret=%d (%s)\n", __FILE__, __LINE__, \ ++ (int) (retv), fi_strerror((int) -(retv))); } while (0) ++ ++#define FT_LOG(level, fmt, ...) \ ++ do { fprintf(stderr, "[%s] fabtests:%s:%d: " fmt "\n", level, __FILE__, \ ++ __LINE__, ##__VA_ARGS__); } while (0) ++ ++#define FT_ERR(fmt, ...) FT_LOG("error", fmt, ##__VA_ARGS__) ++#define FT_WARN(fmt, ...) FT_LOG("warn", fmt, ##__VA_ARGS__) ++ ++#if ENABLE_DEBUG ++#define FT_DEBUG(fmt, ...) FT_LOG("debug", fmt, ##__VA_ARGS__) ++#else ++#define FT_DEBUG(fmt, ...) ++#endif ++ ++#define FT_EQ_ERR(eq, entry, buf, len) \ ++ FT_ERR("eq_readerr (Provider errno: %d) : %s", \ ++ entry.prov_errno, fi_eq_strerror(eq, entry.err, \ ++ entry.err_data, \ ++ buf, len)) \ ++ ++#define FT_CQ_ERR(cq, entry, buf, len) \ ++ FT_ERR("cq_readerr (Provider errno: %d) : %s", \ ++ entry.prov_errno, fi_cq_strerror(cq, entry.err, \ ++ entry.err_data, \ ++ buf, len)) \ ++ ++#define FT_CLOSE_FID(fd) \ ++ do { \ ++ int ret; \ ++ if ((fd)) { \ ++ ret = fi_close(&(fd)->fid); \ ++ if (ret) \ ++ FT_ERR("fi_close: %s(%d) fid %d", \ ++ fi_strerror(-ret), \ ++ ret, \ ++ (int) (fd)->fid.fclass); \ ++ fd = NULL; \ ++ } \ ++ } while (0) ++ ++#define FT_CLOSEV_FID(fd, cnt) \ ++ do { \ ++ int i; \ ++ if (!(fd)) \ ++ break; \ ++ for (i = 0; i < (cnt); i++) { \ ++ FT_CLOSE_FID((fd)[i]); \ ++ } \ ++ } while (0) ++ ++#define FT_EP_BIND(ep, fd, flags) \ ++ do { \ ++ int ret; \ ++ if ((fd)) { \ ++ ret = fi_ep_bind((ep), &(fd)->fid, (flags)); \ ++ if (ret) { \ ++ FT_PRINTERR("fi_ep_bind", ret); \ ++ return ret; \ ++ } \ ++ } \ ++ } while (0) ++ ++int ft_alloc_bufs(); ++int ft_open_fabric_res(); ++int ft_getinfo(struct fi_info *hints, struct fi_info **info); ++int ft_init_fabric(); ++int ft_start_server(); ++int ft_server_connect(); ++int ft_client_connect(); ++int ft_init_fabric_cm(void); ++int ft_complete_connect(struct fid_ep *ep, struct fid_eq *eq); ++int ft_retrieve_conn_req(struct fid_eq *eq, struct fi_info **fi); ++int ft_accept_connection(struct fid_ep *ep, struct fid_eq *eq); ++int ft_connect_ep(struct fid_ep *ep, ++ struct fid_eq *eq, fi_addr_t *remote_addr); ++int ft_alloc_ep_res(struct fi_info *fi); ++int ft_alloc_active_res(struct fi_info *fi); ++int ft_enable_ep_recv(void); ++int ft_enable_ep(struct fid_ep *ep, struct fid_eq *eq, struct fid_av *av, ++ struct fid_cq *txcq, struct fid_cq *rxcq, ++ struct fid_cntr *txcntr, struct fid_cntr *rxcntr); ++int ft_init_alias_ep(uint64_t flags); ++int ft_av_insert(struct fid_av *av, void *addr, size_t count, fi_addr_t *fi_addr, ++ uint64_t flags, void *context); ++int ft_init_av(void); ++int ft_join_mc(void); ++int ft_init_av_dst_addr(struct fid_av *av_ptr, struct fid_ep *ep_ptr, ++ fi_addr_t *remote_addr); ++int ft_init_av_addr(struct fid_av *av, struct fid_ep *ep, ++ fi_addr_t *addr); ++int ft_exchange_keys(struct fi_rma_iov *peer_iov); ++void ft_free_res(); ++void init_test(struct ft_opts *opts, char *test_name, size_t test_name_len); ++ ++static inline void ft_start(void) ++{ ++ opts.options |= FT_OPT_ACTIVE; ++ clock_gettime(CLOCK_MONOTONIC, &start); ++} ++static inline void ft_stop(void) ++{ ++ clock_gettime(CLOCK_MONOTONIC, &end); ++ opts.options &= ~FT_OPT_ACTIVE; ++} ++ ++/* Set the FI_MSG_PREFIX mode bit in the given fi_info structure and also set ++ * the option bit in the given opts structure. If using ft_getinfo, it will ++ * return -ENODATA if the provider clears the application requested mdoe bit. ++ */ ++static inline void ft_force_prefix(struct fi_info *info, struct ft_opts *opts) ++{ ++ info->mode |= FI_MSG_PREFIX; ++ opts->force_prefix = 1; ++} ++ ++/* If force_prefix was not requested, just continue. If it was requested, ++ * return true if it was respected by the provider. ++ */ ++static inline bool ft_check_prefix_forced(struct fi_info *info, ++ struct ft_opts *opts) ++{ ++ if (opts->force_prefix) { ++ return (info->tx_attr->mode & FI_MSG_PREFIX) && ++ (info->rx_attr->mode & FI_MSG_PREFIX); ++ } ++ ++ /* Continue if forced prefix wasn't requested. */ ++ return true; ++} ++ ++int ft_sync(void); ++int ft_sync_pair(int status); ++int ft_fork_and_pair(void); ++int ft_wait_child(void); ++int ft_finalize(void); ++int ft_finalize_ep(struct fid_ep *ep); ++ ++size_t ft_rx_prefix_size(void); ++size_t ft_tx_prefix_size(void); ++ssize_t ft_post_rx(struct fid_ep *ep, size_t size, struct fi_context* ctx); ++ssize_t ft_post_rx_buf(struct fid_ep *ep, size_t size, struct fi_context* ctx, ++ void *op_buf, void *op_mr_desc, uint64_t op_tag); ++ssize_t ft_post_tx(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, ++ uint64_t data, struct fi_context* ctx); ++ssize_t ft_post_tx_buf(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, ++ uint64_t data, struct fi_context* ctx, ++ void *op_buf, void *op_mr_desc, uint64_t op_tag); ++ssize_t ft_rx(struct fid_ep *ep, size_t size); ++ssize_t ft_tx(struct fid_ep *ep, fi_addr_t fi_addr, size_t size, struct fi_context *ctx); ++ssize_t ft_inject(struct fid_ep *ep, fi_addr_t fi_addr, size_t size); ++ssize_t ft_post_rma(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote, void *context); ++ssize_t ft_rma(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote, void *context); ++ssize_t ft_post_rma_inject(enum ft_rma_opcodes op, struct fid_ep *ep, size_t size, ++ struct fi_rma_iov *remote); ++ ++ ++ssize_t ft_post_atomic(enum ft_atomic_opcodes opcode, struct fid_ep *ep, ++ void *compare, void *compare_desc, void *result, ++ void *result_desc, struct fi_rma_iov *remote, ++ enum fi_datatype datatype, enum fi_op atomic_op, ++ void *context); ++int check_base_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count); ++int check_fetch_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count); ++int check_compare_atomic_op(struct fid_ep *endpoint, enum fi_op op, ++ enum fi_datatype datatype, size_t *count); ++ ++int ft_cq_readerr(struct fid_cq *cq); ++int ft_get_rx_comp(uint64_t total); ++int ft_get_tx_comp(uint64_t total); ++int ft_recvmsg(struct fid_ep *ep, fi_addr_t fi_addr, ++ size_t size, struct fi_context *ctx, int flags); ++int ft_sendmsg(struct fid_ep *ep, fi_addr_t fi_addr, ++ size_t size, struct fi_context *ctx, int flags); ++int ft_cq_read_verify(struct fid_cq *cq, void *op_context); ++ ++void eq_readerr(struct fid_eq *eq, const char *eq_str); ++ ++int64_t get_elapsed(const struct timespec *b, const struct timespec *a, ++ enum precision p); ++void show_perf(char *name, int tsize, int iters, struct timespec *start, ++ struct timespec *end, int xfers_per_iter); ++void show_perf_mr(int tsize, int iters, struct timespec *start, ++ struct timespec *end, int xfers_per_iter, int argc, char *argv[]); ++ ++int ft_send_recv_greeting(struct fid_ep *ep); ++int ft_send_greeting(struct fid_ep *ep); ++int ft_recv_greeting(struct fid_ep *ep); ++ ++int check_recv_msg(const char *message); ++uint64_t ft_info_to_mr_access(struct fi_info *info); ++int ft_alloc_bit_combo(uint64_t fixed, uint64_t opt, uint64_t **combos, int *len); ++void ft_free_bit_combo(uint64_t *combo); ++int ft_cntr_open(struct fid_cntr **cntr); ++const char *ft_util_name(const char *str, size_t *len); ++const char *ft_core_name(const char *str, size_t *len); ++char **ft_split_and_alloc(const char *s, const char *delim, size_t *count); ++void ft_free_string_array(char **s); ++ ++#define FT_PROCESS_QUEUE_ERR(readerr, rd, queue, fn, str) \ ++ do { \ ++ if (rd == -FI_EAVAIL) { \ ++ readerr(queue, fn " " str); \ ++ } else { \ ++ FT_PRINTERR(fn, rd); \ ++ } \ ++ } while (0) ++ ++#define FT_PROCESS_EQ_ERR(rd, eq, fn, str) \ ++ FT_PROCESS_QUEUE_ERR(eq_readerr, rd, eq, fn, str) ++ ++#define FT_OPTS_USAGE_FORMAT "%-30s %s" ++#define FT_PRINT_OPTS_USAGE(opt, desc) fprintf(stderr, FT_OPTS_USAGE_FORMAT "\n", opt, desc) ++ ++#define MIN(a,b) (((a)<(b))?(a):(b)) ++#define MAX(a,b) (((a)>(b))?(a):(b)) ++#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A)) ++ ++#define TEST_ENUM_SET_N_RETURN(str, len, enum_val, type, data) \ ++ TEST_SET_N_RETURN(str, len, #enum_val, enum_val, type, data) ++ ++#define TEST_SET_N_RETURN(str, len, val_str, val, type, data) \ ++ do { \ ++ if (!strncmp(str, val_str, len)) { \ ++ *(type *)(data) = val; \ ++ return 0; \ ++ } \ ++ } while (0) ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _SHARED_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unit_common.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unit_common.h +new file mode 100644 +index 000000000..f3774bfcc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unit_common.h +@@ -0,0 +1,57 @@ ++/* ++ * Copyright (c) 2013-2014 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _UNIT_COMMON_H_ ++#define _UNIT_COMMON_H_ ++ ++#include ++ ++enum { PASS, FAIL, NOTSUPP, SKIPPED }; ++#define TEST_ENTRY(NAME, DESC) { NAME, #NAME, DESC} ++ ++#define TEST_RET_VAL(_ret, _testret) \ ++ (_ret == -FI_ENOSYS || _ret == -FI_ENODATA) ? SKIPPED : (_testret) ++ ++#define FT_UNIT_STRERR(buf, str, ret) \ ++ sprintf(buf, str ": ret=%d (%s)", (int)-ret, fi_strerror((int)-ret)) ++ ++struct test_entry { ++ int (*test)(); ++ char *name; ++ char *desc; ++}; ++ ++void ft_unit_usage(char *name, char *desc); ++int run_tests(struct test_entry *test_array, char *err_buf); ++ ++#endif /* _UNIT_COMMON_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unix/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unix/osd.h +new file mode 100644 +index 000000000..3d7b415af +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/unix/osd.h +@@ -0,0 +1,78 @@ ++/* ++ * Copyright (c) 2016 Intel Corp, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTESTS_UNIX_OSD_H_ ++#define _FABTESTS_UNIX_OSD_H_ ++ ++#include ++ ++static inline int ft_startup(void) ++{ ++ return 0; ++} ++ ++/* complex operations implementation */ ++#define OFI_COMPLEX(name) ofi_##name##_complex ++#define OFI_COMPLEX_OP(name, op) ofi_complex_##name##_##op ++#define OFI_COMPLEX_TYPE_DECL(name, type) typedef type complex OFI_COMPLEX(name); ++ ++OFI_COMPLEX_TYPE_DECL(float, float) ++OFI_COMPLEX_TYPE_DECL(double, double) ++OFI_COMPLEX_TYPE_DECL(long_double, long double) ++ ++#define OFI_COMPLEX_OPS(name) \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, sum)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1 + v2; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, mul)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1 * v2; \ ++} \ ++static inline int OFI_COMPLEX_OP(name, equ)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1 == v2; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, land)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2)\ ++{ \ ++ return v1 && v2; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, lor)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1 || v2; \ ++} ++ ++OFI_COMPLEX_OPS(float) ++OFI_COMPLEX_OPS(double) ++OFI_COMPLEX_OPS(long_double) ++ ++#endif /* FABTESTS_UNIX_OSD_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/getopt/getopt.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/getopt/getopt.h +new file mode 100644 +index 000000000..e364288d3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/getopt/getopt.h +@@ -0,0 +1,83 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _GETOPT_H_ ++#define _GETOPT_H_ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif __cplusplus ++ ++#if defined WIN32 && !defined GETOPT_STATIC ++#ifdef GETOPT_DLL_EXPORTS ++#define GET_OPT_INTERFACE __declspec(dllexport) ++#else // GETOPT_DLL_EXPORTS ++#define GET_OPT_INTERFACE __declspec(dllimport) ++#endif // GETOPT_DLL_EXPORTS ++#else // WIN32 && not defined GETOPT_STATIC ++#define GET_OPT_INTERFACE ++#endif ++ ++GET_OPT_INTERFACE extern char* optarg; ++extern int optind, opterr, optopt; ++ ++#ifndef no_argument ++# define no_argument 0 ++#endif //no_argument ++ ++#ifndef required_argument ++# define required_argument 1 ++#endif //required_argument ++ ++#ifndef optional_argument ++# define optional_argument 2 ++#endif //optional_argument ++ ++int getopt(int argc, char *const argv[], const char *optstring); ++ ++struct option ++{ ++ const char *name; ++ int has_arg; ++ int *flag; ++ int val; ++}; ++ ++int getopt_long(int argc, char *const argv[], ++ const char *optstring, ++ const struct option *longopts, int *longindex); ++ ++int getopt_long_only(int argc, char *const argv[], ++ const char *optstring, ++ const struct option *longopts, int *longindex); ++ ++#ifdef __cplusplus ++} ++#endif __cplusplus ++ ++#endif //_GETOPT_H_ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netdb.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netdb.h +new file mode 100644 +index 000000000..e42aa5870 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netdb.h +@@ -0,0 +1,38 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTESTS_OSD_WINDOWS_NETDB_H_ ++#define _FABTESTS_OSD_WINDOWS_NETDB_H_ ++ ++#include ++ ++/* Error values for `getaddrinfo' function. */ ++# define EAI_MEMORY - 10 /* Memory allocation failure. */ ++ ++#endif /* _FABTESTS_OSD_WINDOWS_NETDB_H_ */ ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/in.h +similarity index 54% +rename from prov/netdir/src/netdir_attr.c +rename to fabtests/include/windows/netinet/in.h +index 76823ae34..626c6c20c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/in.h +@@ -1,11 +1,7 @@ + /* +-* Copyright (c) 2015-2016 Intel Corporation, Inc. All rights reserved. ++* Copyright (c) 2017 Intel Corporation. All rights reserved. + * +-* This software is available to you under a choice of one of two +-* licenses. You may choose to be licensed under the terms of the GNU +-* General Public License (GPL) Version 2, available from the file +-* COPYING in the main directory of this source tree, or the +-* BSD license below: ++* This software is available to you under the BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following +@@ -30,29 +26,10 @@ + * SOFTWARE. + */ + +-#ifdef _WIN32 ++#ifndef _FABTESTS_OSD_NETINET_IN_H_ ++#define _FABTESTS_OSD_NETINET_IN_H_ + +-#include "ofi.h" +-#include "ofi_util.h" +-#include "rdma/fabric.h" ++#include + +-#include "netdir.h" ++#endif /* _FABTESTS_OSD_NETINET_IN_H_ */ + +-const char ofi_nd_prov_name[] = "netdir"; +- +-struct fi_provider ofi_nd_prov = { +- .name = ofi_nd_prov_name, +- .version = FI_VERSION(OFI_ND_MAJOR_VERSION, OFI_ND_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), +- .getinfo = ofi_nd_getinfo, +- .fabric = ofi_nd_fabric, +- .cleanup = ofi_nd_fini +-}; +- +-struct util_prov ofi_nd_util_prov = { +- .prov = &ofi_nd_prov, +- .info = 0, +- .flags = UTIL_RX_SHARED_CTX, +-}; +- +-#endif /* _WIN32 */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_err.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/tcp.h +similarity index 52% +rename from prov/netdir/src/netdir_err.h +rename to fabtests/include/windows/netinet/tcp.h +index 9695dd74e..dfeadf79b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_err.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/netinet/tcp.h +@@ -1,11 +1,7 @@ + /* +-* Copyright (c) 2015-2016 Intel Corporation, Inc. All rights reserved. ++* Copyright (c) 2017 Intel Corporation. All rights reserved. + * +-* This software is available to you under a choice of one of two +-* licenses. You may choose to be licensed under the terms of the GNU +-* General Public License (GPL) Version 2, available from the file +-* COPYING in the main directory of this source tree, or the +-* BSD license below: ++* This software is available to you under the BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following +@@ -30,39 +26,9 @@ + * SOFTWARE. + */ + +-#ifndef _FI_NETDIR_ERR_H_ +-#define _FI_NETDIR_ERR_H_ ++#ifndef _FABTESTS_OSD_WINDOWS_TCP_H_ ++#define _FABTESTS_OSD_WINDOWS_TCP_H_ + +-#include +- +-#include "rdma/fabric.h" +- +-#ifdef __cplusplus +-extern "C" { +-#endif /* __cplusplus */ +- +-#define H2F(x) ofi_nd_hresult_2_fierror(x) +- +-static inline int ofi_nd_hresult_2_fierror(HRESULT hr) +-{ +- switch (hr) { +- case S_OK: +- case ND_PENDING: +- return FI_SUCCESS; +- case ND_BUFFER_OVERFLOW: +- return -EOVERFLOW; /* FI_EOVERFLOW */ +- case ND_CONNECTION_REFUSED: +- return -FI_ECONNREFUSED; +- case ND_TIMEOUT: +- return -FI_ETIMEDOUT; +- default: +- return -FI_EOTHER; +- } +-} +- +-#ifdef __cplusplus +-} +-#endif /* __cplusplus */ +- +-#endif /* _FI_NETDIR_ERR_H_ */ ++#include + ++#endif /* _FABTESTS_OSD_WINDOWS_TCP_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/osd.h +new file mode 100644 +index 000000000..bf7a11450 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/osd.h +@@ -0,0 +1,233 @@ ++/* ++* Copyright (c) 2017 Intel Corporation. All rights reserved. ++* ++* This software is available to you under the BSD license below: ++* ++* Redistribution and use in source and binary forms, with or ++* without modification, are permitted provided that the following ++* conditions are met: ++* ++* - Redistributions of source code must retain the above ++* copyright notice, this list of conditions and the following ++* disclaimer. ++* ++* - Redistributions in binary form must reproduce the above ++* copyright notice, this list of conditions and the following ++* disclaimer in the documentation and/or other materials ++* provided with the distribution. ++* ++* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++* SOFTWARE. ++*/ ++ ++#ifndef _WINDOWS_OSD_H_ ++#define _WINDOWS_OSD_H_ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++struct iovec ++{ ++ void *iov_base; /* Pointer to data. */ ++ size_t iov_len; /* Length of data. */ ++}; ++ ++#define strdup _strdup ++#define strncasecmp _strnicmp ++#define SHUT_RDWR SD_BOTH ++#define CLOCK_MONOTONIC 1 ++ ++#ifndef EAI_SYSTEM ++# define EAI_SYSTEM -11 ++#endif ++ ++typedef int pid_t; ++ ++/* ++ * The FILETIME structure records time in the form of ++ * 100-nanosecond intervals since January 1, 1601 ++ */ ++#define file2unix_time 10000000i64 /* 1E+7 */ ++#define win2unix_epoch 116444736000000000i64 /* 1 Jan 1601 to 1 Jan 1970 */ ++ ++static inline ++int clock_gettime(int which_clock, struct timespec *spec) ++{ ++ __int64 wintime; ++ ++ GetSystemTimeAsFileTime((FILETIME*)&wintime); ++ wintime -= win2unix_epoch; ++ ++ spec->tv_sec = wintime / file2unix_time; ++ spec->tv_nsec = wintime % file2unix_time * 100; ++ ++ return 0; ++} ++ ++static inline int ft_close_fd(int fd) ++{ ++ return closesocket(fd); ++} ++ ++static inline int poll(struct pollfd *fds, int nfds, int timeout) ++{ ++ return WSAPoll(fds, nfds, timeout); ++} ++ ++static inline char* strndup(const char* str, size_t n) ++{ ++ char* res = strdup(str); ++ if (strlen(res) > n) ++ res[n] = '\0'; ++ return res; ++} ++ ++static inline char* strsep(char **stringp, const char *delim) ++{ ++ char* ptr = *stringp; ++ char* p; ++ ++ p = ptr ? strpbrk(ptr, delim) : NULL; ++ ++ if(!p) ++ *stringp = NULL; ++ else ++ { ++ *p = 0; ++ *stringp = p + 1; ++ } ++ ++ return ptr; ++} ++ ++#define _SC_PAGESIZE 30 ++ ++static long int sysconf(int name) ++{ ++ switch (name) { ++ case _SC_PAGESIZE: ++ SYSTEM_INFO info; ++ GetNativeSystemInfo(&info); ++ return (long int)info.dwPageSize; ++ default: ++ assert(0); ++ } ++ errno = EINVAL; ++ return -1; ++} ++ ++#define AF_LOCAL AF_UNIX ++ ++int socketpair(int af, int type, int protocol, int socks[2]); ++ ++/* Bits in the fourth argument to `waitid'. */ ++#define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */ ++#define WEXITED 4 /* Report dead child. */ ++#define WCONTINUED 8 /* Report continued child. */ ++#define WNOWAIT 0x01000000 /* Don't reap, just poll status. */ ++ ++static pid_t waitpid(pid_t pid, int *status, int options) ++{ ++ assert(0); ++ return 0; ++} ++ ++static const char* gai_strerror(int code) ++{ ++ return "Unknown error"; ++} ++ ++static pid_t fork(void) ++{ ++ assert(0); ++ return -1; ++} ++ ++static int posix_memalign(void **memptr, size_t alignment, size_t size) ++{ ++ *memptr = _aligned_malloc(size, alignment); ++ return (*memptr) ? 0 : ENOMEM; ++} ++ ++static inline int ft_startup(void) ++{ ++ int ret = 0; ++ WSADATA data; ++ ++ ret = WSAStartup(MAKEWORD(2, 2), &data); ++ if (ret) ++ return HRESULT_FROM_WIN32(ret); ++ return ret; ++} ++ ++ ++/* complex operations implementation */ ++#define OFI_COMPLEX(name) ofi_##name##_complex ++#define OFI_COMPLEX_BASE(name) OFI_COMPLEX(name)##_base ++#define OFI_COMPLEX_OP(name, op) ofi_complex_##name##_##op ++#define OFI_COMPLEX_TYPE_DECL(name, type) \ ++typedef type OFI_COMPLEX_BASE(name); \ ++typedef struct { \ ++ OFI_COMPLEX_BASE(name) re; \ ++ OFI_COMPLEX_BASE(name) im; \ ++} OFI_COMPLEX(name); ++ ++OFI_COMPLEX_TYPE_DECL(float, float) ++OFI_COMPLEX_TYPE_DECL(double, double) ++OFI_COMPLEX_TYPE_DECL(long_double, long double) ++ ++#define OFI_COMPLEX_OPS(name) \ ++static inline OFI_COMPLEX_BASE(name) OFI_COMPLEX_OP(name, real)(OFI_COMPLEX(name) v) \ ++{ \ ++ return v.re; \ ++} \ ++static inline OFI_COMPLEX_BASE(name) OFI_COMPLEX_OP(name, imag)(OFI_COMPLEX(name) v) \ ++{ \ ++ return v.im; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, sum)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ OFI_COMPLEX(name) ret = {.re = v1.re + v2.re, .im = v1.im + v2.im}; \ ++ return ret; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, mul)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ OFI_COMPLEX(name) ret = {.re = (v1.re * v2.re) - (v1.im * v2.im), \ ++ .im = (v1.re * v2.im) + (v1.im * v2.re)}; \ ++ return ret; \ ++} \ ++static inline int OFI_COMPLEX_OP(name, equ)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ return v1.re == v2.re && v1.im == v2.im; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, land)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ OFI_COMPLEX(name) zero = {.re = 0, .im = 0}; \ ++ int equ = !OFI_COMPLEX_OP(name, equ)(v1, zero) && !OFI_COMPLEX_OP(name, equ)(v2, zero); \ ++ OFI_COMPLEX(name) ret = {.re = equ ? 1.f : 0, .im = 0}; \ ++ return ret; \ ++} \ ++static inline OFI_COMPLEX(name) OFI_COMPLEX_OP(name, lor)(OFI_COMPLEX(name) v1, OFI_COMPLEX(name) v2) \ ++{ \ ++ OFI_COMPLEX(name) zero = {.re = 0, .im = 0}; \ ++ int equ = !OFI_COMPLEX_OP(name, equ)(v1, zero) || !OFI_COMPLEX_OP(name, equ)(v2, zero); \ ++ OFI_COMPLEX(name) ret = {.re = equ ? 1.f : 0, .im = 0}; \ ++ return ret; \ ++} ++ ++OFI_COMPLEX_OPS(float) ++OFI_COMPLEX_OPS(double) ++OFI_COMPLEX_OPS(long_double) ++ ++#endif /* _WINDOWS_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/poll.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/poll.h +new file mode 100644 +index 000000000..b6393fb36 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/poll.h +@@ -0,0 +1,2 @@ ++ ++#pragma once +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/socket.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/socket.h +new file mode 100644 +index 000000000..b6393fb36 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/socket.h +@@ -0,0 +1,2 @@ ++ ++#pragma once +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/uio.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/uio.h +new file mode 100644 +index 000000000..b6393fb36 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/uio.h +@@ -0,0 +1,2 @@ ++ ++#pragma once +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/wait.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/wait.h +new file mode 100644 +index 000000000..b6393fb36 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/sys/wait.h +@@ -0,0 +1,2 @@ ++ ++#pragma once +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/unistd.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/unistd.h +new file mode 100644 +index 000000000..064012f4a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/include/windows/unistd.h +@@ -0,0 +1,3 @@ ++#pragma once ++ ++#define sleep(x) Sleep(x * 1000) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/fabtests.7.md b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/fabtests.7.md +new file mode 100644 +index 000000000..ef3b94633 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/fabtests.7.md +@@ -0,0 +1,377 @@ ++--- ++layout: page ++title: fabtests(7) ++tagline: Fabtests Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++Fabtests ++ ++# SYNOPSIS ++ ++Fabtests is a set of examples for fabric providers that demonstrates ++various features of libfabric- high-performance fabric software library. ++ ++# OVERVIEW ++ ++Libfabric defines sets of interface that fabric providers can support. ++The purpose of Fabtests examples is to demonstrate some of the major features. ++The goal is to familiarize users with different functionalities libfabric ++offers and how to use them. Although most tests report performance numbers, ++they are designed to test functionality and not performance. The exception ++are the benchmarks and ubertest. ++ ++The tests are divided into the following categories. Except the unit tests ++all of them are client-server tests. Not all providers will support each test. ++ ++The test names try to indicate the type of functionality each test is ++verifying. Although some tests work with any endpoint type, many are ++restricted to verifying a single endpoint type. These tests typically ++include the endpoint type as part of the test name, such as dgram, msg, or ++rdm. ++ ++# Functional ++ ++These tests are a mix of very basic functionality tests that show major ++features of libfabric. ++ ++*fi_av_xfer* ++: Tests communication for unconnected endpoints, as addresses ++ are inserted and removed from the local address vector. ++ ++*fi_cm_data* ++: Verifies exchanging CM data as part of connecting endpoints. ++ ++*fi_cq_data* ++: Tranfers messages with CQ data. ++ ++*fi_dgram* ++: A basic datagram endpoint example. ++ ++*fi_dgram_waitset* ++: Transfers datagrams using waitsets for completion notifcation. ++ ++*fi_inj_complete* ++: Sends messages using the FI_INJECT_COMPLETE operation flag. ++ ++*fi_mcast* ++: A simple multicast test. ++ ++*fi_msg* ++: A basic message endpoint example. ++ ++*fi_msg_epoll* ++: Transfers messages with completion queues configured to use file ++ descriptors as wait objetcts. The file descriptors are retrieved ++ by the program and used directly with the Linux epoll API. ++ ++*fi_msg_sockets* ++: Verifies that the address assigned to a passive endpoint can be ++ transitioned to an active endpoint. This is required applications ++ that need socket API semantics over RDMA implementations (e.g. rsockets). ++ ++*fi_multi_ep* ++: Performs data transfers over multiple endpoints in parallel. ++ ++*fi_multi_mr* ++: Issues RMA write operations to multiple memory regions, using ++ completion counters of inbound writes as the notification ++ mechanism. ++ ++*fi_poll* ++: Exchanges data over RDM endpoints using poll sets to drive ++ completion notifications. ++ ++*fi_rdm* ++: A basic RDM endpoint example. ++ ++*fi_rdm_atomic* ++: Test and verifies atomic operations over an RDM endpoint. ++ ++*fi_rdm_deferred_wq* ++: Test triggered operations and deferred work queue support. ++ ++*fi_rdm_multi_domain* ++: Performs data transfers over multiple endpoints, with each ++ endpoint belonging to a different opened domain. ++ ++*fi_rdm_multi_recv* ++: Transfers multiple messages over an RDM endpoint that are received ++ into a single buffer, posted using the FI_MULTI_RECV flag. ++ ++*fi_rdm_rma_simple* ++: A simple RMA write example over an RDM endpoint. ++ ++*fi_rdm_rma_trigger* ++: A basic example of queuing an RMA write operation that is initiated ++ upon the firing of a triggering completion. Works with RDM endpoints. ++ ++*fi_rdm_shared_av* ++: Spawns child processes to verify basic functionality of using a shared ++ address vector with RDM endpoints. ++ ++*fi_rdm_tagged_peek* ++: Basic test of using the FI_PEEK operation flag with tagged messages. ++ Works with RDM endpoints. ++ ++*fi_recv_cancel* ++: Tests canceling posted receives for tagged messages. ++ ++*fi_resmgmt_test* ++: Tests the resource management enabled feature. This verifies that the ++ provider prevents applications from overruning local and remote command ++ queues and completion queues. This corresponds to setting the domain ++ attribute resource_mgmt to FI_RM_ENABLED. ++ ++*fi_scalable_ep* ++: Performs data transfers over scalable endpoints, endpoints associated ++ with multiple transmit and receive contexts. ++ ++*fi_shared_ctx* ++: Performs data transfers between multiple endpoints, where the endpoints ++ share transmit and/or receive contexts. ++ ++*fi_unexpected_msg* ++: Tests the send and receive handling of unexpected tagged messages. ++ ++# Benchmarks ++ ++The client and the server exchange messages in either a ping-pong manner, ++for pingpong named tests, or transfer messages one-way, for bw named tests. ++These tests can transfer various messages sizes, with controls over which ++features are used by the test, and report performance numbers. The tests ++are structured based on the benchmarks provided by OSU MPI. They are not ++guaranteed to provide the best latency or bandwidth performance numbers a ++given provider or system may achieve. ++ ++*fi_dgram_pingpong* ++: Latency test for datagram endpoints ++ ++*fi_msg_bw* ++: Message transfer bandwidth test for connected (MSG) endpoints. ++ ++*fi_msg_pingpong* ++: Message transfer latency test for connected (MSG) endpoints. ++ ++*fi_rdm_cntr_pingpong* ++: Message transfer latency test for reliable-datagram (RDM) endpoints ++ that uses counters as the completion mechanism. ++ ++*fi_rdm_pingpong* ++: Message transfer latency test for reliable-datagram (RDM) endpoints. ++ ++*fi_rdm_tagged_bw* ++: Tagged message bandwidth test for reliable-datagram (RDM) endpoints. ++ ++*fi_rdm_tagged_pingpong* ++: Tagged message latency test for reliable-datagram (RDM) endpoints. ++ ++*fi_rma_bw* ++: An RMA read and write bandwidth test for reliable (MSG and RDM) endpoints. ++ ++# Unit ++ ++These are simple one-sided unit tests that validate basic behavior of the API. ++Because these are single system tests that do not perform data transfers their ++testing scope is limited. ++ ++*fi_av_test* ++: Verify address vector interfaces. ++ ++*fi_cntr_test* ++: Tests counter creation and destruction. ++ ++*fi_cq_test* ++: Tests completion queue creation and destruction. ++ ++*fi_dom_test* ++: Tests domain creation and destruction. ++ ++*fi_eq_test* ++: Tests event queue creation, destruction, and capabilities. ++ ++*fi_getinfo_test* ++: Tests provider response to fi_getinfo calls with varying hints. ++ ++*fi_mr_test* ++: Tests memory registration. ++ ++*fi_resource_freeing* ++: Allocates and closes fabric resources to check for proper cleanup. ++ ++# Ubertest ++ ++This is a comprehensive latency, bandwidth, and functionality test that can ++handle a variety of test configurations. The test is able to run a large ++number of tests by iterating over a large number of test variables. As a ++result, a full ubertest run can take a significant amount of time. Because ++ubertest iterates over input variables, it relies on a test configuration ++file for control, rather than extensive command line options that are used ++by other fabtests. A configuration file must be constructured for each ++provider. Example test configurations are at /test_configs. ++ ++*fi_ubertest* ++: This test takes a configure file as input. The file contains a list of ++ variables and their values to iterate over. The test will run a set of ++ latency, bandwidth, and functionality tests over a given provider. It ++ will perform one execution for every possible combination of all variables. ++ For example, if there are 8 test variables, with 6 having 2 possible ++ values and 2 having 3 possible values, ubertest will execute 576 total ++ iterations of each test. ++ ++# HOW TO RUN TESTS ++ ++(1) Fabtests requires that libfabric be installed on the system, and at least one provider be usable. ++ ++(2) Install fabtests on the system. By default all the test executables are installed in /usr/bin directory unless specified otherwise. ++ ++(3) All the client-server tests have the following usage model: ++ ++ fi_ [OPTIONS] start server ++ fi_ connect to server ++ ++# COMMAND LINE OPTIONS ++ ++Tests share command line options where appropriate. The following ++command line options are available for one or more test. To see which ++options apply for a given test, you can use the '-h' help option to see ++the list available for that test. ++ ++*-h* ++: Displays help output for the test. ++ ++*-f * ++: Restrict test to the specified fabric name. ++ ++*-d * ++: Restrict test to the specified domain name. ++ ++*-p * ++: Restrict test to the specified provider name. ++ ++*-e * ++: Use the specified endpoint type for the test. Valid options are msg, ++ dgram, and rdm. The default endpoint type is rdm. ++ ++*-a
* ++: The name of a shared address vector. This option only applies to tests ++ that support shared address vectors. ++ ++*-B * ++: Specifies the port number of the local endpoint, overriding the default. ++ ++*-P * ++: Specifies the port number of the peer endpoint, overriding the default. ++ ++*-s
* ++: Specifies the address of the local endpoint. ++ ++*-b[=oob_port]* ++: Enables out-of-band (via sockets) address exchange and test ++ synchronization. A port for the out-of-band connection may be specified ++ as part of this option to override the default. ++ ++*-I * ++: Number of data transfer iterations. ++ ++*-w * ++: Number of warm-up data transfer iterations. ++ ++*-S * ++: Data transfer size or 'all' for a full range of sizes. By default a ++ select number of sizes will be tested. ++ ++*-l* ++: If specified, the starting address of transmit and receive buffers will ++ be aligned along a page boundary. ++ ++*-m* ++: Use machine readable output. This is useful for post-processing the test ++ output with scripts. ++ ++*-t * ++: Specify the type of completion mechanism to use. Valid values are queue ++ and counter. The default is to use completion queues. ++ ++*-c * ++: Indicate the type of processing to use checking for completed operations. ++ Valid values are spin, sread, and fd. The default is to busy wait (spin) ++ until the desired operation has completed. The sread option indicates that ++ the application will invoke a blocking read call in libfabric, such as ++ fi_cq_sread. Fd indicates that the application will retrieve the native ++ operating system wait object (file descriptor) and use either poll() or ++ select() to block until the fd has been signaled, prior to checking for ++ completions. ++ ++*-o * ++: For RMA based tests, specify the type of RMA operation to perform. Valid ++ values are read, write, and writedata. Write operations are the default. ++ ++*-M * ++: For multicast tests, specifies the address of the multicast group to join. ++ ++# USAGE EXAMPLES ++ ++## A simple example ++ ++ run server: -p -s ++ e.g. fi_msg_rma -p sockets -s 192.168.0.123 ++ run client: -p ++ e.g. fi_msg_rma 192.168.0.123 -p sockets ++ ++## An example with various options ++ ++ run server: fi_rdm_atomic -p psm -s 192.168.0.123 -I 1000 -S 1024 ++ run client: fi_rdm_atomic 192.168.0.123 -p psm -I 1000 -S 1024 ++ ++This will run "fi_rdm_atomic" for all atomic operations with ++ ++ - PSM provider ++ - 1000 iterations ++ - 1024 bytes message size ++ - server node as 123.168.0.123 ++ ++## Run fi_ubertest ++ ++ run server: fi_ubertest ++ run client: fi_ubertest -u /usr/share/fabtests/test_configs/sockets/quick.test 192.168.0.123 ++ ++This will run "fi_ubertest" with ++ ++ - sockets provider ++ - configurations defined in /usr/share/fabtests/test_configs/sockets/quick.test ++ - server node as 192.168.0.123 ++ ++The config files are provided in /test_configs for sockets, verbs, udp, ++and usnic providers and distributed with fabtests installation. ++ ++For more usage options: fi_ubertest -h ++ ++## Run the whole fabtests suite ++ ++A runscript scripts/runfabtests.sh is provided that runs all the tests ++in fabtests and reports the number of pass/fail/notrun. ++ ++ Usage: runfabtests.sh [OPTIONS] [provider] [host] [client] ++ ++By default if none of the options are provided, it runs all the tests using ++ ++ - sockets provider ++ - 127.0.0.1 as both server and client address ++ - for small number of optiond and iterations ++ ++Various options can be used to choose provider, subset tests to run, ++level of verbosity etc. ++ ++ runfabtests.sh -vvv -t all psm 192.168.0.123 192.168.0.124 ++ ++This will run all fabtests using ++ ++ - psm provider ++ - for different options and larger iterations ++ - server node as 192.168.0.123 and client node as 192.168.0.124 ++ - print test output for all the tests ++ ++For detailed usage options: runfabtests.sh -h +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_test.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_xfer.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_xfer.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_av_xfer.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cm_data.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cm_data.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cm_data.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cntr_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cntr_test.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cntr_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_data.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_data.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_data.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_test.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_cq_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_pingpong.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_waitset.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_waitset.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dgram_waitset.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dom_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dom_test.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_dom_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_eq_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_eq_test.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_eq_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_getinfo_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_getinfo_test.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_getinfo_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_inj_complete.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_inj_complete.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_inj_complete.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mcast.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mcast.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mcast.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mr_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mr_test.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_mr_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_bw.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_bw.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_bw.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_epoll.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_epoll.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_epoll.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_pingpong.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_sockets.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_sockets.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_msg_sockets.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_ep.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_ep.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_ep.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_mr.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_mr.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_multi_mr.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_poll.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_poll.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_poll.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_atomic.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_atomic.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_atomic.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_cntr_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_cntr_pingpong.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_cntr_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_deferred_wq.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_deferred_wq.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_deferred_wq.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_domain.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_domain.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_domain.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_recv.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_recv.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_multi_recv.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_pingpong.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_simple.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_simple.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_simple.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_trigger.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_trigger.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_rma_trigger.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_shared_av.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_shared_av.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_shared_av.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_bw.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_bw.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_bw.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_peek.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_peek.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_peek.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_pingpong.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rdm_tagged_pingpong.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_recv_cancel.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_recv_cancel.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_recv_cancel.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resmgmt_test.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resmgmt_test.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resmgmt_test.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resource_freeing.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resource_freeing.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_resource_freeing.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rma_bw.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rma_bw.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_rma_bw.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_scalable_ep.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_scalable_ep.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_scalable_ep.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_shared_ctx.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_shared_ctx.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_shared_ctx.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_ubertest.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_ubertest.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_ubertest.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_unexpected_msg.1 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_unexpected_msg.1 +new file mode 100644 +index 000000000..3f6ccf96f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man1/fi_unexpected_msg.1 +@@ -0,0 +1 @@ ++.so man7/fabtests.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man7/fabtests.7 b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man7/fabtests.7 +new file mode 100644 +index 000000000..64364cbbb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/man/man7/fabtests.7 +@@ -0,0 +1,550 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fabtests" "7" "2018\-10\-06" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++Fabtests ++.SH SYNOPSIS ++.PP ++Fabtests is a set of examples for fabric providers that demonstrates ++various features of libfabric\- high\-performance fabric software ++library. ++.SH OVERVIEW ++.PP ++Libfabric defines sets of interface that fabric providers can support. ++The purpose of Fabtests examples is to demonstrate some of the major ++features. ++The goal is to familiarize users with different functionalities ++libfabric offers and how to use them. ++Although most tests report performance numbers, they are designed to ++test functionality and not performance. ++The exception are the benchmarks and ubertest. ++.PP ++The tests are divided into the following categories. ++Except the unit tests all of them are client\-server tests. ++Not all providers will support each test. ++.PP ++The test names try to indicate the type of functionality each test is ++verifying. ++Although some tests work with any endpoint type, many are restricted to ++verifying a single endpoint type. ++These tests typically include the endpoint type as part of the test ++name, such as dgram, msg, or rdm. ++.SH Functional ++.PP ++These tests are a mix of very basic functionality tests that show major ++features of libfabric. ++.TP ++.B \f[I]fi_av_xfer\f[] ++Tests communication for unconnected endpoints, as addresses are inserted ++and removed from the local address vector. ++.RS ++.RE ++.TP ++.B \f[I]fi_cm_data\f[] ++Verifies exchanging CM data as part of connecting endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_cq_data\f[] ++Tranfers messages with CQ data. ++.RS ++.RE ++.TP ++.B \f[I]fi_dgram\f[] ++A basic datagram endpoint example. ++.RS ++.RE ++.TP ++.B \f[I]fi_dgram_waitset\f[] ++Transfers datagrams using waitsets for completion notifcation. ++.RS ++.RE ++.TP ++.B \f[I]fi_inj_complete\f[] ++Sends messages using the FI_INJECT_COMPLETE operation flag. ++.RS ++.RE ++.TP ++.B \f[I]fi_mcast\f[] ++A simple multicast test. ++.RS ++.RE ++.TP ++.B \f[I]fi_msg\f[] ++A basic message endpoint example. ++.RS ++.RE ++.TP ++.B \f[I]fi_msg_epoll\f[] ++Transfers messages with completion queues configured to use file ++descriptors as wait objetcts. ++The file descriptors are retrieved by the program and used directly with ++the Linux epoll API. ++.RS ++.RE ++.TP ++.B \f[I]fi_msg_sockets\f[] ++Verifies that the address assigned to a passive endpoint can be ++transitioned to an active endpoint. ++This is required applications that need socket API semantics over RDMA ++implementations (e.g. ++rsockets). ++.RS ++.RE ++.TP ++.B \f[I]fi_multi_ep\f[] ++Performs data transfers over multiple endpoints in parallel. ++.RS ++.RE ++.TP ++.B \f[I]fi_multi_mr\f[] ++Issues RMA write operations to multiple memory regions, using completion ++counters of inbound writes as the notification mechanism. ++.RS ++.RE ++.TP ++.B \f[I]fi_poll\f[] ++Exchanges data over RDM endpoints using poll sets to drive completion ++notifications. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm\f[] ++A basic RDM endpoint example. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_atomic\f[] ++Test and verifies atomic operations over an RDM endpoint. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_deferred_wq\f[] ++Test triggered operations and deferred work queue support. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_multi_domain\f[] ++Performs data transfers over multiple endpoints, with each endpoint ++belonging to a different opened domain. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_multi_recv\f[] ++Transfers multiple messages over an RDM endpoint that are received into ++a single buffer, posted using the FI_MULTI_RECV flag. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_rma_simple\f[] ++A simple RMA write example over an RDM endpoint. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_rma_trigger\f[] ++A basic example of queuing an RMA write operation that is initiated upon ++the firing of a triggering completion. ++Works with RDM endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_shared_av\f[] ++Spawns child processes to verify basic functionality of using a shared ++address vector with RDM endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_tagged_peek\f[] ++Basic test of using the FI_PEEK operation flag with tagged messages. ++Works with RDM endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_recv_cancel\f[] ++Tests canceling posted receives for tagged messages. ++.RS ++.RE ++.TP ++.B \f[I]fi_resmgmt_test\f[] ++Tests the resource management enabled feature. ++This verifies that the provider prevents applications from overruning ++local and remote command queues and completion queues. ++This corresponds to setting the domain attribute resource_mgmt to ++FI_RM_ENABLED. ++.RS ++.RE ++.TP ++.B \f[I]fi_scalable_ep\f[] ++Performs data transfers over scalable endpoints, endpoints associated ++with multiple transmit and receive contexts. ++.RS ++.RE ++.TP ++.B \f[I]fi_shared_ctx\f[] ++Performs data transfers between multiple endpoints, where the endpoints ++share transmit and/or receive contexts. ++.RS ++.RE ++.TP ++.B \f[I]fi_unexpected_msg\f[] ++Tests the send and receive handling of unexpected tagged messages. ++.RS ++.RE ++.SH Benchmarks ++.PP ++The client and the server exchange messages in either a ping\-pong ++manner, for pingpong named tests, or transfer messages one\-way, for bw ++named tests. ++These tests can transfer various messages sizes, with controls over ++which features are used by the test, and report performance numbers. ++The tests are structured based on the benchmarks provided by OSU MPI. ++They are not guaranteed to provide the best latency or bandwidth ++performance numbers a given provider or system may achieve. ++.TP ++.B \f[I]fi_dgram_pingpong\f[] ++Latency test for datagram endpoints ++.RS ++.RE ++.TP ++.B \f[I]fi_msg_bw\f[] ++Message transfer bandwidth test for connected (MSG) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_msg_pingpong\f[] ++Message transfer latency test for connected (MSG) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_cntr_pingpong\f[] ++Message transfer latency test for reliable\-datagram (RDM) endpoints ++that uses counters as the completion mechanism. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_pingpong\f[] ++Message transfer latency test for reliable\-datagram (RDM) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_tagged_bw\f[] ++Tagged message bandwidth test for reliable\-datagram (RDM) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rdm_tagged_pingpong\f[] ++Tagged message latency test for reliable\-datagram (RDM) endpoints. ++.RS ++.RE ++.TP ++.B \f[I]fi_rma_bw\f[] ++An RMA read and write bandwidth test for reliable (MSG and RDM) ++endpoints. ++.RS ++.RE ++.SH Unit ++.PP ++These are simple one\-sided unit tests that validate basic behavior of ++the API. ++Because these are single system tests that do not perform data transfers ++their testing scope is limited. ++.TP ++.B \f[I]fi_av_test\f[] ++Verify address vector interfaces. ++.RS ++.RE ++.TP ++.B \f[I]fi_cntr_test\f[] ++Tests counter creation and destruction. ++.RS ++.RE ++.TP ++.B \f[I]fi_cq_test\f[] ++Tests completion queue creation and destruction. ++.RS ++.RE ++.TP ++.B \f[I]fi_dom_test\f[] ++Tests domain creation and destruction. ++.RS ++.RE ++.TP ++.B \f[I]fi_eq_test\f[] ++Tests event queue creation, destruction, and capabilities. ++.RS ++.RE ++.TP ++.B \f[I]fi_getinfo_test\f[] ++Tests provider response to fi_getinfo calls with varying hints. ++.RS ++.RE ++.TP ++.B \f[I]fi_mr_test\f[] ++Tests memory registration. ++.RS ++.RE ++.TP ++.B \f[I]fi_resource_freeing\f[] ++Allocates and closes fabric resources to check for proper cleanup. ++.RS ++.RE ++.SH Ubertest ++.PP ++This is a comprehensive latency, bandwidth, and functionality test that ++can handle a variety of test configurations. ++The test is able to run a large number of tests by iterating over a ++large number of test variables. ++As a result, a full ubertest run can take a significant amount of time. ++Because ubertest iterates over input variables, it relies on a test ++configuration file for control, rather than extensive command line ++options that are used by other fabtests. ++A configuration file must be constructured for each provider. ++Example test configurations are at /test_configs. ++.TP ++.B \f[I]fi_ubertest\f[] ++This test takes a configure file as input. ++The file contains a list of variables and their values to iterate over. ++The test will run a set of latency, bandwidth, and functionality tests ++over a given provider. ++It will perform one execution for every possible combination of all ++variables. ++For example, if there are 8 test variables, with 6 having 2 possible ++values and 2 having 3 possible values, ubertest will execute 576 total ++iterations of each test. ++.RS ++.RE ++.SH HOW TO RUN TESTS ++.IP "(1)" 4 ++Fabtests requires that libfabric be installed on the system, and at ++least one provider be usable. ++.IP "(2)" 4 ++Install fabtests on the system. ++By default all the test executables are installed in /usr/bin directory ++unless specified otherwise. ++.IP "(3)" 4 ++All the client\-server tests have the following usage model: ++.RS 4 ++.PP ++fi_ [OPTIONS] start server fi_ connect to server ++.RE ++.SH COMMAND LINE OPTIONS ++.PP ++Tests share command line options where appropriate. ++The following command line options are available for one or more test. ++To see which options apply for a given test, you can use the ++\[aq]\-h\[aq] help option to see the list available for that test. ++.TP ++.B \f[I]\-h\f[] ++Displays help output for the test. ++.RS ++.RE ++.TP ++.B \f[I]\-f \f[] ++Restrict test to the specified fabric name. ++.RS ++.RE ++.TP ++.B \f[I]\-d \f[] ++Restrict test to the specified domain name. ++.RS ++.RE ++.TP ++.B \f[I]\-p \f[] ++Restrict test to the specified provider name. ++.RS ++.RE ++.TP ++.B \f[I]\-e \f[] ++Use the specified endpoint type for the test. ++Valid options are msg, dgram, and rdm. ++The default endpoint type is rdm. ++.RS ++.RE ++*\-a ++.IP \[bu] 2 ++: The name of a shared address vector. ++This option only applies to tests that support shared address vectors. ++.TP ++.B \f[I]\-B \f[] ++Specifies the port number of the local endpoint, overriding the default. ++.RS ++.RE ++.TP ++.B \f[I]\-P \f[] ++Specifies the port number of the peer endpoint, overriding the default. ++.RS ++.RE ++*\-s ++.IP \[bu] 2 ++: Specifies the address of the local endpoint. ++.TP ++.B \f[I]\-b[=oob_port]\f[] ++Enables out\-of\-band (via sockets) address exchange and test ++synchronization. ++A port for the out\-of\-band connection may be specified as part of this ++option to override the default. ++.RS ++.RE ++.TP ++.B \f[I]\-I \f[] ++Number of data transfer iterations. ++.RS ++.RE ++.TP ++.B \f[I]\-w \f[] ++Number of warm\-up data transfer iterations. ++.RS ++.RE ++.TP ++.B \f[I]\-S \f[] ++Data transfer size or \[aq]all\[aq] for a full range of sizes. ++By default a select number of sizes will be tested. ++.RS ++.RE ++.TP ++.B \f[I]\-l\f[] ++If specified, the starting address of transmit and receive buffers will ++be aligned along a page boundary. ++.RS ++.RE ++.TP ++.B \f[I]\-m\f[] ++Use machine readable output. ++This is useful for post\-processing the test output with scripts. ++.RS ++.RE ++.TP ++.B \f[I]\-t \f[] ++Specify the type of completion mechanism to use. ++Valid values are queue and counter. ++The default is to use completion queues. ++.RS ++.RE ++.TP ++.B \f[I]\-c \f[] ++Indicate the type of processing to use checking for completed ++operations. ++Valid values are spin, sread, and fd. ++The default is to busy wait (spin) until the desired operation has ++completed. ++The sread option indicates that the application will invoke a blocking ++read call in libfabric, such as fi_cq_sread. ++Fd indicates that the application will retrieve the native operating ++system wait object (file descriptor) and use either poll() or select() ++to block until the fd has been signaled, prior to checking for ++completions. ++.RS ++.RE ++.TP ++.B \f[I]\-o \f[] ++For RMA based tests, specify the type of RMA operation to perform. ++Valid values are read, write, and writedata. ++Write operations are the default. ++.RS ++.RE ++.TP ++.B \f[I]\-M \f[] ++For multicast tests, specifies the address of the multicast group to ++join. ++.RS ++.RE ++.SH USAGE EXAMPLES ++.SS A simple example ++.IP ++.nf ++\f[C] ++run\ server:\ \ \-p\ \ \-s\ ++\ \ \ \ e.g.\ \ \ \ fi_msg_rma\ \-p\ sockets\ \-s\ 192.168.0.123 ++run\ client:\ \ \ \-p\ ++\ \ \ \ e.g.\ \ \ \ fi_msg_rma\ 192.168.0.123\ \-p\ sockets ++\f[] ++.fi ++.SS An example with various options ++.IP ++.nf ++\f[C] ++run\ server:\ fi_rdm_atomic\ \-p\ psm\ \-s\ 192.168.0.123\ \-I\ 1000\ \-S\ 1024 ++run\ client:\ fi_rdm_atomic\ 192.168.0.123\ \-p\ psm\ \-I\ 1000\ \-S\ 1024 ++\f[] ++.fi ++.PP ++This will run "fi_rdm_atomic" for all atomic operations with ++.IP ++.nf ++\f[C] ++\-\ PSM\ provider ++\-\ 1000\ iterations ++\-\ 1024\ bytes\ message\ size ++\-\ server\ node\ as\ 123.168.0.123 ++\f[] ++.fi ++.SS Run fi_ubertest ++.IP ++.nf ++\f[C] ++run\ server:\ fi_ubertest ++run\ client:\ fi_ubertest\ \-u\ /usr/share/fabtests/test_configs/sockets/quick.test\ 192.168.0.123 ++\f[] ++.fi ++.PP ++This will run "fi_ubertest" with ++.IP ++.nf ++\f[C] ++\-\ sockets\ provider ++\-\ configurations\ defined\ in\ /usr/share/fabtests/test_configs/sockets/quick.test ++\-\ server\ node\ as\ 192.168.0.123 ++\f[] ++.fi ++.PP ++The config files are provided in /test_configs for sockets, verbs, udp, ++and usnic providers and distributed with fabtests installation. ++.PP ++For more usage options: fi_ubertest \-h ++.SS Run the whole fabtests suite ++.PP ++A runscript scripts/runfabtests.sh is provided that runs all the tests ++in fabtests and reports the number of pass/fail/notrun. ++.IP ++.nf ++\f[C] ++Usage:\ runfabtests.sh\ [OPTIONS]\ [provider]\ [host]\ [client] ++\f[] ++.fi ++.PP ++By default if none of the options are provided, it runs all the tests ++using ++.IP ++.nf ++\f[C] ++\-\ sockets\ provider ++\-\ 127.0.0.1\ as\ both\ server\ and\ client\ address ++\-\ for\ small\ number\ of\ optiond\ and\ iterations ++\f[] ++.fi ++.PP ++Various options can be used to choose provider, subset tests to run, ++level of verbosity etc. ++.IP ++.nf ++\f[C] ++runfabtests.sh\ \-vvv\ \-t\ all\ psm\ 192.168.0.123\ 192.168.0.124 ++\f[] ++.fi ++.PP ++This will run all fabtests using ++.IP ++.nf ++\f[C] ++\-\ psm\ provider ++\-\ for\ different\ options\ and\ larger\ iterations ++\-\ server\ node\ as\ 192.168.0.123\ and\ client\ node\ as\ 192.168.0.124 ++\-\ print\ test\ output\ for\ all\ the\ tests ++\f[] ++.fi ++.PP ++For detailed usage options: runfabtests.sh \-h ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/parseyaml.py b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/parseyaml.py +new file mode 100755 +index 000000000..9ece600fa +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/parseyaml.py +@@ -0,0 +1,95 @@ ++#!/usr/bin/env python ++ ++import sys ++import pprint ++import operator ++from optparse import OptionParser ++ ++try: ++ import yaml ++except ImportError: ++ print ("PyYAML library missing, try: yum install PyYAML") ++ sys.exit(1) ++ ++# diff two list-of dicts for perf numbers ++# this means just produce xfer_size, MB/sec, usec/xfer ++def _diff(a,b): ++ r = [] ++ ++ for v1, v2 in zip(a,b): ++ d = {} ++ for k in v2.keys(): ++ if k == 'xfer_size': ++ d[k] = v2[k] ++ elif k == 'MB/sec' or k == 'usec/xfer': ++ d[k] = float((v2[k] - v1[k])) / float(v1[k]) * 100 ++ else: ++ continue ++ ++ r.append(d.copy()) ++ ++ return r ++ ++def difference(ystream): ++ """Subtract a from b and print the results""" ++ ++ # reverse stream and split based on key ++ rev = reversed(list(ystream)) ++ a, b = {}, {} ++ for i in rev: ++ if not set(i).issubset(set(b)): ++ b.update(i) ++ else: ++ a.update(i) ++ ++ result = {} ++ for k in b.keys(): ++ result[k] = _diff(a[k], b[k]) ++ ++ return result ++ ++def pretty(stream): ++ """Prety-print given yaml stream and exit""" ++ for i in stream: pprint.pprint(i) ++ return 0 ++ ++def perfprint(d): ++ for k,v in d.items(): ++ print k, ":" ++ for i in v: ++ print 'xfer_size: ', i['xfer_size'], ++ print ', MB/sec: %.2f' % i['MB/sec'] + '%', ++ print ', usec/xfer: %.2f' % i['usec/xfer'] + '%' ++ ++ ++def main(argv=None): ++ ++ parser = OptionParser(description='fabtests yaml parsing utility') ++ parser.add_option('-d', action='store_true', default=False, help=difference.__doc__) ++ parser.add_option('-v', action='store_true', default=False, help=pretty.__doc__) ++ (options, args) = parser.parse_args() ++ ++ if len(args) == 0: ++ fd = sys.stdin ++ elif len(args) > 1: ++ class fd: ++ @staticmethod ++ def read(): ++ r1 = map(open, args) ++ r2 = map(lambda x: x.read(), r1) ++ return reduce(operator.add, r2) ++ else: ++ fd = open(args[0], 'r') ++ ++ yi = yaml.load_all(fd.read()) ++ ++ if options.d: ++ perfprint(difference(yi)) ++ ++ if options.v: ++ pretty(yi) ++ ++ return 0 ++ ++if __name__ == "__main__": ++ sys.exit(main(sys.argv)) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/rft_yaml_to_junit_xml b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/rft_yaml_to_junit_xml +new file mode 100755 +index 000000000..feb646366 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/rft_yaml_to_junit_xml +@@ -0,0 +1,97 @@ ++#!/usr/bin/env ruby ++ ++# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. ++# ++# This software is available to you under a choice of one of two ++# licenses. You may choose to be licensed under the terms of the GNU ++# General Public License (GPL) Version 2, available from the file ++# COPYING in the main directory of this source tree, or the ++# BSD license below: ++# ++# Redistribution and use in source and binary forms, with or ++# without modification, are permitted provided that the following ++# conditions are met: ++# ++# - Redistributions of source code must retain the above ++# copyright notice, this list of conditions and the following ++# disclaimer. ++# ++# - Redistributions in binary form must reproduce the above ++# copyright notice, this list of conditions and the following ++# disclaimer in the documentation and/or other materials ++# provided with the distribution. ++# ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV ++# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++# SOFTWARE. ++ ++# Transform YAML-formatted runfabtests.sh output on STDIN into jUnit-formatted ++# XML on STDOUT. ++ ++require 'yaml' ++ ++results = YAML.load(ARGF); ++ ++suite_duration = 0.0 ++num_tests = 0 ++failures = 0 # jUnit considers failures/errors to be different, we only use ++errors = 0 # failures for right now ++skipped = 0 ++ ++# make an initial pass so we can fill out the tag's attributes ++results.each do |tcase| ++ num_tests += 1 ++ ++ case tcase['result'] ++ when 'Notrun' ++ skipped += 1 ++ when 'Fail' ++ failures += 1 ++ end ++ ++ suite_duration += tcase['time'] ++end ++ ++printf %Q{\n}, ++ num_tests, failures, errors, skipped, suite_duration ++ ++# now emit each ++results.each do |tcase| ++ if tcase.has_key?('client_stdout') ++ output = "SERVER OUTPUT:\n" ++ output += tcase['server_stdout'] ++ output += "\n" ++ output += "CLIENT OUTPUT:\n" ++ output += tcase['client_stdout'] ++ else ++ output = tcase['server_stdout'] ++ end ++ ++ puts <<-EOT ++ ++ EOT ++ case tcase['result'] ++ when 'Notrun' ++ puts <<-EOT ++ ++ EOT ++ when 'Fail' ++ puts <<-EOT ++ "#{tcase['name']}" failed ++ EOT ++ end ++ puts <<-EOT ++ ++ ++ ++ ++ ++ EOT ++end ++ ++puts "" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/run_with_output.cmd b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/run_with_output.cmd +new file mode 100644 +index 000000000..bc105cab8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/run_with_output.cmd +@@ -0,0 +1,11 @@ ++set cmdline=%1 ++set out_file=%2 ++set result_file=%3 ++ ++ ++for /f "tokens=*" %%n in (%cmdline%) do set test_cmdline=%%n ++%test_cmdline% >%out_file% 2>&1 ++echo %errorlevel% >%result_file%.tmp ++ren %result_file%.tmp %result_file% ++ ++exit +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.cmd b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.cmd +new file mode 100644 +index 000000000..8d31b7704 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.cmd +@@ -0,0 +1,265 @@ ++@echo off ++setlocal EnableDelayedExpansion ++ ++set PATH=%~dp0;%PATH% ++ ++ ++set S_INTERFACE=127.0.0.1 ++set C_INTERFACE=127.0.0.1 ++ ++set TEST_FAIL_TIMEOUT=90 ++ ++set unit_tests=^ ++ "av_test -g 192.168.10.1 -n 1 -s 127.0.0.1"^ ++ "eq_test" ++rem Disabling this test since it fails on windows (appveyor). Re-enable after root cause is identified and fixed ++rem "dom_test -n 2" ++ ++set functional_tests=^ ++ "cq_data"^ ++ "dgram -p sockets"^ ++ "dgram_waitset -p sockets"^ ++ "msg"^ ++ "msg_sockets"^ ++ "poll -t queue"^ ++ "poll -t counter"^ ++ "rdm"^ ++ "rdm_rma_simple"^ ++ "rdm_rma_trigger"^ ++ "rdm_tagged_peek"^ ++ "scalable_ep" ++rem "msg_epoll" ++ ++set short_tests=^ ++ "msg_pingpong -I 5"^ ++ "msg_pingpong -I 5 -v"^ ++ "rdm_cntr_pingpong -I 5"^ ++ "rdm_pingpong -I 5"^ ++ "rdm_pingpong -I 5 -v"^ ++ "rdm_tagged_pingpong -I 5"^ ++ "rdm_tagged_pingpong -I 5 -v" ++rem "msg_bw -I 5"^ ++rem "msg_bw -I 5 -v"^ ++rem "rma_bw -e msg -o write -I 5"^ ++rem "rma_bw -e msg -o read -I 5"^ ++rem "rma_bw -e msg -o writedata -I 5"^ ++rem "rma_bw -e rdm -o write -I 5"^ ++rem "rma_bw -e rdm -o read -I 5"^ ++rem "rma_bw -e rdm -o writedata -I 5"^ ++rem "msg_rma -o write -I 5"^ ++rem "msg_rma -o read -I 5"^ ++rem "msg_rma -o writedata -I 5"^ ++rem "msg_stream -I 5"^ ++rem "rdm_atomic -I 5 -o all"^ ++rem "rdm_multi_recv -I 5"^ ++rem "rdm_rma -o write -I 5"^ ++rem "rdm_rma -o read -I 5"^ ++rem "rdm_rma -o writedata -I 5"^ ++rem "rdm_tagged_bw -I 5"^ ++rem "rdm_tagged_bw -I 5 -v"^ ++rem "dgram_pingpong -I 5"^ ++ ++ ++set standard_tests=^ ++ "msg_pingpong"^ ++ "msg_pingpong -v"^ ++ "msg_pingpong -k"^ ++ "msg_pingpong -k -v"^ ++ "rdm_cntr_pingpong"^ ++ "rdm_pingpong"^ ++ "rdm_pingpong -v"^ ++ "rdm_pingpong -k"^ ++ "rdm_pingpong -k -v"^ ++ "rdm_tagged_pingpong"^ ++ "rdm_tagged_pingpong -v" ++rem "msg_bw"^ ++rem "msg_bw -v"^ ++rem "rma_bw -e msg -o write"^ ++rem "rma_bw -e msg -o read"^ ++rem "rma_bw -e msg -o writedata"^ ++rem "rma_bw -e rdm -o write"^ ++rem "rma_bw -e rdm -o read"^ ++rem "rma_bw -e rdm -o writedata"^ ++rem "msg_rma -o write"^ ++rem "msg_rma -o read"^ ++rem "msg_rma -o writedata"^ ++rem "msg_stream"^ ++rem "rdm_atomic -o all -I 1000"^ ++rem "rdm_multi_recv"^ ++rem "rdm_rma -o write"^ ++rem "rdm_rma -o read"^ ++rem "rdm_rma -o writedata"^ ++rem "rdm_tagged_bw"^ ++rem "rdm_tagged_bw -v"^ ++rem "dgram_pingpong"^ ++rem "dgram_pingpong -k"^ ++ ++ ++set test_types=unit functional short ++ ++ ++goto :main ++ ++ ++:single__clear_txt ++ del out.txt res.txt >nul 2>nul ++exit /b 0 ++:single__start_job ++ start /b run_with_output.cmd "!test_cmdline!" out.txt res.txt >nul 2>nul ++exit /b 0 ++:single__check_is_job_ended ++ if not exist res.txt exit /b 1 ++exit /b 0 ++:single__print_output ++ echo OUTPUT: & type out.txt & echo ---- ++exit /b 0 ++:single__print_and_check_err_code ++ setlocal ++ set err=0 ++ set /p err_code= &2 & exit /b 2 ) ++ set /a err_code=err_code ++ if not "!err_code!"=="0" ( set err=1 & echo error code = !err_code! ) ++exit /b !err! ++ ++ ++:client_server__clear_txt ++ del out_sv.txt res_sv.txt out_cl.txt res_cl.txt >nul 2>nul ++exit /b 0 ++:client_server__start_job ++ start /b run_with_output.cmd "!test_cmdline! -s !S_INTERFACE!" out_sv.txt res_sv.txt >nul 2>nul ++ start /b run_with_output.cmd "!test_cmdline! -s !C_INTERFACE! !S_INTERFACE!" out_cl.txt res_cl.txt >nul 2>nul ++exit /b 0 ++:client_server__check_is_job_ended ++ if not exist res_sv.txt exit /b 1 ++ if not exist res_cl.txt exit /b 1 ++exit /b 0 ++:client_server__print_output ++ echo SERVER OUTPUT: & type out_sv.txt & echo ---- ++ echo CLIENT OUTPUT: & type out_cl.txt & echo ---- ++exit /b 0 ++:client_server__print_and_check_err_code ++ setlocal ++ set err=0 ++ set /p sv_err_code= &2 & exit /b 2 ) ++ set /p cl_err_code= &2 & exit /b 2 ) ++ set /a sv_err_code=sv_err_code ++ set /a cl_err_code=cl_err_code ++ if not "!sv_err_code!"=="0" ( set err=1 & echo server error code = !sv_err_code! ) ++ if not "!cl_err_code!"=="0" ( set err=1 & echo client error code = !cl_err_code! ) ++exit /b !err! ++ ++ ++:results ++ setlocal ++ set err=%1 ++ call :!test_type!__print_output ++ if "!err!"=="2" ( ++ echo test failed due to timeout ++ ) else ( ++ if not "!err!"=="0" ( ++ echo UNKNOWN ERROR ++ exit -1 ++ ) else ( ++ call :!test_type!__print_and_check_err_code ++ set err=!errorlevel! ++ if not "!err!"=="0" echo test failed ++ ) ++ ) ++exit /b !err! ++ ++ ++ ++ ++:run ++ setlocal ++ for /f "tokens=1" %%n in ("!test_cmdline!") do set test_exename=%%n.exe ++ ++ call :!test_type!__start_job ++ set /a secs=0 ++ :run_client_server__WAIT ++ set /a secs=secs+1 ++ timeout /t 1 >nul ++ if /I !secs! geq %TEST_FAIL_TIMEOUT% ( ++ echo timeout, killing job ++ taskkill /f /im !test_exename! >nul ++ exit /b 2 ++ ) ++ call :!test_type!__check_is_job_ended || goto :run_client_server__WAIT ++ :run_client_server__WAIT_END ++exit /b 0 ++ ++ ++ ++ ++ ++:test ++ setlocal ++ set test_type=%1 ++ for /f "tokens=*" %%n in (%2) do set test_cmdline=%%n ++ echo !test_cmdline! ++ ++ call :!test_type!__clear_txt ++ call :run ++ call :results !errorlevel! ++ set err=!errorlevel! ++ call :!test_type!__clear_txt ++exit /b !err! ++ ++ ++ ++ ++:run_test__unit ++ call :test single %* ++exit /b ++ ++ ++:run_test__functional ++ call :test client_server %* ++exit /b ++ ++ ++:run_test__standard ++ call :test client_server %* ++exit /b ++ ++ ++:run_test__short ++ call :test client_server %* ++exit /b ++ ++ ++ ++ ++:main ++ set /a tests_count=0 ++ set /a failed_tests_count=0 ++ for %%a in (!test_types!) do ( ++ for %%t in (!%%a_tests!) do ( ++ set /a tests_count=tests_count+1 ++ ) ++ ) ++ ++ for %%a in (!test_types!) do ( ++ echo %%a tests: ++ set run=run_test__%%a ++ for %%t in (!%%a_tests!) do ( ++ call :!run! %%t || ( ++ set failed=!failed! %%t ++ set /a failed_tests_count=failed_tests_count+1 ++ ) ++ ) ++ echo. ++ echo ============================== ++ ) ++ ++ ++ if not "!failed!"=="" ( ++ echo !failed_tests_count! of !tests_count! tests failed: ++ for %%t in (!failed!) do ( ++ echo %%t ++ ) ++ exit /b !failed_tests_count! ++ ) ++ ++ echo all !tests_count! tests passed ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.sh b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.sh +new file mode 100755 +index 000000000..813fa5346 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/runfabtests.sh +@@ -0,0 +1,668 @@ ++#!/usr/bin/env bash ++ ++# ++# Copyright (c) 2017-2018, Intel Corporation. All rights reserved. ++# Copyright (c) 2016-2018, Cisco Systems, Inc. All rights reserved. ++# Copyright (c) 2016, Cray, Inc. All rights reserved. ++# ++# This software is available to you under a choice of one of two ++# licenses. You may choose to be licensed under the terms of the GNU ++# General Public License (GPL) Version 2, available from the file ++# COPYING in the main directory of this source tree, or the ++# BSD license below: ++# ++# Redistribution and use in source and binary forms, with or ++# without modification, are permitted provided that the following ++# conditions are met: ++# ++# - Redistributions of source code must retain the above ++# copyright notice, this list of conditions and the following ++# disclaimer. ++# ++# - Redistributions in binary form must reproduce the above ++# copyright notice, this list of conditions and the following ++# disclaimer in the documentation and/or other materials ++# provided with the distribution. ++# ++# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ++# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ++# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ++# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++# POSSIBILITY OF SUCH DAMAGE. ++# ++ ++trap cleanup_and_exit SIGINT ++ ++# ++# Default behavior with no args will use sockets provider with loopback ++# ++declare BIN_PATH ++declare PROV="sockets" ++declare TEST_TYPE="quick" ++declare SERVER="127.0.0.1" ++declare CLIENT="127.0.0.1" ++declare EXCLUDE="" ++declare GOOD_ADDR="" ++declare -i VERBOSE=0 ++declare -i SKIP_NEG=0 ++declare COMPLEX_CFG ++declare TIMEOUT_VAL="120" ++declare STRICT_MODE=0 ++declare REGEX=0 ++declare FORK=0 ++ ++declare -r c_outp=$(mktemp fabtests.c_outp.XXXXXX) ++declare -r s_outp=$(mktemp fabtests.s_outp.XXXXXX) ++ ++declare -i skip_count=0 ++declare -i pass_count=0 ++declare -i fail_count=0 ++ ++if [[ "$(uname)" == "FreeBSD" ]]; then ++ declare -ri FI_ENODATA=$(python -c 'import errno; print(errno.ENOMSG)') ++else ++ declare -ri FI_ENODATA=$(python -c 'import errno; print(errno.ENODATA)') ++fi ++declare -ri FI_ENOSYS=$(python -c 'import errno; print(errno.ENOSYS)') ++ ++neg_unit_tests=( ++ "dgram g00n13s" ++ "rdm g00n13s" ++ "msg g00n13s" ++) ++ ++functional_tests=( ++ "av_xfer -e rdm" ++ "av_xfer -e dgram" ++ "cm_data" ++ "cq_data -e msg" ++ "cq_data -e rdm" ++ "cq_data -e dgram" ++ "dgram" ++ "dgram_waitset" ++ "msg" ++ "msg_epoll" ++ "msg_sockets" ++ "poll -t queue" ++ "poll -t counter" ++ "rdm" ++ "rdm_rma_simple" ++ "rdm_rma_trigger" ++ "shared_ctx" ++ "shared_ctx --no-tx-shared-ctx" ++ "shared_ctx --no-rx-shared-ctx" ++ "shared_ctx -e msg" ++ "shared_ctx -e msg --no-tx-shared-ctx" ++ "shared_ctx -e msg --no-rx-shared-ctx" ++ "shared_ctx -e dgram" ++ "shared_ctx -e dgram --no-tx-shared-ctx" ++ "shared_ctx -e dgram --no-rx-shared-ctx" ++ "rdm_tagged_peek" ++ "scalable_ep" ++ "rdm_shared_av" ++ "multi_mr -e msg -V" ++ "multi_mr -e rdm -V" ++ "recv_cancel -e rdm -V" ++ "unexpected_msg -e msg -i 10" ++ "unexpected_msg -e rdm -i 10" ++ "unexpected_msg -e msg -S -i 10" ++ "unexpected_msg -e rdm -S -i 10" ++ "inj_complete -e msg" ++ "inj_complete -e rdm" ++ "inj_complete -e dgram" ++ "inj_complete -e msg -SR" ++ "inj_complete -e rdm -SR" ++ "inj_complete -e dgram -SR" ++) ++ ++short_tests=( ++ "msg_pingpong -I 5" ++ "msg_pingpong -I 5 -v" ++ "msg_bw -I 5" ++ "msg_bw -I 5 -v" ++ "rma_bw -e msg -o write -I 5" ++ "rma_bw -e msg -o read -I 5" ++ "rma_bw -e msg -o writedata -I 5" ++ "rma_bw -e rdm -o write -I 5" ++ "rma_bw -e rdm -o read -I 5" ++ "rma_bw -e rdm -o writedata -I 5" ++ "rdm_atomic -I 5 -o all" ++ "rdm_cntr_pingpong -I 5" ++ "rdm_multi_recv -I 5" ++ "rdm_pingpong -I 5" ++ "rdm_pingpong -I 5 -v" ++ "rdm_tagged_pingpong -I 5" ++ "rdm_tagged_pingpong -I 5 -v" ++ "rdm_tagged_bw -I 5" ++ "rdm_tagged_bw -I 5 -v" ++ "dgram_pingpong -I 5" ++) ++ ++standard_tests=( ++ "msg_pingpong" ++ "msg_pingpong -v" ++ "msg_pingpong -k" ++ "msg_pingpong -k -v" ++ "msg_bw" ++ "msg_bw -v" ++ "rma_bw -e msg -o write" ++ "rma_bw -e msg -o read" ++ "rma_bw -e msg -o writedata" ++ "rma_bw -e rdm -o write" ++ "rma_bw -e rdm -o read" ++ "rma_bw -e rdm -o writedata" ++ "rdm_atomic -o all -I 1000" ++ "rdm_cntr_pingpong" ++ "rdm_multi_recv" ++ "rdm_pingpong" ++ "rdm_pingpong -v" ++ "rdm_pingpong -k" ++ "rdm_pingpong -k -v" ++ "rdm_tagged_pingpong" ++ "rdm_tagged_pingpong -v" ++ "rdm_tagged_bw" ++ "rdm_tagged_bw -v" ++ "dgram_pingpong" ++ "dgram_pingpong -k" ++) ++ ++unit_tests=( ++ "getinfo_test -s SERVER_ADDR GOOD_ADDR" ++ "av_test -g GOOD_ADDR -n 1 -s SERVER_ADDR" ++ "dom_test -n 2" ++ "eq_test" ++ "cq_test" ++ "mr_test" ++ "cntr_test" ++) ++ ++complex_tests=( ++ "ubertest" ++) ++ ++function errcho { ++ >&2 echo $* ++} ++ ++function print_border { ++ printf "# " ++ printf "%.0s-" {1..78} ++ printf "\n" ++} ++ ++function print_results { ++ local test_name=$1 ++ local test_result=$2 ++ local test_time=$3 ++ local server_out_file=$4 ++ local server_cmd=$5 ++ local client_out_file=$6 ++ local client_cmd=$7 ++ ++ if [ $VERBOSE -eq 0 ] ; then ++ # print a simple, single-line format that is still valid YAML ++ printf "%-70s%10s\n" "$test_exe:" "$test_result" ++ else ++ # Print a more detailed YAML format that is not a superset of ++ # the non-verbose output. See ofiwg/fabtests#259 for a ++ # rationale. ++ emit_stdout=0 ++ case $test_result in ++ Pass*) ++ [ $VERBOSE -ge 3 ] && emit_stdout=1 ++ ;; ++ Notrun|Excluded) ++ [ $VERBOSE -ge 2 ] && emit_stdout=1 ++ ;; ++ Fail*) ++ [ $VERBOSE -ge 1 ] && emit_stdout=1 ++ ;; ++ esac ++ ++ printf -- "- name: %s\n" "$test_exe" ++ printf -- " result: %s\n" "$test_result" ++ printf -- " time: %s\n" "$test_time" ++ if [ $emit_stdout -eq 1 -a "$server_out_file" != "" ] ; then ++ if [ "$server_cmd" != "" ] ; then ++ printf -- " server_cmd: %s\n" "$server_cmd" ++ fi ++ printf -- " server_stdout: |\n" ++ sed -e 's/^/ /' < $server_out_file ++ fi ++ if [ $emit_stdout -eq 1 -a "$client_out_file" != "" ] ; then ++ if [ "$client_cmd" != "" ] ; then ++ printf -- " client_cmd: %s\n" "$client_cmd" ++ fi ++ printf -- " client_stdout: |\n" ++ sed -e 's/^/ /' < $client_out_file ++ fi ++ fi ++} ++ ++function cleanup { ++ ${CLIENT_CMD} "ps -eo comm,pid | grep '^fi_' | awk '{print \$2}' | xargs kill -9" >& /dev/null ++ ${SERVER_CMD} "ps -eo comm,pid | grep '^fi_' | awk '{print \$2}' | xargs kill -9" >& /dev/null ++ rm -f $c_outp $s_outp ++} ++ ++function cleanup_and_exit { ++ cleanup ++ exit 1 ++} ++ ++# compute the duration in seconds between two integer values ++# measured since the start of the UNIX epoch and print the result to stdout ++function compute_duration { ++ local -i s=$1 ++ local -i e=$2 ++ echo $(( $2 - $1)) ++} ++ ++function read_exclude_file { ++ exclude_file=$1 ++ ++ if [ ! -f $exclude_file ]; then ++ echo "Given exclusion file does not exist!" ++ exit 1 ++ fi ++ ++ while read -r pattern || [[ -n "$pattern" ]]; do ++ # Ignore patterns that are comments or just whitespaces ++ ignore_pattern="#.*|^[\t ]*$" ++ if [[ ! "$pattern" =~ $ignore_pattern ]]; then ++ if [ -z "$EXCLUDE" ]; then ++ EXCLUDE="$pattern" ++ else ++ EXCLUDE="${EXCLUDE},$pattern" ++ fi ++ fi ++ done < "$exclude_file" ++} ++ ++function is_excluded { ++ test_name=$1 ++ ++ [[ -z "$EXCLUDE" ]] && return 1 ++ ++ IFS="," read -ra exclude_array <<< "$EXCLUDE" ++ for pattern in "${exclude_array[@]}"; do ++ if [[ $REGEX -eq 1 && "$test_name" =~ $pattern ]] || ++ [[ "$test_name" == "$pattern" ]]; then ++ print_results "$test_exe" "Excluded" "0" "" "" ++ skip_count+=1 ++ return 0 ++ fi ++ done ++ return 1 ++} ++ ++function unit_test { ++ local test=$1 ++ local is_neg=$2 ++ local ret1=0 ++ local test_exe=$(echo "fi_${test} -p \"$PROV\"" | \ ++ sed -e "s/GOOD_ADDR/$GOOD_ADDR/g" -e "s/SERVER_ADDR/${S_INTERFACE}/g") ++ local start_time ++ local end_time ++ local test_time ++ ++ is_excluded "$test" && return ++ ++ start_time=$(date '+%s') ++ ++ cmd="${BIN_PATH}${test_exe}" ++ ${SERVER_CMD} "${EXPORT_ENV} $cmd" &> $s_outp & ++ p1=$! ++ ++ wait $p1 ++ ret=$? ++ ++ end_time=$(date '+%s') ++ test_time=$(compute_duration "$start_time" "$end_time") ++ ++ if [ $is_neg -eq 1 -a $ret -eq $FI_ENODATA ]; then ++ # negative test passed ++ ret=0 ++ elif [ $is_neg -eq 1 ]; then ++ # negative test failed ++ ret=1 ++ fi ++ if [[ $STRICT_MODE -eq 0 && $ret -eq $FI_ENODATA || $ret -eq $FI_ENOSYS ]]; then ++ print_results "$test_exe" "Notrun" "$test_time" "$s_outp" "$cmd" ++ skip_count+=1 ++ elif [ $ret -ne 0 ]; then ++ print_results "$test_exe" "Fail" "$test_time" "$s_outp" "$cmd" ++ if [ $ret -eq 124 ]; then ++ cleanup ++ fi ++ fail_count+=1 ++ else ++ print_results "$test_exe" "Pass" "$test_time" "$s_outp" "$cmd" ++ pass_count+=1 ++ fi ++} ++ ++function cs_test { ++ local test=$1 ++ local s_ret=0 ++ local c_ret=0 ++ local test_exe="fi_${test} -p \"${PROV}\"" ++ local start_time ++ local end_time ++ local test_time ++ ++ is_excluded "$test" && return ++ ++ start_time=$(date '+%s') ++ ++ s_cmd="${BIN_PATH}${test_exe} -s $S_INTERFACE" ++ ${SERVER_CMD} "${EXPORT_ENV} $s_cmd" &> $s_outp & ++ s_pid=$! ++ sleep 1 ++ ++ c_cmd="${BIN_PATH}${test_exe} -s $C_INTERFACE $S_INTERFACE" ++ ${CLIENT_CMD} "${EXPORT_ENV} $c_cmd" &> $c_outp & ++ c_pid=$! ++ ++ wait $c_pid ++ c_ret=$? ++ ++ [[ c_ret -ne 0 ]] && kill -9 $s_pid 2> /dev/null ++ ++ wait $s_pid ++ s_ret=$? ++ ++ end_time=$(date '+%s') ++ test_time=$(compute_duration "$start_time" "$end_time") ++ ++ if [[ $STRICT_MODE -eq 0 && $s_ret -eq $FI_ENODATA && $c_ret -eq $FI_ENODATA ]] || ++ [[ $STRICT_MODE -eq 0 && $s_ret -eq $FI_ENOSYS && $c_ret -eq $FI_ENOSYS ]]; then ++ print_results "$test_exe" "Notrun" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ skip_count+=1 ++ elif [ $s_ret -ne 0 -o $c_ret -ne 0 ]; then ++ print_results "$test_exe" "Fail" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ if [ $s_ret -eq 124 -o $c_ret -eq 124 ]; then ++ cleanup ++ fi ++ fail_count+=1 ++ else ++ print_results "$test_exe" "Pass" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ pass_count+=1 ++ fi ++} ++ ++function complex_test { ++ local test=$1 ++ local config=$2 ++ local test_exe="fi_${test}" ++ local s_ret=0 ++ local c_ret=0 ++ local start_time ++ local end_time ++ local test_time ++ ++ is_excluded "$test" && return ++ ++ start_time=$(date '+%s') ++ ++ if [[ $FORK -eq 1 ]]; then ++ opts="-f" ++ else ++ opts="" ++ fi ++ ++ s_cmd="${BIN_PATH}${test_exe} -x $opts" ++ FI_LOG_LEVEL=error ${SERVER_CMD} "${EXPORT_ENV} $s_cmd" &> $s_outp & ++ s_pid=$! ++ sleep 1 ++ ++ c_cmd="${BIN_PATH}${test_exe} -p \"${PROV}\" -t $config $S_INTERFACE $opts" ++ FI_LOG_LEVEL=error ${CLIENT_CMD} "${EXPORT_ENV} $c_cmd" &> $c_outp & ++ c_pid=$! ++ ++ wait $c_pid ++ c_ret=$? ++ ++ [[ c_ret -ne 0 ]] && kill -9 $s_pid ++ ++ wait $s_pid ++ s_ret=$? ++ ++ end_time=$(date '+%s') ++ test_time=$(compute_duration "$start_time" "$end_time") ++ ++ # case: config file doesn't exist or invalid option provided ++ if [ $s_ret -eq 1 -o $c_ret -eq 1 ]; then ++ print_results "$test_exe" "Notrun" "0" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ cleanup ++ skip_count+=1 ++ return ++ # case: test didn't run becasue some error occured ++ elif [ $s_ret -ne 0 -o $c_ret -ne 0 ]; then ++ printf "%-50s%s\n" "$test_exe:" "Server returns $s_ret, client returns $c_ret" ++ print_results "$test_exe" "Fail [$f_cnt/$total]" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ cleanup ++ fail_count+=1 ++ else ++ local f_cnt=$(cat $c_outp | awk -F': ' '/ENOSYS|ERROR/ {total += $2} END {print total}') ++ local s_cnt=$(cat $c_outp | awk -F': ' '/Success/ {total += $2} END {print total}') ++ local total=$(cat $c_outp | awk -F': ' '/Success|ENODATA|ENOSYS|ERROR/ {total += $2} END {print total}') ++ if [ $f_cnt -eq 0 ]; then ++ print_results "$test_exe" "Pass [$s_cnt/$total]" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ pass_count+=1 ++ else ++ print_results "$test_exe" "Fail [$f_cnt/$total]" "$test_time" "$s_outp" "$s_cmd" "$c_outp" "$c_cmd" ++ cleanup ++ fail_count+=1 ++ fi ++ fi ++} ++ ++function main { ++ local complex_cfg="quick" ++ ++ if [[ $1 == "quick" ]]; then ++ local -r tests="unit functional short" ++ elif [[ $1 == "verify" ]]; then ++ local -r tests="complex" ++ complex_cfg=$1 ++ else ++ local -r tests=$(echo $1 | sed 's/all/unit,functional,standard,complex/g' | tr ',' ' ') ++ if [[ $1 == "all" ]]; then ++ complex_cfg=$1 ++ fi ++ fi ++ ++ if [[ -n "$COMPLEX_CFG" ]]; then ++ complex_cfg="$COMPLEX_CFG" ++ fi ++ ++ if [ $VERBOSE -eq 0 ] ; then ++ printf "# %-68s%10s\n" "Test" "Result" ++ print_border ++ fi ++ ++ for ts in ${tests}; do ++ case ${ts} in ++ unit) ++ for test in "${unit_tests[@]}"; do ++ unit_test "$test" "0" ++ done ++ ++ if [ $SKIP_NEG -eq 0 ] ; then ++ for test in "${neg_unit_tests[@]}"; do ++ unit_test "$test" "1" ++ done ++ fi ++ ;; ++ functional) ++ for test in "${functional_tests[@]}"; do ++ cs_test "$test" ++ done ++ ;; ++ short) ++ for test in "${short_tests[@]}"; do ++ cs_test "$test" ++ done ++ ;; ++ standard) ++ for test in "${standard_tests[@]}"; do ++ cs_test "$test" ++ done ++ ;; ++ complex) ++ for test in "${complex_tests[@]}"; do ++ complex_test $test $complex_cfg ++ ++ done ++ ;; ++ *) ++ errcho "Unknown test set: ${ts}" ++ exit 1 ++ ;; ++ esac ++ done ++ ++ total=$(( $pass_count + $fail_count )) ++ ++ print_border ++ ++ printf "# %-50s%10d\n" "Total Pass" $pass_count ++ printf "# %-50s%10d\n" "Total Notrun/Excluded" $skip_count ++ printf "# %-50s%10d\n" "Total Fail" $fail_count ++ ++ if [[ "$total" > "0" ]]; then ++ printf "# %-50s%10d\n" "Percentage of Pass" $(( $pass_count * 100 / $total )) ++ fi ++ ++ print_border ++ ++ cleanup ++ exit $fail_count ++} ++ ++function usage { ++ errcho "Usage:" ++ errcho " $0 [OPTIONS] [provider] [host] [client]" ++ errcho ++ errcho "Run fabtests using provider between host and client (default" ++ errcho "'sockets' provider in loopback-mode). Report pass/fail/notrun status." ++ errcho ++ errcho "Options:" ++ errcho -e " -g\tgood IP address from 's perspective (default $GOOD_ADDR)" ++ errcho -e " -v\tprint output of failing" ++ errcho -e " -vv\tprint output of failing/notrun" ++ errcho -e " -vvv\tprint output of failing/notrun/passing" ++ errcho -e " -t\ttest set(s): all,quick,unit,functional,standard,short,complex (default quick)" ++ errcho -e " -e\texclude tests: comma delimited list of test names / ++ regex patterns (with -R) e.g. \"dgram,rma.*write\"" ++ errcho -e " -E\texport provided variable name and value to ssh client and server processes. ++ options must of of the form '-E var=value'" ++ errcho -e " -f\texclude tests file: File containing list of test names / ++ regex patterns (with -R) to exclude (one per line)" ++ errcho -e " -R\tTreat test exclusions as regex patterns" ++ errcho -e " \tNote: the test names / patterns for -e and -f options ++ would be matched with the list of test names defined ++ in this script. They don't have fi_ prefix" ++ errcho -e " -N\tskip negative unit tests" ++ errcho -e " -p\tpath to test bins (default PATH)" ++ errcho -e " -c\tclient interface" ++ errcho -e " -s\tserver/host interface" ++ errcho -e " -u\tconfigure option for complex tests" ++ errcho -e " -T\ttimeout value in seconds" ++ errcho -e " -S\tStrict mode: -FI_ENODATA, -FI_ENOSYS errors would be treated as failures instead of skipped/notrun" ++ exit 1 ++} ++ ++while getopts ":vt:p:g:e:f:c:s:u:T:NRSkE:" opt; do ++case ${opt} in ++ t) TEST_TYPE=$OPTARG ++ ;; ++ v) VERBOSE+=1 ++ ;; ++ p) BIN_PATH="${OPTARG}/" ++ ;; ++ g) GOOD_ADDR=${OPTARG} ++ ;; ++ f) read_exclude_file ${OPTARG} ++ ;; ++ e) [[ -z "$EXCLUDE" ]] && EXCLUDE=${OPTARG} || EXCLUDE="${EXCLUDE},${OPTARG}" ++ ;; ++ c) C_INTERFACE=${OPTARG} ++ ;; ++ s) S_INTERFACE=${OPTARG} ++ ;; ++ u) COMPLEX_CFG=${OPTARG} ++ ;; ++ T) TIMEOUT_VAL=${OPTARG} ++ ;; ++ N) SKIP_NEG+=1 ++ ;; ++ R) REGEX=1 ++ ;; ++ S) STRICT_MODE=1 ++ ;; ++ k) FORK=1 ++ ;; ++ E) ++ delimiter="=" ++ value=${OPTARG#*$delimiter} ++ var=${OPTARG:0:$(( ${#OPTARG} - ${#value} - ${#delimiter} ))} ++ EXPORT_STRING="export $var=\"$value\"" ++ if [[ -z $EXPORT_ENV ]] ; then ++ EXPORT_ENV="$EXPORT_STRING ;" ++ else ++ EXPORT_ENV="$EXPORT_ENV $EXPORT_STRING ;" ++ fi ++ ;; ++ :|\?) usage ++ ;; ++esac ++ ++done ++ ++# base ssh command ++declare bssh="ssh -n -o StrictHostKeyChecking=no -o ConnectTimeout=2 -o BatchMode=yes" ++if [ -z "$(which timeout 2> /dev/null)" ]; then ++ # forego timeout ++ declare SERVER_CMD="eval" ++ declare CLIENT_CMD="eval" ++else ++ declare SERVER_CMD="eval timeout ${TIMEOUT_VAL}" ++ declare CLIENT_CMD="eval timeout ${TIMEOUT_VAL}" ++ bssh="timeout ${TIMEOUT_VAL} ${bssh}" ++fi ++ ++# shift past options ++shift $((OPTIND-1)) ++ ++if [[ $# -ge 4 ]]; then ++ usage ++fi ++ ++if [[ $# -ge 1 ]]; then ++ PROV=$1 ++fi ++ ++if [[ $# -ge 2 ]]; then ++ SERVER=$2 ++ SERVER_CMD="${bssh} ${SERVER}" ++fi ++ ++if [[ $# -ge 3 ]]; then ++ CLIENT=$3 ++ CLIENT_CMD="${bssh} ${CLIENT}" ++fi ++ ++[ -z $C_INTERFACE ] && C_INTERFACE=$CLIENT ++[ -z $S_INTERFACE ] && S_INTERFACE=$SERVER ++[ -z $GOOD_ADDR ] && GOOD_ADDR=$S_INTERFACE ++ ++main ${TEST_TYPE} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/toCSV.py b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/toCSV.py +new file mode 100755 +index 000000000..c3b095e35 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/scripts/toCSV.py +@@ -0,0 +1,37 @@ ++#!/usr/bin/env python ++ ++import sys ++import csv ++from optparse import OptionParser ++ ++try: ++ import yaml ++except ImportError: ++ print ("PyYAML library missing, try: yum install pyyaml") ++ sys.exit(1) ++ ++def main(argv=None): ++ """Convert runfabtests.sh yaml output to CSV. If no argument is given ++ stdin is read, otherwise read from file. ++ """ ++ ++ parser = OptionParser(description=main.__doc__, usage="usage: %prog [file]") ++ (options, args) = parser.parse_args() ++ ++ if len(args) == 0: ++ fd = sys.stdin ++ else: ++ fd = open(args[0], 'r') ++ ++ yi = yaml.load(fd.read()) ++ ++ csv_fd = csv.writer(sys.stdout, delimiter=",", quotechar='"', quoting=csv.QUOTE_NONNUMERIC) ++ csv_fd.writerow(["Test name", "Status"]) ++ ++ for k,v in yi.iteritems(): ++ csv_fd.writerow([k, v]) ++ ++ return 0 ++ ++if __name__ == "__main__": ++ sys.exit(main(sys.argv)) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/eq_cq.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/eq_cq.test +new file mode 100644 +index 000000000..6113eb932 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/eq_cq.test +@@ -0,0 +1,132 @@ ++#: "Tests different wait objects for EQ and CQ across sockets and verbs providers" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/lat_bw.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/lat_bw.test +new file mode 100644 +index 000000000..cc184a2dc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/lat_bw.test +@@ -0,0 +1,79 @@ ++#: "Latency and bandwidth tests for all providers" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ FI_EP_MSG, ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/ofi_rxd.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/ofi_rxd.exclude +new file mode 100644 +index 000000000..a1fa91b18 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/ofi_rxd.exclude +@@ -0,0 +1,25 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++^msg|-e msg ++^dgram|-e dgram ++ ++# Exclude all prefix tests ++-k ++ ++# Exclude tests that use sread/polling until issues are resolved ++-S ++rdm_cntr_pingpong ++poll ++cq_data ++ ++# Exclude tests with unsupported capabilities ++rdm_tagged_peek ++cm_data ++trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++ ++# Exclude because it takes too long ++ubertest +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/udp.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/udp.test +new file mode 100644 +index 000000000..51c11120b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxd/udp.test +@@ -0,0 +1,26 @@ ++{ ++ prov_name: UDP;ofi_rxd, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/ofi_rxm.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/ofi_rxm.exclude +new file mode 100644 +index 000000000..15a9a62af +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/ofi_rxm.exclude +@@ -0,0 +1,19 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude all prefix tests ++-k ++ ++^msg|-e msg ++^dgram|-e dgram ++ ++cm_data ++rdm_rma_simple ++trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++atomic ++ ++# Remove this once ubertest supports setting MR modes ++ubertest +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/all.test +new file mode 100644 +index 000000000..24a06be8e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/all.test +@@ -0,0 +1,110 @@ ++#: "Suite of tests for the verbs provider" ++#: " ++# TODO ++# - Debug WRITEDATA, WRITEMSG, READMSG for RxM before enabling ++# - Test without FI_MR_LOCAL for RxM ++# - disable quick test for some configs (takes long time on some fabric) ++# - Adding more tests results in timeout in runfabtests.sh - fix the script" ++{ ++ prov_name: verbs;ofi_rxm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ progress: [FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO], ++}, ++{ ++ prov_name: verbs;ofi_rxm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ progress: [FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO], ++}, ++{ ++ prov_name: verbs;ofi_rxm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ progress: [FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO], ++ msg_flags: FI_REMOTE_CQ_DATA, ++}, ++{ ++ prov_name: verbs;ofi_rxm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ progress: [FI_PROGRESS_MANUAL, FI_PROGRESS_AUTO], ++ test_flags: FT_FLAG_QUICKTEST, ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/exclude +new file mode 100644 +index 000000000..f30e59359 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/ofi_rxm/verbs/exclude +@@ -0,0 +1,16 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude all prefix tests ++-k ++ ++^msg|-e msg ++^dgram|-e dgram ++ ++cm_data ++rdm_rma_simple ++trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++atomic +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/osx.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/osx.exclude +new file mode 100644 +index 000000000..3178270c6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/osx.exclude +@@ -0,0 +1,5 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude msg_epoll test as OSX doesn't have epoll system call ++msg_epoll ++msg_sockets +\ No newline at end of file +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm/all.test +new file mode 100644 +index 000000000..a65a1607d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm/all.test +@@ -0,0 +1,62 @@ ++{ ++ prov_name: psm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/all.test +new file mode 100644 +index 000000000..e573e602f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/all.test +@@ -0,0 +1,93 @@ ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/psm2.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/psm2.exclude +new file mode 100644 +index 000000000..1cee189c1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/psm2.exclude +@@ -0,0 +1,15 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude all prefix tests ++-k ++ ++# av_test supports only FI_SOCKADDR ++av_test ++ ++^msg|-e msg ++ ++cm_data ++shared_ctx ++scalable_ep ++shared_av ++rdm_cntr_pingpong +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/verify.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/verify.test +new file mode 100644 +index 000000000..0e2328c14 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/psm2/verify.test +@@ -0,0 +1,246 @@ ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM ++ ], ++ av_type: [ ++ FI_AV_TABLE ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: psm2, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/all.test +new file mode 100644 +index 000000000..339e9e293 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/all.test +@@ -0,0 +1,407 @@ ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/verify.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/verify.test +new file mode 100644 +index 000000000..156c4415c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/shm/verify.test +@@ -0,0 +1,401 @@ ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ mr_mode: [ ++ FI_MR_VIRT_ADDR, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: shm, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/all.test +new file mode 100644 +index 000000000..31080aa8b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/all.test +@@ -0,0 +1,102 @@ ++#: "Suite of tests for the sockets provider" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/complete.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/complete.test +new file mode 100644 +index 000000000..f4e7a6a9c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/complete.test +@@ -0,0 +1,495 @@ ++#: "Suite of tests for the sockets provider" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_CNTR, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cntr_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ FT_MODE_NONE, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ rx_cq_bind_flags: [ ++ FI_SELECTIVE_COMPLETION, ++ ], ++ rx_op_flags: [ ++ FI_COMPLETION, ++ ], ++ msg_flags: [ ++ FI_COMPLETION, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ rx_cq_bind_flags: [ ++ FI_SELECTIVE_COMPLETION, ++ ], ++ msg_flags: [ ++ FI_COMPLETION, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ rx_cq_bind_flags: [ ++ FI_SELECTIVE_COMPLETION, ++ ], ++ rx_op_flags: [ ++ FI_COMPLETION, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ tx_cq_bind_flags: [ ++ FI_SELECTIVE_COMPLETION, ++ ], ++ msg_flags: [ ++ FI_COMPLETION, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/quick.test +new file mode 100644 +index 000000000..b91373239 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/quick.test +@@ -0,0 +1,251 @@ ++#: "Suite of tests for the sockets provider" ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ FI_WAIT_MUTEX_COND, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_SUM, ++ FI_PROD, ++ ], ++ datatype:[ ++ FI_INT8, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/verify.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/verify.test +new file mode 100644 +index 000000000..79ad5084a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/sockets/verify.test +@@ -0,0 +1,279 @@ ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ ], ++ op:[ ++ FI_MIN, ++ FI_MAX, ++ FI_SUM, ++ FI_PROD, ++ FI_LOR, ++ FI_LAND, ++ FI_BOR, ++ FI_BAND, ++ FI_LXOR, ++ FI_BXOR, ++ FI_ATOMIC_WRITE, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ ], ++ op:[ ++ FI_ATOMIC_READ, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ ], ++ op:[ ++ FI_CSWAP, ++ FI_CSWAP_NE, ++ FI_CSWAP_LE, ++ FI_CSWAP_LT, ++ FI_CSWAP_GE, ++ FI_CSWAP_GT, ++ FI_MSWAP, ++ ], ++ datatype:[ ++ FI_INT8, ++ FI_UINT8, ++ FI_INT16, ++ FI_UINT16, ++ FI_INT32, ++ FI_UINT32, ++ FI_INT64, ++ FI_UINT64, ++ FI_FLOAT, ++ FI_DOUBLE, ++ FI_LONG_DOUBLE, ++ FI_FLOAT_COMPLEX, ++ FI_DOUBLE_COMPLEX, ++ FI_LONG_DOUBLE_COMPLEX, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_ATOMIC, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++ ], ++ msg_flags: FI_REMOTE_CQ_DATA, ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: sockets, ++ test_type: [ ++ FT_TEST_UNIT, ++ ], ++ class_function: [ ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ ], ++ ep_type: [ ++ FI_EP_RDM, ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ msg_flags: FI_REMOTE_CQ_DATA, ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/tcp/tcp.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/tcp/tcp.exclude +new file mode 100644 +index 000000000..d909078af +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/tcp/tcp.exclude +@@ -0,0 +1,19 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++^dgram| -e dgram ++ ++rdm_rma_simple ++rdm_rma_trigger ++shared_ctx ++scalable_ep ++shared_av ++multi_mr ++atomic ++inj_complete -e msg ++unexpected_msg -e msg ++ ++# TODO. Following fails with macOS. will fix them later ++cq_data -e rdm ++rdm_tagged_peek ++unexpected_msg -e rdm ++rdm_cntr_pingpong +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/all.test +new file mode 100644 +index 000000000..bb1c20b27 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/all.test +@@ -0,0 +1,40 @@ ++#: "Suite of tests for the udp provider" ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/functional.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/functional.test +new file mode 100644 +index 000000000..37d7af142 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/functional.test +@@ -0,0 +1,32 @@ ++#: "Simple test for the udp provider" ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/lat_bw.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/lat_bw.test +new file mode 100644 +index 000000000..fca389de0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/lat_bw.test +@@ -0,0 +1,27 @@ ++#: "Latency and bandwidth tests for the udp provider" ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/quick.test +new file mode 100644 +index 000000000..3a6ae2121 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/quick.test +@@ -0,0 +1,41 @@ ++#: "Suite of tests for the udp provider" ++{ ++ prov_name: udp, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ ], ++ av_type: [ ++ FI_AV_TABLE, ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/udp.exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/udp.exclude +new file mode 100644 +index 000000000..3d545a9ef +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/udp/udp.exclude +@@ -0,0 +1,16 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++^msg ++-e msg ++rdm ++poll ++av_test.* ++eq_test ++mr_test ++cm_data ++cq_data ++cntr_test ++scalable_ep ++shared_ctx ++unexpected_msg ++inj_complete +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/all.test +new file mode 100644 +index 000000000..958cc7e52 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/all.test +@@ -0,0 +1,40 @@ ++#: "Suite of tests for the usnic provider" ++{ ++ prov_name: usnic, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ FI_EP_MSG ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/quick.test +new file mode 100644 +index 000000000..9ca00afd8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/usnic/quick.test +@@ -0,0 +1,41 @@ ++#: "Suite of tests for the usnic provider" ++{ ++ prov_name: usnic, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ ], ++ ep_type: [ ++ FI_EP_DGRAM, ++ FI_EP_RDM, ++ FI_EP_MSG, ++ ], ++ av_type: [ ++ FI_AV_MAP, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ ], ++ mode: [ ++ FT_MODE_ALL, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/all.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/all.test +new file mode 100644 +index 000000000..d5ec27b76 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/all.test +@@ -0,0 +1,151 @@ ++#: "Suite of tests for the verbs provider" ++#: " ++# TODO ++# - Disable INJECT, INJECTDATA for verbs until the failure is debugged ++# In pingpong test, we get a FLUSH error on recv CQ but no error on send ++# queue when we don't read send completions for ibv_post_sends." ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SENDMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ msg_flags: FI_REMOTE_CQ_DATA, ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_WRITEMSG, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ test_class: [ ++ FT_CAP_RMA, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++ msg_flags: FI_REMOTE_CQ_DATA, ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE, ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE, ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ mr_mode: [FI_MR_LOCAL, FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY], ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/exclude b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/exclude +new file mode 100644 +index 000000000..04bf7d786 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/exclude +@@ -0,0 +1,18 @@ ++# Regex patterns of tests to exclude in runfabtests.sh ++ ++# Exclude all prefix tests ++-k ++ ++rdm ++dgram ++ ++trigger ++ ++# Verbs supports only shared receive context ++shared_ctx$|shared_ctx --no|shared_ctx -e msg$|shared_ctx -e msg --no-rx ++ ++scalable_ep ++multi_mr ++recv_cancel ++unexpected_msg ++inj_complete +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/quick.test b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/quick.test +new file mode 100644 +index 000000000..a8f0a230d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/test_configs/verbs/quick.test +@@ -0,0 +1,89 @@ ++#: "Suite of tests for the verbs provider" ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE ++ ], ++ mode: [ ++ FT_MODE_ALL ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE ++ ], ++ mode: [ ++ FT_MODE_ALL ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, ++{ ++ prov_name: verbs, ++ test_type: [ ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ ], ++ class_function: [ ++ FT_FUNC_SEND, ++ ], ++ ep_type: [ ++ FI_EP_MSG, ++ ], ++ comp_type: [ ++ FT_COMP_QUEUE ++ ], ++ eq_wait_obj: [ ++ FI_WAIT_NONE ++ ], ++ cq_wait_obj: [ ++ FI_WAIT_NONE ++ FI_WAIT_UNSPEC, ++ FI_WAIT_FD, ++ ], ++ mode: [ ++ FT_MODE_ALL ++ ], ++ test_class: [ ++ FT_CAP_MSG, ++ ], ++ test_flags: FT_FLAG_QUICKTEST ++}, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/config.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/config.c +new file mode 100644 +index 000000000..96adee308 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/config.c +@@ -0,0 +1,899 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++#include "jsmn.h" ++ ++ ++#define FT_CAP_MSG FI_MSG | FI_SEND | FI_RECV ++#define FT_CAP_TAGGED FI_TAGGED | FI_SEND | FI_RECV ++#define FT_CAP_RMA FI_RMA | FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE ++#define FT_CAP_ATOMIC FI_ATOMICS | FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE ++ ++#define FT_MODE_ALL FI_CONTEXT | FI_LOCAL_MR /*| FI_MSG_PREFIX*/ ++#define FT_MODE_NONE ~0ULL ++ ++struct key_t { ++ char *str; ++ size_t offset; ++ enum { VAL_STRING, VAL_NUM } val_type; ++ int val_size; ++}; ++ ++static struct ft_set test_sets_default[] = { ++ { ++ .prov_name = "sockets", ++ .test_type = { ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH ++ }, ++ .class_function = { ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG ++ }, ++ .ep_type = { ++ FI_EP_MSG, ++ FI_EP_DGRAM, ++ FI_EP_RDM ++ }, ++ .av_type = { ++ FI_AV_TABLE, ++ FI_AV_MAP ++ }, ++ .comp_type = { ++ FT_COMP_QUEUE ++ }, ++ .mode = { ++ FT_MODE_ALL ++ }, ++ .test_class = { ++ FT_CAP_MSG, ++ FT_CAP_TAGGED, ++// FT_CAP_RMA, ++// FT_CAP_ATOMIC ++ }, ++ .test_flags = FT_FLAG_QUICKTEST ++ }, ++ { ++ .prov_name = "verbs", ++ .test_type = { ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH ++ }, ++ .class_function = { ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG ++ }, ++ .ep_type = { ++ FI_EP_MSG, ++ }, ++ .comp_type = { ++ FT_COMP_QUEUE ++ }, ++ .mode = { ++ FT_MODE_ALL ++ }, ++ .test_class = { ++ FT_CAP_MSG, ++ }, ++ .test_flags = FT_FLAG_QUICKTEST ++ }, ++}; ++ ++static struct ft_series test_series; ++ ++size_t sm_size_array[] = { ++ 1 << 0, ++ 1 << 1, ++ 1 << 2, (1 << 2) + (1 << 1), ++ 1 << 3, (1 << 3) + (1 << 2), ++ 1 << 4, (1 << 4) + (1 << 3), ++ 1 << 5, (1 << 5) + (1 << 4), ++ 1 << 6, (1 << 6) + (1 << 5), ++ 1 << 7, (1 << 7) + (1 << 6), ++ 1 << 8 ++}; ++const unsigned int sm_size_cnt = (sizeof sm_size_array / sizeof sm_size_array[0]); ++ ++size_t med_size_array[] = { ++ 1 << 4, ++ 1 << 5, ++ 1 << 6, ++ 1 << 7, (1 << 7) + (1 << 6), ++ 1 << 8, (1 << 8) + (1 << 7), ++ 1 << 9, (1 << 9) + (1 << 8), ++ 1 << 10, (1 << 10) + (1 << 9), ++ 1 << 11, (1 << 11) + (1 << 10), ++ 1 << 12, (1 << 12) + (1 << 11), ++ 1 << 13, (1 << 13) + (1 << 12), ++ 1 << 14 ++}; ++const unsigned int med_size_cnt = (sizeof med_size_array / sizeof med_size_array[0]); ++ ++size_t lg_size_array[] = { ++ 1 << 4, ++ 1 << 5, ++ 1 << 6, ++ 1 << 7, (1 << 7) + (1 << 6), ++ 1 << 8, (1 << 8) + (1 << 7), ++ 1 << 9, (1 << 9) + (1 << 8), ++ 1 << 10, (1 << 10) + (1 << 9), ++ 1 << 11, (1 << 11) + (1 << 10), ++ 1 << 12, (1 << 12) + (1 << 11), ++ 1 << 13, (1 << 13) + (1 << 12), ++ 1 << 14, (1 << 14) + (1 << 13), ++ 1 << 15, (1 << 15) + (1 << 14), ++ 1 << 16, (1 << 16) + (1 << 15), ++ 1 << 17, (1 << 17) + (1 << 16), ++ 1 << 18, (1 << 18) + (1 << 17), ++ 1 << 19, (1 << 19) + (1 << 18), ++ 1 << 20, (1 << 20) + (1 << 19), ++ 1 << 21, (1 << 21) + (1 << 20), ++ 1 << 22, (1 << 22) + (1 << 21), ++}; ++const unsigned int lg_size_cnt = (sizeof lg_size_array / sizeof lg_size_array[0]); ++ ++static struct key_t keys[] = { ++ { ++ .str = "node", ++ .offset = offsetof(struct ft_set, node), ++ .val_type = VAL_STRING, ++ }, ++ { ++ .str = "service", ++ .offset = offsetof(struct ft_set, service), ++ .val_type = VAL_STRING, ++ }, ++ { ++ .str = "prov_name", ++ .offset = offsetof(struct ft_set, prov_name), ++ .val_type = VAL_STRING, ++ }, ++ { ++ .str = "test_type", ++ .offset = offsetof(struct ft_set, test_type), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->test_type) / FT_MAX_TEST, ++ }, ++ { ++ .str = "class_function", ++ .offset = offsetof(struct ft_set, class_function), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->class_function) / FT_MAX_FUNCTIONS, ++ }, ++ { ++ .str = "ep_type", ++ .offset = offsetof(struct ft_set, ep_type), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->ep_type) / FT_MAX_EP_TYPES, ++ }, ++ { ++ .str = "av_type", ++ .offset = offsetof(struct ft_set, av_type), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->av_type) / FT_MAX_AV_TYPES, ++ }, ++ { ++ .str = "comp_type", ++ .offset = offsetof(struct ft_set, comp_type), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->comp_type) / FT_MAX_COMP, ++ }, ++ { ++ .str = "eq_wait_obj", ++ .offset = offsetof(struct ft_set, eq_wait_obj), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->eq_wait_obj) / FT_MAX_WAIT_OBJ, ++ }, ++ { ++ .str = "cq_wait_obj", ++ .offset = offsetof(struct ft_set, cq_wait_obj), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->cq_wait_obj) / FT_MAX_WAIT_OBJ, ++ }, ++ { ++ .str = "cntr_wait_obj", ++ .offset = offsetof(struct ft_set, cntr_wait_obj), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->cntr_wait_obj) / FT_MAX_WAIT_OBJ, ++ }, ++ { ++ .str = "op", ++ .offset = offsetof(struct ft_set, op), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->op) / FI_ATOMIC_OP_LAST, ++ }, ++ { ++ .str = "datatype", ++ .offset = offsetof(struct ft_set, datatype), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->datatype) / FI_DATATYPE_LAST, ++ }, ++ { ++ .str = "mode", ++ .offset = offsetof(struct ft_set, mode), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->mode) / FT_MAX_PROV_MODES, ++ }, ++ { ++ .str = "test_class", ++ .offset = offsetof(struct ft_set, test_class), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->test_class) / FT_MAX_CLASS, ++ }, ++ { ++ .str = "constant_caps", ++ .offset = offsetof(struct ft_set, constant_caps), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->constant_caps) / FT_MAX_CAPS, ++ }, ++ { ++ .str = "rx_cq_bind_flags", ++ .offset = offsetof(struct ft_set, rx_cq_bind_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->rx_cq_bind_flags) / FT_MAX_FLAGS, ++ }, ++ { ++ .str = "tx_cq_bind_flags", ++ .offset = offsetof(struct ft_set, tx_cq_bind_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->tx_cq_bind_flags) / FT_MAX_FLAGS, ++ }, ++ { ++ .str = "rx_op_flags", ++ .offset = offsetof(struct ft_set, rx_op_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->rx_op_flags) / FT_MAX_FLAGS, ++ }, ++ { ++ .str = "tx_op_flags", ++ .offset = offsetof(struct ft_set, tx_op_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->tx_op_flags) / FT_MAX_FLAGS, ++ }, ++ { ++ .str = "test_flags", ++ .offset = offsetof(struct ft_set, test_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->test_flags), ++ }, ++ { ++ .str = "msg_flags", ++ .offset = offsetof(struct ft_set, msg_flags), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->msg_flags), ++ }, ++ { ++ .str = "mr_mode", ++ .offset = offsetof(struct ft_set, mr_mode), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->mr_mode) / FT_MAX_MR_MODES, ++ }, ++ { ++ .str = "progress", ++ .offset = offsetof(struct ft_set, progress), ++ .val_type = VAL_NUM, ++ .val_size = sizeof(((struct ft_set *)0)->progress) / FT_MAX_PROGRESS, ++ } ++}; ++ ++static int ft_parse_num(char *str, int len, struct key_t *key, void *buf) ++{ ++ if (!strncmp(key->str, "test_type", strlen("test_type"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FT_TEST_LATENCY, enum ft_test_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_TEST_BANDWIDTH, enum ft_test_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_TEST_UNIT, enum ft_test_type, buf); ++ FT_ERR("Unknown test_type"); ++ } else if (!strncmp(key->str, "class_function", strlen("class_function"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_SEND, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_SENDV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_SENDMSG, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECT, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECTDATA, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_SENDDATA, enum ft_class_function, buf); ++ ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_WRITE, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_WRITEV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_WRITEMSG, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_WRITEDATA, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECT_WRITE, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECT_WRITEDATA, enum ft_class_function, buf); ++ ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_READ, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_READV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_READMSG, enum ft_class_function, buf); ++ ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_ATOMIC, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_ATOMICV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_ATOMICMSG, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_INJECT_ATOMIC, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_FETCH_ATOMIC, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_FETCH_ATOMICV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_FETCH_ATOMICMSG, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_COMPARE_ATOMIC, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_COMPARE_ATOMICV, enum ft_class_function, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_FUNC_COMPARE_ATOMICMSG, enum ft_class_function, buf); ++ ++ FT_ERR("Unknown class_function"); ++ } else if (!strncmp(key->str, "ep_type", strlen("ep_type"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_EP_MSG, enum fi_ep_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_EP_DGRAM, enum fi_ep_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_EP_RDM, enum fi_ep_type, buf); ++ FT_ERR("Unknown ep_type"); ++ } else if (!strncmp(key->str, "av_type", strlen("av_type"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_AV_MAP, enum fi_av_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_AV_TABLE, enum fi_av_type, buf); ++ FT_ERR("Unknown av_type"); ++ } else if (!strncmp(key->str, "test_class", strlen("test_class"))) { ++ TEST_SET_N_RETURN(str, len, "FT_CAP_MSG", FT_CAP_MSG, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_CAP_TAGGED", FT_CAP_TAGGED, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_CAP_RMA", FT_CAP_RMA, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_CAP_ATOMIC", FT_CAP_ATOMIC, uint64_t, buf); ++ FT_ERR("Unknown test class"); ++ } else if (!strncmp(key->str, "eq_wait_obj", strlen("eq_wait_obj")) || ++ !strncmp(key->str, "cq_wait_obj", strlen("cq_wait_obj")) || ++ !strncmp(key->str, "cntr_wait_obj", strlen("cntr_wait_obj"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WAIT_NONE, enum fi_wait_obj, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WAIT_UNSPEC, enum fi_wait_obj, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WAIT_FD, enum fi_wait_obj, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WAIT_MUTEX_COND, enum fi_wait_obj, buf); ++ FT_ERR("Unknown wait_obj"); ++ } else if (!strncmp(key->str, "op", strlen("op"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MIN, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MAX, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_SUM, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_PROD, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LOR, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LAND, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_BOR, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_BAND, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LXOR, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_BXOR, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_ATOMIC_READ, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_ATOMIC_WRITE, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_NE, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_LE, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_LT, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_GE, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_CSWAP_GT, enum fi_op, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MSWAP, enum fi_op, buf); ++ FT_ERR("Unknown op"); ++ } else if (!strncmp(key->str, "datatype", strlen("datatype"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_INT8, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_UINT8, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_INT16, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_UINT16, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_INT32, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_UINT32, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_INT64, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_UINT64, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_FLOAT, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_DOUBLE, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_FLOAT_COMPLEX, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_DOUBLE_COMPLEX, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LONG_DOUBLE, enum fi_datatype, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_LONG_DOUBLE_COMPLEX, enum fi_datatype, buf); ++ FT_ERR("Unknown datatype"); ++ } else if (!strncmp(key->str, "msg_flags", strlen("msg_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_REMOTE_CQ_DATA, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown message flag"); ++ } else if (!strncmp(key->str, "mr_mode", strlen("mr_mode"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MR_LOCAL, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MR_VIRT_ADDR, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MR_ALLOCATED, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MR_PROV_KEY, uint64_t, buf); ++ FT_ERR("Unknown MR mode"); ++ } else if (!strncmp(key->str, "progress", strlen("progress"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_PROGRESS_MANUAL, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_PROGRESS_AUTO, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_PROGRESS_UNSPEC, uint64_t, buf); ++ FT_ERR("Unknown progress mode"); ++ } else if (!strncmp(key->str, "constant_caps", strlen("constant_caps"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_RMA, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_MSG, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_SEND, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_RECV, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_READ, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_WRITE, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_REMOTE_READ, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_REMOTE_WRITE, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_TAGGED, uint64_t, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FI_DIRECTED_RECV, uint64_t, buf); ++ FT_ERR("Unknown caps"); ++ } else if (!strncmp(key->str, "rx_cq_bind_flags", strlen("rx_cq_bind_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_SELECTIVE_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown rx_cq_bind_flags"); ++ } else if (!strncmp(key->str, "tx_cq_bind_flags", strlen("tx_cq_bind_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_SELECTIVE_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown tx_cq_bind_flags"); ++ } else if (!strncmp(key->str, "rx_op_flags", strlen("rx_op_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown rx_op_flags"); ++ } else if (!strncmp(key->str, "tx_op_flags", strlen("tx_op_flags"))) { ++ TEST_ENUM_SET_N_RETURN(str, len, FI_COMPLETION, uint64_t, buf); ++ FT_ERR("Unknown tx_op_flags"); ++ } else { ++ TEST_ENUM_SET_N_RETURN(str, len, FT_COMP_QUEUE, enum ft_comp_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_COMP_CNTR, enum ft_comp_type, buf); ++ TEST_ENUM_SET_N_RETURN(str, len, FT_COMP_ALL, enum ft_comp_type, buf); ++ TEST_SET_N_RETURN(str, len, "FT_MODE_ALL", FT_MODE_ALL, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_MODE_NONE", FT_MODE_NONE, uint64_t, buf); ++ TEST_SET_N_RETURN(str, len, "FT_FLAG_QUICKTEST", FT_FLAG_QUICKTEST, uint64_t, buf); ++ FT_ERR("Unknown comp_type/mode/test_flags"); ++ } ++ ++ return -1; ++} ++ ++static int ft_parse_key_val(char *config, jsmntok_t *token, char *test_set) ++{ ++ int i, parsed = 0; ++ jsmntok_t *key_token = token; ++ jsmntok_t *val_token = token + 1; ++ struct key_t *key = NULL; ++ int size = 0; ++ ++ if (!strncmp(config + key_token->start, "#", 1)) { ++ parsed += 2; ++ return parsed; ++ } ++ ++ for (i = 0; i < sizeof(keys) / sizeof(keys[0]); i++) { ++ if (!strncmp(config + key_token->start, keys[i].str, strlen(keys[i].str))) { ++ key = &keys[i]; ++ parsed++; ++ break; ++ } ++ } ++ ++ if (!key) { ++ FT_ERR("Unknown key"); ++ return -1; ++ } ++ ++ switch(val_token->type) { ++ case JSMN_PRIMITIVE: ++ case JSMN_STRING: ++ size = 1; ++ break; ++ case JSMN_ARRAY: ++ size = val_token->size; ++ val_token++; ++ parsed++; ++ break; ++ default: ++ FT_ERR("[jsmn] Unknown token type"); ++ return -1; ++ } ++ ++ for (i = 0; i < size; i++) { ++ switch(key->val_type) { ++ case VAL_STRING: ++ memcpy(test_set + key->offset + key->val_size * i, ++ config + val_token[i].start, ++ val_token[i].end - val_token[i].start); ++ break; ++ case VAL_NUM: ++ if (ft_parse_num(config + val_token[i].start, ++ val_token[i].end - val_token[i].start, key, ++ test_set + key->offset + key->val_size * i) < 0) ++ return -1; ++ break; ++ default: ++ FT_ERR("Invalid key->val_type"); ++ return -1; ++ } ++ parsed++; ++ } ++ ++ return parsed; ++} ++ ++static int ft_parse_config(char *config, int size, ++ struct ft_set **test_sets_out, int *nsets) ++{ ++ struct ft_set *test_sets; ++ jsmn_parser parser; ++ jsmntok_t *tokens; ++ int num_tokens, num_tokens_parsed; ++ int i, ret, ts_count, ts_index; ++ ++ jsmn_init(&parser); ++ num_tokens = jsmn_parse(&parser, config, size, NULL, 0); ++ if (num_tokens <= 0) ++ return 1; ++ ++ tokens = malloc(sizeof(jsmntok_t) * num_tokens); ++ if (!tokens) ++ return 1; ++ ++ /* jsmn parser returns a list of JSON tokens (jsmntok_t) ++ * e.g. JSMN_OBJECT ++ * JSMN_STRING : ++ * JSMN_STRING : ++ * JSMN_STRING : ++ * JSMN_ARRAY : ++ * JSMN_STRING ++ * JSMN_STRING ++ * JSMN_STRING : ++ * JSMN_STRING : ++ * In our case, JSMN_OBJECT would represent a ft_set structure. The rest ++ * of the tokens would be treated as key-value pairs. The first JSMN_STRING ++ * would represent a key and the next would represent a value. A value ++ * can also be an array. jsmntok_t.size would represent the length of ++ * the array. ++ */ ++ jsmn_init(&parser); ++ ret = jsmn_parse(&parser, config, size, tokens, num_tokens); ++ if (ret < 0) { ++ switch (ret) { ++ case JSMN_ERROR_INVAL: ++ FT_ERR("[jsmn] bad token, JSON string is corrupted!"); ++ break; ++ case JSMN_ERROR_NOMEM: ++ FT_ERR("[jsmn] not enough tokens, JSON string is too large!"); ++ break; ++ case JSMN_ERROR_PART: ++ FT_ERR("[jsmn] JSON string is too short, expecting more JSON data!"); ++ break; ++ default: ++ FT_ERR("[jsmn] Unknown error!"); ++ break; ++ } ++ goto err1; ++ } ++ ++ if (ret != num_tokens) { ++ FT_ERR("[jsmn] Expected # of tokens: %d, Got: %d", num_tokens, ret); ++ goto err1; ++ } ++ ++ for (i = 0, ts_count = 0; i < num_tokens; i++) { ++ if (tokens[i].type == JSMN_OBJECT) ++ ts_count++; ++ } ++ ++ test_sets = calloc(ts_count, sizeof(struct ft_set)); ++ ++ for (i = 0, ts_index = -1; i < num_tokens;) { ++ switch (tokens[i].type) { ++ case JSMN_OBJECT: ++ ts_index++; ++ i++; ++ break; ++ case JSMN_PRIMITIVE: ++ case JSMN_STRING: ++ num_tokens_parsed = ft_parse_key_val(config, &tokens[i], ++ (char *)(test_sets + ts_index)); ++ if (num_tokens_parsed <= 0) { ++ FT_ERR("Error parsing config!"); ++ goto err2; ++ } ++ i += num_tokens_parsed; ++ break; ++ default: ++ FT_ERR("[jsmn] Unknown token!"); ++ goto err2; ++ } ++ } ++ ++ *test_sets_out = test_sets; ++ *nsets = ts_count; ++ ++ free(tokens); ++ return 0; ++err2: ++ free(test_sets); ++err1: ++ free(tokens); ++ return 1; ++} ++ ++struct ft_series *fts_load(char *filename) ++{ ++ int nsets = 0; ++ char *config; ++ FILE *fp; ++ ++ if (filename) { ++ int size; ++ struct ft_set *test_sets = NULL; ++ ++ fp = fopen(filename, "rb"); ++ if (!fp) { ++ FT_ERR("Unable to open config file: %s\n", filename); ++ return NULL; ++ } ++ ++ fseek(fp, 0, SEEK_END); ++ size = ftell(fp); ++ if (size < 0) { ++ FT_ERR("ftell error"); ++ goto err1; ++ } ++ fseek(fp, 0, SEEK_SET); ++ ++ config = malloc(size + 1); ++ if (!config) { ++ FT_ERR("Unable to allocate memory"); ++ goto err1; ++ } ++ ++ if (fread(config, size, 1, fp) != 1) { ++ FT_ERR("Error reading config file"); ++ goto err2; ++ } ++ ++ config[size] = 0; ++ ++ if (ft_parse_config(config, size, &test_sets, &nsets)) { ++ FT_ERR("Unable to parse file"); ++ goto err2; ++ } ++ ++ test_series.sets = test_sets; ++ test_series.nsets = nsets; ++ free(config); ++ fclose(fp); ++ } else { ++ printf("No config file given. Using default tests.\n"); ++ test_series.sets = test_sets_default; ++ test_series.nsets = sizeof(test_sets_default) / sizeof(test_sets_default[0]); ++ } ++ ++ for (fts_start(&test_series, 0); !fts_end(&test_series, 0); ++ fts_next(&test_series)) ++ test_series.test_count++; ++ fts_start(&test_series, 0); ++ ++ printf("Test configurations loaded: %d\n", test_series.test_count); ++ return &test_series; ++ ++err2: ++ free(config); ++err1: ++ fclose(fp); ++ return NULL; ++} ++ ++void fts_close(struct ft_series *series) ++{ ++ if (series->sets != test_sets_default) ++ free(series->sets); ++} ++ ++void fts_start(struct ft_series *series, int index) ++{ ++ series->cur_set = 0; ++ series->cur_type = 0; ++ series->cur_ep = 0; ++ series->cur_av = 0; ++ series->cur_comp = 0; ++ series->cur_eq_wait_obj = 0; ++ series->cur_cq_wait_obj = 0; ++ series->cur_cntr_wait_obj = 0; ++ series->cur_mode = 0; ++ series->cur_class = 0; ++ series->cur_progress = 0; ++ ++ series->test_index = 1; ++ if (index > 1) { ++ for (; !fts_end(series, index - 1); fts_next(series)) ++ ; ++ } ++} ++ ++int fts_info_is_valid(void) ++{ ++ if (test_info.msg_flags && !is_msg_func(test_info.class_function)) ++ return 0; ++ ++ if (test_info.rx_cq_bind_flags & FI_SELECTIVE_COMPLETION && ++ !(test_info.rx_op_flags & FI_COMPLETION) && ++ !(test_info.msg_flags & FI_COMPLETION)) ++ return 0; ++ ++ if (test_info.test_class & (FI_MSG | FI_TAGGED) && ++ !ft_check_rx_completion(test_info) && ++ !ft_use_comp_cntr(test_info.comp_type)) ++ return 0; ++ if (test_info.test_type == FT_TEST_UNIT && ++ test_info.ep_type == FI_EP_DGRAM) ++ return 0; ++ ++ return 1; ++} ++ ++void fts_next(struct ft_series *series) ++{ ++ struct ft_set *set; ++ ++ if (fts_end(series, 0)) ++ return; ++ ++ series->test_index++; ++ set = &series->sets[series->cur_set]; ++ ++ if (set->test_class[++series->cur_class]) ++ return; ++ series->cur_class = 0; ++ ++ if (set->mode[++series->cur_mode]) ++ return; ++ series->cur_mode = 0; ++ ++ if (set->class_function[++series->cur_func]) ++ return; ++ series->cur_func = 0; ++ ++ if (set->op[++series->cur_op]) ++ return; ++ series->cur_op = 0; ++ ++ if (set->datatype[++series->cur_datatype]) ++ return; ++ series->cur_datatype = 0; ++ ++ if (set->comp_type[++series->cur_comp]) ++ return; ++ series->cur_comp = 0; ++ ++ if (set->eq_wait_obj[++series->cur_eq_wait_obj]) ++ return; ++ series->cur_eq_wait_obj = 0; ++ ++ if (set->cq_wait_obj[++series->cur_cq_wait_obj]) ++ return; ++ series->cur_cq_wait_obj = 0; ++ ++ if (set->cntr_wait_obj[++series->cur_cntr_wait_obj]) ++ return; ++ series->cur_cntr_wait_obj = 0; ++ ++ if (set->ep_type[series->cur_ep] == FI_EP_RDM || ++ set->ep_type[series->cur_ep] == FI_EP_DGRAM) { ++ if (set->av_type[++series->cur_av]) ++ return; ++ } ++ series->cur_av = 0; ++ ++ if (set->ep_type[++series->cur_ep]) ++ return; ++ series->cur_ep = 0; ++ ++ if (set->test_type[++series->cur_type]) ++ return; ++ series->cur_type = 0; ++ ++ if (set->test_class[++series->cur_progress]) ++ return; ++ series->cur_progress = 0; ++ ++ series->cur_set++; ++} ++ ++int fts_end(struct ft_series *series, int index) ++{ ++ return (series->cur_set >= series->nsets) || ++ ((index > 0) && (series->test_index > index)); ++} ++ ++void fts_cur_info(struct ft_series *series, struct ft_info *info) ++{ ++ static struct ft_set *set; ++ int i = 0; ++ ++ memset(info, 0, sizeof *info); ++ if (series->cur_set >= series->nsets) ++ return; ++ ++ set = &series->sets[series->cur_set]; ++ info->test_type = set->test_type[series->cur_type]; ++ info->test_index = series->test_index; ++ info->class_function = set->class_function[series->cur_func]; ++ info->msg_flags = set->msg_flags; ++ info->op = set->op[series->cur_op]; ++ info->datatype = set->datatype[series->cur_datatype]; ++ info->test_flags = set->test_flags; ++ info->test_class = set->test_class[series->cur_class]; ++ info->progress = set->progress[series->cur_progress]; ++ ++ if (info->test_class) { ++ info->caps = set->test_class[series->cur_class]; ++ if (info->caps & (FT_CAP_RMA | FT_CAP_ATOMIC)) ++ info->caps |= FT_CAP_MSG; ++ } ++ ++ if (set->constant_caps[0]) { ++ i = 0; ++ while (set->constant_caps[i]) ++ info->caps |= set->constant_caps[i++]; ++ } ++ if (set->mr_mode[0]) { ++ i = 0; ++ while (set->mr_mode[i]) ++ info->mr_mode |= set->mr_mode[i++]; ++ } ++ if (set->rx_cq_bind_flags[0]) { ++ i = 0; ++ while (set->rx_cq_bind_flags[i]) ++ info->rx_cq_bind_flags |= set->rx_cq_bind_flags[i++]; ++ } ++ if (set->tx_cq_bind_flags[0]) { ++ i = 0; ++ while (set->tx_cq_bind_flags[i]) ++ info->tx_cq_bind_flags |= set->tx_cq_bind_flags[i++]; ++ } ++ if (set->rx_op_flags[0]) { ++ i = 0; ++ while (set->rx_op_flags[i]) ++ info->rx_op_flags |= set->rx_op_flags[i++]; ++ } ++ if (set->tx_op_flags[0]) { ++ i = 0; ++ while (set->tx_op_flags[i]) ++ info->tx_op_flags |= set->tx_op_flags[i++]; ++ } ++ ++ info->mode = (set->mode[series->cur_mode] == FT_MODE_NONE) ? ++ 0 : set->mode[series->cur_mode]; ++ ++ info->ep_type = set->ep_type[series->cur_ep]; ++ info->av_type = set->av_type[series->cur_av]; ++ if (set->comp_type[0]) ++ info->comp_type = set->comp_type[series->cur_comp]; ++ else ++ info->comp_type = FT_COMP_QUEUE; ++ ++ if (info->caps & (FT_CAP_RMA | FT_CAP_ATOMIC) && ++ (ft_use_comp_cntr(info->comp_type))) ++ info->caps |= FI_RMA_EVENT; ++ info->eq_wait_obj = set->eq_wait_obj[series->cur_eq_wait_obj]; ++ info->cntr_wait_obj = set->cntr_wait_obj[series->cur_cntr_wait_obj]; ++ ++ if (set->node[0]) ++ strncpy(info->node, set->node, sizeof(info->node) - 1); ++ else if (opts.dst_addr) ++ strncpy(info->node, opts.dst_addr, sizeof(info->node) - 1); ++ if (set->service[0]) ++ strncpy(info->service, set->service, sizeof(info->service) - 1); ++ else if (opts.dst_port) ++ strncpy(info->service, opts.dst_port, sizeof(info->service) - 1); ++ strncpy(info->prov_name, set->prov_name, sizeof(info->prov_name) - 1); ++ ++ info->node[sizeof(info->node) - 1] = '\0'; ++ info->service[sizeof(info->service) - 1] = '\0'; ++ info->prov_name[sizeof(info->prov_name) - 1] = '\0'; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/connect.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/connect.c +new file mode 100644 +index 000000000..a86b57647 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/connect.c +@@ -0,0 +1,122 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++static int ft_accept(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ rd = ft_get_event(&event, &entry, sizeof entry, ++ FI_CONNREQ, sizeof entry); ++ if (rd < 0) ++ return (int) rd; ++ ++ fabric_info = entry.info; ++ ret = ft_open_active(); ++ if (ret) ++ return ret; ++ ++ ret = fi_accept(ep, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_accept", ret); ++ return ret; ++ } ++ ++ rd = ft_get_event(&event, &entry, sizeof entry, ++ FI_CONNECTED, sizeof entry); ++ if (rd < 0) ++ return (int) rd; ++ ++ return 0; ++} ++ ++static int ft_connect(void) ++{ ++ struct fi_eq_cm_entry entry; ++ uint32_t event; ++ ssize_t rd; ++ int ret; ++ ++ ret = fi_connect(ep, fabric_info->dest_addr, NULL, 0); ++ if (ret) { ++ FT_PRINTERR("fi_connect", ret); ++ return ret; ++ } ++ ++ rd = ft_get_event(&event, &entry, sizeof entry, ++ FI_CONNECTED, sizeof entry); ++ if (rd < 0) ++ return (int) rd; ++ ++ return 0; ++} ++ ++static int ft_load_av(void) ++{ ++ struct ft_msg msg; ++ size_t len; ++ int ret; ++ ++ memset(&msg, 0, sizeof(struct ft_msg)); ++ len = sizeof(msg.data); ++ ret = fi_getname(&ep->fid, msg.data, &len); ++ if (ret) { ++ FT_PRINTERR("fi_getname", ret); ++ return ret; ++ } ++ ++ msg.len = (uint32_t) len; ++ ret = ft_sock_send(sock, &msg, sizeof msg); ++ if (ret) ++ return ret; ++ ++ ret = ft_sock_recv(sock, &msg, sizeof msg); ++ if (ret) ++ return ret; ++ ++ ret = ft_av_insert(av, msg.data, 1, &ft_tx_ctrl.addr, 0, NULL); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_enable_comm(void) ++{ ++ if (test_info.ep_type == FI_EP_MSG) ++ return pep ? ft_accept() : ft_connect(); ++ else ++ return ft_load_av(); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/cq.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/cq.c +new file mode 100644 +index 000000000..ebdfa0db9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/cq.c +@@ -0,0 +1,390 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++ ++static size_t comp_entry_cnt[] = { ++ [FI_CQ_FORMAT_UNSPEC] = 0, ++ [FI_CQ_FORMAT_CONTEXT] = FT_COMP_BUF_SIZE / sizeof(struct fi_cq_entry), ++ [FI_CQ_FORMAT_MSG] = FT_COMP_BUF_SIZE / sizeof(struct fi_cq_msg_entry), ++ [FI_CQ_FORMAT_DATA] = FT_COMP_BUF_SIZE / sizeof(struct fi_cq_data_entry), ++ [FI_CQ_FORMAT_TAGGED] = FT_COMP_BUF_SIZE / sizeof(struct fi_cq_tagged_entry) ++}; ++ ++/* ++static size_t comp_entry_size[] = { ++ [FI_CQ_FORMAT_UNSPEC] = 0, ++ [FI_CQ_FORMAT_CONTEXT] = sizeof(struct fi_cq_entry), ++ [FI_CQ_FORMAT_MSG] = sizeof(struct fi_cq_msg_entry), ++ [FI_CQ_FORMAT_DATA] = sizeof(struct fi_cq_data_entry), ++ [FI_CQ_FORMAT_TAGGED] = sizeof(struct fi_cq_tagged_entry) ++}; ++*/ ++ ++int ft_use_comp_cntr(enum ft_comp_type comp_type) ++{ ++ if ((comp_type == FT_COMP_CNTR) || ++ (comp_type == FT_COMP_ALL)) ++ return 1; ++ ++ return 0; ++} ++ ++int ft_use_comp_cq(enum ft_comp_type comp_type) ++{ ++ if ((comp_type == FT_COMP_QUEUE) || ++ (comp_type == FT_COMP_ALL)) ++ return 1; ++ ++ return 0; ++} ++ ++int ft_generates_rx_comp(void) ++{ ++ if (is_data_func(test_info.class_function) || ++ (is_msg_func(test_info.class_function) && ++ test_info.msg_flags & FI_REMOTE_CQ_DATA)) ++ return 1; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) ++ return 0; ++ ++ if (!(test_info.rx_cq_bind_flags & FI_SELECTIVE_COMPLETION)) ++ return 1; ++ if (test_info.rx_op_flags & FI_COMPLETION) { ++ if (is_msg_func(test_info.class_function) && ++ !(test_info.msg_flags & FI_COMPLETION)) ++ return 0; ++ return 1; ++ } ++ if (is_msg_func(test_info.class_function) && ++ test_info.msg_flags & FI_COMPLETION) ++ return 1; ++ return 0; ++} ++ ++int ft_generates_tx_comp(void) ++{ ++ if (!(test_info.tx_cq_bind_flags & FI_SELECTIVE_COMPLETION)) { ++ if (is_inject_func(test_info.class_function)) ++ return 0; ++ return 1; ++ } ++ ++ if (test_info.tx_op_flags & FI_COMPLETION) { ++ if (is_msg_func(test_info.class_function) && ++ !(test_info.msg_flags & FI_COMPLETION)) ++ return 0; ++ return 1; ++ } ++ ++ if (test_info.msg_flags & FI_COMPLETION) ++ return 1; ++ ++ return 0; ++} ++ ++int ft_check_rx_completion(void) ++{ ++ if (ft_use_comp_cntr(test_info.comp_type) || ++ ft_generates_rx_comp()) ++ return 1; ++ else ++ return 0; ++} ++ ++int ft_check_tx_completion(void) ++{ ++ if (ft_use_comp_cntr(test_info.comp_type) || ++ ft_generates_tx_comp()) ++ return 1; ++ else ++ return 0; ++} ++ ++static int ft_open_cntrs(void) ++{ ++ struct fi_cntr_attr attr; ++ int ret; ++ ++ if (!txcntr) { ++ memset(&attr, 0, sizeof attr); ++ attr.wait_obj = test_info.cntr_wait_obj; ++ ret = fi_cntr_open(domain, &attr, &txcntr, &txcntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ } ++ if (!rxcntr) { ++ memset(&attr, 0, sizeof attr); ++ attr.wait_obj = test_info.cntr_wait_obj; ++ ret = fi_cntr_open(domain, &attr, &rxcntr, &rxcntr); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++static int ft_open_cqs(void) ++{ ++ struct fi_cq_attr attr; ++ int ret; ++ ++ if (!txcq) { ++ memset(&attr, 0, sizeof attr); ++ attr.format = ft_tx_ctrl.cq_format; ++ attr.wait_obj = test_info.cq_wait_obj; ++ attr.size = ft_tx_ctrl.max_credits; ++ ++ ret = fi_cq_open(domain, &attr, &txcq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ if (!rxcq) { ++ memset(&attr, 0, sizeof attr); ++ attr.format = ft_rx_ctrl.cq_format; ++ attr.wait_obj = test_info.cq_wait_obj; ++ attr.size = ft_rx_ctrl.max_credits; ++ ++ ret = fi_cq_open(domain, &attr, &rxcq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++int ft_open_comp(void) ++{ ++ int ret; ++ ++ ret = ft_open_cqs(); ++ if (ret) ++ return ret; ++ ++ switch (test_info.comp_type) { ++ case FT_COMP_QUEUE: ++ break; ++ case FT_COMP_ALL: ++ case FT_COMP_CNTR: ++ ret = ft_open_cntrs(); ++ break; ++ default: ++ ret = -FI_ENOSYS; ++ } ++ ++ return ret; ++} ++ ++int ft_bind_comp(struct fid_ep *ep) ++{ ++ int ret; ++ uint64_t flags; ++ ++ flags = FI_TRANSMIT | test_info.tx_cq_bind_flags; ++ ret = fi_ep_bind(ep, &txcq->fid, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) { ++ flags = FI_TRANSMIT | FI_READ | FI_WRITE; ++ ret = fi_ep_bind(ep, &txcntr->fid, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ } ++ ++ flags = FI_RECV | test_info.rx_cq_bind_flags; ++ ret = fi_ep_bind(ep, &rxcq->fid, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) { ++ flags = FI_RECV | FI_REMOTE_READ | FI_REMOTE_WRITE; ++ ret = fi_ep_bind(ep, &rxcntr->fid, flags); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++/* Read CQ until there are no more completions */ ++#define ft_cq_read(cq_read, cq, buf, count, completions, str, ret, verify,...) \ ++ do { \ ++ ret = cq_read(cq, buf, count, ##__VA_ARGS__); \ ++ if (ret < 0) { \ ++ if (ret == -FI_EAGAIN) \ ++ break; \ ++ if (ret == -FI_EAVAIL) { \ ++ ret = ft_cq_readerr(cq); \ ++ } else { \ ++ FT_PRINTERR(#cq_read, ret); \ ++ } \ ++ return ret; \ ++ } else { \ ++ completions += ret; \ ++ if (verify) \ ++ ft_verify_comp(buf); \ ++ } \ ++ } while (ret == count) ++ ++static int ft_comp_x(struct fid_cq *cq, struct ft_xcontrol *ft_x, ++ const char *x_str, int timeout) ++{ ++ uint8_t buf[FT_COMP_BUF_SIZE], start = 0; ++ struct timespec s, e; ++ int poll_time = 0; ++ int ret, verify = (test_info.test_type == FT_TEST_UNIT && cq == rxcq); ++ size_t cur_credits = ft_x->credits; ++ ++ switch(test_info.cq_wait_obj) { ++ case FI_WAIT_NONE: ++ do { ++ if (!start) { ++ clock_gettime(CLOCK_MONOTONIC, &s); ++ start = 1; ++ } ++ ++ ft_cq_read(fi_cq_read, cq, buf, comp_entry_cnt[ft_x->cq_format], ++ ft_x->credits, x_str, ret, verify); ++ ++ clock_gettime(CLOCK_MONOTONIC, &e); ++ poll_time = get_elapsed(&s, &e, MILLI); ++ } while (ret == -FI_EAGAIN && poll_time < timeout && ++ ft_x->credits == cur_credits); ++ ++ if (ft_x->credits != cur_credits) ++ ret = 0; ++ ++ break; ++ case FI_WAIT_UNSPEC: ++ case FI_WAIT_FD: ++ case FI_WAIT_MUTEX_COND: ++ ft_cq_read(fi_cq_sread, cq, buf, comp_entry_cnt[ft_x->cq_format], ++ ft_x->credits, x_str, ret, verify, NULL, timeout); ++ break; ++ case FI_WAIT_SET: ++ FT_ERR("fi_ubertest: Unsupported cq wait object"); ++ return -1; ++ default: ++ FT_ERR("Unknown cq wait object"); ++ return -1; ++ } ++ ++ return (ret == -FI_EAGAIN && timeout) ? ret : 0; ++} ++ ++static int ft_cntr_x(struct fid_cntr *cntr, struct ft_xcontrol *ft_x, ++ int timeout) ++{ ++ uint64_t cntr_val; ++ struct timespec s, e; ++ int poll_time = clock_gettime(CLOCK_MONOTONIC, &s); ++ ++ do { ++ cntr_val = fi_cntr_read(cntr); ++ clock_gettime(CLOCK_MONOTONIC, &e); ++ poll_time = get_elapsed(&s, &e, MILLI); ++ } while (cntr_val == ft_x->total_comp && poll_time < timeout); ++ ++ ft_x->credits += (cntr_val - ft_x->total_comp); ++ ft_x->total_comp = cntr_val; ++ ++ return 0; ++} ++ ++int ft_comp_rx(int timeout) ++{ ++ int ret; ++ size_t cur_credits = ft_rx_ctrl.credits; ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) { ++ ret = ft_cntr_x(rxcntr, &ft_rx_ctrl, timeout); ++ if (ret) ++ return ret; ++ } ++ if (ft_use_comp_cq(test_info.comp_type)) { ++ if (test_info.comp_type == FT_COMP_ALL) ++ ft_rx_ctrl.credits = cur_credits; ++ ret = ft_comp_x(rxcq, &ft_rx_ctrl, "rxcq", timeout); ++ if (ret) ++ return ret; ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) ++ ft_rx_ctrl.credits = cur_credits; ++ } ++ assert(ft_rx_ctrl.credits <= ft_rx_ctrl.max_credits); ++ ++ return 0; ++} ++ ++int ft_comp_tx(int timeout) ++{ ++ int ret; ++ size_t cur_credits = ft_tx_ctrl.credits; ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) { ++ ret = ft_cntr_x(txcntr, &ft_tx_ctrl, timeout); ++ if (ret) ++ return ret; ++ } ++ ++ if (ft_use_comp_cq(test_info.comp_type)) { ++ if (test_info.comp_type == FT_COMP_ALL) ++ ft_tx_ctrl.credits = cur_credits; ++ ret = ft_comp_x(txcq, &ft_tx_ctrl, "txcq", timeout); ++ if (ret) ++ return ret; ++ ++ if (ft_use_comp_cntr(test_info.comp_type)) ++ ft_tx_ctrl.credits = cur_credits; ++ } ++ assert(ft_tx_ctrl.credits <= ft_tx_ctrl.max_credits); ++ ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/domain.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/domain.c +new file mode 100644 +index 000000000..f72484883 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/domain.c +@@ -0,0 +1,354 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++ ++static int ft_open_fabric(void) ++{ ++ int ret; ++ ++ if (fabric) { ++ if (fabric_info->fabric_attr->fabric && ++ fabric_info->fabric_attr->fabric != fabric) { ++ printf("Opened fabric / fabric_attr mismatch\n"); ++ return -FI_EOTHER; ++ } ++ return 0; ++ } ++ ++ ret = fi_fabric(fabric_info->fabric_attr, &fabric, NULL); ++ if (ret) ++ FT_PRINTERR("fi_fabric", ret); ++ ++ return ret; ++} ++ ++static int ft_open_eq(void) ++{ ++ struct fi_eq_attr attr; ++ int ret; ++ ++ if (eq) ++ return 0; ++ ++ memset(&attr, 0, sizeof attr); ++ attr.wait_obj = test_info.eq_wait_obj; ++ ret = fi_eq_open(fabric, &attr, &eq, NULL); ++ if (ret) ++ FT_PRINTERR("fi_eq_open", ret); ++ ++ return ret; ++} ++ ++int ft_eq_readerr(void) ++{ ++ struct fi_eq_err_entry err; ++ ssize_t ret; ++ ++ memset(&err, 0, sizeof(err)); ++ ret = fi_eq_readerr(eq, &err, 0); ++ if (ret != sizeof(err)) { ++ FT_PRINTERR("fi_eq_readerr", ret); ++ return ret; ++ } else { ++ fprintf(stderr, "Error event %d %s\n", ++ err.err, fi_strerror(err.err)); ++ return err.err; ++ } ++} ++ ++ssize_t ft_get_event(uint32_t *event, void *buf, size_t len, ++ uint32_t event_check, size_t len_check) ++{ ++ ssize_t ret; ++ ++ switch(test_info.eq_wait_obj) { ++ case FI_WAIT_NONE: ++ do { ++ ret = fi_eq_read(eq, event, buf, len, 0); ++ if (ret == -FI_EAVAIL) { ++ return ft_eq_readerr(); ++ } else if (ret < 0 && ret != -FI_EAGAIN) { ++ FT_PRINTERR("fi_eq_read", ret); ++ return ret; ++ } ++ } while (ret == -FI_EAGAIN); ++ break; ++ case FI_WAIT_UNSPEC: ++ case FI_WAIT_FD: ++ case FI_WAIT_MUTEX_COND: ++ ret = fi_eq_sread(eq, event, buf, len, FT_SREAD_TO, 0); ++ if (ret == -FI_EAVAIL) { ++ return ft_eq_readerr(); ++ } else if (ret < 0) { ++ FT_PRINTERR("fi_eq_sread", ret); ++ return ret; ++ } ++ break; ++ case FI_WAIT_SET: ++ FT_ERR("fi_ubertest: Unsupported eq wait object"); ++ return -1; ++ default: ++ FT_ERR("Unknown eq wait object"); ++ return -1; ++ } ++ ++ if (event_check && event_check != *event) { ++ fprintf(stderr, "Unexpected event %d, wanted %d\n", ++ *event, event_check); ++ return -FI_ENOMSG; ++ ++ } ++ ++ if (ret < len_check) { ++ fprintf(stderr, "Reported event too small\n"); ++ return -FI_ETOOSMALL; ++ } ++ ++ return ret; ++} ++ ++static int ft_open_domain(void) ++{ ++ int ret; ++ ++ if (domain) { ++ if (fabric_info->domain_attr->domain && ++ fabric_info->domain_attr->domain != domain) { ++ fprintf(stderr, "Opened domain / domain_attr mismatch\n"); ++ return -FI_EDOMAIN; ++ } ++ return 0; ++ } ++ ++ ret = fi_domain(fabric, fabric_info, &domain, NULL); ++ if (ret) ++ FT_PRINTERR("fi_domain", ret); ++ ++ return ret; ++} ++ ++static int ft_open_av(void) ++{ ++ struct fi_av_attr attr; ++ int ret; ++ ++ if (av) ++ return 0; ++ ++ memset(&attr, 0, sizeof attr); ++ attr.type = test_info.av_type; ++ attr.count = 2; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_av_open", ret); ++ return ret; ++ } ++ ++ return ret; ++} ++ ++static int ft_setup_xcontrol_bufs(struct ft_xcontrol *ctrl) ++{ ++ size_t size; ++ int i, ret; ++ ++ size = ft_ctrl.size_array[ft_ctrl.size_cnt - 1]; ++ if (!ctrl->buf) { ++ ctrl->buf = calloc(1, size); ++ ctrl->cpy_buf = calloc(1, size); ++ if (!ctrl->buf || !ctrl->cpy_buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->buf, 0, size); ++ } ++ ++ if ((fabric_info->domain_attr->mr_mode & FI_MR_LOCAL) && !ctrl->mr) { ++ ret = fi_mr_reg(domain, ctrl->buf, size, ++ ft_info_to_mr_access(fabric_info), ++ 0, 0, 0, &ctrl->mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ctrl->memdesc = fi_mr_desc(ctrl->mr); ++ } ++ ++ for (i = 0; i < ft_ctrl.iov_cnt; i++) ++ ctrl->iov_desc[i] = ctrl->memdesc; ++ ++ return 0; ++} ++ ++static int ft_setup_atomic_control(struct ft_atomic_control *ctrl) ++{ ++ size_t size; ++ int ret = 0; ++ uint64_t access; ++ ++ size = ft_ctrl.size_array[ft_ctrl.size_cnt - 1]; ++ if (!ctrl->res_buf) { ++ ctrl->res_buf = calloc(1, size); ++ if (!ctrl->res_buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->res_buf, 0, size); ++ } ++ ++ if (!ctrl->comp_buf) { ++ ctrl->comp_buf = calloc(1, size); ++ if (!ctrl->comp_buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->comp_buf, 0, size); ++ } ++ ++ if (!ctrl->orig_buf) { ++ ctrl->orig_buf = calloc(1, size); ++ if (!ctrl->orig_buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->orig_buf, 0, size); ++ } ++ ++ if (fabric_info->domain_attr->mr_mode & FI_MR_LOCAL) { ++ access = FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE; ++ if (!ctrl->res_mr) { ++ ret = fi_mr_reg(domain, ctrl->res_buf, size, access, ++ 0, 0, 0, &ctrl->res_mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ctrl->res_memdesc = fi_mr_desc(ctrl->res_mr); ++ } ++ ++ if (!ctrl->comp_mr) { ++ ret = fi_mr_reg(domain, ctrl->comp_buf, size, access, ++ 0, 0, 0, &ctrl->comp_mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ctrl->comp_memdesc = fi_mr_desc(ctrl->comp_mr); ++ } ++ } ++ ft_atom_ctrl.op = test_info.op; ++ ft_atom_ctrl.datatype = test_info.datatype; ++ ++ return ret; ++} ++ ++static int ft_setup_mr_control(struct ft_mr_control *ctrl) ++{ ++ size_t size; ++ int ret; ++ uint64_t access; ++ ++ if (!(fabric_info->caps & (FI_RMA | FI_ATOMIC))) ++ return 0; ++ ++ size = ft_ctrl.size_array[ft_ctrl.size_cnt - 1]; ++ if (!ctrl->buf) { ++ ctrl->buf = calloc(1, size); ++ if (!ctrl->buf) ++ return -FI_ENOMEM; ++ } else { ++ memset(ctrl->buf, 0, size); ++ } ++ ++ if (!ctrl->mr) { ++ access = FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE; ++ ret = fi_mr_reg(domain, ctrl->buf, size, access, 0, ++ FT_MR_KEY, 0, &ctrl->mr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_mr_reg", ret); ++ return ret; ++ } ++ ctrl->memdesc = fi_mr_desc(ctrl->mr); ++ ctrl->peer_mr_key = ctrl->mr_key = fi_mr_key(ctrl->mr); ++ } ++ ++ return 0; ++} ++ ++static int ft_setup_bufs(void) ++{ ++ int ret; ++ ++ ret = ft_setup_xcontrol_bufs(&ft_rx_ctrl); ++ if (ret) ++ return ret; ++ ++ ret = ft_setup_xcontrol_bufs(&ft_tx_ctrl); ++ if (ret) ++ return ret; ++ ++ ret = ft_setup_mr_control(&ft_mr_ctrl); ++ if (ret) ++ return ret; ++ ++ ret = ft_setup_atomic_control(&ft_atom_ctrl); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++int ft_open_control(void) ++{ ++ int ret; ++ ++ ret = ft_open_fabric(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_eq(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_domain(); ++ if (ret) ++ return ret; ++ ++ ret = ft_setup_bufs(); ++ if (ret) ++ return ret; ++ ++ if (test_info.ep_type != FI_EP_MSG) { ++ ret = ft_open_av(); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ep.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ep.c +new file mode 100644 +index 000000000..91610a6ac +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ep.c +@@ -0,0 +1,140 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++ ++//struct fid_stx *stx; ++//struct fid_sep *sep; ++ ++ ++int ft_open_passive(void) ++{ ++ int ret; ++ ++ if (pep) ++ return 0; ++ ++ ret = fi_passive_ep(fabric, fabric_info, &pep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_passive_ep", ret); ++ return ret; ++ } ++ ++ ret = fi_pep_bind(pep, &eq->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_pep_bind", ret); ++ return ret; ++ } ++ ++ ret = fi_listen(pep); ++ if (ret) { ++ FT_PRINTERR("fi_listen", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_open_active(void) ++{ ++ int ret; ++ ++ if (ep) ++ return 0; ++ ++ ret = ft_open_control(); ++ if (ret) ++ return ret; ++ ++ ret = ft_open_comp(); ++ if (ret) ++ return ret; ++ ++ ret = fi_endpoint(domain, fabric_info, &ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ return ret; ++ } ++ ++ ft_rx_ctrl.ep = ep; ++ ft_tx_ctrl.ep = ep; ++ ++ if (test_info.ep_type == FI_EP_MSG) { ++ ret = fi_ep_bind(ep, &eq->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ } ++ ++ ret = ft_bind_comp(ep); ++ if (ret) ++ return ret; ++ ++ if (test_info.ep_type != FI_EP_MSG) { ++ ret = fi_ep_bind(ep, &av->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ return ret; ++ } ++ } ++ ++ ret = fi_enable(ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_reset_ep(void) ++{ ++ int ret; ++ ++ ret = ft_comp_rx(0); ++ if (ret) ++ return ret; ++ ++ while (ft_tx_ctrl.credits < ft_tx_ctrl.max_credits) { ++ ret = ft_comp_tx(0); ++ if (ret) ++ return ret; ++ } ++ ++ memset(ft_tx_ctrl.buf, 0, ft_tx_ctrl.msg_size); ++ memset(ft_rx_ctrl.buf, 0, ft_rx_ctrl.msg_size); ++ ft_tx_ctrl.seqno = 0; ++ ft_rx_ctrl.seqno = 0; ++ ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/fabtest.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/fabtest.h +new file mode 100644 +index 000000000..1ef737a99 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/fabtest.h +@@ -0,0 +1,380 @@ ++/* ++ * Copyright (c) 2015-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _FABTEST_H_ ++#define _FABTEST_H_ ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* Timeouts in milliseconds */ ++#define FT_SREAD_TO 10000 ++#define FT_COMP_TO 10000 ++#define FT_DGRAM_POLL_TO 1 ++ ++extern int listen_sock, sock; ++ ++//extern struct fid_wait *waitset; ++//extern struct fid_poll *pollset; ++//extern struct fid_stx *stx; ++//extern struct fid_sep *sep; ++ ++extern struct ft_info test_info; ++extern struct fi_info *fabric_info; ++ ++extern size_t sm_size_array[]; ++extern size_t med_size_array[]; ++extern size_t lg_size_array[]; ++extern size_t size_array[]; ++extern const unsigned int sm_size_cnt; ++extern const unsigned int med_size_cnt; ++extern const unsigned int lg_size_cnt; ++ ++struct ft_xcontrol { ++ struct fid_ep *ep; ++ void *buf; ++ void *cpy_buf; ++ struct fid_mr *mr; ++ void *memdesc; ++ struct iovec *iov; ++ void **iov_desc; ++ int iov_iter; ++ size_t msg_size; ++ size_t rma_msg_size; ++ size_t credits; ++ size_t max_credits; ++ fi_addr_t addr; ++ uint64_t tag; ++ uint8_t seqno; ++ uint64_t total_comp; ++ enum fi_cq_format cq_format; ++ uint64_t remote_cq_data; ++ struct fi_context *ctx; ++ int curr_ctx; ++}; ++ ++struct ft_atomic_control { ++ void *orig_buf; ++ void *res_buf; ++ struct fid_mr *res_mr; ++ void *res_memdesc; ++ void *comp_buf; ++ struct fid_mr *comp_mr; ++ void *comp_memdesc; ++ struct fi_ioc *ioc; ++ struct fi_ioc *res_ioc; ++ struct fi_ioc *comp_ioc; ++ enum fi_op op; ++ enum fi_datatype datatype; ++ size_t count; ++ size_t datatype_size; ++}; ++ ++struct ft_mr_control { ++ void *buf; ++ struct fid_mr *mr; ++ void *memdesc; ++ uint64_t mr_key; ++ uint64_t peer_mr_addr; ++ uint64_t peer_mr_key; ++}; ++ ++struct ft_control { ++ size_t *size_array; ++ int size_cnt; ++ size_t *iov_array; ++ int iov_cnt; ++ int inc_step; ++ int xfer_iter; ++ int verify_cnt; ++ int error; ++}; ++ ++extern struct ft_xcontrol ft_rx_ctrl, ft_tx_ctrl; ++extern struct ft_mr_control ft_mr_ctrl; ++extern struct ft_control ft_ctrl; ++extern struct ft_atomic_control ft_atom_ctrl; ++ ++enum { ++ FT_MAX_CAPS = 64, ++ FT_MAX_CLASS = 4, ++ FT_MAX_EP_TYPES = 8, ++ FT_MAX_AV_TYPES = 3, ++ FT_MAX_PROV_MODES = 4, ++ FT_MAX_WAIT_OBJ = 5, ++ FT_MAX_MR_MODES = 11, ++ FT_DEFAULT_CREDITS = 128, ++ FT_COMP_BUF_SIZE = 256, ++ FT_MAX_FLAGS = 64, ++ FT_MAX_PROGRESS = 3, ++}; ++ ++enum ft_comp_type { ++ FT_COMP_UNSPEC, ++ FT_COMP_QUEUE, ++ FT_COMP_CNTR, ++ FT_COMP_ALL, ++ FT_MAX_COMP ++}; ++ ++enum ft_test_type { ++ FT_TEST_UNSPEC, ++ FT_TEST_LATENCY, ++ FT_TEST_BANDWIDTH, ++ FT_TEST_UNIT, ++ FT_MAX_TEST ++}; ++ ++enum ft_class_function { ++ FT_FUNC_UNSPEC, ++ FT_FUNC_SEND, ++ FT_FUNC_SENDV, ++ FT_FUNC_SENDMSG, ++ FT_FUNC_INJECT, ++ FT_FUNC_INJECTDATA, ++ FT_FUNC_SENDDATA, ++ FT_FUNC_READ, ++ FT_FUNC_READV, ++ FT_FUNC_READMSG, ++ FT_FUNC_WRITE, ++ FT_FUNC_WRITEV, ++ FT_FUNC_WRITEMSG, ++ FT_FUNC_INJECT_WRITE, ++ FT_FUNC_WRITEDATA, ++ FT_FUNC_INJECT_WRITEDATA, ++ FT_FUNC_ATOMIC, ++ FT_FUNC_ATOMICV, ++ FT_FUNC_ATOMICMSG, ++ FT_FUNC_INJECT_ATOMIC, ++ FT_FUNC_FETCH_ATOMIC, ++ FT_FUNC_FETCH_ATOMICV, ++ FT_FUNC_FETCH_ATOMICMSG, ++ FT_FUNC_COMPARE_ATOMIC, ++ FT_FUNC_COMPARE_ATOMICV, ++ FT_FUNC_COMPARE_ATOMICMSG, ++ FT_MAX_FUNCTIONS ++}; ++ ++#define FT_FLAG_QUICKTEST (1ULL << 0) ++ ++#define is_inject_func(x) (x == FT_FUNC_INJECT || \ ++ x == FT_FUNC_INJECTDATA || \ ++ x == FT_FUNC_INJECT_WRITE || \ ++ x == FT_FUNC_INJECT_WRITEDATA || \ ++ x == FT_FUNC_INJECT_ATOMIC) ++ ++#define is_read_func(x) (x == FT_FUNC_READ || \ ++ x == FT_FUNC_READV || \ ++ x == FT_FUNC_READMSG) ++ ++#define is_fetch_func(x) (x == FT_FUNC_FETCH_ATOMIC || \ ++ x == FT_FUNC_FETCH_ATOMICV || \ ++ x == FT_FUNC_FETCH_ATOMICMSG) ++ ++#define is_compare_func(x) (x == FT_FUNC_COMPARE_ATOMIC || \ ++ x == FT_FUNC_COMPARE_ATOMICV || \ ++ x == FT_FUNC_COMPARE_ATOMICMSG) ++ ++#define is_data_func(x) (x == FT_FUNC_SENDDATA || \ ++ x == FT_FUNC_INJECTDATA || \ ++ x == FT_FUNC_WRITEDATA || \ ++ x == FT_FUNC_INJECT_WRITEDATA) ++ ++#define is_msg_func(x) (x == FT_FUNC_SENDMSG || \ ++ x == FT_FUNC_WRITEMSG || \ ++ x == FT_FUNC_READMSG || \ ++ x == FT_FUNC_ATOMICMSG || \ ++ x == FT_FUNC_FETCH_ATOMICMSG || \ ++ x == FT_FUNC_COMPARE_ATOMICMSG) ++ ++struct ft_set { ++ char node[FI_NAME_MAX]; ++ char service[FI_NAME_MAX]; ++ char prov_name[FI_NAME_MAX]; ++ enum ft_test_type test_type[FT_MAX_TEST]; ++ enum ft_class_function class_function[FT_MAX_FUNCTIONS]; ++ uint64_t msg_flags; ++ enum fi_op op[FI_ATOMIC_OP_LAST]; ++ enum fi_datatype datatype[FI_DATATYPE_LAST]; ++ enum fi_ep_type ep_type[FT_MAX_EP_TYPES]; ++ enum fi_av_type av_type[FT_MAX_AV_TYPES]; ++ enum ft_comp_type comp_type[FT_MAX_COMP]; ++ enum fi_wait_obj eq_wait_obj[FT_MAX_WAIT_OBJ]; ++ enum fi_wait_obj cq_wait_obj[FT_MAX_WAIT_OBJ]; ++ enum fi_wait_obj cntr_wait_obj[FT_MAX_WAIT_OBJ]; ++ enum fi_progress progress[FT_MAX_PROGRESS]; ++ uint64_t mode[FT_MAX_PROV_MODES]; ++ uint64_t test_class[FT_MAX_CLASS]; ++ uint64_t constant_caps[FT_MAX_CAPS]; ++ uint64_t test_flags; ++ uint64_t mr_mode[FT_MAX_MR_MODES]; ++ uint64_t rx_cq_bind_flags[FT_MAX_FLAGS]; ++ uint64_t tx_cq_bind_flags[FT_MAX_FLAGS]; ++ uint64_t rx_op_flags[FT_MAX_FLAGS]; ++ uint64_t tx_op_flags[FT_MAX_FLAGS]; ++}; ++ ++struct ft_series { ++ struct ft_set *sets; ++ int nsets; ++ int test_count; ++ int test_index; ++ int cur_set; ++ int cur_type; ++ int cur_func; ++ int cur_op; ++ int cur_datatype; ++ int cur_ep; ++ int cur_av; ++ int cur_comp; ++ int cur_eq_wait_obj; ++ int cur_cq_wait_obj; ++ int cur_cntr_wait_obj; ++ int cur_mode; ++ int cur_class; ++ int cur_progress; ++}; ++ ++struct ft_info { ++ enum ft_test_type test_type; ++ int test_index; ++ int test_subindex; ++ enum ft_class_function class_function; ++ uint64_t msg_flags; ++ enum fi_op op; ++ enum fi_datatype datatype; ++ uint64_t test_flags; ++ uint64_t test_class; ++ uint64_t caps; ++ uint64_t mode; ++ uint64_t mr_mode; ++ enum fi_av_type av_type; ++ enum fi_ep_type ep_type; ++ enum ft_comp_type comp_type; ++ enum fi_wait_obj eq_wait_obj; ++ enum fi_wait_obj cq_wait_obj; ++ enum fi_wait_obj cntr_wait_obj; ++ enum fi_progress progress; ++ uint32_t protocol; ++ uint32_t protocol_version; ++ char node[FI_NAME_MAX]; ++ char service[FI_NAME_MAX]; ++ char prov_name[FI_NAME_MAX]; ++ char fabric_name[FI_NAME_MAX]; ++ uint64_t rx_cq_bind_flags; ++ uint64_t tx_cq_bind_flags; ++ uint64_t rx_op_flags; ++ uint64_t tx_op_flags; ++}; ++ ++ ++struct ft_series * fts_load(char *filename); ++void fts_close(struct ft_series *series); ++void fts_start(struct ft_series *series, int index); ++void fts_next(struct ft_series *series); ++int fts_end(struct ft_series *series, int index); ++void fts_cur_info(struct ft_series *series, struct ft_info *info); ++int fts_info_is_valid(void); ++ ++ ++struct ft_msg { ++ uint32_t len; ++ uint8_t data[124]; ++}; ++ ++int ft_fw_send(int fd, void *msg, size_t len); ++int ft_fw_recv(int fd, void *msg, size_t len); ++ ++ ++int ft_open_control(); ++ssize_t ft_get_event(uint32_t *event, void *buf, size_t len, ++ uint32_t event_check, size_t len_check); ++int ft_open_comp(); ++int ft_bind_comp(struct fid_ep *ep); ++int ft_comp_rx(int timeout); ++int ft_comp_tx(int timeout); ++int ft_use_comp_cntr(enum ft_comp_type comp_type); ++int ft_use_comp_cq(enum ft_comp_type comp_type); ++ ++int ft_open_active(); ++int ft_open_passive(); ++int ft_enable_comm(); ++int ft_post_recv_bufs(); ++void ft_format_iov(struct iovec *iov, size_t cnt, char *buf, size_t len); ++void ft_format_iocs(struct iovec *iov, size_t *iov_count); ++void ft_next_iov_cnt(struct ft_xcontrol *ctrl, size_t max_iov_cnt); ++int ft_get_ctx(struct ft_xcontrol *ctrl, struct fi_context **ctx); ++int ft_generates_rx_comp(); ++int ft_generates_tx_comp(); ++int ft_check_rx_completion(); ++int ft_check_tx_completion(); ++ ++int ft_send_sync_msg(); ++int ft_recv_n_msg(); ++int ft_recv_msg(); ++int ft_send_msg(); ++int ft_send_dgram(); ++int ft_send_dgram_done(); ++int ft_recv_dgram(); ++int ft_recv_dgram_flood(size_t *recv_cnt); ++int ft_send_dgram_flood(); ++int ft_sendrecv_dgram(); ++int ft_send_rma(); ++ ++void ft_cleanup(void); ++int ft_open_res(); ++int ft_init_test(); ++int ft_run_test(); ++int ft_reset_ep(); ++void ft_record_error(int error); ++ ++int ft_verify_bufs(); ++int ft_sync_fill_bufs(size_t size); ++void ft_verify_comp(void *buf); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _FABTEST_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.c +new file mode 100644 +index 000000000..075d722c1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.c +@@ -0,0 +1,373 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "ofi_atomic.h" ++ ++#ifndef UNREFERENCED_PARAMETER ++#define OFI_UNUSED(var) (void)var ++#else ++#define OFI_UNUSED UNREFERENCED_PARAMETER ++#endif ++ ++/* ++ * Basic atomic operations ++ */ ++ ++#define OFI_OP_MIN(type,dst,src) if ((dst) > (src)) (dst) = (src) ++#define OFI_OP_MAX(type,dst,src) if ((dst) < (src)) (dst) = (src) ++#define OFI_OP_SUM(type,dst,src) (dst) += (src) ++#define OFI_OP_PROD(type,dst,src) (dst) *= (src) ++#define OFI_OP_LOR(type,dst,src) (dst) = (dst) || (src) ++#define OFI_OP_LAND(type,dst,src) (dst) = (dst) && (src) ++#define OFI_OP_BOR(type,dst,src) (dst) |= (src) ++#define OFI_OP_BAND(type,dst,src) (dst) &= (src) ++#define OFI_OP_LXOR(type,dst,src) (dst) = ((dst) && !(src)) || (!(dst) && (src)) ++#define OFI_OP_BXOR(type,dst,src) (dst) ^= (src) ++#define OFI_OP_READ(type,dst,src) /* src unused, dst is written to result */ ++#define OFI_OP_WRITE(type,dst,src) (dst) = (src) ++ ++#define OFI_OP_CSWAP_EQ(type,dst,src,cmp) if ((dst) == (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_NE(type,dst,src,cmp) if ((dst) != (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_LE(type,dst,src,cmp) if ((dst) <= (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_LT(type,dst,src,cmp) if ((dst) < (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_GE(type,dst,src,cmp) if ((dst) >= (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_GT(type,dst,src,cmp) if ((dst) > (cmp)) (dst) = (src) ++#define OFI_OP_MSWAP(type,dst,src,cmp) (dst) = (((src) & (cmp)) | \ ++ ((dst) & ~(cmp))) ++ ++/* Need special handlers for complex datatypes for portability */ ++#define OFI_OP_SUM_COMPLEX(type,dst,src) (dst) = ofi_complex_sum_##type(dst,src) ++#define OFI_OP_PROD_COMPLEX(type,dst,src) (dst) = ofi_complex_prod_##type(dst,src) ++#define OFI_OP_LOR_COMPLEX(type,dst,src) (dst) = ofi_complex_lor_##type(dst,src) ++#define OFI_OP_LAND_COMPLEX(type,dst,src) (dst) = ofi_complex_land_##type(dst,src) ++#define OFI_OP_LXOR_COMPLEX(type,dst,src) (dst) = ofi_complex_lxor_##type(dst,src) ++#define OFI_OP_READ_COMPLEX OFI_OP_READ ++#define OFI_OP_WRITE_COMPLEX OFI_OP_WRITE ++ ++#define OFI_OP_CSWAP_EQ_COMPLEX(type,dst,src,cmp) \ ++ if (ofi_complex_eq_##type(dst,cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_NE_COMPLEX(type,dst,src,cmp) \ ++ if (!ofi_complex_eq_##type(dst,cmp)) (dst) = (src) ++ ++ ++/******************************** ++ * ATOMIC TYPE function templates ++ ********************************/ ++ ++#define OFI_DEF_NOOP_NAME NULL, ++#define OFI_DEF_NOOP_FUNC ++ ++/* ++ * WRITE ++ */ ++#define OFI_DEF_WRITE_NAME(op, type) ofi_write_## op ##_## type, ++#define OFI_DEF_WRITE_COMPLEX_NAME(op, type) ofi_write_## op ##_## type, ++ ++#define OFI_DEF_WRITE_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ for (i = 0; i < cnt; i++) \ ++ op(type, d[i], s[i]); \ ++ } ++ ++#define OFI_DEF_WRITE_COMPLEX_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ const ofi_complex_##type *s = (src); \ ++ for (i = 0; i < cnt; i++) \ ++ op(type, d[i], s[i]); \ ++ } ++ ++/* ++ * READ (fetch) ++ */ ++#define OFI_DEF_READ_NAME(op, type) ofi_read_## op ##_## type, ++#define OFI_DEF_READ_COMPLEX_NAME(op, type) ofi_read_## op ##_## type, ++ ++#define OFI_DEF_READ_FUNC(op, type) \ ++ static void ofi_read_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ type *r = (res); \ ++ OFI_UNUSED(src); \ ++ for (i = 0; i < cnt; i++) \ ++ r[i] = d[i]; \ ++ } ++ ++#define OFI_DEF_READ_COMPLEX_FUNC(op, type) \ ++ static void ofi_read_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ ofi_complex_##type *r = (res); \ ++ OFI_UNUSED(src); \ ++ for (i = 0; i < cnt; i++) \ ++ r[i] = d[i]; \ ++ } ++ ++/* ++ * READWRITE (fetch-write) ++ */ ++#define OFI_DEF_READWRITE_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, ++ ++#define OFI_DEF_READWRITE_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ type *r = (res); \ ++ for (i = 0; i < cnt; i++) { \ ++ r[i] = d[i]; \ ++ op(type, d[i], s[i]); \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITE_COMPLEX_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ const ofi_complex_##type *s = (src); \ ++ ofi_complex_##type *r = (res); \ ++ for (i = 0; i < cnt; i++) { \ ++ r[i] = d[i]; \ ++ op(type, d[i], s[i]); \ ++ } \ ++ } ++ ++/* ++ * CSWAP ++ */ ++#define OFI_DEF_CSWAP_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAP_COMPLEX_NAME(op, type) ofi_cswap_## op ##_## type, ++ ++#define OFI_DEF_CSWAP_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ const type *c = (cmp); \ ++ type *r = (res); \ ++ for (i = 0; i < cnt; i++) { \ ++ r[i] = d[i]; \ ++ op(type, d[i], s[i], c[i]); \ ++ } \ ++ } ++ ++#define OFI_DEF_CSWAP_COMPLEX_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ const ofi_complex_##type *s = (src); \ ++ const ofi_complex_##type *c = (cmp); \ ++ ofi_complex_##type *r = (res); \ ++ for (i = 0; i < cnt; i++) { \ ++ r[i] = d[i]; \ ++ op(type, d[i], s[i], c[i]); \ ++ } \ ++ } ++ ++ ++/********************************************************************* ++ * Macros create atomic functions for each operation for each datatype ++ *********************************************************************/ ++ ++/* ++ * Define all handlers in order to populate the dispatch table correctly. ++ * ++ * ATOMICTYPE - WRITE, READ, READWRITE, CSWAP, MSWAP ++ * FUNCNAME - Define function or simply generate function name ++ * The latter is needed to populate the dispatch table ++ * op - OFI_OP_XXX function should perform (e.g. OFI_OP_MIN) ++ */ ++#define OFI_DEFINE_ALL_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, float) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, double)\ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, long_double) ++ ++#define OFI_DEFINE_REALNO_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ ++ OFI_DEF_NOOP_##FUNCNAME ++ ++#define OFI_DEFINE_INT_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME ++ ++ ++/********************** ++ * Write dispatch table ++ **********************/ ++ ++OFI_DEFINE_REALNO_HANDLERS(WRITE, FUNC, OFI_OP_MIN) ++OFI_DEFINE_REALNO_HANDLERS(WRITE, FUNC, OFI_OP_MAX) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_SUM) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_PROD) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_LOR) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_LAND) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BOR) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BAND) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_LXOR) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BXOR) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_WRITE) ++ ++void (*ofi_atomic_write_handlers[OFI_WRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, size_t cnt) = ++{ ++ { OFI_DEFINE_REALNO_HANDLERS(WRITE, NAME, OFI_OP_MIN) }, ++ { OFI_DEFINE_REALNO_HANDLERS(WRITE, NAME, OFI_OP_MAX) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_SUM) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_PROD) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_LOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_LAND) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BOR) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BAND) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_LXOR) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BXOR) }, ++ /* no-op: FI_ATOMIC_READ */ ++ { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_WRITE) }, ++}; ++ ++ ++/*************************** ++ * Read-write dispatch table ++ ***************************/ ++ ++OFI_DEFINE_REALNO_HANDLERS(READWRITE, FUNC, OFI_OP_MIN) ++OFI_DEFINE_REALNO_HANDLERS(READWRITE, FUNC, OFI_OP_MAX) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_SUM) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_PROD) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_LOR) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_LAND) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BOR) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BAND) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_LXOR) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BXOR) ++OFI_DEFINE_ALL_HANDLERS(READ, FUNC, OFI_OP_READ) ++OFI_DEFINE_ALL_HANDLERS(READWRITE, FUNC, OFI_OP_WRITE) ++ ++void (*ofi_atomic_readwrite_handlers[OFI_READWRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, void *res, size_t cnt) = ++{ ++ { OFI_DEFINE_REALNO_HANDLERS(READWRITE, NAME, OFI_OP_MIN) }, ++ { OFI_DEFINE_REALNO_HANDLERS(READWRITE, NAME, OFI_OP_MAX) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_SUM) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_PROD) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_LOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_LAND) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BOR) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BAND) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_LXOR) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BXOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(READ, NAME, OFI_OP_READ) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_WRITE) }, ++}; ++ ++ ++/***************************** ++ * Compare-swap dispatch table ++ *****************************/ ++ ++OFI_DEFINE_ALL_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_EQ) ++OFI_DEFINE_ALL_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_NE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_LE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_LT) ++OFI_DEFINE_REALNO_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_GE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_GT) ++OFI_DEFINE_INT_HANDLERS(CSWAP, FUNC, OFI_OP_MSWAP) ++ ++void (*ofi_atomic_swap_handlers[OFI_SWAP_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, const void *cmp, void *res, size_t cnt) = ++{ ++ { OFI_DEFINE_ALL_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_EQ) }, ++ { OFI_DEFINE_ALL_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_NE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_LE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_LT) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_GE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_GT) }, ++ { OFI_DEFINE_INT_HANDLERS(CSWAP, NAME, OFI_OP_MSWAP) }, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.h b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.h +new file mode 100644 +index 000000000..98966e238 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/ofi_atomic.h +@@ -0,0 +1,100 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistibutions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _OFI_ATOMIC_H_ ++#define _OFI_ATOMIC_H_ ++ ++#include "fabtest.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++typedef long double long_double; ++typedef float complex ofi_complex_float; ++typedef double complex ofi_complex_double; ++typedef long double complex ofi_complex_long_double; ++ ++#define OFI_WRITE_OP_LAST FI_CSWAP ++#define OFI_READWRITE_OP_LAST FI_CSWAP ++#define OFI_SWAP_OP_START FI_CSWAP ++#define OFI_SWAP_OP_LAST (FI_MSWAP - FI_CSWAP + 1) ++ ++extern void (*ofi_atomic_write_handlers[OFI_WRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, size_t cnt); ++extern void (*ofi_atomic_readwrite_handlers[OFI_READWRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, void *res, size_t cnt); ++extern void (*ofi_atomic_swap_handlers[OFI_SWAP_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, const void *cmp, ++ void *res, size_t cnt); ++ ++#define OFI_DEF_COMPLEX_OPS(type) \ ++static inline int ofi_complex_eq_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a == b; \ ++} \ ++static inline ofi_complex_## type ofi_complex_sum_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a + b; \ ++} \ ++static inline ofi_complex_## type ofi_complex_prod_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a * b; \ ++} \ ++static inline ofi_complex_## type ofi_complex_land_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a && b; \ ++} \ ++static inline ofi_complex_## type ofi_complex_lor_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return a || b; \ ++} \ ++static inline int ofi_complex_lxor_## type \ ++ (ofi_complex_## type a, ofi_complex_## type b) \ ++{ \ ++ return (a && !b) || (!a && b); \ ++} \ ++ ++OFI_DEF_COMPLEX_OPS(float) ++OFI_DEF_COMPLEX_OPS(double) ++OFI_DEF_COMPLEX_OPS(long_double) ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _OFI_ATOMIC_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/test_ctrl.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/test_ctrl.c +new file mode 100644 +index 000000000..2d2388db3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/test_ctrl.c +@@ -0,0 +1,1110 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "fabtest.h" ++ ++void ft_record_error(int error) ++{ ++ if (!ft_ctrl.error) { ++ fprintf(stderr, "ERROR [%s], continuing with test", ++ fi_strerror(error)); ++ ft_ctrl.error = error; ++ } ++} ++ ++static int ft_init_xcontrol(struct ft_xcontrol *ctrl) ++{ ++ memset(ctrl, 0, sizeof *ctrl); ++ ctrl->credits = FT_DEFAULT_CREDITS; ++ ctrl->max_credits = FT_DEFAULT_CREDITS; ++ ++ ctrl->iov = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], sizeof *ctrl->iov); ++ ctrl->iov_desc = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], ++ sizeof *ctrl->iov_desc); ++ ctrl->ctx = calloc(ctrl->max_credits, sizeof *ctrl->ctx); ++ if (!ctrl->iov || !ctrl->iov_desc || !ctrl->ctx) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int ft_init_rx_control(void) ++{ ++ int ret; ++ ++ ret = ft_init_xcontrol(&ft_rx_ctrl); ++ if (ret) ++ return ret; ++ ++ ft_rx_ctrl.cq_format = FI_CQ_FORMAT_DATA; ++ ft_rx_ctrl.addr = FI_ADDR_UNSPEC; ++ ++ ft_rx_ctrl.msg_size = med_size_array[med_size_cnt - 1]; ++ if (fabric_info && fabric_info->ep_attr && ++ fabric_info->ep_attr->max_msg_size && ++ fabric_info->ep_attr->max_msg_size < ft_rx_ctrl.msg_size) ++ ft_rx_ctrl.msg_size = fabric_info->ep_attr->max_msg_size; ++ ++ return 0; ++} ++ ++static int ft_init_tx_control(void) ++{ ++ int ret; ++ ++ ret = ft_init_xcontrol(&ft_tx_ctrl); ++ if (ret) ++ return ret; ++ ++ ft_tx_ctrl.cq_format = FI_CQ_FORMAT_CONTEXT; ++ ft_tx_ctrl.remote_cq_data = ft_init_cq_data(fabric_info); ++ return 0; ++} ++ ++static int ft_init_atomic_control(struct ft_atomic_control *ctrl) ++{ ++ memset(ctrl, 0, sizeof *ctrl); ++ ctrl->op = test_info.op; ++ ++ ctrl->ioc = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], sizeof *ctrl->ioc); ++ ctrl->res_ioc = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], ++ sizeof *ctrl->res_ioc); ++ ctrl->comp_ioc = calloc(ft_ctrl.iov_array[ft_ctrl.iov_cnt - 1], ++ sizeof *ctrl->comp_ioc); ++ ++ if (!ctrl->ioc || !ctrl->res_ioc || !ctrl->comp_ioc) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int ft_init_control(void) ++{ ++ int ret; ++ ++ memset(&ft_ctrl, 0, sizeof ft_ctrl); ++ ft_ctrl.xfer_iter = FT_DEFAULT_CREDITS; ++ ft_ctrl.inc_step = test_info.test_flags & FT_FLAG_QUICKTEST ? 4 : 1; ++ ++ ft_ctrl.iov_array = sm_size_array; ++ ft_ctrl.iov_cnt = sm_size_cnt; ++ ++ if (test_info.test_class & FI_RMA) { ++ ft_ctrl.size_array = lg_size_array; ++ ft_ctrl.size_cnt = lg_size_cnt; ++ } else { ++ ft_ctrl.size_array = med_size_array; ++ ft_ctrl.size_cnt = med_size_cnt; ++ } ++ ++ ret = ft_init_rx_control(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_tx_control(); ++ if (ret) ++ return ret; ++ ++ ret = ft_init_atomic_control(&ft_atom_ctrl); ++ return ret; ++} ++ ++static void ft_cleanup_xcontrol(struct ft_xcontrol *ctrl) ++{ ++ free(ctrl->buf); ++ free(ctrl->iov); ++ free(ctrl->iov_desc); ++ free(ctrl->ctx); ++ memset(ctrl, 0, sizeof *ctrl); ++} ++ ++static void ft_cleanup_atomic_control(struct ft_atomic_control *ctrl) ++{ ++ free(ctrl->res_buf); ++ free(ctrl->comp_buf); ++ free(ctrl->ioc); ++ free(ctrl->res_ioc); ++ free(ctrl->comp_ioc); ++ free(ctrl->orig_buf); ++ memset(ctrl, 0, sizeof *ctrl); ++} ++ ++static void ft_cleanup_mr_control(struct ft_mr_control *ctrl) ++{ ++ free(ctrl->buf); ++ memset(ctrl, 0, sizeof *ctrl); ++} ++ ++static void ft_format_iov_distributed(struct iovec *iov, size_t cnt, char *buf, ++ size_t len) ++{ ++ size_t offset; ++ int i; ++ ++ for (i = 0, offset = 0; i < cnt - 1; i++) { ++ iov[i].iov_base = buf + offset; ++ iov[i].iov_len = len / cnt; ++ offset += iov[i].iov_len; ++ } ++ iov[i].iov_base = buf + offset; ++ iov[i].iov_len = len - offset; ++} ++ ++/* One class of bugs is issues involving IOV length handling. The regular ++ * ft_format_iov does not catch this class because it evenly partitions the ++ * entries. Instead partition them proportional to their position in the iovec. ++ */ ++static void _ft_format_iov_weighted(struct iovec *iov, size_t cnt, char *buf, ++ size_t len, int reversed) ++{ ++ double total_parts; ++ double portion; ++ size_t offset; ++ size_t weight; ++ size_t size; ++ size_t i; ++ ++ /* Get the sum of the element positions in the list and calculate the ++ * base weight. ++ */ ++ total_parts = ((cnt + 1.0) * cnt) / 2.0; ++ portion = len / total_parts; ++ ++ for (offset = 0, i = 0; i < cnt; i++) { ++ if (reversed) ++ weight = cnt - i; ++ else ++ weight = i + 1; ++ ++ /* Get the weight for this iovec entry and round it to the ++ * nearest integer. ++ */ ++ size = (portion * weight) + .5; ++ ++ iov[i].iov_base = buf + offset; ++ iov[i].iov_len = size; ++ ++ offset += size; ++ } ++} ++ ++static void ft_format_iov_weighted(struct iovec *iov, size_t cnt, char *buf, ++ size_t len) ++{ ++ _ft_format_iov_weighted(iov, cnt, buf, len, 0); ++} ++ ++static void ft_format_iov_reversed(struct iovec *iov, size_t cnt, char *buf, ++ size_t len) ++{ ++ _ft_format_iov_weighted(iov, cnt, buf, len, 1); ++} ++ ++static void ft_format_iov_random(struct iovec *iov, size_t cnt, char *buf, ++ size_t len) ++{ ++ size_t offset; ++ size_t weight; ++ size_t i; ++ ++ offset = 0; ++ for (i = 0; i < cnt; i++) { ++ /* If last IOV then use remaining data. */ ++ if (i == (cnt - 1)) { ++ weight = len; ++ } else { ++ /* Get a weight between 1 and the remaining length minus ++ * the remaining IOV count. This is so we can reserve at ++ * least a length of 1 for every IOV. ++ */ ++ weight = (rand() % (len - (cnt - i) + 1)) + 1; ++ } ++ ++ len -= weight; ++ ++ iov[i].iov_base = buf + offset; ++ iov[i].iov_len = weight; ++ ++ offset += weight; ++ } ++} ++ ++void ft_format_iov(struct iovec *iov, size_t cnt, char *buf, size_t len) ++{ ++ typedef void (*iov_formatter)(struct iovec *iov, size_t cnt, char *buf, ++ size_t len); ++ size_t choice; ++ ++ static iov_formatter options[] = { ++ ft_format_iov_distributed, ++ ft_format_iov_weighted, ++ ft_format_iov_reversed, ++ ft_format_iov_random ++ }; ++ ++ choice = rand() % ARRAY_SIZE(options); ++ ++ options[choice](iov, cnt, buf, len); ++} ++ ++static void ft_iov_to_ioc(struct iovec *iov, struct fi_ioc *ioc, size_t cnt, ++ enum fi_datatype datatype, char *buf) ++{ ++ int i; ++ size_t offset = 0; ++ for (i = 0; i < cnt; i++) { ++ ioc[i].count = iov[i].iov_len; ++ ioc[i].addr = buf + offset; ++ offset += ioc[i].count * ft_atom_ctrl.datatype_size; ++ } ++} ++ ++void ft_format_iocs(struct iovec *iov, size_t *iov_count) ++{ ++ while(ft_ctrl.iov_array[ft_tx_ctrl.iov_iter] > ft_atom_ctrl.count) ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ ++ *iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ ft_format_iov(iov, *iov_count, ft_tx_ctrl.buf, ft_atom_ctrl.count); ++ ft_iov_to_ioc(iov, ft_atom_ctrl.ioc, *iov_count, ++ ft_atom_ctrl.datatype, ft_tx_ctrl.buf); ++ ft_iov_to_ioc(iov, ft_atom_ctrl.res_ioc, *iov_count, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.res_buf); ++ ft_iov_to_ioc(iov, ft_atom_ctrl.comp_ioc, *iov_count, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.comp_buf); ++} ++ ++void ft_next_iov_cnt(struct ft_xcontrol *ctrl, size_t max_iov_cnt) ++{ ++ ctrl->iov_iter++; ++ if (ctrl->iov_iter > ft_ctrl.iov_cnt || ++ ft_ctrl.iov_array[ctrl->iov_iter] > max_iov_cnt) ++ ctrl->iov_iter = 0; ++} ++ ++int ft_get_ctx(struct ft_xcontrol *ctrl, struct fi_context **ctx) ++{ ++ int ret; ++ ++ ctrl->curr_ctx++; ++ if (ctrl->curr_ctx >= ctrl->max_credits) { ++ if (ctrl == &ft_tx_ctrl) { ++ while (ctrl->credits < ctrl->max_credits) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ } ++ ctrl->curr_ctx = 0; ++ } ++ *ctx = &(ctrl->ctx[ctrl->curr_ctx]); ++ return 0; ++} ++ ++static int check_atomic(size_t *count) ++{ ++ int ret; ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_ATOMIC: ++ case FT_FUNC_ATOMICV: ++ case FT_FUNC_ATOMICMSG: ++ case FT_FUNC_INJECT_ATOMIC: ++ ret = check_base_atomic_op(ft_tx_ctrl.ep, ft_atom_ctrl.op, ++ ft_atom_ctrl.datatype, count); ++ break; ++ case FT_FUNC_FETCH_ATOMIC: ++ case FT_FUNC_FETCH_ATOMICV: ++ case FT_FUNC_FETCH_ATOMICMSG: ++ ret = check_fetch_atomic_op(ft_tx_ctrl.ep, ft_atom_ctrl.op, ++ ft_atom_ctrl.datatype, count); ++ break; ++ case FT_FUNC_COMPARE_ATOMIC: ++ case FT_FUNC_COMPARE_ATOMICV: ++ default: ++ ret = check_compare_atomic_op(ft_tx_ctrl.ep, ft_atom_ctrl.op, ++ ft_atom_ctrl.datatype, count); ++ } ++ ++ ft_atom_ctrl.datatype_size = datatype_to_size(ft_atom_ctrl.datatype); ++ ++ return ret; ++} ++ ++static int ft_sync_test(int value) ++{ ++ int ret; ++ ++ ret = ft_reset_ep(); ++ if (ret) ++ return ret; ++ ++ return ft_sock_sync(value); ++} ++ ++static int ft_sync_manual() ++{ ++ int ret, value = 0, result = -FI_EOTHER; ++ ++ if (listen_sock < 0) { ++ ret = send(sock, &value, sizeof(value), 0); ++ if (ret != sizeof(value)) ++ return -FI_EOTHER; ++ ++ do { ++ ret = recv(sock, &result, sizeof(result), MSG_DONTWAIT); ++ if (ret == sizeof(result)) ++ break; ++ ++ ret = ft_comp_rx(0); ++ if (ret) ++ return ret; ++ } while (1); ++ } else { ++ do { ++ ret = recv(sock, &result, sizeof(result), MSG_DONTWAIT); ++ if (ret == sizeof(result)) ++ break; ++ ++ ret = ft_comp_rx(0); ++ if (ret) ++ return ret; ++ } while (1); ++ ++ ret = send(sock, &value, sizeof(value), 0); ++ if (ret != sizeof(value)) ++ return -FI_EOTHER; ++ } ++ return 0; ++} ++ ++static int ft_sync_progress(int value) ++{ ++ if (test_info.progress == FI_PROGRESS_MANUAL) ++ return ft_sync_manual(); ++ return ft_sock_sync(value); ++} ++ ++static int ft_sync_msg_needed(void) ++{ ++ return ft_check_rx_completion() ? 0 : ft_send_sync_msg(); ++} ++ ++static int ft_check_verify_cnt() ++{ ++ if (test_info.msg_flags == FI_REMOTE_CQ_DATA && ++ ft_ctrl.verify_cnt != ft_ctrl.xfer_iter) ++ return -FI_EIO; ++ return 0; ++} ++ ++static int ft_pingpong_rma(void) ++{ ++ int ret = 0, i; ++ size_t count; ++ ++ if (test_info.test_class & FI_ATOMIC) { ++ ret = check_atomic(&count); ++ ++ ft_atom_ctrl.count = ft_tx_ctrl.rma_msg_size / ft_atom_ctrl.datatype_size; ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP || ++ ft_atom_ctrl.count > count || ft_atom_ctrl.count == 0) { ++ return 0; ++ } ++ if (ret) ++ return ret; ++ } ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ } ++ } ++ return ret; ++} ++ ++static int ft_pingpong(void) ++{ ++ int ret, i; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) ++ return ft_pingpong_rma(); ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_send_msg(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_msg(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int ft_pingpong_dgram(void) ++{ ++ int ret, i; ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_sendrecv_dgram(); ++ if (ret) ++ return ret; ++ } ++ } else { ++ for (i = 0; i < 1000; i++) { ++ ret = ft_recv_dgram(); ++ if (!ret) ++ break; ++ else if (ret != -FI_ETIMEDOUT) ++ return ret; ++ } ++ ++ for (i = 0; i < ft_ctrl.xfer_iter - 1; i++) { ++ ret = ft_sendrecv_dgram(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_send_dgram(); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int ft_run_latency(void) ++{ ++ int ret, i; ++ ++ for (i = 0; i < ft_ctrl.size_cnt; i += ft_ctrl.inc_step) { ++ if (ft_ctrl.size_array[i] > fabric_info->ep_attr->max_msg_size) ++ break; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[0]; ++ ft_tx_ctrl.rma_msg_size = ft_ctrl.size_array[i]; ++ } else { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[i]; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ (ft_ctrl.size_array[i] > fabric_info->tx_attr->inject_size)) ++ break; ++ ++ ft_ctrl.xfer_iter = test_info.test_flags & FT_FLAG_QUICKTEST ? ++ 5 : size_to_count(ft_ctrl.size_array[i]); ++ ++ ret = ft_sync_test(0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ ++ clock_gettime(CLOCK_MONOTONIC, &start); ++ ret = (test_info.ep_type == FI_EP_DGRAM) ? ++ ft_pingpong_dgram() : ft_pingpong(); ++ clock_gettime(CLOCK_MONOTONIC, &end); ++ if (ret) { ++ FT_PRINTERR("latency test failed!", ret); ++ return ret; ++ } ++ ++ ret = ft_sync_progress(0); ++ if (ret) ++ return ret; ++ ++ show_perf("lat", ft_ctrl.size_array[i], ft_ctrl.xfer_iter, &start, &end, 2); ++ } ++ ++ return 0; ++} ++ ++static int ft_bw_rma(void) ++{ ++ int ret, i; ++ size_t count; ++ ++ if (test_info.test_class & FI_ATOMIC) { ++ ret = check_atomic(&count); ++ ++ ft_atom_ctrl.count = ft_tx_ctrl.rma_msg_size / ft_atom_ctrl.datatype_size; ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP || ++ ft_atom_ctrl.count > count || ft_atom_ctrl.count == 0) { ++ return 0; ++ } ++ if (ret) ++ return ret; ++ } ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ } ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ } else { ++ ret = ft_recv_n_msg(ft_check_rx_completion() ? ++ ft_ctrl.xfer_iter : 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_sync_msg(); ++ if (ret) ++ return ret; ++ } ++ return 0; ++} ++ ++static int ft_bw(void) ++{ ++ int ret, i; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) ++ return ft_bw_rma(); ++ ++ if (listen_sock < 0) { ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ret = ft_send_msg(); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ } else { ++ ret = ft_recv_n_msg(ft_check_rx_completion() ? ++ ft_ctrl.xfer_iter : 1); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_sync_msg(); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++/* ++ * The datagram streaming test sends datagrams with the initial byte ++ * of the message cleared until we're ready to end the test. The first ++ * byte is then set to 0xFF. On the receive side, we count the number ++ * of completions until that message is seen. Only the receiving side ++ * reports any performance data. The sender does not know how many ++ * packets were dropped in flight. ++ * ++ * Because we re-use the same buffer for all messages, the receiving ++ * side can notice that the first byte has changed and end the test ++ * before the completion associated with the last message has been ++ * written to the CQ. As a result, the number of messages that were ++ * counted as received may be slightly lower than the number of messages ++ * that were actually received. ++ * ++ * For a significantly large number of transfers, this falls into the ++ * noise, but it is visible if the number of iterations is small, such ++ * as when running the quick test. The fix for this would either to use ++ * CQ data to exchange the end of test marker, or to allocate separate ++ * buffers for each receive operation. ++ * ++ * The message with the end of test marker is retried until until the ++ * receiver acknowledges it. If the receiver ack message is lost, the ++ * bandwidth test will hang. However, this is the only message that the ++ * receiver sends, so there's a reasonably good chance of it being transmitted ++ * successfully. ++ */ ++static int ft_bw_dgram(size_t *recv_cnt) ++{ ++ int ret; ++ ++ if (listen_sock < 0) { ++ *recv_cnt = 0; ++ ret = ft_send_dgram_flood(); ++ if (ret) ++ return ret; ++ ++ ft_tx_ctrl.seqno = ~0; ++ ret = ft_sendrecv_dgram(); ++ } else { ++ ret = ft_recv_dgram_flood(recv_cnt); ++ if (ret) ++ return ret; ++ ++ ret = ft_send_dgram(); ++ } ++ ++ return ret; ++} ++ ++static int ft_run_bandwidth(void) ++{ ++ size_t recv_cnt; ++ int ret, i; ++ ++ for (i = 0; i < ft_ctrl.size_cnt; i += ft_ctrl.inc_step) { ++ if (ft_ctrl.size_array[i] > fabric_info->ep_attr->max_msg_size) ++ break; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[0]; ++ ft_tx_ctrl.rma_msg_size = ft_ctrl.size_array[i]; ++ } else { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[i]; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ (ft_ctrl.size_array[i] > fabric_info->tx_attr->inject_size)) ++ break; ++ ++ ft_ctrl.xfer_iter = test_info.test_flags & FT_FLAG_QUICKTEST ? ++ 5 : size_to_count(ft_ctrl.size_array[i]); ++ recv_cnt = ft_ctrl.xfer_iter; ++ ++ ret = ft_sync_test(0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ ++ clock_gettime(CLOCK_MONOTONIC, &start); ++ ret = (test_info.ep_type == FI_EP_DGRAM) ? ++ ft_bw_dgram(&recv_cnt) : ft_bw(); ++ clock_gettime(CLOCK_MONOTONIC, &end); ++ if (ret) { ++ FT_PRINTERR("bw test failed!", ret); ++ return ret; ++ } ++ ++ ret = ft_sync_progress(0); ++ if (ret) ++ return ret; ++ ++ show_perf("bw", ft_ctrl.size_array[i], recv_cnt, &start, &end, 1); ++ } ++ ++ return 0; ++} ++ ++static int ft_unit_rma(void) ++{ ++ int ret, i, fail = 0; ++ ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ft_sync_fill_bufs(ft_tx_ctrl.rma_msg_size); ++ ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ ++ if (!is_inject_func(test_info.class_function)) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_verify_bufs(); ++ if (ret) ++ fail = -FI_EIO; ++ } ++ ++ ret = ft_check_verify_cnt(); ++ if (ret) ++ return ret; ++ ++ return fail; ++} ++ ++static int ft_unit_atomic(void) ++{ ++ int ret, i, fail = 0; ++ size_t count; ++ ++ ret = check_atomic(&count); ++ ++ ft_atom_ctrl.count = ft_tx_ctrl.rma_msg_size / ft_atom_ctrl.datatype_size; ++ if (ret == -FI_ENOSYS || ret == -FI_EOPNOTSUPP || ++ ft_atom_ctrl.count > count || ft_atom_ctrl.count == 0) { ++ return 0; ++ } ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ft_sync_fill_bufs(ft_tx_ctrl.rma_msg_size); ++ ++ ret = ft_send_rma(); ++ if (ret) ++ return ret; ++ ++ if (!is_inject_func(test_info.class_function)) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_verify_bufs(); ++ if (ret) ++ fail = -FI_EIO; ++ } ++ ++ ret = ft_check_verify_cnt(); ++ if (ret) ++ return ret; ++ return fail; ++} ++ ++static int ft_unit(void) ++{ ++ int ret, i, fail = 0; ++ ++ ft_ctrl.verify_cnt = 0; ++ if (test_info.test_class & FI_RMA) ++ return ft_unit_rma(); ++ else if (test_info.test_class & FI_ATOMIC) ++ return ft_unit_atomic(); ++ ++ for (i = 0; i < ft_ctrl.xfer_iter; i++) { ++ ft_sync_fill_bufs(ft_tx_ctrl.msg_size); ++ ++ ret = ft_send_msg(); ++ if (ret) ++ return ret; ++ ++ if (ft_check_tx_completion()) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ ret = ft_sync_msg_needed(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_msg(); ++ if (ret) ++ return ret; ++ ++ ret = ft_verify_bufs(); ++ if (ret) ++ fail = -FI_EIO; ++ } ++ ret = ft_check_verify_cnt(); ++ if (ret) ++ return ret; ++ return fail; ++} ++ ++static int ft_run_unit(void) ++{ ++ int i, ret, fail; ++ ++ fail = ret = 0; ++ ++ for (i = 0; i < ft_ctrl.size_cnt; i += ft_ctrl.inc_step) { ++ if (ft_ctrl.size_array[i] > fabric_info->ep_attr->max_msg_size) ++ break; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC)) { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[0]; ++ ft_tx_ctrl.rma_msg_size = ft_ctrl.size_array[i]; ++ } else { ++ ft_tx_ctrl.msg_size = ft_ctrl.size_array[i]; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ (ft_ctrl.size_array[i] > fabric_info->tx_attr->inject_size)) ++ break; ++ ++ ft_ctrl.xfer_iter = test_info.test_flags & FT_FLAG_QUICKTEST ? ++ 5 : size_to_count(ft_ctrl.size_array[i]); ++ ++ ret = ft_sync_test(0); ++ if (ret) ++ return ret; ++ ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ ++ ret = ft_unit(); ++ if (ret) { ++ if (ret != -FI_EIO) ++ return ret; ++ fail = -FI_EIO; ++ } ++ } ++ if (fail) ++ printf("unit test FAILED\n"); ++ else ++ printf("unit test PASSED\n"); ++ ++ return fail; ++} ++ ++void ft_cleanup(void) ++{ ++ FT_CLOSE_FID(ft_rx_ctrl.mr); ++ FT_CLOSE_FID(ft_tx_ctrl.mr); ++ FT_CLOSE_FID(ft_mr_ctrl.mr); ++ FT_CLOSE_FID(ft_atom_ctrl.res_mr); ++ FT_CLOSE_FID(ft_atom_ctrl.comp_mr); ++ ft_free_res(); ++ ft_cleanup_xcontrol(&ft_rx_ctrl); ++ ft_cleanup_xcontrol(&ft_tx_ctrl); ++ ft_cleanup_mr_control(&ft_mr_ctrl); ++ ft_cleanup_atomic_control(&ft_atom_ctrl); ++ memset(&ft_ctrl, 0, sizeof ft_ctrl); ++} ++ ++static int ft_exchange_mr_addr_key(void) ++{ ++ struct fi_rma_iov local_rma_iov = {0}; ++ struct fi_rma_iov peer_rma_iov = {0}; ++ int ret; ++ ++ if (!(test_info.mr_mode & (FI_MR_VIRT_ADDR | FI_MR_PROV_KEY))) ++ return 0; ++ ++ if (test_info.mr_mode & FI_MR_VIRT_ADDR) ++ local_rma_iov.addr = (uint64_t) ft_mr_ctrl.buf; ++ ++ if (test_info.mr_mode & FI_MR_PROV_KEY) ++ local_rma_iov.key = ft_mr_ctrl.mr_key; ++ ++ ret = ft_sock_send(sock, &local_rma_iov, sizeof local_rma_iov); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_recv(sock, &peer_rma_iov, sizeof peer_rma_iov); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ ++ ft_mr_ctrl.peer_mr_addr = peer_rma_iov.addr; ++ if (test_info.mr_mode & FI_MR_PROV_KEY) ++ ft_mr_ctrl.peer_mr_key = peer_rma_iov.key; ++ ++ return 0; ++} ++ ++int ft_open_res() ++{ ++ int ret; ++ ++ ret = ft_init_control(); ++ if (ret) { ++ FT_PRINTERR("ft_init_control", ret); ++ goto cleanup; ++ } ++ ++ ret = ft_open_control(); ++ if (ret) { ++ FT_PRINTERR("ft_open_control", ret); ++ goto cleanup; ++ } ++ if (test_info.ep_type == FI_EP_MSG && listen_sock >= 0) { ++ ret = ft_open_passive(); ++ if (ret) { ++ FT_PRINTERR("ft_open_passive", ret); ++ goto cleanup; ++ } ++ } ++ else { ++ ret = ft_open_active(); ++ if (ret) { ++ FT_PRINTERR("ft_open_active", ret); ++ goto cleanup; ++ } ++ } ++ ++ return 0; ++cleanup: ++ ft_cleanup(); ++ return ret; ++} ++ ++int ft_init_test() ++{ ++ int ret; ++ ++ ft_sock_sync(0); ++ ++ ret = ft_enable_comm(); ++ if (ret) { ++ FT_PRINTERR("ft_enable_comm", ret); ++ goto cleanup; ++ } ++ ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ ++ ret = ft_exchange_mr_addr_key(); ++ if (ret) { ++ FT_PRINTERR("ft_exchange_mr_address", ret); ++ goto cleanup; ++ } ++ ++ return 0; ++cleanup: ++ ft_cleanup(); ++ return ret; ++} ++ ++int ft_run_test() ++{ ++ int ret; ++ ++ switch (test_info.test_type) { ++ case FT_TEST_UNIT: ++ ret = ft_run_unit(); ++ if (ret) ++ FT_PRINTERR("ft_run_unit", ret); ++ break; ++ case FT_TEST_LATENCY: ++ ret = ft_run_latency(); ++ if (ret) ++ FT_PRINTERR("ft_run_latency", ret); ++ break; ++ case FT_TEST_BANDWIDTH: ++ ret = ft_run_bandwidth(); ++ if (ret) ++ FT_PRINTERR("ft_run_bandwidth", ret); ++ break; ++ default: ++ ret = -FI_ENOSYS; ++ break; ++ } ++ ++ ft_sync_test(0); ++ ft_cleanup(); ++ ++ return ret ? ret : -ft_ctrl.error; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/uber.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/uber.c +new file mode 100644 +index 000000000..6a34545b9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/uber.c +@@ -0,0 +1,971 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "fabtest.h" ++ ++static int persistent = 1; ++static int do_fork = 0; ++ ++//static struct timespec start, end; ++ ++static struct ft_series *series; ++static int test_start_index, test_end_index = INT_MAX; ++struct ft_info test_info; ++struct fi_info *fabric_info; ++struct ft_xcontrol ft_rx_ctrl, ft_tx_ctrl; ++struct ft_mr_control ft_mr_ctrl; ++struct ft_atomic_control ft_atom_ctrl; ++struct ft_control ft_ctrl; ++ ++size_t recv_size, send_size; ++ ++enum { ++ FT_SUCCESS, ++ FT_SKIP, ++ FT_ENODATA, ++ FT_ENOSYS, ++ FT_ERROR, ++ FT_EIO, ++ FT_MAX_RESULT ++}; ++ ++static int results[FT_MAX_RESULT]; ++static char *filename = NULL; ++static char *provname = NULL; ++static char *testname = NULL; ++ ++ ++static int ft_nullstr(char *str) ++{ ++ return (!str || str[0] == '\0'); ++} ++ ++static char *ft_strptr(char *str) ++{ ++ return ft_nullstr(str) ? NULL : str; ++} ++ ++static char *ft_test_type_str(enum ft_test_type enum_str) ++{ ++ switch (enum_str) { ++ case FT_TEST_LATENCY: ++ return "latency"; ++ case FT_TEST_BANDWIDTH: ++ return "bandwidth"; ++ case FT_TEST_UNIT: ++ return "unit"; ++ default: ++ return "test_unspec"; ++ } ++} ++ ++static char *ft_class_func_str(enum ft_class_function enum_str) ++{ ++ switch (enum_str) { ++ case FT_FUNC_SEND: ++ return (test_info.test_class & FI_TAGGED) ? "tsend" : "send"; ++ case FT_FUNC_SENDV: ++ return (test_info.test_class & FI_TAGGED) ? "tsendv" : "sendv"; ++ case FT_FUNC_SENDMSG: ++ return (test_info.test_class & FI_TAGGED) ? "tsendmsg" : "sendmsg"; ++ case FT_FUNC_INJECT: ++ return (test_info.test_class & FI_TAGGED) ? "tinject" : "inject"; ++ case FT_FUNC_INJECTDATA: ++ return (test_info.test_class & FI_TAGGED) ? "tinjectdata" : "injectdata"; ++ case FT_FUNC_SENDDATA: ++ return (test_info.test_class & FI_TAGGED) ? "tsenddata" : "senddata"; ++ case FT_FUNC_READ: ++ return "read"; ++ case FT_FUNC_READV: ++ return "readv"; ++ case FT_FUNC_READMSG: ++ return "readmsg"; ++ case FT_FUNC_WRITE: ++ return "write"; ++ case FT_FUNC_WRITEV: ++ return "writev"; ++ case FT_FUNC_WRITEMSG: ++ return "writemsg"; ++ case FT_FUNC_INJECT_WRITE: ++ return "inject_write"; ++ case FT_FUNC_WRITEDATA: ++ return "writedata"; ++ case FT_FUNC_INJECT_WRITEDATA: ++ return "inject_writedata"; ++ case FT_FUNC_ATOMIC: ++ return "atomic"; ++ case FT_FUNC_ATOMICV: ++ return "atomicv"; ++ case FT_FUNC_ATOMICMSG: ++ return "atomic_msg"; ++ case FT_FUNC_INJECT_ATOMIC: ++ return "inject_atomic"; ++ case FT_FUNC_FETCH_ATOMIC: ++ return "fetch_atomic"; ++ case FT_FUNC_FETCH_ATOMICV: ++ return "fetch_atomicv"; ++ case FT_FUNC_FETCH_ATOMICMSG: ++ return "fetch_atomicmsg"; ++ case FT_FUNC_COMPARE_ATOMIC: ++ return "compare_atomic"; ++ case FT_FUNC_COMPARE_ATOMICV: ++ return "compare_atomicv"; ++ case FT_FUNC_COMPARE_ATOMICMSG: ++ return "compare_atomicmsg"; ++ default: ++ return "func_unspec"; ++ } ++} ++ ++static char *ft_wait_obj_str(enum fi_wait_obj enum_str) ++{ ++ switch (enum_str) { ++ case FI_WAIT_NONE: ++ return "wait_none"; ++ case FI_WAIT_UNSPEC: ++ return "wait_unspec"; ++ case FI_WAIT_SET: ++ return "wait_set"; ++ case FI_WAIT_FD: ++ return "wait_fd"; ++ case FI_WAIT_MUTEX_COND: ++ return "wait_mutex_cond"; ++ default: ++ return ""; ++ } ++} ++ ++static void ft_print_comp_flag(uint64_t bind, uint64_t op) ++{ ++ printf("(bind-%s, op-%s)", (bind & FI_SELECTIVE_COMPLETION) ? ++ "FI_SELECTIVE_COMPLETION" : "NONE", ++ op ? fi_tostr(&op, FI_TYPE_OP_FLAGS) : "NONE"); ++} ++ ++static void ft_print_comp(struct ft_info *test) ++{ ++ if (ft_use_comp_cq(test->comp_type)) { ++ printf("comp_queue -- tx "); ++ ft_print_comp_flag(test->tx_cq_bind_flags, test->tx_op_flags); ++ printf(", rx: "); ++ ft_print_comp_flag(test->rx_cq_bind_flags, test->rx_op_flags); ++ printf(", "); ++ } ++ if (ft_use_comp_cntr(test->comp_type)) ++ printf("comp_cntr, "); ++} ++ ++static void ft_show_test_info(void) ++{ ++ printf("[%s,", test_info.prov_name); ++ printf(" %s,", ft_test_type_str(test_info.test_type)); ++ if (test_info.test_class & FI_ATOMIC) { ++ printf(" %s ", ft_class_func_str(test_info.class_function)); ++ printf("(%s, ", fi_tostr(&test_info.op, FI_TYPE_ATOMIC_OP)); ++ printf("%s)--", fi_tostr(&test_info.datatype, FI_TYPE_ATOMIC_TYPE)); ++ } else { ++ printf(" %s--", ft_class_func_str(test_info.class_function)); ++ } ++ printf("%s,", fi_tostr(&test_info.msg_flags, FI_TYPE_OP_FLAGS)); ++ printf(" %s,", fi_tostr(&test_info.ep_type, FI_TYPE_EP_TYPE)); ++ printf(" %s,", fi_tostr(&test_info.av_type, FI_TYPE_AV_TYPE)); ++ printf(" eq_%s,", ft_wait_obj_str(test_info.eq_wait_obj)); ++ printf(" cq_%s,", ft_wait_obj_str(test_info.cq_wait_obj)); ++ printf(" cntr_%s, ", ft_wait_obj_str(test_info.cq_wait_obj)); ++ ft_print_comp(&test_info); ++ printf(" %s,", fi_tostr(&test_info.progress, FI_TYPE_PROGRESS)); ++ printf(" [%s],", fi_tostr(&test_info.mr_mode, FI_TYPE_MR_MODE)); ++ printf(" [%s],", fi_tostr(&test_info.mode, FI_TYPE_MODE)); ++ printf(" [%s]]\n", fi_tostr(&test_info.caps, FI_TYPE_CAPS)); ++} ++ ++static int ft_check_info(struct fi_info *hints, struct fi_info *info) ++{ ++ if (info->mode & ~hints->mode) { ++ fprintf(stderr, "fi_getinfo unsupported mode returned:\n"); ++ fprintf(stderr, "hints mode: %s\n", ++ fi_tostr(&hints->mode, FI_TYPE_MODE)); ++ fprintf(stderr, "info mode: %s\n", ++ fi_tostr(&info->mode, FI_TYPE_MODE)); ++ return -FI_EINVAL; ++ } ++ if (hints->caps != (hints->caps & info->caps)) { ++ fprintf(stderr, "fi_getinfo missing caps:\n"); ++ fprintf(stderr, "hints caps: %s\n", ++ fi_tostr(&hints->caps, FI_TYPE_CAPS)); ++ fprintf(stderr, "info caps: %s\n", ++ fi_tostr(&info->caps, FI_TYPE_CAPS)); ++ return -FI_EINVAL; ++ } ++ ++ return 0; ++} ++ ++static void ft_fw_convert_info(struct fi_info *info, struct ft_info *test_info) ++{ ++ info->caps = test_info->caps; ++ ++ info->mode = test_info->mode; ++ ++ info->domain_attr->mr_mode = test_info->mr_mode; ++ info->domain_attr->av_type = test_info->av_type; ++ info->domain_attr->data_progress = test_info->progress; ++ ++ info->ep_attr->type = test_info->ep_type; ++ info->ep_attr->protocol = test_info->protocol; ++ info->ep_attr->protocol_version = test_info->protocol_version; ++ ++ if (!ft_nullstr(test_info->prov_name)) { ++ info->fabric_attr->prov_name = strndup(test_info->prov_name, ++ sizeof test_info->prov_name - 1); ++ } ++ if (!ft_nullstr(test_info->fabric_name)) { ++ info->fabric_attr->name = strndup(test_info->fabric_name, ++ sizeof test_info->fabric_name - 1); ++ } ++ ++ info->tx_attr->op_flags = test_info->tx_op_flags; ++ info->rx_attr->op_flags = test_info->rx_op_flags; ++ ++ if (is_data_func(test_info->class_function) || ++ (is_msg_func(test_info->class_function) && ++ test_info->msg_flags & FI_REMOTE_CQ_DATA)) { ++ info->domain_attr->cq_data_size = 4; ++ info->mode |= FI_RX_CQ_DATA; ++ } ++} ++ ++static void ++ft_fw_update_info(struct ft_info *test_info, struct fi_info *info, int subindex) ++{ ++ test_info->test_subindex = subindex; ++ ++ if (info->ep_attr) { ++ test_info->protocol = info->ep_attr->protocol; ++ test_info->protocol_version = info->ep_attr->protocol_version; ++ } ++ ++ if (info->fabric_attr) { ++ if (info->fabric_attr->prov_name) { ++ strncpy(test_info->prov_name, info->fabric_attr->prov_name, ++ sizeof test_info->prov_name - 1); ++ } ++ if (info->fabric_attr->name) { ++ strncpy(test_info->fabric_name, info->fabric_attr->name, ++ sizeof test_info->fabric_name - 1); ++ } ++ } ++ ++ if (info->domain_attr) ++ test_info->progress = info->domain_attr->data_progress; ++} ++ ++static int ft_fw_result_index(int fi_errno) ++{ ++ switch (fi_errno) { ++ case 0: ++ return FT_SUCCESS; ++ case FI_ENODATA: ++ return FT_ENODATA; ++ case FI_ENOSYS: ++ return FT_ENOSYS; ++ case FI_EIO: ++ return FT_EIO; ++ default: ++ return FT_ERROR; ++ } ++} ++ ++static int ft_recv_test_info(void) ++{ ++ int ret; ++ ++ ret = ft_sock_recv(sock, &test_info, sizeof test_info); ++ if (ret) ++ return ret; ++ ++ test_info.node[sizeof(test_info.node) - 1] = '\0'; ++ test_info.service[sizeof(test_info.service) - 1] = '\0'; ++ test_info.prov_name[sizeof(test_info.prov_name) - 1] = '\0'; ++ test_info.fabric_name[sizeof(test_info.fabric_name) - 1] = '\0'; ++ return 0; ++} ++ ++static int ft_exchange_uint32(uint32_t local, uint32_t *remote) ++{ ++ uint32_t local_net = htonl(local); ++ int ret; ++ ++ ret = ft_sock_send(sock, &local_net, sizeof local); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_recv(sock, remote, sizeof *remote); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ ++ *remote = ntohl(*remote); ++ ++ return 0; ++} ++ ++static int ft_skip_info(struct fi_info *hints, struct fi_info *info) ++{ ++ uint32_t remote_protocol, skip, remote_skip; ++ size_t len; ++ int ret; ++ ++ //make sure remote side is using the same protocol ++ ret = ft_exchange_uint32(info->ep_attr->protocol, &remote_protocol); ++ if (ret) ++ return ret; ++ ++ if (info->ep_attr->protocol != remote_protocol) ++ return 1; ++ ++ //check needed to skip utility providers, unless requested ++ skip = (!ft_util_name(hints->fabric_attr->prov_name, &len) && ++ strcmp(hints->fabric_attr->prov_name, ++ info->fabric_attr->prov_name)); ++ ++ ret = ft_exchange_uint32(skip, &remote_skip); ++ if (ret) ++ return ret; ++ ++ return skip || remote_skip; ++} ++ ++static int ft_transfer_subindex(int subindex, int *remote_idx) ++{ ++ int ret; ++ ++ ret = ft_sock_send(sock, &subindex, sizeof subindex); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_recv(sock, remote_idx, sizeof *remote_idx); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int ft_fw_process_list_server(struct fi_info *hints, struct fi_info *info) ++{ ++ int ret, subindex, remote_idx = 0, result = -FI_ENODATA, end_test = 0; ++ int server_ready = 0; ++ struct fi_info *open_res_info; ++ ++ ret = ft_sock_send(sock, &test_info, sizeof test_info); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ for (subindex = 1, fabric_info = info; fabric_info; ++ fabric_info = fabric_info->next, subindex++) { ++ ++ ret = ft_check_info(hints, fabric_info); ++ if (ret) ++ return ret; ++ ++ /* Stores the fabric_info into a tmp variable, resolves an issue caused ++ * by ft_accept with FI_EP_MSG which overwrites the fabric_info. ++ */ ++ open_res_info = fabric_info; ++ while (1) { ++ fabric_info = open_res_info; ++ ret = ft_open_res(); ++ if (ret) { ++ FT_PRINTERR("ft_open_res", ret); ++ return ret; ++ } ++ ++ if (!server_ready) { ++ server_ready = 1; ++ ret = ft_sock_send(sock, &server_ready, sizeof server_ready); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ } ++ ++ ret = ft_sock_recv(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ if (end_test) { ++ ft_cleanup(); ++ break; ++ } ++ ++ if (ft_skip_info(hints, fabric_info)) { ++ ft_cleanup(); ++ continue; ++ } ++ ++ ret = ft_transfer_subindex(subindex, &remote_idx); ++ if (ret) ++ return ret; ++ ++ ft_fw_update_info(&test_info, fabric_info, subindex); ++ ++ printf("Starting test %d-%d-%d: ", test_info.test_index, ++ subindex, remote_idx); ++ ft_show_test_info(); ++ ++ result = ft_init_test(); ++ if (result) ++ continue; ++ ++ result = ft_run_test(); ++ ++ ret = ft_sock_send(sock, &result, sizeof result); ++ if (result) { ++ FT_PRINTERR("ft_run_test", result); ++ } else if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ } ++ ++ end_test = (fabric_info->next == NULL); ++ ret = ft_sock_send(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ } ++ ++ test_info.prov_name[0] = '\0'; ++ ret = ft_sock_send(sock, &test_info, sizeof test_info); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ if (subindex == 1) ++ return -FI_ENODATA; ++ ++ return result; ++} ++ ++static int ft_fw_process_list_client(struct fi_info *hints, struct fi_info *info) ++{ ++ int ret, subindex, remote_idx = 0, result = -FI_ENODATA, sresult, end_test = 0; ++ ++ while (!end_test) { ++ for (subindex = 1, fabric_info = info; fabric_info; ++ fabric_info = fabric_info->next, subindex++) { ++ ++ end_test = 0; ++ ret = ft_sock_send(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ if (ft_skip_info(hints, fabric_info)) ++ continue; ++ ++ ret = ft_transfer_subindex(subindex, &remote_idx); ++ if (ret) ++ return ret; ++ ++ ret = ft_check_info(hints, fabric_info); ++ if (ret) ++ return ret; ++ ++ ft_fw_update_info(&test_info, fabric_info, subindex); ++ printf("Starting test %d-%d-%d: ", test_info.test_index, ++ subindex, remote_idx); ++ ft_show_test_info(); ++ ++ ret = ft_open_res(); ++ if (ret) { ++ FT_PRINTERR("ft_open_res", ret); ++ return ret; ++ } ++ ++ result = ft_init_test(); ++ if (result) ++ continue; ++ ++ result = ft_run_test(); ++ ++ ret = ft_sock_recv(sock, &sresult, sizeof sresult); ++ if (result && result != -FI_EIO) { ++ FT_PRINTERR("ft_run_test", result); ++ fprintf(stderr, "Node: %s\nService: %s \n", ++ test_info.node, test_info.service); ++ fprintf(stderr, "%s\n", fi_tostr(hints, FI_TYPE_INFO)); ++ return -FI_EOTHER; ++ } else if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ result = ret; ++ return -FI_EOTHER; ++ } else if (sresult) { ++ result = sresult; ++ if (sresult != -FI_EIO) ++ return -FI_EOTHER; ++ } ++ } ++ end_test = 1; ++ ret = ft_sock_send(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_sock_recv(sock, &end_test, sizeof end_test); ++ if (ret) { ++ FT_PRINTERR("ft_sock_recv", ret); ++ return ret; ++ } ++ } ++ ++ if (subindex == 1) ++ return -FI_ENODATA; ++ ++ return result; ++} ++ ++static int ft_server_child() ++{ ++ struct fi_info *hints, *info; ++ int ret; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return -FI_ENOMEM; ++ ++ ft_fw_convert_info(hints, &test_info); ++ printf("Starting test %d:\n", test_info.test_index); ++ ++ ret = fi_getinfo(FT_FIVERSION, ft_strptr(test_info.node), ++ ft_strptr(test_info.service), FI_SOURCE, ++ hints, &info); ++ if (ret && ret != -FI_ENODATA) { ++ FT_PRINTERR("fi_getinfo", ret); ++ } else { ++ ret = ft_fw_process_list_server(hints, info); ++ if (ret != -FI_ENODATA) ++ fi_freeinfo(info); ++ ++ if (ret && ret != -FI_EIO) { ++ FT_PRINTERR("ft_fw_process_list", ret); ++ printf("Node: %s\nService: %s\n", ++ test_info.node, test_info.service); ++ printf("%s\n", fi_tostr(hints, FI_TYPE_INFO)); ++ } ++ } ++ fi_freeinfo(hints); ++ ++ printf("Ending test %d, result: %s\n", test_info.test_index, ++ fi_strerror(-ret)); ++ ++ return ret; ++} ++ ++static int ft_fw_server(void) ++{ ++ int ret; ++ pid_t pid; ++ ++ do { ++ ret = ft_recv_test_info(); ++ if (ret) { ++ if (ret == -FI_ENOTCONN) ++ ret = 0; ++ break; ++ } ++ ++ if (do_fork) { ++ pid = fork(); ++ if (!pid) { ++ ret = ft_server_child(); ++ _exit(-ret); ++ } else { ++ waitpid(pid, &ret, 0); ++ ret = WEXITSTATUS(ret); ++ } ++ } else { ++ ret = ft_server_child(); ++ } ++ ++ results[ft_fw_result_index(ret)]++; ++ ++ } while (!ret || ret == FI_EIO || ret == FI_ENODATA); ++ ++ return ret; ++} ++ ++static int ft_client_child(void) ++{ ++ struct fi_info *hints, *info; ++ int ret, result, server_ready = 0; ++ ++ result = -FI_ENODATA; ++ hints = fi_allocinfo(); ++ if (!hints) ++ return -FI_ENOMEM; ++ ++ ret = ft_getsrcaddr(opts.src_addr, opts.src_port, hints); ++ if (ret) ++ return ret; ++ ++ ft_fw_convert_info(hints, &test_info); ++ ++ printf("Starting test %d / %d:\n", test_info.test_index, ++ series->test_count); ++ while (!ft_nullstr(test_info.prov_name)) { ++ printf("Starting test %d-%d: ", test_info.test_index, ++ test_info.test_subindex); ++ ft_show_test_info(); ++ ++ ret = ft_sock_recv(sock, &server_ready, sizeof server_ready); ++ if (ret) ++ return ret; ++ ++ if (!server_ready) ++ return -FI_EOTHER; ++ ++ result = fi_getinfo(FT_FIVERSION, ft_strptr(test_info.node), ++ ft_strptr(test_info.service), 0, hints, &info); ++ if (result) { ++ FT_PRINTERR("fi_getinfo", result); ++ } ++ ++ ret = ft_fw_process_list_client(hints, info); ++ if (ret != -FI_ENODATA) ++ fi_freeinfo(info); ++ else ++ goto out; ++ ++ ret = ft_recv_test_info(); ++ if (ret) { ++ FT_PRINTERR("ft_recv_test_info", ret); ++ goto out; ++ } ++ ft_fw_convert_info(hints, &test_info); ++ } ++ ++ printf("Ending test %d / %d, result: %s\n", test_info.test_index, ++ series->test_count, fi_strerror(-result)); ++out: ++ fi_freeinfo(hints); ++ return result; ++} ++ ++static int ft_fw_client(void) ++{ ++ int ret, result; ++ pid_t pid; ++ ++ ++ for (fts_start(series, test_start_index); ++ !fts_end(series, test_end_index); ++ fts_next(series)) { ++ ++ fts_cur_info(series, &test_info); ++ if (!fts_info_is_valid()) { ++ printf("Skipping test %d (invalid):\n", test_info.test_index); ++ ft_show_test_info(); ++ results[FT_SKIP]++; ++ continue; ++ } ++ ++ ret = ft_sock_send(sock, &test_info, sizeof test_info); ++ if (ret) { ++ FT_PRINTERR("ft_sock_send", ret); ++ return ret; ++ } ++ ++ ret = ft_recv_test_info(); ++ if (ret) { ++ FT_PRINTERR("ft_recv_test_info", ret); ++ return ret; ++ } ++ ++ if (do_fork) { ++ pid = fork(); ++ if (!pid) { ++ result = ft_client_child(); ++ _exit(-result); ++ } else { ++ waitpid(pid, &result, 0); ++ result = WEXITSTATUS(result); ++ } ++ } else { ++ result = ft_client_child(); ++ } ++ ++ results[ft_fw_result_index(result)]++; ++ } ++ return 0; ++} ++ ++static void ft_fw_show_results(void) ++{ ++ printf("Success: %d\n", results[FT_SUCCESS]); ++ printf("Skipped: %d\n", results[FT_SKIP]); ++ printf("ENODATA: %d\n", results[FT_ENODATA]); ++ printf("ENOSYS : %d\n", results[FT_ENOSYS]); ++ printf("EIO : %d\n", results[FT_EIO]); ++ printf("ERROR : %d\n", results[FT_ERROR]); ++} ++ ++static void ft_fw_usage(char *program) ++{ ++ fprintf(stderr, "Usage:\n"); ++ fprintf(stderr, " %s [OPTIONS] \t\t\tstart server\n", program); ++ fprintf(stderr, " %s [OPTIONS] \tconnect to server\n", program); ++ fprintf(stderr, "\nOptions:\n"); ++ FT_PRINT_OPTS_USAGE("-q ", "Management port for test"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++ fprintf(stderr, "\nServer only options:\n"); ++ FT_PRINT_OPTS_USAGE("-x", "exit after test run"); ++ fprintf(stderr, "\nClient only options:\n"); ++ FT_PRINT_OPTS_USAGE("-u ", "test configuration file " ++ "(Either config file or both provider and test name are required)"); ++ FT_PRINT_OPTS_USAGE("-p ", " provider name"); ++ FT_PRINT_OPTS_USAGE("-t ", "test name"); ++ FT_PRINT_OPTS_USAGE("-y ", ""); ++ FT_PRINT_OPTS_USAGE("-z ", ""); ++ FT_PRINT_OPTS_USAGE("-s
", "source address"); ++ FT_PRINT_OPTS_USAGE("-B ", "non default source port number"); ++ FT_PRINT_OPTS_USAGE("-P ", "non default destination port number " ++ "(config file service parameter will override this)"); ++} ++ ++void ft_free() ++{ ++ if (filename) ++ free(filename); ++ if (testname) ++ free(testname); ++ if (provname) ++ free(provname); ++} ++ ++static int ft_get_config_file(char *provname, char *testname, char **filename) ++{ ++ char **prov_vec, **path_vec, *str; ++ size_t i, prov_count, path_count, len; ++ int ret = -FI_ENOMEM; ++ ++ // TODO use macro for ";" ++ prov_vec = ft_split_and_alloc(provname, ";", &prov_count); ++ if (!prov_vec) { ++ FT_ERR("Unable to split provname\n"); ++ return -FI_EINVAL; ++ } ++ ++ /* prov_count + count_of(CONFIG_PATH, "test_configs", "testname", ".test") */ ++ path_count = prov_count + 4; ++ path_vec = calloc(path_count, sizeof(*path_vec)); ++ if (!path_vec) ++ goto err1; ++ ++ path_vec[0] = CONFIG_PATH; ++ path_vec[1] = "test_configs"; ++ ++ /* Path for "prov1;prov2;prov3;..." is ".../prov3/prov2/prov1" */ ++ for (i = 0; i < prov_count; i++) ++ path_vec[i + 2] = prov_vec[prov_count - i - 1]; ++ ++ path_vec[prov_count + 2] = testname; ++ path_vec[prov_count + 3] = "test"; ++ ++ for (i = 0, len = 0; i < path_count; i++) ++ len += strlen(path_vec[i]) + 1; ++ ++ // NULL char at the end ++ len++; ++ ++ *filename = calloc(1, len); ++ if (!*filename) ++ goto err2; ++ ++ for (i = 0, str = *filename; i < path_count; i++) { ++ if (i < path_count - 1) ++ ret = snprintf(str, len, "/%s", path_vec[i]); ++ else ++ ret = snprintf(str, len, ".%s", path_vec[i]); ++ if (ret < 0) ++ goto err3; ++ ++ if (ret >= (int)len) { ++ ret = -FI_ETRUNC; ++ goto err3; ++ } ++ str += ret; ++ len -= ret; ++ } ++ free(path_vec); ++ ft_free_string_array(prov_vec); ++ return 0; ++err3: ++ free(*filename); ++ *filename = NULL; ++err2: ++ free(path_vec); ++err1: ++ ft_free_string_array(prov_vec); ++ return ret; ++} ++ ++int main(int argc, char **argv) ++{ ++ char *service = "2710"; ++ opts = INIT_OPTS; ++ int ret, op; ++ ++ while ((op = getopt(argc, argv, "p:u:t:q:xy:z:hf" ADDR_OPTS)) != -1) { ++ switch (op) { ++ case 'u': ++ filename = strdup(optarg); ++ break; ++ case 'p': ++ provname = strdup(optarg); ++ break; ++ case 't': ++ testname = strdup(optarg); ++ break; ++ case 'q': ++ service = optarg; ++ break; ++ case 'x': ++ persistent = 0; ++ break; ++ case 'y': ++ test_start_index = atoi(optarg); ++ break; ++ case 'z': ++ test_end_index = atoi(optarg); ++ break; ++ case 'f': ++ do_fork = 1; ++ break; ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ break; ++ case '?': ++ case 'h': ++ ft_fw_usage(argv[0]); ++ ft_free(); ++ exit(1); ++ } ++ } ++ ++ if (optind < argc - 1) { ++ ft_fw_usage(argv[0]); ++ ft_free(); ++ exit(1); ++ } ++ ++ opts.dst_addr = (optind == argc - 1) ? argv[optind] : NULL; ++ if (opts.dst_addr) { ++ if (!opts.dst_port) ++ opts.dst_port = default_port; ++ if (!filename) { ++ if (!testname || !provname) { ++ ft_fw_usage(argv[0]); ++ ft_free(); ++ exit(1); ++ } else { ++ ret = ft_get_config_file(provname, testname, ++ &filename); ++ if (ret < 0) { ++ ft_free(); ++ exit(1); ++ } ++ } ++ } else { ++ testname = NULL; ++ provname = NULL; ++ } ++ series = fts_load(filename); ++ if (!series) { ++ ft_free(); ++ exit(1); ++ } ++ ++ ret = ft_sock_connect(opts.dst_addr, service); ++ if (ret) ++ goto out; ++ ++ ret = ft_fw_client(); ++ if (ret) ++ FT_PRINTERR("ft_fw_client", ret); ++ ft_sock_shutdown(sock); ++ } else { ++ ret = ft_sock_listen(opts.src_addr, service); ++ if (ret) ++ goto out; ++ ++ do { ++ ret = ft_sock_accept(); ++ if (ret) ++ goto out; ++ ++ ret = ft_fw_server(); ++ if (ret) ++ FT_PRINTERR("ft_fw_server", ret); ++ ft_sock_shutdown(sock); ++ } while (persistent); ++ } ++ ++ ft_fw_show_results(); ++out: ++ if (opts.dst_addr) ++ fts_close(series); ++ ft_free(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/verify.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/verify.c +new file mode 100644 +index 000000000..08011b5c2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/verify.c +@@ -0,0 +1,184 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "ofi_atomic.h" ++#include "fabtest.h" ++ ++static int alph_index = 0; ++static const char integ_alphabet[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; ++static const int integ_alphabet_length = (sizeof(integ_alphabet)/sizeof(*integ_alphabet)) - 1; ++ ++#define CHECK_LOCAL(res,local,cnt,ret,TYPE) \ ++ do { \ ++ int i; \ ++ TYPE *r = (res); \ ++ TYPE *l = (local); \ ++ for (i = 0; i < cnt; i++) { \ ++ if (r[i] != l[i]) { \ ++ ret = -FI_EIO; \ ++ break; \ ++ } \ ++ } \ ++ } while (0) \ ++ ++ ++#define FT_FILL(dst,cnt,TYPE) \ ++ do { \ ++ int i; \ ++ TYPE *d = (dst); \ ++ for (i = 0; i < cnt; i++) { \ ++ d[i] = (TYPE) (integ_alphabet[alph_index++]); \ ++ if (alph_index >= integ_alphabet_length) \ ++ alph_index = 0; \ ++ } \ ++ } while (0) ++ ++#define SWITCH_TYPES(type,FUNC,...) \ ++ switch (type) { \ ++ case FI_INT8: FUNC(__VA_ARGS__,int8_t); break; \ ++ case FI_UINT8: FUNC(__VA_ARGS__,uint8_t); break; \ ++ case FI_INT16: FUNC(__VA_ARGS__,int16_t); break; \ ++ case FI_UINT16: FUNC(__VA_ARGS__,uint16_t); break; \ ++ case FI_INT32: FUNC(__VA_ARGS__,int32_t); break; \ ++ case FI_UINT32: FUNC(__VA_ARGS__,uint32_t); break; \ ++ case FI_INT64: FUNC(__VA_ARGS__,int64_t); break; \ ++ case FI_UINT64: FUNC(__VA_ARGS__,uint64_t); break; \ ++ case FI_FLOAT: FUNC(__VA_ARGS__,float); break; \ ++ case FI_DOUBLE: FUNC(__VA_ARGS__,double); break; \ ++ case FI_LONG_DOUBLE: FUNC(__VA_ARGS__,long_double); break; \ ++ case FI_FLOAT_COMPLEX: FUNC(__VA_ARGS__,ofi_complex_float); break; \ ++ case FI_DOUBLE_COMPLEX: FUNC(__VA_ARGS__,ofi_complex_double); break; \ ++ case FI_LONG_DOUBLE_COMPLEX: FUNC(__VA_ARGS__,ofi_complex_long_double); break;\ ++ default: return -FI_EOPNOTSUPP; \ ++ } ++ ++int ft_sync_fill_bufs(size_t size) ++{ ++ ft_sock_sync(0); ++ ++ if (test_info.caps & FI_ATOMIC) { ++ SWITCH_TYPES(ft_atom_ctrl.datatype, FT_FILL, ft_tx_ctrl.buf, ++ ft_atom_ctrl.count); ++ SWITCH_TYPES(ft_atom_ctrl.datatype, FT_FILL, ft_mr_ctrl.buf, ++ ft_atom_ctrl.count); ++ memcpy(ft_atom_ctrl.orig_buf, ft_mr_ctrl.buf, size); ++ memcpy(ft_tx_ctrl.cpy_buf, ft_tx_ctrl.buf, size); ++ } else if (is_read_func(test_info.class_function)) { ++ ft_fill_buf(ft_mr_ctrl.buf, size); ++ } else { ++ ft_fill_buf(ft_tx_ctrl.buf, size); ++ memcpy(ft_tx_ctrl.cpy_buf, ft_tx_ctrl.buf, size); ++ } ++ ++ ft_sock_sync(0); ++ ++ return 0; ++} ++ ++static int verify_atomic(void) ++{ ++ int ret = 0; ++ void *dst, *src, *cmp, *tmp, *res; ++ enum fi_datatype type; ++ enum fi_op op; ++ size_t count; ++ ++ dst = ft_atom_ctrl.orig_buf; ++ src = ft_tx_ctrl.cpy_buf; ++ cmp = ft_atom_ctrl.comp_buf; ++ tmp = ft_rx_ctrl.buf; ++ res = ft_atom_ctrl.res_buf; ++ ++ type = ft_atom_ctrl.datatype; ++ op = ft_atom_ctrl.op; ++ count = ft_atom_ctrl.count; ++ ++ if (is_fetch_func(test_info.class_function) || ++ is_compare_func(test_info.class_function)) { ++ SWITCH_TYPES(type, CHECK_LOCAL, dst, res, count, ret); ++ if (ret) ++ return ret; ++ } ++ ++ if (is_compare_func(test_info.class_function)) { ++ ofi_atomic_swap_handlers[op - OFI_SWAP_OP_START][type](dst, ++ src, cmp, tmp, count); ++ } else if (is_fetch_func(test_info.class_function)) { ++ ofi_atomic_readwrite_handlers[op][type](dst, ++ src, tmp, count); ++ } else { ++ ofi_atomic_write_handlers[op][type](dst, src, count); ++ } ++ ++ SWITCH_TYPES(type, CHECK_LOCAL, dst, ft_mr_ctrl.buf, count, ret); ++ ++ return ret; ++} ++ ++int ft_verify_bufs() ++{ ++ char *compare_buf; ++ size_t compare_size; ++ ++ if (test_info.caps & FI_ATOMIC) ++ return verify_atomic(); ++ ++ if (test_info.caps & FI_RMA) { ++ compare_size = ft_tx_ctrl.rma_msg_size; ++ if (is_read_func(test_info.class_function)) ++ compare_buf = (char *) ft_tx_ctrl.buf; ++ else ++ compare_buf = (char *) ft_mr_ctrl.buf; ++ } else { ++ compare_size = ft_tx_ctrl.msg_size; ++ compare_buf = (char *) ft_rx_ctrl.buf; ++ } ++ ++ return ft_check_buf(compare_buf, compare_size) ? -FI_EIO : 0; ++} ++ ++void ft_verify_comp(void *buf) ++{ ++ struct fi_cq_data_entry *comp; ++ ++ if (ft_rx_ctrl.cq_format != FI_CQ_FORMAT_DATA) ++ return; ++ ++ comp = (struct fi_cq_data_entry *) buf; ++ ++ if (comp->flags & FI_REMOTE_CQ_DATA) { ++ if (comp->data == ft_tx_ctrl.remote_cq_data) ++ ft_ctrl.verify_cnt++; ++ } ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/xfer.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/xfer.c +new file mode 100644 +index 000000000..7d7bc5fe6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/ubertest/xfer.c +@@ -0,0 +1,857 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under the BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include "fabtest.h" ++ ++ ++static int ft_post_recv(void) ++{ ++ struct fi_msg msg; ++ int ret; ++ struct fi_context *ctx = NULL; ++ uint64_t flags = 0; ++ ++ if (test_info.msg_flags == FI_COMPLETION) ++ flags = test_info.msg_flags; ++ ++ if (test_info.test_class & (FI_RMA | FI_ATOMIC) || ++ ft_generates_rx_comp()) { ++ ret = ft_get_ctx(&ft_rx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ if (fabric_info->caps & FI_DIRECTED_RECV) ++ ft_rx_ctrl.addr = ft_tx_ctrl.addr; ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_SENDV: ++ ft_format_iov(ft_rx_ctrl.iov, ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ++ ft_rx_ctrl.buf, ft_rx_ctrl.msg_size); ++ ret = fi_recvv(ft_rx_ctrl.ep, ft_rx_ctrl.iov, ft_rx_ctrl.iov_desc, ++ ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ft_rx_ctrl.addr, ctx); ++ ft_next_iov_cnt(&ft_rx_ctrl, fabric_info->rx_attr->iov_limit); ++ break; ++ case FT_FUNC_SENDMSG: ++ ft_format_iov(ft_rx_ctrl.iov, ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ++ ft_rx_ctrl.buf, ft_rx_ctrl.msg_size); ++ msg.msg_iov = ft_rx_ctrl.iov; ++ msg.desc = ft_rx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_rx_ctrl.iov_iter]; ++ msg.addr = ft_rx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ ret = fi_recvmsg(ft_rx_ctrl.ep, &msg, flags); ++ ft_next_iov_cnt(&ft_rx_ctrl, fabric_info->rx_attr->iov_limit); ++ break; ++ default: ++ ret = fi_recv(ft_rx_ctrl.ep, ft_rx_ctrl.buf, ft_rx_ctrl.msg_size, ++ ft_rx_ctrl.memdesc, ft_rx_ctrl.addr, ctx); ++ break; ++ } ++ ++ return ret; ++} ++ ++static int ft_post_trecv(void) ++{ ++ struct fi_msg_tagged msg; ++ int ret; ++ struct fi_context *ctx = NULL; ++ uint64_t flags = 0; ++ ++ if (test_info.msg_flags == FI_COMPLETION) ++ flags = test_info.msg_flags; ++ ++ if (ft_generates_rx_comp()) { ++ ret = ft_get_ctx(&ft_rx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ if (fabric_info->caps & FI_DIRECTED_RECV) ++ ft_rx_ctrl.addr = ft_tx_ctrl.addr; ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_SENDV: ++ ft_format_iov(ft_rx_ctrl.iov, ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ++ ft_rx_ctrl.buf, ft_rx_ctrl.msg_size); ++ ret = fi_trecvv(ft_rx_ctrl.ep, ft_rx_ctrl.iov, ft_rx_ctrl.iov_desc, ++ ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ft_rx_ctrl.addr, ++ ft_rx_ctrl.tag, 0, ctx); ++ ft_next_iov_cnt(&ft_rx_ctrl, fabric_info->rx_attr->iov_limit); ++ break; ++ case FT_FUNC_SENDMSG: ++ ft_format_iov(ft_rx_ctrl.iov, ft_ctrl.iov_array[ft_rx_ctrl.iov_iter], ++ ft_rx_ctrl.buf, ft_rx_ctrl.msg_size); ++ msg.msg_iov = ft_rx_ctrl.iov; ++ msg.desc = ft_rx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_rx_ctrl.iov_iter]; ++ msg.addr = ft_rx_ctrl.addr; ++ msg.tag = ft_rx_ctrl.tag; ++ msg.ignore = 0; ++ msg.context = ctx; ++ ret = fi_trecvmsg(ft_rx_ctrl.ep, &msg, flags); ++ ft_next_iov_cnt(&ft_rx_ctrl, fabric_info->rx_attr->iov_limit); ++ break; ++ default: ++ ret = fi_trecv(ft_rx_ctrl.ep, ft_rx_ctrl.buf, ft_rx_ctrl.msg_size, ++ ft_rx_ctrl.memdesc, ft_rx_ctrl.addr, ft_rx_ctrl.tag, 0, ctx); ++ break; ++ } ++ return ret; ++} ++ ++#define ft_send_retry(ret, send, ep, ...) \ ++ do { \ ++ ret = send(ep, ##__VA_ARGS__); \ ++ if (ret == -FI_EAGAIN) \ ++ ft_comp_tx(0); \ ++ } while (ret == -FI_EAGAIN) ++ ++static int ft_post_send(void) ++{ ++ struct fi_msg msg; ++ int ret; ++ struct fi_context *ctx = NULL; ++ ++ if (ft_generates_tx_comp()) { ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_SENDV: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.msg_size); ++ ft_send_retry(ret, fi_sendv, ft_tx_ctrl.ep, ft_tx_ctrl.iov, ++ ft_tx_ctrl.iov_desc, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.addr, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_SENDMSG: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.msg_size); ++ msg.msg_iov = ft_tx_ctrl.iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ ft_send_retry(ret, fi_sendmsg, ft_tx_ctrl.ep, &msg, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_INJECT: ++ ft_send_retry(ret, fi_inject, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.addr); ++ break; ++ case FT_FUNC_INJECTDATA: ++ ft_send_retry(ret, fi_injectdata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.remote_cq_data, ++ ft_tx_ctrl.addr); ++ break; ++ case FT_FUNC_SENDDATA: ++ ft_send_retry(ret, fi_senddata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.remote_cq_data, ft_tx_ctrl.addr, ctx); ++ break; ++ default: ++ ft_send_retry(ret, fi_send, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ctx); ++ break; ++ } ++ ++ if (ft_check_tx_completion()) ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++static int ft_post_tsend(void) ++{ ++ struct fi_msg_tagged msg; ++ int ret; ++ struct fi_context *ctx = NULL; ++ ++ if (ft_generates_tx_comp()) { ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_SENDV: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.msg_size); ++ ft_send_retry(ret, fi_tsendv, ft_tx_ctrl.ep, ft_tx_ctrl.iov, ++ ft_tx_ctrl.iov_desc, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.addr, ft_tx_ctrl.tag, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_SENDMSG: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.msg_size); ++ msg.msg_iov = ft_tx_ctrl.iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.tag = ft_tx_ctrl.tag; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ ft_send_retry(ret, fi_tsendmsg, ft_tx_ctrl.ep, &msg, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_INJECT: ++ ft_send_retry(ret, fi_tinject, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.addr, ft_tx_ctrl.tag); ++ break; ++ case FT_FUNC_INJECTDATA: ++ ft_send_retry(ret, fi_tinjectdata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.remote_cq_data, ++ ft_tx_ctrl.addr, ft_tx_ctrl.tag); ++ break; ++ case FT_FUNC_SENDDATA: ++ ft_send_retry(ret, fi_tsenddata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.remote_cq_data, ft_tx_ctrl.addr, ++ ft_tx_ctrl.tag, ctx); ++ break; ++ default: ++ ft_send_retry(ret, fi_tsend, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ft_tx_ctrl.tag, ctx); ++ break; ++ } ++ ++ if (ft_check_tx_completion()) ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++static int ft_post_send_rma(void) ++{ ++ int ret, i; ++ struct fi_msg_rma msg; ++ struct fi_rma_iov rma_iov; ++ struct fi_context *ctx = NULL; ++ uint64_t read_flags = 0; ++ ++ if (test_info.msg_flags == FI_COMPLETION) ++ read_flags = test_info.msg_flags; ++ ++ if (ft_generates_tx_comp()) { ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_READ: ++ ft_send_retry(ret, fi_read, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.rma_msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ctx); ++ break; ++ case FT_FUNC_READV: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size); ++ ft_send_retry(ret, fi_readv, ft_tx_ctrl.ep, ft_tx_ctrl.iov, ++ ft_tx_ctrl.iov_desc, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_READMSG: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size); ++ ++ msg.msg_iov = ft_tx_ctrl.iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ for (i = 0, rma_iov.len = 0; i < msg.iov_count; i++) ++ rma_iov.len += ft_tx_ctrl.iov[i].iov_len; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ft_send_retry(ret, fi_readmsg, ft_tx_ctrl.ep, &msg, read_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_WRITEV: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size); ++ ft_send_retry(ret, fi_writev, ft_tx_ctrl.ep, ft_tx_ctrl.iov, ++ ft_tx_ctrl.iov_desc, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_WRITEMSG: ++ ft_format_iov(ft_tx_ctrl.iov, ft_ctrl.iov_array[ft_tx_ctrl.iov_iter], ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size); ++ ++ msg.msg_iov = ft_tx_ctrl.iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = ft_ctrl.iov_array[ft_tx_ctrl.iov_iter]; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ for (i = 0, rma_iov.len = 0; i < msg.iov_count; i++) ++ rma_iov.len += ft_tx_ctrl.iov[i].iov_len; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ft_send_retry(ret, fi_writemsg, ft_tx_ctrl.ep, &msg, ++ test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_INJECT_WRITE: ++ ft_send_retry(ret, fi_inject_write, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.rma_msg_size, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key); ++ break; ++ case FT_FUNC_WRITEDATA: ++ ft_send_retry(ret, fi_writedata, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.rma_msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.remote_cq_data, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key, ctx); ++ break; ++ case FT_FUNC_INJECT_WRITEDATA: ++ ft_send_retry(ret, fi_inject_writedata, ft_tx_ctrl.ep, ++ ft_tx_ctrl.buf, ft_tx_ctrl.rma_msg_size, ++ ft_tx_ctrl.remote_cq_data, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key); ++ break; ++ default: ++ ft_send_retry(ret, fi_write, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_tx_ctrl.rma_msg_size, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ctx); ++ break; ++ } ++ ++ if (ft_check_tx_completion()) ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++int ft_post_send_atomic(void) ++{ ++ int ret, i; ++ struct fi_msg_atomic msg; ++ struct fi_rma_ioc rma_iov; ++ size_t iov_count; ++ struct fi_context *ctx = NULL; ++ ++ if (ft_generates_tx_comp()) { ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ } ++ ++ switch (test_info.class_function) { ++ case FT_FUNC_ATOMICV: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ ft_send_retry(ret, fi_atomicv, ft_tx_ctrl.ep, ft_atom_ctrl.ioc, ++ ft_tx_ctrl.iov_desc, iov_count, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.op, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_ATOMICMSG: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ msg.msg_iov = ft_atom_ctrl.ioc; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = iov_count; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ msg.op = ft_atom_ctrl.op; ++ msg.datatype = ft_atom_ctrl.datatype; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ ++ for (i = 0, rma_iov.count = 0; i < msg.iov_count; i++) ++ rma_iov.count += ft_atom_ctrl.ioc[i].count; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ft_send_retry(ret, fi_atomicmsg, ft_tx_ctrl.ep, &msg, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_FETCH_ATOMIC: ++ ft_send_retry(ret, fi_fetch_atomic, ft_tx_ctrl.ep, ++ ft_tx_ctrl.buf, ft_atom_ctrl.count, ft_tx_ctrl.memdesc, ++ ft_atom_ctrl.res_buf, ft_atom_ctrl.res_memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ft_atom_ctrl.datatype, ++ ft_atom_ctrl.op, ctx); ++ break; ++ case FT_FUNC_FETCH_ATOMICV: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ ft_send_retry(ret, fi_fetch_atomicv, ft_tx_ctrl.ep, ++ ft_atom_ctrl.ioc, ft_tx_ctrl.iov_desc, iov_count, ++ ft_atom_ctrl.res_ioc, ft_atom_ctrl.res_memdesc, ++ iov_count, ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ft_atom_ctrl.datatype, ++ ft_atom_ctrl.op, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_FETCH_ATOMICMSG: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ msg.msg_iov = ft_atom_ctrl.ioc; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = iov_count; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ msg.op = ft_atom_ctrl.op; ++ msg.datatype = ft_atom_ctrl.datatype; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ ++ for (i = 0, rma_iov.count = 0; i < msg.iov_count; i++) ++ rma_iov.count += ft_atom_ctrl.ioc[i].count; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ++ ft_send_retry(ret, fi_fetch_atomicmsg, ft_tx_ctrl.ep, &msg, ++ ft_atom_ctrl.res_ioc, ft_atom_ctrl.res_memdesc, ++ iov_count, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_COMPARE_ATOMIC: ++ ft_send_retry(ret, fi_compare_atomic, ft_tx_ctrl.ep, ++ ft_tx_ctrl.buf, ft_atom_ctrl.count, ft_tx_ctrl.memdesc, ++ ft_atom_ctrl.comp_buf, ft_atom_ctrl.comp_memdesc, ++ ft_atom_ctrl.res_buf, ft_atom_ctrl.res_memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ft_atom_ctrl.datatype, ++ ft_atom_ctrl.op, ctx); ++ break; ++ case FT_FUNC_COMPARE_ATOMICV: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ ft_send_retry(ret, fi_compare_atomicv, ft_tx_ctrl.ep, ++ ft_atom_ctrl.ioc, ft_tx_ctrl.iov_desc, iov_count, ++ ft_atom_ctrl.comp_ioc, ft_atom_ctrl.comp_memdesc, ++ iov_count, ft_atom_ctrl.res_ioc, ++ ft_atom_ctrl.res_memdesc, iov_count, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.op, ctx); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_COMPARE_ATOMICMSG: ++ ft_format_iocs(ft_tx_ctrl.iov, &iov_count); ++ msg.msg_iov = ft_atom_ctrl.ioc; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = iov_count; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = ft_tx_ctrl.remote_cq_data; ++ msg.op = ft_atom_ctrl.op; ++ msg.datatype = ft_atom_ctrl.datatype; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ ++ for (i = 0, rma_iov.count = 0; i < msg.iov_count; i++) ++ rma_iov.count += ft_atom_ctrl.ioc[i].count; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ++ ft_send_retry(ret, fi_compare_atomicmsg, ft_tx_ctrl.ep, &msg, ++ ft_atom_ctrl.comp_ioc, ft_atom_ctrl.comp_memdesc, iov_count, ++ ft_atom_ctrl.res_ioc, ft_atom_ctrl.res_memdesc, ++ iov_count, test_info.msg_flags); ++ ft_next_iov_cnt(&ft_tx_ctrl, fabric_info->tx_attr->iov_limit); ++ break; ++ case FT_FUNC_INJECT_ATOMIC: ++ ft_send_retry(ret, fi_inject_atomic, ft_tx_ctrl.ep, ++ ft_tx_ctrl.buf, ft_atom_ctrl.count, ft_tx_ctrl.addr, ++ ft_mr_ctrl.peer_mr_addr, ft_mr_ctrl.peer_mr_key, ++ ft_atom_ctrl.datatype, ft_atom_ctrl.op); ++ break; ++ default: ++ ft_send_retry(ret, fi_atomic, ft_tx_ctrl.ep, ft_tx_ctrl.buf, ++ ft_atom_ctrl.count, ft_tx_ctrl.memdesc, ++ ft_tx_ctrl.addr, ft_mr_ctrl.peer_mr_addr, ++ ft_mr_ctrl.peer_mr_key, ft_atom_ctrl.datatype, ++ ft_atom_ctrl.op, ctx); ++ } ++ ++ if (ft_check_tx_completion()) ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++int ft_send_rma(void) ++{ ++ int ret; ++ ++ while (!ft_tx_ctrl.credits) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ if (test_info.test_class & FI_ATOMIC) ++ ret = ft_post_send_atomic(); ++ else ++ ret = ft_post_send_rma(); ++ ++ if (ret) { ++ FT_PRINTERR("send_rma", ret); ++ return ret; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ test_info.test_type == FT_TEST_UNIT) ++ memset(ft_tx_ctrl.buf, 0, ft_tx_ctrl.rma_msg_size); ++ ++ if (!ft_tx_ctrl.credits) { ++ ret = ft_comp_tx(0); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_post_recv_bufs(void) ++{ ++ int ret; ++ ++ for (; ft_rx_ctrl.credits; ft_rx_ctrl.credits--) { ++ if (test_info.test_class & FI_TAGGED) { ++ ret = ft_post_trecv(); ++ if (!ret) ++ ft_rx_ctrl.tag++; ++ } else { ++ ret = ft_post_recv(); ++ } ++ if (ret) { ++ if (ret == -FI_EAGAIN) ++ break; ++ FT_PRINTERR("recv", ret); ++ return ret; ++ } ++ } ++ return 0; ++} ++ ++int ft_recv_n_msg(int n) ++{ ++ int credits, ret, recved = 0; ++ ++ do { ++ if (ft_rx_ctrl.credits > (ft_rx_ctrl.max_credits >> 1)) { ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ } ++ ++ credits = ft_rx_ctrl.credits; ++ ret = ft_comp_rx(0); ++ if (ret) ++ return ret; ++ ++ //ft_comp_rx may have found multiple completions (bw testing) ++ recved += (ft_rx_ctrl.credits - credits); ++ ++ // handle manual progress. we should progress sends if ++ // we don't get any recv completions. the send could have ++ // been lost. ++ // ft_comp_tx(0); ++ } while (recved < n); ++ ++ return 0; ++} ++ ++int ft_recv_msg(void) ++{ ++ return ft_recv_n_msg(1); ++} ++ ++static int ft_rma_sync(void) ++{ ++ int ret; ++ struct fi_msg_rma msg; ++ struct iovec msg_iov; ++ struct fi_rma_iov rma_iov; ++ struct fi_context *ctx; ++ ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ ++ msg_iov.iov_base = (void *) ft_tx_ctrl.buf; ++ msg_iov.iov_len = 0; ++ msg.msg_iov = &msg_iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = 1; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ ++ rma_iov.addr = ft_mr_ctrl.peer_mr_addr; ++ rma_iov.key = ft_mr_ctrl.peer_mr_key; ++ rma_iov.len = 0; ++ ++ msg.rma_iov = &rma_iov; ++ msg.rma_iov_count = 1; ++ ++ ft_send_retry(ret, fi_writemsg, ft_tx_ctrl.ep, &msg, FI_COMPLETION); ++ ++ ft_tx_ctrl.credits--; ++ return ret; ++} ++ ++static int ft_msg_sync(void) ++{ ++ int ret; ++ struct fi_msg msg; ++ struct iovec msg_iov; ++ struct fi_context *ctx; ++ ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ ++ msg_iov.iov_base = (void *) buf; ++ msg_iov.iov_len = 0; ++ ++ msg.msg_iov = &msg_iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = 1; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ ++ ft_send_retry(ret, fi_sendmsg, ft_tx_ctrl.ep, &msg, FI_COMPLETION); ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++static int ft_tmsg_sync(void) ++{ ++ int ret; ++ struct fi_msg_tagged msg; ++ struct iovec msg_iov; ++ struct fi_context *ctx; ++ ++ ret = ft_get_ctx(&ft_tx_ctrl, &ctx); ++ if (ret) ++ return ret; ++ ++ msg_iov.iov_base = (void *) buf; ++ msg_iov.iov_len = 0; ++ ++ msg.msg_iov = &msg_iov; ++ msg.desc = ft_tx_ctrl.iov_desc; ++ msg.iov_count = 1; ++ msg.addr = ft_tx_ctrl.addr; ++ msg.context = ctx; ++ msg.data = 0; ++ msg.tag = ft_tx_ctrl.tag++; ++ msg.context = ctx; ++ ++ ft_send_retry(ret, fi_tsendmsg, ft_tx_ctrl.ep, &msg, FI_COMPLETION); ++ ft_tx_ctrl.credits--; ++ ++ return ret; ++} ++ ++int ft_send_sync_msg(void) ++{ ++ int ret; ++ ++ while (ft_tx_ctrl.credits != ft_tx_ctrl.max_credits) { ++ ret = ft_comp_tx(0); ++ if (ret) ++ return ret; ++ } ++ ++ if (test_info.test_class & FI_TAGGED) ++ ret = ft_tmsg_sync(); ++ else if (test_info.caps & FI_MSG) ++ ret = ft_msg_sync(); ++ else ++ ret = ft_rma_sync(); ++ ++ if (ret) ++ return ret; ++ ++ return ft_comp_tx(FT_COMP_TO); ++} ++ ++int ft_send_msg(void) ++{ ++ int ret; ++ ++ while (!ft_tx_ctrl.credits) { ++ ret = ft_comp_tx(FT_COMP_TO); ++ if (ret) ++ return ret; ++ } ++ ++ if (test_info.test_class & FI_TAGGED) { ++ ret = ft_post_tsend(); ++ if (!ret) ++ ft_tx_ctrl.tag++; ++ } else { ++ ret = ft_post_send(); ++ } ++ ++ if (ret) { ++ FT_PRINTERR("send", ret); ++ return ret; ++ } ++ ++ if (is_inject_func(test_info.class_function) && ++ test_info.test_type == FT_TEST_UNIT) ++ memset(ft_tx_ctrl.buf, 0, ft_tx_ctrl.msg_size); ++ ++ if (!ft_tx_ctrl.credits) { ++ ret = ft_comp_tx(0); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ft_send_dgram(void) ++{ ++ int ret; ++ ++ *(uint8_t*) ft_tx_ctrl.buf = ft_tx_ctrl.seqno++; ++ ret = ft_send_msg(); ++ return ret; ++} ++ ++int ft_send_dgram_flood(void) ++{ ++ int i, ret = 0; ++ ++ ft_tx_ctrl.seqno = 0; ++ *(uint8_t*) ft_tx_ctrl.buf = 0; ++ for (i = 0; i < ft_ctrl.xfer_iter - 1; i++) { ++ ret = ft_send_msg(); ++ if (ret) ++ break; ++ } ++ ++ return ret; ++} ++ ++int ft_recv_dgram(void) ++{ ++ int credits, ret; ++ ++ do { ++ if (ft_rx_ctrl.credits > (ft_rx_ctrl.max_credits >> 1)) { ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ return ret; ++ } ++ ++ credits = ft_rx_ctrl.credits; ++ ++ ret = ft_comp_rx(FT_DGRAM_POLL_TO); ++ if ((credits != ft_rx_ctrl.credits) && ++ (*(uint8_t *) ft_rx_ctrl.buf == ft_rx_ctrl.seqno)) { ++ ft_rx_ctrl.seqno++; ++ return 0; ++ } ++ } while (!ret); ++ ++ return (ret == -FI_EAGAIN) ? -FI_ETIMEDOUT : ret; ++} ++ ++int ft_recv_dgram_flood(size_t *recv_cnt) ++{ ++ int ret; ++ size_t cnt = 0; ++ ++ do { ++ ret = ft_post_recv_bufs(); ++ if (ret) ++ break; ++ ++ ret = ft_comp_rx(0); ++ cnt += ft_rx_ctrl.credits; ++ ++ } while (!ret && ((*(uint8_t *) ft_rx_ctrl.buf != (uint8_t) ~0) || !cnt)); ++ ++ *recv_cnt = cnt; ++ return ret; ++} ++ ++int ft_sendrecv_dgram(void) ++{ ++ int ret, try; ++ ++ for (try = 0; try < 1000; try++) { ++ ret = ft_send_dgram(); ++ if (ret) ++ return ret; ++ ++ ret = ft_recv_dgram(); ++ if (ret != -FI_ETIMEDOUT) ++ break; ++ ++ /* resend */ ++ if (test_info.test_class & FI_TAGGED) ++ ft_tx_ctrl.tag--; ++ ft_tx_ctrl.seqno--; ++ } ++ ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/av_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/av_test.c +new file mode 100644 +index 000000000..54a115a02 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/av_test.c +@@ -0,0 +1,989 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "unit_common.h" ++ ++#define MAX_ADDR 256 ++ ++char *good_address; ++int num_good_addr; ++char *bad_address; ++ ++static enum fi_av_type av_type; ++ ++static char err_buf[512]; ++ ++static int ++check_eq_readerr(struct fid_eq *eq, fid_t fid, void *context, int index) ++{ ++ int ret; ++ struct fi_eq_err_entry err_entry; ++ ++ memset(&err_entry, 0, sizeof(err_entry)); ++ ret = fi_eq_readerr(eq, &err_entry, 0); ++ if (ret != sizeof(err_entry)) { ++ sprintf(err_buf, "fi_eq_readerr ret = %d, %s", ret, ++ (ret < 0) ? fi_strerror(-ret) : "unknown"); ++ return -1; ++ } ++ if (err_entry.fid != fid) { ++ sprintf(err_buf, "fi_eq_readerr fid = %p, should be %p", ++ err_entry.fid, fid); ++ return -1; ++ } ++ if (err_entry.context != context) { ++ sprintf(err_buf, "fi_eq_readerr fid = %p, should be %p", ++ err_entry.context, context); ++ return -1; ++ } ++ if (err_entry.data != index) { ++ sprintf(err_buf, "fi_eq_readerr index = %" PRIu64 ", should be %d", ++ err_entry.data, index); ++ return -1; ++ } ++ if (err_entry.err <= 0) { ++ sprintf(err_buf, "fi_eq_readerr err = %d, should be > 0", ++ err_entry.err); ++ return -1; ++ } ++ return 0; ++} ++ ++static int ++check_eq_result(int ret, uint32_t event, struct fi_eq_entry *entry, ++ fid_t fid, void *context, uint32_t count) ++{ ++ if (ret != sizeof(*entry)) { ++ sprintf(err_buf, "fi_eq_sread ret = %d, %s", ret, ++ (ret < 0) ? fi_strerror(-ret) : "unknown"); ++ return -1; ++ } ++ if (event != FI_AV_COMPLETE) { ++ sprintf(err_buf, "fi_eq_sread event = %u, should be %u", event, ++ FI_AV_COMPLETE); ++ return -1; ++ } ++ if (entry->fid != fid) { ++ sprintf(err_buf, "fi_eq_sread fid = %p, should be %p", ++ entry->fid, fid); ++ return -1; ++ } ++ /* context == NULL means skip check */ ++ if (context != NULL && entry->context != context) { ++ sprintf(err_buf, "fi_eq_sread fid = %p, should be %p", entry->context, ++ context); ++ return -1; ++ } ++ if (count != ~0 && entry->data != count) { ++ sprintf(err_buf, "count = %" PRIu64 ", should be %u", entry->data, count); ++ return -1; ++ } ++ return 0; ++} ++ ++static int ++check_eq_sread(struct fid_eq *eq, fid_t fid, void *context, uint32_t count, ++ int timeout, uint64_t flags) ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ int ret; ++ ++ event = ~0; ++ memset(&entry, 0, sizeof(entry)); ++ ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), timeout, flags); ++ return check_eq_result(ret, event, &entry, fid, context, count); ++} ++ ++static int ++av_test_open_close(enum fi_av_type type, int count, uint64_t flags) ++{ ++ int ret; ++ struct fi_av_attr attr; ++ struct fid_av *av; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = type; ++ attr.count = count; ++ attr.flags = flags; ++ ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%d, %s) = %d, %s", ++ count, fi_tostr(&type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ return ret; ++ } ++ ++ ret = fi_close(&av->fid); ++ if (ret != 0) { ++ sprintf(err_buf, "close(av) = %d, %s", ret, fi_strerror(-ret)); ++ return ret; ++ } ++ return 0; ++} ++ ++/* ++ * Tests: ++ * - test open and close of AV ++ */ ++static int ++av_open_close() ++{ ++ int i; ++ int testret; ++ int ret; ++ int count; ++ ++ testret = FAIL; ++ ++ for (i = 0; i < 17; ++i) { ++ count = 1 << i; ++ ret = av_test_open_close(av_type, count, 0); ++ if (ret != 0) { ++ goto fail; ++ } ++ } ++ testret = PASS; ++fail: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int ++av_create_addr_sockaddr_in(char *first_address, int index, void *addr) ++{ ++ struct addrinfo hints; ++ struct addrinfo *ai; ++ struct sockaddr_in *sin; ++ uint32_t tmp; ++ int ret; ++ ++ memset(&hints, 0, sizeof(hints)); ++ ++ /* return all 0's for invalid address */ ++ if (first_address == NULL) { ++ memset(addr, 0, sizeof(*sin)); ++ return 0; ++ } ++ ++ hints.ai_family = AF_INET; ++ /* port doesn't matter, set port to discard port */ ++ ret = getaddrinfo(first_address, "discard", &hints, &ai); ++ if (ret != 0) { ++ sprintf(err_buf, "getaddrinfo: %s", gai_strerror(ret)); ++ return -1; ++ } ++ ++ sin = (struct sockaddr_in *)addr; ++ *sin = *(struct sockaddr_in *)ai->ai_addr; ++ ++ tmp = ntohl(sin->sin_addr.s_addr); ++ tmp += index; ++ sin->sin_addr.s_addr = htonl(tmp); ++ ++ freeaddrinfo(ai); ++ return 0; ++} ++ ++/* ++ * Create an address list ++ */ ++static int ++av_create_address_list(char *first_address, int base, int num_addr, ++ void *addr_array, int offset, int len) ++{ ++ int (*add_address)(char *, int, void *); ++ uint8_t *cur_addr; ++ int addrlen; ++ int ret; ++ int i; ++ ++ switch (fi->addr_format) { ++ case FI_SOCKADDR: ++ case FI_SOCKADDR_IN: ++ addrlen = sizeof(struct sockaddr_in); ++ add_address = av_create_addr_sockaddr_in; ++ break; ++ default: ++ sprintf(err_buf, "test does not yet support %s", ++ fi_tostr(&fi->addr_format, FI_TYPE_ADDR_FORMAT)); ++ return -FI_ENOSYS; ++ } ++ ++ if (len < addrlen * (offset + num_addr)) { ++ sprintf(err_buf, "internal error, not enough room for %d addresses", ++ num_addr); ++ return -FI_ENOMEM; ++ } ++ ++ cur_addr = addr_array; ++ cur_addr += offset * addrlen; ++ for (i = 0; i < num_addr; ++i) { ++ ret = add_address(first_address, base + i, cur_addr); ++ if (ret != 0) { ++ return ret; ++ } ++ cur_addr += addrlen; ++ } ++ ++ return cur_addr - (uint8_t *)addr_array; ++} ++ ++/* ++ * Tests: ++ * - synchronous resolution of good address ++ */ ++static int ++av_good_sync() ++{ ++ int testret; ++ int ret; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ int buflen; ++ fi_addr_t fi_addr; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ fi_addr = FI_ADDR_NOTAVAIL; ++ ++ buflen = sizeof(addrbuf); ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ++ ret = fi_av_insert(av, addrbuf, 1, &fi_addr, 0, NULL); ++ if (ret != 1) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ if (fi_addr == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr == FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int ++av_null_fi_addr() ++{ ++ int testret; ++ int ret; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ int buflen; ++ ++ testret = FAIL; ++ ++ if (av_type != FI_AV_TABLE) { ++ ret = 0; ++ testret = SKIPPED; ++ sprintf(err_buf, "test not valid for AV type FI_AV_MAP"); ++ goto out1; ++ } ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto out1; ++ } ++ ++ buflen = sizeof(addrbuf); ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto out2; // av_create_address_list filled err_buf ++ } ++ ++ ret = fi_av_insert(av, addrbuf, 1, NULL, 0, NULL); ++ if (ret != 1) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto out2; ++ } ++ testret = PASS; ++out2: ++ FT_CLOSE_FID(av); ++out1: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - synchronous resolution of bad address ++ */ ++static int ++av_bad_sync() ++{ ++ int testret; ++ int ret; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ int buflen; ++ fi_addr_t fi_addr; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ fi_addr = ~FI_ADDR_NOTAVAIL; ++ ++ buflen = sizeof(addrbuf); ++ ret = av_create_address_list(bad_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ++ ret = fi_av_insert(av, addrbuf, 1, &fi_addr, 0, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_insert ret=%d, should be 0", ret); ++ goto fail; ++ } ++ if (fi_addr != FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, ++ "fi_addr = 0x%" PRIx64 ", should be 0x%" PRIx64" (FI_ADDR_NOTAVAIL)", ++ fi_addr, FI_ADDR_NOTAVAIL); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - sync vector with 1 good and 1 bad ++ */ ++static int ++av_goodbad_vector_sync() ++{ ++ int testret; ++ int ret; ++ int i; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ int buflen; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ for (i = 0; i < MAX_ADDR; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ fi_addr[1] = ~FI_ADDR_NOTAVAIL; ++ ++ buflen = sizeof(addrbuf); ++ ++ /* vector is good address + bad address */ ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = av_create_address_list(bad_address, 0, 1, addrbuf, 1, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = fi_av_insert(av, addrbuf, 2, fi_addr, 0, NULL); ++ if (ret != 1) { ++ sprintf(err_buf, "fi_av_insert ret=%d, should be 1", ret); ++ goto fail; ++ } ++ ++ /* ++ * Check returned fi_addrs ++ */ ++ if (fi_addr[0] == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[0] = FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ if (fi_addr[1] != FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[1] != FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - async good vector ++ */ ++static int ++av_good_vector_async() ++{ ++ int testret; ++ int ret; ++ int i; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ uint32_t ctx; ++ int buflen; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ attr.flags = FI_EVENT; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ret = fi_av_bind(av, &eq->fid, 0); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_bind() = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ for (i = 0; i < MAX_ADDR; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ ++ buflen = sizeof(addrbuf); ++ ret = av_create_address_list(good_address, 0, num_good_addr, ++ addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ++ for (i = 0; i < num_good_addr; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ ret = fi_av_insert(av, addrbuf, num_good_addr, fi_addr, 0, &ctx); ++ if (ret) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ if (check_eq_sread(eq, &av->fid, &ctx, num_good_addr, 20000, 0) != 0) { ++ goto fail; ++ } ++ for (i = 0; i < num_good_addr; ++i) { ++ if (fi_addr[i] == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[%d] = FI_ADDR_NOTAVAIL", i); ++ goto fail; ++ } ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - async good vector ++ */ ++static int ++av_zero_async() ++{ ++ int testret; ++ int ret; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ uint32_t ctx; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ attr.flags = FI_EVENT; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ret = fi_av_bind(av, &eq->fid, 0); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_bind() = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = fi_av_insert(av, addrbuf, 0, fi_addr, 0, &ctx); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ if (check_eq_sread(eq, &av->fid, &ctx, 0, 20000, 0) != 0) { ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - async 2 good vectors ++ */ ++static int ++av_good_2vector_async() ++{ ++ int testret; ++ int ret; ++ int i; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ uint32_t event; ++ struct fi_eq_entry entry; ++ uint32_t ctx[2]; ++ int buflen; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ attr.flags = FI_EVENT; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ret = fi_av_bind(av, &eq->fid, 0); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_bind() = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ for (i = 0; i < MAX_ADDR; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ ++ buflen = sizeof(addrbuf); ++ ++ /* 1st vector is just first address */ ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = fi_av_insert(av, addrbuf, 1, fi_addr, FI_MORE, &ctx[0]); ++ if (ret) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ctx[0] = 1; ++ ++ /* 2nd vector is remaining addresses */ ++ ret = av_create_address_list(good_address, 1, num_good_addr-1, ++ addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = fi_av_insert(av, addrbuf, num_good_addr-1, &fi_addr[1], 0, &ctx[1]); ++ if (ret != num_good_addr-1) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ctx[1] = num_good_addr-1; ++ ++ /* ++ * Handle completions in either order ++ */ ++ for (i = 0; i < 2; ++i) { ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), 20000, 0); ++ ret = check_eq_result(ret, event, &entry, &av->fid, NULL, ~0); ++ if (ret != 0) { ++ goto fail; ++ } ++ if (entry.context != &ctx[0] && entry.context != &ctx[1]) { ++ sprintf(err_buf, "bad context: %p", entry.context); ++ goto fail; ++ } ++ if (*(uint32_t *)(entry.context) == ~0) { ++ sprintf(err_buf, "duplicate context: %p", entry.context); ++ goto fail; ++ } ++ if (*(uint32_t *)(entry.context) != entry.data) { ++ sprintf(err_buf, "count = %" PRIu64 ", should be %d", entry.data, ++ *(uint32_t *)(entry.context)); ++ goto fail; ++ } ++ *(uint32_t *)(entry.context) = ~0; ++ } ++ for (i = 0; i < num_good_addr; ++i) { ++ if (fi_addr[i] == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[%d] = FI_ADDR_NOTAVAIL", i); ++ goto fail; ++ } ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - async vector with 1 good and 1 bad ++ */ ++static int ++av_goodbad_vector_async() ++{ ++ int testret; ++ int ret; ++ int i; ++ struct fid_av *av; ++ struct fi_av_attr attr; ++ uint8_t addrbuf[4096]; ++ uint32_t event; ++ uint32_t ctx; ++ struct fi_eq_entry entry; ++ int buflen; ++ fi_addr_t fi_addr[MAX_ADDR]; ++ ++ testret = FAIL; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.type = av_type; ++ attr.count = 32; ++ attr.flags = FI_EVENT; ++ ++ av = NULL; ++ ret = fi_av_open(domain, &attr, &av, NULL); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_open(%s) = %d, %s", ++ fi_tostr(&av_type, FI_TYPE_AV_TYPE), ++ ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ret = fi_av_bind(av, &eq->fid, 0); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_av_bind() = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ for (i = 0; i < MAX_ADDR; ++i) { ++ fi_addr[i] = FI_ADDR_NOTAVAIL; ++ } ++ fi_addr[1] = ~FI_ADDR_NOTAVAIL; ++ ++ buflen = sizeof(addrbuf); ++ ++ /* vector is good address + bad address */ ++ ret = av_create_address_list(good_address, 0, 1, addrbuf, 0, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = av_create_address_list(bad_address, 0, 1, addrbuf, 1, buflen); ++ if (ret < 0) { ++ goto fail; // av_create_address_list filled err_buf ++ } ++ ret = fi_av_insert(av, addrbuf, 2, fi_addr, 0, &ctx); ++ if (ret) { ++ sprintf(err_buf, "fi_av_insert ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* ++ * Read event after sync, verify we get FI_EAVAIL, then read and ++ * verify the error completion ++ */ ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), 20000, 0); ++ if (ret != -FI_EAVAIL) { ++ sprintf(err_buf, "fi_eq_sread ret = %d, should be -FI_EAVAIL", ret); ++ goto fail; ++ } ++ ret = check_eq_readerr(eq, &av->fid, &ctx, 1); ++ if (ret != 0) { ++ goto fail; ++ } ++ ++ /* ++ * Now we should get a good completion, and all fi_addr except fd_addr[1] ++ * should have good values. ++ */ ++ if (check_eq_sread(eq, &av->fid, &ctx, 1, 20000, 0) != 0) { ++ goto fail; ++ } ++ if (fi_addr[0] == FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[0] = FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ if (fi_addr[1] != FI_ADDR_NOTAVAIL) { ++ sprintf(err_buf, "fi_addr[1] != FI_ADDR_NOTAVAIL"); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(av); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++struct test_entry test_array_good[] = { ++ TEST_ENTRY(av_open_close, "Test open and close AVs of varying sizes"), ++ TEST_ENTRY(av_good_sync, "Test sync AV insert with good address"), ++ TEST_ENTRY(av_null_fi_addr, "Test AV insert without specifying fi_addr"), ++ TEST_ENTRY(av_good_vector_async, ++ "Test async AV insert with vector of good addresses"), ++ TEST_ENTRY(av_zero_async, "Test async insert AV insert of zero addresses"), ++ TEST_ENTRY(av_good_2vector_async, ++ "Test async AV inserts with two address vectors"), ++ { NULL, "" } ++}; ++ ++struct test_entry test_array_bad[] = { ++ TEST_ENTRY(av_bad_sync, "Test sync AV insert of bad address"), ++ TEST_ENTRY(av_goodbad_vector_sync, ++ "Test sync AV insert of 1 good and 1 bad address"), ++ TEST_ENTRY(av_goodbad_vector_async, ++ "Test async AV insert with good and bad address"), ++ { NULL, "" } ++}; ++ ++int ++run_test_set() ++{ ++ int failed; ++ ++ failed = 0; ++ ++ failed += run_tests(test_array_good, err_buf); ++ if (bad_address != NULL) { ++ printf("\nTesting with bad_address = \"%s\"\n", bad_address); ++ failed += run_tests(test_array_bad, err_buf); ++ } ++ ++ bad_address = NULL; ++ printf("\nTesting with invalid address\n"); ++ failed += run_tests(test_array_bad, err_buf); ++ ++ return failed; ++} ++ ++static void usage(void) ++{ ++ ft_unit_usage("av_test", "Unit test for Address Vector (AV)"); ++ FT_PRINT_OPTS_USAGE("-g ", ""); ++ FT_PRINT_OPTS_USAGE("-G ]", ""); ++ fprintf(stderr, FT_OPTS_USAGE_FORMAT " (max=%d)\n", "-n ", ++ "Number of good addresses", MAX_ADDR - 1); ++ FT_PRINT_OPTS_USAGE("-s ", ""); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed; ++ ++ opts = INIT_OPTS; ++ opts.options |= FT_OPT_SIZE; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "g:G:n:s:h")) != -1) { ++ switch (op) { ++ case 'g': ++ good_address = optarg; ++ break; ++ case 'G': ++ bad_address = optarg; ++ break; ++ case 'n': ++ num_good_addr = atoi(optarg); ++ break; ++ case 's': ++ opts.src_addr = optarg; ++ break; ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ ++ } ++ } ++ ++ if (good_address == NULL || num_good_addr == 0) { ++ printf("Test requires -g and -n\n"); ++ return EXIT_FAILURE; ++ } ++ ++ if (num_good_addr > MAX_ADDR - 1) { ++ printf("num_good_addr = %d is too big, dropped to %d\n", ++ num_good_addr, MAX_ADDR); ++ num_good_addr = MAX_ADDR - 1; ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ hints->addr_format = FI_SOCKADDR; ++ ++ // TODO make this test accept endpoint type argument ++ hints->ep_attr->type = FI_EP_RDM; ++ ret = fi_getinfo(FT_FIVERSION, opts.src_addr, 0, FI_SOURCE, hints, &fi); ++ ++ if (ret && ret != -FI_ENODATA) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ ++ if (ret == -FI_ENODATA) { ++ hints->ep_attr->type = FI_EP_DGRAM; ++ ret = fi_getinfo(FT_FIVERSION, opts.src_addr, 0, FI_SOURCE, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto err; ++ ++ printf("Testing AVs on fabric %s\n", fi->fabric_attr->name); ++ failed = 0; ++ ++ if (fi->domain_attr->av_type == FI_AV_UNSPEC || ++ fi->domain_attr->av_type == FI_AV_MAP) { ++ av_type = FI_AV_MAP; ++ printf("\nTesting with type = FI_AV_MAP\n"); ++ failed += run_test_set(); ++ } ++ ++ if (fi->domain_attr->av_type == FI_AV_UNSPEC || ++ fi->domain_attr->av_type == FI_AV_TABLE) { ++ av_type = FI_AV_TABLE; ++ printf("\nTesting with type = FI_AV_TABLE\n"); ++ failed += run_test_set(); ++ } ++ ++ if (failed > 0) { ++ printf("\nSummary: %d tests failed\n", failed); ++ } else { ++ printf("\nSummary: all tests passed\n"); ++ } ++ ++err: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cntr_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cntr_test.c +new file mode 100644 +index 000000000..52431d99b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cntr_test.c +@@ -0,0 +1,203 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "unit_common.h" ++#include "shared.h" ++ ++ ++static char err_buf[512]; ++#define MAX_COUNTER_CHECK 100 ++ ++ ++static int cntr_loop() ++{ ++ size_t i, opened, cntr_cnt; ++ uint64_t value, expected; ++ struct timespec start, stop; ++ int ret, testret = FAIL, timeout = 5000; ++ ++ cntr_cnt = MIN(fi->domain_attr->cntr_cnt, MAX_COUNTER_CHECK); ++ struct fid_cntr **cntrs = calloc(cntr_cnt, sizeof(struct fid_cntr *)); ++ if (!cntrs) { ++ perror("calloc"); ++ return -FI_ENOMEM; ++ } ++ ++ for (opened = 0; opened < cntr_cnt; opened++) { ++ ret = ft_cntr_open(&cntrs[opened]); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ goto close; ++ } ++ } ++ ++ for (i = 0; i < opened; i++) { ++ ret = fi_cntr_set(cntrs[i], i); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_set", ret); ++ goto close; ++ } ++ ++ ret = fi_cntr_seterr(cntrs[i], i << 1); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_seterr", ret); ++ goto close; ++ } ++ } ++ ++ for (i = 0; i < opened; i++) { ++ ret = fi_cntr_add(cntrs[i], i); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_add", ret); ++ goto close; ++ } ++ ++ ret = fi_cntr_adderr(cntrs[i], i); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_adderr", ret); ++ goto close; ++ } ++ } ++ ++ for (i = 0; i < opened; i++) { ++ clock_gettime(CLOCK_MONOTONIC, &start); ++ expected = i + i; ++ do { ++ value = fi_cntr_read(cntrs[i]); ++ clock_gettime(CLOCK_MONOTONIC, &stop); ++ sched_yield(); ++ } while ((value != expected) && ++ ((stop.tv_sec - start.tv_sec) > timeout)); ++ if (value != expected) { ++ FT_PRINTERR("fi_cntr_read", value); ++ goto close; ++ } ++ ++ clock_gettime(CLOCK_MONOTONIC, &start); ++ expected = (i << 1) + i; ++ do { ++ value = fi_cntr_readerr(cntrs[i]); ++ clock_gettime(CLOCK_MONOTONIC, &stop); ++ sched_yield(); ++ } while ((value != expected) && ++ ((stop.tv_sec - start.tv_sec) > timeout)); ++ if (value != expected) { ++ FT_PRINTERR("fi_cntr_readerr", value); ++ goto close; ++ } ++ } ++ testret = PASS; ++ ++close: ++ for (i = 0; i < opened; i++) { ++ ret = fi_close(&(cntrs[i])->fid); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_close", ret); ++ break; ++ } ++ } ++ ++ if (i < cntr_cnt) ++ testret = FAIL; ++ ++ free(cntrs); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++struct test_entry test_array[] = { ++ TEST_ENTRY(cntr_loop, "Test counter open/set/read/close operations"), ++ { NULL, "" } ++}; ++ ++static void usage(void) ++{ ++ ft_unit_usage("cntr_test", "Unit test for counter (cntr)"); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed = 0; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto out; ++ } ++ ++ if (!fi->domain_attr->cntr_cnt) ++ goto out; ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto out; ++ ++ printf("Testing CNTRS on fabric %s\n", fi->fabric_attr->name); ++ ++ failed = run_tests(test_array, err_buf); ++ if (failed > 0) ++ printf("Summary: %d tests failed\n", failed); ++ else ++ printf("Summary: all tests passed\n"); ++ ++out: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/common.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/common.c +new file mode 100644 +index 000000000..998a7d7b3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/common.c +@@ -0,0 +1,91 @@ ++/* ++ * Copyright (c) 2013-2014 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "unit_common.h" ++ ++void ft_unit_usage(char *name, char *desc) ++{ ++ fprintf(stderr, "Usage:\n"); ++ fprintf(stderr, " %s [OPTIONS]\n", name); ++ ++ if (desc) ++ fprintf(stderr, "\n%s\n", desc); ++ ++ fprintf(stderr, "\nOptions:\n"); ++ FT_PRINT_OPTS_USAGE("-f ", "specific fabric to use"); ++ FT_PRINT_OPTS_USAGE("-d ", "domain name"); ++ FT_PRINT_OPTS_USAGE("-p ", "specific provider name eg sockets, verbs"); ++ FT_PRINT_OPTS_USAGE("-h", "display this help output"); ++} ++ ++int ++run_tests(struct test_entry *test_array, char *err_buf) ++{ ++ int ret; ++ struct test_entry *tep; ++ int failed; ++ ++ failed = 0; ++ ++ tep = test_array; ++ while (tep->test != NULL) { ++ printf("Running %s [%s]...", tep->name, tep->desc); ++ fflush(stdout); ++ ret = tep->test(); ++ switch (ret) { ++ case PASS: ++ printf("PASS!\n"); ++ break; ++ case FAIL: ++ printf("FAIL: %s\n", err_buf); ++ failed++; ++ break; ++ case SKIPPED: ++ printf("skipped because: %s\n", err_buf); ++ break; ++ case NOTSUPP: ++ printf("requires unsupported feature: %s\n", err_buf); ++ break; ++ default: ++ printf("FATAL: unexpected code: %d\n", ret); ++ return failed + 1; ++ break; ++ } ++ ++ ++tep; ++ } ++ ++ return failed; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cq_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cq_test.c +new file mode 100644 +index 000000000..03685a212 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/cq_test.c +@@ -0,0 +1,261 @@ ++/* ++ * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "unit_common.h" ++#include "shared.h" ++ ++static char err_buf[512]; ++ ++static int ++create_cq(struct fid_cq **cq, size_t size, uint64_t flags, ++ enum fi_cq_format format, enum fi_wait_obj wait_obj) ++{ ++ struct fi_cq_attr cq_attr; ++ ++ memset(&cq_attr, 0, sizeof(cq_attr)); ++ cq_attr.size = size; ++ cq_attr.flags = flags; ++ cq_attr.format = format; ++ cq_attr.wait_obj = wait_obj; ++ ++ return fi_cq_open(domain, &cq_attr, cq, NULL); ++} ++ ++/* Try opening fi->domain_attr->cq_cnt number of completion queues ++ * simultaneously using a size hint of 0 (indicating the provider should choose ++ * the size) ++ */ ++static int cq_open_close_simultaneous(void) ++{ ++ int ret; ++ int opened; ++ size_t count; ++ int testret = FAIL; ++ struct fid_cq **cq_array; ++ ++ count = fi->domain_attr->cq_cnt; ++ FT_DEBUG("testing creation of up to %zu simultaneous CQs\n", count); ++ ++ cq_array = calloc(count, sizeof(*cq_array)); ++ if (!cq_array) ++ return -FI_ENOMEM; ++ ++ ret = 0; ++ for (opened = 0; opened < count && !ret; opened++) { ++ ret = create_cq(&cq_array[opened], 0, 0, FI_CQ_FORMAT_UNSPEC, ++ FI_WAIT_UNSPEC); ++ } ++ if (ret) { ++ FT_WARN("fi_cq_open failed after %d (cq_cnt: %zu): %s", ++ opened, count, fi_strerror(-ret)); ++ } ++ ++ testret = PASS; ++ ++ FT_CLOSEV_FID(cq_array, opened); ++ free(cq_array); ++ ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - test open and close of CQ over a range of sizes ++ */ ++static int ++cq_open_close_sizes() ++{ ++ int i; ++ int ret; ++ int size; ++ int testret; ++ struct fid_cq *cq; ++ ++ testret = FAIL; ++ ++ for (i = -1; i < 17; ++i) { ++ size = (i < 0) ? 0 : 1 << i; ++ ++ ret = create_cq(&cq, size, 0, FI_CQ_FORMAT_UNSPEC, FI_WAIT_UNSPEC); ++ if (ret == -FI_EINVAL) { ++ FT_WARN("\nSuccessfully completed %d iterations up to " ++ "size %d before the provider returned " ++ "EINVAL...", ++ i + 1, size >> 1); ++ ret = 0; ++ goto pass; ++ } ++ if (ret != 0) { ++ sprintf(err_buf, "fi_cq_open(%d, 0, FI_CQ_FORMAT_UNSPEC, " ++ "FI_WAIT_UNSPEC) = %d, %s", ++ size, ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = fi_close(&cq->fid); ++ if (ret != 0) { ++ sprintf(err_buf, "close(cq) = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ cq = NULL; ++ } ++ ++pass: ++ testret = PASS; ++fail: ++ cq = NULL; ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int ++cq_signal() ++{ ++ struct fid_cq *cq; ++ struct fi_cq_tagged_entry entry; ++ int64_t elapsed; ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_cq(&cq, 1, 0, FI_CQ_FORMAT_UNSPEC, FI_WAIT_UNSPEC); ++ if (ret) { ++ sprintf(err_buf, "fi_cq_open(1, 0, FI_CQ_FORMAT_UNSPEC, " ++ "FI_WAIT_UNSPEC) = %d, %s", ++ ret, fi_strerror(-ret)); ++ goto fail1; ++ } ++ ++ ret = fi_cq_signal(cq); ++ if (ret) { ++ sprintf(err_buf, "fi_cq_signal = %d %s", ret, fi_strerror(-ret)); ++ goto fail2; ++ } ++ ++ ft_start(); ++ ret = fi_cq_sread(cq, &entry, 1, NULL, 2000); ++ ft_stop(); ++ elapsed = get_elapsed(&start, &end, MILLI); ++ if (ret != -FI_EAGAIN && ret != -FI_ECANCELED) { ++ sprintf(err_buf, "fi_cq_sread = %d %s", ret, fi_strerror(-ret)); ++ goto fail2; ++ } ++ ++ if (elapsed > 1000) { ++ sprintf(err_buf, "fi_cq_sread - signal ignored"); ++ goto fail2; ++ } ++ ++ ret = fi_close(&cq->fid); ++ if (ret) { ++ sprintf(err_buf, "close(cq) = %d, %s", ret, fi_strerror(-ret)); ++ goto fail1; ++ } ++ cq = NULL; ++ ++ testret = PASS; ++fail2: ++ FT_CLOSE_FID(cq); ++fail1: ++ cq = NULL; ++ return TEST_RET_VAL(ret, testret); ++} ++ ++ ++struct test_entry test_array[] = { ++ TEST_ENTRY(cq_open_close_sizes, "Test open and close of CQ for various sizes"), ++ TEST_ENTRY(cq_open_close_simultaneous, "Test opening several CQs at a time"), ++ TEST_ENTRY(cq_signal, "Test fi_cq_signal"), ++ { NULL, "" } ++}; ++ ++static void usage(void) ++{ ++ ft_unit_usage("cq_test", "Unit test for Completion Queue (CQ)"); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto err; ++ ++ printf("Testing CQs on fabric %s\n", fi->fabric_attr->name); ++ ++ failed = run_tests(test_array, err_buf); ++ if (failed > 0) { ++ printf("Summary: %d tests failed\n", failed); ++ } else { ++ printf("Summary: all tests passed\n"); ++ } ++ ++err: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/dom_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/dom_test.c +new file mode 100644 +index 000000000..65379978d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/dom_test.c +@@ -0,0 +1,134 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "unit_common.h" ++ ++#define MAX_ADDR 256 ++ ++static struct fid_domain **domain_vec = NULL; ++ ++/* ++ * Tests: ++ * - test open and close of a domain ++ */ ++ ++static void usage(void) ++{ ++ ft_unit_usage("dom_test", "Unit test for Domain"); ++ FT_PRINT_OPTS_USAGE("-n ", "num domains to open"); ++} ++ ++int main(int argc, char **argv) ++{ ++ unsigned long i; ++ int op, ret = 0; ++ unsigned long num_domains = 1; ++ char *ptr; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "n:h")) != -1) { ++ switch (op) { ++ case 'n': ++ errno = 0; ++ num_domains = strtol(optarg, &ptr, 10); ++ if (ptr == optarg || *ptr != '\0' || ++ ((num_domains == LONG_MIN || num_domains == LONG_MAX) && errno == ERANGE)) { ++ fprintf(stderr, "Cannot convert from string to long\n"); ++ goto out; ++ } ++ break; ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto out; ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto out; ++ ++ domain_vec = calloc(num_domains, sizeof(*domain_vec)); ++ if (domain_vec == NULL) { ++ perror("malloc"); ++ ret = EXIT_FAILURE; ++ goto out; ++ } ++ ++ /* Common code will open one domain */ ++ for (i = 1; i < num_domains; i++) { ++ ret = fi_domain(fabric, fi, &domain_vec[i], NULL); ++ if (ret != FI_SUCCESS) { ++ printf("fi_domain num %lu %s\n", i, fi_strerror(-ret)); ++ break; ++ } ++ } ++ ++ while (--i > 0) { ++ ret = fi_close(&domain_vec[i]->fid); ++ if (ret != FI_SUCCESS) { ++ printf("Error %d closing domain num %lu: %s\n", ret, ++ i, fi_strerror(-ret)); ++ break; ++ } ++ } ++ ++ free(domain_vec); ++out: ++ ft_free_res(); ++ return ft_exit_code(ret); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/eq_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/eq_test.c +new file mode 100644 +index 000000000..f578d9fb3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/eq_test.c +@@ -0,0 +1,644 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "unit_common.h" ++#include "shared.h" ++ ++static char err_buf[512]; ++ ++static int ++create_eq(size_t size, uint64_t flags, enum fi_wait_obj wait_obj) ++{ ++ struct fi_eq_attr eq_attr; ++ ++ memset(&eq_attr, 0, sizeof(eq_attr)); ++ eq_attr.size = size; ++ eq_attr.flags = flags; ++ eq_attr.wait_obj = wait_obj; ++ ++ return fi_eq_open(fabric, &eq_attr, &eq, NULL); ++} ++ ++/* ++ * Tests: ++ * - test open and close of EQ over a range of sizes ++ */ ++static int ++eq_open_close() ++{ ++ int i; ++ int ret; ++ int size; ++ int testret; ++ ++ testret = FAIL; ++ ++ for (i = 0; i < 17; ++i) { ++ size = 1 << i; ++ ret = create_eq(size, 0, FI_WAIT_UNSPEC); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open(%d, 0, FI_WAIT_UNSPEC) = %d, %s", ++ size, ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = fi_close(&eq->fid); ++ if (ret != 0) { ++ sprintf(err_buf, "close(eq) = %d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ eq = NULL; ++ } ++ testret = PASS; ++ ++fail: ++ eq = NULL; ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - writing to EQ ++ * - reading from EQ with and without FI_PEEK ++ * - underflow read ++ */ ++static int ++eq_write_read_self() ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ int testret; ++ int ret; ++ int i; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_NONE); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* Insert some events */ ++ for (i = 0; i < 5; ++i) { ++ if (i & 1) { ++ entry.fid = &fabric->fid; ++ } else { ++ entry.fid = &eq->fid; ++ } ++ entry.context = (void *)(uintptr_t)i; ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ } ++ ++ /* Now read them back, peeking first at each one */ ++ for (i = 0; i < 10; ++i) { ++ event = ~0; ++ memset(&entry, 0, sizeof(entry)); ++ ret = fi_eq_read(eq, &event, &entry, sizeof(entry), ++ (i & 1) ? 0 : FI_PEEK); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_read ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ if (event != FI_NOTIFY) { ++ sprintf(err_buf, "iter %d: event = %d, should be %d\n", i, event, ++ FI_NOTIFY); ++ goto fail; ++ } ++ ++ if ((int)(uintptr_t)entry.context != i / 2) { ++ sprintf(err_buf, "iter %d: context mismatch %d != %d", i, ++ (int)(uintptr_t)entry.context, i / 2); ++ goto fail; ++ } ++ ++ if (entry.fid != ((i & 2) ? &fabric->fid : &eq->fid)) { ++ sprintf(err_buf, "iter %d: fid mismatch %p != %p", i, ++ entry.fid, ((i & 2) ? &fabric->fid : &eq->fid)); ++ goto fail; ++ } ++ } ++ ++ /* queue is now empty */ ++ ret = fi_eq_read(eq, &event, &entry, sizeof(entry), 0); ++ if (ret != -FI_EAGAIN) { ++ sprintf(err_buf, "fi_eq_read of empty EQ returned %d", ret); ++ goto fail; ++ } ++ testret = PASS; ++ ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - eq size test ++ */ ++static int ++eq_size_verify() ++{ ++ struct fi_eq_entry entry; ++ int testret; ++ int ret; ++ int i; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_NONE); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* Insert some events */ ++ for (i = 0; i < 32; ++i) { ++ entry.fid = &fabric->fid; ++ entry.context = (void *)(uintptr_t)i; ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ } ++ ++ testret = PASS; ++ ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - extracting FD from EQ with FI_WAIT_FD ++ * - wait on fd with nothing pending ++ * - wait on fd with event pending ++ */ ++static int ++eq_wait_fd_poll() ++{ ++ int fd; ++ struct fi_eq_entry entry; ++ struct pollfd pfd; ++ struct fid *fids[1]; ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_FD); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = fi_control(&eq->fid, FI_GETWAIT, &fd); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_control ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ fids[0] = &eq->fid; ++ if (fi_trywait(fabric, fids, 1) != FI_SUCCESS) { ++ sprintf(err_buf, "fi_trywait ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ pfd.fd = fd; ++ pfd.events = POLLIN; ++ ret = poll(&pfd, 1, 0); ++ if (ret < 0) { ++ sprintf(err_buf, "poll errno=%d, %s", errno, fi_strerror(-errno)); ++ goto fail; ++ } ++ if (ret > 0) { ++ sprintf(err_buf, "poll returned %d, should be 0", ret); ++ goto fail; ++ } ++ ++ /* write an event */ ++ entry.fid = &eq->fid; ++ entry.context = eq; ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ pfd.fd = fd; ++ pfd.events = POLLIN; ++ ret = poll(&pfd, 1, 0); ++ if (ret < 0) { ++ sprintf(err_buf, "poll errno=%d, %s", errno, fi_strerror(-errno)); ++ goto fail; ++ } ++ if (ret != 1) { ++ sprintf(err_buf, "poll returned %d, should be 1", ret); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int insert_events(size_t count) ++{ ++ struct fi_eq_entry entry; ++ size_t i; ++ int ret; ++ ++ for (i = 0; i < count; i++) { ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, ++ fi_strerror(-ret)); ++ return ret; ++ } ++ } ++ ++ return FI_SUCCESS; ++} ++ ++static int read_events(size_t count, uint64_t flags) ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ size_t i; ++ int ret; ++ ++ for (i = 0; i < count; i++) { ++ memset(&entry, 0, sizeof(entry)); ++ event = 0; ++ ++ ret = fi_eq_read(eq, &event, &entry, sizeof(entry), flags); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_read ret=%d, %s", ret, ++ fi_strerror(-ret)); ++ return ret; ++ } ++ ++ if (event != FI_NOTIFY) { ++ sprintf(err_buf, "iter %zu: event = %d, should be %d\n", ++ i, event, FI_NOTIFY); ++ return -FI_EOTHER; ++ } ++ } ++ ++ return FI_SUCCESS; ++} ++ ++static int sread_event(int timeout, uint64_t flags) ++{ ++ struct fi_eq_entry entry; ++ int64_t elapsed; ++ uint32_t event; ++ int ret; ++ ++ ft_start(); ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), timeout, flags); ++ ft_stop(); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_sread returned %d, %s", ret, ++ fi_strerror(-ret)); ++ return ret; ++ } ++ ++ /* check timeout accuracy */ ++ elapsed = get_elapsed(&start, &end, MILLI); ++ if (elapsed > (int) (timeout * 1.25)) { ++ sprintf(err_buf, "fi_eq_sread slept %d ms, expected %d", ++ (int) elapsed, timeout); ++ return -FI_EOTHER; ++ } ++ ++ return FI_SUCCESS; ++} ++ ++/* Make sure the peeking works fine on normal read. */ ++static int eq_wait_read_peek(void) ++{ ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_NONE); ++ if (ret) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, ++ fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = insert_events(5); ++ if (ret) ++ goto fail; ++ ++ ret = read_events(5, FI_PEEK); ++ if (ret) ++ goto fail; ++ ++ ret = read_events(5, 0); ++ if (ret) ++ goto fail; ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* Check that the peeking doesn't affect the waiting. If the peek invalidly ++ * clears the FD, then this will fail. ++ */ ++static int eq_wait_sread_peek(void) ++{ ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_FD); ++ if (ret) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, ++ fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* Write an event */ ++ ret = insert_events(1); ++ if (ret) ++ goto fail; ++ ++ /* Make sure we can read the event */ ++ ret = sread_event(2000, 0); ++ if (ret) ++ goto fail; ++ ++ /* Write another event */ ++ ret = insert_events(1); ++ if (ret) ++ goto fail; ++ ++ /* Peek at the event */ ++ ret = sread_event(2000, FI_PEEK); ++ if (ret) ++ goto fail; ++ ++ /* Make sure the event is still available for reading */ ++ ret = sread_event(2000, 0); ++ if (ret) ++ goto fail; ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++/* ++ * Tests: ++ * - sread with event pending ++ * - sread with no event pending ++ */ ++static int ++eq_wait_fd_sread() ++{ ++ struct fi_eq_entry entry; ++ uint32_t event; ++ int64_t elapsed; ++ int testret; ++ int ret; ++ ++ testret = FAIL; ++ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_FD); ++ if (ret != 0) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* timed sread on empty EQ, 2s timeout */ ++ ft_start(); ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), 2000, 0); ++ ft_stop(); ++ if (ret != -FI_EAGAIN) { ++ sprintf(err_buf, "fi_eq_read of empty EQ returned %d", ret); ++ goto fail; ++ } ++ ++ /* check timeout accuracy */ ++ elapsed = get_elapsed(&start, &end, MILLI); ++ if (elapsed < 1500 || elapsed > 2500) { ++ sprintf(err_buf, "fi_eq_sread slept %d ms, expected 2000", ++ (int)elapsed); ++ goto fail; ++ } ++ ++ /* write an event */ ++ entry.fid = &eq->fid; ++ entry.context = eq; ++ ret = fi_eq_write(eq, FI_NOTIFY, &entry, sizeof(entry), 0); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_write ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ event = ~0; ++ memset(&entry, 0, sizeof(entry)); ++ /* timed sread on EQ with event, 2s timeout */ ++ ft_start(); ++ ret = fi_eq_sread(eq, &event, &entry, sizeof(entry), 2000, 0); ++ ft_stop(); ++ if (ret != sizeof(entry)) { ++ sprintf(err_buf, "fi_eq_read ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ /* check that no undue waiting occurred */ ++ elapsed = get_elapsed(&start, &end, MILLI); ++ if (elapsed > 5) { ++ sprintf(err_buf, "fi_eq_sread slept %d ms, expected immediate return", ++ (int)elapsed); ++ goto fail; ++ } ++ ++ if (event != FI_NOTIFY) { ++ sprintf(err_buf, "fi_eq_sread: event = %d, should be %d\n", event, ++ FI_NOTIFY); ++ goto fail; ++ } ++ if (entry.fid != &eq->fid) { ++ sprintf(err_buf, "fi_eq_sread: fid mismatch: %p should be %p\n", ++ entry.fid, &eq->fid); ++ goto fail; ++ } ++ if (entry.context != eq) { ++ sprintf(err_buf, "fi_eq_sread: context mismatch: %p should be %p\n", ++ entry.context, eq); ++ goto fail; ++ } ++ ++ testret = PASS; ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int ++eq_readerr_ret_eagain() ++{ ++ int testret; ++ int ret; ++ struct fi_eq_err_entry err_entry; ++ ++ testret = FAIL; ++ ++ memset(&err_entry, 0, sizeof(err_entry)); ++ ++ /* create EQ */ ++ ret = create_eq(32, FI_WRITE, FI_WAIT_UNSPEC); ++ if (ret) { ++ sprintf(err_buf, "fi_eq_open ret=%d, %s", ret, fi_strerror(-ret)); ++ goto fail; ++ } ++ ++ ret = insert_events(5); ++ if (ret) ++ goto fail; ++ ++ ret = read_events(5, 0); ++ if (ret) ++ goto fail; ++ ++ /* Error handling */ ++ ret = fi_eq_readerr(eq, &err_entry, 0); ++ if (ret == -FI_EAGAIN) ++ testret = PASS; ++ else ++ sprintf(err_buf, ", fi_eq_readerr returned: %d: %s, ", ret, ++ fi_eq_strerror(eq, err_entry.prov_errno, err_entry.err_data, NULL, 0)); ++ ++fail: ++ FT_CLOSE_FID(eq); ++ return TEST_RET_VAL(ret, testret); ++} ++ ++struct test_entry test_array[] = { ++ TEST_ENTRY(eq_open_close, "Test open and close of EQ for various sizes"), ++ TEST_ENTRY(eq_write_read_self, "Test writing and reading to EQ"), ++ TEST_ENTRY(eq_size_verify, "Test EQ supports writing # of entries = size"), ++ TEST_ENTRY(eq_wait_fd_poll, "Test polling on fd extracted from EQ"), ++ TEST_ENTRY(eq_wait_fd_sread, "Test EQ sread"), ++ TEST_ENTRY(eq_wait_read_peek, "Test EQ read with FI_PEEK"), ++ TEST_ENTRY(eq_wait_sread_peek, "Test EQ sread with FI_PEEK"), ++ TEST_ENTRY(eq_readerr_ret_eagain, "Test EQ readerr with FI_EAGAIN"), ++ { NULL, "" } ++}; ++ ++static void usage(void) ++{ ++ ft_unit_usage("eq_test", "Unit test for Event Queue (EQ)"); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = FI_CONTEXT | FI_CONTEXT2 | FI_MSG_PREFIX | FI_ASYNC_IOV | ++ FI_RX_CQ_DATA | FI_NOTIFY_FLAGS_ONLY | FI_RESTRICTED_COMP | ++ FI_BUFFERED_RECV; ++ hints->domain_attr->mode = FI_RESTRICTED_COMP; ++ hints->domain_attr->mr_mode = FI_MR_LOCAL| FI_MR_RAW | FI_MR_VIRT_ADDR | ++ FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_MMU_NOTIFY | ++ FI_MR_RMA_EVENT | FI_MR_ENDPOINT; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ ++ ret = fi_fabric(fi->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto err; ++ } ++ ++ printf("Testing EQs on fabric %s\n", fi->fabric_attr->name); ++ ++ failed = run_tests(test_array, err_buf); ++ if (failed > 0) { ++ printf("Summary: %d tests failed\n", failed); ++ } else { ++ printf("Summary: all tests passed\n"); ++ } ++ ++err: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/getinfo_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/getinfo_test.c +new file mode 100644 +index 000000000..1120a8bd3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/getinfo_test.c +@@ -0,0 +1,805 @@ ++/* ++ * Copyright (c) 2013-2015 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2017 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "shared.h" ++#include "unit_common.h" ++ ++#define TEST_ENTRY_GETINFO(name) TEST_ENTRY(getinfo_ ## name,\ ++ getinfo_ ## name ## _desc) ++ ++typedef int (*ft_getinfo_init)(struct fi_info *); ++typedef int (*ft_getinfo_test)(char *, char *, uint64_t, struct fi_info *, struct fi_info **); ++typedef int (*ft_getinfo_check)(struct fi_info *); ++ ++static char err_buf[512]; ++static char new_prov_var[128]; ++ ++ ++static int check_addr(void *addr, size_t addrlen, char *str) ++{ ++ if (!addrlen) { ++ sprintf(err_buf, "%s addrlen not set", str); ++ return EXIT_FAILURE; ++ } ++ if (!addr) { ++ sprintf(err_buf, "%s address not set", str); ++ return EXIT_FAILURE; ++ } ++ return 0; ++} ++ ++static int check_srcaddr(struct fi_info *info) ++{ ++ return check_addr(info->src_addr, info->src_addrlen, "source"); ++} ++ ++static int check_src_dest_addr(struct fi_info *info) ++{ ++ int ret; ++ ++ ret = check_addr(info->src_addr, info->src_addrlen, "source"); ++ if (ret) ++ return ret; ++ ++ return check_addr(info->dest_addr, info->dest_addrlen, "destination"); ++} ++ ++static int check_util_prov(struct fi_info *info) ++{ ++ const char *util_name; ++ size_t len; ++ ++ util_name = ft_util_name(info->fabric_attr->prov_name, &len); ++ if (!util_name) { ++ sprintf(err_buf, "Util provider name not appended to core " ++ "provider name: %s", info->fabric_attr->prov_name); ++ return EXIT_FAILURE; ++ } ++ return 0; ++} ++ ++static int check_api_version(struct fi_info *info) ++{ ++ return info->fabric_attr->api_version != FT_FIVERSION; ++} ++ ++static int invalid_dom(struct fi_info *hints) ++{ ++ if (hints->domain_attr->name) ++ free(hints->domain_attr->name); ++ hints->domain_attr->name = strdup("invalid_domain"); ++ if (!hints->domain_attr->name) ++ return -FI_ENOMEM; ++ return 0; ++} ++ ++static int validate_msg_ordering_bits(char *node, char *service, uint64_t flags, ++ struct fi_info *hints, struct fi_info **info) ++{ ++ int i, ret; ++ uint64_t ordering_bits = (FI_ORDER_STRICT | FI_ORDER_DATA); ++ uint64_t *msg_order_combinations; ++ int cnt; ++ ++ ret = ft_alloc_bit_combo(0, ordering_bits, &msg_order_combinations, &cnt); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "ft_alloc_bit_combo failed", ret); ++ return ret; ++ } ++ ++ /* test for what ordering support exists on this provider */ ++ /* test ordering support in TX ATTRIBUTE */ ++ for (i = 0; i < cnt; i++) { ++ hints->tx_attr->msg_order = msg_order_combinations[i]; ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, info); ++ if (ret) { ++ if (ret == -FI_ENODATA) ++ continue; ++ FT_UNIT_STRERR(err_buf, "fi_getinfo failed", ret); ++ goto failed_getinfo; ++ } ++ ++ ft_foreach_info(fi, *info) { ++ FT_DEBUG("\nTesting for fabric: %s, domain: %s, endpoint type: %d", ++ fi->fabric_attr->name, fi->domain_attr->name, ++ fi->ep_attr->type); ++ if (hints->tx_attr->msg_order) { ++ if ((fi->tx_attr->msg_order & hints->tx_attr->msg_order) != ++ hints->tx_attr->msg_order) { ++ FT_DEBUG("tx msg_order not matching - hints: %" ++ PRIx64 " prov: %" PRIx64 "\n", ++ hints->tx_attr->msg_order, ++ fi->tx_attr->msg_order); ++ ret = -FI_EOTHER; ++ fi_freeinfo(*info); ++ goto failed_getinfo; ++ } ++ } ++ } ++ fi_freeinfo(*info); ++ } ++ ++ /* test ordering support in RX ATTRIBUTE */ ++ for (i = 0; i < cnt; i++) { ++ hints->tx_attr->msg_order = 0; ++ hints->rx_attr->msg_order = msg_order_combinations[i]; ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, info); ++ if (ret) { ++ if (ret == -FI_ENODATA) ++ continue; ++ FT_UNIT_STRERR(err_buf, "fi_getinfo failed", ret); ++ goto failed_getinfo; ++ } ++ ft_foreach_info(fi, *info) { ++ FT_DEBUG("\nTesting for fabric: %s, domain: %s, endpoint type: %d", ++ fi->fabric_attr->name, fi->domain_attr->name, ++ fi->ep_attr->type); ++ if (hints->rx_attr->msg_order) { ++ if ((fi->rx_attr->msg_order & hints->rx_attr->msg_order) != ++ hints->rx_attr->msg_order) { ++ FT_DEBUG("rx msg_order not matching - hints: %" ++ PRIx64 " prov: %" PRIx64 "\n", ++ hints->rx_attr->msg_order, ++ fi->rx_attr->msg_order); ++ ret = -FI_EOTHER; ++ fi_freeinfo(*info); ++ goto failed_getinfo; ++ } ++ } ++ } ++ fi_freeinfo(*info); ++ } ++ ++ *info = NULL; ++ ft_free_bit_combo(msg_order_combinations); ++ return 0; ++ ++failed_getinfo: ++ *info = NULL; ++ ft_free_bit_combo(msg_order_combinations); ++ return ret; ++} ++ ++static int init_valid_rma_RAW_ordering_no_set_size(struct fi_info *hints) ++{ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_RAW; ++ hints->rx_attr->msg_order = FI_ORDER_RAW; ++ hints->ep_attr->max_order_raw_size = 0; ++ ++ return 0; ++} ++ ++static int init_valid_rma_RAW_ordering_set_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_RAW; ++ hints->rx_attr->msg_order = FI_ORDER_RAW; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ if (fi->ep_attr->max_order_raw_size > 0) ++ hints->ep_attr->max_order_raw_size = fi->ep_attr->max_order_raw_size - 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int init_valid_rma_WAR_ordering_no_set_size(struct fi_info *hints) ++{ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAR; ++ hints->rx_attr->msg_order = FI_ORDER_WAR; ++ hints->ep_attr->max_order_war_size = 0; ++ ++ return 0; ++} ++ ++static int init_valid_rma_WAR_ordering_set_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAR; ++ hints->rx_attr->msg_order = FI_ORDER_WAR; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ if (fi->ep_attr->max_order_war_size > 0) ++ hints->ep_attr->max_order_war_size = fi->ep_attr->max_order_war_size - 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int init_valid_rma_WAW_ordering_no_set_size(struct fi_info *hints) ++{ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAW; ++ hints->rx_attr->msg_order = FI_ORDER_WAW; ++ hints->ep_attr->max_order_waw_size = 0; ++ ++ return 0; ++} ++ ++static int init_valid_rma_WAW_ordering_set_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps = FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAW; ++ hints->rx_attr->msg_order = FI_ORDER_WAW; ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ if (fi->ep_attr->max_order_waw_size > 0) ++ hints->ep_attr->max_order_waw_size = fi->ep_attr->max_order_waw_size - 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int check_valid_rma_ordering_sizes(struct fi_info *info) ++{ ++ if ((info->tx_attr->msg_order & FI_ORDER_RAW) || ++ (info->rx_attr->msg_order & FI_ORDER_RAW)) { ++ if (info->ep_attr->max_order_raw_size <= 0) ++ return EXIT_FAILURE; ++ if (hints->ep_attr->max_order_raw_size) { ++ if (info->ep_attr->max_order_raw_size < hints->ep_attr->max_order_raw_size) ++ return EXIT_FAILURE; ++ } ++ } ++ if ((info->tx_attr->msg_order & FI_ORDER_WAR) || ++ (info->rx_attr->msg_order & FI_ORDER_WAR)) { ++ if (info->ep_attr->max_order_war_size <= 0) ++ return EXIT_FAILURE; ++ if (hints->ep_attr->max_order_war_size) { ++ if (info->ep_attr->max_order_war_size < hints->ep_attr->max_order_war_size) ++ return EXIT_FAILURE; ++ } ++ } ++ if ((info->tx_attr->msg_order & FI_ORDER_WAW) || ++ (info->rx_attr->msg_order & FI_ORDER_WAW)) { ++ if (info->ep_attr->max_order_waw_size <= 0) ++ return EXIT_FAILURE; ++ if (hints->ep_attr->max_order_waw_size) { ++ if (info->ep_attr->max_order_waw_size < hints->ep_attr->max_order_waw_size) ++ return EXIT_FAILURE; ++ } ++ } ++ ++ return 0; ++} ++ ++static int init_invalid_rma_RAW_ordering_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps |= FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_RAW; ++ hints->rx_attr->msg_order = FI_ORDER_RAW; ++ hints->ep_attr->max_order_war_size = 0; ++ hints->ep_attr->max_order_waw_size = 0; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ if (fi->ep_attr->max_order_raw_size) ++ hints->ep_attr->max_order_raw_size = fi->ep_attr->max_order_raw_size + 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int init_invalid_rma_WAR_ordering_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps |= FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAR; ++ hints->rx_attr->msg_order = FI_ORDER_WAR; ++ hints->ep_attr->max_order_raw_size = 0; ++ hints->ep_attr->max_order_waw_size = 0; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ if (fi->ep_attr->max_order_war_size) ++ hints->ep_attr->max_order_war_size = fi->ep_attr->max_order_war_size + 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++static int init_invalid_rma_WAW_ordering_size(struct fi_info *hints) ++{ ++ int ret; ++ struct fi_info *fi; ++ ++ hints->caps |= FI_RMA; ++ hints->tx_attr->msg_order = FI_ORDER_WAW; ++ hints->rx_attr->msg_order = FI_ORDER_WAW; ++ hints->ep_attr->max_order_raw_size = 0; ++ hints->ep_attr->max_order_war_size = 0; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, NULL, 0, hints, &fi); ++ if (ret) { ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ if (fi->ep_attr->max_order_waw_size) ++ hints->ep_attr->max_order_waw_size = fi->ep_attr->max_order_waw_size + 1; ++ ++ fi_freeinfo(fi); ++ ++ return 0; ++} ++ ++ ++/* ++ * MR mode checks ++ */ ++static int init_mr_basic(struct fi_info *hints) ++{ ++ hints->caps |= FI_RMA; ++ hints->domain_attr->mr_mode = FI_MR_BASIC; ++ return 0; ++} ++ ++static int check_mr_basic(struct fi_info *info) ++{ ++ return (info->domain_attr->mr_mode != FI_MR_BASIC) ? ++ EXIT_FAILURE : 0; ++} ++ ++static int init_mr_scalable(struct fi_info *hints) ++{ ++ hints->caps |= FI_RMA; ++ hints->domain_attr->mr_mode = FI_MR_SCALABLE; ++ return 0; ++} ++ ++static int check_mr_scalable(struct fi_info *info) ++{ ++ return (info->domain_attr->mr_mode != FI_MR_SCALABLE) ? ++ EXIT_FAILURE : 0; ++} ++ ++static int init_mr_unspec(struct fi_info *hints) ++{ ++ hints->caps |= FI_RMA; ++ hints->domain_attr->mr_mode = FI_MR_UNSPEC; ++ return 0; ++} ++ ++static int test_mr_v1_0(char *node, char *service, uint64_t flags, ++ struct fi_info *test_hints, struct fi_info **info) ++{ ++ return fi_getinfo(FI_VERSION(1, 0), node, service, flags, test_hints, info); ++} ++ ++static int check_mr_unspec(struct fi_info *info) ++{ ++ return (info->domain_attr->mr_mode != FI_MR_BASIC && ++ info->domain_attr->mr_mode != FI_MR_SCALABLE) ? ++ EXIT_FAILURE : 0; ++} ++ ++static int test_mr_modes(char *node, char *service, uint64_t flags, ++ struct fi_info *hints, struct fi_info **info) ++{ ++ struct fi_info *fi; ++ uint64_t *mr_modes; ++ int i, cnt, ret; ++ ++ ret = ft_alloc_bit_combo(0, FI_MR_LOCAL | FI_MR_RAW | FI_MR_VIRT_ADDR | ++ FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_MMU_NOTIFY | ++ FI_MR_RMA_EVENT | FI_MR_ENDPOINT, &mr_modes, &cnt); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < cnt; i++) { ++ hints->domain_attr->mr_mode = (uint32_t) mr_modes[i]; ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, hints, info); ++ if (ret) { ++ if (ret == -FI_ENODATA) ++ continue; ++ FT_UNIT_STRERR(err_buf, "fi_getinfo failed", ret); ++ goto out; ++ } ++ ++ ft_foreach_info(fi, *info) { ++ if (fi->domain_attr->mr_mode & ~hints->domain_attr->mr_mode) { ++ ret = -FI_EOTHER; ++ fi_freeinfo(*info); ++ goto out; ++ } ++ } ++ fi_freeinfo(*info); ++ } ++ ++out: ++ *info = NULL; ++ ft_free_bit_combo(mr_modes); ++ return ret; ++} ++ ++ ++/* ++ * getinfo test ++ */ ++static int getinfo_unit_test(char *node, char *service, uint64_t flags, ++ struct fi_info *base_hints, ft_getinfo_init init, ft_getinfo_test test, ++ ft_getinfo_check check, int ret_exp) ++{ ++ struct fi_info *info, *fi, *test_hints; ++ int ret; ++ ++ if (base_hints) { ++ test_hints = fi_dupinfo(base_hints); ++ if (!test_hints) ++ return -FI_ENOMEM; ++ } else { ++ test_hints = NULL; ++ } ++ ++ if (init) { ++ ret = init(test_hints); ++ if (ret) ++ return ret; ++ } ++ ++ if (test) ++ ret = test(node, service, flags, test_hints, &info); ++ else ++ ret = fi_getinfo(FT_FIVERSION, node, service, flags, test_hints, &info); ++ if (ret) { ++ if (ret == ret_exp) ++ return 0; ++ sprintf(err_buf, "fi_getinfo failed %s(%d)", fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ if (!info) ++ return ret; ++ ++ if (!check) ++ goto out; ++ ++ ft_foreach_info(fi, info) { ++ FT_DEBUG("\nTesting for fabric: %s, domain: %s, endpoint type: %d", ++ fi->fabric_attr->name, fi->domain_attr->name, ++ fi->ep_attr->type); ++ ret = check(info); ++ if (ret) ++ break; ++ } ++out: ++ fi_freeinfo(info); ++ return ret; ++} ++ ++#define getinfo_test(name, num, desc, node, service, flags, hints, init, test, check, \ ++ ret_exp) \ ++char *getinfo_ ## name ## num ## _desc = desc; \ ++static int getinfo_ ## name ## num(void) \ ++{ \ ++ int ret, testret = FAIL; \ ++ ret = getinfo_unit_test(node, service, flags, hints, init, test, check, \ ++ ret_exp); \ ++ if (ret) \ ++ goto fail; \ ++ testret = PASS; \ ++fail: \ ++ return TEST_RET_VAL(ret, testret); \ ++} ++ ++/* ++ * Tests: ++ */ ++ ++ ++/* 1. No hints tests ++ * These tests do not receive hints. If a particular provider has been ++ * requested, the environment variable FI_PROVIDER will be set to restrict ++ * the provider used. Otherwise, test failures may occur for any provider. ++ */ ++ ++/* 1.1 Source address only tests */ ++getinfo_test(no_hints, 1, "Test with no node, service, flags or hints", ++ NULL, NULL, 0, NULL, NULL, NULL, check_srcaddr, 0) ++getinfo_test(no_hints, 2, "Test with node, no service, FI_SOURCE flag and no hints", ++ opts.src_addr ? opts.src_addr : "localhost", NULL, FI_SOURCE, ++ NULL, NULL, NULL, check_srcaddr, 0) ++getinfo_test(no_hints, 3, "Test with service, FI_SOURCE flag and no node or hints", ++ NULL, opts.src_port, FI_SOURCE, NULL, NULL, ++ NULL, check_srcaddr, 0) // TODO should we check for wildcard addr? ++getinfo_test(no_hints, 4, "Test with node, service, FI_SOURCE flags and no hints", ++ opts.src_addr ? opts.src_addr : "localhost", opts.src_port, ++ FI_SOURCE, NULL, NULL, NULL, check_srcaddr, 0) ++ ++/* 1.2 Source and destination address tests */ ++getinfo_test(no_hints, 5, "Test with node, service and no hints", ++ opts.dst_addr ? opts.dst_addr : "localhost", opts.dst_port, ++ 0, NULL, NULL, NULL, check_src_dest_addr, 0) ++ ++/* 2. Test with hints */ ++/* 2.1 Source address only tests */ ++getinfo_test(src, 1, "Test with no node, service, or flags", ++ NULL, NULL, 0, hints, NULL, NULL, check_srcaddr, 0) ++getinfo_test(src, 2, "Test with node, no service, FI_SOURCE flag", ++ opts.src_addr ? opts.src_addr : "localhost", NULL, FI_SOURCE, ++ hints, NULL, NULL, check_srcaddr, 0) ++getinfo_test(src, 3, "Test with service, FI_SOURCE flag and no node", ++ NULL, opts.src_port, FI_SOURCE, hints, NULL, ++ NULL, check_srcaddr, 0) // TODO should we check for wildcard addr? ++getinfo_test(src, 4, "Test with node, service, FI_SOURCE flags", ++ opts.src_addr ? opts.src_addr : "localhost", opts.src_port, ++ FI_SOURCE, hints, NULL, NULL, check_srcaddr, 0) ++ ++/* 2.2 Source and destination address tests */ ++getinfo_test(src_dest, 1, "Test with node, service", ++ opts.dst_addr ? opts.dst_addr : "localhost", opts.dst_port, ++ 0, hints, NULL, NULL, check_src_dest_addr, 0) ++ ++getinfo_test(src_dest, 2, "Test API version", ++ NULL, NULL, 0, hints, NULL, NULL, check_api_version , 0) ++ ++/* Negative tests */ ++getinfo_test(neg, 1, "Test with non-existent domain name", ++ NULL, NULL, 0, hints, invalid_dom, NULL, NULL, -FI_ENODATA) ++ ++/* Utility provider tests */ ++getinfo_test(util, 1, "Test if we get utility provider when requested", ++ NULL, NULL, 0, hints, NULL, NULL, check_util_prov, 0) ++ ++/* Message Ordering Tests */ ++getinfo_test(msg_ordering, 1, "Test msg ordering bits supported are set", ++ NULL, NULL, 0, hints, NULL, validate_msg_ordering_bits, NULL, 0) ++getinfo_test(raw_ordering, 1, "Test rma RAW ordering size is set", ++ NULL, NULL, 0, hints, init_valid_rma_RAW_ordering_no_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(raw_ordering, 2, "Test rma RAW ordering size is set to hints", ++ NULL, NULL, 0, hints, init_valid_rma_RAW_ordering_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(war_ordering, 1, "Test rma WAR ordering size is set", ++ NULL, NULL, 0, hints, init_valid_rma_WAR_ordering_no_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(war_ordering, 2, "Test rma WAR ordering size is set to hints", ++ NULL, NULL, 0, hints, init_valid_rma_WAR_ordering_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(waw_ordering, 1, "Test rma WAW ordering size is set", ++ NULL, NULL, 0, hints, init_valid_rma_WAW_ordering_no_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(waw_ordering, 2, "Test rma WAW ordering size is set to hints", ++ NULL, NULL, 0, hints, init_valid_rma_WAW_ordering_set_size, ++ NULL, check_valid_rma_ordering_sizes, 0) ++getinfo_test(bad_raw_ordering, 1, "Test invalid rma RAW ordering size", ++ NULL, NULL, 0, hints, init_invalid_rma_RAW_ordering_size, ++ NULL, NULL, -FI_ENODATA) ++getinfo_test(bad_war_ordering, 1, "Test invalid rma WAR ordering size", ++ NULL, NULL, 0, hints, init_invalid_rma_WAR_ordering_size, ++ NULL, NULL, -FI_ENODATA) ++getinfo_test(bad_waw_ordering, 1, "Test invalid rma WAW ordering size", ++ NULL, NULL, 0, hints, init_invalid_rma_WAW_ordering_size, ++ NULL, NULL, -FI_ENODATA) ++ ++/* MR mode tests */ ++getinfo_test(mr_mode, 1, "Test FI_MR_BASIC", NULL, NULL, 0, ++ hints, init_mr_basic, NULL, check_mr_basic, -FI_ENODATA) ++getinfo_test(mr_mode, 2, "Test FI_MR_SCALABLE", NULL, NULL, 0, ++ hints, init_mr_scalable, NULL, check_mr_scalable, -FI_ENODATA) ++getinfo_test(mr_mode, 3, "Test FI_MR_UNSPEC (v1.0)", NULL, NULL, 0, ++ hints, init_mr_unspec, test_mr_v1_0, check_mr_unspec, -FI_ENODATA) ++getinfo_test(mr_mode, 4, "Test FI_MR_BASIC (v1.0)", NULL, NULL, 0, ++ hints, init_mr_basic, test_mr_v1_0, check_mr_basic, -FI_ENODATA) ++getinfo_test(mr_mode, 5, "Test FI_MR_SCALABLE (v1.0)", NULL, NULL, 0, ++ hints, init_mr_scalable, test_mr_v1_0, check_mr_scalable, -FI_ENODATA) ++getinfo_test(mr_mode, 6, "Test mr_mode bits", NULL, NULL, 0, ++ hints, NULL, test_mr_modes, NULL, 0) ++ ++ ++static void usage(void) ++{ ++ ft_unit_usage("getinfo_test", "Unit tests for fi_getinfo"); ++ FT_PRINT_OPTS_USAGE("-e ", "Endpoint type: msg|rdm|dgram (default:rdm)"); ++ ft_addr_usage(); ++} ++ ++static int set_prov(char *prov_name) ++{ ++ const char *util_name; ++ const char *core_name; ++ char *core_name_dup; ++ size_t len; ++ ++ util_name = ft_util_name(prov_name, &len); ++ core_name = ft_core_name(prov_name, &len); ++ ++ if (util_name && !core_name) ++ return 0; ++ ++ core_name_dup = strndup(core_name, len); ++ if (!core_name_dup) ++ return -FI_ENOMEM; ++ ++ snprintf(new_prov_var, sizeof(new_prov_var) - 1, "FI_PROVIDER=%s", ++ core_name_dup); ++ ++ putenv(new_prov_var); ++ free(core_name_dup); ++ return 0; ++} ++ ++int main(int argc, char **argv) ++{ ++ int failed; ++ int op; ++ size_t len; ++ const char *util_name; ++ ++ struct test_entry no_hint_tests[] = { ++ TEST_ENTRY_GETINFO(no_hints1), ++ TEST_ENTRY_GETINFO(no_hints2), ++ TEST_ENTRY_GETINFO(no_hints3), ++ TEST_ENTRY_GETINFO(no_hints4), ++ TEST_ENTRY_GETINFO(no_hints5), ++ { NULL, "" } ++ }; ++ ++ struct test_entry hint_tests[] = { ++ TEST_ENTRY_GETINFO(src1), ++ TEST_ENTRY_GETINFO(src2), ++ TEST_ENTRY_GETINFO(src3), ++ TEST_ENTRY_GETINFO(src4), ++ TEST_ENTRY_GETINFO(src_dest1), ++ TEST_ENTRY_GETINFO(src_dest2), ++ TEST_ENTRY_GETINFO(msg_ordering1), ++ TEST_ENTRY_GETINFO(raw_ordering1), ++ TEST_ENTRY_GETINFO(raw_ordering2), ++ TEST_ENTRY_GETINFO(war_ordering1), ++ TEST_ENTRY_GETINFO(war_ordering2), ++ TEST_ENTRY_GETINFO(waw_ordering1), ++ TEST_ENTRY_GETINFO(waw_ordering2), ++ TEST_ENTRY_GETINFO(bad_raw_ordering1), ++ TEST_ENTRY_GETINFO(bad_war_ordering1), ++ TEST_ENTRY_GETINFO(bad_waw_ordering1), ++ TEST_ENTRY_GETINFO(neg1), ++ TEST_ENTRY_GETINFO(mr_mode1), ++ TEST_ENTRY_GETINFO(mr_mode2), ++ TEST_ENTRY_GETINFO(mr_mode3), ++ TEST_ENTRY_GETINFO(mr_mode4), ++ TEST_ENTRY_GETINFO(mr_mode5), ++ TEST_ENTRY_GETINFO(mr_mode6), ++ { NULL, "" } ++ }; ++ ++ struct test_entry util_prov_tests[] = { ++ TEST_ENTRY_GETINFO(util1), ++ { NULL, "" } ++ }; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, ADDR_OPTS INFO_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'h': ++ usage(); ++ return EXIT_SUCCESS; ++ case '?': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ if (optind < argc) ++ opts.dst_addr = argv[optind]; ++ if (!opts.dst_port) ++ opts.dst_port = "9228"; ++ if (!opts.src_port) ++ opts.src_port = "9228"; ++ ++ hints->mode = ~0; ++ ++ if (hints->fabric_attr->prov_name) { ++ if (set_prov(hints->fabric_attr->prov_name)) ++ return EXIT_FAILURE; ++ } else { ++ FT_WARN("\nTests getinfo1 to getinfo5 may not run exclusively " ++ "for a particular provider since we don't pass hints.\n" ++ "So the failures in any of those tests may not be " ++ "attributable to a single provider.\n"); ++ } ++ ++ failed = run_tests(no_hint_tests, err_buf); ++ ++ if (hints->fabric_attr->prov_name) { ++ util_name = ft_util_name(hints->fabric_attr->prov_name, &len); ++ if (util_name) ++ failed += run_tests(util_prov_tests, err_buf); ++ } ++ ++ failed += run_tests(hint_tests, err_buf); ++ ++ if (failed > 0) { ++ printf("\nSummary: %d tests failed\n", failed); ++ } else { ++ printf("\nSummary: all tests passed\n"); ++ } ++ ++ ft_free_res(); ++ return (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/mr_test.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/mr_test.c +new file mode 100644 +index 000000000..16cfb3f70 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/mr_test.c +@@ -0,0 +1,273 @@ ++/* ++ * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2014-2016 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "unit_common.h" ++#include "shared.h" ++ ++static char err_buf[512]; ++ ++/* ++ * Tests: ++ */ ++static int mr_reg() ++{ ++ int i, j; ++ int ret = 0; ++ int testret = FAIL; ++ struct fid_mr *mr; ++ uint64_t access; ++ uint64_t *access_combinations; ++ int cnt; ++ ++ access = ft_info_to_mr_access(fi); ++ ret = ft_alloc_bit_combo(0, access, &access_combinations, &cnt); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "ft_alloc_bit_combo failed", ret); ++ goto out; ++ } ++ ++ for (i = 0; i < test_cnt; i++) { ++ buf_size = test_size[i].size; ++ for (j = 0; j < cnt; j++) { ++ ret = fi_mr_reg(domain, buf, buf_size, ++ access_combinations[j], 0, ++ FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_mr_reg failed", ret); ++ goto free; ++ } ++ ++ ret = fi_close(&mr->fid); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_close failed", ret); ++ goto free; ++ } ++ } ++ } ++ testret = PASS; ++free: ++ ft_free_bit_combo(access_combinations); ++out: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int mr_regv() ++{ ++ int i, j, n; ++ int ret = 0; ++ int testret = FAIL; ++ struct fid_mr *mr; ++ struct iovec *iov; ++ char *base; ++ ++ iov = calloc(fi->domain_attr->mr_iov_limit, sizeof(*iov)); ++ if (!iov) { ++ perror("calloc"); ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ ++ for (i = 0; i < test_cnt && ++ test_size[i].size <= fi->domain_attr->mr_iov_limit; i++) { ++ n = test_size[i].size; ++ base = buf; ++ ++ for (j = 0; j < n; j++) { ++ iov[j].iov_base = base; ++ iov[j].iov_len = test_size[test_cnt - 1].size / n; ++ base += iov[j].iov_len; ++ } ++ ++ ret = fi_mr_regv(domain, &iov[0], n, ft_info_to_mr_access(fi), 0, ++ FT_MR_KEY, 0, &mr, NULL); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_mr_regv failed", ret); ++ goto free; ++ } ++ ++ ret = fi_close(&mr->fid); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_close failed", ret); ++ goto free; ++ } ++ } ++ testret = PASS; ++free: ++ free(iov); ++out: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++static int mr_regattr() ++{ ++ int i, j, n; ++ int ret = 0; ++ int testret = FAIL; ++ struct fid_mr *mr; ++ struct iovec *iov; ++ struct fi_mr_attr attr; ++ char *base; ++ ++ attr.access = ft_info_to_mr_access(fi); ++ attr.requested_key = FT_MR_KEY; ++ attr.context = NULL; ++ ++ iov = calloc(fi->domain_attr->mr_iov_limit, sizeof(*iov)); ++ if (!iov) { ++ perror("calloc"); ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ ++ for (i = 0; i < test_cnt && ++ test_size[i].size <= fi->domain_attr->mr_iov_limit; i++) { ++ ++ n = test_size[i].size; ++ base = buf; ++ for (j = 0; j < n; j++) { ++ iov[j].iov_base = base; ++ iov[j].iov_len = test_size[test_cnt - 1].size / n; ++ base += iov[j].iov_len; ++ } ++ ++ attr.iov_count = n; ++ attr.mr_iov = &iov[0]; ++ ret = fi_mr_regattr(domain, &attr, 0, &mr); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_mr_regattr failed", ret); ++ goto free; ++ } ++ ++ ret = fi_close(&mr->fid); ++ if (ret) { ++ FT_UNIT_STRERR(err_buf, "fi_close failed", ret); ++ goto free; ++ } ++ } ++ testret = PASS; ++free: ++ free(iov); ++out: ++ return TEST_RET_VAL(ret, testret); ++} ++ ++struct test_entry test_array[] = { ++ TEST_ENTRY(mr_reg, "Test fi_mr_reg across different access combinations"), ++ TEST_ENTRY(mr_regv, "Test fi_mr_regv across various buffer sizes"), ++ TEST_ENTRY(mr_regattr, "Test fi_mr_regattr across various buffer sizes"), ++ { NULL, "" } ++}; ++ ++static void usage(void) ++{ ++ ft_unit_usage("mr_test", "Unit test for Memory Region (MR)"); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, ret; ++ int failed = 0; ++ ++ buf = NULL; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, FAB_OPTS "h")) != -1) { ++ switch (op) { ++ default: ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ hints->mode = ~0; ++ hints->domain_attr->mode = ~0; ++ hints->domain_attr->mr_mode = ~(FI_MR_BASIC | FI_MR_SCALABLE); ++ ++ hints->caps |= FI_MSG | FI_RMA; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ hints->caps &= ~FI_RMA; ++ ret = fi_getinfo(FT_FIVERSION, NULL, 0, 0, hints, &fi); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ goto out; ++ } ++ } ++ ++ if (!ft_info_to_mr_access(fi)) ++ goto out; ++ ++ if (!fi->domain_attr->mr_iov_limit) { ++ ret = -FI_EINVAL; ++ FT_PRINTERR("mr_iov_limit not set", ret); ++ goto out; ++ } ++ ++ ret = ft_open_fabric_res(); ++ if (ret) ++ goto out; ++ ++ buf = malloc(test_size[test_cnt - 1].size); ++ if (!buf) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ ++ printf("Testing MR on fabric %s\n", fi->fabric_attr->name); ++ ++ failed = run_tests(test_array, err_buf); ++ if (failed > 0) { ++ printf("Summary: %d tests failed\n", failed); ++ } else { ++ printf("Summary: all tests passed\n"); ++ } ++ ++out: ++ ft_free_res(); ++ return ret ? ft_exit_code(ret) : (failed > 0) ? EXIT_FAILURE : EXIT_SUCCESS; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/resource_freeing.c b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/resource_freeing.c +new file mode 100644 +index 000000000..f3da76f2c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/fabtests/unit/resource_freeing.c +@@ -0,0 +1,303 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include "shared.h" ++ ++#define lengthof(arr) (sizeof(arr) / sizeof(*arr)) ++ ++enum test_depth { ++ DEPTH_FABRIC, ++ DEPTH_DOMAIN, ++ DEPTH_ENABLE_ENDPOINT ++}; ++ ++int test_resource_freeing(enum test_depth test_depth, ++ const char *fabric_service) ++{ ++ int our_ret = FI_SUCCESS; ++ int ret; ++ uint64_t flags; ++ struct fi_info *info; ++ ++ /* Setup fabric */ ++ ++ hints = fi_allocinfo(); ++ if (!hints) { ++ our_ret = -FI_ENOMEM; ++ goto error_return; ++ } ++ ++ flags = FI_SOURCE; ++ hints->caps = FI_RMA; ++ hints->ep_attr->type = FI_EP_RDM; ++ ++ ret = fi_getinfo(FT_FIVERSION, NULL, fabric_service, flags, ++ hints, &info); ++ if (ret) { ++ FT_PRINTERR("fi_getinfo", ret); ++ our_ret = ret; ++ goto free_hints; ++ } ++ ++ ret = fi_fabric(info->fabric_attr, &fabric, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_fabric", ret); ++ our_ret = ret; ++ goto free_info; ++ } ++ ++ if (test_depth == DEPTH_FABRIC) { ++ goto close_fabric; ++ } ++ ++ ret = fi_domain(fabric, info, &domain, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_domain", ret); ++ our_ret = ret; ++ goto close_fabric; ++ } ++ ++ if (test_depth == DEPTH_DOMAIN) { ++ goto close_domain; ++ } ++ ++ /* Create pre-endpoint resources */ ++ ++ av_attr.type = info->domain_attr->av_type; ++ av_attr.count = 0; ++ av_attr.name = NULL; ++ ret = fi_av_open(domain, &av_attr, &av, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_av_open", ret); ++ our_ret = ret; ++ goto close_domain; ++ } ++ ++ cntr_attr.events = FI_CNTR_EVENTS_COMP; ++ cntr_attr.wait_obj = FI_WAIT_UNSPEC; ++ ret = fi_cntr_open(domain, &cntr_attr, &txcntr, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cntr_open", ret); ++ our_ret = ret; ++ goto close_av; ++ } ++ ++ ret = fi_cq_open(domain, &cq_attr, &txcq, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_cq_open", ret); ++ our_ret = ret; ++ goto close_txcntr; ++ } ++ ++ ret = fi_endpoint(domain, info, &ep, NULL); ++ if (ret) { ++ FT_PRINTERR("fi_endpoint", ret); ++ our_ret = ret; ++ goto close_txcq; ++ } ++ ++ /* Bind pre-endpoint resources to ep */ ++ ++ ret = fi_ep_bind(ep, &txcntr->fid, FI_WRITE); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ our_ret = ret; ++ goto close_ep; ++ } ++ ++ ret = fi_ep_bind(ep, &av->fid, 0); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ our_ret = ret; ++ goto close_ep; ++ } ++ ++ ret = fi_ep_bind(ep, &txcq->fid, FI_TRANSMIT); ++ if (ret) { ++ FT_PRINTERR("fi_ep_bind", ret); ++ our_ret = ret; ++ goto close_ep; ++ } ++ ++ /* Enable ep */ ++ ++ ret = fi_enable(ep); ++ if (ret) { ++ FT_PRINTERR("fi_enable", ret); ++ our_ret = ret; ++ goto close_ep; ++ } ++ ++ if (test_depth == DEPTH_ENABLE_ENDPOINT) { ++ goto close_ep; ++ } ++ ++close_ep: ++ ret = fi_close(&ep->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_txcq: ++ ret = fi_close(&txcq->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_txcntr: ++ ret = fi_close(&txcntr->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_av: ++ ret = fi_close(&av->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_domain: ++ ret = fi_close(&domain->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++close_fabric: ++ ret = fi_close(&fabric->fid); ++ if (ret) { ++ FT_PRINTERR("fi_close", ret); ++ our_ret = our_ret ? our_ret : ret; ++ } ++ ++free_info: ++ fi_freeinfo(info); ++ ++free_hints: ++ fi_freeinfo(hints); ++ ++error_return: ++ return our_ret; ++} ++ ++void print_test_resource_freeing_call(enum test_depth test_depth, int iter) ++{ ++ fprintf(stdout, ++ "Running test_resource_freeing with " ++ "[%s] for %d iterations\n", ++ (test_depth == DEPTH_FABRIC) ? "DEPTH_FABRIC" ++ : (test_depth == DEPTH_DOMAIN) ? "DEPTH_DOMAIN" ++ : (test_depth == DEPTH_ENABLE_ENDPOINT) ? "DEPTH_ENABLE_ENDPOINT" ++ : "(unknown test depth)", ++ iter ++ ); ++ ++ fflush(stderr); ++ fflush(stdout); ++} ++ ++void print_test_resource_freeing_result_call(int success, ++ enum test_depth test_depth, ++ int iter) ++{ ++ fprintf(success ? stdout : stderr, ++ "%s: test_resource_freeing %s with " ++ "[%s]\n", ++ success ? "GOOD" : "ERROR", ++ success ? "succeeded" : "failed", ++ (test_depth == DEPTH_FABRIC) ? "DEPTH_FABRIC" ++ : (test_depth == DEPTH_DOMAIN) ? "DEPTH_DOMAIN" ++ : (test_depth == DEPTH_ENABLE_ENDPOINT) ? "DEPTH_ENABLE_ENDPOINT" ++ : "(unknown test depth)" ++ ); ++ ++ fflush(stderr); ++ fflush(stdout); ++} ++ ++int main(int argc, char **argv) ++{ ++ int op, i, td_idx, ret = 0, iters = 2, exit_code = 0; ++ ++ opts = INIT_OPTS; ++ ++ hints = fi_allocinfo(); ++ if (!hints) ++ return EXIT_FAILURE; ++ ++ while ((op = getopt(argc, argv, "i:h" ADDR_OPTS INFO_OPTS)) != -1) { ++ switch (op) { ++ default: ++ ft_parse_addr_opts(op, optarg, &opts); ++ ft_parseinfo(op, optarg, hints); ++ break; ++ case 'i': ++ iters = atoi(optarg); ++ break; ++ case '?': ++ case 'h': ++ ft_usage(argv[0], "Test which exercises resource freeing in a provider\n"); ++ FT_PRINT_OPTS_USAGE("-i ", "number of iterations to test"); ++ return EXIT_FAILURE; ++ } ++ } ++ ++ enum test_depth test_depth[] = { ++ DEPTH_FABRIC, DEPTH_DOMAIN, DEPTH_ENABLE_ENDPOINT}; ++ ++ for (td_idx = 0; td_idx < lengthof(test_depth); td_idx += 1) { ++ print_test_resource_freeing_call( ++ test_depth[td_idx], iters); ++ for (i = 0; i < iters; i += 1) { ++ ret = test_resource_freeing( ++ test_depth[td_idx], default_port); ++ if (ret) { ++ exit_code = EXIT_FAILURE; ++ break; ++ } ++ } ++ print_test_resource_freeing_result_call( ++ !ret, /* int success */ ++ test_depth[td_idx], ++ i); ++ } ++ ++ return ft_exit_code(exit_code); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/freebsd/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/freebsd/osd.h +index f3bef8f8a..62cd8f483 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/freebsd/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/freebsd/osd.h +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2016 Intel Corp, Inc. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -51,6 +52,21 @@ static inline int ofi_shm_remap(struct util_shm *shm, size_t newsize, void **map + return -1; + } + ++static inline ssize_t ofi_get_hugepage_size(void) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_alloc_hugepage_buf(void **memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_free_hugepage_buf(void *memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ + #endif /* _FREEBSD_OSD_H_ */ + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/linux/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/linux/osd.h +index bd54c7916..3ab031321 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/linux/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/linux/osd.h +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -53,4 +54,22 @@ static inline int ofi_shm_remap(struct util_shm *shm, + return shm->ptr == MAP_FAILED ? -FI_EINVAL : FI_SUCCESS; + } + ++ssize_t ofi_get_hugepage_size(void); ++ ++static inline int ofi_alloc_hugepage_buf(void **memptr, size_t size) ++{ ++ *memptr = mmap(NULL, size, PROT_READ | PROT_WRITE, ++ MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0); ++ ++ if (*memptr == MAP_FAILED) ++ return -errno; ++ ++ return FI_SUCCESS; ++} ++ ++static inline int ofi_free_hugepage_buf(void *memptr, size_t size) ++{ ++ return munmap(memptr, size); ++} ++ + #endif /* _LINUX_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi.h +index c664fb917..920ffafc5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi.h +@@ -1,6 +1,6 @@ + /* + * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. +- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -81,6 +81,10 @@ extern "C" { + _a > _b ? _a : _b; }) + #endif + ++#define ofi_div_ceil(a, b) ((a + b - 1) / b) ++ ++#define OFI_MAGIC_64 (0x0F1C0DE0F1C0DE64) ++ + + /* + * CPU specific features +@@ -97,10 +101,16 @@ enum { + int ofi_cpu_supports(unsigned func, unsigned reg, unsigned bit); + + +-/* Restrict to size of struct fi_context */ ++enum ofi_prov_type { ++ OFI_PROV_CORE, ++ OFI_PROV_UTIL, ++ OFI_PROV_HOOK, ++}; ++ ++/* Restrict to size of struct fi_provider::context (struct fi_context) */ + struct fi_prov_context { ++ enum ofi_prov_type type; + int disable_logging; +- int is_util_prov; + }; + + struct fi_filter { +@@ -115,11 +125,21 @@ void ofi_create_filter(struct fi_filter *filter, const char *env_name); + void ofi_free_filter(struct fi_filter *filter); + int ofi_apply_filter(struct fi_filter *filter, const char *name); + ++int ofi_nic_close(struct fid *fid); ++struct fid_nic *ofi_nic_dup(const struct fid_nic *nic); ++int ofi_nic_tostr(const struct fid *fid_nic, char *buf, size_t len); ++ ++struct fi_provider *ofi_get_hook(const char *name); ++ + void fi_log_init(void); + void fi_log_fini(void); + void fi_param_init(void); + void fi_param_fini(void); + void fi_param_undefine(const struct fi_provider *provider); ++void ofi_hook_init(void); ++void ofi_hook_fini(void); ++void ofi_hook_install(struct fid_fabric *hfabric, struct fid_fabric **fabric, ++ struct fi_provider *prov); + + const char *ofi_hex_str(const uint8_t *data, size_t len); + +@@ -150,6 +170,7 @@ static inline size_t fi_get_aligned_sz(size_t size, size_t alignment) + uint64_t ofi_max_tag(uint64_t mem_tag_format); + uint64_t ofi_tag_format(uint64_t max_tag); + uint8_t ofi_msb(uint64_t num); ++uint8_t ofi_lsb(uint64_t num); + + int ofi_send_allowed(uint64_t caps); + int ofi_recv_allowed(uint64_t caps); +@@ -162,7 +183,6 @@ int ofi_check_rx_mode(const struct fi_info *info, uint64_t flags); + uint64_t fi_gettime_ms(void); + uint64_t fi_gettime_us(void); + +- + #define OFI_ENUM_VAL(X) X + #define OFI_STR(X) #X + #define OFI_STR_INT(X) OFI_STR(X) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_abi.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_abi.h +index cd0286697..8ba35a4a3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_abi.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_abi.h +@@ -111,7 +111,7 @@ extern "C" { + * name appended with the ABI version that it is compatible with. + */ + +-#define CURRENT_ABI "FABRIC_1.1" ++#define CURRENT_ABI "FABRIC_1.2" + + #if HAVE_ALIAS_ATTRIBUTE == 1 + #define DEFAULT_SYMVER_PRE(a) a##_ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_atomic.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_atomic.h +index 3f4585b6d..a146e75bc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_atomic.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_atomic.h +@@ -11,7 +11,7 @@ + * without modification, are permitted provided that the following + * conditions are met: + * +- * - Redistibutions of source code must retain the above ++ * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_epoll.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_epoll.h +new file mode 100644 +index 000000000..def823ed3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_epoll.h +@@ -0,0 +1,149 @@ ++/* ++ * Copyright (c) 2011-s2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ * ++ */ ++ ++#ifndef _OFI_EPOLL_H_ ++#define _OFI_EPOLL_H_ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#ifdef HAVE_EPOLL ++#include ++ ++#define FI_EPOLL_IN EPOLLIN ++#define FI_EPOLL_OUT EPOLLOUT ++ ++typedef int fi_epoll_t; ++ ++static inline int fi_epoll_create(int *ep) ++{ ++ *ep = epoll_create(4); ++ return *ep < 0 ? -ofi_syserr() : 0; ++} ++ ++static inline int fi_epoll_add(int ep, int fd, uint32_t events, void *context) ++{ ++ struct epoll_event event; ++ int ret; ++ ++ event.data.ptr = context; ++ event.events = events; ++ ret = epoll_ctl(ep, EPOLL_CTL_ADD, fd, &event); ++ if ((ret == -1) && (ofi_syserr() != EEXIST)) ++ return -ofi_syserr(); ++ return 0; ++} ++ ++static inline int fi_epoll_mod(int ep, int fd, uint32_t events, void *context) ++{ ++ struct epoll_event event; ++ ++ event.data.ptr = context; ++ event.events = events; ++ return epoll_ctl(ep, EPOLL_CTL_MOD, fd, &event) ? -ofi_syserr() : 0; ++} ++ ++static inline int fi_epoll_del(int ep, int fd) ++{ ++ return epoll_ctl(ep, EPOLL_CTL_DEL, fd, NULL) ? -ofi_syserr() : 0; ++} ++ ++static inline int fi_epoll_wait(int ep, void **contexts, int max_contexts, ++ int timeout) ++{ ++ struct epoll_event events[max_contexts]; ++ int ret; ++ int i; ++ ++ ret = epoll_wait(ep, events, max_contexts, timeout); ++ if (ret == -1) ++ return -ofi_syserr(); ++ ++ for (i = 0; i < ret; i++) ++ contexts[i] = events[i].data.ptr; ++ return ret; ++} ++ ++static inline void fi_epoll_close(int ep) ++{ ++ close(ep); ++} ++ ++#else ++#include ++ ++#define FI_EPOLL_IN POLLIN ++#define FI_EPOLL_OUT POLLOUT ++ ++enum fi_epoll_ctl { ++ EPOLL_CTL_ADD, ++ EPOLL_CTL_DEL, ++ EPOLL_CTL_MOD, ++}; ++ ++struct fi_epoll_work_item { ++ int fd; ++ uint32_t events; ++ void *context; ++ enum fi_epoll_ctl type; ++ struct slist_entry entry; ++}; ++ ++typedef struct fi_epoll { ++ int size; ++ int nfds; ++ struct pollfd *fds; ++ void **context; ++ int index; ++ struct fd_signal signal; ++ struct slist work_item_list; ++ fastlock_t lock; ++} *fi_epoll_t; ++ ++int fi_epoll_create(struct fi_epoll **ep); ++int fi_epoll_add(struct fi_epoll *ep, int fd, uint32_t events, void *context); ++int fi_epoll_mod(struct fi_epoll *ep, int fd, uint32_t events, void *context); ++int fi_epoll_del(struct fi_epoll *ep, int fd); ++int fi_epoll_wait(struct fi_epoll *ep, void **contexts, int max_contexts, ++ int timeout); ++void fi_epoll_close(struct fi_epoll *ep); ++ ++#endif /* HAVE_EPOLL */ ++ ++#endif /* _OFI_EPOLL_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_hook.h +similarity index 81% +rename from prov/hook/src/hook.h +rename to include/ofi_hook.h +index 43f83b1f3..abf827d6a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_hook.h +@@ -44,6 +44,19 @@ + #include + #include + ++#include ++ ++ ++/* ++ * Hooks are installed from top down. ++ * Values must start at 0 and increment by one. ++ */ ++enum ofi_hook_class { ++ HOOK_NOOP, ++ HOOK_PERF, ++ MAX_HOOKS ++}; ++ + + /* + * Define hook structs so we can cast from fid to parent using simple cast. +@@ -52,18 +65,25 @@ + + extern struct fi_ops hook_fid_ops; + struct fid *hook_to_hfid(const struct fid *fid); ++struct fid_wait *hook_to_hwait(const struct fid_wait *wait); ++ + + struct hook_fabric { +- struct fid_fabric fabric; +- struct fid_fabric *hfabric; ++ struct fid_fabric fabric; ++ struct fid_fabric *hfabric; ++ enum ofi_hook_class hclass; ++ struct fi_provider *prov; + }; + +-int hook_fabric(struct fid_fabric *hfabric, struct fid_fabric **fabric); ++void hook_fabric_init(struct hook_fabric *fabric, enum ofi_hook_class hclass, ++ struct fid_fabric *hfabric, struct fi_provider *hprov, ++ struct fi_ops *f_ops); + + + struct hook_domain { + struct fid_domain domain; + struct fid_domain *hdomain; ++ struct hook_fabric *fabric; + }; + + int hook_domain(struct fid_fabric *fabric, struct fi_info *info, +@@ -73,6 +93,7 @@ int hook_domain(struct fid_fabric *fabric, struct fi_info *info, + struct hook_av { + struct fid_av av; + struct fid_av *hav; ++ struct hook_domain *domain; + }; + + int hook_av_open(struct fid_domain *domain, struct fi_av_attr *attr, +@@ -82,6 +103,7 @@ int hook_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + struct hook_wait { + struct fid_wait wait; + struct fid_wait *hwait; ++ struct hook_fabric *fabric; + }; + + int hook_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, +@@ -92,6 +114,7 @@ int hook_trywait(struct fid_fabric *fabric, struct fid **fids, int count); + struct hook_poll { + struct fid_poll poll; + struct fid_poll *hpoll; ++ struct hook_domain *domain; + }; + + int hook_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, +@@ -101,6 +124,7 @@ int hook_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, + struct hook_eq { + struct fid_eq eq; + struct fid_eq *heq; ++ struct hook_fabric *fabric; + }; + + int hook_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, +@@ -110,15 +134,20 @@ int hook_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, + struct hook_cq { + struct fid_cq cq; + struct fid_cq *hcq; ++ struct hook_domain *domain; + }; + + int hook_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq, void *context); ++const char * ++hook_cq_strerror(struct fid_cq *cq, int prov_errno, ++ const void *err_data, char *buf, size_t len); + + + struct hook_cntr { + struct fid_cntr cntr; + struct fid_cntr *hcntr; ++ struct hook_domain *domain; + }; + + int hook_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, +@@ -128,6 +157,7 @@ int hook_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + struct hook_ep { + struct fid_ep ep; + struct fid_ep *hep; ++ struct hook_domain *domain; + }; + + int hook_endpoint(struct fid_domain *domain, struct fi_info *info, +@@ -148,6 +178,7 @@ extern struct fi_ops_atomic hook_atomic_ops; + struct hook_pep { + struct fid_pep pep; + struct fid_pep *hpep; ++ struct hook_fabric *fabric; + }; + + int hook_passive_ep(struct fid_fabric *fabric, struct fi_info *info, +@@ -157,6 +188,7 @@ int hook_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + struct hook_stx { + struct fid_stx stx; + struct fid_stx *hstx; ++ struct hook_domain *domain; + }; + + int hook_stx_ctx(struct fid_domain *domain, +@@ -167,6 +199,7 @@ int hook_stx_ctx(struct fid_domain *domain, + struct hook_mr { + struct fid_mr mr; + struct fid_mr *hmr; ++ struct hook_domain *domain; + }; + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_iov.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_iov.h +index dbf4b377d..b8ca7f574 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_iov.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_iov.h +@@ -61,6 +61,15 @@ static inline size_t ofi_total_ioc_cnt(const struct fi_ioc *ioc, size_t ioc_coun + return cnt; + } + ++static inline size_t ofi_total_rma_ioc_cnt(const struct fi_rma_ioc *rma_ioc, ++ size_t ioc_count) ++{ ++ size_t i, cnt = 0; ++ for (i = 0; i < ioc_count; i++) ++ cnt += rma_ioc[i].count; ++ return cnt; ++} ++ + #define OFI_COPY_IOV_TO_BUF 0 + #define OFI_COPY_BUF_TO_IOV 1 + +@@ -99,6 +108,28 @@ ofi_copy_from_iov(void *buf, uint64_t bufsize, + } + } + ++static inline void ofi_ioc_to_iov(const struct fi_ioc *ioc, struct iovec *iov, ++ size_t count, size_t size) ++{ ++ int i; ++ for (i = 0; i < count; i++) { ++ iov[i].iov_base = ioc[i].addr; ++ iov[i].iov_len = ioc[i].count * size; ++ } ++} ++ ++static inline void ofi_rma_ioc_to_iov(const struct fi_rma_ioc *ioc, ++ struct fi_rma_iov *iov, ++ size_t count, size_t size) ++{ ++ int i; ++ for (i = 0; i < count; i++) { ++ iov[i].addr = ioc[i].addr; ++ iov[i].len = ioc[i].count * size; ++ iov[i].key = ioc[i].key; ++ } ++} ++ + static inline void * + ofi_iov_end(const struct iovec *iov) + { +@@ -142,4 +173,13 @@ void ofi_consume_iov(struct iovec *iovec, size_t *iovec_count, size_t offset); + + int ofi_truncate_iov(struct iovec *iov, size_t *iov_count, size_t trim_size); + ++/* Copy 'len' bytes worth of src iovec to dst */ ++int ofi_copy_iov_desc(struct iovec *dst_iov, void **dst_desc, size_t *dst_count, ++ struct iovec *src_iov, void **src_desc, size_t src_count, ++ size_t *index, size_t *offset, size_t len); ++ ++/* Copy 'len' bytes worth of src fi_rma_iov to dst */ ++int ofi_copy_rma_iov(struct fi_rma_iov *dst_iov, size_t *dst_count, ++ struct fi_rma_iov *src_iov, size_t src_count, ++ size_t *index, size_t *offset, size_t len); + #endif /* _OFI_IOV_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_list.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_list.h +index 07970716e..fdc405a9f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_list.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_list.h +@@ -40,8 +40,10 @@ + #include + #include + +-#include ++#include + ++#include ++#include + + /* + * Double-linked list +@@ -104,16 +106,29 @@ static inline void dlist_remove_init(struct dlist_entry *item) + #define dlist_foreach(head, item) \ + for ((item) = (head)->next; (item) != (head); (item) = (item)->next) + ++#define dlist_foreach_reverse(head, item) \ ++ for ((item) = (head)->prev; (item) != (head); (item) = (item)->prev ++ + #define dlist_foreach_container(head, type, container, member) \ + for ((container) = container_of((head)->next, type, member); \ + &((container)->member) != (head); \ + (container) = container_of((container)->member.next, \ + type, member)) + ++#define dlist_foreach_container_reverse(head, type, container, member) \ ++ for ((container) = container_of((head)->prev, type, member); \ ++ &((container)->member) != (head); \ ++ (container) = container_of((container)->member.prev, \ ++ type, member)) ++ + #define dlist_foreach_safe(head, item, tmp) \ + for ((item) = (head)->next, (tmp) = (item)->next; (item) != (head); \ + (item) = (tmp), (tmp) = (item)->next) + ++#define dlist_foreach_reverse_safe(head, item, tmp) \ ++ for ((item) = (head)->prev, (tmp) = (item)->prev; (item) != (head); \ ++ (item) = (tmp), (tmp) = (item)->prev) ++ + #define dlist_foreach_container_safe(head, type, container, member, tmp) \ + for ((container) = container_of((head)->next, type, member), \ + (tmp) = (container)->member.next; \ +@@ -121,6 +136,13 @@ static inline void dlist_remove_init(struct dlist_entry *item) + (container) = container_of((tmp), type, member), \ + (tmp) = (container)->member.next) + ++#define dlist_foreach_container_reverse_safe(head, type, container, member, tmp)\ ++ for ((container) = container_of((head)->prev, type, member), \ ++ (tmp) = (container)->member.prev; \ ++ &((container)->member) != (head); \ ++ (container) = container_of((tmp), type, member), \ ++ (tmp) = (container)->member.prev) ++ + typedef int dlist_func_t(struct dlist_entry *item, const void *arg); + + static inline struct dlist_entry * +@@ -150,6 +172,18 @@ dlist_remove_first_match(struct dlist_entry *head, dlist_func_t *match, + return item; + } + ++static inline void dlist_insert_order(struct dlist_entry *head, dlist_func_t *order, ++ struct dlist_entry *entry) ++{ ++ struct dlist_entry *item; ++ ++ item = dlist_find_first_match(head, order, entry); ++ if (item) ++ dlist_insert_before(entry, item); ++ else ++ dlist_insert_tail(entry, head); ++} ++ + /* splices list at the front of the list 'head' + * + * BEFORE: +@@ -194,6 +228,150 @@ static inline void dlist_splice_tail(struct dlist_entry *head, + dlist_splice_head(head->prev, to_splice); + } + ++/* ++ * Multi-threaded Double-linked list ++ */ ++struct dlist_ts { ++ struct dlist_entry head; ++ fastlock_t lock; ++}; ++ ++static inline void dlist_ts_init(struct dlist_ts *list) ++{ ++ fastlock_init(&list->lock); ++ dlist_init(&list->head); ++} ++ ++static inline int dlist_ts_empty(struct dlist_ts *list) ++{ ++ return dlist_empty(&list->head); ++} ++ ++static inline void ++dlist_ts_insert_after(struct dlist_ts *list, struct dlist_entry *item, ++ struct dlist_entry *head) ++{ ++ fastlock_acquire(&list->lock); ++ dlist_insert_after(item, head); ++ fastlock_release(&list->lock); ++} ++ ++static inline void ++dlist_ts_insert_before(struct dlist_ts *list, struct dlist_entry *item, ++ struct dlist_entry *head) ++{ ++ dlist_ts_insert_after(list, item, head->prev); ++} ++ ++#define dlist_ts_insert_head(list, item) dlist_ts_insert_after(list, item, &(list)->head) ++#define dlist_ts_insert_tail(list, item) dlist_ts_insert_before(list, item, &(list)->head) ++ ++static inline void ++dlist_ts_remove(struct dlist_ts *list, struct dlist_entry *item) ++{ ++ fastlock_acquire(&list->lock); ++ dlist_remove(item); ++ fastlock_release(&list->lock); ++} ++ ++#define dlist_ts_pop_front(list, type, container, member) \ ++ do { \ ++ fastlock_acquire(&(list)->lock); \ ++ if (dlist_ts_empty(list)) { \ ++ container = NULL; \ ++ } else { \ ++ dlist_pop_front(&(list)->head, type, \ ++ container, member); \ ++ } \ ++ fastlock_release(&(list)->lock); \ ++ } while (0) ++ ++#define dlist_ts_foreach_end(list) \ ++ fastlock_release(&(list)->lock); \ ++ } while (0) ++ ++#define dlist_ts_foreach(list, head, item) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach(list, head, item) ++ ++#define dlist_ts_foreach_reverse(list, head, item) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_reverse(list, head, item) ++ ++#define dlist_ts_foreach_container(list, head, type, container, member) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_container(type, container, member) ++ ++#define dlist_ts_foreach_container_reverse(list, head, type, container, member)\ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_container_reverse(type, container, member) ++ ++#define dlist_ts_foreach_safe(list, head, item, tmp) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_safe(head, item, tmp) ++ ++#define dlist_ts_foreach_reverse_safe(list, head, item, tmp) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_reverse_safe(head, item, tmp) ++ ++#define dlist_ts_foreach_container_safe(list, head, type, container, \ ++ member, tmp) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_container_safe(head, type, container, \ ++ member, tmp) ++ ++#define dlist_ts_foreach_container_reverse_safe(list, head, type, container,\ ++ member, tmp) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_foreach_container_reverse_safe(head, type, container, \ ++ member, tmp) ++ ++static inline struct dlist_entry * ++dlist_ts_find_first_match(struct dlist_ts *list, struct dlist_entry *head, ++ dlist_func_t *match, const void *arg) ++{ ++ struct dlist_entry *item; ++ ++ fastlock_acquire(&list->lock); ++ item = dlist_find_first_match(head, match, arg); ++ fastlock_release(&list->lock); ++ ++ return item; ++} ++ ++static inline struct dlist_entry * ++dlist_ts_remove_first_match(struct dlist_ts *list, struct dlist_entry *head, ++ dlist_func_t *match, const void *arg) ++{ ++ struct dlist_entry *item; ++ ++ fastlock_acquire(&list->lock); ++ item = dlist_remove_first_match(head, match, arg); ++ fastlock_release(&list->lock); ++ ++ return item; ++} ++ ++#define dlist_ts_splice_head(list, head, to_splice) \ ++ { \ ++ fastlock_acquire(&(list)->lock); \ ++ dlist_splice_head(head, to_splice); \ ++ fastlock_release(&list->lock); \ ++ } while(0) ++ ++#define dlist_ts_splice_tail(list, head, to_splice) \ ++ { \ ++ dlist_ts_splice_head(head->prev, to_splice); \ ++ } while(0) ++ + /* + * Single-linked list + */ +@@ -258,6 +436,17 @@ static inline struct slist_entry *slist_remove_head(struct slist *list) + (prev) = (item), (item) = (item)->next) + + ++#define slist_remove_head_container(list, type, container, member) \ ++ do { \ ++ if (slist_empty(list)) { \ ++ container = NULL; \ ++ } else { \ ++ container = container_of((list)->head, type, \ ++ member); \ ++ slist_remove_head(list); \ ++ } \ ++ } while (0) ++ + typedef int slist_func_t(struct slist_entry *item, const void *arg); + + static inline struct slist_entry * +@@ -273,6 +462,26 @@ slist_find_first_match(const struct slist *list, slist_func_t *match, + return NULL; + } + ++static inline void ++slist_insert_before_first_match(struct slist *list, slist_func_t *match, ++ struct slist_entry *entry) ++{ ++ struct slist_entry *cur, *prev; ++ ++ slist_foreach(list, cur, prev) { ++ if (match(cur, entry)) { ++ if (!prev) { ++ slist_insert_head(entry, list); ++ } else { ++ entry->next = prev->next; ++ prev->next = entry; ++ } ++ return; ++ } ++ } ++ slist_insert_tail(entry, list); ++} ++ + static inline void slist_remove(struct slist *list, + struct slist_entry *item, struct slist_entry *prev) + { +@@ -300,6 +509,139 @@ slist_remove_first_match(struct slist *list, slist_func_t *match, const void *ar + return NULL; + } + ++static inline void slist_swap(struct slist *dst, struct slist *src) ++{ ++ struct slist_entry *dst_head = dst->head; ++ struct slist_entry *dst_tail = dst->tail; ++ ++ dst->head = src->head; ++ dst->tail = src->tail; ++ ++ src->head = dst_head; ++ src->tail = dst_tail; ++} ++ ++/* splices src list at the front of the dst list ++ * ++ * BEFORE: ++ * dst: HEAD->a->b->c->TAIL ++ * src: HEAD->d->e->TAIL ++ * ++ * AFTER: ++ * dst: HEAD->d->e->a->b->c->TAIL ++ * src: HEAD->TAIL (empty list) ++ */ ++static inline struct slist * ++slist_splice_head(struct slist *dst, struct slist *src) ++{ ++ if (slist_empty(src)) ++ return dst; ++ ++ if (slist_empty(dst)) { ++ slist_swap(dst, src); ++ return dst; ++ } ++ ++ src->tail->next = dst->head; ++ dst->head = src->head; ++ ++ slist_init(src); ++ ++ return dst; ++} ++ ++/* splices src list at the back of the dst list ++ * ++ * BEFORE: ++ * dst: HEAD->a->b->c->TAIL ++ * src: HEAD->d->e->TAIL ++ * ++ * AFTER: ++ * dst: HEAD->a->b->c->d->e->TAIL ++ * src: HEAD->TAIL (empty list) ++ */ ++static inline struct slist * ++slist_splice_tail(struct slist *dst, struct slist *src) ++{ ++ if (slist_empty(src)) ++ return dst; ++ ++ if (slist_empty(dst)) { ++ slist_swap(dst, src); ++ return dst; ++ } ++ ++ dst->tail->next = src->head; ++ dst->tail = src->tail; ++ ++ slist_init(src); ++ ++ return dst; ++} ++ ++/* ++ * Singly-linked list with blocking wait-until-avail support ++ */ ++ ++struct slistfd { ++ struct slist list; ++ struct fd_signal signal; ++}; ++ ++static inline int slistfd_init(struct slistfd *list) ++{ ++ slist_init(&list->list); ++ return fd_signal_init(&list->signal); ++} ++ ++static inline void slistfd_free(struct slistfd *list) ++{ ++ fd_signal_free(&list->signal); ++} ++ ++static inline int slistfd_empty(struct slistfd *list) ++{ ++ return slist_empty(&list->list); ++} ++ ++static inline void ++slistfd_insert_head(struct slist_entry *item, struct slistfd *list) ++{ ++ slist_insert_head(item, &list->list); ++ fd_signal_set(&list->signal); ++} ++ ++static inline void ++slistfd_insert_tail(struct slist_entry *item, struct slistfd *list) ++{ ++ slist_insert_tail(item, &list->list); ++ fd_signal_set(&list->signal); ++} ++ ++static inline struct slist_entry *slistfd_remove_head(struct slistfd *list) ++{ ++ struct slist_entry *entry = slist_remove_head(&list->list); ++ if (entry) ++ fd_signal_reset(&list->signal); ++ return entry; ++} ++ ++static inline int slistfd_wait_avail(struct slistfd *list, int timeout) ++{ ++ int ret; ++ ++ if (!slistfd_empty(list)) ++ return 1; ++ ++ ret = fd_signal_poll(&list->signal, timeout); ++ return ret ? ret : !slistfd_empty(list); ++} ++ ++static inline int slistfd_get_fd(struct slistfd *list) ++{ ++ return fd_signal_get(&list->signal); ++} ++ + /* + * Double-linked list with blocking wait-until-avail support + */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_lock.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_lock.h +index 9fc7f400a..afde786b0 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_lock.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_lock.h +@@ -76,6 +76,7 @@ int fi_wait_cond(pthread_cond_t *cond, pthread_mutex_t *mut, int timeout_ms); + typedef struct { + fastlock_t_ impl; + int is_initialized; ++ int in_use; + } fastlock_t; + + static inline int fastlock_init(fastlock_t *lock) +@@ -84,6 +85,8 @@ static inline int fastlock_init(fastlock_t *lock) + + ret = fastlock_init_(&lock->impl); + lock->is_initialized = !ret; ++ lock->in_use = 0; ++ + return ret; + } + +@@ -104,19 +107,28 @@ static inline void fastlock_acquire(fastlock_t *lock) + assert(lock->is_initialized); + ret = fastlock_acquire_(&lock->impl); + assert(!ret); ++ lock->in_use++; + } + + static inline int fastlock_tryacquire(fastlock_t *lock) + { ++ int ret; ++ + assert(lock->is_initialized); +- return fastlock_tryacquire_(&lock->impl); ++ ret = fastlock_tryacquire_(&lock->impl); ++ if (!ret) ++ lock->in_use++; ++ ++ return ret; + } + + static inline void fastlock_release(fastlock_t *lock) + { + int ret; + ++ assert(lock->in_use); + assert(lock->is_initialized); ++ lock->in_use--; + ret = fastlock_release_(&lock->impl); + assert(!ret); + } +@@ -132,7 +144,32 @@ static inline void fastlock_release(fastlock_t *lock) + + #endif + ++typedef void(*ofi_fastlock_acquire_t)(fastlock_t *lock); ++typedef void(*ofi_fastlock_release_t)(fastlock_t *lock); + ++static inline void ofi_fastlock_acquire(fastlock_t *lock) ++{ ++ fastlock_acquire(lock); ++} ++static inline void ofi_fastlock_release(fastlock_t *lock) ++{ ++ fastlock_release(lock); ++} ++static inline void ofi_fastlock_acquire_noop(fastlock_t *lock) ++{ ++#if ENABLE_DEBUG ++ /* These non-op routines must be used only by a single-threaded code*/ ++ assert(!lock->in_use); ++ lock->in_use = 1; ++#endif ++} ++static inline void ofi_fastlock_release_noop(fastlock_t *lock) ++{ ++#if ENABLE_DEBUG ++ assert(lock->in_use); ++ lock->in_use = 0; ++#endif ++} + + #ifdef __cplusplus + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mem.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mem.h +index 93c87ee50..abe2104aa 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mem.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mem.h +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2015-2016 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -63,12 +64,34 @@ static inline void *mem_dup(const void *src, size_t size) + return dest; + } + ++static inline int ofi_str_dup(const char *src, char **dst) ++{ ++ if (src) { ++ *dst = strdup(src); ++ if (!*dst) ++ return -FI_ENOMEM; ++ } else { ++ *dst = NULL; ++ } ++ return 0; ++} + + /* + * Buffer pool (free stack) template + */ + #define FREESTACK_EMPTY NULL + ++#define freestack_get_next(user_buf) ((char *)user_buf - sizeof(void *)) ++#define freestack_get_user_buf(entry) ((char *)entry + sizeof(void *)) ++ ++#if ENABLE_DEBUG ++#define freestack_init_next(entry) *((void **)entry) = NULL ++#define freestack_check_next(entry) assert(*((void **)entry) == NULL) ++#else ++#define freestack_init_next(entry) ++#define freestack_check_next(entry) ++#endif ++ + #define FREESTACK_HEADER \ + size_t size; \ + void *next; \ +@@ -76,8 +99,9 @@ static inline void *mem_dup(const void *src, size_t size) + #define freestack_isempty(fs) ((fs)->next == FREESTACK_EMPTY) + #define freestack_push(fs, p) \ + do { \ +- *(void **) p = (fs)->next; \ +- (fs)->next = p; \ ++ freestack_check_next(freestack_get_next(p)); \ ++ *(void **) (freestack_get_next(p)) = (fs)->next; \ ++ (fs)->next = (freestack_get_next(p)); \ + } while (0) + #define freestack_pop(fs) freestack_pop_impl(fs, (fs)->next) + +@@ -88,40 +112,59 @@ static inline void* freestack_pop_impl(void *fs, void *fs_next) + } *freestack = fs; + assert(!freestack_isempty(freestack)); + freestack->next = *((void **)fs_next); +- return fs_next; ++ freestack_init_next(fs_next); ++ return freestack_get_user_buf(fs_next); + } + + #define DECLARE_FREESTACK(entrytype, name) \ ++struct name ## _entry { \ ++ void *next; \ ++ entrytype buf; \ ++}; \ + struct name { \ + FREESTACK_HEADER \ +- entrytype buf[]; \ ++ struct name ## _entry entry[]; \ + }; \ + \ +-static inline void name ## _init(struct name *fs, size_t size) \ ++typedef void (*name ## _entry_init_func)(entrytype *buf, \ ++ void *arg); \ ++ \ ++static inline void \ ++name ## _init(struct name *fs, size_t size, \ ++ name ## _entry_init_func init, void *arg) \ + { \ + ssize_t i; \ + assert(size == roundup_power_of_two(size)); \ +- assert(sizeof(fs->buf[0]) >= sizeof(void *)); \ ++ assert(sizeof(fs->entry[0].buf) >= sizeof(void *)); \ + fs->size = size; \ + fs->next = FREESTACK_EMPTY; \ +- for (i = size - 1; i >= 0; i--) \ +- freestack_push(fs, &fs->buf[i]); \ ++ for (i = size - 1; i >= 0; i--) { \ ++ if (init) \ ++ init(&fs->entry[i].buf, arg); \ ++ freestack_push(fs, &fs->entry[i].buf); \ ++ } \ + } \ + \ +-static inline struct name * name ## _create(size_t size) \ ++static inline struct name * \ ++name ## _create(size_t size, name ## _entry_init_func init, \ ++ void *arg) \ + { \ + struct name *fs; \ +- fs = calloc(1, sizeof(*fs) + sizeof(entrytype) * \ +- (roundup_power_of_two(size))); \ ++ fs = calloc(1, sizeof(*fs) + \ ++ sizeof(struct name ## _entry) * \ ++ (roundup_power_of_two(size))); \ + if (fs) \ +- name ##_init(fs, roundup_power_of_two(size)); \ ++ name ##_init(fs, roundup_power_of_two(size), \ ++ init, arg); \ + return fs; \ + } \ + \ + static inline int name ## _index(struct name *fs, \ +- entrytype *entry) \ ++ entrytype *entry) \ + { \ +- return (int)(entry - fs->buf); \ ++ return (int)((struct name ## _entry *) \ ++ (freestack_get_next(entry)) \ ++ - (struct name ## _entry *)fs->entry); \ + } \ + \ + static inline void name ## _free(struct name *fs) \ +@@ -142,8 +185,10 @@ static inline void name ## _free(struct name *fs) \ + #define smr_freestack_isempty(fs) ((fs)->next == SMR_FREESTACK_EMPTY) + #define smr_freestack_push(fs, local_p) \ + do { \ +- void *p = (char **) fs->base_addr + ((char **) local_p - (char **) fs); \ +- *(void **) local_p = (fs)->next; \ ++ void *p = (char **) fs->base_addr + \ ++ ((char **) freestack_get_next(local_p) - \ ++ (char **) fs); \ ++ *(void **) freestack_get_next(local_p) = (fs)->next; \ + (fs)->next = p; \ + } while (0) + #define smr_freestack_pop(fs) smr_freestack_pop_impl(fs, fs->next) +@@ -160,25 +205,29 @@ static inline void* smr_freestack_pop_impl(void *fs, void *next) + local = (char **) fs + ((char **) next - + (char **) freestack->base_addr); + next = *((void **) local); +- return local; ++ return freestack_get_user_buf(local); + } + + #define DECLARE_SMR_FREESTACK(entrytype, name) \ ++struct name ## _entry { \ ++ void *next; \ ++ entrytype buf; \ ++}; \ + struct name { \ + SMR_FREESTACK_HEADER \ +- entrytype buf[]; \ ++ struct name ## _entry entry[]; \ + }; \ + \ + static inline void name ## _init(struct name *fs, size_t size) \ + { \ + ssize_t i; \ + assert(size == roundup_power_of_two(size)); \ +- assert(sizeof(fs->buf[0]) >= sizeof(void *)); \ ++ assert(sizeof(fs->entry[0].buf) >= sizeof(void *)); \ + fs->size = size; \ + fs->next = SMR_FREESTACK_EMPTY; \ + fs->base_addr = fs; \ + for (i = size - 1; i >= 0; i--) \ +- smr_freestack_push(fs, &fs->buf[i]); \ ++ smr_freestack_push(fs, &fs->entry[i].buf); \ + } \ + \ + static inline struct name * name ## _create(size_t size) \ +@@ -194,7 +243,9 @@ static inline struct name * name ## _create(size_t size) \ + static inline int name ## _index(struct name *fs, \ + entrytype *entry) \ + { \ +- return (int)(entry - fs->buf); \ ++ return (int)((struct name ## _entry *) \ ++ (freestack_get_next(entry)) \ ++ - (struct name ## _entry *)fs->entry); \ + } \ + \ + static inline void name ## _free(struct name *fs) \ +@@ -206,45 +257,72 @@ static inline void name ## _free(struct name *fs) \ + /* + * Buffer Pool + */ ++ ++#define UTIL_BUF_POOL_REGION_CHUNK_CNT 16 ++ + struct util_buf_pool; + typedef int (*util_buf_region_alloc_hndlr) (void *pool_ctx, void *addr, size_t len, + void **context); + typedef void (*util_buf_region_free_hndlr) (void *pool_ctx, void *context); ++typedef void (*util_buf_region_init_func) (void *pool_ctx, void *buf); ++ ++struct util_buf_attr { ++ size_t size; ++ size_t alignment; ++ size_t max_cnt; ++ size_t chunk_cnt; ++ util_buf_region_alloc_hndlr alloc_hndlr; ++ util_buf_region_free_hndlr free_hndlr; ++ util_buf_region_init_func init; ++ void *ctx; ++ uint8_t track_used; ++ uint8_t is_mmap_region; ++ struct { ++ uint8_t used; ++ /* if the `ordered` capability is used, the buffer ++ * with the lowest index is returned */ ++ uint8_t ordered; ++ } indexing; ++}; + + struct util_buf_pool { +- size_t data_sz; +- size_t entry_sz; +- size_t max_cnt; +- size_t chunk_cnt; +- size_t alignment; +- size_t num_allocated; +- struct slist buf_list; +- struct slist region_list; +- util_buf_region_alloc_hndlr alloc_hndlr; +- util_buf_region_free_hndlr free_hndlr; +- void *ctx; ++ size_t entry_sz; ++ size_t num_allocated; ++ union { ++ struct slist buffers; ++ struct dlist_entry regions; ++ } list; ++ struct util_buf_region **regions_table; ++ size_t regions_cnt; ++ struct util_buf_attr attr; + }; + + struct util_buf_region { +- struct slist_entry entry; ++ struct dlist_entry entry; ++ struct dlist_entry buf_list; + char *mem_region; ++ size_t size; + void *context; +-#if ENABLE_DEBUG ++ struct util_buf_pool *pool; ++#ifndef NDEBUG + size_t num_used; + #endif + }; + + struct util_buf_footer { ++ union { ++ struct slist_entry slist; ++ struct dlist_entry dlist; ++ } entry; + struct util_buf_region *region; ++ size_t index; + }; + +-union util_buf { +- struct slist_entry entry; +- uint8_t data[0]; +-}; ++int util_buf_pool_create_attr(struct util_buf_attr *attr, ++ struct util_buf_pool **buf_pool); + + /* create buffer pool with alloc/free handlers */ +-int util_buf_pool_create_ex(struct util_buf_pool **pool, ++int util_buf_pool_create_ex(struct util_buf_pool **buf_pool, + size_t size, size_t alignment, + size_t max_cnt, size_t chunk_cnt, + util_buf_region_alloc_hndlr alloc_hndlr, +@@ -261,91 +339,144 @@ static inline int util_buf_pool_create(struct util_buf_pool **pool, + NULL, NULL, NULL); + } + +-static inline int util_buf_avail(struct util_buf_pool *pool) +-{ +- return !slist_empty(&pool->buf_list); +-} +- + int util_buf_grow(struct util_buf_pool *pool); + +-#if ENABLE_DEBUG +- +-void *util_buf_get(struct util_buf_pool *pool); +-void util_buf_release(struct util_buf_pool *pool, void *buf); ++static inline struct util_buf_footer * ++util_buf_get_ftr(struct util_buf_pool *pool, void *buf) ++{ ++ return (struct util_buf_footer *) ((char *) buf + pool->attr.size); ++} + +-#else ++static inline void *util_buf_get_data(struct util_buf_pool *pool, ++ struct util_buf_footer *buf_ftr) ++{ ++ return ((char *) buf_ftr - pool->attr.size); ++} + + static inline void *util_buf_get(struct util_buf_pool *pool) + { +- struct slist_entry *entry; +- entry = slist_remove_head(&pool->buf_list); +- return entry; ++ struct util_buf_footer *buf_ftr; ++ ++ assert(!pool->attr.indexing.ordered); ++ ++ slist_remove_head_container(&pool->list.buffers, struct util_buf_footer, ++ buf_ftr, entry.slist); ++ assert(++buf_ftr->region->num_used); ++ return util_buf_get_data(pool, buf_ftr); + } + + static inline void util_buf_release(struct util_buf_pool *pool, void *buf) + { +- union util_buf *util_buf = buf; +- slist_insert_head(&util_buf->entry, &pool->buf_list); ++ assert(util_buf_get_ftr(pool, buf)->region->num_used--); ++ assert(!pool->attr.indexing.ordered); ++ slist_insert_head(&util_buf_get_ftr(pool, buf)->entry.slist, &pool->list.buffers); + } +-#endif + +-static inline void *util_buf_get_ex(struct util_buf_pool *pool, void **context) ++static inline void *util_buf_indexed_get(struct util_buf_pool *pool) + { +- union util_buf *buf; + struct util_buf_footer *buf_ftr; +- +- buf = util_buf_get(pool); +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- assert(context); +- *context = buf_ftr->region->context; +- return buf; ++ struct util_buf_region *buf_region; ++ ++ assert(pool->attr.indexing.ordered); ++ ++ buf_region = container_of(pool->list.regions.next, ++ struct util_buf_region, entry); ++ dlist_pop_front(&buf_region->buf_list, struct util_buf_footer, ++ buf_ftr, entry.dlist); ++ assert(++buf_ftr->region->num_used); ++ if (dlist_empty(&buf_region->buf_list)) ++ dlist_remove_init(&buf_region->entry); ++ return util_buf_get_data(pool, buf_ftr); + } + +-static inline void *util_buf_alloc(struct util_buf_pool *pool) ++int util_buf_is_lower(struct dlist_entry *item, const void *arg); ++int util_buf_region_is_lower(struct dlist_entry *item, const void *arg); ++ ++static inline void util_buf_indexed_release(struct util_buf_pool *pool, void *buf) + { +- if (!util_buf_avail(pool)) { +- if (util_buf_grow(pool)) +- return NULL; ++ struct util_buf_footer *buf_ftr; ++ ++ assert(pool->attr.indexing.ordered); ++ ++ buf_ftr = util_buf_get_ftr(pool, buf); ++ ++ assert(buf_ftr->region->num_used--); ++ ++ dlist_insert_order(&buf_ftr->region->buf_list, ++ util_buf_is_lower, &buf_ftr->entry.dlist); ++ ++ if (dlist_empty(&buf_ftr->region->entry)) { ++ dlist_insert_order(&pool->list.regions, ++ util_buf_region_is_lower, ++ &buf_ftr->region->entry); + } +- return util_buf_get(pool); + } + +-static inline void *util_buf_alloc_ex(struct util_buf_pool *pool, void **context) ++static inline size_t util_get_buf_index(struct util_buf_pool *pool, void *buf) + { +- union util_buf *buf; +- struct util_buf_footer *buf_ftr; +- +- buf = util_buf_alloc(pool); +- if (OFI_UNLIKELY(!buf)) +- return NULL; ++ assert(util_buf_get_ftr(pool, buf)->region->num_used); ++ assert(pool->attr.indexing.used); ++ return util_buf_get_ftr(pool, buf)->index; ++} + +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- assert(context); +- *context = buf_ftr->region->context; ++static inline void *util_buf_get_by_index(struct util_buf_pool *pool, size_t index) ++{ ++ void *buf; ++ assert(pool->attr.indexing.used); ++ buf = pool->regions_table[(size_t)(index / pool->attr.chunk_cnt)]-> ++ mem_region + (index % pool->attr.chunk_cnt) * pool->entry_sz; ++ assert(util_buf_get_ftr(pool, buf)->region->num_used); + return buf; + } + +-#if ENABLE_DEBUG +-static inline int util_buf_use_ftr(struct util_buf_pool *pool) ++static inline void *util_buf_get_ctx(struct util_buf_pool *pool, void *buf) + { +- OFI_UNUSED(pool); +- return 1; ++ return util_buf_get_ftr(pool, buf)->region->context; + } +-#else +-static inline int util_buf_use_ftr(struct util_buf_pool *pool) ++ ++static inline int util_buf_avail(struct util_buf_pool *pool) + { +- return (pool->alloc_hndlr || pool->free_hndlr) ? 1 : 0; ++ return !slist_empty(&pool->list.buffers); + } +-#endif + +-static inline void *util_buf_get_ctx(struct util_buf_pool *pool, void *buf) ++static inline int util_buf_indexed_avail(struct util_buf_pool *pool) + { +- struct util_buf_footer *buf_ftr; +- assert(util_buf_use_ftr(pool)); +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- return buf_ftr->region->context; ++ return !dlist_empty(&pool->list.regions); ++} ++ ++#define UTIL_BUF_DEFINE_GETTERS(name) \ ++static inline void *util_buf ## name ## get_ex(struct util_buf_pool *pool, \ ++ void **context) \ ++{ \ ++ void *buf = util_buf ## name ## get(pool); \ ++ assert(context); \ ++ *context = util_buf_get_ctx(pool, buf); \ ++ return buf; \ ++} \ ++ \ ++static inline void *util_buf ## name ## alloc(struct util_buf_pool *pool) \ ++{ \ ++ if (OFI_UNLIKELY(!util_buf ## name ## avail(pool))) { \ ++ if (util_buf_grow(pool)) \ ++ return NULL; \ ++ } \ ++ return util_buf ## name ## get(pool); \ ++} \ ++ \ ++static inline void *util_buf ## name ## alloc_ex(struct util_buf_pool *pool, \ ++ void **context) \ ++{ \ ++ void *buf = util_buf ## name ## alloc(pool); \ ++ if (OFI_UNLIKELY(!buf)) \ ++ return NULL; \ ++ assert(context); \ ++ *context = util_buf_get_ctx(pool, buf); \ ++ return buf; \ + } + ++UTIL_BUF_DEFINE_GETTERS(_); ++UTIL_BUF_DEFINE_GETTERS(_indexed_); ++ + void util_buf_pool_destroy(struct util_buf_pool *pool); + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mr.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mr.h +index 05c156871..4cd05d984 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mr.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_mr.h +@@ -51,10 +51,23 @@ + + /* FI_LOCAL_MR is valid in pre-libfaric-1.5 and can be valid in + * post-libfabric-1.5 */ +-#define OFI_CHECK_MR_LOCAL(info) \ +- ((info->domain_attr->mr_mode & FI_MR_LOCAL) || \ +- (!(info->domain_attr->mr_mode & ~(FI_MR_BASIC | FI_MR_SCALABLE)) && \ +- (info->mode & FI_LOCAL_MR))) ++static inline int ofi_mr_local(const struct fi_info *info) ++{ ++ if (!info) ++ return 0; ++ ++ if (!info->domain_attr) ++ goto check_local_mr; ++ ++ if (info->domain_attr->mr_mode & FI_MR_LOCAL) ++ return 1; ++ ++ if (info->domain_attr->mr_mode & ~(FI_MR_BASIC | FI_MR_SCALABLE)) ++ return 0; ++ ++check_local_mr: ++ return (info->mode & FI_LOCAL_MR) ? 1 : 0; ++} + + #define OFI_MR_MODE_RMA_TARGET (FI_MR_RAW | FI_MR_VIRT_ADDR | \ + FI_MR_PROV_KEY | FI_MR_RMA_EVENT) +@@ -88,11 +101,10 @@ struct ofi_notification_queue; + struct ofi_mem_monitor { + ofi_atomic32_t refcnt; + +- int (*subscribe)(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription); +- void (*unsubscribe)(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription); +- struct ofi_subscription *(*get_event)(struct ofi_mem_monitor *notifier); ++ int (*subscribe)(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription); ++ void (*unsubscribe)(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription); + }; + + struct ofi_notification_queue { +@@ -105,8 +117,7 @@ struct ofi_notification_queue { + struct ofi_subscription { + struct ofi_notification_queue *nq; + struct dlist_entry entry; +- void *addr; +- size_t len; ++ struct iovec iov; + }; + + void ofi_monitor_init(struct ofi_mem_monitor *monitor); +@@ -120,7 +131,19 @@ int ofi_monitor_subscribe(struct ofi_notification_queue *nq, + struct ofi_subscription *subscription); + void ofi_monitor_unsubscribe(struct ofi_subscription *subscription); + struct ofi_subscription *ofi_monitor_get_event(struct ofi_notification_queue *nq); +- ++static inline void ++ofi_monitor_add_event_to_nq(struct ofi_subscription *subscription) ++{ ++ FI_DBG(&core_prov, FI_LOG_MR, ++ "Add event to NQ, context=%p, addr=%p, len=%"PRIu64" nq=%p\n", ++ subscription, subscription->iov.iov_base, ++ subscription->iov.iov_len, subscription->nq); ++ fastlock_acquire(&subscription->nq->lock); ++ if (dlist_empty(&subscription->entry)) ++ dlist_insert_tail(&subscription->entry, ++ &subscription->nq->list); ++ fastlock_release(&subscription->nq->lock); ++} + + /* + * MR map +@@ -181,6 +204,32 @@ struct ofi_mr_entry { + uint8_t data[]; + }; + ++struct ofi_mr_storage; ++ ++typedef void (*ofi_mr_destroy_t)(struct ofi_mr_storage *storage); ++typedef struct ofi_mr_entry *(*ofi_mr_find_t)(struct ofi_mr_storage *storage, ++ const struct iovec *key); ++typedef int (*ofi_mr_insert_t)(struct ofi_mr_storage *storage, ++ struct iovec *key, ++ struct ofi_mr_entry *entry); ++typedef int (*ofi_mr_erase_t)(struct ofi_mr_storage *storage, ++ struct ofi_mr_entry *entry); ++ ++enum ofi_mr_storage_type { ++ OFI_MR_STORAGE_DEFAULT = 0, ++ OFI_MR_STORAGE_RBT, ++ OFI_MR_STORAGE_USER, ++}; ++ ++struct ofi_mr_storage { ++ enum ofi_mr_storage_type type; ++ void *storage; ++ ofi_mr_destroy_t destroy; ++ ofi_mr_find_t find; ++ ofi_mr_insert_t insert; ++ ofi_mr_erase_t erase; ++}; ++ + struct ofi_mr_cache { + struct util_domain *domain; + struct ofi_notification_queue nq; +@@ -189,7 +238,7 @@ struct ofi_mr_cache { + int merge_regions; + size_t entry_data_size; + +- RbtHandle mr_tree; ++ struct ofi_mr_storage mr_storage; + struct dlist_entry lru_list; + + size_t cached_cnt; +@@ -197,6 +246,7 @@ struct ofi_mr_cache { + size_t search_cnt; + size_t delete_cnt; + size_t hit_cnt; ++ struct util_buf_pool *entry_pool; + + int (*add_region)(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_net.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_net.h +index d962bb336..dbb8cb5fd 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_net.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_net.h +@@ -105,12 +105,17 @@ static inline int ofi_sendall_socket(SOCKET sock, const void *buf, size_t len) + size_t sent; + ssize_t ret; + +- for (sent = 0, ret = 0; (sent < len) && (ret >= 0); sent += ret) ++ for (sent = 0, ret = 0; (sent < len) && (ret >= 0); ) { + ret = ofi_send_socket(sock, ((char *) buf) + sent, len - sent, 0); ++ if (ret > 0) ++ sent += ret; ++ } + +- return (size_t) ret != len; ++ return (size_t) sent != len; + } + ++int ofi_discard_socket(SOCKET sock, size_t len); ++ + /* + * Address utility functions + */ +@@ -119,6 +124,13 @@ static inline int ofi_sendall_socket(SOCKET sock, const void *buf, size_t len) + #define AF_IB 27 + #endif + ++union ofi_sock_ip { ++ struct sockaddr sa; ++ struct sockaddr_in sin; ++ struct sockaddr_in6 sin6; ++ uint8_t align[32]; ++}; ++ + int ofi_addr_cmp(const struct fi_provider *prov, const struct sockaddr *sa1, + const struct sockaddr *sa2); + int ofi_getifaddrs(struct ifaddrs **ifap); +@@ -141,22 +153,21 @@ static inline size_t ofi_sizeofaddr(const struct sockaddr *addr) + return sizeof(struct sockaddr_in6); + default: + FI_WARN(&core_prov, FI_LOG_CORE, "Unknown address format"); +- assert(0); + return 0; + } + } + +-static inline int ofi_equals_ipaddr(const struct sockaddr_in *addr1, +- const struct sockaddr_in *addr2) ++static inline size_t ofi_sizeofip(const struct sockaddr *addr) + { +- return (addr1->sin_addr.s_addr == addr2->sin_addr.s_addr); +-} +- +-static inline int ofi_equals_sockaddr(const struct sockaddr_in *addr1, +- const struct sockaddr_in *addr2) +-{ +- return (ofi_equals_ipaddr(addr1, addr2) && +- (addr1->sin_port == addr2->sin_port)); ++ switch (addr->sa_family) { ++ case AF_INET: ++ return sizeof(struct in_addr); ++ case AF_INET6: ++ return sizeof(struct in6_addr); ++ default: ++ FI_WARN(&core_prov, FI_LOG_CORE, "Unknown address format"); ++ return 0; ++ } + } + + static inline int ofi_translate_addr_format(int family) +@@ -173,19 +184,7 @@ static inline int ofi_translate_addr_format(int family) + } + } + +-static inline int ofi_get_sa_family(uint32_t addr_format) +-{ +- switch (addr_format) { +- case FI_SOCKADDR_IN: +- return AF_INET; +- case FI_SOCKADDR_IN6: +- return AF_INET6; +- case FI_SOCKADDR_IB: +- return AF_IB; +- default: +- return 0; +- } +-} ++uint16_t ofi_get_sa_family(const struct fi_info *info); + + static inline int ofi_ipv4_is_any_addr(struct sockaddr *sa) + { +@@ -226,16 +225,16 @@ static inline int ofi_is_any_addr(struct sockaddr *sa) + } + } + +-static inline uint16_t ofi_addr_get_port(struct sockaddr *addr) ++static inline uint16_t ofi_addr_get_port(const struct sockaddr *addr) + { + if (!addr) + return 0; + + switch (ofi_sa_family(addr)) { + case AF_INET: +- return ntohs(ofi_sin_port(addr)); ++ return ntohs(ofi_sin_port((const struct sockaddr_in *) addr)); + case AF_INET6: +- return ntohs(ofi_sin6_port(addr)); ++ return ntohs(ofi_sin6_port((const struct sockaddr_in6 *) addr)); + default: + FI_WARN(&core_prov, FI_LOG_FABRIC, "Unknown address format\n"); + assert(0); +@@ -258,9 +257,50 @@ static inline void ofi_addr_set_port(struct sockaddr *addr, uint16_t port) + } + } + ++static inline void * ofi_get_ipaddr(const struct sockaddr *addr) ++{ ++ switch (addr->sa_family) { ++ case AF_INET: ++ return &ofi_sin_addr((const struct sockaddr_in *) addr); ++ case AF_INET6: ++ return &ofi_sin6_addr((const struct sockaddr_in6 *) addr); ++ default: ++ return NULL; ++ } ++} ++ ++static inline int ofi_equals_ipaddr(const struct sockaddr *addr1, ++ const struct sockaddr *addr2) ++{ ++ if (addr1->sa_family != addr2->sa_family) ++ return 0; ++ ++ switch (addr1->sa_family) { ++ case AF_INET: ++ return !memcmp(&ofi_sin_addr(addr1), &ofi_sin_addr(addr2), ++ sizeof(ofi_sin_addr(addr1))); ++ case AF_INET6: ++ return !memcmp(&ofi_sin6_addr(addr1), &ofi_sin6_addr(addr2), ++ sizeof(ofi_sin6_addr(addr1))); ++ default: ++ return 0; ++ } ++} ++ ++static inline int ofi_equals_sockaddr(const struct sockaddr *addr1, ++ const struct sockaddr *addr2) ++{ ++ return (ofi_addr_get_port(addr1) == ofi_addr_get_port(addr2)) && ++ ofi_equals_ipaddr(addr1, addr2); ++} ++ + int ofi_is_wildcard_listen_addr(const char *node, const char *service, + uint64_t flags, const struct fi_info *hints); + ++size_t ofi_mask_addr(struct sockaddr *maskaddr, const struct sockaddr *srcaddr, ++ const struct sockaddr *netmask); ++ ++ + /* + * Address logging + */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_osd.h +index 432d80960..97be08b7b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_osd.h +@@ -33,6 +33,7 @@ + #ifndef _OFI_OSD_H_ + #define _OFI_OSD_H_ + ++#include + + /* We use macros to create atomic and complex function definitions, + * and we can't have spaces in function names */ +@@ -76,4 +77,34 @@ typedef long double long_double; + #define OFI_UNLIKELY(x) (x) + #endif + ++enum { ++ OFI_ENDIAN_UNKNOWN, ++ OFI_ENDIAN_BIG, ++ OFI_ENDIAN_LITTLE, ++ OFI_ENDIAN_BIG_WORD, /* Middle-endian, Honeywell 316 style */ ++ OFI_ENDIAN_LITTLE_WORD, /* Middle-endian, PDP-11 style */ ++}; ++ ++static inline int ofi_detect_endianness(void) ++{ ++ union { ++ uint8_t data[sizeof(uint32_t)]; ++ uint32_t value; ++ } checker = { ++ .data = { 0x00, 0x01, 0x02, 0x03 }, ++ }; ++ switch (checker.value) { ++ case 0x00010203UL: ++ return OFI_ENDIAN_BIG; ++ case 0x03020100UL: ++ return OFI_ENDIAN_LITTLE; ++ case 0x02030001UL: ++ return OFI_ENDIAN_BIG_WORD; ++ case 0x01000302UL: ++ return OFI_ENDIAN_LITTLE_WORD; ++ default: ++ return OFI_ENDIAN_UNKNOWN; ++ } ++} ++ + #endif /* _OFI_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_perf.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_perf.h +index 64c4ac178..617d6798f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_perf.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_perf.h +@@ -35,6 +35,7 @@ + + #include "config.h" + ++#include + #include + #include + #include +@@ -83,6 +84,12 @@ struct ofi_perf_data { + }; + + ++void ofi_perf_init(void); ++extern enum ofi_perf_domain perf_domain; ++extern uint32_t perf_cntr; ++extern uint32_t perf_flags; ++ ++ + /* + * Performance management unit: + * +@@ -147,9 +154,7 @@ static inline void ofi_perf_end(struct ofi_perf_ctx *ctx, + + struct ofi_perfset { + const struct fi_provider *prov; +- char **names; + size_t size; +- size_t count; + struct ofi_perf_ctx *ctx; + struct ofi_perf_data *data; + }; +@@ -160,9 +165,19 @@ int ofi_perfset_create(const struct fi_provider *prov, + uint32_t flags); + void ofi_perfset_close(struct ofi_perfset *set); + +-struct ofi_perf_data *ofi_perfset_data(struct ofi_perfset *set, +- const char *name); +-void ofi_perfset_log(struct ofi_perfset *set); ++void ofi_perfset_log(struct ofi_perfset *set, const char **names); ++ ++static inline void ofi_perfset_start(struct ofi_perfset *set, size_t index) ++{ ++ assert(index < set->size); ++ ofi_perf_start(set->ctx, &set->data[index]); ++} ++ ++static inline void ofi_perfset_end(struct ofi_perfset *set, size_t index) ++{ ++ assert(index < set->size); ++ ofi_perf_end(set->ctx, &set->data[index]); ++} + + + #ifdef __cplusplus +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_proto.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_proto.h +index 5a569b1d8..6e63e59a5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_proto.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_proto.h +@@ -58,6 +58,9 @@ enum { + ofi_ctrl_ack, + ofi_ctrl_nack, + ofi_ctrl_discard, ++ ofi_ctrl_seg_data, ++ ofi_ctrl_atomic, ++ ofi_ctrl_atomic_resp, + }; + + /* +@@ -66,13 +69,6 @@ enum { + * + * version: OFI_CTRL_VERSION + * type +- * seg_size: +- * Data packets - size of current message, in bytes. +- * Large data packets - size of current message, 2 ^ seg_size, in bytes +- * Ctrl packets - number of segments in window allowed past seg_no. +- * seg_no: +- * Data packets - position 0..(n-1) of segment in current message. +- * Ctrl packets - last segment ack'ed. + * conn_id: Communication identifier. Conn_id values are exchanged between + * peer endpoints as part of communication setup. This field is valid + * as part of the first message in any data transfer. +@@ -80,6 +76,13 @@ enum { + * Unique number identifying all segments of a message + * Message id can be formed using an equation similar to: + * (seq_no++ << tx size) | tx_key ++ * seg_size: ++ * Data packets - size of current message, in bytes. ++ * Large data packets - size of current message, 2 ^ seg_size, in bytes ++ * Ctrl packets - number of segments in window allowed past seg_no. ++ * seg_no: ++ * Data packets - position 0..(n-1) of segment in current message. ++ * Ctrl packets - last segment ack'ed. + * conn_data: Connection specific data. This may be set to the index + * of the transmit endpoint's address in its local AV, which may + * be used as a hint at the Rx side to locate the Tx EP address in +@@ -89,19 +92,21 @@ enum { + * rx_key: This is the receiver's identifier for a message (receive side + * equivalent of msg_id). Key returned by the Rx side, that the + * Tx side includes in subsequent packets. This field is used for +- * rendezvous and segmentation and reassembly protocols. ++ * rendezvous protocol. + * The rx_key may be formed similar to message_id. ++ * ctrl_data: This is provider specific data for remote side + */ + struct ofi_ctrl_hdr { +- uint8_t version; +- uint8_t type; +- uint16_t seg_size; +- uint32_t seg_no; +- uint64_t conn_id; +- uint64_t msg_id; ++ uint8_t version; ++ uint8_t type; ++ uint16_t seg_size; ++ uint32_t seg_no; ++ uint64_t conn_id; ++ uint64_t msg_id; + union { +- uint64_t conn_data; +- uint64_t rx_key; ++ uint64_t conn_data; ++ uint64_t rx_key; ++ uint64_t ctrl_data; + }; + }; + +@@ -128,6 +133,7 @@ enum { + #define OFI_REMOTE_CQ_DATA (1 << 0) + #define OFI_TRANSMIT_COMPLETE (1 << 1) + #define OFI_DELIVERY_COMPLETE (1 << 2) ++#define OFI_COMMIT_COMPLETE (1 << 3) + + /* + * Common command header +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_prov.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_prov.h +index 68281b880..c4c94a478 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_prov.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_prov.h +@@ -206,4 +206,38 @@ SHM_INI ; + # define SHM_INIT NULL + #endif + ++#if (HAVE_MRAIL) && (HAVE_MRAIL_DL) ++# define MRAIL_INI FI_EXT_INI ++# define MRAIL_INIT NULL ++#elif (HAVE_MRAIL) ++# define MRAIL_INI INI_SIG(fi_mrail_ini) ++# define MRAIL_INIT fi_mrail_ini() ++MRAIL_INI ; ++#else ++# define MRAIL_INIT NULL ++#endif ++ ++#if (HAVE_RSTREAM) && (HAVE_RSTREAM_DL) ++# define RSTREAM_INI FI_EXT_INI ++# define RSTREAM_INIT NULL ++#elif (HAVE_RSTREAM) ++# define RSTREAM_INI INI_SIG(fi_rstream_ini) ++# define RSTREAM_INIT fi_rstream_ini() ++RSTREAM_INI ; ++#else ++# define RSTREAM_INIT NULL ++#endif ++ ++#if(HAVE_PERF) ++# define PERF_HOOK_INI INI_SIG(fi_perf_hook_ini) ++# define PERF_HOOK_INIT fi_perf_hook_ini() ++PERF_HOOK_INI ; ++#else ++# define PERF_HOOK_INIT NULL ++#endif ++ ++# define NOOP_HOOK_INI INI_SIG(fi_noop_hook_ini) ++# define NOOP_HOOK_INIT fi_noop_hook_ini() ++NOOP_HOOK_INI ; ++ + #endif /* _OFI_PROV_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_recvwin.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_recvwin.h +new file mode 100644 +index 000000000..917a0c34e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_recvwin.h +@@ -0,0 +1,118 @@ ++/* ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++/* ++ * This utility provides a sliding receive window implementation. It uses a ++ * circular queue to order incoming messages based on the message ID in the ++ * transport protocol. ++ */ ++ ++#if !defined(FI_RECVWIN_H) ++#define FI_RECVWIN_H ++ ++#include "config.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define OFI_DECL_RECVWIN_BUF(entrytype, name) \ ++OFI_DECLARE_CIRQUE(entrytype, recvwin_cirq); \ ++struct name { \ ++ uint64_t exp_msg_id; \ ++ unsigned int win_size; \ ++ struct recvwin_cirq *pending; \ ++}; \ ++ \ ++static inline struct name * \ ++ofi_recvwin_buf_alloc(struct name *recvq, unsigned int size) \ ++{ \ ++ assert(size == roundup_power_of_two(size)); \ ++ recvq->exp_msg_id = 0; \ ++ recvq->win_size = size; \ ++ recvq->pending = recvwin_cirq_create(recvq->win_size); \ ++ return recvq; \ ++} \ ++ \ ++static inline void \ ++ofi_recvwin_free(struct name *recvq) \ ++{ \ ++ recvwin_cirq_free(recvq->pending); \ ++} \ ++ \ ++static inline int \ ++ofi_recvwin_queue_msg(struct name *recvq, entrytype * msg, uint64_t id) \ ++{ \ ++ int write_idx; \ ++ \ ++ assert(ofi_recvwin_is_allowed(recvq, id)); \ ++ write_idx = (ofi_cirque_rindex(recvq->pending) \ ++ + (id - recvq->exp_msg_id)) \ ++ & recvq->pending->size_mask; \ ++ recvq->pending->buf[write_idx] = *msg; \ ++ ofi_cirque_commit(recvq->pending); \ ++ return 0; \ ++} \ ++ \ ++static inline entrytype * \ ++ofi_recvwin_get_next_msg(struct name *recvq) \ ++{ \ ++ if (ofi_cirque_head(recvq->pending)) { \ ++ ofi_recvwin_exp_inc(recvq); \ ++ return ofi_cirque_remove(recvq->pending); \ ++ } else { \ ++ return NULL; \ ++ } \ ++} \ ++ \ ++static inline void \ ++ofi_recvwin_slide(struct name *recvq) \ ++{ \ ++ ofi_recvwin_exp_inc(recvq); \ ++ ofi_cirque_discard(recvq->pending); \ ++ ofi_cirque_commit(recvq->pending); \ ++} ++ ++#define ofi_recvwin_peek(rq) (ofi_cirque_head(rq->pending)) ++#define ofi_recvwin_is_empty(rq) (ofi_cirque_isempty(rq->pending)) ++#define ofi_recvwin_exp_inc(rq) ((rq)->exp_msg_id++) ++#define ofi_recvwin_is_exp(rq, id) ((rq)->exp_msg_id == id) ++#define ofi_recvwin_next_exp_id(rq) ((rq)->exp_msg_id) ++#define ofi_recvwin_is_delayed(rq, id) ((rq)->exp_msg_id > id) ++#define ofi_recvwin_is_allowed(rq, id) (id >= rq->exp_msg_id \ ++ && id < (rq->win_size + rq->exp_msg_id)) ++ ++#endif /* FI_RECVWIN_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_shm.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_shm.h +index b6e4c4777..bb667f7fd 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_shm.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_shm.h +@@ -177,7 +177,12 @@ struct smr_region { + struct smr_map *map; + + size_t total_size; +- size_t cmd_cnt; ++ size_t cmd_cnt; /* Doubles as a tracker for number of cmds AND ++ number of inject buffers available for use, ++ to ensure 1:1 ratio of cmds to inject bufs. ++ Might not always be paired consistently with ++ cmd alloc/free depending on protocol ++ (Ex. unexpected messages, RMA requests) */ + + /* offsets from start of smr_region */ + size_t cmd_queue_offset; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_signal.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_signal.h +index 3a2974f89..b4f3ff366 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_signal.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_signal.h +@@ -113,74 +113,9 @@ static inline int fd_signal_poll(struct fd_signal *signal, int timeout) + return (ret == 0) ? -FI_ETIMEDOUT : 0; + } + +-#ifdef HAVE_EPOLL +-#include +- +-typedef int fi_epoll_t; +- +-static inline int fi_epoll_create(int *ep) +-{ +- *ep = epoll_create(4); +- return *ep < 0 ? -ofi_syserr() : 0; +-} +- +-static inline int fi_epoll_add(int ep, int fd, void *context) +-{ +- struct epoll_event event; +- int ret; +- +- event.data.ptr = context; +- event.events = EPOLLIN; +- ret = epoll_ctl(ep, EPOLL_CTL_ADD, fd, &event); +- if ((ret == -1) && (ofi_syserr() != EEXIST)) +- return -ofi_syserr(); +- return 0; +-} +- +-static inline int fi_epoll_del(int ep, int fd) ++static inline int fd_signal_get(struct fd_signal *signal) + { +- return epoll_ctl(ep, EPOLL_CTL_DEL, fd, NULL) ? -ofi_syserr() : 0; ++ return signal->fd[FI_READ_FD]; + } + +-static inline int fi_epoll_wait(int ep, void **contexts, int max_contexts, +- int timeout) +-{ +- struct epoll_event events[max_contexts]; +- int ret; +- int i; +- +- ret = epoll_wait(ep, events, max_contexts, timeout); +- if (ret == -1) +- return -ofi_syserr(); +- +- for (i = 0; i < ret; i++) +- contexts[i] = events[i].data.ptr; +- return ret; +-} +- +-static inline void fi_epoll_close(int ep) +-{ +- close(ep); +-} +- +-#else +-#include +- +-typedef struct fi_epoll { +- int size; +- int nfds; +- struct pollfd *fds; +- void **context; +- int index; +-} *fi_epoll_t; +- +-int fi_epoll_create(struct fi_epoll **ep); +-int fi_epoll_add(struct fi_epoll *ep, int fd, void *context); +-int fi_epoll_del(struct fi_epoll *ep, int fd); +-int fi_epoll_wait(struct fi_epoll *ep, void **contexts, int max_contexts, +- int timeout); +-void fi_epoll_close(struct fi_epoll *ep); +- +-#endif /* HAVE_EPOLL */ +- + #endif /* _OFI_SIGNAL_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_tree.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_tree.h +new file mode 100644 +index 000000000..6bb79377a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_tree.h +@@ -0,0 +1,87 @@ ++/* ++ * Copyright (c) 2015 Cray Inc. All rights reserved. ++ * Copyright (c) 2018 Intel Corp, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++/* ++ * Copied from http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/RedBlackTrees_files/s_rbt.htm ++ * ++ * Disclosure from the author's main page: ++ * (http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/RedBlackTrees_files/s_rbt.htm) ++ * ++ * Source code when part of a software project may be used freely ++ * without reference to the author. ++ * ++ */ ++ ++#ifndef _OFI_TREE_H_ ++#define _OFI_TREE_H_ ++ ++#include ++ ++ ++enum ofi_node_color { ++ BLACK, ++ RED ++}; ++ ++struct ofi_rbnode { ++ struct ofi_rbnode *left; ++ struct ofi_rbnode *right; ++ struct ofi_rbnode *parent; ++ enum ofi_node_color color; ++ void *data; ++}; ++ ++struct ofi_rbmap { ++ struct ofi_rbnode *root; ++ struct ofi_rbnode sentinel; ++ ++ /* compare() ++ * = 0: a == b ++ * < 0: a < b ++ * > 0: a > b ++ */ ++ int (*compare)(struct ofi_rbmap *map, ++ void *key, void *data); ++}; ++ ++ ++void ofi_rbmap_init(struct ofi_rbmap *map); ++void ofi_rbmap_cleanup(struct ofi_rbmap *map); ++ ++struct ofi_rbnode *ofi_rbmap_find(struct ofi_rbmap *map, void *key); ++int ofi_rbmap_insert(struct ofi_rbmap *map, void *key, void *data); ++void ofi_rbmap_delete(struct ofi_rbmap *map, struct ofi_rbnode *node); ++int ofi_rbmap_empty(struct ofi_rbmap *map); ++ ++ ++#endif /* OFI_TREE_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_util.h b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_util.h +index 1db1c9c9b..9bfc72d12 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_util.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/ofi_util.h +@@ -61,38 +61,16 @@ + #include + #include + #include ++#include ++#include + + #include "rbtree.h" ++#include "uthash.h" + +-#define UTIL_FLAG_ERROR (1ULL << 60) +- +-#define OFI_CNTR_ENABLED (1ULL << 61) +- +-#define OFI_Q_STRERROR(prov, log, q, q_str, entry, strerror) \ +- FI_WARN(prov, log, "fi_" q_str "_readerr: err: %d, prov_err: %s (%d)\n",\ +- entry.err, \ +- strerror(q, entry.prov_errno, entry.err_data, NULL, 0), \ +- entry.prov_errno) ++#define UTIL_FLAG_ERROR (1ULL << 60) ++#define UTIL_FLAG_OVERFLOW (1ULL << 61) + +-#define OFI_Q_READERR(prov, log, q, q_str, readerr, strerror, ret, err_entry) \ +- do { \ +- ret = readerr(q, &err_entry, 0); \ +- if (ret != sizeof(err_entry)) { \ +- FI_WARN(prov, log, \ +- "Unable to fi_" q_str "_readerr\n"); \ +- } else { \ +- OFI_Q_STRERROR(prov, log, q, q_str, \ +- err_entry, strerror); \ +- } \ +- } while (0) +- +-#define OFI_CQ_READERR(prov, log, cq, ret, err_entry) \ +- OFI_Q_READERR(prov, log, cq, "cq", fi_cq_readerr, \ +- fi_cq_strerror, ret, err_entry) +- +-#define OFI_EQ_READERR(prov, log, eq, ret, err_entry) \ +- OFI_Q_READERR(prov, log, eq, "eq", fi_eq_readerr, \ +- fi_eq_strerror, ret, err_entry) ++#define OFI_CNTR_ENABLED (1ULL << 61) + + #define FI_INFO_FIELD(provider, prov_attr, user_attr, prov_str, user_str, type) \ + do { \ +@@ -130,6 +108,9 @@ + FI_INFO_STRING(provider, prov->name, user->name, "Supported", \ + "Requested") + ++#define ofi_after_eq(a,b) ((long)((a) - (b)) >= 0) ++#define ofi_before(a,b) ((long)((a) - (b)) < 0) ++ + enum { + UTIL_TX_SHARED_CTX = 1 << 0, + UTIL_RX_SHARED_CTX = 1 << 1, +@@ -195,6 +176,8 @@ struct util_domain { + uint32_t addr_format; + enum fi_av_type av_type; + struct ofi_mr_map mr_map; ++ enum fi_threading threading; ++ enum fi_progress data_progress; + }; + + int ofi_domain_init(struct fid_fabric *fabric_fid, const struct fi_info *info, +@@ -202,6 +185,23 @@ int ofi_domain_init(struct fid_fabric *fabric_fid, const struct fi_info *info, + int ofi_domain_bind_eq(struct util_domain *domain, struct util_eq *eq); + int ofi_domain_close(struct util_domain *domain); + ++static const uint64_t ofi_rx_mr_flags[] = { ++ [ofi_op_msg] = FI_RECV, ++ [ofi_op_tagged] = FI_RECV, ++ [ofi_op_read_req] = FI_REMOTE_READ, ++ [ofi_op_write] = FI_REMOTE_WRITE, ++ [ofi_op_atomic] = FI_REMOTE_WRITE, ++ [ofi_op_atomic_fetch] = FI_REMOTE_WRITE | FI_REMOTE_READ, ++ [ofi_op_atomic_compare] = FI_REMOTE_WRITE | FI_REMOTE_READ, ++}; ++ ++static inline uint64_t ofi_rx_mr_reg_flags(uint32_t op, uint16_t atomic_op) ++{ ++ if (atomic_op == FI_ATOMIC_READ) ++ return FI_REMOTE_READ; ++ ++ return ofi_rx_mr_flags[op]; ++} + + /* + * Passive Endpoint +@@ -222,8 +222,10 @@ int ofi_pep_close(struct util_pep *pep); + * Endpoint + */ + ++struct util_cntr; + struct util_ep; + typedef void (*ofi_ep_progress_func)(struct util_ep *util_ep); ++typedef void (*ofi_cntr_inc_func)(struct util_cntr *util_cntr); + + struct util_ep { + struct fid_ep ep_fid; +@@ -237,6 +239,7 @@ struct util_ep { + uint64_t rx_op_flags; + struct util_cq *tx_cq; + uint64_t tx_op_flags; ++ uint64_t inject_op_flags; + + /* CNTR entries */ + struct util_cntr *tx_cntr; /* transmit/send */ +@@ -246,11 +249,20 @@ struct util_ep { + struct util_cntr *rem_rd_cntr; /* remote read */ + struct util_cntr *rem_wr_cntr; /* remote write */ + ++ ofi_cntr_inc_func tx_cntr_inc; ++ ofi_cntr_inc_func rx_cntr_inc; ++ ofi_cntr_inc_func rd_cntr_inc; ++ ofi_cntr_inc_func wr_cntr_inc; ++ ofi_cntr_inc_func rem_rd_cntr_inc; ++ ofi_cntr_inc_func rem_wr_cntr_inc; ++ ++ enum fi_ep_type type; + uint64_t caps; + uint64_t flags; + ofi_ep_progress_func progress; +- struct util_cmap *cmap; + fastlock_t lock; ++ ofi_fastlock_acquire_t lock_acquire; ++ ofi_fastlock_release_t lock_release; + }; + + int ofi_ep_bind_av(struct util_ep *util_ep, struct util_av *av); +@@ -264,6 +276,119 @@ int ofi_endpoint_init(struct fid_domain *domain, const struct util_prov *util_pr + + int ofi_endpoint_close(struct util_ep *util_ep); + ++static inline void ofi_ep_lock_acquire(struct util_ep *ep) ++{ ++ ep->lock_acquire(&ep->lock); ++} ++ ++static inline void ofi_ep_lock_release(struct util_ep *ep) ++{ ++ ep->lock_release(&ep->lock); ++} ++ ++static inline void ofi_ep_tx_cntr_inc(struct util_ep *ep) ++{ ++ ep->tx_cntr_inc(ep->tx_cntr); ++} ++ ++static inline void ofi_ep_rx_cntr_inc(struct util_ep *ep) ++{ ++ ep->rx_cntr_inc(ep->rx_cntr); ++} ++ ++static inline void ofi_ep_rd_cntr_inc(struct util_ep *ep) ++{ ++ ep->rd_cntr_inc(ep->rd_cntr); ++} ++ ++static inline void ofi_ep_wr_cntr_inc(struct util_ep *ep) ++{ ++ ep->wr_cntr_inc(ep->wr_cntr); ++} ++ ++static inline void ofi_ep_rem_rd_cntr_inc(struct util_ep *ep) ++{ ++ ep->rem_rd_cntr_inc(ep->rem_rd_cntr); ++} ++ ++static inline void ofi_ep_rem_wr_cntr_inc(struct util_ep *ep) ++{ ++ ep->rem_wr_cntr_inc(ep->rem_wr_cntr); ++} ++ ++typedef void (*ofi_ep_cntr_inc_func)(struct util_ep *); ++ ++static const ofi_ep_cntr_inc_func ofi_ep_cntr_inc_funcs[] = { ++ [FI_TRANSMIT] = ofi_ep_tx_cntr_inc, ++ [FI_RECV] = ofi_ep_rx_cntr_inc, ++ [FI_READ] = ofi_ep_rd_cntr_inc, ++ [FI_WRITE] = ofi_ep_wr_cntr_inc, ++ [FI_REMOTE_READ] = ofi_ep_rem_rd_cntr_inc, ++ [FI_REMOTE_WRITE] = ofi_ep_rem_wr_cntr_inc, ++}; ++ ++/* ++ * Tag and address match ++ */ ++ ++static inline int ofi_match_addr(fi_addr_t recv_addr, fi_addr_t addr) ++{ ++ return (recv_addr == FI_ADDR_UNSPEC) || (recv_addr == addr); ++} ++ ++static inline int ofi_match_tag(uint64_t recv_tag, uint64_t recv_ignore, ++ uint64_t tag) ++{ ++ return ((recv_tag | recv_ignore) == (tag | recv_ignore)); ++} ++ ++/* ++ * Wait set ++ */ ++struct util_wait; ++typedef void (*fi_wait_signal_func)(struct util_wait *wait); ++typedef int (*fi_wait_try_func)(struct util_wait *wait); ++ ++struct util_wait { ++ struct fid_wait wait_fid; ++ struct util_fabric *fabric; ++ struct util_poll *pollset; ++ ofi_atomic32_t ref; ++ const struct fi_provider *prov; ++ ++ enum fi_wait_obj wait_obj; ++ fi_wait_signal_func signal; ++ fi_wait_try_func try; ++}; ++ ++int fi_wait_init(struct util_fabric *fabric, struct fi_wait_attr *attr, ++ struct util_wait *wait); ++int fi_wait_cleanup(struct util_wait *wait); ++ ++struct util_wait_fd { ++ struct util_wait util_wait; ++ struct fd_signal signal; ++ fi_epoll_t epoll_fd; ++ struct dlist_entry fd_list; ++ fastlock_t lock; ++}; ++ ++typedef int (*ofi_wait_fd_try_func)(void *arg); ++ ++struct ofi_wait_fd_entry { ++ struct dlist_entry entry; ++ int fd; ++ ofi_wait_fd_try_func try; ++ void *arg; ++ ofi_atomic32_t ref; ++}; ++ ++int ofi_wait_fd_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, ++ struct fid_wait **waitset); ++int ofi_wait_fd_add(struct util_wait *wait, int fd, uint32_t events, ++ ofi_wait_fd_try_func try, void *arg, void *context); ++int ofi_wait_fd_del(struct util_wait *wait, int fd); ++ + /* + * Completion queue + * +@@ -273,13 +398,14 @@ int ofi_endpoint_close(struct util_ep *util_ep); + * entries on the CQ. This allows poll sets to drive progress + * without introducing private interfaces to the CQ. + */ +-#define FI_DEFAULT_CQ_SIZE 1024 + + typedef void (*fi_cq_read_func)(void **dst, void *src); + +-struct util_cq_err_entry { +- struct fi_cq_err_entry err_entry; +- struct slist_entry list_entry; ++struct util_cq_oflow_err_entry { ++ struct fi_cq_tagged_entry *parent_comp; ++ struct fi_cq_err_entry comp; ++ fi_addr_t src; ++ struct slist_entry list_entry; + }; + + OFI_DECLARE_CIRQUE(struct fi_cq_tagged_entry, util_comp_cirq); +@@ -294,11 +420,13 @@ struct util_cq { + struct dlist_entry ep_list; + fastlock_t ep_list_lock; + fastlock_t cq_lock; ++ ofi_fastlock_acquire_t cq_fastlock_acquire; ++ ofi_fastlock_release_t cq_fastlock_release; + + struct util_comp_cirq *cirq; + fi_addr_t *src; + +- struct slist err_list; ++ struct slist oflow_err_list; + fi_cq_read_func read_entry; + int internal_wait; + ofi_atomic32_t signaled; +@@ -312,6 +440,7 @@ int ofi_check_bind_cq_flags(struct util_ep *ep, struct util_cq *cq, + uint64_t flags); + void ofi_cq_progress(struct util_cq *cq); + int ofi_cq_cleanup(struct util_cq *cq); ++int ofi_cq_control(struct fid *fid, int command, void *arg); + ssize_t ofi_cq_read(struct fid_cq *cq_fid, void *buf, size_t count); + ssize_t ofi_cq_readfrom(struct fid_cq *cq_fid, void *buf, size_t count, + fi_addr_t *src_addr); +@@ -322,8 +451,82 @@ ssize_t ofi_cq_sread(struct fid_cq *cq_fid, void *buf, size_t count, + ssize_t ofi_cq_sreadfrom(struct fid_cq *cq_fid, void *buf, size_t count, + fi_addr_t *src_addr, const void *cond, int timeout); + int ofi_cq_signal(struct fid_cq *cq_fid); +-int ofi_cq_write(struct util_cq *cq, void *context, uint64_t flags, size_t len, +- void *buf, uint64_t data, uint64_t tag); ++ ++int ofi_cq_write_overflow(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag, fi_addr_t src); ++ ++static inline void util_cq_signal(struct util_cq *cq) ++{ ++ assert(cq->wait); ++ cq->wait->signal(cq->wait); ++} ++ ++static inline void ++ofi_cq_write_comp_entry(struct util_cq *cq, void *context, uint64_t flags, ++ size_t len, void *buf, uint64_t data, uint64_t tag) ++{ ++ struct fi_cq_tagged_entry *comp = ofi_cirque_tail(cq->cirq); ++ comp->op_context = context; ++ comp->flags = flags; ++ comp->len = len; ++ comp->buf = buf; ++ comp->data = data; ++ comp->tag = tag; ++ ofi_cirque_commit(cq->cirq); ++} ++ ++static inline int ++ofi_cq_write_thread_unsafe(struct util_cq *cq, void *context, uint64_t flags, ++ size_t len, void *buf, uint64_t data, uint64_t tag) ++{ ++ if (OFI_UNLIKELY(ofi_cirque_isfull(cq->cirq))) { ++ FI_DBG(cq->domain->prov, FI_LOG_CQ, ++ "util_cq cirq is full!\n"); ++ return ofi_cq_write_overflow(cq, context, flags, len, ++ buf, data, tag, 0); ++ } ++ ofi_cq_write_comp_entry(cq, context, flags, len, buf, data, tag); ++ return 0; ++} ++ ++static inline int ++ofi_cq_write(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag) ++{ ++ int ret; ++ cq->cq_fastlock_acquire(&cq->cq_lock); ++ ret = ofi_cq_write_thread_unsafe(cq, context, flags, len, buf, data, tag); ++ cq->cq_fastlock_release(&cq->cq_lock); ++ return ret; ++} ++ ++static inline int ++ofi_cq_write_src_thread_unsafe(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag, fi_addr_t src) ++{ ++ if (OFI_UNLIKELY(ofi_cirque_isfull(cq->cirq))) { ++ FI_DBG(cq->domain->prov, FI_LOG_CQ, ++ "util_cq cirq is full!\n"); ++ return ofi_cq_write_overflow(cq, context, flags, len, ++ buf, data, tag, src); ++ } ++ cq->src[ofi_cirque_windex(cq->cirq)] = src; ++ ofi_cq_write_comp_entry(cq, context, flags, len, buf, data, tag); ++ return 0; ++} ++ ++static inline int ++ofi_cq_write_src(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag, fi_addr_t src) ++{ ++ int ret; ++ cq->cq_fastlock_acquire(&cq->cq_lock); ++ ret = ofi_cq_write_src_thread_unsafe(cq, context, flags, len, ++ buf, data, tag, src); ++ cq->cq_fastlock_release(&cq->cq_lock); ++ return ret; ++} ++ + int ofi_cq_write_error(struct util_cq *cq, + const struct fi_cq_err_entry *err_entry); + int ofi_cq_write_error_peek(struct util_cq *cq, uint64_t tag, void *context); +@@ -338,10 +541,39 @@ static inline int ofi_need_completion(uint64_t cq_flags, uint64_t op_flags) + FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE))); + } + ++static const uint64_t ofi_rx_flags[] = { ++ [ofi_op_msg] = FI_RECV, ++ [ofi_op_tagged] = FI_RECV | FI_TAGGED, ++ [ofi_op_read_req] = FI_RMA | FI_REMOTE_READ, ++ [ofi_op_write] = FI_RMA | FI_REMOTE_WRITE, ++ [ofi_op_atomic] = FI_ATOMIC | FI_REMOTE_WRITE, ++ [ofi_op_atomic_fetch] = FI_ATOMIC | FI_REMOTE_READ, ++ [ofi_op_atomic_compare] = FI_ATOMIC | FI_REMOTE_READ, ++}; ++ ++static inline uint64_t ofi_rx_cq_flags(uint32_t op) ++{ ++ return ofi_rx_flags[op]; ++} ++ ++static const uint64_t ofi_tx_flags[] = { ++ [ofi_op_msg] = FI_SEND, ++ [ofi_op_tagged] = FI_SEND | FI_TAGGED, ++ [ofi_op_read_req] = FI_RMA | FI_READ, ++ [ofi_op_write] = FI_RMA | FI_WRITE, ++ [ofi_op_atomic] = FI_ATOMIC | FI_WRITE, ++ [ofi_op_atomic_fetch] = FI_ATOMIC | FI_READ, ++ [ofi_op_atomic_compare] = FI_ATOMIC | FI_READ, ++}; ++ ++static inline uint64_t ofi_tx_cq_flags(uint32_t op) ++{ ++ return ofi_tx_flags[op]; ++} ++ + /* + * Counter + */ +-struct util_cntr; + typedef void (*ofi_cntr_progress_func)(struct util_cntr *cntr); + + struct util_cntr { +@@ -368,22 +600,30 @@ int ofi_cntr_init(const struct fi_provider *prov, struct fid_domain *domain, + struct fi_cntr_attr *attr, struct util_cntr *cntr, + ofi_cntr_progress_func progress, void *context); + int ofi_cntr_cleanup(struct util_cntr *cntr); ++static inline void util_cntr_signal(struct util_cntr *cntr) ++{ ++ assert(cntr->wait); ++ cntr->wait->signal(cntr->wait); ++} ++ ++static inline void ofi_cntr_inc_noop(struct util_cntr *cntr) ++{ ++ OFI_UNUSED(cntr); ++} + ++static inline void ofi_cntr_inc(struct util_cntr *cntr) ++{ ++ cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); ++} + + /* + * AV / addressing + */ +-struct util_av_hash_entry { +- int index; +- ofi_atomic32_t use_cnt; +- int next; +-}; + +-struct util_av_hash { +- struct util_av_hash_entry *table; +- int free_list; +- int slots; +- int total_count; ++struct util_av_entry { ++ ofi_atomic32_t use_cnt; ++ UT_hash_handle hh; ++ char addr[0]; + }; + + struct util_av { +@@ -394,179 +634,73 @@ struct util_av { + fastlock_t lock; + const struct fi_provider *prov; + ++ struct util_av_entry *hash; ++ struct util_buf_pool *av_entry_pool; ++ + void *context; + uint64_t flags; + size_t count; + size_t addrlen; +- ssize_t free_list; +- struct util_av_hash hash; +- void *data; + struct dlist_entry ep_list; + }; + +-#define OFI_AV_HASH (1 << 0) +- + struct util_av_attr { +- size_t addrlen; +- size_t overhead; +- int flags; ++ size_t addrlen; ++ int flags; + }; + ++typedef int (*ofi_av_apply_func)(struct util_av *av, void *addr, ++ fi_addr_t fi_addr, void *arg); ++ + int ofi_av_init(struct util_domain *domain, + const struct fi_av_attr *attr, const struct util_av_attr *util_attr, + struct util_av *av, void *context); ++int ofi_av_init_lightweight(struct util_domain *domain, const struct fi_av_attr *attr, ++ struct util_av *av, void *context); + int ofi_av_close(struct util_av *av); ++int ofi_av_close_lightweight(struct util_av *av); + +-int ofi_av_insert_addr(struct util_av *av, const void *addr, int slot, int *index); +-int ofi_av_remove_addr(struct util_av *av, int slot, int index); +-int ofi_av_lookup_index(struct util_av *av, const void *addr, int slot); ++int ofi_av_insert_addr(struct util_av *av, const void *addr, fi_addr_t *fi_addr); ++int ofi_av_remove_addr(struct util_av *av, fi_addr_t fi_addr); ++fi_addr_t ofi_av_lookup_fi_addr(struct util_av *av, const void *addr); ++int ofi_av_elements_iter(struct util_av *av, ofi_av_apply_func apply, void *arg); + int ofi_av_bind(struct fid *av_fid, struct fid *eq_fid, uint64_t flags); + void ofi_av_write_event(struct util_av *av, uint64_t data, + int err, void *context); + +-int ip_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context); +-int ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context, int flags); ++int ofi_ip_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context); ++int ofi_ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context, int flags); + +-void *ofi_av_get_addr(struct util_av *av, int index); +-#define ip_av_get_addr ofi_av_get_addr +-int ip_av_get_index(struct util_av *av, const void *addr); ++void *ofi_av_get_addr(struct util_av *av, fi_addr_t fi_addr); ++#define ofi_ip_av_get_addr ofi_av_get_addr ++fi_addr_t ofi_ip_av_get_fi_addr(struct util_av *av, const void *addr); + +-int ofi_get_addr(uint32_t addr_format, uint64_t flags, ++int ofi_get_addr(uint32_t *addr_format, uint64_t flags, + const char *node, const char *service, + void **addr, size_t *addrlen); + int ofi_get_src_addr(uint32_t addr_format, + const void *dest_addr, size_t dest_addrlen, + void **src_addr, size_t *src_addrlen); +-void ofi_getnodename(char *buf, int buflen); ++void ofi_getnodename(uint16_t sa_family, char *buf, int buflen); + int ofi_av_get_index(struct util_av *av, const void *addr); + +-/* +- * Connection Map +- */ +- +-// TODO explore replacing this with a simple connection hash map that is common +-// for both AV and RX only connections. +- +-#define UTIL_CMAP_IDX_BITS OFI_IDX_INDEX_BITS +- +-enum ofi_cmap_signal { +- OFI_CMAP_FREE, +- OFI_CMAP_EXIT, +-}; +- +-enum util_cmap_state { +- CMAP_IDLE, +- CMAP_CONNREQ_SENT, +- CMAP_CONNREQ_RECV, +- CMAP_ACCEPT, +- CMAP_CONNECTED, +- CMAP_SHUTDOWN, +-}; +- +-struct util_cmap_handle { +- struct util_cmap *cmap; +- enum util_cmap_state state; +- /* Unique identifier for a connection. Can be exchanged with a peer +- * during connection setup and can later be used in a message header +- * to identify the source of the message (Used for FI_SOURCE, RNDV +- * protocol, etc.) */ +- uint64_t key; +- uint64_t remote_key; +- fi_addr_t fi_addr; +- struct util_cmap_peer *peer; +-}; +- +-struct util_cmap_peer { +- struct util_cmap_handle *handle; +- struct dlist_entry entry; +- uint8_t addr[]; +-}; +- +-typedef struct util_cmap_handle* (*ofi_cmap_alloc_handle_func)(void); +-typedef void (*ofi_cmap_handle_func)(struct util_cmap_handle *handle); +-typedef int (*ofi_cmap_connect_func)(struct util_ep *cmap, +- struct util_cmap_handle *handle, +- const void *addr, size_t addrlen); +-typedef void *(*ofi_cmap_event_handler_func)(void *arg); +-typedef int (*ofi_cmap_signal_func)(struct util_ep *ep, void *context, +- enum ofi_cmap_signal signal); +- +-struct util_cmap_attr { +- void *name; +- ofi_cmap_alloc_handle_func alloc; +- ofi_cmap_handle_func close; +- ofi_cmap_handle_func free; +- ofi_cmap_connect_func connect; +- ofi_cmap_event_handler_func event_handler; +- ofi_cmap_signal_func signal; +-}; +- +-struct util_cmap { +- struct util_ep *ep; +- struct util_av *av; +- +- /* cmap handles that correspond to addresses in AV */ +- struct util_cmap_handle **handles_av; +- +- /* Store all cmap handles (inclusive of handles_av) in an indexer. +- * This allows reverse lookup of the handle using the index. */ +- struct indexer handles_idx; +- +- struct ofi_key_idx key_idx; +- +- struct dlist_entry peer_list; +- struct util_cmap_attr attr; +- pthread_t event_handler_thread; +- int av_updated; +- fastlock_t lock; +-}; +- +-struct util_cmap_handle *ofi_cmap_key2handle(struct util_cmap *cmap, uint64_t key); +-int ofi_cmap_get_handle(struct util_cmap *cmap, fi_addr_t fi_addr, +- struct util_cmap_handle **handle); +-void ofi_cmap_update(struct util_cmap *cmap, const void *addr, fi_addr_t fi_addr); +- +-void ofi_cmap_process_connect(struct util_cmap *cmap, +- struct util_cmap_handle *handle, +- uint64_t *remote_key); +-void ofi_cmap_process_reject(struct util_cmap *cmap, +- struct util_cmap_handle *handle); +-int ofi_cmap_process_connreq(struct util_cmap *cmap, void *addr, +- struct util_cmap_handle **handle); +-void ofi_cmap_process_shutdown(struct util_cmap *cmap, +- struct util_cmap_handle *handle); +-void ofi_cmap_del_handle(struct util_cmap_handle *handle); +-void ofi_cmap_free(struct util_cmap *cmap); +-struct util_cmap *ofi_cmap_alloc(struct util_ep *ep, +- struct util_cmap_attr *attr); +-extern struct util_cmap_handle * +-util_cmap_get_handle(struct util_cmap *cmap, fi_addr_t fi_addr); +-extern int +-util_cmap_alloc_handle(struct util_cmap *cmap, fi_addr_t fi_addr, +- enum util_cmap_state state, +- struct util_cmap_handle **handle); +-/* Caller must hold `cmap::lock` */ +-static inline struct util_cmap_handle * +-ofi_cmap_acquire_handle(struct util_cmap *cmap, fi_addr_t fi_addr) +- +-{ +- struct util_cmap_handle *handle = +- util_cmap_get_handle(cmap, fi_addr); +- if (!handle) { +- int ret; +- +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "No handle found for given fi_addr\n"); +- ret = util_cmap_alloc_handle(cmap, fi_addr, CMAP_IDLE, &handle); +- if (OFI_UNLIKELY(ret)) +- return NULL; +- } +- return handle; +-} +-int ofi_cmap_handle_connect(struct util_cmap *cmap, fi_addr_t fi_addr, +- struct util_cmap_handle *handle); ++int ofi_verify_av_insert(struct util_av *av, uint64_t flags); ++int ofi_ip_av_insertv(struct util_av *av, const void *addr, size_t addrlen, ++ size_t count, fi_addr_t *fi_addr, void *context); ++/* Caller should free *addr */ ++int ofi_ip_av_sym_getaddr(struct util_av *av, const char *node, ++ size_t nodecnt, const char *service, ++ size_t svccnt, void **addr, size_t *addrlen); ++int ofi_ip_av_insert(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context); ++int ofi_ip_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, ++ size_t count, uint64_t flags); ++int ofi_ip_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, ++ void *addr, size_t *addrlen); ++const char * ++ofi_ip_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len); + + /* + * Poll set +@@ -585,55 +719,6 @@ int fi_poll_create_(const struct fi_provider *prov, struct fid_domain *domain, + int fi_poll_create(struct fid_domain *domain, struct fi_poll_attr *attr, + struct fid_poll **pollset); + +- +-/* +- * Wait set +- */ +-struct util_wait; +-typedef void (*fi_wait_signal_func)(struct util_wait *wait); +-typedef int (*fi_wait_try_func)(struct util_wait *wait); +- +-struct util_wait { +- struct fid_wait wait_fid; +- struct util_fabric *fabric; +- struct util_poll *pollset; +- ofi_atomic32_t ref; +- const struct fi_provider *prov; +- +- enum fi_wait_obj wait_obj; +- fi_wait_signal_func signal; +- fi_wait_try_func try; +-}; +- +-int fi_wait_init(struct util_fabric *fabric, struct fi_wait_attr *attr, +- struct util_wait *wait); +-int fi_wait_cleanup(struct util_wait *wait); +- +-struct util_wait_fd { +- struct util_wait util_wait; +- struct fd_signal signal; +- fi_epoll_t epoll_fd; +- struct dlist_entry fd_list; +- fastlock_t lock; +-}; +- +-typedef int (*ofi_wait_fd_try_func)(void *arg); +- +-struct ofi_wait_fd_entry { +- struct dlist_entry entry; +- int fd; +- ofi_wait_fd_try_func try; +- void *arg; +- ofi_atomic32_t ref; +-}; +- +-int ofi_wait_fd_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, +- struct fid_wait **waitset); +-int ofi_wait_fd_add(struct util_wait *wait, int fd, ofi_wait_fd_try_func try, +- void *arg, void *context); +-int ofi_wait_fd_del(struct util_wait *wait, int fd); +- +- + /* + * EQ + */ +@@ -646,6 +731,9 @@ struct util_eq { + const struct fi_provider *prov; + + struct slist list; ++ /* This contains error data that are read by user and need to ++ * be freed in subsequent fi_eq_readerr call against the EQ */ ++ void *saved_err_data; + int internal_wait; + }; + +@@ -659,6 +747,19 @@ struct util_event { + + int ofi_eq_create(struct fid_fabric *fabric, struct fi_eq_attr *attr, + struct fid_eq **eq_fid, void *context); ++void ofi_eq_handle_err_entry(uint32_t api_version, uint64_t flags, ++ struct fi_eq_err_entry *err_entry, ++ struct fi_eq_err_entry *user_err_entry); ++ssize_t ofi_eq_read(struct fid_eq *eq_fid, uint32_t *event, ++ void *buf, size_t len, uint64_t flags); ++ssize_t ofi_eq_sread(struct fid_eq *eq_fid, uint32_t *event, void *buf, ++ size_t len, int timeout, uint64_t flags); ++ssize_t ofi_eq_readerr(struct fid_eq *eq_fid, struct fi_eq_err_entry *buf, ++ uint64_t flags); ++ssize_t ofi_eq_write(struct fid_eq *eq_fid, uint32_t event, ++ const void *buf, size_t len, uint64_t flags); ++const char *ofi_eq_strerror(struct fid_eq *eq_fid, int prov_errno, ++ const void *err_data, char *buf, size_t len); + + /* + +@@ -740,6 +841,14 @@ void ofi_fabric_remove(struct util_fabric *fabric); + * Utility Providers + */ + ++#define OFI_NAME_DELIM ';' ++#define OFI_UTIL_PREFIX "ofi_" ++ ++static inline int ofi_has_util_prefix(const char *str) ++{ ++ return !strncasecmp(str, OFI_UTIL_PREFIX, strlen(OFI_UTIL_PREFIX)); ++} ++ + typedef int (*ofi_alter_info_t)(uint32_t version, const struct fi_info *src_info, + struct fi_info *dest_info); + +@@ -751,18 +860,15 @@ int ofix_getinfo(uint32_t version, const char *node, const char *service, + uint64_t flags, const struct util_prov *util_prov, + const struct fi_info *hints, ofi_alter_info_t info_to_core, + ofi_alter_info_t info_to_util, struct fi_info **info); +-int ofi_get_core_info_fabric(struct fi_fabric_attr *util_attr, ++int ofi_get_core_info_fabric(const struct fi_provider *prov, ++ const struct fi_fabric_attr *util_attr, + struct fi_info **core_info); + + +-#define OFI_NAME_DELIM ';' +-#define OFI_UTIL_PREFIX "ofi_" +- + char *ofi_strdup_append(const char *head, const char *tail); + // char *ofi_strdup_head(const char *str); + // char *ofi_strdup_tail(const char *str); +-const char *ofi_util_name(const char *prov_name, size_t *len); +-const char *ofi_core_name(const char *prov_name, size_t *len); ++int ofi_exclude_prov_name(char **prov_name, const char *util_prov_name); + + + int ofi_shm_map(struct util_shm *shm, const char *name, size_t size, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/osx/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/osx/osd.h +index db7005205..8fd0d5983 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/osx/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/osx/osd.h +@@ -1,6 +1,7 @@ + /* + * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -67,6 +68,21 @@ static inline int ofi_shm_remap(struct util_shm *shm, size_t newsize, void **map + return -1; + } + ++static inline ssize_t ofi_get_hugepage_size(void) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_alloc_hugepage_buf(void **memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_free_hugepage_buf(void *memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ + #ifdef __cplusplus + } + #endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rbtree.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rbtree.h +index 34ff3dbe8..a0434b717 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rbtree.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rbtree.h +@@ -95,5 +95,12 @@ RbtIterator rbtFindLeftmost(RbtHandle h, void *key, + RbtIterator rbtFind(RbtHandle h, void *key); + // returns iterator associated with key + ++void rbtTraversal(RbtHandle h, RbtIterator it, void *handler_arg, ++ void(*handler)(void *arg, RbtIterator it)); ++// tree traversal that visits (applies handler()) each node in the tree data ++// strucutre exactly once. ++ ++void *rbtRoot(RbtHandle h); ++// returns the root of the tree + + #endif /* RBTREE_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fabric.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fabric.h +index 3d29686f0..83854339f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fabric.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fabric.h +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #ifdef __GNUC__ + #define FI_DEPRECATED_FUNC __attribute__((deprecated)) +@@ -75,11 +76,8 @@ extern "C" { + ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) + #endif + +-/* API version (which is not necessarily the same as the +- * tarball/libfabric package version number). +- */ + #define FI_MAJOR_VERSION 1 +-#define FI_MINOR_VERSION 6 ++#define FI_MINOR_VERSION 7 + + enum { + FI_PATH_MAX = 256, +@@ -91,10 +89,13 @@ enum { + #define FI_MAJOR(version) (version >> 16) + #define FI_MINOR(version) (version & 0xFFFF) + #define FI_VERSION_GE(v1, v2) ((FI_MAJOR(v1) > FI_MAJOR(v2)) || \ +- (FI_MAJOR(v1) == FI_MAJOR(v2) && FI_MINOR(v1) == FI_MINOR(v2)) || \ +- (FI_MAJOR(v1) == FI_MAJOR(v2) && FI_MINOR(v1) > FI_MINOR(v2))) ++ (FI_MAJOR(v1) == FI_MAJOR(v2) && \ ++ FI_MINOR(v1) == FI_MINOR(v2)) || \ ++ (FI_MAJOR(v1) == FI_MAJOR(v2) && \ ++ FI_MINOR(v1) > FI_MINOR(v2))) + #define FI_VERSION_LT(v1, v2) ((FI_MAJOR(v1) < FI_MAJOR(v2)) || \ +- (FI_MAJOR(v1) == FI_MAJOR(v2) && FI_MINOR(v1) < FI_MINOR(v2))) ++ (FI_MAJOR(v1) == FI_MAJOR(v2) && \ ++ FI_MINOR(v1) < FI_MINOR(v2))) + + uint32_t fi_version(void); + +@@ -111,6 +112,7 @@ struct fid_ep; + struct fid_pep; + struct fid_stx; + struct fid_mr; ++struct fid_nic; + + typedef struct fid *fid_t; + +@@ -157,7 +159,9 @@ typedef struct fid *fid_t; + #define FI_DELIVERY_COMPLETE (1ULL << 28) + #define FI_AFFINITY (1ULL << 29) + #define FI_COMMIT_COMPLETE (1ULL << 30) ++#define FI_MATCH_COMPLETE (1ULL << 31) + ++#define FI_VARIABLE_MSG (1ULL << 48) + #define FI_RMA_PMEM (1ULL << 49) + #define FI_SOURCE_ERR (1ULL << 50) + #define FI_LOCAL_COMM (1ULL << 51) +@@ -171,6 +175,11 @@ typedef struct fid *fid_t; + #define FI_DIRECTED_RECV (1ULL << 59) + + ++/* Tagged messages, buffered receives, CQ flags */ ++#define FI_CLAIM (1ULL << 59) ++#define FI_DISCARD (1ULL << 58) ++ ++ + struct fi_ioc { + void *addr; + size_t count; +@@ -289,6 +298,9 @@ enum { + FI_PROTO_NETWORKDIRECT, + FI_PROTO_PSMX2, + FI_PROTO_SHM, ++ FI_PROTO_MRAIL, ++ FI_PROTO_RSTREAM, ++ FI_PROTO_RDMA_CM_IB_XRC, + }; + + /* Mode bits */ +@@ -300,6 +312,7 @@ enum { + #define FI_NOTIFY_FLAGS_ONLY (1ULL << 54) + #define FI_RESTRICTED_COMP (1ULL << 53) + #define FI_CONTEXT2 (1ULL << 52) ++#define FI_BUFFERED_RECV (1ULL << 51) + + struct fi_tx_attr { + uint64_t caps; +@@ -392,6 +405,50 @@ struct fi_info { + struct fi_ep_attr *ep_attr; + struct fi_domain_attr *domain_attr; + struct fi_fabric_attr *fabric_attr; ++ struct fid_nic *nic; ++}; ++ ++struct fi_device_attr { ++ char *name; ++ char *device_id; ++ char *device_version; ++ char *vendor_id; ++ char *driver; ++ char *firmware; ++}; ++ ++enum fi_bus_type { ++ FI_BUS_UNSPEC, ++ FI_BUS_UNKNOWN = FI_BUS_UNSPEC, ++ FI_BUS_PCI, ++}; ++ ++struct fi_pci_attr { ++ uint16_t domain_id; ++ uint8_t bus_id; ++ uint8_t device_id; ++ uint8_t function_id; ++}; ++ ++struct fi_bus_attr { ++ enum fi_bus_type bus_type; ++ union { ++ struct fi_pci_attr pci; ++ } attr; ++}; ++ ++enum fi_link_state { ++ FI_LINK_UNKNOWN, ++ FI_LINK_DOWN, ++ FI_LINK_UP, ++}; ++ ++struct fi_link_attr { ++ char *address; ++ size_t mtu; ++ size_t speed; ++ enum fi_link_state state; ++ char *network_type; + }; + + enum { +@@ -415,6 +472,7 @@ enum { + FI_CLASS_POLL, + FI_CLASS_CONNREQ, + FI_CLASS_MC, ++ FI_CLASS_NIC, + }; + + struct fi_eq_attr; +@@ -429,7 +487,8 @@ struct fi_ops { + int (*bind)(struct fid *fid, struct fid *bfid, uint64_t flags); + int (*control)(struct fid *fid, int command, void *arg); + int (*ops_open)(struct fid *fid, const char *name, +- uint64_t flags, void **ops, void *context); ++ uint64_t flags, void **ops, void *context); ++ int (*tostr)(const struct fid *fid, char *buf, size_t len); + }; + + /* All fabric interface descriptors must start with this structure */ +@@ -472,6 +531,14 @@ struct fid_fabric { + + int fi_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, void *context); + ++struct fid_nic { ++ struct fid fid; ++ struct fi_device_attr *device_attr; ++ struct fi_bus_attr *bus_attr; ++ struct fi_link_attr *link_attr; ++ void *prov_attr; ++}; ++ + #define FI_CHECK_OP(ops, opstype, op) \ + ((ops->size > offsetof(opstype, op)) && ops->op) + +@@ -517,6 +584,7 @@ enum { + FI_CANCEL_WORK, /* struct fi_deferred_work */ + FI_FLUSH_WORK, /* NULL */ + FI_REFRESH, /* mr: fi_mr_modify */ ++ FI_DUP, /* struct fid ** */ + }; + + static inline int fi_control(struct fid *fid, int command, void *arg) +@@ -563,6 +631,7 @@ enum fi_type { + FI_TYPE_CQ_EVENT_FLAGS, + FI_TYPE_MR_MODE, + FI_TYPE_OP_TYPE, ++ FI_TYPE_FID, + }; + + char *fi_tostr(const void *data, enum fi_type datatype); +@@ -599,6 +668,11 @@ struct fi_context2 { + }; + #endif + ++struct fi_recv_context { ++ struct fid_ep *ep; ++ void *context; ++}; ++ + #ifdef __cplusplus + } + #endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_domain.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_domain.h +index 1fecb1f29..9deed9b90 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_domain.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_domain.h +@@ -341,7 +341,9 @@ static inline int + fi_mr_refresh(struct fid_mr *mr, const struct iovec *iov, size_t count, + uint64_t flags) + { +- struct fi_mr_modify modify = {0}; ++ struct fi_mr_modify modify = {0, ++ {NULL, 0, 0, 0, 0, NULL, 0, NULL} ++ }; + modify.flags = flags; + modify.attr.mr_iov = iov; + modify.attr.iov_count = count; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_endpoint.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_endpoint.h +index d2ef6babd..fa65b1188 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_endpoint.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_endpoint.h +@@ -60,6 +60,12 @@ enum { + enum { + FI_OPT_MIN_MULTI_RECV, /* size_t */ + FI_OPT_CM_DATA_SIZE, /* size_t */ ++ FI_OPT_BUFFERED_MIN, /* size_t */ ++ FI_OPT_BUFFERED_LIMIT, /* size_t */ ++ FI_OPT_SEND_BUF_SIZE, ++ FI_OPT_RECV_BUF_SIZE, ++ FI_OPT_TX_SIZE, ++ FI_OPT_RX_SIZE, + }; + + struct fi_ops_ep { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_errno.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_errno.h +index 8ee376c2a..63a6acbfd 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_errno.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_errno.h +@@ -118,7 +118,7 @@ extern "C" { + //#define FI_EMULTIHOP EMULTIHOP /* Multihop attempted */ + //#define FI_EDOTDOT EDOTDOT /* RFS specific error */ + //#define FI_EBADMSG EBADMSG /* Not a data message */ +-//#define FI_EOVERFLOW EOVERFLOW /* Value too large for defined data type */ ++#define FI_EOVERFLOW EOVERFLOW /* Value too large for defined data type */ + //#define FI_ENOTUNIQ ENOTUNIQ /* Name not unique on network */ + //#define FI_EBADFD EBADFD /* File descriptor in bad state */ + //#define FI_EREMCHG EREMCHG /* Remote address changed */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_tagged.h b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_tagged.h +index 75e9785a2..61eba4e86 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_tagged.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/rdma/fi_tagged.h +@@ -41,8 +41,6 @@ + extern "C" { + #endif + +-#define FI_CLAIM (1ULL << 59) +-#define FI_DISCARD (1ULL << 58) + + struct fi_msg_tagged { + const struct iovec *msg_iov; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/shared/ofi_str.h b/src/mpid/ch4/netmod/ofi/libfabric/include/shared/ofi_str.h +new file mode 100644 +index 000000000..d352c07a0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/shared/ofi_str.h +@@ -0,0 +1,54 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _OFI_STR_H_ ++#define _OFI_STR_H_ ++ ++#include ++ ++#include "config.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++int ofi_rm_substr(char *str, const char *substr); ++int ofi_rm_substr_delim(char *str, const char *substr, const char delim); ++char **ofi_split_and_alloc(const char *s, const char *delim, size_t *count); ++void ofi_free_string_array(char **s); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _OFI_STR_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/unix/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/unix/osd.h +index dddb25ce1..e07487407 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/unix/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/unix/osd.h +@@ -43,6 +43,10 @@ + #include + #include + ++#ifdef HAVE_GLIBC_MALLOC_HOOKS ++# include ++#endif ++ + /* MSG_NOSIGNAL doesn't exist on OS X */ + #ifndef MSG_NOSIGNAL + #define MSG_NOSIGNAL 0 +@@ -75,6 +79,8 @@ + #define OFI_SOCK_TRY_CONN_AGAIN(err) \ + ((err) == EINPROGRESS) + ++#define OFI_MAX_SOCKET_BUF_SIZE SIZE_MAX ++ + struct util_shm + { + int shared_fd; +@@ -106,6 +112,11 @@ static inline int ofi_getsockname(SOCKET fd, struct sockaddr *addr, socklen_t *l + return getsockname(fd, addr, len); + } + ++static inline int ofi_getpeername(SOCKET fd, struct sockaddr *addr, socklen_t *len) ++{ ++ return getpeername(fd, addr, len); ++} ++ + static inline SOCKET ofi_socket(int domain, int type, int protocol) + { + return socket(domain, type, protocol); +@@ -127,10 +138,10 @@ static inline ssize_t ofi_recv_socket(SOCKET fd, void *buf, size_t count, + return recv(fd, buf, count, flags); + } + +-static inline ssize_t ofi_recvfrom_socket(SOCKET fd, const void *buf, size_t count, int flags, +- const struct sockaddr *to, socklen_t tolen) ++static inline ssize_t ofi_recvfrom_socket(SOCKET fd, void *buf, size_t count, int flags, ++ struct sockaddr *from, socklen_t *fromlen) + { +- return sendto(fd, buf, count, flags, to, tolen); ++ return recvfrom(fd, buf, count, flags, from, fromlen); + } + + static inline ssize_t ofi_send_socket(SOCKET fd, const void *buf, size_t count, +@@ -155,6 +166,30 @@ static inline ssize_t ofi_readv_socket(SOCKET fd, struct iovec *iov, int iov_cnt + return readv(fd, iov, iov_cnt); + } + ++static inline ssize_t ++ofi_sendmsg_tcp(SOCKET fd, const struct msghdr *msg, int flags) ++{ ++ return sendmsg(fd, msg, flags); ++} ++ ++static inline ssize_t ++ofi_sendmsg_udp(SOCKET fd, const struct msghdr *msg, int flags) ++{ ++ return sendmsg(fd, msg, flags); ++} ++ ++static inline ssize_t ++ofi_recvmsg_tcp(SOCKET fd, struct msghdr *msg, int flags) ++{ ++ return recvmsg(fd, msg, flags); ++} ++ ++static inline ssize_t ++ofi_recvmsg_udp(SOCKET fd, struct msghdr *msg, int flags) ++{ ++ return recvmsg(fd, msg, flags); ++} ++ + static inline int ofi_shutdown(SOCKET socket, int how) + { + return shutdown(socket, how); +@@ -279,6 +314,121 @@ ofi_cpuid(unsigned func, unsigned subfunc, unsigned cpuinfo[4]) + + #endif /* defined(__x86_64__) || defined(__amd64__) */ + ++typedef void (*ofi_mem_free_hook)(void *, const void *); ++typedef void *(*ofi_mem_realloc_hook)(void *, size_t, const void *); ++ ++#ifdef HAVE_GLIBC_MALLOC_HOOKS ++ ++static inline void ofi_set_mem_free_hook(ofi_mem_free_hook free_hook) ++{ ++#ifdef __INTEL_COMPILER /* ICC */ ++# pragma warning push ++# pragma warning disable 1478 ++ __free_hook = free_hook; ++# pragma warning pop ++#elif defined __clang__ /* Clang */ ++# pragma clang diagnostic push ++# pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ __free_hook = free_hook; ++# pragma clang diagnostic pop ++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wdeprecated-declarations" ++ __free_hook = free_hook; ++# pragma GCC diagnostic pop ++#else /* others */ ++ __free_hook = free_hook; ++#endif ++} ++ ++static inline void ofi_set_mem_realloc_hook(ofi_mem_realloc_hook realloc_hook) ++{ ++#ifdef __INTEL_COMPILER /* ICC */ ++# pragma warning push ++# pragma warning disable 1478 ++ __realloc_hook = realloc_hook; ++# pragma warning pop ++#elif defined __clang__ /* Clang */ ++# pragma clang diagnostic push ++# pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ __realloc_hook = realloc_hook; ++# pragma clang diagnostic pop ++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wdeprecated-declarations" ++ __realloc_hook = realloc_hook; ++# pragma GCC diagnostic pop ++#else /* others */ ++ __realloc_hook = realloc_hook; ++#endif ++} ++ ++static inline ofi_mem_free_hook ofi_get_mem_free_hook(void) ++{ ++#ifdef __INTEL_COMPILER /* ICC */ ++# pragma warning push ++# pragma warning disable 1478 ++ return __free_hook; ++# pragma warning pop ++#elif defined __clang__ /* Clang */ ++# pragma clang diagnostic push ++# pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ return __free_hook; ++# pragma clang diagnostic pop ++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wdeprecated-declarations" ++ return __free_hook; ++# pragma GCC diagnostic pop ++#else /* others */ ++ return __free_hook; ++#endif ++} ++ ++static inline ofi_mem_realloc_hook ofi_get_mem_realloc_hook(void) ++{ ++#ifdef __INTEL_COMPILER /* ICC */ ++# pragma warning push ++# pragma warning disable 1478 ++ return __realloc_hook; ++# pragma warning pop ++#elif defined __clang__ /* Clang */ ++# pragma clang diagnostic push ++# pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ return __realloc_hook; ++# pragma clang diagnostic pop ++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wdeprecated-declarations" ++ return __realloc_hook; ++# pragma GCC diagnostic pop ++#else /* others */ ++ return __realloc_hook; ++#endif ++} ++ ++#else /* !HAVE_GLIBC_MALLOC_HOOKS */ ++ ++static inline void ofi_set_mem_free_hook(ofi_mem_free_hook free_hook) ++{ ++ OFI_UNUSED(free_hook); ++} ++ ++static inline void ofi_set_mem_realloc_hook(ofi_mem_realloc_hook realloc_hook) ++{ ++ OFI_UNUSED(realloc_hook); ++} ++ ++static inline ofi_mem_free_hook ofi_get_mem_free_hook(void) ++{ ++ return NULL; ++} ++ ++static inline ofi_mem_realloc_hook ofi_get_mem_realloc_hook(void) ++{ ++ return NULL; ++} + ++#endif /* HAVE_GLIBC_MALLOC_HOOKS */ + + #endif /* _FI_UNIX_OSD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/uthash.h b/src/mpid/ch4/netmod/ofi/libfabric/include/uthash.h +index 7e64cac75..f34c1f98a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/uthash.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/uthash.h +@@ -1,5 +1,5 @@ + /* +-Copyright (c) 2003-2017, Troy D. Hanson http://troydhanson.github.com/uthash/ ++Copyright (c) 2003-2018, Troy D. Hanson http://troydhanson.github.com/uthash/ + All rights reserved. + + Redistribution and use in source and binary forms, with or without +@@ -478,11 +478,20 @@ do { + + /* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ + #define HASH_FIND_STR(head,findstr,out) \ +- HASH_FIND(hh,head,findstr,(unsigned)uthash_strlen(findstr),out) ++do { \ ++ unsigned _uthash_hfstr_keylen = (unsigned)uthash_strlen(findstr); \ ++ HASH_FIND(hh, head, findstr, _uthash_hfstr_keylen, out); \ ++} while (0) + #define HASH_ADD_STR(head,strfield,add) \ +- HASH_ADD(hh,head,strfield[0],(unsigned)uthash_strlen(add->strfield),add) ++do { \ ++ unsigned _uthash_hastr_keylen = (unsigned)uthash_strlen((add)->strfield); \ ++ HASH_ADD(hh, head, strfield[0], _uthash_hastr_keylen, add); \ ++} while (0) + #define HASH_REPLACE_STR(head,strfield,add,replaced) \ +- HASH_REPLACE(hh,head,strfield[0],(unsigned)uthash_strlen(add->strfield),add,replaced) ++do { \ ++ unsigned _uthash_hrstr_keylen = (unsigned)uthash_strlen((add)->strfield); \ ++ HASH_REPLACE(hh, head, strfield[0], _uthash_hrstr_keylen, add, replaced); \ ++} while (0) + #define HASH_FIND_INT(head,findint,out) \ + HASH_FIND(hh,head,findint,sizeof(int),out) + #define HASH_ADD_INT(head,intfield,add) \ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/windows/config.h b/src/mpid/ch4/netmod/ofi/libfabric/include/windows/config.h +index e41c6e9f5..341d0e159 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/windows/config.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/windows/config.h +@@ -50,6 +50,9 @@ + /* psm provider is built */ + /* #undef HAVE_PSM */ + ++/* perf provider is built */ ++#define HAVE_PERF 1 ++ + /* psm2 provider is built */ + /* #undef HAVE_PSM2 */ + +@@ -68,14 +71,14 @@ + /* Define to 1 if you have the header file. */ + /* #undef HAVE_RDMA_RSOCKET_H */ + +-/* sockets provider is built */ +-#define HAVE_SOCKETS 1 +- + /* UDP provider is built */ + #define HAVE_UDP 1 + +-/* TCP provider is built */ +-#define HAVE_TCP 1 ++/* UDP provider is built as DSO */ ++/* #undef HAVE_UDP_DL */ ++ ++/* sockets provider is built */ ++#define HAVE_SOCKETS 1 + + /* sockets provider is built as DSO */ + /* #undef HAVE_SOCKETS_DL */ +@@ -159,7 +162,7 @@ + #define PACKAGE_NAME "libfabric" + + /* Define to the full name and version of this package. */ +-#define PACKAGE_STRING "libfabric 1.6.2" ++#define PACKAGE_STRING "libfabric 1.7.0" + + /* Define to the one symbol short name of this package. */ + #define PACKAGE_TARNAME "libfabric" +@@ -168,7 +171,7 @@ + #define PACKAGE_URL "" + + /* Define to the version of this package. */ +-#define PACKAGE_VERSION "1.6.2" ++#define PACKAGE_VERSION "1.7.0" + + /* Define to 1 if pthread_spin_init is available. */ + /* #undef PT_LOCK_SPIN */ +@@ -192,7 +195,7 @@ + /* Version number of package */ + #define _FI_EXP(s) #s + #define _FI_TO_STRING(s) _FI_EXP(s) +-#define VERSION _FI_TO_STRING(FI_MAJOR_VERSION) "." _FI_TO_STRING(FI_MINOR_VERSION) ".0" ++#define VERSION _FI_TO_STRING(FI_MAJOR_VERSION) "." _FI_TO_STRING(FI_MINOR_VERSION) ".1a1" + + #ifndef BUILD_ID + #define BUILD_ID "" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/include/windows/osd.h b/src/mpid/ch4/netmod/ofi/libfabric/include/windows/osd.h +index 61982faae..2258cbecc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/include/windows/osd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/include/windows/osd.h +@@ -1,6 +1,7 @@ + /* + * Copyright (c) 2016 Intel Corporation. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +@@ -18,6 +19,7 @@ + #include "config.h" + + #include ++#include + #include + #include + #include +@@ -39,6 +41,8 @@ + extern "C" { + #endif + ++#define OFI_MAX_SOCKET_BUF_SIZE INT_MAX ++ + /* + * The following defines redefine the Windows Socket + * errors as BSD errors. +@@ -277,6 +281,7 @@ int fd_set_nonblock(int fd); + int socketpair(int af, int type, int protocol, int socks[2]); + void sock_get_ip_addr_table(struct slist *addr_list); + int ofi_getsockname(SOCKET fd, struct sockaddr *addr, socklen_t *len); ++int ofi_getpeername(SOCKET fd, struct sockaddr *addr, socklen_t *len); + + /* + * Win32 error code should be passed as a parameter. +@@ -712,10 +717,11 @@ static inline ssize_t ofi_recv_socket(SOCKET fd, void *buf, size_t count, + return recv(fd, (char *)buf, (int)count, flags); + } + +-static inline ssize_t ofi_recvfrom_socket(SOCKET fd, const void *buf, size_t count, int flags, +- const struct sockaddr *to, socklen_t tolen) ++static inline ssize_t ++ofi_recvfrom_socket(SOCKET fd, void *buf, size_t count, int flags, ++ struct sockaddr *from, socklen_t *fromlen) + { +- return sendto(fd, (const char*)buf, (int)count, flags, to, tolen); ++ return recvfrom(fd, (char*)buf, (int)count, flags, from, fromlen); + } + + static inline ssize_t ofi_send_socket(SOCKET fd, const void *buf, size_t count, +@@ -724,14 +730,29 @@ static inline ssize_t ofi_send_socket(SOCKET fd, const void *buf, size_t count, + return send(fd, (const char*)buf, (int)count, flags); + } + +-static inline ssize_t ofi_sendto_socket(SOCKET fd, const void *buf, size_t count, int flags, +- const struct sockaddr *to, socklen_t tolen) ++static inline ssize_t ++ofi_sendto_socket(SOCKET fd, const void *buf, size_t count, int flags, ++ const struct sockaddr *to, socklen_t tolen) + { + return sendto(fd, (const char*)buf, (int)count, flags, to, tolen); + } + + ssize_t ofi_writev_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt); + ssize_t ofi_readv_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt); ++ssize_t ofi_sendmsg_tcp(SOCKET fd, const struct msghdr *msg, int flags); ++ssize_t ofi_recvmsg_tcp(SOCKET fd, struct msghdr *msg, int flags); ++ ++static inline ssize_t ++ofi_sendmsg_udp(SOCKET fd, const struct msghdr *msg, int flags) ++{ ++ DWORD bytes; ++ int ret; ++ ++ ret = WSASendMsg(fd, msg, flags, &bytes, NULL, NULL); ++ return ret ? ret : bytes; ++} ++ ++ssize_t ofi_recvmsg_udp(SOCKET fd, struct msghdr *msg, int flags); + + static inline int ofi_shutdown(SOCKET socket, int how) + { +@@ -817,6 +838,21 @@ static inline int ofi_sysconf(int name) + + int ofi_shm_unmap(struct util_shm *shm); + ++static inline ssize_t ofi_get_hugepage_size(void) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_alloc_hugepage_buf(void **memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ofi_free_hugepage_buf(void *memptr, size_t size) ++{ ++ return -FI_ENOSYS; ++} ++ + static inline int ofi_is_loopback_addr(struct sockaddr *addr) { + return (addr->sa_family == AF_INET && + ((struct sockaddr_in *)addr)->sin_addr.s_addr == ntohl(INADDR_LOOPBACK)) || +@@ -936,6 +972,28 @@ ofi_cpuid(unsigned func, unsigned subfunc, unsigned cpuinfo[4]) + + #endif /* defined(_M_X64) || defined(_M_AMD64) */ + ++typedef void (*ofi_mem_free_hook)(void *, const void *); ++typedef void *(*ofi_mem_realloc_hook)(void *, size_t, const void *); ++ ++static inline void ofi_set_mem_free_hook(ofi_mem_free_hook free_hook) ++{ ++ OFI_UNUSED(free_hook); ++} ++ ++static inline void ofi_set_mem_realloc_hook(ofi_mem_realloc_hook realloc_hook) ++{ ++ OFI_UNUSED(realloc_hook); ++} ++ ++static inline ofi_mem_free_hook ofi_get_mem_free_hook(void) ++{ ++ return NULL; ++} ++ ++static inline ofi_mem_realloc_hook ofi_get_mem_realloc_hook(void) ++{ ++ return NULL; ++} + + #ifdef __cplusplus + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/info.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/info.vcxproj +index 0beac7e7e..e772aea94 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/info.vcxproj ++++ b/src/mpid/ch4/netmod/ofi/libfabric/info.vcxproj +@@ -30,8 +30,8 @@ + {90850937-D15C-491D-B294-66DCA165254D} + Win32Proj + info +- 8.1 + ++ + + + Application +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.map.in b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.map.in +index ef2f53d47..53a3ed3c9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.map.in ++++ b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.map.in +@@ -24,3 +24,10 @@ FABRIC_1.1 { + fi_dupinfo; + fi_fabric; + } FABRIC_1.0; ++ ++FABRIC_1.2 { ++ global: ++ fi_getinfo; ++ fi_freeinfo; ++ fi_dupinfo; ++} FABRIC_1.1; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj +index 15b84a539..43a05e722 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj ++++ b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj +@@ -1,4 +1,4 @@ +- ++ + + + +@@ -30,8 +30,8 @@ + {6B3A874F-B14C-4F16-B7C3-31E94859AE3E} + Win32Proj + libfabric +- 8.1 + ++ + + + DynamicLibrary +@@ -125,7 +125,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include + CompileAsC + 4127;4200;4204;4221;4115;4201;4100 + true +@@ -148,7 +148,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; + CompileAsC + 4127;4200;4204;4221;4115;4201;4100 + true +@@ -171,7 +171,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include + CompileAsC + 4127;4200;94;4204;4221;869 + true +@@ -195,7 +195,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include + 4127;4200;4204;4221;4115;4201;4100 + true + false +@@ -220,7 +220,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; + 4127;4200;4204;4221;4115;4201;4100 + true + false +@@ -245,7 +245,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir);$(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; + 4127;4200;94;4204;4221;869 + true + false +@@ -262,6 +262,17 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -274,6 +285,10 @@ + + + ++ ++ ++ ++ + + + +@@ -289,14 +304,15 @@ + + + +- + + + + ++ + + + ++ + + + +@@ -312,14 +328,6 @@ + + + +- +- false +- false +- false +- false +- false +- false +- + + + +@@ -509,10 +517,13 @@ + + + ++ + + ++ + + ++ + + + +@@ -555,10 +566,12 @@ + + + ++ + + + + ++ + + + +@@ -568,6 +581,7 @@ + + + ++ + + + +@@ -575,6 +589,7 @@ + + + ++ + + + +@@ -582,6 +597,7 @@ + + + ++ + + + +@@ -619,15 +635,16 @@ + + + ++ + + + + + + ++ + + +- + + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj.filters b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj.filters +index 323fc1c68..c0348416f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj.filters ++++ b/src/mpid/ch4/netmod/ofi/libfabric/libfabric.vcxproj.filters +@@ -1,4 +1,4 @@ +- ++ + + + +@@ -97,6 +97,18 @@ + + {8c151366-dd08-48d5-aa21-50a500cbde73} + ++ ++ {b85ecf6c-fb76-4d65-a7f0-cba470a0adee} ++ ++ ++ {b4689956-b61f-4c5b-b827-9af0797ea087} ++ ++ ++ {06bbf944-2165-474f-a574-2e61ec0bec25} ++ ++ ++ {be316a01-6bff-4203-b070-ffaa66bb398e} ++ + + + +@@ -123,12 +135,18 @@ + + Source Files\src + ++ ++ Source Files\src\shared ++ + + Source Files\src + + + Source Files\src + ++ ++ Source Files\src ++ + + Source Files\src + +@@ -273,15 +291,24 @@ + + Source Files\prov\rxd\src + +- ++ + Source Files\prov\rxd\src + +- ++ + Source Files\prov\rxd\src + + + Source Files\prov\rxd\src + ++ ++ Source Files\prov\rxd\src ++ ++ ++ Source Files\prov\rxd\src ++ ++ ++ Source Files\prov\rxd\src ++ + + Source Files\prov\rxm\src + +@@ -291,6 +318,9 @@ + + Source Files\prov\rxm\src + ++ ++ Source Files\prov\rxm\src ++ + + Source Files\prov\rxm\src + +@@ -300,6 +330,9 @@ + + Source Files\prov\rxm\src + ++ ++ Source Files\prov\rxm\src ++ + + Source Files\prov\rxm\src + +@@ -312,9 +345,6 @@ + + Source Files\prov\netdir\src + +- +- Source Files\prov\netdir\src +- + + Source Files\prov\netdir\src + +@@ -384,18 +414,27 @@ + + Source Files\prov\tcp\src + ++ ++ Source Files\prov\tcp\src ++ + + Source Files\prov\tcp\src + + + Source Files\prov\tcp\src + ++ ++ Source Files\prov\tcp\src ++ + + Source Files\prov\tcp\src + + + Source Files\prov\tcp\src + ++ ++ Source Files\prov\tcp\src ++ + + Source Files\prov\tcp\src + +@@ -405,6 +444,39 @@ + + Source Files\prov\util + ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\src ++ ++ ++ Source Files\prov\hook\perf\src ++ + + + +@@ -419,6 +491,9 @@ + + Header Files + ++ ++ Header Files ++ + + Header Files + +@@ -434,6 +509,9 @@ + + Header Files + ++ ++ Header Files ++ + + Header Files\rdma + +@@ -560,6 +638,9 @@ + + Source Files\prov\rxd\include + ++ ++ Source Files\prov\rxd\include ++ + + Source Files\prov\rxm\include + +@@ -572,9 +653,6 @@ + + Source Files\prov\netdir\include + +- +- Source Files\prov\netdir\include +- + + Source Files\prov\netdir\include + +@@ -623,6 +701,9 @@ + + Header Files\windows + ++ ++ Source Files\prov\hook\src ++ + + + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fabric.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fabric.7.md +index 905534907..e54c50f9f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fabric.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fabric.7.md +@@ -238,6 +238,34 @@ FI_LOG_SUBSYS environment variables. + - *mr* + : Provides output specific to memory registration. + ++# PROVIDER INSTALLATION AND SELECTION ++ ++The libfabric build scripts will install all providers that are supported ++by the installation system. Providers that are missing build prerequisites ++will be disabled. Installed providers will dynamically check for necessary ++hardware on library initialization and respond appropriately to application ++queries. ++ ++Users can enable or disable available providers through build configuration ++options. See 'configure --help' for details. In general, a specific provider ++can be controlled using the configure option '--enable-'. For ++example, '--enable-udp' (or '--enable-udp=yes') will add the udp provider to the ++build. To disable the provider, '--enable-udp=no' can be used. ++ ++Providers can also be enable or disabled at run time using the FI_PROVIDER ++environment variable. The FI_PROVIDER variable is set to a comma separated ++list of providers to include. If the list begins with the '^' symbol, then ++the list will be negated. ++ ++ Example: To enable the udp and tcp providers only, set: ++ FI_PROVIDER="udp,tcp" ++ ++The fi_info utility, which is included as part of the libfabric package, can ++be used to retrieve information about which providers are available in the ++system. Additionally, it can retrieve a list of all environment variables ++that may be used to configure libfabric and each provider. See ++[`fi_info`(1)](fi_info.1.html) for more details. ++ + # NOTES + + Because libfabric is designed to provide applications direct access to +@@ -258,6 +286,7 @@ portability across providers. + + # SEE ALSO + ++[`fi_info`(1)](fi_info.1.html), + [`fi_provider`(7)](fi_provider.7.html), + [`fi_getinfo`(3)](fi_getinfo.3.html), + [`fi_endpoint`(3)](fi_endpoint.3.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_atomic.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_atomic.3.md +index 7a3ff9cdc..85f261e1c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_atomic.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_atomic.3.md +@@ -143,7 +143,9 @@ int fi_query_atomic(struct fid_domain *domain, + : Additional flags to apply for the atomic operation + + *context* +-: User specified pointer to associate with the operation. ++: User specified pointer to associate with the operation. This parameter is ++ ignored if the operation will not generate a successful completion, unless ++ an op flag specifies the context parameter be used for required input. + + # DESCRIPTION + +@@ -518,19 +520,31 @@ size field indicates the size in bytes of the atomic datatype. + + ## Completions + +-Completed atomic operations are reported to the user through one or +-more event collectors associated with the endpoint. Users provide +-context which are associated with each operation, and is returned to +-the user as part of the event completion. See fi_cq for completion +-event details. +- +-Updates to the target buffer of an atomic operation are visible to +-processes running on the target system either after a completion has +-been generated, or after the completion of an operation initiated +-after the atomic call with a fencing operation occurring in between. +-For example, the target process may be notified by the initiator +-sending a message after the atomic call completes, or sending a fenced +-message immediately after initiating the atomic operation. ++Completed atomic operations are reported to the initiator of the ++request through an associated completion queue or counter. ++Any user provided context specified with the request will be ++returned as part of any completion event written to a CQ. ++See fi_cq for completion event details. ++ ++Any results returned to the initiator as part of an atomic operation ++will be available prior to a completion event being generated. This ++will be true even if the requested completion semantic provides a weaker ++guarantee. That is, atomic fetch operations have FI_DELIVERY_COMPLETE ++semantics. Completions generated for other types of atomic operations ++indicate that it is safe to re-use the source data buffers. ++ ++Any updates to data at the target of an atomic operation will be ++visible to processes running on the target node prior to one of ++the following occurring. If the atomic operation generates a ++completion event or updates a completion counter at the target ++endpoint, the results will be available prior to the completion ++notification. After processing a completion for the atomic, if ++the initiator submits a transfer between the same endpoints that ++generates a completion at the target, the results will be available ++prior to the subsequent transfer's event. Or, if a fenced data ++transfer from the initiator follows the atomic request, the results ++will be available prior to a completion at the target for the ++fenced transfer. + + # FLAGS + +@@ -554,13 +568,15 @@ with atomic message calls. + its access to the fabric hardware. + + *FI_INJECT* +-: Indicates that the outbound non-const data buffers (buf and compare +- parameters) should be returned to user immediately after the call +- returns, even if the operation is handled asynchronously. This may +- require that the underlying provider implementation copy the data +- into a local buffer and transfer out of that buffer. The use of +- output result buffers are not affected by this flag. This flag can only +- be used with messages smaller than inject_size. ++: Indicates that the control of constant data buffers should be returned to ++ the user immediately after the call returns, even if the operation ++ is handled asynchronously. This may require that the underlying ++ provider implementation copy the data into a local buffer and ++ transfer out of that buffer. Constant data buffers refers to any ++ data buffer or iovec used by the atomic APIs that are marked as ++ 'const'. Non-constant or output buffers are unaffected by this flag ++ and may be accessed by the provider at anytime until the operation has ++ completed. This flag can only be used with messages smaller than inject_size. + + *FI_FENCE* + : Applies to transmits. Indicates that the requested operation, also +@@ -622,6 +638,14 @@ parameter. This must be between 1 and the maximum returned through the + relevant valid operation, inclusive. The requested operation and data + type must also be valid for the given provider. + ++The ordering of atomic operations carried as part of different request ++messages is subject to the message and data ordering definitions assigned ++to the transmitting and receiving endpoints. Both message and data ordering ++are required if the results of two atomic operations to the same memory ++buffers are to reflect the second operation acting on the results of the ++first. See [`fi_endpoint`(3)](fi_endpoint.3.html) for further details ++and message size restrictions. ++ + # SEE ALSO + + [`fi_getinfo`(3)](fi_getinfo.3.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cntr.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cntr.3.md +index 0c203ad61..cddfaf64c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cntr.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cntr.3.md +@@ -258,8 +258,15 @@ counter values (e.g. fi_cntr_set or fi_cntr_add) may not be immediately + visible to counter read operations (i.e. fi_cntr_read or fi_cntr_readerr). + A small, but undefined, delay may occur between the counter changing and + the reported value being updated. However, a final updated value will +-eventually be reflected in the read counter value, with the order of the +-updates maintained. ++eventually be reflected in the read counter value. ++ ++Additionally, applications should ensure that the value of a counter is ++stable and not subject to change prior to calling fi_cntr_set ++or fi_cntr_seterr. Otherwise, the resulting value of the counter after ++fi_cntr_set / fi_cntr_seterr is undefined, as updates to the counter may ++be lost. A counter value is considered stable if all previous ++updates using fi_cntr_set / fi_cntr_seterr and results of related operations ++are reflected in the observed value of the counter. + + # SEE ALSO + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cq.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cq.3.md +index 1657e2857..c1eaa8769 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cq.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_cq.3.md +@@ -353,23 +353,26 @@ be the same as the count parameter. + + Returned source addressing data is converted from the native address + used by the underlying fabric into an fi_addr_t, which may be used in +-transmit operations. Typically, returning fi_addr_t requires that +-the source address be inserted into the address vector associated with the +-receiving endpoint. For endpoints allocated using the FI_SOURCE_ERR +-capability, if the source address has not been inserted into the +-address vector, fi_cq_readfrom will return -FI_EAVAIL. The +-completion will then be reported through fi_cq_readerr with error +-code -FI_EADDRNOTAVAIL. See fi_cq_readerr for details. ++transmit operations. Under most circumstances, returning fi_addr_t ++requires that the source address already have been inserted into the ++address vector associated with the receiving endpoint. This is true for ++address vectors of type FI_AV_TABLE. In select providers when FI_AV_MAP is ++used, source addresses may be converted algorithmically into a ++usable fi_addr_t, even though the source address has not been inserted ++into the address vector. This is permitted by the API, as it allows ++the provider to avoid address look-up as part of receive message processing. ++In no case do providers insert addresses into an AV separate from an ++application calling fi_av_insert or similar call. ++ ++For endpoints allocated using the FI_SOURCE_ERR capability, if the ++source address cannot be converted into a valid fi_addr_t value, ++fi_cq_readfrom will return -FI_EAVAIL, even if the data were received ++successfully. The completion will then be reported through fi_cq_readerr ++with error code -FI_EADDRNOTAVAIL. See fi_cq_readerr for details. + + If FI_SOURCE is specified without FI_SOURCE_ERR, source addresses +-which cannot be mapped to a local fi_addr_t will be reported as +-FI_ADDR_NOTAVAIL. The behavior is dependent on the type of address +-vector in use. For AVs of type FI_AV_MAP, source addresses may be +-mapped directly to an fi_addr_t value, even if the source address +-were not inserted into the AV. This allows the provider to optimize +-the reporting of the source fi_addr_t without the overhead of +-verifying whether the address is in the AV. If full address +-validation is necessary, FI_SOURCE_ERR must be used. ++which cannot be mapped to a usable fi_addr_t will be reported as ++FI_ADDR_NOTAVAIL. + + ## fi_cq_sread / fi_cq_sreadfrom + +@@ -415,11 +418,20 @@ convert provider specific error information into a printable string + for debugging purposes. See field details below for more information + on the use of err_data and err_data_size. + ++Note that error completions are generated for all operations, including ++those for which a completion was not requested (e.g. an endpoint ++is configured with FI_SELECTIVE_COMPLETION, but the request did not have ++the FI_COMPLETION flag set). In such cases, providers will return as ++much information as made available by the underlying software and ++hardware about the failure, other fields will be set to NULL or 0. This ++includes the op_context value, which may not have been provided or was ++ignored on input as part of the transfer. ++ + Notable completion error codes are given below. + + *FI_EADDRNOTAVAIL* + : This error code is used by CQs configured with FI_SOURCE_ERR to report +- completions for which a matching fi_addr_t source address could not ++ completions for which a usable fi_addr_t source address could not + be found. An error code of FI_EADDRNOTAVAIL indicates that the data + transfer was successfully received and processed, with the + fi_cq_err_entry fields containing information about the completion. +@@ -594,6 +606,130 @@ operation. The following completion flags are defined. + buffer has been released, and the completion entry is not associated + with a received message. + ++*FI_MORE* ++: See the 'Buffered Receives' section in `fi_msg`(3) for more details. ++ This flag is associated with receive completions on endpoints that ++ have FI_BUFFERED_RECV mode enabled. When set to one, it indicates that ++ the buffer referenced by the completion is limited by the ++ FI_OPT_BUFFERED_LIMIT threshold, and additional message data must be ++ retrieved by the application using an FI_CLAIM operation. ++ ++*FI_CLAIM* ++: See the 'Buffered Receives' section in `fi_msg`(3) for more details. ++ This flag is set on completions associated with receive operations ++ that claim buffered receive data. Note that this flag only applies ++ to endpoints configured with the FI_BUFFERED_RECV mode bit. ++ ++# COMPLETION EVENT SEMANTICS ++ ++Libfabric defines several completion 'levels', identified using operational ++flags. Each flag indicates the soonest that a completion event may be ++generated by a provider, and the assumptions that an application may make ++upon processing a completion. The operational flags are defined below, ++along with an example of how a provider might implement the semantic. Note ++that only meeting the semantic is required of the provider and not the ++implementation. Providers may implement stronger completion semantics ++than necessary for a given operation, but only the behavior defined by the ++completion level is guaranteed. ++ ++To help understand the conceptual differences in completion levels, consider ++mailing a letter. Placing the letter into the local mailbox for pick-up is ++similar to 'inject complete'. Having the letter picked up and dropped off ++at the destination mailbox is equivalent to 'transmit complete'. The ++'delivery complete' semantic is a stronger guarantee, with a person at the ++destination signing for the letter. However, the person who signed for the ++letter is not necessarily the intended recipient. The 'match complete' ++option is similar to delivery complete, but requires the intended recipient ++to sign for the letter. ++ ++The 'commit complete' level has different semantics than the previously ++mentioned levels. Commit complete would be closer to the the letter ++arriving at the destination and being placed into a fire proof safe. ++ ++The operational flags for the described completion levels are defined below. ++ ++*FI_INJECT_COMPLETE* ++: Indicates that a completion should be generated when the ++ source buffer(s) may be reused. A completion guarantees that ++ the buffers will not be read from again and the application may ++ reclaim them. No other guarantees are made with respect to the ++ state of the operation. ++ ++ Example: A provider may generate this completion event after copying ++ the source buffer into a network buffer, either in host memory or ++ on the NIC. An inject completion does not indicate that the data has ++ been transmitted onto the network, and a local error could occur after ++ the completion event has been generated that could prevent it from being ++ transmitted. ++ ++ Inject complete allows for the fastest completion reporting (and, hence, ++ buffer reuse), but provides the weakest guarantees against network errors. ++ ++ Note: This flag is used to control when a completion entry is inserted ++ into a completion queue. It does not apply to operations that do not ++ generate a completion queue entry, such as the fi_inject operation, and ++ is not subject to the inject_size message limit restriction. ++ ++*FI_TRANSMIT_COMPLETE* ++: Indicates that a completion should be generated when the transmit ++ operation has completed relative to the local provider. The exact ++ behavior is dependent on the endpoint type. ++ ++ For reliable endpoints: ++ ++ Indicates that a completion should be generated when the operation has ++ been delivered to the peer endpoint. A completion guarantees that the ++ operation is no longer dependent on the fabric or local resources. The ++ state of the operation at the peer endpoint is not defined. ++ ++ Example: A provider may generate a transmit complete event upon receiving ++ an ack from the peer endpoint. The state of the message at the peer is ++ unknown and may be buffered in the target NIC at the time the ack has been ++ generated. ++ ++ For unreliable endpoints: ++ ++ Indicates that a completion should be generated when the operation has ++ been delivered to the fabric. A completion guarantees that the ++ operation is no longer dependent on local resources. The state of the ++ operation within the fabric is not defined. ++ ++*FI_DELIVERY_COMPLETE* ++: Indicates that a completion should not be generated until an operation ++ has been processed by the destination endpoint(s). A completion ++ guarantees that the result of the operation is available; however, ++ additional steps may need to be taken at the destination to retrieve the ++ results. For example, an application may need to provide a receive buffers ++ in order to retrieve messages that were buffered by the provider. ++ ++ Delivery complete indicates that the message has been processed by the peer. ++ If an application buffer was ready to receive the results of the message ++ when it arrived, then delivery complete indicates that the data was placed ++ into the application's buffer. ++ ++ This completion mode applies only to reliable endpoints. For operations ++ that return data to the initiator, such as RMA read or atomic-fetch, ++ the source endpoint is also considered a destination endpoint. This is the ++ default completion mode for such operations. ++ ++*FI_MATCH_COMPLETE* ++: Indicates that a completion should be generated only after the operation ++ has been matched with an application specified buffer. Operations using ++ this completion semantic are dependent on the application at the target ++ claiming the message or results. As a result, match complete may involve ++ additional provider level acknowledgements or lengthy delays. However, this ++ completion model enables peer applications to synchronize their execution. ++ ++*FI_COMMIT_COMPLETE* ++: Indicates that a completion should not be generated (locally or at the ++ peer) until the result of an operation have been made persistent. ++ A completion guarantees that the result is both available and durable, ++ in the case of power failure. ++ ++ This completion mode applies only to operations that target persistent ++ memory regions over reliable endpoints. This completion mode is ++ experimental. ++ + # NOTES + + A completion queue must be bound to at least one enabled endpoint before any +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_endpoint.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_endpoint.3.md +index 33a2c5523..d876de1b5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_endpoint.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_endpoint.3.md +@@ -284,10 +284,11 @@ together when binding an endpoint to a completion domain CQ. + into a completion queue after they have successfully completed. + Applications can use this bind flag to selectively enable when + completions are generated. If FI_SELECTIVE_COMPLETION is specified, +- data transfer operations will not generate entries for successful ++ data transfer operations will not generate entries for _successful_ + completions unless FI_COMPLETION is set as an operational flag for the +- given operation. FI_SELECTIVE_COMPLETION must be OR'ed with FI_TRANSMIT +- and/or FI_RECV flags. ++ given operation. Operations that fail asynchronously will still generate ++ completions, even if a completion is not requested. FI_SELECTIVE_COMPLETION ++ must be OR'ed with FI_TRANSMIT and/or FI_RECV flags. + + When FI_SELECTIVE_COMPLETION is set, the user must determine when a + request that does NOT have FI_COMPLETION set has completed indirectly, +@@ -347,22 +348,22 @@ binding an endpoint to a counter, the following flags may be specified. + and normal message operations. + + *FI_READ* +-: Increments the specified counter whenever an RMA read or atomic fetch +- operation initiated from the endpoint has completed successfully or +- in error. ++: Increments the specified counter whenever an RMA read, atomic fetch, ++ or atomic compare operation initiated from the endpoint has completed ++ successfully or in error. + + *FI_WRITE* +-: Increments the specified counter whenever an RMA write or atomic operation +- initiated from the endpoint has completed successfully or in error. ++: Increments the specified counter whenever an RMA write or base atomic ++ operation initiated from the endpoint has completed successfully or in error. + + *FI_REMOTE_READ* +-: Increments the specified counter whenever an RMA read or +- atomic fetch operation is initiated from a remote endpoint that ++: Increments the specified counter whenever an RMA read, atomic fetch, or ++ atomic compare operation is initiated from a remote endpoint that + targets the given endpoint. Use of this flag requires that the + endpoint be created using FI_RMA_EVENT. + + *FI_REMOTE_WRITE* +-: Increments the specified counter whenever an RMA write or ++: Increments the specified counter whenever an RMA write or base + atomic operation is initiated from a remote endpoint that targets + the given endpoint. Use of this flag requires that the + endpoint be created using FI_RMA_EVENT. +@@ -513,6 +514,35 @@ The following option levels and option names and parameters are defined. + the maximum size of the data that may be present as part of a connection + request event. This option is read only. + ++- *FI_OPT_BUFFERED_LIMIT - size_t* ++: Defines the maximum size of a buffered message that will be reported ++ to users as part of a receive completion when the FI_BUFFERED_RECV mode ++ is enabled on an endpoint. ++ ++ fi_getopt() will return the currently configured threshold, or the ++ provider's default threshold if one has not be set by the application. ++ fi_setopt() allows an application to configure the threshold. If the ++ provider cannot support the requested threshold, it will fail the ++ fi_setopt() call with FI_EMSGSIZE. Calling fi_setopt() with the ++ threshold set to SIZE_MAX will set the threshold to the maximum ++ supported by the provider. fi_getopt() can then be used to retrieve ++ the set size. ++ ++ In most cases, the sending and receiving endpoints must be ++ configured to use the same threshold value, and the threshold must be ++ set prior to enabling the endpoint. ++ ++- *FI_OPT_BUFFERED_MIN - size_t* ++: Defines the minimum size of a buffered message that will be reported. ++ Applications would set this to a size that's big enough to decide whether ++ to discard or claim a buffered receive or when to claim a buffered receive ++ on getting a buffered receive completion. The value is typically used by a ++ provider when sending a rendezvous protocol request where it would send ++ atleast FI_OPT_BUFFERED_MIN bytes of application data along with it. A smaller ++ sized renedezvous protocol message usually results in better latency for the ++ overall transfer of a large message. ++ ++ + ## fi_rx_size_left (DEPRECATED) + + This function has been deprecated and will be removed in a future version +@@ -753,7 +783,9 @@ For example, a mem_tag_format of 0x30FF indicates support for 14 + tagged bits, separated into 3 fields. The first field consists of + 2-bits, the second field 4-bits, and the final field 8-bits. Valid + masks for such a tagged field would be a bitwise OR'ing of zero or +-more of the following values: 0x3000, 0x0F00, and 0x00FF. ++more of the following values: 0x3000, 0x0F00, and 0x00FF. The provider ++may not validate the mask provided by the application for performance ++reasons. + + By identifying fields within a tag, a provider may be able to optimize + their search routines. An application which requests tag fields must +@@ -763,8 +795,9 @@ can request a specific number of fields of a given size. A provider + must return a tag format that supports the requested number of fields, + with each field being at least the size requested, or fail the + request. A provider may increase the size of the fields. When reporting +-completions (see FI_CQ_FORMAT_TAGGED), the provider must provide the +-exact value of the received tag, clearing out any unsupported tag bits. ++completions (see FI_CQ_FORMAT_TAGGED), it is not guaranteed that the ++provider would clear out any unsupported tag bits in the tag field of ++the completion entry. + + It is recommended that field sizes be ordered from smallest to + largest. A generic, unstructured tag and mask can be achieved by +@@ -1311,54 +1344,24 @@ value of transmit or receive context attributes of an endpoint. + + *FI_INJECT_COMPLETE* + : Indicates that a completion should be generated when the +- source buffer(s) may be reused. A completion guarantees that +- the buffers will not be read from again and the application may +- reclaim them. No other guarantees are made with respect to the +- state of the operation. +- +- Note: This flag is used to control when a completion entry is inserted +- into a completion queue. It does not apply to operations that do not +- generate a completion queue entry, such as the fi_inject operation, and +- is not subject to the inject_size message limit restriction. ++ source buffer(s) may be reused. See [`fi_cq`(3)](fi_cq.3.html) for ++ additional details on completion semantics. + + *FI_TRANSMIT_COMPLETE* + : Indicates that a completion should be generated when the transmit +- operation has completed relative to the local provider. The exact +- behavior is dependent on the endpoint type. +- +- For reliable endpoints: +- +- Indicates that a completion should be generated when the operation has +- been delivered to the peer endpoint. A completion guarantees that the +- operation is no longer dependent on the fabric or local resources. The +- state of the operation at the peer endpoint is not defined. +- +- For unreliable endpoints: +- +- Indicates that a completion should be generated when the operation has +- been delivered to the fabric. A completion guarantees that the +- operation is no longer dependent on local resources. The state of the +- operation within the fabric is not defined. ++ operation has completed relative to the local provider. See ++ [`fi_cq`(3)](fi_cq.3.html) for additional details on completion semantics. + + *FI_DELIVERY_COMPLETE* +-: Indicates that a completion should not be generated until an operation +- has been processed by the destination endpoint(s). A completion +- guarantees that the result of the operation is available. +- +- This completion mode applies only to reliable endpoints. For operations +- that return data to the initiator, such as RMA read or atomic-fetch, +- the source endpoint is also considered a destination endpoint. This is the +- default completion mode for such operations. ++: Indicates that a completion should be generated when the operation has been ++ processed by the destination endpoint(s). See [`fi_cq`(3)](fi_cq.3.html) ++ for additional details on completion semantics. + + *FI_COMMIT_COMPLETE* + : Indicates that a completion should not be generated (locally or at the + peer) until the result of an operation have been made persistent. +- A completion guarantees that the result is both available and durable, +- in the case of power failure. +- +- This completion mode applies only to operations that target persistent +- memory regions over reliable endpoints. This completion mode is +- experimental. ++ See [`fi_cq`(3)](fi_cq.3.html) for additional details on completion ++ semantics. + + *FI_MULTICAST* + : Indicates that data transfers will target multicast addresses by default. +@@ -1427,6 +1430,7 @@ Fabric errno values are defined in `rdma/fi_errno.h`. + + [`fi_getinfo`(3)](fi_getinfo.3.html), + [`fi_domain`(3)](fi_domain.3.html), ++[`fi_cq`(3)](fi_cq.3.html) + [`fi_msg`(3)](fi_msg.3.html), + [`fi_tagged`(3)](fi_tagged.3.html), + [`fi_rma`(3)](fi_rma.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_fabric.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_fabric.3.md +index 5ff66b19b..bb3aa0af4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_fabric.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_fabric.3.md +@@ -70,7 +70,7 @@ values for the datatype are listed below, along with the corresponding + datatype or field value. + + *FI_TYPE_INFO* +-: struct fi_info ++: struct fi_info, including all substructures and fields + + *FI_TYPE_EP_TYPE* + : struct fi_info::type field +@@ -99,25 +99,51 @@ datatype or field value. + *FI_TYPE_FABRIC_ATTR* + : struct fi_fabric_attr + +-*FI_TYPE_DOMAIN_CAP* +-: struct fi_info::domain_cap field +- + *FI_TYPE_THREADING* + : enum fi_threading + + *FI_TYPE_PROGRESS* + : enum fi_progress + +-*FI_TYPE_PROTO* ++*FI_TYPE_PROTOCOL* + : struct fi_ep_attr::protocol field + + *FI_TYPE_MSG_ORDER* + : struct fi_ep_attr::msg_order field + ++*FI_TYPE_MODE* ++: struct fi_info::mode field ++ ++*FI_TYPE_AV_TYPE* ++: enum fi_av_type ++ ++*FI_TYPE_ATOMIC_TYPE* ++: enum fi_datatype ++ ++*FI_TYPE_ATOMIC_OP* ++: enum fi_op ++ + *FI_TYPE_VERSION* + : Returns the library version of libfabric in string form. The data + parameter is ignored. + ++*FI_TYPE_EQ_EVENT* ++: uint32_t event parameter returned from fi_eq_read(). See `fi_eq(3)` ++ for a list of known values. ++ ++*FI_TYPE_CQ_EVENT_FLAGS* ++: uint64_t flags field in fi_cq_xxx_entry structures. See `fi_cq(3)` ++ for valid flags. ++ ++*FI_TYPE_MR_MODE* ++: struct fi_domain_attr::mr_mode flags ++ ++*FI_TYPE_OP_TYPE* ++: enum fi_op_type ++ ++*FI_TYPE_FID* ++: struct fid * ++ + fi_tostr() will return a pointer to an internal libfabric buffer that + should not be modified, and will be overwritten the next time + fi_tostr() is invoked. fi_tostr() is not thread safe. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_getinfo.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_getinfo.3.md +index 6511b4519..ce0916301 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_getinfo.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_getinfo.3.md +@@ -133,6 +133,7 @@ struct fi_info { + struct fi_ep_attr *ep_attr; + struct fi_domain_attr *domain_attr; + struct fi_fabric_attr *fabric_attr; ++ struct fid_nic *nic; + }; + ``` + +@@ -183,15 +184,15 @@ struct fi_info { + that any returned address is only usable locally. + + *handle - provider context handle* +-: References a provider specific handle. The use of this field +- is operation specific. Unless its use is described for a given operation, +- the handle field must be NULL. It is commonly used by applications +- that make use of connection-oriented endpoints. For other applications, +- the field should usually be NULL. +- +- This field is used when processing connection requests and +- responses. It is also used to inherit endpoint's attributes. +- See fi_eq(3), fi_reject(3), and fi_endpoint(3) . ++: The use of this field is operation specific. If hints->handle is set to struct ++ fid_pep, the hints->handle will be copied to info->handle on output from ++ fi_getinfo. Other values of hints->handle will be handled in a provider ++ specific manner. The fi_info::handle field is also used by fi_endpoint() ++ and fi_reject() calls when processing connection requests or to inherit ++ another endpoint's attributes. See [`fi_eq`(3)](fi_eq.3.html), ++ [`fi_reject`(3)](fi_reject.3.html), and ++ [`fi_endpoint`(3)](fi_endpoint.3.html). The info->handle field will be ++ ignored by fi_dupinfo and fi_freeinfo. + + *tx_attr - transmit context attributes* + : Optionally supplied transmit context attributes. Transmit context +@@ -215,7 +216,7 @@ struct fi_info { + hints, requested values of struct fi_ep_attr should be set. On + output, the actual endpoint attributes that can be provided will be + returned. Output values will be greater than or equal to requested +- input values. See fi_endpoint(3) for details. ++ input values. See [`fi_endpoint`(3)](fi_endpoint.3.html) for details. + + *domain_attr - domain attributes* + : Optionally supplied domain attributes. Domain attributes may be +@@ -223,14 +224,21 @@ struct fi_info { + hints, requested values of struct fi_domain_attr should be set. On + output, the actual domain attributes that can be provided will be + returned. Output values will be greater than or equal to requested +- input values. See fi_domain(3) for details. ++ input values. See [`fi_domain`(3)](fi_domain.3.html) for details. + + *fabric_attr - fabric attributes* + : Optionally supplied fabric attributes. Fabric attributes may be + specified and returned as part of fi_getinfo. When provided as + hints, requested values of struct fi_fabric_attr should be set. On + output, the actual fabric attributes that can be provided will be +- returned. See fi_fabric(3) for details. ++ returned. See [`fi_fabric`(3)](fi_fabric.3.html) for details. ++ ++*nic - network interface details* ++: Optional attributes related to the hardware NIC associated with ++ the specified fabric, domain, and endpoint data. This field is ++ only valid for providers where the corresponding attributes are ++ closely associated with a hardware NIC. See [`fi_nic`(3)] ++ (fi_nic.3.html) for details. + + # CAPABILITIES + +@@ -402,6 +410,16 @@ additional optimizations. + completion semantics. This flag requires that FI_RMA be set. + This capability is experimental. + ++*FI_VARIABLE_MSG* ++ ++: Requests that the provider must notify a receiver when a variable ++ length message is ready to be received prior to attempting to place ++ the data. Such notification will include the size of the message and ++ any associated message tag (for FI_TAGGED). See 'Variable Length ++ Messages' in fi_msg.3 for full details. Variable length messages ++ are any messages larger than an endpoint configurable size. This ++ flag requires that FI_MSG and/or FI_TAGGED be set. ++ + Capabilities may be grouped into two general categories: primary and + secondary. Primary capabilities must explicitly be requested by an + application, and a provider must enable support for only those primary +@@ -413,7 +431,7 @@ would not compromise performance or security. + + Primary capabilities: FI_MSG, FI_RMA, FI_TAGGED, FI_ATOMIC, FI_MULTICAST, + FI_NAMED_RX_CTX, FI_DIRECTED_RECV, FI_READ, FI_WRITE, FI_RECV, FI_SEND, +-FI_REMOTE_READ, and FI_REMOTE_WRITE. ++FI_REMOTE_READ, FI_REMOTE_WRITE, and FI_VARIABLE_MSG. + + Secondary capabilities: FI_MULTI_RECV, FI_SOURCE, FI_RMA_EVENT, FI_SHARED_AV, + FI_TRIGGER, FI_FENCE, FI_LOCAL_COMM, FI_REMOTE_COMM, FI_SOURCE_ERR, FI_RMA_PMEM. +@@ -537,14 +555,25 @@ supported set of modes will be returned in the info structure(s). + completion flags which simply report the type of operation that + completed (e.g. send or receive) may not be set. However, + completion flags that are used for remote notifications will still +- be set when applicable. See `fi_cq`(3) for details on which completion +- flags are valid when this mode bit is enabled. ++ be set when applicable. See [`fi_cq`(3)](fi_cq.3.html) for details on ++ which completion flags are valid when this mode bit is enabled. + + *FI_RESTRICTED_COMP* + : This bit indicates that the application will only share completion queues + and counters among endpoints, transmit contexts, and receive contexts that + have the same set of capability flags. + ++*FI_BUFFERED_RECV* ++: The buffered receive mode bit indicates that the provider owns the ++ data buffer(s) that are accessed by the networking layer for received ++ messages. Typically, this implies that data must be copied from the ++ provider buffer into the application buffer. Applications that can ++ handle message processing from network allocated data buffers can set ++ this mode bit to avoid copies. For full details on application ++ requirements to support this mode, see the 'Buffered Receives' section ++ in [`fi_msg`(3)](fi_msg.3.html). This mode bit applies to FI_MSG and ++ FI_TAGGED receive operations. ++ + # ADDRESSING FORMATS + + Multiple fabric interfaces take as input either a source or +@@ -556,7 +585,7 @@ field indicates the expected address format for these operations. + A provider may support one or more of the following addressing + formats. In some cases, a selected addressing format may need to be + translated or mapped into an address which is native to the +-fabric. See `fi_av`(3). ++fabric. See [`fi_av`(3)](fi_av.3.html). + + *FI_FORMAT_UNSPEC* + : FI_FORMAT_UNSPEC indicates that a provider specific address format +@@ -685,4 +714,5 @@ Multiple threads may call + + [`fi_open`(3)](fi_open.3.html), + [`fi_endpoint`(3)](fi_endpoint.3.html), +-[`fi_domain`(3)](fi_domain.3.html) ++[`fi_domain`(3)](fi_domain.3.html), ++[`fi_nic`(3)](fi_nic.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_hook.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_hook.7.md +new file mode 100644 +index 000000000..8ab726128 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_hook.7.md +@@ -0,0 +1,71 @@ ++--- ++layout: page ++title: fi_hook(7) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_hook \- The Hook Fabric Provider Utility ++ ++# OVERVIEW ++ ++The hooking provider is a utility function that can intercept calls to any ++provider. The hook provider is always available, but has zero impact on ++calls unless enabled. It is useful for providing performance data on ++selected calls or debugging information. ++ ++# SUPPORTED FEATURES ++ ++Hooking support is enabled through the FI_HOOK environment variable. To ++enable hooking, FI_HOOK must be set to the name of one or more of the ++available hooking providers. When multiple hooks are specified, the ++names must be separated by a semi-colon. To obtain a list of hooking ++providers available on the current system, one can use the fi_info ++utility with the '--env' command line option. Hooking providers are ++usually identified by 'hook' appearing in the provider name. ++ ++Known hooking providers include the following: ++ ++*ofi_perf_hook* ++: This hooks 'fast path' data operation calls. Performance data is ++ captured on call entrance and exit, in order to provide an average of ++ how long each call takes to complete. See the PERFORMANCE HOOKS section ++ for available performance data. ++ ++# PERFORMANCE HOOKS ++ ++The hook provider allows capturing inline performance data by accessing the ++CPU Performance Management Unit (PMU). PMU data is only available on Linux ++systems. Additionally, access to PMU data may be restricted to privileged ++(super-user) applications. ++ ++Performance data is captured for critical data transfer calls: ++fi_msg, fi_rma, fi_tagged, fi_cq, and fi_cntr. Captured data is displayed ++as logged data using the FI_LOG_LEVEL trace level. Performance data is ++logged when the associated fabric is destroyed. ++ ++The environment variable FI_PERF_CNTR is used to identify which performance ++counter is tracked. The following counters are available: ++ ++*cpu_cycles* ++: Counts the number of CPU cycles each function takes to complete. ++ ++*cpu_instr* ++: Counts the number of CPU instructions each function takes to complete. ++ This is the default performance counter if none is specified. ++ ++# LIMITATIONS ++ ++Hooking functionality is not available for providers built using the ++FI_FABRIC_DIRECT feature. That is, directly linking to a provider prevents ++hooking. ++ ++The hooking provider does not work with triggered operations. Application ++that use FI_TRIGGER operations that attempt to hook calls will likely crash. ++ ++# SEE ALSO ++ ++[`fabric`(7)](fabric.7.html), ++[`fi_provider`(7)](fi_provider.7.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mlx.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mlx.7.md +index ba3bdb59f..c6688ebad 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mlx.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mlx.7.md +@@ -49,6 +49,22 @@ Unsupported features + + # RUNTIME PARAMETERS + ++*FI_MLX_CONFIG* ++: The path to the MLX configuration file (default: none). ++ ++*FI_MLX_TINJECT_LIMIT* ++: Maximal tinject message size (default: 1024). ++ ++*FI_MLX_NS_ENABLE* ++: Enforce usage of name server functionality for MLX provider ++ (default: disabled). ++ ++*FI_MLX_NS_PORT* ++: MLX provider's name server port (default: 12345). ++ ++*FI_MLX_NS_IFACE* ++: IPv4 network interface for MLX provider's name server ++ (default: any). + + # SEE ALSO + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mr.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mr.3.md +index 7a0aaaee8..20cbcae7c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mr.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mr.3.md +@@ -361,6 +361,13 @@ this routine. Use of this call is required if the FI_RAW_MR mode bit has + been set by the provider; however, it is safe to use this call with any + memory region. + ++On input, the key_size parameter should indicate the size of the raw_key ++buffer. If the actual key is larger than what can fit into the buffer, it ++will return -FI_ETOOSMALL. On output, key_size is set to the size of the ++buffer needed to store the key, which may be larger than the input value. ++The needed key_size can also be obtained through the mr_key_size domain ++attribute (fi_domain_attr) field. ++ + A raw key must be mapped by a peer before it can be used in data transfer + operations. See fi_mr_map_raw below. + +@@ -440,6 +447,7 @@ struct fi_mr_attr { + const struct iovec *mr_iov; + size_t iov_count; + uint64_t access; ++ uint64_t offset; + uint64_t requested_key; + void *context; + size_t auth_key_size; +@@ -487,6 +495,10 @@ bitwise OR of the following flags: + : The memory buffer may be used as the target buffer of an RMA write + or atomic operation. + ++## offset ++ ++The offset field is reserved for future use and must be 0. ++ + ## requested_key + + An application specified access key associated with the memory region. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mrail.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mrail.7.md +new file mode 100644 +index 000000000..6c12cab6e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_mrail.7.md +@@ -0,0 +1,87 @@ ++--- ++layout: page ++title: fi_mrail(7) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_mrail \- The Multi-Rail Utility Provider ++ ++# OVERVIEW ++ ++The mrail provider (ofi_mrail) is an utility provider that layers over an underlying ++provider to enable the use of multiple network ports (rails). This increases ++the total available bandwidth of an underlying proivder. The current status of ++mrail provider is experimental - not all libfabric features are supported and ++performance is not guaranteed. ++ ++# REQUIREMENTS ++ ++## Requirements for underlying provider ++ ++mrail provider requires the underlying provider to support the following ++capabilities / modes: ++ ++ * Buffered receive (FI_BUFFERED_RECV) ++ ++ * FI_SOURCE ++ ++ * FI_AV_TABLE ++ ++## Requirements for applications ++ ++Applications need to: ++ * Support FI_MR_RAW MR mode bit to make use of FI_RMA capability. ++ * Set FI_OFI_MRAIL_ADDR_STRC env variable (see RUNTIME PARAMETERS section below). ++ ++# SUPPORTED FEATURES ++ ++*Endpoint types* ++: The provider supports only *FI_EP_RDM*. ++ ++*Endpoint capabilities* ++: The following data transfer interface is supported: *FI_MSG*, *FI_TAGGED*, *FI_RMA*. ++ ++# LIMITATIONS ++ ++: Limitations of the underlying provider may show up as that of mrail provider. ++: mrail provider doesn't allow pass-through of any mode bits to the underlying ++ provider. ++ ++## Unsupported features ++ ++The following are the major libfabric features that are not supported. Any other ++feature not listed in "Supported features" can be assumed as unsupported. ++ ++ * FI_ATOMIC ++ ++ * Scalable endpoints ++ ++ * Shared contexts ++ ++ * FABRIC_DIRECT ++ ++ * Multicast ++ ++ * Triggered operations ++ ++# FUNCTIONALITY OVERVIEW ++ ++For messages (FI_MSG, FI_TAGGED), the provider sends one message per rail in a ++round-robin manner. Ordering is guaranteed through the use of sequence numbers. ++For RMA, the data is striped equally across all rails. ++ ++# RUNTIME PARAMETERS ++ ++The ofi_mrail provider checks for the following environment variables. ++ ++*FI_OFI_MRAIL_ADDR_STRC* ++: Comma delimited list of individual rail addresses in FI_ADDR_STR format. ++ ++# SEE ALSO ++ ++[`fabric`(7)](fabric.7.html), ++[`fi_provider`(7)](fi_provider.7.html), ++[`fi_getinfo`(3)](fi_getinfo.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_msg.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_msg.3.md +index 146fa76f7..e12b3c13b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_msg.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_msg.3.md +@@ -90,7 +90,9 @@ ssize_t fi_injectdata(struct fid_ep *ep, const void *buf, size_t len, + : Additional flags to apply for the send or receive operation. + + *context* +-: User specified pointer to associate with the operation. ++: User specified pointer to associate with the operation. This parameter is ++ ignored if the operation will not generate a successful completion, unless ++ an op flag specifies the context parameter be used for required input. + + # DESCRIPTION + +@@ -161,7 +163,7 @@ struct fi_msg { + The send inject call is an optimized version of fi_send. The + fi_inject function behaves as if the FI_INJECT transfer flag were + set, and FI_COMPLETION were not. That is, the data buffer is +-available for reuse immediately on returning from from fi_inject, and ++available for reuse immediately on returning from fi_inject, and + no completion event will be generated for this send. The completion + event will be suppressed even if the CQ was bound without + FI_SELECTIVE_COMPLETION or the endpoint's op_flags contain +@@ -220,12 +222,24 @@ fi_sendmsg. + request. See fi_getinfo for additional details on + FI_REMOTE_CQ_DATA. + ++*FI_CLAIM* ++: Applies to posted receive operations for endpoints configured ++ for FI_BUFFERED_RECV or FI_VARIABLE_MSG. This flag is used to ++ retrieve a message that was buffered by the provider. See the ++ Buffered Receives section for details. ++ + *FI_COMPLETION* + : Indicates that a completion entry should be generated for the + specified operation. The endpoint must be bound to a completion + queue with FI_SELECTIVE_COMPLETION that corresponds to the + specified operation, or this flag is ignored. + ++*FI_DISCARD* ++: Applies to posted receive operations for endpoints configured ++ for FI_BUFFERED_RECV or FI_VARIABLE_MSG. This flag is used to ++ free a message that was buffered by the provider. See the ++ Buffered Receives section for details. ++ + *FI_MORE* + : Indicates that the user has additional requests that will + immediately be posted after the current call returns. Use of this +@@ -288,6 +302,114 @@ fi_sendmsg. + be used in all multicast transfers, in conjunction with a multicast + fi_addr_t. + ++# Buffered Receives ++ ++Buffered receives indicate that the networking layer allocates and ++manages the data buffers used to receive network data transfers. As ++a result, received messages must be copied from the network buffers ++into application buffers for processing. However, applications can ++avoid this copy if they are able to process the message in place ++(directly from the networking buffers). ++ ++Handling buffered receives differs based on the size of the message ++being sent. In general, smaller messages are passed directly to the ++application for processing. However, for large messages, an application ++will only receive the start of the message and must claim the rest. ++The details for how small messages are reported and large messages may ++be claimed are described below. ++ ++When a provider receives a message, it will write an entry to the completion ++queue associated with the receiving endpoint. For discussion purposes, ++the completion queue is assumed to be configured for FI_CQ_FORMAT_DATA. ++Since buffered receives are not associated with application posted buffers, ++the CQ entry op_context will point to a struct fi_recv_context. ++ ++{% highlight c %} ++struct fi_recv_context { ++ struct fid_ep *ep; ++ void *context; ++}; ++{% endhighlight %} ++ ++The 'ep' field will point to the receiving endpoint or Rx context, and ++'context' will be NULL. The CQ entry's 'buf' will point to a provider ++managed buffer where the start of the received message is located, and ++'len' will be set to the total size of the message. ++ ++The maximum sized message that a provider can buffer is limited by ++an FI_OPT_BUFFERED_LIMIT. This threshold can be obtained and may be adjusted ++by the application using the fi_getopt and fi_setopt calls, respectively. ++Any adjustments must be made prior to enabling the endpoint. The CQ entry 'buf' ++will point to a buffer of received data. If the sent message is larger than the ++buffered amount, the CQ entry 'flags' will have the FI_MORE bit set. When the ++FI_MORE bit is set, 'buf' will reference at least FI_OPT_BUFFERED_MIN bytes ++of data (see fi_endpoint.3 for more info). ++ ++After being notified that a buffered receive has arrived, ++applications must either claim or discard the message. Typically, ++small messages are processed and discarded, while large messages ++are claimed. However, an application is free to claim or discard any ++message regardless of message size. ++ ++To claim a message, an application must post a receive operation with the ++FI_CLAIM flag set. The struct fi_recv_context returned as part of the ++notification must be provided as the receive operation's context. The ++struct fi_recv_context contains a 'context' field. Applications may ++modify this field prior to claiming the message. When the claim ++operation completes, a standard receive completion entry will be ++generated on the completion queue. The 'context' of the associated ++CQ entry will be set to the 'context' value passed in through ++the fi_recv_context structure, and the CQ entry flags will have the ++FI_CLAIM bit set. ++ ++Buffered receives that are not claimed must be discarded by the application ++when it is done processing the CQ entry data. To discard a message, an ++application must post a receive operation with the FI_DISCARD flag set. ++The struct fi_recv_context returned as part of the notification must be ++provided as the receive operation's context. When the FI_DISCARD flag is set ++for a receive operation, the receive input buffer(s) and length parameters ++are ignored. ++ ++IMPORTANT: Buffered receives must be claimed or discarded in a timely manner. ++Failure to do so may result in increased memory usage for network buffering ++or communication stalls. Once a buffered receive has been claimed or ++discarded, the original CQ entry 'buf' or struct fi_recv_context data may no ++longer be accessed by the application. ++ ++The use of the FI_CLAIM and FI_DISCARD operation flags is also ++described with respect to tagged message transfers in fi_tagged.3. ++Buffered receives of tagged messages will include the message tag as part ++of the CQ entry, if available. ++ ++The handling of buffered receives follows all message ordering ++restrictions assigned to an endpoint. For example, completions ++may indicate the order in which received messages arrived at the ++receiver based on the endpoint attributes. ++ ++# Variable Length Messages ++ ++Variable length messages, or simply variable messages, are transfers ++where the size of the message is unknown to the receiver prior to the ++message being sent. It indicates that the recipient of a message does ++not know the amount of data to expect prior to the message arriving. ++It is most commonly used when the size of message transfers varies ++greatly, with very large messages interspersed with much smaller ++messages, making receive side message buffering difficult to manage. ++Variable messages are not subject to max message length ++restrictions (i.e. struct fi_ep_attr::max_msg_size limits), and may ++be up to the maximum value of size_t (e.g. SIZE_MAX) in length. ++ ++Variable length messages support requests that the provider allocate and ++manage the network message buffers. As a result, the application ++requirements and provider behavior is identical as those defined ++for supporting the FI_BUFFERED_RECV mode bit. See the Buffered ++Receive section above for details. The main difference is that buffered ++receives are limited by the fi_ep_attr::max_msg_size threshold, whereas ++variable length messages are not. ++ ++Support for variable messages is indicated through the FI_VARIABLE_MSG ++capability bit. ++ + # NOTES + + If an endpoint has been configured with FI_MSG_PREFIX, the application +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_nic.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_nic.3.md +new file mode 100644 +index 000000000..dcdfef98b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_nic.3.md +@@ -0,0 +1,158 @@ ++--- ++layout: page ++title: fi_nic(3) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_nic \- Fabric network interface card attributes ++ ++# NETWORK INTERFACE CARD ATTRIBUTES ++ ++The fid_nic structure defines attributes for a struct fi_info that ++is directly associated with underlying networking hardware and may ++be returned directly from calling [`fi_getinfo`(3)](fi_getinfo.3.html). ++The format of fid_nic and the related substructures are defined below. ++ ++Note that not all fields of all structures may be available. Unavailable ++or fields that are not applicable to the indicated device will be set to ++NULL or 0. ++ ++```c ++struct fid_nic { ++ struct fid fid; ++ struct fi_device_attr *device_attr; ++ struct fi_bus_attr *bus_attr; ++ struct fi_link_attr *link_attr; ++ void *prov_attr; ++}; ++ ++struct fi_device_attr { ++ char *name; ++ char *device_id; ++ char *device_version; ++ char *vendor_id; ++ char *driver; ++ char *firmware; ++}; ++ ++struct fi_pci_attr { ++ uint16_t domain_id; ++ uint8_t bus_id; ++ uint8_t device_id; ++ uint8_t function_id; ++}; ++ ++struct fi_bus_attr { ++ enum fi_bus_type bus_type; ++ union { ++ struct fi_pci_attr pci; ++ } attr; ++}; ++ ++struct fi_link_attr { ++ char *address; ++ size_t mtu; ++ size_t speed; ++ enum fi_link_state state; ++ char *network_type; ++}; ++ ++``` ++ ++## Device Attributes ++ ++Device attributes are used to identify the specific virtual or hardware ++NIC associated with an fi_info structure. ++ ++*name* ++: The operating system name associated with the device. This may be a ++ logical network interface name (e.g. eth0 or eno1) or an absolute ++ filename. ++ ++*device_id* ++: This is a vendor specific identifier for the device or product. ++ ++*device_version* ++: Indicates the version of the device. ++ ++*vendor_id* ++: Indicates the name of the vendor that distributes the NIC. ++ ++*driver* ++: The name of the driver associated with the device ++ ++*firmware* ++: The device's firmware version. ++ ++## Bus Attributes ++ ++The bus attributes are used to identify the physical location of the NIC in ++the system. ++ ++*bus_type* ++: Indicates the type of system bus where the NIC is located. Valid values ++ are FI_BUS_PCI or FI_BUS_UNKNOWN. ++ ++*attr.pci.domain_id* ++: The domain where the PCI bus is located. Valid only if bus_type is ++ FI_BUS_PCI. ++ ++*attr.pci.bus_id* ++: The PCI bus identifier where the device is located. Valid only if ++ bus_type is FI_BUS_PCI. ++ ++*attr.pci.device_id* ++: The identifier on the PCI bus where the device is located. Valid only ++ if bus_type is FI_BUS_PCI. ++ ++*attr.pci.function_id* ++: The function on the device being referenced. Valid only if bus_type is ++ FI_BUS_PCI. ++ ++## Link Attributes ++ ++Link attributes describe low-level details about the network connection ++into the fabric. ++ ++*address* ++: The primary link-level address associated with the NIC, such as a MAC ++ address. If multiple addresses are available, only one will be reported. ++ ++*mtu* ++: The maximum transfer unit of link level frames or packets, in bytes. ++ ++*speed* ++: The active link data rate, given in bits per second. ++ ++*state* ++: The current physical port state. Possible values are FI_LINK_UNKNOWN, ++ FI_LINK_DOWN, and FI_LINK_UP, to indicate if the port state is unknown ++ or not applicable (unknown), inactive (down), or active (up). ++ ++*network_type* ++: Specifies the type of network interface currently active, such as ++ Ethernet or InfiniBand. ++ ++## Provider Attributes ++ ++Provider attributes reference provider specific details of the device. ++These attributes are both provider and device specific. The attributes ++can be interpretted by [`fi_tostr`(3)](fi_tostr.3.html). Applications ++may also use the other attribute fields, such as related fi_fabric_attr: ++prov_name field, to determine an appropriate structure to cast the ++attributes. The format and definition of this field is outside the ++scope of the libfabric core framework, but may be available as part ++of a provider specific header file included with libfabric package. ++ ++# NOTES ++ ++The fid_nic structure is returned as part of a call to ++[`fi_getinfo`(3)](fi_getinfo.3.html). It is automatically freed as part ++of calling [`fi_freeinfo`(3)](fi_freeinfo.3.html) ++ ++# SEE ALSO ++ ++[`fi_getinfo`(3)](fi_getinfo.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_provider.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_provider.7.md +index f20545d12..b8e795e3e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_provider.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_provider.7.md +@@ -65,6 +65,17 @@ This distribution of libfabric contains the following providers + endpoints emulated over MSG endpoints of a core provider. + See [`fi_rxm`(7)](fi_rxm.7.html) for more information. + ++## Special providers ++ ++*Hook* ++: The hook provider is a special type of provider that can layer over any ++ other provider, unless FI_FABRIC_DIRECT is used. The hook provider is ++ always available, but has no impact unless enabled. When enabled, the ++ hook provider will intercept all calls to the underlying core or utility ++ provider(s). The hook provider is useful for capturing performance data ++ or providing debugging information, even in release builds of the library. ++ See [`fi_hook`(7)](fi_hook.7.html) for more information. ++ + # CORE VERSUS UTILITY PROVIDERS + + Core providers implement the libfabric interfaces directly over low-level +@@ -194,6 +205,7 @@ Logging is performed using the FI_ERR, FI_LOG, and FI_DEBUG macros. + # SEE ALSO + + [`fi_gni`(7)](fi_gni.7.html), ++[`fi_hook`(7)](fi_hook.7.html), + [`fi_psm`(7)](fi_psm.7.html), + [`fi_sockets`(7)](fi_sockets.7.html), + [`fi_usnic`(7)](fi_usnic.7.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_psm2.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_psm2.7.md +index f5bc4556f..fcb62c2a4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_psm2.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_psm2.7.md +@@ -194,21 +194,6 @@ The *psm2* provider checks for the following environment variables: + + The default setting is 2. + +-*FI_PSM2_LAZY_CONN* +-: Control when connections are established between PSM2 endpoints that OFI +- endpoints are built on top of. When set to 0, connections are established +- when addresses are inserted into the address vector. This is the eager +- connection mode. When set to 1, connections are established when addresses +- are used the first time in communication. This is the lazy connection mode. +- +- Lazy connection mode may reduce the start-up time on large systems at the +- expense of slightly higher data path overhead. For applications that use +- multiple endpoints, lazy connection mode can be especially helpful with +- the potential of greatly reduce the time to set up address vectors and to +- close endpoints. +- +- The default setting is 0. +- + *FI_PSM2_DISCONNECT* + : The provider has a mechanism to automatically send disconnection notifications + to all connected peers before the local endpoint is closed. As the response, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rma.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rma.3.md +index 04eca193d..1072b4fbf 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rma.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rma.3.md +@@ -101,7 +101,9 @@ ssize_t fi_inject_writedata(struct fid_ep *ep, const void *buf, size_t len, + : Additional flags to apply for the read or write operation. + + *context* +-: User specified pointer to associate with the operation. ++: User specified pointer to associate with the operation. This parameter is ++ ignored if the operation will not generate a successful completion, unless ++ an op flag specifies the context parameter be used for required input. + + # DESCRIPTION + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rstream.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rstream.7.md +new file mode 100644 +index 000000000..9b58e60fd +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rstream.7.md +@@ -0,0 +1,86 @@ ++--- ++layout: page ++title: fi_rstream(7) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_rstream ++ ++# OVERVIEW ++ ++The rstream provider supports stream messaging over ++ message based RMA. It maps stream to message over ++ a core RMA-based OFI provider. Only Endpoints and EQs ++ are needed for connection start-up and messaging. Unlike other ++ OFI providers, rstream does not support CQs or memory registration ++ of any kind. In order to asynchronously wait for a completion (cm/msg), ++ one can use fi_control on the endpoint/eq to get an fd to use in a poll call. ++ For messaging completions, use FI_PEEK on send/recv after poll to see what type of ++ transaction has transpired. ++ ++# SUPPORTED FEATURES ++ ++The rstream provider currently supports *FI_MSG* capabilities. ++ ++*Endpoint types* ++: The provider supports only endpoint type *FI_EP_SOCK_STREAM*. ++ ++*Endpoint capabilities* : The following data transfer interface is ++supported: *fi_msg*. ++ ++*Modes* ++: The provider does not require the use of any mode bits but supports ++ core providers that require FI_CONTEXT and FI_RX_CQ_DATA. ++ ++*Progress* ++: The rstream provider only supports *FI_PROGRESS_MANUAL*. ++ ++*Threading Model* ++: The provider supports FI_THREAD_SAFE ++ ++*Verbs-iWarp* ++: The provider has added features to enable iWarp. To use this feature, the ep protocol ++ IWARP must be requested in a getinfo call. ++ ++# LIMITATIONS ++ ++The rstream provider is experimental and lacks performance validation and ++ extensive testing. The iWarp protocol may need extra initialization work to re-enable. ++ Currently the rstream provider is used to by the rsockets-OFI library as a ULP and ++ hooks into the core provider verbs. It is not interoperable with the previous rsockets(v1) ++ protocol. There are default settings that limit the message stream (provider ++ memory region size and CQ size). These can be modified by fi_setopt. ++ ++ ++ ++# SETTINGS ++ ++The *rstream* provider settings can be modified via fi_setopt on the ++ endpoint (FI_OPT_ENDPOINT) along with the following parameters: ++ ++*FI_OPT_SEND_BUF_SIZE* ++: Size of the send buffer. Default is 32KB. ++ ++*FI_OPT_RECV_BUF_SIZE* ++: Size of the recv buffer. Default is 32KB. ++ ++*FI_OPT_TX_SIZE* ++: Size of the send queue. Default is 384. ++ ++*FI_OPT_RX_SIZE* ++: Size of the recv queue. Default is 384. ++ ++# OFI EXTENSIONS ++ ++The rstream provider has extended the current OFI API set in order to enable a ++ user implemenation of Poll. Specifically sendmsg(FI_PEEK) is supported which replicates ++ the behavior of the recvmsg(FI_PEEK) feature. ++ ++# SEE ALSO ++ ++[`fabric`(7)](fabric.7.html), ++[`fi_provider`(7)](fi_provider.7.html), ++[`fi_getinfo`(3)](fi_getinfo.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxd.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxd.7.md +index bfa2ca6ea..40e31cbe5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxd.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxd.7.md +@@ -16,23 +16,20 @@ emulated over a base DGRAM provider. + + # SUPPORTED FEATURES + +-The RxD provider currently supports *FI_MSG*, *FI_TAGGED* and *FI_RMA* +-capabilities. It requires the base DGRAM provider to support *FI_MSG* +-capabilities. ++The RxD provider currently supports *FI_MSG* capabilities. + + *Endpoint types* + : The provider supports only endpoint type *FI_EP_RDM*. + + *Endpoint capabilities* : The following data transfer interface is +-supported: *fi_msg*, *fi_tagged* and *fi_rma*. ++supported: *fi_msg*. + + *Modes* +-: The provider does not require the use of any mode bits. ++: The provider does not require the use of any mode bits but supports ++ core DGRAM providers that require FI_CONTEXT and FI_MSG_PREFIX. + + *Progress* +-: The RxD provider supports both *FI_PROGRESS_AUTO* and *FI_PROGRESS_MANUAL*, +- with a default set to auto. However, receive side data buffers are not +- modified outside of completion processing routines. ++: The RxD provider only supports *FI_PROGRESS_MANUAL*. + + # LIMITATIONS + +@@ -49,7 +46,21 @@ tested. + + # RUNTIME PARAMETERS + +-No runtime parameters are currently defined. ++The *rxd* provider checks for the following environment variables: ++ ++*FI_OFI_RXD_SPIN_COUNT* ++: Number of times to read the core provider's CQ for a segment completion ++ before trying to progress sends. Default is 1000. ++ ++*FI_OFI_RXD_RETRY* ++: Toggles retrying of packets and assumes reliability of individual packets ++ and will reassemble all received packets. Retrying is turned on by default. ++ ++*FI_OFI_RXD_MAX_PEERS* ++: Maximum number of peers the provider should prepare to track. Default: 1024 ++ ++*FI_OFI_RXD_MAX_UNACKED* ++: Maximum number of packets (per peer) to send at a time. Default: 128 + + # SEE ALSO + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxm.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxm.7.md +index db377a3b3..522d2bc96 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxm.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_rxm.7.md +@@ -11,31 +11,50 @@ fi_rxm \- The RxM (RDM over MSG) Utility Provider + + # OVERVIEW + +-The RxM provider (ofi_rxm) is an utility provider that supports RDM +-endpoint emulated over MSG endpoint of a core provider. ++The RxM provider (ofi_rxm) is an utility provider that supports FI_EP_RDM type ++endpoint emulated over FI_EP_MSG type endpoint(s) of an underlying core provider. ++FI_EP_RDM endpoints have a reliable unconnected messaging interface and RxM ++emulates this by hiding the connection management of underlying FI_EP_MSG ++endpoints from the user. Additionally, RxM can hide memory registration ++requirement from a core provider like verbs if the apps don't support it. + + # REQUIREMENTS + ++## Requirements for core provider ++ + RxM provider requires the core provider to support the following features: + + * MSG endpoints (FI_EP_MSG) + +- * RMA read/write (FI_RMA) ++ * RMA read/write (FI_RMA) - Used for implementing rendezvous protocol for ++ large messages. ++ ++ * FI_OPT_CM_DATA_SIZE of at least 48 bytes ++ ++## Requirements for applications + +- * FI_OPT_CM_DATA_SIZE of at least 24 bytes ++Since RxM emulates RDM endpoints by hiding connection management and connections ++are established only on-demand (when app tries to send data), the first several ++data transfer calls would return EAGAIN. Applications should be aware of this and ++retry until the operation succeeds. ++ ++If an application has chosen manual progress for data progress, it should also ++read the CQ so that the connection establishment progresses. Not doing so would ++result in a stall. See also the ERRORS section in fi_msg(3). + + # SUPPORTED FEATURES + +-The RxM provider currently supports *FI_MSG*, *FI_TAGGED* and *FI_RMA* capabilities. ++The RxM provider currently supports *FI_MSG*, *FI_TAGGED*, *FI_RMA* and *FI_ATOMIC* capabilities. + + *Endpoint types* + : The provider supports only *FI_EP_RDM*. + + *Endpoint capabilities* +-: The following data transfer interface is supported: *FI_MSG*, *FI_TAGGED*, *FI_RMA*. ++: The following data transfer interface is supported: *FI_MSG*, *FI_TAGGED*, *FI_RMA*, *FI_ATOMIC*. + + *Progress* +-: The RxM provider supports *FI_PROGRESS_AUTO*. ++: The RxM provider supports both *FI_PROGRESS_MANUAL* and *FI_PROGRESS_AUTO*. ++ The former is more optimal. + + *Addressing Formats* + : FI_SOCKADDR, FI_SOCKADDR_IN +@@ -55,8 +74,6 @@ RxM provider does not support the following features: + + * op_flags: FI_FENCE. + +- * FI_ATOMIC +- + * Scalable endpoints + + * Shared contexts +@@ -77,11 +94,22 @@ RxM provider does not support the following features: + + * Triggered operations + +-## Auto progress ++## Progress limitations + + When sending large messages, an app doing an sread or waiting on the CQ file descriptor + may not get a completion when reading the CQ after being woken up from the wait. +-The app has to do sread or wait on the file descriptor again. ++The app has to do sread or wait on the file descriptor again. This is needed ++because RxM uses a rendezvous protocol for large message sends. An app would get ++woken up from waiting on CQ fd when rendezvous protocol request completes but it ++would have to wait again to get an ACK from the receiver indicating completion of ++large message transfer by remote RMA read. ++ ++## FI_ATOMIC limitations ++ ++The FI_ATOMIC capability will only be listed in the fi_info if the fi_info ++hints parameter specifies FI_ATOMIC. If FI_ATOMIC is requested, message order ++FI_ORDER_RAR, FI_ORDER_RAW, FI_ORDER_WAR, FI_ORDER_WAW, FI_ORDER_SAR, and ++FI_ORDER_SAW can not be supported. + + # RUNTIME PARAMETERS + +@@ -90,13 +118,22 @@ The ofi_rxm provider checks for the following environment variables. + *FI_OFI_RXM_BUFFER_SIZE* + : Defines the transmit buffer size / inject size. Messages of size less than this + would be transmitted via an eager protocol and those above would be transmitted +- via a rendezvous protocol. Transmit data would be copied up to this size +- (default: ~16k). ++ via a rendezvous or SAR (Segmentation And Reassembly) protocol. Transmit data ++ would be copied up to this size (default: ~16k). + + *FI_OFI_RXM_COMP_PER_PROGRESS* + : Defines the maximum number of MSG provider CQ entries (default: 1) that would + be read per progress (RxM CQ read). + ++*FI_OFI_RXM_SAR_LIMIT* ++: Set this environment variable to control the RxM SAR (Segmentation And Reassembly) ++ protocol. Messages of size greater than this (default: 256 Kb) would be transmitted ++ via rendezvous protocol. ++ ++*FI_OFI_RXM_USE_SRX* ++: Set this to 1 to use shared receive context from MSG provider. This reduces ++ overall memory usage but there may be a slight increase in latency (default: 0). ++ + *FI_OFI_RXM_TX_SIZE* + : Defines default TX context size (default: 1024) + +@@ -122,12 +159,21 @@ FI_OFI_RXM_TX_SIZE, FI_OFI_RXM_RX_SIZE, FI_OFI_RXM_MSG_TX_SIZE, FI_OFI_RXM_MSG_R + subject to memory limits of the system and the tx and rx sizes supported by the + MSG provider. + ++FI_OFI_RXM_SAR_LIMIT is another knob that can be experimented with to optimze for ++bandwidth. ++ + ## Memory + + To conserve memory, ensure FI_UNIVERSE_SIZE set to what is required. Similarly + check that FI_OFI_RXM_TX_SIZE, FI_OFI_RXM_RX_SIZE, FI_OFI_RXM_MSG_TX_SIZE and + FI_OFI_RXM_MSG_RX_SIZE env variables are set to only required values. + ++# NOTES ++ ++The data transfer API may return -FI_EAGAIN during on-demand connection setup ++of the core provider FI_MSG_EP. See [`fi_msg`(3)](fi_msg.3.html) for a detailed ++description of handling FI_EAGAIN. ++ + # SEE ALSO + + [`fabric`(7)](fabric.7.html), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_sockets.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_sockets.7.md +index 66041d2a6..a75c1cb94 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_sockets.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_sockets.7.md +@@ -60,6 +60,9 @@ The sockets provider checks for the following environment variables - + *FI_SOCKETS_PE_WAITTIME* + : An integer value that specifies how many milliseconds to spin while waiting for progress in *FI_PROGRESS_AUTO* mode. + ++*FI_SOCKETS_CONN_TIMEOUT* ++: An integer value that specifies how many milliseconds to wait for one connection establishment. ++ + *FI_SOCKETS_MAX_CONN_RETRY* + : An integer value that specifies the number of socket connection retries before reporting as failure. + +@@ -93,6 +96,9 @@ The sockets provider checks for the following environment variables - + *FI_SOCKETS_KEEPALIVE_PROBES* + : An integer to specify the maximum number of keepalive probes sent before dropping the connection. Only relevant if *FI_SOCKETS_KEEPALIVE_ENABLE* is enabled. + ++*FI_SOCKETS_IFACE* ++: The prefix or the name of the network interface (default: any) ++ + # LARGE SCALE JOBS + + For large scale runs one can use these environment variables to set the default parameters e.g. size of the address vector(AV), completion queue (CQ), connection map etc. that satisfies the requirement of the particular benchmark. The recommended parameters for large scale runs are *FI_SOCKETS_MAX_CONN_RETRY*, *FI_SOCKETS_DEF_CONN_MAP_SZ*, *FI_SOCKETS_DEF_AV_SZ*, *FI_SOCKETS_DEF_CQ_SZ*, *FI_SOCKETS_DEF_EQ_SZ*. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tagged.3.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tagged.3.md +index 2bddfe08d..d6c3d54bf 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tagged.3.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tagged.3.md +@@ -97,7 +97,9 @@ ssize_t fi_tinjectdata(struct fid_ep *ep, const void *buf, size_t len, + : Additional flags to apply for the send or receive operation. + + *context* +-: User specified pointer to associate with the operation. ++: User specified pointer to associate with the operation. This parameter is ++ ignored if the operation will not generate a successful completion, unless ++ an op flag specifies the context parameter be used for required input. + + # DESCRIPTION + +@@ -184,7 +186,7 @@ struct fi_msg_tagged { + The tagged inject call is an optimized version of fi_tsend. The + fi_tinject function behaves as if the FI_INJECT transfer flag were + set, and FI_COMPLETION were not. That is, the data buffer is +-available for reuse immediately on returning from from fi_tinject, and ++available for reuse immediately on returning from fi_tinject, and + no completion event will be generated for this send. The completion + event will be suppressed even if the endpoint has not been configured + with FI_SELECTIVE_COMPLETION. See the flags discussion below for more +@@ -268,6 +270,11 @@ and/or fi_tsendmsg. + generated until the operation has been successfully transmitted and + is no longer being tracked by the provider. + ++*FI_MATCH_COMPLETE* ++: Applies to fi_tsendmsg. Indicates that a completion should be generated ++ only after the message has either been matched with a tagged ++ buffer or was discarded by the target application. ++ + *FI_FENCE* + : Applies to transmits. Indicates that the requested operation, also + known as the fenced operation, and any operation posted after the +@@ -323,21 +330,73 @@ The following flags may be used with fi_trecvmsg. + set is used to retrieve a previously claimed message. + + In order to use the FI_CLAIM flag, an application must supply a struct +- fi_context structure as the context for the receive operation. The same ++ fi_context structure as the context for the receive operation, or a ++ struct fi_recv_context in the case of buffered receives. The same + fi_context structure used for an FI_PEEK + FI_CLAIM operation must be used + by the paired FI_CLAIM request. + ++ This flag also applies to endpoints configured for FI_BUFFERED_RECV or ++ FI_VARIABLE_MSG. When set, it is used to retrieve a tagged message that ++ was buffered by the provider. See Buffered Tagged Receives section for ++ details. ++ + *FI_DISCARD* +-: This flag must be used in conjunction with either FI_PEEK or FI_CLAIM. ++: This flag may be used in conjunction with either FI_PEEK or FI_CLAIM. + If this flag is used in conjunction with FI_PEEK, it indicates if the + peek request completes successfully -- indicating that a matching message + was located -- the message is discarded by the provider, as the data is not + needed by the application. This flag may also be used in conjunction with +- FI_CLAIM in order to retrieve and discard a message previously claimed ++ FI_CLAIM in order to discard a message previously claimed + using an FI_PEEK + FI_CLAIM request. + ++ This flag also applies to endpoints configured for FI_BUFFERED_RECV or ++ FI_VARIABLE_MSG. When set, it indicates that the provider should free ++ a buffered messages. See Buffered Tagged Receives section for details. ++ + If this flag is set, the input buffer(s) and length parameters are ignored. + ++# Buffered Tagged Receives ++ ++See [`fi_msg`(3)](fi_msg.3.html) for an introduction to buffered receives. ++The handling of buffered receives differs between fi_msg operations and ++fi_tagged. Although the provider is responsible for allocating and ++managing network buffers, the application is responsible for identifying ++the tags that will be used to match incoming messages. The provider ++handles matching incoming receives to the application specified tags. ++ ++When FI_BUFFERED_RECV is enabled, the application posts the tags that ++will be used for matching purposes. Tags are posted using fi_trecv, ++fi_trecvv, and fi_trecvmsg; however, parameters related ++to the input buffers are ignored (e.g. buf, len, iov, desc). When ++a provider receives a message for which there is a matching tag, ++it will write an entry to the completion queue associated with the ++receiving endpoint. ++ ++For discussion purposes, the completion queue is assumed to be configured ++for FI_CQ_FORMAT_TAGGED. The op_context field will point to a struct ++fi_recv_contex. ++ ++{% highlight c %} ++struct fi_recv_context { ++ struct fid_ep *ep; ++ void *context; ++}; ++{% endhighlight %} ++ ++The 'ep' field will be NULL. The 'context' field will match the ++application context specified when posting the tag. Other fields are ++set as defined in [`fi_msg`(3)](fi_msg.3.html). ++ ++After being notified that a buffered receive has arrived, ++applications must either claim or discard the message as described in ++[`fi_msg`(3)](fi_msg.3.html). ++ ++# Variable Length Tagged Messages ++ ++Variable length messages are defined in [`fi_msg`(3)](fi_msg.3.html). ++The requirements for handling variable length tagged messages is identical ++to those defined above for buffered tagged receives. ++ + # RETURN VALUE + + The tagged send and receive calls return 0 on success. On error, a +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tcp.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tcp.7.md +new file mode 100644 +index 000000000..99f122d05 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_tcp.7.md +@@ -0,0 +1,45 @@ ++--- ++layout: page ++title: fi_tcp(7) ++tagline: Libfabric Programmer's Manual ++--- ++{% include JB/setup %} ++ ++# NAME ++ ++fi_tcp \- The msg sockets Fabric Provider ++ ++# OVERVIEW ++ ++The tcp provider can be used on any system that supports TCP sockets. The ++provider is not intended to provide performance improvements over regular ++TCP sockets, but rather to allow developers to write, test,and debug ++application code even on platforms that do not have high-performance ++fabric hardware. ++ ++# SUPPORTED FEATURES ++ ++The following features are supported ++ ++*Endpoint types* ++: *FI_EP_MSG* is the only supported endpoint type. Reliable ++datagram endpoint over TCP sockets can be achieved by layering RxM over ++tcp provider. ++ ++*Endpoint capabilities* ++: The tcp provider currently supports *FI_MSG*, *FI_RMA* ++ ++*Progress* ++: Currently tcp provider supports only *FI_PROGRESS_MANUAL* ++ ++# LIMITATIONS ++ ++tcp provider is implemented over TCP sockets to emulate libfabric API. Hence ++the performance is lower than what an application might see implementing to ++sockets directly. ++ ++# SEE ALSO ++ ++[`fabric`(7)](fabric.7.html), ++[`fi_provider`(7)](fi_provider.7.html), ++[`fi_getinfo`(3)](fi_getinfo.3.html) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_verbs.7.md b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_verbs.7.md +index d9ce6efd8..a8b3bf010 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/fi_verbs.7.md ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/fi_verbs.7.md +@@ -159,6 +159,10 @@ The support for fork in the provider has the following limitations: + marks the entire page that a memory region belongs to as not to be re-mapped + when the process is forked (MADV_DONTFORK). + ++### XRC Transport ++The XRC transport is intended to be used when layered with the RXM provider and ++requires the use of shared receive contexts. See [`fi_rxm`(7)](fi_rxm.7.thml). ++ + # RUNTIME PARAMETERS + + The verbs provider checks for the following environment variables. +@@ -203,6 +207,9 @@ The verbs provider checks for the following environment variables. + *FI_VERBS_MR_MAX_CACHED_SIZE* + : Maximum total size of cache entries (default: 4 GB) + ++*FI_VERBS_PREFER_XRC* ++: Prioritize XRC transport fi_info before RC transport fi_info (default: 0, RC fi_info will be before XRC fi_info) ++ + ### Variables specific to RDM (internal - deprecated) endpoints + + *FI_VERBS_RDM_BUFFER_NUM* +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_info.1 b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_info.1 +index 8f55ab2bf..f878e4742 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_info.1 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_info.1 +@@ -1,4 +1,7 @@ +-.TH "fi_info" "1" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_info" "1" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_info \- Simple utility to query for fabric interfaces +@@ -21,59 +24,90 @@ If no filters are specified, then all available fabric interfaces for + all providers and endpoint types will be returned. + .SH OPTIONS + .SS Filtering +-.PP +-\f[I]\-n, \-\-node=\f[] : Node name or address used to filter +-interfaces. ++.TP ++.B \f[I]\-n, \-\-node=\f[] ++Node name or address used to filter interfaces. + Only interfaces which can reach the given node or address will respond. +-.PP +-\f[I]\-P, \-\-port=\f[] : Port number used to filter interfaces. +-.PP +-\f[I]\-c, \-\-caps=..\f[] : Pipe separated list of +-capabilities used to filter interfaces. ++.RS ++.RE ++.TP ++.B \f[I]\-P, \-\-port=\f[] ++Port number used to filter interfaces. ++.RS ++.RE ++.TP ++.B \f[I]\-c, \-\-caps=..\f[] ++Pipe separated list of capabilities used to filter interfaces. + Only interfaces supporting all of the given capabilities will respond. + For more information on capabilities, see fi_getinfo(3). +-.PP +-\f[I]\-m, \-\-mode=..\f[] : Pipe separated list of modes used +-to filter interfaces. ++.RS ++.RE ++.TP ++.B \f[I]\-m, \-\-mode=..\f[] ++Pipe separated list of modes used to filter interfaces. + Only interfaces supporting all of the given modes will respond. + For more information on, modes see fi_getinfo(3). +-.PP +-\f[I]\-t, \-\-ep_type=\f[] : Specifies the type of fabric +-interface communication desired. ++.RS ++.RE ++.TP ++.B \f[I]\-t, \-\-ep_type=\f[] ++Specifies the type of fabric interface communication desired. + For example, specifying FI_EP_DGRAM would return only interfaces which + support unreliable datagram. + For more information on endpoint types, see fi_endpoint(3). +-.PP +-\f[I]\-a, \-\-addr_format=\f[] : Filter fabric interfaces by their +-address format. ++.RS ++.RE ++.TP ++.B \f[I]\-a, \-\-addr_format=\f[] ++Filter fabric interfaces by their address format. + For example, specifying FI_SOCKADDR_IN would return only interfaces + which use sockaddr_in structures for addressing. + For more information on address formats, see fi_getinfo(3). +-.PP +-\f[I]\-p, \-\-provider=\f[] : Filter fabric interfaces by the +-provider implementation. ++.RS ++.RE ++.TP ++.B \f[I]\-p, \-\-provider=\f[] ++Filter fabric interfaces by the provider implementation. + For a list of providers, see the \f[C]\-\-list\f[] option. +-.PP +-\f[I]\-d, \-\-domain=\f[] : Filter interfaces to only those with +-the given domain name. +-.PP +-\f[I]\-f, \-\-fabric=\f[] : Filter interfaces to only those with +-the given fabric name. ++.RS ++.RE ++.TP ++.B \f[I]\-d, \-\-domain=\f[] ++Filter interfaces to only those with the given domain name. ++.RS ++.RE ++.TP ++.B \f[I]\-f, \-\-fabric=\f[] ++Filter interfaces to only those with the given fabric name. ++.RS ++.RE + .SS Discovery +-.PP +-\f[I]\-e, \-\-env\f[] : List libfabric related environment levels which +-can be used to enable extra configuration or tuning. +-.PP +-\f[I]\-l, \-\-list\f[] : List available libfabric providers. +-.PP +-\f[I]\-v, \-\-verbose\f[] : By default, fi_info will display a summary +-of each of the interfaces discovered. ++.TP ++.B \f[I]\-e, \-\-env\f[] ++List libfabric related environment levels which can be used to enable ++extra configuration or tuning. ++.RS ++.RE ++.TP ++.B \f[I]\-l, \-\-list\f[] ++List available libfabric providers. ++.RS ++.RE ++.TP ++.B \f[I]\-v, \-\-verbose\f[] ++By default, fi_info will display a summary of each of the interfaces ++discovered. + If the verbose option is enabled, then all of the contents of the + fi_info structure are displayed. + For more information on the data contained in the fi_info structure, see + fi_getinfo(3). +-.PP +-\f[I]\-\-version\f[] : Display versioning information. ++.RS ++.RE ++.TP ++.B \f[I]\-\-version\f[] ++Display versioning information. ++.RS ++.RE + .SH USAGE EXAMPLES + .IP + .nf +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_pingpong.1 b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_pingpong.1 +index e64fb8d6a..c9b859c54 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_pingpong.1 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_pingpong.1 +@@ -1,4 +1,7 @@ +-.TH "fi_pingpong" "1" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_pingpong" "1" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_pingpong \- Quick and simple pingpong test for libfabric +@@ -55,44 +58,72 @@ be specified on the server. + If both the server and client specify the \f[C]\-d\f[] option and the + given domains cannot communicate, then the application will fail. + .SS Control Messaging +-.PP +-\f[I]\-B \f[] : The non\-default source port number of the +-control socket. ++.TP ++.B \f[I]\-B \f[] ++The non\-default source port number of the control socket. + If this is not provided then the server will bind to port 47592 by + default and the client will allow the port to be selected automatically. +-.PP +-\f[I]\-P \f[] : The non\-default destination port number of +-the control socket. ++.RS ++.RE ++.TP ++.B \f[I]\-P \f[] ++The non\-default destination port number of the control socket. + If this is not provided then the client will connect to 47592 by + default. + The server ignores this option. ++.RS ++.RE + .SS Fabric Filtering +-.PP +-\f[I]\-p \f[] : The name of the underlying fabric +-provider (e.g., sockets, psm, usnic, etc.). ++.TP ++.B \f[I]\-p \f[] ++The name of the underlying fabric provider (e.g., sockets, psm, usnic, ++etc.). + If a provider is not specified via the \-p switch, the test will pick + one from the list of available providers (as returned by fi_getinfo(3)). +-.PP +-\f[I]\-e \f[] : The type of endpoint to be used for data +-messaging between the two processes. ++.RS ++.RE ++.TP ++.B \f[I]\-e \f[] ++The type of endpoint to be used for data messaging between the two ++processes. + Supported values are dgram, rdm, and msg. + For more information on endpoint types, see fi_endpoint(3). +-.PP +-\f[I]\-d \f[] : The name of the specific domain to be used. ++.RS ++.RE ++.TP ++.B \f[I]\-d \f[] ++The name of the specific domain to be used. ++.RS ++.RE + .SS Test Options +-.PP +-\f[I]\-I \f[] : The number of iterations of the test will run. +-.PP +-\f[I]\-S \f[] : The specific size of the message in bytes the +-test will use or \[aq]all\[aq] to run all the default sizes. +-.PP +-\f[I]\-c\f[] : Activate data integrity checks at the receiver (note: +-this will degrade performance). ++.TP ++.B \f[I]\-I \f[] ++The number of iterations of the test will run. ++.RS ++.RE ++.TP ++.B \f[I]\-S \f[] ++The specific size of the message in bytes the test will use or ++\[aq]all\[aq] to run all the default sizes. ++.RS ++.RE ++.TP ++.B \f[I]\-c\f[] ++Activate data integrity checks at the receiver (note: this will degrade ++performance). ++.RS ++.RE + .SS Utility +-.PP +-\f[I]\-v\f[] : Activate output debugging (warning: highly verbose) +-.PP +-\f[I]\-h\f[] : Displays help output for the pingpong test. ++.TP ++.B \f[I]\-v\f[] ++Activate output debugging (warning: highly verbose) ++.RS ++.RE ++.TP ++.B \f[I]\-h\f[] ++Displays help output for the pingpong test. ++.RS ++.RE + .SH USAGE EXAMPLES + .SS A simple example + .SS Server: \f[C]fi_pingpong\ \-p\ \f[] +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_strerror.1 b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_strerror.1 +index f5ebedc4c..f2f8676b3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_strerror.1 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man1/fi_strerror.1 +@@ -1,4 +1,7 @@ +-.TH "fi_strerror" "1" "2016\-06\-30" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_strerror" "1" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_strerror \- display libfabric error strings +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_atomic.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_atomic.3 +index 4724d892e..063d20c22 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_atomic.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_atomic.3 +@@ -1,17 +1,27 @@ +-.TH "fi_atomic" "3" "2017\-09\-25" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_atomic" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_atomic \- Remote atomic functions +-.PP +-fi_atomic / fi_atomicv / fi_atomicmsg / fi_inject_atomic : Initiates an +-atomic operation to remote memory +-.PP +-fi_fetch_atomic / fi_fetch_atomicv / fi_fetch_atomicmsg : Initiates an +-atomic operation to remote memory, retrieving the initial value. +-.PP +-fi_compare_atomic / fi_compare_atomicv / fi_compare_atomicmsg : ++.TP ++.B fi_atomic / fi_atomicv / fi_atomicmsg / fi_inject_atomic ++Initiates an atomic operation to remote memory ++.RS ++.RE ++.TP ++.B fi_fetch_atomic / fi_fetch_atomicv / fi_fetch_atomicmsg ++Initiates an atomic operation to remote memory, retrieving the initial ++value. ++.RS ++.RE ++.TP ++.B fi_compare_atomic / fi_compare_atomicv / fi_compare_atomicmsg + Initiates an atomic compare\-operation to remote memory, retrieving the + initial value. ++.RS ++.RE + .PP + fi_atomicvalid / fi_fetch_atomicvalid / fi_compare_atomicvalid / + fi_query_atomic : Indicates if a provider supports a specific atomic +@@ -89,46 +99,88 @@ int\ fi_query_atomic(struct\ fid_domain\ *domain, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]ep\f[] : Fabric endpoint on which to initiate atomic operation. +-.PP +-\f[I]buf\f[] : Local data buffer that specifies first operand of atomic +-operation +-.PP +-\f[I]iov / comparev / resultv\f[] : Vectored data buffer(s). +-.PP +-\f[I]count / compare_count / result_count\f[] : Count of vectored data +-entries. ++.TP ++.B \f[I]ep\f[] ++Fabric endpoint on which to initiate atomic operation. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Local data buffer that specifies first operand of atomic operation ++.RS ++.RE ++.TP ++.B \f[I]iov / comparev / resultv\f[] ++Vectored data buffer(s). ++.RS ++.RE ++.TP ++.B \f[I]count / compare_count / result_count\f[] ++Count of vectored data entries. + The number of elements referenced, where each element is the indicated + datatype. +-.PP +-\f[I]addr\f[] : Address of remote memory to access. +-.PP +-\f[I]key\f[] : Protection key associated with the remote memory. +-.PP +-\f[I]datatype\f[] : Datatype associated with atomic operands +-.PP +-\f[I]op\f[] : Atomic operation to perform +-.PP +-\f[I]compare\f[] : Local compare buffer, containing comparison data. +-.PP +-\f[I]result\f[] : Local data buffer to store initial value of remote +-buffer +-.PP +-\f[I]desc / compare_desc / result_desc\f[] : Data descriptor associated +-with the local data buffer, local compare buffer, and local result +-buffer, respectively. +-.PP +-\f[I]dest_addr\f[] : Destination address for connectionless atomic +-operations. ++.RS ++.RE ++.TP ++.B \f[I]addr\f[] ++Address of remote memory to access. ++.RS ++.RE ++.TP ++.B \f[I]key\f[] ++Protection key associated with the remote memory. ++.RS ++.RE ++.TP ++.B \f[I]datatype\f[] ++Datatype associated with atomic operands ++.RS ++.RE ++.TP ++.B \f[I]op\f[] ++Atomic operation to perform ++.RS ++.RE ++.TP ++.B \f[I]compare\f[] ++Local compare buffer, containing comparison data. ++.RS ++.RE ++.TP ++.B \f[I]result\f[] ++Local data buffer to store initial value of remote buffer ++.RS ++.RE ++.TP ++.B \f[I]desc / compare_desc / result_desc\f[] ++Data descriptor associated with the local data buffer, local compare ++buffer, and local result buffer, respectively. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr\f[] ++Destination address for connectionless atomic operations. + Ignored for connected endpoints. +-.PP +-\f[I]msg\f[] : Message descriptor for atomic operations +-.PP +-\f[I]flags\f[] : Additional flags to apply for the atomic operation +-.PP +-\f[I]context\f[] : User specified pointer to associate with the +-operation. ++.RS ++.RE ++.TP ++.B \f[I]msg\f[] ++Message descriptor for atomic operations ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply for the atomic operation ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified pointer to associate with the operation. ++This parameter is ignored if the operation will not generate a ++successful completion, unless an op flag specifies the context parameter ++be used for required input. ++.RS ++.RE + .SH DESCRIPTION + .PP + Atomic transfers are used to read and update data located in remote +@@ -149,40 +201,73 @@ Atomic functions may operate on one of the following identified data + types. + A given atomic function may support any datatype, subject to provider + implementation constraints. +-.PP +-\f[I]FI_INT8\f[] : Signed 8\-bit integer. +-.PP +-\f[I]FI_UINT8\f[] : Unsigned 8\-bit integer. +-.PP +-\f[I]FI_INT16\f[] : Signed 16\-bit integer. +-.PP +-\f[I]FI_UINT16\f[] : Unsigned 16\-bit integer. +-.PP +-\f[I]FI_INT32\f[] : Signed 32\-bit integer. +-.PP +-\f[I]FI_UINT32\f[] : Unsigned 32\-bit integer. +-.PP +-\f[I]FI_INT64\f[] : Signed 64\-bit integer. +-.PP +-\f[I]FI_UINT64\f[] : Unsigned 64\-bit integer. +-.PP +-\f[I]FI_FLOAT\f[] : A single\-precision floating point value (IEEE 754). +-.PP +-\f[I]FI_DOUBLE\f[] : A double\-precision floating point value (IEEE +-754). +-.PP +-\f[I]FI_FLOAT_COMPLEX\f[] : An ordered pair of single\-precision +-floating point values (IEEE 754), with the first value representing the +-real portion of a complex number and the second representing the +-imaginary portion. +-.PP +-\f[I]FI_DOUBLE_COMPLEX\f[] : An ordered pair of double\-precision +-floating point values (IEEE 754), with the first value representing the +-real portion of a complex number and the second representing the +-imaginary portion. +-.PP +-\f[I]FI_LONG_DOUBLE\f[] : A double\-extended precision floating point +-value (IEEE 754). ++.TP ++.B \f[I]FI_INT8\f[] ++Signed 8\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_UINT8\f[] ++Unsigned 8\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_INT16\f[] ++Signed 16\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_UINT16\f[] ++Unsigned 16\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_INT32\f[] ++Signed 32\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_UINT32\f[] ++Unsigned 32\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_INT64\f[] ++Signed 64\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_UINT64\f[] ++Unsigned 64\-bit integer. ++.RS ++.RE ++.TP ++.B \f[I]FI_FLOAT\f[] ++A single\-precision floating point value (IEEE 754). ++.RS ++.RE ++.TP ++.B \f[I]FI_DOUBLE\f[] ++A double\-precision floating point value (IEEE 754). ++.RS ++.RE ++.TP ++.B \f[I]FI_FLOAT_COMPLEX\f[] ++An ordered pair of single\-precision floating point values (IEEE 754), ++with the first value representing the real portion of a complex number ++and the second representing the imaginary portion. ++.RS ++.RE ++.TP ++.B \f[I]FI_DOUBLE_COMPLEX\f[] ++An ordered pair of double\-precision floating point values (IEEE 754), ++with the first value representing the real portion of a complex number ++and the second representing the imaginary portion. ++.RS ++.RE ++.TP ++.B \f[I]FI_LONG_DOUBLE\f[] ++A double\-extended precision floating point value (IEEE 754). + Note that the size of a long double and number of bits used for + precision is compiler, platform, and/or provider specific. + Developers that use long double should ensure that libfabric is built +@@ -190,11 +275,15 @@ using a long double format that is compatible with their application, + and that format is supported by the provider. + The mechanism used for this validation is currently beyond the scope of + the libfabric API. +-.PP +-\f[I]FI_LONG_DOUBLE_COMPLEX\f[] : An ordered pair of double\-extended +-precision floating point values (IEEE 754), with the first value +-representing the real portion of a complex number and the second +-representing the imaginary portion. ++.RS ++.RE ++.TP ++.B \f[I]FI_LONG_DOUBLE_COMPLEX\f[] ++An ordered pair of double\-extended precision floating point values ++(IEEE 754), with the first value representing the real portion of a ++complex number and the second representing the imaginary portion. ++.RS ++.RE + .SS Atomic Operations + .PP + The following atomic operations are defined. +@@ -203,8 +292,11 @@ memory buffer and source value provided with the atomic function. + It may also carry source data to replace the target value in compare and + swap operations. + A conceptual description of each operation is provided. +-.PP +-\f[I]FI_MIN\f[] : Minimum ++.TP ++.B \f[I]FI_MIN\f[] ++Minimum ++.RS ++.RE + .IP + .nf + \f[C] +@@ -212,8 +304,11 @@ if\ (buf[i]\ <\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_MAX\f[] : Maximum ++.TP ++.B \f[I]FI_MAX\f[] ++Maximum ++.RS ++.RE + .IP + .nf + \f[C] +@@ -221,88 +316,121 @@ if\ (buf[i]\ >\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_SUM\f[] : Sum ++.TP ++.B \f[I]FI_SUM\f[] ++Sum ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ +\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_PROD\f[] : Product ++.TP ++.B \f[I]FI_PROD\f[] ++Product ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ *\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_LOR\f[] : Logical OR ++.TP ++.B \f[I]FI_LOR\f[] ++Logical OR ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ (addr[i]\ ||\ buf[i]) + \f[] + .fi +-.PP +-\f[I]FI_LAND\f[] : Logical AND ++.TP ++.B \f[I]FI_LAND\f[] ++Logical AND ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ (addr[i]\ &&\ buf[i]) + \f[] + .fi +-.PP +-\f[I]FI_BOR\f[] : Bitwise OR ++.TP ++.B \f[I]FI_BOR\f[] ++Bitwise OR ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ |\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_BAND\f[] : Bitwise AND ++.TP ++.B \f[I]FI_BAND\f[] ++Bitwise AND ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ &\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_LXOR\f[] : Logical exclusive\-OR (XOR) ++.TP ++.B \f[I]FI_LXOR\f[] ++Logical exclusive\-OR (XOR) ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ ((addr[i]\ &&\ !buf[i])\ ||\ (!addr[i]\ &&\ buf[i])) + \f[] + .fi +-.PP +-\f[I]FI_BXOR\f[] : Bitwise exclusive\-OR (XOR) ++.TP ++.B \f[I]FI_BXOR\f[] ++Bitwise exclusive\-OR (XOR) ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ addr[i]\ ^\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_ATOMIC_READ\f[] : Read data atomically ++.TP ++.B \f[I]FI_ATOMIC_READ\f[] ++Read data atomically ++.RS ++.RE + .IP + .nf + \f[C] + result[i]\ =\ addr[i] + \f[] + .fi +-.PP +-\f[I]FI_ATOMIC_WRITE\f[] : Write data atomically ++.TP ++.B \f[I]FI_ATOMIC_WRITE\f[] ++Write data atomically ++.RS ++.RE + .IP + .nf + \f[C] + addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP\f[] : Compare values and if equal swap with data ++.TP ++.B \f[I]FI_CSWAP\f[] ++Compare values and if equal swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -310,8 +438,11 @@ if\ (compare[i]\ ==\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_NE\f[] : Compare values and if not equal swap with data ++.TP ++.B \f[I]FI_CSWAP_NE\f[] ++Compare values and if not equal swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -319,9 +450,11 @@ if\ (compare[i]\ !=\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_LE\f[] : Compare values and if less than or equal swap +-with data ++.TP ++.B \f[I]FI_CSWAP_LE\f[] ++Compare values and if less than or equal swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -329,8 +462,11 @@ if\ (compare[i]\ <=\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_LT\f[] : Compare values and if less than swap with data ++.TP ++.B \f[I]FI_CSWAP_LT\f[] ++Compare values and if less than swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -338,9 +474,11 @@ if\ (compare[i]\ <\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_GE\f[] : Compare values and if greater than or equal swap +-with data ++.TP ++.B \f[I]FI_CSWAP_GE\f[] ++Compare values and if greater than or equal swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -348,8 +486,11 @@ if\ (compare[i]\ >=\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_CSWAP_GT\f[] : Compare values and if greater than swap with data ++.TP ++.B \f[I]FI_CSWAP_GT\f[] ++Compare values and if greater than swap with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -357,8 +498,11 @@ if\ (compare[i]\ >\ addr[i]) + \ \ \ \ addr[i]\ =\ buf[i] + \f[] + .fi +-.PP +-\f[I]FI_MSWAP\f[] : Swap masked bits with data ++.TP ++.B \f[I]FI_MSWAP\f[] ++Swap masked bits with data ++.RS ++.RE + .IP + .nf + \f[C] +@@ -523,19 +667,33 @@ The count attribute field is as defined for the atomic valid calls. + The size field indicates the size in bytes of the atomic datatype. + .SS Completions + .PP +-Completed atomic operations are reported to the user through one or more +-event collectors associated with the endpoint. +-Users provide context which are associated with each operation, and is +-returned to the user as part of the event completion. ++Completed atomic operations are reported to the initiator of the request ++through an associated completion queue or counter. ++Any user provided context specified with the request will be returned as ++part of any completion event written to a CQ. + See fi_cq for completion event details. + .PP +-Updates to the target buffer of an atomic operation are visible to +-processes running on the target system either after a completion has +-been generated, or after the completion of an operation initiated after +-the atomic call with a fencing operation occurring in between. +-For example, the target process may be notified by the initiator sending +-a message after the atomic call completes, or sending a fenced message +-immediately after initiating the atomic operation. ++Any results returned to the initiator as part of an atomic operation ++will be available prior to a completion event being generated. ++This will be true even if the requested completion semantic provides a ++weaker guarantee. ++That is, atomic fetch operations have FI_DELIVERY_COMPLETE semantics. ++Completions generated for other types of atomic operations indicate that ++it is safe to re\-use the source data buffers. ++.PP ++Any updates to data at the target of an atomic operation will be visible ++to processes running on the target node prior to one of the following ++occurring. ++If the atomic operation generates a completion event or updates a ++completion counter at the target endpoint, the results will be available ++prior to the completion notification. ++After processing a completion for the atomic, if the initiator submits a ++transfer between the same endpoints that generates a completion at the ++target, the results will be available prior to the subsequent ++transfer\[aq]s event. ++Or, if a fenced data transfer from the initiator follows the atomic ++request, the results will be available prior to a completion at the ++target for the fenced transfer. + .SH FLAGS + .PP + The fi_atomicmsg, fi_fetch_atomicmsg, and fi_compare_atomicmsg calls +@@ -545,58 +703,83 @@ Flags specified with atomic message operations override most flags + previously configured with the endpoint, except where noted (see + fi_control). + The following list of flags are usable with atomic message calls. +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for the specified operation. ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for the specified ++operation. + The endpoint must be bound to a completion queue with + FI_SELECTIVE_COMPLETION that corresponds to the specified operation, or + this flag is ignored. +-.PP +-\f[I]FI_MORE\f[] : Indicates that the user has additional requests that +-will immediately be posted after the current call returns. ++.RS ++.RE ++.TP ++.B \f[I]FI_MORE\f[] ++Indicates that the user has additional requests that will immediately be ++posted after the current call returns. + Use of this flag may improve performance by enabling the provider to + optimize its access to the fabric hardware. +-.PP +-\f[I]FI_INJECT\f[] : Indicates that the outbound non\-const data buffers +-(buf and compare parameters) should be returned to user immediately +-after the call returns, even if the operation is handled asynchronously. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT\f[] ++Indicates that the control of constant data buffers should be returned ++to the user immediately after the call returns, even if the operation is ++handled asynchronously. + This may require that the underlying provider implementation copy the + data into a local buffer and transfer out of that buffer. +-The use of output result buffers are not affected by this flag. ++Constant data buffers refers to any data buffer or iovec used by the ++atomic APIs that are marked as \[aq]const\[aq]. ++Non\-constant or output buffers are unaffected by this flag and may be ++accessed by the provider at anytime until the operation has completed. + This flag can only be used with messages smaller than inject_size. +-.PP +-\f[I]FI_FENCE\f[] : Applies to transmits. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Applies to transmits. + Indicates that the requested operation, also known as the fenced + operation, and any operation posted after the fenced operation will be + deferred until all previous operations targeting the same peer endpoint + have completed. + Operations posted after the fencing will see and/or replace the results + of any operations initiated prior to the fenced operation. ++.RS ++.RE + .PP + The ordering of operations starting at the posting of the fenced + operation (inclusive) to the posting of a subsequent fenced operation + (exclusive) is controlled by the endpoint\[aq]s ordering semantics. +-.PP +-\f[I]FI_TAGGED\f[] : Specifies that the target of the atomic operation +-is a tagged receive buffer instead of an RMA buffer. ++.TP ++.B \f[I]FI_TAGGED\f[] ++Specifies that the target of the atomic operation is a tagged receive ++buffer instead of an RMA buffer. + When a tagged buffer is the target memory region, the addr parameter is + used as a 0\-based byte offset into the tagged buffer, with the key + parameter specifying the tag. ++.RS ++.RE + .SH RETURN VALUE + .PP + Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_EAGAIN\f[] : See \f[C]fi_msg\f[](3) for a detailed description +-of handling FI_EAGAIN. +-.PP +-\f[I]\-FI_EOPNOTSUPP\f[] : The requested atomic operation is not +-supported on this endpoint. +-.PP +-\f[I]\-FI_EMSGSIZE\f[] : The number of atomic operations in a single +-request exceeds that supported by the underlying provider. ++.TP ++.B \f[I]\-FI_EAGAIN\f[] ++See \f[C]fi_msg\f[](3) for a detailed description of handling FI_EAGAIN. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EOPNOTSUPP\f[] ++The requested atomic operation is not supported on this endpoint. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EMSGSIZE\f[] ++The number of atomic operations in a single request exceeds that ++supported by the underlying provider. ++.RS ++.RE + .SH NOTES + .PP + Atomic operations operate on an array of values of a specific data type. +@@ -625,6 +808,15 @@ This must be between 1 and the maximum returned through the relevant + valid operation, inclusive. + The requested operation and data type must also be valid for the given + provider. ++.PP ++The ordering of atomic operations carried as part of different request ++messages is subject to the message and data ordering definitions ++assigned to the transmitting and receiving endpoints. ++Both message and data ordering are required if the results of two atomic ++operations to the same memory buffers are to reflect the second ++operation acting on the results of the first. ++See \f[C]fi_endpoint\f[](3) for further details and message size ++restrictions. + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_av.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_av.3 +index aa4ec5fac..565ed4591 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_av.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_av.3 +@@ -1,18 +1,35 @@ +-.TH "fi_av" "3" "2017\-06\-21" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_av" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_av \- Address vector operations +-.PP +-fi_av_open / fi_close : Open or close an address vector +-.PP +-fi_av_bind : Associate an address vector with an event queue. +-.PP +-fi_av_insert / fi_av_insertsvc / fi_av_remove : Insert/remove an address +-into/from the address vector. +-.PP +-fi_av_lookup : Retrieve an address stored in the address vector. +-.PP +-fi_av_straddr : Convert an address into a printable string. ++.TP ++.B fi_av_open / fi_close ++Open or close an address vector ++.RS ++.RE ++.TP ++.B fi_av_bind ++Associate an address vector with an event queue. ++.RS ++.RE ++.TP ++.B fi_av_insert / fi_av_insertsvc / fi_av_remove ++Insert/remove an address into/from the address vector. ++.RS ++.RE ++.TP ++.B fi_av_lookup ++Retrieve an address stored in the address vector. ++.RS ++.RE ++.TP ++.B fi_av_straddr ++Convert an address into a printable string. ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -51,31 +68,60 @@ const\ char\ *\ fi_av_straddr(struct\ fid_av\ *av,\ const\ void\ *addr, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]domain\f[] : Resource domain +-.PP +-\f[I]av\f[] : Address vector +-.PP +-\f[I]eq\f[] : Event queue +-.PP +-\f[I]attr\f[] : Address vector attributes +-.PP +-\f[I]context\f[] : User specified context associated with the address +-vector or insert operation. +-.PP +-\f[I]addr\f[] : Buffer containing one or more addresses to insert into +-address vector. +-.PP +-\f[I]addrlen\f[] : On input, specifies size of addr buffer. ++.TP ++.B \f[I]domain\f[] ++Resource domain ++.RS ++.RE ++.TP ++.B \f[I]av\f[] ++Address vector ++.RS ++.RE ++.TP ++.B \f[I]eq\f[] ++Event queue ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Address vector attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the address vector or insert ++operation. ++.RS ++.RE ++.TP ++.B \f[I]addr\f[] ++Buffer containing one or more addresses to insert into address vector. ++.RS ++.RE ++.TP ++.B \f[I]addrlen\f[] ++On input, specifies size of addr buffer. + On output, stores number of bytes written to addr buffer. +-.PP +-\f[I]fi_addr\f[] : For insert, a reference to an array where returned +-fabric addresses will be written. ++.RS ++.RE ++.TP ++.B \f[I]fi_addr\f[] ++For insert, a reference to an array where returned fabric addresses will ++be written. + For remove, one or more fabric addresses to remove. +-.PP +-\f[I]count\f[] : Number of addresses to insert/remove from an AV. +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Number of addresses to insert/remove from an AV. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation. ++.RS ++.RE + .SH DESCRIPTION + .PP + Address vectors are used to map higher level addresses, which may be +@@ -105,15 +151,19 @@ struct\ fi_av_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]type\f[] : An AV type corresponds to a conceptual implementation of +-an address vector. ++.TP ++.B \f[I]type\f[] ++An AV type corresponds to a conceptual implementation of an address ++vector. + The type specifies how an application views data stored in the AV, + including how it may be accessed. + Valid values are: +-.IP \[bu] 2 +-\f[I]FI_AV_MAP\f[] : Addresses which are inserted into an AV are mapped +-to a native fabric address for use by the application. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AV_MAP\f[] ++Addresses which are inserted into an AV are mapped to a native fabric ++address for use by the application. + The use of FI_AV_MAP requires that an application store the returned + fi_addr_t value that is associated with each inserted address. + The advantage of using FI_AV_MAP is that the returned fi_addr_t value +@@ -126,9 +176,12 @@ store the returned addresses. + Addresses are stored in the AV using a provider specific mechanism, + including, but not limited to a tree, hash table, or maintained on the + heap. +-.IP \[bu] 2 +-\f[I]FI_AV_TABLE\f[] : Addresses which are inserted into an AV of type +-FI_AV_TABLE are accessible using a simple index. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AV_TABLE\f[] ++Addresses which are inserted into an AV of type FI_AV_TABLE are ++accessible using a simple index. + Conceptually, the AV may be treated as an array of addresses, though the + provider may implement the AV using a variety of mechanisms. + When FI_AV_TABLE is used, the returned fi_addr_t is an index, with the +@@ -138,46 +191,64 @@ The index of the first address inserted into an FI_AV_TABLE will be 0, + and successive insertions will be given sequential indices. + Sequential indices will be assigned across insertion calls on the same + AV. +-.IP \[bu] 2 +-\f[I]FI_AV_UNSPEC\f[] : Provider will choose its preferred AV type. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AV_UNSPEC\f[] ++Provider will choose its preferred AV type. + The AV type used will be returned through the type field in fi_av_attr. +-.PP +-\f[I]Receive Context Bits (rx_ctx_bits)\f[] : The receive context bits +-field is only for use with scalable endpoints. ++.RS ++.RE ++.TP ++.B \f[I]Receive Context Bits (rx_ctx_bits)\f[] ++The receive context bits field is only for use with scalable endpoints. + It indicates the number of bits reserved in a returned fi_addr_t, which + will be used to identify a specific target receive context. + See fi_rx_addr() and fi_endpoint(3) for additional details on receive + contexts. + The requested number of bits should be selected such that 2 ^ + rx_ctx_bits >= rx_ctx_cnt for the endpoint. +-.PP +-\f[I]count\f[] : Indicates the expected number of addresses that will be +-inserted into the AV. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Indicates the expected number of addresses that will be inserted into ++the AV. + The provider uses this to optimize resource allocations. +-.PP +-\f[I]ep_per_node\f[] : This field indicates the number of endpoints that +-will be associated with a specific fabric, or network, address. ++.RS ++.RE ++.TP ++.B \f[I]ep_per_node\f[] ++This field indicates the number of endpoints that will be associated ++with a specific fabric, or network, address. + If the number of endpoints per node is unknown, this value should be set + to 0. + The provider uses this value to optimize resource allocations. + For example, distributed, parallel applications may set this to the + number of processes allocated per node, times the number of endpoints + each process will open. +-.PP +-\f[I]name\f[] : An optional system name associated with the address +-vector to create or open. ++.RS ++.RE ++.TP ++.B \f[I]name\f[] ++An optional system name associated with the address vector to create or ++open. + Address vectors may be shared across multiple processes which access the + same named domain on the same node. + The name field allows the underlying provider to identify a shared AV. ++.RS ++.RE + .PP + If the name field is non\-NULL and the AV is not opened for read\-only + access, a named AV will be created, if it does not already exist. +-.PP +-\f[I]map_addr\f[] : The map_addr determines the base fi_addr_t address +-that a provider should use when sharing an AV of type FI_AV_MAP between +-processes. ++.TP ++.B \f[I]map_addr\f[] ++The map_addr determines the base fi_addr_t address that a provider ++should use when sharing an AV of type FI_AV_MAP between processes. + Processes that provide the same value for map_addr to a shared AV may + use the same fi_addr_t values returned from an fi_av_insert call. ++.RS ++.RE + .PP + The map_addr may be used by the provider to mmap memory allocated for a + shared AV between processes; however, the provider is not required to +@@ -191,11 +262,15 @@ defined. + If name is non\-NULL and map_addr is 0, then the map_addr used by the + provider will be returned through the attribute structure. + The map_addr field is ignored if name is NULL. +-.PP +-\f[I]flags\f[] : The following flags may be used when opening an AV. +-.IP \[bu] 2 +-\f[I]FI_EVENT\f[] : When the flag FI_EVENT is specified, all insert +-operations on this AV will occur asynchronously. ++.TP ++.B \f[I]flags\f[] ++The following flags may be used when opening an AV. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_EVENT\f[] ++When the flag FI_EVENT is specified, all insert operations on this AV ++will occur asynchronously. + There will be one EQ error entry generated for each failed address + insertion, followed by one non\-error event indicating that the + insertion operation has completed. +@@ -212,6 +287,8 @@ specified in the insert call; the data field will contain the index of + the failed address. + There will be one error completion returned for each address that fails + to insert into the AV. ++.RS ++.RE + .PP + If an AV is opened with FI_EVENT, any insertions attempted before an EQ + is bound to the AV will fail with \-FI_ENOEQ. +@@ -223,16 +300,26 @@ Note that the order of delivery of insert completions may not match the + order in which the calls to fi_av_insert were made. + The only guarantee is that all error completions for a given call to + fi_av_insert will precede the single associated non\-error completion. +-.IP \[bu] 2 +-\f[I]FI_READ\f[] : Opens an AV for read\-only access. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_READ\f[] ++Opens an AV for read\-only access. + An AV opened for read\-only access must be named (name attribute + specified), and the AV must exist. +-.IP \[bu] 2 +-\f[I]FI_SYMMETRIC\f[] : Indicates that each node will be associated with +-the same number of endpoints, the same transport addresses will be +-allocated on each node, and the transport addresses will be sequential. ++.RS ++.RE ++.RE ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_SYMMETRIC\f[] ++Indicates that each node will be associated with the same number of ++endpoints, the same transport addresses will be allocated on each node, ++and the transport addresses will be sequential. + This feature targets distributed applications on large fabrics and + allows for highly\-optimized storage of remote endpoint addressing. ++.RS ++.RE ++.RE + .SS fi_close + .PP + The fi_close call is used to release all resources associated with an +@@ -304,27 +391,36 @@ to fi_av_insert following a call to fi_av_remove always reference a + valid buffer in the fi_addr parameter. + Otherwise it may be difficult to determine what the next assigned index + will be. +-.PP +-\f[I]flags\f[] : The following flag may be passed to AV insertion calls: +-fi_av_insert, fi_av_insertsvc, or fi_av_insertsym. +-.IP \[bu] 2 +-\f[I]FI_MORE\f[] : In order to allow optimized address insertion, the +-application may specify the FI_MORE flag to the insert call to give a +-hint to the provider that more insertion requests will follow, allowing +-the provider to aggregate insertion requests if desired. ++.TP ++.B \f[I]flags\f[] ++The following flag may be passed to AV insertion calls: fi_av_insert, ++fi_av_insertsvc, or fi_av_insertsym. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_MORE\f[] ++In order to allow optimized address insertion, the application may ++specify the FI_MORE flag to the insert call to give a hint to the ++provider that more insertion requests will follow, allowing the provider ++to aggregate insertion requests if desired. + An application may make any number of insertion calls with FI_MORE set, + provided that they are followed by an insertion call without FI_MORE. + This signifies to the provider that the insertion list is complete. + Providers are free to ignore FI_MORE. +-.IP \[bu] 2 +-\f[I]FI_SYNC_ERR\f[] : This flag applies to synchronous insertions only, +-and is used to retrieve error details of failed insertions. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_SYNC_ERR\f[] ++This flag applies to synchronous insertions only, and is used to ++retrieve error details of failed insertions. + If set, the context parameter of insertion calls references an array of + integers, with context set to address of the first element of the array. + The resulting status of attempting to insert each address will be + written to the corresponding array location. + Successful insertions will be updated to 0. + Failures will contain a fabric errno code. ++.RS ++.RE + .SS fi_av_insertsvc + .PP + The fi_av_insertsvc call behaves similar to fi_av_insert, but allows the +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cm.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cm.3 +index 71042efb4..d48f467ed 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cm.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cm.3 +@@ -1,16 +1,25 @@ +-.TH "fi_cm" "3" "2017\-06\-06" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_cm" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_cm \- Connection management operations +-.PP +-fi_connect / fi_listen / fi_accept / fi_reject / fi_shutdown : Manage +-endpoint connection state. +-.PP +-fi_setname / fi_getname / fi_getpeer : Set local, or return local or +-peer endpoint address. +-.PP +-fi_join / fi_close / fi_mc_addr : Join, leave, or retrieve a multicast +-address. ++.TP ++.B fi_connect / fi_listen / fi_accept / fi_reject / fi_shutdown ++Manage endpoint connection state. ++.RS ++.RE ++.TP ++.B fi_setname / fi_getname / fi_getpeer ++Set local, or return local or peer endpoint address. ++.RS ++.RE ++.TP ++.B fi_join / fi_close / fi_mc_addr ++Join, leave, or retrieve a multicast address. ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -44,34 +53,60 @@ fi_addr_t\ fi_mc_addr(struct\ fid_mc\ *mc); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]ep / pep\f[] : Fabric endpoint on which to change connection state. ++.TP ++.B \f[I]ep / pep\f[] ++Fabric endpoint on which to change connection state. ++.RS ++.RE + .PP + \f[I]fid\f[] Active or passive endpoint to get/set address. +-.PP +-\f[I]addr\f[] : Buffer to address. ++.TP ++.B \f[I]addr\f[] ++Buffer to address. + On a set call, the endpoint will be assigned the specified address. + On a get, the local address will be copied into the buffer, up to the + space provided. + For connect, this parameter indicates the peer address to connect to. + The address must be in the same format as that specified using fi_info: + addr_format when the endpoint was created. +-.PP +-\f[I]addrlen\f[] : On input, specifies size of addr buffer. ++.RS ++.RE ++.TP ++.B \f[I]addrlen\f[] ++On input, specifies size of addr buffer. + On output, stores number of bytes written to addr buffer. +-.PP +-\f[I]param\f[] : User\-specified data exchanged as part of the +-connection exchange. +-.PP +-\f[I]paramlen\f[] : Size of param buffer. +-.PP +-\f[I]info\f[] : Fabric information associated with a connection request. +-.PP +-\f[I]mc\f[] : Multicast group associated with an endpoint. +-.PP +-\f[I]flags\f[] : Additional flags for controlling connection operation. +-.PP +-\f[I]context\f[] : User context associated with the request. ++.RS ++.RE ++.TP ++.B \f[I]param\f[] ++User\-specified data exchanged as part of the connection exchange. ++.RS ++.RE ++.TP ++.B \f[I]paramlen\f[] ++Size of param buffer. ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++Fabric information associated with a connection request. ++.RS ++.RE ++.TP ++.B \f[I]mc\f[] ++Multicast group associated with an endpoint. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags for controlling connection operation. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User context associated with the request. ++.RS ++.RE + .SH DESCRIPTION + .PP + Connection management functions are used to connect an +@@ -232,18 +267,24 @@ and paired with the FI_MULTICAST operation flag. + .SH FLAGS + .PP + Except in functions noted below, flags are reserved and must be 0. +-.PP +-\f[I]FI_SEND\f[] : Applies to fi_join. ++.TP ++.B \f[I]FI_SEND\f[] ++Applies to fi_join. + This flag indicates that the endpoint should join the multicast group as + a send only member. + The endpoint must be configured for transmit operations to use this + flag, or an error will occur. +-.PP +-\f[I]FI_RECV\f[] : Applies to fi_join. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Applies to fi_join. + This flag indicates that the endpoint should join the multicast group + with receive permissions only. + The endpoint must be configured for receive operations to use this flag, + or an error will occur. ++.RS ++.RE + .SH RETURN VALUE + .PP + Returns 0 on success. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cntr.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cntr.3 +index a37a2e385..959f30614 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cntr.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cntr.3 +@@ -1,21 +1,40 @@ +-.TH "fi_cntr" "3" "2017\-09\-14" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_cntr" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_cntr \- Completion and event counter operations +-.PP +-fi_cntr_open / fi_close : Allocate/free a counter +-.PP +-fi_cntr_read : Read the current value of a counter +-.PP +-fi_cntr_readerr : Reads the number of operations which have completed in +-error. +-.PP +-fi_cntr_add : Increment a counter by a specified value +-.PP +-fi_cntr_set : Set a counter to a specified value +-.PP +-fi_cntr_wait : Wait for a counter to be greater or equal to a threshold +-value ++.TP ++.B fi_cntr_open / fi_close ++Allocate/free a counter ++.RS ++.RE ++.TP ++.B fi_cntr_read ++Read the current value of a counter ++.RS ++.RE ++.TP ++.B fi_cntr_readerr ++Reads the number of operations which have completed in error. ++.RS ++.RE ++.TP ++.B fi_cntr_add ++Increment a counter by a specified value ++.RS ++.RE ++.TP ++.B fi_cntr_set ++Set a counter to a specified value ++.RS ++.RE ++.TP ++.B fi_cntr_wait ++Wait for a counter to be greater or equal to a threshold value ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -44,21 +63,42 @@ int\ fi_cntr_wait(struct\ fid_cntr\ *cntr,\ uint64_t\ threshold, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]domain\f[] : Fabric domain +-.PP +-\f[I]cntr\f[] : Fabric counter +-.PP +-\f[I]attr\f[] : Counter attributes +-.PP +-\f[I]context\f[] : User specified context associated with the counter +-.PP +-\f[I]value\f[] : Value to increment or set counter +-.PP +-\f[I]threshold\f[] : Value to compare counter against +-.PP +-\f[I]timeout\f[] : Time in milliseconds to wait. ++.TP ++.B \f[I]domain\f[] ++Fabric domain ++.RS ++.RE ++.TP ++.B \f[I]cntr\f[] ++Fabric counter ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Counter attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the counter ++.RS ++.RE ++.TP ++.B \f[I]value\f[] ++Value to increment or set counter ++.RS ++.RE ++.TP ++.B \f[I]threshold\f[] ++Value to compare counter against ++.RS ++.RE ++.TP ++.B \f[I]timeout\f[] ++Time in milliseconds to wait. + A negative value indicates infinite timeout. ++.RS ++.RE + .SH DESCRIPTION + .PP + Counters record the number of requested operations that have completed. +@@ -91,20 +131,26 @@ struct\ fi_cntr_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]events\f[] : A counter captures different types of events. ++.TP ++.B \f[I]events\f[] ++A counter captures different types of events. + The specific type which is to counted are one of the following: +-.IP \[bu] 2 +-\f[I]FI_CNTR_EVENTS_COMP\f[] : The counter increments for every +-successful completion that occurs on an associated bound endpoint. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_CNTR_EVENTS_COMP\f[] ++The counter increments for every successful completion that occurs on an ++associated bound endpoint. + The type of completions \-\- sends and/or receives \-\- which are + counted may be restricted using control flags when binding the counter + and the endpoint. + Counters increment on all successful completions, separately from + whether the operation generates an entry in an event queue. +-.PP +-\f[I]wait_obj\f[] : Counters may be associated with a specific wait +-object. ++.RS ++.RE ++.TP ++.B \f[I]wait_obj\f[] ++Counters may be associated with a specific wait object. + Wait objects allow applications to block until the wait object is + signaled, indicating that a counter has reached a specific threshold. + Users may use fi_control to retrieve the underlying wait object +@@ -113,43 +159,65 @@ The following values may be used to specify the type of wait object + associated with a counter: FI_WAIT_NONE, FI_WAIT_UNSPEC, FI_WAIT_SET, + FI_WAIT_FD, and FI_WAIT_MUTEX_COND. + The default is FI_WAIT_NONE. +-.IP \[bu] 2 +-\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block +-(wait) for events on the counter. +-.IP \[bu] 2 +-\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the +-counter using fabric interface calls, such as fi_cntr_wait. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_NONE\f[] ++Used to indicate that the user will not block (wait) for events on the ++counter. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_UNSPEC\f[] ++Specifies that the user will only wait on the counter using fabric ++interface calls, such as fi_cntr_wait. + In this case, the underlying provider may select the most appropriate or + highest performing wait object available, including custom wait + mechanisms. + Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve + the underlying wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_SET\f[] : Indicates that the event counter should use a +-wait set object to wait for events. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_SET\f[] ++Indicates that the event counter should use a wait set object to wait ++for events. + If specified, the wait_set field must reference an existing wait set + object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_FD\f[] : Indicates that the counter should use a file +-descriptor as its wait mechanism. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_FD\f[] ++Indicates that the counter should use a file descriptor as its wait ++mechanism. + A file descriptor wait object must be usable in select, poll, and epoll + routines. + However, a provider may signal an FD wait object by marking it as + readable, writable, or with an error. +-.IP \[bu] 2 +-\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the counter should use a +-pthread mutex and cond variable as a wait object. +-.PP +-\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a +-wait object to which the event counter should attach. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_MUTEX_COND\f[] ++Specifies that the counter should use a pthread mutex and cond variable ++as a wait object. ++.RS ++.RE ++.TP ++.B \f[I]wait_set\f[] ++If wait_obj is FI_WAIT_SET, this field references a wait object to which ++the event counter should attach. + When an event is added to the event counter, the corresponding wait set + will be signaled if all necessary conditions are met. + The use of a wait_set enables an optimized method of waiting for events + across multiple event counters. + This field is ignored if wait_obj is not FI_WAIT_SET. +-.PP +-\f[I]flags\f[] : Flags are reserved for future use, and must be set to +-0. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Flags are reserved for future use, and must be set to 0. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with a counter. +@@ -166,18 +234,27 @@ Access to the counter should be serialized across all calls when + fi_cntr_control is invoked, as it may redirect the implementation of + counter operations. + The following control commands are usable with a counter: +-.PP +-\f[I]FI_GETOPSFLAG (uint64_t *)\f[] : Returns the current default +-operational flags associated with the counter. +-.PP +-\f[I]FI_SETOPSFLAG (uint64_t *)\f[] : Modifies the current default +-operational flags associated with the counter. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the low\-level wait object associated with the counter. ++.TP ++.B \f[I]FI_GETOPSFLAG (uint64_t *)\f[] ++Returns the current default operational flags associated with the ++counter. ++.RS ++.RE ++.TP ++.B \f[I]FI_SETOPSFLAG (uint64_t *)\f[] ++Modifies the current default operational flags associated with the ++counter. ++.RS ++.RE ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the low\-level wait object ++associated with the counter. + The format of the wait\-object is specified during counter creation, + through the counter attributes. + See fi_eq.3 for addition details using control with FI_GETWAIT. ++.RS ++.RE + .SS fi_cntr_read + .PP + The fi_cntr_read call returns the current value of the counter. +@@ -218,9 +295,11 @@ been configured with a wait object of FI_WAIT_NONE or FI_WAIT_SET. + .PP + Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. +-.PP +-fi_cntr_read / fi_cntr_readerr : Returns the current value of the +-counter. ++.TP ++.B fi_cntr_read / fi_cntr_readerr ++Returns the current value of the counter. ++.RS ++.RE + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH NOTES +@@ -233,7 +312,16 @@ fi_cntr_read or fi_cntr_readerr). + A small, but undefined, delay may occur between the counter changing and + the reported value being updated. + However, a final updated value will eventually be reflected in the read +-counter value, with the order of the updates maintained. ++counter value. ++.PP ++Additionally, applications should ensure that the value of a counter is ++stable and not subject to change prior to calling fi_cntr_set or ++fi_cntr_seterr. ++Otherwise, the resulting value of the counter after fi_cntr_set / ++fi_cntr_seterr is undefined, as updates to the counter may be lost. ++A counter value is considered stable if all previous updates using ++fi_cntr_set / fi_cntr_seterr and results of related operations are ++reflected in the observed value of the counter. + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_control.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_control.3 +index 2669e1791..c6bc5b3bb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_control.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_control.3 +@@ -1,4 +1,7 @@ +-.TH "fi_control" "3" "2016\-02\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_control" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_control \- Perform an operation on a fabric resource. +@@ -12,12 +15,21 @@ int\ fi_control(struct\ fid\ *fid,\ int\ command,\ void\ *arg); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fid\f[] : Fabric resource +-.PP +-\f[I]command\f[] : Operation to perform +-.PP +-\f[I]arg\f[] : Optional argument to the command ++.TP ++.B \f[I]fid\f[] ++Fabric resource ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Operation to perform ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional argument to the command ++.RS ++.RE + .SH DESCRIPTION + .PP + The fi_control operation is used to perform one or more operations on a +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cq.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cq.3 +index 723360c4f..e1e52a29c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cq.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_cq.3 +@@ -1,24 +1,41 @@ +-.TH "fi_cq" "3" "2017\-12\-06" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_cq" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_cq \- Completion queue operations +-.PP +-fi_cq_open / fi_close : Open/close a completion queue +-.PP +-fi_control : Control CQ operation or attributes. +-.PP +-fi_cq_read / fi_cq_readfrom / fi_cq_readerr : Read a completion from a +-completion queue +-.PP +-fi_cq_sread / fi_cq_sreadfrom : A synchronous (blocking) read that waits +-until a specified condition has been met before reading a completion +-from a completion queue. +-.PP +-fi_cq_signal : Unblock any thread waiting in fi_cq_sread or +-fi_cq_sreadfrom. +-.PP +-fi_cq_strerror : Converts provider specific error information into a +-printable string ++.TP ++.B fi_cq_open / fi_close ++Open/close a completion queue ++.RS ++.RE ++.TP ++.B fi_control ++Control CQ operation or attributes. ++.RS ++.RE ++.TP ++.B fi_cq_read / fi_cq_readfrom / fi_cq_readerr ++Read a completion from a completion queue ++.RS ++.RE ++.TP ++.B fi_cq_sread / fi_cq_sreadfrom ++A synchronous (blocking) read that waits until a specified condition has ++been met before reading a completion from a completion queue. ++.RS ++.RE ++.TP ++.B fi_cq_signal ++Unblock any thread waiting in fi_cq_sread or fi_cq_sreadfrom. ++.RS ++.RE ++.TP ++.B fi_cq_strerror ++Converts provider specific error information into a printable string ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -53,43 +70,85 @@ const\ char\ *\ fi_cq_strerror(struct\ fid_cq\ *cq,\ int\ prov_errno, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]domain\f[] : Open resource domain +-.PP +-\f[I]cq\f[] : Completion queue +-.PP +-\f[I]attr\f[] : Completion queue attributes +-.PP +-\f[I]context\f[] : User specified context associated with the completion +-queue. +-.PP +-\f[I]buf\f[] : For read calls, the data buffer to write completions +-into. ++.TP ++.B \f[I]domain\f[] ++Open resource domain ++.RS ++.RE ++.TP ++.B \f[I]cq\f[] ++Completion queue ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Completion queue attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the completion queue. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++For read calls, the data buffer to write completions into. + For write calls, a completion to insert into the completion queue. + For fi_cq_strerror, an optional buffer that receives printable error + information. +-.PP +-\f[I]count\f[] : Number of CQ entries. +-.PP +-\f[I]len\f[] : Length of data buffer +-.PP +-\f[I]src_addr\f[] : Source address of a completed receive operation +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation +-.PP +-\f[I]command\f[] : Command of control operation to perform on CQ. +-.PP +-\f[I]arg\f[] : Optional control argument +-.PP +-\f[I]cond\f[] : Condition that must be met before a completion is +-generated +-.PP +-\f[I]timeout\f[] : Time in milliseconds to wait. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Number of CQ entries. ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data buffer ++.RS ++.RE ++.TP ++.B \f[I]src_addr\f[] ++Source address of a completed receive operation ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Command of control operation to perform on CQ. ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional control argument ++.RS ++.RE ++.TP ++.B \f[I]cond\f[] ++Condition that must be met before a completion is generated ++.RS ++.RE ++.TP ++.B \f[I]timeout\f[] ++Time in milliseconds to wait. + A negative value indicates infinite timeout. +-.PP +-\f[I]prov_errno\f[] : Provider specific error value +-.PP +-\f[I]err_data\f[] : Provider specific error data related to a completion ++.RS ++.RE ++.TP ++.B \f[I]prov_errno\f[] ++Provider specific error value ++.RS ++.RE ++.TP ++.B \f[I]err_data\f[] ++Provider specific error data related to a completion ++.RS ++.RE + .SH DESCRIPTION + .PP + Completion queues are used to report events associated with data +@@ -121,17 +180,26 @@ struct\ fi_cq_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]size\f[] : Specifies the minimum size of a completion queue. ++.TP ++.B \f[I]size\f[] ++Specifies the minimum size of a completion queue. + A value of 0 indicates that the provider may choose a default value. +-.PP +-\f[I]flags\f[] : Flags that control the configuration of the CQ. +-.IP \[bu] 2 +-\f[I]FI_AFFINITY\f[] : Indicates that the signaling_vector field (see +-below) is valid. +-.PP +-\f[I]format\f[] : Completion queues allow the application to select the +-amount of detail that it must store and report. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Flags that control the configuration of the CQ. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AFFINITY\f[] ++Indicates that the signaling_vector field (see below) is valid. ++.RS ++.RE ++.TP ++.B \f[I]format\f[] ++Completion queues allow the application to select the amount of detail ++that it must store and report. + The format attribute allows the application to select one of several + completion formats, indicating the structure of the data that the + completion queue should return when read. +@@ -139,12 +207,20 @@ Supported formats and the structures that correspond to each are listed + below. + The meaning of the CQ entry fields are defined in the \f[I]Completion + Fields\f[] section. +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_UNSPEC\f[] : If an unspecified format is requested, +-then the CQ will use a provider selected default format. +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_CONTEXT\f[] : Provides only user specified context +-that was associated with the completion. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_CQ_FORMAT_UNSPEC\f[] ++If an unspecified format is requested, then the CQ will use a provider ++selected default format. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_CQ_FORMAT_CONTEXT\f[] ++Provides only user specified context that was associated with the ++completion. ++.RS ++.RE + .IP + .nf + \f[C] +@@ -153,10 +229,14 @@ struct\ fi_cq_entry\ { + }; + \f[] + .fi +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_MSG\f[] : Provides minimal data for processing +-completions, with expanded support for reporting information about +-received messages. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_CQ_FORMAT_MSG\f[] ++Provides minimal data for processing completions, with expanded support ++for reporting information about received messages. ++.RS ++.RE ++.RE + .IP + .nf + \f[C] +@@ -167,10 +247,15 @@ struct\ fi_cq_msg_entry\ { + }; + \f[] + .fi +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_DATA\f[] : Provides data associated with a completion. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_CQ_FORMAT_DATA\f[] ++Provides data associated with a completion. + Includes support for received message length, remote CQ data, and + multi\-receive buffers. ++.RS ++.RE ++.RE + .IP + .nf + \f[C] +@@ -183,9 +268,14 @@ struct\ fi_cq_data_entry\ { + }; + \f[] + .fi +-.IP \[bu] 2 +-\f[I]FI_CQ_FORMAT_TAGGED\f[] : Expands completion data to include +-support for the tagged message interfaces. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_CQ_FORMAT_TAGGED\f[] ++Expands completion data to include support for the tagged message ++interfaces. ++.RS ++.RE ++.RE + .IP + .nf + \f[C] +@@ -199,9 +289,9 @@ struct\ fi_cq_tagged_entry\ { + }; + \f[] + .fi +-.PP +-\f[I]wait_obj\f[] : CQ\[aq]s may be associated with a specific wait +-object. ++.TP ++.B \f[I]wait_obj\f[] ++CQ\[aq]s may be associated with a specific wait object. + Wait objects allow applications to block until the wait object is + signaled, indicating that a completion is available to be read. + Users may use fi_control to retrieve the underlying wait object +@@ -210,52 +300,77 @@ The following values may be used to specify the type of wait object + associated with a CQ: FI_WAIT_NONE, FI_WAIT_UNSPEC, FI_WAIT_SET, + FI_WAIT_FD, and FI_WAIT_MUTEX_COND. + The default is FI_WAIT_NONE. +-.IP \[bu] 2 +-\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block +-(wait) for completions on the CQ. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_NONE\f[] ++Used to indicate that the user will not block (wait) for completions on ++the CQ. + When FI_WAIT_NONE is specified, the application may not call fi_cq_sread + or fi_cq_sreadfrom. +-.IP \[bu] 2 +-\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the +-CQ using fabric interface calls, such as fi_cq_sread or fi_cq_sreadfrom. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_UNSPEC\f[] ++Specifies that the user will only wait on the CQ using fabric interface ++calls, such as fi_cq_sread or fi_cq_sreadfrom. + In this case, the underlying provider may select the most appropriate or + highest performing wait object available, including custom wait + mechanisms. + Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve + the underlying wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_SET\f[] : Indicates that the completion queue should use a +-wait set object to wait for completions. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_SET\f[] ++Indicates that the completion queue should use a wait set object to wait ++for completions. + If specified, the wait_set field must reference an existing wait set + object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_FD\f[] : Indicates that the CQ should use a file descriptor +-as its wait mechanism. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_FD\f[] ++Indicates that the CQ should use a file descriptor as its wait ++mechanism. + A file descriptor wait object must be usable in select, poll, and epoll + routines. + However, a provider may signal an FD wait object by marking it as + readable, writable, or with an error. +-.IP \[bu] 2 +-\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the CQ should use a pthread +-mutex and cond variable as a wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_CRITSEC_COND\f[] : Windows specific. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_MUTEX_COND\f[] ++Specifies that the CQ should use a pthread mutex and cond variable as a ++wait object. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_CRITSEC_COND\f[] ++Windows specific. + Specifies that the CQ should use a critical section and condition + variable as a wait object. +-.PP +-\f[I]signaling_vector\f[] : If the FI_AFFINITY flag is set, this +-indicates the logical cpu number (0..max cpu \- 1) that interrupts +-associated with the CQ should target. ++.RS ++.RE ++.TP ++.B \f[I]signaling_vector\f[] ++If the FI_AFFINITY flag is set, this indicates the logical cpu number ++(0..max cpu \- 1) that interrupts associated with the CQ should target. + This field should be treated as a hint to the provider and may be + ignored if the provider does not support interrupt affinity. +-.PP +-\f[I]wait_cond\f[] : By default, when a completion is inserted into a CQ +-that supports blocking reads (fi_cq_sread/fi_cq_sreadfrom), the +-corresponding wait object is signaled. ++.RS ++.RE ++.TP ++.B \f[I]wait_cond\f[] ++By default, when a completion is inserted into a CQ that supports ++blocking reads (fi_cq_sread/fi_cq_sreadfrom), the corresponding wait ++object is signaled. + Users may specify a condition that must first be met before the wait is + satisfied. + This field indicates how the provider should interpret the cond field, + which describes the condition needed to signal the wait object. ++.RS ++.RE + .PP + A wait condition should be treated as an optimization. + Providers are not required to meet the requirements of the condition +@@ -272,14 +387,17 @@ The threshold indicates the number of entries that are to be queued + before at the CQ before the wait is satisfied. + .PP + This field is ignored if wait_obj is set to FI_WAIT_NONE. +-.PP +-\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a +-wait object to which the completion queue should attach. ++.TP ++.B \f[I]wait_set\f[] ++If wait_obj is FI_WAIT_SET, this field references a wait object to which ++the completion queue should attach. + When an event is inserted into the completion queue, the corresponding + wait set will be signaled if all necessary conditions are met. + The use of a wait_set enables an optimized method of waiting for events + across multiple event and completion queues. + This field is ignored if wait_obj is not FI_WAIT_SET. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with a completion +@@ -297,14 +415,17 @@ specific details of the completion queue. + Access to the CQ should be serialized across all calls when fi_control + is invoked, as it may redirect the implementation of CQ operations. + The following control commands are usable with a CQ. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the low\-level wait object associated with the CQ. ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the low\-level wait object ++associated with the CQ. + The format of the wait\-object is specified during CQ creation, through + the CQ attributes. + The fi_control arg parameter should be an address where a pointer to the + returned wait object will be written. + See fi_eq.3 for addition details using fi_control with FI_GETWAIT. ++.RS ++.RE + .SS fi_cq_read + .PP + The fi_cq_read operation performs a non\-blocking read of completion +@@ -343,26 +464,29 @@ parameter. + Returned source addressing data is converted from the native address + used by the underlying fabric into an fi_addr_t, which may be used in + transmit operations. +-Typically, returning fi_addr_t requires that the source address be +-inserted into the address vector associated with the receiving endpoint. ++Under most circumstances, returning fi_addr_t requires that the source ++address already have been inserted into the address vector associated ++with the receiving endpoint. ++This is true for address vectors of type FI_AV_TABLE. ++In select providers when FI_AV_MAP is used, source addresses may be ++converted algorithmically into a usable fi_addr_t, even though the ++source address has not been inserted into the address vector. ++This is permitted by the API, as it allows the provider to avoid address ++look\-up as part of receive message processing. ++In no case do providers insert addresses into an AV separate from an ++application calling fi_av_insert or similar call. ++.PP + For endpoints allocated using the FI_SOURCE_ERR capability, if the +-source address has not been inserted into the address vector, +-fi_cq_readfrom will return \-FI_EAVAIL. ++source address cannot be converted into a valid fi_addr_t value, ++fi_cq_readfrom will return \-FI_EAVAIL, even if the data were received ++successfully. + The completion will then be reported through fi_cq_readerr with error + code \-FI_EADDRNOTAVAIL. + See fi_cq_readerr for details. + .PP + If FI_SOURCE is specified without FI_SOURCE_ERR, source addresses which +-cannot be mapped to a local fi_addr_t will be reported as ++cannot be mapped to a usable fi_addr_t will be reported as + FI_ADDR_NOTAVAIL. +-The behavior is dependent on the type of address vector in use. +-For AVs of type FI_AV_MAP, source addresses may be mapped directly to an +-fi_addr_t value, even if the source address were not inserted into the +-AV. +-This allows the provider to optimize the reporting of the source +-fi_addr_t without the overhead of verifying whether the address is in +-the AV. +-If full address validation is necessary, FI_SOURCE_ERR must be used. + .SS fi_cq_sread / fi_cq_sreadfrom + .PP + The fi_cq_sread and fi_cq_sreadfrom calls are the blocking equivalent +@@ -410,11 +534,22 @@ information into a printable string for debugging purposes. + See field details below for more information on the use of err_data and + err_data_size. + .PP +-Notable completion error codes are given below. ++Note that error completions are generated for all operations, including ++those for which a completion was not requested (e.g. ++an endpoint is configured with FI_SELECTIVE_COMPLETION, but the request ++did not have the FI_COMPLETION flag set). ++In such cases, providers will return as much information as made ++available by the underlying software and hardware about the failure, ++other fields will be set to NULL or 0. ++This includes the op_context value, which may not have been provided or ++was ignored on input as part of the transfer. + .PP +-\f[I]FI_EADDRNOTAVAIL\f[] : This error code is used by CQs configured +-with FI_SOURCE_ERR to report completions for which a matching fi_addr_t +-source address could not be found. ++Notable completion error codes are given below. ++.TP ++.B \f[I]FI_EADDRNOTAVAIL\f[] ++This error code is used by CQs configured with FI_SOURCE_ERR to report ++completions for which a usable fi_addr_t source address could not be ++found. + An error code of FI_EADDRNOTAVAIL indicates that the data transfer was + successfully received and processed, with the fi_cq_err_entry fields + containing information about the completion. +@@ -423,6 +558,8 @@ The source address will be in the same format as specified through the + fi_info addr_format field for the opened domain. + This may be passed directly into an fi_av_insert call to add the source + address to the address vector. ++.RS ++.RE + .SS fi_cq_signal + .PP + The fi_cq_signal call will unblock any thread waiting in fi_cq_sread or +@@ -436,81 +573,109 @@ with a wait object. + The CQ entry data structures share many of the same fields. + The meanings of these fields are the same for all CQ entry structure + formats. +-.PP +-\f[I]op_context\f[] : The operation context is the application specified +-context value that was provided with an asynchronous operation. ++.TP ++.B \f[I]op_context\f[] ++The operation context is the application specified context value that ++was provided with an asynchronous operation. + The op_context field is valid for all completions that are associated + with an asynchronous operation. ++.RS ++.RE + .PP + For completion events that are not associated with a posted operation, + this field will be set to NULL. + This includes completions generated at the target in response to RMA + write operations that carry CQ data (FI_REMOTE_WRITE | FI_REMOTE_CQ_DATA + flags set), when the FI_RX_CQ_DATA mode bit is not required. +-.PP +-\f[I]flags\f[] : This specifies flags associated with the completed +-operation. ++.TP ++.B \f[I]flags\f[] ++This specifies flags associated with the completed operation. + The \f[I]Completion Flags\f[] section below lists valid flag values. + Flags are set for all relevant completions. +-.PP +-\f[I]len\f[] : This len field only applies to completed receive +-operations (e.g. ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++This len field only applies to completed receive operations (e.g. + fi_recv, fi_trecv, etc.). + It indicates the size of received \f[I]message\f[] data \-\- i.e. + how many data bytes were placed into the associated receive buffer by a + corresponding fi_send/fi_tsend/et al call. + If an endpoint has been configured with the FI_MSG_PREFIX mode, the len + also reflects the size of the prefix buffer. +-.PP +-\f[I]buf\f[] : The buf field is only valid for completed receive +-operations, and only applies when the receive buffer was posted with the +-FI_MULTI_RECV flag. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++The buf field is only valid for completed receive operations, and only ++applies when the receive buffer was posted with the FI_MULTI_RECV flag. + In this case, buf points to the starting location where the receive data + was placed. +-.PP +-\f[I]data\f[] : The data field is only valid if the FI_REMOTE_CQ_DATA +-completion flag is set, and only applies to receive completions. ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++The data field is only valid if the FI_REMOTE_CQ_DATA completion flag is ++set, and only applies to receive completions. + If FI_REMOTE_CQ_DATA is set, this field will contain the completion data + provided by the peer as part of their transmit request. + The completion data will be given in host byte order. +-.PP +-\f[I]tag\f[] : A tag applies only to received messages that occur using +-the tagged interfaces. ++.RS ++.RE ++.TP ++.B \f[I]tag\f[] ++A tag applies only to received messages that occur using the tagged ++interfaces. + This field contains the tag that was included with the received message. + The tag will be in host byte order. +-.PP +-\f[I]olen\f[] : The olen field applies to received messages. ++.RS ++.RE ++.TP ++.B \f[I]olen\f[] ++The olen field applies to received messages. + It is used to indicate that a received message has overrun the available + buffer space and has been truncated. + The olen specifies the amount of data that did not fit into the + available receive buffer and was discarded. +-.PP +-\f[I]err\f[] : This err code is a positive fabric errno associated with +-a completion. ++.RS ++.RE ++.TP ++.B \f[I]err\f[] ++This err code is a positive fabric errno associated with a completion. + The err value indicates the general reason for an error, if one + occurred. + See fi_errno.3 for a list of possible error codes. +-.PP +-\f[I]prov_errno\f[] : On an error, prov_errno may contain a provider +-specific error code. ++.RS ++.RE ++.TP ++.B \f[I]prov_errno\f[] ++On an error, prov_errno may contain a provider specific error code. + The use of this field and its meaning is provider specific. + It is intended to be used as a debugging aid. + See fi_cq_strerror for additional details on converting this error value + into a human readable string. +-.PP +-\f[I]err_data\f[] : On an error, err_data may reference a provider +-specific amount of data associated with an error. ++.RS ++.RE ++.TP ++.B \f[I]err_data\f[] ++On an error, err_data may reference a provider specific amount of data ++associated with an error. + The use of this field and its meaning is provider specific. + It is intended to be used as a debugging aid. + See fi_cq_strerror for additional details on converting this error data + into a human readable string. +-.PP +-\f[I]err_data_size\f[] : On input, err_data_size indicates the size of +-the err_data buffer in bytes. ++.RS ++.RE ++.TP ++.B \f[I]err_data_size\f[] ++On input, err_data_size indicates the size of the err_data buffer in ++bytes. + On output, err_data_size will be set to the number of bytes copied to + the err_data buffer. + The err_data information is typically used with fi_cq_strerror to + provide details about the type of error that occurred. ++.RS ++.RE + .PP + For compatibility purposes, if err_data_size is 0 on input, or the + fabric was opened with release < 1.5, err_data will be set to a data +@@ -524,62 +689,98 @@ ensure that the buffer referenced by err_data does not change. + Completion flags provide additional details regarding the completed + operation. + The following completion flags are defined. +-.PP +-\f[I]FI_SEND\f[] : Indicates that the completion was for a send +-operation. ++.TP ++.B \f[I]FI_SEND\f[] ++Indicates that the completion was for a send operation. + This flag may be combined with an FI_MSG or FI_TAGGED flag. +-.PP +-\f[I]FI_RECV\f[] : Indicates that the completion was for a receive +-operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Indicates that the completion was for a receive operation. + This flag may be combined with an FI_MSG or FI_TAGGED flag. +-.PP +-\f[I]FI_RMA\f[] : Indicates that an RMA operation completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_RMA\f[] ++Indicates that an RMA operation completed. + This flag may be combined with an FI_READ, FI_WRITE, FI_REMOTE_READ, or + FI_REMOTE_WRITE flag. +-.PP +-\f[I]FI_ATOMIC\f[] : Indicates that an atomic operation completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_ATOMIC\f[] ++Indicates that an atomic operation completed. + This flag may be combined with an FI_READ, FI_WRITE, FI_REMOTE_READ, or + FI_REMOTE_WRITE flag. +-.PP +-\f[I]FI_MSG\f[] : Indicates that a message\-based operation completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_MSG\f[] ++Indicates that a message\-based operation completed. + This flag may be combined with an FI_SEND or FI_RECV flag. +-.PP +-\f[I]FI_TAGGED\f[] : Indicates that a tagged message operation +-completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_TAGGED\f[] ++Indicates that a tagged message operation completed. + This flag may be combined with an FI_SEND or FI_RECV flag. +-.PP +-\f[I]FI_MULTICAST\f[] : Indicates that a multicast operation completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTICAST\f[] ++Indicates that a multicast operation completed. + This flag may be combined with FI_MSG and relevant flags. + This flag is only guaranteed to be valid for received messages if the + endpoint has been configured with FI_SOURCE. +-.PP +-\f[I]FI_READ\f[] : Indicates that a locally initiated RMA or atomic read +-operation has completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_READ\f[] ++Indicates that a locally initiated RMA or atomic read operation has ++completed. + This flag may be combined with an FI_RMA or FI_ATOMIC flag. +-.PP +-\f[I]FI_WRITE\f[] : Indicates that a locally initiated RMA or atomic +-write operation has completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_WRITE\f[] ++Indicates that a locally initiated RMA or atomic write operation has ++completed. + This flag may be combined with an FI_RMA or FI_ATOMIC flag. +-.PP +-\f[I]FI_REMOTE_READ\f[] : Indicates that a remotely initiated RMA or +-atomic read operation has completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_READ\f[] ++Indicates that a remotely initiated RMA or atomic read operation has ++completed. + This flag may be combined with an FI_RMA or FI_ATOMIC flag. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : Indicates that a remotely initiated RMA or +-atomic write operation has completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++Indicates that a remotely initiated RMA or atomic write operation has ++completed. + This flag may be combined with an FI_RMA or FI_ATOMIC flag. +-.PP +-\f[I]FI_REMOTE_CQ_DATA\f[] : This indicates that remote CQ data is +-available as part of the completion. +-.PP +-\f[I]FI_MULTI_RECV\f[] : This flag applies to receive buffers that were +-posted with the FI_MULTI_RECV flag set. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_CQ_DATA\f[] ++This indicates that remote CQ data is available as part of the ++completion. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTI_RECV\f[] ++This flag applies to receive buffers that were posted with the ++FI_MULTI_RECV flag set. + This completion flag indicates that the original receive buffer + referenced by the completion has been consumed and was released by the + provider. + Providers may set this flag on the last message that is received into + the multi\- recv buffer, or may generate a separate completion that + indicates that the buffer has been released. ++.RS ++.RE + .PP + Applications can distinguish between these two cases by examining the + completion entry flags field. +@@ -592,6 +793,165 @@ received message. + If other flag bits are zero, the provider is reporting that the + multi\-recv buffer has been released, and the completion entry is not + associated with a received message. ++.TP ++.B \f[I]FI_MORE\f[] ++See the \[aq]Buffered Receives\[aq] section in \f[C]fi_msg\f[](3) for ++more details. ++This flag is associated with receive completions on endpoints that have ++FI_BUFFERED_RECV mode enabled. ++When set to one, it indicates that the buffer referenced by the ++completion is limited by the FI_OPT_BUFFERED_LIMIT threshold, and ++additional message data must be retrieved by the application using an ++FI_CLAIM operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_CLAIM\f[] ++See the \[aq]Buffered Receives\[aq] section in \f[C]fi_msg\f[](3) for ++more details. ++This flag is set on completions associated with receive operations that ++claim buffered receive data. ++Note that this flag only applies to endpoints configured with the ++FI_BUFFERED_RECV mode bit. ++.RS ++.RE ++.SH COMPLETION EVENT SEMANTICS ++.PP ++Libfabric defines several completion \[aq]levels\[aq], identified using ++operational flags. ++Each flag indicates the soonest that a completion event may be generated ++by a provider, and the assumptions that an application may make upon ++processing a completion. ++The operational flags are defined below, along with an example of how a ++provider might implement the semantic. ++Note that only meeting the semantic is required of the provider and not ++the implementation. ++Providers may implement stronger completion semantics than necessary for ++a given operation, but only the behavior defined by the completion level ++is guaranteed. ++.PP ++To help understand the conceptual differences in completion levels, ++consider mailing a letter. ++Placing the letter into the local mailbox for pick\-up is similar to ++\[aq]inject complete\[aq]. ++Having the letter picked up and dropped off at the destination mailbox ++is equivalent to \[aq]transmit complete\[aq]. ++The \[aq]delivery complete\[aq] semantic is a stronger guarantee, with a ++person at the destination signing for the letter. ++However, the person who signed for the letter is not necessarily the ++intended recipient. ++The \[aq]match complete\[aq] option is similar to delivery complete, but ++requires the intended recipient to sign for the letter. ++.PP ++The \[aq]commit complete\[aq] level has different semantics than the ++previously mentioned levels. ++Commit complete would be closer to the the letter arriving at the ++destination and being placed into a fire proof safe. ++.PP ++The operational flags for the described completion levels are defined ++below. ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Indicates that a completion should be generated when the source ++buffer(s) may be reused. ++A completion guarantees that the buffers will not be read from again and ++the application may reclaim them. ++No other guarantees are made with respect to the state of the operation. ++.RS ++.RE ++.PP ++Example: A provider may generate this completion event after copying the ++source buffer into a network buffer, either in host memory or on the ++NIC. ++An inject completion does not indicate that the data has been ++transmitted onto the network, and a local error could occur after the ++completion event has been generated that could prevent it from being ++transmitted. ++.PP ++Inject complete allows for the fastest completion reporting (and, hence, ++buffer reuse), but provides the weakest guarantees against network ++errors. ++.PP ++Note: This flag is used to control when a completion entry is inserted ++into a completion queue. ++It does not apply to operations that do not generate a completion queue ++entry, such as the fi_inject operation, and is not subject to the ++inject_size message limit restriction. ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Indicates that a completion should be generated when the transmit ++operation has completed relative to the local provider. ++The exact behavior is dependent on the endpoint type. ++.RS ++.RE ++.PP ++For reliable endpoints: ++.PP ++Indicates that a completion should be generated when the operation has ++been delivered to the peer endpoint. ++A completion guarantees that the operation is no longer dependent on the ++fabric or local resources. ++The state of the operation at the peer endpoint is not defined. ++.PP ++Example: A provider may generate a transmit complete event upon ++receiving an ack from the peer endpoint. ++The state of the message at the peer is unknown and may be buffered in ++the target NIC at the time the ack has been generated. ++.PP ++For unreliable endpoints: ++.PP ++Indicates that a completion should be generated when the operation has ++been delivered to the fabric. ++A completion guarantees that the operation is no longer dependent on ++local resources. ++The state of the operation within the fabric is not defined. ++.TP ++.B \f[I]FI_DELIVERY_COMPLETE\f[] ++Indicates that a completion should not be generated until an operation ++has been processed by the destination endpoint(s). ++A completion guarantees that the result of the operation is available; ++however, additional steps may need to be taken at the destination to ++retrieve the results. ++For example, an application may need to provide a receive buffers in ++order to retrieve messages that were buffered by the provider. ++.RS ++.RE ++.PP ++Delivery complete indicates that the message has been processed by the ++peer. ++If an application buffer was ready to receive the results of the message ++when it arrived, then delivery complete indicates that the data was ++placed into the application\[aq]s buffer. ++.PP ++This completion mode applies only to reliable endpoints. ++For operations that return data to the initiator, such as RMA read or ++atomic\-fetch, the source endpoint is also considered a destination ++endpoint. ++This is the default completion mode for such operations. ++.TP ++.B \f[I]FI_MATCH_COMPLETE\f[] ++Indicates that a completion should be generated only after the operation ++has been matched with an application specified buffer. ++Operations using this completion semantic are dependent on the ++application at the target claiming the message or results. ++As a result, match complete may involve additional provider level ++acknowledgements or lengthy delays. ++However, this completion model enables peer applications to synchronize ++their execution. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMMIT_COMPLETE\f[] ++Indicates that a completion should not be generated (locally or at the ++peer) until the result of an operation have been made persistent. ++A completion guarantees that the result is both available and durable, ++in the case of power failure. ++.RS ++.RE ++.PP ++This completion mode applies only to operations that target persistent ++memory regions over reliable endpoints. ++This completion mode is experimental. + .SH NOTES + .PP + A completion queue must be bound to at least one enabled endpoint before +@@ -615,9 +975,12 @@ CQ will result in it returning an FI_EOVERRUN error event. + Overrun completion queues are considered fatal and may not be used to + report additional completions once the overrun occurs. + .SH RETURN VALUES +-.PP +-fi_cq_open / fi_cq_signal : Returns 0 on success. ++.TP ++.B fi_cq_open / fi_cq_signal ++Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. ++.RS ++.RE + .PP + fi_cq_read / fi_cq_readfrom / fi_cq_readerr fi_cq_sread / + fi_cq_sreadfrom : On success, returns the number of completion events +@@ -625,9 +988,12 @@ retrieved from the completion queue. + On error, a negative value corresponding to fabric errno is returned. + If no completions are available to return from the CQ, \-FI_EAGAIN will + be returned. +-.PP +-fi_cq_strerror : Returns a character string interpretation of the +-provider specific error returned with a completion. ++.TP ++.B fi_cq_strerror ++Returns a character string interpretation of the provider specific error ++returned with a completion. ++.RS ++.RE + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH SEE ALSO +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_domain.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_domain.3 +index 9aaae9b7b..a358698f8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_domain.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_domain.3 +@@ -1,5 +1,8 @@ + .\"t +-.TH "fi_domain" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_domain" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_domain \- Open a fabric access domain +@@ -24,24 +27,43 @@ int\ fi_open_ops(struct\ fid\ *domain,\ const\ char\ *name,\ uint64_t\ flags, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fabric\f[] : Fabric domain +-.PP +-\f[I]info\f[] : Fabric information, including domain capabilities and +-attributes. +-.PP +-\f[I]domain\f[] : An opened access domain. +-.PP +-\f[I]context\f[] : User specified context associated with the domain. ++.TP ++.B \f[I]fabric\f[] ++Fabric domain ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++Fabric information, including domain capabilities and attributes. ++.RS ++.RE ++.TP ++.B \f[I]domain\f[] ++An opened access domain. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the domain. + This context is returned as part of any asynchronous event associated + with the domain. +-.PP +-\f[I]eq\f[] : Event queue for asynchronous operations initiated on the +-domain. +-.PP +-\f[I]name\f[] : Name associated with an interface. +-.PP +-\f[I]ops\f[] : Fabric interface operations. ++.RS ++.RE ++.TP ++.B \f[I]eq\f[] ++Event queue for asynchronous operations initiated on the domain. ++.RS ++.RE ++.TP ++.B \f[I]name\f[] ++Name associated with an interface. ++.RS ++.RE ++.TP ++.B \f[I]ops\f[] ++Fabric interface operations. ++.RS ++.RE + .SH DESCRIPTION + .PP + An access domain typically refers to a physical or virtual NIC or +@@ -145,25 +167,33 @@ accessed by multiple threads. + Applications which can guarantee serialization in their access of + provider allocated resources and interfaces enables a provider to + eliminate lower\-level locks. +-.PP +-\f[I]FI_THREAD_UNSPEC\f[] : This value indicates that no threading model +-has been defined. ++.TP ++.B \f[I]FI_THREAD_UNSPEC\f[] ++This value indicates that no threading model has been defined. + It may be used on input hints to the fi_getinfo call. + When specified, providers will return a threading model that allows for + the greatest level of parallelism. +-.PP +-\f[I]FI_THREAD_SAFE\f[] : A thread safe serialization model allows a +-multi\-threaded application to access any allocated resources through +-any interface without restriction. ++.RS ++.RE ++.TP ++.B \f[I]FI_THREAD_SAFE\f[] ++A thread safe serialization model allows a multi\-threaded application ++to access any allocated resources through any interface without ++restriction. + All providers are required to support FI_THREAD_SAFE. +-.PP +-\f[I]FI_THREAD_FID\f[] : A fabric descriptor (FID) serialization model +-requires applications to serialize access to individual fabric resources +-associated with data transfer operations and completions. ++.RS ++.RE ++.TP ++.B \f[I]FI_THREAD_FID\f[] ++A fabric descriptor (FID) serialization model requires applications to ++serialize access to individual fabric resources associated with data ++transfer operations and completions. + Multiple threads must be serialized when accessing the same endpoint, + transmit context, receive context, completion queue, counter, wait set, + or poll set. + Serialization is required only by threads accessing the same object. ++.RS ++.RE + .PP + For example, one thread may be initiating a data transfer on an + endpoint, while another thread reads from a completion queue associated +@@ -181,21 +211,26 @@ needing internal locking when handling data transfers. + Conceptually, FI_THREAD_FID maps well to providers that implement fabric + services in hardware and provide separate command queues to different + data flows. +-.PP +-\f[I]FI_THREAD_ENDPOINT\f[] : The endpoint threading model is similar to +-FI_THREAD_FID, but with the added restriction that serialization is +-required when accessing the same endpoint, even if multiple transmit and +-receive contexts are used. ++.TP ++.B \f[I]FI_THREAD_ENDPOINT\f[] ++The endpoint threading model is similar to FI_THREAD_FID, but with the ++added restriction that serialization is required when accessing the same ++endpoint, even if multiple transmit and receive contexts are used. + Conceptually, FI_THREAD_ENDPOINT maps well to providers that implement + fabric services in hardware but use a single command queue to access + different data flows. +-.PP +-\f[I]FI_THREAD_COMPLETION\f[] : The completion threading model is +-intended for providers that make use of manual progress. ++.RS ++.RE ++.TP ++.B \f[I]FI_THREAD_COMPLETION\f[] ++The completion threading model is intended for providers that make use ++of manual progress. + Applications must serialize access to all objects that are associated + through the use of having a shared completion structure. + This includes endpoint, transmit context, receive context, completion + queue, counter, wait set, and poll set objects. ++.RS ++.RE + .PP + For example, threads must serialize access to an endpoint and its bound + completion queue(s) and/or counters. +@@ -204,9 +239,12 @@ serialized. + .PP + The use of FI_THREAD_COMPLETION can increase parallelism over + FI_THREAD_SAFE, but requires the use of isolated resources. +-.PP +-\f[I]FI_THREAD_DOMAIN\f[] : A domain serialization model requires +-applications to serialize access to all objects belonging to a domain. ++.TP ++.B \f[I]FI_THREAD_DOMAIN\f[] ++A domain serialization model requires applications to serialize access ++to all objects belonging to a domain. ++.RS ++.RE + .SS Progress Models (control_progress / data_progress) + .PP + Progress is the ability of the underlying implementation to complete +@@ -238,33 +276,40 @@ and acknowledgement processing. + .PP + To balance between performance and ease of use, two progress models are + defined. +-.PP +-\f[I]FI_PROGRESS_UNSPEC\f[] : This value indicates that no progress +-model has been defined. ++.TP ++.B \f[I]FI_PROGRESS_UNSPEC\f[] ++This value indicates that no progress model has been defined. + It may be used on input hints to the fi_getinfo call. +-.PP +-\f[I]FI_PROGRESS_AUTO\f[] : This progress model indicates that the +-provider will make forward progress on an asynchronous operation without +-further intervention by the application. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROGRESS_AUTO\f[] ++This progress model indicates that the provider will make forward ++progress on an asynchronous operation without further intervention by ++the application. + When FI_PROGRESS_AUTO is provided as output to fi_getinfo in the absence + of any progress hints, it often indicates that the desired functionality + is implemented by the provider hardware or is a standard service of the + operating system. ++.RS ++.RE + .PP + All providers are required to support FI_PROGRESS_AUTO. + However, if a provider does not natively support automatic progress, + forcing the use of FI_PROGRESS_AUTO may result in threads being + allocated below the fabric interfaces. +-.PP +-\f[I]FI_PROGRESS_MANUAL\f[] : This progress model indicates that the +-provider requires the use of an application thread to complete an +-asynchronous request. ++.TP ++.B \f[I]FI_PROGRESS_MANUAL\f[] ++This progress model indicates that the provider requires the use of an ++application thread to complete an asynchronous request. + When manual progress is set, the provider will attempt to advance an + asynchronous operation forward when the application attempts to wait on + or read an event queue, completion queue, or counter where the completed + operation will be reported. + Progress also occurs when the application processes a poll or wait set + that has been associated with the event or completion queue. ++.RS ++.RE + .PP + Only wait operations defined by the fabric interface will result in an + operation progressing. +@@ -301,18 +346,24 @@ provider implementation and protocol may still provide some level of + protection against overruns. + However, such protection is not guaranteed. + The following values for resource management are defined. +-.PP +-\f[I]FI_RM_UNSPEC\f[] : This value indicates that no resource management +-model has been defined. ++.TP ++.B \f[I]FI_RM_UNSPEC\f[] ++This value indicates that no resource management model has been defined. + It may be used on input hints to the fi_getinfo call. +-.PP +-\f[I]FI_RM_DISABLED\f[] : The provider is free to select an +-implementation and protocol that does not protect against resource +-overruns. ++.RS ++.RE ++.TP ++.B \f[I]FI_RM_DISABLED\f[] ++The provider is free to select an implementation and protocol that does ++not protect against resource overruns. + The application is responsible for resource protection. +-.PP +-\f[I]FI_RM_ENABLED\f[] : Resource management is enabled for this +-provider domain. ++.RS ++.RE ++.TP ++.B \f[I]FI_RM_ENABLED\f[] ++Resource management is enabled for this provider domain. ++.RS ++.RE + .PP + The behavior of the various resource management options depends on + whether the endpoint is reliable or unreliable, as well as provider and +@@ -322,7 +373,7 @@ The table assumes that all peers enable or disable RM the same. + .PP + .TS + tab(@); +-c c c c c. ++cw(8.0n) cw(16.0n) cw(16.0n) cw(15.3n) cw(14.6n). + T{ + Resource + T}@T{ +@@ -438,17 +489,21 @@ T} + .PP + The resource column indicates the resource being accessed by a data + transfer operation. +-.PP +-\f[I]Tx Ctx / Rx Ctx\f[] : Refers to the transmit/receive contexts when +-a data transfer operation is submitted. ++.TP ++.B \f[I]Tx Ctx / Rx Ctx\f[] ++Refers to the transmit/receive contexts when a data transfer operation ++is submitted. + When RM is enabled, attempting to submit a request will fail if the + context is full. + If RM is disabled, an undefined error (provider specific) will occur. + Such errors should be considered fatal to the context, and applications + must take steps to avoid queue overruns. +-.PP +-\f[I]Tx CQ / Rx CQ\f[] : Refers to the completion queue associated with +-the Tx or Rx context when a local operation completes. ++.RS ++.RE ++.TP ++.B \f[I]Tx CQ / Rx CQ\f[] ++Refers to the completion queue associated with the Tx or Rx context when ++a local operation completes. + When RM is disabled, applications must take care to ensure that + completion queues do not get overrun. + When an overrun occurs, an undefined, but fatal, error will occur +@@ -463,9 +518,12 @@ that could result in CQ overruns, or internally retrying requests (which + will be hidden from the application). + See notes at the end of this section regarding CQ resource management + restrictions. +-.PP +-\f[I]Target EP / No Rx Buffer\f[] : Target EP refers to resources +-associated with the endpoint that is the target of a transmit operation. ++.RS ++.RE ++.TP ++.B \f[I]Target EP / No Rx Buffer\f[] ++Target EP refers to resources associated with the endpoint that is the ++target of a transmit operation. + This includes the target endpoint\[aq]s receive queue, posted receive + buffers (no Rx buffers), the receive side completion queue, and other + related packet processing queues. +@@ -475,10 +533,12 @@ incoming messages, received messages will be dropped. + For reliable endpoints, if RM is disabled, the transmit operation will + complete in error. + If RM is enabled, the provider will internally retry the operation. +-.PP +-\f[I]Rx Buffer Overrun\f[] : This refers to buffers posted to receive +-incoming tagged or untagged messages, with the behavior defined from the +-viewpoint of the sender. ++.RS ++.RE ++.TP ++.B \f[I]Rx Buffer Overrun\f[] ++This refers to buffers posted to receive incoming tagged or untagged ++messages, with the behavior defined from the viewpoint of the sender. + The behavior for handling received messages that are larger than the + buffers provided by the application is provider specific. + Providers may either truncate the message and report a successful +@@ -492,13 +552,18 @@ application buffer is made available. + The completion status may also be dependent upon the completion model + selected byt the application (e.g. + FI_DELIVERY_COMPLETE versus FI_TRANSMIT_COMPLETE). +-.PP +-\f[I]Unmatched RMA / RMA Overrun\f[] : Unmatched RMA and RMA overruns +-deal with the processing of RMA and atomic operations. ++.RS ++.RE ++.TP ++.B \f[I]Unmatched RMA / RMA Overrun\f[] ++Unmatched RMA and RMA overruns deal with the processing of RMA and ++atomic operations. + Unlike send operations, RMA operations that attempt to access a memory + address that is either not registered for such operations, or attempt to + access outside of the target memory region will fail, resulting in a + transmit error. ++.RS ++.RE + .PP + When a resource management error occurs on an endpoint, the endpoint is + transitioned into a disabled state. +@@ -533,15 +598,21 @@ size as the endpoint queue(s) that are bound to it. + Specifies the type of address vectors that are usable with this domain. + For additional details on AV type, see \f[C]fi_av\f[](3). + The following values may be specified. +-.PP +-\f[I]FI_AV_UNSPEC\f[] : Any address vector format is requested and +-supported. +-.PP +-\f[I]FI_AV_MAP\f[] : Only address vectors of type AV map are requested +-or supported. +-.PP +-\f[I]FI_AV_TABLE\f[] : Only address vectors of type AV index are +-requested or supported. ++.TP ++.B \f[I]FI_AV_UNSPEC\f[] ++Any address vector format is requested and supported. ++.RS ++.RE ++.TP ++.B \f[I]FI_AV_MAP\f[] ++Only address vectors of type AV map are requested or supported. ++.RS ++.RE ++.TP ++.B \f[I]FI_AV_TABLE\f[] ++Only address vectors of type AV index are requested or supported. ++.RS ++.RE + .PP + Address vectors are only used by connectionless endpoints. + Applications that require the use of a specific type of address vector +@@ -557,60 +628,85 @@ optimal AV type supported by this domain. + Defines memory registration specific mode bits used with this domain. + Full details on MR mode options are available in \f[C]fi_mr\f[](3). + The following values may be specified. +-.PP +-\f[I]FI_MR_LOCAL\f[] : The provider is optimized around having +-applications register memory for locally accessed data buffers. ++.TP ++.B \f[I]FI_MR_LOCAL\f[] ++The provider is optimized around having applications register memory for ++locally accessed data buffers. + Data buffers used in send and receive operations and as the source + buffer for RMA and atomic operations must be registered by the + application for access domains opened with this capability. +-.PP +-\f[I]FI_MR_RAW\f[] : The provider requires additional setup as part of +-their memory registration process. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_RAW\f[] ++The provider requires additional setup as part of their memory ++registration process. + This mode is required by providers that use a memory key that is larger + than 64\-bits. +-.PP +-\f[I]FI_MR_VIRT_ADDR\f[] : Registered memory regions are referenced by +-peers using the virtual address of the registered memory region, rather +-than a 0\-based offset. +-.PP +-\f[I]FI_MR_ALLOCATED\f[] : Indicates that memory registration occurs on +-allocated data buffers, and physical pages must back all virtual +-addresses being registered. +-.PP +-\f[I]FI_MR_PROV_KEY\f[] : Memory registration keys are selected and +-returned by the provider. +-.PP +-\f[I]FI_MR_MMU_NOTIFY\f[] : Indicates that the application is +-responsible for notifying the provider when the page tables referencing +-a registered memory region may have been updated. +-.PP +-\f[I]FI_MR_RMA_EVENT\f[] : Indicates that the memory regions associated +-with completion counters must be explicitly enabled after being bound to +-any counter. +-.PP +-\f[I]FI_MR_ENDPOINT\f[] : Memory registration occurs at the endpoint +-level, rather than domain. +-.PP +-\f[I]FI_MR_UNSPEC\f[] : Defined for compatibility \-\- library versions +-1.4 and earlier. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_VIRT_ADDR\f[] ++Registered memory regions are referenced by peers using the virtual ++address of the registered memory region, rather than a 0\-based offset. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_ALLOCATED\f[] ++Indicates that memory registration occurs on allocated data buffers, and ++physical pages must back all virtual addresses being registered. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_PROV_KEY\f[] ++Memory registration keys are selected and returned by the provider. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_MMU_NOTIFY\f[] ++Indicates that the application is responsible for notifying the provider ++when the page tables referencing a registered memory region may have ++been updated. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_RMA_EVENT\f[] ++Indicates that the memory regions associated with completion counters ++must be explicitly enabled after being bound to any counter. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_ENDPOINT\f[] ++Memory registration occurs at the endpoint level, rather than domain. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_UNSPEC\f[] ++Defined for compatibility \-\- library versions 1.4 and earlier. + Setting mr_mode to 0 indicates that FI_MR_BASIC or FI_MR_SCALABLE are + requested and supported. +-.PP +-\f[I]FI_MR_BASIC\f[] : Defined for compatibility \-\- library versions +-1.4 and earlier. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_BASIC\f[] ++Defined for compatibility \-\- library versions 1.4 and earlier. + Only basic memory registration operations are requested or supported. + This mode is equivalent to the FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, and + FI_MR_PROV_KEY flags being set in later library versions. + This flag may not be used in conjunction with other mr_mode bits. +-.PP +-\f[I]FI_MR_SCALABLE\f[] : Defined for compatibility \-\- library +-versions 1.4 and earlier. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_SCALABLE\f[] ++Defined for compatibility \-\- library versions 1.4 and earlier. + Only scalable memory registration operations are requested or supported. + Scalable registration uses offset based addressing, with application + selectable memory keys. + For library versions 1.5 and later, this is the default if no mr_mode + bits are set. + This flag may not be used in conjunction with other mr_mode bits. ++.RS ++.RE + .PP + Buffers used in data transfer operations may require notifying the + provider of their use before a data transfer can occur. +@@ -710,26 +806,33 @@ a single memory registration operation may reference. + Domain level capabilities. + Domain capabilities indicate domain level features that are supported by + the provider. +-.PP +-\f[I]FI_LOCAL_COMM\f[] : At a conceptual level, this field indicates +-that the underlying device supports loopback communication. ++.TP ++.B \f[I]FI_LOCAL_COMM\f[] ++At a conceptual level, this field indicates that the underlying device ++supports loopback communication. + More specifically, this field indicates that an endpoint may communicate + with other endpoints that are allocated from the same underlying named + domain. + If this field is not set, an application may need to use an alternate + domain or mechanism (e.g. + shared memory) to communicate with peers that execute on the same node. +-.PP +-\f[I]FI_REMOTE_COMM\f[] : This field indicates that the underlying +-provider supports communication with nodes that are reachable over the +-network. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_COMM\f[] ++This field indicates that the underlying provider supports communication ++with nodes that are reachable over the network. + If this field is not set, then the provider only supports communication + between processes that execute on the same node \-\- a shared memory + provider, for example. +-.PP +-\f[I]FI_SHARED_AV\f[] : Indicates that the domain supports the ability +-to share address vectors among multiple processes using the named +-address vector feature. ++.RS ++.RE ++.TP ++.B \f[I]FI_SHARED_AV\f[] ++Indicates that the domain supports the ability to share address vectors ++among multiple processes using the named address vector feature. ++.RS ++.RE + .PP + See \f[C]fi_getinfo\f[](3) for a discussion on primary versus secondary + capabilities. +@@ -737,11 +840,13 @@ All domain capabilities are considered secondary capabilities. + .SS mode + .PP + The operational mode bit related to using the domain. +-.PP +-\f[I]FI_RESTRICTED_COMP\f[] : This bit indicates that the domain limits +-completion queues and counters to only be used with endpoints, transmit +-contexts, and receive contexts that have the same set of capability +-flags. ++.TP ++.B \f[I]FI_RESTRICTED_COMP\f[] ++This bit indicates that the domain limits completion queues and counters ++to only be used with endpoints, transmit contexts, and receive contexts ++that have the same set of capability flags. ++.RS ++.RE + .SS Default authorization key (auth_key) + .PP + The default authorization key to associate with endpoint and memory +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_endpoint.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_endpoint.3 +index d11f7dc4e..53b3a2c57 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_endpoint.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_endpoint.3 +@@ -1,4 +1,7 @@ +-.TH "fi_endpoint" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_endpoint" "3" "2018\-11\-30" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_endpoint \- Fabric endpoint operations +@@ -123,41 +126,85 @@ DEPRECATED\ ssize_t\ fi_tx_size_left(struct\ fid_ep\ *ep); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fid\f[] : On creation, specifies a fabric or access domain. ++.TP ++.B \f[I]fid\f[] ++On creation, specifies a fabric or access domain. + On bind, identifies the event queue, completion queue, counter, or + address vector to bind to the endpoint. + In other cases, it\[aq]s a fabric identifier of an associated resource. +-.PP +-\f[I]info\f[] : Details about the fabric interface endpoint to be +-opened, obtained from fi_getinfo. +-.PP +-\f[I]ep\f[] : A fabric endpoint. +-.PP +-\f[I]sep\f[] : A scalable fabric endpoint. +-.PP +-\f[I]pep\f[] : A passive fabric endpoint. +-.PP +-\f[I]context\f[] : Context associated with the endpoint or asynchronous +-operation. +-.PP +-\f[I]index\f[] : Index to retrieve a specific transmit/receive context. +-.PP +-\f[I]attr\f[] : Transmit or receive context attributes. +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation. +-.PP +-\f[I]command\f[] : Command of control operation to perform on endpoint. +-.PP +-\f[I]arg\f[] : Optional control argument. +-.PP +-\f[I]level\f[] : Protocol level at which the desired option resides. +-.PP +-\f[I]optname\f[] : The protocol option to read or set. +-.PP +-\f[I]optval\f[] : The option value that was read or to set. +-.PP +-\f[I]optlen\f[] : The size of the optval buffer. ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++Details about the fabric interface endpoint to be opened, obtained from ++fi_getinfo. ++.RS ++.RE ++.TP ++.B \f[I]ep\f[] ++A fabric endpoint. ++.RS ++.RE ++.TP ++.B \f[I]sep\f[] ++A scalable fabric endpoint. ++.RS ++.RE ++.TP ++.B \f[I]pep\f[] ++A passive fabric endpoint. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++Context associated with the endpoint or asynchronous operation. ++.RS ++.RE ++.TP ++.B \f[I]index\f[] ++Index to retrieve a specific transmit/receive context. ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Transmit or receive context attributes. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation. ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Command of control operation to perform on endpoint. ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional control argument. ++.RS ++.RE ++.TP ++.B \f[I]level\f[] ++Protocol level at which the desired option resides. ++.RS ++.RE ++.TP ++.B \f[I]optname\f[] ++The protocol option to read or set. ++.RS ++.RE ++.TP ++.B \f[I]optval\f[] ++The option value that was read or to set. ++.RS ++.RE ++.TP ++.B \f[I]optlen\f[] ++The size of the optval buffer. ++.RS ++.RE + .SH DESCRIPTION + .PP + Endpoints are transport level communication portals. +@@ -287,27 +334,37 @@ based on the type of operation. + This is specified using fi_ep_bind flags. + The following flags may be used separately or OR\[aq]ed together when + binding an endpoint to a completion domain CQ. +-.PP +-\f[I]FI_TRANSMIT\f[] : Directs the completion of outbound data transfer +-requests to the specified completion queue. ++.TP ++.B \f[I]FI_TRANSMIT\f[] ++Directs the completion of outbound data transfer requests to the ++specified completion queue. + This includes send message, RMA, and atomic operations. +-.PP +-\f[I]FI_RECV\f[] : Directs the notification of inbound data transfers to +-the specified completion queue. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Directs the notification of inbound data transfers to the specified ++completion queue. + This includes received messages. + This binding automatically includes FI_REMOTE_WRITE, if applicable to + the endpoint. +-.PP +-\f[I]FI_SELECTIVE_COMPLETION\f[] : By default, data transfer operations +-generate completion entries into a completion queue after they have +-successfully completed. ++.RS ++.RE ++.TP ++.B \f[I]FI_SELECTIVE_COMPLETION\f[] ++By default, data transfer operations generate completion entries into a ++completion queue after they have successfully completed. + Applications can use this bind flag to selectively enable when + completions are generated. + If FI_SELECTIVE_COMPLETION is specified, data transfer operations will +-not generate entries for successful completions unless FI_COMPLETION is +-set as an operational flag for the given operation. ++not generate entries for \f[I]successful\f[] completions unless ++FI_COMPLETION is set as an operational flag for the given operation. ++Operations that fail asynchronously will still generate completions, ++even if a completion is not requested. + FI_SELECTIVE_COMPLETION must be OR\[aq]ed with FI_TRANSMIT and/or + FI_RECV flags. ++.RS ++.RE + .PP + When FI_SELECTIVE_COMPLETION is set, the user must determine when a + request that does NOT have FI_COMPLETION set has completed indirectly, +@@ -362,35 +419,52 @@ completions for all non\-fi_inject calls: + An endpoint may also be bound to a fabric counter. + When binding an endpoint to a counter, the following flags may be + specified. +-.PP +-\f[I]FI_SEND\f[] : Increments the specified counter whenever a message +-transfer initiated over the endpoint has completed successfully or in +-error. ++.TP ++.B \f[I]FI_SEND\f[] ++Increments the specified counter whenever a message transfer initiated ++over the endpoint has completed successfully or in error. + Sent messages include both tagged and normal message operations. +-.PP +-\f[I]FI_RECV\f[] : Increments the specified counter whenever a message +-is received over the endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Increments the specified counter whenever a message is received over the ++endpoint. + Received messages include both tagged and normal message operations. +-.PP +-\f[I]FI_READ\f[] : Increments the specified counter whenever an RMA read +-or atomic fetch operation initiated from the endpoint has completed +-successfully or in error. +-.PP +-\f[I]FI_WRITE\f[] : Increments the specified counter whenever an RMA +-write or atomic operation initiated from the endpoint has completed ++.RS ++.RE ++.TP ++.B \f[I]FI_READ\f[] ++Increments the specified counter whenever an RMA read, atomic fetch, or ++atomic compare operation initiated from the endpoint has completed + successfully or in error. +-.PP +-\f[I]FI_REMOTE_READ\f[] : Increments the specified counter whenever an +-RMA read or atomic fetch operation is initiated from a remote endpoint +-that targets the given endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_WRITE\f[] ++Increments the specified counter whenever an RMA write or base atomic ++operation initiated from the endpoint has completed successfully or in ++error. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_READ\f[] ++Increments the specified counter whenever an RMA read, atomic fetch, or ++atomic compare operation is initiated from a remote endpoint that ++targets the given endpoint. + Use of this flag requires that the endpoint be created using + FI_RMA_EVENT. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : Increments the specified counter whenever an +-RMA write or atomic operation is initiated from a remote endpoint that +-targets the given endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++Increments the specified counter whenever an RMA write or base atomic ++operation is initiated from a remote endpoint that targets the given ++endpoint. + Use of this flag requires that the endpoint be created using + FI_RMA_EVENT. ++.RS ++.RE + .PP + An endpoint may only be bound to a single CQ or counter for a given type + of operation. +@@ -491,35 +565,45 @@ The base operation of an endpoint is selected during creation using + struct fi_info. + The following control commands and arguments may be assigned to an + endpoint. +-.PP +-**FI_GETOPSFLAG \-\- uint64_t *flags** : Used to retrieve the current +-value of flags associated with the data transfer operations initiated on +-the endpoint. ++.TP ++.B **FI_GETOPSFLAG \-\- uint64_t *flags** ++Used to retrieve the current value of flags associated with the data ++transfer operations initiated on the endpoint. + The control argument must include FI_TRANSMIT or FI_RECV (not both) + flags to indicate the type of data transfer flags to be returned. + See below for a list of control flags. +-.PP +-**FI_SETOPSFLAG \-\- uint64_t *flags** : Used to change the data +-transfer operation flags associated with an endpoint. ++.RS ++.RE ++.TP ++.B **FI_SETOPSFLAG \-\- uint64_t *flags** ++Used to change the data transfer operation flags associated with an ++endpoint. + The control argument must include FI_TRANSMIT or FI_RECV (not both) to + indicate the type of data transfer that the flags should apply to, with + other flags OR\[aq]ed in. + The given flags will override the previous transmit and receive + attributes that were set when the endpoint was created. + Valid control flags are defined below. +-.PP +-**FI_BACKLOG \- int *value** : This option only applies to passive +-endpoints. ++.RS ++.RE ++.TP ++.B **FI_BACKLOG \- int *value** ++This option only applies to passive endpoints. + It is used to set the connection request backlog for listening + endpoints. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the file descriptor associated with a socket endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the file descriptor associated ++with a socket endpoint. + The fi_control arg parameter should be an address where a pointer to the + returned file descriptor will be written. + See fi_eq.3 for addition details using fi_control with FI_GETWAIT. + The file descriptor may be used for notification that the endpoint is + ready to send or receive data. ++.RS ++.RE + .SS fi_getopt / fi_setopt + .PP + Endpoint protocol operations may be retrieved using fi_getopt or set +@@ -532,18 +616,24 @@ and implementation specific details of an endpoint. + The following option levels and option names and parameters are defined. + .PP + \f[I]FI_OPT_ENDPOINT\f[] +-.IP \[bu] 2 +-\f[I]FI_OPT_MIN_MULTI_RECV \- size_t\f[] : Defines the minimum receive +-buffer space available when the receive buffer is released by the +-provider (see FI_MULTI_RECV). ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_OPT_MIN_MULTI_RECV \- size_t\f[] ++Defines the minimum receive buffer space available when the receive ++buffer is released by the provider (see FI_MULTI_RECV). + Modifying this value is only guaranteed to set the minimum buffer space + needed on receives posted after the value has been changed. + It is recommended that applications that want to override the default + MIN_MULTI_RECV value set this option before enabling the corresponding + endpoint. +-.IP \[bu] 2 +-\f[I]FI_OPT_CM_DATA_SIZE \- size_t\f[] : Defines the size of available +-space in CM messages for user\-defined data. ++.RS ++.RE ++.RE ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_OPT_CM_DATA_SIZE \- size_t\f[] ++Defines the size of available space in CM messages for user\-defined ++data. + This value limits the amount of data that applications can exchange + between peer endpoints using the fi_connect, fi_accept, and fi_reject + operations. +@@ -552,6 +642,47 @@ except in the case of passive endpoints, in which the size reflects the + maximum size of the data that may be present as part of a connection + request event. + This option is read only. ++.RS ++.RE ++.RE ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_OPT_BUFFERED_LIMIT \- size_t\f[] ++Defines the maximum size of a buffered message that will be reported to ++users as part of a receive completion when the FI_BUFFERED_RECV mode is ++enabled on an endpoint. ++.RS ++.RE ++.RE ++.PP ++fi_getopt() will return the currently configured threshold, or the ++provider\[aq]s default threshold if one has not be set by the ++application. ++fi_setopt() allows an application to configure the threshold. ++If the provider cannot support the requested threshold, it will fail the ++fi_setopt() call with FI_EMSGSIZE. ++Calling fi_setopt() with the threshold set to SIZE_MAX will set the ++threshold to the maximum supported by the provider. ++fi_getopt() can then be used to retrieve the set size. ++.PP ++In most cases, the sending and receiving endpoints must be configured to ++use the same threshold value, and the threshold must be set prior to ++enabling the endpoint. ++\[bu] .RS 2 ++.TP ++.B \f[I]FI_OPT_BUFFERED_MIN \- size_t\f[] ++Defines the minimum size of a buffered message that will be reported. ++Applications would set this to a size that\[aq]s big enough to decide ++whether to discard or claim a buffered receive or when to claim a ++buffered receive on getting a buffered receive completion. ++The value is typically used by a provider when sending a rendezvous ++protocol request where it would send atleast FI_OPT_BUFFERED_MIN bytes ++of application data along with it. ++A smaller sized renedezvous protocol message usually results in better ++latency for the overall transfer of a large message. ++.RS ++.RE ++.RE + .SS fi_rx_size_left (DEPRECATED) + .PP + This function has been deprecated and will be removed in a future +@@ -609,39 +740,55 @@ struct\ fi_ep_attr\ { + If specified, indicates the type of fabric interface communication + desired. + Supported types are: +-.PP +-\f[I]FI_EP_UNSPEC\f[] : The type of endpoint is not specified. ++.TP ++.B \f[I]FI_EP_UNSPEC\f[] ++The type of endpoint is not specified. + This is usually provided as input, with other attributes of the endpoint + or the provider selecting the type. +-.PP +-\f[I]FI_EP_MSG\f[] : Provides a reliable, connection\-oriented data +-transfer service with flow control that maintains message boundaries. +-.PP +-\f[I]FI_EP_DGRAM\f[] : Supports a connectionless, unreliable datagram +-communication. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_MSG\f[] ++Provides a reliable, connection\-oriented data transfer service with ++flow control that maintains message boundaries. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_DGRAM\f[] ++Supports a connectionless, unreliable datagram communication. + Message boundaries are maintained, but the maximum message size may be + limited to the fabric MTU. + Flow control is not guaranteed. +-.PP +-\f[I]FI_EP_RDM\f[] : Reliable datagram message. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_RDM\f[] ++Reliable datagram message. + Provides a reliable, unconnected data transfer service with flow control + that maintains message boundaries. +-.PP +-\f[I]FI_EP_SOCK_STREAM\f[] : Data streaming endpoint with TCP +-socket\-like semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_SOCK_STREAM\f[] ++Data streaming endpoint with TCP socket\-like semantics. + Provides a reliable, connection\-oriented data transfer service that + does not maintain message boundaries. + FI_EP_SOCK_STREAM is most useful for applications designed around using + TCP sockets. + See the SOCKET ENDPOINT section for additional details and restrictions + that apply to stream endpoints. +-.PP +-\f[I]FI_EP_SOCK_DGRAM\f[] : A connectionless, unreliable datagram +-endpoint with UDP socket\-like semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_EP_SOCK_DGRAM\f[] ++A connectionless, unreliable datagram endpoint with UDP socket\-like ++semantics. + FI_EP_SOCK_DGRAM is most useful for applications designed around using + UDP sockets. + See the SOCKET ENDPOINT section for additional details and restrictions + that apply to datagram socket endpoints. ++.RS ++.RE + .SS Protocol + .PP + Specifies the low\-level end to end protocol employed by the provider. +@@ -651,61 +798,96 @@ The following protocol values are defined. + Provider specific protocols are also allowed. + Provider specific protocols will be indicated by having the upper bit of + the protocol value set to one. +-.PP +-\f[I]FI_PROTO_UNSPEC\f[] : The protocol is not specified. ++.TP ++.B \f[I]FI_PROTO_UNSPEC\f[] ++The protocol is not specified. + This is usually provided as input, with other attributes of the socket + or the provider selecting the actual protocol. +-.PP +-\f[I]FI_PROTO_RDMA_CM_IB_RC\f[] : The protocol runs over Infiniband +-reliable\-connected queue pairs, using the RDMA CM protocol for +-connection establishment. +-.PP +-\f[I]FI_PROTO_IWARP\f[] : The protocol runs over the Internet wide area +-RDMA protocol transport. +-.PP +-\f[I]FI_PROTO_IB_UD\f[] : The protocol runs over Infiniband unreliable +-datagram queue pairs. +-.PP +-\f[I]FI_PROTO_PSMX\f[] : The protocol is based on an Intel proprietary +-protocol known as PSM, performance scaled messaging. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_RDMA_CM_IB_RC\f[] ++The protocol runs over Infiniband reliable\-connected queue pairs, using ++the RDMA CM protocol for connection establishment. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_IWARP\f[] ++The protocol runs over the Internet wide area RDMA protocol transport. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_IB_UD\f[] ++The protocol runs over Infiniband unreliable datagram queue pairs. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_PSMX\f[] ++The protocol is based on an Intel proprietary protocol known as PSM, ++performance scaled messaging. + PSMX is an extended version of the PSM protocol to support the libfabric + interfaces. +-.PP +-\f[I]FI_PROTO_UDP\f[] : The protocol sends and receives UDP datagrams. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_UDP\f[] ++The protocol sends and receives UDP datagrams. + For example, an endpoint using \f[I]FI_PROTO_UDP\f[] will be able to + communicate with a remote peer that is using Berkeley + \f[I]SOCK_DGRAM\f[] sockets using \f[I]IPPROTO_UDP\f[]. +-.PP +-\f[I]FI_PROTO_SOCK_TCP\f[] : The protocol is layered over TCP packets. +-.PP +-\f[I]FI_PROTO_IWARP_RDM\f[] : Reliable\-datagram protocol implemented +-over iWarp reliable\-connected queue pairs. +-.PP +-\f[I]FI_PROTO_IB_RDM\f[] : Reliable\-datagram protocol implemented over +-InfiniBand reliable\-connected queue pairs. +-.PP +-\f[I]FI_PROTO_GNI\f[] : Protocol runs over Cray GNI low\-level +-interface. +-.PP +-\f[I]FI_PROTO_RXM\f[] : Reliable\-datagram protocol implemented over +-message endpoints. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_SOCK_TCP\f[] ++The protocol is layered over TCP packets. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_IWARP_RDM\f[] ++Reliable\-datagram protocol implemented over iWarp reliable\-connected ++queue pairs. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_IB_RDM\f[] ++Reliable\-datagram protocol implemented over InfiniBand ++reliable\-connected queue pairs. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_GNI\f[] ++Protocol runs over Cray GNI low\-level interface. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_RXM\f[] ++Reliable\-datagram protocol implemented over message endpoints. + RXM is a libfabric utility component that adds RDM endpoint semantics + over MSG endpoint semantics. +-.PP +-\f[I]FI_PROTO_RXD\f[] : Reliable\-datagram protocol implemented over +-datagram endpoints. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_RXD\f[] ++Reliable\-datagram protocol implemented over datagram endpoints. + RXD is a libfabric utility component that adds RDM endpoint semantics + over DGRAM endpoint semantics. +-.PP +-\f[I]FI_PROTO_NETWORKDIRECT\f[] : Protocol runs over Microsoft +-NetworkDirect service provider interface. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_NETWORKDIRECT\f[] ++Protocol runs over Microsoft NetworkDirect service provider interface. + This adds reliable\-datagram semantics over the NetworkDirect + connection\- oriented endpoint semantics. +-.PP +-\f[I]FI_PROTO_PSMX2\f[] : The protocol is based on an Intel proprietary +-protocol known as PSM2, performance scaled messaging version 2. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROTO_PSMX2\f[] ++The protocol is based on an Intel proprietary protocol known as PSM2, ++performance scaled messaging version 2. + PSMX2 is an extended version of the PSM2 protocol to support the + libfabric interfaces. ++.RS ++.RE + .SS protocol_version \- Protocol Version + .PP + Identifies which version of the protocol is employed by the provider. +@@ -755,28 +937,37 @@ Providers specify when data ordering is maintained through the following + values. + Note that even if data ordering is not maintained, message ordering may + be. +-.PP +-\f[I]max_order_raw_size\f[] : Read after write size. ++.TP ++.B \f[I]max_order_raw_size\f[] ++Read after write size. + If set, an RMA or atomic read operation issued after an RMA or atomic + write operation, both of which are smaller than the size, will be + ordered. + Where the target memory locations overlap, the RMA or atomic read + operation will see the results of the previous RMA or atomic write. +-.PP +-\f[I]max_order_war_size\f[] : Write after read size. ++.RS ++.RE ++.TP ++.B \f[I]max_order_war_size\f[] ++Write after read size. + If set, an RMA or atomic write operation issued after an RMA or atomic + read operation, both of which are smaller than the size, will be + ordered. + The RMA or atomic read operation will see the initial value of the + target memory location before a subsequent RMA or atomic write updates + the value. +-.PP +-\f[I]max_order_waw_size\f[] : Write after write size. ++.RS ++.RE ++.TP ++.B \f[I]max_order_waw_size\f[] ++Write after write size. + If set, an RMA or atomic write operation issued after an RMA or atomic + write operation, both of which are smaller than the size, will be + ordered. + The target memory location will reflect the results of the second RMA or + atomic write. ++.RS ++.RE + .PP + An order size value of 0 indicates that ordering is not guaranteed. + A value of \-1 guarantees ordering for any data size. +@@ -801,6 +992,8 @@ The first field consists of 2\-bits, the second field 4\-bits, and the + final field 8\-bits. + Valid masks for such a tagged field would be a bitwise OR\[aq]ing of + zero or more of the following values: 0x3000, 0x0F00, and 0x00FF. ++The provider may not validate the mask provided by the application for ++performance reasons. + .PP + By identifying fields within a tag, a provider may be able to optimize + their search routines. +@@ -812,9 +1005,9 @@ A provider must return a tag format that supports the requested number + of fields, with each field being at least the size requested, or fail + the request. + A provider may increase the size of the fields. +-When reporting completions (see FI_CQ_FORMAT_TAGGED), the provider must +-provide the exact value of the received tag, clearing out any +-unsupported tag bits. ++When reporting completions (see FI_CQ_FORMAT_TAGGED), it is not ++guaranteed that the provider would clear out any unsupported tag bits in ++the tag field of the completion entry. + .PP + It is recommended that field sizes be ordered from smallest to largest. + A generic, unstructured tag and mask can be achieved by requesting a bit +@@ -943,63 +1136,93 @@ which message data is sent or received by the transport layer. + Message ordering requires matching ordering semantics on the receiving + side of a data transfer operation in order to guarantee that ordering is + met. +-.PP +-\f[I]FI_ORDER_NONE\f[] : No ordering is specified. ++.TP ++.B \f[I]FI_ORDER_NONE\f[] ++No ordering is specified. + This value may be used as input in order to obtain the default message + order supported by the provider. + FI_ORDER_NONE is an alias for the value 0. +-.PP +-\f[I]FI_ORDER_RAR\f[] : Read after read. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_RAR\f[] ++Read after read. + If set, RMA and atomic read operations are transmitted in the order + submitted relative to other RMA and atomic read operations. + If not set, RMA and atomic reads may be transmitted out of order from + their submission. +-.PP +-\f[I]FI_ORDER_RAW\f[] : Read after write. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_RAW\f[] ++Read after write. + If set, RMA and atomic read operations are transmitted in the order + submitted relative to RMA and atomic write operations. + If not set, RMA and atomic reads may be transmitted ahead of RMA and + atomic writes. +-.PP +-\f[I]FI_ORDER_RAS\f[] : Read after send. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_RAS\f[] ++Read after send. + If set, RMA and atomic read operations are transmitted in the order + submitted relative to message send operations, including tagged sends. + If not set, RMA and atomic reads may be transmitted ahead of sends. +-.PP +-\f[I]FI_ORDER_WAR\f[] : Write after read. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_WAR\f[] ++Write after read. + If set, RMA and atomic write operations are transmitted in the order + submitted relative to RMA and atomic read operations. + If not set, RMA and atomic writes may be transmitted ahead of RMA and + atomic reads. +-.PP +-\f[I]FI_ORDER_WAW\f[] : Write after write. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_WAW\f[] ++Write after write. + If set, RMA and atomic write operations are transmitted in the order + submitted relative to other RMA and atomic write operations. + If not set, RMA and atomic writes may be transmitted out of order from + their submission. +-.PP +-\f[I]FI_ORDER_WAS\f[] : Write after send. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_WAS\f[] ++Write after send. + If set, RMA and atomic write operations are transmitted in the order + submitted relative to message send operations, including tagged sends. + If not set, RMA and atomic writes may be transmitted ahead of sends. +-.PP +-\f[I]FI_ORDER_SAR\f[] : Send after read. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_SAR\f[] ++Send after read. + If set, message send operations, including tagged sends, are transmitted + in order submitted relative to RMA and atomic read operations. + If not set, message sends may be transmitted ahead of RMA and atomic + reads. +-.PP +-\f[I]FI_ORDER_SAW\f[] : Send after write. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_SAW\f[] ++Send after write. + If set, message send operations, including tagged sends, are transmitted + in order submitted relative to RMA and atomic write operations. + If not set, message sends may be transmitted ahead of RMA and atomic + writes. +-.PP +-\f[I]FI_ORDER_SAS\f[] : Send after send. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_SAS\f[] ++Send after send. + If set, message send operations, including tagged sends, are transmitted + in the order submitted relative to other message send. + If not set, message sends may be transmitted out of order from their + submission. ++.RS ++.RE + .SS comp_order \- Completion Ordering + .PP + Completion ordering refers to the order in which completed requests are +@@ -1028,13 +1251,18 @@ Providers should return the completion order that they actually provide, + with the constraint that the returned ordering is stricter than that + specified by the application. + Supported completion order values are: +-.PP +-\f[I]FI_ORDER_NONE\f[] : No ordering is defined for completed +-operations. ++.TP ++.B \f[I]FI_ORDER_NONE\f[] ++No ordering is defined for completed operations. + Requests submitted to the transmit context may complete in any order. +-.PP +-\f[I]FI_ORDER_STRICT\f[] : Requests complete in the order in which they +-are submitted to the transmit context. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_STRICT\f[] ++Requests complete in the order in which they are submitted to the ++transmit context. ++.RS ++.RE + .SS inject_size + .PP + The requested inject operation size (see the FI_INJECT flag) that the +@@ -1120,20 +1348,27 @@ FI_ORDER_WAS, FI_ORDER_SAR, FI_ORDER_SAW, and FI_ORDER_SAS. + .PP + For a description of completion ordering, see the comp_order field in + the \f[I]Transmit Context Attribute\f[] section. +-.PP +-\f[I]FI_ORDER_NONE\f[] : No ordering is defined for completed +-operations. ++.TP ++.B \f[I]FI_ORDER_NONE\f[] ++No ordering is defined for completed operations. + Receive operations may complete in any order, regardless of their + submission order. +-.PP +-\f[I]FI_ORDER_STRICT\f[] : Receive operations complete in the order in +-which they are processed by the receive context, based on the receive +-side msg_order attribute. +-.PP +-\f[I]FI_ORDER_DATA\f[] : When set, this bit indicates that received data +-is written into memory in order. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_STRICT\f[] ++Receive operations complete in the order in which they are processed by ++the receive context, based on the receive side msg_order attribute. ++.RS ++.RE ++.TP ++.B \f[I]FI_ORDER_DATA\f[] ++When set, this bit indicates that received data is written into memory ++in order. + Data ordering applies to memory accessed as part of a single operation + and between operations if message ordering is guaranteed. ++.RS ++.RE + .SS total_buffered_recv + .PP + This field is supported for backwards compatibility purposes. +@@ -1355,17 +1590,21 @@ Operation flags define the default flags applied to an endpoint\[aq]s + data transfer operations, where a flags parameter is not available. + Data transfer operations that take flags as input override the op_flags + value of transmit or receive context attributes of an endpoint. +-.PP +-\f[I]FI_INJECT\f[] : Indicates that all outbound data buffers should be +-returned to the user\[aq]s control immediately after a data transfer +-call returns, even if the operation is handled asynchronously. ++.TP ++.B \f[I]FI_INJECT\f[] ++Indicates that all outbound data buffers should be returned to the ++user\[aq]s control immediately after a data transfer call returns, even ++if the operation is handled asynchronously. + This may require that the provider copy the data into a local buffer and + transfer out of that buffer. + A provider can limit the total amount of send data that may be buffered + and/or the size of a single send that can use this flag. + This limit is indicated using inject_size (see inject_size above). +-.PP +-\f[I]FI_MULTI_RECV\f[] : Applies to posted receive operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTI_RECV\f[] ++Applies to posted receive operations. + This flag allows the user to post a single buffer that will receive + multiple incoming messages. + Received messages will be packed into the receive buffer until the +@@ -1376,71 +1615,53 @@ The placement of received data into the buffer may be subjected to + provider specific alignment restrictions. + The buffer will be released by the provider when the available buffer + space falls below the specified minimum (see FI_OPT_MIN_MULTI_RECV). +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for data transfer operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for data transfer ++operations. + This flag only applies to operations issued on endpoints that were bound + to a CQ or counter with the FI_SELECTIVE_COMPLETION flag. + See the fi_ep_bind section above for more detail. +-.PP +-\f[I]FI_INJECT_COMPLETE\f[] : Indicates that a completion should be +-generated when the source buffer(s) may be reused. +-A completion guarantees that the buffers will not be read from again and +-the application may reclaim them. +-No other guarantees are made with respect to the state of the operation. +-.PP +-Note: This flag is used to control when a completion entry is inserted +-into a completion queue. +-It does not apply to operations that do not generate a completion queue +-entry, such as the fi_inject operation, and is not subject to the +-inject_size message limit restriction. +-.PP +-\f[I]FI_TRANSMIT_COMPLETE\f[] : Indicates that a completion should be +-generated when the transmit operation has completed relative to the +-local provider. +-The exact behavior is dependent on the endpoint type. +-.PP +-For reliable endpoints: +-.PP +-Indicates that a completion should be generated when the operation has +-been delivered to the peer endpoint. +-A completion guarantees that the operation is no longer dependent on the +-fabric or local resources. +-The state of the operation at the peer endpoint is not defined. +-.PP +-For unreliable endpoints: +-.PP ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Indicates that a completion should be generated when the source ++buffer(s) may be reused. ++See \f[C]fi_cq\f[](3) for additional details on completion semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Indicates that a completion should be generated when the transmit ++operation has completed relative to the local provider. ++See \f[C]fi_cq\f[](3) for additional details on completion semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_DELIVERY_COMPLETE\f[] + Indicates that a completion should be generated when the operation has +-been delivered to the fabric. +-A completion guarantees that the operation is no longer dependent on +-local resources. +-The state of the operation within the fabric is not defined. +-.PP +-\f[I]FI_DELIVERY_COMPLETE\f[] : Indicates that a completion should not +-be generated until an operation has been processed by the destination +-endpoint(s). +-A completion guarantees that the result of the operation is available. +-.PP +-This completion mode applies only to reliable endpoints. +-For operations that return data to the initiator, such as RMA read or +-atomic\-fetch, the source endpoint is also considered a destination +-endpoint. +-This is the default completion mode for such operations. +-.PP +-\f[I]FI_COMMIT_COMPLETE\f[] : Indicates that a completion should not be +-generated (locally or at the peer) until the result of an operation have +-been made persistent. +-A completion guarantees that the result is both available and durable, +-in the case of power failure. +-.PP +-This completion mode applies only to operations that target persistent +-memory regions over reliable endpoints. +-This completion mode is experimental. +-.PP +-\f[I]FI_MULTICAST\f[] : Indicates that data transfers will target +-multicast addresses by default. ++been processed by the destination endpoint(s). ++See \f[C]fi_cq\f[](3) for additional details on completion semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMMIT_COMPLETE\f[] ++Indicates that a completion should not be generated (locally or at the ++peer) until the result of an operation have been made persistent. ++See \f[C]fi_cq\f[](3) for additional details on completion semantics. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTICAST\f[] ++Indicates that data transfers will target multicast addresses by ++default. + Any fi_addr_t passed into a data transfer operation will be treated as a + multicast address. ++.RS ++.RE + .SH NOTES + .PP + Users should call fi_close to release all resources allocated to the +@@ -1492,18 +1713,25 @@ submitted for processing. + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_EDOMAIN\f[] : A resource domain was not bound to the endpoint +-or an attempt was made to bind multiple domains. +-.PP +-\f[I]\-FI_ENOCQ\f[] : The endpoint has not been configured with +-necessary event queue. +-.PP +-\f[I]\-FI_EOPBADSTATE\f[] : The endpoint\[aq]s state does not permit the +-requested operation. ++.TP ++.B \f[I]\-FI_EDOMAIN\f[] ++A resource domain was not bound to the endpoint or an attempt was made ++to bind multiple domains. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_ENOCQ\f[] ++The endpoint has not been configured with necessary event queue. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EOPBADSTATE\f[] ++The endpoint\[aq]s state does not permit the requested operation. ++.RS ++.RE + .SH SEE ALSO + .PP +-\f[C]fi_getinfo\f[](3), \f[C]fi_domain\f[](3), \f[C]fi_msg\f[](3), +-\f[C]fi_tagged\f[](3), \f[C]fi_rma\f[](3) ++\f[C]fi_getinfo\f[](3), \f[C]fi_domain\f[](3), \f[C]fi_cq\f[](3) ++\f[C]fi_msg\f[](3), \f[C]fi_tagged\f[](3), \f[C]fi_rma\f[](3) + .SH AUTHORS + OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_eq.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_eq.3 +index 9ee313602..ae9a1a0ce 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_eq.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_eq.3 +@@ -1,20 +1,40 @@ +-.TH "fi_eq" "3" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_eq" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_eq \- Event queue operations +-.PP +-fi_eq_open / fi_close : Open/close an event queue +-.PP +-fi_control : Control operation of EQ +-.PP +-fi_eq_read / fi_eq_readerr : Read an event from an event queue +-.PP +-fi_eq_write : Writes an event to an event queue +-.PP +-fi_eq_sread : A synchronous (blocking) read of an event queue +-.PP +-fi_eq_strerror : Converts provider specific error information into a +-printable string ++.TP ++.B fi_eq_open / fi_close ++Open/close an event queue ++.RS ++.RE ++.TP ++.B fi_control ++Control operation of EQ ++.RS ++.RE ++.TP ++.B fi_eq_read / fi_eq_readerr ++Read an event from an event queue ++.RS ++.RE ++.TP ++.B fi_eq_write ++Writes an event to an event queue ++.RS ++.RE ++.TP ++.B fi_eq_sread ++A synchronous (blocking) read of an event queue ++.RS ++.RE ++.TP ++.B fi_eq_strerror ++Converts provider specific error information into a printable string ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -45,36 +65,74 @@ const\ char\ *\ fi_eq_strerror(struct\ fid_eq\ *eq,\ int\ prov_errno, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fabric\f[] : Opened fabric descriptor +-.PP +-\f[I]eq\f[] : Event queue +-.PP +-\f[I]attr\f[] : Event queue attributes +-.PP +-\f[I]context\f[] : User specified context associated with the event +-queue. +-.PP +-\f[I]event\f[] : Reported event +-.PP +-\f[I]buf\f[] : For read calls, the data buffer to write events into. ++.TP ++.B \f[I]fabric\f[] ++Opened fabric descriptor ++.RS ++.RE ++.TP ++.B \f[I]eq\f[] ++Event queue ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Event queue attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the event queue. ++.RS ++.RE ++.TP ++.B \f[I]event\f[] ++Reported event ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++For read calls, the data buffer to write events into. + For write calls, an event to insert into the event queue. + For fi_eq_strerror, an optional buffer that receives printable error + information. +-.PP +-\f[I]len\f[] : Length of data buffer +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation +-.PP +-\f[I]command\f[] : Command of control operation to perform on EQ. +-.PP +-\f[I]arg\f[] : Optional control argument +-.PP +-\f[I]prov_errno\f[] : Provider specific error value +-.PP +-\f[I]err_data\f[] : Provider specific error data related to a completion +-.PP +-\f[I]timeout\f[] : Timeout specified in milliseconds ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data buffer ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Command of control operation to perform on EQ. ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional control argument ++.RS ++.RE ++.TP ++.B \f[I]prov_errno\f[] ++Provider specific error value ++.RS ++.RE ++.TP ++.B \f[I]err_data\f[] ++Provider specific error data related to a completion ++.RS ++.RE ++.TP ++.B \f[I]timeout\f[] ++Timeout specified in milliseconds ++.RS ++.RE + .SH DESCRIPTION + .PP + Event queues are used to report events associated with control +@@ -102,76 +160,112 @@ struct\ fi_eq_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]size\f[] : Specifies the minimum size of an event queue. +-.PP +-\f[I]flags\f[] : Flags that control the configuration of the EQ. +-.IP \[bu] 2 +-\f[I]FI_WRITE\f[] : Indicates that the application requires support for +-inserting user events into the EQ. ++.TP ++.B \f[I]size\f[] ++Specifies the minimum size of an event queue. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Flags that control the configuration of the EQ. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WRITE\f[] ++Indicates that the application requires support for inserting user ++events into the EQ. + If this flag is set, then the fi_eq_write operation must be supported by + the provider. + If the FI_WRITE flag is not set, then the application may not invoke + fi_eq_write. +-.IP \[bu] 2 +-\f[I]FI_AFFINITY\f[] : Indicates that the signaling_vector field (see +-below) is valid. +-.PP +-\f[I]wait_obj\f[] : EQ\[aq]s may be associated with a specific wait +-object. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_AFFINITY\f[] ++Indicates that the signaling_vector field (see below) is valid. ++.RS ++.RE ++.TP ++.B \f[I]wait_obj\f[] ++EQ\[aq]s may be associated with a specific wait object. + Wait objects allow applications to block until the wait object is + signaled, indicating that an event is available to be read. + Users may use fi_control to retrieve the underlying wait object + associated with an EQ, in order to use it in other system calls. + The following values may be used to specify the type of wait object + associated with an EQ: +-.IP \[bu] 2 +-\f[I]FI_WAIT_NONE\f[] : Used to indicate that the user will not block +-(wait) for events on the EQ. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_NONE\f[] ++Used to indicate that the user will not block (wait) for events on the ++EQ. + When FI_WAIT_NONE is specified, the application may not call + fi_eq_sread. + This is the default is no wait object is specified. +-.IP \[bu] 2 +-\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the +-EQ using fabric interface calls, such as fi_eq_sread. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_UNSPEC\f[] ++Specifies that the user will only wait on the EQ using fabric interface ++calls, such as fi_eq_sread. + In this case, the underlying provider may select the most appropriate or + highest performing wait object available, including custom wait + mechanisms. + Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve + the underlying wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_SET\f[] : Indicates that the event queue should use a wait +-set object to wait for events. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_SET\f[] ++Indicates that the event queue should use a wait set object to wait for ++events. + If specified, the wait_set field must reference an existing wait set + object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_FD\f[] : Indicates that the EQ should use a file descriptor +-as its wait mechanism. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_FD\f[] ++Indicates that the EQ should use a file descriptor as its wait ++mechanism. + A file descriptor wait object must be usable in select, poll, and epoll + routines. + However, a provider may signal an FD wait object by marking it as + readable or with an error. +-.IP \[bu] 2 +-\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the EQ should use a pthread +-mutex and cond variable as a wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_CRITSEC_COND\f[] : Windows specific. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_MUTEX_COND\f[] ++Specifies that the EQ should use a pthread mutex and cond variable as a ++wait object. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_CRITSEC_COND\f[] ++Windows specific. + Specifies that the EQ should use a critical section and condition + variable as a wait object. +-.PP +-\f[I]signaling_vector\f[] : If the FI_AFFINITY flag is set, this +-indicates the logical cpu number (0..max cpu \- 1) that interrupts +-associated with the EQ should target. ++.RS ++.RE ++.TP ++.B \f[I]signaling_vector\f[] ++If the FI_AFFINITY flag is set, this indicates the logical cpu number ++(0..max cpu \- 1) that interrupts associated with the EQ should target. + This field should be treated as a hint to the provider and may be + ignored if the provider does not support interrupt affinity. +-.PP +-\f[I]wait_set\f[] : If wait_obj is FI_WAIT_SET, this field references a +-wait object to which the event queue should attach. ++.RS ++.RE ++.TP ++.B \f[I]wait_set\f[] ++If wait_obj is FI_WAIT_SET, this field references a wait object to which ++the event queue should attach. + When an event is inserted into the event queue, the corresponding wait + set will be signaled if all necessary conditions are met. + The use of a wait_set enables an optimized method of waiting for events + across multiple event queues. + This field is ignored if wait_obj is not FI_WAIT_SET. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with an event queue. +@@ -186,15 +280,18 @@ specific details of the event queue. + Access to the EQ should be serialized across all calls when fi_control + is invoked, as it may redirect the implementation of EQ operations. + The following control commands are usable with an EQ. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the low\-level wait object associated with the EQ. ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the low\-level wait object ++associated with the EQ. + The format of the wait\-object is specified during EQ creation, through + the EQ attributes. + The fi_control arg parameter should be an address where a pointer to the + returned wait object will be written. + This should be an \[aq]int *\[aq] for FI_WAIT_FD, or \[aq]struct + fi_mutex_cond\[aq] for FI_WAIT_MUTEX_COND. ++.RS ++.RE + .IP + .nf + \f[C] +@@ -220,12 +317,14 @@ from the EQ. + .PP + The following types of events may be reported to an EQ, along with + information regarding the format associated with each event. +-.PP +-\f[I]Asynchronous Control Operations\f[] : Asynchronous control +-operations are basic requests that simply need to generate an event to +-indicate that they have completed. ++.TP ++.B \f[I]Asynchronous Control Operations\f[] ++Asynchronous control operations are basic requests that simply need to ++generate an event to indicate that they have completed. + These include the following types of events: memory registration, + address vector resolution, and multicast joins. ++.RS ++.RE + .PP + Control requests report their completion by inserting a + \f[C]struct\ \ \ fi_eq_entry\f[] into the EQ. +@@ -254,14 +353,16 @@ the fabric descriptor. + The data field will be set as described in the man page for the + corresponding object type (e.g., see \f[C]fi_av\f[](3) for a description + of how asynchronous address vector insertions are completed). +-.PP +-\f[I]Connection Notification\f[] : Connection notifications are +-connection management notifications used to setup or tear down +-connections between endpoints. ++.TP ++.B \f[I]Connection Notification\f[] ++Connection notifications are connection management notifications used to ++setup or tear down connections between endpoints. + There are three connection notification events: FI_CONNREQ, + FI_CONNECTED, and FI_SHUTDOWN. + Connection notifications are reported using + \f[C]struct\ \ \ fi_eq_cm_entry\f[]: ++.RS ++.RE + .IP + .nf + \f[C] +@@ -318,13 +419,15 @@ is done through the FI_SHUTDOWN event. + Shutdown notification uses struct fi_eq_cm_entry as declared above. + The fid field for a shutdown notification refers to the active + endpoint\[aq]s fid_ep. +-.PP +-\f[I]Asynchronous Error Notification\f[] : Asynchronous errors are used +-to report problems with fabric resources. ++.TP ++.B \f[I]Asynchronous Error Notification\f[] ++Asynchronous errors are used to report problems with fabric resources. + Reported errors may be fatal or transient, based on the error, and + result in the resource becoming disabled. + Disabled resources will fail operations submitted against them until + they are explicitly re\-enabled by the application. ++.RS ++.RE + .PP + Asynchronous errors may be reported for completion queues and endpoints + of all types. +@@ -423,9 +526,9 @@ ensure that the buffer referenced by err_data does not change. + The EQ entry data structures share many of the same fields. + The meanings are the same or similar for all EQ structure formats, with + specific details described below. +-.PP +-\f[I]fid\f[] : This corresponds to the fabric descriptor associated with +-the event. ++.TP ++.B \f[I]fid\f[] ++This corresponds to the fabric descriptor associated with the event. + The type of fid depends on the event being reported. + For FI_CONNREQ this will be the fid of the passive endpoint. + FI_CONNECTED and FI_SHUTDOWN will reference the active endpoint. +@@ -435,42 +538,60 @@ FI_JOIN_COMPLETE will point to the multicast descriptor returned as part + of the join operation. + Applications can use fid\->context value to retrieve the context + associated with the fabric descriptor. +-.PP +-\f[I]context\f[] : The context value is set to the context parameter +-specified with the operation that generated the event. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++The context value is set to the context parameter specified with the ++operation that generated the event. + If no context parameter is associated with the operation, this field + will be NULL. +-.PP +-\f[I]data\f[] : Data is an operation specific value or set of bytes. ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++Data is an operation specific value or set of bytes. + For connection events, data is application data exchanged as part of the + connection protocol. +-.PP +-\f[I]err\f[] : This err code is a positive fabric errno associated with +-an event. ++.RS ++.RE ++.TP ++.B \f[I]err\f[] ++This err code is a positive fabric errno associated with an event. + The err value indicates the general reason for an error, if one + occurred. + See fi_errno.3 for a list of possible error codes. +-.PP +-\f[I]prov_errno\f[] : On an error, prov_errno may contain a provider +-specific error code. ++.RS ++.RE ++.TP ++.B \f[I]prov_errno\f[] ++On an error, prov_errno may contain a provider specific error code. + The use of this field and its meaning is provider specific. + It is intended to be used as a debugging aid. + See fi_eq_strerror for additional details on converting this error value + into a human readable string. +-.PP +-\f[I]err_data\f[] : On an error, err_data may reference a provider +-specific amount of data associated with an error. ++.RS ++.RE ++.TP ++.B \f[I]err_data\f[] ++On an error, err_data may reference a provider specific amount of data ++associated with an error. + The use of this field and its meaning is provider specific. + It is intended to be used as a debugging aid. + See fi_eq_strerror for additional details on converting this error data + into a human readable string. +-.PP +-\f[I]err_data_size\f[] : On input, err_data_size indicates the size of +-the err_data buffer in bytes. ++.RS ++.RE ++.TP ++.B \f[I]err_data_size\f[] ++On input, err_data_size indicates the size of the err_data buffer in ++bytes. + On output, err_data_size will be set to the number of bytes copied to + the err_data buffer. + The err_data information is typically used with fi_eq_strerror to + provide details about the type of error that occurred. ++.RS ++.RE + .PP + For compatibility purposes, if err_data_size is 0 on input, or the + fabric was opened with release < 1.5, err_data will be set to a data +@@ -491,22 +612,32 @@ will result in it returning an FI_EOVERRUN error event. + Overrun event queues are considered fatal and may not be used to report + additional events once the overrun occurs. + .SH RETURN VALUES +-.PP +-fi_eq_open : Returns 0 on success. ++.TP ++.B fi_eq_open ++Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. +-.PP +-fi_eq_read / fi_eq_readerr / fi_eq_sread : On success, returns the +-number of bytes read from the event queue. ++.RS ++.RE ++.TP ++.B fi_eq_read / fi_eq_readerr / fi_eq_sread ++On success, returns the number of bytes read from the event queue. + On error, a negative value corresponding to fabric errno is returned. + If no data is available to be read from the event queue, \-FI_EAGAIN is + returned. +-.PP +-fi_eq_write : On success, returns the number of bytes written to the +-event queue. ++.RS ++.RE ++.TP ++.B fi_eq_write ++On success, returns the number of bytes written to the event queue. + On error, a negative value corresponding to fabric errno is returned. +-.PP +-fi_eq_strerror : Returns a character string interpretation of the +-provider specific error returned with a completion. ++.RS ++.RE ++.TP ++.B fi_eq_strerror ++Returns a character string interpretation of the provider specific error ++returned with a completion. ++.RS ++.RE + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH SEE ALSO +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_errno.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_errno.3 +index b02d36171..1b1c2f701 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_errno.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_errno.3 +@@ -1,4 +1,7 @@ +-.TH "fi_errno" "3" "2016\-02\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_errno" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_errno \- fabric errors +@@ -14,94 +17,226 @@ const\ char\ *fi_strerror(int\ errno); + \f[] + .fi + .SH ERRORS +-.PP +-\f[I]FI_ENOENT\f[] : No such file or directory. +-.PP +-\f[I]FI_EIO\f[] : I/O error +-.PP +-\f[I]FI_E2BIG\f[] : Argument list too long. +-.PP +-\f[I]FI_EBADF\f[] : Bad file number. +-.PP +-\f[I]FI_EAGAIN\f[] : Try again. +-.PP +-\f[I]FI_ENOMEM\f[] : Out of memory. +-.PP +-\f[I]FI_EACCES\f[] : Permission denied. +-.PP +-\f[I]FI_EBUSY\f[] : Device or resource busy +-.PP +-\f[I]FI_ENODEV\f[] : No such device +-.PP +-\f[I]FI_EINVAL\f[] : Invalid argument +-.PP +-\f[I]FI_EMFILE\f[] : Too many open files +-.PP +-\f[I]FI_ENOSPC\f[] : No space left on device +-.PP +-\f[I]FI_ENOSYS\f[] : Function not implemented +-.PP +-\f[I]FI_ENOMSG\f[] : No message of desired type +-.PP +-\f[I]FI_ENODATA\f[] : No data available +-.PP +-\f[I]FI_EMSGSIZE\f[] : Message too long +-.PP +-\f[I]FI_ENOPROTOOPT\f[] : Protocol not available +-.PP +-\f[I]FI_EOPNOTSUPP\f[] : Operation not supported on transport endpoint +-.PP +-\f[I]FI_EADDRINUSE\f[] : Address already in use +-.PP +-\f[I]FI_EADDRNOTAVAIL\f[] : Cannot assign requested address +-.PP +-\f[I]FI_ENETDOWN\f[] : Network is down +-.PP +-\f[I]FI_ENETUNREACH\f[] : Network is unreachable +-.PP +-\f[I]FI_ECONNABORTED\f[] : Software caused connection abort +-.PP +-\f[I]FI_ECONNRESET\f[] : Connection reset by peer +-.PP +-\f[I]FI_EISCONN\f[] : Transport endpoint is already connected +-.PP +-\f[I]FI_ENOTCONN\f[] : Transport endpoint is not connected +-.PP +-\f[I]FI_ESHUTDOWN\f[] : Cannot send after transport endpoint shutdown +-.PP +-\f[I]FI_ETIMEDOUT\f[] : Operation timed out +-.PP +-\f[I]FI_ECONNREFUSED\f[] : Connection refused +-.PP +-\f[I]FI_EHOSTUNREACH\f[] : No route to host +-.PP +-\f[I]FI_EALREADY\f[] : Operation already in progress +-.PP +-\f[I]FI_EINPROGRESS\f[] : Operation now in progress +-.PP +-\f[I]FI_EREMOTEIO\f[] : Remote I/O error +-.PP +-\f[I]FI_ECANCELED\f[] : Operation Canceled +-.PP +-\f[I]FI_ENOKEY\f[] : Required key not available +-.PP +-\f[I]FI_EKEYREJECTED\f[] : Key was rejected by service +-.PP +-\f[I]FI_EOTHER\f[] : Unspecified error +-.PP +-\f[I]FI_ETOOSMALL\f[] : Provided buffer is too small +-.PP +-\f[I]FI_EOPBADSTATE\f[] : Operation not permitted in current state +-.PP +-\f[I]FI_EAVAIL\f[] : Error available +-.PP +-\f[I]FI_EBADFLAGS\f[] : Flags not supported +-.PP +-\f[I]FI_ENOEQ\f[] : Missing or unavailable event queue +-.PP +-\f[I]FI_EDOMAIN\f[] : Invalid resource domain +-.PP +-\f[I]FI_ENOCQ\f[] : Missing or unavailable completion queue ++.TP ++.B \f[I]FI_ENOENT\f[] ++No such file or directory. ++.RS ++.RE ++.TP ++.B \f[I]FI_EIO\f[] ++I/O error ++.RS ++.RE ++.TP ++.B \f[I]FI_E2BIG\f[] ++Argument list too long. ++.RS ++.RE ++.TP ++.B \f[I]FI_EBADF\f[] ++Bad file number. ++.RS ++.RE ++.TP ++.B \f[I]FI_EAGAIN\f[] ++Try again. ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOMEM\f[] ++Out of memory. ++.RS ++.RE ++.TP ++.B \f[I]FI_EACCES\f[] ++Permission denied. ++.RS ++.RE ++.TP ++.B \f[I]FI_EBUSY\f[] ++Device or resource busy ++.RS ++.RE ++.TP ++.B \f[I]FI_ENODEV\f[] ++No such device ++.RS ++.RE ++.TP ++.B \f[I]FI_EINVAL\f[] ++Invalid argument ++.RS ++.RE ++.TP ++.B \f[I]FI_EMFILE\f[] ++Too many open files ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOSPC\f[] ++No space left on device ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOSYS\f[] ++Function not implemented ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOMSG\f[] ++No message of desired type ++.RS ++.RE ++.TP ++.B \f[I]FI_ENODATA\f[] ++No data available ++.RS ++.RE ++.TP ++.B \f[I]FI_EMSGSIZE\f[] ++Message too long ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOPROTOOPT\f[] ++Protocol not available ++.RS ++.RE ++.TP ++.B \f[I]FI_EOPNOTSUPP\f[] ++Operation not supported on transport endpoint ++.RS ++.RE ++.TP ++.B \f[I]FI_EADDRINUSE\f[] ++Address already in use ++.RS ++.RE ++.TP ++.B \f[I]FI_EADDRNOTAVAIL\f[] ++Cannot assign requested address ++.RS ++.RE ++.TP ++.B \f[I]FI_ENETDOWN\f[] ++Network is down ++.RS ++.RE ++.TP ++.B \f[I]FI_ENETUNREACH\f[] ++Network is unreachable ++.RS ++.RE ++.TP ++.B \f[I]FI_ECONNABORTED\f[] ++Software caused connection abort ++.RS ++.RE ++.TP ++.B \f[I]FI_ECONNRESET\f[] ++Connection reset by peer ++.RS ++.RE ++.TP ++.B \f[I]FI_EISCONN\f[] ++Transport endpoint is already connected ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOTCONN\f[] ++Transport endpoint is not connected ++.RS ++.RE ++.TP ++.B \f[I]FI_ESHUTDOWN\f[] ++Cannot send after transport endpoint shutdown ++.RS ++.RE ++.TP ++.B \f[I]FI_ETIMEDOUT\f[] ++Operation timed out ++.RS ++.RE ++.TP ++.B \f[I]FI_ECONNREFUSED\f[] ++Connection refused ++.RS ++.RE ++.TP ++.B \f[I]FI_EHOSTUNREACH\f[] ++No route to host ++.RS ++.RE ++.TP ++.B \f[I]FI_EALREADY\f[] ++Operation already in progress ++.RS ++.RE ++.TP ++.B \f[I]FI_EINPROGRESS\f[] ++Operation now in progress ++.RS ++.RE ++.TP ++.B \f[I]FI_EREMOTEIO\f[] ++Remote I/O error ++.RS ++.RE ++.TP ++.B \f[I]FI_ECANCELED\f[] ++Operation Canceled ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOKEY\f[] ++Required key not available ++.RS ++.RE ++.TP ++.B \f[I]FI_EKEYREJECTED\f[] ++Key was rejected by service ++.RS ++.RE ++.TP ++.B \f[I]FI_EOTHER\f[] ++Unspecified error ++.RS ++.RE ++.TP ++.B \f[I]FI_ETOOSMALL\f[] ++Provided buffer is too small ++.RS ++.RE ++.TP ++.B \f[I]FI_EOPBADSTATE\f[] ++Operation not permitted in current state ++.RS ++.RE ++.TP ++.B \f[I]FI_EAVAIL\f[] ++Error available ++.RS ++.RE ++.TP ++.B \f[I]FI_EBADFLAGS\f[] ++Flags not supported ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOEQ\f[] ++Missing or unavailable event queue ++.RS ++.RE ++.TP ++.B \f[I]FI_EDOMAIN\f[] ++Invalid resource domain ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOCQ\f[] ++Missing or unavailable completion queue ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fabric\f[](7) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_fabric.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_fabric.3 +index b1e85383a..18d4ceb91 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_fabric.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_fabric.3 +@@ -1,12 +1,20 @@ +-.TH "fi_fabric" "3" "2017\-10\-18" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_fabric" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_fabric \- Fabric domain operations +-.PP +-fi_fabric / fi_close : Open / close a fabric domain +-.PP +-fi_tostr : Convert fabric attributes, flags, and capabilities to +-printable string ++.TP ++.B fi_fabric / fi_close ++Open / close a fabric domain ++.RS ++.RE ++.TP ++.B fi_tostr ++Convert fabric attributes, flags, and capabilities to printable string ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -22,14 +30,22 @@ char\ *\ fi_tostr(const\ void\ *data,\ enum\ fi_type\ datatype); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]attr\f[] : Attributes of fabric to open. +-.PP +-\f[I]fabric\f[] : Fabric domain +-.PP +-\f[I]context\f[] : User specified context associated with the opened +-object. ++.TP ++.B \f[I]attr\f[] ++Attributes of fabric to open. ++.RS ++.RE ++.TP ++.B \f[I]fabric\f[] ++Fabric domain ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the opened object. + This context is returned as part of any associated asynchronous event. ++.RS ++.RE + .SH DESCRIPTION + .PP + A fabric domain represents a collection of hardware and software +@@ -58,41 +74,129 @@ display, with the datatype parameter indicating the type of data + referenced by the data parameter. + Valid values for the datatype are listed below, along with the + corresponding datatype or field value. +-.PP +-\f[I]FI_TYPE_INFO\f[] : struct fi_info +-.PP +-\f[I]FI_TYPE_EP_TYPE\f[] : struct fi_info::type field +-.PP +-\f[I]FI_TYPE_EP_CAP\f[] : struct fi_info::ep_cap field +-.PP +-\f[I]FI_TYPE_OP_FLAGS\f[] : struct fi_info::op_flags field, or general +-uint64_t flags +-.PP +-\f[I]FI_TYPE_ADDR_FORMAT\f[] : struct fi_info::addr_format field +-.PP +-\f[I]FI_TYPE_TX_ATTR\f[] : struct fi_tx_attr +-.PP +-\f[I]FI_TYPE_RX_ATTR\f[] : struct fi_rx_attr +-.PP +-\f[I]FI_TYPE_EP_ATTR\f[] : struct fi_ep_attr +-.PP +-\f[I]FI_TYPE_DOMAIN_ATTR\f[] : struct fi_domain_attr +-.PP +-\f[I]FI_TYPE_FABRIC_ATTR\f[] : struct fi_fabric_attr +-.PP +-\f[I]FI_TYPE_DOMAIN_CAP\f[] : struct fi_info::domain_cap field +-.PP +-\f[I]FI_TYPE_THREADING\f[] : enum fi_threading +-.PP +-\f[I]FI_TYPE_PROGRESS\f[] : enum fi_progress +-.PP +-\f[I]FI_TYPE_PROTO\f[] : struct fi_ep_attr::protocol field +-.PP +-\f[I]FI_TYPE_MSG_ORDER\f[] : struct fi_ep_attr::msg_order field +-.PP +-\f[I]FI_TYPE_VERSION\f[] : Returns the library version of libfabric in +-string form. ++.TP ++.B \f[I]FI_TYPE_INFO\f[] ++struct fi_info, including all substructures and fields ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_EP_TYPE\f[] ++struct fi_info::type field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_EP_CAP\f[] ++struct fi_info::ep_cap field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_OP_FLAGS\f[] ++struct fi_info::op_flags field, or general uint64_t flags ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_ADDR_FORMAT\f[] ++struct fi_info::addr_format field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_TX_ATTR\f[] ++struct fi_tx_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_RX_ATTR\f[] ++struct fi_rx_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_EP_ATTR\f[] ++struct fi_ep_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_DOMAIN_ATTR\f[] ++struct fi_domain_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_FABRIC_ATTR\f[] ++struct fi_fabric_attr ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_THREADING\f[] ++enum fi_threading ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_PROGRESS\f[] ++enum fi_progress ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_PROTOCOL\f[] ++struct fi_ep_attr::protocol field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_MSG_ORDER\f[] ++struct fi_ep_attr::msg_order field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_MODE\f[] ++struct fi_info::mode field ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_AV_TYPE\f[] ++enum fi_av_type ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_ATOMIC_TYPE\f[] ++enum fi_datatype ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_ATOMIC_OP\f[] ++enum fi_op ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_VERSION\f[] ++Returns the library version of libfabric in string form. + The data parameter is ignored. ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_EQ_EVENT\f[] ++uint32_t event parameter returned from fi_eq_read(). ++See \f[C]fi_eq(3)\f[] for a list of known values. ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_CQ_EVENT_FLAGS\f[] ++uint64_t flags field in fi_cq_xxx_entry structures. ++See \f[C]fi_cq(3)\f[] for valid flags. ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_MR_MODE\f[] ++struct fi_domain_attr::mr_mode flags ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_OP_TYPE\f[] ++enum fi_op_type ++.RS ++.RE ++.TP ++.B \f[I]FI_TYPE_FID\f[] ++struct fid * ++.RS ++.RE + .PP + fi_tostr() will return a pointer to an internal libfabric buffer that + should not be modified, and will be overwritten the next time fi_tostr() +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_getinfo.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_getinfo.3 +index 84f0a6d62..47fd4f40f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_getinfo.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_getinfo.3 +@@ -1,4 +1,7 @@ +-.TH "fi_getinfo" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_getinfo" "3" "2018\-10\-10" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_getinfo, fi_freeinfo \- Obtain / free fabric interface information +@@ -21,20 +24,38 @@ struct\ fi_info\ *fi_dupinfo(const\ struct\ fi_info\ *info); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]version\f[] : Interface version requested by application. +-.PP +-\f[I]node\f[] : Optional, name or fabric address to resolve. +-.PP +-\f[I]service\f[] : Optional, service name or port number of address. +-.PP +-\f[I]flags\f[] : Operation flags for the fi_getinfo call. +-.PP +-\f[I]hints\f[] : Reference to an fi_info structure that specifies +-criteria for selecting the returned fabric information. +-.PP +-\f[I]info\f[] : A pointer to a linked list of fi_info structures +-containing response information. ++.TP ++.B \f[I]version\f[] ++Interface version requested by application. ++.RS ++.RE ++.TP ++.B \f[I]node\f[] ++Optional, name or fabric address to resolve. ++.RS ++.RE ++.TP ++.B \f[I]service\f[] ++Optional, service name or port number of address. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Operation flags for the fi_getinfo call. ++.RS ++.RE ++.TP ++.B \f[I]hints\f[] ++Reference to an fi_info structure that specifies criteria for selecting ++the returned fabric information. ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++A pointer to a linked list of fi_info structures containing response ++information. ++.RS ++.RE + .SH DESCRIPTION + .PP + fi_getinfo returns information about available fabric services for +@@ -130,42 +151,58 @@ struct\ fi_info\ { + \ \ \ \ struct\ fi_ep_attr\ \ \ \ \ *ep_attr; + \ \ \ \ struct\ fi_domain_attr\ *domain_attr; + \ \ \ \ struct\ fi_fabric_attr\ *fabric_attr; ++\ \ \ \ struct\ fid_nic\ \ \ \ \ \ \ \ *nic; + }; + \f[] + .fi +-.PP +-\f[I]next\f[] : Pointer to the next fi_info structure in the list. ++.TP ++.B \f[I]next\f[] ++Pointer to the next fi_info structure in the list. + Will be NULL if no more structures exist. +-.PP +-\f[I]caps \- fabric interface capabilities\f[] : If specified, indicates +-the desired capabilities of the fabric interfaces. ++.RS ++.RE ++.TP ++.B \f[I]caps \- fabric interface capabilities\f[] ++If specified, indicates the desired capabilities of the fabric ++interfaces. + Supported capabilities are listed in the \f[I]Capabilities\f[] section + below. +-.PP +-\f[I]mode\f[] : Operational modes supported by the application. ++.RS ++.RE ++.TP ++.B \f[I]mode\f[] ++Operational modes supported by the application. + See the \f[I]Mode\f[] section below. +-.PP +-\f[I]addr_format \- address format\f[] : If specified, indicates the +-format of addresses referenced by the fabric interfaces and data +-structures. ++.RS ++.RE ++.TP ++.B \f[I]addr_format \- address format\f[] ++If specified, indicates the format of addresses referenced by the fabric ++interfaces and data structures. + Supported formats are listed in the \f[I]Addressing formats\f[] section + below. +-.PP +-\f[I]src_addrlen \- source address length\f[] : Indicates the length of +-the source address. ++.RS ++.RE ++.TP ++.B \f[I]src_addrlen \- source address length\f[] ++Indicates the length of the source address. + This value must be > 0 if \f[I]src_addr\f[] is non\-NULL. + This field will be ignored in hints if FI_SOURCE flag is set, or + \f[I]src_addr\f[] is NULL. +-.PP +-\f[I]dest_addrlen \- destination address length\f[] : Indicates the +-length of the destination address. ++.RS ++.RE ++.TP ++.B \f[I]dest_addrlen \- destination address length\f[] ++Indicates the length of the destination address. + This value must be > 0 if \f[I]dest_addr\f[] is non\-NULL. + This field will be ignored in hints unless the node and service + parameters are NULL or FI_SOURCE flag is set, or if \f[I]dst_addr\f[] is + NULL. +-.PP +-\f[I]src_addr \- source address\f[] : If specified, indicates the source +-address. ++.RS ++.RE ++.TP ++.B \f[I]src_addr \- source address\f[] ++If specified, indicates the source address. + This field will be ignored in hints if FI_SOURCE flag is set. + On output a provider shall return an address that corresponds to the + indicated fabric, domain, node, and/or service fields. +@@ -174,31 +211,37 @@ The format of the address is indicated by the returned + Note that any returned address is only used when opening a local + endpoint. + The address is not guaranteed to be usable by a peer process. +-.PP +-\f[I]dest_addr \- destination address\f[] : If specified, indicates the +-destination address. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr \- destination address\f[] ++If specified, indicates the destination address. + This field will be ignored in hints unless the node and service + parameters are NULL or FI_SOURCE flag is set. + If FI_SOURCE is not specified, on output a provider shall return an + address the corresponds to the indicated node and/or service fields, + relative to the fabric and domain. + Note that any returned address is only usable locally. +-.PP +-\f[I]handle \- provider context handle\f[] : References a provider +-specific handle. ++.RS ++.RE ++.TP ++.B \f[I]handle \- provider context handle\f[] + The use of this field is operation specific. +-Unless its use is described for a given operation, the handle field must +-be NULL. +-It is commonly used by applications that make use of +-connection\-oriented endpoints. +-For other applications, the field should usually be NULL. +-.PP +-This field is used when processing connection requests and responses. +-It is also used to inherit endpoint\[aq]s attributes. +-See fi_eq(3), fi_reject(3), and fi_endpoint(3) . +-.PP +-\f[I]tx_attr \- transmit context attributes\f[] : Optionally supplied +-transmit context attributes. ++If hints\->handle is set to struct fid_pep, the hints\->handle will be ++copied to info\->handle on output from fi_getinfo. ++Other values of hints\->handle will be handled in a provider specific ++manner. ++The fi_info::handle field is also used by fi_endpoint() and fi_reject() ++calls when processing connection requests or to inherit another ++endpoint\[aq]s attributes. ++See \f[C]fi_eq\f[](3), \f[C]fi_reject\f[](3), and ++\f[C]fi_endpoint\f[](3). ++The info\->handle field will be ignored by fi_dupinfo and fi_freeinfo. ++.RS ++.RE ++.TP ++.B \f[I]tx_attr \- transmit context attributes\f[] ++Optionally supplied transmit context attributes. + Transmit context attributes may be specified and returned as part of + fi_getinfo. + When provided as hints, requested values of struct fi_tx_ctx_attr should +@@ -207,9 +250,11 @@ On output, the actual transmit context attributes that can be provided + will be returned. + Output values will be greater than or equal to the requested input + values. +-.PP +-\f[I]rx_attr \- receive context attributes\f[] : Optionally supplied +-receive context attributes. ++.RS ++.RE ++.TP ++.B \f[I]rx_attr \- receive context attributes\f[] ++Optionally supplied receive context attributes. + Receive context attributes may be specified and returned as part of + fi_getinfo. + When provided as hints, requested values of struct fi_rx_ctx_attr should +@@ -218,35 +263,52 @@ On output, the actual receive context attributes that can be provided + will be returned. + Output values will be greater than or or equal to the requested input + values. +-.PP +-\f[I]ep_attr \- endpoint attributes\f[] : Optionally supplied endpoint +-attributes. ++.RS ++.RE ++.TP ++.B \f[I]ep_attr \- endpoint attributes\f[] ++Optionally supplied endpoint attributes. + Endpoint attributes may be specified and returned as part of fi_getinfo. + When provided as hints, requested values of struct fi_ep_attr should be + set. + On output, the actual endpoint attributes that can be provided will be + returned. + Output values will be greater than or equal to requested input values. +-See fi_endpoint(3) for details. +-.PP +-\f[I]domain_attr \- domain attributes\f[] : Optionally supplied domain +-attributes. ++See \f[C]fi_endpoint\f[](3) for details. ++.RS ++.RE ++.TP ++.B \f[I]domain_attr \- domain attributes\f[] ++Optionally supplied domain attributes. + Domain attributes may be specified and returned as part of fi_getinfo. + When provided as hints, requested values of struct fi_domain_attr should + be set. + On output, the actual domain attributes that can be provided will be + returned. + Output values will be greater than or equal to requested input values. +-See fi_domain(3) for details. +-.PP +-\f[I]fabric_attr \- fabric attributes\f[] : Optionally supplied fabric +-attributes. ++See \f[C]fi_domain\f[](3) for details. ++.RS ++.RE ++.TP ++.B \f[I]fabric_attr \- fabric attributes\f[] ++Optionally supplied fabric attributes. + Fabric attributes may be specified and returned as part of fi_getinfo. + When provided as hints, requested values of struct fi_fabric_attr should + be set. + On output, the actual fabric attributes that can be provided will be + returned. +-See fi_fabric(3) for details. ++See \f[C]fi_fabric\f[](3) for details. ++.RS ++.RE ++.TP ++.B \f[I]nic \- network interface details\f[] ++Optional attributes related to the hardware NIC associated with the ++specified fabric, domain, and endpoint data. ++This field is only valid for providers where the corresponding ++attributes are closely associated with a hardware NIC. ++See [\f[C]fi_nic\f[](3)] (fi_nic.3.html) for details. ++.RS ++.RE + .SH CAPABILITIES + .PP + Interface capabilities are obtained by OR\-ing the following flags +@@ -262,12 +324,15 @@ that which was requested. + Applications may use this feature to request a minimal set of + requirements, then check the returned capabilities to enable additional + optimizations. +-.PP +-\f[I]FI_MSG\f[] : Specifies that an endpoint should support sending and +-receiving messages or datagrams. ++.TP ++.B \f[I]FI_MSG\f[] ++Specifies that an endpoint should support sending and receiving messages ++or datagrams. + Message capabilities imply support for send and/or receive queues. + Endpoints supporting this capability support operations defined by + struct fi_ops_msg. ++.RS ++.RE + .PP + The caps may be used to specify or restrict the type of messaging + operations that are supported. +@@ -275,9 +340,10 @@ In the absence of any relevant flags, FI_MSG implies the ability to send + and receive messages. + Applications can use the FI_SEND and FI_RECV flags to optimize an + endpoint as send\-only or receive\-only. +-.PP +-\f[I]FI_RMA\f[] : Specifies that the endpoint should support RMA read +-and write operations. ++.TP ++.B \f[I]FI_RMA\f[] ++Specifies that the endpoint should support RMA read and write ++operations. + Endpoints supporting this capability support operations defined by + struct fi_ops_rma. + In the absence of any relevant flags, FI_RMA implies the ability to +@@ -285,9 +351,11 @@ initiate and be the target of remote memory reads and writes. + Applications can use the FI_READ, FI_WRITE, FI_REMOTE_READ, and + FI_REMOTE_WRITE flags to restrict the types of RMA operations supported + by an endpoint. +-.PP +-\f[I]FI_TAGGED\f[] : Specifies that the endpoint should handle tagged +-message transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_TAGGED\f[] ++Specifies that the endpoint should handle tagged message transfers. + Tagged message transfers associate a user\-specified key or tag with + each message that is used for matching purposes at the remote side. + Endpoints supporting this capability support operations defined by +@@ -296,9 +364,11 @@ In the absence of any relevant flags, FI_TAGGED implies the ability to + send and receive tagged messages. + Applications can use the FI_SEND and FI_RECV flags to optimize an + endpoint as send\-only or receive\-only. +-.PP +-\f[I]FI_ATOMIC\f[] : Specifies that the endpoint supports some set of +-atomic operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_ATOMIC\f[] ++Specifies that the endpoint supports some set of atomic operations. + Endpoints supporting this capability support operations defined by + struct fi_ops_atomic. + In the absence of any relevant flags, FI_ATOMIC implies the ability to +@@ -306,28 +376,41 @@ initiate and be the target of remote atomic reads and writes. + Applications can use the FI_READ, FI_WRITE, FI_REMOTE_READ, and + FI_REMOTE_WRITE flags to restrict the types of atomic operations + supported by an endpoint. +-.PP +-\f[I]FI_MULTICAST\f[] : Indicates that the endpoint support multicast +-data transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTICAST\f[] ++Indicates that the endpoint support multicast data transfers. + This capability must be paired with at least one other data transfer + capability, (e.g. + FI_MSG, FI_SEND, FI_RECV, ...). +-.PP +-\f[I]FI_NAMED_RX_CTX\f[] : Requests that endpoints which support +-multiple receive contexts allow an initiator to target (or name) a +-specific receive context as part of a data transfer operation. +-.PP +-\f[I]FI_DIRECTED_RECV\f[] : Requests that the communication endpoint use +-the source address of an incoming message when matching it with a +-receive buffer. ++.RS ++.RE ++.TP ++.B \f[I]FI_NAMED_RX_CTX\f[] ++Requests that endpoints which support multiple receive contexts allow an ++initiator to target (or name) a specific receive context as part of a ++data transfer operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_DIRECTED_RECV\f[] ++Requests that the communication endpoint use the source address of an ++incoming message when matching it with a receive buffer. + If this capability is not set, then the src_addr parameter for msg and + tagged receive operations is ignored. +-.PP +-\f[I]FI_MULTI_RECV\f[] : Specifies that the endpoint must support the +-FI_MULTI_RECV flag when posting receive buffers. +-.PP +-\f[I]FI_SOURCE\f[] : Requests that the endpoint return source addressing +-data as part of its completion data. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTI_RECV\f[] ++Specifies that the endpoint must support the FI_MULTI_RECV flag when ++posting receive buffers. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOURCE\f[] ++Requests that the endpoint return source addressing data as part of its ++completion data. + This capability only applies to connectionless endpoints. + Note that returning source address information may require that the + provider perform address translation and/or look\-up based on data +@@ -335,58 +418,88 @@ available in the underlying protocol in order to provide the requested + data, which may adversely affect performance. + The performance impact may be greater for address vectors of type + FI_AV_TABLE. +-.PP +-\f[I]FI_READ\f[] : Indicates that the user requires an endpoint capable +-of initiating reads against remote memory regions. ++.RS ++.RE ++.TP ++.B \f[I]FI_READ\f[] ++Indicates that the user requires an endpoint capable of initiating reads ++against remote memory regions. + This flag requires that FI_RMA and/or FI_ATOMIC be set. +-.PP +-\f[I]FI_WRITE\f[] : Indicates that the user requires an endpoint capable +-of initiating writes against remote memory regions. ++.RS ++.RE ++.TP ++.B \f[I]FI_WRITE\f[] ++Indicates that the user requires an endpoint capable of initiating ++writes against remote memory regions. + This flag requires that FI_RMA and/or FI_ATOMIC be set. +-.PP +-\f[I]FI_SEND\f[] : Indicates that the user requires an endpoint capable +-of sending message data transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_SEND\f[] ++Indicates that the user requires an endpoint capable of sending message ++data transfers. + Message transfers include base message operations as well as tagged + message functionality. +-.PP +-\f[I]FI_RECV\f[] : Indicates that the user requires an endpoint capable +-of receiving message data transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++Indicates that the user requires an endpoint capable of receiving ++message data transfers. + Message transfers include base message operations as well as tagged + message functionality. +-.PP +-\f[I]FI_REMOTE_READ\f[] : Indicates that the user requires an endpoint +-capable of receiving read memory operations from remote endpoints. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_READ\f[] ++Indicates that the user requires an endpoint capable of receiving read ++memory operations from remote endpoints. + This flag requires that FI_RMA and/or FI_ATOMIC be set. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : Indicates that the user requires an endpoint +-capable of receiving write memory operations from remote endpoints. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++Indicates that the user requires an endpoint capable of receiving write ++memory operations from remote endpoints. + This flag requires that FI_RMA and/or FI_ATOMIC be set. +-.PP +-\f[I]FI_RMA_EVENT\f[] : Requests that an endpoint support the generation +-of completion events when it is the target of an RMA and/or atomic +-operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_RMA_EVENT\f[] ++Requests that an endpoint support the generation of completion events ++when it is the target of an RMA and/or atomic operation. + This flag requires that FI_REMOTE_READ and/or FI_REMOTE_WRITE be enabled + on the endpoint. +-.PP +-\f[I]FI_SHARED_AV\f[] : Requests or indicates support for address +-vectors which may be shared among multiple processes. +-.PP +-\f[I]FI_TRIGGER\f[] : Indicates that the endpoint should support +-triggered operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_SHARED_AV\f[] ++Requests or indicates support for address vectors which may be shared ++among multiple processes. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRIGGER\f[] ++Indicates that the endpoint should support triggered operations. + Endpoints support this capability must meet the usage model as described + by fi_trigger.3. +-.PP +-\f[I]FI_FENCE\f[] : Indicates that the endpoint support the FI_FENCE +-flag on data transfer operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Indicates that the endpoint support the FI_FENCE flag on data transfer ++operations. + Support requires tracking that all previous transmit requests to a + specified remote endpoint complete prior to initiating the fenced + operation. + Fenced operations are often used to enforce ordering between operations + that are not otherwise guaranteed by the underlying provider or + protocol. +-.PP +-\f[I]FI_LOCAL_COMM\f[] : Indicates that the endpoint support host local +-communication. ++.RS ++.RE ++.TP ++.B \f[I]FI_LOCAL_COMM\f[] ++Indicates that the endpoint support host local communication. + This flag may be used in conjunction with FI_REMOTE_COMM to indicate + that local and remote communication are required. + If neither FI_LOCAL_COMM or FI_REMOTE_COMM are specified, then the +@@ -395,31 +508,52 @@ affects performance. + Providers that set FI_LOCAL_COMM but not FI_REMOTE_COMM, for example a + shared memory provider, may only be used to communication between + processes on the same system. +-.PP +-\f[I]FI_REMOTE_COMM\f[] : Indicates that the endpoint support +-communication with endpoints located at remote nodes (across the +-fabric). ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_COMM\f[] ++Indicates that the endpoint support communication with endpoints located ++at remote nodes (across the fabric). + See FI_LOCAL_COMM for additional details. + Providers that set FI_REMOTE_COMM but not FI_LOCAL_COMM, for example + NICs that lack loopback support, cannot be used to communicate with + processes on the same system. +-.PP +-\f[I]FI_SOURCE_ERR\f[] : Must be paired with FI_SOURCE. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOURCE_ERR\f[] ++Must be paired with FI_SOURCE. + When specified, this requests that raw source addressing data be + returned as part of completion data for any address that has not been + inserted into the local address vector. + Use of this capability may require the provider to validate incoming + source address data against addresses stored in the local address + vector, which may adversely affect performance. +-.PP +-\f[I]FI_RMA_PMEM\f[] : Indicates that the provider is \[aq]persistent +-memory aware\[aq] and supports RMA operations to and from persistent +-memory. ++.RS ++.RE ++.TP ++.B \f[I]FI_RMA_PMEM\f[] ++Indicates that the provider is \[aq]persistent memory aware\[aq] and ++supports RMA operations to and from persistent memory. + Persistent memory aware providers must support registration of memory + that is backed by non\- volatile memory, RMA transfers to/from + persistent memory, and enhanced completion semantics. + This flag requires that FI_RMA be set. + This capability is experimental. ++.RS ++.RE ++.TP ++.B \f[I]FI_VARIABLE_MSG\f[] ++Requests that the provider must notify a receiver when a variable length ++message is ready to be received prior to attempting to place the data. ++Such notification will include the size of the message and any ++associated message tag (for FI_TAGGED). ++See \[aq]Variable Length Messages\[aq] in fi_msg.3 for full details. ++Variable length messages are any messages larger than an endpoint ++configurable size. ++This flag requires that FI_MSG and/or FI_TAGGED be set. ++.RS ++.RE + .PP + Capabilities may be grouped into two general categories: primary and + secondary. +@@ -434,7 +568,7 @@ doing so would not compromise performance or security. + .PP + Primary capabilities: FI_MSG, FI_RMA, FI_TAGGED, FI_ATOMIC, + FI_MULTICAST, FI_NAMED_RX_CTX, FI_DIRECTED_RECV, FI_READ, FI_WRITE, +-FI_RECV, FI_SEND, FI_REMOTE_READ, and FI_REMOTE_WRITE. ++FI_RECV, FI_SEND, FI_REMOTE_READ, FI_REMOTE_WRITE, and FI_VARIABLE_MSG. + .PP + Secondary capabilities: FI_MULTI_RECV, FI_SOURCE, FI_RMA_EVENT, + FI_SHARED_AV, FI_TRIGGER, FI_FENCE, FI_LOCAL_COMM, FI_REMOTE_COMM, +@@ -458,10 +592,11 @@ the fabric interfaces created using the returned fi_info. + The set of modes are listed below. + If a NULL hints structure is provided, then the provider\[aq]s supported + set of modes will be returned in the info structure(s). +-.PP +-\f[I]FI_CONTEXT\f[] : Specifies that the provider requires that +-applications use struct fi_context as their per operation context +-parameter for operations that generated full completions. ++.TP ++.B \f[I]FI_CONTEXT\f[] ++Specifies that the provider requires that applications use struct ++fi_context as their per operation context parameter for operations that ++generated full completions. + This structure should be treated as opaque to the application. + For performance reasons, this structure must be allocated by the user, + but may be used by the fabric provider to track the operation. +@@ -479,9 +614,12 @@ the endpoint was configured with FI_SELECTIVE_COMPLETION and the + operation was not initiated with the FI_COMPLETION flag) then the + context parameter is ignored by the fabric provider.The structure is + specified in rdma/fabric.h. +-.PP +-\f[I]FI_CONTEXT2\f[] : This bit is similar to FI_CONTEXT, but doubles +-the provider\[aq]s requirement on the size of the per context structure. ++.RS ++.RE ++.TP ++.B \f[I]FI_CONTEXT2\f[] ++This bit is similar to FI_CONTEXT, but doubles the provider\[aq]s ++requirement on the size of the per context structure. + When set, this specifies that the provider requires that applications + use struct fi_context2 as their per operation context parameter. + Or, optionally, an application can provide an array of two fi_context +@@ -489,9 +627,12 @@ structures (e.g. + struct fi_context[2]) instead. + The requirements for using struct fi_context2 are identical as defined + for FI_CONTEXT above. +-.PP +-\f[I]FI_LOCAL_MR\f[] : The provider is optimized around having +-applications register memory for locally accessed data buffers. ++.RS ++.RE ++.TP ++.B \f[I]FI_LOCAL_MR\f[] ++The provider is optimized around having applications register memory for ++locally accessed data buffers. + Data buffers used in send and receive operations and as the source + buffer for RMA and atomic operations must be registered by the + application for access domains opened with this capability. +@@ -500,16 +641,21 @@ version is 1.5 or later and the domain mr_mode is set to anything other + than FI_MR_BASIC or FI_MR_SCALABLE. + See the domain attribute mr_mode \f[C]fi_domain\f[](3) and + \f[C]fi_mr\f[](3). +-.PP +-\f[I]FI_MSG_PREFIX\f[] : Message prefix mode indicates that an +-application will provide buffer space in front of all message send and +-receive buffers for use by the provider. ++.RS ++.RE ++.TP ++.B \f[I]FI_MSG_PREFIX\f[] ++Message prefix mode indicates that an application will provide buffer ++space in front of all message send and receive buffers for use by the ++provider. + Typically, the provider uses this space to implement a protocol, with + the protocol headers being written into the prefix area. + The contents of the prefix space should be treated as opaque. + The use of FI_MSG_PREFIX may improve application performance over + certain providers by reducing the number of IO vectors referenced by + underlying hardware and eliminating provider buffer allocation. ++.RS ++.RE + .PP + FI_MSG_PREFIX only applies to send and receive operations, including + tagged sends and receives. +@@ -538,9 +684,10 @@ payload). + For scatter\-gather send/recv operations, the prefix buffer must be a + contiguous region, though it may or may not be directly adjacent to the + payload portion of the buffer. +-.PP +-\f[I]FI_ASYNC_IOV\f[] : Applications can reference multiple data buffers +-as part of a single operation through the use of IO vectors (SGEs). ++.TP ++.B \f[I]FI_ASYNC_IOV\f[] ++Applications can reference multiple data buffers as part of a single ++operation through the use of IO vectors (SGEs). + Typically, the contents of an IO vector are copied by the provider into + an internal buffer area, or directly to the underlying hardware. + However, when a large number of IOV entries are supported, IOV buffering +@@ -550,17 +697,21 @@ buffering needed for the IO vectors. + When set, an application must not modify an IO vector of length > 1, + including any related memory descriptor array, until the associated + operation has completed. +-.PP +-\f[I]FI_RX_CQ_DATA\f[] : This mode bit only applies to data transfers +-that set FI_REMOTE_CQ_DATA. ++.RS ++.RE ++.TP ++.B \f[I]FI_RX_CQ_DATA\f[] ++This mode bit only applies to data transfers that set FI_REMOTE_CQ_DATA. + When set, a data transfer that carries remote CQ data will consume a + receive buffer at the target. + This is true even for operations that would normally not consume posted + receive buffers, such as RMA write operations. +-.PP +-\f[I]FI_NOTIFY_FLAGS_ONLY\f[] : This bit indicates that general +-completion flags may not be set by the provider, and are not needed by +-the application. ++.RS ++.RE ++.TP ++.B \f[I]FI_NOTIFY_FLAGS_ONLY\f[] ++This bit indicates that general completion flags may not be set by the ++provider, and are not needed by the application. + If specified, completion flags which simply report the type of operation + that completed (e.g. + send or receive) may not be set. +@@ -568,11 +719,29 @@ However, completion flags that are used for remote notifications will + still be set when applicable. + See \f[C]fi_cq\f[](3) for details on which completion flags are valid + when this mode bit is enabled. +-.PP +-\f[I]FI_RESTRICTED_COMP\f[] : This bit indicates that the application +-will only share completion queues and counters among endpoints, transmit +-contexts, and receive contexts that have the same set of capability +-flags. ++.RS ++.RE ++.TP ++.B \f[I]FI_RESTRICTED_COMP\f[] ++This bit indicates that the application will only share completion ++queues and counters among endpoints, transmit contexts, and receive ++contexts that have the same set of capability flags. ++.RS ++.RE ++.TP ++.B \f[I]FI_BUFFERED_RECV\f[] ++The buffered receive mode bit indicates that the provider owns the data ++buffer(s) that are accessed by the networking layer for received ++messages. ++Typically, this implies that data must be copied from the provider ++buffer into the application buffer. ++Applications that can handle message processing from network allocated ++data buffers can set this mode bit to avoid copies. ++For full details on application requirements to support this mode, see ++the \[aq]Buffered Receives\[aq] section in \f[C]fi_msg\f[](3). ++This mode bit applies to FI_MSG and FI_TAGGED receive operations. ++.RS ++.RE + .SH ADDRESSING FORMATS + .PP + Multiple fabric interfaces take as input either a source or destination +@@ -587,9 +756,10 @@ A provider may support one or more of the following addressing formats. + In some cases, a selected addressing format may need to be translated or + mapped into an address which is native to the fabric. + See \f[C]fi_av\f[](3). +-.PP +-\f[I]FI_FORMAT_UNSPEC\f[] : FI_FORMAT_UNSPEC indicates that a provider +-specific address format should be selected. ++.TP ++.B \f[I]FI_FORMAT_UNSPEC\f[] ++FI_FORMAT_UNSPEC indicates that a provider specific address format ++should be selected. + Provider specific addresses may be protocol specific or a vendor + proprietary format. + Applications that select FI_FORMAT_UNSPEC should be prepared to treat +@@ -598,27 +768,49 @@ FI_FORMAT_UNSPEC targets apps which make use of an out of band address + exchange. + Applications which use FI_FORMAT_UNSPEC may use fi_getname() to obtain a + provider specific address assigned to an allocated endpoint. +-.PP +-\f[I]FI_SOCKADDR\f[] : Address is of type sockaddr. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKADDR\f[] ++Address is of type sockaddr. + The specific socket address format will be determined at run time by + interfaces examining the sa_family field. +-.PP +-\f[I]FI_SOCKADDR_IN\f[] : Address is of type sockaddr_in (IPv4). +-.PP +-\f[I]FI_SOCKADDR_IN6\f[] : Address is of type sockaddr_in6 (IPv6). +-.PP +-\f[I]FI_SOCKADDR_IB\f[] : Address is of type sockaddr_ib (defined in +-Linux kernel source) +-.PP +-\f[I]FI_ADDR_PSMX\f[] : Address is an Intel proprietary format that is +-used with their PSMX (extended performance scaled messaging) protocol. +-.PP +-\f[I]FI_ADDR_GNI\f[] : Address is a Cray proprietary format that is used +-with their GNI protocol. +-.PP +-\f[I]FI_ADDR_STR\f[] : Address is a formatted character string. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKADDR_IN\f[] ++Address is of type sockaddr_in (IPv4). ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKADDR_IN6\f[] ++Address is of type sockaddr_in6 (IPv6). ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKADDR_IB\f[] ++Address is of type sockaddr_ib (defined in Linux kernel source) ++.RS ++.RE ++.TP ++.B \f[I]FI_ADDR_PSMX\f[] ++Address is an Intel proprietary format that is used with their PSMX ++(extended performance scaled messaging) protocol. ++.RS ++.RE ++.TP ++.B \f[I]FI_ADDR_GNI\f[] ++Address is a Cray proprietary format that is used with their GNI ++protocol. ++.RS ++.RE ++.TP ++.B \f[I]FI_ADDR_STR\f[] ++Address is a formatted character string. + The length and content of the string is address and/or provider + specific, but in general follows a URI model: ++.RS ++.RE + .IP + .nf + \f[C] +@@ -638,26 +830,34 @@ should be used to filter by provider if necessary. + The operation of the fi_getinfo call may be controlled through the use + of input flags. + Valid flags include the following. +-.PP +-\f[I]FI_NUMERICHOST\f[] : Indicates that the node parameter is a numeric +-string representation of a fabric address, such as a dotted decimal IP +-address. ++.TP ++.B \f[I]FI_NUMERICHOST\f[] ++Indicates that the node parameter is a numeric string representation of ++a fabric address, such as a dotted decimal IP address. + Use of this flag will suppress any lengthy name resolution protocol. +-.PP +-\f[I]FI_SOURCE\f[] : Indicates that the node and service parameters +-specify the local source address to associate with an endpoint. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOURCE\f[] ++Indicates that the node and service parameters specify the local source ++address to associate with an endpoint. + If specified, either the node and/or service parameter must be + non\-NULL. + This flag is often used with passive endpoints. +-.PP +-\f[I]FI_PROV_ATTR_ONLY\f[] : Indicates that the caller is only querying +-for what providers are potentially available. ++.RS ++.RE ++.TP ++.B \f[I]FI_PROV_ATTR_ONLY\f[] ++Indicates that the caller is only querying for what providers are ++potentially available. + All providers will return exactly one fi_info struct, regardless of + whether that provider is usable on the current platform or not. + The returned fi_info struct will contain default values for all members, + with the exception of fabric_attr. + The fabric_attr member will have the prov_name and prov_version values + filled in. ++.RS ++.RE + .SH RETURN VALUE + .PP + fi_getinfo() returns 0 on success. +@@ -673,20 +873,28 @@ structure on success, or NULL on error. + Both calls require that the returned fi_info structure be freed via + fi_freeinfo(). + .SH ERRORS +-.PP +-\f[I]FI_EBADFLAGS\f[] : The specified endpoint or domain capability or +-operation flags are invalid. +-.PP +-\f[I]FI_ENOMEM\f[] : Indicates that there was insufficient memory to +-complete the operation. +-.PP +-\f[I]FI_ENODATA\f[] : Indicates that no providers could be found which +-support the requested fabric information. ++.TP ++.B \f[I]FI_EBADFLAGS\f[] ++The specified endpoint or domain capability or operation flags are ++invalid. ++.RS ++.RE ++.TP ++.B \f[I]FI_ENOMEM\f[] ++Indicates that there was insufficient memory to complete the operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_ENODATA\f[] ++Indicates that no providers could be found which support the requested ++fabric information. ++.RS ++.RE + .SH NOTES + .PP + If hints are provided, the operation will be controlled by the values + that are supplied in the various fields (see section on +-\f[I]fi\f[]info_). ++\f[I]fi_info\f[]). + Applications that require specific communication interfaces, domains, + capabilities or other requirements, can specify them using fields in + \f[I]hints\f[]. +@@ -709,6 +917,7 @@ Multiple threads may call \f[C]fi_getinfo\f[] simultaneously, without + any requirement for serialization. + .SH SEE ALSO + .PP +-\f[C]fi_open\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3) ++\f[C]fi_open\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), ++\f[C]fi_nic\f[](3) + .SH AUTHORS + OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_mr.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_mr.3 +index a6ce08d92..9d72acd3e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_mr.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_mr.3 +@@ -1,33 +1,61 @@ +-.TH "fi_mr" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_mr" "3" "2018\-10\-15" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_mr \- Memory region operations +-.PP +-fi_mr_reg / fi_mr_regv / fi_mr_regattr : Register local memory buffers +-for direct fabric access +-.PP +-fi_close : Deregister registered memory buffers. +-.PP +-fi_mr_desc : Return a local descriptor associated with a registered +-memory region +-.PP +-fi_mr_key : Return the remote key needed to access a registered memory +-region +-.PP +-fi_mr_raw_attr : Return raw memory region attributes. +-.PP +-fi_mr_map_raw : Converts a raw memory region key into a key that is +-usable for data transfer operations. +-.PP +-fi_mr_unmap_key : Releases a previously mapped raw memory region key. +-.PP +-fi_mr_bind : Associate a registered memory region with a completion +-counter. +-.PP +-fi_mr_refresh : Updates the memory pages associated with a memory +-region. +-.PP +-fi_mr_enable : Enables a memory region for use. ++.TP ++.B fi_mr_reg / fi_mr_regv / fi_mr_regattr ++Register local memory buffers for direct fabric access ++.RS ++.RE ++.TP ++.B fi_close ++Deregister registered memory buffers. ++.RS ++.RE ++.TP ++.B fi_mr_desc ++Return a local descriptor associated with a registered memory region ++.RS ++.RE ++.TP ++.B fi_mr_key ++Return the remote key needed to access a registered memory region ++.RS ++.RE ++.TP ++.B fi_mr_raw_attr ++Return raw memory region attributes. ++.RS ++.RE ++.TP ++.B fi_mr_map_raw ++Converts a raw memory region key into a key that is usable for data ++transfer operations. ++.RS ++.RE ++.TP ++.B fi_mr_unmap_key ++Releases a previously mapped raw memory region key. ++.RS ++.RE ++.TP ++.B fi_mr_bind ++Associate a registered memory region with a completion counter. ++.RS ++.RE ++.TP ++.B fi_mr_refresh ++Updates the memory pages associated with a memory region. ++.RS ++.RE ++.TP ++.B fi_mr_enable ++Enables a memory region for use. ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -68,36 +96,72 @@ int\ fi_mr_enable(struct\ fid_mr\ *mr); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]domain\f[] : Resource domain +-.PP +-\f[I]mr\f[] : Memory region +-.PP +-\f[I]bfid\f[] : Fabric identifier of an associated resource. +-.PP +-\f[I]context\f[] : User specified context associated with the memory +-region. +-.PP +-\f[I]buf\f[] : Memory buffer to register with the fabric hardware +-.PP +-\f[I]len\f[] : Length of memory buffer to register +-.PP +-\f[I]iov\f[] : Vectored memory buffer. +-.PP +-\f[I]count\f[] : Count of vectored buffer entries. +-.PP +-\f[I]access\f[] : Memory access permissions associated with registration +-.PP +-\f[I]offset\f[] : Optional specified offset for accessing specified +-registered buffers. ++.TP ++.B \f[I]domain\f[] ++Resource domain ++.RS ++.RE ++.TP ++.B \f[I]mr\f[] ++Memory region ++.RS ++.RE ++.TP ++.B \f[I]bfid\f[] ++Fabric identifier of an associated resource. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified context associated with the memory region. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Memory buffer to register with the fabric hardware ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of memory buffer to register ++.RS ++.RE ++.TP ++.B \f[I]iov\f[] ++Vectored memory buffer. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Count of vectored buffer entries. ++.RS ++.RE ++.TP ++.B \f[I]access\f[] ++Memory access permissions associated with registration ++.RS ++.RE ++.TP ++.B \f[I]offset\f[] ++Optional specified offset for accessing specified registered buffers. + This parameter is reserved for future use and must be 0. +-.PP +-\f[I]requested_key\f[] : Optional requested remote key associated with +-registered buffers. +-.PP +-\f[I]attr\f[] : Memory region attributes +-.PP +-\f[I]flags\f[] : Additional flags to apply to the operation. ++.RS ++.RE ++.TP ++.B \f[I]requested_key\f[] ++Optional requested remote key associated with registered buffers. ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Memory region attributes ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply to the operation. ++.RS ++.RE + .SH DESCRIPTION + .PP + Registered memory regions associate memory buffers with permissions +@@ -110,9 +174,9 @@ Memory registration restrictions are controlled using a separate set of + mode bits, specified through the domain attributes (mr_mode field). + .PP + The following apply to memory registration. +-.PP +-\f[I]Scalable Memory Registration\f[] : By default, memory registration +-is considered scalable. ++.TP ++.B \f[I]Scalable Memory Registration\f[] ++By default, memory registration is considered scalable. + (For library versions 1.4 and earlier, this is indicated by setting + mr_mode to FI_MR_SCALABLE, with the fi_info mode bit FI_LOCAL_MR set to + 0). +@@ -121,6 +185,8 @@ mr_mode bits being set. + The setting of mr_mode bits therefore adjusts application behavior as + described below. + Default, scalable registration has several properties. ++.RS ++.RE + .PP + In scalable mode, registration occurs on memory address ranges. + Because registration refers to memory regions, versus data buffers, the +@@ -144,15 +210,17 @@ registered. + This includes source buffers for all transmit operations \-\- sends, + tagged sends, RMA, and atomics \-\- as well as buffers posted for + receive and tagged receive operations. +-.PP +-\f[I]FI_MR_LOCAL\f[] : When the FI_MR_LOCAL mode bit is set, +-applications must register all data buffers that will be accessed by the +-local hardware and provide a valid mem_desc parameter into applicable +-data transfer operations. ++.TP ++.B \f[I]FI_MR_LOCAL\f[] ++When the FI_MR_LOCAL mode bit is set, applications must register all ++data buffers that will be accessed by the local hardware and provide a ++valid mem_desc parameter into applicable data transfer operations. + When FI_MR_LOCAL is zero, applications are not required to register data + buffers before using them for local operations (e.g. + send and receive data buffers), and the mem_desc parameter into data + transfer operations is ignored. ++.RS ++.RE + .PP + A provider may hide local registration requirements from applications by + making use of an internal registration cache or similar mechanisms. +@@ -166,38 +234,48 @@ registration calls. + Note: the FI_MR_LOCAL mr_mode bit replaces the FI_LOCAL_MR fi_info mode + bit. + When FI_MR_LOCAL is set, FI_LOCAL_MR is ignored. +-.PP +-\f[I]FI_MR_RAW\f[] : Raw memory regions are used to support providers +-with keys larger than 64\-bits or require setup at the peer. ++.TP ++.B \f[I]FI_MR_RAW\f[] ++Raw memory regions are used to support providers with keys larger than ++64\-bits or require setup at the peer. + When the FI_MR_RAW bit is set, applications must use fi_mr_raw_attr() + locally and fi_mr_map_raw() at the peer before targeting a memory region + as part of any data transfer request. +-.PP +-\f[I]FI_MR_VIRT_ADDR\f[] : The FI_MR_VIRT_ADDR bit indicates that the +-provider references memory regions by virtual address, rather than a +-0\-based offset. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_VIRT_ADDR\f[] ++The FI_MR_VIRT_ADDR bit indicates that the provider references memory ++regions by virtual address, rather than a 0\-based offset. + Peers that target memory regions registered with FI_MR_VIRT_ADDR specify + the destination memory buffer using the target\[aq]s virtual address, + with any offset into the region specified as virtual address + offset. + Support of this bit typically implies that peers must exchange + addressing data prior to initiating any RMA or atomic operation. +-.PP +-\f[I]FI_MR_ALLOCATED\f[] : When set, all registered memory regions must +-be backed by physical memory pages at the time the registration call is +-made. +-.PP +-\f[I]FI_MR_PROV_KEY\f[] : This memory region mode indicates that the +-provider does not support application requested MR keys. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_ALLOCATED\f[] ++When set, all registered memory regions must be backed by physical ++memory pages at the time the registration call is made. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_PROV_KEY\f[] ++This memory region mode indicates that the provider does not support ++application requested MR keys. + MR keys are returned by the provider. + Applications that support FI_MR_PROV_KEY can obtain the provider key + using fi_mr_key(), unless FI_MR_RAW is also set. + The returned key should then be exchanged with peers prior to initiating + an RMA or atomic operation. +-.PP +-\f[I]FI_MR_MMU_NOTIFY\f[] : FI_MR_MMU_NOTIFY is typically set by +-providers that support memory registration against memory regions that +-are not necessarily backed by allocated physical pages at the time the +-memory registration occurs. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_MMU_NOTIFY\f[] ++FI_MR_MMU_NOTIFY is typically set by providers that support memory ++registration against memory regions that are not necessarily backed by ++allocated physical pages at the time the memory registration occurs. + (That is, FI_MR_ALLOCATED is typically 0). + However, such providers require that applications notify the provider + prior to the MR being accessed as part of a data transfer operation. +@@ -206,10 +284,12 @@ now back the region. + The notification is necessary for providers that cannot hook directly + into the operating system page tables or memory management unit. + See fi_mr_refresh() for notification details. +-.PP +-\f[I]FI_MR_RMA_EVENT\f[] : This mode bit indicates that the provider +-must configure memory regions that are associated with RMA events prior +-to their use. ++.RS ++.RE ++.TP ++.B \f[I]FI_MR_RMA_EVENT\f[] ++This mode bit indicates that the provider must configure memory regions ++that are associated with RMA events prior to their use. + This includes all memory regions that are associated with completion + counters. + When set, applications must indicate if a memory region will be +@@ -217,22 +297,27 @@ associated with a completion counter as part of the region\[aq]s + creation. + This is done by passing in the FI_RMA_EVENT flag to the memory + registration call. ++.RS ++.RE + .PP + Such memory regions will be created in a disabled state and must be + associated with all completion counters prior to being enabled. + To enable a memory region, the application must call fi_mr_enable(). + After calling fi_mr_enable(), no further resource bindings may be made + to the memory region. +-.PP +-\f[I]FI_MR_ENDPOINT\f[] : This mode bit indicates that the provider +-associates memory regions with endpoints rather than domains. ++.TP ++.B \f[I]FI_MR_ENDPOINT\f[] ++This mode bit indicates that the provider associates memory regions with ++endpoints rather than domains. + Memory regions that are registered with the provider are created in a + disabled state and must be bound to an endpoint prior to being enabled. + To bind the MR with an endpoint, the application must use fi_mr_bind(). + To enable the memory region, the application must call fi_mr_enable(). +-.PP +-\f[I]Basic Memory Registration\f[] : Basic memory registration is +-indicated by the FI_MR_BASIC mr_mode bit. ++.RS ++.RE ++.TP ++.B \f[I]Basic Memory Registration\f[] ++Basic memory registration is indicated by the FI_MR_BASIC mr_mode bit. + FI_MR_BASIC is maintained for backwards compatibility (libfabric version + 1.4 or earlier). + The behavior of basic registration is equivalent to setting the +@@ -246,6 +331,8 @@ Other mr_mode bit pairings are invalid. + Unlike other mr_mode bits, if FI_MR_BASIC is set on input to + fi_getinfo(), it will not be cleared by the provider. + That is, setting FI_MR_BASIC to one requests basic registration. ++.RS ++.RE + .PP + The registrations functions \-\- fi_mr_reg, fi_mr_regv, and + fi_mr_regattr \-\- are used to register one or more memory regions with +@@ -363,6 +450,15 @@ Use of this call is required if the FI_RAW_MR mode bit has been set by + the provider; however, it is safe to use this call with any memory + region. + .PP ++On input, the key_size parameter should indicate the size of the raw_key ++buffer. ++If the actual key is larger than what can fit into the buffer, it will ++return \-FI_ETOOSMALL. ++On output, key_size is set to the size of the buffer needed to store the ++key, which may be larger than the input value. ++The needed key_size can also be obtained through the mr_key_size domain ++attribute (fi_domain_attr) field. ++.PP + A raw key must be mapped by a peer before it can be used in data + transfer operations. + See fi_mr_map_raw below. +@@ -394,11 +490,14 @@ with endpoints (see FI_MR_ENDPOINT). + .PP + When binding with a counter, the type of events tracked against the + memory region is based on the bitwise OR of the following flags. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : Generates an event whenever a remote RMA +-write or atomic operation modifies the memory region. ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++Generates an event whenever a remote RMA write or atomic operation ++modifies the memory region. + Use of this flag requires that the endpoint through which the MR is + accessed be created with the FI_RMA_EVENT capability. ++.RS ++.RE + .PP + When binding the memory region to an endpoint, flags should be 0. + .SS fi_mr_refresh +@@ -442,6 +541,7 @@ struct\ fi_mr_attr\ { + \ \ \ \ const\ struct\ iovec\ *mr_iov; + \ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ iov_count; + \ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ access; ++\ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ offset; + \ \ \ \ uint64_t\ \ \ \ \ \ \ \ \ \ \ requested_key; + \ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *context; + \ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ auth_key_size; +@@ -465,26 +565,45 @@ See \f[C]fi_domain(3)\f[]. + Indicates the type of access that the local or a peer endpoint has to + the registered memory region. + Supported access permissions are the bitwise OR of the following flags: +-.PP +-\f[I]FI_SEND\f[] : The memory buffer may be used in outgoing message +-data transfers. ++.TP ++.B \f[I]FI_SEND\f[] ++The memory buffer may be used in outgoing message data transfers. + This includes fi_msg and fi_tagged operations. +-.PP +-\f[I]FI_RECV\f[] : The memory buffer may be used to receive inbound +-message transfers. ++.RS ++.RE ++.TP ++.B \f[I]FI_RECV\f[] ++The memory buffer may be used to receive inbound message transfers. + This includes fi_msg and fi_tagged operations. +-.PP +-\f[I]FI_READ\f[] : The memory buffer may be used as the result buffer +-for RMA read and atomic operations on the initiator side. +-.PP +-\f[I]FI_WRITE\f[] : The memory buffer may be used as the source buffer +-for RMA write and atomic operations on the initiator side. +-.PP +-\f[I]FI_REMOTE_READ\f[] : The memory buffer may be used as the source +-buffer of an RMA read operation on the target side. +-.PP +-\f[I]FI_REMOTE_WRITE\f[] : The memory buffer may be used as the target +-buffer of an RMA write or atomic operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_READ\f[] ++The memory buffer may be used as the result buffer for RMA read and ++atomic operations on the initiator side. ++.RS ++.RE ++.TP ++.B \f[I]FI_WRITE\f[] ++The memory buffer may be used as the source buffer for RMA write and ++atomic operations on the initiator side. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_READ\f[] ++The memory buffer may be used as the source buffer of an RMA read ++operation on the target side. ++.RS ++.RE ++.TP ++.B \f[I]FI_REMOTE_WRITE\f[] ++The memory buffer may be used as the target buffer of an RMA write or ++atomic operation. ++.RS ++.RE ++.SS offset ++.PP ++The offset field is reserved for future use and must be 0. + .SS requested_key + .PP + An application specified access key associated with the memory region. +@@ -547,16 +666,21 @@ footprint overhead, making it less desirable for highly scalable apps. + .SH FLAGS + .PP + The follow flag may be specified to any memory registration call. +-.PP +-\f[I]FI_RMA_EVENT\f[] : This flag indicates that the specified memory +-region will be associated with a completion counter used to count RMA +-operations that access the MR. +-.PP +-\f[I]FI_RMA_PMEM\f[] : This flag indicates that the underlying memory +-region is backed by persistent memory and will be used in RMA +-operations. ++.TP ++.B \f[I]FI_RMA_EVENT\f[] ++This flag indicates that the specified memory region will be associated ++with a completion counter used to count RMA operations that access the ++MR. ++.RS ++.RE ++.TP ++.B \f[I]FI_RMA_PMEM\f[] ++This flag indicates that the underlying memory region is backed by ++persistent memory and will be used in RMA operations. + It must be specified if persistent completion semantics or persistent + data transfers are required when accessing the registered region. ++.RS ++.RE + .SH RETURN VALUES + .PP + Returns 0 on success. +@@ -564,18 +688,29 @@ On error, a negative value corresponding to fabric errno is returned. + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_ENOKEY\f[] : The requested_key is already in use. +-.PP +-\f[I]\-FI_EKEYREJECTED\f[] : The requested_key is not available. ++.TP ++.B \f[I]\-FI_ENOKEY\f[] ++The requested_key is already in use. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EKEYREJECTED\f[] ++The requested_key is not available. + They key may be out of the range supported by the provider, or the + provider may not support user\-requested memory registration keys. +-.PP +-\f[I]\-FI_ENOSYS\f[] : Returned by fi_mr_bind if the provider does not +-support reporting events based on access to registered memory regions. +-.PP +-\f[I]\-FI_EBADFLAGS\f[] : Returned if the specified flags are not +-supported by the provider. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_ENOSYS\f[] ++Returned by fi_mr_bind if the provider does not support reporting events ++based on access to registered memory regions. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EBADFLAGS\f[] ++Returned if the specified flags are not supported by the provider. ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_msg.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_msg.3 +index 4c35ad6ff..c89d44c44 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_msg.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_msg.3 +@@ -1,4 +1,7 @@ +-.TH "fi_msg" "3" "2018\-01\-08" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_msg" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_msg \- Message data transfer operations +@@ -48,40 +51,74 @@ ssize_t\ fi_injectdata(struct\ fid_ep\ *ep,\ const\ void\ *buf,\ size_t\ len, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]ep\f[] : Fabric endpoint on which to initiate send or post receive +-buffer. +-.PP +-\f[I]buf\f[] : Data buffer to send or receive. +-.PP +-\f[I]len\f[] : Length of data buffer to send or receive, specified in +-bytes. ++.TP ++.B \f[I]ep\f[] ++Fabric endpoint on which to initiate send or post receive buffer. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Data buffer to send or receive. ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data buffer to send or receive, specified in bytes. + Valid transfers are from 0 bytes up to the endpoint\[aq]s max_msg_size. +-.PP +-\f[I]iov\f[] : Vectored data buffer. +-.PP +-\f[I]count\f[] : Count of vectored data entries. +-.PP +-\f[I]desc\f[] : Descriptor associated with the data buffer +-.PP +-\f[I]data\f[] : Remote CQ data to transfer with the sent message. +-.PP +-\f[I]dest_addr\f[] : Destination address for connectionless transfers. ++.RS ++.RE ++.TP ++.B \f[I]iov\f[] ++Vectored data buffer. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Count of vectored data entries. ++.RS ++.RE ++.TP ++.B \f[I]desc\f[] ++Descriptor associated with the data buffer ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++Remote CQ data to transfer with the sent message. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr\f[] ++Destination address for connectionless transfers. + Ignored for connected endpoints. +-.PP +-\f[I]src_addr\f[] : Source address to receive from for connectionless +-transfers. ++.RS ++.RE ++.TP ++.B \f[I]src_addr\f[] ++Source address to receive from for connectionless transfers. + Applies only to connectionless endpoints with the FI_DIRECTED_RECV + capability enabled, otherwise this field is ignored. + If set to FI_ADDR_UNSPEC, any source address may match. +-.PP +-\f[I]msg\f[] : Message descriptor for send and receive operations. +-.PP +-\f[I]flags\f[] : Additional flags to apply for the send or receive +-operation. +-.PP +-\f[I]context\f[] : User specified pointer to associate with the +-operation. ++.RS ++.RE ++.TP ++.B \f[I]msg\f[] ++Message descriptor for send and receive operations. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply for the send or receive operation. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified pointer to associate with the operation. ++This parameter is ignored if the operation will not generate a ++successful completion, unless an op flag specifies the context parameter ++be used for required input. ++.RS ++.RE + .SH DESCRIPTION + .PP + The send functions \-\- fi_send, fi_sendv, fi_sendmsg, fi_inject, and +@@ -152,8 +189,7 @@ The send inject call is an optimized version of fi_send. + The fi_inject function behaves as if the FI_INJECT transfer flag were + set, and FI_COMPLETION were not. + That is, the data buffer is available for reuse immediately on returning +-from from fi_inject, and no completion event will be generated for this +-send. ++from fi_inject, and no completion event will be generated for this send. + The completion event will be suppressed even if the CQ was bound without + FI_SELECTIVE_COMPLETION or the endpoint\[aq]s op_flags contain + FI_COMPLETION. +@@ -200,32 +236,62 @@ previously configured with the endpoint, except where noted (see + fi_endpoint.3). + The following list of flags are usable with fi_recvmsg and/or + fi_sendmsg. +-.PP +-\f[I]FI_REMOTE_CQ_DATA\f[] : Applies to fi_sendmsg and fi_senddata. ++.TP ++.B \f[I]FI_REMOTE_CQ_DATA\f[] ++Applies to fi_sendmsg and fi_senddata. + Indicates that remote CQ data is available and should be sent as part of + the request. + See fi_getinfo for additional details on FI_REMOTE_CQ_DATA. +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for the specified operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_CLAIM\f[] ++Applies to posted receive operations for endpoints configured for ++FI_BUFFERED_RECV or FI_VARIABLE_MSG. ++This flag is used to retrieve a message that was buffered by the ++provider. ++See the Buffered Receives section for details. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for the specified ++operation. + The endpoint must be bound to a completion queue with + FI_SELECTIVE_COMPLETION that corresponds to the specified operation, or + this flag is ignored. +-.PP +-\f[I]FI_MORE\f[] : Indicates that the user has additional requests that +-will immediately be posted after the current call returns. ++.RS ++.RE ++.TP ++.B \f[I]FI_DISCARD\f[] ++Applies to posted receive operations for endpoints configured for ++FI_BUFFERED_RECV or FI_VARIABLE_MSG. ++This flag is used to free a message that was buffered by the provider. ++See the Buffered Receives section for details. ++.RS ++.RE ++.TP ++.B \f[I]FI_MORE\f[] ++Indicates that the user has additional requests that will immediately be ++posted after the current call returns. + Use of this flag may improve performance by enabling the provider to + optimize its access to the fabric hardware. +-.PP +-\f[I]FI_INJECT\f[] : Applies to fi_sendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT\f[] ++Applies to fi_sendmsg. + Indicates that the outbound data buffer should be returned to user + immediately after the send call returns, even if the operation is + handled asynchronously. + This may require that the underlying provider implementation copy the + data into a local buffer and transfer out of that buffer. + This flag can only be used with messages smaller than inject_size. +-.PP +-\f[I]FI_MULTI_RECV\f[] : Applies to posted receive operations. ++.RS ++.RE ++.TP ++.B \f[I]FI_MULTI_RECV\f[] ++Applies to posted receive operations. + This flag allows the user to post a single buffer that will receive + multiple incoming messages. + Received messages will be packed into the receive buffer until the +@@ -234,6 +300,8 @@ Use of this flag may cause a single posted receive operation to generate + multiple events as messages are placed into the buffer. + The placement of received data into the buffer may be subjected to + provider specific alignment restrictions. ++.RS ++.RE + .PP + The buffer will be released by the provider when the available buffer + space falls below the specified minimum (see FI_OPT_MIN_MULTI_RECV). +@@ -242,37 +310,175 @@ always be generated when the buffer has been consumed, even if other + receive completions have been suppressed (i.e. + the Rx context has been configured for FI_SELECTIVE_COMPLETION). + See the FI_MULTI_RECV completion flag \f[C]fi_cq\f[](3). +-.PP +-\f[I]FI_INJECT_COMPLETE\f[] : Applies to fi_sendmsg. ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Applies to fi_sendmsg. + Indicates that a completion should be generated when the source + buffer(s) may be reused. +-.PP +-\f[I]FI_TRANSMIT_COMPLETE\f[] : Applies to fi_sendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Applies to fi_sendmsg. + Indicates that a completion should not be generated until the operation + has been successfully transmitted and is no longer being tracked by the + provider. +-.PP +-\f[I]FI_DELIVERY_COMPLETE\f[] : Applies to fi_sendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_DELIVERY_COMPLETE\f[] ++Applies to fi_sendmsg. + Indicates that a completion should be generated when the operation has + been processed by the destination. +-.PP +-\f[I]FI_FENCE\f[] : Applies to transmits. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Applies to transmits. + Indicates that the requested operation, also known as the fenced + operation, and any operation posted after the fenced operation will be + deferred until all previous operations targeting the same peer endpoint + have completed. + Operations posted after the fencing will see and/or replace the results + of any operations initiated prior to the fenced operation. ++.RS ++.RE + .PP + The ordering of operations starting at the posting of the fenced + operation (inclusive) to the posting of a subsequent fenced operation + (exclusive) is controlled by the endpoint\[aq]s ordering semantics. +-.PP +-\f[I]FI_MULTICAST\f[] : Applies to transmits. ++.TP ++.B \f[I]FI_MULTICAST\f[] ++Applies to transmits. + This flag indicates that the address specified as the data transfer + destination is a multicast address. + This flag must be used in all multicast transfers, in conjunction with a + multicast fi_addr_t. ++.RS ++.RE ++.SH Buffered Receives ++.PP ++Buffered receives indicate that the networking layer allocates and ++manages the data buffers used to receive network data transfers. ++As a result, received messages must be copied from the network buffers ++into application buffers for processing. ++However, applications can avoid this copy if they are able to process ++the message in place (directly from the networking buffers). ++.PP ++Handling buffered receives differs based on the size of the message ++being sent. ++In general, smaller messages are passed directly to the application for ++processing. ++However, for large messages, an application will only receive the start ++of the message and must claim the rest. ++The details for how small messages are reported and large messages may ++be claimed are described below. ++.PP ++When a provider receives a message, it will write an entry to the ++completion queue associated with the receiving endpoint. ++For discussion purposes, the completion queue is assumed to be ++configured for FI_CQ_FORMAT_DATA. ++Since buffered receives are not associated with application posted ++buffers, the CQ entry op_context will point to a struct fi_recv_context. ++.IP ++.nf ++\f[C] ++struct\ fi_recv_context\ { ++\ \ \ \ struct\ fid_ep\ *ep; ++\ \ \ \ void\ *context; ++}; ++\f[] ++.fi ++.PP ++The \[aq]ep\[aq] field will point to the receiving endpoint or Rx ++context, and \[aq]context\[aq] will be NULL. ++The CQ entry\[aq]s \[aq]buf\[aq] will point to a provider managed buffer ++where the start of the received message is located, and \[aq]len\[aq] ++will be set to the total size of the message. ++.PP ++The maximum sized message that a provider can buffer is limited by an ++FI_OPT_BUFFERED_LIMIT. ++This threshold can be obtained and may be adjusted by the application ++using the fi_getopt and fi_setopt calls, respectively. ++Any adjustments must be made prior to enabling the endpoint. ++The CQ entry \[aq]buf\[aq] will point to a buffer of received data. ++If the sent message is larger than the buffered amount, the CQ entry ++\[aq]flags\[aq] will have the FI_MORE bit set. ++When the FI_MORE bit is set, \[aq]buf\[aq] will reference at least ++FI_OPT_BUFFERED_MIN bytes of data (see fi_endpoint.3 for more info). ++.PP ++After being notified that a buffered receive has arrived, applications ++must either claim or discard the message. ++Typically, small messages are processed and discarded, while large ++messages are claimed. ++However, an application is free to claim or discard any message ++regardless of message size. ++.PP ++To claim a message, an application must post a receive operation with ++the FI_CLAIM flag set. ++The struct fi_recv_context returned as part of the notification must be ++provided as the receive operation\[aq]s context. ++The struct fi_recv_context contains a \[aq]context\[aq] field. ++Applications may modify this field prior to claiming the message. ++When the claim operation completes, a standard receive completion entry ++will be generated on the completion queue. ++The \[aq]context\[aq] of the associated CQ entry will be set to the ++\[aq]context\[aq] value passed in through the fi_recv_context structure, ++and the CQ entry flags will have the FI_CLAIM bit set. ++.PP ++Buffered receives that are not claimed must be discarded by the ++application when it is done processing the CQ entry data. ++To discard a message, an application must post a receive operation with ++the FI_DISCARD flag set. ++The struct fi_recv_context returned as part of the notification must be ++provided as the receive operation\[aq]s context. ++When the FI_DISCARD flag is set for a receive operation, the receive ++input buffer(s) and length parameters are ignored. ++.PP ++IMPORTANT: Buffered receives must be claimed or discarded in a timely ++manner. ++Failure to do so may result in increased memory usage for network ++buffering or communication stalls. ++Once a buffered receive has been claimed or discarded, the original CQ ++entry \[aq]buf\[aq] or struct fi_recv_context data may no longer be ++accessed by the application. ++.PP ++The use of the FI_CLAIM and FI_DISCARD operation flags is also described ++with respect to tagged message transfers in fi_tagged.3. ++Buffered receives of tagged messages will include the message tag as ++part of the CQ entry, if available. ++.PP ++The handling of buffered receives follows all message ordering ++restrictions assigned to an endpoint. ++For example, completions may indicate the order in which received ++messages arrived at the receiver based on the endpoint attributes. ++.SH Variable Length Messages ++.PP ++Variable length messages, or simply variable messages, are transfers ++where the size of the message is unknown to the receiver prior to the ++message being sent. ++It indicates that the recipient of a message does not know the amount of ++data to expect prior to the message arriving. ++It is most commonly used when the size of message transfers varies ++greatly, with very large messages interspersed with much smaller ++messages, making receive side message buffering difficult to manage. ++Variable messages are not subject to max message length restrictions ++(i.e. ++struct fi_ep_attr::max_msg_size limits), and may be up to the maximum ++value of size_t (e.g. ++SIZE_MAX) in length. ++.PP ++Variable length messages support requests that the provider allocate and ++manage the network message buffers. ++As a result, the application requirements and provider behavior is ++identical as those defined for supporting the FI_BUFFERED_RECV mode bit. ++See the Buffered Receive section above for details. ++The main difference is that buffered receives are limited by the ++fi_ep_attr::max_msg_size threshold, whereas variable length messages are ++not. ++.PP ++Support for variable messages is indicated through the FI_VARIABLE_MSG ++capability bit. + .SH NOTES + .PP + If an endpoint has been configured with FI_MSG_PREFIX, the application +@@ -291,12 +497,15 @@ Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .PP + See the discussion below for details handling FI_EAGAIN. + .SH ERRORS +-.PP +-\f[I]\-FI_EAGAIN\f[] : Indicates that the underlying provider currently +-lacks the resources needed to initiate the requested operation. ++.TP ++.B \f[I]\-FI_EAGAIN\f[] ++Indicates that the underlying provider currently lacks the resources ++needed to initiate the requested operation. + The reasons for a provider returning FI_EAGAIN are varied. + However, common reasons include insufficient internal buffering or full + processing queues. ++.RS ++.RE + .PP + Insufficient internal buffering is often associated with operations that + use FI_INJECT. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_nic.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_nic.3 +new file mode 100644 +index 000000000..4f21557f0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_nic.3 +@@ -0,0 +1,186 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_nic" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_nic \- Fabric network interface card attributes ++.SH NETWORK INTERFACE CARD ATTRIBUTES ++.PP ++The fid_nic structure defines attributes for a struct fi_info that is ++directly associated with underlying networking hardware and may be ++returned directly from calling \f[C]fi_getinfo\f[](3). ++The format of fid_nic and the related substructures are defined below. ++.PP ++Note that not all fields of all structures may be available. ++Unavailable or fields that are not applicable to the indicated device ++will be set to NULL or 0. ++.IP ++.nf ++\f[C] ++struct\ fid_nic\ { ++\ \ \ \ struct\ fid\ \ \ \ \ \ \ \ \ \ \ \ \ fid; ++\ \ \ \ struct\ fi_device_attr\ *device_attr; ++\ \ \ \ struct\ fi_bus_attr\ \ \ \ *bus_attr; ++\ \ \ \ struct\ fi_link_attr\ \ \ *link_attr; ++\ \ \ \ void\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *prov_attr; ++}; ++ ++struct\ fi_device_attr\ { ++\ \ \ \ char\ *name; ++\ \ \ \ char\ *device_id; ++\ \ \ \ char\ *device_version; ++\ \ \ \ char\ *vendor_id; ++\ \ \ \ char\ *driver; ++\ \ \ \ char\ *firmware; ++}; ++ ++struct\ fi_pci_attr\ { ++\ \ \ \ uint16_t\ domain_id; ++\ \ \ \ uint8_t\ \ bus_id; ++\ \ \ \ uint8_t\ \ device_id; ++\ \ \ \ uint8_t\ \ function_id; ++}; ++ ++struct\ fi_bus_attr\ { ++\ \ \ \ enum\ fi_bus_type\ \ \ \ \ \ \ bus_type; ++\ \ \ \ union\ { ++\ \ \ \ \ \ \ \ struct\ fi_pci_attr\ pci; ++\ \ \ \ }\ attr; ++}; ++ ++struct\ fi_link_attr\ { ++\ \ \ \ char\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *address; ++\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ mtu; ++\ \ \ \ size_t\ \ \ \ \ \ \ \ \ \ \ \ \ speed; ++\ \ \ \ enum\ fi_link_state\ state; ++\ \ \ \ char\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *network_type; ++}; ++\f[] ++.fi ++.SS Device Attributes ++.PP ++Device attributes are used to identify the specific virtual or hardware ++NIC associated with an fi_info structure. ++.TP ++.B \f[I]name\f[] ++The operating system name associated with the device. ++This may be a logical network interface name (e.g. ++eth0 or eno1) or an absolute filename. ++.RS ++.RE ++.TP ++.B \f[I]device_id\f[] ++This is a vendor specific identifier for the device or product. ++.RS ++.RE ++.TP ++.B \f[I]device_version\f[] ++Indicates the version of the device. ++.RS ++.RE ++.TP ++.B \f[I]vendor_id\f[] ++Indicates the name of the vendor that distributes the NIC. ++.RS ++.RE ++.TP ++.B \f[I]driver\f[] ++The name of the driver associated with the device ++.RS ++.RE ++.TP ++.B \f[I]firmware\f[] ++The device\[aq]s firmware version. ++.RS ++.RE ++.SS Bus Attributes ++.PP ++The bus attributes are used to identify the physical location of the NIC ++in the system. ++.TP ++.B \f[I]bus_type\f[] ++Indicates the type of system bus where the NIC is located. ++Valid values are FI_BUS_PCI or FI_BUS_UNKNOWN. ++.RS ++.RE ++.TP ++.B \f[I]attr.pci.domain_id\f[] ++The domain where the PCI bus is located. ++Valid only if bus_type is FI_BUS_PCI. ++.RS ++.RE ++.TP ++.B \f[I]attr.pci.bus_id\f[] ++The PCI bus identifier where the device is located. ++Valid only if bus_type is FI_BUS_PCI. ++.RS ++.RE ++.TP ++.B \f[I]attr.pci.device_id\f[] ++The identifier on the PCI bus where the device is located. ++Valid only if bus_type is FI_BUS_PCI. ++.RS ++.RE ++.TP ++.B \f[I]attr.pci.function_id\f[] ++The function on the device being referenced. ++Valid only if bus_type is FI_BUS_PCI. ++.RS ++.RE ++.SS Link Attributes ++.PP ++Link attributes describe low\-level details about the network connection ++into the fabric. ++.TP ++.B \f[I]address\f[] ++The primary link\-level address associated with the NIC, such as a MAC ++address. ++If multiple addresses are available, only one will be reported. ++.RS ++.RE ++.TP ++.B \f[I]mtu\f[] ++The maximum transfer unit of link level frames or packets, in bytes. ++.RS ++.RE ++.TP ++.B \f[I]speed\f[] ++The active link data rate, given in bits per second. ++.RS ++.RE ++.TP ++.B \f[I]state\f[] ++The current physical port state. ++Possible values are FI_LINK_UNKNOWN, FI_LINK_DOWN, and FI_LINK_UP, to ++indicate if the port state is unknown or not applicable (unknown), ++inactive (down), or active (up). ++.RS ++.RE ++.TP ++.B \f[I]network_type\f[] ++Specifies the type of network interface currently active, such as ++Ethernet or InfiniBand. ++.RS ++.RE ++.SS Provider Attributes ++.PP ++Provider attributes reference provider specific details of the device. ++These attributes are both provider and device specific. ++The attributes can be interpretted by \f[C]fi_tostr\f[](3). ++Applications may also use the other attribute fields, such as related ++fi_fabric_attr: prov_name field, to determine an appropriate structure ++to cast the attributes. ++The format and definition of this field is outside the scope of the ++libfabric core framework, but may be available as part of a provider ++specific header file included with libfabric package. ++.SH NOTES ++.PP ++The fid_nic structure is returned as part of a call to ++\f[C]fi_getinfo\f[](3). ++It is automatically freed as part of calling \f[C]fi_freeinfo\f[](3) ++.SH SEE ALSO ++.PP ++\f[C]fi_getinfo\f[](3) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_poll.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_poll.3 +index 2e0231f6f..30594f142 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_poll.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_poll.3 +@@ -1,24 +1,46 @@ +-.TH "fi_poll" "3" "2016\-12\-07" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_poll" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_poll \- Polling and wait set operations +-.PP +-fi_poll_open / fi_close : Open/close a polling set +-.PP +-fi_poll_add / fi_poll_del : Add/remove a completion queue or counter +-to/from a poll set. +-.PP +-fi_poll : Poll for progress and events across multiple completion queues +-and counters. +-.PP +-fi_wait_open / fi_close : Open/close a wait set +-.PP +-fi_wait : Waits for one or more wait objects in a set to be signaled. +-.PP +-fi_trywait : Indicate when it is safe to block on wait objects using +-native OS calls. +-.PP +-fi_control : Control wait set operation or attributes. ++.TP ++.B fi_poll_open / fi_close ++Open/close a polling set ++.RS ++.RE ++.TP ++.B fi_poll_add / fi_poll_del ++Add/remove a completion queue or counter to/from a poll set. ++.RS ++.RE ++.TP ++.B fi_poll ++Poll for progress and events across multiple completion queues and ++counters. ++.RS ++.RE ++.TP ++.B fi_wait_open / fi_close ++Open/close a wait set ++.RS ++.RE ++.TP ++.B fi_wait ++Waits for one or more wait objects in a set to be signaled. ++.RS ++.RE ++.TP ++.B fi_trywait ++Indicate when it is safe to block on wait objects using native OS calls. ++.RS ++.RE ++.TP ++.B fi_control ++Control wait set operation or attributes. ++.RS ++.RE + .SH SYNOPSIS + .IP + .nf +@@ -51,31 +73,63 @@ int\ fi_control(struct\ fid\ *waitset,\ int\ command,\ void\ *arg); + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fabric\f[] : Fabric provider +-.PP +-\f[I]domain\f[] : Resource domain +-.PP +-\f[I]pollset\f[] : Event poll set +-.PP +-\f[I]waitset\f[] : Wait object set +-.PP +-\f[I]attr\f[] : Poll or wait set attributes +-.PP +-\f[I]context\f[] : On success, an array of user context values +-associated with completion queues or counters. +-.PP +-\f[I]fids\f[] : An array of fabric descriptors, each one associated with +-a native wait object. +-.PP +-\f[I]count\f[] : Number of entries in context or fids array. +-.PP +-\f[I]timeout\f[] : Time to wait for a signal, in milliseconds. +-.PP +-\f[I]command\f[] : Command of control operation to perform on the wait +-set. +-.PP +-\f[I]arg\f[] : Optional control argument. ++.TP ++.B \f[I]fabric\f[] ++Fabric provider ++.RS ++.RE ++.TP ++.B \f[I]domain\f[] ++Resource domain ++.RS ++.RE ++.TP ++.B \f[I]pollset\f[] ++Event poll set ++.RS ++.RE ++.TP ++.B \f[I]waitset\f[] ++Wait object set ++.RS ++.RE ++.TP ++.B \f[I]attr\f[] ++Poll or wait set attributes ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++On success, an array of user context values associated with completion ++queues or counters. ++.RS ++.RE ++.TP ++.B \f[I]fids\f[] ++An array of fabric descriptors, each one associated with a native wait ++object. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Number of entries in context or fids array. ++.RS ++.RE ++.TP ++.B \f[I]timeout\f[] ++Time to wait for a signal, in milliseconds. ++.RS ++.RE ++.TP ++.B \f[I]command\f[] ++Command of control operation to perform on the wait set. ++.RS ++.RE ++.TP ++.B \f[I]arg\f[] ++Optional control argument. ++.RS ++.RE + .SH DESCRIPTION + .SS fi_poll_open + .PP +@@ -93,9 +147,12 @@ struct\ fi_poll_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]flags\f[] : Flags that set the default operation of the poll set. ++.TP ++.B \f[I]flags\f[] ++Flags that set the default operation of the poll set. + The use of this field is reserved and must be set to 0 by the caller. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with a poll set. +@@ -148,25 +205,31 @@ struct\ fi_wait_attr\ { + }; + \f[] + .fi +-.PP +-\f[I]wait_obj\f[] : Wait sets are associated with specific wait +-object(s). ++.TP ++.B \f[I]wait_obj\f[] ++Wait sets are associated with specific wait object(s). + Wait objects allow applications to block until the wait object is + signaled, indicating that an event is available to be read. + The following values may be used to specify the type of wait object + associated with a wait set: FI_WAIT_UNSPEC, FI_WAIT_FD, and + FI_WAIT_MUTEX_COND. +-.IP \[bu] 2 +-\f[I]FI_WAIT_UNSPEC\f[] : Specifies that the user will only wait on the +-wait set using fabric interface calls, such as fi_wait. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_UNSPEC\f[] ++Specifies that the user will only wait on the wait set using fabric ++interface calls, such as fi_wait. + In this case, the underlying provider may select the most appropriate or + highest performing wait object available, including custom wait + mechanisms. + Applications that select FI_WAIT_UNSPEC are not guaranteed to retrieve + the underlying wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_FD\f[] : Indicates that the wait set should use file +-descriptor(s) as its wait mechanism. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_FD\f[] ++Indicates that the wait set should use file descriptor(s) as its wait ++mechanism. + It may not always be possible for a wait set to be implemented using a + single underlying file descriptor, but all wait objects will be file + descriptors. +@@ -174,16 +237,27 @@ File descriptor wait objects must be usable in the POSIX select(2), + poll(2), and epoll(7) routines (if available). + However, a provider may signal an FD wait object by marking it as + readable or with an error. +-.IP \[bu] 2 +-\f[I]FI_WAIT_MUTEX_COND\f[] : Specifies that the wait set should use a +-pthread mutex and cond variable as a wait object. +-.IP \[bu] 2 +-\f[I]FI_WAIT_CRITSEC_COND\f[] : Windows specific. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_MUTEX_COND\f[] ++Specifies that the wait set should use a pthread mutex and cond variable ++as a wait object. ++.RS ++.RE ++.TP ++.B \- \f[I]FI_WAIT_CRITSEC_COND\f[] ++Windows specific. + Specifies that the EQ should use a critical section and condition + variable as a wait object. +-.PP +-\f[I]flags\f[] : Flags that set the default operation of the wait set. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Flags that set the default operation of the wait set. + The use of this field is reserved and must be set to 0 by the caller. ++.RS ++.RE + .SS fi_close + .PP + The fi_close call releases all resources associated with a wait set. +@@ -260,9 +334,10 @@ Access to the wait set should be serialized across all calls when + fi_control is invoked, as it may redirect the implementation of wait set + operations. + The following control commands are usable with a wait set. +-.PP +-\f[I]FI_GETWAIT (void **)\f[] : This command allows the user to retrieve +-the low\-level wait object associated with the wait set. ++.TP ++.B \f[I]FI_GETWAIT (void **)\f[] ++This command allows the user to retrieve the low\-level wait object ++associated with the wait set. + The format of the wait set is specified during wait set creation, + through the wait set attributes. + The fi_control arg parameter should be an address where a pointer to the +@@ -272,15 +347,20 @@ fi_mutex_cond\[aq] for FI_WAIT_MUTEX_COND. + Support for FI_GETWAIT is provider specific and may fail if not + supported or if the wait set is implemented using more than one wait + object. ++.RS ++.RE + .SH RETURN VALUES + .PP + Returns FI_SUCCESS on success. + On error, a negative value corresponding to fabric errno is returned. + .PP + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. +-.PP +-fi_poll : On success, if events are available, returns the number of +-entries written to the context array. ++.TP ++.B fi_poll ++On success, if events are available, returns the number of entries ++written to the context array. ++.RS ++.RE + .SH NOTES + .SH SEE ALSO + .PP +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_rma.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_rma.3 +index b1404bdd7..0bacb8d77 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_rma.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_rma.3 +@@ -1,4 +1,7 @@ +-.TH "fi_rma" "3" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_rma" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_rma \- Remote memory access operations +@@ -52,46 +55,86 @@ ssize_t\ fi_inject_writedata(struct\ fid_ep\ *ep,\ const\ void\ *buf,\ size_t\ l + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]ep\f[] : Fabric endpoint on which to initiate read or write +-operation. +-.PP +-\f[I]buf\f[] : Local data buffer to read into (read target) or write +-from (write source) +-.PP +-\f[I]len\f[] : Length of data to read or write, specified in bytes. ++.TP ++.B \f[I]ep\f[] ++Fabric endpoint on which to initiate read or write operation. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Local data buffer to read into (read target) or write from (write ++source) ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data to read or write, specified in bytes. + Valid transfers are from 0 bytes up to the endpoint\[aq]s max_msg_size. +-.PP +-\f[I]iov\f[] : Vectored data buffer. +-.PP +-\f[I]count\f[] : Count of vectored data entries. +-.PP +-\f[I]addr\f[] : Address of remote memory to access. ++.RS ++.RE ++.TP ++.B \f[I]iov\f[] ++Vectored data buffer. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Count of vectored data entries. ++.RS ++.RE ++.TP ++.B \f[I]addr\f[] ++Address of remote memory to access. + This will be the virtual address of the remote region in the case of + FI_MR_BASIC, or the offset from the starting address in the case of + FI_MR_SCALABLE. +-.PP +-\f[I]key\f[] : Protection key associated with the remote memory. +-.PP +-\f[I]desc\f[] : Descriptor associated with the local data buffer +-.PP +-\f[I]data\f[] : Remote CQ data to transfer with the operation. +-.PP +-\f[I]dest_addr\f[] : Destination address for connectionless write +-transfers. ++.RS ++.RE ++.TP ++.B \f[I]key\f[] ++Protection key associated with the remote memory. ++.RS ++.RE ++.TP ++.B \f[I]desc\f[] ++Descriptor associated with the local data buffer ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++Remote CQ data to transfer with the operation. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr\f[] ++Destination address for connectionless write transfers. + Ignored for connected endpoints. +-.PP +-\f[I]src_addr\f[] : Source address to read from for connectionless +-transfers. ++.RS ++.RE ++.TP ++.B \f[I]src_addr\f[] ++Source address to read from for connectionless transfers. + Ignored for connected endpoints. +-.PP +-\f[I]msg\f[] : Message descriptor for read and write operations. +-.PP +-\f[I]flags\f[] : Additional flags to apply for the read or write +-operation. +-.PP +-\f[I]context\f[] : User specified pointer to associate with the +-operation. ++.RS ++.RE ++.TP ++.B \f[I]msg\f[] ++Message descriptor for read and write operations. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply for the read or write operation. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified pointer to associate with the operation. ++This parameter is ignored if the operation will not generate a ++successful completion, unless an op flag specifies the context parameter ++be used for required input. ++.RS ++.RE + .SH DESCRIPTION + .PP + RMA (remote memory access) operations are used to transfer data directly +@@ -213,56 +256,82 @@ previously configured with the endpoint, except where noted (see + fi_endpoint.3). + The following list of flags are usable with fi_readmsg and/or + fi_writemsg. +-.PP +-\f[I]FI_REMOTE_CQ_DATA\f[] : Applies to fi_writemsg and fi_writedata. ++.TP ++.B \f[I]FI_REMOTE_CQ_DATA\f[] ++Applies to fi_writemsg and fi_writedata. + Indicates that remote CQ data is available and should be sent as part of + the request. + See fi_getinfo for additional details on FI_REMOTE_CQ_DATA. +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for the specified operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for the specified ++operation. + The endpoint must be bound to a completion queue with + FI_SELECTIVE_COMPLETION that corresponds to the specified operation, or + this flag is ignored. +-.PP +-\f[I]FI_MORE\f[] : Indicates that the user has additional requests that +-will immediately be posted after the current call returns. ++.RS ++.RE ++.TP ++.B \f[I]FI_MORE\f[] ++Indicates that the user has additional requests that will immediately be ++posted after the current call returns. + Use of this flag may improve performance by enabling the provider to + optimize its access to the fabric hardware. +-.PP +-\f[I]FI_INJECT\f[] : Applies to fi_writemsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT\f[] ++Applies to fi_writemsg. + Indicates that the outbound data buffer should be returned to user + immediately after the write call returns, even if the operation is + handled asynchronously. + This may require that the underlying provider implementation copy the + data into a local buffer and transfer out of that buffer. + This flag can only be used with messages smaller than inject_size. +-.PP +-\f[I]FI_INJECT_COMPLETE\f[] : Applies to fi_writemsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Applies to fi_writemsg. + Indicates that a completion should be generated when the source + buffer(s) may be reused. +-.PP +-\f[I]FI_TRANSMIT_COMPLETE\f[] : Applies to fi_writemsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Applies to fi_writemsg. + Indicates that a completion should not be generated until the operation + has been successfully transmitted and is no longer being tracked by the + provider. +-.PP +-\f[I]FI_DELIVERY_COMPLETE\f[] : Applies to fi_writemsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_DELIVERY_COMPLETE\f[] ++Applies to fi_writemsg. + Indicates that a completion should be generated when the operation has + been processed by the destination. +-.PP +-\f[I]FI_COMMIT_COMPLETE\f[] : Applies to fi_writemsg when targeting +-persistent memory regions. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMMIT_COMPLETE\f[] ++Applies to fi_writemsg when targeting persistent memory regions. + Indicates that a completion should be generated only after the result of + the operation has been made durable. +-.PP +-\f[I]FI_FENCE\f[] : Applies to transmits. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Applies to transmits. + Indicates that the requested operation, also known as the fenced + operation, and any operation posted after the fenced operation will be + deferred until all previous operations targeting the same peer endpoint + have completed. + Operations posted after the fencing will see and/or replace the results + of any operations initiated prior to the fenced operation. ++.RS ++.RE + .PP + The ordering of operations starting at the posting of the fenced + operation (inclusive) to the posting of a subsequent fenced operation +@@ -273,9 +342,11 @@ Returns 0 on success. + On error, a negative value corresponding to fabric errno is returned. + Fabric errno values are defined in \f[C]rdma/fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_EAGAIN\f[] : See \f[C]fi_msg\f[](3) for a detailed description +-of handling FI_EAGAIN. ++.TP ++.B \f[I]\-FI_EAGAIN\f[] ++See \f[C]fi_msg\f[](3) for a detailed description of handling FI_EAGAIN. ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_tagged.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_tagged.3 +index 652b8879e..beb8fc421 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_tagged.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_tagged.3 +@@ -1,4 +1,7 @@ +-.TH "fi_tagged" "3" "2017\-10\-20" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_tagged" "3" "2018\-11\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_tagged \- Tagged data transfer operations +@@ -50,43 +53,83 @@ ssize_t\ fi_tinjectdata(struct\ fid_ep\ *ep,\ const\ void\ *buf,\ size_t\ len, + \f[] + .fi + .SH ARGUMENTS +-.PP +-\f[I]fid\f[] : Fabric endpoint on which to initiate tagged communication +-operation. +-.PP +-\f[I]buf\f[] : Data buffer to send or receive. +-.PP +-\f[I]len\f[] : Length of data buffer to send or receive. +-.PP +-\f[I]iov\f[] : Vectored data buffer. +-.PP +-\f[I]count\f[] : Count of vectored data entries. +-.PP +-\f[I]tag\f[] : Tag associated with the message. +-.PP +-\f[I]ignore\f[] : Mask of bits to ignore applied to the tag for receive +-operations. +-.PP +-\f[I]desc\f[] : Memory descriptor associated with the data buffer +-.PP +-\f[I]data\f[] : Remote CQ data to transfer with the sent data. +-.PP +-\f[I]dest_addr\f[] : Destination address for connectionless transfers. ++.TP ++.B \f[I]fid\f[] ++Fabric endpoint on which to initiate tagged communication operation. ++.RS ++.RE ++.TP ++.B \f[I]buf\f[] ++Data buffer to send or receive. ++.RS ++.RE ++.TP ++.B \f[I]len\f[] ++Length of data buffer to send or receive. ++.RS ++.RE ++.TP ++.B \f[I]iov\f[] ++Vectored data buffer. ++.RS ++.RE ++.TP ++.B \f[I]count\f[] ++Count of vectored data entries. ++.RS ++.RE ++.TP ++.B \f[I]tag\f[] ++Tag associated with the message. ++.RS ++.RE ++.TP ++.B \f[I]ignore\f[] ++Mask of bits to ignore applied to the tag for receive operations. ++.RS ++.RE ++.TP ++.B \f[I]desc\f[] ++Memory descriptor associated with the data buffer ++.RS ++.RE ++.TP ++.B \f[I]data\f[] ++Remote CQ data to transfer with the sent data. ++.RS ++.RE ++.TP ++.B \f[I]dest_addr\f[] ++Destination address for connectionless transfers. + Ignored for connected endpoints. +-.PP +-\f[I]src_addr\f[] : Source address to receive from for connectionless +-transfers. ++.RS ++.RE ++.TP ++.B \f[I]src_addr\f[] ++Source address to receive from for connectionless transfers. + Applies only to connectionless endpoints with the FI_DIRECTED_RECV + capability enabled, otherwise this field is ignored. + If set to FI_ADDR_UNSPEC, any source address may match. +-.PP +-\f[I]msg\f[] : Message descriptor for send and receive operations. +-.PP +-\f[I]flags\f[] : Additional flags to apply for the send or receive +-operation. +-.PP +-\f[I]context\f[] : User specified pointer to associate with the +-operation. ++.RS ++.RE ++.TP ++.B \f[I]msg\f[] ++Message descriptor for send and receive operations. ++.RS ++.RE ++.TP ++.B \f[I]flags\f[] ++Additional flags to apply for the send or receive operation. ++.RS ++.RE ++.TP ++.B \f[I]context\f[] ++User specified pointer to associate with the operation. ++This parameter is ignored if the operation will not generate a ++successful completion, unless an op flag specifies the context parameter ++be used for required input. ++.RS ++.RE + .SH DESCRIPTION + .PP + Tagged messages are data transfers which carry a key or tag with the +@@ -177,7 +220,7 @@ The tagged inject call is an optimized version of fi_tsend. + The fi_tinject function behaves as if the FI_INJECT transfer flag were + set, and FI_COMPLETION were not. + That is, the data buffer is available for reuse immediately on returning +-from from fi_tinject, and no completion event will be generated for this ++from fi_tinject, and no completion event will be generated for this + send. + The completion event will be suppressed even if the endpoint has not + been configured with FI_SELECTIVE_COMPLETION. +@@ -223,56 +266,85 @@ previously configured with the endpoint, except where noted (see + fi_endpoint). + The following list of flags are usable with fi_trecvmsg and/or + fi_tsendmsg. +-.PP +-\f[I]FI_REMOTE_CQ_DATA\f[] : Applies to fi_tsendmsg and fi_tsenddata. ++.TP ++.B \f[I]FI_REMOTE_CQ_DATA\f[] ++Applies to fi_tsendmsg and fi_tsenddata. + Indicates that remote CQ data is available and should be sent as part of + the request. + See fi_getinfo for additional details on FI_REMOTE_CQ_DATA. +-.PP +-\f[I]FI_COMPLETION\f[] : Indicates that a completion entry should be +-generated for the specified operation. ++.RS ++.RE ++.TP ++.B \f[I]FI_COMPLETION\f[] ++Indicates that a completion entry should be generated for the specified ++operation. + The endpoint must be bound to a completion queue with + FI_SELECTIVE_COMPLETION that corresponds to the specified operation, or + this flag is ignored. +-.PP +-\f[I]FI_MORE\f[] : Indicates that the user has additional requests that +-will immediately be posted after the current call returns. ++.RS ++.RE ++.TP ++.B \f[I]FI_MORE\f[] ++Indicates that the user has additional requests that will immediately be ++posted after the current call returns. + Use of this flag may improve performance by enabling the provider to + optimize its access to the fabric hardware. +-.PP +-\f[I]FI_INJECT\f[] : Applies to fi_tsendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT\f[] ++Applies to fi_tsendmsg. + Indicates that the outbound data buffer should be returned to user + immediately after the send call returns, even if the operation is + handled asynchronously. + This may require that the underlying provider implementation copy the + data into a local buffer and transfer out of that buffer. + This flag can only be used with messages smaller than inject_size. +-.PP +-\f[I]FI_INJECT_COMPLETE\f[] : Applies to fi_tsendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_INJECT_COMPLETE\f[] ++Applies to fi_tsendmsg. + Indicates that a completion should be generated when the source + buffer(s) may be reused. +-.PP +-\f[I]FI_TRANSMIT_COMPLETE\f[] : Applies to fi_tsendmsg. ++.RS ++.RE ++.TP ++.B \f[I]FI_TRANSMIT_COMPLETE\f[] ++Applies to fi_tsendmsg. + Indicates that a completion should not be generated until the operation + has been successfully transmitted and is no longer being tracked by the + provider. +-.PP +-\f[I]FI_FENCE\f[] : Applies to transmits. ++.RS ++.RE ++.TP ++.B \f[I]FI_MATCH_COMPLETE\f[] ++Applies to fi_tsendmsg. ++Indicates that a completion should be generated only after the message ++has either been matched with a tagged buffer or was discarded by the ++target application. ++.RS ++.RE ++.TP ++.B \f[I]FI_FENCE\f[] ++Applies to transmits. + Indicates that the requested operation, also known as the fenced + operation, and any operation posted after the fenced operation will be + deferred until all previous operations targeting the same peer endpoint + have completed. + Operations posted after the fencing will see and/or replace the results + of any operations initiated prior to the fenced operation. ++.RS ++.RE + .PP + The ordering of operations starting at the posting of the fenced + operation (inclusive) to the posting of a subsequent fenced operation + (exclusive) is controlled by the endpoint\[aq]s ordering semantics. + .PP + The following flags may be used with fi_trecvmsg. +-.PP +-\f[I]FI_PEEK\f[] : The peek flag may be used to see if a specified +-message has arrived. ++.TP ++.B \f[I]FI_PEEK\f[] ++The peek flag may be used to see if a specified message has arrived. + A peek request is often useful on endpoints that have provider allocated + buffering enabled (see fi_rx_attr total_buffered_recv). + Unlike standard receive operations, a receive operation with the FI_PEEK +@@ -284,6 +356,8 @@ endpoint. + If no message is found matching the tags specified in the peek request, + then a completion queue error entry with err field set to FI_ENOMSG will + be available. ++.RS ++.RE + .PP + If a peek request locates a matching message, the operation will + complete successfully. +@@ -308,33 +382,96 @@ A provider may return NULL even if the peek operation completes + successfully. + Note that the CQ entry len field will reference the size of the message, + not necessarily the size of the returned data. +-.PP +-\f[I]FI_CLAIM\f[] : If this flag is used in conjunction with FI_PEEK, it +-indicates if the peek request completes successfully \-\- indicating +-that a matching message was located \-\- the message is claimed by +-caller. ++.TP ++.B \f[I]FI_CLAIM\f[] ++If this flag is used in conjunction with FI_PEEK, it indicates if the ++peek request completes successfully \-\- indicating that a matching ++message was located \-\- the message is claimed by caller. + Claimed messages can only be retrieved using a subsequent, paired + receive operation with the FI_CLAIM flag set. + A receive operation with the FI_CLAIM flag set, but FI_PEEK not set is + used to retrieve a previously claimed message. ++.RS ++.RE + .PP + In order to use the FI_CLAIM flag, an application must supply a struct +-fi_context structure as the context for the receive operation. ++fi_context structure as the context for the receive operation, or a ++struct fi_recv_context in the case of buffered receives. + The same fi_context structure used for an FI_PEEK + FI_CLAIM operation + must be used by the paired FI_CLAIM request. + .PP +-\f[I]FI_DISCARD\f[] : This flag must be used in conjunction with either +-FI_PEEK or FI_CLAIM. ++This flag also applies to endpoints configured for FI_BUFFERED_RECV or ++FI_VARIABLE_MSG. ++When set, it is used to retrieve a tagged message that was buffered by ++the provider. ++See Buffered Tagged Receives section for details. ++.TP ++.B \f[I]FI_DISCARD\f[] ++This flag may be used in conjunction with either FI_PEEK or FI_CLAIM. + If this flag is used in conjunction with FI_PEEK, it indicates if the + peek request completes successfully \-\- indicating that a matching + message was located \-\- the message is discarded by the provider, as + the data is not needed by the application. + This flag may also be used in conjunction with FI_CLAIM in order to +-retrieve and discard a message previously claimed using an FI_PEEK + +-FI_CLAIM request. ++discard a message previously claimed using an FI_PEEK + FI_CLAIM ++request. ++.RS ++.RE ++.PP ++This flag also applies to endpoints configured for FI_BUFFERED_RECV or ++FI_VARIABLE_MSG. ++When set, it indicates that the provider should free a buffered ++messages. ++See Buffered Tagged Receives section for details. + .PP + If this flag is set, the input buffer(s) and length parameters are + ignored. ++.SH Buffered Tagged Receives ++.PP ++See \f[C]fi_msg\f[](3) for an introduction to buffered receives. ++The handling of buffered receives differs between fi_msg operations and ++fi_tagged. ++Although the provider is responsible for allocating and managing network ++buffers, the application is responsible for identifying the tags that ++will be used to match incoming messages. ++The provider handles matching incoming receives to the application ++specified tags. ++.PP ++When FI_BUFFERED_RECV is enabled, the application posts the tags that ++will be used for matching purposes. ++Tags are posted using fi_trecv, fi_trecvv, and fi_trecvmsg; however, ++parameters related to the input buffers are ignored (e.g. ++buf, len, iov, desc). ++When a provider receives a message for which there is a matching tag, it ++will write an entry to the completion queue associated with the ++receiving endpoint. ++.PP ++For discussion purposes, the completion queue is assumed to be ++configured for FI_CQ_FORMAT_TAGGED. ++The op_context field will point to a struct fi_recv_contex. ++.IP ++.nf ++\f[C] ++struct\ fi_recv_context\ { ++\ \ \ \ struct\ fid_ep\ *ep; ++\ \ \ \ void\ *context; ++}; ++\f[] ++.fi ++.PP ++The \[aq]ep\[aq] field will be NULL. ++The \[aq]context\[aq] field will match the application context specified ++when posting the tag. ++Other fields are set as defined in \f[C]fi_msg\f[](3). ++.PP ++After being notified that a buffered receive has arrived, applications ++must either claim or discard the message as described in ++\f[C]fi_msg\f[](3). ++.SH Variable Length Tagged Messages ++.PP ++Variable length messages are defined in \f[C]fi_msg\f[](3). ++The requirements for handling variable length tagged messages is ++identical to those defined above for buffered tagged receives. + .SH RETURN VALUE + .PP + The tagged send and receive calls return 0 on success. +@@ -342,14 +479,21 @@ On error, a negative value corresponding to fabric \f[I]errno \f[] is + returned. + Fabric errno values are defined in \f[C]fi_errno.h\f[]. + .SH ERRORS +-.PP +-\f[I]\-FI_EAGAIN\f[] : See \f[C]fi_msg\f[](3) for a detailed description +-of handling FI_EAGAIN. +-.PP +-\f[I]\-FI_EINVAL\f[] : Indicates that an invalid argument was supplied +-by the user. +-.PP +-\f[I]\-FI_EOTHER\f[] : Indicates that an unspecified error occurred. ++.TP ++.B \f[I]\-FI_EAGAIN\f[] ++See \f[C]fi_msg\f[](3) for a detailed description of handling FI_EAGAIN. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EINVAL\f[] ++Indicates that an invalid argument was supplied by the user. ++.RS ++.RE ++.TP ++.B \f[I]\-FI_EOTHER\f[] ++Indicates that an unspecified error occurred. ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_trigger.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_trigger.3 +index 10a2d2971..701569913 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_trigger.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_trigger.3 +@@ -1,4 +1,7 @@ +-.TH "fi_trigger" "3" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_trigger" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_trigger \- Triggered operations +@@ -71,11 +74,13 @@ event type. + .SS TRIGGER EVENTS + .PP + The following trigger events are defined. +-.PP +-\f[I]FI_TRIGGER_THRESHOLD\f[] : This indicates that the data transfer +-operation will be deferred until an event counter crosses an application +-specified threshold value. ++.TP ++.B \f[I]FI_TRIGGER_THRESHOLD\f[] ++This indicates that the data transfer operation will be deferred until ++an event counter crosses an application specified threshold value. + The threshold is specified using struct fi_trigger_threshold: ++.RS ++.RE + .IP + .nf + \f[C] +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_version.3 b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_version.3 +index e2e8fc1b8..27e508097 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_version.3 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man3/fi_version.3 +@@ -1,4 +1,7 @@ +-.TH "fi_version" "3" "2016\-02\-28" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_version" "3" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_version \- Version of the library interfaces +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fabric.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fabric.7 +index 4964e5ce4..a8e476fd7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fabric.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fabric.7 +@@ -1,4 +1,7 @@ +-.TH "fabric" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fabric" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fabric \- Fabric Interface Library +@@ -22,10 +25,10 @@ system interventions. + Data transfers can occur directly to and from application memory. + .PP + There are two components to the libfabric software: +-.PP +-\f[I]Fabric Providers\f[] : Conceptually, a fabric provider may be +-viewed as a local hardware NIC driver, though a provider is not limited +-by this definition. ++.TP ++.B \f[I]Fabric Providers\f[] ++Conceptually, a fabric provider may be viewed as a local hardware NIC ++driver, though a provider is not limited by this definition. + The first component of libfabric is a general purpose framework that is + capable of handling different types of fabric hardware. + All fabric hardware devices and their software drivers are required to +@@ -33,14 +36,18 @@ support this framework. + Devices and the drivers that plug into the libfabric framework are + referred to as fabric providers, or simply providers. + Provider details may be found in \f[C]fi_provider\f[](7). +-.PP +-\f[I]Fabric Interfaces\f[] : The second component is a set of +-communication operations. ++.RS ++.RE ++.TP ++.B \f[I]Fabric Interfaces\f[] ++The second component is a set of communication operations. + Libfabric defines several sets of communication functions that providers + can support. + It is not required that providers implement all the interfaces that are + defined; however, providers clearly indicate which interfaces they do + support. ++.RS ++.RE + .SH FABRIC INTERFACES + .PP + The fabric interfaces are designed such that they are cohesive and not +@@ -66,14 +73,16 @@ The control interfaces APIs provide applications access to network + resources. + This involves listing all the interfaces available, obtaining the + capabilities of the interfaces and opening a provider. +-.PP +-\f[I]fi_getinfo \- Fabric Information\f[] : The fi_getinfo call is the +-base call used to discover and request fabric services offered by the +-system. ++.TP ++.B \f[I]fi_getinfo \- Fabric Information\f[] ++The fi_getinfo call is the base call used to discover and request fabric ++services offered by the system. + Applications can use this call to indicate the type of communication + that they desire. + The results from fi_getinfo, fi_info, are used to reserve and configure + fabric resources. ++.RS ++.RE + .PP + fi_getinfo returns a list of fi_info structures. + Each structure references a single fabric provider, indicating the +@@ -81,60 +90,79 @@ interfaces that the provider supports, along with a named set of + resources. + A fabric provider may include multiple fi_info structures in the + returned list. +-.PP +-\f[I]fi_fabric \- Fabric Domain\f[] : A fabric domain represents a +-collection of hardware and software resources that access a single +-physical or virtual network. ++.TP ++.B \f[I]fi_fabric \- Fabric Domain\f[] ++A fabric domain represents a collection of hardware and software ++resources that access a single physical or virtual network. + All network ports on a system that can communicate with each other + through the fabric belong to the same fabric domain. + A fabric domain shares network addresses and can span multiple + providers. + libfabric supports systems connected to multiple fabrics. +-.PP +-\f[I]fi_domain \- Access Domains\f[] : An access domain represents a +-single logical connection into a fabric. ++.RS ++.RE ++.TP ++.B \f[I]fi_domain \- Access Domains\f[] ++An access domain represents a single logical connection into a fabric. + It may map to a single physical or virtual NIC or a port. + An access domain defines the boundary across which fabric resources may + be associated. + Each access domain belongs to a single fabric domain. +-.PP +-\f[I]fi_endpoint \- Fabric Endpoint\f[] : A fabric endpoint is a +-communication portal. ++.RS ++.RE ++.TP ++.B \f[I]fi_endpoint \- Fabric Endpoint\f[] ++A fabric endpoint is a communication portal. + An endpoint may be either active or passive. + Passive endpoints are used to listen for connection requests. + Active endpoints can perform data transfers. + Endpoints are configured with specific communication capabilities and + data transfer interfaces. +-.PP +-\f[I]fi_eq \- Event Queue\f[] : Event queues, are used to collect and +-report the completion of asynchronous operations and events. ++.RS ++.RE ++.TP ++.B \f[I]fi_eq \- Event Queue\f[] ++Event queues, are used to collect and report the completion of ++asynchronous operations and events. + Event queues report events that are not directly associated with data + transfer operations. +-.PP +-\f[I]fi_cq \- Completion Queue\f[] : Completion queues are +-high\-performance event queues used to report the completion of data +-transfer operations. +-.PP +-\f[I]fi_cntr \- Event Counters\f[] : Event counters are used to report +-the number of completed asynchronous operations. ++.RS ++.RE ++.TP ++.B \f[I]fi_cq \- Completion Queue\f[] ++Completion queues are high\-performance event queues used to report the ++completion of data transfer operations. ++.RS ++.RE ++.TP ++.B \f[I]fi_cntr \- Event Counters\f[] ++Event counters are used to report the number of completed asynchronous ++operations. + Event counters are considered light\-weight, in that a completion simply + increments a counter, rather than placing an entry into an event queue. +-.PP +-\f[I]fi_mr \- Memory Region\f[] : Memory regions describe application +-local memory buffers. ++.RS ++.RE ++.TP ++.B \f[I]fi_mr \- Memory Region\f[] ++Memory regions describe application local memory buffers. + In order for fabric resources to access application memory, the + application must first grant permission to the fabric provider by + constructing a memory region. + Memory regions are required for specific types of data transfer + operations, such as RMA transfers (see below). +-.PP +-\f[I]fi_av \- Address Vector\f[] : Address vectors are used to map +-higher level addresses, such as IP addresses, which may be more natural +-for an application to use, into fabric specific addresses. ++.RS ++.RE ++.TP ++.B \f[I]fi_av \- Address Vector\f[] ++Address vectors are used to map higher level addresses, such as IP ++addresses, which may be more natural for an application to use, into ++fabric specific addresses. + The use of address vectors allows providers to reduce the amount of + memory required to maintain large address look\-up tables, and eliminate + expensive address resolution and look\-up methods during data transfer + operations. ++.RS ++.RE + .SH DATA TRANSFER INTERFACES + .PP + Fabric endpoints are associated with multiple data transfer interfaces. +@@ -142,95 +170,184 @@ Each interface set is designed to support a specific style of + communication, with an endpoint allowing the different interfaces to be + used in conjunction. + The following data transfer interfaces are defined by libfabric. +-.PP +-\f[I]fi_msg \- Message Queue\f[] : Message queues expose a simple, +-message\-based FIFO queue interface to the application. ++.TP ++.B \f[I]fi_msg \- Message Queue\f[] ++Message queues expose a simple, message\-based FIFO queue interface to ++the application. + Message data transfers allow applications to send and receive data with + message boundaries being maintained. +-.PP +-\f[I]fi_tagged \- Tagged Message Queues\f[] : Tagged message lists +-expose send/receive data transfer operations built on the concept of +-tagged messaging. ++.RS ++.RE ++.TP ++.B \f[I]fi_tagged \- Tagged Message Queues\f[] ++Tagged message lists expose send/receive data transfer operations built ++on the concept of tagged messaging. + The tagged message queue is conceptually similar to standard message + queues, but with the addition of 64\-bit tags for each message. + Sent messages are matched with receive buffers that are tagged with a + similar value. +-.PP +-\f[I]fi_rma \- Remote Memory Access\f[] : RMA transfers are one\-sided +-operations that read or write data directly to a remote memory region. ++.RS ++.RE ++.TP ++.B \f[I]fi_rma \- Remote Memory Access\f[] ++RMA transfers are one\-sided operations that read or write data directly ++to a remote memory region. + Other than defining the appropriate memory region, RMA operations do not + require interaction at the target side for the data transfer to + complete. +-.PP +-\f[I]fi_atomic \- Atomic\f[] : Atomic operations can perform one of +-several operations on a remote memory region. ++.RS ++.RE ++.TP ++.B \f[I]fi_atomic \- Atomic\f[] ++Atomic operations can perform one of several operations on a remote ++memory region. + Atomic operations include well\-known functionality, such as atomic\-add + and compare\-and\-swap, plus several other pre\-defined calls. + Unlike other data transfer interfaces, atomic operations are aware of + the data formatting at the target memory region. ++.RS ++.RE + .SH LOGGING INTERFACE + .PP + Logging can be controlled using the FI_LOG_LEVEL, FI_LOG_PROV, and + FI_LOG_SUBSYS environment variables. +-.PP +-\f[I]FI_LOG_LEVEL\f[] : FI_LOG_LEVEL controls the amount of logging data +-that is output. ++.TP ++.B \f[I]FI_LOG_LEVEL\f[] ++FI_LOG_LEVEL controls the amount of logging data that is output. + The following log levels are defined. +-.IP \[bu] 2 +-\f[I]Warn\f[] : Warn is the least verbose setting and is intended for +-reporting errors or warnings. +-.IP \[bu] 2 +-\f[I]Trace\f[] : Trace is more verbose and is meant to include +-non\-detailed output helpful to tracing program execution. +-.IP \[bu] 2 +-\f[I]Info\f[] : Info is high traffic and meant for detailed output. +-.IP \[bu] 2 +-\f[I]Debug\f[] : Debug is high traffic and is likely to impact +-application performance. ++.RS ++.RE ++.TP ++.B \- \f[I]Warn\f[] ++Warn is the least verbose setting and is intended for reporting errors ++or warnings. ++.RS ++.RE ++.TP ++.B \- \f[I]Trace\f[] ++Trace is more verbose and is meant to include non\-detailed output ++helpful to tracing program execution. ++.RS ++.RE ++.TP ++.B \- \f[I]Info\f[] ++Info is high traffic and meant for detailed output. ++.RS ++.RE ++.TP ++.B \- \f[I]Debug\f[] ++Debug is high traffic and is likely to impact application performance. + Debug output is only available if the library has been compiled with + debugging enabled. +-.PP +-\f[I]FI_LOG_PROV\f[] : The FI_LOG_PROV environment variable enables or +-disables logging from specific providers. ++.RS ++.RE ++.TP ++.B \f[I]FI_LOG_PROV\f[] ++The FI_LOG_PROV environment variable enables or disables logging from ++specific providers. + Providers can be enabled by listing them in a comma separated fashion. + If the list begins with the \[aq]^\[aq] symbol, then the list will be + negated. + By default all providers are enabled. ++.RS ++.RE + .PP + Example: To enable logging from the psm and sockets provider: + FI_LOG_PROV="psm,sockets" + .PP + Example: To enable logging from providers other than psm: + FI_LOG_PROV="^psm" +-.PP +-\f[I]FI_LOG_SUBSYS\f[] : The FI_LOG_SUBSYS environment variable enables +-or disables logging at the subsystem level. ++.TP ++.B \f[I]FI_LOG_SUBSYS\f[] ++The FI_LOG_SUBSYS environment variable enables or disables logging at ++the subsystem level. + The syntax for enabling or disabling subsystems is similar to that used + for FI_LOG_PROV. + The following subsystems are defined. +-.IP \[bu] 2 +-\f[I]core\f[] : Provides output related to the core framework and its +-management of providers. +-.IP \[bu] 2 +-\f[I]fabric\f[] : Provides output specific to interactions associated +-with the fabric object. +-.IP \[bu] 2 +-\f[I]domain\f[] : Provides output specific to interactions associated +-with the domain object. +-.IP \[bu] 2 +-\f[I]ep_ctrl\f[] : Provides output specific to endpoint non\-data +-transfer operations, such as CM operations. +-.IP \[bu] 2 +-\f[I]ep_data\f[] : Provides output specific to endpoint data transfer +-operations. +-.IP \[bu] 2 +-\f[I]av\f[] : Provides output specific to address vector operations. +-.IP \[bu] 2 +-\f[I]cq\f[] : Provides output specific to completion queue operations. +-.IP \[bu] 2 +-\f[I]eq\f[] : Provides output specific to event queue operations. +-.IP \[bu] 2 +-\f[I]mr\f[] : Provides output specific to memory registration. ++.RS ++.RE ++.TP ++.B \- \f[I]core\f[] ++Provides output related to the core framework and its management of ++providers. ++.RS ++.RE ++.TP ++.B \- \f[I]fabric\f[] ++Provides output specific to interactions associated with the fabric ++object. ++.RS ++.RE ++.TP ++.B \- \f[I]domain\f[] ++Provides output specific to interactions associated with the domain ++object. ++.RS ++.RE ++.TP ++.B \- \f[I]ep_ctrl\f[] ++Provides output specific to endpoint non\-data transfer operations, such ++as CM operations. ++.RS ++.RE ++.TP ++.B \- \f[I]ep_data\f[] ++Provides output specific to endpoint data transfer operations. ++.RS ++.RE ++.TP ++.B \- \f[I]av\f[] ++Provides output specific to address vector operations. ++.RS ++.RE ++.TP ++.B \- \f[I]cq\f[] ++Provides output specific to completion queue operations. ++.RS ++.RE ++.TP ++.B \- \f[I]eq\f[] ++Provides output specific to event queue operations. ++.RS ++.RE ++.TP ++.B \- \f[I]mr\f[] ++Provides output specific to memory registration. ++.RS ++.RE ++.SH PROVIDER INSTALLATION AND SELECTION ++.PP ++The libfabric build scripts will install all providers that are ++supported by the installation system. ++Providers that are missing build prerequisites will be disabled. ++Installed providers will dynamically check for necessary hardware on ++library initialization and respond appropriately to application queries. ++.PP ++Users can enable or disable available providers through build ++configuration options. ++See \[aq]configure \-\-help\[aq] for details. ++In general, a specific provider can be controlled using the configure ++option \[aq]\-\-enable\-\[aq]. ++For example, \[aq]\-\-enable\-udp\[aq] (or ++\[aq]\-\-enable\-udp=yes\[aq]) will add the udp provider to the build. ++To disable the provider, \[aq]\-\-enable\-udp=no\[aq] can be used. ++.PP ++Providers can also be enable or disabled at run time using the ++FI_PROVIDER environment variable. ++The FI_PROVIDER variable is set to a comma separated list of providers ++to include. ++If the list begins with the \[aq]^\[aq] symbol, then the list will be ++negated. ++.PP ++Example: To enable the udp and tcp providers only, set: ++FI_PROVIDER="udp,tcp" ++.PP ++The fi_info utility, which is included as part of the libfabric package, ++can be used to retrieve information about which providers are available ++in the system. ++Additionally, it can retrieve a list of all environment variables that ++may be used to configure libfabric and each provider. ++See \f[C]fi_info\f[](1) for more details. + .SH NOTES + .PP + Because libfabric is designed to provide applications direct access to +@@ -241,18 +358,20 @@ programming to the sockets interface. + Although limits are provider specific, the following restrictions apply + to many providers and should be adhered to by applications desiring + portability across providers. +-.PP +-\f[I]fork\f[] : Fabric resources are not guaranteed to be available by +-child processes. ++.TP ++.B \f[I]fork\f[] ++Fabric resources are not guaranteed to be available by child processes. + This includes objects, such as endpoints and completion queues, as well + as application controlled data buffers which have been assigned to the + network. + For example, data buffers that have been registered with a fabric domain + may not be available in a child process because of copy on write + restrictions. ++.RS ++.RE + .SH SEE ALSO + .PP +-\f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3), ++\f[C]fi_info\f[](1), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3), + \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3), \f[C]fi_av\f[](3), + \f[C]fi_eq\f[](3), \f[C]fi_cq\f[](3), \f[C]fi_cntr\f[](3), + \f[C]fi_mr\f[](3) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_bgq.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_bgq.7 +index 8efbd6888..33e5156a3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_bgq.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_bgq.7 +@@ -1,4 +1,7 @@ +-.TH "fi_bgq" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_bgq" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_bgq \- The Blue Gene/Q Fabric Provider +@@ -17,18 +20,23 @@ via MPICH CH4. + .PP + The bgq provider supports most features defined for the libfabric API. + Key features include: +-.PP +-\f[I]Endpoint types\f[] : The Blue Gene/Q hardware is connectionless and +-reliable. ++.TP ++.B \f[I]Endpoint types\f[] ++The Blue Gene/Q hardware is connectionless and reliable. + Therefore, the bgq provider only supports the \f[I]FI_EP_RDM\f[] + endpoint type. +-.PP +-\f[I]Capabilities\f[] : Supported capabilities include \f[I]FI_MSG\f[], +-\f[I]FI_RMA\f[], \f[I]FI_TAGGED\f[], \f[I]FI_ATOMIC\f[], +-\f[I]FI_NAMED_RX_CTX\f[], \f[I]FI_READ\f[], \f[I]FI_WRITE\f[], +-\f[I]FI_SEND\f[], \f[I]FI_RECV\f[], \f[I]FI_REMOTE_READ\f[], +-\f[I]FI_REMOTE_WRITE\f[], \f[I]FI_MULTI_RECV\f[], +-\f[I]FI_DIRECTED_RECV\f[], \f[I]FI_SOURCE\f[] and \f[I]FI_FENCE\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Capabilities\f[] ++Supported capabilities include \f[I]FI_MSG\f[], \f[I]FI_RMA\f[], ++\f[I]FI_TAGGED\f[], \f[I]FI_ATOMIC\f[], \f[I]FI_NAMED_RX_CTX\f[], ++\f[I]FI_READ\f[], \f[I]FI_WRITE\f[], \f[I]FI_SEND\f[], \f[I]FI_RECV\f[], ++\f[I]FI_REMOTE_READ\f[], \f[I]FI_REMOTE_WRITE\f[], ++\f[I]FI_MULTI_RECV\f[], \f[I]FI_DIRECTED_RECV\f[], \f[I]FI_SOURCE\f[] ++and \f[I]FI_FENCE\f[]. ++.RS ++.RE + .PP + Notes on FI_DIRECTED_RECV capability: The immediate data which is sent + within the \f[I]senddata\f[] call to support FI_DIRECTED_RECV for BGQ +@@ -37,13 +45,15 @@ source address to an exascale\-level number of ranks for tag matching on + the recv and can be managed within the MU packet. + Therefore the domain attribute cq_data_size is set to 4 which is the OFI + standard minimum. +-.PP +-\f[I]Modes\f[] : The bgq provider requires \f[I]FI_CONTEXT\f[] and +-\f[I]FI_ASYNC_IOV\f[] +-.PP +-\f[I]Memory registration modes\f[] : Both FI_MR_SCALABLE and FI_MR_BASIC +-are supported, specified at configuration time with the +-"\-\-with\-bgq\-mr" configure option. ++.TP ++.B \f[I]Modes\f[] ++The bgq provider requires \f[I]FI_CONTEXT\f[] and \f[I]FI_ASYNC_IOV\f[] ++.RS ++.RE ++.TP ++.B \f[I]Memory registration modes\f[] ++Both FI_MR_SCALABLE and FI_MR_BASIC are supported, specified at ++configuration time with the "\-\-with\-bgq\-mr" configure option. + The base address table utilized by FI_MR_SCALABLE for rdma transfers is + completely software emulated, supporting FI_ATOMIC, FI_READ, FI_WRITE, + FI_REMOTE_READ, and FI_REMOTE_WRITE capabilities. +@@ -52,29 +62,47 @@ other rdma transfers are still software emulated but the use of a base + address table is no longer required as the offset is now the virtual + address of the memory from the application and the key is the delta from + which the physical address can be computed if necessary. +-.PP +-\f[I]Additional features\f[] : Supported additional features include +-\f[I]FABRIC_DIRECT\f[], \f[I]scalable endpoints\f[], and +-\f[I]counters\f[]. +-.PP +-\f[I]Progress\f[] : Both progress modes, \f[I]FI_PROGRESS_AUTO\f[] and ++.RS ++.RE ++.TP ++.B \f[I]Additional features\f[] ++Supported additional features include \f[I]FABRIC_DIRECT\f[], ++\f[I]scalable endpoints\f[], and \f[I]counters\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++Both progress modes, \f[I]FI_PROGRESS_AUTO\f[] and + \f[I]FI_PROGRESS_MANUAL\f[], are supported. + The progress mode may be specified via the "\-\-with\-bgq\-progress" + configure option. +-.PP +-\f[I]Address vector\f[] : Only the \f[I]FI_AV_MAP\f[] address vector +-format is supported. ++.RS ++.RE ++.TP ++.B \f[I]Address vector\f[] ++Only the \f[I]FI_AV_MAP\f[] address vector format is supported. ++.RS ++.RE + .SH UNSUPPORTED FEATURES +-.PP +-\f[I]Endpoint types\f[] : Unsupported endpoint types include +-\f[I]FI_EP_DGRAM\f[] and \f[I]FI_EP_MSG\f[] +-.PP +-\f[I]Capabilities\f[] : The bgq provider does not support the +-\f[I]FI_RMA_EVENT\f[], and \f[I]FI_TRIGGER\f[] capabilities. +-.PP +-\f[I]Address vector\f[] : The bgq provider does not support the +-\f[I]FI_AV_TABLE\f[] address vector format. ++.TP ++.B \f[I]Endpoint types\f[] ++Unsupported endpoint types include \f[I]FI_EP_DGRAM\f[] and ++\f[I]FI_EP_MSG\f[] ++.RS ++.RE ++.TP ++.B \f[I]Capabilities\f[] ++The bgq provider does not support the \f[I]FI_RMA_EVENT\f[], and ++\f[I]FI_TRIGGER\f[] capabilities. ++.RS ++.RE ++.TP ++.B \f[I]Address vector\f[] ++The bgq provider does not support the \f[I]FI_AV_TABLE\f[] address ++vector format. + Support for \f[I]FI_AV_TABLE\f[] may be added in the future. ++.RS ++.RE + .SH LIMITATIONS + .PP + The bgq provider only supports \f[I]FABRIC_DIRECT\f[]. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_direct.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_direct.7 +index ca9bd0c1f..d73cba49b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_direct.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_direct.7 +@@ -1,4 +1,7 @@ +-.TH "fi_direct" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_direct" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_direct \- Direct fabric provider access +@@ -56,16 +59,20 @@ direct providers must provide definitions for various capabilities and + modes, if those capabilities are supported. + The following #define values may be used by an application to test for + provider support of supported features. +-.PP +-\f[I]FI_DIRECT_CONTEXT\f[] : The provider sets FI_CONTEXT or FI_CONTEXT2 +-for fi_info:mode. ++.TP ++.B \f[I]FI_DIRECT_CONTEXT\f[] ++The provider sets FI_CONTEXT or FI_CONTEXT2 for fi_info:mode. + See fi_getinfo for additional details. + When FI_DIRECT_CONTEXT is defined, applications should use struct + fi_context in their definitions, even if FI_CONTEXT2 is set. +-.PP +-\f[I]FI_DIRECT_LOCAL_MR\f[] : The provider sets FI_LOCAL_MR for +-fi_info:mode. ++.RS ++.RE ++.TP ++.B \f[I]FI_DIRECT_LOCAL_MR\f[] ++The provider sets FI_LOCAL_MR for fi_info:mode. + See fi_getinfo for additional details. ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_gni.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_gni.7 +index eea2e051b..aea1e0d8b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_gni.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_gni.7 +@@ -1,4 +1,7 @@ +-.TH "fi_gni" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_gni" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_gni \- The GNI Fabric Provider +@@ -28,49 +31,73 @@ Any other value will result in a return value of \-FI_EINVAL. + .PP + The GNI provider supports the following features defined for the + libfabric API: +-.PP +-\f[I]Endpoint types\f[] : The provider supports the \f[I]FI_EP_RDM\f[], +-\f[I]FI_EP_DGRAM\f[], \f[I]FI_EP_MSG\f[] endpoint types, including +-scalable endpoints. +-.PP +-\f[I]Address vectors\f[] : The provider implements both the +-\f[I]FI_AV_MAP\f[] and \f[I]FI_AV_TABLE\f[] address vector types. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports the \f[I]FI_EP_RDM\f[], \f[I]FI_EP_DGRAM\f[], ++\f[I]FI_EP_MSG\f[] endpoint types, including scalable endpoints. ++.RS ++.RE ++.TP ++.B \f[I]Address vectors\f[] ++The provider implements both the \f[I]FI_AV_MAP\f[] and ++\f[I]FI_AV_TABLE\f[] address vector types. + FI_EVENT is unsupported. +-.PP +-\f[I]Memory registration modes\f[] : The provider implements basic and +-scalable memory registration modes. +-.PP +-\f[I]Data transfer operations\f[] : The following data transfer +-interfaces are supported for all endpoint types: \f[I]FI_ATOMIC\f[], +-\f[I]FI_MSG\f[], \f[I]FI_RMA\f[], \f[I]FI_TAGGED\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Memory registration modes\f[] ++The provider implements basic and scalable memory registration modes. ++.RS ++.RE ++.TP ++.B \f[I]Data transfer operations\f[] ++The following data transfer interfaces are supported for all endpoint ++types: \f[I]FI_ATOMIC\f[], \f[I]FI_MSG\f[], \f[I]FI_RMA\f[], ++\f[I]FI_TAGGED\f[]. + See DATA TRANSFER OPERATIONS below for more details. +-.PP +-\f[I]Completion events\f[] : The GNI provider supports +-\f[I]FI_CQ_FORMAT_CONTEXT\f[], \f[I]FI_CQ_FORMAT_MSG\f[], +-\f[I]FI_CQ_FORMAT_DATA\f[] and \f[I]FI_CQ_FORMAT_TAGGED\f[] with wait +-objects of type \f[I]FI_WAIT_NONE\f[], \f[I]FI_WAIT_UNSPEC\f[], +-\f[I]FI_WAIT_SET\f[]. +-.PP +-\f[I]Modes\f[] : The GNI provider does not require any operation modes. +-.PP +-\f[I]Progress\f[] : For both control and data progress, the GNI provider +-supports both \f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], +-with a default set to \f[I]FI_PROGRESS_AUTO\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Completion events\f[] ++The GNI provider supports \f[I]FI_CQ_FORMAT_CONTEXT\f[], ++\f[I]FI_CQ_FORMAT_MSG\f[], \f[I]FI_CQ_FORMAT_DATA\f[] and ++\f[I]FI_CQ_FORMAT_TAGGED\f[] with wait objects of type ++\f[I]FI_WAIT_NONE\f[], \f[I]FI_WAIT_UNSPEC\f[], \f[I]FI_WAIT_SET\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The GNI provider does not require any operation modes. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++For both control and data progress, the GNI provider supports both ++\f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], with a ++default set to \f[I]FI_PROGRESS_AUTO\f[]. + Note that for data progress, progression is only performed when data + transfers use the rendezvous protocol. +-.PP +-\f[I]Wait Objects\f[] : The GNI provider specifically supports wait +-object types \f[I]FI_WAIT_UNSPEC\f[], and \f[I]FI_WAIT_SET\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Wait Objects\f[] ++The GNI provider specifically supports wait object types ++\f[I]FI_WAIT_UNSPEC\f[], and \f[I]FI_WAIT_SET\f[]. + A wait object must be used when calling fi_cntr_wait, fi_cq_sread/from, + fi_eq_sread/from, fi_wait. + The GNI provider spawns an internal wait progress thread that is woken + up when clients utilize the wait system (e.g., calling fi_wait). +-.PP +-\f[I]Additional Features\f[] : The GNI provider also supports the +-following capabilities and features: \- \f[I]FI_MULTI_RECV\f[] \- +-\f[I]FI_SOURCE\f[] \- \f[I]FI_FENCE\f[] \- \f[I]FI_RM_ENABLED\f[] \- +-\f[I]FI_RMA_EVENT\f[] \- \f[I]FI_REMOTE_CQ_DATA\f[] \- +-\f[I]FABRIC_DIRECT\f[] compilation mode \- \f[I]FI_MORE\f[] (For FI_RMA) ++.RS ++.RE ++.TP ++.B \f[I]Additional Features\f[] ++The GNI provider also supports the following capabilities and features: ++\- \f[I]FI_MULTI_RECV\f[] \- \f[I]FI_SOURCE\f[] \- \f[I]FI_FENCE\f[] \- ++\f[I]FI_RM_ENABLED\f[] \- \f[I]FI_RMA_EVENT\f[] \- ++\f[I]FI_REMOTE_CQ_DATA\f[] \- \f[I]FABRIC_DIRECT\f[] compilation mode \- ++\f[I]FI_MORE\f[] (For FI_RMA) ++.RS ++.RE + .SH DATA TRANSFER OPERATIONS + .SS FI_ATOMIC + .PP +@@ -156,92 +183,145 @@ The \f[C]set_val\f[] function sets the value of a given parameter; the + \f[C]get_val\f[] function returns the current value. + .PP + For \f[I]FI_GNI_FABRIC_OPS_1\f[], the currently supported values are: +-.PP +-\f[I]GNI_WAIT_THREAD_SLEEP\f[] : Time in seconds for which the progress +-thread will sleep between periods of inactivity. +-.PP +-\f[I]GNI_DEFAULT_USER_REGISTRATION_LIMIT\f[] : The number of user +-registrations that an authorization key is limited to when using the +-scalable memory mode, if not specified by the user during init. +-.PP +-\f[I]GNI_DEFAULT_PROV_REGISTRATION_LIMIT\f[] : The number of provider +-registration that an authorization key is limited to when using the +-scalable memory mode, if not specified by the user during init. +-.PP +-\f[I]GNI_WAIT_SHARED_MEMORY_TIMEOUT\f[] : The number of seconds that the +-provider should wait when attempting to open mmap\[aq]d shared memory +-files for internal mappings. ++.TP ++.B \f[I]GNI_WAIT_THREAD_SLEEP\f[] ++Time in seconds for which the progress thread will sleep between periods ++of inactivity. ++.RS ++.RE ++.TP ++.B \f[I]GNI_DEFAULT_USER_REGISTRATION_LIMIT\f[] ++The number of user registrations that an authorization key is limited to ++when using the scalable memory mode, if not specified by the user during ++init. ++.RS ++.RE ++.TP ++.B \f[I]GNI_DEFAULT_PROV_REGISTRATION_LIMIT\f[] ++The number of provider registration that an authorization key is limited ++to when using the scalable memory mode, if not specified by the user ++during init. ++.RS ++.RE ++.TP ++.B \f[I]GNI_WAIT_SHARED_MEMORY_TIMEOUT\f[] ++The number of seconds that the provider should wait when attempting to ++open mmap\[aq]d shared memory files for internal mappings. ++.RS ++.RE + .PP + For \f[I]FI_GNI_FABRIC_OPS_2\f[], the currently supported values are: +-.PP +-\f[I]GNIX_USER_KEY_LIMIT\f[] : The number of user registrations that an +-authorization key is limited to when using the scalable memory mode. ++.TP ++.B \f[I]GNIX_USER_KEY_LIMIT\f[] ++The number of user registrations that an authorization key is limited to ++when using the scalable memory mode. + This may only be set prior to the first use of an authorization key in + the initialization of a domain, endpoint, or memory registration. +-.PP +-\f[I]GNIX_PROV_KEY_LIMIT\f[] : The number of provider registrations that +-an authorization key is limited to when using the scalable memory mode. ++.RS ++.RE ++.TP ++.B \f[I]GNIX_PROV_KEY_LIMIT\f[] ++The number of provider registrations that an authorization key is ++limited to when using the scalable memory mode. + This may only be set prior to the first use of an authorization key in + the initialization of a domain, endpoint, or memory registration. ++.RS ++.RE + .PP + For \f[I]FI_GNI_DOMAIN_OPS_1\f[], the currently supported values are: +-.PP +-\f[I]GNI_MSG_RENDEZVOUS_THRESHOLD\f[] : Threshold message size at which +-a rendezvous protocol is used for \f[I]FI_MSG\f[] data transfers. ++.TP ++.B \f[I]GNI_MSG_RENDEZVOUS_THRESHOLD\f[] ++Threshold message size at which a rendezvous protocol is used for ++\f[I]FI_MSG\f[] data transfers. + The value is of type uint32_t. +-.PP +-\f[I]GNI_RMA_RDMA_THRESHOLD\f[] : Threshold message size at which RDMA +-is used for \f[I]FI_RMA\f[] data transfers. +-The value is of type uint32_t. +-.PP +-\f[I]GNI_CONN_TABLE_INITIAL_SIZE\f[] : Initial size of the internal +-table data structure used to manage connections. ++.RS ++.RE ++.TP ++.B \f[I]GNI_RMA_RDMA_THRESHOLD\f[] ++Threshold message size at which RDMA is used for \f[I]FI_RMA\f[] data ++transfers. + The value is of type uint32_t. +-.PP +-\f[I]GNI_CONN_TABLE_MAX_SIZE\f[] : Maximum size of the internal table +-data structure used to manage connections. ++.RS ++.RE ++.TP ++.B \f[I]GNI_CONN_TABLE_INITIAL_SIZE\f[] ++Initial size of the internal table data structure used to manage ++connections. + The value is of type uint32_t. +-.PP +-\f[I]GNI_CONN_TABLE_STEP_SIZE\f[] : Step size for increasing the size of +-the internal table data structure used to manage internal GNI ++.RS ++.RE ++.TP ++.B \f[I]GNI_CONN_TABLE_MAX_SIZE\f[] ++Maximum size of the internal table data structure used to manage + connections. + The value is of type uint32_t. +-.PP +-\f[I]GNI_VC_ID_TABLE_CAPACITY\f[] : Size of the virtual channel (VC) +-table used for managing remote connections. ++.RS ++.RE ++.TP ++.B \f[I]GNI_CONN_TABLE_STEP_SIZE\f[] ++Step size for increasing the size of the internal table data structure ++used to manage internal GNI connections. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MBOX_PAGE_SIZE\f[] : Page size for GNI SMSG mailbox +-allocations. ++.RS ++.RE ++.TP ++.B \f[I]GNI_VC_ID_TABLE_CAPACITY\f[] ++Size of the virtual channel (VC) table used for managing remote ++connections. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MBOX_NUM_PER_SLAB\f[] : Number of GNI SMSG mailboxes per +-allocation slab. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MBOX_PAGE_SIZE\f[] ++Page size for GNI SMSG mailbox allocations. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MBOX_MAX_CREDIT\f[] : Maximum number of credits per GNI SMSG +-mailbox. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MBOX_NUM_PER_SLAB\f[] ++Number of GNI SMSG mailboxes per allocation slab. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MBOX_MSG_MAX_SIZE\f[] : Maximum size of GNI SMSG messages. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MBOX_MAX_CREDIT\f[] ++Maximum number of credits per GNI SMSG mailbox. + The value is of type uint32_t. +-.PP +-\f[I]GNI_RX_CQ_SIZE\f[] : Recommended GNI receive CQ size. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MBOX_MSG_MAX_SIZE\f[] ++Maximum size of GNI SMSG messages. + The value is of type uint32_t. +-.PP +-\f[I]GNI_TX_CQ_SIZE\f[] : Recommended GNI transmit CQ size. ++.RS ++.RE ++.TP ++.B \f[I]GNI_RX_CQ_SIZE\f[] ++Recommended GNI receive CQ size. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MAX_RETRANSMITS\f[] : Maximum number of message retransmits +-before failure. ++.RS ++.RE ++.TP ++.B \f[I]GNI_TX_CQ_SIZE\f[] ++Recommended GNI transmit CQ size. + The value is of type uint32_t. +-.PP +-\f[I]GNI_MR_CACHE_LAZY_DEREG\f[] : Enable or disable lazy deregistration +-of memory. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MAX_RETRANSMITS\f[] ++Maximum number of message retransmits before failure. ++The value is of type uint32_t. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_CACHE_LAZY_DEREG\f[] ++Enable or disable lazy deregistration of memory. + The value is of type int32_t. +-.PP +-\f[I]GNI_MR_CACHE\f[] : Select the type of cache that the domain will +-use. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_CACHE\f[] ++Select the type of cache that the domain will use. + Valid choices are the following: \[aq]internal\[aq], \[aq]udreg\[aq], or + \[aq]none\[aq]. + \[aq]internal\[aq] refers to the GNI provider internal registration +@@ -249,33 +329,51 @@ cache. + \[aq]udreg\[aq] refers to a user level dreg library based cache. + Lastly, \[aq]none\[aq] refers to device direct registration without a + provider cache. +-.PP +-\f[I]GNI_MR_HARD_REG_LIMIT\f[] : Maximum number of registrations. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_HARD_REG_LIMIT\f[] ++Maximum number of registrations. + Applies only to the GNI provider cache. + The value is of type int32_t (\-1 for no limit). +-.PP +-\f[I]GNI_MR_SOFT_REG_LIMIT\f[] : Soft cap on the registration limit. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_SOFT_REG_LIMIT\f[] ++Soft cap on the registration limit. + Applies only to the GNI provider cache. + The value is of type int32_t (\-1 for no limit). +-.PP +-\f[I]GNI_MR_HARD_STALE_REG_LIMIT\f[] : Maximum number of stale +-registrations to be held in cache. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_HARD_STALE_REG_LIMIT\f[] ++Maximum number of stale registrations to be held in cache. + This applies to the GNI provider cache and the udreg cache. + The value is of type int32_t (\-1 for no limit for the GNI provider + cache and udreg cache values must be greater than 0). +-.PP +-\f[I]GNI_MR_UDREG_LIMIT\f[] : Maximum number of registrations. ++.RS ++.RE ++.TP ++.B \f[I]GNI_MR_UDREG_LIMIT\f[] ++Maximum number of registrations. + Applies only to the udreg cache. + The value is of type int32_t. + The value must be greater than 0. +-.PP +-\f[I]GNI_XPMEM_ENABLE\f[] : Enable or disable use of XPMEM for on node +-messages using the GNI provider internal rendezvous protocol. ++.RS ++.RE ++.TP ++.B \f[I]GNI_XPMEM_ENABLE\f[] ++Enable or disable use of XPMEM for on node messages using the GNI ++provider internal rendezvous protocol. + The value is of type bool. +-.PP +-\f[I]GNI_DGRAM_PROGRESS_TIMEOUT\f[] : Controls timeout value in +-milliseconds for the control progress thread. ++.RS ++.RE ++.TP ++.B \f[I]GNI_DGRAM_PROGRESS_TIMEOUT\f[] ++Controls timeout value in milliseconds for the control progress thread. + The value is of type uint32_t. ++.RS ++.RE + .PP + The \f[C]flush_cache\f[] function allows the user to flush any stale + registration cache entries from the cache. +@@ -302,11 +400,14 @@ The \f[C]native_amo\f[] function allows the user to call GNI native + atomics that are not implemented in the libfabric API. + The parameters for native_amo are the same as the fi_atomic function but + adds the following parameter: +-.PP +-\f[I]enum gnix_fab_req_type req_type\f[] : The req_type\[aq]s supported +-with this call are GNIX_FAB_RQ_NAMO_AX (AND and XOR), and +-GNIX_FAB_RQ_NAMO_AX_S (AND and XOR 32 bit), GNIX_FAB_RQ_NAMO_FAX (Fetch +-AND and XOR) and GNIX_FAB_RQ_NAMO_FAX_S (Fetch AND and XOR 32 bit). ++.TP ++.B \f[I]enum gnix_fab_req_type req_type\f[] ++The req_type\[aq]s supported with this call are GNIX_FAB_RQ_NAMO_AX (AND ++and XOR), and GNIX_FAB_RQ_NAMO_AX_S (AND and XOR 32 bit), ++GNIX_FAB_RQ_NAMO_FAX (Fetch AND and XOR) and GNIX_FAB_RQ_NAMO_FAX_S ++(Fetch AND and XOR 32 bit). ++.RS ++.RE + .SH NOTES + .PP + The default address format is FI_ADDR_GNI. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_hook.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_hook.7 +new file mode 100644 +index 000000000..1fab08471 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_hook.7 +@@ -0,0 +1,79 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_hook" "7" "2018\-10\-16" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_hook \- The Hook Fabric Provider Utility ++.SH OVERVIEW ++.PP ++The hooking provider is a utility function that can intercept calls to ++any provider. ++The hook provider is always available, but has zero impact on calls ++unless enabled. ++It is useful for providing performance data on selected calls or ++debugging information. ++.SH SUPPORTED FEATURES ++.PP ++Hooking support is enabled through the FI_HOOK environment variable. ++To enable hooking, FI_HOOK must be set to the name of one or more of the ++available hooking providers. ++When multiple hooks are specified, the names must be separated by a ++semi\-colon. ++To obtain a list of hooking providers available on the current system, ++one can use the fi_info utility with the \[aq]\-\-env\[aq] command line ++option. ++Hooking providers are usually identified by \[aq]hook\[aq] appearing in ++the provider name. ++.PP ++Known hooking providers include the following: ++.TP ++.B \f[I]ofi_perf_hook\f[] ++This hooks \[aq]fast path\[aq] data operation calls. ++Performance data is captured on call entrance and exit, in order to ++provide an average of how long each call takes to complete. ++See the PERFORMANCE HOOKS section for available performance data. ++.RS ++.RE ++.SH PERFORMANCE HOOKS ++.PP ++The hook provider allows capturing inline performance data by accessing ++the CPU Performance Management Unit (PMU). ++PMU data is only available on Linux systems. ++Additionally, access to PMU data may be restricted to privileged ++(super\-user) applications. ++.PP ++Performance data is captured for critical data transfer calls: fi_msg, ++fi_rma, fi_tagged, fi_cq, and fi_cntr. ++Captured data is displayed as logged data using the FI_LOG_LEVEL trace ++level. ++Performance data is logged when the associated fabric is destroyed. ++.PP ++The environment variable FI_PERF_CNTR is used to identify which ++performance counter is tracked. ++The following counters are available: ++.TP ++.B \f[I]cpu_cycles\f[] ++Counts the number of CPU cycles each function takes to complete. ++.RS ++.RE ++.TP ++.B \f[I]cpu_instr\f[] ++Counts the number of CPU instructions each function takes to complete. ++This is the default performance counter if none is specified. ++.RS ++.RE ++.SH LIMITATIONS ++.PP ++Hooking functionality is not available for providers built using the ++FI_FABRIC_DIRECT feature. ++That is, directly linking to a provider prevents hooking. ++.PP ++The hooking provider does not work with triggered operations. ++Application that use FI_TRIGGER operations that attempt to hook calls ++will likely crash. ++.SH SEE ALSO ++.PP ++\f[C]fabric\f[](7), \f[C]fi_provider\f[](7) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mlx.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mlx.7 +index e2d7cee17..d38ee44bc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mlx.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mlx.7 +@@ -1,4 +1,7 @@ +-.TH "fi_mlx" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_mlx" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_mlx \- The MLX Fabric Provider +@@ -16,24 +19,66 @@ Supported UCP API version: 1.0 + The \f[I]mlx\f[] provider doesn\[aq]t support all the features defined + in the libfabric API. + Here are some of the limitations: +-.PP +-Endpoint types : Only supported type: \f[I]FI_RDM\f[] +-.PP +-Endpoint capabilities : Endpoints can support the only data transfer +-capability \f[I]FI_TAGGED\f[]. +-.PP +-Modes : \f[I]FI_CONTEXT\f[] is required. ++.TP ++.B Endpoint types ++Only supported type: \f[I]FI_RDM\f[] ++.RS ++.RE ++.TP ++.B Endpoint capabilities ++Endpoints can support the only data transfer capability ++\f[I]FI_TAGGED\f[]. ++.RS ++.RE ++.TP ++.B Modes ++\f[I]FI_CONTEXT\f[] is required. + That means, all the requests that generate completions must have a valid + pointer to type \f[I]struct fi_context\f[] passed as the operation + context. +-.PP +-Threading : The supported mode is FI_THREAD_DOMAIN, i.e. ++.RS ++.RE ++.TP ++.B Threading ++The supported mode is FI_THREAD_DOMAIN, i.e. + the \f[I]mlx\f[] provider is not thread safe. +-.PP +-Unsupported features : These features are unsupported: connection +-management, event queue, scalable endpoint, passive endpoint, shared +-receive context, rma, atomics. ++.RS ++.RE ++.TP ++.B Unsupported features ++These features are unsupported: connection management, event queue, ++scalable endpoint, passive endpoint, shared receive context, rma, ++atomics. ++.RS ++.RE + .SH RUNTIME PARAMETERS ++.TP ++.B \f[I]FI_MLX_CONFIG\f[] ++The path to the MLX configuration file (default: none). ++.RS ++.RE ++.TP ++.B \f[I]FI_MLX_TINJECT_LIMIT\f[] ++Maximal tinject message size (default: 1024). ++.RS ++.RE ++.TP ++.B \f[I]FI_MLX_NS_ENABLE\f[] ++Enforce usage of name server functionality for MLX provider (default: ++disabled). ++.RS ++.RE ++.TP ++.B \f[I]FI_MLX_NS_PORT\f[] ++MLX provider\[aq]s name server port (default: 12345). ++.RS ++.RE ++.TP ++.B \f[I]FI_MLX_NS_IFACE\f[] ++IPv4 network interface for MLX provider\[aq]s name server (default: ++any). ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fabric\f[](7), \f[C]fi_provider\f[](7), +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mrail.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mrail.7 +new file mode 100644 +index 000000000..1b6e2396d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_mrail.7 +@@ -0,0 +1,90 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_mrail" "7" "2018\-12\-27" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_mrail \- The Multi\-Rail Utility Provider ++.SH OVERVIEW ++.PP ++The mrail provider (ofi_mrail) is an utility provider that layers over ++an underlying provider to enable the use of multiple network ports ++(rails). ++This increases the total available bandwidth of an underlying proivder. ++The current status of mrail provider is experimental \- not all ++libfabric features are supported and performance is not guaranteed. ++.SH REQUIREMENTS ++.SS Requirements for underlying provider ++.PP ++mrail provider requires the underlying provider to support the following ++capabilities / modes: ++.IP \[bu] 2 ++Buffered receive (FI_BUFFERED_RECV) ++.IP \[bu] 2 ++FI_SOURCE ++.IP \[bu] 2 ++FI_AV_TABLE ++.SS Requirements for applications ++.PP ++Applications need to: * Support FI_MR_RAW MR mode bit to make use of ++FI_RMA capability. ++* Set FI_OFI_MRAIL_ADDR_STRC env variable (see RUNTIME PARAMETERS ++section below). ++.SH SUPPORTED FEATURES ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only \f[I]FI_EP_RDM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The following data transfer interface is supported: \f[I]FI_MSG\f[], ++\f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[]. ++.RS ++.RE ++.TP ++.B # LIMITATIONS ++Limitations of the underlying provider may show up as that of mrail ++provider. ++.RS ++.RE ++mrail provider doesn\[aq]t allow pass\-through of any mode bits to the ++underlying provider. ++.RS ++.RE ++.SS Unsupported features ++.PP ++The following are the major libfabric features that are not supported. ++Any other feature not listed in "Supported features" can be assumed as ++unsupported. ++.IP \[bu] 2 ++FI_ATOMIC ++.IP \[bu] 2 ++Scalable endpoints ++.IP \[bu] 2 ++Shared contexts ++.IP \[bu] 2 ++FABRIC_DIRECT ++.IP \[bu] 2 ++Multicast ++.IP \[bu] 2 ++Triggered operations ++.SH FUNCTIONALITY OVERVIEW ++.PP ++For messages (FI_MSG, FI_TAGGED), the provider sends one message per ++rail in a round\-robin manner. ++Ordering is guaranteed through the use of sequence numbers. ++For RMA, the data is striped equally across all rails. ++.SH RUNTIME PARAMETERS ++.PP ++The ofi_mrail provider checks for the following environment variables. ++.TP ++.B \f[I]FI_OFI_MRAIL_ADDR_STRC\f[] ++Comma delimited list of individual rail addresses in FI_ADDR_STR format. ++.RS ++.RE ++.SH SEE ALSO ++.PP ++\f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_netdir.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_netdir.7 +index a83ae3815..3785465a4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_netdir.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_netdir.7 +@@ -1,4 +1,7 @@ +-.TH "fi_netdir" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_netdir" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_netdir \- The Network Direct Fabric Provider +@@ -21,75 +24,122 @@ service provider interface (SPI) for their hardware. + .PP + The Network Direct provider support the following features defined for + the libfabric API: +-.PP +-\f[I]Endpoint types\f[] : The provider support the FI_EP_MSG endpoint +-types. +-.PP +-\f[I]Memory registration modes\f[] : The provider implements the +-\f[I]FI_MR_BASIC\f[] memory registration mode. +-.PP +-\f[I]Data transfer operations\f[] : The following data transfer +-interfaces are supported for the following endpoint types: +-\f[I]FI_MSG\f[], \f[I]FI_RMA\f[]. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider support the FI_EP_MSG endpoint types. ++.RS ++.RE ++.TP ++.B \f[I]Memory registration modes\f[] ++The provider implements the \f[I]FI_MR_BASIC\f[] memory registration ++mode. ++.RS ++.RE ++.TP ++.B \f[I]Data transfer operations\f[] ++The following data transfer interfaces are supported for the following ++endpoint types: \f[I]FI_MSG\f[], \f[I]FI_RMA\f[]. + See DATA TRANSFER OPERATIONS below for more details. +-.PP +-\f[I]Modes\f[] : The Network Direct provider requires applications to +-support the following modes: * FI_LOCAL_MR for all applications. +-.PP +-\f[I]Addressing Formats\f[] : Supported addressing formats include +-FI_SOCKADDR, FI_SOCKADDR_IN, FI_SOCKADDR_IN6 +-.PP +-\f[I]Progress\f[] : The Network Direct provider supports +-FI_PROGRESS_AUTO: Asynchronous operations make forward progress +-automatically. +-.PP +-\f[I]Operation flags\f[] : The provider supports FI_INJECT, +-FI_COMPLETION, FI_TRANSMIT_COMPLETE, FI_INJECT_COMPLETE, +-FI_DELIVERY_COMPLETE, FI_SELECTIVE_COMPLETION +-.PP +-\f[I]Completion ordering\f[] : RX/TX contexts: FI_ORDER_STRICT +-.PP +-\f[I]Other supported features\f[] : Multiple input/output vector (IOV) +-is supported for FI_RMA read/write and FI_MSG receive/transmit +-operations. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The Network Direct provider requires applications to support the ++following modes: * FI_LOCAL_MR for all applications. ++.RS ++.RE ++.TP ++.B \f[I]Addressing Formats\f[] ++Supported addressing formats include FI_SOCKADDR, FI_SOCKADDR_IN, ++FI_SOCKADDR_IN6 ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The Network Direct provider supports FI_PROGRESS_AUTO: Asynchronous ++operations make forward progress automatically. ++.RS ++.RE ++.TP ++.B \f[I]Operation flags\f[] ++The provider supports FI_INJECT, FI_COMPLETION, FI_TRANSMIT_COMPLETE, ++FI_INJECT_COMPLETE, FI_DELIVERY_COMPLETE, FI_SELECTIVE_COMPLETION ++.RS ++.RE ++.TP ++.B \f[I]Completion ordering\f[] ++RX/TX contexts: FI_ORDER_STRICT ++.RS ++.RE ++.TP ++.B \f[I]Other supported features\f[] ++Multiple input/output vector (IOV) is supported for FI_RMA read/write ++and FI_MSG receive/transmit operations. ++.RS ++.RE + .SH LIMITATIONS + .PP + The Network Direct is an experimental provider. + The full support of the Network Direct provider will be added to 1.6 + release version of libfabric. +-.PP +-\f[I]Memory Regions\f[] : Only FI_MR_BASIC mode is supported. ++.TP ++.B \f[I]Memory Regions\f[] ++Only FI_MR_BASIC mode is supported. + Adding regions via s/g list is supported only up to a s/g list size of + 1. + No support for binding memory regions to a counter. +-.PP +-\f[I]Wait objects\f[] : Wait object and wait sets are not supported. +-.PP +-\f[I]Resource Management\f[] : Application has to make sure CQs are not +-overrun as this cannot be detected by the provider. +-.PP +-\f[I]Unsupported Endpoint types\f[] : FI_EP_DGRAM, FI_EP_RDM +-.PP +-\f[I]Other unsupported features\f[] : Scalable endpoints, FABRIC_DIRECT +-.PP +-\f[I]Unsupported features specific to MSG endpoints\f[] : FI_SOURCE, +-FI_TAGGED, FI_CLAIM, fi_ep_alias, shared TX context, operations. ++.RS ++.RE ++.TP ++.B \f[I]Wait objects\f[] ++Wait object and wait sets are not supported. ++.RS ++.RE ++.TP ++.B \f[I]Resource Management\f[] ++Application has to make sure CQs are not overrun as this cannot be ++detected by the provider. ++.RS ++.RE ++.TP ++.B \f[I]Unsupported Endpoint types\f[] ++FI_EP_DGRAM, FI_EP_RDM ++.RS ++.RE ++.TP ++.B \f[I]Other unsupported features\f[] ++Scalable endpoints, FABRIC_DIRECT ++.RS ++.RE ++.TP ++.B \f[I]Unsupported features specific to MSG endpoints\f[] ++FI_SOURCE, FI_TAGGED, FI_CLAIM, fi_ep_alias, shared TX context, ++operations. ++.RS ++.RE + .SH RUNTIME PARAMETERS + .PP + The Network Direct provider checks for the following environment + variables. + .SS Variables specific to RDM endpoints +-.PP +-\f[I]FI_NETDIR_INLINETHR\f[] : The size of the (default: 8 Kbyte): * +-Transmitted data that can be inlined * Preposted data for the unexpected +-receive queue +-.PP +-\f[I]FI_NETDIR_PREPOSTCNT\f[] : The number of pre\-registered buffers +-between the endpoints that are not require internal ACK messages, must +-be a power of 2 (default: 8). +-.PP +-\f[I]FI_NETDIR_PREPOSTBUFCNT\f[] : The number of preposted arrays of +-buffers, must be a power of 2 (default: 1). ++.TP ++.B \f[I]FI_NETDIR_INLINETHR\f[] ++The size of the (default: 8 Kbyte): * Transmitted data that can be ++inlined * Preposted data for the unexpected receive queue ++.RS ++.RE ++.TP ++.B \f[I]FI_NETDIR_PREPOSTCNT\f[] ++The number of pre\-registered buffers between the endpoints that are not ++require internal ACK messages, must be a power of 2 (default: 8). ++.RS ++.RE ++.TP ++.B \f[I]FI_NETDIR_PREPOSTBUFCNT\f[] ++The number of preposted arrays of buffers, must be a power of 2 ++(default: 1). ++.RS ++.RE + .SS Environment variables notes + .PP + The fi_info utility would give the up\-to\-date information on +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_provider.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_provider.7 +index 311e619f5..0a3f08b14 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_provider.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_provider.7 +@@ -1,4 +1,7 @@ +-.TH "fi_provider" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_provider" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_provider \- Fabric Interface Providers +@@ -16,41 +19,73 @@ referred to as fabric providers, or simply providers. + This distribution of libfabric contains the following providers + (although more may be available via run\-time plug\-ins): + .SS Core providers +-.PP +-\f[I]GNI\f[] : A provider for the Aries interconnect in Cray XC(TM) +-systems utilizing the user\-space \f[I]Generic Networking Interface\f[]. ++.TP ++.B \f[I]GNI\f[] ++A provider for the Aries interconnect in Cray XC(TM) systems utilizing ++the user\-space \f[I]Generic Networking Interface\f[]. + See \f[C]fi_gni\f[](7) for more information. +-.PP +-\f[I]PSM\f[] : High\-speed InfiniBand networking from Intel. ++.RS ++.RE ++.TP ++.B \f[I]PSM\f[] ++High\-speed InfiniBand networking from Intel. + See \f[C]fi_psm\f[](7) for more information. +-.PP +-\f[I]Sockets\f[] : A general purpose provider that can be used on any +-network that supports TCP/UDP sockets. ++.RS ++.RE ++.TP ++.B \f[I]Sockets\f[] ++A general purpose provider that can be used on any network that supports ++TCP/UDP sockets. + This provider is not intended to provide performance improvements over + regular TCP/UDP sockets, but rather to allow developers to write, test, + and debug application code even on platforms that do not have + high\-speed networking. + See \f[C]fi_sockets\f[](7) for more information. +-.PP +-\f[I]usNIC\f[] : Ultra low latency Ethernet networking over Cisco +-userspace VIC adapters. ++.RS ++.RE ++.TP ++.B \f[I]usNIC\f[] ++Ultra low latency Ethernet networking over Cisco userspace VIC adapters. + See \f[C]fi_usnic\f[](7) for more information. +-.PP +-\f[I]Verbs\f[] : This provider uses the Linux Verbs API for network +-transport. ++.RS ++.RE ++.TP ++.B \f[I]Verbs\f[] ++This provider uses the Linux Verbs API for network transport. + Application performance is, obviously expected to be similar to that of + the native Linux Verbs API. + Analogous to the Sockets provider, the Verbs provider is intended to + enable developers to write, test, and debug application code on + platforms that only have Linux Verbs\-based networking. + See \f[C]fi_verbs\f[](7) for more information. +-.PP +-\f[I]Blue Gene/Q\f[] : See \f[C]fi_bgq\f[](7) for more information. ++.RS ++.RE ++.TP ++.B \f[I]Blue Gene/Q\f[] ++See \f[C]fi_bgq\f[](7) for more information. ++.RS ++.RE + .SS Utility providers +-.PP +-\f[I]RxM\f[] : The RxM provider (ofi_rxm) is an utility provider that +-supports RDM endpoints emulated over MSG endpoints of a core provider. ++.TP ++.B \f[I]RxM\f[] ++The RxM provider (ofi_rxm) is an utility provider that supports RDM ++endpoints emulated over MSG endpoints of a core provider. + See \f[C]fi_rxm\f[](7) for more information. ++.RS ++.RE ++.SS Special providers ++.TP ++.B \f[I]Hook\f[] ++The hook provider is a special type of provider that can layer over any ++other provider, unless FI_FABRIC_DIRECT is used. ++The hook provider is always available, but has no impact unless enabled. ++When enabled, the hook provider will intercept all calls to the ++underlying core or utility provider(s). ++The hook provider is useful for capturing performance data or providing ++debugging information, even in release builds of the library. ++See \f[C]fi_hook\f[](7) for more information. ++.RS ++.RE + .SH CORE VERSUS UTILITY PROVIDERS + .PP + Core providers implement the libfabric interfaces directly over +@@ -186,26 +221,47 @@ Logging is performed using the FI_ERR, FI_LOG, and FI_DEBUG macros. + \f[] + .fi + .SS ARGUMENTS +-.PP +-\f[I]prov_name\f[] : String representing the provider name. +-.PP +-\f[I]prov\f[] : Provider context structure. +-.PP +-\f[I]level\f[] : Log level associated with log statement. +-.PP +-\f[I]subsystem\f[] : Subsystem being logged from. ++.TP ++.B \f[I]prov_name\f[] ++String representing the provider name. ++.RS ++.RE ++.TP ++.B \f[I]prov\f[] ++Provider context structure. ++.RS ++.RE ++.TP ++.B \f[I]level\f[] ++Log level associated with log statement. ++.RS ++.RE ++.TP ++.B \f[I]subsystem\f[] ++Subsystem being logged from. ++.RS ++.RE + .SS DESCRIPTION +-.PP +-\f[I]FI_ERR\f[] : Always logged. +-.PP +-\f[I]FI_LOG\f[] : Logged if the intended provider, log level, and +-subsystem parameters match the user supplied values. +-.PP +-\f[I]FI_DEBUG\f[] : Logged if configured with the \-\-enable\-debug +-flag. ++.TP ++.B \f[I]FI_ERR\f[] ++Always logged. ++.RS ++.RE ++.TP ++.B \f[I]FI_LOG\f[] ++Logged if the intended provider, log level, and subsystem parameters ++match the user supplied values. ++.RS ++.RE ++.TP ++.B \f[I]FI_DEBUG\f[] ++Logged if configured with the \-\-enable\-debug flag. ++.RS ++.RE + .SH SEE ALSO + .PP +-\f[C]fi_gni\f[](7), \f[C]fi_psm\f[](7), \f[C]fi_sockets\f[](7), +-\f[C]fi_usnic\f[](7), \f[C]fi_verbs\f[](7), \f[C]fi_bgq\f[](7), ++\f[C]fi_gni\f[](7), \f[C]fi_hook\f[](7), \f[C]fi_psm\f[](7), ++\f[C]fi_sockets\f[](7), \f[C]fi_usnic\f[](7), \f[C]fi_verbs\f[](7), ++\f[C]fi_bgq\f[](7), + .SH AUTHORS + OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm.7 +index 0b849aa6b..513355278 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm.7 +@@ -1,4 +1,7 @@ +-.TH "fi_psm" "7" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_psm" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_psm \- The PSM Fabric Provider +@@ -23,13 +26,17 @@ exposes a PSM 1.x interface over the Intel Omni\-Path Fabric. + The \f[I]psm\f[] provider doesn\[aq]t support all the features defined + in the libfabric API. + Here are some of the limitations: +-.PP +-Endpoint types : Only support non\-connection based types +-\f[I]FI_DGRAM\f[] and \f[I]FI_RDM\f[] +-.PP +-Endpoint capabilities : Endpoints can support any combination of data +-transfer capabilities \f[I]FI_TAGGED\f[], \f[I]FI_MSG\f[], +-\f[I]FI_ATOMICS\f[], and \f[I]FI_RMA\f[]. ++.TP ++.B Endpoint types ++Only support non\-connection based types \f[I]FI_DGRAM\f[] and ++\f[I]FI_RDM\f[] ++.RS ++.RE ++.TP ++.B Endpoint capabilities ++Endpoints can support any combination of data transfer capabilities ++\f[I]FI_TAGGED\f[], \f[I]FI_MSG\f[], \f[I]FI_ATOMICS\f[], and ++\f[I]FI_RMA\f[]. + These capabilities can be further refined by \f[I]FI_SEND\f[], + \f[I]FI_RECV\f[], \f[I]FI_READ\f[], \f[I]FI_WRITE\f[], + \f[I]FI_REMOTE_READ\f[], and \f[I]FI_REMOTE_WRITE\f[] to limit the +@@ -42,12 +49,15 @@ For example it is fine to have two endpoints with \f[I]FI_TAGGED\f[] | + \f[I]FI_RMA\f[] | \f[I]FI_ATOMICS\f[]. + But it is not allowed to have two endpoints with \f[I]FI_TAGGED\f[], or + two endpoints with \f[I]FI_RMA\f[]. ++.RS ++.RE + .PP + \f[I]FI_MULTI_RECV\f[] is supported for non\-tagged message queue only. + .PP + Other supported capabilities include \f[I]FI_TRIGGER\f[]. +-.PP +-Modes : \f[I]FI_CONTEXT\f[] is required for the \f[I]FI_TAGGED\f[] and ++.TP ++.B Modes ++\f[I]FI_CONTEXT\f[] is required for the \f[I]FI_TAGGED\f[] and + \f[I]FI_MSG\f[] capabilities. + That means, any request belonging to these two categories that generates + a completion must pass as the operation context a valid pointer to type +@@ -55,25 +65,33 @@ a completion must pass as the operation context a valid pointer to type + remain untouched until the request has completed. + If none of \f[I]FI_TAGGED\f[] and \f[I]FI_MSG\f[] is asked for, the + \f[I]FI_CONTEXT\f[] mode is not required. +-.PP +-Progress : The \f[I]psm\f[] provider requires manual progress. ++.RS ++.RE ++.TP ++.B Progress ++The \f[I]psm\f[] provider requires manual progress. + The application is expected to call \f[I]fi_cq_read\f[] or + \f[I]fi_cntr_read\f[] function from time to time when no other libfabric + function is called to ensure progress is made in a timely manner. + The provider does support auto progress mode. + However, the performance can be significantly impacted if the + application purely depends on the provider to make auto progress. +-.PP +-Unsupported features : These features are unsupported: connection +-management, scalable endpoint, passive endpoint, shared receive context, +-send/inject with immediate data. ++.RS ++.RE ++.TP ++.B Unsupported features ++These features are unsupported: connection management, scalable ++endpoint, passive endpoint, shared receive context, send/inject with ++immediate data. ++.RS ++.RE + .SH RUNTIME PARAMETERS + .PP + The \f[I]psm\f[] provider checks for the following environment + variables: +-.PP +-\f[I]FI_PSM_UUID\f[] : PSM requires that each job has a unique ID +-(UUID). ++.TP ++.B \f[I]FI_PSM_UUID\f[] ++PSM requires that each job has a unique ID (UUID). + All the processes in the same job need to use the same UUID in order to + be able to talk to each other. + The PSM reference manual advises to keep UUID unique to each job. +@@ -83,12 +101,15 @@ jobs with the same UUID have exited normally. + If running into "resource busy" or "connection failure" issues with + unknown reason, it is advisable to manually set the UUID to a value + different from the default. ++.RS ++.RE + .PP + The default UUID is 0FFF0FFF\-0000\-0000\-0000\-0FFF0FFF0FFF. +-.PP +-\f[I]FI_PSM_NAME_SERVER\f[] : The \f[I]psm\f[] provider has a simple +-built\-in name server that can be used to resolve an IP address or host +-name into a transport address needed by the \f[I]fi_av_insert\f[] call. ++.TP ++.B \f[I]FI_PSM_NAME_SERVER\f[] ++The \f[I]psm\f[] provider has a simple built\-in name server that can be ++used to resolve an IP address or host name into a transport address ++needed by the \f[I]fi_av_insert\f[] call. + The main purpose of this name server is to allow simple client\-server + type applications (such as those in \f[I]fabtests\f[]) to be written + purely with libfabric, without using any out\-of\-band communication +@@ -104,6 +125,8 @@ Optionally the \f[I]service\f[] parameter can be used in addition to + \f[I]node\f[]. + Notice that the \f[I]service\f[] number is interpreted by the provider + and is not a TCP/IP port number. ++.RS ++.RE + .PP + The name server is on by default. + It can be turned off by setting the variable to 0. +@@ -112,13 +135,16 @@ created when the name server is on. + .PP + The provider detects OpenMPI and MPICH runs and changes the default + setting to off. +-.PP +-\f[I]FI_PSM_TAGGED_RMA\f[] : The RMA functions are implemented on top of +-the PSM Active Message functions. ++.TP ++.B \f[I]FI_PSM_TAGGED_RMA\f[] ++The RMA functions are implemented on top of the PSM Active Message ++functions. + The Active Message functions have limit on the size of data can be + transferred in a single message. + Large transfers can be divided into small chunks and be pipe\-lined. + However, the bandwidth is sub\-optimal by doing this way. ++.RS ++.RE + .PP + The \f[I]psm\f[] provider use PSM tag\-matching message queue functions + to achieve higher bandwidth for large size RMA. +@@ -127,39 +153,50 @@ RMA traffic from the regular tagged message queue. + .PP + The option is on by default. + To turn it off set the variable to 0. +-.PP +-\f[I]FI_PSM_AM_MSG\f[] : The \f[I]psm\f[] provider implements the +-non\-tagged message queue over the PSM tag\-matching message queue. ++.TP ++.B \f[I]FI_PSM_AM_MSG\f[] ++The \f[I]psm\f[] provider implements the non\-tagged message queue over ++the PSM tag\-matching message queue. + One tag bit is reserved for this purpose. + Alternatively, the non\-tagged message queue can be implemented over + Active Message. + This experimental feature has slightly larger latency. ++.RS ++.RE + .PP + This option is off by default. + To turn it on set the variable to 1. +-.PP +-\f[I]FI_PSM_DELAY\f[] : Time (seconds) to sleep before closing PSM +-endpoints. ++.TP ++.B \f[I]FI_PSM_DELAY\f[] ++Time (seconds) to sleep before closing PSM endpoints. + This is a workaround for a bug in some versions of PSM library. ++.RS ++.RE + .PP + The default setting is 1. +-.PP +-\f[I]FI_PSM_TIMEOUT\f[] : Timeout (seconds) for gracefully closing PSM +-endpoints. ++.TP ++.B \f[I]FI_PSM_TIMEOUT\f[] ++Timeout (seconds) for gracefully closing PSM endpoints. + A forced closing will be issued if timeout expires. ++.RS ++.RE + .PP + The default setting is 5. +-.PP +-\f[I]FI_PSM_PROG_INTERVAL\f[] : When auto progress is enabled (asked via +-the hints to \f[I]fi_getinfo\f[]), a progress thread is created to make +-progress calls from time to time. ++.TP ++.B \f[I]FI_PSM_PROG_INTERVAL\f[] ++When auto progress is enabled (asked via the hints to ++\f[I]fi_getinfo\f[]), a progress thread is created to make progress ++calls from time to time. + This option set the interval (microseconds) between progress calls. ++.RS ++.RE + .PP + The default setting is 1 if affinity is set, or 1000 if not. + See \f[I]FI_PSM_PROG_AFFINITY\f[]. +-.PP +-\f[I]FI_PSM_PROG_AFFINITY\f[] : When set, specify the set of CPU cores +-to set the progress thread affinity to. ++.TP ++.B \f[I]FI_PSM_PROG_AFFINITY\f[] ++When set, specify the set of CPU cores to set the progress thread ++affinity to. + The format is + \f[C][:[:]][,[:[:]]]*\f[], where + each triplet \f[C]::\f[] defines a block of +@@ -167,6 +204,8 @@ core_ids. + Both \f[C]\f[] and \f[C]\f[] can be either the + \f[C]core_id\f[] (when >=0) or \f[C]core_id\ \-\ num_cores\f[] (when + <0). ++.RS ++.RE + .PP + By default affinity is not set. + .SH SEE ALSO +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm2.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm2.7 +index cebcb3688..7801cce90 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm2.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_psm2.7 +@@ -1,4 +1,7 @@ +-.TH "fi_psm2" "7" "2018\-02\-21" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_psm2" "7" "2018\-10\-23" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_psm2 \- The PSM2 Fabric Provider +@@ -16,17 +19,23 @@ Fabric. + The \f[I]psm2\f[] provider doesn\[aq]t support all the features defined + in the libfabric API. + Here are some of the limitations: +-.PP +-Endpoint types : Only support non\-connection based types +-\f[I]FI_DGRAM\f[] and \f[I]FI_RDM\f[] +-.PP +-Endpoint capabilities : Endpoints can support any combination of data +-transfer capabilities \f[I]FI_TAGGED\f[], \f[I]FI_MSG\f[], +-\f[I]FI_ATOMICS\f[], and \f[I]FI_RMA\f[]. ++.TP ++.B Endpoint types ++Only support non\-connection based types \f[I]FI_DGRAM\f[] and ++\f[I]FI_RDM\f[] ++.RS ++.RE ++.TP ++.B Endpoint capabilities ++Endpoints can support any combination of data transfer capabilities ++\f[I]FI_TAGGED\f[], \f[I]FI_MSG\f[], \f[I]FI_ATOMICS\f[], and ++\f[I]FI_RMA\f[]. + These capabilities can be further refined by \f[I]FI_SEND\f[], + \f[I]FI_RECV\f[], \f[I]FI_READ\f[], \f[I]FI_WRITE\f[], + \f[I]FI_REMOTE_READ\f[], and \f[I]FI_REMOTE_WRITE\f[] to limit the + direction of operations. ++.RS ++.RE + .PP + \f[I]FI_MULTI_RECV\f[] is supported for non\-tagged message queue only. + .PP +@@ -41,8 +50,9 @@ Other supported capabilities include \f[I]FI_TRIGGER\f[], + and \f[I]FI_SOURCE_ERR\f[]. + Furthermore, \f[I]FI_NAMED_RX_CTX\f[] is supported when scalable + endpoints are enabled. +-.PP +-Modes : \f[I]FI_CONTEXT\f[] is required for the \f[I]FI_TAGGED\f[] and ++.TP ++.B Modes ++\f[I]FI_CONTEXT\f[] is required for the \f[I]FI_TAGGED\f[] and + \f[I]FI_MSG\f[] capabilities. + That means, any request belonging to these two categories that generates + a completion must pass as the operation context a valid pointer to type +@@ -50,23 +60,31 @@ a completion must pass as the operation context a valid pointer to type + remain untouched until the request has completed. + If none of \f[I]FI_TAGGED\f[] and \f[I]FI_MSG\f[] is asked for, the + \f[I]FI_CONTEXT\f[] mode is not required. +-.PP +-Progress : The \f[I]psm2\f[] provider requires manual progress. ++.RS ++.RE ++.TP ++.B Progress ++The \f[I]psm2\f[] provider requires manual progress. + The application is expected to call \f[I]fi_cq_read\f[] or + \f[I]fi_cntr_read\f[] function from time to time when no other libfabric + function is called to ensure progress is made in a timely manner. + The provider does support auto progress mode. + However, the performance can be significantly impacted if the + application purely depends on the provider to make auto progress. +-.PP +-Scalable endpoints : Scalable endpoints support depends on the multi\-EP +-feature of the \f[I]PSM2\f[] library. ++.RS ++.RE ++.TP ++.B Scalable endpoints ++Scalable endpoints support depends on the multi\-EP feature of the ++\f[I]PSM2\f[] library. + If the \f[I]PSM2\f[] library supports this feature, the availability is + further controlled by an environment variable \f[I]PSM2_MULTI_EP\f[]. + The \f[I]psm2\f[] provider automatically sets this variable to 1 if it + is not set. + The feature can be disabled explicitly by setting \f[I]PSM2_MULTI_EP\f[] + to 0. ++.RS ++.RE + .PP + When creating a scalable endpoint, the exact number of contexts + requested should be set in the "fi_info" structure passed to the +@@ -81,24 +99,30 @@ For optimal performance, it is advised to avoid having multiple threads + accessing the same context, either directly by posting + send/recv/read/write request, or indirectly by polling associated + completion queues or counters. +-.PP +-Shared Tx contexts : In order to achieve the purpose of saving PSM +-context by using shared Tx context, the endpoints bound to the shared Tx +-contexts need to be Tx only. ++.TP ++.B Shared Tx contexts ++In order to achieve the purpose of saving PSM context by using shared Tx ++context, the endpoints bound to the shared Tx contexts need to be Tx ++only. + The reason is that Rx capability always requires a PSM context, which + can also be automatically used for Tx. + As the result, allocating a shared Tx context for Rx capable endpoints + actually consumes one extra context instead of saving some. +-.PP +-Unsupported features : These features are unsupported: connection +-management, passive endpoint, and shared receive context. ++.RS ++.RE ++.TP ++.B Unsupported features ++These features are unsupported: connection management, passive endpoint, ++and shared receive context. ++.RS ++.RE + .SH RUNTIME PARAMETERS + .PP + The \f[I]psm2\f[] provider checks for the following environment + variables: +-.PP +-\f[I]FI_PSM2_UUID\f[] : PSM requires that each job has a unique ID +-(UUID). ++.TP ++.B \f[I]FI_PSM2_UUID\f[] ++PSM requires that each job has a unique ID (UUID). + All the processes in the same job need to use the same UUID in order to + be able to talk to each other. + The PSM reference manual advises to keep UUID unique to each job. +@@ -108,12 +132,15 @@ jobs with the same UUID have exited normally. + If running into "resource busy" or "connection failure" issues with + unknown reason, it is advisable to manually set the UUID to a value + different from the default. ++.RS ++.RE + .PP + The default UUID is 00FF00FF\-0000\-0000\-0000\-00FF0F0F00FF. +-.PP +-\f[I]FI_PSM2_NAME_SERVER\f[] : The \f[I]psm2\f[] provider has a simple +-built\-in name server that can be used to resolve an IP address or host +-name into a transport address needed by the \f[I]fi_av_insert\f[] call. ++.TP ++.B \f[I]FI_PSM2_NAME_SERVER\f[] ++The \f[I]psm2\f[] provider has a simple built\-in name server that can ++be used to resolve an IP address or host name into a transport address ++needed by the \f[I]fi_av_insert\f[] call. + The main purpose of this name server is to allow simple client\-server + type applications (such as those in \f[I]fabtests\f[]) to be written + purely with libfabric, without using any out\-of\-band communication +@@ -129,6 +156,8 @@ Optionally the \f[I]service\f[] parameter can be used in addition to + \f[I]node\f[]. + Notice that the \f[I]service\f[] number is interpreted by the provider + and is not a TCP/IP port number. ++.RS ++.RE + .PP + The name server is on by default. + It can be turned off by setting the variable to 0. +@@ -137,13 +166,16 @@ created when the name server is on. + .PP + The provider detects OpenMPI and MPICH runs and changes the default + setting to off. +-.PP +-\f[I]FI_PSM2_TAGGED_RMA\f[] : The RMA functions are implemented on top +-of the PSM Active Message functions. ++.TP ++.B \f[I]FI_PSM2_TAGGED_RMA\f[] ++The RMA functions are implemented on top of the PSM Active Message ++functions. + The Active Message functions have limit on the size of data can be + transferred in a single message. + Large transfers can be divided into small chunks and be pipe\-lined. + However, the bandwidth is sub\-optimal by doing this way. ++.RS ++.RE + .PP + The \f[I]psm2\f[] provider use PSM tag\-matching message queue functions + to achieve higher bandwidth for large size RMA. +@@ -152,29 +184,37 @@ the RMA traffic from the regular tagged message queue. + .PP + The option is on by default. + To turn it off set the variable to 0. +-.PP +-\f[I]FI_PSM2_DELAY\f[] : Time (seconds) to sleep before closing PSM +-endpoints. ++.TP ++.B \f[I]FI_PSM2_DELAY\f[] ++Time (seconds) to sleep before closing PSM endpoints. + This is a workaround for a bug in some versions of PSM library. ++.RS ++.RE + .PP + The default setting is 0. +-.PP +-\f[I]FI_PSM2_TIMEOUT\f[] : Timeout (seconds) for gracefully closing PSM +-endpoints. ++.TP ++.B \f[I]FI_PSM2_TIMEOUT\f[] ++Timeout (seconds) for gracefully closing PSM endpoints. + A forced closing will be issued if timeout expires. ++.RS ++.RE + .PP + The default setting is 5. +-.PP +-\f[I]FI_PSM2_PROG_INTERVAL\f[] : When auto progress is enabled (asked +-via the hints to \f[I]fi_getinfo\f[]), a progress thread is created to +-make progress calls from time to time. ++.TP ++.B \f[I]FI_PSM2_PROG_INTERVAL\f[] ++When auto progress is enabled (asked via the hints to ++\f[I]fi_getinfo\f[]), a progress thread is created to make progress ++calls from time to time. + This option set the interval (microseconds) between progress calls. ++.RS ++.RE + .PP + The default setting is 1 if affinity is set, or 1000 if not. + See \f[I]FI_PSM2_PROG_AFFINITY\f[]. +-.PP +-\f[I]FI_PSM2_PROG_AFFINITY\f[] : When set, specify the set of CPU cores +-to set the progress thread affinity to. ++.TP ++.B \f[I]FI_PSM2_PROG_AFFINITY\f[] ++When set, specify the set of CPU cores to set the progress thread ++affinity to. + The format is + \f[C][:[:]][,[:[:]]]*\f[], where + each triplet \f[C]::\f[] defines a block of +@@ -182,52 +222,42 @@ core_ids. + Both \f[C]\f[] and \f[C]\f[] can be either the + \f[C]core_id\f[] (when >=0) or \f[C]core_id\ \-\ num_cores\f[] (when + <0). ++.RS ++.RE + .PP + By default affinity is not set. +-.PP +-\f[I]FI_PSM2_INJECT_SIZE\f[] : Maximum message size allowed for +-fi_inject and fi_tinject calls. ++.TP ++.B \f[I]FI_PSM2_INJECT_SIZE\f[] ++Maximum message size allowed for fi_inject and fi_tinject calls. + This is an experimental feature to allow some applications to override + default inject size limitation. + When the inject size is larger than the default value, some inject calls + might block. ++.RS ++.RE + .PP + The default setting is 64. +-.PP +-\f[I]FI_PSM2_LOCK_LEVEL\f[] : When set, dictate the level of locking +-being used by the provider. ++.TP ++.B \f[I]FI_PSM2_LOCK_LEVEL\f[] ++When set, dictate the level of locking being used by the provider. + Level 2 means all locks are enabled. + Level 1 disables some locks and is suitable for runs that limit the + access to each PSM2 context to a single thread. + Level 0 disables all locks and thus is only suitable for single threaded + runs. ++.RS ++.RE + .PP + To use level 0 or level 1, wait object and auto progress mode cannot be + used because they introduce internal threads that may break the + conditions needed for these levels. + .PP + The default setting is 2. +-.PP +-\f[I]FI_PSM2_LAZY_CONN\f[] : Control when connections are established +-between PSM2 endpoints that OFI endpoints are built on top of. +-When set to 0, connections are established when addresses are inserted +-into the address vector. +-This is the eager connection mode. +-When set to 1, connections are established when addresses are used the +-first time in communication. +-This is the lazy connection mode. +-.PP +-Lazy connection mode may reduce the start\-up time on large systems at +-the expense of slightly higher data path overhead. +-For applications that use multiple endpoints, lazy connection mode can +-be especially helpful with the potential of greatly reduce the time to +-set up address vectors and to close endpoints. +-.PP +-The default setting is 0. +-.PP +-\f[I]FI_PSM2_DISCONNECT\f[] : The provider has a mechanism to +-automatically send disconnection notifications to all connected peers +-before the local endpoint is closed. ++.TP ++.B \f[I]FI_PSM2_DISCONNECT\f[] ++The provider has a mechanism to automatically send disconnection ++notifications to all connected peers before the local endpoint is ++closed. + As the response, the peers call \f[I]psm2_ep_disconnect\f[] to clean up + the connection state at their side. + This allows the same PSM2 epid be used by different dynamically started +@@ -236,6 +266,8 @@ This mechanism, however, introduce extra overhead to the finalization + phase. + For applications that never reuse epids within the same session such + overhead is unnecessary. ++.RS ++.RE + .PP + This option controls whether the automatic disconnection notification + mechanism should be enabled. +@@ -243,9 +275,9 @@ For client\-server application mentioned above, the client side should + set this option to 1, but the server should set it to 0. + .PP + The default setting is 0. +-.PP +-\f[I]FI_PSM2_TAG_LAYOUT\f[] : Select how the 96\-bit PSM2 tag bits are +-organized. ++.TP ++.B \f[I]FI_PSM2_TAG_LAYOUT\f[] ++Select how the 96\-bit PSM2 tag bits are organized. + Currently three choices are available: \f[I]tag60\f[] means 32\-4\-60 + partitioning for CQ data, internal protocol flags, and application tag. + \f[I]tag64\f[] means 4\-28\-64 partitioning for internal protocol flags, +@@ -259,6 +291,8 @@ including \f[I]FI_REMOTE_CQ_DATA\f[] in \f[I]hints\->caps\f[], otherwise + If \f[I]tag64\f[] is the result of automatic selection, + \f[I]fi_getinfo\f[] also returns a second instance of the provider with + \f[I]tag60\f[] layout. ++.RS ++.RE + .PP + The default setting is \f[I]auto\f[]. + .PP +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rstream.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rstream.7 +new file mode 100644 +index 000000000..60ec49c8d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rstream.7 +@@ -0,0 +1,103 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_rstream" "7" "2018\-11\-21" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_rstream ++.SH OVERVIEW ++.PP ++The rstream provider supports stream messaging over message based RMA. ++It maps stream to message over a core RMA\-based OFI provider. ++Only Endpoints and EQs are needed for connection start\-up and ++messaging. ++Unlike other OFI providers, rstream does not support CQs or memory ++registration of any kind. ++In order to asynchronously wait for a completion (cm/msg), one can use ++fi_control on the endpoint/eq to get an fd to use in a poll call. ++For messaging completions, use FI_PEEK on send/recv after poll to see ++what type of transaction has transpired. ++.SH SUPPORTED FEATURES ++.PP ++The rstream provider currently supports \f[I]FI_MSG\f[] capabilities. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only endpoint type \f[I]FI_EP_SOCK_STREAM\f[]. ++.RS ++.RE ++.PP ++\f[I]Endpoint capabilities\f[] : The following data transfer interface ++is supported: \f[I]fi_msg\f[]. ++.TP ++.B \f[I]Modes\f[] ++The provider does not require the use of any mode bits but supports core ++providers that require FI_CONTEXT and FI_RX_CQ_DATA. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The rstream provider only supports \f[I]FI_PROGRESS_MANUAL\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Threading Model\f[] ++The provider supports FI_THREAD_SAFE ++.RS ++.RE ++.TP ++.B \f[I]Verbs\-iWarp\f[] ++The provider has added features to enable iWarp. ++To use this feature, the ep protocol IWARP must be requested in a ++getinfo call. ++.RS ++.RE ++.SH LIMITATIONS ++.PP ++The rstream provider is experimental and lacks performance validation ++and extensive testing. ++The iWarp protocol may need extra initialization work to re\-enable. ++Currently the rstream provider is used to by the rsockets\-OFI library ++as a ULP and hooks into the core provider verbs. ++It is not interoperable with the previous rsockets(v1) protocol. ++There are default settings that limit the message stream (provider ++memory region size and CQ size). ++These can be modified by fi_setopt. ++.SH SETTINGS ++.PP ++The \f[I]rstream\f[] provider settings can be modified via fi_setopt on ++the endpoint (FI_OPT_ENDPOINT) along with the following parameters: ++.TP ++.B \f[I]FI_OPT_SEND_BUF_SIZE\f[] ++Size of the send buffer. ++Default is 32KB. ++.RS ++.RE ++.TP ++.B \f[I]FI_OPT_RECV_BUF_SIZE\f[] ++Size of the recv buffer. ++Default is 32KB. ++.RS ++.RE ++.TP ++.B \f[I]FI_OPT_TX_SIZE\f[] ++Size of the send queue. ++Default is 384. ++.RS ++.RE ++.TP ++.B \f[I]FI_OPT_RX_SIZE\f[] ++Size of the recv queue. ++Default is 384. ++.RS ++.RE ++.SH OFI EXTENSIONS ++.PP ++The rstream provider has extended the current OFI API set in order to ++enable a user implemenation of Poll. ++Specifically sendmsg(FI_PEEK) is supported which replicates the behavior ++of the recvmsg(FI_PEEK) feature. ++.SH SEE ALSO ++.PP ++\f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxd.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxd.7 +index f385c7253..d4723ec0c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxd.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxd.7 +@@ -1,4 +1,7 @@ +-.TH "fi_rxd" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_rxd" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_rxd \- The RxD (RDM over DGRAM) Utility Provider +@@ -8,24 +11,26 @@ The RxD provider is a utility provider that supports RDM endpoints + emulated over a base DGRAM provider. + .SH SUPPORTED FEATURES + .PP +-The RxD provider currently supports \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[] +-and \f[I]FI_RMA\f[] capabilities. +-It requires the base DGRAM provider to support \f[I]FI_MSG\f[] +-capabilities. +-.PP +-\f[I]Endpoint types\f[] : The provider supports only endpoint type +-\f[I]FI_EP_RDM\f[]. ++The RxD provider currently supports \f[I]FI_MSG\f[] capabilities. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only endpoint type \f[I]FI_EP_RDM\f[]. ++.RS ++.RE + .PP + \f[I]Endpoint capabilities\f[] : The following data transfer interface +-is supported: \f[I]fi_msg\f[], \f[I]fi_tagged\f[] and \f[I]fi_rma\f[]. +-.PP +-\f[I]Modes\f[] : The provider does not require the use of any mode bits. +-.PP +-\f[I]Progress\f[] : The RxD provider supports both +-\f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], with a +-default set to auto. +-However, receive side data buffers are not modified outside of +-completion processing routines. ++is supported: \f[I]fi_msg\f[]. ++.TP ++.B \f[I]Modes\f[] ++The provider does not require the use of any mode bits but supports core ++DGRAM providers that require FI_CONTEXT and FI_MSG_PREFIX. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The RxD provider only supports \f[I]FI_PROGRESS_MANUAL\f[]. ++.RS ++.RE + .SH LIMITATIONS + .PP + The RxD provider has hard\-coded maximums for supported queue sizes and +@@ -40,7 +45,34 @@ The RxD provider is still under development and is not extensively + tested. + .SH RUNTIME PARAMETERS + .PP +-No runtime parameters are currently defined. ++The \f[I]rxd\f[] provider checks for the following environment ++variables: ++.TP ++.B \f[I]FI_OFI_RXD_SPIN_COUNT\f[] ++Number of times to read the core provider\[aq]s CQ for a segment ++completion before trying to progress sends. ++Default is 1000. ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXD_RETRY\f[] ++Toggles retrying of packets and assumes reliability of individual ++packets and will reassemble all received packets. ++Retrying is turned on by default. ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXD_MAX_PEERS\f[] ++Maximum number of peers the provider should prepare to track. ++Default: 1024 ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXD_MAX_UNACKED\f[] ++Maximum number of packets (per peer) to send at a time. ++Default: 128 ++.RS ++.RE + .SH SEE ALSO + .PP + \f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxm.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxm.7 +index 2d7bc335a..94055936c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxm.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_rxm.7 +@@ -1,38 +1,77 @@ +-.TH "fi_rxm" "7" "2018\-02\-19" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_rxm" "7" "2018\-12\-19" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_rxm \- The RxM (RDM over MSG) Utility Provider + .SH OVERVIEW + .PP +-The RxM provider (ofi_rxm) is an utility provider that supports RDM +-endpoint emulated over MSG endpoint of a core provider. ++The RxM provider (ofi_rxm) is an utility provider that supports ++FI_EP_RDM type endpoint emulated over FI_EP_MSG type endpoint(s) of an ++underlying core provider. ++FI_EP_RDM endpoints have a reliable unconnected messaging interface and ++RxM emulates this by hiding the connection management of underlying ++FI_EP_MSG endpoints from the user. ++Additionally, RxM can hide memory registration requirement from a core ++provider like verbs if the apps don\[aq]t support it. + .SH REQUIREMENTS ++.SS Requirements for core provider + .PP + RxM provider requires the core provider to support the following + features: + .IP \[bu] 2 + MSG endpoints (FI_EP_MSG) + .IP \[bu] 2 +-RMA read/write (FI_RMA) ++RMA read/write (FI_RMA) \- Used for implementing rendezvous protocol for ++large messages. + .IP \[bu] 2 +-FI_OPT_CM_DATA_SIZE of at least 24 bytes ++FI_OPT_CM_DATA_SIZE of at least 48 bytes ++.SS Requirements for applications ++.PP ++Since RxM emulates RDM endpoints by hiding connection management and ++connections are established only on\-demand (when app tries to send ++data), the first several data transfer calls would return EAGAIN. ++Applications should be aware of this and retry until the operation ++succeeds. ++.PP ++If an application has chosen manual progress for data progress, it ++should also read the CQ so that the connection establishment progresses. ++Not doing so would result in a stall. ++See also the ERRORS section in fi_msg(3). + .SH SUPPORTED FEATURES + .PP +-The RxM provider currently supports \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[] +-and \f[I]FI_RMA\f[] capabilities. +-.PP +-\f[I]Endpoint types\f[] : The provider supports only \f[I]FI_EP_RDM\f[]. +-.PP +-\f[I]Endpoint capabilities\f[] : The following data transfer interface +-is supported: \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[]. +-.PP +-\f[I]Progress\f[] : The RxM provider supports \f[I]FI_PROGRESS_AUTO\f[]. +-.PP +-\f[I]Addressing Formats\f[] : FI_SOCKADDR, FI_SOCKADDR_IN +-.PP +-\f[I]Memory Region\f[] : FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, +-FI_MR_PROV_KEY MR mode bits would be required from the app in case the +-core provider requires it. ++The RxM provider currently supports \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[], ++\f[I]FI_RMA\f[] and \f[I]FI_ATOMIC\f[] capabilities. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only \f[I]FI_EP_RDM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The following data transfer interface is supported: \f[I]FI_MSG\f[], ++\f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[], \f[I]FI_ATOMIC\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The RxM provider supports both \f[I]FI_PROGRESS_MANUAL\f[] and ++\f[I]FI_PROGRESS_AUTO\f[]. ++The former is more optimal. ++.RS ++.RE ++.TP ++.B \f[I]Addressing Formats\f[] ++FI_SOCKADDR, FI_SOCKADDR_IN ++.RS ++.RE ++.TP ++.B \f[I]Memory Region\f[] ++FI_MR_VIRT_ADDR, FI_MR_ALLOCATED, FI_MR_PROV_KEY MR mode bits would be ++required from the app in case the core provider requires it. ++.RS ++.RE + .SH LIMITATIONS + .PP + When using RxM provider, some limitations from the underlying MSG +@@ -45,8 +84,6 @@ RxM provider does not support the following features: + .IP \[bu] 2 + op_flags: FI_FENCE. + .IP \[bu] 2 +-FI_ATOMIC +-.IP \[bu] 2 + Scalable endpoints + .IP \[bu] 2 + Shared contexts +@@ -66,25 +103,105 @@ FI_ADDR_STR, FI_SYNC_ERR + Reporting unknown source addr data as part of completions + .IP \[bu] 2 + Triggered operations +-.SS Auto progress ++.SS Progress limitations + .PP + When sending large messages, an app doing an sread or waiting on the CQ + file descriptor may not get a completion when reading the CQ after being + woken up from the wait. + The app has to do sread or wait on the file descriptor again. ++This is needed because RxM uses a rendezvous protocol for large message ++sends. ++An app would get woken up from waiting on CQ fd when rendezvous protocol ++request completes but it would have to wait again to get an ACK from the ++receiver indicating completion of large message transfer by remote RMA ++read. ++.SS FI_ATOMIC limitations ++.PP ++The FI_ATOMIC capability will only be listed in the fi_info if the ++fi_info hints parameter specifies FI_ATOMIC. ++If FI_ATOMIC is requested, message order FI_ORDER_RAR, FI_ORDER_RAW, ++FI_ORDER_WAR, FI_ORDER_WAW, FI_ORDER_SAR, and FI_ORDER_SAW can not be ++supported. + .SH RUNTIME PARAMETERS + .PP + The ofi_rxm provider checks for the following environment variables. +-.PP +-\f[I]FI_OFI_RXM_BUFFER_SIZE\f[] : Defines the transmit buffer size / +-inject size. ++.TP ++.B \f[I]FI_OFI_RXM_BUFFER_SIZE\f[] ++Defines the transmit buffer size / inject size. + Messages of size less than this would be transmitted via an eager +-protocol and those above would be transmitted via a rendezvous protocol. ++protocol and those above would be transmitted via a rendezvous or SAR ++(Segmentation And Reassembly) protocol. + Transmit data would be copied up to this size (default: ~16k). +-.PP +-\f[I]FI_OFI_RXM_COMP_PER_PROGRESS\f[] : Defines the maximum number of +-MSG provider CQ entries (default: 1) that would be read per progress +-(RxM CQ read). ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_COMP_PER_PROGRESS\f[] ++Defines the maximum number of MSG provider CQ entries (default: 1) that ++would be read per progress (RxM CQ read). ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_SAR_LIMIT\f[] ++Set this environment variable to control the RxM SAR (Segmentation And ++Reassembly) protocol. ++Messages of size greater than this (default: 256 Kb) would be ++transmitted via rendezvous protocol. ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_USE_SRX\f[] ++Set this to 1 to use shared receive context from MSG provider. ++This reduces overall memory usage but there may be a slight increase in ++latency (default: 0). ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_TX_SIZE\f[] ++Defines default TX context size (default: 1024) ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_RX_SIZE\f[] ++Defines default RX context size (default: 1024) ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_MSG_TX_SIZE\f[] ++Defines FI_EP_MSG TX size that would be requested (default: 128). ++.RS ++.RE ++.TP ++.B \f[I]FI_OFI_RXM_MSG_RX_SIZE\f[] ++Defines FI_EP_MSG RX size that would be requested (default: 128). ++.RS ++.RE ++.TP ++.B \f[I]FI_UNIVERSE_SIZE\f[] ++Defines the expected number of ranks / peers an endpoint would ++communicate with (default: 256). ++.RS ++.RE ++.SH Tuning ++.SS Bandwidth ++.PP ++To optimize for bandwidth, ensure you use higher values than default for ++FI_OFI_RXM_TX_SIZE, FI_OFI_RXM_RX_SIZE, FI_OFI_RXM_MSG_TX_SIZE, ++FI_OFI_RXM_MSG_RX_SIZE subject to memory limits of the system and the tx ++and rx sizes supported by the MSG provider. ++.PP ++FI_OFI_RXM_SAR_LIMIT is another knob that can be experimented with to ++optimze for bandwidth. ++.SS Memory ++.PP ++To conserve memory, ensure FI_UNIVERSE_SIZE set to what is required. ++Similarly check that FI_OFI_RXM_TX_SIZE, FI_OFI_RXM_RX_SIZE, ++FI_OFI_RXM_MSG_TX_SIZE and FI_OFI_RXM_MSG_RX_SIZE env variables are set ++to only required values. ++.SH NOTES ++.PP ++The data transfer API may return \-FI_EAGAIN during on\-demand ++connection setup of the core provider FI_MSG_EP. ++See \f[C]fi_msg\f[](3) for a detailed description of handling FI_EAGAIN. + .SH SEE ALSO + .PP + \f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_shm.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_shm.7 +index 2d76a7bf5..61b092d4f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_shm.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_shm.7 +@@ -1,4 +1,7 @@ +-.TH "fi_shm" "7" "2018\-02\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_shm" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_shm \- The SHM Fabric Provider +@@ -13,22 +16,30 @@ between processes on the same system. + .PP + This release contains an initial implementation of the SHM provider that + offers the following support: +-.PP +-\f[I]Endpoint types\f[] : The provider supports only endpoint type +-\f[I]FI_EP_RDM\f[]. +-.PP +-\f[I]Endpoint capabilities\f[] : Endpoints cna support any combinations +-of the following data transfer capabilities: \f[I]FI_MSG\f[], +-\f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[], amd \f[I]FI_ATOMICS\f[]. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only endpoint type \f[I]FI_EP_RDM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++Endpoints cna support any combinations of the following data transfer ++capabilities: \f[I]FI_MSG\f[], \f[I]FI_TAGGED\f[], \f[I]FI_RMA\f[], amd ++\f[I]FI_ATOMICS\f[]. + These capabilities can be further defined by \f[I]FI_SEND\f[], + \f[I]FI_RECV\f[], \f[I]FI_READ\f[], \f[I]FI_WRITE\f[], + \f[I]FI_REMOTE_READ\f[], and \f[I]FI_REMOTE_WRITE\f[] to limit the + direction of operations. +-.PP +-\f[I]Modes\f[] : The provider does not require the use of any mode bits. +-.PP +-\f[I]Progress\f[] : The SHM provider supports +-\f[I]FI_PROGRESS_MANUAL\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The provider does not require the use of any mode bits. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The SHM provider supports \f[I]FI_PROGRESS_MANUAL\f[]. + Receive side data buffers are not modified outside of completion + processing routines. + The provider processes messages using three different methods, based on +@@ -37,10 +48,12 @@ For messages smaller than 4096 bytes, tx completions are generated + immediately after the send. + For larger messages, tx completions are not generated until the + receiving side has processed the message. +-.PP +-\f[I]Address Format\f[] : The SHM provider uses the address format +-FI_ADDR_STR, which follows the general format pattern +-"[prefix]://[addr]". ++.RS ++.RE ++.TP ++.B \f[I]Address Format\f[] ++The SHM provider uses the address format FI_ADDR_STR, which follows the ++general format pattern "[prefix]://[addr]". + The application can provide addresses through the node or hints + parameter. + As long as the address is in a valid FI_ADDR_STR format (contains +@@ -48,6 +61,8 @@ As long as the address is in a valid FI_ADDR_STR format (contains + If the application input is incorrectly formatted or no input was + provided, the SHM provider will resolve it according to the following + SHM provider standards: ++.RS ++.RE + .PP + (flags & FI_SOURCE) ? + src_addr : dest_addr = \- if (node && service) : "fi_ns://node:service" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_sockets.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_sockets.7 +index f73ddc8cf..64acfd685 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_sockets.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_sockets.7 +@@ -1,4 +1,7 @@ +-.TH "fi_sockets" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_sockets" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_sockets \- The Sockets Fabric Provider +@@ -17,24 +20,35 @@ interfaces. + The sockets provider supports all the features defined for the libfabric + API. + Key features include: +-.PP +-\f[I]Endpoint types\f[] : The provider supports all endpoint types: +-\f[I]FI_EP_MSG\f[], \f[I]FI_EP_RDM\f[], and \f[I]FI_EP_DGRAM\f[]. +-.PP +-\f[I]Endpoint capabilities\f[] : The following data transfer interface +-is supported for a all endpoint types: \f[I]fi_msg\f[]. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports all endpoint types: \f[I]FI_EP_MSG\f[], ++\f[I]FI_EP_RDM\f[], and \f[I]FI_EP_DGRAM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The following data transfer interface is supported for a all endpoint ++types: \f[I]fi_msg\f[]. + Additionally, these interfaces are supported for reliable endpoints + (\f[I]FI_EP_MSG\f[] and \f[I]FI_EP_RDM\f[]): \f[I]fi_tagged\f[], + \f[I]fi_atomic\f[], and \f[I]fi_rma\f[]. +-.PP +-\f[I]Modes\f[] : The sockets provider supports all operational modes +-including \f[I]FI_CONTEXT\f[] and \f[I]FI_MSG_PREFIX\f[]. +-.PP +-\f[I]Progress\f[] : Sockets provider supports both +-\f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], with a +-default set to auto. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The sockets provider supports all operational modes including ++\f[I]FI_CONTEXT\f[] and \f[I]FI_MSG_PREFIX\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++Sockets provider supports both \f[I]FI_PROGRESS_AUTO\f[] and ++\f[I]FI_PROGRESS_MANUAL\f[], with a default set to auto. + When progress is set to auto, a background thread runs to ensure that + progress is made for asynchronous requests. ++.RS ++.RE + .SH LIMITATIONS + .PP + Sockets provider attempts to emulate the entire API set, including all +@@ -49,49 +63,90 @@ Does not support FI_ADDR_STR address format. + .SH RUNTIME PARAMETERS + .PP + The sockets provider checks for the following environment variables \- +-.PP +-\f[I]FI_SOCKETS_PE_WAITTIME\f[] : An integer value that specifies how +-many milliseconds to spin while waiting for progress in +-\f[I]FI_PROGRESS_AUTO\f[] mode. +-.PP +-\f[I]FI_SOCKETS_MAX_CONN_RETRY\f[] : An integer value that specifies the +-number of socket connection retries before reporting as failure. +-.PP +-\f[I]FI_SOCKETS_DEF_CONN_MAP_SZ\f[] : An integer to specify the default +-connection map size. +-.PP +-\f[I]FI_SOCKETS_DEF_AV_SZ\f[] : An integer to specify the default +-address vector size. +-.PP +-\f[I]FI_SOCKETS_DEF_CQ_SZ\f[] : An integer to specify the default +-completion queue size. +-.PP +-\f[I]FI_SOCKETS_DEF_EQ_SZ\f[] : An integer to specify the default event +-queue size. +-.PP +-\f[I]FI_SOCKETS_DGRAM_DROP_RATE\f[] : An integer value to specify the +-drop rate of dgram frame when endpoint is \f[I]FI_EP_DGRAM\f[]. ++.TP ++.B \f[I]FI_SOCKETS_PE_WAITTIME\f[] ++An integer value that specifies how many milliseconds to spin while ++waiting for progress in \f[I]FI_PROGRESS_AUTO\f[] mode. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_CONN_TIMEOUT\f[] ++An integer value that specifies how many milliseconds to wait for one ++connection establishment. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_MAX_CONN_RETRY\f[] ++An integer value that specifies the number of socket connection retries ++before reporting as failure. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DEF_CONN_MAP_SZ\f[] ++An integer to specify the default connection map size. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DEF_AV_SZ\f[] ++An integer to specify the default address vector size. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DEF_CQ_SZ\f[] ++An integer to specify the default completion queue size. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DEF_EQ_SZ\f[] ++An integer to specify the default event queue size. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_DGRAM_DROP_RATE\f[] ++An integer value to specify the drop rate of dgram frame when endpoint ++is \f[I]FI_EP_DGRAM\f[]. + This is for debugging purpose only. +-.PP +-\f[I]FI_SOCKETS_PE_AFFINITY\f[] : If specified, progress thread is bound +-to the indicated range(s) of Linux virtual processor ID(s). ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_PE_AFFINITY\f[] ++If specified, progress thread is bound to the indicated range(s) of ++Linux virtual processor ID(s). + This option is currently not supported on OS X. + The usage is \- id_start[\-id_end[:stride]][,]. +-.PP +-\f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] : A boolean to enable the keepalive +-support. +-.PP +-\f[I]FI_SOCKETS_KEEPALIVE_TIME\f[] : An integer to specify the idle time +-in seconds before sending the first keepalive probe. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] ++A boolean to enable the keepalive support. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_KEEPALIVE_TIME\f[] ++An integer to specify the idle time in seconds before sending the first ++keepalive probe. + Only relevant if \f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] is enabled. +-.PP +-\f[I]FI_SOCKETS_KEEPALIVE_INTVL\f[] : An integer to specify the time in +-seconds between individual keepalive probes. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_KEEPALIVE_INTVL\f[] ++An integer to specify the time in seconds between individual keepalive ++probes. + Only relevant if \f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] is enabled. +-.PP +-\f[I]FI_SOCKETS_KEEPALIVE_PROBES\f[] : An integer to specify the maximum +-number of keepalive probes sent before dropping the connection. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_KEEPALIVE_PROBES\f[] ++An integer to specify the maximum number of keepalive probes sent before ++dropping the connection. + Only relevant if \f[I]FI_SOCKETS_KEEPALIVE_ENABLE\f[] is enabled. ++.RS ++.RE ++.TP ++.B \f[I]FI_SOCKETS_IFACE\f[] ++The prefix or the name of the network interface (default: any) ++.RS ++.RE + .SH LARGE SCALE JOBS + .PP + For large scale runs one can use these environment variables to set the +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_tcp.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_tcp.7 +new file mode 100644 +index 000000000..0963b3994 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_tcp.7 +@@ -0,0 +1,44 @@ ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_tcp" "7" "2018\-10\-29" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy ++.SH NAME ++.PP ++fi_tcp \- The msg sockets Fabric Provider ++.SH OVERVIEW ++.PP ++The tcp provider can be used on any system that supports TCP sockets. ++The provider is not intended to provide performance improvements over ++regular TCP sockets, but rather to allow developers to write, test,and ++debug application code even on platforms that do not have ++high\-performance fabric hardware. ++.SH SUPPORTED FEATURES ++.PP ++The following features are supported ++.TP ++.B \f[I]Endpoint types\f[] ++\f[I]FI_EP_MSG\f[] is the only supported endpoint type. ++Reliable datagram endpoint over TCP sockets can be achieved by layering ++RxM over tcp provider. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The tcp provider currently supports \f[I]FI_MSG\f[], \f[I]FI_RMA\f[] ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++Currently tcp provider supports only \f[I]FI_PROGRESS_MANUAL\f[] ++.RS ++.RE ++.SH LIMITATIONS ++.PP ++tcp provider is implemented over TCP sockets to emulate libfabric API. ++Hence the performance is lower than what an application might see ++implementing to sockets directly. ++.SH SEE ALSO ++.PP ++\f[C]fabric\f[](7), \f[C]fi_provider\f[](7), \f[C]fi_getinfo\f[](3) ++.SH AUTHORS ++OpenFabrics. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_udp.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_udp.7 +index 54d85276c..5da716a7b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_udp.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_udp.7 +@@ -1,4 +1,7 @@ +-.TH "fi_udp" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_udp" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_udp \- The UDP Fabric Provider +@@ -15,22 +18,31 @@ the implementation of libfabric features over any hardware. + .PP + The UDP provider supports a minimal set of features useful for sending + and receiving datagram messages over an unreliable endpoint. +-.PP +-\f[I]Endpoint types\f[] : The provider supports only endpoint type +-\f[I]FI_EP_DGRAM\f[]. +-.PP +-\f[I]Endpoint capabilities\f[] : The following data transfer interface +-is supported: \f[I]fi_msg\f[]. ++.TP ++.B \f[I]Endpoint types\f[] ++The provider supports only endpoint type \f[I]FI_EP_DGRAM\f[]. ++.RS ++.RE ++.TP ++.B \f[I]Endpoint capabilities\f[] ++The following data transfer interface is supported: \f[I]fi_msg\f[]. + The provider supports standard unicast datagram transfers, as well as + multicast operations. +-.PP +-\f[I]Modes\f[] : The provider does not require the use of any mode bits. +-.PP +-\f[I]Progress\f[] : The UDP provider supports both +-\f[I]FI_PROGRESS_AUTO\f[] and \f[I]FI_PROGRESS_MANUAL\f[], with a +-default set to auto. ++.RS ++.RE ++.TP ++.B \f[I]Modes\f[] ++The provider does not require the use of any mode bits. ++.RS ++.RE ++.TP ++.B \f[I]Progress\f[] ++The UDP provider supports both \f[I]FI_PROGRESS_AUTO\f[] and ++\f[I]FI_PROGRESS_MANUAL\f[], with a default set to auto. + However, receive side data buffers are not modified outside of + completion processing routines. ++.RS ++.RE + .SH LIMITATIONS + .PP + The UDP provider has hard\-coded maximums for supported queue sizes and +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_usnic.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_usnic.7 +index 40eb9b4ce..c75126f9c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_usnic.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_usnic.7 +@@ -1,4 +1,7 @@ +-.TH "fi_usnic" "7" "2017\-12\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_usnic" "7" "2018\-10\-05" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_usnic \- The usNIC Fabric Provider +@@ -161,13 +164,22 @@ int\ getinfo(uint32_t\ version,\ struct\ fid_fabric\ *fabric, + \ \ \ \ \ \ \ \ struct\ fi_usnic_info\ *info); + \f[] + .fi +-.PP +-\f[I]version\f[] : Version of getinfo to be used +-.PP +-\f[I]fabric\f[] : Fabric descriptor +-.PP +-\f[I]info\f[] : Upon successful return, this parameter will contain +-information about the fabric. ++.TP ++.B \f[I]version\f[] ++Version of getinfo to be used ++.RS ++.RE ++.TP ++.B \f[I]fabric\f[] ++Fabric descriptor ++.RS ++.RE ++.TP ++.B \f[I]info\f[] ++Upon successful return, this parameter will contain information about ++the fabric. ++.RS ++.RE + .IP \[bu] 2 + Version 2 + .IP +@@ -327,14 +339,23 @@ vector extension operations. + int\ get_distance(struct\ fid_av\ *av,\ void\ *addr,\ int\ *metric); + \f[] + .fi +-.PP +-\f[I]av\f[] : Address vector +-.PP +-\f[I]addr\f[] : Destination address +-.PP +-\f[I]metric\f[] : On output this will contain \f[C]\-1\f[] if the +-destination host is unreachable, \f[C]0\f[] is the destination host is +-locally connected, and \f[C]1\f[] otherwise. ++.TP ++.B \f[I]av\f[] ++Address vector ++.RS ++.RE ++.TP ++.B \f[I]addr\f[] ++Destination address ++.RS ++.RE ++.TP ++.B \f[I]metric\f[] ++On output this will contain \f[C]\-1\f[] if the destination host is ++unreachable, \f[C]0\f[] is the destination host is locally connected, ++and \f[C]1\f[] otherwise. ++.RS ++.RE + .PP + See fi_ext_usnic.h for more details. + .SH VERSION DIFFERENCES +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_verbs.7 b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_verbs.7 +index db15d5eb6..f62db5960 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_verbs.7 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/man/man7/fi_verbs.7 +@@ -1,4 +1,7 @@ +-.TH "fi_verbs" "7" "2018\-03\-01" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.\" Automatically generated by Pandoc 1.19.2.4 ++.\" ++.TH "fi_verbs" "7" "2018\-12\-19" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" ++.hy + .SH NAME + .PP + fi_verbs \- The Verbs Fabric Provider +@@ -158,84 +161,141 @@ should not be used in the forked process. + The memory registered using fi_mr_reg has to be page aligned since + ibv_reg_mr marks the entire page that a memory region belongs to as not + to be re\-mapped when the process is forked (MADV_DONTFORK). ++.SS XRC Transport ++.PP ++The XRC transport is intended to be used when layered with the RXM ++provider and requires the use of shared receive contexts. ++See \f[C]fi_rxm\f[](7). + .SH RUNTIME PARAMETERS + .PP + The verbs provider checks for the following environment variables. + .SS Common variables: +-.PP +-\f[I]FI_VERBS_TX_SIZE\f[] : Default maximum tx context size (default: +-384) +-.PP +-\f[I]FI_VERBS_RX_SIZE\f[] : Default maximum rx context size (default: +-384) +-.PP +-\f[I]FI_VERBS_TX_IOV_LIMIT\f[] : Default maximum tx iov_limit (default: +-4). ++.TP ++.B \f[I]FI_VERBS_TX_SIZE\f[] ++Default maximum tx context size (default: 384) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RX_SIZE\f[] ++Default maximum rx context size (default: 384) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_TX_IOV_LIMIT\f[] ++Default maximum tx iov_limit (default: 4). + Note: RDM (internal \- deprecated) EP type supports only 1 +-.PP +-\f[I]FI_VERBS_RX_IOV_LIMIT\f[] : Default maximum rx iov_limit (default: +-4). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RX_IOV_LIMIT\f[] ++Default maximum rx iov_limit (default: 4). + Note: RDM (internal \- deprecated) EP type supports only 1 +-.PP +-\f[I]FI_VERBS_INLINE_SIZE\f[] : Default maximum inline size. ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_INLINE_SIZE\f[] ++Default maximum inline size. + Actual inject size returned in fi_info may be greater (default: 64) +-.PP +-\f[I]FI_VERBS_MIN_RNR_TIMER\f[] : Set min_rnr_timer QP attribute (0 \- +-31) (default: 12) +-.PP +-\f[I]FI_VERBS_USE_ODP\f[] : Enable On\-Demand\-Paging (ODP) experimental +-feature. ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_MIN_RNR_TIMER\f[] ++Set min_rnr_timer QP attribute (0 \- 31) (default: 12) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_USE_ODP\f[] ++Enable On\-Demand\-Paging (ODP) experimental feature. + The feature is supported only on Mellanox OFED (default: 0) +-.PP +-\f[I]FI_VERBS_CQREAD_BUNCH_SIZE\f[] : The number of entries to be read +-from the verbs completion queue at a time (default: 8). +-.PP +-\f[I]FI_VERBS_IFACE\f[] : The prefix or the full name of the network +-interface associated with the verbs device (default: ib) +-.PP +-\f[I]FI_VERBS_MR_CACHE_ENABLE\f[] : Enable Memory Registration caching +-(default: 0) +-.PP +-\f[I]FI_VERBS_MR_MAX_CACHED_CNT\f[] : Maximum number of cache entries +-(default: 4096) +-.PP +-\f[I]FI_VERBS_MR_MAX_CACHED_SIZE\f[] : Maximum total size of cache +-entries (default: 4 GB) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_CQREAD_BUNCH_SIZE\f[] ++The number of entries to be read from the verbs completion queue at a ++time (default: 8). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_IFACE\f[] ++The prefix or the full name of the network interface associated with the ++verbs device (default: ib) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_MR_CACHE_ENABLE\f[] ++Enable Memory Registration caching (default: 0) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_MR_MAX_CACHED_CNT\f[] ++Maximum number of cache entries (default: 4096) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_MR_MAX_CACHED_SIZE\f[] ++Maximum total size of cache entries (default: 4 GB) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_PREFER_XRC\f[] ++Prioritize XRC transport fi_info before RC transport fi_info (default: ++0, RC fi_info will be before XRC fi_info) ++.RS ++.RE + .SS Variables specific to RDM (internal \- deprecated) endpoints +-.PP +-\f[I]FI_VERBS_RDM_BUFFER_NUM\f[] : The number of pre\-registered buffers +-for buffered operations between the endpoints, must be a power of 2 +-(default: 8). +-.PP +-\f[I]FI_VERBS_RDM_BUFFER_SIZE\f[] : The maximum size of a buffered +-operation (bytes) (default: platform specific). +-.PP +-\f[I]FI_VERBS_RDM_RNDV_SEG_SIZE\f[] : The segment size for zero copy +-protocols (bytes)(default: 1073741824). +-.PP +-\f[I]FI_VERBS_RDM_THREAD_TIMEOUT\f[] : The wake up timeout of the helper +-thread (usec) (default: 100). +-.PP +-\f[I]FI_VERBS_RDM_EAGER_SEND_OPCODE\f[] : The operation code that will +-be used for eager messaging. ++.TP ++.B \f[I]FI_VERBS_RDM_BUFFER_NUM\f[] ++The number of pre\-registered buffers for buffered operations between ++the endpoints, must be a power of 2 (default: 8). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_BUFFER_SIZE\f[] ++The maximum size of a buffered operation (bytes) (default: platform ++specific). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_RNDV_SEG_SIZE\f[] ++The segment size for zero copy protocols (bytes)(default: 1073741824). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_THREAD_TIMEOUT\f[] ++The wake up timeout of the helper thread (usec) (default: 100). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_EAGER_SEND_OPCODE\f[] ++The operation code that will be used for eager messaging. + Only IBV_WR_SEND and IBV_WR_RDMA_WRITE_WITH_IMM are supported. + The last one is not applicable for iWarp. + (default: IBV_WR_SEND) +-.PP +-\f[I]FI_VERBS_RDM_CM_THREAD_AFFINITY\f[] : If specified, bind the CM +-thread to the indicated range(s) of Linux virtual processor ID(s). ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_RDM_CM_THREAD_AFFINITY\f[] ++If specified, bind the CM thread to the indicated range(s) of Linux ++virtual processor ID(s). + This option is currently not supported on OS X. + Usage: id_start[\-id_end[:stride]][,] ++.RS ++.RE + .SS Variables specific to DGRAM endpoints +-.PP +-\f[I]FI_VERBS_DGRAM_USE_NAME_SERVER\f[] : The option that +-enables/disables OFI Name Server thread. ++.TP ++.B \f[I]FI_VERBS_DGRAM_USE_NAME_SERVER\f[] ++The option that enables/disables OFI Name Server thread. + The NS thread is used to resolve IP\-addresses to provider specific + addresses (default: 1, if "OMPI_COMM_WORLD_RANK" and "PMI_RANK" + environment variables aren\[aq]t defined) +-.PP +-\f[I]FI_VERBS_NAME_SERVER_PORT\f[] : The port on which Name Server +-thread listens incoming connections and requests (default: 5678) ++.RS ++.RE ++.TP ++.B \f[I]FI_VERBS_NAME_SERVER_PORT\f[] ++The port on which Name Server thread listens incoming connections and ++requests (default: 5678) ++.RS ++.RE + .SS Environment variables notes + .PP + The fi_info utility would give the up\-to\-date information on +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/pingpong.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/pingpong.vcxproj +old mode 100644 +new mode 100755 +index 261624538..2e65c22b8 +--- a/src/mpid/ch4/netmod/ofi/libfabric/pingpong.vcxproj ++++ b/src/mpid/ch4/netmod/ofi/libfabric/pingpong.vcxproj +@@ -30,8 +30,8 @@ + {DBBD5F92-1E78-40ED-8D64-F958D0EF12B2} + Win32Proj + pingpong +- 8.1 + ++ + + + Application +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/fi_ext_gni.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/fi_ext_gni.h +index fc004d157..26939de34 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/fi_ext_gni.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/fi_ext_gni.h +@@ -166,8 +166,9 @@ struct fi_gni_auth_key { + }; + }; + +-#define GNIX_PROV_DEFAULT_AUTH_KEY NULL +-#define GNIX_PROV_DEFAULT_AUTH_KEYLEN 0 ++extern uint8_t* gnix_default_auth_key; ++#define GNIX_PROV_DEFAULT_AUTH_KEY gnix_default_auth_key ++#define GNIX_PROV_DEFAULT_AUTH_KEYLEN sizeof(struct fi_gni_auth_key) + + #define FI_GNI_FAB_OPS_2 "fab ops 2" + struct fi_gni_auth_key_ops_fab { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_ep.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_ep.h +index c83867940..7bad7704a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_ep.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_ep.h +@@ -405,6 +405,17 @@ int gnix_scalable_ep_bind(fid_t fid, struct fid *bfid, uint64_t flags); + */ + int gnix_pep_bind(fid_t fid, struct fid *bfid, uint64_t flags); + ++/** ++ * Cancels a transaction posted to an endpoint, if possible. ++ * ++ * @param[in] fid the endpoint ++ * @param[in] context context of the transaction to be canceled ++ * ++ * @return FI_SUCCESS upon successfully canceling transaction ++ * @return -FI_ENONT no entry to cancel ++ */ ++ssize_t gnix_cancel(fid_t fid, void *context); ++ + DIRECT_FN int gnix_ep_atomic_valid(struct fid_ep *ep, + enum fi_datatype datatype, + enum fi_op op, size_t *count); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_vc.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_vc.h +index 52955dc9d..ae9055d93 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_vc.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/include/gnix_vc.h +@@ -101,6 +101,7 @@ enum gnix_vc_conn_req_type { + * associated + * @var smsg_mbox pointer to GNI SMSG mailbox used by this VC + * to exchange SMSG messages with its peer ++ * @var gnix_ep_name cache for storing remote endpoint name + * @var gni_ep GNI endpoint for this VC + * @var outstanding_fab_reqs Count of outstanding libfabric level requests + * associated with this endpoint. +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_auth_key.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_auth_key.c +index 697884f32..c1e6f8c99 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_auth_key.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_auth_key.c +@@ -60,6 +60,8 @@ typedef enum gnix_global_auth_info_version { + + static char *gnix_default_ak_path = GNIX_DEFAULT_AK_PATH; + ++uint8_t* gnix_default_auth_key = NULL; ++ + struct gnix_global_ptag_info { + gnix_bitmap_t prov; + gnix_bitmap_t user; +@@ -386,24 +388,20 @@ int _gnix_auth_key_insert( + return -FI_EINVAL; + } + +- if (auth_key_size == GNIX_PROV_DEFAULT_AUTH_KEYLEN) +- key = 0; +- else { +- if (!auth_key) { +- GNIX_INFO(FI_LOG_FABRIC, "auth key is null\n"); +- return -FI_EINVAL; +- } ++ if (!auth_key) { ++ GNIX_INFO(FI_LOG_FABRIC, "auth key is null\n"); ++ return -FI_EINVAL; ++ } + +- switch (gni_auth_key->type) { +- case GNIX_AKT_RAW: +- key = (gnix_ht_key_t) gni_auth_key->raw.protection_key; +- break; +- default: +- GNIX_INFO(FI_LOG_FABRIC, "unrecognized auth key " +- "type, type=%d\n", +- gni_auth_key->type); +- return -FI_EINVAL; +- } ++ switch (gni_auth_key->type) { ++ case GNIX_AKT_RAW: ++ key = (gnix_ht_key_t) gni_auth_key->raw.protection_key; ++ break; ++ default: ++ GNIX_INFO(FI_LOG_FABRIC, "unrecognized auth key " ++ "type, type=%d\n", ++ gni_auth_key->type); ++ return -FI_EINVAL; + } + + ret = _gnix_ht_insert(&__gnix_auth_key_ht, key, to_insert); +@@ -438,26 +436,19 @@ _gnix_auth_key_lookup(uint8_t *auth_key, size_t auth_key_size) + struct gnix_auth_key *ptr = NULL; + struct fi_gni_auth_key *gni_auth_key = NULL; + +- if (auth_key_size == GNIX_PROV_DEFAULT_AUTH_KEYLEN) { +- key = 0; +- } else { +- if (!auth_key) { +- GNIX_INFO(FI_LOG_FABRIC, +- "null auth key provided, cannot find entry\n"); +- return NULL; +- } +- +- gni_auth_key = (struct fi_gni_auth_key *) auth_key; +- switch (gni_auth_key->type) { +- case GNIX_AKT_RAW: +- key = (gnix_ht_key_t) gni_auth_key->raw.protection_key; +- break; +- default: +- GNIX_INFO(FI_LOG_FABRIC, "unrecognized auth key type, " +- "type=%d\n", gni_auth_key->type); +- return NULL; +- } ++ if (auth_key == NULL || auth_key_size == 0) { ++ auth_key = gnix_default_auth_key; ++ } + ++ gni_auth_key = (struct fi_gni_auth_key *) auth_key; ++ switch (gni_auth_key->type) { ++ case GNIX_AKT_RAW: ++ key = (gnix_ht_key_t) gni_auth_key->raw.protection_key; ++ break; ++ default: ++ GNIX_INFO(FI_LOG_FABRIC, "unrecognized auth key type, " ++ "type=%d\n", gni_auth_key->type); ++ return NULL; + } + + ptr = (struct gnix_auth_key *) _gnix_ht_lookup( +@@ -484,11 +475,18 @@ int _gnix_auth_key_subsys_init(void) + ret = _gnix_ht_init(&__gnix_auth_key_ht, &attr); + assert(ret == FI_SUCCESS); + ++ struct fi_gni_auth_key *gni_auth_key = calloc(1, sizeof(*gni_auth_key)); ++ gni_auth_key->type = GNIX_AKT_RAW; ++ gni_auth_key->raw.protection_key = 0; ++ gnix_default_auth_key = (uint8_t *) gni_auth_key; ++ + return ret; + } + + int _gnix_auth_key_subsys_fini(void) + { ++ free(gnix_default_auth_key); ++ + return FI_SUCCESS; + } + +@@ -503,10 +501,15 @@ struct gnix_auth_key *_gnix_auth_key_create( + uint8_t ptag; + uint32_t cookie; + +- if (auth_key_size == GNIX_PROV_DEFAULT_AUTH_KEYLEN) { ++ if (auth_key == NULL || auth_key_size == 0) { ++ auth_key = gnix_default_auth_key; ++ } ++ ++ gni_auth_key = (struct fi_gni_auth_key *) auth_key; ++ if (auth_key == gnix_default_auth_key) { + gnixu_get_rdma_credentials(NULL, &ptag, &cookie); ++ gni_auth_key->raw.protection_key = cookie; + } else { +- gni_auth_key = (struct fi_gni_auth_key *) auth_key; + switch (gni_auth_key->type) { + case GNIX_AKT_RAW: + cookie = gni_auth_key->raw.protection_key; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_av.c +index ea6d200f2..bbc8a55aa 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_av.c +@@ -173,7 +173,7 @@ static int table_insert(struct gnix_fid_av *av_priv, const void *addr, + /* check if this ep_name fits in the av context bits */ + if (ep_name.name_type & GNIX_EPN_TYPE_SEP) { + if ((1 << av_priv->rx_ctx_bits) < ep_name.rx_ctx_cnt) { +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = -FI_EINVAL; + fi_addr[i] = FI_ADDR_NOTAVAIL; + ret = -FI_EINVAL; +@@ -196,7 +196,7 @@ static int table_insert(struct gnix_fid_av *av_priv, const void *addr, + if (fi_addr) + fi_addr[i] = index; + +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = FI_SUCCESS; + } + } +@@ -335,7 +335,7 @@ static int map_insert(struct gnix_fid_av *av_priv, const void *addr, + /* check if this ep_name fits in the av context bits */ + if (ep_name.name_type & GNIX_EPN_TYPE_SEP) { + if ((1 << av_priv->rx_ctx_bits) < ep_name.rx_ctx_cnt) { +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = -FI_EINVAL; + fi_addr[i] = FI_ADDR_NOTAVAIL; + ret_cnt = -FI_EINVAL; +@@ -360,7 +360,7 @@ static int map_insert(struct gnix_fid_av *av_priv, const void *addr, + key, + the_entry); + +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = FI_SUCCESS; + } + +@@ -372,7 +372,7 @@ static int map_insert(struct gnix_fid_av *av_priv, const void *addr, + GNIX_WARN(FI_LOG_AV, + "_gnix_ht_insert failed %d\n", + ret); +- if (flags && FI_SYNC_ERR) { ++ if (flags & FI_SYNC_ERR) { + entry_err[i] = ret; + fi_addr[i] = FI_ADDR_NOTAVAIL; + ret_cnt = ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_cq.c +index bd9ddc52d..07d9565c8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_cq.c +@@ -351,6 +351,9 @@ ssize_t _gnix_cq_add_error(struct gnix_fid_cq *cq, void *op_context, + + _gnix_queue_enqueue(cq->errors, &event->item); + ++ if (cq->wait) ++ _gnix_signal_wait_obj(cq->wait); ++ + err: + COND_RELEASE(cq->requires_lock, &cq->lock); + +@@ -455,7 +458,7 @@ static ssize_t __gnix_cq_readfrom(struct fid_cq *cq, void *buf, + assert(event->the_entry); + memcpy(buf, event->the_entry, cq_priv->entry_size); + if (src_addr) +- memcpy(src_addr, &event->src_addr, sizeof(fi_addr_t)); ++ memcpy(&src_addr[read_count], &event->src_addr, sizeof(fi_addr_t)); + + _gnix_queue_enqueue_free(cq_priv->events, &event->item); + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_ep.c +index 6d8b093e9..219084ced 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_ep.c +@@ -2888,6 +2888,8 @@ DIRECT_FN STATIC ssize_t gnix_ep_cancel(fid_t fid, void *context) + ssize_t gnix_cancel(fid_t fid, void *context) + { + ssize_t ret; ++ struct gnix_fid_ep *ep; ++ struct gnix_fid_trx *trx_ep; + + GNIX_TRACE(FI_LOG_EP_CTRL, "\n"); + +@@ -2896,10 +2898,14 @@ ssize_t gnix_cancel(fid_t fid, void *context) + ret = gnix_ep_cancel(fid, context); + break; + +- /* not supported yet */ + case FI_CLASS_RX_CTX: +- case FI_CLASS_SRX_CTX: + case FI_CLASS_TX_CTX: ++ trx_ep = container_of(fid, struct gnix_fid_trx, ep_fid); ++ ep = trx_ep->ep; ++ ret = gnix_ep_cancel(&ep->ep_fid.fid, context); ++ break; ++ /* not supported yet */ ++ case FI_CLASS_SRX_CTX: + case FI_CLASS_STX_CTX: + return -FI_ENOENT; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_fabric.c +index 77b2f4eae..9524855cc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_fabric.c +@@ -722,7 +722,7 @@ static void gnix_fini(void) + struct fi_provider gnix_prov = { + .name = gnix_prov_name, + .version = FI_VERSION(GNI_MAJOR_VERSION, GNI_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = gnix_getinfo, + .fabric = gnix_fabric_open, + .cleanup = gnix_fini +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_mbox_allocator.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_mbox_allocator.c +index 2e8b7fa5e..b9896b7b5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_mbox_allocator.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_mbox_allocator.c +@@ -39,6 +39,7 @@ + + #include "gnix_mbox_allocator.h" + #include "gnix_nic.h" ++#include "fi_ext_gni.h" + + /** + * Will attempt to find a directory in the hugetlbfs with the given page size. +@@ -299,6 +300,7 @@ static int __create_slab(struct gnix_mbox_alloc_handle *handle) + int vmdh_index = -1; + int flags = GNI_MEM_READWRITE; + struct gnix_auth_key *info; ++ struct fi_gni_auth_key key; + + GNIX_TRACE(FI_LOG_EP_CTRL, "\n"); + +@@ -343,8 +345,10 @@ static int __create_slab(struct gnix_mbox_alloc_handle *handle) + + COND_ACQUIRE(handle->nic_handle->requires_lock, &handle->nic_handle->lock); + if (handle->nic_handle->using_vmdh) { +- info = _gnix_auth_key_lookup(GNIX_PROV_DEFAULT_AUTH_KEY, +- GNIX_PROV_DEFAULT_AUTH_KEYLEN); ++ key.type = GNIX_AKT_RAW; ++ key.raw.protection_key = handle->nic_handle->cookie; ++ ++ info = _gnix_auth_key_lookup((uint8_t *) &key, sizeof(key)); + assert(info); + + if (!handle->nic_handle->mdd_resources_set) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_msg.c +index 80e6e9dfa..4645d589c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_msg.c +@@ -1,6 +1,6 @@ + /* + * Copyright (c) 2015-2017 Cray Inc. All rights reserved. +- * Copyright (c) 2015-2017 Los Alamos National Security, LLC. ++ * Copyright (c) 2015-2018 Los Alamos National Security, LLC. + * All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -400,11 +400,15 @@ static int __recv_completion_src( + fi_addr_t src_addr) + { + ssize_t rc; ++ char *buffer; + + GNIX_DBG_TRACE(FI_LOG_TRACE, "\n"); + + if ((req->msg.recv_flags & FI_COMPLETION) && ep->recv_cq) { + if (src_addr == FI_ADDR_NOTAVAIL) { ++ buffer = malloc(GNIX_CQ_MAX_ERR_DATA_SIZE); ++ memcpy(buffer, req->vc->gnix_ep_name, ++ sizeof(struct gnix_ep_name)); + rc = _gnix_cq_add_error(ep->recv_cq, + req->user_context, + flags, +@@ -415,7 +419,7 @@ static int __recv_completion_src( + 0, + FI_EADDRNOTAVAIL, + 0, +- req->vc->gnix_ep_name, ++ buffer, + sizeof(struct gnix_ep_name)); + } else { + rc = _gnix_cq_add_event(ep->recv_cq, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_nic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_nic.c +index 9a17d89f4..f23b0d251 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_nic.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_nic.c +@@ -44,6 +44,7 @@ + #include "gnix_vc.h" + #include "gnix_mbox_allocator.h" + #include "gnix_util.h" ++#include "fi_ext_gni.h" + + /* + * TODO: make this a domain parameter +@@ -204,6 +205,7 @@ static int __nic_setup_irq_cq(struct gnix_nic *nic) + int vmdh_index = -1; + int flags = GNI_MEM_READWRITE; + struct gnix_auth_key *info; ++ struct fi_gni_auth_key key; + + len = (size_t)sysconf(_SC_PAGESIZE); + +@@ -224,8 +226,10 @@ static int __nic_setup_irq_cq(struct gnix_nic *nic) + memset(mmap_addr, 0x0, len); + + if (nic->using_vmdh) { +- info = _gnix_auth_key_lookup(GNIX_PROV_DEFAULT_AUTH_KEY, +- GNIX_PROV_DEFAULT_AUTH_KEYLEN); ++ key.type = GNIX_AKT_RAW; ++ key.raw.protection_key = nic->cookie; ++ ++ info = _gnix_auth_key_lookup((uint8_t *) &key, sizeof(key)); + assert(info); + + if (!nic->mdd_resources_set) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_sep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_sep.c +index 1e67c3c16..d80530aae 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_sep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_sep.c +@@ -1597,7 +1597,7 @@ static struct fi_ops gnix_sep_fi_ops = { + + static struct fi_ops_ep gnix_sep_ops = { + .size = sizeof(struct fi_ops_ep), +- .cancel = fi_no_cancel, ++ .cancel = gnix_cancel, + .getopt = fi_no_getopt, + .setopt = fi_no_setopt, + .tx_ctx = gnix_sep_tx_ctx, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_vc.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_vc.c +index 5c6b8d477..5dbe682dd 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_vc.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_vc.c +@@ -53,6 +53,7 @@ + #include "gnix_trigger.h" + #include "gnix_vector.h" + #include "gnix_xpmem.h" ++#include "gnix_cq.h" + + /* + * forward declarations and local struct defs. +@@ -961,9 +962,12 @@ static int __gnix_vc_hndl_conn_req(struct gnix_cm_nic *cm_nic, + + dlist_insert_tail(&vc->list, &ep->unmapped_vcs); + ++ /* ++ * see issue 4521 for the error_data size allocated ++ */ + if (vc->ep->caps & FI_SOURCE) { + error_data = +- calloc(1, sizeof(*error_data)); ++ calloc(1, GNIX_CQ_MAX_ERR_DATA_SIZE); + if (error_data == NULL) { + ret = -FI_ENOMEM; + goto err; +@@ -1506,6 +1510,7 @@ int _gnix_vc_alloc(struct gnix_fid_ep *ep_priv, + if (ret != FI_SUCCESS) + goto err; + vc_ptr->vc_id = remote_id; ++ vc_ptr->gnix_ep_name = NULL; + + *vc = vc_ptr; + +@@ -1637,6 +1642,11 @@ int _gnix_vc_destroy(struct gnix_vc *vc) + + _gnix_free_bitmap(&vc->flags); + ++ if (vc->gnix_ep_name != NULL) { ++ free(vc->gnix_ep_name); ++ vc->gnix_ep_name = NULL; ++ } ++ + /* + * put VC back on the freelist + */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_xpmem.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_xpmem.c +index 825b67fb0..180350562 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_xpmem.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/src/gnix_xpmem.c +@@ -14,7 +14,7 @@ + * conditions are met: + * + * - Redistributions of source code must retain the above +- * opyright notice, this list of conditions and the following ++ * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/allocator.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/allocator.c +index 6b30b73a1..7776bb068 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/allocator.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/allocator.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Los Alamos National Security, LLC. All rights reserved. ++ * Copyright (c) 2015-2018 Los Alamos National Security, LLC. All rights reserved. + * Copyright (c) 2015-2017 Cray Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -128,9 +128,14 @@ static ptrdiff_t abs_value(ptrdiff_t x) + return x * ((x > 0) - (x < 0)); + } + ++#ifndef __aarch64__ + /* + * Open /proc/self/maps and count the number of times the hugetlbfs + * string is present. Return value is the count; ++ * ++ * TODO: this approach doesn't work on Cray ARM systems. Large ++ * page regions don't show being backed by files in ++ * /var/lib/hugetlbfs. Need to fix with something better. + */ + static int verify_hugepages(void) + { +@@ -162,6 +167,7 @@ static int verify_hugepages(void) + + return ret; + } ++#endif + + /* + * Open an allocator with the given parameters and immediately close it. Verify +@@ -185,13 +191,17 @@ static void open_close_allocator(enum gnix_page_size page_size, + return; + } + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_create failed5."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif + } + + +@@ -264,8 +274,10 @@ static inline void __alloc_mbox(void) + *value is 4 because the provider has internally already opened + * an mbox allocator and 2 rdma slabs at this point. + */ ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + ret = _gnix_mbox_alloc(allocator, &mail_box); + cr_expect_eq(ret, FI_SUCCESS, "_gnix_mbox_alloc failed."); +@@ -307,8 +319,11 @@ static inline void __alloc_mbox(void) + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); + ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif ++ + } + + Test(mbox_creation_basic, alloc_mbox) +@@ -338,8 +353,10 @@ static inline void __page_size_fail(void) + *value is 3 because the provider has internally already opened + * an mbox allocator and two other slabs at this point. + */ ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "Huge page open, but shouldn't be"); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, -FI_EINVAL, +@@ -369,8 +386,10 @@ static inline void __mbox_size_fail(void) + "Creating allocator with zero mbox size succeeded."); + + cr_assert_eq(allocator, NULL); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "Huge page open, but shouldn't be"); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, -FI_EINVAL, +@@ -399,8 +418,10 @@ static inline void __mpmmap_size_fail(void) + cr_assert_eq(ret, -FI_EINVAL, + "Creating allocator with zero mailboxes per mmap succeeded."); + cr_assert_eq(allocator, NULL); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "Huge page open, but shouldn't be"); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, -FI_EINVAL, +@@ -428,8 +449,10 @@ static inline void __null_allocator_fail(void) + 1000, 100, NULL); + cr_assert_eq(ret, -FI_EINVAL, + "Creating allocator with null allocator succeeded."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "Huge page open, but shouldn't be"); ++#endif + + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, -FI_EINVAL, +@@ -461,8 +484,10 @@ static inline void __multi_allocation(void) + ret = _gnix_mbox_allocator_create(ep_priv->nic, NULL, GNIX_PAGE_4MB, + mbox_size, array_size, &allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_create failed2."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + /* + * Create an array of mailboxes of size array_size. +@@ -501,8 +526,10 @@ static inline void __multi_allocation(void) + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); + ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif + } + + Test(mbox_creation_basic, multi_allocation) +@@ -527,8 +554,10 @@ static inline void __check_errors(void) + ret = _gnix_mbox_allocator_create(ep_priv->nic, NULL, GNIX_PAGE_4MB, + 1000, 12000, &allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_create failed3"); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + ret = _gnix_mbox_alloc(allocator, &mail_box); + cr_expect_eq(ret, FI_SUCCESS, "_gnix_mbox_alloc failed."); +@@ -565,8 +594,10 @@ static inline void __check_errors(void) + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); + ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif + } + + Test(mbox_creation_basic, check_errors) +@@ -598,8 +629,10 @@ static inline void __two_slabs(void) + ret = _gnix_mbox_allocator_create(ep_priv->nic, NULL, GNIX_PAGE_4MB, + mbox_size, mpmmap, &allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_create failed4."); ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 2 + ALLOCD_WITH_NIC, + "memory not found in /proc/self/maps."); ++#endif + + /* + * Should use previously allocated slab +@@ -633,8 +666,10 @@ static inline void __two_slabs(void) + ret = _gnix_mbox_allocator_destroy(allocator); + cr_assert_eq(ret, FI_SUCCESS, "_gnix_mbox_allocator_destroy failed."); + ++#ifndef __aarch64__ + cr_expect_eq(verify_hugepages(), 1 + ALLOCD_WITH_NIC, + "memory not released in /proc/self/maps."); ++#endif + } + + Test(mbox_creation_basic, two_slabs) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/sep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/sep.c +index 05e01c7f2..630024281 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/sep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/gni/test/sep.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Los Alamos National Security, LLC. ++ * Copyright (c) 2015-2018 Los Alamos National Security, LLC. + * All rights reserved. + * Copyright (c) 2015-2017 Cray Inc. All rights reserved. + * +@@ -1368,7 +1368,8 @@ void sep_read(int index, int len) + } + + cr_assert_eq(ret, 1); +- sep_check_tcqe(&cqe, (void *)READ_CTX, FI_RMA | FI_READ, 0, tx_ep[0][index]); ++ sep_check_tcqe(&cqe, (void *)READ_CTX, FI_RMA | FI_READ, 0, ++ tx_ep[0][index]); + + r[0] = 1; + sep_check_cntrs(w, r, w_e, r_e, false); +@@ -2146,6 +2147,68 @@ void sep_invalid_fetch_atomic(enum fi_datatype dt, enum fi_op op) + } + } + ++static void cancel_sep_send_sep(int index) ++{ ++ ssize_t ret, len = 16; ++ struct fi_cq_err_entry buf; ++ ++ sep_init_data(source, len, 0xab + index); ++ sep_init_data(target, len, 0); ++ ++ ret = fi_send(tx_ep[0][index], source, len, loc_mr[0], ++ rx_addr[index], target); ++ cr_assert(ret == 0, "fi_send failed err:%ld", ret); ++ ++ ret = fi_cancel(&tx_ep[0][index]->fid, target); ++ fprintf(stderr, "ret = %d %s\n", ret, fi_strerror(-ret)); ++ cr_assert(ret == FI_SUCCESS, "fi_cancel failed"); ++ ++ /* check for event */ ++ ret = fi_cq_readerr(tx_cq[0][index], &buf, FI_SEND); ++ cr_assert(ret == 1, "did not find one error event"); ++ ++ cr_assert(buf.buf == (void *) source, "buffer mismatch"); ++ cr_assert(buf.err == FI_ECANCELED, "error code mismatch"); ++ cr_assert(buf.prov_errno == FI_ECANCELED, "prov error code mismatch"); ++ cr_assert(buf.len == len, "length mismatch"); ++} ++ ++static void cancel_sep_recv_sep(int index) ++{ ++ ssize_t ret, len = 16; ++ struct fi_cq_err_entry buf; ++ ++ sep_init_data(source, len, 0xab + index); ++ sep_init_data(target, len, 0); ++ ++ ret = fi_recv(rx_ep[1][index], target, len, rem_mr[0], ++ FI_ADDR_UNSPEC, source); ++ cr_assert(ret == 0, "fi_recv failed err:%ld", ret); ++ ++ ret = fi_cancel(&rx_ep[1][index]->fid, source); ++ cr_assert(ret == FI_SUCCESS, "fi_cancel failed"); ++ ++ /* check for event */ ++ ret = fi_cq_readerr(rx_cq[1][index], &buf, FI_RECV); ++ cr_assert(ret == 1, "did not find one error event"); ++ ++ cr_assert(buf.buf == (void *) target, "buffer mismatch"); ++ cr_assert(buf.err == FI_ECANCELED, "error code mismatch"); ++ cr_assert(buf.prov_errno == FI_ECANCELED, "prov error code mismatch"); ++ cr_assert(buf.len == len, "length mismatch"); ++} ++ ++static void cancel_sep_no_event(int index) ++{ ++ ssize_t ret; ++ ++ ret = fi_cancel(&tx_ep[0][index]->fid, NULL); ++ cr_assert(ret == -FI_ENOENT, "fi_cancel failed"); ++ ++ ret = fi_cancel(&rx_ep[0][index]->fid, NULL); ++ cr_assert(ret == -FI_ENOENT, "fi_cancel failed"); ++} ++ + void run_tests(void) + { + int i, j; +@@ -2363,6 +2426,27 @@ void run_tests(void) + sep_invalid_fetch_atomic(j, i); + } + } ++ ++} ++ ++void run_cancel_tests(void) ++{ ++ int i; ++ ++ cr_log_info("cancel send test\n"); ++ for (i = 0; i < ctx_cnt; i++) { ++ cancel_sep_send_sep(i); ++ } ++ ++ cr_log_info("cancel recv test\n"); ++ for (i = 0; i < ctx_cnt; i++) { ++ cancel_sep_recv_sep(i); ++ } ++ ++ cr_log_info("cancel no event test\n"); ++ for (i = 0; i < ctx_cnt; i++) { ++ cancel_sep_no_event(i); ++ } + } + + TestSuite(scalablea, +@@ -2434,24 +2518,48 @@ Test(scalablem_basic, all) + run_tests(); + } + ++Test(scalablem_basic, cancel) ++{ ++ cr_log_info(BLUE "sep:basic:FI_AV_MAP cancel tests:\n" COLOR_RESET); ++ run_cancel_tests(); ++} ++ + Test(scalablet_basic, all) + { + cr_log_info(BLUE "sep:basic:FI_AV_TABLE tests:\n" COLOR_RESET); + run_tests(); + } + ++Test(scalablet_basic, cancel) ++{ ++ cr_log_info(BLUE "sep:basic:FI_AV_TABLE cancel tests:\n" COLOR_RESET); ++ run_cancel_tests(); ++} ++ + Test(scalablem_scalable, all) + { + cr_log_info(BLUE "sep:scalable:FI_AV_MAP tests:\n" COLOR_RESET); + run_tests(); + } + ++Test(scalablem_scalable, cancel) ++{ ++ cr_log_info(BLUE "sep:scalable:FI_AV_MAP cancel tests:\n" COLOR_RESET); ++ run_cancel_tests(); ++} ++ + Test(scalablet_scalable, all) + { + cr_log_info(BLUE "sep:scalable:FI_AV_TABLE tests:\n" COLOR_RESET); + run_tests(); + } + ++Test(scalablet_scalable, cancel) ++{ ++ cr_log_info(BLUE "sep:scalable:FI_AV_TABLE cancel tests:\n" COLOR_RESET); ++ run_cancel_tests(); ++} ++ + #define INSERT_ADDR_COUNT (NUMCONTEXTS + 6) + + /* test for inserting an ep_name that doesn't fit in the AV */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/Makefile.include +new file mode 100644 +index 000000000..89ce70148 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/Makefile.include +@@ -0,0 +1,2 @@ ++src_libfabric_la_CPPFLAGS += -I$(top_srcdir)/prov/hook/include ++src_libfabric_la_SOURCES += prov/hook/include/hook_prov.h +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/include/hook_prov.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/include/hook_prov.h +new file mode 100644 +index 000000000..a70ae7ce2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/include/hook_prov.h +@@ -0,0 +1,26 @@ ++#ifndef HOOK_PROV_H ++#define HOOK_PROV_H ++ ++#include ++#include "ofi_hook.h" ++ ++int hook_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++int hook_control(struct fid *fid, int command, void *arg); ++int hook_ops_open(struct fid *fid, const char *name, ++ uint64_t flags, void **ops, void *context); ++int hook_close(struct fid *fid); ++ ++#if HAVE_PERF ++#include "hook_perf.h" ++#else ++#define perf_msg_ops hook_msg_ops ++#define perf_rma_ops hook_rma_ops ++#define perf_tagged_ops hook_tagged_ops ++#define perf_cntr_ops hook_cntr_ops ++#define perf_cq_ops hook_cq_ops ++ ++#define hook_perf_create hook_fabric_create ++#define hook_perf_destroy hook_fabric_destroy ++ ++#endif /* HAVE_PERF */ ++#endif /* HOOK_PROV_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/Makefile.include +new file mode 100644 +index 000000000..65e58b9bc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/Makefile.include +@@ -0,0 +1,13 @@ ++if HAVE_PERF ++_perfhook_files = \ ++ prov/hook/perf/src/hook_perf.c ++ ++_perfhook_headers = \ ++ prov/hook/perf/include/hook_perf.h ++ ++ ++src_libfabric_la_SOURCES += $(_perfhook_files) \ ++ $(_perfhook_headers) ++src_libfabric_la_CPPFLAGS += -I$(top_srcdir)/prov/hook/perf/include ++src_libfabric_la_LIBADD += $(perfhook_shm_LIBS) ++endif HAVE_PERF +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/configure.m4 +new file mode 100644 +index 000000000..82befb010 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/configure.m4 +@@ -0,0 +1,21 @@ ++dnl Configury specific to the libfabrics perf hooking provider ++ ++dnl Called to configure this provider ++dnl ++dnl Arguments: ++dnl ++dnl $1: action if configured successfully ++dnl $2: action if not configured successfully ++dnl ++ ++AC_DEFUN([FI_PERF_CONFIGURE],[ ++ # Determine if we can support the perf hooking provider ++ perf_happy=0 ++ AS_IF([test x"$enable_perf" != x"no"], [perf_happy=1]) ++ AS_IF([test x"$perf_dl" == x"1"], [ ++ perf_happy=0 ++ AC_MSG_ERROR([perf provider cannot be compiled as DL]) ++ ]) ++ AS_IF([test $perf_happy -eq 1], [$1], [$2]) ++ ++]) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/include/hook_perf.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/include/hook_perf.h +new file mode 100644 +index 000000000..56625a8c9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/include/hook_perf.h +@@ -0,0 +1,105 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL); Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _HOOK_PERF_H_ ++#define _HOOK_PERF_H_ ++ ++#include "ofi_hook.h" ++#include "ofi.h" ++#include "ofi_perf.h" ++ ++ ++struct perf_fabric { ++ struct hook_fabric fabric_hook; ++ struct ofi_perfset perf_set; ++}; ++ ++int perf_hook_destroy(struct fid *fabric); ++ ++ ++#define HOOK_FOREACH(DECL) \ ++ DECL(perf_recv), \ ++ DECL(perf_recvv), \ ++ DECL(perf_recvmsg), \ ++ DECL(perf_send), \ ++ DECL(perf_sendv), \ ++ DECL(perf_sendmsg), \ ++ DECL(perf_inject), \ ++ DECL(perf_senddata), \ ++ DECL(perf_injectdata), \ ++ DECL(perf_read), \ ++ DECL(perf_readv), \ ++ DECL(perf_readmsg), \ ++ DECL(perf_write), \ ++ DECL(perf_writev), \ ++ DECL(perf_writemsg), \ ++ DECL(perf_inject_write), \ ++ DECL(perf_writedata), \ ++ DECL(perf_inject_writedata), \ ++ DECL(perf_trecv), \ ++ DECL(perf_trecvv), \ ++ DECL(perf_trecvmsg), \ ++ DECL(perf_tsend), \ ++ DECL(perf_tsendv), \ ++ DECL(perf_tsendmsg), \ ++ DECL(perf_tinject), \ ++ DECL(perf_tsenddata), \ ++ DECL(perf_tinjectdata), \ ++ DECL(perf_cq_read), \ ++ DECL(perf_cq_readfrom), \ ++ DECL(perf_cq_readerr), \ ++ DECL(perf_cq_sread), \ ++ DECL(perf_cq_sreadfrom), \ ++ DECL(perf_cq_signal), \ ++ DECL(perf_cntr_read), \ ++ DECL(perf_cntr_readerr), \ ++ DECL(perf_cntr_add), \ ++ DECL(perf_cntr_set), \ ++ DECL(perf_cntr_wait), \ ++ DECL(perf_cntr_adderr), \ ++ DECL(perf_cntr_seterr), \ ++ DECL(perf_size) ++ ++enum perf_counters { ++ HOOK_FOREACH(OFI_ENUM_VAL) ++}; ++ ++extern const char *perf_counters_str[]; ++ ++extern struct fi_ops_msg perf_msg_ops; ++extern struct fi_ops_rma perf_rma_ops; ++extern struct fi_ops_tagged perf_tagged_ops; ++extern struct fi_ops_cq perf_cq_ops; ++extern struct fi_ops_cntr perf_cntr_ops; ++ ++ ++#endif /* _HOOK_PERF_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/src/hook_perf.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/src/hook_perf.c +new file mode 100644 +index 000000000..154f16393 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/perf/src/hook_perf.c +@@ -0,0 +1,904 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "ofi_perf.h" ++#include "ofi_prov.h" ++#include "hook_prov.h" ++ ++ ++const char *perf_counters_str[] = { ++ HOOK_FOREACH(OFI_STR) ++}; ++ ++ ++static inline struct ofi_perfset *perf_set(struct hook_ep *ep) ++{ ++ return &container_of(ep->domain->fabric, struct perf_fabric, ++ fabric_hook)->perf_set; ++} ++ ++static inline struct ofi_perfset *perf_set_cq(struct hook_cq *cq) ++{ ++ return &container_of(cq->domain->fabric, struct perf_fabric, ++ fabric_hook)->perf_set; ++} ++ ++static inline struct ofi_perfset *perf_set_cntr(struct hook_cntr *cntr) ++{ ++ return &container_of(cntr->domain->fabric, struct perf_fabric, ++ fabric_hook)->perf_set; ++} ++ ++/* ++static ssize_t ++perf_atomic_write(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_atomic(myep->hep, buf, count, desc, dest_addr, ++ addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_writev(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_atomicv(myep->hep, iov, desc, count, dest_addr, ++ addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_writemsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_atomicmsg(myep->hep, msg, flags); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_inject(struct fid_ep *ep, const void *buf, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_inject_atomic(myep->hep, buf, count, dest_addr, ++ addr, key, datatype, op); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_readwrite(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_fetch_atomic(myep->hep, buf, count, desc, ++ result, result_desc, dest_addr, ++ addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_readwritev(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_fetch_atomicv(myep->hep, iov, desc, count, ++ resultv, result_desc, result_count, ++ dest_addr, addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_readwritemsg(struct fid_ep *ep, const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_fetch_atomicmsg(myep->hep, msg, resultv, result_desc, ++ result_count, flags); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_compwrite(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ const void *compare, void *compare_desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_compare_atomic(myep->hep, buf, count, desc, ++ compare, compare_desc, result, result_desc, ++ dest_addr, addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_compwritev(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_compare_atomicv(myep->hep, iov, desc, count, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, result_count, dest_addr, ++ addr, key, datatype, op, context); ++ return ret; ++} ++ ++static ssize_t ++perf_atomic_compwritemsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_compare_atomicmsg(myep->hep, msg, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, result_count, flags); ++ return ret; ++} ++ ++static int ++perf_atomic_writevalid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_atomicvalid(myep->hep, datatype, op, count); ++ return ret; ++} ++ ++static int ++perf_atomic_readwritevalid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_fetch_atomicvalid(myep->hep, datatype, op, count); ++ return ret; ++} ++ ++static int ++perf_atomic_compwritevalid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ret = fi_compare_atomicvalid(myep->hep, datatype, op, count); ++ return ret; ++} ++ ++struct fi_ops_atomic perf_atomic_ops = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = perf_atomic_write, ++ .writev = perf_atomic_writev, ++ .writemsg = perf_atomic_writemsg, ++ .inject = perf_atomic_inject, ++ .readwrite = perf_atomic_readwrite, ++ .readwritev = perf_atomic_readwritev, ++ .readwritemsg = perf_atomic_readwritemsg, ++ .compwrite = perf_atomic_compwrite, ++ .compwritev = perf_atomic_compwritev, ++ .compwritemsg = perf_atomic_compwritemsg, ++ .writevalid = perf_atomic_writevalid, ++ .readwritevalid = perf_atomic_readwritevalid, ++ .compwritevalid = perf_atomic_compwritevalid, ++}; ++*/ ++ ++ ++static ssize_t ++perf_msg_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_recv); ++ ret = fi_recv(myep->hep, buf, len, desc, src_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_recv); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_recvv); ++ ret = fi_recvv(myep->hep, iov, desc, count, src_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_recvv); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_recvmsg); ++ ret = fi_recvmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_recvmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_send); ++ ret = fi_send(myep->hep, buf, len, desc, dest_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_send); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_sendv); ++ ret = fi_sendv(myep->hep, iov, desc, count, dest_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_sendv); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_sendmsg); ++ ret = fi_sendmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_sendmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_inject(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_inject); ++ ret = fi_inject(myep->hep, buf, len, dest_addr); ++ ofi_perfset_end(perf_set(myep), perf_inject); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_senddata); ++ ret = fi_senddata(myep->hep, buf, len, desc, data, dest_addr, context); ++ ofi_perfset_end(perf_set(myep), perf_senddata); ++ return ret; ++} ++ ++static ssize_t ++perf_msg_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_injectdata); ++ ret = fi_injectdata(myep->hep, buf, len, data, dest_addr); ++ ofi_perfset_end(perf_set(myep), perf_injectdata); ++ return ret; ++} ++ ++struct fi_ops_msg perf_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = perf_msg_recv, ++ .recvv = perf_msg_recvv, ++ .recvmsg = perf_msg_recvmsg, ++ .send = perf_msg_send, ++ .sendv = perf_msg_sendv, ++ .sendmsg = perf_msg_sendmsg, ++ .inject = perf_msg_inject, ++ .senddata = perf_msg_senddata, ++ .injectdata = perf_msg_injectdata, ++}; ++ ++ ++static ssize_t ++perf_rma_read(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_read); ++ ret = fi_read(myep->hep, buf, len, desc, src_addr, addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_read); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_readv); ++ ret = fi_readv(myep->hep, iov, desc, count, src_addr, ++ addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_readv); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_readmsg); ++ ret = fi_readmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_readmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_write(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_write); ++ ret = fi_write(myep->hep, buf, len, desc, dest_addr, ++ addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_write); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_writev(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_writev); ++ ret = fi_writev(myep->hep, iov, desc, count, dest_addr, ++ addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_writev); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_writemsg); ++ ret = fi_writemsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_writemsg); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_inject(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_inject_write); ++ ret = fi_inject_write(myep->hep, buf, len, dest_addr, addr, key); ++ ofi_perfset_end(perf_set(myep), perf_inject_write); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_writedata); ++ ret = fi_writedata(myep->hep, buf, len, desc, data, ++ dest_addr, addr, key, context); ++ ofi_perfset_end(perf_set(myep), perf_writedata); ++ return ret; ++} ++ ++static ssize_t ++perf_rma_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_inject_writedata); ++ ret = fi_inject_writedata(myep->hep, buf, len, data, dest_addr, ++ addr, key); ++ ofi_perfset_end(perf_set(myep), perf_inject_writedata); ++ return ret; ++} ++ ++struct fi_ops_rma perf_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = perf_rma_read, ++ .readv = perf_rma_readv, ++ .readmsg = perf_rma_readmsg, ++ .write = perf_rma_write, ++ .writev = perf_rma_writev, ++ .writemsg = perf_rma_writemsg, ++ .inject = perf_rma_inject, ++ .writedata = perf_rma_writedata, ++ .injectdata = perf_rma_injectdata, ++}; ++ ++ ++static ssize_t ++perf_tagged_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t tag, uint64_t ignore, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_trecv); ++ ret = fi_trecv(myep->hep, buf, len, desc, src_addr, ++ tag, ignore, context); ++ ofi_perfset_end(perf_set(myep), perf_trecv); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t tag, ++ uint64_t ignore, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_trecvv); ++ ret = fi_trecvv(myep->hep, iov, desc, count, src_addr, ++ tag, ignore, context); ++ ofi_perfset_end(perf_set(myep), perf_trecvv); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_recvmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_trecvmsg); ++ ret = fi_trecvmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_trecvmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t tag, void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tsend); ++ ret = fi_tsend(myep->hep, buf, len, desc, dest_addr, tag, context); ++ ofi_perfset_end(perf_set(myep), perf_tsend); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t tag, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tsendv); ++ ret = fi_tsendv(myep->hep, iov, desc, count, dest_addr, tag, context); ++ ofi_perfset_end(perf_set(myep), perf_tsendv); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_sendmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tsendmsg); ++ ret = fi_tsendmsg(myep->hep, msg, flags); ++ ofi_perfset_end(perf_set(myep), perf_tsendmsg); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_inject(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tinject); ++ ret = fi_tinject(myep->hep, buf, len, dest_addr, tag); ++ ofi_perfset_end(perf_set(myep), perf_tinject); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag, ++ void *context) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tsenddata); ++ ret = fi_tsenddata(myep->hep, buf, len, desc, data, ++ dest_addr, tag, context); ++ ofi_perfset_end(perf_set(myep), perf_tsenddata); ++ return ret; ++} ++ ++static ssize_t ++perf_tagged_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct hook_ep *myep = container_of(ep, struct hook_ep, ep); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set(myep), perf_tinjectdata); ++ ret = fi_tinjectdata(myep->hep, buf, len, data, dest_addr, tag); ++ ofi_perfset_end(perf_set(myep), perf_tinjectdata); ++ return ret; ++} ++ ++struct fi_ops_tagged perf_tagged_ops = { ++ .size = sizeof(struct fi_ops_tagged), ++ .recv = perf_tagged_recv, ++ .recvv = perf_tagged_recvv, ++ .recvmsg = perf_tagged_recvmsg, ++ .send = perf_tagged_send, ++ .sendv = perf_tagged_sendv, ++ .sendmsg = perf_tagged_sendmsg, ++ .inject = perf_tagged_inject, ++ .senddata = perf_tagged_senddata, ++ .injectdata = perf_tagged_injectdata, ++}; ++ ++ ++static ssize_t perf_cq_read_op(struct fid_cq *cq, void *buf, size_t count) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_read); ++ ret = fi_cq_read(mycq->hcq, buf, count); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_read); ++ return ret; ++} ++ ++static ssize_t ++perf_cq_readerr_op(struct fid_cq *cq, struct fi_cq_err_entry *buf, uint64_t flags) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_readerr); ++ ret = fi_cq_readerr(mycq->hcq, buf, flags); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_readerr); ++ return ret; ++} ++ ++static ssize_t ++perf_cq_readfrom_op(struct fid_cq *cq, void *buf, size_t count, fi_addr_t *src_addr) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_readfrom); ++ ret = fi_cq_readfrom(mycq->hcq, buf, count, src_addr); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_readfrom); ++ return ret; ++} ++ ++static ssize_t ++perf_cq_sread_op(struct fid_cq *cq, void *buf, size_t count, ++ const void *cond, int timeout) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_sread); ++ ret = fi_cq_sread(mycq->hcq, buf, count, cond, timeout); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_sread); ++ return ret; ++} ++ ++static ssize_t ++perf_cq_sreadfrom_op(struct fid_cq *cq, void *buf, size_t count, ++ fi_addr_t *src_addr, const void *cond, int timeout) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ ssize_t ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_sreadfrom); ++ ret = fi_cq_sreadfrom(mycq->hcq, buf, count, src_addr, cond, timeout); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_sreadfrom); ++ return ret; ++} ++ ++static int perf_cq_signal_op(struct fid_cq *cq) ++{ ++ struct hook_cq *mycq = container_of(cq, struct hook_cq, cq); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cq(mycq), perf_cq_signal); ++ ret = fi_cq_signal(mycq->hcq); ++ ofi_perfset_end(perf_set_cq(mycq), perf_cq_signal); ++ return ret; ++} ++ ++struct fi_ops_cq perf_cq_ops = { ++ .size = sizeof(struct fi_ops_cq), ++ .read = perf_cq_read_op, ++ .readfrom = perf_cq_readfrom_op, ++ .readerr = perf_cq_readerr_op, ++ .sread = perf_cq_sread_op, ++ .sreadfrom = perf_cq_sreadfrom_op, ++ .signal = perf_cq_signal_op, ++ .strerror = hook_cq_strerror, ++}; ++ ++ ++static uint64_t perf_cntr_read_op(struct fid_cntr *cntr) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ uint64_t ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_read); ++ ret = fi_cntr_read(mycntr->hcntr); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_read); ++ return ret; ++} ++ ++static uint64_t perf_cntr_readerr_op(struct fid_cntr *cntr) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ uint64_t ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_readerr); ++ ret = fi_cntr_readerr(mycntr->hcntr); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_readerr); ++ return ret; ++} ++ ++static int perf_cntr_add_op(struct fid_cntr *cntr, uint64_t value) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_add); ++ ret = fi_cntr_add(mycntr->hcntr, value); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_add); ++ return ret; ++} ++ ++static int perf_cntr_set_op(struct fid_cntr *cntr, uint64_t value) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_set); ++ ret = fi_cntr_set(mycntr->hcntr, value); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_set); ++ return ret; ++} ++ ++static int perf_cntr_wait_op(struct fid_cntr *cntr, uint64_t threshold, int timeout) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_wait); ++ ret = fi_cntr_wait(mycntr->hcntr, threshold, timeout); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_wait); ++ return ret; ++} ++ ++static int perf_cntr_adderr_op(struct fid_cntr *cntr, uint64_t value) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_adderr); ++ ret = fi_cntr_adderr(mycntr->hcntr, value); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_adderr); ++ return ret; ++} ++ ++static int perf_cntr_seterr_op(struct fid_cntr *cntr, uint64_t value) ++{ ++ struct hook_cntr *mycntr = container_of(cntr, struct hook_cntr, cntr); ++ int ret; ++ ++ ofi_perfset_start(perf_set_cntr(mycntr), perf_cntr_seterr); ++ ret = fi_cntr_seterr(mycntr->hcntr, value); ++ ofi_perfset_end(perf_set_cntr(mycntr), perf_cntr_seterr); ++ return ret; ++} ++ ++struct fi_ops_cntr perf_cntr_ops = { ++ .size = sizeof(struct fi_ops_cntr), ++ .read = perf_cntr_read_op, ++ .readerr = perf_cntr_readerr_op, ++ .add = perf_cntr_add_op, ++ .set = perf_cntr_set_op, ++ .wait = perf_cntr_wait_op, ++ .adderr = perf_cntr_adderr_op, ++ .seterr = perf_cntr_seterr_op, ++}; ++ ++ ++static struct fi_ops perf_fabric_fid_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = perf_hook_destroy, ++ .bind = hook_bind, ++ .control = hook_control, ++ .ops_open = hook_ops_open, ++}; ++ ++int perf_hook_destroy(struct fid *fid) ++{ ++ struct perf_fabric *fab; ++ ++ fab = container_of(fid, struct perf_fabric, fabric_hook); ++ ofi_perfset_log(&fab->perf_set, perf_counters_str); ++ ofi_perfset_close(&fab->perf_set); ++ hook_close(fid); ++ ++ return FI_SUCCESS; ++} ++ ++static int perf_hook_fabric(struct fi_fabric_attr *attr, ++ struct fid_fabric **fabric, void *context) ++{ ++ struct fi_provider *hprov = context; ++ struct perf_fabric *fab; ++ int ret; ++ ++ FI_TRACE(hprov, FI_LOG_FABRIC, "Installing perf hook\n"); ++ fab = calloc(1, sizeof *fab); ++ if (!fab) ++ return -FI_ENOMEM; ++ ++ ret = ofi_perfset_create(hprov, &fab->perf_set, perf_size, ++ perf_domain, perf_cntr, perf_flags); ++ if (ret) { ++ free(fab); ++ return ret; ++ } ++ ++ hook_fabric_init(&fab->fabric_hook, HOOK_PERF, attr->fabric, hprov, ++ &perf_fabric_fid_ops); ++ *fabric = &fab->fabric_hook.fabric; ++ return 0; ++} ++ ++struct fi_provider perf_hook_prov = { ++ .version = FI_VERSION(1,0), ++ /* We're a pass-through provider, so the fi_version is always the latest */ ++ .fi_version = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION), ++ .name = "ofi_perf_hook", ++ .getinfo = NULL, ++ .fabric = perf_hook_fabric, ++ .cleanup = NULL, ++}; ++ ++PERF_HOOK_INI ++{ ++ return &perf_hook_prov; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.c +index 3c097d623..05015d9f8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook.c +@@ -33,7 +33,15 @@ + #include + #include + #include +-#include "hook.h" ++#include ++#include ++ ++#include "ofi_hook.h" ++#include "ofi_prov.h" ++ ++ ++static char **hooks; ++static size_t hook_cnt; + + + struct fid *hook_to_hfid(const struct fid *fid) +@@ -80,12 +88,17 @@ struct fid *hook_to_hfid(const struct fid *fid) + return &(container_of(fid, struct hook_mr, mr.fid)-> + hmr->fid); + default: +- assert(0); + return NULL; + } + } + +-static int hook_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++struct fid_wait *hook_to_hwait(const struct fid_wait *wait) ++{ ++ return container_of(wait, struct hook_wait, wait)->hwait; ++} ++ ++ ++int hook_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct fid *hfid, *hbfid; + +@@ -97,7 +110,7 @@ static int hook_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + return hfid->ops->bind(hfid, hbfid, flags); + } + +-static int hook_control(struct fid *fid, int command, void *arg) ++int hook_control(struct fid *fid, int command, void *arg) + { + struct fid *hfid; + +@@ -108,7 +121,7 @@ static int hook_control(struct fid *fid, int command, void *arg) + return hfid->ops->control(hfid, command, arg); + } + +-static int hook_ops_open(struct fid *fid, const char *name, ++int hook_ops_open(struct fid *fid, const char *name, + uint64_t flags, void **ops, void *context) + { + struct fid *hfid; +@@ -120,7 +133,7 @@ static int hook_ops_open(struct fid *fid, const char *name, + return hfid->ops->ops_open(hfid, name, flags, ops, context); + } + +-static int hook_close(struct fid *fid) ++int hook_close(struct fid *fid) + { + struct fid *hfid; + int ret; +@@ -135,6 +148,7 @@ static int hook_close(struct fid *fid) + return ret; + } + ++ + struct fi_ops hook_fid_ops = { + .size = sizeof(struct fi_ops), + .close = hook_close, +@@ -143,6 +157,14 @@ struct fi_ops hook_fid_ops = { + .ops_open = hook_ops_open, + }; + ++static struct fi_ops hook_fabric_fid_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = hook_close, ++ .bind = hook_bind, ++ .control = hook_control, ++ .ops_open = hook_ops_open, ++}; ++ + static struct fi_ops_fabric hook_fabric_ops = { + .size = sizeof(struct fi_ops_fabric), + .domain = hook_domain, +@@ -152,22 +174,104 @@ static struct fi_ops_fabric hook_fabric_ops = { + .trywait = hook_trywait, + }; + +-int hook_fabric(struct fid_fabric *hfabric, struct fid_fabric **fabric) ++void hook_fabric_init(struct hook_fabric *fabric, enum ofi_hook_class hclass, ++ struct fid_fabric *hfabric, struct fi_provider *hprov, ++ struct fi_ops *f_ops) + { ++ fabric->hclass = hclass; ++ fabric->hfabric = hfabric; ++ fabric->prov = hprov; ++ fabric->fabric.fid.fclass = FI_CLASS_FABRIC; ++ fabric->fabric.fid.context = hfabric->fid.context; ++ fabric->fabric.fid.ops = f_ops; ++ fabric->fabric.api_version = hfabric->api_version; ++ fabric->fabric.ops = &hook_fabric_ops; ++ ++ hfabric->fid.context = fabric; ++} ++ ++static int noop_hook_fabric(struct fi_fabric_attr *attr, ++ struct fid_fabric **fabric, void *context) ++{ ++ struct fi_provider *hprov = context; + struct hook_fabric *fab; + ++ FI_TRACE(hprov, FI_LOG_FABRIC, "Installing noop hook\n"); + fab = calloc(1, sizeof *fab); + if (!fab) + return -FI_ENOMEM; + +- fab->fabric.fid.fclass = FI_CLASS_FABRIC; +- fab->fabric.fid.context = hfabric->fid.context; +- fab->fabric.fid.ops = &hook_fid_ops; +- fab->fabric.api_version = hfabric->api_version; +- fab->fabric.ops = &hook_fabric_ops; +- +- hfabric->fid.context = fab; ++ hook_fabric_init(fab, HOOK_NOOP, attr->fabric, hprov, ++ &hook_fabric_fid_ops); + *fabric = &fab->fabric; +- + return 0; + } ++ ++struct fi_provider noop_hook_prov = { ++ .version = FI_VERSION(1,0), ++ /* We're a pass-through provider, so the fi_version is always the latest */ ++ .fi_version = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION), ++ .name = "ofi_noop_hook", ++ .getinfo = NULL, ++ .fabric = noop_hook_fabric, ++ .cleanup = NULL, ++}; ++ ++NOOP_HOOK_INI ++{ ++ return &noop_hook_prov; ++} ++ ++/* ++ * Call the fabric() interface of the hooking provider. We pass in the ++ * fabric being hooked via the fabric attributes and the corresponding ++ * fi_provider structure as the context. ++ */ ++void ofi_hook_install(struct fid_fabric *hfabric, struct fid_fabric **fabric, ++ struct fi_provider *prov) ++{ ++ struct fi_provider *hook_prov; ++ struct fi_fabric_attr attr; ++ int i, ret; ++ ++ *fabric = hfabric; ++ if (!hook_cnt || !hooks) ++ return; ++ ++ memset(&attr, 0, sizeof attr); ++ ++ for (i = 0; i < hook_cnt; i++) { ++ hook_prov = ofi_get_hook(hooks[i]); ++ if (!hook_prov) ++ continue; ++ ++ attr.fabric = hfabric; ++ ret = hook_prov->fabric(&attr, fabric, prov); ++ if (ret) ++ continue; ++ ++ hfabric = *fabric; ++ } ++} ++ ++void ofi_hook_init(void) ++{ ++ char *param_val = NULL; ++ ++ fi_param_define(NULL, "hook", FI_PARAM_STRING, ++ "Intercept calls to underlying provider and apply " ++ "the specified functionality to them. Hook option: " ++ "perf (gather performance data)"); ++ fi_param_get_str(NULL, "hook", ¶m_val); ++ ++ if (!param_val) ++ return; ++ ++ hooks = ofi_split_and_alloc(param_val, ";", &hook_cnt); ++} ++ ++void ofi_hook_fini(void) ++{ ++ if (hooks) ++ ofi_free_string_array(hooks); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_av.c +index ddde2735f..c57df17ea 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_av.c +@@ -31,7 +31,7 @@ + */ + + #include +-#include "hook.h" ++#include "ofi_hook.h" + + + static int +@@ -112,6 +112,7 @@ int hook_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + if (!myav) + return -FI_ENOMEM; + ++ myav->domain = dom; + myav->av.fid.fclass = FI_CLASS_AV; + myav->av.fid.context = context; + myav->av.fid.ops = &hook_fid_ops; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cm.c +index 071f9a430..124ef38bf 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cm.c +@@ -30,7 +30,7 @@ + * SOFTWARE. + */ + +-#include "hook.h" ++#include "ofi_hook.h" + + + static int hook_setname(fid_t fid, void *addr, size_t addrlen) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cntr.c +index 3d7a9f98d..781bc9489 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cntr.c +@@ -31,7 +31,7 @@ + */ + + #include +-#include "hook.h" ++#include "hook_prov.h" + + + static uint64_t hook_cntr_read(struct fid_cntr *cntr) +@@ -99,18 +99,32 @@ int hook_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + { + struct hook_domain *dom = container_of(domain, struct hook_domain, domain); + struct hook_cntr *mycntr; ++ struct fi_cntr_attr hattr; + int ret; + + mycntr = calloc(1, sizeof *mycntr); + if (!mycntr) + return -FI_ENOMEM; + ++ mycntr->domain = dom; + mycntr->cntr.fid.fclass = FI_CLASS_CNTR; + mycntr->cntr.fid.context = context; + mycntr->cntr.fid.ops = &hook_fid_ops; +- mycntr->cntr.ops = &hook_cntr_ops; + +- ret = fi_cntr_open(dom->hdomain, attr, &mycntr->hcntr, ++ switch (dom->fabric->hclass) { ++ case HOOK_PERF: ++ mycntr->cntr.ops = &perf_cntr_ops; ++ break; ++ default: ++ mycntr->cntr.ops = &hook_cntr_ops; ++ break; ++ } ++ ++ hattr = *attr; ++ if (attr->wait_obj == FI_WAIT_SET) ++ hattr.wait_set = hook_to_hwait(attr->wait_set); ++ ++ ret = fi_cntr_open(dom->hdomain, &hattr, &mycntr->hcntr, + &mycntr->cntr.fid); + if (ret) + free(mycntr); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cq.c +index a23c722f7..fb3bb83bc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_cq.c +@@ -31,7 +31,7 @@ + */ + + #include +-#include "hook.h" ++#include "hook_prov.h" + + + static ssize_t hook_cq_read(struct fid_cq *cq, void *buf, size_t count) +@@ -82,7 +82,7 @@ static int hook_cq_signal(struct fid_cq *cq) + return fi_cq_signal(mycq->hcq); + } + +-static const char * ++const char * + hook_cq_strerror(struct fid_cq *cq, int prov_errno, + const void *err_data, char *buf, size_t len) + { +@@ -107,18 +107,32 @@ int hook_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + { + struct hook_domain *dom = container_of(domain, struct hook_domain, domain); + struct hook_cq *mycq; ++ struct fi_cq_attr hattr; + int ret; + + mycq = calloc(1, sizeof *mycq); + if (!mycq) + return -FI_ENOMEM; + ++ mycq->domain = dom; + mycq->cq.fid.fclass = FI_CLASS_CQ; + mycq->cq.fid.context = context; + mycq->cq.fid.ops = &hook_fid_ops; +- mycq->cq.ops = &hook_cq_ops; + +- ret = fi_cq_open(dom->hdomain, attr, &mycq->hcq, &mycq->cq.fid); ++ switch (dom->fabric->hclass) { ++ case HOOK_PERF: ++ mycq->cq.ops = &perf_cq_ops; ++ break; ++ default: ++ mycq->cq.ops = &hook_cq_ops; ++ break; ++ } ++ ++ hattr = *attr; ++ if (attr->wait_obj == FI_WAIT_SET) ++ hattr.wait_set = hook_to_hwait(attr->wait_set); ++ ++ ret = fi_cq_open(dom->hdomain, &hattr, &mycq->hcq, &mycq->cq.fid); + if (ret) + free(mycq); + else +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_domain.c +index e4519a6da..04706665a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_domain.c +@@ -32,7 +32,7 @@ + + #include + #include +-#include "hook.h" ++#include "ofi_hook.h" + + + static int hook_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, +@@ -46,6 +46,7 @@ static int hook_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, + if (!mymr) + return -FI_ENOMEM; + ++ mymr->domain = dom; + mymr->mr.fid.fclass = FI_CLASS_MR; + mymr->mr.fid.context = attr->context; + mymr->mr.fid.ops = &hook_fid_ops; +@@ -135,6 +136,7 @@ int hook_domain(struct fid_fabric *fabric, struct fi_info *info, + if (!dom) + return -FI_ENOMEM; + ++ dom->fabric = fab; + dom->domain.fid.fclass = FI_CLASS_DOMAIN; + dom->domain.fid.context = context; + dom->domain.fid.ops = &hook_fid_ops; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_ep.c +index 8916cb5ad..655a1b42b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_ep.c +@@ -32,7 +32,7 @@ + + #include + #include +-#include "hook.h" ++#include "hook_prov.h" + + + static int hook_open_tx_ctx(struct fid_ep *sep, int index, +@@ -86,16 +86,27 @@ static struct fi_ops_ep hook_ep_ops = { + }; + + +-static void hook_setup_ep(struct fid_ep *ep, int fclass, void *context) ++static void hook_setup_ep(enum ofi_hook_class hclass, struct fid_ep *ep, ++ int fclass, void *context) + { + ep->fid.fclass = fclass; + ep->fid.context = context; + ep->fid.ops = &hook_fid_ops; + ep->ops = &hook_ep_ops; + ep->cm = &hook_cm_ops; +- ep->msg = &hook_msg_ops; +- ep->rma = &hook_rma_ops; +- ep->tagged = &hook_tagged_ops; ++ ++ switch (hclass) { ++ case HOOK_PERF: ++ ep->msg = &perf_msg_ops; ++ ep->rma = &perf_rma_ops; ++ ep->tagged = &perf_tagged_ops; ++ break; ++ default: ++ ep->msg = &hook_msg_ops; ++ ep->rma = &hook_rma_ops; ++ ep->tagged = &hook_tagged_ops; ++ break; ++ } + ep->atomic = &hook_atomic_ops; + } + +@@ -110,7 +121,8 @@ int hook_scalable_ep(struct fid_domain *domain, struct fi_info *info, + if (!mysep) + return -FI_ENOMEM; + +- hook_setup_ep(&mysep->ep, FI_CLASS_SEP, context); ++ mysep->domain = dom; ++ hook_setup_ep(dom->fabric->hclass, &mysep->ep, FI_CLASS_SEP, context); + ret = fi_scalable_ep(dom->hdomain, info, &mysep->hep, &mysep->ep.fid); + if (ret) + free(mysep); +@@ -132,6 +144,7 @@ int hook_stx_ctx(struct fid_domain *domain, + if (!mystx) + return -FI_ENOMEM; + ++ mystx->domain = dom; + mystx->stx.fid.fclass = FI_CLASS_STX_CTX; + mystx->stx.fid.context = context; + mystx->stx.fid.ops = &hook_fid_ops; +@@ -157,7 +170,8 @@ int hook_srx_ctx(struct fid_domain *domain, struct fi_rx_attr *attr, + if (!srx) + return -FI_ENOMEM; + +- hook_setup_ep(&srx->ep, FI_CLASS_SRX_CTX, context); ++ srx->domain = dom; ++ hook_setup_ep(dom->fabric->hclass, &srx->ep, FI_CLASS_SRX_CTX, context); + ret = fi_srx_context(dom->hdomain, attr, &srx->hep, &srx->ep.fid); + if (ret) + free(srx); +@@ -179,7 +193,9 @@ static int hook_open_tx_ctx(struct fid_ep *sep, int index, + if (!mytx) + return -FI_ENOMEM; + +- hook_setup_ep(&mytx->ep, FI_CLASS_TX_CTX, context); ++ mytx->domain = mysep->domain; ++ hook_setup_ep(mysep->domain->fabric->hclass, &mytx->ep, ++ FI_CLASS_TX_CTX, context); + ret = fi_tx_context(mysep->hep, index, attr, &mytx->hep, &mytx->ep.fid); + if (ret) + free(mytx); +@@ -201,7 +217,9 @@ static int hook_open_rx_ctx(struct fid_ep *sep, int index, + if (!myrx) + return -FI_ENOMEM; + +- hook_setup_ep(&myrx->ep, FI_CLASS_RX_CTX, context); ++ myrx->domain = mysep->domain; ++ hook_setup_ep(mysep->domain->fabric->hclass, &myrx->ep, ++ FI_CLASS_RX_CTX, context); + ret = fi_rx_context(mysep->hep, index, attr, &myrx->hep, &myrx->ep.fid); + if (ret) + free(myrx); +@@ -222,6 +240,7 @@ int hook_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + if (!mypep) + return -FI_ENOMEM; + ++ mypep->fabric = fab; + mypep->pep.fid.fclass = FI_CLASS_PEP; + mypep->pep.fid.context = context; + mypep->pep.fid.ops = &hook_fid_ops; +@@ -242,18 +261,27 @@ int hook_endpoint(struct fid_domain *domain, struct fi_info *info, + { + struct hook_domain *dom = container_of(domain, struct hook_domain, domain); + struct hook_ep *myep; ++ struct fid *saved_fid; + int ret; + + myep = calloc(1, sizeof *myep); + if (!myep) + return -FI_ENOMEM; + +- hook_setup_ep(&myep->ep, FI_CLASS_EP, context); ++ saved_fid = info->handle; ++ if (saved_fid) { ++ info->handle = hook_to_hfid(info->handle); ++ if (!info->handle) ++ info->handle = saved_fid; ++ } ++ myep->domain = dom; ++ hook_setup_ep(dom->fabric->hclass, &myep->ep, FI_CLASS_EP, context); + ret = fi_endpoint(dom->hdomain, info, &myep->hep, &myep->ep.fid); + if (ret) + free(myep); + else + *ep = &myep->ep; + ++ info->handle = saved_fid; + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_eq.c +index 33460c10d..8391099e1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_eq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_eq.c +@@ -31,12 +31,12 @@ + */ + + #include +-#include "hook.h" ++#include "ofi_hook.h" + + + static int hook_eq_std_event(uint32_t event) + { +- return event <= FI_JOIN_COMPLETE; ++ return (event > FI_NOTIFY) && (event <= FI_JOIN_COMPLETE); + } + + /* +@@ -121,18 +121,24 @@ int hook_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, + { + struct hook_fabric *fab = container_of(fabric, struct hook_fabric, fabric); + struct hook_eq *myeq; ++ struct fi_eq_attr hattr; + int ret; + + myeq = calloc(1, sizeof *myeq); + if (!myeq) + return -FI_ENOMEM; + ++ myeq->fabric = fab; + myeq->eq.fid.fclass = FI_CLASS_EQ; + myeq->eq.fid.context = context; + myeq->eq.fid.ops = &hook_fid_ops; + myeq->eq.ops = &hook_eq_ops; + +- ret = fi_eq_open(fab->hfabric, attr, &myeq->heq, &myeq->eq.fid); ++ hattr = *attr; ++ if (attr->wait_obj == FI_WAIT_SET) ++ hattr.wait_set = hook_to_hwait(attr->wait_set); ++ ++ ret = fi_eq_open(fab->hfabric, &hattr, &myeq->heq, &myeq->eq.fid); + if (ret) + free(myeq); + else +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_wait.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_wait.c +index e2287e1d5..31e8fa47e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_wait.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_wait.c +@@ -31,7 +31,7 @@ + */ + + #include +-#include "hook.h" ++#include "ofi_hook.h" + + + static int hook_do_poll(struct fid_poll *pollset, void **context, int count) +@@ -83,6 +83,7 @@ int hook_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, + if (!poll) + return -FI_ENOMEM; + ++ poll->domain = dom; + poll->poll.fid.fclass = FI_CLASS_POLL; + poll->poll.fid.ops = &hook_fid_ops; + poll->poll.ops = &hook_poll_ops; +@@ -139,6 +140,7 @@ int hook_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, + if (!wait) + return -FI_ENOMEM; + ++ wait->fabric = fab; + wait->wait.fid.fclass = FI_CLASS_WAIT; + wait->wait.fid.ops = &hook_fid_ops; + wait->wait.ops = &hook_wait_ops; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_xfer.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_xfer.c +index 9f846cdb7..9c00754eb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_xfer.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/hook/src/hook_xfer.c +@@ -30,7 +30,7 @@ + * SOFTWARE. + */ + +-#include "hook.h" ++#include "ofi_hook.h" + + + static ssize_t +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_av.c +index 89ebb80d7..bb9e944c1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_av.c +@@ -118,7 +118,7 @@ static int mlx_av_insert( + { + struct mlx_av *av; + struct mlx_ep *ep; +- int i; ++ size_t i; + ucs_status_t status = UCS_OK; + int added = 0; + +@@ -129,35 +129,34 @@ static int mlx_av_insert( + return -FI_ENOEQ; + } + +- for ( i = 0; i < count ; ++i) { +- ucp_ep_params_t ep_params = {}; ++ for (i = 0; i < count ; ++i) { ++ ucp_ep_params_t ep_params = { 0 }; + + if (mlx_descriptor.use_ns) { + if (mlx_av_resolve_if_addr( + (struct sockaddr*) +- (&(((struct sockaddr_in*)addr)[i])), +- (char**)&ep_params.address) != FI_SUCCESS) ++ (&(((struct sockaddr_in *) addr)[i])), ++ (char**) &ep_params.address) != FI_SUCCESS) + break; + } else { + ep_params.address = (const ucp_address_t *) +- (&(((const char *)addr)[i * FI_MLX_MAX_NAME_LEN])); ++ (&(((const char *) addr)[i * av->addr_len])); + } + + ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- FI_WARN( &mlx_prov, FI_LOG_CORE, +- "Try to insert address #%d, offset=%d (size=%ld)" ++ FI_WARN(&mlx_prov, FI_LOG_CORE, ++ "Try to insert address #%zd, offset=%zd (size=%zd)" + " fi_addr=%p \naddr = %s\n", +- i, i * FI_MLX_MAX_NAME_LEN, count, +- fi_addr, &(((const char *)addr)[i * FI_MLX_MAX_NAME_LEN])); ++ i, i * av->addr_len, count, ++ fi_addr, &(((const char *) addr)[i * av->addr_len])); + +- status = ucp_ep_create( ep->worker, +- &ep_params, +- (ucp_ep_h *)(&(fi_addr[i]))); ++ status = ucp_ep_create(ep->worker, &ep_params, ++ (ucp_ep_h *)(&(fi_addr[i]))); + if (mlx_descriptor.use_ns) { +- free((void*)ep_params.address); ++ free((void *) ep_params.address); + } + if (status == UCS_OK) { +- FI_WARN( &mlx_prov, FI_LOG_CORE, "address inserted\n"); ++ FI_WARN(&mlx_prov, FI_LOG_CORE, "address inserted\n"); + added++; + } else { + if (av->eq) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_callbacks.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_callbacks.c +index 9f0dc318e..ab1abc990 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_callbacks.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_callbacks.c +@@ -45,7 +45,7 @@ void mlx_send_callback(void *request, + struct util_cq *cq; + struct mlx_request *mlx_req = request; + struct fi_cq_tagged_entry *t_entry; +- struct util_cq_err_entry *err; ++ struct util_cq_oflow_err_entry *err; + + cq = mlx_req->cq; + +@@ -62,18 +62,18 @@ void mlx_send_callback(void *request, + + if (status != UCS_OK){ + t_entry->flags |= UTIL_FLAG_ERROR; +- err = calloc(1, sizeof(struct util_cq_err_entry)); ++ err = calloc(1, sizeof(struct util_cq_oflow_err_entry)); + if (!err) { + FI_WARN(&mlx_prov, FI_LOG_CQ, + "out of memory, cannot report CQ error\n"); + goto fn; + } + +- err->err_entry = (mlx_req->completion.error); +- err->err_entry.prov_errno = (int)status; +- err->err_entry.err = MLX_TRANSLATE_ERRCODE(status); +- err->err_entry.olen = 0; +- slist_insert_tail(&err->list_entry, &cq->err_list); ++ err->comp = (mlx_req->completion.error); ++ err->comp.prov_errno = (int)status; ++ err->comp.err = MLX_TRANSLATE_ERRCODE(status); ++ err->comp.olen = 0; ++ slist_insert_tail(&err->list_entry, &cq->oflow_err_list); + } + fn: + mlx_req->type = MLX_FI_REQ_UNINITIALIZED; +@@ -133,10 +133,10 @@ void mlx_recv_callback(void *request, + *t_entry = (mlx_req->completion.tagged); + + if (status != UCS_OK) { +- struct util_cq_err_entry* err; ++ struct util_cq_oflow_err_entry *err; + t_entry->flags |= UTIL_FLAG_ERROR; + +- err = calloc(1, sizeof(struct util_cq_err_entry)); ++ err = calloc(1, sizeof(struct util_cq_oflow_err_entry)); + if (!err) { + FI_WARN(&mlx_prov, FI_LOG_CQ, + "out of memory, cannot report CQ error\n"); +@@ -144,8 +144,8 @@ void mlx_recv_callback(void *request, + goto fn; + } + +- err->err_entry = (mlx_req->completion.error); +- slist_insert_tail(&err->list_entry, &cq->err_list); ++ err->comp = (mlx_req->completion.error); ++ slist_insert_tail(&err->list_entry, &cq->oflow_err_list); + } + + if (cq->src){ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_cm.c +index 47b5c1482..c0b7668fa 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_cm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_cm.c +@@ -89,11 +89,14 @@ static int mlx_cm_getname_ai_format( + size_t *addrlen) + { + int ofi_status = FI_SUCCESS; +- struct mlx_ep* ep; +- ep = container_of(fid, struct mlx_ep, ep.ep_fid.fid); ++ struct mlx_ep* ep = container_of(fid, struct mlx_ep, ep.ep_fid.fid); ++ + if (ep->addr) { + if (ep->addr_len > *addrlen) { + ofi_status = -FI_ETOOSMALL; ++ FI_WARN(&mlx_prov, FI_LOG_EP_CTRL, ++ "addrlen expected: %"PRIu64", got: %"PRIu64"\n", ++ ep->addr_len, *addrlen); + } else { + memcpy(addr, ep->addr, ep->addr_len); + } +@@ -101,32 +104,35 @@ static int mlx_cm_getname_ai_format( + } else { + char *hostname = mlx_descriptor.localhost; + int service = (((getpid() & 0xFFFF))); +- struct addrinfo hints; ++ struct addrinfo hints = { ++ .ai_family = AF_INET, ++ .ai_socktype = SOCK_STREAM, ++ .ai_protocol = IPPROTO_TCP, ++ }; + struct addrinfo *res; + +- memset(&hints, 0, sizeof(hints)); +- hints.ai_flags = 0; +- hints.ai_family = AF_INET; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_protocol = IPPROTO_TCP; +- hints.ai_addrlen = 0; +- hints.ai_addr = NULL; +- hints.ai_canonname = NULL; +- hints.ai_next = NULL; +- +- if(getaddrinfo(hostname, NULL, &hints, &res) != 0) { +- FI_WARN( &mlx_prov, FI_LOG_CORE, +- "Unable to resolve hostname:%s\n",hostname); ++ if (getaddrinfo(hostname, NULL, &hints, &res) != 0) { ++ FI_WARN(&mlx_prov, FI_LOG_CORE, ++ "Unable to resolve hostname:%s\n", hostname); ++ return -FI_EAVAIL; + } + FI_INFO(&mlx_prov, FI_LOG_CORE, +- "Loaded IPv4 address: [%"PRIu64"]%s:%d\n", +- res->ai_addrlen, hostname, service); ++ "Loaded IPv4 address: [%jd]%s:%d\n", ++ (intmax_t) res->ai_addrlen, hostname, service); + +- memcpy(addr,res->ai_addr,res->ai_addrlen); +- ((struct sockaddr_in*)addr)->sin_port = htons((short)service); +- freeaddrinfo(res); ++ if (res->ai_addrlen > *addrlen) { ++ ofi_status = -FI_ETOOSMALL; ++ FI_WARN(&mlx_prov, FI_LOG_EP_CTRL, ++ "addrlen expected: %jd, got: %"PRIu64"\n", ++ (intmax_t) res->ai_addrlen, *addrlen); ++ } else { ++ memcpy(addr, res->ai_addr, res->ai_addrlen); ++ ((struct sockaddr_in *)addr)->sin_port = htons((short)service); ++ } + +- *addrlen = sizeof(struct sockaddr); ++ *addrlen = res->ai_addrlen; ++ ++ freeaddrinfo(res); + } + + return ofi_status; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_fabric.c +index 527ceb320..f443da750 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_fabric.c +@@ -85,7 +85,7 @@ static char* mlx_local_host_resolve() + char *iface = NULL; + char *result = NULL; + +- status = fi_param_get( &mlx_prov, "mlx_ns_iface", ++ status = fi_param_get( &mlx_prov, "ns_iface", + &iface); + if (!status) { + iface = NULL; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_init.c +index dd6cb5c55..fbbe14a78 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_init.c +@@ -79,7 +79,7 @@ struct fi_domain_attr mlx_domain_attrs = { + .data_progress = FI_PROGRESS_MANUAL, + .resource_mgmt = FI_RM_DISABLED, + .av_type = FI_AV_UNSPEC, +- .mr_mode = OFI_MR_BASIC_MAP, ++ .mr_mode = OFI_MR_BASIC_MAP | FI_MR_BASIC, + .mr_key_size = -1, /*Should be setup after init*/ + .tx_ctx_cnt = 1, + .rx_ctx_cnt = 1, +@@ -166,26 +166,26 @@ static int mlx_getinfo ( + mlx_descriptor.config = NULL; + + status = fi_param_get( &mlx_prov, +- "mlx_tinject_limit", ++ "tinject_limit", + &inject_thresh); + if (!status) + inject_thresh = FI_MLX_DEFAULT_INJECT_SIZE; + + FI_INFO( &mlx_prov, FI_LOG_CORE, +- "used inlect size = %d \n", inject_thresh); ++ "used inject size = %d \n", inject_thresh); + +- status = fi_param_get( &mlx_prov, "mlx_config", &configfile_name); ++ status = fi_param_get( &mlx_prov, "config", &configfile_name); + if (!status) { + configfile_name = NULL; + } + + /* NS is disabled by default */ +- status = fi_param_get( &mlx_prov, "mlx_ns_enable", ++ status = fi_param_get( &mlx_prov, "ns_enable", + &mlx_descriptor.use_ns); + if (!status) { + mlx_descriptor.use_ns = 0; + } +- status = fi_param_get( &mlx_prov, "mlx_ns_port", ++ status = fi_param_get( &mlx_prov, "ns_port", + &mlx_descriptor.ns_port); + if (!status) { + mlx_descriptor.ns_port = FI_MLX_DEFAULT_NS_PORT; +@@ -260,7 +260,7 @@ void mlx_cleanup(void) + struct fi_provider mlx_prov = { + .name = FI_MLX_FABRIC_NAME, + .version = FI_MLX_VERSION, +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = mlx_getinfo, + .fabric = mlx_fabric_open, + .cleanup = mlx_cleanup, +@@ -271,23 +271,23 @@ MLX_INI + { + mlx_init_errcodes(); + fi_param_define( &mlx_prov, +- "mlx_config", FI_PARAM_STRING, ++ "config", FI_PARAM_STRING, + "MLX configuration file name"); + + fi_param_define(&mlx_prov, +- "mlx_tinject_limit", FI_PARAM_INT, ++ "tinject_limit", FI_PARAM_INT, + "Maximal tinject message size"); + + fi_param_define(&mlx_prov, +- "mlx_ns_port", FI_PARAM_INT, ++ "ns_port", FI_PARAM_INT, + "MLX Name server port"); + + fi_param_define(&mlx_prov, +- "mlx_ns_enable",FI_PARAM_BOOL, ++ "ns_enable",FI_PARAM_BOOL, + "Enforce usage of name server for MLX provider"); + + fi_param_define(&mlx_prov, +- "mlx_ns_iface",FI_PARAM_STRING, ++ "ns_iface",FI_PARAM_STRING, + "Specify IPv4 network interface for MLX provider's name server'"); + return &mlx_prov; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_tagged.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_tagged.c +index e0d54d40b..afb3f090a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_tagged.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mlx/src/mlx_tagged.c +@@ -98,19 +98,19 @@ static ssize_t mlx_tagged_recvmsg( + *t_entry = (req->completion.tagged); + + if (req->type == MLX_FI_REQ_UNEXPECTED_ERR) { +- struct util_cq_err_entry* err; ++ struct util_cq_oflow_err_entry* err; + req->completion.error.olen -= req->completion.tagged.len; + t_entry->flags |= UTIL_FLAG_ERROR; + +- err = calloc(1, sizeof(struct util_cq_err_entry)); ++ err = calloc(1, sizeof(struct util_cq_oflow_err_entry)); + if (!err) { + FI_WARN(&mlx_prov, FI_LOG_CQ, + "out of memory, cannot report CQ error\n"); + fastlock_release(&cq->cq_lock); + return -FI_ENOMEM; + } +- err->err_entry = (req->completion.error); +- slist_insert_tail(&err->list_entry, &cq->err_list); ++ err->comp = (req->completion.error); ++ slist_insert_tail(&err->list_entry, &cq->oflow_err_list); + } + + ofi_cirque_commit(cq->cirq); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/Makefile.include +new file mode 100644 +index 000000000..f993fa941 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/Makefile.include +@@ -0,0 +1,28 @@ ++if HAVE_MRAIL ++_mrail_files = \ ++ prov/mrail/src/mrail_init.c \ ++ prov/mrail/src/mrail_attr.c \ ++ prov/mrail/src/mrail_fabric.c \ ++ prov/mrail/src/mrail_domain.c \ ++ prov/mrail/src/mrail_cq.c \ ++ prov/mrail/src/mrail_ep.c \ ++ prov/mrail/src/mrail_av.c \ ++ prov/mrail/src/mrail_rma.c \ ++ prov/mrail/src/mrail.h ++ ++if HAVE_MRAIL_DL ++pkglib_LTLIBRARIES += libmrail-fi.la ++libmrail_fi_la_SOURCES = $(_mrail_files) $(common_srcs) ++libmrail_fi_la_LIBADD = $(linkback) $(mrail_shm_LIBS) ++libmrail_fi_la_LDFLAGS = -module -avoid-version -shared -export-dynamic ++libmrail_fi_la_DEPENDENCIES = $(linkback) ++else !HAVE_MRAIL_DL ++src_libfabric_la_SOURCES += $(_mrail_files) ++src_libfabric_la_LIBADD += $(mrail_shm_LIBS) ++endif !HAVE_MRAIL_DL ++ ++prov_install_man_pages += man/man7/fi_mrail.7 ++ ++endif HAVE_MRAIL ++ ++prov_dist_man_pages += man/man7/fi_mrail.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/configure.m4 +new file mode 100644 +index 000000000..a5f7c1ad8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/configure.m4 +@@ -0,0 +1,15 @@ ++dnl Configury specific to the libfabric mrail provider ++ ++dnl Called to configure this provider ++dnl ++dnl Arguments: ++dnl ++dnl $1: action if configured successfully ++dnl $2: action if not configured successfully ++dnl ++AC_DEFUN([FI_MRAIL_CONFIGURE],[ ++ # Determine if we can support the mrail provider ++ mrail_h_happy=0 ++ AS_IF([test x"$enable_mrail" != x"no"], [mrail_h_happy=1]) ++ AS_IF([test $mrail_h_happy -eq 1], [$1], [$2]) ++]) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/TODO b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/TODO +new file mode 100644 +index 000000000..ec6f16658 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/TODO +@@ -0,0 +1,28 @@ ++TODO: ++----- ++ ++Feature / issue Status ++---------------------------------------------------- ++CQ in-progress ++AV in-progress ++EP in-progress ++small msgs (un-ordered) in-progress ++support for multiple layering - ++(above is needed for multi-rail ++ over ofi_rxm provider) ++OFI_MULTI_RAIL env var - ++fi_dupinfo issue - ++App mode bit to make it aware - ++of list of rails in fi_info ++addressing: - ++ - FI_ADDR_STRV ++ - primary/failover ++small msg ordering: - ++ - bounce buffers ++large msg support: - ++ - use FI_VARIABLE_MSG ++Memory registration - ++RMA - ++rail failure handling - ++rail selection / striping algorithm - ++Atomics - +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail.h +new file mode 100644 +index 000000000..851bf86e0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail.h +@@ -0,0 +1,363 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "rdma/providers/fi_log.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define MRAIL_MAJOR_VERSION 1 ++#define MRAIL_MINOR_VERSION 0 ++ ++#define MRAIL_MAX_INFO 100 ++ ++#define MRAIL_PASSTHRU_MODES (0ULL) ++#define MRAIL_PASSTHRU_MR_MODES (OFI_MR_BASIC_MAP) ++ ++#define MRAIL_RAIL_CQ_FORMAT FI_CQ_FORMAT_TAGGED ++ ++extern struct fi_info mrail_info; ++extern struct fi_provider mrail_prov; ++extern struct util_prov mrail_util_prov; ++extern struct fi_fabric_attr mrail_fabric_attr; ++ ++extern struct fi_info *mrail_info_vec[MRAIL_MAX_INFO]; ++extern size_t mrail_num_info; ++ ++extern struct fi_ops_rma mrail_ops_rma; ++ ++struct mrail_match_attr { ++ fi_addr_t addr; ++ uint64_t tag; ++}; ++ ++struct mrail_unexp_msg_entry { ++ struct dlist_entry entry; ++ fi_addr_t addr; ++ uint64_t tag; ++ void *context; ++ char data[]; /* completion entry */ ++}; ++ ++struct mrail_recv_queue; ++ ++typedef struct mrail_unexp_msg_entry * ++(*mrail_get_unexp_msg_entry_func)(struct mrail_recv_queue *recv_queue, void *context); ++ ++struct mrail_recv_queue { ++ struct fi_provider *prov; ++ struct dlist_entry recv_list; ++ struct dlist_entry unexp_msg_list; ++ dlist_func_t *match_recv; ++ dlist_func_t *match_unexp; ++ mrail_get_unexp_msg_entry_func get_unexp_msg_entry; ++}; ++ ++struct mrail_recv * ++mrail_match_recv_handle_unexp(struct mrail_recv_queue *recv_queue, uint64_t tag, ++ uint64_t addr, char *data, size_t len, void *context); ++ ++/* mrail protocol */ ++#define MRAIL_HDR_VERSION 1 ++ ++struct mrail_hdr { ++ uint8_t version; ++ uint8_t op; ++ uint8_t padding[2]; ++ uint32_t seq; ++ uint64_t tag; ++}; ++ ++struct mrail_tx_buf { ++ /* context should stay at top and would get overwritten on ++ * util buf release */ ++ void *context; ++ struct mrail_ep *ep; ++ /* flags would be used for both operation flags (FI_COMPLETION) ++ * and completion flags (FI_MSG, FI_TAGGED, etc) */ ++ uint64_t flags; ++ struct mrail_hdr hdr; ++}; ++ ++struct mrail_pkt { ++ struct mrail_hdr hdr; ++ char data[]; ++}; ++ ++/* TX & RX processing */ ++ ++#define MRAIL_IOV_LIMIT 5 ++ ++struct mrail_rx_buf { ++ struct fid_ep *rail_ep; ++ struct mrail_pkt pkt; ++}; ++ ++struct mrail_recv { ++ struct iovec iov[MRAIL_IOV_LIMIT]; ++ void *desc[MRAIL_IOV_LIMIT]; ++ uint8_t count; ++ void *context; ++ uint64_t flags; ++ uint64_t comp_flags; ++ struct mrail_hdr hdr; ++ struct mrail_ep *ep; ++ struct dlist_entry entry; ++ fi_addr_t addr; ++ uint64_t tag; ++ uint64_t ignore; ++}; ++DECLARE_FREESTACK(struct mrail_recv, mrail_recv_fs); ++ ++int mrail_cq_process_buf_recv(struct fi_cq_tagged_entry *comp, ++ struct mrail_recv *recv); ++ ++struct mrail_fabric { ++ struct util_fabric util_fabric; ++ struct fi_info *info; ++ struct fid_fabric **fabrics; ++ size_t num_fabrics; ++}; ++ ++struct mrail_domain { ++ struct util_domain util_domain; ++ struct fi_info *info; ++ struct fid_domain **domains; ++ size_t num_domains; ++ size_t addrlen; ++}; ++ ++struct mrail_av { ++ struct util_av util_av; ++ struct fid_av **avs; ++ size_t *rail_addrlen; ++ size_t num_avs; ++}; ++ ++struct mrail_peer_info { ++ struct slist ooo_recv_queue; ++ fi_addr_t addr; ++ uint32_t seq_no; ++ uint32_t expected_seq_no; ++}; ++ ++struct mrail_ooo_recv { ++ struct slist_entry entry; ++ struct fi_cq_tagged_entry comp; ++ uint32_t seq_no; ++}; ++ ++typedef int (*mrail_cq_process_comp_func_t)(struct fi_cq_tagged_entry *comp, ++ fi_addr_t src_addr); ++struct mrail_cq { ++ struct util_cq util_cq; ++ struct fid_cq **cqs; ++ size_t num_cqs; ++ mrail_cq_process_comp_func_t process_comp; ++}; ++ ++struct mrail_ep { ++ struct util_ep util_ep; ++ struct fi_info *info; ++ struct { ++ struct fid_ep *ep; ++ struct fi_info *info; ++ } *rails; ++ size_t num_eps; ++ ofi_atomic32_t tx_rail; ++ ofi_atomic32_t rx_rail; ++ ++ struct mrail_recv_fs *recv_fs; ++ struct mrail_recv_queue recv_queue; ++ struct mrail_recv_queue trecv_queue; ++ ++ struct util_buf_pool *req_pool; ++ struct util_buf_pool *ooo_recv_pool; ++ struct util_buf_pool *tx_buf_pool; ++ struct slist deferred_reqs; ++}; ++ ++struct mrail_addr_key { ++ uint64_t base_addr; ++ uint64_t key; ++}; ++ ++struct mrail_mr { ++ struct fid_mr mr_fid; ++ size_t num_mrs; ++ struct { ++ uint64_t base_addr; ++ struct fid_mr *mr; ++ } rails[]; ++}; ++ ++int mrail_get_core_info(uint32_t version, const char *node, const char *service, ++ uint64_t flags, const struct fi_info *hints, ++ struct fi_info **core_info); ++int mrail_fabric_open(struct fi_fabric_attr *attr, struct fid_fabric **fabric, ++ void *context); ++int mrail_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++int mrail_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq_fid, void *context); ++int mrail_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av_fid, void *context); ++int mrail_ep_open(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context); ++ ++static inline struct mrail_recv * ++mrail_pop_recv(struct mrail_ep *mrail_ep) ++{ ++ struct mrail_recv *recv; ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ recv = freestack_isempty(mrail_ep->recv_fs) ? NULL : ++ freestack_pop(mrail_ep->recv_fs); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return recv; ++} ++ ++static inline void ++mrail_push_recv(struct mrail_recv *recv) ++{ ++ ofi_ep_lock_acquire(&recv->ep->util_ep); ++ freestack_push(recv->ep->recv_fs, recv); ++ ofi_ep_lock_release(&recv->ep->util_ep); ++} ++ ++static inline struct fi_info *mrail_get_info_cached(char *name) ++{ ++ struct fi_info *info; ++ size_t i; ++ ++ for (i = 0; i < mrail_num_info; i++) { ++ info = mrail_info_vec[i]; ++ if (!strcmp(info->fabric_attr->name, name)) ++ return info; ++ } ++ ++ FI_WARN(&mrail_prov, FI_LOG_CORE, "Unable to find matching " ++ "fi_info in mrail_info_vec for given fabric name\n"); ++ return NULL; ++} ++ ++static inline int mrail_close_fids(struct fid **fids, size_t count) ++{ ++ int ret, retv = 0; ++ size_t i; ++ ++ for (i = 0; i < count; i++) { ++ if (fids[i]) { ++ ret = fi_close(fids[i]); ++ if (ret) ++ retv = ret; ++ } ++ } ++ return retv; ++} ++ ++static inline size_t mrail_get_tx_rail(struct mrail_ep *mrail_ep) ++{ ++ return (ofi_atomic_inc32(&mrail_ep->tx_rail) - 1) % mrail_ep->num_eps; ++} ++ ++struct mrail_subreq { ++ struct fi_context context; ++ struct mrail_req *parent; ++ void *descs[MRAIL_IOV_LIMIT]; ++ struct iovec iov[MRAIL_IOV_LIMIT]; ++ struct fi_rma_iov rma_iov[MRAIL_IOV_LIMIT]; ++ size_t iov_count; ++ size_t rma_iov_count; ++}; ++ ++struct mrail_req { ++ struct slist_entry entry; ++ uint64_t flags; ++ uint64_t data; ++ struct mrail_ep *mrail_ep; ++ struct mrail_peer_info *peer_info; ++ struct fi_cq_tagged_entry comp; ++ ofi_atomic32_t expected_subcomps; ++ int op_type; ++ int pending_subreq; ++ struct mrail_subreq subreqs[]; ++}; ++ ++static inline ++struct mrail_req *mrail_alloc_req(struct mrail_ep *mrail_ep) ++{ ++ struct mrail_req *req; ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ req = util_buf_alloc(mrail_ep->req_pool); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ return req; ++} ++ ++static inline ++void mrail_free_req(struct mrail_ep *mrail_ep, struct mrail_req *req) ++{ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ util_buf_release(mrail_ep->req_pool, req); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++} ++ ++void mrail_progress_deferred_reqs(struct mrail_ep *mrail_ep); ++ ++void mrail_poll_cq(struct util_cq *cq); ++ ++static inline void mrail_cntr_incerr(struct util_cntr *cntr) ++{ ++ if (cntr) { ++ cntr->cntr_fid.ops->adderr(&cntr->cntr_fid, 1); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_attr.c +new file mode 100644 +index 000000000..7786b379b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_attr.c +@@ -0,0 +1,106 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "mrail.h" ++ ++struct fi_tx_attr mrail_tx_attr = { ++ .caps = ~0x0ULL, ++ .msg_order = ~0x0ULL, ++ .comp_order = ~0x0ULL, ++ .inject_size = SIZE_MAX, ++ .size = SIZE_MAX, ++ .iov_limit = MRAIL_IOV_LIMIT, ++ .rma_iov_limit = SIZE_MAX, ++}; ++ ++struct fi_rx_attr mrail_rx_attr = { ++ .caps = ~0x0ULL, ++ .msg_order = ~0x0ULL, ++ .comp_order = ~0x0ULL, ++ .total_buffered_recv = SIZE_MAX, ++ .size = SIZE_MAX, ++ .iov_limit = SIZE_MAX, ++}; ++ ++struct fi_ep_attr mrail_ep_attr = { ++ .type = FI_EP_UNSPEC, ++ .protocol = FI_PROTO_MRAIL, ++ .protocol_version = 1, ++ .max_msg_size = SIZE_MAX, ++ .msg_prefix_size = SIZE_MAX, ++ .max_order_raw_size = SIZE_MAX, ++ .max_order_war_size = SIZE_MAX, ++ .max_order_waw_size = SIZE_MAX, ++ .tx_ctx_cnt = SIZE_MAX, ++ .rx_ctx_cnt = SIZE_MAX, ++ .auth_key_size = SIZE_MAX, ++}; ++ ++struct fi_domain_attr mrail_domain_attr = { ++ .name = "ofi_mrail_domain", ++ .threading = FI_THREAD_SAFE, ++ .control_progress = FI_PROGRESS_AUTO, ++ .data_progress = FI_PROGRESS_AUTO, ++ .resource_mgmt = FI_RM_ENABLED, ++ .av_type = FI_AV_UNSPEC, ++ .mr_mode = FI_MR_BASIC | FI_MR_SCALABLE | FI_MR_RAW, ++ .mr_key_size = SIZE_MAX, ++ .cq_data_size = SIZE_MAX, ++ .cq_cnt = SIZE_MAX, ++ .ep_cnt = SIZE_MAX, ++ .tx_ctx_cnt = SIZE_MAX, ++ .rx_ctx_cnt = SIZE_MAX, ++ .max_ep_tx_ctx = SIZE_MAX, ++ .max_ep_rx_ctx = SIZE_MAX, ++ .max_ep_stx_ctx = SIZE_MAX, ++ .max_ep_srx_ctx = SIZE_MAX, ++ .cntr_cnt = SIZE_MAX, ++ .mr_iov_limit = SIZE_MAX, ++ .caps = ~0x0ULL, ++ .auth_key_size = SIZE_MAX, ++ .max_err_data = SIZE_MAX, ++ .mr_cnt = SIZE_MAX, ++}; ++ ++struct fi_fabric_attr mrail_fabric_attr = { ++ .prov_version = FI_VERSION(MRAIL_MAJOR_VERSION, MRAIL_MINOR_VERSION), ++ .name = "ofi_mrail_fabric", ++}; ++ ++struct fi_info mrail_info = { ++ .caps = ~0x0ULL, ++ .tx_attr = &mrail_tx_attr, ++ .rx_attr = &mrail_rx_attr, ++ .ep_attr = &mrail_ep_attr, ++ .domain_attr = &mrail_domain_attr, ++ .fabric_attr = &mrail_fabric_attr ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_av.c +new file mode 100644 +index 000000000..d55a5dbb9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_av.c +@@ -0,0 +1,204 @@ ++#include "mrail.h" ++ ++static int mrail_av_close(struct fid *fid) ++{ ++ struct mrail_av *mrail_av = container_of(fid, struct mrail_av, ++ util_av.av_fid); ++ int ret, retv = 0; ++ ++ ret = mrail_close_fids((struct fid **)mrail_av->avs, mrail_av->num_avs); ++ if (ret) ++ retv = ret; ++ free(mrail_av->avs); ++ free(mrail_av->rail_addrlen); ++ ++ ret = ofi_av_close(&mrail_av->util_av); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_av); ++ return retv; ++} ++ ++static int mrail_av_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++{ ++ return ofi_av_bind(fid, bfid, flags); ++} ++ ++static const char *mrail_av_straddr(struct fid_av *av, const void *addr, ++ char *buf, size_t *len) ++{ ++ return NULL; ++} ++ ++static int mrail_av_insertsvc(struct fid_av *av, const char *node, ++ const char *service, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static int mrail_av_insertsym(struct fid_av *av_fid, const char *node, size_t nodecnt, ++ const char *service, size_t svccnt, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static int mrail_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, ++ size_t *addrlen) ++{ ++ return -FI_ENOSYS; ++ ++} ++ ++static int mrail_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count, ++ uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static int mrail_av_insert(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ struct mrail_domain *mrail_domain; ++ struct mrail_av *mrail_av; ++ struct mrail_peer_info *peer_info; ++ size_t i, j, offset, num_inserted = 0; ++ fi_addr_t index; ++ int ret; ++ ++ mrail_av = container_of(av_fid, struct mrail_av, util_av.av_fid); ++ mrail_domain = container_of(mrail_av->util_av.domain, struct mrail_domain, ++ util_domain); ++ ++ /* TODO if it's more optimal to insert multiple addresses at once ++ * convert ADDR1: ADDR1_RAIL1:ADDR1_RAIL2 ++ * ADDR2: ADDR2_RAIL1:ADDR2_RAIL2 ++ * to ++ * ADDR1: ADDR1_RAIL1:ADDR2_RAIL1 ++ * ADDR2: ADDR1_RAIL2:ADDR2_RAIL2 ++ */ ++ ++ peer_info = calloc(1, mrail_av->util_av.addrlen); ++ if (!peer_info) ++ return -FI_ENOMEM; ++ slist_init(&peer_info->ooo_recv_queue); ++ ++ for (i = 0; i < count; i++) { ++ offset = i * mrail_domain->addrlen; ++ for (j = 0; j < mrail_av->num_avs; j++) { ++ ofi_straddr_dbg(&mrail_prov, FI_LOG_EP_CTRL, ++ "addr", addr); ++ ret = fi_av_insert(mrail_av->avs[j], ++ (char *)addr + offset, 1, ++ NULL, flags, NULL); ++ if (ret != 1) { ++ free(peer_info); ++ return ret; ++ } ++ offset += mrail_av->rail_addrlen[j]; ++ } ++ ret = ofi_av_insert_addr(&mrail_av->util_av, peer_info, ++ &index); ++ if (fi_addr) { ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_AV, \ ++ "Unable to get rail fi_addr\n"); ++ peer_info->addr = FI_ADDR_NOTAVAIL; ++ } else { ++ peer_info->addr = index; ++ num_inserted++; ++ } ++ fi_addr[i] = peer_info->addr; ++ } ++ } ++ ++ free(peer_info); ++ return num_inserted; ++} ++ ++static struct fi_ops_av mrail_av_ops = { ++ .size = sizeof(struct fi_ops_av), ++ .insert = mrail_av_insert, ++ .insertsvc = mrail_av_insertsvc, ++ .insertsym = mrail_av_insertsym, ++ .remove = mrail_av_remove, ++ .lookup = mrail_av_lookup, ++ .straddr = mrail_av_straddr, ++}; ++ ++static struct fi_ops mrail_av_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_av_close, ++ .bind = mrail_av_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++int mrail_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av_fid, void *context) ++{ ++ struct mrail_av *mrail_av; ++ struct mrail_domain *mrail_domain; ++ struct fi_av_attr rail_attr; ++ struct util_av_attr util_attr; ++ struct fi_info *fi; ++ size_t i; ++ int ret; ++ ++ mrail_domain = container_of(domain_fid, struct mrail_domain, ++ util_domain.domain_fid); ++ mrail_av = calloc(1, sizeof(*mrail_av)); ++ if (!mrail_av) ++ return -FI_ENOMEM; ++ ++ mrail_av->num_avs = mrail_domain->num_domains; ++ ++ util_attr.addrlen = sizeof(struct mrail_peer_info); ++ /* We just need a table to store the mapping */ ++ util_attr.flags = 0; ++ ++ if (attr->type == FI_AV_UNSPEC) ++ attr->type = FI_AV_TABLE; ++ ++ ret = ofi_av_init(&mrail_domain->util_domain, attr, &util_attr, ++ &mrail_av->util_av, context); ++ if (ret) { ++ free(mrail_av); ++ return ret; ++ } ++ ++ mrail_av->avs = calloc(mrail_av->num_avs, sizeof(*mrail_av->avs)); ++ if (!mrail_av->avs) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ mrail_av->rail_addrlen = calloc(mrail_av->num_avs, ++ sizeof(*mrail_av->rail_addrlen)); ++ if (!mrail_av->rail_addrlen) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ rail_attr = *attr; ++ rail_attr.type = FI_AV_TABLE; ++ for (i = 0, fi = mrail_domain->info->next; i < mrail_av->num_avs; ++ i++, fi = fi->next) { ++ ret = fi_av_open(mrail_domain->domains[i], &rail_attr, ++ &mrail_av->avs[i], context); ++ if (ret) ++ goto err; ++ mrail_av->rail_addrlen[i] = fi->src_addrlen; ++ } ++ ++ mrail_av->util_av.av_fid.fid.ops = &mrail_av_fi_ops; ++ mrail_av->util_av.av_fid.ops = &mrail_av_ops; ++ *av_fid = &mrail_av->util_av.av_fid; ++ ++ return 0; ++err: ++ mrail_av_close(&mrail_av->util_av.av_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_cq.c +new file mode 100644 +index 000000000..4e03f81a4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_cq.c +@@ -0,0 +1,498 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "mrail.h" ++ ++int mrail_cq_write_recv_comp(struct mrail_ep *mrail_ep, struct mrail_hdr *hdr, ++ struct fi_cq_tagged_entry *comp, ++ struct mrail_recv *recv) ++{ ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "finish recv: length: %zu " ++ "tag: 0x%" PRIx64 "\n", comp->len - sizeof(struct mrail_pkt), ++ hdr->tag); ++ ofi_ep_rx_cntr_inc(&mrail_ep->util_ep); ++ if (!(recv->flags & FI_COMPLETION)) ++ return 0; ++ return ofi_cq_write(mrail_ep->util_ep.rx_cq, recv->context, ++ recv->comp_flags | ++ (comp->flags & FI_REMOTE_CQ_DATA), ++ comp->len - sizeof(struct mrail_pkt), ++ NULL, comp->data, hdr->tag); ++} ++ ++int mrail_cq_process_buf_recv(struct fi_cq_tagged_entry *comp, ++ struct mrail_recv *recv) ++{ ++ struct fi_recv_context *recv_ctx = comp->op_context; ++ struct fi_msg msg = { ++ .context = recv_ctx, ++ }; ++ struct mrail_ep *mrail_ep; ++ struct mrail_pkt *mrail_pkt; ++ size_t size, len; ++ int ret, retv = 0; ++ ++ if (comp->flags & FI_MORE) { ++ msg.msg_iov = recv->iov; ++ msg.iov_count = recv->count; ++ msg.addr = recv->addr; ++ ++ recv_ctx->context = recv; ++ ++ ret = fi_recvmsg(recv_ctx->ep, &msg, FI_CLAIM); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to claim buffered recv\n"); ++ assert(0); ++ // TODO write cq error entry ++ } ++ return ret; ++ } ++ ++ mrail_ep = recv_ctx->ep->fid.context; ++ mrail_pkt = (struct mrail_pkt *)comp->buf; ++ ++ len = comp->len - sizeof(*mrail_pkt); ++ ++ size = ofi_copy_to_iov(&recv->iov[1], recv->count - 1, 0, ++ mrail_pkt->data, len); ++ ++ if (size < len) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, "Message truncated recv buf " ++ "size: %zu message length: %zu\n", size, len); ++ ret = ofi_cq_write_error_trunc( ++ mrail_ep->util_ep.rx_cq, recv->context, ++ recv->comp_flags | (comp->flags & FI_REMOTE_CQ_DATA), ++ 0, NULL, comp->data, mrail_pkt->hdr.tag, comp->len - size); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to write truncation error to util cq\n"); ++ retv = ret; ++ } ++ mrail_cntr_incerr(mrail_ep->util_ep.rx_cntr); ++ goto out; ++ } ++ ret = mrail_cq_write_recv_comp(mrail_ep, &mrail_pkt->hdr, comp, recv); ++ if (ret) ++ retv = ret; ++out: ++ ret = fi_recvmsg(recv_ctx->ep, &msg, FI_DISCARD); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to discard buffered recv\n"); ++ retv = ret; ++ } ++ mrail_push_recv(recv); ++ return retv; ++} ++ ++/* Should only be called while holding the EP's lock */ ++static struct mrail_recv *mrail_match_recv(struct mrail_ep *mrail_ep, ++ struct fi_cq_tagged_entry *comp, ++ int src_addr) ++{ ++ struct mrail_hdr *hdr = comp->buf; ++ struct mrail_recv *recv; ++ ++ if (hdr->op == ofi_op_msg) { ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "Got MSG op\n"); ++ recv = mrail_match_recv_handle_unexp(&mrail_ep->recv_queue, 0, ++ src_addr, (char *)comp, ++ sizeof(*comp), NULL); ++ } else { ++ assert(hdr->op == ofi_op_tagged); ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "Got TAGGED op with tag: 0x%" ++ PRIx64 "\n", hdr->tag); ++ recv = mrail_match_recv_handle_unexp(&mrail_ep->trecv_queue, ++ hdr->tag, src_addr, ++ (char *)comp, ++ sizeof(*comp), NULL); ++ } ++ ++ return recv; ++} ++ ++static ++struct mrail_ooo_recv *mrail_get_next_recv(struct mrail_peer_info *peer_info) ++{ ++ struct slist *queue = &peer_info->ooo_recv_queue; ++ struct mrail_ooo_recv *ooo_recv; ++ ++ if (!slist_empty(queue)) { ++ ooo_recv = container_of(queue->head, struct mrail_ooo_recv, ++ entry); ++ if (ooo_recv->seq_no == peer_info->expected_seq_no) { ++ slist_remove_head(queue); ++ peer_info->expected_seq_no++; ++ return ooo_recv; ++ } ++ } ++ return NULL; ++} ++ ++static int mrail_process_ooo_recvs(struct mrail_ep *mrail_ep, ++ struct mrail_peer_info *peer_info) ++{ ++ struct mrail_ooo_recv *ooo_recv; ++ struct mrail_recv *recv; ++ int ret; ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ ooo_recv = mrail_get_next_recv(peer_info); ++ while (ooo_recv) { ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "found ooo_recv seq=%d\n", ++ ooo_recv->seq_no); ++ /* Requesting FI_AV_TABLE from the underlying provider allows ++ * us to use peer_info->addr as an int here. */ ++ recv = mrail_match_recv(mrail_ep, &ooo_recv->comp, ++ (int) peer_info->addr); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ if (recv) { ++ ret = mrail_cq_process_buf_recv(&ooo_recv->comp, recv); ++ if (ret) ++ return ret; ++ } ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ util_buf_release(mrail_ep->ooo_recv_pool, ooo_recv); ++ ooo_recv = mrail_get_next_recv(peer_info); ++ } ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return 0; ++} ++ ++static int mrail_ooo_recv_before(struct slist_entry *item, const void *arg) ++{ ++ struct mrail_ooo_recv *ooo_recv; ++ struct mrail_ooo_recv *new_recv; ++ ++ ooo_recv = container_of(item, struct mrail_ooo_recv, entry); ++ new_recv = container_of(arg, struct mrail_ooo_recv, entry); ++ return (new_recv->seq_no < ooo_recv->seq_no); ++} ++ ++/* Should only be called while holding the EP's lock */ ++static void mrail_save_ooo_recv(struct mrail_ep *mrail_ep, ++ struct mrail_peer_info *peer_info, ++ uint32_t seq_no, ++ struct fi_cq_tagged_entry *comp) ++{ ++ struct slist *queue = &peer_info->ooo_recv_queue; ++ struct mrail_ooo_recv *ooo_recv; ++ ++ ooo_recv = util_buf_alloc(mrail_ep->ooo_recv_pool); ++ if (!ooo_recv) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, "Cannot allocate ooo_recv\n"); ++ assert(0); ++ } ++ ooo_recv->seq_no = seq_no; ++ memcpy(&ooo_recv->comp, comp, sizeof(*comp)); ++ ++ slist_insert_before_first_match(queue, mrail_ooo_recv_before, ++ &ooo_recv->entry); ++ ++ FI_DBG(&mrail_prov, FI_LOG_CQ, "saved ooo_recv seq=%d\n", seq_no); ++} ++ ++static int mrail_handle_recv_completion(struct fi_cq_tagged_entry *comp, ++ fi_addr_t src_addr) ++{ ++ struct fi_recv_context *recv_ctx; ++ struct mrail_peer_info *peer_info; ++ struct mrail_ep *mrail_ep; ++ struct mrail_recv *recv; ++ struct mrail_hdr *hdr; ++ uint32_t seq_no; ++ int ret; ++ ++ if (comp->flags & FI_CLAIM) { ++ /* This message has already been processed and claimed. ++ * See mrail_cq_process_buf_recv(). ++ */ ++ recv = comp->op_context; ++ assert(recv->hdr.version == MRAIL_HDR_VERSION); ++ ret = mrail_cq_write_recv_comp(recv->ep, &recv->hdr, comp, ++ recv); ++ mrail_push_recv(recv); ++ goto exit; ++ } ++ ++ recv_ctx = comp->op_context; ++ mrail_ep = recv_ctx->ep->fid.context; ++ hdr = comp->buf; ++ ++ // TODO make rxm send buffered recv amount of data for large message ++ assert(hdr->version == MRAIL_HDR_VERSION); ++ ++ seq_no = ntohl(hdr->seq); ++ peer_info = ofi_av_get_addr(mrail_ep->util_ep.av, (int) src_addr); ++ FI_DBG(&mrail_prov, FI_LOG_CQ, ++ "ep=%p peer=%d received seq=%d, expected=%d\n", ++ mrail_ep, (int)peer_info->addr, seq_no, ++ peer_info->expected_seq_no); ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ if (seq_no == peer_info->expected_seq_no) { ++ /* This message was received in order */ ++ peer_info->expected_seq_no++; ++ /* Requesting FI_AV_TABLE from the underlying provider allows ++ * us to use src_addr as an int here. */ ++ recv = mrail_match_recv(mrail_ep, comp, (int) src_addr); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ if (recv) { ++ ret = mrail_cq_process_buf_recv(comp, recv); ++ if (ret) ++ goto exit; ++ } ++ ++ /* Process any next-in-order message that had already arrived */ ++ ret = mrail_process_ooo_recvs(mrail_ep, peer_info); ++ } else { ++ /* This message was received early. ++ * Save it into the out-of-order recv queue. ++ */ ++ mrail_save_ooo_recv(mrail_ep, peer_info, seq_no, comp); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ret = 0; ++ } ++exit: ++ return ret; ++} ++ ++static int mrail_cq_close(fid_t fid) ++{ ++ struct mrail_cq *mrail_cq = container_of(fid, struct mrail_cq, util_cq.cq_fid.fid); ++ int ret, retv = 0; ++ ++ ret = mrail_close_fids((struct fid **)mrail_cq->cqs, ++ mrail_cq->num_cqs); ++ if (ret) ++ retv = ret; ++ free(mrail_cq->cqs); ++ ++ ret = ofi_cq_cleanup(&mrail_cq->util_cq); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_cq); ++ return retv; ++} ++ ++static struct fi_ops mrail_cq_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_cq_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_cq mrail_cq_ops = { ++ .size = sizeof(struct fi_ops_cq), ++ .read = ofi_cq_read, ++ .readfrom = ofi_cq_readfrom, ++ .readerr = ofi_cq_readerr, ++ .sread = ofi_cq_sread, ++ .sreadfrom = ofi_cq_sreadfrom, ++ .signal = ofi_cq_signal, ++ // TODO define cq strerror, may need to pass rail index ++ // in err_data ++ .strerror = fi_no_cq_strerror, ++}; ++ ++static void mrail_handle_rma_completion(struct util_cq *cq, ++ struct fi_cq_tagged_entry *comp) ++{ ++ int ret; ++ struct mrail_req *req; ++ struct mrail_subreq *subreq; ++ ++ subreq = comp->op_context; ++ req = subreq->parent; ++ ++ if (ofi_atomic_dec32(&req->expected_subcomps) == 0) { ++ ret = ofi_cq_write(cq, req->comp.op_context, req->comp.flags, ++ req->comp.len, req->comp.buf, req->comp.data, ++ req->comp.tag); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Cannot write to util cq\n"); ++ /* This should not happen unless totally out of memory, ++ * in which case there is nothing we can do. */ ++ assert(0); ++ } ++ ++ if (comp->flags & FI_WRITE) ++ ofi_ep_wr_cntr_inc(&req->mrail_ep->util_ep); ++ else ++ ofi_ep_rd_cntr_inc(&req->mrail_ep->util_ep); ++ ++ mrail_free_req(req->mrail_ep, req); ++ } ++} ++ ++void mrail_poll_cq(struct util_cq *cq) ++{ ++ struct mrail_cq *mrail_cq; ++ struct mrail_tx_buf *tx_buf; ++ struct fi_cq_tagged_entry comp; ++ fi_addr_t src_addr; ++ size_t i; ++ int ret; ++ ++ mrail_cq = container_of(cq, struct mrail_cq, util_cq); ++ ++ for (i = 0; i < mrail_cq->num_cqs; i++) { ++ ret = fi_cq_readfrom(mrail_cq->cqs[i], &comp, 1, &src_addr); ++ if (ret == -FI_EAGAIN || !ret) ++ continue; ++ if (ret < 0) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to read rail completion: %s\n", ++ fi_strerror(-ret)); ++ goto err1; ++ } ++ // TODO handle variable length message ++ if (comp.flags & FI_RECV) { ++ ret = mrail_cq->process_comp(&comp, src_addr); ++ if (ret) ++ goto err1; ++ } else if (comp.flags & (FI_READ | FI_WRITE)) { ++ mrail_handle_rma_completion(cq, &comp); ++ } else if (comp.flags & FI_SEND) { ++ tx_buf = comp.op_context; ++ ++ ofi_ep_tx_cntr_inc(&tx_buf->ep->util_ep); ++ ++ if (tx_buf->flags & FI_COMPLETION) { ++ ret = ofi_cq_write(cq, tx_buf->context, ++ (tx_buf->flags & ++ (FI_TAGGED | FI_MSG)) | ++ FI_SEND, 0, NULL, 0, 0); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unable to write to util cq\n"); ++ goto err2; ++ } ++ } ++ ofi_ep_lock_acquire(&tx_buf->ep->util_ep); ++ util_buf_release(tx_buf->ep->tx_buf_pool, tx_buf); ++ ofi_ep_lock_release(&tx_buf->ep->util_ep); ++ } else { ++ /* We currently cannot support FI_REMOTE_READ and ++ * FI_REMOTE_WRITE because RMA operations are split ++ * across all rails. We would need to introduce some ++ * sort of protocol to keep track of remotely-initiated ++ * RMA operations. */ ++ assert(comp.flags & (FI_REMOTE_READ | FI_REMOTE_WRITE)); ++ FI_WARN(&mrail_prov, FI_LOG_CQ, ++ "Unsupported completion flag\n"); ++ } ++ } ++ ++ return; ++ ++err2: ++ ofi_ep_lock_acquire(&tx_buf->ep->util_ep); ++ util_buf_release(tx_buf->ep->tx_buf_pool, tx_buf); ++ ofi_ep_lock_release(&tx_buf->ep->util_ep); ++err1: ++ // TODO write error to cq ++ assert(0); ++} ++ ++static void mrail_cq_progress(struct util_cq *cq) ++{ ++ mrail_poll_cq(cq); ++ ++ /* Progress the bound EPs */ ++ ofi_cq_progress(cq); ++} ++ ++int mrail_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq_fid, void *context) ++{ ++ struct mrail_domain *mrail_domain; ++ struct mrail_cq *mrail_cq; ++ struct fi_cq_attr rail_cq_attr = { ++ .wait_obj = FI_WAIT_NONE, ++ .format = MRAIL_RAIL_CQ_FORMAT, ++ .size = attr->size, ++ }; ++ size_t i; ++ int ret; ++ ++ mrail_cq = calloc(1, sizeof(*mrail_cq)); ++ if (!mrail_cq) ++ return -FI_ENOMEM; ++ ++ ret = ofi_cq_init(&mrail_prov, domain, attr, &mrail_cq->util_cq, ++ &mrail_cq_progress, context); ++ if (ret) { ++ free(mrail_cq); ++ return ret; ++ } ++ ++ mrail_domain = container_of(domain, struct mrail_domain, ++ util_domain.domain_fid); ++ ++ mrail_cq->cqs = calloc(mrail_domain->num_domains, ++ sizeof(*mrail_cq->cqs)); ++ if (!mrail_cq->cqs) ++ goto err; ++ ++ mrail_cq->num_cqs = mrail_domain->num_domains; ++ ++ for (i = 0; i < mrail_cq->num_cqs; i++) { ++ ret = fi_cq_open(mrail_domain->domains[i], &rail_cq_attr, ++ &mrail_cq->cqs[i], NULL); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, ++ "Unable to open rail CQ\n"); ++ goto err; ++ } ++ } ++ ++ // TODO add regular process comp when FI_BUFFERED_RECV not set ++ mrail_cq->process_comp = mrail_handle_recv_completion; ++ ++ *cq_fid = &mrail_cq->util_cq.cq_fid; ++ (*cq_fid)->fid.ops = &mrail_cq_fi_ops; ++ (*cq_fid)->ops = &mrail_cq_ops; ++ ++ return 0; ++err: ++ mrail_cq_close(&mrail_cq->util_cq.cq_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_domain.c +new file mode 100644 +index 000000000..1b73f1cee +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_domain.c +@@ -0,0 +1,311 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "mrail.h" ++ ++static int mrail_domain_close(fid_t fid) ++{ ++ struct mrail_domain *mrail_domain = ++ container_of(fid, struct mrail_domain, util_domain.domain_fid.fid); ++ int ret, retv = 0; ++ ++ ret = mrail_close_fids((struct fid **)mrail_domain->domains, ++ mrail_domain->num_domains); ++ if (ret) ++ retv = ret; ++ free(mrail_domain->domains); ++ ++ ret = ofi_domain_close(&mrail_domain->util_domain); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_domain); ++ return retv; ++} ++ ++static int mrail_domain_map_raw(struct mrail_domain *mrail_domain, ++ struct fi_mr_map_raw *map) ++{ ++ struct mrail_addr_key *mr_map; ++ ++ /* Copy the raw key and use a pointer as the new key. */ ++ ++ mr_map = calloc(1, map->key_size); ++ if (!mr_map) { ++ return -FI_ENOMEM; ++ } ++ ++ memcpy(mr_map, map->raw_key, map->key_size); ++ ++ *(map->key) = (uint64_t)mr_map; ++ ++ return 0; ++} ++ ++static int mrail_domain_unmap_key(struct mrail_addr_key **mr_map) ++{ ++ assert(mr_map); ++ free(*mr_map); ++ return 0; ++} ++ ++static int mrail_domain_control(struct fid *fid, int command, void *arg) ++{ ++ struct mrail_domain *mrail_domain = container_of(fid, ++ struct mrail_domain, util_domain.domain_fid.fid); ++ ++ switch(command) { ++ case FI_MAP_RAW_MR: ++ return mrail_domain_map_raw(mrail_domain, arg); ++ case FI_UNMAP_KEY: ++ return mrail_domain_unmap_key(arg); ++ } ++ return -FI_EINVAL; ++} ++ ++static struct fi_ops mrail_domain_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_domain_close, ++ .bind = fi_no_bind, ++ .control = mrail_domain_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int mrail_mr_close(fid_t fid) ++{ ++ uint32_t i; ++ struct mrail_mr *mrail_mr = container_of(fid, struct mrail_mr, ++ mr_fid.fid); ++ ++ for (i = 0; i < mrail_mr->num_mrs; ++i) { ++ fi_close(&mrail_mr->rails[i].mr->fid); ++ } ++ return 0; ++} ++ ++static int mrail_mr_raw_attr(struct mrail_mr *mrail_mr, ++ struct fi_mr_raw_attr *attr) ++{ ++ uint32_t num_rails; ++ uint32_t i; ++ struct mrail_addr_key *rail; ++ size_t required_key_size; ++ ++ num_rails = mrail_mr->num_mrs; ++ ++ required_key_size = num_rails * sizeof(struct mrail_addr_key); ++ ++ if (*(attr->key_size) < required_key_size) { ++ *(attr->key_size) = required_key_size; ++ return -FI_ETOOSMALL; ++ } ++ ++ /* The raw key is the concatenation of one "struct mrail_addr_key" per ++ * rail. */ ++ for (i = 0, rail = (struct mrail_addr_key*)attr->raw_key; i < num_rails; ++ ++i, ++rail) { ++ rail->base_addr = mrail_mr->rails[i].base_addr; ++ rail->key = fi_mr_key(mrail_mr->rails[i].mr); ++ } ++ ++ *(attr->key_size) = required_key_size; ++ *(attr->base_addr) = 0; ++ ++ return 0; ++} ++ ++static int mrail_mr_control(struct fid *fid, int command, void *arg) ++{ ++ struct mrail_mr *mrail_mr = container_of(fid, struct mrail_mr, ++ mr_fid.fid); ++ ++ switch(command) { ++ case FI_GET_RAW_MR: ++ return mrail_mr_raw_attr(mrail_mr, arg); ++ } ++ return -FI_EINVAL; ++} ++ ++static struct fi_ops mrail_mr_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_mr_close, ++ .bind = fi_no_bind, ++ .control = mrail_mr_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int mrail_mr_reg(struct fid *domain_fid, const void *buf, size_t len, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ struct mrail_domain *mrail_domain = container_of(domain_fid, ++ struct mrail_domain, util_domain.domain_fid.fid); ++ size_t num_rails = mrail_domain->num_domains; ++ struct mrail_mr *mrail_mr; ++ struct fi_info *fi; ++ uint32_t rail; ++ int ret = 0; ++ ++ mrail_mr = calloc(1, sizeof(*mrail_mr) + ++ num_rails * sizeof(*mrail_mr->rails)); ++ if (!mrail_mr) { ++ return -FI_ENOMEM; ++ } ++ ++ for (rail = 0, fi = mrail_domain->info->next; ++ rail < mrail_domain->num_domains; ++ ++rail, fi = fi->next) { ++ ret = fi_mr_reg(mrail_domain->domains[rail], buf, len, access, ++ offset, requested_key, flags, ++ &mrail_mr->rails[rail].mr, context); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_DOMAIN, ++ "Unable to register memory, rail %" PRIu32 "\n", ++ rail); ++ goto err1; ++ } ++ mrail_mr->rails[rail].base_addr = ++ (fi->domain_attr->mr_mode & FI_MR_VIRT_ADDR ? ++ (uint64_t)buf : 0); ++ } ++ ++ mrail_mr->mr_fid.fid.fclass = FI_CLASS_MR; ++ mrail_mr->mr_fid.fid.context = context; ++ mrail_mr->mr_fid.fid.ops = &mrail_mr_ops; ++ mrail_mr->mr_fid.mem_desc = mrail_mr; ++ mrail_mr->mr_fid.key = FI_KEY_NOTAVAIL; ++ mrail_mr->num_mrs = mrail_domain->num_domains; ++ *mr = &mrail_mr->mr_fid; ++ ++ return 0; ++err1: ++ for (; rail != 0; --rail) { ++ fi_close(&mrail_mr->rails[rail].mr->fid); ++ } ++ free(mrail_mr); ++ return ret; ++} ++ ++static struct fi_ops_mr mrail_domain_mr_ops = { ++ .size = sizeof(struct fi_ops_mr), ++ .reg = mrail_mr_reg, ++ .regv = fi_no_mr_regv, ++ .regattr = fi_no_mr_regattr, ++}; ++ ++int mrail_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, ++ struct fid_cntr **cntr_fid, void *context) ++{ ++ int ret; ++ struct util_cntr *cntr; ++ ++ cntr = calloc(1, sizeof(*cntr)); ++ if (!cntr) ++ return -FI_ENOMEM; ++ ++ ret = ofi_cntr_init(&mrail_prov, domain, attr, cntr, ++ &ofi_cntr_progress, context); ++ if (ret) ++ goto error; ++ ++ *cntr_fid = &cntr->cntr_fid; ++ return FI_SUCCESS; ++ ++error: ++ free(cntr); ++ return ret; ++} ++ ++static struct fi_ops_domain mrail_domain_ops = { ++ .size = sizeof(struct fi_ops_domain), ++ .av_open = mrail_av_open, ++ .cq_open = mrail_cq_open, ++ .endpoint = mrail_ep_open, ++ .scalable_ep = fi_no_scalable_ep, ++ .cntr_open = mrail_cntr_open, ++ .poll_open = fi_no_poll_open, ++ .stx_ctx = fi_no_stx_context, ++ .srx_ctx = fi_no_srx_context, ++ .query_atomic = fi_no_query_atomic, ++}; ++ ++int mrail_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context) ++{ ++ struct mrail_fabric *mrail_fabric = ++ container_of(fabric, struct mrail_fabric, util_fabric.fabric_fid); ++ struct mrail_domain *mrail_domain; ++ struct fi_info *fi; ++ size_t i; ++ int ret; ++ ++ assert(!strcmp(mrail_fabric->info->fabric_attr->name, info->fabric_attr->name)); ++ ++ mrail_domain = calloc(1, sizeof(*mrail_domain)); ++ if (!mrail_domain) ++ return -FI_ENOMEM; ++ ++ ret = ofi_domain_init(fabric, info, &mrail_domain->util_domain, context); ++ if (ret) { ++ free(mrail_domain); ++ return ret; ++ } ++ ++ mrail_domain->info = mrail_fabric->info; ++ mrail_domain->num_domains = mrail_fabric->num_fabrics; ++ ++ mrail_domain->domains = calloc(mrail_domain->num_domains, ++ sizeof(*mrail_domain->domains)); ++ if (!mrail_domain->domains) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ for (i = 0, fi = mrail_domain->info->next; fi; fi = fi->next, i++) { ++ ret = fi_domain(mrail_fabric->fabrics[i], fi, ++ &mrail_domain->domains[i], context); ++ if (ret) ++ goto err; ++ ++ mrail_domain->addrlen += fi->src_addrlen; ++ } ++ ++ *domain = &mrail_domain->util_domain.domain_fid; ++ (*domain)->fid.ops = &mrail_domain_fi_ops; ++ (*domain)->mr = &mrail_domain_mr_ops; ++ (*domain)->ops = &mrail_domain_ops; ++ ++ return 0; ++err: ++ mrail_domain_close(&mrail_domain->util_domain.domain_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_ep.c +new file mode 100644 +index 000000000..eae9da40b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_ep.c +@@ -0,0 +1,960 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "mrail.h" ++ ++#define MRAIL_HDR_INITIALIZER(op_type, tag_val) \ ++{ \ ++ .version = MRAIL_HDR_VERSION, \ ++ .op = op_type, \ ++ .tag = tag_val, \ ++} ++ ++#define MRAIL_HDR_INITIALIZER_MSG MRAIL_HDR_INITIALIZER(ofi_op_msg, 0) ++ ++#define MRAIL_HDR_INITIALIZER_TAGGED(tag) \ ++ MRAIL_HDR_INITIALIZER(ofi_op_tagged, tag) ++ ++#define mrail_util_ep(ep_fid) \ ++ container_of(ep_fid, struct util_ep, ep_fid.fid) ++ ++#define mrail_comp_flag(ep_fid) \ ++ (mrail_util_ep(ep_fid)->tx_op_flags & FI_COMPLETION) ++ ++#define mrail_inject_flags(ep_fid) \ ++ ((mrail_util_ep(ep_fid)->tx_op_flags & ~FI_COMPLETION) | FI_INJECT) ++ ++static int mrail_match_recv_any(struct dlist_entry *item, const void *arg) ++{ ++ OFI_UNUSED(item); ++ OFI_UNUSED(arg); ++ return 1; ++} ++ ++static int mrail_match_recv_addr(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_match_attr *match_attr = (struct mrail_match_attr *)arg; ++ struct mrail_recv *recv = ++ container_of(item, struct mrail_recv, entry); ++ ++ return ofi_match_addr(recv->addr, match_attr->addr); ++} ++ ++static int mrail_match_recv_tag(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_match_attr *match_attr = (struct mrail_match_attr *)arg; ++ struct mrail_recv *recv = ++ container_of(item, struct mrail_recv, entry); ++ ++ return ofi_match_tag(recv->tag, recv->ignore, match_attr->tag); ++} ++ ++static int mrail_match_recv_addr_tag(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_match_attr *match_attr = (struct mrail_match_attr *)arg; ++ struct mrail_recv *recv = ++ container_of(item, struct mrail_recv, entry); ++ ++ return ofi_match_addr(recv->addr, match_attr->addr) && ++ ofi_match_tag(recv->tag, recv->ignore, match_attr->tag); ++} ++ ++static int mrail_match_unexp_any(struct dlist_entry *item, const void *arg) ++{ ++ OFI_UNUSED(item); ++ OFI_UNUSED(arg); ++ return 1; ++} ++ ++static int mrail_match_unexp_addr(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_recv *recv = (struct mrail_recv *)arg; ++ struct mrail_unexp_msg_entry *unexp_msg_entry = ++ container_of(item, struct mrail_unexp_msg_entry, entry); ++ ++ return ofi_match_addr(unexp_msg_entry->addr, recv->addr); ++} ++ ++static int mrail_match_unexp_tag(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_recv *recv = (struct mrail_recv *)arg; ++ struct mrail_unexp_msg_entry *unexp_msg_entry = ++ container_of(item, struct mrail_unexp_msg_entry, entry); ++ ++ return ofi_match_tag(recv->tag, recv->ignore, unexp_msg_entry->tag); ++} ++ ++static int mrail_match_unexp_addr_tag(struct dlist_entry *item, const void *arg) ++{ ++ struct mrail_recv *recv = (struct mrail_recv *)arg; ++ struct mrail_unexp_msg_entry *unexp_msg_entry = ++ container_of(item, struct mrail_unexp_msg_entry, entry); ++ ++ return ofi_match_addr(recv->addr, unexp_msg_entry->addr) && ++ ofi_match_tag(recv->tag, recv->ignore, unexp_msg_entry->tag); ++} ++ ++int mrail_reprocess_directed_recvs(struct mrail_recv_queue *recv_queue) ++{ ++ // TODO ++ return -FI_ENOSYS; ++} ++ ++struct mrail_recv * ++mrail_match_recv_handle_unexp(struct mrail_recv_queue *recv_queue, uint64_t tag, ++ uint64_t addr, char *data, size_t len, void *context) ++{ ++ struct dlist_entry *entry; ++ struct mrail_unexp_msg_entry *unexp_msg_entry; ++ struct mrail_match_attr match_attr = { ++ .tag = tag, ++ .addr = addr, ++ }; ++ ++ entry = dlist_remove_first_match(&recv_queue->recv_list, ++ recv_queue->match_recv, &match_attr); ++ if (OFI_UNLIKELY(!entry)) { ++ unexp_msg_entry = recv_queue->get_unexp_msg_entry(recv_queue, ++ context); ++ if (!unexp_msg_entry) { ++ FI_WARN(recv_queue->prov, FI_LOG_CQ, ++ "Unable to get unexp_msg_entry!"); ++ assert(0); ++ return NULL; ++ } ++ ++ unexp_msg_entry->addr = addr; ++ unexp_msg_entry->tag = tag; ++ unexp_msg_entry->context = context; ++ memcpy(unexp_msg_entry->data, data, len); ++ ++ FI_DBG(recv_queue->prov, FI_LOG_CQ, "No matching recv found for" ++ " incoming msg with addr: 0x%" PRIx64 " tag: 0x%" PRIx64 ++ "\n", unexp_msg_entry->addr, unexp_msg_entry->tag); ++ ++ FI_DBG(recv_queue->prov, FI_LOG_CQ, "Enqueueing unexp_msg_entry to " ++ "unexpected msg list\n"); ++ ++ dlist_insert_tail(&unexp_msg_entry->entry, ++ &recv_queue->unexp_msg_list); ++ return NULL; ++ } ++ return container_of(entry, struct mrail_recv, entry); ++} ++ ++static void mrail_init_recv(struct mrail_recv *recv, void *arg) ++{ ++ recv->ep = arg; ++ recv->iov[0].iov_base = &recv->hdr; ++ recv->iov[0].iov_len = sizeof(recv->hdr); ++ recv->comp_flags = FI_RECV; ++} ++ ++#define mrail_recv_assert(recv) \ ++({ \ ++ assert(recv->ep == mrail_ep); \ ++ assert(recv->iov[0].iov_base == &recv->hdr); \ ++ assert(recv->iov[0].iov_len == sizeof(recv->hdr)); \ ++ assert(recv->comp_flags & FI_RECV); \ ++ assert(recv->count <= mrail_ep->info->rx_attr->iov_limit + 1); \ ++}) ++ ++static void mrail_recv_queue_init(struct fi_provider *prov, ++ struct mrail_recv_queue *recv_queue, ++ dlist_func_t match_recv, ++ dlist_func_t match_unexp, ++ mrail_get_unexp_msg_entry_func get_unexp_msg_entry) ++{ ++ recv_queue->prov = prov; ++ dlist_init(&recv_queue->recv_list); ++ dlist_init(&recv_queue->unexp_msg_list); ++ recv_queue->match_recv = match_recv; ++ recv_queue->match_unexp = match_unexp; ++ recv_queue->get_unexp_msg_entry = get_unexp_msg_entry; ++} ++ ++// TODO go for separate recv functions (recvmsg, recvv, etc) to be optimal ++static ssize_t ++mrail_recv_common(struct mrail_ep *mrail_ep, struct mrail_recv_queue *recv_queue, ++ struct iovec *iov, size_t count, void *context, ++ fi_addr_t src_addr, uint64_t tag, uint64_t ignore, ++ uint64_t flags, uint64_t comp_flags) ++{ ++ struct mrail_recv *recv; ++ struct mrail_unexp_msg_entry *unexp_msg_entry; ++ ++ recv = mrail_pop_recv(mrail_ep); ++ if (!recv) ++ return -FI_EAGAIN; ++ ++ recv->count = count + 1; ++ recv->context = context; ++ recv->flags = flags; ++ recv->comp_flags |= comp_flags; ++ recv->addr = src_addr; ++ recv->tag = tag; ++ recv->ignore = ignore; ++ ++ memcpy(&recv->iov[1], iov, sizeof(*iov) * count); ++ ++ FI_DBG(&mrail_prov, FI_LOG_EP_DATA, "Posting recv of length: %zu " ++ "src_addr: 0x%" PRIx64 " tag: 0x%" PRIx64 " ignore: 0x%" PRIx64 ++ "\n", ofi_total_iov_len(iov, count), recv->addr, ++ recv->tag, recv->ignore); ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ unexp_msg_entry = container_of(dlist_remove_first_match( ++ &recv_queue->unexp_msg_list, ++ recv_queue->match_unexp, ++ recv), ++ struct mrail_unexp_msg_entry, ++ entry); ++ if (!unexp_msg_entry) { ++ dlist_insert_tail(&recv->entry, &recv_queue->recv_list); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return 0; ++ } ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ FI_DBG(recv_queue->prov, FI_LOG_EP_DATA, "Match for posted recv" ++ " with addr: 0x%" PRIx64 ", tag: 0x%" PRIx64 " ignore: " ++ "0x%" PRIx64 " found in unexpected msg queue\n", ++ recv->addr, recv->tag, recv->ignore); ++ ++ return mrail_cq_process_buf_recv((struct fi_cq_tagged_entry *) ++ unexp_msg_entry->data, recv); ++} ++ ++static ssize_t mrail_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ struct iovec iov = { ++ .iov_base = buf, ++ .iov_len = len, ++ }; ++ return mrail_recv_common(mrail_ep, &mrail_ep->recv_queue, &iov, ++ 1, context, src_addr, 0, 0, ++ mrail_ep->util_ep.rx_op_flags, FI_MSG); ++} ++ ++static ssize_t mrail_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ ++ return mrail_recv_common(mrail_ep, &mrail_ep->recv_queue, ++ (struct iovec *)msg->msg_iov, msg->iov_count, ++ msg->context, msg->addr, 0, 0, flags, FI_MSG); ++} ++ ++static ssize_t mrail_trecv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, uint64_t tag, ++ uint64_t ignore, void *context) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ struct iovec iov = { ++ .iov_base = buf, ++ .iov_len = len, ++ }; ++ return mrail_recv_common(mrail_ep, &mrail_ep->trecv_queue, &iov, ++ 1, context, src_addr, tag, ignore, ++ mrail_ep->util_ep.rx_op_flags, FI_TAGGED); ++} ++ ++static ssize_t mrail_trecvmsg(struct fid_ep *ep_fid, ++ const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ ++ return mrail_recv_common(mrail_ep, &mrail_ep->trecv_queue, ++ (struct iovec *)msg->msg_iov, msg->iov_count, ++ msg->context, msg->addr, msg->tag, ++ msg->ignore, ++ (mrail_ep->util_ep.rx_op_flags | flags), ++ FI_TAGGED); ++} ++ ++static void mrail_copy_iov_hdr(struct mrail_hdr *hdr, struct iovec *iov_dest, ++ const struct iovec *iov_src, size_t count) ++{ ++ iov_dest[0].iov_base = hdr; ++ iov_dest[0].iov_len = sizeof(*hdr); ++ memcpy(&iov_dest[1], iov_src, sizeof(*iov_src) * count); ++} ++ ++static struct mrail_tx_buf *mrail_get_tx_buf(struct mrail_ep *mrail_ep, ++ void *context, uint32_t seq, ++ uint8_t op, uint64_t flags) ++{ ++ struct mrail_tx_buf *tx_buf = util_buf_alloc(mrail_ep->tx_buf_pool); ++ if (OFI_UNLIKELY(!tx_buf)) ++ return NULL; ++ ++ assert(tx_buf->ep == mrail_ep); ++ assert(tx_buf->hdr.version == MRAIL_HDR_VERSION); ++ ++ tx_buf->context = context; ++ tx_buf->flags = flags; ++ tx_buf->hdr.op = op; ++ tx_buf->hdr.seq = htonl(seq); ++ return tx_buf; ++} ++ ++static ssize_t ++mrail_send_common(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, size_t len, fi_addr_t dest_addr, uint64_t data, ++ void *context, uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ struct mrail_peer_info *peer_info; ++ struct iovec *iov_dest = alloca(sizeof(*iov_dest) * (count + 1)); ++ struct mrail_tx_buf *tx_buf; ++ uint32_t i = mrail_get_tx_rail(mrail_ep); ++ struct fi_msg msg; ++ ssize_t ret; ++ ++ peer_info = ofi_av_get_addr(mrail_ep->util_ep.av, (int) dest_addr); ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ ++ tx_buf = mrail_get_tx_buf(mrail_ep, context, peer_info->seq_no++, ++ ofi_op_msg, flags | FI_MSG); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ mrail_copy_iov_hdr(&tx_buf->hdr, iov_dest, iov, count); ++ ++ msg.msg_iov = iov_dest; ++ msg.desc = desc; ++ msg.iov_count = count + 1; ++ msg.addr = dest_addr; ++ msg.context = tx_buf; ++ msg.data = data; ++ ++ if (len < mrail_ep->rails[i].info->tx_attr->inject_size) ++ flags |= FI_INJECT; ++ ++ FI_DBG(&mrail_prov, FI_LOG_EP_DATA, "Posting send of length: %" PRIu64 ++ " dest_addr: 0x%" PRIx64 " seq: %d on rail: %d\n", ++ len, dest_addr, peer_info->seq_no - 1, i); ++ ++ ret = fi_sendmsg(mrail_ep->rails[i].ep, &msg, flags); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_DATA, ++ "Unable to fi_sendmsg on rail: %" PRIu32 "\n", i); ++ goto err2; ++ } else if (!(flags & FI_COMPLETION)) { ++ ofi_ep_tx_cntr_inc(&mrail_ep->util_ep); ++ } ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return ret; ++err2: ++ util_buf_release(mrail_ep->tx_buf_pool, tx_buf); ++err1: ++ peer_info->seq_no--; ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return ret; ++} ++ ++static ssize_t ++mrail_tsend_common(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, size_t len, fi_addr_t dest_addr, uint64_t tag, ++ uint64_t data, void *context, uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = container_of(ep_fid, struct mrail_ep, ++ util_ep.ep_fid.fid); ++ struct mrail_peer_info *peer_info; ++ struct iovec *iov_dest = alloca(sizeof(*iov_dest) * (count + 1)); ++ struct mrail_tx_buf *tx_buf; ++ uint32_t i = mrail_get_tx_rail(mrail_ep); ++ struct fi_msg msg; ++ ssize_t ret; ++ ++ peer_info = ofi_av_get_addr(mrail_ep->util_ep.av, (int) dest_addr); ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ ++ tx_buf = mrail_get_tx_buf(mrail_ep, context, peer_info->seq_no++, ++ ofi_op_tagged, flags | FI_TAGGED); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ tx_buf->hdr.tag = tag; ++ mrail_copy_iov_hdr(&tx_buf->hdr, iov_dest, iov, count); ++ ++ msg.msg_iov = iov_dest; ++ msg.desc = desc; ++ msg.iov_count = count + 1; ++ msg.addr = dest_addr; ++ msg.context = tx_buf; ++ msg.data = data; ++ ++ if (len < mrail_ep->rails[i].info->tx_attr->inject_size) ++ flags |= FI_INJECT; ++ ++ FI_DBG(&mrail_prov, FI_LOG_EP_DATA, "Posting tsend of length: %" PRIu64 ++ " dest_addr: 0x%" PRIx64 " tag: 0x%" PRIx64 " seq: %d" ++ " on rail: %d\n", len, dest_addr, tag, peer_info->seq_no - 1, i); ++ ++ ret = fi_sendmsg(mrail_ep->rails[i].ep, &msg, flags); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_DATA, ++ "Unable to fi_sendmsg on rail: %" PRIu32 "\n", i); ++ goto err2; ++ } else if (!(flags & FI_COMPLETION)) { ++ ofi_ep_tx_cntr_inc(&mrail_ep->util_ep); ++ } ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return ret; ++err2: ++ util_buf_release(mrail_ep->tx_buf_pool, tx_buf); ++err1: ++ peer_info->seq_no--; ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ return ret; ++} ++ ++static ssize_t mrail_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ return mrail_send_common(ep_fid, msg->msg_iov, msg->desc, msg->iov_count, ++ ofi_total_iov_len(msg->msg_iov, msg->iov_count), ++ msg->addr, msg->data, msg->context, ++ flags | mrail_comp_flag(ep_fid)); ++} ++ ++static ssize_t mrail_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_send_common(ep_fid, &iov, &desc, 1, len, dest_addr, 0, ++ context, mrail_comp_flag(ep_fid)); ++} ++ ++static ssize_t mrail_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_send_common(ep_fid, &iov, NULL, 1, len, dest_addr, 0, ++ NULL, mrail_inject_flags(ep_fid)); ++} ++ ++static ssize_t mrail_injectdata(struct fid_ep *ep_fid, const void *buf, ++ size_t len, uint64_t data, fi_addr_t dest_addr) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_send_common(ep_fid, &iov, NULL, 1, len, dest_addr, data, ++ NULL, (mrail_inject_flags(ep_fid) | ++ FI_REMOTE_CQ_DATA)); ++} ++ ++static ssize_t ++mrail_tsendmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ return mrail_tsend_common(ep_fid, msg->msg_iov, msg->desc, msg->iov_count, ++ ofi_total_iov_len(msg->msg_iov, msg->iov_count), ++ msg->addr, msg->tag, msg->data, msg->context, ++ flags | mrail_comp_flag(ep_fid)); ++} ++ ++static ssize_t mrail_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, ++ void *context) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_tsend_common(ep_fid, &iov, &desc, 1, len, dest_addr, tag, ++ 0, context, mrail_comp_flag(ep_fid)); ++} ++ ++static ssize_t mrail_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_tsend_common(ep_fid, &iov, &desc, 1, len, dest_addr, tag, ++ data, context, (mrail_comp_flag(ep_fid) | ++ FI_REMOTE_CQ_DATA)); ++} ++ ++static ssize_t mrail_tinject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_tsend_common(ep_fid, &iov, NULL, 1, len, dest_addr, tag, ++ 0, NULL, mrail_inject_flags(ep_fid)); ++} ++ ++static ssize_t mrail_tinjectdata(struct fid_ep *ep_fid, const void *buf, ++ size_t len, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag) ++{ ++ struct iovec iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ return mrail_tsend_common(ep_fid, &iov, NULL, 1, len, dest_addr, tag, ++ data, NULL, (mrail_inject_flags(ep_fid) | ++ FI_REMOTE_CQ_DATA)); ++} ++ ++static struct mrail_unexp_msg_entry * ++mrail_get_unexp_msg_entry(struct mrail_recv_queue *recv_queue, void *context) ++{ ++ // TODO use buf pool ++ // context would be mrail_ep from which u can get the buf pool ++ struct mrail_unexp_msg_entry *unexp_msg_entry = ++ malloc(sizeof(*unexp_msg_entry) + sizeof(struct fi_cq_tagged_entry)); ++ return unexp_msg_entry; ++} ++ ++static int mrail_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ struct mrail_ep *mrail_ep = ++ container_of(fid, struct mrail_ep, util_ep.ep_fid.fid); ++ struct mrail_domain *mrail_domain = ++ container_of(mrail_ep->util_ep.domain, struct mrail_domain, ++ util_domain); ++ size_t i, offset = 0, rail_addrlen; ++ int ret; ++ ++ if (*addrlen < mrail_domain->addrlen) ++ return -FI_ETOOSMALL; ++ ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ rail_addrlen = *addrlen - offset; ++ ret = fi_getname(&mrail_ep->rails[i].ep->fid, ++ (char *)addr + offset, &rail_addrlen); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, ++ "Unable to get name for rail: %zd\n", i); ++ return ret; ++ } ++ offset += rail_addrlen; ++ } ++ return 0; ++} ++ ++ ++static void mrail_tx_buf_init(void *pool_ctx, void *buf) ++{ ++ struct mrail_ep *mrail_ep = pool_ctx; ++ struct mrail_tx_buf *tx_buf = buf; ++ ++ tx_buf->ep = mrail_ep; ++ tx_buf->hdr.version = MRAIL_HDR_VERSION; ++} ++ ++static void mrail_ep_free_bufs(struct mrail_ep *mrail_ep) ++{ ++ if (mrail_ep->req_pool) ++ util_buf_pool_destroy(mrail_ep->req_pool); ++ ++ if (mrail_ep->ooo_recv_pool) ++ util_buf_pool_destroy(mrail_ep->ooo_recv_pool); ++ ++ if (mrail_ep->tx_buf_pool) ++ util_buf_pool_destroy(mrail_ep->tx_buf_pool); ++ ++ if (mrail_ep->recv_fs) ++ mrail_recv_fs_free(mrail_ep->recv_fs); ++} ++ ++static int mrail_ep_alloc_bufs(struct mrail_ep *mrail_ep) ++{ ++ struct util_buf_attr attr = { ++ .size = sizeof(struct mrail_tx_buf), ++ .alignment = sizeof(void *), ++ .max_cnt = 0, ++ .chunk_cnt = 64, ++ .alloc_hndlr = NULL, ++ .free_hndlr = NULL, ++ .init = mrail_tx_buf_init, ++ .ctx = mrail_ep, ++ }; ++ size_t buf_size, rxq_total_size = 0; ++ struct fi_info *fi; ++ int ret; ++ ++ for (fi = mrail_ep->info->next; fi; fi = fi->next) ++ rxq_total_size += fi->rx_attr->size; ++ ++ mrail_ep->recv_fs = mrail_recv_fs_create(rxq_total_size, mrail_init_recv, ++ mrail_ep); ++ if (!mrail_ep->recv_fs) ++ return -FI_ENOMEM; ++ ++ ret = util_buf_pool_create(&mrail_ep->ooo_recv_pool, ++ sizeof(struct mrail_ooo_recv), ++ sizeof(void *), 0, 64); ++ if (!mrail_ep->ooo_recv_pool) ++ goto err; ++ ++ ret = util_buf_pool_create_attr(&attr, &mrail_ep->tx_buf_pool); ++ if (!mrail_ep->tx_buf_pool) ++ goto err; ++ ++ buf_size = (sizeof(struct mrail_req) + ++ (mrail_ep->num_eps * sizeof(struct mrail_subreq))); ++ ++ ret = util_buf_pool_create(&mrail_ep->req_pool, buf_size, ++ sizeof(void *), 0, 64); ++ if (ret) ++ goto err; ++ return 0; ++err: ++ mrail_ep_free_bufs(mrail_ep); ++ return ret; ++} ++ ++static int mrail_ep_close(fid_t fid) ++{ ++ struct mrail_ep *mrail_ep = ++ container_of(fid, struct mrail_ep, util_ep.ep_fid.fid); ++ int ret, retv = 0; ++ size_t i; ++ ++ mrail_ep_free_bufs(mrail_ep); ++ ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_close(&mrail_ep->rails[i].ep->fid); ++ if (ret) ++ retv = ret; ++ } ++ free(mrail_ep->rails); ++ ++ ret = ofi_endpoint_close(&mrail_ep->util_ep); ++ if (ret) ++ retv = ret; ++ free(mrail_ep); ++ return retv; ++} ++ ++static int mrail_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) ++{ ++ struct mrail_ep *mrail_ep = ++ container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ struct mrail_cq *mrail_cq; ++ struct mrail_av *mrail_av; ++ struct util_cntr *cntr; ++ int ret = 0; ++ size_t i; ++ ++ switch (bfid->fclass) { ++ case FI_CLASS_AV: ++ mrail_av = container_of(bfid, struct mrail_av, ++ util_av.av_fid.fid); ++ ret = ofi_ep_bind_av(&mrail_ep->util_ep, &mrail_av->util_av); ++ if (ret) ++ return ret; ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_ep_bind(mrail_ep->rails[i].ep, ++ &mrail_av->avs[i]->fid, flags); ++ if (ret) ++ return ret; ++ } ++ break; ++ case FI_CLASS_CQ: ++ mrail_cq = container_of(bfid, struct mrail_cq, ++ util_cq.cq_fid.fid); ++ ++ ret = ofi_ep_bind_cq(&mrail_ep->util_ep, &mrail_cq->util_cq, ++ flags); ++ if (ret) ++ return ret; ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_ep_bind(mrail_ep->rails[i].ep, ++ &mrail_cq->cqs[i]->fid, flags); ++ if (ret) ++ return ret; ++ } ++ break; ++ case FI_CLASS_CNTR: ++ cntr = container_of(bfid, struct util_cntr, cntr_fid.fid); ++ ++ ret = ofi_ep_bind_cntr(&mrail_ep->util_ep, cntr, flags); ++ if (ret) ++ return ret; ++ break; ++ case FI_CLASS_EQ: ++ ret = -FI_ENOSYS; ++ break; ++ default: ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, "invalid fid class\n"); ++ ret = -FI_EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++static int mrail_ep_ctrl(struct fid *fid, int command, void *arg) ++{ ++ struct mrail_ep *mrail_ep; ++ size_t i, buf_recv_min = sizeof(struct mrail_hdr); ++ int ret; ++ ++ mrail_ep = container_of(fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ switch (command) { ++ case FI_ENABLE: ++ if (!mrail_ep->util_ep.rx_cq || !mrail_ep->util_ep.tx_cq) ++ return -FI_ENOCQ; ++ if (!mrail_ep->util_ep.av) ++ return -FI_ENOAV; ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_setopt(&mrail_ep->rails[i].ep->fid, ++ FI_OPT_ENDPOINT, FI_OPT_BUFFERED_MIN, ++ &buf_recv_min, sizeof(buf_recv_min)); ++ if (ret) ++ return ret; ++ ++ ret = fi_enable(mrail_ep->rails[i].ep); ++ if (ret) ++ return ret; ++ } ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ return 0; ++} ++ ++static struct fi_ops mrail_ep_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_ep_close, ++ .bind = mrail_ep_bind, ++ .control = mrail_ep_ctrl, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int mrail_ep_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) ++{ ++ struct mrail_ep *mrail_ep; ++ size_t i; ++ int ret = 0; ++ ++ mrail_ep = container_of(fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ for (i = 0; i < mrail_ep->num_eps; i++) { ++ ret = fi_setopt(&mrail_ep->rails[i].ep->fid, level, optname, ++ optval, optlen); ++ if (ret) ++ return ret; ++ } ++ ++ return ret; ++} ++ ++static struct fi_ops_ep mrail_ops_ep = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = fi_no_cancel, ++ .getopt = fi_no_getopt, ++ .setopt = mrail_ep_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++static struct fi_ops_cm mrail_ops_cm = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = fi_no_setname, ++ .getname = mrail_getname, ++ .getpeer = fi_no_getpeer, ++ .connect = fi_no_connect, ++ .listen = fi_no_listen, ++ .accept = fi_no_accept, ++ .reject = fi_no_reject, ++ .shutdown = fi_no_shutdown, ++ .join = fi_no_join, ++}; ++ ++static struct fi_ops_msg mrail_ops_msg = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = mrail_recv, ++ .recvv = fi_no_msg_recvv, ++ .recvmsg = mrail_recvmsg, ++ .send = mrail_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = mrail_sendmsg, ++ .inject = mrail_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = mrail_injectdata, ++}; ++ ++struct fi_ops_tagged mrail_ops_tagged = { ++ .size = sizeof(struct fi_ops_tagged), ++ .recv = mrail_trecv, ++ .recvv = fi_no_tagged_recvv, ++ .recvmsg = mrail_trecvmsg, ++ .send = mrail_tsend, ++ .sendv = fi_no_tagged_sendv, ++ .sendmsg = mrail_tsendmsg, ++ .inject = mrail_tinject, ++ .senddata = mrail_tsenddata, ++ .injectdata = mrail_tinjectdata, ++}; ++ ++void mrail_ep_progress(struct util_ep *ep) ++{ ++ struct mrail_ep *mrail_ep; ++ mrail_ep = container_of(ep, struct mrail_ep, util_ep); ++ mrail_progress_deferred_reqs(mrail_ep); ++} ++ ++int mrail_ep_open(struct fid_domain *domain_fid, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context) ++{ ++ struct mrail_domain *mrail_domain = ++ container_of(domain_fid, struct mrail_domain, ++ util_domain.domain_fid); ++ struct mrail_ep *mrail_ep; ++ struct fi_info *fi; ++ size_t i; ++ int ret; ++ ++ if (strcmp(mrail_domain->info->domain_attr->name, ++ info->domain_attr->name)) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, "info domain name: %s " ++ "doesn't match fid_domain name: %s!\n", ++ info->domain_attr->name, ++ mrail_domain->info->domain_attr->name); ++ return -FI_EINVAL; ++ } ++ ++ mrail_ep = calloc(1, sizeof(*mrail_ep)); ++ if (!mrail_ep) ++ return -FI_ENOMEM; ++ ++ // TODO detect changes b/w mrail_domain->info and info arg ++ // this may be difficult and we may not support such changes ++ mrail_ep->info = mrail_domain->info; ++ mrail_ep->num_eps = mrail_domain->num_domains; ++ ++ ret = ofi_endpoint_init(domain_fid, &mrail_util_prov, info, &mrail_ep->util_ep, ++ context, &mrail_ep_progress); ++ if (ret) { ++ goto free_ep; ++ } ++ ++ mrail_ep->rails = calloc(mrail_ep->num_eps, sizeof(*mrail_ep->rails)); ++ if (!mrail_ep->rails) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ for (i = 0, fi = mrail_ep->info->next; fi; fi = fi->next, i++) { ++ fi->tx_attr->op_flags &= ~FI_COMPLETION; ++ ret = fi_endpoint(mrail_domain->domains[i], fi, ++ &mrail_ep->rails[i].ep, mrail_ep); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_CTRL, ++ "Unable to open EP\n"); ++ goto err; ++ } ++ mrail_ep->rails[i].info = fi; ++ } ++ ++ ret = mrail_ep_alloc_bufs(mrail_ep); ++ if (ret) ++ goto err; ++ ++ slist_init(&mrail_ep->deferred_reqs); ++ ++ if (mrail_ep->info->caps & FI_DIRECTED_RECV) { ++ mrail_recv_queue_init(&mrail_prov, &mrail_ep->recv_queue, ++ mrail_match_recv_addr, ++ mrail_match_unexp_addr, ++ mrail_get_unexp_msg_entry); ++ mrail_recv_queue_init(&mrail_prov, &mrail_ep->trecv_queue, ++ mrail_match_recv_addr_tag, ++ mrail_match_unexp_addr_tag, ++ mrail_get_unexp_msg_entry); ++ } else { ++ mrail_recv_queue_init(&mrail_prov, &mrail_ep->recv_queue, ++ mrail_match_recv_any, ++ mrail_match_unexp_any, ++ mrail_get_unexp_msg_entry); ++ mrail_recv_queue_init(&mrail_prov, &mrail_ep->trecv_queue, ++ mrail_match_recv_tag, ++ mrail_match_unexp_tag, ++ mrail_get_unexp_msg_entry); ++ } ++ ++ ofi_atomic_initialize32(&mrail_ep->tx_rail, 0); ++ ofi_atomic_initialize32(&mrail_ep->rx_rail, 0); ++ ++ *ep_fid = &mrail_ep->util_ep.ep_fid; ++ (*ep_fid)->fid.ops = &mrail_ep_fi_ops; ++ (*ep_fid)->ops = &mrail_ops_ep; ++ (*ep_fid)->cm = &mrail_ops_cm; ++ (*ep_fid)->msg = &mrail_ops_msg; ++ (*ep_fid)->tagged = &mrail_ops_tagged; ++ (*ep_fid)->rma = &mrail_ops_rma; ++ ++ return 0; ++err: ++ mrail_ep_close(&mrail_ep->util_ep.ep_fid.fid); ++free_ep: ++ free(mrail_ep); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_fabric.c +new file mode 100644 +index 000000000..14eb7d33d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_fabric.c +@@ -0,0 +1,122 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "mrail.h" ++ ++static int mrail_fabric_close(fid_t fid) ++{ ++ struct mrail_fabric *mrail_fabric = ++ container_of(fid, struct mrail_fabric, util_fabric.fabric_fid.fid); ++ int ret, retv = 0; ++ ++ ret = mrail_close_fids((struct fid **)mrail_fabric->fabrics, ++ mrail_fabric->num_fabrics); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_fabric->fabrics); ++ ++ ret = ofi_fabric_close(&mrail_fabric->util_fabric); ++ if (ret) ++ retv = ret; ++ ++ free(mrail_fabric); ++ return retv; ++} ++ ++static struct fi_ops mrail_fabric_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = mrail_fabric_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_fabric mrail_fabric_ops = { ++ .size = sizeof(struct fi_ops_fabric), ++ .domain = mrail_domain_open, ++ .passive_ep = fi_no_passive_ep, ++ .eq_open = ofi_eq_create, ++ .wait_open = ofi_wait_fd_open, ++ .trywait = ofi_trywait ++}; ++ ++int mrail_fabric_open(struct fi_fabric_attr *attr, struct fid_fabric **fabric, ++ void *context) ++{ ++ struct fi_info *fi; ++ struct mrail_fabric *mrail_fabric; ++ size_t i; ++ int ret; ++ ++ mrail_fabric = calloc(1, sizeof(*mrail_fabric)); ++ if (!mrail_fabric) ++ return -FI_ENOMEM; ++ ++ mrail_fabric->info = mrail_get_info_cached(attr->name); ++ if (!mrail_fabric->info) { ++ free(mrail_fabric); ++ return -FI_EINVAL; ++ } ++ ++ ret = ofi_fabric_init(&mrail_prov, &mrail_fabric_attr, attr, ++ &mrail_fabric->util_fabric, context); ++ if (ret) { ++ free(mrail_fabric); ++ return ret; ++ } ++ ++ for (fi = mrail_fabric->info->next; fi; fi = fi->next) ++ mrail_fabric->num_fabrics++; ++ ++ mrail_fabric->fabrics = calloc(mrail_fabric->num_fabrics, ++ sizeof(*mrail_fabric->fabrics)); ++ if (!mrail_fabric->fabrics) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ for (i = 0, fi = mrail_fabric->info->next; fi; fi = fi->next, i++) { ++ ret = fi_fabric(fi->fabric_attr, &mrail_fabric->fabrics[i], context); ++ if (ret) ++ goto err; ++ } ++ ++ *fabric = &mrail_fabric->util_fabric.fabric_fid; ++ (*fabric)->fid.ops = &mrail_fabric_fi_ops; ++ (*fabric)->ops = &mrail_fabric_ops; ++ ++ return 0; ++err: ++ mrail_fabric_close(&mrail_fabric->util_fabric.fabric_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_init.c +new file mode 100644 +index 000000000..eaec9647c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_init.c +@@ -0,0 +1,363 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "mrail.h" ++ ++static char **mrail_addr_strv = NULL; ++/* Not thread safe */ ++struct fi_info *mrail_info_vec[MRAIL_MAX_INFO] = {0}; ++size_t mrail_num_info = 0; ++ ++static inline char **mrail_split_addr_strc(const char *addr_strc) ++{ ++ char **addr_strv = ofi_split_and_alloc(addr_strc, ",", NULL); ++ if (!addr_strv) { ++ FI_WARN(&mrail_prov, FI_LOG_CORE, ++ "Unable to split a FI_ADDR_STRV string\n"); ++ return NULL; ++ } ++ return addr_strv; ++} ++ ++static int mrail_parse_env_vars(void) ++{ ++ char *addr_strc; ++ int ret; ++ ++ fi_param_define(&mrail_prov, "addr_strc", FI_PARAM_STRING, "List of rail" ++ " addresses of format FI_ADDR_STR delimited by comma"); ++ ret = fi_param_get_str(&mrail_prov, "addr_strc", &addr_strc); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_CORE, "Unable to read " ++ "OFI_MRAIL_ADDR_STRC env variable\n"); ++ return ret; ++ } ++ mrail_addr_strv = mrail_split_addr_strc(addr_strc); ++ if (!mrail_addr_strv) ++ return -FI_ENOMEM; ++ return 0; ++} ++ ++int mrail_get_core_info(uint32_t version, const char *node, const char *service, ++ uint64_t flags, const struct fi_info *hints, ++ struct fi_info **core_info) ++{ ++ struct fi_info *core_hints, *info, *fi = NULL; ++ size_t i; ++ int ret = 0; ++ ++ if (!mrail_addr_strv) { ++ FI_WARN(&mrail_prov, FI_LOG_FABRIC, ++ "OFI_MRAIL_ADDR_STRC env variable not set!\n"); ++ return -FI_ENODATA; ++ } ++ ++ core_hints = fi_dupinfo(hints); ++ if (!core_hints) ++ return -FI_ENOMEM; ++ ++ if (!hints) { ++ core_hints->mode = MRAIL_PASSTHRU_MODES; ++ assert(core_hints->domain_attr); ++ core_hints->domain_attr->mr_mode = MRAIL_PASSTHRU_MR_MODES; ++ } else { ++ if (hints->tx_attr) { ++ if (hints->tx_attr->iov_limit) ++ core_hints->tx_attr->iov_limit = ++ hints->tx_attr->iov_limit + 1; ++ if (hints->rx_attr->iov_limit) ++ core_hints->rx_attr->iov_limit = ++ hints->rx_attr->iov_limit + 1; ++ core_hints->tx_attr->op_flags &= ~FI_COMPLETION; ++ } ++ } ++ ++ core_hints->mode |= FI_BUFFERED_RECV; ++ core_hints->caps |= FI_SOURCE; ++ ++ if (!core_hints->fabric_attr) { ++ core_hints->fabric_attr = calloc(1, sizeof(*core_hints->fabric_attr)); ++ if (!core_hints->fabric_attr) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ } ++ ++ if (!core_hints->domain_attr) { ++ core_hints->domain_attr = calloc(1, sizeof(*core_hints->domain_attr)); ++ if (!core_hints->domain_attr) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } ++ } ++ core_hints->domain_attr->av_type = FI_AV_TABLE; ++ ++ ret = ofi_exclude_prov_name(&core_hints->fabric_attr->prov_name, ++ mrail_prov.name); ++ if (ret) ++ goto out; ++ ++ for (i = 0; mrail_addr_strv[i]; i++) { ++ free(core_hints->src_addr); ++ ret = ofi_str_toaddr(mrail_addr_strv[i], ++ &core_hints->addr_format, ++ &core_hints->src_addr, ++ &core_hints->src_addrlen); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_FABRIC, ++ "Unable to convert FI_ADDR_STR to device " ++ "specific address\n"); ++ goto err; ++ } ++ ++ FI_DBG(&mrail_prov, FI_LOG_CORE, ++ "--- Begin fi_getinfo for rail: %zd ---\n", i); ++ ++ ret = fi_getinfo(version, NULL, NULL, 0, core_hints, &info); ++ ++ FI_DBG(&mrail_prov, FI_LOG_CORE, ++ "--- End fi_getinfo for rail: %zd ---\n", i); ++ if (ret) ++ goto err; ++ ++ if (!fi) ++ *core_info = info; ++ else ++ fi->next = info; ++ fi = info; ++ ++ /* We only want the first fi_info entry per rail */ ++ if (info->next) { ++ fi_freeinfo(info->next); ++ info->next = NULL; ++ } ++ ++ } ++ goto out; ++err: ++ if (fi) ++ fi_freeinfo(*core_info); ++out: ++ fi_freeinfo(core_hints); ++ return ret; ++} ++ ++static struct fi_info *mrail_dupinfo(const struct fi_info *info) ++{ ++ struct fi_info *dup, *fi, *head = NULL; ++ ++ while (info) { ++ if (!(dup = fi_dupinfo(info))) ++ goto err; ++ if (!head) ++ head = fi = dup; ++ else ++ fi->next = dup; ++ fi = dup; ++ info = info->next; ++ } ++ return head; ++err: ++ fi_freeinfo(head); ++ return NULL; ++} ++ ++static void mrail_adjust_info(struct fi_info *info, const struct fi_info *hints) ++{ ++ info->mode &= ~FI_BUFFERED_RECV; ++ ++ if (!hints) ++ return; ++ ++ if (hints->domain_attr) { ++ if (hints->domain_attr->av_type) ++ info->domain_attr->av_type = hints->domain_attr->av_type; ++ } ++ ++ if (hints->tx_attr) { ++ if (hints->tx_attr->op_flags & FI_COMPLETION) ++ info->tx_attr->op_flags |= FI_COMPLETION; ++ } ++} ++ ++static struct fi_info *mrail_get_prefix_info(struct fi_info *core_info) ++{ ++ struct fi_info *fi; ++ uint32_t num_rails; ++ ++ for (fi = core_info, num_rails = 0; fi; fi = fi->next, ++num_rails) ++ ; ++ ++ fi = fi_dupinfo(core_info); ++ if (!fi) ++ return NULL; ++ ++ free(fi->fabric_attr->name); ++ free(fi->domain_attr->name); ++ ++ fi->fabric_attr->name = NULL; ++ fi->domain_attr->name = NULL; ++ ++ fi->fabric_attr->name = strdup(mrail_info.fabric_attr->name); ++ if (!fi->fabric_attr->name) ++ goto err; ++ ++ fi->domain_attr->name = strdup(mrail_info.domain_attr->name); ++ if (!fi->domain_attr->name) ++ goto err; ++ ++ fi->ep_attr->protocol = mrail_info.ep_attr->protocol; ++ fi->ep_attr->protocol_version = mrail_info.ep_attr->protocol_version; ++ fi->fabric_attr->prov_version = FI_VERSION(MRAIL_MAJOR_VERSION, ++ MRAIL_MINOR_VERSION); ++ fi->domain_attr->mr_key_size = (num_rails * ++ sizeof(struct mrail_addr_key)); ++ fi->domain_attr->mr_mode |= FI_MR_RAW; ++ ++ /* Account for one iovec buffer used for mrail header */ ++ assert(fi->tx_attr->iov_limit); ++ fi->tx_attr->iov_limit--; ++ ++ /* Claiming messages larger than FI_OPT_BUFFERED_LIMIT would consume ++ * a scatter/gather entry for mrail_hdr */ ++ fi->rx_attr->iov_limit--; ++ ++ if (fi->tx_attr->inject_size < sizeof(struct mrail_hdr)) ++ fi->tx_attr->inject_size = 0; ++ else ++ fi->tx_attr->inject_size -= sizeof(struct mrail_hdr); ++ return fi; ++err: ++ fi_freeinfo(fi); ++ return NULL; ++} ++ ++static int mrail_check_modes(const struct fi_info *hints) ++{ ++ if (!hints) ++ return 0; ++ ++ if (hints->mode & ~MRAIL_PASSTHRU_MODES) { ++ FI_INFO(&mrail_prov, FI_LOG_CORE, ++ "Unable to pass through given modes: %s\n", ++ fi_tostr(&hints->mode, FI_TYPE_MODE)); ++ return -FI_ENODATA; ++ } ++ ++ if (hints->domain_attr && ++ (hints->domain_attr->mr_mode & ~MRAIL_PASSTHRU_MR_MODES)) { ++ FI_INFO(&mrail_prov, FI_LOG_CORE, ++ "Unable to pass through given MR modes: %s\n", ++ fi_tostr(&hints->domain_attr->mr_mode, FI_TYPE_MR_MODE)); ++ return -FI_ENODATA; ++ } ++ return 0; ++} ++ ++static int mrail_getinfo(uint32_t version, const char *node, const char *service, ++ uint64_t flags, const struct fi_info *hints, ++ struct fi_info **info) ++{ ++ struct fi_info *fi; ++ int ret; ++ ++ if (mrail_num_info >= MRAIL_MAX_INFO) { ++ FI_WARN(&mrail_prov, FI_LOG_CORE, ++ "Max mrail_num_info reached\n"); ++ assert(0); ++ return -FI_ENODATA; ++ } ++ ++ ret = mrail_check_modes(hints); ++ if (ret) ++ return ret; ++ ++ ret = mrail_get_core_info(version, node, service, flags, hints, info); ++ if (ret) ++ return ret; ++ ++ fi = mrail_get_prefix_info(*info); ++ if (!fi) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ ++ mrail_adjust_info(fi, hints); ++ ++ // TODO set src_addr to FI_ADDR_STRC address ++ fi->next = *info; ++ *info = fi; ++ ++ mrail_info_vec[mrail_num_info] = mrail_dupinfo(*info); ++ if (!mrail_info_vec[mrail_num_info]) ++ goto err2; ++ ++ mrail_num_info++; ++ ++ return 0; ++err2: ++ fi_freeinfo(fi); ++err1: ++ fi_freeinfo(*info); ++ return ret; ++} ++ ++static void mrail_fini(void) ++{ ++ size_t i; ++ for (i = 0; i < mrail_num_info; i++) ++ fi_freeinfo(mrail_info_vec[i]); ++} ++ ++struct fi_provider mrail_prov = { ++ .name = OFI_UTIL_PREFIX "mrail", ++ .version = FI_VERSION(MRAIL_MAJOR_VERSION, MRAIL_MINOR_VERSION), ++ .fi_version = FI_VERSION(1, 7), ++ .getinfo = mrail_getinfo, ++ .fabric = mrail_fabric_open, ++ .cleanup = mrail_fini ++}; ++ ++struct util_prov mrail_util_prov = { ++ .prov = &mrail_prov, ++ .info = &mrail_info, ++ .flags = 0, ++}; ++ ++MRAIL_INI ++{ ++ mrail_parse_env_vars(); ++ return &mrail_prov; ++} ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_rma.c +new file mode 100644 +index 000000000..4685a8c17 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/mrail/src/mrail_rma.c +@@ -0,0 +1,421 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "mrail.h" ++ ++static void mrail_subreq_to_rail(struct mrail_subreq *subreq, uint32_t rail, ++ struct iovec *out_iovs, void **out_descs, ++ struct fi_rma_iov *out_rma_iovs) ++{ ++ const struct mrail_mr *mrail_mr; ++ struct mrail_addr_key *mr_map; ++ size_t i; ++ ++ for (i = 0; i < subreq->iov_count; ++i) { ++ mrail_mr = subreq->descs[i]; ++ //TODO: add base address from mrail_mr ++ out_iovs[i].iov_len = subreq->iov[i].iov_len; ++ out_iovs[i].iov_base = ++ (void*)((uintptr_t)subreq->iov[i].iov_base); ++ ++ out_descs[i] = (mrail_mr ? ++ fi_mr_desc(mrail_mr->rails[rail].mr) : NULL); ++ } ++ ++ for (i = 0; i < subreq->rma_iov_count; ++i) { ++ mr_map = (struct mrail_addr_key *)subreq->rma_iov[i].key; ++ //TODO: add base address from mrail_addr_key ++ out_rma_iovs[i].addr = subreq->rma_iov[i].addr; ++ out_rma_iovs[i].len = subreq->rma_iov[i].len; ++ out_rma_iovs[i].key = mr_map[rail].key; ++ } ++} ++ ++static ssize_t mrail_post_subreq(uint32_t rail, ++ struct mrail_subreq *subreq) ++{ ++ ssize_t ret; ++ struct iovec rail_iov[MRAIL_IOV_LIMIT]; ++ void *rail_descs[MRAIL_IOV_LIMIT]; ++ struct fi_rma_iov rail_rma_iov[MRAIL_IOV_LIMIT]; ++ struct fi_msg_rma msg; ++ ++ struct mrail_req *req = subreq->parent; ++ struct mrail_ep *mrail_ep = req->mrail_ep; ++ ++ uint64_t flags = req->flags; ++ ++ mrail_subreq_to_rail(subreq, rail, rail_iov, rail_descs, rail_rma_iov); ++ ++ msg.msg_iov = rail_iov; ++ msg.desc = rail_descs; ++ msg.iov_count = subreq->iov_count; ++ msg.addr = req->peer_info->addr; ++ msg.rma_iov = rail_rma_iov; ++ msg.rma_iov_count = subreq->rma_iov_count; ++ msg.context = &subreq->context; ++ ++ if (req->op_type == FI_READ) { ++ ret = fi_readmsg(mrail_ep->rails[rail].ep, &msg, flags); ++ } else { ++ /* Immediate data is sent with the last subreq only */ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ if (req->pending_subreq > 0) { ++ flags &= ~FI_REMOTE_CQ_DATA; ++ } else { ++ msg.data = req->data; ++ } ++ } ++ ret = fi_writemsg(mrail_ep->rails[rail].ep, &msg, flags); ++ } ++ ++ return ret; ++} ++ ++static ssize_t mrail_post_req(struct mrail_req *req) ++{ ++ size_t i; ++ uint32_t rail; ++ ssize_t ret = 0; ++ ++ while (req->pending_subreq >= 0) { ++ /* Try all rails before giving up */ ++ for (i = 0; i < req->mrail_ep->num_eps; ++i) { ++ rail = mrail_get_tx_rail(req->mrail_ep); ++ ++ ret = mrail_post_subreq(rail, ++ &req->subreqs[req->pending_subreq]); ++ if (ret != -FI_EAGAIN) { ++ break; ++ } else { ++ /* One of the rails is busy. Try progressing. */ ++ mrail_poll_cq(req->mrail_ep->util_ep.tx_cq); ++ } ++ } ++ ++ if (ret != 0) { ++ if (ret == -FI_EAGAIN) { ++ break; ++ } ++ /* TODO: Handle errors besides FI_EAGAIN */ ++ assert(0); ++ } ++ req->pending_subreq--; ++ } ++ ++ return ret; ++} ++ ++static inline ++struct mrail_req *mrail_dequeue_deferred_req(struct mrail_ep *mrail_ep) ++{ ++ struct mrail_req *req; ++ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ slist_remove_head_container(&mrail_ep->deferred_reqs, struct mrail_req, ++ req, entry); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++ ++ return req; ++} ++ ++static inline void mrail_requeue_deferred_req(struct mrail_ep *mrail_ep, ++ struct mrail_req *req) ++{ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ slist_insert_head(&req->entry, &mrail_ep->deferred_reqs); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++} ++ ++static inline void mrail_queue_deferred_req(struct mrail_ep *mrail_ep, ++ struct mrail_req *req) ++{ ++ ofi_ep_lock_acquire(&mrail_ep->util_ep); ++ slist_insert_tail(&req->entry, &mrail_ep->deferred_reqs); ++ ofi_ep_lock_release(&mrail_ep->util_ep); ++} ++ ++void mrail_progress_deferred_reqs(struct mrail_ep *mrail_ep) ++{ ++ struct mrail_req *req; ++ ssize_t ret; ++ ++ req = mrail_dequeue_deferred_req(mrail_ep); ++ while (req) { ++ ret = mrail_post_req(req); ++ if (ret) { ++ mrail_requeue_deferred_req(mrail_ep, req); ++ break; ++ } ++ req = mrail_dequeue_deferred_req(mrail_ep); ++ } ++} ++ ++static ssize_t mrail_prepare_rma_subreqs(struct mrail_ep *mrail_ep, ++ const struct fi_msg_rma *msg, struct mrail_req *req) ++{ ++ ssize_t ret; ++ struct mrail_subreq *subreq; ++ size_t subreq_count; ++ size_t total_len; ++ size_t chunk_len; ++ size_t subreq_len; ++ size_t iov_index; ++ size_t iov_offset; ++ size_t rma_iov_index; ++ size_t rma_iov_offset; ++ int i; ++ ++ /* For now, stripe across all rails. ++ * This could be determined by a dynamic scheduler instead. ++ */ ++ subreq_count = mrail_ep->num_eps; ++ ++ total_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count); ++ chunk_len = total_len / subreq_count; ++ ++ /* The first chunk is the longest */ ++ subreq_len = chunk_len + (total_len % subreq_count); ++ iov_index = 0; ++ iov_offset = 0; ++ rma_iov_index = 0; ++ rma_iov_offset = 0; ++ ++ /* The array is filled in reverse order -- i.e. first subreq at ++ * last position in the array. Filling the array in this order saves ++ * us from having to use two variables, to track the total number of ++ * subreqs, and to know which one to try posting next. ++ * Instead, a single variable (req->pending_subreq) is used to keep ++ * track of which subreq to post next, starting at the end of the ++ * array. ++ */ ++ for (i = (subreq_count - 1); i >= 0; --i) { ++ subreq = &req->subreqs[i]; ++ ++ subreq->parent = req; ++ ++ ret = ofi_copy_iov_desc(subreq->iov, subreq->descs, ++ &subreq->iov_count, ++ (struct iovec *)msg->msg_iov, msg->desc, ++ msg->iov_count, &iov_index, &iov_offset, ++ subreq_len); ++ if (ret) { ++ goto out; ++ } ++ ++ ret = ofi_copy_rma_iov(subreq->rma_iov, &subreq->rma_iov_count, ++ (struct fi_rma_iov *)msg->rma_iov, ++ msg->rma_iov_count, &rma_iov_index, ++ &rma_iov_offset, subreq_len); ++ if (ret) { ++ goto out; ++ } ++ ++ /* All the other chunks have the same length */ ++ subreq_len = chunk_len; ++ } ++ ++ ofi_atomic_initialize32(&req->expected_subcomps, subreq_count); ++ ++ /* pending_subreq is the index of the next subreq to post. ++ * The array was filled in reverse order in mrail_prepare_rma_subreqs() ++ */ ++ req->pending_subreq = subreq_count - 1; ++ ++out: ++ return ret; ++} ++ ++static ssize_t mrail_init_rma_req(struct mrail_ep *mrail_ep, ++ struct mrail_req *req, const struct fi_msg_rma *msg, ++ uint64_t flags, int op_type) ++{ ++ ssize_t ret; ++ ++ req->op_type = op_type; ++ req->flags = flags; ++ req->data = msg->data; ++ req->mrail_ep = mrail_ep; ++ req->peer_info = ofi_av_get_addr(mrail_ep->util_ep.av, ++ (int) msg->addr); ++ req->comp.op_context = msg->context; ++ req->comp.flags = flags; ++ ++ ret = mrail_prepare_rma_subreqs(mrail_ep, msg, req); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_DATA, ++ "Unable to prepare rma subreqs: %s\n", ++ fi_strerror(-ret)); ++ } ++ return ret; ++} ++ ++static ssize_t mrail_ep_post_rma(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags, int op_type) ++{ ++ ssize_t ret; ++ struct mrail_ep *mrail_ep; ++ struct mrail_req *req; ++ ++ mrail_ep = container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ req = mrail_alloc_req(mrail_ep); ++ if (!req) { ++ return -FI_ENOMEM; ++ } ++ ++ ret = mrail_init_rma_req(mrail_ep, req, msg, flags, op_type); ++ if (ret) { ++ mrail_free_req(mrail_ep, req); ++ return ret; ++ } ++ ++ mrail_queue_deferred_req(mrail_ep, req); ++ ++ /* Initiate progress here. See mrail_ep_progress() for any remaining ++ * reqs. ++ */ ++ mrail_progress_deferred_reqs(mrail_ep); ++ ++ return 0; ++} ++ ++static ssize_t mrail_ep_readmsg(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ return mrail_ep_post_rma(ep_fid, msg, flags, FI_READ); ++} ++ ++/* TODO: separate the different operations to optimize performance */ ++static ssize_t mrail_ep_read(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, uint64_t addr, ++ uint64_t key, void *context) ++{ ++ struct mrail_ep *mrail_ep; ++ struct iovec iovec = { ++ .iov_base = (void*)buf, ++ .iov_len = len ++ }; ++ struct fi_rma_iov rma_iov= { ++ .addr = addr, ++ .len = len, ++ .key = key ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &iovec, ++ .desc = &desc, ++ .iov_count = 1, ++ .addr = src_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .context = context, ++ .data = 0 ++ }; ++ ++ mrail_ep = container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ return mrail_ep_readmsg(ep_fid, &msg, mrail_ep->util_ep.tx_op_flags); ++} ++ ++static ssize_t mrail_ep_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ return mrail_ep_post_rma(ep_fid, msg, flags, FI_WRITE); ++} ++ ++static ssize_t mrail_ep_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, void *desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, void *context) ++{ ++ struct mrail_ep *mrail_ep; ++ struct iovec iovec = { ++ .iov_base = (void*)buf, ++ .iov_len = len ++ }; ++ struct fi_rma_iov rma_iov= { ++ .addr = addr, ++ .len = len, ++ .key = key ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &iovec, ++ .desc = &desc, ++ .iov_count = 1, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .context = context, ++ .data = 0 ++ }; ++ ++ mrail_ep = container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ ++ return mrail_ep_writemsg(ep_fid, &msg, mrail_ep->util_ep.tx_op_flags); ++} ++ ++static ssize_t mrail_ep_inject_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct mrail_ep *mrail_ep; ++ struct mrail_addr_key *mr_map; ++ uint32_t rail; ++ ssize_t ret; ++ ++ mrail_ep = container_of(ep_fid, struct mrail_ep, util_ep.ep_fid.fid); ++ mr_map = (struct mrail_addr_key *) key; ++ ++ rail = mrail_get_tx_rail(mrail_ep); ++ ret = fi_inject_write(mrail_ep->rails[rail].ep, buf, len, ++ dest_addr, addr, mr_map[rail].key); ++ if (ret) { ++ FI_WARN(&mrail_prov, FI_LOG_EP_DATA, ++ "Unable to post inject write on rail: %" PRIu32 "\n", ++ rail); ++ return ret; ++ } ++ ofi_ep_wr_cntr_inc(&mrail_ep->util_ep); ++ ++ return 0; ++} ++ ++struct fi_ops_rma mrail_ops_rma = { ++ .size = sizeof (struct fi_ops_rma), ++ .read = mrail_ep_read, ++ .readv = fi_no_rma_readv, ++ .readmsg = mrail_ep_readmsg, ++ .write = mrail_ep_write, ++ .writev = fi_no_rma_writev, ++ .writemsg = mrail_ep_writemsg, ++ .inject = mrail_ep_inject_write, ++ .writedata = fi_no_rma_writedata, ++ .injectdata = fi_no_rma_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/NetDirect/README.NetworkDirect b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/NetDirect/README.NetworkDirect +index 06472ed4e..a6d113a24 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/NetDirect/README.NetworkDirect ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/NetDirect/README.NetworkDirect +@@ -1,6 +1,12 @@ +-Network Direct SDK/DDK may be downloaded from: ++Network Direct SDK/DDK may be obtained as a nuget package (preferred) from: ++ ++https://www.nuget.org/packages/NetworkDirect ++ ++or downloaded from: ++ + https://www.microsoft.com/en-us/download/details.aspx?id=36043 + on page press Download button and select NetworkDirect_DDK.zip. ++ + Extract header files from downloaded + NetworkDirect_DDK.zip:\NetDirect\include\ file into this directory, + or add path to NetDirect headers into VS include paths +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir.h +index f0c4d47d0..7b17e4ca9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir.h +@@ -49,23 +49,26 @@ extern "C" { + #endif /* __cplusplus */ + + #define OFI_ND_MAJOR_VERSION 1 +-#define OFI_ND_MINOR_VERSION 5 ++#define OFI_ND_MINOR_VERSION 0 + + #define ND_MSG_IOV_LIMIT (256) + #define ND_MSG_INTERNAL_IOV_LIMIT (512) + #define ND_EP_MAX_CM_DATA_SIZE (256) + #define OFI_ND_MAX_MR_CNT (1 << 16) + +-#define OFI_ND_PRIMARY_CAPS \ +- FI_MSG | FI_RMA | FI_SEND | FI_RECV | \ +- FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE +-#define OFI_ND_CAPS OFI_ND_PRIMARY_CAPS ++#define OFI_ND_DOMAIN_CAPS (FI_LOCAL_COMM | FI_REMOTE_COMM) + +-#define OFI_ND_TX_OP_FLAGS \ +- FI_INJECT | FI_COMPLETION | FI_TRANSMIT_COMPLETE | \ +- FI_INJECT_COMPLETE | FI_DELIVERY_COMPLETE | \ +- FI_SELECTIVE_COMPLETION ++#define OFI_ND_EP_CAPS (FI_MSG | FI_RMA | \ ++ FI_SEND | FI_RECV | \ ++ FI_READ | FI_WRITE | \ ++ FI_REMOTE_READ | FI_REMOTE_WRITE) + ++#define OFI_ND_TX_OP_FLAGS (FI_INJECT | FI_COMPLETION | FI_TRANSMIT_COMPLETE | \ ++ FI_INJECT_COMPLETE | FI_DELIVERY_COMPLETE | \ ++ FI_SELECTIVE_COMPLETION) ++ ++#define OFI_ND_MSG_ORDER (FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_RAS | \ ++ FI_ORDER_WAW | FI_ORDER_WAS | FI_ORDER_SAW | FI_ORDER_SAS ) + + extern struct gl_data { + int inline_thr; +@@ -157,6 +160,25 @@ static inline size_t unique(void *base, size_t num, size_t width, + return n; + } + ++#define H2F(x) ofi_nd_hresult_2_fierror(x) ++ ++static inline int ofi_nd_hresult_2_fierror(HRESULT hr) ++{ ++ switch (hr) { ++ case S_OK: ++ case ND_PENDING: ++ return FI_SUCCESS; ++ case ND_BUFFER_OVERFLOW: ++ return -FI_EOVERFLOW; ++ case ND_CONNECTION_REFUSED: ++ return -FI_ECONNREFUSED; ++ case ND_TIMEOUT: ++ return -FI_ETIMEDOUT; ++ default: ++ return -FI_EOTHER; ++ } ++} ++ + #define OFI_ND_TIMEOUT_INIT(timeout) \ + uint64_t sfinish = ((timeout) >= 0) ? \ + (fi_gettime_ms() + (timeout) * 10000) : -1; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cntr.c +index 5c7f80e06..cd3a19781 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cntr.c +@@ -34,7 +34,6 @@ + + #include "netdir.h" + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_iface.h" + + #include "rdma/fabric.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cq.c +index 945787dc6..e69ff4de7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_cq.c +@@ -34,7 +34,6 @@ + + #include "netdir.h" + #include "netdir_cq.h" +-#include "netdir_err.h" + #include "netdir_iface.h" + #include "netdir_unexp.h" + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_domain.c +index e9d5b4b8a..590e1aad4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_domain.c +@@ -37,7 +37,6 @@ + + #include "netdir.h" + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_util.h" + #include "netdir_iface.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep.c +index 72729c4a6..f183078af 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep.c +@@ -37,7 +37,6 @@ + + #include "netdir.h" + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_util.h" + #include "netdir_iface.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_msg.c +index 05851d0e6..3427dbe1d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_msg.c +@@ -38,7 +38,6 @@ + #include "netdir.h" + #include "netdir_ov.h" + #include "netdir_cq.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + #include "netdir_unexp.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_rma.c +index 09ff39b69..4bc1058f8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_rma.c +@@ -35,7 +35,6 @@ + #include "netdir.h" + #include "netdir_ov.h" + #include "netdir_cq.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_srx.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_srx.c +index c5cbbfd10..19d19a6d6 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_srx.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ep_srx.c +@@ -35,7 +35,6 @@ + #include "netdir.h" + #include "netdir_ov.h" + #include "netdir_cq.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + #include "netdir_unexp.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_eq.c +index 129aa96a8..9deeef24a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_eq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_eq.c +@@ -34,7 +34,6 @@ + + #include "netdir.h" + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_init.c +index 5da3f5a48..509b3504f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_init.c +@@ -43,6 +43,23 @@ + + #include "netdir_queue.h" + ++const char ofi_nd_prov_name[] = "netdir"; ++ ++struct fi_provider ofi_nd_prov = { ++ .name = ofi_nd_prov_name, ++ .version = FI_VERSION(OFI_ND_MAJOR_VERSION, OFI_ND_MINOR_VERSION), ++ .fi_version = FI_VERSION(1, 7), ++ .getinfo = ofi_nd_getinfo, ++ .fabric = ofi_nd_fabric, ++ .cleanup = ofi_nd_fini ++}; ++ ++struct util_prov ofi_nd_util_prov = { ++ .prov = &ofi_nd_prov, ++ .info = 0, ++ .flags = UTIL_RX_SHARED_CTX, ++}; ++ + struct gl_data gl_data = { + /* 8 KByte */ + .inline_thr = 8192, +@@ -59,8 +76,7 @@ int ofi_nd_getinfo(uint32_t version, const char *node, const char *service, + if (ofi_nd_util_prov.info) { + return util_getinfo(&ofi_nd_util_prov, version, node, service, flags, + hints, info); +- } +- else { ++ } else { + *info = NULL; + return -FI_EINVAL; + } +@@ -93,6 +109,7 @@ static int ofi_nd_adapter_cb(const ND2_ADAPTER_INFO *adapter, const char *name) + info->tx_attr->iov_limit = ND_MSG_IOV_LIMIT; + info->tx_attr->rma_iov_limit = ND_MSG_IOV_LIMIT; + info->tx_attr->op_flags = OFI_ND_TX_OP_FLAGS; ++ info->tx_attr->msg_order = OFI_ND_MSG_ORDER; + + info->rx_attr->caps = FI_MSG | FI_RECV; + info->rx_attr->comp_order = FI_ORDER_STRICT; +@@ -101,12 +118,14 @@ static int ofi_nd_adapter_cb(const ND2_ADAPTER_INFO *adapter, const char *name) + /* TODO: if optimization will be needed, we can use adapter->MaxInitiatorSge, + * and use ND SGE to recv iovecs */ + info->rx_attr->iov_limit = ND_MSG_IOV_LIMIT; ++ info->rx_attr->msg_order = OFI_ND_MSG_ORDER; + + info->ep_attr->type = FI_EP_MSG; + info->ep_attr->protocol = FI_PROTO_NETWORKDIRECT; + info->ep_attr->protocol_version = 0; + info->ep_attr->max_msg_size = (size_t)adapter->MaxTransferLength; + ++ info->domain_attr->caps = OFI_ND_DOMAIN_CAPS; + info->domain_attr->name = strdup(name); + info->domain_attr->threading = FI_THREAD_SAFE; + info->domain_attr->control_progress = FI_PROGRESS_AUTO; +@@ -121,13 +140,12 @@ static int ofi_nd_adapter_cb(const ND2_ADAPTER_INFO *adapter, const char *name) + info->fabric_attr->name = strdup(ofi_nd_prov_name); + info->fabric_attr->prov_version = FI_VERSION(OFI_ND_MAJOR_VERSION, OFI_ND_MINOR_VERSION); + +- info->caps = OFI_ND_CAPS; ++ info->caps = OFI_ND_EP_CAPS | OFI_ND_DOMAIN_CAPS; + info->addr_format = FI_SOCKADDR; + + if (!ofi_nd_util_prov.info) { + ofi_nd_util_prov.info = info; +- } +- else { ++ } else { + struct fi_info *finfo = (struct fi_info *) ofi_nd_util_prov.info; + + while (finfo->next) +@@ -151,9 +169,6 @@ NETDIR_INI + "Count of Entries in Array of Preposted Buffers: number of set of buffer " + "in each entry array of buffers to be preposted per EP"); + +- //fi_param_define(&ofi_nd_prov, "presize", FI_PARAM_INT, +- // "Pre-post vector size, number of elements in pre-post vector"); +- + ofi_nd_startup(ofi_nd_adapter_cb); + return &ofi_nd_prov; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_log.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_log.h +index 32a662c65..a56ef419f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_log.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_log.h +@@ -72,19 +72,19 @@ extern struct fi_provider ofi_nd_prov; + */ + static inline char *ofi_nd_strerror(DWORD err, HMODULE module) + { +- static char *message = 0; ++ static char *message = NULL; ++ size_t size; + + /* if message is allocated - free it */ + if (message) + LocalFree(message); + +- size_t size = FormatMessageA( +- FORMAT_MESSAGE_ALLOCATE_BUFFER | +- FORMAT_MESSAGE_FROM_SYSTEM | +- FORMAT_MESSAGE_IGNORE_INSERTS | +- (module ? FORMAT_MESSAGE_FROM_HMODULE : 0), +- module, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), +- (LPSTR)&message, 0, NULL); ++ size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | ++ FORMAT_MESSAGE_FROM_SYSTEM | ++ FORMAT_MESSAGE_IGNORE_INSERTS | ++ (module ? FORMAT_MESSAGE_FROM_HMODULE : 0), ++ module, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), ++ (LPSTR)&message, 0, NULL); + + return size ? message : (char*)""; + } +@@ -122,8 +122,7 @@ ofi_nd_get_last_error_str(HRESULT hr, char *errmsg, SIZE_T max_msg_len) + #define ND_FLUSHED 0x10000L /* undocumented ND error code */ + #define ND_DISCONNECTED 0xc000020C + +-static char * +-ofi_nd_error_str(HRESULT hr) ++static char *ofi_nd_error_str(HRESULT hr) + { + static char lerr[128]; + char *err_str = NULL; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_mr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_mr.c +index 1aa5eab06..a35aa14f5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_mr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_mr.c +@@ -35,7 +35,6 @@ + #include "netdir.h" + + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_iface.h" + + #include "ofi.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ndinit.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ndinit.c +index 47679fae7..a9b8dfdd6 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ndinit.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_ndinit.c +@@ -41,7 +41,6 @@ + + #include "netdir.h" + #include "netdir_log.h" +-#include "netdir_err.h" + + #ifndef ofi_sizeofaddr + #define ofi_sizeofaddr(address) \ +@@ -203,13 +202,8 @@ static inline wchar_t *ofi_nd_get_provider_path(const WSAPROTOCOL_INFOW *proto) + { + assert(proto); + +- int len; +- int lenex; +- int err; +- int res; +- +- wchar_t *prov; +- wchar_t *provex; ++ int len, lenex, err, res; ++ wchar_t *prov, *provex; + + res = WSCGetProviderPath((GUID*)&proto->ProviderId, NULL, &len, &err); + if (err != WSAEFAULT || !len) +@@ -268,6 +262,7 @@ static inline struct module_t *ofi_nd_search_module(const wchar_t* path) + { + size_t i; + size_t j; ++ + for (i = 0; i < ofi_nd_infra.providers.count; i++) { + if (path && ofi_nd_file_exists(path) && + !ofi_nd_is_directory(path)) { +@@ -283,15 +278,20 @@ static inline struct module_t *ofi_nd_search_module(const wchar_t* path) + + static inline struct module_t *ofi_nd_create_module(const wchar_t* path) + { ++ struct module_t *module; ++ HMODULE hmodule; ++ can_unload_now_t unload; ++ get_class_object_t getclass; ++ + assert(ofi_nd_infra.providers.modules); + +- struct module_t *module = ofi_nd_search_module(path); ++ module = ofi_nd_search_module(path); + if (module) + return module; + + /* ok, this is not duplicate. try to + load it and get class factory*/ +- HMODULE hmodule = LoadLibraryW(path); ++ hmodule = LoadLibraryW(path); + if (!hmodule) { + ND_LOG_WARN(FI_LOG_CORE, + "ofi_nd_create_module: provider : %S, failed to load: %s\n", +@@ -299,8 +299,8 @@ static inline struct module_t *ofi_nd_create_module(const wchar_t* path) + return NULL; + } + +- can_unload_now_t unload = (can_unload_now_t)GetProcAddress(hmodule, "DllCanUnloadNow"); +- get_class_object_t getclass = (get_class_object_t)GetProcAddress(hmodule, "DllGetClassObject"); ++ unload = (can_unload_now_t)GetProcAddress(hmodule, "DllCanUnloadNow"); ++ getclass = (get_class_object_t)GetProcAddress(hmodule, "DllGetClassObject"); + if (!unload || !getclass) { + ND_LOG_WARN(FI_LOG_CORE, + "ofi_nd_create_module: provider: %S, failed to import interface\n", +@@ -325,31 +325,36 @@ fn_noiface: + + static inline HRESULT ofi_nd_create_factory(const WSAPROTOCOL_INFOW* proto) + { ++ wchar_t *path; ++ struct module_t *module; ++ IClassFactory* factory; ++ HRESULT hr; ++ struct factory_t *ftr; ++ + assert(proto); + assert(ofi_nd_is_valid_proto(proto)); + assert(ofi_nd_infra.class_factories.factory); + +- wchar_t *path = ofi_nd_get_provider_path(proto); ++ path = ofi_nd_get_provider_path(proto); + if (path) + ND_LOG_INFO(FI_LOG_CORE, +- "ofi_nd_create_factory: provider " FI_ND_GUID_FORMAT " path: %S \n", +- FI_ND_GUID_ARG(proto->ProviderId), path); ++ "ofi_nd_create_factory: provider " FI_ND_GUID_FORMAT " path: %S \n", ++ FI_ND_GUID_ARG(proto->ProviderId), path); + else /* can't get provider path. just return */ + return S_OK; + +- struct module_t *module = ofi_nd_create_module(path); ++ module = ofi_nd_create_module(path); + free(path); + if (!module) +- return S_OK;; ++ return S_OK; + + assert(module->get_class_object); +- IClassFactory* factory; +- HRESULT hr = module->get_class_object(&proto->ProviderId, &IID_IClassFactory, +- (void**)&factory); ++ hr = module->get_class_object(&proto->ProviderId, &IID_IClassFactory, ++ (void**)&factory); + if (FAILED(hr)) + return hr; + +- struct factory_t *ftr = &ofi_nd_infra.class_factories.factory[ofi_nd_infra.class_factories.count]; ++ ftr = &ofi_nd_infra.class_factories.factory[ofi_nd_infra.class_factories.count]; + ofi_nd_infra.class_factories.count++; + ftr->class_factory = factory; + ftr->module = module; +@@ -364,21 +369,21 @@ static int ofi_nd_adapter_cmp(const void *adapter1, const void *adapter2) + &((struct adapter_t*)adapter2)->address); + } + +-static HRESULT ofi_nd_create_adapter() ++static HRESULT ofi_nd_create_adapter(void) + { + size_t addr_count = 0; + HRESULT hr; + + for (size_t i = 0; i < ofi_nd_infra.class_factories.count; i++) { + struct factory_t *factory = &ofi_nd_infra.class_factories.factory[i]; ++ ULONG listsize = 0; ++ + assert(factory->class_factory); + + hr = factory->class_factory->lpVtbl->CreateInstance(factory->class_factory, + NULL, &IID_IND2Provider, (void**)&factory->provider); + if (FAILED(hr)) + return hr; +- +- ULONG listsize = 0; + hr = factory->provider->lpVtbl->QueryAddressList(factory->provider, NULL, &listsize); + if (hr != ND_BUFFER_OVERFLOW) + return hr; +@@ -438,14 +443,17 @@ static HRESULT ofi_nd_create_adapter() + for (size_t i = 0; i < ofi_nd_infra.adapters.count; i++) { + struct adapter_t *adapter = &ofi_nd_infra.adapters.adapter[i]; + struct factory_t *factory = adapter->factory; ++ wchar_t *saddr; ++ DWORD addrlen = 0; ++ UINT64 id; ++ int res; ++ + assert(factory); + assert(factory->provider); + + assert(adapter->address.addr.sa_family == AF_INET || + adapter->address.addr.sa_family == AF_INET6); + +- UINT64 id; +- + hr = factory->provider->lpVtbl->ResolveAddress(factory->provider, + &adapter->address.addr, + ofi_sizeofaddr(&adapter->address.addr), &id); +@@ -471,17 +479,12 @@ static HRESULT ofi_nd_create_adapter() + return hr; + adapter->info = *info; + free(info); +- } +- else if (FAILED(hr)) { ++ } else if (FAILED(hr)) { + return hr; + } + + /* generate adapter's name */ +- wchar_t *saddr; +- +- DWORD addrlen = 0; +- +- int res = WSAAddressToStringW(&adapter->address.addr, ++ res = WSAAddressToStringW(&adapter->address.addr, + ofi_sizeofaddr(&adapter->address.addr), + NULL, NULL, &addrlen); + if (res == SOCKET_ERROR && WSAGetLastError() == WSAEFAULT && addrlen) { +@@ -507,27 +510,22 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + { + DWORD proto_len = 0; + HRESULT hr = ND_INTERNAL_ERROR; +- int i; +- int protonum; +- size_t j; ++ int i, protonum, err; ++ size_t j, prov_count = 0; + WSAPROTOCOL_INFOW *proto = 0; + +- size_t prov_count = 0; +- +- int err; +- +- memset(&ofi_nd_infra, 0, sizeof(*(&ofi_nd_infra))); ++ memset(&ofi_nd_infra, 0, sizeof(ofi_nd_infra)); + + int ret = WSCEnumProtocols(NULL, NULL, &proto_len, &err); + if (ret != SOCKET_ERROR || err != WSAENOBUFS) { + hr = ND_NO_MEMORY; +- goto fn_failed; ++ goto fn_exit; + } + + proto = (WSAPROTOCOL_INFOW*)(malloc(proto_len)); + if (!proto) { + hr = ND_NO_MEMORY; +- goto fn_failed; ++ goto fn_exit; + } + + protonum = WSCEnumProtocols(NULL, proto, &proto_len, &err); +@@ -540,9 +538,7 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + as maximum of existing providers and class factories */ + for (i = 0; i < protonum; i++) { + if (ofi_nd_is_valid_proto(&proto[i])) +- { + prov_count++; +- } + } + + if (!prov_count) { +@@ -555,9 +551,8 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + goto fn_protofail; + + for (i = 0; i < protonum; i++) { +- if (ofi_nd_is_valid_proto(&proto[i])) { ++ if (ofi_nd_is_valid_proto(&proto[i])) + ofi_nd_create_factory(&proto[i]); +- } + } + + free(proto); +@@ -565,7 +560,6 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + /* ok, factories are created, now list all available addresses, try to + create adapters & collect adapter's info */ + hr = ofi_nd_create_adapter(); +- + if (FAILED(hr)) + return hr; + +@@ -577,18 +571,21 @@ static HRESULT ofi_nd_init(ofi_nd_adapter_cb_t cb) + cb(&ofi_nd_infra.adapters.adapter[j].info, + ofi_nd_infra.adapters.adapter[j].name); + +-fn_exit: + return hr; +- + fn_protofail: + free(proto); +-fn_failed: +- goto fn_exit; ++fn_exit: ++ return hr; + } + ++/* we don't need here exclusive execution because this function ++ * is called from OFI init routine which is single thread */ + HRESULT ofi_nd_startup(ofi_nd_adapter_cb_t cb) +-{ /* we don't need here exclusive execution because this function +- is called from OFI init routine which is single thread */ ++{ ++ WSADATA data; ++ HRESULT hr; ++ int ret; ++ + assert(cb); + + if (ofi_nd_startup_done) +@@ -596,22 +593,20 @@ HRESULT ofi_nd_startup(ofi_nd_adapter_cb_t cb) + + ND_LOG_INFO(FI_LOG_CORE, "ofi_nd_startup: starting initialization\n"); + +- WSADATA data; +- +- int ret = WSAStartup(MAKEWORD(2, 2), &data); ++ ret = WSAStartup(MAKEWORD(2, 2), &data); + if (ret) + return HRESULT_FROM_WIN32(ret); + + ND_LOG_DEBUG(FI_LOG_CORE, "ofi_nd_startup: WSAStartup complete\n"); + +- HRESULT hr = ofi_nd_init(cb); ++ hr = ofi_nd_init(cb); + + ofi_nd_startup_done = 1; + + return hr; + } + +-HRESULT ofi_nd_shutdown() ++HRESULT ofi_nd_shutdown(void) + { + if (!ofi_nd_startup_done) + return S_OK; +@@ -619,25 +614,29 @@ HRESULT ofi_nd_shutdown() + ND_LOG_INFO(FI_LOG_CORE, "ofi_nd_shutdown: shutdown WSA\n"); + + ofi_nd_free_infra(); +- +- int ret = WSACleanup(); +- + ofi_nd_startup_done = 0; +- return HRESULT_FROM_WIN32(ret); ++ ++ return HRESULT_FROM_WIN32(WSACleanup()); + } + + int ofi_nd_lookup_adapter(const char *name, IND2Adapter **adapter, struct sockaddr** addr) + { ++ size_t i; ++ + assert(name); + assert(adapter); + + if (!ofi_nd_startup_done) + return -FI_EOPBADSTATE; + +- size_t i; + for (i = 0; i < ofi_nd_infra.adapters.count; i++) { + struct adapter_t *ada = &ofi_nd_infra.adapters.adapter[i]; + if (ada->name && !strcmp(ada->name, name)) { ++ HRESULT hr; ++ UINT64 adapter_id; ++ IClassFactory* factory = NULL; ++ IND2Provider *provider = NULL; ++ + /* ok, we found good adapter. try to initialize it */ + if (ada->adapter) { + *adapter = ada->adapter; +@@ -650,8 +649,7 @@ int ofi_nd_lookup_adapter(const char *name, IND2Adapter **adapter, struct sockad + assert(ada->factory->module); + assert(ada->factory->module->get_class_object); + +- IClassFactory* factory = NULL; +- HRESULT hr = ada->factory->module->get_class_object( ++ hr = ada->factory->module->get_class_object( + &ada->factory->protocol.ProviderId, + &IID_IClassFactory, + (void**)&factory); +@@ -659,26 +657,24 @@ int ofi_nd_lookup_adapter(const char *name, IND2Adapter **adapter, struct sockad + return H2F(hr); + assert(factory); + +- IND2Provider *provider = NULL; +- hr = factory->lpVtbl->CreateInstance(factory, NULL, &IID_IND2Provider, +- (void**)&provider); ++ hr = factory->lpVtbl->CreateInstance(factory, NULL, ++ &IID_IND2Provider, ++ (void**)&provider); + factory->lpVtbl->Release(factory); + if (FAILED(hr)) + return H2F(hr); + assert(provider); + +- UINT64 adapter_id; +- + hr = provider->lpVtbl->ResolveAddress(provider, &ada->address.addr, +- ofi_sizeofaddr(&ada->address.addr), +- &adapter_id); ++ ofi_sizeofaddr(&ada->address.addr), ++ &adapter_id); + if (FAILED(hr)) { + provider->lpVtbl->Release(provider); + return H2F(hr); + } + + hr = provider->lpVtbl->OpenAdapter(provider, &IID_IND2Adapter, adapter_id, +- (void**)&ada->adapter); ++ (void**)&ada->adapter); + provider->lpVtbl->Release(provider); + if (FAILED(hr)) + return H2F(hr); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_pep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_pep.c +index 98442867b..188984fed 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_pep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_pep.c +@@ -43,7 +43,6 @@ + #include "ofi_util.h" + + #include "netdir_ov.h" +-#include "netdir_err.h" + #include "netdir_log.h" + #include "netdir_iface.h" + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_unexp.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_unexp.c +index 506199a1e..c74e42fc3 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_unexp.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/netdir/src/netdir_unexp.c +@@ -40,7 +40,6 @@ + #include "netdir.h" + #include "netdir_cq.h" + #include "netdir_log.h" +-#include "netdir_err.h" + #include "netdir_util.h" + #include "netdir_queue.h" + #include "netdir_iface.h" +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx.h +index 3485e3f59..9c761b4da 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx.h +@@ -76,7 +76,7 @@ extern struct fi_provider psmx_prov; + + extern int psmx_am_compat_mode; + +-#define PSMX_VERSION (FI_VERSION(1, 6)) ++#define PSMX_VERSION (FI_VERSION(1, 7)) + + #define PSMX_OP_FLAGS (FI_INJECT | FI_MULTI_RECV | FI_COMPLETION | \ + FI_TRIGGER | FI_INJECT_COMPLETE | \ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_init.c +index daa3465b8..3e0a89e70 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_init.c +@@ -53,7 +53,7 @@ struct psmx_env psmx_env = { + + static void psmx_init_env(void) + { +- if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK")) ++ if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK") || getenv("PMIX_RANK")) + psmx_env.name_server = 0; + + fi_param_get_bool(&psmx_prov, "name_server", &psmx_env.name_server); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_wait.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_wait.c +index 470ce8d72..7e48c66c2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_wait.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm/src/psmx_wait.c +@@ -1,9 +1,9 @@ + /* + * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. + * +- * This software is waitailable to you under a choice of one of two ++ * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, waitailable from the file ++ * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * BSD license below: + * +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/Makefile.include +index 167fa3485..7e4783ceb 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/Makefile.include +@@ -28,130 +28,69 @@ _psm2_files += \ + + _psm2_nodist_files = \ + prov/psm2/src/psm2/psm_am.c \ +- prov/psm2/src/psm2/psm2_am.h \ +- prov/psm2/src/psm2/psm_am_internal.h \ + prov/psm2/src/psm2/psm.c \ +- prov/psm2/src/psm2/psm2.h \ + prov/psm2/src/psm2/psm_context.c \ +- prov/psm2/src/psm2/psm_context.h \ + prov/psm2/src/psm2/psm_diags.c \ + prov/psm2/src/psm2/psm_ep.c \ +- prov/psm2/src/psm2/psm_ep.h \ + prov/psm2/src/psm2/psm_ep_connect.c \ + prov/psm2/src/psm2/psm_error.c \ +- prov/psm2/src/psm2/psm_error.h \ +- prov/psm2/src/psm2/psm_help.h \ +- prov/psm2/src/psm2/psm_lock.h \ +- prov/psm2/src/psm2/psm_log.h \ + prov/psm2/src/psm2/psm_memcpy.c \ + prov/psm2/src/psm2/psm_mock.c \ + prov/psm2/src/psm2/psm_mpool.c \ +- prov/psm2/src/psm2/psm_mpool.h \ + prov/psm2/src/psm2/psm_mq.c \ +- prov/psm2/src/psm2/psm2_mq.h \ +- prov/psm2/src/psm2/psm_mq_internal.h \ + prov/psm2/src/psm2/psm_mq_recv.c \ + prov/psm2/src/psm2/psm_mq_utils.c \ + prov/psm2/src/psm2/psm_perf.c \ +- prov/psm2/src/psm2/psm_perf.h \ + prov/psm2/src/psm2/psm_stats.c \ +- prov/psm2/src/psm2/psm_stats.h \ + prov/psm2/src/psm2/psm_sysbuf.c \ +- prov/psm2/src/psm2/psm_sysbuf.h \ + prov/psm2/src/psm2/psm_timer.c \ +- prov/psm2/src/psm2/psm_timer.h \ +- prov/psm2/src/psm2/psm_user.h \ + prov/psm2/src/psm2/psm_utils.c \ +- prov/psm2/src/psm2/psm_utils.h \ +- prov/psm2/src/psm2/ptl.h \ + prov/psm2/src/psm2/psmi_wrappers.c \ +- prov/psm2/src/psm2/psmi_wrappers.h \ ++ prov/psm2/src/psm2/psm2_hal.c \ + prov/psm2/src/psm2/ptl_am/am_cuda_memhandle_cache.c \ +- prov/psm2/src/psm2/ptl_am/am_cuda_memhandle_cache.h \ + prov/psm2/src/psm2/ptl_am/am_reqrep.c \ + prov/psm2/src/psm2/ptl_am/am_reqrep_shmem.c \ + prov/psm2/src/psm2/ptl_am/cmarwu.c \ +- prov/psm2/src/psm2/ptl_am/cmarw.h \ +- prov/psm2/src/psm2/ptl_am/psm_am_internal.h \ + prov/psm2/src/psm2/ptl_am/ptl.c \ +- prov/psm2/src/psm2/ptl_am/ptl_fwd.h \ + prov/psm2/src/psm2/ptl_ips/ips_crc32.c \ + prov/psm2/src/psm2/ptl_ips/ips_epstate.c \ +- prov/psm2/src/psm2/ptl_ips/ips_epstate.h \ +- prov/psm2/src/psm2/ptl_ips/ipserror.c \ +- prov/psm2/src/psm2/ptl_ips/ipserror.h \ +- prov/psm2/src/psm2/ptl_ips/ips_expected_proto.h \ + prov/psm2/src/psm2/ptl_ips/ips_opp_path_rec.c \ + prov/psm2/src/psm2/ptl_ips/ips_path_rec.c \ +- prov/psm2/src/psm2/ptl_ips/ips_path_rec.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto.c \ +- prov/psm2/src/psm2/ptl_ips/ips_proto.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto_am.c \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_am.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto_connect.c \ + prov/psm2/src/psm2/ptl_ips/ips_proto_dump.c \ + prov/psm2/src/psm2/ptl_ips/ips_proto_expected.c \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_header.h \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_help.h \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_internal.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto_mq.c \ +- prov/psm2/src/psm2/ptl_ips/ips_proto_params.h \ + prov/psm2/src/psm2/ptl_ips/ips_proto_recv.c \ + prov/psm2/src/psm2/ptl_ips/ips_recvhdrq.c \ +- prov/psm2/src/psm2/ptl_ips/ips_recvhdrq.h \ + prov/psm2/src/psm2/ptl_ips/ips_recvq.c \ +- prov/psm2/src/psm2/ptl_ips/ips_recvq.h \ + prov/psm2/src/psm2/ptl_ips/ips_scb.c \ +- prov/psm2/src/psm2/ptl_ips/ips_scb.h \ +- prov/psm2/src/psm2/ptl_ips/ips_spio.c \ +- prov/psm2/src/psm2/ptl_ips/ips_spio.h \ +- prov/psm2/src/psm2/ptl_ips/ips_stats.h \ +- prov/psm2/src/psm2/ptl_ips/ips_subcontext.c \ +- prov/psm2/src/psm2/ptl_ips/ips_subcontext.h \ + prov/psm2/src/psm2/ptl_ips/ips_tid.c \ +- prov/psm2/src/psm2/ptl_ips/ips_tid.h \ + prov/psm2/src/psm2/ptl_ips/ips_tidcache.c \ +- prov/psm2/src/psm2/ptl_ips/ips_tidcache.h \ + prov/psm2/src/psm2/ptl_ips/ips_tidflow.c \ +- prov/psm2/src/psm2/ptl_ips/ips_tidflow.h \ + prov/psm2/src/psm2/ptl_ips/ips_writehdrq.c \ +- prov/psm2/src/psm2/ptl_ips/ips_writehdrq.h \ + prov/psm2/src/psm2/ptl_ips/ptl.c \ +- prov/psm2/src/psm2/ptl_ips/ptl_fwd.h \ +- prov/psm2/src/psm2/ptl_ips/ptl_ips.h \ + prov/psm2/src/psm2/ptl_ips/ptl_rcvthread.c \ + prov/psm2/src/psm2/ptl_self/ptl.c \ +- prov/psm2/src/psm2/ptl_self/ptl_fwd.h \ + prov/psm2/src/psm2/libuuid/psm_uuid.c \ +- prov/psm2/src/psm2/libuuid/psm_uuid.h \ + prov/psm2/src/psm2/libuuid/parse.c \ + prov/psm2/src/psm2/libuuid/pack.c \ + prov/psm2/src/psm2/libuuid/unpack.c \ + prov/psm2/src/psm2/libuuid/unparse.c \ + prov/psm2/src/psm2/opa/opa_debug.c \ + prov/psm2/src/psm2/opa/opa_dwordcpy-@psm2_ARCH@.c \ +- prov/psm2/src/psm2/opa/opa_i2cflash.c \ +- prov/psm2/src/psm2/opa/opa_proto.c \ + prov/psm2/src/psm2/opa/opa_service.c \ + prov/psm2/src/psm2/opa/opa_sysfs.c \ + prov/psm2/src/psm2/opa/opa_syslog.c \ + prov/psm2/src/psm2/opa/opa_time.c \ + prov/psm2/src/psm2/opa/opa_utils.c \ +- prov/psm2/src/psm2/include/hfi1_deprecated.h \ +- prov/psm2/src/psm2/include/opa_byteorder.h \ +- prov/psm2/src/psm2/include/opa_common.h \ +- prov/psm2/src/psm2/include/opa_debug.h \ +- prov/psm2/src/psm2/include/opa_intf.h \ +- prov/psm2/src/psm2/include/opa_queue.h \ +- prov/psm2/src/psm2/include/opa_revision.h \ +- prov/psm2/src/psm2/include/opa_service.h \ +- prov/psm2/src/psm2/include/opa_udebug.h \ +- prov/psm2/src/psm2/include/opa_user.h \ +- prov/psm2/src/psm2/include/psm2_mock_testing.h \ +- prov/psm2/src/psm2/include/rbtree.h \ +- prov/psm2/src/psm2/include/linux-@psm2_ARCH@/bit_ops.h \ +- prov/psm2/src/psm2/include/linux-@psm2_ARCH@/sysdep.h \ +- prov/psm2/src/psm2/mpspawn/mpspawn_stats.h ++ prov/psm2/src/psm2/psm_hal_gen1/psm_hal_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/opa_i2cflash_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/opa_proto_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/opa_service_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/opa_utils_gen1.c \ ++ prov/psm2/src/psm2/psm_hal_gen1/psm_gdrcpy.c + + if HAVE_PSM2_X86_64 + _psm2_nodist_files += \ +@@ -166,8 +105,10 @@ _psm2_cppflags = \ + -I$(top_srcdir)/prov/psm2/src/psm2/ptl_ips \ + -I$(top_srcdir)/prov/psm2/src/psm2/ptl_am \ + -I$(top_srcdir)/prov/psm2/src/psm2/ptl_self \ ++ -I$(top_srcdir)/prov/psm2/src/psm2/psm_hal_gen1 \ + -DNVALGRIND + ++ + endif HAVE_PSM2_SRC + + if HAVE_PSM2_DL +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/configure.m4 +index db0d927f3..844919d23 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/configure.m4 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/configure.m4 +@@ -18,6 +18,9 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + AC_DEFINE_UNQUOTED([HAVE_PSM2_SRC], $have_psm2_src, [PSM2 source is built-in]) + psm2_happy=0 + have_psm2_am_register_handlers_2=1 ++ have_psm2_mq_fp_msg=1 ++ have_psm2_mq_req_user=1 ++ have_psm2_info_query=1 + AS_IF([test x"$enable_psm2" != x"no"], + [AS_IF([test x$have_psm2_src = x0], + [ +@@ -25,7 +28,7 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + FI_CHECK_PACKAGE([psm2], + [psm2.h], + [psm2], +- [psm2_am_register_handlers_2], ++ [psm2_info_query], + [], + [$psm2_PREFIX], + [$psm2_LIBDIR], +@@ -33,12 +36,54 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + [psm2_happy=0]) + AS_IF([test x$psm2_happy = x0], + [ +- $as_echo "$as_me: recheck psm2 with reduced feature set." ++ $as_echo "$as_me: recheck psm2 without psm2_info_query." ++ have_psm2_info_query=0 ++ FI_CHECK_PACKAGE([psm2], ++ [psm2.h], ++ [psm2], ++ [psm2_mq_ipeek_dequeue_multi], ++ [], ++ [$psm2_PREFIX], ++ [$psm2_LIBDIR], ++ [psm2_happy=1], ++ [psm2_happy=0]) ++ ]) ++ AS_IF([test x$psm2_happy = x0], ++ [ ++ $as_echo "$as_me: recheck psm2 without psm2_mq_ipeek_dequeue_multi." ++ have_psm2_mq_req_user=0 ++ FI_CHECK_PACKAGE([psm2], ++ [psm2.h], ++ [psm2], ++ [psm2_mq_fp_msg], ++ [], ++ [$psm2_PREFIX], ++ [$psm2_LIBDIR], ++ [psm2_happy=1], ++ [psm2_happy=0]) ++ ]) ++ AS_IF([test x$psm2_happy = x0], ++ [ ++ $as_echo "$as_me: recheck psm2 without psm2_mq_fp_msg." ++ have_psm2_mq_fp_msg=0 ++ FI_CHECK_PACKAGE([psm2], ++ [psm2.h], ++ [psm2], ++ [psm2_am_register_handlers_2], ++ [], ++ [$psm2_PREFIX], ++ [$psm2_LIBDIR], ++ [psm2_happy=1], ++ [psm2_happy=0]) ++ ]) ++ AS_IF([test x$psm2_happy = x0], ++ [ ++ $as_echo "$as_me: recheck psm2 without psm2_am_register_handlers_2." + have_psm2_am_register_handlers_2=0 + FI_CHECK_PACKAGE([psm2], + [psm2.h], + [psm2], +- [psm2_ep_epid_lookup2], ++ [psm2_ep_disconnect2], + [], + [$psm2_PREFIX], + [$psm2_LIBDIR], +@@ -48,8 +93,11 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + ], + [ + dnl build with PSM2 source code included +- psm2_CPPFLAGS="-msse4.2" + psm2_happy=1 ++ have_psm2_mq_req_user=1 ++ AS_IF([test $cc_basename = icc], ++ [psm2_CPPFLAGS="-march=core-avx2"], ++ [psm2_CPPFLAGS="-mavx2"]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include ]], + [[ +@@ -76,30 +124,43 @@ AC_DEFUN([FI_PSM2_CONFIGURE],[ + psm2_happy=0 + ])]) + AS_IF([test x$psm2_happy = x1], +- AS_IF([test -f $with_psm2_src/libpsm2.spec.in], +- [AS_IF([grep -q psm2_am_register_handlers_2 $with_psm2_src/psm2_am.h], +- [ +- $as_echo "$as_me: creating links for PSM2 source code." +- mkdir -p $srcdir/prov/psm2/src/psm2 +- cp -srf $with_psm2_src/* $srcdir/prov/psm2/src/psm2/ +- ln -sf ../include/rbtree.h $srcdir/prov/psm2/src/psm2/ptl_ips/ +- ln -sf ../include/rbtree.h $srcdir/prov/psm2/src/psm2/ptl_am/ +- ], +- [ +- $as_echo "$as_me: PSM2 source under <$with_psm2_src> is too old." +- psm2_happy=0 +- ]) +- ], +- [ +- $as_echo "$as_me: no PSM2 source under <$with_psm2_src>." ++ [AS_IF([test -f $with_psm2_src/psm_hal_gen1/opa_common_gen1.h], ++ [ ++ $as_echo "$as_me: creating links for PSM2 source code." ++ mkdir -p $srcdir/prov/psm2/src/psm2 ++ cp -srf $with_psm2_src/* $srcdir/prov/psm2/src/psm2/ ++ ln -sf ../include/rbtree.h $srcdir/prov/psm2/src/psm2/ptl_ips/ ++ ln -sf ../include/rbtree.h $srcdir/prov/psm2/src/psm2/ptl_am/ ++ ++ hal_decl_file=$srcdir/prov/psm2/src/psm2/psm2_hal_inlines_d.h ++ hal_impl_file=$srcdir/prov/psm2/src/psm2/psm2_hal_inlines_i.h ++ $as_echo "#define PSMI_HAL_INST_CNT 1" >$hal_decl_file ++ $as_echo "#define PSMI_HAL_INLINE inline" >>$hal_decl_file ++ $as_echo "#define PSMI_HAL_CAT_INL_SYM(KERNEL) hfp_gen1_##KERNEL" >>$hal_decl_file ++ $as_echo "#include \"psm2_hal_inline_t.h\"" >>$hal_decl_file ++ $as_echo "#include \"psm_hal_gen1/psm_hal_inline_i.h\"" >$hal_impl_file ++ ], ++ [ ++ $as_echo "$as_me: PSM2 source under <$with_psm2_src> is missing or too old." ++ $as_echo "$as_me: Please get the latest source from https://github.com/intel/opa-psm2." + psm2_happy=0 +- ])) ++ ]) ++ ]) + ]) + ]) + AS_IF([test $psm2_happy -eq 1], [$1], [$2]) + AC_DEFINE_UNQUOTED([HAVE_PSM2_AM_REGISTER_HANDLERS_2], + $have_psm2_am_register_handlers_2, + [psm2_am_register_handlers_2 function is present]) ++ AC_DEFINE_UNQUOTED([HAVE_PSM2_MQ_FP_MSG], ++ $have_psm2_mq_fp_msg, ++ [psm2_mq_fp_msg function is present]) ++ AC_DEFINE_UNQUOTED([HAVE_PSM2_MQ_REQ_USER], ++ $have_psm2_mq_req_user, ++ [psm2_mq_ipeek_dequeue_multi function is present]) ++ AC_DEFINE_UNQUOTED([HAVE_PSM2_INFO_QUERY], ++ $have_psm2_info_query, ++ [psm2_info_query function is present]) + ]) + + AC_ARG_WITH([psm2-src], +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct.h +new file mode 100644 +index 000000000..620edace5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct.h +@@ -0,0 +1,42 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015-2016 Los Alamos National Security, LLC. ++ * All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_H ++#define FI_DIRECT_H ++ ++/* ++ * use default definitions ++ */ ++ ++#endif /* FI_DIRECT_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic.h +new file mode 100644 +index 000000000..6bbd6847f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic.h +@@ -0,0 +1,269 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_ATOMIC_H ++#define FI_DIRECT_ATOMIC_H ++ ++#define FABRIC_DIRECT_ATOMIC ++ ++ssize_t psmx2_atomic_write( ++ struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_writev( ++ struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_writemsg( ++ struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, uint64_t flags); ++ ++ssize_t psmx2_atomic_inject( ++ struct fid_ep *ep, const void *buf, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op); ++ ++ssize_t psmx2_atomic_readwrite( ++ struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_readwritev( ++ struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_readwritemsg( ++ struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ uint64_t flags); ++ ++ssize_t psmx2_atomic_comparewrite( ++ struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ const void *compare, void *compare_desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_compareweitev( ++ struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ const struct fi_ioc *comparev, void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context); ++ ++ssize_t psmx2_atomic_comparewritemsg( ++ struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ uint64_t flags); ++ ++int psmx2_atomic_writevalid( ++ struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count); ++ ++int psmx2_atomic_readwritevalid( ++ struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count); ++ ++int psmx2_atomic_comparewritevalid( ++ struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count); ++ ++int psmx2_query_atomic( ++ struct fid_domain *domain, ++ enum fi_datatype datatype, enum fi_op op, ++ struct fi_atomic_attr *attr, uint64_t flags); ++ ++ ++static inline ssize_t ++fi_atomic(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_write(ep, buf, count, desc, dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++static inline ssize_t ++fi_atomicv(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_writev(ep, iov, desc, count, dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++static inline ssize_t ++fi_atomicmsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ return psmx2_atomic_writemsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_inject_atomic(struct fid_ep *ep, const void *buf, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op) ++{ ++ return psmx2_atomic_inject(ep, buf, count, dest_addr, addr, ++ key, datatype, op); ++} ++ ++static inline ssize_t ++fi_fetch_atomic(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_readwrite(ep, buf, count, desc, result, result_desc, ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static inline ssize_t ++fi_fetch_atomicv(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_readwritev(ep, iov, desc, count, ++ resultv, result_desc, result_count, ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static inline ssize_t ++fi_fetch_atomicmsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ return psmx2_atomic_readwritemsg(ep, msg, resultv, result_desc, ++ result_count, flags); ++} ++ ++static inline ssize_t ++fi_compare_atomic(struct fid_ep *ep, ++ const void *buf, size_t count, void *desc, ++ const void *compare, void *compare_desc, ++ void *result, void *result_desc, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_compwrite(ep, buf, count, desc, ++ compare, compare_desc, result, result_desc, ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static inline ssize_t ++fi_compare_atomicv(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ const struct fi_ioc *comparev, void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ return psmx2_atomic_compwritev(ep, iov, desc, count, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, result_count, ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static inline ssize_t ++fi_compare_atomicmsg(struct fid_ep *ep, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ return psmx2_atomic_compwritemsg(ep, msg, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, result_count, flags); ++} ++ ++static inline int ++fi_atomicvalid(struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count) ++{ ++ return psmx2_atomic_writevalid(ep, datatype, op, count); ++} ++ ++static inline int ++fi_fetch_atomicvalid(struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count) ++{ ++ return psmx2_atomic_readwritevalid(ep, datatype, op, count); ++} ++ ++static inline int ++fi_compare_atomicvalid(struct fid_ep *ep, ++ enum fi_datatype datatype, enum fi_op op, size_t *count) ++{ ++ return psmx2_atomic_compwritevalid(ep, datatype, op, count); ++} ++ ++static inline int ++fi_query_atomic(struct fid_domain *domain, ++ enum fi_datatype datatype, enum fi_op op, ++ struct fi_atomic_attr *attr, uint64_t flags) ++{ ++ return psmx2_query_atomic(domain, datatype, op, attr, flags); ++} ++ ++#endif /* FI_DIRECT_ATOMIC_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic_def.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic_def.h +new file mode 100644 +index 000000000..c8a5d3ede +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_atomic_def.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_ATOMIC_DEF_H ++#define FI_DIRECT_ATOMIC_DEF_H ++ ++/* ++ * use the default definitions ++ */ ++ ++#endif /* FI_DIRECT_ATOMIC_DEF_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_cm.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_cm.h +new file mode 100644 +index 000000000..a337c5d53 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_cm.h +@@ -0,0 +1,97 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_CM_H ++#define FI_DIRECT_CM_H ++ ++#define FABRIC_DIRECT_CM ++ ++int psmx2_cm_getname(fid_t fid, void *addr, size_t *addrlen); ++ ++ ++static inline int fi_setname(fid_t fid, void *addr, size_t addrlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ return psmx2_cm_getname(fid, addr, addrlen); ++} ++ ++static inline int fi_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_listen(struct fid_pep *pep) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_connect(struct fid_ep *ep, const void *addr, ++ const void *param, size_t paramlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_accept(struct fid_ep *ep, const void *param, size_t paramlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_reject(struct fid_pep *pep, fid_t handle, ++ const void *param, size_t paramlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_shutdown(struct fid_ep *ep, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_join(struct fid_ep *ep, const void *addr, uint64_t flags, ++ struct fid_mc **mc, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline fi_addr_t fi_mc_addr(struct fid_mc *mc) ++{ ++ return -FI_ENOSYS; ++} ++ ++#endif /* FI_DIRECT_CM_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_domain.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_domain.h +new file mode 100644 +index 000000000..6d5b7247d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_domain.h +@@ -0,0 +1,266 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_DOMAIN_H ++#define FI_DIRECT_DOMAIN_H ++ ++#define FABRIC_DIRECT_DOMAIN ++ ++int psmx2_domain_open( ++ struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++ ++int psmx2_cq_open( ++ struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq, void *context); ++ ++int psmx2_cntr_open( ++ struct fid_domain *domain, struct fi_cntr_attr *attr, ++ struct fid_cntr **cntr, void *context); ++ ++int psmx2_wait_open( ++ struct fid_fabric *fabric, struct fi_wait_attr *attr, ++ struct fid_wait **waitset); ++ ++int psmx2_mr_reg( ++ struct fid *fid, const void *buf, size_t len, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context); ++ ++int psmx2_mr_regv( ++ struct fid *fid, const struct iovec *iov, ++ size_t count, uint64_t access, ++ uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context); ++ ++int psmx2_mr_regattr( ++ struct fid *fid, const struct fi_mr_attr *attr, ++ uint64_t flags, struct fid_mr **mr); ++ ++int psmx2_mr_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++ ++int psmx2_av_open( ++ struct fid_domain *domain, struct fi_av_attr *attr, ++ struct fid_av **av, void *context); ++ ++int psmx2_av_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++ ++int psmx2_av_insert( ++ struct fid_av *av, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context); ++ ++int psmx2_av_remove( ++ struct fid_av *av, fi_addr_t *fi_addr, size_t count, ++ uint64_t flags); ++ ++int psmx2_av_lookup( ++ struct fid_av *av, fi_addr_t fi_addr, void *addr, ++ size_t *addrlen); ++ ++const char *psmx2_av_straddr( ++ struct fid_av *av, const void *addr, char *buf, size_t *len); ++ ++ ++static inline int ++fi_domain(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context) ++{ ++ return psmx2_domain_open(fabric, info, domain, context); ++} ++ ++static inline int ++fi_domain_bind(struct fid_domain *domain, struct fid *fid, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq, void *context) ++{ ++ return psmx2_cq_open(domain, attr, cq, context); ++} ++ ++static inline int ++fi_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, ++ struct fid_cntr **cntr, void *context) ++{ ++ return psmx2_cntr_open(domain, attr, cntr, context); ++} ++ ++static inline int ++fi_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, ++ struct fid_wait **waitset) ++{ ++ return psmx2_wait_open(fabric, attr, waitset); ++} ++ ++static inline int ++fi_poll_open(struct fid_domain *domain, struct fi_poll_attr *attr, ++ struct fid_poll **pollset) ++{ ++ return domain->ops->poll_open(domain, attr, pollset); ++} ++ ++static inline int ++fi_mr_reg(struct fid_domain *domain, const void *buf, size_t len, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ return psmx2_mr_reg(&domain->fid, buf, len, access, offset, ++ requested_key, flags, mr, context); ++} ++ ++static inline int ++fi_mr_regv(struct fid_domain *domain, const struct iovec *iov, ++ size_t count, uint64_t access, ++ uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ return psmx2_mr_regv(&domain->fid, iov, count, access, ++ offset, requested_key, flags, mr, context); ++} ++ ++static inline int ++fi_mr_regattr(struct fid_domain *domain, const struct fi_mr_attr *attr, ++ uint64_t flags, struct fid_mr **mr) ++{ ++ return psmx2_mr_regattr(&domain->fid, attr, flags, mr); ++} ++ ++static inline void *fi_mr_desc(struct fid_mr *mr) ++{ ++ return mr->mem_desc; ++} ++ ++static inline uint64_t fi_mr_key(struct fid_mr *mr) ++{ ++ return mr->key; ++} ++ ++static inline int ++fi_mr_raw_attr(struct fid_mr *mr, uint64_t *base_addr, ++ uint8_t *raw_key, size_t *key_size, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_mr_map_raw(struct fid_domain *domain, uint64_t base_addr, ++ uint8_t *raw_key, size_t key_size, uint64_t *key, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_mr_unmap_key(struct fid_domain *domain, uint64_t key) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_mr_bind(struct fid_mr *mr, struct fid *bfid, uint64_t flags) ++{ ++ return psmx2_mr_bind(&mr->fid, bfid, flags); ++} ++ ++static inline int ++fi_mr_refresh(struct fid_mr *mr, const struct iovec *iov, size_t count, ++ uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_mr_enable(struct fid_mr *mr) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_av_open(struct fid_domain *domain, struct fi_av_attr *attr, ++ struct fid_av **av, void *context) ++{ ++ return psmx2_av_open(domain, attr, av, context); ++} ++ ++static inline int ++fi_av_bind(struct fid_av *av, struct fid *fid, uint64_t flags) ++{ ++ return psmx2_av_bind(&av->fid, fid, flags); ++} ++ ++static inline int ++fi_av_insert(struct fid_av *av, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ return psmx2_av_insert(av, addr, count, fi_addr, flags, context); ++} ++ ++static inline int ++fi_av_insertsvc(struct fid_av *av, const char *node, const char *service, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_av_insertsym(struct fid_av *av, const char *node, size_t nodecnt, ++ const char *service, size_t svccnt, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, uint64_t flags) ++{ ++ return psmx2_av_remove(av, fi_addr, count, flags); ++} ++ ++static inline int ++fi_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, size_t *addrlen) ++{ ++ return psmx2_av_lookup(av, fi_addr, addr, addrlen); ++} ++ ++static inline const char * ++fi_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len) ++{ ++ return psmx2_av_straddr(av, addr, buf, len); ++} ++ ++static inline fi_addr_t ++fi_rx_addr(fi_addr_t fi_addr, int rx_index, int rx_ctx_bits) ++{ ++ return (fi_addr_t) (((uint64_t) rx_index << (64 - rx_ctx_bits)) | fi_addr); ++} ++ ++#endif /* FI_DIRECT_DOMAIN_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_endpoint.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_endpoint.h +new file mode 100644 +index 000000000..943e8368f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_endpoint.h +@@ -0,0 +1,282 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_ENDPOINT_H ++#define FI_DIRECT_ENDPOINT_H ++ ++#define FABRIC_DIRECT_ENDPOINT ++ ++int psmx2_ep_open( ++ struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep, void *context); ++ ++int psmx2_sep_open( ++ struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **sep, void *context); ++ ++int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++ ++int psmx2_sep_bind(struct fid *fid, struct fid *bfid, uint64_t flags); ++ ++int psmx2_ep_control(fid_t fid, int command, void *arg); ++ ++ssize_t psmx2_ep_cancel(fid_t fid, void *context); ++ ++int psmx2_ep_setopt( ++ fid_t fid, int level, int optname, const void *optval, ++ size_t optlen); ++ ++int psmx2_ep_getopt( ++ fid_t fid, int level, int optname, void *optval, ++ size_t *optlen); ++ ++int psmx2_tx_context( ++ struct fid_ep *ep, int index, struct fi_tx_attr *attr, ++ struct fid_ep **tx_ep, void *context); ++ ++int psmx2_rx_context( ++ struct fid_ep *ep, int index, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context); ++ ++ssize_t psmx2_rx_size_left(struct fid_ep *ep); ++ ++ssize_t psmx2_tx_size_left(struct fid_ep *ep); ++ ++int psmx2_stx_ctx( ++ struct fid_domain *domain, struct fi_tx_attr *attr, ++ struct fid_stx **stx, void *context); ++ ++ssize_t psmx2_recv( ++ struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, void *context); ++ ++ssize_t psmx2_recvv( ++ struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context); ++ ++ssize_t psmx2_recvmsg( ++ struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags); ++ ++ssize_t psmx2_send( ++ struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, void *context); ++ ++ssize_t psmx2_sendv( ++ struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context); ++ ++ssize_t psmx2_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags); ++ ++ssize_t psmx2_inject( ++ struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr); ++ ++ssize_t psmx2_senddata( ++ struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, void *context); ++ ++ssize_t psmx2_injectdata( ++ struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr); ++ ++ ++static inline int ++fi_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int ++fi_endpoint(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep, void *context) ++{ ++ return psmx2_ep_open(domain, info, ep, context); ++} ++ ++static inline int ++fi_scalable_ep(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **sep, void *context) ++{ ++ return psmx2_sep_open(domain, info, sep, context); ++} ++ ++static inline int fi_ep_bind(struct fid_ep *ep, struct fid *bfid, uint64_t flags) ++{ ++ return psmx2_ep_bind(&ep->fid, bfid, flags); ++} ++ ++static inline int fi_pep_bind(struct fid_pep *pep, struct fid *bfid, uint64_t flags) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline int fi_scalable_ep_bind(struct fid_ep *sep, struct fid *bfid, uint64_t flags) ++{ ++ return psmx2_sep_bind(&sep->fid, bfid, flags); ++} ++ ++static inline int fi_enable(struct fid_ep *ep) ++{ ++ return psmx2_ep_control(&ep->fid, FI_ENABLE, NULL); ++} ++ ++static inline ssize_t fi_cancel(fid_t fid, void *context) ++{ ++ return psmx2_ep_cancel(fid, context); ++} ++ ++static inline int ++fi_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) ++{ ++ return psmx2_ep_setopt(fid, level, optname, optval, optlen); ++} ++ ++static inline int ++fi_getopt(fid_t fid, int level, int optname, ++ void *optval, size_t *optlen) ++{ ++ return psmx2_ep_getopt(fid, level, optname, optval, optlen); ++} ++ ++static inline int fi_ep_alias(struct fid_ep *ep, struct fid_ep **alias_ep, ++ uint64_t flags) ++{ ++ int ret; ++ struct fid *fid; ++ ret = fi_alias(&ep->fid, &fid, flags); ++ if (!ret) ++ *alias_ep = container_of(fid, struct fid_ep, fid); ++ return ret; ++} ++ ++static inline int ++fi_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *attr, ++ struct fid_ep **tx_ep, void *context) ++{ ++ return psmx2_tx_ctx(ep, index, attr, tx_ep, context); ++} ++ ++static inline int ++fi_rx_context(struct fid_ep *ep, int index, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context) ++{ ++ return psmx2_rx_ctx(ep, index, attr, rx_ep, context); ++} ++ ++static inline FI_DEPRECATED_FUNC ssize_t ++fi_rx_size_left(struct fid_ep *ep) ++{ ++ return psmx2_rx_size_left(ep); ++} ++ ++static inline FI_DEPRECATED_FUNC ssize_t ++fi_tx_size_left(struct fid_ep *ep) ++{ ++ return psmx2_tx_size_left(ep); ++} ++ ++static inline int ++fi_stx_context(struct fid_domain *domain, struct fi_tx_attr *attr, ++ struct fid_stx **stx, void *context) ++{ ++ return psmx2_stx_ctx(domain, attr, stx, context); ++} ++ ++static inline int ++fi_srx_context(struct fid_domain *domain, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static inline ssize_t ++fi_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, ++ void *context) ++{ ++ return psmx2_recv(ep, buf, len, desc, src_addr, context); ++} ++ ++static inline ssize_t ++fi_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ return psmx2_recvv(ep, iov, desc, count, src_addr, context); ++} ++ ++static inline ssize_t ++fi_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags) ++{ ++ return psmx2_recvmsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, void *context) ++{ ++ return psmx2_send(ep, buf, len, desc, dest_addr, context); ++} ++ ++static inline ssize_t ++fi_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ return psmx2_sendv(ep, iov, desc, count, dest_addr, context); ++} ++ ++static inline ssize_t ++fi_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, uint64_t flags) ++{ ++ return psmx2_sendmsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_inject(struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr) ++{ ++ return psmx2_inject(ep, buf, len, dest_addr); ++} ++ ++static inline ssize_t ++fi_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, void *context) ++{ ++ return psmx2_senddata(ep, buf, len, desc, data, dest_addr, context); ++} ++ ++static inline ssize_t ++fi_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ return psmx2_injectdata(ep, buf, len, data, dest_addr); ++} ++ ++#endif /* FI_DIRECT_ENDPOINT */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_eq.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_eq.h +new file mode 100644 +index 000000000..c3c43358a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_eq.h +@@ -0,0 +1,230 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_EQ_H ++#define FI_DIRECT_EQ_H ++ ++#define FABRIC_DIRECT_EQ ++ ++int psmx2_wait_trywait(struct fid_fabric *fabric, struct fid **fids, int count); ++ ++int psmx2_wait_wait(struct fid_wait *waitset, int timeout); ++ ++ssize_t psmx2_cq_read(struct fid_cq *cq, void *buf, size_t count); ++ ++ssize_t psmx2_cq_readfrom( ++ struct fid_cq *cq, void *buf, size_t count, ++ fi_addr_t *src_addr); ++ ++ssize_t psmx2_cq_readerr( ++ struct fid_cq *cq, struct fi_cq_err_entry *buf, ++ uint64_t flags); ++ ++ssize_t psmx2_cq_sread( ++ struct fid_cq *cq, void *buf, size_t count, ++ const void *cond, int timeout); ++ ++ssize_t psmx2_cq_sreadfrom( ++ struct fid_cq *cq, void *buf, size_t count, ++ fi_addr_t *src_addr, const void *cond, int timeout); ++ ++int psmx2_cq_signal(struct fid_cq *cq); ++ ++const char *psmx2_cq_strerror( ++ struct fid_cq *cq, int prov_errno, ++ const void *err_data, char *buf, size_t len); ++ ++uint64_t psmx2_cntr_read(struct fid_cntr *cntr); ++uint64_t psmx2_cntr_readerr(struct fid_cntr *cntr); ++int psmx2_cntr_add(struct fid_cntr *cntr, uint64_t value); ++int psmx2_cntr_adderr(struct fid_cntr *cntr, uint64_t value); ++int psmx2_cntr_set(struct fid_cntr *cntr, uint64_t value); ++int psmx2_cntr_seterr(struct fid_cntr *cntr, uint64_t value); ++int psmx2_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout); ++ ++ ++static inline int ++fi_trywait(struct fid_fabric *fabric, struct fid **fids, int count) ++{ ++ return psmx2_wait_trywait(fabric, fids, count); ++} ++ ++static inline int ++fi_wait(struct fid_wait *waitset, int timeout) ++{ ++ return psmx2_wait_wait(waitset, timeout); ++} ++ ++/* ++ * pollset and eq use util functions ++ */ ++ ++static inline int ++fi_poll(struct fid_poll *pollset, void **context, int count) ++{ ++ return pollset->ops->poll(pollset, context, count); ++} ++ ++static inline int ++fi_poll_add(struct fid_poll *pollset, struct fid *event_fid, uint64_t flags) ++{ ++ return pollset->ops->poll_add(pollset, event_fid, flags); ++} ++ ++static inline int ++fi_poll_del(struct fid_poll *pollset, struct fid *event_fid, uint64_t flags) ++{ ++ return pollset->ops->poll_del(pollset, event_fid, flags); ++} ++ ++static inline int ++fi_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, ++ struct fid_eq **eq, void *context) ++{ ++ return fabric->ops->eq_open(fabric, attr, eq, context); ++} ++ ++static inline ssize_t ++fi_eq_read(struct fid_eq *eq, uint32_t *event, void *buf, ++ size_t len, uint64_t flags) ++{ ++ return eq->ops->read(eq, event, buf, len, flags); ++} ++ ++static inline ssize_t ++fi_eq_readerr(struct fid_eq *eq, struct fi_eq_err_entry *buf, uint64_t flags) ++{ ++ return eq->ops->readerr(eq, buf, flags); ++} ++ ++static inline ssize_t ++fi_eq_write(struct fid_eq *eq, uint32_t event, const void *buf, ++ size_t len, uint64_t flags) ++{ ++ return eq->ops->write(eq, event, buf, len, flags); ++} ++ ++static inline ssize_t ++fi_eq_sread(struct fid_eq *eq, uint32_t *event, void *buf, size_t len, ++ int timeout, uint64_t flags) ++{ ++ return eq->ops->sread(eq, event, buf, len, timeout, flags); ++} ++ ++static inline const char * ++fi_eq_strerror(struct fid_eq *eq, int prov_errno, const void *err_data, ++ char *buf, size_t len) ++{ ++ return eq->ops->strerror(eq, prov_errno, err_data, buf, len); ++} ++ ++ ++static inline ssize_t fi_cq_read(struct fid_cq *cq, void *buf, size_t count) ++{ ++ return psmx2_cq_read(cq, buf, count); ++} ++ ++static inline ssize_t ++fi_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, fi_addr_t *src_addr) ++{ ++ return psmx2_cq_readfrom(cq, buf, count, src_addr); ++} ++ ++static inline ssize_t ++fi_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, uint64_t flags) ++{ ++ return psmx2_cq_readerr(cq, buf, flags); ++} ++ ++static inline ssize_t ++fi_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, int timeout) ++{ ++ return psmx2_cq_sread(cq, buf, count, cond, timeout); ++} ++ ++static inline ssize_t ++fi_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, ++ fi_addr_t *src_addr, const void *cond, int timeout) ++{ ++ return psmx2_cq_sreadfrom(cq, buf, count, src_addr, cond, timeout); ++} ++ ++static inline int fi_cq_signal(struct fid_cq *cq) ++{ ++ return psmx2_cq_signal(cq); ++} ++ ++static inline const char * ++fi_cq_strerror(struct fid_cq *cq, int prov_errno, const void *err_data, ++ char *buf, size_t len) ++{ ++ return psmx2_cq_strerror(cq, prov_errno, err_data, buf, len); ++} ++ ++ ++static inline uint64_t fi_cntr_read(struct fid_cntr *cntr) ++{ ++ return psmx2_cntr_read(cntr); ++} ++ ++static inline uint64_t fi_cntr_readerr(struct fid_cntr *cntr) ++{ ++ return psmx2_cntr_readerr(cntr); ++} ++ ++static inline int fi_cntr_add(struct fid_cntr *cntr, uint64_t value) ++{ ++ return psmx2_cntr_add(cntr, value); ++} ++ ++static inline int fi_cntr_adderr(struct fid_cntr *cntr, uint64_t value) ++{ ++ return psmx2_cntr_adderr(cntr, value); ++} ++ ++static inline int fi_cntr_set(struct fid_cntr *cntr, uint64_t value) ++{ ++ return psmx2_cntr_set(cntr, value); ++} ++ ++static inline int fi_cntr_seterr(struct fid_cntr *cntr, uint64_t value) ++{ ++ return psmx2_cntr_seterr(cntr, value); ++} ++ ++static inline int ++fi_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout) ++{ ++ return psmx2_cntr_wait(cntr, threshold, timeout); ++} ++ ++#endif /* FI_DIRECT_EQ_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_rma.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_rma.h +new file mode 100644 +index 000000000..543b2ac36 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_rma.h +@@ -0,0 +1,144 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_RMA_H ++#define FI_DIRECT_RMA_H ++ ++#define FABRIC_DIRECT_RMA ++ ++ssize_t psmx2_read( ++ struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context); ++ ++ssize_t psmx2_readv( ++ struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context); ++ ++ssize_t psmx2_readmsg( ++ struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags); ++ ++ssize_t psmx2_write( ++ struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context); ++ ++ssize_t psmx2_writev( ++ struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context); ++ ++ssize_t psmx2_writemsg( ++ struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags); ++ ++ssize_t psmx2_inject_write( ++ struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key); ++ ++ssize_t psmx2_writedata( ++ struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context); ++ ++ssize_t psmx2_inject_writedata( ++ struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key); ++ ++ ++static inline ssize_t ++fi_read(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ return psmx2_read(ep, buf, len, desc, src_addr, addr, key, context); ++} ++ ++static inline ssize_t ++fi_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ return psmx2_readv(ep, iov, desc, count, src_addr, addr, key, context); ++} ++ ++static inline ssize_t ++fi_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ return psmx2_readmsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_write(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ return psmx2_write(ep, buf, len, desc, dest_addr, addr, key, context); ++} ++ ++static inline ssize_t ++fi_writev(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ return psmx2_writev(ep, iov, desc, count, dest_addr, addr, key, context); ++} ++ ++static inline ssize_t ++fi_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ return psmx2_writemsg(ep, msg, flags); ++} ++ ++static inline ssize_t ++fi_inject_write(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ return psmx2_inject_write(ep, buf, len, dest_addr, addr, key); ++} ++ ++static inline ssize_t ++fi_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ return psmx2_writedata(ep, buf, len, desc,data, dest_addr, ++ addr, key, context); ++} ++ ++static inline ssize_t ++fi_inject_writedata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ return psmx2_inject_writedata(ep, buf, len, data, dest_addr, addr, key); ++} ++ ++#endif /* FI_DIRECT_RMA_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_tagged.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_tagged.h +new file mode 100644 +index 000000000..f77d7a396 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_tagged.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_TAGGED_H ++#define FI_DIRECT_TAGGED_H ++ ++/* ++ * use defaults bacause function pointers are needed for specialization ++ */ ++ ++#endif /* FI_DIRECT_TAGGED_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_trigger.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_trigger.h +new file mode 100644 +index 000000000..10f795614 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/include/rdma/fi_direct_trigger.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (c) 2016-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef FI_DIRECT_TRIGGER_H ++#define FI_DIRECT_TRIGGER_H ++ ++/* ++ * use default definitions ++ */ ++ ++#endif /* FI_DIRECT_TRIGGER_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/provider_FABRIC_1.0.map b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/provider_FABRIC_1.0.map +new file mode 100644 +index 000000000..f26516aad +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/provider_FABRIC_1.0.map +@@ -0,0 +1,81 @@ ++/* ++ * Included from "libfabric.map" at the top level directory. ++ * Used for fabric direct build only. ++ */ ++ psmx2_atomic_write; ++ psmx2_atomic_writev; ++ psmx2_atomic_writemsg; ++ psmx2_atomic_inject; ++ psmx2_atomic_readwrite; ++ psmx2_atomic_readwritev; ++ psmx2_atomic_readwritemsg; ++ psmx2_atomic_compwrite; ++ psmx2_atomic_compwritev; ++ psmx2_atomic_compwritemsg; ++ psmx2_atomic_writevalid; ++ psmx2_atomic_readwritevalid; ++ psmx2_atomic_compwritevalid; ++ psmx2_query_atomic; ++ psmx2_cm_getname; ++ psmx2_domain_open; ++ psmx2_cq_open; ++ psmx2_cntr_open; ++ psmx2_wait_open; ++ psmx2_mr_reg; ++ psmx2_mr_regv; ++ psmx2_mr_regattr; ++ psmx2_mr_bind; ++ psmx2_av_open; ++ psmx2_av_bind; ++ psmx2_av_insert; ++ psmx2_av_remove; ++ psmx2_av_lookup; ++ psmx2_av_straddr; ++ psmx2_ep_open; ++ psmx2_sep_open; ++ psmx2_ep_bind; ++ psmx2_sep_bind; ++ psmx2_ep_control; ++ psmx2_ep_cancel; ++ psmx2_ep_getopt; ++ psmx2_ep_setopt; ++ psmx2_tx_context; ++ psmx2_rx_context; ++ psmx2_rx_size_left; ++ psmx2_tx_size_left; ++ psmx2_stx_ctx; ++ psmx2_recv; ++ psmx2_recvv; ++ psmx2_recvmsg; ++ psmx2_send; ++ psmx2_sendv; ++ psmx2_sendmsg; ++ psmx2_inject; ++ psmx2_senddata; ++ psmx2_injectdata; ++ psmx2_wait_trywait; ++ psmx2_wait_wait; ++ psmx2_cq_read; ++ psmx2_cq_readfrom; ++ psmx2_cq_readerr; ++ psmx2_cq_sread; ++ psmx2_cq_sreadfrom; ++ psmx2_cq_signal; ++ psmx2_cq_strerror; ++ psmx2_cntr_read; ++ psmx2_cntr_readerr; ++ psmx2_cntr_add; ++ psmx2_cntr_adderr; ++ psmx2_cntr_set; ++ psmx2_cntr_seterr; ++ psmx2_cntr_wait; ++ psmx2_read; ++ psmx2_readv; ++ psmx2_readmsg; ++ psmx2_write; ++ psmx2_writev; ++ psmx2_writemsg; ++ psmx2_inject_write; ++ psmx2_writedata; ++ psmx2_inject_writedata; ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2.h +index 3d824f16a..36b5c7e4b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2.h +@@ -73,9 +73,17 @@ extern "C" { + #include "rbtree.h" + #include "version.h" + ++#ifdef FABRIC_DIRECT_ENABLED ++#define DIRECT_FN __attribute__((visibility ("default"))) ++#define STATIC ++#else ++#define DIRECT_FN ++#define STATIC static ++#endif ++ + extern struct fi_provider psmx2_prov; + +-#define PSMX2_VERSION (FI_VERSION(1, 6)) ++#define PSMX2_VERSION (FI_VERSION(1, 7)) + + #define PSMX2_OP_FLAGS (FI_INJECT | FI_MULTI_RECV | FI_COMPLETION | \ + FI_TRIGGER | FI_INJECT_COMPLETE | \ +@@ -88,7 +96,7 @@ extern struct fi_provider psmx2_prov; + + #define PSMX2_SEC_CAPS (FI_MULTI_RECV | FI_SOURCE | FI_RMA_EVENT | \ + FI_TRIGGER | FI_LOCAL_COMM | FI_REMOTE_COMM | \ +- FI_SOURCE_ERR) ++ FI_SOURCE_ERR | FI_SHARED_AV) + + #define PSMX2_CAPS (PSMX2_PRI_CAPS | PSMX2_SEC_CAPS | FI_REMOTE_CQ_DATA) + +@@ -267,34 +275,12 @@ static inline uint64_t psmx2_get_tag64(psm2_mq_tag_t *tag96) + #define PSMX2_GET_FLAGS(tag96) ((tag96).tag[PSMX2_FLAGS_IDX] & PSMX2_FLAGS_MASK) + #define PSMX2_GET_CQDATA(tag96) ((tag96).tag2 & PSMX2_DATA_MASK) + +-/* +- * Canonical virtual address on X86_64 only uses 48 bits and the higher 16 bits +- * are sign extensions. We can put some extra information into the 16 bits. +- * +- * Here is the layout: AA-B-C-DDDDDDDDDDDD +- * +- * C == 0xE: scalable endpoint, AAB is context index, DDDDDDDDDDDD is the address +- * C != 0xE: regular endpoint, AA is 0, BCDDDDDDDDDDDD is epaddr +- */ +-#define PSMX2_EP_MASK (0x00FFFFFFFFFFFFFFUL) +-#define PSMX2_SIGN_MASK (0x0080000000000000UL) +-#define PSMX2_SIGN_EXT (0xFF00000000000000UL) +- +-#define PSMX2_EP_TO_ADDR(ep) ((uint64_t)ep & PSMX2_EP_MASK) +-#define PSMX2_ADDR_TO_EP(addr) ((psm2_epaddr_t) \ +- ((addr & PSMX2_SIGN_MASK) ? \ +- (addr | PSMX2_SIGN_EXT) : \ +- (addr & PSMX2_EP_MASK))) +- +-#define PSMX2_MAX_RX_CTX_BITS (12) +-#define PSMX2_SEP_ADDR_FLAG (0x000E000000000000UL) +-#define PSMX2_SEP_ADDR_MASK (0x000F000000000000UL) +-#define PSMX2_SEP_CTXT_MASK (0xFFF0000000000000UL) +-#define PSMX2_SEP_IDX_MASK (0x0000FFFFFFFFFFFFUL) +-#define PSMX2_SEP_ADDR_TEST(addr) (((addr) & PSMX2_SEP_ADDR_MASK) == PSMX2_SEP_ADDR_FLAG) +-#define PSMX2_SEP_ADDR_CTXT(addr, ctxt_bits) \ +- (((addr) & PSMX2_SEP_CTXT_MASK) >> (64-(ctxt_bits))) +-#define PSMX2_SEP_ADDR_IDX(addr) ((addr) & PSMX2_SEP_IDX_MASK) ++#define PSMX2_MAX_RX_CTX_BITS (12) ++#define PSMX2_ADDR_IDX_MASK (0x000FFFFFFFFFFFFFUL) ++#define PSMX2_ADDR_CTXT_MASK (0xFFF0000000000000UL) ++#define PSMX2_ADDR_IDX(addr) ((addr) & PSMX2_ADDR_IDX_MASK) ++#define PSMX2_ADDR_CTXT(addr, ctxt_bits) \ ++ (((addr) & PSMX2_ADDR_CTXT_MASK) >> (64-(ctxt_bits))) + + /* Bits 60 .. 63 of the flag are provider specific */ + #define PSMX2_NO_COMPLETION (1ULL << 60) +@@ -332,6 +318,15 @@ union psmx2_pi { + #define PSMX2_CTXT_USER(fi_context) ((fi_context)->internal[2]) + #define PSMX2_CTXT_EP(fi_context) ((fi_context)->internal[3]) + ++/* ++ * Use per-protocol versioning to avoid unnecessary version checking. Only perform ++ * version checking when the current version is greater than zero. ++ */ ++#define PSMX2_AM_RMA_VERSION 0 ++#define PSMX2_AM_ATOMIC_VERSION 0 ++#define PSMX2_AM_SEP_VERSION 1 ++#define PSMX2_AM_TRX_CTXT_VERSION 0 ++ + #define PSMX2_AM_RMA_HANDLER 0 + #define PSMX2_AM_ATOMIC_HANDLER 1 + #define PSMX2_AM_SEP_HANDLER 2 +@@ -339,14 +334,18 @@ union psmx2_pi { + + #define PSMX2_AM_OP_MASK 0x000000FF + #define PSMX2_AM_FLAG_MASK 0xFF000000 ++#define PSMX2_AM_VER_MASK 0x00FF0000 ++#define PSMX2_AM_VER_SHIFT 16 + #define PSMX2_AM_EOM 0x40000000 + #define PSMX2_AM_DATA 0x20000000 + #define PSMX2_AM_FORCE_ACK 0x10000000 + +-#define PSMX2_AM_SET_OP(u32w0,op) do {u32w0 &= ~PSMX2_AM_OP_MASK; u32w0 |= op;} while (0) +-#define PSMX2_AM_SET_FLAG(u32w0,flag) do {u32w0 &= ~PSMX2_AM_FLAG_MASK; u32w0 |= flag;} while (0) +-#define PSMX2_AM_GET_OP(u32w0) (u32w0 & PSMX2_AM_OP_MASK) +-#define PSMX2_AM_GET_FLAG(u32w0) (u32w0 & PSMX2_AM_FLAG_MASK) ++#define PSMX2_AM_SET_OP(u32w0,op) do {(u32w0) &= ~PSMX2_AM_OP_MASK; (u32w0) |= (op);} while (0) ++#define PSMX2_AM_SET_FLAG(u32w0,flag) do {(u32w0) &= ~PSMX2_AM_FLAG_MASK; (u32w0) |= (flag);} while (0) ++#define PSMX2_AM_SET_VER(u32w0,ver) do {(u32w0) &= ~PSMX2_AM_VER_MASK; (u32w0) |= (ver << PSMX2_AM_VER_SHIFT);} while (0) ++#define PSMX2_AM_GET_OP(u32w0) ((u32w0) & PSMX2_AM_OP_MASK) ++#define PSMX2_AM_GET_FLAG(u32w0) ((u32w0) & PSMX2_AM_FLAG_MASK) ++#define PSMX2_AM_GET_VER(u32w0) (((u32w0) & PSMX2_AM_VER_MASK) >> PSMX2_AM_VER_SHIFT) + + enum { + PSMX2_AM_REQ_WRITE = 1, +@@ -405,17 +404,17 @@ struct psmx2_am_request { + int datatype; + } atomic; + }; +- uint64_t cq_flags; +- struct fi_context fi_context; +- struct psmx2_fid_ep *ep; +- int no_event; +- int error; +- struct slist_entry list_entry; ++ uint64_t cq_flags; ++ struct fi_context fi_context; ++ struct psmx2_fid_ep *ep; ++ int no_event; ++ int error; ++ struct slist_entry list_entry; + union { +- struct iovec *iov; /* for readv */ +- struct fi_ioc *ioc; /* for atomic read */ ++ struct iovec *iov; /* for readv */ ++ struct fi_ioc *ioc; /* for atomic read */ + }; +- void *tmpbuf; ++ void *tmpbuf; + }; + + #define PSMX2_IOV_PROTO_PACK 0 +@@ -425,40 +424,40 @@ struct psmx2_am_request { + #define PSMX2_IOV_MAX_COUNT (PSMX2_IOV_BUF_SIZE / sizeof(uint32_t) - 3) + + struct psmx2_iov_info { +- uint32_t seq_num; +- uint32_t total_len; +- uint32_t count; +- uint32_t len[PSMX2_IOV_MAX_COUNT]; ++ uint32_t seq_num; ++ uint32_t total_len; ++ uint32_t count; ++ uint32_t len[PSMX2_IOV_MAX_COUNT]; + }; + + struct psmx2_sendv_request { +- struct fi_context fi_context; +- struct fi_context fi_context_iov; +- PSMX2_STATUS_DECL(status); +- void *user_context; +- int iov_protocol; +- int no_completion; +- int comp_flag; +- uint32_t iov_done; ++ struct fi_context fi_context; ++ struct fi_context fi_context_iov; ++ void *user_context; ++ int iov_protocol; ++ int no_completion; ++ int comp_flag; ++ uint32_t iov_done; ++ psm2_mq_tag_t tag; + union { +- struct psmx2_iov_info iov_info; +- char buf[PSMX2_IOV_BUF_SIZE]; ++ struct psmx2_iov_info iov_info; ++ char buf[PSMX2_IOV_BUF_SIZE]; + }; + }; + + struct psmx2_sendv_reply { +- struct fi_context fi_context; +- int no_completion; +- int multi_recv; +- psm2_mq_tag_t tag; +- uint8_t *buf; +- void *user_context; +- size_t iov_done; +- size_t bytes_received; +- size_t msg_length; +- int error_code; +- int comp_flag; +- struct psmx2_iov_info iov_info; ++ struct fi_context fi_context; ++ int no_completion; ++ int multi_recv; ++ psm2_mq_tag_t tag; ++ uint8_t *buf; ++ void *user_context; ++ size_t iov_done; ++ size_t bytes_received; ++ size_t msg_length; ++ int error_code; ++ int comp_flag; ++ struct psmx2_iov_info iov_info; + }; + + struct psmx2_req_queue { +@@ -506,8 +505,10 @@ struct psmx2_trx_ctxt { + struct psmx2_fid_domain *domain; + struct psmx2_fid_ep *ep; + ++#if !HAVE_PSM2_MQ_FP_MSG + /* incoming req queue for AM based RMA request. */ + struct psmx2_req_queue rma_queue; ++#endif + + /* triggered operations that are ready to be processed */ + struct psmx2_req_queue trigger_queue; +@@ -525,9 +526,19 @@ struct psmx2_trx_ctxt { + struct dlist_entry peer_list; + fastlock_t peer_lock; + ++ /* number of pathes this tx/rx context can be polled. this include ++ * CQs and counters, as well as domain->trx_ctxt_list. ++ */ ++ ofi_atomic32_t poll_refcnt; ++ int poll_active; ++ + struct dlist_entry entry; + }; + ++typedef void (*psmx2_lock_fn_t) (fastlock_t *lock, int lock_level); ++typedef int (*psmx2_trylock_fn_t) (fastlock_t *lock, int lock_level); ++typedef void (*psmx2_unlock_fn_t) (fastlock_t *lock, int lock_level); ++ + struct psmx2_fid_domain { + struct util_domain util_domain; + struct psmx2_fid_fabric *fabric; +@@ -554,6 +565,32 @@ struct psmx2_fid_domain { + uint32_t max_atomic_size; + + struct dlist_entry entry; ++ ++ /* Lock/Unlock function pointers set based on FI_THREAD model */ ++ psmx2_lock_fn_t av_lock_fn; ++ psmx2_unlock_fn_t av_unlock_fn; ++ psmx2_lock_fn_t am_req_pool_lock_fn; ++ psmx2_unlock_fn_t am_req_pool_unlock_fn; ++ psmx2_lock_fn_t trx_ctxt_lock_fn; ++ psmx2_unlock_fn_t trx_ctxt_unlock_fn; ++ psmx2_lock_fn_t rma_queue_lock_fn; ++ psmx2_unlock_fn_t rma_queue_unlock_fn; ++ psmx2_lock_fn_t trigger_queue_lock_fn; ++ psmx2_unlock_fn_t trigger_queue_unlock_fn; ++ psmx2_lock_fn_t peer_lock_fn; ++ psmx2_unlock_fn_t peer_unlock_fn; ++ psmx2_lock_fn_t sep_lock_fn; ++ psmx2_unlock_fn_t sep_unlock_fn; ++ psmx2_lock_fn_t trigger_lock_fn; ++ psmx2_unlock_fn_t trigger_unlock_fn; ++ psmx2_lock_fn_t cq_lock_fn; ++ psmx2_unlock_fn_t cq_unlock_fn; ++ psmx2_lock_fn_t mr_lock_fn; ++ psmx2_unlock_fn_t mr_unlock_fn; ++ psmx2_lock_fn_t context_lock_fn; ++ psmx2_unlock_fn_t context_unlock_fn; ++ psmx2_trylock_fn_t poll_trylock_fn; ++ psmx2_unlock_fn_t poll_unlock_fn; + }; + + #define PSMX2_EP_REGULAR 0 +@@ -579,6 +616,13 @@ struct psmx2_ep_name { + + #define PSMX2_MAX_STRING_NAME_LEN 64 /* "fi_addr_psmx2://:" */ + ++struct psmx2_status_data { ++ struct psmx2_fid_cq *poll_cq; ++ struct psmx2_trx_ctxt *trx_ctxt; ++ fi_addr_t *src_addr; ++ void *event_buffer; ++}; ++ + struct psmx2_cq_event { + union { + struct fi_cq_entry context; +@@ -587,11 +631,11 @@ struct psmx2_cq_event { + struct fi_cq_tagged_entry tagged; + struct fi_cq_err_entry err; + } cqe; +- int error; +- int source_is_valid; +- fi_addr_t source; +- struct psmx2_fid_av *source_av; +- struct slist_entry list_entry; ++ int error; ++ int source_is_valid; ++ psm2_epaddr_t source; ++ struct psmx2_fid_av *source_av; ++ struct slist_entry list_entry; + }; + + #define PSMX2_ERR_DATA_SIZE 64 /* large enough to hold a string address */ +@@ -640,14 +684,30 @@ struct psmx2_fid_cntr { + fastlock_t trigger_lock; + }; + +-struct psmx2_av_peer { ++#define PSMX2_AV_DEFAULT_SIZE 64 ++ ++#define PSMX2_AV_TABLE_SIZE(count, shared) \ ++ (sizeof(struct psmx2_av_hdr) + \ ++ ((shared) ? (count) * sizeof(fi_addr_t) : 0) + \ ++ (count) * sizeof(struct psmx2_av_addr)) ++ ++struct psmx2_av_hdr { ++ uint64_t size; ++ uint64_t last; ++}; ++ ++struct psmx2_av_addr { ++ psm2_epid_t epid; + uint8_t type; + uint8_t sep_id; +- int sep_ctxt_cnt; +- psm2_epid_t *sep_ctxt_epids; + }; + +-struct psmx2_av_table { ++struct psmx2_av_sep { ++ int ctxt_cnt; ++ psm2_epid_t *epids; ++}; ++ ++struct psmx2_av_conn { + struct psmx2_trx_ctxt *trx_ctxt; + psm2_epaddr_t *epaddrs; + psm2_epaddr_t **sepaddrs; +@@ -657,18 +717,20 @@ struct psmx2_fid_av { + struct fid_av av; + struct psmx2_fid_domain *domain; + struct fid_eq *eq; +- int type; + int addr_format; + int rx_ctx_bits; + int max_trx_ctxt; ++ int shared; + uint64_t flags; + size_t addrlen; + size_t count; +- size_t last; + fastlock_t lock; +- psm2_epid_t *epids; /* one entry per peer */ +- struct psmx2_av_peer *peers; /* one entry per peer */ +- struct psmx2_av_table tables[];/* one entry per context */ ++ struct util_shm shm; ++ struct psmx2_av_hdr *hdr; /* shared AV header */ ++ fi_addr_t *map; /* shared AV address mapping */ ++ struct psmx2_av_addr *table; /* shared AV address table */ ++ struct psmx2_av_sep *sep_info; ++ struct psmx2_av_conn conn_info[]; + }; + + struct psmx2_fid_ep { +@@ -754,45 +816,36 @@ struct psmx2_epaddr_context { + }; + + struct psmx2_env { +- int name_server; +- int tagged_rma; +- char *uuid; +- int delay; +- int timeout; +- int prog_interval; +- char *prog_affinity; +- int multi_ep; +- int max_trx_ctxt; +- int free_trx_ctxt; +- int num_devunits; +- int inject_size; +- int lock_level; +- int lazy_conn; +- int disconnect; ++ int name_server; ++ int tagged_rma; ++ char *uuid; ++ int delay; ++ int timeout; ++ int prog_interval; ++ char *prog_affinity; ++ int multi_ep; ++ int max_trx_ctxt; ++ int free_trx_ctxt; ++ int num_devunits; ++ int inject_size; ++ int lock_level; ++ int disconnect; + #if (PSMX2_TAG_LAYOUT == PSMX2_TAG_LAYOUT_RUNTIME) +- char *tag_layout; ++ char *tag_layout; + #endif + }; + + extern struct fi_ops_mr psmx2_mr_ops; + extern struct fi_ops_cm psmx2_cm_ops; + extern struct fi_ops_tagged psmx2_tagged_ops; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_av_map_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_av_table_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_event_av_map_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_event_av_table_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_av_map_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_av_table_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_av_map_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_av_table_directed; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_av_map_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_av_table_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_event_av_map_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_event_av_table_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_av_map_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_av_table_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_av_map_undirected; +-extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_av_table_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_directed; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_event_directed; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_directed; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_directed; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_flag_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_event_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_send_event_undirected; ++extern struct fi_ops_tagged psmx2_tagged_ops_no_recv_event_undirected; + extern struct fi_ops_msg psmx2_msg_ops; + extern struct fi_ops_msg psmx2_msg2_ops; + extern struct fi_ops_rma psmx2_rma_ops; +@@ -826,6 +879,33 @@ static inline void psmx2_unlock(fastlock_t *lock, int lock_level) + fastlock_release(lock); + } + ++/* Specialized lock functions used based on FI_THREAD model */ ++ ++static inline void psmx2_lock_disabled(fastlock_t *lock, int lock_level) ++{ ++ return; ++} ++ ++static inline int psmx2_trylock_disabled(fastlock_t *lock, int lock_level) ++{ ++ return 0; ++} ++ ++static inline void psmx2_lock_enabled(fastlock_t *lock, int lock_level) ++{ ++ fastlock_acquire(lock); ++} ++ ++static inline void psmx2_unlock_enabled(fastlock_t *lock, int lock_level) ++{ ++ fastlock_release(lock); ++} ++ ++static inline int psmx2_trylock_enabled(fastlock_t *lock, int lock_level) ++{ ++ return fastlock_tryacquire(lock); ++} ++ + int psmx2_init_prov_info(const struct fi_info *hints, struct fi_info **info); + void psmx2_update_prov_info(struct fi_info *info, + struct psmx2_ep_name *src_addr, +@@ -924,43 +1004,13 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, struct psmx2_trx_ctxt *trx_ctxt, + int psmx2_epid_to_epaddr(struct psmx2_trx_ctxt *trx_ctxt, + psm2_epid_t epid, psm2_epaddr_t *epaddr); + +-int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, struct psmx2_trx_ctxt *trx_ctxt, +- int connect_now); +- +-psm2_epaddr_t psmx2_av_translate_sep(struct psmx2_fid_av *av, +- struct psmx2_trx_ctxt *trx_ctxt, fi_addr_t addr); ++int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, struct psmx2_trx_ctxt *trx_ctxt); + + void psmx2_av_remove_conn(struct psmx2_fid_av *av, struct psmx2_trx_ctxt *trx_ctxt, + psm2_epaddr_t epaddr); + +-static inline int psmx2_av_check_table_idx(struct psmx2_fid_av *av, +- struct psmx2_trx_ctxt *trx_ctxt, +- size_t idx) +-{ +- int err = 0; +- +- psmx2_lock(&av->lock, 1); +- +- if (OFI_UNLIKELY(idx >= av->last)) { +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "error: av index %ld out of range(max: %ld).\n", idx, av->last); +- err = -FI_EINVAL; +- goto out; +- } +- +- if (!av->tables[trx_ctxt->id].epaddrs[idx]) { +- err = psmx2_epid_to_epaddr(trx_ctxt, av->epids[idx], +- &av->tables[trx_ctxt->id].epaddrs[idx]); +- if (err) +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "fatal error: unable to translate epid %lx to epaddr.\n", +- av->epids[idx]); +- } +- +-out: +- psmx2_unlock(&av->lock, 1); +- return err; +-} ++psm2_epaddr_t psmx2_av_translate_addr(struct psmx2_fid_av *av, ++ struct psmx2_trx_ctxt *trx_ctxt, fi_addr_t addr); + + void psmx2_am_global_init(void); + void psmx2_am_global_fini(void); +@@ -992,9 +1042,9 @@ struct psmx2_am_request *psmx2_am_request_alloc(struct psmx2_trx_ctxt *trx_ctxt) + { + struct psmx2_am_request *req; + +- psmx2_lock(&trx_ctxt->am_req_pool_lock, 2); ++ trx_ctxt->domain->am_req_pool_lock_fn(&trx_ctxt->am_req_pool_lock, 0); + req = util_buf_alloc(trx_ctxt->am_req_pool); +- psmx2_unlock(&trx_ctxt->am_req_pool_lock, 2); ++ trx_ctxt->domain->am_req_pool_unlock_fn(&trx_ctxt->am_req_pool_lock, 0); + + if (req) + memset(req, 0, sizeof(*req)); +@@ -1005,9 +1055,9 @@ struct psmx2_am_request *psmx2_am_request_alloc(struct psmx2_trx_ctxt *trx_ctxt) + static inline void psmx2_am_request_free(struct psmx2_trx_ctxt *trx_ctxt, + struct psmx2_am_request *req) + { +- psmx2_lock(&trx_ctxt->am_req_pool_lock, 2); ++ trx_ctxt->domain->am_req_pool_lock_fn(&trx_ctxt->am_req_pool_lock, 0); + util_buf_release(trx_ctxt->am_req_pool, req); +- psmx2_unlock(&trx_ctxt->am_req_pool_lock, 2); ++ trx_ctxt->domain->am_req_pool_unlock_fn(&trx_ctxt->am_req_pool_lock, 0); + } + + struct psmx2_fid_mr *psmx2_mr_get(struct psmx2_fid_domain *domain, uint64_t key); +@@ -1031,24 +1081,21 @@ static inline void psmx2_cntr_inc(struct psmx2_fid_cntr *cntr, int error) + cntr->wait->signal(cntr->wait); + } + +-fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, fi_addr_t source); ++fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, psm2_epaddr_t source); + +-static inline void psmx2_get_source_name(fi_addr_t source, struct psmx2_ep_name *name) ++static inline void psmx2_get_source_name(psm2_epaddr_t source, struct psmx2_ep_name *name) + { +- psm2_epaddr_t epaddr = PSMX2_ADDR_TO_EP(source); +- + memset(name, 0, sizeof(*name)); +- psm2_epaddr_to_epid(epaddr, &name->epid); ++ psm2_epaddr_to_epid(source, &name->epid); + name->type = PSMX2_EP_REGULAR; + } + +-static inline void psmx2_get_source_string_name(fi_addr_t source, char *name, size_t *len) ++static inline void psmx2_get_source_string_name(psm2_epaddr_t source, char *name, size_t *len) + { + struct psmx2_ep_name ep_name; +- psm2_epaddr_t epaddr = PSMX2_ADDR_TO_EP(source); + + memset(&ep_name, 0, sizeof(ep_name)); +- psm2_epaddr_to_epid(epaddr, &ep_name.epid); ++ psm2_epaddr_to_epid(source, &ep_name.epid); + ep_name.type = PSMX2_EP_REGULAR; + + ofi_straddr(name, len, FI_ADDR_PSMX2, &ep_name); +@@ -1056,8 +1103,12 @@ static inline void psmx2_get_source_string_name(fi_addr_t source, char *name, si + + static inline void psmx2_progress(struct psmx2_trx_ctxt *trx_ctxt) + { +- if (trx_ctxt) { ++ if (trx_ctxt && trx_ctxt->poll_active) { ++#if HAVE_PSM2_MQ_REQ_USER ++ psmx2_cq_poll_mq(NULL, trx_ctxt, NULL, 1, NULL); ++#else + psmx2_cq_poll_mq(NULL, trx_ctxt, NULL, 0, NULL); ++#endif + if (trx_ctxt->am_progress) + psmx2_am_progress(trx_ctxt); + } +@@ -1068,12 +1119,12 @@ static inline void psmx2_progress_all(struct psmx2_fid_domain *domain) + struct dlist_entry *item; + struct psmx2_trx_ctxt *trx_ctxt; + +- psmx2_lock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_lock_fn(&domain->trx_ctxt_lock, 1); + dlist_foreach(&domain->trx_ctxt_list, item) { + trx_ctxt = container_of(item, struct psmx2_trx_ctxt, entry); + psmx2_progress(trx_ctxt); + } +- psmx2_unlock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_unlock_fn(&domain->trx_ctxt_lock, 1); + } + + /* +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_am.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_am.c +index 5e4e28d61..e1180e428 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_am.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_am.c +@@ -71,30 +71,32 @@ int psmx2_am_handler_count = 0; + int psmx2_am_progress(struct psmx2_trx_ctxt *trx_ctxt) + { + struct slist_entry *item; +- struct psmx2_am_request *req; + struct psmx2_trigger *trigger; + ++#if !HAVE_PSM2_MQ_FP_MSG ++ struct psmx2_am_request *req; + if (psmx2_env.tagged_rma) { +- psmx2_lock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_lock_fn(&trx_ctxt->rma_queue.lock, 2); + while (!slist_empty(&trx_ctxt->rma_queue.list)) { + item = slist_remove_head(&trx_ctxt->rma_queue.list); + req = container_of(item, struct psmx2_am_request, list_entry); +- psmx2_unlock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_unlock_fn(&trx_ctxt->rma_queue.lock, 2); + psmx2_am_process_rma(trx_ctxt, req); +- psmx2_lock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_lock_fn(&trx_ctxt->rma_queue.lock, 2); + } +- psmx2_unlock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_unlock_fn(&trx_ctxt->rma_queue.lock, 2); + } ++#endif + +- psmx2_lock(&trx_ctxt->trigger_queue.lock, 2); ++ trx_ctxt->domain->trigger_queue_lock_fn(&trx_ctxt->trigger_queue.lock, 2); + while (!slist_empty(&trx_ctxt->trigger_queue.list)) { + item = slist_remove_head(&trx_ctxt->trigger_queue.list); + trigger = container_of(item, struct psmx2_trigger, list_entry); +- psmx2_unlock(&trx_ctxt->trigger_queue.lock, 2); ++ trx_ctxt->domain->trigger_queue_unlock_fn(&trx_ctxt->trigger_queue.lock, 2); + psmx2_process_trigger(trx_ctxt, trigger); +- psmx2_lock(&trx_ctxt->trigger_queue.lock, 2); ++ trx_ctxt->domain->trigger_queue_lock_fn(&trx_ctxt->trigger_queue.lock, 2); + } +- psmx2_unlock(&trx_ctxt->trigger_queue.lock, 2); ++ trx_ctxt->domain->trigger_queue_unlock_fn(&trx_ctxt->trigger_queue.lock, 2); + + return 0; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_atomic.c +index d0ea0cbbf..6c2875936 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_atomic.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_atomic.c +@@ -808,8 +808,6 @@ ssize_t psmx2_atomic_write_generic(struct fid_ep *ep, + psm2_epaddr_t psm2_epaddr; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size, len; +- size_t idx; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -824,18 +822,9 @@ ssize_t psmx2_atomic_write_generic(struct fid_ep *ep, + assert((int)op >= 0 && (int)op < FI_ATOMIC_OP_LAST); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) +@@ -908,7 +897,6 @@ ssize_t psmx2_atomic_writev_generic(struct fid_ep *ep, + psm2_epaddr_t psm2_epaddr; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size; +- size_t idx; + size_t len; + uint8_t *buf; + int err; +@@ -930,18 +918,9 @@ ssize_t psmx2_atomic_writev_generic(struct fid_ep *ep, + count--; + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + len = psmx2_ioc_size(iov, count, datatype); + +@@ -1010,7 +989,8 @@ ssize_t psmx2_atomic_writev_generic(struct fid_ep *ep, + return 0; + } + +-static ssize_t psmx2_atomic_write(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_write(struct fid_ep *ep, + const void *buf, + size_t count, void *desc, + fi_addr_t dest_addr, +@@ -1026,7 +1006,8 @@ static ssize_t psmx2_atomic_write(struct fid_ep *ep, + ep_priv->tx_flags); + } + +-static ssize_t psmx2_atomic_writemsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_writemsg(struct fid_ep *ep, + const struct fi_msg_atomic *msg, + uint64_t flags) + { +@@ -1052,7 +1033,8 @@ static ssize_t psmx2_atomic_writemsg(struct fid_ep *ep, + msg->op, msg->context, flags); + } + +-static ssize_t psmx2_atomic_writev(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_writev(struct fid_ep *ep, + const struct fi_ioc *iov, + void **desc, size_t count, + fi_addr_t dest_addr, +@@ -1079,7 +1061,8 @@ static ssize_t psmx2_atomic_writev(struct fid_ep *ep, + ep_priv->tx_flags); + } + +-static ssize_t psmx2_atomic_inject(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_inject(struct fid_ep *ep, + const void *buf, + size_t count, /*void *desc,*/ + fi_addr_t dest_addr, +@@ -1114,8 +1097,6 @@ ssize_t psmx2_atomic_readwrite_generic(struct fid_ep *ep, + psm2_epaddr_t psm2_epaddr; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size, len; +- size_t idx; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -1132,18 +1113,9 @@ ssize_t psmx2_atomic_readwrite_generic(struct fid_ep *ep, + assert((int)op >= 0 && (int)op < FI_ATOMIC_OP_LAST); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) +@@ -1223,7 +1195,6 @@ ssize_t psmx2_atomic_readwritev_generic(struct fid_ep *ep, + psm2_epaddr_t psm2_epaddr; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size; +- size_t idx; + size_t len, result_len, iov_size; + uint8_t *buf, *result; + void *desc0, *result_desc0; +@@ -1269,18 +1240,9 @@ ssize_t psmx2_atomic_readwritev_generic(struct fid_ep *ep, + assert(result_len >= len); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) { +@@ -1386,7 +1348,8 @@ ssize_t psmx2_atomic_readwritev_generic(struct fid_ep *ep, + return 0; + } + +-static ssize_t psmx2_atomic_readwrite(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_readwrite(struct fid_ep *ep, + const void *buf, + size_t count, void *desc, + void *result, void *result_desc, +@@ -1404,7 +1367,8 @@ static ssize_t psmx2_atomic_readwrite(struct fid_ep *ep, + context, ep_priv->tx_flags); + } + +-static ssize_t psmx2_atomic_readwritemsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_readwritemsg(struct fid_ep *ep, + const struct fi_msg_atomic *msg, + struct fi_ioc *resultv, + void **result_desc, +@@ -1450,7 +1414,8 @@ static ssize_t psmx2_atomic_readwritemsg(struct fid_ep *ep, + msg->op, msg->context, flags); + } + +-static ssize_t psmx2_atomic_readwritev(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_readwritev(struct fid_ep *ep, + const struct fi_ioc *iov, + void **desc, size_t count, + struct fi_ioc *resultv, +@@ -1511,8 +1476,6 @@ ssize_t psmx2_atomic_compwrite_generic(struct fid_ep *ep, + psm2_epaddr_t psm2_epaddr; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size, len; +- size_t idx; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -1530,18 +1493,9 @@ ssize_t psmx2_atomic_compwrite_generic(struct fid_ep *ep, + assert((int)op >= 0 && (int)op < FI_ATOMIC_OP_LAST); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) +@@ -1625,8 +1579,7 @@ ssize_t psmx2_atomic_compwritev_generic(struct fid_ep *ep, + psm2_epaddr_t psm2_epaddr; + int am_flags = PSM2_AM_FLAG_ASYNC; + int chunk_size; +- size_t idx; +- size_t len, compare_len, result_len, iov_size; ++ size_t len, iov_size; + uint8_t *buf, *compare, *result; + void *desc0, *compare_desc0, *result_desc0; + int err; +@@ -1664,25 +1617,14 @@ ssize_t psmx2_atomic_compwritev_generic(struct fid_ep *ep, + result_count--; + + len = psmx2_ioc_size(iov, count, datatype); +- compare_len = psmx2_ioc_size(comparev, compare_count, datatype); +- result_len = psmx2_ioc_size(resultv, result_count, datatype); + +- assert(compare_len >= len); +- assert(result_len >= len); ++ assert(psmx2_ioc_size(comparev, compare_count, datatype) >= len); ++ assert(psmx2_ioc_size(resultv, result_count, datatype) >= len); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) { +@@ -1810,7 +1752,8 @@ ssize_t psmx2_atomic_compwritev_generic(struct fid_ep *ep, + return 0; + } + +-static ssize_t psmx2_atomic_compwrite(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_compwrite(struct fid_ep *ep, + const void *buf, + size_t count, void *desc, + const void *compare, void *compare_desc, +@@ -1830,7 +1773,8 @@ static ssize_t psmx2_atomic_compwrite(struct fid_ep *ep, + datatype, op, context, ep_priv->tx_flags); + } + +-static ssize_t psmx2_atomic_compwritemsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_compwritemsg(struct fid_ep *ep, + const struct fi_msg_atomic *msg, + const struct fi_ioc *comparev, + void **compare_desc, +@@ -1871,7 +1815,8 @@ static ssize_t psmx2_atomic_compwritemsg(struct fid_ep *ep, + msg->op, msg->context, flags); + } + +-static ssize_t psmx2_atomic_compwritev(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_atomic_compwritev(struct fid_ep *ep, + const struct fi_ioc *iov, + void **desc, size_t count, + const struct fi_ioc *comparev, +@@ -2021,7 +1966,8 @@ static int psmx2_atomic_compwritevalid_internal(size_t chunk_size, + return 0; + } + +-static int psmx2_atomic_writevalid(struct fid_ep *ep, ++DIRECT_FN ++STATIC int psmx2_atomic_writevalid(struct fid_ep *ep, + enum fi_datatype datatype, + enum fi_op op, size_t *count) + { +@@ -2033,7 +1979,8 @@ static int psmx2_atomic_writevalid(struct fid_ep *ep, + return psmx2_atomic_writevalid_internal(chunk_size, datatype, op, count); + } + +-static int psmx2_atomic_readwritevalid(struct fid_ep *ep, ++DIRECT_FN ++STATIC int psmx2_atomic_readwritevalid(struct fid_ep *ep, + enum fi_datatype datatype, + enum fi_op op, size_t *count) + { +@@ -2045,7 +1992,8 @@ static int psmx2_atomic_readwritevalid(struct fid_ep *ep, + return psmx2_atomic_readwritevalid_internal(chunk_size, datatype, op, count); + } + +-static int psmx2_atomic_compwritevalid(struct fid_ep *ep, ++DIRECT_FN ++STATIC int psmx2_atomic_compwritevalid(struct fid_ep *ep, + enum fi_datatype datatype, + enum fi_op op, size_t *count) + { +@@ -2057,6 +2005,7 @@ static int psmx2_atomic_compwritevalid(struct fid_ep *ep, + return psmx2_atomic_compwritevalid_internal(chunk_size, datatype, op, count); + } + ++DIRECT_FN + int psmx2_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, + enum fi_op op, struct fi_atomic_attr *attr, uint64_t flags) + { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_av.c +index 4999bba23..cbcf5efdc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_av.c +@@ -35,29 +35,21 @@ + /* + * SEP address query protocol: + * +- * SEQ Query REQ: +- * args[0].u32w0 cmd ++ * SEP Query REQ: ++ * args[0].u32w0 cmd, version + * args[0].u32w1 id +- * args[1].u64 req +- * args[2].u64 av_idx ++ * args[1].u64 sep_info ++ * args[2].u64 status + * + * SEP Query REP: +- * args[0].u32w0 cmd ++ * args[0].u32w0 cmd, version + * args[0].u32w1 error +- * args[1].u64 req +- * args[2].u64 av_idx ++ * args[1].u64 sep_info ++ * args[2].u64 status + * args[3].u64 n +- * data epaddrs ++ * data epids + */ + +-struct psmx2_sep_query { +- struct psmx2_fid_av *av; +- void *context; +- psm2_error_t *errors; +- ofi_atomic32_t error_count; +- ofi_atomic32_t pending; +-}; +- + static int psmx2_am_sep_match(struct dlist_entry *entry, const void *arg) + { + struct psmx2_fid_sep *sep; +@@ -75,15 +67,15 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + int nargs, void *src, uint32_t len, void *hctx) + { + struct psmx2_fid_domain *domain; +- psm2_amarg_t rep_args[8]; ++ psm2_amarg_t rep_args[4]; + int op_error = 0; + int err = 0; +- int cmd; ++ int cmd, version; + int n, i, j; + uint8_t sep_id; + struct psmx2_fid_sep *sep; +- struct psmx2_sep_query *req; +- struct psmx2_fid_av *av; ++ struct psmx2_av_sep *sep_info; ++ ofi_atomic32_t *status; + psm2_epid_t *epids; + psm2_epid_t *buf = NULL; + int buflen; +@@ -91,12 +83,20 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + struct psmx2_trx_ctxt *trx_ctxt = hctx; + + cmd = PSMX2_AM_GET_OP(args[0].u32w0); ++ version = PSMX2_AM_GET_VER(args[0].u32w0); ++ if (version != PSMX2_AM_SEP_VERSION) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "AM SEP protocol version mismatch: request %d handler %d\n", ++ version, PSMX2_AM_SEP_VERSION); ++ return -FI_EINVAL; ++ } ++ + domain = trx_ctxt->domain; + + switch (cmd) { + case PSMX2_AM_REQ_SEP_QUERY: + sep_id = args[0].u32w1; +- psmx2_lock(&domain->sep_lock, 1); ++ domain->sep_lock_fn(&domain->sep_lock, 1); + entry = dlist_find_first_match(&domain->sep_list, psmx2_am_sep_match, + (void *)(uintptr_t)sep_id); + if (!entry) { +@@ -110,7 +110,7 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + if (n) { + buf = malloc(buflen); + if (!buf) { +- op_error = -FI_ENOMEM; ++ op_error = PSM2_NO_MEMORY; + buflen = 0; + n = 0; + } +@@ -118,9 +118,10 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + buf[i] = sep->ctxts[i].trx_ctxt->psm2_epid; + } + } +- psmx2_unlock(&domain->sep_lock, 1); ++ domain->sep_unlock_fn(&domain->sep_lock, 1); + + rep_args[0].u32w0 = PSMX2_AM_REP_SEP_QUERY; ++ PSMX2_AM_SET_VER(rep_args[0].u32w0, PSMX2_AM_SEP_VERSION); + rep_args[0].u32w1 = op_error; + rep_args[1].u64 = args[1].u64; + rep_args[2].u64 = args[2].u64; +@@ -132,31 +133,28 @@ int psmx2_am_sep_handler(psm2_am_token_t token, psm2_amarg_t *args, + + case PSMX2_AM_REP_SEP_QUERY: + op_error = args[0].u32w1; +- req = (void *)(uintptr_t)args[1].u64; +- av = req->av; +- i = args[2].u64; ++ sep_info = (struct psmx2_av_sep *)(uintptr_t)args[1].u64; ++ status = (void *)(uintptr_t)args[2].u64; + if (op_error) { +- ofi_atomic_inc32(&req->error_count); +- req->errors[i] = op_error; ++ ofi_atomic_set32(status, psmx2_errno(op_error)); + } else { + n = args[3].u64; + epids = malloc(n * sizeof(psm2_epid_t)); + if (!epids) { +- ofi_atomic_inc32(&req->error_count); +- req->errors[i] = PSM2_NO_MEMORY; ++ ofi_atomic_set32(status, -FI_ENOMEM); + } else { + for (j=0; jpeers[i].sep_ctxt_cnt = n; +- av->peers[i].sep_ctxt_epids = epids; ++ sep_info->ctxt_cnt = n; ++ sep_info->epids = epids; ++ ofi_atomic_set32(status, 0); + } + } +- ofi_atomic_dec32(&req->pending); + break; + + default: +@@ -210,9 +208,9 @@ static void psmx2_set_epaddr_context(struct psmx2_trx_ctxt *trx_ctxt, + context->epaddr = epaddr; + psm2_epaddr_setctxt(epaddr, context); + +- psmx2_lock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_lock_fn(&trx_ctxt->peer_lock, 2); + dlist_insert_before(&context->entry, &trx_ctxt->peer_list); +- psmx2_unlock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_unlock_fn(&trx_ctxt->peer_lock, 2); + } + + int psmx2_epid_to_epaddr(struct psmx2_trx_ctxt *trx_ctxt, +@@ -234,16 +232,15 @@ int psmx2_epid_to_epaddr(struct psmx2_trx_ctxt *trx_ctxt, + + err = psm2_ep_connect(trx_ctxt->psm2_ep, 1, &epid, NULL, &errors, + epaddr, psmx2_conn_timeout(1)); +- if (err != PSM2_OK) { +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "psm2_ep_connect retured error %s, remote epid=%lx.\n", +- psm2_error_get_string(err), epid); +- return psmx2_errno(err); ++ if (err == PSM2_OK || err == PSM2_EPID_ALREADY_CONNECTED) { ++ psmx2_set_epaddr_context(trx_ctxt, epid, *epaddr); ++ return 0; + } + +- psmx2_set_epaddr_context(trx_ctxt,epid,*epaddr); +- +- return 0; ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "psm2_ep_connect retured error %s, remote epid=%lx.\n", ++ psm2_error_get_string(err), epid); ++ return psmx2_errno(err); + } + + /* +@@ -251,52 +248,67 @@ int psmx2_epid_to_epaddr(struct psmx2_trx_ctxt *trx_ctxt, + */ + static int psmx2_av_check_space(struct psmx2_fid_av *av, size_t count) + { +- psm2_epid_t *new_epids; + psm2_epaddr_t *new_epaddrs; + psm2_epaddr_t **new_sepaddrs; +- struct psmx2_av_peer *new_peers; ++ struct psmx2_av_hdr *new_hdr; ++ struct psmx2_av_sep *new_sep_info; + size_t new_count; ++ size_t old_table_size, new_table_size; + int i; + + new_count = av->count; +- while (new_count < av->last + count) +- new_count = new_count * 2 + 1; ++ while (new_count < av->hdr->last + count) ++ new_count = new_count * 2; + +- if ((new_count <= av->count) && av->epids) ++ if ((new_count <= av->count) && av->table) + return 0; + +- new_epids = realloc(av->epids, new_count * sizeof(*new_epids)); +- if (!new_epids) +- return -FI_ENOMEM; +- av->epids = new_epids; ++ old_table_size = PSMX2_AV_TABLE_SIZE(av->count, av->shared); ++ new_table_size = PSMX2_AV_TABLE_SIZE(new_count, av->shared); ++ if (av->shared) { ++ new_hdr = mremap(av->hdr, old_table_size, new_table_size, 0); ++ if (new_hdr == MAP_FAILED) ++ return -FI_ENOMEM; ++ av->hdr = new_hdr; ++ av->map = (fi_addr_t *)(av->hdr + 1); ++ av->table = (struct psmx2_av_addr *)(av->map + new_count); ++ for (i = 0; i < new_count; i++) ++ av->map[i] = i; ++ } else { ++ new_hdr = realloc(av->hdr, new_table_size); ++ if (!new_hdr) ++ return -FI_ENOMEM; ++ av->hdr = new_hdr; ++ av->table = (struct psmx2_av_addr *)(av->hdr + 1); ++ } + +- new_peers = realloc(av->peers, new_count * sizeof(*new_peers)); +- if (!new_peers) ++ new_sep_info = realloc(av->sep_info, new_count * sizeof(*new_sep_info)); ++ if (!new_sep_info) + return -FI_ENOMEM; +- av->peers = new_peers; ++ av->sep_info = new_sep_info; + + for (i = 0; i < av->max_trx_ctxt; i++) { +- if (!av->tables[i].trx_ctxt) ++ if (!av->conn_info[i].trx_ctxt) + continue; + +- new_epaddrs = realloc(av->tables[i].epaddrs, ++ new_epaddrs = realloc(av->conn_info[i].epaddrs, + new_count * sizeof(*new_epaddrs)); + if (!new_epaddrs) + return -FI_ENOMEM; +- memset(new_epaddrs + av->last, 0, +- (new_count - av->last) * sizeof(*new_epaddrs)); +- av->tables[i].epaddrs = new_epaddrs; ++ memset(new_epaddrs + av->hdr->last, 0, ++ (new_count - av->hdr->last) * sizeof(*new_epaddrs)); ++ av->conn_info[i].epaddrs = new_epaddrs; + +- new_sepaddrs = realloc(av->tables[i].sepaddrs, ++ new_sepaddrs = realloc(av->conn_info[i].sepaddrs, + new_count * sizeof(*new_sepaddrs)); + if (!new_sepaddrs) + return -FI_ENOMEM; +- memset(new_sepaddrs + av->last, 0, +- (new_count - av->last) * sizeof(*new_sepaddrs)); +- av->tables[i].sepaddrs = new_sepaddrs; ++ memset(new_sepaddrs + av->hdr->last, 0, ++ (new_count - av->hdr->last) * sizeof(*new_sepaddrs)); ++ av->conn_info[i].sepaddrs = new_sepaddrs; + } + +- av->count = new_count; ++ av->count = av->hdr->size = new_count; + return 0; + } + +@@ -326,195 +338,53 @@ static void psmx2_av_post_completion(struct psmx2_fid_av *av, void *context, + /* + * Must be called with av->lock held + */ +-static int psmx2_av_connect_trx_ctxt(struct psmx2_fid_av *av, +- int trx_ctxt_id, +- size_t av_idx_start, +- size_t count, +- psm2_error_t *errors) ++static int psmx2_av_query_sep(struct psmx2_fid_av *av, ++ struct psmx2_trx_ctxt *trx_ctxt, ++ size_t idx) + { +- struct psmx2_trx_ctxt *trx_ctxt; +- struct psmx2_sep_query *req; +- struct psmx2_av_peer *peers; +- struct psmx2_epaddr_context *epaddr_context; +- psm2_epconn_t epconn; +- psm2_ep_t ep; +- psm2_epid_t *epids; +- psm2_epaddr_t *epaddrs; +- psm2_epaddr_t **sepaddrs; ++ ofi_atomic32_t status; /* 1: pending, 0: succ, <0: error */ + psm2_amarg_t args[3]; +- int *mask; +- int error_count = 0; +- int to_connect = 0; +- int sep_count = 0; +- int i; +- +- trx_ctxt = av->tables[trx_ctxt_id].trx_ctxt; +- ep = trx_ctxt->psm2_ep; +- epids = av->epids + av_idx_start; +- epaddrs = av->tables[trx_ctxt_id].epaddrs + av_idx_start; +- sepaddrs = av->tables[trx_ctxt_id].sepaddrs + av_idx_start; +- peers = av->peers + av_idx_start; +- +- /* set up mask to avoid duplicated connection */ +- +- mask = calloc(count, sizeof(*mask)); +- if (!mask) { +- for (i = 0; i < count; i++) +- errors[i] = PSM2_NO_MEMORY; +- error_count += count; +- return error_count; +- } ++ int error; + +- for (i = 0; i < count; i++) { +- errors[i] = PSM2_OK; +- +- if (psm2_ep_epid_lookup2(ep, epids[i], &epconn) == PSM2_OK) { +- epaddr_context = psm2_epaddr_getctxt(epconn.addr); +- if (epaddr_context && epaddr_context->epid == epids[i]) +- epaddrs[i] = epconn.addr; +- else +- mask[i] = 1; +- } else { +- mask[i] = 1; +- } +- +- if (peers[i].type == PSMX2_EP_SCALABLE) +- sep_count++; +- +- if (mask[i]) { +- if (peers[i].type == PSMX2_EP_SCALABLE) { +- if (peers[i].sep_ctxt_epids) +- mask[i] = 0; +- else +- to_connect++; +- } else if (psmx2_env.lazy_conn) { +- epaddrs[i] = NULL; +- mask[i] = 0; +- } else { +- to_connect++; +- } +- } ++ if (!av->conn_info[trx_ctxt->id].epaddrs[idx]) { ++ psmx2_epid_to_epaddr(trx_ctxt, av->table[idx].epid, ++ &av->conn_info[trx_ctxt->id].epaddrs[idx]); ++ assert(av->conn_info[trx_ctxt->id].epaddrs[idx]); + } + +- if (to_connect) +- psm2_ep_connect(ep, count, epids, mask, errors, epaddrs, +- psmx2_conn_timeout(count)); +- +- /* check the connection results */ +- +- for (i = 0; i < count; i++) { +- if (!mask[i]) { +- errors[i] = PSM2_OK; +- continue; +- } +- +- if (errors[i] == PSM2_OK || +- errors[i] == PSM2_EPID_ALREADY_CONNECTED) { +- psmx2_set_epaddr_context(trx_ctxt, epids[i], epaddrs[i]); +- errors[i] = PSM2_OK; +- } else { +- /* If duplicated addrs are passed to psm2_ep_connect(), +- * all but one will fail with error "Endpoint could not +- * be reached". This should be treated the same as +- * "Endpoint already connected". +- */ +- if (psm2_ep_epid_lookup2(ep, epids[i], &epconn) == PSM2_OK) { +- epaddr_context = psm2_epaddr_getctxt(epconn.addr); +- if (epaddr_context && +- epaddr_context->epid == epids[i]) { +- epaddrs[i] = epconn.addr; +- errors[i] = PSM2_OK; +- continue; +- } +- } +- +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "%d: psm2_ep_connect (%lx --> %lx): %s\n", +- i, trx_ctxt->psm2_epid, epids[i], +- psm2_error_get_string(errors[i])); +- epaddrs[i] = NULL; +- error_count++; +- } +- } +- +- free(mask); +- +- if (sep_count) { ++ psmx2_am_init(trx_ctxt); /* check AM handler installation */ + +- /* query SEP information */ ++ ofi_atomic_initialize32(&status, 1); + +- psmx2_am_init(trx_ctxt); /* check AM handler installation */ ++ args[0].u32w0 = PSMX2_AM_REQ_SEP_QUERY; ++ PSMX2_AM_SET_VER(args[0].u32w0, PSMX2_AM_SEP_VERSION); ++ args[0].u32w1 = av->table[idx].sep_id; ++ args[1].u64 = (uint64_t)(uintptr_t)&av->sep_info[idx]; ++ args[2].u64 = (uint64_t)(uintptr_t)&status; ++ psm2_am_request_short(av->conn_info[trx_ctxt->id].epaddrs[idx], ++ PSMX2_AM_SEP_HANDLER, args, 3, NULL, ++ 0, 0, NULL, NULL); + +- req = malloc(sizeof *req); +- if (req) { +- req->av = av; +- req->errors = errors; +- ofi_atomic_initialize32(&req->error_count, 0); +- ofi_atomic_initialize32(&req->pending, 0); +- } +- +- for (i = 0; i < count; i++) { +- if (peers[i].type != PSMX2_EP_SCALABLE || +- peers[i].sep_ctxt_epids || +- errors[i] != PSM2_OK) +- continue; +- +- if (!req) { +- errors[i] = PSM2_NO_MEMORY; +- error_count++; +- continue; +- } +- +- ofi_atomic_inc32(&req->pending); +- args[0].u32w0 = PSMX2_AM_REQ_SEP_QUERY; +- args[0].u32w1 = peers[i].sep_id; +- args[1].u64 = (uint64_t)(uintptr_t)req; +- args[2].u64 = av_idx_start + i; +- psm2_am_request_short(epaddrs[i], PSMX2_AM_SEP_HANDLER, +- args, 3, NULL, 0, 0, NULL, NULL); +- } +- +- /* +- * make it synchronous for now to: +- * (1) ensure the array "req->errors" is valid; +- * (2) simplify the logic of generating the final completion. +- */ +- +- if (req) { +- /* +- * make sure AM is progressed promptly. don't call +- * psmx2_progress() which may call functions that +- * need to access the address vector. +- */ +- while (ofi_atomic_get32(&req->pending)) +- psm2_poll(trx_ctxt->psm2_ep); +- +- error_count += ofi_atomic_get32(&req->error_count); +- free(req); +- } +- } +- +- /* alloate context specific epaddrs for SEP */ ++ /* ++ * make sure AM is progressed promptly. don't call ++ * psmx2_progress() which may call functions that ++ * need to access the address vector. ++ */ ++ while (ofi_atomic_get32(&status) == 1) ++ psm2_poll(trx_ctxt->psm2_ep); + +- for (i = 0; i < count; i++) { +- if (peers[i].type == PSMX2_EP_SCALABLE && +- peers[i].sep_ctxt_epids && !sepaddrs[i]) +- sepaddrs[i] = calloc(peers[i].sep_ctxt_cnt, +- sizeof(*sepaddrs[i])); +- } ++ error = (int)(int32_t)ofi_atomic_get32(&status); + +- return error_count; ++ return error; + } + + int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, +- struct psmx2_trx_ctxt *trx_ctxt, +- int connect_now) ++ struct psmx2_trx_ctxt *trx_ctxt) + { +- psm2_error_t *errors; + int id = trx_ctxt->id; + int err = 0; + +- psmx2_lock(&av->lock, 1); ++ av->domain->av_lock_fn(&av->lock, 1); + + if (id >= av->max_trx_ctxt) { + FI_WARN(&psmx2_prov, FI_LOG_AV, +@@ -524,8 +394,8 @@ int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, + goto out; + } + +- if (av->tables[id].trx_ctxt) { +- if (av->tables[id].trx_ctxt == trx_ctxt) { ++ if (av->conn_info[id].trx_ctxt) { ++ if (av->conn_info[id].trx_ctxt == trx_ctxt) { + FI_INFO(&psmx2_prov, FI_LOG_AV, + "trx_ctxt(%p) with id(%d) already added.\n", + trx_ctxt, id); +@@ -539,36 +409,29 @@ int psmx2_av_add_trx_ctxt(struct psmx2_fid_av *av, + } + } + +- av->tables[id].epaddrs = (psm2_epaddr_t *) calloc(av->count, ++ av->conn_info[id].epaddrs = (psm2_epaddr_t *) calloc(av->count, + sizeof(psm2_epaddr_t)); +- if (!av->tables[id].epaddrs) { ++ if (!av->conn_info[id].epaddrs) { + err = -FI_ENOMEM; + goto out; + } + +- av->tables[id].sepaddrs = (psm2_epaddr_t **)calloc(av->count, ++ av->conn_info[id].sepaddrs = (psm2_epaddr_t **)calloc(av->count, + sizeof(psm2_epaddr_t *)); +- if (!av->tables[id].sepaddrs) { ++ if (!av->conn_info[id].sepaddrs) { + err = -FI_ENOMEM; + goto out; + } + +- av->tables[id].trx_ctxt = trx_ctxt; +- +- if (connect_now) { +- errors = calloc(av->count, sizeof(*errors)); +- if (errors) { +- psmx2_av_connect_trx_ctxt(av, id, 0, av->last, errors); +- free(errors); +- } +- } ++ av->conn_info[id].trx_ctxt = trx_ctxt; + + out: +- psmx2_unlock(&av->lock, 1); ++ av->domain->av_unlock_fn(&av->lock, 1); + return err; + } + +-static int psmx2_av_insert(struct fid_av *av, const void *addr, ++DIRECT_FN ++STATIC int psmx2_av_insert(struct fid_av *av, const void *addr, + size_t count, fi_addr_t *fi_addr, + uint64_t flags, void *context) + { +@@ -579,19 +442,23 @@ static int psmx2_av_insert(struct fid_av *av, const void *addr, + psm2_error_t *errors = NULL; + int error_count = 0; + int i, idx, ret; +- int sep_count = 0; + + assert(addr || !count); + + av_priv = container_of(av, struct psmx2_fid_av, av); + +- psmx2_lock(&av_priv->lock, 1); ++ av_priv->domain->av_lock_fn(&av_priv->lock, 1); + + if ((av_priv->flags & FI_EVENT) && !av_priv->eq) { + ret = -FI_ENOEQ; + goto out; + } + ++ if (av_priv->flags & FI_READ) { ++ ret = -FI_EINVAL; ++ goto out; ++ } ++ + if (psmx2_av_check_space(av_priv, count)) { + ret = -FI_ENOMEM; + goto out; +@@ -605,62 +472,37 @@ static int psmx2_av_insert(struct fid_av *av, const void *addr, + + /* save the peer address information */ + for (i = 0; i < count; i++) { +- idx = av_priv->last + i; ++ idx = av_priv->hdr->last + i; + if (av_priv->addr_format == FI_ADDR_STR) { + ep_name = psmx2_string_to_ep_name(string_names[i]); + if (!ep_name) { + ret = -FI_EINVAL; + goto out; + } +- av_priv->epids[idx] = ep_name->epid; +- av_priv->peers[idx].type = ep_name->type; +- av_priv->peers[idx].sep_id = ep_name->sep_id; ++ av_priv->table[idx].type = ep_name->type; ++ av_priv->table[idx].epid = ep_name->epid; ++ av_priv->table[idx].sep_id = ep_name->sep_id; + free(ep_name); + } else { +- av_priv->epids[idx] = names[i].epid; +- av_priv->peers[idx].type = names[i].type; +- av_priv->peers[idx].sep_id = names[i].sep_id; +- } +- av_priv->peers[idx].sep_ctxt_cnt = 1; +- av_priv->peers[idx].sep_ctxt_epids = NULL; +- if (av_priv->peers[idx].type == PSMX2_EP_SCALABLE) +- sep_count++; +- } +- +- /* +- * try to establish connection when: +- * (1) there are Tx/Rx context(s) bound to the AV; and +- * (2) the connection is desired right now +- */ +- if (sep_count || !psmx2_env.lazy_conn) { +- for (i = 0; i < av_priv->max_trx_ctxt; i++) { +- if (!av_priv->tables[i].trx_ctxt) +- continue; +- +- error_count = psmx2_av_connect_trx_ctxt(av_priv, i, +- av_priv->last, +- count, errors); +- +- if (error_count || psmx2_env.lazy_conn) +- break; ++ av_priv->table[idx].type = names[i].type; ++ av_priv->table[idx].epid = names[i].epid; ++ av_priv->table[idx].sep_id = names[i].sep_id; + } ++ av_priv->sep_info[idx].ctxt_cnt = 1; ++ av_priv->sep_info[idx].epids = NULL; + } + + if (fi_addr) { + for (i = 0; i < count; i++) { +- idx = av_priv->last + i; ++ idx = av_priv->hdr->last + i; + if (errors[i] != PSM2_OK) + fi_addr[i] = FI_ADDR_NOTAVAIL; +- else if (av_priv->peers[idx].type == PSMX2_EP_SCALABLE) +- fi_addr[i] = idx | PSMX2_SEP_ADDR_FLAG; +- else if (av_priv->type == FI_AV_TABLE) +- fi_addr[i] = idx; + else +- fi_addr[i] = PSMX2_EP_TO_ADDR(av_priv->tables[0].epaddrs[idx]); ++ fi_addr[i] = idx; + } + } + +- av_priv->last += count; ++ av_priv->hdr->last += count; + + if (av_priv->flags & FI_EVENT) { + if (error_count) { +@@ -680,23 +522,106 @@ static int psmx2_av_insert(struct fid_av *av, const void *addr, + + out: + free(errors); +- psmx2_unlock(&av_priv->lock, 1); ++ av_priv->domain->av_unlock_fn(&av_priv->lock, 1); + return ret; + } + +-static int psmx2_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, ++ ++static int psmx2_av_disconnect_addr(int trx_ctxt_id, psm2_epid_t epid, ++ psm2_epaddr_t epaddr) ++{ ++ struct psmx2_epaddr_context *epaddr_context; ++ psm2_error_t errors; ++ int err; ++ ++ if (!epaddr) ++ return 0; ++ ++ FI_INFO(&psmx2_prov, FI_LOG_AV, ++ "trx_ctxt_id %d epid %lx epaddr %p\n", trx_ctxt_id, epid, epaddr); ++ ++ epaddr_context = psm2_epaddr_getctxt(epaddr); ++ if (!epaddr_context) ++ return -FI_EINVAL; ++ ++ if (trx_ctxt_id != epaddr_context->trx_ctxt->id) ++ return -FI_EINVAL; ++ ++ if (epid != epaddr_context->epid) ++ return -FI_EINVAL; ++ ++ err = psm2_ep_disconnect2(epaddr_context->trx_ctxt->psm2_ep, 1, &epaddr, ++ NULL, &errors, PSM2_EP_DISCONNECT_FORCE, 0); ++ ++ return psmx2_errno(err); ++} ++ ++DIRECT_FN ++STATIC int psmx2_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, + uint64_t flags) + { ++ struct psmx2_fid_av *av_priv; ++ int idx, i, j, k; ++ int err; ++ ++ av_priv = container_of(av, struct psmx2_fid_av, av); ++ ++ av_priv->domain->av_lock_fn(&av_priv->lock, 1); ++ ++ for (i = 0; i < count; i++) { ++ idx = PSMX2_ADDR_IDX(fi_addr[i]); ++ if (idx >= av_priv->hdr->last) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "AV index out of range: fi_addr %lx idx %d last %ld\n", ++ fi_addr[i], idx, av_priv->hdr->last); ++ continue; ++ } ++ ++ if (av_priv->table[idx].type == PSMX2_EP_REGULAR) { ++ for (j = 0; j < av_priv->max_trx_ctxt; j++) { ++ if (!av_priv->conn_info[j].trx_ctxt) ++ continue; ++ ++ err = psmx2_av_disconnect_addr( ++ j, av_priv->table[idx].epid, ++ av_priv->conn_info[j].epaddrs[idx]); ++ if (!err) ++ av_priv->conn_info[j].epaddrs[idx] = NULL; ++ } ++ } else { ++ if (!av_priv->sep_info[idx].epids) ++ continue; ++ ++ for (j = 0; j < av_priv->max_trx_ctxt; j++) { ++ if (!av_priv->conn_info[j].trx_ctxt) ++ continue; ++ ++ if (!av_priv->conn_info[j].sepaddrs[idx]) ++ continue; ++ ++ for (k = 0; k < av_priv->sep_info[idx].ctxt_cnt; k++) { ++ err = psmx2_av_disconnect_addr( ++ j, av_priv->sep_info[idx].epids[k], ++ av_priv->conn_info[j].sepaddrs[idx][k]); ++ if (!err) ++ av_priv->conn_info[j].sepaddrs[idx][k] = NULL; ++ } ++ } ++ } ++ } ++ ++ av_priv->domain->av_unlock_fn(&av_priv->lock, 1); ++ + return 0; + } + +-static int psmx2_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, ++DIRECT_FN ++STATIC int psmx2_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, + size_t *addrlen) + { + struct psmx2_fid_av *av_priv; +- struct psmx2_epaddr_context *context; + struct psmx2_ep_name name; +- int idx; ++ int idx = PSMX2_ADDR_IDX(fi_addr); + int err = 0; + + assert(addr); +@@ -706,31 +631,17 @@ static int psmx2_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, + + memset(&name, 0, sizeof(name)); + +- psmx2_lock(&av_priv->lock, 1); ++ av_priv->domain->av_lock_fn(&av_priv->lock, 1); + +- if (PSMX2_SEP_ADDR_TEST(fi_addr)) { +- idx = PSMX2_SEP_ADDR_IDX(fi_addr); +- if (idx >= av_priv->last) { +- err = -FI_EINVAL; +- goto out; +- } +- name.type = PSMX2_EP_SCALABLE; +- name.epid = av_priv->epids[idx]; +- name.sep_id = av_priv->peers[idx].sep_id; +- } else if (av_priv->type == FI_AV_TABLE) { +- idx = (int)(int64_t)fi_addr; +- if (idx >= av_priv->last) { +- err = -FI_EINVAL; +- goto out; +- } +- name.type = PSMX2_EP_REGULAR; +- name.epid = av_priv->epids[idx]; +- } else { +- context = psm2_epaddr_getctxt(PSMX2_ADDR_TO_EP(fi_addr)); +- name.type = PSMX2_EP_REGULAR; +- name.epid = context->epid; ++ if (idx >= av_priv->hdr->last) { ++ err = -FI_EINVAL; ++ goto out; + } + ++ name.type = av_priv->table[idx].type; ++ name.epid = av_priv->table[idx].epid; ++ name.sep_id = av_priv->table[idx].sep_id; ++ + if (av_priv->addr_format == FI_ADDR_STR) { + ofi_straddr(addr, addrlen, FI_ADDR_PSMX2, &name); + } else { +@@ -739,75 +650,90 @@ static int psmx2_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, + } + + out: +- psmx2_unlock(&av_priv->lock, 1); ++ av_priv->domain->av_unlock_fn(&av_priv->lock, 1); + return err; + } + +-psm2_epaddr_t psmx2_av_translate_sep(struct psmx2_fid_av *av, +- struct psmx2_trx_ctxt *trx_ctxt, +- fi_addr_t addr) ++psm2_epaddr_t psmx2_av_translate_addr(struct psmx2_fid_av *av, ++ struct psmx2_trx_ctxt *trx_ctxt, ++ fi_addr_t addr) + { +- int idx = PSMX2_SEP_ADDR_IDX(addr); +- int ctxt = PSMX2_SEP_ADDR_CTXT(addr, av->rx_ctx_bits); +- psm2_epaddr_t epaddr = NULL; +- psm2_error_t errors; +- int err; +- +- psmx2_lock(&av->lock, 1); ++ psm2_epaddr_t epaddr; ++ size_t idx = PSMX2_ADDR_IDX(addr); ++ int ctxt; ++ int err = 0; + +- if (av->peers[idx].type != PSMX2_EP_SCALABLE || +- ctxt >= av->peers[idx].sep_ctxt_cnt) +- goto out; ++ av->domain->av_lock_fn(&av->lock, 1); ++ assert(idx < av->hdr->last); + +- /* this can be NULL when lazy connection is enabled */ +- if (!av->tables[trx_ctxt->id].sepaddrs[idx]) { +- psmx2_av_connect_trx_ctxt(av, trx_ctxt->id, idx, 1, &errors); +- assert(av->tables[trx_ctxt->id].sepaddrs[idx]); +- } ++ if (av->table[idx].type == PSMX2_EP_SCALABLE) { ++ if (!av->sep_info[idx].epids) { ++ psmx2_av_query_sep(av, trx_ctxt, idx); ++ assert(av->sep_info[idx].epids); ++ } + +- if (!av->tables[trx_ctxt->id].sepaddrs[idx][ctxt]) { +- err = psmx2_epid_to_epaddr(trx_ctxt, +- av->peers[idx].sep_ctxt_epids[ctxt], +- &epaddr); +- if (err) { +- FI_WARN(&psmx2_prov, FI_LOG_AV, +- "fatal error: unable to translate epid %lx to epaddr.\n", +- av->peers[idx].sep_ctxt_epids[ctxt]); +- goto out; ++ if (!av->conn_info[trx_ctxt->id].sepaddrs[idx]) { ++ av->conn_info[trx_ctxt->id].sepaddrs[idx] = ++ calloc(av->sep_info[idx].ctxt_cnt, sizeof(psm2_epaddr_t)); ++ assert(av->conn_info[trx_ctxt->id].sepaddrs[idx]); + } + +- av->tables[trx_ctxt->id].sepaddrs[idx][ctxt] = epaddr; +- } ++ ctxt = PSMX2_ADDR_CTXT(addr, av->rx_ctx_bits); ++ assert(ctxt < av->sep_info[idx].ctxt_cnt); + +- epaddr = av->tables[trx_ctxt->id].sepaddrs[idx][ctxt]; ++ if (!av->conn_info[trx_ctxt->id].sepaddrs[idx][ctxt]) { ++ err = psmx2_epid_to_epaddr(trx_ctxt, ++ av->sep_info[idx].epids[ctxt], ++ &av->conn_info[trx_ctxt->id].sepaddrs[idx][ctxt]); ++ assert(!err); ++ } ++ epaddr = av->conn_info[trx_ctxt->id].sepaddrs[idx][ctxt]; ++ } else { ++ if (!av->conn_info[trx_ctxt->id].epaddrs[idx]) { ++ err = psmx2_epid_to_epaddr(trx_ctxt, av->table[idx].epid, ++ &av->conn_info[trx_ctxt->id].epaddrs[idx]); ++ assert(!err); ++ } ++ epaddr = av->conn_info[trx_ctxt->id].epaddrs[idx]; ++ } + +-out: +- psmx2_unlock(&av->lock, 1); ++#ifdef NDEBUG ++ (void) err; ++#endif ++ av->domain->av_unlock_fn(&av->lock, 1); + return epaddr; + } + +-fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, fi_addr_t source) ++fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, psm2_epaddr_t source) + { +- psm2_epaddr_t epaddr; + psm2_epid_t epid; + fi_addr_t ret = FI_ADDR_NOTAVAIL; + int i, j, found = 0; + +- epaddr = PSMX2_ADDR_TO_EP(source); +- psm2_epaddr_to_epid(epaddr, &epid); ++ psm2_epaddr_to_epid(source, &epid); + +- psmx2_lock(&av->lock, 1); ++ av->domain->av_lock_fn(&av->lock, 1); + +- for (i = av->last - 1; i >= 0 && !found; i--) { +- if (av->peers[i].type == PSMX2_EP_REGULAR) { +- if (av->epids[i] == epid) { +- ret = (av->type == FI_AV_MAP) ? +- source : (fi_addr_t)i; ++ for (i = av->hdr->last - 1; i >= 0 && !found; i--) { ++ if (av->table[i].type == PSMX2_EP_REGULAR) { ++ if (av->table[i].epid == epid) { ++ ret = (fi_addr_t)i; + found = 1; + } + } else { +- for (j=0; jpeers[i].sep_ctxt_cnt; j++) { +- if (av->peers[i].sep_ctxt_epids[j] == epid) { ++ if (!av->sep_info[i].epids) { ++ for (j = 0; j < av->max_trx_ctxt; j++) { ++ if (av->conn_info[j].trx_ctxt) ++ break; ++ } ++ if (j >= av->max_trx_ctxt) ++ continue; ++ psmx2_av_query_sep(av, av->conn_info[j].trx_ctxt, i); ++ if (!av->sep_info[i].epids) ++ continue; ++ } ++ for (j=0; jsep_info[i].ctxt_cnt; j++) { ++ if (av->sep_info[i].epids[j] == epid) { + ret = fi_rx_addr((fi_addr_t)i, j, + av->rx_ctx_bits); + found = 1; +@@ -817,7 +743,7 @@ fi_addr_t psmx2_av_translate_source(struct psmx2_fid_av *av, fi_addr_t source) + } + } + +- psmx2_unlock(&av->lock, 1); ++ av->domain->av_unlock_fn(&av->lock, 1); + return ret; + } + +@@ -830,27 +756,30 @@ void psmx2_av_remove_conn(struct psmx2_fid_av *av, + + psm2_epaddr_to_epid(epaddr, &epid); + +- psmx2_lock(&av->lock, 1); ++ av->domain->av_lock_fn(&av->lock, 1); + +- for (i = 0; i < av->last; i++) { +- if (av->peers[i].type == PSMX2_EP_REGULAR) { +- if (av->epids[i] == epid && +- av->tables[trx_ctxt->id].epaddrs[i] == epaddr) +- av->tables[trx_ctxt->id].epaddrs[i] = NULL; ++ for (i = 0; i < av->hdr->last; i++) { ++ if (av->table[i].type == PSMX2_EP_REGULAR) { ++ if (av->table[i].epid == epid && ++ av->conn_info[trx_ctxt->id].epaddrs[i] == epaddr) ++ av->conn_info[trx_ctxt->id].epaddrs[i] = NULL; + } else { +- for (j=0; jpeers[i].sep_ctxt_cnt; j++) { +- if (av->peers[i].sep_ctxt_epids[j] == epid && +- av->tables[trx_ctxt->id].sepaddrs[i] && +- av->tables[trx_ctxt->id].sepaddrs[i][j] == epaddr) +- av->tables[trx_ctxt->id].sepaddrs[i][j] = NULL; ++ if (!av->sep_info[i].epids) ++ continue; ++ for (j=0; jsep_info[i].ctxt_cnt; j++) { ++ if (av->sep_info[i].epids[j] == epid && ++ av->conn_info[trx_ctxt->id].sepaddrs[i] && ++ av->conn_info[trx_ctxt->id].sepaddrs[i][j] == epaddr) ++ av->conn_info[trx_ctxt->id].sepaddrs[i][j] = NULL; + } + } + } + +- psmx2_unlock(&av->lock, 1); ++ av->domain->av_unlock_fn(&av->lock, 1); + } + +-static const char *psmx2_av_straddr(struct fid_av *av, const void *addr, ++DIRECT_FN ++STATIC const char *psmx2_av_straddr(struct fid_av *av, const void *addr, + char *buf, size_t *len) + { + return ofi_straddr(buf, len, FI_ADDR_PSMX2, addr); +@@ -860,27 +789,36 @@ static int psmx2_av_close(fid_t fid) + { + struct psmx2_fid_av *av; + int i, j; ++ int err; + + av = container_of(fid, struct psmx2_fid_av, av.fid); + psmx2_domain_release(av->domain); + fastlock_destroy(&av->lock); + for (i = 0; i < av->max_trx_ctxt; i++) { +- if (!av->tables[i].trx_ctxt) ++ if (!av->conn_info[i].trx_ctxt) + continue; +- free(av->tables[i].epaddrs); +- if (av->tables[i].sepaddrs) { +- for (j = 0; j < av->last; j++) +- free(av->tables[i].sepaddrs[j]); ++ free(av->conn_info[i].epaddrs); ++ if (av->conn_info[i].sepaddrs) { ++ for (j = 0; j < av->hdr->last; j++) ++ free(av->conn_info[i].sepaddrs[j]); + } +- free(av->tables[i].sepaddrs); ++ free(av->conn_info[i].sepaddrs); ++ } ++ if (av->shared) { ++ err = ofi_shm_unmap(&av->shm); ++ if (err) ++ FI_INFO(&psmx2_prov, FI_LOG_AV, ++ "Failed to unmap shared AV: %s.\n", ++ strerror(ofi_syserr())); ++ } else { ++ free(av->hdr); + } +- free(av->peers); +- free(av->epids); + free(av); + return 0; + } + +-static int psmx2_av_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++DIRECT_FN ++STATIC int psmx2_av_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct psmx2_fid_av *av; + +@@ -918,66 +856,35 @@ static struct fi_ops_av psmx2_av_ops = { + .straddr = psmx2_av_straddr, + }; + ++DIRECT_FN + int psmx2_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + struct fid_av **av, void *context) + { + struct psmx2_fid_domain *domain_priv; + struct psmx2_fid_av *av_priv; +- int type; +- size_t count = 64; ++ size_t count = PSMX2_AV_DEFAULT_SIZE; + uint64_t flags = 0; ++ int shared = 0; + int rx_ctx_bits = PSMX2_MAX_RX_CTX_BITS; ++ size_t conn_size; + size_t table_size; ++ int err; ++ int i; + + domain_priv = container_of(domain, struct psmx2_fid_domain, + util_domain.domain_fid); + +- if (psmx2_env.lazy_conn || psmx2_env.max_trx_ctxt > 1) +- type = FI_AV_TABLE; +- else +- type = FI_AV_MAP; +- + if (attr) { +- switch (attr->type) { +- case FI_AV_UNSPEC: +- break; +- +- case FI_AV_MAP: +- if (psmx2_env.lazy_conn) { +- FI_INFO(&psmx2_prov, FI_LOG_AV, +- "Lazy connection is enabled, force FI_AV_TABLE\n"); +- break; +- } +- if (psmx2_env.max_trx_ctxt > 1) { +- FI_INFO(&psmx2_prov, FI_LOG_AV, +- "Multi-EP is enabled, force FI_AV_TABLE\n"); +- break; +- } +- /* fall through */ +- case FI_AV_TABLE: +- type = attr->type; +- break; +- default: +- FI_INFO(&psmx2_prov, FI_LOG_AV, +- "attr->type=%d, supported=%d %d\n", +- attr->type, FI_AV_MAP, FI_AV_TABLE); +- return -FI_EINVAL; +- } ++ if (attr->count) ++ count = attr->count; + +- count = attr->count; +- flags = attr->flags; ++ if (attr->name) ++ shared = 1; + +- if (flags & (FI_READ | FI_SYMMETRIC)) { +- FI_INFO(&psmx2_prov, FI_LOG_AV, +- "attr->flags=%"PRIu64", supported=%llu\n", +- attr->flags, FI_EVENT); +- return -FI_ENOSYS; +- } +- +- if (attr->name) { ++ flags = attr->flags; ++ if (flags & FI_SYMMETRIC) { + FI_INFO(&psmx2_prov, FI_LOG_AV, +- "attr->name=%s, named AV is not supported\n", +- attr->name); ++ "FI_SYMMETRIC flags is no supported\n"); + return -FI_ENOSYS; + } + +@@ -991,17 +898,60 @@ int psmx2_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + rx_ctx_bits = attr->rx_ctx_bits; + } + +- table_size = psmx2_env.max_trx_ctxt * sizeof(struct psmx2_av_table); +- av_priv = (struct psmx2_fid_av *) calloc(1, sizeof(*av_priv) + table_size); ++ conn_size = psmx2_env.max_trx_ctxt * sizeof(struct psmx2_av_conn); ++ av_priv = (struct psmx2_fid_av *) calloc(1, sizeof(*av_priv) + conn_size); + if (!av_priv) + return -FI_ENOMEM; + ++ av_priv->sep_info = calloc(count, sizeof(struct psmx2_av_sep)); ++ if (!av_priv->sep_info) { ++ err = -FI_ENOMEM; ++ goto errout_free; ++ } ++ ++ table_size = PSMX2_AV_TABLE_SIZE(count, shared); ++ if (attr && attr->name) { ++ err = ofi_shm_map(&av_priv->shm, attr->name, table_size, ++ flags & FI_READ, (void**)&av_priv->hdr); ++ if (err || av_priv->hdr == MAP_FAILED) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "failed to map shared AV: %s\n", attr->name); ++ err = -FI_EINVAL; ++ goto errout_free; ++ } ++ ++ if (flags & FI_READ) { ++ if (av_priv->hdr->size != count) { ++ FI_WARN(&psmx2_prov, FI_LOG_AV, ++ "AV size doesn't match: shared %ld, asking %ld\n", ++ av_priv->hdr->size, count); ++ err = -FI_EINVAL; ++ goto errout_free; ++ } ++ } else { ++ av_priv->hdr->size = count; ++ av_priv->hdr->last = 0; ++ } ++ av_priv->shared = 1; ++ av_priv->map = (fi_addr_t *)(av_priv->hdr + 1); ++ av_priv->table = (struct psmx2_av_addr *)(av_priv->map + count); ++ for (i = 0; i < count; i++) ++ av_priv->map[i] = i; ++ } else { ++ av_priv->hdr = calloc(1, table_size); ++ if (!av_priv->hdr) { ++ err = -FI_ENOMEM; ++ goto errout_free; ++ } ++ av_priv->hdr->size = count; ++ av_priv->table = (struct psmx2_av_addr *)(av_priv->hdr + 1); ++ } ++ + fastlock_init(&av_priv->lock); + + psmx2_domain_acquire(domain_priv); + + av_priv->domain = domain_priv; +- av_priv->type = type; + av_priv->addrlen = sizeof(psm2_epaddr_t); + av_priv->count = count; + av_priv->flags = flags; +@@ -1015,12 +965,17 @@ int psmx2_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + av_priv->av.ops = &psmx2_av_ops; + + *av = &av_priv->av; +- if (attr) +- attr->type = type; +- +- FI_INFO(&psmx2_prov, FI_LOG_AV, +- "type = %s\n", fi_tostr(&type, FI_TYPE_AV_TYPE)); ++ if (attr) { ++ attr->type = FI_AV_TABLE; ++ if (shared) ++ attr->map_addr = av_priv->map; ++ } + + return 0; ++ ++errout_free: ++ free(av_priv->sep_info); ++ free(av_priv); ++ return err; + } + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cm.c +index dba162439..239506e7a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cm.c +@@ -32,7 +32,8 @@ + + #include "psmx2.h" + +-static int psmx2_cm_getname(fid_t fid, void *addr, size_t *addrlen) ++DIRECT_FN ++STATIC int psmx2_cm_getname(fid_t fid, void *addr, size_t *addrlen) + { + struct psmx2_fid_ep *ep; + struct psmx2_fid_sep *sep; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cntr.c +index cc9d07d7e..f176630a4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cntr.c +@@ -42,7 +42,7 @@ void psmx2_cntr_check_trigger(struct psmx2_fid_cntr *cntr) + if (!cntr->trigger) + return; + +- psmx2_lock(&cntr->trigger_lock, 2); ++ cntr->domain->trigger_lock_fn(&cntr->trigger_lock, 2); + + trigger = cntr->trigger; + while (trigger) { +@@ -65,10 +65,10 @@ void psmx2_cntr_check_trigger(struct psmx2_fid_cntr *cntr) + } + + if (trx_ctxt->am_initialized) { +- psmx2_lock(&trx_ctxt->trigger_queue.lock, 2); ++ cntr->domain->trigger_queue_lock_fn(&trx_ctxt->trigger_queue.lock, 2); + slist_insert_tail(&trigger->list_entry, + &trx_ctxt->trigger_queue.list); +- psmx2_unlock(&trx_ctxt->trigger_queue.lock, 2); ++ cntr->domain->trigger_queue_unlock_fn(&trx_ctxt->trigger_queue.lock, 2); + } else { + psmx2_process_trigger(trx_ctxt, trigger); + } +@@ -76,7 +76,7 @@ void psmx2_cntr_check_trigger(struct psmx2_fid_cntr *cntr) + trigger = cntr->trigger; + } + +- psmx2_unlock(&cntr->trigger_lock, 2); ++ cntr->domain->trigger_unlock_fn(&cntr->trigger_lock, 2); + } + + void psmx2_cntr_add_trigger(struct psmx2_fid_cntr *cntr, +@@ -84,7 +84,7 @@ void psmx2_cntr_add_trigger(struct psmx2_fid_cntr *cntr, + { + struct psmx2_trigger *p, *q; + +- psmx2_lock(&cntr->trigger_lock, 2); ++ cntr->domain->trigger_lock_fn(&cntr->trigger_lock, 2); + + q = NULL; + p = cntr->trigger; +@@ -98,12 +98,13 @@ void psmx2_cntr_add_trigger(struct psmx2_fid_cntr *cntr, + cntr->trigger = trigger; + trigger->next = p; + +- psmx2_unlock(&cntr->trigger_lock, 2); ++ cntr->domain->trigger_unlock_fn(&cntr->trigger_lock, 2); + + psmx2_cntr_check_trigger(cntr); + } + +-static uint64_t psmx2_cntr_read(struct fid_cntr *cntr) ++DIRECT_FN ++STATIC uint64_t psmx2_cntr_read(struct fid_cntr *cntr) + { + struct psmx2_fid_cntr *cntr_priv; + struct psmx2_poll_ctxt *poll_ctxt; +@@ -126,7 +127,8 @@ static uint64_t psmx2_cntr_read(struct fid_cntr *cntr) + return ofi_atomic_get64(&cntr_priv->counter); + } + +-static uint64_t psmx2_cntr_readerr(struct fid_cntr *cntr) ++DIRECT_FN ++STATIC uint64_t psmx2_cntr_readerr(struct fid_cntr *cntr) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -136,7 +138,8 @@ static uint64_t psmx2_cntr_readerr(struct fid_cntr *cntr) + return ofi_atomic_get64(&cntr_priv->error_counter); + } + +-static int psmx2_cntr_add(struct fid_cntr *cntr, uint64_t value) ++DIRECT_FN ++STATIC int psmx2_cntr_add(struct fid_cntr *cntr, uint64_t value) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -151,7 +154,8 @@ static int psmx2_cntr_add(struct fid_cntr *cntr, uint64_t value) + return 0; + } + +-static int psmx2_cntr_set(struct fid_cntr *cntr, uint64_t value) ++DIRECT_FN ++STATIC int psmx2_cntr_set(struct fid_cntr *cntr, uint64_t value) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -166,7 +170,8 @@ static int psmx2_cntr_set(struct fid_cntr *cntr, uint64_t value) + return 0; + } + +-static int psmx2_cntr_adderr(struct fid_cntr *cntr, uint64_t value) ++DIRECT_FN ++STATIC int psmx2_cntr_adderr(struct fid_cntr *cntr, uint64_t value) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -182,7 +187,8 @@ static int psmx2_cntr_adderr(struct fid_cntr *cntr, uint64_t value) + return 0; + } + +-static int psmx2_cntr_seterr(struct fid_cntr *cntr, uint64_t value) ++DIRECT_FN ++STATIC int psmx2_cntr_seterr(struct fid_cntr *cntr, uint64_t value) + { + struct psmx2_fid_cntr *cntr_priv; + +@@ -198,7 +204,8 @@ static int psmx2_cntr_seterr(struct fid_cntr *cntr, uint64_t value) + return 0; + } + +-static int psmx2_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout) ++DIRECT_FN ++STATIC int psmx2_cntr_wait(struct fid_cntr *cntr, uint64_t threshold, int timeout) + { + struct psmx2_fid_cntr *cntr_priv; + struct psmx2_poll_ctxt *poll_ctxt; +@@ -269,6 +276,8 @@ static int psmx2_cntr_close(fid_t fid) + while (!slist_empty(&cntr->poll_list)) { + entry = slist_remove_head(&cntr->poll_list); + item = container_of(entry, struct psmx2_poll_ctxt, list_entry); ++ if (!ofi_atomic_dec32(&item->trx_ctxt->poll_refcnt)) ++ free(item->trx_ctxt); + free(item); + } + +@@ -335,6 +344,7 @@ static struct fi_ops_cntr psmx2_cntr_ops = { + .seterr = psmx2_cntr_seterr, + }; + ++DIRECT_FN + int psmx2_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + struct fid_cntr **cntr, void *context) + { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cq.c +index 4f1356f16..f3d877b98 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_cq.c +@@ -35,10 +35,10 @@ + void psmx2_cq_enqueue_event(struct psmx2_fid_cq *cq, + struct psmx2_cq_event *event) + { +- psmx2_lock(&cq->lock, 2); ++ cq->domain->cq_lock_fn(&cq->lock, 2); + slist_insert_tail(&event->list_entry, &cq->event_queue); + cq->event_count++; +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + + if (cq->wait) + cq->wait->signal(cq->wait); +@@ -48,14 +48,14 @@ static struct psmx2_cq_event *psmx2_cq_dequeue_event(struct psmx2_fid_cq *cq) + { + struct slist_entry *entry; + +- psmx2_lock(&cq->lock, 2); ++ cq->domain->cq_lock_fn(&cq->lock, 2); + if (slist_empty(&cq->event_queue)) { +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + return NULL; + } + entry = slist_remove_head(&cq->event_queue); + cq->event_count--; +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + + return container_of(entry, struct psmx2_cq_event, list_entry); + } +@@ -64,15 +64,15 @@ static struct psmx2_cq_event *psmx2_cq_alloc_event(struct psmx2_fid_cq *cq) + { + struct psmx2_cq_event *event; + +- psmx2_lock(&cq->lock, 2); ++ cq->domain->cq_lock_fn(&cq->lock, 2); + if (!slist_empty(&cq->free_list)) { + event = container_of(slist_remove_head(&cq->free_list), + struct psmx2_cq_event, list_entry); +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + return event; + } + +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + event = calloc(1, sizeof(*event)); + if (!event) + FI_WARN(&psmx2_prov, FI_LOG_CQ, "out of memory.\n"); +@@ -85,9 +85,9 @@ static void psmx2_cq_free_event(struct psmx2_fid_cq *cq, + { + memset(event, 0, sizeof(*event)); + +- psmx2_lock(&cq->lock, 2); ++ cq->domain->cq_lock_fn(&cq->lock, 2); + slist_insert_tail(&event->list_entry, &cq->free_list); +- psmx2_unlock(&cq->lock, 2); ++ cq->domain->cq_unlock_fn(&cq->lock, 2); + } + + struct psmx2_cq_event *psmx2_cq_create_event(struct psmx2_fid_cq *cq, +@@ -152,6 +152,690 @@ out: + return event; + } + ++static uint64_t psmx2_comp_flags[PSMX2_MAX_CONTEXT_TYPE] = { ++ [PSMX2_NOCOMP_SEND_CONTEXT] = FI_SEND | FI_MSG, ++ [PSMX2_NOCOMP_RECV_CONTEXT] = FI_RECV | FI_MSG, ++ [PSMX2_NOCOMP_TSEND_CONTEXT] = FI_SEND | FI_TAGGED, ++ [PSMX2_NOCOMP_TRECV_CONTEXT] = FI_RECV | FI_TAGGED, ++ [PSMX2_NOCOMP_WRITE_CONTEXT] = FI_WRITE | FI_RMA, ++ [PSMX2_NOCOMP_READ_CONTEXT] = FI_READ | FI_RMA, ++ [PSMX2_SEND_CONTEXT] = FI_SEND | FI_MSG, ++ [PSMX2_RECV_CONTEXT] = FI_RECV | FI_MSG, ++ [PSMX2_MULTI_RECV_CONTEXT] = FI_RECV | FI_MSG, ++ [PSMX2_TSEND_CONTEXT] = FI_SEND | FI_TAGGED, ++ [PSMX2_TRECV_CONTEXT] = FI_RECV | FI_TAGGED, ++ [PSMX2_WRITE_CONTEXT] = FI_WRITE | FI_RMA, ++ [PSMX2_READ_CONTEXT] = FI_READ | FI_RMA, ++ [PSMX2_REMOTE_WRITE_CONTEXT] = FI_REMOTE_WRITE | FI_RMA, ++ [PSMX2_REMOTE_READ_CONTEXT] = FI_REMOTE_READ | FI_RMA, ++ [PSMX2_SENDV_CONTEXT] = FI_SEND, ++ [PSMX2_IOV_SEND_CONTEXT] = FI_SEND, ++ [PSMX2_IOV_RECV_CONTEXT] = FI_RECV, ++}; ++ ++ ++#if HAVE_PSM2_MQ_REQ_USER ++ ++/* ++ * Translate "status" into completion event. A few factors determine where to ++ * save the event. ++ * ++ * If: ++ * ++ * (1) the CQE is for the CQ being polled; and ++ * (2) event buffer is supplied (event_in != NULL); and ++ * (3) the CQE is not an error entry, ++ * ++ * then the event is written to the event buffer directly. Otherwise a CQE is ++ * allocated on the corresponding CQ. ++ * ++ * The function doesn't use PSMX2_STATUS_CONTEXT(status) because the context ++ * field could refer to an allocated descriptor that may have already been ++ * freed. All the information that are dependent on the field are obtained ++ * in advance and passed in as separate parameters ("op_context", "buf", ++ * "flags", "data", and "is_recv"). ++ * ++ * The flag "event_saved" is set to indicate to the caller that the event ++ * was saved to the user's provided buffer, otherwise the event was an error ++ * or the event has been saved to the comp_cq slist. ++ */ ++ ++__attribute__((always_inline)) ++static inline int psmx2_cq_any_complete(struct psmx2_fid_cq *poll_cq, ++ struct psmx2_fid_cq *comp_cq, ++ struct psmx2_fid_av *av, ++ PSMX2_STATUS_TYPE *status, ++ void *op_context, ++ void *buf, ++ uint64_t flags, ++ uint64_t data, ++ struct psmx2_cq_event *event_in, ++ int *event_saved, ++ fi_addr_t *src_addr, ++ int is_recv) ++{ ++ struct psmx2_cq_event *event = event_in; ++ ++ *event_saved = 1; ++ ++ if (OFI_UNLIKELY(PSMX2_STATUS_ERROR(status))) { ++ *event_saved = 0; ++ event = psmx2_cq_alloc_event(comp_cq); ++ if (!event) ++ return -FI_ENOMEM; ++ ++ event->error = 1; ++ event->cqe.err.op_context = op_context; ++ event->cqe.err.flags = flags; ++ event->cqe.err.err = -psmx2_errno(PSMX2_STATUS_ERROR(status)); ++ event->cqe.err.prov_errno = PSMX2_STATUS_ERROR(status); ++ event->cqe.err.tag = PSMX2_GET_TAG64(PSMX2_STATUS_TAG(status)); ++ event->cqe.err.olen = PSMX2_STATUS_SNDLEN(status) - PSMX2_STATUS_RCVLEN(status); ++ event->cqe.err.data = data; ++ ++ psmx2_cq_enqueue_event(comp_cq, event); ++ return 0; ++ } ++ ++ if (OFI_UNLIKELY(poll_cq != comp_cq || !event)) { ++ *event_saved = 0; ++ event = psmx2_cq_alloc_event(comp_cq); ++ if (!event) ++ return -FI_ENOMEM; ++ ++ event->error = 0; ++ } ++ ++ if (is_recv) { ++ psm2_epaddr_t source = PSMX2_STATUS_PEER(status); ++ ++ if (event == event_in) { ++ if (src_addr) { ++ src_addr[0] = psmx2_av_translate_source(av, source); ++ if (src_addr[0] == FI_ADDR_NOTAVAIL) { ++ *event_saved = 0; ++ event = psmx2_cq_alloc_event(comp_cq); ++ if (!event) ++ return -FI_ENOMEM; ++ ++ event->cqe = event_in->cqe; ++ event->cqe.err.err = FI_EADDRNOTAVAIL; ++ event->cqe.err.err_data = &comp_cq->error_data; ++ event->error = !!event->cqe.err.err; ++ if (av->addr_format == FI_ADDR_STR) { ++ event->cqe.err.err_data_size = PSMX2_ERR_DATA_SIZE; ++ psmx2_get_source_string_name(source, (void *)&comp_cq->error_data, ++ &event->cqe.err.err_data_size); ++ } else { ++ psmx2_get_source_name(source, (void *)&comp_cq->error_data); ++ event->cqe.err.err_data_size = sizeof(struct psmx2_ep_name); ++ } ++ } ++ } ++ } else { ++ event->source_is_valid = 1; ++ event->source = source; ++ event->source_av = av; ++ } ++ } ++ ++ switch (comp_cq->format) { ++ case FI_CQ_FORMAT_CONTEXT: ++ event->cqe.context.op_context = op_context; ++ break; ++ ++ case FI_CQ_FORMAT_MSG: ++ event->cqe.msg.op_context = op_context; ++ event->cqe.msg.flags = flags; ++ event->cqe.msg.len = PSMX2_STATUS_RCVLEN(status); ++ break; ++ ++ case FI_CQ_FORMAT_DATA: ++ event->cqe.data.op_context = op_context; ++ event->cqe.data.buf = buf; ++ event->cqe.data.flags = flags; ++ event->cqe.data.len = PSMX2_STATUS_RCVLEN(status); ++ event->cqe.data.data = data; ++ break; ++ ++ case FI_CQ_FORMAT_TAGGED: ++ event->cqe.tagged.op_context = op_context; ++ event->cqe.tagged.buf = buf; ++ event->cqe.tagged.flags = flags; ++ event->cqe.tagged.len = PSMX2_STATUS_RCVLEN(status); ++ event->cqe.tagged.data = data; ++ event->cqe.tagged.tag = PSMX2_GET_TAG64(PSMX2_STATUS_TAG(status)); ++ break; ++ ++ default: ++ FI_WARN(&psmx2_prov, FI_LOG_CQ, ++ "unsupported CQ format %d\n", comp_cq->format); ++ if (event != event_in) ++ psmx2_cq_free_event(comp_cq, event); ++ return -FI_EINVAL; ++ } ++ ++ if (OFI_UNLIKELY(event != event_in)) ++ psmx2_cq_enqueue_event(comp_cq, event); ++ ++ return 0; ++} ++ ++static inline int psmx2_cq_tx_complete(struct psmx2_fid_cq *poll_cq, ++ struct psmx2_fid_cq *comp_cq, ++ struct psmx2_fid_av *av, ++ PSMX2_STATUS_TYPE *status, ++ void *op_context, ++ void *buf, ++ uint64_t flags, ++ uint64_t data, ++ struct psmx2_cq_event *event_in, ++ int *event_saved) ++{ ++ return psmx2_cq_any_complete(poll_cq, comp_cq, av, status, ++ op_context, buf, flags, data, ++ event_in, event_saved, NULL, 0); ++} ++ ++static inline int psmx2_cq_rx_complete(struct psmx2_fid_cq *poll_cq, ++ struct psmx2_fid_cq *comp_cq, ++ struct psmx2_fid_av *av, ++ PSMX2_STATUS_TYPE *status, ++ void *op_context, ++ void *buf, ++ uint64_t flags, ++ uint64_t data, ++ struct psmx2_cq_event *event_in, ++ fi_addr_t *src_addr, ++ int *event_saved) ++{ ++ return psmx2_cq_any_complete(poll_cq, comp_cq, av, status, ++ op_context, buf, flags, data, ++ event_in, event_saved, src_addr, 1); ++} ++ ++int ++psmx2_mq_status_copy(struct psm2_mq_req_user *req, void *status_array, int entry_index) ++{ ++ struct fi_context *fi_context; ++ struct psmx2_fid_ep *ep; ++ struct psmx2_fid_mr *mr; ++ struct psmx2_am_request *am_req; ++ struct psmx2_multi_recv *multi_recv_req; ++ struct psmx2_sendv_request *sendv_req; ++ struct psmx2_sendv_reply *sendv_rep; ++ psm2_mq_req_t psm2_req; ++ size_t len_remaining; ++ void *op_context; ++ void *buf; ++ uint64_t flags; ++ uint64_t data; ++ int err; ++ int context_type; ++ int event_saved = 0; ++ void *entry = NULL; ++ ++ struct psmx2_status_data *status_data = status_array; ++ ++ if (OFI_LIKELY(status_data->event_buffer && status_data->poll_cq)) ++ entry = (uint8_t *)status_data->event_buffer + ++ (entry_index * status_data->poll_cq->entry_size); ++ ++ fi_context = PSMX2_STATUS_CONTEXT(req); ++ ++ if (OFI_UNLIKELY(!fi_context)) ++ return 0; ++ ++ context_type = (int)PSMX2_CTXT_TYPE(fi_context); ++ flags = psmx2_comp_flags[context_type]; ++ ep = PSMX2_CTXT_EP(fi_context); ++ ++ switch (context_type) { ++ case PSMX2_SEND_CONTEXT: ++ case PSMX2_TSEND_CONTEXT: ++ if (ep->send_cq) { ++ op_context = fi_context; ++ buf = PSMX2_CTXT_USER(fi_context); ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, buf, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->send_cntr) ++ psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(req)); ++ ++ /* Bi-directional send/recv performance tweak for KNL */ ++ if (event_saved && PSMX2_STATUS_SNDLEN(req) > 16384) ++ event_saved++; ++ break; ++ ++ case PSMX2_NOCOMP_SEND_CONTEXT: ++ case PSMX2_NOCOMP_TSEND_CONTEXT: ++ if (OFI_UNLIKELY(ep->send_cq && PSMX2_STATUS_ERROR(req))) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, NULL, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->send_cntr) ++ psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_RECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 0))) { ++ return 0; ++ } ++ if (ep->recv_cq) { ++ op_context = fi_context; ++ buf = PSMX2_CTXT_USER(fi_context); ++ data = 0; ++ if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req)))) { ++ flags |= FI_REMOTE_CQ_DATA; ++ data = PSMX2_GET_CQDATA(PSMX2_STATUS_TAG(req)); ++ } ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, op_context, buf, flags, data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_TRECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 0))) { ++ return 0; ++ } ++ if (ep->recv_cq) { ++ op_context = fi_context; ++ buf = PSMX2_CTXT_USER(fi_context); ++ data = 0; ++ if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req)))) { ++ flags |= FI_REMOTE_CQ_DATA; ++ data = PSMX2_GET_CQDATA(PSMX2_STATUS_TAG(req)); ++ } ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, op_context, buf, flags, data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_NOCOMP_RECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 0))) { ++ PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); ++ return 0; ++ } ++ PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); ++ if (OFI_UNLIKELY(ep->recv_cq && PSMX2_STATUS_ERROR(req))) { ++ data = 0; ++ if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req)))) { ++ flags |= FI_REMOTE_CQ_DATA; ++ data = PSMX2_GET_CQDATA(PSMX2_STATUS_TAG(req)); ++ } ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, NULL, NULL, flags, data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_NOCOMP_TRECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 0))) { ++ PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); ++ return 0; ++ } ++ PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); ++ if (OFI_UNLIKELY(ep->recv_cq && PSMX2_STATUS_ERROR(req))) { ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, NULL, NULL, flags, 0, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_WRITE_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, ++ fi_context); ++ op_context = PSMX2_CTXT_USER(fi_context); ++ free(am_req->tmpbuf); ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ if (ep->send_cq) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->write_cntr) ++ psmx2_cntr_inc(ep->write_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_NOCOMP_WRITE_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, ++ fi_context); ++ op_context = PSMX2_CTXT_USER(fi_context); ++ free(am_req->tmpbuf); ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ if (OFI_UNLIKELY(ep->send_cq && PSMX2_STATUS_ERROR(req))) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->write_cntr) ++ psmx2_cntr_inc(ep->write_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_READ_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, ++ fi_context); ++ if (OFI_UNLIKELY(am_req->op == PSMX2_AM_REQ_READV)) { ++ am_req->read.len_read += PSMX2_STATUS_RCVLEN(req); ++ if (am_req->read.len_read < am_req->read.len) { ++ FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, ++ "readv: long protocol finishes early\n"); ++ if (PSMX2_STATUS_ERROR(req)) ++ am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(req)); ++ /* Request to be freed in AM handler */ ++ return 0; ++ } ++ } ++ op_context = PSMX2_CTXT_USER(fi_context); ++ free(am_req->tmpbuf); ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ if (ep->send_cq) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->read_cntr) ++ psmx2_cntr_inc(ep->read_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_NOCOMP_READ_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, ++ fi_context); ++ if (OFI_UNLIKELY(am_req->op == PSMX2_AM_REQ_READV)) { ++ am_req->read.len_read += PSMX2_STATUS_RCVLEN(req); ++ if (am_req->read.len_read < am_req->read.len) { ++ FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, ++ "readv: long protocol finishes early\n"); ++ if (PSMX2_STATUS_ERROR(req)) ++ am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(req)); ++ /* Request to be freed in AM handler */ ++ return 0; ++ } ++ } ++ op_context = PSMX2_CTXT_USER(fi_context); ++ free(am_req->tmpbuf); ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ if (OFI_UNLIKELY(ep->send_cq && PSMX2_STATUS_ERROR(req))) { ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->read_cntr) ++ psmx2_cntr_inc(ep->read_cntr, PSMX2_STATUS_ERROR(req)); ++ break; ++ ++ case PSMX2_MULTI_RECV_CONTEXT: ++ if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req))) && ++ !psmx2_handle_sendv_req(ep, req, 1))) { ++ return 0; ++ } ++ multi_recv_req = PSMX2_CTXT_USER(fi_context); ++ if (ep->recv_cq) { ++ op_context = fi_context; ++ buf = multi_recv_req->buf + multi_recv_req->offset; ++ data = 0; ++ if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(req)))) { ++ flags |= FI_REMOTE_CQ_DATA; ++ data = PSMX2_GET_CQDATA(PSMX2_STATUS_TAG(req)); ++ } ++ if (multi_recv_req->offset + PSMX2_STATUS_RCVLEN(req) + ++ multi_recv_req->min_buf_size > multi_recv_req->len) ++ flags |= FI_MULTI_RECV; /* buffer used up */ ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, op_context, buf, flags, data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) ++ return err; ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ ++ /* repost multi-recv buffer */ ++ multi_recv_req->offset += PSMX2_STATUS_RCVLEN(req); ++ len_remaining = multi_recv_req->len - multi_recv_req->offset; ++ if (len_remaining >= multi_recv_req->min_buf_size) { ++ if (len_remaining > PSMX2_MAX_MSG_SIZE) ++ len_remaining = PSMX2_MAX_MSG_SIZE; ++ err = psm2_mq_irecv2(ep->rx->psm2_mq, ++ multi_recv_req->src_addr, &multi_recv_req->tag, ++ &multi_recv_req->tagsel, multi_recv_req->flag, ++ multi_recv_req->buf + multi_recv_req->offset, ++ len_remaining, ++ (void *)fi_context, &psm2_req); ++ if (OFI_UNLIKELY(err != PSM2_OK)) ++ return psmx2_errno(err); ++ PSMX2_CTXT_REQ(fi_context) = psm2_req; ++ } else { ++ free(multi_recv_req); ++ } ++ break; ++ ++ case PSMX2_REMOTE_WRITE_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, fi_context); ++ if (am_req->op & PSMX2_AM_FORCE_ACK) { ++ am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(req)); ++ psmx2_am_ack_rma(am_req); ++ } ++ ++ if (am_req->ep->recv_cq && (am_req->cq_flags & FI_REMOTE_CQ_DATA)) { ++ flags |= FI_REMOTE_CQ_DATA; ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, am_req->ep->recv_cq, am_req->ep->av, ++ req, NULL, NULL, flags, am_req->write.data, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) { ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ return err; ++ } ++ } ++ ++ if (am_req->ep->caps & FI_RMA_EVENT) { ++ if (am_req->ep->remote_write_cntr) ++ psmx2_cntr_inc(am_req->ep->remote_write_cntr, 0); ++ ++ mr = PSMX2_CTXT_USER(fi_context); ++ if (mr->cntr && mr->cntr != am_req->ep->remote_write_cntr) ++ psmx2_cntr_inc(mr->cntr, 0); ++ } ++ ++ /* NOTE: am_req->tmpbuf is unused here */ ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ break; ++ ++ case PSMX2_REMOTE_READ_CONTEXT: ++ am_req = container_of(fi_context, struct psmx2_am_request, fi_context); ++ if (am_req->ep->caps & FI_RMA_EVENT) { ++ if (am_req->ep->remote_read_cntr) ++ psmx2_cntr_inc(am_req->ep->remote_read_cntr, 0); ++ } ++ ++ /* NOTE: am_req->tmpbuf is unused here */ ++ psmx2_am_request_free(status_data->trx_ctxt, am_req); ++ break; ++ ++ case PSMX2_SENDV_CONTEXT: ++ sendv_req = PSMX2_CTXT_USER(fi_context); ++ sendv_req->iov_done++; ++ if (sendv_req->iov_protocol == PSMX2_IOV_PROTO_MULTI && ++ sendv_req->iov_done < sendv_req->iov_info.count + 1) { ++ sendv_req->tag = PSMX2_STATUS_TAG(req); ++ return 0; ++ } ++ if (ep->send_cq && !sendv_req->no_completion) { ++ op_context = sendv_req->user_context; ++ flags |= sendv_req->comp_flag; ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) { ++ free(sendv_req); ++ return err; ++ } ++ } ++ if (ep->send_cntr) ++ psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(req)); ++ free(sendv_req); ++ break; ++ ++ case PSMX2_IOV_SEND_CONTEXT: ++ sendv_req = PSMX2_CTXT_USER(fi_context); ++ sendv_req->iov_done++; ++ if (sendv_req->iov_done < sendv_req->iov_info.count + 1) ++ return 0; ++ PSMX2_STATUS_TAG(req) = sendv_req->tag; ++ if (ep->send_cq && !sendv_req->no_completion) { ++ op_context = sendv_req->user_context; ++ flags |= sendv_req->comp_flag; ++ err = psmx2_cq_tx_complete( ++ status_data->poll_cq, ep->send_cq, ep->av, ++ req, op_context, NULL, flags, 0, ++ entry, &event_saved); ++ if (OFI_UNLIKELY(err)) { ++ free(sendv_req); ++ return err; ++ } ++ } ++ if (ep->send_cntr) ++ psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(req)); ++ free(sendv_req); ++ break; ++ ++ case PSMX2_IOV_RECV_CONTEXT: ++ sendv_rep = PSMX2_CTXT_USER(fi_context); ++ sendv_rep->iov_done++; ++ sendv_rep->msg_length += PSMX2_STATUS_SNDLEN(req); ++ sendv_rep->bytes_received += PSMX2_STATUS_RCVLEN(req); ++ if (PSMX2_STATUS_ERROR(req) != PSM2_OK) ++ sendv_rep->error_code = PSMX2_STATUS_ERROR(req); ++ if (sendv_rep->iov_done < sendv_rep->iov_info.count) ++ return 0; ++ ++ PSMX2_STATUS_TAG(req) = sendv_rep->tag; ++ PSMX2_STATUS_RCVLEN(req) = sendv_rep->bytes_received; ++ PSMX2_STATUS_SNDLEN(req) = sendv_rep->msg_length; ++ PSMX2_STATUS_ERROR(req) = sendv_rep->error_code; ++ ++ if (ep->recv_cq && !sendv_rep->no_completion) { ++ op_context = sendv_rep->user_context; ++ buf = sendv_rep->buf; ++ flags |= sendv_rep->comp_flag; ++ err = psmx2_cq_rx_complete( ++ status_data->poll_cq, ep->recv_cq, ep->av, ++ req, op_context, buf, flags, 0, ++ entry, status_data->src_addr, &event_saved); ++ if (OFI_UNLIKELY(err)) { ++ free(sendv_rep); ++ return err; ++ } ++ } ++ if (ep->recv_cntr) ++ psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(req)); ++ ++ if (sendv_rep->multi_recv) { ++ /* repost the multi-recv buffer */ ++ fi_context = sendv_rep->user_context; ++ multi_recv_req = PSMX2_CTXT_USER(fi_context); ++ multi_recv_req->offset += PSMX2_STATUS_RCVLEN(req); ++ len_remaining = multi_recv_req->len - multi_recv_req->offset; ++ if (len_remaining >= multi_recv_req->min_buf_size) { ++ if (len_remaining > PSMX2_MAX_MSG_SIZE) ++ len_remaining = PSMX2_MAX_MSG_SIZE; ++ err = psm2_mq_irecv2(ep->rx->psm2_mq, ++ multi_recv_req->src_addr, &multi_recv_req->tag, ++ &multi_recv_req->tagsel, multi_recv_req->flag, ++ multi_recv_req->buf + multi_recv_req->offset, ++ len_remaining, ++ (void *)fi_context, &psm2_req); ++ if (OFI_UNLIKELY(err != PSM2_OK)) { ++ free(sendv_rep); ++ return psmx2_errno(err); ++ } ++ PSMX2_CTXT_REQ(fi_context) = psm2_req; ++ } else { ++ free(multi_recv_req); ++ } ++ } ++ ++ free(sendv_rep); ++ break; ++ } ++ ++ return event_saved; ++} ++ ++int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, ++ struct psmx2_trx_ctxt *trx_ctxt, ++ struct psmx2_cq_event *event_in, ++ int count, fi_addr_t *src_addr) ++{ ++ struct psmx2_status_data status_data; ++ ++ /* psm2_mq_ipeek_dequeue_multi needs non-zero count to make progress */ ++ if (!count) { ++ event_in = NULL; ++ count = 1; ++ } ++ ++ status_data.poll_cq = cq; ++ status_data.event_buffer = event_in; ++ status_data.src_addr = src_addr; ++ status_data.trx_ctxt = trx_ctxt; ++ ++ psm2_mq_ipeek_dequeue_multi(trx_ctxt->psm2_mq, &status_data, ++ psmx2_mq_status_copy, &count); ++ return count; ++} ++ ++#else /* !HAVE_PSM2_MQ_REQ_USER */ ++ + /* + * Translate "status" into completion event. A few factors determine where to + * save the event. +@@ -270,7 +954,7 @@ static inline int psmx2_cq_any_complete(struct psmx2_fid_cq *poll_cq, + } + + if (is_recv) { +- fi_addr_t source = PSMX2_EP_TO_ADDR(PSMX2_STATUS_PEER(status)); ++ psm2_epaddr_t source = PSMX2_STATUS_PEER(status); + + if (event == event_in) { + if (src_addr) { +@@ -353,33 +1037,12 @@ static inline int psmx2_cq_rx_complete(struct psmx2_fid_cq *poll_cq, + read_more, src_addr, 1); + } + +-static uint64_t psmx2_comp_flags[PSMX2_MAX_CONTEXT_TYPE] = { +- [PSMX2_NOCOMP_SEND_CONTEXT] = FI_SEND | FI_MSG, +- [PSMX2_NOCOMP_RECV_CONTEXT] = FI_RECV | FI_MSG, +- [PSMX2_NOCOMP_TSEND_CONTEXT] = FI_SEND | FI_TAGGED, +- [PSMX2_NOCOMP_TRECV_CONTEXT] = FI_RECV | FI_TAGGED, +- [PSMX2_NOCOMP_WRITE_CONTEXT] = FI_WRITE | FI_RMA, +- [PSMX2_NOCOMP_READ_CONTEXT] = FI_READ | FI_RMA, +- [PSMX2_SEND_CONTEXT] = FI_SEND | FI_MSG, +- [PSMX2_RECV_CONTEXT] = FI_RECV | FI_MSG, +- [PSMX2_MULTI_RECV_CONTEXT] = FI_RECV | FI_MSG, +- [PSMX2_TSEND_CONTEXT] = FI_SEND | FI_TAGGED, +- [PSMX2_TRECV_CONTEXT] = FI_RECV | FI_TAGGED, +- [PSMX2_WRITE_CONTEXT] = FI_WRITE | FI_RMA, +- [PSMX2_READ_CONTEXT] = FI_READ | FI_RMA, +- [PSMX2_REMOTE_WRITE_CONTEXT] = FI_REMOTE_WRITE | FI_RMA, +- [PSMX2_REMOTE_READ_CONTEXT] = FI_REMOTE_READ | FI_RMA, +- [PSMX2_SENDV_CONTEXT] = FI_SEND, +- [PSMX2_IOV_SEND_CONTEXT] = FI_SEND, +- [PSMX2_IOV_RECV_CONTEXT] = FI_RECV, +-}; +- + int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + struct psmx2_trx_ctxt *trx_ctxt, + struct psmx2_cq_event *event_in, + int count, fi_addr_t *src_addr) + { +- PSMX2_STATUS_DECL(status); ++ psm2_mq_status2_t status_priv, *status = &status_priv; + struct fi_context *fi_context; + struct psmx2_fid_ep *ep; + struct psmx2_fid_mr *mr; +@@ -398,16 +1061,25 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + int err; + int context_type; + +- PSMX2_STATUS_INIT(status); +- + while (read_more) { + +- PSMX2_POLL_COMPLETION(trx_ctxt, status, err); ++ /* ++ * psm2_mq_test2 is called immediately after psm2_mq_ipeek with a lock held to ++ * prevent psm2_mq_ipeek from returning the same request multiple times under ++ * different threads. ++ */ ++ if (trx_ctxt->domain->poll_trylock_fn(&trx_ctxt->poll_lock, 2)) { ++ err = PSM2_MQ_NO_COMPLETIONS; ++ } else { ++ err = psm2_mq_ipeek(trx_ctxt->psm2_mq, &psm2_req, NULL); ++ if (err == PSM2_OK) ++ psm2_mq_test2(&psm2_req, status); ++ trx_ctxt->domain->poll_unlock_fn(&trx_ctxt->poll_lock, 2); ++ } + + if (err == PSM2_OK) { + fi_context = PSMX2_STATUS_CONTEXT(status); + if (OFI_UNLIKELY(!fi_context)) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + +@@ -426,10 +1098,8 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->send_cntr) + psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(status)); +@@ -438,7 +1108,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + if (PSMX2_STATUS_SNDLEN(status) > 16384) + read_more = 0; + +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_SEND_CONTEXT: +@@ -452,22 +1121,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->send_cntr) + psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_RECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && +- !psmx2_handle_sendv_req(ep, status, 0))) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ !psmx2_handle_sendv_req(ep, status, 0))) + continue; +- } + if (ep->recv_cq) { + op_context = fi_context; + buf = PSMX2_CTXT_USER(fi_context); +@@ -483,22 +1147,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, data, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_TRECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && +- !psmx2_handle_sendv_req(ep, status, 0))) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ !psmx2_handle_sendv_req(ep, status, 0))) + continue; +- } + if (ep->recv_cq) { + op_context = fi_context; + buf = PSMX2_CTXT_USER(fi_context); +@@ -514,21 +1173,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, data, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_RECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && + !psmx2_handle_sendv_req(ep, status, 0))) { + PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); +@@ -547,21 +1202,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, data, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_TRECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && + !psmx2_handle_sendv_req(ep, status, 0))) { + PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + PSMX2_EP_PUT_OP_CONTEXT(ep, fi_context); +@@ -574,14 +1225,11 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_WRITE_CONTEXT: +@@ -598,14 +1246,11 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->write_cntr) + psmx2_cntr_inc(ep->write_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_WRITE_CONTEXT: +@@ -622,14 +1267,11 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->write_cntr) + psmx2_cntr_inc(ep->write_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_READ_CONTEXT: +@@ -643,7 +1285,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + if (PSMX2_STATUS_ERROR(status)) + am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(status)); + /* Request to be freed in AM handler */ +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + } +@@ -658,14 +1299,11 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->read_cntr) + psmx2_cntr_inc(ep->read_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_NOCOMP_READ_CONTEXT: +@@ -679,7 +1317,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + if (PSMX2_STATUS_ERROR(status)) + am_req->error = psmx2_errno(PSMX2_STATUS_ERROR(status)); + /* Request to be freed in AM handler */ +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + continue; + } + } +@@ -694,22 +1331,17 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, 0, + event_in, count, &read_count, + &read_more); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->read_cntr) + psmx2_cntr_inc(ep->read_cntr, PSMX2_STATUS_ERROR(status)); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_MULTI_RECV_CONTEXT: + if (OFI_UNLIKELY(PSMX2_IS_IOV_HEADER(PSMX2_GET_FLAGS(PSMX2_STATUS_TAG(status))) && +- !psmx2_handle_sendv_req(ep, status, 1))) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ !psmx2_handle_sendv_req(ep, status, 1))) + continue; +- } + multi_recv_req = PSMX2_CTXT_USER(fi_context); + if (ep->recv_cq) { + op_context = fi_context; +@@ -729,10 +1361,8 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + status, op_context, buf, flags, data, + event_in, count, &read_count, + &read_more, src_addr); +- if (err) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err) + return err; +- } + } + if (ep->recv_cntr) + psmx2_cntr_inc(ep->recv_cntr, PSMX2_STATUS_ERROR(status)); +@@ -749,15 +1379,12 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + multi_recv_req->buf + multi_recv_req->offset, + len_remaining, + (void *)fi_context, &psm2_req); +- if (err != PSM2_OK) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (err != PSM2_OK) + return psmx2_errno(err); +- } + PSMX2_CTXT_REQ(fi_context) = psm2_req; + } else { + free(multi_recv_req); + } +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_REMOTE_WRITE_CONTEXT: +@@ -778,7 +1405,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + &read_more, src_addr); + if (err) { + psmx2_am_request_free(trx_ctxt, am_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return err; + } + } +@@ -794,7 +1420,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + + /* NOTE: am_req->tmpbuf is unused here */ + psmx2_am_request_free(trx_ctxt, am_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_REMOTE_READ_CONTEXT: +@@ -806,7 +1431,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + + /* NOTE: am_req->tmpbuf is unused here */ + psmx2_am_request_free(trx_ctxt, am_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_SENDV_CONTEXT: +@@ -814,7 +1438,7 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + sendv_req->iov_done++; + if (sendv_req->iov_protocol == PSMX2_IOV_PROTO_MULTI && + sendv_req->iov_done < sendv_req->iov_info.count + 1) { +- PSMX2_STATUS_SAVE(status, sendv_req->status); ++ sendv_req->tag = PSMX2_STATUS_TAG(status); + continue; + } + if (ep->send_cq && !sendv_req->no_completion) { +@@ -829,23 +1453,20 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + &read_more); + if (err) { + free(sendv_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return err; + } + } + if (ep->send_cntr) + psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(status)); + free(sendv_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + + case PSMX2_IOV_SEND_CONTEXT: + sendv_req = PSMX2_CTXT_USER(fi_context); + sendv_req->iov_done++; +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + if (sendv_req->iov_done < sendv_req->iov_info.count + 1) + continue; +- status = sendv_req->status; ++ PSMX2_STATUS_TAG(status) = sendv_req->tag; + if (ep->send_cq && !sendv_req->no_completion) { + op_context = sendv_req->user_context; + buf = NULL; +@@ -858,15 +1479,12 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + &read_more); + if (err) { + free(sendv_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return err; + } + } + if (ep->send_cntr) + psmx2_cntr_inc(ep->send_cntr, PSMX2_STATUS_ERROR(status)); + free(sendv_req); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); +- PSMX2_STATUS_INIT(status); + break; + + case PSMX2_IOV_RECV_CONTEXT: +@@ -876,10 +1494,8 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + sendv_rep->bytes_received += PSMX2_STATUS_RCVLEN(status); + if (PSMX2_STATUS_ERROR(status) != PSM2_OK) + sendv_rep->error_code = PSMX2_STATUS_ERROR(status); +- if (sendv_rep->iov_done < sendv_rep->iov_info.count) { +- PSMX2_FREE_COMPLETION(trx_ctxt, status); ++ if (sendv_rep->iov_done < sendv_rep->iov_info.count) + continue; +- } + + PSMX2_STATUS_TAG(status) = sendv_rep->tag; + PSMX2_STATUS_RCVLEN(status) = sendv_rep->bytes_received; +@@ -898,7 +1514,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + &read_more, src_addr); + if (err) { + free(sendv_rep); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return err; + } + } +@@ -922,7 +1537,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + (void *)fi_context, &psm2_req); + if (err != PSM2_OK) { + free(sendv_rep); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + return psmx2_errno(err); + } + PSMX2_CTXT_REQ(fi_context) = psm2_req; +@@ -932,7 +1546,6 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + } + + free(sendv_rep); +- PSMX2_FREE_COMPLETION(trx_ctxt, status); + break; + } + } else if (err == PSM2_MQ_NO_COMPLETIONS) { +@@ -944,8 +1557,10 @@ int psmx2_cq_poll_mq(struct psmx2_fid_cq *cq, + + return read_count; + } ++#endif /* !HAVE_PSM2_MQ_REQ_USER */ + +-static ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, ++DIRECT_FN ++STATIC ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, + fi_addr_t *src_addr) + { + struct psmx2_fid_cq *cq_priv; +@@ -963,6 +1578,10 @@ static ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, + slist_foreach(&cq_priv->poll_list, item, prev) { + poll_ctxt = container_of(item, struct psmx2_poll_ctxt, + list_entry); ++ ++ if (OFI_UNLIKELY(!poll_ctxt->trx_ctxt->poll_active)) ++ continue; ++ + ret = psmx2_cq_poll_mq(cq_priv, poll_ctxt->trx_ctxt, + (struct psmx2_cq_event *)buf, + count, src_addr); +@@ -976,13 +1595,16 @@ static ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, + } + } + +- if (cq_priv->pending_error) ++ if (OFI_UNLIKELY(cq_priv->pending_error != NULL)) + return -FI_EAVAIL; + + assert(buf || !count); + + read_count = 0; + for (i = 0; i < count; i++) { ++ if (slist_empty(&cq_priv->event_queue)) ++ break; ++ + event = psmx2_cq_dequeue_event(cq_priv); + if (event) { + if (!event->error) { +@@ -1040,12 +1662,14 @@ static ssize_t psmx2_cq_readfrom(struct fid_cq *cq, void *buf, size_t count, + return read_count; + } + +-static ssize_t psmx2_cq_read(struct fid_cq *cq, void *buf, size_t count) ++DIRECT_FN ++STATIC ssize_t psmx2_cq_read(struct fid_cq *cq, void *buf, size_t count) + { + return psmx2_cq_readfrom(cq, buf, count, NULL); + } + +-static ssize_t psmx2_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, ++DIRECT_FN ++STATIC ssize_t psmx2_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, + uint64_t flags) + { + struct psmx2_fid_cq *cq_priv; +@@ -1054,7 +1678,7 @@ static ssize_t psmx2_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, + + cq_priv = container_of(cq, struct psmx2_fid_cq, cq); + +- psmx2_lock(&cq_priv->lock, 2); ++ cq_priv->domain->cq_lock_fn(&cq_priv->lock, 2); + if (cq_priv->pending_error) { + api_version = cq_priv->domain->fabric->util_fabric. + fabric_fid.api_version; +@@ -1067,12 +1691,13 @@ static ssize_t psmx2_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, + psmx2_unlock(&cq_priv->lock, 2); + return 1; + } +- psmx2_unlock(&cq_priv->lock, 2); ++ cq_priv->domain->cq_unlock_fn(&cq_priv->lock, 2); + + return -FI_EAGAIN; + } + +-static ssize_t psmx2_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, ++DIRECT_FN ++STATIC ssize_t psmx2_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, + fi_addr_t *src_addr, const void *cond, + int timeout) + { +@@ -1106,6 +1731,10 @@ static ssize_t psmx2_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, + poll_ctxt = container_of(item, + struct psmx2_poll_ctxt, + list_entry); ++ ++ if (OFI_UNLIKELY(!poll_ctxt->trx_ctxt->poll_active)) ++ continue; ++ + sth_happened = + psmx2_cq_poll_mq(cq_priv, + poll_ctxt->trx_ctxt, +@@ -1141,13 +1770,15 @@ static ssize_t psmx2_cq_sreadfrom(struct fid_cq *cq, void *buf, size_t count, + return psmx2_cq_readfrom(cq, buf, count, src_addr); + } + +-static ssize_t psmx2_cq_sread(struct fid_cq *cq, void *buf, size_t count, ++DIRECT_FN ++STATIC ssize_t psmx2_cq_sread(struct fid_cq *cq, void *buf, size_t count, + const void *cond, int timeout) + { + return psmx2_cq_sreadfrom(cq, buf, count, NULL, cond, timeout); + } + +-static int psmx2_cq_signal(struct fid_cq *cq) ++DIRECT_FN ++STATIC int psmx2_cq_signal(struct fid_cq *cq) + { + struct psmx2_fid_cq *cq_priv; + cq_priv = container_of(cq, struct psmx2_fid_cq, cq); +@@ -1159,7 +1790,8 @@ static int psmx2_cq_signal(struct fid_cq *cq) + return 0; + } + +-static const char *psmx2_cq_strerror(struct fid_cq *cq, int prov_errno, const void *prov_data, ++DIRECT_FN ++STATIC const char *psmx2_cq_strerror(struct fid_cq *cq, int prov_errno, const void *prov_data, + char *buf, size_t len) + { + return psm2_error_get_string(prov_errno); +@@ -1177,6 +1809,8 @@ static int psmx2_cq_close(fid_t fid) + while (!slist_empty(&cq->poll_list)) { + entry = slist_remove_head(&cq->poll_list); + poll_item = container_of(entry, struct psmx2_poll_ctxt, list_entry); ++ if (!ofi_atomic_dec32(&poll_item->trx_ctxt->poll_refcnt)) ++ free(poll_item->trx_ctxt); + free(poll_item); + } + +@@ -1241,6 +1875,7 @@ static struct fi_ops_cq psmx2_cq_ops = { + .strerror = psmx2_cq_strerror, + }; + ++DIRECT_FN + int psmx2_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq, void *context) + { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_domain.c +index 2f760c6c9..741e79dc9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_domain.c +@@ -203,7 +203,8 @@ static int psmx2_domain_close(fid_t fid) + return 0; + } + +-static int psmx2_domain_control(fid_t fid, int command, void *arg) ++DIRECT_FN ++STATIC int psmx2_domain_control(fid_t fid, int command, void *arg) + { + struct fi_mr_map_raw *map; + +@@ -292,6 +293,7 @@ err_out: + return err; + } + ++DIRECT_FN + int psmx2_domain_open(struct fid_fabric *fabric, struct fi_info *info, + struct fid_domain **domain, void *context) + { +@@ -299,7 +301,7 @@ int psmx2_domain_open(struct fid_fabric *fabric, struct fi_info *info, + struct psmx2_fid_domain *domain_priv; + struct psmx2_ep_name *src_addr = info->src_addr; + int mr_mode = (info->domain_attr->mr_mode & FI_MR_BASIC) ? FI_MR_BASIC : 0; +- int err; ++ int err, tmp; + + FI_INFO(&psmx2_prov, FI_LOG_DOMAIN, "\n"); + +@@ -337,6 +339,108 @@ int psmx2_domain_open(struct fid_fabric *fabric, struct fi_info *info, + if (info->addr_format == FI_ADDR_STR) + src_addr = psmx2_string_to_ep_name(info->src_addr); + ++ /* Use generic lock/unlock functions by default */ ++ domain_priv->av_lock_fn = psmx2_lock; ++ domain_priv->am_req_pool_lock_fn = psmx2_lock; ++ domain_priv->trx_ctxt_lock_fn = psmx2_lock; ++ domain_priv->rma_queue_lock_fn = psmx2_lock; ++ domain_priv->trigger_queue_lock_fn = psmx2_lock; ++ domain_priv->peer_lock_fn = psmx2_lock; ++ domain_priv->sep_lock_fn = psmx2_lock; ++ domain_priv->trigger_lock_fn = psmx2_lock; ++ domain_priv->cq_lock_fn = psmx2_lock; ++ domain_priv->mr_lock_fn = psmx2_lock; ++ domain_priv->context_lock_fn = psmx2_lock; ++ domain_priv->poll_trylock_fn = psmx2_trylock; ++ ++ domain_priv->av_unlock_fn = psmx2_unlock; ++ domain_priv->am_req_pool_unlock_fn = psmx2_unlock; ++ domain_priv->trx_ctxt_unlock_fn = psmx2_unlock; ++ domain_priv->rma_queue_unlock_fn = psmx2_unlock; ++ domain_priv->trigger_queue_unlock_fn = psmx2_unlock; ++ domain_priv->peer_unlock_fn = psmx2_unlock; ++ domain_priv->sep_unlock_fn = psmx2_unlock; ++ domain_priv->trigger_unlock_fn = psmx2_unlock; ++ domain_priv->cq_unlock_fn = psmx2_unlock; ++ domain_priv->mr_unlock_fn = psmx2_unlock; ++ domain_priv->context_unlock_fn = psmx2_unlock; ++ domain_priv->poll_unlock_fn = psmx2_unlock; ++ ++ /* If lock_level env is unset, then set locks based off threading model*/ ++ err = fi_param_get_bool(&psmx2_prov, "lock_level", &tmp); ++ if (err < 0) { ++ switch (info->domain_attr->threading) { ++ case FI_THREAD_DOMAIN: ++ /* Disable locks not required when serializing access to a domain */ ++ domain_priv->av_lock_fn = psmx2_lock_disabled; ++ domain_priv->trx_ctxt_lock_fn = psmx2_lock_disabled; ++ domain_priv->trigger_queue_lock_fn = psmx2_lock_disabled; ++ domain_priv->peer_lock_fn = psmx2_lock_disabled; ++ domain_priv->sep_lock_fn = psmx2_lock_disabled; ++ domain_priv->trigger_lock_fn = psmx2_lock_disabled; ++ domain_priv->cq_lock_fn = psmx2_lock_disabled; ++ domain_priv->mr_lock_fn = psmx2_lock_disabled; ++ domain_priv->context_lock_fn = psmx2_lock_disabled; ++ domain_priv->poll_trylock_fn = psmx2_trylock_disabled; ++ ++ domain_priv->av_unlock_fn = psmx2_lock_disabled; ++ domain_priv->trx_ctxt_unlock_fn = psmx2_lock_disabled; ++ domain_priv->trigger_queue_unlock_fn = psmx2_lock_disabled; ++ domain_priv->peer_unlock_fn = psmx2_lock_disabled; ++ domain_priv->sep_unlock_fn = psmx2_lock_disabled; ++ domain_priv->trigger_unlock_fn = psmx2_lock_disabled; ++ domain_priv->cq_unlock_fn = psmx2_lock_disabled; ++ domain_priv->mr_unlock_fn = psmx2_lock_disabled; ++ domain_priv->context_unlock_fn = psmx2_lock_disabled; ++ domain_priv->poll_unlock_fn = psmx2_lock_disabled; ++ ++ /* ++ * If FI_RMA or FI_ATOMIC caps are enabled, then locks are ++ * required for the CQ, am_req_poll, & rma_queue ++ * due to the PSM2 Recv thread. ++ * NOTE: am_req_poll & rma_queue are only used when FI_RMA ++ * and FI_ATOMIC capabilities are enabled. ++ */ ++ if ((info->caps & FI_RMA) || (info->caps & FI_ATOMIC)) { ++ domain_priv->cq_lock_fn = psmx2_lock_enabled; ++ domain_priv->am_req_pool_lock_fn = psmx2_lock_enabled; ++ domain_priv->rma_queue_lock_fn = psmx2_lock_enabled; ++ domain_priv->cq_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->am_req_pool_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->rma_queue_unlock_fn = psmx2_unlock_enabled; ++ } ++ break; ++ default: ++ /* Otherwise, enable all locks */ ++ domain_priv->av_lock_fn = psmx2_lock_enabled; ++ domain_priv->am_req_pool_lock_fn = psmx2_lock_enabled; ++ domain_priv->trx_ctxt_lock_fn = psmx2_lock_enabled; ++ domain_priv->rma_queue_lock_fn = psmx2_lock_enabled; ++ domain_priv->trigger_queue_lock_fn = psmx2_lock_enabled; ++ domain_priv->peer_lock_fn = psmx2_lock_enabled; ++ domain_priv->sep_lock_fn = psmx2_lock_enabled; ++ domain_priv->trigger_lock_fn = psmx2_lock_enabled; ++ domain_priv->cq_lock_fn = psmx2_lock_enabled; ++ domain_priv->mr_lock_fn = psmx2_lock_enabled; ++ domain_priv->context_lock_fn = psmx2_lock_enabled; ++ domain_priv->poll_trylock_fn = psmx2_trylock_enabled; ++ ++ domain_priv->av_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->am_req_pool_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->trx_ctxt_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->rma_queue_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->trigger_queue_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->peer_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->sep_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->trigger_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->cq_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->mr_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->context_unlock_fn = psmx2_unlock_enabled; ++ domain_priv->poll_unlock_fn = psmx2_unlock_enabled; ++ break; ++ } ++ } ++ + err = psmx2_domain_init(domain_priv, src_addr); + if (info->addr_format == FI_ADDR_STR) + free(src_addr); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_ep.c +index 6141301a9..088510937 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_ep.c +@@ -52,61 +52,37 @@ static void psmx2_ep_optimize_ops(struct psmx2_fid_ep *ep) + + if (ep->caps & FI_DIRECTED_RECV) { + if (!send_completion && !recv_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_event_av_table_directed; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_event_av_map_directed; ++ ep->ep.tagged = &psmx2_tagged_ops_no_event_directed; + FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, + "tagged ops optimized for op_flags=0 and event suppression and directed receive\n"); + } else if (!send_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_send_event_av_table_directed; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_send_event_av_map_directed; ++ ep->ep.tagged = &psmx2_tagged_ops_no_send_event_directed; + FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, + "tagged ops optimized for op_flags=0 and send event suppression and directed receive\n"); + } else if (!recv_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_av_table_directed; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_av_map_directed; ++ ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_directed; + FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, + "tagged ops optimized for op_flags=0 and recv event suppression and directed receive\n"); + } else { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_flag_av_table_directed; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_flag_av_map_directed; ++ ep->ep.tagged = &psmx2_tagged_ops_no_flag_directed; + FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, + "tagged ops optimized for op_flags=0 and directed receive\n"); + } + } else { + if (!send_completion && !recv_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_event_av_table_undirected; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_event_av_map_undirected; ++ ep->ep.tagged = &psmx2_tagged_ops_no_event_undirected; + FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, + "tagged ops optimized for op_flags=0 and event suppression\n"); + } else if (!send_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_send_event_av_table_undirected; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_send_event_av_map_undirected; ++ ep->ep.tagged = &psmx2_tagged_ops_no_send_event_undirected; + FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, + "tagged ops optimized for op_flags=0 and send event suppression\n"); + } else if (!recv_completion) { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_av_table_undirected; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_av_map_undirected; ++ ep->ep.tagged = &psmx2_tagged_ops_no_recv_event_undirected; + FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, + "tagged ops optimized for op_flags=0 and recv event suppression\n"); + } else { +- if (ep->av && ep->av->type == FI_AV_TABLE) +- ep->ep.tagged = &psmx2_tagged_ops_no_flag_av_table_undirected; +- else +- ep->ep.tagged = &psmx2_tagged_ops_no_flag_av_map_undirected; ++ ep->ep.tagged = &psmx2_tagged_ops_no_flag_undirected; + FI_INFO(&psmx2_prov, FI_LOG_EP_DATA, + "tagged ops optimized for op_flags=0\n"); + } +@@ -116,7 +92,8 @@ static void psmx2_ep_optimize_ops(struct psmx2_fid_ep *ep) + } + } + +-static ssize_t psmx2_ep_cancel(fid_t fid, void *context) ++DIRECT_FN ++STATIC ssize_t psmx2_ep_cancel(fid_t fid, void *context) + { + struct psmx2_fid_ep *ep; + psm2_mq_status2_t status; +@@ -165,7 +142,8 @@ static ssize_t psmx2_ep_cancel(fid_t fid, void *context) + return psmx2_errno(err); + } + +-static int psmx2_ep_getopt(fid_t fid, int level, int optname, ++DIRECT_FN ++STATIC int psmx2_ep_getopt(fid_t fid, int level, int optname, + void *optval, size_t *optlen) + { + struct psmx2_fid_ep *ep; +@@ -188,7 +166,8 @@ static int psmx2_ep_getopt(fid_t fid, int level, int optname, + return 0; + } + +-static int psmx2_ep_setopt(fid_t fid, int level, int optname, ++DIRECT_FN ++STATIC int psmx2_ep_setopt(fid_t fid, int level, int optname, + const void *optval, size_t optlen) + { + struct psmx2_fid_ep *ep; +@@ -275,12 +254,14 @@ static int psmx2_add_poll_ctxt(struct slist *list, struct psmx2_trx_ctxt *trx_ct + if (!item) + return -FI_ENOMEM; + ++ ofi_atomic_inc32(&trx_ctxt->poll_refcnt); + item->trx_ctxt = trx_ctxt; + slist_insert_tail(&item->list_entry, list); + return 0; + } + +-static int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++DIRECT_FN ++STATIC int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct psmx2_fid_ep *ep; + struct psmx2_fid_av *av; +@@ -357,9 +338,9 @@ static int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + ep->av = av; + psmx2_ep_optimize_ops(ep); + if (ep->tx) +- psmx2_av_add_trx_ctxt(av, ep->tx, !psmx2_env.lazy_conn); ++ psmx2_av_add_trx_ctxt(av, ep->tx); + if (ep->rx && ep->rx != ep->tx) +- psmx2_av_add_trx_ctxt(av, ep->rx, !psmx2_env.lazy_conn); ++ psmx2_av_add_trx_ctxt(av, ep->rx); + break; + + case FI_CLASS_MR: +@@ -381,7 +362,11 @@ static int psmx2_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + err = psmx2_domain_enable_ep(ep->domain, ep); + if (err) + return err; ++#if HAVE_PSM2_MQ_FP_MSG ++ if (ep->caps & FI_TRIGGER) ++#else + if (ep->caps & (FI_RMA | FI_TRIGGER)) ++#endif + stx->tx->am_progress = 1; + ofi_atomic_inc32(&stx->ref); + break; +@@ -425,7 +410,8 @@ static inline int psmx2_ep_get_flags(struct psmx2_fid_ep *ep, uint64_t *flags) + return 0; + } + +-static int psmx2_ep_control(fid_t fid, int command, void *arg) ++DIRECT_FN ++STATIC int psmx2_ep_control(fid_t fid, int command, void *arg) + { + struct fi_alias *alias; + struct psmx2_fid_ep *ep, *new_ep; +@@ -477,7 +463,8 @@ static int psmx2_ep_control(fid_t fid, int command, void *arg) + return 0; + } + +-static ssize_t psmx2_rx_size_left(struct fid_ep *ep) ++DIRECT_FN ++STATIC ssize_t psmx2_rx_size_left(struct fid_ep *ep) + { + struct psmx2_fid_ep *ep_priv; + +@@ -488,7 +475,8 @@ static ssize_t psmx2_rx_size_left(struct fid_ep *ep) + return -FI_EOPBADSTATE; + } + +-static ssize_t psmx2_tx_size_left(struct fid_ep *ep) ++DIRECT_FN ++STATIC ssize_t psmx2_tx_size_left(struct fid_ep *ep) + { + struct psmx2_fid_ep *ep_priv; + +@@ -604,8 +592,11 @@ int psmx2_ep_open_internal(struct psmx2_fid_domain *domain_priv, + psmx2_ep_optimize_ops(ep_priv); + + PSMX2_EP_INIT_OP_CONTEXT(ep_priv); +- ++#if HAVE_PSM2_MQ_FP_MSG ++ if ((ep_cap & FI_TRIGGER) && trx_ctxt) ++#else + if ((ep_cap & (FI_RMA | FI_TRIGGER)) && trx_ctxt) ++#endif + trx_ctxt->am_progress = 1; + + *ep_out = ep_priv; +@@ -618,6 +609,7 @@ errout: + return err; + } + ++DIRECT_FN + int psmx2_ep_open(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep, void *context) + { +@@ -741,6 +733,7 @@ static struct fi_ops_ep psmx2_stx_ops = { + .tx_size_left = fi_no_tx_size_left, + }; + ++DIRECT_FN + int psmx2_stx_ctx(struct fid_domain *domain, struct fi_tx_attr *attr, + struct fid_stx **stx, void *context) + { +@@ -819,9 +812,9 @@ static int psmx2_sep_close(fid_t fid) + psmx2_ep_close_internal(sep->ctxts[i].ep); + } + +- psmx2_lock(&sep->domain->sep_lock, 1); ++ sep->domain->sep_lock_fn(&sep->domain->sep_lock, 1); + dlist_remove(&sep->entry); +- psmx2_unlock(&sep->domain->sep_lock, 1); ++ sep->domain->sep_unlock_fn(&sep->domain->sep_lock, 1); + + psmx2_domain_release(sep->domain); + free(sep); +@@ -846,7 +839,8 @@ static int psmx2_sep_control(fid_t fid, int command, void *arg) + return 0; + } + +-static int psmx2_sep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++DIRECT_FN ++STATIC int psmx2_sep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct psmx2_fid_sep *sep; + int i, err = 0; +@@ -862,7 +856,8 @@ static int psmx2_sep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + return err; + } + +-static int psmx2_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *attr, ++DIRECT_FN ++STATIC int psmx2_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *attr, + struct fid_ep **tx_ep, void *context) + { + struct psmx2_fid_sep *sep; +@@ -875,7 +870,8 @@ static int psmx2_tx_context(struct fid_ep *ep, int index, struct fi_tx_attr *att + return 0; + } + +-static int psmx2_rx_context(struct fid_ep *ep, int index, struct fi_rx_attr *attr, ++DIRECT_FN ++STATIC int psmx2_rx_context(struct fid_ep *ep, int index, struct fi_rx_attr *attr, + struct fid_ep **rx_ep, void *context) + { + struct psmx2_fid_sep *sep; +@@ -927,6 +923,7 @@ static struct fi_ops_ep psmx2_sep_ops = { + .tx_size_left = fi_no_tx_size_left, + }; + ++DIRECT_FN + int psmx2_sep_open(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **sep, void *context) + { +@@ -1031,9 +1028,9 @@ int psmx2_sep_open(struct fid_domain *domain, struct fi_info *info, + + sep_priv->id = ofi_atomic_inc32(&domain_priv->sep_cnt); + +- psmx2_lock(&domain_priv->sep_lock, 1); ++ domain_priv->sep_lock_fn(&domain_priv->sep_lock, 1); + dlist_insert_before(&sep_priv->entry, &domain_priv->sep_list); +- psmx2_unlock(&domain_priv->sep_lock, 1); ++ domain_priv->sep_unlock_fn(&domain_priv->sep_lock, 1); + + ep_name.epid = sep_priv->ctxts[0].trx_ctxt->psm2_epid; + ep_name.sep_id = sep_priv->id; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_init.c +index 3fa705dc5..d7c064f48 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_init.c +@@ -30,8 +30,8 @@ + * SOFTWARE. + */ + +-#include "psmx2.h" + #include "ofi_prov.h" ++#include "psmx2.h" + #include + #include + +@@ -53,7 +53,6 @@ struct psmx2_env psmx2_env = { + .num_devunits = 1, + .inject_size = 64, + .lock_level = 2, +- .lazy_conn = 0, + .disconnect = 0, + #if (PSMX2_TAG_LAYOUT == PSMX2_TAG_LAYOUT_RUNTIME) + .tag_layout = "auto", +@@ -70,7 +69,7 @@ int psmx2_tag_layout_locked = 0; + + static void psmx2_init_env(void) + { +- if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK")) ++ if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK") || getenv("PMIX_RANK")) + psmx2_env.name_server = 0; + + fi_param_get_bool(&psmx2_prov, "name_server", &psmx2_env.name_server); +@@ -82,7 +81,6 @@ static void psmx2_init_env(void) + fi_param_get_str(&psmx2_prov, "prog_affinity", &psmx2_env.prog_affinity); + fi_param_get_int(&psmx2_prov, "inject_size", &psmx2_env.inject_size); + fi_param_get_bool(&psmx2_prov, "lock_level", &psmx2_env.lock_level); +- fi_param_get_bool(&psmx2_prov, "lazy_conn", &psmx2_env.lazy_conn); + fi_param_get_bool(&psmx2_prov, "disconnect", &psmx2_env.disconnect); + #if (PSMX2_TAG_LAYOUT == PSMX2_TAG_LAYOUT_RUNTIME) + fi_param_get_str(&psmx2_prov, "tag_layout", &psmx2_env.tag_layout); +@@ -188,6 +186,7 @@ static int psmx2_init_lib(void) + { + int major, minor; + int ret = 0, err; ++ glob_t glob_buf; + + if (psmx2_lib_initialized) + return 0; +@@ -197,6 +196,24 @@ static int psmx2_init_lib(void) + if (psmx2_lib_initialized) + goto out; + ++ /* ++ * psm2_init() may wait for 15 seconds before return ++ * when /dev/hfi[0-9]_0 is not present. Check the existence of any hfi ++ * device interface first to avoid this delay. Note that the devices ++ * don't necessarily appear consecutively so we need to check all ++ * possible device names before returning "no device found" error. ++ * This also means if "/dev/hfi[0-9]_0" doesn't exist but other devices ++ * exist, we are still going to see the delay; but that's a rare case. ++ */ ++ if ((glob("/dev/hfi[0-9]_[0-9]", 0, NULL, &glob_buf) != 0) && ++ (glob("/dev/hfi[0-9]_[0-9][0-9]", GLOB_APPEND, NULL, &glob_buf) != 0)) { ++ FI_INFO(&psmx2_prov, FI_LOG_CORE, ++ "no hfi device is found.\n"); ++ ret = -FI_ENODEV; ++ goto out; ++ } ++ globfree(&glob_buf); ++ + /* turn on multi-ep feature, but don't overwrite existing setting */ + setenv("PSM2_MULTI_EP", "1", 0); + +@@ -230,6 +247,7 @@ out: + return ret; + } + ++#if !HAVE_PSM2_INFO_QUERY + #define PSMX2_SYSFS_PATH "/sys/class/infiniband/hfi1" + static int psmx2_read_sysfs_int(int unit, char *entry) + { +@@ -252,6 +270,7 @@ static int psmx2_unit_active(int unit) + { + return (4 == psmx2_read_sysfs_int(unit, "ports/1/state")); + } ++#endif + + #define PSMX2_MAX_UNITS 4 + static int psmx2_active_units[PSMX2_MAX_UNITS]; +@@ -266,6 +285,13 @@ static void psmx2_update_hfi_info(void) + int multirail = 0; + char *s; + ++#if HAVE_PSM2_INFO_QUERY ++ int unit_active; ++ int ret; ++ int tmp_cnt; ++ psm2_info_query_arg_t args[1]; ++#endif ++ + assert(psmx2_env.num_devunits <= PSMX2_MAX_UNITS); + + s = getenv("HFI_UNIT"); +@@ -278,6 +304,50 @@ static void psmx2_update_hfi_info(void) + + psmx2_num_active_units = 0; + for (i = 0; i < psmx2_env.num_devunits; i++) { ++#if HAVE_PSM2_INFO_QUERY ++ args[0].unit = i; ++ ret = psm2_info_query(PSM2_INFO_QUERY_UNIT_STATUS, &unit_active, 1, args); ++ if (ret != PSM2_OK) { ++ FI_WARN(&psmx2_prov, FI_LOG_CORE, ++ "Failed to check active state of HFI unit %d\n", ++ i); ++ continue; ++ } ++ ++ if (!unit_active) { ++ FI_WARN(&psmx2_prov, FI_LOG_CORE, ++ "HFI unit %d STATE = INACTIVE\n", ++ i); ++ continue; ++ } ++ ++ if (hfi_unit >=0 && i != hfi_unit) { ++ FI_INFO(&psmx2_prov, FI_LOG_CORE, ++ "hfi %d skipped: HFI_UNIT=%d\n", ++ i, hfi_unit); ++ continue; ++ } ++ ++ if (PSM2_OK != psm2_info_query(PSM2_INFO_QUERY_NUM_FREE_CONTEXTS, ++ &tmp_cnt, 1, args) || (tmp_cnt < 0)) ++ { ++ FI_WARN(&psmx2_prov, FI_LOG_CORE, ++ "Failed to read number of free contexts from HFI unit %d\n", ++ i); ++ continue; ++ } ++ nfreectxts += tmp_cnt; ++ ++ if (PSM2_OK != psm2_info_query(PSM2_INFO_QUERY_NUM_CONTEXTS, ++ &tmp_cnt, 1, args) || (tmp_cnt < 0)) ++ { ++ FI_WARN(&psmx2_prov, FI_LOG_CORE, ++ "Failed to read number of contexts from HFI unit %d\n", ++ i); ++ continue; ++ } ++ nctxts += tmp_cnt; ++#else + if (!psmx2_unit_active(i)) { + FI_INFO(&psmx2_prov, FI_LOG_CORE, + "hfi %d skipped: inactive\n", i); +@@ -293,6 +363,7 @@ static void psmx2_update_hfi_info(void) + + nctxts += psmx2_read_sysfs_int(i, "nctxts"); + nfreectxts += psmx2_read_sysfs_int(i, "nfreectxts"); ++#endif + psmx2_active_units[psmx2_num_active_units++] = i; + + if (multirail) +@@ -335,7 +406,6 @@ static int psmx2_getinfo(uint32_t api_version, const char *node, + size_t len; + void *addr; + uint32_t fmt; +- glob_t glob_buf; + uint32_t cnt = 0; + + FI_INFO(&psmx2_prov, FI_LOG_CORE,"\n"); +@@ -346,24 +416,12 @@ static int psmx2_getinfo(uint32_t api_version, const char *node, + if (psmx2_init_lib()) + goto err_out; + +- /* +- * psm2_ep_num_devunits() may wait for 15 seconds before return +- * when /dev/hfi1_0 is not present. Check the existence of any hfi1 +- * device interface first to avoid this delay. Note that the devices +- * don't necessarily appear consecutively so we need to check all +- * possible device names before returning "no device found" error. +- * This also means if "/dev/hfi1_0" doesn't exist but other devices +- * exist, we are still going to see the delay; but that's a rare case. +- */ +- if ((glob("/dev/hfi1_[0-9]", 0, NULL, &glob_buf) != 0) && +- (glob("/dev/hfi1_[0-9][0-9]", GLOB_APPEND, NULL, &glob_buf) != 0)) { +- FI_INFO(&psmx2_prov, FI_LOG_CORE, +- "no hfi1 device is found.\n"); +- goto err_out; +- } +- globfree(&glob_buf); +- +- if (psm2_ep_num_devunits(&cnt) || !cnt) { ++#if HAVE_PSM2_INFO_QUERY ++ if (psm2_info_query(PSM2_INFO_QUERY_NUM_UNITS, &cnt, 0, NULL) || !cnt) ++#else ++ if (psm2_ep_num_devunits(&cnt) || !cnt) ++#endif ++ { + FI_INFO(&psmx2_prov, FI_LOG_CORE, + "no PSM2 device is found.\n"); + goto err_out; +@@ -496,7 +554,7 @@ static void psmx2_fini(void) + struct fi_provider psmx2_prov = { + .name = PSMX2_PROV_NAME, + .version = PSMX2_VERSION, +- .fi_version = PSMX2_VERSION, ++ .fi_version = FI_VERSION(1, 7), + .getinfo = psmx2_getinfo, + .fabric = psmx2_fabric, + .cleanup = psmx2_fini +@@ -506,8 +564,9 @@ PROVIDER_INI + { + FI_INFO(&psmx2_prov, FI_LOG_CORE, "build options: HAVE_PSM2_SRC=%d, " + "HAVE_PSM2_AM_REGISTER_HANDLERS_2=%d, " ++ "HAVE_PSM2_MQ_FP_MSG=%d, " + "PSMX2_USE_REQ_CONTEXT=%d\n", HAVE_PSM2_SRC, +- HAVE_PSM2_AM_REGISTER_HANDLERS_2, PSMX2_USE_REQ_CONTEXT); ++ HAVE_PSM2_AM_REGISTER_HANDLERS_2, HAVE_PSM2_MQ_FP_MSG, PSMX2_USE_REQ_CONTEXT); + + fi_param_define(&psmx2_prov, "name_server", FI_PARAM_BOOL, + "Whether to turn on the name server or not " +@@ -545,9 +604,6 @@ PROVIDER_INI + fi_param_define(&psmx2_prov, "lock_level", FI_PARAM_INT, + "How internal locking is used. 0 means no locking. (default: 2)."); + +- fi_param_define(&psmx2_prov, "lazy_conn", FI_PARAM_BOOL, +- "Whether to use lazy connection or not (default: no)."); +- + fi_param_define(&psmx2_prov, "disconnect", FI_PARAM_BOOL, + "Whether to issue disconnect request when process ends (default: no)."); + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_mr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_mr.c +index 278b42eb8..750721a39 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_mr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_mr.c +@@ -38,14 +38,14 @@ struct psmx2_fid_mr *psmx2_mr_get(struct psmx2_fid_domain *domain, + RbtIterator it; + struct psmx2_fid_mr *mr = NULL; + +- psmx2_lock(&domain->mr_lock, 1); ++ domain->mr_lock_fn(&domain->mr_lock, 1); + it = rbtFind(domain->mr_map, (void *)key); + if (!it) + goto exit; + + rbtKeyValue(domain->mr_map, it, (void **)&key, (void **)&mr); + exit: +- psmx2_unlock(&domain->mr_lock, 1); ++ domain->mr_unlock_fn(&domain->mr_lock, 1); + return mr; + } + +@@ -54,11 +54,11 @@ static inline void psmx2_mr_release_key(struct psmx2_fid_domain *domain, + { + RbtIterator it; + +- psmx2_lock(&domain->mr_lock, 1); ++ domain->mr_lock_fn(&domain->mr_lock, 1); + it = rbtFind(domain->mr_map, (void *)key); + if (it) + rbtErase(domain->mr_map, it); +- psmx2_unlock(&domain->mr_lock, 1); ++ domain->mr_unlock_fn(&domain->mr_lock, 1); + } + + static int psmx2_mr_reserve_key(struct psmx2_fid_domain *domain, +@@ -71,7 +71,7 @@ static int psmx2_mr_reserve_key(struct psmx2_fid_domain *domain, + int try_count; + int err = -FI_ENOKEY; + +- psmx2_lock(&domain->mr_lock, 1); ++ domain->mr_lock_fn(&domain->mr_lock, 1); + + if (domain->mr_mode == FI_MR_BASIC) { + key = domain->mr_reserved_key; +@@ -93,7 +93,7 @@ static int psmx2_mr_reserve_key(struct psmx2_fid_domain *domain, + } + } + +- psmx2_unlock(&domain->mr_lock, 1); ++ domain->mr_unlock_fn(&domain->mr_lock, 1); + + return err; + } +@@ -132,7 +132,8 @@ static int psmx2_mr_close(fid_t fid) + return 0; + } + +-static int psmx2_mr_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++DIRECT_FN ++STATIC int psmx2_mr_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct psmx2_fid_mr *mr; + struct psmx2_fid_ep *ep; +@@ -170,7 +171,8 @@ static int psmx2_mr_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + return 0; + } + +-static int psmx2_mr_control(fid_t fid, int command, void *arg) ++DIRECT_FN ++STATIC int psmx2_mr_control(fid_t fid, int command, void *arg) + { + struct psmx2_fid_mr *mr; + struct fi_mr_raw_attr *attr; +@@ -272,7 +274,8 @@ static void psmx2_mr_normalize_iov(struct iovec *iov, size_t *count) + *count = i; + } + +-static int psmx2_mr_reg(struct fid *fid, const void *buf, size_t len, ++DIRECT_FN ++STATIC int psmx2_mr_reg(struct fid *fid, const void *buf, size_t len, + uint64_t access, uint64_t offset, uint64_t requested_key, + uint64_t flags, struct fid_mr **mr, void *context) + { +@@ -318,7 +321,8 @@ static int psmx2_mr_reg(struct fid *fid, const void *buf, size_t len, + return 0; + } + +-static int psmx2_mr_regv(struct fid *fid, ++DIRECT_FN ++STATIC int psmx2_mr_regv(struct fid *fid, + const struct iovec *iov, size_t count, + uint64_t access, uint64_t offset, + uint64_t requested_key, uint64_t flags, +@@ -372,7 +376,8 @@ static int psmx2_mr_regv(struct fid *fid, + return 0; + } + +-static int psmx2_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, ++DIRECT_FN ++STATIC int psmx2_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, + uint64_t flags, struct fid_mr **mr) + { + struct fid_domain *domain; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_msg.c +index 4e3383785..bd50f479b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_msg.c +@@ -44,7 +44,6 @@ ssize_t psmx2_recv_generic(struct fid_ep *ep, void *buf, size_t len, + psm2_mq_tag_t psm2_tag, psm2_tagsel; + struct fi_context *fi_context; + int recv_flag = 0; +- size_t idx; + int err; + int enable_completion; + +@@ -56,17 +55,8 @@ ssize_t psmx2_recv_generic(struct fid_ep *ep, void *buf, size_t len, + + if ((ep_priv->caps & FI_DIRECTED_RECV) && src_addr != FI_ADDR_UNSPEC) { + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->rx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->rx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr); + } else { + psm2_epaddr = 0; + } +@@ -136,7 +126,8 @@ ssize_t psmx2_recv_generic(struct fid_ep *ep, void *buf, size_t len, + return 0; + } + +-static ssize_t psmx2_recv(struct fid_ep *ep, void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_recv(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, void *context) + { + struct psmx2_fid_ep *ep_priv; +@@ -147,7 +138,8 @@ static ssize_t psmx2_recv(struct fid_ep *ep, void *buf, size_t len, + ep_priv->rx_flags); + } + +-static ssize_t psmx2_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, ++DIRECT_FN ++STATIC ssize_t psmx2_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, + uint64_t flags) + { + void *buf; +@@ -170,7 +162,8 @@ static ssize_t psmx2_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, + msg->addr, msg->context, flags); + } + +-static ssize_t psmx2_recvv(struct fid_ep *ep, const struct iovec *iov, ++DIRECT_FN ++STATIC ssize_t psmx2_recvv(struct fid_ep *ep, const struct iovec *iov, + void **desc, size_t count, fi_addr_t src_addr, + void *context) + { +@@ -204,7 +197,6 @@ ssize_t psmx2_send_generic(struct fid_ep *ep, const void *buf, size_t len, + struct fi_context * fi_context; + int send_flag = 0; + int err; +- size_t idx; + int no_completion = 0; + struct psmx2_cq_event *event; + int have_data = (flags & FI_REMOTE_CQ_DATA) > 0; +@@ -216,17 +208,8 @@ ssize_t psmx2_send_generic(struct fid_ep *ep, const void *buf, size_t len, + context, flags, data); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + PSMX2_SET_TAG(psm2_tag, 0, data, PSMX2_TYPE_MSG | PSMX2_IMM_BIT_SET(have_data)); + +@@ -301,7 +284,6 @@ ssize_t psmx2_sendv_generic(struct fid_ep *ep, const struct iovec *iov, + struct fi_context * fi_context; + int send_flag = 0; + int err; +- size_t idx; + int no_completion = 0; + struct psmx2_cq_event *event; + size_t real_count; +@@ -337,8 +319,6 @@ ssize_t psmx2_sendv_generic(struct fid_ep *ep, const struct iovec *iov, + if (!req) + return -FI_ENOMEM; + +- PSMX2_STATUS_INIT(req->status); +- + if (total_len <= PSMX2_IOV_BUF_SIZE) { + req->iov_protocol = PSMX2_IOV_PROTO_PACK; + p = req->buf; +@@ -370,19 +350,8 @@ ssize_t psmx2_sendv_generic(struct fid_ep *ep, const struct iovec *iov, + } + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) { +- free(req); +- return err; +- } +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + if (flags & FI_REMOTE_CQ_DATA) + msg_flags |= PSMX2_IMM_BIT; +@@ -564,7 +533,8 @@ int psmx2_handle_sendv_req(struct psmx2_fid_ep *ep, + return 0; + } + +-static ssize_t psmx2_send(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_send(struct fid_ep *ep, const void *buf, size_t len, + void *desc, fi_addr_t dest_addr, void *context) + { + struct psmx2_fid_ep *ep_priv; +@@ -575,7 +545,8 @@ static ssize_t psmx2_send(struct fid_ep *ep, const void *buf, size_t len, + ep_priv->tx_flags, 0); + } + +-static ssize_t psmx2_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, ++DIRECT_FN ++STATIC ssize_t psmx2_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, + uint64_t flags) + { + void *buf; +@@ -604,7 +575,8 @@ static ssize_t psmx2_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, + msg->data); + } + +-static ssize_t psmx2_sendv(struct fid_ep *ep, const struct iovec *iov, ++DIRECT_FN ++STATIC ssize_t psmx2_sendv(struct fid_ep *ep, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + void *context) + { +@@ -632,7 +604,8 @@ static ssize_t psmx2_sendv(struct fid_ep *ep, const struct iovec *iov, + dest_addr, context); + } + +-static ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, + fi_addr_t dest_addr) + { + struct psmx2_fid_ep *ep_priv; +@@ -644,7 +617,8 @@ static ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, + 0); + } + +-static ssize_t psmx2_senddata(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_senddata(struct fid_ep *ep, const void *buf, size_t len, + void *desc, uint64_t data, fi_addr_t dest_addr, + void *context) + { +@@ -656,7 +630,8 @@ static ssize_t psmx2_senddata(struct fid_ep *ep, const void *buf, size_t len, + ep_priv->tx_flags | FI_REMOTE_CQ_DATA, data); + } + +-static ssize_t psmx2_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_injectdata(struct fid_ep *ep, const void *buf, size_t len, + uint64_t data, fi_addr_t dest_addr) + { + struct psmx2_fid_ep *ep_priv; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_rma.c +index 0e80fcd7f..8e6a0540d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_rma.c +@@ -33,13 +33,15 @@ + #include "psmx2.h" + #include "psmx2_trigger.h" + ++#if !HAVE_PSM2_MQ_FP_MSG + static inline void psmx2_am_enqueue_rma(struct psmx2_trx_ctxt *trx_ctxt, + struct psmx2_am_request *req) + { +- psmx2_lock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_lock_fn(&trx_ctxt->rma_queue.lock, 2); + slist_insert_tail(&req->list_entry, &trx_ctxt->rma_queue.list); +- psmx2_unlock(&trx_ctxt->rma_queue.lock, 2); ++ trx_ctxt->domain->rma_queue_unlock_fn(&trx_ctxt->rma_queue.lock, 2); + } ++#endif + + static inline void psmx2_iov_copy(struct iovec *iov, size_t count, + size_t offset, const void *src, +@@ -116,6 +118,11 @@ int psmx2_am_rma_handler(psm2_am_token_t token, psm2_amarg_t *args, + psm2_epaddr_t epaddr; + struct psmx2_trx_ctxt *rx; + ++#if HAVE_PSM2_MQ_FP_MSG ++ psm2_mq_req_t psm2_req; ++ psm2_mq_tag_t psm2_tag, psm2_tagsel; ++#endif ++ + psm2_am_get_source(token, &epaddr); + cmd = PSMX2_AM_GET_OP(args[0].u32w0); + eom = args[0].u32w0 & PSMX2_AM_EOM; +@@ -210,7 +217,28 @@ int psmx2_am_rma_handler(psm2_am_token_t token, psm2_amarg_t *args, + (has_data ? FI_REMOTE_CQ_DATA : 0), + PSMX2_CTXT_TYPE(&req->fi_context) = PSMX2_REMOTE_WRITE_CONTEXT; + PSMX2_CTXT_USER(&req->fi_context) = mr; ++#if HAVE_PSM2_MQ_FP_MSG ++ PSMX2_SET_TAG(psm2_tag, (uint64_t)req->write.context, 0, ++ PSMX2_RMA_TYPE_WRITE); ++ PSMX2_SET_MASK(psm2_tagsel, PSMX2_MATCH_ALL, PSMX2_RMA_TYPE_MASK); ++ op_error = psm2_mq_fp_msg(rx->psm2_ep, rx->psm2_mq, ++ (psm2_epaddr_t)epaddr, ++ &psm2_tag, &psm2_tagsel, 0, ++ (void *)rma_addr, rma_len, ++ (void *)&req->fi_context, PSM2_MQ_IRECV_FP, &psm2_req); ++ if (op_error) { ++ rep_args[0].u32w0 = PSMX2_AM_REP_WRITE | eom; ++ rep_args[0].u32w1 = op_error; ++ rep_args[1].u64 = args[1].u64; ++ err = psm2_am_reply_short(token, PSMX2_AM_RMA_HANDLER, ++ rep_args, 2, NULL, 0, 0, ++ NULL, NULL ); ++ psmx2_am_request_free(rx, req); ++ break; ++ } ++#else + psmx2_am_enqueue_rma(rx, req); ++#endif + } + break; + +@@ -282,7 +310,28 @@ int psmx2_am_rma_handler(psm2_am_token_t token, psm2_amarg_t *args, + req->read.peer_addr = (void *)epaddr; + PSMX2_CTXT_TYPE(&req->fi_context) = PSMX2_REMOTE_READ_CONTEXT; + PSMX2_CTXT_USER(&req->fi_context) = mr; ++#if HAVE_PSM2_MQ_FP_MSG ++ PSMX2_SET_TAG(psm2_tag, (uint64_t)req->read.context, 0, ++ PSMX2_RMA_TYPE_READ); ++ op_error = psm2_mq_fp_msg(rx->psm2_ep, rx->psm2_mq, ++ (psm2_epaddr_t)req->read.peer_addr, ++ &psm2_tag, 0, 0, ++ (void *)req->read.addr, req->read.len, ++ (void *)&req->fi_context, PSM2_MQ_ISEND_FP, &psm2_req); ++ if (op_error) { ++ rep_args[0].u32w0 = PSMX2_AM_REP_READ | eom; ++ rep_args[0].u32w1 = op_error; ++ rep_args[1].u64 = args[1].u64; ++ rep_args[2].u64 = 0; ++ err = psm2_am_reply_short(token, PSMX2_AM_RMA_HANDLER, ++ rep_args, 3, NULL, 0, 0, ++ NULL, NULL ); ++ psmx2_am_request_free(rx, req); ++ break; ++ } ++#else + psmx2_am_enqueue_rma(rx, req); ++#endif + } + break; + +@@ -541,6 +590,7 @@ void psmx2_am_ack_rma(struct psmx2_am_request *req) + PSM2_AM_FLAG_NOREPLY, NULL, NULL); + } + ++#if !HAVE_PSM2_MQ_FP_MSG + int psmx2_am_process_rma(struct psmx2_trx_ctxt *trx_ctxt, + struct psmx2_am_request *req) + { +@@ -569,6 +619,7 @@ int psmx2_am_process_rma(struct psmx2_trx_ctxt *trx_ctxt, + + return psmx2_errno(err); + } ++#endif + + ssize_t psmx2_read_generic(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, +@@ -585,8 +636,6 @@ ssize_t psmx2_read_generic(struct fid_ep *ep, void *buf, size_t len, + psm2_epaddr_t psm2_epaddr; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag, psm2_tagsel; +- size_t idx; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -597,18 +646,8 @@ ssize_t psmx2_read_generic(struct fid_ep *ep, void *buf, size_t len, + assert(buf); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(src_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, src_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) +@@ -699,11 +738,9 @@ ssize_t psmx2_readv_generic(struct fid_ep *ep, const struct iovec *iov, + psm2_epaddr_t psm2_epaddr; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag, psm2_tagsel; +- size_t idx; + size_t total_len, long_len = 0, short_len; + void *long_buf = NULL; + int i; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -712,18 +749,8 @@ ssize_t psmx2_readv_generic(struct fid_ep *ep, const struct iovec *iov, + addr, key, context, flags); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(src_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, src_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) +@@ -829,7 +856,8 @@ ssize_t psmx2_readv_generic(struct fid_ep *ep, const struct iovec *iov, + return 0; + } + +-static ssize_t psmx2_read(struct fid_ep *ep, void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_read(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, + uint64_t addr, uint64_t key, void *context) + { +@@ -841,7 +869,8 @@ static ssize_t psmx2_read(struct fid_ep *ep, void *buf, size_t len, + key, context, ep_priv->tx_flags); + } + +-static ssize_t psmx2_readmsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_readmsg(struct fid_ep *ep, + const struct fi_msg_rma *msg, + uint64_t flags) + { +@@ -867,7 +896,8 @@ static ssize_t psmx2_readmsg(struct fid_ep *ep, + flags); + } + +-static ssize_t psmx2_readv(struct fid_ep *ep, const struct iovec *iov, ++DIRECT_FN ++STATIC ssize_t psmx2_readv(struct fid_ep *ep, const struct iovec *iov, + void **desc, size_t count, fi_addr_t src_addr, + uint64_t addr, uint64_t key, void *context) + { +@@ -903,10 +933,8 @@ ssize_t psmx2_write_generic(struct fid_ep *ep, const void *buf, size_t len, + psm2_epaddr_t psm2_epaddr; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag; +- size_t idx; + void *psm2_context; + int no_event; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -918,18 +946,8 @@ ssize_t psmx2_write_generic(struct fid_ep *ep, const void *buf, size_t len, + assert(buf); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) +@@ -1060,13 +1078,11 @@ ssize_t psmx2_writev_generic(struct fid_ep *ep, const struct iovec *iov, + psm2_epaddr_t psm2_epaddr; + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag; +- size_t idx; + void *psm2_context; + int no_event; + size_t total_len, len, len_sent; + uint8_t *buf, *p; + int i; +- int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + +@@ -1076,18 +1092,8 @@ ssize_t psmx2_writev_generic(struct fid_ep *ep, const struct iovec *iov, + context, flags, data); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- assert(dest_addr); +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + epaddr_context = psm2_epaddr_getctxt((void *)psm2_epaddr); + if (epaddr_context->epid == ep_priv->tx->psm2_epid) +@@ -1265,7 +1271,8 @@ ssize_t psmx2_writev_generic(struct fid_ep *ep, const struct iovec *iov, + return 0; + } + +-static ssize_t psmx2_write(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_write(struct fid_ep *ep, const void *buf, size_t len, + void *desc, fi_addr_t dest_addr, uint64_t addr, + uint64_t key, void *context) + { +@@ -1277,7 +1284,8 @@ static ssize_t psmx2_write(struct fid_ep *ep, const void *buf, size_t len, + key, context, ep_priv->tx_flags, 0); + } + +-static ssize_t psmx2_writemsg(struct fid_ep *ep, ++DIRECT_FN ++STATIC ssize_t psmx2_writemsg(struct fid_ep *ep, + const struct fi_msg_rma *msg, + uint64_t flags) + { +@@ -1301,7 +1309,8 @@ static ssize_t psmx2_writemsg(struct fid_ep *ep, + msg->context, flags, msg->data); + } + +-static ssize_t psmx2_writev(struct fid_ep *ep, const struct iovec *iov, ++DIRECT_FN ++STATIC ssize_t psmx2_writev(struct fid_ep *ep, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + uint64_t addr, uint64_t key, void *context) + { +@@ -1321,8 +1330,9 @@ static ssize_t psmx2_writev(struct fid_ep *ep, const struct iovec *iov, + context, ep_priv->tx_flags, 0); + } + +-static ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++DIRECT_FN ++STATIC ssize_t psmx2_inject_write(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) + { + struct psmx2_fid_ep *ep_priv; + +@@ -1333,7 +1343,8 @@ static ssize_t psmx2_inject(struct fid_ep *ep, const void *buf, size_t len, + 0); + } + +-static ssize_t psmx2_writedata(struct fid_ep *ep, const void *buf, size_t len, ++DIRECT_FN ++STATIC ssize_t psmx2_writedata(struct fid_ep *ep, const void *buf, size_t len, + void *desc, uint64_t data, fi_addr_t dest_addr, + uint64_t addr, uint64_t key, void *context) + { +@@ -1346,9 +1357,10 @@ static ssize_t psmx2_writedata(struct fid_ep *ep, const void *buf, size_t len, + data); + } + +-static ssize_t psmx2_injectdata(struct fid_ep *ep, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) ++DIRECT_FN ++STATIC ssize_t psmx2_inject_writedata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) + { + struct psmx2_fid_ep *ep_priv; + +@@ -1367,8 +1379,8 @@ struct fi_ops_rma psmx2_rma_ops = { + .write = psmx2_write, + .writev = psmx2_writev, + .writemsg = psmx2_writemsg, +- .inject = psmx2_inject, ++ .inject = psmx2_inject_write, + .writedata = psmx2_writedata, +- .injectdata = psmx2_injectdata, ++ .injectdata = psmx2_inject_writedata, + }; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_tagged.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_tagged.c +index ded4ddbf1..dee42c4f6 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_tagged.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_tagged.c +@@ -46,7 +46,6 @@ static ssize_t psmx2_tagged_peek_generic(struct fid_ep *ep, + psm2_mq_req_t req; + psm2_mq_status2_t psm2_status; + psm2_mq_tag_t psm2_tag, psm2_tagsel; +- size_t idx; + uint64_t data; + int err; + +@@ -54,17 +53,8 @@ static ssize_t psmx2_tagged_peek_generic(struct fid_ep *ep, + + if ((ep_priv->caps & FI_DIRECTED_RECV) && src_addr != FI_ADDR_UNSPEC) { + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->rx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->rx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr); + } else { + psm2_epaddr = 0; + } +@@ -115,7 +105,7 @@ static ssize_t psmx2_tagged_peek_generic(struct fid_ep *ep, + return -FI_ENOMEM; + + event->source_is_valid = 1; +- event->source = PSMX2_EP_TO_ADDR(psm2_status.msg_peer); ++ event->source = psm2_status.msg_peer; + event->source_av = ep_priv->av; + psmx2_cq_enqueue_event(ep_priv->recv_cq, event); + } +@@ -159,7 +149,6 @@ ssize_t psmx2_tagged_recv_generic(struct fid_ep *ep, void *buf, + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag, psm2_tagsel; + struct fi_context *fi_context; +- size_t idx; + int err; + int enable_completion; + +@@ -208,7 +197,7 @@ ssize_t psmx2_tagged_recv_generic(struct fid_ep *ep, void *buf, + return -FI_ENOMEM; + + event->source_is_valid = 1; +- event->source = PSMX2_EP_TO_ADDR(psm2_status.msg_peer); ++ event->source = psm2_status.msg_peer; + event->source_av = ep_priv->av; + psmx2_cq_enqueue_event(ep_priv->recv_cq, event); + } +@@ -255,17 +244,8 @@ ssize_t psmx2_tagged_recv_generic(struct fid_ep *ep, void *buf, + + if ((ep_priv->caps & FI_DIRECTED_RECV) && src_addr != FI_ADDR_UNSPEC) { + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->rx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->rx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr); + } else { + psm2_epaddr = 0; + } +@@ -302,7 +282,6 @@ psmx2_tagged_recv_specialized(struct fid_ep *ep, void *buf, size_t len, + uint64_t tag, uint64_t ignore, + void *context, + int enable_completion, +- enum fi_av_type av_type, + int directed_receive) + { + struct psmx2_fid_ep *ep_priv; +@@ -311,7 +290,6 @@ psmx2_tagged_recv_specialized(struct fid_ep *ep, void *buf, size_t len, + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag, psm2_tagsel; + struct fi_context *fi_context; +- size_t idx; + int err; + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); +@@ -334,24 +312,8 @@ psmx2_tagged_recv_specialized(struct fid_ep *ep, void *buf, size_t len, + + if (directed_receive && src_addr != FI_ADDR_UNSPEC) { + av = ep_priv->av; +- if (av_type == FI_AV_MAP) { +- if (av && PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(src_addr); +- } +- } else { /* FI_AV_TABLE */ +- assert(av != NULL); +- if (PSMX2_SEP_ADDR_TEST(src_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->rx, src_addr); +- } else { +- idx = (size_t)src_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->rx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->rx->id].epaddrs[idx]; +- } +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr); + } else { + psm2_epaddr = 0; + } +@@ -381,96 +343,50 @@ psmx2_tagged_recv_specialized(struct fid_ep *ep, void *buf, size_t len, + return 0; + } + +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_MAP, FI_DIRECTED_RECEIVE not set */ +-static ssize_t +-psmx2_tagged_recv_no_flag_av_map_undirected(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) +-{ +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 1, FI_AV_MAP, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_TABLE, FI_DIRECTED_RECEIVE not set */ +-static ssize_t +-psmx2_tagged_recv_no_flag_av_table_undirected(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) +-{ +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 1, FI_AV_TABLE, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_MAP, FI_DIRECTED_RECEIVE not set */ +-static ssize_t +-psmx2_tagged_recv_no_event_av_map_undirected(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) +-{ +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 0, FI_AV_MAP, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_TABLE, FI_DIRECTED_RECEIVE not set */ +-static ssize_t +-psmx2_tagged_recv_no_event_av_table_undirected(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) +-{ +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 0, FI_AV_TABLE, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_MAP, FI_DIRECTED_RECEIVE set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE not set */ + static ssize_t +-psmx2_tagged_recv_no_flag_av_map_directed(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_flag_undirected(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 1, FI_AV_MAP, 1); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 1, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_TABLE, FI_DIRECTED_RECEIVE set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE not set */ + static ssize_t +-psmx2_tagged_recv_no_flag_av_table_directed(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_event_undirected(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 1, FI_AV_TABLE, 1); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_MAP, FI_DIRECTED_RECEIVE set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE set */ + static ssize_t +-psmx2_tagged_recv_no_event_av_map_directed(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_flag_directed(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 0, FI_AV_MAP, 1); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 1, 1); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_TABLE, FI_DIRECTED_RECEIVE set */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE set */ + static ssize_t +-psmx2_tagged_recv_no_event_av_table_directed(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, +- void *context) ++psmx2_tagged_recv_no_event_directed(struct fid_ep *ep, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, ++ void *context) + { +- return psmx2_tagged_recv_specialized(ep, buf, len, desc, +- src_addr, tag, ignore, context, 0, FI_AV_TABLE, 1); ++ return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, ++ tag, ignore, context, 0, 1); + } + +- + static ssize_t psmx2_tagged_recv(struct fid_ep *ep, void *buf, size_t len, + void *desc, fi_addr_t src_addr, uint64_t tag, + uint64_t ignore, void *context) +@@ -533,16 +449,10 @@ psmx2_tagged_recvv##suffix(struct fid_ep *ep, const struct iovec *iov, \ + } + + PSMX2_TAGGED_RECVV_FUNC() +-PSMX2_TAGGED_RECVV_FUNC(_no_flag_av_map_directed) +-PSMX2_TAGGED_RECVV_FUNC(_no_flag_av_table_directed) +-PSMX2_TAGGED_RECVV_FUNC(_no_event_av_map_directed) +-PSMX2_TAGGED_RECVV_FUNC(_no_event_av_table_directed) +-PSMX2_TAGGED_RECVV_FUNC(_no_flag_av_map_undirected) +-PSMX2_TAGGED_RECVV_FUNC(_no_flag_av_table_undirected) +-PSMX2_TAGGED_RECVV_FUNC(_no_event_av_map_undirected) +-PSMX2_TAGGED_RECVV_FUNC(_no_event_av_table_undirected) +- +- ++PSMX2_TAGGED_RECVV_FUNC(_no_flag_directed) ++PSMX2_TAGGED_RECVV_FUNC(_no_event_directed) ++PSMX2_TAGGED_RECVV_FUNC(_no_flag_undirected) ++PSMX2_TAGGED_RECVV_FUNC(_no_event_undirected) + + ssize_t psmx2_tagged_send_generic(struct fid_ep *ep, + const void *buf, size_t len, +@@ -556,7 +466,6 @@ ssize_t psmx2_tagged_send_generic(struct fid_ep *ep, + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag; + struct fi_context *fi_context; +- size_t idx; + int err; + int no_completion = 0; + struct psmx2_cq_event *event; +@@ -572,17 +481,8 @@ ssize_t psmx2_tagged_send_generic(struct fid_ep *ep, + flags, data); + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + PSMX2_SET_TAG(psm2_tag, tag, (uint32_t)data, + PSMX2_TYPE_TAGGED | PSMX2_IMM_BIT_SET(have_data)); +@@ -651,7 +551,6 @@ psmx2_tagged_send_specialized(struct fid_ep *ep, const void *buf, + fi_addr_t dest_addr, uint64_t tag, + void *context, + int enable_completion, +- enum fi_av_type av_type, + int has_data, uint64_t data) + { + struct psmx2_fid_ep *ep_priv; +@@ -660,30 +559,15 @@ psmx2_tagged_send_specialized(struct fid_ep *ep, const void *buf, + psm2_mq_req_t psm2_req; + psm2_mq_tag_t psm2_tag; + struct fi_context *fi_context; +- size_t idx; + int err; + + assert((tag & ~PSMX2_TAG_MASK) == 0); + + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + av = ep_priv->av; ++ assert(av); + +- if (av_type == FI_AV_MAP) { +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- else +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } else { /* FI_AV_TABLE */ +- if (PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } +- } ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + if (has_data) + PSMX2_SET_TAG(psm2_tag, tag, data, PSMX2_TYPE_TAGGED | PSMX2_IMM_BIT); +@@ -712,107 +596,56 @@ psmx2_tagged_send_specialized(struct fid_ep *ep, const void *buf, + return 0; + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_MAP */ +-static ssize_t +-psmx2_tagged_send_no_flag_av_map(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) +-{ +- return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, +- tag, context, 1, FI_AV_MAP, 0, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_TABLE */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set */ + static ssize_t +-psmx2_tagged_send_no_flag_av_table(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) +-{ +- return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 1, FI_AV_TABLE, 0, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_MAP */ +-static ssize_t +-psmx2_tagged_send_no_event_av_map(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) +-{ +- return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 0, FI_AV_MAP, 0, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_TABLE */ +-static ssize_t +-psmx2_tagged_send_no_event_av_table(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) +-{ +- return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 0, FI_AV_TABLE, 0, 0); +-} +- +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_MAP */ +-static ssize_t +-psmx2_tagged_senddata_no_flag_av_map(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_send_no_flag(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, ++ void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 1, FI_AV_MAP, 1, data); ++ context, 1, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_AV_TABLE */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set */ + static ssize_t +-psmx2_tagged_senddata_no_flag_av_table(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_send_no_event(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, ++ void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 1, FI_AV_TABLE, 1, data); ++ context, 0, 0, 0); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_MAP */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION not set */ + static ssize_t +-psmx2_tagged_senddata_no_event_av_map(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_senddata_no_flag(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 0, FI_AV_MAP, 1, data); ++ context, 1, 1, data); + } + +-/* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_AV_TABLE */ ++/* op_flags=0, FI_SELECTIVE_COMPLETION set */ + static ssize_t +-psmx2_tagged_senddata_no_event_av_table(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) ++psmx2_tagged_senddata_no_event(struct fid_ep *ep, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) + { + return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, +- context, 0, FI_AV_TABLE, 1, data); ++ context, 0, 1, data); + } + +-/* op_flags=0, FI_AV_MAP */ + __attribute__((always_inline)) + static inline ssize_t + psmx2_tagged_inject_specialized(struct fid_ep *ep, const void *buf, + size_t len, fi_addr_t dest_addr, +- uint64_t tag, enum fi_av_type av_type, +- int has_data, uint64_t data) ++ uint64_t tag, int has_data, uint64_t data) + { + struct psmx2_fid_ep *ep_priv; + struct psmx2_fid_av *av; + psm2_epaddr_t psm2_epaddr; + psm2_mq_tag_t psm2_tag; +- size_t idx; + int err; + + assert((tag & ~PSMX2_TAG_MASK) == 0); +@@ -823,23 +656,9 @@ psmx2_tagged_inject_specialized(struct fid_ep *ep, const void *buf, + ep_priv = container_of(ep, struct psmx2_fid_ep, ep); + + av = ep_priv->av; ++ assert(av); + +- if (av_type == FI_AV_MAP) { +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- else +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } else { /* FI_AV_TABLE */ +- if (PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) +- return err; +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } +- } ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + if (has_data) + PSMX2_SET_TAG(psm2_tag, tag, data, PSMX2_TYPE_TAGGED | PSMX2_IMM_BIT); +@@ -858,44 +677,22 @@ psmx2_tagged_inject_specialized(struct fid_ep *ep, const void *buf, + return 0; + } + +-/* op_flags=0, FI_AV_MAP */ +-static ssize_t +-psmx2_tagged_inject_no_flag_av_map(struct fid_ep *ep, const void *buf, +- size_t len, fi_addr_t dest_addr, +- uint64_t tag) +-{ +- return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, +- FI_AV_MAP, 0, 0); +-} +- +-/* op_flags=0, FI_AV_TABLE */ +-static ssize_t +-psmx2_tagged_inject_no_flag_av_table(struct fid_ep *ep, const void *buf, +- size_t len, fi_addr_t dest_addr, +- uint64_t tag) +-{ +- return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, +- FI_AV_TABLE, 0, 0); +-} +- +-/* op_flags=0, FI_AV_MAP */ ++/* op_flags=0 */ + static ssize_t +-psmx2_tagged_injectdata_no_flag_av_map(struct fid_ep *ep, const void *buf, +- size_t len, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag) ++psmx2_tagged_inject_no_flag(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) + { + return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, +- FI_AV_MAP, 1, data); ++ 0, 0); + } + +-/* op_flags=0, FI_AV_TABLE */ ++/* op_flags=0 */ + static ssize_t +-psmx2_tagged_injectdata_no_flag_av_table(struct fid_ep *ep, const void *buf, +- size_t len, uint64_t data, +- fi_addr_t dest_addr, uint64_t tag) ++psmx2_tagged_injectdata_no_flag(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) + { + return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, +- FI_AV_TABLE, 1, data); ++ 1, data); + } + + ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, +@@ -912,7 +709,6 @@ ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, + struct fi_context * fi_context; + int send_flag = 0; + int err; +- size_t idx; + int no_completion = 0; + struct psmx2_cq_event *event; + size_t real_count; +@@ -952,8 +748,6 @@ ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, + if (!req) + return -FI_ENOMEM; + +- PSMX2_STATUS_INIT(req->status); +- + if (total_len <= PSMX2_IOV_BUF_SIZE) { + req->iov_protocol = PSMX2_IOV_PROTO_PACK; + p = req->buf; +@@ -985,19 +779,8 @@ ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, + } + + av = ep_priv->av; +- if (av && PSMX2_SEP_ADDR_TEST(dest_addr)) { +- psm2_epaddr = psmx2_av_translate_sep(av, ep_priv->tx, dest_addr); +- } else if (av && av->type == FI_AV_TABLE) { +- idx = (size_t)dest_addr; +- if ((err = psmx2_av_check_table_idx(av, ep_priv->tx, idx))) { +- free(req); +- return err; +- } +- +- psm2_epaddr = av->tables[ep_priv->tx->id].epaddrs[idx]; +- } else { +- psm2_epaddr = PSMX2_ADDR_TO_EP(dest_addr); +- } ++ assert(av); ++ psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr); + + PSMX2_SET_TAG(psm2_tag, tag, (uint32_t)data, + msg_flags | PSMX2_IMM_BIT_SET(have_data)); +@@ -1173,10 +956,8 @@ psmx2_tagged_sendv##suffix(struct fid_ep *ep, const struct iovec *iov, \ + } + + PSMX2_TAGGED_SENDV_FUNC() +-PSMX2_TAGGED_SENDV_FUNC(_no_flag_av_map) +-PSMX2_TAGGED_SENDV_FUNC(_no_flag_av_table) +-PSMX2_TAGGED_SENDV_FUNC(_no_event_av_map) +-PSMX2_TAGGED_SENDV_FUNC(_no_event_av_table) ++PSMX2_TAGGED_SENDV_FUNC(_no_flag) ++PSMX2_TAGGED_SENDV_FUNC(_no_event) + + static ssize_t psmx2_tagged_inject(struct fid_ep *ep, + const void *buf, size_t len, +@@ -1222,20 +1003,12 @@ struct fi_ops_tagged psmx2_tagged_ops##suffix = { \ + }; + + PSMX2_TAGGED_OPS(,,,) +-PSMX2_TAGGED_OPS(_no_flag_av_map_directed, _no_flag_av_map, _no_flag_av_map_directed, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_flag_av_table_directed, _no_flag_av_table, _no_flag_av_table_directed, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_event_av_map_directed, _no_event_av_map, _no_event_av_map_directed, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_event_av_table_directed, _no_event_av_table, _no_event_av_table_directed, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_send_event_av_map_directed, _no_event_av_map, _no_flag_av_map_directed, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_send_event_av_table_directed, _no_event_av_table, _no_flag_av_table_directed, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_recv_event_av_map_directed, _no_flag_av_map, _no_event_av_map_directed, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_recv_event_av_table_directed, _no_flag_av_table, _no_event_av_table_directed, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_flag_av_map_undirected, _no_flag_av_map, _no_flag_av_map_undirected, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_flag_av_table_undirected, _no_flag_av_table, _no_flag_av_table_undirected, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_event_av_map_undirected, _no_event_av_map, _no_event_av_map_undirected, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_event_av_table_undirected, _no_event_av_table, _no_event_av_table_undirected, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_send_event_av_map_undirected, _no_event_av_map, _no_flag_av_map_undirected, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_send_event_av_table_undirected, _no_event_av_table, _no_flag_av_table_undirected, _no_flag_av_table) +-PSMX2_TAGGED_OPS(_no_recv_event_av_map_undirected, _no_flag_av_map, _no_event_av_map_undirected, _no_flag_av_map) +-PSMX2_TAGGED_OPS(_no_recv_event_av_table_undirected, _no_flag_av_table, _no_event_av_table_undirected, _no_flag_av_table) ++PSMX2_TAGGED_OPS(_no_flag_directed, _no_flag, _no_flag_directed, _no_flag) ++PSMX2_TAGGED_OPS(_no_event_directed, _no_event, _no_event_directed, _no_flag) ++PSMX2_TAGGED_OPS(_no_send_event_directed, _no_event, _no_flag_directed, _no_flag) ++PSMX2_TAGGED_OPS(_no_recv_event_directed, _no_flag, _no_event_directed, _no_flag) ++PSMX2_TAGGED_OPS(_no_flag_undirected, _no_flag, _no_flag_undirected, _no_flag) ++PSMX2_TAGGED_OPS(_no_event_undirected, _no_event, _no_event_undirected, _no_flag) ++PSMX2_TAGGED_OPS(_no_send_event_undirected, _no_event, _no_flag_undirected, _no_flag) ++PSMX2_TAGGED_OPS(_no_recv_event_undirected, _no_flag, _no_event_undirected, _no_flag) + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_trx_ctxt.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_trx_ctxt.c +index 709ced94f..d4f2b8f87 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_trx_ctxt.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_trx_ctxt.c +@@ -96,10 +96,10 @@ int psmx2_am_trx_ctxt_handler(psm2_am_token_t token, psm2_amarg_t *args, + */ + disconn = malloc(sizeof(*disconn)); + if (disconn) { +- psmx2_lock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_lock_fn(&trx_ctxt->peer_lock, 2); + dlist_remove_first_match(&trx_ctxt->peer_list, + psmx2_peer_match, epaddr); +- psmx2_unlock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_unlock_fn(&trx_ctxt->peer_lock, 2); + if (trx_ctxt->ep && trx_ctxt->ep->av) + psmx2_av_remove_conn(trx_ctxt->ep->av, trx_ctxt, epaddr); + disconn->ep = trx_ctxt->psm2_ep; +@@ -129,12 +129,12 @@ void psmx2_trx_ctxt_disconnect_peers(struct psmx2_trx_ctxt *trx_ctxt) + + /* use local peer_list to avoid entering AM handler while holding the lock */ + dlist_init(&peer_list); +- psmx2_lock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_lock_fn(&trx_ctxt->peer_lock, 2); + dlist_foreach_safe(&trx_ctxt->peer_list, item, tmp) { + dlist_remove(item); + dlist_insert_before(item, &peer_list); + } +- psmx2_unlock(&trx_ctxt->peer_lock, 2); ++ trx_ctxt->domain->peer_unlock_fn(&trx_ctxt->peer_lock, 2); + + dlist_foreach_safe(&peer_list, item, tmp) { + peer = container_of(item, struct psmx2_epaddr_context, entry); +@@ -176,9 +176,12 @@ void psmx2_trx_ctxt_free(struct psmx2_trx_ctxt *trx_ctxt, int usage_flags) + FI_INFO(&psmx2_prov, FI_LOG_CORE, "epid: %016lx (%s)\n", + trx_ctxt->psm2_epid, psmx2_usage_flags_to_string(old_flags)); + +- psmx2_lock(&trx_ctxt->domain->trx_ctxt_lock, 1); ++ trx_ctxt->am_progress = 0; ++ trx_ctxt->poll_active = 0; ++ ++ trx_ctxt->domain->trx_ctxt_lock_fn(&trx_ctxt->domain->trx_ctxt_lock, 1); + dlist_remove(&trx_ctxt->entry); +- psmx2_unlock(&trx_ctxt->domain->trx_ctxt_lock, 1); ++ trx_ctxt->domain->trx_ctxt_unlock_fn(&trx_ctxt->domain->trx_ctxt_lock, 1); + + if (psmx2_env.disconnect) + psmx2_trx_ctxt_disconnect_peers(trx_ctxt); +@@ -213,7 +216,9 @@ void psmx2_trx_ctxt_free(struct psmx2_trx_ctxt *trx_ctxt, int usage_flags) + fastlock_destroy(&trx_ctxt->am_req_pool_lock); + fastlock_destroy(&trx_ctxt->poll_lock); + fastlock_destroy(&trx_ctxt->peer_lock); +- free(trx_ctxt); ++ ++ if (!ofi_atomic_dec32(&trx_ctxt->poll_refcnt)) ++ free(trx_ctxt); + } + + struct psmx2_trx_ctxt *psmx2_trx_ctxt_alloc(struct psmx2_fid_domain *domain, +@@ -231,12 +236,12 @@ struct psmx2_trx_ctxt *psmx2_trx_ctxt_alloc(struct psmx2_fid_domain *domain, + + /* Check existing allocations first if only Tx or Rx is needed */ + if (compatible_flags) { +- psmx2_lock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_lock_fn(&domain->trx_ctxt_lock, 1); + dlist_foreach(&domain->trx_ctxt_list, item) { + trx_ctxt = container_of(item, struct psmx2_trx_ctxt, entry); + if (compatible_flags == trx_ctxt->usage_flags) { + trx_ctxt->usage_flags |= asked_flags; +- psmx2_unlock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_unlock_fn(&domain->trx_ctxt_lock, 1); + FI_INFO(&psmx2_prov, FI_LOG_CORE, + "use existing context. epid: %016lx " + "(%s -> tx+rx).\n", trx_ctxt->psm2_epid, +@@ -244,7 +249,7 @@ struct psmx2_trx_ctxt *psmx2_trx_ctxt_alloc(struct psmx2_fid_domain *domain, + return trx_ctxt; + } + } +- psmx2_unlock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_unlock_fn(&domain->trx_ctxt_lock, 1); + } + + if (psmx2_trx_ctxt_cnt >= psmx2_env.max_trx_ctxt) { +@@ -323,21 +328,25 @@ struct psmx2_trx_ctxt *psmx2_trx_ctxt_alloc(struct psmx2_fid_domain *domain, + goto err_out_close_ep; + } + ++#if !HAVE_PSM2_MQ_FP_MSG ++ fastlock_init(&trx_ctxt->rma_queue.lock); ++ slist_init(&trx_ctxt->rma_queue.list); ++#endif + fastlock_init(&trx_ctxt->peer_lock); + fastlock_init(&trx_ctxt->poll_lock); + fastlock_init(&trx_ctxt->am_req_pool_lock); +- fastlock_init(&trx_ctxt->rma_queue.lock); + fastlock_init(&trx_ctxt->trigger_queue.lock); + dlist_init(&trx_ctxt->peer_list); +- slist_init(&trx_ctxt->rma_queue.list); + slist_init(&trx_ctxt->trigger_queue.list); + trx_ctxt->id = psmx2_trx_ctxt_cnt++; + trx_ctxt->domain = domain; + trx_ctxt->usage_flags = asked_flags; ++ trx_ctxt->poll_active = 1; ++ ofi_atomic_initialize32(&trx_ctxt->poll_refcnt, 1); /* take one ref for domain->trx_ctxt_list */ + +- psmx2_lock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_lock_fn(&domain->trx_ctxt_lock, 1); + dlist_insert_before(&trx_ctxt->entry, &domain->trx_ctxt_list); +- psmx2_unlock(&domain->trx_ctxt_lock, 1); ++ domain->trx_ctxt_unlock_fn(&domain->trx_ctxt_lock, 1); + + return trx_ctxt; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_wait.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_wait.c +index 6798ac0cc..bd2a6d1bc 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_wait.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/psmx2_wait.c +@@ -1,9 +1,9 @@ + /* + * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * +- * This software is waitailable to you under a choice of one of two ++ * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, waitailable from the file ++ * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * BSD license below: + * +@@ -140,7 +140,8 @@ static void psmx2_wait_stop_progress(void) + static struct fi_ops_wait *psmx2_wait_ops_save; + static struct fi_ops_wait psmx2_wait_ops; + +-static int psmx2_wait_wait(struct fid_wait *wait, int timeout) ++DIRECT_FN ++STATIC int psmx2_wait_wait(struct fid_wait *wait, int timeout) + { + struct util_wait *wait_priv; + struct psmx2_fid_fabric *fabric; +@@ -158,6 +159,7 @@ static int psmx2_wait_wait(struct fid_wait *wait, int timeout) + return err; + } + ++DIRECT_FN + int psmx2_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, + struct fid_wait **waitset) + { +@@ -177,6 +179,7 @@ int psmx2_wait_open(struct fid_fabric *fabric, struct fi_wait_attr *attr, + return 0; + } + ++DIRECT_FN + int psmx2_wait_trywait(struct fid_fabric *fabric, struct fid **fids, int count) + { + struct psmx2_fid_cq *cq_priv; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/version.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/version.h +index a91ab9f2a..52e921986 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/version.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/psm2/src/version.h +@@ -40,8 +40,6 @@ + #ifdef VALGRIND_MAKE_MEM_DEFINED + #undef VALGRIND_MAKE_MEM_DEFINED + #endif +-#define PSM_IS_TEST /* keep plain malloc/realloc/calloc/memalign/free/strdup */ +-#include "psm2/psm_mq_internal.h" + #else + #include + #include +@@ -55,16 +53,19 @@ + #define PSMX2_DEFAULT_UUID "00FF00FF-0000-0000-0000-00FF00FF00FF" + #define PROVIDER_INI PSM2_INI + +-#if HAVE_PSM2_SRC ++/* Temporarily disable the use of psm2_mq_fp_msg due to instability */ ++#ifdef HAVE_PSM2_MQ_FP_MSG ++#undef HAVE_PSM2_MQ_FP_MSG ++#endif ++#define HAVE_PSM2_MQ_FP_MSG 0 ++ ++#if HAVE_PSM2_MQ_REQ_USER + + #ifndef PSMX2_USE_REQ_CONTEXT + #define PSMX2_USE_REQ_CONTEXT 1 + #endif + +-#define PSMX2_STATUS_TYPE struct psm2_mq_req +-#define PSMX2_STATUS_DECL(s) struct psm2_mq_req *s +-#define PSMX2_STATUS_INIT(s) +-#define PSMX2_STATUS_SAVE(s,t) do { t = s; } while (0) ++#define PSMX2_STATUS_TYPE struct psm2_mq_req_user + #define PSMX2_STATUS_ERROR(s) ((s)->error_code) + #define PSMX2_STATUS_TAG(s) ((s)->tag) + #define PSMX2_STATUS_RCVLEN(s) ((s)->recv_msglen) +@@ -72,15 +73,7 @@ + #define PSMX2_STATUS_PEER(s) ((s)->peer) + #define PSMX2_STATUS_CONTEXT(s) ((s)->context) + +-#define PSMX2_POLL_COMPLETION(trx_ctxt, status, err) \ +- do { \ +- (err) = psm2_mq_ipeek_dequeue((trx_ctxt)->psm2_mq, &(status)); \ +- } while (0) +- +-#define PSMX2_FREE_COMPLETION(trx_ctxt, status) \ +- psm2_mq_req_free((trx_ctxt)->psm2_mq, status) +- +-#else /* !HAVE_PSM2_SRC */ ++#else /* !HAVE_PSM2_MQ_REQ_USER */ + + #ifdef PSMX2_USE_REQ_CONTEXT + #undef PSMX2_USE_REQ_CONTEXT +@@ -88,9 +81,6 @@ + #define PSMX2_USE_REQ_CONTEXT 0 + + #define PSMX2_STATUS_TYPE psm2_mq_status2_t +-#define PSMX2_STATUS_DECL(s) psm2_mq_status2_t s##_priv, *s +-#define PSMX2_STATUS_INIT(s) do { s = &s##_priv; } while (0) +-#define PSMX2_STATUS_SAVE(s,t) do { *(t) = *(s); } while (0) + #define PSMX2_STATUS_ERROR(s) ((s)->error_code) + #define PSMX2_STATUS_TAG(s) ((s)->msg_tag) + #define PSMX2_STATUS_RCVLEN(s) ((s)->nbytes) +@@ -98,27 +88,7 @@ + #define PSMX2_STATUS_PEER(s) ((s)->msg_peer) + #define PSMX2_STATUS_CONTEXT(s) ((s)->context) + +-/* +- * psm2_mq_test2 is called immediately after psm2_mq_ipeek with a lock held to +- * prevent psm2_mq_ipeek from returning the same request multiple times under +- * different threads. +- */ +-#define PSMX2_POLL_COMPLETION(trx_ctxt, status, err) \ +- do { \ +- if (psmx2_trylock(&(trx_ctxt)->poll_lock, 2)) { \ +- (err) = PSM2_MQ_NO_COMPLETIONS; \ +- } else { \ +- psm2_mq_req_t psm2_req; \ +- (err) = psm2_mq_ipeek((trx_ctxt)->psm2_mq, &psm2_req, NULL); \ +- if ((err) == PSM2_OK) \ +- psm2_mq_test2(&psm2_req, (status)); \ +- psmx2_unlock(&(trx_ctxt)->poll_lock, 2); \ +- } \ +- } while(0) +- +-#define PSMX2_FREE_COMPLETION(trx_ctxt, status) +- +-#endif /* HAVE_PSM2_SRC */ ++#endif /* !HAVE_PSM2_MQ_REQ_USER */ + + /* + * Provide backward compatibility for older PSM2 libraries that lack the +@@ -134,10 +104,10 @@ typedef int (*psm2_am_handler_2_fn_t) ( + psm2_amarg_t *args, int nargs, + void *src, uint32_t len, void *hctx); + +-extern psm2_am_handler_fn_t psmx2_am_handlers[]; +-extern psm2_am_handler_2_fn_t psmx2_am_handlers_2[]; +-extern void *psmx2_am_handler_ctxts[]; +-extern int psmx2_am_handler_count; ++extern psm2_am_handler_fn_t psmx2_am_handlers[]; ++extern psm2_am_handler_2_fn_t psmx2_am_handlers_2[]; ++extern void *psmx2_am_handler_ctxts[]; ++extern int psmx2_am_handler_count; + + static inline + psm2_error_t psm2_am_register_handlers_2( +@@ -166,10 +136,10 @@ psm2_error_t psm2_am_register_handlers_2( + #endif /* !HAVE_PSM2_AM_REGISTER_HANDLERS_2 */ + + /* +- * Use reserved space within psm2_mq_req for fi_context instead of ++ * Use reserved space within psm2_mq_req_user for fi_context instead of + * allocating from a internal queue. + * +- * Only work when compiled with PSM2 source. Can be turned off by ++ * Only work with PSM2 that has psm2_mq_req_user defined. Can be turned off by + * passing "-DPSMX2_USE_REQ_CONTEXT=0" to the compiler. + */ + +@@ -194,14 +164,15 @@ psm2_error_t psm2_am_register_handlers_2( + + #define PSMX2_REQ_GET_OP_CONTEXT(req, ctx) \ + do { \ +- (ctx) = (req)->context = (req)->user_reserved; \ ++ struct psm2_mq_req_user *req_user = (void *)(req); \ ++ (ctx) = req_user->context = req_user->user_reserved; \ + } while (0) + + #else /* !PSMX2_USE_REQ_CONTEXT */ + + struct psmx2_context { +- struct fi_context fi_context; +- struct slist_entry list_entry; ++ struct fi_context fi_context; ++ struct slist_entry list_entry; + }; + + #define PSMX2_EP_DECL_OP_CONTEXT \ +@@ -239,15 +210,15 @@ struct psmx2_context { + #define PSMX2_EP_GET_OP_CONTEXT(ep, ctx) \ + do { \ + struct psmx2_context *context; \ +- psmx2_lock(&(ep)->context_lock, 2); \ ++ ep->domain->context_lock_fn(&(ep)->context_lock, 2); \ + if (!slist_empty(&(ep)->free_context_list)) { \ + context = container_of(slist_remove_head(&(ep)->free_context_list), \ + struct psmx2_context, list_entry); \ +- psmx2_unlock(&(ep)->context_lock, 2); \ ++ ep->domain->context_unlock_fn(&(ep)->context_lock, 2); \ + (ctx) = &context->fi_context; \ + break; \ + } \ +- psmx2_unlock(&(ep)->context_lock, 2); \ ++ ep->domain->context_unlock_fn(&(ep)->context_lock, 2); \ + context = malloc(sizeof(*context)); \ + if (!context) { \ + FI_WARN(&psmx2_prov, FI_LOG_EP_DATA, "out of memory.\n"); \ +@@ -261,12 +232,12 @@ struct psmx2_context { + struct psmx2_context *context; \ + context = container_of((ctx), struct psmx2_context, fi_context); \ + context->list_entry.next = NULL; \ +- psmx2_lock(&(ep)->context_lock, 2); \ ++ ep->domain->context_lock_fn(&(ep)->context_lock, 2); \ + slist_insert_tail(&context->list_entry, &(ep)->free_context_list); \ +- psmx2_unlock(&(ep)->context_lock, 2); \ ++ ep->domain->context_unlock_fn(&(ep)->context_lock, 2); \ + } while (0) + +-#endif /* PSMX2_USE_REQ_CONTEXT */ ++#endif /* !PSMX2_USE_REQ_CONTEXT */ + + #endif + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/Makefile.include +new file mode 100644 +index 000000000..6eac7c0d5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/Makefile.include +@@ -0,0 +1,28 @@ ++if HAVE_RSTREAM ++_rstream_files = \ ++ prov/rstream/src/rstream_domain.c \ ++ prov/rstream/src/rstream_fabric.c \ ++ prov/rstream/src/rstream_attr.c \ ++ prov/rstream/src/rstream_init.c \ ++ prov/rstream/src/rstream_cm.c \ ++ prov/rstream/src/rstream_msg.c \ ++ prov/rstream/src/rstream_eq.c \ ++ prov/rstream/src/rstream_ep.c \ ++ prov/rstream/src/rstream.h ++ ++if HAVE_RSTREAM_DL ++pkglib_LTLIBRARIES += librstream-fi.la ++librstream_fi_la_SOURCES = $(_rstream_files) $(common_srcs) ++librstream_fi_la_LIBADD = $(linkback) $(rstream_LIBS) ++librstream_fi_la_LDFLAGS = -module -avoid-version -shared -export-dynamic ++librstream_fi_la_DEPENDENCIES = $(linkback) ++else !HAVE_RSTREAM_DL ++src_libfabric_la_SOURCES += $(_rstream_files) ++src_libfabric_la_LIBADD += $(rstream_LIBS) ++endif !HAVE_RSTREAM_DL ++ ++prov_install_man_pages += man/man7/fi_rstream.7 ++ ++endif HAVE_RSTREAM ++ ++prov_dist_man_pages += man/man7/fi_rstream.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/configure.m4 +new file mode 100644 +index 000000000..2543f472b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/configure.m4 +@@ -0,0 +1,15 @@ ++dnl Configury specific to the libfabric rstream provider ++ ++dnl Called to configure this provider ++dnl ++dnl Arguments: ++dnl ++dnl $1: action if configured successfully ++dnl $2: action if not configured successfully ++dnl ++AC_DEFUN([FI_RSTREAM_CONFIGURE],[ ++ # Determine if we can support the rxd provider ++ rstream_h_happy=0 ++ AS_IF([test x"$enable_rstream" != x"no"], [rstream_h_happy=1]) ++ AS_IF([test $rstream_h_happy -eq 1], [$1], [$2]) ++]) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream.h +new file mode 100644 +index 000000000..ddbc1fd5b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream.h +@@ -0,0 +1,232 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _RSTREAM_H_ ++#define _RSTREAM_H_ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "rdma/providers/fi_log.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++#define RSTREAM_CAPS (FI_MSG | FI_SEND | FI_RECV | FI_LOCAL_COMM | FI_REMOTE_COMM) ++#define RSTREAM_DEFAULT_QP_SIZE 384 ++#define RSTREAM_MAX_CTRL 2 ++#define RSTREAM_MR_BITS 15 ++#define RSTREAM_DEFAULT_MR_SEG_SIZE (1 << RSTREAM_MR_BITS) ++ ++#define RSTREAM_MAX_POLL_TIME 10 ++ ++#define RSTREAM_MAX_MR_BITS 20 ++#define RSTREAM_MR_MAX (1ULL << RSTREAM_MAX_MR_BITS) ++#define RSTREAM_MR_LEN_MASK (RSTREAM_MR_MAX - 1) ++#define RSTREAM_CREDIT_OFFSET RSTREAM_MAX_MR_BITS ++#define RSTREAM_CREDIT_BITS 9 ++#define RSTREAM_CREDITS_MAX (1ULL << RSTREAM_CREDIT_BITS) ++#define RSTREAM_CREDIT_MASK ((RSTREAM_CREDITS_MAX - 1) << RSTREAM_CREDIT_OFFSET) ++#define RSTREAM_RSOCKETV2 2 ++ ++/*iWARP, have to also track msg len [msglen, target_credits, target_mr_len]*/ ++#define RSTREAM_USING_IWARP (rstream_info.ep_attr->protocol == FI_PROTO_IWARP) ++#define RSTREAM_IWARP_DATA_SIZE sizeof(uint32_t) ++ ++#define RSTREAM_IWARP_MSG_BIT (1ULL << 31) ++#define RSTREAM_IWARP_MSG_BIT_MASK (RSTREAM_IWARP_MSG_BIT - 1) ++#define RSTREAM_IWARP_IMM_MSG_LEN (1ULL << RSTREAM_MAX_MR_BITS) /* max transmission size */ ++ ++extern struct fi_info rstream_info; ++extern struct fi_provider rstream_prov; ++extern struct util_prov rstream_util_prov; ++extern struct fi_fabric_attr rstream_fabric_attr; ++ ++/* util structs ~ user layer fds */ ++ ++struct rstream_fabric { ++ struct util_fabric util_fabric; ++ struct fid_fabric *msg_fabric; ++}; ++ ++struct rstream_domain { ++ struct util_domain util_domain; ++ struct fid_domain *msg_domain; ++}; ++ ++enum rstream_msg_type { ++ RSTREAM_CTRL_MSG, ++ RSTREAM_RX_MSG_COMP, ++ RSTREAM_TX_MSG_COMP, ++ RSTREAM_MSG_UNKNOWN ++}; ++ ++struct rstream_mr_seg { ++ void *data_start; ++ uint32_t size; ++ uint32_t avail_size; ++ uint64_t start_offset; ++ uint64_t end_offset; ++}; ++ ++struct rstream_lmr_data { ++ void *base_addr; ++ void *ldesc; ++ uint64_t rkey; ++ struct fid_mr *mr; ++ struct rstream_mr_seg tx; ++ struct rstream_mr_seg rx; ++ uint64_t recv_buffer_offset; ++}; ++ ++struct rstream_rmr_data { ++ struct rstream_mr_seg mr; ++ uint64_t rkey; ++}; ++ ++struct rstream_cm_data { ++ uint64_t base_addr; ++ uint64_t rkey; ++ uint32_t rmr_size; ++ uint16_t max_rx_credits; ++ uint8_t version; ++ uint8_t reserved; ++}; ++ ++struct rstream_ctx_data { ++ struct fi_context ctx; ++ size_t len; ++}; ++ ++DECLARE_FREESTACK(struct rstream_ctx_data, rstream_tx_ctx_fs); ++ ++struct rstream_tx_ctx { ++ struct rstream_ctx_data *tx_ctxs; ++ uint32_t num_in_use; ++ uint32_t free_index; ++ uint32_t front; ++}; ++ ++struct rstream_window { ++ uint16_t max_tx_credits; ++ uint16_t tx_credits; ++ uint16_t ctrl_credits; ++ uint16_t max_target_rx_credits; ++ uint16_t target_rx_credits; ++ uint16_t max_rx_credits; ++}; ++ ++struct rstream_cq_data { ++ uint32_t total_len; ++ uint16_t num_completions; ++}; ++ ++struct rstream_ep { ++ struct util_ep util_ep; ++ struct fid_ep *ep_fd; ++ struct fid_domain *msg_domain; ++ struct rstream_lmr_data local_mr; ++ struct rstream_rmr_data remote_data; ++ struct fid_cq *cq; ++ struct rstream_window qp_win; ++ struct fi_context *rx_ctxs; ++ uint32_t rx_ctx_index; ++ struct rstream_tx_ctx_fs *tx_ctxs; ++ struct rstream_cq_data rx_cq_data; ++ fastlock_t send_lock; ++ fastlock_t recv_lock; ++ /* must take send/recv lock before cq_lock */ ++ fastlock_t cq_lock; ++}; ++ ++struct rstream_pep { ++ struct util_pep util_pep; ++ struct fid_pep *pep_fd; ++}; ++ ++struct rstream_eq { ++ struct util_eq util_eq; ++ struct fid_eq *eq_fd; ++ uint32_t cm_data_len; ++ struct fi_eq_cm_entry *cm_entry; ++ uint32_t prev_cm_state; ++ RbtHandle ep_map; ++}; ++ ++struct rstream_timer { ++ struct timeval start; ++ struct timeval end; ++ uint32_t poll_time; ++}; ++ ++extern ssize_t rstream_post_cq_data_recv(struct rstream_ep *ep, ++ const struct fi_cq_data_entry *cq_entry); ++ ++extern int rstream_info_to_rstream(uint32_t version, const struct fi_info *core_info, ++ struct fi_info *info); ++extern int rstream_info_to_core(uint32_t version, const struct fi_info *rstream_info, ++ struct fi_info *core_info); ++extern void rstream_set_info(struct fi_info *info); ++extern struct fi_ops_cm rstream_ops_cm; ++extern struct fi_ops_cm rstream_ops_pep_cm; ++extern struct fi_ops_msg rstream_ops_msg; ++extern int rstream_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context); ++extern void rstream_process_cm_event(struct rstream_ep *ep, void *cm_data); ++ ++int rstream_fabric_open(struct fi_fabric_attr *attr, struct fid_fabric **fabric, ++ void *context); ++int rstream_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++int rstream_ep_open(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context); ++int rstream_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, ++ struct fid_eq **eq, void *context); ++int rstream_info_to_core(uint32_t version, const struct fi_info *rstream_info, ++ struct fi_info *core_info); ++ ++#endif /* _RSTREAM_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_attr.c +new file mode 100644 +index 000000000..40a5d962e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_attr.c +@@ -0,0 +1,96 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++struct fi_tx_attr rstream_tx_attr = { ++ .caps = RSTREAM_CAPS, ++ .msg_order = FI_ORDER_SAS, ++ .size = RSTREAM_DEFAULT_QP_SIZE, ++}; ++ ++struct fi_rx_attr rstream_rx_attr = { ++ .caps = RSTREAM_CAPS, ++ .msg_order = FI_ORDER_SAS, ++ .size = RSTREAM_DEFAULT_QP_SIZE, ++}; ++ ++struct fi_ep_attr rstream_ep_attr = { ++ .type = FI_EP_SOCK_STREAM, ++ .protocol = FI_PROTO_RSTREAM, ++ .protocol_version = 1, ++ .tx_ctx_cnt = 1, ++ .rx_ctx_cnt = 1, ++}; ++ ++struct fi_domain_attr rstream_domain_attr = { ++ .caps = FI_LOCAL_COMM | FI_REMOTE_COMM, ++ .threading = FI_THREAD_SAFE, ++ .control_progress = FI_PROGRESS_AUTO, ++ .data_progress = FI_PROGRESS_MANUAL, ++ .resource_mgmt = FI_RM_ENABLED, ++ .av_type = FI_AV_UNSPEC, ++ /* for the ofi mr_check */ ++ .mr_mode = 0, ++ .tx_ctx_cnt = 1, ++ .rx_ctx_cnt = 1, ++ .max_ep_tx_ctx = 1, ++ .mr_iov_limit = 1, ++}; ++ ++struct fi_fabric_attr rstream_fabric_attr = { ++ .prov_version = FI_VERSION(1, 7), ++}; ++ ++struct fi_info rstream_info = { ++ .caps = RSTREAM_CAPS, ++ .addr_format = FI_SOCKADDR, ++ .tx_attr = &rstream_tx_attr, ++ .rx_attr = &rstream_rx_attr, ++ .ep_attr = &rstream_ep_attr, ++ .domain_attr = &rstream_domain_attr, ++ .fabric_attr = &rstream_fabric_attr ++}; ++ ++/* settings post CONNREQ for users */ ++void rstream_set_info(struct fi_info *info) ++{ ++ info->caps = RSTREAM_CAPS; ++ info->mode = 0; ++ info->ep_attr->type = FI_EP_SOCK_STREAM; ++ info->ep_attr->protocol = rstream_info.ep_attr->protocol; ++ info->domain_attr->mr_mode = 0; ++ info->domain_attr->mr_cnt = 0; ++ *info->rx_attr = rstream_rx_attr; ++ *info->tx_attr = rstream_tx_attr; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_cm.c +new file mode 100644 +index 000000000..97635a05f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_cm.c +@@ -0,0 +1,188 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++static void rstream_format_data(struct rstream_cm_data *cm, ++ const struct rstream_ep *ep) ++{ ++ assert(cm && ep->local_mr.rx.data_start); ++ ++ cm->version = RSTREAM_RSOCKETV2; ++ cm->max_rx_credits = htons(ep->qp_win.max_rx_credits); ++ cm->base_addr = htonll((uintptr_t)ep->local_mr.rx.data_start); ++ cm->rkey = htonll(ep->local_mr.rkey); ++ cm->rmr_size = htonl(ep->local_mr.rx.size); ++} ++ ++static int rstream_setname(fid_t fid, void *addr, size_t addrlen) ++{ ++ fid_t rstream_fid; ++ struct rstream_pep *rstream_pep; ++ struct rstream_ep *rstream_ep; ++ ++ if (fid->fclass == FI_CLASS_PEP) { ++ rstream_pep = container_of(fid, struct rstream_pep, ++ util_pep.pep_fid); ++ rstream_fid = &rstream_pep->pep_fd->fid; ++ } else if (fid->fclass == FI_CLASS_EP) { ++ rstream_ep = container_of(fid, struct rstream_ep, ++ util_ep.ep_fid); ++ rstream_fid = &rstream_ep->ep_fd->fid; ++ } else { ++ return -FI_ENOSYS; ++ } ++ ++ return fi_setname(rstream_fid, addr, addrlen); ++} ++ ++static int rstream_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ fid_t rstream_fid; ++ struct rstream_pep *rstream_pep; ++ struct rstream_ep *rstream_ep; ++ ++ if (fid->fclass == FI_CLASS_PEP) { ++ rstream_pep = container_of(fid, struct rstream_pep, ++ util_pep.pep_fid); ++ rstream_fid = &rstream_pep->pep_fd->fid; ++ } else if (fid->fclass == FI_CLASS_EP) { ++ rstream_ep = container_of(fid, struct rstream_ep, ++ util_ep.ep_fid); ++ rstream_fid = &rstream_ep->ep_fd->fid; ++ } else { ++ return -FI_ENOSYS; ++ } ++ ++ return fi_getname(rstream_fid, addr, addrlen); ++} ++ ++static int rstream_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) ++{ ++ struct rstream_ep *rstream_ep = ++ container_of(ep, struct rstream_ep, util_ep.ep_fid); ++ ++ return fi_getpeer(rstream_ep->ep_fd, addr, addrlen); ++} ++ ++static int rstream_check_cm_size(struct rstream_ep *ep) ++{ ++ int ret; ++ size_t cm_max_size = 0, opt_size = sizeof(size_t); ++ ++ ret = fi_getopt(&ep->ep_fd->fid, FI_OPT_ENDPOINT, FI_OPT_CM_DATA_SIZE, ++ &cm_max_size, &opt_size); ++ if (ret < 0) ++ return ret; ++ if (cm_max_size < sizeof(struct rstream_cm_data)) ++ return -FI_ETOOSMALL; ++ return ret; ++} ++ ++static int rstream_connect(struct fid_ep *ep, const void *addr, ++ const void *param, size_t paramlen) ++{ ++ struct rstream_ep *rstream_ep = ++ container_of(ep, struct rstream_ep, util_ep.ep_fid); ++ struct rstream_cm_data cm_data; ++ ++ if (param || paramlen > 0 || rstream_check_cm_size(rstream_ep) != 0) ++ return -FI_ENOSYS; ++ ++ rstream_format_data(&cm_data, rstream_ep); ++ ++ return fi_connect(rstream_ep->ep_fd, addr, &cm_data, sizeof(cm_data)); ++} ++ ++static int rstream_listen(struct fid_pep *pep) ++{ ++ struct rstream_pep *rstream_pep = container_of(pep, ++ struct rstream_pep, util_pep.pep_fid); ++ ++ return fi_listen(rstream_pep->pep_fd); ++} ++ ++static int rstream_accept(struct fid_ep *ep, const void *param, ++ size_t paramlen) ++{ ++ struct rstream_cm_data cm_data; ++ struct rstream_ep *rstream_ep = ++ container_of(ep, struct rstream_ep, util_ep.ep_fid); ++ ++ if (param || paramlen > 0 || rstream_check_cm_size(rstream_ep) != 0) ++ return -FI_ENOSYS; ++ ++ rstream_format_data(&cm_data, rstream_ep); ++ ++ return fi_accept(rstream_ep->ep_fd, &cm_data, sizeof(cm_data)); ++} ++ ++static int rstream_reject(struct fid_pep *pep, fid_t handle, ++ const void *param, size_t paramlen) ++{ ++ return -FI_ENOSYS; ++} ++ ++static int rstream_shutdown(struct fid_ep *ep, uint64_t flags) ++{ ++ struct rstream_ep *rstream_ep = ++ container_of(ep, struct rstream_ep, util_ep.ep_fid); ++ ++ return fi_shutdown(rstream_ep->ep_fd, flags); ++} ++ ++struct fi_ops_cm rstream_ops_pep_cm = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = rstream_setname, ++ .getname = rstream_getname, ++ .getpeer = fi_no_getpeer, ++ .connect = fi_no_connect, ++ .listen = rstream_listen, ++ .accept = fi_no_accept, ++ .reject = rstream_reject, ++ .shutdown = rstream_shutdown, ++ .join = fi_no_join, ++}; ++ ++struct fi_ops_cm rstream_ops_cm = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = fi_no_setname, ++ .getname = fi_no_getname, ++ .getpeer = rstream_getpeer, ++ .connect = rstream_connect, ++ .listen = fi_no_listen, ++ .accept = rstream_accept, ++ .reject = fi_no_reject, ++ .shutdown = rstream_shutdown, ++ .join = fi_no_join, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_domain.c +new file mode 100644 +index 000000000..17978aff1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_domain.c +@@ -0,0 +1,125 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++static int rstream_domain_close(fid_t fid) ++{ ++ struct rstream_domain *rstream_domain = ++ container_of(fid, struct rstream_domain, ++ util_domain.domain_fid.fid); ++ int ret; ++ ++ ret = fi_close(&rstream_domain->msg_domain->fid); ++ if (ret) ++ return ret; ++ ++ ret = ofi_domain_close(&rstream_domain->util_domain); ++ if (ret) ++ return ret; ++ ++ free(rstream_domain); ++ ++ return 0; ++} ++ ++static struct fi_ops_mr rstream_domain_mr_ops = { ++ .size = sizeof(struct fi_ops_mr), ++ .reg = fi_no_mr_reg, ++ .regv = fi_no_mr_regv, ++ .regattr = fi_no_mr_regattr, ++}; ++ ++static struct fi_ops rstream_domain_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_domain_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_domain rstream_domain_ops = { ++ .size = sizeof(struct fi_ops_domain), ++ .av_open = fi_no_av_open, ++ .cq_open = fi_no_cq_open, ++ .endpoint = rstream_ep_open, ++ .scalable_ep = fi_no_scalable_ep, ++ .cntr_open = fi_no_cntr_open, ++ .poll_open = fi_no_poll_open, ++ .stx_ctx = fi_no_stx_context, ++ .srx_ctx = fi_no_srx_context, ++ .query_atomic = fi_no_query_atomic, ++}; ++ ++int rstream_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context) ++{ ++ struct rstream_domain *rstream_domain; ++ struct rstream_fabric *rstream_fabric; ++ int ret; ++ struct fi_info *cinfo = NULL; ++ ++ rstream_domain = calloc(1, sizeof(*rstream_domain)); ++ if (!rstream_domain) ++ return -FI_ENOMEM; ++ ++ rstream_fabric = container_of(fabric, struct rstream_fabric, ++ util_fabric.fabric_fid); ++ ++ ret = ofi_get_core_info(FI_VERSION(1, 7), NULL, NULL, 0, ++ &rstream_util_prov, info, rstream_info_to_core, &cinfo); ++ if (ret) ++ goto err1; ++ ++ ret = fi_domain(rstream_fabric->msg_fabric, cinfo, ++ &rstream_domain->msg_domain, context); ++ if (ret) ++ goto err1; ++ ++ ret = ofi_domain_init(fabric, info, &rstream_domain->util_domain, ++ context); ++ if (ret) ++ goto err1; ++ ++ *domain = &rstream_domain->util_domain.domain_fid; ++ (*domain)->fid.ops = &rstream_domain_fi_ops; ++ (*domain)->mr = &rstream_domain_mr_ops; ++ (*domain)->ops = &rstream_domain_ops; ++ ++ return 0; ++err1: ++ if (cinfo) ++ fi_freeinfo(cinfo); ++ free(rstream_domain); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_ep.c +new file mode 100644 +index 000000000..0979b244f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_ep.c +@@ -0,0 +1,420 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++static int rstream_ep_close(fid_t fid) ++{ ++ int ret; ++ struct rstream_ep *rstream_ep = ++ container_of(fid, struct rstream_ep, util_ep.ep_fid.fid); ++ ++ ret = fi_close(&rstream_ep->local_mr.mr->fid); ++ if (ret) ++ return ret; ++ free(rstream_ep->local_mr.base_addr); ++ ++ ret = fi_close(&rstream_ep->ep_fd->fid); ++ if (ret) ++ return ret; ++ ++ ret = fi_close(&rstream_ep->cq->fid); ++ if (ret) ++ return ret; ++ ++ ofi_endpoint_close(&rstream_ep->util_ep); ++ ++ rstream_tx_ctx_fs_free(rstream_ep->tx_ctxs); ++ ++ fastlock_destroy(&rstream_ep->send_lock); ++ fastlock_destroy(&rstream_ep->recv_lock); ++ fastlock_destroy(&rstream_ep->cq_lock); ++ free(rstream_ep->rx_ctxs); ++ free(rstream_ep); ++ return 0; ++} ++ ++static int rstream_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) ++{ ++ int ret; ++ struct rstream_ep *rstream_ep = ++ container_of(ep_fid, struct rstream_ep, util_ep.ep_fid.fid); ++ struct rstream_eq *rstream_eq = NULL; ++ ++ switch (bfid->fclass) { ++ case FI_CLASS_EQ: ++ rstream_eq = container_of(bfid, struct rstream_eq, ++ util_eq.eq_fid.fid); ++ ret = fi_ep_bind(rstream_ep->ep_fd, &rstream_eq->eq_fd->fid, ++ flags); ++ rbtInsert(rstream_eq->ep_map, &rstream_ep->ep_fd->fid, ++ rstream_ep); ++ break; ++ default: ++ FI_WARN(&rstream_prov, FI_LOG_EP_CTRL, "invalid fid class\n"); ++ ret = -FI_EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++static int rstream_reg_mrs(struct fid_domain *domain, ++ struct rstream_lmr_data *lmr) ++{ ++ int ret; ++ uint64_t rx_meta_data_offset = 0; ++ uint32_t full_mr_size = lmr->tx.size + lmr->rx.size; ++ ++ if (RSTREAM_USING_IWARP) ++ rx_meta_data_offset = RSTREAM_IWARP_DATA_SIZE * lmr->rx.size; ++ ++ full_mr_size = full_mr_size + rx_meta_data_offset; ++ lmr->base_addr = malloc(full_mr_size); ++ ++ ret = fi_mr_reg(domain, lmr->base_addr, full_mr_size, ++ FI_READ | FI_WRITE | FI_REMOTE_READ | FI_REMOTE_WRITE, ++ 0, 0, 0, &lmr->mr, NULL); ++ if (ret) ++ return ret; ++ ++ lmr->ldesc = fi_mr_desc(lmr->mr); ++ lmr->rkey = fi_mr_key(lmr->mr); ++ lmr->tx.data_start = (char *)lmr->base_addr; ++ lmr->tx.avail_size = lmr->tx.size; ++ lmr->rx.data_start = (char *)lmr->tx.data_start + ++ lmr->tx.size + rx_meta_data_offset; ++ ++ return ret; ++} ++ ++static int rstream_cq_init(struct fid_domain *domain, struct rstream_ep *rep) ++{ ++ int ret; ++ struct fi_cq_attr attr; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.format = FI_CQ_FORMAT_DATA; ++ attr.wait_obj = FI_WAIT_FD; ++ attr.size = rep->qp_win.max_rx_credits + rep->qp_win.max_tx_credits; ++ ++ ret = fi_cq_open(domain, &attr, &rep->cq, NULL); ++ if (ret) ++ return ret; ++ ++ ret = fi_ep_bind(rep->ep_fd, &rep->cq->fid, FI_TRANSMIT | FI_RECV); ++ if (ret) ++ return ret; ++ ++ rep->qp_win.tx_credits = ++ rep->qp_win.max_tx_credits - RSTREAM_MAX_CTRL; ++ ++ return ret; ++} ++ ++static int rstream_ep_ctrl(struct fid *fid, int command, void *arg) ++{ ++ struct rstream_ep *rstream_ep; ++ int ret = 0; ++ rstream_ep = container_of(fid, struct rstream_ep, util_ep.ep_fid.fid); ++ ++ switch (command) { ++ case FI_ENABLE: ++ ret = rstream_reg_mrs(rstream_ep->msg_domain, ++ &rstream_ep->local_mr); ++ if (ret) ++ goto err1; ++ ret = rstream_cq_init(rstream_ep->msg_domain, rstream_ep); ++ if (ret) ++ goto err1; ++ ret = fi_enable(rstream_ep->ep_fd); ++ break; ++ case FI_GETWAIT: ++ ret = fi_control(&rstream_ep->cq->fid, FI_GETWAIT, arg); ++ if (ret) ++ return ret; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ return ret; ++ ++err1: ++ if (rstream_ep->local_mr.base_addr) ++ free(rstream_ep->local_mr.base_addr); ++ if (rstream_ep->local_mr.mr) ++ fi_close(&rstream_ep->local_mr.mr->fid); ++ ++ return ret; ++} ++ ++static struct fi_ops rstream_ep_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_ep_close, ++ .bind = rstream_ep_bind, ++ .control = rstream_ep_ctrl, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int rstream_ep_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) ++{ ++ struct rstream_ep *rstream_ep = ++ container_of(fid, struct rstream_ep, util_ep.ep_fid.fid); ++ ++ if (level != FI_OPT_ENDPOINT) ++ return -FI_ENOPROTOOPT; ++ ++ if (optname == FI_OPT_SEND_BUF_SIZE) { ++ if(sizeof(rstream_ep->local_mr.tx.size) != optlen) ++ return -FI_EINVAL; ++ rstream_ep->local_mr.tx.size = *((uint32_t *)optval); ++ } else if (optname == FI_OPT_RECV_BUF_SIZE) { ++ if(sizeof(rstream_ep->local_mr.rx.size) != optlen) ++ return -FI_EINVAL; ++ rstream_ep->local_mr.rx.size = *((uint32_t *)optval); ++ } else if (optname == FI_OPT_TX_SIZE) { ++ if(sizeof(rstream_ep->qp_win.max_tx_credits) != optlen) ++ return -FI_EINVAL; ++ rstream_ep->qp_win.max_tx_credits = *((uint16_t *)optval); ++ } else if (optname == FI_OPT_RX_SIZE) { ++ if(sizeof(rstream_ep->qp_win.max_rx_credits) != optlen) ++ return -FI_EINVAL; ++ rstream_ep->qp_win.max_rx_credits = *((uint16_t *)optval); ++ } else { ++ return -FI_ENOPROTOOPT; ++ } ++ ++ return 0; ++} ++ ++static struct fi_ops_ep rstream_ops_ep = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = fi_no_cancel, ++ .getopt = fi_no_getopt, ++ .setopt = rstream_ep_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++int rstream_ep_open(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context) ++{ ++ struct rstream_ep *rstream_ep; ++ struct rstream_domain *rstream_domain; ++ struct rstream_pep *rstream_pep = NULL; ++ int ret; ++ ++ rstream_domain = container_of(domain, struct rstream_domain, ++ util_domain.domain_fid); ++ ++ rstream_ep = calloc(1, sizeof(*rstream_ep)); ++ if (!rstream_ep) ++ return -FI_ENOMEM; ++ ++ /* manual progress */ ++ ret = ofi_endpoint_init(domain, &rstream_util_prov, info, ++ &rstream_ep->util_ep, context, NULL); ++ if (ret) ++ goto err1; ++ ++ rstream_info_to_core(FI_VERSION(1, 7), NULL, info); ++ ++ if (info->handle && info->handle->fclass == FI_CLASS_PEP) { ++ rstream_pep = container_of(info->handle, ++ struct rstream_pep, util_pep.pep_fid); ++ info->handle = &rstream_pep->pep_fd->fid; ++ } ++ ++ ret = fi_endpoint(rstream_domain->msg_domain, info, ++ &rstream_ep->ep_fd, NULL); ++ if (ret) ++ goto err1; ++ ++ if (rstream_pep) ++ free(rstream_pep); ++ ++ rstream_ep->msg_domain = rstream_domain->msg_domain; ++ rstream_ep->local_mr.tx.size = RSTREAM_DEFAULT_MR_SEG_SIZE; ++ rstream_ep->local_mr.rx.size = RSTREAM_DEFAULT_MR_SEG_SIZE; ++ ++ rstream_ep->qp_win.max_tx_credits = rstream_info.tx_attr->size; ++ rstream_ep->qp_win.ctrl_credits = RSTREAM_MAX_CTRL; ++ rstream_ep->qp_win.max_rx_credits = rstream_info.rx_attr->size; ++ ++ rstream_ep->tx_ctxs = ++ rstream_tx_ctx_fs_create(rstream_ep->qp_win.max_tx_credits, ++ NULL, NULL); ++ ++ assert(rstream_ep->tx_ctxs); ++ rstream_ep->rx_ctxs = (struct fi_context *) ++ calloc(rstream_ep->qp_win.max_rx_credits, ++ sizeof(*rstream_ep->rx_ctxs)); ++ assert(rstream_ep->rx_ctxs); ++ ++ *ep_fid = &rstream_ep->util_ep.ep_fid; ++ (*ep_fid)->fid.ops = &rstream_ep_fi_ops; ++ (*ep_fid)->ops = &rstream_ops_ep; ++ (*ep_fid)->cm = &rstream_ops_cm; ++ (*ep_fid)->msg = &rstream_ops_msg; ++ fastlock_init(&rstream_ep->send_lock); ++ fastlock_init(&rstream_ep->recv_lock); ++ fastlock_init(&rstream_ep->cq_lock); ++ return 0; ++ ++err1: ++ free(rstream_ep); ++ return ret; ++} ++ ++static int rstream_pep_bind(struct fid *pep_fid, struct fid *bfid, ++ uint64_t flags) ++{ ++ struct rstream_pep *rstream_pep = container_of(pep_fid, ++ struct rstream_pep, util_pep.pep_fid); ++ struct rstream_eq *rstream_eq = NULL; ++ int ret; ++ ++ switch (bfid->fclass) { ++ case FI_CLASS_EQ: ++ rstream_eq = container_of(bfid, struct rstream_eq, ++ util_eq.eq_fid.fid); ++ ret = fi_pep_bind(rstream_pep->pep_fd, &rstream_eq->eq_fd->fid, ++ flags); ++ break; ++ default: ++ FI_WARN(&rstream_prov, FI_LOG_EP_CTRL, "invalid fid class\n"); ++ ret = -FI_EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++static int rstream_pep_ctrl(struct fid *fid, int command, void *arg) ++{ ++ struct rstream_pep *rstream_pep; ++ int ret = 0; ++ ++ switch (fid->fclass) { ++ case FI_CLASS_PEP: ++ if (command != FI_BACKLOG) ++ return -FI_EINVAL; ++ rstream_pep = container_of(fid, struct rstream_pep, ++ util_pep.pep_fid.fid); ++ ret = fi_control(&rstream_pep->pep_fd->fid, command, arg); ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ return ret; ++} ++ ++static int rstream_pep_close(fid_t fid) ++{ ++ struct rstream_pep *rstream_pep = ++ container_of(fid, struct rstream_pep, util_pep.pep_fid.fid); ++ int ret; ++ ++ ret = fi_close(&rstream_pep->pep_fd->fid); ++ if (ret) ++ return ret; ++ ++ ofi_pep_close(&rstream_pep->util_pep); ++ free(rstream_pep); ++ ++ return ret; ++} ++ ++static struct fi_ops rstream_pep_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_pep_close, ++ .bind = rstream_pep_bind, ++ .control = rstream_pep_ctrl, ++ .ops_open = fi_no_ops_open, ++}; ++ ++int rstream_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context) ++{ ++ int ret; ++ struct rstream_fabric *rstream_fabric = container_of(fabric, ++ struct rstream_fabric, util_fabric.fabric_fid); ++ struct rstream_pep *rstream_pep; ++ ++ rstream_pep = calloc(1, sizeof(*rstream_pep)); ++ if (!rstream_pep) ++ return -FI_ENOMEM; ++ ++ rstream_info_to_core(FI_VERSION(1, 7), NULL, info); ++ ++ ret = fi_passive_ep(rstream_fabric->msg_fabric, info, ++ &rstream_pep->pep_fd, NULL); ++ if (ret) ++ goto err1; ++ ++ *pep = &rstream_pep->util_pep.pep_fid; ++ (*pep)->fid.fclass = FI_CLASS_PEP; ++ (*pep)->fid.ops = &rstream_pep_fi_ops; ++ (*pep)->ops = &rstream_ops_ep; ++ (*pep)->cm = &rstream_ops_pep_cm; ++ ++ return 0; ++ ++err1: ++ free(rstream_pep); ++ return ret; ++} ++ ++void rstream_process_cm_event(struct rstream_ep *ep, void *cm_data) ++{ ++ assert(ep && cm_data); ++ ++ int i; ++ struct rstream_cm_data *rcv_data = (struct rstream_cm_data *)cm_data; ++ ++ assert(rcv_data->version == RSTREAM_RSOCKETV2); ++ ++ ep->qp_win.target_rx_credits = ntohs(rcv_data->max_rx_credits); ++ ep->qp_win.max_target_rx_credits = ep->qp_win.target_rx_credits; ++ ep->remote_data.rkey = ntohll(rcv_data->rkey); ++ ep->remote_data.mr.data_start = (void *)ntohll(rcv_data->base_addr); ++ ep->remote_data.mr.size = ntohl(rcv_data->rmr_size); ++ ep->remote_data.mr.avail_size = ep->remote_data.mr.size; ++ ++ for(i = 0; i < ep->qp_win.max_rx_credits; i++) { ++ rstream_post_cq_data_recv(ep, NULL); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_eq.c +new file mode 100644 +index 000000000..8aee31452 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_eq.c +@@ -0,0 +1,234 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++static int rstream_eq_events(uint32_t *event, struct fi_eq_cm_entry *cm_entry, ++ struct fi_eq_cm_entry *usr_cm_entry, struct rstream_eq *rstream_eq) ++{ ++ int ret = 0; ++ ++ if (*event == FI_CONNREQ) { ++ /* have to store to transfer to ep during FI_CONNECT */ ++ if (cm_entry->info) { ++ usr_cm_entry->info = cm_entry->info; ++ rstream_set_info(usr_cm_entry->info); ++ } ++ } else if (*event == FI_CONNECTED) { ++ struct rstream_ep *rstream_ep = NULL; ++ void *itr = rbtFind(rstream_eq->ep_map, cm_entry->fid); ++ assert(itr); ++ rbtKeyValue(rstream_eq->ep_map, itr, ++ (void **) &cm_entry->fid, (void **) &rstream_ep); ++ rstream_process_cm_event(rstream_ep, cm_entry->data); ++ usr_cm_entry->fid = &rstream_ep->util_ep.ep_fid.fid; ++ } else { ++ ret = -FI_ENODATA; ++ } ++ rstream_eq->prev_cm_state = *event; ++ return ret; ++} ++ ++static ssize_t rstream_read(struct fid_eq *eq, uint32_t *event, ++ void *buf, size_t len, uint64_t flags) ++{ ++ uint32_t rlen = sizeof(struct fi_eq_cm_entry); ++ assert(len == rlen && event); ++ struct fi_eq_cm_entry *usr_cm_entry = (struct fi_eq_cm_entry *) buf; ++ ssize_t ret; ++ struct fi_eq_cm_entry *cm_entry = NULL; ++ ++ struct rstream_eq *rstream_eq = container_of(eq, ++ struct rstream_eq, util_eq.eq_fid); ++ ++ cm_entry = rstream_eq->cm_entry; ++ assert(cm_entry); ++ ++ if (rstream_eq->prev_cm_state != FI_CONNREQ) { ++ rlen = rlen + rstream_eq->cm_data_len; ++ } ++ ++ ret = fi_eq_read(rstream_eq->eq_fd, event, cm_entry, rlen, flags); ++ if (ret == rlen) { ++ ret = rstream_eq_events(event, cm_entry, usr_cm_entry, rstream_eq); ++ if (ret) ++ return ret; ++ } else { ++ return ret; ++ } ++ ++ return len; ++} ++ ++static ssize_t rstream_readerr(struct fid_eq *eq, struct fi_eq_err_entry *buf, ++ uint64_t flags) ++{ ++ struct rstream_eq *rstream_eq = container_of(eq, ++ struct rstream_eq, util_eq.eq_fid); ++ ++ return fi_eq_readerr(rstream_eq->eq_fd, buf, flags); ++} ++ ++static ssize_t rstream_sread(struct fid_eq *eq, uint32_t *event, ++ void *buf, size_t len, int timeout, uint64_t flags) ++{ ++ uint32_t rlen = sizeof(struct fi_eq_cm_entry); ++ assert(len == rlen && event); ++ struct fi_eq_cm_entry *usr_cm_entry = (struct fi_eq_cm_entry *) buf; ++ ssize_t ret; ++ struct fi_eq_cm_entry *cm_entry = NULL; ++ ++ struct rstream_eq *rstream_eq = container_of(eq, ++ struct rstream_eq, util_eq.eq_fid); ++ ++ cm_entry = rstream_eq->cm_entry; ++ assert(cm_entry); ++ ++ if (rstream_eq->prev_cm_state != FI_CONNREQ) { ++ rlen = rlen + rstream_eq->cm_data_len; ++ } ++ ++ ret = fi_eq_sread(rstream_eq->eq_fd, event, cm_entry, rlen, timeout, ++ flags); ++ if (ret == rlen) { ++ ret = rstream_eq_events(event, cm_entry, usr_cm_entry, rstream_eq); ++ if (ret) ++ return ret; ++ } else { ++ return ret; ++ } ++ ++ return len; ++} ++ ++static const char *rstream_strerror(struct fid_eq *eq, int prov_errno, ++ const void *err_data, char *buf, size_t len) ++{ ++ struct rstream_eq *rstream_eq = container_of(eq, struct rstream_eq, ++ util_eq.eq_fid); ++ ++ return fi_eq_strerror(rstream_eq->eq_fd, prov_errno, err_data, buf, len); ++} ++ ++static int rstream_eq_control(fid_t fid, int command, void *arg) ++{ ++ struct rstream_eq *rstream_eq = container_of(fid, struct rstream_eq, ++ util_eq.eq_fid.fid); ++ int ret; ++ ++ switch (command) { ++ case FI_GETWAIT: ++ ret = fi_control(&rstream_eq->eq_fd->fid, FI_GETWAIT, arg); ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ return ret; ++} ++ ++static int rstream_eq_close(fid_t fid) ++{ ++ struct rstream_eq *rstream_eq = ++ container_of(fid, struct rstream_eq, util_eq.eq_fid.fid); ++ int ret; ++ ++ ret = fi_close(&rstream_eq->eq_fd->fid); ++ if (ret) ++ return ret; ++ ++ free(rstream_eq->cm_entry); ++ free(rstream_eq); ++ return ret; ++} ++ ++static struct fi_ops_eq rstream_ops_eq = { ++ .size = sizeof(struct fi_ops_eq), ++ .read = rstream_read, ++ .readerr = rstream_readerr, ++ .write = fi_no_eq_write, ++ .sread = rstream_sread, ++ .strerror = rstream_strerror, ++}; ++ ++static struct fi_ops rstream_fid_ops_eq = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_eq_close, ++ .bind = fi_no_bind, ++ .control = rstream_eq_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++/* assumes uint64_t keys */ ++static int compare_mr_keys(void *key1, void *key2) ++{ ++ uint64_t k1 = *((uint64_t *) key1); ++ uint64_t k2 = *((uint64_t *) key2); ++ ++ return (k1 < k2) ? -1 : (k1 > k2); ++} ++ ++int rstream_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, ++ struct fid_eq **eq, void *context) ++{ ++ struct rstream_fabric *rstream_fabric = NULL; ++ struct rstream_eq *rstream_eq; ++ int ret; ++ ++ rstream_eq = calloc(1, sizeof(*rstream_eq)); ++ if (!rstream_eq) ++ return -FI_ENOMEM; ++ ++ rstream_fabric = container_of(fabric, struct rstream_fabric, ++ util_fabric.fabric_fid); ++ ++ ret = fi_eq_open(rstream_fabric->msg_fabric, attr, &rstream_eq->eq_fd, ++ NULL); ++ if (ret) ++ goto err1; ++ ++ (*eq) = &rstream_eq->util_eq.eq_fid; ++ (*eq)->fid.fclass = FI_CLASS_EQ; ++ (*eq)->fid.context = context; ++ (*eq)->ops = &rstream_ops_eq; ++ (*eq)->fid.ops = &rstream_fid_ops_eq; ++ rstream_eq->cm_data_len = sizeof(struct rstream_cm_data); ++ rstream_eq->cm_entry = calloc(1, sizeof(struct fi_eq_cm_entry) + ++ rstream_eq->cm_data_len); ++ rstream_eq->ep_map = rbtNew(compare_mr_keys); ++ rstream_eq->prev_cm_state = FI_NOTIFY; ++ ++ return ret; ++err1: ++ free(rstream_eq); ++ ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_fabric.c +new file mode 100644 +index 000000000..632ae6cd8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_fabric.c +@@ -0,0 +1,144 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++ ++ ++static int rstream_fabric_close(fid_t fid) ++{ ++ struct rstream_fabric *rstream_fabric = ++ container_of(fid, struct rstream_fabric, ++ util_fabric.fabric_fid.fid); ++ int ret; ++ ++ ret = fi_close(&rstream_fabric->msg_fabric->fid); ++ if (ret) ++ return ret; ++ ++ ret = ofi_fabric_close(&rstream_fabric->util_fabric); ++ if (ret) ++ return ret; ++ ++ free(rstream_fabric); ++ return 0; ++} ++ ++static int rstream_control(struct fid *fid, int command, void *arg) ++{ ++ return -FI_ENOSYS; ++} ++ ++int rstream_trywait(struct fid_fabric *fabric, struct fid **fids, int count) ++{ ++ int ret; ++ struct rstream_ep *rstream_ep; ++ struct rstream_fabric *rstream_fabric; ++ int num_fids = 1; ++ struct fid *rstream_fids[num_fids]; ++ ++ if (count != num_fids) ++ return -FI_ENOSYS; ++ ++ if (fids[0]->fclass == FI_CLASS_EP) { ++ rstream_ep = container_of(fids[0], struct rstream_ep, ++ util_ep.ep_fid.fid); ++ rstream_fabric = container_of(fabric, struct rstream_fabric, ++ util_fabric.fabric_fid); ++ rstream_fids[0] = &rstream_ep->cq->fid; ++ ret = fi_trywait(rstream_fabric->msg_fabric, rstream_fids, ++ num_fids); ++ return ret; ++ } ++ ++ return -FI_EINVAL; ++} ++ ++static struct fi_ops rstream_fabric_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = rstream_fabric_close, ++ .bind = fi_no_bind, ++ .control = rstream_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_fabric rstream_fabric_ops = { ++ .size = sizeof(struct fi_ops_fabric), ++ .domain = rstream_domain_open, ++ .passive_ep = rstream_passive_ep, ++ .eq_open = rstream_eq_open, ++ .wait_open = fi_no_wait_open, ++ .trywait = rstream_trywait ++}; ++ ++int rstream_fabric_open(struct fi_fabric_attr *attr, struct fid_fabric **fabric, ++ void *context) ++{ ++ struct rstream_fabric *rstream_fabric; ++ int ret; ++ struct fi_info *info = NULL; ++ ++ rstream_fabric = calloc(1, sizeof(*rstream_fabric)); ++ if (!rstream_fabric) ++ return -FI_ENOMEM; ++ ++ ret = ofi_fabric_init(&rstream_prov, &rstream_fabric_attr, attr, ++ &rstream_fabric->util_fabric, context); ++ if (ret) ++ goto err1; ++ ++ ret = ofi_get_core_info_fabric(&rstream_prov, attr, &info); ++ if (ret) { ++ FI_WARN(&rstream_prov, FI_LOG_FABRIC, "core info failed\n"); ++ ret = -FI_EINVAL; ++ goto err1; ++ } ++ ++ ret = fi_fabric(info->fabric_attr, &rstream_fabric->msg_fabric, context); ++ if (ret) { ++ FI_WARN(&rstream_prov, FI_LOG_FABRIC, "fi_fabric failed\n"); ++ ret = -FI_EINVAL; ++ goto err1; ++ } ++ ++ *fabric = &rstream_fabric->util_fabric.fabric_fid; ++ (*fabric)->fid.ops = &rstream_fabric_fi_ops; ++ (*fabric)->ops = &rstream_fabric_ops; ++ ++ fi_freeinfo(info); ++ return 0; ++err1: ++ free(rstream_fabric); ++ if (info) ++ fi_freeinfo(info); ++ ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_init.c +new file mode 100644 +index 000000000..08cfe59d3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_init.c +@@ -0,0 +1,181 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++#include ++#include ++#include ++ ++ ++static void rstream_iwarp_settings(struct fi_info *core_info) ++{ ++ core_info->ep_attr->max_msg_size = 2147483647; ++ core_info->domain_attr->cq_data_size = 0; ++ core_info->domain_attr->mr_cnt = 2289662; ++ core_info->mode = FI_CONTEXT; ++} ++ ++static void rstream_default_settings(struct fi_info *core_info) ++{ ++ core_info->mode = FI_RX_CQ_DATA | FI_CONTEXT; ++ core_info->rx_attr->mode = FI_RX_CQ_DATA; ++} ++ ++int rstream_info_to_core(uint32_t version, const struct fi_info *irstream_info, ++ struct fi_info *core_info) ++{ ++ core_info->ep_attr->type = FI_EP_MSG; ++ core_info->ep_attr->protocol = FI_PROTO_UNSPEC; ++ core_info->caps = FI_RMA | FI_MSG; ++ core_info->domain_attr->caps = FI_LOCAL_COMM | FI_REMOTE_COMM; ++ core_info->domain_attr->mr_mode = FI_MR_LOCAL | OFI_MR_BASIC_MAP; ++ core_info->tx_attr->op_flags = FI_COMPLETION; ++ core_info->rx_attr->op_flags = FI_COMPLETION; ++ core_info->fabric_attr->api_version = FI_VERSION(1, 7); ++ core_info->fabric_attr->prov_version = FI_VERSION(1, 0); ++ (RSTREAM_USING_IWARP) ? rstream_iwarp_settings(core_info): ++ rstream_default_settings(core_info); ++ ++ return 0; ++} ++ ++static void update_rstream_info(const struct fi_info *core_info) ++{ ++ rstream_info.tx_attr->iov_limit = core_info->tx_attr->iov_limit; ++ rstream_info.rx_attr->iov_limit = core_info->rx_attr->iov_limit; ++ rstream_info.tx_attr->size = core_info->tx_attr->size; ++ rstream_info.rx_attr->size = core_info->rx_attr->size; ++ rstream_info.domain_attr->max_ep_rx_ctx = ++ core_info->domain_attr->max_ep_rx_ctx; ++ rstream_info.domain_attr->max_ep_srx_ctx = ++ core_info->domain_attr->max_ep_srx_ctx; ++ rstream_info.ep_attr->max_msg_size = ++ core_info->ep_attr->max_msg_size; ++ rstream_info.rx_attr->iov_limit = core_info->rx_attr->iov_limit; ++ rstream_info.domain_attr->cq_data_size = ++ core_info->domain_attr->cq_data_size; ++ rstream_info.domain_attr->cq_cnt = core_info->domain_attr->cq_cnt; ++ rstream_info.domain_attr->ep_cnt = core_info->domain_attr->ep_cnt; ++ rstream_info.domain_attr->max_err_data = ++ core_info->domain_attr->max_err_data; ++} ++ ++int rstream_info_to_rstream(uint32_t version, const struct fi_info *core_info, ++ struct fi_info *info) ++{ ++ info->caps = RSTREAM_CAPS; ++ info->mode = 0; ++ ++ *info->tx_attr = *rstream_info.tx_attr; ++ *info->rx_attr = *rstream_info.rx_attr; ++ *info->domain_attr = *rstream_info.domain_attr; ++ *info->ep_attr = *rstream_info.ep_attr; ++ info->fabric_attr->api_version = FI_VERSION(1, 7); ++ info->fabric_attr->prov_version = FI_VERSION(1, 0); ++ update_rstream_info(core_info); ++ ++ return 0; ++} ++ ++static int rstream_getinfo(uint32_t version, const char *node, ++ const char *service, uint64_t flags, const struct fi_info *hints, ++ struct fi_info **info) ++{ ++ struct fi_info *cur; ++ struct addrinfo *ai; ++ uint16_t port_save = 0; ++ int ret; ++ ++ if (!info) ++ return -FI_EINVAL; ++ ++ if (hints && hints->ep_attr->protocol == FI_PROTO_IWARP) { ++ rstream_info.ep_attr->protocol = FI_PROTO_IWARP; ++ rstream_info.tx_attr->iov_limit = 3; ++ rstream_info.rx_attr->iov_limit = 3; ++ rstream_info.domain_attr->max_ep_srx_ctx = 0; ++ } ++ ++ /* Avoid getting wild card address from MSG provider */ ++ if (ofi_is_wildcard_listen_addr(node, service, flags, hints)) { ++ if (service) { ++ ret = getaddrinfo(NULL, service, NULL, &ai); ++ if (ret) { ++ FI_WARN(&rstream_prov, FI_LOG_CORE, ++ "Unable to getaddrinfo\n"); ++ return ret; ++ } ++ port_save = ofi_addr_get_port(ai->ai_addr); ++ freeaddrinfo(ai); ++ service = NULL; ++ } ++ } ++ ++ ret = ofix_getinfo(version, node, service, flags, &rstream_util_prov, ++ hints, rstream_info_to_core, rstream_info_to_rstream, info); ++ if (ret) ++ return ret; ++ ++ if (port_save) { ++ for (cur = *info; cur; cur = cur->next) { ++ assert(cur->src_addr); ++ ofi_addr_set_port(cur->src_addr, port_save); ++ } ++ } ++ ++ return ret; ++} ++ ++static void rstream_fini(void) ++{ ++ /* yawn */ ++} ++ ++struct fi_provider rstream_prov = { ++ .name = OFI_UTIL_PREFIX "rstream", ++ .version = FI_VERSION(1 ,0), ++ .fi_version = FI_VERSION(1, 7), ++ .getinfo = rstream_getinfo, ++ .fabric = rstream_fabric_open, ++ .cleanup = rstream_fini ++}; ++ ++struct util_prov rstream_util_prov = { ++ .prov = &rstream_prov, ++ .info = &rstream_info, ++ .flags = 0, ++}; ++ ++RSTREAM_INI ++{ ++ return &rstream_prov; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_msg.c +new file mode 100644 +index 000000000..9b5451c2e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rstream/src/rstream_msg.c +@@ -0,0 +1,742 @@ ++/* ++ * Copyright (c) 2017-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rstream.h" ++#include ++#include ++ ++ ++ssize_t rstream_process_cq(struct rstream_ep *ep, enum rstream_msg_type type); ++ ++static uint32_t rstream_cq_data_get_len(uint32_t cq_data) ++{ ++ return (cq_data & RSTREAM_MR_LEN_MASK); ++} ++ ++static uint32_t rstream_cq_data_set(struct rstream_cq_data cq_data) ++{ ++ uint32_t credits = cq_data.num_completions; ++ ++ assert(cq_data.num_completions < RSTREAM_CREDITS_MAX); ++ assert(cq_data.total_len < RSTREAM_MR_MAX); ++ ++ credits = credits << RSTREAM_CREDIT_OFFSET; ++ return credits | cq_data.total_len; ++} ++ ++static uint16_t rstream_cq_data_get_credits(uint32_t cq_data) ++{ ++ uint32_t credits = cq_data & RSTREAM_CREDIT_MASK; ++ ++ credits = (credits >> RSTREAM_CREDIT_OFFSET); ++ assert(credits < RSTREAM_CREDITS_MAX); ++ ++ return credits; ++} ++ ++static uint32_t rstream_iwarp_cq_data_is_msg(uint32_t cq_data) { ++ return cq_data & RSTREAM_IWARP_MSG_BIT; ++} ++ ++ ++static uint32_t rstream_iwarp_cq_data_set_msg_len(uint32_t msg_len) ++{ ++ assert(msg_len < RSTREAM_IWARP_IMM_MSG_LEN); ++ ++ uint32_t cq_data = msg_len; ++ ++ return cq_data | RSTREAM_IWARP_MSG_BIT; ++} ++ ++static uint32_t rstream_iwarp_cq_data_get_msg_len(uint32_t cq_data) ++{ ++ uint32_t msg_len = cq_data & RSTREAM_IWARP_MSG_BIT_MASK; ++ ++ assert(msg_len < RSTREAM_IWARP_IMM_MSG_LEN); ++ ++ return msg_len; ++} ++ ++static char *rstream_get_next_recv_buffer(struct rstream_ep *ep) ++{ ++ char *base_ptr = (char *)ep->local_mr.tx.data_start + ++ ep->local_mr.tx.size; ++ uint64_t *offset = &ep->local_mr.recv_buffer_offset; ++ const uint32_t full_size = RSTREAM_IWARP_DATA_SIZE * ++ ep->qp_win.max_rx_credits; ++ char *buffer = base_ptr + *offset; ++ ++ assert((void *)buffer < ep->local_mr.rx.data_start); ++ *offset = (*offset + RSTREAM_IWARP_DATA_SIZE) % full_size; ++ ++ return buffer; ++} ++ ++/*assuming rx_ctxs are always fully used */ ++static struct fi_context *rstream_get_rx_ctx(struct rstream_ep *ep) ++{ ++ struct fi_context *ctx; ++ ++ if (ep->rx_ctx_index == ep->qp_win.max_rx_credits) ++ return NULL; ++ ++ ctx = &ep->rx_ctxs[ep->rx_ctx_index]; ++ ep->rx_ctx_index = ep->rx_ctx_index + 1; ++ ++ return ctx; ++} ++ ++static struct fi_context *rstream_get_tx_ctx(struct rstream_ep *ep, int len) ++{ ++ struct rstream_tx_ctx_fs *fs = ep->tx_ctxs; ++ struct rstream_ctx_data *rtn_ctx = freestack_pop(fs); ++ ++ if (!rtn_ctx) ++ return NULL; ++ ++ rtn_ctx->len = len; ++ return &rtn_ctx->ctx; ++} ++ ++static int rstream_return_tx_ctx(struct fi_context *ctx_ptr, ++ struct rstream_ep *ep) ++{ ++ int len; ++ struct rstream_tx_ctx_fs *fs = ep->tx_ctxs; ++ ++ struct rstream_ctx_data *ctx_data = (struct rstream_ctx_data *)ctx_ptr; ++ len = ctx_data->len; ++ freestack_push(fs, ctx_data); ++ ++ return len; ++} ++ ++static ssize_t rstream_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ return -FI_ENOSYS; ++} ++ ++static ssize_t rstream_print_cq_error(struct fid_cq *cq) ++{ ++ ssize_t ret; ++ struct fi_cq_err_entry cq_entry = {0}; ++ const char *errmsg; ++ ++ ret = fi_cq_readerr(cq, &cq_entry, 0); ++ if (cq_entry.err == FI_ENOMSG) { ++ ret = FI_ENOMSG; ++ return ret; ++ } ++ ++ errmsg = fi_cq_strerror(cq, cq_entry.prov_errno, ++ cq_entry.err_data, NULL, 0); ++ fprintf(stderr, "CQ error msg: %s\n", errmsg); ++ ++ return ret; ++} ++ ++static void rstream_update_tx_credits(struct rstream_ep *ep, ++ uint16_t num_completions) ++{ ++ assert(num_completions == 1); ++ ++ if(ep->qp_win.ctrl_credits < RSTREAM_MAX_CTRL) ++ ep->qp_win.ctrl_credits++; ++ else ++ ep->qp_win.tx_credits++; ++ ++ assert(ep->qp_win.tx_credits <= ep->qp_win.max_tx_credits); ++} ++ ++static int rstream_timer_completed(struct rstream_timer *timer) ++{ ++ if (!timer->poll_time) ++ gettimeofday(&timer->start, NULL); ++ ++ gettimeofday(&timer->end, NULL); ++ timer->poll_time = (timer->end.tv_sec - timer->start.tv_sec) * 1000000 + ++ (timer->end.tv_usec - timer->start.tv_usec); ++ ++ return (timer->poll_time > RSTREAM_MAX_POLL_TIME); ++} ++ ++static int rstream_tx_mr_full(struct rstream_ep *ep) ++{ ++ return !(ep->local_mr.tx.avail_size); ++} ++ ++static int rstream_target_mr_full(struct rstream_ep *ep) ++{ ++ return !(ep->remote_data.mr.avail_size); ++} ++ ++static int rstream_tx_full(struct rstream_ep *ep) ++{ ++ return (ep->qp_win.tx_credits == 0); ++} ++ ++static int rstream_target_rx_full(struct rstream_ep *ep) ++{ ++ return ((ep->qp_win.target_rx_credits - RSTREAM_MAX_CTRL) == 0); ++} ++ ++static uint32_t rstream_calc_contig_len(struct rstream_mr_seg *mr) ++{ ++ if (!mr->avail_size) { ++ assert(mr->start_offset == mr->end_offset); ++ return 0; ++ } else if (mr->start_offset < mr->end_offset) { ++ return (mr->end_offset - mr->start_offset); ++ } else { ++ return (mr->size - mr->start_offset); ++ } ++} ++ ++static uint32_t rstream_alloc_contig_len_available(struct rstream_mr_seg *mr, ++ char **data_addr, uint32_t req_len) ++{ ++ uint32_t len_available = rstream_calc_contig_len(mr); ++ uint32_t len; ++ ++ *data_addr = (char *)mr->data_start; ++ assert(len_available <= mr->avail_size); ++ ++ if (!len_available) ++ return 0; ++ ++ *data_addr = *data_addr + mr->start_offset; ++ len = (len_available < req_len) ? len_available : req_len; ++ assert(mr->avail_size >= len); ++ mr->avail_size = mr->avail_size - len; ++ mr->start_offset = (mr->start_offset + len) % mr->size; ++ ++ return len; ++} ++ ++static void rstream_free_contig_len(struct rstream_mr_seg *mr, uint32_t len) ++{ ++ assert((mr->avail_size + len) <= mr->size); ++ mr->avail_size = mr->avail_size + len; ++ mr->end_offset = (mr->end_offset + len) % mr->size; ++} ++ ++static ssize_t rstream_send_ctrl_msg(struct rstream_ep *ep, uint32_t cq_data) ++{ ++ ssize_t ret = 0; ++ struct fi_msg msg; ++ ++ if (!ep->qp_win.ctrl_credits || (ep->qp_win.target_rx_credits == 0)) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ if (RSTREAM_USING_IWARP) { ++ ret = fi_inject(ep->ep_fd, &cq_data, RSTREAM_IWARP_DATA_SIZE, 0); ++ if (ret != 0) ++ goto out; ++ } else { ++ msg.msg_iov = NULL; ++ msg.desc = NULL; ++ msg.iov_count = 0; ++ msg.context = rstream_get_tx_ctx(ep, 0); ++ msg.data = cq_data; ++ ++ ret = fi_sendmsg(ep->ep_fd, &msg, FI_REMOTE_CQ_DATA); ++ if (ret != 0) ++ goto out; ++ ++ if (ep->qp_win.tx_credits > 0) ++ ep->qp_win.tx_credits--; ++ else ++ ep->qp_win.ctrl_credits--; ++ } ++ ++ assert(ep->qp_win.target_rx_credits > 0); ++ ep->qp_win.target_rx_credits--; ++ ++out: ++ return ret; ++} ++ ++/* accumulate data in tx_cq exhaustion case */ ++static ssize_t rstream_update_target(struct rstream_ep *ep, ++ uint16_t num_completions, uint32_t len) ++{ ++ uint32_t cq_data; ++ ssize_t ret = 0; ++ ++ ep->rx_cq_data.num_completions = ++ ep->rx_cq_data.num_completions + num_completions; ++ ep->rx_cq_data.total_len = ep->rx_cq_data.total_len + len; ++ ++ if ((ep->rx_cq_data.num_completions >= ep->qp_win.max_rx_credits / 2) || ++ (ep->rx_cq_data.total_len >= ep->local_mr.rx.size / 2)) { ++ ++ cq_data = rstream_cq_data_set(ep->rx_cq_data); ++ ++ ret = rstream_send_ctrl_msg(ep, cq_data); ++ if (ret == 0) { ++ FI_DBG(&rstream_prov, FI_LOG_EP_CTRL, ++ "ctrl msg update %u = completions %u = len \n", ++ ep->rx_cq_data.num_completions, ++ ep->rx_cq_data.total_len); ++ ep->rx_cq_data.num_completions = 0; ++ ep->rx_cq_data.total_len = 0; ++ } ++ } ++ ++ return ret; ++} ++ ++ssize_t rstream_process_rx_cq_data(struct rstream_ep *ep, ++ const struct fi_cq_data_entry *cq_entry) ++{ ++ uint16_t recvd_credits; ++ uint32_t recvd_len; ++ ++ if (cq_entry->data != 0) { ++ recvd_credits = rstream_cq_data_get_credits(cq_entry->data); ++ recvd_len = rstream_cq_data_get_len(cq_entry->data); ++ ++ ep->qp_win.target_rx_credits += recvd_credits; ++ assert(ep->qp_win.target_rx_credits <= ++ ep->qp_win.max_target_rx_credits); ++ ++ rstream_free_contig_len(&ep->remote_data.mr, recvd_len); ++ FI_DBG(&rstream_prov, FI_LOG_EP_CTRL, ++ "recvd: ctrl msg %u = completions %u = len \n", ++ recvd_credits, recvd_len); ++ } else { ++ rstream_free_contig_len(&ep->local_mr.rx, cq_entry->len); ++ } ++ ++ return rstream_post_cq_data_recv(ep, cq_entry); ++} ++ ++static void format_iwarp_cq_data(struct rstream_ep *ep, ++ struct fi_cq_data_entry *cq_entry) ++{ ++ uint32_t cq_data; ++ ++ cq_entry->buf = rstream_get_next_recv_buffer(ep); ++ cq_data = *((uint32_t *)cq_entry->buf); ++ ++ if(rstream_iwarp_cq_data_is_msg(cq_data)) { ++ cq_entry->data = 0; ++ cq_entry->len = rstream_iwarp_cq_data_get_msg_len(cq_data); ++ } else { ++ cq_entry->data = cq_data; ++ cq_entry->len = 0; ++ } ++} ++ ++static enum rstream_msg_type rstream_cqe_msg_type(struct rstream_ep *ep, ++ struct fi_cq_data_entry *cq_entry) ++{ ++ enum rstream_msg_type type = RSTREAM_MSG_UNKNOWN; ++ ++ if (cq_entry->flags & FI_REMOTE_WRITE || cq_entry->flags & FI_RECV || ++ cq_entry->flags & FI_REMOTE_CQ_DATA) { ++ if (RSTREAM_USING_IWARP) ++ format_iwarp_cq_data(ep, cq_entry); ++ ++ if (cq_entry->data) { ++ type = RSTREAM_CTRL_MSG; ++ } else { ++ type = RSTREAM_RX_MSG_COMP; ++ } ++ } else if (cq_entry->flags & FI_WRITE || cq_entry->flags & FI_SEND) { ++ type = RSTREAM_TX_MSG_COMP; ++ } ++ ++ return type; ++} ++ ++static ssize_t rstream_check_cq(struct rstream_ep *ep, ++ struct fi_cq_data_entry *completion_entry) ++{ ++ const int max_num = 1; ++ ssize_t ret; ++ ++ ret = fi_cq_read(ep->cq, completion_entry, max_num); ++ if (ret < 0 && ret != -FI_EAGAIN) { ++ if (ret == -FI_EAVAIL) { ++ ret = rstream_print_cq_error(ep->cq); ++ fprintf(stderr, "error from %s:%d\n", __FILE__, __LINE__); ++ return ret; ++ } ++ } ++ assert(ret == -FI_EAGAIN || ret == max_num); ++ ++ return ret; ++} ++ ++ssize_t rstream_process_cq(struct rstream_ep *ep, enum rstream_msg_type type) ++{ ++ struct fi_cq_data_entry cq_entry; ++ ssize_t ret, data_ret; ++ ssize_t found_msg_type = 0; ++ uint16_t rx_completions = 0; ++ struct rstream_timer timer = {.poll_time = 0}; ++ enum rstream_msg_type comp_type; ++ int len; ++ ++ fastlock_acquire(&ep->cq_lock); ++ do { ++ ret = rstream_check_cq(ep, &cq_entry); ++ if (ret == 1) { ++ comp_type = rstream_cqe_msg_type(ep, &cq_entry); ++ ++ if (comp_type == type) ++ found_msg_type++; ++ ++ if (comp_type == RSTREAM_CTRL_MSG || ++ comp_type == RSTREAM_RX_MSG_COMP) { ++ data_ret = rstream_process_rx_cq_data(ep, &cq_entry); ++ if (data_ret) { ++ fprintf(stderr, "error from %s:%d\n", ++ __FILE__, __LINE__); ++ ret = data_ret; ++ goto out; ++ } ++ rx_completions++; ++ } else if (comp_type == RSTREAM_TX_MSG_COMP) { ++ len = rstream_return_tx_ctx(cq_entry.op_context, ep); ++ rstream_update_tx_credits(ep, ret); ++ rstream_free_contig_len(&ep->local_mr.tx, len); ++ } else { ++ ret = -FI_ENOMSG; ++ goto out; ++ } ++ } else if (ret != -FI_EAGAIN) { ++ goto out; ++ } ++ } while ((ret == -FI_EAGAIN && !rstream_timer_completed(&timer) && ++ !found_msg_type) || (found_msg_type && ret > 0)); ++ ++ ret = rstream_update_target(ep, rx_completions, 0); ++ fastlock_release(&ep->cq_lock); ++ if (ret) ++ return ret; ++ ++ if (found_msg_type) ++ return found_msg_type; ++ else ++ return -FI_EAGAIN; ++out: ++ fastlock_release(&ep->cq_lock); ++ return ret; ++} ++ ++static uint32_t get_send_addrs_and_len(struct rstream_ep *ep, char **tx_addr, ++ char **dest_addr, uint32_t requested_len) ++{ ++ uint32_t available_len = 0; ++ ++ requested_len = MIN(MIN(requested_len, ++ rstream_calc_contig_len(&ep->local_mr.tx)), ++ rstream_calc_contig_len(&ep->remote_data.mr)); ++ if (requested_len == 0) ++ return available_len; ++ ++ available_len = rstream_alloc_contig_len_available(&ep->local_mr.tx, ++ tx_addr, requested_len); ++ available_len = rstream_alloc_contig_len_available(&ep->remote_data.mr, ++ dest_addr, requested_len); ++ ++ return available_len; ++} ++ ++static ssize_t rstream_can_send(struct rstream_ep *ep) ++{ ++ ssize_t ret; ++ ++ if (rstream_tx_mr_full(ep) || rstream_target_mr_full(ep) || ++ rstream_target_rx_full(ep)) { ++ ret = rstream_process_cq(ep, RSTREAM_CTRL_MSG); ++ if (ret < 0) ++ return ret; ++ } ++ ++ if (rstream_tx_full(ep)) { ++ ret = rstream_process_cq(ep, RSTREAM_TX_MSG_COMP); ++ if (ret < 0) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static ssize_t rstream_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct rstream_ep *ep = container_of(ep_fid, struct rstream_ep, ++ util_ep.ep_fid); ++ uint32_t cq_data = 0; ++ ssize_t ret; ++ char *tx_addr = NULL; ++ char *remote_addr = NULL; ++ size_t sent_len = 0; ++ uint32_t curr_avail_len = len; ++ void *ctx; ++ ++ fastlock_acquire(&ep->send_lock); ++ do { ++ ret = rstream_can_send(ep); ++ if (ret < 0) { ++ if (ret < 0 && ret != -FI_EAGAIN) { ++ goto err; ++ } else { ++ fastlock_release(&ep->send_lock); ++ return ((sent_len) ? sent_len : ret); ++ } ++ } ++ ++ curr_avail_len = get_send_addrs_and_len(ep, &tx_addr, ++ &remote_addr, curr_avail_len); ++ if (curr_avail_len == 0) ++ break; ++ ++ memcpy(tx_addr, ((char *)buf + sent_len), curr_avail_len); ++ sent_len = sent_len + curr_avail_len; ++ ctx = rstream_get_tx_ctx(ep, curr_avail_len); ++ ++ if (RSTREAM_USING_IWARP) { ++ ret = fi_write(ep->ep_fd, tx_addr, curr_avail_len, ++ ep->local_mr.ldesc, 0, (uint64_t)remote_addr, ++ ep->remote_data.rkey, ctx); ++ ret = rstream_send_ctrl_msg(ep, ++ rstream_iwarp_cq_data_set_msg_len(curr_avail_len)); ++ } else { ++ ret = fi_writedata(ep->ep_fd, tx_addr, curr_avail_len, ++ ep->local_mr.ldesc, cq_data, 0, (uint64_t)remote_addr, ++ ep->remote_data.rkey, ctx); ++ } ++ if (ret != 0) { ++ FI_DBG(&rstream_prov, FI_LOG_EP_DATA, ++ "error: fi_write failed: %zd", ret); ++ goto err; ++ } ++ curr_avail_len = len - sent_len; ++ ++ if (!RSTREAM_USING_IWARP) ++ ep->qp_win.target_rx_credits--; ++ ++ ep->qp_win.tx_credits--; ++ ++ } while(curr_avail_len); /* circle buffer rollover requires two loops */ ++ ++ fastlock_release(&ep->send_lock); ++ return sent_len; ++ ++err: ++ fastlock_release(&ep->send_lock); ++ return ret; ++} ++ ++static ssize_t rstream_sendv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++static ssize_t rstream_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ int ret; ++ struct rstream_ep *ep = container_of(ep_fid, struct rstream_ep, ++ util_ep.ep_fid); ++ ++ if (flags == FI_PEEK) { ++ fastlock_acquire(&ep->send_lock); ++ ret = rstream_can_send(ep); ++ fastlock_release(&ep->send_lock); ++ return ret; ++ } else { ++ return -FI_ENOSYS; ++ } ++} ++ ++/* either posting everything at once or reposting after cq completion */ ++ssize_t rstream_post_cq_data_recv(struct rstream_ep *ep, ++ const struct fi_cq_data_entry *cq_entry) ++{ ++ struct fi_context *context = NULL; ++ struct fi_msg msg; ++ struct iovec imsg; ++ void *buffer; ++ ssize_t ret; ++ ++ if (!cq_entry || !cq_entry->op_context) ++ context = rstream_get_rx_ctx(ep); ++ else if (cq_entry && cq_entry->op_context) ++ context = cq_entry->op_context; ++ ++ if (RSTREAM_USING_IWARP) { ++ buffer = (cq_entry && cq_entry->buf) ? cq_entry->buf : ++ rstream_get_next_recv_buffer(ep); ++ assert(buffer); ++ imsg.iov_base = buffer; ++ imsg.iov_len = RSTREAM_IWARP_DATA_SIZE; ++ msg.msg_iov = &imsg; ++ msg.desc = &ep->local_mr.ldesc; ++ msg.iov_count = 1; ++ msg.context = context; ++ } else { ++ msg.msg_iov = NULL; ++ msg.desc = NULL; ++ msg.iov_count = 0; ++ msg.context = context; ++ } ++ ++ ret = fi_recvmsg(ep->ep_fd, &msg, 0); ++ if (ret != 0) ++ return ret; ++ ++ return ret; ++} ++ ++static uint32_t rstream_copy_out_chunk(struct rstream_ep *ep, void *buf, ++ uint32_t len_left) ++{ ++ char *rx_data_ptr = NULL; ++ uint32_t current_chunk = ++ rstream_alloc_contig_len_available(&ep->local_mr.rx, &rx_data_ptr, ++ len_left); ++ ++ if (current_chunk) { ++ memcpy(buf, rx_data_ptr, current_chunk); ++ } ++ ++ return current_chunk; ++} ++ ++static ssize_t rstream_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct rstream_ep *ep = container_of(ep_fid, struct rstream_ep, ++ util_ep.ep_fid); ++ uint32_t copy_out_len = 0; ++ ssize_t ret; ++ ++ fastlock_acquire(&ep->recv_lock); ++ ++ copy_out_len = rstream_copy_out_chunk(ep, buf, len); ++ ++ if ((len - copy_out_len)) { ++ ret = rstream_process_cq(ep, RSTREAM_RX_MSG_COMP); ++ if(ret < 0 && ret != -FI_EAGAIN) { ++ fastlock_release(&ep->recv_lock); ++ return ret; ++ } ++ ++ copy_out_len = copy_out_len + rstream_copy_out_chunk(ep, ++ ((char *)buf + copy_out_len), (len - copy_out_len)); ++ } ++ ++ fastlock_acquire(&ep->send_lock); ++ ret = rstream_update_target(ep, 0, copy_out_len); ++ fastlock_release(&ep->send_lock); ++ fastlock_release(&ep->recv_lock); ++ if(ret < 0 && ret != -FI_EAGAIN) { ++ return ret; ++ } ++ ++ if (copy_out_len) { ++ return copy_out_len; ++ } ++ ++ return -FI_EAGAIN; ++} ++ ++static ssize_t rstream_recvv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t src_addr, void *context) ++{ ++ return -FI_ENOSYS; ++} ++ ++/* can't recv if you can't send a ctrl message -- only way to force user ++ * to progress ctrl msg, but...Continue to receive any queued data even ++ * if the remote side has disconnected (TODO) */ ++static ssize_t rstream_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ int ret; ++ struct rstream_ep *ep = container_of(ep_fid, struct rstream_ep, ++ util_ep.ep_fid); ++ ++ if (flags == FI_PEEK) { ++ fastlock_acquire(&ep->recv_lock); ++ if (!ep->local_mr.rx.avail_size) { ++ ret = rstream_process_cq(ep, RSTREAM_RX_MSG_COMP); ++ if (ret < 0) { ++ fastlock_release(&ep->recv_lock); ++ return ret; ++ } ++ } ++ fastlock_release(&ep->recv_lock); ++ ++ fastlock_acquire(&ep->send_lock); ++ if (rstream_target_rx_full(ep)) { ++ ret = rstream_process_cq(ep, RSTREAM_RX_MSG_COMP); ++ if (ret < 0) { ++ fastlock_release(&ep->send_lock); ++ return ret; ++ } ++ } ++ ++ if (!ep->qp_win.ctrl_credits) { ++ ret = rstream_process_cq(ep, RSTREAM_TX_MSG_COMP); ++ fastlock_release(&ep->send_lock); ++ return ret; ++ } ++ ++ fastlock_release(&ep->send_lock); ++ return 0; ++ } else { ++ return -FI_ENOSYS; ++ } ++} ++ ++struct fi_ops_msg rstream_ops_msg = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = rstream_recv, ++ .recvv = rstream_recvv, ++ .recvmsg = rstream_recvmsg, ++ .send = rstream_send, ++ .sendv = rstream_sendv, ++ .sendmsg = rstream_sendmsg, ++ .inject = rstream_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/Makefile.include +index d89d6f01e..0f2600b24 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/Makefile.include +@@ -8,8 +8,12 @@ _rxd_files = \ + prov/rxd/src/rxd_cq.c \ + prov/rxd/src/rxd_cntr.c \ + prov/rxd/src/rxd_ep.c \ ++ prov/rxd/src/rxd_msg.c \ ++ prov/rxd/src/rxd_tagged.c \ + prov/rxd/src/rxd_rma.c \ +- prov/rxd/src/rxd.h ++ prov/rxd/src/rxd_atomic.c \ ++ prov/rxd/src/rxd.h \ ++ prov/rxd/src/rxd_proto.h + + if HAVE_RXD_DL + pkglib_LTLIBRARIES += librxd-fi.la +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd.h +index fecb9e54d..edfbe0178 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2015-2018 Intel Corporation, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -52,6 +52,9 @@ + #include + #include + #include ++#include ++#include ++#include "rxd_proto.h" + + #ifndef _RXD_H_ + #define _RXD_H_ +@@ -59,51 +62,47 @@ + #define RXD_MAJOR_VERSION (1) + #define RXD_MINOR_VERSION (0) + #define RXD_PROTOCOL_VERSION (1) +-#define RXD_FI_VERSION FI_VERSION(1,6) + +-#define RXD_IOV_LIMIT 4 +-#define RXD_MAX_DGRAM_ADDR 128 ++#define RXD_MAX_MTU_SIZE 4096 + + #define RXD_MAX_TX_BITS 10 + #define RXD_MAX_RX_BITS 10 +-#define RXD_TX_ID(seq, id) (((seq) << RXD_MAX_TX_BITS) | id) +-#define RXD_RX_ID(seq, id) (((seq) << RXD_MAX_RX_BITS) | id) +-#define RXD_TX_IDX_BITS ((1ULL << RXD_MAX_TX_BITS) - 1) +-#define RXD_RX_IDX_BITS ((1ULL << RXD_MAX_RX_BITS) - 1) ++#define RXD_DEFAULT_AV_SIZE 1024 + + #define RXD_BUF_POOL_ALIGNMENT 16 + #define RXD_TX_POOL_CHUNK_CNT 1024 + #define RXD_RX_POOL_CHUNK_CNT 1024 +- +-#define RXD_MAX_RX_CREDITS 16 +-#define RXD_MAX_PEER_TX 8 +-#define RXD_MAX_UNACKED 128 +- +-#define RXD_EP_MAX_UNEXP_PKT 512 +-#define RXD_EP_MAX_UNEXP_MSG 128 +- +-#define RXD_USE_OP_FLAGS (1ULL << 61) +-#define RXD_NO_COMPLETION (1ULL << 62) +- ++#define RXD_MAX_PENDING 128 + #define RXD_MAX_PKT_RETRY 50 + +-extern int rxd_progress_spin_count; +-extern int rxd_reposted_bufs; ++#define RXD_PKT_IN_USE (1 << 0) ++#define RXD_PKT_ACKED (1 << 1) ++ ++#define RXD_REMOTE_CQ_DATA (1 << 0) ++#define RXD_NO_TX_COMP (1 << 1) ++#define RXD_NO_RX_COMP (1 << 2) ++#define RXD_INJECT (1 << 3) ++#define RXD_TAG_HDR (1 << 4) ++#define RXD_INLINE (1 << 5) ++#define RXD_MULTI_RECV (1 << 6) ++#define RXD_CANCELLED (1 << 7) ++ ++struct rxd_env { ++ int spin_count; ++ int retry; ++ int max_peers; ++ int max_unacked; ++}; + ++extern struct rxd_env rxd_env; + extern struct fi_provider rxd_prov; + extern struct fi_info rxd_info; + extern struct fi_fabric_attr rxd_fabric_attr; + extern struct util_prov rxd_util_prov; ++extern struct fi_ops_msg rxd_ops_msg; ++extern struct fi_ops_tagged rxd_ops_tagged; + extern struct fi_ops_rma rxd_ops_rma; +- +-enum { +- RXD_TX_CONN = 0, +- RXD_TX_MSG, +- RXD_TX_TAG, +- RXD_TX_WRITE, +- RXD_TX_READ_REQ, +- RXD_TX_READ_RSP, +-}; ++extern struct fi_ops_atomic rxd_ops_atomic; + + struct rxd_fabric { + struct util_fabric util_fabric; +@@ -115,16 +114,55 @@ struct rxd_domain { + struct fid_domain *dg_domain; + + ssize_t max_mtu_sz; ++ ssize_t max_inline_msg; ++ ssize_t max_inline_rma; ++ ssize_t max_inline_atom; ++ ssize_t max_seg_sz; + int mr_mode; + struct ofi_mr_map mr_map;//TODO use util_domain mr_map instead + }; + ++struct rxd_peer { ++ struct dlist_entry entry; ++ fi_addr_t peer_addr; ++ uint64_t tx_seq_no; ++ uint64_t rx_seq_no; ++ uint64_t last_rx_ack; ++ uint64_t last_tx_ack; ++ uint16_t rx_window;//constant at MAX_UNACKED for now ++ uint16_t tx_window;//unused for now, will be used for slow start ++ int retry_cnt; ++ ++ uint16_t unacked_cnt; ++ uint8_t active; ++ ++ uint16_t curr_rx_id; ++ uint16_t curr_tx_id; ++ ++ struct dlist_entry tx_list; ++ struct dlist_entry rx_list; ++ struct dlist_entry rma_rx_list; ++ struct dlist_entry unacked; ++ struct dlist_entry buf_pkts; ++}; ++ ++struct rxd_addr { ++ fi_addr_t fi_addr; ++ fi_addr_t dg_addr; ++}; ++ + struct rxd_av { + struct util_av util_av; + struct fid_av *dg_av; ++ struct ofi_rbmap rbmap; ++ int fi_addr_idx; ++ int rxd_addr_idx; + + int dg_av_used; + size_t dg_addrlen; ++ ++ fi_addr_t *fi_addr_table; ++ struct rxd_addr *rxd_addr_table; + }; + + struct rxd_cq; +@@ -135,54 +173,38 @@ struct rxd_cq { + rxd_cq_write_fn write_fn; + }; + +-struct rxd_peer { +- uint64_t nxt_msg_id; +- uint64_t exp_msg_id; +- uint64_t conn_data; +- fi_addr_t fiaddr; +- +- enum util_cmap_state state; +- uint16_t active_tx_cnt; +-}; +- + struct rxd_ep { + struct util_ep util_ep; + struct fid_ep *dg_ep; + struct fid_cq *dg_cq; + +- struct rxd_peer *peer_info; +- size_t max_peers; +- +- int conn_data_set; +- uint64_t conn_data; +- + size_t rx_size; +- size_t credits; +-// uint64_t num_out; +- ++ size_t tx_size; ++ size_t tx_prefix_size; ++ size_t rx_prefix_size; ++ uint32_t posted_bufs; ++ size_t min_multi_recv_size; + int do_local_mr; +- struct dlist_entry wait_rx_list; +- struct dlist_entry unexp_tag_list; +- struct dlist_entry unexp_msg_list; +- uint16_t num_unexp_pkt; +- uint16_t num_unexp_msg; ++ int next_retry; ++ int dg_cq_fd; ++ size_t pending_cnt; + + struct util_buf_pool *tx_pkt_pool; + struct util_buf_pool *rx_pkt_pool; + struct slist rx_pkt_list; + +- struct rxd_tx_entry_fs *tx_entry_fs; +- struct dlist_entry tx_entry_list; +- +- struct rxd_rx_entry_fs *rx_entry_fs; +- struct dlist_entry rx_entry_list; ++ struct util_buf_pool *tx_entry_pool; ++ struct util_buf_pool *rx_entry_pool; + +- struct rxd_recv_fs *recv_fs; +- struct dlist_entry recv_list; ++ struct dlist_entry unexp_list; ++ struct dlist_entry unexp_tag_list; ++ struct dlist_entry rx_list; ++ struct dlist_entry rx_tag_list; ++ struct dlist_entry active_peers; ++ struct dlist_entry rts_sent_list; ++ struct dlist_entry ctrl_pkts; + +- struct rxd_trecv_fs *trecv_fs; +- struct dlist_entry trecv_list; +- fastlock_t lock; ++ struct rxd_peer peers[]; + }; + + static inline struct rxd_domain *rxd_ep_domain(struct rxd_ep *ep) +@@ -205,146 +227,130 @@ static inline struct rxd_cq *rxd_ep_rx_cq(struct rxd_ep *ep) + return container_of(ep->util_ep.rx_cq, struct rxd_cq, util_cq); + } + +-struct rxd_rx_buf { +- struct fi_context context; +- struct slist_entry entry; +- struct rxd_ep *ep; +- struct fid_mr *mr; +- char buf[]; +-}; ++struct rxd_x_entry { ++ fi_addr_t peer; ++ uint16_t tx_id; ++ uint16_t rx_id; ++ uint64_t bytes_done; ++ uint64_t next_seg_no; ++ uint64_t start_seq; ++ uint64_t offset; ++ uint16_t window; ++ uint64_t num_segs; ++ uint32_t op; ++ ++ uint32_t flags; ++ uint64_t ignore; ++ uint8_t iov_count; ++ uint8_t res_count; ++ ++ struct iovec iov[RXD_IOV_LIMIT]; ++ struct iovec res_iov[RXD_IOV_LIMIT]; + +-struct rxd_rx_entry { +- struct ofi_op_hdr op_hdr; +- uint32_t exp_seg_no; +- uint64_t msg_id; +- uint64_t key; +- uint64_t done; +- uint64_t peer; +- uint16_t credits; +- uint32_t last_win_seg; +- fi_addr_t source; +- struct rxd_peer *peer_info; +- struct rxd_rx_buf *unexp_buf; +- uint64_t nack_stamp; ++ struct fi_cq_tagged_entry cq_entry; ++ ++ struct rxd_pkt_entry *pkt; + struct dlist_entry entry; ++}; + +- union { +- struct rxd_recv_entry *recv; +- struct rxd_trecv_entry *trecv; ++static inline uint32_t rxd_flags(uint64_t fi_flags) ++{ ++ uint32_t rxd_flags = 0; + +- struct { +- struct iovec iov[RXD_IOV_LIMIT]; +- } write; ++ if (fi_flags & FI_REMOTE_CQ_DATA) ++ rxd_flags |= RXD_REMOTE_CQ_DATA; ++ if (fi_flags & FI_INJECT) ++ rxd_flags |= RXD_INJECT; ++ if (fi_flags & FI_MULTI_RECV) ++ rxd_flags |= RXD_MULTI_RECV; + +- struct { +- struct rxd_tx_entry *tx_entry; +- } read_rsp; +- }; ++ return rxd_flags; ++} + +- union { +- struct dlist_entry wait_entry; +- struct dlist_entry unexp_entry; +- }; +-}; +-DECLARE_FREESTACK(struct rxd_rx_entry, rxd_rx_entry_fs); ++#define rxd_ep_rx_flags(rxd_ep) (rxd_flags((rxd_ep)->util_ep.rx_op_flags)) ++#define rxd_ep_tx_flags(rxd_ep) (rxd_flags((rxd_ep)->util_ep.tx_op_flags)) + +-struct rxd_tx_entry { ++struct rxd_pkt_entry { ++ struct dlist_entry d_entry; ++ struct slist_entry s_entry;//TODO - keep both or make separate tx/rx pkt structs ++ uint8_t flags; ++ size_t pkt_size; ++ uint64_t timestamp; ++ struct fi_context context; ++ struct fid_mr *mr; + fi_addr_t peer; +- uint64_t msg_id; +- uint64_t flags; +- uint64_t rx_key; +- uint64_t bytes_sent; +- uint32_t seg_no; +- uint32_t window; +- uint64_t retry_time; +- uint8_t retry_cnt; +- +- struct dlist_entry entry; +- struct dlist_entry pkt_list; +- +- uint8_t op_type; +- struct ofi_op_hdr op_hdr; +- +- union { +- struct { +- struct fi_msg msg; +- struct iovec msg_iov[RXD_IOV_LIMIT]; +- } msg; +- +- struct { +- struct fi_msg_tagged tmsg; +- struct iovec msg_iov[RXD_IOV_LIMIT]; +- } tmsg; +- +- struct { +- struct fi_msg_rma msg; +- struct iovec src_iov[RXD_IOV_LIMIT]; +- struct fi_rma_iov dst_iov[RXD_IOV_LIMIT]; +- } write; +- +- struct { +- struct fi_msg_rma msg; +- struct fi_rma_iov src_iov[RXD_IOV_LIMIT]; +- struct iovec dst_iov[RXD_IOV_LIMIT]; +- } read_req; +- +- struct { +- uint64_t peer_msg_id; +- uint8_t iov_count; +- struct iovec src_iov[RXD_IOV_LIMIT]; +- } read_rsp; +- }; ++ void *pkt; + }; +-DECLARE_FREESTACK(struct rxd_tx_entry, rxd_tx_entry_fs); + +-struct rxd_recv_entry { +- struct dlist_entry entry; +- struct fi_msg msg; +- uint64_t flags; +- struct iovec iov[RXD_IOV_LIMIT]; +- void *desc[RXD_IOV_LIMIT]; +-}; +-DECLARE_FREESTACK(struct rxd_recv_entry, rxd_recv_fs); ++static inline int rxd_pkt_type(struct rxd_pkt_entry *pkt_entry) ++{ ++ return ((struct rxd_base_hdr *) (pkt_entry->pkt))->type; ++} + +-struct rxd_trecv_entry { +- struct dlist_entry entry; +- struct fi_msg_tagged msg; +- uint64_t flags; +- struct rxd_rx_entry *rx_entry; +- struct iovec iov[RXD_IOV_LIMIT]; +- void *desc[RXD_IOV_LIMIT]; +-}; +-DECLARE_FREESTACK(struct rxd_trecv_entry, rxd_trecv_fs); ++static inline struct rxd_base_hdr *rxd_get_base_hdr(struct rxd_pkt_entry *pkt_entry) ++{ ++ return &((struct rxd_ack_pkt *) (pkt_entry->pkt))->base_hdr; ++} + +-struct rxd_pkt_data_start { +- struct ofi_ctrl_hdr ctrl; +- struct ofi_op_hdr op; +- char data[]; +-}; ++static inline uint64_t rxd_set_pkt_seq(struct rxd_peer *peer, ++ struct rxd_pkt_entry *pkt_entry) ++{ ++ rxd_get_base_hdr(pkt_entry)->seq_no = peer->tx_seq_no++; + +-struct rxd_pkt_data { +- struct ofi_ctrl_hdr ctrl; +- char data[]; +-}; ++ return rxd_get_base_hdr(pkt_entry)->seq_no; ++} + +-#define RXD_PKT_FIRST (1 << 0) +-#define RXD_PKT_LAST (1 << 1) +-#define RXD_LOCAL_COMP (1 << 2) +-#define RXD_REMOTE_ACK (1 << 3) +-#define RXD_NOT_ACKED RXD_REMOTE_ACK ++static inline struct rxd_ext_hdr *rxd_get_ext_hdr(struct rxd_pkt_entry *pkt_entry) ++{ ++ return &((struct rxd_ack_pkt *) (pkt_entry->pkt))->ext_hdr; ++} + +-struct rxd_pkt_meta { +- struct fi_context context; +- struct dlist_entry entry; +- struct rxd_tx_entry *tx_entry; +- struct rxd_ep *ep; +- struct fid_mr *mr; +- int flags; ++static inline struct rxd_sar_hdr *rxd_get_sar_hdr(struct rxd_pkt_entry *pkt_entry) ++{ ++ return (struct rxd_sar_hdr *) ((char *) pkt_entry->pkt + ++ sizeof(struct rxd_base_hdr)); ++} ++ ++static inline struct rxd_tag_hdr *rxd_get_tag_hdr(struct rxd_pkt_entry *pkt_entry) ++{ ++ struct rxd_base_hdr *hdr = rxd_get_base_hdr(pkt_entry); ++ ++ return (struct rxd_tag_hdr *) ((char *) hdr + sizeof(*hdr) + ++ (hdr->flags & RXD_INLINE ? 0 : sizeof(struct rxd_sar_hdr))); ++} + +- /* TODO: use iov and remove data copies */ +- char pkt_data[]; /* rxd_pkt_data*, followed by data */ ++static inline void rxd_set_tx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) ++{ ++ pkt_entry->pkt = (void *) ((char *) pkt_entry + ++ sizeof(*pkt_entry) + ep->tx_prefix_size); ++} ++ ++static inline void rxd_set_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) ++{ ++ pkt_entry->pkt = (void *) ((char *) pkt_entry + ++ sizeof(*pkt_entry) + ep->rx_prefix_size); ++} ++ ++static inline void *rxd_pkt_start(struct rxd_pkt_entry *pkt_entry) ++{ ++ return (void *) ((char *) pkt_entry + sizeof(*pkt_entry)); ++} ++ ++struct rxd_match_attr { ++ fi_addr_t peer; ++ uint64_t tag; + }; + ++static inline int rxd_match_addr(fi_addr_t addr, fi_addr_t match_addr) ++{ ++ return (addr == FI_ADDR_UNSPEC || addr == match_addr); ++} ++ ++static inline int rxd_match_tag(uint64_t tag, uint64_t ignore, uint64_t match_tag) ++{ ++ return ((tag | ignore ) == (match_tag | ignore)); ++} ++ + int rxd_info_to_core(uint32_t version, const struct fi_info *rxd_info, + struct fi_info *core_info); + int rxd_info_to_rxd(uint32_t version, const struct fi_info *core_info, +@@ -362,59 +368,92 @@ int rxd_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq_fid, void *context); + int rxd_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + struct fid_cntr **cntr_fid, void *context); +- ++int rxd_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, uint64_t flags); + + /* AV sub-functions */ +-int rxd_av_insert_dg_addr(struct rxd_av *av, uint64_t hint_index, +- const void *addr, fi_addr_t *dg_fiaddr); +-fi_addr_t rxd_av_dg_addr(struct rxd_av *av, fi_addr_t fi_addr); +-fi_addr_t rxd_av_fi_addr(struct rxd_av *av, fi_addr_t dg_fiaddr); +-int rxd_av_dg_reverse_lookup(struct rxd_av *av, uint64_t start_idx, +- const void *addr, fi_addr_t *dg_fiaddr); +- +-/* EP sub-functions */ +-void rxd_handle_send_comp(struct fi_cq_msg_entry *comp); +-void rxd_handle_recv_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp); +-int rxd_ep_repost_buff(struct rxd_rx_buf *rx_buf); +-int rxd_ep_reply_ack(struct rxd_ep *ep, struct ofi_ctrl_hdr *in_ctrl, +- uint8_t type, uint16_t seg_size, uint64_t rx_key, +- uint64_t source, fi_addr_t dest); +-struct rxd_peer *rxd_ep_getpeer_info(struct rxd_ep *rxd_ep, fi_addr_t addr); +- +-void rxd_ep_check_unexp_msg_list(struct rxd_ep *ep, +- struct rxd_recv_entry *recv_entry); +-void rxd_ep_check_unexp_tag_list(struct rxd_ep *ep, +- struct rxd_trecv_entry *trecv_entry); +-void rxd_ep_handle_data_msg(struct rxd_ep *ep, struct rxd_peer *peer, +- struct rxd_rx_entry *rx_entry, +- struct iovec *iov, size_t iov_count, +- struct ofi_ctrl_hdr *ctrl, void *data, +- struct rxd_rx_buf *rx_buf); +-void rxd_ep_free_acked_pkts(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry, +- uint32_t seg_no); +-ssize_t rxd_ep_start_xfer(struct rxd_ep *ep, struct rxd_peer *peer, +- uint8_t op, struct rxd_tx_entry *tx_entry); +-ssize_t rxd_ep_connect(struct rxd_ep *ep, struct rxd_peer *peer, fi_addr_t addr); +-int rxd_mr_verify(struct rxd_domain *rxd_domain, ssize_t len, +- uintptr_t *io_addr, uint64_t key, uint64_t access); +- ++int rxd_av_insert_dg_addr(struct rxd_av *av, const void *addr, ++ fi_addr_t *dg_fiaddr, uint64_t flags, ++ void *context); ++ ++/* Pkt resource functions */ ++int rxd_ep_post_buf(struct rxd_ep *ep); ++void rxd_release_repost_rx(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry); ++void rxd_ep_send_ack(struct rxd_ep *rxd_ep, fi_addr_t peer); ++struct rxd_pkt_entry *rxd_get_tx_pkt(struct rxd_ep *ep); ++void rxd_release_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt); ++void rxd_release_tx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt); ++struct rxd_x_entry *rxd_get_tx_entry(struct rxd_ep *ep); ++struct rxd_x_entry *rxd_get_rx_entry(struct rxd_ep *ep); ++void rxd_release_rx_entry(struct rxd_ep *ep, struct rxd_x_entry *x_entry); ++int rxd_ep_retry_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry); ++ssize_t rxd_ep_post_data_pkts(struct rxd_ep *ep, struct rxd_x_entry *tx_entry); ++void rxd_insert_unacked(struct rxd_ep *ep, fi_addr_t peer, ++ struct rxd_pkt_entry *pkt_entry); ++ssize_t rxd_send_rts_if_needed(struct rxd_ep *rxd_ep, fi_addr_t rxd_addr); ++int rxd_ep_send_op(struct rxd_ep *rxd_ep, struct rxd_x_entry *tx_entry, ++ const struct fi_rma_iov *rma_iov, size_t rma_count, ++ const struct iovec *comp_iov, size_t comp_count, ++ enum fi_datatype datatype, enum fi_op atomic_op); ++void rxd_init_data_pkt(struct rxd_ep *ep, struct rxd_x_entry *tx_entry, ++ struct rxd_pkt_entry *pkt_entry); ++void rxd_unpack_hdrs(size_t pkt_size, struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr **sar_hdr, struct rxd_tag_hdr **tag_hdr, ++ struct rxd_data_hdr **data_hdr, struct rxd_rma_hdr **rma_hdr, ++ struct rxd_atom_hdr **atom_hdr, void **msg, size_t *msg_size); + + /* Tx/Rx entry sub-functions */ +-struct rxd_tx_entry *rxd_tx_entry_alloc(struct rxd_ep *ep, +- struct rxd_peer *peer, fi_addr_t addr, uint64_t flags, uint8_t op); +-void rxd_tx_entry_progress(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); +-void rxd_tx_entry_discard(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); +-void rxd_tx_entry_free(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); +-void rxd_tx_entry_done(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); +-void rxd_set_timeout(struct rxd_tx_entry *tx_entry); +- +-void rxd_tx_pkt_free(struct rxd_pkt_meta *pkt_meta); +-void rxd_rx_entry_free(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry); +- ++struct rxd_x_entry *rxd_tx_entry_init(struct rxd_ep *ep, const struct iovec *iov, ++ size_t iov_count, const struct iovec *res_iov, ++ size_t res_count, size_t rma_count, ++ uint64_t data, uint64_t tag, void *context, ++ fi_addr_t addr, uint32_t op, uint32_t flags); ++struct rxd_x_entry *rxd_rx_entry_init(struct rxd_ep *ep, ++ const struct iovec *iov, size_t iov_count, uint64_t tag, ++ uint64_t ignore, void *context, fi_addr_t addr, ++ uint32_t op, uint32_t flags); ++void rxd_tx_entry_free(struct rxd_ep *ep, struct rxd_x_entry *tx_entry); ++void rxd_rx_entry_free(struct rxd_ep *ep, struct rxd_x_entry *rx_entry); ++int rxd_get_timeout(uint8_t retry_cnt); ++uint64_t rxd_get_retry_time(uint64_t start, uint8_t retry_cnt); ++ ++/* Generic message functions */ ++ssize_t rxd_ep_generic_recvmsg(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t ignore, void *context, uint32_t op, ++ uint32_t rxd_flags); ++ssize_t rxd_ep_generic_sendmsg(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t data, void *context, uint32_t op, ++ uint32_t rxd_flags); ++ssize_t rxd_ep_generic_inject(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t data, uint32_t op, uint32_t rxd_flags); ++ ++/* Progress functions */ ++void rxd_tx_entry_progress(struct rxd_ep *ep, struct rxd_x_entry *tx_entry, ++ int try_send); ++void rxd_handle_recv_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp); ++void rxd_handle_send_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp); ++void rxd_handle_error(struct rxd_ep *ep); ++void rxd_progress_op(struct rxd_ep *ep, struct rxd_x_entry *rx_entry, ++ struct rxd_pkt_entry *pkt_entry, ++ struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr *sar_hdr, ++ struct rxd_tag_hdr *tag_hdr, ++ struct rxd_data_hdr *data_hdr, ++ struct rxd_rma_hdr *rma_hdr, ++ struct rxd_atom_hdr *atom_hdr, ++ void **msg, size_t size); ++void rxd_progress_tx_list(struct rxd_ep *ep, struct rxd_peer *peer); ++struct rxd_x_entry *rxd_progress_multi_recv(struct rxd_ep *ep, ++ struct rxd_x_entry *rx_entry, ++ size_t total_size); + + /* CQ sub-functions */ + void rxd_cq_report_error(struct rxd_cq *cq, struct fi_cq_err_entry *err_entry); +-void rxd_cq_report_tx_comp(struct rxd_cq *cq, struct rxd_tx_entry *tx_entry); +-void rxd_cntr_report_tx_comp(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry); ++void rxd_cq_report_tx_comp(struct rxd_cq *cq, struct rxd_x_entry *tx_entry); ++void rxd_cntr_report_tx_comp(struct rxd_ep *ep, struct rxd_x_entry *tx_entry); ++void rxd_cntr_report_rx_comp(struct rxd_ep *ep, struct rxd_x_entry *rx_entry); + + #endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_atomic.c +new file mode 100644 +index 000000000..920849ac6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_atomic.c +@@ -0,0 +1,427 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++ ++#include "ofi_iov.h" ++#include "rxd.h" ++ ++static ssize_t rxd_generic_atomic(struct rxd_ep *rxd_ep, ++ const struct fi_ioc *ioc, void **desc, size_t count, ++ const struct fi_ioc *compare_ioc, void **compare_desc, ++ size_t compare_count, struct fi_ioc *result_ioc, ++ void **result_desc, size_t result_count, ++ fi_addr_t addr, const struct fi_rma_ioc *rma_ioc, ++ size_t rma_count, uint64_t data, enum fi_datatype datatype, ++ enum fi_op atomic_op, void *context, uint32_t op, ++ uint32_t rxd_flags) ++{ ++ struct rxd_x_entry *tx_entry; ++ struct iovec iov[RXD_IOV_LIMIT], res_iov[RXD_IOV_LIMIT], comp_iov[RXD_IOV_LIMIT]; ++ struct fi_rma_iov rma_iov[RXD_IOV_LIMIT]; ++ fi_addr_t rxd_addr; ++ ssize_t ret = -FI_EAGAIN; ++ ++ assert(count <= RXD_IOV_LIMIT); ++ assert(rma_count <= RXD_IOV_LIMIT); ++ ++ ofi_ioc_to_iov(ioc, iov, count, ofi_datatype_size(datatype)); ++ ++ assert(ofi_total_iov_len(iov, count) <= (op == RXD_ATOMIC_COMPARE) ? ++ rxd_ep_domain(rxd_ep)->max_inline_atom / 2 : ++ rxd_ep_domain(rxd_ep)->max_inline_atom); ++ ++ ofi_ioc_to_iov(result_ioc, res_iov, result_count, ofi_datatype_size(datatype)); ++ ofi_ioc_to_iov(compare_ioc, comp_iov, compare_count, ofi_datatype_size(datatype)); ++ ofi_rma_ioc_to_iov(rma_ioc, rma_iov, rma_count, ofi_datatype_size(datatype)); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, count, res_iov, result_count, rma_count, ++ data, 0, context, rxd_addr, op, rxd_flags); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, rma_iov, rma_count, comp_iov, ++ compare_count, datatype, atomic_op); ++ if (ret) ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++static ssize_t rxd_atomic_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, ++ NULL, NULL, 0, NULL, NULL, 0, msg->addr, ++ msg->rma_iov, msg->rma_iov_count, msg->data, ++ msg->datatype, msg->op, msg->context, ++ ofi_op_atomic, rxd_flags(flags)); ++} ++ ++static ssize_t rxd_atomic_writev(struct fid_ep *ep_fid, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct rxd_ep *ep; ++ struct fi_rma_ioc rma_iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ rma_iov.addr = addr; ++ rma_iov.count = ofi_total_ioc_cnt(iov, count); ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, iov, desc, count, NULL, NULL, 0, NULL, ++ NULL, 0, dest_addr, &rma_iov, 1, 0, datatype, ++ op, context, ofi_op_atomic, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_ioc iov; ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.addr = (void *) buf; ++ iov.count = count; ++ ++ rma_iov.addr = addr; ++ rma_iov.count = count; ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, &iov, &desc, 1, NULL, NULL, 0, NULL, NULL, 0, ++ dest_addr, &rma_iov, 1, 0, datatype, op, context, ++ ofi_op_atomic, rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_inject(struct fid_ep *ep_fid, const void *buf, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op) ++{ ++ struct rxd_ep *rxd_ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ struct rxd_x_entry *tx_entry; ++ struct iovec iov; ++ struct fi_rma_iov rma_iov; ++ fi_addr_t rxd_addr; ++ ssize_t ret = -FI_EAGAIN; ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = count * ofi_datatype_size(datatype); ++ assert(iov.iov_len <= rxd_ep_domain(rxd_ep)->max_inline_atom); ++ ++ rma_iov.addr = addr; ++ rma_iov.len = count * ofi_datatype_size(datatype); ++ rma_iov.key = key; ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, &iov, 1, NULL, 0, 1, 0, 0, NULL, ++ rxd_addr, ofi_op_atomic, ++ RXD_INJECT | RXD_NO_TX_COMP); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, &rma_iov, 1, NULL, 0, datatype, op); ++ if (ret) ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++static ssize_t rxd_atomic_readwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, ++ NULL, NULL, 0, resultv, result_desc, ++ result_count, msg->addr, ++ msg->rma_iov, msg->rma_iov_count, msg->data, ++ msg->datatype, msg->op, msg->context, ++ ofi_op_atomic_fetch, rxd_flags(flags)); ++} ++ ++static ssize_t rxd_atomic_readwritev(struct fid_ep *ep_fid, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ rma_iov.addr = addr; ++ rma_iov.count = ofi_total_ioc_cnt(iov, count); ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, iov, desc, count, NULL, NULL, 0, resultv, ++ result_desc, result_count, dest_addr, ++ &rma_iov, 1, 0, datatype, op, context, ++ ofi_op_atomic_fetch, rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, ++ size_t count, void *desc, void *result, ++ void *result_desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_ioc iov, resultv; ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.addr = (void *) buf; ++ iov.count = count; ++ ++ resultv.addr = result; ++ resultv.count = count; ++ ++ rma_iov.addr = addr; ++ rma_iov.count = count; ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, &iov, &desc, 1, NULL, NULL, 0, &resultv, ++ &result_desc, 1, dest_addr, &rma_iov, 1, 0, ++ datatype, op, context, ofi_op_atomic_fetch, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_compwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_generic_atomic(ep, msg->msg_iov, msg->desc, msg->iov_count, ++ comparev, compare_desc, compare_count, ++ resultv, result_desc, ++ result_count, msg->addr, ++ msg->rma_iov, msg->rma_iov_count, msg->data, ++ msg->datatype, msg->op, msg->context, ++ ofi_op_atomic_compare, rxd_flags(flags)); ++} ++ ++static ssize_t rxd_atomic_compwritev(struct fid_ep *ep_fid, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ rma_iov.addr = addr; ++ rma_iov.count = ofi_total_ioc_cnt(iov, count); ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, iov, desc, count, comparev, compare_desc, ++ compare_count, resultv, result_desc, ++ result_count, dest_addr, &rma_iov, 1, 0, ++ datatype, op, context, ofi_op_atomic_compare, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, ++ size_t count, void *desc, const void *compare, ++ void *compare_desc, void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_ioc iov, resultv, comparev; ++ struct fi_rma_ioc rma_iov; ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.addr = (void *) buf; ++ iov.count = count; ++ ++ resultv.addr = result; ++ resultv.count = count; ++ ++ comparev.addr = (void *) compare; ++ comparev.count = count; ++ ++ rma_iov.addr = addr; ++ rma_iov.count = count; ++ rma_iov.key = key; ++ ++ return rxd_generic_atomic(ep, &iov, &desc, 1, &comparev, &compare_desc, ++ 1, &resultv, &result_desc, 1, dest_addr, ++ &rma_iov, 1, 0, datatype, op, context, ++ ofi_op_atomic_compare, rxd_ep_tx_flags(ep)); ++} ++ ++int rxd_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, uint64_t flags) ++{ ++ struct rxd_domain *rxd_domain; ++ int ret; ++ size_t total_size; ++ ++ if (flags & FI_TAGGED) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "tagged atomic op not supported\n"); ++ return -FI_EINVAL; ++ } ++ ++ ret = ofi_atomic_valid(&rxd_prov, datatype, op, flags); ++ if (ret || !attr) ++ return ret; ++ ++ rxd_domain = container_of(domain, struct rxd_domain, ++ util_domain.domain_fid); ++ attr->size = ofi_datatype_size(datatype); ++ ++ total_size = (flags & FI_COMPARE_ATOMIC) ? rxd_domain->max_inline_atom / 2 : ++ rxd_domain->max_inline_atom; ++ attr->count = total_size / attr->size; ++ ++ return ret; ++} ++ ++static int rxd_atomic_valid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxd_query_atomic(&(container_of(ep, ++ struct util_ep, ep_fid))->domain->domain_fid, ++ datatype, op, &attr, 0); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++static int rxd_atomic_fetch_valid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxd_query_atomic(&(container_of(ep, ++ struct util_ep, ep_fid))->domain->domain_fid, ++ datatype, op, &attr, FI_FETCH_ATOMIC); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++static int rxd_atomic_comp_valid(struct fid_ep *ep, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxd_query_atomic(&(container_of(ep, ++ struct util_ep, ep_fid))->domain->domain_fid, ++ datatype, op, &attr, FI_COMPARE_ATOMIC); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++struct fi_ops_atomic rxd_ops_atomic = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = rxd_atomic_write, ++ .writev = rxd_atomic_writev, ++ .writemsg = rxd_atomic_writemsg, ++ .inject = rxd_atomic_inject, ++ .readwrite = rxd_atomic_readwrite, ++ .readwritev = rxd_atomic_readwritev, ++ .readwritemsg = rxd_atomic_readwritemsg, ++ .compwrite = rxd_atomic_compwrite, ++ .compwritev = rxd_atomic_compwritev, ++ .compwritemsg = rxd_atomic_compwritemsg, ++ .writevalid = rxd_atomic_valid, ++ .readwritevalid = rxd_atomic_fetch_valid, ++ .compwritevalid = rxd_atomic_comp_valid, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_attr.c +index 88e49fd63..f04039c74 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_attr.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -32,21 +32,26 @@ + + #include "rxd.h" + +-#define RXD_EP_CAPS (FI_MSG | FI_TAGGED | FI_DIRECTED_RECV | \ +- FI_RECV | FI_SEND | FI_SOURCE) ++#define RXD_EP_CAPS (FI_MSG | FI_TAGGED | FI_RMA | FI_ATOMIC | FI_SOURCE | \ ++ FI_DIRECTED_RECV | FI_MULTI_RECV | FI_RMA_EVENT) ++#define RXD_TX_CAPS (FI_SEND | FI_WRITE | FI_READ) ++#define RXD_RX_CAPS (FI_RECV | FI_REMOTE_READ | FI_REMOTE_WRITE) ++#define RXD_DOMAIN_CAPS (FI_LOCAL_COMM | FI_REMOTE_COMM) + + struct fi_tx_attr rxd_tx_attr = { +- .caps = RXD_EP_CAPS, +- .comp_order = FI_ORDER_STRICT, +- .inject_size = 0, ++ .caps = RXD_EP_CAPS | RXD_TX_CAPS, ++ .comp_order = FI_ORDER_NONE, ++ .msg_order = FI_ORDER_SAS, ++ .inject_size = RXD_MAX_MTU_SIZE - sizeof(struct rxd_base_hdr), + .size = (1ULL << RXD_MAX_TX_BITS), + .iov_limit = RXD_IOV_LIMIT, + .rma_iov_limit = 0, + }; + + struct fi_rx_attr rxd_rx_attr = { +- .caps = RXD_EP_CAPS, +- .comp_order = FI_ORDER_STRICT, ++ .caps = RXD_EP_CAPS | RXD_RX_CAPS, ++ .comp_order = FI_ORDER_NONE, ++ .msg_order = FI_ORDER_SAS, + .total_buffered_recv = 0, + .size = (1ULL << RXD_MAX_RX_BITS), + .iov_limit = RXD_IOV_LIMIT +@@ -62,11 +67,14 @@ struct fi_ep_attr rxd_ep_attr = { + }; + + struct fi_domain_attr rxd_domain_attr = { ++ .caps = RXD_DOMAIN_CAPS, + .threading = FI_THREAD_SAFE, + .control_progress = FI_PROGRESS_MANUAL, + .data_progress = FI_PROGRESS_MANUAL, + .resource_mgmt = FI_RM_ENABLED, + .av_type = FI_AV_UNSPEC, ++ .mr_mode = FI_MR_BASIC | FI_MR_SCALABLE, ++ .cq_data_size = sizeof_field(struct rxd_data_hdr, cq_data), + .mr_key_size = sizeof(uint64_t), + .cq_cnt = 128, + .ep_cnt = 128, +@@ -82,8 +90,8 @@ struct fi_fabric_attr rxd_fabric_attr = { + }; + + struct fi_info rxd_info = { +- .caps = RXD_EP_CAPS, +- .addr_format = FI_SOCKADDR, ++ .caps = RXD_DOMAIN_CAPS | RXD_EP_CAPS | RXD_TX_CAPS | RXD_RX_CAPS, ++ .addr_format = FI_FORMAT_UNSPEC, + .tx_attr = &rxd_tx_attr, + .rx_attr = &rxd_rx_attr, + .ep_attr = &rxd_ep_attr, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_av.c +index ddf7e1106..1593f07de 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_av.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2015-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -34,6 +34,23 @@ + #include + + ++static int rxd_tree_compare(struct ofi_rbmap *map, void *key, void *data) ++{ ++ struct rxd_av *av; ++ uint8_t addr[RXD_NAME_LENGTH]; ++ size_t len = RXD_NAME_LENGTH; ++ int ret; ++ ++ memset(addr, 0, len); ++ av = container_of(map, struct rxd_av, rbmap); ++ ret = fi_av_lookup(av->dg_av, av->rxd_addr_table[(fi_addr_t) data].dg_addr, ++ addr, &len); ++ if (ret) ++ return -1; ++ ++ return memcmp(key, addr, len); ++} ++ + /* + * The RXD code is agnostic wrt the datagram address format, but we need + * to know the size of the address in order to iterate over them. Because +@@ -46,13 +63,13 @@ static int rxd_av_set_addrlen(struct rxd_av *av, const void *addr) + struct rxd_domain *domain; + struct fid_av *tmp_av; + struct fi_av_attr attr; +- uint8_t tmp_addr[RXD_MAX_DGRAM_ADDR]; ++ uint8_t tmp_addr[RXD_NAME_LENGTH]; ++ fi_addr_t fiaddr; + size_t len; + int ret; + + FI_INFO(&rxd_prov, FI_LOG_AV, "determine dgram address len\n"); + memset(&attr, 0, sizeof attr); +- attr.type = FI_AV_TABLE; + attr.count = 1; + + domain = container_of(av->util_av.domain, struct rxd_domain, util_domain); +@@ -63,15 +80,16 @@ static int rxd_av_set_addrlen(struct rxd_av *av, const void *addr) + return ret; + } + +- ret = fi_av_insert(tmp_av, addr, 1, NULL, 0, NULL); ++ ret = fi_av_insert(tmp_av, addr, 1, &fiaddr, 0, NULL); + if (ret != 1) { + FI_WARN(&rxd_prov, FI_LOG_AV, "addr insert failed: %d (%s)\n", + -ret, fi_strerror(-ret)); ++ ret = -FI_EINVAL; + goto close; + } + + len = sizeof tmp_addr; +- ret = fi_av_lookup(tmp_av, 0, tmp_addr, &len); ++ ret = fi_av_lookup(tmp_av, fiaddr, tmp_addr, &len); + if (ret) { + FI_WARN(&rxd_prov, FI_LOG_AV, "addr lookup failed: %d (%s)\n", + -ret, fi_strerror(-ret)); +@@ -85,77 +103,77 @@ close: + return ret; + } + +-fi_addr_t rxd_av_dg_addr(struct rxd_av *av, fi_addr_t fi_addr) ++static fi_addr_t rxd_av_dg_addr(struct rxd_av *av, fi_addr_t fi_addr) + { +- uint64_t *dg_idx; ++ fi_addr_t rxd_addr = av->fi_addr_table[fi_addr]; + +- dg_idx = ofi_av_get_addr(&av->util_av, (int) fi_addr); +- return *dg_idx; ++ return rxd_addr == FI_ADDR_UNSPEC ? rxd_addr : ++ av->rxd_addr_table[rxd_addr].dg_addr; + } + +-fi_addr_t rxd_av_fi_addr(struct rxd_av *av, fi_addr_t dg_fiaddr) ++static fi_addr_t rxd_set_rxd_addr(struct rxd_av *av, fi_addr_t dg_addr) + { +- int ret; ++ int tries = 0; ++ ++ while (av->rxd_addr_table[av->rxd_addr_idx].dg_addr != FI_ADDR_UNSPEC && ++ tries < av->util_av.count) { ++ if (++av->rxd_addr_idx == av->util_av.count) ++ av->rxd_addr_idx = 0; ++ tries++; ++ } ++ assert(av->rxd_addr_idx < av->util_av.count && tries < av->util_av.count); ++ av->rxd_addr_table[av->rxd_addr_idx].dg_addr = dg_addr; + +- ret = ofi_av_lookup_index(&av->util_av, &dg_fiaddr, (int) dg_fiaddr); +- return (ret < 0) ? FI_ADDR_UNSPEC : ret; ++ return av->rxd_addr_idx; + } + +-int rxd_av_dg_reverse_lookup(struct rxd_av *av, uint64_t start_idx, +- const void *addr, fi_addr_t *dg_fiaddr) ++static fi_addr_t rxd_set_fi_addr(struct rxd_av *av, fi_addr_t rxd_addr) + { +- uint8_t curr_addr[RXD_MAX_DGRAM_ADDR]; +- size_t i, len; +- int ret; ++ int tries = 0; + +- for (i = 0; i < (size_t) av->dg_av_used; i++) { +- len = sizeof curr_addr; +- ret = fi_av_lookup(av->dg_av, (i + start_idx) % av->dg_av_used, +- curr_addr, &len); +- if (!ret) { +- *dg_fiaddr = (i + start_idx) % av->dg_av_used; +- FI_DBG(&rxd_prov, FI_LOG_AV, "found: %" PRIu64 "\n", +- *dg_fiaddr); +- return 0; +- } ++ while (av->fi_addr_table[av->fi_addr_idx] != FI_ADDR_UNSPEC && ++ tries < av->util_av.count) { ++ if (++av->fi_addr_idx == av->util_av.count) ++ av->fi_addr_idx = 0; ++ tries++; + } +- FI_DBG(&rxd_prov, FI_LOG_AV, "addr not found\n"); +- return -FI_ENODATA; ++ assert(av->fi_addr_idx < av->util_av.count && tries < av->util_av.count); ++ av->fi_addr_table[av->fi_addr_idx] = rxd_addr; ++ av->rxd_addr_table[rxd_addr].fi_addr = av->fi_addr_idx; ++ ++ return av->fi_addr_idx; + } + +-int rxd_av_insert_dg_addr(struct rxd_av *av, uint64_t hint_index, +- const void *addr, fi_addr_t *dg_fiaddr) ++int rxd_av_insert_dg_addr(struct rxd_av *av, const void *addr, ++ fi_addr_t *rxd_addr, uint64_t flags, ++ void *context) + { ++ fi_addr_t dg_addr; + int ret; + +- fastlock_acquire(&av->util_av.lock); +- if (!av->dg_addrlen) { +- ret = rxd_av_set_addrlen(av, addr); +- if (ret) +- goto out; +- ret = -FI_ENODATA; +- } else { +- ret = rxd_av_dg_reverse_lookup(av, hint_index, addr, dg_fiaddr); +- } ++ ret = fi_av_insert(av->dg_av, addr, 1, &dg_addr, ++ flags, context); ++ if (ret != 1) ++ return -FI_EINVAL; + +- if (ret == -FI_ENODATA) { +- ret = fi_av_insert(av->dg_av, addr, 1, dg_fiaddr, 0, NULL); +- if (ret == 1) { +- av->dg_av_used++; +- ret = 0; +- } ++ *rxd_addr = rxd_set_rxd_addr(av, dg_addr); ++ ++ ret = ofi_rbmap_insert(&av->rbmap, (void *) addr, (void *) (*rxd_addr)); ++ if (ret && ret != -FI_EALREADY) { ++ fi_av_remove(av->dg_av, &dg_addr, 1, flags); ++ return ret; + } +-out: +- fastlock_release(&av->util_av.lock); +- return ret; ++ ++ return 0; + } + + static int rxd_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + fi_addr_t *fi_addr, uint64_t flags, void *context) + { + struct rxd_av *av; +- int i = 0, index, ret = 0, success_cnt = 0, lookup = 1; +- uint64_t dg_fiaddr; ++ int i = 0, ret = 0, success_cnt = 0; ++ fi_addr_t rxd_addr, util_addr; ++ struct ofi_rbnode *node; + + av = container_of(av_fid, struct rxd_av, util_av.av_fid); + fastlock_acquire(&av->util_av.lock); +@@ -163,27 +181,26 @@ static int rxd_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + ret = rxd_av_set_addrlen(av, addr); + if (ret) + goto out; +- /* Skip lookups if this is the first insertion call. */ +- lookup = 0; + } + + for (; i < count; i++, addr = (uint8_t *) addr + av->dg_addrlen) { +- ret = lookup ? rxd_av_dg_reverse_lookup(av, i, addr, &dg_fiaddr) : +- -FI_ENODATA; +- if (ret) { +- ret = fi_av_insert(av->dg_av, addr, 1, &dg_fiaddr, +- flags, context); +- if (ret != 1) ++ node = ofi_rbmap_find(&av->rbmap, (void *) addr); ++ if (node) { ++ rxd_addr = (fi_addr_t) node->data; ++ } else { ++ ret = rxd_av_insert_dg_addr(av, addr, &rxd_addr, ++ flags, context); ++ if (ret) + break; + } + +- ret = ofi_av_insert_addr(&av->util_av, &dg_fiaddr, dg_fiaddr, &index); +- if (ret) +- break; ++ util_addr = av->rxd_addr_table[rxd_addr].fi_addr == FI_ADDR_UNSPEC ? ++ rxd_set_fi_addr(av, rxd_addr) : ++ av->rxd_addr_table[rxd_addr].fi_addr; ++ if (fi_addr) ++ fi_addr[i] = util_addr; + + success_cnt++; +- if (fi_addr) +- fi_addr[i] = index; + } + + if (ret) { +@@ -233,19 +250,44 @@ static int rxd_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count + uint64_t flags) + { + int ret = 0; +- size_t i; +- fi_addr_t dg_fiaddr; ++ size_t i, addrlen; ++ fi_addr_t rxd_addr; + struct rxd_av *av; ++ uint8_t addr[RXD_NAME_LENGTH]; ++ struct ofi_rbnode *node; + + av = container_of(av_fid, struct rxd_av, util_av.av_fid); + fastlock_acquire(&av->util_av.lock); + for (i = 0; i < count; i++) { +- dg_fiaddr = rxd_av_dg_addr(av, fi_addr[i]); +- ret = fi_av_remove(av->dg_av, &dg_fiaddr, 1, flags); ++ rxd_addr = av->fi_addr_table[fi_addr[i]]; ++ ++ addrlen = RXD_NAME_LENGTH; ++ ret = fi_av_lookup(av->dg_av, av->rxd_addr_table[rxd_addr].dg_addr, ++ addr, &addrlen); ++ if (ret) ++ goto err; ++ ++ node = ofi_rbmap_find(&av->rbmap, (void *) addr); ++ if (!node) ++ goto err; ++ ++ ofi_rbmap_delete(&av->rbmap, node); ++ ++ ret = fi_av_remove(av->dg_av, &av->rxd_addr_table[rxd_addr].dg_addr, ++ 1, flags); + if (ret) +- break; ++ goto err; ++ ++ av->fi_addr_table[fi_addr[i]] = FI_ADDR_UNSPEC; ++ av->rxd_addr_table[rxd_addr].fi_addr = FI_ADDR_UNSPEC; ++ av->rxd_addr_table[rxd_addr].dg_addr = FI_ADDR_UNSPEC; + av->dg_av_used--; + } ++ ++err: ++ if (ret) ++ FI_WARN(&rxd_prov, FI_LOG_AV, "Unable to remove address from AV\n"); ++ + fastlock_release(&av->util_av.lock); + return ret; + } +@@ -262,11 +304,14 @@ static int rxd_av_lookup(struct fid_av *av, fi_addr_t fi_addr, void *addr, + size_t *addrlen) + { + struct rxd_av *rxd_av; +- fi_addr_t dg_addr; ++ fi_addr_t dg_fiaddr; + + rxd_av = container_of(av, struct rxd_av, util_av.av_fid); +- dg_addr = rxd_av_dg_addr(rxd_av, fi_addr); +- return fi_av_lookup(rxd_av->dg_av, dg_addr, addr, addrlen); ++ dg_fiaddr = rxd_av_dg_addr(rxd_av, fi_addr); ++ if (dg_fiaddr == FI_ADDR_UNSPEC) ++ return -FI_ENODATA; ++ ++ return fi_av_lookup(rxd_av->dg_av, dg_fiaddr, addr, addrlen); + } + + static struct fi_ops_av rxd_av_ops = { +@@ -293,6 +338,8 @@ static int rxd_av_close(struct fid *fid) + if (ret) + return ret; + ++ free(av->fi_addr_table); ++ free(av->rxd_addr_table); + free(av); + return 0; + } +@@ -313,7 +360,7 @@ static struct fi_ops rxd_av_fi_ops = { + int rxd_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, + struct fid_av **av_fid, void *context) + { +- int ret; ++ int ret, i; + struct rxd_av *av; + struct rxd_domain *domain; + struct util_av_attr util_attr; +@@ -325,24 +372,40 @@ int rxd_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, + if (attr->name) + return -FI_ENOSYS; + ++ attr->count = roundup_power_of_two(attr->count ? ++ attr->count : RXD_DEFAULT_AV_SIZE); + domain = container_of(domain_fid, struct rxd_domain, util_domain.domain_fid); + av = calloc(1, sizeof(*av)); + if (!av) + return -FI_ENOMEM; ++ av->fi_addr_table = calloc(1, attr->count * sizeof(fi_addr_t)); ++ av->rxd_addr_table = calloc(1, rxd_env.max_peers * sizeof(struct rxd_addr)); ++ if (!av->fi_addr_table || !av->rxd_addr_table) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ + + util_attr.addrlen = sizeof(fi_addr_t); +- util_attr.overhead = attr->count; +- util_attr.flags = OFI_AV_HASH; +- if (attr->type == FI_AV_UNSPEC) +- attr->type = FI_AV_TABLE; ++ util_attr.flags = 0; ++ attr->type = domain->util_domain.av_type != FI_AV_UNSPEC ? ++ domain->util_domain.av_type : FI_AV_TABLE; + + ret = ofi_av_init(&domain->util_domain, attr, &util_attr, + &av->util_av, context); + if (ret) + goto err1; + ++ av->rbmap.compare = &rxd_tree_compare; ++ ofi_rbmap_init(&av->rbmap); ++ for (i = 0; i < attr->count; av->fi_addr_table[i++] = FI_ADDR_UNSPEC) ++ ; ++ for (i = 0; i < rxd_env.max_peers; i++) { ++ av->rxd_addr_table[i].fi_addr = FI_ADDR_UNSPEC; ++ av->rxd_addr_table[i].dg_addr = FI_ADDR_UNSPEC; ++ } ++ + av_attr = *attr; +- av_attr.type = FI_AV_TABLE; + av_attr.count = 0; + av_attr.flags = 0; + ret = fi_av_open(domain->dg_domain, &av_attr, &av->dg_av, context); +@@ -357,6 +420,8 @@ int rxd_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, + err2: + ofi_av_close(&av->util_av); + err1: ++ free(av->fi_addr_table); ++ free(av->rxd_addr_table); + free(av); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cntr.c +index bc6ad12bc..a6f2dcc24 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cntr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cntr.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -35,6 +35,55 @@ + + #define RXD_FLAG(flag, mask) (((flag) & (mask)) == (mask)) + ++static int rxd_cntr_wait(struct fid_cntr *cntr_fid, uint64_t threshold, int timeout) ++{ ++ struct fid_list_entry *fid_entry; ++ struct util_cntr *cntr; ++ struct rxd_ep *ep; ++ uint64_t start, errcnt; ++ int ret, ep_retry; ++ ++ cntr = container_of(cntr_fid, struct util_cntr, cntr_fid); ++ assert(cntr->wait); ++ errcnt = ofi_atomic_get64(&cntr->err); ++ start = (timeout >= 0) ? fi_gettime_ms() : 0; ++ ++ do { ++ cntr->progress(cntr); ++ if (threshold <= ofi_atomic_get64(&cntr->cnt)) ++ return FI_SUCCESS; ++ ++ if (errcnt != ofi_atomic_get64(&cntr->err)) ++ return -FI_EAVAIL; ++ ++ if (timeout >= 0) { ++ timeout -= (int) (fi_gettime_ms() - start); ++ if (timeout <= 0) ++ return -FI_ETIMEDOUT; ++ } ++ ++ ep_retry = -1; ++ fastlock_acquire(&cntr->ep_list_lock); ++ dlist_foreach_container(&cntr->ep_list, struct fid_list_entry, ++ fid_entry, entry) { ++ ep = container_of(fid_entry->fid, struct rxd_ep, ++ util_ep.ep_fid.fid); ++ if (ep->next_retry == -1) ++ continue; ++ ep_retry = ep_retry == -1 ? ep->next_retry : ++ MIN(ep_retry, ep->next_retry); ++ } ++ fastlock_release(&cntr->ep_list_lock); ++ ++ ret = fi_wait(&cntr->wait->wait_fid, ep_retry == -1 ? ++ timeout : rxd_get_timeout(ep_retry)); ++ if (ep_retry != -1 && ret == -FI_ETIMEDOUT) ++ ret = 0; ++ } while (!ret); ++ ++ return ret; ++} ++ + int rxd_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + struct fid_cntr **cntr_fid, void *context) + { +@@ -51,6 +100,7 @@ int rxd_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, + goto free; + + *cntr_fid = &cntr->cntr_fid; ++ cntr->cntr_fid.ops->wait = rxd_cntr_wait; + return FI_SUCCESS; + + free: +@@ -58,30 +108,22 @@ free: + return ret; + } + +-void rxd_cntr_report_tx_comp(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry) ++void rxd_cntr_report_tx_comp(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) + { +- struct util_cntr *cntr; ++ uint64_t flags = tx_entry->cq_entry.flags & ++ (FI_SEND | FI_WRITE | FI_READ); + +- switch (tx_entry->op_type) { +- case RXD_TX_MSG: +- case RXD_TX_TAG: +- cntr = ep->util_ep.tx_cntr; +- break; +- case RXD_TX_WRITE: +- cntr = ep->util_ep.wr_cntr; +- break; +- case RXD_TX_READ_REQ: +- cntr = ep->util_ep.rem_rd_cntr; +- break; +- case RXD_TX_READ_RSP: +- return; +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type\n"); +- return; +- } ++ assert(ofi_lsb(flags) == ofi_msb(flags)); ++ ofi_ep_cntr_inc_funcs[flags](&ep->util_ep); ++} + +- if (cntr) +- cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); ++void rxd_cntr_report_rx_comp(struct rxd_ep *ep, struct rxd_x_entry *rx_entry) ++{ ++ uint64_t flags = rx_entry->cq_entry.flags & ++ (FI_RECV | FI_REMOTE_WRITE | FI_REMOTE_READ); ++ ++ assert(ofi_lsb(flags) == ofi_msb(flags)); ++ ofi_ep_cntr_inc_funcs[flags](&ep->util_ep); + } + + void rxd_cntr_report_error(struct rxd_ep *ep, struct fi_cq_err_entry *err) +@@ -98,6 +140,3 @@ void rxd_cntr_report_error(struct rxd_ep *ep, struct fi_cq_err_entry *err) + if (cntr) + cntr->cntr_fid.ops->adderr(&cntr->cntr_fid, 1); + } +- +- +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cq.c +index 6a929b770..ecd807423 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_cq.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -68,6 +68,7 @@ static int rxd_cq_write_ctx(struct rxd_cq *cq, + struct fi_cq_tagged_entry *cq_entry) + { + struct fi_cq_tagged_entry *comp; ++ + if (ofi_cirque_isfull(cq->util_cq.cirq)) + return -FI_ENOSPC; + +@@ -157,979 +158,1042 @@ static int rxd_cq_write_tagged_signal(struct rxd_cq *cq, + return ret; + } + +-static int rxd_check_start_pkt_order(struct rxd_ep *ep, struct rxd_peer *peer, +- struct ofi_ctrl_hdr *ctrl, +- struct fi_cq_msg_entry *comp) ++void rxd_rx_entry_free(struct rxd_ep *ep, struct rxd_x_entry *rx_entry) + { +- uint64_t msg_id; +- +- msg_id = ctrl->msg_id >> RXD_MAX_TX_BITS; +- if (peer->exp_msg_id == msg_id) +- return 0; +- +- return (peer->exp_msg_id > msg_id) ? +- -FI_EALREADY : -FI_EINVAL; ++ rx_entry->op = RXD_NO_OP; ++ dlist_remove(&rx_entry->entry); ++ rxd_release_rx_entry(ep, rx_entry); + } + +-static int rxd_rx_entry_match(struct dlist_entry *item, const void *arg) ++static int rxd_match_pkt_entry(struct slist_entry *item, const void *arg) + { +- const struct ofi_ctrl_hdr *ctrl = arg; +- struct rxd_rx_entry *rx_entry; ++ return ((struct rxd_pkt_entry *) arg == ++ container_of(item, struct rxd_pkt_entry, s_entry)); ++} + +- rx_entry = container_of(item, struct rxd_rx_entry, entry); +- return (rx_entry->msg_id == ctrl->msg_id && rx_entry->peer == ctrl->conn_id); +-} +- +-static void rxd_handle_dup_datastart(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_buf *rx_buf) ++static void rxd_remove_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- struct dlist_entry *item; +- struct rxd_rx_entry *rx_entry; +- struct rxd_peer *peer; ++ struct slist_entry *item; + +- peer = rxd_ep_getpeer_info(ep, ctrl->conn_id); +- item = dlist_find_first_match(&ep->rx_entry_list, +- rxd_rx_entry_match, ctrl); ++ item = slist_remove_first_match(&ep->rx_pkt_list, rxd_match_pkt_entry, ++ pkt_entry); + if (!item) { +- /* for small (1-packet) messages we may have situation +- * when receiver completed operation and destroyed +- * rx_entry, but ack is lost (not delivered to sender). +- * in this case just send ack with zero window to +- * allow sender complete operation on sender side */ +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, 0, UINT64_MAX, +- peer->conn_data, ctrl->conn_id); +- return; ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "could not find posted rx to release\n"); + } ++} + +- FI_INFO(&rxd_prov, FI_LOG_EP_CTRL, +- "duplicate start-data: msg_id: %" PRIu64 ", seg_no: %d\n", +- ctrl->msg_id, ctrl->seg_no); ++void rxd_release_repost_rx(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) ++{ ++ rxd_release_rx_pkt(ep, pkt_entry); ++ rxd_ep_post_buf(ep); ++} + +- rx_entry = container_of(item, struct rxd_rx_entry, entry); +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, rx_entry->credits, rx_entry->key, +- peer->conn_data, ctrl->conn_id); +- return; ++void rxd_cq_report_error(struct rxd_cq *cq, struct fi_cq_err_entry *err_entry) ++{ ++ struct fi_cq_tagged_entry cq_entry = {0}; ++ struct util_cq_oflow_err_entry *entry = calloc(1, sizeof(*entry)); ++ if (!entry) { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "out of memory, cannot report CQ error\n"); ++ return; ++ } ++ ++ entry->comp = *err_entry; ++ slist_insert_tail(&entry->list_entry, &cq->util_cq.oflow_err_list); ++ cq_entry.flags = UTIL_FLAG_ERROR; ++ cq->write_fn(cq, &cq_entry); + } + +-static void rxd_handle_conn_req(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct fi_cq_msg_entry *comp, +- struct rxd_rx_buf *rx_buf) ++static void rxd_complete_rx(struct rxd_ep *ep, struct rxd_x_entry *rx_entry) + { +- struct rxd_pkt_data *pkt_data; +- struct rxd_peer *peer_info; +- fi_addr_t dg_fiaddr; +- void *addr; +- int ret; ++ struct fi_cq_err_entry err_entry; ++ struct rxd_cq *rx_cq = rxd_ep_rx_cq(ep); ++ int write_cq = rx_entry->cq_entry.flags & (FI_RECV | FI_REMOTE_CQ_DATA); + +- FI_INFO(&rxd_prov, FI_LOG_EP_DATA, +- "conn req - rx_key: %" PRIu64 "\n", ctrl->rx_key); ++ if (rx_entry->flags & (RXD_NO_RX_COMP | RXD_CANCELLED)) ++ goto out; + +- pkt_data = (struct rxd_pkt_data *) ctrl; +- addr = pkt_data->data; +- if (ctrl->seg_size > RXD_MAX_DGRAM_ADDR) { +- FI_WARN(&rxd_prov, FI_LOG_EP_DATA, "addr too large\n"); +- goto repost; ++ if (rx_entry->bytes_done == rx_entry->cq_entry.len) { ++ rxd_cntr_report_rx_comp(ep, rx_entry); ++ if (write_cq) ++ rx_cq->write_fn(rx_cq, &rx_entry->cq_entry); ++ } else if (write_cq) { ++ memset(&err_entry, 0, sizeof(err_entry)); ++ err_entry.op_context = rx_entry->cq_entry.op_context; ++ err_entry.flags = rx_entry->cq_entry.flags; ++ err_entry.len = rx_entry->bytes_done; ++ err_entry.err = FI_ETRUNC; ++ err_entry.prov_errno = 0; ++ rxd_cq_report_error(rx_cq, &err_entry); + } + +- ret = rxd_av_insert_dg_addr(rxd_ep_av(ep), ctrl->rx_key, addr, &dg_fiaddr); +- if (ret) { +- FI_WARN(&rxd_prov, FI_LOG_EP_DATA, "failed to insert peer address\n"); +- goto repost; +- } ++out: ++ rxd_rx_entry_free(ep, rx_entry); ++} + +- peer_info = rxd_ep_getpeer_info(ep, dg_fiaddr); +- if (peer_info->state != CMAP_CONNECTED) { +- peer_info->state = CMAP_CONNECTED; +- peer_info->conn_data = ctrl->conn_id; +- peer_info->exp_msg_id++; +- } ++static void rxd_complete_tx(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) ++{ ++ struct rxd_cq *tx_cq = rxd_ep_tx_cq(ep); + +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_connresp, 0, ctrl->conn_id, +- dg_fiaddr, dg_fiaddr); +-repost: +- rxd_ep_repost_buff(rx_buf); ++ if (tx_entry->flags & RXD_NO_TX_COMP) ++ goto out; ++ ++ tx_cq->write_fn(tx_cq, &tx_entry->cq_entry); ++ ++out: ++ rxd_cntr_report_tx_comp(ep, tx_entry); ++ rxd_tx_entry_free(ep, tx_entry); + } + +-int rxd_tx_pkt_match(struct dlist_entry *item, const void *arg) ++static int rxd_comp_pkt_seq_no(struct dlist_entry *item, const void *arg) + { +- const struct ofi_ctrl_hdr *pkt_ctrl, *ack_ctrl = arg; +- struct rxd_pkt_meta *tx_pkt; ++ struct rxd_base_hdr *list_hdr; ++ struct rxd_base_hdr *new_hdr; + +- tx_pkt = container_of(item, struct rxd_pkt_meta, entry); +- pkt_ctrl = (struct ofi_ctrl_hdr *) tx_pkt->pkt_data; +- return (ack_ctrl->seg_no == pkt_ctrl->seg_no) ? 1 : 0; ++ list_hdr = rxd_get_base_hdr(container_of(item, ++ struct rxd_pkt_entry, d_entry)); ++ ++ new_hdr = rxd_get_base_hdr(container_of((struct dlist_entry *) arg, ++ struct rxd_pkt_entry, d_entry)); ++ ++ return new_hdr->seq_no > list_hdr->seq_no; + } + +-static void rxd_handle_ack(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_buf *rx_buf) ++static void rxd_ep_recv_data(struct rxd_ep *ep, struct rxd_x_entry *x_entry, ++ struct rxd_data_pkt *pkt, size_t size) + { +- struct rxd_tx_entry *tx_entry; +- uint64_t idx; ++ struct rxd_domain *rxd_domain = rxd_ep_domain(ep); ++ uint64_t done; ++ struct iovec *iov; ++ size_t iov_count; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "ack- msg_id: %" PRIu64 ", segno: %d, segsz: %d, buf: %p\n", +- ctrl->msg_id, ctrl->seg_no, ctrl->seg_size, rx_buf); ++ if (x_entry->cq_entry.flags & FI_ATOMIC) { ++ iov = x_entry->res_iov; ++ iov_count = x_entry->res_count; ++ } else { ++ iov = x_entry->iov; ++ iov_count = x_entry->iov_count; ++ } + +- idx = ctrl->msg_id & RXD_TX_IDX_BITS; +- tx_entry = &ep->tx_entry_fs->buf[idx]; +- if (tx_entry->msg_id != ctrl->msg_id) +- goto out; ++ done = ofi_copy_to_iov(iov, iov_count, x_entry->offset + ++ (pkt->ext_hdr.seg_no * rxd_domain->max_seg_sz), ++ pkt->msg, size - sizeof(struct rxd_data_pkt) - ++ ep->rx_prefix_size); + +- rxd_ep_free_acked_pkts(ep, tx_entry, ctrl->seg_no); +- if ((tx_entry->bytes_sent == tx_entry->op_hdr.size) && +- dlist_empty(&tx_entry->pkt_list)) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "reporting TX completion : %p\n", tx_entry); +- if (tx_entry->op_type != RXD_TX_READ_REQ) { +- rxd_cq_report_tx_comp(rxd_ep_tx_cq(ep), tx_entry); +- rxd_cntr_report_tx_comp(ep, tx_entry); +- rxd_tx_entry_free(ep, tx_entry); +- } ++ x_entry->bytes_done += done; ++ ep->peers[pkt->base_hdr.peer].rx_seq_no++; ++ x_entry->next_seg_no++; ++ ++ if (x_entry->next_seg_no < x_entry->num_segs) { ++ if (!(ep->peers[pkt->base_hdr.peer].rx_seq_no % ++ ep->peers[pkt->base_hdr.peer].rx_window)) ++ rxd_ep_send_ack(ep, pkt->base_hdr.peer); ++ return; ++ } ++ rxd_ep_send_ack(ep, pkt->base_hdr.peer); ++ ++ if (x_entry->cq_entry.flags & FI_READ) { ++ fastlock_acquire(&ep->util_ep.tx_cq->cq_lock); ++ rxd_complete_tx(ep, x_entry); ++ fastlock_release(&ep->util_ep.tx_cq->cq_lock); + } else { +- tx_entry->rx_key = ctrl->rx_key; +- /* do not allow reduce window size (on duplicate acks) */ +- tx_entry->window = MAX(tx_entry->window, ctrl->seg_no + ctrl->seg_size); +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "ack- msg_id: %" PRIu64 ", window: %d\n", +- ctrl->msg_id, tx_entry->window); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ rxd_complete_rx(ep, x_entry); ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); + } +-out: +- rxd_ep_repost_buff(rx_buf); + } + +-/* +- * Discarded transfers were discarded by the receiving side, so we abort +- * transferring the rest of the data. However, the completion is still +- * reported to the sender as successful. This ensures that short and long +- * messages are treated the same, since short messages would be entirely +- * buffered at the receiver, with no notification that the application later +- * discarded the message. +- */ +-static void rxd_handle_discard(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_buf *rx_buf) ++static void rxd_verify_active(struct rxd_ep *ep, fi_addr_t addr, fi_addr_t peer_addr) + { +- struct rxd_tx_entry *tx_entry; +- uint64_t idx; ++ struct rxd_pkt_entry *pkt_entry; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "discard- msg_id: %" PRIu64 ", segno: %d\n", +- ctrl->msg_id, ctrl->seg_no); +- +- idx = ctrl->msg_id & RXD_TX_IDX_BITS; +- tx_entry = &ep->tx_entry_fs->buf[idx]; +- if (tx_entry->msg_id == ctrl->msg_id) { +- rxd_cq_report_tx_comp(rxd_ep_tx_cq(ep), tx_entry); +- rxd_cntr_report_tx_comp(ep, tx_entry); +- rxd_tx_entry_done(ep, tx_entry); ++ if (ep->peers[addr].peer_addr == peer_addr && ++ ep->peers[addr].peer_addr != FI_ADDR_UNSPEC) ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "overwriting active peer - unexpected behavior\n"); ++ ++ ep->peers[addr].peer_addr = peer_addr; ++ ++ if (!dlist_empty(&ep->peers[addr].unacked) && ++ rxd_get_base_hdr(container_of((&ep->peers[addr].unacked)->next, ++ struct rxd_pkt_entry, d_entry))->type == RXD_RTS) { ++ dlist_pop_front(&ep->peers[addr].unacked, ++ struct rxd_pkt_entry, pkt_entry, d_entry); ++ if (pkt_entry->flags & RXD_PKT_IN_USE) { ++ dlist_insert_tail(&pkt_entry->d_entry, &ep->ctrl_pkts); ++ pkt_entry->flags |= RXD_PKT_ACKED; ++ } else { ++ rxd_release_tx_pkt(ep, pkt_entry); ++ ep->peers[addr].unacked_cnt--; ++ } ++ dlist_remove(&ep->peers[addr].entry); + } + +- rxd_ep_repost_buff(rx_buf); ++ if (!ep->peers[addr].active) { ++ dlist_insert_tail(&ep->peers[addr].entry, &ep->active_peers); ++ ep->peers[addr].retry_cnt = 0; ++ ep->peers[addr].active = 1; ++ } + } + +-void rxd_tx_pkt_free(struct rxd_pkt_meta *pkt_meta) ++static int rxd_move_tx_pkt(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) + { +- util_buf_release(pkt_meta->ep->tx_pkt_pool, pkt_meta); ++ struct rxd_base_hdr *hdr = rxd_get_base_hdr(tx_entry->pkt); ++ ++ if (ep->peers[tx_entry->peer].unacked_cnt >= rxd_env.max_unacked) ++ return 0; ++ ++ tx_entry->start_seq = rxd_set_pkt_seq(&ep->peers[tx_entry->peer], ++ tx_entry->pkt); ++ if (tx_entry->op != RXD_READ_REQ && tx_entry->num_segs > 1) { ++ ep->peers[tx_entry->peer].tx_seq_no = tx_entry->start_seq + ++ tx_entry->num_segs; ++ } ++ hdr->peer = ep->peers[tx_entry->peer].peer_addr; ++ rxd_insert_unacked(ep, tx_entry->peer, tx_entry->pkt); ++ tx_entry->pkt = NULL; ++ ++ if (tx_entry->op == RXD_READ_REQ || tx_entry->op == RXD_ATOMIC_FETCH || ++ tx_entry->op == RXD_ATOMIC_COMPARE) { ++ dlist_remove(&tx_entry->entry); ++ dlist_insert_tail(&tx_entry->entry, ++ &ep->peers[tx_entry->peer].rma_rx_list); ++ } ++ ++ return ep->peers[tx_entry->peer].unacked_cnt < rxd_env.max_unacked; + } + +-void rxd_tx_entry_done(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry) ++void rxd_progress_tx_list(struct rxd_ep *ep, struct rxd_peer *peer) + { +- struct rxd_pkt_meta *pkt_meta; +- +- while (!dlist_empty(&tx_entry->pkt_list)) { +- pkt_meta = container_of(tx_entry->pkt_list.next, +- struct rxd_pkt_meta, entry); +- dlist_remove(&pkt_meta->entry); +- if (pkt_meta->flags & RXD_LOCAL_COMP) +- rxd_tx_pkt_free(pkt_meta); +- else +- pkt_meta->flags |= RXD_REMOTE_ACK; ++ struct dlist_entry *tmp_entry; ++ struct rxd_x_entry *tx_entry; ++ uint64_t head_seq = peer->last_rx_ack; ++ ++ if (!dlist_empty(&peer->unacked)) { ++ head_seq = rxd_get_base_hdr(container_of( ++ (&peer->unacked)->next, ++ struct rxd_pkt_entry, d_entry))->seq_no; + } +- rxd_tx_entry_free(ep, tx_entry); ++ ++ if (peer->peer_addr == FI_ADDR_UNSPEC) ++ return; ++ ++ dlist_foreach_container_safe(&peer->tx_list, struct rxd_x_entry, ++ tx_entry, entry, tmp_entry) { ++ if (tx_entry->pkt) { ++ if (!rxd_move_tx_pkt(ep, tx_entry) || ++ tx_entry->op == RXD_READ_REQ) ++ break; ++ } ++ ++ if (tx_entry->bytes_done == tx_entry->cq_entry.len) { ++ if (ofi_before(tx_entry->start_seq + (tx_entry->num_segs - 1), ++ head_seq)) { ++ if (tx_entry->op == RXD_DATA_READ) { ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ rxd_complete_rx(ep, tx_entry); ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ } else { ++ fastlock_acquire(&ep->util_ep.tx_cq->cq_lock); ++ rxd_complete_tx(ep, tx_entry); ++ fastlock_release(&ep->util_ep.tx_cq->cq_lock); ++ } ++ } ++ continue; ++ } ++ ++ if (!rxd_ep_post_data_pkts(ep, tx_entry)) ++ break; ++ } ++ ++ if (dlist_empty(&peer->tx_list)) ++ peer->retry_cnt = 0; + } + +-static int rxd_conn_msg_match(struct dlist_entry *item, const void *arg) ++static void rxd_update_peer(struct rxd_ep *ep, fi_addr_t peer, fi_addr_t peer_addr) + { +- struct rxd_tx_entry *tx_entry; +- struct ofi_ctrl_hdr *ctrl = (struct ofi_ctrl_hdr *) arg; +- tx_entry = container_of(item, struct rxd_tx_entry, entry); +- return (tx_entry->op_type == RXD_TX_CONN && +- tx_entry->peer == ctrl->rx_key); ++ rxd_verify_active(ep, peer, peer_addr); ++ rxd_progress_tx_list(ep, &ep->peers[peer]); + } + +-static void rxd_handle_connect_ack(struct rxd_ep *ep, struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_buf *rx_buf) ++static int rxd_send_cts(struct rxd_ep *rxd_ep, struct rxd_rts_pkt *rts_pkt, ++ fi_addr_t peer) + { +- struct rxd_peer *peer; +- struct dlist_entry *match; +- struct rxd_tx_entry *tx_entry; ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_cts_pkt *cts; ++ int ret = 0; + +- FI_INFO(&rxd_prov, FI_LOG_EP_CTRL, +- "connect ack- msg_id: %" PRIu64 ", segno: %d\n", +- ctrl->msg_id, ctrl->seg_no); ++ rxd_update_peer(rxd_ep, peer, rts_pkt->rts_addr); + +- match = dlist_find_first_match(&ep->tx_entry_list, +- rxd_conn_msg_match, ctrl); +- if (!match) { +- FI_INFO(&rxd_prov, FI_LOG_EP_CTRL, "no matching connect\n"); +- goto out; +- } ++ pkt_entry = rxd_get_tx_pkt(rxd_ep); ++ if (!pkt_entry) ++ return -FI_ENOMEM; + +- tx_entry = container_of(match, struct rxd_tx_entry, entry); +- peer = rxd_ep_getpeer_info(ep, tx_entry->peer); +- peer->state = CMAP_CONNECTED; +- peer->conn_data = ctrl->conn_id; ++ cts = (struct rxd_cts_pkt *) (pkt_entry->pkt); ++ pkt_entry->pkt_size = sizeof(*cts) + rxd_ep->tx_prefix_size; ++ pkt_entry->peer = peer; + +- dlist_remove(match); +- rxd_tx_entry_done(ep, tx_entry); +-out: +- rxd_ep_repost_buff(rx_buf); +-} ++ cts->base_hdr.version = RXD_PROTOCOL_VERSION; ++ cts->base_hdr.type = RXD_CTS; ++ cts->cts_addr = peer; ++ cts->rts_addr = rts_pkt->rts_addr; + +-static void rxd_set_rx_credits(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry) +-{ +- size_t num_pkts, avail, size_left; +- +- size_left = rx_entry->op_hdr.size - rx_entry->done; +- num_pkts = (size_left + rxd_ep_domain(ep)->max_mtu_sz - 1) / +- rxd_ep_domain(ep)->max_mtu_sz; +- avail = MIN(ep->credits, num_pkts); +- rx_entry->credits = MIN(avail, RXD_MAX_RX_CREDITS); +- rx_entry->last_win_seg += rx_entry->credits; +- ep->credits -= rx_entry->credits; ++ dlist_insert_tail(&pkt_entry->d_entry, &rxd_ep->ctrl_pkts); ++ ret = rxd_ep_retry_pkt(rxd_ep, pkt_entry); ++ if (ret) { ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(rxd_ep, pkt_entry); ++ } ++ ++ return ret; + } + +-static struct rxd_rx_entry *rxd_rx_entry_alloc(struct rxd_ep *ep) ++static int rxd_match_msg(struct dlist_entry *item, const void *arg) + { +- struct rxd_rx_entry *rx_entry; ++ struct rxd_match_attr *attr = (struct rxd_match_attr *) arg; ++ struct rxd_x_entry *rx_entry; + +- if (freestack_isempty(ep->rx_entry_fs)) +- return NULL; ++ rx_entry = container_of(item, struct rxd_x_entry, entry); + +- rx_entry = freestack_pop(ep->rx_entry_fs); +- rx_entry->key = rx_entry - &ep->rx_entry_fs->buf[0]; +- dlist_insert_tail(&rx_entry->entry, &ep->rx_entry_list); +- return rx_entry; ++ return rxd_match_addr(rx_entry->peer, attr->peer); + } + +-static void rxd_progress_wait_rx(struct rxd_ep *ep, +- struct rxd_rx_entry *rx_entry) ++static int rxd_match_tmsg(struct dlist_entry *item, const void *arg) + { +- struct ofi_ctrl_hdr ctrl; ++ struct rxd_match_attr *attr = (struct rxd_match_attr *) arg; ++ struct rxd_x_entry *rx_entry; + +- rxd_set_rx_credits(ep, rx_entry); +- if (!rx_entry->credits) +- return; ++ rx_entry = container_of(item, struct rxd_x_entry, entry); + +- dlist_remove(&rx_entry->wait_entry); ++ return rxd_match_addr(rx_entry->peer, attr->peer) && ++ rxd_match_tag(rx_entry->cq_entry.tag, rx_entry->ignore, ++ attr->tag); ++} + +- ctrl.msg_id = rx_entry->msg_id; +- ctrl.seg_no = rx_entry->exp_seg_no - 1; +- ctrl.conn_id = rx_entry->peer; ++static void rxd_check_post_unexp(struct rxd_ep *ep, struct dlist_entry *list, ++ struct rxd_pkt_entry *pkt_entry) ++{ ++ struct rxd_pkt_entry *unexp_entry; ++ struct rxd_base_hdr *new_hdr = rxd_get_base_hdr(pkt_entry); ++ struct rxd_base_hdr *unexp_hdr; ++ ++ if (!rxd_env.retry) ++ goto insert; ++ ++ dlist_foreach_container(list, struct rxd_pkt_entry, unexp_entry, d_entry) { ++ unexp_hdr = rxd_get_base_hdr(unexp_entry); ++ if (unexp_hdr->seq_no == new_hdr->seq_no && ++ unexp_hdr->peer == new_hdr->peer) { ++ rxd_release_repost_rx(ep, pkt_entry); ++ return; ++ } ++ } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "rx-entry wait over [%" PRIx64 "], credits: %d\n", +- rx_entry->msg_id, rx_entry->credits); +- rxd_ep_reply_ack(ep, &ctrl, ofi_ctrl_ack, rx_entry->credits, +- rx_entry->key, rx_entry->peer_info->conn_data, +- ctrl.conn_id); ++insert: ++ dlist_insert_tail(&pkt_entry->d_entry, list); + } + +-static void rxd_check_waiting_rx(struct rxd_ep *ep) ++static void rxd_handle_rts(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- struct dlist_entry *entry; +- struct rxd_rx_entry *rx_entry; ++ struct rxd_av *rxd_av; ++ struct ofi_rbnode *node; ++ fi_addr_t rxd_addr; ++ struct rxd_rts_pkt *pkt = (struct rxd_rts_pkt *) (pkt_entry->pkt); ++ int ret; + +- if (!ep->credits) +- return; ++ rxd_av = rxd_ep_av(ep); ++ node = ofi_rbmap_find(&rxd_av->rbmap, pkt->source); ++ ++ if (node) { ++ rxd_addr = (fi_addr_t) node->data; ++ } else { ++ ret = rxd_av_insert_dg_addr(rxd_av, (void *) pkt->source, ++ &rxd_addr, 0, NULL); ++ if (ret) ++ return; ++ } + +- while(!dlist_empty(&ep->wait_rx_list) && ep->credits) { +- entry = ep->wait_rx_list.next; +- rx_entry = container_of(entry, struct rxd_rx_entry, wait_entry); +- rxd_progress_wait_rx(ep, rx_entry); ++ if (rxd_send_cts(ep, pkt, rxd_addr)) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "error posting CTS\n"); + } + } + +-void rxd_rx_entry_free(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry) ++struct rxd_x_entry *rxd_progress_multi_recv(struct rxd_ep *ep, ++ struct rxd_x_entry *rx_entry, ++ size_t total_size) + { +- rx_entry->key = -1; +- dlist_remove(&rx_entry->entry); +- freestack_push(ep->rx_entry_fs, rx_entry); ++ struct rxd_x_entry *dup_entry; ++ size_t left; ++ uint32_t dup_id; + +- if (ep->credits && !dlist_empty(&ep->wait_rx_list)) +- rxd_check_waiting_rx(ep); +-} ++ left = rx_entry->iov[0].iov_len - total_size; + +-static int rxd_match_recv_entry(struct dlist_entry *item, const void *arg) +-{ +- const struct rxd_rx_entry *rx_entry = arg; +- struct rxd_recv_entry *recv_entry; ++ if (left < ep->min_multi_recv_size) { ++ rx_entry->cq_entry.flags |= FI_MULTI_RECV; ++ return NULL; ++ } + +- recv_entry = container_of(item, struct rxd_recv_entry, entry); +- return (recv_entry->msg.addr == FI_ADDR_UNSPEC || +- rx_entry->source == FI_ADDR_UNSPEC || +- recv_entry->msg.addr == rx_entry->source); ++ dup_entry = rxd_get_rx_entry(ep); ++ if (!dup_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get rx entry\n"); ++ return NULL; ++ } ++ dup_id = dup_entry->rx_id; ++ memcpy(dup_entry, rx_entry, sizeof(*rx_entry)); ++ dup_entry->rx_id = dup_id; ++ dup_entry->iov[0].iov_base = rx_entry->iov[0].iov_base; ++ dup_entry->iov[0].iov_len = total_size; ++ dup_entry->cq_entry.len = total_size; ++ ++ rx_entry->iov[0].iov_base = (char *) rx_entry->iov[0].iov_base + total_size; ++ rx_entry->cq_entry.buf = rx_entry->iov[0].iov_base; ++ rx_entry->iov[0].iov_len = left; ++ rx_entry->cq_entry.len = left; ++ ++ return dup_entry; + } + +-struct rxd_recv_entry *rxd_get_recv_entry(struct rxd_ep *ep, +- struct rxd_rx_entry *rx_entry) ++static struct rxd_x_entry *rxd_match_rx(struct rxd_ep *ep, ++ struct rxd_pkt_entry *pkt_entry, ++ struct rxd_base_hdr *base, ++ struct rxd_tag_hdr *tag, ++ struct rxd_sar_hdr *op, size_t msg_size) + { ++ struct rxd_x_entry *rx_entry, *dup_entry; ++ struct dlist_entry *rx_list; ++ struct dlist_entry *unexp_list; + struct dlist_entry *match; +- struct rxd_recv_entry *recv_entry; ++ struct rxd_match_attr attr; ++ size_t total_size; ++ ++ attr.peer = base->peer; ++ ++ if (tag) { ++ attr.tag = tag->tag; ++ rx_list = &ep->rx_tag_list; ++ match = dlist_find_first_match(rx_list, &rxd_match_tmsg, ++ (void *) &attr); ++ unexp_list = &ep->unexp_tag_list; ++ } else { ++ attr.tag = 0; ++ rx_list = &ep->rx_list; ++ match = dlist_find_first_match(rx_list, &rxd_match_msg, ++ (void *) &attr); ++ unexp_list = &ep->unexp_list; ++ } + +- match = dlist_find_first_match(&ep->recv_list, &rxd_match_recv_entry, +- (void *) rx_entry); + if (!match) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "no matching recv entry\n"); ++ rxd_check_post_unexp(ep, unexp_list, pkt_entry); + return NULL; + } + +- dlist_remove(match); +- recv_entry = container_of(match, struct rxd_recv_entry, entry); +- return recv_entry; ++ rx_entry = container_of(match, struct rxd_x_entry, entry); ++ ++ total_size = op ? op->size : msg_size; ++ if (rx_entry->flags & RXD_CANCELLED) ++ goto out; ++ ++ if (rx_entry->flags & RXD_MULTI_RECV) { ++ dup_entry = rxd_progress_multi_recv(ep, rx_entry, total_size); ++ if (!dup_entry) ++ goto out; ++ ++ dup_entry->start_seq = base->seq_no; ++ dlist_init(&dup_entry->entry); ++ return dup_entry; ++ } ++ ++out: ++ dlist_remove(&rx_entry->entry); ++ rx_entry->cq_entry.len = MIN(rx_entry->cq_entry.len, total_size); ++ return rx_entry; + } + +-static int rxd_match_trecv_entry(struct dlist_entry *item, const void *arg) ++static int rxd_verify_iov(struct rxd_ep *ep, struct ofi_rma_iov *rma, ++ size_t count, uint32_t type, struct iovec *iov) + { +- const struct rxd_rx_entry *rx_entry = arg; +- struct rxd_trecv_entry *trecv_entry; +- +- trecv_entry = container_of(item, struct rxd_trecv_entry, entry); +- return ((trecv_entry->msg.tag | trecv_entry->msg.ignore) == +- (rx_entry->op_hdr.tag | trecv_entry->msg.ignore) && +- ((trecv_entry->msg.addr == FI_ADDR_UNSPEC) || +- (rx_entry->source == FI_ADDR_UNSPEC) || +- (trecv_entry->msg.addr == rx_entry->source))); ++ struct util_domain *util_domain = &rxd_ep_domain(ep)->util_domain; ++ int i, ret; ++ ++ for (i = 0; i < count; i++) { ++ ret = ofi_mr_verify(&util_domain->mr_map, rma[i].len, ++ (uintptr_t *)(&rma[i].addr), rma[i].key, ++ ofi_rx_mr_reg_flags(type, 0)); ++ iov[i].iov_base = (void *) rma[i].addr; ++ iov[i].iov_len = rma[i].len; ++ if (ret) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not verify MR\n"); ++ return -FI_EACCES; ++ } ++ } + return 0; + } + +-struct rxd_trecv_entry *rxd_get_trecv_entry(struct rxd_ep *ep, +- struct rxd_rx_entry *rx_entry) ++static struct rxd_x_entry *rxd_rma_read_entry_init(struct rxd_ep *ep, ++ struct rxd_base_hdr *base_hdr, struct rxd_sar_hdr *sar_hdr, ++ struct rxd_rma_hdr *rma_hdr) + { +- struct dlist_entry *match; +- struct rxd_trecv_entry *trecv_entry; ++ struct rxd_x_entry *rx_entry; ++ struct rxd_domain *rxd_domain = rxd_ep_domain(ep); ++ int ret; + +- match = dlist_find_first_match(&ep->trecv_list, &rxd_match_trecv_entry, +- (void *)rx_entry); +- if (!match) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "no matching trecv entry, tag: %" PRIx64 "\n", +- rx_entry->op_hdr.tag); ++ rx_entry = rxd_get_rx_entry(ep); ++ if (!rx_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get rx entry\n"); + return NULL; + } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "matched - tag: %" PRIx64 "\n", +- rx_entry->op_hdr.tag); ++ rx_entry->tx_id = sar_hdr->tx_id; ++ rx_entry->op = RXD_DATA_READ; ++ rx_entry->peer = base_hdr->peer; ++ rx_entry->flags = RXD_NO_TX_COMP; ++ rx_entry->bytes_done = 0; ++ rx_entry->next_seg_no = 0; ++ rx_entry->num_segs = ofi_div_ceil(sar_hdr->size, rxd_domain->max_seg_sz); ++ rx_entry->pkt = NULL; ++ ++ ret = rxd_verify_iov(ep, rma_hdr->rma, sar_hdr->iov_count, ++ base_hdr->type, rx_entry->iov); ++ if (ret) ++ return NULL; ++ ++ rx_entry->iov_count = sar_hdr->iov_count; ++ rx_entry->cq_entry.flags = ofi_rx_cq_flags(ofi_op_read_req); ++ rx_entry->cq_entry.len = sar_hdr->size; ++ ++ dlist_insert_tail(&rx_entry->entry, &ep->peers[rx_entry->peer].tx_list); + +- dlist_remove(match); +- trecv_entry = container_of(match, struct rxd_trecv_entry, entry); +- trecv_entry->rx_entry = rx_entry; +- return trecv_entry; ++ rxd_progress_tx_list(ep, &ep->peers[rx_entry->peer]); ++ ++ return rx_entry; + } + +-void rxd_cq_report_error(struct rxd_cq *cq, struct fi_cq_err_entry *err_entry) ++static struct rxd_x_entry *rxd_rma_rx_entry_init(struct rxd_ep *ep, ++ struct rxd_base_hdr *base_hdr, struct rxd_sar_hdr *sar_hdr, ++ struct rxd_rma_hdr *rma_hdr) + { +- struct fi_cq_tagged_entry cq_entry = {0}; +- struct util_cq_err_entry *entry = calloc(1, sizeof(*entry)); +- if (!entry) { +- FI_WARN(&rxd_prov, FI_LOG_CQ, +- "out of memory, cannot report CQ error\n"); +- return; +- } ++ struct rxd_x_entry *rx_entry; ++ struct iovec iov[RXD_IOV_LIMIT]; ++ int ret, iov_count; + +- entry->err_entry = *err_entry; +- slist_insert_tail(&entry->list_entry, &cq->util_cq.err_list); +- cq_entry.flags = UTIL_FLAG_ERROR; +- cq->write_fn(cq, &cq_entry); ++ iov_count = sar_hdr ? sar_hdr->iov_count : 1; ++ ret = rxd_verify_iov(ep, rma_hdr->rma, iov_count, ++ base_hdr->type, iov); ++ if (ret) ++ return NULL; ++ ++ rx_entry = rxd_rx_entry_init(ep, iov, iov_count, 0, 0, NULL, ++ base_hdr->peer, base_hdr->type, ++ base_hdr->flags); ++ if (!rx_entry) ++ return NULL; ++ ++ rx_entry->start_seq = base_hdr->seq_no; ++ ++ return rx_entry; + } + +-void rxd_cq_report_tx_comp(struct rxd_cq *cq, struct rxd_tx_entry *tx_entry) ++static struct rxd_x_entry *rxd_rx_atomic_fetch(struct rxd_ep *ep, ++ struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr *sar_hdr, ++ struct rxd_rma_hdr *rma_hdr, ++ struct rxd_atom_hdr *atom_hdr) + { +- struct fi_cq_tagged_entry cq_entry = {0}; ++ struct rxd_x_entry *rx_entry; ++ int ret; + +- /* todo: handle FI_COMPLETION */ +- switch(tx_entry->op_type) { +- case RXD_TX_MSG: +- cq_entry.flags = (FI_TRANSMIT | FI_MSG); +- cq_entry.op_context = tx_entry->msg.msg.context; +- cq_entry.len = tx_entry->op_hdr.size; +- cq_entry.buf = tx_entry->msg.msg_iov[0].iov_base; +- cq_entry.data = tx_entry->op_hdr.data; +- break; +- case RXD_TX_TAG: +- cq_entry.flags = (FI_TRANSMIT | FI_TAGGED); +- cq_entry.op_context = tx_entry->tmsg.tmsg.context; +- cq_entry.len = tx_entry->op_hdr.size; +- cq_entry.buf = tx_entry->tmsg.msg_iov[0].iov_base; +- cq_entry.data = tx_entry->op_hdr.data; +- cq_entry.tag = tx_entry->tmsg.tmsg.tag; +- break; +- case RXD_TX_WRITE: +- cq_entry.flags = (FI_TRANSMIT | FI_RMA | FI_WRITE); +- cq_entry.op_context = tx_entry->write.msg.context; +- cq_entry.len = tx_entry->op_hdr.size; +- cq_entry.buf = tx_entry->write.msg.msg_iov[0].iov_base; +- cq_entry.data = tx_entry->op_hdr.data; +- break; +- case RXD_TX_READ_REQ: +- cq_entry.flags = (FI_TRANSMIT | FI_RMA | FI_READ); +- cq_entry.op_context = tx_entry->read_req.msg.context; +- cq_entry.len = tx_entry->op_hdr.size; +- cq_entry.buf = tx_entry->read_req.msg.msg_iov[0].iov_base; +- cq_entry.data = tx_entry->op_hdr.data; +- break; +- case RXD_TX_READ_RSP: +- return; +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type\n"); +- return; ++ rx_entry = rxd_get_rx_entry(ep); ++ if (!rx_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get tx entry\n"); ++ return NULL; + } + +- cq->write_fn(cq, &cq_entry); ++ rx_entry->pkt = rxd_get_tx_pkt(ep); ++ if (!rx_entry->pkt) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get pkt\n"); ++ rxd_rx_entry_free(ep, rx_entry); ++ return NULL; ++ } ++ rx_entry->tx_id = sar_hdr->tx_id; ++ ++ rx_entry->op = RXD_DATA_READ; ++ rx_entry->peer = base_hdr->peer; ++ rx_entry->flags = RXD_NO_TX_COMP; ++ rx_entry->bytes_done = 0; ++ rx_entry->next_seg_no = 0; ++ rx_entry->num_segs = 1; ++ ++ rx_entry->iov_count = sar_hdr->iov_count; ++ ret = rxd_verify_iov(ep, rma_hdr->rma, rx_entry->iov_count, ++ base_hdr->type, rx_entry->iov); ++ if (ret) ++ return NULL; ++ ++ rx_entry->cq_entry.flags = ofi_rx_cq_flags(ofi_op_atomic_fetch); ++ rx_entry->cq_entry.len = sar_hdr->size; ++ ++ rxd_init_data_pkt(ep, rx_entry, rx_entry->pkt); ++ if (rx_entry->bytes_done != rx_entry->cq_entry.len) ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "fetch data length mismatch\n"); ++ ++ dlist_insert_tail(&rx_entry->entry, &ep->peers[rx_entry->peer].tx_list); ++ ++ rxd_ep_send_ack(ep, base_hdr->peer); ++ ++ rxd_progress_tx_list(ep, &ep->peers[rx_entry->peer]); ++ ++ return rx_entry; + } + +-void rxd_ep_handle_data_msg(struct rxd_ep *ep, struct rxd_peer *peer, +- struct rxd_rx_entry *rx_entry, +- struct iovec *iov, size_t iov_count, +- struct ofi_ctrl_hdr *ctrl, void *data, +- struct rxd_rx_buf *rx_buf) ++void rxd_unpack_hdrs(size_t pkt_size, struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr **sar_hdr, struct rxd_tag_hdr **tag_hdr, ++ struct rxd_data_hdr **data_hdr, struct rxd_rma_hdr **rma_hdr, ++ struct rxd_atom_hdr **atom_hdr, void **msg, size_t *msg_size) + { +- struct fi_cq_tagged_entry cq_entry = {0}; +- struct util_cntr *cntr = NULL; +- uint64_t done; +- struct rxd_cq *rxd_rx_cq = rxd_ep_rx_cq(ep); +- +- ep->credits++; +- done = ofi_copy_to_iov(iov, iov_count, rx_entry->done, data, +- ctrl->seg_size); +- rx_entry->done += done; +- rx_entry->credits--; +- rx_entry->exp_seg_no++; +- +- if (done != ctrl->seg_size) { +- /* todo: generate truncation error */ +- /* inform peer */ +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "TODO: message truncated\n"); +- } ++ char *ptr = (char *) base_hdr + sizeof(*base_hdr); ++ uint8_t rma_count = 1; + +- if (rx_entry->credits == 0) { +- rxd_set_rx_credits(ep, rx_entry); ++ if (!(base_hdr->flags & RXD_INLINE)) { ++ *sar_hdr = (struct rxd_sar_hdr *) ptr; ++ rma_count = (*sar_hdr)->iov_count; ++ ptr += sizeof(**sar_hdr); ++ } else { ++ *sar_hdr = NULL; ++ } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "replying ack [%" PRIx64 "] - %d\n", +- ctrl->msg_id, ctrl->seg_no); ++ if (base_hdr->flags & RXD_TAG_HDR) { ++ *tag_hdr = (struct rxd_tag_hdr *) ptr; ++ ptr += sizeof(**tag_hdr); ++ } else { ++ *tag_hdr = NULL; ++ } + +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, rx_entry->credits, +- rx_entry->key, peer->conn_data, ctrl->conn_id); ++ if (base_hdr->flags & RXD_REMOTE_CQ_DATA) { ++ *data_hdr = (struct rxd_data_hdr *) ptr; ++ ptr += sizeof(**data_hdr); ++ } else { ++ *data_hdr = NULL; + } + +- if (rx_entry->op_hdr.size != rx_entry->done) { +- if (rx_entry->credits == 0) { +- dlist_init(&rx_entry->wait_entry); +- dlist_insert_tail(&rx_entry->wait_entry, &ep->wait_rx_list); +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "rx-entry %" PRIx64 " - %d enqueued\n", +- ctrl->msg_id, ctrl->seg_no); ++ if (base_hdr->type >= RXD_READ_REQ && base_hdr->type <= RXD_ATOMIC_COMPARE) { ++ *rma_hdr = (struct rxd_rma_hdr *) ptr; ++ ptr += (sizeof(*(*rma_hdr)->rma) * rma_count); ++ ++ if (base_hdr->type >= RXD_ATOMIC) { ++ *atom_hdr = (struct rxd_atom_hdr *) ptr; ++ ptr += sizeof(**atom_hdr); + } else { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "rx_entry->op_hdr.size: %" PRIu64 ", rx_entry->done: %" PRId64 "\n", +- rx_entry->op_hdr.size, +- rx_entry->done); ++ *atom_hdr = NULL; + } +- return; ++ } else { ++ *rma_hdr = NULL; ++ *atom_hdr = NULL; + } + +- /* todo: handle FI_COMPLETION for RX CQ comp */ +- switch(rx_entry->op_hdr.op) { +- case ofi_op_msg: +- freestack_push(ep->recv_fs, rx_entry->recv); +- /* Handle cntr */ +- cntr = ep->util_ep.rx_cntr; +- /* Handle CQ comp */ +- cq_entry.flags |= FI_RECV; +- cq_entry.op_context = rx_entry->recv->msg.context; +- cq_entry.len = rx_entry->done; +- cq_entry.buf = rx_entry->recv->iov[0].iov_base; +- cq_entry.data = rx_entry->op_hdr.data; +- rxd_rx_cq->write_fn(rxd_rx_cq, &cq_entry); +- break; +- case ofi_op_tagged: +- freestack_push(ep->trecv_fs, rx_entry->trecv); +- /* Handle cntr */ +- cntr = ep->util_ep.rx_cntr; +- /* Handle CQ comp */ +- cq_entry.flags |= (FI_RECV | FI_TAGGED); +- cq_entry.op_context = rx_entry->trecv->msg.context; +- cq_entry.len = rx_entry->done; +- cq_entry.buf = rx_entry->trecv->iov[0].iov_base; +- cq_entry.data = rx_entry->op_hdr.data; +- cq_entry.tag = rx_entry->trecv->msg.tag;\ +- rxd_rx_cq->write_fn(rxd_rx_cq, &cq_entry); +- break; +- case ofi_op_atomic: +- /* Handle cntr */ +- cntr = ep->util_ep.rem_wr_cntr; +- /* Handle CQ comp */ +- cq_entry.flags |= FI_ATOMIC; +- rxd_rx_cq->write_fn(rxd_rx_cq, &cq_entry); +- break; +- case ofi_op_write: +- /* Handle cntr */ +- cntr = ep->util_ep.rem_wr_cntr; +- /* Handle CQ comp */ +- if (rx_entry->op_hdr.flags & OFI_REMOTE_CQ_DATA) { +- cq_entry.flags |= (FI_RMA | FI_REMOTE_WRITE); +- cq_entry.op_context = rx_entry->trecv->msg.context; +- cq_entry.len = rx_entry->done; +- cq_entry.buf = rx_entry->write.iov[0].iov_base; +- cq_entry.data = rx_entry->op_hdr.data; +- rxd_rx_cq->write_fn(rxd_rx_cq, &cq_entry); +- } +- break; +- case ofi_op_read_rsp: +- rxd_cq_report_tx_comp(rxd_ep_tx_cq(ep), rx_entry->read_rsp.tx_entry); +- rxd_cntr_report_tx_comp(ep, rx_entry->read_rsp.tx_entry); +- rxd_tx_entry_done(ep, rx_entry->read_rsp.tx_entry); +- break; +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type: %d\n", +- rx_entry->op_hdr.op); +- break; ++ if (pkt_size < (ptr - (char *) base_hdr)) { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "Cannot process packet smaller than minimum header size\n"); ++ *msg_size = 0; ++ return; + } + +- if (cntr) +- cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); +- +- rxd_rx_entry_free(ep, rx_entry); ++ *msg = ptr; ++ *msg_size = pkt_size - (ptr - (char *) base_hdr); + } + +-static int rxd_check_data_pkt_order(struct rxd_ep *ep, +- struct rxd_peer *peer, +- struct ofi_ctrl_hdr *ctrl, +- struct rxd_rx_entry *rx_entry) ++static struct rxd_x_entry *rxd_unpack_init_rx(struct rxd_ep *ep, ++ struct rxd_pkt_entry *pkt_entry, ++ struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr **sar_hdr, ++ struct rxd_tag_hdr **tag_hdr, ++ struct rxd_data_hdr **data_hdr, ++ struct rxd_rma_hdr **rma_hdr, ++ struct rxd_atom_hdr **atom_hdr, ++ void **msg, size_t *msg_size) + { +- if ((rx_entry->msg_id == ctrl->msg_id) && +- (rx_entry->exp_seg_no == ctrl->seg_no)) +- return 0; +- +- if ((rx_entry->msg_id != ctrl->msg_id) || +- (rx_entry->exp_seg_no > ctrl->seg_no)) +- return -FI_EALREADY; +- +- return -FI_EINVAL; ++ rxd_unpack_hdrs(pkt_entry->pkt_size - ep->rx_prefix_size, base_hdr, sar_hdr, ++ tag_hdr, data_hdr, rma_hdr, atom_hdr, msg, msg_size); ++ ++ switch (base_hdr->type) { ++ case RXD_MSG: ++ case RXD_TAGGED: ++ return rxd_match_rx(ep, pkt_entry, base_hdr, *tag_hdr, *sar_hdr, ++ *msg_size); ++ case RXD_READ_REQ: ++ return rxd_rma_read_entry_init(ep, base_hdr, *sar_hdr, *rma_hdr); ++ case RXD_ATOMIC_FETCH: ++ case RXD_ATOMIC_COMPARE: ++ return rxd_rx_atomic_fetch(ep, base_hdr, *sar_hdr, *rma_hdr, *atom_hdr); ++ default: ++ return rxd_rma_rx_entry_init(ep, base_hdr, *sar_hdr, *rma_hdr); ++ } + } + +-static int rxd_match_unexp_msg(struct dlist_entry *item, const void *arg) ++void rxd_do_atomic(void *src, void *dst, void *cmp, enum fi_datatype datatype, ++ enum fi_op atomic_op, size_t cnt) + { +- const struct rxd_recv_entry *recv_entry = arg; +- struct rxd_rx_entry *rx_entry; ++ char tmp_result[RXD_MAX_MTU_SIZE]; + +- rx_entry = container_of(item, struct rxd_rx_entry, unexp_entry); +- return (recv_entry->msg.addr == FI_ADDR_UNSPEC || +- rx_entry->source == FI_ADDR_UNSPEC || +- rx_entry->source == recv_entry->msg.addr); ++ if (atomic_op >= OFI_SWAP_OP_START) { ++ ofi_atomic_swap_handlers[atomic_op - OFI_SWAP_OP_START][datatype](dst, ++ src, cmp, tmp_result, cnt); ++ } else if (atomic_op != FI_ATOMIC_READ) { ++ ofi_atomic_write_handlers[atomic_op][datatype](dst, src, cnt); ++ } + } + +-void rxd_ep_check_unexp_msg_list(struct rxd_ep *ep, struct rxd_recv_entry *recv_entry) ++void rxd_progress_op_msg(struct rxd_ep *ep, struct rxd_x_entry *rx_entry, ++ void **msg, size_t size) + { +- struct dlist_entry *match; +- struct rxd_rx_entry *rx_entry; +- struct rxd_pkt_data_start *pkt_start; +- +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "ep->num_unexp_msg: %d\n", ep->num_unexp_msg); +- match = dlist_remove_first_match(&ep->unexp_msg_list, &rxd_match_unexp_msg, +- (void *) recv_entry); +- if (match) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "progressing unexp msg entry\n"); +- dlist_remove(&recv_entry->entry); +- ep->num_unexp_msg--; +- +- rx_entry = container_of(match, struct rxd_rx_entry, unexp_entry); +- rx_entry->recv = recv_entry; +- +- pkt_start = (struct rxd_pkt_data_start *) rx_entry->unexp_buf->buf; +- rxd_ep_handle_data_msg(ep, rx_entry->peer_info, rx_entry, rx_entry->recv->iov, +- rx_entry->recv->msg.iov_count, &pkt_start->ctrl, +- pkt_start->data, rx_entry->unexp_buf); +- rxd_ep_repost_buff(rx_entry->unexp_buf); +- } ++ rx_entry->bytes_done = ofi_copy_to_iov(rx_entry->iov, ++ rx_entry->iov_count, 0, *msg, size); + } + +-static int rxd_match_unexp_tag(struct dlist_entry *item, const void *arg) ++void rxd_progress_atom_op(struct rxd_ep *ep, struct rxd_x_entry *rx_entry, ++ struct rxd_base_hdr *base_hdr, struct rxd_sar_hdr *sar_hdr, ++ struct rxd_rma_hdr *rma_hdr, struct rxd_atom_hdr *atom_hdr, ++ void **msg, size_t msg_size) + { +- const struct rxd_trecv_entry *trecv_entry = arg; +- struct rxd_rx_entry *rx_entry; +- +- rx_entry = container_of(item, struct rxd_rx_entry, unexp_entry); +- return ((trecv_entry->msg.tag | trecv_entry->msg.ignore) == +- (rx_entry->op_hdr.tag | trecv_entry->msg.ignore) && +- ((trecv_entry->msg.addr == FI_ADDR_UNSPEC) || +- (rx_entry->source == FI_ADDR_UNSPEC) || +- (trecv_entry->msg.addr == rx_entry->source))); ++ char *src, *cmp; ++ size_t len; ++ int i, iov_count; ++ ++ src = (char *) (*msg); ++ cmp = base_hdr->type == RXD_ATOMIC_COMPARE ? (char *) (*msg) + ++ (msg_size / 2) : NULL; ++ ++ iov_count = sar_hdr ? sar_hdr->iov_count : 1; ++ for (i = len = 0; i < iov_count; i++) { ++ rxd_do_atomic(&src[len], rx_entry->iov[i].iov_base, ++ cmp ? &cmp[len] : NULL, atom_hdr->datatype, ++ atom_hdr->atomic_op, rx_entry->iov[i].iov_len / ++ ofi_datatype_size(atom_hdr->datatype)); ++ len += rx_entry->iov[i].iov_len; ++ } ++ ++ if (base_hdr->type == RXD_ATOMIC) ++ rx_entry->bytes_done = len; + } + +-void rxd_ep_check_unexp_tag_list(struct rxd_ep *ep, struct rxd_trecv_entry *trecv_entry) ++void rxd_progress_op(struct rxd_ep *ep, struct rxd_x_entry *rx_entry, ++ struct rxd_pkt_entry *pkt_entry, ++ struct rxd_base_hdr *base_hdr, ++ struct rxd_sar_hdr *sar_hdr, ++ struct rxd_tag_hdr *tag_hdr, ++ struct rxd_data_hdr *data_hdr, ++ struct rxd_rma_hdr *rma_hdr, ++ struct rxd_atom_hdr *atom_hdr, ++ void **msg, size_t size) + { +- struct dlist_entry *match; +- struct rxd_rx_entry *rx_entry; +- struct rxd_pkt_data_start *pkt_start; +- +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "ep->num_unexp_msg: %d\n", ep->num_unexp_msg); +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "ep->num_unexp_pkt: %d\n", ep->num_unexp_pkt); +- match = dlist_find_first_match(&ep->unexp_tag_list, &rxd_match_unexp_tag, +- (void *) trecv_entry); +- if (match) { +- dlist_remove(match); +- dlist_remove(&trecv_entry->entry); +- ep->num_unexp_msg--; +- +- rx_entry = container_of(match, struct rxd_rx_entry, unexp_entry); +- rx_entry->trecv = trecv_entry; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "progressing unexp tagged recv [%" PRIx64 "]\n", +- rx_entry->msg_id); +- +- pkt_start = (struct rxd_pkt_data_start *) rx_entry->unexp_buf->buf; +- rxd_ep_handle_data_msg(ep, rx_entry->peer_info, rx_entry, rx_entry->trecv->iov, +- rx_entry->trecv->msg.iov_count, &pkt_start->ctrl, +- pkt_start->data, rx_entry->unexp_buf); +- rxd_ep_repost_buff(rx_entry->unexp_buf); ++ ++ if (rx_entry->flags & RXD_CANCELLED) { ++ rxd_complete_rx(ep, rx_entry); ++ ep->peers[base_hdr->peer].rx_seq_no += base_hdr->flags & RXD_INLINE ? ++ 1 : sar_hdr->num_segs; ++ return; ++ } ++ ++ ep->peers[base_hdr->peer].rx_seq_no++; ++ if (sar_hdr) ++ ep->peers[base_hdr->peer].curr_tx_id = sar_hdr->tx_id; ++ ++ ep->peers[base_hdr->peer].curr_rx_id = rx_entry->rx_id; ++ ++ if (base_hdr->type == RXD_READ_REQ) ++ return; ++ ++ if (atom_hdr) ++ rxd_progress_atom_op(ep, rx_entry, base_hdr, sar_hdr, ++ rma_hdr, atom_hdr, msg, size); ++ else ++ rxd_progress_op_msg(ep, rx_entry, msg, size); ++ ++ rx_entry->offset = rx_entry->bytes_done; ++ ++ if (data_hdr) { ++ rx_entry->cq_entry.flags |= FI_REMOTE_CQ_DATA; ++ rx_entry->cq_entry.data = data_hdr->cq_data; + } ++ ++ rx_entry->peer = base_hdr->peer; ++ ++ if (!sar_hdr || sar_hdr->num_segs == 1) { ++ if (!(rx_entry->cq_entry.flags & FI_REMOTE_READ)) ++ rxd_complete_rx(ep, rx_entry); ++ return; ++ } ++ ++ rx_entry->tx_id = sar_hdr->tx_id; ++ rx_entry->num_segs = sar_hdr->num_segs; ++ rx_entry->next_seg_no++; ++ rx_entry->start_seq = base_hdr->seq_no; ++ ++ dlist_insert_tail(&rx_entry->entry, &ep->peers[base_hdr->peer].rx_list); + } + +-static void rxd_handle_data(struct rxd_ep *ep, struct rxd_peer *peer, +- struct ofi_ctrl_hdr *ctrl, struct fi_cq_msg_entry *comp, +- struct rxd_rx_buf *rx_buf) ++static struct rxd_x_entry *rxd_get_data_x_entry(struct rxd_ep *ep, ++ struct rxd_data_pkt *data_pkt) + { +- struct rxd_rx_entry *rx_entry; +- struct rxd_tx_entry *tx_entry; +- struct rxd_pkt_data *pkt_data = (struct rxd_pkt_data *) ctrl; +- uint16_t credits; +- int ret; ++ if (data_pkt->base_hdr.type == RXD_DATA) ++ return util_buf_get_by_index(ep->rx_entry_pool, ++ ep->peers[data_pkt->base_hdr.peer].curr_rx_id); + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "data pkt- msg_id: %" PRIu64 ", segno: %d, buf: %p\n", +- ctrl->msg_id, ctrl->seg_no, rx_buf); +- +- rx_entry = &ep->rx_entry_fs->buf[ctrl->rx_key]; ++ return util_buf_get_by_index(ep->tx_entry_pool, data_pkt->ext_hdr.tx_id); ++} + +- ret = rxd_check_data_pkt_order(ep, peer, ctrl, rx_entry); +- if (ret) { +- if (ret == -FI_EALREADY) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "duplicate pkt: %d " +- "expected:%d, rx-key:%" PRId64 ", ctrl_msg_id: %" PRIx64 "\n", +- ctrl->seg_no, rx_entry->exp_seg_no, +- ctrl->rx_key, +- ctrl->msg_id); +- +- credits = ((rx_entry->msg_id == ctrl->msg_id) && +- (rx_entry->last_win_seg == ctrl->seg_no)) ? +- rx_entry->credits : 0; +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, credits, +- ctrl->rx_key, peer->conn_data, +- ctrl->conn_id); +- goto repost; ++static void rxd_progress_buf_pkts(struct rxd_ep *ep, fi_addr_t peer) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_base_hdr *base_hdr; ++ struct rxd_sar_hdr *sar_hdr; ++ struct rxd_tag_hdr *tag_hdr; ++ struct rxd_data_hdr *data_hdr; ++ struct rxd_rma_hdr *rma_hdr; ++ struct rxd_atom_hdr *atom_hdr; ++ void *msg; ++ size_t msg_size; ++ struct rxd_x_entry *rx_entry; ++ struct rxd_data_pkt *data_pkt; ++ ++ while (!dlist_empty(&ep->peers[peer].buf_pkts)) { ++ pkt_entry = container_of((&ep->peers[peer].buf_pkts)->next, ++ struct rxd_pkt_entry, d_entry); ++ base_hdr = rxd_get_base_hdr(pkt_entry); ++ if (base_hdr->seq_no != ep->peers[peer].rx_seq_no) ++ return; ++ ++ if (base_hdr->type == RXD_DATA || base_hdr->type == RXD_DATA_READ) { ++ data_pkt = (struct rxd_data_pkt *) (pkt_entry->pkt); ++ rx_entry = rxd_get_data_x_entry(ep, data_pkt); ++ rxd_ep_recv_data(ep, rx_entry, data_pkt, pkt_entry->pkt_size); + } else { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "invalid pkt: segno: %d " +- "expected:%d, rx-key:%" PRId64 ", ctrl_msg_id: %" PRIu64 ", " +- "rx_entry_msg_id: %" PRIx64 "\n", +- ctrl->seg_no, rx_entry->exp_seg_no, +- ctrl->rx_key, +- ctrl->msg_id, rx_entry->msg_id); +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "invalid pkt: " +- "credits: %d, last win: %d\n", +- rx_entry->credits, rx_entry->last_win_seg); +- credits = (rx_entry->msg_id == ctrl->msg_id) ? +- rx_entry->last_win_seg - rx_entry->exp_seg_no : 0; +- rxd_ep_reply_ack(ep, ctrl, ofi_ctrl_ack, credits, +- ctrl->rx_key, peer->conn_data, +- ctrl->conn_id); +- goto repost; ++ rx_entry = rxd_unpack_init_rx(ep, pkt_entry, base_hdr, &sar_hdr, ++ &tag_hdr, &data_hdr, &rma_hdr, &atom_hdr, ++ &msg, &msg_size); ++ if (!rx_entry) ++ break; ++ ++ rxd_progress_op(ep, rx_entry, pkt_entry, base_hdr, ++ sar_hdr, tag_hdr, data_hdr, rma_hdr, ++ atom_hdr, &msg, msg_size); + } ++ ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_repost_rx(ep, pkt_entry); + } ++} + +- rx_entry->nack_stamp = 0; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "expected pkt: %d\n", ctrl->seg_no); +- switch (rx_entry->op_hdr.op) { +- case ofi_op_msg: +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->recv->iov, +- rx_entry->recv->msg.iov_count, ctrl, +- pkt_data->data, rx_buf); +- break; +- case ofi_op_tagged: +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->trecv->iov, +- rx_entry->trecv->msg.iov_count, ctrl, +- pkt_data->data, rx_buf); +- break; +- case ofi_op_write: +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->write.iov, +- rx_entry->op_hdr.iov_count, ctrl, +- pkt_data->data, rx_buf); +- break; +- case ofi_op_read_rsp: +- tx_entry = rx_entry->read_rsp.tx_entry; +- rxd_ep_handle_data_msg(ep, peer, rx_entry, tx_entry->read_req.dst_iov, +- tx_entry->read_req.msg.iov_count, ctrl, +- pkt_data->data, rx_buf); +- break; +- case ofi_op_atomic: +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type\n"); ++static void rxd_handle_data(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) ++{ ++ struct rxd_data_pkt *pkt = (struct rxd_data_pkt *) (pkt_entry->pkt); ++ struct rxd_x_entry *x_entry; ++ ++ if (pkt_entry->pkt_size < sizeof(*pkt) + ep->rx_prefix_size) { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "Cannot process packet smaller than minimum header size\n"); ++ return; + } + +-repost: +- rxd_ep_repost_buff(rx_buf); ++ if (pkt->base_hdr.seq_no == ep->peers[pkt->base_hdr.peer].rx_seq_no) { ++ x_entry = rxd_get_data_x_entry(ep, pkt); ++ rxd_ep_recv_data(ep, x_entry, pkt, pkt_entry->pkt_size); ++ if (!dlist_empty(&ep->peers[pkt->base_hdr.peer].buf_pkts)) ++ rxd_progress_buf_pkts(ep, pkt->base_hdr.peer); ++ } else if (!rxd_env.retry) { ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ dlist_insert_order(&ep->peers[pkt->base_hdr.peer].buf_pkts, ++ &rxd_comp_pkt_seq_no, &pkt_entry->d_entry); ++ ep->peers[pkt->base_hdr.peer].rx_seq_no++; ++ } else { ++ rxd_ep_send_ack(ep, pkt->base_hdr.peer); ++ } + } + +-int rxd_process_start_data(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry, +- struct rxd_peer *peer, struct ofi_ctrl_hdr *ctrl, +- struct fi_cq_msg_entry *comp, +- struct rxd_rx_buf *rx_buf) ++static void rxd_handle_op(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- uint64_t idx; +- int i, offset, ret; +- struct ofi_rma_iov *rma_iov; +- struct rxd_pkt_data_start *pkt_start; +- struct rxd_tx_entry *tx_entry; +- pkt_start = (struct rxd_pkt_data_start *) ctrl; +- +- switch (rx_entry->op_hdr.op) { +- case ofi_op_msg: +- rx_entry->recv = rxd_get_recv_entry(ep, rx_entry); +- if (!rx_entry->recv) { +- if (ep->num_unexp_msg < RXD_EP_MAX_UNEXP_MSG) { +- dlist_insert_tail(&rx_entry->unexp_entry, &ep->unexp_msg_list); +- rx_entry->unexp_buf = rx_buf; +- ep->num_unexp_msg++; +- return -FI_ENOENT; +- } else { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "dropping msg\n"); +- return -FI_ENOMEM; +- } ++ struct rxd_x_entry *rx_entry; ++ struct rxd_base_hdr *base_hdr = rxd_get_base_hdr(pkt_entry); ++ struct rxd_sar_hdr *sar_hdr; ++ struct rxd_tag_hdr *tag_hdr; ++ struct rxd_data_hdr *data_hdr; ++ struct rxd_rma_hdr *rma_hdr; ++ struct rxd_atom_hdr *atom_hdr; ++ void *msg; ++ size_t msg_size; ++ ++ if (base_hdr->seq_no != ep->peers[base_hdr->peer].rx_seq_no) { ++ if (!rxd_env.retry) { ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ dlist_insert_order(&ep->peers[base_hdr->peer].buf_pkts, ++ &rxd_comp_pkt_seq_no, &pkt_entry->d_entry); ++ ep->peers[base_hdr->peer].rx_seq_no++; ++ return; + } + +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->recv->iov, +- rx_entry->recv->msg.iov_count, ctrl, +- pkt_start->data, rx_buf); +- break; +- case ofi_op_tagged: +- rx_entry->trecv = rxd_get_trecv_entry(ep, rx_entry); +- if (!rx_entry->trecv) { +- if (ep->num_unexp_msg < RXD_EP_MAX_UNEXP_MSG) { +- dlist_insert_tail(&rx_entry->unexp_entry, &ep->unexp_tag_list); +- rx_entry->unexp_buf = rx_buf; +- ep->num_unexp_msg++; +- return -FI_ENOENT; +- } else { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "dropping msg\n"); +- return -FI_ENOMEM; +- } +- } ++ if (ep->peers[base_hdr->peer].peer_addr != FI_ADDR_UNSPEC) ++ goto ack; ++ goto release; ++ } + +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->trecv->iov, +- rx_entry->trecv->msg.iov_count, ctrl, +- pkt_start->data, rx_buf); +- break; +- case ofi_op_write: +- rma_iov = (struct ofi_rma_iov *) pkt_start->data; +- for (i = 0; i < rx_entry->op_hdr.iov_count; i++) { +- ret = rxd_mr_verify(rxd_ep_domain(ep), +- rma_iov[i].len, +- (uintptr_t *) &rma_iov[i].addr, +- rma_iov[i].key, FI_REMOTE_WRITE); +- if (ret) { +- /* todo: handle invalid key case */ +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid key/access permissions\n"); +- return -FI_EACCES; +- } ++ if (ep->peers[base_hdr->peer].peer_addr == FI_ADDR_UNSPEC) ++ goto release; + +- rx_entry->write.iov[i].iov_base = (void *) (uintptr_t) rma_iov[i].addr; +- rx_entry->write.iov[i].iov_len = rma_iov[i].len; ++ rx_entry = rxd_unpack_init_rx(ep, pkt_entry, base_hdr, &sar_hdr, ++ &tag_hdr, &data_hdr, &rma_hdr, &atom_hdr, ++ &msg, &msg_size); ++ if (!rx_entry) { ++ if (base_hdr->type == RXD_MSG || base_hdr->type == RXD_TAGGED) { ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ return; + } ++ goto release; ++ } + +- offset = sizeof(struct ofi_rma_iov) * rx_entry->op_hdr.iov_count; +- ctrl->seg_size -= offset; +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->write.iov, +- rx_entry->op_hdr.iov_count, ctrl, +- pkt_start->data + offset, rx_buf); +- break; +- case ofi_op_read_req: +- rma_iov = (struct ofi_rma_iov *) pkt_start->data; +- tx_entry = rxd_tx_entry_alloc(ep, peer, rx_entry->peer, 0, +- RXD_TX_READ_RSP); +- if (!tx_entry) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "no free tx-entry\n"); +- return -FI_ENOMEM; +- } ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ rxd_progress_op(ep, rx_entry, pkt_entry, base_hdr, sar_hdr, tag_hdr, ++ data_hdr, rma_hdr, atom_hdr, &msg, msg_size); + +- tx_entry->peer = rx_entry->peer; +- tx_entry->read_rsp.iov_count = rx_entry->op_hdr.iov_count; +- for (i = 0; i < rx_entry->op_hdr.iov_count; i++) { +- ret = rxd_mr_verify(rxd_ep_domain(ep), +- rma_iov[i].len, +- (uintptr_t *) &rma_iov[i].addr, +- rma_iov[i].key, FI_REMOTE_READ); +- if (ret) { +- /* todo: handle invalid key case */ +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid key/access permissions\n"); +- return -FI_EACCES; +- } + +- tx_entry->read_rsp.src_iov[i].iov_base = (void *) (uintptr_t) +- rma_iov[i].addr; +- tx_entry->read_rsp.src_iov[i].iov_len = rma_iov[i].len; +- } +- tx_entry->read_rsp.peer_msg_id = ctrl->msg_id; +- ret = rxd_ep_start_xfer(ep, peer, ofi_op_read_rsp, tx_entry); +- if (ret) +- rxd_tx_entry_free(ep, tx_entry); +- rxd_rx_entry_free(ep, rx_entry); +- break; +- case ofi_op_read_rsp: +- idx = rx_entry->op_hdr.remote_idx & RXD_TX_IDX_BITS; +- tx_entry = &ep->tx_entry_fs->buf[idx]; +- if (tx_entry->msg_id != rx_entry->op_hdr.remote_idx) +- return -FI_ENOMEM; +- +- rx_entry->read_rsp.tx_entry = tx_entry; +- rxd_ep_handle_data_msg(ep, peer, rx_entry, tx_entry->read_req.dst_iov, +- tx_entry->read_req.msg.iov_count, ctrl, +- pkt_start->data, rx_buf); +- break; +- case ofi_op_atomic: +- default: +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "invalid op type\n"); +- return -FI_EINVAL; +- } +- return 0; ++ if (!dlist_empty(&ep->peers[base_hdr->peer].buf_pkts)) ++ rxd_progress_buf_pkts(ep, base_hdr->peer); ++ ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ ++ack: ++ rxd_ep_send_ack(ep, base_hdr->peer); ++release: ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ rxd_release_repost_rx(ep, pkt_entry); + } + +-static void rxd_handle_start_data(struct rxd_ep *ep, struct rxd_peer *peer, +- struct ofi_ctrl_hdr *ctrl, +- struct fi_cq_msg_entry *comp, +- struct rxd_rx_buf *rx_buf) ++static void rxd_handle_cts(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- struct rxd_rx_entry *rx_entry; +- struct rxd_pkt_data_start *pkt_start; +- int ret; ++ struct rxd_cts_pkt *cts = (struct rxd_cts_pkt *) (pkt_entry->pkt); + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, +- "start data- msg_id: %" PRIu64 ", segno: %d, buf: %p\n", +- ctrl->msg_id, ctrl->seg_no, rx_buf); ++ rxd_update_peer(ep, cts->rts_addr, cts->cts_addr); ++} + +- pkt_start = (struct rxd_pkt_data_start *) ctrl; +- if (pkt_start->op.version != OFI_OP_VERSION) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "op version mismatch\n"); +- goto repost; +- } ++static void rxd_handle_ack(struct rxd_ep *ep, struct rxd_pkt_entry *ack_entry) ++{ ++ struct rxd_ack_pkt *ack = (struct rxd_ack_pkt *) (ack_entry->pkt); ++ struct rxd_pkt_entry *pkt_entry; ++ fi_addr_t peer = ack->base_hdr.peer; ++ struct rxd_base_hdr *hdr; + +- ret = rxd_check_start_pkt_order(ep, peer, ctrl, comp); +- if (ret) { +- if (ret == -FI_EALREADY) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "duplicate pkt: %d\n", +- ctrl->seg_no); +- rxd_handle_dup_datastart(ep, ctrl, rx_buf); +- goto repost; +- } else { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "unexpected pkt: %d\n", +- ctrl->seg_no); +- goto repost; ++ if (ep->peers[peer].last_rx_ack == ack->base_hdr.seq_no) ++ return; ++ ++ ep->peers[peer].retry_cnt = 0; ++ ep->peers[peer].last_rx_ack = ack->base_hdr.seq_no; ++ ++ if (dlist_empty(&ep->peers[peer].unacked)) ++ return; ++ ++ pkt_entry = container_of((&ep->peers[peer].unacked)->next, ++ struct rxd_pkt_entry, d_entry); ++ ++ while (&pkt_entry->d_entry != &ep->peers[peer].unacked) { ++ hdr = rxd_get_base_hdr(pkt_entry); ++ if (ofi_after_eq(hdr->seq_no, ack->base_hdr.seq_no)) ++ break; ++ ++ if (pkt_entry->flags & RXD_PKT_IN_USE) { ++ pkt_entry->flags |= RXD_PKT_ACKED; ++ pkt_entry = container_of((&pkt_entry->d_entry)->next, ++ struct rxd_pkt_entry, d_entry); ++ continue; + } ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); ++ ep->peers[peer].unacked_cnt--; ++ ++ pkt_entry = container_of((&ep->peers[peer].unacked)->next, ++ struct rxd_pkt_entry, d_entry); + } + +- rx_entry = rxd_rx_entry_alloc(ep); +- if (!rx_entry) +- goto repost; +- +- rx_entry->peer_info = peer; +- rx_entry->op_hdr = pkt_start->op; +- rx_entry->exp_seg_no = 0; +- rx_entry->msg_id = ctrl->msg_id; +- rx_entry->done = 0; +- rx_entry->peer = ctrl->conn_id; +- rx_entry->source = (ep->util_ep.caps & FI_DIRECTED_RECV) ? +- rxd_av_fi_addr(rxd_ep_av(ep), ctrl->conn_id) : FI_ADDR_UNSPEC; +- rx_entry->credits = 1; +- rx_entry->last_win_seg = 1; +- +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "Assign rx_entry :%" PRId64 " for %" PRIx64 "\n", +- rx_entry->key, rx_entry->msg_id); +- +- ep->credits--; +- ret = rxd_process_start_data(ep, rx_entry, peer, ctrl, comp, rx_buf); +- if (ret == -FI_ENOMEM) +- rxd_rx_entry_free(ep, rx_entry); +- else if (ret == -FI_ENOENT) { +- peer->exp_msg_id++; ++ rxd_progress_tx_list(ep, &ep->peers[ack->base_hdr.peer]); ++} + +- /* reply ack, with no window = 0 */ +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "Sending wait-ACK [%" PRIx64 "] - %d\n", +- ctrl->msg_id, ctrl->seg_no); +- goto out; +- } else { +- peer->exp_msg_id++; +- } ++void rxd_handle_send_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ fi_addr_t peer; + +-repost: +- rxd_ep_repost_buff(rx_buf); +-out: +- assert(rxd_reposted_bufs); +- return; ++ pkt_entry = container_of(comp->op_context, struct rxd_pkt_entry, context); ++ ++ switch (rxd_pkt_type(pkt_entry)) { ++ case RXD_CTS: ++ case RXD_ACK: ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); ++ break; ++ default: ++ if (pkt_entry->flags & RXD_PKT_ACKED) { ++ peer = pkt_entry->peer; ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); ++ ep->peers[peer].unacked_cnt--; ++ rxd_progress_tx_list(ep, &ep->peers[peer]); ++ } else { ++ pkt_entry->flags &= ~RXD_PKT_IN_USE; ++ } ++ } ++ ep->pending_cnt--; + } + + void rxd_handle_recv_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp) + { +- struct ofi_ctrl_hdr *ctrl; +- struct rxd_rx_buf *rx_buf; +- struct rxd_peer *peer; ++ struct rxd_pkt_entry *pkt_entry; ++ int release = 1; + + FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "got recv completion\n"); + +- assert(rxd_reposted_bufs); +- rxd_reposted_bufs--; +- +- rx_buf = container_of(comp->op_context, struct rxd_rx_buf, context); +- ctrl = (struct ofi_ctrl_hdr *) rx_buf->buf; +- peer = rxd_ep_getpeer_info(ep, ctrl->conn_id); ++ pkt_entry = container_of(comp->op_context, struct rxd_pkt_entry, context); ++ ep->posted_bufs--; + +- if (ctrl->version != OFI_CTRL_VERSION) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "ctrl version mismatch\n"); +- return; +- } +- +- switch (ctrl->type) { +- case ofi_ctrl_connreq: +- rxd_handle_conn_req(ep, ctrl, comp, rx_buf); +- break; +- case ofi_ctrl_ack: +- rxd_handle_ack(ep, ctrl, rx_buf); +- break; +- case ofi_ctrl_discard: +- rxd_handle_discard(ep, ctrl, rx_buf); ++ pkt_entry->pkt_size = comp->len; ++ switch (rxd_pkt_type(pkt_entry)) { ++ case RXD_RTS: ++ rxd_handle_rts(ep, pkt_entry); + break; +- case ofi_ctrl_connresp: +- rxd_handle_connect_ack(ep, ctrl, rx_buf); ++ case RXD_CTS: ++ rxd_handle_cts(ep, pkt_entry); + break; +- case ofi_ctrl_start_data: +- rxd_handle_start_data(ep, peer, ctrl, comp, rx_buf); ++ case RXD_ACK: ++ rxd_handle_ack(ep, pkt_entry); + break; +- case ofi_ctrl_data: +- rxd_handle_data(ep, peer, ctrl, comp, rx_buf); ++ case RXD_DATA: ++ case RXD_DATA_READ: ++ rxd_handle_data(ep, pkt_entry); + break; + default: +- rxd_ep_repost_buff(rx_buf); +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, +- "invalid ctrl type %u\n", ctrl->type); ++ rxd_handle_op(ep, pkt_entry); ++ release = 0; ++ break; + } + +- rxd_check_waiting_rx(ep); ++ if (release) { ++ rxd_remove_rx_pkt(ep, pkt_entry); ++ rxd_release_repost_rx(ep, pkt_entry); ++ } + } + +-void rxd_handle_send_comp(struct fi_cq_msg_entry *comp) ++void rxd_handle_error(struct rxd_ep *ep) + { +- struct rxd_pkt_meta *pkt_meta; ++ struct fi_cq_err_entry err = {0}; ++ int ret; + +- pkt_meta = container_of(comp->op_context, struct rxd_pkt_meta, context); +- if (pkt_meta->flags & (RXD_REMOTE_ACK | RXD_NOT_ACKED)) +- rxd_tx_pkt_free(pkt_meta); +- else +- pkt_meta->flags |= RXD_LOCAL_COMP; ++ ret = fi_cq_readerr(ep->dg_cq, &err, 0); ++ if (ret < 0) { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "Error reading CQ: %s\n", fi_strerror(-ret)); ++ } else { ++ FI_WARN(&rxd_prov, FI_LOG_CQ, ++ "Received %s error from core provider: %s\n", ++ err.flags & FI_SEND ? "tx" : "rx", fi_strerror(-err.err)); ++ } + } + + static int rxd_cq_close(struct fid *fid) +@@ -1153,13 +1217,71 @@ static struct fi_ops rxd_cq_fi_ops = { + .ops_open = fi_no_ops_open, + }; + ++ssize_t rxd_cq_sreadfrom(struct fid_cq *cq_fid, void *buf, size_t count, ++ fi_addr_t *src_addr, const void *cond, int timeout) ++{ ++ struct fid_list_entry *fid_entry; ++ struct util_cq *cq; ++ struct rxd_ep *ep; ++ uint64_t start; ++ int ret, ep_retry; ++ ++ cq = container_of(cq_fid, struct util_cq, cq_fid); ++ assert(cq->wait && cq->internal_wait); ++ start = (timeout >= 0) ? fi_gettime_ms() : 0; ++ ++ do { ++ ret = ofi_cq_readfrom(cq_fid, buf, count, src_addr); ++ if (ret != -FI_EAGAIN) ++ break; ++ ++ if (timeout >= 0) { ++ timeout -= (int) (fi_gettime_ms() - start); ++ if (timeout <= 0) ++ return -FI_EAGAIN; ++ } ++ ++ if (ofi_atomic_get32(&cq->signaled)) { ++ ofi_atomic_set32(&cq->signaled, 0); ++ return -FI_ECANCELED; ++ } ++ ++ ep_retry = -1; ++ cq->cq_fastlock_acquire(&cq->ep_list_lock); ++ dlist_foreach_container(&cq->ep_list, struct fid_list_entry, ++ fid_entry, entry) { ++ ep = container_of(fid_entry->fid, struct rxd_ep, ++ util_ep.ep_fid.fid); ++ if (ep->next_retry == -1) ++ continue; ++ ep_retry = ep_retry == -1 ? ep->next_retry : ++ MIN(ep_retry, ep->next_retry); ++ } ++ cq->cq_fastlock_release(&cq->ep_list_lock); ++ ++ ret = fi_wait(&cq->wait->wait_fid, ep_retry == -1 ? ++ timeout : rxd_get_timeout(ep_retry)); ++ ++ if (ep_retry != -1 && ret == -FI_ETIMEDOUT) ++ ret = 0; ++ } while (!ret); ++ ++ return ret == -FI_ETIMEDOUT ? -FI_EAGAIN : ret; ++} ++ ++ssize_t rxd_cq_sread(struct fid_cq *cq_fid, void *buf, size_t count, ++ const void *cond, int timeout) ++{ ++ return rxd_cq_sreadfrom(cq_fid, buf, count, NULL, cond, timeout); ++} ++ + static struct fi_ops_cq rxd_cq_ops = { + .size = sizeof(struct fi_ops_cq), + .read = ofi_cq_read, + .readfrom = ofi_cq_readfrom, + .readerr = ofi_cq_readerr, +- .sread = ofi_cq_sread, +- .sreadfrom = ofi_cq_sreadfrom, ++ .sread = rxd_cq_sread, ++ .sreadfrom = rxd_cq_sreadfrom, + .signal = ofi_cq_signal, + .strerror = rxd_cq_strerror, + }; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_domain.c +index e0fb34a17..f535c0255 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_domain.c +@@ -47,6 +47,7 @@ static struct fi_ops_domain rxd_domain_ops = { + .poll_open = fi_poll_create, + .stx_ctx = fi_no_stx_context, + .srx_ctx = fi_no_srx_context, ++ .query_atomic = rxd_query_atomic, + }; + + static int rxd_domain_close(fid_t fid) +@@ -77,119 +78,11 @@ static struct fi_ops rxd_domain_fi_ops = { + .ops_open = fi_no_ops_open, + }; + +-struct rxd_mr_entry { +- struct fid_mr mr_fid; +- struct rxd_domain *domain; +- uint64_t key; +- uint64_t flags; +-}; +- +-static int rxd_mr_close(struct fid *fid) +-{ +- struct rxd_domain *dom; +- struct rxd_mr_entry *mr; +- int err = 0; +- +- mr = container_of(fid, struct rxd_mr_entry, mr_fid.fid); +- dom = mr->domain; +- +- fastlock_acquire(&dom->util_domain.lock); +- err = ofi_mr_map_remove(&dom->mr_map, mr->key); +- fastlock_release(&dom->util_domain.lock); +- if (err) +- return err; +- +- ofi_atomic_dec32(&dom->util_domain.ref); +- free(mr); +- return 0; +-} +- +-static struct fi_ops rxd_mr_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = rxd_mr_close, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +- +-static int rxd_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, +- uint64_t flags, struct fid_mr **mr) +-{ +- struct rxd_domain *dom; +- struct rxd_mr_entry *_mr; +- uint64_t key; +- int ret = 0; +- +- if (fid->fclass != FI_CLASS_DOMAIN || !attr || attr->iov_count <= 0) { +- return -FI_EINVAL; +- } +- +- dom = container_of(fid, struct rxd_domain, util_domain.domain_fid.fid); +- _mr = calloc(1, sizeof(*_mr)); +- if (!_mr) +- return -FI_ENOMEM; +- +- fastlock_acquire(&dom->util_domain.lock); +- +- _mr->mr_fid.fid.fclass = FI_CLASS_MR; +- _mr->mr_fid.fid.context = attr->context; +- _mr->mr_fid.fid.ops = &rxd_mr_fi_ops; +- +- _mr->domain = dom; +- _mr->flags = flags; +- +- ret = ofi_mr_map_insert(&dom->mr_map, attr, &key, _mr); +- if (ret != 0) { +- goto err; +- } +- +- _mr->mr_fid.key = _mr->key = key; +- _mr->mr_fid.mem_desc = (void *) (uintptr_t) key; +- fastlock_release(&dom->util_domain.lock); +- +- *mr = &_mr->mr_fid; +- ofi_atomic_inc32(&dom->util_domain.ref); +- +- return 0; +-err: +- fastlock_release(&dom->util_domain.lock); +- free(_mr); +- return ret; +-} +- +-static int rxd_mr_regv(struct fid *fid, const struct iovec *iov, +- size_t count, uint64_t access, +- uint64_t offset, uint64_t requested_key, +- uint64_t flags, struct fid_mr **mr, void *context) +-{ +- struct fi_mr_attr attr; +- +- attr.mr_iov = iov; +- attr.iov_count = count; +- attr.access = access; +- attr.offset = offset; +- attr.requested_key = requested_key; +- attr.context = context; +- return rxd_mr_regattr(fid, &attr, flags, mr); +-} +- +-static int rxd_mr_reg(struct fid *fid, const void *buf, size_t len, +- uint64_t access, uint64_t offset, uint64_t requested_key, +- uint64_t flags, struct fid_mr **mr, void *context) +-{ +- struct iovec iov; +- +- iov.iov_base = (void *) buf; +- iov.iov_len = len; +- return rxd_mr_regv(fid, &iov, 1, access, offset, requested_key, +- flags, mr, context); +-} +- + static struct fi_ops_mr rxd_mr_ops = { + .size = sizeof(struct fi_ops_mr), +- .reg = rxd_mr_reg, +- .regv = rxd_mr_regv, +- .regattr = rxd_mr_regattr, ++ .reg = ofi_mr_reg, ++ .regv = ofi_mr_regv, ++ .regattr = ofi_mr_regattr, + }; + + int rxd_mr_verify(struct rxd_domain *rxd_domain, ssize_t len, +@@ -214,9 +107,6 @@ int rxd_domain_open(struct fid_fabric *fabric, struct fi_info *info, + + rxd_fabric = container_of(fabric, struct rxd_fabric, + util_fabric.fabric_fid); +- ret = ofi_prov_check_info(&rxd_util_prov, fabric->api_version, info); +- if (ret) +- return ret; + + rxd_domain = calloc(1, sizeof(*rxd_domain)); + if (!rxd_domain) +@@ -234,7 +124,17 @@ int rxd_domain_open(struct fid_fabric *fabric, struct fi_info *info, + if (ret) + goto err2; + +- rxd_domain->max_mtu_sz = dg_info->ep_attr->max_msg_size; ++ rxd_domain->max_mtu_sz = MIN(dg_info->ep_attr->max_msg_size, RXD_MAX_MTU_SIZE); ++ rxd_domain->max_inline_msg = rxd_domain->max_mtu_sz - ++ sizeof(struct rxd_base_hdr) - ++ dg_info->ep_attr->msg_prefix_size; ++ rxd_domain->max_inline_rma = rxd_domain->max_inline_msg - ++ (sizeof(struct rxd_rma_hdr) + ++ (RXD_IOV_LIMIT * sizeof(struct ofi_rma_iov))); ++ rxd_domain->max_inline_atom = rxd_domain->max_inline_rma - ++ sizeof(struct rxd_atom_hdr); ++ rxd_domain->max_seg_sz = rxd_domain->max_mtu_sz - sizeof(struct rxd_data_pkt) - ++ dg_info->ep_attr->msg_prefix_size; + rxd_domain->mr_mode = dg_info->domain_attr->mr_mode; + + ret = ofi_domain_init(fabric, info, &rxd_domain->util_domain, context); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_ep.c +index 5d3c5cde1..27b446d04 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_ep.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -36,1270 +36,748 @@ + #include + #include "rxd.h" + +-int rxd_progress_spin_count = 1000; +-int rxd_reposted_bufs = 0; +- +-static ssize_t rxd_ep_cancel(fid_t fid, void *context) ++struct rxd_pkt_entry *rxd_get_tx_pkt(struct rxd_ep *ep) + { +- struct rxd_ep *ep; +- struct dlist_entry *entry, *next; +- struct rxd_recv_entry *recv_entry; +- struct rxd_trecv_entry *trecv_entry; +- struct fi_cq_err_entry err_entry = {0}; ++ struct rxd_pkt_entry *pkt_entry; ++ void *mr = NULL; + +- ep = container_of(fid, struct rxd_ep, util_ep.ep_fid.fid); +- fastlock_acquire(&ep->lock); +- if (ep->util_ep.caps & FI_MSG) { +- for (entry = ep->recv_list.next; entry != &ep->recv_list; entry = next) { +- next = entry->next; +- recv_entry = container_of(entry, struct rxd_recv_entry, entry); +- if (recv_entry->msg.context != context) +- continue; +- +- dlist_remove(entry); +- err_entry.op_context = recv_entry->msg.context; +- err_entry.flags = (FI_MSG | FI_RECV); +- err_entry.err = FI_ECANCELED; +- err_entry.prov_errno = -FI_ECANCELED; +- rxd_cq_report_error(rxd_ep_rx_cq(ep), &err_entry); +- goto out; +- } +- } ++ pkt_entry = ep->do_local_mr ? ++ util_buf_alloc_ex(ep->tx_pkt_pool, &mr) : ++ util_buf_alloc(ep->tx_pkt_pool); + +- if (ep->util_ep.caps & FI_TAGGED) { +- for (entry = ep->trecv_list.next; entry != &ep->trecv_list; entry = next) { +- next = entry->next; +- trecv_entry = container_of(entry, struct rxd_trecv_entry, entry); +- if (trecv_entry->msg.context != context) +- continue; +- +- dlist_remove(entry); +- err_entry.op_context = trecv_entry->msg.context; +- err_entry.flags = (FI_MSG | FI_RECV | FI_TAGGED); +- err_entry.tag = trecv_entry->msg.tag; +- err_entry.err = FI_ECANCELED; +- err_entry.prov_errno = -FI_ECANCELED; +- rxd_cq_report_error(rxd_ep_rx_cq(ep), &err_entry); +- goto out; +- } +- } ++ if (!pkt_entry) ++ return NULL; + +-out: +- fastlock_release(&ep->lock); +- return 0; ++ pkt_entry->mr = (struct fid_mr *) mr; ++ pkt_entry->flags = 0; ++ rxd_set_tx_pkt(ep, pkt_entry); ++ ++ return pkt_entry; + } + +-static int rxd_ep_getopt(fid_t fid, int level, int optname, +- void *optval, size_t *optlen) ++static struct rxd_pkt_entry *rxd_get_rx_pkt(struct rxd_ep *ep) + { +- return -FI_ENOSYS; ++ struct rxd_pkt_entry *pkt_entry; ++ void *mr = NULL; ++ ++ pkt_entry = ep->do_local_mr ? ++ util_buf_alloc_ex(ep->rx_pkt_pool, &mr) : ++ util_buf_alloc(ep->rx_pkt_pool); ++ ++ if (!pkt_entry) ++ return NULL; ++ ++ pkt_entry->mr = (struct fid_mr *) mr; ++ rxd_set_rx_pkt(ep, pkt_entry); ++ ++ return pkt_entry; + } + +-static int rxd_ep_setopt(fid_t fid, int level, int optname, +- const void *optval, size_t optlen) ++struct rxd_x_entry *rxd_get_tx_entry(struct rxd_ep *ep) + { +- return -FI_ENOSYS; +-} ++ struct rxd_x_entry *tx_entry; + +-struct fi_ops_ep rxd_ops_ep = { +- .size = sizeof(struct fi_ops_ep), +- .cancel = rxd_ep_cancel, +- .getopt = rxd_ep_getopt, +- .setopt = rxd_ep_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; ++ tx_entry = util_buf_indexed_alloc(ep->tx_entry_pool); ++ if (!tx_entry) ++ return NULL; + +-static ssize_t rxd_ep_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, +- uint64_t flags) +-{ +- ssize_t ret = 0; +- size_t i; +- struct rxd_ep *rxd_ep; +- struct rxd_recv_entry *recv_entry; ++ tx_entry->tx_id = util_get_buf_index(ep->tx_entry_pool, tx_entry); + +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid.fid); ++ return tx_entry; ++} + +- fastlock_acquire(&rxd_ep->lock); +- if (freestack_isempty(rxd_ep->recv_fs)) { +- ret = -FI_EAGAIN; +- goto out; +- } ++struct rxd_x_entry *rxd_get_rx_entry(struct rxd_ep *ep) ++{ ++ struct rxd_x_entry *rx_entry; + +- recv_entry = freestack_pop(rxd_ep->recv_fs); +- recv_entry->msg = *msg; +- recv_entry->flags = flags; +- recv_entry->msg.addr = (rxd_ep->util_ep.caps & FI_DIRECTED_RECV) ? +- recv_entry->msg.addr : FI_ADDR_UNSPEC; +- for (i = 0; i < msg->iov_count; i++) { +- recv_entry->iov[i].iov_base = msg->msg_iov[i].iov_base; +- recv_entry->iov[i].iov_len = msg->msg_iov[i].iov_len; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "post recv: %zu\n", +- msg->msg_iov[i].iov_len); +- } ++ rx_entry = util_buf_indexed_alloc(ep->rx_entry_pool); ++ if (!rx_entry) ++ return NULL; + +- dlist_init(&recv_entry->entry); +- dlist_insert_tail(&recv_entry->entry, &rxd_ep->recv_list); ++ rx_entry->rx_id = util_get_buf_index(ep->rx_entry_pool, rx_entry); + +- if (!dlist_empty(&rxd_ep->unexp_msg_list)) { +- rxd_ep_check_unexp_msg_list(rxd_ep, recv_entry); +- } +-out: +- fastlock_release(&rxd_ep->lock); +- return ret; ++ return rx_entry; + } + +-static ssize_t rxd_ep_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, +- fi_addr_t src_addr, void *context) ++void rxd_release_tx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt) + { +- struct fi_msg msg; +- struct iovec msg_iov; +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = buf; +- msg_iov.iov_len = len; +- +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = src_addr; +- msg.context = context; +- msg.data = 0; +- return rxd_ep_recvmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ util_buf_release(ep->tx_pkt_pool, pkt); + } + +-static ssize_t rxd_ep_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) ++void rxd_release_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt) + { +- struct fi_msg msg; +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = src_addr; +- msg.context = context; +- msg.data = 0; +- return rxd_ep_recvmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ util_buf_release(ep->rx_pkt_pool, pkt); + } + +-static inline void *rxd_mr_desc(struct fid_mr *mr, struct rxd_ep *ep) ++static void rxd_release_tx_entry(struct rxd_ep *ep, struct rxd_x_entry *x_entry) + { +- return (ep->do_local_mr) ? fi_mr_desc(mr) : NULL; ++ util_buf_indexed_release(ep->tx_entry_pool, x_entry); + } + +-int rxd_ep_repost_buff(struct rxd_rx_buf *buf) ++void rxd_release_rx_entry(struct rxd_ep *ep, struct rxd_x_entry *x_entry) + { +- int ret; +- ret = fi_recv(buf->ep->dg_ep, buf->buf, rxd_ep_domain(buf->ep)->max_mtu_sz, +- rxd_mr_desc(buf->mr, buf->ep), +- FI_ADDR_UNSPEC, &buf->context); +- if (ret) +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "failed to repost\n"); +- else +- rxd_reposted_bufs++; +- return ret; ++ util_buf_indexed_release(ep->rx_entry_pool, x_entry); + } + +-/* +- * See ofi_proto.h for how conn_data is being used. +- */ +-static uint64_t rxd_ep_conn_data(struct rxd_ep *ep) ++static int rxd_match_ctx(struct dlist_entry *item, const void *arg) + { +- char name[RXD_MAX_DGRAM_ADDR]; +- size_t addrlen; +- int ret; +- +- if (ep->conn_data_set) +- return ep->conn_data; +- +- addrlen = sizeof name; +- ret = fi_getname(&ep->dg_ep->fid, name, &addrlen); +- if (ret) +- return 0; ++ struct rxd_x_entry *x_entry; + +- ret = rxd_av_dg_reverse_lookup(rxd_ep_av(ep), 0, name, &ep->conn_data); +- if (!ret) +- ep->conn_data_set = 1; ++ x_entry = container_of(item, struct rxd_x_entry, entry); + +- return ep->conn_data; ++ return (x_entry->cq_entry.op_context == arg); + } + +-static int rxd_ep_enable(struct rxd_ep *ep) ++static ssize_t rxd_ep_cancel_recv(struct rxd_ep *ep, struct dlist_entry *list, ++ void *context) + { +- size_t i; +- ssize_t ret; +- void *mr = NULL; +- struct rxd_rx_buf *rx_buf; ++ struct dlist_entry *entry; ++ struct rxd_x_entry *rx_entry; ++ struct fi_cq_err_entry err_entry; ++ int ret = 0; + +- ret = fi_enable(ep->dg_ep); +- if (ret) +- return ret; ++ fastlock_acquire(&ep->util_ep.lock); + +- fastlock_acquire(&ep->lock); +- ep->credits = ep->rx_size; +- for (i = 0; i < ep->rx_size; i++) { +- rx_buf = ep->do_local_mr ? +- util_buf_get_ex(ep->rx_pkt_pool, &mr) : +- util_buf_get(ep->rx_pkt_pool); ++ entry = dlist_find_first_match(list, &rxd_match_ctx, context); ++ if (!entry) ++ goto out; + +- if (!rx_buf) { +- ret = -FI_ENOMEM; +- goto out; +- } ++ rx_entry = container_of(entry, struct rxd_x_entry, entry); ++ memset(&err_entry, 0, sizeof(struct fi_cq_err_entry)); ++ err_entry.op_context = rx_entry->cq_entry.op_context; ++ err_entry.flags = rx_entry->cq_entry.flags; ++ err_entry.err = FI_ECANCELED; ++ err_entry.prov_errno = 0; ++ rxd_cq_report_error(rxd_ep_rx_cq(ep), &err_entry); + +- rx_buf->mr = (struct fid_mr *) mr; +- rx_buf->ep = ep; +- ret = rxd_ep_repost_buff(rx_buf); +- if (ret) +- goto out; +- slist_insert_tail(&rx_buf->entry, &ep->rx_pkt_list); +- } ++ rx_entry->flags |= RXD_CANCELLED; ++ ++ ret = 1; + out: +- fastlock_release(&ep->lock); ++ fastlock_release(&ep->util_ep.lock); + return ret; + } + +-struct rxd_peer *rxd_ep_getpeer_info(struct rxd_ep *ep, fi_addr_t addr) ++static ssize_t rxd_ep_cancel(fid_t fid, void *context) + { +- return &ep->peer_info[addr]; +-} ++ struct rxd_ep *ep; ++ int ret; + +-/* +- * Exponential back-off starting at 1ms, max 4s. +- */ +-void rxd_set_timeout(struct rxd_tx_entry *tx_entry) +-{ +- tx_entry->retry_time = fi_gettime_ms() + +- MIN(1 << tx_entry->retry_cnt, 4000); +-} ++ ep = container_of(fid, struct rxd_ep, util_ep.ep_fid); + +-static void rxd_init_ctrl_hdr(struct ofi_ctrl_hdr *ctrl, +- uint8_t type, uint16_t seg_size, +- uint32_t seg_no, uint64_t msg_id, +- uint64_t rx_key, uint64_t source) +-{ +- ctrl->version = OFI_CTRL_VERSION; +- ctrl->type = type; +- ctrl->seg_size = seg_size; +- ctrl->seg_no = seg_no; +- ctrl->msg_id = msg_id; +- ctrl->rx_key = rx_key; +- ctrl->conn_id = source; +-} ++ ret = rxd_ep_cancel_recv(ep, &ep->rx_tag_list, context); ++ if (ret) ++ goto out; + +-static void rxd_init_op_hdr(struct ofi_op_hdr *op, uint64_t data, +- uint64_t msg_sz, uint8_t rx_index, +- uint8_t op_type, uint64_t tag, uint32_t flags) +-{ +- op->version = OFI_OP_VERSION; +- op->rx_index = rx_index; +- op->op = op_type; +- op->op_data = 0; /* unused */ +- op->flags = flags; +- op->size = msg_sz; +- op->data = data; +- op->tag = tag; +-} ++ ret = rxd_ep_cancel_recv(ep, &ep->rx_list, context); + +-static uint32_t rxd_map_fi_flags(uint64_t fi_flags) +-{ +- uint32_t flags = 0; +- +- if (fi_flags & FI_REMOTE_CQ_DATA) +- flags = OFI_REMOTE_CQ_DATA; +- if (fi_flags & FI_TRANSMIT_COMPLETE) +- flags |= OFI_TRANSMIT_COMPLETE; +- if (fi_flags & FI_DELIVERY_COMPLETE) +- flags |= OFI_DELIVERY_COMPLETE; +- return flags; ++out: ++ return 0; + } + +-static struct rxd_pkt_meta *rxd_tx_pkt_alloc(struct rxd_ep *ep) ++static int rxd_ep_getopt(fid_t fid, int level, int optname, ++ void *optval, size_t *optlen) + { +- struct rxd_pkt_meta *pkt_meta; +- void *mr = NULL; ++ struct rxd_ep *rxd_ep = ++ container_of(fid, struct rxd_ep, util_ep.ep_fid); + +- pkt_meta = ep->do_local_mr ? +- util_buf_alloc_ex(ep->tx_pkt_pool, &mr) : +- util_buf_alloc(ep->tx_pkt_pool); ++ if ((level != FI_OPT_ENDPOINT) || (optname != FI_OPT_MIN_MULTI_RECV)) ++ return -FI_ENOPROTOOPT; + +- if (!pkt_meta) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "No free tx pkt\n"); +- return NULL; +- } ++ *(size_t *)optval = rxd_ep->min_multi_recv_size; ++ *optlen = sizeof(size_t); + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "Acquired tx pkt: %p\n", pkt_meta); +- pkt_meta->ep = ep; +- pkt_meta->mr = (struct fid_mr *) mr; +- pkt_meta->flags = 0; +- return pkt_meta; ++ return FI_SUCCESS; + } + +-static uint64_t rxd_ep_start_seg_size(struct rxd_ep *ep, uint64_t msg_size) +-{ +- return MIN(rxd_ep_domain(ep)->max_mtu_sz - +- sizeof(struct rxd_pkt_data_start), msg_size); +-} +- +-struct rxd_tx_entry *rxd_tx_entry_alloc(struct rxd_ep *ep, +- struct rxd_peer *peer, fi_addr_t addr, uint64_t flags, uint8_t op) ++static int rxd_ep_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) + { +- struct rxd_tx_entry *tx_entry; +- +- if (freestack_isempty(ep->tx_entry_fs)) { +- FI_INFO(&rxd_prov, FI_LOG_EP_CTRL, "no-more tx entries\n"); +- return NULL; +- } ++ struct rxd_ep *rxd_ep = ++ container_of(fid, struct rxd_ep, util_ep.ep_fid); + +- if (peer->active_tx_cnt == RXD_MAX_PEER_TX) +- return NULL; ++ if ((level != FI_OPT_ENDPOINT) || (optname != FI_OPT_MIN_MULTI_RECV)) ++ return -FI_ENOPROTOOPT; + +- peer->active_tx_cnt++; ++ rxd_ep->min_multi_recv_size = *(size_t *)optval; + +- tx_entry = freestack_pop(ep->tx_entry_fs); +- tx_entry->peer = addr; +- tx_entry->flags = flags; +- tx_entry->bytes_sent = 0; +- tx_entry->seg_no = 0; +- tx_entry->window = 1; +- tx_entry->retry_cnt = 0; +- tx_entry->op_type = op; +- dlist_init(&tx_entry->pkt_list); +- return tx_entry; ++ return FI_SUCCESS; + } + +-void rxd_tx_entry_free(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry) +-{ +- struct rxd_peer *peer; +- +- peer = rxd_ep_getpeer_info(ep, tx_entry->peer); +- peer->active_tx_cnt--; +- /* reset ID to invalid state to avoid ID collision */ +- tx_entry->msg_id = UINT64_MAX; +- dlist_remove(&tx_entry->entry); +- freestack_push(ep->tx_entry_fs, tx_entry); +-} ++struct fi_ops_ep rxd_ops_ep = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = rxd_ep_cancel, ++ .getopt = rxd_ep_getopt, ++ .setopt = rxd_ep_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; + +-static size_t rxd_copy_rma_iov(struct ofi_rma_iov *dst, +- const struct fi_rma_iov *src, size_t count) ++struct rxd_x_entry *rxd_rx_entry_init(struct rxd_ep *ep, ++ const struct iovec *iov, size_t iov_count, uint64_t tag, ++ uint64_t ignore, void *context, fi_addr_t addr, ++ uint32_t op, uint32_t flags) + { +- int i; ++ struct rxd_x_entry *rx_entry; + +- for (i = 0; i < count; i++) { +- dst->addr = src->addr; +- dst->len = src->len; +- dst->key = src->key; ++ rx_entry = rxd_get_rx_entry(ep); ++ if (!rx_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get rx entry\n"); ++ return NULL; + } +- return sizeof(*dst) * count; +-} + +-static uint64_t rxd_ep_copy_data(struct rxd_tx_entry *tx_entry, +- char *buf, uint64_t size) +-{ +- const struct iovec *iov; +- size_t iov_count; ++ rx_entry->peer = addr; ++ rx_entry->flags = flags; ++ rx_entry->bytes_done = 0; ++ rx_entry->offset = 0; ++ rx_entry->next_seg_no = 0; ++ rx_entry->window = rxd_env.max_unacked; ++ rx_entry->iov_count = iov_count; ++ rx_entry->op = op; ++ rx_entry->ignore = ignore; + +- switch(tx_entry->op_hdr.op) { +- case ofi_op_msg: +- iov = tx_entry->msg.msg_iov; +- iov_count = tx_entry->msg.msg.iov_count; +- break; +- case ofi_op_tagged: +- iov = tx_entry->tmsg.msg_iov; +- iov_count = tx_entry->tmsg.tmsg.iov_count; +- break; +- case ofi_op_write: +- iov = tx_entry->write.src_iov; +- iov_count = tx_entry->write.msg.iov_count; +- break; +- case ofi_op_read_rsp: +- iov = tx_entry->read_rsp.src_iov; +- iov_count = tx_entry->read_rsp.iov_count; +- break; +- default: +- return 0; +- } ++ memcpy(rx_entry->iov, iov, sizeof(*rx_entry->iov) * iov_count); + +- return ofi_copy_from_iov(buf, size, iov, iov_count, tx_entry->bytes_sent); +-} ++ rx_entry->cq_entry.op_context = context; ++ rx_entry->cq_entry.len = ofi_total_iov_len(iov, iov_count); ++ rx_entry->cq_entry.buf = iov[0].iov_base; ++ rx_entry->cq_entry.tag = tag; + +-static void rxd_ep_init_data_pkt(struct rxd_ep *ep, struct rxd_peer *peer, +- struct rxd_tx_entry *tx_entry, +- struct rxd_pkt_data *pkt) +-{ +- uint16_t seg_size; +- +- seg_size = rxd_ep_domain(ep)->max_mtu_sz - sizeof(struct rxd_pkt_data); +- seg_size = MIN(seg_size, tx_entry->op_hdr.size - tx_entry->bytes_sent); ++ rx_entry->cq_entry.flags = ofi_rx_cq_flags(op); ++ dlist_init(&rx_entry->entry); + +- rxd_init_ctrl_hdr(&pkt->ctrl, ofi_ctrl_data, seg_size, tx_entry->seg_no, +- tx_entry->msg_id, tx_entry->rx_key, peer->conn_data); +- tx_entry->bytes_sent += rxd_ep_copy_data(tx_entry, pkt->data, seg_size); +- tx_entry->seg_no++; ++ return rx_entry; + } + +-static ssize_t rxd_ep_post_data_msg(struct rxd_ep *ep, +- struct rxd_tx_entry *tx_entry) ++static inline void *rxd_mr_desc(struct fid_mr *mr, struct rxd_ep *ep) + { +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_pkt_data *pkt; +- struct rxd_peer *peer; +- int ret; ++ return (ep->do_local_mr) ? fi_mr_desc(mr) : NULL; ++} + +- peer = rxd_ep_getpeer_info(ep, tx_entry->peer); ++int rxd_ep_post_buf(struct rxd_ep *ep) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ ssize_t ret; + +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) ++ pkt_entry = rxd_get_rx_pkt(ep); ++ if (!pkt_entry) + return -FI_ENOMEM; + +- pkt_meta->tx_entry = tx_entry; +- pkt = (struct rxd_pkt_data *) pkt_meta->pkt_data; +- rxd_ep_init_data_pkt(ep, peer, tx_entry, pkt); +- +- if (tx_entry->op_hdr.size == pkt->ctrl.seg_size) +- pkt_meta->flags |= RXD_PKT_LAST; +- +- ret = fi_send(ep->dg_ep, pkt, sizeof(*pkt) + pkt->ctrl.seg_size, +- rxd_mr_desc(pkt_meta->mr, ep), tx_entry->peer, +- &pkt_meta->context); ++ ret = fi_recv(ep->dg_ep, rxd_pkt_start(pkt_entry), ++ rxd_ep_domain(ep)->max_mtu_sz, ++ rxd_mr_desc(pkt_entry->mr, ep), ++ FI_ADDR_UNSPEC, &pkt_entry->context); + if (ret) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "send %d failed\n", +- pkt->ctrl.seg_no); ++ rxd_release_rx_pkt(ep, pkt_entry); ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "failed to repost\n"); ++ return ret; + } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "msg data %" PRIx64 ", seg %d\n", +- pkt->ctrl.msg_id, pkt->ctrl.seg_no); +- dlist_insert_tail(&pkt_meta->entry, &tx_entry->pkt_list); ++ ep->posted_bufs++; ++ slist_insert_tail(&pkt_entry->s_entry, &ep->rx_pkt_list); + +- return ret; ++ return 0; + } + +-void rxd_ep_free_acked_pkts(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry, +- uint32_t last_acked) ++static int rxd_ep_enable(struct rxd_ep *ep) + { +- struct rxd_pkt_meta *pkt; +- struct ofi_ctrl_hdr *ctrl; ++ size_t i; ++ ssize_t ret; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "freeing all [%" PRIx64 "] pkts < %d\n", +- tx_entry->msg_id, last_acked); +- while (!dlist_empty(&tx_entry->pkt_list)) { ++ ret = fi_ep_bind(ep->dg_ep, &ep->dg_cq->fid, FI_TRANSMIT | FI_RECV); ++ if (ret) ++ return ret; + +- pkt = container_of(tx_entry->pkt_list.next, +- struct rxd_pkt_meta, entry); +- ctrl = (struct ofi_ctrl_hdr *) pkt->pkt_data; +- if (ctrl->seg_no >= last_acked) ++ ret = fi_enable(ep->dg_ep); ++ if (ret) ++ return ret; ++ ++ fastlock_acquire(&ep->util_ep.lock); ++ for (i = 0; i < ep->rx_size; i++) { ++ ret = rxd_ep_post_buf(ep); ++ if (ret) + break; ++ } + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "freeing [%" PRIx64 "] pkt:%d\n", +- tx_entry->msg_id, ctrl->seg_no); +- dlist_remove(&pkt->entry); +- if (pkt->flags & RXD_LOCAL_COMP) +- rxd_tx_pkt_free(pkt); +- else +- pkt->flags |= RXD_REMOTE_ACK; +- }; ++ fastlock_release(&ep->util_ep.lock); ++ return 0; + } + +-static int rxd_ep_retry_pkt(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry, +- struct rxd_pkt_meta *pkt) ++/* ++ * Exponential back-off starting at 1ms, max 4s. ++ */ ++int rxd_get_timeout(uint8_t retry_cnt) + { +- int ret; +- struct ofi_ctrl_hdr *ctrl; +- +- ctrl = (struct ofi_ctrl_hdr *)pkt->pkt_data; +-// if (pkt->retries > RXD_MAX_PKT_RETRY) { +-// /* todo: report error */ +-// FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "Pkt delivery failed\n", ctrl->seg_no); +-// return -FI_EIO; +-// } +-// +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "retry packet : %2d, size: %zd, tx_id :%" PRIx64 "\n", +- ctrl->seg_no, ctrl->type == ofi_ctrl_start_data ? +- ctrl->seg_size + sizeof(struct rxd_pkt_data_start) : +- ctrl->seg_size + sizeof(struct rxd_pkt_data), +- ctrl->msg_id); +- +- ret = fi_send(ep->dg_ep, ctrl, +- ctrl->type == ofi_ctrl_start_data ? +- ctrl->seg_size + sizeof(struct rxd_pkt_data_start) : +- ctrl->seg_size + sizeof(struct rxd_pkt_data), +- rxd_mr_desc(pkt->mr, ep), +- tx_entry->peer, &pkt->context); +- +-// if (ret != -FI_EAGAIN) +-// pkt->retries++; +- +- if (ret && ret != -FI_EAGAIN) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "Pkt sent failed seg: %d, ret: %d\n", +- ctrl->seg_no, ret); +- } +- +- return ret; ++ return MIN(1 << retry_cnt, 4000); + } + +-//void rxd_resend_pkt(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry ) +-//{ +-// struct dlist_entry *pkt_item; +-// struct rxd_pkt_meta *pkt; +-// struct ofi_ctrl_hdr *ctrl; +-// +-// dlist_foreach(&tx_entry->pkt_list, pkt_item) { +-// pkt = container_of(pkt_item, struct rxd_pkt_meta, entry); +-// ctrl = (struct ofi_ctrl_hdr *) pkt->pkt_data; +-// +-// FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "resending pkt %d, %p\n", +-// ctrl->seg_no, ctrl->msg_id); +-// +-// rxd_ep_retry_pkt(ep, tx_entry, pkt); +-// } +-//} +- +-void rxd_tx_entry_progress(struct rxd_ep *ep, struct rxd_tx_entry *tx_entry) ++uint64_t rxd_get_retry_time(uint64_t start, uint8_t retry_cnt) + { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "tx: %p [%" PRIx64 "]\n", +- tx_entry, tx_entry->msg_id); +- +- while ((tx_entry->seg_no < tx_entry->window) && +- (tx_entry->bytes_sent != tx_entry->op_hdr.size)) { +- if (rxd_ep_post_data_msg(ep, tx_entry)) +- break; +- } +- rxd_set_timeout(tx_entry); ++ return start + rxd_get_timeout(retry_cnt); + } + +-int rxd_ep_reply_ack(struct rxd_ep *ep, struct ofi_ctrl_hdr *in_ctrl, +- uint8_t type, uint16_t seg_size, uint64_t rx_key, +- uint64_t source, fi_addr_t dest) ++void rxd_init_data_pkt(struct rxd_ep *ep, struct rxd_x_entry *tx_entry, ++ struct rxd_pkt_entry *pkt_entry) + { +- ssize_t ret; +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_pkt_data *pkt; +- struct rxd_rx_entry *rx_entry; ++ struct rxd_data_pkt *data_pkt = (struct rxd_data_pkt *) (pkt_entry->pkt); ++ uint32_t seg_size; + +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) +- return -FI_ENOMEM; ++ seg_size = tx_entry->cq_entry.len - tx_entry->bytes_done; ++ seg_size = MIN(rxd_ep_domain(ep)->max_seg_sz, seg_size); + +- rx_entry = (rx_key != UINT64_MAX) ? &ep->rx_entry_fs->buf[rx_key] : NULL; ++ data_pkt->base_hdr.version = RXD_PROTOCOL_VERSION; ++ data_pkt->base_hdr.type = (tx_entry->cq_entry.flags & ++ (FI_READ | FI_REMOTE_READ)) ? ++ RXD_DATA_READ : RXD_DATA; + +- pkt = (struct rxd_pkt_data *)pkt_meta->pkt_data; +- rxd_init_ctrl_hdr(&pkt->ctrl, type, seg_size, +- rx_entry ? rx_entry->exp_seg_no : 0, +- in_ctrl->msg_id, rx_key, source); ++ data_pkt->ext_hdr.rx_id = tx_entry->rx_id; ++ data_pkt->ext_hdr.tx_id = tx_entry->tx_id; ++ data_pkt->ext_hdr.seg_no = tx_entry->next_seg_no++; ++ data_pkt->base_hdr.peer = ep->peers[tx_entry->peer].peer_addr; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "sending ack [%" PRIx64 "] - segno: %d, window: %d\n", +- pkt->ctrl.msg_id, pkt->ctrl.seg_no, pkt->ctrl.seg_size); ++ pkt_entry->pkt_size = ofi_copy_from_iov(data_pkt->msg, seg_size, ++ tx_entry->iov, ++ tx_entry->iov_count, ++ tx_entry->bytes_done); ++ pkt_entry->peer = tx_entry->peer; + +- pkt_meta->flags = RXD_NOT_ACKED; +- ret = fi_send(ep->dg_ep, pkt, sizeof(struct rxd_pkt_data), +- rxd_mr_desc(pkt_meta->mr, ep), +- dest, &pkt_meta->context); +- if (ret) +- util_buf_release(ep->tx_pkt_pool, pkt_meta); ++ tx_entry->bytes_done += pkt_entry->pkt_size; + +- return ret; ++ pkt_entry->pkt_size += sizeof(*data_pkt) + ep->tx_prefix_size; + } + +-#define RXD_TX_ENTRY_ID(ep, tx_entry) (tx_entry - &ep->tx_entry_fs->buf[0]) +- +-static void rxd_ep_init_start_pkt(struct rxd_ep *ep, struct rxd_peer *peer, +- uint8_t op, struct rxd_tx_entry *tx_entry, +- struct rxd_pkt_data_start *pkt, uint32_t flags) ++struct rxd_x_entry *rxd_tx_entry_init(struct rxd_ep *ep, const struct iovec *iov, ++ size_t iov_count, const struct iovec *res_iov, ++ size_t res_count, size_t rma_count, ++ uint64_t data, uint64_t tag, void *context, ++ fi_addr_t addr, uint32_t op, uint32_t flags) + { +- uint64_t msg_size, iov_size; +- uint16_t seg_size; +- +- switch (op) { +- case ofi_op_msg: +- msg_size = ofi_total_iov_len(tx_entry->msg.msg_iov, +- tx_entry->msg.msg.iov_count); +- seg_size = rxd_ep_start_seg_size(ep, msg_size); +- rxd_init_op_hdr(&pkt->op, tx_entry->msg.msg.data, msg_size, 0, +- op, 0, flags); +- break; +- case ofi_op_tagged: +- msg_size = ofi_total_iov_len(tx_entry->tmsg.msg_iov, +- tx_entry->tmsg.tmsg.iov_count); +- seg_size = rxd_ep_start_seg_size(ep, msg_size); +- rxd_init_op_hdr(&pkt->op, tx_entry->tmsg.tmsg.data, msg_size, 0, +- op, tx_entry->tmsg.tmsg.tag, flags); +- break; +- case ofi_op_write: +- msg_size = ofi_total_iov_len(tx_entry->write.msg.msg_iov, +- tx_entry->write.msg.iov_count); +- iov_size = rxd_copy_rma_iov((struct ofi_rma_iov *) pkt->data, +- tx_entry->write.dst_iov, +- tx_entry->write.msg.rma_iov_count); +- seg_size = MIN(rxd_ep_domain(ep)->max_mtu_sz - +- sizeof(struct rxd_pkt_data_start) - iov_size, msg_size); +- rxd_init_op_hdr(&pkt->op, tx_entry->write.msg.data, msg_size, 0, +- op, 0, flags); +- pkt->op.iov_count = tx_entry->write.msg.rma_iov_count; +- break; +- case ofi_op_read_req: +- msg_size = ofi_total_iov_len(tx_entry->read_req.msg.msg_iov, +- tx_entry->read_req.msg.iov_count); +- iov_size = rxd_copy_rma_iov((struct ofi_rma_iov *) pkt->data, +- tx_entry->read_req.src_iov, +- tx_entry->read_req.msg.rma_iov_count); +- seg_size = 0; +- rxd_init_op_hdr(&pkt->op, tx_entry->read_req.msg.data, msg_size, +- 0, op, 0, flags); +- pkt->op.iov_count = tx_entry->read_req.msg.rma_iov_count; +- break; +- case ofi_op_read_rsp: +- msg_size = ofi_total_iov_len(tx_entry->read_rsp.src_iov, +- tx_entry->read_rsp.iov_count); +- seg_size = rxd_ep_start_seg_size(ep, msg_size); +- rxd_init_op_hdr(&pkt->op, 0, msg_size, 0, op, 0, flags); +- pkt->op.remote_idx = tx_entry->read_rsp.peer_msg_id; +- break; +- default: +- seg_size = 0; +- assert(0); ++ struct rxd_x_entry *tx_entry; ++ struct rxd_domain *rxd_domain = rxd_ep_domain(ep); ++ size_t max_inline; ++ ++ tx_entry = rxd_get_tx_entry(ep); ++ if (!tx_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "could not get tx entry\n"); ++ return NULL; + } + +- rxd_init_ctrl_hdr(&pkt->ctrl, ofi_ctrl_start_data, seg_size, 0, +- tx_entry->msg_id, peer->conn_data, +- peer->conn_data); +- /* copy op header here because it is used in ep_copy_data call */ +- tx_entry->op_hdr = pkt->op; +- tx_entry->bytes_sent = rxd_ep_copy_data(tx_entry, pkt->data, +- seg_size); +- tx_entry->seg_no++; +- assert(tx_entry->bytes_sent == seg_size); +-} ++ tx_entry->op = op; ++ tx_entry->peer = addr; ++ tx_entry->flags = flags; ++ tx_entry->bytes_done = 0; ++ tx_entry->offset = 0; ++ tx_entry->next_seg_no = 0; ++ tx_entry->iov_count = iov_count; ++ memcpy(&tx_entry->iov[0], iov, sizeof(*iov) * iov_count); ++ if (res_count) { ++ tx_entry->res_count = res_count; ++ memcpy(&tx_entry->res_iov[0], res_iov, sizeof(*res_iov) * res_count); ++ } + +-ssize_t rxd_ep_start_xfer(struct rxd_ep *ep, struct rxd_peer *peer, +- uint8_t op, struct rxd_tx_entry *tx_entry) +-{ +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_pkt_data_start *pkt; +- uint32_t flags; +- ssize_t ret; ++ tx_entry->cq_entry.op_context = context; ++ tx_entry->cq_entry.len = ofi_total_iov_len(iov, iov_count); ++ tx_entry->cq_entry.buf = iov[0].iov_base; ++ tx_entry->cq_entry.flags = ofi_tx_cq_flags(op); ++ tx_entry->cq_entry.tag = tag; + +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) +- return -FI_ENOMEM; ++ tx_entry->pkt = NULL; + +- pkt_meta->tx_entry = tx_entry; +- pkt = (struct rxd_pkt_data_start *) pkt_meta->pkt_data; +- flags = rxd_map_fi_flags(tx_entry->flags); +- tx_entry->msg_id = RXD_TX_ID(peer->nxt_msg_id, +- RXD_TX_ENTRY_ID(ep, tx_entry)); ++ max_inline = rxd_domain->max_inline_msg; ++ if (tx_entry->cq_entry.flags & FI_RMA) ++ max_inline -= sizeof(struct ofi_rma_iov) * rma_count; + +- rxd_ep_init_start_pkt(ep, peer, op, tx_entry, pkt, flags); ++ if (tx_entry->flags & RXD_TAG_HDR) ++ max_inline -= sizeof(tx_entry->cq_entry.tag); ++ if (tx_entry->flags & RXD_REMOTE_CQ_DATA) { ++ max_inline -= sizeof(tx_entry->cq_entry.data); ++ tx_entry->cq_entry.data = data; ++ } + +- if (tx_entry->op_hdr.size == pkt->ctrl.seg_size) +- pkt_meta->flags |= RXD_PKT_LAST; ++ if (rma_count > 1 || tx_entry->cq_entry.flags & FI_READ || ++ tx_entry->cq_entry.len > max_inline) ++ max_inline -= sizeof(struct rxd_sar_hdr); ++ else ++ tx_entry->flags |= RXD_INLINE; + +- ret = fi_send(ep->dg_ep, pkt, sizeof(*pkt) + pkt->ctrl.seg_size, +- rxd_mr_desc(pkt_meta->mr, ep), +- tx_entry->peer, &pkt_meta->context); +- if (ret) { +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "send %d failed\n", +- pkt->ctrl.seg_no); +- } ++ if (tx_entry->cq_entry.flags & FI_ATOMIC || tx_entry->cq_entry.len <= max_inline) ++ tx_entry->num_segs = 1; ++ else if (tx_entry->cq_entry.flags & FI_READ) ++ tx_entry->num_segs = ofi_div_ceil(tx_entry->cq_entry.len, ++ rxd_domain->max_seg_sz); ++ else ++ tx_entry->num_segs = ofi_div_ceil(tx_entry->cq_entry.len - max_inline, ++ rxd_domain->max_seg_sz) + 1; ++ ++ if ((tx_entry->op == RXD_READ_REQ || tx_entry->op == RXD_ATOMIC_FETCH || ++ tx_entry->op == RXD_ATOMIC_COMPARE) && ++ ep->peers[tx_entry->peer].unacked_cnt < rxd_env.max_unacked && ++ ep->peers[tx_entry->peer].peer_addr != FI_ADDR_UNSPEC) ++ dlist_insert_tail(&tx_entry->entry, ++ &ep->peers[tx_entry->peer].rma_rx_list); ++ else ++ dlist_insert_tail(&tx_entry->entry, ++ &ep->peers[tx_entry->peer].tx_list); + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "start msg %" PRIx64 ", size: %" PRIu64 "\n", +- pkt->ctrl.msg_id, tx_entry->op_hdr.size); +- rxd_set_timeout(tx_entry); +- dlist_insert_tail(&pkt_meta->entry, &tx_entry->pkt_list); +- dlist_insert_tail(&tx_entry->entry, &ep->tx_entry_list); +- peer->nxt_msg_id++; ++ return tx_entry; ++} + +- return 0; ++void rxd_tx_entry_free(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) ++{ ++ tx_entry->op = RXD_NO_OP; ++ dlist_remove(&tx_entry->entry); ++ rxd_release_tx_entry(ep, tx_entry); + } + +-ssize_t rxd_ep_connect(struct rxd_ep *ep, struct rxd_peer *peer, fi_addr_t addr) ++void rxd_insert_unacked(struct rxd_ep *ep, fi_addr_t peer, ++ struct rxd_pkt_entry *pkt_entry) + { +- struct rxd_pkt_data *pkt; +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_tx_entry *tx_entry; +- size_t addrlen; +- ssize_t ret; ++ dlist_insert_tail(&pkt_entry->d_entry, ++ &ep->peers[peer].unacked); ++ ep->peers[peer].unacked_cnt++; ++ rxd_ep_retry_pkt(ep, pkt_entry); ++} + +- if (peer->state != CMAP_IDLE) +- return -FI_EALREADY; ++ssize_t rxd_ep_post_data_pkts(struct rxd_ep *ep, struct rxd_x_entry *tx_entry) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_data_pkt *data; + +- tx_entry = rxd_tx_entry_alloc(ep, peer, addr, 0, RXD_TX_CONN); +- if (!tx_entry) +- return -FI_EAGAIN; ++ while (tx_entry->bytes_done != tx_entry->cq_entry.len) { ++ if (ep->peers[tx_entry->peer].unacked_cnt >= rxd_env.max_unacked) ++ return 0; + +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) { +- rxd_tx_entry_free(ep, tx_entry); +- return -FI_ENOMEM; +- } ++ pkt_entry = rxd_get_tx_pkt(ep); ++ if (!pkt_entry) ++ return -FI_ENOMEM; + +- pkt = (struct rxd_pkt_data *) pkt_meta->pkt_data; +- addrlen = RXD_MAX_DGRAM_ADDR; +- ret = fi_getname(&ep->dg_ep->fid, pkt->data, &addrlen); +- if (ret) +- goto err; ++ if (tx_entry->op == RXD_DATA_READ && !tx_entry->bytes_done) { ++ tx_entry->start_seq = ep->peers[tx_entry->peer].tx_seq_no; ++ ep->peers[tx_entry->peer].tx_seq_no = tx_entry->start_seq + ++ tx_entry->num_segs; ++ } + +- tx_entry->msg_id = RXD_TX_ID(peer->nxt_msg_id, +- RXD_TX_ENTRY_ID(ep, tx_entry)); +- rxd_init_ctrl_hdr(&pkt->ctrl, ofi_ctrl_connreq, (uint16_t) addrlen, 0, +- tx_entry->msg_id, rxd_ep_conn_data(ep), addr); ++ rxd_init_data_pkt(ep, tx_entry, pkt_entry); + +- ret = fi_send(ep->dg_ep, pkt, addrlen + sizeof(struct rxd_pkt_data), +- rxd_mr_desc(pkt_meta->mr, ep), +- addr, &pkt_meta->context); +- if (ret) +- goto err; ++ data = (struct rxd_data_pkt *) (pkt_entry->pkt); ++ data->base_hdr.seq_no = tx_entry->start_seq + ++ data->ext_hdr.seg_no; ++ if (data->base_hdr.type != RXD_DATA_READ) ++ data->base_hdr.seq_no++; + +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "sent conn %" PRIx64 "\n", +- pkt->ctrl.msg_id); +- rxd_set_timeout(tx_entry); +- dlist_insert_tail(&pkt_meta->entry, &tx_entry->pkt_list); +- dlist_insert_tail(&tx_entry->entry, &ep->tx_entry_list); +- peer->nxt_msg_id++; +- peer->state = CMAP_CONNREQ_SENT; +- return 0; +-err: +- rxd_tx_entry_free(ep, tx_entry); +- util_buf_release(ep->tx_pkt_pool, pkt_meta); +- return ret; ++ rxd_insert_unacked(ep, tx_entry->peer, pkt_entry); ++ } ++ ++ return ep->peers[tx_entry->peer].unacked_cnt < rxd_env.max_unacked; + } + +-static ssize_t rxd_ep_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, +- uint64_t flags) ++int rxd_ep_retry_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry) + { +- struct rxd_ep *rxd_ep; +- struct rxd_peer *peer; +- struct rxd_tx_entry *tx_entry; +- fi_addr_t peer_addr; +- ssize_t ret; +- +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid.fid); ++ int ret; + +- peer_addr = rxd_av_dg_addr(rxd_ep_av(rxd_ep), msg->addr); +- peer = rxd_ep_getpeer_info(rxd_ep, peer_addr); ++ if (ep->pending_cnt >= ep->tx_size) ++ return 1; + +- fastlock_acquire(&rxd_ep->lock); +- if (peer->state != CMAP_CONNECTED) { +- ret = rxd_ep_connect(rxd_ep, peer, peer_addr); +- fastlock_release(&rxd_ep->lock); +- if (ret == -FI_EALREADY) { +- rxd_ep->util_ep.progress(&rxd_ep->util_ep); +- ret = -FI_EAGAIN; +- } +- return ret ? ret : -FI_EAGAIN; +- } ++ pkt_entry->timestamp = fi_gettime_ms(); + +- tx_entry = rxd_tx_entry_alloc(rxd_ep, peer, peer_addr, flags, +- RXD_TX_MSG); +- if (!tx_entry) { +- ret = -FI_EAGAIN; +- goto out; ++ ret = fi_send(ep->dg_ep, (const void *) rxd_pkt_start(pkt_entry), ++ pkt_entry->pkt_size, rxd_mr_desc(pkt_entry->mr, ep), ++ rxd_ep_av(ep)->rxd_addr_table[pkt_entry->peer].dg_addr, ++ &pkt_entry->context); ++ if (ret) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "error sending packet: %d (%s)\n", ++ ret, fi_strerror(-ret)); ++ } else { ++ pkt_entry->flags |= RXD_PKT_IN_USE; ++ ep->pending_cnt++; + } + +- tx_entry->msg.msg = *msg; +- memcpy(&tx_entry->msg.msg_iov[0], msg->msg_iov, +- sizeof(*msg->msg_iov) * msg->iov_count); +- ret = rxd_ep_start_xfer(rxd_ep, peer, ofi_op_msg, tx_entry); +- if (ret) +- rxd_tx_entry_free(rxd_ep, tx_entry); +- +-out: +- fastlock_release(&rxd_ep->lock); + return ret; + } + +-static ssize_t rxd_ep_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, void *context) ++static ssize_t rxd_ep_send_rts(struct rxd_ep *rxd_ep, fi_addr_t rxd_addr) + { +- struct fi_msg msg; ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_rts_pkt *rts_pkt; ++ ssize_t ret; ++ size_t addrlen; + +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = dest_addr; +- msg.context = context; ++ pkt_entry = rxd_get_tx_pkt(rxd_ep); ++ if (!pkt_entry) ++ return -FI_ENOMEM; + +- return rxd_ep_sendmsg(ep, &msg, RXD_USE_OP_FLAGS); +-} ++ rts_pkt = (struct rxd_rts_pkt *) (pkt_entry->pkt); ++ pkt_entry->pkt_size = sizeof(*rts_pkt) + rxd_ep->tx_prefix_size; ++ pkt_entry->peer = rxd_addr; + +-static ssize_t rxd_ep_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, +- fi_addr_t dest_addr, void *context) +-{ +- struct iovec iov; ++ rts_pkt->base_hdr.version = RXD_PROTOCOL_VERSION; ++ rts_pkt->base_hdr.type = RXD_RTS; ++ rts_pkt->rts_addr = rxd_addr; + +- iov.iov_base = (void *) buf; +- iov.iov_len = len; ++ addrlen = RXD_NAME_LENGTH; ++ memset(rts_pkt->source, 0, RXD_NAME_LENGTH); ++ ret = fi_getname(&rxd_ep->dg_ep->fid, (void *) rts_pkt->source, ++ &addrlen); ++ if (ret) { ++ rxd_release_tx_pkt(rxd_ep, pkt_entry); ++ return ret; ++ } + +- return rxd_ep_sendv(ep, &iov, desc, 1, dest_addr, context); ++ rxd_insert_unacked(rxd_ep, rxd_addr, pkt_entry); ++ dlist_insert_tail(&rxd_ep->peers[rxd_addr].entry, &rxd_ep->rts_sent_list); ++ ++ return 0; + } + +-static ssize_t rxd_ep_inject(struct fid_ep *ep, const void *buf, size_t len, +- fi_addr_t dest_addr) ++ssize_t rxd_send_rts_if_needed(struct rxd_ep *ep, fi_addr_t addr) + { +- struct fi_msg msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- +- return rxd_ep_sendmsg(ep, &msg, FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ if (ep->peers[addr].peer_addr == FI_ADDR_UNSPEC && ++ dlist_empty(&ep->peers[addr].unacked)) ++ return rxd_ep_send_rts(ep, addr); ++ return 0; + } + +-static ssize_t rxd_ep_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, +- uint64_t data, fi_addr_t dest_addr, void *context) ++static void rxd_init_base_hdr(struct rxd_ep *rxd_ep, void **ptr, ++ struct rxd_x_entry *tx_entry) + { +- struct fi_msg msg; +- struct iovec msg_iov; +- +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ struct rxd_base_hdr *hdr = (struct rxd_base_hdr *) *ptr; + +- msg.msg_iov = &msg_iov; +- msg.desc = desc; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = context; +- msg.data = data; ++ hdr->version = RXD_PROTOCOL_VERSION; ++ hdr->type = tx_entry->op; ++ hdr->seq_no = 0; ++ hdr->peer = rxd_ep->peers[tx_entry->peer].peer_addr; ++ hdr->flags = tx_entry->flags; + +- return rxd_ep_sendmsg(ep, &msg, FI_REMOTE_CQ_DATA | RXD_USE_OP_FLAGS); ++ *ptr = (char *) (*ptr) + sizeof(*hdr); + } + +-static ssize_t rxd_ep_injectdata(struct fid_ep *ep, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr) ++static void rxd_init_sar_hdr(void **ptr, struct rxd_x_entry *tx_entry, ++ size_t iov_count) + { +- struct fi_msg msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; ++ struct rxd_sar_hdr *hdr = (struct rxd_sar_hdr *) *ptr; + +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.data = data; ++ hdr->size = tx_entry->cq_entry.len; ++ hdr->num_segs = tx_entry->num_segs; ++ hdr->tx_id = tx_entry->tx_id; ++ hdr->iov_count = iov_count; + +- return rxd_ep_sendmsg(ep, &msg, FI_REMOTE_CQ_DATA | FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ *ptr = (char *) (*ptr) + sizeof(*hdr); + } + +-static struct fi_ops_msg rxd_ops_msg = { +- .size = sizeof(struct fi_ops_msg), +- .recv = rxd_ep_recv, +- .recvv = rxd_ep_recvv, +- .recvmsg = rxd_ep_recvmsg, +- .send = rxd_ep_send, +- .sendv = rxd_ep_sendv, +- .sendmsg = rxd_ep_sendmsg, +- .inject = rxd_ep_inject, +- .senddata = rxd_ep_senddata, +- .injectdata = rxd_ep_injectdata, +-}; +- +-static int rxd_peek_trecv(struct dlist_entry *item, const void *arg) ++static void rxd_init_tag_hdr(void **ptr, struct rxd_x_entry *tx_entry) + { +- const struct fi_msg_tagged *msg = (const struct fi_msg_tagged *) arg; +- struct rxd_rx_entry *rx_entry; +- +- rx_entry = container_of(item, struct rxd_rx_entry, unexp_entry); +- return ((rx_entry->op_hdr.tag | msg->ignore) == +- (msg->tag | msg->ignore) && +- ((rx_entry->source == FI_ADDR_UNSPEC) || +- (msg->addr == FI_ADDR_UNSPEC) || +- (rx_entry->source == msg->addr))); +-} +- +-static void rxd_trx_discard_recv(struct rxd_ep *ep, +- struct rxd_rx_entry *rx_entry) +-{ +- struct rxd_rx_buf *rx_buf; +- struct ofi_ctrl_hdr *ctrl; +- struct rxd_pkt_meta *pkt_meta; +- struct rxd_pkt_data *pkt; +- struct rxd_peer *peer; +- ssize_t ret; ++ struct rxd_tag_hdr *hdr = (struct rxd_tag_hdr *) *ptr; + +- rx_buf = rx_entry->unexp_buf; +- ctrl = (struct ofi_ctrl_hdr *) rx_buf->buf; +- peer = rxd_ep_getpeer_info(ep, ctrl->conn_id); ++ hdr->tag = tx_entry->cq_entry.tag; + +- dlist_remove(&rx_entry->unexp_entry); +- ep->num_unexp_msg--; +- +- pkt_meta = rxd_tx_pkt_alloc(ep); +- if (!pkt_meta) +- goto out; +- +- pkt = (struct rxd_pkt_data *) pkt_meta->pkt_data; +- rxd_init_ctrl_hdr(&pkt->ctrl, ofi_ctrl_discard, 0, 0, +- ctrl->msg_id, ctrl->rx_key, peer->conn_data); +- +- pkt_meta->flags = RXD_NOT_ACKED; +- ret = fi_send(ep->dg_ep, pkt, sizeof(struct rxd_pkt_data), +- rxd_mr_desc(pkt_meta->mr, ep), +- peer->fiaddr, &pkt_meta->context); +- if (ret) +- util_buf_release(ep->tx_pkt_pool, pkt_meta); +- +-out: +- rxd_rx_entry_free(ep, rx_entry); +- rxd_ep_repost_buff(rx_buf); ++ *ptr = (char *) (*ptr) + sizeof(*hdr); + } + +-static ssize_t rxd_trx_peek_recv(struct rxd_ep *ep, +- const struct fi_msg_tagged *msg, uint64_t flags) ++static void rxd_init_data_hdr(void **ptr, struct rxd_x_entry *tx_entry) + { +- struct dlist_entry *match; +- struct rxd_rx_entry *rx_entry; +- struct fi_cq_err_entry err_entry = {0}; +- struct fi_cq_tagged_entry cq_entry = {0}; +- struct fi_context *context; +- +- match = dlist_find_first_match(&ep->unexp_tag_list, +- &rxd_peek_trecv, msg); +- if (!match) { +- err_entry.op_context = msg->context; +- err_entry.flags = (FI_MSG | FI_RECV | FI_TAGGED); +- err_entry.tag = msg->tag; +- err_entry.err = FI_ENOMSG; +- err_entry.prov_errno = -FI_ENOMSG; +- rxd_cq_report_error(rxd_ep_rx_cq(ep), &err_entry); +- return 0; +- } ++ struct rxd_data_hdr *hdr = (struct rxd_data_hdr *) *ptr; + +- rx_entry = container_of(match, struct rxd_rx_entry, unexp_entry); +- cq_entry.flags = (FI_MSG | FI_RECV | FI_TAGGED); +- cq_entry.op_context = msg->context; +- cq_entry.len = rx_entry->op_hdr.size; +- cq_entry.buf = NULL; +- cq_entry.data = rx_entry->op_hdr.data; +- cq_entry.tag = rx_entry->op_hdr.tag; +- +- if (flags & FI_CLAIM) { +- context = (struct fi_context *)msg->context; +- context->internal[0] = rx_entry; +- dlist_remove(match); +- } else if (flags & FI_DISCARD) { +- rxd_trx_discard_recv(ep, rx_entry); +- } ++ hdr->cq_data = tx_entry->cq_entry.data; + +- rxd_ep_rx_cq(ep)->write_fn(rxd_ep_rx_cq(ep), &cq_entry); +- return 0; ++ *ptr = (char *) (*ptr) + sizeof(*hdr); + } + +-static ssize_t rxd_trx_claim_recv(struct rxd_ep *ep, +- const struct fi_msg_tagged *msg, uint64_t flags) ++static void rxd_init_rma_hdr(void **ptr, const struct fi_rma_iov *rma_iov, ++ size_t rma_count) + { +- size_t i; +- struct fi_context *context; +- struct rxd_rx_entry *rx_entry; +- struct rxd_trecv_entry *trecv_entry; +- struct rxd_peer *peer; +- struct rxd_rx_buf *rx_buf; +- struct ofi_ctrl_hdr *ctrl; +- struct rxd_pkt_data_start *pkt_start; +- +- if (freestack_isempty(ep->trecv_fs)) +- return -FI_EAGAIN; +- +- trecv_entry = freestack_pop(ep->trecv_fs); +- trecv_entry->msg = *msg; +- trecv_entry->msg.addr = (ep->util_ep.caps & FI_DIRECTED_RECV) ? +- msg->addr : FI_ADDR_UNSPEC; +- trecv_entry->flags = flags; +- for (i = 0; i < msg->iov_count; i++) { +- trecv_entry->iov[i].iov_base = msg->msg_iov[i].iov_base; +- trecv_entry->iov[i].iov_len = msg->msg_iov[i].iov_len; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "post claim trecv: %zu, tag: %" PRIx64 "\n", +- msg->msg_iov[i].iov_len, msg->tag); +- } ++ struct rxd_rma_hdr *hdr = (struct rxd_rma_hdr *) *ptr; + +- context = (struct fi_context *) msg->context; +- rx_entry = context->internal[0]; +- rx_entry->trecv = trecv_entry; ++ memcpy(hdr->rma, rma_iov, sizeof(*rma_iov) * rma_count); + +- rx_buf = rx_entry->unexp_buf; +- peer = rx_entry->peer_info; +- ctrl = (struct ofi_ctrl_hdr *) rx_buf->buf; +- pkt_start = (struct rxd_pkt_data_start *) ctrl; +- +- rxd_ep_handle_data_msg(ep, peer, rx_entry, rx_entry->trecv->iov, +- rx_entry->trecv->msg.iov_count, ctrl, +- pkt_start->data, rx_buf); +- return 0; ++ *ptr = (char *) (*ptr) + (sizeof(*rma_iov) * rma_count); + } + +-static ssize_t rxd_ep_trecvmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, +- uint64_t flags) ++static void rxd_init_atom_hdr(void **ptr, enum fi_datatype datatype, ++ enum fi_op atomic_op) + { +- ssize_t ret = 0; +- size_t i; +- struct rxd_ep *rxd_ep; +- struct rxd_trecv_entry *trecv_entry; ++ struct rxd_atom_hdr *hdr = (struct rxd_atom_hdr *) *ptr; + +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid.fid); +- fastlock_acquire(&rxd_ep->lock); ++ hdr->datatype = datatype; ++ hdr->atomic_op = atomic_op; + +- if (flags & FI_PEEK) { +- ret = rxd_trx_peek_recv(rxd_ep, msg, flags); +- goto out; +- } else if (flags & FI_CLAIM) { +- ret = rxd_trx_claim_recv(rxd_ep, msg, flags); +- goto out; +- } ++ *ptr = (char *) (*ptr) + sizeof(*hdr); ++} + +- if (freestack_isempty(rxd_ep->trecv_fs)) { +- ret = -FI_EAGAIN; +- goto out; +- } ++static size_t rxd_init_msg(void **ptr, const struct iovec *iov, size_t iov_count, ++ size_t total_len, size_t avail_len) ++{ ++ size_t done; + +- trecv_entry = freestack_pop(rxd_ep->trecv_fs); +- trecv_entry->msg = *msg; +- trecv_entry->msg.addr = (rxd_ep->util_ep.caps & FI_DIRECTED_RECV) ? +- msg->addr : FI_ADDR_UNSPEC; +- trecv_entry->flags = flags; +- for (i = 0; i < msg->iov_count; i++) { +- trecv_entry->iov[i].iov_base = msg->msg_iov[i].iov_base; +- trecv_entry->iov[i].iov_len = msg->msg_iov[i].iov_len; +- FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "post trecv: %zu, tag: %" PRIx64 "\n", +- msg->msg_iov[i].iov_len, msg->tag); +- } +- dlist_init(&trecv_entry->entry); +- dlist_insert_tail(&trecv_entry->entry, &rxd_ep->trecv_list); ++ done = ofi_copy_from_iov(*ptr, MIN(total_len, avail_len), iov, iov_count, 0); + +- if (!dlist_empty(&rxd_ep->unexp_tag_list)) { +- rxd_ep_check_unexp_tag_list(rxd_ep, trecv_entry); +- } +-out: +- fastlock_release(&rxd_ep->lock); +- return ret; +-} ++ *ptr = (char *) (*ptr) + done; + +-static ssize_t rxd_ep_trecv(struct fid_ep *ep, void *buf, size_t len, void *desc, +- fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, void *context) +-{ +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = buf; +- msg_iov.iov_len = len; +- +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = src_addr; +- msg.context = context; +- msg.tag = tag; +- msg.ignore = ignore; +- msg.data = 0; +- +- return rxd_ep_trecvmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return done; + } + +-static ssize_t rxd_ep_trecvv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, void *context) ++int rxd_ep_send_op(struct rxd_ep *rxd_ep, struct rxd_x_entry *tx_entry, ++ const struct fi_rma_iov *rma_iov, size_t rma_count, ++ const struct iovec *comp_iov, size_t comp_count, ++ enum fi_datatype datatype, enum fi_op atomic_op) + { +- struct fi_msg_tagged msg; +- +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = src_addr; +- msg.context = context; +- msg.tag = tag; +- msg.ignore = ignore; +- msg.data = 0; +- +- return rxd_ep_trecvmsg(ep, &msg, RXD_USE_OP_FLAGS); +-} ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_base_hdr *base_hdr; ++ int ret = 0; ++ size_t len, avail; ++ void *ptr; + +-static ssize_t rxd_ep_tsendmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, +- uint64_t flags) +-{ +- struct rxd_ep *rxd_ep; +- struct rxd_peer *peer; +- struct rxd_tx_entry *tx_entry; +- fi_addr_t peer_addr; +- ssize_t ret; ++ pkt_entry = rxd_get_tx_pkt(rxd_ep); ++ if (!pkt_entry) ++ return -FI_ENOMEM; + +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid.fid); ++ base_hdr = rxd_get_base_hdr(pkt_entry); ++ ptr = (void *) base_hdr; ++ rxd_init_base_hdr(rxd_ep, &ptr, tx_entry); + +- peer_addr = rxd_av_dg_addr(rxd_ep_av(rxd_ep), msg->addr); +- peer = rxd_ep_getpeer_info(rxd_ep, peer_addr); ++ avail = rxd_ep_domain(rxd_ep)->max_inline_msg; + +- fastlock_acquire(&rxd_ep->lock); +- if (peer->state != CMAP_CONNECTED) { +- ret = rxd_ep_connect(rxd_ep, peer, peer_addr); +- fastlock_release(&rxd_ep->lock); +- if (ret == -FI_EALREADY) { +- rxd_ep->util_ep.progress(&rxd_ep->util_ep); +- ret = -FI_EAGAIN; ++ if (!(tx_entry->flags & RXD_INLINE)) { ++ rxd_init_sar_hdr(&ptr, tx_entry, rma_count); ++ avail -= sizeof(struct rxd_sar_hdr); ++ } ++ if (tx_entry->flags & RXD_TAG_HDR) { ++ rxd_init_tag_hdr(&ptr, tx_entry); ++ avail -= sizeof(struct rxd_tag_hdr); ++ } ++ if (tx_entry->flags & RXD_REMOTE_CQ_DATA) { ++ rxd_init_data_hdr(&ptr, tx_entry); ++ avail -= sizeof(struct rxd_data_hdr); ++ } ++ if (tx_entry->cq_entry.flags & (FI_RMA | FI_ATOMIC)) { ++ rxd_init_rma_hdr(&ptr, rma_iov, rma_count); ++ avail -= sizeof(struct ofi_rma_iov) * rma_count; ++ if (tx_entry->cq_entry.flags & FI_ATOMIC) { ++ rxd_init_atom_hdr(&ptr, datatype, atomic_op); ++ avail -= sizeof(struct rxd_atom_hdr); + } +- return ret ? ret : -FI_EAGAIN; + } +- +- tx_entry = rxd_tx_entry_alloc(rxd_ep, peer, peer_addr, flags, +- RXD_TX_TAG); +- if (!tx_entry) { +- ret = -FI_EAGAIN; +- goto out; ++ if (tx_entry->op != RXD_READ_REQ && atomic_op != FI_ATOMIC_READ) { ++ tx_entry->bytes_done = rxd_init_msg(&ptr, tx_entry->iov, ++ tx_entry->iov_count, ++ tx_entry->cq_entry.len, avail); ++ if (tx_entry->op == RXD_ATOMIC_COMPARE) { ++ avail -= tx_entry->bytes_done; ++ len = rxd_init_msg(&ptr, comp_iov, comp_count, ++ tx_entry->cq_entry.len, avail); ++ if (len != tx_entry->bytes_done) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "compare data length mismatch\n"); ++ } ++ } + } + +- tx_entry->tmsg.tmsg = *msg; +- memcpy(&tx_entry->tmsg.msg_iov[0], msg->msg_iov, +- sizeof(*msg->msg_iov) * msg->iov_count); +- ret = rxd_ep_start_xfer(rxd_ep, peer, ofi_op_tagged, tx_entry); +- if (ret) +- rxd_tx_entry_free(rxd_ep, tx_entry); +- +-out: +- fastlock_release(&rxd_ep->lock); +- return ret; +-} ++ pkt_entry->peer = tx_entry->peer; ++ pkt_entry->pkt_size = ((char *) ptr - (char *) base_hdr) + rxd_ep->tx_prefix_size; ++ ++ if (rxd_ep->peers[tx_entry->peer].unacked_cnt < rxd_env.max_unacked && ++ rxd_ep->peers[tx_entry->peer].peer_addr != FI_ADDR_UNSPEC) { ++ tx_entry->start_seq = rxd_set_pkt_seq(&rxd_ep->peers[tx_entry->peer], ++ pkt_entry); ++ if (tx_entry->op != RXD_READ_REQ && tx_entry->num_segs > 1) ++ rxd_ep->peers[tx_entry->peer].tx_seq_no = tx_entry->start_seq + ++ tx_entry->num_segs; ++ rxd_insert_unacked(rxd_ep, tx_entry->peer, pkt_entry); ++ if (tx_entry->op != RXD_READ_REQ && tx_entry->num_segs > 1) ++ ret = rxd_ep_post_data_pkts(rxd_ep, tx_entry); ++ } else { ++ tx_entry->pkt = pkt_entry; ++ } + +-static ssize_t rxd_ep_tsend(struct fid_ep *ep, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, uint64_t tag, +- void *context) +-{ +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = context; +- msg.tag = tag; +- +- return rxd_ep_tsendmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return ret == -FI_ENOMEM ? ret : 0; + } + +-static ssize_t rxd_ep_tsendv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t dest_addr, +- uint64_t tag, void *context) ++void rxd_ep_send_ack(struct rxd_ep *rxd_ep, fi_addr_t peer) + { +- struct fi_msg_tagged msg; +- +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = dest_addr; +- msg.context = context; +- msg.tag = tag; +- +- return rxd_ep_tsendmsg(ep, &msg, RXD_USE_OP_FLAGS); +-} ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_ack_pkt *ack; + +-ssize_t rxd_ep_tinject(struct fid_ep *ep, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t tag) +-{ +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.tag = tag; +- return rxd_ep_tsendmsg(ep, &msg, FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); +-} ++ pkt_entry = rxd_get_tx_pkt(rxd_ep); ++ if (!pkt_entry) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "Unable to send ack\n"); ++ return; ++ } + +-ssize_t rxd_ep_tsenddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, +- uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context) +-{ +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = desc; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = context; +- msg.data = data; +- msg.tag = tag; +- +- return rxd_ep_tsendmsg(ep, &msg, FI_REMOTE_CQ_DATA | RXD_USE_OP_FLAGS); ++ ack = (struct rxd_ack_pkt *) (pkt_entry->pkt); ++ pkt_entry->pkt_size = sizeof(*ack) + rxd_ep->tx_prefix_size; ++ pkt_entry->peer = peer; ++ ++ ack->base_hdr.version = RXD_PROTOCOL_VERSION; ++ ack->base_hdr.type = RXD_ACK; ++ ack->base_hdr.peer = rxd_ep->peers[peer].peer_addr; ++ ack->base_hdr.seq_no = rxd_ep->peers[peer].rx_seq_no; ++ ack->ext_hdr.tx_id = rxd_ep->peers[peer].curr_tx_id; ++ ack->ext_hdr.rx_id = rxd_ep->peers[peer].curr_rx_id; ++ rxd_ep->peers[peer].last_tx_ack = ack->base_hdr.seq_no; ++ ++ dlist_insert_tail(&pkt_entry->d_entry, &rxd_ep->ctrl_pkts); ++ if (rxd_ep_retry_pkt(rxd_ep, pkt_entry)) { ++ dlist_remove(&pkt_entry->d_entry); ++ rxd_release_tx_pkt(rxd_ep, pkt_entry); ++ } + } + +-ssize_t rxd_ep_tinjectdata(struct fid_ep *ep, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr, uint64_t tag) ++static void rxd_ep_free_res(struct rxd_ep *ep) + { +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.data = data; +- msg.tag = tag; +- +- return rxd_ep_tsendmsg(ep, &msg, FI_REMOTE_CQ_DATA | FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ util_buf_pool_destroy(ep->tx_pkt_pool); ++ util_buf_pool_destroy(ep->rx_pkt_pool); ++ util_buf_pool_destroy(ep->tx_entry_pool); ++ util_buf_pool_destroy(ep->rx_entry_pool); + } + +-struct fi_ops_tagged rxd_ops_tagged = { +- .size = sizeof(struct fi_ops_tagged), +- .recv = rxd_ep_trecv, +- .recvv = rxd_ep_trecvv, +- .recvmsg = rxd_ep_trecvmsg, +- .send = rxd_ep_tsend, +- .sendv = rxd_ep_tsendv, +- .sendmsg = rxd_ep_tsendmsg, +- .inject = rxd_ep_tinject, +- .senddata = rxd_ep_tsenddata, +- .injectdata = rxd_ep_tinjectdata, +-}; +- +-static void rxd_ep_free_buf_pools(struct rxd_ep *ep) ++static void rxd_close_peer(struct rxd_ep *ep, struct rxd_peer *peer) + { +- util_buf_pool_destroy(ep->tx_pkt_pool); +- util_buf_pool_destroy(ep->rx_pkt_pool); ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_x_entry *x_entry; ++ ++ while (!dlist_empty(&peer->unacked)) { ++ dlist_pop_front(&peer->unacked, struct rxd_pkt_entry, ++ pkt_entry, d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); ++ peer->unacked_cnt--; ++ } + +- if (ep->tx_entry_fs) +- rxd_tx_entry_fs_free(ep->tx_entry_fs); ++ while(!dlist_empty(&peer->tx_list)) { ++ dlist_pop_front(&peer->tx_list, struct rxd_x_entry, ++ x_entry, entry); ++ rxd_tx_entry_free(ep, x_entry); ++ } + +- if (ep->rx_entry_fs) +- rxd_rx_entry_fs_free(ep->rx_entry_fs); ++ while(!dlist_empty(&peer->rx_list)) { ++ dlist_pop_front(&peer->rx_list, struct rxd_x_entry, ++ x_entry, entry); ++ rxd_rx_entry_free(ep, x_entry); ++ } + +- if (ep->recv_fs) +- rxd_recv_fs_free(ep->recv_fs); ++ while(!dlist_empty(&peer->rma_rx_list)) { ++ dlist_pop_front(&peer->rma_rx_list, struct rxd_x_entry, ++ x_entry, entry); ++ rxd_tx_entry_free(ep, x_entry); ++ } + +- if (ep->trecv_fs) +- rxd_trecv_fs_free(ep->trecv_fs); ++ dlist_remove(&peer->entry); ++ peer->active = 0; + } + + static int rxd_ep_close(struct fid *fid) + { + int ret; + struct rxd_ep *ep; ++ struct rxd_pkt_entry *pkt_entry; + struct slist_entry *entry; +- struct rxd_rx_buf *buf; ++ struct rxd_peer *peer; + + ep = container_of(fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ dlist_foreach_container(&ep->active_peers, struct rxd_peer, peer, entry) ++ rxd_close_peer(ep, peer); ++ + ret = fi_close(&ep->dg_ep->fid); + if (ret) + return ret; +@@ -1308,10 +786,28 @@ static int rxd_ep_close(struct fid *fid) + if (ret) + return ret; + +- while(!slist_empty(&ep->rx_pkt_list)) { ++ while (!slist_empty(&ep->rx_pkt_list)) { + entry = slist_remove_head(&ep->rx_pkt_list); +- buf = container_of(entry, struct rxd_rx_buf, entry); +- util_buf_release(ep->rx_pkt_pool, buf); ++ pkt_entry = container_of(entry, struct rxd_pkt_entry, s_entry); ++ rxd_release_rx_pkt(ep, pkt_entry); ++ } ++ ++ while (!dlist_empty(&ep->unexp_list)) { ++ dlist_pop_front(&ep->unexp_list, struct rxd_pkt_entry, ++ pkt_entry, d_entry); ++ rxd_release_rx_pkt(ep, pkt_entry); ++ } ++ ++ while (!dlist_empty(&ep->unexp_tag_list)) { ++ dlist_pop_front(&ep->unexp_tag_list, struct rxd_pkt_entry, ++ pkt_entry, d_entry); ++ rxd_release_rx_pkt(ep, pkt_entry); ++ } ++ ++ while (!dlist_empty(&ep->ctrl_pkts)) { ++ dlist_pop_front(&ep->ctrl_pkts, struct rxd_pkt_entry, ++ pkt_entry, d_entry); ++ rxd_release_tx_pkt(ep, pkt_entry); + } + + if (ep->util_ep.tx_cq) { +@@ -1330,54 +826,80 @@ static int rxd_ep_close(struct fid *fid) + } + } + +- fastlock_destroy(&ep->lock); +- rxd_ep_free_buf_pools(ep); +- free(ep->peer_info); ++ rxd_ep_free_res(ep); + ofi_endpoint_close(&ep->util_ep); + free(ep); + return 0; + } + +-static int rxd_ep_bind_cq(struct rxd_ep *ep, struct rxd_cq *cq, uint64_t flags) ++static int rxd_ep_trywait(void *arg) + { +- int ret; ++ struct rxd_fabric *rxd_fabric; ++ struct rxd_ep *rxd_ep = (struct rxd_ep *) arg; ++ struct fid *fids[1] = {&rxd_ep->dg_cq->fid}; + +- if (flags & ~(FI_TRANSMIT | FI_RECV)) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "unsupported flags\n"); +- return -FI_EBADFLAGS; +- } ++ rxd_fabric = container_of(rxd_ep->util_ep.domain->fabric, ++ struct rxd_fabric, util_fabric); ++ ++ return fi_trywait(rxd_fabric->dg_fabric, fids, 1); ++} ++ ++static int rxd_ep_get_wait_cq_fd(struct rxd_ep *rxd_ep, enum fi_wait_obj wait_obj) ++{ ++ int ret = 0; + +- if (((flags & FI_TRANSMIT) && rxd_ep_tx_cq(ep)) || +- ((flags & FI_RECV) && rxd_ep_rx_cq(ep))) { +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "duplicate CQ binding\n"); +- return -FI_EINVAL; ++ if (wait_obj == FI_WAIT_FD && (!rxd_ep->dg_cq_fd)) { ++ ret = fi_control(&rxd_ep->dg_cq->fid, FI_GETWAIT, ++ &rxd_ep->dg_cq_fd); ++ if (ret) ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "Unable to get dg CQ fd\n"); + } ++ return ret; ++} + +- ret = fid_list_insert(&cq->util_cq.ep_list, +- &cq->util_cq.ep_list_lock, +- &ep->util_ep.ep_fid.fid); ++static int rxd_ep_wait_fd_add(struct rxd_ep *rxd_ep, struct util_wait *wait) ++{ ++ return ofi_wait_fd_add(wait, rxd_ep->dg_cq_fd, FI_EPOLL_IN, ++ rxd_ep_trywait, rxd_ep, ++ &rxd_ep->util_ep.ep_fid.fid); ++} ++ ++static int rxd_dg_cq_open(struct rxd_ep *rxd_ep, enum fi_wait_obj wait_obj) ++{ ++ struct rxd_domain *rxd_domain; ++ struct fi_cq_attr cq_attr = {0}; ++ int ret; ++ ++ assert((wait_obj == FI_WAIT_NONE) || (wait_obj == FI_WAIT_FD)); ++ ++ cq_attr.size = rxd_ep->tx_size + rxd_ep->rx_size; ++ cq_attr.format = FI_CQ_FORMAT_MSG; ++ cq_attr.wait_obj = wait_obj; ++ ++ rxd_domain = container_of(rxd_ep->util_ep.domain, struct rxd_domain, ++ util_domain); ++ ++ ret = fi_cq_open(rxd_domain->dg_domain, &cq_attr, &rxd_ep->dg_cq, rxd_ep); + if (ret) + return ret; + +- if (flags & FI_TRANSMIT) { +- ep->util_ep.tx_cq = &cq->util_cq; +- ofi_atomic_inc32(&cq->util_cq.ref); +- /* TODO: wait handling */ +- } +- +- if (flags & FI_RECV) { +- ep->util_ep.rx_cq = &cq->util_cq; +- ofi_atomic_inc32(&cq->util_cq.ref); +- /* TODO: wait handling */ +- } ++ ret = rxd_ep_get_wait_cq_fd(rxd_ep, wait_obj); ++ if (ret) ++ goto err; + + return 0; ++err: ++ fi_close(&rxd_ep->dg_cq->fid); ++ return ret; + } + + static int rxd_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + { + struct rxd_ep *ep; + struct rxd_av *av; ++ struct util_cq *cq; ++ struct util_cntr *cntr; + int ret = 0; + + ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); +@@ -1391,20 +913,54 @@ static int rxd_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + ret = fi_ep_bind(ep->dg_ep, &av->dg_av->fid, flags); + if (ret) + return ret; +- +- ep->peer_info = calloc(av->util_av.count, sizeof(struct rxd_peer)); +- ep->max_peers = av->util_av.count; +- if (!ep->peer_info) +- return -FI_ENOMEM; + break; + case FI_CLASS_CQ: +- ret = rxd_ep_bind_cq(ep, container_of(bfid, struct rxd_cq, +- util_cq.cq_fid.fid), flags); ++ cq = container_of(bfid, struct util_cq, cq_fid.fid); ++ ++ ret = ofi_ep_bind_cq(&ep->util_ep, cq, flags); ++ if (ret) ++ return ret; ++ ++ if (!ep->dg_cq) { ++ ret = rxd_dg_cq_open(ep, cq->wait ? FI_WAIT_FD : FI_WAIT_NONE); ++ if (ret) ++ return ret; ++ } ++ ++ if (cq->wait) ++ ret = rxd_ep_wait_fd_add(ep, cq->wait); + break; + case FI_CLASS_EQ: + break; + case FI_CLASS_CNTR: +- return ofi_ep_bind(&ep->util_ep, bfid, flags); ++ cntr = container_of(bfid, struct util_cntr, cntr_fid.fid); ++ ++ ret = ofi_ep_bind_cntr(&ep->util_ep, cntr, flags); ++ if (ret) ++ return ret; ++ ++ if (!ep->dg_cq) { ++ ret = rxd_dg_cq_open(ep, cntr->wait ? FI_WAIT_FD : FI_WAIT_NONE); ++ if (ret) ++ return ret; ++ } else if (!ep->dg_cq_fd && cntr->wait) { ++ /* Reopen CQ with WAIT fd set */ ++ ret = fi_close(&ep->dg_cq->fid); ++ if (ret) { ++ FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, ++ "Unable to close dg CQ: %s\n", ++ fi_strerror(-ret)); ++ return ret; ++ } else { ++ ret = rxd_dg_cq_open(ep, FI_WAIT_FD); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ if (cntr->wait) ++ ret = rxd_ep_wait_fd_add(ep, cntr->wait); ++ break; + default: + FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, + "invalid fid class\n"); +@@ -1468,68 +1024,113 @@ struct fi_ops_cm rxd_ep_cm = { + .join = fi_no_join, + }; + ++static void rxd_peer_timeout(struct rxd_ep *rxd_ep, struct rxd_peer *peer) ++{ ++ struct fi_cq_err_entry err_entry; ++ struct rxd_x_entry *tx_entry; ++ struct rxd_pkt_entry *pkt_entry; ++ ++ while (!dlist_empty(&peer->tx_list)) { ++ dlist_pop_front(&peer->tx_list, struct rxd_x_entry, tx_entry, entry); ++ memset(&err_entry, 0, sizeof(struct fi_cq_err_entry)); ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ err_entry.op_context = tx_entry->cq_entry.op_context; ++ err_entry.flags = tx_entry->cq_entry.flags; ++ err_entry.err = FI_ECONNREFUSED; ++ err_entry.prov_errno = 0; ++ rxd_cq_report_error(rxd_ep_tx_cq(rxd_ep), &err_entry); ++ } ++ ++ while (!dlist_empty(&peer->unacked)) { ++ dlist_pop_front(&peer->unacked, struct rxd_pkt_entry, pkt_entry, ++ d_entry); ++ rxd_release_tx_pkt(rxd_ep, pkt_entry); ++ peer->unacked_cnt--; ++ } ++ ++ dlist_remove(&peer->entry); ++} ++ ++static void rxd_progress_pkt_list(struct rxd_ep *ep, struct rxd_peer *peer) ++{ ++ struct rxd_pkt_entry *pkt_entry; ++ uint64_t current; ++ int ret, retry = 0; ++ ++ current = fi_gettime_ms(); ++ if (peer->retry_cnt > RXD_MAX_PKT_RETRY) { ++ rxd_peer_timeout(ep, peer); ++ return; ++ } ++ ++ dlist_foreach_container(&peer->unacked, struct rxd_pkt_entry, ++ pkt_entry, d_entry) { ++ if (pkt_entry->flags & (RXD_PKT_IN_USE | RXD_PKT_ACKED) || ++ current < rxd_get_retry_time(pkt_entry->timestamp, peer->retry_cnt)) ++ continue; ++ retry = 1; ++ ret = rxd_ep_retry_pkt(ep, pkt_entry); ++ if (ret) ++ break; ++ } ++ if (retry) ++ peer->retry_cnt++; ++ ++ if (!dlist_empty(&peer->unacked)) ++ ep->next_retry = ep->next_retry == -1 ? peer->retry_cnt : ++ MIN(ep->next_retry, peer->retry_cnt); ++} + + static void rxd_ep_progress(struct util_ep *util_ep) + { +- struct dlist_entry *tx_item, *pkt_item; +- struct rxd_tx_entry *tx_entry; ++ struct rxd_peer *peer; + struct fi_cq_msg_entry cq_entry; +- struct rxd_pkt_meta *pkt; ++ struct dlist_entry *tmp; + struct rxd_ep *ep; +- uint64_t cur_time; + ssize_t ret; + int i; + + ep = container_of(util_ep, struct rxd_ep, util_ep); + +- fastlock_acquire(&ep->lock); ++ fastlock_acquire(&ep->util_ep.lock); + for(ret = 1, i = 0; +- ret > 0 && (!rxd_progress_spin_count || i < rxd_progress_spin_count); ++ ret > 0 && (!rxd_env.spin_count || i < rxd_env.spin_count); + i++) { + ret = fi_cq_read(ep->dg_cq, &cq_entry, 1); + if (ret == -FI_EAGAIN) + break; + +- if (cq_entry.flags & FI_SEND) +- rxd_handle_send_comp(&cq_entry); +- else if (cq_entry.flags & FI_RECV) ++ if (ret == -FI_EAVAIL) { ++ rxd_handle_error(ep); ++ continue; ++ } ++ ++ if (cq_entry.flags & FI_RECV) + rxd_handle_recv_comp(ep, &cq_entry); + else +- assert (0); ++ rxd_handle_send_comp(ep, &cq_entry); + } + +- cur_time = fi_gettime_us(); +- dlist_foreach(&ep->tx_entry_list, tx_item) { +- tx_entry = container_of(tx_item, struct rxd_tx_entry, entry); ++ if (!rxd_env.retry) ++ goto out; + +- if (tx_entry->seg_no < tx_entry->window) { +- rxd_tx_entry_progress(ep, tx_entry); +- } else if ((tx_entry->retry_time > cur_time) /* && +- dlist_empty(&tx_entry->pkt_list)*/ ) { ++ ep->next_retry = -1; ++ dlist_foreach_container_safe(&ep->rts_sent_list, struct rxd_peer, ++ peer, entry, tmp) ++ rxd_progress_pkt_list(ep, peer); + +- FI_WARN(&rxd_prov, FI_LOG_EP_CTRL, "Progressing waiting entry [%" PRIx64 "]\n", +- tx_entry->msg_id); ++ dlist_foreach_container_safe(&ep->active_peers, struct rxd_peer, ++ peer, entry, tmp) { ++ rxd_progress_pkt_list(ep, peer); ++ if (dlist_empty(&peer->unacked)) ++ rxd_progress_tx_list(ep, peer); ++ } + +- rxd_tx_entry_progress(ep, tx_entry); +-// rxd_set_timeout(tx_entry); +- } ++out: ++ while (ep->posted_bufs < ep->rx_size && !ret) ++ ret = rxd_ep_post_buf(ep); + +- dlist_foreach(&tx_entry->pkt_list, pkt_item) { +- pkt = container_of(pkt_item, struct rxd_pkt_meta, entry); +-// /* TODO: This if check is repeated. Create a function +-// * to perform this check, and figure out what the check +-// * is actually doing with the bit-shift, multiply operation. +-// */ +-// if (curr_stamp > pkt->us_stamp && +-// curr_stamp - pkt->us_stamp > +-// (((uint64_t) 1) << ((uint64_t) pkt->retries + 1)) * +-// RXD_RETRY_TIMEOUT) { +-// pkt->us_stamp = curr_stamp; +- rxd_ep_retry_pkt(ep, tx_entry, pkt); +-// } +- } +- } +- fastlock_release(&ep->lock); ++ fastlock_release(&ep->util_ep.lock); + } + + static int rxd_buf_region_alloc_hndlr(void *pool_ctx, void *addr, size_t len, +@@ -1550,49 +1151,58 @@ static void rxd_buf_region_free_hndlr(void *pool_ctx, void *context) + fi_close((struct fid *) context); + } + +-int rxd_ep_create_buf_pools(struct rxd_ep *ep, struct fi_info *fi_info) ++int rxd_ep_init_res(struct rxd_ep *ep, struct fi_info *fi_info) + { ++ struct rxd_domain *rxd_domain = rxd_ep_domain(ep); ++ struct util_buf_attr entry_pool_attr = { ++ .size = sizeof(struct rxd_x_entry), ++ .alignment = RXD_BUF_POOL_ALIGNMENT, ++ .max_cnt = 0, ++ .indexing = { ++ .used = 1, ++ .ordered = 1, ++ }, ++ }; ++ + int ret = util_buf_pool_create_ex( + &ep->tx_pkt_pool, +- rxd_ep_domain(ep)->max_mtu_sz + sizeof(struct rxd_pkt_meta), ++ rxd_domain->max_mtu_sz + sizeof(struct rxd_pkt_entry), + RXD_BUF_POOL_ALIGNMENT, 0, RXD_TX_POOL_CHUNK_CNT, +- (fi_info->mode & FI_LOCAL_MR) ? rxd_buf_region_alloc_hndlr : NULL, +- (fi_info->mode & FI_LOCAL_MR) ? rxd_buf_region_free_hndlr : NULL, +- rxd_ep_domain(ep)); ++ ep->do_local_mr ? rxd_buf_region_alloc_hndlr : NULL, ++ ep->do_local_mr ? rxd_buf_region_free_hndlr : NULL, ++ rxd_domain); + if (ret) + return -FI_ENOMEM; + + ret = util_buf_pool_create_ex( + &ep->rx_pkt_pool, +- rxd_ep_domain(ep)->max_mtu_sz + sizeof (struct rxd_rx_buf), ++ rxd_domain->max_mtu_sz + sizeof (struct rxd_pkt_entry), + RXD_BUF_POOL_ALIGNMENT, 0, RXD_RX_POOL_CHUNK_CNT, +- (fi_info->mode & FI_LOCAL_MR) ? rxd_buf_region_alloc_hndlr : NULL, +- (fi_info->mode & FI_LOCAL_MR) ? rxd_buf_region_free_hndlr : NULL, +- rxd_ep_domain(ep)); ++ ep->do_local_mr ? rxd_buf_region_alloc_hndlr : NULL, ++ ep->do_local_mr ? rxd_buf_region_free_hndlr : NULL, ++ rxd_domain); + if (ret) + goto err; + +- ep->tx_entry_fs = rxd_tx_entry_fs_create(1ULL << RXD_MAX_TX_BITS); +- if (!ep->tx_entry_fs) ++ entry_pool_attr.chunk_cnt = ep->tx_size; ++ ret = util_buf_pool_create_attr(&entry_pool_attr, &ep->tx_entry_pool); ++ if (ret) + goto err; + +- ep->rx_entry_fs = rxd_rx_entry_fs_create(1ULL << RXD_MAX_RX_BITS); +- if (!ep->rx_entry_fs) ++ entry_pool_attr.chunk_cnt = ep->rx_size; ++ ret = util_buf_pool_create_attr(&entry_pool_attr, &ep->rx_entry_pool); ++ if (ret) + goto err; + +- if (ep->util_ep.caps & FI_MSG) { +- ep->recv_fs = rxd_recv_fs_create(ep->rx_size); +- dlist_init(&ep->recv_list); +- if (!ep->recv_fs) +- goto err; +- } + +- if (ep->util_ep.caps & FI_TAGGED) { +- ep->trecv_fs = rxd_trecv_fs_create(ep->rx_size); +- dlist_init(&ep->trecv_list); +- if (!ep->trecv_fs) +- goto err; +- } ++ dlist_init(&ep->rx_list); ++ dlist_init(&ep->rx_tag_list); ++ dlist_init(&ep->active_peers); ++ dlist_init(&ep->rts_sent_list); ++ dlist_init(&ep->unexp_list); ++ dlist_init(&ep->unexp_tag_list); ++ dlist_init(&ep->ctrl_pkts); ++ slist_init(&ep->rx_pkt_list); + + return 0; + err: +@@ -1602,39 +1212,48 @@ err: + if (ep->rx_pkt_pool) + util_buf_pool_destroy(ep->rx_pkt_pool); + +- if (ep->tx_entry_fs) +- rxd_tx_entry_fs_free(ep->tx_entry_fs); +- +- if (ep->rx_entry_fs) +- rxd_rx_entry_fs_free(ep->rx_entry_fs); ++ if (ep->tx_entry_pool) ++ util_buf_pool_destroy(ep->tx_entry_pool); + +- if (ep->recv_fs) +- rxd_recv_fs_free(ep->recv_fs); +- +- if (ep->trecv_fs) +- rxd_trecv_fs_free(ep->trecv_fs); ++ if (ep->rx_entry_pool) ++ util_buf_pool_destroy(ep->rx_entry_pool); + + return -FI_ENOMEM; + } + ++static void rxd_init_peer(struct rxd_ep *ep, uint64_t rxd_addr) ++{ ++ ep->peers[rxd_addr].peer_addr = FI_ADDR_UNSPEC; ++ ep->peers[rxd_addr].tx_seq_no = 0; ++ ep->peers[rxd_addr].rx_seq_no = 0; ++ ep->peers[rxd_addr].last_rx_ack = 0; ++ ep->peers[rxd_addr].last_tx_ack = 0; ++ ep->peers[rxd_addr].rx_window = rxd_env.max_unacked; ++ ep->peers[rxd_addr].unacked_cnt = 0; ++ ep->peers[rxd_addr].retry_cnt = 0; ++ ep->peers[rxd_addr].active = 0; ++ dlist_init(&ep->peers[rxd_addr].unacked); ++ dlist_init(&ep->peers[rxd_addr].tx_list); ++ dlist_init(&ep->peers[rxd_addr].rx_list); ++ dlist_init(&ep->peers[rxd_addr].rma_rx_list); ++ dlist_init(&ep->peers[rxd_addr].buf_pkts); ++} ++ + int rxd_endpoint(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep, void *context) + { + struct fi_info *dg_info; + struct rxd_domain *rxd_domain; + struct rxd_ep *rxd_ep; +- struct fi_cq_attr cq_attr; +- int ret; ++ int ret, i; + +- rxd_ep = calloc(1, sizeof(*rxd_ep)); ++ rxd_ep = calloc(1, sizeof(*rxd_ep) + sizeof(struct rxd_peer) * ++ rxd_env.max_peers); + if (!rxd_ep) + return -FI_ENOMEM; + + rxd_domain = container_of(domain, struct rxd_domain, + util_domain.domain_fid); +- memset(&cq_attr, 0, sizeof cq_attr); +- cq_attr.format = FI_CQ_FORMAT_MSG; +- cq_attr.wait_obj = FI_WAIT_FD; + + ret = ofi_endpoint_init(domain, &rxd_util_prov, info, &rxd_ep->util_ep, + context, rxd_ep_progress); +@@ -1647,27 +1266,29 @@ int rxd_endpoint(struct fid_domain *domain, struct fi_info *info, + if (ret) + goto err2; + ++ memcpy(dg_info->src_addr, info->src_addr, info->src_addrlen); + rxd_ep->do_local_mr = (rxd_domain->mr_mode & FI_MR_LOCAL) ? 1 : 0; + + ret = fi_endpoint(rxd_domain->dg_domain, dg_info, &rxd_ep->dg_ep, rxd_ep); +- cq_attr.size = dg_info->tx_attr->size + dg_info->rx_attr->size; +- fi_freeinfo(dg_info); + if (ret) + goto err2; + +- ret = fi_cq_open(rxd_domain->dg_domain, &cq_attr, &rxd_ep->dg_cq, rxd_ep); +- if (ret) +- goto err3; ++ rxd_ep->tx_prefix_size = dg_info->tx_attr->mode & FI_MSG_PREFIX ? ++ dg_info->ep_attr->msg_prefix_size : 0; ++ rxd_ep->rx_prefix_size = dg_info->rx_attr->mode & FI_MSG_PREFIX ? ++ dg_info->ep_attr->msg_prefix_size : 0; ++ fi_freeinfo(dg_info); + +- ret = fi_ep_bind(rxd_ep->dg_ep, &rxd_ep->dg_cq->fid, +- FI_TRANSMIT | FI_RECV); +- if (ret) +- goto err4; ++ rxd_ep->rx_size = MIN(dg_info->rx_attr->size, info->rx_attr->size); ++ rxd_ep->tx_size = MIN(dg_info->tx_attr->size, info->tx_attr->size); + +- rxd_ep->rx_size = info->rx_attr->size; +- ret = rxd_ep_create_buf_pools(rxd_ep, info); ++ rxd_ep->next_retry = -1; ++ ret = rxd_ep_init_res(rxd_ep, info); + if (ret) +- goto err4; ++ goto err3; ++ ++ for (i = 0; i < rxd_env.max_peers; rxd_init_peer(rxd_ep, i++)) ++ ; + + rxd_ep->util_ep.ep_fid.fid.ops = &rxd_ep_fi_ops; + rxd_ep->util_ep.ep_fid.cm = &rxd_ep_cm; +@@ -1675,20 +1296,11 @@ int rxd_endpoint(struct fid_domain *domain, struct fi_info *info, + rxd_ep->util_ep.ep_fid.msg = &rxd_ops_msg; + rxd_ep->util_ep.ep_fid.tagged = &rxd_ops_tagged; + rxd_ep->util_ep.ep_fid.rma = &rxd_ops_rma; +- +- dlist_init(&rxd_ep->tx_entry_list); +- dlist_init(&rxd_ep->rx_entry_list); +- dlist_init(&rxd_ep->wait_rx_list); +- dlist_init(&rxd_ep->unexp_msg_list); +- dlist_init(&rxd_ep->unexp_tag_list); +- slist_init(&rxd_ep->rx_pkt_list); +- fastlock_init(&rxd_ep->lock); ++ rxd_ep->util_ep.ep_fid.atomic = &rxd_ops_atomic; + + *ep = &rxd_ep->util_ep.ep_fid; + return 0; + +-err4: +- fi_close(&rxd_ep->dg_cq->fid); + err3: + fi_close(&rxd_ep->dg_ep->fid); + err2: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_fabric.c +index dce5a870e..fefd0ae25 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_fabric.c +@@ -74,7 +74,7 @@ int rxd_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + void *context) + { + struct rxd_fabric *rxd_fabric; +- struct fi_info hints, *dg_info; ++ struct fi_info *dg_info; + int ret; + + rxd_fabric = calloc(1, sizeof(*rxd_fabric)); +@@ -86,41 +86,27 @@ int rxd_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + if (ret) + goto err1; + +- memset(&hints, 0, sizeof hints); +- if (!(hints.fabric_attr = calloc(1, sizeof(*hints.fabric_attr)))) { +- ret = -FI_ENOMEM; +- goto err2; +- } +- hints.fabric_attr->name = attr->name; +- +- ret = ofi_get_core_info(attr->api_version, NULL, NULL, 0, &rxd_util_prov, +- &hints, rxd_info_to_core, &dg_info); ++ ret = ofi_get_core_info_fabric(&rxd_prov, attr, &dg_info); + if (ret) { ++ FI_WARN(&rxd_prov, FI_LOG_FABRIC, "Unable to get core info!\n"); + ret = -FI_EINVAL; +- goto err3; ++ goto err2; + } + + ret = fi_fabric(dg_info->fabric_attr, &rxd_fabric->dg_fabric, context); +- if (ret) { +- goto err4; +- } ++ if (ret) ++ goto err3; + + *fabric = &rxd_fabric->util_fabric.fabric_fid; + (*fabric)->fid.ops = &rxd_fabric_fi_ops; + (*fabric)->ops = &rxd_fabric_ops; + +- free(hints.fabric_attr); + fi_freeinfo(dg_info); +- +- fi_param_get_int(&rxd_prov, "spin_count", &rxd_progress_spin_count); +- + return 0; +-err4: +- fi_freeinfo(dg_info); + err3: +- free(hints.fabric_attr); ++ fi_freeinfo(dg_info); + err2: +- ofi_fabric_close(&rxd_fabric->util_fabric); ++ (void) ofi_fabric_close(&rxd_fabric->util_fabric); + err1: + free(rxd_fabric); + return ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_init.c +index b3486fa83..2d08f54ed 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_init.c +@@ -35,12 +35,29 @@ + #include + #include "rxd.h" + ++struct rxd_env rxd_env = { ++ .spin_count = 1000, ++ .retry = 1, ++ .max_peers = 1024, ++ .max_unacked = 128, ++}; ++ ++static void rxd_init_env(void) ++{ ++ fi_param_get_int(&rxd_prov, "spin_count", &rxd_env.spin_count); ++ fi_param_get_bool(&rxd_prov, "retry", &rxd_env.retry); ++ fi_param_get_int(&rxd_prov, "max_peers", &rxd_env.max_peers); ++ fi_param_get_int(&rxd_prov, "max_unacked", &rxd_env.max_unacked); ++} ++ + int rxd_info_to_core(uint32_t version, const struct fi_info *rxd_info, + struct fi_info *core_info) + { + core_info->caps = FI_MSG; +- core_info->mode = FI_LOCAL_MR; ++ core_info->mode = FI_LOCAL_MR | FI_CONTEXT | FI_MSG_PREFIX; + core_info->ep_attr->type = FI_EP_DGRAM; ++ ++ core_info->domain_attr->mr_mode = FI_MR_LOCAL | FI_MR_ALLOCATED; + return 0; + } + +@@ -51,6 +68,12 @@ int rxd_info_to_rxd(uint32_t version, const struct fi_info *core_info, + info->mode = rxd_info.mode; + + *info->tx_attr = *rxd_info.tx_attr; ++ info->tx_attr->inject_size = MIN(core_info->ep_attr->max_msg_size, ++ RXD_MAX_MTU_SIZE) - (sizeof(struct rxd_base_hdr) + ++ core_info->ep_attr->msg_prefix_size + ++ sizeof(struct rxd_rma_hdr) + (RXD_IOV_LIMIT * ++ sizeof(struct ofi_rma_iov)) + sizeof(struct rxd_atom_hdr)); ++ + *info->rx_attr = *rxd_info.rx_attr; + *info->ep_attr = *rxd_info.ep_attr; + *info->domain_attr = *rxd_info.domain_attr; +@@ -73,7 +96,7 @@ static void rxd_fini(void) + struct fi_provider rxd_prov = { + .name = OFI_UTIL_PREFIX "rxd", + .version = FI_VERSION(RXD_MAJOR_VERSION, RXD_MINOR_VERSION), +- .fi_version = RXD_FI_VERSION, ++ .fi_version = FI_VERSION(1, 7), + .getinfo = rxd_getinfo, + .fabric = rxd_fabric, + .cleanup = rxd_fini +@@ -83,6 +106,14 @@ RXD_INI + { + fi_param_define(&rxd_prov, "spin_count", FI_PARAM_INT, + "Number of iterations to receive packets (0 - infinite)"); ++ fi_param_define(&rxd_prov, "retry", FI_PARAM_BOOL, ++ "Toggle packet retrying (default: yes)"); ++ fi_param_define(&rxd_prov, "max_peers", FI_PARAM_INT, ++ "Maximum number of peers to track (default: 1024)"); ++ fi_param_define(&rxd_prov, "max_unacked", FI_PARAM_INT, ++ "Maximum number of packets to send at once (default: 128)"); ++ ++ rxd_init_env(); + + return &rxd_prov; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_msg.c +new file mode 100644 +index 000000000..2d4b45bd1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_msg.c +@@ -0,0 +1,376 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include "rxd.h" ++ ++static int rxd_match_unexp(struct dlist_entry *item, const void *arg) ++{ ++ struct rxd_x_entry *rx_entry = (struct rxd_x_entry *) arg; ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_base_hdr *hdr; ++ ++ pkt_entry = container_of(item, struct rxd_pkt_entry, d_entry); ++ hdr = rxd_get_base_hdr(pkt_entry); ++ ++ if (!rxd_match_addr(rx_entry->peer, hdr->peer)) ++ return 0; ++ ++ if (hdr->type != RXD_TAGGED) ++ return 1; ++ ++ return rxd_match_tag(rx_entry->cq_entry.tag, rx_entry->ignore, ++ rxd_get_tag_hdr(pkt_entry)->tag); ++} ++ ++static int rxd_ep_check_unexp_msg_list(struct rxd_ep *ep, ++ struct dlist_entry *unexp_list, ++ struct dlist_entry *rx_list, ++ struct rxd_x_entry *rx_entry) ++{ ++ struct dlist_entry *match; ++ struct rxd_x_entry *progress_entry, *dup_entry = NULL; ++ struct rxd_pkt_entry *pkt_entry; ++ struct rxd_base_hdr *base_hdr; ++ struct rxd_sar_hdr *sar_hdr = NULL; ++ struct rxd_tag_hdr *tag_hdr = NULL; ++ struct rxd_data_hdr *data_hdr = NULL; ++ struct rxd_atom_hdr *atom_hdr = NULL; ++ struct rxd_rma_hdr *rma_hdr = NULL; ++ void *msg = NULL; ++ size_t msg_size, total_size; ++ ++ while (!dlist_empty(unexp_list)) { ++ match = dlist_remove_first_match(unexp_list, &rxd_match_unexp, ++ (void *) rx_entry); ++ if (!match) ++ return 0; ++ ++ FI_DBG(&rxd_prov, FI_LOG_EP_CTRL, "progressing unexp msg entry\n"); ++ ++ pkt_entry = container_of(match, struct rxd_pkt_entry, d_entry); ++ base_hdr = rxd_get_base_hdr(pkt_entry); ++ ++ rxd_unpack_hdrs(pkt_entry->pkt_size - ep->rx_prefix_size, ++ base_hdr, &sar_hdr, &tag_hdr, ++ &data_hdr, &rma_hdr, &atom_hdr, &msg, &msg_size); ++ ++ total_size = sar_hdr ? sar_hdr->size : msg_size; ++ if (rx_entry->flags & RXD_MULTI_RECV) ++ dup_entry = rxd_progress_multi_recv(ep, rx_entry, total_size); ++ ++ progress_entry = dup_entry ? dup_entry : rx_entry; ++ ++ progress_entry->cq_entry.len = MIN(rx_entry->cq_entry.len, total_size); ++ ++ rxd_progress_op(ep, progress_entry, pkt_entry, base_hdr, sar_hdr, tag_hdr, ++ data_hdr, rma_hdr, atom_hdr, &msg, msg_size); ++ rxd_release_repost_rx(ep, pkt_entry); ++ rxd_ep_send_ack(ep, base_hdr->peer); ++ ++ if (!dup_entry) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++ssize_t rxd_ep_generic_recvmsg(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t ignore, void *context, uint32_t op, ++ uint32_t rxd_flags) ++{ ++ ssize_t ret = 0; ++ struct rxd_x_entry *rx_entry; ++ struct dlist_entry *unexp_list, *rx_list; ++ ++ assert(iov_count <= RXD_IOV_LIMIT); ++ assert(!(rxd_flags & RXD_MULTI_RECV) || iov_count == 1); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.rx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.rx_cq->cirq)) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ rx_entry = rxd_rx_entry_init(rxd_ep, iov, iov_count, tag, ignore, context, ++ (rxd_ep->util_ep.caps & FI_DIRECTED_RECV && ++ addr != FI_ADDR_UNSPEC) ? ++ rxd_ep_av(rxd_ep)->fi_addr_table[addr] : ++ FI_ADDR_UNSPEC, op, rxd_flags); ++ if (!rx_entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ if (op == ofi_op_tagged) { ++ unexp_list = &rxd_ep->unexp_tag_list; ++ rx_list = &rxd_ep->rx_tag_list; ++ } else { ++ unexp_list = &rxd_ep->unexp_list; ++ rx_list = &rxd_ep->rx_list; ++ } ++ ++ if (!dlist_empty(unexp_list) && ++ rxd_ep_check_unexp_msg_list(rxd_ep, unexp_list, rx_list, rx_entry)) ++ goto out; ++ ++ dlist_insert_tail(&rx_entry->entry, rx_list); ++out: ++ fastlock_release(&rxd_ep->util_ep.rx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++static ssize_t rxd_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_recvmsg(ep, msg->msg_iov, msg->iov_count, ++ msg->addr, 0, ~0, msg->context, ofi_op_msg, ++ rxd_flags(flags)); ++} ++ ++static ssize_t rxd_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec msg_iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ msg_iov.iov_base = buf; ++ msg_iov.iov_len = len; ++ ++ return rxd_ep_generic_recvmsg(ep, &msg_iov, 1, src_addr, 0, ~0, context, ++ ofi_op_msg, rxd_ep_rx_flags(ep)); ++} ++ ++static ssize_t rxd_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_recvmsg(ep, iov, count, src_addr, ++ 0, ~0, context, ofi_op_msg, rxd_ep_rx_flags(ep)); ++} ++ ++ssize_t rxd_ep_generic_inject(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t data, uint32_t op, uint32_t rxd_flags) ++{ ++ struct rxd_x_entry *tx_entry; ++ ssize_t ret = -FI_EAGAIN; ++ fi_addr_t rxd_addr; ++ ++ assert(iov_count <= RXD_IOV_LIMIT); ++ assert(ofi_total_iov_len(iov, iov_count) <= ++ rxd_ep_domain(rxd_ep)->max_inline_msg); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, iov_count, NULL, 0, 0, data, ++ tag, NULL, rxd_addr, op, rxd_flags | RXD_INJECT); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, NULL, 0, NULL, 0, 0, 0); ++ if (ret) ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++ssize_t rxd_ep_generic_sendmsg(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, fi_addr_t addr, uint64_t tag, ++ uint64_t data, void *context, uint32_t op, ++ uint32_t rxd_flags) ++{ ++ struct rxd_x_entry *tx_entry; ++ ssize_t ret = -FI_EAGAIN; ++ fi_addr_t rxd_addr; ++ ++ assert(iov_count <= RXD_IOV_LIMIT); ++ ++ if (rxd_flags & RXD_INJECT) ++ return rxd_ep_generic_inject(rxd_ep, iov, iov_count, addr, tag, 0, ++ op, rxd_flags); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, iov_count, NULL, 0, 0, ++ data, tag, context, rxd_addr, op, rxd_flags); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, NULL, 0, NULL, 0, 0, 0); ++ if (ret) ++ rxd_tx_entry_free(rxd_ep, tx_entry); ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++static ssize_t rxd_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_sendmsg(ep, msg->msg_iov, msg->iov_count, ++ msg->addr, 0, msg->data, msg->context, ++ ofi_op_msg, rxd_flags(flags)); ++ ++} ++ ++static ssize_t rxd_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_sendmsg(ep, iov, count, dest_addr, 0, ++ 0, context, ofi_op_msg, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_sendmsg(ep, &iov, 1, dest_addr, 0, ++ 0, context, ofi_op_msg, ++ rxd_ep_tx_flags(ep)); ++} ++ ++static ssize_t rxd_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_inject(ep, &iov, 1, dest_addr, 0, 0, ofi_op_msg, ++ RXD_NO_TX_COMP | RXD_INJECT); ++} ++ ++static ssize_t rxd_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_sendmsg(ep, &iov, 1, dest_addr, 0, data, context, ++ ofi_op_msg, rxd_ep_tx_flags(ep) | ++ RXD_REMOTE_CQ_DATA); ++} ++ ++static ssize_t rxd_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_inject(ep, &iov, 1, dest_addr, 0, data, ofi_op_msg, ++ RXD_NO_TX_COMP | RXD_INJECT | ++ RXD_REMOTE_CQ_DATA); ++} ++ ++struct fi_ops_msg rxd_ops_msg = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = rxd_ep_recv, ++ .recvv = rxd_ep_recvv, ++ .recvmsg = rxd_ep_recvmsg, ++ .send = rxd_ep_send, ++ .sendv = rxd_ep_sendv, ++ .sendmsg = rxd_ep_sendmsg, ++ .inject = rxd_ep_inject, ++ .senddata = rxd_ep_senddata, ++ .injectdata = rxd_ep_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_proto.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_proto.h +new file mode 100644 +index 000000000..dcaab88ed +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_proto.h +@@ -0,0 +1,178 @@ ++/* ++ * Copyright (c) 2015-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#if HAVE_CONFIG_H ++# include ++#endif /* HAVE_CONFIG_H */ ++ ++#include ++#include ++ ++#ifndef _RXD_PROTO_H_ ++#define _RXD_PROTO_H_ ++ ++#define RXD_IOV_LIMIT 4 ++#define RXD_NAME_LENGTH 64 ++ ++enum rxd_pkt_type { ++ RXD_MSG = ofi_op_msg, ++ RXD_TAGGED = ofi_op_tagged, ++ RXD_READ_REQ = ofi_op_read_req, ++ RXD_WRITE = ofi_op_write, ++ RXD_ATOMIC = ofi_op_atomic, ++ RXD_ATOMIC_FETCH = ofi_op_atomic_fetch, ++ RXD_ATOMIC_COMPARE = ofi_op_atomic_compare, ++ RXD_RTS, ++ RXD_CTS, ++ RXD_ACK, ++ RXD_DATA, ++ RXD_DATA_READ, ++ RXD_NO_OP, ++}; ++ ++/* Base header: all packets must start with base_hdr ++ * - version: RXD version the app is using ++ * - type: type of message (see above definitions) ++ * - flags: any neccesary flags including hdr flags indicating which headers ++ * are included in the packet ++ * - peer: RX side peer address (exchanged during RTS-CTS process) ++ * - seq_no: sequence number (per peer) ++ */ ++struct rxd_base_hdr { ++ uint8_t version; ++ uint8_t type; ++ uint16_t flags; ++ uint32_t peer; ++ uint64_t seq_no; ++}; ++ ++/* ++ * Extended header: used for large transfers and ACKs ++ * - tx_id/rx_id: ++ * - for large messages: the tx/rx index for the messages ++ * - for ACKs: the tx/rx index which the ACK corresponds to ++ */ ++struct rxd_ext_hdr { ++ uint32_t tx_id; ++ uint32_t rx_id; ++ uint64_t seg_no; ++}; ++ ++/* ++ * Ready to send: initialize peer communication and exchange addressing info ++ * - rts_addr: local address for peer sending RTS ++ * - source: name of transmitting endpoint for peer to add to AV ++ */ ++struct rxd_rts_pkt { ++ struct rxd_base_hdr base_hdr; ++ uint64_t rts_addr; ++ uint8_t source[RXD_NAME_LENGTH]; ++}; ++ ++/* ++ * Clear to send: response to RTS request ++ * - rts_addr: peer address packet is responding to ++ * - cts_addr: local address for peer ++ */ ++struct rxd_cts_pkt { ++ struct rxd_base_hdr base_hdr; ++ uint64_t rts_addr; ++ uint64_t cts_addr; ++}; ++ ++/* ++ * ACK: to signal received packets and send tx/rx id info ++ */ ++struct rxd_ack_pkt { ++ struct rxd_base_hdr base_hdr; ++ struct rxd_ext_hdr ext_hdr; ++ //TODO fill in more fields? Selective ack? ++}; ++ ++/* ++ * Data: send larger block of data using known tx/rx ids for matching ++ */ ++struct rxd_data_pkt { ++ struct rxd_base_hdr base_hdr; ++ struct rxd_ext_hdr ext_hdr; ++ ++ char msg[]; ++}; ++ ++/* ++ * The below five headers are used for op pkts and can be used in combination. ++ * The presence of each header is determined by either op type or flags (in base_hr). ++ * The op header order is as follows: ++ * base_hdr (present for all packets) ++ * ++ * sar_hdr: for all messages requiring more than one packet ++ * - lack of the sar_hdr is signaled by base_hdr->flags & RXD_INLINE ++ * tag_hdr: for all tagged messages ++ * - signaled by base_hdr->flags & RXD_TAG_HDR ++ * data_hdr: for messages carrying remote CQ data ++ * - signaled by base_hdr->flags & RXD_REMOTE_CQ_DATA ++ * rma_hdr: for FI_RMA and FI_ATOMIC operations ++ * - signaled by base_hdr->type = RXD_READ_REQ, RXD_WRITE, RXD_ATOMIC, ++ * RXD_ATOMIC_FETCH, and RXD_ATOMIC_COMPARE ++ * atom_hdr: for FI_ATOMIC operations ++ * - signaled by base_hdr->type = RXD_ATOMIC, RXD_ATOMIC_FETCH, ++ * RXD_ATOMIC_COMPARE ++ * ++ * Any data in the packet following these headers is part of the incoming packet message ++ */ ++ ++struct rxd_sar_hdr { ++ uint64_t size; ++ uint64_t num_segs; ++ uint32_t tx_id; ++ uint8_t iov_count; ++ uint8_t resv[3]; ++}; ++ ++struct rxd_tag_hdr { ++ uint64_t tag; ++}; ++ ++struct rxd_data_hdr { ++ uint64_t cq_data; ++}; ++ ++struct rxd_rma_hdr { ++ struct ofi_rma_iov rma[RXD_IOV_LIMIT]; ++}; ++ ++struct rxd_atom_hdr { ++ uint32_t datatype; ++ uint32_t atomic_op; ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_rma.c +index ce4c5b438..fb739754e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_rma.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -33,309 +33,273 @@ + #include + #include + #include ++#include + #include "rxd.h" + +-ssize_t rxd_ep_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, +- uint64_t flags) ++static ssize_t rxd_generic_write_inject(struct rxd_ep *rxd_ep, ++ const struct iovec *iov, size_t iov_count, ++ const struct fi_rma_iov *rma_iov, size_t rma_count, ++ fi_addr_t addr, void *context, uint32_t op, uint64_t data, ++ uint32_t rxd_flags) + { +- struct rxd_ep *rxd_ep; +- struct rxd_peer *peer; +- struct rxd_tx_entry *tx_entry; +- uint64_t peer_addr; +- ssize_t ret; +- +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid); +- +- peer_addr = rxd_av_dg_addr(rxd_ep_av(rxd_ep), msg->addr); +- peer = rxd_ep_getpeer_info(rxd_ep, peer_addr); +- +- fastlock_acquire(&rxd_ep->lock); +- if (peer->state != CMAP_CONNECTED) { +- ret = rxd_ep_connect(rxd_ep, peer, peer_addr); +- fastlock_release(&rxd_ep->lock); +- if (ret == -FI_EALREADY) { +- rxd_ep->util_ep.progress(&rxd_ep->util_ep); +- ret = -FI_EAGAIN; +- } +- return ret ? ret : -FI_EAGAIN; +- } ++ struct rxd_x_entry *tx_entry; ++ fi_addr_t rxd_addr; ++ ssize_t ret = -FI_EAGAIN; ++ ++ assert(iov_count <= RXD_IOV_LIMIT && rma_count <= RXD_IOV_LIMIT); ++ assert(ofi_total_iov_len(iov, iov_count) <= rxd_ep_domain(rxd_ep)->max_inline_rma); + +- tx_entry = rxd_tx_entry_alloc(rxd_ep, peer, peer_addr, flags, +- RXD_TX_READ_REQ); +- if (!tx_entry) { +- ret = -FI_EAGAIN; ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, iov_count, NULL, 0, rma_count, data, ++ 0, context, rxd_addr, op, rxd_flags); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, rma_iov, rma_count, NULL, 0, 0, 0); ++ if (ret) { ++ rxd_tx_entry_free(rxd_ep, tx_entry); + goto out; + } + +- tx_entry->read_req.msg = *msg; +- memcpy(&tx_entry->read_req.dst_iov[0], msg->msg_iov, +- sizeof(*msg->msg_iov)* msg->iov_count); +- memcpy(&tx_entry->read_req.src_iov[0], msg->rma_iov, +- sizeof(*msg->rma_iov) * msg->rma_iov_count); +- ret = rxd_ep_start_xfer(rxd_ep, peer, ofi_op_read_req, tx_entry); ++ if (tx_entry->op == RXD_READ_REQ) ++ goto out; ++ ++ ret = 0; ++ ++out: ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); ++ return ret; ++} ++ ++ssize_t rxd_generic_rma(struct rxd_ep *rxd_ep, const struct iovec *iov, ++ size_t iov_count, const struct fi_rma_iov *rma_iov, size_t rma_count, ++ void **desc, fi_addr_t addr, void *context, uint32_t op, uint64_t data, ++ uint32_t rxd_flags) ++{ ++ struct rxd_x_entry *tx_entry; ++ fi_addr_t rxd_addr; ++ ssize_t ret = -FI_EAGAIN; ++ ++ if (rxd_flags & RXD_INJECT) ++ return rxd_generic_write_inject(rxd_ep, iov, iov_count, rma_iov, ++ rma_count, addr, context, op, ++ data, rxd_flags); ++ ++ assert(iov_count <= RXD_IOV_LIMIT && rma_count <= RXD_IOV_LIMIT); ++ ++ fastlock_acquire(&rxd_ep->util_ep.lock); ++ fastlock_acquire(&rxd_ep->util_ep.tx_cq->cq_lock); ++ ++ if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) ++ goto out; ++ ++ rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; ++ ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); ++ if (ret) ++ goto out; ++ ++ tx_entry = rxd_tx_entry_init(rxd_ep, iov, iov_count, NULL, 0, rma_count, ++ data, 0, context, rxd_addr, op, rxd_flags); ++ if (!tx_entry) ++ goto out; ++ ++ ret = rxd_ep_send_op(rxd_ep, tx_entry, rma_iov, rma_count, NULL, 0, 0, 0); + if (ret) + rxd_tx_entry_free(rxd_ep, tx_entry); + + out: +- fastlock_release(&rxd_ep->lock); ++ fastlock_release(&rxd_ep->util_ep.tx_cq->cq_lock); ++ fastlock_release(&rxd_ep->util_ep.lock); + return ret; + } + +-static ssize_t rxd_ep_read(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, uint64_t addr, +- uint64_t key, void *context) ++ssize_t rxd_read(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) + { +- struct fi_msg_rma msg; ++ struct rxd_ep *ep; + struct iovec msg_iov; + struct fi_rma_iov rma_iov; + +- memset(&msg, 0, sizeof(msg)); ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ + msg_iov.iov_base = (void *) buf; + msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- + rma_iov.addr = addr; +- rma_iov.key = key; + rma_iov.len = len; +- msg.rma_iov_count = 1; +- msg.rma_iov = &rma_iov; +- +- msg.addr = src_addr; +- msg.context = context; ++ rma_iov.key = key; + +- return rxd_ep_readmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, &msg_iov, 1, &rma_iov, 1, &desc, ++ src_addr, context, ofi_op_read_req, 0, ++ rxd_ep_tx_flags(ep)); + } + +-static ssize_t rxd_ep_readv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, +- fi_addr_t src_addr, uint64_t addr, uint64_t key, +- void *context) ++ssize_t rxd_readv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context) + { +- size_t len, i; +- struct fi_msg_rma msg; ++ struct rxd_ep *ep; + struct fi_rma_iov rma_iov; + +- assert(count <= RXD_IOV_LIMIT); +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.rma_iov_count = 1; ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + + rma_iov.addr = addr; ++ rma_iov.len = ofi_total_iov_len(iov, count); + rma_iov.key = key; + +- for (i = 0, len = 0; i < count; i++) +- len += iov[i].iov_len; +- rma_iov.len = len; +- +- msg.rma_iov = &rma_iov; +- msg.addr = src_addr; +- msg.context = context; +- +- return rxd_ep_readmsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, iov, count, &rma_iov, 1, desc, ++ src_addr, context, ofi_op_read_req, 0, ++ rxd_ep_tx_flags(ep)); + } + +-ssize_t rxd_ep_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, +- uint64_t flags) ++ssize_t rxd_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) + { +- struct rxd_ep *rxd_ep; +- struct rxd_peer *peer; +- struct rxd_tx_entry *tx_entry; +- uint64_t peer_addr; +- ssize_t ret; +- +- rxd_ep = container_of(ep, struct rxd_ep, util_ep.ep_fid); +- peer_addr = rxd_av_dg_addr(rxd_ep_av(rxd_ep), msg->addr); +- peer = rxd_ep_getpeer_info(rxd_ep, peer_addr); +- +- fastlock_acquire(&rxd_ep->lock); +- if (peer->state != CMAP_CONNECTED) { +- ret = rxd_ep_connect(rxd_ep, peer, peer_addr); +- fastlock_release(&rxd_ep->lock); +- if (ret == -FI_EALREADY) { +- rxd_ep->util_ep.progress(&rxd_ep->util_ep); +- ret = -FI_EAGAIN; +- } +- return ret ? ret : -FI_EAGAIN; +- } +- +- tx_entry = rxd_tx_entry_alloc(rxd_ep, peer, peer_addr, flags, +- RXD_TX_WRITE); +- if (!tx_entry) { +- ret = -FI_EAGAIN; +- goto out; +- } ++ struct rxd_ep *ep; + +- tx_entry->write.msg = *msg; +- memcpy(&tx_entry->write.src_iov[0], msg->msg_iov, +- sizeof(*msg->msg_iov) * msg->iov_count); +- memcpy(&tx_entry->write.dst_iov[0], msg->rma_iov, +- sizeof(*msg->rma_iov) * msg->rma_iov_count); +- ret = rxd_ep_start_xfer(rxd_ep, peer, ofi_op_write, tx_entry); +- if (ret) +- rxd_tx_entry_free(rxd_ep, tx_entry); ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + +-out: +- fastlock_release(&rxd_ep->lock); +- return ret; ++ return rxd_generic_rma(ep, msg->msg_iov, msg->iov_count, ++ msg->rma_iov, msg->rma_iov_count, ++ msg->desc, msg->addr, msg->context, ++ ofi_op_read_req, msg->data, rxd_flags(flags)); + } + +-static ssize_t rxd_ep_write(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) ++ssize_t rxd_write(struct fid_ep *ep_fid, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) + { +- struct fi_msg_rma msg; ++ struct rxd_ep *ep; + struct iovec msg_iov; + struct fi_rma_iov rma_iov; + +- memset(&msg, 0, sizeof(msg)); ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ + msg_iov.iov_base = (void *) buf; + msg_iov.iov_len = len; +- +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- + rma_iov.addr = addr; +- rma_iov.key = key; + rma_iov.len = len; ++ rma_iov.key = key; + +- msg.rma_iov_count = 1; +- msg.rma_iov = &rma_iov; +- +- msg.addr = dest_addr; +- msg.context = context; +- +- return rxd_ep_writemsg(ep, &msg, RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, &msg_iov, 1, &rma_iov, 1, &desc, ++ dest_addr, context, ofi_op_write, 0, ++ rxd_ep_tx_flags(ep)); + } + +-static ssize_t rxd_ep_writev(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) ++ssize_t rxd_writev(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) + { +- size_t i; +- size_t len; +- struct fi_msg_rma msg; ++ struct rxd_ep *ep; + struct fi_rma_iov rma_iov; + +- assert(count <= RXD_IOV_LIMIT); +- memset(&msg, 0, sizeof(msg)); +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.rma_iov_count = 1; +- +- for (i = 0, len = 0; i < count; i++) +- len += iov[i].iov_len; ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + + rma_iov.addr = addr; ++ rma_iov.len = ofi_total_iov_len(iov, count); + rma_iov.key = key; +- rma_iov.len = len; + +- msg.rma_iov = &rma_iov; +- msg.context = context; +- msg.addr = dest_addr; ++ return rxd_generic_rma(ep, iov, count, &rma_iov, 1, desc, ++ dest_addr, context, ofi_op_write, 0, ++ rxd_ep_tx_flags(ep)); ++} ++ ++ ++ssize_t rxd_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; + +- return rxd_ep_writemsg(ep, &msg, RXD_USE_OP_FLAGS); ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_generic_rma(ep, msg->msg_iov, msg->iov_count, ++ msg->rma_iov, msg->rma_iov_count, ++ msg->desc, msg->addr, msg->context, ++ ofi_op_write, msg->data, rxd_flags(flags)); + } + +-static ssize_t rxd_ep_writedata(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, uint64_t addr, +- uint64_t key, void *context) ++ssize_t rxd_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) + { +- struct fi_msg_rma msg; +- struct iovec msg_iov; ++ struct rxd_ep *ep; ++ struct iovec iov; + struct fi_rma_iov rma_iov; + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.rma_iov_count = 1; ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; + rma_iov.addr = addr; ++ rma_iov.len = len; + rma_iov.key = key; +- rma_iov.len = len; + +- msg.rma_iov = &rma_iov; +- msg.msg_iov = &msg_iov; +- +- msg.addr = dest_addr; +- msg.context = context; +- msg.data = data; +- +- return rxd_ep_writemsg(ep, &msg, FI_REMOTE_CQ_DATA | +- RXD_USE_OP_FLAGS); ++ return rxd_generic_rma(ep, &iov, 1, &rma_iov, 1, &desc, ++ dest_addr, context, ofi_op_write, data, ++ rxd_ep_tx_flags(ep) | RXD_REMOTE_CQ_DATA); + } + +-static ssize_t rxd_ep_inject(struct fid_ep *ep, const void *buf, +- size_t len, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) ++ssize_t rxd_inject_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, fi_addr_t dest_addr, uint64_t addr, uint64_t key) + { +- struct fi_msg_rma msg; +- struct iovec msg_iov; ++ struct rxd_ep *rxd_ep; ++ struct iovec iov; + struct fi_rma_iov rma_iov; + +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.rma_iov_count = 1; ++ rxd_ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; + rma_iov.addr = addr; +- rma_iov.key = key; + rma_iov.len = len; ++ rma_iov.key = key; + +- msg.rma_iov = &rma_iov; +- msg.msg_iov = &msg_iov; +- msg.addr = dest_addr; +- +- return rxd_ep_writemsg(ep, &msg, FI_INJECT | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ return rxd_generic_write_inject(rxd_ep, &iov, 1, &rma_iov, 1, ++ dest_addr, NULL, ofi_op_write, 0, ++ RXD_NO_TX_COMP | RXD_INJECT); + } + +-static ssize_t rxd_ep_injectdata(struct fid_ep *ep, const void *buf, +- size_t len, uint64_t data, +- fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) ++ssize_t rxd_inject_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) + { +- struct fi_msg_rma msg; +- struct iovec msg_iov; ++ struct rxd_ep *rxd_ep; ++ struct iovec iov; + struct fi_rma_iov rma_iov; + +- memset(&msg, 0, sizeof(msg)); +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.rma_iov_count = 1; ++ rxd_ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); + ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; + rma_iov.addr = addr; +- rma_iov.key = key; + rma_iov.len = len; ++ rma_iov.key = key; + +- msg.rma_iov = &rma_iov; +- msg.msg_iov = &msg_iov; +- msg.addr = dest_addr; +- msg.data = data; +- return rxd_ep_writemsg(ep, &msg, FI_INJECT | FI_REMOTE_CQ_DATA | +- RXD_NO_COMPLETION | RXD_USE_OP_FLAGS); ++ return rxd_generic_write_inject(rxd_ep, &iov, 1, &rma_iov, 1, ++ dest_addr, NULL, ofi_op_write, ++ data, RXD_NO_TX_COMP | RXD_INJECT | ++ RXD_REMOTE_CQ_DATA); + } + + struct fi_ops_rma rxd_ops_rma = { +- .size = sizeof (struct fi_ops_rma), +- .read = rxd_ep_read, +- .readv = rxd_ep_readv, +- .readmsg = rxd_ep_readmsg, +- .write = rxd_ep_write, +- .writev = rxd_ep_writev, +- .writemsg = rxd_ep_writemsg, +- .inject = rxd_ep_inject, +- .writedata = rxd_ep_writedata, +- .injectdata = rxd_ep_injectdata, ++ .size = sizeof(struct fi_ops_rma), ++ .read = rxd_read, ++ .readv = rxd_readv, ++ .readmsg = rxd_readmsg, ++ .write = rxd_write, ++ .writev = rxd_writev, ++ .writemsg = rxd_writemsg, ++ .inject = rxd_inject_write, ++ .writedata = rxd_writedata, ++ .injectdata = rxd_inject_writedata, ++ + }; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_tagged.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_tagged.c +new file mode 100644 +index 000000000..1467c8dc6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxd/src/rxd_tagged.c +@@ -0,0 +1,181 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include "rxd.h" ++ ++ssize_t rxd_ep_trecv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec msg_iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ msg_iov.iov_base = (void *) buf; ++ msg_iov.iov_len = len; ++ ++ return rxd_ep_generic_recvmsg(ep, &msg_iov, 1, src_addr, tag, ignore, ++ context, ofi_op_tagged, ++ rxd_ep_tx_flags(ep) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_trecvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, ++ void *context) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_recvmsg(ep, iov, count, src_addr, tag, ignore, ++ context, ofi_op_tagged, ++ rxd_ep_tx_flags(ep) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_trecvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_recvmsg(ep, msg->msg_iov, msg->iov_count, msg->addr, ++ msg->tag, msg->ignore, msg->context, ++ ofi_op_tagged, rxd_flags(flags) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, uint64_t tag, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec msg_iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ msg_iov.iov_base = (void *) buf; ++ msg_iov.iov_len = len; ++ ++ return rxd_ep_generic_sendmsg(ep, &msg_iov, 1, dest_addr, tag, ++ 0, context, ofi_op_tagged, ++ rxd_ep_tx_flags(ep) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tsendv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, uint64_t tag, ++ void *context) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_sendmsg(ep, iov, count, dest_addr, tag, ++ 0, context, ofi_op_tagged, ++ rxd_ep_tx_flags(ep) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tsendmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, ++ uint64_t flags) ++{ ++ struct rxd_ep *ep; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ return rxd_ep_generic_sendmsg(ep, msg->msg_iov, msg->iov_count, ++ msg->addr, msg->tag, msg->data, msg->context, ++ ofi_op_tagged, rxd_flags(flags) | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tinject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_inject(ep, &iov, 1, dest_addr, tag, 0, ++ ofi_op_tagged, RXD_NO_TX_COMP | RXD_INJECT | ++ RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t tag, void *context) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_sendmsg(ep, &iov, 1, dest_addr, tag, data, context, ++ ofi_op_tagged, rxd_ep_tx_flags(ep) | ++ RXD_REMOTE_CQ_DATA | RXD_TAG_HDR); ++} ++ ++ssize_t rxd_ep_tinjectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) ++{ ++ struct rxd_ep *ep; ++ struct iovec iov; ++ ++ ep = container_of(ep_fid, struct rxd_ep, util_ep.ep_fid.fid); ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ ++ return rxd_ep_generic_inject(ep, &iov, 1, dest_addr, tag, data, ofi_op_tagged, ++ RXD_NO_TX_COMP | RXD_INJECT | ++ RXD_REMOTE_CQ_DATA | RXD_TAG_HDR); ++} ++ ++struct fi_ops_tagged rxd_ops_tagged = { ++ .size = sizeof(struct fi_ops_tagged), ++ .recv = rxd_ep_trecv, ++ .recvv = rxd_ep_trecvv, ++ .recvmsg = rxd_ep_trecvmsg, ++ .send = rxd_ep_tsend, ++ .sendv = rxd_ep_tsendv, ++ .sendmsg = rxd_ep_tsendmsg, ++ .inject = rxd_ep_tinject, ++ .senddata = rxd_ep_tsenddata, ++ .injectdata = rxd_ep_tinjectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/Makefile.include +index 8c777346b..36703e80f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/Makefile.include +@@ -7,7 +7,9 @@ _rxm_files = \ + prov/rxm/src/rxm_conn.c \ + prov/rxm/src/rxm_ep.c \ + prov/rxm/src/rxm_cq.c \ ++ prov/rxm/src/rxm_av.c \ + prov/rxm/src/rxm_rma.c \ ++ prov/rxm/src/rxm_atomic.c \ + prov/rxm/src/rxm.h + + if HAVE_RXM_DL +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm.h +index 250ed933f..d9276f425 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm.h +@@ -1,3 +1,4 @@ ++ + /* + * Copyright (c) 2016 Intel Corporation, Inc. All rights reserved. + * +@@ -60,7 +61,15 @@ + #define RXM_MAJOR_VERSION 1 + #define RXM_MINOR_VERSION 0 + +-#define RXM_BUF_SIZE 16384 ++#define RXM_OP_VERSION 3 ++#define RXM_CTRL_VERSION 3 ++ ++#define RXM_BUF_SIZE 16384 ++ ++#define RXM_SAR_LIMIT 131072 ++#define RXM_SAR_TX_ERROR UINT64_MAX ++#define RXM_SAR_RX_INIT UINT64_MAX ++ + #define RXM_IOV_LIMIT 4 + + #define RXM_MR_MODES (OFI_MR_BASIC_MAP | FI_MR_LOCAL) +@@ -71,15 +80,15 @@ + info->domain_attr->mr_mode & FI_MR_PROV_KEY) + + #define RXM_LOG_STATE(subsystem, pkt, prev_state, next_state) \ +- FI_DBG(&rxm_prov, subsystem, "[LMT] msg_id: 0x%" PRIx64 " %s -> %s\n", \ ++ FI_DBG(&rxm_prov, subsystem, "[RNDV] msg_id: 0x%" PRIx64 " %s -> %s\n", \ + pkt.ctrl_hdr.msg_id, rxm_proto_state_str[prev_state], \ + rxm_proto_state_str[next_state]) + +-#define RXM_LOG_STATE_TX(subsystem, tx_entry, next_state) \ +- RXM_LOG_STATE(subsystem, tx_entry->tx_buf->pkt, tx_entry->state,\ ++#define RXM_LOG_STATE_TX(subsystem, tx_buf, next_state) \ ++ RXM_LOG_STATE(subsystem, tx_buf->pkt, tx_buf->hdr.state, \ + next_state) + +-#define RXM_LOG_STATE_RX(subsystem, rx_buf, next_state) \ ++#define RXM_LOG_STATE_RX(subsystem, rx_buf, next_state) \ + RXM_LOG_STATE(subsystem, rx_buf->pkt, rx_buf->hdr.state, \ + next_state) + +@@ -88,10 +97,9 @@ + " (fi_addr: 0x%" PRIx64 " tag: 0x%" PRIx64 ")\n",\ + addr, tag) + +-#define RXM_GET_PROTO_STATE(comp) \ +- (*(enum rxm_proto_state *) \ +- ((unsigned char *)(comp)->op_context + \ +- offsetof(struct rxm_buf, state))) ++#define RXM_GET_PROTO_STATE(context) \ ++ (*(enum rxm_proto_state *) \ ++ ((unsigned char *)context + offsetof(struct rxm_buf, state))) + + #define RXM_SET_PROTO_STATE(comp, new_state) \ + do { \ +@@ -100,45 +108,213 @@ do { \ + offsetof(struct rxm_buf, state))) = (new_state); \ + } while (0) + ++#define rxm_tx_buf_2_msg_id(rxm_ep, pool_type, tx_buf) \ ++ ((uint64_t) rxm_get_buf_index(&(rxm_ep)->buf_pools[pool_type], \ ++ (void *) tx_buf)) ++#define rxm_msg_id_2_tx_buf(rxm_ep, pool_type, msg_id) \ ++ ((void *) rxm_buf_get_by_index(&(rxm_ep)->buf_pools[pool_type], \ ++ (uint64_t) msg_id)) ++ ++#define RXM_Q_STRERROR(prov, log, q, q_str, entry, strerror) \ ++ FI_WARN(prov, log, "fi_" q_str "_readerr: err: %d, prov_err: %s (%d)\n", \ ++ (entry).err,strerror((q), (entry).prov_errno, (entry).err_data, NULL, 0), \ ++ (entry).prov_errno) ++ ++#define RXM_CQ_READERR(prov, log, cq, ret, err_entry) \ ++ do { \ ++ (ret) = fi_cq_readerr((cq), &(err_entry), 0); \ ++ if ((ret) < 0) { \ ++ FI_WARN(prov, log, \ ++ "Unable to fi_cq_readerr: %zd\n", ret); \ ++ } else { \ ++ RXM_Q_STRERROR(prov, log, cq, "cq", \ ++ err_entry, fi_cq_strerror); \ ++ } \ ++ } while (0) ++ ++#define RXM_EQ_READERR(prov, log, eq, ret, err_entry) \ ++ do { \ ++ (ret) = fi_eq_readerr((eq), &(err_entry), 0); \ ++ if ((ret) != sizeof(err_entry)) { \ ++ FI_WARN(prov, log, \ ++ "Unable to fi_eq_readerr: %zd\n", ret); \ ++ } else { \ ++ RXM_Q_STRERROR(prov, log, eq, "eq", \ ++ err_entry, fi_eq_strerror); \ ++ } \ ++ } while (0) ++ + extern struct fi_provider rxm_prov; + extern struct util_prov rxm_util_prov; + extern struct fi_ops_rma rxm_ops_rma; +-extern int rxm_defer_requests; ++extern struct fi_ops_atomic rxm_ops_atomic; + + extern size_t rxm_msg_tx_size; + extern size_t rxm_msg_rx_size; + extern size_t rxm_def_univ_size; + ++/* ++ * Connection Map ++ */ ++ ++#define RXM_CMAP_IDX_BITS OFI_IDX_INDEX_BITS ++ ++enum rxm_cmap_signal { ++ RXM_CMAP_FREE, ++ RXM_CMAP_EXIT, ++}; ++ ++enum rxm_cmap_state { ++ RXM_CMAP_IDLE, ++ RXM_CMAP_CONNREQ_SENT, ++ RXM_CMAP_CONNREQ_RECV, ++ RXM_CMAP_ACCEPT, ++ RXM_CMAP_CONNECTED_NOTIFY, ++ RXM_CMAP_CONNECTED, ++ RXM_CMAP_SHUTDOWN, ++}; ++ ++enum rxm_cmap_reject_flag { ++ RXM_CMAP_REJECT_GENUINE, ++ RXM_CMAP_REJECT_SIMULT_CONN, ++}; ++ ++struct rxm_cmap_handle { ++ struct rxm_cmap *cmap; ++ enum rxm_cmap_state state; ++ /* Unique identifier for a connection. Can be exchanged with a peer ++ * during connection setup and can later be used in a message header ++ * to identify the source of the message (Used for FI_SOURCE, RNDV ++ * protocol, etc.) */ ++ uint64_t key; ++ uint64_t remote_key; ++ fi_addr_t fi_addr; ++ struct rxm_cmap_peer *peer; ++}; ++ ++struct rxm_cmap_peer { ++ struct rxm_cmap_handle *handle; ++ struct dlist_entry entry; ++ uint8_t addr[]; ++}; ++ ++struct rxm_cmap_attr { ++ void *name; ++ /* user guarantee for serializing access to cmap objects */ ++ uint8_t serial_access; ++}; ++ ++struct rxm_cmap { ++ struct util_ep *ep; ++ struct util_av *av; ++ ++ /* cmap handles that correspond to addresses in AV */ ++ struct rxm_cmap_handle **handles_av; ++ size_t num_allocated; ++ ++ /* Store all cmap handles (inclusive of handles_av) in an indexer. ++ * This allows reverse lookup of the handle using the index. */ ++ struct indexer handles_idx; ++ ++ struct ofi_key_idx key_idx; ++ ++ struct dlist_entry peer_list; ++ struct rxm_cmap_attr attr; ++ pthread_t cm_thread; ++ ofi_fastlock_acquire_t acquire; ++ ofi_fastlock_release_t release; ++ fastlock_t lock; ++}; ++ ++struct rxm_ep; ++ ++struct rxm_cmap_handle *rxm_cmap_key2handle(struct rxm_cmap *cmap, uint64_t key); ++int rxm_cmap_get_handle(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ struct rxm_cmap_handle **handle); ++int rxm_cmap_update(struct rxm_cmap *cmap, const void *addr, fi_addr_t fi_addr); ++ ++void rxm_cmap_process_conn_notify(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle); ++void rxm_cmap_process_connect(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle, ++ uint64_t *remote_key); ++void rxm_cmap_process_reject(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle, ++ enum rxm_cmap_reject_flag cm_reject_flag); ++int rxm_cmap_process_connreq(struct rxm_cmap *cmap, void *addr, ++ struct rxm_cmap_handle **handle_ret, ++ enum rxm_cmap_reject_flag *cm_reject_flag); ++void rxm_cmap_process_shutdown(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle); ++int rxm_cmap_handle_unconnected(struct rxm_ep *rxm_ep, struct rxm_cmap_handle *handle, ++ fi_addr_t dest_addr); ++void rxm_cmap_del_handle_ts(struct rxm_cmap_handle *handle); ++void rxm_cmap_free(struct rxm_cmap *cmap); ++int rxm_cmap_alloc(struct rxm_ep *rxm_ep, struct rxm_cmap_attr *attr); ++int rxm_cmap_handle_connect(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ struct rxm_cmap_handle *handle); ++/* Caller must hold cmap->lock */ ++int rxm_cmap_move_handle_to_peer_list(struct rxm_cmap *cmap, int index); ++ ++static inline struct rxm_cmap_handle * ++rxm_cmap_acquire_handle(struct rxm_cmap *cmap, fi_addr_t fi_addr) ++{ ++ assert(fi_addr < cmap->num_allocated); ++ return cmap->handles_av[fi_addr]; ++} ++ + struct rxm_fabric { + struct util_fabric util_fabric; + struct fid_fabric *msg_fabric; + }; + +-struct rxm_conn { +- struct fid_ep *msg_ep; +- struct dlist_entry postponed_tx_list; +- struct util_cmap_handle handle; +-}; +- + struct rxm_domain { + struct util_domain util_domain; + struct fid_domain *msg_domain; ++ size_t max_atomic_size; + uint8_t mr_local; + }; + ++int rxm_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context); ++ + struct rxm_mr { + struct fid_mr mr_fid; + struct fid_mr *msg_mr; ++ struct rxm_domain *domain; ++}; ++ ++struct rxm_ep_wire_proto { ++ uint8_t ctrl_version; ++ uint8_t op_version; ++ uint8_t endianness; ++ uint8_t padding[5]; ++ uint64_t eager_size; + }; + + struct rxm_cm_data { + struct sockaddr name; + uint64_t conn_id; ++ struct rxm_ep_wire_proto proto; + }; + +-struct rxm_rma_iov { ++struct rxm_rndv_hdr { ++ struct ofi_rma_iov iov[RXM_IOV_LIMIT]; + uint8_t count; +- struct ofi_rma_iov iov[]; ++}; ++ ++#define rxm_pkt_rndv_data(rxm_pkt) \ ++ ((rxm_pkt)->data + sizeof(struct rxm_rndv_hdr)) ++ ++struct rxm_atomic_hdr { ++ struct fi_rma_ioc rma_ioc[RXM_IOV_LIMIT]; ++ char data[]; ++}; ++ ++struct rxm_atomic_resp_hdr { ++ int32_t status; ++ uint32_t result_len; ++ char data[]; + }; + + /* +@@ -160,17 +336,20 @@ struct rxm_rma_iov { + */ + + /* RXM protocol states / tx/rx context */ +-#define RXM_PROTO_STATES(FUNC) \ +- FUNC(RXM_TX_NOBUF), \ +- FUNC(RXM_TX), \ +- FUNC(RXM_TX_RMA), \ +- FUNC(RXM_RX), \ +- FUNC(RXM_LMT_TX), \ +- FUNC(RXM_LMT_ACK_WAIT), \ +- FUNC(RXM_LMT_READ), \ +- FUNC(RXM_LMT_ACK_SENT), \ +- FUNC(RXM_LMT_ACK_RECVD),\ +- FUNC(RXM_LMT_FINISH), ++#define RXM_PROTO_STATES(FUNC) \ ++ FUNC(RXM_TX), \ ++ FUNC(RXM_INJECT_TX), \ ++ FUNC(RXM_RMA), \ ++ FUNC(RXM_RX), \ ++ FUNC(RXM_SAR_TX), \ ++ FUNC(RXM_RNDV_TX), \ ++ FUNC(RXM_RNDV_ACK_WAIT), \ ++ FUNC(RXM_RNDV_READ), \ ++ FUNC(RXM_RNDV_ACK_SENT), \ ++ FUNC(RXM_RNDV_ACK_RECVD), \ ++ FUNC(RXM_RNDV_FINISH), \ ++ FUNC(RXM_ATOMIC_RESP_WAIT), \ ++ FUNC(RXM_ATOMIC_RESP_SENT) + + enum rxm_proto_state { + RXM_PROTO_STATES(OFI_ENUM_VAL) +@@ -184,6 +363,30 @@ struct rxm_pkt { + char data[]; + }; + ++union rxm_sar_ctrl_data { ++ struct { ++ enum rxm_sar_seg_type { ++ RXM_SAR_SEG_FIRST = 1, ++ RXM_SAR_SEG_MIDDLE = 2, ++ RXM_SAR_SEG_LAST = 3, ++ } seg_type : 2; ++ uint32_t offset; ++ }; ++ uint64_t align; ++}; ++ ++static inline enum rxm_sar_seg_type ++rxm_sar_get_seg_type(struct ofi_ctrl_hdr *ctrl_hdr) ++{ ++ return ((union rxm_sar_ctrl_data *)&(ctrl_hdr->ctrl_data))->seg_type; ++} ++ ++static inline void ++rxm_sar_set_seg_type(struct ofi_ctrl_hdr *ctrl_hdr, enum rxm_sar_seg_type seg_type) ++{ ++ ((union rxm_sar_ctrl_data *)&(ctrl_hdr->ctrl_data))->seg_type = seg_type; ++} ++ + struct rxm_recv_match_attr { + fi_addr_t addr; + uint64_t tag; +@@ -202,20 +405,17 @@ struct rxm_iov { + uint8_t count; + }; + +-struct rxm_rma_iov_storage { +- struct fi_rma_iov iov[RXM_IOV_LIMIT]; +- uint8_t count; +-}; +- + enum rxm_buf_pool_type { + RXM_BUF_POOL_RX = 0, + RXM_BUF_POOL_START = RXM_BUF_POOL_RX, +- RXM_BUF_POOL_TX_MSG, +- RXM_BUF_POOL_TX_START = RXM_BUF_POOL_TX_MSG, +- RXM_BUF_POOL_TX_TAGGED, ++ RXM_BUF_POOL_TX, ++ RXM_BUF_POOL_TX_START = RXM_BUF_POOL_TX, ++ RXM_BUF_POOL_TX_INJECT, + RXM_BUF_POOL_TX_ACK, +- RXM_BUF_POOL_TX_LMT, +- RXM_BUF_POOL_TX_END = RXM_BUF_POOL_TX_LMT, ++ RXM_BUF_POOL_TX_RNDV, ++ RXM_BUF_POOL_TX_ATOMIC, ++ RXM_BUF_POOL_TX_SAR, ++ RXM_BUF_POOL_TX_END = RXM_BUF_POOL_TX_SAR, + RXM_BUF_POOL_RMA, + RXM_BUF_POOL_MAX, + }; +@@ -226,82 +426,155 @@ struct rxm_buf { + + enum rxm_proto_state state; + +- struct dlist_entry entry; + void *desc; +- /* MSG EP / shared context to which bufs would be posted to */ +- struct fid_ep *msg_ep; + }; + + struct rxm_rx_buf { + /* Must stay at top */ + struct rxm_buf hdr; +- struct dlist_entry entry; + + struct rxm_ep *ep; ++ /* MSG EP / shared context to which bufs would be posted to */ ++ struct fid_ep *msg_ep; + struct dlist_entry repost_entry; + struct rxm_conn *conn; +- struct rxm_recv_queue *recv_queue; + struct rxm_recv_entry *recv_entry; + struct rxm_unexp_msg unexp_msg; + uint64_t comp_flags; ++ struct fi_recv_context recv_context; ++ // TODO remove this and modify unexp msg handling path to not repost ++ // rx_buf + uint8_t repost; + + /* Used for large messages */ +- struct rxm_iov match_iov[RXM_IOV_LIMIT]; +- struct rxm_rma_iov *rma_iov; +- size_t index; ++ struct rxm_rndv_hdr *rndv_hdr; ++ size_t rndv_rma_index; + struct fid_mr *mr[RXM_IOV_LIMIT]; + + /* Must stay at bottom */ + struct rxm_pkt pkt; + }; + +-struct rxm_tx_buf { ++struct rxm_tx_base_buf { + /* Must stay at top */ + struct rxm_buf hdr; + +- enum rxm_buf_pool_type type; ++ /* Must stay at bottom */ ++ struct rxm_pkt pkt; ++}; ++ ++struct rxm_tx_eager_buf { ++ /* Must stay at top */ ++ struct rxm_buf hdr; ++ ++ void *app_context; ++ uint64_t flags; + + /* Must stay at bottom */ + struct rxm_pkt pkt; + }; + +-struct rxm_rma_buf { ++struct rxm_tx_sar_buf { + /* Must stay at top */ + struct rxm_buf hdr; + +- struct fi_msg_rma msg; +- struct rxm_iov rxm_iov; +- struct rxm_rma_iov_storage rxm_rma_iov; ++ void *app_context; ++ uint64_t flags; + + /* Must stay at bottom */ + struct rxm_pkt pkt; + }; + +-struct rxm_tx_entry { ++struct rxm_tx_rndv_buf { + /* Must stay at top */ +- union { +- struct fi_context fi_context; +- struct dlist_entry postponed_entry; ++ struct rxm_buf hdr; ++ ++ void *app_context; ++ uint64_t flags; ++ struct rxm_rx_buf *rx_buf; ++ struct fid_mr *mr[RXM_IOV_LIMIT]; ++ uint8_t count; ++ ++ /* Must stay at bottom */ ++ struct rxm_pkt pkt; ++}; ++ ++struct rxm_rma_buf { ++ /* Must stay at top */ ++ struct rxm_buf hdr; ++ ++ void *app_context; ++ uint64_t flags; ++ ++ /* Must stay at bottom */ ++ union { ++ struct rxm_pkt pkt; ++ struct { ++ struct fid_mr *mr[RXM_IOV_LIMIT]; ++ uint8_t count; ++ } mr; + }; ++}; + +- enum rxm_proto_state state; ++struct rxm_tx_atomic_buf { ++ /* Must stay at top */ ++ struct rxm_buf hdr; + +- struct rxm_ep *ep; +- uint8_t count; +- void *context; ++ void *app_context; + uint64_t flags; +- uint64_t comp_flags; ++ struct iovec result_iov[RXM_IOV_LIMIT]; ++ uint8_t result_iov_count; ++ ++ /* Must stay at bottom */ ++ struct rxm_pkt pkt; ++}; ++ ++enum rxm_deferred_tx_entry_type { ++ RXM_DEFERRED_TX_RNDV_ACK, ++ RXM_DEFERRED_TX_RNDV_READ, ++ RXM_DEFERRED_TX_SAR_SEG, ++ RXM_DEFERRED_TX_ATOMIC_RESP, ++}; ++ ++struct rxm_deferred_tx_entry { ++ struct rxm_ep *rxm_ep; ++ struct rxm_conn *rxm_conn; ++ struct dlist_entry entry; ++ enum rxm_deferred_tx_entry_type type; ++ + union { +- struct rxm_tx_buf *tx_buf; +- struct rxm_rma_buf *rma_buf; ++ struct { ++ struct rxm_rx_buf *rx_buf; ++ } rndv_ack; ++ struct { ++ struct rxm_rx_buf *rx_buf; ++ struct fi_rma_iov rma_iov; ++ struct rxm_iov rxm_iov; ++ } rndv_read; ++ struct { ++ struct rxm_tx_sar_buf *cur_seg_tx_buf; ++ struct { ++ struct iovec iov[RXM_IOV_LIMIT]; ++ uint8_t count; ++ size_t cur_iov_offset; ++ uint64_t data; ++ uint64_t tag; ++ } payload; ++ size_t next_seg_no; ++ size_t segs_cnt; ++ uint8_t op; ++ size_t total_len; ++ size_t remain_len; ++ uint64_t msg_id; ++ void *app_context; ++ uint64_t flags; ++ } sar_seg; ++ struct { ++ struct rxm_tx_atomic_buf *tx_buf; ++ ssize_t len; ++ } atomic_resp; + }; +- +- /* Used for large messages and RMA */ +- struct fid_mr *mr[RXM_IOV_LIMIT]; +- struct rxm_rx_buf *rx_buf; + }; +-DECLARE_FREESTACK(struct rxm_tx_entry, rxm_txe_fs); + + struct rxm_recv_entry { + struct dlist_entry entry; +@@ -313,16 +586,31 @@ struct rxm_recv_entry { + uint64_t ignore; + uint64_t comp_flags; + size_t total_len; +- void *multi_recv_buf; +-}; +-DECLARE_FREESTACK(struct rxm_recv_entry, rxm_recv_fs); ++ struct rxm_recv_queue *recv_queue; ++ struct { ++ void *buf; ++ size_t len; ++ } multi_recv; + +-struct rxm_send_queue { +- struct rxm_txe_fs *fs; +- fastlock_t lock; ++ union { ++ /* Used for SAR protocol */ ++ struct { ++ struct dlist_entry entry; ++ size_t total_recv_len; ++ struct rxm_conn *conn; ++ uint64_t msg_id; ++ } sar; ++ /* Used for Rendezvous protocol */ ++ struct { ++ /* This is used to send RNDV ACK */ ++ struct rxm_tx_base_buf *tx_buf; ++ } rndv; ++ }; + }; ++DECLARE_FREESTACK(struct rxm_recv_entry, rxm_recv_fs); + + enum rxm_recv_queue_type { ++ RXM_RECV_QUEUE_UNSPEC, + RXM_RECV_QUEUE_MSG, + RXM_RECV_QUEUE_TAGGED, + }; +@@ -335,44 +623,81 @@ struct rxm_recv_queue { + struct dlist_entry unexp_msg_list; + dlist_func_t *match_recv; + dlist_func_t *match_unexp; +- fastlock_t lock; + }; + + struct rxm_buf_pool { +- struct util_buf_pool *pool; + enum rxm_buf_pool_type type; +- struct rxm_ep *ep; +- fastlock_t lock; ++ struct util_buf_pool *pool; ++ struct rxm_ep *rxm_ep; ++}; ++ ++struct rxm_msg_eq_entry { ++ struct slist_entry slist_entry; ++ ssize_t rd; ++ uint32_t event; ++ /* Used for connection refusal */ ++ void *context; ++ struct fi_eq_err_entry err_entry; ++ /* must stay at the bottom */ ++ struct fi_eq_cm_entry cm_entry; + }; + ++#define RXM_MSG_EQ_ENTRY_SZ (sizeof(struct rxm_msg_eq_entry) + \ ++ sizeof(struct rxm_cm_data)) ++#define RXM_CM_ENTRY_SZ (sizeof(struct fi_eq_cm_entry) + \ ++ sizeof(struct rxm_cm_data)) ++ + struct rxm_ep { + struct util_ep util_ep; + struct fi_info *rxm_info; + struct fi_info *msg_info; ++ struct rxm_cmap *cmap; + struct fid_pep *msg_pep; + struct fid_eq *msg_eq; ++ struct slistfd msg_eq_entry_list; ++ fastlock_t msg_eq_entry_list_lock; + struct fid_cq *msg_cq; + int msg_cq_fd; +- struct dlist_entry msg_cq_fd_ref_list; + struct fid_ep *srx_ctx; + size_t comp_per_progress; + int msg_mr_local; + int rxm_mr_local; + size_t min_multi_recv_size; ++ size_t buffered_min; ++ size_t buffered_limit; + +- struct rxm_buf_pool buf_pools[RXM_BUF_POOL_MAX]; ++ size_t inject_limit; ++ size_t eager_limit; ++ size_t sar_limit; ++ ++ struct rxm_buf_pool *buf_pools; + +- struct dlist_entry post_rx_list; + struct dlist_entry repost_ready_list; ++ struct dlist_entry deferred_tx_conn_queue; + +- struct rxm_send_queue send_queue; + struct rxm_recv_queue recv_queue; + struct rxm_recv_queue trecv_queue; + }; + +-struct rxm_ep_wait_ref { +- struct util_wait *wait; +- struct dlist_entry entry; ++struct rxm_conn { ++ /* This should stay at the top */ ++ struct rxm_cmap_handle handle; ++ ++ struct fid_ep *msg_ep; ++ ++ /* This is used only in non-FI_THREAD_SAFE case */ ++ struct rxm_pkt *inject_pkt; ++ struct rxm_pkt *inject_data_pkt; ++ struct rxm_pkt *tinject_pkt; ++ struct rxm_pkt *tinject_data_pkt; ++ ++ struct dlist_entry deferred_conn_entry; ++ struct dlist_entry deferred_tx_queue; ++ struct dlist_entry sar_rx_msg_list; ++ ++ /* This is saved MSG EP fid, that hasn't been closed during ++ * handling of CONN_RECV in RXM_CMAP_CONNREQ_SENT for passive side */ ++ struct fid_ep *saved_msg_ep; + }; + + extern struct fi_provider rxm_prov; +@@ -382,17 +707,6 @@ extern struct fi_domain_attr rxm_domain_attr; + extern struct fi_tx_attr rxm_tx_attr; + extern struct fi_rx_attr rxm_rx_attr; + +-// TODO move to common code? +-static inline int rxm_match_addr(fi_addr_t recv_addr, fi_addr_t rx_addr) +-{ +- return (recv_addr == FI_ADDR_UNSPEC) || (recv_addr == rx_addr); +-} +- +-static inline int rxm_match_tag(uint64_t tag, uint64_t ignore, uint64_t match_tag) +-{ +- return ((tag | ignore) == (match_tag | ignore)); +-} +- + #define rxm_ep_rx_flags(rxm_ep) ((rxm_ep)->util_ep.rx_op_flags) + #define rxm_ep_tx_flags(rxm_ep) ((rxm_ep)->util_ep.tx_op_flags) + +@@ -406,33 +720,129 @@ int rxm_domain_open(struct fid_fabric *fabric, struct fi_info *info, + struct fid_domain **dom, void *context); + int rxm_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq_fid, void *context); +-ssize_t rxm_cq_handle_data(struct rxm_rx_buf *rx_buf); ++ssize_t rxm_cq_handle_rx_buf(struct rxm_rx_buf *rx_buf); + + int rxm_endpoint(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep, void *context); + +-struct util_cmap *rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep); +- +-void rxm_ep_progress_one(struct util_ep *util_ep); +-void rxm_ep_progress_multi(struct util_ep *util_ep); ++int rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep); ++void rxm_cq_write_error(struct util_cq *cq, struct util_cntr *cntr, ++ void *op_context, int err); ++void rxm_ep_progress(struct util_ep *util_ep); ++void rxm_ep_do_progress(struct util_ep *util_ep); + + int rxm_ep_prepost_buf(struct rxm_ep *rxm_ep, struct fid_ep *msg_ep); + +-int rxm_ep_msg_mr_regv(struct rxm_ep *rxm_ep, const struct iovec *iov, +- size_t count, uint64_t access, struct fid_mr **mr); +-void rxm_ep_msg_mr_closev(struct fid_mr **mr, size_t count); ++int rxm_ep_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, ++ uint64_t flags); ++static inline ssize_t ++rxm_atomic_send_respmsg(struct rxm_ep *rxm_ep, struct rxm_conn *conn, ++ struct rxm_tx_atomic_buf *resp_buf, ssize_t len) ++{ ++ struct iovec iov = { ++ .iov_base = (void *) &resp_buf->pkt, ++ .iov_len = len, ++ }; ++ struct fi_msg msg = { ++ .msg_iov = &iov, ++ .desc = NULL, ++ .iov_count = 1, ++ .context = resp_buf, ++ .data = 0, ++ }; ++ return fi_sendmsg(conn->msg_ep, &msg, FI_COMPLETION); ++} ++ ++static inline struct rxm_conn *rxm_key2conn(struct rxm_ep *rxm_ep, uint64_t key) ++{ ++ return (struct rxm_conn *)rxm_cmap_key2handle(rxm_ep->cmap, key); ++} + +-void rxm_ep_handle_postponed_tx_op(struct rxm_ep *rxm_ep, +- struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry); +-void rxm_ep_handle_postponed_rma_op(struct rxm_ep *rxm_ep, +- struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry); ++void rxm_ep_progress_deferred_queue(struct rxm_ep *rxm_ep, ++ struct rxm_conn *rxm_conn); + +-static inline void rxm_cntr_inc(struct util_cntr *cntr) ++struct rxm_deferred_tx_entry * ++rxm_ep_alloc_deferred_tx_entry(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ enum rxm_deferred_tx_entry_type type); ++ ++static inline void ++rxm_ep_enqueue_deferred_tx_queue(struct rxm_deferred_tx_entry *tx_entry) + { +- if (cntr) +- cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); ++ if (dlist_empty(&tx_entry->rxm_conn->deferred_tx_queue)) ++ dlist_insert_tail(&tx_entry->rxm_conn->deferred_conn_entry, ++ &tx_entry->rxm_ep->deferred_tx_conn_queue); ++ dlist_insert_tail(&tx_entry->entry, &tx_entry->rxm_conn->deferred_tx_queue); ++} ++ ++static inline void ++rxm_ep_dequeue_deferred_tx_queue(struct rxm_deferred_tx_entry *tx_entry) ++{ ++ dlist_remove_init(&tx_entry->entry); ++ if (dlist_empty(&tx_entry->rxm_conn->deferred_tx_queue)) ++ dlist_remove(&tx_entry->rxm_conn->deferred_conn_entry); ++} ++ ++int rxm_conn_process_eq_events(struct rxm_ep *rxm_ep); ++ ++static inline void rxm_ep_msg_mr_closev(struct fid_mr **mr, size_t count) ++{ ++ int ret; ++ size_t i; ++ ++ for (i = 0; i < count; i++) { ++ if (mr[i]) { ++ ret = fi_close(&mr[i]->fid); ++ if (ret) ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Unable to close msg mr: %zu\n", i); ++ mr[i] = NULL; ++ } ++ } ++} ++ ++static inline int ++rxm_ep_msg_mr_regv(struct rxm_ep *rxm_ep, const struct iovec *iov, size_t count, ++ uint64_t access, struct fid_mr **mr) ++{ ++ int ret; ++ size_t i; ++ struct rxm_domain *rxm_domain = ++ container_of(rxm_ep->util_ep.domain, struct rxm_domain, util_domain); ++ ++ for (i = 0; i < count; i++) { ++ ret = fi_mr_reg(rxm_domain->msg_domain, iov[i].iov_base, ++ iov[i].iov_len, access, 0, 0, 0, &mr[i], NULL); ++ if (ret) ++ goto err; ++ } ++ return 0; ++err: ++ rxm_ep_msg_mr_closev(mr, count); ++ return ret; ++} ++ ++static inline int ++rxm_ep_msg_mr_regv_lim(struct rxm_ep *rxm_ep, const struct iovec *iov, size_t count, ++ size_t total_reg_len, uint64_t access, struct fid_mr **mr) ++{ ++ int ret; ++ size_t i; ++ struct rxm_domain *rxm_domain = ++ container_of(rxm_ep->util_ep.domain, struct rxm_domain, util_domain); ++ ++ for (i = 0; i < count && total_reg_len; i++) { ++ size_t len = MIN(iov[i].iov_len, total_reg_len); ++ ret = fi_mr_reg(rxm_domain->msg_domain, iov[i].iov_base, ++ len, access, 0, 0, 0, &mr[i], NULL); ++ if (ret) ++ goto err; ++ total_reg_len -= len; ++ } ++ return 0; ++err: ++ rxm_ep_msg_mr_closev(mr, count); ++ return ret; + } + + static inline void rxm_cntr_incerr(struct util_cntr *cntr) +@@ -441,6 +851,18 @@ static inline void rxm_cntr_incerr(struct util_cntr *cntr) + cntr->cntr_fid.ops->adderr(&cntr->cntr_fid, 1); + } + ++ ++ ++static inline void rxm_cq_log_comp(uint64_t flags) ++{ ++#if ENABLE_DEBUG ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting %s completion\n", ++ fi_tostr((void *)&flags, FI_TYPE_CQ_EVENT_FLAGS)); ++#else ++ /* NOP */ ++#endif ++} ++ + /* Caller must hold recv_queue->lock */ + static inline struct rxm_rx_buf * + rxm_check_unexp_msg_list(struct rxm_recv_queue *recv_queue, fi_addr_t addr, +@@ -473,86 +895,187 @@ rxm_process_recv_entry(struct rxm_recv_queue *recv_queue, + { + struct rxm_rx_buf *rx_buf; + +- fastlock_acquire(&recv_queue->lock); + rx_buf = rxm_check_unexp_msg_list(recv_queue, recv_entry->addr, + recv_entry->tag, recv_entry->ignore); + if (rx_buf) { ++ assert((recv_queue->type == RXM_RECV_QUEUE_MSG && ++ rx_buf->pkt.hdr.op == ofi_op_msg) || ++ (recv_queue->type == RXM_RECV_QUEUE_TAGGED && ++ rx_buf->pkt.hdr.op == ofi_op_tagged)); + dlist_remove(&rx_buf->unexp_msg.entry); + rx_buf->recv_entry = recv_entry; +- fastlock_release(&recv_queue->lock); +- return rxm_cq_handle_data(rx_buf); ++ ++ if (rx_buf->pkt.ctrl_hdr.type != ofi_ctrl_seg_data) { ++ return rxm_cq_handle_rx_buf(rx_buf); ++ } else { ++ struct dlist_entry *entry; ++ enum rxm_sar_seg_type last = ++ (rxm_sar_get_seg_type(&rx_buf->pkt.ctrl_hdr) ++ == RXM_SAR_SEG_LAST); ++ ssize_t ret = rxm_cq_handle_rx_buf(rx_buf); ++ struct rxm_recv_match_attr match_attr; ++ ++ if (ret || last) ++ return ret; ++ ++ match_attr.addr = recv_entry->addr; ++ match_attr.tag = recv_entry->tag; ++ match_attr.ignore = recv_entry->ignore; ++ ++ dlist_foreach_container_safe(&recv_queue->unexp_msg_list, ++ struct rxm_rx_buf, rx_buf, ++ unexp_msg.entry, entry) { ++ if (!recv_queue->match_unexp(&rx_buf->unexp_msg.entry, ++ &match_attr)) ++ continue; ++ /* Handle unordered completions from MSG provider */ ++ if ((rx_buf->pkt.ctrl_hdr.msg_id != recv_entry->sar.msg_id) || ++ ((rx_buf->pkt.ctrl_hdr.type != ofi_ctrl_seg_data))) ++ continue; ++ ++ if (!rx_buf->conn) { ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); ++ } ++ if (recv_entry->sar.conn != rx_buf->conn) ++ continue; ++ rx_buf->recv_entry = recv_entry; ++ dlist_remove(&rx_buf->unexp_msg.entry); ++ last = (rxm_sar_get_seg_type(&rx_buf->pkt.ctrl_hdr) ++ == RXM_SAR_SEG_LAST); ++ ret = rxm_cq_handle_rx_buf(rx_buf); ++ if (ret || last) ++ break; ++ } ++ return ret; ++ } + } + + RXM_DBG_ADDR_TAG(FI_LOG_EP_DATA, "Enqueuing recv", recv_entry->addr, + recv_entry->tag); + dlist_insert_tail(&recv_entry->entry, &recv_queue->recv_list); +- fastlock_release(&recv_queue->lock); + + return FI_SUCCESS; + } + +-static inline +-struct rxm_buf *rxm_buf_get(struct rxm_buf_pool *pool) ++static inline struct rxm_conn * ++rxm_acquire_conn(struct rxm_ep *rxm_ep, fi_addr_t fi_addr) + { +- struct rxm_buf *buf; ++ return (struct rxm_conn *)rxm_cmap_acquire_handle(rxm_ep->cmap, ++ fi_addr); ++} + +- fastlock_acquire(&pool->lock); +- buf = util_buf_alloc(pool->pool); +- if (OFI_UNLIKELY(!buf)) { +- fastlock_release(&pool->lock); +- return NULL; ++static inline int ++rxm_acquire_conn_connect(struct rxm_ep *rxm_ep, fi_addr_t fi_addr, ++ struct rxm_conn **rxm_conn) ++{ ++ *rxm_conn = rxm_acquire_conn(rxm_ep, fi_addr); ++ if (OFI_UNLIKELY(!*rxm_conn || (*rxm_conn)->handle.state != RXM_CMAP_CONNECTED)) { ++ int ret; ++ if (!*rxm_conn) ++ return -FI_EHOSTUNREACH; ++ rxm_ep->cmap->acquire(&rxm_ep->cmap->lock); ++ ret = rxm_cmap_handle_unconnected(rxm_ep, &(*rxm_conn)->handle, fi_addr); ++ rxm_ep->cmap->release(&rxm_ep->cmap->lock); ++ return ret; ++ } ++ return 0; ++} ++ ++static inline ssize_t ++rxm_ep_prepare_tx(struct rxm_ep *rxm_ep, fi_addr_t dest_addr, ++ struct rxm_conn **rxm_conn) ++{ ++ ssize_t ret = rxm_acquire_conn_connect(rxm_ep, dest_addr, rxm_conn); ++ ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ if (OFI_UNLIKELY(!dlist_empty(&(*rxm_conn)->deferred_tx_queue))) { ++ rxm_ep_progress(&rxm_ep->util_ep); ++ if (!dlist_empty(&(*rxm_conn)->deferred_tx_queue)) ++ return -FI_EAGAIN; + } +- fastlock_release(&pool->lock); +- return buf; ++ ++ return 0; ++} ++ ++static inline void ++rxm_ep_format_tx_buf_pkt(struct rxm_conn *rxm_conn, size_t len, uint8_t op, ++ uint64_t data, uint64_t tag, uint64_t flags, ++ struct rxm_pkt *pkt) ++{ ++ pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ pkt->hdr.size = len; ++ pkt->hdr.op = op; ++ pkt->hdr.tag = tag; ++ pkt->hdr.flags = (flags & FI_REMOTE_CQ_DATA); ++ pkt->hdr.data = data; ++} ++ ++static inline struct rxm_buf *rxm_buf_alloc(struct rxm_buf_pool *pool) ++{ ++ return util_buf_alloc(pool->pool); + } + + static inline + void rxm_buf_release(struct rxm_buf_pool *pool, struct rxm_buf *buf) + { +- fastlock_acquire(&pool->lock); + util_buf_release(pool->pool, buf); +- fastlock_release(&pool->lock); + } + +-static inline struct rxm_tx_buf * +-rxm_tx_buf_get(struct rxm_ep *rxm_ep, enum rxm_buf_pool_type type) ++static inline struct rxm_buf * ++rxm_buf_get_by_index(struct rxm_buf_pool *pool, size_t index) ++{ ++ return util_buf_get_by_index(pool->pool, index); ++} ++ ++static inline ++size_t rxm_get_buf_index(struct rxm_buf_pool *pool, struct rxm_buf *buf) ++{ ++ return util_get_buf_index(pool->pool, buf); ++} ++ ++static inline struct rxm_buf * ++rxm_tx_buf_alloc(struct rxm_ep *rxm_ep, enum rxm_buf_pool_type type) + { +- assert((type == RXM_BUF_POOL_TX_MSG) || +- (type == RXM_BUF_POOL_TX_TAGGED) || ++ assert((type == RXM_BUF_POOL_TX) || ++ (type == RXM_BUF_POOL_TX_INJECT) || + (type == RXM_BUF_POOL_TX_ACK) || +- (type == RXM_BUF_POOL_TX_LMT)); +- return (struct rxm_tx_buf *)rxm_buf_get(&rxm_ep->buf_pools[type]); ++ (type == RXM_BUF_POOL_TX_RNDV) || ++ (type == RXM_BUF_POOL_TX_ATOMIC) || ++ (type == RXM_BUF_POOL_TX_SAR)); ++ return rxm_buf_alloc(&rxm_ep->buf_pools[type]); + } + + static inline void +-rxm_tx_buf_release(struct rxm_ep *rxm_ep, struct rxm_tx_buf *tx_buf) ++rxm_tx_buf_release(struct rxm_ep *rxm_ep, enum rxm_buf_pool_type type, void *tx_buf) + { +- assert((tx_buf->type == RXM_BUF_POOL_TX_MSG) || +- (tx_buf->type == RXM_BUF_POOL_TX_TAGGED) || +- (tx_buf->type == RXM_BUF_POOL_TX_ACK) || +- (tx_buf->type == RXM_BUF_POOL_TX_LMT)); +- tx_buf->pkt.hdr.flags &= ~OFI_REMOTE_CQ_DATA; +- rxm_buf_release(&rxm_ep->buf_pools[tx_buf->type], +- (struct rxm_buf *)tx_buf); ++ rxm_buf_release(&rxm_ep->buf_pools[type], (struct rxm_buf *)tx_buf); + } + +-static inline struct rxm_rx_buf *rxm_rx_buf_get(struct rxm_ep *rxm_ep) ++static inline struct rxm_rx_buf *rxm_rx_buf_alloc(struct rxm_ep *rxm_ep) + { +- return (struct rxm_rx_buf *)rxm_buf_get( +- &rxm_ep->buf_pools[RXM_BUF_POOL_RX]); ++ return (struct rxm_rx_buf *) ++ rxm_buf_alloc(&rxm_ep->buf_pools[RXM_BUF_POOL_RX]); + } + + static inline void + rxm_rx_buf_release(struct rxm_ep *rxm_ep, struct rxm_rx_buf *rx_buf) + { +- rxm_buf_release(&rxm_ep->buf_pools[RXM_BUF_POOL_RX], +- (struct rxm_buf *)rx_buf); ++ if (rx_buf->repost) { ++ dlist_insert_tail(&rx_buf->repost_entry, ++ &rx_buf->ep->repost_ready_list); ++ } else { ++ util_buf_release(rxm_ep->buf_pools[RXM_BUF_POOL_RX].pool, ++ rx_buf); ++ } + } + +-static inline struct rxm_rma_buf *rxm_rma_buf_get(struct rxm_ep *rxm_ep) ++static inline struct rxm_rma_buf *rxm_rma_buf_alloc(struct rxm_ep *rxm_ep) + { +- return (struct rxm_rma_buf *)rxm_buf_get( +- &rxm_ep->buf_pools[RXM_BUF_POOL_RMA]); ++ return (struct rxm_rma_buf *) ++ rxm_buf_alloc(&rxm_ep->buf_pools[RXM_BUF_POOL_RMA]); + } + + static inline void +@@ -562,45 +1085,51 @@ rxm_rma_buf_release(struct rxm_ep *rxm_ep, struct rxm_rma_buf *rx_buf) + (struct rxm_buf *)rx_buf); + } + +-#define rxm_entry_pop(queue, entry) \ +- do { \ +- fastlock_acquire(&queue->lock); \ +- entry = freestack_isempty(queue->fs) ? \ +- NULL : freestack_pop(queue->fs);\ +- fastlock_release(&queue->lock); \ +- } while (0) ++static inline ++struct rxm_tx_atomic_buf *rxm_tx_atomic_buf_alloc(struct rxm_ep *rxm_ep) ++{ ++ return (struct rxm_tx_atomic_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_ATOMIC); ++} + +-#define rxm_entry_push(queue, entry) \ +- do { \ +- fastlock_acquire(&queue->lock); \ +- freestack_push(queue->fs, entry); \ +- fastlock_release(&queue->lock); \ +- } while (0) ++static inline struct rxm_recv_entry *rxm_recv_entry_get(struct rxm_recv_queue *queue) ++{ ++ return (freestack_isempty(queue->fs) ? ++ NULL : freestack_pop(queue->fs)); ++} ++ ++static inline void ++rxm_recv_entry_release(struct rxm_recv_queue *queue, struct rxm_recv_entry *entry) ++{ ++ entry->total_len = 0; ++ freestack_push(queue->fs, entry); ++} ++ ++static inline int rxm_cq_write_recv_comp(struct rxm_rx_buf *rx_buf, ++ void *context, uint64_t flags, ++ size_t len, char *buf) ++{ ++ if (rx_buf->ep->rxm_info->caps & FI_SOURCE) ++ return ofi_cq_write_src(rx_buf->ep->util_ep.rx_cq, context, ++ flags, len, buf, rx_buf->pkt.hdr.data, ++ rx_buf->pkt.hdr.tag, ++ rx_buf->conn->handle.fi_addr); ++ else ++ return ofi_cq_write(rx_buf->ep->util_ep.rx_cq, context, ++ flags, len, buf, rx_buf->pkt.hdr.data, ++ rx_buf->pkt.hdr.tag); ++} + +-#define rxm_tx_entry_cleanup(entry) (entry)->tx_buf = NULL +-#define rxm_recv_entry_cleanup(entry) (entry)->total_len = 0 +- +-#define RXM_DEFINE_QUEUE_ENTRY(type, queue_type) \ +-static inline struct rxm_ ## type ## _entry * \ +-rxm_ ## type ## _entry_get(struct rxm_ ## queue_type ## _queue *queue) \ +-{ \ +- struct rxm_ ## type ## _entry *entry; \ +- rxm_entry_pop(queue, entry); \ +- if (!entry) { \ +- FI_WARN(&rxm_prov, FI_LOG_CQ, \ +- "Exhausted " #type "_entry freestack\n"); \ +- return NULL; \ +- } \ +- return entry; \ +-} \ +- \ +-static inline void \ +-rxm_ ## type ## _entry_release(struct rxm_ ## queue_type ## _queue *queue, \ +- struct rxm_ ## type ## _entry *entry) \ +-{ \ +- rxm_ ## type ## _entry_cleanup(entry); \ +- rxm_entry_push(queue, entry); \ +-} +- +-RXM_DEFINE_QUEUE_ENTRY(tx, send); +-RXM_DEFINE_QUEUE_ENTRY(recv, recv); ++static inline int ++rxm_cq_write_multi_recv_comp(struct rxm_ep *rxm_ep, struct rxm_recv_entry *recv_entry) ++{ ++ if (rxm_ep->rxm_info->caps & FI_SOURCE) ++ return ofi_cq_write_src(rxm_ep->util_ep.rx_cq, recv_entry->context, ++ FI_MULTI_RECV, recv_entry->multi_recv.len, ++ recv_entry->multi_recv.buf, 0, 0, ++ recv_entry->addr); ++ else ++ return ofi_cq_write(rxm_ep->util_ep.rx_cq, recv_entry->context, ++ FI_MULTI_RECV, recv_entry->multi_recv.len, ++ recv_entry->multi_recv.buf, 0, 0); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_atomic.c +new file mode 100644 +index 000000000..ce7c58cce +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_atomic.c +@@ -0,0 +1,507 @@ ++/* ++ * Copyright (c) 2018 Cray Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++ ++#include "rxm.h" ++ ++static void ++rxm_ep_format_atomic_pkt_hdr(struct rxm_conn *rxm_conn, ++ struct rxm_tx_atomic_buf *tx_buf, size_t data_len, ++ uint32_t pkt_op, enum fi_datatype datatype, ++ uint8_t atomic_op, uint64_t flags, uint64_t data, ++ const struct fi_rma_ioc *rma_ioc, size_t rma_ioc_count) ++{ ++ struct rxm_atomic_hdr *atomic_hdr; ++ ++ atomic_hdr = (struct rxm_atomic_hdr *)tx_buf->pkt.data; ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, pkt_op, data, 0, ++ flags, &tx_buf->pkt); ++ tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_atomic; ++ tx_buf->pkt.hdr.op = pkt_op; ++ tx_buf->pkt.hdr.atomic.datatype = datatype; ++ tx_buf->pkt.hdr.atomic.op = atomic_op; ++ tx_buf->pkt.hdr.atomic.ioc_count = rma_ioc_count; ++ if (rma_ioc_count) ++ memcpy(atomic_hdr->rma_ioc, rma_ioc, ++ rma_ioc_count * sizeof(struct fi_rma_ioc)); ++ tx_buf->flags = flags; ++} ++ ++static inline int ++rxm_ep_send_atomic_req(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ struct rxm_tx_atomic_buf *tx_buf, uint64_t len) ++{ ++ int ret; ++ ++ /* Atomic request TX completion processing is performed when the ++ * software generated atomic response message is received. */ ++ tx_buf->hdr.state = RXM_ATOMIC_RESP_WAIT; ++ if (len <= rxm_ep->inject_limit) ++ ret = fi_inject(rxm_conn->msg_ep, &tx_buf->pkt, len, 0); ++ else ++ ret = fi_send(rxm_conn->msg_ep, &tx_buf->pkt, len, ++ tx_buf->hdr.desc, 0, tx_buf); ++ if (ret == -FI_EAGAIN) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ ++ return ret; ++} ++ ++static ssize_t ++rxm_ep_atomic_common(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const struct fi_msg_atomic *msg, const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_iov_count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_iov_count, uint32_t op, uint64_t flags) ++{ ++ struct rxm_tx_atomic_buf *tx_buf; ++ struct rxm_atomic_hdr *atomic_hdr; ++ struct iovec buf_iov[RXM_IOV_LIMIT]; ++ struct iovec cmp_iov[RXM_IOV_LIMIT]; ++ size_t datatype_sz = ofi_datatype_size(msg->datatype); ++ size_t buf_len = 0; ++ size_t cmp_len = 0; ++ size_t tot_len; ++ ssize_t ret; ++ ++ assert(msg->iov_count <= RXM_IOV_LIMIT && ++ msg->rma_iov_count <= RXM_IOV_LIMIT); ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "Atomic with remote CQ data not supported\n"); ++ return -FI_EINVAL; ++ } ++ ++ if (msg->op != FI_ATOMIC_READ) { ++ assert(msg->msg_iov); ++ ofi_ioc_to_iov(msg->msg_iov, buf_iov, msg->iov_count, ++ datatype_sz); ++ buf_len = ofi_total_iov_len(buf_iov, msg->iov_count); ++ } ++ ++ if (op == ofi_op_atomic_compare) { ++ assert(comparev); ++ ofi_ioc_to_iov(comparev, cmp_iov, compare_iov_count, ++ datatype_sz); ++ cmp_len = ofi_total_iov_len(cmp_iov, compare_iov_count); ++ assert(buf_len == cmp_len); ++ } ++ ++ tot_len = buf_len + cmp_len + sizeof(struct rxm_atomic_hdr) + ++ sizeof(struct rxm_pkt); ++ ++ if (tot_len > rxm_ep->eager_limit) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "atomic data too large %" PRId64 "\n", tot_len); ++ return -FI_EINVAL; ++ } ++ ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ tx_buf = (struct rxm_tx_atomic_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_ATOMIC); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from Atomic buffer pool\n"); ++ ret = -FI_EAGAIN; ++ goto unlock; ++ } ++ ++ rxm_ep_format_atomic_pkt_hdr(rxm_conn, tx_buf, tot_len, op, ++ msg->datatype, msg->op, flags, msg->data, ++ msg->rma_iov, msg->rma_iov_count); ++ tx_buf->pkt.ctrl_hdr.msg_id = rxm_tx_buf_2_msg_id(rxm_ep, ++ RXM_BUF_POOL_TX_ATOMIC, tx_buf); ++ tx_buf->app_context = msg->context; ++ ++ atomic_hdr = (struct rxm_atomic_hdr *) tx_buf->pkt.data; ++ ++ ofi_copy_from_iov(atomic_hdr->data, buf_len, buf_iov, ++ msg->iov_count, 0); ++ if (cmp_len) ++ ofi_copy_from_iov(atomic_hdr->data + buf_len, cmp_len, ++ cmp_iov, compare_iov_count, 0); ++ ++ tx_buf->result_iov_count = result_iov_count; ++ if (resultv) ++ ofi_ioc_to_iov(resultv, tx_buf->result_iov, result_iov_count, ++ datatype_sz); ++ ++ ret = rxm_ep_send_atomic_req(rxm_ep, rxm_conn, tx_buf, tot_len); ++ if (ret) ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, tx_buf); ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; ++} ++ ++static ssize_t ++rxm_ep_atomic_writemsg(struct fid_ep *ep_fid, const struct fi_msg_atomic *msg, ++ uint64_t flags) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_atomic_common(rxm_ep, rxm_conn, msg, NULL, NULL, 0, ++ NULL, NULL, 0, ofi_op_atomic, ++ flags | rxm_ep_tx_flags(rxm_ep)); ++} ++ ++static ssize_t ++rxm_ep_atomic_writev(struct fid_ep *ep_fid, const struct fi_ioc *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_rma_ioc rma_iov = { ++ .addr = addr, ++ .count = ofi_total_ioc_cnt(iov, count), ++ .key = key, ++ }; ++ struct fi_msg_atomic msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .datatype = datatype, ++ .op = op, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return rxm_ep_atomic_writemsg(ep_fid, &msg, 0); ++} ++ ++static ssize_t ++rxm_ep_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ const struct fi_ioc iov = { ++ .addr = (void *) buf, ++ .count = count, ++ }; ++ ++ return rxm_ep_atomic_writev(ep_fid, &iov, &desc, 1, dest_addr, addr, ++ key, datatype, op, context); ++} ++ ++static ssize_t ++rxm_ep_atomic_inject(struct fid_ep *ep_fid, const void *buf, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op) ++{ ++ struct fi_ioc msg_iov = { ++ .addr = (void *) buf, ++ .count = count, ++ }; ++ struct fi_rma_ioc rma_iov = { ++ .addr = addr, ++ .count = count, ++ .key = key, ++ }; ++ struct fi_msg_atomic msg = { ++ .msg_iov = &msg_iov, ++ .desc = NULL, ++ .iov_count = 1, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .datatype = datatype, ++ .op = op, ++ .context = NULL, ++ .data = 0, ++ }; ++ ++ return rxm_ep_atomic_writemsg(ep_fid, &msg, FI_INJECT); ++} ++ ++static ssize_t ++rxm_ep_atomic_readwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_atomic_common(rxm_ep, rxm_conn, msg, NULL, NULL, 0, ++ resultv, result_desc, result_count, ++ ofi_op_atomic_fetch, ++ flags | rxm_ep_tx_flags(rxm_ep)); ++} ++ ++static ssize_t ++rxm_ep_atomic_readwritev(struct fid_ep *ep_fid, const struct fi_ioc *iov, ++ void **desc, size_t count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_rma_ioc rma_iov = { ++ .addr = addr, ++ .count = ofi_total_ioc_cnt(iov, count), ++ .key = key, ++ }; ++ struct fi_msg_atomic msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .datatype = datatype, ++ .op = op, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return rxm_ep_atomic_readwritemsg(ep_fid, &msg, resultv, result_desc, ++ result_count, 0); ++} ++ ++static ssize_t ++rxm_ep_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_ioc iov = { ++ .addr = (op == FI_ATOMIC_READ) ? NULL : (void *) buf, ++ .count = count, ++ }; ++ struct fi_ioc result_iov = { ++ .addr = result, ++ .count = count, ++ }; ++ ++ if (!buf && op != FI_ATOMIC_READ) ++ return -FI_EINVAL; ++ ++ return rxm_ep_atomic_readwritev(ep_fid, &iov, &desc, 1, &result_iov, ++ &result_desc, 1, dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++static ssize_t ++rxm_ep_atomic_compwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, void **compare_desc, ++ size_t compare_count, struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_atomic_common(rxm_ep, rxm_conn, msg, comparev, ++ compare_desc, compare_count, resultv, ++ result_desc, result_count, ++ ofi_op_atomic_compare, ++ flags | rxm_ep_tx_flags(rxm_ep)); ++} ++ ++static ssize_t ++rxm_ep_atomic_compwritev(struct fid_ep *ep_fid, const struct fi_ioc *iov, ++ void **desc, size_t count, const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_rma_ioc rma_iov = { ++ .addr = addr, ++ .count = ofi_total_ioc_cnt(iov, count), ++ .key = key, ++ }; ++ struct fi_msg_atomic msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .datatype = datatype, ++ .op = op, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return rxm_ep_atomic_compwritemsg(ep_fid, &msg, comparev, compare_desc, ++ compare_count, resultv, result_desc, ++ result_count, 0); ++} ++ ++static ssize_t ++rxm_ep_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, const void *compare, void *compare_desc, ++ void *result, void *result_desc, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_ioc iov = { ++ .addr = (void *) buf, ++ .count = count, ++ }; ++ struct fi_ioc resultv = { ++ .addr = result, ++ .count = count, ++ }; ++ struct fi_ioc comparev = { ++ .addr = (void *) compare, ++ .count = count, ++ }; ++ ++ return rxm_ep_atomic_compwritev(ep_fid, &iov, &desc, 1, ++ &comparev, &compare_desc, 1, ++ &resultv, &result_desc, 1, ++ dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++int rxm_ep_query_atomic(struct fid_domain *domain, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, ++ uint64_t flags) ++{ ++ struct rxm_domain *rxm_domain = container_of(domain, ++ struct rxm_domain, ++ util_domain.domain_fid); ++ size_t tot_size; ++ int ret; ++ ++ if (flags & FI_TAGGED) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "tagged atomic op not supported\n"); ++ return -FI_EINVAL; ++ } ++ ++ ret = ofi_atomic_valid(&rxm_prov, datatype, op, flags); ++ if (ret || !attr) ++ return ret; ++ ++ tot_size = flags & FI_COMPARE_ATOMIC ? ++ rxm_domain->max_atomic_size / 2 : rxm_domain->max_atomic_size; ++ attr->size = ofi_datatype_size(datatype); ++ attr->count = tot_size / attr->size; ++ ++ return FI_SUCCESS; ++} ++ ++static int rxm_ep_atomic_valid(struct fid_ep *ep_fid, enum fi_datatype datatype, ++ enum fi_op op, size_t *count) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid); ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxm_ep_query_atomic(&rxm_ep->util_ep.domain->domain_fid, ++ datatype, op, &attr, 0); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++static int rxm_ep_atomic_fetch_valid(struct fid_ep *ep_fid, ++ enum fi_datatype datatype, enum fi_op op, ++ size_t *count) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid); ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxm_ep_query_atomic(&rxm_ep->util_ep.domain->domain_fid, ++ datatype, op, &attr, FI_FETCH_ATOMIC); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++static int rxm_ep_atomic_cswap_valid(struct fid_ep *ep_fid, ++ enum fi_datatype datatype, enum fi_op op, ++ size_t *count) ++{ ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid); ++ struct fi_atomic_attr attr; ++ int ret; ++ ++ ret = rxm_ep_query_atomic(&rxm_ep->util_ep.domain->domain_fid, ++ datatype, op, &attr, FI_COMPARE_ATOMIC); ++ if (!ret) ++ *count = attr.count; ++ ++ return ret; ++} ++ ++struct fi_ops_atomic rxm_ops_atomic = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = rxm_ep_atomic_write, ++ .writev = rxm_ep_atomic_writev, ++ .writemsg = rxm_ep_atomic_writemsg, ++ .inject = rxm_ep_atomic_inject, ++ .readwrite = rxm_ep_atomic_readwrite, ++ .readwritev = rxm_ep_atomic_readwritev, ++ .readwritemsg = rxm_ep_atomic_readwritemsg, ++ .compwrite = rxm_ep_atomic_compwrite, ++ .compwritev = rxm_ep_atomic_compwritev, ++ .compwritemsg = rxm_ep_atomic_compwritemsg, ++ .writevalid = rxm_ep_atomic_valid, ++ .readwritevalid = rxm_ep_atomic_fetch_valid, ++ .compwritevalid = rxm_ep_atomic_cswap_valid, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_attr.c +index eb2fd93fc..0c4f6c992 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_attr.c +@@ -32,9 +32,9 @@ + + #include "rxm.h" + +-#define RXM_EP_CAPS (FI_MSG | FI_RMA | FI_TAGGED | FI_DIRECTED_RECV | \ +- FI_READ | FI_WRITE | FI_RECV | FI_SEND | \ +- FI_REMOTE_READ | FI_REMOTE_WRITE | FI_SOURCE) ++#define RXM_EP_CAPS (FI_MSG | FI_RMA | FI_TAGGED | FI_ATOMIC | \ ++ FI_DIRECTED_RECV | FI_READ | FI_WRITE | FI_RECV | \ ++ FI_SEND | FI_REMOTE_READ | FI_REMOTE_WRITE | FI_SOURCE) + + #define RXM_DOMAIN_CAPS (FI_LOCAL_COMM | FI_REMOTE_COMM) + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_av.c +new file mode 100644 +index 000000000..6ae0b7ccb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_av.c +@@ -0,0 +1,203 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "rxm.h" ++ ++static int rxm_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, ++ size_t count, uint64_t flags) ++{ ++ struct util_av *av = container_of(av_fid, struct util_av, av_fid); ++ struct rxm_ep *rxm_ep; ++ int i, ret; ++ ++ /* This should be before ofi_ip_av_remove as we need to know ++ * fi_addr -> addr mapping when moving handle to peer list. */ ++ dlist_foreach_container(&av->ep_list, struct rxm_ep, ++ rxm_ep, util_ep.av_entry) { ++ for (i = 0; i < count; i++) { ++ if (!rxm_ep->cmap->handles_av[fi_addr[i]]) ++ continue; ++ /* TODO this is not optimal. Replace this with something ++ * more deterministic: delete handle if we know that peer ++ * isn't actively communicating with us ++ */ ++ ret = rxm_cmap_move_handle_to_peer_list(rxm_ep->cmap, i); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_DOMAIN, ++ "Unable to move handle to " ++ "peer list. Deleting it.\n"); ++ rxm_cmap_del_handle_ts(rxm_ep->cmap->handles_av[i]); ++ return ret; ++ } ++ } ++ } ++ ++ return ofi_ip_av_remove(av_fid, fi_addr, count, flags); ++} ++ ++static int ++rxm_av_insert_cmap(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags) ++{ ++ struct util_av *av = container_of(av_fid, struct util_av, av_fid); ++ struct rxm_ep *rxm_ep; ++ fi_addr_t fi_addr_tmp; ++ size_t i; ++ int ret = 0; ++ const void *cur_addr; ++ ++ dlist_foreach_container(&av->ep_list, struct rxm_ep, ++ rxm_ep, util_ep.av_entry) { ++ for (i = 0; i < count; i++) { ++ cur_addr = (const void *) ((char *) addr + i * av->addrlen); ++ fi_addr_tmp = (fi_addr ? fi_addr[i] : ++ ofi_av_lookup_fi_addr(av, cur_addr)); ++ if (fi_addr_tmp == FI_ADDR_NOTAVAIL) ++ continue; ++ ret = rxm_cmap_update(rxm_ep->cmap, cur_addr, fi_addr_tmp); ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_AV, ++ "Unable to update CM for OFI endpoints\n"); ++ return ret; ++ } ++ } ++ } ++ return 0; ++} ++ ++static int rxm_av_insert(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ struct util_av *av = container_of(av_fid, struct util_av, av_fid); ++ int ret, retv; ++ ++ ret = ofi_ip_av_insert(av_fid, addr, count, fi_addr, flags, context); ++ if (ret < 0) ++ return ret; ++ ++ if (!av->eq && !ret) ++ return ret; ++ ++ retv = rxm_av_insert_cmap(av_fid, addr, count, fi_addr, flags); ++ if (retv) { ++ ret = rxm_av_remove(av_fid, fi_addr, count, flags); ++ if (ret) ++ FI_WARN(&rxm_prov, FI_LOG_AV, "Failed to remove addr " ++ "from AV during error handling\n"); ++ return retv; ++ } ++ return ret; ++} ++ ++static int rxm_av_insertsym(struct fid_av *av_fid, const char *node, ++ size_t nodecnt, const char *service, size_t svccnt, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ struct util_av *av = container_of(av_fid, struct util_av, av_fid); ++ void *addr; ++ size_t addrlen, count = nodecnt * svccnt; ++ int ret, retv; ++ ++ ret = ofi_verify_av_insert(av, flags); ++ if (ret) ++ return ret; ++ ++ ret = ofi_ip_av_sym_getaddr(av, node, nodecnt, service, ++ svccnt, &addr, &addrlen); ++ if (ret <= 0) ++ return ret; ++ ++ assert(ret == count); ++ ++ ret = ofi_ip_av_insertv(av, addr, addrlen, count, fi_addr, context); ++ if (ret < 0) ++ goto out; ++ ++ if (!av->eq && !ret) ++ goto out; ++ ++ retv = rxm_av_insert_cmap(av_fid, addr, count, fi_addr, flags); ++ if (retv) { ++ ret = rxm_av_remove(av_fid, fi_addr, count, flags); ++ if (ret) ++ FI_WARN(&rxm_prov, FI_LOG_AV, "Failed to remove addr " ++ "from AV during error handling\n"); ++ ret = retv; ++ } ++out: ++ free(addr); ++ return ret; ++ ++} ++ ++int rxm_av_insertsvc(struct fid_av *av, const char *node, const char *service, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ return rxm_av_insertsym(av, node, 1, service, 1, fi_addr, flags, context); ++} ++ ++static const char * ++rxm_av_straddr(struct fid_av *av_fid, const void *addr, char *buf, size_t *len) ++{ ++ return ofi_ip_av_straddr(av_fid, addr, buf, len); ++} ++ ++int rxm_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, ++ void *addr, size_t *addrlen) ++{ ++ return ofi_ip_av_lookup(av_fid, fi_addr, addr, addrlen); ++} ++ ++ ++static struct fi_ops_av rxm_av_ops = { ++ .size = sizeof(struct fi_ops_av), ++ .insert = rxm_av_insert, ++ .insertsvc = rxm_av_insertsvc, ++ .insertsym = rxm_av_insertsym, ++ .remove = rxm_av_remove, ++ .lookup = rxm_av_lookup, ++ .straddr = rxm_av_straddr, ++}; ++ ++int rxm_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context) ++{ ++ int ret; ++ ++ ret = ofi_ip_av_create(domain_fid, attr, av, context); ++ if (ret) ++ return ret; ++ ++ (*av)->ops = &rxm_av_ops; ++ return 0; ++} ++ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_conn.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_conn.c +index 0d1af1d0c..adb62895d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_conn.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_conn.c +@@ -37,6 +37,797 @@ + #include + #include "rxm.h" + ++static struct rxm_cmap_handle *rxm_conn_alloc(struct rxm_cmap *cmap); ++static void rxm_conn_connected_handler(struct rxm_cmap_handle *handle); ++static void rxm_conn_close_saved(struct rxm_cmap_handle *handle); ++static void rxm_conn_close(struct rxm_cmap_handle *handle); ++static void rxm_conn_save(struct rxm_cmap_handle *handle); ++static int ++rxm_conn_connect(struct util_ep *util_ep, struct rxm_cmap_handle *handle, ++ const void *addr, size_t addrlen); ++static int rxm_conn_signal(struct util_ep *util_ep, void *context, ++ enum rxm_cmap_signal signal); ++static void ++rxm_conn_av_updated_handler(struct rxm_cmap_handle *handle); ++static void *rxm_conn_progress(void *arg); ++static void *rxm_conn_eq_read(void *arg); ++ ++ ++/* ++ * Connection map ++ */ ++ ++/* Caller should hold cmap->lock */ ++static void rxm_cmap_set_key(struct rxm_cmap_handle *handle) ++{ ++ handle->key = ofi_idx2key(&handle->cmap->key_idx, ++ ofi_idx_insert(&handle->cmap->handles_idx, handle)); ++} ++ ++/* Caller should hold cmap->lock */ ++static void rxm_cmap_clear_key(struct rxm_cmap_handle *handle) ++{ ++ int index = ofi_key2idx(&handle->cmap->key_idx, handle->key); ++ ++ if (!ofi_idx_is_valid(&handle->cmap->handles_idx, index)) ++ FI_WARN(handle->cmap->av->prov, FI_LOG_AV, "Invalid key!\n"); ++ else ++ ofi_idx_remove(&handle->cmap->handles_idx, index); ++} ++ ++struct rxm_cmap_handle *rxm_cmap_key2handle(struct rxm_cmap *cmap, uint64_t key) ++{ ++ struct rxm_cmap_handle *handle; ++ ++ cmap->acquire(&cmap->lock); ++ if (!(handle = ofi_idx_lookup(&cmap->handles_idx, ++ ofi_key2idx(&cmap->key_idx, key)))) { ++ FI_WARN(cmap->av->prov, FI_LOG_AV, "Invalid key!\n"); ++ } else { ++ if (handle->key != key) { ++ FI_WARN(cmap->av->prov, FI_LOG_AV, ++ "handle->key not matching given key\n"); ++ handle = NULL; ++ } ++ } ++ cmap->release(&cmap->lock); ++ return handle; ++} ++ ++/* Caller must hold cmap->lock */ ++static void rxm_cmap_init_handle(struct rxm_cmap_handle *handle, ++ struct rxm_cmap *cmap, ++ enum rxm_cmap_state state, ++ fi_addr_t fi_addr, ++ struct rxm_cmap_peer *peer) ++{ ++ handle->cmap = cmap; ++ handle->state = state; ++ rxm_cmap_set_key(handle); ++ handle->fi_addr = fi_addr; ++ handle->peer = peer; ++} ++ ++static int rxm_cmap_match_peer(struct dlist_entry *entry, const void *addr) ++{ ++ struct rxm_cmap_peer *peer; ++ ++ peer = container_of(entry, struct rxm_cmap_peer, entry); ++ return !memcmp(peer->addr, addr, peer->handle->cmap->av->addrlen); ++} ++ ++/* Caller must hold cmap->lock */ ++static int rxm_cmap_del_handle(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_cmap *cmap = handle->cmap; ++ int ret; ++ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Deleting connection handle: %p\n", handle); ++ if (handle->peer) { ++ dlist_remove(&handle->peer->entry); ++ free(handle->peer); ++ handle->peer = NULL; ++ } else { ++ cmap->handles_av[handle->fi_addr] = 0; ++ } ++ rxm_cmap_clear_key(handle); ++ ++ handle->state = RXM_CMAP_SHUTDOWN; ++ /* Signal CM thread to delete the handle. This is required ++ * so that the CM thread handles any pending events for this ++ * ep correctly. Handle would be freed finally after processing the ++ * events */ ++ ret = rxm_conn_signal(cmap->ep, handle, RXM_CMAP_FREE); ++ if (ret) { ++ FI_WARN(cmap->av->prov, FI_LOG_FABRIC, ++ "Unable to signal CM thread\n"); ++ return ret; ++ } ++ return 0; ++} ++ ++static inline int ++rxm_cmap_check_and_realloc_handles_table(struct rxm_cmap *cmap, ++ fi_addr_t fi_addr) ++{ ++ void *new_handles; ++ size_t grow_size; ++ ++ if (OFI_LIKELY(fi_addr < cmap->num_allocated)) ++ return 0; ++ ++ grow_size = MAX(cmap->av->count, fi_addr - cmap->num_allocated + 1); ++ ++ new_handles = realloc(cmap->handles_av, ++ (grow_size + cmap->num_allocated) * ++ sizeof(*cmap->handles_av)); ++ if (OFI_LIKELY(!new_handles)) ++ return -FI_ENOMEM; ++ ++ cmap->handles_av = new_handles; ++ memset(&cmap->handles_av[cmap->num_allocated], 0, ++ sizeof(*cmap->handles_av) * grow_size); ++ cmap->num_allocated += grow_size; ++ return 0; ++} ++ ++void rxm_cmap_del_handle_ts(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_cmap *cmap = handle->cmap; ++ cmap->acquire(&cmap->lock); ++ rxm_cmap_del_handle(handle); ++ cmap->release(&cmap->lock); ++} ++ ++static struct rxm_pkt * ++rxm_conn_inject_pkt_alloc(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ uint8_t op, uint64_t flags) ++{ ++ struct rxm_pkt *inject_pkt; ++ int ret = ofi_memalign((void **) &inject_pkt, 16, ++ rxm_ep->inject_limit + sizeof(*inject_pkt)); ++ ++ if (ret) ++ return NULL; ++ ++ memset(inject_pkt, 0, rxm_ep->inject_limit + sizeof(*inject_pkt)); ++ inject_pkt->ctrl_hdr.version = RXM_CTRL_VERSION; ++ inject_pkt->ctrl_hdr.type = ofi_ctrl_data; ++ inject_pkt->hdr.version = OFI_OP_VERSION; ++ inject_pkt->hdr.op = op; ++ inject_pkt->hdr.flags = flags; ++ ++ return inject_pkt; ++} ++static void rxm_conn_res_free(struct rxm_conn *rxm_conn) ++{ ++ ofi_freealign(rxm_conn->inject_pkt); ++ rxm_conn->inject_pkt = NULL; ++ ofi_freealign(rxm_conn->inject_data_pkt); ++ rxm_conn->inject_data_pkt = NULL; ++ ofi_freealign(rxm_conn->tinject_pkt); ++ rxm_conn->tinject_pkt = NULL; ++ ofi_freealign(rxm_conn->tinject_data_pkt); ++ rxm_conn->tinject_data_pkt = NULL; ++} ++static int rxm_conn_res_alloc(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn) ++{ ++ dlist_init(&rxm_conn->deferred_conn_entry); ++ dlist_init(&rxm_conn->deferred_tx_queue); ++ dlist_init(&rxm_conn->sar_rx_msg_list); ++ ++ if (rxm_ep->util_ep.domain->threading != FI_THREAD_SAFE) { ++ rxm_conn->inject_pkt = ++ rxm_conn_inject_pkt_alloc(rxm_ep, rxm_conn, ++ ofi_op_msg, 0); ++ rxm_conn->inject_data_pkt = ++ rxm_conn_inject_pkt_alloc(rxm_ep, rxm_conn, ++ ofi_op_msg, FI_REMOTE_CQ_DATA); ++ rxm_conn->tinject_pkt = ++ rxm_conn_inject_pkt_alloc(rxm_ep, rxm_conn, ++ ofi_op_tagged, 0); ++ rxm_conn->tinject_data_pkt = ++ rxm_conn_inject_pkt_alloc(rxm_ep, rxm_conn, ++ ofi_op_tagged, FI_REMOTE_CQ_DATA); ++ ++ if (!rxm_conn->inject_pkt || !rxm_conn->inject_data_pkt || ++ !rxm_conn->tinject_pkt || !rxm_conn->tinject_data_pkt) { ++ rxm_conn_res_free(rxm_conn); ++ return -FI_ENOMEM; ++ } ++ } ++ ++ return 0; ++} ++ ++static void rxm_conn_free(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ ++ /* This handles case when saved_msg_ep wasn't closed */ ++ if (rxm_conn->saved_msg_ep) { ++ if (fi_close(&rxm_conn->saved_msg_ep->fid)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to close saved msg_ep\n"); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closed saved msg_ep\n"); ++ } ++ rxm_conn->saved_msg_ep = NULL; ++ } ++ ++ if (!rxm_conn->msg_ep) ++ return; ++ /* Assuming fi_close also shuts down the connection gracefully if the ++ * endpoint is in connected state */ ++ if (fi_close(&rxm_conn->msg_ep->fid)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to close msg_ep\n"); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closed msg_ep\n"); ++ } ++ rxm_conn->msg_ep = NULL; ++ ++ rxm_conn_res_free(rxm_conn); ++ ++ free(container_of(handle, struct rxm_conn, handle)); ++} ++ ++/* Caller must hold cmap->lock */ ++static int rxm_cmap_alloc_handle(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ enum rxm_cmap_state state, ++ struct rxm_cmap_handle **handle) ++{ ++ int ret; ++ ++ *handle = rxm_conn_alloc(cmap); ++ if (OFI_UNLIKELY(!*handle)) ++ return -FI_ENOMEM; ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Allocated handle: %p for fi_addr: %" PRIu64 "\n", ++ *handle, fi_addr); ++ ret = rxm_cmap_check_and_realloc_handles_table(cmap, fi_addr); ++ if (OFI_UNLIKELY(ret)) { ++ rxm_conn_free(*handle); ++ return ret; ++ } ++ rxm_cmap_init_handle(*handle, cmap, state, fi_addr, NULL); ++ cmap->handles_av[fi_addr] = *handle; ++ return 0; ++} ++ ++/* Caller must hold cmap->lock */ ++static int rxm_cmap_alloc_handle_peer(struct rxm_cmap *cmap, void *addr, ++ enum rxm_cmap_state state, ++ struct rxm_cmap_handle **handle) ++{ ++ struct rxm_cmap_peer *peer; ++ ++ peer = calloc(1, sizeof(*peer) + cmap->av->addrlen); ++ if (!peer) ++ return -FI_ENOMEM; ++ *handle = rxm_conn_alloc(cmap); ++ if (!*handle) { ++ free(peer); ++ return -FI_ENOMEM; ++ } ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_AV, "Allocated handle for addr", ++ addr); ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "handle: %p\n", *handle); ++ rxm_cmap_init_handle(*handle, cmap, state, FI_ADDR_NOTAVAIL, peer); ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Adding handle to peer list\n"); ++ peer->handle = *handle; ++ memcpy(peer->addr, addr, cmap->av->addrlen); ++ dlist_insert_tail(&peer->entry, &cmap->peer_list); ++ return 0; ++} ++ ++/* Caller must hold cmap->lock */ ++static struct rxm_cmap_handle * ++rxm_cmap_get_handle_peer(struct rxm_cmap *cmap, const void *addr) ++{ ++ struct rxm_cmap_peer *peer; ++ struct dlist_entry *entry; ++ ++ entry = dlist_find_first_match(&cmap->peer_list, rxm_cmap_match_peer, ++ addr); ++ if (!entry) ++ return NULL; ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_AV, ++ "handle found in peer list for addr", addr); ++ peer = container_of(entry, struct rxm_cmap_peer, entry); ++ return peer->handle; ++} ++ ++int rxm_cmap_move_handle_to_peer_list(struct rxm_cmap *cmap, int index) ++{ ++ struct rxm_cmap_handle *handle; ++ int ret = 0; ++ ++ cmap->acquire(&cmap->lock); ++ handle = cmap->handles_av[index]; ++ if (!handle) ++ goto unlock; ++ ++ handle->peer = calloc(1, sizeof(*handle->peer) + cmap->av->addrlen); ++ if (!handle->peer) { ++ ret = -FI_ENOMEM; ++ goto unlock; ++ } ++ handle->fi_addr = FI_ADDR_NOTAVAIL; ++ cmap->handles_av[index] = NULL; ++ handle->peer->handle = handle; ++ memcpy(handle->peer->addr, ofi_av_get_addr(cmap->av, index), ++ cmap->av->addrlen); ++ dlist_insert_tail(&handle->peer->entry, &cmap->peer_list); ++unlock: ++ cmap->release(&cmap->lock); ++ return ret; ++} ++ ++/* Caller must hold cmap->lock */ ++static int rxm_cmap_move_handle(struct rxm_cmap_handle *handle, ++ fi_addr_t fi_addr) ++{ ++ int ret; ++ ++ dlist_remove(&handle->peer->entry); ++ free(handle->peer); ++ handle->peer = NULL; ++ handle->fi_addr = fi_addr; ++ ret = rxm_cmap_check_and_realloc_handles_table(handle->cmap, fi_addr); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ handle->cmap->handles_av[fi_addr] = handle; ++ return 0; ++} ++ ++int rxm_cmap_update(struct rxm_cmap *cmap, const void *addr, fi_addr_t fi_addr) ++{ ++ struct rxm_cmap_handle *handle; ++ int ret; ++ ++ cmap->acquire(&cmap->lock); ++ /* Check whether we have already allocated a handle for this `fi_addr`. */ ++ /* We rely on the fact that `ofi_ip_av_insert`/`ofi_av_insert_addr` returns ++ * the same `fi_addr` for the equal addresses */ ++ if (fi_addr < cmap->num_allocated) { ++ handle = rxm_cmap_acquire_handle(cmap, fi_addr); ++ if (handle) { ++ cmap->release(&cmap->lock); ++ return 0; ++ } ++ } ++ ++ handle = rxm_cmap_get_handle_peer(cmap, addr); ++ if (!handle) { ++ ret = rxm_cmap_alloc_handle(cmap, fi_addr, ++ RXM_CMAP_IDLE, &handle); ++ cmap->release(&cmap->lock); ++ return ret; ++ } ++ ret = rxm_cmap_move_handle(handle, fi_addr); ++ cmap->release(&cmap->lock); ++ if (ret) ++ return ret; ++ ++ rxm_conn_av_updated_handler(handle); ++ return 0; ++} ++ ++void rxm_cmap_process_shutdown(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle) ++{ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing shutdown for handle: %p\n", handle); ++ cmap->acquire(&cmap->lock); ++ if (handle->state > RXM_CMAP_SHUTDOWN) { ++ FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Invalid handle on shutdown event\n"); ++ } else if (handle->state != RXM_CMAP_SHUTDOWN) { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Got remote shutdown\n"); ++ rxm_cmap_del_handle(handle); ++ } else { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Got local shutdown\n"); ++ } ++ cmap->release(&cmap->lock); ++} ++ ++/* Caller must hold cmap->lock */ ++void rxm_cmap_process_conn_notify(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle) ++{ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing connection notification for handle: %p.\n", handle); ++ handle->state = RXM_CMAP_CONNECTED; ++ rxm_conn_connected_handler(handle); ++} ++ ++/* Caller must hold cmap->lock */ ++void rxm_cmap_process_connect(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle, ++ uint64_t *remote_key) ++{ ++ struct rxm_conn *rxm_conn; ++ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing connect for handle: %p\n", handle); ++ handle->state = RXM_CMAP_CONNECTED_NOTIFY; ++ if (remote_key) ++ handle->remote_key = *remote_key; ++ ++ /* Set the remote key to the inject packets */ ++ if (cmap->ep->domain->threading != FI_THREAD_SAFE) { ++ rxm_conn = container_of(handle, struct rxm_conn, handle); ++ ++ rxm_conn->inject_pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ rxm_conn->inject_data_pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ rxm_conn->tinject_pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ rxm_conn->tinject_data_pkt->ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ } ++} ++ ++void rxm_cmap_process_reject(struct rxm_cmap *cmap, ++ struct rxm_cmap_handle *handle, ++ enum rxm_cmap_reject_flag cm_reject_flag) ++{ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing reject for handle: %p\n", handle); ++ cmap->acquire(&cmap->lock); ++ switch (handle->state) { ++ case RXM_CMAP_CONNREQ_RECV: ++ case RXM_CMAP_CONNECTED: ++ case RXM_CMAP_CONNECTED_NOTIFY: ++ /* Handle is being re-used for incoming connection request */ ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Connection handle is being re-used. Close saved connection\n"); ++ rxm_conn_close_saved(handle); ++ break; ++ case RXM_CMAP_CONNREQ_SENT: ++ if (cm_reject_flag == RXM_CMAP_REJECT_GENUINE) { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Deleting connection handle\n"); ++ rxm_cmap_del_handle(handle); ++ } else { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Connection handle is being re-used. Close the connection\n"); ++ rxm_conn_close(handle); ++ } ++ break; ++ case RXM_CMAP_SHUTDOWN: ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Connection handle already being deleted\n"); ++ break; ++ default: ++ FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, "Invalid cmap state: " ++ "%d when receiving connection reject\n", handle->state); ++ assert(0); ++ } ++ cmap->release(&cmap->lock); ++} ++ ++int rxm_cmap_process_connreq(struct rxm_cmap *cmap, void *addr, ++ struct rxm_cmap_handle **handle_ret, ++ enum rxm_cmap_reject_flag *cm_reject_flag) ++{ ++ struct rxm_cmap_handle *handle; ++ int ret = 0, cmp; ++ fi_addr_t fi_addr = ofi_ip_av_get_fi_addr(cmap->av, addr); ++ ++ /* Reset flag to initial state */ ++ *cm_reject_flag = RXM_CMAP_REJECT_GENUINE; ++ ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Processing connreq for addr", addr); ++ ++ cmap->acquire(&cmap->lock); ++ if (fi_addr == FI_ADDR_NOTAVAIL) ++ handle = rxm_cmap_get_handle_peer(cmap, addr); ++ else ++ handle = rxm_cmap_acquire_handle(cmap, fi_addr); ++ ++ if (!handle) { ++ if (fi_addr == FI_ADDR_NOTAVAIL) ++ ret = rxm_cmap_alloc_handle_peer(cmap, addr, ++ RXM_CMAP_CONNREQ_RECV, ++ &handle); ++ else ++ ret = rxm_cmap_alloc_handle(cmap, fi_addr, ++ RXM_CMAP_CONNREQ_RECV, ++ &handle); ++ if (ret) ++ goto unlock; ++ } ++ ++ switch (handle->state) { ++ case RXM_CMAP_CONNECTED_NOTIFY: ++ case RXM_CMAP_CONNECTED: ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Connection already present.\n"); ++ ret = -FI_EALREADY; ++ break; ++ case RXM_CMAP_CONNREQ_SENT: ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, "local_name", ++ cmap->attr.name); ++ ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, "remote_name", ++ addr); ++ ++ cmp = ofi_addr_cmp(cmap->av->prov, addr, cmap->attr.name); ++ ++ if (cmp < 0) { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Remote name lower than local name.\n"); ++ *cm_reject_flag = RXM_CMAP_REJECT_SIMULT_CONN; ++ ret = -FI_EALREADY; ++ break; ++ } else if (cmp > 0) { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Re-using handle: %p to accept remote " ++ "connection\n", handle); ++ /* Re-use handle. If it receives FI_REJECT the handle ++ * would not be deleted in this state */ ++ rxm_conn_save(handle); ++ } else { ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Endpoint connects to itself\n"); ++ ret = rxm_cmap_alloc_handle_peer(cmap, addr, ++ RXM_CMAP_CONNREQ_RECV, ++ &handle); ++ if (ret) ++ goto unlock; ++ assert(fi_addr != FI_ADDR_NOTAVAIL); ++ handle->fi_addr = fi_addr; ++ } ++ /* Fall through */ ++ case RXM_CMAP_IDLE: ++ handle->state = RXM_CMAP_CONNREQ_RECV; ++ /* Fall through */ ++ case RXM_CMAP_CONNREQ_RECV: ++ *handle_ret = handle; ++ break; ++ default: ++ FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Invalid cmap state\n"); ++ assert(0); ++ ret = -FI_EOPBADSTATE; ++ } ++unlock: ++ cmap->release(&cmap->lock); ++ return ret; ++} ++ ++/* Caller must hold `cmap::lock` */ ++int rxm_cmap_handle_connect(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ struct rxm_cmap_handle *handle) ++{ ++ int ret; ++ ++ if (handle->state == RXM_CMAP_CONNECTED_NOTIFY || ++ handle->state == RXM_CMAP_CONNECTED) ++ return FI_SUCCESS; ++ ++ switch (handle->state) { ++ case RXM_CMAP_IDLE: ++ ret = rxm_conn_connect(cmap->ep, handle, ++ ofi_av_get_addr(cmap->av, fi_addr), ++ cmap->av->addrlen); ++ if (ret) { ++ rxm_cmap_del_handle(handle); ++ return ret; ++ } ++ handle->state = RXM_CMAP_CONNREQ_SENT; ++ ret = -FI_EAGAIN; ++ // TODO sleep on event fd instead of busy polling ++ break; ++ case RXM_CMAP_CONNREQ_SENT: ++ case RXM_CMAP_CONNREQ_RECV: ++ case RXM_CMAP_ACCEPT: ++ case RXM_CMAP_SHUTDOWN: ++ ret = -FI_EAGAIN; ++ break; ++ default: ++ FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, ++ "Invalid cmap handle state\n"); ++ assert(0); ++ ret = -FI_EOPBADSTATE; ++ } ++ return ret; ++} ++ ++/* Caller must hold cmap->lock */ ++int rxm_cmap_handle_unconnected(struct rxm_ep *rxm_ep, struct rxm_cmap_handle *handle, ++ fi_addr_t dest_addr) ++{ ++ int ret; ++ ++ if (handle->state == RXM_CMAP_CONNECTED_NOTIFY) { ++ rxm_cmap_process_conn_notify(rxm_ep->cmap, handle); ++ return 0; ++ } ++ /* Since we handling unoonnected state and `cmap:lock` ++ * is on hold, it shouldn't return 0 */ ++ ret = rxm_cmap_handle_connect(rxm_ep->cmap, ++ dest_addr, handle); ++ if (OFI_UNLIKELY(ret != -FI_EAGAIN)) ++ return ret; ++ ++ return -FI_EAGAIN; ++} ++ ++int rxm_cmap_get_handle(struct rxm_cmap *cmap, fi_addr_t fi_addr, ++ struct rxm_cmap_handle **handle_ret) ++{ ++ int ret; ++ ++ cmap->acquire(&cmap->lock); ++ *handle_ret = rxm_cmap_acquire_handle(cmap, fi_addr); ++ if (OFI_UNLIKELY(!*handle_ret)) { ++ ret = -FI_EAGAIN; ++ goto unlock; ++ } ++ ++ ret = rxm_cmap_handle_connect(cmap, fi_addr, *handle_ret); ++unlock: ++ cmap->release(&cmap->lock); ++ return ret; ++} ++ ++static int rxm_cmap_cm_thread_close(struct rxm_cmap *cmap) ++{ ++ int ret; ++ ++ ret = rxm_conn_signal(cmap->ep, NULL, RXM_CMAP_EXIT); ++ if (ret) { ++ FI_WARN(cmap->av->prov, FI_LOG_FABRIC, ++ "Unable to signal CM thread\n"); ++ return ret; ++ } ++ /* Release lock so that CM thread could process shutdown events */ ++ cmap->release(&cmap->lock); ++ ret = pthread_join(cmap->cm_thread, NULL); ++ cmap->acquire(&cmap->lock); ++ if (ret) { ++ FI_WARN(cmap->av->prov, FI_LOG_FABRIC, ++ "Unable to join CM thread\n"); ++ return ret; ++ } ++ return 0; ++} ++ ++static int rxm_conn_cleanup(void *arg) ++{ ++ return rxm_conn_process_eq_events(container_of(arg, struct rxm_ep, ++ util_ep)); ++} ++ ++ ++void rxm_cmap_free(struct rxm_cmap *cmap) ++{ ++ struct rxm_cmap_peer *peer; ++ struct dlist_entry *entry; ++ size_t i; ++ ++ cmap->acquire(&cmap->lock); ++ FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Closing cmap\n"); ++ for (i = 0; i < cmap->num_allocated; i++) { ++ if (cmap->handles_av[i]) ++ rxm_cmap_del_handle(cmap->handles_av[i]); ++ } ++ while(!dlist_empty(&cmap->peer_list)) { ++ entry = cmap->peer_list.next; ++ peer = container_of(entry, struct rxm_cmap_peer, entry); ++ rxm_cmap_del_handle(peer->handle); ++ } ++ rxm_cmap_cm_thread_close(cmap); ++ cmap->release(&cmap->lock); ++ ++ /* cleanup function would be used in manual progress mode */ ++ if (cmap->ep->domain->data_progress != FI_PROGRESS_AUTO) ++ rxm_conn_cleanup(cmap->ep); ++ ++ free(cmap->handles_av); ++ free(cmap->attr.name); ++ ofi_idx_reset(&cmap->handles_idx); ++ if (!cmap->attr.serial_access) ++ fastlock_destroy(&cmap->lock); ++ free(cmap); ++} ++ ++static int ++rxm_cmap_update_addr(struct util_av *av, void *addr, ++ fi_addr_t fi_addr, void *arg) ++{ ++ return rxm_cmap_update((struct rxm_cmap *)arg, addr, fi_addr); ++} ++ ++int rxm_cmap_bind_to_av(struct rxm_cmap *cmap, struct util_av *av) ++{ ++ cmap->av = av; ++ return ofi_av_elements_iter(av, rxm_cmap_update_addr, (void *)cmap); ++} ++ ++int rxm_cmap_alloc(struct rxm_ep *rxm_ep, struct rxm_cmap_attr *attr) ++{ ++ struct rxm_cmap *cmap; ++ struct util_ep *ep = &rxm_ep->util_ep; ++ int ret; ++ ++ cmap = calloc(1, sizeof *cmap); ++ if (!cmap) ++ return -FI_ENOMEM; ++ ++ cmap->ep = ep; ++ cmap->av = ep->av; ++ ++ cmap->handles_av = calloc(cmap->av->count, sizeof(*cmap->handles_av)); ++ if (!cmap->handles_av) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ cmap->num_allocated = ep->av->count; ++ ++ cmap->attr = *attr; ++ cmap->attr.name = mem_dup(attr->name, ep->av->addrlen); ++ if (!cmap->attr.name) { ++ ret = -FI_ENOMEM; ++ goto err2; ++ } ++ ++ memset(&cmap->handles_idx, 0, sizeof(cmap->handles_idx)); ++ ofi_key_idx_init(&cmap->key_idx, RXM_CMAP_IDX_BITS); ++ ++ dlist_init(&cmap->peer_list); ++ ++ if (cmap->attr.serial_access) { ++ cmap->acquire = ofi_fastlock_acquire_noop; ++ cmap->release = ofi_fastlock_release_noop; ++ } else { ++ fastlock_init(&cmap->lock); ++ cmap->acquire = ofi_fastlock_acquire; ++ cmap->release = ofi_fastlock_release; ++ } ++ ++ rxm_ep->cmap = cmap; ++ ++ if (ep->domain->data_progress == FI_PROGRESS_AUTO) { ++ if (pthread_create(&cmap->cm_thread, 0, ++ rxm_conn_progress, ep)) { ++ FI_WARN(ep->av->prov, FI_LOG_FABRIC, ++ "Unable to create cmap thread\n"); ++ ret = -ofi_syserr(); ++ goto err3; ++ } ++ } else { ++ if (pthread_create(&cmap->cm_thread, 0, ++ rxm_conn_eq_read, ep)) { ++ FI_WARN(ep->av->prov, FI_LOG_FABRIC, ++ "Unable to create cmap thread\n"); ++ ret = -ofi_syserr(); ++ goto err3; ++ } ++ } ++ ++ assert(ep->av); ++ ret = rxm_cmap_bind_to_av(cmap, ep->av); ++ if (ret) ++ goto err4; ++ ++ return FI_SUCCESS; ++err4: ++ rxm_cmap_cm_thread_close(cmap); ++err3: ++ rxm_ep->cmap = NULL; ++ free(cmap->attr.name); ++err2: ++ free(cmap->handles_av); ++err1: ++ free(cmap); ++ return ret; ++} ++ + static int rxm_msg_ep_open(struct rxm_ep *rxm_ep, struct fi_info *msg_info, + struct rxm_conn *rxm_conn, void *context) + { +@@ -94,48 +885,237 @@ err: + return ret; + } + +-void rxm_conn_close(struct util_cmap_handle *handle) ++static void rxm_conn_close(struct rxm_cmap_handle *handle) + { +- struct rxm_conn *rxm_conn = container_of(handle, struct rxm_conn, handle); ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ ++ if (!rxm_conn->msg_ep) ++ return; ++ ++ if (handle->cmap->attr.serial_access) { ++ if (fi_close(&rxm_conn->msg_ep->fid)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to close msg_ep\n"); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closed msg_ep\n"); ++ } ++ } else { ++ rxm_conn->saved_msg_ep = rxm_conn->msg_ep; ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Saved MSG EP fid for further deletion in main thread\n"); ++ } ++ rxm_conn->msg_ep = NULL; ++ ++ rxm_conn_res_free(rxm_conn); ++} ++ ++static void rxm_conn_save(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ + if (!rxm_conn->msg_ep) + return; + ++ rxm_conn->saved_msg_ep = rxm_conn->msg_ep; ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Saved MSG EP fid for further deletion\n"); ++ rxm_conn->msg_ep = NULL; ++} ++ ++static void rxm_conn_close_saved(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ ++ if (!rxm_conn->saved_msg_ep) ++ return; ++ ++ /* If user doesn't guarantee for serializing access to cmap ++ * objects, postpone the closing of the saved MSG EP for ++ * further deletion in main thread */ ++ if (handle->cmap->attr.serial_access) { ++ if (fi_close(&rxm_conn->saved_msg_ep->fid)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to close saved msg_ep\n"); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closed saved msg_ep\n"); ++ } ++ rxm_conn->saved_msg_ep = NULL; ++ } ++} ++ ++static void rxm_conn_connected_handler(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_conn *rxm_conn = container_of(handle, struct rxm_conn, handle); ++ ++ if (!rxm_conn->saved_msg_ep) ++ return; + /* Assuming fi_close also shuts down the connection gracefully if the + * endpoint is in connected state */ +- if (fi_close(&rxm_conn->msg_ep->fid)) +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg_ep\n"); +- FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Closed msg_ep\n"); +- rxm_conn->msg_ep = NULL; ++ if (fi_close(&rxm_conn->saved_msg_ep->fid)) ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close saved msg_ep\n"); ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Closed saved msg_ep\n"); ++ rxm_conn->saved_msg_ep = NULL; + } + +-static void rxm_conn_free(struct util_cmap_handle *handle) ++static int rxm_conn_reprocess_directed_recvs(struct rxm_recv_queue *recv_queue) + { +- rxm_conn_close(handle); +- free(container_of(handle, struct rxm_conn, handle)); ++ struct rxm_rx_buf *rx_buf; ++ struct dlist_entry *entry, *tmp_entry; ++ struct rxm_recv_match_attr match_attr; ++ struct fi_cq_err_entry err_entry = {0}; ++ int ret, count = 0; ++ ++ ofi_ep_lock_acquire(&recv_queue->rxm_ep->util_ep); ++ dlist_foreach_container_safe(&recv_queue->unexp_msg_list, ++ struct rxm_rx_buf, rx_buf, ++ unexp_msg.entry, tmp_entry) { ++ if (rx_buf->unexp_msg.addr == rx_buf->conn->handle.fi_addr) ++ continue; ++ ++ assert(rx_buf->unexp_msg.addr == FI_ADDR_NOTAVAIL); ++ ++ rx_buf->unexp_msg.addr = rx_buf->conn->handle.fi_addr; ++ match_attr.addr = rx_buf->unexp_msg.addr; ++ match_attr.tag = rx_buf->unexp_msg.tag; ++ ++ entry = dlist_remove_first_match(&recv_queue->recv_list, ++ recv_queue->match_recv, ++ &match_attr); ++ if (!entry) ++ continue; ++ ++ dlist_remove(&rx_buf->unexp_msg.entry); ++ rx_buf->recv_entry = container_of(entry, struct rxm_recv_entry, ++ entry); ++ ++ ret = rxm_cq_handle_rx_buf(rx_buf); ++ if (ret) { ++ err_entry.op_context = rx_buf; ++ err_entry.flags = rx_buf->recv_entry->comp_flags; ++ err_entry.len = rx_buf->pkt.hdr.size; ++ err_entry.data = rx_buf->pkt.hdr.data; ++ err_entry.tag = rx_buf->pkt.hdr.tag; ++ err_entry.err = ret; ++ err_entry.prov_errno = ret; ++ ofi_cq_write_error(recv_queue->rxm_ep->util_ep.rx_cq, ++ &err_entry); ++ if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) ++ rxm_cntr_incerr(rx_buf->ep->util_ep.rx_cntr); ++ ++ rxm_rx_buf_release(recv_queue->rxm_ep, rx_buf); ++ ++ if (!(rx_buf->recv_entry->flags & FI_MULTI_RECV)) ++ rxm_recv_entry_release(recv_queue, ++ rx_buf->recv_entry); ++ } ++ count++; ++ } ++ ofi_ep_lock_release(&recv_queue->rxm_ep->util_ep); ++ ++ return count; + } + +-static struct util_cmap_handle *rxm_conn_alloc(void) ++static void ++rxm_conn_av_updated_handler(struct rxm_cmap_handle *handle) ++{ ++ struct rxm_ep *rxm_ep = container_of(handle->cmap->ep, struct rxm_ep, util_ep); ++ int count = 0; ++ ++ if (rxm_ep->rxm_info->caps & FI_DIRECTED_RECV) { ++ count += rxm_conn_reprocess_directed_recvs(&rxm_ep->recv_queue); ++ count += rxm_conn_reprocess_directed_recvs(&rxm_ep->trecv_queue); ++ ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Reprocessed directed recvs - %d\n", count); ++ } ++} ++ ++static struct rxm_cmap_handle *rxm_conn_alloc(struct rxm_cmap *cmap) + { + struct rxm_conn *rxm_conn = calloc(1, sizeof(*rxm_conn)); ++ + if (OFI_UNLIKELY(!rxm_conn)) + return NULL; + +- dlist_init(&rxm_conn->postponed_tx_list); + return &rxm_conn->handle; + } + ++static inline int ++rxm_conn_verify_cm_data(struct rxm_cm_data *remote_cm_data, ++ struct rxm_cm_data *local_cm_data) ++{ ++ if (remote_cm_data->proto.endianness != local_cm_data->proto.endianness) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "endianness of two peers (%"PRIu8" vs %"PRIu8")" ++ "are mismatched\n", ++ remote_cm_data->proto.endianness, ++ local_cm_data->proto.endianness); ++ goto err; ++ } ++ if (remote_cm_data->proto.ctrl_version != local_cm_data->proto.ctrl_version) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "ctrl_version of two peers (%"PRIu8" vs %"PRIu8")" ++ "are mismatched\n", ++ remote_cm_data->proto.ctrl_version, ++ local_cm_data->proto.ctrl_version); ++ goto err; ++ } ++ if (remote_cm_data->proto.op_version != local_cm_data->proto.op_version) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "op_version of two peers (%"PRIu8" vs %"PRIu8")" ++ "are mismatched\n", ++ remote_cm_data->proto.op_version, ++ local_cm_data->proto.op_version); ++ goto err; ++ } ++ if (remote_cm_data->proto.eager_size != local_cm_data->proto.eager_size) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "inject_size of two peers (%"PRIu64" vs %"PRIu64")" ++ "are mismatched\n", ++ remote_cm_data->proto.eager_size, ++ local_cm_data->proto.eager_size); ++ goto err; ++ } ++ return FI_SUCCESS; ++err: ++ return -FI_EINVAL; ++} ++ + static int + rxm_msg_process_connreq(struct rxm_ep *rxm_ep, struct fi_info *msg_info, + void *data) + { + struct rxm_conn *rxm_conn; + struct rxm_cm_data *remote_cm_data = data; +- struct rxm_cm_data cm_data; +- struct util_cmap_handle *handle; ++ struct rxm_cm_data cm_data = { ++ .proto = { ++ .ctrl_version = RXM_CTRL_VERSION, ++ .op_version = RXM_OP_VERSION, ++ .endianness = ofi_detect_endianness(), ++ .eager_size = rxm_ep->rxm_info->tx_attr->inject_size, ++ }, ++ }; ++ struct rxm_cmap_handle *handle; + int ret; ++ enum rxm_cmap_reject_flag cm_reject_flag = RXM_CMAP_REJECT_GENUINE; + +- ret = ofi_cmap_process_connreq(rxm_ep->util_ep.cmap, +- &remote_cm_data->name, &handle); ++ remote_cm_data->proto.eager_size = ntohll(remote_cm_data->proto.eager_size); ++ ++ if (rxm_conn_verify_cm_data(remote_cm_data, &cm_data)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "CM data mismatch was detected\n"); ++ ret = -FI_EINVAL; ++ goto err1; ++ } ++ ++ ret = rxm_cmap_process_connreq(rxm_ep->cmap, ++ &remote_cm_data->name, ++ &handle, &cm_reject_flag); + if (ret) + goto err1; + +@@ -148,143 +1128,262 @@ rxm_msg_process_connreq(struct rxm_ep *rxm_ep, struct fi_info *msg_info, + goto err2; + + cm_data.conn_id = rxm_conn->handle.key; ++ cm_data.proto.eager_size = htonll(cm_data.proto.eager_size); + + ret = fi_accept(rxm_conn->msg_ep, &cm_data, sizeof(cm_data)); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_FABRIC, +- "Unable to accept incoming connection\n"); ++ "Unable to accept incoming connection\n"); + goto err2; + } ++ ++ ret = rxm_conn_res_alloc(rxm_ep, rxm_conn); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_FABRIC, ++ "Unable to allocate TX/RX resources for connection\n"); ++ goto err2; ++ } ++ + return ret; + err2: +- ofi_cmap_del_handle(&rxm_conn->handle); ++ rxm_cmap_del_handle_ts(&rxm_conn->handle); + err1: + FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, +- "Rejecting incoming connection request\n"); +- if (fi_reject(rxm_ep->msg_pep, msg_info->handle, NULL, 0)) ++ "Rejecting incoming connection request (reject flag - %d)\n", ++ cm_reject_flag); ++ if (fi_reject(rxm_ep->msg_pep, msg_info->handle, ++ &cm_reject_flag, sizeof(cm_reject_flag))) + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, +- "Unable to reject incoming connection\n"); ++ "Unable to reject incoming connection\n"); + return ret; + } + + static int rxm_conn_handle_notify(struct fi_eq_entry *eq_entry) + { +- switch((enum ofi_cmap_signal)eq_entry->data) { +- case OFI_CMAP_FREE: +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Freeing handle\n"); +- rxm_conn_free((struct util_cmap_handle *)eq_entry->context); ++ if ((enum rxm_cmap_signal)eq_entry->data == RXM_CMAP_FREE) { ++ rxm_conn_free((struct rxm_cmap_handle *)eq_entry->context); + return 0; +- case OFI_CMAP_EXIT: +- FI_TRACE(&rxm_prov, FI_LOG_FABRIC, "Closing event handler\n"); +- return 1; +- default: ++ } else { + FI_WARN(&rxm_prov, FI_LOG_FABRIC, "Unknown cmap signal\n"); +- return 1; ++ assert(0); ++ return -FI_EOTHER; ++ } ++} ++ ++static void rxm_conn_wake_up_wait_obj(struct rxm_ep *rxm_ep) ++{ ++ if (rxm_ep->util_ep.tx_cq->wait) ++ util_cq_signal(rxm_ep->util_ep.tx_cq); ++ if (rxm_ep->util_ep.tx_cntr && rxm_ep->util_ep.tx_cntr->wait) ++ util_cntr_signal(rxm_ep->util_ep.tx_cntr); ++} ++ ++static int ++rxm_conn_handle_event(struct rxm_ep *rxm_ep, struct rxm_msg_eq_entry *entry) ++{ ++ struct rxm_cm_data *cm_data; ++ ++ if (entry->rd == -FI_ECONNREFUSED) { ++ enum rxm_cmap_reject_flag cm_reject_flag; ++ ++ if (OFI_LIKELY(entry->err_entry.err_data_size >= ++ sizeof(enum rxm_cmap_reject_flag))) { ++ assert(entry->err_entry.err_data); ++ cm_reject_flag = *((enum rxm_cmap_reject_flag *) ++ entry->err_entry.err_data); ++ } else { ++ FI_WARN(&rxm_prov, FI_LOG_FABRIC, ++ "Error -FI_ECONNREFUSED was provided without error data\n"); ++ cm_reject_flag = RXM_CMAP_REJECT_GENUINE; ++ } ++ ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Received reject (reject flag - %d)\n", ++ cm_reject_flag); ++ assert((cm_reject_flag == RXM_CMAP_REJECT_GENUINE) || ++ (cm_reject_flag == RXM_CMAP_REJECT_SIMULT_CONN)); ++ rxm_cmap_process_reject(rxm_ep->cmap, entry->context, ++ cm_reject_flag); ++ return 0; ++ } ++ ++ switch(entry->event) { ++ case FI_NOTIFY: ++ if (rxm_conn_handle_notify((struct fi_eq_entry *)&entry->cm_entry)) ++ goto err; ++ break; ++ case FI_CONNREQ: ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Got new connection\n"); ++ if ((size_t)entry->rd != RXM_CM_ENTRY_SZ) { ++ FI_WARN(&rxm_prov, FI_LOG_FABRIC, ++ "Received size (%zd) not matching " ++ "expected (%zu)\n", entry->rd, RXM_CM_ENTRY_SZ); ++ goto err; ++ } ++ rxm_msg_process_connreq(rxm_ep, entry->cm_entry.info, entry->cm_entry.data); ++ fi_freeinfo(entry->cm_entry.info); ++ break; ++ case FI_CONNECTED: ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Connection successful\n"); ++ rxm_ep->cmap->acquire(&rxm_ep->cmap->lock); ++ cm_data = (void *)entry->cm_entry.data; ++ rxm_cmap_process_connect(rxm_ep->cmap, ++ entry->cm_entry.fid->context, ++ ((entry->rd - sizeof(entry->cm_entry)) ? ++ &cm_data->conn_id : NULL)); ++ rxm_conn_wake_up_wait_obj(rxm_ep); ++ rxm_ep->cmap->release(&rxm_ep->cmap->lock); ++ break; ++ case FI_SHUTDOWN: ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Received connection shutdown\n"); ++ rxm_cmap_process_shutdown(rxm_ep->cmap, ++ entry->cm_entry.fid->context); ++ break; ++ default: ++ FI_WARN(&rxm_prov, FI_LOG_FABRIC, ++ "Unknown event: %u\n", entry->event); ++ goto err; ++ } ++ return 0; ++err: ++ return -FI_EOTHER; ++} ++ ++int rxm_conn_process_eq_events(struct rxm_ep *rxm_ep) ++{ ++ struct rxm_msg_eq_entry *entry; ++ struct slist_entry *slist_entry; ++ int ret; ++ ++ fastlock_acquire(&rxm_ep->msg_eq_entry_list_lock); ++ while (!slistfd_empty(&rxm_ep->msg_eq_entry_list)) { ++ slist_entry = slistfd_remove_head(&rxm_ep->msg_eq_entry_list); ++ entry = container_of(slist_entry, struct rxm_msg_eq_entry, ++ slist_entry); ++ ++ fastlock_release(&rxm_ep->msg_eq_entry_list_lock); ++ ++ ret = rxm_conn_handle_event(rxm_ep, entry); ++ free(entry); ++ fastlock_acquire(&rxm_ep->msg_eq_entry_list_lock); ++ if (ret) ++ break; + } ++ fastlock_release(&rxm_ep->msg_eq_entry_list_lock); ++ return ret; + } + +-static void rxm_conn_handle_eq_err(struct rxm_ep *rxm_ep, ssize_t rd) ++static ssize_t rxm_eq_sread(struct rxm_ep *rxm_ep, size_t len, ++ struct rxm_msg_eq_entry *entry) + { +- struct fi_eq_err_entry err_entry = {0}; ++ ssize_t rd; ++ int once = 1; ++ ++ do { ++ rd = fi_eq_sread(rxm_ep->msg_eq, &entry->event, &entry->cm_entry, ++ len, -1, 0); ++ if (rd >= 0) ++ return rd; ++ if (rd == -FI_EINTR && once) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Ignoring EINTR\n"); ++ once = 0; ++ } ++ } while (rd == -FI_EINTR); + + if (rd != -FI_EAVAIL) { +- FI_WARN(&rxm_prov, FI_LOG_FABRIC, "Unable to fi_eq_sread\n"); +- return; ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to fi_eq_sread: %zu\n", rd); ++ return rd; + } +- OFI_EQ_READERR(&rxm_prov, FI_LOG_FABRIC, rxm_ep->msg_eq, rd, err_entry); +- if (err_entry.err == ECONNREFUSED) { +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Connection refused\n"); +- ofi_cmap_process_reject(rxm_ep->util_ep.cmap, +- err_entry.fid->context); ++ ++ RXM_EQ_READERR(&rxm_prov, FI_LOG_EP_CTRL, rxm_ep->msg_eq, rd, entry->err_entry); ++ ++ if (entry->err_entry.err == ECONNREFUSED) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Connection refused\n"); ++ entry->context = entry->err_entry.fid->context; ++ return -FI_ECONNREFUSED; ++ } else { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unknown error: %d\n", ++ entry->err_entry.err); ++ return rd; + } + } + +-static void rxm_conn_handle_postponed_op(struct rxm_ep *rxm_ep, +- struct util_cmap_handle *handle) ++static void *rxm_conn_eq_read(void *arg) + { +- struct rxm_tx_entry *tx_entry; +- struct rxm_conn *rxm_conn = container_of(handle, struct rxm_conn, handle); ++ struct rxm_ep *rxm_ep = arg; ++ struct rxm_msg_eq_entry *entry; + +- while (!dlist_empty(&rxm_conn->postponed_tx_list)) { +- dlist_pop_front(&rxm_conn->postponed_tx_list, struct rxm_tx_entry, +- tx_entry, postponed_entry); +- if (!(tx_entry->comp_flags & FI_RMA)) +- rxm_ep_handle_postponed_tx_op(rxm_ep, rxm_conn, tx_entry); +- else +- rxm_ep_handle_postponed_rma_op(rxm_ep, rxm_conn, tx_entry); ++ while (1) { ++ entry = calloc(1, RXM_MSG_EQ_ENTRY_SZ); ++ if (!entry) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to allocate memory!\n"); ++ return NULL; ++ } ++ ++ entry->rd = rxm_eq_sread(rxm_ep, RXM_CM_ENTRY_SZ, entry); ++ if (entry->rd < 0 && entry->rd != -FI_ECONNREFUSED) ++ goto exit; ++ ++ if (entry->event == FI_NOTIFY && ++ (enum rxm_cmap_signal)((struct fi_eq_entry *) ++ &entry->cm_entry)->data == RXM_CMAP_EXIT) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Closing CM thread\n"); ++ goto exit; ++ } ++ ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Enqueing event: %d\n", entry->event); ++ fastlock_acquire(&rxm_ep->msg_eq_entry_list_lock); ++ slistfd_insert_tail(&entry->slist_entry, ++ &rxm_ep->msg_eq_entry_list); ++ fastlock_release(&rxm_ep->msg_eq_entry_list_lock); + } ++exit: ++ free(entry); ++ return NULL; + } + +-static void *rxm_conn_event_handler(void *arg) ++static void *rxm_conn_progress(void *arg) + { +- struct fi_eq_cm_entry *entry; +- size_t datalen = sizeof(struct rxm_cm_data); +- size_t len = sizeof(*entry) + datalen; + struct rxm_ep *rxm_ep = container_of(arg, struct rxm_ep, util_ep); +- struct rxm_cm_data *cm_data; +- uint32_t event; +- ssize_t rd; ++ struct rxm_msg_eq_entry *entry; ++ int ret; + +- entry = calloc(1, len); ++ entry = calloc(1, RXM_MSG_EQ_ENTRY_SZ); + if (!entry) { +- FI_WARN(&rxm_prov, FI_LOG_FABRIC, "Unable to allocate memory!\n"); ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to allocate memory!\n"); + return NULL; + } ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, "Starting conn event handler\n"); + +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Starting conn event handler\n"); + while (1) { +- rd = fi_eq_sread(rxm_ep->msg_eq, &event, entry, len, -1, 0); +- /* We would receive more bytes than sizeof *entry during CONNREQ */ +- if (rd < 0) { +- rxm_conn_handle_eq_err(rxm_ep, rd); +- continue; +- } ++ entry->rd = rxm_eq_sread(rxm_ep, RXM_CM_ENTRY_SZ, entry); ++ if (entry->rd < 0 && entry->rd != -FI_ECONNREFUSED) ++ goto exit; + +- switch(event) { +- case FI_NOTIFY: +- if (rxm_conn_handle_notify((struct fi_eq_entry *)entry)) +- goto exit; +- break; +- case FI_CONNREQ: +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, "Got new connection\n"); +- if ((size_t)rd != len) { +- FI_WARN(&rxm_prov, FI_LOG_FABRIC, +- "Received size (%zd) not matching " +- "expected (%zu)\n", rd, len); +- goto exit; +- } +- rxm_msg_process_connreq(rxm_ep, entry->info, entry->data); +- break; +- case FI_CONNECTED: +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, +- "Connection successful\n"); +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- cm_data = (void *)entry->data; +- ofi_cmap_process_connect(rxm_ep->util_ep.cmap, +- entry->fid->context, +- ((rd - sizeof(*entry)) ? +- &cm_data->conn_id : NULL)); +- rxm_conn_handle_postponed_op(rxm_ep, entry->fid->context); +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- break; +- case FI_SHUTDOWN: +- FI_DBG(&rxm_prov, FI_LOG_FABRIC, +- "Received connection shutdown\n"); +- ofi_cmap_process_shutdown(rxm_ep->util_ep.cmap, +- entry->fid->context); +- break; +- default: +- FI_WARN(&rxm_prov, FI_LOG_FABRIC, +- "Unknown event: %u\n", event); ++ if (entry->event == FI_NOTIFY && ++ (enum rxm_cmap_signal)((struct fi_eq_entry *) ++ &entry->cm_entry)->data == RXM_CMAP_EXIT) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, ++ "Closing CM thread\n"); + goto exit; + } ++ ret = rxm_conn_handle_event(rxm_ep, entry); ++ if (ret) ++ goto exit; ++ memset(entry, 0, RXM_MSG_EQ_ENTRY_SZ); + } + exit: + free(entry); + return NULL; + } + +-static int rxm_prepare_cm_data(struct fid_pep *pep, struct util_cmap_handle *handle, ++static int rxm_prepare_cm_data(struct fid_pep *pep, struct rxm_cmap_handle *handle, + struct rxm_cm_data *cm_data) + { + size_t cm_data_size = 0; +@@ -315,18 +1414,23 @@ static int rxm_prepare_cm_data(struct fid_pep *pep, struct util_cmap_handle *han + } + + static int +-rxm_conn_connect(struct util_ep *util_ep, struct util_cmap_handle *handle, ++rxm_conn_connect(struct util_ep *util_ep, struct rxm_cmap_handle *handle, + const void *addr, size_t addrlen) + { +- struct rxm_ep *rxm_ep; +- struct rxm_conn *rxm_conn; + struct fi_info *msg_info; +- struct rxm_cm_data cm_data; + int ret; +- +- rxm_ep = container_of(util_ep, struct rxm_ep, util_ep); +- +- rxm_conn = container_of(handle, struct rxm_conn, handle); ++ struct rxm_ep *rxm_ep = ++ container_of(util_ep, struct rxm_ep, util_ep); ++ struct rxm_conn *rxm_conn = ++ container_of(handle, struct rxm_conn, handle); ++ struct rxm_cm_data cm_data = { ++ .proto = { ++ .ctrl_version = RXM_CTRL_VERSION, ++ .op_version = RXM_OP_VERSION, ++ .endianness = ofi_detect_endianness(), ++ .eager_size = rxm_ep->rxm_info->tx_attr->inject_size, ++ }, ++ }; + + free(rxm_ep->msg_info->dest_addr); + rxm_ep->msg_info->dest_addrlen = addrlen; +@@ -351,11 +1455,18 @@ rxm_conn_connect(struct util_ep *util_ep, struct util_cmap_handle *handle, + if (ret) + goto err2; + ++ cm_data.proto.eager_size = htonll(cm_data.proto.eager_size); ++ + ret = fi_connect(rxm_conn->msg_ep, msg_info->dest_addr, &cm_data, sizeof(cm_data)); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to connect msg_ep\n"); + goto err2; + } ++ ++ ret = rxm_conn_res_alloc(rxm_ep, rxm_conn); ++ if (ret) ++ goto err2; ++ + fi_freeinfo(msg_info); + return 0; + err2: +@@ -367,7 +1478,7 @@ err1: + } + + static int rxm_conn_signal(struct util_ep *util_ep, void *context, +- enum ofi_cmap_signal signal) ++ enum rxm_cmap_signal signal) + { + struct rxm_ep *rxm_ep = container_of(util_ep, struct rxm_ep, util_ep); + struct fi_eq_entry entry = {0}; +@@ -384,20 +1495,16 @@ static int rxm_conn_signal(struct util_ep *util_ep, void *context, + return 0; + } + +-struct util_cmap *rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep) ++int rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep) + { +- struct util_cmap_attr attr; +- struct util_cmap *cmap = NULL; +- void *name; +- size_t len; ++ struct rxm_cmap_attr attr; + int ret; +- +- len = rxm_ep->msg_info->src_addrlen; +- name = calloc(1, len); ++ size_t len = rxm_ep->util_ep.av->addrlen; ++ void *name = calloc(1, len); + if (!name) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, + "Unable to allocate memory for EP name\n"); +- return NULL; ++ return -FI_ENOMEM; + } + + /* Passive endpoint should already have fi_setname or fi_listen +@@ -411,18 +1518,18 @@ struct util_cmap *rxm_conn_cmap_alloc(struct rxm_ep *rxm_ep) + ofi_straddr_dbg(&rxm_prov, FI_LOG_EP_CTRL, "local_name", name); + + attr.name = name; +- attr.alloc = rxm_conn_alloc; +- attr.close = rxm_conn_close; +- attr.free = rxm_conn_free; +- attr.connect = rxm_conn_connect; +- attr.event_handler = rxm_conn_event_handler; +- attr.signal = rxm_conn_signal; +- +- cmap = ofi_cmap_alloc(&rxm_ep->util_ep, &attr); +- if (!cmap) ++ ++ if (rxm_ep->util_ep.domain->threading == FI_THREAD_DOMAIN && ++ rxm_ep->util_ep.domain->data_progress == FI_PROGRESS_MANUAL) ++ attr.serial_access = 1; ++ else ++ attr.serial_access = 0; ++ ++ ret = rxm_cmap_alloc(rxm_ep, &attr); ++ if (ret) + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, + "Unable to allocate CMAP\n"); + fn: + free(name); +- return cmap; ++ return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_cq.c +index 1daa279b3..15f945be9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_cq.c +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2013-2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2018 Cray Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -35,18 +36,11 @@ + #include + + #include "ofi.h" ++#include "ofi_iov.h" ++#include "ofi_atomic.h" + + #include "rxm.h" + +-static struct rxm_conn *rxm_key2conn(struct rxm_ep *rxm_ep, uint64_t key) +-{ +- struct util_cmap_handle *handle; +- handle = ofi_cmap_key2handle(rxm_ep->util_ep.cmap, key); +- if (!handle) +- return NULL; +- return container_of(handle, struct rxm_conn, handle); +-} +- + static const char *rxm_cq_strerror(struct fid_cq *cq_fid, int prov_errno, + const void *err_data, char *buf, size_t len) + { +@@ -61,39 +55,6 @@ static const char *rxm_cq_strerror(struct fid_cq *cq_fid, int prov_errno, + return fi_cq_strerror(rxm_ep->msg_cq, prov_errno, err_data, buf, len); + } + +-#if ENABLE_DEBUG +-static void rxm_cq_log_comp(uint64_t flags) +-{ +- flags &= (FI_SEND | FI_WRITE | FI_READ | FI_REMOTE_READ | +- FI_REMOTE_WRITE); +- +- switch (flags) { +- case FI_SEND: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting send completion\n"); +- break; +- case FI_WRITE: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting write completion\n"); +- break; +- case FI_READ: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting read completion\n"); +- break; +- case FI_REMOTE_READ: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting remote read completion\n"); +- break; +- case FI_REMOTE_WRITE: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Reporting remote write completion\n"); +- break; +- default: +- FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown completion\n"); +- } +-} +-#else +-static void rxm_cq_log_comp(uint64_t flags) +-{ +- // NOP +-} +-#endif +- + /* Get a match_iov derived from iov whose size matches given length */ + static int rxm_match_iov(const struct iovec *iov, void **desc, + uint8_t count, uint64_t offset, size_t match_len, +@@ -131,438 +92,632 @@ static int rxm_match_iov(const struct iovec *iov, void **desc, + return FI_SUCCESS; + } + +-static int rxm_match_rma_iov(struct rxm_recv_entry *recv_entry, +- struct rxm_rma_iov *rma_iov, +- struct rxm_iov *match_iov) ++static inline uint64_t ++rxm_cq_get_rx_comp_and_op_flags(struct rxm_rx_buf *rx_buf) + { +- uint64_t offset = 0; +- uint8_t i, j; +- uint8_t count; +- int ret; ++ return (rx_buf->pkt.hdr.flags | ofi_rx_flags[rx_buf->pkt.hdr.op]); ++} + +- assert(rma_iov->count <= RXM_IOV_LIMIT); ++static inline uint64_t ++rxm_cq_get_rx_comp_flags(struct rxm_rx_buf *rx_buf) ++{ ++ return (rx_buf->pkt.hdr.flags); ++} + +- for (i = 0, j = 0; i < rma_iov->count; ) { +- ret = rxm_match_iov(&recv_entry->rxm_iov.iov[j], +- &recv_entry->rxm_iov.desc[j], +- recv_entry->rxm_iov.count - j, offset, +- rma_iov->iov[i].len, &match_iov[i]); +- if (ret) +- return ret; ++static int rxm_finish_buf_recv(struct rxm_rx_buf *rx_buf) ++{ ++ uint64_t flags = rxm_cq_get_rx_comp_and_op_flags(rx_buf); ++ char *data; + +- count = match_iov[i].count; ++ if (rx_buf->pkt.ctrl_hdr.type != ofi_ctrl_data) ++ flags |= FI_MORE; + +- j += count - 1; +- offset = (((count - 1) == 0) ? offset : 0) + +- match_iov[i].iov[count - 1].iov_len; +- i++; ++ if (rx_buf->pkt.ctrl_hdr.type == ofi_ctrl_large_data) ++ data = rxm_pkt_rndv_data(&rx_buf->pkt); ++ else ++ data = rx_buf->pkt.data; + +- if (j >= recv_entry->rxm_iov.count) +- break; +- } +- +- if (i < rma_iov->count) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, "posted recv_entry size < " +- "rndv rma read size!\n"); +- return -FI_ETOOSMALL; +- } ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "writing buffered recv completion: " ++ "length: %" PRIu64 "\n", rx_buf->pkt.hdr.size); ++ rx_buf->recv_context.ep = &rx_buf->ep->util_ep.ep_fid; + +- return FI_SUCCESS; ++ return rxm_cq_write_recv_comp(rx_buf, &rx_buf->recv_context, flags, ++ rx_buf->pkt.hdr.size, data); + } + +-static inline void rxm_enqueue_repost_ready_list(struct rxm_rx_buf *rx_buf) ++static int rxm_cq_write_error_trunc(struct rxm_rx_buf *rx_buf, size_t done_len) + { +- if (!rx_buf->repost) { +- dlist_remove(&rx_buf->entry); +- rxm_rx_buf_release(rx_buf->ep, rx_buf); +- } else { +- fastlock_acquire(&rx_buf->ep->util_ep.lock); +- dlist_insert_tail(&rx_buf->repost_entry, +- &rx_buf->ep->repost_ready_list); +- fastlock_release(&rx_buf->ep->util_ep.lock); ++ int ret; ++ ++ if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) ++ rxm_cntr_incerr(rx_buf->ep->util_ep.rx_cntr); ++ ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Message truncated: " ++ "recv buf length: %zu message length: %" PRIu64 "\n", ++ done_len, rx_buf->pkt.hdr.size); ++ ret = ofi_cq_write_error_trunc(rx_buf->ep->util_ep.rx_cq, ++ rx_buf->recv_entry->context, ++ rx_buf->recv_entry->comp_flags | ++ rxm_cq_get_rx_comp_flags(rx_buf), ++ rx_buf->pkt.hdr.size, ++ rx_buf->recv_entry->rxm_iov.iov[0].iov_base, ++ rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag, ++ rx_buf->pkt.hdr.size - done_len); ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to write recv error CQ\n"); ++ return ret; + } ++ return 0; + } + + static int rxm_finish_recv(struct rxm_rx_buf *rx_buf, size_t done_len) + { + int ret; ++ struct rxm_recv_entry *recv_entry = rx_buf->recv_entry; + + if (OFI_UNLIKELY(done_len < rx_buf->pkt.hdr.size)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, "Message truncated\n"); +- ret = ofi_cq_write_error_trunc(rx_buf->ep->util_ep.rx_cq, +- rx_buf->recv_entry->context, +- rx_buf->recv_entry->comp_flags | +- ((rx_buf->pkt.hdr.flags & OFI_REMOTE_CQ_DATA) ? +- FI_REMOTE_CQ_DATA : 0), +- rx_buf->pkt.hdr.size, +- rx_buf->recv_entry->rxm_iov.iov[0].iov_base, +- rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag, +- rx_buf->pkt.hdr.size - done_len); +- if (OFI_UNLIKELY(ret)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to write recv error CQ\n"); ++ ret = rxm_cq_write_error_trunc(rx_buf, done_len); ++ if (ret) + return ret; +- } +- if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) +- rxm_cntr_incerr(rx_buf->ep->util_ep.rx_cntr); + } else { + if (rx_buf->recv_entry->flags & FI_COMPLETION) { +- FI_DBG(&rxm_prov, FI_LOG_CQ, "writing recv completion\n"); +- ret = ofi_cq_write(rx_buf->ep->util_ep.rx_cq, +- rx_buf->recv_entry->context, +- rx_buf->recv_entry->comp_flags | +- ((rx_buf->pkt.hdr.flags & OFI_REMOTE_CQ_DATA) ? +- FI_REMOTE_CQ_DATA : 0), +- rx_buf->pkt.hdr.size, +- rx_buf->recv_entry->rxm_iov.iov[0].iov_base, +- rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag); +- if (OFI_UNLIKELY(ret)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to write recv completion\n"); ++ ret = rxm_cq_write_recv_comp( ++ rx_buf, rx_buf->recv_entry->context, ++ rx_buf->recv_entry->comp_flags | ++ rxm_cq_get_rx_comp_flags(rx_buf), ++ rx_buf->pkt.hdr.size, ++ rx_buf->recv_entry->rxm_iov.iov[0].iov_base); ++ if (ret) + return ret; +- } + } +- if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) +- rxm_cntr_inc(rx_buf->ep->util_ep.rx_cntr); ++ ofi_ep_rx_cntr_inc(&rx_buf->ep->util_ep); + } + +- rxm_enqueue_repost_ready_list(rx_buf); +- + if (rx_buf->recv_entry->flags & FI_MULTI_RECV) { + struct rxm_iov rxm_iov; ++ size_t recv_size = rx_buf->pkt.hdr.size; ++ struct rxm_ep *rxm_ep = rx_buf->ep; ++ ++ rxm_rx_buf_release(rxm_ep, rx_buf); + +- rx_buf->recv_entry->total_len -= rx_buf->pkt.hdr.size; ++ recv_entry->total_len -= recv_size; + +- if (rx_buf->recv_entry->total_len <= rx_buf->ep->min_multi_recv_size) { ++ if (recv_entry->total_len <= rxm_ep->min_multi_recv_size) { + FI_DBG(&rxm_prov, FI_LOG_CQ, + "Buffer %p has been completely consumed. " + "Reporting Multi-Recv completion\n", +- rx_buf->recv_entry->multi_recv_buf); +- ret = ofi_cq_write(rx_buf->ep->util_ep.rx_cq, +- rx_buf->recv_entry->context, +- FI_MULTI_RECV, rx_buf->pkt.hdr.size, +- rx_buf->recv_entry->multi_recv_buf, +- rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag); ++ recv_entry->multi_recv.buf); ++ ret = rxm_cq_write_multi_recv_comp(rxm_ep, recv_entry); + if (OFI_UNLIKELY(ret)) { + FI_WARN(&rxm_prov, FI_LOG_CQ, + "Unable to write FI_MULTI_RECV completion\n"); + return ret; + } + /* Since buffer is elapsed, release recv_entry */ +- rxm_recv_entry_release(rx_buf->recv_queue, rx_buf->recv_entry); ++ rxm_recv_entry_release(recv_entry->recv_queue, ++ recv_entry); + return ret; + } + + FI_DBG(&rxm_prov, FI_LOG_CQ, + "Repost Multi-Recv entry: " +- "consumed len = %"PRIu64", remain len = %zu\n", +- rx_buf->pkt.hdr.size, +- rx_buf->recv_entry->total_len); +- +- rxm_iov = rx_buf->recv_entry->rxm_iov; +- ret = rxm_match_iov(rxm_iov.iov, rxm_iov.desc, rxm_iov.count, /* prev iovecs */ +- rx_buf->pkt.hdr.size, /* offset */ +- rx_buf->recv_entry->total_len, /* match_len */ +- &rx_buf->recv_entry->rxm_iov); /* match_iov */ ++ "consumed len = %zu, remain len = %zu\n", ++ recv_size, recv_entry->total_len); ++ ++ rxm_iov = recv_entry->rxm_iov; ++ ret = rxm_match_iov(/* prev iovecs */ ++ rxm_iov.iov, rxm_iov.desc, rxm_iov.count, ++ recv_size, /* offset */ ++ recv_entry->total_len, /* match_len */ ++ &recv_entry->rxm_iov); /* match_iov */ + if (OFI_UNLIKELY(ret)) + return ret; + +- return rxm_process_recv_entry(&rx_buf->ep->recv_queue, rx_buf->recv_entry); ++ return rxm_process_recv_entry(recv_entry->recv_queue, recv_entry); + } else { +- rxm_recv_entry_release(rx_buf->recv_queue, rx_buf->recv_entry); ++ rxm_rx_buf_release(rx_buf->ep, rx_buf); ++ rxm_recv_entry_release(recv_entry->recv_queue, recv_entry); + } + + return FI_SUCCESS; + } + +-static int rxm_finish_send_nobuf(struct rxm_tx_entry *tx_entry) ++static inline int ++rxm_cq_tx_comp_write(struct rxm_ep *rxm_ep, uint64_t comp_flags, ++ void *app_context, uint64_t flags) + { +- int ret; +- +- if (tx_entry->flags & FI_COMPLETION) { +- ret = ofi_cq_write(tx_entry->ep->util_ep.tx_cq, +- tx_entry->context, tx_entry->comp_flags, 0, +- NULL, 0, 0); +- if (ret) { ++ if (flags & FI_COMPLETION) { ++ int ret = ofi_cq_write(rxm_ep->util_ep.tx_cq, app_context, ++ comp_flags, 0, NULL, 0, 0); ++ if (OFI_UNLIKELY(ret)) { + FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to report completion\n"); ++ "Unable to report completion\n"); + return ret; + } +- rxm_cq_log_comp(tx_entry->comp_flags); +- } +- if (tx_entry->ep->util_ep.flags & OFI_CNTR_ENABLED) { +- if (tx_entry->comp_flags & FI_SEND) +- rxm_cntr_inc(tx_entry->ep->util_ep.tx_cntr); +- else if (tx_entry->comp_flags & FI_WRITE) +- rxm_cntr_inc(tx_entry->ep->util_ep.wr_cntr); +- else +- rxm_cntr_inc(tx_entry->ep->util_ep.rd_cntr); ++ rxm_cq_log_comp(comp_flags); + } +- rxm_tx_entry_release(&tx_entry->ep->send_queue, tx_entry); + return 0; + } + +-static int rxm_finish_send(struct rxm_tx_entry *tx_entry) ++static inline int rxm_finish_rma(struct rxm_ep *rxm_ep, struct rxm_rma_buf *rma_buf, ++ uint64_t comp_flags) + { +- rxm_tx_buf_release(tx_entry->ep, tx_entry->tx_buf); +- return rxm_finish_send_nobuf(tx_entry); ++ int ret = rxm_cq_tx_comp_write(rxm_ep, comp_flags, ++ rma_buf->app_context, rma_buf->flags); ++ ++ assert(((comp_flags & FI_WRITE) && !(comp_flags & FI_READ)) || ++ ((comp_flags & FI_READ) && !(comp_flags & FI_WRITE))); ++ ofi_ep_cntr_inc_funcs[comp_flags & (FI_WRITE | FI_READ)](&rxm_ep->util_ep); ++ ++ if (!(rma_buf->flags & FI_INJECT) && !rxm_ep->rxm_mr_local && rxm_ep->msg_mr_local) { ++ rxm_ep_msg_mr_closev(rma_buf->mr.mr, rma_buf->mr.count); ++ } ++ ++ rxm_rma_buf_release(rxm_ep, rma_buf); ++ return ret; + } + +-static inline int rxm_finish_send_lmt_ack(struct rxm_rx_buf *rx_buf) ++static inline int rxm_finish_eager_send(struct rxm_ep *rxm_ep, struct rxm_tx_eager_buf *tx_buf) + { +- RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_LMT_ACK_SENT, RXM_LMT_FINISH); +- rx_buf->hdr.state = RXM_LMT_FINISH; +- if (!rx_buf->ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(rx_buf->mr, rx_buf->recv_entry->rxm_iov.count); +- return rxm_finish_recv(rx_buf, rx_buf->recv_entry->total_len); ++ int ret = rxm_cq_tx_comp_write(rxm_ep, ofi_tx_cq_flags(tx_buf->pkt.hdr.op), ++ tx_buf->app_context, tx_buf->flags); ++ ++ assert(ofi_tx_cq_flags(tx_buf->pkt.hdr.op) & FI_SEND); ++ ofi_ep_tx_cntr_inc(&rxm_ep->util_ep); ++ ++ return ret; + } + +-static ssize_t rxm_lmt_rma_read(struct rxm_rx_buf *rx_buf) ++static inline int rxm_finish_sar_segment_send(struct rxm_ep *rxm_ep, struct rxm_tx_sar_buf *tx_buf) + { +- struct rxm_iov *match_iov = &rx_buf->match_iov[rx_buf->index]; +- struct ofi_rma_iov *rma_iov = &rx_buf->rma_iov->iov[rx_buf->index]; +- ssize_t ret; ++ int ret = FI_SUCCESS; ++ struct rxm_tx_sar_buf *first_tx_buf; + +- ret = fi_readv(rx_buf->conn->msg_ep, match_iov->iov, match_iov->desc, +- match_iov->count, 0, rma_iov->addr, rma_iov->key, rx_buf); +- if (ret) +- return ret; +- rx_buf->index++; +- return FI_SUCCESS; ++ switch (rxm_sar_get_seg_type(&tx_buf->pkt.ctrl_hdr)) { ++ case RXM_SAR_SEG_FIRST: ++ break; ++ case RXM_SAR_SEG_MIDDLE: ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, tx_buf); ++ break; ++ case RXM_SAR_SEG_LAST: ++ ret = rxm_cq_tx_comp_write(rxm_ep, ofi_tx_cq_flags(tx_buf->pkt.hdr.op), ++ tx_buf->app_context, tx_buf->flags); ++ ++ assert(ofi_tx_cq_flags(tx_buf->pkt.hdr.op) & FI_SEND); ++ ofi_ep_tx_cntr_inc(&rxm_ep->util_ep); ++ first_tx_buf = rxm_msg_id_2_tx_buf(rxm_ep, RXM_BUF_POOL_TX_SAR, ++ tx_buf->pkt.ctrl_hdr.msg_id); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, first_tx_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, tx_buf); ++ break; ++ } ++ ++ return ret; ++} ++ ++static inline int rxm_finish_send_rndv_ack(struct rxm_rx_buf *rx_buf) ++{ ++ RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_RNDV_ACK_SENT, RXM_RNDV_FINISH); ++ rx_buf->hdr.state = RXM_RNDV_FINISH; ++ if (!rx_buf->ep->rxm_mr_local) ++ rxm_ep_msg_mr_closev(rx_buf->mr, rx_buf->recv_entry->rxm_iov.count); ++ return rxm_finish_recv(rx_buf, rx_buf->recv_entry->total_len); + } + +-static int rxm_lmt_tx_finish(struct rxm_tx_entry *tx_entry) ++static int rxm_rndv_tx_finish(struct rxm_ep *rxm_ep, struct rxm_tx_rndv_buf *tx_buf) + { + int ret; + +- RXM_LOG_STATE_TX(FI_LOG_CQ, tx_entry, RXM_LMT_FINISH); +- tx_entry->state = RXM_LMT_FINISH; ++ RXM_LOG_STATE_TX(FI_LOG_CQ, tx_buf, RXM_RNDV_FINISH); ++ tx_buf->hdr.state = RXM_RNDV_FINISH; + +- if (!tx_entry->ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); ++ if (!rxm_ep->rxm_mr_local) ++ rxm_ep_msg_mr_closev(tx_buf->mr, tx_buf->count); + +- ret = rxm_finish_send(tx_entry); +- if (ret) +- return ret; ++ ret = rxm_cq_tx_comp_write(rxm_ep, ofi_tx_cq_flags(tx_buf->pkt.hdr.op), ++ tx_buf->app_context, tx_buf->flags); ++ ++ assert(ofi_tx_cq_flags(tx_buf->pkt.hdr.op) & FI_SEND); ++ ofi_ep_tx_cntr_inc(&rxm_ep->util_ep); ++ ++ rxm_rx_buf_release(rxm_ep, tx_buf->rx_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_RNDV, tx_buf); + +- rxm_enqueue_repost_ready_list(tx_entry->rx_buf); + return ret; + } + +-static int rxm_lmt_handle_ack(struct rxm_rx_buf *rx_buf) ++static int rxm_rndv_handle_ack(struct rxm_ep *rxm_ep, struct rxm_rx_buf *rx_buf) + { +- struct rxm_tx_entry *tx_entry; ++ struct rxm_tx_rndv_buf *tx_buf = ++ rxm_msg_id_2_tx_buf(rxm_ep, RXM_BUF_POOL_TX_RNDV, ++ rx_buf->pkt.ctrl_hdr.msg_id); + + FI_DBG(&rxm_prov, FI_LOG_CQ, "Got ACK for msg_id: 0x%" PRIx64 "\n", + rx_buf->pkt.ctrl_hdr.msg_id); + +- tx_entry = &rx_buf->ep->send_queue.fs->buf[rx_buf->pkt.ctrl_hdr.msg_id]; ++ assert(tx_buf->pkt.ctrl_hdr.msg_id == rx_buf->pkt.ctrl_hdr.msg_id); + +- assert(tx_entry->tx_buf->pkt.ctrl_hdr.msg_id == rx_buf->pkt.ctrl_hdr.msg_id); ++ tx_buf->rx_buf = rx_buf; + +- tx_entry->rx_buf = rx_buf; +- +- if (tx_entry->state == RXM_LMT_ACK_WAIT) { +- return rxm_lmt_tx_finish(tx_entry); ++ if (tx_buf->hdr.state == RXM_RNDV_ACK_WAIT) { ++ return rxm_rndv_tx_finish(rxm_ep, tx_buf); + } else { +- assert(tx_entry->state == RXM_LMT_TX); +- RXM_LOG_STATE_TX(FI_LOG_CQ, tx_entry, RXM_LMT_ACK_RECVD); +- tx_entry->state = RXM_LMT_ACK_RECVD; ++ assert(tx_buf->hdr.state == RXM_RNDV_TX); ++ RXM_LOG_STATE_TX(FI_LOG_CQ, tx_buf, RXM_RNDV_ACK_RECVD); ++ tx_buf->hdr.state = RXM_RNDV_ACK_RECVD; + return 0; + } + } + +-ssize_t rxm_cq_handle_data(struct rxm_rx_buf *rx_buf) ++static inline ++ssize_t rxm_cq_handle_seg_data(struct rxm_rx_buf *rx_buf) + { +- size_t i; +- int ret; ++ uint64_t done_len = ofi_copy_to_iov(rx_buf->recv_entry->rxm_iov.iov, ++ rx_buf->recv_entry->rxm_iov.count, ++ rx_buf->recv_entry->sar.total_recv_len, ++ rx_buf->pkt.data, ++ rx_buf->pkt.ctrl_hdr.seg_size); ++ rx_buf->recv_entry->sar.total_recv_len += done_len; + +- if (rx_buf->pkt.ctrl_hdr.type == ofi_ctrl_large_data) { +- if (!rx_buf->conn) { +- rx_buf->conn = rxm_key2conn(rx_buf->ep, rx_buf->pkt.ctrl_hdr.conn_id); +- if (OFI_UNLIKELY(!rx_buf->conn)) +- return -FI_EOTHER; +- } ++ if ((rxm_sar_get_seg_type(&rx_buf->pkt.ctrl_hdr) == RXM_SAR_SEG_LAST) || ++ (done_len != rx_buf->pkt.ctrl_hdr.seg_size)) { ++ dlist_remove(&rx_buf->recv_entry->sar.entry); + +- FI_DBG(&rxm_prov, FI_LOG_CQ, +- "Got incoming recv with msg_id: 0x%" PRIx64 "\n", +- rx_buf->pkt.ctrl_hdr.msg_id); ++ /* Mark rxm_recv_entry::msg_id as unknown for futher re-use */ ++ rx_buf->recv_entry->sar.msg_id = RXM_SAR_RX_INIT; + +- rx_buf->rma_iov = (struct rxm_rma_iov *)rx_buf->pkt.data; +- rx_buf->index = 0; ++ done_len = rx_buf->recv_entry->sar.total_recv_len; ++ rx_buf->recv_entry->sar.total_recv_len = 0; + +- if (!rx_buf->ep->rxm_mr_local) { +- ret = rxm_ep_msg_mr_regv(rx_buf->ep, rx_buf->recv_entry->rxm_iov.iov, +- rx_buf->recv_entry->rxm_iov.count, FI_READ, +- rx_buf->mr); +- if (ret) +- return ret; ++ return rxm_finish_recv(rx_buf, done_len); ++ } else { ++ if (rx_buf->recv_entry->sar.msg_id == RXM_SAR_RX_INIT) { ++ if (!rx_buf->conn) { ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); ++ } + +- for (i = 0; i < rx_buf->recv_entry->rxm_iov.count; i++) +- rx_buf->recv_entry->rxm_iov.desc[i] = +- fi_mr_desc(rx_buf->mr[i]); +- } else { +- for (i = 0; i < rx_buf->recv_entry->rxm_iov.count; i++) +- rx_buf->recv_entry->rxm_iov.desc[i] = +- fi_mr_desc(rx_buf->recv_entry->rxm_iov.desc[i]); ++ rx_buf->recv_entry->sar.conn = rx_buf->conn; ++ rx_buf->recv_entry->sar.msg_id = rx_buf->pkt.ctrl_hdr.msg_id; ++ ++ dlist_insert_tail(&rx_buf->recv_entry->sar.entry, ++ &rx_buf->conn->sar_rx_msg_list); + } + +- /* Ignore the case when the posted recv buffer is not large enough, +- * FI_TRUNC error will be generated to user at the end */ +- rxm_match_rma_iov(rx_buf->recv_entry, rx_buf->rma_iov, rx_buf->match_iov); +- RXM_LOG_STATE_RX(FI_LOG_CQ, rx_buf, RXM_LMT_READ); +- rx_buf->hdr.state = RXM_LMT_READ; +- return rxm_lmt_rma_read(rx_buf); +- } else { +- uint64_t done_len = ofi_copy_to_iov(rx_buf->recv_entry->rxm_iov.iov, +- rx_buf->recv_entry->rxm_iov.count, +- 0, rx_buf->pkt.data, +- rx_buf->pkt.hdr.size); +- return rxm_finish_recv(rx_buf, done_len); ++ /* The RX buffer can be reposted for further re-use */ ++ rx_buf->recv_entry = NULL; ++ rxm_rx_buf_release(rx_buf->ep, rx_buf); ++ return FI_SUCCESS; + } + } + +-static ssize_t rxm_handle_recv_comp(struct rxm_rx_buf *rx_buf) ++static inline ssize_t ++rxm_cq_rndv_read_prepare_deferred(struct rxm_deferred_tx_entry **def_tx_entry, size_t index, ++ struct iovec *iov, void *desc[RXM_IOV_LIMIT], ++ size_t count, struct rxm_rx_buf *rx_buf) + { +- struct rxm_recv_match_attr match_attr; +- struct dlist_entry *entry; +- struct util_cq *util_cq; +- struct fid_ep *msg_ep; +- struct rxm_ep *rxm_ep; ++ uint8_t i; + +- util_cq = rx_buf->ep->util_ep.rx_cq; ++ *def_tx_entry = rxm_ep_alloc_deferred_tx_entry(rx_buf->ep, rx_buf->conn, ++ RXM_DEFERRED_TX_RNDV_READ); ++ if (OFI_UNLIKELY(!*def_tx_entry)) ++ return -FI_ENOMEM; ++ ++ (*def_tx_entry)->rndv_read.rx_buf = rx_buf; ++ (*def_tx_entry)->rndv_read.rma_iov.addr = ++ rx_buf->rndv_hdr->iov[index].addr; ++ (*def_tx_entry)->rndv_read.rma_iov.key = ++ rx_buf->rndv_hdr->iov[index].key; ++ for (i = 0; i < count; i++) { ++ (*def_tx_entry)->rndv_read.rxm_iov.iov[i] = iov[i]; ++ (*def_tx_entry)->rndv_read.rxm_iov.desc[i] = desc[i]; ++ } ++ (*def_tx_entry)->rndv_read.rxm_iov.count = count; + +- if ((rx_buf->ep->rxm_info->caps & (FI_SOURCE | FI_DIRECTED_RECV)) && +- !rx_buf->conn) { +- rx_buf->conn = rxm_key2conn(rx_buf->ep, rx_buf->pkt.ctrl_hdr.conn_id); ++ return 0; ++} ++ ++static inline ++ssize_t rxm_cq_handle_large_data(struct rxm_rx_buf *rx_buf) ++{ ++ size_t i, index = 0, offset = 0, count, total_recv_len; ++ struct iovec iov[RXM_IOV_LIMIT]; ++ void *desc[RXM_IOV_LIMIT]; ++ int ret = 0; ++ ++ if (!rx_buf->conn) { ++ assert(rx_buf->ep->srx_ctx); ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); + if (OFI_UNLIKELY(!rx_buf->conn)) + return -FI_EOTHER; +- match_attr.addr = rx_buf->conn->handle.fi_addr; ++ } ++ assert(rx_buf->conn); ++ ++ FI_DBG(&rxm_prov, FI_LOG_CQ, ++ "Got incoming recv with msg_id: 0x%" PRIx64 "\n", ++ rx_buf->pkt.ctrl_hdr.msg_id); ++ ++ rx_buf->rndv_hdr = (struct rxm_rndv_hdr *)rx_buf->pkt.data; ++ rx_buf->rndv_rma_index = 0; ++ ++ if (!rx_buf->ep->rxm_mr_local) { ++ total_recv_len = MIN(rx_buf->recv_entry->total_len, ++ rx_buf->pkt.hdr.size); ++ ret = rxm_ep_msg_mr_regv_lim(rx_buf->ep, ++ rx_buf->recv_entry->rxm_iov.iov, ++ rx_buf->recv_entry->rxm_iov.count, ++ total_recv_len, ++ FI_READ, rx_buf->mr); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ for (i = 0; i < rx_buf->recv_entry->rxm_iov.count; i++) ++ rx_buf->recv_entry->rxm_iov.desc[i] = ++ fi_mr_desc(rx_buf->mr[i]); + } else { +- match_attr.addr = FI_ADDR_UNSPEC; ++ for (i = 0; i < rx_buf->recv_entry->rxm_iov.count; i++) { ++ rx_buf->recv_entry->rxm_iov.desc[i] = ++ fi_mr_desc(rx_buf->recv_entry->rxm_iov.desc[i]); ++ } ++ total_recv_len = MIN(rx_buf->recv_entry->total_len, ++ rx_buf->pkt.hdr.size); + } + +- if (rx_buf->ep->rxm_info->caps & FI_SOURCE) +- util_cq->src[ofi_cirque_windex(util_cq->cirq)] = rx_buf->conn->handle.fi_addr; ++ assert(rx_buf->rndv_hdr->count && ++ (rx_buf->rndv_hdr->count <= RXM_IOV_LIMIT)); + +- switch(rx_buf->pkt.hdr.op) { +- case ofi_op_msg: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Got MSG op\n"); +- rx_buf->recv_queue = &rx_buf->ep->recv_queue; +- break; +- case ofi_op_tagged: +- FI_DBG(&rxm_prov, FI_LOG_CQ, "Got TAGGED op\n"); +- match_attr.tag = rx_buf->pkt.hdr.tag; +- rx_buf->recv_queue = &rx_buf->ep->trecv_queue; +- break; ++ RXM_LOG_STATE_RX(FI_LOG_CQ, rx_buf, RXM_RNDV_READ); ++ rx_buf->hdr.state = RXM_RNDV_READ; ++ ++ for (i = 0; i < rx_buf->rndv_hdr->count; i++) { ++ size_t copy_len = MIN(rx_buf->rndv_hdr->iov[i].len, ++ total_recv_len); ++ ++ ret = ofi_copy_iov_desc(&iov[0], &desc[0], &count, ++ &rx_buf->recv_entry->rxm_iov.iov[0], ++ &rx_buf->recv_entry->rxm_iov.desc[0], ++ rx_buf->recv_entry->rxm_iov.count, ++ &index, &offset, copy_len); ++ if (ret) { ++ assert(ret == -FI_ETOOSMALL); ++ return rxm_cq_write_error_trunc( ++ rx_buf, rx_buf->recv_entry->total_len); ++ } ++ total_recv_len -= copy_len; ++ ret = fi_readv(rx_buf->conn->msg_ep, iov, desc, count, 0, ++ rx_buf->rndv_hdr->iov[i].addr, ++ rx_buf->rndv_hdr->iov[i].key, rx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ struct rxm_deferred_tx_entry *def_tx_entry; ++ ++ ret = rxm_cq_rndv_read_prepare_deferred( ++ &def_tx_entry, i, iov, desc, ++ count, rx_buf); ++ if (ret) ++ goto readv_err; ++ rxm_ep_enqueue_deferred_tx_queue(def_tx_entry); ++ continue; ++ } ++readv_err: ++ rxm_cq_write_error(rx_buf->ep->util_ep.rx_cq, ++ rx_buf->ep->util_ep.rx_cntr, ++ rx_buf->recv_entry->context, ret); ++ break; ++ } ++ } ++ assert(!total_recv_len); ++ return ret; ++} ++ ++static inline ++ssize_t rxm_cq_handle_data(struct rxm_rx_buf *rx_buf) ++{ ++ uint64_t done_len = ofi_copy_to_iov(rx_buf->recv_entry->rxm_iov.iov, ++ rx_buf->recv_entry->rxm_iov.count, ++ 0, rx_buf->pkt.data, ++ rx_buf->pkt.hdr.size); ++ return rxm_finish_recv(rx_buf, done_len); ++} ++ ++ssize_t rxm_cq_handle_rx_buf(struct rxm_rx_buf *rx_buf) ++{ ++ switch (rx_buf->pkt.ctrl_hdr.type) { ++ case ofi_ctrl_data: ++ return rxm_cq_handle_data(rx_buf); ++ case ofi_ctrl_large_data: ++ return rxm_cq_handle_large_data(rx_buf); ++ case ofi_ctrl_seg_data: ++ return rxm_cq_handle_seg_data(rx_buf); + default: +- FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown op!\n"); ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown message type\n"); + assert(0); + return -FI_EINVAL; + } ++} + +- fastlock_acquire(&rx_buf->recv_queue->lock); +- entry = dlist_remove_first_match(&rx_buf->recv_queue->recv_list, +- rx_buf->recv_queue->match_recv, &match_attr); ++static inline ssize_t ++rxm_cq_match_rx_buf(struct rxm_rx_buf *rx_buf, ++ struct rxm_recv_queue *recv_queue, ++ struct rxm_recv_match_attr *match_attr) ++{ ++ struct dlist_entry *entry; ++ struct rxm_ep *rxm_ep; ++ struct fid_ep *msg_ep; ++ ++ entry = dlist_remove_first_match(&recv_queue->recv_list, ++ recv_queue->match_recv, match_attr); + if (!entry) { + RXM_DBG_ADDR_TAG(FI_LOG_CQ, "No matching recv found for " +- "incoming msg", match_attr.addr, +- match_attr.tag); ++ "incoming msg", match_attr->addr, ++ match_attr->tag); + FI_DBG(&rxm_prov, FI_LOG_CQ, "Enqueueing msg to unexpected msg" + "queue\n"); +- rx_buf->unexp_msg.addr = match_attr.addr; +- rx_buf->unexp_msg.tag = match_attr.tag; ++ rx_buf->unexp_msg.addr = match_attr->addr; ++ rx_buf->unexp_msg.tag = match_attr->tag; + rx_buf->repost = 0; + +- msg_ep = rx_buf->hdr.msg_ep; ++ msg_ep = rx_buf->msg_ep; + rxm_ep = rx_buf->ep; + + dlist_insert_tail(&rx_buf->unexp_msg.entry, +- &rx_buf->recv_queue->unexp_msg_list); +- fastlock_release(&rx_buf->recv_queue->lock); ++ &recv_queue->unexp_msg_list); + +- rx_buf = rxm_rx_buf_get(rxm_ep); +- if (!rx_buf) ++ rx_buf = rxm_rx_buf_alloc(rxm_ep); ++ if (OFI_UNLIKELY(!rx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from RX buffer pool\n"); + return -FI_ENOMEM; ++ } + + rx_buf->hdr.state = RXM_RX; +- rx_buf->hdr.msg_ep = msg_ep; ++ rx_buf->msg_ep = msg_ep; + rx_buf->repost = 1; + if (!rxm_ep->srx_ctx) + rx_buf->conn = container_of(msg_ep->fid.context, + struct rxm_conn, + handle); + +- fastlock_acquire(&rx_buf->ep->util_ep.lock); +- dlist_insert_tail(&rx_buf->entry, &rxm_ep->post_rx_list); +- dlist_insert_tail(&rx_buf->repost_entry, +- &rx_buf->ep->repost_ready_list); +- fastlock_release(&rx_buf->ep->util_ep.lock); ++ rxm_rx_buf_release(rxm_ep, rx_buf); + return 0; + } +- fastlock_release(&rx_buf->recv_queue->lock); + + rx_buf->recv_entry = container_of(entry, struct rxm_recv_entry, entry); +- return rxm_cq_handle_data(rx_buf); ++ return rxm_cq_handle_rx_buf(rx_buf); ++} ++ ++static inline ssize_t rxm_handle_recv_comp(struct rxm_rx_buf *rx_buf) ++{ ++ struct rxm_recv_match_attr match_attr = { ++ .addr = FI_ADDR_UNSPEC, ++ }; ++ ++ if (rx_buf->ep->rxm_info->caps & (FI_SOURCE | FI_DIRECTED_RECV)) { ++ if (rx_buf->ep->srx_ctx) ++ rx_buf->conn = ++ rxm_key2conn(rx_buf->ep, rx_buf->pkt.ctrl_hdr.conn_id); ++ if (OFI_UNLIKELY(!rx_buf->conn)) ++ return -FI_EOTHER; ++ match_attr.addr = rx_buf->conn->handle.fi_addr; ++ } ++ ++ if (rx_buf->ep->rxm_info->mode & FI_BUFFERED_RECV) ++ return rxm_finish_buf_recv(rx_buf); ++ ++ switch(rx_buf->pkt.hdr.op) { ++ case ofi_op_msg: ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "Got MSG op\n"); ++ return rxm_cq_match_rx_buf(rx_buf, &rx_buf->ep->recv_queue, ++ &match_attr); ++ case ofi_op_tagged: ++ FI_DBG(&rxm_prov, FI_LOG_CQ, "Got TAGGED op\n"); ++ match_attr.tag = rx_buf->pkt.hdr.tag; ++ return rxm_cq_match_rx_buf(rx_buf, &rx_buf->ep->trecv_queue, ++ &match_attr); ++ default: ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown op!\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++} ++ ++static int rxm_sar_match_msg_id(struct dlist_entry *item, const void *arg) ++{ ++ uint64_t msg_id = *((uint64_t *)arg); ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, sar.entry); ++ return (msg_id == recv_entry->sar.msg_id); + } + +-static ssize_t rxm_lmt_send_ack(struct rxm_rx_buf *rx_buf) ++static inline ++ssize_t rxm_sar_handle_segment(struct rxm_rx_buf *rx_buf) ++{ ++ struct dlist_entry *sar_entry; ++ ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); ++ if (OFI_UNLIKELY(!rx_buf->conn)) ++ return -FI_EOTHER; ++ FI_DBG(&rxm_prov, FI_LOG_CQ, ++ "Got incoming recv with msg_id: 0x%" PRIx64 "for conn - %p\n", ++ rx_buf->pkt.ctrl_hdr.msg_id, rx_buf->conn); ++ sar_entry = dlist_find_first_match(&rx_buf->conn->sar_rx_msg_list, ++ rxm_sar_match_msg_id, ++ &rx_buf->pkt.ctrl_hdr.msg_id); ++ if (!sar_entry) ++ return rxm_handle_recv_comp(rx_buf); ++ rx_buf->recv_entry = ++ container_of(sar_entry, struct rxm_recv_entry, sar.entry); ++ return rxm_cq_handle_seg_data(rx_buf); ++} ++ ++static ssize_t rxm_rndv_send_ack(struct rxm_rx_buf *rx_buf) + { +- struct rxm_tx_entry *tx_entry; +- struct rxm_tx_buf *tx_buf; + ssize_t ret; + + assert(rx_buf->conn); + +- tx_buf = rxm_tx_buf_get(rx_buf->ep, RXM_BUF_POOL_TX_ACK); +- if (OFI_UNLIKELY(!tx_buf)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, "TX queue full!\n"); ++ rx_buf->recv_entry->rndv.tx_buf = (struct rxm_tx_base_buf *) ++ rxm_tx_buf_alloc(rx_buf->ep, RXM_BUF_POOL_TX_ACK); ++ if (OFI_UNLIKELY(!rx_buf->recv_entry->rndv.tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Ran out of buffers from ACK buffer pool\n"); + return -FI_EAGAIN; + } +- assert(tx_buf->pkt.ctrl_hdr.type == ofi_ctrl_ack); ++ assert(rx_buf->recv_entry->rndv.tx_buf->pkt.ctrl_hdr.type == ofi_ctrl_ack); + +- tx_entry = rxm_tx_entry_get(&rx_buf->ep->send_queue); +- if (OFI_UNLIKELY(!tx_entry)) { +- ret = -FI_EAGAIN; +- goto err1; +- } ++ RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_RNDV_READ, RXM_RNDV_ACK_SENT); ++ rx_buf->hdr.state = RXM_RNDV_ACK_SENT; + +- RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_LMT_READ, RXM_LMT_ACK_SENT); +- rx_buf->hdr.state = RXM_LMT_ACK_SENT; ++ rx_buf->recv_entry->rndv.tx_buf->pkt.ctrl_hdr.conn_id = ++ rx_buf->conn->handle.remote_key; ++ rx_buf->recv_entry->rndv.tx_buf->pkt.ctrl_hdr.msg_id = ++ rx_buf->pkt.ctrl_hdr.msg_id; + +- tx_entry->state = rx_buf->hdr.state; +- tx_entry->context = rx_buf; +- tx_entry->tx_buf = tx_buf; +- +- tx_buf->pkt.ctrl_hdr.conn_id = rx_buf->conn->handle.remote_key; +- tx_buf->pkt.ctrl_hdr.msg_id = rx_buf->pkt.ctrl_hdr.msg_id; +- +- ret = fi_send(rx_buf->conn->msg_ep, &tx_buf->pkt, sizeof(tx_buf->pkt), +- tx_buf->hdr.desc, 0, tx_entry); ++ ret = fi_send(rx_buf->conn->msg_ep, &rx_buf->recv_entry->rndv.tx_buf->pkt, ++ sizeof(rx_buf->recv_entry->rndv.tx_buf->pkt), ++ rx_buf->recv_entry->rndv.tx_buf->hdr.desc, 0, rx_buf); + if (OFI_UNLIKELY(ret)) { + FI_WARN(&rxm_prov, FI_LOG_CQ, "Unable to send ACK\n"); +- goto err2; ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ struct rxm_deferred_tx_entry *def_tx_entry = ++ rxm_ep_alloc_deferred_tx_entry(rx_buf->ep, rx_buf->conn, ++ RXM_DEFERRED_TX_RNDV_ACK); ++ if (OFI_UNLIKELY(!def_tx_entry)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to allocate TX entry for deferred ACK\n"); ++ ret = -FI_EAGAIN; ++ goto err; ++ } ++ ++ def_tx_entry->rndv_ack.rx_buf = rx_buf; ++ rxm_ep_enqueue_deferred_tx_queue(def_tx_entry); ++ ++ return 0; ++ } ++ goto err; + } + return 0; +-err2: +- rxm_tx_entry_release(&rx_buf->ep->send_queue, tx_entry); +-err1: +- rxm_tx_buf_release(rx_buf->ep, tx_buf); ++err: ++ rxm_tx_buf_release(rx_buf->ep, RXM_BUF_POOL_TX_ACK, ++ rx_buf->recv_entry->rndv.tx_buf); + return ret; + } + +-static ssize_t rxm_lmt_send_ack_fast(struct rxm_rx_buf *rx_buf) ++static ssize_t rxm_rndv_send_ack_fast(struct rxm_rx_buf *rx_buf) + { + struct rxm_pkt pkt; + ssize_t ret; + + assert(rx_buf->conn); + +- RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_LMT_READ, RXM_LMT_ACK_SENT); ++ RXM_LOG_STATE(FI_LOG_CQ, rx_buf->pkt, RXM_RNDV_READ, RXM_RNDV_ACK_SENT); + + pkt.hdr.op = ofi_op_msg; + pkt.hdr.version = OFI_OP_VERSION; +- pkt.ctrl_hdr.version = OFI_CTRL_VERSION; ++ pkt.ctrl_hdr.version = RXM_CTRL_VERSION; + pkt.ctrl_hdr.type = ofi_ctrl_ack; + pkt.ctrl_hdr.conn_id = rx_buf->conn->handle.remote_key; + pkt.ctrl_hdr.msg_id = rx_buf->pkt.ctrl_hdr.msg_id; +@@ -571,14 +726,20 @@ static ssize_t rxm_lmt_send_ack_fast(struct rxm_rx_buf *rx_buf) + if (OFI_UNLIKELY(ret)) { + FI_DBG(&rxm_prov, FI_LOG_EP_DATA, + "fi_inject(ack pkt) for MSG provider failed\n"); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ /* Issues the normal RNDV ACK sending to allocate the ++ * TX entry, send it out or insert it to deferred ++ * TX queue for the further processing */ ++ return rxm_rndv_send_ack(rx_buf); ++ } + return ret; + } + +- return rxm_finish_send_lmt_ack(rx_buf); ++ return rxm_finish_send_rndv_ack(rx_buf); + } + + static int rxm_handle_remote_write(struct rxm_ep *rxm_ep, +- struct fi_cq_tagged_entry *comp) ++ struct fi_cq_data_entry *comp) + { + int ret; + +@@ -590,74 +751,329 @@ static int rxm_handle_remote_write(struct rxm_ep *rxm_ep, + "Unable to write remote write completion\n"); + return ret; + } +- rxm_cntr_inc(rxm_ep->util_ep.rem_wr_cntr); +- if (comp->op_context) { +- fastlock_acquire(&rxm_ep->util_ep.lock); +- dlist_insert_tail(&((struct rxm_rx_buf *) +- comp->op_context)->repost_entry, +- &rxm_ep->repost_ready_list); +- fastlock_release(&rxm_ep->util_ep.lock); +- } ++ ofi_ep_rem_wr_cntr_inc(&rxm_ep->util_ep); ++ if (comp->op_context) ++ rxm_rx_buf_release(rxm_ep, comp->op_context); + return 0; + } + ++static inline void rxm_ep_format_atomic_resp_pkt_hdr(struct rxm_conn *rxm_conn, ++ struct rxm_tx_atomic_buf *tx_buf, ++ size_t data_len, uint32_t pkt_op, ++ enum fi_datatype datatype, uint8_t atomic_op) ++{ ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, pkt_op, 0, 0, 0, ++ &tx_buf->pkt); ++ tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_atomic_resp; ++ tx_buf->pkt.hdr.op = pkt_op; ++ tx_buf->pkt.hdr.atomic.datatype = datatype; ++ tx_buf->pkt.hdr.atomic.op = atomic_op; ++ tx_buf->pkt.hdr.atomic.ioc_count = 0; ++} ++ ++static ssize_t rxm_atomic_send_resp(struct rxm_ep *rxm_ep, ++ struct rxm_rx_buf *rx_buf, ++ struct rxm_tx_atomic_buf *resp_buf, ++ ssize_t result_len, uint32_t status) ++{ ++ struct rxm_deferred_tx_entry *def_tx_entry; ++ struct rxm_atomic_resp_hdr *atomic_hdr; ++ ssize_t ret; ++ ssize_t resp_len = result_len + sizeof(struct rxm_atomic_resp_hdr) + ++ sizeof(struct rxm_pkt); ++ ++ resp_buf->hdr.state = RXM_ATOMIC_RESP_SENT; ++ rxm_ep_format_atomic_resp_pkt_hdr(rx_buf->conn, ++ resp_buf, ++ resp_len, ++ rx_buf->pkt.hdr.op, ++ rx_buf->pkt.hdr.atomic.datatype, ++ rx_buf->pkt.hdr.atomic.op); ++ resp_buf->pkt.ctrl_hdr.conn_id = rx_buf->conn->handle.remote_key; ++ resp_buf->pkt.ctrl_hdr.msg_id = rx_buf->pkt.ctrl_hdr.msg_id; ++ atomic_hdr = (struct rxm_atomic_resp_hdr *) resp_buf->pkt.data; ++ atomic_hdr->status = htonl(status); ++ atomic_hdr->result_len = htonl(result_len); ++ ++ if (resp_len < rxm_ep->inject_limit) { ++ ret = fi_inject(rx_buf->conn->msg_ep, &resp_buf->pkt, ++ resp_len, 0); ++ if (OFI_LIKELY(!ret)) ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, ++ resp_buf); ++ } else { ++ ret = rxm_atomic_send_respmsg(rxm_ep, rx_buf->conn, resp_buf, ++ resp_len); ++ } ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to send Atomic Response\n"); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ def_tx_entry = ++ rxm_ep_alloc_deferred_tx_entry(rxm_ep, ++ rx_buf->conn, ++ RXM_DEFERRED_TX_ATOMIC_RESP); ++ if (OFI_UNLIKELY(!def_tx_entry)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to allocate deferred Atomic " ++ "Response\n"); ++ return -FI_ENOMEM; ++ } ++ ++ def_tx_entry->atomic_resp.tx_buf = resp_buf; ++ def_tx_entry->atomic_resp.len = resp_len; ++ rxm_ep_enqueue_deferred_tx_queue(def_tx_entry); ++ ret = 0; ++ } ++ } ++ rxm_rx_buf_release(rxm_ep, rx_buf); ++ ++ return ret; ++} ++ ++static inline void rxm_do_atomic(struct rxm_pkt *pkt, void *dst, void *src, ++ void *cmp, void *res, size_t count, ++ enum fi_datatype datatype, enum fi_op op) ++{ ++ switch (pkt->hdr.op) { ++ case ofi_op_atomic: ++ ofi_atomic_write_handlers[op][datatype](dst, src, count); ++ break; ++ case ofi_op_atomic_fetch: ++ ofi_atomic_readwrite_handlers[op][datatype](dst, src, res, ++ count); ++ break; ++ case ofi_op_atomic_compare: ++ ofi_atomic_swap_handlers[op - OFI_SWAP_OP_START][datatype](dst, ++ src, cmp, res, count); ++ break; ++ default: ++ /* Validated prior to calling function */ ++ break; ++ } ++} ++ ++static inline ssize_t rxm_handle_atomic_req(struct rxm_ep *rxm_ep, ++ struct rxm_rx_buf *rx_buf) ++{ ++ struct rxm_atomic_hdr *req_hdr = ++ (struct rxm_atomic_hdr *) rx_buf->pkt.data; ++ enum fi_datatype datatype = rx_buf->pkt.hdr.atomic.datatype; ++ enum fi_op atomic_op = rx_buf->pkt.hdr.atomic.op; ++ size_t datatype_sz = ofi_datatype_size(datatype); ++ size_t len; ++ ssize_t result_len; ++ uint64_t offset; ++ int i; ++ int ret = 0; ++ struct rxm_tx_atomic_buf *resp_buf; ++ struct rxm_atomic_resp_hdr *resp_hdr; ++ struct rxm_domain *domain = container_of(rxm_ep->util_ep.domain, ++ struct rxm_domain, util_domain); ++ ++ assert(!(rx_buf->comp_flags & ++ ~(FI_RECV | FI_RECV | FI_REMOTE_CQ_DATA))); ++ assert(rx_buf->pkt.hdr.op == ofi_op_atomic || ++ rx_buf->pkt.hdr.op == ofi_op_atomic_fetch || ++ rx_buf->pkt.hdr.op == ofi_op_atomic_compare); ++ ++ if (rx_buf->ep->srx_ctx) ++ rx_buf->conn = rxm_key2conn(rx_buf->ep, ++ rx_buf->pkt.ctrl_hdr.conn_id); ++ if (OFI_UNLIKELY(!rx_buf->conn)) ++ return -FI_EOTHER; ++ ++ resp_buf = (struct rxm_tx_atomic_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_ATOMIC); ++ if (OFI_UNLIKELY(!resp_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Unable to allocate from Atomic buffer pool\n"); ++ /* TODO: Should this be -FI_ENOMEM - how does it get ++ * processed again */ ++ return -FI_EAGAIN; ++ } ++ ++ for (i = 0; i < rx_buf->pkt.hdr.atomic.ioc_count; i++) { ++ ret = ofi_mr_verify(&domain->util_domain.mr_map, ++ req_hdr->rma_ioc[i].count * datatype_sz, ++ (uintptr_t *)&req_hdr->rma_ioc[i].addr, ++ req_hdr->rma_ioc[i].key, ++ ofi_rx_mr_reg_flags(rx_buf->pkt.hdr.op, ++ atomic_op)); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Atomic RMA MR verify error %d\n", ret); ++ ret = -FI_EACCES; ++ goto send_nak; ++ } ++ } ++ ++ len = ofi_total_rma_ioc_cnt(req_hdr->rma_ioc, ++ rx_buf->pkt.hdr.atomic.ioc_count) * datatype_sz; ++ resp_hdr = (struct rxm_atomic_resp_hdr *) resp_buf->pkt.data; ++ ++ for (i = 0, offset = 0; i < rx_buf->pkt.hdr.atomic.ioc_count; i++) { ++ rxm_do_atomic(&rx_buf->pkt, ++ (uintptr_t *) req_hdr->rma_ioc[i].addr, ++ req_hdr->data + offset, ++ req_hdr->data + len + offset, ++ resp_hdr->data + offset, ++ req_hdr->rma_ioc[i].count, datatype, atomic_op); ++ offset += req_hdr->rma_ioc[i].count * datatype_sz; ++ } ++ result_len = rx_buf->pkt.hdr.op == ofi_op_atomic ? 0 : offset; ++ ++ if (rx_buf->pkt.hdr.op == ofi_op_atomic) ++ ofi_ep_rem_wr_cntr_inc(&rxm_ep->util_ep); ++ else ++ ofi_ep_rem_rd_cntr_inc(&rxm_ep->util_ep); ++ ++ return rxm_atomic_send_resp(rxm_ep, rx_buf, resp_buf, ++ result_len, FI_SUCCESS); ++send_nak: ++ return rxm_atomic_send_resp(rxm_ep, rx_buf, resp_buf, 0, ret); ++} ++ ++ ++static inline ssize_t rxm_handle_atomic_resp(struct rxm_ep *rxm_ep, ++ struct rxm_rx_buf *rx_buf) ++{ ++ struct rxm_tx_atomic_buf *tx_buf; ++ struct rxm_atomic_resp_hdr *resp_hdr = ++ (struct rxm_atomic_resp_hdr *) rx_buf->pkt.data; ++ uint64_t len; ++ int ret = 0; ++ ++ tx_buf = rxm_msg_id_2_tx_buf(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, ++ rx_buf->pkt.ctrl_hdr.msg_id); ++ FI_DBG(&rxm_prov, FI_LOG_CQ, ++ "Received Atomic Response for msg_id: 0x%" PRIx64 "\n", ++ rx_buf->pkt.ctrl_hdr.msg_id); ++ ++ assert(!(rx_buf->comp_flags & ~(FI_RECV | FI_REMOTE_CQ_DATA))); ++ ++ if (resp_hdr->status) { ++ FI_DBG(&rxm_prov, FI_LOG_CQ, ++ "Bad Atomic response status %d\n", ntohl(resp_hdr->status)); ++ rxm_cq_write_error(rxm_ep->util_ep.tx_cq, ++ rxm_ep->util_ep.tx_cntr, ++ tx_buf->app_context, ntohl(resp_hdr->status)); ++ goto done; ++ } ++ ++ len = ofi_total_iov_len(tx_buf->result_iov, tx_buf->result_iov_count); ++ assert(ntohl(resp_hdr->result_len) == len); ++ ofi_copy_to_iov(tx_buf->result_iov, tx_buf->result_iov_count, 0, ++ resp_hdr->data, len); ++ ++ if (!(tx_buf->flags & FI_INJECT)) ++ ret = rxm_cq_tx_comp_write(rxm_ep, ++ ofi_tx_cq_flags(tx_buf->pkt.hdr.op), ++ tx_buf->app_context, tx_buf->flags); ++done: ++ if (tx_buf->pkt.hdr.atomic.op == ofi_op_atomic) ++ ofi_ep_wr_cntr_inc(&rxm_ep->util_ep); ++ else ++ ofi_ep_rd_cntr_inc(&rxm_ep->util_ep); ++ ++ rxm_rx_buf_release(rxm_ep, rx_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, tx_buf); ++ ++ return ret; ++} ++ + static ssize_t rxm_cq_handle_comp(struct rxm_ep *rxm_ep, +- struct fi_cq_tagged_entry *comp) ++ struct fi_cq_data_entry *comp) + { +- struct rxm_rx_buf *rx_buf = comp->op_context; +- struct rxm_tx_entry *tx_entry = comp->op_context; ++ ssize_t ret; ++ struct rxm_rx_buf *rx_buf; ++ struct rxm_tx_sar_buf *tx_sar_buf; ++ struct rxm_tx_eager_buf *tx_eager_buf; ++ struct rxm_tx_rndv_buf *tx_rndv_buf; ++ struct rxm_tx_atomic_buf *tx_atomic_buf; ++ struct rxm_rma_buf *rma_buf; + + /* Remote write events may not consume a posted recv so op context + * and hence state would be NULL */ + if (comp->flags & FI_REMOTE_WRITE) + return rxm_handle_remote_write(rxm_ep, comp); + +- switch (RXM_GET_PROTO_STATE(comp)) { +- case RXM_TX_NOBUF: +- assert(comp->flags & (FI_SEND | FI_WRITE | FI_READ)); +- if (tx_entry->ep->msg_mr_local && !tx_entry->ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); +- return rxm_finish_send_nobuf(tx_entry); ++ switch (RXM_GET_PROTO_STATE(comp->op_context)) { + case RXM_TX: ++ case RXM_INJECT_TX: ++ tx_eager_buf = comp->op_context; + assert(comp->flags & FI_SEND); +- return rxm_finish_send(tx_entry); +- case RXM_TX_RMA: +- assert(comp->flags & (FI_WRITE | FI_READ)); +- if (tx_entry->ep->msg_mr_local && !tx_entry->ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); +- rxm_rma_buf_release(rxm_ep, tx_entry->rma_buf); +- return rxm_finish_send_nobuf(tx_entry); ++ ret = rxm_finish_eager_send(rxm_ep, tx_eager_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX, tx_eager_buf); ++ return ret; ++ case RXM_SAR_TX: ++ tx_sar_buf = comp->op_context; ++ assert(comp->flags & FI_SEND); ++ return rxm_finish_sar_segment_send(rxm_ep, tx_sar_buf); ++ case RXM_RMA: ++ rma_buf = comp->op_context; ++ assert((comp->flags & (FI_WRITE | FI_RMA)) || ++ (comp->flags & (FI_READ | FI_RMA))); ++ return rxm_finish_rma(rxm_ep, rma_buf, comp->flags); + case RXM_RX: ++ rx_buf = comp->op_context; + assert(!(comp->flags & FI_REMOTE_READ)); + assert((rx_buf->pkt.hdr.version == OFI_OP_VERSION) && +- (rx_buf->pkt.ctrl_hdr.version == OFI_CTRL_VERSION)); ++ (rx_buf->pkt.ctrl_hdr.version == RXM_CTRL_VERSION)); + +- if (rx_buf->pkt.ctrl_hdr.type == ofi_ctrl_ack) +- return rxm_lmt_handle_ack(rx_buf); +- else ++ switch (rx_buf->pkt.ctrl_hdr.type) { ++ case ofi_ctrl_data: ++ case ofi_ctrl_large_data: + return rxm_handle_recv_comp(rx_buf); +- case RXM_LMT_TX: ++ case ofi_ctrl_ack: ++ return rxm_rndv_handle_ack(rxm_ep, rx_buf); ++ case ofi_ctrl_seg_data: ++ return rxm_sar_handle_segment(rx_buf); ++ case ofi_ctrl_atomic: ++ return rxm_handle_atomic_req(rxm_ep, rx_buf); ++ case ofi_ctrl_atomic_resp: ++ return rxm_handle_atomic_resp(rxm_ep, rx_buf); ++ default: ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unknown message type\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ case RXM_RNDV_TX: ++ tx_rndv_buf = comp->op_context; + assert(comp->flags & FI_SEND); +- RXM_LOG_STATE_TX(FI_LOG_CQ, tx_entry, RXM_LMT_ACK_WAIT); +- RXM_SET_PROTO_STATE(comp, RXM_LMT_ACK_WAIT); ++ RXM_LOG_STATE_TX(FI_LOG_CQ, tx_rndv_buf, RXM_RNDV_ACK_WAIT); ++ RXM_SET_PROTO_STATE(comp, RXM_RNDV_ACK_WAIT); + return 0; +- case RXM_LMT_ACK_RECVD: ++ case RXM_RNDV_ACK_RECVD: ++ tx_rndv_buf = comp->op_context; + assert(comp->flags & FI_SEND); +- return rxm_lmt_tx_finish(tx_entry); +- case RXM_LMT_READ: ++ return rxm_rndv_tx_finish(rxm_ep, tx_rndv_buf); ++ case RXM_RNDV_READ: ++ rx_buf = comp->op_context; + assert(comp->flags & FI_READ); +- if (rx_buf->index < rx_buf->rma_iov->count) +- return rxm_lmt_rma_read(rx_buf); +- else if (sizeof(rx_buf->pkt) > rxm_ep->msg_info->tx_attr->inject_size) +- return rxm_lmt_send_ack(rx_buf); ++ if (++rx_buf->rndv_rma_index < rx_buf->rndv_hdr->count) ++ return 0; ++ else if (sizeof(rx_buf->pkt) <= rxm_ep->inject_limit) ++ return rxm_rndv_send_ack_fast(rx_buf); + else +- return rxm_lmt_send_ack_fast(rx_buf); +- case RXM_LMT_ACK_SENT: ++ return rxm_rndv_send_ack(rx_buf); ++ case RXM_RNDV_ACK_SENT: ++ rx_buf = comp->op_context; ++ assert(comp->flags & FI_SEND); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ACK, ++ rx_buf->recv_entry->rndv.tx_buf); ++ return rxm_finish_send_rndv_ack(rx_buf); ++ case RXM_ATOMIC_RESP_SENT: ++ tx_atomic_buf = comp->op_context; ++ assert(comp->flags & FI_SEND); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_ATOMIC, ++ tx_atomic_buf); ++ return 0; ++ case RXM_ATOMIC_RESP_WAIT: ++ /* Optional atomic request completion; TX completion ++ * processing is performed when atomic response is received */ + assert(comp->flags & FI_SEND); +- rx_buf = tx_entry->context; +- rxm_tx_buf_release(rx_buf->ep, tx_entry->tx_buf); +- rxm_tx_entry_release(&tx_entry->ep->send_queue, tx_entry); +- return rxm_finish_send_lmt_ack(rx_buf); ++ return 0; + default: + FI_WARN(&rxm_prov, FI_LOG_CQ, "Invalid state!\n"); + assert(0); +@@ -665,81 +1081,149 @@ static ssize_t rxm_cq_handle_comp(struct rxm_ep *rxm_ep, + } + } + +-static ssize_t rxm_cq_write_error(struct fid_cq *msg_cq, +- struct fi_cq_tagged_entry *comp, +- ssize_t err) ++void rxm_cq_write_error(struct util_cq *cq, struct util_cntr *cntr, ++ void *op_context, int err) ++{ ++ struct fi_cq_err_entry err_entry = {0}; ++ err_entry.op_context = op_context; ++ err_entry.prov_errno = err; ++ err_entry.err = err; ++ ++ if (cntr) ++ rxm_cntr_incerr(cntr); ++ if (ofi_cq_write_error(cq, &err_entry)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unable to ofi_cq_write_error\n"); ++ assert(0); ++ } ++} ++ ++static void rxm_cq_write_error_all(struct rxm_ep *rxm_ep, int err) ++{ ++ struct fi_cq_err_entry err_entry = {0}; ++ ssize_t ret = 0; ++ ++ err_entry.prov_errno = err; ++ err_entry.err = err; ++ if (rxm_ep->util_ep.tx_cq) { ++ ret = ofi_cq_write_error(rxm_ep->util_ep.tx_cq, &err_entry); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to ofi_cq_write_error\n"); ++ assert(0); ++ } ++ } ++ if (rxm_ep->util_ep.rx_cq) { ++ ret = ofi_cq_write_error(rxm_ep->util_ep.rx_cq, &err_entry); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to ofi_cq_write_error\n"); ++ assert(0); ++ } ++ } ++ if (rxm_ep->util_ep.tx_cntr) ++ rxm_cntr_incerr(rxm_ep->util_ep.tx_cntr); ++ ++ if (rxm_ep->util_ep.rx_cntr) ++ rxm_cntr_incerr(rxm_ep->util_ep.rx_cntr); ++ ++ if (rxm_ep->util_ep.wr_cntr) ++ rxm_cntr_incerr(rxm_ep->util_ep.wr_cntr); ++ ++ if (rxm_ep->util_ep.rd_cntr) ++ rxm_cntr_incerr(rxm_ep->util_ep.rd_cntr); ++} ++ ++#define RXM_IS_PROTO_STATE_TX(state) \ ++ ((state == RXM_SAR_TX) || \ ++ (state == RXM_TX) || \ ++ (state == RXM_RNDV_TX)) ++ ++static void rxm_cq_read_write_error(struct rxm_ep *rxm_ep) + { +- struct rxm_tx_entry *tx_entry; ++ struct rxm_tx_eager_buf *eager_buf; ++ struct rxm_tx_sar_buf *sar_buf; ++ struct rxm_tx_rndv_buf *rndv_buf; + struct rxm_rx_buf *rx_buf; +- struct fi_cq_err_entry err_entry; +- struct util_cq *util_cq; ++ struct fi_cq_err_entry err_entry = {0}; ++ struct util_cq *util_cq = NULL; + struct util_cntr *util_cntr = NULL; +- void *op_context; ++ enum rxm_proto_state state = RXM_GET_PROTO_STATE(err_entry.op_context); + ssize_t ret; + +- op_context = comp->op_context; +- memset(&err_entry, 0, sizeof(err_entry)); ++ RXM_CQ_READERR(&rxm_prov, FI_LOG_CQ, rxm_ep->msg_cq, ret, ++ err_entry); ++ if (ret < 0) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to fi_cq_readerr on msg cq\n"); ++ rxm_cq_write_error_all(rxm_ep, (int)ret); ++ return; ++ } + +- if (err == -FI_EAVAIL) { +- OFI_CQ_READERR(&rxm_prov, FI_LOG_CQ, msg_cq, ret, err_entry); +- if (ret < 0) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to fi_cq_readerr on msg cq\n"); +- err_entry.prov_errno = (int)ret; +- err = ret; +- } else { +- op_context = err_entry.op_context; +- } +- } else { +- err_entry.prov_errno = (int)err; ++ if (RXM_IS_PROTO_STATE_TX(state)) { ++ util_cq = rxm_ep->util_ep.tx_cq; ++ util_cntr = rxm_ep->util_ep.tx_cntr; + } + +- switch (RXM_GET_PROTO_STATE(comp)) { ++ switch (state) { ++ case RXM_SAR_TX: ++ assert(err_entry.flags & FI_SEND); ++ sar_buf = err_entry.op_context; ++ err_entry.op_context = sar_buf->app_context; ++ err_entry.flags = ofi_tx_cq_flags(sar_buf->pkt.hdr.op); ++ break; + case RXM_TX: +- case RXM_LMT_TX: +- tx_entry = (struct rxm_tx_entry *)op_context; +- util_cq = tx_entry->ep->util_ep.tx_cq; +- if (tx_entry->ep->util_ep.flags & OFI_CNTR_ENABLED) { +- if (tx_entry->comp_flags & FI_SEND) +- util_cntr = tx_entry->ep->util_ep.tx_cntr; +- else if (tx_entry->comp_flags & FI_WRITE) +- util_cntr = tx_entry->ep->util_ep.wr_cntr; +- else +- util_cntr = tx_entry->ep->util_ep.rd_cntr; +- } ++ assert(err_entry.flags & FI_SEND); ++ eager_buf = err_entry.op_context; ++ err_entry.op_context = eager_buf->app_context; ++ err_entry.flags = ofi_tx_cq_flags(eager_buf->pkt.hdr.op); + break; +- case RXM_LMT_ACK_SENT: +- tx_entry = (struct rxm_tx_entry *)op_context; +- util_cq = tx_entry->ep->util_ep.rx_cq; +- util_cntr = tx_entry->ep->util_ep.rx_cntr; ++ case RXM_RNDV_TX: ++ assert(err_entry.flags & FI_SEND); ++ rndv_buf = err_entry.op_context; ++ err_entry.op_context = rndv_buf->app_context; ++ err_entry.flags = ofi_tx_cq_flags(rndv_buf->pkt.hdr.op); + break; ++ case RXM_RNDV_ACK_SENT: ++ /* fall through */ + case RXM_RX: +- case RXM_LMT_READ: +- rx_buf = (struct rxm_rx_buf *)op_context; ++ /* fall through */ ++ case RXM_RNDV_READ: ++ assert(((state == RXM_RNDV_ACK_SENT) && (err_entry.flags & FI_SEND)) || ++ ((state == RXM_RX) && (err_entry.flags & FI_RECV)) || ++ ((state == RXM_RNDV_READ) && (err_entry.flags & FI_READ))); ++ rx_buf = (struct rxm_rx_buf *)err_entry.op_context; + util_cq = rx_buf->ep->util_ep.rx_cq; + util_cntr = rx_buf->ep->util_ep.rx_cntr; ++ err_entry.op_context = rx_buf->recv_entry->context; ++ err_entry.flags = rx_buf->recv_entry->comp_flags; + break; + default: + FI_WARN(&rxm_prov, FI_LOG_CQ, "Invalid state!\n"); +- if (err == -FI_EAVAIL) +- FI_WARN(&rxm_prov, FI_LOG_CQ, "msg cq error info: %s\n", +- fi_cq_strerror(msg_cq, err_entry.prov_errno, +- err_entry.err_data, NULL, 0)); +- return -FI_EOPBADSTATE; ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "msg cq error info: %s\n", ++ fi_cq_strerror(rxm_ep->msg_cq, err_entry.prov_errno, ++ err_entry.err_data, NULL, 0)); ++ rxm_cq_write_error_all(rxm_ep, -FI_EOPBADSTATE); ++ } ++ if (util_cntr) ++ rxm_cntr_incerr(util_cntr); ++ if (util_cq) { ++ ret = ofi_cq_write_error(util_cq, &err_entry); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, "Unable to ofi_cq_write_error\n"); ++ assert(0); ++ } + } +- rxm_cntr_incerr(util_cntr); +- return ofi_cq_write_error(util_cq, &err_entry); + } + + static inline int rxm_ep_repost_buf(struct rxm_rx_buf *rx_buf) + { +- rx_buf->conn = NULL; ++ if (rx_buf->ep->srx_ctx) ++ rx_buf->conn = NULL; + rx_buf->hdr.state = RXM_RX; + +- if (fi_recv(rx_buf->hdr.msg_ep, &rx_buf->pkt, +- rx_buf->ep->rxm_info->tx_attr->inject_size + +- sizeof(struct rxm_pkt), rx_buf->hdr.desc, +- FI_ADDR_UNSPEC, rx_buf)) { ++ if (fi_recv(rx_buf->msg_ep, &rx_buf->pkt, ++ rx_buf->ep->eager_limit + sizeof(struct rxm_pkt), ++ rx_buf->hdr.desc, FI_ADDR_UNSPEC, rx_buf)) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to repost buf\n"); + return -FI_EAVAIL; + } +@@ -753,188 +1237,82 @@ int rxm_ep_prepost_buf(struct rxm_ep *rxm_ep, struct fid_ep *msg_ep) + size_t i; + + for (i = 0; i < rxm_ep->msg_info->rx_attr->size; i++) { +- rx_buf = rxm_rx_buf_get(rxm_ep); +- if (OFI_UNLIKELY(!rx_buf)) ++ rx_buf = rxm_rx_buf_alloc(rxm_ep); ++ if (OFI_UNLIKELY(!rx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from RX buffer pool\n"); + return -FI_ENOMEM; ++ } + + rx_buf->hdr.state = RXM_RX; +- rx_buf->hdr.msg_ep = msg_ep; ++ rx_buf->msg_ep = msg_ep; + rx_buf->repost = 1; + ++ if (!rxm_ep->srx_ctx) ++ rx_buf->conn = container_of(msg_ep->fid.context, ++ struct rxm_conn, ++ handle); + ret = rxm_ep_repost_buf(rx_buf); + if (ret) { +- rxm_rx_buf_release(rxm_ep, rx_buf); ++ rxm_buf_release(&rxm_ep->buf_pools[RXM_BUF_POOL_RX], ++ &rx_buf->hdr); + return ret; + } +- dlist_insert_tail(&rx_buf->entry, &rxm_ep->post_rx_list); + } + return 0; + } + +-static inline void rxm_cq_repost_rx_buffers(struct rxm_ep *rxm_ep) ++void rxm_ep_do_progress(struct util_ep *util_ep) + { ++ struct rxm_ep *rxm_ep = container_of(util_ep, struct rxm_ep, util_ep); ++ struct fi_cq_data_entry comp; ++ struct dlist_entry *conn_entry_tmp; ++ struct rxm_conn *rxm_conn; + struct rxm_rx_buf *buf; +- fastlock_acquire(&rxm_ep->util_ep.lock); ++ ssize_t ret; ++ size_t comp_read = 0; ++ ++ if (!slistfd_empty(&rxm_ep->msg_eq_entry_list)) ++ rxm_conn_process_eq_events(rxm_ep); ++ + while (!dlist_empty(&rxm_ep->repost_ready_list)) { + dlist_pop_front(&rxm_ep->repost_ready_list, struct rxm_rx_buf, + buf, repost_entry); + (void) rxm_ep_repost_buf(buf); + } +- fastlock_release(&rxm_ep->util_ep.lock); +-} +- +-static int rxm_cq_reprocess_directed_recvs(struct rxm_recv_queue *recv_queue) +-{ +- struct rxm_rx_buf *rx_buf; +- struct dlist_entry *entry, *tmp_entry; +- struct rxm_recv_match_attr match_attr; +- struct dlist_entry rx_buf_list; +- struct fi_cq_err_entry err_entry = {0}; +- int ret, count = 0; +- +- dlist_init(&rx_buf_list); +- +- fastlock_acquire(&recv_queue->rxm_ep->util_ep.cmap->lock); +- fastlock_acquire(&recv_queue->lock); +- +- dlist_foreach_container_safe(&recv_queue->unexp_msg_list, +- struct rxm_rx_buf, rx_buf, +- unexp_msg.entry, tmp_entry) { +- if (rx_buf->unexp_msg.addr == rx_buf->conn->handle.fi_addr) +- continue; +- +- assert(rx_buf->unexp_msg.addr == FI_ADDR_NOTAVAIL); +- +- match_attr.addr = rx_buf->unexp_msg.addr = +- rx_buf->conn->handle.fi_addr; +- match_attr.tag = rx_buf->unexp_msg.tag; +- +- entry = dlist_remove_first_match(&recv_queue->recv_list, +- recv_queue->match_recv, +- &match_attr); +- if (!entry) +- continue; +- +- dlist_remove(&rx_buf->unexp_msg.entry); +- rx_buf->recv_entry = container_of(entry, struct rxm_recv_entry, +- entry); +- dlist_insert_tail(&rx_buf->unexp_msg.entry, &rx_buf_list); +- } +- fastlock_release(&recv_queue->lock); +- fastlock_release(&recv_queue->rxm_ep->util_ep.cmap->lock); + +- while (!dlist_empty(&rx_buf_list)) { +- dlist_pop_front(&rx_buf_list, struct rxm_rx_buf, +- rx_buf, unexp_msg.entry); +- ret = rxm_cq_handle_data(rx_buf); +- if (ret) { +- err_entry.op_context = rx_buf; +- err_entry.flags = rx_buf->recv_entry->comp_flags; +- err_entry.len = rx_buf->pkt.hdr.size; +- err_entry.data = rx_buf->pkt.hdr.data; +- err_entry.tag = rx_buf->pkt.hdr.tag; +- err_entry.err = ret; +- err_entry.prov_errno = ret; +- ofi_cq_write_error(recv_queue->rxm_ep->util_ep.rx_cq, +- &err_entry); +- if (rx_buf->ep->util_ep.flags & OFI_CNTR_ENABLED) +- rxm_cntr_incerr(rx_buf->ep->util_ep.rx_cntr); +- +- rxm_enqueue_repost_ready_list(rx_buf); +- +- if (!(rx_buf->recv_entry->flags & FI_MULTI_RECV)) +- rxm_recv_entry_release(recv_queue, +- rx_buf->recv_entry); ++ do { ++ ret = fi_cq_read(rxm_ep->msg_cq, &comp, 1); ++ if (ret > 0) { ++ // We don't have enough info to write a good ++ // error entry to the CQ at this point ++ ret = rxm_cq_handle_comp(rxm_ep, &comp); ++ if (OFI_UNLIKELY(ret)) { ++ rxm_cq_write_error_all(rxm_ep, ret); ++ } else { ++ ret = 1; ++ } ++ } else if (ret < 0 && (ret != -FI_EAGAIN)) { ++ if (ret == -FI_EAVAIL) ++ rxm_cq_read_write_error(rxm_ep); ++ else ++ rxm_cq_write_error_all(rxm_ep, ret); + } +- count++; +- } +- return count; +-} +- +-static int rxm_cq_reprocess_recv_queues(struct rxm_ep *rxm_ep) +-{ +- int count = 0; +- +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- +- if (!rxm_ep->util_ep.cmap->av_updated) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return 0; +- } +- +- rxm_ep->util_ep.cmap->av_updated = 0; +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- +- count += rxm_cq_reprocess_directed_recvs(&rxm_ep->recv_queue); +- count += rxm_cq_reprocess_directed_recvs(&rxm_ep->trecv_queue); +- return count; +-} +- +-void rxm_ep_progress_one(struct util_ep *util_ep) +-{ +- struct rxm_ep *rxm_ep = +- container_of(util_ep, struct rxm_ep, util_ep); +- struct fi_cq_tagged_entry comp; +- ssize_t ret; +- +- rxm_cq_repost_rx_buffers(rxm_ep); ++ } while ((ret > 0) && (++comp_read < rxm_ep->comp_per_progress)); + +- if (OFI_UNLIKELY(rxm_ep->util_ep.cmap->av_updated)) { +- ret = rxm_cq_reprocess_recv_queues(rxm_ep); +- if (ret > 0) +- return; ++ if (OFI_UNLIKELY(!dlist_empty(&rxm_ep->deferred_tx_conn_queue))) { ++ dlist_foreach_container_safe(&rxm_ep->deferred_tx_conn_queue, ++ struct rxm_conn, rxm_conn, ++ deferred_conn_entry, conn_entry_tmp) ++ rxm_ep_progress_deferred_queue(rxm_ep, rxm_conn); + } +- +- ret = fi_cq_read(rxm_ep->msg_cq, &comp, 1); +- if (ret == -FI_EAGAIN || !ret) +- return; +- if (OFI_UNLIKELY(ret < 0)) +- goto err; +- +- ret = rxm_cq_handle_comp(rxm_ep, &comp); +- if (OFI_UNLIKELY(ret)) +- goto err; +- +- return; +-err: +- if (rxm_cq_write_error(rxm_ep->msg_cq, &comp, ret)) +- assert(0); + } + +-void rxm_ep_progress_multi(struct util_ep *util_ep) ++void rxm_ep_progress(struct util_ep *util_ep) + { +- struct rxm_ep *rxm_ep = +- container_of(util_ep, struct rxm_ep, util_ep); +- struct fi_cq_tagged_entry comp; +- ssize_t ret; +- size_t comp_read = 0; +- +- rxm_cq_repost_rx_buffers(rxm_ep); +- +- if (OFI_UNLIKELY(rxm_ep->util_ep.cmap->av_updated)) { +- ret = rxm_cq_reprocess_recv_queues(rxm_ep); +- if (ret > 0) +- return; +- } +- +- do { +- ret = fi_cq_read(rxm_ep->msg_cq, &comp, 1); +- if (ret == -FI_EAGAIN) +- return; +- if (OFI_UNLIKELY(ret < 0)) +- goto err; +- if (ret) { +- ret = rxm_cq_handle_comp(rxm_ep, &comp); +- if (OFI_UNLIKELY(ret)) +- goto err; +- comp_read++; +- } +- } while (comp_read < rxm_ep->comp_per_progress); +- +- return; +-err: +- if (rxm_cq_write_error(rxm_ep->msg_cq, &comp, ret)) +- assert(0); ++ ofi_ep_lock_acquire(util_ep); ++ rxm_ep_do_progress(util_ep); ++ ofi_ep_lock_release(util_ep); + } + + static int rxm_cq_close(struct fid *fid) +@@ -956,7 +1334,7 @@ static struct fi_ops rxm_cq_fi_ops = { + .size = sizeof(struct fi_ops), + .close = rxm_cq_close, + .bind = fi_no_bind, +- .control = fi_no_control, ++ .control = ofi_cq_control, + .ops_open = fi_no_ops_open, + }; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_domain.c +index 5000f4556..1d7d0f39f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_domain.c +@@ -60,15 +60,9 @@ free: + return ret; + } + +-int rxm_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context) +-{ +- return ip_av_create_flags(domain_fid, attr, av, context, OFI_AV_HASH); +-} +- + static struct fi_ops_domain rxm_domain_ops = { + .size = sizeof(struct fi_ops_domain), +- .av_open = rxm_av_create, ++ .av_open = rxm_av_open, + .cq_open = rxm_cq_open, + .endpoint = rxm_endpoint, + .scalable_ep = fi_no_scalable_ep, +@@ -76,9 +70,40 @@ static struct fi_ops_domain rxm_domain_ops = { + .poll_open = fi_poll_create, + .stx_ctx = fi_no_stx_context, + .srx_ctx = fi_no_srx_context, +- .query_atomic = fi_no_query_atomic, ++ .query_atomic = rxm_ep_query_atomic, + }; + ++static void rxm_mr_remove_map_entry(struct rxm_mr *mr) ++{ ++ fastlock_acquire(&mr->domain->util_domain.lock); ++ (void) ofi_mr_map_remove(&mr->domain->util_domain.mr_map, ++ mr->mr_fid.key); ++ fastlock_release(&mr->domain->util_domain.lock); ++} ++ ++static int rxm_mr_add_map_entry(struct util_domain *domain, ++ struct fi_mr_attr *msg_attr, ++ struct rxm_mr *rxm_mr) ++{ ++ uint64_t temp_key; ++ int ret; ++ ++ msg_attr->requested_key = rxm_mr->mr_fid.key; ++ ++ fastlock_acquire(&domain->lock); ++ ret = ofi_mr_map_insert(&domain->mr_map, msg_attr, &temp_key, rxm_mr); ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_DOMAIN, ++ "MR map insert for atomic verification failed %d\n", ++ ret); ++ } else { ++ assert(rxm_mr->mr_fid.key == temp_key); ++ } ++ fastlock_release(&domain->lock); ++ ++ return ret; ++} ++ + static int rxm_domain_close(fid_t fid) + { + struct rxm_domain *rxm_domain; +@@ -112,9 +137,15 @@ static int rxm_mr_close(fid_t fid) + int ret; + + rxm_mr = container_of(fid, struct rxm_mr, mr_fid.fid); ++ ++ if (rxm_mr->domain->util_domain.info_domain_caps & FI_ATOMIC) ++ rxm_mr_remove_map_entry(rxm_mr); ++ + ret = fi_close(&rxm_mr->msg_mr->fid); + if (ret) + FI_WARN(&rxm_prov, FI_LOG_DOMAIN, "Unable to close MSG MR\n"); ++ ++ ofi_atomic_dec32(&rxm_mr->domain->util_domain.ref); + free(rxm_mr); + return ret; + } +@@ -127,55 +158,143 @@ static struct fi_ops rxm_mr_ops = { + .ops_open = fi_no_ops_open, + }; + +-static int rxm_mr_reg(struct fid *domain_fid, const void *buf, size_t len, +- uint64_t access, uint64_t offset, uint64_t requested_key, +- uint64_t flags, struct fid_mr **mr, void *context) ++static uint64_t ++rxm_mr_get_msg_access(struct rxm_domain *rxm_domain, uint64_t access) ++{ ++ /* Additional flags to use RMA read for large message transfers */ ++ access |= FI_READ | FI_REMOTE_READ; ++ ++ if (rxm_domain->mr_local) ++ access |= FI_WRITE; ++ return access; ++} ++ ++static void rxm_mr_init(struct rxm_mr *rxm_mr, struct rxm_domain *domain, ++ void *context) ++{ ++ rxm_mr->mr_fid.fid.fclass = FI_CLASS_MR; ++ rxm_mr->mr_fid.fid.context = context; ++ rxm_mr->mr_fid.fid.ops = &rxm_mr_ops; ++ /* Store msg_mr as rxm_mr descriptor so that we can get its key when ++ * the app passes msg_mr as the descriptor in fi_send and friends. ++ * The key would be used in large message transfer protocol and RMA. */ ++ rxm_mr->mr_fid.mem_desc = rxm_mr->msg_mr; ++ rxm_mr->mr_fid.key = fi_mr_key(rxm_mr->msg_mr); ++ rxm_mr->domain = domain; ++ ofi_atomic_inc32(&domain->util_domain.ref); ++} ++ ++static int rxm_mr_regattr(struct fid *fid, const struct fi_mr_attr *attr, ++ uint64_t flags, struct fid_mr **mr) + { + struct rxm_domain *rxm_domain; ++ struct fi_mr_attr msg_attr = *attr; + struct rxm_mr *rxm_mr; + int ret; + +- rxm_domain = container_of(domain_fid, struct rxm_domain, +- util_domain.domain_fid.fid); ++ rxm_domain = container_of(fid, struct rxm_domain, ++ util_domain.domain_fid.fid); + + rxm_mr = calloc(1, sizeof(*rxm_mr)); + if (!rxm_mr) + return -FI_ENOMEM; + +- /* Additional flags to use RMA read for large message transfers */ +- access |= FI_READ | FI_REMOTE_READ; +- +- if (rxm_domain->mr_local) +- access |= FI_WRITE; ++ msg_attr.access = rxm_mr_get_msg_access(rxm_domain, attr->access); + +- ret = fi_mr_reg(rxm_domain->msg_domain, buf, len, access, offset, requested_key, +- flags, &rxm_mr->msg_mr, context); ++ ret = fi_mr_regattr(rxm_domain->msg_domain, &msg_attr, ++ flags, &rxm_mr->msg_mr); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_DOMAIN, "Unable to register MSG MR\n"); + goto err; + } ++ rxm_mr_init(rxm_mr, rxm_domain, attr->context); ++ *mr = &rxm_mr->mr_fid; + +- rxm_mr->mr_fid.fid.fclass = FI_CLASS_MR; +- rxm_mr->mr_fid.fid.context = context; +- rxm_mr->mr_fid.fid.ops = &rxm_mr_ops; +- /* Store msg_mr as rxm_mr descriptor so that we can get its key when +- * the app passes msg_mr as the descriptor in fi_send and friends. +- * The key would be used in large message transfer protocol and RMA. */ +- rxm_mr->mr_fid.mem_desc = rxm_mr->msg_mr; +- rxm_mr->mr_fid.key = fi_mr_key(rxm_mr->msg_mr); ++ if (rxm_domain->util_domain.info_domain_caps & FI_ATOMIC) { ++ ret = rxm_mr_add_map_entry(&rxm_domain->util_domain, ++ &msg_attr, rxm_mr); ++ if (ret) ++ goto map_err; ++ } ++ ++ return 0; ++ ++map_err: ++ fi_close(&rxm_mr->mr_fid.fid); ++ return ret; ++err: ++ free(rxm_mr); ++ return ret; ++ ++} ++ ++static int rxm_mr_regv(struct fid *fid, const struct iovec *iov, size_t count, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ struct rxm_domain *rxm_domain; ++ struct rxm_mr *rxm_mr; ++ int ret; ++ struct fi_mr_attr msg_attr = { ++ .mr_iov = iov, ++ .iov_count = count, ++ .access = access, ++ .offset = offset, ++ .requested_key = requested_key, ++ .context = context, ++ }; ++ ++ rxm_domain = container_of(fid, struct rxm_domain, ++ util_domain.domain_fid.fid); ++ ++ rxm_mr = calloc(1, sizeof(*rxm_mr)); ++ if (!rxm_mr) ++ return -FI_ENOMEM; ++ ++ access = rxm_mr_get_msg_access(rxm_domain, access); ++ ++ ret = fi_mr_regv(rxm_domain->msg_domain, iov, count, access, offset, ++ requested_key, flags, &rxm_mr->msg_mr, context); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_DOMAIN, "Unable to register MSG MR\n"); ++ goto err; ++ } ++ rxm_mr_init(rxm_mr, rxm_domain, context); + *mr = &rxm_mr->mr_fid; + ++ if (rxm_domain->util_domain.info_domain_caps & FI_ATOMIC) { ++ ret = rxm_mr_add_map_entry(&rxm_domain->util_domain, ++ &msg_attr, rxm_mr); ++ if (ret) ++ goto map_err; ++ } ++ + return 0; ++map_err: ++ fi_close(&rxm_mr->mr_fid.fid); ++ return ret; + err: + free(rxm_mr); + return ret; + } + ++static int rxm_mr_reg(struct fid *fid, const void *buf, size_t len, ++ uint64_t access, uint64_t offset, uint64_t requested_key, ++ uint64_t flags, struct fid_mr **mr, void *context) ++{ ++ struct iovec iov; ++ ++ iov.iov_base = (void *) buf; ++ iov.iov_len = len; ++ return rxm_mr_regv(fid, &iov, 1, access, offset, requested_key, ++ flags, mr, context); ++} ++ + static struct fi_ops_mr rxm_domain_mr_ops = { + .size = sizeof(struct fi_ops_mr), + .reg = rxm_mr_reg, +- .regv = fi_no_mr_regv, +- .regattr = fi_no_mr_regattr, ++ .regv = rxm_mr_regv, ++ .regattr = rxm_mr_regattr, + }; + + int rxm_domain_open(struct fid_fabric *fabric, struct fi_info *info, +@@ -214,14 +333,22 @@ int rxm_domain_open(struct fid_fabric *fabric, struct fi_info *info, + goto err3; + } + ++ /* We maintain an RMA key to MR map used for emulated atomic access ++ * and bounds validation. We turn off the map mode bit FI_MR_PROV_KEY ++ * since we specify the key used by MSG_EP provider. */ ++ rxm_domain->util_domain.mr_map.mode &= ~FI_MR_PROV_KEY; ++ ++ /* Must be set to eager size or less */ ++ rxm_domain->max_atomic_size = info->tx_attr ? ++ info->tx_attr->inject_size : 0; ++ + *domain = &rxm_domain->util_domain.domain_fid; + (*domain)->fid.ops = &rxm_domain_fi_ops; + /* Replace MR ops set by ofi_domain_init() */ + (*domain)->mr = &rxm_domain_mr_ops; + (*domain)->ops = &rxm_domain_ops; + +- rxm_domain->mr_local = OFI_CHECK_MR_LOCAL(msg_info) && +- !OFI_CHECK_MR_LOCAL(info); ++ rxm_domain->mr_local = ofi_mr_local(msg_info) && !ofi_mr_local(info); + + fi_freeinfo(msg_info); + return 0; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_ep.c +index 683cb6c50..11683c8a0 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_ep.c +@@ -31,62 +31,75 @@ + */ + + #include ++#include + + #include "ofi.h" + #include + + #include "rxm.h" + +-#define RXM_EP_RECV_SANITIZE_SRC_ADDR(rxm_ep, src_addr) \ +- ((rxm_ep->rxm_info->caps & FI_DIRECTED_RECV) ? \ +- src_addr : FI_ADDR_UNSPEC) +- +-const size_t rxm_pkt_size = sizeof(struct rxm_pkt); ++static int rxm_match_noop(struct dlist_entry *item, const void *arg) ++{ ++ OFI_UNUSED(item); ++ OFI_UNUSED(arg); ++ return 1; ++} + + static int rxm_match_recv_entry(struct dlist_entry *item, const void *arg) + { + struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *) arg; +- struct rxm_recv_entry *recv_entry; +- +- recv_entry = container_of(item, struct rxm_recv_entry, entry); +- return rxm_match_addr(recv_entry->addr, attr->addr); ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, entry); ++ return ofi_match_addr(recv_entry->addr, attr->addr); + } + +-static int rxm_match_recv_entry_tagged(struct dlist_entry *item, const void *arg) ++static int rxm_match_recv_entry_tag(struct dlist_entry *item, const void *arg) + { + struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; +- struct rxm_recv_entry *recv_entry; ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, entry); ++ return ofi_match_tag(recv_entry->tag, recv_entry->ignore, attr->tag); ++} + +- recv_entry = container_of(item, struct rxm_recv_entry, entry); +- return rxm_match_addr(recv_entry->addr, attr->addr) && +- rxm_match_tag(recv_entry->tag, recv_entry->ignore, attr->tag); ++static int rxm_match_recv_entry_tag_addr(struct dlist_entry *item, const void *arg) ++{ ++ struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, entry); ++ return ofi_match_addr(recv_entry->addr, attr->addr) && ++ ofi_match_tag(recv_entry->tag, recv_entry->ignore, attr->tag); + } + + static int rxm_match_recv_entry_context(struct dlist_entry *item, const void *context) + { +- struct rxm_recv_entry *recv_entry; +- +- recv_entry = container_of(item, struct rxm_recv_entry, entry); ++ struct rxm_recv_entry *recv_entry = ++ container_of(item, struct rxm_recv_entry, entry); + return recv_entry->context == context; + } + + static int rxm_match_unexp_msg(struct dlist_entry *item, const void *arg) + { + struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; +- struct rxm_unexp_msg *unexp_msg; +- +- unexp_msg = container_of(item, struct rxm_unexp_msg, entry); +- return rxm_match_addr(attr->addr, unexp_msg->addr); ++ struct rxm_unexp_msg *unexp_msg = ++ container_of(item, struct rxm_unexp_msg, entry); ++ return ofi_match_addr(attr->addr, unexp_msg->addr); + } + +-static int rxm_match_unexp_msg_tagged(struct dlist_entry *item, const void *arg) ++static int rxm_match_unexp_msg_tag(struct dlist_entry *item, const void *arg) + { + struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; +- struct rxm_unexp_msg *unexp_msg; ++ struct rxm_unexp_msg *unexp_msg = ++ container_of(item, struct rxm_unexp_msg, entry); ++ return ofi_match_tag(attr->tag, attr->ignore, unexp_msg->tag); ++} + +- unexp_msg = container_of(item, struct rxm_unexp_msg, entry); +- return rxm_match_addr(attr->addr, unexp_msg->addr) && +- rxm_match_tag(attr->tag, attr->ignore, unexp_msg->tag); ++static int rxm_match_unexp_msg_tag_addr(struct dlist_entry *item, const void *arg) ++{ ++ struct rxm_recv_match_attr *attr = (struct rxm_recv_match_attr *)arg; ++ struct rxm_unexp_msg *unexp_msg = ++ container_of(item, struct rxm_unexp_msg, entry); ++ return ofi_match_addr(attr->addr, unexp_msg->addr) && ++ ofi_match_tag(attr->tag, attr->ignore, unexp_msg->tag); + } + + static inline int +@@ -111,59 +124,127 @@ rxm_mr_buf_reg(struct rxm_ep *rxm_ep, void *addr, size_t len, void **context) + return ret; + } + ++static void rxm_buf_reg_set_common(struct rxm_buf *hdr, struct rxm_pkt *pkt, ++ uint8_t type, void *mr_desc) ++{ ++ if (pkt) { ++ pkt->ctrl_hdr.version = RXM_CTRL_VERSION; ++ pkt->hdr.version = OFI_OP_VERSION; ++ pkt->ctrl_hdr.type = type; ++ } ++ if (hdr) { ++ hdr->desc = mr_desc; ++ } ++} ++ + static int rxm_buf_reg(void *pool_ctx, void *addr, size_t len, void **context) + { + struct rxm_buf_pool *pool = (struct rxm_buf_pool *)pool_ctx; + size_t i, entry_sz = pool->pool->entry_sz; + int ret; +- struct rxm_tx_buf *tx_buf; +- struct rxm_rx_buf *rx_buf; + void *mr_desc; ++ uint8_t type; ++ struct rxm_buf *hdr; ++ struct rxm_pkt *pkt; ++ struct rxm_rx_buf *rx_buf; ++ struct rxm_tx_base_buf *tx_base_buf; ++ struct rxm_tx_eager_buf *tx_eager_buf; ++ struct rxm_tx_sar_buf *tx_sar_buf; ++ struct rxm_tx_rndv_buf *tx_rndv_buf; ++ struct rxm_tx_atomic_buf *tx_atomic_buf; ++ struct rxm_rma_buf *rma_buf; ++ ++ if ((pool->type != RXM_BUF_POOL_TX_INJECT) && pool->rxm_ep->msg_mr_local) { ++ ret = rxm_mr_buf_reg(pool->rxm_ep, addr, len, context); ++ if (ret) ++ return ret; ++ mr_desc = fi_mr_desc((struct fid_mr *)*context); ++ } else { ++ *context = mr_desc = NULL; ++ } + +- ret = rxm_mr_buf_reg(pool->ep, addr, len, context); +- if (ret) +- return ret; +- +- mr_desc = (*context != NULL) ? fi_mr_desc((struct fid_mr *)*context) : NULL; +- +- for (i = 0; i < pool->pool->chunk_cnt; i++) { +- if (pool->type == RXM_BUF_POOL_RX) { +- rx_buf = (struct rxm_rx_buf *)((char *)addr + i * entry_sz); +- rx_buf->ep = pool->ep; +- rx_buf->hdr.desc = mr_desc; +- } else { +- tx_buf = (struct rxm_tx_buf *)((char *)addr + i * entry_sz); +- tx_buf->type = pool->type; +- tx_buf->pkt.ctrl_hdr.version = OFI_CTRL_VERSION; +- tx_buf->pkt.hdr.version = OFI_OP_VERSION; +- if (rxm_ep_tx_flags(pool->ep) & FI_TRANSMIT_COMPLETE) +- tx_buf->pkt.hdr.flags |= OFI_TRANSMIT_COMPLETE; +- if (rxm_ep_tx_flags(pool->ep) & FI_DELIVERY_COMPLETE) +- tx_buf->pkt.hdr.flags |= OFI_DELIVERY_COMPLETE; +- tx_buf->hdr.desc = mr_desc; +- +- switch (pool->type) { +- case RXM_BUF_POOL_TX_MSG: +- case RXM_BUF_POOL_RMA: +- tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_data; +- tx_buf->pkt.hdr.op = ofi_op_msg; +- break; +- case RXM_BUF_POOL_TX_TAGGED: +- tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_data; +- tx_buf->pkt.hdr.op = ofi_op_tagged; +- break; +- case RXM_BUF_POOL_TX_ACK: +- tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_ack; +- tx_buf->pkt.hdr.op = ofi_op_msg; +- break; +- case RXM_BUF_POOL_TX_LMT: +- tx_buf->pkt.ctrl_hdr.type = ofi_ctrl_large_data; +- break; +- default: +- assert(0); +- break; +- } ++ for (i = 0; i < pool->pool->attr.chunk_cnt; i++) { ++ switch (pool->type) { ++ case RXM_BUF_POOL_RX: ++ rx_buf = (struct rxm_rx_buf *) ++ ((char *)addr + i * entry_sz); ++ rx_buf->ep = pool->rxm_ep; ++ ++ hdr = &rx_buf->hdr; ++ pkt = NULL; ++ type = ofi_ctrl_data; /* This can be any value */ ++ break; ++ case RXM_BUF_POOL_TX: ++ tx_eager_buf = (struct rxm_tx_eager_buf *) ++ ((char *)addr + i * entry_sz); ++ tx_eager_buf->hdr.state = RXM_TX; ++ ++ hdr = &tx_eager_buf->hdr; ++ pkt = &tx_eager_buf->pkt; ++ type = ofi_ctrl_data; ++ break; ++ case RXM_BUF_POOL_TX_INJECT: ++ tx_base_buf = (struct rxm_tx_base_buf *) ++ ((char *)addr + i * entry_sz); ++ tx_base_buf->hdr.state = RXM_INJECT_TX; ++ ++ hdr = NULL; ++ pkt = &tx_base_buf->pkt; ++ type = ofi_ctrl_data; ++ break; ++ case RXM_BUF_POOL_TX_SAR: ++ tx_sar_buf = (struct rxm_tx_sar_buf *) ++ ((char *)addr + i * entry_sz); ++ tx_sar_buf->hdr.state = RXM_SAR_TX; ++ ++ hdr = &tx_sar_buf->hdr; ++ pkt = &tx_sar_buf->pkt; ++ type = ofi_ctrl_seg_data; ++ break; ++ case RXM_BUF_POOL_TX_RNDV: ++ tx_rndv_buf = (struct rxm_tx_rndv_buf *) ++ ((char *)addr + i * entry_sz); ++ ++ hdr = &tx_rndv_buf->hdr; ++ pkt = &tx_rndv_buf->pkt; ++ type = ofi_ctrl_large_data; ++ break; ++ case RXM_BUF_POOL_TX_ATOMIC: ++ tx_atomic_buf = (struct rxm_tx_atomic_buf *) ++ ((char *)addr + i * entry_sz); ++ ++ hdr = &tx_atomic_buf->hdr; ++ pkt = &tx_atomic_buf->pkt; ++ type = ofi_ctrl_atomic; ++ break; ++ case RXM_BUF_POOL_TX_ACK: ++ tx_base_buf = (struct rxm_tx_base_buf *) ++ ((char *)addr + i * entry_sz); ++ tx_base_buf->pkt.hdr.op = ofi_op_msg; ++ ++ hdr = &tx_base_buf->hdr; ++ pkt = &tx_base_buf->pkt; ++ type = ofi_ctrl_ack; ++ break; ++ case RXM_BUF_POOL_RMA: ++ rma_buf = (struct rxm_rma_buf *) ++ ((char *)addr + i * entry_sz); ++ rma_buf->pkt.hdr.op = ofi_op_msg; ++ rma_buf->hdr.state = RXM_RMA; ++ ++ hdr = &rma_buf->hdr; ++ pkt = &rma_buf->pkt; ++ type = ofi_ctrl_data; ++ break; ++ default: ++ assert(0); ++ hdr = NULL; ++ pkt = NULL; ++ mr_desc = NULL; ++ type = ofi_ctrl_data; ++ break; + } ++ rxm_buf_reg_set_common(hdr, pkt, type, mr_desc); + } + + return FI_SUCCESS; +@@ -171,10 +252,10 @@ static int rxm_buf_reg(void *pool_ctx, void *addr, size_t len, void **context) + + static inline void rxm_buf_close(void *pool_ctx, void *context) + { +- struct rxm_ep *rxm_ep = +- (struct rxm_ep *)((struct rxm_buf_pool *)pool_ctx)->ep; ++ struct rxm_buf_pool *pool = (struct rxm_buf_pool *)pool_ctx; ++ struct rxm_ep *rxm_ep = pool->rxm_ep; + +- if (rxm_ep->msg_mr_local) { ++ if ((rxm_ep->msg_mr_local) && (pool->type != RXM_BUF_POOL_TX_INJECT)) { + /* We would get a (fid_mr *) in context but + * it is safe to cast it into (fid *) */ + fi_close((struct fid *)context); +@@ -183,17 +264,9 @@ static inline void rxm_buf_close(void *pool_ctx, void *context) + + static void rxm_buf_pool_destroy(struct rxm_buf_pool *pool) + { +- fastlock_destroy(&pool->lock); +- util_buf_pool_destroy(pool->pool); +-} +- +-static void rxm_ep_cleanup_post_rx_list(struct rxm_ep *rxm_ep) +-{ +- struct rxm_rx_buf *rx_buf; +- while (!dlist_empty(&rxm_ep->post_rx_list)) { +- dlist_pop_front(&rxm_ep->post_rx_list, struct rxm_rx_buf, +- rx_buf, entry); +- rxm_rx_buf_release(rxm_ep, rx_buf); ++ /* This indicates whether the pool is allocated or not */ ++ if (pool->rxm_ep) { ++ util_buf_pool_destroy(pool->pool); + } + } + +@@ -202,131 +275,152 @@ static int rxm_buf_pool_create(struct rxm_ep *rxm_ep, + struct rxm_buf_pool *pool, + enum rxm_buf_pool_type type) + { ++ struct util_buf_attr attr = { ++ .size = size, ++ .alignment = 16, ++ .max_cnt = 0, ++ .chunk_cnt = chunk_count, ++ .alloc_hndlr = rxm_buf_reg, ++ .free_hndlr = rxm_buf_close, ++ .ctx = pool, ++ .track_used = 0, ++ }; + int ret; + +- pool->ep = rxm_ep; ++ switch (type) { ++ case RXM_BUF_POOL_TX_RNDV: ++ case RXM_BUF_POOL_TX_ATOMIC: ++ case RXM_BUF_POOL_TX_SAR: ++ attr.indexing.used = 1; ++ break; ++ default: ++ attr.indexing.used = 0; ++ break; ++ } ++ ++ pool->rxm_ep = rxm_ep; + pool->type = type; +- ret = util_buf_pool_create_ex(&pool->pool, size, 16, 0, chunk_count, +- rxm_buf_reg, rxm_buf_close, pool); ++ ret = util_buf_pool_create_attr(&attr, &pool->pool); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to create buf pool\n"); + return -FI_ENOMEM; + } +- fastlock_init(&pool->lock); ++ + return 0; + } + +-static int rxm_send_queue_init(struct rxm_ep *rxm_ep, struct rxm_send_queue *send_queue, +- size_t size) ++static void rxm_recv_entry_init(struct rxm_recv_entry *entry, void *arg) + { +- ssize_t i; ++ struct rxm_recv_queue *recv_queue = arg; + +- send_queue->fs = rxm_txe_fs_create(size); +- if (!send_queue->fs) +- return -FI_ENOMEM; ++ assert(recv_queue->type != RXM_RECV_QUEUE_UNSPEC); + +- for (i = send_queue->fs->size - 1; i >= 0; i--) +- send_queue->fs->buf[i].ep = rxm_ep; ++ entry->recv_queue = recv_queue; ++ entry->sar.msg_id = RXM_SAR_RX_INIT; ++ entry->sar.total_recv_len = 0; ++ entry->comp_flags = FI_RECV; + +- fastlock_init(&send_queue->lock); +- return 0; ++ if (recv_queue->type == RXM_RECV_QUEUE_MSG) ++ entry->comp_flags |= FI_MSG; ++ else ++ entry->comp_flags |= FI_TAGGED; + } + + static int rxm_recv_queue_init(struct rxm_ep *rxm_ep, struct rxm_recv_queue *recv_queue, + size_t size, enum rxm_recv_queue_type type) + { +- ssize_t i; +- + recv_queue->rxm_ep = rxm_ep; + recv_queue->type = type; +- recv_queue->fs = rxm_recv_fs_create(size); ++ recv_queue->fs = rxm_recv_fs_create(size, rxm_recv_entry_init, recv_queue); + if (!recv_queue->fs) + return -FI_ENOMEM; + + dlist_init(&recv_queue->recv_list); + dlist_init(&recv_queue->unexp_msg_list); + if (type == RXM_RECV_QUEUE_MSG) { +- recv_queue->match_recv = rxm_match_recv_entry; +- recv_queue->match_unexp = rxm_match_unexp_msg; +- for (i = recv_queue->fs->size - 1; i >= 0; i--) +- recv_queue->fs->buf[i].comp_flags = FI_MSG | FI_RECV; ++ if (rxm_ep->rxm_info->caps & FI_DIRECTED_RECV) { ++ recv_queue->match_recv = rxm_match_recv_entry; ++ recv_queue->match_unexp = rxm_match_unexp_msg; ++ } else { ++ recv_queue->match_recv = rxm_match_noop; ++ recv_queue->match_unexp = rxm_match_noop; ++ } + } else { +- recv_queue->match_recv = rxm_match_recv_entry_tagged; +- recv_queue->match_unexp = rxm_match_unexp_msg_tagged; +- for (i = recv_queue->fs->size - 1; i >= 0; i--) +- recv_queue->fs->buf[i].comp_flags = FI_TAGGED | FI_RECV; +- } +- fastlock_init(&recv_queue->lock); +- return 0; +-} +- +-static void rxm_send_queue_close(struct rxm_send_queue *send_queue) +-{ +- if (send_queue->fs) { +- struct rxm_tx_entry *tx_entry; +- ssize_t i; +- +- for (i = send_queue->fs->size - 1; i >= 0; i--) { +- tx_entry = &send_queue->fs->buf[i]; +- if (tx_entry->tx_buf) { +- rxm_tx_buf_release(tx_entry->ep, tx_entry->tx_buf); +- tx_entry->tx_buf = NULL; +- } ++ if (rxm_ep->rxm_info->caps & FI_DIRECTED_RECV) { ++ recv_queue->match_recv = rxm_match_recv_entry_tag_addr; ++ recv_queue->match_unexp = rxm_match_unexp_msg_tag_addr; ++ } else { ++ recv_queue->match_recv = rxm_match_recv_entry_tag; ++ recv_queue->match_unexp = rxm_match_unexp_msg_tag; + } +- rxm_txe_fs_free(send_queue->fs); + } +- fastlock_destroy(&send_queue->lock); ++ ++ return 0; + } + + static void rxm_recv_queue_close(struct rxm_recv_queue *recv_queue) + { +- if (recv_queue->fs) ++ /* It indicates that the recv_queue were allocated */ ++ if (recv_queue->fs) { + rxm_recv_fs_free(recv_queue->fs); +- fastlock_destroy(&recv_queue->lock); ++ } + // TODO cleanup recv_list and unexp msg list + } + + static int rxm_ep_txrx_pool_create(struct rxm_ep *rxm_ep) + { +- size_t i; +- int ret; ++ int ret, i; ++ size_t queue_sizes[] = { ++ [RXM_BUF_POOL_RX] = rxm_ep->msg_info->rx_attr->size, ++ [RXM_BUF_POOL_TX] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_INJECT] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_ACK] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_RNDV] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_ATOMIC] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_TX_SAR] = rxm_ep->msg_info->tx_attr->size, ++ [RXM_BUF_POOL_RMA] = rxm_ep->msg_info->tx_attr->size, ++ }; ++ size_t entry_sizes[] = { ++ [RXM_BUF_POOL_RX] = rxm_ep->eager_limit + ++ sizeof(struct rxm_rx_buf), ++ [RXM_BUF_POOL_TX] = rxm_ep->eager_limit + ++ sizeof(struct rxm_tx_eager_buf), ++ [RXM_BUF_POOL_TX_INJECT] = rxm_ep->inject_limit + ++ sizeof(struct rxm_tx_base_buf), ++ [RXM_BUF_POOL_TX_ACK] = sizeof(struct rxm_tx_base_buf), ++ [RXM_BUF_POOL_TX_RNDV] = sizeof(struct rxm_rndv_hdr) + ++ rxm_ep->buffered_min + ++ sizeof(struct rxm_tx_rndv_buf), ++ [RXM_BUF_POOL_TX_ATOMIC] = rxm_ep->eager_limit + ++ sizeof(struct rxm_tx_atomic_buf), ++ [RXM_BUF_POOL_TX_SAR] = rxm_ep->eager_limit + ++ sizeof(struct rxm_tx_sar_buf), ++ [RXM_BUF_POOL_RMA] = rxm_ep->eager_limit + ++ sizeof(struct rxm_rma_buf), ++ }; + +- ret = rxm_buf_pool_create(rxm_ep, +- rxm_ep->msg_info->rx_attr->size, +- rxm_ep->rxm_info->tx_attr->inject_size + +- sizeof(struct rxm_rx_buf), +- &rxm_ep->buf_pools[RXM_BUF_POOL_RX], +- RXM_BUF_POOL_RX); +- if (ret) +- return ret; +- dlist_init(&rxm_ep->post_rx_list); + dlist_init(&rxm_ep->repost_ready_list); + +- /* Allocates resources for TX pools */ +- for (i = RXM_BUF_POOL_TX_START; i <= RXM_BUF_POOL_TX_END; i++) { +- ret = rxm_buf_pool_create(rxm_ep, +- rxm_ep->msg_info->tx_attr->size, +- rxm_ep->rxm_info->tx_attr->inject_size + +- sizeof(struct rxm_tx_buf), ++ rxm_ep->buf_pools = calloc(1, RXM_BUF_POOL_MAX * sizeof(*rxm_ep->buf_pools)); ++ if (!rxm_ep->buf_pools) ++ return -FI_ENOMEM; ++ ++ for (i = RXM_BUF_POOL_START; i < RXM_BUF_POOL_MAX; i++) { ++ if ((i == RXM_BUF_POOL_TX_INJECT) && ++ (rxm_ep->util_ep.domain->threading != FI_THREAD_SAFE)) ++ continue; ++ ++ ret = rxm_buf_pool_create(rxm_ep, queue_sizes[i], entry_sizes[i], + &rxm_ep->buf_pools[i], i); + if (ret) + goto err; + } + +- ret = rxm_buf_pool_create(rxm_ep, +- rxm_ep->msg_info->tx_attr->size, +- rxm_ep->rxm_info->tx_attr->inject_size + +- sizeof(struct rxm_rma_buf), +- &rxm_ep->buf_pools[RXM_BUF_POOL_RMA], +- RXM_BUF_POOL_RMA); +- if (ret) +- goto err; +- + return FI_SUCCESS; + err: +- while (--i >= RXM_BUF_POOL_TX_START) ++ while (--i >= RXM_BUF_POOL_START) + rxm_buf_pool_destroy(&rxm_ep->buf_pools[i]); +- rxm_buf_pool_destroy(&rxm_ep->buf_pools[RXM_BUF_POOL_RX]); ++ free(rxm_ep->buf_pools); + return ret; + } + +@@ -336,22 +430,18 @@ static void rxm_ep_txrx_pool_destroy(struct rxm_ep *rxm_ep) + + for (i = RXM_BUF_POOL_START; i < RXM_BUF_POOL_MAX; i++) + rxm_buf_pool_destroy(&rxm_ep->buf_pools[i]); ++ free(rxm_ep->buf_pools); + } + +-static int rxm_ep_txrx_queue_init(struct rxm_ep *rxm_ep) ++static int rxm_ep_rx_queue_init(struct rxm_ep *rxm_ep) + { + int ret; + +- ret = rxm_send_queue_init(rxm_ep, &rxm_ep->send_queue, +- rxm_ep->rxm_info->tx_attr->size); +- if (ret) +- return ret; +- + ret = rxm_recv_queue_init(rxm_ep, &rxm_ep->recv_queue, + rxm_ep->rxm_info->rx_attr->size, + RXM_RECV_QUEUE_MSG); + if (ret) +- goto err_recv_msg; ++ return ret; + + ret = rxm_recv_queue_init(rxm_ep, &rxm_ep->trecv_queue, + rxm_ep->rxm_info->rx_attr->size, +@@ -362,46 +452,22 @@ static int rxm_ep_txrx_queue_init(struct rxm_ep *rxm_ep) + return FI_SUCCESS; + err_recv_tag: + rxm_recv_queue_close(&rxm_ep->recv_queue); +-err_recv_msg: +- rxm_send_queue_close(&rxm_ep->send_queue); + return ret; + } + +-static void rxm_ep_txrx_queue_close(struct rxm_ep *rxm_ep) ++static void rxm_ep_rx_queue_close(struct rxm_ep *rxm_ep) + { + rxm_recv_queue_close(&rxm_ep->trecv_queue); + rxm_recv_queue_close(&rxm_ep->recv_queue); +- rxm_send_queue_close(&rxm_ep->send_queue); +-} +- +-static int rxm_ep_txrx_res_open(struct rxm_ep *rxm_ep) +-{ +- int ret; +- +- FI_DBG(&rxm_prov, FI_LOG_EP_CTRL, +- "MSG provider mr_mode & FI_MR_LOCAL: %d\n", +- rxm_ep->msg_mr_local); +- +- ret = rxm_ep_txrx_pool_create(rxm_ep); +- if (ret) +- return ret; +- +- ret = rxm_ep_txrx_queue_init(rxm_ep); +- if (ret) +- goto err; +- +- return FI_SUCCESS; +-err: +- rxm_ep_txrx_pool_destroy(rxm_ep); +- return ret; + } + ++/* It is safe to call this function, even if `rxm_ep_txrx_res_open` ++ * has not yet been called */ + static void rxm_ep_txrx_res_close(struct rxm_ep *rxm_ep) + { +- rxm_ep_txrx_queue_close(rxm_ep); +- +- rxm_ep_cleanup_post_rx_list(rxm_ep); +- rxm_ep_txrx_pool_destroy(rxm_ep); ++ rxm_ep_rx_queue_close(rxm_ep); ++ if (rxm_ep->buf_pools) ++ rxm_ep_txrx_pool_destroy(rxm_ep); + } + + static int rxm_setname(fid_t fid, void *addr, size_t addrlen) +@@ -439,12 +505,12 @@ static int rxm_ep_cancel_recv(struct rxm_ep *rxm_ep, + struct fi_cq_err_entry err_entry; + struct rxm_recv_entry *recv_entry; + struct dlist_entry *entry; ++ int ret; + +- fastlock_acquire(&recv_queue->lock); ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); + entry = dlist_remove_first_match(&recv_queue->recv_list, + rxm_match_recv_entry_context, + context); +- fastlock_release(&recv_queue->lock); + if (entry) { + recv_entry = container_of(entry, struct rxm_recv_entry, entry); + memset(&err_entry, 0, sizeof(err_entry)); +@@ -454,9 +520,12 @@ static int rxm_ep_cancel_recv(struct rxm_ep *rxm_ep, + err_entry.err = FI_ECANCELED; + err_entry.prov_errno = -FI_ECANCELED; + rxm_recv_entry_release(recv_queue, recv_entry); +- return ofi_cq_write_error(rxm_ep->util_ep.rx_cq, &err_entry); ++ ret = ofi_cq_write_error(rxm_ep->util_ep.rx_cq, &err_entry); ++ } else { ++ ret = 0; + } +- return 0; ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; + } + + static ssize_t rxm_ep_cancel(fid_t fid_ep, void *context) +@@ -481,12 +550,28 @@ static int rxm_ep_getopt(fid_t fid, int level, int optname, void *optval, + struct rxm_ep *rxm_ep = + container_of(fid, struct rxm_ep, util_ep.ep_fid); + +- if ((level != FI_OPT_ENDPOINT) || (optname != FI_OPT_MIN_MULTI_RECV)) ++ if (level != FI_OPT_ENDPOINT) + return -FI_ENOPROTOOPT; + +- *(size_t *)optval = rxm_ep->min_multi_recv_size; +- *optlen = sizeof(size_t); +- ++ switch (optname) { ++ case FI_OPT_MIN_MULTI_RECV: ++ assert(sizeof(rxm_ep->min_multi_recv_size) == sizeof(size_t)); ++ *(size_t *)optval = rxm_ep->min_multi_recv_size; ++ *optlen = sizeof(size_t); ++ break; ++ case FI_OPT_BUFFERED_MIN: ++ assert(sizeof(rxm_ep->buffered_min) == sizeof(size_t)); ++ *(size_t *)optval = rxm_ep->buffered_min; ++ *optlen = sizeof(size_t); ++ break; ++ case FI_OPT_BUFFERED_LIMIT: ++ assert(sizeof(rxm_ep->buffered_limit) == sizeof(size_t)); ++ *(size_t *)optval = rxm_ep->buffered_limit; ++ *optlen = sizeof(size_t); ++ break; ++ default: ++ return -FI_ENOPROTOOPT; ++ } + return FI_SUCCESS; + } + +@@ -495,13 +580,50 @@ static int rxm_ep_setopt(fid_t fid, int level, int optname, + { + struct rxm_ep *rxm_ep = + container_of(fid, struct rxm_ep, util_ep.ep_fid); ++ int ret = FI_SUCCESS; + +- if ((level != FI_OPT_ENDPOINT) || (optname != FI_OPT_MIN_MULTI_RECV)) ++ if (level != FI_OPT_ENDPOINT) + return -FI_ENOPROTOOPT; + +- rxm_ep->min_multi_recv_size = *(size_t *)optval; +- +- return FI_SUCCESS; ++ switch (optname) { ++ case FI_OPT_MIN_MULTI_RECV: ++ rxm_ep->min_multi_recv_size = *(size_t *)optval; ++ break; ++ case FI_OPT_BUFFERED_MIN: ++ if (rxm_ep->buf_pools) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Endpoint already enabled. Can't set opt now!\n"); ++ ret = -FI_EOPBADSTATE; ++ } else if (*(size_t *)optval > rxm_ep->buffered_limit) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Invalid value for FI_OPT_BUFFERED_MIN: %zu " ++ "( > FI_OPT_BUFFERED_LIMIT: %zu)\n", ++ *(size_t *)optval, rxm_ep->buffered_limit); ++ ret = -FI_EINVAL; ++ } else { ++ rxm_ep->buffered_min = *(size_t *)optval; ++ } ++ break; ++ case FI_OPT_BUFFERED_LIMIT: ++ if (rxm_ep->buf_pools) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Endpoint already enabled. Can't set opt now!\n"); ++ ret = -FI_EOPBADSTATE; ++ /* We do not check for maximum as we allow sizes up to SIZE_MAX */ ++ } else if (*(size_t *)optval < rxm_ep->buffered_min) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Invalid value for FI_OPT_BUFFERED_LIMIT: %zu" ++ " ( < FI_OPT_BUFFERED_MIN: %zu)\n", ++ *(size_t *)optval, rxm_ep->buffered_min); ++ ret = -FI_EINVAL; ++ } else { ++ rxm_ep->buffered_limit = *(size_t *)optval; ++ } ++ break; ++ default: ++ ret = -FI_ENOPROTOOPT; ++ } ++ return ret; + } + + static struct fi_ops_ep rxm_ops_ep = { +@@ -521,11 +643,8 @@ static int rxm_ep_discard_recv(struct rxm_ep *rxm_ep, struct rxm_rx_buf *rx_buf, + RXM_DBG_ADDR_TAG(FI_LOG_EP_DATA, "Discarding message", + rx_buf->unexp_msg.addr, rx_buf->unexp_msg.tag); + +- fastlock_acquire(&rxm_ep->util_ep.lock); + dlist_insert_tail(&rx_buf->repost_entry, + &rx_buf->ep->repost_ready_list); +- fastlock_release(&rxm_ep->util_ep.lock); +- + return ofi_cq_write(rxm_ep->util_ep.rx_cq, context, FI_TAGGED | FI_RECV, + 0, NULL, rx_buf->pkt.hdr.data, rx_buf->pkt.hdr.tag); + } +@@ -538,13 +657,10 @@ static int rxm_ep_peek_recv(struct rxm_ep *rxm_ep, fi_addr_t addr, uint64_t tag, + + RXM_DBG_ADDR_TAG(FI_LOG_EP_DATA, "Peeking message", addr, tag); + +- rxm_ep_progress_multi(&rxm_ep->util_ep); +- +- fastlock_acquire(&recv_queue->lock); ++ rxm_ep_do_progress(&rxm_ep->util_ep); + + rx_buf = rxm_check_unexp_msg_list(recv_queue, addr, tag, ignore); + if (!rx_buf) { +- fastlock_release(&recv_queue->lock); + FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Message not found\n"); + return ofi_cq_write_error_peek(rxm_ep->util_ep.rx_cq, tag, + context); +@@ -554,7 +670,6 @@ static int rxm_ep_peek_recv(struct rxm_ep *rxm_ep, fi_addr_t addr, uint64_t tag, + + if (flags & FI_DISCARD) { + dlist_remove(&rx_buf->unexp_msg.entry); +- fastlock_release(&recv_queue->lock); + return rxm_ep_discard_recv(rxm_ep, rx_buf, context); + } + +@@ -563,7 +678,6 @@ static int rxm_ep_peek_recv(struct rxm_ep *rxm_ep, fi_addr_t addr, uint64_t tag, + ((struct fi_context *)context)->internal[0] = rx_buf; + dlist_remove(&rx_buf->unexp_msg.entry); + } +- fastlock_release(&recv_queue->lock); + + return ofi_cq_write(rxm_ep->util_ep.rx_cq, context, FI_TAGGED | FI_RECV, + rx_buf->pkt.hdr.size, NULL, +@@ -584,12 +698,11 @@ rxm_ep_format_rx_res(struct rxm_ep *rxm_ep, const struct iovec *iov, + return -FI_EAGAIN; + + (*recv_entry)->rxm_iov.count = (uint8_t)count; +- (*recv_entry)->addr = RXM_EP_RECV_SANITIZE_SRC_ADDR(rxm_ep, src_addr); ++ (*recv_entry)->addr = src_addr; + (*recv_entry)->context = context; + (*recv_entry)->flags = flags; + (*recv_entry)->ignore = ignore; + (*recv_entry)->tag = tag; +- (*recv_entry)->multi_recv_buf = iov[0].iov_base; + + for (i = 0; i < count; i++) { + (*recv_entry)->rxm_iov.iov[i].iov_base = iov[i].iov_base; +@@ -599,14 +712,17 @@ rxm_ep_format_rx_res(struct rxm_ep *rxm_ep, const struct iovec *iov, + (*recv_entry)->rxm_iov.desc[i] = desc[i]; + } + ++ (*recv_entry)->multi_recv.len = (*recv_entry)->total_len; ++ (*recv_entry)->multi_recv.buf = iov[0].iov_base; ++ + return FI_SUCCESS; + } + + static inline ssize_t +-rxm_ep_recv_common(struct rxm_ep *rxm_ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t src_addr, +- uint64_t tag, uint64_t ignore, void *context, +- uint64_t op_flags, struct rxm_recv_queue *recv_queue) ++rxm_ep_post_recv(struct rxm_ep *rxm_ep, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, void *context, ++ uint64_t op_flags, struct rxm_recv_queue *recv_queue) + { + struct rxm_recv_entry *recv_entry; + ssize_t ret; +@@ -618,7 +734,28 @@ rxm_ep_recv_common(struct rxm_ep *rxm_ep, const struct iovec *iov, + recv_queue, &recv_entry); + if (OFI_UNLIKELY(ret)) + return ret; +- return rxm_process_recv_entry(recv_queue, recv_entry); ++ ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Posting recv with length: %zu " ++ "tag: 0x%" PRIx64 " ignore: 0x%" PRIx64 "\n", ++ recv_entry->total_len, recv_entry->tag, recv_entry->ignore); ++ ret = rxm_process_recv_entry(recv_queue, recv_entry); ++ ++ return ret; ++} ++ ++static inline ssize_t ++rxm_ep_recv_common(struct rxm_ep *rxm_ep, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t src_addr, ++ uint64_t tag, uint64_t ignore, void *context, ++ uint64_t op_flags, struct rxm_recv_queue *recv_queue) ++{ ++ ssize_t ret; ++ ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ ret = rxm_ep_post_recv(rxm_ep, iov, desc, count, src_addr, ++ tag, ignore, context, op_flags, recv_queue); ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; + } + + static ssize_t rxm_ep_recv_common_flags(struct rxm_ep *rxm_ep, const struct iovec *iov, +@@ -628,44 +765,74 @@ static ssize_t rxm_ep_recv_common_flags(struct rxm_ep *rxm_ep, const struct iove + struct rxm_recv_queue *recv_queue) + { + struct rxm_recv_entry *recv_entry; ++ struct fi_recv_context *recv_ctx; + struct rxm_rx_buf *rx_buf; ++ ssize_t ret = 0; + + assert(count <= rxm_ep->rxm_info->rx_attr->iov_limit); +- assert(!(flags & (FI_PEEK | FI_CLAIM | FI_DISCARD)) || ++ assert(!(flags & FI_PEEK) || + (recv_queue->type == RXM_RECV_QUEUE_TAGGED)); + assert(!(flags & (FI_MULTI_RECV)) || + (recv_queue->type == RXM_RECV_QUEUE_MSG)); + +- if (flags & FI_PEEK) +- return rxm_ep_peek_recv(rxm_ep, +- RXM_EP_RECV_SANITIZE_SRC_ADDR(rxm_ep, src_addr), +- tag, ignore, context, +- flags, recv_queue); ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ if (rxm_ep->rxm_info->mode & FI_BUFFERED_RECV) { ++ assert(!(flags & FI_PEEK)); ++ recv_ctx = context; ++ context = recv_ctx->context; ++ rx_buf = container_of(recv_ctx, struct rxm_rx_buf, recv_context); ++ ++ if (flags & FI_CLAIM) { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "Claiming buffered receive\n"); ++ goto claim; ++ } + +- if (flags & FI_CLAIM) { +- ssize_t ret; ++ assert(flags & FI_DISCARD); ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Discarding buffered receive\n"); ++ dlist_insert_tail(&rx_buf->repost_entry, ++ &rx_buf->ep->repost_ready_list); ++ goto unlock; ++ } ++ ++ if (flags & FI_PEEK) { ++ ret = rxm_ep_peek_recv(rxm_ep, src_addr, tag, ignore, ++ context, flags, recv_queue); ++ goto unlock; ++ } + +- rx_buf = ((struct fi_context *)context)->internal[0]; +- assert(rx_buf); +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Claim message\n"); ++ if (!(flags & FI_CLAIM)) { ++ ret = rxm_ep_post_recv(rxm_ep, iov, desc, count, src_addr, ++ tag, ignore, context, flags | op_flags, ++ recv_queue); ++ goto unlock; ++ } + +- if (flags & FI_DISCARD) +- return rxm_ep_discard_recv(rxm_ep, rx_buf, context); ++ rx_buf = ((struct fi_context *)context)->internal[0]; ++ assert(rx_buf); ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Claim message\n"); + +- ret = rxm_ep_format_rx_res(rxm_ep, iov, desc, count, +- RXM_EP_RECV_SANITIZE_SRC_ADDR(rxm_ep, src_addr), +- tag, ignore, context, +- flags | op_flags, +- recv_queue, &recv_entry); +- if (OFI_UNLIKELY(ret)) +- return ret; +- rx_buf->recv_entry = recv_entry; +- return rxm_cq_handle_data(rx_buf); +- } else { +- return rxm_ep_recv_common(rxm_ep, iov, desc, count, src_addr, +- tag, ignore, context, flags | op_flags, +- recv_queue); ++ if (flags & FI_DISCARD) { ++ ret = rxm_ep_discard_recv(rxm_ep, rx_buf, context); ++ goto unlock; + } ++ ++claim: ++ ret = rxm_ep_format_rx_res(rxm_ep, iov, desc, count, src_addr, ++ tag, ignore, context, flags | op_flags, ++ recv_queue, &recv_entry); ++ if (OFI_UNLIKELY(ret)) ++ goto unlock; ++ ++ if (rxm_ep->rxm_info->mode & FI_BUFFERED_RECV) ++ recv_entry->comp_flags |= FI_CLAIM; ++ ++ rx_buf->recv_entry = recv_entry; ++ ret = rxm_cq_handle_rx_buf(rx_buf); ++ ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; + } + + static ssize_t rxm_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, +@@ -706,207 +873,128 @@ static ssize_t rxm_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, + &rxm_ep->recv_queue); + } + +-void rxm_ep_msg_mr_closev(struct fid_mr **mr, size_t count) +-{ +- int ret; +- size_t i; +- +- for (i = 0; i < count; i++) { +- if (mr[i]) { +- ret = fi_close(&mr[i]->fid); +- if (ret) +- FI_WARN(&rxm_prov, FI_LOG_EP_DATA, +- "Unable to close msg mr: %zu\n", i); +- } +- } +-} +- +-int rxm_ep_msg_mr_regv(struct rxm_ep *rxm_ep, const struct iovec *iov, +- size_t count, uint64_t access, struct fid_mr **mr) +-{ +- struct rxm_domain *rxm_domain; +- int ret; +- size_t i; +- +- rxm_domain = container_of(rxm_ep->util_ep.domain, struct rxm_domain, util_domain); +- +- // TODO do fi_mr_regv if provider supports it +- for (i = 0; i < count; i++) { +- ret = fi_mr_reg(rxm_domain->msg_domain, iov[i].iov_base, +- iov[i].iov_len, access, 0, 0, 0, &mr[i], NULL); +- if (ret) +- goto err; +- } +- return 0; +-err: +- rxm_ep_msg_mr_closev(mr, count); +- return ret; +-} +- +-static ssize_t rxm_rma_iov_init(struct rxm_ep *rxm_ep, void *buf, +- const struct iovec *iov, size_t count, +- struct fid_mr **mr) ++static void rxm_rndv_hdr_init(struct rxm_ep *rxm_ep, void *buf, ++ const struct iovec *iov, size_t count, ++ struct fid_mr **mr) + { +- struct rxm_rma_iov *rma_iov = (struct rxm_rma_iov *)buf; ++ struct rxm_rndv_hdr *rndv_hdr = (struct rxm_rndv_hdr *)buf; + size_t i; + + for (i = 0; i < count; i++) { +- rma_iov->iov[i].addr = RXM_MR_VIRT_ADDR(rxm_ep->msg_info) ? ++ rndv_hdr->iov[i].addr = RXM_MR_VIRT_ADDR(rxm_ep->msg_info) ? + (uintptr_t)iov[i].iov_base : 0; +- rma_iov->iov[i].len = (uint64_t)iov[i].iov_len; +- rma_iov->iov[i].key = fi_mr_key(mr[i]); ++ rndv_hdr->iov[i].len = (uint64_t)iov[i].iov_len; ++ rndv_hdr->iov[i].key = fi_mr_key(mr[i]); + } +- rma_iov->count = (uint8_t)count; +- return sizeof(*rma_iov) + sizeof(*rma_iov->iov) * count; ++ rndv_hdr->count = (uint8_t)count; + } + + static inline ssize_t +-rxm_ep_format_tx_res_lightweight(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- size_t len, uint64_t data, uint64_t flags, uint64_t tag, +- struct rxm_tx_buf **tx_buf, struct rxm_buf_pool *pool) ++rxm_ep_msg_inject_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ struct rxm_pkt *tx_pkt, size_t pkt_size, ++ ofi_cntr_inc_func cntr_inc_func) + { +- *tx_buf = (struct rxm_tx_buf *)rxm_buf_get(pool); +- if (OFI_UNLIKELY(!*tx_buf)) { +- FI_WARN(&rxm_prov, FI_LOG_EP_DATA, "TX queue full!\n"); +- return -FI_EAGAIN; +- } +- +- assert((((*tx_buf)->pkt.ctrl_hdr.type == ofi_ctrl_data) && +- (len <= rxm_ep->rxm_info->tx_attr->inject_size)) || +- ((*tx_buf)->pkt.ctrl_hdr.type == ofi_ctrl_large_data)); ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Posting inject with length: %" PRIu64 ++ " tag: 0x%" PRIx64 "\n", pkt_size, tx_pkt->hdr.tag); + +- (*tx_buf)->pkt.ctrl_hdr.conn_id = rxm_conn->handle.remote_key; ++ assert((tx_pkt->hdr.flags & FI_REMOTE_CQ_DATA) || !tx_pkt->hdr.flags); ++ assert(pkt_size <= rxm_ep->inject_limit); + +- (*tx_buf)->pkt.hdr.size = len; +- (*tx_buf)->pkt.hdr.tag = tag; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- (*tx_buf)->pkt.hdr.flags = OFI_REMOTE_CQ_DATA; +- (*tx_buf)->pkt.hdr.data = data; ++ ssize_t ret = fi_inject(rxm_conn->msg_ep, tx_pkt, pkt_size, 0); ++ if (OFI_LIKELY(!ret)) { ++ cntr_inc_func(rxm_ep->util_ep.tx_cntr); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "fi_inject for MSG provider failed with ret - %" PRId64"\n", ++ ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_do_progress(&rxm_ep->util_ep); + } +- +- return FI_SUCCESS; ++ return ret; + } + + static inline ssize_t +-rxm_ep_format_tx_entry(struct rxm_ep *rxm_ep, void *context, uint8_t count, +- uint64_t flags, uint64_t comp_flags, +- struct rxm_tx_buf *tx_buf, struct rxm_tx_entry **tx_entry) ++rxm_ep_msg_normal_send(struct rxm_conn *rxm_conn, struct rxm_pkt *tx_pkt, ++ size_t pkt_size, void *desc, void *context) + { +- *tx_entry = rxm_tx_entry_get(&rxm_ep->send_queue); +- if (OFI_UNLIKELY(!*tx_entry)) +- return -FI_EAGAIN; ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "Posting send with length: %" PRIu64 ++ " tag: 0x%" PRIx64 "\n", pkt_size, tx_pkt->hdr.tag); + +- (*tx_entry)->count = count; +- (*tx_entry)->context = context; +- (*tx_entry)->flags = flags; +- (*tx_entry)->tx_buf = tx_buf; +- (*tx_entry)->comp_flags = comp_flags | FI_SEND; ++ assert((tx_pkt->hdr.flags & FI_REMOTE_CQ_DATA) || !tx_pkt->hdr.flags); + +- return FI_SUCCESS; ++ return fi_send(rxm_conn->msg_ep, tx_pkt, pkt_size, desc, 0, context); + } + + static inline ssize_t +-rxm_ep_format_tx_res(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- void *context, uint8_t count, size_t len, uint64_t data, +- uint64_t flags, uint64_t tag, uint64_t comp_flags, +- struct rxm_tx_buf **tx_buf, struct rxm_tx_entry **tx_entry, +- struct rxm_buf_pool *pool) ++rxm_ep_alloc_rndv_tx_res(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, void *context, ++ uint8_t count, const struct iovec *iov, void **desc, size_t data_len, ++ uint64_t data, uint64_t flags, uint64_t tag, uint8_t op, ++ struct rxm_tx_rndv_buf **tx_rndv_buf) + { ++ struct fid_mr **mr_iov; + ssize_t ret; ++ struct rxm_tx_rndv_buf *tx_buf = (struct rxm_tx_rndv_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_RNDV); + +- ret = rxm_ep_format_tx_res_lightweight(rxm_ep, rxm_conn, len, data, +- flags, tag, tx_buf, pool); +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- ret = rxm_ep_format_tx_entry(rxm_ep, context, count, flags, comp_flags, +- *tx_buf, tx_entry); +- if (OFI_UNLIKELY(ret)) +- goto err; +- +- return FI_SUCCESS; +-err: +- rxm_tx_buf_release(rxm_ep, *tx_buf); +- return ret; +-} +- +-static inline ssize_t +-rxm_ep_normal_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry, size_t pkt_size) +-{ +- ssize_t ret = fi_send(rxm_conn->msg_ep, &tx_entry->tx_buf->pkt, pkt_size, +- tx_entry->tx_buf->hdr.desc, 0, tx_entry); +- if (OFI_UNLIKELY(ret)) { +- if (ret == -FI_EAGAIN) +- rxm_ep_progress_multi(&rxm_ep->util_ep); +- else +- FI_WARN(&rxm_prov, FI_LOG_EP_DATA, +- "fi_send for MSG provider failed\n"); +- rxm_tx_buf_release(rxm_ep, tx_entry->tx_buf); +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from RNDV buffer pool\n"); ++ return -FI_EAGAIN; + } +- return ret; +-} + +-static inline ssize_t +-rxm_ep_alloc_lmt_tx_res(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- void *context, uint8_t count, const struct iovec *iov, +- void **desc, size_t data_len, uint64_t data, uint64_t flags, +- uint64_t tag, uint64_t comp_flags, uint8_t op, +- struct rxm_tx_entry **tx_entry) +-{ +- struct rxm_tx_buf *tx_buf; +- struct fid_mr **mr_iov; +- ssize_t ret; ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, op, data, tag, flags, &(tx_buf)->pkt); ++ tx_buf->pkt.ctrl_hdr.msg_id = rxm_tx_buf_2_msg_id(rxm_ep, RXM_BUF_POOL_TX_RNDV, tx_buf); ++ tx_buf->app_context = context; ++ tx_buf->flags = flags; ++ tx_buf->count = count; + +- /* Use LMT buf pool instead of buf pool provided to the function */ +- ret = rxm_ep_format_tx_res(rxm_ep, rxm_conn, context, (uint8_t)count, +- data_len, data, flags, tag, comp_flags, +- &tx_buf, tx_entry, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_LMT]); +- if (OFI_UNLIKELY(ret)) +- return ret; +- tx_buf->pkt.hdr.op = op; +- tx_buf->pkt.ctrl_hdr.msg_id = rxm_txe_fs_index(rxm_ep->send_queue.fs, +- (*tx_entry)); + if (!rxm_ep->rxm_mr_local) { +- ret = rxm_ep_msg_mr_regv(rxm_ep, iov, (*tx_entry)->count, +- FI_REMOTE_READ, (*tx_entry)->mr); ++ ret = rxm_ep_msg_mr_regv(rxm_ep, iov, tx_buf->count, ++ FI_REMOTE_READ, tx_buf->mr); + if (ret) + goto err; +- mr_iov = (*tx_entry)->mr; ++ mr_iov = tx_buf->mr; + } else { + /* desc is msg fid_mr * array */ + mr_iov = (struct fid_mr **)desc; + } + +- return rxm_rma_iov_init(rxm_ep, &(*tx_entry)->tx_buf->pkt.data, iov, +- count, mr_iov); ++ rxm_rndv_hdr_init(rxm_ep, &tx_buf->pkt.data, iov, tx_buf->count, mr_iov); ++ ++ ret = sizeof(struct rxm_pkt) + sizeof(struct rxm_rndv_hdr); ++ ++ if (rxm_ep->rxm_info->mode & FI_BUFFERED_RECV) { ++ ofi_copy_from_iov(rxm_pkt_rndv_data(&tx_buf->pkt), ++ rxm_ep->buffered_min, iov, count, 0); ++ ret += rxm_ep->buffered_min; ++ } ++ ++ *tx_rndv_buf = tx_buf; ++ return ret; + err: +- rxm_tx_entry_release(&rxm_ep->send_queue, (*tx_entry)); +- rxm_tx_buf_release(rxm_ep, tx_buf); ++ *tx_rndv_buf = NULL; ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_RNDV, tx_buf); + return ret; + } + + static inline ssize_t +-rxm_ep_lmt_tx_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry, size_t pkt_size) ++rxm_ep_rndv_tx_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ struct rxm_tx_rndv_buf *tx_buf, size_t pkt_size) + { + ssize_t ret; + +- RXM_LOG_STATE(FI_LOG_EP_DATA, tx_entry->tx_buf->pkt, +- RXM_TX, RXM_LMT_TX); +- if (pkt_size <= rxm_ep->msg_info->tx_attr->inject_size) { +- RXM_LOG_STATE(FI_LOG_CQ, tx_entry->tx_buf->pkt, +- RXM_LMT_TX, RXM_LMT_ACK_WAIT); +- tx_entry->state = RXM_LMT_ACK_WAIT; ++ RXM_LOG_STATE(FI_LOG_EP_DATA, tx_buf->pkt, RXM_TX, RXM_RNDV_TX); ++ if (pkt_size <= rxm_ep->inject_limit) { ++ RXM_LOG_STATE(FI_LOG_CQ, tx_buf->pkt, RXM_RNDV_TX, RXM_RNDV_ACK_WAIT); ++ tx_buf->hdr.state = RXM_RNDV_ACK_WAIT; + +- ret = fi_inject(rxm_conn->msg_ep, &tx_entry->tx_buf->pkt, pkt_size, 0); ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, &tx_buf->pkt, ++ pkt_size, ofi_cntr_inc_noop); + } else { +- tx_entry->state = RXM_LMT_TX; ++ tx_buf->hdr.state = RXM_RNDV_TX; + +- ret = rxm_ep_normal_send(rxm_ep, rxm_conn, tx_entry, pkt_size); ++ ret = rxm_ep_msg_normal_send(rxm_conn, &tx_buf->pkt, pkt_size, ++ tx_buf->hdr.desc, tx_buf); + } + if (OFI_UNLIKELY(ret)) + goto err; +@@ -915,253 +1003,562 @@ err: + FI_DBG(&rxm_prov, FI_LOG_EP_DATA, + "Transmit for MSG provider failed\n"); + if (!rxm_ep->rxm_mr_local) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); +- rxm_tx_buf_release(rxm_ep, tx_entry->tx_buf); +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); ++ rxm_ep_msg_mr_closev(tx_buf->mr, tx_buf->count); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_RNDV, tx_buf); + return ret; + } + +-static inline ssize_t +-rxm_ep_inject_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- struct rxm_tx_buf *tx_buf, size_t pkt_size) ++static inline size_t ++rxm_ep_sar_calc_segs_cnt(struct rxm_ep *rxm_ep, size_t data_len) + { +- ssize_t ret = fi_inject(rxm_conn->msg_ep, &tx_buf->pkt, pkt_size, 0); +- if (OFI_LIKELY(!ret)) +- rxm_cntr_inc(rxm_ep->util_ep.tx_cntr); +- /* release allocated buffer for further reuse */ +- rxm_tx_buf_release(rxm_ep, tx_buf); +- return ret; ++ return (data_len + rxm_ep->eager_limit - 1) / ++ rxm_ep->eager_limit; + } + +-void rxm_ep_handle_postponed_tx_op(struct rxm_ep *rxm_ep, +- struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry) ++static inline struct rxm_tx_sar_buf * ++rxm_ep_sar_tx_prepare_segment(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ void *app_context, size_t total_len, size_t seg_len, ++ size_t seg_no, uint64_t data, uint64_t flags, uint64_t tag, ++ uint8_t op, enum rxm_sar_seg_type seg_type, uint64_t *msg_id) + { +- size_t tx_size = rxm_pkt_size + tx_entry->tx_buf->pkt.hdr.size; ++ struct rxm_tx_sar_buf *tx_buf = (struct rxm_tx_sar_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_SAR); + +- tx_entry->tx_buf->pkt.ctrl_hdr.conn_id = rxm_conn->handle.remote_key; +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, +- "Send deffered TX request (len - %"PRIu64") for %p conn\n", +- tx_entry->tx_buf->pkt.hdr.size, rxm_conn); +- +- if ((tx_size <= rxm_ep->msg_info->tx_attr->inject_size) && +- (tx_entry->flags & FI_INJECT) && !(tx_entry->flags & FI_COMPLETION)) { +- (void) rxm_ep_inject_send(rxm_ep, rxm_conn, +- tx_entry->tx_buf, tx_size); +- /* Release TX entry for futher reuse */ +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); +- } else if (tx_entry->tx_buf->pkt.hdr.size > +- rxm_ep->rxm_info->tx_attr->inject_size) { +- struct rxm_rma_iov *rma_iov = +- (struct rxm_rma_iov *)&tx_entry->tx_buf->pkt.data; +- (void) rxm_ep_lmt_tx_send(rxm_ep, rxm_conn, tx_entry, +- rxm_pkt_size + sizeof(*rma_iov) + +- sizeof(*rma_iov->iov) * tx_entry->count); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from SAR buffer pool\n"); ++ return NULL; ++ }; ++ ++ rxm_ep_format_tx_buf_pkt(rxm_conn, total_len, op, data, tag, flags, &tx_buf->pkt); ++ if (seg_type == RXM_SAR_SEG_FIRST) { ++ *msg_id = tx_buf->pkt.ctrl_hdr.msg_id = ++ rxm_tx_buf_2_msg_id(rxm_ep, RXM_BUF_POOL_TX_SAR, tx_buf); + } else { +- (void) rxm_ep_normal_send(rxm_ep, rxm_conn, tx_entry, tx_size); ++ tx_buf->pkt.ctrl_hdr.msg_id = *msg_id; + } ++ tx_buf->pkt.ctrl_hdr.seg_size = seg_len; ++ tx_buf->pkt.ctrl_hdr.seg_no = seg_no; ++ tx_buf->app_context = app_context; ++ tx_buf->flags = flags; ++ rxm_sar_set_seg_type(&tx_buf->pkt.ctrl_hdr, seg_type); ++ ++ return tx_buf; + } + +-static inline ssize_t +-rxm_ep_postpone_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- void *context, uint8_t count, const struct iovec *iov, +- void **desc, size_t len, uint64_t data, uint64_t flags, +- uint64_t tag, uint64_t comp_flags, +- struct rxm_buf_pool *pool, uint8_t op) ++static void ++rxm_ep_sar_tx_cleanup(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ struct rxm_tx_sar_buf *tx_buf) + { +- struct rxm_tx_entry *tx_entry; +- struct rxm_tx_buf *tx_buf; ++ struct rxm_tx_sar_buf *first_tx_buf = ++ rxm_msg_id_2_tx_buf(rxm_ep, RXM_BUF_POOL_TX_SAR, ++ tx_buf->pkt.ctrl_hdr.msg_id); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, first_tx_buf); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, tx_buf); ++} + +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, +- "Buffer TX request (len - %zd) for %p conn\n", len, rxm_conn); ++static inline ssize_t ++rxm_ep_sar_tx_prepare_and_send_segment(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ void *app_context, size_t data_len, size_t remain_len, ++ uint64_t msg_id, size_t seg_len, size_t seg_no, size_t segs_cnt, ++ uint64_t data, uint64_t flags, uint64_t tag, uint8_t op, ++ const struct iovec *iov, uint8_t count, size_t *iov_offset, ++ struct rxm_tx_sar_buf **out_tx_buf) ++{ ++ struct rxm_tx_sar_buf *tx_buf; ++ enum rxm_sar_seg_type seg_type = RXM_SAR_SEG_MIDDLE; ++ ++ if (seg_no == (segs_cnt - 1)) { ++ seg_type = RXM_SAR_SEG_LAST; ++ assert(remain_len <= seg_len); ++ seg_len = remain_len; ++ } + +- if (len > rxm_ep->rxm_info->tx_attr->inject_size) { +- if (rxm_ep_alloc_lmt_tx_res(rxm_ep, rxm_conn, context, +- count, iov, desc, len, data, +- flags, tag, comp_flags, +- op, &tx_entry) < 0) +- return -FI_EAGAIN; +- } else { +- ssize_t ret = rxm_ep_format_tx_res(rxm_ep, rxm_conn, context, count, +- len, data, flags, tag, comp_flags, +- &tx_buf, &tx_entry, pool); +- if (OFI_UNLIKELY(ret)) +- return ret; +- ofi_copy_from_iov(tx_buf->pkt.data, tx_buf->pkt.hdr.size, +- iov, count, 0); +- tx_entry->state = RXM_TX; ++ tx_buf = rxm_ep_sar_tx_prepare_segment(rxm_ep, rxm_conn, app_context, data_len, seg_len, ++ seg_no, data, flags, tag, op, seg_type, &msg_id); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ *out_tx_buf = NULL; ++ return -FI_EAGAIN; + } + +- dlist_insert_tail(&tx_entry->postponed_entry, &rxm_conn->postponed_tx_list); ++ ofi_copy_from_iov(tx_buf->pkt.data, seg_len, iov, count, *iov_offset); ++ *iov_offset += seg_len; + +- return FI_SUCCESS; ++ *out_tx_buf = tx_buf; ++ ++ return fi_send(rxm_conn->msg_ep, &tx_buf->pkt, sizeof(struct rxm_pkt) + ++ tx_buf->pkt.ctrl_hdr.seg_size, tx_buf->hdr.desc, 0, tx_buf); + } + + static inline ssize_t +-rxm_ep_inject_common(struct rxm_ep *rxm_ep, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t data, uint64_t flags, +- uint64_t tag, uint64_t comp_flags, +- struct rxm_buf_pool *pool) ++rxm_ep_sar_tx_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ void *context, uint8_t count, const struct iovec *iov, ++ size_t data_len, size_t segs_cnt, uint64_t data, ++ uint64_t flags, uint64_t tag, uint8_t op) + { +- struct util_cmap_handle *handle; +- struct rxm_conn *rxm_conn; +- struct rxm_tx_entry *tx_entry = NULL; +- struct rxm_tx_buf *tx_buf; +- size_t pkt_size = rxm_pkt_size + len; ++ struct rxm_tx_sar_buf *tx_buf, *first_tx_buf; ++ size_t i, iov_offset = 0, remain_len = data_len; + ssize_t ret; ++ struct rxm_deferred_tx_entry *def_tx_entry; ++ uint64_t msg_id = 0; + +- assert(len <= rxm_ep->rxm_info->tx_attr->inject_size); ++ assert(segs_cnt >= 2); + +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- handle = ofi_cmap_acquire_handle(rxm_ep->util_ep.cmap, dest_addr); +- if (OFI_UNLIKELY(!handle)) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); ++ first_tx_buf = rxm_ep_sar_tx_prepare_segment(rxm_ep, rxm_conn, context, data_len, ++ rxm_ep->eager_limit, 0, data, flags, ++ tag, op, RXM_SAR_SEG_FIRST, &msg_id); ++ if (OFI_UNLIKELY(!first_tx_buf)) + return -FI_EAGAIN; +- } else if (OFI_UNLIKELY(handle->state != CMAP_CONNECTED)) { +- struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len, +- }; +- ret = ofi_cmap_handle_connect(rxm_ep->util_ep.cmap, +- dest_addr, handle); +- if (ret && (!rxm_defer_requests || OFI_UNLIKELY(ret != -FI_EAGAIN))) +- goto cmap_err; +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- ret = rxm_ep_postpone_send(rxm_ep, rxm_conn, NULL, 1, +- &iov, NULL, len, data, flags, +- tag, comp_flags, pool, 0); +-cmap_err: +- fastlock_release(&rxm_ep->util_ep.cmap->lock); ++ ++ ofi_copy_from_iov(first_tx_buf->pkt.data, rxm_ep->eager_limit, ++ iov, count, iov_offset); ++ iov_offset += rxm_ep->eager_limit; ++ ++ ret = fi_send(rxm_conn->msg_ep, &first_tx_buf->pkt, sizeof(struct rxm_pkt) + ++ first_tx_buf->pkt.ctrl_hdr.seg_size, first_tx_buf->hdr.desc, 0, first_tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, first_tx_buf); + return ret; + } +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- +- assert(dlist_empty(&rxm_conn->postponed_tx_list)); +- +- if (pkt_size <= rxm_ep->msg_info->tx_attr->inject_size) { +- ret = rxm_ep_format_tx_res_lightweight(rxm_ep, rxm_conn, len, +- data, flags, tag, +- &tx_buf, pool); +- if (OFI_UNLIKELY(ret)) +- return ret; +- memcpy(tx_buf->pkt.data, buf, tx_buf->pkt.hdr.size); +- return rxm_ep_inject_send(rxm_ep, rxm_conn, tx_buf, pkt_size); +- } else { +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "passed data (size = %zu) " +- "is too big for MSG provider (max inject size = %zd)\n", +- pkt_size, rxm_ep->msg_info->tx_attr->inject_size); +- ret = rxm_ep_format_tx_res(rxm_ep, rxm_conn, NULL, 1, +- len, data, flags, tag, comp_flags, +- &tx_buf, &tx_entry, pool); +- if (OFI_UNLIKELY(ret)) ++ ++ remain_len -= rxm_ep->eager_limit; ++ ++ for (i = 1; i < segs_cnt; i++) { ++ ret = rxm_ep_sar_tx_prepare_and_send_segment( ++ rxm_ep, rxm_conn, context, data_len, remain_len, ++ msg_id, rxm_ep->eager_limit, i, segs_cnt, data, ++ flags, tag, op, iov, count, &iov_offset, &tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ def_tx_entry = rxm_ep_alloc_deferred_tx_entry(rxm_ep, rxm_conn, ++ RXM_DEFERRED_TX_SAR_SEG); ++ if (OFI_UNLIKELY(!def_tx_entry)) { ++ if (tx_buf) ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, ++ tx_buf); ++ return -FI_ENOMEM; ++ } ++ memcpy(def_tx_entry->sar_seg.payload.iov, iov, sizeof(*iov) * count); ++ def_tx_entry->sar_seg.payload.count = count; ++ def_tx_entry->sar_seg.payload.cur_iov_offset = iov_offset; ++ def_tx_entry->sar_seg.payload.tag = tag; ++ def_tx_entry->sar_seg.payload.data = data; ++ def_tx_entry->sar_seg.cur_seg_tx_buf = tx_buf; ++ def_tx_entry->sar_seg.app_context = context; ++ def_tx_entry->sar_seg.flags = flags; ++ def_tx_entry->sar_seg.op = op; ++ def_tx_entry->sar_seg.next_seg_no = i; ++ def_tx_entry->sar_seg.segs_cnt = segs_cnt; ++ def_tx_entry->sar_seg.total_len = data_len; ++ def_tx_entry->sar_seg.remain_len = remain_len; ++ def_tx_entry->sar_seg.msg_id = msg_id; ++ rxm_ep_enqueue_deferred_tx_queue(def_tx_entry); ++ return 0; ++ } ++ ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_SAR, first_tx_buf); + return ret; +- memcpy(tx_buf->pkt.data, buf, tx_buf->pkt.hdr.size); +- tx_entry->state = RXM_TX; +- return rxm_ep_normal_send(rxm_ep, rxm_conn, tx_entry, pkt_size); ++ } ++ remain_len -= rxm_ep->eager_limit; + } ++ ++ return 0; + } + +-// TODO handle all flags +-static ssize_t +-rxm_ep_send_common(struct rxm_ep *rxm_ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, void *context, uint64_t data, +- uint64_t flags, uint64_t tag, uint64_t comp_flags, +- struct rxm_buf_pool *pool, uint8_t op) ++static inline ssize_t ++rxm_ep_emulate_inject(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const void *buf, size_t len, size_t pkt_size, ++ uint64_t data, uint64_t flags, uint64_t tag, ++ uint8_t op) + { +- struct util_cmap_handle *handle; +- struct rxm_conn *rxm_conn; +- struct rxm_tx_entry *tx_entry; +- struct rxm_tx_buf *tx_buf; +- size_t data_len = ofi_total_iov_len(iov, count); ++ struct rxm_tx_eager_buf *tx_buf; + ssize_t ret; + +- assert(count <= rxm_ep->rxm_info->tx_attr->iov_limit); ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, "passed data (size = %zu) " ++ "is too big for MSG provider (max inject size = %zd)\n", ++ pkt_size, rxm_ep->inject_limit); + +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- handle = ofi_cmap_acquire_handle(rxm_ep->util_ep.cmap, dest_addr); +- if (OFI_UNLIKELY(!handle)) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); ++ tx_buf = (struct rxm_tx_eager_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from Eager buffer pool\n"); + return -FI_EAGAIN; +- } else if (OFI_UNLIKELY(handle->state != CMAP_CONNECTED)) { +- ret = ofi_cmap_handle_connect(rxm_ep->util_ep.cmap, +- dest_addr, handle); +- if (ret && (!rxm_defer_requests || OFI_UNLIKELY(ret != -FI_EAGAIN))) +- goto cmap_err; +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- ret = rxm_ep_postpone_send( +- rxm_ep, rxm_conn, context, count, iov, +- desc, data_len, data, flags, tag, comp_flags, +- (data_len <= +- rxm_ep->rxm_info->tx_attr->inject_size ? +- pool : +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_LMT]), op); +-cmap_err: +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return ret; + } +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- rxm_conn = container_of(handle, struct rxm_conn, handle); ++ /* This is needed so that we don't report bogus context in fi_cq_err_entry */ ++ tx_buf->app_context = NULL; ++ ++ rxm_ep_format_tx_buf_pkt(rxm_conn, len, op, data, tag, flags, &tx_buf->pkt); ++ memcpy(tx_buf->pkt.data, buf, len); ++ tx_buf->flags = flags; ++ ++ ret = rxm_ep_msg_normal_send(rxm_conn, &tx_buf->pkt, pkt_size, ++ tx_buf->hdr.desc, tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX, tx_buf); ++ } ++ return ret; ++} ++ ++static inline ssize_t ++rxm_ep_inject_send_fast(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const void *buf, size_t len, struct rxm_pkt *inject_pkt) ++{ ++ size_t pkt_size = sizeof(struct rxm_pkt) + len; ++ ssize_t ret; ++ ++ assert(len <= rxm_ep->eager_limit); ++ ++ if (pkt_size <= rxm_ep->inject_limit) { ++ inject_pkt->hdr.size = len; ++ memcpy(inject_pkt->data, buf, len); ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, inject_pkt, ++ pkt_size, rxm_ep->util_ep.tx_cntr_inc); ++ } else { ++ ret = rxm_ep_emulate_inject(rxm_ep, rxm_conn, buf, len, pkt_size, ++ inject_pkt->hdr.data, inject_pkt->hdr.flags, ++ inject_pkt->hdr.tag, inject_pkt->hdr.op); ++ } ++ return ret; ++} + +- assert(dlist_empty(&rxm_conn->postponed_tx_list)); ++static inline ssize_t ++rxm_ep_inject_send(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const void *buf, size_t len, uint64_t data, ++ uint64_t flags, uint64_t tag, uint8_t op) ++{ ++ size_t pkt_size = sizeof(struct rxm_pkt) + len; ++ ssize_t ret; ++ ++ assert(len <= rxm_ep->eager_limit); + +- if (data_len > rxm_ep->rxm_info->tx_attr->inject_size) { +- if (OFI_UNLIKELY(flags & FI_INJECT)) { ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ if (pkt_size <= rxm_ep->inject_limit) { ++ struct rxm_tx_base_buf *tx_buf = (struct rxm_tx_base_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_INJECT); ++ if (OFI_UNLIKELY(!tx_buf)) { + FI_WARN(&rxm_prov, FI_LOG_EP_DATA, +- "inject size supported: %zu, msg size: %zu\n", +- rxm_tx_attr.inject_size, data_len); +- return -FI_EMSGSIZE; ++ "Ran out of buffers from Eager Inject buffer pool\n"); ++ ret = -FI_EAGAIN; ++ goto unlock; + } +- ret = rxm_ep_alloc_lmt_tx_res(rxm_ep, rxm_conn, context, (uint8_t)count, +- iov, desc, data_len, data, flags, tag, +- comp_flags, op, &tx_entry); +- if (OFI_UNLIKELY(ret < 0)) +- return ret; +- return rxm_ep_lmt_tx_send(rxm_ep, rxm_conn, tx_entry, rxm_pkt_size + ret); ++ rxm_ep_format_tx_buf_pkt(rxm_conn, len, op, data, tag, ++ flags, &tx_buf->pkt); ++ memcpy(tx_buf->pkt.data, buf, len); ++ ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, &tx_buf->pkt, ++ pkt_size, rxm_ep->util_ep.tx_cntr_inc); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_INJECT, tx_buf); ++ } else { ++ ret = rxm_ep_emulate_inject(rxm_ep, rxm_conn, buf, len, ++ pkt_size, data, flags, tag, op); ++ } ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; ++ ++} ++ ++static inline ssize_t ++rxm_ep_inject_send_common(struct rxm_ep *rxm_ep, const struct iovec *iov, size_t count, ++ struct rxm_conn *rxm_conn, void *context, uint64_t data, ++ uint64_t flags, uint64_t tag, uint8_t op, size_t data_len, ++ size_t total_len, struct rxm_pkt *inject_pkt) ++{ ++ int ret; ++ ++ if (rxm_ep->util_ep.domain->threading != FI_THREAD_SAFE) { ++ assert((op == inject_pkt->hdr.op) && ++ ((flags & FI_REMOTE_CQ_DATA) == inject_pkt->hdr.flags)); ++ ++ inject_pkt->hdr.data = data; ++ inject_pkt->hdr.tag = tag; ++ inject_pkt->hdr.size = data_len; ++ ofi_copy_from_iov(inject_pkt->data, inject_pkt->hdr.size, ++ iov, count, 0); ++ ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, inject_pkt, ++ total_len, rxm_ep->util_ep.tx_cntr_inc); + } else { +- size_t total_len = rxm_pkt_size + data_len; ++ struct rxm_tx_base_buf *tx_buf = (struct rxm_tx_base_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX_INJECT); ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from Eager Inject buffer pool\n"); ++ return -FI_EAGAIN; ++ } ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, op, data, tag, ++ flags, &tx_buf->pkt); ++ ofi_copy_from_iov(tx_buf->pkt.data, tx_buf->pkt.hdr.size, ++ iov, count, 0); ++ ++ ret = rxm_ep_msg_inject_send(rxm_ep, rxm_conn, &tx_buf->pkt, ++ total_len, rxm_ep->util_ep.tx_cntr_inc); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX_INJECT, tx_buf); ++ } ++ if (OFI_UNLIKELY(ret)) ++ return ret; + +- ret = rxm_ep_format_tx_res_lightweight(rxm_ep, rxm_conn, data_len, data, +- flags, tag, &tx_buf, pool); +- if (OFI_UNLIKELY(ret)) ++ if (flags & FI_COMPLETION) { ++ ret = ofi_cq_write(rxm_ep->util_ep.tx_cq, context, ++ ofi_tx_flags[op], 0, NULL, 0, 0); ++ if (OFI_UNLIKELY(ret)) { ++ FI_WARN(&rxm_prov, FI_LOG_CQ, ++ "Unable to report completion\n"); + return ret; ++ } ++ rxm_cq_log_comp(ofi_tx_flags[op]); ++ } ++ return FI_SUCCESS; ++} ++ ++static ssize_t ++rxm_ep_send_common(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const struct iovec *iov, void **desc, size_t count, ++ void *context, uint64_t data, uint64_t flags, uint64_t tag, ++ uint8_t op, struct rxm_pkt *inject_pkt) ++{ ++ size_t data_len = ofi_total_iov_len(iov, count); ++ size_t total_len = sizeof(struct rxm_pkt) + data_len; ++ ssize_t ret; ++ ++ assert(count <= rxm_ep->rxm_info->tx_attr->iov_limit); ++ assert((!(flags & FI_INJECT) && (data_len > rxm_ep->eager_limit)) || ++ (data_len <= rxm_ep->eager_limit)); ++ ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ if (total_len <= rxm_ep->inject_limit) { ++ ret = rxm_ep_inject_send_common(rxm_ep, iov, count, rxm_conn, ++ context, data, flags, tag, op, ++ data_len, total_len, inject_pkt); ++ } else if (data_len <= rxm_ep->eager_limit) { ++ struct rxm_tx_eager_buf *tx_buf = (struct rxm_tx_eager_buf *) ++ rxm_tx_buf_alloc(rxm_ep, RXM_BUF_POOL_TX); ++ ++ if (OFI_UNLIKELY(!tx_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from Eager buffer pool\n"); ++ ret = -FI_EAGAIN; ++ goto unlock; ++ } ++ ++ rxm_ep_format_tx_buf_pkt(rxm_conn, data_len, op, data, tag, ++ flags, &tx_buf->pkt); + ofi_copy_from_iov(tx_buf->pkt.data, tx_buf->pkt.hdr.size, + iov, count, 0); ++ tx_buf->app_context = context; ++ tx_buf->flags = flags; ++ ++ ret = rxm_ep_msg_normal_send(rxm_conn, &tx_buf->pkt, total_len, ++ tx_buf->hdr.desc, tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (ret == -FI_EAGAIN) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ rxm_tx_buf_release(rxm_ep, RXM_BUF_POOL_TX, tx_buf); ++ } ++ } else if (data_len <= rxm_ep->sar_limit) { ++ ret = rxm_ep_sar_tx_send(rxm_ep, rxm_conn, context, ++ count, iov, data_len, ++ rxm_ep_sar_calc_segs_cnt(rxm_ep, data_len), ++ data, flags, tag, op); ++ } else { ++ struct rxm_tx_rndv_buf *tx_buf; ++ ++ ret = rxm_ep_alloc_rndv_tx_res(rxm_ep, rxm_conn, context, (uint8_t)count, ++ iov, desc, data_len, data, flags, tag, op, ++ &tx_buf); ++ if (OFI_LIKELY(ret >= 0)) ++ ret = rxm_ep_rndv_tx_send(rxm_ep, rxm_conn, tx_buf, ret); ++ } ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; ++} ++ ++struct rxm_deferred_tx_entry * ++rxm_ep_alloc_deferred_tx_entry(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ enum rxm_deferred_tx_entry_type type) ++{ ++ struct rxm_deferred_tx_entry *def_tx_entry = ++ calloc(1, sizeof(*def_tx_entry)); ++ if (OFI_UNLIKELY(!def_tx_entry)) ++ return NULL; ++ ++ def_tx_entry->rxm_ep = rxm_ep; ++ def_tx_entry->rxm_conn = rxm_conn; ++ def_tx_entry->type = type; ++ dlist_init(&def_tx_entry->entry); ++ ++ return def_tx_entry; ++} ++ ++static inline void ++rxm_ep_sar_handle_segment_failure(struct rxm_deferred_tx_entry *def_tx_entry, ssize_t ret) ++{ ++ rxm_ep_sar_tx_cleanup(def_tx_entry->rxm_ep, def_tx_entry->rxm_conn, ++ def_tx_entry->sar_seg.cur_seg_tx_buf); ++ rxm_cq_write_error(def_tx_entry->rxm_ep->util_ep.tx_cq, ++ def_tx_entry->rxm_ep->util_ep.tx_cntr, ++ def_tx_entry->sar_seg.app_context, ret); ++} ++ ++/* Returns FI_SUCCESS if the SAR deferred TX queue is empty, ++ * otherwise, it returns -FI_EAGAIN or error from MSG provider */ ++static ssize_t ++rxm_ep_progress_sar_deferred_segments(struct rxm_deferred_tx_entry *def_tx_entry) ++{ ++ ssize_t ret = 0; ++ struct rxm_tx_sar_buf *tx_buf = def_tx_entry->sar_seg.cur_seg_tx_buf; ++ ++ if (tx_buf) { ++ ret = fi_send(def_tx_entry->rxm_conn->msg_ep, &tx_buf->pkt, sizeof(tx_buf->pkt) + ++ tx_buf->pkt.ctrl_hdr.seg_size, tx_buf->hdr.desc, 0, tx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret != -FI_EAGAIN)) { ++ rxm_ep_sar_handle_segment_failure(def_tx_entry, ret); ++ goto sar_finish; ++ } ++ return ret; ++ } + +- if ((flags & FI_INJECT) && !(flags & FI_COMPLETION) && +- (total_len <= rxm_ep->msg_info->tx_attr->inject_size)) +- return rxm_ep_inject_send(rxm_ep, rxm_conn, tx_buf, total_len); ++ def_tx_entry->sar_seg.next_seg_no++; ++ def_tx_entry->sar_seg.remain_len -= def_tx_entry->rxm_ep->eager_limit; + +- ret = rxm_ep_format_tx_entry(rxm_ep, context, (uint8_t)count, +- flags, comp_flags, tx_buf, &tx_entry); ++ if (def_tx_entry->sar_seg.next_seg_no == def_tx_entry->sar_seg.segs_cnt) { ++ assert(rxm_sar_get_seg_type(&tx_buf->pkt.ctrl_hdr) == RXM_SAR_SEG_LAST); ++ goto sar_finish; ++ } ++ } ++ ++ while (def_tx_entry->sar_seg.next_seg_no != def_tx_entry->sar_seg.segs_cnt) { ++ ret = rxm_ep_sar_tx_prepare_and_send_segment( ++ def_tx_entry->rxm_ep, def_tx_entry->rxm_conn, ++ def_tx_entry->sar_seg.app_context, ++ def_tx_entry->sar_seg.total_len, def_tx_entry->sar_seg.remain_len, ++ def_tx_entry->sar_seg.msg_id, def_tx_entry->rxm_ep->eager_limit, ++ def_tx_entry->sar_seg.next_seg_no, def_tx_entry->sar_seg.segs_cnt, ++ def_tx_entry->sar_seg.payload.data, def_tx_entry->sar_seg.flags, ++ def_tx_entry->sar_seg.payload.tag, def_tx_entry->sar_seg.op, ++ def_tx_entry->sar_seg.payload.iov, ++ def_tx_entry->sar_seg.payload.count, ++ &def_tx_entry->sar_seg.payload.cur_iov_offset, ++ &def_tx_entry->sar_seg.cur_seg_tx_buf); + if (OFI_UNLIKELY(ret)) { +- rxm_tx_buf_release(rxm_ep, tx_buf); ++ if (OFI_LIKELY(ret != -FI_EAGAIN)) { ++ rxm_ep_sar_handle_segment_failure(def_tx_entry, ret); ++ goto sar_finish; ++ } ++ + return ret; + } +- tx_entry->state = RXM_TX; +- return rxm_ep_normal_send(rxm_ep, rxm_conn, tx_entry, total_len); ++ def_tx_entry->sar_seg.next_seg_no++; ++ def_tx_entry->sar_seg.remain_len -= def_tx_entry->rxm_ep->eager_limit; + } ++ ++sar_finish: ++ rxm_ep_dequeue_deferred_tx_queue(def_tx_entry); ++ free(def_tx_entry); ++ ++ return ret; + } + +-#define rxm_ep_tx_flags_inject(rxm_ep) \ +- ((rxm_ep_tx_flags(rxm_ep) & ~FI_COMPLETION) | FI_INJECT) ++void rxm_ep_progress_deferred_queue(struct rxm_ep *rxm_ep, ++ struct rxm_conn *rxm_conn) ++{ ++ struct rxm_deferred_tx_entry *def_tx_entry; ++ ssize_t ret = 0; ++ ++ while (!dlist_empty(&rxm_conn->deferred_tx_queue) && !ret) { ++ def_tx_entry = container_of(rxm_conn->deferred_tx_queue.next, ++ struct rxm_deferred_tx_entry, entry); ++ switch (def_tx_entry->type) { ++ case RXM_DEFERRED_TX_RNDV_ACK: ++ ret = fi_send(def_tx_entry->rxm_conn->msg_ep, ++ &def_tx_entry->rndv_ack.rx_buf-> ++ recv_entry->rndv.tx_buf->pkt, ++ sizeof(def_tx_entry->rndv_ack.rx_buf-> ++ recv_entry->rndv.tx_buf->pkt), ++ def_tx_entry->rndv_ack.rx_buf->recv_entry-> ++ rndv.tx_buf->hdr.desc, ++ 0, def_tx_entry->rndv_ack.rx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ break; ++ rxm_cq_write_error(def_tx_entry->rxm_ep->util_ep.rx_cq, ++ def_tx_entry->rxm_ep->util_ep.rx_cntr, ++ def_tx_entry->rndv_read.rx_buf-> ++ recv_entry->context, ret); ++ } ++ rxm_ep_dequeue_deferred_tx_queue(def_tx_entry); ++ free(def_tx_entry); ++ break; ++ case RXM_DEFERRED_TX_RNDV_READ: ++ ret = fi_readv(def_tx_entry->rxm_conn->msg_ep, ++ def_tx_entry->rndv_read.rxm_iov.iov, ++ def_tx_entry->rndv_read.rxm_iov.desc, ++ def_tx_entry->rndv_read.rxm_iov.count, 0, ++ def_tx_entry->rndv_read.rma_iov.addr, ++ def_tx_entry->rndv_read.rma_iov.key, ++ def_tx_entry->rndv_read.rx_buf); ++ if (OFI_UNLIKELY(ret)) { ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ break; ++ rxm_cq_write_error(def_tx_entry->rxm_ep->util_ep.rx_cq, ++ def_tx_entry->rxm_ep->util_ep.rx_cntr, ++ def_tx_entry->rndv_read.rx_buf-> ++ recv_entry->context, ret); ++ break; ++ } ++ rxm_ep_dequeue_deferred_tx_queue(def_tx_entry); ++ free(def_tx_entry); ++ break; ++ case RXM_DEFERRED_TX_SAR_SEG: ++ ret = rxm_ep_progress_sar_deferred_segments(def_tx_entry); ++ break; ++ case RXM_DEFERRED_TX_ATOMIC_RESP: ++ ret = rxm_atomic_send_respmsg(rxm_ep, ++ def_tx_entry->rxm_conn, ++ def_tx_entry->atomic_resp.tx_buf, ++ def_tx_entry->atomic_resp.len); ++ if (OFI_UNLIKELY(ret)) ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ break; ++ rxm_ep_dequeue_deferred_tx_queue(def_tx_entry); ++ free(def_tx_entry); ++ break; ++ } ++ } ++} + + static ssize_t rxm_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, + uint64_t flags) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, msg->msg_iov, msg->desc, msg->iov_count, +- msg->addr, msg->context, msg->data, ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, msg->msg_iov, msg->desc, ++ msg->iov_count, msg->context, msg->data, + flags | (rxm_ep_tx_flags(rxm_ep) & FI_COMPLETION), +- 0, FI_MSG, &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG], +- ofi_op_msg); ++ 0, ofi_op_msg, ++ ((flags & FI_REMOTE_CQ_DATA) ? ++ rxm_conn->inject_data_pkt : rxm_conn->inject_pkt)); + } + + static ssize_t rxm_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, + void *desc, fi_addr_t dest_addr, void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct iovec iov = { + .iov_base = (void *)buf, + .iov_len = len, +@@ -1169,39 +1566,72 @@ static ssize_t rxm_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, &iov, &desc, 1, dest_addr, context, 0, +- rxm_ep_tx_flags(rxm_ep), 0, FI_MSG, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG], +- ofi_op_msg); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, &iov, &desc, 1, context, ++ 0, rxm_ep_tx_flags(rxm_ep), 0, ofi_op_msg, ++ rxm_conn->inject_pkt); + } + + static ssize_t rxm_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, iov, desc, count, dest_addr, context, 0, +- rxm_ep_tx_flags(rxm_ep), 0, FI_MSG, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG], ofi_op_msg); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, iov, desc, count, context, ++ 0, rxm_ep_tx_flags(rxm_ep), 0, ofi_op_msg, ++ rxm_conn->inject_pkt); + } + + static ssize_t rxm_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, + fi_addr_t dest_addr) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_inject_common(rxm_ep, buf, len, dest_addr, 0, +- rxm_ep_tx_flags_inject(rxm_ep), +- 0, FI_MSG, &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG]); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send(rxm_ep, rxm_conn, buf, len, 0, ++ rxm_ep->util_ep.inject_op_flags, ++ 0, ofi_op_msg); ++} ++ ++static ssize_t rxm_ep_inject_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send_fast(rxm_ep, rxm_conn, buf, len, ++ rxm_conn->inject_pkt); + } + + static ssize_t rxm_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, + void *desc, uint64_t data, fi_addr_t dest_addr, + void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct iovec iov = { + .iov_base = (void *)buf, + .iov_len = len, +@@ -1209,21 +1639,48 @@ static ssize_t rxm_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t le + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, &iov, desc, 1, dest_addr, context, data, ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, &iov, desc, 1, context, data, + rxm_ep_tx_flags(rxm_ep) | FI_REMOTE_CQ_DATA, +- 0, FI_MSG, &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG], +- ofi_op_msg); ++ 0, ofi_op_msg, rxm_conn->inject_data_pkt); + } + + static ssize_t rxm_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, + uint64_t data, fi_addr_t dest_addr) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_inject_common(rxm_ep, buf, len, dest_addr, data, +- rxm_ep_tx_flags_inject(rxm_ep) | FI_REMOTE_CQ_DATA, +- 0, FI_MSG, &rxm_ep->buf_pools[RXM_BUF_POOL_TX_MSG]); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send(rxm_ep, rxm_conn, buf, len, data, ++ rxm_ep->util_ep.inject_op_flags | ++ FI_REMOTE_CQ_DATA, 0, ofi_op_msg); ++} ++ ++static ssize_t rxm_ep_injectdata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ rxm_conn->inject_data_pkt->hdr.data = data; ++ ++ return rxm_ep_inject_send_fast(rxm_ep, rxm_conn, buf, len, ++ rxm_conn->inject_data_pkt); + } + + static struct fi_ops_msg rxm_ops_msg = { +@@ -1239,6 +1696,19 @@ static struct fi_ops_msg rxm_ops_msg = { + .injectdata = rxm_ep_injectdata, + }; + ++static struct fi_ops_msg rxm_ops_msg_thread_unsafe = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = rxm_ep_recv, ++ .recvv = rxm_ep_recvv, ++ .recvmsg = rxm_ep_recvmsg, ++ .send = rxm_ep_send, ++ .sendv = rxm_ep_sendv, ++ .sendmsg = rxm_ep_sendmsg, ++ .inject = rxm_ep_inject_fast, ++ .senddata = rxm_ep_senddata, ++ .injectdata = rxm_ep_injectdata_fast, ++}; ++ + static ssize_t rxm_ep_trecvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, + uint64_t flags) + { +@@ -1282,21 +1752,29 @@ static ssize_t rxm_ep_trecvv(struct fid_ep *ep_fid, const struct iovec *iov, + static ssize_t rxm_ep_tsendmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, + uint64_t flags) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, msg->msg_iov, msg->desc, msg->iov_count, +- msg->addr, msg->context, msg->data, ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, msg->msg_iov, msg->desc, ++ msg->iov_count, msg->context, msg->data, + flags | (rxm_ep_tx_flags(rxm_ep) & FI_COMPLETION), +- msg->tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED], +- ofi_op_tagged); ++ msg->tag, ofi_op_tagged, ++ ((flags & FI_REMOTE_CQ_DATA) ? ++ rxm_conn->tinject_data_pkt : rxm_conn->tinject_pkt)); + } + + static ssize_t rxm_ep_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, + void *desc, fi_addr_t dest_addr, uint64_t tag, + void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct iovec iov = { + .iov_base = (void *)buf, + .iov_len = len, +@@ -1304,40 +1782,74 @@ static ssize_t rxm_ep_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, &iov, &desc, 1, dest_addr, context, 0, +- rxm_ep_tx_flags(rxm_ep), tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED], +- ofi_op_tagged); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, &iov, &desc, 1, context, 0, ++ rxm_ep_tx_flags(rxm_ep), tag, ofi_op_tagged, ++ rxm_conn->tinject_pkt); + } + + static ssize_t rxm_ep_tsendv(struct fid_ep *ep_fid, const struct iovec *iov, + void **desc, size_t count, fi_addr_t dest_addr, + uint64_t tag, void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, iov, desc, count, dest_addr, context, 0, +- rxm_ep_tx_flags(rxm_ep), tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED], +- ofi_op_tagged); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, iov, desc, count, context, 0, ++ rxm_ep_tx_flags(rxm_ep), tag, ofi_op_tagged, ++ rxm_conn->tinject_pkt); + } + + static ssize_t rxm_ep_tinject(struct fid_ep *ep_fid, const void *buf, size_t len, + fi_addr_t dest_addr, uint64_t tag) + { ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send(rxm_ep, rxm_conn, buf, len, 0, ++ rxm_ep->util_ep.inject_op_flags, tag, ++ ofi_op_tagged); ++} ++ ++static ssize_t rxm_ep_tinject_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t tag) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_inject_common(rxm_ep, buf, len, dest_addr, 0, +- rxm_ep_tx_flags_inject(rxm_ep), tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED]); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ rxm_conn->tinject_pkt->hdr.tag = tag; ++ ++ return rxm_ep_inject_send_fast(rxm_ep, rxm_conn, buf, len, ++ rxm_conn->tinject_pkt); + } + + static ssize_t rxm_ep_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t len, + void *desc, uint64_t data, fi_addr_t dest_addr, + uint64_t tag, void *context) + { ++ int ret; ++ struct rxm_conn *rxm_conn; + struct iovec iov = { + .iov_base = (void *)buf, + .iov_len = len, +@@ -1345,26 +1857,52 @@ static ssize_t rxm_ep_tsenddata(struct fid_ep *ep_fid, const void *buf, size_t l + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_send_common(rxm_ep, &iov, desc, 1, dest_addr, context, data, ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_send_common(rxm_ep, rxm_conn, &iov, desc, 1, context, data, + rxm_ep_tx_flags(rxm_ep) | FI_REMOTE_CQ_DATA, +- tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED], +- ofi_op_tagged); ++ tag, ofi_op_tagged, rxm_conn->tinject_data_pkt); + } + + static ssize_t rxm_ep_tinjectdata(struct fid_ep *ep_fid, const void *buf, size_t len, + uint64_t data, fi_addr_t dest_addr, uint64_t tag) + { ++ int ret; ++ struct rxm_conn *rxm_conn; ++ struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, ++ util_ep.ep_fid.fid); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ return rxm_ep_inject_send(rxm_ep, rxm_conn, buf, len, data, ++ rxm_ep->util_ep.inject_op_flags | ++ FI_REMOTE_CQ_DATA, tag, ofi_op_tagged); ++} ++ ++static ssize_t rxm_ep_tinjectdata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t tag) ++{ ++ int ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_inject_common(rxm_ep, buf, len, dest_addr, data, +- rxm_ep_tx_flags_inject(rxm_ep) | FI_REMOTE_CQ_DATA, +- tag, FI_TAGGED, +- &rxm_ep->buf_pools[RXM_BUF_POOL_TX_TAGGED]); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ rxm_conn->tinject_data_pkt->hdr.tag = tag; ++ rxm_conn->tinject_data_pkt->hdr.data = data; ++ ++ return rxm_ep_inject_send_fast(rxm_ep, rxm_conn, buf, len, ++ rxm_conn->tinject_data_pkt); + } + +-struct fi_ops_tagged rxm_ops_tagged = { ++static struct fi_ops_tagged rxm_ops_tagged = { + .size = sizeof(struct fi_ops_tagged), + .recv = rxm_ep_trecv, + .recvv = rxm_ep_trecvv, +@@ -1377,6 +1915,19 @@ struct fi_ops_tagged rxm_ops_tagged = { + .injectdata = rxm_ep_tinjectdata, + }; + ++static struct fi_ops_tagged rxm_ops_tagged_thread_unsafe = { ++ .size = sizeof(struct fi_ops_tagged), ++ .recv = rxm_ep_trecv, ++ .recvv = rxm_ep_trecvv, ++ .recvmsg = rxm_ep_trecvmsg, ++ .send = rxm_ep_tsend, ++ .sendv = rxm_ep_tsendv, ++ .sendmsg = rxm_ep_tsendmsg, ++ .inject = rxm_ep_tinject_fast, ++ .senddata = rxm_ep_tsenddata, ++ .injectdata = rxm_ep_tinjectdata_fast, ++}; ++ + static int rxm_ep_msg_res_close(struct rxm_ep *rxm_ep) + { + int ret, retv = 0; +@@ -1422,23 +1973,14 @@ static int rxm_ep_close(struct fid *fid) + int ret, retv = 0; + struct rxm_ep *rxm_ep = + container_of(fid, struct rxm_ep, util_ep.ep_fid.fid); +- struct rxm_ep_wait_ref *wait_ref; +- struct dlist_entry *tmp_list_entry; +- +- dlist_foreach_container_safe(&rxm_ep->msg_cq_fd_ref_list, +- struct rxm_ep_wait_ref, +- wait_ref, entry, tmp_list_entry) { +- ret = ofi_wait_fd_del(wait_ref->wait, +- rxm_ep->msg_cq_fd); +- if (ret) +- retv = ret; +- dlist_remove(&wait_ref->entry); +- free(wait_ref); +- } +- OFI_UNUSED(tmp_list_entry); /* to avoid "set, but not used" warning*/ + +- if (rxm_ep->util_ep.cmap) +- ofi_cmap_free(rxm_ep->util_ep.cmap); ++ if (rxm_ep->cmap) ++ rxm_cmap_free(rxm_ep->cmap); ++ ++ // TODO move this to cmap_free and encapsulate eq progress fns ++ // these vars shouldn't be accessed outside rxm_conn file ++ fastlock_destroy(&rxm_ep->msg_eq_entry_list_lock); ++ slistfd_free(&rxm_ep->msg_eq_entry_list); + + ret = rxm_listener_close(rxm_ep); + if (ret) +@@ -1446,10 +1988,12 @@ static int rxm_ep_close(struct fid *fid) + + rxm_ep_txrx_res_close(rxm_ep); + +- ret = fi_close(&rxm_ep->msg_cq->fid); +- if (ret) { +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg CQ\n"); +- retv = ret; ++ if (rxm_ep->msg_cq) { ++ ret = fi_close(&rxm_ep->msg_cq->fid); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg CQ\n"); ++ retv = ret; ++ } + } + + ret = rxm_ep_msg_res_close(rxm_ep); +@@ -1457,6 +2001,7 @@ static int rxm_ep_close(struct fid *fid) + retv = ret; + + ofi_endpoint_close(&rxm_ep->util_ep); ++ fi_freeinfo(rxm_ep->rxm_info); + free(rxm_ep); + return retv; + } +@@ -1502,9 +2047,18 @@ static int rxm_ep_msg_cq_open(struct rxm_ep *rxm_ep, enum fi_wait_obj wait_obj) + + return 0; + err: +- ret = fi_close(&rxm_ep->msg_cq->fid); +- if (ret) +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg CQ\n"); ++ fi_close(&rxm_ep->msg_cq->fid); ++ return ret; ++} ++ ++static int rxm_ep_eq_entry_list_trywait(void *arg) ++{ ++ struct rxm_ep *rxm_ep = (struct rxm_ep *)arg; ++ int ret; ++ ++ fastlock_acquire(&rxm_ep->msg_eq_entry_list_lock); ++ ret = slistfd_empty(&rxm_ep->msg_eq_entry_list) ? 0 : -FI_EAGAIN; ++ fastlock_release(&rxm_ep->msg_eq_entry_list_lock); + return ret; + } + +@@ -1519,6 +2073,29 @@ static int rxm_ep_trywait(void *arg) + return fi_trywait(rxm_fabric->msg_fabric, fids, 1); + } + ++static int rxm_ep_wait_fd_add(struct rxm_ep *rxm_ep, struct util_wait *wait) ++{ ++ int ret; ++ ++ ret = ofi_wait_fd_add(wait, rxm_ep->msg_cq_fd, FI_EPOLL_IN, ++ rxm_ep_trywait, rxm_ep, ++ &rxm_ep->util_ep.ep_fid.fid); ++ if (ret) ++ return ret; ++ ++ if (rxm_ep->util_ep.domain->data_progress == FI_PROGRESS_MANUAL) { ++ ret = ofi_wait_fd_add( ++ wait, slistfd_get_fd(&rxm_ep->msg_eq_entry_list), ++ FI_EPOLL_IN, rxm_ep_eq_entry_list_trywait, ++ rxm_ep, &rxm_ep->util_ep.ep_fid.fid); ++ if (ret) { ++ ofi_wait_fd_del(wait, rxm_ep->msg_cq_fd); ++ return ret; ++ } ++ } ++ return 0; ++} ++ + static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + { + struct rxm_ep *rxm_ep = +@@ -1526,7 +2103,6 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + struct util_cq *cq; + struct util_av *av; + struct util_cntr *cntr; +- struct rxm_ep_wait_ref *wait_ref = NULL; + int ret = 0; + + switch (bfid->fclass) { +@@ -1535,6 +2111,18 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + ret = ofi_ep_bind_av(&rxm_ep->util_ep, av); + if (ret) + return ret; ++ ++ ret = fi_listen(rxm_ep->msg_pep); ++ if (ret) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, ++ "Unable to set msg PEP to listen state\n"); ++ return ret; ++ } ++ ++ ret = rxm_conn_cmap_alloc(rxm_ep); ++ if (ret) ++ return ret; ++ + break; + case FI_CLASS_CQ: + cq = container_of(bfid, struct util_cq, cq_fid.fid); +@@ -1551,19 +2139,9 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + } + + if (cq->wait) { +- wait_ref = calloc(1, sizeof(struct rxm_ep_wait_ref)); +- if (!wait_ref) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- wait_ref->wait = cq->wait; +- dlist_insert_tail(&wait_ref->entry, +- &rxm_ep->msg_cq_fd_ref_list); +- ret = ofi_wait_fd_add(cq->wait, rxm_ep->msg_cq_fd, +- rxm_ep_trywait, rxm_ep, +- &rxm_ep->util_ep.ep_fid.fid); ++ ret = rxm_ep_wait_fd_add(rxm_ep, cq->wait); + if (ret) +- goto err2; ++ goto err; + } + break; + case FI_CLASS_CNTR: +@@ -1590,19 +2168,9 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + } + + if (cntr->wait) { +- wait_ref = calloc(1, sizeof(struct rxm_ep_wait_ref)); +- if (!wait_ref) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- wait_ref->wait = cntr->wait; +- dlist_insert_tail(&wait_ref->entry, +- &rxm_ep->msg_cq_fd_ref_list); +- ret = ofi_wait_fd_add(cntr->wait, rxm_ep->msg_cq_fd, +- rxm_ep_trywait, rxm_ep, +- &rxm_ep->util_ep.ep_fid.fid); ++ ret = rxm_ep_wait_fd_add(rxm_ep, cntr->wait); + if (ret) +- goto err2; ++ goto err; + } + break; + case FI_CLASS_EQ: +@@ -1613,46 +2181,140 @@ static int rxm_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + break; + } + return ret; +-err2: +- free(wait_ref); +-err1: ++err: + if (fi_close(&rxm_ep->msg_cq->fid)) + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Unable to close msg CQ\n"); + return ret; + } + +-static int rxm_ep_ctrl(struct fid *fid, int command, void *arg) ++static void rxm_ep_sar_init(struct rxm_ep *rxm_ep) ++{ ++ size_t param; ++ ++ /* The SAR initialization must be done after Eager is initialized */ ++ assert(rxm_ep->eager_limit > 0); ++ ++ if (!fi_param_get_size_t(&rxm_prov, "sar_limit", ¶m)) { ++ if (param <= rxm_ep->eager_limit) { ++ FI_WARN(&rxm_prov, FI_LOG_CORE, ++ "Requsted SAR limit (%zd) less or equal " ++ "Eager limit (%zd). SAR limit won't be used. " ++ "Messages of size <= SAR limit would be " ++ "transmitted via Inject/Eager protocol. " ++ "Messages of size > SAR limit would be " ++ "transmitted via Rendezvous protocol\n", ++ param, rxm_ep->eager_limit); ++ param = rxm_ep->eager_limit; ++ } ++ ++ rxm_ep->sar_limit = param; ++ } else { ++ size_t sar_limit = rxm_ep->msg_info->tx_attr->size * ++ rxm_ep->eager_limit; ++ ++ rxm_ep->sar_limit = (sar_limit > RXM_SAR_LIMIT) ? ++ RXM_SAR_LIMIT : sar_limit; ++ } ++} ++ ++static void rxm_ep_settings_init(struct rxm_ep *rxm_ep) ++{ ++ size_t max_prog_val; ++ ++ assert(rxm_ep->msg_info); ++ ++ max_prog_val = MIN(rxm_ep->msg_info->tx_attr->size, ++ rxm_ep->msg_info->rx_attr->size) / 2; ++ rxm_ep->comp_per_progress = (rxm_ep->comp_per_progress > max_prog_val) ? ++ max_prog_val : rxm_ep->comp_per_progress; ++ ++ rxm_ep->msg_mr_local = ofi_mr_local(rxm_ep->msg_info); ++ rxm_ep->rxm_mr_local = ofi_mr_local(rxm_ep->rxm_info); ++ ++ rxm_ep->inject_limit = rxm_ep->msg_info->tx_attr->inject_size; ++ ++ if (!rxm_ep->buffered_min) { ++ if (rxm_ep->inject_limit > ++ (sizeof(struct rxm_pkt) + sizeof(struct rxm_rndv_hdr))) ++ rxm_ep->buffered_min = (rxm_ep->inject_limit - ++ (sizeof(struct rxm_pkt) + ++ sizeof(struct rxm_rndv_hdr))); ++ else ++ assert(!rxm_ep->buffered_min); ++ } ++ ++ rxm_ep->eager_limit = rxm_ep->rxm_info->tx_attr->inject_size; ++ ++ rxm_ep->min_multi_recv_size = rxm_ep->min_multi_recv_size ? ++ rxm_ep->min_multi_recv_size : ++ rxm_ep->eager_limit; ++ rxm_ep->buffered_limit = rxm_ep->buffered_limit ? ++ rxm_ep->buffered_limit : ++ rxm_ep->eager_limit; ++ ++ rxm_ep_sar_init(rxm_ep); ++ ++ FI_INFO(&rxm_prov, FI_LOG_CORE, ++ "Settings:\n" ++ "\t\t MR local: MSG - %d, RxM - %d\n" ++ "\t\t Completions per progress: MSG - %zu\n" ++ "\t\t Protocol limits: MSG Inject - %zu, " ++ "Eager - %zu, " ++ "SAR - %zu\n", ++ rxm_ep->msg_mr_local, rxm_ep->rxm_mr_local, ++ rxm_ep->comp_per_progress, ++ rxm_ep->inject_limit, rxm_ep->eager_limit, rxm_ep->sar_limit); ++} ++ ++static int rxm_ep_txrx_res_open(struct rxm_ep *rxm_ep) + { +- struct rxm_ep *rxm_ep; + int ret; + +- rxm_ep = container_of(fid, struct rxm_ep, util_ep.ep_fid.fid); ++ rxm_ep_settings_init(rxm_ep); ++ ++ ret = rxm_ep_txrx_pool_create(rxm_ep); ++ if (ret) ++ return ret; ++ ++ dlist_init(&rxm_ep->deferred_tx_conn_queue); ++ ++ ret = rxm_ep_rx_queue_init(rxm_ep); ++ if (ret) ++ goto err; ++ ++ return FI_SUCCESS; ++err: ++ rxm_ep_txrx_pool_destroy(rxm_ep); ++ return ret; ++} ++ ++static int rxm_ep_ctrl(struct fid *fid, int command, void *arg) ++{ ++ int ret; ++ struct rxm_ep *rxm_ep ++ = container_of(fid, struct rxm_ep, util_ep.ep_fid.fid); + + switch (command) { + case FI_ENABLE: + if (!rxm_ep->util_ep.rx_cq || !rxm_ep->util_ep.tx_cq) + return -FI_ENOCQ; +- if (!rxm_ep->util_ep.av) ++ if (!rxm_ep->util_ep.av || !rxm_ep->cmap) + return -FI_EOPBADSTATE; +- +- ret = fi_listen(rxm_ep->msg_pep); +- if (ret) { +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, +- "Unable to set msg PEP to listen state\n"); ++ /* At the time of enabling endpoint, FI_OPT_BUFFERED_MIN, ++ * FI_OPT_BUFFERED_LIMIT should have been frozen so we can ++ * create the rendezvous protocol message pool with the right ++ * size */ ++ ret = rxm_ep_txrx_res_open(rxm_ep); ++ if (ret) + return ret; +- } +- +- rxm_ep->util_ep.cmap = rxm_conn_cmap_alloc(rxm_ep); +- if (!rxm_ep->util_ep.cmap) +- return -FI_ENOMEM; + + if (rxm_ep->srx_ctx) { + ret = rxm_ep_prepost_buf(rxm_ep, rxm_ep->srx_ctx); + if (ret) { +- ofi_cmap_free(rxm_ep->util_ep.cmap); ++ rxm_cmap_free(rxm_ep->cmap); + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, + "Unable to prepost recv bufs\n"); +- return ret; ++ goto err; + } + } + break; +@@ -1660,6 +2322,9 @@ static int rxm_ep_ctrl(struct fid *fid, int command, void *arg) + return -FI_ENOSYS; + } + return 0; ++err: ++ rxm_ep_txrx_res_close(rxm_ep); ++ return ret; + } + + static struct fi_ops rxm_ep_fi_ops = { +@@ -1672,14 +2337,14 @@ static struct fi_ops rxm_ep_fi_ops = { + + static int rxm_listener_open(struct rxm_ep *rxm_ep) + { +- struct rxm_fabric *rxm_fabric; +- struct fi_eq_attr eq_attr; +- eq_attr.wait_obj = FI_WAIT_UNSPEC; +- eq_attr.flags = FI_WRITE; ++ struct fi_eq_attr eq_attr = { ++ .wait_obj = FI_WAIT_UNSPEC, ++ .flags = FI_WRITE, ++ }; + int ret; +- +- rxm_fabric = container_of(rxm_ep->util_ep.domain->fabric, +- struct rxm_fabric, util_fabric); ++ struct rxm_fabric *rxm_fabric = ++ container_of(rxm_ep->util_ep.domain->fabric, ++ struct rxm_fabric, util_fabric); + + ret = fi_eq_open(rxm_fabric->msg_fabric, &eq_attr, &rxm_ep->msg_eq, NULL); + if (ret) { +@@ -1697,7 +2362,7 @@ static int rxm_listener_open(struct rxm_ep *rxm_ep) + ret = fi_pep_bind(rxm_ep->msg_pep, &rxm_ep->msg_eq->fid, 0); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, +- "Unable to bind msg PEP to msg EQ\n"); ++ "Unable to bind msg PEP to msg EQ\n"); + goto err; + } + +@@ -1707,56 +2372,19 @@ err: + return ret; + } + +-static int rxm_info_to_core_srx_ctx(uint32_t version, const struct fi_info *rxm_hints, +- struct fi_info *core_hints) +-{ +- int ret; +- +- ret = rxm_info_to_core(version, rxm_hints, core_hints); +- if (ret) +- return ret; +- core_hints->ep_attr->rx_ctx_cnt = FI_SHARED_CONTEXT; +- return 0; +-} +- +-static int rxm_ep_get_core_info(uint32_t version, const struct fi_info *hints, +- struct fi_info **info) +-{ +- int ret; +- +- ret = ofi_get_core_info(version, NULL, NULL, 0, &rxm_util_prov, hints, +- rxm_info_to_core_srx_ctx, info); +- if (!ret) +- return 0; +- +- FI_WARN(&rxm_prov, FI_LOG_EP_CTRL, "Shared receive context not " +- "supported by MSG provider.\n"); +- +- return ofi_get_core_info(version, NULL, NULL, 0, &rxm_util_prov, hints, +- rxm_info_to_core, info); +-} +- +-static int rxm_ep_msg_res_open(struct util_domain *util_domain, +- struct rxm_ep *rxm_ep) ++static int rxm_ep_msg_res_open(struct rxm_ep *rxm_ep) + { + int ret; +- size_t max_prog_val; + struct rxm_domain *rxm_domain = +- container_of(util_domain, struct rxm_domain, util_domain); ++ container_of(rxm_ep->util_ep.domain, struct rxm_domain, util_domain); + +- ret = rxm_ep_get_core_info(util_domain->fabric->fabric_fid.api_version, +- rxm_ep->rxm_info, &rxm_ep->msg_info); ++ ret = ofi_get_core_info(rxm_ep->util_ep.domain->fabric->fabric_fid.api_version, ++ NULL, NULL, 0, &rxm_util_prov, rxm_ep->rxm_info, ++ rxm_info_to_core, &rxm_ep->msg_info); + if (ret) + return ret; + +- max_prog_val = MIN(rxm_ep->msg_info->tx_attr->size, +- rxm_ep->msg_info->rx_attr->size) / 2; +- rxm_ep->comp_per_progress = (rxm_ep->comp_per_progress > max_prog_val) ? +- max_prog_val : rxm_ep->comp_per_progress; +- +- dlist_init(&rxm_ep->msg_cq_fd_ref_list); +- +- if (rxm_ep->msg_info->ep_attr->rx_ctx_cnt == FI_SHARED_CONTEXT) { ++ if (rxm_ep->msg_info->ep_attr->rx_ctx_cnt == FI_SHARED_CONTEXT) { + ret = fi_srx_context(rxm_domain->msg_domain, rxm_ep->msg_info->rx_attr, + &rxm_ep->srx_ctx, NULL); + if (ret) { +@@ -1766,11 +2394,11 @@ static int rxm_ep_msg_res_open(struct util_domain *util_domain, + } + } + +- ret = rxm_listener_open(rxm_ep); ++ ret = rxm_listener_open(rxm_ep); + if (ret) + goto err2; + +- /* Zero out the port as we would be creating multiple MSG EPs for a single ++ /* Zero out the port as we would be creating multiple MSG EPs for a single + * RXM EP and we don't want address conflicts. */ + if (rxm_ep->msg_info->src_addr) { + if (((struct sockaddr *)rxm_ep->msg_info->src_addr)->sa_family == AF_INET) +@@ -1778,9 +2406,11 @@ static int rxm_ep_msg_res_open(struct util_domain *util_domain, + else + ((struct sockaddr_in6 *)(rxm_ep->msg_info->src_addr))->sin6_port = 0; + } ++ + return 0; + err2: +- fi_close(&rxm_ep->srx_ctx->fid); ++ if (rxm_ep->srx_ctx) ++ fi_close(&rxm_ep->srx_ctx->fid); + err1: + fi_freeinfo(rxm_ep->msg_info); + return ret; +@@ -1789,7 +2419,6 @@ err1: + int rxm_endpoint(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep_fid, void *context) + { +- struct util_domain *util_domain; + struct rxm_ep *rxm_ep; + int ret; + +@@ -1803,49 +2432,39 @@ int rxm_endpoint(struct fid_domain *domain, struct fi_info *info, + goto err1; + } + +- if (!fi_param_get_int(&rxm_prov, "comp_per_progress", +- (int *)&rxm_ep->comp_per_progress)) { +- ret = ofi_endpoint_init(domain, &rxm_util_prov, +- info, &rxm_ep->util_ep, +- context, &rxm_ep_progress_multi); +- } else { ++ if (fi_param_get_int(&rxm_prov, "comp_per_progress", ++ (int *)&rxm_ep->comp_per_progress)) + rxm_ep->comp_per_progress = 1; +- ret = ofi_endpoint_init(domain, &rxm_util_prov, +- info, &rxm_ep->util_ep, +- context, &rxm_ep_progress_one); +- if (ret) +- goto err1; +- } ++ ++ ret = ofi_endpoint_init(domain, &rxm_util_prov, info, &rxm_ep->util_ep, ++ context, &rxm_ep_progress); + if (ret) + goto err1; + +- +- util_domain = container_of(domain, struct util_domain, domain_fid); +- +- ret = rxm_ep_msg_res_open(util_domain, rxm_ep); ++ ret = rxm_ep_msg_res_open(rxm_ep); + if (ret) + goto err2; + +- rxm_ep->msg_mr_local = OFI_CHECK_MR_LOCAL(rxm_ep->msg_info); +- rxm_ep->rxm_mr_local = OFI_CHECK_MR_LOCAL(rxm_ep->rxm_info); +- +- rxm_ep->min_multi_recv_size = rxm_ep->rxm_info->tx_attr->inject_size; +- +- ret = rxm_ep_txrx_res_open(rxm_ep); +- if (ret) +- goto err3; ++ slistfd_init(&rxm_ep->msg_eq_entry_list); ++ fastlock_init(&rxm_ep->msg_eq_entry_list_lock); + + *ep_fid = &rxm_ep->util_ep.ep_fid; + (*ep_fid)->fid.ops = &rxm_ep_fi_ops; + (*ep_fid)->ops = &rxm_ops_ep; + (*ep_fid)->cm = &rxm_ops_cm; +- (*ep_fid)->msg = &rxm_ops_msg; +- (*ep_fid)->tagged = &rxm_ops_tagged; ++ if (rxm_ep->util_ep.domain->threading != FI_THREAD_SAFE) { ++ (*ep_fid)->msg = &rxm_ops_msg_thread_unsafe; ++ (*ep_fid)->tagged = &rxm_ops_tagged_thread_unsafe; ++ } else { ++ (*ep_fid)->msg = &rxm_ops_msg; ++ (*ep_fid)->tagged = &rxm_ops_tagged; ++ } + (*ep_fid)->rma = &rxm_ops_rma; + ++ if (rxm_ep->rxm_info->caps & FI_ATOMIC) ++ (*ep_fid)->atomic = &rxm_ops_atomic; ++ + return 0; +-err3: +- rxm_ep_msg_res_close(rxm_ep); + err2: + ofi_endpoint_close(&rxm_ep->util_ep); + err1: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_fabric.c +index 0280518c6..49c000828 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_fabric.c +@@ -89,7 +89,7 @@ int rxm_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + if (ret) + goto err1; + +- ret = ofi_get_core_info_fabric(attr, &msg_info); ++ ret = ofi_get_core_info_fabric(&rxm_prov, attr, &msg_info); + if (ret) { + FI_WARN(&rxm_prov, FI_LOG_FABRIC, "Unable to get core info!\n"); + ret = -FI_EINVAL; +@@ -109,7 +109,7 @@ int rxm_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + err3: + fi_freeinfo(msg_info); + err2: +- ofi_fabric_close(&rxm_fabric->util_fabric); ++ (void) ofi_fabric_close(&rxm_fabric->util_fabric); + err1: + free(rxm_fabric); + return ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_init.c +index 70cd28fcc..eb0a36e0a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_init.c +@@ -38,7 +38,10 @@ + #include + #include "rxm.h" + +-int rxm_defer_requests = 0; ++#define RXM_ATOMIC_UNSUPPORTED_MSG_ORDER (FI_ORDER_RAR | FI_ORDER_RAW | \ ++ FI_ORDER_WAR | FI_ORDER_WAW | \ ++ FI_ORDER_SAR | FI_ORDER_SAW) ++ + size_t rxm_msg_tx_size = 128; + size_t rxm_msg_rx_size = 128; + size_t rxm_def_univ_size = 256; +@@ -81,6 +84,8 @@ void rxm_info_to_core_mr_modes(uint32_t version, const struct fi_info *hints, + int rxm_info_to_core(uint32_t version, const struct fi_info *hints, + struct fi_info *core_info) + { ++ int use_srx = 0; ++ + rxm_info_to_core_mr_modes(version, hints, core_info); + + core_info->mode |= FI_RX_CQ_DATA | FI_CONTEXT; +@@ -95,6 +100,7 @@ int rxm_info_to_core(uint32_t version, const struct fi_info *hints, + + if (hints->domain_attr) { + core_info->domain_attr->caps |= hints->domain_attr->caps; ++ core_info->domain_attr->threading = hints->domain_attr->threading; + } + if (hints->tx_attr) { + core_info->tx_attr->msg_order = hints->tx_attr->msg_order; +@@ -106,6 +112,11 @@ int rxm_info_to_core(uint32_t version, const struct fi_info *hints, + } + } + core_info->ep_attr->type = FI_EP_MSG; ++ if (!fi_param_get_bool(&rxm_prov, "use_srx", &use_srx) && use_srx) { ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Requesting shared receive context from core provider\n"); ++ core_info->ep_attr->rx_ctx_cnt = FI_SHARED_CONTEXT; ++ } + + core_info->tx_attr->size = rxm_msg_tx_size; + core_info->rx_attr->size = rxm_msg_rx_size; +@@ -155,9 +166,9 @@ int rxm_info_to_rxm(uint32_t version, const struct fi_info *core_info, + + static int rxm_init_info(void) + { +- int param; ++ size_t param; + +- if (!fi_param_get_int(&rxm_prov, "buffer_size", ¶m)) { ++ if (!fi_param_get_size_t(&rxm_prov, "buffer_size", ¶m)) { + if (param > sizeof(struct rxm_pkt)) { + rxm_info.tx_attr->inject_size = param; + } else { +@@ -181,12 +192,42 @@ static void rxm_alter_info(const struct fi_info *hints, struct fi_info *info) + /* Remove the following caps if they are not requested as they + * may affect performance in fast-path */ + if (!hints) { +- cur->caps &= ~(FI_DIRECTED_RECV | FI_SOURCE); ++ cur->caps &= ~(FI_DIRECTED_RECV | FI_SOURCE | ++ FI_ATOMIC); ++ cur->tx_attr->caps &= ~FI_ATOMIC; ++ cur->rx_attr->caps &= ~FI_ATOMIC; ++ cur->domain_attr->data_progress = FI_PROGRESS_MANUAL; + } else { + if (!(hints->caps & FI_DIRECTED_RECV)) + cur->caps &= ~FI_DIRECTED_RECV; + if (!(hints->caps & FI_SOURCE)) + cur->caps &= ~FI_SOURCE; ++ ++ if (hints->mode & FI_BUFFERED_RECV) ++ cur->mode |= FI_BUFFERED_RECV; ++ ++ if (hints->caps & FI_ATOMIC) { ++ cur->tx_attr->msg_order &= ++ ~(RXM_ATOMIC_UNSUPPORTED_MSG_ORDER); ++ cur->rx_attr->msg_order &= ++ ~(RXM_ATOMIC_UNSUPPORTED_MSG_ORDER); ++ } else { ++ cur->caps &= ~FI_ATOMIC; ++ cur->tx_attr->caps &= ~FI_ATOMIC; ++ cur->rx_attr->caps &= ~FI_ATOMIC; ++ } ++ ++ if (!ofi_mr_local(hints)) { ++ cur->mode &= ~FI_LOCAL_MR; ++ cur->tx_attr->mode &= ~FI_LOCAL_MR; ++ cur->rx_attr->mode &= ~FI_LOCAL_MR; ++ cur->domain_attr->mr_mode &= ~FI_MR_LOCAL; ++ } ++ ++ if (!hints->domain_attr || ++ hints->domain_attr->data_progress != FI_PROGRESS_AUTO) ++ cur->domain_attr->data_progress = FI_PROGRESS_MANUAL; ++ + if (hints->ep_attr && hints->ep_attr->mem_tag_format && + (info->caps & FI_TAGGED)) { + FI_INFO(&rxm_prov, FI_LOG_CORE, +@@ -201,11 +242,31 @@ static void rxm_alter_info(const struct fi_info *hints, struct fi_info *info) + } + } + ++static int rxm_validate_atomic_hints(const struct fi_info *hints) ++{ ++ if (!hints || !(hints->caps & FI_ATOMIC)) ++ return 0; ++ ++ if (hints->tx_attr && (hints->tx_attr->msg_order & ++ RXM_ATOMIC_UNSUPPORTED_MSG_ORDER)) { ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Hints tx_attr msg_order not supported for atomics\n"); ++ return -FI_EINVAL; ++ } ++ if (hints->rx_attr && (hints->rx_attr->msg_order & ++ RXM_ATOMIC_UNSUPPORTED_MSG_ORDER)) { ++ FI_DBG(&rxm_prov, FI_LOG_FABRIC, ++ "Hints rx_attr msg_order not supported for atomics\n"); ++ return -FI_EINVAL; ++ } ++ return 0; ++} ++ + static int rxm_getinfo(uint32_t version, const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, + struct fi_info **info) + { +- struct fi_info *cur, *dup; ++ struct fi_info *cur; + struct addrinfo *ai; + uint16_t port_save = 0; + int ret; +@@ -227,6 +288,9 @@ static int rxm_getinfo(uint32_t version, const char *node, const char *service, + ofi_addr_set_port(hints->src_addr, 0); + } + } ++ ret = rxm_validate_atomic_hints(hints); ++ if (ret) ++ return ret; + + ret = ofix_getinfo(version, node, service, flags, &rxm_util_prov, hints, + rxm_info_to_core, rxm_info_to_rxm, info); +@@ -241,33 +305,6 @@ static int rxm_getinfo(uint32_t version, const char *node, const char *service, + } + + rxm_alter_info(hints, *info); +- +- /* If app supports FI_MR_LOCAL, prioritize requiring it for +- * better performance. */ +- if (hints && hints->domain_attr && +- (OFI_CHECK_MR_LOCAL(hints))) { +- for (cur = *info; cur; cur = cur->next) { +- if (!OFI_CHECK_MR_LOCAL(cur)) +- continue; +- dup = fi_dupinfo(cur); +- if (!dup) { +- fi_freeinfo(*info); +- return -FI_ENOMEM; +- } +- +- dup->mode &= ~FI_LOCAL_MR; +- dup->domain_attr->mr_mode &= ~FI_MR_LOCAL; +- +- dup->next = cur->next; +- cur->next = dup; +- cur = dup; +- } +- } else { +- for (cur = *info; cur; cur = cur->next) { +- cur->mode &= ~FI_LOCAL_MR; +- cur->domain_attr->mr_mode &= ~FI_MR_LOCAL; +- } +- } + return 0; + } + +@@ -280,7 +317,7 @@ static void rxm_fini(void) + struct fi_provider rxm_prov = { + .name = OFI_UTIL_PREFIX "rxm", + .version = FI_VERSION(RXM_MAJOR_VERSION, RXM_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = rxm_getinfo, + .fabric = rxm_fabric, + .cleanup = rxm_fini +@@ -288,23 +325,31 @@ struct fi_provider rxm_prov = { + + RXM_INI + { +- fi_param_define(&rxm_prov, "buffer_size", FI_PARAM_INT, ++ fi_param_define(&rxm_prov, "buffer_size", FI_PARAM_SIZE_T, + "Defines the transmit buffer size / inject size. Messages" + " of size less than this would be transmitted via an " + "eager protocol and those above would be transmitted " +- "via a rendezvous protocol. Transmit data would be copied" +- " up to this size (default: ~16k)."); ++ "via a rendezvous or SAR (Segmentation And Reassembly) " ++ "protocol. Transmit data would be copied up to this size " ++ "(default: ~16k)."); + + fi_param_define(&rxm_prov, "comp_per_progress", FI_PARAM_INT, + "Defines the maximum number of MSG provider CQ entries " + "(default: 1) that would be read per progress " + "(RxM CQ read)."); + +- fi_param_define(&rxm_prov, "defer_requests", FI_PARAM_BOOL, +- "Defer requests when connection is not established " +- "(default: false)\n"); +- +- fi_param_get_bool(&rxm_prov, "defer_requests", &rxm_defer_requests); ++ fi_param_define(&rxm_prov, "sar_limit", FI_PARAM_SIZE_T, ++ "Set this environment variable to control the RxM SAR " ++ "(Segmentation And Reassembly) protocol. " ++ "Messages of size greater than this (default: 256 Kb) " ++ "would be transmitted via rendezvous protocol."); ++ ++ fi_param_define(&rxm_prov, "use_srx", FI_PARAM_BOOL, ++ "Set this enivronment variable to control the RxM " ++ "receive path. If this variable set to 1 (default: 0), " ++ "the RxM uses Shared Receive Context. This mode improves " ++ "memory consumption, but it may increase small message " ++ "latency as a side-effect."); + + fi_param_define(&rxm_prov, "tx_size", FI_PARAM_SIZE_T, + "Defines default tx context size (default: 1024)."); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_rma.c +index 4e7e56f0c..8e755ca8a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/rxm/src/rxm_rma.c +@@ -37,9 +37,8 @@ typedef ssize_t rxm_rma_msg_fn(struct fid_ep *ep_fid, + + static inline ssize_t + rxm_ep_rma_reg_iov(struct rxm_ep *rxm_ep, const struct iovec *msg_iov, +- void **desc, void **desc_storage, +- size_t iov_count, uint64_t comp_flags, +- struct rxm_tx_entry *tx_entry) ++ void **desc, void **desc_storage, size_t iov_count, ++ uint64_t comp_flags, struct rxm_rma_buf *rma_buf) + { + size_t i; + +@@ -48,12 +47,13 @@ rxm_ep_rma_reg_iov(struct rxm_ep *rxm_ep, const struct iovec *msg_iov, + ssize_t ret = + rxm_ep_msg_mr_regv(rxm_ep, msg_iov, iov_count, + comp_flags & (FI_WRITE | FI_READ), +- tx_entry->mr); ++ rma_buf->mr.mr); + if (OFI_UNLIKELY(ret)) + return ret; + + for (i = 0; i < iov_count; i++) +- desc_storage[i] = fi_mr_desc(tx_entry->mr[i]); ++ desc_storage[i] = fi_mr_desc(rma_buf->mr.mr[i]); ++ rma_buf->mr.count = iov_count; + } else { + for (i = 0; i < iov_count; i++) + desc_storage[i] = fi_mr_desc(desc[i]); +@@ -62,312 +62,58 @@ rxm_ep_rma_reg_iov(struct rxm_ep *rxm_ep, const struct iovec *msg_iov, + return FI_SUCCESS; + } + +-static inline void +-rxm_ep_rma_fill_msg(struct fi_msg_rma *msg_rma, struct iovec *iov, +- size_t iov_count, void **desc, +- struct rxm_rma_iov_storage *rma_iov, +- struct rxm_tx_entry *tx_entry, +- const struct fi_msg_rma *orig_msg) +-{ +- msg_rma->msg_iov = iov; +- msg_rma->desc = desc; +- msg_rma->iov_count = iov_count; +- msg_rma->addr = orig_msg->addr; +- msg_rma->rma_iov = rma_iov->iov; +- msg_rma->rma_iov_count = rma_iov->count; +- msg_rma->context = tx_entry; +- msg_rma->data = orig_msg->data; +-} +- +-static inline void +-rxm_ep_rma_fill_msg_no_buf(struct rxm_rma_buf *rma_buf, +- struct rxm_tx_entry *tx_entry, +- const struct fi_msg_rma *orig_msg) +-{ +- rma_buf->rxm_iov.count = (uint8_t)orig_msg->iov_count; +- +- rxm_ep_rma_fill_msg(&rma_buf->msg, rma_buf->rxm_iov.iov, +- rma_buf->rxm_iov.count, rma_buf->rxm_iov.desc, +- &rma_buf->rxm_rma_iov, tx_entry, orig_msg); +-} +- +-static inline void +-rxm_ep_rma_fill_msg_buf(struct rxm_rma_buf *rma_buf, +- struct rxm_tx_entry *tx_entry, +- const struct fi_msg_rma *orig_msg) +-{ +- ofi_copy_from_iov(rma_buf->pkt.data, rma_buf->pkt.hdr.size, +- orig_msg->msg_iov, orig_msg->iov_count, 0); +- +- rma_buf->rxm_iov.iov[0].iov_base = &rma_buf->pkt.data; +- rma_buf->rxm_iov.iov[0].iov_len = rma_buf->pkt.hdr.size; +- +- rxm_ep_rma_fill_msg(&rma_buf->msg, rma_buf->rxm_iov.iov, +- 1, &rma_buf->hdr.desc, &rma_buf->rxm_rma_iov, +- tx_entry, orig_msg); +-} +- +-static inline ssize_t +-rxm_ep_format_rma_res_lightweight(struct rxm_ep *rxm_ep, uint64_t flags, +- uint64_t comp_flags, const struct fi_msg_rma *orig_msg, +- struct rxm_tx_entry **tx_entry) +-{ +- *tx_entry = rxm_tx_entry_get(&rxm_ep->send_queue); +- if (OFI_UNLIKELY(!*tx_entry)) { +- FI_WARN(&rxm_prov, FI_LOG_CQ, +- "Unable to allocate TX entry for RMA!\n"); +- rxm_ep_progress_multi(&rxm_ep->util_ep); +- return -FI_EAGAIN; +- } +- +- (*tx_entry)->state = RXM_TX_NOBUF; +- (*tx_entry)->context = orig_msg->context; +- (*tx_entry)->flags = flags; +- (*tx_entry)->comp_flags = FI_RMA | comp_flags; +- (*tx_entry)->count = orig_msg->iov_count; +- +- return FI_SUCCESS; +-} +- +-static inline ssize_t +-rxm_ep_format_rma_buf(struct rxm_ep *rxm_ep, size_t total_size, +- const struct fi_msg_rma *orig_msg, +- struct rxm_rma_buf **rma_buf, struct rxm_tx_entry *tx_entry) +-{ +- size_t i; +- +- *rma_buf = rxm_rma_buf_get(rxm_ep); +- if (OFI_UNLIKELY(!*rma_buf)) +- return -FI_EAGAIN; +- +- tx_entry->state = RXM_TX_RMA; +- tx_entry->rma_buf = *rma_buf; +- (*rma_buf)->pkt.hdr.size = total_size; +- (*rma_buf)->rxm_iov.count = orig_msg->iov_count; +- (*rma_buf)->rxm_rma_iov.count = orig_msg->rma_iov_count; +- for (i = 0; i < orig_msg->iov_count; i++) +- (*rma_buf)->rxm_iov.iov[i] = orig_msg->msg_iov[i]; +- for (i = 0; i < orig_msg->rma_iov_count; i++) +- (*rma_buf)->rxm_rma_iov.iov[i] = orig_msg->rma_iov[i]; +- +- return FI_SUCCESS; +-} +- +-static inline ssize_t +-rxm_ep_format_rma_res(struct rxm_ep *rxm_ep, size_t total_size, +- uint64_t flags, uint64_t comp_flags, +- const struct fi_msg_rma *orig_msg, +- struct rxm_rma_buf **rma_buf, +- struct rxm_tx_entry **tx_entry) +-{ +- ssize_t ret; +- +- ret = rxm_ep_format_rma_res_lightweight(rxm_ep, flags, comp_flags, +- orig_msg, tx_entry); +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- ret = rxm_ep_format_rma_buf(rxm_ep, total_size, orig_msg, +- rma_buf, *tx_entry); +- if (OFI_UNLIKELY(ret)) +- goto err; +- +- return FI_SUCCESS; +-err: +- FI_WARN(&rxm_prov, FI_LOG_CQ, "Unable to allocate RMA resources!\n"); +- rxm_tx_entry_release(&rxm_ep->send_queue, *tx_entry); +- return ret; +-} +- +-void rxm_ep_handle_postponed_rma_op(struct rxm_ep *rxm_ep, +- struct rxm_conn *rxm_conn, +- struct rxm_tx_entry *tx_entry) +-{ +- ssize_t ret; +- struct util_cntr *cntr; +- struct util_cq *cq; +- struct fi_cq_err_entry err_entry; +- +- FI_DBG(&rxm_prov, FI_LOG_EP_DATA, +- "Perform deffered RMA operation (len - %"PRIu64") for %p conn\n", +- tx_entry->rma_buf->pkt.hdr.size, rxm_conn); +- +- if (tx_entry->comp_flags & FI_WRITE) { +- uint64_t flags = ((tx_entry->flags & FI_INJECT) ? +- ((tx_entry->flags & ~FI_INJECT) | +- FI_COMPLETION) : tx_entry->flags); +- ret = fi_writemsg(rxm_conn->msg_ep, +- &tx_entry->rma_buf->msg, +- flags); +- if (OFI_UNLIKELY(ret)) { +- cntr = rxm_ep->util_ep.wr_cntr; +- cq = rxm_ep->util_ep.tx_cq; +- goto err; +- } +- } else if (tx_entry->comp_flags & FI_READ) { +- ret = fi_readmsg(rxm_conn->msg_ep, +- &tx_entry->rma_buf->msg, +- tx_entry->flags); +- if (OFI_UNLIKELY(ret)) { +- cntr = rxm_ep->util_ep.rd_cntr; +- cq = rxm_ep->util_ep.tx_cq; +- goto err; +- } +- } else { +- assert(0); +- } +- +- return; +-err: +- FI_WARN(&rxm_prov, FI_LOG_EP_DATA, +- "Unable to perform deffered RMA operation\n"); +- +- memset(&err_entry, 0, sizeof(err_entry)); +- err_entry.op_context = tx_entry->context; +- err_entry.prov_errno = (int)ret; +- +- rxm_cntr_incerr(cntr); +- if (ofi_cq_write_error(cq, &err_entry)) +- assert(0); +-} +- +-static inline ssize_t +-rxm_ep_format_rma_inject_res(struct rxm_ep *rxm_ep, size_t total_size, +- uint64_t flags, uint64_t comp_flags, +- const struct fi_msg_rma *orig_msg, +- struct rxm_rma_buf **rma_buf, +- struct rxm_tx_entry **tx_entry) +-{ +- ssize_t ret = rxm_ep_format_rma_res(rxm_ep, total_size, flags, comp_flags, +- orig_msg, rma_buf, tx_entry); +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- rxm_ep_rma_fill_msg_buf(*rma_buf, *tx_entry, orig_msg); +- +- return ret; +-} +- + static inline ssize_t +-rxm_ep_format_rma_non_inject_res(struct rxm_ep *rxm_ep, size_t total_size, +- uint64_t flags, uint64_t comp_flags, +- const struct fi_msg_rma *orig_msg, +- struct rxm_rma_buf **rma_buf, +- struct rxm_tx_entry **tx_entry) +-{ +- ssize_t ret = rxm_ep_format_rma_res(rxm_ep, total_size, flags, comp_flags, +- orig_msg, rma_buf, tx_entry); +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- ret = rxm_ep_rma_reg_iov(rxm_ep, (*rma_buf)->rxm_iov.iov, +- /* addr of desc from rma_buf will be assign to itself */ +- orig_msg->desc, +- (*rma_buf)->rxm_iov.desc, +- orig_msg->iov_count, +- comp_flags & (FI_WRITE | FI_READ), *tx_entry); +- if (OFI_UNLIKELY(ret)) +- goto err; +- +- rxm_ep_rma_fill_msg_no_buf(*rma_buf, *tx_entry, orig_msg); +- +- return ret; +-err: +- rxm_rma_buf_release(rxm_ep, (*tx_entry)->rma_buf); +- rxm_tx_entry_release(&rxm_ep->send_queue, *tx_entry); +- return ret; +-} +- +-static inline int +-rxm_ep_postpone_rma(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, +- size_t total_size, uint64_t flags, +- uint64_t comp_flags, const struct fi_msg_rma *orig_msg) +-{ +- struct rxm_tx_entry *tx_entry; +- struct rxm_rma_buf *rma_buf; +- int ret; +- +- if (flags & FI_INJECT) { +- assert(comp_flags & FI_WRITE); +- ret = rxm_ep_format_rma_inject_res(rxm_ep, total_size, +- flags, comp_flags, orig_msg, +- &rma_buf, &tx_entry); +- } else { +- ret = rxm_ep_format_rma_non_inject_res(rxm_ep, total_size, +- flags, comp_flags, orig_msg, +- &rma_buf, &tx_entry); +- } +- if (OFI_UNLIKELY(ret)) +- return ret; +- +- dlist_insert_tail(&tx_entry->postponed_entry, +- &rxm_conn->postponed_tx_list); +- +- return ret; +-} +- +-static ssize_t + rxm_ep_rma_common(struct rxm_ep *rxm_ep, const struct fi_msg_rma *msg, uint64_t flags, + rxm_rma_msg_fn rma_msg, uint64_t comp_flags) + { +- struct rxm_tx_entry *tx_entry; ++ struct rxm_rma_buf *rma_buf; + struct fi_msg_rma msg_rma = *msg; +- struct util_cmap_handle *handle; + struct rxm_conn *rxm_conn; + void *mr_desc[RXM_IOV_LIMIT] = { 0 }; + int ret; + + assert(msg->rma_iov_count <= rxm_ep->rxm_info->tx_attr->rma_iov_limit); + +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- handle = ofi_cmap_acquire_handle(rxm_ep->util_ep.cmap, msg->addr); +- if (OFI_UNLIKELY(!handle)) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return -FI_EAGAIN; +- } else if (OFI_UNLIKELY(handle->state != CMAP_CONNECTED)) { +- ret = ofi_cmap_handle_connect(rxm_ep->util_ep.cmap, +- msg->addr, handle); +- if (OFI_UNLIKELY(ret != -FI_EAGAIN)) +- goto cmap_err; +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- ret = rxm_ep_postpone_rma(rxm_ep, rxm_conn, +- ofi_total_iov_len(msg->msg_iov, +- msg->iov_count), +- flags, comp_flags, msg); +-cmap_err: +- fastlock_release(&rxm_ep->util_ep.cmap->lock); ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) + return ret; +- } +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- rxm_conn = container_of(handle, struct rxm_conn, handle); + +- ret = rxm_ep_format_rma_res_lightweight(rxm_ep, flags, comp_flags, +- msg, &tx_entry); +- if (OFI_UNLIKELY(ret)) +- return -FI_EAGAIN; ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ rma_buf = rxm_rma_buf_alloc(rxm_ep); ++ if (OFI_UNLIKELY(!rma_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from RMA buffer pool\n"); ++ ret = -FI_ENOMEM; ++ goto unlock; ++ } + +- msg_rma.context = tx_entry; ++ rma_buf->app_context = msg->context; ++ rma_buf->flags = flags; + +- ret = rxm_ep_rma_reg_iov(rxm_ep, msg->msg_iov, msg_rma.desc, mr_desc, +- msg->iov_count, comp_flags & (FI_WRITE | FI_READ), +- tx_entry); ++ ret = rxm_ep_rma_reg_iov(rxm_ep, msg_rma.msg_iov, msg_rma.desc, mr_desc, ++ msg_rma.iov_count, comp_flags & (FI_WRITE | FI_READ), ++ rma_buf); + if (OFI_UNLIKELY(ret)) +- goto err; ++ goto release; ++ + msg_rma.desc = mr_desc; ++ msg_rma.context = rma_buf; + + ret = rma_msg(rxm_conn->msg_ep, &msg_rma, flags); + if (OFI_LIKELY(!ret)) +- return ret; ++ goto unlock; + + if ((rxm_ep->msg_mr_local) && (!rxm_ep->rxm_mr_local)) +- rxm_ep_msg_mr_closev(tx_entry->mr, tx_entry->count); +-err: +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); ++ rxm_ep_msg_mr_closev(rma_buf->mr.mr, rma_buf->mr.count); ++release: ++ rxm_rma_buf_release(rxm_ep, rma_buf); ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); + return ret; + } + +-static ssize_t rxm_ep_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) ++static inline ssize_t ++rxm_ep_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, uint64_t flags) + { + struct rxm_ep *rxm_ep = + container_of(ep_fid, struct rxm_ep, util_ep.ep_fid.fid); +@@ -429,88 +175,145 @@ static ssize_t rxm_ep_read(struct fid_ep *ep_fid, void *buf, size_t len, + return rxm_ep_readmsg(ep_fid, &msg, rxm_ep_tx_flags(rxm_ep)); + } + +-static ssize_t +-rxm_ep_rma_inject(struct rxm_ep *rxm_ep, const struct fi_msg_rma *msg, uint64_t flags) ++static inline void ++rxm_ep_format_rma_msg(struct rxm_rma_buf *rma_buf, const struct fi_msg_rma *orig_msg, ++ struct iovec *rxm_iov, struct fi_msg_rma *rxm_msg) ++{ ++ rxm_msg->context = rma_buf; ++ rxm_msg->addr = orig_msg->addr; ++ rxm_msg->data = orig_msg->data; ++ ++ ofi_copy_from_iov(rma_buf->pkt.data, rma_buf->pkt.hdr.size, ++ orig_msg->msg_iov, orig_msg->iov_count, 0); ++ rxm_iov->iov_base = &rma_buf->pkt.data; ++ rxm_iov->iov_len = rma_buf->pkt.hdr.size; ++ rxm_msg->msg_iov = rxm_iov; ++ rxm_msg->desc = &rma_buf->hdr.desc; ++ rxm_msg->iov_count = 1; ++ ++ rxm_msg->rma_iov = orig_msg->rma_iov; ++ rxm_msg->rma_iov_count = orig_msg->rma_iov_count; ++} ++ ++static inline ssize_t ++rxm_ep_rma_emulate_inject_msg(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, size_t total_size, ++ const struct fi_msg_rma *msg, uint64_t flags) + { +- struct rxm_tx_entry *tx_entry; + struct rxm_rma_buf *rma_buf; +- struct util_cmap_handle *handle; +- struct rxm_conn *rxm_conn; +- size_t total_size = ofi_total_iov_len(msg->msg_iov, msg->iov_count); + ssize_t ret; ++ struct iovec rxm_msg_iov = { 0 }; ++ struct fi_msg_rma rxm_rma_msg = { 0 }; + + assert(msg->rma_iov_count <= rxm_ep->rxm_info->tx_attr->rma_iov_limit); + +- fastlock_acquire(&rxm_ep->util_ep.cmap->lock); +- handle = ofi_cmap_acquire_handle(rxm_ep->util_ep.cmap, msg->addr); +- if (OFI_UNLIKELY(!handle)) { +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return -FI_EAGAIN; +- } else if (OFI_UNLIKELY(handle->state != CMAP_CONNECTED)) { +- ret = ofi_cmap_handle_connect(rxm_ep->util_ep.cmap, +- msg->addr, handle); +- if (OFI_UNLIKELY(ret != -FI_EAGAIN)) +- goto cmap_err; +- rxm_conn = container_of(handle, struct rxm_conn, handle); +- ret = rxm_ep_postpone_rma(rxm_ep, rxm_conn, total_size, +- flags, FI_WRITE, msg); +-cmap_err: +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- return ret; ++ ofi_ep_lock_acquire(&rxm_ep->util_ep); ++ rma_buf = rxm_rma_buf_alloc(rxm_ep); ++ if (OFI_UNLIKELY(!rma_buf)) { ++ FI_WARN(&rxm_prov, FI_LOG_EP_DATA, ++ "Ran out of buffers from RMA buffer pool\n"); ++ ret = -FI_ENOMEM; ++ goto unlock; + } +- fastlock_release(&rxm_ep->util_ep.cmap->lock); +- rxm_conn = container_of(handle, struct rxm_conn, handle); + +- if (OFI_UNLIKELY(total_size > rxm_ep->rxm_info->tx_attr->inject_size)) +- return -FI_EMSGSIZE; ++ rma_buf->pkt.hdr.size = total_size; ++ rma_buf->app_context = msg->context; ++ rma_buf->flags = flags; ++ rxm_ep_format_rma_msg(rma_buf, msg, &rxm_msg_iov, &rxm_rma_msg); ++ ++ flags = (flags & ~FI_INJECT) | FI_COMPLETION; ++ ++ ret = fi_writemsg(rxm_conn->msg_ep, &rxm_rma_msg, flags); ++ if (OFI_UNLIKELY(ret)) { ++ if (ret == -FI_EAGAIN) ++ rxm_ep_do_progress(&rxm_ep->util_ep); ++ rxm_rma_buf_release(rxm_ep, rma_buf); ++ } ++unlock: ++ ofi_ep_lock_release(&rxm_ep->util_ep); ++ return ret; ++} ++ ++static inline ssize_t ++rxm_ep_rma_emulate_inject(struct rxm_ep *rxm_ep, struct rxm_conn *rxm_conn, ++ const void *buf, size_t len, uint64_t data, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ uint64_t flags) ++{ ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .len = len, ++ .key = key, ++ }; ++ struct iovec iov = { ++ .iov_base = (void*)buf, ++ .iov_len = len, ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &iov, ++ .desc = NULL, ++ .iov_count = 1, ++ .addr = dest_addr, ++ .rma_iov = &rma_iov, ++ .rma_iov_count = 1, ++ .context = NULL, ++ .data = data, ++ }; ++ ++ return rxm_ep_rma_emulate_inject_msg(rxm_ep, rxm_conn, len, &msg, flags); ++} ++ ++static inline ssize_t ++rxm_ep_rma_inject_common(struct rxm_ep *rxm_ep, const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ struct rxm_conn *rxm_conn; ++ size_t total_size = ofi_total_iov_len(msg->msg_iov, msg->iov_count); ++ ssize_t ret; ++ ++ assert(total_size <= rxm_ep->rxm_info->tx_attr->inject_size); ++ ++ ret = rxm_ep_prepare_tx(rxm_ep, msg->addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; + +- /* Use fi_inject_write instead of fi_writemsg since the latter generates +- * completion by default */ + if ((total_size <= rxm_ep->msg_info->tx_attr->inject_size) && +- !(flags & FI_COMPLETION)) { +- if (flags & FI_REMOTE_CQ_DATA) ++ !(flags & FI_COMPLETION) && ++ (msg->iov_count == 1) && (msg->rma_iov_count == 1)) { ++ if (flags & FI_REMOTE_CQ_DATA) { + ret = fi_inject_writedata(rxm_conn->msg_ep, + msg->msg_iov->iov_base, + msg->msg_iov->iov_len, msg->data, + msg->addr, msg->rma_iov->addr, + msg->rma_iov->key); +- else ++ } else { + ret = fi_inject_write(rxm_conn->msg_ep, + msg->msg_iov->iov_base, + msg->msg_iov->iov_len, msg->addr, + msg->rma_iov->addr, + msg->rma_iov->key); +- if (OFI_LIKELY(!ret)) +- rxm_cntr_inc(rxm_ep->util_ep.wr_cntr); +- return ret; +- } +- +- ret = rxm_ep_format_rma_inject_res(rxm_ep, total_size, flags, FI_WRITE, +- msg, &rma_buf, &tx_entry); +- if (OFI_UNLIKELY(ret)) ++ } ++ if (OFI_LIKELY(!ret)) { ++ ofi_ep_wr_cntr_inc(&rxm_ep->util_ep); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "fi_inject_write* for MSG provider failed with ret - %" ++ PRId64"\n", ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_progress(&rxm_ep->util_ep); ++ } + return ret; +- flags = (flags & ~FI_INJECT) | FI_COMPLETION; +- ret = fi_writemsg(rxm_conn->msg_ep, &rma_buf->msg, flags); +- if (OFI_UNLIKELY(ret)) { +- if (ret == -FI_EAGAIN) +- rxm_ep_progress_multi(&rxm_ep->util_ep); +- goto err; ++ } else { ++ return rxm_ep_rma_emulate_inject_msg(rxm_ep, rxm_conn, total_size, msg, flags); + } +- return 0; +-err: +- rxm_rma_buf_release(rxm_ep, tx_entry->rma_buf); +- rxm_tx_entry_release(&rxm_ep->send_queue, tx_entry); +- return ret; + } + +-static ssize_t rxm_ep_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) ++static inline ssize_t ++rxm_ep_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, uint64_t flags) + { + struct rxm_ep *rxm_ep = + container_of(ep_fid, struct rxm_ep, util_ep.ep_fid.fid); + + if (flags & FI_INJECT) +- return rxm_ep_rma_inject(rxm_ep, msg, flags); ++ return rxm_ep_rma_inject_common(rxm_ep, msg, flags); + else + return rxm_ep_rma_common(rxm_ep, msg, flags, + fi_writemsg, FI_WRITE); +@@ -602,34 +405,35 @@ static ssize_t rxm_ep_write(struct fid_ep *ep_fid, const void *buf, + } + + static ssize_t rxm_ep_inject_write(struct fid_ep *ep_fid, const void *buf, +- size_t len, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) ++ size_t len, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key) + { +- struct fi_rma_iov rma_iov = { +- .addr = addr, +- .len = len, +- .key = key, +- }; +- struct iovec iov = { +- .iov_base = (void*)buf, +- .iov_len = len, +- }; +- struct fi_msg_rma msg = { +- .msg_iov = &iov, +- .desc = NULL, +- .iov_count = 1, +- .addr = dest_addr, +- .rma_iov = &rma_iov, +- .rma_iov_count = 1, +- .context = NULL, +- .data = 0, +- }; ++ ssize_t ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); + +- return rxm_ep_writemsg(ep_fid, &msg, +- (rxm_ep_tx_flags(rxm_ep) & ~FI_COMPLETION) | +- FI_INJECT); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; ++ ++ if (len <= rxm_ep->msg_info->tx_attr->inject_size) { ++ ret = fi_inject_write(rxm_conn->msg_ep, buf, len, ++ dest_addr, addr, key); ++ if (OFI_LIKELY(!ret)) { ++ ofi_ep_wr_cntr_inc(&rxm_ep->util_ep); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "fi_inject_write for MSG provider failed with ret - %" ++ PRId64"\n", ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_progress(&rxm_ep->util_ep); ++ } ++ return ret; ++ } else { ++ return rxm_ep_rma_emulate_inject(rxm_ep, rxm_conn, buf, len, ++ 0, dest_addr, addr, key, FI_INJECT); ++ } + } + + static ssize_t rxm_ep_inject_writedata(struct fid_ep *ep_fid, const void *buf, +@@ -637,31 +441,32 @@ static ssize_t rxm_ep_inject_writedata(struct fid_ep *ep_fid, const void *buf, + fi_addr_t dest_addr, uint64_t addr, + uint64_t key) + { +- struct fi_rma_iov rma_iov = { +- .addr = addr, +- .len = len, +- .key = key, +- }; +- struct iovec iov = { +- .iov_base = (void*)buf, +- .iov_len = len, +- }; +- struct fi_msg_rma msg = { +- .msg_iov = &iov, +- .desc = NULL, +- .iov_count = 1, +- .addr = dest_addr, +- .rma_iov = &rma_iov, +- .rma_iov_count = 1, +- .context = NULL, +- .data = data, +- }; ++ ssize_t ret; ++ struct rxm_conn *rxm_conn; + struct rxm_ep *rxm_ep = container_of(ep_fid, struct rxm_ep, + util_ep.ep_fid.fid); ++ ret = rxm_ep_prepare_tx(rxm_ep, dest_addr, &rxm_conn); ++ if (OFI_UNLIKELY(ret)) ++ return ret; + +- return rxm_ep_writemsg(ep_fid, &msg, +- (rxm_ep_tx_flags(rxm_ep) & ~FI_COMPLETION) | +- FI_INJECT | FI_REMOTE_CQ_DATA); ++ if (len <= rxm_ep->msg_info->tx_attr->inject_size) { ++ ret = fi_inject_writedata(rxm_conn->msg_ep, buf, len, ++ data, dest_addr, addr, key); ++ if (OFI_LIKELY(!ret)) { ++ ofi_ep_wr_cntr_inc(&rxm_ep->util_ep); ++ } else { ++ FI_DBG(&rxm_prov, FI_LOG_EP_DATA, ++ "fi_inject_writedata for MSG provider failed with ret - %" ++ PRId64"\n", ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) ++ rxm_ep_progress(&rxm_ep->util_ep); ++ } ++ return ret; ++ } else { ++ return rxm_ep_rma_emulate_inject(rxm_ep, rxm_conn, buf, len, ++ data, dest_addr, addr, key, ++ FI_REMOTE_CQ_DATA | FI_INJECT); ++ } + } + + struct fi_ops_rma rxm_ops_rma = { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr.h +index 6e19f5602..06a4f227b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr.h +@@ -233,10 +233,7 @@ int smr_rx_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, + int smr_rx_src_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, + size_t len, void *buf, void *addr, uint64_t tag, + uint64_t data, uint64_t err); +- +-uint64_t smr_tx_comp_flags(uint32_t op); +-uint64_t smr_rx_comp_flags(uint32_t op, uint16_t op_flags); +-uint64_t smr_mr_reg_flags(uint32_t op, uint16_t atomic_op); ++uint64_t smr_rx_cq_flags(uint32_t op, uint16_t op_flags); + + void smr_ep_progress(struct util_ep *util_ep); + int smr_progress_unexp(struct smr_ep *ep, struct smr_ep_entry *entry); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_atomic.c +index f536e936b..519361b25 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_atomic.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_atomic.c +@@ -119,16 +119,6 @@ static void smr_format_inject_atomic(struct smr_cmd *cmd, fi_addr_t peer_id, + } + } + +-static void smr_ioc_to_iov(const struct fi_ioc *ioc, struct iovec *iov, +- size_t count, size_t size) +-{ +- int i; +- for (i = 0; i < count; i++) { +- iov[i].iov_base = ioc[i].addr; +- iov[i].iov_len = ioc[i].count * size; +- } +-} +- + static int smr_fetch_result(struct smr_ep *ep, struct smr_region *peer_smr, + struct iovec *iov, size_t iov_count, + const struct fi_rma_ioc *rma_ioc, size_t rma_count, +@@ -235,13 +225,13 @@ static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, + switch (op) { + case ofi_op_atomic_compare: + assert(compare_ioc); +- smr_ioc_to_iov(compare_ioc, compare_iov, compare_count, ++ ofi_ioc_to_iov(compare_ioc, compare_iov, compare_count, + ofi_datatype_size(datatype)); + total_len *= 2; + /* fall through */ + case ofi_op_atomic_fetch: + assert(result_ioc); +- smr_ioc_to_iov(result_ioc, result_iov, result_count, ++ ofi_ioc_to_iov(result_ioc, result_iov, result_count, + ofi_datatype_size(datatype)); + if (!domain->fast_rma) + flags |= SMR_RMA_REQ; +@@ -249,7 +239,7 @@ static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, + case ofi_op_atomic: + if (atomic_op != FI_ATOMIC_READ) { + assert(ioc); +- smr_ioc_to_iov(ioc, iov, count, ofi_datatype_size(datatype)); ++ ofi_ioc_to_iov(ioc, iov, count, ofi_datatype_size(datatype)); + } else { + count = 0; + } +@@ -293,7 +283,7 @@ static ssize_t smr_generic_atomic(struct fid_ep *ep_fid, + "unable to fetch results"); + } + +- ret = ep->tx_comp(ep, context, smr_tx_comp_flags(op), err); ++ ret = ep->tx_comp(ep, context, ofi_tx_cq_flags(op), err); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, + "unable to process tx completion\n"); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_av.c +index 505e0ebed..18c819834 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_av.c +@@ -72,7 +72,7 @@ static int smr_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + + for (i = 0; i < count; i++) { + ep_name = smr_no_prefix((const char *) smr_names[i].name); +- ret = ofi_av_insert_addr(util_av, ep_name, 0, &index); ++ ret = ofi_av_insert_addr(util_av, ep_name, (fi_addr_t *)&index); + if (ret) { + if (util_av->eq) + ofi_av_write_event(util_av, i, -ret, context); +@@ -119,7 +119,7 @@ static int smr_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count + + fastlock_acquire(&util_av->lock); + for (i = 0; i < count; i++) { +- ret = ofi_av_remove_addr(util_av, 0, fi_addr[i]); ++ ret = ofi_av_remove_addr(util_av, fi_addr[i]); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_AV, + "Unable to remove address from AV\n"); +@@ -212,7 +212,6 @@ int smr_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + return -FI_ENOMEM; + + util_attr.addrlen = sizeof(int); +- util_attr.overhead = 0; + util_attr.flags = 0; + if (attr->count > SMR_MAX_PEERS) { + ret = -FI_ENOSYS; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_comp.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_comp.c +index 58e44c3d8..5fc57497d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_comp.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_comp.c +@@ -41,18 +41,18 @@ + int smr_tx_comp(struct smr_ep *ep, void *context, uint64_t flags, uint64_t err) + { + struct fi_cq_tagged_entry *comp; +- struct util_cq_err_entry *entry; ++ struct util_cq_oflow_err_entry *entry; + + comp = ofi_cirque_tail(ep->util_ep.tx_cq->cirq); + if (err) { + if (!(entry = calloc(1, sizeof(*entry)))) + return -FI_ENOMEM; +- entry->err_entry.op_context = context; +- entry->err_entry.flags = flags; +- entry->err_entry.err = err; +- entry->err_entry.prov_errno = -err; ++ entry->comp.op_context = context; ++ entry->comp.flags = flags; ++ entry->comp.err = err; ++ entry->comp.prov_errno = -err; + slist_insert_tail(&entry->list_entry, +- &ep->util_ep.tx_cq->err_list); ++ &ep->util_ep.tx_cq->oflow_err_list); + comp->flags = UTIL_FLAG_ERROR; + } else { + comp->op_context = context; +@@ -82,19 +82,19 @@ int smr_rx_comp(struct smr_ep *ep, void *context, uint64_t flags, size_t len, + uint64_t err) + { + struct fi_cq_tagged_entry *comp; +- struct util_cq_err_entry *entry; ++ struct util_cq_oflow_err_entry *entry; + + comp = ofi_cirque_tail(ep->util_ep.rx_cq->cirq); + if (err) { + if (!(entry = calloc(1, sizeof(*entry)))) + return -FI_ENOMEM; +- entry->err_entry.op_context = context; +- entry->err_entry.flags = flags; +- entry->err_entry.tag = tag; +- entry->err_entry.err = err; +- entry->err_entry.prov_errno = -err; ++ entry->comp.op_context = context; ++ entry->comp.flags = flags; ++ entry->comp.tag = tag; ++ entry->comp.err = err; ++ entry->comp.prov_errno = -err; + slist_insert_tail(&entry->list_entry, +- &ep->util_ep.rx_cq->err_list); ++ &ep->util_ep.rx_cq->oflow_err_list); + comp->flags = UTIL_FLAG_ERROR; + } else { + comp->op_context = context; +@@ -144,57 +144,14 @@ int smr_rx_src_comp_signal(struct smr_ep *ep, void *context, uint64_t flags, + + } + +-static const uint64_t smr_tx_flags[] = { +- [ofi_op_msg] = FI_SEND, +- [ofi_op_tagged] = FI_SEND | FI_TAGGED, +- [ofi_op_read_req] = FI_RMA | FI_READ, +- [ofi_op_write] = FI_RMA | FI_WRITE, +- [ofi_op_atomic] = FI_ATOMIC | FI_WRITE, +- [ofi_op_atomic_fetch] = FI_ATOMIC | FI_WRITE | FI_READ, +- [ofi_op_atomic_compare] = FI_ATOMIC | FI_WRITE | FI_READ, +-}; +- +-uint64_t smr_tx_comp_flags(uint32_t op) +-{ +- return smr_tx_flags[op]; +-} +- +-static const uint64_t smr_rx_flags[] = { +- [ofi_op_msg] = FI_RECV, +- [ofi_op_tagged] = FI_RECV | FI_TAGGED, +- [ofi_op_read_req] = FI_RMA | FI_REMOTE_READ, +- [ofi_op_write] = FI_RMA | FI_REMOTE_WRITE, +- [ofi_op_atomic] = FI_ATOMIC | FI_REMOTE_WRITE, +- [ofi_op_atomic_fetch] = FI_ATOMIC | FI_REMOTE_WRITE | FI_REMOTE_READ, +- [ofi_op_atomic_compare] = FI_ATOMIC | FI_REMOTE_WRITE | FI_REMOTE_READ, +-}; +- +-uint64_t smr_rx_comp_flags(uint32_t op, uint16_t op_flags) ++uint64_t smr_rx_cq_flags(uint32_t op, uint16_t op_flags) + { + uint64_t flags; + +- flags = smr_rx_flags[op]; ++ flags = ofi_rx_cq_flags(op); + + if (op_flags & SMR_REMOTE_CQ_DATA) + flags |= FI_REMOTE_CQ_DATA; + + return flags; + } +- +-static const uint64_t smr_mr_flags[] = { +- [ofi_op_msg] = FI_RECV, +- [ofi_op_tagged] = FI_RECV, +- [ofi_op_read_req] = FI_REMOTE_READ, +- [ofi_op_write] = FI_REMOTE_WRITE, +- [ofi_op_atomic] = FI_REMOTE_WRITE, +- [ofi_op_atomic_fetch] = FI_REMOTE_WRITE | FI_REMOTE_READ, +- [ofi_op_atomic_compare] = FI_REMOTE_WRITE | FI_REMOTE_READ, +-}; +- +-uint64_t smr_mr_reg_flags(uint32_t op, uint16_t atomic_op) +-{ +- if (atomic_op == FI_ATOMIC_READ) +- return FI_REMOTE_READ; +- +- return smr_mr_flags[op]; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_ep.c +index 4fae47ea8..f4815f37d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_ep.c +@@ -476,9 +476,9 @@ int smr_endpoint(struct fid_domain *domain, struct fi_info *info, + if (ret) + goto err1; + +- ep->recv_fs = smr_recv_fs_create(info->rx_attr->size); +- ep->unexp_fs = smr_unexp_fs_create(info->rx_attr->size); +- ep->pend_fs = smr_pend_fs_create(info->tx_attr->size); ++ ep->recv_fs = smr_recv_fs_create(info->rx_attr->size, NULL, NULL); ++ ep->unexp_fs = smr_unexp_fs_create(info->rx_attr->size, NULL, NULL); ++ ep->pend_fs = smr_pend_fs_create(info->tx_attr->size, NULL, NULL); + smr_init_queue(&ep->recv_queue, smr_match_msg); + smr_init_queue(&ep->trecv_queue, smr_match_tagged); + smr_init_queue(&ep->unexp_queue, smr_match_unexp); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_init.c +index fc29c4b89..c49a97a53 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_init.c +@@ -112,7 +112,7 @@ static void smr_fini(void) + struct fi_provider smr_prov = { + .name = "shm", + .version = FI_VERSION(SMR_MAJOR_VERSION, SMR_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = smr_getinfo, + .fabric = smr_fabric, + .cleanup = smr_fini +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_msg.c +index 0738ef658..82bcd7599 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_msg.c +@@ -38,88 +38,110 @@ + #include "smr.h" + + +-static ssize_t smr_generic_recvmsg(struct smr_ep *ep, const struct iovec *iov, +- size_t iov_count, fi_addr_t addr, uint64_t tag, +- uint64_t ignore, void *context, uint64_t flags) ++static inline struct smr_ep_entry *smr_get_recv_entry(struct smr_ep *ep) + { +- struct smr_queue *recv_queue; + struct smr_ep_entry *entry; +- ssize_t ret; + +- assert(iov_count <= SMR_IOV_LIMIT); +- assert(!(flags & FI_MULTI_RECV) || iov_count == 1); ++ if (freestack_isempty(ep->recv_fs)) ++ return NULL; ++ ++ entry = freestack_pop(ep->recv_fs); ++ ++ entry->tag = 0; /* does this need to be set? */ ++ entry->ignore = 0; /* does this need to be set? */ ++ entry->err = 0; ++ return entry; ++} ++ ++ssize_t smr_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct smr_ep_entry *entry; ++ struct smr_ep *ep; ++ ssize_t ret = 0; ++ ++ assert(msg->iov_count <= SMR_IOV_LIMIT); ++ assert(!(flags & FI_MULTI_RECV) || msg->iov_count == 1); + ++ ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); + fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); +- if (freestack_isempty(ep->recv_fs)) { ++ entry = smr_get_recv_entry(ep); ++ if (!entry) { + ret = -FI_EAGAIN; + goto out; + } +- entry = freestack_pop(ep->recv_fs); +- memset(entry, 0, sizeof(*entry)); + +- for (entry->iov_count = 0; entry->iov_count < iov_count; +- entry->iov_count++) { +- entry->iov[entry->iov_count] = iov[entry->iov_count]; +- } ++ entry->iov_count = msg->iov_count; ++ memcpy(&entry->iov, msg->msg_iov, sizeof(*msg->msg_iov) * msg->iov_count); + +- entry->context = context; ++ entry->context = msg->context; + entry->flags = flags; +- entry->addr = addr; +- entry->tag = tag; +- entry->ignore = ignore; ++ entry->addr = msg->addr; + +- if (flags & FI_TAGGED) { +- ret = smr_progress_unexp(ep, entry); +- if (!ret || ret == -FI_EAGAIN) +- goto out; +- recv_queue = &ep->trecv_queue; +- } else { +- recv_queue = &ep->recv_queue; +- } +- +- dlist_insert_tail(&entry->entry, &recv_queue->list); +- +- ret = 0; ++ dlist_insert_tail(&entry->entry, &ep->recv_queue.list); + out: + fastlock_release(&ep->util_ep.rx_cq->cq_lock); + return ret; + } + +-ssize_t smr_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, +- uint64_t flags) ++ssize_t smr_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; ++ ssize_t ret = 0; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ assert(count <= SMR_IOV_LIMIT); ++ assert(!(smr_ep_rx_flags(ep) & FI_MULTI_RECV) || count == 1); + +- return smr_generic_recvmsg(ep, msg->msg_iov, msg->iov_count, +- msg->addr, 0, 0, msg->context, flags); +-} ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_recv_entry(ep); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } + +-ssize_t smr_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) +-{ +- struct smr_ep *ep; ++ entry->iov_count = count; ++ memcpy(&entry->iov, iov, sizeof(*iov) * count); + +- ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ entry->context = context; ++ entry->flags = smr_ep_rx_flags(ep); ++ entry->addr = src_addr; + +- return smr_generic_recvmsg(ep, iov, count, src_addr, +- 0, 0, context, smr_ep_rx_flags(ep)); ++ dlist_insert_tail(&entry->entry, &ep->recv_queue.list); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_recv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, + fi_addr_t src_addr, void *context) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; +- struct iovec msg_iov; ++ ssize_t ret = 0; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_recv_entry(ep); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ entry->iov_count = 1; ++ entry->iov[0].iov_base = buf; ++ entry->iov[0].iov_len = len; ++ ++ entry->context = context; ++ entry->flags = smr_ep_rx_flags(ep); ++ entry->addr = src_addr; + +- return smr_generic_recvmsg(ep, &msg_iov, 1, src_addr, 0, 0, context, +- smr_ep_rx_flags(ep)); ++ dlist_insert_tail(&entry->entry, &ep->recv_queue.list); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + static ssize_t smr_generic_sendmsg(struct smr_ep *ep, const struct iovec *iov, +@@ -178,7 +200,7 @@ static ssize_t smr_generic_sendmsg(struct smr_ep *ep, const struct iovec *iov, + ofi_cirque_commit(smr_resp_queue(ep->region)); + goto commit; + } +- ret = ep->tx_comp(ep, context, smr_tx_comp_flags(op), 0); ++ ret = ep->tx_comp(ep, context, ofi_tx_cq_flags(op), 0); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, + "unable to process tx completion\n"); +@@ -328,43 +350,127 @@ struct fi_ops_msg smr_msg_ops = { + .injectdata = smr_injectdata, + }; + ++static inline struct smr_ep_entry *smr_get_trecv_entry(struct smr_ep *ep) ++{ ++ struct smr_ep_entry *entry; ++ ++ if (freestack_isempty(ep->recv_fs)) ++ return NULL; ++ ++ entry = freestack_pop(ep->recv_fs); ++ entry->err = 0; ++ return entry; ++} ++ ++static inline ssize_t ++smr_proccess_trecv_post(struct smr_ep *ep, struct smr_ep_entry *entry) ++{ ++ ssize_t ret; ++ ++ ret = smr_progress_unexp(ep, entry); ++ if (!ret || ret == -FI_EAGAIN) ++ return ret; ++ ++ dlist_insert_tail(&entry->entry, &ep->trecv_queue.list); ++ return 0; ++} ++ + ssize_t smr_trecv(struct fid_ep *ep_fid, void *buf, size_t len, void *desc, + fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; +- struct iovec msg_iov; ++ ssize_t ret; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_trecv_entry(ep); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ entry->iov_count = 1; ++ entry->iov[0].iov_base = buf; ++ entry->iov[0].iov_len = len; + +- return smr_generic_recvmsg(ep, &msg_iov, 1, src_addr, tag, ignore, +- context, FI_TAGGED | smr_ep_tx_flags(ep)); ++ entry->context = context; ++ entry->flags = smr_ep_rx_flags(ep); ++ entry->addr = src_addr; ++ entry->tag = tag; ++ entry->ignore = ignore; ++ ++ ret = smr_proccess_trecv_post(ep, entry); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_trecvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, + size_t count, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, + void *context) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; ++ ssize_t ret; + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ assert(count <= SMR_IOV_LIMIT); ++ assert(!(smr_ep_rx_flags(ep) & FI_MULTI_RECV) || count == 1); ++ ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_trecv_entry(ep); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } + +- return smr_generic_recvmsg(ep, iov, count, src_addr, tag, ignore, +- context, FI_TAGGED | smr_ep_tx_flags(ep)); ++ entry->iov_count = count; ++ memcpy(&entry->iov, iov, sizeof(*iov) * count); ++ ++ entry->context = context; ++ entry->flags = smr_ep_rx_flags(ep); ++ entry->addr = src_addr; ++ entry->tag = tag; ++ entry->ignore = ignore; ++ ++ ret = smr_proccess_trecv_post(ep, entry); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_trecvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, + uint64_t flags) + { ++ struct smr_ep_entry *entry; + struct smr_ep *ep; ++ ssize_t ret; ++ ++ assert(msg->iov_count <= SMR_IOV_LIMIT); ++ assert(!(flags & FI_MULTI_RECV) || msg->iov_count == 1); + + ep = container_of(ep_fid, struct smr_ep, util_ep.ep_fid.fid); ++ fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); ++ entry = smr_get_trecv_entry(ep); ++ if (!entry) { ++ ret = -FI_EAGAIN; ++ goto out; ++ } ++ ++ entry->iov_count = msg->iov_count; ++ memcpy(&entry->iov, msg->msg_iov, sizeof(*msg->msg_iov) * msg->iov_count); ++ ++ entry->context = msg->context; ++ entry->flags = flags; ++ entry->addr = msg->addr; ++ entry->tag = msg->tag; ++ entry->ignore = msg->ignore; + +- return smr_generic_recvmsg(ep, msg->msg_iov, msg->iov_count, msg->addr, +- msg->tag, msg->ignore, msg->context, +- flags | FI_TAGGED); ++ ret = smr_proccess_trecv_post(ep, entry); ++out: ++ fastlock_release(&ep->util_ep.rx_cq->cq_lock); ++ return ret; + } + + ssize_t smr_tsend(struct fid_ep *ep_fid, const void *buf, size_t len, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_progress.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_progress.c +index c2a49e84b..eecbb7680 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_progress.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_progress.c +@@ -95,7 +95,7 @@ static void smr_progress_resp(struct smr_ep *ep) + break; + + ret = ep->tx_comp(ep, (void *) (uintptr_t) pending->msg.hdr.msg_id, +- smr_tx_comp_flags(pending->msg.hdr.op), ++ ofi_tx_cq_flags(pending->msg.hdr.op), + -(resp->status)); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, +@@ -381,7 +381,7 @@ static int smr_progress_cmd_msg(struct smr_ep *ep, struct smr_cmd *cmd) + "unidentified operation type\n"); + err = -FI_EINVAL; + } +- ret = ep->rx_comp(ep, entry->context, smr_rx_comp_flags(cmd->msg.hdr.op, ++ ret = ep->rx_comp(ep, entry->context, smr_rx_cq_flags(cmd->msg.hdr.op, + cmd->msg.hdr.op_flags), total_len, + entry->iov[0].iov_base, &addr, cmd->msg.hdr.tag, + cmd->msg.hdr.data, err); +@@ -430,7 +430,7 @@ static int smr_progress_cmd_rma(struct smr_ep *ep, struct smr_cmd *cmd) + rma_cmd->rma.rma_iov[iov_count].len, + (uintptr_t *) &(rma_cmd->rma.rma_iov[iov_count].addr), + rma_cmd->rma.rma_iov[iov_count].key, +- smr_mr_reg_flags(cmd->msg.hdr.op, 0)); ++ ofi_rx_mr_reg_flags(cmd->msg.hdr.op, 0)); + if (ret) + break; + +@@ -459,7 +459,7 @@ static int smr_progress_cmd_rma(struct smr_ep *ep, struct smr_cmd *cmd) + } + if (cmd->msg.hdr.op_flags & SMR_REMOTE_CQ_DATA) { + ret = ep->rx_comp(ep, (void *) cmd->msg.hdr.msg_id, +- smr_rx_comp_flags(cmd->msg.hdr.op, ++ smr_rx_cq_flags(cmd->msg.hdr.op, + cmd->msg.hdr.op_flags), total_len, + NULL, &cmd->msg.hdr.addr, 0, + cmd->msg.hdr.data, err); +@@ -496,7 +496,7 @@ static int smr_progress_cmd_atomic(struct smr_ep *ep, struct smr_cmd *cmd) + ofi_datatype_size(cmd->msg.hdr.datatype), + (uintptr_t *) &(rma_cmd->rma.rma_ioc[ioc_count].addr), + rma_cmd->rma.rma_ioc[ioc_count].key, +- smr_mr_reg_flags(cmd->msg.hdr.op, ++ ofi_rx_mr_reg_flags(cmd->msg.hdr.op, + cmd->msg.hdr.atomic_op)); + if (ret) + break; +@@ -643,7 +643,7 @@ int smr_progress_unexp(struct smr_ep *ep, struct smr_ep_entry *entry) + entry->err = FI_EINVAL; + } + ret = ep->rx_comp(ep, entry->context, +- smr_rx_comp_flags(unexp_msg->cmd.msg.hdr.op, ++ smr_rx_cq_flags(unexp_msg->cmd.msg.hdr.op, + unexp_msg->cmd.msg.hdr.op_flags), total_len, + entry->iov[0].iov_base, &entry->addr, entry->tag, + unexp_msg->cmd.msg. hdr.data, entry->err); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_rma.c +index d5a86cc85..724779398 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_rma.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/shm/src/smr_rma.c +@@ -178,7 +178,7 @@ commit_comp: + if (!comp) + goto unlock_cq; + +- ret = ep->tx_comp(ep, context, smr_tx_comp_flags(op), err); ++ ret = ep->tx_comp(ep, context, ofi_tx_cq_flags(op), err); + if (ret) { + FI_WARN(&smr_prov, FI_LOG_EP_CTRL, + "unable to process tx completion\n"); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock.h +index fd4e21575..51ece303b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock.h +@@ -64,7 +64,8 @@ + #ifndef _SOCK_H_ + #define _SOCK_H_ + +-#define SOCK_EP_MAX_MSG_SZ (SIZE_MAX - 4096) /* 4k allocated for all sockets headers */ ++/* 4k allocated for all sockets headers */ ++#define SOCK_EP_MAX_MSG_SZ (OFI_MAX_SOCKET_BUF_SIZE - 4096) + #define SOCK_EP_MAX_INJECT_SZ ((1<<8) - 1) + #define SOCK_EP_MAX_BUFF_RECV (1<<26) + #define SOCK_EP_MAX_ORDER_RAW_SZ SOCK_EP_MAX_MSG_SZ +@@ -104,6 +105,7 @@ + #define SOCK_EP_MAX_RETRY (5) + #define SOCK_EP_MAX_CM_DATA_SZ (256) + #define SOCK_CM_DEF_BACKLOG (128) ++#define SOCK_CM_DEF_TIMEOUT (15000) + #define SOCK_CM_DEF_RETRY (5) + #define SOCK_CM_CONN_IN_PROGRESS ((struct sock_conn *)(0x1L)) + +@@ -178,7 +180,7 @@ enum { + #define SOCK_MAJOR_VERSION 2 + #define SOCK_MINOR_VERSION 0 + +-#define SOCK_WIRE_PROTO_VERSION (1) ++#define SOCK_WIRE_PROTO_VERSION (2) + + struct sock_service_entry { + int service; +@@ -200,7 +202,7 @@ struct sock_conn { + int sock_fd; + int connected; + int address_published; +- struct sockaddr_in addr; ++ union ofi_sock_ip addr; + struct sock_pe_entry *rx_pe_entry; + struct sock_pe_entry *tx_pe_entry; + struct sock_ep_attr *ep_attr; +@@ -226,6 +228,15 @@ struct sock_conn_listener { + int do_listen; + }; + ++struct sock_ep_cm_head { ++ fi_epoll_t emap; ++ struct fd_signal signal; ++ fastlock_t signal_lock; ++ pthread_t listener_thread; ++ struct dlist_entry msg_list; ++ int do_listen; ++}; ++ + struct sock_domain { + struct fi_info info; + struct fid_domain dom_fid; +@@ -242,6 +253,7 @@ struct sock_domain { + struct dlist_entry dom_list_entry; + struct fi_domain_attr attr; + struct sock_conn_listener conn_listener; ++ struct sock_ep_cm_head cm_head; + }; + + /* move to fi_trigger.h when removing experimental tag from work queues */ +@@ -339,7 +351,7 @@ struct sock_mr { + }; + + struct sock_av_addr { +- struct sockaddr_storage addr; ++ union ofi_sock_ip addr; + uint8_t valid; + uint8_t reserved[7]; + }; +@@ -511,21 +523,28 @@ struct sock_comp { + struct sock_eq *eq; + }; + +-struct sock_cm_entry { ++enum sock_cm_state { ++ SOCK_CM_STATE_DISCONNECTED = 0, ++ SOCK_CM_STATE_REQUESTED, ++ SOCK_CM_STATE_CONNECTED, ++}; ++ ++struct sock_pep_cm_entry { + int sock; + int do_listen; + int signal_fds[2]; +- uint64_t next_msg_id; +- fastlock_t lock; +- int is_connected; + pthread_t listener_thread; +- struct dlist_entry msg_list; ++}; ++ ++struct sock_ep_cm_entry { ++ int sock; ++ fastlock_t lock; ++ enum sock_cm_state state; + }; + + struct sock_conn_handle { + int sock; + int do_listen; +- char service[NI_MAXSERV]; + }; + + struct sock_ep_attr { +@@ -556,15 +575,15 @@ struct sock_ep_attr { + struct fi_ep_attr ep_attr; + + enum fi_ep_type ep_type; +- struct sockaddr_in *src_addr; +- struct sockaddr_in *dest_addr; ++ union ofi_sock_ip *src_addr; ++ union ofi_sock_ip *dest_addr; + uint16_t msg_src_port; + uint16_t msg_dest_port; + + uint64_t peer_fid; + uint16_t key; + int is_enabled; +- struct sock_cm_entry cm; ++ struct sock_ep_cm_entry cm; + struct sock_conn_handle conn_handle; + fastlock_t lock; + +@@ -584,8 +603,9 @@ struct sock_pep { + struct fid_pep pep; + struct sock_fabric *sock_fab; + +- struct sock_cm_entry cm; +- struct sockaddr_in src_addr; ++ struct sock_ep_cm_head cm_head; ++ struct sock_pep_cm_entry cm; ++ union ofi_sock_ip src_addr; + struct fi_info info; + struct sock_eq *eq; + int name_set; +@@ -905,7 +925,7 @@ struct sock_conn_hdr { + + struct sock_conn_req { + struct sock_conn_hdr hdr; +- struct sockaddr_in src_addr; ++ union ofi_sock_ip src_addr; + uint64_t caps; + char cm_data[0]; + }; +@@ -917,22 +937,34 @@ enum { + SOCK_CONN_SHUTDOWN, + }; + ++enum sock_conn_handle_state { ++ SOCK_CONN_HANDLE_ACTIVE, ++ SOCK_CONN_HANDLE_ACCEPTED, ++ SOCK_CONN_HANDLE_REJECTED, ++ SOCK_CONN_HANDLE_DELETED, ++ SOCK_CONN_HANDLE_FINALIZING, ++ SOCK_CONN_HANDLE_FINALIZED, ++}; ++ + struct sock_conn_req_handle { + struct fid handle; + struct sock_conn_req *req; + int sock_fd; +- int is_accepted; ++ uint8_t monitored; ++ enum sock_conn_handle_state state; ++ pthread_mutex_t finalized_mutex; ++ pthread_cond_t finalized_cond; + struct sock_pep *pep; + struct sock_ep *ep; + size_t paramlen; +- pthread_t req_handler; +- struct sockaddr_in dest_addr; ++ union ofi_sock_ip dest_addr; + struct dlist_entry entry; + char cm_data[SOCK_EP_MAX_CM_DATA_SZ]; + }; + + struct sock_host_list_entry { +- char hostname[HOST_NAME_MAX]; ++ char ipstr[INET6_ADDRSTRLEN]; ++ union ofi_sock_ip ipaddr; + struct slist_entry entry; + }; + +@@ -987,9 +1019,10 @@ int sock_dgram_verify_ep_attr(const struct fi_ep_attr *ep_attr, + int sock_msg_verify_ep_attr(const struct fi_ep_attr *ep_attr, + const struct fi_tx_attr *tx_attr, + const struct fi_rx_attr *rx_attr); +-int sock_get_src_addr(struct sockaddr_in *dest_addr, +- struct sockaddr_in *src_addr); +-int sock_get_src_addr_from_hostname(struct sockaddr_in *src_addr, const char *service); ++int sock_get_src_addr(union ofi_sock_ip *dest_addr, ++ union ofi_sock_ip *src_addr); ++int sock_get_src_addr_from_hostname(union ofi_sock_ip *src_addr, ++ const char *service, uint16_t sa_family); + + struct fi_info *sock_fi_info(uint32_t version, enum fi_ep_type ep_type, + const struct fi_info *hints, void *src_addr, +@@ -1122,10 +1155,10 @@ int sock_wait_close(fid_t fid); + int sock_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + struct fid_av **av, void *context); + int sock_av_compare_addr(struct sock_av *av, fi_addr_t addr1, fi_addr_t addr2); +-int sock_av_get_addr_index(struct sock_av *av, struct sockaddr_in *addr); ++int sock_av_get_addr_index(struct sock_av *av, union ofi_sock_ip *addr); + + struct sock_conn *sock_ep_lookup_conn(struct sock_ep_attr *attr, fi_addr_t index, +- struct sockaddr_in *addr); ++ union ofi_sock_ip *addr); + int sock_ep_get_conn(struct sock_ep_attr *ep_attr, struct sock_tx_ctx *tx_ctx, + fi_addr_t index, struct sock_conn **pconn); + void sock_ep_remove_conn(struct sock_ep_attr *ep_attr, struct sock_conn *conn); +@@ -1221,4 +1254,11 @@ static inline size_t sock_rx_avail_len(struct sock_rx_entry *rx_entry) + return rx_entry->total_len - rx_entry->used; + } + ++int sock_ep_cm_start_thread(struct sock_ep_cm_head *cm_head); ++void sock_ep_cm_signal(struct sock_ep_cm_head *cm_head); ++void sock_ep_cm_signal_locked(struct sock_ep_cm_head *cm_head); ++void sock_ep_cm_stop_thread(struct sock_ep_cm_head *cm_head); ++void sock_ep_cm_wait_handle_finalized(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock_util.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock_util.h +index a4e428474..fc5c58601 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock_util.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/include/sock_util.h +@@ -44,6 +44,7 @@ extern const char sock_dom_name[]; + extern const char sock_prov_name[]; + extern struct fi_provider sock_prov; + extern int sock_pe_waittime; ++extern int sock_conn_timeout; + extern int sock_conn_retry; + extern int sock_cm_def_map_sz; + extern int sock_av_def_sz; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_av.c +index 2fc025fe5..e2760e2e2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_av.c +@@ -63,7 +63,7 @@ + count * sizeof(struct sock_av_addr)) + #define SOCK_IS_SHARED_AV(av_name) ((av_name) ? 1 : 0) + +-int sock_av_get_addr_index(struct sock_av *av, struct sockaddr_in *addr) ++int sock_av_get_addr_index(struct sock_av *av, union ofi_sock_ip *addr) + { + int i; + struct sock_av_addr *av_addr; +@@ -73,7 +73,8 @@ int sock_av_get_addr_index(struct sock_av *av, struct sockaddr_in *addr) + if (!av_addr->valid) + continue; + +- if (ofi_equals_sockaddr(addr, (struct sockaddr_in *)&av_addr->addr)) ++ if (ofi_equals_sockaddr((const struct sockaddr *) addr, ++ (const struct sockaddr *) &av_addr->addr)) + return i; + } + SOCK_LOG_DBG("failed to get index in AV\n"); +@@ -98,8 +99,8 @@ int sock_av_compare_addr(struct sock_av *av, + av_addr1 = &av->table[index1]; + av_addr2 = &av->table[index2]; + +- return memcmp(&av_addr1->addr, &av_addr2->addr, +- sizeof(struct sockaddr_in)); ++ /* Return 0 if the addresses match */ ++ return !ofi_equals_sockaddr(&av_addr1->addr.sa, &av_addr2->addr.sa); + } + + static inline void sock_av_report_success(struct sock_av *av, void *context, +@@ -127,9 +128,9 @@ static inline void sock_av_report_error(struct sock_av *av, + context, index, err, -err, NULL, 0); + } + +-static int sock_av_is_valid_address(struct sockaddr_in *addr) ++static int sock_av_is_valid_address(const struct sockaddr *addr) + { +- return addr->sin_family == AF_INET ? 1 : 0; ++ return ofi_sizeofaddr(addr); + } + + static void sock_update_av_table(struct sock_av *_av, size_t count) +@@ -180,13 +181,13 @@ static int sock_av_get_next_index(struct sock_av *av) + return -1; + } + +-static int sock_check_table_in(struct sock_av *_av, struct sockaddr_in *addr, ++static int sock_check_table_in(struct sock_av *_av, const struct sockaddr *addr, + fi_addr_t *fi_addr, int count, uint64_t flags, + void *context) + { + int i, ret = 0; + uint64_t j; +- char sa_ip[INET_ADDRSTRLEN]; ++ char sa_ip[INET6_ADDRSTRLEN]; + struct sock_av_addr *av_addr; + int index; + +@@ -207,7 +208,7 @@ static int sock_check_table_in(struct sock_av *_av, struct sockaddr_in *addr, + + av_addr = &_av->table[j]; + if (memcmp(&av_addr->addr, &addr[i], +- sizeof(struct sockaddr_in)) == 0) { ++ ofi_sizeofaddr(&addr[i])) == 0) { + SOCK_LOG_DBG("Found addr in shared av\n"); + if (fi_addr) + fi_addr[i] = (fi_addr_t)j; +@@ -242,12 +243,13 @@ static int sock_check_table_in(struct sock_av *_av, struct sockaddr_in *addr, + } + + av_addr = &_av->table[index]; +- inet_ntop(addr[i].sin_family, &addr[i].sin_addr, sa_ip, INET_ADDRSTRLEN); ++ inet_ntop(addr[i].sa_family, ofi_get_ipaddr(&addr[i]), ++ sa_ip, sizeof sa_ip); + SOCK_LOG_DBG("AV-INSERT: dst_addr family: %d, IP %s, port: %d\n", +- ((struct sockaddr_in *)&addr[i])->sin_family, +- sa_ip, ntohs(((struct sockaddr_in *)&addr[i])->sin_port)); ++ (&addr[i])->sa_family, sa_ip, ++ ofi_addr_get_port(&addr[i])); + +- memcpy(&av_addr->addr, &addr[i], sizeof(struct sockaddr_in)); ++ memcpy(&av_addr->addr, &addr[i], ofi_sizeofaddr(&addr[i])); + if (fi_addr) + fi_addr[i] = (fi_addr_t)index; + +@@ -263,7 +265,7 @@ static int sock_av_insert(struct fid_av *av, const void *addr, size_t count, + { + struct sock_av *_av; + _av = container_of(av, struct sock_av, av_fid); +- return sock_check_table_in(_av, (struct sockaddr_in *)addr, ++ return sock_check_table_in(_av, (const struct sockaddr *) addr, + fi_addr, count, flags, context); + } + +@@ -298,6 +300,7 @@ static int _sock_av_insertsvc(struct fid_av *av, const char *node, + + _av = container_of(av, struct sock_av, av_fid); + memset(&sock_hints, 0, sizeof(struct addrinfo)); ++ /* Map all services to IPv4 addresses -- for compatibility */ + sock_hints.ai_family = AF_INET; + sock_hints.ai_socktype = SOCK_STREAM; + +@@ -310,7 +313,7 @@ static int _sock_av_insertsvc(struct fid_av *av, const char *node, + return -ret; + } + +- ret = sock_check_table_in(_av, (struct sockaddr_in *)result->ai_addr, ++ ret = sock_check_table_in(_av, result->ai_addr, + fi_addr, 1, flags, context); + freeaddrinfo(result); + return ret; +@@ -426,15 +429,16 @@ static int sock_av_remove(struct fid_av *av, fi_addr_t *fi_addr, size_t count, + static const char *sock_av_straddr(struct fid_av *av, const void *addr, + char *buf, size_t *len) + { +- const struct sockaddr_in *sin; +- char straddr[24]; +- char ipaddr[24]; ++ const struct sockaddr *sa = addr; ++ char straddr[OFI_ADDRSTRLEN]; ++ char ipaddr[INET6_ADDRSTRLEN]; + int size; + +- sin = addr; +- inet_ntop(sin->sin_family, (void*)&sin->sin_addr, ipaddr, sizeof(ipaddr)); ++ if (!inet_ntop(sa->sa_family, ofi_get_ipaddr(sa), ipaddr, sizeof(ipaddr))) ++ return NULL; ++ + size = snprintf(straddr, sizeof(straddr), "%s:%d", +- ipaddr, ntohs(sin->sin_port)); ++ ipaddr, ofi_addr_get_port(sa)); + snprintf(buf, *len, "%s", straddr); + *len = size + 1; + return buf; +@@ -611,8 +615,11 @@ int sock_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + case FI_SOCKADDR_IN: + _av->addrlen = sizeof(struct sockaddr_in); + break; ++ case FI_SOCKADDR_IN6: ++ _av->addrlen = sizeof(struct sockaddr_in6); ++ break; + default: +- SOCK_LOG_ERROR("Invalid address format: only IPv4 supported\n"); ++ SOCK_LOG_ERROR("Invalid address format: only IP supported\n"); + ret = -FI_EINVAL; + goto err2; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_comm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_comm.c +index d5362db8e..10d5380d7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_comm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_comm.c +@@ -55,9 +55,8 @@ static ssize_t sock_comm_send_socket(struct sock_conn *conn, + ret = 0; + } else if (ofi_sockerr() == EPIPE) { + conn->connected = 0; +- SOCK_LOG_DBG("Disconnected: %s:%d\n", +- inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); ++ SOCK_LOG_DBG("Disconnected port: %d\n", ++ ofi_addr_get_port(&conn->addr.sa)); + } else { + SOCK_LOG_DBG("write error: %s\n", + strerror(ofi_sockerr())); +@@ -136,9 +135,8 @@ static ssize_t sock_comm_recv_socket(struct sock_conn *conn, + ret = ofi_recv_socket(conn->sock_fd, buf, len, 0); + if (ret == 0) { + conn->connected = 0; +- SOCK_LOG_DBG("Disconnected: %s:%d\n", +- inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); ++ SOCK_LOG_DBG("Disconnected: port %d\n", ++ ofi_addr_get_port(&conn->addr.sa)); + return ret; + } + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_conn.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_conn.c +index 912f00893..5f1c59d1a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_conn.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_conn.c +@@ -69,7 +69,7 @@ ssize_t sock_conn_send_src_addr(struct sock_ep_attr *ep_attr, struct sock_tx_ctx + SOCK_LOG_DBG("New conn msg on TX: %p using conn: %p\n", tx_ctx, conn); + + total_len = 0; +- tx_op.src_iov_len = sizeof(struct sockaddr_in); ++ tx_op.src_iov_len = sizeof(union ofi_sock_ip); + total_len = tx_op.src_iov_len + sizeof(struct sock_op_send); + + sock_tx_ctx_start(tx_ctx); +@@ -80,7 +80,10 @@ ssize_t sock_conn_send_src_addr(struct sock_ep_attr *ep_attr, struct sock_tx_ctx + + sock_tx_ctx_write_op_send(tx_ctx, &tx_op, 0, (uintptr_t) NULL, 0, 0, + ep_attr, conn); +- sock_tx_ctx_write(tx_ctx, ep_attr->src_addr, sizeof(struct sockaddr_in)); ++ ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "sending src addr: ", ++ ep_attr->src_addr); ++ sock_tx_ctx_write(tx_ctx, ep_attr->src_addr, sizeof(union ofi_sock_ip)); + sock_tx_ctx_commit(tx_ctx); + conn->address_published = 1; + return 0; +@@ -179,7 +182,7 @@ static int sock_conn_get_next_index(struct sock_conn_map *map) + } + + static struct sock_conn *sock_conn_map_insert(struct sock_ep_attr *ep_attr, +- struct sockaddr_in *addr, int conn_fd, ++ union ofi_sock_ip *addr, int conn_fd, + int addr_published) + { + int index; +@@ -207,7 +210,7 @@ static struct sock_conn *sock_conn_map_insert(struct sock_ep_attr *ep_attr, + (ep_attr->ep_type == FI_EP_MSG ? + SOCK_OPTS_KEEPALIVE : 0)); + +- if (fi_epoll_add(map->epoll_set, conn_fd, &map->table[index])) ++ if (fi_epoll_add(map->epoll_set, conn_fd, FI_EPOLL_IN, &map->table[index])) + SOCK_LOG_ERROR("failed to add to epoll set: %d\n", conn_fd); + + map->table[index].address_published = addr_published; +@@ -316,7 +319,7 @@ static void *sock_conn_listener_thread(void *arg) + void *ep_contexts[SOCK_EPOLL_WAIT_EVENTS]; + struct sock_ep_attr *ep_attr; + int num_fds, i, conn_fd; +- struct sockaddr_in remote; ++ union ofi_sock_ip remote; + socklen_t addr_size; + + while (conn_listener->do_listen) { +@@ -336,19 +339,20 @@ static void *sock_conn_listener_thread(void *arg) + continue; + } + ++ memset(&remote, 0, sizeof remote); + addr_size = sizeof(remote); +- conn_fd = accept(conn_handle->sock, (struct sockaddr *) &remote, ++ conn_fd = accept(conn_handle->sock, &remote.sa, + &addr_size); + SOCK_LOG_DBG("CONN: accepted conn-req: %d\n", conn_fd); ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, ++ "accepted peer addr: ", &remote.sa); ++ + if (conn_fd < 0) { + SOCK_LOG_ERROR("failed to accept: %s\n", + strerror(ofi_sockerr())); + continue; + } + +- SOCK_LOG_DBG("ACCEPT: %s, %d\n", inet_ntoa(remote.sin_addr), +- ntohs(remote.sin_port)); +- + ep_attr = container_of(conn_handle, struct sock_ep_attr, conn_handle); + fastlock_acquire(&ep_attr->cmap.lock); + sock_conn_map_insert(ep_attr, &remote, conn_fd, 1); +@@ -380,7 +384,8 @@ int sock_conn_start_listener_thread(struct sock_conn_listener *conn_listener) + } + + ret = fi_epoll_add(conn_listener->emap, +- conn_listener->signal.fd[FI_READ_FD], NULL); ++ conn_listener->signal.fd[FI_READ_FD], ++ FI_EPOLL_IN, NULL); + if (ret != 0){ + SOCK_LOG_ERROR("failed to add signal fd to epoll\n"); + goto err3; +@@ -407,99 +412,59 @@ err1: + + int sock_conn_listen(struct sock_ep_attr *ep_attr) + { +- struct addrinfo *s_res = NULL, *p; +- struct addrinfo hints = { 0 }; +- int listen_fd = 0, ret; ++ int listen_fd, ret; + socklen_t addr_size; +- struct sockaddr_in addr; ++ union ofi_sock_ip addr; + struct sock_conn_handle *conn_handle = &ep_attr->conn_handle; +- char service[NI_MAXSERV] = {0}; +- char *port; +- char ipaddr[24]; +- +- hints.ai_family = AF_INET; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_flags = AI_PASSIVE; +- +- memcpy(&addr, ep_attr->src_addr, sizeof(addr)); +- if (getnameinfo((void *)ep_attr->src_addr, sizeof(*ep_attr->src_addr), +- NULL, 0, conn_handle->service, +- sizeof(conn_handle->service), NI_NUMERICSERV)) { +- SOCK_LOG_ERROR("could not resolve src_addr\n"); +- return -FI_EINVAL; +- } + +- if (ep_attr->ep_type == FI_EP_MSG) { +- memset(conn_handle->service, 0, NI_MAXSERV); +- port = NULL; +- addr.sin_port = 0; +- } else +- port = conn_handle->service; +- +- inet_ntop(addr.sin_family, &addr.sin_addr, ipaddr, sizeof(ipaddr)); +- ret = getaddrinfo(ipaddr, port, &hints, &s_res); +- if (ret) { +- SOCK_LOG_ERROR("no available AF_INET address, service %s, %s\n", +- conn_handle->service, gai_strerror(ret)); +- return -FI_EINVAL; +- } ++ listen_fd = ofi_socket(ep_attr->src_addr->sa.sa_family, ++ SOCK_STREAM, IPPROTO_TCP); ++ if (listen_fd == INVALID_SOCKET) ++ return -ofi_sockerr(); + +- SOCK_LOG_DBG("Binding listener thread to port: %s\n", conn_handle->service); +- for (p = s_res; p; p = p->ai_next) { +- listen_fd = ofi_socket(p->ai_family, p->ai_socktype, p->ai_protocol); +- if (listen_fd >= 0) { +- sock_set_sockopts(listen_fd, SOCK_OPTS_NONBLOCK); ++ sock_set_sockopts(listen_fd, SOCK_OPTS_NONBLOCK); + +- if (!bind(listen_fd, s_res->ai_addr, s_res->ai_addrlen)) +- break; +- ofi_close_socket(listen_fd); +- listen_fd = -1; +- } +- } +- freeaddrinfo(s_res); ++ addr = *ep_attr->src_addr; ++ if (ep_attr->ep_type == FI_EP_MSG) ++ ofi_addr_set_port(&addr.sa, 0); + +- if (listen_fd < 0) { +- SOCK_LOG_ERROR("failed to listen to port: %s\n", +- conn_handle->service); ++ ret = bind(listen_fd, &addr.sa, ofi_sizeofaddr(&addr.sa)); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to bind listener: %s\n", ++ strerror(ofi_sockerr())); ++ ofi_straddr_log(&sock_prov, FI_LOG_WARN, FI_LOG_EP_CTRL, ++ "bind failed to addr: ", &addr.sa); ++ ret = -ofi_sockerr(); + goto err; + } + +- if (atoi(conn_handle->service) == 0) { +- addr_size = sizeof(addr); +- if (getsockname(listen_fd, (struct sockaddr *) &addr, +- &addr_size)) +- goto err; +- snprintf(conn_handle->service, sizeof(conn_handle->service), "%d", +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Bound to port: %s - %d\n", +- conn_handle->service, getpid()); +- ep_attr->msg_src_port = ntohs(addr.sin_port); ++ addr_size = sizeof(addr); ++ ret = ofi_getsockname(listen_fd, &addr.sa, &addr_size); ++ if (ret) { ++ ret = -ofi_sockerr(); ++ goto err; + } + +- if (ep_attr->src_addr->sin_addr.s_addr == 0) { +- snprintf(service, sizeof service, "%s", conn_handle->service); +- ret = sock_get_src_addr_from_hostname(ep_attr->src_addr, service); +- if (ret) +- goto err; +- } ++ ep_attr->msg_src_port = ofi_addr_get_port(&addr.sa); ++ if (!ofi_addr_get_port(&ep_attr->src_addr->sa)) ++ ofi_addr_set_port(&ep_attr->src_addr->sa, ep_attr->msg_src_port); + +- if (listen(listen_fd, sock_cm_def_map_sz)) { ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "listening at addr: ", ++ &addr.sa); ++ ret = listen(listen_fd, sock_cm_def_map_sz); ++ if (ret) { + SOCK_LOG_ERROR("failed to listen socket: %s\n", + strerror(ofi_sockerr())); ++ ret = -ofi_sockerr(); + goto err; + } + +- if (((struct sockaddr_in *) (ep_attr->src_addr))->sin_port == 0) { +- ((struct sockaddr_in *) (ep_attr->src_addr))->sin_port = +- htons(atoi(conn_handle->service)); +- } +- + conn_handle->sock = listen_fd; + conn_handle->do_listen = 1; + + fastlock_acquire(&ep_attr->domain->conn_listener.signal_lock); + ret = fi_epoll_add(ep_attr->domain->conn_listener.emap, +- conn_handle->sock, conn_handle); ++ conn_handle->sock, FI_EPOLL_IN, conn_handle); + fd_signal_set(&ep_attr->domain->conn_listener.signal); + fastlock_release(&ep_attr->domain->conn_listener.signal_lock); + if (ret) { +@@ -509,10 +474,13 @@ int sock_conn_listen(struct sock_ep_attr *ep_attr) + + return 0; + err: +- if (listen_fd >= 0) ++ if (listen_fd != INVALID_SOCKET) { + ofi_close_socket(listen_fd); ++ conn_handle->sock = INVALID_SOCKET; ++ conn_handle->do_listen = 0; ++ } + +- return -FI_EINVAL; ++ return ret; + } + + int sock_ep_connect(struct sock_ep_attr *ep_attr, fi_addr_t index, +@@ -521,7 +489,7 @@ int sock_ep_connect(struct sock_ep_attr *ep_attr, fi_addr_t index, + int conn_fd = -1, ret; + int do_retry = sock_conn_retry; + struct sock_conn *new_conn; +- struct sockaddr_in addr; ++ union ofi_sock_ip addr; + socklen_t lon; + int valopt = 0; + struct pollfd poll_fd; +@@ -531,9 +499,9 @@ int sock_ep_connect(struct sock_ep_attr *ep_attr, fi_addr_t index, + passed to endpoint */ + assert(ep_attr->dest_addr); + addr = *ep_attr->dest_addr; +- addr.sin_port = htons(ep_attr->msg_dest_port); ++ ofi_addr_set_port(&addr.sa, ep_attr->msg_dest_port); + } else { +- addr = *((struct sockaddr_in *)&ep_attr->av->table[index].addr); ++ addr = ep_attr->av->table[index].addr; + } + + do_connect: +@@ -544,7 +512,7 @@ do_connect: + if (*conn != SOCK_CM_CONN_IN_PROGRESS) + return FI_SUCCESS; + +- conn_fd = ofi_socket(AF_INET, SOCK_STREAM, 0); ++ conn_fd = ofi_socket(addr.sa.sa_family, SOCK_STREAM, 0); + if (conn_fd == -1) { + SOCK_LOG_ERROR("failed to create conn_fd, errno: %d\n", + ofi_sockerr()); +@@ -560,18 +528,15 @@ do_connect: + return -FI_EOTHER; + } + +- SOCK_LOG_DBG("Connecting to: %s:%d\n", inet_ntoa(addr.sin_addr), +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Connecting using address:%s\n", +- inet_ntoa(ep_attr->src_addr->sin_addr)); +- +- ret = connect(conn_fd, (struct sockaddr *) &addr, sizeof addr); ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "connecting to addr: ", ++ &addr.sa); ++ ret = connect(conn_fd, &addr.sa, ofi_sizeofaddr(&addr.sa)); + if (ret < 0) { + if (OFI_SOCK_TRY_CONN_AGAIN(ofi_sockerr())) { + poll_fd.fd = conn_fd; + poll_fd.events = POLLOUT; + +- ret = poll(&poll_fd, 1, 15 * 1000); ++ ret = poll(&poll_fd, 1, sock_conn_timeout); + if (ret < 0) { + SOCK_LOG_DBG("poll failed\n"); + goto retry; +@@ -590,22 +555,12 @@ do_connect: + SOCK_LOG_DBG("Error in connection() " + "%d - %s - %d\n", + valopt, strerror(valopt), conn_fd); +- SOCK_LOG_DBG("Connecting to: %s:%d\n", +- inet_ntoa(addr.sin_addr), +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Connecting using address:%s\n", +- inet_ntoa(ep_attr->src_addr->sin_addr)); + goto retry; + } + goto out; + } else { + SOCK_LOG_DBG("Timeout or error() - %s: %d\n", + strerror(ofi_sockerr()), conn_fd); +- SOCK_LOG_DBG("Connecting to: %s:%d\n", +- inet_ntoa(addr.sin_addr), +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Connecting using address:%s\n", +- inet_ntoa(ep_attr->src_addr->sin_addr)); + goto retry; + } + } else { +@@ -614,7 +569,6 @@ do_connect: + + retry: + do_retry--; +- sleep(10); + if (!do_retry) + goto err; + +@@ -625,10 +579,6 @@ retry: + + SOCK_LOG_ERROR("Connect error, retrying - %s - %d\n", + strerror(ofi_sockerr()), conn_fd); +- SOCK_LOG_DBG("Connecting to: %s:%d\n", inet_ntoa(addr.sin_addr), +- ntohs(addr.sin_port)); +- SOCK_LOG_DBG("Connecting using address:%s\n", +- inet_ntoa(ep_attr->src_addr->sin_addr)); + goto do_connect; + + out: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_dom.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_dom.c +index d28baecbd..a78bf71c0 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_dom.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_dom.c +@@ -182,6 +182,7 @@ static int sock_dom_close(struct fid *fid) + return -FI_EBUSY; + + sock_conn_stop_listener_thread(&dom->conn_listener); ++ sock_ep_cm_stop_thread(&dom->cm_head); + + sock_pe_finalize(dom->pe); + fastlock_destroy(&dom->lock); +@@ -336,9 +337,15 @@ int sock_domain(struct fid_fabric *fabric, struct fi_info *info, + if (ret) + goto err2; + ++ ret = sock_ep_cm_start_thread(&sock_domain->cm_head); ++ if (ret) ++ goto err3; ++ + sock_dom_add_to_list(sock_domain); + return 0; + ++err3: ++ sock_conn_stop_listener_thread(&sock_domain->conn_listener); + err2: + sock_pe_finalize(sock_domain->pe); + err1: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep.c +index ff6f3fec2..d6eb12785 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep.c +@@ -644,8 +644,8 @@ static void sock_ep_clear_eq_list(struct dlistfd_head *list, + + static int sock_ep_close(struct fid *fid) + { ++ struct sock_conn_req_handle *handle; + struct sock_ep *sock_ep; +- char c = 0; + + switch (fid->fclass) { + case FI_CLASS_EP: +@@ -670,17 +670,14 @@ static int sock_ep_close(struct fid *fid) + return -FI_EBUSY; + + if (sock_ep->attr->ep_type == FI_EP_MSG) { +- sock_ep->attr->cm.do_listen = 0; +- if (ofi_write_socket(sock_ep->attr->cm.signal_fds[0], &c, 1) != 1) +- SOCK_LOG_DBG("Failed to signal\n"); +- +- if (sock_ep->attr->cm.listener_thread && +- pthread_join(sock_ep->attr->cm.listener_thread, NULL)) { +- SOCK_LOG_ERROR("pthread join failed (%d)\n", +- ofi_syserr()); ++ if (sock_ep->attr->info.handle) { ++ handle = container_of(sock_ep->attr->info.handle, ++ struct sock_conn_req_handle, handle); ++ sock_ep_cm_wait_handle_finalized(&sock_ep->attr->domain->cm_head, ++ handle); ++ free(handle->req); ++ free(handle); + } +- ofi_close_socket(sock_ep->attr->cm.signal_fds[0]); +- ofi_close_socket(sock_ep->attr->cm.signal_fds[1]); + } else { + if (sock_ep->attr->av) + ofi_atomic_dec32(&sock_ep->attr->av->ref); +@@ -1335,27 +1332,13 @@ int sock_srx_ctx(struct fid_domain *domain, + } + + #if HAVE_GETIFADDRS +-static int sock_get_prefix_len(uint32_t net_addr) +-{ +- uint32_t addr; +- int count = 0; +- +- addr = ntohl(net_addr); +- while (addr > 0) { +- addr = addr << 1; +- count++; +- } +- return count; +-} +- +-char *sock_get_fabric_name(struct sockaddr_in *src_addr) ++static char *sock_get_fabric_name(struct sockaddr *src_addr) + { + int ret; + struct ifaddrs *ifaddrs, *ifa; + char *fabric_name = NULL; +- struct in_addr net_in_addr; +- struct sockaddr_in *host_addr, *net_addr; +- char netbuf[SOCK_MAX_NETWORK_ADDR_SZ]; ++ union ofi_sock_ip net_in_addr; ++ char netbuf[OFI_ADDRSTRLEN]; + int prefix_len; + + ret = ofi_getifaddrs(&ifaddrs); +@@ -1363,20 +1346,32 @@ char *sock_get_fabric_name(struct sockaddr_in *src_addr) + return NULL; + + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { +- if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || +- (ifa->ifa_addr->sa_family != AF_INET)) ++ if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP)) + continue; +- if (ofi_equals_ipaddr((struct sockaddr_in *)ifa->ifa_addr, src_addr)) { +- host_addr = (struct sockaddr_in *)ifa->ifa_addr; +- net_addr = (struct sockaddr_in *)ifa->ifa_netmask; +- /* set fabric name to the network_adress in the format of a.b.c.d/e */ +- net_in_addr.s_addr = (uint32_t)((uint32_t) host_addr->sin_addr.s_addr & +- (uint32_t) net_addr->sin_addr.s_addr); +- inet_ntop(host_addr->sin_family, (void *)&(net_in_addr), netbuf, +- sizeof(netbuf)); +- prefix_len = sock_get_prefix_len(net_addr->sin_addr.s_addr); ++ ++ if (ofi_equals_ipaddr(ifa->ifa_addr, src_addr)) { ++ prefix_len = ofi_mask_addr(&net_in_addr.sa, ++ ifa->ifa_addr, ifa->ifa_netmask); ++ ++ switch (net_in_addr.sa.sa_family) { ++ case AF_INET: ++ inet_ntop(AF_INET, ++ &((struct sockaddr_in *)&net_in_addr)->sin_addr, ++ netbuf, sizeof(netbuf)); ++ break; ++ case AF_INET6: ++ inet_ntop(AF_INET6, ++ &((struct sockaddr_in6 *)&net_in_addr)->sin6_addr, ++ netbuf, sizeof(netbuf)); ++ break; ++ default: ++ snprintf(netbuf, sizeof(netbuf), "%s", ""); ++ netbuf[sizeof(netbuf)-1] = '\0'; ++ break; ++ } + snprintf(netbuf + strlen(netbuf), sizeof(netbuf) - strlen(netbuf), +- "%s%d", "/", prefix_len); ++ "%s%d", "/", prefix_len); ++ netbuf[sizeof(netbuf)-1] = '\0'; + fabric_name = strdup(netbuf); + goto out; + } +@@ -1386,7 +1381,7 @@ out: + return fabric_name; + } + +-char *sock_get_domain_name(struct sockaddr_in *src_addr) ++char *sock_get_domain_name(struct sockaddr *src_addr) + { + int ret; + struct ifaddrs *ifaddrs, *ifa; +@@ -1397,10 +1392,10 @@ char *sock_get_domain_name(struct sockaddr_in *src_addr) + return NULL; + + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { +- if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || +- (ifa->ifa_addr->sa_family != AF_INET)) ++ if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP)) + continue; +- if (ofi_equals_ipaddr((struct sockaddr_in *)ifa->ifa_addr, src_addr)) { ++ ++ if (ofi_equals_ipaddr(ifa->ifa_addr, src_addr)) { + domain_name = strdup(ifa->ifa_name); + goto out; + } +@@ -1410,12 +1405,12 @@ out: + return domain_name; + } + #else +-char *sock_get_fabric_name(struct sockaddr_in *src_addr) ++static char *sock_get_fabric_name(struct sockaddr *src_addr) + { + return NULL; + } + +-char *sock_get_domain_name(struct sockaddr_in *src_addr) ++char *sock_get_domain_name(struct sockaddr *src_addr) + { + return NULL; + } +@@ -1524,25 +1519,32 @@ struct fi_info *sock_fi_info(uint32_t version, enum fi_ep_type ep_type, + if (!info) + return NULL; + +- info->src_addr = calloc(1, sizeof(struct sockaddr_in)); ++ info->src_addr = calloc(1, sizeof(union ofi_sock_ip)); + if (!info->src_addr) + goto err; + + info->mode = SOCK_MODE; +- info->addr_format = FI_SOCKADDR_IN; + +- if (src_addr) +- memcpy(info->src_addr, src_addr, sizeof(struct sockaddr_in)); ++ if (src_addr) { ++ memcpy(info->src_addr, src_addr, ofi_sizeofaddr(src_addr)); ++ } else { ++ sock_get_src_addr_from_hostname(info->src_addr, NULL, ++ dest_addr ? ((struct sockaddr *) dest_addr)->sa_family : ++ ofi_get_sa_family(hints)); ++ } ++ ++ info->src_addrlen = ofi_sizeofaddr(info->src_addr); ++ if (info->src_addrlen == sizeof(struct sockaddr_in6)) ++ info->addr_format = FI_SOCKADDR_IN6; + else +- sock_get_src_addr_from_hostname(info->src_addr, NULL); +- info->src_addrlen = sizeof(struct sockaddr_in); ++ info->addr_format = FI_SOCKADDR_IN; + + if (dest_addr) { +- info->dest_addr = calloc(1, sizeof(struct sockaddr_in)); ++ info->dest_addr = calloc(1, sizeof(union ofi_sock_ip)); + if (!info->dest_addr) + goto err; +- info->dest_addrlen = sizeof(struct sockaddr_in); +- memcpy(info->dest_addr, dest_addr, sizeof(struct sockaddr_in)); ++ info->dest_addrlen = ofi_sizeofaddr(dest_addr); ++ memcpy(info->dest_addr, dest_addr, info->dest_addrlen); + } + + if (hints) { +@@ -1577,39 +1579,39 @@ err: + return NULL; + } + +-int sock_get_src_addr_from_hostname(struct sockaddr_in *src_addr, +- const char *service) ++int sock_get_src_addr_from_hostname(union ofi_sock_ip *src_addr, ++ const char *service, uint16_t sa_family) + { + int ret; + struct addrinfo ai, *rai = NULL; + char hostname[HOST_NAME_MAX]; + + memset(&ai, 0, sizeof(ai)); +- ai.ai_family = AF_INET; ++ ai.ai_family = sa_family; + ai.ai_socktype = SOCK_STREAM; + +- ofi_getnodename(hostname, sizeof(hostname)); ++ ofi_getnodename(sa_family, hostname, sizeof(hostname)); + ret = getaddrinfo(hostname, service, &ai, &rai); + if (ret) { + SOCK_LOG_DBG("getaddrinfo failed!\n"); + return -FI_EINVAL; + } +- memcpy(src_addr, (struct sockaddr_in *)rai->ai_addr, +- sizeof(*src_addr)); ++ memcpy(src_addr, rai->ai_addr, rai->ai_addrlen); + freeaddrinfo(rai); + return 0; + } + + static int sock_ep_assign_src_addr(struct sock_ep *sock_ep, struct fi_info *info) + { +- sock_ep->attr->src_addr = calloc(1, sizeof(struct sockaddr_in)); ++ sock_ep->attr->src_addr = calloc(1, sizeof(union ofi_sock_ip)); + if (!sock_ep->attr->src_addr) + return -FI_ENOMEM; + + if (info && info->dest_addr) + return sock_get_src_addr(info->dest_addr, sock_ep->attr->src_addr); + else +- return sock_get_src_addr_from_hostname(sock_ep->attr->src_addr, NULL); ++ return sock_get_src_addr_from_hostname(sock_ep->attr->src_addr, ++ NULL, 0); + } + + int sock_alloc_endpoint(struct fid_domain *domain, struct fi_info *info, +@@ -1681,23 +1683,25 @@ int sock_alloc_endpoint(struct fid_domain *domain, struct fi_info *info, + } + + if (info->src_addr) { +- sock_ep->attr->src_addr = calloc(1, sizeof(struct sockaddr_in)); ++ sock_ep->attr->src_addr = calloc(1, sizeof(*sock_ep-> ++ attr->src_addr)); + if (!sock_ep->attr->src_addr) { + ret = -FI_ENOMEM; + goto err2; + } + memcpy(sock_ep->attr->src_addr, info->src_addr, +- sizeof(struct sockaddr_in)); ++ info->src_addrlen); + } + + if (info->dest_addr) { +- sock_ep->attr->dest_addr = calloc(1, sizeof(struct sockaddr_in)); ++ sock_ep->attr->dest_addr = calloc(1, sizeof(*sock_ep-> ++ attr->dest_addr)); + if (!sock_ep->attr->dest_addr) { + ret = -FI_ENOMEM; + goto err2; + } + memcpy(sock_ep->attr->dest_addr, info->dest_addr, +- sizeof(struct sockaddr_in)); ++ info->dest_addrlen); + } + + if (info->tx_attr) { +@@ -1789,17 +1793,6 @@ int sock_alloc_endpoint(struct fid_domain *domain, struct fi_info *info, + + sock_ep->attr->domain = sock_dom; + fastlock_init(&sock_ep->attr->cm.lock); +- if (sock_ep->attr->ep_type == FI_EP_MSG) { +- dlist_init(&sock_ep->attr->cm.msg_list); +- if (socketpair(AF_UNIX, SOCK_STREAM, 0, +- sock_ep->attr->cm.signal_fds) < 0) { +- ret = -FI_EINVAL; +- goto err2; +- } +- +- if (fi_fd_nonblock(sock_ep->attr->cm.signal_fds[1])) +- SOCK_LOG_ERROR("fi_fd_nonblock failed"); +- } + + if (sock_conn_map_init(sock_ep, sock_cm_def_map_sz)) { + SOCK_LOG_ERROR("failed to init connection map\n"); +@@ -1828,7 +1821,7 @@ void sock_ep_remove_conn(struct sock_ep_attr *attr, struct sock_conn *conn) + } + + struct sock_conn *sock_ep_lookup_conn(struct sock_ep_attr *attr, fi_addr_t index, +- struct sockaddr_in *addr) ++ union ofi_sock_ip *addr) + { + int i; + uint16_t idx; +@@ -1847,7 +1840,7 @@ struct sock_conn *sock_ep_lookup_conn(struct sock_ep_attr *attr, fi_addr_t index + if (!attr->cmap.table[i].connected) + continue; + +- if (ofi_equals_sockaddr(&attr->cmap.table[i].addr, addr)) { ++ if (ofi_equals_sockaddr(&attr->cmap.table[i].addr.sa, &addr->sa)) { + conn = &attr->cmap.table[i]; + if (conn->av_index == FI_ADDR_NOTAVAIL) + conn->av_index = idx; +@@ -1863,13 +1856,13 @@ int sock_ep_get_conn(struct sock_ep_attr *attr, struct sock_tx_ctx *tx_ctx, + struct sock_conn *conn; + uint64_t av_index = (attr->ep_type == FI_EP_MSG) ? + 0 : (index & attr->av->mask); +- struct sockaddr_in *addr; ++ union ofi_sock_ip *addr; + int ret = FI_SUCCESS; + + if (attr->ep_type == FI_EP_MSG) + addr = attr->dest_addr; + else +- addr = (struct sockaddr_in *)&attr->av->table[av_index].addr; ++ addr = &attr->av->table[av_index].addr; + + fastlock_acquire(&attr->cmap.lock); + conn = sock_ep_lookup_conn(attr, av_index, addr); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep_msg.c +index 1455b904b..ff6360c8a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_ep_msg.c +@@ -255,104 +255,79 @@ static int sock_ep_cm_getname(fid_t fid, void *addr, size_t *addrlen) + struct sock_pep *sock_pep = NULL; + size_t len; + +- len = MIN(*addrlen, sizeof(struct sockaddr_in)); + switch (fid->fclass) { + case FI_CLASS_EP: + case FI_CLASS_SEP: + sock_ep = container_of(fid, struct sock_ep, ep.fid); + if (sock_ep->attr->is_enabled == 0) + return -FI_EOPBADSTATE; ++ ++ len = MIN(*addrlen, ofi_sizeofaddr(&sock_ep->attr->src_addr->sa)); + memcpy(addr, sock_ep->attr->src_addr, len); ++ *addrlen = ofi_sizeofaddr(&sock_ep->attr->src_addr->sa); + break; + case FI_CLASS_PEP: + sock_pep = container_of(fid, struct sock_pep, pep.fid); + if (!sock_pep->name_set) + return -FI_EOPBADSTATE; ++ ++ len = MIN(*addrlen, ofi_sizeofaddr(&sock_pep->src_addr.sa)); + memcpy(addr, &sock_pep->src_addr, len); ++ *addrlen = ofi_sizeofaddr(&sock_pep->src_addr.sa); + break; + default: + SOCK_LOG_ERROR("Invalid argument\n"); + return -FI_EINVAL; + } + +- *addrlen = sizeof(struct sockaddr_in); +- return (len == sizeof(struct sockaddr_in)) ? 0 : -FI_ETOOSMALL; ++ return (len == *addrlen) ? 0 : -FI_ETOOSMALL; + } + + static int sock_pep_create_listener(struct sock_pep *pep) + { + int ret; + socklen_t addr_size; +- struct sockaddr_in addr; +- struct addrinfo *s_res = NULL, *p; +- struct addrinfo hints; +- char sa_ip[INET_ADDRSTRLEN]; +- char sa_port[NI_MAXSERV]; + +- pep->cm.do_listen = 1; +- memset(&hints, 0, sizeof(hints)); +- hints.ai_family = AF_INET; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_flags = AI_PASSIVE; ++ pep->cm.sock = ofi_socket(pep->src_addr.sa.sa_family, ++ SOCK_STREAM, IPPROTO_TCP); ++ if (pep->cm.sock == INVALID_SOCKET) ++ return -ofi_sockerr(); + +- memcpy(sa_ip, inet_ntoa(pep->src_addr.sin_addr), INET_ADDRSTRLEN); +- sprintf(sa_port, "%d", ntohs(pep->src_addr.sin_port)); +- sa_ip[INET_ADDRSTRLEN - 1] = '\0'; +- sa_port[NI_MAXSERV - 1] = '\0'; ++ sock_set_sockopts(pep->cm.sock, SOCK_OPTS_NONBLOCK); + +- ret = getaddrinfo(sa_ip, sa_port, &hints, &s_res); ++ ret = bind(pep->cm.sock, &pep->src_addr.sa, ++ ofi_sizeofaddr(&pep->src_addr.sa)); + if (ret) { +- SOCK_LOG_ERROR("no available AF_INET address service:%s, %s\n", +- sa_port, gai_strerror(ret)); +- return -FI_EINVAL; +- } +- +- SOCK_LOG_DBG("binding pep listener to %s\n", sa_port); +- for (p = s_res; p; p = p->ai_next) { +- pep->cm.sock = ofi_socket(p->ai_family, p->ai_socktype, +- p->ai_protocol); +- if (pep->cm.sock >= 0) { +- sock_set_sockopts(pep->cm.sock, SOCK_OPTS_NONBLOCK); +- if (!bind(pep->cm.sock, s_res->ai_addr, s_res->ai_addrlen)) +- break; +- SOCK_LOG_ERROR("failed to bind listener: %s\n", +- strerror(ofi_sockerr())); +- ofi_close_socket(pep->cm.sock); +- pep->cm.sock = -1; +- } +- } +- +- freeaddrinfo(s_res); +- if (pep->cm.sock < 0) { +- SOCK_LOG_ERROR("failed to create listener: %s\n", ++ SOCK_LOG_ERROR("failed to bind listener: %s\n", + strerror(ofi_sockerr())); +- return -FI_EIO; +- } +- +- if (pep->src_addr.sin_port == 0) { +- addr_size = sizeof(addr); +- if (getsockname(pep->cm.sock, (struct sockaddr *)&addr, &addr_size)) +- return -FI_EINVAL; +- pep->src_addr.sin_port = addr.sin_port; +- sprintf(sa_port, "%d", ntohs(pep->src_addr.sin_port)); ++ ret = -ofi_sockerr(); ++ goto err; + } + +- if (pep->src_addr.sin_addr.s_addr == 0) { +- ret = sock_get_src_addr_from_hostname(&pep->src_addr, sa_port); +- if (ret) +- return -FI_EINVAL; ++ addr_size = sizeof(pep->src_addr); ++ if (ofi_getsockname(pep->cm.sock, &pep->src_addr.sa, &addr_size) == ++ SOCKET_ERROR) { ++ ret = -ofi_sockerr(); ++ goto err; + } + + if (listen(pep->cm.sock, sock_cm_def_map_sz)) { + SOCK_LOG_ERROR("failed to listen socket: %s\n", + strerror(ofi_sockerr())); +- return -ofi_sockerr(); ++ ret = -ofi_sockerr(); ++ goto err; + } + ++ pep->cm.do_listen = 1; + pep->name_set = 1; +- SOCK_LOG_DBG("Listener thread bound to %s:%d\n", +- sa_ip, ntohs(pep->src_addr.sin_port)); + return 0; ++err: ++ if (pep->cm.sock) { ++ ofi_close_socket(pep->cm.sock); ++ pep->cm.sock = INVALID_SOCKET; ++ } ++ ++ return ret; + } + + static int sock_ep_cm_setname(fid_t fid, void *addr, size_t addrlen) +@@ -360,7 +335,7 @@ static int sock_ep_cm_setname(fid_t fid, void *addr, size_t addrlen) + struct sock_ep *sock_ep = NULL; + struct sock_pep *sock_pep = NULL; + +- if (addrlen != sizeof(struct sockaddr_in)) ++ if (!addrlen || addrlen != ofi_sizeofaddr(addr)) + return -FI_EINVAL; + + switch (fid->fclass) { +@@ -389,10 +364,10 @@ static int sock_ep_cm_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) + size_t len; + + sock_ep = container_of(ep, struct sock_ep, ep); +- len = MIN(*addrlen, sizeof(struct sockaddr_in)); ++ len = MIN(*addrlen, ofi_sizeofaddr(&sock_ep->attr->dest_addr->sa)); + memcpy(addr, sock_ep->attr->dest_addr, len); +- *addrlen = sizeof(struct sockaddr_in); +- return (len == sizeof(struct sockaddr_in)) ? 0 : -FI_ETOOSMALL; ++ *addrlen = ofi_sizeofaddr(&sock_ep->attr->dest_addr->sa); ++ return (len == *addrlen) ? 0 : -FI_ETOOSMALL; + } + + static int sock_cm_send(int fd, const void *buf, int len) +@@ -431,106 +406,175 @@ static int sock_cm_recv(int fd, void *buf, int len) + return 0; + } + +-static void sock_ep_wait_shutdown(struct sock_ep *ep) ++static void sock_ep_cm_monitor_handle(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle, ++ uint32_t events) + { +- int ret, do_report = 0; +- char tmp = 0; +- struct pollfd poll_fds[2]; +- struct sock_conn_hdr msg; +- struct fi_eq_cm_entry cm_entry = {0}; ++ int ret; + +- poll_fds[0].fd = ep->attr->cm.sock; +- poll_fds[1].fd = ep->attr->cm.signal_fds[1]; +- poll_fds[0].events = poll_fds[1].events = POLLIN; ++ fastlock_acquire(&cm_head->signal_lock); ++ if (handle->monitored) ++ goto unlock; + +- while (*((volatile int*) &ep->attr->cm.do_listen)) { +- ret = poll(poll_fds, 2, -1); +- if (ret > 0) { +- if (poll_fds[1].revents & POLLIN) { +- ret = ofi_read_socket(ep->attr->cm.signal_fds[1], &tmp, 1); +- if (ret != 1) { +- SOCK_LOG_DBG("Invalid signal\n"); +- break; +- } +- continue; +- } +- } else { +- break; +- } ++ /* Mark the handle as monitored before adding it to the pollset */ ++ handle->monitored = 1; ++ ret = fi_epoll_add(cm_head->emap, handle->sock_fd, ++ events, handle); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to monitor fd %d: %d\n", ++ handle->sock_fd, ret); ++ handle->monitored = 0; ++ } else { ++ fd_signal_set(&cm_head->signal); ++ } ++unlock: ++ fastlock_release(&cm_head->signal_lock); ++} + +- if (sock_cm_recv(ep->attr->cm.sock, &msg, sizeof(msg))) +- break; ++static void ++sock_ep_cm_unmonitor_handle_locked(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle, ++ int close_socket) ++{ ++ int ret; + +- if (msg.type == SOCK_CONN_SHUTDOWN) +- break; ++ if (handle->monitored) { ++ ret = fi_epoll_del(cm_head->emap, handle->sock_fd); ++ if (ret) ++ SOCK_LOG_ERROR("failed to unmonitor fd %d: %d\n", ++ handle->sock_fd, ret); ++ handle->monitored = 0; ++ } ++ ++ /* Multiple threads might call sock_ep_cm_unmonitor_handle() at the ++ * same time. Some caution is required to prevent a socket from being ++ * close concurrently, which could cause an unexpected socket to be ++ * closed by mistake. */ ++ if (close_socket && handle->sock_fd != INVALID_SOCKET) { ++ ofi_close_socket(handle->sock_fd); ++ handle->sock_fd = INVALID_SOCKET; + } ++} ++ ++static void sock_ep_cm_unmonitor_handle(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle, ++ int close_socket) ++{ ++ fastlock_acquire(&cm_head->signal_lock); ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, close_socket); ++ fastlock_release(&cm_head->signal_lock); ++} ++ ++static void sock_ep_cm_shutdown_report(struct sock_ep *ep, int send_shutdown) ++{ ++ struct fi_eq_cm_entry cm_entry = {0}; ++ struct sock_conn_hdr msg = {0}; ++ enum sock_cm_state old_state; + + fastlock_acquire(&ep->attr->cm.lock); +- if (ep->attr->cm.is_connected) { +- do_report = 1; +- ep->attr->cm.is_connected = 0; ++ old_state = ep->attr->cm.state; ++ switch (ep->attr->cm.state) { ++ case SOCK_CM_STATE_REQUESTED: ++ /* fallthrough */ ++ case SOCK_CM_STATE_CONNECTED: ++ ep->attr->cm.state = SOCK_CM_STATE_DISCONNECTED; ++ break; ++ case SOCK_CM_STATE_DISCONNECTED: ++ /* Nothing to do, already disconnected */ ++ break; ++ default: ++ assert(0); ++ break; + } + fastlock_release(&ep->attr->cm.lock); + +- if (do_report) { ++ switch (old_state) { ++ case SOCK_CM_STATE_CONNECTED: ++ if (send_shutdown) { ++ msg.type = SOCK_CONN_SHUTDOWN; ++ if (sock_cm_send(ep->attr->cm.sock, &msg, sizeof(msg))) ++ SOCK_LOG_DBG("failed to send shutdown msg\n"); ++ } ++ + cm_entry.fid = &ep->ep.fid; + SOCK_LOG_DBG("reporting FI_SHUTDOWN\n"); + if (sock_eq_report_event(ep->attr->eq, FI_SHUTDOWN, + &cm_entry, sizeof(cm_entry), 0)) + SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ break; ++ case SOCK_CM_STATE_REQUESTED: ++ SOCK_LOG_DBG("reporting FI_REJECT\n"); ++ if (sock_eq_report_error(ep->attr->eq, &ep->ep.fid, NULL, 0, ++ FI_ECONNREFUSED, -FI_ECONNREFUSED, ++ NULL, 0)) ++ SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ break; ++ ++ case SOCK_CM_STATE_DISCONNECTED: ++ /* Nothing to do, already disconnected */ ++ break; ++ default: ++ assert(0); ++ break; + } +- ofi_close_socket(ep->attr->cm.sock); ++} ++ ++static void sock_ep_cm_shutdown_handler(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_hdr *hdr, ++ struct sock_conn_req_handle *handle) ++{ ++ struct sock_ep *ep = handle->ep; ++ assert(ep); ++ ++ assert(hdr->type == SOCK_CONN_SHUTDOWN); ++ sock_ep_cm_shutdown_report(ep, 0); ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 1); + } + + static void sock_ep_cm_report_connect_fail(struct sock_ep *ep, + void *param, size_t paramlen) + { +- SOCK_LOG_DBG("reporting FI_REJECT\n"); +- if (sock_eq_report_error(ep->attr->eq, &ep->ep.fid, NULL, 0, +- FI_ECONNREFUSED, -FI_ECONNREFUSED, +- param, paramlen)) +- SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ int do_report = 0; ++ ++ fastlock_acquire(&ep->attr->cm.lock); ++ if (ep->attr->cm.state == SOCK_CM_STATE_REQUESTED) { ++ do_report = 1; ++ ep->attr->cm.state = SOCK_CM_STATE_DISCONNECTED; ++ } ++ fastlock_release(&ep->attr->cm.lock); ++ ++ if (do_report) { ++ SOCK_LOG_DBG("reporting FI_REJECT\n"); ++ if (sock_eq_report_error(ep->attr->eq, &ep->ep.fid, NULL, 0, ++ FI_ECONNREFUSED, -FI_ECONNREFUSED, ++ param, paramlen)) ++ SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ } + } + +-static void *sock_ep_cm_connect_handler(void *data) ++/* Caller must hold `cm_head::signal_lock` */ ++static void sock_ep_cm_add_to_msg_list(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle) + { +- int sock_fd, ret; +- struct sock_conn_req_handle *handle = data; +- struct sock_conn_req *req = handle->req; +- struct sock_conn_hdr response; ++ dlist_insert_tail(&handle->entry, &cm_head->msg_list); ++ fd_signal_set(&cm_head->signal); ++} ++ ++static void sock_ep_cm_connect_handler(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_hdr *hdr, ++ struct sock_conn_req_handle *handle) ++{ ++ int sock_fd = handle->sock_fd; + struct sock_ep *ep = handle->ep; + void *param = NULL; + struct fi_eq_cm_entry *cm_entry = NULL; + int cm_data_sz, response_port; + +- sock_fd = ofi_socket(AF_INET, SOCK_STREAM, 0); +- if (sock_fd < 0) { +- SOCK_LOG_ERROR("no socket\n"); +- sock_ep_cm_report_connect_fail(handle->ep, NULL, 0); +- goto out; +- } +- +- ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "Connecting to address", +- &handle->dest_addr); +- sock_set_sockopts(sock_fd, SOCK_OPTS_KEEPALIVE); +- ret = connect(sock_fd, (struct sockaddr *)&handle->dest_addr, +- sizeof(handle->dest_addr)); +- if (ret < 0) { +- SOCK_LOG_ERROR("connect failed : %s\n", +- strerror(ofi_sockerr())); +- goto err; +- } +- +- if (sock_cm_send(sock_fd, req, sizeof(*req))) +- goto err; +- if (handle->paramlen && sock_cm_send(sock_fd, handle->cm_data, handle->paramlen)) +- goto err; +- +- if (sock_cm_recv(sock_fd, &response, sizeof(response))) +- goto err; ++ assert(hdr->type == SOCK_CONN_ACCEPT ++ || hdr->type == SOCK_CONN_REJECT); + +- cm_data_sz = ntohs(response.cm_data_sz); +- response_port = ntohs(response.port); ++ cm_data_sz = ntohs(hdr->cm_data_sz); ++ response_port = ntohs(hdr->port); + if (cm_data_sz) { + param = calloc(1, cm_data_sz); + if (!param) +@@ -540,9 +584,9 @@ static void *sock_ep_cm_connect_handler(void *data) + goto err; + } + +- if (response.type == SOCK_CONN_REJECT) { ++ if (hdr->type == SOCK_CONN_REJECT) { + sock_ep_cm_report_connect_fail(handle->ep, param, cm_data_sz); +- ofi_close_socket(sock_fd); ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 1); + } else { + cm_entry = calloc(1, sizeof(*cm_entry) + SOCK_EP_MAX_CM_DATA_SZ); + if (!cm_entry) +@@ -550,8 +594,7 @@ static void *sock_ep_cm_connect_handler(void *data) + + cm_entry->fid = &ep->ep.fid; + memcpy(&cm_entry->data, param, cm_data_sz); +- ep->attr->cm.is_connected = 1; +- ep->attr->cm.do_listen = 1; ++ ep->attr->cm.state = SOCK_CM_STATE_CONNECTED; + ep->attr->cm.sock = sock_fd; + ep->attr->msg_dest_port = response_port; + SOCK_LOG_DBG("got accept - port: %d\n", response_port); +@@ -560,26 +603,43 @@ static void *sock_ep_cm_connect_handler(void *data) + if (sock_eq_report_event(ep->attr->eq, FI_CONNECTED, cm_entry, + sizeof(*cm_entry) + cm_data_sz, 0)) + SOCK_LOG_ERROR("Error in writing to EQ\n"); +- sock_ep_wait_shutdown(ep); + } + goto out; + err: + SOCK_LOG_ERROR("io failed : %s\n", strerror(ofi_sockerr())); + sock_ep_cm_report_connect_fail(handle->ep, NULL, 0); +- ofi_close_socket(sock_fd); ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 1); ++ handle->ep->attr->info.handle = NULL; ++ /* Register handle for later deletion */ ++ handle->state = SOCK_CONN_HANDLE_DELETED; ++ fastlock_acquire(&cm_head->signal_lock); ++ sock_ep_cm_add_to_msg_list(cm_head, handle); ++ fastlock_release(&cm_head->signal_lock); + out: + free(param); + free(cm_entry); +- free(handle->req); +- free(handle); +- return NULL; ++} ++ ++static struct sock_conn_req_handle *sock_ep_cm_new_handle(void) ++{ ++ struct sock_conn_req_handle *handle; ++ ++ handle = calloc(1, sizeof(*handle)); ++ if (handle) { ++ pthread_mutex_init(&handle->finalized_mutex, NULL); ++ pthread_cond_init(&handle->finalized_cond, NULL); ++ handle->state = SOCK_CONN_HANDLE_ACTIVE; ++ } ++ return handle; + } + + static int sock_ep_cm_connect(struct fid_ep *ep, const void *addr, + const void *param, size_t paramlen) + { + struct sock_conn_req *req = NULL; ++ struct sock_ep_cm_head *cm_head = NULL; + struct sock_conn_req_handle *handle = NULL; ++ int sock_fd, ret; + struct sock_ep *_ep; + struct sock_eq *_eq; + +@@ -596,23 +656,28 @@ static int sock_ep_cm_connect(struct fid_ep *ep, const void *addr, + if (!_ep->attr->dest_addr) + return -FI_ENOMEM; + } +- memcpy(_ep->attr->dest_addr, addr, sizeof(*_ep->attr->dest_addr)); ++ memcpy(_ep->attr->dest_addr, addr, ofi_sizeofaddr(addr)); + + req = calloc(1, sizeof(*req)); + if (!req) + return -FI_ENOMEM; + +- handle = calloc(1, sizeof(*handle)); +- if (!handle) +- goto out; ++ handle = sock_ep_cm_new_handle(); ++ if (!handle) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } + + req->hdr.type = SOCK_CONN_REQ; + req->hdr.port = htons(_ep->attr->msg_src_port); + req->hdr.cm_data_sz = htons(paramlen); + req->caps = _ep->attr->info.caps; +- memcpy(&req->src_addr, _ep->attr->src_addr, sizeof(req->src_addr)); +- memcpy(&handle->dest_addr, addr, sizeof(handle->dest_addr)); ++ memcpy(&req->src_addr, _ep->attr->src_addr, ++ ofi_sizeofaddr(&_ep->attr->src_addr->sa)); ++ memcpy(&handle->dest_addr, addr, ofi_sizeofaddr(addr)); + ++ cm_head = &_ep->attr->domain->cm_head; ++ _ep->attr->info.handle = (void*) handle; + handle->ep = _ep; + handle->req = req; + if (paramlen) { +@@ -620,67 +685,59 @@ static int sock_ep_cm_connect(struct fid_ep *ep, const void *addr, + memcpy(handle->cm_data, param, paramlen); + } + +- if (_ep->attr->cm.listener_thread && +- pthread_join(_ep->attr->cm.listener_thread, NULL)) +- SOCK_LOG_DBG("failed to join cm listener\n"); +- +- if (pthread_create(&_ep->attr->cm.listener_thread, NULL, +- sock_ep_cm_connect_handler, handle)) { +- SOCK_LOG_ERROR("failed to create cm thread\n"); +- goto out; ++ sock_fd = ofi_socket(handle->dest_addr.sa.sa_family, SOCK_STREAM, 0); ++ if (sock_fd < 0) { ++ SOCK_LOG_ERROR("no socket\n"); ++ ret = -ofi_sockerr(); ++ goto err; + } +- return 0; +-out: +- free(req); +- free(handle); +- return -FI_ENOMEM; +-} +- +-static void *sock_cm_accept_handler(void *data) +-{ +- int ret; +- struct sock_conn_hdr reply; +- struct sock_conn_req_handle *hreq = data; +- struct sock_ep_attr *ep_attr; +- struct fi_eq_cm_entry cm_entry; +- +- ep_attr = hreq->ep->attr; +- ep_attr->msg_dest_port = ntohs(hreq->req->hdr.port); + +- reply.type = SOCK_CONN_ACCEPT; +- reply.port = htons(ep_attr->msg_src_port); +- reply.cm_data_sz = htons(hreq->paramlen); +- ret = sock_cm_send(hreq->sock_fd, &reply, sizeof(reply)); +- if (ret) { +- SOCK_LOG_ERROR("failed to reply\n"); +- return NULL; ++ ofi_straddr_dbg(&sock_prov, FI_LOG_EP_CTRL, "Connecting to address", ++ &handle->dest_addr); ++ sock_set_sockopts(sock_fd, SOCK_OPTS_KEEPALIVE); ++ ret = connect(sock_fd, &handle->dest_addr.sa, ++ ofi_sizeofaddr(&handle->dest_addr.sa)); ++ if (ret < 0) { ++ SOCK_LOG_ERROR("connect failed : %s\n", ++ strerror(ofi_sockerr())); ++ ret = -ofi_sockerr(); ++ goto close_socket; + } + +- if (hreq->paramlen && sock_cm_send(hreq->sock_fd, hreq->cm_data, hreq->paramlen)) { +- SOCK_LOG_ERROR("failed to send userdata\n"); +- return NULL; ++ ret = sock_cm_send(sock_fd, req, sizeof(*req)); ++ if (ret) ++ goto close_socket; ++ ++ if (handle->paramlen) { ++ ret = sock_cm_send(sock_fd, handle->cm_data, handle->paramlen); ++ if (ret) ++ goto close_socket; + } + +- cm_entry.fid = &hreq->ep->ep.fid; +- SOCK_LOG_DBG("reporting FI_CONNECTED\n"); +- if (sock_eq_report_event(ep_attr->eq, FI_CONNECTED, &cm_entry, +- sizeof(cm_entry), 0)) +- SOCK_LOG_ERROR("Error in writing to EQ\n"); +- ep_attr->cm.is_connected = 1; +- ep_attr->cm.do_listen = 1; +- ep_attr->cm.sock = hreq->sock_fd; +- sock_ep_wait_shutdown(hreq->ep); ++ /* Monitor the connection */ ++ _ep->attr->cm.state = SOCK_CM_STATE_REQUESTED; ++ handle->sock_fd = sock_fd; ++ sock_ep_cm_monitor_handle(cm_head, handle, FI_EPOLL_IN); + +- if (pthread_join(hreq->req_handler, NULL)) +- SOCK_LOG_DBG("failed to join req-handler\n"); +- free(hreq->req); +- free(hreq); +- return NULL; ++ return 0; ++close_socket: ++ SOCK_LOG_ERROR("io failed : %s\n", strerror(errno)); ++ ofi_close_socket(sock_fd); ++err: ++ _ep->attr->info.handle = NULL; ++ free(req); ++ free(handle); ++ return ret; + } + + static int sock_ep_cm_accept(struct fid_ep *ep, const void *param, size_t paramlen) + { ++ int ret; ++ struct sock_ep_cm_head *cm_head = NULL; + struct sock_conn_req_handle *handle; ++ struct sock_ep_attr *ep_attr; ++ struct fi_eq_cm_entry cm_entry; ++ struct sock_conn_hdr reply; + struct sock_ep *_ep; + + _ep = container_of(ep, struct sock_ep, ep); +@@ -699,49 +756,55 @@ static int sock_ep_cm_accept(struct fid_ep *ep, const void *param, size_t paraml + + handle->ep = _ep; + handle->paramlen = 0; +- handle->is_accepted = 1; ++ handle->state = SOCK_CONN_HANDLE_ACCEPTED; + if (paramlen) { + handle->paramlen = paramlen; + memcpy(handle->cm_data, param, paramlen); + } ++ cm_head = &_ep->attr->domain->cm_head; ++ ep_attr = handle->ep->attr; ++ ep_attr->msg_dest_port = ntohs(handle->req->hdr.port); + +- if (_ep->attr->cm.listener_thread && +- pthread_join(_ep->attr->cm.listener_thread, NULL)) +- SOCK_LOG_DBG("failed to join cm listener\n"); ++ reply.type = SOCK_CONN_ACCEPT; ++ reply.port = htons(ep_attr->msg_src_port); ++ reply.cm_data_sz = htons(handle->paramlen); ++ ret = sock_cm_send(handle->sock_fd, &reply, sizeof(reply)); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to reply\n"); ++ return ret; ++ } + +- if (pthread_create(&_ep->attr->cm.listener_thread, NULL, +- sock_cm_accept_handler, handle)) { +- SOCK_LOG_ERROR("Couldnt create accept handler\n"); +- return -FI_ENOMEM; ++ if (handle->paramlen) { ++ ret = sock_cm_send(handle->sock_fd, handle->cm_data, handle->paramlen); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to send userdata\n"); ++ return ret; ++ } + } ++ /* Monitor the handle prior to report the event */ ++ sock_ep_cm_monitor_handle(cm_head, handle, FI_EPOLL_IN); ++ sock_ep_enable(ep); ++ ++ cm_entry.fid = &handle->ep->ep.fid; ++ SOCK_LOG_DBG("reporting FI_CONNECTED\n"); ++ if (sock_eq_report_event(ep_attr->eq, FI_CONNECTED, &cm_entry, ++ sizeof(cm_entry), 0)) ++ SOCK_LOG_ERROR("Error in writing to EQ\n"); ++ ep_attr->cm.state = SOCK_CM_STATE_CONNECTED; ++ ep_attr->cm.sock = handle->sock_fd; ++ + return 0; + } + + static int sock_ep_cm_shutdown(struct fid_ep *ep, uint64_t flags) + { + struct sock_ep *_ep; +- struct fi_eq_cm_entry cm_entry = {0}; +- struct sock_conn_hdr msg = {0}; +- char c = 0; + + _ep = container_of(ep, struct sock_ep, ep); +- fastlock_acquire(&_ep->attr->cm.lock); +- if (_ep->attr->cm.is_connected) { +- msg.type = SOCK_CONN_SHUTDOWN; +- if (sock_cm_send(_ep->attr->cm.sock, &msg, sizeof(msg))) +- SOCK_LOG_DBG("failed to send shutdown msg\n"); +- _ep->attr->cm.is_connected = 0; +- _ep->attr->cm.do_listen = 0; +- if (ofi_write_socket(_ep->attr->cm.signal_fds[0], &c, 1) != 1) +- SOCK_LOG_DBG("Failed to signal\n"); +- +- cm_entry.fid = &_ep->ep.fid; +- SOCK_LOG_DBG("reporting FI_SHUTDOWN\n"); +- if (sock_eq_report_event(_ep->attr->eq, FI_SHUTDOWN, +- &cm_entry, sizeof(cm_entry), 0)) +- SOCK_LOG_ERROR("Error in writing to EQ\n"); +- } +- fastlock_release(&_ep->attr->cm.lock); ++ sock_ep_cm_shutdown_report(_ep, 1); ++ ++ ofi_close_socket(_ep->attr->cm.sock); ++ _ep->attr->cm.sock = INVALID_SOCKET; + sock_ep_disable(ep); + return 0; + } +@@ -858,9 +921,10 @@ static int sock_pep_fi_close(fid_t fid) + SOCK_LOG_DBG("pthread join failed\n"); + } + ++ sock_ep_cm_stop_thread(&pep->cm_head); ++ + ofi_close_socket(pep->cm.signal_fds[0]); + ofi_close_socket(pep->cm.signal_fds[1]); +- fastlock_destroy(&pep->cm.lock); + + free(pep); + return 0; +@@ -893,15 +957,107 @@ static struct fi_info *sock_ep_msg_get_info(struct sock_pep *pep, + &hints, &pep->src_addr, &req->src_addr); + } + +-static void *sock_pep_req_handler(void *data) ++void sock_ep_cm_signal(struct sock_ep_cm_head *cm_head) ++{ ++ fastlock_acquire(&cm_head->signal_lock); ++ fd_signal_set(&cm_head->signal); ++ fastlock_release(&cm_head->signal_lock); ++} ++ ++static void sock_ep_cm_process_rejected(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *hreq) ++{ ++ struct sock_conn_hdr reply; ++ ++ reply.type = SOCK_CONN_REJECT; ++ reply.cm_data_sz = htons(hreq->paramlen); ++ ++ SOCK_LOG_DBG("sending reject message\n"); ++ if (sock_cm_send(hreq->sock_fd, &reply, sizeof(reply))) { ++ SOCK_LOG_ERROR("failed to reply\n"); ++ goto free_handle; ++ } ++ ++ if (hreq->paramlen && sock_cm_send(hreq->sock_fd, hreq->cm_data, ++ hreq->paramlen)) { ++ SOCK_LOG_ERROR("failed to send userdata\n"); ++ goto free_handle; ++ } ++ ++free_handle: ++ sock_ep_cm_unmonitor_handle(cm_head, hreq, 1); ++ free(hreq->req); ++ free(hreq); ++} ++ ++static void sock_ep_cm_process_deleted(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *hreq) ++{ ++ free(hreq->req); ++ free(hreq); ++} ++ ++static void sock_ep_cm_process_finalizing(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *hreq) ++{ ++ sock_ep_cm_unmonitor_handle(cm_head, hreq, 1); ++ ++ pthread_mutex_lock(&hreq->finalized_mutex); ++ hreq->state = SOCK_CONN_HANDLE_FINALIZED; ++ pthread_cond_signal(&hreq->finalized_cond); ++ pthread_mutex_unlock(&hreq->finalized_mutex); ++} ++ ++static struct sock_conn_req_handle * ++sock_ep_cm_pop_from_msg_list(struct sock_ep_cm_head *cm_head) ++{ ++ struct dlist_entry *entry; ++ struct sock_conn_req_handle *hreq = NULL; ++ ++ fastlock_acquire(&cm_head->signal_lock); ++ if (!dlist_empty(&cm_head->msg_list)) { ++ entry = cm_head->msg_list.next; ++ dlist_remove(entry); ++ hreq = container_of(entry, struct sock_conn_req_handle, entry); ++ } ++ fastlock_release(&cm_head->signal_lock); ++ return hreq; ++} ++ ++static void ++sock_ep_cm_check_closing_rejected_list(struct sock_ep_cm_head *cm_head) ++{ ++ struct sock_conn_req_handle *hreq; ++ ++ while ((hreq = sock_ep_cm_pop_from_msg_list(cm_head)) != NULL) { ++ switch (hreq->state) { ++ case SOCK_CONN_HANDLE_REJECTED: ++ sock_ep_cm_process_rejected(cm_head, hreq); ++ break; ++ case SOCK_CONN_HANDLE_FINALIZING: ++ sock_ep_cm_process_finalizing(cm_head, hreq); ++ break; ++ case SOCK_CONN_HANDLE_DELETED: ++ sock_ep_cm_process_deleted(cm_head, hreq); ++ break; ++ default: ++ assert(0); ++ break; ++ } ++ } ++} ++ ++static void sock_pep_req_handler(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_hdr *hdr, ++ struct sock_conn_req_handle *handle) + { + int ret, entry_sz; + struct fi_info *info; + struct sock_conn_req *conn_req = NULL; + struct fi_eq_cm_entry *cm_entry = NULL; +- struct sock_conn_req_handle *handle = data; + int req_cm_data_sz; +- char c = 0; ++ ++ assert(hdr->type == SOCK_CONN_REQ); + + conn_req = calloc(1, sizeof(*conn_req) + SOCK_EP_MAX_CM_DATA_SZ); + if (!conn_req) { +@@ -909,7 +1065,11 @@ static void *sock_pep_req_handler(void *data) + goto err; + } + +- ret = sock_cm_recv(handle->sock_fd, conn_req, sizeof(*conn_req)); ++ memcpy(&conn_req->hdr, hdr, sizeof(*hdr)); ++ ++ ret = sock_cm_recv(handle->sock_fd, ++ &conn_req->src_addr, ++ sizeof(*conn_req) - sizeof(struct sock_conn_hdr)); + if (ret) { + SOCK_LOG_ERROR("IO failed\n"); + goto err; +@@ -926,16 +1086,15 @@ static void *sock_pep_req_handler(void *data) + } + + info = sock_ep_msg_get_info(handle->pep, conn_req); +- if (info == NULL) { ++ if (!info) { + handle->paramlen = 0; +- fastlock_acquire(&handle->pep->cm.lock); +- dlist_insert_tail(&handle->entry, &handle->pep->cm.msg_list); +- fastlock_release(&handle->pep->cm.lock); ++ handle->state = SOCK_CONN_HANDLE_REJECTED; ++ /* `cm_head::signal_lock` has already been held ++ * in `sock_ep_cm_thread` function */ ++ sock_ep_cm_add_to_msg_list(cm_head, handle); + +- if (ofi_write_socket(handle->pep->cm.signal_fds[0], &c, 1) != 1) +- SOCK_LOG_DBG("Failed to signal\n"); + free(conn_req); +- return NULL; ++ return; + } + + cm_entry = calloc(1, sizeof(*cm_entry) + req_cm_data_sz); +@@ -953,54 +1112,19 @@ static void *sock_pep_req_handler(void *data) + cm_entry->info->handle = &handle->handle; + memcpy(cm_entry->data, conn_req->cm_data, req_cm_data_sz); + ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 0); ++ + SOCK_LOG_DBG("reporting conn-req to EQ\n"); + if (sock_eq_report_event(handle->pep->eq, FI_CONNREQ, cm_entry, entry_sz, 0)) + SOCK_LOG_ERROR("Error in writing to EQ\n"); + + free(cm_entry); +- return NULL; ++ return; + err: + ofi_close_socket(handle->sock_fd); + free(cm_entry); + free(conn_req); + free(handle); +- return NULL; +-} +- +-static void sock_pep_check_msg_list(struct sock_pep *pep) +-{ +- struct dlist_entry *entry; +- struct sock_conn_req_handle *hreq; +- struct sock_conn_hdr reply; +- +- fastlock_acquire(&pep->cm.lock); +- while (!dlist_empty(&pep->cm.msg_list)) { +- entry = pep->cm.msg_list.next; +- dlist_remove(entry); +- hreq = container_of(entry, struct sock_conn_req_handle, entry); +- +- reply.type = SOCK_CONN_REJECT; +- reply.cm_data_sz = htons(hreq->paramlen); +- +- SOCK_LOG_DBG("sending reject message\n"); +- if (sock_cm_send(hreq->sock_fd, &reply, sizeof(reply))) { +- SOCK_LOG_ERROR("failed to reply\n"); +- break; +- } +- +- if (hreq->paramlen && sock_cm_send(hreq->sock_fd, hreq->cm_data, +- hreq->paramlen)) { +- SOCK_LOG_ERROR("failed to send userdata\n"); +- break; +- } +- +- if (pthread_join(hreq->req_handler, NULL)) +- SOCK_LOG_DBG("failed to join req-handler\n"); +- ofi_close_socket(hreq->sock_fd); +- free(hreq->req); +- free(hreq); +- } +- fastlock_release(&pep->cm.lock); + } + + static void *sock_pep_listener_thread(void *data) +@@ -1023,7 +1147,6 @@ static void *sock_pep_listener_thread(void *data) + ret = ofi_read_socket(pep->cm.signal_fds[1], &tmp, 1); + if (ret != 1) + SOCK_LOG_DBG("Invalid signal\n"); +- sock_pep_check_msg_list(pep); + continue; + } + } else { +@@ -1037,7 +1160,7 @@ static void *sock_pep_listener_thread(void *data) + } + + sock_set_sockopts(conn_fd, SOCK_OPTS_KEEPALIVE); +- handle = calloc(1, sizeof(*handle)); ++ handle = sock_ep_cm_new_handle(); + if (!handle) { + SOCK_LOG_ERROR("cannot allocate memory\n"); + ofi_close_socket(conn_fd); +@@ -1047,12 +1170,8 @@ static void *sock_pep_listener_thread(void *data) + handle->sock_fd = conn_fd; + handle->pep = pep; + +- if (pthread_create(&handle->req_handler, NULL, +- sock_pep_req_handler, handle)) { +- SOCK_LOG_ERROR("failed to create req handler\n"); +- ofi_close_socket(conn_fd); +- free(handle); +- } ++ /* Monitor the connection */ ++ sock_ep_cm_monitor_handle(&pep->cm_head, handle, FI_EPOLL_IN); + } + + SOCK_LOG_DBG("PEP listener thread exiting\n"); +@@ -1077,6 +1196,11 @@ static int sock_pep_listen(struct fid_pep *pep) + if (_pep->cm.listener_thread) + return 0; + ++ if (sock_ep_cm_start_thread(&_pep->cm_head)) { ++ SOCK_LOG_ERROR("Couldn't create listener thread\n"); ++ return -FI_EINVAL; ++ } ++ + if (!_pep->cm.do_listen && sock_pep_create_listener(_pep)) { + SOCK_LOG_ERROR("Failed to create pep thread\n"); + return -FI_EINVAL; +@@ -1091,12 +1215,13 @@ static int sock_pep_reject(struct fid_pep *pep, fid_t handle, + struct sock_conn_req_handle *hreq; + struct sock_conn_req *req; + struct sock_pep *_pep; +- char c = 0; ++ struct sock_ep_cm_head *cm_head; + + _pep = container_of(pep, struct sock_pep, pep); + hreq = container_of(handle, struct sock_conn_req_handle, handle); + req = hreq->req; +- if (!req || hreq->handle.fclass != FI_CLASS_CONNREQ || hreq->is_accepted) ++ if (!req || hreq->handle.fclass != FI_CLASS_CONNREQ || ++ hreq->state == SOCK_CONN_HANDLE_ACCEPTED) + return -FI_EINVAL; + + hreq->paramlen = 0; +@@ -1105,12 +1230,11 @@ static int sock_pep_reject(struct fid_pep *pep, fid_t handle, + hreq->paramlen = paramlen; + } + +- fastlock_acquire(&_pep->cm.lock); +- dlist_insert_tail(&hreq->entry, &_pep->cm.msg_list); +- fastlock_release(&_pep->cm.lock); +- +- if (ofi_write_socket(_pep->cm.signal_fds[0], &c, 1) != 1) +- SOCK_LOG_DBG("Failed to signal\n"); ++ cm_head = &_pep->cm_head; ++ hreq->state = SOCK_CONN_HANDLE_REJECTED; ++ fastlock_acquire(&cm_head->signal_lock); ++ sock_ep_cm_add_to_msg_list(cm_head, hreq); ++ fastlock_release(&cm_head->signal_lock); + return 0; + } + +@@ -1192,10 +1316,20 @@ int sock_msg_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + info->src_addrlen); + } else { + memset(&hints, 0, sizeof(hints)); +- hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; +- +- ret = getaddrinfo("localhost", NULL, &hints, &result); ++ hints.ai_family = ofi_get_sa_family(info); ++ if (!hints.ai_family) ++ hints.ai_family = AF_INET; ++ ++ if (hints.ai_family == AF_INET) { ++ ret = getaddrinfo("127.0.0.1", NULL, &hints, ++ &result); ++ } else if (hints.ai_family == AF_INET6) { ++ ret = getaddrinfo("::1", NULL, &hints, &result); ++ } else { ++ ret = getaddrinfo("localhost", NULL, &hints, ++ &result); ++ } + if (ret) { + ret = -FI_EINVAL; + SOCK_LOG_DBG("getaddrinfo failed!\n"); +@@ -1218,14 +1352,12 @@ int sock_msg_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + } + + fd_set_nonblock(_pep->cm.signal_fds[1]); +- dlist_init(&_pep->cm.msg_list); + + _pep->pep.fid.fclass = FI_CLASS_PEP; + _pep->pep.fid.context = context; + _pep->pep.fid.ops = &sock_pep_fi_ops; + _pep->pep.cm = &sock_pep_cm_ops; + _pep->pep.ops = &sock_pep_ops; +- fastlock_init(&_pep->cm.lock); + + _pep->sock_fab = container_of(fabric, struct sock_fabric, fab_fid); + *pep = &_pep->pep; +@@ -1235,3 +1367,158 @@ err: + return ret; + } + ++static void sock_ep_cm_handle_rx(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle) ++{ ++ struct sock_conn_hdr hdr; ++ ++ if (sock_cm_recv(handle->sock_fd, &hdr, sizeof(hdr))) { ++ SOCK_LOG_ERROR("io failed for fd %d\n", handle->sock_fd); ++ if (handle->ep) { ++ sock_ep_cm_shutdown_report(handle->ep, 0); ++ } ++ ++ sock_ep_cm_unmonitor_handle_locked(cm_head, handle, 1); ++ return; ++ } ++ ++ switch(hdr.type) { ++ case SOCK_CONN_REQ: ++ sock_pep_req_handler(cm_head, &hdr, handle); ++ break; ++ case SOCK_CONN_ACCEPT: ++ case SOCK_CONN_REJECT: ++ sock_ep_cm_connect_handler(cm_head, &hdr, handle); ++ break; ++ case SOCK_CONN_SHUTDOWN: ++ sock_ep_cm_shutdown_handler(cm_head, &hdr, handle); ++ break; ++ default: ++ SOCK_LOG_ERROR("Unexpected message type %d\n", hdr.type); ++ break; ++ } ++} ++ ++static void *sock_ep_cm_thread(void *arg) ++{ ++ int num_fds, i; ++ struct sock_ep_cm_head *cm_head = arg; ++ void *ep_contexts[SOCK_EPOLL_WAIT_EVENTS]; ++ struct sock_conn_req_handle *handle; ++ ++ while (cm_head->do_listen) { ++ sock_ep_cm_check_closing_rejected_list(cm_head); ++ ++ num_fds = fi_epoll_wait(cm_head->emap, ep_contexts, ++ SOCK_EPOLL_WAIT_EVENTS, -1); ++ if (num_fds < 0) { ++ SOCK_LOG_ERROR("poll failed : %s\n", strerror(errno)); ++ continue; ++ } ++ ++ fastlock_acquire(&cm_head->signal_lock); ++ for (i = 0; i < num_fds; i++) { ++ handle = ep_contexts[i]; ++ ++ if (handle == NULL) { /* Signal event */ ++ fd_signal_reset(&cm_head->signal); ++ continue; ++ } ++ ++ /* ep_contexts[] may report multiple events for the same handle. ++ * Suppose we received 2 elements for 1 handle: the first will ++ * unmonitor the handle, then the second event will have ++ * handle->monitored set to 0 ++ */ ++ if (!handle->monitored) { ++ assert(handle->sock_fd == INVALID_SOCKET); ++ continue; ++ } ++ ++ assert(handle->sock_fd != INVALID_SOCKET); ++ sock_ep_cm_handle_rx(cm_head, handle); ++ } ++ fastlock_release(&cm_head->signal_lock); ++ } ++ return NULL; ++} ++ ++ ++int sock_ep_cm_start_thread(struct sock_ep_cm_head *cm_head) ++{ ++ assert(cm_head->do_listen == 0); ++ ++ fastlock_init(&cm_head->signal_lock); ++ dlist_init(&cm_head->msg_list); ++ ++ int ret = fi_epoll_create(&cm_head->emap); ++ if (ret < 0) { ++ SOCK_LOG_ERROR("failed to create epoll set\n"); ++ goto err1; ++ } ++ ++ ret = fd_signal_init(&cm_head->signal); ++ if (ret < 0) { ++ ret = -errno; ++ SOCK_LOG_ERROR("failed to init signal\n"); ++ goto err2; ++ } ++ ++ ret = fi_epoll_add(cm_head->emap, ++ cm_head->signal.fd[FI_READ_FD], ++ FI_EPOLL_IN, NULL); ++ if (ret != 0){ ++ SOCK_LOG_ERROR("failed to add signal fd to epoll\n"); ++ goto err3; ++ } ++ ++ cm_head->do_listen = 1; ++ ret = pthread_create(&cm_head->listener_thread, 0, ++ sock_ep_cm_thread, cm_head); ++ if (ret) { ++ SOCK_LOG_ERROR("failed to create conn listener thread\n"); ++ goto err3; ++ } ++ return 0; ++ ++err3: ++ cm_head->do_listen = 0; ++ fd_signal_free(&cm_head->signal); ++err2: ++ fi_epoll_close(cm_head->emap); ++err1: ++ return ret; ++} ++ ++void sock_ep_cm_wait_handle_finalized(struct sock_ep_cm_head *cm_head, ++ struct sock_conn_req_handle *handle) ++{ ++ handle->state = SOCK_CONN_HANDLE_FINALIZING; ++ fastlock_acquire(&cm_head->signal_lock); ++ sock_ep_cm_add_to_msg_list(cm_head, handle); ++ fastlock_release(&cm_head->signal_lock); ++ ++ pthread_mutex_lock(&handle->finalized_mutex); ++ while (handle->state != SOCK_CONN_HANDLE_FINALIZED) ++ fi_wait_cond(&handle->finalized_cond, ++ &handle->finalized_mutex, -1); ++ pthread_mutex_unlock(&handle->finalized_mutex); ++} ++ ++void sock_ep_cm_stop_thread(struct sock_ep_cm_head *cm_head) ++{ ++ if (cm_head->do_listen == 0) ++ return; ++ ++ cm_head->do_listen = 0; ++ ++ sock_ep_cm_signal(cm_head); ++ ++ if (cm_head->listener_thread && ++ pthread_join(cm_head->listener_thread, NULL)) { ++ SOCK_LOG_DBG("pthread join failed\n"); ++ } ++ fi_epoll_close(cm_head->emap); ++ fd_signal_free(&cm_head->signal); ++ fastlock_destroy(&cm_head->signal_lock); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_fabric.c +index f99eaa37a..ba991b374 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_fabric.c +@@ -60,6 +60,7 @@ int sock_pe_waittime = SOCK_PE_WAITTIME; + const char sock_fab_name[] = "IP"; + const char sock_dom_name[] = "sockets"; + const char sock_prov_name[] = "sockets"; ++int sock_conn_timeout = SOCK_CM_DEF_TIMEOUT; + int sock_conn_retry = SOCK_CM_DEF_RETRY; + int sock_cm_def_map_sz = SOCK_CMAP_DEF_SZ; + int sock_av_def_sz = SOCK_AV_DEF_SZ; +@@ -276,6 +277,7 @@ int sock_verify_info(uint32_t version, const struct fi_info *hints) + case FI_FORMAT_UNSPEC: + case FI_SOCKADDR: + case FI_SOCKADDR_IN: ++ case FI_SOCKADDR_IN6: + break; + default: + SOCK_LOG_DBG("Unsupported address format\n"); +@@ -349,6 +351,7 @@ static void sock_read_default_params() + { + if (!read_default_params) { + fi_param_get_int(&sock_prov, "pe_waittime", &sock_pe_waittime); ++ fi_param_get_int(&sock_prov, "conn_timeout", &sock_conn_timeout); + fi_param_get_int(&sock_prov, "max_conn_retry", &sock_conn_retry); + fi_param_get_int(&sock_prov, "def_conn_map_sz", &sock_cm_def_map_sz); + fi_param_get_int(&sock_prov, "def_av_sz", &sock_av_def_sz); +@@ -393,30 +396,32 @@ static int sock_fabric(struct fi_fabric_attr *attr, + return 0; + } + +-int sock_get_src_addr(struct sockaddr_in *dest_addr, +- struct sockaddr_in *src_addr) ++int sock_get_src_addr(union ofi_sock_ip *dest_addr, ++ union ofi_sock_ip *src_addr) + { + int sock, ret; + socklen_t len; + +- sock = ofi_socket(AF_INET, SOCK_DGRAM, 0); ++ sock = ofi_socket(dest_addr->sa.sa_family, SOCK_DGRAM, 0); + if (sock < 0) + return -ofi_sockerr(); + +- len = sizeof(*dest_addr); +- ret = connect(sock, (struct sockaddr *) dest_addr, len); ++ len = ofi_sizeofaddr(&dest_addr->sa); ++ ret = connect(sock, &dest_addr->sa, len); + if (ret) { + SOCK_LOG_DBG("Failed to connect udp socket\n"); +- ret = sock_get_src_addr_from_hostname(src_addr, NULL); ++ ret = sock_get_src_addr_from_hostname(src_addr, NULL, ++ dest_addr->sa.sa_family); + goto out; + } + +- ret = getsockname(sock, (struct sockaddr *) src_addr, &len); +- src_addr->sin_port = 0; ++ ret = getsockname(sock, &src_addr->sa, &len); ++ ofi_addr_set_port(&src_addr->sa, 0); + if (ret) { + SOCK_LOG_DBG("getsockname failed\n"); + ret = -ofi_sockerr(); + } ++ + out: + ofi_close_socket(sock); + return ret; +@@ -442,13 +447,13 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + struct fi_info **info) + { + struct addrinfo ai, *rai = NULL; +- struct sockaddr_in *src_addr = NULL, *dest_addr = NULL; +- struct sockaddr_in sin; ++ union ofi_sock_ip *src_addr = NULL, *dest_addr = NULL; ++ union ofi_sock_ip sip; + int ret; + + memset(&ai, 0, sizeof(ai)); +- ai.ai_family = AF_INET; + ai.ai_socktype = SOCK_STREAM; ++ ai.ai_family = ofi_get_sa_family(hints); + if (flags & FI_NUMERICHOST) + ai.ai_flags |= AI_NUMERICHOST; + +@@ -459,7 +464,7 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + SOCK_LOG_DBG("getaddrinfo failed!\n"); + return -FI_ENODATA; + } +- src_addr = (struct sockaddr_in *) rai->ai_addr; ++ src_addr = (union ofi_sock_ip *) rai->ai_addr; + if (hints && hints->dest_addr) + dest_addr = hints->dest_addr; + } else { +@@ -469,7 +474,7 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + SOCK_LOG_DBG("getaddrinfo failed!\n"); + return -FI_ENODATA; + } +- dest_addr = (struct sockaddr_in *) rai->ai_addr; ++ dest_addr = (union ofi_sock_ip *) rai->ai_addr; + } else if (hints) { + dest_addr = hints->dest_addr; + } +@@ -479,16 +484,19 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + } + + if (dest_addr && !src_addr) { +- ret = sock_get_src_addr(dest_addr, &sin); ++ ret = sock_get_src_addr(dest_addr, &sip); + if (!ret) +- src_addr = &sin; ++ src_addr = &sip; + } + +- if (src_addr) +- SOCK_LOG_DBG("src_addr: %s\n", inet_ntoa(src_addr->sin_addr)); +- if (dest_addr) +- SOCK_LOG_DBG("dest_addr: %s\n", inet_ntoa(dest_addr->sin_addr)); +- ++ if (dest_addr) { ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "dest addr: ", dest_addr); ++ } ++ if (src_addr) { ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "src addr: ", src_addr); ++ } + switch (ep_type) { + case FI_EP_MSG: + ret = sock_msg_fi_info(version, src_addr, dest_addr, hints, info); +@@ -513,14 +521,32 @@ static int sock_ep_getinfo(uint32_t version, const char *node, + return ret; + } + +-void sock_insert_loopback_addr(struct slist *addr_list) ++static void sock_insert_loopback_addr(struct slist *addr_list) + { + struct sock_host_list_entry *addr_entry; + + addr_entry = calloc(1, sizeof(struct sock_host_list_entry)); + if (!addr_entry) + return; +- strncpy(addr_entry->hostname, "127.0.0.1", sizeof(addr_entry->hostname)); ++ ++ addr_entry->ipaddr.sin.sin_family = AF_INET; ++ addr_entry->ipaddr.sin.sin_addr.s_addr = INADDR_LOOPBACK; ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "available addr: ", &addr_entry->ipaddr); ++ ++ strncpy(addr_entry->ipstr, "127.0.0.1", sizeof(addr_entry->ipstr)); ++ slist_insert_tail(&addr_entry->entry, addr_list); ++ ++ addr_entry = calloc(1, sizeof(struct sock_host_list_entry)); ++ if (!addr_entry) ++ return; ++ ++ addr_entry->ipaddr.sin6.sin6_family = AF_INET6; ++ addr_entry->ipaddr.sin6.sin6_addr = in6addr_loopback; ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "available addr: ", &addr_entry->ipaddr); ++ ++ strncpy(addr_entry->ipstr, "::1", sizeof(addr_entry->ipstr)); + slist_insert_tail(&addr_entry->entry, addr_list); + } + +@@ -531,7 +557,7 @@ void sock_get_list_of_addr(struct slist *addr_list) + struct sock_host_list_entry *addr_entry; + struct ifaddrs *ifaddrs, *ifa; + +- fi_param_get_str(&sock_prov, "interface_name", &sock_interface_name); ++ fi_param_get_str(&sock_prov, "iface", &sock_interface_name); + + ret = ofi_getifaddrs(&ifaddrs); + if (!ret) { +@@ -550,9 +576,11 @@ void sock_get_list_of_addr(struct slist *addr_list) + } + } + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { +- if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || +- (ifa->ifa_addr->sa_family != AF_INET) || +- !strcmp(ifa->ifa_name, "lo")) ++ if (ifa->ifa_addr == NULL || ++ !(ifa->ifa_flags & IFF_UP) || ++ (ifa->ifa_flags & IFF_LOOPBACK) || ++ ((ifa->ifa_addr->sa_family != AF_INET) && ++ (ifa->ifa_addr->sa_family != AF_INET6))) + continue; + if (sock_interface_name && + strncmp(sock_interface_name, ifa->ifa_name, +@@ -560,14 +588,21 @@ void sock_get_list_of_addr(struct slist *addr_list) + SOCK_LOG_DBG("Skip (%s) interface\n", ifa->ifa_name); + continue; + } ++ + addr_entry = calloc(1, sizeof(struct sock_host_list_entry)); + if (!addr_entry) + continue; +- ret = getnameinfo(ifa->ifa_addr, sizeof(struct sockaddr_in), +- addr_entry->hostname, sizeof(addr_entry->hostname), +- NULL, 0, NI_NUMERICHOST); +- if (ret) { +- SOCK_LOG_DBG("getnameinfo failed: %d\n", ret); ++ ++ memcpy(&addr_entry->ipaddr, ifa->ifa_addr, ++ ofi_sizeofaddr(ifa->ifa_addr)); ++ ofi_straddr_log(&sock_prov, FI_LOG_INFO, FI_LOG_CORE, ++ "available addr: ", ifa->ifa_addr); ++ ++ if (!inet_ntop(ifa->ifa_addr->sa_family, ++ ofi_get_ipaddr(ifa->ifa_addr), ++ addr_entry->ipstr, ++ sizeof(addr_entry->ipstr))) { ++ SOCK_LOG_DBG("inet_ntop failed: %d\n", errno); + free(addr_entry); + continue; + } +@@ -581,8 +616,48 @@ void sock_get_list_of_addr(struct slist *addr_list) + #elif defined HAVE_MIB_IPADDRTABLE + void sock_get_list_of_addr(struct slist *addr_list) + { +- sock_get_ip_addr_table(addr_list); ++ struct sock_host_list_entry *addr_entry; ++ DWORD i; ++ MIB_IPADDRTABLE _iptbl; ++ MIB_IPADDRTABLE *iptbl = &_iptbl; ++ ULONG ips = 1; ++ ULONG res; ++ ++ res = GetIpAddrTable(iptbl, &ips, 0); ++ if (res == ERROR_INSUFFICIENT_BUFFER) { ++ iptbl = malloc(ips); ++ if (!iptbl) ++ return; ++ ++ res = GetIpAddrTable(iptbl, &ips, 0); ++ } ++ ++ if (res != NO_ERROR) ++ goto out; ++ ++ for (i = 0; i < iptbl->dwNumEntries; i++) { ++ if (iptbl->table[i].dwAddr && ++ (iptbl->table[i].dwAddr != ntohl(INADDR_LOOPBACK))) { ++ addr_entry = calloc(1, sizeof(*addr_entry)); ++ if (!addr_entry) ++ break; ++ ++ addr_entry->ipaddr.sin.sin_family = AF_INET; ++ addr_entry->ipaddr.sin.sin_addr.s_addr = ++ iptbl->table[i].dwAddr; ++ inet_ntop(AF_INET, &iptbl->table[i].dwAddr, ++ addr_entry->ipstr, ++ sizeof(addr_entry->ipstr)); ++ slist_insert_tail(&addr_entry->entry, addr_list); ++ } ++ } ++ ++ // Always add loopback address at the end + sock_insert_loopback_addr(addr_list); ++ ++out: ++ if (iptbl != &_iptbl) ++ free(iptbl); + } + #else + void sock_get_list_of_addr(struct slist *addr_list) +@@ -591,6 +666,14 @@ void sock_get_list_of_addr(struct slist *addr_list) + } + #endif + ++static void sock_init_addrlist(void) ++{ ++ fastlock_acquire(&sock_list_lock); ++ if (slist_empty(&sock_addr_list)) ++ sock_get_list_of_addr(&sock_addr_list); ++ fastlock_release(&sock_list_lock); ++} ++ + int sock_node_getinfo(uint32_t version, const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, struct fi_info **info, + struct fi_info **tail) +@@ -655,28 +738,26 @@ static int sock_match_src_addr(struct slist_entry *entry, const void *src_addr) + struct sock_host_list_entry *host_entry; + host_entry = container_of(entry, struct sock_host_list_entry, entry); + +- return (strcmp(host_entry->hostname, (char *) src_addr) == 0); ++ return ofi_equals_ipaddr(&host_entry->ipaddr.sa, src_addr); + } + +-static int sock_addr_matches_interface(struct slist *addr_list, struct sockaddr_in *src_addr) ++static int sock_addr_matches_interface(struct slist *addr_list, ++ struct sockaddr *src_addr) + { + struct slist_entry *entry; + + /* Always match if it's localhost */ +- if (ofi_is_loopback_addr((struct sockaddr *)src_addr)) ++ if (ofi_is_loopback_addr(src_addr)) + return 1; + +- entry = slist_find_first_match(addr_list, sock_match_src_addr, +- inet_ntoa(src_addr->sin_addr)); +- ++ entry = slist_find_first_match(addr_list, sock_match_src_addr, src_addr); + return entry ? 1 : 0; + } + + static int sock_node_matches_interface(struct slist *addr_list, const char *node) + { +- struct sockaddr_in addr = { 0 }; ++ union ofi_sock_ip addr; + struct addrinfo *rai = NULL, ai = { +- .ai_family = AF_INET, + .ai_socktype = SOCK_STREAM, + }; + +@@ -684,10 +765,16 @@ static int sock_node_matches_interface(struct slist *addr_list, const char *node + SOCK_LOG_DBG("getaddrinfo failed!\n"); + return -FI_EINVAL; + } +- addr = *(struct sockaddr_in *)rai->ai_addr; ++ if (rai->ai_addrlen > sizeof(addr)) { ++ freeaddrinfo(rai); ++ return -FI_EINVAL; ++ } ++ ++ memset(&addr, 0, sizeof addr); ++ memcpy(&addr, rai->ai_addr, rai->ai_addrlen); + freeaddrinfo(rai); + +- return sock_addr_matches_interface(addr_list, &addr); ++ return sock_addr_matches_interface(addr_list, &addr.sa); + } + + static void sock_free_addr_list(struct slist *addr_list) +@@ -713,12 +800,12 @@ static int sock_getinfo(uint32_t version, const char *node, const char *service, + struct fi_info *tail; + + if (!(flags & FI_SOURCE) && hints && hints->src_addr && +- (hints->src_addrlen != sizeof(struct sockaddr_in))) ++ (hints->src_addrlen != ofi_sizeofaddr(hints->src_addr))) + return -FI_ENODATA; + + if (((!node && !service) || (flags & FI_SOURCE)) && + hints && hints->dest_addr && +- (hints->dest_addrlen != sizeof(struct sockaddr_in))) ++ (hints->dest_addrlen != ofi_sizeofaddr(hints->dest_addr))) + return -FI_ENODATA; + + ret = sock_verify_info(version, hints); +@@ -726,11 +813,12 @@ static int sock_getinfo(uint32_t version, const char *node, const char *service, + return ret; + + ret = 1; ++ sock_init_addrlist(); + if ((flags & FI_SOURCE) && node) { + ret = sock_node_matches_interface(&sock_addr_list, node); + } else if (hints && hints->src_addr) { + ret = sock_addr_matches_interface(&sock_addr_list, +- (struct sockaddr_in *)hints->src_addr); ++ hints->src_addr); + } + if (!ret) { + SOCK_LOG_ERROR("Couldn't find a match with local interfaces\n"); +@@ -747,7 +835,7 @@ static int sock_getinfo(uint32_t version, const char *node, const char *service, + (void) prev; /* Makes compiler happy */ + slist_foreach(&sock_addr_list, entry, prev) { + host_entry = container_of(entry, struct sock_host_list_entry, entry); +- node = host_entry->hostname; ++ node = host_entry->ipstr; + flags |= FI_SOURCE; + ret = sock_node_getinfo(version, node, service, flags, hints, info, &tail); + if (ret) { +@@ -769,7 +857,7 @@ static void fi_sockets_fini(void) + struct fi_provider sock_prov = { + .name = sock_prov_name, + .version = FI_VERSION(SOCK_MAJOR_VERSION, SOCK_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = sock_getinfo, + .fabric = sock_fabric, + .cleanup = fi_sockets_fini +@@ -784,6 +872,9 @@ SOCKETS_INI + fi_param_define(&sock_prov, "pe_waittime", FI_PARAM_INT, + "How many milliseconds to spin while waiting for progress"); + ++ fi_param_define(&sock_prov, "conn_timeout", FI_PARAM_INT, ++ "How many milliseconds to wait for one connection establishment"); ++ + fi_param_define(&sock_prov, "max_conn_retry", FI_PARAM_INT, + "Number of connection retries before reporting as failure"); + +@@ -815,7 +906,7 @@ SOCKETS_INI + fi_param_define(&sock_prov, "keepalive_probes", FI_PARAM_INT, + "Maximum number of keepalive probes sent before dropping the connection"); + +- fi_param_define(&sock_prov, "interface_name", FI_PARAM_STRING, ++ fi_param_define(&sock_prov, "iface", FI_PARAM_STRING, + "Specify interface name"); + + fastlock_init(&sock_list_lock); +@@ -826,8 +917,6 @@ SOCKETS_INI + SOCK_EP_RDM_CAP |= OFI_RMA_PMEM; + SOCK_EP_MSG_SEC_CAP |= OFI_RMA_PMEM; + SOCK_EP_MSG_CAP |= OFI_RMA_PMEM; +- /* Returns loopback address if no other interfaces are available */ +- sock_get_list_of_addr(&sock_addr_list); + #if ENABLE_DEBUG + fi_param_define(&sock_prov, "dgram_drop_rate", FI_PARAM_INT, + "Drop every Nth dgram frame (debug only)"); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_msg.c +index 2e69d7672..0d09300b8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_msg.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_msg.c +@@ -262,8 +262,9 @@ ssize_t sock_ep_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, + } + + sock_tx_ctx_write_op_send(tx_ctx, &tx_op, flags, (uintptr_t) msg->context, +- msg->addr, (uintptr_t) msg->msg_iov[0].iov_base, +- ep_attr, conn); ++ msg->addr, (uintptr_t) ((msg->iov_count > 0) ? ++ msg->msg_iov[0].iov_base : NULL), ++ ep_attr, conn); + + if (flags & FI_REMOTE_CQ_DATA) + sock_tx_ctx_write(tx_ctx, &msg->data, sizeof(msg->data)); +@@ -605,9 +606,10 @@ ssize_t sock_ep_tsendmsg(struct fid_ep *ep, + } + + sock_tx_ctx_write_op_tsend(tx_ctx, &tx_op, flags, +- (uintptr_t) msg->context, msg->addr, +- (uintptr_t) msg->msg_iov[0].iov_base, +- ep_attr, conn, msg->tag); ++ (uintptr_t) msg->context, msg->addr, ++ (uintptr_t) ((msg->iov_count > 0) ? ++ msg->msg_iov[0].iov_base : NULL), ++ ep_attr, conn, msg->tag); + + if (flags & FI_REMOTE_CQ_DATA) + sock_tx_ctx_write(tx_ctx, &msg->data, sizeof(msg->data)); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_progress.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_progress.c +index 19d046fa4..bab5c3cac 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_progress.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/sockets/src/sock_progress.c +@@ -867,7 +867,8 @@ static void sock_pe_do_atomic(void *cmp, void *dst, void *src, + if (op >= OFI_SWAP_OP_START) { + ofi_atomic_swap_handlers[op - OFI_SWAP_OP_START][datatype](dst, + src, cmp, tmp_result, cnt); +- memcpy(cmp, tmp_result, ofi_datatype_size(datatype) * cnt); ++ if (cmp != NULL) ++ memcpy(cmp, tmp_result, ofi_datatype_size(datatype) * cnt); + } else if (fetch) { + ofi_atomic_readwrite_handlers[op][datatype](dst, src, + cmp /*results*/, cnt); +@@ -1450,32 +1451,25 @@ static int sock_pe_process_rx_conn_msg(struct sock_pe *pe, + uint64_t len, data_len; + struct sock_ep_attr *ep_attr; + struct sock_conn_map *map; +- struct sockaddr_in *addr; ++ union ofi_sock_ip *addr; + struct sock_conn *conn; + uint64_t index; + + if (!pe_entry->comm_addr) { +- pe_entry->comm_addr = calloc(1, sizeof(struct sockaddr_in)); ++ pe_entry->comm_addr = calloc(1, sizeof(union ofi_sock_ip)); + if (!pe_entry->comm_addr) + return -FI_ENOMEM; + } + + len = sizeof(struct sock_msg_hdr); +- data_len = sizeof(struct sockaddr_in); ++ data_len = sizeof(union ofi_sock_ip); + if (sock_pe_recv_field(pe_entry, pe_entry->comm_addr, data_len, len)) { + return 0; + } + +- SOCK_LOG_DBG("got conn msg from %s:%d\n", +- inet_ntoa(((struct sockaddr_in *)&pe_entry->conn->addr)->sin_addr), +- ntohs(((struct sockaddr_in *)&pe_entry->conn->addr)->sin_port)); +- SOCK_LOG_DBG("on behalf of %s:%d\n", +- inet_ntoa(((struct sockaddr_in *)pe_entry->comm_addr)->sin_addr), +- ntohs(((struct sockaddr_in *)pe_entry->comm_addr)->sin_port)); +- + ep_attr = pe_entry->conn->ep_attr; + map = &ep_attr->cmap; +- addr = (struct sockaddr_in *) pe_entry->comm_addr; ++ addr = pe_entry->comm_addr; + pe_entry->conn->addr = *addr; + + index = (ep_attr->ep_type == FI_EP_MSG) ? 0 : sock_av_get_addr_index(ep_attr->av, addr); +@@ -2283,7 +2277,7 @@ void sock_pe_signal(struct sock_pe *pe) + void sock_pe_poll_add(struct sock_pe *pe, int fd) + { + fastlock_acquire(&pe->signal_lock); +- if (fi_epoll_add(pe->epoll_set, fd, NULL)) ++ if (fi_epoll_add(pe->epoll_set, fd, FI_EPOLL_IN, NULL)) + SOCK_LOG_ERROR("failed to add to epoll set: %d\n", fd); + fastlock_release(&pe->signal_lock); + } +@@ -2731,7 +2725,8 @@ struct sock_pe *sock_pe_init(struct sock_domain *domain) + + if (fd_set_nonblock(pe->signal_fds[SOCK_SIGNAL_RD_FD]) || + fi_epoll_add(pe->epoll_set, +- pe->signal_fds[SOCK_SIGNAL_RD_FD], NULL)) ++ pe->signal_fds[SOCK_SIGNAL_RD_FD], ++ FI_EPOLL_IN, NULL)) + goto err5; + + pe->do_progress = 1; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/Makefile.include +index 7965a64b1..983ee13e6 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/Makefile.include +@@ -4,8 +4,11 @@ _tcp_files = \ + prov/tcp/src/tcpx_attr.c \ + prov/tcp/src/tcpx_conn_mgr.c \ + prov/tcp/src/tcpx_domain.c \ ++ prov/tcp/src/tcpx_rma.c \ + prov/tcp/src/tcpx_ep.c \ ++ prov/tcp/src/tcpx_shared_ctx.c \ + prov/tcp/src/tcpx_cq.c \ ++ prov/tcp/src/tcpx_eq.c \ + prov/tcp/src/tcpx_init.c \ + prov/tcp/src/tcpx_progress.c \ + prov/tcp/src/tcpx_comm.c \ +@@ -22,8 +25,8 @@ src_libfabric_la_SOURCES += $(_tcp_files) + src_libfabric_la_LIBADD += $(tcp_shm_LIBS) + endif !HAVE_TCP_DL + +-#prov_install_man_pages += man/man7/fi_tcp.7 ++prov_install_man_pages += man/man7/fi_tcp.7 + + endif HAVE_TCP + +-#prov_dist_man_pages += man/man7/fi_tcp.7 ++prov_dist_man_pages += man/man7/fi_tcp.7 +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx.h +index 4148c7f39..67159f887 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx.h +@@ -65,116 +65,49 @@ + #define TCPX_MAJOR_VERSION 0 + #define TCPX_MINOR_VERSION 1 + +- +-extern struct fi_provider tcpx_prov; +-extern struct util_prov tcpx_util_prov; +-extern struct fi_info tcpx_info; +-struct tcpx_fabric; +-struct tcpx_domain; +-struct tcpx_pe_entry; +-struct tcpx_progress; +-struct tcpx_ep; +-struct tcpx_op_send; +- +-#define TCPX_NO_COMPLETION (1ULL << 63) +- +-#define POLL_MGR_FREE (1 << 0) +-#define POLL_MGR_DEL (1 << 1) +-#define POLL_MGR_ACK (1 << 2) +- + #define TCPX_MAX_CM_DATA_SIZE (1<<8) +-#define TCPX_PE_COMM_BUFF_SZ (1<<10) +-#define TCPX_MAX_SOCK_REQS (1<<10) +-#define TCPX_PE_MAX_ENTRIES (128) + #define TCPX_IOV_LIMIT (4) + #define TCPX_MAX_INJECT_SZ (64) +-#define TCPX_MAX_EPOLL_EVENTS (100) +-#define TCPX_MAX_EP_RB_SIZE (1024*sizeof(struct tcpx_op_send)) +- +-int tcpx_create_fabric(struct fi_fabric_attr *attr, +- struct fid_fabric **fabric, +- void *context); +- +-int tcpx_passive_ep(struct fid_fabric *fabric, struct fi_info *info, +- struct fid_pep **pep, void *context); +- +-int tcpx_domain_open(struct fid_fabric *fabric, struct fi_info *info, +- struct fid_domain **domain, void *context); +- +- +-int tcpx_endpoint(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep_fid, void *context); + ++#define MAX_EPOLL_EVENTS 100 ++#define STAGE_BUF_SIZE 512 + +-int tcpx_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq_fid, void *context); +- +-int tcpx_conn_mgr_init(struct tcpx_fabric *tcpx_fabric); +-void tcpx_conn_mgr_close(struct tcpx_fabric *tcpx_fabric); +-int tcpx_recv_msg(struct tcpx_pe_entry *pe_entry); +-int tcpx_send_msg(struct tcpx_pe_entry *pe_entry); +-void posted_rx_find(struct tcpx_pe_entry *pe_entry); +-int tcpx_progress_init(struct tcpx_progress *progress); +-int tcpx_progress_close(struct tcpx_progress *progress); +-struct tcpx_pe_entry *pe_entry_alloc(struct tcpx_progress *progress); +-void pe_entry_release(struct tcpx_pe_entry *pe_entry); +-void tcpx_progress(struct util_ep *util_ep); +- +-enum tcpx_xfer_states { +- TCPX_XFER_IDLE, +- TCPX_XFER_STARTED, +- TCPX_XFER_HDR_SENT, +- TCPX_XFER_FLUSH_COMM_BUF, +- TCPX_XFER_HDR_RECVD, +- TCPX_XFER_COMPLETE, +-}; ++extern struct fi_provider tcpx_prov; ++extern struct util_prov tcpx_util_prov; ++extern struct fi_info tcpx_info; ++struct tcpx_xfer_entry; ++struct tcpx_ep; + + enum tcpx_xfer_op_codes { + TCPX_OP_MSG_SEND, + TCPX_OP_MSG_RECV, ++ TCPX_OP_MSG_RESP, ++ TCPX_OP_WRITE, ++ TCPX_OP_REMOTE_WRITE, ++ TCPX_OP_READ_REQ, ++ TCPX_OP_READ_RSP, ++ TCPX_OP_REMOTE_READ, ++ TCPX_OP_CODE_MAX, + }; + +-enum tcpx_xfer_field { +- TCPX_MSG_HDR_FIELD, +- TCPX_DATA_FIELD, ++enum tcpx_cm_event_type { ++ SERVER_SOCK_ACCEPT, ++ CLIENT_SEND_CONNREQ, ++ SERVER_RECV_CONNREQ, ++ SERVER_SEND_CM_ACCEPT, ++ CLIENT_RECV_CONNRESP, + }; + +-enum poll_fd_type { +- CONNECT_SOCK, +- PASSIVE_SOCK, +- ACCEPT_SOCK, +-}; +- +-enum poll_fd_state { +- ESTABLISH_CONN, +- RCV_RESP, +- CONNECT_DONE, +-}; +- +-struct poll_fd_info { ++struct tcpx_cm_context { + fid_t fid; +- struct dlist_entry entry; +- int flags; +- enum poll_fd_type type; +- enum poll_fd_state state; ++ enum tcpx_cm_event_type type; + size_t cm_data_sz; + char cm_data[TCPX_MAX_CM_DATA_SIZE]; + }; + +-struct poll_fd_mgr { +- struct fd_signal signal; +- struct dlist_entry list; +- fastlock_t lock; +- int run; +- +- struct pollfd *poll_fds; +- struct poll_fd_info *poll_info; +- int nfds; +- int max_nfds; +-}; +- + struct tcpx_conn_handle { + struct fid handle; ++ struct tcpx_pep *pep; + SOCKET conn_fd; + }; + +@@ -182,50 +115,153 @@ struct tcpx_pep { + struct util_pep util_pep; + struct fi_info info; + SOCKET sock; +- struct poll_fd_info poll_info; ++ struct tcpx_cm_context cm_ctx; ++}; ++ ++enum tcpx_cm_state { ++ TCPX_EP_CONNECTING, ++ TCPX_EP_CONNECTED, ++ TCPX_EP_SHUTDOWN, ++ TCPX_EP_ERROR, ++}; ++ ++struct tcpx_msg_hdr { ++ struct ofi_op_hdr hdr; ++ size_t rma_iov_cnt; ++ union { ++ struct fi_rma_iov rma_iov[TCPX_IOV_LIMIT]; ++ struct fi_rma_ioc rma_ioc[TCPX_IOV_LIMIT]; ++ }; ++}; ++ ++struct tcpx_rx_detect { ++ struct tcpx_msg_hdr hdr; ++ uint64_t done_len; ++}; ++ ++struct tcpx_rx_ctx { ++ struct fid_ep rx_fid; ++ struct slist rx_queue; ++ struct util_buf_pool *buf_pool; ++ fastlock_t lock; ++}; ++ ++typedef int (*tcpx_rx_process_fn_t)(struct tcpx_xfer_entry *rx_entry); ++typedef void (*tcpx_ep_progress_func_t)(struct tcpx_ep *ep); ++typedef int (*tcpx_get_rx_func_t)(struct tcpx_ep *ep); ++ ++struct stage_buf { ++ uint8_t buf[STAGE_BUF_SIZE]; ++ size_t size; ++ size_t len; ++ size_t off; + }; + + struct tcpx_ep { + struct util_ep util_ep; + SOCKET conn_fd; ++ struct tcpx_rx_detect rx_detect; ++ struct tcpx_xfer_entry *cur_rx_entry; ++ tcpx_rx_process_fn_t cur_rx_proc_fn; + struct dlist_entry ep_entry; +- struct dlist_entry rx_queue; +- struct dlist_entry tx_queue; ++ struct slist rx_queue; ++ struct slist tx_queue; ++ struct slist tx_rsp_pend_queue; ++ struct slist rma_read_queue; ++ struct tcpx_rx_ctx *srx_ctx; ++ enum tcpx_cm_state cm_state; ++ /* lock for protecting tx/rx queues,rma list,cm_state*/ ++ fastlock_t lock; ++ tcpx_ep_progress_func_t progress_func; ++ tcpx_get_rx_func_t get_rx_entry[ofi_op_write + 1]; ++ struct stage_buf stage_buf; ++ bool send_ready_monitor; + }; + + struct tcpx_fabric { + struct util_fabric util_fabric; +- struct poll_fd_mgr poll_mgr; +- pthread_t conn_mgr_thread; + }; + + struct tcpx_msg_data { +- size_t iov_cnt; +- union { +- struct iovec iov[TCPX_IOV_LIMIT+1]; +- struct fi_rma_iov rma_iov[TCPX_IOV_LIMIT+1]; +- struct fi_rma_ioc ram_ioc[TCPX_IOV_LIMIT+1]; +- }; ++ size_t iov_cnt; ++ struct iovec iov[TCPX_IOV_LIMIT+1]; + uint8_t inject[TCPX_MAX_INJECT_SZ]; + }; + +-struct tcpx_pe_entry { +- struct ofi_op_hdr msg_hdr; ++struct tcpx_xfer_entry { ++ struct slist_entry entry; ++ struct tcpx_msg_hdr msg_hdr; + struct tcpx_msg_data msg_data; +- struct dlist_entry entry; + struct tcpx_ep *ep; + uint64_t flags; + void *context; + uint64_t done_len; + }; + +-struct tcpx_progress { +- struct util_buf_pool *pe_entry_pool; +-}; +- + struct tcpx_domain { + struct util_domain util_domain; +- struct tcpx_progress progress; + }; + ++struct tcpx_buf_pool { ++ struct util_buf_pool *pool; ++ enum tcpx_xfer_op_codes op_type; ++}; ++ ++struct tcpx_cq { ++ struct util_cq util_cq; ++ /* buf_pools protected by util.cq_lock */ ++ struct tcpx_buf_pool buf_pools[TCPX_OP_CODE_MAX]; ++}; ++ ++int tcpx_create_fabric(struct fi_fabric_attr *attr, ++ struct fid_fabric **fabric, ++ void *context); ++ ++int tcpx_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context); ++ ++int tcpx_domain_open(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_domain **domain, void *context); ++ ++ ++int tcpx_endpoint(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context); ++ ++ ++int tcpx_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, ++ struct fid_cq **cq_fid, void *context); ++void tcpx_cq_report_completion(struct util_cq *cq, ++ struct tcpx_xfer_entry *xfer_entry, ++ int err); ++ ++int tcpx_recv_msg_data(struct tcpx_xfer_entry *recv_entry); ++int tcpx_send_msg(struct tcpx_xfer_entry *tx_entry); ++int tcpx_recv_hdr(SOCKET sock, struct stage_buf *sbuf, ++ struct tcpx_rx_detect *rx_detect); ++int tcpx_read_to_buffer(SOCKET sock, struct stage_buf *stage_buf); ++ ++struct tcpx_xfer_entry *tcpx_xfer_entry_alloc(struct tcpx_cq *cq, ++ enum tcpx_xfer_op_codes type); ++void tcpx_xfer_entry_release(struct tcpx_cq *tcpx_cq, ++ struct tcpx_xfer_entry *xfer_entry); ++ ++void tcpx_progress(struct util_ep *util_ep); ++void tcpx_ep_progress(struct tcpx_ep *ep); ++int tcpx_ep_shutdown_report(struct tcpx_ep *ep, fid_t fid); ++int tcpx_cq_wait_ep_add(struct tcpx_ep *ep); ++void tcpx_cq_wait_ep_del(struct tcpx_ep *ep); ++void tcpx_tx_queue_insert(struct tcpx_ep *tcpx_ep, ++ struct tcpx_xfer_entry *tx_entry); ++ ++void tcpx_conn_mgr_run(struct util_eq *eq); ++int tcpx_eq_wait_try_func(void *arg); ++int tcpx_eq_create(struct fid_fabric *fabric_fid, struct fi_eq_attr *attr, ++ struct fid_eq **eq_fid, void *context); ++ ++int tcpx_get_rx_entry_op_invalid(struct tcpx_ep *tcpx_ep); ++int tcpx_get_rx_entry_op_msg(struct tcpx_ep *tcpx_ep); ++int tcpx_get_rx_entry_op_read_req(struct tcpx_ep *tcpx_ep); ++int tcpx_get_rx_entry_op_write(struct tcpx_ep *tcpx_ep); ++int tcpx_get_rx_entry_op_read_rsp(struct tcpx_ep *tcpx_ep); ++ + #endif //_TCP_H_ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_attr.c +index 596e80699..ceecac7b8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_attr.c +@@ -33,17 +33,31 @@ + #include "tcpx.h" + + ++#define TCPX_DOMAIN_CAPS (FI_LOCAL_COMM | FI_REMOTE_COMM) ++#define TCPX_EP_CAPS (FI_MSG | FI_RMA | FI_RMA_PMEM) ++#define TCPX_TX_CAPS (FI_SEND | FI_WRITE | FI_READ) ++#define TCPX_RX_CAPS (FI_RECV | FI_REMOTE_READ | FI_REMOTE_WRITE) ++ ++ ++#define TCPX_MSG_ORDER (FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_RAS | \ ++ FI_ORDER_WAW | FI_ORDER_WAS | \ ++ FI_ORDER_SAW | FI_ORDER_SAS) ++ ++ + static struct fi_tx_attr tcpx_tx_attr = { +- .caps = FI_MSG | FI_SEND, ++ .caps = TCPX_EP_CAPS | TCPX_TX_CAPS, + .comp_order = FI_ORDER_STRICT, ++ .msg_order = TCPX_MSG_ORDER, + .inject_size = 64, + .size = 1024, +- .iov_limit = TCPX_IOV_LIMIT ++ .iov_limit = TCPX_IOV_LIMIT, ++ .rma_iov_limit = TCPX_IOV_LIMIT, + }; + + static struct fi_rx_attr tcpx_rx_attr = { +- .caps = FI_MSG | FI_RECV, ++ .caps = TCPX_EP_CAPS | TCPX_RX_CAPS, + .comp_order = FI_ORDER_STRICT, ++ .msg_order = TCPX_MSG_ORDER, + .total_buffered_recv = 0, + .size = 1024, + .iov_limit = TCPX_IOV_LIMIT +@@ -55,21 +69,27 @@ static struct fi_ep_attr tcpx_ep_attr = { + .protocol_version = 0, + .max_msg_size = SIZE_MAX, + .tx_ctx_cnt = 1, +- .rx_ctx_cnt = 1 ++ .rx_ctx_cnt = 1, ++ .max_order_raw_size = SIZE_MAX, ++ .max_order_waw_size = SIZE_MAX, + }; + + static struct fi_domain_attr tcpx_domain_attr = { + .name = "tcp", ++ .caps = TCPX_DOMAIN_CAPS, + .threading = FI_THREAD_SAFE, + .control_progress = FI_PROGRESS_AUTO, + .data_progress = FI_PROGRESS_AUTO, + .resource_mgmt = FI_RM_ENABLED, ++ .mr_mode = FI_MR_SCALABLE | FI_MR_BASIC, ++ .mr_key_size = sizeof(uint64_t), + .av_type = FI_AV_UNSPEC, +- .mr_mode = 0, ++ .cq_data_size = sizeof(uint64_t), + .cq_cnt = 256, + .ep_cnt = 8192, + .tx_ctx_cnt = 8192, + .rx_ctx_cnt = 8192, ++ .max_ep_srx_ctx = 128, + .max_ep_tx_ctx = 1, + .max_ep_rx_ctx = 1 + }; +@@ -80,7 +100,7 @@ static struct fi_fabric_attr tcpx_fabric_attr = { + }; + + struct fi_info tcpx_info = { +- .caps = FI_MSG | FI_SEND | FI_RECV, ++ .caps = TCPX_DOMAIN_CAPS | TCPX_EP_CAPS | TCPX_TX_CAPS | TCPX_RX_CAPS, + .addr_format = FI_SOCKADDR, + .tx_attr = &tcpx_tx_attr, + .rx_attr = &tcpx_rx_attr, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_comm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_comm.c +index ce10666db..19eb3a1e5 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_comm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_comm.c +@@ -37,76 +37,125 @@ + #include + #include "tcpx.h" + +-int tcpx_send_msg(struct tcpx_pe_entry *pe_entry) ++int tcpx_send_msg(struct tcpx_xfer_entry *tx_entry) + { + ssize_t bytes_sent; ++ struct msghdr msg = {0}; + +- bytes_sent = ofi_writev_socket(pe_entry->ep->conn_fd, +- pe_entry->msg_data.iov, +- pe_entry->msg_data.iov_cnt); ++ msg.msg_iov = tx_entry->msg_data.iov; ++ msg.msg_iovlen = tx_entry->msg_data.iov_cnt; ++ ++ bytes_sent = ofi_sendmsg_tcp(tx_entry->ep->conn_fd, ++ &msg, MSG_NOSIGNAL); + if (bytes_sent < 0) +- return -errno; ++ return ofi_sockerr() == EPIPE ? -FI_ENOTCONN : -ofi_sockerr(); + +- if (pe_entry->done_len < ntohll(pe_entry->msg_hdr.size)) { +- ofi_consume_iov(pe_entry->msg_data.iov, +- &pe_entry->msg_data.iov_cnt, ++ tx_entry->done_len += bytes_sent; ++ if (tx_entry->done_len < ntohll(tx_entry->msg_hdr.hdr.size)) { ++ ofi_consume_iov(tx_entry->msg_data.iov, ++ &tx_entry->msg_data.iov_cnt, + bytes_sent); ++ return -FI_EAGAIN; + } +- +- pe_entry->done_len += bytes_sent; + return FI_SUCCESS; + } + +-static int tcpx_recv_msg_hdr(struct tcpx_pe_entry *pe_entry) ++static ssize_t tcpx_read_from_buffer(struct stage_buf *sbuf, ++ uint8_t *buf, size_t len) ++{ ++ size_t rem_size; ++ ssize_t ret; ++ ++ assert(sbuf->len >= sbuf->off); ++ rem_size = sbuf->len - sbuf->off; ++ assert(rem_size); ++ ret = (rem_size >= len)? len : rem_size; ++ memcpy(buf, &sbuf->buf[sbuf->off], ret); ++ sbuf->off += ret; ++ return ret; ++} ++ ++int tcpx_recv_hdr(SOCKET sock, struct stage_buf *sbuf, ++ struct tcpx_rx_detect *rx_detect) + { ++ void *rem_buf; ++ size_t rem_len; + ssize_t bytes_recvd; +- void *rem_hdr_buf; +- size_t rem_hdr_len; + +- rem_hdr_buf = (uint8_t *)&pe_entry->msg_hdr + pe_entry->done_len; +- rem_hdr_len = sizeof(pe_entry->msg_hdr) - pe_entry->done_len; ++ rem_buf = (uint8_t *) &rx_detect->hdr + rx_detect->done_len; ++ rem_len = sizeof(rx_detect->hdr) - rx_detect->done_len; + +- bytes_recvd = ofi_recv_socket(pe_entry->ep->conn_fd, +- rem_hdr_buf, rem_hdr_len, 0); ++ if (sbuf->len != sbuf->off) { ++ bytes_recvd = tcpx_read_from_buffer(sbuf, rem_buf, rem_len); ++ } else { ++ bytes_recvd = ofi_recv_socket(sock, rem_buf, rem_len, 0); ++ } + if (bytes_recvd <= 0) +- return (bytes_recvd)? -errno: -FI_ENOTCONN; +- +- pe_entry->done_len += bytes_recvd; ++ return (bytes_recvd)? -ofi_sockerr(): -FI_ENOTCONN; + +- if (pe_entry->done_len < sizeof(pe_entry->msg_hdr)) +- return -FI_EAGAIN; ++ rx_detect->done_len += bytes_recvd; ++ return (rem_len == bytes_recvd)? FI_SUCCESS : -FI_EAGAIN; ++} + +- pe_entry->msg_hdr.op_data = TCPX_OP_MSG_RECV; +- return ofi_truncate_iov(pe_entry->msg_data.iov, +- &pe_entry->msg_data.iov_cnt, +- (ntohll(pe_entry->msg_hdr.size) - +- sizeof(pe_entry->msg_hdr))); ++static ssize_t tcpx_readv_from_buffer(struct stage_buf *sbuf, ++ struct iovec *iov, ++ int iov_cnt) ++{ ++ ssize_t ret = 0; ++ size_t bytes_read; ++ int i; ++ ++ if (iov_cnt == 1) ++ return tcpx_read_from_buffer(sbuf, iov[0].iov_base, ++ iov[0].iov_len); ++ ++ for (i = 0; i < iov_cnt; i++) { ++ bytes_read = tcpx_read_from_buffer(sbuf, iov[i].iov_base, ++ iov[i].iov_len); ++ ret += bytes_read; ++ if ((bytes_read < iov[i].iov_len) || ++ !(sbuf->len - sbuf->off)) ++ break; ++ } ++ return ret; + } + +-int tcpx_recv_msg(struct tcpx_pe_entry *pe_entry) ++int tcpx_recv_msg_data(struct tcpx_xfer_entry *rx_entry) + { + ssize_t bytes_recvd; +- int ret; + +- if (pe_entry->done_len < sizeof(pe_entry->msg_hdr)) { +- ret = tcpx_recv_msg_hdr(pe_entry); +- if (ret) +- return ret; ++ if (rx_entry->ep->stage_buf.len != rx_entry->ep->stage_buf.off) { ++ bytes_recvd = tcpx_readv_from_buffer(&rx_entry->ep->stage_buf, ++ rx_entry->msg_data.iov, ++ rx_entry->msg_data.iov_cnt); ++ }else { ++ bytes_recvd = ofi_readv_socket(rx_entry->ep->conn_fd, ++ rx_entry->msg_data.iov, ++ rx_entry->msg_data.iov_cnt); + } +- +- bytes_recvd = ofi_readv_socket(pe_entry->ep->conn_fd, +- pe_entry->msg_data.iov, +- pe_entry->msg_data.iov_cnt); + if (bytes_recvd <= 0) +- return (bytes_recvd)? -errno: -FI_ENOTCONN; +- ++ return (bytes_recvd)? -ofi_sockerr(): -FI_ENOTCONN; + +- if (pe_entry->done_len < ntohll(pe_entry->msg_hdr.size)) { +- ofi_consume_iov(pe_entry->msg_data.iov, +- &pe_entry->msg_data.iov_cnt, ++ rx_entry->done_len += bytes_recvd; ++ if (rx_entry->done_len < ntohll(rx_entry->msg_hdr.hdr.size)) { ++ ofi_consume_iov(rx_entry->msg_data.iov, ++ &rx_entry->msg_data.iov_cnt, + bytes_recvd); ++ return -FI_EAGAIN; + } ++ return FI_SUCCESS; ++} ++ ++int tcpx_read_to_buffer(SOCKET sock, struct stage_buf *stage_buf) ++{ ++ int bytes_recvd; ++ ++ bytes_recvd = ofi_recv_socket(sock, stage_buf->buf, ++ stage_buf->size, 0); ++ if (bytes_recvd <= 0) ++ return (bytes_recvd)? -ofi_sockerr(): -FI_ENOTCONN; + +- pe_entry->done_len += bytes_recvd; ++ stage_buf->len = bytes_recvd; ++ stage_buf->off = 0; + return FI_SUCCESS; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_conn_mgr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_conn_mgr.c +index 54f1349e5..ffe7ea76c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_conn_mgr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_conn_mgr.c +@@ -38,157 +38,31 @@ + #include + #include + +-static int poll_fd_resize(struct poll_fd_mgr *poll_mgr, int size) +-{ +- struct pollfd *new_poll_fds; +- struct poll_fd_info *new_poll_info; +- +- new_poll_fds = calloc(size, sizeof(*new_poll_fds)); +- if (!new_poll_fds) +- return -FI_ENOMEM; +- +- new_poll_info = calloc(size, sizeof(*new_poll_info)); +- if (!new_poll_info) { +- free(new_poll_fds); +- return -FI_ENOMEM; +- } +- +- if (poll_mgr->max_nfds) { +- memcpy(new_poll_fds, poll_mgr->poll_fds, +- poll_mgr->max_nfds * sizeof(*new_poll_fds)); +- free(poll_mgr->poll_fds); +- +- memcpy(new_poll_info, poll_mgr->poll_info, +- poll_mgr->max_nfds * sizeof(*new_poll_info)); +- free(poll_mgr->poll_info); +- } +- +- poll_mgr->poll_fds = new_poll_fds; +- poll_mgr->poll_info = new_poll_info; +- poll_mgr->max_nfds = size; +- +- return 0; +-} +- +-static void poll_fds_swap_del_last(struct poll_fd_mgr *poll_mgr, int index) +-{ +- poll_mgr->poll_fds[index] = poll_mgr->poll_fds[(poll_mgr->nfds) - 1]; +- poll_mgr->poll_info[index] = poll_mgr->poll_info[(poll_mgr->nfds) - 1]; +- poll_mgr->nfds--; +-} +- +-static int poll_fds_find_dup(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *fd_info_entry) +-{ +- struct tcpx_ep *tcpx_ep; +- struct tcpx_pep *tcpx_pep; +- int i; +- +- for (i = 1 ; i < poll_mgr->nfds ; i++) { +- switch (fd_info_entry->fid->fclass) { +- case FI_CLASS_EP: +- tcpx_ep = container_of(fd_info_entry->fid, struct tcpx_ep, +- util_ep.ep_fid.fid); +- if (poll_mgr->poll_fds[i].fd == tcpx_ep->conn_fd) +- return i; +- break; +- case FI_CLASS_PEP: +- tcpx_pep = container_of(fd_info_entry->fid, struct tcpx_pep, +- util_pep.pep_fid.fid); +- if (poll_mgr->poll_fds[i].fd == tcpx_pep->sock) +- return i; +- break; +- default: +- continue; +- } +- } +- return -1; +-} + +-static int poll_fds_add_item(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info) ++static int read_cm_data(SOCKET fd, struct tcpx_cm_context *cm_ctx, ++ struct ofi_ctrl_hdr *hdr) + { +- struct tcpx_ep *tcpx_ep; +- struct tcpx_pep *tcpx_pep; +- int ret; +- +- if (poll_mgr->nfds >= poll_mgr->max_nfds) { +- ret = poll_fd_resize(poll_mgr, poll_mgr->max_nfds << 1); +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "memory allocation failed\n"); +- return ret; +- } +- +- poll_mgr->poll_info[poll_mgr->nfds] = *poll_info; +- poll_mgr->poll_fds[poll_mgr->nfds].revents = 0; +- +- switch (poll_mgr->poll_info[poll_mgr->nfds].type) { +- case CONNECT_SOCK: +- case ACCEPT_SOCK: +- tcpx_ep = container_of(poll_info->fid, struct tcpx_ep, +- util_ep.ep_fid.fid); +- poll_mgr->poll_fds[poll_mgr->nfds].fd = tcpx_ep->conn_fd; +- poll_mgr->poll_fds[poll_mgr->nfds].events = POLLOUT; +- break; +- case PASSIVE_SOCK: +- tcpx_pep = container_of(poll_info->fid, struct tcpx_pep, +- util_pep.pep_fid.fid); +- +- poll_mgr->poll_fds[poll_mgr->nfds].fd = tcpx_pep->sock; +- poll_mgr->poll_fds[poll_mgr->nfds].events = POLLIN; +- break; +- default: +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "invalid fd\n"); +- return -FI_EINVAL; +- } +- poll_mgr->nfds++; +- return 0; +-} ++ cm_ctx->cm_data_sz = ntohs(hdr->seg_size); ++ if (cm_ctx->cm_data_sz) { ++ size_t data_sz = MIN(cm_ctx->cm_data_sz, ++ TCPX_MAX_CM_DATA_SIZE); ++ ssize_t ret = ofi_recv_socket(fd, cm_ctx->cm_data, ++ data_sz, MSG_WAITALL); ++ if ((size_t) ret != data_sz) ++ return -FI_EIO; ++ cm_ctx->cm_data_sz = data_sz; + +-static int handle_poll_list(struct poll_fd_mgr *poll_mgr) +-{ +- struct poll_fd_info *poll_item; +- int ret = FI_SUCCESS; +- int id = 0; +- +- fastlock_acquire(&poll_mgr->lock); +- while (!dlist_empty(&poll_mgr->list)) { +- poll_item = container_of(poll_mgr->list.next, +- struct poll_fd_info, entry); +- dlist_remove_init(&poll_item->entry); +- +- if (poll_item->flags & POLL_MGR_DEL) { +- id = poll_fds_find_dup(poll_mgr, poll_item); +- assert(id > 0); +- if (id <= 0) { +- ret = -FI_EINVAL; +- goto err; +- } +- +- poll_fds_swap_del_last(poll_mgr, id); +- poll_item->flags |= POLL_MGR_ACK; +- } else { +- assert(poll_fds_find_dup(poll_mgr, poll_item) < 0); +- ret = poll_fds_add_item(poll_mgr, poll_item); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "Failed to add fd to event polling\n"); +- } ++ if (OFI_UNLIKELY(cm_ctx->cm_data_sz > ++ TCPX_MAX_CM_DATA_SIZE)) { ++ ofi_discard_socket(fd, cm_ctx->cm_data_sz - ++ TCPX_MAX_CM_DATA_SIZE); + } +- +- if (poll_item->flags & POLL_MGR_FREE) +- free(poll_item); +- else +- poll_item->flags |= POLL_MGR_ACK; + } +-err: +- fastlock_release(&poll_mgr->lock); +- return ret; ++ return FI_SUCCESS; + } + + static int rx_cm_data(SOCKET fd, struct ofi_ctrl_hdr *hdr, +- int type, struct poll_fd_info *poll_info) ++ int type, struct tcpx_cm_context *cm_ctx) + { + ssize_t ret; + +@@ -197,26 +71,17 @@ static int rx_cm_data(SOCKET fd, struct ofi_ctrl_hdr *hdr, + if (ret != sizeof(*hdr)) + return -FI_EIO; + +- if (hdr->type != type) +- return -FI_ECONNREFUSED; +- + if (hdr->version != OFI_CTRL_VERSION) + return -FI_ENOPROTOOPT; + +- poll_info->cm_data_sz = ntohs(hdr->seg_size); +- if (poll_info->cm_data_sz) { +- if (poll_info->cm_data_sz > TCPX_MAX_CM_DATA_SIZE) +- return -FI_EINVAL; +- +- ret = ofi_recv_socket(fd, poll_info->cm_data, +- poll_info->cm_data_sz, MSG_WAITALL); +- if ((size_t) ret != poll_info->cm_data_sz) +- return -FI_EIO; ++ ret = read_cm_data(fd, cm_ctx, hdr); ++ if (hdr->type != type) { ++ ret = -FI_ECONNREFUSED; + } +- return FI_SUCCESS; ++ return ret; + } + +-static int tx_cm_data(SOCKET fd, uint8_t type, struct poll_fd_info *poll_info) ++static int tx_cm_data(SOCKET fd, uint8_t type, struct tcpx_cm_context *cm_ctx) + { + struct ofi_ctrl_hdr hdr; + ssize_t ret; +@@ -224,336 +89,381 @@ static int tx_cm_data(SOCKET fd, uint8_t type, struct poll_fd_info *poll_info) + memset(&hdr, 0, sizeof(hdr)); + hdr.version = OFI_CTRL_VERSION; + hdr.type = type; +- hdr.seg_size = htons((uint16_t) poll_info->cm_data_sz); ++ hdr.seg_size = htons((uint16_t) cm_ctx->cm_data_sz); + + ret = ofi_send_socket(fd, &hdr, sizeof(hdr), MSG_NOSIGNAL); + if (ret != sizeof(hdr)) + return -FI_EIO; + +- if (poll_info->cm_data_sz) { +- ret = ofi_send_socket(fd, poll_info->cm_data, +- poll_info->cm_data_sz, MSG_NOSIGNAL); +- if ((size_t) ret != poll_info->cm_data_sz) ++ if (cm_ctx->cm_data_sz) { ++ ret = ofi_send_socket(fd, cm_ctx->cm_data, ++ cm_ctx->cm_data_sz, MSG_NOSIGNAL); ++ if ((size_t) ret != cm_ctx->cm_data_sz) + return -FI_EIO; + } + return FI_SUCCESS; + } + +-static int send_conn_req(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info, +- struct tcpx_ep *ep, +- int index) ++static int tcpx_ep_msg_xfer_enable(struct tcpx_ep *ep) + { +- socklen_t len; +- int status, ret = FI_SUCCESS; +- +- assert(poll_mgr->poll_fds[index].revents == POLLOUT); ++ int ret; + +- len = sizeof(status); +- ret = getsockopt(ep->conn_fd, SOL_SOCKET, SO_ERROR, (char *) &status, &len); +- if (ret < 0 || status) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "connection failure\n"); +- return (ret < 0)? -errno : status; ++ fastlock_acquire(&ep->lock); ++ if (ep->cm_state != TCPX_EP_CONNECTING) { ++ fastlock_release(&ep->lock); ++ return -FI_EINVAL; + } ++ ep->progress_func = tcpx_ep_progress; ++ ret = fi_fd_nonblock(ep->conn_fd); ++ if (ret) ++ goto err; ++ ++ ret = tcpx_cq_wait_ep_add(ep); ++ if (ret) ++ goto err; + +- ret = tx_cm_data(ep->conn_fd, ofi_ctrl_connreq, poll_info); ++ ep->cm_state = TCPX_EP_CONNECTED; ++err: ++ fastlock_release(&ep->lock); + return ret; + } + +-static int proc_conn_resp(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info, +- struct tcpx_ep *ep, +- int index) ++static int proc_conn_resp(struct tcpx_cm_context *cm_ctx, ++ struct tcpx_ep *ep) + { + struct ofi_ctrl_hdr conn_resp; + struct fi_eq_cm_entry *cm_entry; ++ ssize_t len; + int ret = FI_SUCCESS; + +- assert(poll_mgr->poll_fds[index].revents == POLLIN); +- ret = rx_cm_data(ep->conn_fd, &conn_resp, ofi_ctrl_connresp, poll_info); ++ ret = rx_cm_data(ep->conn_fd, &conn_resp, ofi_ctrl_connresp, cm_ctx); + if (ret) + return ret; + +- cm_entry = calloc(1, sizeof(*cm_entry) + poll_info->cm_data_sz); +- if (!cm_entry) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "mem alloc failed\n"); ++ cm_entry = calloc(1, sizeof(*cm_entry) + cm_ctx->cm_data_sz); ++ if (!cm_entry) + return -FI_ENOMEM; +- } + +- cm_entry->fid = poll_info->fid; +- memcpy(cm_entry->data, poll_info->cm_data, poll_info->cm_data_sz); ++ cm_entry->fid = cm_ctx->fid; ++ memcpy(cm_entry->data, cm_ctx->cm_data, cm_ctx->cm_data_sz); + +- ret = (int) fi_eq_write(&ep->util_ep.eq->eq_fid, FI_CONNECTED, cm_entry, +- sizeof(*cm_entry) + poll_info->cm_data_sz, 0); +- if (ret < 0) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Error writing to EQ\n"); ++ ret = tcpx_ep_msg_xfer_enable(ep); ++ if (ret) ++ goto err; ++ ++ len = fi_eq_write(&ep->util_ep.eq->eq_fid, FI_CONNECTED, cm_entry, ++ sizeof(*cm_entry) + cm_ctx->cm_data_sz, 0); ++ if (len < 0) { ++ ret = (int) len; + goto err; + } +- ret = fi_fd_nonblock(ep->conn_fd); + err: + free(cm_entry); + return ret; + } + +-static void handle_connect(struct poll_fd_mgr *poll_mgr, +- int index) ++int tcpx_eq_wait_try_func(void *arg) ++{ ++ return FI_SUCCESS; ++} ++ ++static void client_recv_connresp(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) + { ++ struct fi_eq_err_entry err_entry = { 0 }; + struct tcpx_ep *ep; +- struct poll_fd_info *poll_info = &poll_mgr->poll_info[index]; ++ ssize_t ret; ++ ++ assert(cm_ctx->fid->fclass == FI_CLASS_EP); ++ ep = container_of(cm_ctx->fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ ++ ret = ofi_wait_fd_del(wait, ep->conn_fd); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "Could not remove fd from wait\n"); ++ goto err; ++ } ++ ++ ret = proc_conn_resp(cm_ctx, ep); ++ if (ret) ++ goto err; ++ ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, "Received Accept from server\n"); ++ free(cm_ctx); ++ return; ++err: ++ err_entry.fid = cm_ctx->fid; ++ err_entry.context = cm_ctx->fid->context; ++ err_entry.err = -ret; ++ if (cm_ctx->cm_data_sz) { ++ err_entry.err_data = calloc(1, cm_ctx->cm_data_sz); ++ if (OFI_LIKELY(err_entry.err_data != NULL)) { ++ memcpy(err_entry.err_data, cm_ctx->cm_data, ++ cm_ctx->cm_data_sz); ++ err_entry.err_data_size = cm_ctx->cm_data_sz; ++ } ++ } ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, ++ "fi_eq_write the conn refused %"PRId64"\n", ret); ++ free(cm_ctx); ++ /* `err_entry.err_data` must live until it is passed to user */ ++ ret = fi_eq_write(&ep->util_ep.eq->eq_fid, FI_NOTIFY, ++ &err_entry, sizeof(err_entry), UTIL_FLAG_ERROR); ++ if (OFI_UNLIKELY(ret < 0)) { ++ free(err_entry.err_data); ++ } ++} ++ ++static void server_send_cm_accept(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) ++{ ++ struct fi_eq_cm_entry cm_entry = {0}; + struct fi_eq_err_entry err_entry; ++ struct tcpx_ep *ep; + int ret; + +- assert(poll_info->fid->fclass == FI_CLASS_EP); +- ep = container_of(poll_info->fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ assert(cm_ctx->fid->fclass == FI_CLASS_EP); ++ ep = container_of(cm_ctx->fid, struct tcpx_ep, util_ep.ep_fid.fid); + +- switch (poll_info->state) { +- case ESTABLISH_CONN: +- ret = send_conn_req(poll_mgr, poll_info, ep, index); +- if (ret) +- goto err; ++ ret = tx_cm_data(ep->conn_fd, ofi_ctrl_connresp, cm_ctx); ++ if (ret) ++ goto err; + +- poll_info->state = RCV_RESP; +- poll_mgr->poll_fds[index].events = POLLIN; +- break; +- case RCV_RESP: +- ret = proc_conn_resp(poll_mgr, poll_info, ep, index); +- if (ret) +- goto err; ++ cm_entry.fid = cm_ctx->fid; ++ ret = (int) fi_eq_write(&ep->util_ep.eq->eq_fid, FI_CONNECTED, ++ &cm_entry, sizeof(cm_entry), 0); ++ if (ret < 0) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Error writing to EQ\n"); ++ } + +- poll_info->state = CONNECT_DONE; +- break; +- default: +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Invalid connection state\n"); +- ret = -FI_EINVAL; ++ ret = ofi_wait_fd_del(wait, ep->conn_fd); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "Could not remove fd from wait\n"); + goto err; + } ++ ++ ret = tcpx_ep_msg_xfer_enable(ep); ++ if (ret) ++ goto err; ++ ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, "Connection Accept Successful\n"); ++ free(cm_ctx); + return; + err: + memset(&err_entry, 0, sizeof err_entry); +- err_entry.fid = poll_info->fid; +- err_entry.context = poll_info->fid->context; ++ err_entry.fid = cm_ctx->fid; ++ err_entry.context = cm_ctx->fid->context; + err_entry.err = -ret; + +- poll_info->state = CONNECT_DONE; +- fi_eq_write(&ep->util_ep.eq->eq_fid, FI_SHUTDOWN, ++ free(cm_ctx); ++ fi_eq_write(&ep->util_ep.eq->eq_fid, FI_NOTIFY, + &err_entry, sizeof(err_entry), UTIL_FLAG_ERROR); + } + +-static void handle_connreq(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info) ++static void server_recv_connreq(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) + { + struct tcpx_conn_handle *handle; +- struct tcpx_pep *pep; + struct fi_eq_cm_entry *cm_entry; + struct ofi_ctrl_hdr conn_req; +- SOCKET sock; + int ret; + +- assert(poll_info->fid->fclass == FI_CLASS_PEP); +- pep = container_of(poll_info->fid, struct tcpx_pep, util_pep.pep_fid.fid); ++ assert(cm_ctx->fid->fclass == FI_CLASS_CONNREQ); + +- sock = accept(pep->sock, NULL, 0); +- if (sock < 0) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "accept error: %d\n", +- ofi_sockerr()); +- return; +- } +- ret = rx_cm_data(sock, &conn_req, ofi_ctrl_connreq, poll_info); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "cm data recv failed \n"); +- goto err1; +- } ++ handle = container_of(cm_ctx->fid, ++ struct tcpx_conn_handle, ++ handle); + +- handle = calloc(1, sizeof(*handle)); +- if (!handle) ++ ret = rx_cm_data(handle->conn_fd, &conn_req, ofi_ctrl_connreq, cm_ctx); ++ if (ret) + goto err1; + +- cm_entry = calloc(1, sizeof(*cm_entry) + poll_info->cm_data_sz); ++ cm_entry = calloc(1, sizeof(*cm_entry) + cm_ctx->cm_data_sz); + if (!cm_entry) +- goto err2; ++ goto err1; + +- handle->conn_fd = sock; +- cm_entry->fid = poll_info->fid; +- cm_entry->info = fi_dupinfo(&pep->info); ++ cm_entry->fid = &handle->pep->util_pep.pep_fid.fid; ++ cm_entry->info = fi_dupinfo(&handle->pep->info); + if (!cm_entry->info) +- goto err3; ++ goto err2; + + cm_entry->info->handle = &handle->handle; +- memcpy(cm_entry->data, poll_info->cm_data, poll_info->cm_data_sz); ++ memcpy(cm_entry->data, cm_ctx->cm_data, cm_ctx->cm_data_sz); + +- ret = (int) fi_eq_write(&pep->util_pep.eq->eq_fid, FI_CONNREQ, cm_entry, +- sizeof(*cm_entry) + poll_info->cm_data_sz, 0); ++ ret = (int) fi_eq_write(&handle->pep->util_pep.eq->eq_fid, FI_CONNREQ, cm_entry, ++ sizeof(*cm_entry) + cm_ctx->cm_data_sz, 0); + if (ret < 0) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Error writing to EQ\n"); +- goto err4; ++ goto err3; + } +- ++ ret = ofi_wait_fd_del(wait, handle->conn_fd); ++ if (ret) ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "fd deletion from ofi_wait failed\n"); + free(cm_entry); ++ free(cm_ctx); + return; +-err4: +- fi_freeinfo(cm_entry->info); + err3: +- free(cm_entry); ++ fi_freeinfo(cm_entry->info); + err2: +- free(handle); ++ free(cm_entry); + err1: +- ofi_close_socket(sock); ++ ofi_wait_fd_del(wait, handle->conn_fd); ++ ofi_close_socket(handle->conn_fd); ++ free(cm_ctx); ++ free(handle); + } + +-static void handle_accept_conn(struct poll_fd_mgr *poll_mgr, +- struct poll_fd_info *poll_info) ++static void client_send_connreq(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) + { +- struct fi_eq_cm_entry cm_entry; +- struct fi_eq_err_entry err_entry; + struct tcpx_ep *ep; +- int ret; ++ struct fi_eq_err_entry err_entry; ++ socklen_t len; ++ int status, ret = FI_SUCCESS; + +- assert(poll_info->fid->fclass == FI_CLASS_EP); +- ep = container_of(poll_info->fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, "client send connreq\n"); ++ assert(cm_ctx->fid->fclass == FI_CLASS_EP); + +- ret = tx_cm_data(ep->conn_fd, ofi_ctrl_connresp, poll_info); ++ ep = container_of(cm_ctx->fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ ++ len = sizeof(status); ++ ret = getsockopt(ep->conn_fd, SOL_SOCKET, SO_ERROR, (char *) &status, &len); ++ if (ret < 0 || status) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "connection failure\n"); ++ ret = (ret < 0)? -ofi_sockerr() : status; ++ goto err; ++ } ++ ++ ret = tx_cm_data(ep->conn_fd, ofi_ctrl_connreq, cm_ctx); + if (ret) + goto err; + +- cm_entry.fid = poll_info->fid; ++ ret = ofi_wait_fd_del(wait, ep->conn_fd); ++ if (ret) ++ goto err; + +- ret = (int) fi_eq_write(&ep->util_ep.eq->eq_fid, FI_CONNECTED, +- &cm_entry, sizeof(cm_entry), 0); +- if (ret < 0) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, "Error writing to EQ\n"); +- } ++ cm_ctx->type = CLIENT_RECV_CONNRESP; ++ ret = ofi_wait_fd_add(wait, ep->conn_fd, FI_EPOLL_IN, ++ tcpx_eq_wait_try_func, NULL, cm_ctx); ++ if (ret) ++ goto err; + +- ret = fi_fd_nonblock(ep->conn_fd); ++ wait->signal(wait); + return; + err: + memset(&err_entry, 0, sizeof err_entry); +- err_entry.fid = poll_info->fid; +- err_entry.context = poll_info->fid->context; +- err_entry.err = ret; ++ err_entry.fid = cm_ctx->fid; ++ err_entry.context = cm_ctx->fid->context; ++ err_entry.err = -ret; + +- fi_eq_write(&ep->util_ep.eq->eq_fid, FI_SHUTDOWN, ++ free(cm_ctx); ++ fi_eq_write(&ep->util_ep.eq->eq_fid, FI_NOTIFY, + &err_entry, sizeof(err_entry), UTIL_FLAG_ERROR); + } + +-static void handle_fd_events(struct poll_fd_mgr *poll_mgr) ++static void server_sock_accept(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) + { +- int i; ++ struct tcpx_conn_handle *handle; ++ struct tcpx_pep *pep; ++ SOCKET sock; ++ int ret; + +- /* Process the fd array from end to start. This allows us to handle +- * removing entries from the array. Also ignore the signal fd at index 0. +- */ +- for (i = poll_mgr->nfds-1; i > 0; i--) { +- if (!poll_mgr->poll_fds[i].revents) +- continue; ++ FI_DBG(&tcpx_prov, FI_LOG_EP_CTRL, "Received Connreq\n"); ++ assert(cm_ctx->fid->fclass == FI_CLASS_PEP); ++ pep = container_of(cm_ctx->fid, struct tcpx_pep, ++ util_pep.pep_fid.fid); + +- switch (poll_mgr->poll_info[i].type) { +- case CONNECT_SOCK: +- handle_connect(poll_mgr, i); +- +- if (poll_mgr->poll_info[i].state == CONNECT_DONE) +- poll_fds_swap_del_last(poll_mgr, i); +- break; +- case PASSIVE_SOCK: +- handle_connreq(poll_mgr, &poll_mgr->poll_info[i]); +- break; +- case ACCEPT_SOCK: +- handle_accept_conn(poll_mgr, &poll_mgr->poll_info[i]); +- poll_fds_swap_del_last(poll_mgr, i); +- break; +- default: +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "should never end up here\n"); +- } ++ sock = accept(pep->sock, NULL, 0); ++ if (sock < 0) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "accept error: %d\n", ofi_sockerr()); ++ return; + } +-} + +-static void *tcpx_conn_mgr_thread(void *data) +-{ +- struct tcpx_fabric *tcpx_fabric = (struct tcpx_fabric *) data; +- struct poll_fd_mgr *poll_mgr = &tcpx_fabric->poll_mgr; +- int ret; +- +- ret = poll_fd_resize(poll_mgr, 64); +- if (ret) { ++ handle = calloc(1, sizeof(*handle)); ++ if (!handle) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "poll_fd memory alloc failed\n"); +- return NULL; ++ "cannot allocate memory \n"); ++ goto err1; + } + +- poll_mgr->poll_fds[0].fd = poll_mgr->signal.fd[FI_READ_FD]; +- poll_mgr->poll_fds[0].events = POLLIN; +- poll_mgr->nfds = 1; ++ cm_ctx = calloc(1, sizeof(*cm_ctx)); ++ if (!cm_ctx) ++ goto err2; + +- while (poll_mgr->run) { +- ret = poll(poll_mgr->poll_fds, poll_mgr->nfds, -1); +- if (ret < 0) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "Poll failed\n"); +- break; +- } ++ handle->conn_fd = sock; ++ handle->handle.fclass = FI_CLASS_CONNREQ; ++ handle->pep = pep; ++ cm_ctx->fid = &handle->handle; ++ cm_ctx->type = SERVER_RECV_CONNREQ; ++ ++ ret = ofi_wait_fd_add(wait, sock, FI_EPOLL_IN, ++ tcpx_eq_wait_try_func, ++ NULL, (void *) cm_ctx); ++ if (ret) ++ goto err3; ++ wait->signal(wait); ++ return; ++err3: ++ free(cm_ctx); ++err2: ++ free(handle); ++err1: ++ ofi_close_socket(sock); ++} + +- if (poll_mgr->poll_fds[0].revents & POLLIN) { +- fd_signal_reset(&poll_mgr->signal); +- if (handle_poll_list(poll_mgr)) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "fd list add or remove failed\n"); +- } +- } +- handle_fd_events(poll_mgr); ++static void process_cm_ctx(struct util_wait *wait, ++ struct tcpx_cm_context *cm_ctx) ++{ ++ switch (cm_ctx->type) { ++ case SERVER_SOCK_ACCEPT: ++ server_sock_accept(wait,cm_ctx); ++ break; ++ case CLIENT_SEND_CONNREQ: ++ client_send_connreq(wait, cm_ctx); ++ break; ++ case SERVER_RECV_CONNREQ: ++ server_recv_connreq(wait, cm_ctx); ++ break; ++ case SERVER_SEND_CM_ACCEPT: ++ server_send_cm_accept(wait, cm_ctx); ++ break; ++ case CLIENT_RECV_CONNRESP: ++ client_recv_connresp(wait, cm_ctx); ++ break; ++ default: ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "should never end up here\n"); + } +- return NULL; + } + +-void tcpx_conn_mgr_close(struct tcpx_fabric *tcpx_fabric) ++void tcpx_conn_mgr_run(struct util_eq *eq) + { +- struct poll_fd_info *poll_info; ++ struct util_wait_fd *wait_fd; ++ void *wait_contexts[MAX_EPOLL_EVENTS]; ++ int num_fds = 0, i; + +- tcpx_fabric->poll_mgr.run = 0; +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); ++ assert(eq->wait != NULL); + +- if (tcpx_fabric->conn_mgr_thread && +- pthread_join(tcpx_fabric->conn_mgr_thread, NULL)) { +- FI_DBG(&tcpx_prov, FI_LOG_FABRIC, +- "cm thread failed to join\n"); +- } ++ wait_fd = container_of(eq->wait, struct util_wait_fd, ++ util_wait); + +- while (!dlist_empty(&tcpx_fabric->poll_mgr.list)) { +- poll_info = container_of(tcpx_fabric->poll_mgr.list.next, +- struct poll_fd_info, entry); +- dlist_remove(&poll_info->entry); +- assert(poll_info->flags & POLL_MGR_FREE); +- free(poll_info); +- } +- +- fastlock_destroy(&tcpx_fabric->poll_mgr.lock); +- fd_signal_free(&tcpx_fabric->poll_mgr.signal); +-} +- +-int tcpx_conn_mgr_init(struct tcpx_fabric *tcpx_fabric) +-{ +- int ret; ++ num_fds = fi_epoll_wait(wait_fd->epoll_fd, wait_contexts, ++ MAX_EPOLL_EVENTS, 0); ++ if (num_fds < 0) ++ return; + +- dlist_init(&tcpx_fabric->poll_mgr.list); +- fastlock_init(&tcpx_fabric->poll_mgr.lock); +- ret = fd_signal_init(&tcpx_fabric->poll_mgr.signal); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_FABRIC,"signal init failed\n"); +- goto err; +- } ++ for ( i = 0; i < num_fds; i++) { + +- tcpx_fabric->poll_mgr.run = 1; +- ret = pthread_create(&tcpx_fabric->conn_mgr_thread, 0, +- tcpx_conn_mgr_thread, (void *) tcpx_fabric); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_FABRIC, +- "Failed creating tcpx connection manager thread"); ++ /* skip wake up signals */ ++ if (&wait_fd->util_wait.wait_fid.fid == wait_contexts[i]) ++ continue; + +- goto err1; ++ process_cm_ctx(eq->wait, ++ (struct tcpx_cm_context *) ++ wait_contexts[i]); + } +- return 0; +-err1: +- fd_signal_free(&tcpx_fabric->poll_mgr.signal); +-err: +- fastlock_destroy(&tcpx_fabric->poll_mgr.lock); +- return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_cq.c +index e73578314..bad43f56e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_cq.c +@@ -35,45 +35,229 @@ + + #include "tcpx.h" + ++#define TCPX_DEF_CQ_SIZE (1024) ++ ++static void tcpx_buf_pools_destroy(struct tcpx_buf_pool *buf_pools) ++{ ++ int i; ++ ++ for (i = 0; i < TCPX_OP_CODE_MAX; i++) ++ util_buf_pool_destroy(buf_pools[i].pool); ++} ++ + static int tcpx_cq_close(struct fid *fid) + { + int ret; +- struct util_cq *cq; ++ struct tcpx_cq *tcpx_cq; + +- cq = container_of(fid, struct util_cq, cq_fid.fid); +- ret = ofi_cq_cleanup(cq); ++ tcpx_cq = container_of(fid, struct tcpx_cq, util_cq.cq_fid.fid); ++ tcpx_buf_pools_destroy(tcpx_cq->buf_pools); ++ ret = ofi_cq_cleanup(&tcpx_cq->util_cq); + if (ret) + return ret; +- free(cq); ++ ++ free(tcpx_cq); + return 0; + } + ++struct tcpx_xfer_entry *tcpx_xfer_entry_alloc(struct tcpx_cq *tcpx_cq, ++ enum tcpx_xfer_op_codes type) ++{ ++ struct tcpx_xfer_entry *xfer_entry; ++ ++ tcpx_cq->util_cq.cq_fastlock_acquire(&tcpx_cq->util_cq.cq_lock); ++ ++ /* optimization: don't allocate queue_entry when cq is full */ ++ if (ofi_cirque_isfull(tcpx_cq->util_cq.cirq)) { ++ tcpx_cq->util_cq.cq_fastlock_release(&tcpx_cq->util_cq.cq_lock); ++ return NULL; ++ } ++ ++ xfer_entry = util_buf_alloc(tcpx_cq->buf_pools[type].pool); ++ if (!xfer_entry) { ++ tcpx_cq->util_cq.cq_fastlock_release(&tcpx_cq->util_cq.cq_lock); ++ FI_INFO(&tcpx_prov, FI_LOG_DOMAIN,"failed to get buffer\n"); ++ return NULL; ++ } ++ tcpx_cq->util_cq.cq_fastlock_release(&tcpx_cq->util_cq.cq_lock); ++ return xfer_entry; ++} ++ ++void tcpx_xfer_entry_release(struct tcpx_cq *tcpx_cq, ++ struct tcpx_xfer_entry *xfer_entry) ++{ ++ if (xfer_entry->ep->cur_rx_entry == xfer_entry) { ++ xfer_entry->ep->cur_rx_entry = NULL; ++ } ++ tcpx_cq->util_cq.cq_fastlock_acquire(&tcpx_cq->util_cq.cq_lock); ++ util_buf_release(tcpx_cq->buf_pools[xfer_entry->msg_hdr.hdr.op_data].pool, ++ xfer_entry); ++ tcpx_cq->util_cq.cq_fastlock_release(&tcpx_cq->util_cq.cq_lock); ++} ++ ++void tcpx_cq_report_completion(struct util_cq *cq, ++ struct tcpx_xfer_entry *xfer_entry, ++ int err) ++{ ++ struct fi_cq_err_entry err_entry; ++ ++ if (!(xfer_entry->flags & FI_COMPLETION)) ++ return; ++ ++ if (err) { ++ err_entry.op_context = xfer_entry->context; ++ err_entry.flags = xfer_entry->flags; ++ err_entry.len = 0; ++ err_entry.buf = NULL; ++ err_entry.data = ntohll(xfer_entry->msg_hdr.hdr.data); ++ err_entry.tag = 0; ++ err_entry.olen = 0; ++ err_entry.err = err; ++ err_entry.prov_errno = ofi_sockerr(); ++ err_entry.err_data = NULL; ++ err_entry.err_data_size = 0; ++ ++ ofi_cq_write_error(cq, &err_entry); ++ } else { ++ ofi_cq_write(cq, xfer_entry->context, ++ xfer_entry->flags, 0, NULL, ++ ntohll(xfer_entry->msg_hdr.hdr.data), 0); ++ ++ if (cq->wait) ++ ofi_cq_signal(&cq->cq_fid); ++ } ++} ++ ++static int tcpx_cq_control(struct fid *fid, int command, void *arg) ++{ ++ struct util_cq *cq; ++ int ret; ++ ++ cq = container_of(fid, struct util_cq, cq_fid.fid); ++ ++ switch(command) { ++ case FI_GETWAIT: ++ if (!cq->wait) ++ return -FI_ENOSYS; ++ ++ ret = fi_control(&cq->wait->wait_fid.fid, ++ command, arg); ++ if (ret) ++ return ret; ++ ++ return FI_SUCCESS; ++ default: ++ return -FI_ENOSYS; ++ } ++} ++ + static struct fi_ops tcpx_cq_fi_ops = { + .size = sizeof(struct fi_ops), + .close = tcpx_cq_close, + .bind = fi_no_bind, +- .control = fi_no_control, ++ .control = tcpx_cq_control, + .ops_open = fi_no_ops_open, + }; + ++/* Using this function to preset some values of buffers managed by util_buf_pool api. ++ * Note that the util_buf_pool uses first sizeof(slist_entry) bytes in every buffer ++ * internally for keeping buf list. So don't try to set those values. They won't stick ++ */ ++static int tcpx_buf_pool_init(void *pool_ctx, void *addr, ++ size_t len, void **context) ++{ ++ struct tcpx_buf_pool *pool = (struct tcpx_buf_pool *)pool_ctx; ++ struct tcpx_xfer_entry *xfer_entry; ++ int i; ++ ++ for (i = 0; i < pool->pool->attr.chunk_cnt; i++) { ++ xfer_entry = (struct tcpx_xfer_entry *) ++ ((char *)addr + i * pool->pool->entry_sz); ++ ++ xfer_entry->msg_hdr.hdr.version = OFI_CTRL_VERSION; ++ xfer_entry->msg_hdr.hdr.op_data = pool->op_type; ++ switch (pool->op_type) { ++ case TCPX_OP_MSG_RECV: ++ case TCPX_OP_MSG_SEND: ++ case TCPX_OP_MSG_RESP: ++ xfer_entry->msg_hdr.hdr.op = ofi_op_msg; ++ break; ++ case TCPX_OP_WRITE: ++ case TCPX_OP_REMOTE_WRITE: ++ xfer_entry->msg_hdr.hdr.op = ofi_op_write; ++ break; ++ case TCPX_OP_READ_REQ: ++ xfer_entry->msg_hdr.hdr.op = ofi_op_read_req; ++ xfer_entry->msg_hdr.hdr.size = ++ htonll(sizeof(xfer_entry->msg_hdr)); ++ break; ++ case TCPX_OP_READ_RSP: ++ xfer_entry->msg_hdr.hdr.op = ofi_op_read_rsp; ++ break; ++ case TCPX_OP_REMOTE_READ: ++ break; ++ default: ++ assert(0); ++ break; ++ } ++ } ++ return FI_SUCCESS; ++} ++ ++static int tcpx_buf_pools_create(struct tcpx_buf_pool *buf_pools) ++{ ++ int i, ret; ++ ++ for (i = 0; i < TCPX_OP_CODE_MAX; i++) { ++ buf_pools[i].op_type = i; ++ ++ ret = util_buf_pool_create_ex(&buf_pools[i].pool, ++ sizeof(struct tcpx_xfer_entry), ++ 16, 0, 1024, tcpx_buf_pool_init, ++ NULL, &buf_pools[i]); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "Unable to create buf pool\n"); ++ goto err; ++ } ++ } ++ return 0; ++err: ++ while (i--) { ++ util_buf_pool_destroy(buf_pools[i].pool); ++ } ++ return -FI_ENOMEM; ++} ++ + int tcpx_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + struct fid_cq **cq_fid, void *context) + { + int ret; +- struct util_cq *cq; ++ struct tcpx_cq *tcpx_cq; + +- cq = calloc(1, sizeof(*cq)); +- if (!cq) ++ tcpx_cq = calloc(1, sizeof(*tcpx_cq)); ++ if (!tcpx_cq) + return -FI_ENOMEM; + +- ret = ofi_cq_init(&tcpx_prov, domain, attr, cq, +- &ofi_cq_progress, context); +- if (ret) { +- free(cq); +- return ret; +- } ++ if (!attr->size) ++ attr->size = TCPX_DEF_CQ_SIZE; ++ ++ ret = tcpx_buf_pools_create(tcpx_cq->buf_pools); ++ if (ret) ++ goto free_cq; + +- *cq_fid = &cq->cq_fid; ++ ret = ofi_cq_init(&tcpx_prov, domain, attr, &tcpx_cq->util_cq, ++ &ofi_cq_progress, context); ++ if (ret) ++ goto destroy_pool; ++ ++ *cq_fid = &tcpx_cq->util_cq.cq_fid; + (*cq_fid)->fid.ops = &tcpx_cq_fi_ops; + return 0; ++ ++destroy_pool: ++ tcpx_buf_pools_destroy(tcpx_cq->buf_pools); ++free_cq: ++ free(tcpx_cq); ++ return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_domain.c +index c1e3031ca..70f3f6429 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_domain.c +@@ -34,18 +34,82 @@ + #include + + #include "tcpx.h" ++extern struct fi_ops_msg tcpx_srx_msg_ops; + ++static int tcpx_srx_ctx_close(struct fid *fid) ++{ ++ struct tcpx_rx_ctx *srx_ctx; ++ struct slist_entry *entry; ++ struct tcpx_xfer_entry *xfer_entry; ++ ++ srx_ctx = container_of(fid, struct tcpx_rx_ctx, ++ rx_fid.fid); ++ ++ while (!slist_empty(&srx_ctx->rx_queue)) { ++ entry = slist_remove_head(&srx_ctx->rx_queue); ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ util_buf_release(srx_ctx->buf_pool, xfer_entry); ++ } ++ ++ fastlock_destroy(&srx_ctx->lock); ++ free(srx_ctx); ++ return FI_SUCCESS; ++} ++ ++static struct fi_ops fi_ops_srx_ctx = { ++ .size = sizeof(struct fi_ops), ++ .close = tcpx_srx_ctx_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static int tcpx_srx_ctx(struct fid_domain *domain, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context) ++{ ++ struct tcpx_rx_ctx *srx_ctx; ++ int ret = FI_SUCCESS; ++ ++ srx_ctx = calloc(1, sizeof(*srx_ctx)); ++ if (!srx_ctx) ++ return -FI_ENOMEM; ++ ++ srx_ctx->rx_fid.fid.fclass = FI_CLASS_SRX_CTX; ++ srx_ctx->rx_fid.fid.context = context; ++ srx_ctx->rx_fid.fid.ops = &fi_ops_srx_ctx; ++ ++ srx_ctx->rx_fid.msg = &tcpx_srx_msg_ops; ++ slist_init(&srx_ctx->rx_queue); ++ ++ ret = fastlock_init(&srx_ctx->lock); ++ if (ret) ++ goto err1; ++ ++ ret = util_buf_pool_create(&srx_ctx->buf_pool, ++ sizeof(struct tcpx_xfer_entry), ++ 16, 0, 1024); ++ if (ret) ++ goto err2; ++ ++ *rx_ep = &srx_ctx->rx_fid; ++ return FI_SUCCESS; ++err2: ++ fastlock_destroy(&srx_ctx->lock); ++err1: ++ free(srx_ctx); ++ return ret; ++} + + static struct fi_ops_domain tcpx_domain_ops = { + .size = sizeof(struct fi_ops_domain), +- .av_open = ip_av_create, ++ .av_open = ofi_ip_av_create, + .cq_open = tcpx_cq_open, + .endpoint = tcpx_endpoint, + .scalable_ep = fi_no_scalable_ep, + .cntr_open = fi_no_cntr_open, + .poll_open = fi_poll_create, + .stx_ctx = fi_no_stx_context, +- .srx_ctx = fi_no_srx_context, ++ .srx_ctx = tcpx_srx_ctx, + .query_atomic = fi_no_query_atomic, + }; + +@@ -57,10 +121,6 @@ static int tcpx_domain_close(fid_t fid) + tcpx_domain = container_of(fid, struct tcpx_domain, + util_domain.domain_fid.fid); + +- ret = tcpx_progress_close(&tcpx_domain->progress); +- if (ret) +- return ret; +- + ret = ofi_domain_close(&tcpx_domain->util_domain); + if (ret) + return ret; +@@ -77,6 +137,13 @@ static struct fi_ops tcpx_domain_fi_ops = { + .ops_open = fi_no_ops_open, + }; + ++static struct fi_ops_mr tcpx_domain_fi_ops_mr = { ++ .size = sizeof(struct fi_ops_mr), ++ .reg = ofi_mr_reg, ++ .regv = ofi_mr_regv, ++ .regattr = ofi_mr_regattr, ++}; ++ + int tcpx_domain_open(struct fid_fabric *fabric, struct fi_info *info, + struct fid_domain **domain, void *context) + { +@@ -93,22 +160,15 @@ int tcpx_domain_open(struct fid_fabric *fabric, struct fi_info *info, + + ret = ofi_domain_init(fabric, info, &tcpx_domain->util_domain, context); + if (ret) +- goto err1; ++ goto err; + + *domain = &tcpx_domain->util_domain.domain_fid; + (*domain)->fid.ops = &tcpx_domain_fi_ops; + (*domain)->ops = &tcpx_domain_ops; +- +- ret = tcpx_progress_init(&tcpx_domain->progress); +- if (ret) +- goto err2; ++ (*domain)->mr = &tcpx_domain_fi_ops_mr; + + return 0; +-err2: +- if (ofi_domain_close(&tcpx_domain->util_domain)) +- FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, +- "ofi_domain_close failed\n"); +-err1: ++err: + free(tcpx_domain); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_ep.c +index 23a93807b..86b3b4c1e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_ep.c +@@ -49,20 +49,61 @@ + #include + #include + ++extern struct fi_ops_rma tcpx_rma_ops; ++ ++static inline struct tcpx_xfer_entry * ++tcpx_alloc_recv_entry(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_cq *tcpx_cq; ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.rx_cq, struct tcpx_cq, ++ util_cq); ++ ++ recv_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_MSG_RECV); ++ if (recv_entry) { ++ recv_entry->ep = tcpx_ep; ++ recv_entry->done_len = 0; ++ } ++ return recv_entry; ++} ++ ++static inline struct tcpx_xfer_entry * ++tcpx_alloc_send_entry(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *send_entry; ++ struct tcpx_cq *tcpx_cq; ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ ++ send_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_MSG_SEND); ++ if (send_entry) { ++ send_entry->ep = tcpx_ep; ++ send_entry->done_len = 0; ++ } ++ return send_entry; ++} ++ ++static inline void tcpx_queue_recv(struct tcpx_ep *tcpx_ep, ++ struct tcpx_xfer_entry *recv_entry) ++{ ++ fastlock_acquire(&tcpx_ep->lock); ++ slist_insert_tail(&recv_entry->entry, &tcpx_ep->rx_queue); ++ fastlock_release(&tcpx_ep->lock); ++} ++ + static ssize_t tcpx_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, + uint64_t flags) + { +- struct tcpx_domain *tcpx_domain; +- struct tcpx_pe_entry *recv_entry; ++ struct tcpx_xfer_entry *recv_entry; + struct tcpx_ep *tcpx_ep; + + tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); +- tcpx_domain = container_of(tcpx_ep->util_ep.domain, +- struct tcpx_domain, util_domain); + +- assert(msg->iov_count < TCPX_IOV_LIMIT); ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); + +- recv_entry = pe_entry_alloc(&tcpx_domain->progress); ++ recv_entry = tcpx_alloc_recv_entry(tcpx_ep); + if (!recv_entry) + return -FI_EAGAIN; + +@@ -70,201 +111,283 @@ static ssize_t tcpx_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, + memcpy(&recv_entry->msg_data.iov[0], &msg->msg_iov[0], + msg->iov_count * sizeof(struct iovec)); + +- recv_entry->ep = tcpx_ep; +- recv_entry->flags = flags; ++ recv_entry->flags = ((tcpx_ep->util_ep.rx_op_flags & FI_COMPLETION) | ++ flags | FI_MSG | FI_RECV); + recv_entry->context = msg->context; +- recv_entry->done_len = 0; + +- dlist_insert_tail(&recv_entry->entry, &tcpx_ep->rx_queue); ++ tcpx_queue_recv(tcpx_ep, recv_entry); + return FI_SUCCESS; + } + + static ssize_t tcpx_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, + fi_addr_t src_addr, void *context) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_ep *tcpx_ep; + +- msg_iov.iov_base = buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = src_addr; +- msg.context = context; +- msg.data = 0; ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ++ recv_entry = tcpx_alloc_recv_entry(tcpx_ep); ++ if (!recv_entry) ++ return -FI_EAGAIN; + +- return tcpx_recvmsg(ep, &msg, 0); ++ recv_entry->msg_data.iov_cnt = 1; ++ recv_entry->msg_data.iov[0].iov_base = buf; ++ recv_entry->msg_data.iov[0].iov_len = len; ++ ++ recv_entry->flags = ((tcpx_ep->util_ep.rx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_RECV); ++ recv_entry->context = context; ++ ++ tcpx_queue_recv(tcpx_ep, recv_entry); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, + size_t count, fi_addr_t src_addr, void *context) + { +- struct fi_msg msg; ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_ep *tcpx_ep; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); + +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = src_addr; +- msg.context = context; +- msg.data = 0; +- return tcpx_recvmsg(ep, &msg, 0); ++ assert(count <= TCPX_IOV_LIMIT); ++ ++ recv_entry = tcpx_alloc_recv_entry(tcpx_ep); ++ if (!recv_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry->msg_data.iov_cnt = count; ++ memcpy(recv_entry->msg_data.iov, iov, count * sizeof(*iov)); ++ ++ recv_entry->flags = ((tcpx_ep->util_ep.rx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_RECV); ++ recv_entry->context = context; ++ ++ tcpx_queue_recv(tcpx_ep, recv_entry); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, + uint64_t flags) + { + struct tcpx_ep *tcpx_ep; +- struct tcpx_domain *tcpx_domain; +- struct tcpx_pe_entry *send_entry; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_xfer_entry *tx_entry; + uint64_t data_len; +- int ret = FI_SUCCESS; + + tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); +- tcpx_domain = container_of(tcpx_ep->util_ep.domain, +- struct tcpx_domain, util_domain); ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); + +- send_entry = pe_entry_alloc(&tcpx_domain->progress); +- if (!send_entry) +- return -FI_ENOMEM; +- +- if (msg->iov_count > TCPX_IOV_LIMIT) { +- ret = -FI_EINVAL; +- goto err; +- } ++ tx_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_MSG_SEND); ++ if (!tx_entry) ++ return -FI_EAGAIN; + ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); + data_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count); ++ assert(!(flags & FI_INJECT) || (data_len <= TCPX_MAX_INJECT_SZ)); ++ tx_entry->msg_hdr.hdr.size = htonll(data_len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_hdr.hdr.flags = 0; + +- if (flags & FI_INJECT) { +- if (data_len > TCPX_MAX_INJECT_SZ) +- return -FI_EINVAL; +- } +- send_entry->msg_hdr.version = OFI_CTRL_VERSION; +- send_entry->msg_hdr.op = ofi_op_msg; +- send_entry->msg_hdr.op_data = TCPX_OP_MSG_SEND; +- send_entry->msg_hdr.size = htonll(data_len + sizeof(send_entry->msg_hdr)); +- +- send_entry->msg_data.iov[0].iov_base = (void *) &send_entry->msg_hdr; +- send_entry->msg_data.iov[0].iov_len = sizeof(send_entry->msg_hdr); +- send_entry->msg_data.iov_cnt = msg->iov_count + 1; ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ tx_entry->msg_data.iov_cnt = msg->iov_count + 1; + + if (flags & FI_INJECT) { + ofi_copy_iov_buf(msg->msg_iov, msg->iov_count, 0, +- send_entry->msg_data.inject, ++ tx_entry->msg_data.inject, + data_len, + OFI_COPY_IOV_TO_BUF); + +- send_entry->msg_data.iov[1].iov_base = (void *)send_entry->msg_data.inject; +- send_entry->msg_data.iov[1].iov_len = data_len; +- send_entry->msg_data.iov_cnt = 2; ++ tx_entry->msg_data.iov[1].iov_base = (void *)tx_entry->msg_data.inject; ++ tx_entry->msg_data.iov[1].iov_len = data_len; ++ tx_entry->msg_data.iov_cnt = 2; + } else { +- memcpy(&send_entry->msg_data.iov[1], &msg->msg_iov[0], ++ memcpy(&tx_entry->msg_data.iov[1], &msg->msg_iov[0], + msg->iov_count * sizeof(struct iovec)); + + } + ++ tx_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ flags | FI_MSG | FI_SEND); ++ + if (flags & FI_REMOTE_CQ_DATA) { +- send_entry->msg_hdr.flags |= OFI_REMOTE_CQ_DATA; +- send_entry->msg_hdr.data = htonll(msg->data); ++ tx_entry->msg_hdr.hdr.flags |= OFI_REMOTE_CQ_DATA; ++ tx_entry->msg_hdr.hdr.data = htonll(msg->data); ++ } ++ ++ if (flags & (FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE)) { ++ tx_entry->msg_hdr.hdr.flags |= OFI_DELIVERY_COMPLETE; ++ tx_entry->flags &= ~FI_COMPLETION; + } + +- send_entry->msg_hdr.flags = htonl(send_entry->msg_hdr.flags); +- send_entry->ep = tcpx_ep; +- send_entry->context = msg->context; +- send_entry->done_len = 0; ++ tx_entry->msg_hdr.hdr.flags = htonl(tx_entry->msg_hdr.hdr.flags); ++ tx_entry->ep = tcpx_ep; ++ tx_entry->context = msg->context; ++ tx_entry->done_len = 0; + +- dlist_insert_tail(&send_entry->entry, &tcpx_ep->tx_queue); ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); + return FI_SUCCESS; +-err: +- pe_entry_release(send_entry); +- return ret; + } + + static ssize_t tcpx_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, + fi_addr_t dest_addr, void *context) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.desc = &desc; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = context; ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- return tcpx_sendmsg(ep, &msg, 0); ++ tx_entry->msg_hdr.hdr.size = htonll(len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ tx_entry->msg_data.iov[1].iov_base = (void *) buf; ++ tx_entry->msg_data.iov[1].iov_len = len; ++ tx_entry->msg_data.iov_cnt = 2; ++ tx_entry->context = context; ++ tx_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_SEND); ++ ++ tx_entry->msg_hdr.hdr.flags = 0; ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_sendv(struct fid_ep *ep, const struct iovec *iov, void **desc, + size_t count, fi_addr_t dest_addr, void *context) + { +- struct fi_msg msg; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; ++ uint64_t data_len; + +- msg.msg_iov = iov; +- msg.desc = desc; +- msg.iov_count = count; +- msg.addr = dest_addr; +- msg.context = context; ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- return tcpx_sendmsg(ep, &msg, 0); ++ assert(count <= TCPX_IOV_LIMIT); ++ data_len = ofi_total_iov_len(iov, count); ++ tx_entry->msg_hdr.hdr.size = htonll(data_len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ tx_entry->msg_data.iov_cnt = count + 1; ++ memcpy(&tx_entry->msg_data.iov[1], &iov[0], ++ count * sizeof(struct iovec)); ++ ++ tx_entry->msg_hdr.hdr.flags = 0; ++ tx_entry->context = context; ++ tx_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_SEND); ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + + static ssize_t tcpx_inject(struct fid_ep *ep, const void *buf, size_t len, + fi_addr_t dest_addr) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; +- msg.msg_iov = &msg_iov; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = NULL; ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- return tcpx_sendmsg(ep, &msg, FI_INJECT | TCPX_NO_COMPLETION); ++ assert(len <= TCPX_MAX_INJECT_SZ); ++ tx_entry->msg_hdr.hdr.size = htonll(len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ memcpy(tx_entry->msg_data.inject, (char *) buf, len); ++ tx_entry->msg_data.iov[1].iov_base = (void *)tx_entry->msg_data.inject; ++ tx_entry->msg_data.iov[1].iov_len = len; ++ tx_entry->msg_data.iov_cnt = 2; ++ ++ tx_entry->msg_hdr.hdr.flags = 0; ++ tx_entry->flags = FI_MSG | FI_SEND; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, + uint64_t data, fi_addr_t dest_addr, void *context) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ tx_entry->msg_hdr.hdr.size = htonll(len + sizeof(tx_entry->msg_hdr)); ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ tx_entry->msg_data.iov[1].iov_base = (void *) buf; ++ tx_entry->msg_data.iov[1].iov_len = len; ++ tx_entry->msg_data.iov_cnt = 2; + +- msg.msg_iov = &msg_iov; +- msg.desc = NULL; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = NULL; +- msg.data = data; ++ tx_entry->msg_hdr.hdr.flags = htonl(OFI_REMOTE_CQ_DATA); ++ tx_entry->msg_hdr.hdr.data = htonll(data); + +- return tcpx_sendmsg(ep, &msg, FI_REMOTE_CQ_DATA); ++ tx_entry->context = context; ++ tx_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ FI_MSG | FI_SEND); ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + static ssize_t tcpx_injectdata(struct fid_ep *ep, const void *buf, size_t len, + uint64_t data, fi_addr_t dest_addr) + { +- struct fi_msg msg; +- struct iovec msg_iov; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_xfer_entry *tx_entry; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ++ tx_entry = tcpx_alloc_send_entry(tcpx_ep); ++ if (!tx_entry) ++ return -FI_EAGAIN; + +- msg_iov.iov_base = (void *) buf; +- msg_iov.iov_len = len; ++ assert(len <= TCPX_MAX_INJECT_SZ); ++ tx_entry->msg_hdr.hdr.size = htonll(len + sizeof(tx_entry->msg_hdr)); + +- msg.msg_iov = &msg_iov; +- msg.desc = NULL; +- msg.iov_count = 1; +- msg.addr = dest_addr; +- msg.context = NULL; +- msg.data = 0; ++ tx_entry->msg_data.iov[0].iov_base = (void *) &tx_entry->msg_hdr; ++ tx_entry->msg_data.iov[0].iov_len = sizeof(tx_entry->msg_hdr); ++ memcpy(tx_entry->msg_data.inject, (char *) buf, len); ++ tx_entry->msg_data.iov[1].iov_base = (void *)tx_entry->msg_data.inject; ++ tx_entry->msg_data.iov[1].iov_len = len; ++ tx_entry->msg_data.iov_cnt = 2; + +- return tcpx_sendmsg(ep, &msg, FI_REMOTE_CQ_DATA | FI_INJECT | +- TCPX_NO_COMPLETION); ++ tx_entry->msg_hdr.hdr.flags = htonl(OFI_REMOTE_CQ_DATA); ++ tx_entry->msg_hdr.hdr.data = htonll(data); ++ tx_entry->flags = FI_MSG | FI_SEND ; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, tx_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; + } + + static struct fi_ops_msg tcpx_msg_ops = { +@@ -305,19 +428,14 @@ static int tcpx_ep_connect(struct fid_ep *ep, const void *addr, + const void *param, size_t paramlen) + { + struct tcpx_ep *tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); +- struct poll_fd_info *fd_info; +- struct util_fabric *util_fabric; +- struct tcpx_fabric *tcpx_fabric; ++ struct tcpx_cm_context *cm_ctx; + int ret; + +- util_fabric = tcpx_ep->util_ep.domain->fabric; +- tcpx_fabric = container_of(util_fabric, struct tcpx_fabric, util_fabric); +- + if (!addr || !tcpx_ep->conn_fd || paramlen > TCPX_MAX_CM_DATA_SIZE) + return -FI_EINVAL; + +- fd_info = calloc(1, sizeof(*fd_info)); +- if (!fd_info) { ++ cm_ctx = calloc(1, sizeof(*cm_ctx)); ++ if (!cm_ctx) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, + "cannot allocate memory \n"); + return -FI_ENOMEM; +@@ -325,91 +443,163 @@ static int tcpx_ep_connect(struct fid_ep *ep, const void *addr, + + ret = connect(tcpx_ep->conn_fd, (struct sockaddr *) addr, + (socklen_t) ofi_sizeofaddr(addr)); +- if (ret && errno != FI_EINPROGRESS) { +- free(fd_info); +- return -errno; ++ if (ret && ofi_sockerr() != FI_EINPROGRESS) { ++ ret = -ofi_sockerr(); ++ goto err; + } + +- fd_info->fid = &tcpx_ep->util_ep.ep_fid.fid; +- fd_info->flags = POLL_MGR_FREE; +- fd_info->type = CONNECT_SOCK; +- fd_info->state = ESTABLISH_CONN; ++ cm_ctx->fid = &tcpx_ep->util_ep.ep_fid.fid; ++ cm_ctx->type = CLIENT_SEND_CONNREQ; + + if (paramlen) { +- fd_info->cm_data_sz = paramlen; +- memcpy(fd_info->cm_data, param, paramlen); ++ cm_ctx->cm_data_sz = paramlen; ++ memcpy(cm_ctx->cm_data, param, paramlen); + } + +- fastlock_acquire(&tcpx_fabric->poll_mgr.lock); +- dlist_insert_tail(&fd_info->entry, &tcpx_fabric->poll_mgr.list); +- fastlock_release(&tcpx_fabric->poll_mgr.lock); +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); ++ ret = ofi_wait_fd_add(tcpx_ep->util_ep.eq->wait, tcpx_ep->conn_fd, ++ FI_EPOLL_OUT, tcpx_eq_wait_try_func, NULL,cm_ctx); ++ if (ret) ++ goto err; ++ ++ tcpx_ep->util_ep.eq->wait->signal(tcpx_ep->util_ep.eq->wait); + return 0; ++err: ++ free(cm_ctx); ++ return ret; + } + + static int tcpx_ep_accept(struct fid_ep *ep, const void *param, size_t paramlen) + { + struct tcpx_ep *tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); +- struct poll_fd_info *fd_info; +- struct util_fabric *util_fabric; +- struct tcpx_fabric *tcpx_fabric; +- +- util_fabric = tcpx_ep->util_ep.domain->fabric; +- tcpx_fabric = container_of(util_fabric, struct tcpx_fabric, util_fabric); ++ struct tcpx_cm_context *cm_ctx; ++ int ret; + + if (tcpx_ep->conn_fd == INVALID_SOCKET) + return -FI_EINVAL; + +- fd_info = calloc(1, sizeof(*fd_info)); +- if (!fd_info) { ++ cm_ctx = calloc(1, sizeof(*cm_ctx)); ++ if (!cm_ctx) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, + "cannot allocate memory \n"); + return -FI_ENOMEM; + } + +- fd_info->fid = &tcpx_ep->util_ep.ep_fid.fid; +- fd_info->flags = POLL_MGR_FREE; +- fd_info->type = ACCEPT_SOCK; ++ cm_ctx->fid = &tcpx_ep->util_ep.ep_fid.fid; ++ cm_ctx->type = SERVER_SEND_CM_ACCEPT; + if (paramlen) { +- fd_info->cm_data_sz = paramlen; +- memcpy(fd_info->cm_data, param, paramlen); ++ cm_ctx->cm_data_sz = paramlen; ++ memcpy(cm_ctx->cm_data, param, paramlen); + } + +- fastlock_acquire(&tcpx_fabric->poll_mgr.lock); +- dlist_insert_tail(&fd_info->entry, &tcpx_fabric->poll_mgr.list); +- fastlock_release(&tcpx_fabric->poll_mgr.lock); +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); ++ ret = ofi_wait_fd_add(tcpx_ep->util_ep.eq->wait, tcpx_ep->conn_fd, ++ FI_EPOLL_OUT, tcpx_eq_wait_try_func, NULL, cm_ctx); ++ if (ret) { ++ free(cm_ctx); ++ return ret; ++ } ++ tcpx_ep->util_ep.eq->wait->signal(tcpx_ep->util_ep.eq->wait); + return 0; + } + + static int tcpx_ep_shutdown(struct fid_ep *ep, uint64_t flags) + { + struct tcpx_ep *tcpx_ep; +- struct fi_eq_cm_entry eq_entry; + int ret; + + tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); + + ret = ofi_shutdown(tcpx_ep->conn_fd, SHUT_RDWR); +- if (ret && errno != ENOTCONN) { ++ if (ret && ofi_sockerr() != ENOTCONN) { + FI_WARN(&tcpx_prov, FI_LOG_EP_DATA, "ep shutdown unsuccessful\n"); +- return -errno; + } + +- eq_entry.fid = &ep->fid; +- ret = fi_eq_write(&tcpx_ep->util_ep.eq->eq_fid, FI_SHUTDOWN, +- &eq_entry, sizeof(eq_entry), 0); +- if (ret < 0) { ++ fastlock_acquire(&tcpx_ep->lock); ++ ret = tcpx_ep_shutdown_report(tcpx_ep, &ep->fid); ++ fastlock_release(&tcpx_ep->lock); ++ if (ret) { + FI_WARN(&tcpx_prov, FI_LOG_EP_DATA, "Error writing to EQ\n"); + } ++ ++ return ret; ++} ++ ++static int tcpx_pep_sock_create(struct tcpx_pep *pep) ++{ ++ int ret, af; ++ ++ switch (pep->info.addr_format) { ++ case FI_SOCKADDR: ++ case FI_SOCKADDR_IN: ++ case FI_SOCKADDR_IN6: ++ af = ((struct sockaddr *)pep->info.src_addr)->sa_family; ++ break; ++ default: ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "invalid source address format\n"); ++ return -FI_EINVAL; ++ } ++ ++ pep->sock = ofi_socket(af, SOCK_STREAM, 0); ++ if (pep->sock == INVALID_SOCKET) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "failed to create listener: %s\n", ++ strerror(ofi_sockerr())); ++ return -FI_EIO; ++ } ++ ++ ret = tcpx_setup_socket(pep->sock); ++ if (ret) { ++ goto err; ++ } ++ ++ ret = bind(pep->sock, pep->info.src_addr, ++ (socklen_t) pep->info.src_addrlen); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, ++ "failed to bind listener: %s\n", ++ strerror(ofi_sockerr())); ++ goto err; ++ } + return FI_SUCCESS; ++err: ++ ofi_close_socket(pep->sock); ++ pep->sock = INVALID_SOCKET; ++ return ret; ++} ++ ++static int tcpx_ep_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ struct tcpx_ep *tcpx_ep; ++ size_t addrlen_in = *addrlen; ++ int ret; ++ ++ tcpx_ep = container_of(fid, struct tcpx_ep, util_ep.ep_fid); ++ ret = ofi_getsockname(tcpx_ep->conn_fd, addr, (socklen_t *)addrlen); ++ if (ret) ++ return -ofi_sockerr(); ++ ++ return (addrlen_in < *addrlen)? -FI_ETOOSMALL: FI_SUCCESS; ++} ++ ++static int tcpx_ep_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) ++{ ++ struct tcpx_ep *tcpx_ep; ++ size_t addrlen_in = *addrlen; ++ int ret; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ ret = ofi_getpeername(tcpx_ep->conn_fd, addr, (socklen_t *)addrlen); ++ if (ret) ++ return -ofi_sockerr(); ++ ++ return (addrlen_in < *addrlen)? -FI_ETOOSMALL: FI_SUCCESS; + } + + static struct fi_ops_cm tcpx_cm_ops = { + .size = sizeof(struct fi_ops_cm), + .setname = fi_no_setname, +- .getname = fi_no_getname, +- .getpeer = fi_no_getpeer, ++ .getname = tcpx_ep_getname, ++ .getpeer = tcpx_ep_getpeer, + .connect = tcpx_ep_connect, + .listen = fi_no_listen, + .accept = tcpx_ep_accept, +@@ -418,39 +608,65 @@ static struct fi_ops_cm tcpx_cm_ops = { + .join = fi_no_join, + }; + +-static void tcpx_ep_tx_rx_queues_release(struct tcpx_ep *ep, +- struct tcpx_progress *progress) ++static void tcpx_ep_tx_rx_queues_release(struct tcpx_ep *ep) + { +- struct dlist_entry *entry; +- struct tcpx_pe_entry *pe_entry; ++ struct slist_entry *entry; ++ struct tcpx_xfer_entry *xfer_entry; ++ struct tcpx_cq *tcpx_cq; ++ ++ fastlock_acquire(&ep->lock); ++ while (!slist_empty(&ep->tx_queue)) { ++ entry = ep->tx_queue.head; ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ slist_remove_head(&ep->tx_queue); ++ tcpx_cq = container_of(xfer_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, xfer_entry); ++ } ++ ++ while (!slist_empty(&ep->rx_queue)) { ++ entry = ep->rx_queue.head; ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ slist_remove_head(&ep->rx_queue); ++ tcpx_cq = container_of(xfer_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, xfer_entry); ++ } + +- while (!dlist_empty(&ep->tx_queue)) { +- entry = ep->tx_queue.next; +- pe_entry = container_of(entry, struct tcpx_pe_entry, entry); +- dlist_remove(entry); +- pe_entry_release(pe_entry); ++ while (!slist_empty(&ep->rma_read_queue)) { ++ entry = ep->rma_read_queue.head; ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ slist_remove_head(&ep->rma_read_queue); ++ tcpx_cq = container_of(xfer_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, xfer_entry); + } + +- while (!dlist_empty(&ep->rx_queue)) { +- entry = ep->rx_queue.next; +- pe_entry = container_of(entry, struct tcpx_pe_entry, entry); +- dlist_remove(entry); +- pe_entry_release(pe_entry); ++ while (!slist_empty(&ep->tx_rsp_pend_queue)) { ++ entry = ep->tx_rsp_pend_queue.head; ++ xfer_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ slist_remove_head(&ep->tx_rsp_pend_queue); ++ tcpx_cq = container_of(xfer_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, xfer_entry); + } ++ ++ fastlock_release(&ep->lock); + } + + static int tcpx_ep_close(struct fid *fid) + { +- struct tcpx_ep *ep; +- struct tcpx_domain *tcpx_domain; ++ struct tcpx_ep *ep = container_of(fid, struct tcpx_ep, ++ util_ep.ep_fid.fid); + +- ep = container_of(fid, struct tcpx_ep, util_ep.ep_fid.fid); +- tcpx_domain = container_of(ep->util_ep.domain, +- struct tcpx_domain, util_domain); ++ tcpx_ep_tx_rx_queues_release(ep); ++ tcpx_cq_wait_ep_del(ep); ++ if (ep->util_ep.eq->wait) ++ ofi_wait_fd_del(ep->util_ep.eq->wait, ep->conn_fd); + +- tcpx_ep_tx_rx_queues_release(ep, &tcpx_domain->progress); + ofi_close_socket(ep->conn_fd); + ofi_endpoint_close(&ep->util_ep); ++ fastlock_destroy(&ep->lock); + + free(ep); + return 0; +@@ -473,10 +689,18 @@ static int tcpx_ep_ctrl(struct fid *fid, int command, void *arg) + } + static int tcpx_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { +- struct util_ep *util_ep; ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_rx_ctx *rx_ctx; ++ ++ tcpx_ep = container_of(fid, struct tcpx_ep, util_ep.ep_fid.fid); ++ ++ if (bfid->fclass == FI_CLASS_SRX_CTX) { ++ rx_ctx = container_of(bfid, struct tcpx_rx_ctx, rx_fid.fid); ++ tcpx_ep->srx_ctx = rx_ctx; ++ return FI_SUCCESS; ++ } + +- util_ep = container_of(fid, struct util_ep, ep_fid.fid); +- return ofi_ep_bind(util_ep, bfid, flags); ++ return ofi_ep_bind(&tcpx_ep->util_ep, bfid, flags); + } + + static struct fi_ops tcpx_ep_fi_ops = { +@@ -518,12 +742,17 @@ static struct fi_ops_ep tcpx_ep_ops = { + .tx_size_left = fi_no_tx_size_left, + }; + ++static void tcpx_empty_progress(struct tcpx_ep *ep) ++{ ++} ++ + int tcpx_endpoint(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep_fid, void *context) + { + struct tcpx_ep *ep; ++ struct tcpx_pep *pep; + struct tcpx_conn_handle *handle; +- int af, ret; ++ int ret; + + ep = calloc(1, sizeof(*ep)); + if (!ep) +@@ -535,37 +764,61 @@ int tcpx_endpoint(struct fid_domain *domain, struct fi_info *info, + goto err1; + + if (info->handle) { +- handle = container_of(info->handle, struct tcpx_conn_handle, +- handle); +- ep->conn_fd = handle->conn_fd; +- free(handle); ++ if (((fid_t) info->handle)->fclass == FI_CLASS_PEP) { ++ pep = container_of(info->handle, struct tcpx_pep, ++ util_pep.pep_fid.fid); ++ ++ ep->conn_fd = pep->sock; ++ pep->sock = INVALID_SOCKET; ++ } else { ++ handle = container_of(info->handle, ++ struct tcpx_conn_handle, handle); ++ ep->conn_fd = handle->conn_fd; ++ free(handle); ++ ++ ret = tcpx_setup_socket(ep->conn_fd); ++ if (ret) ++ goto err3; ++ } + } else { +- if (info->src_addr) +- af = ((const struct sockaddr *) info->src_addr)->sa_family; +- else if (info->dest_addr) +- af = ((const struct sockaddr *) info->dest_addr)->sa_family; +- else +- af = ofi_get_sa_family(info->addr_format); +- +- ep->conn_fd = ofi_socket(af, SOCK_STREAM, 0); ++ ep->conn_fd = ofi_socket(ofi_get_sa_family(info), SOCK_STREAM, 0); + if (ep->conn_fd == INVALID_SOCKET) { +- ret = -errno; ++ ret = -ofi_sockerr(); + goto err2; + } ++ ++ ret = tcpx_setup_socket(ep->conn_fd); ++ if (ret) ++ goto err3; + } +- ret = tcpx_setup_socket(ep->conn_fd); ++ ++ ep->cm_state = TCPX_EP_CONNECTING; ++ ep->progress_func = tcpx_empty_progress; ++ ret = fastlock_init(&ep->lock); + if (ret) + goto err3; + +- dlist_init(&ep->rx_queue); +- dlist_init(&ep->tx_queue); ++ ep->stage_buf.size = STAGE_BUF_SIZE; ++ ep->stage_buf.len = 0; ++ ep->stage_buf.off = 0; ++ ++ slist_init(&ep->rx_queue); ++ slist_init(&ep->tx_queue); ++ slist_init(&ep->rma_read_queue); ++ slist_init(&ep->tx_rsp_pend_queue); + + *ep_fid = &ep->util_ep.ep_fid; + (*ep_fid)->fid.ops = &tcpx_ep_fi_ops; + (*ep_fid)->ops = &tcpx_ep_ops; + (*ep_fid)->cm = &tcpx_cm_ops; + (*ep_fid)->msg = &tcpx_msg_ops; ++ (*ep_fid)->rma = &tcpx_rma_ops; + ++ ep->get_rx_entry[ofi_op_msg] = tcpx_get_rx_entry_op_msg; ++ ep->get_rx_entry[ofi_op_tagged] = tcpx_get_rx_entry_op_invalid; ++ ep->get_rx_entry[ofi_op_read_req] = tcpx_get_rx_entry_op_read_req; ++ ep->get_rx_entry[ofi_op_read_rsp] = tcpx_get_rx_entry_op_read_rsp; ++ ep->get_rx_entry[ofi_op_write] =tcpx_get_rx_entry_op_write; + return 0; + err3: + ofi_close_socket(ep->conn_fd); +@@ -579,25 +832,12 @@ err1: + static int tcpx_pep_fi_close(struct fid *fid) + { + struct tcpx_pep *pep; +- struct tcpx_fabric *tcpx_fabric; + + pep = container_of(fid, struct tcpx_pep, util_pep.pep_fid.fid); ++ if (pep->util_pep.eq) ++ ofi_wait_fd_del(pep->util_pep.eq->wait, pep->sock); + +- tcpx_fabric = container_of(pep->util_pep.fabric, struct tcpx_fabric, +- util_fabric); +- +- /* It's possible to close the PEP before adding completes */ +- fastlock_acquire(&tcpx_fabric->poll_mgr.lock); +- pep->poll_info.flags = POLL_MGR_DEL; +- if (pep->poll_info.entry.next == pep->poll_info.entry.prev) +- dlist_insert_tail(&pep->poll_info.entry, &tcpx_fabric->poll_mgr.list); +- +- fastlock_release(&tcpx_fabric->poll_mgr.lock); +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); +- +- while (!(pep->poll_info.flags & POLL_MGR_ACK)) +- sleep(0); +- ++ ofi_close_socket(pep->sock); + ofi_pep_close(&pep->util_pep); + free(pep); + return 0; +@@ -628,48 +868,88 @@ static struct fi_ops tcpx_pep_fi_ops = { + .ops_open = fi_no_ops_open, + }; + ++static int tcpx_pep_setname(fid_t fid, void *addr, size_t addrlen) ++{ ++ struct tcpx_pep *tcpx_pep; ++ ++ if ((addrlen != sizeof(struct sockaddr_in)) && ++ (addrlen != sizeof(struct sockaddr_in6))) ++ return -FI_EINVAL; ++ ++ tcpx_pep = container_of(fid, struct tcpx_pep, ++ util_pep.pep_fid); ++ ++ if (tcpx_pep->sock != INVALID_SOCKET) { ++ ofi_close_socket(tcpx_pep->sock); ++ tcpx_pep->sock = INVALID_SOCKET; ++ } ++ ++ if (tcpx_pep->info.src_addr) { ++ free(tcpx_pep->info.src_addr); ++ tcpx_pep->info.src_addrlen = 0; ++ } ++ ++ ++ tcpx_pep->info.src_addr = mem_dup(addr, addrlen); ++ if (!tcpx_pep->info.src_addr) ++ return -FI_ENOMEM; ++ tcpx_pep->info.src_addrlen = addrlen; ++ ++ return tcpx_pep_sock_create(tcpx_pep); ++} ++ ++static int tcpx_pep_getname(fid_t fid, void *addr, size_t *addrlen) ++{ ++ struct tcpx_pep *tcpx_pep; ++ size_t addrlen_in = *addrlen; ++ int ret; ++ ++ tcpx_pep = container_of(fid, struct tcpx_pep, util_pep.pep_fid); ++ ret = ofi_getsockname(tcpx_pep->sock, addr, (socklen_t *)addrlen); ++ if (ret) ++ return -ofi_sockerr(); ++ ++ return (addrlen_in < *addrlen)? -FI_ETOOSMALL: FI_SUCCESS; ++} ++ + static int tcpx_pep_listen(struct fid_pep *pep) + { + struct tcpx_pep *tcpx_pep; +- struct tcpx_fabric *tcpx_fabric; ++ int ret; + + tcpx_pep = container_of(pep,struct tcpx_pep, util_pep.pep_fid); +- tcpx_fabric = container_of(tcpx_pep->util_pep.fabric, +- struct tcpx_fabric, util_fabric); + + if (listen(tcpx_pep->sock, SOMAXCONN)) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, + "socket listen failed\n"); +- return -errno; ++ return -ofi_sockerr(); + } + +- fastlock_acquire(&tcpx_fabric->poll_mgr.lock); +- dlist_insert_tail(&tcpx_pep->poll_info.entry, &tcpx_fabric->poll_mgr.list); +- fastlock_release(&tcpx_fabric->poll_mgr.lock); +- fd_signal_set(&tcpx_fabric->poll_mgr.signal); ++ ret = ofi_wait_fd_add(tcpx_pep->util_pep.eq->wait, tcpx_pep->sock, ++ FI_EPOLL_IN, tcpx_eq_wait_try_func, ++ NULL, &tcpx_pep->cm_ctx); + +- return 0; ++ tcpx_pep->util_pep.eq->wait->signal(tcpx_pep->util_pep.eq->wait); ++ return ret; + } + + static int tcpx_pep_reject(struct fid_pep *pep, fid_t handle, +- const void *param, size_t paramlen) ++ const void *param, size_t paramlen) + { + struct ofi_ctrl_hdr hdr; + struct tcpx_conn_handle *tcpx_handle; ++ int ret; + + tcpx_handle = container_of(handle, struct tcpx_conn_handle, handle); + + memset(&hdr, 0, sizeof(hdr)); + hdr.version = OFI_CTRL_VERSION; + hdr.type = ofi_ctrl_nack; +- hdr.seg_size = paramlen; ++ hdr.seg_size = htons((uint16_t) paramlen); + +- ofi_send_socket(tcpx_handle->conn_fd, &hdr, +- sizeof(hdr), 0); +- +- if (paramlen) +- ofi_send_socket(tcpx_handle->conn_fd, param, +- paramlen, 0); ++ ret = ofi_sendall_socket(tcpx_handle->conn_fd, &hdr, sizeof(hdr)); ++ if (!ret && paramlen) ++ (void) ofi_sendall_socket(tcpx_handle->conn_fd, param, paramlen); + + ofi_shutdown(tcpx_handle->conn_fd, SHUT_RDWR); + return ofi_close_socket(tcpx_handle->conn_fd); +@@ -677,8 +957,8 @@ static int tcpx_pep_reject(struct fid_pep *pep, fid_t handle, + + static struct fi_ops_cm tcpx_pep_cm_ops = { + .size = sizeof(struct fi_ops_cm), +- .setname = fi_no_setname, +- .getname = fi_no_getname, ++ .setname = tcpx_pep_setname, ++ .getname = tcpx_pep_getname, + .getpeer = fi_no_getpeer, + .connect = fi_no_connect, + .listen = tcpx_pep_listen, +@@ -726,15 +1006,11 @@ int tcpx_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + struct fid_pep **pep, void *context) + { + struct tcpx_pep *_pep; +- struct addrinfo hints, *result, *iter; +- char sa_ip[INET_ADDRSTRLEN] = {0}; +- char sa_port[NI_MAXSERV] = {0}; + int ret; + + if (!info) { + FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL,"invalid info\n"); + return -FI_EINVAL; +- + } + + ret = tcpx_verify_info(fabric->api_version, info); +@@ -749,89 +1025,25 @@ int tcpx_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + if (ret) + goto err1; + ++ _pep->util_pep.pep_fid.fid.ops = &tcpx_pep_fi_ops; ++ _pep->util_pep.pep_fid.cm = &tcpx_pep_cm_ops; ++ _pep->util_pep.pep_fid.ops = &tcpx_pep_ops; ++ ++ + _pep->info = *info; +- _pep->poll_info.fid = &_pep->util_pep.pep_fid.fid; +- _pep->poll_info.type = PASSIVE_SOCK; +- _pep->poll_info.flags = 0; +- _pep->poll_info.cm_data_sz = 0; +- dlist_init(&_pep->poll_info.entry); ++ _pep->cm_ctx.fid = &_pep->util_pep.pep_fid.fid; ++ _pep->cm_ctx.type = SERVER_SOCK_ACCEPT; ++ _pep->cm_ctx.cm_data_sz = 0; + _pep->sock = INVALID_SOCKET; + +- memset(&hints, 0, sizeof(hints)); +- hints.ai_family = AF_INET; +- hints.ai_socktype = SOCK_STREAM; +- hints.ai_flags = AI_PASSIVE; ++ *pep = &_pep->util_pep.pep_fid; + + if (info->src_addr) { +- switch (info->addr_format) { +- case FI_SOCKADDR: +- case FI_SOCKADDR_IN: +- case FI_SOCKADDR_IN6: +- ret = getnameinfo(info->src_addr, +- (socklen_t) info->src_addrlen, +- sa_ip, INET_ADDRSTRLEN, +- sa_port, NI_MAXSERV, 0); +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "pep initialization failed\n"); +- goto err2; +- } +- break; +- default: +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "invalid source address format\n"); +- ret = -FI_EINVAL; ++ ret = tcpx_pep_sock_create(_pep); ++ if (ret) + goto err2; +- } +- ret = getaddrinfo(sa_ip, sa_port, &hints, &result); +- } else { +- ret = getaddrinfo("localhost", NULL, &hints, &result); +- } +- +- if (ret) { +- ret = -FI_EINVAL; +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL,"getaddrinfo failed"); +- goto err2; +- } +- +- for (iter = result; iter; iter = iter->ai_next) { +- _pep->sock = ofi_socket(iter->ai_family, iter->ai_socktype, +- iter->ai_protocol); +- if (_pep->sock == INVALID_SOCKET) +- continue; +- +- ret = tcpx_setup_socket(_pep->sock); +- if (ret) { +- ofi_close_socket(_pep->sock); +- _pep->sock = INVALID_SOCKET; +- continue; +- } +- +- if (bind(_pep->sock, result->ai_addr, +- (socklen_t) result->ai_addrlen)) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "failed to bind listener: %s\n", strerror(errno)); +- ofi_close_socket(_pep->sock); +- _pep->sock = INVALID_SOCKET; +- } else { +- break; +- } + } +- freeaddrinfo(result); +- +- if (_pep->sock == INVALID_SOCKET) { +- FI_WARN(&tcpx_prov, FI_LOG_EP_CTRL, +- "failed to create listener: %s\n", strerror(errno)); +- ret = -FI_EIO; +- goto err2; +- } +- +- _pep->util_pep.pep_fid.fid.ops = &tcpx_pep_fi_ops; +- _pep->util_pep.pep_fid.cm = &tcpx_pep_cm_ops; +- _pep->util_pep.pep_fid.ops = &tcpx_pep_ops; +- +- *pep = &_pep->util_pep.pep_fid; +- return 0; ++ return FI_SUCCESS; + err2: + ofi_pep_close(&_pep->util_pep); + err1: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_eq.c +new file mode 100644 +index 000000000..8e7b16b5d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_eq.c +@@ -0,0 +1,99 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++ ++#include "tcpx.h" ++ ++static ssize_t tcpx_eq_read(struct fid_eq *eq_fid, uint32_t *event, ++ void *buf, size_t len, uint64_t flags) ++{ ++ struct util_eq *eq; ++ ++ eq = container_of(eq_fid, struct util_eq, eq_fid); ++ ++ fastlock_acquire(&eq->lock); ++ if (slist_empty(&eq->list)) { ++ fastlock_release(&eq->lock); ++ tcpx_conn_mgr_run(eq); ++ } else { ++ fastlock_release(&eq->lock); ++ } ++ return ofi_eq_read(eq_fid, event, buf, len, flags); ++} ++ ++static struct fi_ops_eq tcpx_eq_ops = { ++ .size = sizeof(struct fi_ops_eq), ++ .read = tcpx_eq_read, ++ .readerr = ofi_eq_readerr, ++ .sread = ofi_eq_sread, ++ .write = ofi_eq_write, ++ .strerror = ofi_eq_strerror, ++}; ++ ++int tcpx_eq_create(struct fid_fabric *fabric_fid, struct fi_eq_attr *attr, ++ struct fid_eq **eq_fid, void *context) ++{ ++ struct util_eq *eq; ++ struct fi_wait_attr wait_attr; ++ struct fid_wait *wait; ++ int ret; ++ ++ ret = ofi_eq_create(fabric_fid, attr, eq_fid, context); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EQ, ++ "EQ creation failed\n"); ++ return ret; ++ } ++ ++ eq = container_of(*eq_fid, struct util_eq, eq_fid); ++ eq->eq_fid.ops = &tcpx_eq_ops; ++ ++ if (!eq->wait) { ++ memset(&wait_attr, 0, sizeof wait_attr); ++ wait_attr.wait_obj = FI_WAIT_FD; ++ ret = fi_wait_open(fabric_fid, &wait_attr, &wait); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_EQ, ++ "opening wait failed\n"); ++ goto err; ++ } ++ eq->internal_wait = 1; ++ eq->wait = container_of(wait, struct util_wait, ++ wait_fid); ++ } ++ return 0; ++err: ++ fi_close(&eq->eq_fid.fid); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_fabric.c +index 8e8fbddd2..3ff1b87f1 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_fabric.c +@@ -45,7 +45,7 @@ struct fi_ops_fabric tcpx_fabric_ops = { + .size = sizeof(struct fi_ops_fabric), + .domain = tcpx_domain_open, + .passive_ep = tcpx_passive_ep, +- .eq_open = ofi_eq_create, ++ .eq_open = tcpx_eq_create, + .wait_open = ofi_wait_fd_open, + .trywait = ofi_trywait + }; +@@ -58,7 +58,6 @@ static int tcpx_fabric_close(fid_t fid) + tcpx_fabric = container_of(fid, struct tcpx_fabric, + util_fabric.fabric_fid.fid); + +- tcpx_conn_mgr_close(tcpx_fabric); + ret = ofi_fabric_close(&tcpx_fabric->util_fabric); + if (ret) + return ret; +@@ -87,21 +86,14 @@ int tcpx_create_fabric(struct fi_fabric_attr *attr, struct fid_fabric **fabric, + + ret = ofi_fabric_init(&tcpx_prov, tcpx_info.fabric_attr, attr, + &tcpx_fabric->util_fabric, context); +- if (ret) +- goto err; ++ if (ret) { ++ free(tcpx_fabric); ++ return ret; ++ } + + *fabric = &tcpx_fabric->util_fabric.fabric_fid; + (*fabric)->fid.ops = &tcpx_fabric_fi_ops; + (*fabric)->ops = &tcpx_fabric_ops; + +- ret = tcpx_conn_mgr_init(tcpx_fabric); +- if (ret) +- goto err1; +- + return 0; +-err1: +- ofi_fabric_close(&tcpx_fabric->util_fabric); +-err: +- free(tcpx_fabric); +- return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_init.c +index e40182e8e..78b532e83 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_init.c +@@ -44,12 +44,15 @@ + #if HAVE_GETIFADDRS + static void tcpx_getinfo_ifs(struct fi_info **info) + { ++ char *tcpx_interface_name = NULL; + struct ifaddrs *ifaddrs, *ifa; + struct fi_info *head, *tail, *cur, *loopback; + size_t addrlen; + uint32_t addr_format; + int ret; + ++ fi_param_get_str(&tcpx_prov, "iface", &tcpx_interface_name); ++ + ret = ofi_getifaddrs(&ifaddrs); + if (ret) + return; +@@ -58,6 +61,18 @@ static void tcpx_getinfo_ifs(struct fi_info **info) + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { + if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP)) + continue; ++ if (tcpx_interface_name) { ++ if (strncmp(tcpx_interface_name, ifa->ifa_name, ++ strlen(tcpx_interface_name)) != 0) { ++ FI_DBG(&tcpx_prov, FI_LOG_CORE, ++ "Skip (%s) interface\n", ifa->ifa_name); ++ continue; ++ } else { ++ FI_DBG(&tcpx_prov, FI_LOG_CORE, ++ "Matching interface (%s) found\n", ++ ifa->ifa_name); ++ } ++ } + + switch (ifa->ifa_addr->sa_family) { + case AF_INET: +@@ -107,18 +122,17 @@ static void tcpx_getinfo_ifs(struct fi_info **info) + assert(!tail->next); + tail->next = loopback; + } +- +- fi_freeinfo(*info); +- *info = head; + } ++ fi_freeinfo(*info); ++ *info = head; + } + #else + #define tcpx_getinfo_ifs(info) do{ } while(0) + #endif + + static int tcpx_getinfo(uint32_t version, const char *node, const char *service, +- uint64_t flags, const struct fi_info *hints, +- struct fi_info **info) ++ uint64_t flags, const struct fi_info *hints, ++ struct fi_info **info) + { + int ret; + +@@ -141,7 +155,7 @@ static void fi_tcp_fini(void) + struct fi_provider tcpx_prov = { + .name = "tcp", + .version = FI_VERSION(TCPX_MAJOR_VERSION,TCPX_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = tcpx_getinfo, + .fabric = tcpx_create_fabric, + .cleanup = fi_tcp_fini, +@@ -149,5 +163,11 @@ struct fi_provider tcpx_prov = { + + TCP_INI + { ++#if HAVE_TCP_DL ++ ofi_pmem_init(); ++#endif ++ fi_param_define(&tcpx_prov, "iface", FI_PARAM_STRING, ++ "Specify interface name"); ++ + return &tcpx_prov; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_progress.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_progress.c +index 08c383f48..39088c9ec 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_progress.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_progress.c +@@ -42,155 +42,642 @@ + #include + #include + +-int tcpx_progress_close(struct tcpx_progress *progress) ++static void tcpx_cq_report_xfer_fail(struct tcpx_ep *tcpx_ep, int err) + { +- util_buf_pool_destroy(progress->pe_entry_pool); ++ struct slist_entry *entry; ++ struct tcpx_xfer_entry *tx_entry; ++ struct tcpx_cq *tcpx_cq; ++ ++ while (!slist_empty(&tcpx_ep->tx_rsp_pend_queue)) { ++ entry = slist_remove_head(&tcpx_ep->tx_rsp_pend_queue); ++ tx_entry = container_of(entry, struct tcpx_xfer_entry, entry); ++ tcpx_cq_report_completion(tx_entry->ep->util_ep.tx_cq, ++ tx_entry, -err); ++ ++ tcpx_cq = container_of(tx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, tx_entry); ++ } ++} ++ ++static void tcpx_report_error(struct tcpx_ep *tcpx_ep, int err) ++{ ++ struct fi_eq_err_entry err_entry = {0}; ++ ++ tcpx_cq_report_xfer_fail(tcpx_ep, err); ++ err_entry.fid = &tcpx_ep->util_ep.ep_fid.fid; ++ err_entry.context = tcpx_ep->util_ep.ep_fid.fid.context; ++ err_entry.err = -err; ++ ++ fi_eq_write(&tcpx_ep->util_ep.eq->eq_fid, FI_NOTIFY, ++ &err_entry, sizeof(err_entry), UTIL_FLAG_ERROR); ++} ++ ++int tcpx_ep_shutdown_report(struct tcpx_ep *ep, fid_t fid) ++{ ++ struct fi_eq_cm_entry cm_entry = {0}; ++ ssize_t len; ++ ++ if (ep->cm_state == TCPX_EP_SHUTDOWN) ++ return FI_SUCCESS; ++ tcpx_cq_report_xfer_fail(ep, -FI_ENOTCONN); ++ ep->cm_state = TCPX_EP_SHUTDOWN; ++ cm_entry.fid = fid; ++ len = fi_eq_write(&ep->util_ep.eq->eq_fid, FI_SHUTDOWN, ++ &cm_entry, sizeof(cm_entry), 0); ++ if (len < 0) ++ return (int) len; ++ + return FI_SUCCESS; + } + +-struct tcpx_pe_entry *pe_entry_alloc(struct tcpx_progress *progress) ++void process_tx_entry(struct tcpx_xfer_entry *tx_entry) + { +- struct tcpx_pe_entry *pe_entry; ++ struct tcpx_cq *tcpx_cq; ++ int ret; + +- pe_entry = util_buf_alloc(progress->pe_entry_pool); +- if (!pe_entry) { +- FI_WARN(&tcpx_prov, FI_LOG_DOMAIN,"failed to get buffer\n"); +- return NULL; ++ ret = tcpx_send_msg(tx_entry); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return; ++ ++ if (!ret) ++ goto done; ++ ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg send failed\n"); ++ ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(tx_entry->ep, ++ &tx_entry->ep->util_ep.ep_fid.fid); ++done: ++ tcpx_cq_report_completion(tx_entry->ep->util_ep.tx_cq, ++ tx_entry, -ret); ++ slist_remove_head(&tx_entry->ep->tx_queue); ++ ++ if (ntohl(tx_entry->msg_hdr.hdr.flags) & ++ (OFI_DELIVERY_COMPLETE | OFI_COMMIT_COMPLETE)) { ++ tx_entry->flags |= FI_COMPLETION; ++ slist_insert_tail(&tx_entry->entry, ++ &tx_entry->ep->tx_rsp_pend_queue); ++ return; + } +- memset(pe_entry, 0, sizeof(*pe_entry)); +- return pe_entry; ++ ++ tcpx_cq = container_of(tx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, tx_entry); + } + +-static void report_pe_entry_completion(struct tcpx_pe_entry *pe_entry, int err) ++static int tcpx_prepare_rx_entry_resp(struct tcpx_xfer_entry *rx_entry) + { +- struct fi_cq_err_entry err_entry; +- struct tcpx_ep *ep = pe_entry->ep; +- struct util_cq *cq = NULL; +- struct util_cntr *cntr = NULL; ++ struct tcpx_cq *tcpx_rx_cq, *tcpx_tx_cq; ++ struct tcpx_xfer_entry *resp_entry; ++ ++ tcpx_tx_cq = container_of(rx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ ++ resp_entry = tcpx_xfer_entry_alloc(tcpx_tx_cq, TCPX_OP_MSG_RESP); ++ if (!resp_entry) ++ return -FI_EAGAIN; ++ ++ resp_entry->msg_data.iov[0].iov_base = (void *) &resp_entry->msg_hdr; ++ resp_entry->msg_data.iov[0].iov_len = sizeof(resp_entry->msg_hdr); ++ resp_entry->msg_data.iov_cnt = 1; ++ ++ resp_entry->msg_hdr.hdr.op = ofi_op_msg; ++ resp_entry->msg_hdr.hdr.size = htonll(sizeof(resp_entry->msg_hdr)); ++ ++ resp_entry->flags = 0; ++ resp_entry->context = NULL; ++ resp_entry->done_len = 0; ++ resp_entry->ep = rx_entry->ep; ++ tcpx_tx_queue_insert(resp_entry->ep, resp_entry); ++ ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, 0); ++ slist_remove_head(&rx_entry->ep->rx_queue); ++ tcpx_rx_cq = container_of(rx_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_rx_cq, rx_entry); ++ return FI_SUCCESS; ++} + +- if (pe_entry->flags & TCPX_NO_COMPLETION) { +- return; ++static int process_rx_entry(struct tcpx_xfer_entry *rx_entry) ++{ ++ struct tcpx_cq *tcpx_cq; ++ int ret; ++ ++ ret = tcpx_recv_msg_data(rx_entry); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return ret; ++ ++ if (!ret) ++ goto done; ++ ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg recv Failed ret = %d\n", ret); ++ ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(rx_entry->ep, ++ &rx_entry->ep->util_ep.ep_fid.fid); ++done: ++ if (ntohl(rx_entry->msg_hdr.hdr.flags) & OFI_DELIVERY_COMPLETE) { ++ ++ if (tcpx_prepare_rx_entry_resp(rx_entry)) ++ rx_entry->ep->cur_rx_proc_fn = tcpx_prepare_rx_entry_resp; ++ ++ return FI_SUCCESS; + } + +- switch (pe_entry->msg_hdr.op_data) { +- case TCPX_OP_MSG_SEND: +- cq = ep->util_ep.tx_cq; +- cntr = ep->util_ep.tx_cntr; +- break; +- case TCPX_OP_MSG_RECV: +- cq = ep->util_ep.rx_cq; +- cntr = ep->util_ep.rx_cntr; +- break; +- default: ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, -ret); ++ tcpx_cq = container_of(rx_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return FI_SUCCESS; ++} + +- return; ++static int process_srx_entry(struct tcpx_xfer_entry *rx_entry) ++{ ++ int ret; ++ ++ ret = tcpx_recv_msg_data(rx_entry); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return ret; ++ ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, ++ "msg recv Failed ret = %d\n", ret); ++ ++ tcpx_ep_shutdown_report(rx_entry->ep, ++ &rx_entry->ep->util_ep.ep_fid.fid); + } + +- if (cq && err) { +- err_entry.op_context = pe_entry->context; +- err_entry.flags = pe_entry->flags; +- err_entry.len = 0; +- err_entry.buf = NULL; +- err_entry.data = pe_entry->msg_hdr.data; +- err_entry.tag = 0; +- err_entry.olen = 0; +- err_entry.err = err; +- err_entry.prov_errno = errno; +- err_entry.err_data = NULL; +- err_entry.err_data_size = 0; ++ if ((ntohl(rx_entry->msg_hdr.hdr.flags) & ++ OFI_DELIVERY_COMPLETE) && !ret) { ++ if (tcpx_prepare_rx_entry_resp(rx_entry)) ++ rx_entry->ep->cur_rx_proc_fn = tcpx_prepare_rx_entry_resp; + +- ofi_cq_write_error(cq, &err_entry); +- } else if (cq) { +- ofi_cq_write(cq, pe_entry->context, +- pe_entry->flags, 0, NULL, +- pe_entry->msg_hdr.data, 0); ++ return FI_SUCCESS; + } + +- if (cntr && err) { +- cntr->cntr_fid.ops->adderr(&cntr->cntr_fid, 1); +- }else if (cntr) { +- cntr->cntr_fid.ops->add(&cntr->cntr_fid, 1); ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, -ret); ++ ++ /* release the shared entry */ ++ if (rx_entry->ep->cur_rx_entry == rx_entry) { ++ rx_entry->ep->cur_rx_entry = NULL; + } ++ ++ fastlock_acquire(&rx_entry->ep->srx_ctx->lock); ++ util_buf_release(rx_entry->ep->srx_ctx->buf_pool, rx_entry); ++ fastlock_release(&rx_entry->ep->srx_ctx->lock); ++ return FI_SUCCESS; + } + +-void pe_entry_release(struct tcpx_pe_entry *pe_entry) ++static int tcpx_prepare_rx_write_resp(struct tcpx_xfer_entry *rx_entry) + { +- struct tcpx_domain *domain; ++ struct tcpx_cq *tcpx_rx_cq, *tcpx_tx_cq; ++ struct tcpx_xfer_entry *resp_entry; ++ ++ tcpx_tx_cq = container_of(rx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ ++ resp_entry = tcpx_xfer_entry_alloc(tcpx_tx_cq, TCPX_OP_MSG_RESP); ++ if (!resp_entry) ++ return -FI_EAGAIN; ++ ++ resp_entry->msg_data.iov[0].iov_base = (void *) &resp_entry->msg_hdr; ++ resp_entry->msg_data.iov[0].iov_len = sizeof(resp_entry->msg_hdr); ++ resp_entry->msg_data.iov_cnt = 1; ++ ++ resp_entry->msg_hdr.hdr.op = ofi_op_msg; ++ resp_entry->msg_hdr.hdr.size = htonll(sizeof(resp_entry->msg_hdr)); ++ ++ resp_entry->flags &= ~FI_COMPLETION; ++ resp_entry->context = NULL; ++ resp_entry->done_len = 0; ++ resp_entry->ep = rx_entry->ep; ++ tcpx_tx_queue_insert(resp_entry->ep, resp_entry); ++ ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, 0); ++ tcpx_rx_cq = container_of(rx_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_rx_cq, rx_entry); ++ return FI_SUCCESS; ++} ++ ++static void tcpx_pmem_commit(struct tcpx_xfer_entry *rx_entry) ++{ ++ int i; + +- domain = container_of(pe_entry->ep->util_ep.domain, +- struct tcpx_domain, util_domain); ++ if (!ofi_pmem_commit) ++ return ; + +- memset(&pe_entry->msg_hdr, 0, sizeof(pe_entry->msg_hdr)); +- dlist_remove(&pe_entry->entry); +- memset(pe_entry, 0, sizeof(*pe_entry)); +- util_buf_release(domain->progress.pe_entry_pool, pe_entry); ++ for (i = 0; i < rx_entry->msg_hdr.rma_iov_cnt; i++) { ++ (*ofi_pmem_commit)((const void *) (uintptr_t) ++ rx_entry->msg_hdr.rma_iov[i].addr, ++ rx_entry->msg_hdr.rma_iov[i].len); ++ } + } + +-static void process_tx_pe_entry(struct tcpx_pe_entry *pe_entry) ++static int process_rx_remote_write_entry(struct tcpx_xfer_entry *rx_entry) + { +- uint64_t total_len = ntohll(pe_entry->msg_hdr.size); ++ struct tcpx_cq *tcpx_cq; ++ uint32_t flags; + int ret; + +- ret = tcpx_send_msg(pe_entry); ++ ret = tcpx_recv_msg_data(rx_entry); + if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) +- return; ++ return ret; + +- if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg send failed\n"); +- report_pe_entry_completion(pe_entry, ret); +- pe_entry_release(pe_entry); +- return; +- } ++ if (!ret) ++ goto done; ++ ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg recv Failed ret = %d\n", ret); ++ ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(rx_entry->ep, ++ &rx_entry->ep->util_ep.ep_fid.fid); ++done: ++ flags = ntohl(rx_entry->msg_hdr.hdr.flags) & ++ (OFI_DELIVERY_COMPLETE | OFI_COMMIT_COMPLETE); + +- if (pe_entry->done_len == total_len) { +- report_pe_entry_completion(pe_entry, 0); +- pe_entry_release(pe_entry); ++ if (flags) { ++ if (flags & OFI_COMMIT_COMPLETE) ++ tcpx_pmem_commit(rx_entry); ++ ++ if (tcpx_prepare_rx_write_resp(rx_entry)) ++ rx_entry->ep->cur_rx_proc_fn = tcpx_prepare_rx_write_resp; ++ ++ return FI_SUCCESS; + } ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, -ret); ++ tcpx_cq = container_of(rx_entry->ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return FI_SUCCESS; + } + +-static void process_rx_pe_entry(struct tcpx_pe_entry *pe_entry) ++static int process_rx_read_entry(struct tcpx_xfer_entry *rx_entry) + { ++ struct tcpx_cq *tcpx_cq; + int ret; + +- ret = tcpx_recv_msg(pe_entry); ++ ret = tcpx_recv_msg_data(rx_entry); + if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) +- return; ++ return ret; ++ ++ if (!ret) ++ goto done; ++ ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg recv Failed ret = %d\n", ret); ++ ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(rx_entry->ep, ++ &rx_entry->ep->util_ep.ep_fid.fid); ++done: ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.tx_cq, ++ rx_entry, -ret); ++ slist_remove_head(&rx_entry->ep->rma_read_queue); ++ tcpx_cq = container_of(rx_entry->ep->util_ep.tx_cq, ++ struct tcpx_cq, util_cq); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return FI_SUCCESS; ++} ++ ++static void tcpx_copy_rma_iov_to_msg_iov(struct tcpx_xfer_entry *xfer_entry) ++{ ++ int i; ++ ++ xfer_entry->msg_data.iov_cnt = xfer_entry->msg_hdr.rma_iov_cnt; ++ for ( i = 0 ; i < xfer_entry->msg_hdr.rma_iov_cnt ; i++ ) { ++ xfer_entry->msg_data.iov[i].iov_base = ++ (void *) xfer_entry->msg_hdr.rma_iov[i].addr; ++ xfer_entry->msg_data.iov[i].iov_len = ++ xfer_entry->msg_hdr.rma_iov[i].len; ++ } ++} ++ ++static int tcpx_prepare_rx_remote_read_resp(struct tcpx_xfer_entry *resp_entry) ++{ ++ int i; ++ ++ resp_entry->msg_data.iov[0].iov_base = (void *) &resp_entry->msg_hdr; ++ resp_entry->msg_data.iov[0].iov_len = sizeof(resp_entry->msg_hdr); ++ resp_entry->msg_data.iov_cnt = 1 + resp_entry->msg_hdr.rma_iov_cnt; ++ ++ resp_entry->msg_hdr.hdr.size = resp_entry->msg_data.iov[0].iov_len; ++ for ( i = 0 ; i < resp_entry->msg_hdr.rma_iov_cnt ; i++ ) { ++ resp_entry->msg_data.iov[i+1].iov_base = ++ (void *) (uintptr_t)resp_entry->msg_hdr.rma_iov[i].addr; ++ resp_entry->msg_data.iov[i+1].iov_len = ++ resp_entry->msg_hdr.rma_iov[i].len; ++ resp_entry->msg_hdr.hdr.size += ++ resp_entry->msg_data.iov[i+1].iov_len; ++ } ++ ++ resp_entry->msg_hdr.hdr.op = ofi_op_read_rsp; ++ resp_entry->msg_hdr.hdr.size = ++ htonll(resp_entry->msg_hdr.hdr.size); ++ ++ resp_entry->flags &= ~FI_COMPLETION; ++ resp_entry->context = NULL; ++ resp_entry->done_len = 0; ++ ++ tcpx_tx_queue_insert(resp_entry->ep, resp_entry); ++ resp_entry->ep->cur_rx_entry = NULL; ++ return FI_SUCCESS; ++} ++ ++static int tcpx_validate_rx_rma_data(struct tcpx_xfer_entry *rx_entry, ++ uint64_t access) ++{ ++ struct ofi_mr_map *map = &rx_entry->ep->util_ep.domain->mr_map; ++ struct fi_rma_iov *rma_iov = rx_entry->msg_hdr.rma_iov; ++ int i, ret; ++ ++ for ( i = 0 ; i < rx_entry->msg_hdr.rma_iov_cnt ; i++) { ++ ret = ofi_mr_map_verify(map, ++ (uintptr_t *)&rma_iov[i].addr, ++ rma_iov[i].len, ++ rma_iov[i].key, ++ access, NULL); ++ if (ret) { ++ FI_DBG(&tcpx_prov, FI_LOG_EP_DATA, ++ "invalid rma iov received\n"); ++ return -FI_EINVAL; ++ } ++ } ++ return FI_SUCCESS; ++} ++ ++int tcpx_get_rx_entry_op_invalid(struct tcpx_ep *tcpx_ep) ++{ ++ return -FI_EINVAL; ++} ++ ++int tcpx_get_rx_entry_op_msg(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *rx_entry; ++ struct tcpx_xfer_entry *tx_entry; ++ struct slist_entry *entry; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_rx_detect *rx_detect = &tcpx_ep->rx_detect; ++ int ret; ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ ++ if (rx_detect->hdr.hdr.op_data == TCPX_OP_MSG_RESP) { ++ assert(!slist_empty(&tcpx_ep->tx_rsp_pend_queue)); ++ entry = tcpx_ep->tx_rsp_pend_queue.head; ++ tx_entry = container_of(entry, struct tcpx_xfer_entry, ++ entry); ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ tcpx_cq_report_completion(tx_entry->ep->util_ep.tx_cq, ++ tx_entry, 0); ++ ++ slist_remove_head(&tx_entry->ep->tx_rsp_pend_queue); ++ tcpx_xfer_entry_release(tcpx_cq, tx_entry); ++ rx_detect->done_len = 0; ++ return -FI_EAGAIN; ++ } ++ ++ if (tcpx_ep->srx_ctx){ ++ tcpx_ep->cur_rx_proc_fn = process_srx_entry; ++ fastlock_acquire(&tcpx_ep->srx_ctx->lock); ++ if (slist_empty(&tcpx_ep->srx_ctx->rx_queue)) { ++ fastlock_release(&tcpx_ep->srx_ctx->lock); ++ return -FI_EAGAIN; ++ } ++ ++ entry = slist_remove_head(&tcpx_ep->srx_ctx->rx_queue); ++ fastlock_release(&tcpx_ep->srx_ctx->lock); ++ ++ } else { ++ if (slist_empty(&tcpx_ep->rx_queue)) ++ return -FI_EAGAIN; ++ ++ tcpx_ep->cur_rx_proc_fn = process_rx_entry; ++ entry = slist_remove_head(&tcpx_ep->rx_queue); ++ } + ++ rx_entry = container_of(entry, struct tcpx_xfer_entry, ++ entry); ++ ++ rx_entry->msg_hdr = rx_detect->hdr; ++ rx_entry->ep = tcpx_ep; ++ rx_entry->msg_hdr.hdr.op_data = TCPX_OP_MSG_RECV; ++ rx_entry->done_len = sizeof(rx_detect->hdr); ++ if (tcpx_ep->srx_ctx) ++ rx_entry->flags |= tcpx_ep->util_ep.rx_op_flags & FI_COMPLETION; ++ ++ if (ntohl(rx_detect->hdr.hdr.flags) & OFI_REMOTE_CQ_DATA) ++ rx_entry->flags |= FI_REMOTE_CQ_DATA; ++ ++ ret = ofi_truncate_iov(rx_entry->msg_data.iov, ++ &rx_entry->msg_data.iov_cnt, ++ (ntohll(rx_entry->msg_hdr.hdr.size) - ++ sizeof(rx_entry->msg_hdr))); + if (ret) { +- FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, "msg recv Failed ret = %d\n", ret); +- report_pe_entry_completion(pe_entry, ret); +- pe_entry_release(pe_entry); +- return; ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, ++ "posted rx buffer size is not big enough\n"); ++ tcpx_cq_report_completion(rx_entry->ep->util_ep.rx_cq, ++ rx_entry, -ret); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return ret; + } + +- if (pe_entry->done_len && +- pe_entry->done_len == ntohll(pe_entry->msg_hdr.size)) { +- report_pe_entry_completion(pe_entry, 0); +- pe_entry_release(pe_entry); ++ rx_detect->done_len = 0; ++ tcpx_ep->cur_rx_entry = rx_entry; ++ return FI_SUCCESS; ++} ++ ++int tcpx_get_rx_entry_op_read_req(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *rx_entry; ++ struct tcpx_cq *tcpx_cq; ++ int ret; ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ ++ rx_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_REMOTE_READ); ++ if (!rx_entry) ++ return -FI_EAGAIN; ++ ++ rx_entry->msg_hdr = tcpx_ep->rx_detect.hdr; ++ rx_entry->msg_hdr.hdr.op_data = TCPX_OP_REMOTE_READ; ++ rx_entry->ep = tcpx_ep; ++ rx_entry->done_len = sizeof(tcpx_ep->rx_detect.hdr); ++ ++ ret = tcpx_validate_rx_rma_data(rx_entry, FI_REMOTE_READ); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, ++ "invalid rma data\n"); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return ret; + } ++ ++ tcpx_ep->rx_detect.done_len = 0; ++ tcpx_ep->cur_rx_entry = rx_entry; ++ tcpx_ep->cur_rx_proc_fn = tcpx_prepare_rx_remote_read_resp; ++ return FI_SUCCESS; + } + +-static void process_pe_lists(struct tcpx_ep *ep) ++int tcpx_get_rx_entry_op_write(struct tcpx_ep *tcpx_ep) + { +- struct tcpx_pe_entry *pe_entry; +- struct dlist_entry *entry; ++ struct tcpx_xfer_entry *rx_entry; ++ struct tcpx_cq *tcpx_cq; ++ int ret; ++ ++ tcpx_cq = container_of(tcpx_ep->util_ep.rx_cq, ++ struct tcpx_cq, util_cq); ++ ++ rx_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_REMOTE_WRITE); ++ if (!rx_entry) ++ return -FI_EAGAIN; ++ ++ rx_entry->flags = 0; ++ if (ntohl(tcpx_ep->rx_detect.hdr.hdr.flags) & OFI_REMOTE_CQ_DATA) ++ rx_entry->flags = (FI_COMPLETION | ++ FI_REMOTE_CQ_DATA | FI_REMOTE_WRITE); ++ ++ rx_entry->msg_hdr = tcpx_ep->rx_detect.hdr; ++ rx_entry->msg_hdr.hdr.op_data = TCPX_OP_REMOTE_WRITE; ++ rx_entry->ep = tcpx_ep; ++ rx_entry->done_len = sizeof(tcpx_ep->rx_detect.hdr); ++ ++ ret = tcpx_validate_rx_rma_data(rx_entry, FI_REMOTE_WRITE); ++ if (ret) { ++ FI_WARN(&tcpx_prov, FI_LOG_DOMAIN, ++ "invalid rma data\n"); ++ tcpx_xfer_entry_release(tcpx_cq, rx_entry); ++ return ret; ++ } ++ ++ tcpx_copy_rma_iov_to_msg_iov(rx_entry); ++ tcpx_ep->rx_detect.done_len = 0; ++ tcpx_ep->cur_rx_entry = rx_entry; ++ tcpx_ep->cur_rx_proc_fn = process_rx_remote_write_entry; ++ return FI_SUCCESS; ++ ++} ++ ++int tcpx_get_rx_entry_op_read_rsp(struct tcpx_ep *tcpx_ep) ++{ ++ struct tcpx_xfer_entry *rx_entry; ++ struct slist_entry *entry; + +- if (dlist_empty(&ep->rx_queue)) +- goto tx_pe_list; ++ if (slist_empty(&tcpx_ep->rma_read_queue)) ++ return -FI_EINVAL; + +- entry = ep->rx_queue.next; +- pe_entry = container_of(entry, struct tcpx_pe_entry, ++ entry = tcpx_ep->rma_read_queue.head; ++ rx_entry = container_of(entry, struct tcpx_xfer_entry, + entry); +- process_rx_pe_entry(pe_entry); + +-tx_pe_list: +- if (dlist_empty(&ep->tx_queue)) +- return ; ++ rx_entry->msg_hdr = tcpx_ep->rx_detect.hdr; ++ rx_entry->msg_hdr.hdr.op_data = TCPX_OP_READ_RSP; ++ rx_entry->done_len = sizeof(tcpx_ep->rx_detect.hdr); + +- entry = ep->tx_queue.next; +- pe_entry = container_of(entry, struct tcpx_pe_entry, ++ tcpx_ep->rx_detect.done_len = 0; ++ tcpx_ep->cur_rx_entry = rx_entry; ++ tcpx_ep->cur_rx_proc_fn = process_rx_read_entry; ++ return FI_SUCCESS; ++} ++ ++static void tcpx_process_stage_buffer(struct tcpx_ep *ep) ++{ ++ int ret; ++ ++ while (ep->stage_buf.len != ep->stage_buf.off) { ++ if (!ep->cur_rx_entry) { ++ ret = tcpx_recv_hdr(ep->conn_fd, &ep->stage_buf, ++ &ep->rx_detect); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return; ++ ++ if (ret) ++ goto err1; ++ ++ ret = ep->get_rx_entry[ep->rx_detect.hdr.hdr.op](ep); ++ if (ret == -FI_EAGAIN) ++ return; ++ if (ret) ++ goto err2; ++ } ++ assert(ep->cur_rx_proc_fn != NULL); ++ ep->cur_rx_proc_fn(ep->cur_rx_entry); ++ } ++ return; ++err2: ++ tcpx_report_error(ep, ret); ++ return; ++err1: ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(ep, &ep->util_ep.ep_fid.fid); ++} ++ ++static void tcpx_process_rx_msg(struct tcpx_ep *ep) ++{ ++ int ret; ++ ++ if (!ep->cur_rx_entry) { ++ if (ep->stage_buf.len == ep->stage_buf.off) { ++ ret = tcpx_read_to_buffer(ep->conn_fd, &ep->stage_buf); ++ if (ret && !OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ goto err1; ++ ++ tcpx_process_stage_buffer(ep); ++ return; ++ } ++ ++ ret = tcpx_recv_hdr(ep->conn_fd, &ep->stage_buf, ++ &ep->rx_detect); ++ if (OFI_SOCK_TRY_SND_RCV_AGAIN(-ret)) ++ return; ++ ++ if (ret) ++ goto err1; ++ ++ ret = ep->get_rx_entry[ep->rx_detect.hdr.hdr.op](ep); ++ if (ret == -FI_EAGAIN) ++ return; ++ if (ret) ++ goto err2; ++ } ++ ++ assert(ep->cur_rx_proc_fn != NULL); ++ ep->cur_rx_proc_fn(ep->cur_rx_entry); ++ return; ++err2: ++ tcpx_report_error(ep, ret); ++ return; ++err1: ++ if (ret == -FI_ENOTCONN) ++ tcpx_ep_shutdown_report(ep, &ep->util_ep.ep_fid.fid); ++} ++ ++static void process_tx_queue(struct tcpx_ep *ep) ++{ ++ struct tcpx_xfer_entry *tx_entry; ++ struct slist_entry *entry; ++ ++ if (slist_empty(&ep->tx_queue)) ++ return; ++ ++ entry = ep->tx_queue.head; ++ tx_entry = container_of(entry, struct tcpx_xfer_entry, + entry); +- process_tx_pe_entry(pe_entry); ++ process_tx_entry(tx_entry); ++} ++ ++void tcpx_ep_progress(struct tcpx_ep *ep) ++{ ++ tcpx_process_rx_msg(ep); ++ process_tx_queue(ep); + } + + void tcpx_progress(struct util_ep *util_ep) +@@ -198,13 +685,83 @@ void tcpx_progress(struct util_ep *util_ep) + struct tcpx_ep *ep; + + ep = container_of(util_ep, struct tcpx_ep, util_ep); +- process_pe_lists(ep); ++ fastlock_acquire(&ep->lock); ++ ep->progress_func(ep); ++ fastlock_release(&ep->lock); + return; + } + +-int tcpx_progress_init(struct tcpx_progress *progress) ++static int tcpx_try_func(void *util_ep) ++{ ++ uint32_t events; ++ struct util_wait_fd *wait_fd; ++ struct tcpx_ep *ep; ++ int ret; ++ ++ ep = container_of(util_ep, struct tcpx_ep, util_ep); ++ wait_fd = container_of(((struct util_ep *)util_ep)->rx_cq->wait, ++ struct util_wait_fd, util_wait); ++ ++ fastlock_acquire(&ep->lock); ++ if (!slist_empty(&ep->tx_queue) && !ep->send_ready_monitor) { ++ ep->send_ready_monitor = true; ++ events = FI_EPOLL_IN | FI_EPOLL_OUT; ++ goto epoll_mod; ++ } else if (slist_empty(&ep->tx_queue) && ep->send_ready_monitor) { ++ ep->send_ready_monitor = false; ++ events = FI_EPOLL_IN; ++ goto epoll_mod; ++ } ++ fastlock_release(&ep->lock); ++ return FI_SUCCESS; ++ ++epoll_mod: ++ ret = fi_epoll_mod(wait_fd->epoll_fd, ep->conn_fd, events, NULL); ++ if (ret) ++ FI_WARN(&tcpx_prov, FI_LOG_EP_DATA, ++ "invalid op type\n"); ++ fastlock_release(&ep->lock); ++ return ret; ++} ++ ++int tcpx_cq_wait_ep_add(struct tcpx_ep *ep) ++{ ++ if (!ep->util_ep.rx_cq->wait) ++ return FI_SUCCESS; ++ ++ return ofi_wait_fd_add(ep->util_ep.rx_cq->wait, ++ ep->conn_fd, FI_EPOLL_IN, ++ tcpx_try_func, (void *)&ep->util_ep, ++ NULL); ++} ++ ++void tcpx_cq_wait_ep_del(struct tcpx_ep *ep) + { +- return util_buf_pool_create(&progress->pe_entry_pool, +- sizeof(struct tcpx_pe_entry), +- 16, 0, 1024); ++ fastlock_acquire(&ep->lock); ++ if (ep->cm_state == TCPX_EP_CONNECTING) { ++ goto out; ++ } ++ ++ if (ep->util_ep.rx_cq->wait) { ++ ofi_wait_fd_del(ep->util_ep.rx_cq->wait, ep->conn_fd); ++ } ++out: ++ fastlock_release(&ep->lock); ++} ++ ++void tcpx_tx_queue_insert(struct tcpx_ep *tcpx_ep, ++ struct tcpx_xfer_entry *tx_entry) ++{ ++ int empty; ++ struct util_wait *wait = tcpx_ep->util_ep.tx_cq->wait; ++ ++ empty = slist_empty(&tcpx_ep->tx_queue); ++ slist_insert_tail(&tx_entry->entry, &tcpx_ep->tx_queue); ++ ++ if (empty) { ++ process_tx_entry(tx_entry); ++ ++ if (!slist_empty(&tcpx_ep->tx_queue) && wait) ++ wait->signal(wait); ++ } + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_rma.c +new file mode 100644 +index 000000000..532f2a335 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_rma.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include "rdma/fi_eq.h" ++#include "ofi_iov.h" ++#include ++#include "tcpx.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static void tcpx_rma_read_send_entry_fill(struct tcpx_xfer_entry *send_entry, ++ struct tcpx_ep *tcpx_ep, ++ const struct fi_msg_rma *msg) ++{ ++ memcpy(send_entry->msg_hdr.rma_iov, msg->rma_iov, ++ msg->rma_iov_count * sizeof(msg->rma_iov[0])); ++ send_entry->msg_hdr.rma_iov_cnt = msg->rma_iov_count; ++ ++ send_entry->msg_data.iov[0].iov_base = (void *) &send_entry->msg_hdr; ++ send_entry->msg_data.iov[0].iov_len = sizeof(send_entry->msg_hdr); ++ send_entry->msg_data.iov_cnt = 1; ++ send_entry->ep = tcpx_ep; ++ send_entry->done_len = 0; ++ send_entry->flags = 0; ++} ++ ++static void tcpx_rma_read_recv_entry_fill(struct tcpx_xfer_entry *recv_entry, ++ struct tcpx_ep *tcpx_ep, ++ const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ memcpy(&recv_entry->msg_data.iov[0], &msg->msg_iov[0], ++ msg->iov_count * sizeof(struct iovec)); ++ ++ recv_entry->msg_data.iov_cnt = msg->iov_count; ++ recv_entry->ep = tcpx_ep; ++ recv_entry->context = msg->context; ++ recv_entry->done_len = 0; ++ recv_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ flags | FI_RMA | FI_READ); ++} ++ ++static ssize_t tcpx_rma_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_xfer_entry *send_entry; ++ struct tcpx_xfer_entry *recv_entry; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); ++ assert(msg->rma_iov_count <= TCPX_IOV_LIMIT); ++ ++ send_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_READ_REQ); ++ if (!send_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_READ_RSP); ++ if (!recv_entry) { ++ tcpx_xfer_entry_release(tcpx_cq, send_entry); ++ return -FI_EAGAIN; ++ } ++ tcpx_rma_read_send_entry_fill(send_entry, tcpx_ep, msg); ++ tcpx_rma_read_recv_entry_fill(recv_entry, tcpx_ep, msg, flags); ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ slist_insert_tail(&recv_entry->entry, &tcpx_ep->rma_read_queue); ++ tcpx_tx_queue_insert(tcpx_ep, send_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_rma_read(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ struct iovec msg_iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .key = key, ++ .len = len, ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &msg_iov, ++ .desc = &desc, ++ .iov_count = 1, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .addr = src_addr, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return tcpx_rma_readmsg(ep, &msg, 0); ++} ++ ++static ssize_t tcpx_rma_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .len = ofi_total_iov_len(iov, count), ++ .key = key, ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .addr = src_addr, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return tcpx_rma_readmsg(ep, &msg, 0); ++} ++ ++static ssize_t tcpx_rma_writemsg(struct fid_ep *ep, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_xfer_entry *send_entry; ++ uint64_t data_len; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ ++ send_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_WRITE); ++ if (!send_entry) ++ return -FI_EAGAIN; ++ ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); ++ assert(msg->rma_iov_count <= TCPX_IOV_LIMIT); ++ ++ data_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count); ++ ++ assert(!(flags & FI_INJECT) || (data_len <= TCPX_MAX_INJECT_SZ)); ++ ++ send_entry->msg_hdr.hdr.size = htonll(data_len + sizeof(send_entry->msg_hdr)); ++ send_entry->msg_hdr.hdr.flags = 0; ++ ++ memcpy(send_entry->msg_hdr.rma_iov, msg->rma_iov, ++ msg->rma_iov_count * sizeof(msg->rma_iov[0])); ++ send_entry->msg_hdr.rma_iov_cnt = msg->rma_iov_count; ++ ++ send_entry->msg_data.iov[0].iov_base = (void *) &send_entry->msg_hdr; ++ send_entry->msg_data.iov[0].iov_len = sizeof(send_entry->msg_hdr); ++ send_entry->msg_data.iov_cnt = msg->iov_count + 1; ++ ++ if (flags & FI_INJECT) { ++ ofi_copy_iov_buf(msg->msg_iov, msg->iov_count, 0, ++ send_entry->msg_data.inject, ++ data_len, ++ OFI_COPY_IOV_TO_BUF); ++ ++ send_entry->msg_data.iov[1].iov_base = (void *)send_entry->msg_data.inject; ++ send_entry->msg_data.iov[1].iov_len = data_len; ++ send_entry->msg_data.iov_cnt++; ++ } else { ++ memcpy(&send_entry->msg_data.iov[1], &msg->msg_iov[0], ++ msg->iov_count * sizeof(struct iovec)); ++ } ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ send_entry->msg_hdr.hdr.flags |= OFI_REMOTE_CQ_DATA; ++ send_entry->msg_hdr.hdr.data = htonll(msg->data); ++ } ++ ++ send_entry->flags = ((tcpx_ep->util_ep.tx_op_flags & FI_COMPLETION) | ++ flags | FI_RMA | FI_WRITE); ++ ++ if (flags & (FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE)) { ++ send_entry->flags &= ~FI_COMPLETION; ++ send_entry->msg_hdr.hdr.flags |= OFI_DELIVERY_COMPLETE; ++ } ++ ++ if (flags & FI_COMMIT_COMPLETE) { ++ send_entry->flags &= ~FI_COMPLETION; ++ send_entry->msg_hdr.hdr.flags |= OFI_COMMIT_COMPLETE; ++ } ++ ++ send_entry->msg_hdr.hdr.flags = htonl(send_entry->msg_hdr.hdr.flags); ++ send_entry->ep = tcpx_ep; ++ send_entry->context = msg->context; ++ send_entry->done_len = 0; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, send_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_rma_write(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, void *context) ++{ ++ struct iovec msg_iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .key = key, ++ .len = len, ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = &msg_iov, ++ .desc = &desc, ++ .iov_count = 1, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .addr = dest_addr, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return tcpx_rma_writemsg(ep, &msg, 0); ++} ++ ++static ssize_t tcpx_rma_writev(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .key = key, ++ .len = ofi_total_iov_len(iov, count), ++ }; ++ struct fi_msg_rma msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .addr = dest_addr, ++ .context = context, ++ .data = 0, ++ }; ++ ++ return tcpx_rma_writemsg(ep, &msg, 0); ++} ++ ++ ++static ssize_t tcpx_rma_writedata(struct fid_ep *ep, const void *buf, size_t len, void *desc, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ void *context) ++{ ++ struct iovec msg_iov = { ++ .iov_base = (void *)buf, ++ .iov_len = len, ++ }; ++ struct fi_rma_iov rma_iov = { ++ .addr = addr, ++ .key = key, ++ .len = len, ++ }; ++ struct fi_msg_rma msg = { ++ .desc = &desc, ++ .iov_count = 1, ++ .rma_iov_count = 1, ++ .rma_iov = &rma_iov, ++ .msg_iov = &msg_iov, ++ .addr = dest_addr, ++ .context = context, ++ .data = data, ++ }; ++ ++ return tcpx_rma_writemsg(ep, &msg, FI_REMOTE_CQ_DATA); ++} ++ ++static ssize_t tcpx_rma_inject_common(struct fid_ep *ep, const void *buf, ++ size_t len, uint64_t data, ++ fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, uint64_t flags) ++{ ++ struct tcpx_ep *tcpx_ep; ++ struct tcpx_cq *tcpx_cq; ++ struct tcpx_xfer_entry *send_entry; ++ ++ tcpx_ep = container_of(ep, struct tcpx_ep, util_ep.ep_fid); ++ tcpx_cq = container_of(tcpx_ep->util_ep.tx_cq, struct tcpx_cq, ++ util_cq); ++ ++ send_entry = tcpx_xfer_entry_alloc(tcpx_cq, TCPX_OP_WRITE); ++ if (!send_entry) ++ return -FI_EAGAIN; ++ ++ assert(len <= TCPX_MAX_INJECT_SZ); ++ send_entry->msg_hdr.hdr.size = htonll(len + sizeof(send_entry->msg_hdr)); ++ send_entry->msg_hdr.hdr.flags = 0; ++ ++ send_entry->msg_hdr.rma_iov[0].addr = addr; ++ send_entry->msg_hdr.rma_iov[0].key = key; ++ send_entry->msg_hdr.rma_iov[0].len = len; ++ send_entry->msg_hdr.rma_iov_cnt = 1; ++ ++ send_entry->msg_data.iov[0].iov_base = (void *) &send_entry->msg_hdr; ++ send_entry->msg_data.iov[0].iov_len = sizeof(send_entry->msg_hdr); ++ ++ memcpy(send_entry->msg_data.inject, (uint8_t *)buf, len); ++ send_entry->msg_data.iov[1].iov_base = (void *)send_entry->msg_data.inject; ++ send_entry->msg_data.iov[1].iov_len = len; ++ ++ send_entry->msg_data.iov_cnt = 2; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ send_entry->msg_hdr.hdr.flags |= OFI_REMOTE_CQ_DATA; ++ send_entry->msg_hdr.hdr.data = htonll(data); ++ } ++ ++ send_entry->msg_hdr.hdr.flags = htonl(send_entry->msg_hdr.hdr.flags); ++ send_entry->ep = tcpx_ep; ++ send_entry->done_len = 0; ++ ++ fastlock_acquire(&tcpx_ep->lock); ++ tcpx_tx_queue_insert(tcpx_ep, send_entry); ++ fastlock_release(&tcpx_ep->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_rma_inject(struct fid_ep *ep, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ return tcpx_rma_inject_common(ep, buf, len, dest_addr, ++ 0, addr, key, FI_INJECT); ++} ++ ++static ssize_t tcpx_rma_injectdata(struct fid_ep *ep, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ return tcpx_rma_inject_common(ep, buf, len, dest_addr, ++ data, addr, key, ++ FI_INJECT | FI_REMOTE_CQ_DATA); ++} ++ ++struct fi_ops_rma tcpx_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = tcpx_rma_read, ++ .readv = tcpx_rma_readv, ++ .readmsg = tcpx_rma_readmsg, ++ .write = tcpx_rma_write, ++ .writev = tcpx_rma_writev, ++ .writemsg = tcpx_rma_writemsg, ++ .inject = tcpx_rma_inject, ++ .writedata = tcpx_rma_writedata, ++ .injectdata = tcpx_rma_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_shared_ctx.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_shared_ctx.c +new file mode 100644 +index 000000000..c64a82a7d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/tcp/src/tcpx_shared_ctx.c +@@ -0,0 +1,141 @@ ++/* ++ * Copyright (c) 2018 Intel Corporation. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++#include ++#include ++#include "tcpx.h" ++ ++#include ++#include ++#include ++ ++static inline struct tcpx_xfer_entry * ++tcpx_srx_ctx_rx_entry_alloc(struct tcpx_rx_ctx *srx_ctx) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ recv_entry = util_buf_alloc(srx_ctx->buf_pool); ++ if (recv_entry) ++ recv_entry->done_len = 0; ++ ++ fastlock_release(&srx_ctx->lock); ++ return recv_entry; ++} ++ ++static ssize_t tcpx_srx_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_rx_ctx *srx_ctx; ++ ++ srx_ctx = container_of(ep, struct tcpx_rx_ctx, rx_fid); ++ assert(msg->iov_count <= TCPX_IOV_LIMIT); ++ ++ recv_entry = tcpx_srx_ctx_rx_entry_alloc(srx_ctx); ++ if (!recv_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry->msg_data.iov_cnt = msg->iov_count; ++ memcpy(&recv_entry->msg_data.iov[0], &msg->msg_iov[0], ++ msg->iov_count * sizeof(struct iovec)); ++ ++ recv_entry->flags = flags | FI_MSG | FI_RECV; ++ recv_entry->context = msg->context; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ slist_insert_tail(&recv_entry->entry, &srx_ctx->rx_queue); ++ fastlock_release(&srx_ctx->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_srx_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, ++ fi_addr_t src_addr, void *context) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_rx_ctx *srx_ctx; ++ ++ srx_ctx = container_of(ep, struct tcpx_rx_ctx, rx_fid); ++ ++ recv_entry = tcpx_srx_ctx_rx_entry_alloc(srx_ctx); ++ if (!recv_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry->msg_data.iov_cnt = 1; ++ recv_entry->msg_data.iov[0].iov_base = buf; ++ recv_entry->msg_data.iov[0].iov_len = len; ++ ++ recv_entry->flags = FI_MSG | FI_RECV; ++ recv_entry->context = context; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ slist_insert_tail(&recv_entry->entry, &srx_ctx->rx_queue); ++ fastlock_release(&srx_ctx->lock); ++ return FI_SUCCESS; ++} ++ ++static ssize_t tcpx_srx_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct tcpx_xfer_entry *recv_entry; ++ struct tcpx_rx_ctx *srx_ctx; ++ ++ srx_ctx = container_of(ep, struct tcpx_rx_ctx, rx_fid); ++ assert(count <= TCPX_IOV_LIMIT); ++ ++ recv_entry = tcpx_srx_ctx_rx_entry_alloc(srx_ctx); ++ if (!recv_entry) ++ return -FI_EAGAIN; ++ ++ recv_entry->msg_data.iov_cnt = count; ++ memcpy(recv_entry->msg_data.iov, iov, count * sizeof(*iov)); ++ ++ recv_entry->flags = FI_MSG | FI_RECV; ++ recv_entry->context = context; ++ ++ fastlock_acquire(&srx_ctx->lock); ++ slist_insert_tail(&recv_entry->entry, &srx_ctx->rx_queue); ++ fastlock_release(&srx_ctx->lock); ++ return FI_SUCCESS; ++} ++ ++struct fi_ops_msg tcpx_srx_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = tcpx_srx_recv, ++ .recvv = tcpx_srx_recvv, ++ .recvmsg = tcpx_srx_recvmsg, ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_cq.c +index af7f4424a..7a0c75588 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_cq.c +@@ -52,7 +52,7 @@ static struct fi_ops udpx_cq_fi_ops = { + .size = sizeof(struct fi_ops), + .close = udpx_cq_close, + .bind = fi_no_bind, +- .control = fi_no_control, ++ .control = ofi_cq_control, + .ops_open = fi_no_ops_open, + }; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_domain.c +index 1f82b7b13..a40e8f25b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_domain.c +@@ -38,7 +38,7 @@ + + static struct fi_ops_domain udpx_domain_ops = { + .size = sizeof(struct fi_ops_domain), +- .av_open = ip_av_create, ++ .av_open = ofi_ip_av_create, + .cq_open = udpx_cq_open, + .endpoint = udpx_endpoint, + .scalable_ep = fi_no_scalable_ep, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_ep.c +index 59a44da1e..2a1145f1c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_ep.c +@@ -42,7 +42,7 @@ static int udpx_setname(fid_t fid, void *addr, size_t addrlen) + int ret; + + ep = container_of(fid, struct udpx_ep, util_ep.ep_fid.fid); +- FI_DBG(&udpx_prov, FI_LOG_EP_CTRL, "%s\n", ofi_hex_str(addr, addrlen)); ++ ofi_straddr_dbg(&udpx_prov, FI_LOG_EP_CTRL, "bind addr: ", addr); + ret = bind(ep->sock, addr, (socklen_t)addrlen); + if (ret) { + FI_WARN(&udpx_prov, FI_LOG_EP_CTRL, "bind %d (%s)\n", +@@ -252,7 +252,7 @@ static void udpx_rx_src_comp(struct udpx_ep *ep, void *context, uint64_t flags, + size_t len, void *buf, void *addr) + { + ep->util_ep.rx_cq->src[ofi_cirque_windex(ep->util_ep.rx_cq->cirq)] = +- ip_av_get_index(ep->util_ep.av, addr); ++ ofi_ip_av_get_fi_addr(ep->util_ep.av, addr); + udpx_rx_comp(ep, context, flags, len, buf, addr); + } + +@@ -293,7 +293,7 @@ static void udpx_ep_progress(struct util_ep *util_ep) + hdr.msg_iov = entry->iov; + hdr.msg_iovlen = entry->iov_count; + +- ret = recvmsg(ep->sock, &hdr, 0); ++ ret = ofi_recvmsg_udp(ep->sock, &hdr, 0); + if (ret >= 0) { + ep->rx_comp(ep, entry->context, 0, ret, NULL, &addr); + ofi_cirque_discard(ep->rxq); +@@ -374,8 +374,9 @@ out: + static const void * + udpx_dest_addr(struct udpx_ep *ep, fi_addr_t addr, uint64_t flags) + { +- return (flags & FI_MULTICAST) ? (const void *) (uintptr_t) addr : +- ip_av_get_addr(ep->util_ep.av, (int)addr); ++ return (flags & FI_MULTICAST) ? ++ (const void *) (uintptr_t) addr : ++ ofi_ip_av_get_addr(ep->util_ep.av, (int)addr); + } + + static size_t +@@ -416,7 +417,7 @@ static ssize_t udpx_send(struct fid_ep *ep_fid, const void *buf, size_t len, + struct udpx_ep *ep; + + ep = container_of(ep_fid, struct udpx_ep, util_ep.ep_fid.fid); +- return udpx_sendto(ep, buf, len, ip_av_get_addr(ep->util_ep.av, (int)dest_addr), ++ return udpx_sendto(ep, buf, len, ofi_ip_av_get_addr(ep->util_ep.av, (int)dest_addr), + ep->util_ep.av->addrlen, context); + } + +@@ -453,7 +454,7 @@ static ssize_t udpx_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, + goto out; + } + +- ret = sendmsg(ep->sock, &hdr, 0); ++ ret = ofi_sendmsg_udp(ep->sock, &hdr, 0); + if (ret >= 0) { + ep->tx_comp(ep, msg->context); + ret = 0; +@@ -501,7 +502,7 @@ static ssize_t udpx_inject(struct fid_ep *ep_fid, const void *buf, size_t len, + + ep = container_of(ep_fid, struct udpx_ep, util_ep.ep_fid.fid); + ret = ofi_sendto_socket(ep->sock, buf, len, 0, +- ip_av_get_addr(ep->util_ep.av, (int)dest_addr), ++ ofi_ip_av_get_addr(ep->util_ep.av, (int)dest_addr), + (socklen_t)ep->util_ep.av->addrlen); + return ret == (ssize_t)len ? 0 : -errno; + } +@@ -604,7 +605,7 @@ static int udpx_ep_bind_cq(struct udpx_ep *ep, struct util_cq *cq, + wait = container_of(cq->wait, + struct util_wait_fd, util_wait); + ret = fi_epoll_add(wait->epoll_fd, (int)ep->sock, +- &ep->util_ep.ep_fid.fid); ++ FI_EPOLL_IN, &ep->util_ep.ep_fid.fid); + if (ret) + return ret; + } else { +@@ -660,22 +661,30 @@ static int udpx_ep_bind(struct fid *ep_fid, struct fid *bfid, uint64_t flags) + static void udpx_bind_src_addr(struct udpx_ep *ep) + { + int ret; +- struct addrinfo ai, *rai = NULL; ++ struct addrinfo ai, *rai = NULL, *cur_ai; + char hostname[HOST_NAME_MAX]; + + memset(&ai, 0, sizeof(ai)); +- ai.ai_family = AF_INET; + ai.ai_socktype = SOCK_DGRAM; + +- ofi_getnodename(hostname, sizeof(hostname)); +- ret = getaddrinfo(hostname, NULL, &ai, &rai); ++ ret = gethostname(hostname, sizeof(hostname)); ++ ret = getaddrinfo(ret ? "127.0.0.1" : hostname, NULL, &ai, &rai); + if (ret) { + FI_WARN(&udpx_prov, FI_LOG_EP_CTRL, + "getaddrinfo failed\n"); + return; + } + +- ret = udpx_setname(&ep->util_ep.ep_fid.fid, rai->ai_addr, rai->ai_addrlen); ++ for (cur_ai = rai; cur_ai && cur_ai->ai_family != AF_INET; ++ cur_ai = cur_ai->ai_next) ++ ; ++ ++ if (cur_ai) { ++ ret = udpx_setname(&ep->util_ep.ep_fid.fid, cur_ai->ai_addr, ++ cur_ai->ai_addrlen); ++ } else { ++ ret = -FI_EADDRNOTAVAIL; ++ } + if (ret) { + FI_WARN(&udpx_prov, FI_LOG_EP_CTRL, "failed to set addr\n"); + } +@@ -763,13 +772,11 @@ int udpx_endpoint(struct fid_domain *domain, struct fi_info *info, + ret = ofi_endpoint_init(domain, &udpx_util_prov, info, &ep->util_ep, + context, udpx_ep_progress); + if (ret) +- goto err; ++ goto err1; + + ret = udpx_ep_init(ep, info); +- if (ret) { +- free(ep); +- return ret; +- } ++ if (ret) ++ goto err2; + + *ep_fid = &ep->util_ep.ep_fid; + (*ep_fid)->fid.ops = &udpx_ep_fi_ops; +@@ -779,7 +786,9 @@ int udpx_endpoint(struct fid_domain *domain, struct fi_info *info, + &udpx_msg_mcast_ops : &udpx_msg_ops; + + return 0; +-err: ++err2: ++ ofi_endpoint_close(&ep->util_ep); ++err1: + free(ep); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_init.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_init.c +index 0b0e7635c..3e00f9241 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_init.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/udp/src/udpx_init.c +@@ -137,7 +137,7 @@ static void udpx_fini(void) + struct fi_provider udpx_prov = { + .name = "UDP", + .version = FI_VERSION(UDPX_MAJOR_VERSION, UDPX_MINOR_VERSION), +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = udpx_getinfo, + .fabric = udpx_fabric, + .cleanup = udpx_fini +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_fabric.c +index ba2625c7a..390ce41c0 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usdf_fabric.c +@@ -341,6 +341,80 @@ static int validate_modebits(uint32_t version, const struct fi_info *hints, + return FI_SUCCESS; + } + ++static int usdf_alloc_fid_nic(struct fi_info *fi, ++ struct usd_device_attrs *dap) ++{ ++ int ret; ++ struct fid_nic *nic = NULL; ++ struct fi_device_attr *da = NULL; ++ struct fi_link_attr *la = NULL; ++ ++ nic = ofi_nic_dup(NULL); ++ if (!nic) ++ goto nomem; ++ ++ da = nic->device_attr; ++ da->name = strdup(dap->uda_devname); ++ if (!da->name) ++ goto nomem; ++ ret = asprintf(&da->device_id, "%s (%s)", ++ usd_devid_to_pid(dap->uda_vendor_id, ++ dap->uda_device_id), ++ usd_devid_to_nicname(dap->uda_vendor_id, ++ dap->uda_device_id)); ++ if (ret < 0) ++ goto nomem; ++ ret = asprintf(&da->device_version, "0x%x", dap->uda_vendor_part_id); ++ if (ret < 0) ++ goto nomem; ++ ret = asprintf(&da->vendor_id, "0x%x", dap->uda_vendor_id); ++ if (ret < 0) ++ goto nomem; ++ da->driver = strdup("usnic_verbs"); ++ if (!da->driver) ++ goto nomem; ++ da->firmware = strdup(dap->uda_firmware); ++ if (!da->firmware) ++ goto nomem; ++ ++ // usnic does not currently expose PCI bus information, so we ++ // set the bus type to unknown. ++ nic->bus_attr->bus_type = FI_BUS_UNKNOWN; ++ ++ la = nic->link_attr; ++ ++ socklen_t size = INET_ADDRSTRLEN; ++ la->address = calloc(1, size); ++ if (!la->address) ++ goto nomem; ++ inet_ntop(AF_INET, &dap->uda_ipaddr_be, la->address, size); ++ la->mtu = dap->uda_mtu; ++ la->speed = dap->uda_bandwidth; ++ switch (dap->uda_link_state) { ++ case USD_LINK_UP: ++ la->state = FI_LINK_UP; ++ break; ++ case USD_LINK_DOWN: ++ la->state = FI_LINK_DOWN; ++ break; ++ default: ++ la->state = FI_LINK_UNKNOWN; ++ break; ++ } ++ la->network_type = strdup("Ethernet"); ++ if (!la->network_type) ++ goto nomem; ++ ++ fi->nic = nic; ++ ++ return FI_SUCCESS; ++ ++nomem: ++ if (nic) ++ fi_close(&nic->fid); ++ return -FI_ENOMEM; ++} ++ + static int usdf_fill_info_dgram( + uint32_t version, + const struct fi_info *hints, +@@ -419,6 +493,10 @@ static int usdf_fill_info_dgram( + if (ret) + goto fail; + ++ ret = usdf_alloc_fid_nic(fi, dap); ++ if (ret) ++ goto fail; ++ + /* add to tail of list */ + if (*fi_first == NULL) { + *fi_first = fi; +@@ -508,6 +586,10 @@ static int usdf_fill_info_msg( + if (ret) + goto fail; + ++ ret = usdf_alloc_fid_nic(fi, dap); ++ if (ret) ++ goto fail; ++ + /* add to tail of list */ + if (*fi_first == NULL) { + *fi_first = fi; +@@ -595,6 +677,10 @@ static int usdf_fill_info_rdm( + if (ret) + goto fail; + ++ ret = usdf_alloc_fid_nic(fi, dap); ++ if (ret) ++ goto fail; ++ + /* add to tail of list */ + if (*fi_first == NULL) { + *fi_first = fi; +@@ -1162,7 +1248,7 @@ static void usdf_fini(void) + struct fi_provider usdf_ops = { + .name = USDF_PROV_NAME, + .version = USDF_PROV_VERSION, +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = usdf_getinfo, + .fabric = usdf_fabric_open, + .cleanup = usdf_fini +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c +index 9871a1feb..b9ddddea4 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/usnic/src/usnic_direct/usd_ib_sysfs.c +@@ -69,8 +69,8 @@ usd_ib_get_devlist( + DIR *class_dir; + struct dirent *dent; + struct stat sbuf; +- char dev_path[PATH_MAX]; +- char ibdev_path[PATH_MAX]; ++ char *dev_path = NULL; ++ char *ibdev_path = NULL; + char ibdev_buf[32]; + struct usd_ib_dev *idp; + struct usd_ib_dev *last_idp; +@@ -90,14 +90,17 @@ usd_ib_get_devlist( + last_idp = NULL; + fd = -1; + while ((dent = readdir(class_dir)) != NULL) { +- + /* skip "." and ".." */ + if (dent->d_name[0] == '.') + continue; + + /* build path to entry */ +- snprintf(dev_path, sizeof(dev_path), "%s/%s", class_path, +- dent->d_name); ++ if (asprintf(&dev_path, "%s/%s", class_path, ++ dent->d_name) <= 0) { ++ rc = -errno; ++ usd_perror("failed to asprintf"); ++ goto out; ++ } + + /* see if it's a dir */ + rc = stat(dev_path, &sbuf); +@@ -112,7 +115,11 @@ usd_ib_get_devlist( + continue; + + /* read the ibdev */ +- snprintf(ibdev_path, sizeof(ibdev_path), "%s/ibdev", dev_path); ++ if (asprintf(&ibdev_path, "%s/ibdev", dev_path) <= 0) { ++ rc = -errno; ++ usd_perror(ibdev_path); ++ goto out; ++ } + fd = open(ibdev_path, O_RDONLY); + if (fd == -1) { + usd_perror(ibdev_path); +@@ -156,11 +163,17 @@ usd_ib_get_devlist( + idp->id_next = NULL; + last_idp = idp; + } ++ free(dev_path); ++ dev_path = NULL; ++ free(ibdev_path); ++ ibdev_path = NULL; + } + rc = 0; + + out: + /* clean up */ ++ free(dev_path); ++ free(ibdev_path); + if (class_dir != NULL) { + closedir(class_dir); + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_atomic.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_atomic.c +index 87d433645..a41905543 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_atomic.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_atomic.c +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2013-2017 Intel Corporation. All rights reserved. ++ * Copyright (c) 2018 Cray Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -32,7 +33,6 @@ + + #include "ofi_atomic.h" + +- + static const size_t ofi_datatype_size_table[] = { + [FI_INT8] = sizeof(int8_t), + [FI_UINT8] = sizeof(uint8_t), +@@ -59,10 +59,60 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + return ofi_datatype_size_table[datatype]; + } + +- + /* + * Basic atomic operations + */ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++#define OFI_OP_MIN(type,dst,src) (dst) > (src) ++#define OFI_OP_MAX(type,dst,src) (dst) < (src) ++#define OFI_OP_SUM(type,dst,src) (dst) + (src) ++#define OFI_OP_PROD(type,dst,src) (dst) * (src) ++#define OFI_OP_LOR(type,dst,src) (dst) || (src) ++#define OFI_OP_LAND(type,dst,src) (dst) && (src) ++ ++#define OFI_OP_BOR(type,dst,src) \ ++ __atomic_fetch_or(&(dst), (src), __ATOMIC_SEQ_CST) ++#define OFI_OP_BAND(type,dst,src) \ ++ __atomic_fetch_and(&(dst), (src), __ATOMIC_SEQ_CST) ++#define OFI_OP_LXOR(type,dst,src) \ ++ ((dst) && !(src)) || (!(dst) && (src)) ++#define OFI_OP_BXOR(type,dst,src) \ ++ __atomic_fetch_xor(&(dst), (src), __ATOMIC_SEQ_CST) ++#define OFI_OP_WRITE(type,dst,src) \ ++ __atomic_store(&(dst), &(src), __ATOMIC_SEQ_CST) ++ ++#define OFI_OP_READ(type,dst,res) \ ++ __atomic_load(&(dst), &(res), __ATOMIC_SEQ_CST) ++#define OFI_OP_READWRITE(type,dst,src,res) \ ++ __atomic_exchange(&(dst), &(src), &(res), __ATOMIC_SEQ_CST) ++ ++#define OFI_OP_CSWAP_EQ(type,dst,src,cmp) \ ++ __atomic_compare_exchange(&(dst),&(cmp),&(src),0, \ ++ __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ++#define OFI_OP_CSWAP_NE(type,dst,src,cmp) ((cmp) != (dst)) ++#define OFI_OP_CSWAP_LE(type,dst,src,cmp) ((cmp) <= (dst)) ++#define OFI_OP_CSWAP_LT(type,dst,src,cmp) ((cmp) < (dst)) ++#define OFI_OP_CSWAP_GE(type,dst,src,cmp) ((cmp) >= (dst)) ++#define OFI_OP_CSWAP_GT(type,dst,src,cmp) ((cmp) > (dst)) ++#define OFI_OP_MSWAP(type,dst,src,cmp) \ ++ (((src) & (cmp)) | ((dst) & ~(cmp))) ++ ++/* Need special handlers for OFI complex datatypes for portability */ ++#define OFI_OP_SUM_COMPLEX(type,dst,src) ofi_complex_sum_##type(dst,src) ++#define OFI_OP_PROD_COMPLEX(type,dst,src) ofi_complex_prod_##type(dst,src) ++#define OFI_OP_LOR_COMPLEX(type,dst,src) ofi_complex_lor_##type(dst,src) ++#define OFI_OP_LAND_COMPLEX(type,dst,src) ofi_complex_land_##type(dst,src) ++#define OFI_OP_LXOR_COMPLEX(type,dst,src) ofi_complex_lxor_##type(dst,src) ++#define OFI_OP_CSWAP_EQ_COMPLEX(type,dst,src,cmp) \ ++ __atomic_compare_exchange(&(dst),&(cmp),&(src),0, \ ++ __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ++#define OFI_OP_CSWAP_NE_COMPLEX(type,dst,src,cmp) \ ++ (!ofi_complex_eq_##type(dst,cmp)) ++ ++#define OFI_OP_READWRITE_COMPLEX OFI_OP_READWRITE ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ + + #define OFI_OP_MIN(type,dst,src) if ((dst) > (src)) (dst) = (src) + #define OFI_OP_MAX(type,dst,src) if ((dst) < (src)) (dst) = (src) +@@ -74,15 +124,15 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + #define OFI_OP_BAND(type,dst,src) (dst) &= (src) + #define OFI_OP_LXOR(type,dst,src) (dst) = ((dst) && !(src)) || (!(dst) && (src)) + #define OFI_OP_BXOR(type,dst,src) (dst) ^= (src) +-#define OFI_OP_READ(type,dst,src) /* src unused, dst is written to result */ ++#define OFI_OP_READ(type,dst,src) (dst) + #define OFI_OP_WRITE(type,dst,src) (dst) = (src) + +-#define OFI_OP_CSWAP_EQ(type,dst,src,cmp) if ((dst) == (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_NE(type,dst,src,cmp) if ((dst) != (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_LE(type,dst,src,cmp) if ((dst) <= (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_LT(type,dst,src,cmp) if ((dst) < (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_GE(type,dst,src,cmp) if ((dst) >= (cmp)) (dst) = (src) +-#define OFI_OP_CSWAP_GT(type,dst,src,cmp) if ((dst) > (cmp)) (dst) = (src) ++#define OFI_OP_CSWAP_EQ(type,dst,src,cmp) if ((cmp) == (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_NE(type,dst,src,cmp) if ((cmp) != (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_LE(type,dst,src,cmp) if ((cmp) <= (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_LT(type,dst,src,cmp) if ((cmp) < (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_GE(type,dst,src,cmp) if ((cmp) >= (dst)) (dst) = (src) ++#define OFI_OP_CSWAP_GT(type,dst,src,cmp) if ((cmp) > (dst)) (dst) = (src) + #define OFI_OP_MSWAP(type,dst,src,cmp) (dst) = (((src) & (cmp)) | \ + ((dst) & ~(cmp))) + +@@ -92,14 +142,14 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + #define OFI_OP_LOR_COMPLEX(type,dst,src) (dst) = ofi_complex_lor_##type(dst,src) + #define OFI_OP_LAND_COMPLEX(type,dst,src) (dst) = ofi_complex_land_##type(dst,src) + #define OFI_OP_LXOR_COMPLEX(type,dst,src) (dst) = ofi_complex_lxor_##type(dst,src) +-#define OFI_OP_READ_COMPLEX OFI_OP_READ +-#define OFI_OP_WRITE_COMPLEX OFI_OP_WRITE +- + #define OFI_OP_CSWAP_EQ_COMPLEX(type,dst,src,cmp) \ + if (ofi_complex_eq_##type(dst,cmp)) (dst) = (src) + #define OFI_OP_CSWAP_NE_COMPLEX(type,dst,src,cmp) \ + if (!ofi_complex_eq_##type(dst,cmp)) (dst) = (src) ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ + ++#define OFI_OP_READ_COMPLEX OFI_OP_READ ++#define OFI_OP_WRITE_COMPLEX OFI_OP_WRITE + + /******************************** + * ATOMIC TYPE function templates +@@ -112,8 +162,6 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + * WRITE + */ + #define OFI_DEF_WRITE_NAME(op, type) ofi_write_## op ##_## type, +-#define OFI_DEF_WRITE_COMPLEX_NAME(op, type) ofi_write_## op ##_## type, +- + #define OFI_DEF_WRITE_FUNC(op, type) \ + static void ofi_write_## op ##_## type \ + (void *dst, const void *src, size_t cnt) \ +@@ -121,10 +169,14 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + size_t i; \ + type *d = (dst); \ + const type *s = (src); \ +- for (i = 0; i < cnt; i++) \ +- op(type, d[i], s[i]); \ ++ type temp_s; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ op(type, d[i], temp_s); \ ++ } \ + } + ++#define OFI_DEF_WRITE_COMPLEX_NAME(op, type) ofi_write_## op ##_## type, + #define OFI_DEF_WRITE_COMPLEX_FUNC(op, type) \ + static void ofi_write_## op ##_## type \ + (void *dst, const void *src, size_t cnt) \ +@@ -132,26 +184,112 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + size_t i; \ + ofi_complex_##type *d = (dst); \ + const ofi_complex_##type *s = (src); \ +- for (i = 0; i < cnt; i++) \ +- op(type, d[i], s[i]); \ ++ ofi_complex_##type temp_s; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ op(type, d[i], temp_s); \ ++ } \ ++ } ++ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++#define OFI_DEF_WRITEEXT_NAME(op, type) ofi_write_## op ##_## type, ++#define OFI_DEF_WRITEEXT_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ type target; \ ++ type val; \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val,0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ } \ ++ } ++ ++#define OFI_DEF_WRITEEXT_CMP_NAME(op, type) ofi_write_## op ##_## type, ++#define OFI_DEF_WRITEEXT_CMP_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ type target; \ ++ size_t i; \ ++ type *d = (dst); \ ++ const type *s = (src); \ ++ type temp_s; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ do { \ ++ success = 1; \ ++ target = d[i]; \ ++ if (op(type, d[i], s[i])) { \ ++ temp_s = s[i]; \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&temp_s, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } \ ++ } while (!success); \ ++ } \ ++ } ++ ++#define OFI_DEF_WRITEEXT_COMPLEX_NAME(op, type) ofi_write_## op ##_## type, ++#define OFI_DEF_WRITEEXT_COMPLEX_FUNC(op, type) \ ++ static void ofi_write_## op ##_## type \ ++ (void *dst, const void *src, size_t cnt) \ ++ { \ ++ ofi_complex_##type target; \ ++ ofi_complex_##type val; \ ++ ofi_complex_##type *d = (dst); \ ++ const ofi_complex_##type *s = (src); \ ++ size_t i; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val,0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ } \ + } + ++#endif /* HAVE BUILTIN_MM_ATOMICS */ ++ + /* + * READ (fetch) + */ + #define OFI_DEF_READ_NAME(op, type) ofi_read_## op ##_## type, + #define OFI_DEF_READ_COMPLEX_NAME(op, type) ofi_read_## op ##_## type, + ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ + #define OFI_DEF_READ_FUNC(op, type) \ + static void ofi_read_## op ##_## type \ +- (void *dst, const void *src, void *res, size_t cnt) \ ++ (void *dst, const void *src, void *res, size_t cnt) \ + { \ + size_t i; \ + type *d = (dst); \ + type *r = (res); \ + OFI_UNUSED(src); \ + for (i = 0; i < cnt; i++) \ +- r[i] = d[i]; \ ++ op(type, d[i], r[i]); \ + } + + #define OFI_DEF_READ_COMPLEX_FUNC(op, type) \ +@@ -163,15 +301,44 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + ofi_complex_##type *r = (res); \ + OFI_UNUSED(src); \ + for (i = 0; i < cnt; i++) \ +- r[i] = d[i]; \ ++ op(type, d[i], r[i]); \ ++ } ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_DEF_READ_FUNC(op, type) \ ++ static void ofi_read_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = (dst); \ ++ type *r = (res); \ ++ OFI_UNUSED(src); \ ++ for (i = 0; i < cnt; i++) \ ++ r[i] = op(type, d[i], r[i]); \ ++ } ++ ++#define OFI_DEF_READ_COMPLEX_FUNC(op, type) \ ++ static void ofi_read_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ ofi_complex_##type *d = (dst); \ ++ ofi_complex_##type *r = (res); \ ++ OFI_UNUSED(src); \ ++ for (i = 0; i < cnt; i++) \ ++ r[i] = op(type, d[i], s[i]); \ + } + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ ++ + /* + * READWRITE (fetch-write) + */ +-#define OFI_DEF_READWRITE_NAME(op, type) ofi_readwrite_## op ##_## type, +-#define OFI_DEF_READWRITE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, + ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++#define OFI_DEF_READWRITE_NAME(op, type) ofi_readwrite_## op ##_## type, + #define OFI_DEF_READWRITE_FUNC(op, type) \ + static void ofi_readwrite_## op ##_## type \ + (void *dst, const void *src, void *res, size_t cnt) \ +@@ -180,41 +347,333 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + type *d = (dst); \ + const type *s = (src); \ + type *r = (res); \ ++ type temp_s; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ r[i] = op(type, d[i], temp_s); \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITEEXT_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITEEXT_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ type target; \ ++ type val; \ ++ size_t i; \ ++ type *d = (dst); \ ++ type *r = (res); \ ++ const type *s = (src); \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val,0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITEEXT_CMP_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITEEXT_CMP_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ type target; \ ++ size_t i; \ ++ type *d = (dst); \ ++ type *r = (res); \ ++ const type *s = (src); \ ++ type temp_s; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ do { \ ++ target = d[i]; \ ++ success = 1; \ ++ if (op(type, d[i], s[i])) { \ ++ temp_s = s[i]; \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&temp_s, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#define OFI_DEF_EXCHANGE_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_EXCHANGE_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = dst; \ ++ const type *s = src; \ ++ type *r = res; \ ++ type temp_s; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ op(type, d[i], temp_s, r[i]); \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITE_COMPLEX_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ ofi_complex_##type *r = res; \ ++ ofi_complex_##type temp_s; \ ++ size_t i; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ r[i] = op(type, d[i], temp_s); \ ++ } \ ++ } ++ ++#define OFI_DEF_READWRITEEXT_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITEEXT_COMPLEX_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type target; \ ++ ofi_complex_##type val; \ ++ ofi_complex_##type *d = dst; \ ++ ofi_complex_##type *r = res; \ ++ const ofi_complex_##type *s = src; \ ++ size_t i; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val,0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#define OFI_DEF_EXCHANGE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_EXCHANGE_COMPLEX_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ ofi_complex_##type *r = res; \ ++ ofi_complex_##type temp_s; \ ++ size_t i; \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_s = s[i]; \ ++ op(type, d[i], temp_s, r[i]); \ ++ } \ ++ } ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_DEF_READWRITE_NAME(op, type) ofi_readwrite_## op ##_## type, ++#define OFI_DEF_READWRITE_FUNC(op, type) \ ++ static void ofi_readwrite_## op ##_## type \ ++ (void *dst, const void *src, void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = dst; \ ++ const type *s = src; \ ++ type *r = res; \ + for (i = 0; i < cnt; i++) { \ + r[i] = d[i]; \ + op(type, d[i], s[i]); \ + } \ + } + ++#define OFI_DEF_READWRITE_COMPLEX_NAME(op, type) ofi_readwrite_## op ##_## type, + #define OFI_DEF_READWRITE_COMPLEX_FUNC(op, type) \ + static void ofi_readwrite_## op ##_## type \ + (void *dst, const void *src, void *res, size_t cnt) \ + { \ + size_t i; \ +- ofi_complex_##type *d = (dst); \ +- const ofi_complex_##type *s = (src); \ +- ofi_complex_##type *r = (res); \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ ofi_complex_##type *r = res; \ + for (i = 0; i < cnt; i++) { \ + r[i] = d[i]; \ + op(type, d[i], s[i]); \ + } \ + } + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ ++ + /* + * CSWAP + */ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ + #define OFI_DEF_CSWAP_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAP_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ size_t i; \ ++ type *d = dst; \ ++ const type *s = src; \ ++ const type *c = cmp; \ ++ type *r = res; \ ++ type temp_c; \ ++ type temp_s; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_c = c[i]; \ ++ temp_s = s[i]; \ ++ /* We never use weak operations */ \ ++ (void) op(type, d[i], temp_s, temp_c); \ ++ /* If d[i] != temp_c then d[i] -> temp_c */ \ ++ r[i] = temp_c; \ ++ } \ ++ } ++ ++#define OFI_DEF_CSWAPEXT_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAPEXT_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ type target; \ ++ size_t i; \ ++ type *d = dst; \ ++ type *r = res; \ ++ const type *c = cmp; \ ++ const type *s = src; \ ++ type val; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ success = 0; \ ++ do { \ ++ target = d[i]; \ ++ val = op(type, d[i], s[i], c[i]); \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&val, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#define OFI_DEF_CSWAPEXT_CMP_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAPEXT_CMP_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ type target; \ ++ size_t i; \ ++ type *d = dst; \ ++ type *r = res; \ ++ const type *c = cmp; \ ++ const type *s = src; \ ++ type temp_s; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ do { \ ++ success = 1; \ ++ target = d[i]; \ ++ if (op(type, d[i], s[i], c[i])) { \ ++ temp_s = s[i]; \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&temp_s, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ + #define OFI_DEF_CSWAP_COMPLEX_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAP_COMPLEX_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ const ofi_complex_##type *c = cmp; \ ++ ofi_complex_##type *r = res; \ ++ ofi_complex_##type temp_c; \ ++ ofi_complex_##type temp_s; \ ++ size_t i; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ temp_c = c[i]; \ ++ temp_s = s[i]; \ ++ (void) op(type, d[i], temp_s, temp_c); \ ++ /* If d[i] != temp_c then d[i] -> temp_c */ \ ++ r[i] = temp_c; \ ++ } \ ++ } + ++#define OFI_DEF_CSWAPEXT_CMP_COMPLEX_NAME(op, type) ofi_cswap_## op ##_## type, ++#define OFI_DEF_CSWAPEXT_CMP_COMPLEX_FUNC(op, type) \ ++ static void ofi_cswap_## op ##_## type \ ++ (void *dst, const void *src, const void *cmp, \ ++ void *res, size_t cnt) \ ++ { \ ++ ofi_complex_##type target; \ ++ ofi_complex_##type *d = dst; \ ++ ofi_complex_##type *r = res; \ ++ const ofi_complex_##type *c = cmp; \ ++ const ofi_complex_##type *s = src; \ ++ ofi_complex_##type temp_s; \ ++ size_t i; \ ++ int success; \ ++ \ ++ for (i = 0; i < cnt; i++) { \ ++ do { \ ++ success = 1; \ ++ target = d[i]; \ ++ if (op(type, d[i], s[i], c[i])) { \ ++ temp_s = s[i]; \ ++ success = __atomic_compare_exchange( \ ++ &d[i],&target,&temp_s, 0, \ ++ __ATOMIC_SEQ_CST, \ ++ __ATOMIC_SEQ_CST); \ ++ } \ ++ } while (!success); \ ++ r[i] = target; \ ++ } \ ++ } ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_DEF_CSWAP_NAME(op, type) ofi_cswap_## op ##_## type, + #define OFI_DEF_CSWAP_FUNC(op, type) \ + static void ofi_cswap_## op ##_## type \ + (void *dst, const void *src, const void *cmp, \ + void *res, size_t cnt) \ + { \ + size_t i; \ +- type *d = (dst); \ +- const type *s = (src); \ +- const type *c = (cmp); \ ++ type *d = dst; \ ++ const type *s = src; \ ++ const type *c = cmp; \ + type *r = (res); \ + for (i = 0; i < cnt; i++) { \ + r[i] = d[i]; \ +@@ -222,22 +681,24 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + } \ + } + ++#define OFI_DEF_CSWAP_COMPLEX_NAME(op, type) ofi_cswap_## op ##_## type, + #define OFI_DEF_CSWAP_COMPLEX_FUNC(op, type) \ + static void ofi_cswap_## op ##_## type \ + (void *dst, const void *src, const void *cmp, \ + void *res, size_t cnt) \ + { \ + size_t i; \ +- ofi_complex_##type *d = (dst); \ +- const ofi_complex_##type *s = (src); \ +- const ofi_complex_##type *c = (cmp); \ +- ofi_complex_##type *r = (res); \ ++ ofi_complex_##type *d = dst; \ ++ const ofi_complex_##type *s = src; \ ++ const ofi_complex_##type *c = cmp; \ ++ ofi_complex_##type *r = res; \ + for (i = 0; i < cnt; i++) { \ + r[i] = d[i]; \ + op(type, d[i], s[i], c[i]); \ + } \ + } + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ + + /********************************************************************* + * Macros create atomic functions for each operation for each datatype +@@ -251,6 +712,25 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + * The latter is needed to populate the dispatch table + * op - OFI_OP_XXX function should perform (e.g. OFI_OP_MIN) + */ ++#define OFI_DEFINE_INT_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME ++ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++/* Only support 8 byte and under datatypes */ + #define OFI_DEFINE_ALL_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ +@@ -263,9 +743,9 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ + OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, float) \ +- OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, double)\ +- OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ +- OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, long_double) ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_NOOP_##FUNCNAME + + #define OFI_DEFINE_REALNO_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ +@@ -280,10 +760,12 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ + OFI_DEF_NOOP_##FUNCNAME \ + OFI_DEF_NOOP_##FUNCNAME \ +- OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ ++ OFI_DEF_NOOP_##FUNCNAME \ + OFI_DEF_NOOP_##FUNCNAME + +-#define OFI_DEFINE_INT_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_DEFINE_ALL_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ +@@ -292,13 +774,128 @@ size_t ofi_datatype_size(enum fi_datatype datatype) + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ + OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, float) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, double)\ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ ++ OFI_DEF_##ATOMICTYPE##_COMPLEX_##FUNCNAME(op ##_COMPLEX, long_double) ++ ++#define OFI_DEFINE_REALNO_HANDLERS(ATOMICTYPE, FUNCNAME, op) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint8_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint16_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint32_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, int64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, uint64_t) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, float) \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, double) \ + OFI_DEF_NOOP_##FUNCNAME \ + OFI_DEF_NOOP_##FUNCNAME \ +- OFI_DEF_NOOP_##FUNCNAME \ +- OFI_DEF_NOOP_##FUNCNAME \ +- OFI_DEF_NOOP_##FUNCNAME \ ++ OFI_DEF_##ATOMICTYPE##_##FUNCNAME(op, long_double) \ + OFI_DEF_NOOP_##FUNCNAME + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ ++ ++#define OFI_OP_NOT_SUPPORTED(op) NULL, NULL, NULL, NULL, NULL, \ ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ++ ++#ifdef HAVE_BUILTIN_MM_ATOMICS ++ ++/********************** ++ * Compiler built-in atomics write dispatch table ++ **********************/ ++ ++OFI_DEFINE_REALNO_HANDLERS(WRITEEXT_CMP, FUNC, OFI_OP_MIN) ++OFI_DEFINE_REALNO_HANDLERS(WRITEEXT_CMP, FUNC, OFI_OP_MAX) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_SUM) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_PROD) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_LOR) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_LAND) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BOR) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BAND) ++OFI_DEFINE_ALL_HANDLERS(WRITEEXT, FUNC, OFI_OP_LXOR) ++OFI_DEFINE_INT_HANDLERS(WRITE, FUNC, OFI_OP_BXOR) ++OFI_DEFINE_ALL_HANDLERS(WRITE, FUNC, OFI_OP_WRITE) ++ ++void (*ofi_atomic_write_handlers[OFI_WRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, size_t cnt) = ++{ ++ { OFI_DEFINE_REALNO_HANDLERS(WRITEEXT_CMP, NAME, OFI_OP_MIN) }, ++ { OFI_DEFINE_REALNO_HANDLERS(WRITEEXT_CMP, NAME, OFI_OP_MAX) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_SUM) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_PROD) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_LOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_LAND) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BOR) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BAND) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITEEXT, NAME, OFI_OP_LXOR) }, ++ { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BXOR) }, ++ { OFI_OP_NOT_SUPPORTED(FI_ATOMIC_READ) }, ++ { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_WRITE) }, ++}; ++ ++/*************************** ++ * Compiler built-in atomics read-write dispatch table ++ ***************************/ ++ ++OFI_DEFINE_REALNO_HANDLERS(READWRITEEXT_CMP, FUNC, OFI_OP_MIN) ++OFI_DEFINE_REALNO_HANDLERS(READWRITEEXT_CMP, FUNC, OFI_OP_MAX) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_SUM) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_PROD) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_LOR) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_LAND) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BOR) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BAND) ++OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, FUNC, OFI_OP_LXOR) ++OFI_DEFINE_INT_HANDLERS(READWRITE, FUNC, OFI_OP_BXOR) ++OFI_DEFINE_ALL_HANDLERS(READ, FUNC, OFI_OP_READ) ++OFI_DEFINE_ALL_HANDLERS(EXCHANGE, FUNC, OFI_OP_READWRITE) ++ ++void (*ofi_atomic_readwrite_handlers[OFI_READWRITE_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, void *res, size_t cnt) = ++{ ++ { OFI_DEFINE_REALNO_HANDLERS(READWRITEEXT_CMP, NAME, OFI_OP_MIN) }, ++ { OFI_DEFINE_REALNO_HANDLERS(READWRITEEXT_CMP, NAME, OFI_OP_MAX) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_SUM) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_PROD) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_LOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_LAND) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BOR) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BAND) }, ++ { OFI_DEFINE_ALL_HANDLERS(READWRITEEXT, NAME, OFI_OP_LXOR) }, ++ { OFI_DEFINE_INT_HANDLERS(READWRITE, NAME, OFI_OP_BXOR) }, ++ { OFI_DEFINE_ALL_HANDLERS(READ, NAME, OFI_OP_READ) }, ++ { OFI_DEFINE_ALL_HANDLERS(EXCHANGE, NAME, OFI_OP_READWRITE) }, ++}; ++ ++/***************************** ++ * Compiler built-in atomics compare-swap dispatch table ++ *****************************/ ++ ++OFI_DEFINE_ALL_HANDLERS(CSWAP, FUNC, OFI_OP_CSWAP_EQ) ++OFI_DEFINE_ALL_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_NE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_LE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_LT) ++OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_GE) ++OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, FUNC, OFI_OP_CSWAP_GT) ++OFI_DEFINE_INT_HANDLERS(CSWAPEXT, FUNC, OFI_OP_MSWAP) ++ ++void (*ofi_atomic_swap_handlers[OFI_SWAP_OP_LAST][FI_DATATYPE_LAST]) ++ (void *dst, const void *src, const void *cmp, void *res, size_t cnt) = ++{ ++ { OFI_DEFINE_ALL_HANDLERS(CSWAP, NAME, OFI_OP_CSWAP_EQ) }, ++ { OFI_DEFINE_ALL_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_NE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_LE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_LT) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_GE) }, ++ { OFI_DEFINE_REALNO_HANDLERS(CSWAPEXT_CMP, NAME, OFI_OP_CSWAP_GT) }, ++ { OFI_DEFINE_INT_HANDLERS(CSWAPEXT, NAME, OFI_OP_MSWAP) }, ++}; ++ ++#else /* HAVE_BUILTIN_MM_ATOMICS */ + + /********************** + * Write dispatch table +@@ -329,12 +926,10 @@ void (*ofi_atomic_write_handlers[OFI_WRITE_OP_LAST][FI_DATATYPE_LAST]) + { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BAND) }, + { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_LXOR) }, + { OFI_DEFINE_INT_HANDLERS(WRITE, NAME, OFI_OP_BXOR) }, +- /* no-op: FI_ATOMIC_READ */ +- { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, ++ { OFI_OP_NOT_SUPPORTED(FI_ATOMIC_READ) }, + { OFI_DEFINE_ALL_HANDLERS(WRITE, NAME, OFI_OP_WRITE) }, + }; + +- + /*************************** + * Read-write dispatch table + ***************************/ +@@ -369,7 +964,6 @@ void (*ofi_atomic_readwrite_handlers[OFI_READWRITE_OP_LAST][FI_DATATYPE_LAST]) + { OFI_DEFINE_ALL_HANDLERS(READWRITE, NAME, OFI_OP_WRITE) }, + }; + +- + /***************************** + * Compare-swap dispatch table + *****************************/ +@@ -394,6 +988,7 @@ void (*ofi_atomic_swap_handlers[OFI_SWAP_OP_LAST][FI_DATATYPE_LAST]) + { OFI_DEFINE_INT_HANDLERS(CSWAP, NAME, OFI_OP_MSWAP) }, + }; + ++#endif /* HAVE_BUILTIN_MM_ATOMICS */ + + int ofi_atomic_valid(const struct fi_provider *prov, + enum fi_datatype datatype, enum fi_op op, uint64_t flags) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_attr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_attr.c +index 4ed9c14b8..219ed770a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_attr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_attr.c +@@ -33,6 +33,7 @@ + + #include + ++#include + #include + + #define OFI_MSG_CAPS (FI_SEND | FI_RECV) +@@ -40,7 +41,7 @@ + + static int fi_valid_addr_format(uint32_t prov_format, uint32_t user_format) + { +- if (user_format == FI_FORMAT_UNSPEC) ++ if (user_format == FI_FORMAT_UNSPEC || prov_format == FI_FORMAT_UNSPEC) + return 1; + + switch (prov_format) { +@@ -89,52 +90,43 @@ char *ofi_strdup_append(const char *head, const char *tail) + return str; + } + +-static int ofi_has_util_prefix(const char *str) ++int ofi_exclude_prov_name(char **prov_name_list, const char *util_prov_name) + { +- return !strncasecmp(str, OFI_UTIL_PREFIX, strlen(OFI_UTIL_PREFIX)); +-} ++ char *exclude, *name, *temp; + +-const char *ofi_util_name(const char *str, size_t *len) +-{ +- char *delim; ++ exclude = malloc(strlen(util_prov_name) + 2); ++ if (!exclude) ++ return -FI_ENOMEM; + +- delim = strchr(str, OFI_NAME_DELIM); +- if (delim) { +- if (ofi_has_util_prefix(delim + 1)) { +- *len = strlen(delim + 1); +- return delim + 1; +- } else if (ofi_has_util_prefix(str)) { +- *len = delim - str; +- return str; +- } +- } else if (ofi_has_util_prefix(str)) { +- *len = strlen(str); +- return str; +- } +- *len = 0; +- return NULL; +-} ++ exclude[0] = '^'; ++ strcpy(&exclude[1], util_prov_name); + +-const char *ofi_core_name(const char *str, size_t *len) +-{ +- char *delim; ++ if (!*prov_name_list) ++ goto out; + +- delim = strchr(str, OFI_NAME_DELIM); +- if (delim) { +- if (!ofi_has_util_prefix(delim + 1)) { +- *len = strlen(delim + 1); +- return delim + 1; +- } else if (!ofi_has_util_prefix(str)) { +- *len = delim - str; +- return str; +- } +- } else if (!ofi_has_util_prefix(str)) { +- *len = strlen(str); +- return str; +- } +- *len = 0; +- return NULL; ++ name = strdup(*prov_name_list); ++ if (!name) ++ goto err1; ++ ++ ofi_rm_substr_delim(name, util_prov_name, OFI_NAME_DELIM); + ++ if (strlen(name)) { ++ temp = ofi_strdup_append(name, exclude); ++ if (!temp) ++ goto err2; ++ free(exclude); ++ exclude = temp; ++ } ++ free(name); ++ free(*prov_name_list); ++out: ++ *prov_name_list = exclude; ++ return 0; ++err2: ++ free(name); ++err1: ++ free(exclude); ++ return -FI_ENOMEM; + } + + static int ofi_dup_addr(const struct fi_info *info, struct fi_info *dup) +@@ -163,8 +155,7 @@ static int ofi_info_to_core(uint32_t version, const struct fi_provider *prov, + ofi_alter_info_t info_to_core, + struct fi_info **core_hints) + { +- const char *core_name; +- size_t len; ++ int ret = -FI_ENOMEM; + + if (!(*core_hints = fi_allocinfo())) + return -FI_ENOMEM; +@@ -190,17 +181,18 @@ static int ofi_info_to_core(uint32_t version, const struct fi_provider *prov, + } + + if (util_info->fabric_attr->prov_name) { +- core_name = ofi_core_name(util_info->fabric_attr-> +- prov_name, &len); +- if (core_name) { +- (*core_hints)->fabric_attr->prov_name = +- strndup(core_name, len); +- if (!(*core_hints)->fabric_attr->prov_name) { +- FI_WARN(prov, FI_LOG_FABRIC, +- "Unable to alloc prov name\n"); +- goto err; +- } ++ (*core_hints)->fabric_attr->prov_name = ++ strdup(util_info->fabric_attr->prov_name); ++ if (!(*core_hints)->fabric_attr->prov_name) { ++ FI_WARN(prov, FI_LOG_FABRIC, ++ "Unable to alloc prov name\n"); ++ goto err; + } ++ ret = ofi_exclude_prov_name( ++ &(*core_hints)->fabric_attr->prov_name, ++ prov->name); ++ if (ret) ++ goto err; + } + } + +@@ -217,7 +209,7 @@ static int ofi_info_to_core(uint32_t version, const struct fi_provider *prov, + + err: + fi_freeinfo(*core_hints); +- return -FI_ENOMEM; ++ return ret; + } + + static int ofi_info_to_util(uint32_t version, const struct fi_provider *prov, +@@ -335,28 +327,34 @@ int ofix_getinfo(uint32_t version, const char *node, const char *service, + } + + /* Caller should use only fabric_attr in returned core_info */ +-int ofi_get_core_info_fabric(struct fi_fabric_attr *util_attr, ++int ofi_get_core_info_fabric(const struct fi_provider *prov, ++ const struct fi_fabric_attr *util_attr, + struct fi_info **core_info) + { + struct fi_info hints; +- const char *core_name; +- size_t len; + int ret; + +- core_name = ofi_core_name(util_attr->prov_name, &len); +- if (!core_name) ++ /* ofix_getinfo() would append utility provider name after core / lower ++ * layer provider name */ ++ if (!strstr(util_attr->prov_name, prov->name)) + return -FI_ENODATA; + + memset(&hints, 0, sizeof hints); + if (!(hints.fabric_attr = calloc(1, sizeof(*hints.fabric_attr)))) + return -FI_ENOMEM; + +- hints.fabric_attr->name = util_attr->name; +- hints.fabric_attr->api_version = util_attr->api_version; +- if (!(hints.fabric_attr->prov_name = strndup(core_name, len))) { ++ hints.fabric_attr->prov_name = strdup(util_attr->prov_name); ++ if (!hints.fabric_attr->prov_name) { + ret = -FI_ENOMEM; + goto out; + } ++ ++ ret = ofi_exclude_prov_name(&hints.fabric_attr->prov_name, prov->name); ++ if (ret) ++ goto out; ++ ++ hints.fabric_attr->name = util_attr->name; ++ hints.fabric_attr->api_version = util_attr->api_version; + hints.mode = ~0; + + ret = fi_getinfo(util_attr->api_version, NULL, NULL, OFI_CORE_PROV_ONLY, +@@ -621,6 +619,20 @@ int ofi_check_domain_attr(const struct fi_provider *prov, uint32_t api_version, + return 0; + } + ++static int ofi_check_ep_type(const struct fi_provider *prov, ++ const struct fi_ep_attr *prov_attr, ++ const struct fi_ep_attr *user_attr) ++{ ++ if ((user_attr->type != FI_EP_UNSPEC) && ++ (prov_attr->type != FI_EP_UNSPEC) && ++ (user_attr->type != prov_attr->type)) { ++ FI_INFO(prov, FI_LOG_CORE, "Unsupported endpoint type\n"); ++ FI_INFO_CHECK(prov, prov_attr, user_attr, type, FI_TYPE_EP_TYPE); ++ return -FI_ENODATA; ++ } ++ return 0; ++} ++ + int ofi_check_ep_attr(const struct util_prov *util_prov, uint32_t api_version, + const struct fi_info *prov_info, + const struct fi_info *user_info) +@@ -628,13 +640,11 @@ int ofi_check_ep_attr(const struct util_prov *util_prov, uint32_t api_version, + const struct fi_ep_attr *prov_attr = prov_info->ep_attr; + const struct fi_ep_attr *user_attr = user_info->ep_attr; + const struct fi_provider *prov = util_prov->prov; ++ int ret; + +- if ((user_attr->type != FI_EP_UNSPEC) && +- (user_attr->type != prov_attr->type)) { +- FI_INFO(prov, FI_LOG_CORE, "Unsupported endpoint type\n"); +- FI_INFO_CHECK(prov, prov_attr, user_attr, type, FI_TYPE_EP_TYPE); +- return -FI_ENODATA; +- } ++ ret = ofi_check_ep_type(prov, prov_attr, user_attr); ++ if (ret) ++ return ret; + + if ((user_attr->protocol != FI_PROTO_UNSPEC) && + (user_attr->protocol != prov_attr->protocol)) { +@@ -975,6 +985,15 @@ int ofi_check_info(const struct util_prov *util_prov, + if (!user_info) + return 0; + ++ /* Check oft-used endpoint type attribute first to avoid any other ++ * unnecessary check */ ++ if (user_info->ep_attr) { ++ ret = ofi_check_ep_type(prov, prov_info->ep_attr, ++ user_info->ep_attr); ++ if (ret) ++ return ret; ++ } ++ + if (user_info->caps & ~(prov_info->caps)) { + FI_INFO(prov, FI_LOG_CORE, "Unsupported capabilities\n"); + FI_INFO_CHECK(prov, prov_info, user_info, caps, FI_TYPE_CAPS); +@@ -992,6 +1011,8 @@ int ofi_check_info(const struct util_prov *util_prov, + if (!fi_valid_addr_format(prov_info->addr_format, + user_info->addr_format)) { + FI_INFO(prov, FI_LOG_CORE, "address format not supported\n"); ++ FI_INFO_CHECK(prov, prov_info, user_info, addr_format, ++ FI_TYPE_ADDR_FORMAT); + return -FI_ENODATA; + } + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_av.c +index af319f44b..5e9fd129b 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_av.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_av.c +@@ -56,8 +56,6 @@ enum { + UTIL_DEFAULT_AV_SIZE = 1024, + }; + +-static int ofi_cmap_move_handle_to_peer_list(struct util_cmap *cmap, int index); +- + static int fi_get_src_sockaddr(const struct sockaddr *dest_addr, size_t dest_addrlen, + struct sockaddr **src_addr, size_t *src_addrlen) + { +@@ -104,7 +102,7 @@ out: + + } + +-void ofi_getnodename(char *buf, int buflen) ++void ofi_getnodename(uint16_t sa_family, char *buf, int buflen) + { + int ret; + struct addrinfo ai, *rai = NULL; +@@ -115,7 +113,7 @@ void ofi_getnodename(char *buf, int buflen) + buf[buflen - 1] = '\0'; + if (ret == 0) { + memset(&ai, 0, sizeof(ai)); +- ai.ai_family = AF_INET; ++ ai.ai_family = sa_family ? sa_family : AF_INET; + ret = getaddrinfo(buf, NULL, &ai, &rai); + if (!ret) { + freeaddrinfo(rai); +@@ -127,11 +125,18 @@ void ofi_getnodename(char *buf, int buflen) + ret = ofi_getifaddrs(&ifaddrs); + if (!ret) { + for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { +- if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP) || +- (ifa->ifa_addr->sa_family != AF_INET)) ++ if (ifa->ifa_addr == NULL || !(ifa->ifa_flags & IFF_UP)) ++ continue; ++ ++ if (sa_family) { ++ if (ifa->ifa_addr->sa_family != sa_family) ++ continue; ++ } else if ((ifa->ifa_addr->sa_family != AF_INET) && ++ (ifa->ifa_addr->sa_family != AF_INET6)) { + continue; ++ } + +- ret = getnameinfo(ifa->ifa_addr, sizeof(struct sockaddr_in), ++ ret = getnameinfo(ifa->ifa_addr, ofi_sizeofaddr(ifa->ifa_addr), + buf, buflen, NULL, 0, NI_NUMERICHOST); + buf[buflen - 1] = '\0'; + if (ret == 0) { +@@ -142,7 +147,7 @@ void ofi_getnodename(char *buf, int buflen) + freeifaddrs(ifaddrs); + } + #endif +- /* no reasonable address found, try loopback */ ++ /* no reasonable address found, use ipv4 loopback */ + strncpy(buf, "127.0.0.1", buflen); + buf[buflen - 1] = '\0'; + } +@@ -163,7 +168,7 @@ int ofi_get_src_addr(uint32_t addr_format, + } + } + +-static int fi_get_sockaddr(int sa_family, uint64_t flags, ++static int fi_get_sockaddr(int *sa_family, uint64_t flags, + const char *node, const char *service, + struct sockaddr **addr, size_t *addrlen) + { +@@ -171,7 +176,7 @@ static int fi_get_sockaddr(int sa_family, uint64_t flags, + int ret; + + memset(&hints, 0, sizeof hints); +- hints.ai_family = sa_family; ++ hints.ai_family = *sa_family; + hints.ai_socktype = SOCK_STREAM; + if (flags & FI_SOURCE) + hints.ai_flags = AI_PASSIVE; +@@ -186,6 +191,7 @@ static int fi_get_sockaddr(int sa_family, uint64_t flags, + goto out; + } + ++ *sa_family = ai->ai_family; + *addrlen = ai->ai_addrlen; + out: + freeaddrinfo(ai); +@@ -202,19 +208,29 @@ void ofi_get_str_addr(const char *node, const char *service, + *addrlen = strlen(node) + 1; + } + +-int ofi_get_addr(uint32_t addr_format, uint64_t flags, ++int ofi_get_addr(uint32_t *addr_format, uint64_t flags, + const char *node, const char *service, + void **addr, size_t *addrlen) + { +- switch (addr_format) { ++ int sa_family, ret; ++ ++ switch (*addr_format) { + case FI_SOCKADDR: +- return fi_get_sockaddr(0, flags, node, service, +- (struct sockaddr **) addr, addrlen); ++ sa_family = 0; ++ ret = fi_get_sockaddr(&sa_family, flags, node, service, ++ (struct sockaddr **) addr, addrlen); ++ if (ret) ++ return ret; ++ *addr_format = sa_family == AF_INET ? ++ FI_SOCKADDR_IN : FI_SOCKADDR_IN6; ++ return 0; + case FI_SOCKADDR_IN: +- return fi_get_sockaddr(AF_INET, flags, node, service, ++ sa_family = AF_INET; ++ return fi_get_sockaddr(&sa_family, flags, node, service, + (struct sockaddr **) addr, addrlen); + case FI_SOCKADDR_IN6: +- return fi_get_sockaddr(AF_INET6, flags, node, service, ++ sa_family = AF_INET6; ++ return fi_get_sockaddr(&sa_family, flags, node, service, + (struct sockaddr **) addr, addrlen); + case FI_ADDR_STR: + ofi_get_str_addr(node, service, (char **) addr, addrlen); +@@ -224,27 +240,14 @@ int ofi_get_addr(uint32_t addr_format, uint64_t flags, + } + } + +-static void *util_av_get_data(struct util_av *av, int index) +-{ +- return (char *) av->data + (index * av->addrlen); +-} +- +-void *ofi_av_get_addr(struct util_av *av, int index) +-{ +- FI_DBG(av->prov, FI_LOG_AV, "get[%d]:%s\n", index, +- ofi_hex_str(util_av_get_data(av, index), av->addrlen)); +- return util_av_get_data(av, index); +-} +- +-static void util_av_set_data(struct util_av *av, int index, +- const void *data, size_t len) ++void *ofi_av_get_addr(struct util_av *av, fi_addr_t fi_addr) + { +- FI_DBG(av->prov, FI_LOG_AV, "set[%d]:%s\n", index, +- ofi_hex_str(data, len)); +- memcpy(util_av_get_data(av, index), data, len); ++ struct util_av_entry *entry = ++ util_buf_get_by_index(av->av_entry_pool, fi_addr); ++ return entry->addr; + } + +-static int fi_verify_av_insert(struct util_av *av, uint64_t flags) ++int ofi_verify_av_insert(struct util_av *av, uint64_t flags) + { + if ((av->flags & FI_EVENT) && !av->eq) { + FI_WARN(av->prov, FI_LOG_AV, "no EQ bound to AV\n"); +@@ -262,230 +265,79 @@ static int fi_verify_av_insert(struct util_av *av, uint64_t flags) + /* + * Must hold AV lock + */ +-static int util_av_hash_insert(struct util_av_hash *hash, int slot, +- int index, int *table_slot) ++int ofi_av_insert_addr(struct util_av *av, const void *addr, fi_addr_t *fi_addr) + { +- int entry, i; +- +- if (slot < 0 || slot >= hash->slots) +- return -FI_EINVAL; ++ struct util_av_entry *entry = NULL; + +- if (hash->table[slot].index == UTIL_NO_ENTRY) { +- hash->table[slot].index = index; +- if (table_slot) +- *table_slot = slot; ++ HASH_FIND(hh, av->hash, addr, av->addrlen, entry); ++ if (entry) { ++ if (fi_addr) ++ *fi_addr = util_get_buf_index(av->av_entry_pool, entry); ++ ofi_atomic_inc32(&entry->use_cnt); + return 0; ++ } else { ++ entry = util_buf_indexed_alloc(av->av_entry_pool); ++ if (!entry) ++ return -FI_ENOMEM; ++ if (fi_addr) ++ *fi_addr = util_get_buf_index(av->av_entry_pool, entry); ++ memcpy(entry->addr, addr, av->addrlen); ++ ofi_atomic_initialize32(&entry->use_cnt, 1); ++ HASH_ADD(hh, av->hash, addr, av->addrlen, entry); + } +- +- if (hash->free_list == UTIL_NO_ENTRY) +- return -FI_ENOSPC; +- +- entry = hash->free_list; +- hash->free_list = hash->table[hash->free_list].next; +- +- for (i = slot; hash->table[i].next != UTIL_NO_ENTRY; ) +- i = hash->table[i].next; +- +- hash->table[i].next = entry; +- if (table_slot) +- *table_slot = i; +- hash->table[entry].index = index; +- hash->table[entry].next = UTIL_NO_ENTRY; + return 0; + } + +-/* Caller must hold `av::lock` */ +-static inline +-int util_av_lookup_index(struct util_av *av, const void *addr, +- int slot, int *table_slot) ++int ofi_av_elements_iter(struct util_av *av, ofi_av_apply_func apply, void *arg) + { +- int i, ret = -FI_ENODATA; +- +- if (av->hash.table[slot].index == UTIL_NO_ENTRY) { +- FI_DBG(av->prov, FI_LOG_AV, "no entry at slot (%d)\n", slot); +- goto out; +- } +- +- for (i = slot; i != UTIL_NO_ENTRY; i = av->hash.table[i].next) { +- if (!memcmp(ofi_av_get_addr(av, av->hash.table[i].index), addr, +- av->addrlen)) { +- ret = av->hash.table[i].index; +- if (table_slot) +- *table_slot = i; +- FI_DBG(av->prov, FI_LOG_AV, "entry at index (%d)\n", ret); +- break; +- } +- } +-out: +- FI_DBG(av->prov, FI_LOG_AV, "%d\n", ret); +- return ret; +-} +- +-/* +- * Must hold AV lock +- */ +-int ofi_av_insert_addr(struct util_av *av, const void *addr, int slot, int *index) +-{ +- struct dlist_entry *av_entry; +- struct util_ep *ep; ++ struct util_av_entry *av_entry = NULL, *av_entry_tmp = NULL; + int ret; + +- if (OFI_UNLIKELY(av->free_list == UTIL_NO_ENTRY)) { +- FI_WARN(av->prov, FI_LOG_AV, "AV is full\n"); +- return -FI_ENOSPC; +- } +- +- if (av->flags & OFI_AV_HASH) { +- int table_slot; +- +- if (OFI_UNLIKELY(slot < 0 || slot >= av->hash.slots)) { +- FI_WARN(av->prov, FI_LOG_AV, "invalid slot (%d)\n", slot); +- return -FI_EINVAL; +- } +- ret = util_av_lookup_index(av, addr, slot, &table_slot); +- if (ret != -FI_ENODATA) { +- *index = ret; +- ofi_atomic_inc32(&av->hash.table[table_slot].use_cnt); +- return 0; +- } +- ret = util_av_hash_insert(&av->hash, slot, av->free_list, +- &table_slot); +- if (ret) { +- FI_WARN(av->prov, FI_LOG_AV, +- "failed to insert addr into hash table\n"); ++ HASH_ITER(hh, av->hash, av_entry, av_entry_tmp) { ++ ret = apply(av, av_entry->addr, ++ util_get_buf_index(av->av_entry_pool, av_entry), ++ arg); ++ if (OFI_UNLIKELY(ret)) + return ret; +- } +- ofi_atomic_inc32(&av->hash.table[table_slot].use_cnt); +- } +- +- *index = av->free_list; +- av->free_list = *(int *) util_av_get_data(av, av->free_list); +- util_av_set_data(av, *index, addr, av->addrlen); +- +- dlist_foreach(&av->ep_list, av_entry) { +- ep = container_of(av_entry, struct util_ep, av_entry); +- if (ep->cmap) +- ofi_cmap_update(ep->cmap, addr, (fi_addr_t)(*index)); + } + return 0; + } + +-static inline int +-util_av_hash_lookup_table_slot(struct util_av_hash *hash, int slot, int index) +-{ +- int i; +- +- if (hash->table[slot].index == index) { +- return slot; +- } else { +- for (i = slot; hash->table[i].index != index; ) +- i = hash->table[i].next; +- return i; +- } +-} +- + /* + * Must hold AV lock + */ +-static void util_av_hash_remove(struct util_av_hash *hash, int slot, int index) ++int ofi_av_remove_addr(struct util_av *av, fi_addr_t fi_addr) + { +- int table_slot, slot_next; ++ struct util_av_entry *av_entry = ++ util_buf_get_by_index(av->av_entry_pool, fi_addr); ++ if (!av_entry) ++ return -FI_ENOENT; + +- if (OFI_UNLIKELY(slot < 0 || slot >= hash->slots)) +- return; +- +- table_slot = util_av_hash_lookup_table_slot(hash, slot, index); +- if (table_slot == slot) { +- if (hash->table[table_slot].next == UTIL_NO_ENTRY) { +- hash->table[table_slot].index = UTIL_NO_ENTRY; +- return; +- } +- } +- +- slot_next = hash->table[slot].next; +- hash->table[slot] = hash->table[slot_next]; ++ if (ofi_atomic_dec32(&av_entry->use_cnt)) ++ return FI_SUCCESS; + +- hash->table[slot_next].next = hash->free_list; +- hash->free_list = slot_next; ++ HASH_DELETE(hh, av->hash, av_entry); ++ util_buf_indexed_release(av->av_entry_pool, av_entry); ++ return 0; + } + +-/* +- * Must hold AV lock +- */ +-int ofi_av_remove_addr(struct util_av *av, int slot, int index) ++fi_addr_t ofi_av_lookup_fi_addr(struct util_av *av, const void *addr) + { +- struct util_ep *ep; +- int *entry, *next, i; +- int ret = 0; +- +- if (OFI_UNLIKELY(index < 0 || (size_t)index > av->count)) { +- FI_WARN(av->prov, FI_LOG_AV, "index out of range\n"); +- return -FI_EINVAL; +- } ++ struct util_av_entry *entry = NULL; + +- if (av->flags & FI_SOURCE) { +- int table_slot; +- +- if (OFI_UNLIKELY(slot < 0 || slot >= av->hash.slots)) { +- FI_WARN(av->prov, FI_LOG_AV, "invalid slot (%d)\n", slot); +- return -FI_EINVAL; +- } +- +- table_slot = util_av_hash_lookup_table_slot(&av->hash, slot, index); +- if (ofi_atomic_dec32(&av->hash.table[table_slot].use_cnt)) +- return FI_SUCCESS; +- } +- +- /* This should stay at top */ +- dlist_foreach_container(&av->ep_list, struct util_ep, ep, av_entry) { +- if (ep->cmap && ep->cmap->handles_av[index]) { +- /* TODO this is not optimal. Replace this with something +- * more deterministic: delete handle if we know that peer +- * isn't actively communicating with us +- */ +- ret = ofi_cmap_move_handle_to_peer_list(ep->cmap, index); +- if (ret) { +- FI_WARN(av->prov, FI_LOG_DOMAIN, "Unable to move" +- " handle to peer list. Deleting it.\n"); +- ofi_cmap_del_handle(ep->cmap->handles_av[index]); +- return ret; +- } +- } +- } +- +- if (av->flags & OFI_AV_HASH) +- util_av_hash_remove(&av->hash, slot, index); +- +- entry = util_av_get_data(av, index); +- if (av->free_list == UTIL_NO_ENTRY || index < av->free_list) { +- *entry = av->free_list; +- av->free_list = index; +- } else { +- i = av->free_list; +- for (next = util_av_get_data(av, i); index > *next;) { +- i = *next; +- next = util_av_get_data(av, i); +- } +- util_av_set_data(av, index, next, sizeof index); +- *next = index; +- } ++ fastlock_acquire(&av->lock); ++ HASH_FIND(hh, av->hash, addr, av->addrlen, entry); ++ fastlock_release(&av->lock); + +- return ret; ++ return entry ? util_get_buf_index(av->av_entry_pool, entry) : ++ FI_ADDR_NOTAVAIL; + } + +-int ofi_av_lookup_index(struct util_av *av, const void *addr, int slot) ++static void * ++ofi_av_lookup_addr(struct util_av *av, fi_addr_t fi_addr, size_t *addrlen) + { +- int ret; +- +- if (slot < 0 || slot >= av->hash.slots) { +- FI_WARN(av->prov, FI_LOG_AV, "invalid slot (%d)\n", slot); +- return -FI_EINVAL; +- } +- +- fastlock_acquire(&av->lock); +- ret = util_av_lookup_index(av, addr, slot, NULL); +- fastlock_release(&av->lock); +- return ret; ++ *addrlen = av->addrlen; ++ return ofi_av_get_addr(av, fi_addr); + } + + int ofi_av_bind(struct fid *av_fid, struct fid *eq_fid, uint64_t flags) +@@ -510,7 +362,13 @@ int ofi_av_bind(struct fid *av_fid, struct fid *eq_fid, uint64_t flags) + return 0; + } + +-int ofi_av_close(struct util_av *av) ++static void util_av_close(struct util_av *av) ++{ ++ HASH_CLEAR(hh, av->hash); ++ util_buf_pool_destroy(av->av_entry_pool); ++} ++ ++int ofi_av_close_lightweight(struct util_av *av) + { + if (ofi_atomic_get32(&av->ref)) { + FI_WARN(av->prov, FI_LOG_AV, "AV is busy\n"); +@@ -522,35 +380,55 @@ int ofi_av_close(struct util_av *av) + + ofi_atomic_dec32(&av->domain->ref); + fastlock_destroy(&av->lock); +- /* TODO: unmap data? */ +- free(av->data); ++ + return 0; + } + +-static void util_av_hash_init(struct util_av_hash *hash) ++int ofi_av_close(struct util_av *av) + { +- int i; ++ int ret = ofi_av_close_lightweight(av); ++ if (ret) ++ return ret; ++ util_av_close(av); ++ return 0; ++} + +- for (i = 0; i < hash->slots; i++) { +- hash->table[i].index = UTIL_NO_ENTRY; +- hash->table[i].next = UTIL_NO_ENTRY; +- ofi_atomic_initialize32(&hash->table[i].use_cnt, 0); ++static int util_verify_av_util_attr(struct util_domain *domain, ++ const struct util_av_attr *util_attr) ++{ ++ if (util_attr->flags) { ++ FI_WARN(domain->prov, FI_LOG_AV, "invalid internal flags\n"); ++ return -FI_EINVAL; + } + +- hash->free_list = hash->slots; +- for (i = hash->slots; i < hash->total_count; i++) { +- hash->table[i].index = UTIL_NO_ENTRY; +- hash->table[i].next = i + 1; +- ofi_atomic_initialize32(&hash->table[i].use_cnt, 0); +- } +- hash->table[hash->total_count - 1].next = UTIL_NO_ENTRY; ++ return 0; + } + + static int util_av_init(struct util_av *av, const struct fi_av_attr *attr, + const struct util_av_attr *util_attr) + { +- int *entry, i, ret = 0; ++ int ret = 0; + size_t max_count; ++ struct util_buf_attr pool_attr = { ++ .size = util_attr->addrlen + ++ sizeof(struct util_av_entry), ++ .alignment = 16, ++ .max_cnt = 0, ++ /* Don't use track of buffer, because user can close ++ * the AV without prior deletion of addresses */ ++ .track_used = 0, ++ .indexing = { ++ .used = 1, ++ .ordered = 1, ++ }, ++ }; ++ ++ /* TODO: Handle FI_READ */ ++ /* TODO: Handle mmap - shared AV */ ++ ++ ret = util_verify_av_util_attr(av->domain, util_attr); ++ if (ret) ++ return ret; + + if (attr->count) { + max_count = attr->count; +@@ -559,51 +437,25 @@ static int util_av_init(struct util_av *av, const struct fi_av_attr *attr, + max_count = UTIL_DEFAULT_AV_SIZE; + } + +- ofi_atomic_initialize32(&av->ref, 0); +- fastlock_init(&av->lock); +- av->count = max_count ? max_count : UTIL_DEFAULT_AV_SIZE; +- av->count = roundup_power_of_two(av->count); +- av->addrlen = util_attr->addrlen; +- av->flags = util_attr->flags | attr->flags; +- ++ av->count = roundup_power_of_two(max_count ? ++ max_count : ++ UTIL_DEFAULT_AV_SIZE); + FI_INFO(av->prov, FI_LOG_AV, "AV size %zu\n", av->count); + +- /* TODO: Handle FI_READ */ +- /* TODO: Handle mmap - shared AV */ +- +- if (util_attr->flags & OFI_AV_HASH) { +- av->hash.slots = av->count; +- if (util_attr->overhead) +- av->hash.total_count = av->count + util_attr->overhead; +- else +- av->hash.total_count = av->count * 2; +- FI_INFO(av->prov, FI_LOG_AV, +- "OFI_AV_HASH requested, hash size %u\n", av->hash.total_count); +- } +- +- av->data = malloc((av->count * util_attr->addrlen) + +- (av->hash.total_count * sizeof(*av->hash.table))); +- if (!av->data) +- return -FI_ENOMEM; +- +- for (i = 0; i < (int)av->count - 1; i++) { +- entry = util_av_get_data(av, i); +- *entry = i + 1; +- } +- entry = util_av_get_data(av, av->count - 1); +- *entry = UTIL_NO_ENTRY; ++ av->addrlen = util_attr->addrlen; ++ av->flags = util_attr->flags | attr->flags; ++ av->hash = NULL; + +- if (util_attr->flags & OFI_AV_HASH) { +- av->hash.table = util_av_get_data(av, av->count); +- util_av_hash_init(&av->hash); +- } ++ pool_attr.chunk_cnt = av->count; ++ ret = util_buf_pool_create_attr(&pool_attr, &av->av_entry_pool); ++ if (ret) ++ return ret; + + return ret; + } + + static int util_verify_av_attr(struct util_domain *domain, +- const struct fi_av_attr *attr, +- const struct util_av_attr *util_attr) ++ const struct fi_av_attr *attr) + { + switch (attr->type) { + case FI_AV_MAP: +@@ -629,34 +481,21 @@ static int util_verify_av_attr(struct util_domain *domain, + return -FI_EINVAL; + } + +- if (util_attr->flags & ~(OFI_AV_HASH)) { +- FI_WARN(domain->prov, FI_LOG_AV, "invalid internal flags\n"); +- return -FI_EINVAL; +- } +- +- if (util_attr->addrlen < sizeof(int)) { +- FI_WARN(domain->prov, FI_LOG_AV, "unsupported address size\n"); +- return -FI_ENOSYS; +- } +- + return 0; + } + +-int ofi_av_init(struct util_domain *domain, const struct fi_av_attr *attr, +- const struct util_av_attr *util_attr, +- struct util_av *av, void *context) ++int ofi_av_init_lightweight(struct util_domain *domain, const struct fi_av_attr *attr, ++ struct util_av *av, void *context) + { + int ret; + +- ret = util_verify_av_attr(domain, attr, util_attr); ++ ret = util_verify_av_attr(domain, attr); + if (ret) + return ret; + + av->prov = domain->prov; +- ret = util_av_init(av, attr, util_attr); +- if (ret) +- return ret; +- ++ ofi_atomic_initialize32(&av->ref, 0); ++ fastlock_init(&av->lock); + av->av_fid.fid.fclass = FI_CLASS_AV; + /* + * ops set by provider +@@ -670,52 +509,24 @@ int ofi_av_init(struct util_domain *domain, const struct fi_av_attr *attr, + return 0; + } + +- +-/************************************************************************* +- * +- * AV for IP addressing +- * +- *************************************************************************/ +- +-static int ip_av_slot(struct util_av *av, const struct sockaddr *sa) ++int ofi_av_init(struct util_domain *domain, const struct fi_av_attr *attr, ++ const struct util_av_attr *util_attr, ++ struct util_av *av, void *context) + { +- uint32_t host; +- uint16_t port; +- +- if (!sa) +- return UTIL_NO_ENTRY; +- +- switch (((struct sockaddr *) sa)->sa_family) { +- case AF_INET: +- host = (uint16_t) ntohl(((struct sockaddr_in *) sa)-> +- sin_addr.s_addr); +- port = ntohs(((struct sockaddr_in *) sa)->sin_port); +- break; +- case AF_INET6: +- host = (uint16_t) ((struct sockaddr_in6 *) sa)-> +- sin6_addr.s6_addr[15]; +- port = ntohs(((struct sockaddr_in6 *) sa)->sin6_port); +- break; +- default: +- assert(0); +- return UTIL_NO_ENTRY; +- } +- +- /* TODO: Find a good hash function */ +- FI_DBG(av->prov, FI_LOG_AV, "slot %d\n", +- ((host << 16) | port) % av->hash.slots); +- return ((host << 16) | port) % av->hash.slots; +-} ++ int ret = ofi_av_init_lightweight(domain, attr, av, context); ++ if (ret) ++ return ret; + +-int ip_av_get_index(struct util_av *av, const void *addr) +-{ +- return ofi_av_lookup_index(av, addr, ip_av_slot(av, addr)); ++ ret = util_av_init(av, attr, util_attr); ++ if (ret) ++ return ret; ++ return ret; + } + + void ofi_av_write_event(struct util_av *av, uint64_t data, + int err, void *context) + { +- struct fi_eq_err_entry entry; ++ struct fi_eq_err_entry entry = { 0 }; + size_t size; + ssize_t ret; + uint64_t flags; +@@ -741,6 +552,17 @@ void ofi_av_write_event(struct util_av *av, uint64_t data, + FI_WARN(av->prov, FI_LOG_AV, "error writing to EQ\n"); + } + ++/************************************************************************* ++ * ++ * AV for IP addressing ++ * ++ *************************************************************************/ ++ ++fi_addr_t ofi_ip_av_get_fi_addr(struct util_av *av, const void *addr) ++{ ++ return ofi_av_lookup_fi_addr(av, addr); ++} ++ + static int ip_av_valid_addr(struct util_av *av, const void *addr) + { + const struct sockaddr_in *sin = addr; +@@ -760,11 +582,12 @@ static int ip_av_valid_addr(struct util_av *av, const void *addr) + static int ip_av_insert_addr(struct util_av *av, const void *addr, + fi_addr_t *fi_addr, void *context) + { +- int ret, index = -1; ++ int ret; ++ fi_addr_t fi_addr_ret; + + if (ip_av_valid_addr(av, addr)) { + fastlock_acquire(&av->lock); +- ret = ofi_av_insert_addr(av, addr, ip_av_slot(av, addr), &index); ++ ret = ofi_av_insert_addr(av, addr, &fi_addr_ret); + fastlock_release(&av->lock); + } else { + ret = -FI_EADDRNOTAVAIL; +@@ -772,7 +595,7 @@ static int ip_av_insert_addr(struct util_av *av, const void *addr, + } + + if (fi_addr) +- *fi_addr = !ret ? index : FI_ADDR_NOTAVAIL; ++ *fi_addr = !ret ? fi_addr_ret : FI_ADDR_NOTAVAIL; + + ofi_straddr_dbg(av->prov, FI_LOG_AV, "av_insert addr", addr); + if (fi_addr) +@@ -782,21 +605,12 @@ static int ip_av_insert_addr(struct util_av *av, const void *addr, + return ret; + } + +-static int ip_av_insert(struct fid_av *av_fid, const void *addr, size_t count, +- fi_addr_t *fi_addr, uint64_t flags, void *context) ++int ofi_ip_av_insertv(struct util_av *av, const void *addr, size_t addrlen, ++ size_t count, fi_addr_t *fi_addr, void *context) + { +- struct util_av *av; + int ret, success_cnt = 0; + size_t i; +- size_t addrlen; + +- av = container_of(av_fid, struct util_av, av_fid); +- ret = fi_verify_av_insert(av, flags); +- if (ret) +- return ret; +- +- addrlen = ((struct sockaddr *) addr)->sa_family == AF_INET ? +- sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); + FI_DBG(av->prov, FI_LOG_AV, "inserting %zu addresses\n", count); + for (i = 0; i < count; i++) { + ret = ip_av_insert_addr(av, (const char *) addr + i * addrlen, +@@ -817,35 +631,19 @@ static int ip_av_insert(struct fid_av *av_fid, const void *addr, size_t count, + return ret; + } + +-static int ip_av_insert_svc(struct util_av *av, const char *node, +- const char *service, fi_addr_t *fi_addr, +- void *context) ++int ofi_ip_av_insert(struct fid_av *av_fid, const void *addr, size_t count, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) + { +- struct addrinfo hints, *ai; ++ struct util_av *av; + int ret; + +- FI_INFO(av->prov, FI_LOG_AV, "inserting %s-%s\n", node, service); +- +- memset(&hints, 0, sizeof hints); +- hints.ai_socktype = SOCK_DGRAM; +- switch (av->domain->addr_format) { +- case FI_SOCKADDR_IN: +- hints.ai_family = AF_INET; +- break; +- case FI_SOCKADDR_IN6: +- hints.ai_family = AF_INET6; +- break; +- default: +- break; +- } +- +- ret = getaddrinfo(node, service, &hints, &ai); ++ av = container_of(av_fid, struct util_av, av_fid); ++ ret = ofi_verify_av_insert(av, flags); + if (ret) + return ret; + +- ret = ip_av_insert_addr(av, ai->ai_addr, fi_addr, context); +- freeaddrinfo(ai); +- return ret; ++ return ofi_ip_av_insertv(av, addr, ofi_sizeofaddr(addr), ++ count, fi_addr, context); + } + + static int ip_av_insertsvc(struct fid_av *av, const char *node, +@@ -855,79 +653,98 @@ static int ip_av_insertsvc(struct fid_av *av, const char *node, + return fi_av_insertsym(av, node, 1, service, 1, fi_addr, flags, context); + } + +-static int ip_av_insert_ip4sym(struct util_av *av, +- struct in_addr ip, size_t ipcnt, +- uint16_t port, size_t portcnt, +- fi_addr_t *fi_addr, void *context) ++/* Caller should free *addr */ ++static int ++ip_av_ip4sym_getaddr(struct util_av *av, struct in_addr ip, size_t ipcnt, ++ uint16_t port, size_t portcnt, void **addr, size_t *addrlen) + { +- struct sockaddr_in sin; +- int fi, ret, success_cnt = 0; +- size_t i, p; +- +- memset(&sin, 0, sizeof sin); +- sin.sin_family = AF_INET; +- +- for (i = 0, fi = 0; i < ipcnt; i++) { +- /* TODO: should we skip addresses x.x.x.0 and x.x.x.255? */ +- sin.sin_addr.s_addr = htonl(ntohl(ip.s_addr) + i); +- +- for (p = 0; p < portcnt; p++, fi++) { +- sin.sin_port = htons(port + p); +- ret = ip_av_insert_addr(av, &sin, fi_addr ? +- &fi_addr[fi] : NULL, context); +- if (!ret) +- success_cnt++; +- else if (av->eq) +- ofi_av_write_event(av, fi, -ret, context); ++ struct sockaddr_in *sin; ++ int count = ipcnt * portcnt; ++ size_t i, p, k; ++ ++ *addrlen = sizeof(*sin); ++ sin = calloc(count, *addrlen); ++ if (!sin) ++ return -FI_ENOMEM; ++ ++ for (i = 0, k = 0; i < ipcnt; i++) { ++ for (p = 0; p < portcnt; p++, k++) { ++ sin[k].sin_family = AF_INET; ++ /* TODO: should we skip addresses x.x.x.0 and x.x.x.255? */ ++ sin[k].sin_addr.s_addr = htonl(ntohl(ip.s_addr) + i); ++ sin[k].sin_port = htons(port + p); + } + } +- +- return success_cnt; ++ *addr = sin; ++ return count; + } + +-static int ip_av_insert_ip6sym(struct util_av *av, +- struct in6_addr ip, size_t ipcnt, +- uint16_t port, size_t portcnt, +- fi_addr_t *fi_addr, void *context) ++/* Caller should free *addr */ ++static int ++ip_av_ip6sym_getaddr(struct util_av *av, struct in6_addr ip, size_t ipcnt, ++ uint16_t port, size_t portcnt, void **addr, size_t *addrlen) + { +- struct sockaddr_in6 sin6; +- int j, fi, ret, success_cnt = 0; +- size_t i, p; +- +- memset(&sin6, 0, sizeof sin6); +- sin6.sin6_family = AF_INET6; +- sin6.sin6_addr = ip; +- +- for (i = 0, fi = 0; i < ipcnt; i++) { +- for (p = 0; p < portcnt; p++, fi++) { +- sin6.sin6_port = htons(port + p); +- ret = ip_av_insert_addr(av, &sin6, fi_addr ? +- &fi_addr[fi] : NULL, context); +- if (!ret) +- success_cnt++; +- else if (av->eq) +- ofi_av_write_event(av, fi, -ret, context); +- } ++ struct sockaddr_in6 *sin6, sin6_temp; ++ int j, count = ipcnt * portcnt; ++ size_t i, p, k; ++ ++ *addrlen = sizeof(*sin6); ++ sin6 = calloc(count, *addrlen); ++ if (!sin6) ++ return -FI_ENOMEM; ++ ++ sin6_temp.sin6_addr = ip; + ++ for (i = 0, k = 0; i < ipcnt; i++) { ++ for (p = 0; p < portcnt; p++, k++) { ++ sin6[k].sin6_family = AF_INET6; ++ sin6[k].sin6_addr = sin6_temp.sin6_addr; ++ sin6[k].sin6_port = htons(port + p); ++ } + /* TODO: should we skip addresses x::0 and x::255? */ + for (j = 15; j >= 0; j--) { +- if (++sin6.sin6_addr.s6_addr[j] < 255) ++ if (++sin6_temp.sin6_addr.s6_addr[j] < 255) + break; + } + } +- +- return success_cnt; ++ *addr = sin6; ++ return count; + } + +-static int ip_av_insert_nodesym(struct util_av *av, +- const char *node, size_t nodecnt, +- const char *service, size_t svccnt, +- fi_addr_t *fi_addr, void *context) ++/* Caller should free *addr */ ++static int ip_av_nodesym_getaddr(struct util_av *av, const char *node, ++ size_t nodecnt, const char *service, ++ size_t svccnt, void **addr, size_t *addrlen) + { ++ struct addrinfo hints, *ai; ++ void *addr_temp; + char name[FI_NAME_MAX]; + char svc[FI_NAME_MAX]; + size_t name_len, n, s; +- int fi, ret, name_index, svc_index, success_cnt = 0; ++ int ret, name_index, svc_index, count = nodecnt * svccnt; ++ ++ memset(&hints, 0, sizeof hints); ++ ++ hints.ai_socktype = SOCK_DGRAM; ++ switch (av->domain->addr_format) { ++ case FI_SOCKADDR_IN: ++ hints.ai_family = AF_INET; ++ *addrlen = sizeof(struct sockaddr_in); ++ break; ++ case FI_SOCKADDR_IN6: ++ hints.ai_family = AF_INET6; ++ *addrlen = sizeof(struct sockaddr_in6); ++ break; ++ default: ++ FI_INFO(av->prov, FI_LOG_AV, "Unknown address format!\n"); ++ return -FI_EINVAL; ++ } ++ ++ *addr = calloc(nodecnt * svccnt, *addrlen); ++ if (!*addr) ++ return -FI_ENOMEM; ++ ++ addr_temp = *addr; + + for (name_len = strlen(node); isdigit(node[name_len - 1]); ) + name_len--; +@@ -936,7 +753,7 @@ static int ip_av_insert_nodesym(struct util_av *av, + name_index = atoi(node + name_len); + svc_index = atoi(service); + +- for (n = 0, fi = 0; n < nodecnt; n++) { ++ for (n = 0; n < nodecnt; n++) { + if (nodecnt == 1) { + strncpy(name, node, sizeof(name) - 1); + name[FI_NAME_MAX - 1] = '\0'; +@@ -945,7 +762,7 @@ static int ip_av_insert_nodesym(struct util_av *av, + "%zu", name_index + n); + } + +- for (s = 0; s < svccnt; s++, fi++) { ++ for (s = 0; s < svccnt; s++) { + if (svccnt == 1) { + strncpy(svc, service, sizeof(svc) - 1); + svc[FI_NAME_MAX - 1] = '\0'; +@@ -953,33 +770,33 @@ static int ip_av_insert_nodesym(struct util_av *av, + snprintf(svc, sizeof(svc) - 1, + "%zu", svc_index + s); + } ++ FI_INFO(av->prov, FI_LOG_AV, "resolving %s:%s for AV " ++ "insert\n", node, service); ++ ++ ret = getaddrinfo(node, service, &hints, &ai); ++ if (ret) ++ goto err; + +- ret = ip_av_insert_svc(av, name, svc, fi_addr ? +- &fi_addr[fi] : NULL, context); +- if (!ret) +- success_cnt++; +- else if (av->eq) +- ofi_av_write_event(av, fi, -ret, context); ++ memcpy(addr_temp, ai->ai_addr, *addrlen); ++ addr_temp = (char *)addr_temp + *addrlen; ++ freeaddrinfo(ai); + } + } +- +- return success_cnt; ++ return count; ++err: ++ free(*addr); ++ return ret; + } + +-static int ip_av_insertsym(struct fid_av *av_fid, const char *node, size_t nodecnt, +- const char *service, size_t svccnt, fi_addr_t *fi_addr, +- uint64_t flags, void *context) ++/* Caller should free *addr */ ++int ofi_ip_av_sym_getaddr(struct util_av *av, const char *node, ++ size_t nodecnt, const char *service, ++ size_t svccnt, void **addr, size_t *addrlen) + { +- struct util_av *av; + struct in6_addr ip6; + struct in_addr ip4; + int ret; + +- av = container_of(av_fid, struct util_av, av_fid); +- ret = fi_verify_av_insert(av, flags); +- if (ret) +- return ret; +- + if (strlen(node) >= FI_NAME_MAX || strlen(service) >= FI_NAME_MAX) { + FI_WARN(av->prov, FI_LOG_AV, + "node or service name is too long\n"); +@@ -989,38 +806,54 @@ static int ip_av_insertsym(struct fid_av *av_fid, const char *node, size_t nodec + ret = inet_pton(AF_INET, node, &ip4); + if (ret == 1) { + FI_INFO(av->prov, FI_LOG_AV, "insert symmetric IPv4\n"); +- ret = ip_av_insert_ip4sym(av, ip4, nodecnt, ++ return ip_av_ip4sym_getaddr(av, ip4, nodecnt, + (uint16_t) strtol(service, NULL, 0), +- svccnt, fi_addr, context); +- goto out; ++ svccnt, addr, addrlen); + } + + ret = inet_pton(AF_INET6, node, &ip6); + if (ret == 1) { + FI_INFO(av->prov, FI_LOG_AV, "insert symmetric IPv6\n"); +- ret = ip_av_insert_ip6sym(av, ip6, nodecnt, ++ return ip_av_ip6sym_getaddr(av, ip6, nodecnt, + (uint16_t) strtol(service, NULL, 0), +- svccnt, fi_addr, context); +- goto out; ++ svccnt, addr, addrlen); + } + + FI_INFO(av->prov, FI_LOG_AV, "insert symmetric host names\n"); +- ret = ip_av_insert_nodesym(av, node, nodecnt, service, svccnt, +- fi_addr, context); ++ return ip_av_nodesym_getaddr(av, node, nodecnt, service, ++ svccnt, addr, addrlen); ++} + +-out: +- if (av->eq) { +- ofi_av_write_event(av, ret, 0, context); +- ret = 0; +- } ++static int ip_av_insertsym(struct fid_av *av_fid, const char *node, ++ size_t nodecnt, const char *service, size_t svccnt, ++ fi_addr_t *fi_addr, uint64_t flags, void *context) ++{ ++ struct util_av *av; ++ void *addr; ++ size_t addrlen; ++ int ret, count; ++ ++ av = container_of(av_fid, struct util_av, av_fid); ++ ret = ofi_verify_av_insert(av, flags); ++ if (ret) ++ return ret; ++ ++ count = ofi_ip_av_sym_getaddr(av, node, nodecnt, service, ++ svccnt, &addr, &addrlen); ++ if (count <= 0) ++ return count; ++ ++ ret = ofi_ip_av_insertv(av, addr, addrlen, count, ++ fi_addr, context); ++ free(addr); + return ret; + } + +-static int ip_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count, +- uint64_t flags) ++int ofi_ip_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, ++ size_t count, uint64_t flags) + { + struct util_av *av; +- int i, slot, index, ret; ++ int i, ret; + + av = container_of(av_fid, struct util_av, av_fid); + if (flags) { +@@ -1035,52 +868,46 @@ static int ip_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, size_t count, + * Thus, we walk through the array backwards. + */ + for (i = count - 1; i >= 0; i--) { +- index = (int) fi_addr[i]; +- slot = ip_av_slot(av, ip_av_get_addr(av, index)); + fastlock_acquire(&av->lock); +- ret = ofi_av_remove_addr(av, slot, index); ++ ret = ofi_av_remove_addr(av, fi_addr[i]); + fastlock_release(&av->lock); + if (ret) { + FI_WARN(av->prov, FI_LOG_AV, +- "removal of fi_addr %d failed\n", index); ++ "removal of fi_addr %"PRIu64" failed\n", ++ fi_addr[i]); + } + } + return 0; + } + +-static int ip_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, void *addr, +- size_t *addrlen) ++int ofi_ip_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, ++ void *addr, size_t *addrlen) + { +- struct util_av *av; +- int index; +- +- av = container_of(av_fid, struct util_av, av_fid); +- index = (int) fi_addr; +- if (index < 0 || (size_t)index > av->count) { +- FI_WARN(av->prov, FI_LOG_AV, "unknown address\n"); +- return -FI_EINVAL; +- } +- +- memcpy(addr, ip_av_get_addr(av, index), +- MIN(*addrlen, av->addrlen)); ++ struct util_av *av = ++ container_of(av_fid, struct util_av, av_fid); ++ size_t av_addrlen; ++ void *av_addr = ofi_av_lookup_addr(av, fi_addr, &av_addrlen); ++ ++ memcpy(addr, av_addr, MIN(*addrlen, av_addrlen)); + *addrlen = av->addrlen; ++ + return 0; + } + +-static const char *ip_av_straddr(struct fid_av *av, const void *addr, char *buf, +- size_t *len) ++const char * ++ofi_ip_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len) + { + return ofi_straddr(buf, len, FI_SOCKADDR, addr); + } + + static struct fi_ops_av ip_av_ops = { + .size = sizeof(struct fi_ops_av), +- .insert = ip_av_insert, ++ .insert = ofi_ip_av_insert, + .insertsvc = ip_av_insertsvc, + .insertsym = ip_av_insertsym, +- .remove = ip_av_remove, +- .lookup = ip_av_lookup, +- .straddr = ip_av_straddr, ++ .remove = ofi_ip_av_remove, ++ .lookup = ofi_ip_av_lookup, ++ .straddr = ofi_ip_av_straddr, + }; + + static int ip_av_close(struct fid *av_fid) +@@ -1104,8 +931,8 @@ static struct fi_ops ip_av_fi_ops = { + .ops_open = fi_no_ops_open, + }; + +-int ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context, int flags) ++int ofi_ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context, int flags) + { + struct util_domain *domain; + struct util_av_attr util_attr; +@@ -1118,7 +945,6 @@ int ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, + else + util_attr.addrlen = sizeof(struct sockaddr_in6); + +- util_attr.overhead = attr->count >> 1; + util_attr.flags = flags; + + if (attr->type == FI_AV_UNSPEC) +@@ -1140,520 +966,8 @@ int ip_av_create_flags(struct fid_domain *domain_fid, struct fi_av_attr *attr, + return 0; + } + +-int ip_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av, void *context) +-{ +- struct util_domain *domain = container_of(domain_fid, struct util_domain, +- domain_fid); +- +- return ip_av_create_flags(domain_fid, attr, av, context, +- (domain->info_domain_caps & FI_SOURCE) ? +- OFI_AV_HASH : 0); +-} +- +-/* +- * Connection map +- */ +- +-/* Caller should hold cmap->lock */ +-static void util_cmap_set_key(struct util_cmap_handle *handle) +-{ +- handle->key = ofi_idx2key(&handle->cmap->key_idx, +- ofi_idx_insert(&handle->cmap->handles_idx, handle)); +-} +- +-/* Caller should hold cmap->lock */ +-static void util_cmap_clear_key(struct util_cmap_handle *handle) +-{ +- int index = ofi_key2idx(&handle->cmap->key_idx, handle->key); +- +- if (!ofi_idx_is_valid(&handle->cmap->handles_idx, index)) +- FI_WARN(handle->cmap->av->prov, FI_LOG_AV, "Invalid key!\n"); +- else +- ofi_idx_remove(&handle->cmap->handles_idx, index); +-} +- +-struct util_cmap_handle *ofi_cmap_key2handle(struct util_cmap *cmap, uint64_t key) +-{ +- struct util_cmap_handle *handle; +- +- fastlock_acquire(&cmap->lock); +- if (!(handle = ofi_idx_lookup(&cmap->handles_idx, +- ofi_key2idx(&cmap->key_idx, key)))) { +- FI_WARN(cmap->av->prov, FI_LOG_AV, "Invalid key!\n"); +- } else { +- if (handle->key != key) { +- FI_WARN(cmap->av->prov, FI_LOG_AV, +- "handle->key not matching given key\n"); +- handle = NULL; +- } +- } +- fastlock_release(&cmap->lock); +- return handle; +-} +- +-/* Caller must hold cmap->lock */ +-static void util_cmap_init_handle(struct util_cmap_handle *handle, +- struct util_cmap *cmap, +- enum util_cmap_state state, +- fi_addr_t fi_addr, +- struct util_cmap_peer *peer) +-{ +- handle->cmap = cmap; +- handle->state = state; +- util_cmap_set_key(handle); +- handle->fi_addr = fi_addr; +- handle->peer = peer; +-} +- +-static int util_cmap_match_peer(struct dlist_entry *entry, const void *addr) +-{ +- struct util_cmap_peer *peer; +- +- peer = container_of(entry, struct util_cmap_peer, entry); +- return !memcmp(peer->addr, addr, peer->handle->cmap->av->addrlen); +-} +- +-/* Caller must hold cmap->lock */ +-static int util_cmap_del_handle(struct util_cmap_handle *handle) +-{ +- struct util_cmap *cmap = handle->cmap; +- int ret; +- +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Deleting connection handle: %p\n", handle); +- if (handle->peer) { +- dlist_remove(&handle->peer->entry); +- free(handle->peer); +- handle->peer = NULL; +- } else { +- cmap->handles_av[handle->fi_addr] = 0; +- } +- util_cmap_clear_key(handle); +- +- handle->state = CMAP_SHUTDOWN; +- /* Signal event handler thread to delete the handle. This is required +- * so that the event handler thread handles any pending events for this +- * ep correctly. Handle would be freed finally after processing the +- * events */ +- ret = cmap->attr.signal(cmap->ep, handle, OFI_CMAP_FREE); +- if (ret) { +- FI_WARN(cmap->av->prov, FI_LOG_FABRIC, +- "Unable to signal event handler thread\n"); +- return ret; +- } +- return 0; +-} +- +-void ofi_cmap_del_handle(struct util_cmap_handle *handle) +-{ +- struct util_cmap *cmap = handle->cmap; +- fastlock_acquire(&cmap->lock); +- util_cmap_del_handle(handle); +- fastlock_release(&cmap->lock); +-} +- +-/* Caller must hold cmap->lock */ +-int util_cmap_alloc_handle(struct util_cmap *cmap, fi_addr_t fi_addr, +- enum util_cmap_state state, +- struct util_cmap_handle **handle) +-{ +- *handle = cmap->attr.alloc(); +- if (!*handle) +- return -FI_ENOMEM; +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Allocated handle: %p for " +- "fi_addr: %" PRIu64 "\n", *handle, fi_addr); +- util_cmap_init_handle(*handle, cmap, state, fi_addr, NULL); +- cmap->handles_av[fi_addr] = *handle; +- return 0; +-} +- +-/* Caller must hold cmap->lock */ +-static int util_cmap_alloc_handle_peer(struct util_cmap *cmap, void *addr, +- enum util_cmap_state state, +- struct util_cmap_handle **handle) +-{ +- struct util_cmap_peer *peer; +- +- peer = calloc(1, sizeof(*peer) + cmap->av->addrlen); +- if (!peer) +- return -FI_ENOMEM; +- *handle = cmap->attr.alloc(); +- if (!*handle) { +- free(peer); +- return -FI_ENOMEM; +- } +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_AV, "Allocated handle for addr", +- addr); +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "handle: %p\n", *handle); +- util_cmap_init_handle(*handle, cmap, state, FI_ADDR_UNSPEC, peer); +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Adding handle to peer list\n"); +- peer->handle = *handle; +- memcpy(peer->addr, addr, cmap->av->addrlen); +- dlist_insert_tail(&peer->entry, &cmap->peer_list); +- return 0; +-} +- +-/* Caller must hold cmap->lock */ +-static struct util_cmap_handle * +-util_cmap_get_handle_peer(struct util_cmap *cmap, const void *addr) ++int ofi_ip_av_create(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av, void *context) + { +- struct util_cmap_peer *peer; +- struct dlist_entry *entry; +- +- entry = dlist_find_first_match(&cmap->peer_list, util_cmap_match_peer, +- addr); +- if (!entry) +- return NULL; +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_AV, "handle found in peer list" +- " for addr", addr); +- peer = container_of(entry, struct util_cmap_peer, entry); +- return peer->handle; +-} +- +-static int ofi_cmap_move_handle_to_peer_list(struct util_cmap *cmap, int index) +-{ +- struct util_cmap_handle *handle = cmap->handles_av[index]; +- int ret = 0; +- +- fastlock_acquire(&cmap->lock); +- if (!handle) +- goto unlock; +- +- handle->peer = calloc(1, sizeof(*handle->peer) + cmap->av->addrlen); +- if (!handle->peer) { +- ret = -FI_ENOMEM; +- goto unlock; +- } +- handle->peer->handle = handle; +- memcpy(handle->peer->addr, ofi_av_get_addr(cmap->av, index), +- cmap->av->addrlen); +- dlist_insert_tail(&handle->peer->entry, &cmap->peer_list); +-unlock: +- fastlock_release(&cmap->lock); +- return ret; +-} +- +-/* Caller must hold cmap->lock */ +-static void util_cmap_move_handle(struct util_cmap_handle *handle, +- fi_addr_t fi_addr) +-{ +- dlist_remove(&handle->peer->entry); +- free(handle->peer); +- handle->peer = NULL; +- handle->fi_addr = fi_addr; +- handle->cmap->handles_av[fi_addr] = handle; +-} +- +-void ofi_cmap_update(struct util_cmap *cmap, const void *addr, fi_addr_t fi_addr) +-{ +- struct util_cmap_handle *handle; +- +- fastlock_acquire(&cmap->lock); +- handle = util_cmap_get_handle_peer(cmap, addr); +- if (!handle) +- goto out; +- util_cmap_move_handle(handle, fi_addr); +- cmap->av_updated = 1; +-out: +- fastlock_release(&cmap->lock); +-} +- +-/* Caller must hold cmap->lock */ +-struct util_cmap_handle * +-util_cmap_get_handle(struct util_cmap *cmap, fi_addr_t fi_addr) +-{ +- if (fi_addr > cmap->av->count) { +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, "Invalid fi_addr\n"); +- return NULL; +- } +- return cmap->handles_av[fi_addr]; +-} +- +-void ofi_cmap_process_shutdown(struct util_cmap *cmap, +- struct util_cmap_handle *handle) +-{ +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Processing shutdown for handle: %p\n", handle); +- fastlock_acquire(&cmap->lock); +- if (handle->state > CMAP_SHUTDOWN) { +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, +- "Invalid handle on shutdown event\n"); +- } else if (handle->state != CMAP_SHUTDOWN) { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Got remote shutdown\n"); +- util_cmap_del_handle(handle); +- } else { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Got local shutdown\n"); +- } +- fastlock_release(&cmap->lock); +-} +- +-/* Caller must hold cmap->lock */ +-void ofi_cmap_process_connect(struct util_cmap *cmap, +- struct util_cmap_handle *handle, +- uint64_t *remote_key) +-{ +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Processing connect for handle: %p\n", handle); +- handle->state = CMAP_CONNECTED; +- if (remote_key) +- handle->remote_key = *remote_key; +-} +- +-void ofi_cmap_process_reject(struct util_cmap *cmap, +- struct util_cmap_handle *handle) +-{ +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Processing reject for handle: %p\n", handle); +- fastlock_acquire(&cmap->lock); +- switch (handle->state) { +- case CMAP_CONNREQ_RECV: +- case CMAP_CONNECTED: +- /* Handle is being re-used for incoming connection request */ +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Connection handle is being re-used. Ignoring reject\n"); +- break; +- case CMAP_CONNREQ_SENT: +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Deleting connection handle\n"); +- util_cmap_del_handle(handle); +- break; +- case CMAP_SHUTDOWN: +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Connection handle already being deleted\n"); +- break; +- default: +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, "Invalid cmap state: " +- "%d when receiving connection reject\n", handle->state); +- assert(0); +- } +- fastlock_release(&cmap->lock); +-} +- +-int ofi_cmap_process_connreq(struct util_cmap *cmap, void *addr, +- struct util_cmap_handle **handle_ret) +-{ +- struct util_cmap_handle *handle; +- int ret = 0, index, cmp; +- +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, +- "Processing connreq for addr", addr); +- +- index = ip_av_get_index(cmap->av, addr); +- +- fastlock_acquire(&cmap->lock); +- if (index < 0) +- handle = util_cmap_get_handle_peer(cmap, addr); +- else +- handle = util_cmap_get_handle(cmap, (fi_addr_t)index); +- +- if (!handle) { +- if (index < 0) +- ret = util_cmap_alloc_handle_peer(cmap, addr, +- CMAP_CONNREQ_RECV, +- &handle); +- else +- ret = util_cmap_alloc_handle(cmap, (fi_addr_t)index, +- CMAP_CONNREQ_RECV, +- &handle); +- if (ret) +- goto unlock; +- } +- +- switch (handle->state) { +- case CMAP_CONNECTED: +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Connection already present.\n"); +- ret = -FI_EALREADY; +- break; +- case CMAP_CONNREQ_SENT: +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, "local_name", +- cmap->attr.name); +- ofi_straddr_dbg(cmap->av->prov, FI_LOG_EP_CTRL, "remote_name", +- addr); +- +- cmp = ofi_addr_cmp(cmap->av->prov, addr, cmap->attr.name); +- +- if (cmp < 0) { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Remote name lower than local name.\n"); +- ret = -FI_EALREADY; +- break; +- } else if (cmp > 0) { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Re-using handle: %p to accept remote " +- "connection\n", handle); +- /* Re-use handle. If it receives FI_REJECT the handle +- * would not be deleted in this state */ +- handle->cmap->attr.close(handle); +- } else { +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, +- "Endpoint connects to itself\n"); +- ret = util_cmap_alloc_handle_peer(cmap, addr, +- CMAP_CONNREQ_RECV, +- &handle); +- if (ret) +- goto unlock; +- assert(index >= 0 && index != FI_ADDR_NOTAVAIL); +- handle->fi_addr = index; +- } +- /* Fall through */ +- case CMAP_CONNREQ_RECV: +- *handle_ret = handle; +- break; +- default: +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, +- "Invalid cmap state\n"); +- assert(0); +- ret = -FI_EOPBADSTATE; +- } +-unlock: +- fastlock_release(&cmap->lock); +- return ret; +-} +- +-/* Caller must hold `cmap::lock` */ +-int ofi_cmap_handle_connect(struct util_cmap *cmap, fi_addr_t fi_addr, +- struct util_cmap_handle *handle) +-{ +- int ret; +- +- if (handle->state == CMAP_CONNECTED) +- return FI_SUCCESS; +- +- switch (handle->state) { +- case CMAP_IDLE: +- ret = cmap->attr.connect(cmap->ep, handle, +- ofi_av_get_addr(cmap->av, fi_addr), +- cmap->av->addrlen); +- if (ret) { +- util_cmap_del_handle(handle); +- return ret; +- } +- handle->state = CMAP_CONNREQ_SENT; +- ret = -FI_EAGAIN; +- // TODO sleep on event fd instead of busy polling +- break; +- case CMAP_CONNREQ_SENT: +- case CMAP_CONNREQ_RECV: +- case CMAP_ACCEPT: +- case CMAP_SHUTDOWN: +- ret = -FI_EAGAIN; +- break; +- default: +- FI_WARN(cmap->av->prov, FI_LOG_EP_CTRL, +- "Invalid cmap handle state\n"); +- assert(0); +- ret = -FI_EOPBADSTATE; +- } +- return ret; +-} +- +-int ofi_cmap_get_handle(struct util_cmap *cmap, fi_addr_t fi_addr, +- struct util_cmap_handle **handle_ret) +-{ +- int ret; +- +- fastlock_acquire(&cmap->lock); +- *handle_ret = ofi_cmap_acquire_handle(cmap, fi_addr); +- if (OFI_UNLIKELY(!*handle_ret)) { +- ret = -FI_EAGAIN; +- goto unlock; +- } +- +- ret = ofi_cmap_handle_connect(cmap, fi_addr, *handle_ret); +-unlock: +- fastlock_release(&cmap->lock); +- return ret; +-} +- +-static int util_cmap_event_handler_close(struct util_cmap *cmap) +-{ +- int ret; +- +- ret = cmap->attr.signal(cmap->ep, NULL, OFI_CMAP_EXIT); +- if (ret) { +- FI_WARN(cmap->av->prov, FI_LOG_FABRIC, +- "Unable to signal event handler thread\n"); +- return ret; +- } +- /* Release lock so that event handler thread could process shutdown events */ +- fastlock_release(&cmap->lock); +- ret = pthread_join(cmap->event_handler_thread, NULL); +- fastlock_acquire(&cmap->lock); +- if (ret) { +- FI_WARN(cmap->av->prov, FI_LOG_FABRIC, +- "Unable to join event handler thread\n"); +- return ret; +- } +- return 0; +-} +- +-void ofi_cmap_free(struct util_cmap *cmap) +-{ +- struct util_cmap_peer *peer; +- struct dlist_entry *entry; +- size_t i; +- +- fastlock_acquire(&cmap->lock); +- FI_DBG(cmap->av->prov, FI_LOG_EP_CTRL, "Closing cmap\n"); +- for (i = 0; i < cmap->av->count; i++) { +- if (cmap->handles_av[i]) +- util_cmap_del_handle(cmap->handles_av[i]); +- } +- while(!dlist_empty(&cmap->peer_list)) { +- entry = cmap->peer_list.next; +- peer = container_of(entry, struct util_cmap_peer, entry); +- util_cmap_del_handle(peer->handle); +- } +- util_cmap_event_handler_close(cmap); +- free(cmap->handles_av); +- free(cmap->attr.name); +- fastlock_release(&cmap->lock); +- fastlock_destroy(&cmap->lock); +- free(cmap); +-} +- +-struct util_cmap *ofi_cmap_alloc(struct util_ep *ep, +- struct util_cmap_attr *attr) +-{ +- struct util_cmap *cmap; +- +- cmap = calloc(1, sizeof *cmap); +- if (!cmap) +- return NULL; +- +- cmap->ep = ep; +- cmap->av = ep->av; +- +- cmap->handles_av = calloc(cmap->av->count, sizeof(*cmap->handles_av)); +- if (!cmap->handles_av) +- goto err1; +- +- cmap->attr = *attr; +- cmap->attr.name = mem_dup(attr->name, ep->av->addrlen); +- if (!cmap->attr.name) +- goto err2; +- +- memset(&cmap->handles_idx, 0, sizeof(cmap->handles_idx)); +- ofi_key_idx_init(&cmap->key_idx, UTIL_CMAP_IDX_BITS); +- +- dlist_init(&cmap->peer_list); +- fastlock_init(&cmap->lock); +- +- if (pthread_create(&cmap->event_handler_thread, 0, +- cmap->attr.event_handler, ep)) { +- FI_WARN(ep->av->prov, FI_LOG_FABRIC, +- "Unable to create msg_cm_listener_thread\n"); +- goto err3; +- } +- return cmap; +-err3: +- fastlock_destroy(&cmap->lock); +- free(cmap->attr.name); +-err2: +- free(cmap->handles_av); +-err1: +- free(cmap); +- return NULL; ++ return ofi_ip_av_create_flags(domain_fid, attr, av, context, 0); + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_buf.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_buf.c +index b5f1682de..2d468f848 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_buf.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_buf.c +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -38,25 +39,17 @@ + #include + #include + +-static inline void util_buf_set_region(union util_buf *buf, +- struct util_buf_region *region, +- struct util_buf_pool *pool) +-{ +- struct util_buf_footer *buf_ftr; +- if (util_buf_use_ftr(pool)) { +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- buf_ftr->region = region; +- } +-} + + int util_buf_grow(struct util_buf_pool *pool) + { ++ void *buf; + int ret; + size_t i; +- union util_buf *util_buf; + struct util_buf_region *buf_region; ++ ssize_t hp_size; ++ struct util_buf_footer *buf_ftr; + +- if (pool->max_cnt && pool->num_allocated >= pool->max_cnt) { ++ if (pool->attr.max_cnt && pool->num_allocated >= pool->attr.max_cnt) { + return -1; + } + +@@ -64,107 +57,230 @@ int util_buf_grow(struct util_buf_pool *pool) + if (!buf_region) + return -1; + +- ret = ofi_memalign((void **)&buf_region->mem_region, pool->alignment, +- pool->chunk_cnt * pool->entry_sz); +- if (ret) +- goto err; ++ buf_region->pool = pool; ++ dlist_init(&buf_region->buf_list); ++ ++ if (pool->attr.is_mmap_region) { ++ hp_size = ofi_get_hugepage_size(); ++ if (hp_size < 0) ++ goto err1; ++ ++ buf_region->size = fi_get_aligned_sz(pool->attr.chunk_cnt * ++ pool->entry_sz, hp_size); ++ ++ ret = ofi_alloc_hugepage_buf((void **)&buf_region->mem_region, ++ buf_region->size); ++ if (ret) { ++ FI_DBG(&core_prov, FI_LOG_CORE, ++ "Huge page allocation failed: %s\n", ++ fi_strerror(-ret)); ++ ++ if (pool->num_allocated > 0) ++ goto err1; ++ ++ pool->attr.is_mmap_region = 0; ++ } ++ } ++ ++ if (!pool->attr.is_mmap_region) { ++ buf_region->size = pool->attr.chunk_cnt * pool->entry_sz; ++ ++ ret = ofi_memalign((void **)&buf_region->mem_region, ++ pool->attr.alignment, buf_region->size); ++ if (ret) ++ goto err1; ++ } + +- if (pool->alloc_hndlr) { +- ret = pool->alloc_hndlr(pool->ctx, buf_region->mem_region, +- pool->chunk_cnt * pool->entry_sz, +- &buf_region->context); ++ if (pool->attr.alloc_hndlr) { ++ ret = pool->attr.alloc_hndlr(pool->attr.ctx, ++ buf_region->mem_region, ++ buf_region->size, ++ &buf_region->context); + if (ret) +- goto err; ++ goto err2; + } + +- for (i = 0; i < pool->chunk_cnt; i++) { +- util_buf = (union util_buf *) +- (buf_region->mem_region + i * pool->entry_sz); +- util_buf_set_region(util_buf, buf_region, pool); +- slist_insert_tail(&util_buf->entry, &pool->buf_list); ++ if (!(pool->regions_cnt % UTIL_BUF_POOL_REGION_CHUNK_CNT)) { ++ struct util_buf_region **new_table = ++ realloc(pool->regions_table, ++ (pool->regions_cnt + ++ UTIL_BUF_POOL_REGION_CHUNK_CNT) * ++ sizeof(*pool->regions_table)); ++ if (!new_table) ++ goto err3; ++ pool->regions_table = new_table; + } ++ pool->regions_table[pool->regions_cnt] = buf_region; ++ pool->regions_cnt++; + +- slist_insert_tail(&buf_region->entry, &pool->region_list); +- pool->num_allocated += pool->chunk_cnt; ++ for (i = 0; i < pool->attr.chunk_cnt; i++) { ++ buf = (buf_region->mem_region + i * pool->entry_sz); ++ buf_ftr = util_buf_get_ftr(pool, buf); ++ ++ if (pool->attr.init) { ++#if ENABLE_DEBUG ++ if (!pool->attr.indexing.ordered) { ++ buf_ftr->entry.slist.next = (void *) OFI_MAGIC_64; ++ ++ pool->attr.init(pool->attr.ctx, buf); ++ ++ assert(buf_ftr->entry.slist.next == (void *) OFI_MAGIC_64); ++ } else { ++ buf_ftr->entry.dlist.next = (void *) OFI_MAGIC_64; ++ buf_ftr->entry.dlist.prev = (void *) OFI_MAGIC_64; ++ ++ pool->attr.init(pool->attr.ctx, buf); ++ ++ assert((buf_ftr->entry.dlist.next == (void *) OFI_MAGIC_64) && ++ (buf_ftr->entry.dlist.prev == (void *) OFI_MAGIC_64)); ++ } ++#else ++ pool->attr.init(pool->attr.ctx, buf); ++#endif ++ } ++ ++ buf_ftr->region = buf_region; ++ buf_ftr->index = pool->num_allocated + i; ++ if (!pool->attr.indexing.ordered) { ++ slist_insert_tail(&buf_ftr->entry.slist, ++ &pool->list.buffers); ++ } else { ++ dlist_insert_tail(&buf_ftr->entry.dlist, ++ &buf_region->buf_list); ++ } ++ } ++ ++ if (pool->attr.indexing.ordered) { ++ dlist_insert_tail(&buf_region->entry, ++ &pool->list.regions); ++ } ++ ++ pool->num_allocated += pool->attr.chunk_cnt; + return 0; +-err: ++err3: ++ if (pool->attr.free_hndlr) ++ pool->attr.free_hndlr(pool->attr.ctx, buf_region->context); ++err2: ++ ofi_freealign(buf_region->mem_region); ++err1: + free(buf_region); + return -1; + } + +-int util_buf_pool_create_ex(struct util_buf_pool **buf_pool, +- size_t size, size_t alignment, +- size_t max_cnt, size_t chunk_cnt, +- util_buf_region_alloc_hndlr alloc_hndlr, +- util_buf_region_free_hndlr free_hndlr, +- void *pool_ctx) ++int util_buf_pool_create_attr(struct util_buf_attr *attr, ++ struct util_buf_pool **buf_pool) + { + size_t entry_sz; ++ ssize_t hp_size; + + (*buf_pool) = calloc(1, sizeof(**buf_pool)); + if (!*buf_pool) + return -FI_ENOMEM; + +- (*buf_pool)->alloc_hndlr = alloc_hndlr; +- (*buf_pool)->free_hndlr = free_hndlr; +- (*buf_pool)->data_sz = size; +- (*buf_pool)->alignment = alignment; +- (*buf_pool)->max_cnt = max_cnt; +- (*buf_pool)->chunk_cnt = chunk_cnt; +- (*buf_pool)->ctx = pool_ctx; ++ (*buf_pool)->attr = *attr; + +- entry_sz = util_buf_use_ftr(*buf_pool) ? +- (size + sizeof(struct util_buf_footer)) : size; +- (*buf_pool)->entry_sz = fi_get_aligned_sz(entry_sz, alignment); ++ entry_sz = (attr->size + sizeof(struct util_buf_footer)); ++ (*buf_pool)->entry_sz = fi_get_aligned_sz(entry_sz, attr->alignment); + +- slist_init(&(*buf_pool)->buf_list); +- slist_init(&(*buf_pool)->region_list); ++ hp_size = ofi_get_hugepage_size(); + +- if (util_buf_grow(*buf_pool)) { +- free(*buf_pool); +- return -FI_ENOMEM; +- } +- return FI_SUCCESS; +-} ++ if ((*buf_pool)->attr.chunk_cnt * (*buf_pool)->entry_sz < hp_size) ++ (*buf_pool)->attr.is_mmap_region = 0; ++ else ++ (*buf_pool)->attr.is_mmap_region = 1; + +-#if ENABLE_DEBUG +-void *util_buf_get(struct util_buf_pool *pool) +-{ +- struct slist_entry *entry; +- struct util_buf_footer *buf_ftr; ++ if (!(*buf_pool)->attr.indexing.ordered) ++ slist_init(&(*buf_pool)->list.buffers); ++ else ++ dlist_init(&(*buf_pool)->list.regions); + +- entry = slist_remove_head(&pool->buf_list); +- buf_ftr = (struct util_buf_footer *) ((char *) entry + pool->data_sz); +- buf_ftr->region->num_used++; +- return entry; ++ return FI_SUCCESS; + } + +-void util_buf_release(struct util_buf_pool *pool, void *buf) ++int util_buf_pool_create_ex(struct util_buf_pool **buf_pool, ++ size_t size, size_t alignment, ++ size_t max_cnt, size_t chunk_cnt, ++ util_buf_region_alloc_hndlr alloc_hndlr, ++ util_buf_region_free_hndlr free_hndlr, ++ void *pool_ctx) + { +- union util_buf *util_buf = buf; +- struct util_buf_footer *buf_ftr; +- +- buf_ftr = (struct util_buf_footer *) ((char *) buf + pool->data_sz); +- buf_ftr->region->num_used--; +- slist_insert_head(&util_buf->entry, &pool->buf_list); ++ struct util_buf_attr attr = { ++ .size = size, ++ .alignment = alignment, ++ .max_cnt = max_cnt, ++ .chunk_cnt = chunk_cnt, ++ .alloc_hndlr = alloc_hndlr, ++ .free_hndlr = free_hndlr, ++ .ctx = pool_ctx, ++ .track_used = 1, ++ .indexing = { ++ .used = 1, ++ .ordered = 0, ++ }, ++ }; ++ return util_buf_pool_create_attr(&attr, buf_pool); + } +-#endif + + void util_buf_pool_destroy(struct util_buf_pool *pool) + { +- struct slist_entry *entry; + struct util_buf_region *buf_region; ++ int ret; ++ size_t i; + +- while (!slist_empty(&pool->region_list)) { +- entry = slist_remove_head(&pool->region_list); +- buf_region = container_of(entry, struct util_buf_region, entry); ++ for (i = 0; i < pool->regions_cnt; i++) { ++ buf_region = pool->regions_table[i]; + #if ENABLE_DEBUG +- assert(buf_region->num_used == 0); ++ if (pool->attr.track_used) ++ assert(buf_region->num_used == 0); + #endif +- if (pool->free_hndlr) +- pool->free_hndlr(pool->ctx, buf_region->context); +- ofi_freealign(buf_region->mem_region); ++ if (pool->attr.free_hndlr) ++ pool->attr.free_hndlr(pool->attr.ctx, buf_region->context); ++ if (pool->attr.is_mmap_region) { ++ ret = ofi_free_hugepage_buf(buf_region->mem_region, ++ buf_region->size); ++ if (ret) { ++ FI_DBG(&core_prov, FI_LOG_CORE, ++ "Huge page free failed: %s\n", ++ fi_strerror(-ret)); ++ assert(0); ++ } ++ } else { ++ ofi_freealign(buf_region->mem_region); ++ } ++ + free(buf_region); + } ++ free(pool->regions_table); + free(pool); + } ++ ++int util_buf_is_lower(struct dlist_entry *item, const void *arg) ++{ ++ struct util_buf_footer *buf_ftr1 = ++ container_of((struct dlist_entry *)arg, ++ struct util_buf_footer, entry.dlist); ++ struct util_buf_footer *buf_ftr2 = ++ container_of(item, struct util_buf_footer, entry.dlist); ++ return (buf_ftr1->index < buf_ftr2->index); ++} ++ ++int util_buf_region_is_lower(struct dlist_entry *item, const void *arg) ++{ ++ struct util_buf_region *buf_region1 = ++ container_of((struct dlist_entry *)arg, ++ struct util_buf_region, entry); ++ struct util_buf_region *buf_region2 = ++ container_of(item, struct util_buf_region, entry); ++ struct util_buf_footer *buf_region1_head = ++ container_of(buf_region1->buf_list.next, ++ struct util_buf_footer, entry.dlist); ++ struct util_buf_footer *buf_region2_head = ++ container_of(buf_region2->buf_list.next, ++ struct util_buf_footer, entry.dlist); ++ size_t buf_region1_index = ++ (size_t)(buf_region1_head->index / buf_region1->pool->attr.chunk_cnt); ++ size_t buf_region2_index = ++ (size_t)(buf_region2_head->index / buf_region2->pool->attr.chunk_cnt); ++ ++ return (buf_region1_index < buf_region2_index); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_cq.c +index 1963f38c4..9a0d4d9d6 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_cq.c +@@ -38,22 +38,58 @@ + + #define UTIL_DEF_CQ_SIZE (1024) + ++/* Caller must hold `cq_lock` */ ++int ofi_cq_write_overflow(struct util_cq *cq, void *context, uint64_t flags, size_t len, ++ void *buf, uint64_t data, uint64_t tag, fi_addr_t src) ++{ ++ struct util_cq_oflow_err_entry *entry; ++ ++ assert(ofi_cirque_isfull(cq->cirq)); ++ ++ if (!(entry = calloc(1, sizeof(*entry)))) ++ return -FI_ENOMEM; ++ ++ entry->parent_comp = ofi_cirque_tail(cq->cirq); ++ entry->parent_comp->flags |= UTIL_FLAG_OVERFLOW; ++ ++ entry->comp.op_context = context; ++ entry->comp.flags = flags; ++ entry->comp.len = len; ++ entry->comp.buf = buf; ++ entry->comp.data = data; ++ entry->comp.tag = tag; ++ ++ entry->src = src; ++ slist_insert_tail(&entry->list_entry, &cq->oflow_err_list); ++ ++ return 0; ++} ++ + int ofi_cq_write_error(struct util_cq *cq, + const struct fi_cq_err_entry *err_entry) + { +- struct util_cq_err_entry *entry; ++ struct util_cq_oflow_err_entry *entry; + struct fi_cq_tagged_entry *comp; + ++ assert(err_entry->err); ++ + if (!(entry = calloc(1, sizeof(*entry)))) + return -FI_ENOMEM; + +- entry->err_entry = *err_entry; +- fastlock_acquire(&cq->cq_lock); +- slist_insert_tail(&entry->list_entry, &cq->err_list); +- comp = ofi_cirque_tail(cq->cirq); +- comp->flags = UTIL_FLAG_ERROR; +- ofi_cirque_commit(cq->cirq); +- fastlock_release(&cq->cq_lock); ++ entry->comp = *err_entry; ++ cq->cq_fastlock_acquire(&cq->cq_lock); ++ slist_insert_tail(&entry->list_entry, &cq->oflow_err_list); ++ ++ if (OFI_UNLIKELY(ofi_cirque_isfull(cq->cirq))) { ++ comp = ofi_cirque_tail(cq->cirq); ++ comp->flags |= (UTIL_FLAG_ERROR | UTIL_FLAG_OVERFLOW); ++ entry->parent_comp = ofi_cirque_tail(cq->cirq); ++ } else { ++ comp = ofi_cirque_tail(cq->cirq); ++ comp->flags = UTIL_FLAG_ERROR; ++ ofi_cirque_commit(cq->cirq); ++ } ++ cq->cq_fastlock_release(&cq->cq_lock); + if (cq->wait) + cq->wait->signal(cq->wait); + return 0; +@@ -89,32 +125,6 @@ int ofi_cq_write_error_trunc(struct util_cq *cq, void *context, uint64_t flags, + return ofi_cq_write_error(cq, &err_entry); + } + +-int ofi_cq_write(struct util_cq *cq, void *context, uint64_t flags, size_t len, +- void *buf, uint64_t data, uint64_t tag) +-{ +- struct fi_cq_tagged_entry *comp; +- int ret = 0; +- +- fastlock_acquire(&cq->cq_lock); +- if (ofi_cirque_isfull(cq->cirq)) { +- FI_DBG(cq->domain->prov, FI_LOG_CQ, "util_cq cirq is full!\n"); +- ret = -FI_EAGAIN; +- goto out; +- } +- +- comp = ofi_cirque_tail(cq->cirq); +- comp->op_context = context; +- comp->flags = flags; +- comp->len = len; +- comp->buf = buf; +- comp->data = data; +- comp->tag = tag; +- ofi_cirque_commit(cq->cirq); +-out: +- fastlock_release(&cq->cq_lock); +- return ret; +-} +- + int ofi_check_cq_attr(const struct fi_provider *prov, + const struct fi_cq_attr *attr) + { +@@ -191,8 +201,37 @@ static void util_cq_read_tagged(void **dst, void *src) + *(char **)dst += sizeof(struct fi_cq_tagged_entry); + } + ++static inline ++void util_cq_read_oflow_entry(struct util_cq *cq, ++ struct util_cq_oflow_err_entry *oflow_entry, ++ struct fi_cq_tagged_entry *cirq_entry, ++ void **buf, fi_addr_t *src_addr, ssize_t i) ++{ ++ if (src_addr && cq->src) { ++ src_addr[i] = cq->src[ofi_cirque_rindex(cq->cirq)]; ++ cq->src[ofi_cirque_rindex(cq->cirq)] = oflow_entry->src; ++ } ++ cq->read_entry(buf, cirq_entry); ++ cirq_entry->op_context = oflow_entry->comp.op_context; ++ cirq_entry->flags = oflow_entry->comp.flags; ++ cirq_entry->len = oflow_entry->comp.len; ++ cirq_entry->buf = oflow_entry->comp.buf; ++ cirq_entry->data = oflow_entry->comp.data; ++ cirq_entry->tag = oflow_entry->comp.tag; ++} ++ ++static inline ++void util_cq_read_entry(struct util_cq *cq, struct fi_cq_tagged_entry *entry, ++ void **buf, fi_addr_t *src_addr, ssize_t i) ++{ ++ if (src_addr && cq->src) ++ src_addr[i] = cq->src[ofi_cirque_rindex(cq->cirq)]; ++ cq->read_entry(buf, entry); ++ ofi_cirque_discard(cq->cirq); ++} ++ + ssize_t ofi_cq_readfrom(struct fid_cq *cq_fid, void *buf, size_t count, +- fi_addr_t *src_addr) ++ fi_addr_t *src_addr) + { + struct util_cq *cq; + struct fi_cq_tagged_entry *entry; +@@ -200,11 +239,11 @@ ssize_t ofi_cq_readfrom(struct fid_cq *cq_fid, void *buf, size_t count, + + cq = container_of(cq_fid, struct util_cq, cq_fid); + +- fastlock_acquire(&cq->cq_lock); +- if (ofi_cirque_isempty(cq->cirq)) { +- fastlock_release(&cq->cq_lock); ++ cq->cq_fastlock_acquire(&cq->cq_lock); ++ if (ofi_cirque_isempty(cq->cirq) || !count) { ++ cq->cq_fastlock_release(&cq->cq_lock); + cq->progress(cq); +- fastlock_acquire(&cq->cq_lock); ++ cq->cq_fastlock_acquire(&cq->cq_lock); + if (ofi_cirque_isempty(cq->cirq)) { + i = -FI_EAGAIN; + goto out; +@@ -216,18 +255,55 @@ ssize_t ofi_cq_readfrom(struct fid_cq *cq_fid, void *buf, size_t count, + + for (i = 0; i < (ssize_t)count; i++) { + entry = ofi_cirque_head(cq->cirq); +- if (entry->flags & UTIL_FLAG_ERROR) { +- if (!i) +- i = -FI_EAVAIL; +- break; ++ if (OFI_UNLIKELY(entry->flags & (UTIL_FLAG_ERROR | ++ UTIL_FLAG_OVERFLOW))) { ++ if (entry->flags & UTIL_FLAG_ERROR) { ++ struct util_cq_oflow_err_entry *oflow_err_entry = ++ container_of(cq->oflow_err_list.head, ++ struct util_cq_oflow_err_entry, ++ list_entry); ++ if (oflow_err_entry->comp.err) { ++ /* This handles case when the head of oflow_err_list is ++ * an error entry. ++ * ++ * NOTE: if this isn't an error entry, we have to handle ++ * overflow entries and then the error entries to ensure ++ * ordering. */ ++ if (!i) ++ i = -FI_EAVAIL; ++ break; ++ } ++ } ++ if (entry->flags & UTIL_FLAG_OVERFLOW) { ++ assert(!slist_empty(&cq->oflow_err_list)); ++ struct util_cq_oflow_err_entry *oflow_entry = ++ container_of(cq->oflow_err_list.head, ++ struct util_cq_oflow_err_entry, ++ list_entry); ++ if (oflow_entry->parent_comp != entry) { ++ /* Handle case when all overflow/error CQ entries were read ++ * for particular CIRQ entry */ ++ entry->flags &= ~(UTIL_FLAG_OVERFLOW | UTIL_FLAG_ERROR); ++ } else { ++ uint64_t service_flags = ++ (entry->flags & (UTIL_FLAG_OVERFLOW | UTIL_FLAG_ERROR)); ++ slist_remove_head(&cq->oflow_err_list); ++ ++ entry->flags &= ~(service_flags); ++ util_cq_read_oflow_entry(cq, oflow_entry, entry, ++ &buf, src_addr, i); ++ /* To ensure checking of overflow CQ entries once again */ ++ if (!slist_empty(&cq->oflow_err_list)) ++ entry->flags |= service_flags; ++ free(oflow_entry); ++ continue; ++ } ++ } + } +- if (src_addr && cq->src) +- src_addr[i] = cq->src[ofi_cirque_rindex(cq->cirq)]; +- cq->read_entry(&buf, entry); +- ofi_cirque_discard(cq->cirq); ++ util_cq_read_entry(cq, entry, &buf, src_addr, i); + } + out: +- fastlock_release(&cq->cq_lock); ++ cq->cq_fastlock_release(&cq->cq_lock); + return i; + } + +@@ -237,11 +313,12 @@ ssize_t ofi_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + } + + ssize_t ofi_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *buf, +- uint64_t flags) ++ uint64_t flags) + { + struct util_cq *cq; +- struct util_cq_err_entry *err; ++ struct util_cq_oflow_err_entry *err; + struct slist_entry *entry; ++ struct fi_cq_tagged_entry *cirq_entry; + char *err_buf_save; + size_t err_data_size; + uint32_t api_version; +@@ -250,35 +327,56 @@ ssize_t ofi_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *buf, + cq = container_of(cq_fid, struct util_cq, cq_fid); + api_version = cq->domain->fabric->fabric_fid.api_version; + +- fastlock_acquire(&cq->cq_lock); ++ cq->cq_fastlock_acquire(&cq->cq_lock); + if (ofi_cirque_isempty(cq->cirq) || + !(ofi_cirque_head(cq->cirq)->flags & UTIL_FLAG_ERROR)) { + ret = -FI_EAGAIN; + goto unlock; + } + +- ofi_cirque_discard(cq->cirq); +- entry = slist_remove_head(&cq->err_list); +- err = container_of(entry, struct util_cq_err_entry, list_entry); ++ entry = slist_remove_head(&cq->oflow_err_list); ++ err = container_of(entry, struct util_cq_oflow_err_entry, list_entry); + if ((FI_VERSION_GE(api_version, FI_VERSION(1, 5))) && buf->err_data_size) { +- err_data_size = MIN(buf->err_data_size, err->err_entry.err_data_size); +- memcpy(buf->err_data, err->err_entry.err_data, err_data_size); ++ err_data_size = MIN(buf->err_data_size, err->comp.err_data_size); ++ memcpy(buf->err_data, err->comp.err_data, err_data_size); + err_buf_save = buf->err_data; +- *buf = err->err_entry; ++ *buf = err->comp; + buf->err_data = err_buf_save; + buf->err_data_size = err_data_size; + } else { +- memcpy(buf, &err->err_entry, sizeof(struct fi_cq_err_entry_1_0)); ++ memcpy(buf, &err->comp, sizeof(struct fi_cq_err_entry_1_0)); + } ++ ++ cirq_entry = ofi_cirque_head(cq->cirq); ++ if (!(cirq_entry->flags & UTIL_FLAG_OVERFLOW)) { ++ ofi_cirque_discard(cq->cirq); ++ } else if (!slist_empty(&cq->oflow_err_list)) { ++ struct util_cq_oflow_err_entry *oflow_entry = ++ container_of(cq->oflow_err_list.head, ++ struct util_cq_oflow_err_entry, ++ list_entry); ++ if (oflow_entry->parent_comp != cirq_entry) { ++ /* The normal CQ entry were used to report error due to ++ * out of space in the circular queue. We have to unset ++ * UTIL_FLAG_ERROR and UTIL_FLAG_OVERFLOW flags */ ++ cirq_entry->flags &= ~(UTIL_FLAG_ERROR | UTIL_FLAG_OVERFLOW); ++ } ++ /* If the next entry in the oflow_err_list use the same entry from CIRQ to ++ * report error/overflow, don't unset UTIL_FLAG_ERRO and UTIL_FLAG_OVERFLOW ++ * flags to ensure the next round of handling overflow/error entries */ ++ } else { ++ cirq_entry->flags &= ~(UTIL_FLAG_ERROR | UTIL_FLAG_OVERFLOW); ++ } ++ + ret = 1; + free(err); + unlock: +- fastlock_release(&cq->cq_lock); ++ cq->cq_fastlock_release(&cq->cq_lock); + return ret; + } + + ssize_t ofi_cq_sreadfrom(struct fid_cq *cq_fid, void *buf, size_t count, +- fi_addr_t *src_addr, const void *cond, int timeout) ++ fi_addr_t *src_addr, const void *cond, int timeout) + { + struct util_cq *cq; + uint64_t start; +@@ -318,12 +416,9 @@ ssize_t ofi_cq_sread(struct fid_cq *cq_fid, void *buf, size_t count, + + int ofi_cq_signal(struct fid_cq *cq_fid) + { +- struct util_cq *cq; +- +- cq = container_of(cq_fid, struct util_cq, cq_fid); +- assert(cq->wait); ++ struct util_cq *cq = container_of(cq_fid, struct util_cq, cq_fid); + ofi_atomic_set32(&cq->signaled, 1); +- cq->wait->signal(cq->wait); ++ util_cq_signal(cq); + return 0; + } + +@@ -346,18 +441,15 @@ static struct fi_ops_cq util_cq_ops = { + + int ofi_cq_cleanup(struct util_cq *cq) + { +- struct util_cq_err_entry *err; ++ struct util_cq_oflow_err_entry *err; + struct slist_entry *entry; + + if (ofi_atomic_get32(&cq->ref)) + return -FI_EBUSY; + +- fastlock_destroy(&cq->cq_lock); +- fastlock_destroy(&cq->ep_list_lock); +- +- while (!slist_empty(&cq->err_list)) { +- entry = slist_remove_head(&cq->err_list); +- err = container_of(entry, struct util_cq_err_entry, list_entry); ++ while (!slist_empty(&cq->oflow_err_list)) { ++ entry = slist_remove_head(&cq->oflow_err_list); ++ err = container_of(entry, struct util_cq_oflow_err_entry, list_entry); + free(err); + } + +@@ -370,10 +462,27 @@ int ofi_cq_cleanup(struct util_cq *cq) + + ofi_atomic_dec32(&cq->domain->ref); + util_comp_cirq_free(cq->cirq); ++ fastlock_destroy(&cq->cq_lock); ++ fastlock_destroy(&cq->ep_list_lock); + free(cq->src); + return 0; + } + ++int ofi_cq_control(struct fid *fid, int command, void *arg) ++{ ++ struct util_cq *cq = container_of(fid, struct util_cq, cq_fid.fid); ++ ++ switch (command) { ++ case FI_GETWAIT: ++ if (!cq->wait) ++ return -FI_ENODATA; ++ return fi_control(&cq->wait->wait_fid.fid, FI_GETWAIT, arg); ++ default: ++ FI_INFO(cq->wait->prov, FI_LOG_CQ, "Unsupported command\n"); ++ return -FI_ENOSYS; ++ } ++} ++ + static int util_cq_close(struct fid *fid) + { + struct util_cq *cq; +@@ -392,7 +501,7 @@ static struct fi_ops util_cq_fi_ops = { + .size = sizeof(struct fi_ops), + .close = util_cq_close, + .bind = fi_no_bind, +- .control = fi_no_control, ++ .control = ofi_cq_control, + .ops_open = fi_no_ops_open, + }; + +@@ -410,7 +519,15 @@ static int fi_cq_init(struct fid_domain *domain, struct fi_cq_attr *attr, + dlist_init(&cq->ep_list); + fastlock_init(&cq->ep_list_lock); + fastlock_init(&cq->cq_lock); +- slist_init(&cq->err_list); ++ if (cq->domain->threading == FI_THREAD_COMPLETION || ++ (cq->domain->threading == FI_THREAD_DOMAIN)) { ++ cq->cq_fastlock_acquire = ofi_fastlock_acquire_noop; ++ cq->cq_fastlock_release = ofi_fastlock_release_noop; ++ } else { ++ cq->cq_fastlock_acquire = ofi_fastlock_acquire; ++ cq->cq_fastlock_release = ofi_fastlock_release; ++ } ++ slist_init(&cq->oflow_err_list); + cq->read_entry = read_entry; + + cq->cq_fid.fid.fclass = FI_CLASS_CQ; +@@ -473,14 +590,14 @@ void ofi_cq_progress(struct util_cq *cq) + struct fid_list_entry *fid_entry; + struct dlist_entry *item; + +- fastlock_acquire(&cq->ep_list_lock); ++ cq->cq_fastlock_acquire(&cq->ep_list_lock); + dlist_foreach(&cq->ep_list, item) { + fid_entry = container_of(item, struct fid_list_entry, entry); + ep = container_of(fid_entry->fid, struct util_ep, ep_fid.fid); + ep->progress(ep); + + } +- fastlock_release(&cq->ep_list_lock); ++ cq->cq_fastlock_release(&cq->ep_list_lock); + } + + int ofi_cq_init(const struct fi_provider *prov, struct fid_domain *domain, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_domain.c +index bfbe6280a..2a7d8de11 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_domain.c +@@ -86,6 +86,8 @@ static int util_domain_init(struct util_domain *domain, + domain->addr_format = info->addr_format; + domain->av_type = info->domain_attr->av_type; + domain->name = strdup(info->domain_attr->name); ++ domain->threading = info->domain_attr->threading; ++ domain->data_progress = info->domain_attr->data_progress; + return domain->name ? 0 : -FI_ENOMEM; + } + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ep.c +index 710d95f29..aa9478bac 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ep.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ep.c +@@ -116,31 +116,37 @@ int ofi_ep_bind_cntr(struct util_ep *ep, struct util_cntr *cntr, uint64_t flags) + + if (flags & FI_TRANSMIT) { + ep->tx_cntr = cntr; ++ ep->tx_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_RECV) { + ep->rx_cntr = cntr; ++ ep->rx_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_READ) { + ep->rd_cntr = cntr; ++ ep->rd_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_WRITE) { + ep->wr_cntr = cntr; ++ ep->wr_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_REMOTE_READ) { + ep->rem_rd_cntr = cntr; ++ ep->rem_rd_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + + if (flags & FI_REMOTE_WRITE) { + ep->rem_wr_cntr = cntr; ++ ep->rem_wr_cntr_inc = ofi_cntr_inc; + ofi_atomic_inc32(&cntr->ref); + } + +@@ -206,17 +212,33 @@ int ofi_endpoint_init(struct fid_domain *domain, const struct util_prov *util_pr + ep->progress = progress; + ep->tx_op_flags = info->tx_attr->op_flags; + ep->rx_op_flags = info->rx_attr->op_flags; ++ ep->inject_op_flags = ++ ((info->tx_attr->op_flags & ++ ~(FI_COMPLETION | FI_INJECT_COMPLETE | ++ FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE)) | FI_INJECT); ++ ep->tx_cntr_inc = ofi_cntr_inc_noop; ++ ep->rx_cntr_inc = ofi_cntr_inc_noop; ++ ep->rd_cntr_inc = ofi_cntr_inc_noop; ++ ep->wr_cntr_inc = ofi_cntr_inc_noop; ++ ep->rem_rd_cntr_inc = ofi_cntr_inc_noop; ++ ep->rem_wr_cntr_inc = ofi_cntr_inc_noop; ++ ep->type = info->ep_attr->type; + ofi_atomic_inc32(&util_domain->ref); + if (util_domain->eq) + ofi_ep_bind_eq(ep, util_domain->eq); + fastlock_init(&ep->lock); ++ if (ep->domain->threading != FI_THREAD_SAFE) { ++ ep->lock_acquire = ofi_fastlock_acquire_noop; ++ ep->lock_release = ofi_fastlock_release_noop; ++ } else { ++ ep->lock_acquire = ofi_fastlock_acquire; ++ ep->lock_release = ofi_fastlock_release; ++ } + return 0; + } + + int ofi_endpoint_close(struct util_ep *util_ep) + { +- fastlock_destroy(&util_ep->lock); +- + if (util_ep->tx_cq) { + fid_list_remove(&util_ep->tx_cq->ep_list, + &util_ep->tx_cq->ep_list_lock, +@@ -284,5 +306,6 @@ int ofi_endpoint_close(struct util_ep *util_ep) + if (util_ep->eq) + ofi_atomic_dec32(&util_ep->eq->ref); + ofi_atomic_dec32(&util_ep->domain->ref); ++ fastlock_destroy(&util_ep->lock); + return 0; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_eq.c +index 19202948c..390993c06 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_eq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_eq.c +@@ -36,12 +36,43 @@ + #include + #include + ++void ofi_eq_handle_err_entry(uint32_t api_version, uint64_t flags, ++ struct fi_eq_err_entry *err_entry, ++ struct fi_eq_err_entry *user_err_entry) ++{ ++ if ((FI_VERSION_GE(api_version, FI_VERSION(1, 5))) ++ && user_err_entry->err_data && user_err_entry->err_data_size) { ++ void *err_data = user_err_entry->err_data; ++ size_t err_data_size = MIN(err_entry->err_data_size, ++ user_err_entry->err_data_size); ++ ++ memcpy(err_data, err_entry->err_data, err_data_size); ++ ++ *user_err_entry = *err_entry; ++ user_err_entry->err_data = err_data; ++ user_err_entry->err_data_size = err_data_size; ++ ++ if (!(flags & FI_PEEK)) { ++ free(err_entry->err_data); ++ err_entry->err_data = NULL; ++ err_entry->err_data_size = 0; ++ } ++ } else { ++ *user_err_entry = *err_entry; ++ } ++ ++ if (!(flags & FI_PEEK)) { ++ err_entry->err = 0; ++ err_entry->prov_errno = 0; ++ } ++} + +-static ssize_t util_eq_read(struct fid_eq *eq_fid, uint32_t *event, +- void *buf, size_t len, uint64_t flags) ++ssize_t ofi_eq_read(struct fid_eq *eq_fid, uint32_t *event, ++ void *buf, size_t len, uint64_t flags) + { + struct util_eq *eq; + struct util_event *entry; ++ struct fi_eq_err_entry *err_entry; + ssize_t ret; + + eq = container_of(eq_fid, struct util_eq, eq_fid); +@@ -64,8 +95,23 @@ static ssize_t util_eq_read(struct fid_eq *eq_fid, uint32_t *event, + if (event) + *event = entry->event; + if (buf) { +- ret = MIN(len, (size_t)entry->size); +- memcpy(buf, entry->data, ret); ++ if (flags & UTIL_FLAG_ERROR) { ++ free(eq->saved_err_data); ++ eq->saved_err_data = NULL; ++ ++ assert((size_t) entry->size == sizeof(*err_entry)); ++ err_entry = (struct fi_eq_err_entry *) entry->data; ++ ++ ofi_eq_handle_err_entry(eq->fabric->fabric_fid.api_version, ++ flags, err_entry, buf); ++ ret = (ssize_t) entry->size; ++ ++ if (!(flags & FI_PEEK)) ++ eq->saved_err_data = err_entry->err_data; ++ } else { ++ ret = MIN(len, (size_t)entry->size); ++ memcpy(buf, entry->data, ret); ++ } + } else { + ret = 0; + } +@@ -79,22 +125,21 @@ out: + return ret; + } + +-static ssize_t util_eq_readerr(struct fid_eq *eq_fid, struct fi_eq_err_entry *buf, +- uint64_t flags) ++ssize_t ofi_eq_readerr(struct fid_eq *eq_fid, struct fi_eq_err_entry *buf, ++ uint64_t flags) + { +- +- return util_eq_read(eq_fid, NULL, buf, sizeof(*buf), +- flags | UTIL_FLAG_ERROR); ++ return fi_eq_read(eq_fid, NULL, buf, sizeof(*buf), ++ flags | UTIL_FLAG_ERROR); + } + +-static ssize_t util_eq_write(struct fid_eq *eq_fid, uint32_t event, +- const void *buf, size_t len, uint64_t flags) ++ssize_t ofi_eq_write(struct fid_eq *eq_fid, uint32_t event, ++ const void *buf, size_t len, uint64_t flags) + { + struct util_eq *eq; + struct util_event *entry; + + eq = container_of(eq_fid, struct util_eq, eq_fid); +- entry = malloc(sizeof(*entry) + len); ++ entry = calloc(1, sizeof(*entry) + len); + if (!entry) + return -FI_ENOMEM; + +@@ -113,8 +158,8 @@ static ssize_t util_eq_write(struct fid_eq *eq_fid, uint32_t event, + return len; + } + +-static ssize_t util_eq_sread(struct fid_eq *eq_fid, uint32_t *event, void *buf, +- size_t len, int timeout, uint64_t flags) ++ssize_t ofi_eq_sread(struct fid_eq *eq_fid, uint32_t *event, void *buf, ++ size_t len, int timeout, uint64_t flags) + { + struct util_eq *eq; + +@@ -128,8 +173,8 @@ static ssize_t util_eq_sread(struct fid_eq *eq_fid, uint32_t *event, void *buf, + return fi_eq_read(eq_fid, event, buf, len, flags); + } + +-static const char *util_eq_strerror(struct fid_eq *eq_fid, int prov_errno, +- const void *err_data, char *buf, size_t len) ++const char *ofi_eq_strerror(struct fid_eq *eq_fid, int prov_errno, ++ const void *err_data, char *buf, size_t len) + { + return (buf && len) ? strncpy(buf, strerror(prov_errno), len) : + fi_strerror(prov_errno); +@@ -185,11 +230,11 @@ static int util_eq_close(struct fid *fid) + + static struct fi_ops_eq util_eq_ops = { + .size = sizeof(struct fi_ops_eq), +- .read = util_eq_read, +- .readerr = util_eq_readerr, +- .sread = util_eq_sread, +- .write = util_eq_write, +- .strerror = util_eq_strerror, ++ .read = ofi_eq_read, ++ .readerr = ofi_eq_readerr, ++ .sread = ofi_eq_sread, ++ .write = ofi_eq_write, ++ .strerror = ofi_eq_strerror, + }; + + static struct fi_ops util_eq_fi_ops = { +@@ -318,4 +363,3 @@ int ofi_eq_create(struct fid_fabric *fabric_fid, struct fi_eq_attr *attr, + *eq_fid = &eq->eq_fid; + return 0; + } +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_main.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_main.c +index 06b5ffacb..69273ac3f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_main.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_main.c +@@ -192,7 +192,7 @@ int util_getinfo(const struct util_prov *util_prov, uint32_t version, + } + + if (flags & FI_SOURCE) { +- ret = ofi_get_addr((*info)->addr_format, flags, ++ ret = ofi_get_addr(&(*info)->addr_format, flags, + node, service, &(*info)->src_addr, + &(*info)->src_addrlen); + if (ret) { +@@ -204,7 +204,7 @@ int util_getinfo(const struct util_prov *util_prov, uint32_t version, + } else { + if (node || service) { + copy_dest = 0; +- ret = ofi_get_addr((*info)->addr_format, ++ ret = ofi_get_addr(&(*info)->addr_format, + flags, node, service, + &(*info)->dest_addr, + &(*info)->dest_addrlen); +@@ -225,6 +225,7 @@ int util_getinfo(const struct util_prov *util_prov, uint32_t version, + goto err; + } + (*info)->src_addrlen = hints->src_addrlen; ++ (*info)->addr_format = hints->addr_format; + } + } + +@@ -236,6 +237,7 @@ int util_getinfo(const struct util_prov *util_prov, uint32_t version, + goto err; + } + (*info)->dest_addrlen = hints->dest_addrlen; ++ (*info)->addr_format = hints->addr_format; + } + + if ((*info)->dest_addr && !(*info)->src_addr) { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mem_monitor.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mem_monitor.c +index 585fb36fd..d26b2ef4f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mem_monitor.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mem_monitor.c +@@ -78,13 +78,13 @@ int ofi_monitor_subscribe(struct ofi_notification_queue *nq, + dlist_init(&subscription->entry); + + subscription->nq = nq; +- subscription->addr = addr; +- subscription->len = len; ++ subscription->iov.iov_base = addr; ++ subscription->iov.iov_len = len; + fastlock_acquire(&nq->lock); + nq->refcnt++; + fastlock_release(&nq->lock); + +- ret = nq->monitor->subscribe(nq->monitor, addr, len, subscription); ++ ret = nq->monitor->subscribe(nq->monitor, subscription); + if (OFI_UNLIKELY(ret)) { + FI_WARN(&core_prov, FI_LOG_MR, + "Failed (ret = %d) to monitor addr=%p len=%zu", +@@ -100,48 +100,20 @@ void ofi_monitor_unsubscribe(struct ofi_subscription *subscription) + { + FI_DBG(&core_prov, FI_LOG_MR, + "unsubscribing addr=%p len=%zu subscription=%p\n", +- subscription->addr, subscription->len, subscription); ++ subscription->iov.iov_base, subscription->iov.iov_len, subscription); + subscription->nq->monitor->unsubscribe(subscription->nq->monitor, +- subscription->addr, +- subscription->len, + subscription); + fastlock_acquire(&subscription->nq->lock); +- dlist_init(&subscription->entry); ++ if (!dlist_empty(&subscription->entry)) ++ dlist_remove_init(&subscription->entry); + subscription->nq->refcnt--; + fastlock_release(&subscription->nq->lock); + } + +-static void util_monitor_read_events(struct ofi_mem_monitor *monitor) +-{ +- struct ofi_subscription *subscription; +- +- do { +- subscription = monitor->get_event(monitor); +- if (!subscription) { +- FI_DBG(&core_prov, FI_LOG_MR, +- "no more events to be read\n"); +- break; +- } +- +- FI_DBG(&core_prov, FI_LOG_MR, +- "found event, context=%p, addr=%p, len=%zu nq=%p\n", +- subscription, subscription->addr, +- subscription->len, subscription->nq); +- +- fastlock_acquire(&subscription->nq->lock); +- if (dlist_empty(&subscription->entry)) +- dlist_insert_tail(&subscription->entry, +- &subscription->nq->list); +- fastlock_release(&subscription->nq->lock); +- } while (1); +-} +- + struct ofi_subscription *ofi_monitor_get_event(struct ofi_notification_queue *nq) + { + struct ofi_subscription *subscription; + +- util_monitor_read_events(nq->monitor); +- + fastlock_acquire(&nq->lock); + if (!dlist_empty(&nq->list)) { + dlist_pop_front(&nq->list, struct ofi_subscription, +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mr_cache.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mr_cache.c +index 8de4c6b73..84bc28df2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mr_cache.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_mr_cache.c +@@ -65,30 +65,28 @@ static int util_mr_find_overlap(void *a, void *b) + static void util_mr_free_entry(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry) + { +- FI_DBG(cache->domain->prov, FI_LOG_MR, "free %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "free %p (len: %" PRIu64 ")\n", + entry->iov.iov_base, entry->iov.iov_len); + + assert(!entry->cached); + if (entry->subscribed) { + ofi_monitor_unsubscribe(&entry->subscription); ++ entry->subscribed = 0; + } + cache->delete_region(cache, entry); + assert((cache->cached_cnt != 0) && + (((ssize_t)cache->cached_size - (ssize_t)entry->iov.iov_len) >= 0)); + cache->cached_cnt--; + cache->cached_size -= entry->iov.iov_len; +- free(entry); ++ ++ util_buf_release(cache->entry_pool, entry); + } + + static void util_mr_uncache_entry(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry) + { +- RbtIterator iter; +- + assert(entry->cached); +- iter = rbtFind(cache->mr_tree, &entry->iov); +- assert(iter); +- rbtErase(cache->mr_tree, iter); ++ cache->mr_storage.erase(&cache->mr_storage, entry); + entry->cached = 0; + } + +@@ -121,7 +119,7 @@ bool ofi_mr_cache_flush(struct ofi_mr_cache *cache) + dlist_pop_front(&cache->lru_list, struct ofi_mr_entry, + entry, lru_entry); + dlist_init(&entry->lru_entry); +- FI_DBG(cache->domain->prov, FI_LOG_MR, "flush %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "flush %p (len: %" PRIu64 ")\n", + entry->iov.iov_base, entry->iov.iov_len); + + util_mr_uncache_entry(cache, entry); +@@ -131,7 +129,7 @@ bool ofi_mr_cache_flush(struct ofi_mr_cache *cache) + + void ofi_mr_cache_delete(struct ofi_mr_cache *cache, struct ofi_mr_entry *entry) + { +- FI_DBG(cache->domain->prov, FI_LOG_MR, "delete %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "delete %p (len: %" PRIu64 ")\n", + entry->iov.iov_base, entry->iov.iov_len); + cache->delete_cnt++; + +@@ -152,13 +150,13 @@ util_mr_cache_create(struct ofi_mr_cache *cache, const struct iovec *iov, + { + int ret; + +- FI_DBG(cache->domain->prov, FI_LOG_MR, "create %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "create %p (len: %" PRIu64 ")\n", + iov->iov_base, iov->iov_len); + + util_mr_cache_process_events(cache); + +- *entry = calloc(1, sizeof(**entry) + cache->entry_data_size); +- if (!*entry) ++ *entry = util_buf_alloc(cache->entry_pool); ++ if (OFI_UNLIKELY(!*entry)) + return -FI_ENOMEM; + + (*entry)->iov = *iov; +@@ -166,8 +164,14 @@ util_mr_cache_create(struct ofi_mr_cache *cache, const struct iovec *iov, + + ret = cache->add_region(cache, *entry); + if (ret) { +- free(*entry); +- return ret; ++ while (ret && ofi_mr_cache_flush(cache)) { ++ ret = cache->add_region(cache, *entry); ++ } ++ if (ret) { ++ assert(!ofi_mr_cache_flush(cache)); ++ util_buf_release(cache->entry_pool, *entry); ++ return ret; ++ } + } + + cache->cached_size += iov->iov_len; +@@ -175,17 +179,18 @@ util_mr_cache_create(struct ofi_mr_cache *cache, const struct iovec *iov, + (cache->cached_size > cache->max_cached_size)) { + (*entry)->cached = 0; + } else { ++ if (cache->mr_storage.insert(&cache->mr_storage, ++ &(*entry)->iov, *entry)) { ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ (*entry)->cached = 1; ++ + ret = ofi_monitor_subscribe(&cache->nq, iov->iov_base, iov->iov_len, + &(*entry)->subscription); + if (ret) + goto err; + (*entry)->subscribed = 1; +- +- if (rbtInsert(cache->mr_tree, &(*entry)->iov, *entry)) { +- ret = -FI_ENOMEM; +- goto err; +- } +- (*entry)->cached = 1; + } + + return 0; +@@ -197,42 +202,40 @@ err: + + static int + util_mr_cache_merge(struct ofi_mr_cache *cache, const struct fi_mr_attr *attr, +- RbtIterator iter, struct ofi_mr_entry **entry) ++ struct ofi_mr_entry *old_entry, struct ofi_mr_entry **entry) + { + struct iovec iov, *old_iov; +- struct ofi_mr_entry *old_entry; + + iov = *attr->mr_iov; + do { +- rbtKeyValue(cache->mr_tree, iter, (void **) &old_iov, +- (void **) &old_entry); +- + FI_DBG(cache->domain->prov, FI_LOG_MR, +- "merging %p (len: %zu) with %p (len: %zu)\n", ++ "merging %p (len: %" PRIu64 ") with %p (len: %" PRIu64 ")\n", + iov.iov_base, iov.iov_len, + old_entry->iov.iov_base, old_entry->iov.iov_len); ++ old_iov = &old_entry->iov; + + iov.iov_len = ((uintptr_t) + MAX(ofi_iov_end(&iov), ofi_iov_end(old_iov))) - + ((uintptr_t) MIN(iov.iov_base, old_iov->iov_base)); + iov.iov_base = MIN(iov.iov_base, old_iov->iov_base); +- FI_DBG(cache->domain->prov, FI_LOG_MR, "merged %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "merged %p (len: %" PRIu64 ")\n", + iov.iov_base, iov.iov_len); + +- rbtErase(cache->mr_tree, iter); ++ if (old_entry->subscribed) { ++ /* old entry will be removed as soon as `use_cnt == 0`. ++ * unsubscribe from the entry */ ++ ofi_monitor_unsubscribe(&old_entry->subscription); ++ old_entry->subscribed = 0; ++ } ++ cache->mr_storage.erase(&cache->mr_storage, old_entry); + old_entry->cached = 0; + + if (old_entry->use_cnt == 0) { + dlist_remove_init(&old_entry->lru_entry); + util_mr_free_entry(cache, old_entry); +- } else if (old_entry->subscribed) { +- /* old entry will be removed as soon as `use_cnt == 0`. +- * unsubscribe from the entry */ +- ofi_monitor_unsubscribe(&old_entry->subscription); +- old_entry->subscribed = 0; + } + +- } while ((iter = rbtFind(cache->mr_tree, &iov))); ++ } while ((old_entry = cache->mr_storage.find(&cache->mr_storage, &iov))); + + return util_mr_cache_create(cache, &iov, attr->access, entry); + } +@@ -240,13 +243,10 @@ util_mr_cache_merge(struct ofi_mr_cache *cache, const struct fi_mr_attr *attr, + int ofi_mr_cache_search(struct ofi_mr_cache *cache, const struct fi_mr_attr *attr, + struct ofi_mr_entry **entry) + { +- RbtIterator iter; +- struct iovec *iov; +- + util_mr_cache_process_events(cache); + + assert(attr->iov_count == 1); +- FI_DBG(cache->domain->prov, FI_LOG_MR, "search %p (len: %zu)\n", ++ FI_DBG(cache->domain->prov, FI_LOG_MR, "search %p (len: %" PRIu64 ")\n", + attr->mr_iov->iov_base, attr->mr_iov->iov_len); + cache->search_cnt++; + +@@ -255,17 +255,15 @@ int ofi_mr_cache_search(struct ofi_mr_cache *cache, const struct fi_mr_attr *att + ofi_mr_cache_flush(cache)) + ; + +- iter = rbtFind(cache->mr_tree, (void *) attr->mr_iov); +- if (!iter) { ++ *entry = cache->mr_storage.find(&cache->mr_storage, attr->mr_iov); ++ if (!*entry) { + return util_mr_cache_create(cache, attr->mr_iov, + attr->access, entry); + } + +- rbtKeyValue(cache->mr_tree, iter, (void **) &iov, (void **) entry); +- + /* This branch is always false if the merging entries wasn't requested */ +- if (!ofi_iov_within(attr->mr_iov, iov)) +- return util_mr_cache_merge(cache, attr, iter, entry); ++ if (!ofi_iov_within(attr->mr_iov, &(*entry)->iov)) ++ return util_mr_cache_merge(cache, attr, *entry, entry); + + cache->hit_cnt++; + if ((*entry)->use_cnt++ == 0) +@@ -292,23 +290,99 @@ void ofi_mr_cache_cleanup(struct ofi_mr_cache *cache) + dlist_remove_init(&entry->lru_entry); + util_mr_free_entry(cache, entry); + } +- rbtDelete(cache->mr_tree); ++ cache->mr_storage.destroy(&cache->mr_storage); + ofi_monitor_del_queue(&cache->nq); + ofi_atomic_dec32(&cache->domain->ref); ++ util_buf_pool_destroy(cache->entry_pool); + assert(cache->cached_cnt == 0); + assert(cache->cached_size == 0); + } + +-int ofi_mr_cache_init(struct util_domain *domain, struct ofi_mem_monitor *monitor, ++static void ofi_mr_rbt_storage_destroy(struct ofi_mr_storage *storage) ++{ ++ rbtDelete((RbtHandle)storage->storage); ++} ++ ++static struct ofi_mr_entry *ofi_mr_rbt_storage_find(struct ofi_mr_storage *storage, ++ const struct iovec *key) ++{ ++ struct ofi_mr_entry *entry; ++ RbtIterator iter = rbtFind((RbtHandle)storage->storage, (void *)key); ++ if (OFI_UNLIKELY(!iter)) ++ return iter; ++ ++ rbtKeyValue(storage->storage, iter, (void *)&key, (void *)&entry); ++ return entry; ++} ++ ++static int ofi_mr_rbt_storage_insert(struct ofi_mr_storage *storage, ++ struct iovec *key, ++ struct ofi_mr_entry *entry) ++{ ++ int ret = rbtInsert((RbtHandle)storage->storage, ++ (void *)&entry->iov, (void *)entry); ++ if (ret != RBT_STATUS_OK) { ++ switch (ret) { ++ case RBT_STATUS_MEM_EXHAUSTED: ++ return -FI_ENOMEM; ++ case RBT_STATUS_DUPLICATE_KEY: ++ return -FI_EALREADY; ++ default: ++ return -FI_EAVAIL; ++ } ++ } ++ return ret; ++} ++ ++static int ofi_mr_rbt_storage_erase(struct ofi_mr_storage *storage, ++ struct ofi_mr_entry *entry) ++{ ++ RbtIterator iter = rbtFind(storage->storage, &entry->iov); ++ assert(iter); ++ return (rbtErase((RbtHandle)storage->storage, iter) != RBT_STATUS_OK) ? ++ -FI_EAVAIL : 0; ++} ++ ++static int ofi_mr_cache_init_rbt_storage(struct ofi_mr_cache *cache) ++{ ++ cache->mr_storage.storage = rbtNew(cache->merge_regions ? ++ util_mr_find_overlap : ++ util_mr_find_within); ++ if (!cache->mr_storage.storage) ++ return -FI_ENOMEM; ++ cache->mr_storage.destroy = ofi_mr_rbt_storage_destroy; ++ cache->mr_storage.find = ofi_mr_rbt_storage_find; ++ cache->mr_storage.insert = ofi_mr_rbt_storage_insert; ++ cache->mr_storage.erase = ofi_mr_rbt_storage_erase; ++ return 0; ++} ++ ++static int ofi_mr_cache_init_storage(struct ofi_mr_cache *cache) ++{ ++ switch (cache->mr_storage.type) { ++ case OFI_MR_STORAGE_DEFAULT: ++ case OFI_MR_STORAGE_RBT: ++ return ofi_mr_cache_init_rbt_storage(cache); ++ case OFI_MR_STORAGE_USER: ++ if (!(cache->mr_storage.storage && ++ cache->mr_storage.destroy && cache->mr_storage.find && ++ cache->mr_storage.insert && cache->mr_storage.erase)) ++ return -FI_EINVAL; ++ break; ++ } ++ return 0; ++} ++ ++int ofi_mr_cache_init(struct util_domain *domain, ++ struct ofi_mem_monitor *monitor, + struct ofi_mr_cache *cache) + { ++ int ret; + assert(cache->add_region && cache->delete_region); + +- cache->mr_tree = rbtNew(cache->merge_regions ? +- util_mr_find_overlap : +- util_mr_find_within); +- if (!cache->mr_tree) +- return -FI_ENOMEM; ++ ret = ofi_mr_cache_init_storage(cache); ++ if (ret) ++ return ret; + + cache->domain = domain; + ofi_atomic_inc32(&domain->ref); +@@ -323,5 +397,17 @@ int ofi_mr_cache_init(struct util_domain *domain, struct ofi_mem_monitor *monito + cache->hit_cnt = 0; + ofi_monitor_add_queue(monitor, &cache->nq); + ++ ret = util_buf_pool_create(&cache->entry_pool, ++ sizeof(struct ofi_mr_entry) + ++ cache->entry_data_size, ++ 16, 0, cache->max_cached_cnt); ++ if (ret) ++ goto err; ++ + return 0; ++err: ++ ofi_atomic_dec32(&cache->domain->ref); ++ ofi_monitor_del_queue(&cache->nq); ++ cache->mr_storage.destroy(&cache->mr_storage); ++ return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ns.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ns.c +index f78807447..eb4edd81d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ns.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_ns.c +@@ -168,8 +168,10 @@ static int util_ns_process_cmd(struct util_ns *ns, struct util_ns_cmd *cmd, + case OFI_UTIL_NS_DEL: + io_len = ns->name_len + ns->service_len; + io_buf = calloc(io_len, 1); +- if (!io_buf) +- return -FI_ENOMEM; ++ if (!io_buf) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } + + ret = ofi_recvall_socket(sock, io_buf, io_len); + if (!ret) { +@@ -185,8 +187,10 @@ static int util_ns_process_cmd(struct util_ns *ns, struct util_ns_cmd *cmd, + case OFI_UTIL_NS_QUERY: + io_len = ns->service_len; + io_buf = calloc(cmd_len + ns->service_len + ns->name_len, 1); +- if (!io_buf) +- return -FI_ENOMEM; ++ if (!io_buf) { ++ ret = -FI_ENOMEM; ++ goto out; ++ } + + memcpy(io_buf, cmd, cmd_len); + cmd = io_buf; +@@ -212,10 +216,15 @@ static int util_ns_process_cmd(struct util_ns *ns, struct util_ns_cmd *cmd, + + default: + assert(0); +- return -FI_ENODATA; ++ ret = -FI_ENODATA; ++ goto out; + } + + free(io_buf); ++ ++out: ++ FI_INFO(&core_prov, FI_LOG_CORE, ++ "Name server processed command - returned %d (%s)\n", ret, fi_strerror(-ret)); + return ret; + } + +@@ -356,8 +365,11 @@ int ofi_ns_add_local_name(struct util_ns *ns, void *service, void *name) + .op = OFI_UTIL_NS_ADD, + }; + +- if (!ns->is_initialized) ++ if (!ns->is_initialized) { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Cannot add local name - name server uninitialized\n"); + return -FI_EINVAL; ++ } + + write_buf = calloc(cmd_len + ns->service_len + ns->name_len, 1); + if (!write_buf) { +@@ -539,6 +551,7 @@ err3: + err2: + rbtDelete(ns->map); + err1: ++ FI_WARN(&core_prov, FI_LOG_CORE, "Error starting name server\n"); + ofi_atomic_dec32(&ns->ref); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_shm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_shm.c +index 75882ad9e..161277cbf 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_shm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_shm.c +@@ -64,7 +64,7 @@ int smr_create(const struct fi_provider *prov, struct smr_map *map, + inject_pool_offset = resp_queue_offset + sizeof(struct smr_resp_queue) + + sizeof(struct smr_resp) * attr->tx_count; + peer_addr_offset = inject_pool_offset + sizeof(struct smr_inject_pool) + +- sizeof(struct smr_inject_buf) * attr->rx_count; ++ sizeof(struct smr_inject_pool_entry) * attr->rx_count; + name_offset = peer_addr_offset + sizeof(struct smr_addr) * SMR_MAX_PEERS; + total_size = name_offset + strlen(attr->name) + 1; + total_size = roundup_power_of_two(total_size); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_wait.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_wait.c +index 7497e403c..088dc160c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_wait.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/util/src/util_wait.c +@@ -181,8 +181,8 @@ out: + return ret; + } + +-int ofi_wait_fd_add(struct util_wait *wait, int fd, ofi_wait_fd_try_func try, +- void *arg, void *context) ++int ofi_wait_fd_add(struct util_wait *wait, int fd, uint32_t events, ++ ofi_wait_fd_try_func try, void *arg, void *context) + { + struct ofi_wait_fd_entry *fd_entry; + struct dlist_entry *entry; +@@ -201,7 +201,7 @@ int ofi_wait_fd_add(struct util_wait *wait, int fd, ofi_wait_fd_try_func try, + goto out; + } + +- ret = fi_epoll_add(wait_fd->epoll_fd, fd, context); ++ ret = fi_epoll_add(wait_fd->epoll_fd, fd, events, context); + if (ret) { + FI_WARN(wait->prov, FI_LOG_FABRIC, "Unable to add fd to epoll\n"); + goto out; +@@ -311,6 +311,7 @@ static int util_wait_fd_control(struct fid *fid, int command, void *arg) + static int util_wait_fd_close(struct fid *fid) + { + struct util_wait_fd *wait; ++ struct ofi_wait_fd_entry *fd_entry; + int ret; + + wait = container_of(fid, struct util_wait_fd, util_wait.wait_fid.fid); +@@ -318,12 +319,19 @@ static int util_wait_fd_close(struct fid *fid) + if (ret) + return ret; + +- assert(dlist_empty(&wait->fd_list)); +- fastlock_destroy(&wait->lock); ++ fastlock_acquire(&wait->lock); ++ while (!dlist_empty(&wait->fd_list)) { ++ dlist_pop_front(&wait->fd_list, struct ofi_wait_fd_entry, ++ fd_entry, entry); ++ fi_epoll_del(wait->epoll_fd, fd_entry->fd); ++ free(fd_entry); ++ } ++ fastlock_release(&wait->lock); + + fi_epoll_del(wait->epoll_fd, wait->signal.fd[FI_READ_FD]); + fd_signal_free(&wait->signal); + fi_epoll_close(wait->epoll_fd); ++ fastlock_destroy(&wait->lock); + free(wait); + return 0; + } +@@ -393,7 +401,7 @@ int ofi_wait_fd_open(struct fid_fabric *fabric_fid, struct fi_wait_attr *attr, + goto err3; + + ret = fi_epoll_add(wait->epoll_fd, wait->signal.fd[FI_READ_FD], +- &wait->util_wait.wait_fid.fid); ++ FI_EPOLL_IN, &wait->util_wait.wait_fid.fid); + if (ret) + goto err4; + +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/Makefile.include b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/Makefile.include +index bdef9bbf2..e133d129a 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/Makefile.include ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/Makefile.include +@@ -3,33 +3,19 @@ _verbs_files = \ + prov/verbs/src/fi_verbs.h \ + prov/verbs/src/fi_verbs.c \ + prov/verbs/src/verbs_cm.c \ ++ prov/verbs/src/verbs_cm_xrc.c \ + prov/verbs/src/verbs_cq.c \ +- prov/verbs/src/verbs_srq.c \ + prov/verbs/src/verbs_domain.c \ ++ prov/verbs/src/verbs_domain_xrc.c \ + prov/verbs/src/verbs_mr.c \ + prov/verbs/src/verbs_eq.c \ + prov/verbs/src/verbs_info.c \ +- prov/verbs/src/verbs_msg_ep.c \ +- prov/verbs/src/ep_rdm/verbs_av_ep_rdm.c \ +- prov/verbs/src/ep_rdm/verbs_cq_ep_rdm.c \ +- prov/verbs/src/ep_rdm/verbs_ep_rdm.c \ +- prov/verbs/src/ep_rdm/verbs_queuing.h \ +- prov/verbs/src/ep_rdm/verbs_rdm_cm.c \ +- prov/verbs/src/ep_rdm/verbs_rdm_cntr.c \ +- prov/verbs/src/ep_rdm/verbs_rdm_msg.c \ +- prov/verbs/src/ep_rdm/verbs_rdm_rma.c \ +- prov/verbs/src/ep_rdm/verbs_rdm.h \ +- prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.h \ +- prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.c \ +- prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm.c \ +- prov/verbs/src/ep_rdm/verbs_utils.c \ +- prov/verbs/src/ep_rdm/verbs_utils.h \ +- prov/verbs/src/ep_dgram/verbs_dgram.h \ +- prov/verbs/src/ep_dgram/verbs_dgram_ep.c \ +- prov/verbs/src/ep_dgram/verbs_dgram_ep_msg.c \ +- prov/verbs/src/ep_dgram/verbs_dgram_cq.c \ +- prov/verbs/src/ep_dgram/verbs_dgram_cntr.c \ +- prov/verbs/src/ep_dgram/verbs_dgram_av.c ++ prov/verbs/src/verbs_ep.c \ ++ prov/verbs/src/verbs_msg.c \ ++ prov/verbs/src/verbs_rma.c \ ++ prov/verbs/src/verbs_dgram_ep_msg.c \ ++ prov/verbs/src/verbs_dgram_av.c \ ++ prov/verbs/src/ofi_verbs_priv.h + + if HAVE_VERBS_DL + pkglib_LTLIBRARIES += libverbs-fi.la +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/configure.m4 b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/configure.m4 +index 326688dfe..2ae8f8f69 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/configure.m4 ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/configure.m4 +@@ -65,6 +65,16 @@ AC_DEFUN([FI_VERBS_CONFIGURE],[ + [Experimental verbs features support])], + []) + ++ #See if we have XRC support ++ VERBS_HAVE_XRC=0 ++ AS_IF([test $verbs_ibverbs_happy -eq 1],[ ++ AC_CHECK_DECL([IBV_QPT_XRC_SEND], ++ [VERBS_HAVE_XRC=1],[], ++ [#include ]) ++ ]) ++ AC_DEFINE_UNQUOTED([VERBS_HAVE_XRC],[$VERBS_HAVE_XRC], ++ [Whether infiniband/verbs.h has XRC support or not]) ++ + # Technically, verbs_ibverbs_CPPFLAGS and + # verbs_rdmacm_CPPFLAGS could be different, but it is highly + # unlikely that they ever will be. So only list +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram.h +deleted file mode 100644 +index 007fcd5fa..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram.h ++++ /dev/null +@@ -1,280 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _OFI_VERBS_DGRAM_H_ +-#define _OFI_VERBS_DGRAM_H_ +- +-#if HAVE_CONFIG_H +-# include +-#endif /* HAVE_CONFIG_H */ +- +-#include "../fi_verbs.h" +-#include +- +-#ifdef __cplusplus +-extern "C" { +-#endif /* __cplusplus */ +- +-/* Verbs-DGRAM Pool functionality */ +-struct fi_ibv_dgram_buf_pool; +- +-typedef void(*fi_ibv_dgram_pool_entry_cancel_hndlr) (struct fi_ibv_dgram_buf_pool *); +- +-struct fi_ibv_dgram_buf_pool { +- struct util_buf_pool *pool; +- struct dlist_entry buf_list; +- +- fi_ibv_dgram_pool_entry_cancel_hndlr cancel_hndlr; +-}; +- +-typedef int(*handle_wr_cb)(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +- +-struct fi_ibv_dgram_wr_entry_hdr { +- struct dlist_entry entry; +- void *desc; +- struct fi_ibv_dgram_ep *ep; +- int32_t comp_unsignaled_cnt; +- void *context; +- uint64_t flags; +- handle_wr_cb suc_cb; +- handle_wr_cb err_cb; +-}; +- +-struct fi_ibv_dgram_pool_attr { +- size_t count; +- size_t size; +- void *pool_ctx; +- +- fi_ibv_dgram_pool_entry_cancel_hndlr cancel_hndlr; +- +- util_buf_region_alloc_hndlr alloc_hndlr; +- util_buf_region_free_hndlr free_hndlr; +-}; +- +-/* +- * The Global Routing Header (GRH) of the incoming message +- * will be placed in the first 40 bytes of the buffer(s) +- * in the scatter list. +- * @note If no GRH is present in the incoming message, +- * then the first bytes will be undefined. +- * This means that in all cases, the actual data of the +- * incoming message will start at an offset of 40 bytes +- * into the buffer(s) in the scatter list. +- */ +- +-struct fi_ibv_dgram_wr_entry { +- struct fi_ibv_dgram_wr_entry_hdr hdr; +- char grh_buf[]; +-}; +- +-#define VERBS_DGRAM_GRH_LENGTH 40 +-#define VERBS_DGRAM_WR_ENTRY_SIZE \ +- (sizeof(struct fi_ibv_dgram_wr_entry) + VERBS_DGRAM_GRH_LENGTH) +- +-static inline struct fi_ibv_dgram_wr_entry_hdr* +-fi_ibv_dgram_wr_entry_get(struct fi_ibv_dgram_buf_pool *pool) +-{ +- struct fi_ibv_dgram_wr_entry_hdr *buf; +- void *mr = NULL; +- +- buf = util_buf_alloc_ex(pool->pool, &mr); +- if (OFI_UNLIKELY(!buf)) +- return NULL; +- buf->desc = fi_mr_desc((struct fid_mr *)mr); +- dlist_insert_tail(&buf->entry, &pool->buf_list); +- +- return buf; +-} +- +-static inline void +-fi_ibv_dgram_wr_entry_release(struct fi_ibv_dgram_buf_pool *pool, +- struct fi_ibv_dgram_wr_entry_hdr *buf) +-{ +- dlist_remove(&buf->entry); +- util_buf_release(pool->pool, buf); +-} +- +-static inline void +-fi_ibv_dgram_mr_buf_close(void *pool_ctx, void *context) +-{ +- /* We would get a (fid_mr *) in context, but +- * it is safe to cast it into (fid *) */ +- fi_close((struct fid *)context); +-} +- +-static inline int +-fi_ibv_dgram_mr_buf_reg(void *pool_ctx, void *addr, +- size_t len, void **context) +-{ +- int ret; +- struct fid_mr *mr; +- struct fid_domain *domain = (struct fid_domain *)pool_ctx; +- +- ret = fi_mr_reg(domain, addr, len, FI_SEND | FI_RECV, +- 0, 0, 0, &mr, NULL); +- *context = mr; +- return ret; +-} +- +-static inline void +-fi_ibv_dgram_pool_wr_entry_cancel(struct fi_ibv_dgram_buf_pool *pool) +-{ +- struct dlist_entry *entry; +- struct fi_ibv_dgram_wr_entry_hdr *buf; +- entry = pool->buf_list.next; +- buf = container_of(entry, struct fi_ibv_dgram_wr_entry_hdr, +- entry); +- fi_ibv_dgram_wr_entry_release(pool, buf); +-} +- +-static inline void +-fi_ibv_dgram_pool_destroy(struct fi_ibv_dgram_buf_pool *pool) +-{ +- if (pool->cancel_hndlr) { +- while (!dlist_empty(&pool->buf_list)) +- pool->cancel_hndlr(pool); +- } +- +- util_buf_pool_destroy(pool->pool); +-} +- +-static inline int +-fi_ibv_dgram_pool_create(struct fi_ibv_dgram_pool_attr *attr, +- struct fi_ibv_dgram_buf_pool *pool) +-{ +- int ret = util_buf_pool_create_ex(&pool->pool, attr->size, +- 16, 0, attr->count, +- attr->alloc_hndlr, +- attr->free_hndlr, +- attr->pool_ctx); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_DATA, +- "Unable to create buf pool\n"); +- return ret; +- } +- pool->cancel_hndlr = attr->cancel_hndlr; +- dlist_init(&pool->buf_list); +- +- return FI_SUCCESS; +-} +-/* ~Verbs UD Pool functionality */ +- +-struct fi_ibv_dgram_cq { +- struct util_cq util_cq; +- struct ibv_cq *ibv_cq; +-}; +- +-struct fi_ibv_dgram_av { +- struct util_av util_av; +-}; +- +-struct fi_ibv_dgram_eq { +- struct util_eq util_eq; +-}; +- +-struct fi_ibv_dgram_cntr { +- struct util_cntr util_cntr; +-}; +- +-struct fi_ibv_dgram_av_entry { +- struct ofi_ib_ud_ep_name *addr; +- struct ibv_ah *ah; +-}; +- +-struct fi_ibv_dgram_ep { +- struct util_ep util_ep; +- struct ibv_qp *ibv_qp; +- struct fi_info *info; +- struct fi_ibv_dgram_av *av; +- struct fi_ibv_domain *domain; +- struct fi_ibv_dgram_buf_pool grh_pool; +- struct ofi_ib_ud_ep_name ep_name; +- int service; +- int ep_flags; +- int32_t max_unsignaled_send_cnt; +- ofi_atomic32_t unsignaled_send_cnt; +-}; +- +-extern struct fi_ops_msg fi_ibv_dgram_msg_ops; +- +-static inline struct fi_ibv_dgram_av_entry* +-fi_ibv_dgram_av_lookup_av_entry(struct fi_ibv_dgram_av *av, int index) +-{ +- assert((index >= 0) && ((size_t)index < av->util_av.count)); +- return ofi_av_get_addr(&av->util_av, index); +-} +- +-static inline +-int fi_ibv_dgram_is_completion(uint64_t cq_flags, uint64_t op_flags) +-{ +- if ((op_flags & FI_COMPLETION) || +- (op_flags & (FI_INJECT_COMPLETE | +- FI_TRANSMIT_COMPLETE | +- FI_DELIVERY_COMPLETE))) +- return 1; +- else if (op_flags & FI_INJECT) +- return 0; +- else if (!(cq_flags & FI_SELECTIVE_COMPLETION)) +- return 1; +- return 0; +-} +- +-int fi_ibv_dgram_rx_cq_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_tx_cq_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_tx_cq_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_rx_cq_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_tx_cq_no_action(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +-int fi_ibv_dgram_rx_cq_no_action(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc); +- +-void fi_ibv_dgram_recv_cq_progress(struct util_ep *util_ep); +-void fi_ibv_dgram_send_cq_progress(struct util_ep *util_ep); +-void fi_ibv_dgram_send_recv_cq_progress(struct util_ep *util_ep); +- +-#ifdef __cplusplus +-} +-#endif /* __cplusplus */ +- +-#endif /* _OFI_VERBS_UD_H_ */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_av.c +deleted file mode 100644 +index 30c0becba..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_av.c ++++ /dev/null +@@ -1,344 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-const size_t fi_ibv_dgram_av_entry_size = sizeof(struct fi_ibv_dgram_av_entry); +- +-/* TODO: find more deterministic hash function */ +-static inline int +-fi_ibv_dgram_av_slot(struct util_av *av, const struct ofi_ib_ud_ep_name *ep_name) +-{ +- return (ep_name->gid.global.subnet_prefix + ep_name->lid + ep_name->qpn) +- % av->hash.slots; +-} +- +-static inline int fi_ibv_dgram_av_is_addr_valid(struct fi_ibv_dgram_av *av, +- const void *addr) +-{ +- const struct ofi_ib_ud_ep_name *check_name = addr; +- return (check_name->lid > 0); +-} +- +-static inline +-int fi_ibv_dgram_verify_av_insert(struct util_av *av, uint64_t flags) +-{ +- if ((av->flags & FI_EVENT) && !av->eq) { +- VERBS_WARN(FI_LOG_AV, "No EQ bound to AV\n"); +- return -FI_ENOEQ; +- } +- +- if (flags & ~(FI_MORE)) { +- VERBS_WARN(FI_LOG_AV, "Unsupported flags\n"); +- return -FI_ENOEQ; +- } +- +- return FI_SUCCESS; +-} +- +-static int fi_ibv_dgram_av_insert_addr(struct fi_ibv_dgram_av *av, +- const void *addr, +- fi_addr_t *fi_addr, +- void *context) +-{ +- int ret, index = -1; +- struct fi_ibv_domain *domain; +- struct ofi_ib_ud_ep_name *ep_name; +- struct ibv_ah *ah; +- +- domain = container_of(&av->util_av.domain->domain_fid, +- struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) { +- ret = -FI_EINVAL; +- goto fn1; +- } +- +- if (fi_ibv_dgram_av_is_addr_valid(av, addr)) { +- struct fi_ibv_dgram_av_entry av_entry; +- struct ibv_ah_attr ah_attr = { +- .is_global = 0, +- .dlid = ((struct ofi_ib_ud_ep_name *)addr)->lid, +- .sl = ((struct ofi_ib_ud_ep_name *)addr)->sl, +- .src_path_bits = 0, +- .port_num = 1, +- }; +- ep_name = calloc(1, sizeof(*ep_name)); +- if (OFI_UNLIKELY(!ep_name)) { +- ret = -FI_ENOMEM; +- goto fn1; +- } +- memcpy(ep_name, addr, sizeof(*ep_name)); +- if (ep_name->gid.global.interface_id) { +- ah_attr.is_global = 1; +- ah_attr.grh.hop_limit = 64; +- ah_attr.grh.dgid = ep_name->gid; +- ah_attr.grh.sgid_index = 0; +- } +- ah = ibv_create_ah(domain->pd, &ah_attr); +- if (!ah) { +- ret = -errno; +- VERBS_WARN(FI_LOG_AV, "Unable to create " +- "Address Handle, errno - %d\n", errno); +- goto fn2; +- } +- +- av_entry.ah = ah; +- av_entry.addr = ep_name; +- +- ret = ofi_av_insert_addr(&av->util_av, &av_entry, +- fi_ibv_dgram_av_slot(&av->util_av, ep_name), +- &index); +- if (ret) +- goto fn3; +- if (fi_addr) +- *fi_addr = index; +- } else { +- ret = -FI_EADDRNOTAVAIL; +- VERBS_WARN(FI_LOG_AV, "Invalid address\n"); +- goto fn1; +- } +- +- return ret; +-fn3: +- ibv_destroy_ah(ah); +-fn2: +- free(ep_name); +-fn1: +- if (fi_addr) +- *fi_addr = FI_ADDR_NOTAVAIL; +- return ret; +-} +- +-static int fi_ibv_dgram_av_insert(struct fid_av *av_fid, const void *addr, +- size_t count, fi_addr_t *fi_addr, +- uint64_t flags, void *context) +-{ +- struct fi_ibv_dgram_av *av; +- int ret, success_cnt = 0; +- size_t i; +- +- assert(av_fid->fid.fclass == FI_CLASS_AV); +- if (av_fid->fid.fclass != FI_CLASS_AV) +- return -FI_EINVAL; +- +- av = container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); +- if (!av) +- return -FI_EINVAL; +- ret = fi_ibv_dgram_verify_av_insert(&av->util_av, flags); +- if (ret) +- return ret; +- +- VERBS_DBG(FI_LOG_AV, "Inserting %"PRIu64" addresses\n", count); +- for (i = 0; i < count; i++) { +- ret = fi_ibv_dgram_av_insert_addr( +- av, (struct ofi_ib_ud_ep_name *)addr + i, +- fi_addr ? &fi_addr[i] : NULL, context); +- if (!ret) +- success_cnt++; +- else if (av->util_av.eq) +- ofi_av_write_event(&av->util_av, i, -ret, context); +- } +- +- VERBS_DBG(FI_LOG_AV, "%"PRIu64" addresses successful\n", count); +- if (av->util_av.eq) { +- ofi_av_write_event(&av->util_av, success_cnt, 0, context); +- ret = 0; +- } else { +- ret = success_cnt; +- } +- return ret; +-} +- +-static int fi_ibv_dgram_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, +- size_t count, uint64_t flags) +-{ +- struct fi_ibv_dgram_av *av; +- int ret, slot, i, index; +- +- assert(av_fid->fid.fclass == FI_CLASS_AV); +- if (av_fid->fid.fclass != FI_CLASS_AV) +- return -FI_EINVAL; +- +- av = container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); +- if (!av) +- return -FI_EINVAL; +- ret = fi_ibv_dgram_verify_av_insert(&av->util_av, flags); +- if (ret) +- return ret; +- +- for (i = count - 1; i >= 0; i--) { +- struct fi_ibv_dgram_av_entry *av_entry; +- struct ofi_ib_ud_ep_name *ep_name; +- +- index = (int)fi_addr[i]; +- av_entry = ofi_av_get_addr(&av->util_av, index); +- if (!av_entry) { +- VERBS_WARN(FI_LOG_AV, "Unable to find address\n"); +- return -FI_ENOENT; +- } +- ret = ibv_destroy_ah(av_entry->ah); +- if (ret) +- VERBS_WARN(FI_LOG_AV, +- "AH Destroying of fi_addr %d failed " +- "with status - %d\n", index, ret); +- ep_name = av_entry->addr; +- slot = fi_ibv_dgram_av_slot(&av->util_av, av_entry->addr); +- fastlock_acquire(&av->util_av.lock); +- ret = ofi_av_remove_addr(&av->util_av, slot, index); +- fastlock_release(&av->util_av.lock); +- if (ret) +- VERBS_WARN(FI_LOG_AV, +- "Removal of fi_addr %d failed\n", +- index); +- free(ep_name); +- } +- return FI_SUCCESS; +-} +- +-static inline +-int fi_ibv_dgram_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, +- void *addr, size_t *addrlen) +-{ +- struct fi_ibv_dgram_av *av; +- struct fi_ibv_dgram_av_entry *av_entry; +- +- assert(av_fid->fid.fclass == FI_CLASS_AV); +- if (av_fid->fid.fclass != FI_CLASS_AV) +- return -FI_EINVAL; +- +- av = container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); +- if (!av) +- return -FI_EINVAL; +- +- av_entry = fi_ibv_dgram_av_lookup_av_entry(av, (int)fi_addr); +- if (!av_entry) +- return -FI_ENOENT; +- +- memcpy(addr, av_entry->addr, MIN(*addrlen, av->util_av.addrlen)); +- *addrlen = av->util_av.addrlen; +- return FI_SUCCESS; +-} +- +-static inline +-const char *fi_ibv_dgram_av_straddr(struct fid_av *av, const void *addr, +- char *buf, size_t *len) +-{ +- return ofi_straddr(buf, len, FI_ADDR_IB_UD, addr); +-} +- +-static int fi_ibv_dgram_av_close(struct fid *av_fid) +-{ +- int ret; +- struct fi_ibv_dgram_av *av; +- +- assert(av_fid->fclass == FI_CLASS_AV); +- if (av_fid->fclass != FI_CLASS_AV) +- return -FI_EINVAL; +- +- av = container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid.fid); +- if (!av) +- return -FI_EINVAL; +- +- ret = ofi_av_close(&av->util_av); +- if (ret) +- return ret; +- +- free(av); +- +- return FI_SUCCESS; +-} +- +-static struct fi_ops fi_ibv_dgram_fi_ops = { +- .size = sizeof(fi_ibv_dgram_fi_ops), +- .close = fi_ibv_dgram_av_close, +- .bind = ofi_av_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static struct fi_ops_av fi_ibv_dgram_av_ops = { +- .size = sizeof(fi_ibv_dgram_av_ops), +- .insert = fi_ibv_dgram_av_insert, +- .insertsvc = fi_no_av_insertsvc, +- .insertsym = fi_no_av_insertsym, +- .remove = fi_ibv_dgram_av_remove, +- .lookup = fi_ibv_dgram_av_lookup, +- .straddr = fi_ibv_dgram_av_straddr, +-}; +- +-int fi_ibv_dgram_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, +- struct fid_av **av_fid, void *context) +-{ +- struct fi_ibv_domain *domain; +- struct fi_ibv_dgram_av *av; +- int ret; +- +- if (!attr || domain_fid->fid.fclass != FI_CLASS_DOMAIN) +- return -FI_EINVAL; +- +- av = calloc(1, sizeof(*av)); +- if (!av) +- return -FI_ENOMEM; +- +- domain = container_of(domain_fid, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) { +- ret = -FI_EINVAL; +- goto err1; +- } +- +- assert(domain->ep_type == FI_EP_DGRAM); +- +- struct util_av_attr util_attr = { +- .overhead = attr->count >> 1, +- .flags = OFI_AV_HASH, +- .addrlen = sizeof(struct fi_ibv_dgram_av_entry), +- }; +- +- if (attr->type == FI_AV_UNSPEC) +- attr->type = FI_AV_MAP; +- +- ret = ofi_av_init(&domain->util_domain, attr, &util_attr, +- &av->util_av, context); +- if (ret) +- goto err1; +- +- *av_fid = &av->util_av.av_fid; +- (*av_fid)->fid.ops = &fi_ibv_dgram_fi_ops; +- (*av_fid)->ops = &fi_ibv_dgram_av_ops; +- +- return FI_SUCCESS; +-err1: +- free(av); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cq.c +deleted file mode 100644 +index f34026812..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_cq.c ++++ /dev/null +@@ -1,385 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-static inline +-int fi_ibv_dgram_cq_cntr_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_cq_tagged_entry *comp; +- int ret = FI_SUCCESS; +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- if (util_cntr) +- util_cntr->cntr_fid.ops->add(&util_cntr->cntr_fid, 1); +- +- fastlock_acquire(&util_cq->cq_lock); +- if (OFI_UNLIKELY(ofi_cirque_isfull(util_cq->cirq))) { +- VERBS_DBG(FI_LOG_CQ, "util_cq cirq is full!\n"); +- ret = -FI_EAGAIN; +- goto out; +- } +- +- comp = ofi_cirque_tail(util_cq->cirq); +- comp->op_context = wr_entry->hdr.context; +- comp->flags = wr_entry->hdr.flags; +- comp->len = (uint64_t)wc->byte_len; +- comp->buf = NULL; +- if (wc->wc_flags & IBV_WC_WITH_IMM) +- comp->data = ntohl(wc->imm_data); +- ofi_cirque_commit(util_cq->cirq); +- fi_ibv_dgram_wr_entry_release( +- &wr_entry->hdr.ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +-out: +- fastlock_release(&util_cq->cq_lock); +- return ret; +-} +- +-static inline +-int fi_ibv_dgram_cq_cntr_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_cq_err_entry err_entry = { +- .err = EIO, +- .prov_errno = wc->status, +- .err_data_size = sizeof(wc->vendor_err), +- .err_data = (void *)&wc->vendor_err, +- }; +- struct fi_cq_tagged_entry *comp; +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- struct util_cq_err_entry *err = calloc(1, sizeof(*err)); +- if (!err) { +- VERBS_WARN(FI_LOG_CQ, "Unable to allocate " +- "util_cq_err_entry\n"); +- goto out; +- } +- +- err_entry.op_context = wr_entry->hdr.context; +- err_entry.flags = wr_entry->hdr.flags; +- err->err_entry = err_entry; +- +- if (util_cntr) +- util_cntr->cntr_fid.ops->adderr(&util_cntr->cntr_fid, 1); +- +- fastlock_acquire(&util_cq->cq_lock); +- slist_insert_tail(&err->list_entry, &util_cq->err_list); +- +- /* Signal that there is err entry */ +- comp = ofi_cirque_tail(util_cq->cirq); +- comp->flags = UTIL_FLAG_ERROR; +- ofi_cirque_commit(util_cq->cirq); +- +- fastlock_release(&util_cq->cq_lock); +- +-out: +- fi_ibv_dgram_wr_entry_release( +- &wr_entry->hdr.ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- +- return FI_SUCCESS; +-} +- +-int fi_ibv_dgram_rx_cq_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- return fi_ibv_dgram_cq_cntr_comp(util_cq, util_cntr, wc); +-} +- +-int fi_ibv_dgram_tx_cq_comp(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- ofi_atomic_sub32(&wr_entry->hdr.ep->unsignaled_send_cnt, +- wr_entry->hdr.ep->max_unsignaled_send_cnt); +- +- return fi_ibv_dgram_cq_cntr_comp(util_cq, util_cntr, wc); +-} +- +-int fi_ibv_dgram_tx_cq_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- ofi_atomic_sub32(&wr_entry->hdr.ep->unsignaled_send_cnt, +- wr_entry->hdr.ep->max_unsignaled_send_cnt); +- +- return fi_ibv_dgram_cq_cntr_report_error(util_cq, util_cntr, wc); +-} +- +-int fi_ibv_dgram_rx_cq_report_error(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- return fi_ibv_dgram_cq_cntr_report_error(util_cq, util_cntr, wc); +-} +- +-int fi_ibv_dgram_tx_cq_no_action(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- +- ofi_atomic_sub32(&wr_entry->hdr.ep->unsignaled_send_cnt, +- wr_entry->hdr.ep->max_unsignaled_send_cnt); +- +- fi_ibv_dgram_wr_entry_release( +- &wr_entry->hdr.ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- +- return FI_SUCCESS; +-} +- +-int fi_ibv_dgram_rx_cq_no_action(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- +- fi_ibv_dgram_wr_entry_release( +- &wr_entry->hdr.ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- +- return FI_SUCCESS; +-} +- +-static inline +-void fi_ibv_dgram_cq_handle_wc(struct util_cq *util_cq, +- struct util_cntr *util_cntr, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_dgram_wr_entry *wr_entry = +- (struct fi_ibv_dgram_wr_entry *)(uintptr_t)wc->wr_id; +- if (OFI_LIKELY(wc->status == IBV_WC_SUCCESS)) +- wr_entry->hdr.suc_cb(util_cq, util_cntr, wc); +- else +- wr_entry->hdr.err_cb(util_cq, util_cntr, wc); +-} +- +-void fi_ibv_dgram_recv_cq_progress(struct util_ep *util_ep) +-{ +- struct fi_ibv_dgram_cq *cq; +- int num_ent, i; +- struct ibv_wc *wcs = alloca(fi_ibv_gl_data.cqread_bunch_size * +- sizeof(struct ibv_wc)); +- +- cq = container_of(&util_ep->rx_cq->cq_fid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- +- num_ent = ibv_poll_cq(cq->ibv_cq, +- fi_ibv_gl_data.cqread_bunch_size, +- wcs); +- for (i = 0; i < num_ent; i++) +- fi_ibv_dgram_cq_handle_wc(util_ep->rx_cq, +- util_ep->rx_cntr, +- &wcs[i]); +-} +- +-void fi_ibv_dgram_send_cq_progress(struct util_ep *util_ep) +-{ +- struct fi_ibv_dgram_cq *cq; +- int num_ent, i; +- struct ibv_wc *wcs = alloca(fi_ibv_gl_data.cqread_bunch_size * +- sizeof(struct ibv_wc)); +- +- cq = container_of(&util_ep->tx_cq->cq_fid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- +- num_ent = ibv_poll_cq(cq->ibv_cq, +- fi_ibv_gl_data.cqread_bunch_size, +- wcs); +- for (i = 0; i < num_ent; i++) +- fi_ibv_dgram_cq_handle_wc(util_ep->tx_cq, +- util_ep->tx_cntr, +- &wcs[i]); +-} +- +-void fi_ibv_dgram_send_recv_cq_progress(struct util_ep *util_ep) +-{ +- struct fi_ibv_dgram_cq *tx_cq, *rx_cq; +- int num_ent, i; +- struct ibv_wc *wcs = alloca(fi_ibv_gl_data.cqread_bunch_size * +- sizeof(struct ibv_wc)); +- +- tx_cq = container_of(&util_ep->tx_cq->cq_fid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- rx_cq = container_of(&util_ep->rx_cq->cq_fid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- +- /* Poll Transmit events */ +- num_ent = ibv_poll_cq(tx_cq->ibv_cq, +- fi_ibv_gl_data.cqread_bunch_size, +- wcs); +- for (i = 0; i < num_ent; i++) +- fi_ibv_dgram_cq_handle_wc(util_ep->tx_cq, +- util_ep->tx_cntr, +- &wcs[i]); +- +- /* Poll Receive events */ +- num_ent = ibv_poll_cq(rx_cq->ibv_cq, +- fi_ibv_gl_data.cqread_bunch_size, +- wcs); +- for (i = 0; i < num_ent; i++) +- fi_ibv_dgram_cq_handle_wc(util_ep->rx_cq, +- util_ep->rx_cntr, +- &wcs[i]); +-} +- +-static inline +-const char *fi_ibv_dgram_cq_strerror(struct fid_cq *cq_fid, int prov_errno, +- const void *err_data, char *buf, size_t len) +-{ +- if (buf && len) +- strncpy(buf, ibv_wc_status_str(prov_errno), len); +- return ibv_wc_status_str(prov_errno); +-} +- +-static int fi_ibv_dgram_cq_close(fid_t cq_fid) +-{ +- int ret = FI_SUCCESS; +- struct fi_ibv_dgram_cq *cq; +- struct fi_ibv_domain *domain; +- +- cq = container_of(cq_fid, struct fi_ibv_dgram_cq, util_cq.cq_fid.fid); +- if (!cq) +- return -FI_EINVAL; +- +- domain = container_of(cq->util_cq.domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) +- return -FI_EINVAL; +- +- ret = ofi_cq_cleanup(&cq->util_cq); +- if (ret) +- return ret; +- +- if (ibv_destroy_cq(cq->ibv_cq)) { +- VERBS_WARN(FI_LOG_CQ, +- "unable to destroy completion queue " +- "(errno %d)\n", errno); +- ret = -errno; +- } +- +- free(cq); +- +- return ret; +-} +- +-static struct fi_ops fi_ibv_dgram_fi_ops = { +- .size = sizeof(fi_ibv_dgram_fi_ops), +- .close = fi_ibv_dgram_cq_close, +- .bind = fi_no_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static struct fi_ops_cq fi_ibv_dgram_cq_ops = { +- .size = sizeof(fi_ibv_dgram_cq_ops), +- .read = ofi_cq_read, +- .readfrom = ofi_cq_readfrom, +- .readerr = ofi_cq_readerr, +- .sread = ofi_cq_sread, +- .sreadfrom = ofi_cq_sreadfrom, +- .signal = ofi_cq_signal, +- .strerror = fi_ibv_dgram_cq_strerror +-}; +- +-int fi_ibv_dgram_cq_open(struct fid_domain *domain_fid, struct fi_cq_attr *attr, +- struct fid_cq **cq_fid, void *context) +-{ +- struct fi_ibv_dgram_cq *cq; +- struct fi_ibv_domain *domain; +- int ret; +- size_t cq_size; +- +- cq = calloc(1, sizeof(*cq)); +- if (!cq) +- return -FI_ENOMEM; +- +- domain = container_of(domain_fid, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain || (domain->ep_type != FI_EP_DGRAM)) { +- ret = -FI_EINVAL; +- goto err1; +- } +- +- assert(domain->ep_type == FI_EP_DGRAM); +- +- ret = ofi_cq_init(&fi_ibv_prov, domain_fid, attr, +- &cq->util_cq, &ofi_cq_progress, +- context); +- if (ret) +- goto err1; +- +- cq_size = attr->size ? +- attr->size : MIN(VERBS_DEF_CQ_SIZE, +- domain->info->domain_attr->cq_cnt); +- +- cq->ibv_cq = ibv_create_cq(domain->verbs, cq_size, cq, +- NULL, attr->signaling_vector); +- if (!cq->ibv_cq) { +- VERBS_WARN(FI_LOG_CQ, +- "unable to create completion queue for " +- "transsmission (errno %d)\n", errno); +- ret = -errno; +- goto err2; +- } +- +- *cq_fid = &cq->util_cq.cq_fid; +- (*cq_fid)->fid.ops = &fi_ibv_dgram_fi_ops; +- (*cq_fid)->ops = &fi_ibv_dgram_cq_ops; +- +- return ret; +-err2: +- ofi_cq_cleanup(&cq->util_cq); +-err1: +- free(cq); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep.c +deleted file mode 100644 +index 6bffba5a6..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep.c ++++ /dev/null +@@ -1,476 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-static int fi_ibv_dgram_ep_enable(struct fid_ep *ep_fid) +-{ +- struct fi_ibv_dgram_ep *ep; +- struct fi_ibv_dgram_cq *tx_cq = NULL, *rx_cq = NULL; +- struct fi_ibv_fabric *fab; +- int ret = FI_SUCCESS; +- union ibv_gid gid; +- uint16_t p_key; +- +- assert(ep_fid->fid.fclass == FI_CLASS_EP); +- if (ep_fid->fid.fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid); +- if (!ep) +- return -FI_EINVAL; +- +- if (!ep->util_ep.rx_cq && !ep->util_ep.tx_cq) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a send or receive completion queue\n"); +- return -FI_ENOCQ; +- } +- +- if (!ep->util_ep.tx_cq && ofi_send_allowed(ep->util_ep.caps)) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a send completion queue when it has transmit " +- "capabilities enabled (FI_SEND or FI_TRANSMIT).\n"); +- return -FI_ENOCQ; +- } else if (ep->util_ep.tx_cq) { +- tx_cq = container_of(&ep->util_ep.tx_cq->cq_fid, +- struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- } +- +- if (!ep->util_ep.rx_cq && ofi_recv_allowed(ep->util_ep.caps)) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a receive completion queue when it has receive " +- "capabilities enabled. (FI_RECV)\n"); +- return -FI_ENOCQ; +- } else { +- rx_cq = container_of(&ep->util_ep.rx_cq->cq_fid, +- struct fi_ibv_dgram_cq, +- util_cq.cq_fid); +- } +- +- const struct fi_info *info = ep->info; +- struct ibv_qp_init_attr init_attr = { +- .send_cq = tx_cq ? tx_cq->ibv_cq : NULL, +- .recv_cq = rx_cq ? rx_cq->ibv_cq : NULL, +- .cap = { +- .max_send_wr = info->tx_attr->size, +- .max_recv_wr = info->rx_attr->size, +- .max_send_sge = info->tx_attr->iov_limit, +- .max_recv_sge = info->rx_attr->iov_limit, +- .max_inline_data = info->tx_attr->inject_size, +- }, +- .qp_type = IBV_QPT_UD, +- }; +- +- ep->ibv_qp = ibv_create_qp(ep->domain->pd, &init_attr); +- if (!ep->ibv_qp) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to create IBV " +- "Queue Pair\n"); +- return -errno; +- } +- +- struct ibv_qp_attr attr = { +- .qp_state = IBV_QPS_INIT, +- .pkey_index = 0, +- .port_num = 1, +- .qkey = 0x11111111, +- }; +- +- ret = ibv_modify_qp(ep->ibv_qp, &attr, +- IBV_QP_STATE | +- IBV_QP_PKEY_INDEX | +- IBV_QP_PORT | +- IBV_QP_QKEY); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " +- "to INIT\n"); +- return -errno; +- } +- +- memset(&attr, 0, sizeof(attr)); +- attr.qp_state = IBV_QPS_RTR; +- ret = ibv_modify_qp(ep->ibv_qp, &attr, +- IBV_QP_STATE); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " +- "to RTR\n"); +- return -errno; +- } +- +- if (tx_cq) { +- memset(&attr, 0, sizeof(attr)); +- attr.qp_state = IBV_QPS_RTS; +- attr.sq_psn = 0xffffff; +- ret = ibv_modify_qp(ep->ibv_qp, &attr, +- IBV_QP_STATE | +- IBV_QP_SQ_PSN); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " +- "to RTS\n"); +- return -errno; +- } +- } +- +- if (ibv_query_gid(ep->domain->verbs, 1, 0, &gid)) { +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Unable to query GID, errno = %d", +- errno); +- return -errno; +- } +- +- if (ibv_query_pkey(ep->domain->verbs, 1, 0, &p_key)) { +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Unable to query P_Key, errno = %d", +- errno); +- return -errno; +- } +- +- struct ibv_port_attr port_attr; +- if (ibv_query_port(ep->domain->verbs, 1, &port_attr)) { +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Unable to query port attributes, errno = %d", +- errno); +- return -errno; +- } +- +- ep->ep_name.lid = port_attr.lid; +- ep->ep_name.sl = port_attr.sm_sl; +- ep->ep_name.gid = gid; +- ep->ep_name.qpn = ep->ibv_qp->qp_num; +- ep->ep_name.pkey = p_key; +- +- fab = container_of(&ep->util_ep.domain->fabric->fabric_fid, +- struct fi_ibv_fabric, util_fabric.fabric_fid.fid); +- +- ofi_ns_add_local_name(&fab->name_server, +- &ep->service, &ep->ep_name); +- +- return ret; +-} +- +-static int fi_ibv_dgram_ep_control(fid_t ep_fid, int command, void *arg) +-{ +- struct fi_ibv_dgram_ep *ep; +- +- assert(ep_fid->fclass == FI_CLASS_EP); +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- switch (command) { +- case FI_ENABLE: +- return fi_ibv_dgram_ep_enable(&ep->util_ep.ep_fid); +- default: +- return -FI_ENOSYS; +- } +-} +- +-static int fi_ibv_dgram_ep_close(fid_t ep_fid) +-{ +- struct fi_ibv_dgram_ep *ep; +- struct fi_ibv_fabric *fab; +- int ret = FI_SUCCESS; +- +- assert(ep_fid->fclass == FI_CLASS_EP); +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- fab = container_of(&ep->util_ep.domain->fabric->fabric_fid, +- struct fi_ibv_fabric, util_fabric.fabric_fid.fid); +- +- ofi_ns_del_local_name(&fab->name_server, +- &ep->service, &ep->ep_name); +- +- fi_ibv_dgram_pool_destroy(&ep->grh_pool); +- +- ret = ofi_endpoint_close(&ep->util_ep); +- if (ret) +- return ret; +- +- ret = ibv_destroy_qp(ep->ibv_qp); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to destroy QP " +- "(errno = %d)\n", errno); +- ret = -errno; +- } +- +- free(ep); +- return ret; +-} +- +-static int fi_ibv_dgram_ep_bind(fid_t ep_fid, struct fid *bfid, uint64_t flags) +-{ +- int ret = FI_SUCCESS; +- struct fi_ibv_dgram_ep *ep; +- struct fi_ibv_dgram_cq *cq; +- struct fi_ibv_dgram_av *av; +- struct fi_ibv_dgram_eq *eq; +- struct fi_ibv_dgram_cntr *cntr; +- +- assert(ep_fid->fclass == FI_CLASS_EP); +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- ret = ofi_ep_bind_valid(&fi_ibv_prov, bfid, flags); +- if (ret) +- return ret; +- +- switch (bfid->fclass) { +- case FI_CLASS_CQ: +- cq = container_of(bfid, struct fi_ibv_dgram_cq, +- util_cq.cq_fid.fid); +- if (!cq) +- return -FI_EINVAL; +- if (flags & (FI_RECV | FI_TRANSMIT)) +- ep->util_ep.progress = +- fi_ibv_dgram_send_recv_cq_progress; +- else if (flags & FI_RECV) +- ep->util_ep.progress = (ep->util_ep.tx_cq) ? +- fi_ibv_dgram_send_recv_cq_progress : +- fi_ibv_dgram_recv_cq_progress; +- else if (flags & FI_TRANSMIT) +- ep->util_ep.progress = (ep->util_ep.rx_cq) ? +- fi_ibv_dgram_send_recv_cq_progress : +- fi_ibv_dgram_send_cq_progress; +- return ofi_ep_bind_cq(&ep->util_ep, &cq->util_cq, flags); +- case FI_CLASS_EQ: +- eq = container_of(bfid, struct fi_ibv_dgram_eq, +- util_eq.eq_fid.fid); +- if (!eq) +- return -FI_EINVAL; +- return ofi_ep_bind_eq(&ep->util_ep, &eq->util_eq); +- break; +- case FI_CLASS_AV: +- av = container_of(bfid, struct fi_ibv_dgram_av, +- util_av.av_fid.fid); +- if (!av) +- return -FI_EINVAL; +- return ofi_ep_bind_av(&ep->util_ep, &av->util_av); +- case FI_CLASS_CNTR: +- cntr = container_of(bfid, struct fi_ibv_dgram_cntr, +- util_cntr.cntr_fid.fid); +- if (!cntr) +- return -FI_EINVAL; +- return ofi_ep_bind_cntr(&ep->util_ep, &cntr->util_cntr, flags); +- default: +- return -FI_EINVAL; +- } +- +- return ret; +-} +- +-static int fi_ibv_dgram_ep_setname(fid_t ep_fid, void *addr, size_t addrlen) +-{ +- struct fi_ibv_dgram_ep *ep; +- void *save_addr; +- int ret = FI_SUCCESS; +- +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- if (addrlen < ep->info->src_addrlen) { +- VERBS_INFO(FI_LOG_EP_CTRL, +- "addrlen expected: %"PRIu64", got: %"PRIu64"\n", +- ep->info->src_addrlen, addrlen); +- return -FI_ETOOSMALL; +- } +- /* +- * save previous address to be able make +- * a roll back on the previous one +- */ +- save_addr = ep->info->src_addr; +- +- ep->info->src_addr = calloc(1, ep->info->src_addrlen); +- if (!ep->info->src_addr) { +- ep->info->src_addr = save_addr; +- ret = -FI_ENOMEM; +- goto err; +- } +- +- memcpy(ep->info->src_addr, addr, ep->info->src_addrlen); +- memcpy(&ep->ep_name, addr, ep->info->src_addrlen); +- +-err: +- ep->info->src_addr = save_addr; +- return ret; +- +-} +- +-static int fi_ibv_dgram_ep_getname(fid_t ep_fid, void *addr, size_t *addrlen) +-{ +- struct fi_ibv_dgram_ep *ep; +- +- if (ep_fid->fclass != FI_CLASS_EP) +- return -FI_EINVAL; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, util_ep.ep_fid.fid); +- if (!ep) +- return -FI_EINVAL; +- +- if (*addrlen < sizeof(ep->ep_name)) { +- *addrlen = sizeof(ep->ep_name); +- VERBS_INFO(FI_LOG_EP_CTRL, +- "addrlen expected: %"PRIu64", got: %"PRIu64"\n", +- sizeof(ep->ep_name), *addrlen); +- return -FI_ETOOSMALL; +- } +- +- memset(addr, 0, *addrlen); +- memcpy(addr, &ep->ep_name, sizeof(ep->ep_name)); +- *addrlen = sizeof(ep->ep_name); +- +- return FI_SUCCESS; +-} +- +-static struct fi_ops fi_ibv_dgram_fi_ops = { +- .size = sizeof(fi_ibv_dgram_fi_ops), +- .close = fi_ibv_dgram_ep_close, +- .bind = fi_ibv_dgram_ep_bind, +- .control = fi_ibv_dgram_ep_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static struct fi_ops_cm fi_ibv_dgram_cm_ops = { +- .size = sizeof(fi_ibv_dgram_cm_ops), +- .setname = fi_ibv_dgram_ep_setname, +- .getname = fi_ibv_dgram_ep_getname, +- .getpeer = fi_no_getpeer, +- .connect = fi_no_connect, +- .listen = fi_no_listen, +- .accept = fi_no_accept, +- .reject = fi_no_reject, +- .shutdown = fi_no_shutdown, +- .join = fi_no_join, +-}; +- +-static struct fi_ops_ep fi_ibv_dgram_ep_ops = { +- .size = sizeof(fi_ibv_dgram_ep_ops), +- .cancel = fi_no_cancel, +- .getopt = fi_no_getopt, +- .setopt = fi_no_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-int fi_ibv_dgram_endpoint_open(struct fid_domain *domain_fid, +- struct fi_info *info, +- struct fid_ep **ep_fid, +- void *context) +-{ +- struct fi_ibv_dgram_ep *ep; +- int ret = FI_SUCCESS; +- +- assert(info && info->ep_attr && info->rx_attr && info->tx_attr); +- assert(domain_fid); +- assert(domain_fid->fid.fclass == FI_CLASS_DOMAIN); +- +- if (!info || !info->ep_attr || +- domain_fid->fid.fclass != FI_CLASS_DOMAIN) +- return -FI_EINVAL; +- +- ep = calloc(1, sizeof(*ep)); +- if (!ep) +- return -FI_ENOMEM; +- +- struct fi_ibv_dgram_pool_attr pool_attr = { +- .count = MIN(info->rx_attr->size, info->tx_attr->size), +- .size = VERBS_DGRAM_WR_ENTRY_SIZE, +- .pool_ctx = domain_fid, +- .cancel_hndlr = fi_ibv_dgram_pool_wr_entry_cancel, +- .alloc_hndlr = fi_ibv_dgram_mr_buf_reg, +- .free_hndlr = fi_ibv_dgram_mr_buf_close, +- }; +- +- ret = fi_ibv_dgram_pool_create(&pool_attr, &ep->grh_pool); +- if (ret) +- goto err1; +- +- /* Temporary solution */ +- struct fi_ibv_domain *domain; +- domain = container_of(domain_fid, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (!domain) { +- ret = -FI_EINVAL; +- goto err2; +- } +- +- ret = ofi_endpoint_init(domain_fid, &fi_ibv_util_prov, +- info, &ep->util_ep, context, NULL); +- if (ret) +- goto err2; +- +- ep->info = fi_dupinfo(info); +- if (!ep->info) { +- ret = -FI_ENOMEM; +- goto err3; +- } +- ep->domain = domain; +- ep->service = (info->src_addr) ? +- (((struct ofi_ib_ud_ep_name *)info->src_addr)->service) : +- (((getpid() & 0x7FFF) << 16) + ((uintptr_t)ep & 0xFFFF)); +- +- ofi_atomic_initialize32(&ep->unsignaled_send_cnt, 0); +- ep->max_unsignaled_send_cnt = ep->info->tx_attr->size / 2; +- +- *ep_fid = &ep->util_ep.ep_fid; +- (*ep_fid)->cm = &fi_ibv_dgram_cm_ops; +- (*ep_fid)->msg = &fi_ibv_dgram_msg_ops; +- (*ep_fid)->fid.ops = &fi_ibv_dgram_fi_ops; +- (*ep_fid)->ops = &fi_ibv_dgram_ep_ops; +- +- return ret; +-err3: +- ofi_endpoint_close(&ep->util_ep); +-err2: +- fi_ibv_dgram_pool_destroy(&ep->grh_pool); +-err1: +- free(ep); +- return ret; +-} +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep_msg.c +deleted file mode 100644 +index d35832ade..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_dgram/verbs_dgram_ep_msg.c ++++ /dev/null +@@ -1,337 +0,0 @@ +-/* +- * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "verbs_dgram.h" +- +-static inline +-void fi_ibv_dgram_recv_setup(struct fi_ibv_dgram_wr_entry *wr_entry, +- struct ibv_recv_wr *wr) +-{ +- struct fi_ibv_dgram_ep *ep = wr_entry->hdr.ep; +- +- if (fi_ibv_dgram_is_completion(ep->ep_flags, +- wr_entry->hdr.flags)) { +- wr_entry->hdr.suc_cb = fi_ibv_dgram_rx_cq_comp; +- wr_entry->hdr.err_cb = fi_ibv_dgram_rx_cq_report_error; +- } else { +- wr_entry->hdr.suc_cb = fi_ibv_dgram_rx_cq_no_action; +- wr_entry->hdr.err_cb = fi_ibv_dgram_rx_cq_no_action; +- +- fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- } +-} +- +-static inline ssize_t +-fi_ibv_dgram_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, +- uint64_t flags) +-{ +- struct fi_ibv_dgram_ep *ep; +- struct ibv_recv_wr wr = { 0 }; +- struct ibv_sge *sge; +- struct fi_ibv_dgram_wr_entry *wr_entry; +- ssize_t i; +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, +- util_ep.ep_fid.fid); +- assert(ep && ep->util_ep.rx_cq); +- +- wr_entry = (struct fi_ibv_dgram_wr_entry *) +- fi_ibv_dgram_wr_entry_get(&ep->grh_pool); +- if (OFI_UNLIKELY(!wr_entry)) +- return -FI_ENOMEM; +- +- wr_entry->hdr.ep = ep; +- wr_entry->hdr.context = msg->context; +- +- wr.wr_id = (uintptr_t)wr_entry; +- wr.next = NULL; +- +- sge = alloca(sizeof(*sge) * msg->iov_count + 1); +- sge[0].addr = (uintptr_t)(wr_entry->grh_buf); +- sge[0].length = VERBS_DGRAM_GRH_LENGTH; +- sge[0].lkey = (uint32_t)(uintptr_t)(wr_entry->hdr.desc); +- for (i = 0; i < msg->iov_count; i++) { +- sge[i + 1].addr = (uintptr_t)(msg->msg_iov[i].iov_base); +- sge[i + 1].length = (uint32_t)(msg->msg_iov[i].iov_len); +- sge[i + 1].lkey = (uint32_t)(uintptr_t)(msg->desc[i]); +- } +- wr.sg_list = sge; +- wr.num_sge = msg->iov_count + 1; +- +- fi_ibv_dgram_recv_setup(wr_entry, &wr); +- +- return FI_IBV_INVOKE_POST( +- recv, recv, ep->ibv_qp, &wr, +- (fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *) +- wr_entry))); +-} +- +-static inline ssize_t +-fi_ibv_dgram_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) +-{ +- struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_dgram_recvmsg(ep_fid, &msg, 0); +-} +- +-static inline ssize_t +-fi_ibv_dgram_recv(struct fid_ep *ep_fid, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = buf, +- .iov_len = len, +- }; +- +- return fi_ibv_dgram_recvv(ep_fid, &iov, &desc, +- 1, src_addr, context); +-} +- +-static inline +-void fi_ibv_dgram_send_setup(struct fi_ibv_dgram_wr_entry *wr_entry, +- struct ibv_send_wr *wr, +- size_t total_len) +-{ +- struct fi_ibv_dgram_ep *ep = wr_entry->hdr.ep; +- int32_t unsignaled_cnt = ofi_atomic_inc32(&ep->unsignaled_send_cnt) + 1; +- +- if (fi_ibv_dgram_is_completion(ep->ep_flags, +- wr_entry->hdr.flags)) { +- wr->send_flags |= IBV_SEND_SIGNALED; +- wr_entry->hdr.suc_cb = fi_ibv_dgram_tx_cq_comp; +- wr_entry->hdr.err_cb = fi_ibv_dgram_tx_cq_report_error; +- wr_entry->hdr.comp_unsignaled_cnt = unsignaled_cnt; +- } else if (unsignaled_cnt == ep->max_unsignaled_send_cnt) { +- wr->send_flags |= IBV_SEND_SIGNALED; +- wr_entry->hdr.suc_cb = fi_ibv_dgram_tx_cq_no_action; +- wr_entry->hdr.err_cb = fi_ibv_dgram_tx_cq_no_action; +- wr_entry->hdr.comp_unsignaled_cnt = unsignaled_cnt; +- } else { +- /* No need other actions */ +- fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry +- ); +- } +- +- if ((wr_entry->hdr.flags & FI_INJECT) && +- (total_len <= ep->info->tx_attr->inject_size)) +- wr->send_flags |= IBV_SEND_INLINE; +-} +- +-static inline ssize_t +-fi_ibv_dgram_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, +- uint64_t flags) +-{ +- struct fi_ibv_dgram_ep *ep; +- struct ibv_send_wr wr = { 0 }; +- struct ibv_sge *sge; +- struct fi_ibv_dgram_wr_entry *wr_entry = NULL; +- struct fi_ibv_dgram_av_entry *av_entry; +- struct fi_ibv_dgram_av *av; +- size_t total_len = 0, i; +- +- assert(!(flags & FI_FENCE)); +- +- ep = container_of(ep_fid, struct fi_ibv_dgram_ep, +- util_ep.ep_fid.fid); +- assert(ep && ep->util_ep.tx_cq); +- +- wr_entry = (struct fi_ibv_dgram_wr_entry *) +- fi_ibv_dgram_wr_entry_get(&ep->grh_pool); +- if (OFI_UNLIKELY(!wr_entry)) +- return -FI_ENOMEM; +- +- wr_entry->hdr.ep = ep; +- wr_entry->hdr.context = msg->context; +- wr_entry->hdr.flags = flags; +- +- sge = alloca(sizeof(*sge) * msg->iov_count + 1); +- sge[0].addr = (uintptr_t)(wr_entry->grh_buf); +- sge[0].length = 0; +- sge[0].lkey = (uint32_t)(uintptr_t)(wr_entry->hdr.desc); +- if (msg->desc) { +- for (i = 0; i < msg->iov_count; i++) { +- sge[i + 1].addr = (uintptr_t)(msg->msg_iov[i].iov_base); +- sge[i + 1].length = (uint32_t)(msg->msg_iov[i].iov_len); +- sge[i + 1].lkey = (uint32_t)(uintptr_t)(msg->desc[i]); +- total_len += msg->msg_iov[i].iov_len; +- } +- } else { +- for (i = 0; i < msg->iov_count; i++) { +- sge[i + 1].addr = (uintptr_t)(msg->msg_iov[i].iov_base); +- sge[i + 1].length = (uint32_t)(msg->msg_iov[i].iov_len); +- sge[i + 1].lkey = 0; +- total_len += msg->msg_iov[i].iov_len; +- } +- } +- +- wr.wr_id = (uintptr_t)wr_entry; +- wr.next = NULL; +- wr.sg_list = sge; +- wr.num_sge = msg->iov_count + 1; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- wr.opcode = IBV_WR_SEND_WITH_IMM; +- wr.imm_data = htonl((uint32_t)msg->data); +- } else { +- wr.opcode = IBV_WR_SEND; +- } +- +- av = container_of(&ep->util_ep.av->av_fid, struct fi_ibv_dgram_av, +- util_av.av_fid); +- av_entry = fi_ibv_dgram_av_lookup_av_entry(av, (int)msg->addr); +- if (OFI_UNLIKELY(!av_entry)) { +- fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *)wr_entry); +- return -FI_ENOENT; +- } +- +- wr.wr.ud.ah = av_entry->ah; +- wr.wr.ud.remote_qpn = av_entry->addr->qpn; +- wr.wr.ud.remote_qkey = 0x11111111; +- +- fi_ibv_dgram_send_setup(wr_entry, &wr, total_len); +- +- return FI_IBV_INVOKE_POST( +- send, send, ep->ibv_qp, &wr, +- ((wr.send_flags & IBV_SEND_SIGNALED) ? +- fi_ibv_dgram_wr_entry_release( +- &ep->grh_pool, +- (struct fi_ibv_dgram_wr_entry_hdr *) +- wr_entry) : +- NULL)); +-} +- +-static inline ssize_t +-fi_ibv_dgram_sendv(struct fid_ep *ep_fid, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t dest_addr, +- void *context) +-{ +- struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = dest_addr, +- .context = context, +- }; +- +- return fi_ibv_dgram_sendmsg(ep_fid, &msg, 0); +-} +- +-static inline ssize_t +-fi_ibv_dgram_senddata(struct fid_ep *ep_fid, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len, +- }; +- +- struct fi_msg msg = { +- .msg_iov = &iov, +- .desc = &desc, +- .iov_count = 1, +- .addr = dest_addr, +- .context = context, +- .data = data, +- }; +- +- return fi_ibv_dgram_sendmsg(ep_fid, &msg, FI_REMOTE_CQ_DATA); +-} +- +-static inline ssize_t +-fi_ibv_dgram_send(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len, +- }; +- +- return fi_ibv_dgram_sendv(ep_fid, &iov, &desc, +- 1, dest_addr, context); +-} +- +-static inline ssize_t +-fi_ibv_dgram_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr) +-{ +- struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len, +- }; +- +- struct fi_msg msg = { +- .msg_iov = &iov, +- .iov_count = 1, +- .addr = dest_addr, +- .data = data, +- }; +- +- return fi_ibv_dgram_sendmsg(ep_fid, &msg, FI_INJECT | +- FI_REMOTE_CQ_DATA); +-} +- +-static inline ssize_t +-fi_ibv_dgram_inject(struct fid_ep *ep_fid, const void *buf, +- size_t len, fi_addr_t dest_addr) +-{ +- return fi_ibv_dgram_injectdata(ep_fid, buf, len, 0, dest_addr); +-} +- +-struct fi_ops_msg fi_ibv_dgram_msg_ops = { +- .size = sizeof(fi_ibv_dgram_msg_ops), +- .recv = fi_ibv_dgram_recv, +- .recvv = fi_ibv_dgram_recvv, +- .recvmsg = fi_ibv_dgram_recvmsg, +- .send = fi_ibv_dgram_send, +- .sendv = fi_ibv_dgram_sendv, +- .sendmsg = fi_ibv_dgram_sendmsg, +- .inject = fi_ibv_dgram_inject, +- .senddata = fi_ibv_dgram_senddata, +- .injectdata = fi_ibv_dgram_injectdata, +-}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_av_ep_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_av_ep_rdm.c +deleted file mode 100644 +index 8e1926af1..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_av_ep_rdm.c ++++ /dev/null +@@ -1,701 +0,0 @@ +-/* +- * Copyright (c) 2013-2016 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +-#include +-#include +-#include +- +-#include "ofi.h" +- +-#include "verbs_rdm.h" +- +- +-extern struct fi_provider fi_ibv_prov; +- +-ssize_t +-fi_ibv_rdm_start_connection(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- struct rdma_cm_id *id = NULL; +- assert(ep->domain->rdm_cm->listener); +- +- if (conn->state != FI_VERBS_CONN_ALLOCATED) +- return FI_SUCCESS; +- +- if (ep->is_closing) { +- VERBS_INFO(FI_LOG_AV, +- "Attempt start connection with %s:%u when ep is closing\n", +- inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- return -FI_EOTHER; +- } +- +- conn->state = FI_VERBS_CONN_STARTED; +- fi_ibv_rdm_conn_init_cm_role(conn, ep); +- +- if (rdma_create_id(ep->domain->rdm_cm->ec, &id, conn, RDMA_PS_TCP)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_create_id\n", errno); +- return -errno; +- } +- +- if (conn->cm_role == FI_VERBS_CM_ACTIVE || +- conn->cm_role == FI_VERBS_CM_SELF) +- conn->id[0] = id; +- +- if (rdma_resolve_addr(id, NULL, (struct sockaddr *)&conn->addr, 30000)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_resolve_addr\n", errno); +- return -errno; +- } +- return FI_SUCCESS; +-} +- +-/* Must call with `rdm_cm::cm_lock` held */ +-ssize_t fi_ibv_rdm_start_overall_disconnection(struct fi_ibv_rdm_av_entry *av_entry) +-{ +- struct fi_ibv_rdm_conn *conn = NULL, *tmp = NULL; +- ssize_t ret = FI_SUCCESS; +- ssize_t err = FI_SUCCESS; +- +- HASH_ITER(hh, av_entry->conn_hash, conn, tmp) { +- ret = fi_ibv_rdm_start_disconnection(conn); +- if (ret) { +- VERBS_INFO(FI_LOG_AV, "Disconnection failed " +- "(%zd) for %p\n", ret, conn); +- err = ret; +- } +- /* +- * do NOT remove entry of connection from HASH. +- * We will refer to the connection during +- * cleanup of the connections. +- */ +- } +- +- return err; +-} +- +-ssize_t fi_ibv_rdm_start_disconnection(struct fi_ibv_rdm_conn *conn) +-{ +- ssize_t ret = FI_SUCCESS; +- +- VERBS_INFO(FI_LOG_AV, "Closing connection %p, state %d\n", +- conn, conn->state); +- +- if (conn->id[0]) { +- if (rdma_disconnect(conn->id[0])) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_disconnect\n", errno); +- ret = -errno; +- } +- } +- +- switch (conn->state) { +- case FI_VERBS_CONN_ESTABLISHED: +- conn->state = FI_VERBS_CONN_LOCAL_DISCONNECT; +- break; +- case FI_VERBS_CONN_REJECTED: +- conn->state = FI_VERBS_CONN_CLOSED; +- break; +- case FI_VERBS_CONN_ALLOCATED: +- case FI_VERBS_CONN_CLOSED: +- break; +- default: +- VERBS_WARN(FI_LOG_EP_CTRL, "Unknown connection state: %d\n", +- (int)conn->state); +- ret = -FI_EOTHER; +- } +- +- return ret; +-} +- +-static inline int fi_ibv_rdm_av_is_valid_address(struct sockaddr_in *addr) +-{ +- return addr->sin_family == AF_INET ? 1 : 0; +-} +- +-int fi_ibv_av_entry_alloc(struct fi_ibv_domain *domain, +- struct fi_ibv_rdm_av_entry **av_entry, +- void *addr) +-{ +- int ret = ofi_memalign((void**)av_entry, +- FI_IBV_MEM_ALIGNMENT, +- sizeof (**av_entry)); +- if (ret) +- return -ret; +- memset((*av_entry), 0, sizeof(**av_entry)); +- memcpy(&(*av_entry)->addr, addr, FI_IBV_RDM_DFLT_ADDRLEN); +- HASH_ADD(hh, domain->rdm_cm->av_hash, addr, +- FI_IBV_RDM_DFLT_ADDRLEN, (*av_entry)); +- (*av_entry)->sends_outgoing = 0; +- (*av_entry)->recv_preposted = 0; +- +- return ret; +-} +- +-static int fi_ibv_rdm_av_insert(struct fid_av *av_fid, const void *addr, +- size_t count, fi_addr_t * fi_addr, +- uint64_t flags, void *context) +-{ +- struct fi_ibv_av *av = container_of(av_fid, struct fi_ibv_av, av_fid); +- size_t i; +- int failed = 0; +- int ret = 0; +- int *fi_errors = context; +- +- if((av->flags & FI_EVENT) && !av->eq) +- return -FI_ENOEQ; +- +- if ((flags & FI_SYNC_ERR) && ((!context) || (flags & FI_EVENT))) +- return -FI_EINVAL; +- else if (flags & FI_SYNC_ERR) +- memset(context, 0, sizeof(int) * count); +- +- pthread_mutex_lock(&av->domain->rdm_cm->cm_lock); +- +- if (av->used + count > av->count) { +- const size_t new_av_count = av->used + count; +- if (av->type == FI_AV_TABLE) { +- void *p = realloc(av->domain->rdm_cm->av_table, +- (new_av_count * +- sizeof(*av->domain->rdm_cm->av_table))); +- if (p) { +- av->domain->rdm_cm->av_table = p; +- } +- else { +- ret = -FI_ENOMEM; +- goto out; +- } +- } +- av->count = new_av_count; +- } +- +- for (i = 0; i < count; i++) { +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- void *addr_i = (uint8_t *) addr + +- i * FI_IBV_RDM_DFLT_ADDRLEN; +- +- if (flags & FI_SYNC_ERR) +- fi_errors[i] = FI_SUCCESS; +- +- if (!fi_ibv_rdm_av_is_valid_address(addr_i)) { +- if (fi_addr) +- fi_addr[i] = FI_ADDR_NOTAVAIL; +- +- VERBS_INFO(FI_LOG_AV, +- "fi_av_insert: bad addr #%zu\n", i); +- +- if (av->flags & FI_EVENT) { +- /* due to limited functionality of +- * verbs EQ notify last failed element +- * only. */ +- /* TODO: what about utils EQ? */ +- struct fi_eq_err_entry err = { +- .fid = &av->av_fid.fid, +- .context = context, +- .data = i, +- .err = FI_EINVAL, +- .prov_errno = FI_EINVAL +- }; +- av->eq->err = err; +- } else if (flags & FI_SYNC_ERR) { +- fi_errors[i] = -FI_EADDRNOTAVAIL; +- } +- +- failed++; +- continue; +- } +- +- HASH_FIND(hh, av->domain->rdm_cm->av_hash, addr_i, +- FI_IBV_RDM_DFLT_ADDRLEN, av_entry); +- +- if (!av_entry) { +- /* If addr_i is not found in HASH then we malloc it. +- * It could be found if the connection was initiated +- * by the remote side. +- */ +- ret = fi_ibv_av_entry_alloc(av->domain, &av_entry, addr_i); +- if (ret) +- goto out; +- } +- +- switch (av->type) { +- case FI_AV_MAP: +- if (fi_addr) +- fi_addr[i] = (uintptr_t) (void *) av_entry; +- break; +- case FI_AV_TABLE: +- if (fi_addr) +- fi_addr[i] = av->used; +- av->domain->rdm_cm->av_table[av->used] = av_entry; +- break; +- default: +- assert(0); +- break; +- } +- +- VERBS_INFO(FI_LOG_AV, +- "fi_av_insert: addr %s:%u; av_entry - %p\n", +- inet_ntoa(av_entry->addr.sin_addr), +- ntohs(av_entry->addr.sin_port), av_entry); +- +- av->used++; +- } +- ret = count - failed; +- +- if (av->flags & FI_EVENT) { +- struct fi_eq_entry entry = { +- .fid = &av->av_fid.fid, +- .context = context, +- .data = count - failed +- }; +- fi_ibv_eq_write_event( +- av->eq, FI_AV_COMPLETE, &entry, sizeof(entry)); +- } +- +-out: +- pthread_mutex_unlock(&av->domain->rdm_cm->cm_lock); +- return (av->flags & FI_EVENT) ? FI_SUCCESS : ret; +-} +- +-static int fi_ibv_rdm_av_insertsvc(struct fid_av *av_fid, const char *node, +- const char *service, fi_addr_t *fi_addr, +- uint64_t flags, void *context) +-{ +- struct addrinfo addrinfo_hints; +- struct addrinfo *result = NULL; +- int ret; +- +- if (!node || !service) { +- VERBS_WARN(FI_LOG_AV, "fi_av_insertsvc: %s provided\n", +- (!node ? (!service ? "node and service weren't" : +- "node wasn't") : +- ("service wasn't"))); +- return -FI_EINVAL; +- } +- +- struct fi_ibv_av *av = container_of(av_fid, struct fi_ibv_av, av_fid); +- +- memset(&addrinfo_hints, 0, sizeof(addrinfo_hints)); +- addrinfo_hints.ai_family = AF_INET; +- ret = getaddrinfo(node, service, &addrinfo_hints, &result); +- if (ret) { +- if ((av->flags & FI_EVENT) && (av->eq)) { +- struct fi_eq_entry entry = { +- .fid = &av->av_fid.fid, +- .context = context, +- .data = 0 +- }; +- struct fi_eq_err_entry err = { +- .fid = &av->av_fid.fid, +- .context = context, +- .data = 0, +- .err = FI_EINVAL, +- .prov_errno = FI_EINVAL +- }; +- av->eq->err = err; +- +- fi_ibv_eq_write_event( +- av->eq, FI_AV_COMPLETE, +- &entry, sizeof(entry)); +- } +- return -ret; +- } +- +- ret = fi_ibv_rdm_av_insert(av_fid, (struct sockaddr_in *)result->ai_addr, +- 1, fi_addr, flags, context); +- freeaddrinfo(result); +- return ret; +-} +- +-static int fi_ibv_rdm_av_insertsym(struct fid_av *av, const char *node, +- size_t nodecnt, const char *service, +- size_t svccnt, fi_addr_t *fi_addr, +- uint64_t flags, void *context) +-{ +- int ret = 0, success = 0, err_code = 0; +- int var_port, var_host, len_port, len_host; +- char base_host[FI_NAME_MAX] = {0}; +- char tmp_host[FI_NAME_MAX] = {0}; +- char tmp_port[FI_NAME_MAX] = {0}; +- int hostlen, offset = 0, fmt; +- size_t i, j; +- +- if (!node || !service || node[0] == '\0') { +- VERBS_WARN(FI_LOG_AV, "fi_av_insertsym: %s provided\n", +- (!service ? (!node ? "node and service weren't" : +- "service wasn't") : +- ("node wasn't"))); +- return -FI_EINVAL; +- } +- +- hostlen = strlen(node); +- while (isdigit(*(node + hostlen - (offset + 1)))) +- offset++; +- +- if (*(node + hostlen - offset) == '.') +- fmt = 0; +- else +- fmt = offset; +- +- assert((hostlen-offset) < FI_NAME_MAX); +- strncpy(base_host, node, hostlen - (offset)); +- var_port = atoi(service); +- var_host = atoi(node + hostlen - offset); +- +- for (i = 0; i < nodecnt; i++) { +- for (j = 0; j < svccnt; j++) { +- int check_host = 0, check_port = 0; +- +- len_host = snprintf(tmp_host, FI_NAME_MAX, "%s%0*d", +- base_host, fmt, +- var_host + (int)i); +- len_port = snprintf(tmp_port, FI_NAME_MAX, "%d", +- var_port + (int)j); +- +- check_host = (len_host > 0 && len_host < FI_NAME_MAX); +- check_port = (len_port > 0 && len_port < FI_NAME_MAX); +- +- if (check_port && check_host) { +- ret = fi_ibv_rdm_av_insertsvc(av, tmp_host, +- tmp_port, fi_addr, +- flags, context); +- if (ret == 1) +- success++; +- else +- err_code = ret; +- } else { +- VERBS_WARN(FI_LOG_AV, +- "fi_av_insertsym: %s is invalid\n", +- (!check_port ? +- (!check_host ? +- "node and service weren't" : +- "service wasn't") : +- ("node wasn't"))); +- err_code = FI_ETOOSMALL; +- } +- } +- } +- return ((success > 0) ? success : err_code); +-} +- +-static int fi_ibv_rdm_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, +- void *addr, size_t *addrlen) +-{ +- struct fi_ibv_av *av = container_of(av_fid, struct fi_ibv_av, av_fid); +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- +- if (fi_addr == FI_ADDR_NOTAVAIL) +- return -FI_EINVAL; +- +- if (av->type == FI_AV_MAP) +- av_entry = (struct fi_ibv_rdm_av_entry *) fi_addr; +- else /* (av->type == FI_AV_TABLE) */ +- av_entry = av->domain->rdm_cm->av_table[fi_addr]; +- +- memcpy(addr, &av_entry->addr, MIN(*addrlen, sizeof(av_entry->addr))); +- *addrlen = sizeof(av_entry->addr); +- +- return 0; +-} +- +-static int fi_ibv_rdm_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, +- size_t count, uint64_t flags) +-{ +- struct fi_ibv_av *av = container_of(av_fid, struct fi_ibv_av, av_fid); +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- int ret = FI_SUCCESS; +- int err = FI_SUCCESS; +- size_t i; +- +- if(av->flags & FI_EVENT && !av->eq) +- return -FI_ENOEQ; +- +- if (!fi_addr || (av->type != FI_AV_MAP && av->type != FI_AV_TABLE)) +- return -FI_EINVAL; +- +- pthread_mutex_lock(&av->domain->rdm_cm->cm_lock); +- for (i = 0; i < count; i++) { +- +- if (fi_addr[i] == FI_ADDR_NOTAVAIL) +- continue; +- +- if (av->type == FI_AV_MAP) +- av_entry = (struct fi_ibv_rdm_av_entry *)fi_addr[i]; +- else /* (av->type == FI_AV_TABLE) */ +- av_entry = av->domain->rdm_cm->av_table[fi_addr[i]]; +- +- VERBS_INFO(FI_LOG_AV, "av_remove conn - %p; addr %s:%u\n", +- av_entry, inet_ntoa(av_entry->addr.sin_addr), +- ntohs(av_entry->addr.sin_port)); +- +- err = fi_ibv_rdm_start_overall_disconnection(av_entry); +- ret = (ret == FI_SUCCESS) ? err : ret; +- /* do not destroy connection here because we may +- * get WC for this connection. just move connection +- * to list of av-removed objects to clean later */ +- +- /* TODO: add cleaning into av_insert */ +- HASH_DEL(av->domain->rdm_cm->av_hash, av_entry); +- slist_insert_tail(&av_entry->removed_next, +- &av->domain->rdm_cm->av_removed_entry_head); +- } +- pthread_mutex_unlock(&av->domain->rdm_cm->cm_lock); +- return ret; +-} +- +-static const char *fi_ibv_rdm_av_straddr(struct fid_av *av, const void *addr, +- char *buf, size_t *len) +-{ +- return ofi_straddr(buf, len, FI_SOCKADDR, addr); +-} +- +-static struct fi_ops_av fi_ibv_rdm_av_ops = { +- .size = sizeof(struct fi_ops_av), +- .insert = fi_ibv_rdm_av_insert, +- .insertsvc = fi_ibv_rdm_av_insertsvc, +- .insertsym = fi_ibv_rdm_av_insertsym, +- .remove = fi_ibv_rdm_av_remove, +- .lookup = fi_ibv_rdm_av_lookup, +- .straddr = fi_ibv_rdm_av_straddr, +-}; +- +-struct fi_ops_av *fi_ibv_rdm_set_av_ops(void) +-{ +- return &fi_ibv_rdm_av_ops; +-} +- +-static int fi_ibv_rdm_av_close(fid_t fid) +-{ +- struct fi_ibv_av *av = container_of(fid, struct fi_ibv_av, av_fid.fid); +- free(av); +- return 0; +-} +- +-static struct fi_ops fi_ibv_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_rdm_av_close, +- .bind = fi_no_bind, +-}; +- +-static inline struct fi_ibv_rdm_av_entry * +-fi_ibv_rdm_av_tbl_idx_to_av_entry(struct fi_ibv_rdm_ep *ep, fi_addr_t addr) +-{ +- return (addr == FI_ADDR_UNSPEC) ? NULL : +- ep->domain->rdm_cm->av_table[addr]; +-} +- +-static inline struct fi_ibv_rdm_av_entry * +-fi_ibv_rdm_av_map_addr_to_av_entry(struct fi_ibv_rdm_ep *ep, fi_addr_t addr) +-{ +- return (struct fi_ibv_rdm_av_entry *) +- (addr == FI_ADDR_UNSPEC ? NULL : (void *)(uintptr_t)addr); +-} +- +-static inline fi_addr_t +-fi_ibv_rdm_av_entry_to_av_tbl_idx(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_av_entry *av_entry) +-{ +- size_t i; +- +- for (i = 0; i < ep->av->used; i++) { +- if (ep->domain->rdm_cm->av_table[i] == av_entry) { +- return i; +- } +- } +- +- return FI_ADDR_UNSPEC; +-} +- +-static inline fi_addr_t +-fi_ibv_rdm_av_entry_to_av_map_addr(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_av_entry *av_entry) +-{ +- return (av_entry == NULL) ? FI_ADDR_UNSPEC : +- (fi_addr_t)(uintptr_t)av_entry; +-} +- +-static inline fi_addr_t +-fi_ibv_rdm_conn_to_av_tbl_idx(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- if (conn == NULL) +- return FI_ADDR_UNSPEC; +- return fi_ibv_rdm_av_entry_to_av_tbl_idx(ep, conn->av_entry); +-} +- +-static inline fi_addr_t +-fi_ibv_rdm_conn_to_av_map_addr(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- return fi_ibv_rdm_av_entry_to_av_map_addr(ep, conn->av_entry); +-} +- +-/* Must call with `rdm_cm::cm_lock` held */ +-static inline struct fi_ibv_rdm_conn * +-fi_ibv_rdm_conn_entry_alloc(struct fi_ibv_rdm_av_entry *av_entry, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn; +- +- if (ofi_memalign((void**) &conn, +- FI_IBV_MEM_ALIGNMENT, +- sizeof(*conn))) +- return NULL; +- memset(conn, 0, sizeof(*conn)); +- memcpy(&conn->addr, &av_entry->addr, +- FI_IBV_RDM_DFLT_ADDRLEN); +- conn->ep = ep; +- conn->av_entry = av_entry; +- conn->state = FI_VERBS_CONN_ALLOCATED; +- dlist_init(&conn->postponed_requests_head); +- HASH_ADD(hh, av_entry->conn_hash, ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- +- /* Initiates connection to the peer */ +- fi_ibv_rdm_start_connection(ep, conn); +- +- return conn; +-} +- +-static inline struct fi_ibv_rdm_conn * +-fi_ibv_rdm_av_map_addr_to_conn_add_new_conn(struct fi_ibv_rdm_ep *ep, +- fi_addr_t addr) +-{ +- struct fi_ibv_rdm_av_entry *av_entry = +- fi_ibv_rdm_av_map_addr_to_av_entry(ep, addr); +- if (av_entry) { +- struct fi_ibv_rdm_conn *conn; +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, +- &ep, sizeof(struct fi_ibv_rdm_ep *), conn); +- if (OFI_UNLIKELY(!conn)) +- conn = fi_ibv_rdm_conn_entry_alloc(av_entry, ep); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- return conn; +- } +- +- return NULL; +-} +- +-static inline struct fi_ibv_rdm_conn * +-fi_ibv_rdm_av_tbl_idx_to_conn_add_new_conn(struct fi_ibv_rdm_ep *ep, +- fi_addr_t addr) +-{ +- struct fi_ibv_rdm_av_entry *av_entry = +- fi_ibv_rdm_av_tbl_idx_to_av_entry(ep, addr); +- if (av_entry) { +- struct fi_ibv_rdm_conn *conn; +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, +- &ep, sizeof(struct fi_ibv_rdm_ep *), conn); +- if (OFI_UNLIKELY(!conn)) +- conn = fi_ibv_rdm_conn_entry_alloc(av_entry, ep); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- return conn; +- } +- +- return NULL; +-} +- +-int fi_ibv_rdm_av_open(struct fid_domain *domain, struct fi_av_attr *attr, +- struct fid_av **av_fid, void *context) +-{ +- struct fi_ibv_domain *fid_domain; +- struct fi_ibv_av *av; +- size_t count = 64; +- +- fid_domain = container_of(domain, struct fi_ibv_domain, util_domain.domain_fid); +- +- if (!attr) +- return -FI_EINVAL; +- +- if (attr->name) { +- VERBS_WARN(FI_LOG_AV, +- "Shared AV is not implemented\n"); +- return -FI_ENOSYS; +- } +- +- switch (attr->type) { +- case FI_AV_UNSPEC: +- attr->type = FI_AV_MAP; +- case FI_AV_MAP: +- case FI_AV_TABLE: +- break; +- default: +- return -EINVAL; +- } +- +- if (attr->count) +- count = attr->count; +- +- av = calloc(1, sizeof *av); +- if (!av) +- return -ENOMEM; +- +- assert(fid_domain->ep_type == FI_EP_RDM); +- av->domain = fid_domain; +- av->type = attr->type; +- av->count = count; +- av->flags = attr->flags; +- av->used = 0; +- +- if (av->type == FI_AV_TABLE && av->count > 0) { +- av->domain->rdm_cm->av_table = +- calloc(av->count, +- sizeof(*av->domain->rdm_cm->av_table)); +- if (!av->domain->rdm_cm->av_table) { +- free(av); +- return -ENOMEM; +- } +- } +- +- if (av->type == FI_AV_MAP) { +- av->addr_to_av_entry = fi_ibv_rdm_av_map_addr_to_av_entry; +- av->av_entry_to_addr = fi_ibv_rdm_av_entry_to_av_map_addr; +- av->addr_to_conn = fi_ibv_rdm_av_map_addr_to_conn_add_new_conn; +- av->conn_to_addr = fi_ibv_rdm_conn_to_av_map_addr; +- } else /* if (av->type == FI_AV_TABLE) */ { +- av->addr_to_av_entry = fi_ibv_rdm_av_tbl_idx_to_av_entry; +- av->av_entry_to_addr = fi_ibv_rdm_av_entry_to_av_tbl_idx; +- av->addr_to_conn = fi_ibv_rdm_av_tbl_idx_to_conn_add_new_conn; +- av->conn_to_addr = fi_ibv_rdm_conn_to_av_tbl_idx; +- } +- +- av->av_fid.fid.fclass = FI_CLASS_AV; +- av->av_fid.fid.context = context; +- av->av_fid.fid.ops = &fi_ibv_fi_ops; +- +- av->av_fid.ops = fi_ibv_rdm_set_av_ops(); +- +- *av_fid = &av->av_fid; +- return 0; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_cq_ep_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_cq_ep_rdm.c +deleted file mode 100644 +index e73199f76..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_cq_ep_rdm.c ++++ /dev/null +@@ -1,364 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +- +-#include +-#include +-#include "../fi_verbs.h" +-#include "verbs_queuing.h" +- +-static ssize_t fi_ibv_rdm_tagged_cq_readfrom(struct fid_cq *cq, void *buf, +- size_t count, fi_addr_t * src_addr) +-{ +- struct fi_ibv_rdm_cq *_cq = +- container_of(cq, struct fi_ibv_rdm_cq, cq_fid); +- size_t ret = 0; +- struct fi_ibv_rdm_request *cq_entry = +- count ? fi_ibv_rdm_take_first_from_cq(_cq) : NULL;; +- +- for ( ; cq_entry; cq_entry = (ret < count) ? +- fi_ibv_rdm_take_first_from_cq(_cq) : NULL) { +- VERBS_DBG(FI_LOG_CQ, +- "\t\t-> found in ready: %p op_ctx %p, len %lu, tag 0x%" PRIx64 "\n", +- cq_entry, cq_entry->context, cq_entry->len, +- cq_entry->minfo.tag); +- +- src_addr[ret] = +- _cq->ep->av->conn_to_addr(_cq->ep, cq_entry->minfo.conn); +- _cq->read_entry(cq_entry, ret, buf); +- +- if (cq_entry->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", cq_entry, +- FI_LOG_DEBUG); +- util_buf_release( +- cq_entry->ep->fi_ibv_rdm_request_pool, +- cq_entry); +- } else { +- cq_entry->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- ret++; +- } +- +- if (ret == 0) { +- if (fi_ibv_rdm_tagged_poll(_cq->ep) < 0) +- VERBS_INFO(FI_LOG_CQ, "fi_ibv_rdm_tagged_poll failed\n"); +- if (!dlist_empty(&_cq->request_errcq)) +- ret = -FI_EAVAIL; +- } +- +- return !ret ? -FI_EAGAIN : ret; +-} +- +-static ssize_t fi_ibv_rdm_tagged_cq_read(struct fid_cq *cq, void *buf, +- size_t count) +-{ +- struct fi_ibv_rdm_cq *_cq = +- container_of(cq, struct fi_ibv_rdm_cq, cq_fid); +- const size_t _count = _cq->read_bunch_size; +- fi_addr_t addr[_count]; +- +- return fi_ibv_rdm_tagged_cq_readfrom(cq, buf, MIN(_count, count), addr); +-} +- +-static ssize_t fi_ibv_rdm_cq_sreadfrom(struct fid_cq *cq, void *buf, +- size_t count, fi_addr_t *src_addr, +- const void *cond, int timeout) +-{ +- size_t threshold = count; +- uint64_t time_limit = +- ((timeout < 0) ? SIZE_MAX : (fi_gettime_ms() + timeout)); +- size_t counter = 0; +- ssize_t ret = 0; +- struct fi_ibv_rdm_cq *_cq = container_of(cq, struct fi_ibv_rdm_cq, +- cq_fid); +- switch (_cq->wait_cond) { +- case FI_CQ_COND_THRESHOLD: +- threshold = MIN((uintptr_t) cond, threshold); +- case FI_CQ_COND_NONE: +- break; +- default: +- assert(0); +- return -FI_EOTHER; +- } +- +- do { +- ret = fi_ibv_rdm_tagged_cq_readfrom(cq, +- ((char *)buf + +- (counter * _cq->entry_size)), +- threshold - counter, +- src_addr); +- counter += (ret > 0) ? ret : 0; +- } while ((ret >= 0 || ret == -FI_EAGAIN) && +- (counter < threshold) && +- (fi_gettime_ms() < time_limit)); +- +- if (counter != 0 && ret >= 0) { +- ret = counter; +- } else if (ret == 0) { +- ret = -FI_EAGAIN; +- } +- +- return ret; +-} +- +-static ssize_t fi_ibv_rdm_cq_sread(struct fid_cq *cq, void *buf, size_t count, +- const void *cond, int timeout) +-{ +- struct fi_ibv_rdm_cq *_cq = +- container_of(cq, struct fi_ibv_rdm_cq, cq_fid); +- size_t chunk = MIN(_cq->read_bunch_size, count); +- uint64_t time_limit = fi_gettime_ms() + timeout; +- size_t rest = count; +- fi_addr_t addr[chunk]; +- ssize_t ret; +- +- do { +- ret = fi_ibv_rdm_cq_sreadfrom(cq, buf, chunk, addr, cond, +- timeout); +- if (ret > 0) { +- rest -= ret; +- chunk = MIN(chunk, rest); +- } +- } while (((ret >=0) && (rest != 0)) || +- (timeout >= 0 && fi_gettime_ms() < time_limit)); +- +- return (count != rest) ? (count - rest) : ret; +-} +- +-static const char * +-fi_ibv_rdm_cq_strerror(struct fid_cq *eq, int prov_errno, const void *err_data, +- char *buf, size_t len) +-{ +- /* TODO: */ +- if (buf && len) +- strncpy(buf, ibv_wc_status_str(prov_errno), len); +- return ibv_wc_status_str(prov_errno); +-} +- +-static ssize_t +-fi_ibv_rdm_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *entry, +- uint64_t flags) +-{ +- ssize_t ret = 0; +- uint32_t api_version; +- struct fi_ibv_rdm_cq *cq = +- container_of(cq_fid, struct fi_ibv_rdm_cq, cq_fid.fid); +- +- struct fi_ibv_rdm_request *err_request = +- fi_ibv_rdm_take_first_from_errcq(cq); +- +- if (err_request) { +- entry->op_context = err_request->context; +- entry->flags = (err_request->comp_flags & ~FI_COMPLETION); +- entry->len = err_request->len; +- entry->buf = err_request->unexp_rbuf; +- entry->data = err_request->imm; +- entry->tag = err_request->minfo.tag; +- entry->olen = -1; /* TODO: */ +- entry->err = err_request->state.err; +- entry->prov_errno = -err_request->state.err; +- +- api_version = cq->domain->util_domain.fabric->fabric_fid.api_version; +- +- if (!entry->err_data_size) +- entry->err_data = NULL; +- else if (FI_VERSION_GE(api_version, FI_VERSION(1, 5))) +- entry->err_data_size = 0; +- +- if (err_request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", err_request, +- FI_LOG_DEBUG); +- util_buf_release( +- err_request->ep->fi_ibv_rdm_request_pool, +- err_request); +- } else { +- err_request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- ret++; +- } else { +- return -FI_EAGAIN; +- } +- +- return ret; +-} +- +-static struct fi_ops_cq fi_ibv_rdm_cq_ops = { +- .size = sizeof(struct fi_ops_cq), +- .read = fi_ibv_rdm_tagged_cq_read, +- .readfrom = fi_ibv_rdm_tagged_cq_readfrom, +- .readerr = fi_ibv_rdm_cq_readerr, +- .sread = fi_ibv_rdm_cq_sread, +- .sreadfrom = fi_ibv_rdm_cq_sreadfrom, +- .strerror = fi_ibv_rdm_cq_strerror +-}; +- +-static int fi_ibv_rdm_cq_close(fid_t fid) +-{ +- struct fi_ibv_rdm_cq *cq = +- container_of(fid, struct fi_ibv_rdm_cq, cq_fid.fid); +- +- if(cq->ep) { +- return -FI_EBUSY; +- } +- +- /* TODO: move queues & related pools cleanup from close EP */ +- /* fi_ibv_rdm_clean_queues(); */ +- +- free(cq); +- +- return FI_SUCCESS; +-} +- +-static struct fi_ops fi_ibv_rdm_cq_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_rdm_cq_close, +- .bind = fi_no_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static void fi_ibv_rdm_cq_read_context_entry(struct fi_ibv_rdm_request *cq_entry, +- int i, void *buf) +-{ +- struct fi_cq_entry *entry = buf; +- +- entry[i].op_context = cq_entry->context; +-} +- +-static void fi_ibv_rdm_cq_read_msg_entry(struct fi_ibv_rdm_request *cq_entry, +- int i, void *buf) +-{ +- struct fi_cq_msg_entry *entry = buf; +- +- entry[i].op_context = cq_entry->context; +- entry[i].flags = (cq_entry->comp_flags & ~FI_COMPLETION); +- entry[i].len = cq_entry->len; +-} +- +-static void fi_ibv_rdm_cq_read_data_entry(struct fi_ibv_rdm_request *cq_entry, +- int i, void *buf) +-{ +- struct fi_cq_data_entry *entry = buf; +- +- entry[i].op_context = cq_entry->context; +- entry[i].flags = (cq_entry->comp_flags & ~FI_COMPLETION); +- entry[i].len = cq_entry->len; +- entry[i].buf = (cq_entry->comp_flags & FI_TRANSMIT) ? +- cq_entry->src_addr : cq_entry->dest_buf; +- entry[i].data = cq_entry->imm; +-} +- +-static void fi_ibv_rdm_cq_read_tagged_entry(struct fi_ibv_rdm_request *cq_entry, +- int i, void *buf) +-{ +- struct fi_cq_tagged_entry *entry = buf; +- +- entry[i].op_context = cq_entry->context; +- entry[i].flags = (cq_entry->comp_flags & ~FI_COMPLETION); +- entry[i].len = cq_entry->len; +- entry[i].buf = (cq_entry->comp_flags & FI_TRANSMIT) ? +- cq_entry->src_addr : cq_entry->dest_buf; +- entry[i].data = cq_entry->imm; +- entry[i].tag = cq_entry->minfo.tag; +-} +- +-int fi_ibv_rdm_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq, void *context) +-{ +- struct fi_ibv_rdm_cq *_cq; +- int ret; +- +- _cq = calloc(1, sizeof *_cq); +- if (!_cq) +- return -FI_ENOMEM; +- +- _cq->domain = container_of(domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- assert(_cq->domain->ep_type == FI_EP_RDM); +- +- switch (attr->wait_obj) { +- case FI_WAIT_NONE: +- case FI_WAIT_UNSPEC: +- break; +- case FI_WAIT_SET: +- case FI_WAIT_FD: +- case FI_WAIT_MUTEX_COND: +- default: +- assert(0); +- ret = -FI_ENOSYS; +- goto err; +- } +- +- _cq->flags |= attr->flags; +- _cq->wait_cond = attr->wait_cond; +- _cq->cq_fid.fid.fclass = FI_CLASS_CQ; +- _cq->cq_fid.fid.context = context; +- _cq->cq_fid.fid.ops = &fi_ibv_rdm_cq_fi_ops; +- _cq->cq_fid.ops = &fi_ibv_rdm_cq_ops; +- +- switch (attr->format) { +- case FI_CQ_FORMAT_CONTEXT: +- _cq->entry_size = sizeof(struct fi_cq_entry); +- _cq->read_entry = fi_ibv_rdm_cq_read_context_entry; +- break; +- case FI_CQ_FORMAT_MSG: +- _cq->entry_size = sizeof(struct fi_cq_msg_entry); +- _cq->read_entry = fi_ibv_rdm_cq_read_msg_entry; +- break; +- case FI_CQ_FORMAT_DATA: +- _cq->entry_size = sizeof(struct fi_cq_data_entry); +- _cq->read_entry = fi_ibv_rdm_cq_read_data_entry; +- break; +- case FI_CQ_FORMAT_UNSPEC: +- case FI_CQ_FORMAT_TAGGED: +- _cq->entry_size = sizeof(struct fi_cq_tagged_entry); +- _cq->read_entry = fi_ibv_rdm_cq_read_tagged_entry; +- break; +- default: +- ret = -FI_ENOSYS; +- goto err; +- } +- +- dlist_init(&_cq->request_cq); +- dlist_init(&_cq->request_errcq); +- +- _cq->read_bunch_size = fi_ibv_gl_data.cqread_bunch_size; +- +- *cq = &_cq->cq_fid; +- return 0; +- +-err: +- free(_cq); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_ep_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_ep_rdm.c +deleted file mode 100644 +index 96f8b6b67..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_ep_rdm.c ++++ /dev/null +@@ -1,633 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include "../fi_verbs.h" +-#include "verbs_queuing.h" +-#include "verbs_utils.h" +- +- +-extern struct fi_ops_tagged fi_ibv_rdm_tagged_ops; +-extern struct fi_ops_cm fi_ibv_rdm_tagged_ep_cm_ops; +-extern struct fi_provider fi_ibv_prov; +-extern struct fi_ops_msg fi_ibv_rdm_ep_msg_ops; +-extern struct fi_ops_rma fi_ibv_rdm_ep_rma_ops; +- +-static int fi_ibv_rdm_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep; +- struct fi_ibv_rdm_cq *cq; +- struct fi_ibv_av *av; +- struct fi_ibv_rdm_cntr *cntr; +- int ret; +- +- ep = container_of(fid, struct fi_ibv_rdm_ep, ep_fid.fid); +- ret = ofi_ep_bind_valid(&fi_ibv_prov, bfid, flags); +- if (ret) +- return ret; +- +- switch (bfid->fclass) { +- case FI_CLASS_CQ: +- cq = container_of(bfid, struct fi_ibv_rdm_cq, cq_fid); +- if (ep->domain != cq->domain) { +- return -FI_EINVAL; +- } +- +- if (flags & FI_RECV) { +- if (ep->fi_rcq) +- return -EINVAL; +- ep->fi_rcq = cq; +- ep->rx_selective_completion = +- (flags & FI_SELECTIVE_COMPLETION) ? 1 : 0; +- } +- +- if (flags & FI_SEND) { +- if (ep->fi_scq) +- return -EINVAL; +- ep->fi_scq = cq; +- ep->tx_selective_completion = +- (flags & FI_SELECTIVE_COMPLETION) ? 1 : 0; +- } +- +- /* TODO: this is wrong. CQ to EP is 1:n */ +- cq->ep = ep; +- break; +- case FI_CLASS_AV: +- av = container_of(bfid, struct fi_ibv_av, av_fid.fid); +- if (ep->domain != av->domain) +- return -FI_EINVAL; +- ep->av = av; +- break; +- case FI_CLASS_CNTR: +- cntr = container_of(bfid, struct fi_ibv_rdm_cntr, fid.fid); +- if (ep->domain != cntr->domain) { +- return -FI_EINVAL; +- } +- +- if ((flags & FI_REMOTE_READ) || (flags & FI_REMOTE_WRITE)) { +- return -FI_ENOSYS; +- } +- +- if (flags & FI_SEND) { +- ep->send_cntr = cntr; +- ofi_atomic_inc32(&ep->send_cntr->ep_ref); +- } +- if (flags & FI_RECV) { +- ep->recv_cntr = cntr; +- ofi_atomic_inc32(&ep->recv_cntr->ep_ref); +- } +- if (flags & FI_READ) { +- ep->read_cntr = cntr; +- ofi_atomic_inc32(&ep->read_cntr->ep_ref); +- } +- if (flags & FI_WRITE) { +- ep->write_cntr = cntr; +- ofi_atomic_inc32(&ep->write_cntr->ep_ref); +- } +- +- break; +- default: +- return -EINVAL; +- } +- +- return 0; +-} +- +-static ssize_t fi_ibv_rdm_cancel(fid_t fid, void *ctx) +-{ +- struct fi_context *context = (struct fi_context *)ctx; +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- int err = -FI_ENOENT; +- +- if (!ep_rdm->domain) +- return -EBADF; +- +- if (!context) +- return -EINVAL; +- +- if (context->internal[0] == NULL) +- return 0; +- +- struct fi_ibv_rdm_request *request = context->internal[0]; +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "ep_cancel, match %p, tag 0x%" PRIx64 ", len %" PRIu64 ", ctx %p\n", +- request, request->minfo.tag, request->len, request->context); +- +- struct dlist_entry *found = +- dlist_find_first_match(&ep_rdm->fi_ibv_rdm_posted_queue, +- fi_ibv_rdm_req_match, request); +- if (found) { +- uint32_t posted_recvs; +- +- assert(container_of(found, struct fi_ibv_rdm_request, +- queue_entry) == request); +- request->context->internal[0] = NULL; +- posted_recvs = fi_ibv_rdm_remove_from_posted_queue(request, ep_rdm); +- (void)posted_recvs; +- VERBS_DBG(FI_LOG_EP_DATA, "\t\t-> SUCCESS, post recv %"PRIu32"\n", +- posted_recvs); +- err = 0; +- } else { +- request = fi_ibv_rdm_take_first_match_from_postponed_queue +- (fi_ibv_rdm_req_match, request, ep_rdm); +- if (request) { +- fi_ibv_rdm_remove_from_postponed_queue(request); +- err = 0; +- } +- } +- +- if (!err) { +- fi_ibv_rdm_cntr_inc_err(ep_rdm->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(ep_rdm->fi_rcq, request, +- FI_ECANCELED); +- } +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- return err; +-} +- +-static int fi_ibv_rdm_getopt(fid_t fid, int level, int optname, void *optval, +- size_t * optlen) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- +- if (level != FI_OPT_ENDPOINT) { +- return -FI_ENOPROTOOPT; +- } +- +- if (optname != FI_OPT_MIN_MULTI_RECV) { +- return -FI_ENOPROTOOPT; +- } +- +- *(size_t *)optval = ep_rdm->min_multi_recv_size; +- *optlen = sizeof(size_t); +- +- return 0; +-} +- +-static int fi_ibv_rdm_setopt(fid_t fid, int level, int optname, +- const void *optval, size_t optlen) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- +- if (level != FI_OPT_ENDPOINT) { +- return -FI_ENOPROTOOPT; +- } +- +- if (optname != FI_OPT_MIN_MULTI_RECV) { +- return -FI_ENOPROTOOPT; +- } +- +- ep_rdm->min_multi_recv_size = *(size_t *)optval; +- return 0; +-} +- +-static int fi_ibv_rdm_tagged_control(fid_t fid, int command, void *arg) +-{ +- switch (command) { +- case FI_ENABLE: +- return 0; +- default: +- return -FI_ENOSYS; +- } +- +- return 0; +-} +- +-struct fi_ops_ep fi_ibv_rdm_ep_base_ops = { +- .size = sizeof(struct fi_ops_ep), +- .cancel = fi_ibv_rdm_cancel, +- .getopt = fi_ibv_rdm_getopt, +- .setopt = fi_ibv_rdm_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-static int fi_ibv_rdm_ep_match(struct slist_entry *item, +- const void *ep) +-{ +- const struct fi_ibv_rdm_ep *ep_obj = (struct fi_ibv_rdm_ep *)ep; +- return (item == &ep_obj->list_entry); +-} +- +-static int fi_ibv_rdm_ep_close(fid_t fid) +-{ +- int ret = FI_SUCCESS; +- int err = FI_SUCCESS; +- struct fi_ibv_rdm_ep *ep = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid.fid); +- struct fi_ibv_rdm_av_entry *av_entry = NULL, *tmp = NULL; +- struct slist_entry *item, *prev_item; +- struct fi_ibv_rdm_conn *conn = NULL; +- +- if (ep->fi_scq) +- ep->fi_scq->ep = NULL; +- if (ep->fi_rcq) +- ep->fi_rcq->ep = NULL; +- +- ep->is_closing = 1; +- +- /* All posted sends are waiting local completions */ +- while (ep->posted_sends > 0 && ep->num_active_conns > 0) +- fi_ibv_rdm_tagged_poll(ep); +- +- if (ep->send_cntr) { +- ofi_atomic_dec32(&ep->send_cntr->ep_ref); +- ep->send_cntr = 0; +- } +- +- if (ep->recv_cntr) { +- ofi_atomic_dec32(&ep->recv_cntr->ep_ref); +- ep->recv_cntr = 0; +- } +- +- if (ep->read_cntr) { +- ofi_atomic_dec32(&ep->read_cntr->ep_ref); +- ep->read_cntr = 0; +- } +- +- if (ep->write_cntr) { +- ofi_atomic_dec32(&ep->write_cntr->ep_ref); +- ep->write_cntr = 0; +- } +- +- slist_remove_first_match(&ep->domain->ep_list, +- fi_ibv_rdm_ep_match, ep); +- +- HASH_ITER(hh, ep->domain->rdm_cm->av_hash, av_entry, tmp) { +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- if (conn) { +- switch (conn->state) { +- case FI_VERBS_CONN_ALLOCATED: +- case FI_VERBS_CONN_ESTABLISHED: +- ret = fi_ibv_rdm_start_disconnection(conn); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- break; +- case FI_VERBS_CONN_STARTED: +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- /* No need to hold `rdm_cm::cm_lock` during +- * CM progressing of the EP */ +- while (conn->state != FI_VERBS_CONN_ESTABLISHED && +- conn->state != FI_VERBS_CONN_REJECTED && +- conn->state != FI_VERBS_CONN_CLOSED) { +- ret = fi_ibv_rdm_cm_progress(ep); +- if (ret) { +- VERBS_INFO(FI_LOG_AV, +- "cm progress failed\n"); +- break; +- } +- } +- break; +- default: +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- break; +- } +- } else { +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- } +- } +- +- /* ok, all connections are initiated to disconnect. now wait +- * till all connections are switch to state 'closed' */ +- HASH_ITER(hh, ep->domain->rdm_cm->av_hash, av_entry, tmp) { +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- if (conn) { +- /* No need to hold `rdm_cm::cm_lock` during +- * polling of receive CQ */ +- while(conn->state != FI_VERBS_CONN_CLOSED && +- conn->state != FI_VERBS_CONN_ALLOCATED) { +- fi_ibv_rdm_tagged_poll_recv(ep); +- err = fi_ibv_rdm_cm_progress(ep); +- if (err) { +- VERBS_INFO(FI_LOG_AV, "cm progress failed\n"); +- ret = (ret == FI_SUCCESS) ? err : ret; +- } +- } +- } +- } +- +- /* now destroy all connections that wasn't removed from HASH */ +- HASH_ITER(hh, ep->domain->rdm_cm->av_hash, av_entry, tmp) { +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- if (conn) { +- HASH_DEL(av_entry->conn_hash, conn); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- /* No need to hold `rdm_cm::cm_lock` during +- * connection cleanup */ +- fi_ibv_rdm_conn_cleanup(conn); +- } else { +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- } +- } +- +- /* now destroy all connection that was removed from HASH */ +- slist_foreach(&ep->domain->rdm_cm->av_removed_entry_head, +- item, prev_item) { +- OFI_UNUSED(prev_item); /* Compiler complains about unused variable */ +- av_entry = container_of(item, +- struct fi_ibv_rdm_av_entry, +- removed_next); +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- if (conn) { +- HASH_DEL(av_entry->conn_hash, conn); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- /* No need to hold `rdm_cm::cm_lock` during +- * connection cleanup */ +- fi_ibv_rdm_conn_cleanup(conn); +- } else { +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- } +- /* do NOT free av_entry and do NOT remove from +- * the List of removed AV entries, becasue we need to +- * remove remaining connections during domain closure */ +- } +- +- /* TODO: MUST be removed in DOMAIN_CLOSE */ +- /*assert(HASH_COUNT(av_entry->conn_hash) == 0 && +- av_entry->conn_hash == NULL);*/ +- free(ep->domain->rdm_cm->av_table); +- +- VERBS_INFO(FI_LOG_AV, "DISCONNECT complete\n"); +- assert(ep->scq && ep->rcq); +- if (ibv_destroy_cq(ep->scq)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "ep->scq: ibv_destroy_cq failed", +- errno); +- ret = (ret == FI_SUCCESS) ? -errno : ret; +- } +- +- if (ibv_destroy_cq(ep->rcq)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "ep->rcq: ibv_destroy_cq failed", +- errno); +- ret = (ret == FI_SUCCESS) ? -errno : ret; +- } +- +- rdma_freeaddrinfo(ep->rai); +- +- /* TODO: move queues & related pools cleanup to close CQ*/ +- fi_ibv_rdm_clean_queues(ep); +- +- util_buf_pool_destroy(ep->fi_ibv_rdm_request_pool); +- util_buf_pool_destroy(ep->fi_ibv_rdm_multi_request_pool); +- util_buf_pool_destroy(ep->fi_ibv_rdm_extra_buffers_pool); +- util_buf_pool_destroy(ep->fi_ibv_rdm_postponed_pool); +- +- fi_freeinfo(ep->info); +- +- free(ep); +- +- return ret; +-} +- +-struct fi_ops fi_ibv_rdm_ep_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_rdm_ep_close, +- .bind = fi_ibv_rdm_ep_bind, +- .control = fi_ibv_rdm_tagged_control, +- .ops_open = fi_no_ops_open, +-}; +- +-int fi_ibv_rdm_open_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep, void *context) +-{ +- struct fi_ibv_domain *_domain = +- container_of(domain, struct fi_ibv_domain, util_domain.domain_fid); +- int ret = 0; +- +- if (!info || !info->ep_attr || !info->domain_attr || +- strncmp(_domain->verbs->device->name, info->domain_attr->name, +- strlen(_domain->verbs->device->name))) +- { +- return -FI_EINVAL; +- } +- +- struct fi_ibv_rdm_ep *_ep; +- _ep = calloc(1, sizeof *_ep); +- if (!_ep) +- return -FI_ENOMEM; +- +- _ep->info = fi_dupinfo(info); +- if (!_ep->info) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- _ep->domain = _domain; +- _ep->ep_fid.fid.fclass = FI_CLASS_EP; +- _ep->ep_fid.fid.context = context; +- _ep->ep_fid.fid.ops = &fi_ibv_rdm_ep_ops; +- _ep->ep_fid.ops = &fi_ibv_rdm_ep_base_ops; +- _ep->ep_fid.cm = &fi_ibv_rdm_tagged_ep_cm_ops; +- _ep->ep_fid.msg = &fi_ibv_rdm_ep_msg_ops; +- _ep->ep_fid.rma = &fi_ibv_rdm_ep_rma_ops; +- _ep->ep_fid.tagged = &fi_ibv_rdm_tagged_ops; +- _ep->tx_selective_completion = 0; +- _ep->rx_selective_completion = 0; +- _ep->n_buffs = fi_ibv_gl_data.rdm.buffer_num; +- +- VERBS_INFO(FI_LOG_EP_CTRL, "inject_size: %zu\n", +- info->tx_attr->inject_size); +- +- _ep->rndv_threshold = info->tx_attr->inject_size; +- _ep->iov_per_rndv_thr = +- (_ep->rndv_threshold / sizeof(struct iovec)); +- VERBS_INFO(FI_LOG_EP_CTRL, "rndv_threshold: %d\n", +- _ep->rndv_threshold); +- +- _ep->buff_len = rdm_buffer_size(info->tx_attr->inject_size); +- VERBS_INFO(FI_LOG_EP_CTRL, "buff_len: %d\n", _ep->buff_len); +- +- _ep->tx_op_flags = info->tx_attr->op_flags; +- _ep->rx_op_flags = info->rx_attr->op_flags; +- _ep->min_multi_recv_size = (_ep->rx_op_flags & FI_MULTI_RECV) ? +- info->tx_attr->inject_size : 0; +- _ep->rndv_seg_size = fi_ibv_gl_data.rdm.rndv_seg_size; +- _ep->rq_wr_depth = info->rx_attr->size; +- /* one more outstanding slot for releasing eager buffers */ +- _ep->sq_wr_depth = _ep->n_buffs + 1; +- if (!strncmp(fi_ibv_gl_data.rdm.eager_send_opcode, +- "IBV_WR_RDMA_WRITE_WITH_IMM", +- strlen("IBV_WR_RDMA_WRITE_WITH_IMM"))) { +- _ep->eopcode = IBV_WR_RDMA_WRITE_WITH_IMM; +- } else if (!strncmp(fi_ibv_gl_data.rdm.eager_send_opcode, +- "IBV_WR_SEND", +- strlen("IBV_WR_SEND"))) { +- _ep->eopcode = IBV_WR_SEND; +- } else { +- VERBS_INFO(FI_LOG_CORE, +- "Invalid value of rdm_eager_send_opcode\n"); +- ret = -FI_EINVAL; +- goto err2; +- } +- +- switch (info->ep_attr->protocol) { +- case FI_PROTO_IB_RDM: +- if (_ep->eopcode != IBV_WR_RDMA_WRITE_WITH_IMM && +- _ep->eopcode != IBV_WR_SEND) { +- VERBS_INFO(FI_LOG_CORE, +- "Unsupported eager operation code\n"); +- ret = -FI_ENODATA; +- goto err2; +- } +- break; +- case FI_PROTO_IWARP_RDM: +- if (_ep->eopcode != IBV_WR_SEND) { +- VERBS_INFO(FI_LOG_CORE, +- "Unsupported eager operation code\n"); +- ret = -FI_ENODATA; +- goto err1; +- } +- break; +- default: +- VERBS_INFO(FI_LOG_CORE, "Unsupported protocol\n"); +- ret = -FI_ENODATA; +- goto err2; +- } +- +- ret = fi_ibv_get_rdma_rai(NULL, NULL, 0, info, &_ep->rai); +- if (ret) { +- goto err2; +- } +- ret = fi_ibv_rdm_cm_bind_ep(_ep->domain->rdm_cm, _ep); +- if (ret) { +- goto err2; +- } +- +- _ep->posted_sends = 0; +- _ep->posted_recvs = 0; +- _ep->recv_preposted_threshold = MAX(0.2 * _ep->rq_wr_depth, _ep->n_buffs); +- VERBS_INFO(FI_LOG_EP_CTRL, "recv preposted threshold: %d\n", +- _ep->recv_preposted_threshold); +- +- ret = util_buf_pool_create(&_ep->fi_ibv_rdm_request_pool, +- sizeof(struct fi_ibv_rdm_request), +- FI_IBV_MEM_ALIGNMENT, 0, +- FI_IBV_POOL_BUF_CNT); +- if (ret) +- goto err3; +- +- ret = util_buf_pool_create(&_ep->fi_ibv_rdm_multi_request_pool, +- sizeof(struct fi_ibv_rdm_multi_request), +- FI_IBV_MEM_ALIGNMENT, 0, +- FI_IBV_POOL_BUF_CNT); +- if (ret) +- goto err3; +- +- ret = util_buf_pool_create(&_ep->fi_ibv_rdm_postponed_pool, +- sizeof(struct fi_ibv_rdm_postponed_entry), +- FI_IBV_MEM_ALIGNMENT, 0, +- FI_IBV_POOL_BUF_CNT); +- if (ret) +- goto err3; +- +- ret = util_buf_pool_create(&_ep->fi_ibv_rdm_extra_buffers_pool, +- _ep->buff_len, FI_IBV_MEM_ALIGNMENT, +- 0, FI_IBV_POOL_BUF_CNT); +- if (ret) +- goto err3; +- +- dlist_init(&_ep->fi_ibv_rdm_posted_queue); +- dlist_init(&_ep->fi_ibv_rdm_postponed_queue); +- dlist_init(&_ep->fi_ibv_rdm_unexp_queue); +- dlist_init(&_ep->fi_ibv_rdm_multi_recv_list); +- +- _ep->max_inline_rc = +- fi_ibv_find_max_inline(_ep->domain->pd, _ep->domain->verbs, IBV_QPT_RC); +- +- _ep->scq_depth = FI_IBV_RDM_TAGGED_DFLT_SCQ_SIZE; +- _ep->rcq_depth = FI_IBV_RDM_TAGGED_DFLT_RCQ_SIZE; +- +- _ep->scq = ibv_create_cq(_ep->domain->verbs, _ep->scq_depth, _ep, +- NULL, 0); +- if (_ep->scq == NULL) { +- VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, "ibv_create_cq", errno); +- ret = -FI_EOTHER; +- goto err3; +- } +- +- _ep->rcq = +- ibv_create_cq(_ep->domain->verbs, _ep->rcq_depth, _ep, NULL, 0); +- if (_ep->rcq == NULL) { +- VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, "ibv_create_cq", errno); +- ret = -FI_EOTHER; +- goto err4; +- } +- +- *ep = &_ep->ep_fid; +- +- _ep->is_closing = 0; +- fi_ibv_rdm_req_hndls_init(); +- +- slist_insert_tail(&_ep->list_entry, &_domain->ep_list); +- +- return ret; +-err4: +- if (ibv_destroy_cq(_ep->scq)) +- VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, "ibv_destroy_cq", errno); +-err3: +- if (_ep->fi_ibv_rdm_request_pool) +- util_buf_pool_destroy(_ep->fi_ibv_rdm_request_pool); +- if (_ep->fi_ibv_rdm_multi_request_pool) +- util_buf_pool_destroy(_ep->fi_ibv_rdm_multi_request_pool); +- if (_ep->fi_ibv_rdm_postponed_pool) +- util_buf_pool_destroy(_ep->fi_ibv_rdm_postponed_pool); +- if (_ep->fi_ibv_rdm_extra_buffers_pool) +- util_buf_pool_destroy(_ep->fi_ibv_rdm_extra_buffers_pool); +-err2: +- fi_freeinfo(_ep->info); +-err1: +- free(_ep); +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_queuing.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_queuing.h +deleted file mode 100644 +index 6ac877e6c..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_queuing.h ++++ /dev/null +@@ -1,307 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _VERBS_QUEING_H +-#define _VERBS_QUEING_H +- +-#include +-#include +-#include "verbs_rdm.h" +- +-static inline void +-fi_ibv_rdm_move_to_cq(struct fi_ibv_rdm_cq *cq, +- struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("move_to_cq: ", request, FI_LOG_DEBUG); +- dlist_insert_tail(&request->queue_entry, &cq->request_cq); +-} +- +-static inline void +-fi_ibv_rdm_remove_from_cq(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_cq: ", request, FI_LOG_DEBUG); +- dlist_remove(&request->queue_entry); +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_cq(struct fi_ibv_rdm_cq *cq) +-{ +- if (cq && !dlist_empty(&cq->request_cq)) { +- struct fi_ibv_rdm_request *entry = +- container_of(cq->request_cq.next, +- struct fi_ibv_rdm_request, queue_entry); +- fi_ibv_rdm_remove_from_cq(entry); +- return entry; +- } +- return NULL; +-} +- +-static inline void +-fi_ibv_rdm_move_to_errcq(struct fi_ibv_rdm_cq *cq, +- struct fi_ibv_rdm_request *request, ssize_t err) +-{ +- request->state.err = llabs(err); +- FI_IBV_RDM_DBG_REQUEST("move_to_errcq: ", request, FI_LOG_DEBUG); +- assert(request->context); +- dlist_insert_tail(&request->queue_entry, +- &cq->request_errcq); +-} +- +-static inline void +-fi_ibv_rdm_remove_from_errcq(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_errcq: ", request, FI_LOG_DEBUG); +- dlist_remove(&request->queue_entry); +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_errcq(struct fi_ibv_rdm_cq *cq) +-{ +- if (cq && !dlist_empty(&cq->request_errcq)) { +- struct fi_ibv_rdm_request *entry = +- container_of(cq->request_errcq.next, +- struct fi_ibv_rdm_request, queue_entry); +- fi_ibv_rdm_remove_from_errcq(entry); +- return entry; +- } +- return NULL; +-} +- +-static inline void +-fi_ibv_rdm_move_to_unexpected_queue(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- FI_IBV_RDM_DBG_REQUEST("move_to_unexpected_queue: ", request, +- FI_LOG_DEBUG); +- dlist_insert_tail(&request->queue_entry, &ep->fi_ibv_rdm_unexp_queue); +-#if ENABLE_DEBUG +- request->minfo.conn->unexp_counter++; +-#endif // ENABLE_DEBUG +-} +- +-static inline void +-fi_ibv_rdm_remove_from_unexp_queue(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_unexpected_queue: ", request, +- FI_LOG_DEBUG); +- dlist_remove(&request->queue_entry); +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_unexp_queue(struct fi_ibv_rdm_ep *ep) +-{ +- if (!dlist_empty(&ep->fi_ibv_rdm_unexp_queue)) { +- struct fi_ibv_rdm_request *entry = +- container_of(ep->fi_ibv_rdm_unexp_queue.next, +- struct fi_ibv_rdm_request, queue_entry); +- fi_ibv_rdm_remove_from_unexp_queue(entry); +- return entry; +- } +- return NULL; +-} +- +-static inline void +-fi_ibv_rdm_move_to_posted_queue(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- FI_IBV_RDM_DBG_REQUEST("move_to_posted_queue: ", request, FI_LOG_DEBUG); +- dlist_insert_tail(&request->queue_entry, &ep->fi_ibv_rdm_posted_queue); +- ep->posted_recvs++; +-#if ENABLE_DEBUG +- if (request->minfo.conn) { +- request->minfo.conn->exp_counter++; +- } +-#endif // ENABLE_DEBUG +-} +- +-static inline uint32_t +-fi_ibv_rdm_remove_from_posted_queue(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_posted_queue: ", request, +- FI_LOG_DEBUG); +- dlist_remove(&request->queue_entry); +- return ep->posted_recvs--; +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_posted_queue(struct fi_ibv_rdm_ep* ep) +-{ +- if (!dlist_empty(&ep->fi_ibv_rdm_posted_queue)) { +- struct fi_ibv_rdm_request *entry = +- container_of(ep->fi_ibv_rdm_posted_queue.next, +- struct fi_ibv_rdm_request, queue_entry); +- fi_ibv_rdm_remove_from_posted_queue(entry, ep); +- return entry; +- } +- return NULL; +-} +- +-static inline int +-fi_ibv_rdm_move_to_postponed_queue(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("move_to_postponed_queue: ", request, +- FI_LOG_DEBUG); +- assert(request && request->minfo.conn); +- +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- +- if (dlist_empty(&conn->postponed_requests_head)) { +- struct fi_ibv_rdm_postponed_entry *entry = +- util_buf_alloc(conn->ep->fi_ibv_rdm_postponed_pool); +- if (OFI_UNLIKELY(!entry)) { +- VERBS_WARN(FI_LOG_EP_DATA, "Unable to alloc buffer"); +- return -FI_ENOMEM; +- } +- +- entry->conn = conn; +- conn->postponed_entry = entry; +- +- dlist_insert_tail(&entry->queue_entry, +- &conn->ep->fi_ibv_rdm_postponed_queue); +- } +- dlist_insert_tail(&request->queue_entry, +- &conn->postponed_requests_head); +- +- return FI_SUCCESS; +-} +- +-static inline void +-fi_ibv_rdm_remove_from_multi_recv_list(struct fi_ibv_rdm_multi_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- dlist_remove(&request->list_entry); +-} +- +-static inline void +-fi_ibv_rdm_add_to_multi_recv_list(struct fi_ibv_rdm_multi_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- dlist_insert_tail(&request->list_entry, +- &ep->fi_ibv_rdm_multi_recv_list); +-} +- +-static inline struct fi_ibv_rdm_multi_request * +-fi_ibv_rdm_take_first_from_multi_recv_list(struct fi_ibv_rdm_ep *ep) +-{ +- if (!dlist_empty(&ep->fi_ibv_rdm_multi_recv_list)) { +- struct fi_ibv_rdm_multi_request *entry; +- dlist_pop_front(&ep->fi_ibv_rdm_multi_recv_list, +- struct fi_ibv_rdm_multi_request, +- entry, list_entry); +- return entry; +- } +- return NULL; +-} +- +-static inline void +-fi_ibv_rdm_remove_from_postponed_queue(struct fi_ibv_rdm_request *request) +-{ +- FI_IBV_RDM_DBG_REQUEST("remove_from_postponed_queue: ", request, +- FI_LOG_DEBUG); +- +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- assert(conn); +- assert(!dlist_empty(&conn->postponed_requests_head)); +- +- /* +- * remove from conn->postponed_requests_head at first +- * then if conn->postponed_requests_head is empty +- * clean fi_ibv_rdm_postponed_queue +- */ +- +- dlist_remove(&request->queue_entry); +- request->queue_entry.next = request->queue_entry.prev = NULL; +- +- if (dlist_empty(&conn->postponed_requests_head)) { +- dlist_remove(&conn->postponed_entry->queue_entry); +- conn->postponed_entry->queue_entry.next = +- conn->postponed_entry->queue_entry.prev = NULL; +- conn->postponed_entry->conn = NULL; +- +- util_buf_release(conn->ep->fi_ibv_rdm_postponed_pool, +- conn->postponed_entry); +- conn->postponed_entry = NULL; +- } +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_from_postponed_queue(struct fi_ibv_rdm_ep *ep) +-{ +- if (!dlist_empty(&ep->fi_ibv_rdm_postponed_queue)) { +- struct fi_ibv_rdm_postponed_entry *entry = +- container_of(ep->fi_ibv_rdm_postponed_queue.next, +- struct fi_ibv_rdm_postponed_entry, queue_entry); +- +- if (!dlist_empty(&entry->conn->postponed_requests_head)) { +- struct dlist_entry *req_entry = +- entry->conn->postponed_requests_head.next; +- +- struct fi_ibv_rdm_request *request = +- container_of(req_entry, struct fi_ibv_rdm_request, +- queue_entry); +- fi_ibv_rdm_remove_from_postponed_queue(request); +- return request; +- } +- } +- +- return NULL; +-} +- +-static inline struct fi_ibv_rdm_request * +-fi_ibv_rdm_take_first_match_from_postponed_queue(dlist_func_t *match, +- const void *arg, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct dlist_entry *i, *j; +- dlist_foreach((&ep->fi_ibv_rdm_postponed_queue), i) { +- struct fi_ibv_rdm_postponed_entry *entry = +- container_of(i, struct fi_ibv_rdm_postponed_entry, +- queue_entry); +- +- j = dlist_find_first_match((&entry->conn->postponed_requests_head), +- match, arg); +- if (j) { +- struct fi_ibv_rdm_request *request = +- container_of(j, struct fi_ibv_rdm_request, +- queue_entry); +- fi_ibv_rdm_remove_from_postponed_queue(request); +- return request; +- } +- } +- +- return NULL; +-} +- +-void fi_ibv_rdm_clean_queues(struct fi_ibv_rdm_ep* ep); +- +-#endif // _VERBS_QUEING_H +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm.h +deleted file mode 100644 +index ef4ba6985..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm.h ++++ /dev/null +@@ -1,746 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _VERBS_RDM_H +-#define _VERBS_RDM_H +- +-#include +-#include +-#include +- +-#include "../fi_verbs.h" +-#include "verbs_utils.h" +-#include "verbs_tagged_ep_rdm_states.h" +- +-#define FI_IBV_EP_TYPE_IS_RDM(_info) \ +- (_info && _info->ep_attr && (_info->ep_attr->type == FI_EP_RDM)) +- +-#define FI_IBV_RDM_ST_PKTTYPE_MASK ((uint32_t) 0xFF) +-#define FI_IBV_RDM_EAGER_PKT 0 +-#define FI_IBV_RDM_RNDV_RTS_PKT 1 +-#define FI_IBV_RDM_RNDV_ACK_PKT 2 +-#define FI_IBV_RDM_RMA_PKT 3 +-#define FI_IBV_RDM_MSG_PKT 4 +-#define FI_IBV_RDM_SET_PKTTYPE(dest, type) (dest |= type) +-#define FI_IBV_RDM_GET_PKTTYPE(value) (value & FI_IBV_RDM_ST_PKTTYPE_MASK) +- +- +-/* ------- SERVICE_TAG layout --------- +- * [ 24 bits - Unused at the moment ] [ 8 bits - pkt type ] +- * IBV_RDM_ST_PKTYPE_MASK +- */ +- +-/* WR - work request */ +-#define FI_IBV_RDM_SERVICE_WR_MASK ((uint64_t)0x1) +-#define FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(value) \ +- (value & FI_IBV_RDM_SERVICE_WR_MASK) +- +-#define FI_IBV_RDM_PACK_WR(value) ((uint64_t)(uintptr_t)(void *)value) +-#define FI_IBV_RDM_UNPACK_WR(value) ((void *)(uintptr_t)value) +- +-#define FI_IBV_RDM_PACK_SERVICE_WR(value) \ +- (((uint64_t)(uintptr_t)(void *)value) | FI_IBV_RDM_SERVICE_WR_MASK) +- +-#define FI_IBV_RDM_UNPACK_SERVICE_WR(value) \ +- ((void *)(uintptr_t)(value & (~(FI_IBV_RDM_SERVICE_WR_MASK)))) +- +-/* Send/Recv counters control */ +-#define FI_IBV_RDM_INC_SIG_POST_COUNTERS(_connection, _ep) \ +-do { \ +- (_connection)->av_entry->sends_outgoing++; \ +- (_ep)->posted_sends++; \ +- VERBS_DBG(FI_LOG_CQ, "SEND_COUNTER++, conn %p, sends_outgoing %"PRIu32"\n", \ +- _connection, (_connection)->av_entry->sends_outgoing); \ +-} while (0) +- +-#define FI_IBV_RDM_DEC_SIG_POST_COUNTERS(_connection, _ep) \ +-do { \ +- (_connection)->av_entry->sends_outgoing--; \ +- (_ep)->posted_sends--; \ +- VERBS_DBG(FI_LOG_CQ, "SEND_COUNTER--, conn %p, sends_outgoing %"PRIu32"\n", \ +- _connection, (_connection)->av_entry->sends_outgoing); \ +-} while (0) +- +-#define OUTGOING_POST_LIMIT(_connection, _ep) \ +- ((_connection)->av_entry->sends_outgoing >= (_ep)->sq_wr_depth - 1) +- +-#define PEND_POST_LIMIT(_ep) \ +- ((_ep)->posted_sends > 0.5 * (_ep)->scq_depth) +- +-#define TSEND_RESOURCES_IS_BUSY(_connection, _ep) \ +- (OUTGOING_POST_LIMIT(_connection, _ep) || PEND_POST_LIMIT(_ep)) +- +-#define RMA_RESOURCES_IS_BUSY(_connection, _ep) \ +- (OUTGOING_POST_LIMIT(_connection, _ep) || PEND_POST_LIMIT(_ep)) +- +-#define GET_TX_COMP(ep_rdm) \ +- (!ep_rdm->rx_selective_completion || \ +- (ep_rdm->rx_op_flags & FI_COMPLETION) ? \ +- FI_COMPLETION : 0ULL) +- +-#define GET_TX_COMP_FLAG(ep_rdm, flag) \ +- (!ep_rdm->rx_selective_completion || \ +- (ep_rdm->rx_op_flags & FI_COMPLETION) ? \ +- FI_COMPLETION : (flags & FI_COMPLETION)) +- +-struct fi_ibv_rdm_header { +-/* uint64_t imm_data; TODO: not implemented */ +- uint64_t tag; +- uint32_t service_tag; +- uint32_t padding; +-}; +- +-struct fi_ibv_rdm_rndv_header { +- struct fi_ibv_rdm_header base; +- uint64_t src_addr; +- uint64_t id; /* pointer to request on sender side */ +- uint64_t total_len; +- uint64_t mem_rkey; +- uint32_t is_tagged; +-}; +- +-struct fi_ibv_rdm_multi_request { +- /* working request, will be renewed for every data arriving */ +- struct dlist_entry list_entry; +- struct fi_ibv_rdm_request *prepost; +- struct fi_ibv_rdm_ep *ep; +- uint8_t *buf; +- uint64_t len; +- uint64_t offset; +- uint64_t min_size; +-}; +- +-struct fi_ibv_rdm_request { +- +- /* Accessors and match info */ +- +- /* Request can be an element of only one queue at the moment */ +- struct dlist_entry queue_entry; +- /* multi recv handling */ +- struct fi_ibv_rdm_multi_request *parent; +- struct { +- enum fi_ibv_rdm_request_eager_state eager; +- enum fi_ibv_rdm_request_rndv_state rndv; +- ssize_t err; /* filled in case of moving to errcq */ +- } state; +- +- struct fi_ibv_rdm_ep *ep; +- struct fi_ibv_rdm_minfo minfo; +- +- /* User data: buffers, lens, imm, context */ +- +- union { +- void *src_addr; +- void *dest_buf; +- struct iovec *iovec_arr; +- }; +- +- union { +- void *exp_rbuf; +- struct fi_ibv_rdm_buf *unexp_rbuf; +- struct fi_ibv_rdm_buf *sbuf; +- struct fi_ibv_rdm_buf *rmabuf; +- struct iovec *rmaiovec_arr; +- }; +- +- /* +- * iovec_arr is a mem pool entry if iov_count > 0 +- * and must be freed properly +- */ +- uint64_t iov_count; +- uint64_t len; +- uint64_t rest_len; +- uint64_t comp_flags; +- struct fi_context *context; +- uint32_t post_counter; +- uint32_t imm; +- +- union { +- /* RNDV info */ +- struct { +- /* pointer to request on sender side */ +- uint64_t id; +- /* registered buffer on sender side */ +- void* remote_addr; +- /* registered mr of local src_addr */ +- struct fi_ibv_mem_desc md; +- uint64_t mr_rkey; +- } rndv; +- +- /* RMA info */ +- struct { +- struct fi_ibv_mem_desc md; +- uint64_t mr_rkey; +- uint64_t mr_lkey; +- uint64_t remote_addr; +- enum ibv_wr_opcode opcode; +- } rma; +- }; +-}; +- +-static inline void +-fi_ibv_rdm_zero_request(struct fi_ibv_rdm_request *request) +-{ +- memset(request, 0, sizeof(*request)); +-} +- +-void fi_ibv_rdm_print_request(char *buf, struct fi_ibv_rdm_request *request); +- +-#define BUF_STATUS_FREE ((uint16_t) 0) +-#define BUF_STATUS_BUSY ((uint16_t) 1) +-#define BUF_STATUS_RECEIVED ((uint16_t) 2) +- +-struct fi_ibv_rdm_buf_service_data { +- volatile uint16_t status; +- uint16_t seq_num; +- int32_t pkt_len; +-}; +- +-#define FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE \ +- (offsetof(struct fi_ibv_rdm_buf, header)) +- +-struct fi_ibv_rdm_buf { +- struct fi_ibv_rdm_buf_service_data service_data; +- struct fi_ibv_rdm_header header; +- uint64_t payload; +-}; +- +-struct fi_ibv_rdm_cm { +- struct rdma_event_channel* ec; +- struct rdma_cm_id* listener; +- int is_bound; +- +- /* av_hash has a sockaddr_in -> [ep - conn] associative */ +- struct fi_ibv_rdm_av_entry* av_hash; +- /* Used only for FI_AV_TABLE */ +- struct fi_ibv_rdm_av_entry** av_table; +- +- struct slist av_removed_entry_head; +- pthread_mutex_t cm_lock; +- pthread_t cm_progress_thread; +- int cm_progress_timeout; +- int fi_ibv_rdm_tagged_cm_progress_running; +-}; +- +-struct fi_ibv_rdm_cntr { +- struct fid_cntr fid; +- struct fi_ibv_domain *domain; +- ofi_atomic32_t ep_ref; +- uint64_t value; +- struct fi_cntr_attr attr; +- uint64_t err_count; +-}; +- +-struct fi_ibv_rdm_ep { +- struct fid_ep ep_fid; +- struct fi_ibv_domain *domain; +- struct slist_entry list_entry; +- struct fi_ibv_rdm_cq *fi_scq; +- struct fi_ibv_rdm_cq *fi_rcq; +- +- struct fi_ibv_rdm_cntr *send_cntr; +- struct fi_ibv_rdm_cntr *recv_cntr; +- struct fi_ibv_rdm_cntr *read_cntr; +- struct fi_ibv_rdm_cntr *write_cntr; +- +- struct fi_info *info; +- +- struct util_buf_pool *fi_ibv_rdm_request_pool; +- struct util_buf_pool *fi_ibv_rdm_multi_request_pool; +- struct util_buf_pool *fi_ibv_rdm_postponed_pool; +- /* +- * extra buffer size equal eager buffer size, +- * it is used for any intermediate needs like +- * unexpected recv, pack/unpack noncontig messages, etc +- */ +- struct util_buf_pool *fi_ibv_rdm_extra_buffers_pool; +- +- struct dlist_entry fi_ibv_rdm_posted_queue; +- struct dlist_entry fi_ibv_rdm_postponed_queue; +- struct dlist_entry fi_ibv_rdm_unexp_queue; +- struct dlist_entry fi_ibv_rdm_multi_recv_list; +- +- size_t addrlen; +- struct rdma_addrinfo *rai; +- struct sockaddr_in my_addr; +- +- struct fi_ibv_av *av; +- int tx_selective_completion; +- int rx_selective_completion; +- size_t min_multi_recv_size; +- uint64_t tx_op_flags; +- uint64_t rx_op_flags; +- +- /* +- * ibv_post_send opcode for eager messaging. +- * It must generate work completion in receive CQ +- */ +- enum ibv_wr_opcode eopcode; +- struct ibv_cq *scq; +- struct ibv_cq *rcq; +- +- int buff_len; +- int n_buffs; +- int rq_wr_depth; // RQ depth +- int sq_wr_depth; // SQ depth +- uint32_t posted_sends; +- uint32_t posted_recvs; +- int num_active_conns; +- int max_inline_rc; +- int rndv_threshold; +- int rndv_seg_size; +- size_t iov_per_rndv_thr; +- int scq_depth; +- int rcq_depth; +- +- int is_closing; +- int recv_preposted_threshold; +-}; +- +-enum fi_rdm_cm_conn_state { +- FI_VERBS_CONN_ALLOCATED, +- FI_VERBS_CONN_STARTED, +- FI_VERBS_CONN_REJECTED, +- FI_VERBS_CONN_ESTABLISHED, +- FI_VERBS_CONN_LOCAL_DISCONNECT, +- FI_VERBS_CONN_CLOSED +-}; +- +-enum fi_rdm_cm_role { +- FI_VERBS_CM_UNDEFINED, +- FI_VERBS_CM_ACTIVE, +- FI_VERBS_CM_PASSIVE, +- FI_VERBS_CM_SELF, +-}; +- +-struct fi_ibv_rdm_av_entry { +- /* association of conn and EPs */ +- struct fi_ibv_rdm_conn *conn_hash; +- struct sockaddr_in addr; +- uint32_t sends_outgoing; +- uint32_t recv_preposted; +- struct slist_entry removed_next; +- UT_hash_handle hh; +-}; +- +-struct fi_ibv_rdm_conn { +- +- /* +- * In normal case only qp[0] and id[0] are used. +- * qp[1] and id[1] are used for establishing connection to self +- * like passive side +- */ +- struct ibv_qp *qp[2]; +- struct rdma_cm_id *id[2]; +- struct sockaddr_in addr; +- struct fi_ibv_rdm_ep *ep; +- enum fi_rdm_cm_role cm_role; +- enum fi_rdm_cm_conn_state state; +- +- char *sbuf_mem_reg; +- struct fi_ibv_rdm_buf *sbuf_head; +- uint16_t sbuf_ack_status; +- +- char *rbuf_mem_reg; +- struct fi_ibv_rdm_buf *rbuf_head; +- +- char *rmabuf_mem_reg; +- struct fi_ibv_rdm_buf *rmabuf_head; +- +- struct dlist_entry postponed_requests_head; +- struct fi_ibv_rdm_postponed_entry *postponed_entry; +- +- struct fi_ibv_mem_desc s_md; +- struct fi_ibv_mem_desc r_md; +- struct fi_ibv_mem_desc ack_md; +- struct fi_ibv_mem_desc rma_md; +- +- uint32_t remote_sbuf_rkey; +- uint32_t remote_rbuf_rkey; +- +- char *remote_sbuf_mem_reg; +- char *remote_rbuf_mem_reg; +- struct fi_ibv_rdm_buf *remote_sbuf_head; +- +- /* counter for eager buffer releasing */ +- uint16_t recv_completions; +- /* counter to control OOO behaviour, works in pair with recv_completions */ +- uint16_t recv_processed; +- +- struct fi_ibv_rdm_av_entry *av_entry; +- UT_hash_handle hh; +-#if ENABLE_DEBUG +- size_t unexp_counter; +- size_t exp_counter; +-#endif +-}; +- +-struct fi_ibv_rdm_postponed_entry { +- struct dlist_entry queue_entry; +- +- struct fi_ibv_rdm_conn *conn; +-}; +- +-struct fi_conn_priv_params { +- char addr[FI_IBV_RDM_DFLT_ADDRLEN]; +- +- uint32_t rbuf_rkey; +- uint32_t sbuf_rkey; +- char *rbuf_mem_reg; +- char *sbuf_mem_reg; +-}; +- +-static inline void +-fi_ibv_rdm_set_buffer_status(struct fi_ibv_rdm_buf *buff, uint16_t status) +-{ +- buff->service_data.status = status; +- if (status == BUF_STATUS_FREE) { +- buff->service_data.pkt_len = 0; +- } +-} +- +-static inline int +-fi_ibv_rdm_buffer_check_seq_num(struct fi_ibv_rdm_buf *buff, uint16_t seq_num) +-{ +- VERBS_DBG(FI_LOG_EP_DATA, "seq num: %d <-> %d\n", +- buff->service_data.seq_num, seq_num); +- return (seq_num == buff->service_data.seq_num); +-} +- +-static inline uintptr_t +-fi_ibv_rdm_get_remote_addr(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_buf *local_sbuff) +-{ +- return (uintptr_t) (conn->remote_rbuf_mem_reg + +- ((char *)local_sbuff - conn->sbuf_mem_reg)); +-} +- +-static inline void +-fi_ibv_rdm_push_buff_pointer(char *area_start, size_t area_size, +- struct fi_ibv_rdm_buf **rdm_buff, size_t offset) +-{ +- char *buff = (char*)(*rdm_buff); +- char *buff_tmp = buff + offset; +- +- VERBS_DBG(FI_LOG_EP_DATA, "old_pointer: %p\n", buff); +- +- buff = buff_tmp < (area_start + area_size) ? buff_tmp : area_start; +- +- VERBS_DBG(FI_LOG_EP_DATA, "new_pointer: %p\n", buff); +- +- *rdm_buff = (struct fi_ibv_rdm_buf *)buff; +-} +- +-static inline void +-fi_ibv_rdm_push_sbuff_head(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- fi_ibv_rdm_push_buff_pointer(conn->sbuf_mem_reg, +- ep->buff_len * ep->n_buffs, +- &conn->sbuf_head, ep->buff_len); +-} +- +-static inline void +-fi_ibv_rdm_push_rmabuff_head(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- fi_ibv_rdm_push_buff_pointer(conn->rmabuf_mem_reg, +- ep->buff_len * ep->n_buffs, +- &conn->rmabuf_head, ep->buff_len); +-} +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_get_rmabuf(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, uint16_t seq_num) +-{ +- char *rmabuf = conn->rmabuf_mem_reg + (seq_num * ep->buff_len); +- VERBS_DBG(FI_LOG_EP_DATA, "rma buf %d\n", seq_num); +- return (struct fi_ibv_rdm_buf *) rmabuf; +-} +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_get_rbuf(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, uint16_t seq_num) +-{ +- struct fi_ibv_rdm_buf *rbuf = (struct fi_ibv_rdm_buf *) +- (conn->rbuf_mem_reg + (seq_num * ep->buff_len)); +- +- VERBS_DBG(FI_LOG_EP_DATA, "recv buf %d <-> %d\n", +- seq_num, rbuf->service_data.seq_num); +- +- return rbuf; +-} +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_get_sbuf(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, uint16_t seq_num) +-{ +- char *sbuf = conn->sbuf_mem_reg + (seq_num * ep->buff_len); +- VERBS_DBG(FI_LOG_EP_DATA, "send buf %d\n", seq_num); +- return (struct fi_ibv_rdm_buf *)sbuf; +-} +- +-static inline void +-fi_ibv_rdm_buffer_lists_init(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- int i; +- +- conn->sbuf_head = (struct fi_ibv_rdm_buf *)conn->sbuf_mem_reg; +- conn->rbuf_head = (struct fi_ibv_rdm_buf *)conn->rbuf_mem_reg; +- conn->sbuf_ack_status = BUF_STATUS_FREE; +- +- conn->rmabuf_head = (struct fi_ibv_rdm_buf *)conn->rmabuf_mem_reg; +- +- for (i = 0; i < ep->n_buffs; ++i) { +- fi_ibv_rdm_set_buffer_status(fi_ibv_rdm_get_sbuf(conn, ep, i), +- BUF_STATUS_FREE); +- fi_ibv_rdm_get_sbuf(conn, ep, i)->service_data.seq_num = i; +- +- fi_ibv_rdm_set_buffer_status(fi_ibv_rdm_get_rbuf(conn, ep, i), +- BUF_STATUS_FREE); +- /* should be initialized by sender */ +- fi_ibv_rdm_get_rbuf(conn, ep, i)->service_data.seq_num = +- (uint16_t)(-1); +- +- fi_ibv_rdm_set_buffer_status(fi_ibv_rdm_get_rmabuf(conn, ep, i), +- BUF_STATUS_FREE); +- fi_ibv_rdm_get_rmabuf(conn, ep, i)->service_data.seq_num = i; +- } +-} +- +-static inline void fi_ibv_rdm_cntr_inc(struct fi_ibv_rdm_cntr *cntr) +-{ +- if (cntr) { +- cntr->fid.ops->add(&cntr->fid, 1); +- } +-} +- +-static inline void fi_ibv_rdm_cntr_inc_err(struct fi_ibv_rdm_cntr *cntr) +-{ +- if (cntr) { +- cntr->err_count++; +- } +-} +- +-int fi_ibv_rdm_tagged_poll(struct fi_ibv_rdm_ep *ep); +-int fi_ibv_rdm_tagged_poll_recv(struct fi_ibv_rdm_ep *ep); +-ssize_t fi_ibv_rdm_cm_progress(struct fi_ibv_rdm_ep *ep); +-ssize_t +-fi_ibv_rdm_start_overall_disconnection(struct fi_ibv_rdm_av_entry *av_entry); +-ssize_t fi_ibv_rdm_start_disconnection(struct fi_ibv_rdm_conn *conn); +-int fi_ibv_av_entry_alloc(struct fi_ibv_domain *domain, +- struct fi_ibv_rdm_av_entry **av_entry, +- void *addr); +-ssize_t fi_ibv_rdm_conn_cleanup(struct fi_ibv_rdm_conn *conn); +-ssize_t fi_ibv_rdm_overall_conn_cleanup(struct fi_ibv_rdm_av_entry *av_entry); +-ssize_t fi_ibv_rdm_start_connection(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn); +-ssize_t fi_ibv_rdm_repost_receives(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, +- int num_to_post); +-int fi_ibv_rdm_tagged_open_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep, void *context); +-int fi_ibv_rdm_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq, void *context); +- +-int fi_ibv_rdm_tagged_prepare_send_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep); +-int fi_ibv_rdm_prepare_rma_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep); +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_get_sbuf_head(struct fi_ibv_rdm_conn *conn, struct fi_ibv_rdm_ep *ep) +-{ +- assert(conn); +- +-#if ENABLE_DEBUG +- { +- int i; +- char s[1024]; +- char *p = s; +- sprintf(p, "N:%1d ", ep->n_buffs); +- p += 4; +- for (i = 0; i < ep->n_buffs; ++i, p += 4) { +- struct fi_ibv_rdm_buf *buf = +- fi_ibv_rdm_get_sbuf(conn, ep, i); +- sprintf(p, "%1d:%1d ", buf->service_data.seq_num, +- buf->service_data.status); +- } +- VERBS_DBG(FI_LOG_EP_DATA, +- "conn %p sbufs status before: %s\n", conn, s); +- } +-#endif // ENABLE_DEBUG +- struct fi_ibv_rdm_buf *sbuf = NULL; +- +- if (conn->sbuf_head->service_data.status == BUF_STATUS_FREE) { +- +- /* We have made whole circle. Reset buffer states */ +- if (conn->sbuf_head == fi_ibv_rdm_get_sbuf(conn, ep, 0)) { +- do { +- fi_ibv_rdm_set_buffer_status(conn->sbuf_head, +- BUF_STATUS_FREE); +- fi_ibv_rdm_push_sbuff_head(conn, ep); +- } while (conn->sbuf_head != fi_ibv_rdm_get_sbuf(conn, ep, 0)); +- } +- +- /* notification for receiver */ +- fi_ibv_rdm_set_buffer_status(conn->sbuf_head, BUF_STATUS_RECEIVED); +- +- sbuf = conn->sbuf_head; +- fi_ibv_rdm_push_sbuff_head(conn, ep); +- } +-#if ENABLE_DEBUG +- assert(sbuf ? (sbuf->service_data.status == BUF_STATUS_RECEIVED) : 1); +- { +- int i; +- char s[1024]; +- char *p = s; +- sprintf(p, "N:%1d ", ep->n_buffs); +- p += 4; +- for (i = 0; i < ep->n_buffs; ++i, p += 4) { +- struct fi_ibv_rdm_buf *buf = +- fi_ibv_rdm_get_sbuf(conn, ep, i); +- sprintf(p, "%1d:%1d ", buf->service_data.seq_num, +- buf->service_data.status); +- } +- VERBS_DBG(FI_LOG_EP_DATA, +- "conn %p sbufs status after: %s\n", conn, s); +- } +- +- if (sbuf) { +- VERBS_DBG(FI_LOG_EP_DATA, "sending pkt # %d\n", +- sbuf->service_data.seq_num); +- } +-#endif // ENABLE_DEBUG +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "conn %p sbuf allocated: %p, head: %p, begin: %p\n", +- conn, sbuf, conn->sbuf_head, conn->sbuf_mem_reg); +- +- return sbuf; +-} +- +-static inline void * +-fi_ibv_rdm_rma_get_buf_head(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- assert(conn); +- void *buf = NULL; +- +- if (conn->rmabuf_head->service_data.status == BUF_STATUS_FREE) { +- fi_ibv_rdm_set_buffer_status(conn->rmabuf_head, BUF_STATUS_BUSY); +- buf = conn->rmabuf_head; +- fi_ibv_rdm_push_rmabuff_head(conn, ep); +- } +- return buf; +-} +- +-static inline int +-fi_ibv_rdm_check_connection(struct fi_ibv_rdm_conn *conn) +-{ +- return (conn->state == FI_VERBS_CONN_ESTABLISHED); +-} +- +-static inline struct fi_ibv_rdm_buf * +-fi_ibv_rdm_prepare_send_resources(struct fi_ibv_rdm_conn *conn) +-{ +- return (fi_ibv_rdm_check_connection(conn) && +- !TSEND_RESOURCES_IS_BUSY(conn, conn->ep)) ? +- fi_ibv_rdm_get_sbuf_head(conn, conn->ep) : NULL; +-} +- +-static inline void * +-fi_ibv_rdm_rma_prepare_resources(struct fi_ibv_rdm_conn *conn) +-{ +- return (fi_ibv_rdm_check_connection(conn) && +- !TSEND_RESOURCES_IS_BUSY(conn, conn->ep)) ? +- fi_ibv_rdm_rma_get_buf_head(conn, conn->ep) : NULL; +-} +- +-static inline int +-fi_ibv_rdm_process_send_wc(struct fi_ibv_rdm_ep *ep, +- struct ibv_wc *wc) +-{ +- if (wc->status != IBV_WC_SUCCESS) { +- return 1; +- } +- +- if (FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wc->wr_id)) { +- VERBS_DBG(FI_LOG_EP_DATA, "CQ COMPL: SEND -> 0x1\n"); +- struct fi_ibv_rdm_conn *conn = +- (struct fi_ibv_rdm_conn *) +- FI_IBV_RDM_UNPACK_SERVICE_WR(wc->wr_id); +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(conn, ep); +- +- return 0; +- } else { +- FI_IBV_DBG_OPCODE(wc->opcode, "SEND"); +- struct fi_ibv_rdm_request *request = +- FI_IBV_RDM_UNPACK_WR(wc->wr_id); +- +- struct fi_ibv_rdm_tagged_send_completed_data data = +- { .ep = ep }; +- +- return fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_LC, +- &data); +- } +-} +- +-static inline void +-fi_ibv_rdm_process_err_send_wc(struct fi_ibv_rdm_ep *ep, +- struct ibv_wc *wc) +-{ +- if (wc->status != IBV_WC_SUCCESS) { +- struct fi_ibv_rdm_conn *conn; +- if (FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wc->wr_id)) { +- conn = FI_IBV_RDM_UNPACK_SERVICE_WR(wc->wr_id); +- } else { +- struct fi_ibv_rdm_request *req = +- FI_IBV_RDM_UNPACK_WR(wc->wr_id); +- conn = req->minfo.conn; +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", req, +- FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, req); +- } +- VERBS_INFO(FI_LOG_EP_DATA, "got ibv_wc.status = %d:%s, " +- "pend_send: %"PRIu32", connection: %p, request = %p (%s)\n", +- wc->status, +- ibv_wc_status_str(wc->status), +- ep->posted_sends, conn, +- (void *)wc->wr_id, +- FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wc->wr_id) ? +- "service" : "not service"); +- } +-} +- +-#endif /* _VERBS_RDM_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cm.c +deleted file mode 100644 +index a5ea208a0..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cm.c ++++ /dev/null +@@ -1,839 +0,0 @@ +-/* +- * Copyright (c) 2013-2017 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +-#include +- +-#include "../fi_verbs.h" +-#include "verbs_utils.h" +-#include "verbs_rdm.h" +-#include "verbs_queuing.h" +- +-extern struct fi_provider fi_ibv_prov; +- +-static inline ssize_t +-fi_ibv_rdm_batch_repost_receives(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, int num_to_post) +-{ +- const size_t idx = (conn->cm_role == FI_VERBS_CM_SELF) ? 1 : 0; +- struct ibv_recv_wr *bad_wr = NULL; +- struct ibv_recv_wr wr[num_to_post]; +- struct ibv_sge sge[num_to_post]; +- int i, last = num_to_post - 1; +- +- /* IBV_WR_SEND opcode specific */ +- assert((num_to_post % ep->n_buffs) == 0); +- +- assert(ep->eopcode == IBV_WR_SEND || +- ep->eopcode == IBV_WR_RDMA_WRITE_WITH_IMM); +- +- if (ep->eopcode == IBV_WR_SEND) { +- if (last >= 0) { +- sge[last].addr = (uint64_t)(uintptr_t) +- fi_ibv_rdm_get_rbuf(conn, ep, +- last % ep->n_buffs); +- sge[last].length = ep->buff_len; +- sge[last].lkey = +- fi_ibv_mr_internal_lkey(&conn->r_md); +- +- wr[last].wr_id = (uintptr_t)conn; +- wr[last].next = NULL; +- wr[last].sg_list = &sge[last]; +- wr[last].num_sge = 1; +- } +- for (i = num_to_post - 2; i >= 0; i--) { +- sge[i].addr = (uint64_t)(uintptr_t) +- fi_ibv_rdm_get_rbuf(conn, ep, +- i % ep->n_buffs); +- sge[i].length = ep->buff_len; +- sge[i].lkey = +- fi_ibv_mr_internal_lkey(&conn->r_md); +- +- wr[i].wr_id = (uintptr_t)conn; +- wr[i].next = &wr[i + 1]; +- wr[i].sg_list = &sge[i]; +- wr[i].num_sge = 1; +- } +- } else { +- if (last >= 0) { +- wr[last].wr_id = (uintptr_t)conn; +- wr[last].next = NULL; +- wr[last].sg_list = &sge[last]; +- wr[last].num_sge = 1; +- } +- for (i = num_to_post - 2; i >= 0; i--) { +- wr[i].wr_id = (uintptr_t)conn; +- wr[i].next = &wr[i + 1]; +- wr[i].sg_list = &sge[i]; +- wr[i].num_sge = 1; +- } +- } +- +- if (ibv_post_recv(conn->qp[idx], wr, &bad_wr) == 0) { +- conn->av_entry->recv_preposted += num_to_post; +- return num_to_post; +- } +- +- VERBS_INFO(FI_LOG_EP_DATA, "Failed to post recv\n"); +- return -FI_ENOMEM; +-} +- +-ssize_t fi_ibv_rdm_repost_receives(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep, int num_to_post) +-{ +- assert(num_to_post > 0); +- const ssize_t batch_size = ep->n_buffs * 10; +- +- ssize_t rest = num_to_post - (num_to_post % ep->n_buffs); +- ssize_t count = 0; +- while (rest) { +- const ssize_t batch = MIN(rest, batch_size); +- const ssize_t ret = +- fi_ibv_rdm_batch_repost_receives(conn, ep, batch); +- +- if (ret < 0) { +- return ret; +- } +- +- count += ret; +- rest -= ret; +- +- assert(ret == batch); +- } +- +- return count; +-} +- +-static ssize_t +-fi_ibv_rdm_prepare_conn_memory(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- assert(conn->s_md.mr == NULL); +- assert(conn->r_md.mr == NULL); +- +- const size_t size = ep->buff_len * ep->n_buffs; +- int ret; +- void *ack_status = &conn->sbuf_ack_status; +- +- ret = fi_ibv_rdm_alloc_and_reg(ep, (void **)&conn->sbuf_mem_reg, +- size, &conn->s_md); +- if (ret) { +- assert(!ret); +- goto s_err; +- } +- +- ret = fi_ibv_rdm_alloc_and_reg(ep, (void **)&conn->rbuf_mem_reg, +- size, &conn->r_md); +- if (ret) { +- assert(!ret); +- goto r_err; +- } +- +- ret = fi_ibv_rdm_alloc_and_reg(ep, &ack_status, +- sizeof(conn->sbuf_ack_status), +- &conn->ack_md); +- if (ret) { +- assert(conn->ack_md.mr); +- goto ack_err; +- } +- +- ret = fi_ibv_rdm_alloc_and_reg(ep, (void **)&conn->rmabuf_mem_reg, +- size, &conn->rma_md); +- if (ret) { +- assert(!ret); +- goto rma_err; +- } +- +- fi_ibv_rdm_buffer_lists_init(conn, ep); +- +- return FI_SUCCESS; +- +-/* Error handling */ +-rma_err: +- free(conn->rmabuf_mem_reg); +-ack_err: /* +- * Ack buffer is a part of connection structure, freeing is not needed +- */ +-r_err: +- free(conn->rbuf_mem_reg); +-s_err: +- free(conn->sbuf_mem_reg); +- +- /* The is a lack of host or HCA memory */ +- return -FI_ENOMEM; +-} +- +-static inline void +-fi_ibv_rdm_tagged_init_qp_attributes(struct ibv_qp_init_attr *qp_attr, +- struct fi_ibv_rdm_ep *ep) +-{ +- assert(ep->scq && ep->rcq); +- memset(qp_attr, 0, sizeof(*qp_attr)); +- qp_attr->send_cq = ep->scq; +- qp_attr->recv_cq = ep->rcq; +- qp_attr->qp_type = IBV_QPT_RC; +- qp_attr->cap.max_send_wr = ep->sq_wr_depth; +- qp_attr->cap.max_recv_wr = ep->rq_wr_depth; +- qp_attr->cap.max_send_sge = 1; +- qp_attr->cap.max_recv_sge = 1; +- qp_attr->cap.max_inline_data = ep->max_inline_rc; +- qp_attr->sq_sig_all = 1; +-} +- +-static void +-fi_ibv_rdm_pack_cm_params(struct rdma_conn_param *cm_params, +- struct fi_conn_priv_params *priv, +- const struct fi_ibv_rdm_conn *conn, +- const struct fi_ibv_rdm_ep *ep) +-{ +- memset(cm_params, 0, sizeof(struct rdma_conn_param)); +- cm_params->responder_resources = 2; +- cm_params->initiator_depth = 2; +- cm_params->private_data = priv; +- +- memcpy(priv->addr, &ep->my_addr, FI_IBV_RDM_DFLT_ADDRLEN); +- +- if ((conn->cm_role != FI_VERBS_CM_SELF) && +- conn->r_md.mr && conn->s_md.mr) { +- cm_params->private_data_len = sizeof(*priv); +- +- priv->rbuf_rkey = fi_ibv_mr_internal_rkey( +- (struct fi_ibv_mem_desc *)&conn->r_md); +- priv->rbuf_mem_reg = conn->rbuf_mem_reg; +- priv->sbuf_rkey = fi_ibv_mr_internal_rkey( +- (struct fi_ibv_mem_desc *)&conn->s_md); +- priv->sbuf_mem_reg = conn->sbuf_mem_reg; +- } else { +- cm_params->private_data_len = FI_IBV_RDM_DFLT_ADDRLEN; +- } +-} +- +- +-static void +-fi_ibv_rdm_unpack_cm_params(const struct rdma_conn_param *cm_param, +- struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- const struct fi_conn_priv_params *priv = cm_param->private_data; +- +- if (conn->cm_role == FI_VERBS_CM_SELF) { +- if (conn->r_md.mr && conn->s_md.mr) { +- memcpy(&conn->addr, &ep->my_addr, +- FI_IBV_RDM_DFLT_ADDRLEN); +- conn->remote_rbuf_rkey = +- fi_ibv_mr_internal_rkey(&conn->r_md); +- conn->remote_rbuf_mem_reg = conn->r_md.mr->addr; +- +- conn->remote_sbuf_rkey = +- fi_ibv_mr_internal_rkey(&conn->s_md); +- conn->remote_sbuf_mem_reg = conn->s_md.mr->addr; +- +- conn->remote_sbuf_head = (struct fi_ibv_rdm_buf *) +- conn->remote_sbuf_mem_reg; +- } +- } else { +- if (conn->state == FI_VERBS_CONN_ALLOCATED) { +- memcpy(&conn->addr, priv->addr, FI_IBV_RDM_DFLT_ADDRLEN); +- } +- +- conn->remote_rbuf_rkey = priv->rbuf_rkey; +- conn->remote_rbuf_mem_reg = priv->rbuf_mem_reg; +- conn->remote_sbuf_rkey = priv->sbuf_rkey; +- conn->remote_sbuf_mem_reg = priv->sbuf_mem_reg; +- +- conn->remote_sbuf_head = (struct fi_ibv_rdm_buf *) +- conn->remote_sbuf_mem_reg; +- } +-} +- +-static ssize_t +-fi_ibv_rdm_process_addr_resolved(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- ssize_t ret = FI_SUCCESS; +- struct ibv_qp_init_attr qp_attr; +- struct fi_ibv_rdm_conn *conn = event->id->context; +- struct rdma_cm_id *id = event->id; +- +- VERBS_INFO(FI_LOG_AV, "ADDR_RESOLVED conn %p, addr %s:%u\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- +- assert(id->verbs == ep->domain->verbs); +- +- fi_ibv_rdm_tagged_init_qp_attributes(&qp_attr, ep); +- if (rdma_create_qp(id, ep->domain->pd, &qp_attr)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, +- "rdma_create_qp failed\n", errno); +- return -errno; +- } +- +- if (conn->cm_role == FI_VERBS_CM_PASSIVE) +- goto resolve_route; +- +- conn->qp[0] = id->qp; +- assert(conn->id[0] == id); +- if (conn->cm_role == FI_VERBS_CM_SELF) +- goto resolve_route; +- +- ret = fi_ibv_rdm_prepare_conn_memory(ep, conn); +- if (ret != FI_SUCCESS) +- goto err; +- +- ret = fi_ibv_rdm_repost_receives(conn, ep, ep->rq_wr_depth); +- if (ret < 0) { +- VERBS_INFO(FI_LOG_AV, "repost receives failed\n"); +- goto err; +- } else { +- ret = FI_SUCCESS; +- } +- +-resolve_route: +- if (rdma_resolve_route(id, FI_IBV_RDM_CM_RESOLVEADDR_TIMEOUT)) { +- VERBS_INFO(FI_LOG_AV, "rdma_resolve_route failed\n"); +- ret = -FI_EHOSTUNREACH; +- goto err; +- } +- +- return ret; +-err: +- rdma_destroy_qp(id); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_process_connect_request(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct ibv_qp_init_attr qp_attr; +- struct rdma_conn_param cm_params; +- struct fi_conn_priv_params priv; +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- struct rdma_cm_id *id = event->id; +- struct fi_ibv_rdm_conn *conn; +- ssize_t ret = FI_SUCCESS; +- +- char *p = (char *) event->param.conn.private_data; +- +- if (ep->is_closing) { +- int rej_message = 0xdeadbeef; +- if (rdma_reject(id, &rej_message, sizeof(rej_message))) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_reject\n", errno); +- ret = -errno; +- if (rdma_destroy_id(id)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id\n", +- errno); +- ret = (ret == FI_SUCCESS) ? -errno : ret; +- } +- } +- assert(ret == FI_SUCCESS); +- return ret; +- } +- +- HASH_FIND(hh, ep->domain->rdm_cm->av_hash, p, +- FI_IBV_RDM_DFLT_ADDRLEN, av_entry); +- +- if (!av_entry) { +- ret = fi_ibv_av_entry_alloc(ep->domain, &av_entry, p); +- if (ret) +- return ret; +- +- ret = ofi_memalign((void**)&conn, +- FI_IBV_MEM_ALIGNMENT, +- sizeof(*conn)); +- if (ret) { +- ofi_freealign(av_entry); +- return -ret; +- } +- +- memset(conn, 0, sizeof(*conn)); +- conn->av_entry = av_entry; +- conn->ep = ep; +- conn->state = FI_VERBS_CONN_ALLOCATED; +- dlist_init(&conn->postponed_requests_head); +- fi_ibv_rdm_unpack_cm_params(&event->param.conn, conn, ep); +- fi_ibv_rdm_conn_init_cm_role(conn, ep); +- HASH_ADD(hh, av_entry->conn_hash, ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- +- VERBS_INFO(FI_LOG_AV, "CONN REQUEST, NOT found in hash, " +- "new conn %p %d, addr %s:%u, HASH ADD\n", +- conn, conn->cm_role, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- } else { +- HASH_FIND(hh, av_entry->conn_hash, &ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- if (!conn) { +- ret = ofi_memalign((void**)&conn, +- FI_IBV_MEM_ALIGNMENT, +- sizeof(*conn)); +- if (ret) +- return -ret; +- memset(conn, 0, sizeof(*conn)); +- conn->ep = ep; +- conn->av_entry = av_entry; +- dlist_init(&conn->postponed_requests_head); +- conn->state = FI_VERBS_CONN_ALLOCATED; +- memcpy(&conn->addr, &av_entry->addr, FI_IBV_RDM_DFLT_ADDRLEN); +- HASH_ADD(hh, av_entry->conn_hash, ep, +- sizeof(struct fi_ibv_rdm_ep *), conn); +- } +- fi_ibv_rdm_conn_init_cm_role(conn, ep); +- if (conn->cm_role != FI_VERBS_CM_ACTIVE) { +- /* +- * Do it before rdma_create_qp since that call would +- * modify event->param.conn.private_data buffer +- */ +- fi_ibv_rdm_unpack_cm_params(&event->param.conn, conn, +- ep); +- } +- +- VERBS_INFO(FI_LOG_AV, +- "CONN REQUEST, FOUND in hash, conn %p %d, addr %s:%u\n", +- conn, conn->cm_role, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- } +- +- if (conn->cm_role == FI_VERBS_CM_ACTIVE) { +- int rej_message = 0xdeadbeef; +- if (rdma_reject(id, &rej_message, sizeof(rej_message))) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_reject\n", errno); +- ret = -errno; +- if (rdma_destroy_id(id)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id\n", +- errno); +- ret = (ret == FI_SUCCESS) ? -errno : ret; +- } +- } +- if (conn->state == FI_VERBS_CONN_ALLOCATED) { +- ret = fi_ibv_rdm_start_connection(ep, conn); +- if (ret != FI_SUCCESS) +- goto err; +- } +- } else { +- assert(conn->state == FI_VERBS_CONN_ALLOCATED || +- conn->state == FI_VERBS_CONN_STARTED); +- +- const size_t idx = (conn->cm_role == FI_VERBS_CM_SELF) ? 1 : 0; +- +- conn->state = FI_VERBS_CONN_STARTED; +- assert (conn->id[idx] == NULL); +- conn->id[idx] = id; +- +- ret = fi_ibv_rdm_prepare_conn_memory(ep, conn); +- if (ret != FI_SUCCESS) +- goto err; +- +- fi_ibv_rdm_tagged_init_qp_attributes(&qp_attr, ep); +- if (rdma_create_qp(id, ep->domain->pd, &qp_attr)) { +- ret = -errno; +- goto err; +- } +- conn->qp[idx] = id->qp; +- +- ret = fi_ibv_rdm_repost_receives(conn, ep, ep->rq_wr_depth); +- if (ret < 0) { +- VERBS_INFO(FI_LOG_AV, "repost receives failed\n"); +- goto err; +- } else { +- ret = FI_SUCCESS; +- } +- +- id->context = conn; +- +- fi_ibv_rdm_pack_cm_params(&cm_params, &priv, conn, ep); +- +- if (rdma_accept(id, &cm_params)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_accept\n", errno); +- ret = -errno; +- goto err; +- } +- } +- +- return ret; +-err: +- /* ret err code is already set here, just cleanup resources */ +- fi_ibv_rdm_conn_cleanup(conn); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_process_route_resolved(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn = event->id->context; +- ssize_t ret = FI_SUCCESS; +- struct rdma_conn_param cm_params; +- struct fi_conn_priv_params priv; +- +- fi_ibv_rdm_pack_cm_params(&cm_params, &priv, conn, ep); +- +- VERBS_INFO(FI_LOG_AV, +- "ROUTE RESOLVED, conn %p, addr %s:%u\n", conn, +- inet_ntoa(conn->addr.sin_addr), ntohs(conn->addr.sin_port)); +- +- if (rdma_connect(event->id, &cm_params)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, +- "rdma_connect failed\n", errno); +- ret = -errno; +- +- assert(0); +- } +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_process_event_established(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn = +- (struct fi_ibv_rdm_conn *)event->id->context; +- +- if (conn->state != FI_VERBS_CONN_STARTED && +- conn->cm_role != FI_VERBS_CM_SELF) { +- VERBS_WARN(FI_LOG_AV, "Wrong state! state = %d, conn %p", +- conn->state, conn); +- assert(0); +- return -FI_ECONNABORTED; +- } +- +- if (conn->cm_role == FI_VERBS_CM_ACTIVE || +- conn->cm_role == FI_VERBS_CM_SELF) +- { +- fi_ibv_rdm_unpack_cm_params(&event->param.conn, conn, ep); +- } +- +- VERBS_INFO(FI_LOG_AV, "CONN ESTABLISHED, conn %p, addr %s:%u\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- +- /* Do not count self twice */ +- if (conn->state != FI_VERBS_CONN_ESTABLISHED) { +- ep->num_active_conns++; +- conn->state = FI_VERBS_CONN_ESTABLISHED; +- } +- return FI_SUCCESS; +-} +- +-/* since the function is invoked only in the `fi_ibv_domain_close` +- * after CM progress thread is closed, it's unnecessary to call this +- * with `rdm_cm::cm_lock held` */ +-ssize_t fi_ibv_rdm_overall_conn_cleanup(struct fi_ibv_rdm_av_entry *av_entry) +-{ +- struct fi_ibv_rdm_conn *conn = NULL, *tmp = NULL; +- ssize_t ret = FI_SUCCESS; +- ssize_t err = FI_SUCCESS; +- +- HASH_ITER(hh, av_entry->conn_hash, conn, tmp) { +- ret = fi_ibv_rdm_conn_cleanup(conn); +- if (ret) { +- VERBS_INFO(FI_LOG_AV, "Conn cleanup failed (%zd) " +- "for av_entry = %p", ret, av_entry); +- err = ret; +- } +- } +- +- return err; +-} +- +-ssize_t fi_ibv_rdm_conn_cleanup(struct fi_ibv_rdm_conn *conn) +-{ +- ssize_t ret = FI_SUCCESS; +- ssize_t err = FI_SUCCESS; +- +- VERBS_DBG(FI_LOG_AV, "conn %p, exp = %zu unexp = %zu\n", conn, +- conn->exp_counter, conn->unexp_counter); +- +- if (conn->id[0]) { +- if (conn->id[0]->qp) +- rdma_destroy_qp(conn->id[0]); +- +- if (rdma_destroy_id(conn->id[0])) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id\n", errno); +- if (ret == FI_SUCCESS) +- ret = -errno; +- } +- conn->id[0] = NULL; +- } +- +- if (conn->id[1]) { +- assert(conn->cm_role == FI_VERBS_CM_SELF); +- if (conn->id[1]->qp) +- rdma_destroy_qp(conn->id[1]); +- +- if (rdma_destroy_id(conn->id[1])) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id\n", errno); +- if (ret == FI_SUCCESS) +- ret = -errno; +- } +- conn->id[1] = NULL; +- } +- +- if (conn->s_md.mr) { +- err = fi_ibv_rdm_dereg_and_free(&conn->s_md, &conn->sbuf_mem_reg); +- if ((err != FI_SUCCESS) && (ret == FI_SUCCESS)) +- ret = err; +- } +- if (conn->r_md.mr) { +- err = fi_ibv_rdm_dereg_and_free(&conn->r_md, &conn->rbuf_mem_reg); +- if ((err != FI_SUCCESS) && (ret == FI_SUCCESS)) +- ret = err; +- } +- if (conn->ack_md.mr) { +- ret = fi_ibv_rdm_dereg_and_free(&conn->ack_md, NULL); +- if (ret) { +- VERBS_WARN(FI_LOG_AV, +- "Unable to dereg MR, ret = %"PRId64"\n", +- ret); +- } +- } +- +- if (conn->rma_md.mr) { +- err = fi_ibv_rdm_dereg_and_free(&conn->rma_md, +- &conn->rmabuf_mem_reg); +- if ((err != FI_SUCCESS) && (ret == FI_SUCCESS)) +- ret = err; +- } +- +- ofi_freealign(conn); +- return ret; +-} +- +-static int fi_ibv_rdm_poll_cq(struct fi_ibv_rdm_ep *ep) +-{ +- int i, ret = 0; +- const int wc_count = ep->fi_scq->read_bunch_size; +- struct ibv_wc wc[wc_count]; +- +- ret = ibv_poll_cq(ep->scq, wc_count, wc); +- for (i = 0; i < ret; ++i) +- if (fi_ibv_rdm_process_send_wc(ep, &wc[i])) +- fi_ibv_rdm_process_err_send_wc(ep, &wc[i]); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_process_event_disconnected(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn = event->id->context; +- int ret = 0; +- +- ep->num_active_conns--; +- conn->state = FI_VERBS_CONN_CLOSED; +- +- VERBS_INFO(FI_LOG_AV, +- "Disconnected from conn %p, addr %s:%u\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- +- /* Retrieve CQ entries from send Completion Queue if any */ +- do { +- ret = fi_ibv_rdm_poll_cq(ep); +- } while (ret > 0); +- +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_process_event_rejected(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +- +-{ +- struct fi_ibv_rdm_conn *conn = event->id->context; +- ssize_t ret = FI_SUCCESS; +- const int *pdata = event->param.conn.private_data; +- +- if (ep->is_closing) { +- conn->state = FI_VERBS_CONN_CLOSED; +- } else if ((pdata && *pdata == 0xdeadbeef) || +- /* +- * TODO: this is a workaround of the case when private_data is not +- * arriving from rdma_reject call on iWarp devices +- */ +- (conn->cm_role == FI_VERBS_CM_PASSIVE && +- event->status == -ECONNREFUSED)) { +- rdma_destroy_qp(event->id); +- +- if (rdma_destroy_id(event->id)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, "rdma_destroy_id failed\n", +- errno); +- if (ret == FI_SUCCESS) +- ret = -errno; +- } +- } else { +- VERBS_INFO(FI_LOG_AV, +- "Unexpected REJECT from conn %p, addr %s:%u, cm_role %d, " +- "msg len %d, msg %x, status %d, err %d\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port), +- conn->cm_role, +- event->param.conn.private_data_len, +- event->param.conn.private_data ? +- *(int *)event->param.conn.private_data : 0, +- event->status, errno); +- conn->state = FI_VERBS_CONN_REJECTED; +- return FI_SUCCESS; +- } +- +- VERBS_INFO(FI_LOG_AV, +- "Rejected %s from conn %p, addr %s:%u, cm_role %d, status %d\n", +- (ep->is_closing ? "(not handled)" : ""), +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port), +- conn->cm_role, +- event->status); +- return ret; +-} +- +-static inline void +-fi_ibv_rdm_process_timewait_exit_event(const struct rdma_cm_event *event, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_conn *conn = event->id->context; +- struct fi_ibv_rdm_request *request = NULL; +- +- VERBS_INFO(FI_LOG_AV, "Handle TIMEWAIT Exit event " +- "from conn %p, addr %s:%u\n", +- conn, inet_ntoa(conn->addr.sin_addr), +- ntohs(conn->addr.sin_port)); +- +- /* Cleanup posted queue */ +- while (NULL != +- (request = fi_ibv_rdm_take_first_from_posted_queue(ep))) { +- request->context->internal[0] = NULL; +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +-} +- +-/* Must call with `rdm_cm::cm_lock held` */ +-static ssize_t +-fi_ibv_rdm_process_event(const struct rdma_cm_event *event, struct fi_ibv_rdm_ep *ep) +-{ +- ssize_t ret = FI_SUCCESS; +- switch (event->event) { +- case RDMA_CM_EVENT_ADDR_RESOLVED: +- ret = fi_ibv_rdm_process_addr_resolved(event, ep); +- break; +- case RDMA_CM_EVENT_ROUTE_RESOLVED: +- ret = fi_ibv_rdm_process_route_resolved(event, ep); +- break; +- case RDMA_CM_EVENT_ESTABLISHED: +- ret = fi_ibv_rdm_process_event_established(event, ep); +- break; +- case RDMA_CM_EVENT_DISCONNECTED: +- ret = fi_ibv_rdm_process_event_disconnected(event, ep); +- break; +- case RDMA_CM_EVENT_CONNECT_REQUEST: +- ret = fi_ibv_rdm_process_connect_request(event, ep); +- break; +- case RDMA_CM_EVENT_REJECTED: +- ret = fi_ibv_rdm_process_event_rejected(event, ep); +- break; +- case RDMA_CM_EVENT_TIMEWAIT_EXIT: +- fi_ibv_rdm_process_timewait_exit_event(event, ep); +- ret = FI_SUCCESS; +- break; +- case RDMA_CM_EVENT_ADDR_ERROR: +- ret = -FI_EADDRNOTAVAIL; +- goto print_err; +- case RDMA_CM_EVENT_ROUTE_ERROR: +- ret = -FI_EHOSTUNREACH; +- goto print_err; +- case RDMA_CM_EVENT_CONNECT_ERROR: +- ret = -FI_ECONNREFUSED; +- goto print_err; +- case RDMA_CM_EVENT_UNREACHABLE: +- ret = -FI_EADDRNOTAVAIL; +- goto print_err; +- default: +- ret = -FI_ECONNABORTED; +-print_err: +- VERBS_INFO(FI_LOG_AV, "got unexpected rdmacm event, %s\n", +- rdma_event_str(event->event)); +- break; +- } +- +- return ret; +-} +- +-ssize_t fi_ibv_rdm_cm_progress(struct fi_ibv_rdm_ep *ep) +-{ +- ssize_t ret; +- +- do { +- struct rdma_cm_event event_copy; +- struct fi_conn_priv_params priv; +- struct rdma_cm_event *event; +- +- if (rdma_get_cm_event(ep->domain->rdm_cm->ec, &event)) { +- if (errno == EAGAIN) { +- usleep(ep->domain->rdm_cm->cm_progress_timeout); +- ret = FI_SUCCESS; +- break; +- } +- +- VERBS_INFO_ERRNO(FI_LOG_AV, +- "rdma_get_cm_event failed\n", errno); +- ret = -errno; +- break; +- } +- +- memcpy(&event_copy, event, sizeof(*event)); +- if (event->param.conn.private_data_len) { +- size_t len = MIN(event->param.conn.private_data_len, +- sizeof(struct fi_conn_priv_params)); +- +- memcpy(&priv, event->param.conn.private_data, len); +- +- event_copy.param.conn.private_data = &priv; +- event_copy.param.conn.private_data_len = len; +- } +- +- if (rdma_ack_cm_event(event)) { +- VERBS_INFO_ERRNO(FI_LOG_AV, +- "rdma_get_cm_event failed\n", errno); +- ret = -errno; +- break; +- } +- +- pthread_mutex_lock(&ep->domain->rdm_cm->cm_lock); +- ret = fi_ibv_rdm_process_event(&event_copy, ep); +- pthread_mutex_unlock(&ep->domain->rdm_cm->cm_lock); +- } while (ret == FI_SUCCESS); +- +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cntr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cntr.c +deleted file mode 100644 +index bd763c983..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_cntr.c ++++ /dev/null +@@ -1,168 +0,0 @@ +-/* +- * Copyright (c) 2013-2017 Intel Corporation, Inc. All rights reserved. +- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "ofi_enosys.h" +- +-#include "verbs_rdm.h" +- +- +-static uint64_t fi_ibv_rdm_cntr_read(struct fid_cntr *cntr_fid) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- return cntr->value; +-} +- +-static uint64_t fi_ibv_rdm_cntr_readerr(struct fid_cntr *cntr_fid) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- return cntr->err_count; +-} +- +-static int fi_ibv_rdm_cntr_add(struct fid_cntr *cntr_fid, uint64_t value) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- cntr->value += value; +- return 0; +-} +- +-static int fi_ibv_rdm_cntr_set(struct fid_cntr *cntr_fid, uint64_t value) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- cntr->value = value; +- return 0; +-} +- +-static int fi_ibv_rdm_cntr_adderr(struct fid_cntr *cntr_fid, uint64_t value) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- cntr->err_count += value; +- return 0; +-} +- +-static int fi_ibv_rdm_cntr_seterr(struct fid_cntr *cntr_fid, uint64_t value) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(cntr_fid, struct fi_ibv_rdm_cntr, fid); +- cntr->err_count = value; +- return 0; +-} +- +-static struct fi_ops_cntr fi_ibv_rdm_cntr_ops = { +- .size = sizeof(struct fi_ops_cntr), +- .read = fi_ibv_rdm_cntr_read, +- .readerr = fi_ibv_rdm_cntr_readerr, +- .add = fi_ibv_rdm_cntr_add, +- .set = fi_ibv_rdm_cntr_set, +- .wait = fi_no_cntr_wait, +- .adderr = fi_ibv_rdm_cntr_adderr, +- .seterr = fi_ibv_rdm_cntr_seterr, +-}; +- +-static int fi_ibv_rdm_cntr_close(struct fid *fid) +-{ +- struct fi_ibv_rdm_cntr *cntr = +- container_of(fid, struct fi_ibv_rdm_cntr, fid); +- +- if (ofi_atomic_get32(&cntr->ep_ref) > 0) { +- return -FI_EBUSY; +- } +- +- free(cntr); +- return 0; +-} +- +-static struct fi_ops fi_ibv_rdm_cntr_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_rdm_cntr_close, +- .bind = fi_no_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +-int fi_rbv_rdm_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, +- struct fid_cntr **cntr_fid, void *context) +-{ +- struct fi_ibv_rdm_cntr *cntr; +- +- struct fi_ibv_domain *dom = +- container_of(domain, struct fi_ibv_domain, util_domain.domain_fid); +- +- if (attr) { +- switch (attr->events) { +- case FI_CNTR_EVENTS_COMP: +- break; +- default: +- return -FI_ENOSYS; +- } +- +- switch (attr->wait_obj) { +- case FI_WAIT_NONE: +- case FI_WAIT_UNSPEC: +- break; +- case FI_WAIT_MUTEX_COND: +- case FI_WAIT_SET: +- case FI_WAIT_FD: +- default: +- return -FI_ENOSYS; +- } +- +- if (attr->flags) { +- return -FI_EINVAL; +- } +- } +- +- cntr = calloc(1, sizeof(*cntr)); +- if (!cntr) +- return -FI_ENOMEM; +- +- if (attr) { +- assert(sizeof(cntr->attr) == sizeof(*attr)); +- memcpy(&cntr->attr, attr, sizeof(*attr)); +- } +- +- cntr->fid.fid.fclass = FI_CLASS_CNTR; +- cntr->fid.fid.context = context; +- cntr->fid.fid.ops = &fi_ibv_rdm_cntr_fi_ops; +- cntr->fid.ops = &fi_ibv_rdm_cntr_ops; +- cntr->domain = dom; +- ofi_atomic_initialize32(&cntr->ep_ref, 0); +- +- *cntr_fid = &cntr->fid; +- +- return FI_SUCCESS; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_msg.c +deleted file mode 100644 +index 69ee381d7..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_msg.c ++++ /dev/null +@@ -1,286 +0,0 @@ +-/* +- * Copyright (c) 2013-2016 Intel Corporation, Inc. All rights reserved. +- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "ofi_iov.h" +-#include "ofi_enosys.h" +- +-#include "verbs_rdm.h" +- +-static ssize_t fi_ibv_rdm_recvmsg(struct fid_ep *ep, const struct fi_msg *msg, +- uint64_t flags) +-{ +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- +- if (msg->iov_count > 1) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- struct fi_ibv_rdm_conn *conn = ep_rdm->av->addr_to_conn(ep_rdm, msg->addr); +- +- struct fi_ibv_rdm_tagged_recv_start_data recv_data = { +- .peek_data = { +- .minfo = { +- .conn = conn, +- .tag = 0, +- .tagmask = 0, +- .is_tagged = 0 +- }, +- .context = msg->context, +- .flags = ep_rdm->rx_op_flags | +- (ep_rdm->rx_selective_completion ? flags : +- (flags | FI_COMPLETION)) +- }, +- .dest_addr = +- (msg->iov_count) ? msg->msg_iov[0].iov_base : NULL, +- .data_len = (msg->iov_count) ? msg->msg_iov[0].iov_len : 0, +- .ep = ep_rdm +- }; +- struct fi_ibv_rdm_request *request = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- +- fi_ibv_rdm_zero_request(request); +- request->ep = ep_rdm; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_START, +- &recv_data); +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "conn %p, len %zu, rbuf %p, fi_ctx %p, posted_recv %"PRIu32"\n", +- conn, recv_data.data_len, recv_data.dest_addr, +- msg->context, ep_rdm->posted_recvs); +- +- if (!ret && !request->state.err) +- ret = rdm_trecv_second_event(request, ep_rdm); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_recvv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t src_addr, +- void *context) +-{ +- const struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .context = context, +- .data = 0 +- }; +- +- return fi_ibv_rdm_recvmsg(ep, &msg, 0ULL); +-} +- +-static ssize_t +-fi_ibv_rdm_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, +- fi_addr_t src_addr, void *context) +-{ +- const struct iovec iov = { +- .iov_base = buf, +- .iov_len = len +- }; +- return fi_ibv_rdm_recvv(ep, &iov, &desc, 1, src_addr, context); +-} +- +-static ssize_t fi_ibv_rdm_sendmsg(struct fid_ep *ep, const struct fi_msg *msg, +- uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- size_t i; +- struct fi_ibv_rdm_send_start_data sdata = { +- .ep_rdm = ep_rdm, +- .conn = ep_rdm->av->addr_to_conn(ep_rdm, msg->addr), +- .data_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count), +- .context = msg->context, +- .flags = FI_MSG | FI_SEND | GET_TX_COMP_FLAG(ep_rdm, flags), +- .tag = 0, +- .is_tagged = 0, +- .buf.src_addr = NULL, +- .iov_count = 0, +- .imm = (uint32_t) 0, +- .stype = IBV_RDM_SEND_TYPE_GEN, +- }; +- +- switch (msg->iov_count) { +- case 1: +- sdata.buf.src_addr = msg->msg_iov[0].iov_base; +- /* FALL THROUGH */ +- case 0: +- break; +- default: +- /* TODO: +- * extra allocation & memcpy can be optimized if it's possible +- * to send immediately +- */ +- if ((msg->iov_count > sdata.ep_rdm->iov_per_rndv_thr) || +- (sdata.data_len > sdata.ep_rdm->rndv_threshold)) +- return -FI_EMSGSIZE; +- sdata.buf.iovec_arr = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_extra_buffers_pool); +- for (i = 0; i < msg->iov_count; i++) { +- sdata.buf.iovec_arr[i].iov_base = msg->msg_iov[i].iov_base; +- sdata.buf.iovec_arr[i].iov_len = msg->msg_iov[i].iov_len; +- } +- sdata.iov_count = msg->iov_count; +- sdata.stype = IBV_RDM_SEND_TYPE_VEC; +- break; +- } +- +- return fi_ibv_rdm_send_common(&sdata); +-} +- +-static ssize_t fi_ibv_rdm_sendv(struct fid_ep *ep, const struct iovec *iov, +- void **desc, size_t count, fi_addr_t dest_addr, +- void *context) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- +- const struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = dest_addr, +- .context = context, +- .data = 0 +- }; +- +- return fi_ibv_rdm_sendmsg(ep, &msg, GET_TX_COMP(ep_rdm)); +-} +- +-static ssize_t fi_ibv_rdm_send(struct fid_ep *ep, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, void *context) +-{ +- const struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len +- }; +- return fi_ibv_rdm_sendv(ep, &iov, &desc, 1, dest_addr, context); +-} +- +-static ssize_t fi_ibv_rdm_inject(struct fid_ep *ep_fid, const void *buf, +- size_t len, fi_addr_t dest_addr) +-{ +- struct fi_ibv_rdm_ep *ep = +- container_of(ep_fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_conn *conn = ep->av->addr_to_conn(ep, dest_addr); +- const size_t size = len + sizeof(struct fi_ibv_rdm_header); +- +- if (OFI_UNLIKELY(len > ep->rndv_threshold)) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- if (!conn->postponed_entry) { +- struct fi_ibv_rdm_buf *sbuf = +- fi_ibv_rdm_prepare_send_resources(conn); +- if (sbuf) { +- struct ibv_send_wr *bad_wr = NULL; +- struct ibv_sge sge = { +- .addr = (uintptr_t)(void *)sbuf, +- .length = size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE, +- .lkey = fi_ibv_mr_internal_lkey(&conn->s_md), +- }; +- struct ibv_send_wr wr = { +- .wr_id = FI_IBV_RDM_PACK_SERVICE_WR(conn), +- .sg_list = &sge, +- .num_sge = 1, +- .wr.rdma.remote_addr = (uintptr_t) +- fi_ibv_rdm_get_remote_addr(conn, sbuf), +- .wr.rdma.rkey = conn->remote_rbuf_rkey, +- .send_flags = (sge.length < ep->max_inline_rc) +- ? IBV_SEND_INLINE : 0, +- .opcode = ep->eopcode, +- }; +- +- sbuf->service_data.pkt_len = size; +- sbuf->header.tag = 0; +- sbuf->header.service_tag = 0; +- +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, +- FI_IBV_RDM_MSG_PKT); +- memcpy(&sbuf->payload, buf, len); +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(conn, ep); +- if (OFI_UNLIKELY(ibv_post_send(conn->qp[0], &wr, &bad_wr))) { +- assert(0); +- return -errno; +- } else { +- VERBS_DBG(FI_LOG_EP_DATA, +- "posted %d bytes, conn %p, len %zu\n", +- sge.length, conn, len); +- return FI_SUCCESS; +- } +- } +- } +- +- fi_ibv_rdm_tagged_poll(ep); +- +- return -FI_EAGAIN; +-} +- +-static ssize_t fi_ibv_rdm_senddata(struct fid_ep *ep, const void *buf, +- size_t len, void *desc, uint64_t data, +- fi_addr_t dest_addr, void *context) +-{ +- assert(0); +- return -FI_ENOSYS; +-} +- +-static ssize_t fi_ibv_rdm_injectdata(struct fid_ep *ep, const void *buf, +- size_t len, uint64_t data, +- fi_addr_t dest_addr) +-{ +- assert(0); +- return -FI_ENOSYS; +-} +- +-struct fi_ops_msg fi_ibv_rdm_ep_msg_ops = { +- .size = sizeof(struct fi_ops_msg), +- .recv = fi_ibv_rdm_recv, +- .recvv = fi_ibv_rdm_recvv, +- .recvmsg = fi_ibv_rdm_recvmsg, +- .send = fi_ibv_rdm_send, +- .sendv = fi_ibv_rdm_sendv, +- .sendmsg = fi_ibv_rdm_sendmsg, +- .inject = fi_ibv_rdm_inject, +- .senddata = fi_ibv_rdm_senddata, +- .injectdata = fi_ibv_rdm_injectdata +-}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_rma.c +deleted file mode 100644 +index 2fd520b0c..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_rdm_rma.c ++++ /dev/null +@@ -1,346 +0,0 @@ +-/* +- * Copyright (c) 2018 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +- +-#include "config.h" +- +-#include "verbs_rdm.h" +- +-static inline ssize_t +-fi_ibv_rdm_ep_rma_preinit(void **desc, struct fi_ibv_rdm_buf **rdm_buf, +- size_t len, struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- assert(desc && rdm_buf); +- +- if (*desc == NULL && len < ep->rndv_threshold) { +- *rdm_buf = fi_ibv_rdm_rma_prepare_resources(conn); +- if (*rdm_buf) +- *desc = (void *)(uintptr_t) +- fi_ibv_mr_internal_lkey(&conn->rma_md); +- else +- goto again; +- } else if (!fi_ibv_rdm_check_connection(conn) || +- RMA_RESOURCES_IS_BUSY(conn, ep) || +- conn->postponed_entry) { +- goto again; +- } +- +- return FI_SUCCESS; +-again: +- fi_ibv_rdm_tagged_poll(ep); +- return -FI_EAGAIN; +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep = +- container_of(ep_fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_conn *conn = ep->av->addr_to_conn(ep, msg->addr); +- struct fi_ibv_rdm_rma_start_data start_data = { +- .ep_rdm = ep, +- .conn = conn, +- .context = msg->context, +- .flags = FI_RMA | FI_READ | GET_TX_COMP_FLAG(ep, flags), +- .data_len = (uint64_t)msg->msg_iov[0].iov_len, +- .rbuf = (uintptr_t)msg->rma_iov[0].addr, +- .lbuf = (uintptr_t)msg->msg_iov[0].iov_base, +- .mr_rkey = (uint64_t)(uintptr_t)(msg->rma_iov[0].key), +- .mr_lkey = (uint64_t)(uintptr_t)(msg->desc ? msg->desc[0] : NULL), +- .op_code = IBV_WR_RDMA_READ +- }; +- struct fi_ibv_rma_post_ready_data post_ready_data = { .ep_rdm = ep }; +- +- struct fi_ibv_rdm_buf *rdm_buf = NULL; +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_request *request; +- +- if(msg->iov_count != 1 || msg->rma_iov_count != 1) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- ret = fi_ibv_rdm_ep_rma_preinit((void**)&start_data.mr_lkey, &rdm_buf, +- msg->msg_iov[0].iov_len, +- conn, ep); +- if (ret) { +- return ret; +- } +- +- request = util_buf_alloc(ep->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- +- fi_ibv_rdm_zero_request(request); +- request->ep = ep; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- /* Initial state */ +- request->state.eager = FI_IBV_STATE_EAGER_BEGIN; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- +- request->minfo.is_tagged = 0; +- request->rmabuf = rdm_buf; +- +- fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RMA_START, &start_data); +- +- return fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_READY, +- &post_ready_data); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_readv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, uint64_t addr, uint64_t key, +- void *context) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- +- struct fi_rma_iov rma_iov = { +- .addr = addr, +- .len = 0, +- .key = key +- }; +- +- struct fi_msg_rma msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .rma_iov = &rma_iov, +- .rma_iov_count = 1, +- .context = context, +- .data = 0 +- }; +- +- size_t i; +- for (i = 0; i < count; i++) { +- rma_iov.len += iov[i].iov_len; +- } +- +- return fi_ibv_rdm_ep_rma_readmsg(ep, &msg, GET_TX_COMP(ep_rdm)); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_read(struct fid_ep *ep_fid, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- const struct iovec iov = { +- .iov_base = buf, +- .iov_len = len +- }; +- +- return fi_ibv_rdm_ep_rma_readv(ep_fid, &iov, &desc, 1, src_addr, addr, +- key, context); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep = container_of(ep_fid, struct fi_ibv_rdm_ep, +- ep_fid); +- struct fi_ibv_rdm_conn *conn = ep->av->addr_to_conn(ep, msg->addr); +- struct fi_ibv_rdm_request *request = NULL; +- struct fi_ibv_rdm_buf *rdm_buf = NULL; +- ssize_t ret = FI_SUCCESS; +- +- struct fi_ibv_rdm_rma_start_data start_data = { +- .conn = conn, +- .ep_rdm = ep, +- .context = msg->context, +- .flags = FI_RMA | FI_WRITE | (ep->tx_selective_completion ? +- (flags & FI_COMPLETION) : FI_COMPLETION), +- .data_len = (uint64_t)msg->msg_iov[0].iov_len, +- .rbuf = msg->rma_iov[0].addr, +- .lbuf = (uintptr_t)msg->msg_iov[0].iov_base, +- .mr_rkey = msg->rma_iov[0].key, +- .mr_lkey = (uint64_t)(uintptr_t)(msg->desc ? msg->desc[0] : NULL), +- .op_code = IBV_WR_RDMA_WRITE +- }; +- +- if(msg->iov_count != 1 && msg->rma_iov_count != 1) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- ret = fi_ibv_rdm_ep_rma_preinit((void**)&start_data.mr_lkey, &rdm_buf, +- msg->msg_iov[0].iov_len, +- conn, ep); +- if (ret) { +- return ret; +- } +- +- request = util_buf_alloc(ep->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- +- fi_ibv_rdm_zero_request(request); +- request->ep = ep; +- /* Initial state */ +- request->state.eager = FI_IBV_STATE_EAGER_BEGIN; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- request->minfo.is_tagged = 0; +- request->rmabuf = rdm_buf; +- +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RMA_START, &start_data); +- +- struct fi_ibv_rma_post_ready_data post_ready_data = { .ep_rdm = ep }; +- +- return fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_READY, +- &post_ready_data); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_writev(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- void *context) +-{ +- struct fi_rma_iov rma_iov = { +- .addr = addr, +- .len = 0, +- .key = key +- }; +- +- struct fi_msg_rma msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = dest_addr, +- .rma_iov = &rma_iov, +- .rma_iov_count = 1, +- .context = context, +- .data = 0 +- }; +- +- size_t i; +- for (i = 0; i < count; i++) { +- rma_iov.len += iov[i].iov_len; +- } +- +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep_fid, struct fi_ibv_rdm_ep, ep_fid); +- +- return fi_ibv_rdm_ep_rma_writemsg(ep_fid, &msg, GET_TX_COMP(ep_rdm)); +-} +- +-static ssize_t +-fi_ibv_rdm_ep_rma_write(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key, void *context) +-{ +- const struct iovec iov = { +- .iov_base = (void *)buf, +- .iov_len = len +- }; +- +- return fi_ibv_rdm_ep_rma_writev(ep_fid, &iov, &desc, 1, dest_addr, addr, +- key, context); +-} +- +-static ssize_t fi_ibv_rdm_ep_rma_inject_write(struct fid_ep *ep, +- const void *buf, size_t len, +- fi_addr_t dest_addr, +- uint64_t addr, uint64_t key) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = container_of(ep, struct fi_ibv_rdm_ep, +- ep_fid); +- struct fi_ibv_rdm_conn *conn = ep_rdm->av->addr_to_conn(ep_rdm, dest_addr); +- struct fi_ibv_rdm_rma_start_data start_data = { +- .conn = conn, +- .ep_rdm = ep_rdm, +- .flags = 0, /* inject does not generate completion */ +- .data_len = (uint64_t)len, +- .rbuf = addr, +- .lbuf = (uintptr_t)buf, +- .mr_rkey = (uint64_t)key, +- .mr_lkey = 0 +- }; +- ssize_t ret; +- struct fi_ibv_rdm_request *request = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_request_pool); +- +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- +- fi_ibv_rdm_zero_request(request); +- request->ep = ep_rdm; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- /* Initial state */ +- request->state.eager = FI_IBV_STATE_EAGER_RMA_INJECT; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- +- request->minfo.is_tagged = 0; +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RMA_START, &start_data); +- +- switch (ret) +- { +- case FI_SUCCESS: +- return ret; +- case -FI_EAGAIN: +- break; +- default: +- ret = -errno; +- break; +- } +- +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep_rdm->fi_ibv_rdm_request_pool, request); +- +- fi_ibv_rdm_tagged_poll(ep_rdm); +- +- return ret; +-} +- +-struct fi_ops_rma fi_ibv_rdm_ep_rma_ops = { +- .size = sizeof(struct fi_ops_rma), +- .read = fi_ibv_rdm_ep_rma_read, +- .readv = fi_ibv_rdm_ep_rma_readv, +- .readmsg = fi_ibv_rdm_ep_rma_readmsg, +- .write = fi_ibv_rdm_ep_rma_write, +- .writev = fi_ibv_rdm_ep_rma_writev, +- .writemsg = fi_ibv_rdm_ep_rma_writemsg, +- .inject = fi_ibv_rdm_ep_rma_inject_write, +- .writedata = fi_no_rma_writedata, +- .injectdata = fi_no_rma_injectdata, +-}; +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm.c +deleted file mode 100644 +index fe15e93fe..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm.c ++++ /dev/null +@@ -1,729 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +- +-#include +- +-#include +-#include +-#include +-#include +- +-#include "verbs_queuing.h" +-#include "verbs_tagged_ep_rdm_states.h" +- +-static inline int fi_ibv_rdm_tagged_poll_send(struct fi_ibv_rdm_ep *ep); +- +-int +-fi_ibv_rdm_tagged_prepare_send_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +-#if ENABLE_DEBUG +- int res = OUTGOING_POST_LIMIT(request->minfo.conn, ep); +- if (res) { +- FI_IBV_RDM_DBG_REQUEST +- ("failed because OUTGOING_POST_LIMIT", request, +- FI_LOG_DEBUG); +- return !res; +- } +- res = PEND_POST_LIMIT(ep); +- if (res) { +- FI_IBV_RDM_DBG_REQUEST +- ("failed because PEND_POST_LIMIT", request, +- FI_LOG_DEBUG); +- return !res; +- } +-#endif // ENABLE_DEBUG +- request->sbuf = fi_ibv_rdm_prepare_send_resources(request->minfo.conn); +- return !!request->sbuf; +-} +- +-int +-fi_ibv_rdm_prepare_rma_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- request->rmabuf = +- fi_ibv_rdm_rma_prepare_resources(request->minfo.conn); +- return !!request->rmabuf; +-} +- +-static int fi_ibv_rdm_tagged_getname(fid_t fid, void *addr, size_t * addrlen) +-{ +- struct fi_ibv_rdm_ep *ep; +- +- if (fid->fclass == FI_CLASS_EP) { +- ep = container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- } else { +- VERBS_INFO(FI_LOG_EP_CTRL, "Invalid fid class: %zd\n", +- fid->fclass); +- return -FI_EINVAL; +- } +- +- if (FI_IBV_RDM_DFLT_ADDRLEN > *addrlen) { +- *addrlen = FI_IBV_RDM_DFLT_ADDRLEN; +- return -FI_ETOOSMALL; +- } +- +- memset(addr, 0, *addrlen); +- memcpy(addr, &ep->my_addr, FI_IBV_RDM_DFLT_ADDRLEN); +- *addrlen = FI_IBV_RDM_DFLT_ADDRLEN; +- ep->addrlen = FI_IBV_RDM_DFLT_ADDRLEN; +- +- return 0; +-} +- +-static ssize_t +-fi_ibv_rdm_tagged_recvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged *msg, +- uint64_t flags) +-{ +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep_fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_conn *conn = ep_rdm->av->addr_to_conn(ep_rdm, msg->addr); +- +- if (msg->iov_count > 1) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- struct fi_ibv_rdm_tagged_recv_start_data recv_data = { +- .peek_data = { +- .minfo = { +- .conn = conn, +- .tag = msg->tag, +- .tagmask = ~(msg->ignore), +- .is_tagged = 1 +- }, +- .context = msg->context, +- .flags = ep_rdm->rx_op_flags | +- (ep_rdm->rx_selective_completion ? flags : +- (flags | FI_COMPLETION)) +- }, +- .dest_addr = +- (msg->iov_count) ? msg->msg_iov[0].iov_base : NULL, +- .data_len = (msg->iov_count) ? msg->msg_iov[0].iov_len : 0, +- .ep = ep_rdm +- }; +- +- struct fi_ibv_rdm_request *request = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- fi_ibv_rdm_zero_request(request); +- request->ep = ep_rdm; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- if (flags & FI_PEEK) { +- recv_data.peek_data.flags |= FI_COMPLETION; +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_PEEK, +- &recv_data); +- if (ret == -FI_ENOMSG) +- fi_ibv_rdm_tagged_poll(ep_rdm); +- } else if (flags & FI_CLAIM) { +- recv_data.peek_data.flags |= FI_COMPLETION; +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_START, +- &recv_data); +- if (!ret) +- ret = rdm_trecv_second_event(request, ep_rdm); +- } else { +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_START, +- &recv_data); +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "fi_recvfrom: conn %p, tag 0x%" PRIx64 ", len %zu, rbuf %p, " +- "fi_ctx %p, posted_recv %"PRIu32"\n", +- conn, msg->tag, recv_data.data_len, recv_data.dest_addr, +- msg->context, ep_rdm->posted_recvs); +- +- if (!ret && !request->state.err) +- ret = rdm_trecv_second_event(request, ep_rdm); +- } +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_tagged_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, uint64_t tag, +- uint64_t ignore, void *context) +-{ +- const struct fi_msg_tagged msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .tag = tag, +- .ignore = ignore, +- .context = context, +- .data = 0 +- }; +- +- return fi_ibv_rdm_tagged_recvmsg(ep_fid, &msg, 0ULL); +-} +- +-static ssize_t fi_ibv_rdm_tagged_recvfrom(struct fid_ep *ep_fid, void *buf, +- size_t len, void *desc, +- fi_addr_t src_addr, uint64_t tag, +- uint64_t ignore, void *context) +-{ +- const struct iovec iov = { +- .iov_base = buf, +- .iov_len = len +- }; +- +- return fi_ibv_rdm_tagged_recvv(ep_fid, &iov, &desc, 1, src_addr, tag, +- ignore, context); +-} +- +-static inline ssize_t +-fi_ibv_rdm_tagged_inject(struct fid_ep *fid, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t tag) +-{ +- struct fi_ibv_rdm_ep *ep = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_conn *conn = ep->av->addr_to_conn(ep, dest_addr); +- const size_t size = len + sizeof(struct fi_ibv_rdm_header); +- +- if (OFI_UNLIKELY(len > ep->rndv_threshold)) { +- assert(0); +- return -FI_EMSGSIZE; +- } +- +- if (!conn->postponed_entry) { +- struct fi_ibv_rdm_buf *sbuf = +- fi_ibv_rdm_prepare_send_resources(conn); +- if (sbuf) { +- struct ibv_send_wr *bad_wr = NULL; +- struct ibv_sge sge = { +- .addr = (uintptr_t)(void *)sbuf, +- .length = size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE, +- .lkey = fi_ibv_mr_internal_lkey(&conn->s_md), +- }; +- struct ibv_send_wr wr = { +- .wr_id = FI_IBV_RDM_PACK_SERVICE_WR(conn), +- .sg_list = &sge, +- .num_sge = 1, +- .wr.rdma.remote_addr = (uintptr_t) +- fi_ibv_rdm_get_remote_addr(conn, sbuf), +- .wr.rdma.rkey = conn->remote_rbuf_rkey, +- .send_flags = (sge.length < ep->max_inline_rc) +- ? IBV_SEND_INLINE : 0, +- .opcode = ep->eopcode, +- }; +- +- sbuf->service_data.pkt_len = size; +- sbuf->header.tag = tag; +- sbuf->header.service_tag = 0; +- +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, +- FI_IBV_RDM_EAGER_PKT); +- memcpy(&sbuf->payload, buf, len); +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(conn, ep); +- if (OFI_UNLIKELY(ibv_post_send(conn->qp[0], &wr, &bad_wr))) { +- assert(0); +- return -errno; +- } else { +- VERBS_DBG(FI_LOG_EP_DATA, +- "posted %d bytes, conn %p, len %zu, tag 0x%" PRIx64 "\n", +- sge.length, conn, len, tag); +- return FI_SUCCESS; +- } +- } +- } +- +- fi_ibv_rdm_tagged_poll(ep); +- +- return -FI_EAGAIN; +-} +- +-static ssize_t fi_ibv_rdm_tagged_senddatato(struct fid_ep *fid, const void *buf, +- size_t len, void *desc, +- uint64_t data, fi_addr_t dest_addr, +- uint64_t tag, void *context) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(fid, struct fi_ibv_rdm_ep, ep_fid); +- struct fi_ibv_rdm_send_start_data sdata = { +- .ep_rdm = container_of(fid, struct fi_ibv_rdm_ep, ep_fid), +- .conn = ep_rdm->av->addr_to_conn(ep_rdm, dest_addr), +- .data_len = len, +- .context = context, +- .flags = FI_TAGGED | FI_SEND | GET_TX_COMP(ep_rdm), +- .tag = tag, +- .is_tagged = 1, +- .buf.src_addr = (void*)buf, +- .iov_count = 0, +- .imm = (uint32_t) data, +- .stype = IBV_RDM_SEND_TYPE_GEN +- }; +- +- return fi_ibv_rdm_send_common(&sdata); +-} +- +-static ssize_t fi_ibv_rdm_tagged_sendto(struct fid_ep *fid, const void *buf, +- size_t len, void *desc, +- fi_addr_t dest_addr, uint64_t tag, +- void *context) +-{ +- return fi_ibv_rdm_tagged_senddatato(fid, buf, len, desc, 0, dest_addr, +- tag, context); +-} +- +-static ssize_t fi_ibv_rdm_tagged_sendmsg(struct fid_ep *ep, +- const struct fi_msg_tagged *msg, uint64_t flags) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- size_t i; +- struct fi_ibv_rdm_send_start_data sdata = { +- .ep_rdm = ep_rdm, +- .conn = ep_rdm->av->addr_to_conn(ep_rdm, msg->addr), +- .data_len = ofi_total_iov_len(msg->msg_iov, msg->iov_count), +- .context = msg->context, +- .flags = FI_TAGGED | FI_SEND | GET_TX_COMP_FLAG(ep_rdm, flags), +- .tag = msg->tag, +- .is_tagged = 1, +- .buf.src_addr = NULL, +- .iov_count = 0, +- .imm = (uint32_t) 0, +- .stype = IBV_RDM_SEND_TYPE_GEN, +- }; +- +- switch (msg->iov_count) { +- case 1: +- sdata.buf.src_addr = msg->msg_iov[0].iov_base; +- /* FALL THROUGH */ +- case 0: +- break; +- default: +- /* TODO: +- * extra allocation & memcpy can be optimized if it's possible +- * to send immediately +- */ +- if ((msg->iov_count > sdata.ep_rdm->iov_per_rndv_thr) || +- (sdata.data_len > sdata.ep_rdm->rndv_threshold)) +- return -FI_EMSGSIZE; +- sdata.buf.iovec_arr = +- util_buf_alloc(ep_rdm->fi_ibv_rdm_extra_buffers_pool); +- for (i = 0; i < msg->iov_count; i++) { +- sdata.buf.iovec_arr[i].iov_base = msg->msg_iov[i].iov_base; +- sdata.buf.iovec_arr[i].iov_len = msg->msg_iov[i].iov_len; +- } +- sdata.iov_count = msg->iov_count; +- sdata.stype = IBV_RDM_SEND_TYPE_VEC; +- break; +- } +- +- return fi_ibv_rdm_send_common(&sdata); +-} +- +-static ssize_t fi_ibv_rdm_tagged_sendv(struct fid_ep *ep, +- const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, +- uint64_t tag, void *context) +-{ +- struct fi_ibv_rdm_ep *ep_rdm = +- container_of(ep, struct fi_ibv_rdm_ep, ep_fid); +- +- const struct fi_msg_tagged msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = dest_addr, +- .tag = tag, +- .ignore = 0, +- .context = context, +- .data = 0 +- }; +- +- return fi_ibv_rdm_tagged_sendmsg(ep, &msg, GET_TX_COMP(ep_rdm)); +-} +- +-struct fi_ops_tagged fi_ibv_rdm_tagged_ops = { +- .size = sizeof(struct fi_ops_tagged), +- .recv = fi_ibv_rdm_tagged_recvfrom, +- .recvv = fi_ibv_rdm_tagged_recvv, +- .recvmsg = fi_ibv_rdm_tagged_recvmsg, +- .send = fi_ibv_rdm_tagged_sendto, +- .sendv = fi_ibv_rdm_tagged_sendv, +- .sendmsg = fi_ibv_rdm_tagged_sendmsg, +- .inject = fi_ibv_rdm_tagged_inject, +- .senddata = fi_ibv_rdm_tagged_senddatato, +- .injectdata = fi_no_tagged_injectdata +-}; +- +-struct fi_ops_cm fi_ibv_rdm_tagged_ep_cm_ops = { +- .size = sizeof(struct fi_ops_cm), +- .getname = fi_ibv_rdm_tagged_getname, +- .setname = fi_no_setname, +- .getpeer = fi_no_getpeer, +- .connect = fi_no_connect, +- .listen = fi_no_listen, +- .accept = fi_no_accept, +- .reject = fi_no_reject, +- .shutdown = fi_no_shutdown, +- .join = fi_no_join, +-}; +- +-static inline void +-fi_ibv_rdm_tagged_release_remote_sbuff(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- struct ibv_send_wr *bad_wr = NULL; +- struct ibv_sge sge = { +- .addr = (uint64_t)&conn->sbuf_ack_status, +- .length = sizeof(conn->sbuf_ack_status), +- .lkey = fi_ibv_mr_internal_lkey(&conn->ack_md), +- }; +- struct ibv_send_wr wr = { +- .wr_id = FI_IBV_RDM_PACK_SERVICE_WR(conn), +- .sg_list = &sge, +- .num_sge = 1, +- .wr.rdma.remote_addr = (uint64_t) +- &conn->remote_sbuf_head->service_data.status, +- .wr.rdma.rkey = conn->remote_sbuf_rkey, +- .send_flags = +- (sge.length < ep->max_inline_rc) ? IBV_SEND_INLINE : 0, +- .opcode = IBV_WR_RDMA_WRITE, +- }; +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(conn, ep); +- VERBS_DBG(FI_LOG_EP_DATA, +- "posted %d bytes, remote sbuff released\n", sge.length); +- int ret = ibv_post_send(conn->qp[0], &wr, &bad_wr); +- if (ret) { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- assert(0); +- }; +- +- if (conn->av_entry->sends_outgoing > ep->n_buffs) { +- fi_ibv_rdm_tagged_poll_send(ep); +- } +-} +- +-static inline void +-fi_ibv_rdm_process_recv(struct fi_ibv_rdm_ep *ep, struct fi_ibv_rdm_conn *conn, +- int arrived_len, struct fi_ibv_rdm_buf *rbuf) +-{ +- struct fi_ibv_rdm_request *request = NULL; +- +- int pkt_type = FI_IBV_RDM_GET_PKTTYPE(rbuf->header.service_tag); +- +- if (pkt_type == FI_IBV_RDM_RNDV_ACK_PKT) { +- memcpy(&request, &rbuf->payload, sizeof(request)); +- assert(request); +- VERBS_DBG(FI_LOG_EP_DATA, +- "GOT RNDV ACK from conn %p, id %p\n", conn, request); +- } else if (pkt_type != FI_IBV_RDM_RMA_PKT) { +- struct fi_ibv_rdm_minfo minfo = { +- .conn = conn, +- .tag = rbuf->header.tag, +- .tagmask = 0, +- .is_tagged = (pkt_type == FI_IBV_RDM_MSG_PKT) ? 0 : 1 +- }; +- +- if (pkt_type == FI_IBV_RDM_RNDV_RTS_PKT) { +- struct fi_ibv_rdm_rndv_header* h = (void *)&rbuf->header; +- minfo.is_tagged = h->is_tagged; +- } +- +- struct dlist_entry *found_entry = +- dlist_find_first_match(&ep->fi_ibv_rdm_posted_queue, +- fi_ibv_rdm_req_match_by_info, +- &minfo); +- +- if (found_entry) { +- struct fi_ibv_rdm_request *found_request = +- container_of(found_entry, +- struct fi_ibv_rdm_request, +- queue_entry); +- +- fi_ibv_rdm_remove_from_posted_queue(found_request, ep); +- +- request = found_request; +- } else { +- request = util_buf_alloc(ep->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return; +- fi_ibv_rdm_zero_request(request); +- request->ep = ep; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, +- FI_LOG_DEBUG); +- } +- } +- +- /* RMA packets are not handled yet (without IMM) */ +- if (pkt_type != FI_IBV_RDM_RMA_PKT) { +- +- struct fi_ibv_recv_got_pkt_preprocess_data p = { +- .conn = conn, +- .ep = ep, +- .rbuf = rbuf, +- .arrived_len = arrived_len, +- .pkt_type = pkt_type, +- .imm_data = 0 // TODO: +- }; +- +- fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_RECV_GOT_PKT_PROCESS, +- &p); +- } +-} +- +-static inline +-void check_and_repost_receives(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_conn *conn) +-{ +- if (conn->av_entry->recv_preposted-- < ep->recv_preposted_threshold) { +- int to_post = ep->rq_wr_depth - conn->av_entry->recv_preposted; +- ssize_t res = fi_ibv_rdm_repost_receives(conn, ep, to_post); +- if (res < 0) { +- VERBS_INFO(FI_LOG_EP_DATA, "repost recv failed %zd\n", res); +- /* TODO: err code propagation */ +- abort(); +- } +- VERBS_DBG(FI_LOG_EP_DATA, +- "reposted_recvs, posted %d, local_credits %"PRIu32"\n", +- to_post, conn->av_entry->recv_preposted); +- } +- /* Since we want to print out here the remaining space for prepost, +- * we try to get up-to-date value of the `recv_preposted` */ +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p remain prepost recvs %"PRIu32"\n", +- conn, conn->av_entry->recv_preposted); +-} +- +-static inline int +-fi_ibv_rdm_process_recv_wc(struct fi_ibv_rdm_ep *ep, struct ibv_wc *wc) +-{ +- struct fi_ibv_rdm_conn *conn = (void *)wc->wr_id; +- +- struct fi_ibv_rdm_buf *rbuf = +- fi_ibv_rdm_get_rbuf(conn, ep, conn->recv_processed); +- +- FI_IBV_PREFETCH_ADDR(rbuf); +- +- FI_IBV_DBG_OPCODE(wc->opcode, "RECV"); +- +- if (!FI_IBV_RDM_CHECK_RECV_WC(wc)) { +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p state %d, wc status %d\n", +- conn, conn->state, wc->status); +- /* on QP error initiate disconnection procedure: +- * flush as many as possible preposted (and failed) +- * entries and after this set connection to 'closed' state */ +- if (!conn->av_entry->recv_preposted) { +- VERBS_DBG(FI_LOG_EP_DATA, "no more preposted entries: " +- "conn %p state %d\n", +- conn, conn->state); +- return 0; +- } +- +- conn->av_entry->recv_preposted--; +- if (wc->status == IBV_WC_WR_FLUSH_ERR && +- conn->state == FI_VERBS_CONN_ESTABLISHED) { +- /* +- * It means that remote side initiated disconnection +- * and QP is flushed earlier then disconnect event was +- * handled or arrived. Just initiate disconnect to +- * opposite direction. +- */ +- fi_ibv_rdm_start_disconnection(conn); +- } else { +- VERBS_DBG(FI_LOG_EP_DATA, "%s recv WC", +- ((!ep->is_closing || +- conn->state != FI_VERBS_CONN_ESTABLISHED) ? +- "Expected" : "Error")); +- assert(!ep->is_closing || +- conn->state != FI_VERBS_CONN_ESTABLISHED); +- } +- conn->state = FI_VERBS_CONN_CLOSED; +- } +- else { +- check_and_repost_receives(ep, conn); +- } +- +- conn->recv_completions++; +- if (conn->recv_completions & ep->n_buffs) { +- conn->recv_completions = 0; +- } +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p recv_completions %d\n", +- conn, conn->recv_completions); +- +- if ((rbuf->service_data.status == BUF_STATUS_RECEIVED) && +- /* NOTE: Bi-direction RNDV messaging may cause "out-of-order" +- * consuming of pre-posts. These are RTS and ACK messages of +- * different requests. In this case we may check seq_num only if +- * send was posted with IBV_WR_RDMA_WRITE_WITH_IMM opcode because +- * the sender controls this. Otherwise, the sender with IBV_WR_SEND +- * opcode consumes pre-posted buffers in the same order as they were +- * pre-posted by recv. So, we should handle it as is. +- */ +- (wc->opcode == IBV_WC_RECV_RDMA_WITH_IMM ? +- fi_ibv_rdm_buffer_check_seq_num(rbuf, conn->recv_processed) : 1)) +- { +- do { +- assert(rbuf->service_data.pkt_len > 0); +- +- fi_ibv_rdm_process_recv(ep, conn, +- rbuf->service_data.pkt_len, rbuf); +- +- VERBS_DBG(FI_LOG_EP_DATA, "processed: conn %p, pkt # %d\n", +- conn, rbuf->service_data.seq_num); +- +- fi_ibv_rdm_set_buffer_status(rbuf, BUF_STATUS_FREE); +- rbuf->service_data.seq_num = (uint16_t)(-1); +- +- conn->recv_processed++; +- if (conn->recv_processed & ep->n_buffs) { +- conn->recv_processed = 0; +- fi_ibv_rdm_tagged_release_remote_sbuff(conn, ep); +- } +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p recv_processed %d\n", +- conn, conn->recv_processed); +- +- rbuf = fi_ibv_rdm_get_rbuf(conn, ep, +- conn->recv_processed); +- +- /* Do not process w/o completion! */ +- } while (conn->recv_processed != conn->recv_completions && +- rbuf->service_data.status == BUF_STATUS_RECEIVED); +- } else { +- VERBS_DBG(FI_LOG_EP_DATA, "not processed: conn %p, status: %d\n", +- conn, rbuf->service_data.status); +- } +- +- return 0; +-} +- +-int fi_ibv_rdm_tagged_poll_recv(struct fi_ibv_rdm_ep *ep) +-{ +- const int wc_count = ep->fi_rcq->read_bunch_size; +- struct ibv_wc wc[wc_count]; +- int ret = 0; +- int err = 0; +- int i = 0; +- +- do { +- ret = ibv_poll_cq(ep->rcq, wc_count, wc); +- for (i = 0; i < ret && !err; ++i) { +- err = fi_ibv_rdm_process_recv_wc(ep, &wc[i]); +- } +- } while (!err && ret == wc_count); +- +- if (!err && ret >= 0) { +- return FI_SUCCESS; +- } +- +- /* error handling */ +- +- VERBS_INFO(FI_LOG_EP_DATA, "ibv_poll_cq returned %d\n", ret); +- +- for(i = 0; i < ret; i++) { +- +- if (wc[i].status != IBV_WC_SUCCESS) { +- struct fi_ibv_rdm_conn *conn = (void *)wc[i].wr_id; +- +- if ((wc[i].status == IBV_WC_WR_FLUSH_ERR) && conn && +- (conn->state != FI_VERBS_CONN_ESTABLISHED)) +- return FI_SUCCESS; +- +- VERBS_INFO(FI_LOG_EP_DATA, "got ibv_wc[%d].status = %d:%s\n", +- i, wc[i].status, ibv_wc_status_str(wc[i].status)); +- return -FI_EOTHER; +- } +- +- if (wc[i].opcode != IBV_WC_RECV_RDMA_WITH_IMM && +- wc[i].opcode != IBV_WC_RECV) +- { +- VERBS_INFO(FI_LOG_EP_DATA, "got ibv_wc[%d].opcode = %d\n", +- i, wc[i].opcode); +- } +- } +- +- return -FI_EOTHER; +-} +- +-static inline int fi_ibv_rdm_tagged_poll_send(struct fi_ibv_rdm_ep *ep) +-{ +- const int wc_count = ep->fi_scq->read_bunch_size; +- struct ibv_wc wc[wc_count]; +- int ret = 0, err = 0, i; +- +- if (ep->posted_sends > 0) { +- do { +- ret = ibv_poll_cq(ep->scq, wc_count, wc); +- for (i = 0; i < ret && !err; ++i) { +- err = fi_ibv_rdm_process_send_wc(ep, &wc[i]); +- } +- } while (!err && ret == wc_count); +- } +- +- if (err || ret < 0) { +- goto wc_error; +- } +- +- struct fi_ibv_rdm_tagged_send_ready_data data = { .ep = ep }; +- struct dlist_entry *item; +- dlist_foreach((&ep->fi_ibv_rdm_postponed_queue), item) { +- if (fi_ibv_rdm_postponed_process(item, &data)) { +- /* we can't process all postponed items till foreach */ +- /* implementation is not safety for removing during */ +- /* iterating */ +- break; +- } +- } +- +- return FI_SUCCESS; +- +-wc_error: +- if (ret < 0) { +- VERBS_INFO(FI_LOG_EP_DATA, "ibv_poll_cq returned %d\n", ret); +- assert(0); +- } +- +- for (i = 0; i < ret; i++) +- fi_ibv_rdm_process_err_send_wc(ep, &wc[i]); +- +- return -FI_EOTHER; +-} +- +-int fi_ibv_rdm_tagged_poll(struct fi_ibv_rdm_ep *ep) +-{ +- int ret = fi_ibv_rdm_tagged_poll_send(ep); +- /* Only already posted sends should be processed during EP closing */ +- if (ret || ep->is_closing) { +- return ret; +- } +- +- return fi_ibv_rdm_tagged_poll_recv(ep); +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.c +deleted file mode 100644 +index 970766576..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.c ++++ /dev/null +@@ -1,1846 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +- +-#include +-#include "../fi_verbs.h" +-#include "verbs_rdm.h" +-#include "verbs_queuing.h" +-#include "verbs_tagged_ep_rdm_states.h" +- +-typedef ssize_t (*fi_ep_rdm_request_handler_t) +- (struct fi_ibv_rdm_request *request, void *data); +- +-static fi_ep_rdm_request_handler_t +- fi_ibv_rdm_req_hndl_arr [FI_IBV_STATE_EAGER_COUNT] +- [FI_IBV_STATE_RNDV_COUNT] +- [FI_IBV_EVENT_COUNT]; +- +-#if ENABLE_DEBUG +- +-enum fi_ibv_rdm_hndl_req_log_state { +- hndl_req_log_state_in = 0, +- hndl_req_log_state_out = 10000 +-}; +- +-#define FI_IBV_RDM_HNDL_REQ_LOG_IN() \ +-enum fi_ibv_rdm_hndl_req_log_state state = hndl_req_log_state_in; \ +-do { \ +- FI_IBV_RDM_DBG_REQUEST("\t> IN\t< ", request, FI_LOG_DEBUG); \ +-} while(0) +- +-#define FI_IBV_RDM_HNDL_REQ_LOG() do { \ +- state++; \ +- char prefix[128]; \ +- snprintf(prefix, 128, "\t> %d\t< ", state); \ +- FI_IBV_RDM_DBG_REQUEST(prefix, request, FI_LOG_DEBUG); \ +-} while(0) +- +-#define FI_IBV_RDM_HNDL_REQ_LOG_OUT() do { \ +- assert(state < hndl_req_log_state_out); \ +- FI_IBV_RDM_DBG_REQUEST("\t> OUT\t< ", request, FI_LOG_DEBUG); \ +-} while(0) +- +-#else // ENABLE_DEBUG +-#define FI_IBV_RDM_HNDL_REQ_LOG_IN() +-#define FI_IBV_RDM_HNDL_REQ_LOG() +-#define FI_IBV_RDM_HNDL_REQ_LOG_OUT() +-#endif // ENABLE_DEBUG +- +-static ssize_t +-fi_ibv_rdm_init_send_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- ssize_t ret; +- struct fi_ibv_rdm_send_start_data *p = data; +- request->minfo.conn = p->conn; +- request->minfo.tag = p->tag; +- request->minfo.is_tagged = p->is_tagged; +- request->iov_count = p->iov_count; +- +- /* Indeed, both branches are the same, just for readability */ +- if (request->iov_count) { +- request->iovec_arr = p->buf.iovec_arr; +- } else { +- request->src_addr = p->buf.src_addr; +- } +- +- request->sbuf = NULL; +- request->len = p->data_len; +- request->comp_flags = p->flags; +- request->imm = p->imm; +- request->context = p->context; +- request->state.eager = FI_IBV_STATE_EAGER_BEGIN; +- request->state.rndv = +- (p->data_len + sizeof(struct fi_ibv_rdm_header) +- <= p->ep_rdm->rndv_threshold) +- ? FI_IBV_STATE_RNDV_NOT_USED : FI_IBV_STATE_RNDV_SEND_BEGIN; +- +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- if (ret) +- return ret; +- request->state.eager = FI_IBV_STATE_EAGER_SEND_POSTPONED; +- if (request->state.rndv == FI_IBV_STATE_RNDV_SEND_BEGIN) { +- request->state.rndv = FI_IBV_STATE_RNDV_SEND_WAIT4SEND; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_send_ready(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_POSTPONED); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- fi_ibv_rdm_remove_from_postponed_queue(request); +- struct fi_ibv_rdm_tagged_send_ready_data *p = data; +- +- ssize_t ret = FI_SUCCESS; +- struct ibv_sge sge; +- +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- const int size = request->len + sizeof(struct fi_ibv_rdm_header); +- +- assert(request->sbuf); +- +- struct ibv_send_wr wr = { 0 }; +- struct ibv_send_wr *bad_wr = NULL; +- +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.wr.rdma.remote_addr = fi_ibv_rdm_get_remote_addr(conn, request->sbuf); +- wr.wr.rdma.rkey = conn->remote_rbuf_rkey; +- wr.send_flags = 0; +- +- sge.addr = (uintptr_t)request->sbuf; +- sge.length = size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE; +- request->sbuf->service_data.pkt_len = size; +- +- if (sge.length <= p->ep->max_inline_rc) { +- wr.send_flags |= IBV_SEND_INLINE; +- } +- +- sge.lkey = fi_ibv_mr_internal_lkey(&conn->s_md); +- +- wr.imm_data = 0; +- wr.opcode = p->ep->eopcode; +- struct fi_ibv_rdm_buf *sbuf = (struct fi_ibv_rdm_buf *)request->sbuf; +- uint64_t *payload = &sbuf->payload; +- +- sbuf->header.service_tag = 0; +- if (request->minfo.is_tagged) { +- sbuf->header.tag = request->minfo.tag; +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, FI_IBV_RDM_EAGER_PKT); +- } else { +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, FI_IBV_RDM_MSG_PKT); +- } +- +- if (request->len > 0) { +- if (request->iov_count == 0) { +- memcpy(payload, request->src_addr, request->len); +- } else { +- size_t i; +- for (i = 0; i < request->iov_count; i++) { +- memcpy(payload, request->iovec_arr[i].iov_base, +- request->iovec_arr[i].iov_len); +- payload += request->iovec_arr[i].iov_len; +- } +- } +- } +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- VERBS_DBG(FI_LOG_EP_DATA, "posted %d bytes, conn %p, tag 0x%" PRIx64 "\n", +- sge.length, request->minfo.conn, request->minfo.tag); +- +- ret = ibv_post_send(conn->qp[0], &wr, &bad_wr); +- if (ret) { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- ret = -errno; +- assert(0); +- }; +- +- fi_ibv_rdm_cntr_inc(p->ep->send_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_cq(p->ep->fi_scq, request); +- request->state.eager = FI_IBV_STATE_EAGER_SEND_WAIT4LC; +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_send_lc(struct fi_ibv_rdm_request *request, +- void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC || +- request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, request->len); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- +- if (request->iov_count) { +- util_buf_release( +- request->ep->fi_ibv_rdm_extra_buffers_pool, +- request->iovec_arr); +- } +- +- if (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_rts_send_ready(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_POSTPONED); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_SEND_WAIT4SEND); +- assert(request->sbuf); +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, request->len); +- +- fi_ibv_rdm_remove_from_postponed_queue(request); +- struct fi_ibv_rdm_tagged_send_ready_data *p = data; +- struct ibv_sge sge; +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- struct fi_ibv_rdm_rndv_header *header = (void *)&request->sbuf->header; +- struct ibv_send_wr wr = { 0 }, *bad_wr = NULL; +- int ret; +- +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.wr.rdma.remote_addr = (uintptr_t) +- fi_ibv_rdm_get_remote_addr(conn, request->sbuf); +- wr.wr.rdma.rkey = conn->remote_rbuf_rkey; +- wr.send_flags = 0; +- wr.opcode = p->ep->eopcode; +- wr.imm_data = 0; +- +- sge.addr = (uintptr_t)request->sbuf; +- sge.length = FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE + sizeof(*header); +- sge.lkey = fi_ibv_mr_internal_lkey(&conn->s_md); +- request->sbuf->service_data.pkt_len = sizeof(*header); +- +- if (request->minfo.is_tagged) { +- header->base.tag = request->minfo.tag; +- header->is_tagged = 1; +- } else { +- header->is_tagged = 0; +- } +- header->base.service_tag = 0; +- header->total_len = request->len; +- header->src_addr = (uintptr_t)request->src_addr; +- +- header->id = (uintptr_t)request; +- request->rndv.id = (uintptr_t)request; +- +- ret = p->ep->domain->internal_mr_reg(p->ep->domain, +- (void *)request->src_addr, +- request->len, +- FI_REMOTE_READ, +- &request->rndv.md); +- if (ret) { +- VERBS_WARN(FI_LOG_EP_DATA, +- "Unable to register MR, ret = %d", ret); +- assert(0); +- return ret; +- } +- header->mem_rkey = fi_ibv_mr_internal_rkey(&request->rndv.md); +- +- FI_IBV_RDM_SET_PKTTYPE(header->base.service_tag, +- FI_IBV_RDM_RNDV_RTS_PKT); +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "fi_senddatato: RNDV conn %p, tag 0x%" PRIx64 ", len %"PRIu64", " +- "src_addr %p, rkey 0x%"PRIx64", fi_ctx %p, imm %d, post_sends %"PRIu32"\n", +- conn, request->minfo.tag, request->len, request->src_addr, +- header->mem_rkey, request->context, (int)wr.imm_data, +- p->ep->posted_sends); +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- VERBS_DBG(FI_LOG_EP_DATA, "posted %d bytes, conn %p, tag 0x%" PRIx64 "\n", +- sge.length, request->minfo.conn, +- request->minfo.tag); +- ret = ibv_post_send(conn->qp[0], &wr, &bad_wr); +- if (ret) { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- assert(0); +- return -errno; +- }; +- +- request->state.eager = FI_IBV_STATE_EAGER_SEND_WAIT4LC; +- request->state.rndv = FI_IBV_STATE_RNDV_SEND_WAIT4ACK; +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_rts_lc(struct fi_ibv_rdm_request *request, +- void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(((request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC) && +- (request->state.rndv == FI_IBV_STATE_RNDV_SEND_WAIT4ACK)) || +- ((request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) && +- (request->state.rndv == FI_IBV_STATE_RNDV_SEND_END)) || +- ((request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC) && +- (request->state.rndv == FI_IBV_STATE_RNDV_SEND_END))); +- assert(request->minfo.conn); +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, +- request->len); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- +- if (request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC) { +- request->state.eager = FI_IBV_STATE_EAGER_SEND_END; +- } else { /* (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) */ +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_end(struct fi_ibv_rdm_request *request, +- void *data) +-{ +- struct fi_ibv_recv_got_pkt_preprocess_data *p = data; +- int ret; +- +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_END || +- (request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC)); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_SEND_WAIT4ACK); +- +- assert((sizeof(struct fi_ibv_rdm_request *) + +- sizeof(struct fi_ibv_rdm_header)) == p->arrived_len); +- assert(request->rndv.md.mr); +- assert(p->rbuf); +- +- ret = p->ep->domain->internal_mr_dereg(&request->rndv.md); +- if (ret) +- VERBS_INFO(FI_LOG_EP_DATA, +- "Unable to deregister MR, ret = %d", ret); +- +- if (request->state.eager == FI_IBV_STATE_EAGER_SEND_END) +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- +- request->state.rndv = FI_IBV_STATE_RNDV_SEND_END; +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- fi_ibv_rdm_cntr_inc(p->ep->send_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_cq(p->ep->fi_scq, request); +- } else if (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return FI_SUCCESS; +-} +- +- +-static inline ssize_t +-fi_ibv_rdm_copy_unexp_request(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_request *unexp) +-{ +- ssize_t ret = FI_SUCCESS; +- if (request->len && (request->len < unexp->len)) { +- VERBS_INFO(FI_LOG_EP_DATA, +- "RECV TRUNCATE, unexp len %" PRIu64 ", " +- "req->len=%" PRIu64 ", conn %p, tag 0x%" PRIx64 ", " +- "tagmask %" PRIx64 "\n", +- unexp->len, request->len, request->minfo.conn, +- request->minfo.tag, request->minfo.tagmask); +- +- util_buf_release( +- unexp->ep->fi_ibv_rdm_extra_buffers_pool, +- unexp->unexp_rbuf); +- ret = -FI_ETRUNC; +- return ret; +- } +- +- request->minfo.conn = unexp->minfo.conn; +- request->minfo.tag = unexp->minfo.tag; +- request->minfo.is_tagged = unexp->minfo.is_tagged; +- request->len = unexp->len; +- request->rest_len = unexp->rest_len; +- request->unexp_rbuf = unexp->unexp_rbuf; +- request->state = unexp->state; +- +- assert((request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4RECV) || +- (request->state.eager == FI_IBV_STATE_EAGER_RECV_CLAIMED)); +- +- VERBS_DBG(FI_LOG_EP_DATA, "found req: len = %" PRIu64 ", eager_state = %s, rndv_state = %s \n", +- unexp->len, +- fi_ibv_rdm_req_eager_state_to_str(unexp->state.eager), +- fi_ibv_rdm_req_rndv_state_to_str(unexp->state.rndv)); +- +- if (request->state.rndv != FI_IBV_STATE_RNDV_NOT_USED) { +- assert(request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES); +- +- request->rndv.mr_rkey = unexp->rndv.mr_rkey; +- request->rndv.id = unexp->rndv.id; +- request->rndv.remote_addr = unexp->rndv.remote_addr; +- } +- +- return ret; +-} +- +-/* +- * FI_MULTI_RECV path is implemented through a parent multi_request. +- * This is a kind of supervisor which keep another preposted request while multi +- * recv buffer has enough space for incoming data. The last prepost releases +- * the parent and sets FI_MULTI_RECV completion flag. +- */ +-static struct fi_ibv_rdm_request * +-fi_ibv_rdm_repost_multi_recv(struct fi_ibv_rdm_request *request, +- size_t offset, struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_multi_request *parent; +- struct fi_ibv_rdm_request *prepost; +- +- if (!(prepost = util_buf_alloc(ep->fi_ibv_rdm_request_pool))) { +- VERBS_WARN(FI_LOG_EP_DATA, "Unable to allocate memory for " +- "multi recv prepost request\n"); +- return NULL; +- } +- +- fi_ibv_rdm_zero_request(prepost); +- prepost->ep = ep; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", prepost, FI_LOG_DEBUG); +- FI_IBV_RDM_DBG_REQUEST("repost from: ", request, FI_LOG_DEBUG); +- +- parent = request->parent; +- request->parent = NULL; +- parent->prepost = prepost; +- parent->offset += offset; +- +- VERBS_DBG(FI_LOG_EP_DATA, +- "multi_recv parent: prepost %p, buf %p, len %" PRIu64 +- ", offset %" PRIu64 " min_size %" PRIu64 "\n", +- parent->prepost, parent->buf, parent->len, +- parent->offset, parent->min_size); +- +- prepost->parent = parent; +- prepost->minfo = request->minfo; +- prepost->dest_buf = parent->buf + parent->offset; +- +- prepost->comp_flags = request->comp_flags; +- prepost->len = parent->len - parent->offset; +- if (prepost->len < parent->min_size) { +- /* This is the last one, parent can be released */ +- prepost->comp_flags |= FI_MULTI_RECV; +- util_buf_release(ep->fi_ibv_rdm_multi_request_pool, prepost->parent); +- fi_ibv_rdm_remove_from_multi_recv_list(prepost->parent, ep); +- prepost->parent = NULL; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", prepost, FI_LOG_DEBUG); +- } +- prepost->context = request->context; +- prepost->context->internal[0] = (void *)prepost; +- +- /* TODO: way for (RNDV) optimization is do registration only once */ +- //prepost->rndv = request->rndv; +- +- prepost->state.eager = FI_IBV_STATE_EAGER_RECV_WAIT4PKT; +- prepost->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- prepost->state.err = FI_SUCCESS; +- fi_ibv_rdm_move_to_posted_queue(prepost, ep); +- return prepost; +-} +- +-static inline ssize_t +-fi_ibv_rdm_try_unexp_recv(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_tagged_recv_start_data *rdata) +-{ +- struct dlist_entry *found_entry = NULL; +- struct fi_ibv_rdm_request *found_request = NULL; +- struct fi_ibv_rdm_request *repost = NULL; +- ssize_t ret = FI_ENOMSG; +- +- do { +- found_entry = +- dlist_find_first_match(&rdata->ep->fi_ibv_rdm_unexp_queue, +- fi_ibv_rdm_req_match_by_info3, +- &rdata->peek_data); +- if (found_entry) { +- ret = FI_SUCCESS; +- found_request = +- container_of(found_entry, +- struct fi_ibv_rdm_request, +- queue_entry); +- +- fi_ibv_rdm_remove_from_unexp_queue(found_request); +- +- if (request->parent) { +- repost = fi_ibv_rdm_repost_multi_recv(request, +- found_request->len, rdata->ep); +- if (!repost) { +- ret = -FI_ENOMEM; +- break; +- } +- } +- +- ret = fi_ibv_rdm_copy_unexp_request(request, found_request); +- +- assert((ret != FI_SUCCESS) || +- ((rdata->peek_data.flags & FI_CLAIM) && +- (request->state.eager == +- FI_IBV_STATE_EAGER_RECV_CLAIMED) && +- (request->context == found_request->context)) || +- (!(rdata->peek_data.flags & FI_CLAIM) && +- (request->state.eager == +- FI_IBV_STATE_EAGER_RECV_WAIT4RECV))); +- +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", found_request, FI_LOG_DEBUG); +- util_buf_release( +- found_request->ep->fi_ibv_rdm_request_pool, +- found_request); +- +- if (ret == FI_SUCCESS && +- request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES) { +- request->state.eager = FI_IBV_STATE_EAGER_RECV_END; +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- /* Will fail `while` check and return the result */ +- } +- } +- /* +- * Unexpected queue may contain several entries +- * in case of multi recv, we need to handle them all +- */ +- } while (repost && repost->parent && found_entry && !ret); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_init_recv_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_tagged_recv_start_data *p = data; +- +- if (p->peek_data.flags & FI_MULTI_RECV) { +- request->parent = +- util_buf_alloc(request->ep->fi_ibv_rdm_multi_request_pool); +- if (!request->parent) { +- VERBS_WARN(FI_LOG_EP_DATA, "Unable to allocate memory " +- "for parent \n"); +- return -FI_ENOMEM; +- } +- fi_ibv_rdm_add_to_multi_recv_list(request->parent, request->ep); +- request->parent->prepost = request; +- request->parent->buf = p->dest_addr; +- request->parent->len = p->data_len; +- request->parent->offset = 0; +- request->parent->min_size = p->ep->min_multi_recv_size; +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, multi_recv %p, parent %p\n", +- request->minfo.conn, request, request->parent); +- } +- +- request->minfo = p->peek_data.minfo; +- request->context = p->peek_data.context; +- request->context->internal[0] = (void *)request; +- request->dest_buf = p->dest_addr; +- request->len = p->data_len; +- request->comp_flags = +- (p->peek_data.minfo.is_tagged ? FI_TAGGED : FI_MSG ) | FI_RECV | +- (p->peek_data.flags & FI_COMPLETION); +- request->state.eager = FI_IBV_STATE_EAGER_RECV_WAIT4PKT; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, request->len); +- +- ret = fi_ibv_rdm_try_unexp_recv(request, p); +- if (ret == FI_ENOMSG) { +- fi_ibv_rdm_move_to_posted_queue(request, p->ep); +- ret = FI_SUCCESS; +- } else if (ret != FI_SUCCESS) { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- +- fi_ibv_rdm_cntr_inc_err(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(p->ep->fi_rcq, request, ret); +- } +- ret = FI_SUCCESS; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_tagged_peek_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_BEGIN); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- ssize_t ret = FI_SUCCESS; +- +- struct fi_ibv_rdm_tagged_recv_start_data *p = data; +- struct fi_ibv_rdm_tagged_peek_data *peek_data = &p->peek_data; +- struct dlist_entry *found_entry = +- dlist_find_first_match(&p->ep->fi_ibv_rdm_unexp_queue, +- fi_ibv_rdm_req_match_by_info2, +- &peek_data->minfo); +- +- /* TODO: to check behaviour for multi recv */ +- assert(!(peek_data->flags & FI_MULTI_RECV)); +- +- request->context = peek_data->context; +- request->comp_flags = peek_data->flags; +- +- if (found_entry) { +- struct fi_ibv_rdm_request *found_request = +- container_of(found_entry, struct fi_ibv_rdm_request, +- queue_entry); +- assert(found_request); +- +- ret = fi_ibv_rdm_copy_unexp_request(request, found_request); +- +- if (ret) { +- goto err; +- } +- +- if (peek_data->flags & FI_CLAIM) { +- ret = fi_ibv_rdm_req_hndl(found_request, +- FI_IBV_EVENT_RECV_CLAIM, +- peek_data); +- +- if (ret) { +- goto err; +- } +- } +- +- if (peek_data->flags & FI_DISCARD) { +- ret = fi_ibv_rdm_req_hndl(found_request, +- FI_IBV_EVENT_RECV_DISCARD, +- NULL); +- +- if (ret) { +- goto err; +- } +- } +- +- fi_ibv_rdm_cntr_inc(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- fi_ibv_rdm_move_to_cq(p->ep->fi_rcq, request); +- } else { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- } else { +- ret = -FI_ENOMSG; +- goto err; +- } +- +-out: +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-err: +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- +- fi_ibv_rdm_cntr_inc_err(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(p->ep->fi_rcq, request, ret); +- } +- +- ret = FI_SUCCESS; +- goto out; +-} +- +-static ssize_t +-fi_ibv_rdm_init_unexp_recv_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_BEGIN); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- struct fi_ibv_recv_got_pkt_preprocess_data *p = data; +- struct fi_ibv_rdm_buf *rbuf = p->rbuf; +- ssize_t ret = FI_SUCCESS; +- +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- switch (p->pkt_type) { +- case FI_IBV_RDM_EAGER_PKT: +- case FI_IBV_RDM_MSG_PKT: +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- request->minfo.conn = p->conn; +- request->minfo.tag = rbuf->header.tag; +- request->minfo.is_tagged = +- ((p->pkt_type == FI_IBV_RDM_EAGER_PKT) ? 1 : 0); +- request->len = +- p->arrived_len - sizeof(struct fi_ibv_rdm_header); +- request->comp_flags = +- (request->minfo.is_tagged ? FI_TAGGED : +- FI_MSG) | FI_RECV; +- +- assert(request->len <= p->ep->rndv_threshold); +- +- if (request->len > 0) { +- request->unexp_rbuf = +- util_buf_alloc(request->ep->fi_ibv_rdm_extra_buffers_pool); +- if (!request->unexp_rbuf) { +- ret = -FI_ENOMEM; +- VERBS_WARN(FI_LOG_EP_DATA, +- "Unable allocate memory from the pool " +- "for uenxpected buffer"); +- goto fn; +- } +- memcpy(request->unexp_rbuf, &rbuf->payload, +- request->len); +- } else { +- request->unexp_rbuf = NULL; +- } +- request->imm = p->imm_data; +- request->state.eager = FI_IBV_STATE_EAGER_RECV_WAIT4RECV; +- break; +- case FI_IBV_RDM_RNDV_RTS_PKT: +- FI_IBV_RDM_HNDL_REQ_LOG(); +- assert(p->arrived_len == sizeof(struct fi_ibv_rdm_rndv_header)); +- struct fi_ibv_rdm_rndv_header *h = (void *)&rbuf->header; +- +- request->minfo.conn = p->conn; +- request->minfo.tag = h->base.tag; +- request->minfo.is_tagged = h->is_tagged; +- request->rndv.id = (uintptr_t)h->id; +- request->rndv.remote_addr = (void *)h->src_addr; +- request->rndv.mr_rkey = h->mem_rkey; +- request->len = h->total_len; +- request->rest_len = h->total_len; +- request->comp_flags = (h->is_tagged ? FI_TAGGED : +- FI_MSG) | FI_RECV; +- request->imm = p->imm_data; +- request->state.eager = FI_IBV_STATE_EAGER_RECV_WAIT4RECV; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_WAIT4RES; +- break; +- default: +- if (p->pkt_type == FI_IBV_RDM_RNDV_ACK_PKT) { +- FI_IBV_RDM_DBG_REQUEST("Unexpected RNDV ack!!!", +- request, FI_LOG_INFO); +- } +- +- VERBS_INFO(FI_LOG_EP_DATA, +- "Got unknown unexpected pkt: %" PRIu64 "\n", +- p->pkt_type); +- assert(0); +- ret = -FI_EOTHER; +- } +- +- fi_ibv_rdm_move_to_unexpected_queue(request, p->ep); +-fn: +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_recv_got_pkt(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- struct fi_ibv_recv_got_pkt_preprocess_data *p = data; +- struct fi_ibv_rdm_buf *rbuf = p->rbuf; +- ssize_t ret; +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4PKT); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- switch (p->pkt_type) { +- case FI_IBV_RDM_EAGER_PKT: +- case FI_IBV_RDM_MSG_PKT: +- { +- const size_t data_len = p->arrived_len - sizeof(rbuf->header); +- assert(data_len <= p->ep->rndv_threshold); +- +- if (request->parent) { +- if (!fi_ibv_rdm_repost_multi_recv(request, data_len, p->ep)) +- return -FI_ENOMEM; +- +- } +- +- if (request->len >= data_len) { +- request->minfo.conn = p->conn; +- request->minfo.tag = rbuf->header.tag; +- request->minfo.is_tagged = +- ((p->pkt_type == FI_IBV_RDM_EAGER_PKT) ? 1 : 0); +- +- request->len = data_len; +- request->exp_rbuf = &rbuf->payload; +- request->imm = p->imm_data; +- +- if (request->dest_buf) { +- assert(request->exp_rbuf); +- memcpy(request->dest_buf, +- request->exp_rbuf, request->len); +- } +- +- if (request->parent) { +- if (!fi_ibv_rdm_repost_multi_recv(request, data_len, +- p->ep)) +- return -FI_ENOMEM; +- } +- +- fi_ibv_rdm_cntr_inc(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- request->state.eager = +- FI_IBV_STATE_EAGER_READY_TO_FREE; +- fi_ibv_rdm_move_to_cq(p->ep->fi_rcq, request); +- } else { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, +- FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- } else { +- VERBS_INFO(FI_LOG_EP_DATA, +- "%s: %d RECV TRUNCATE, data_len=%zu, " +- "posted_len=%" PRIu64 ", conn %p, tag 0x%" PRIx64 ", " +- "tagmask %" PRIx64 "\n", +- __FUNCTION__, __LINE__, data_len, +- request->len, request->minfo.conn, +- request->minfo.tag, request->minfo.tagmask); +- +- if (request->parent) { +- if (!fi_ibv_rdm_repost_multi_recv(request, data_len, +- p->ep)) +- return -FI_ENOMEM; +- } +- +- request->state.eager = +- FI_IBV_STATE_EAGER_READY_TO_FREE; +- +- fi_ibv_rdm_cntr_inc_err(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(p->ep->fi_rcq, request, +- FI_ETRUNC); +- } +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG(); +- break; +- } +- case FI_IBV_RDM_RNDV_RTS_PKT: +- { +- struct fi_ibv_rdm_rndv_header *rndv_header = +- (void *)&rbuf->header; +- +- assert(p->arrived_len == sizeof(*rndv_header)); +- +- if (request->len < rndv_header->total_len) { +- /* rndv protocol finalization requires memory +- * deregistration, entry in errcq will be generated +- * after acknowledgement in normal flow */ +- request->state.err = FI_ETRUNC; +- } +- +- request->minfo.conn = p->conn; +- request->minfo.tag = rndv_header->base.tag; +- request->minfo.is_tagged = rndv_header->is_tagged; +- request->rndv.remote_addr = (void *)rndv_header->src_addr; +- request->rndv.mr_rkey = rndv_header->mem_rkey; +- request->len = rndv_header->total_len; +- request->rest_len = rndv_header->total_len; +- request->imm = p->imm_data; +- request->rndv.id = rndv_header->id; +- +- if (request->parent) { +- if (!fi_ibv_rdm_repost_multi_recv(request, +- rndv_header->total_len, +- p->ep)) +- return -FI_ENOMEM; +- } +- +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- if (ret) +- return ret; +- +- request->state.eager = FI_IBV_STATE_EAGER_RECV_END; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_WAIT4RES; +- FI_IBV_RDM_HNDL_REQ_LOG(); +- break; +- } +- default: +- VERBS_INFO(FI_LOG_EP_DATA, +- "Got unknown unexpected pkt: %" PRIu64 "\n", +- p->pkt_type); +- assert(0); +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return -FI_EOTHER; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_recv_process_unexp_pkt(struct fi_ibv_rdm_request *request, +- void *data) +-{ +- struct fi_ibv_recv_got_pkt_process_data *p = data; +- +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert((request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4RECV) || +- (request->state.eager == FI_IBV_STATE_EAGER_RECV_CLAIMED)); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- if (request->dest_buf && request->len != 0) { +- memcpy(request->dest_buf, request->unexp_rbuf, request->len); +- } +- +- if (request->unexp_rbuf) { +- util_buf_release( +- request->ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- request->unexp_rbuf = NULL; +- } +- +- fi_ibv_rdm_cntr_inc(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- fi_ibv_rdm_move_to_cq(p->ep->fi_rcq, request); +- } else { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_tagged_recv_claim(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4RECV); +- assert((request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED) || +- (request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES)); +- +- ssize_t ret = FI_SUCCESS; +- struct fi_ibv_rdm_tagged_peek_data *peek_data = data; +- assert(peek_data->context); +- +- request->state.eager = FI_IBV_STATE_EAGER_RECV_CLAIMED; +- request->context = peek_data->context; +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_eager_recv_discard(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_WAIT4RECV); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- assert(data == NULL); +- +- fi_ibv_rdm_remove_from_unexp_queue(request); +- +- if (request->unexp_rbuf) { +- util_buf_release( +- request->ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- request->unexp_rbuf = NULL; +- } +- +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static inline ssize_t +-fi_ibv_rdm_rndv_read_reg_mr(struct fi_ibv_rdm_ep *ep, +- struct fi_ibv_rdm_request *request) +-{ +- return ep->domain->internal_mr_reg(ep->domain, +- (void *)request->src_addr, +- request->len, +- FI_REMOTE_READ, +- &request->rndv.md); +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_recv_post_read(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_END); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES); +- +- struct fi_ibv_rdm_tagged_send_ready_data *p = data; +- const size_t offset = request->len - request->rest_len; +- const size_t seg_cursize = +- MIN(p->ep->rndv_seg_size, request->rest_len); +- struct ibv_send_wr wr = { 0 }; +- struct ibv_send_wr *bad_wr = NULL; +- struct ibv_sge sge; +- ssize_t ret = FI_SUCCESS; +- +- fi_ibv_rdm_remove_from_postponed_queue(request); +- VERBS_DBG(FI_LOG_EP_DATA, +- "\t REQUEST: conn %p, tag 0x%" PRIx64 +- ", len %" PRIu64 ", rest %" PRIu64 +- ", dest_buf %p, src_addr %p, rkey 0x%"PRIx64"\n", +- request->minfo.conn, request->minfo.tag, request->len, +- request->rest_len, request->dest_buf, +- request->rndv.remote_addr, request->rndv.mr_rkey); +- +- assert((request->minfo.conn->cm_role != FI_VERBS_CM_SELF) || +- (request->rndv.remote_addr != request->dest_buf)); +- +- /* First segment */ +- if (offset == 0) { +- ret = fi_ibv_rdm_rndv_read_reg_mr(p->ep, request); +- if (ret) { +- return ret; +- } +- request->post_counter = 0; +- } +- +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.opcode = IBV_WR_RDMA_READ; +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.send_flags = 0; +- wr.wr.rdma.remote_addr = (uintptr_t) +- ((char *)request->rndv.remote_addr + offset); +- wr.wr.rdma.rkey = request->rndv.mr_rkey; +- +- sge.addr = (uintptr_t)((char *)request->dest_buf + offset); +- sge.length = (request->state.err == FI_SUCCESS ? seg_cursize : 0); +- sge.lkey = fi_ibv_mr_internal_lkey(&request->rndv.md); +- +- request->rest_len -= seg_cursize; +- request->post_counter++; +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- VERBS_DBG(FI_LOG_EP_DATA, "posted %d bytes, conn %p, tag 0x%" PRIx64 "\n", +- sge.length, request->minfo.conn, request->minfo.tag); +- ret = ibv_post_send(request->minfo.conn->qp[0], &wr, &bad_wr); +- if (ret) { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- assert(0); +- return -errno; +- }; +- +- if (request->rest_len && request->state.err == FI_SUCCESS) { +- /* Move to postponed queue for the next iteration */ +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_RECV_END; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_WAIT4LC; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_recv_read_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- struct fi_ibv_rdm_conn *conn = request->minfo.conn; +- struct fi_ibv_rdm_buf *sbuf = request->sbuf; +- const int ack_size = +- sizeof(struct fi_ibv_rdm_header) + sizeof(request->rndv.id); +- struct ibv_sge sge = { +- .addr = (uintptr_t)sbuf, +- .length = ack_size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE, +- .lkey = fi_ibv_mr_internal_lkey(&conn->s_md), +- }; +- struct ibv_send_wr wr = { +- .wr_id = FI_IBV_RDM_PACK_WR(request), +- .opcode = p->ep->eopcode, +- .sg_list = &sge, +- .num_sge = 1, +- .wr.rdma.remote_addr = +- (uintptr_t)fi_ibv_rdm_get_remote_addr(conn, +- request->sbuf), +- .wr.rdma.rkey = conn->remote_rbuf_rkey, +- .send_flags = (sge.length < p->ep->max_inline_rc) ? +- IBV_SEND_INLINE : 0, +- }; +- struct ibv_send_wr *bad_wr = NULL; +- ssize_t ret = FI_SUCCESS; +- +- assert(request->len > (p->ep->rndv_threshold +- - sizeof(struct fi_ibv_rdm_header))); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RECV_END); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4LC || +- request->state.rndv == FI_IBV_STATE_RNDV_RECV_WAIT4RES); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(conn, p->ep); +- request->post_counter--; +- +- if (request->rest_len || request->post_counter) { +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +- } +- +- assert(request->sbuf); +- +- sbuf->header.tag = 0; +- sbuf->header.service_tag = 0; +- FI_IBV_RDM_SET_PKTTYPE(sbuf->header.service_tag, +- FI_IBV_RDM_RNDV_ACK_PKT); +- sbuf->service_data.pkt_len = ack_size; +- memcpy(&sbuf->payload, &request->rndv.id, sizeof(request->rndv.id)); +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- VERBS_DBG(FI_LOG_EP_DATA, +- "posted %d bytes, conn %p, tag 0x%" PRIx64 ", request %p\n", +- sge.length, request->minfo.conn, request->minfo.tag, request); +- ret = ibv_post_send(conn->qp[0], &wr, &bad_wr); +- if (ret == 0) { +- assert(request->rndv.md.mr); +- p->ep->domain->internal_mr_dereg(&request->rndv.md); +- VERBS_DBG(FI_LOG_EP_DATA, +- "SENDING RNDV ACK: conn %p, sends_outgoing = %"PRIu32", " +- "post_sends = %"PRIu32"\n", +- conn, conn->av_entry->sends_outgoing, +- p->ep->posted_sends); +- } else { +- VERBS_INFO_ERRNO(FI_LOG_EP_DATA, "ibv_post_send", errno); +- assert(0); +- ret = -errno; +- request->state.err = ret; +- } +- request->state.eager = FI_IBV_STATE_EAGER_SEND_WAIT4LC; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_END; +- +- if (request->state.err == FI_SUCCESS) { +- fi_ibv_rdm_cntr_inc(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_cq(p->ep->fi_rcq, request); +- } +- } else { +- fi_ibv_rdm_cntr_inc_err(p->ep->recv_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_errcq(p->ep->fi_rcq, request, +- request->state.err); +- } +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_rndv_recv_ack_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_SEND_WAIT4LC || +- request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_RECV_END); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- +- if (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- request->state.rndv = FI_IBV_STATE_RNDV_RECV_END; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_init_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_BEGIN); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- struct fi_ibv_rdm_rma_start_data *p = +- (struct fi_ibv_rdm_rma_start_data *)data; +- ssize_t ret = FI_SUCCESS; +- int lmr_access = 0; +- +- request->context = p->context; +- request->minfo.conn = p->conn; +- request->len = p->data_len; +- request->rest_len = p->data_len; +- request->post_counter = 0; +- +- request->rma.remote_addr = p->rbuf; +- request->rma.mr_rkey = p->mr_rkey; +- request->rma.mr_lkey = p->mr_lkey; +- request->rma.opcode = p->op_code; +- assert(!request->rma.md.mr); +- +- request->comp_flags = p->flags; +- if (p->op_code == IBV_WR_RDMA_READ) { +- request->dest_buf = (void*)p->lbuf; +- lmr_access |= FI_READ; +- } else { +- assert(p->op_code == IBV_WR_RDMA_WRITE); +- lmr_access |= FI_WRITE; +- request->src_addr = (void*)p->lbuf; +- } +- +- if (request->rmabuf && request->len >= p->ep_rdm->max_inline_rc) { +- memcpy(&request->rmabuf->payload, request->src_addr, +- request->len); +- } else if (!request->rmabuf && !p->mr_lkey) { +- ret = p->ep_rdm->domain->internal_mr_reg(p->ep_rdm->domain, +- (void *)p->lbuf, p->data_len, +- lmr_access, +- &request->rma.md); +- if (!ret) +- request->rma.mr_lkey = +- fi_ibv_mr_internal_lkey(&request->rma.md); +- } +- +- request->state.eager = FI_IBV_STATE_EAGER_RMA_INITIALIZED; +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_inject_request(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RMA_INJECT); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- +- struct ibv_sge sge = { 0 }; +- struct ibv_send_wr wr = { 0 }; +- struct ibv_send_wr *bad_wr = NULL; +- struct fi_ibv_rdm_rma_start_data *p = data; +- int ret; +- +- request->minfo.conn = p->conn; +- request->len = p->data_len; +- request->comp_flags = p->flags; +- request->rmabuf = NULL; +- +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.wr.rdma.remote_addr = p->rbuf; +- wr.wr.rdma.rkey = p->mr_rkey; +- wr.send_flags = 0; +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.opcode = IBV_WR_RDMA_WRITE; +- sge.length = request->len; +- sge.addr = p->lbuf; +- +- if ((request->len < p->ep_rdm->max_inline_rc) && +- (!RMA_RESOURCES_IS_BUSY(request->minfo.conn, p->ep_rdm)) && +- fi_ibv_rdm_check_connection(request->minfo.conn)) { +- wr.send_flags |= IBV_SEND_INLINE; +- } else if (fi_ibv_rdm_prepare_rma_request(request, p->ep_rdm)) { +- memcpy(&request->rmabuf->payload, (void*)p->lbuf, p->data_len); +- sge.addr = (uintptr_t)&request->rmabuf->payload; +- sge.lkey = fi_ibv_mr_internal_rkey( +- &request->minfo.conn->rma_md); +- } else { +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return -FI_EAGAIN; +- } +- +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep_rdm); +- +- ret = ibv_post_send(request->minfo.conn->qp[0], &wr, &bad_wr); +- request->state.eager = FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC; +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return (ret == 0) ? FI_SUCCESS : -errno; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_post_ready(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert((request->state.eager == FI_IBV_STATE_EAGER_RMA_INITIALIZED && +- request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED) || +- (request->state.eager == FI_IBV_STATE_EAGER_RMA_POSTPONED && +- request->state.rndv == FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC)); +- +- int ret; +- struct fi_ibv_rma_post_ready_data *p = data; +- +- const size_t offset = request->len - request->rest_len; +- const size_t seg_cursize = +- MIN(p->ep_rdm->rndv_seg_size, request->rest_len); +- +- struct ibv_sge sge = { 0 }; +- struct ibv_send_wr wr = { 0 }; +- struct ibv_send_wr *bad_wr = NULL; +- +- wr.wr_id = FI_IBV_RDM_PACK_WR(request); +- assert(FI_IBV_RDM_CHECK_SERVICE_WR_FLAG(wr.wr_id) == 0); +- wr.sg_list = &sge; +- wr.num_sge = 1; +- wr.wr.rdma.remote_addr = request->rma.remote_addr; +- wr.wr.rdma.rkey = request->rma.mr_rkey; +- wr.send_flags = 0; +- wr.opcode = request->rma.opcode; +- +- if (request->state.eager == FI_IBV_STATE_EAGER_RMA_POSTPONED) { +- fi_ibv_rdm_remove_from_postponed_queue(request); +- request->state.eager = FI_IBV_STATE_EAGER_RMA_INITIALIZED; +- } +- +- /* buffered operation */ +- if (request->rmabuf) { +- if (request->rma.opcode == IBV_WR_RDMA_WRITE && +- request->len < p->ep_rdm->max_inline_rc) { +- wr.send_flags |= IBV_SEND_INLINE; +- sge.addr = (uintptr_t)request->src_addr; +- } else { +- sge.addr = (uintptr_t)&request->rmabuf->payload; +- sge.lkey = fi_ibv_mr_internal_lkey( +- &request->minfo.conn->rma_md); +- } +- request->state.eager = FI_IBV_STATE_EAGER_RMA_WAIT4LC; +- } else { +- /* src_addr or dest_buf from an union +- * for write or read properly */ +- sge.addr = ((uintptr_t)request->src_addr) + offset; +- sge.lkey = request->rma.mr_lkey; +- request->state.rndv = FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC; +- } +- +- sge.length = seg_cursize; +- +- request->rest_len -= seg_cursize; +- request->post_counter++; +- FI_IBV_RDM_INC_SIG_POST_COUNTERS(request->minfo.conn, p->ep_rdm); +- +- ret = ibv_post_send(request->minfo.conn->qp[0], &wr, &bad_wr); +- if (request->rest_len && !ret) { +- ret = fi_ibv_rdm_move_to_postponed_queue(request); +- if (ret) +- return ret; +- request->state.eager = FI_IBV_STATE_EAGER_RMA_POSTPONED; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return (!ret) ? FI_SUCCESS : -errno; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_inject_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- assert(request->state.eager == FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- if (request->rmabuf) { +- fi_ibv_rdm_set_buffer_status(request->rmabuf, BUF_STATUS_FREE); +- } /* else inline flag was set */ +- +- FI_IBV_RDM_HNDL_REQ_LOG(); +- +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(request->ep->fi_ibv_rdm_request_pool, +- request); +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- +- return FI_SUCCESS; +-} +- +-static ssize_t +-fi_ibv_rdm_rma_buffered_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_RMA_WAIT4LC); +- assert(request->state.rndv == FI_IBV_STATE_RNDV_NOT_USED); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- +- assert(request->rmabuf); +- if (request->rma.opcode == IBV_WR_RDMA_READ) { +- memcpy(request->dest_buf, &request->rmabuf->payload, request->len); +- } +- fi_ibv_rdm_set_buffer_status(request->rmabuf, BUF_STATUS_FREE); +- +- if (request->rma.opcode == IBV_WR_RDMA_READ) { +- fi_ibv_rdm_cntr_inc(p->ep->read_cntr); +- } else if (request->rma.opcode == IBV_WR_RDMA_WRITE) { +- fi_ibv_rdm_cntr_inc(p->ep->write_cntr); +- } +- +- if (request->comp_flags & FI_COMPLETION) { +- fi_ibv_rdm_move_to_cq(p->ep->fi_scq, request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- FI_IBV_RDM_HNDL_REQ_LOG(); +- } +- +- if (request->state.eager == FI_IBV_STATE_EAGER_READY_TO_FREE) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } else { +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return FI_SUCCESS; +-} +- +- +-static ssize_t +-fi_ibv_rdm_rma_zerocopy_lc(struct fi_ibv_rdm_request *request, void *data) +-{ +- ssize_t ret = FI_SUCCESS; +- FI_IBV_RDM_HNDL_REQ_LOG_IN(); +- +- assert(request->state.eager == FI_IBV_STATE_EAGER_RMA_INITIALIZED || +- (request->state.eager == FI_IBV_STATE_EAGER_RMA_POSTPONED)); +- assert(request->state.rndv == FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC); +- assert(!request->rmabuf); +- +- VERBS_DBG(FI_LOG_EP_DATA, "conn %p, tag 0x%" PRIx64 ", len %" PRIu64 "\n", +- request->minfo.conn, request->minfo.tag, request->len); +- +- struct fi_ibv_rdm_tagged_send_completed_data *p = data; +- FI_IBV_RDM_DEC_SIG_POST_COUNTERS(request->minfo.conn, p->ep); +- request->post_counter--; +- +- if (request->rest_len == 0 && request->post_counter == 0) { +- if (request->rma.md.mr) +- ret = p->ep->domain->internal_mr_dereg(&request->rma.md); +- +- if (request->rma.opcode == IBV_WR_RDMA_READ) +- fi_ibv_rdm_cntr_inc(p->ep->read_cntr); +- else if (request->rma.opcode == IBV_WR_RDMA_WRITE) +- fi_ibv_rdm_cntr_inc(p->ep->write_cntr); +- +- if (request->comp_flags & FI_COMPLETION) { +- if (ret) +- fi_ibv_rdm_move_to_errcq(p->ep->fi_scq, request, ret); +- else +- fi_ibv_rdm_move_to_cq(p->ep->fi_scq, request); +- request->state.eager = FI_IBV_STATE_EAGER_READY_TO_FREE; +- request->state.rndv = FI_IBV_STATE_ZEROCOPY_RMA_END; +- } else { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release( +- request->ep->fi_ibv_rdm_request_pool, +- request); +- } +- } +- +- FI_IBV_RDM_HNDL_REQ_LOG_OUT(); +- return ret; +-} +- +-static ssize_t +-fi_ibv_rdm_req_hndl_err(struct fi_ibv_rdm_request *request, void *data) +-{ +- VERBS_INFO(FI_LOG_EP_DATA, +- "\t> IN\t< eager_state = %s, rndv_state = %s, len = %lu\n", +- fi_ibv_rdm_req_eager_state_to_str(request->state.eager), +- fi_ibv_rdm_req_rndv_state_to_str(request->state.rndv), +- request->len); +- +- assert(0); +- return -FI_EOTHER; +-} +- +-ssize_t fi_ibv_rdm_req_hndls_init(void) +-{ +- size_t i, j, k; +- +- for (i = 0; i < FI_IBV_STATE_EAGER_COUNT; ++i) { +- for (j = 0; j < FI_IBV_STATE_RNDV_COUNT; ++j) { +- for (k = 0; k < FI_IBV_EVENT_COUNT; ++k) { +- fi_ibv_rdm_req_hndl_arr[i][j][k] = +- fi_ibv_rdm_req_hndl_err; +- } +- } +- } +- +- // EAGER_SEND stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_SEND_START] = +- fi_ibv_rdm_init_send_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_POSTPONED] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_eager_send_ready; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_eager_send_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_READY_TO_FREE] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_eager_send_lc; +- +- // EAGER_RECV stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_START] = +- fi_ibv_rdm_init_recv_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_PEEK] = +- fi_ibv_rdm_tagged_peek_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_CLAIM] = +- fi_ibv_rdm_tagged_recv_claim; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_GOT_PKT_PROCESS] = +- fi_ibv_rdm_init_unexp_recv_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4PKT] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_GOT_PKT_PROCESS] = +- fi_ibv_rdm_eager_recv_got_pkt; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4RECV] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_START] = +- fi_ibv_rdm_eager_recv_process_unexp_pkt; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4RECV] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_CLAIM] = +- fi_ibv_rdm_tagged_recv_claim; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_CLAIMED] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_START] = +- fi_ibv_rdm_eager_recv_process_unexp_pkt; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4RECV] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RECV_DISCARD] = +- fi_ibv_rdm_eager_recv_discard; +- +- // RNDV_SEND stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_SEND_BEGIN][FI_IBV_EVENT_SEND_START] = +- fi_ibv_rdm_init_send_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_POSTPONED] +- [FI_IBV_STATE_RNDV_SEND_WAIT4SEND][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rndv_rts_send_ready; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_SEND_WAIT4ACK][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_rts_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_READY_TO_FREE] +- [FI_IBV_STATE_RNDV_SEND_END][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_rts_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_SEND_END][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_rts_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_SEND_WAIT4ACK][FI_IBV_EVENT_RECV_GOT_PKT_PROCESS] +- = fi_ibv_rdm_rndv_end; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_END] +- [FI_IBV_STATE_RNDV_SEND_WAIT4ACK][FI_IBV_EVENT_RECV_GOT_PKT_PROCESS] +- = fi_ibv_rdm_rndv_end; +- +- // RNDV_RECV stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_RECV_BEGIN][FI_IBV_EVENT_RECV_START] = +- fi_ibv_rdm_init_recv_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_WAIT4RECV] +- [FI_IBV_STATE_RNDV_RECV_WAIT4RES][FI_IBV_EVENT_RECV_CLAIM] = +- fi_ibv_rdm_tagged_recv_claim; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_END] +- [FI_IBV_STATE_RNDV_RECV_WAIT4RES][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rndv_recv_post_read; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_END] +- [FI_IBV_STATE_RNDV_RECV_WAIT4RES][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_recv_read_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_END] +- [FI_IBV_STATE_RNDV_RECV_WAIT4LC][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_recv_read_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RECV_END] +- [FI_IBV_STATE_RNDV_RECV_WAIT4LC][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rndv_recv_read_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_SEND_WAIT4LC] +- [FI_IBV_STATE_RNDV_RECV_END][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_recv_ack_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_READY_TO_FREE] +- [FI_IBV_STATE_RNDV_RECV_END][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rndv_recv_ack_lc; +- +- // RMA read/write stuff +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_BEGIN] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RMA_START] = +- fi_ibv_rdm_rma_init_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_INJECT] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_RMA_START] = +- fi_ibv_rdm_rma_inject_request; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_INITIALIZED] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rma_post_ready; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_POSTPONED] +- [FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC][FI_IBV_EVENT_POST_READY] = +- fi_ibv_rdm_rma_post_ready; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_WAIT4LC] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rma_buffered_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC] +- [FI_IBV_STATE_RNDV_NOT_USED][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rma_inject_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_INITIALIZED] +- [FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rma_zerocopy_lc; +- fi_ibv_rdm_req_hndl_arr[FI_IBV_STATE_EAGER_RMA_POSTPONED] +- [FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC][FI_IBV_EVENT_POST_LC] = +- fi_ibv_rdm_rma_zerocopy_lc; +- +- return FI_SUCCESS; +-} +- +-ssize_t fi_ibv_rdm_req_hndls_clean(void) +-{ +- size_t i, j, k; +- for (i = 0; i < FI_IBV_STATE_EAGER_COUNT; ++i) { +- for (j = 0; j < FI_IBV_STATE_RNDV_COUNT; ++j) { +- for (k = 0; k < FI_IBV_EVENT_COUNT; ++k) { +- fi_ibv_rdm_req_hndl_arr[i][j][k] = NULL; +- } +- } +- } +- return FI_SUCCESS; +-} +- +-ssize_t +-fi_ibv_rdm_req_hndl(struct fi_ibv_rdm_request * request, +- enum fi_ibv_rdm_request_event event, void *data) +-{ +- VERBS_DBG(FI_LOG_EP_DATA, "\t%p, eager_state = %s, rndv_state = %s, event = %s\n", +- request, +- fi_ibv_rdm_req_eager_state_to_str(request->state.eager), +- fi_ibv_rdm_req_rndv_state_to_str(request->state.rndv), +- fi_ibv_rdm_event_to_str(event)); +- assert(fi_ibv_rdm_req_hndl_arr[request->state.eager] +- [request->state.rndv][event]); +- +- return fi_ibv_rdm_req_hndl_arr[request->state.eager] +- [request->state.rndv] +- [event] (request, data); +-} +- +-char * +-fi_ibv_rdm_req_eager_state_to_str(enum fi_ibv_rdm_request_eager_state state) +-{ +- switch (state) { +- case FI_IBV_STATE_EAGER_BEGIN: +- return "STATE_EAGER_BEGIN"; +- +- case FI_IBV_STATE_EAGER_SEND_POSTPONED: +- return "STATE_EAGER_SEND_POSTPONED"; +- case FI_IBV_STATE_EAGER_SEND_WAIT4LC: +- return "STATE_EAGER_SEND_WAIT4LC"; +- case FI_IBV_STATE_EAGER_SEND_END: +- return "STATE_EAGER_SEND_END"; +- +- case FI_IBV_STATE_EAGER_RECV_BEGIN: +- return "STATE_EAGER_RECV_BEGIN"; +- case FI_IBV_STATE_EAGER_RECV_WAIT4PKT: +- return "STATE_EAGER_RECV_WAIT4PKT"; +- case FI_IBV_STATE_EAGER_RECV_WAIT4RECV: +- return "STATE_EAGER_RECV_WAIT4RECV"; +- case FI_IBV_STATE_EAGER_RECV_CLAIMED: +- return "FI_IBV_STATE_EAGER_RECV_CLAIMED"; +- case FI_IBV_STATE_EAGER_RECV_END: +- return "STATE_EAGER_RECV_END"; +- +- case FI_IBV_STATE_EAGER_RMA_INJECT: +- return "FI_IBV_STATE_EAGER_RMA_INJECT"; +- case FI_IBV_STATE_EAGER_RMA_INITIALIZED: +- return "FI_IBV_STATE_EAGER_RMA_INITIALIZED"; +- case FI_IBV_STATE_EAGER_RMA_POSTPONED: +- return "FI_IBV_STATE_EAGER_RMA_POSTPONED"; +- case FI_IBV_STATE_EAGER_RMA_WAIT4LC: +- return "FI_IBV_STATE_EAGER_RMA_WAIT4LC"; +- case FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC: +- return "FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC"; +- case FI_IBV_STATE_EAGER_RMA_END: +- return "FI_IBV_STATE_EAGER_RMA_END"; +- +- case FI_IBV_STATE_EAGER_READY_TO_FREE: +- return "STATE_EAGER_READY_TO_FREE"; +- +- case FI_IBV_STATE_EAGER_COUNT: +- return "STATE_EAGER_COUNT"; +- default: +- return "STATE_EAGER_UNKNOWN!!!"; +- } +-} +- +-char *fi_ibv_rdm_req_rndv_state_to_str(enum fi_ibv_rdm_request_rndv_state state) +-{ +- switch (state) { +- case FI_IBV_STATE_RNDV_NOT_USED: +- return "STATE_RNDV_NOT_USED"; +- case FI_IBV_STATE_RNDV_SEND_BEGIN: +- return "STATE_RNDV_SEND_BEGIN"; +- case FI_IBV_STATE_RNDV_SEND_WAIT4SEND: +- return "STATE_RNDV_SEND_WAIT4SEND"; +- case FI_IBV_STATE_RNDV_SEND_WAIT4ACK: +- return "STATE_RNDV_SEND_WAIT4ACK"; +- case FI_IBV_STATE_RNDV_SEND_END: +- return "STATE_RNDV_SEND_END"; +- +- case FI_IBV_STATE_RNDV_RECV_BEGIN: +- return "STATE_RNDV_RECV_BEGIN"; +- case FI_IBV_STATE_RNDV_RECV_WAIT4RES: +- return "STATE_RNDV_RECV_WAIT4RES"; +- case FI_IBV_STATE_RNDV_RECV_WAIT4RECV: +- return "STATE_RNDV_RECV_WAIT4RECV"; +- case FI_IBV_STATE_RNDV_RECV_WAIT4LC: +- return "STATE_RNDV_RECV_WAIT4LC"; +- case FI_IBV_STATE_RNDV_RECV_END: +- return "STATE_RNDV_RECV_END"; +- +- case FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC: +- return "FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC"; +- case FI_IBV_STATE_ZEROCOPY_RMA_END: +- return "FI_IBV_STATE_ZEROCOPY_RMA_END"; +- +- case FI_IBV_STATE_RNDV_COUNT: +- return "STATE_RNDV_COUNT"; +- default: +- return "STATE_RNDV_UNKNOWN!!!"; +- } +-} +- +-char *fi_ibv_rdm_event_to_str(enum fi_ibv_rdm_request_event event) +-{ +- switch (event) { +- case FI_IBV_EVENT_SEND_START: +- return "EVENT_SEND_START"; +- case FI_IBV_EVENT_POST_READY: +- return "FI_IBV_EVENT_POST_READY"; +- case FI_IBV_EVENT_POST_LC: +- return "FI_IBV_EVENT_POST_LC"; +- +- case FI_IBV_EVENT_RECV_START: +- return "EVENT_RECV_START"; +- case FI_IBV_EVENT_RECV_GOT_PKT_PREPROCESS: +- return "EVENT_RECV_GOT_PKT_PREPROCESS"; +- case FI_IBV_EVENT_RECV_GOT_PKT_PROCESS: +- return "EVENT_RECV_GOT_PKT_PROCESS"; +- case FI_IBV_EVENT_RECV_GOT_ACK: +- return "EVENT_RECV_GOT_ACK"; +- case FI_IBV_EVENT_RECV_PEEK: +- return "FI_IBV_EVENT_RECV_PEEK"; +- case FI_IBV_EVENT_RECV_CLAIM: +- return "FI_IBV_EVENT_RECV_CLAIM"; +- case FI_IBV_EVENT_RECV_DISCARD: +- return "FI_IBV_EVENT_RECV_DISCARD"; +- +- case FI_IBV_EVENT_RMA_START: +- return "FI_IBV_EVENT_RMA_START"; +- +- case FI_IBV_EVENT_COUNT: +- return "EVENT_COUNT"; +- default: +- return "EVENT_UNKNOWN!!!"; +- } +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.h +deleted file mode 100644 +index a4c84a405..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_tagged_ep_rdm_states.h ++++ /dev/null +@@ -1,199 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _VERBS_TAGGED_EP_RDM_STATES_H +-#define _VERBS_TAGGED_EP_RDM_STATES_H +- +-#include +-#include +- +-struct fi_ibv_rdm_request; +-struct fi_verbs_rdm_request_minfo; +- +-enum fi_ibv_rdm_request_eager_state { +- FI_IBV_STATE_EAGER_BEGIN = 0, // must be 0 +- +- FI_IBV_STATE_EAGER_SEND_POSTPONED, +- FI_IBV_STATE_EAGER_SEND_WAIT4LC, // wait for local completion +- FI_IBV_STATE_EAGER_SEND_END, +- +- FI_IBV_STATE_EAGER_RECV_BEGIN, +- FI_IBV_STATE_EAGER_RECV_WAIT4PKT, +- FI_IBV_STATE_EAGER_RECV_WAIT4RECV, +- FI_IBV_STATE_EAGER_RECV_CLAIMED, +- FI_IBV_STATE_EAGER_RECV_END, +- +- FI_IBV_STATE_EAGER_RMA_INJECT, +- FI_IBV_STATE_EAGER_RMA_INITIALIZED, +- FI_IBV_STATE_EAGER_RMA_POSTPONED, +- FI_IBV_STATE_EAGER_RMA_WAIT4LC, +- FI_IBV_STATE_EAGER_RMA_INJECT_WAIT4LC, +- FI_IBV_STATE_EAGER_RMA_END, +- +- FI_IBV_STATE_EAGER_READY_TO_FREE, +- +- FI_IBV_STATE_EAGER_COUNT // must be last +-}; +- +-char * +-fi_ibv_rdm_req_eager_state_to_str(enum fi_ibv_rdm_request_eager_state state); +- +-enum fi_ibv_rdm_request_rndv_state { +- FI_IBV_STATE_RNDV_NOT_USED = 0, // must be 0 +- FI_IBV_STATE_RNDV_SEND_BEGIN, +- // FI_IBV_STATE_RNDV_SEND_WAIT4CTS, // not implemented yet +- FI_IBV_STATE_RNDV_SEND_WAIT4SEND, +- FI_IBV_STATE_RNDV_SEND_WAIT4ACK, +- FI_IBV_STATE_RNDV_SEND_END, +- +- FI_IBV_STATE_RNDV_RECV_BEGIN, +- FI_IBV_STATE_RNDV_RECV_WAIT4RES, +- FI_IBV_STATE_RNDV_RECV_WAIT4RECV, +- FI_IBV_STATE_RNDV_RECV_WAIT4LC, +- FI_IBV_STATE_RNDV_RECV_END, +- +- FI_IBV_STATE_ZEROCOPY_RMA_WAIT4LC, +- FI_IBV_STATE_ZEROCOPY_RMA_END, +- +- FI_IBV_STATE_RNDV_COUNT // must be last +-}; +- +-char * +-fi_ibv_rdm_req_rndv_state_to_str(enum fi_ibv_rdm_request_rndv_state state); +- +-enum fi_ibv_rdm_request_event { +- FI_IBV_EVENT_SEND_START = 0, +- FI_IBV_EVENT_POST_READY, +- FI_IBV_EVENT_POST_LC, +- +- FI_IBV_EVENT_RECV_START, +- FI_IBV_EVENT_RECV_GOT_PKT_PREPROCESS, +- FI_IBV_EVENT_RECV_GOT_PKT_PROCESS, +- FI_IBV_EVENT_RECV_GOT_ACK, +- FI_IBV_EVENT_RECV_PEEK, +- FI_IBV_EVENT_RECV_CLAIM, +- FI_IBV_EVENT_RECV_DISCARD, +- +- FI_IBV_EVENT_RMA_START, +- +- FI_IBV_EVENT_COUNT // must be last +-}; +- +-char *fi_ibv_rdm_event_to_str(enum fi_ibv_rdm_request_event event); +- +-// Send service data types +- +-enum ibv_rdm_send_type +-{ +- IBV_RDM_SEND_TYPE_UND = 0, +- IBV_RDM_SEND_TYPE_GEN, +- IBV_RDM_SEND_TYPE_INJ, +- IBV_RDM_SEND_TYPE_VEC +-}; +- +-struct fi_ibv_rdm_send_start_data { +- struct fi_ibv_rdm_ep *ep_rdm; +- struct fi_ibv_rdm_conn *conn; +- void *context; +- uint64_t flags; +- size_t tag; +- size_t data_len; +- union { +- void *src_addr; +- struct iovec* iovec_arr; +- } buf; +- int iov_count; +- int is_tagged; +- unsigned int imm; +- enum ibv_rdm_send_type stype; +-}; +- +-struct fi_ibv_rdm_tagged_send_ready_data { +- struct fi_ibv_rdm_ep *ep; +-}; +- +-struct fi_ibv_rdm_tagged_send_completed_data { +- struct fi_ibv_rdm_ep *ep; +-}; +- +-// Recv service data types +- +-struct fi_ibv_rdm_tagged_recv_start_data { +- struct fi_ibv_rdm_tagged_peek_data peek_data; +- struct fi_context *context; +- struct fi_ibv_rdm_ep *ep; +- void *dest_addr; +- size_t data_len; +-}; +- +-struct fi_ibv_recv_got_pkt_preprocess_data { +- struct fi_ibv_rdm_conn *conn; +- struct fi_ibv_rdm_ep *ep; +- struct fi_ibv_rdm_buf *rbuf; +- size_t arrived_len; +- uint64_t pkt_type; +- int imm_data; +-}; +- +-struct fi_ibv_recv_got_pkt_process_data { +- struct fi_ibv_rdm_ep *ep; +-} ; +- +-// rma service data types +- +- +-struct fi_ibv_rdm_rma_start_data { +- struct fi_ibv_rdm_ep *ep_rdm; +- struct fi_ibv_rdm_conn *conn; +- void *context; +- uint64_t flags; +- uint64_t data_len; +- uintptr_t rbuf; +- uintptr_t lbuf; +- uint64_t mr_rkey; +- uint64_t mr_lkey; +- enum ibv_wr_opcode op_code; +-}; +- +-struct fi_ibv_rma_post_ready_data { +- struct fi_ibv_rdm_ep *ep_rdm; +-}; +- +-// Interfaces +- +-ssize_t fi_ibv_rdm_req_hndls_init(void); +-ssize_t fi_ibv_rdm_req_hndls_clean(void); +-ssize_t fi_ibv_rdm_req_hndl(struct fi_ibv_rdm_request *request, +- enum fi_ibv_rdm_request_event event, +- void *data); +- +-#endif /* _VERBS_TAGGED_EP_RDM_STATES_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.c +deleted file mode 100644 +index f5e7ff24f..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.c ++++ /dev/null +@@ -1,309 +0,0 @@ +-/* +- * Copyright (c) 2016, Cisco Systems, Inc. All rights reserved. +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include +-#include +- +-#include +-#include "../fi_verbs.h" +-#include "verbs_utils.h" +-#include "verbs_rdm.h" +-#include "verbs_queuing.h" +- +-size_t rdm_buffer_size(size_t buf_send_size) +-{ +- size_t size = buf_send_size + FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE + +- sizeof(struct fi_ibv_rdm_header) + FI_IBV_BUF_ALIGNMENT; +- size -= (size % FI_IBV_BUF_ALIGNMENT); +- return size; +-} +- +-int fi_ibv_rdm_req_match(struct dlist_entry *item, const void *other) +-{ +- const struct fi_ibv_rdm_request *req = other; +- return (item == &req->queue_entry); +-} +- +-int fi_ibv_rdm_req_match_by_info(struct dlist_entry *item, const void *info) +-{ +- struct fi_ibv_rdm_request *request = +- container_of(item, struct fi_ibv_rdm_request, queue_entry); +- +- const struct fi_ibv_rdm_minfo *minfo = info; +- +- return ( +- ((request->minfo.conn == NULL) || +- (request->minfo.conn == minfo->conn)) +- && +- (request->minfo.is_tagged ? +- ((request->minfo.tag & request->minfo.tagmask) == +- (minfo->tag & request->minfo.tagmask)) : +- (request->minfo.is_tagged == minfo->is_tagged)) +- ); +-} +- +-/* +- * The same as fi_ibv_rdm_req_match_by_info but conn and tagmask fields +- * are used for matching instead of request's ones +- */ +-int fi_ibv_rdm_req_match_by_info2(struct dlist_entry *item, const void *info) +-{ +- struct fi_ibv_rdm_request *request = +- container_of(item, struct fi_ibv_rdm_request, queue_entry); +- +- const struct fi_ibv_rdm_minfo *minfo = info; +- +- return ( +- ((minfo->conn == NULL) || +- (request->minfo.conn == minfo->conn)) +- && +- (minfo->is_tagged ? +- ((request->minfo.tag & minfo->tagmask) == +- (minfo->tag & minfo->tagmask)) : +- (request->minfo.is_tagged == minfo->is_tagged)) +- ); +-} +- +-/* +- * The same as fi_ibv_rdm_tagged_req_match_by_info2 but context field is added +- * to compare +- */ +-int fi_ibv_rdm_req_match_by_info3(struct dlist_entry *item, const void *info) +-{ +- struct fi_ibv_rdm_request *request = +- container_of(item, struct fi_ibv_rdm_request, queue_entry); +- +- const struct fi_ibv_rdm_tagged_peek_data *peek_data = info; +- const void *context = (peek_data->flags & FI_CLAIM) ? +- peek_data->context : NULL; +- +- return ((request->context == context) && +- fi_ibv_rdm_req_match_by_info2(item, &peek_data->minfo)); +-} +- +-int fi_ibv_rdm_postponed_process(struct dlist_entry *postponed_item, +- const void *arg) +-{ +- const struct fi_ibv_rdm_tagged_send_ready_data *send_data = arg; +- +- struct fi_ibv_rdm_postponed_entry *postponed_entry = +- container_of(postponed_item, +- struct fi_ibv_rdm_postponed_entry, queue_entry); +- int ret = 0; +- if (!dlist_empty(&postponed_entry->conn->postponed_requests_head)) { +- struct dlist_entry *req_entry = +- postponed_entry->conn->postponed_requests_head.next; +- +- struct fi_ibv_rdm_request *request = +- container_of(req_entry, struct fi_ibv_rdm_request, +- queue_entry); +- +- int res = 0; +- if ((request->state.eager < FI_IBV_STATE_EAGER_RMA_INJECT) && +- (request->sbuf == NULL)) { +- res = fi_ibv_rdm_tagged_prepare_send_request(request, +- send_data->ep); +- } else { +- /* +- * This case is possible only for segmented RNDV msg or +- * RMA operation (> 1GB), connection must be already +- * established +- */ +- assert(request->state.rndv != FI_IBV_STATE_RNDV_NOT_USED); +- assert(fi_ibv_rdm_check_connection(request->minfo.conn)); +- if (request->state.eager <= FI_IBV_STATE_EAGER_RECV_END) { +- res = !TSEND_RESOURCES_IS_BUSY(request->minfo.conn, +- send_data->ep); +- } else { +- res = !RMA_RESOURCES_IS_BUSY(request->minfo.conn, +- send_data->ep); +- } +- } +- +- if (res) { +- fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_READY, +- (void *) send_data); +- ret++; +- } +- } +- return ret; +-} +- +-void fi_ibv_rdm_conn_init_cm_role(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep) +-{ +- const int addr_cmp = memcmp(&conn->addr, &ep->my_addr, +- FI_IBV_RDM_DFLT_ADDRLEN); +- +- if (addr_cmp < 0) { +- conn->cm_role = FI_VERBS_CM_ACTIVE; +- } else if (addr_cmp > 0) { +- conn->cm_role = FI_VERBS_CM_PASSIVE; +- } else { +- conn->cm_role = FI_VERBS_CM_SELF; +- } +-} +- +-void fi_ibv_rdm_clean_queues(struct fi_ibv_rdm_ep *ep) +-{ +- struct fi_ibv_rdm_request *request; +- struct fi_ibv_rdm_multi_request *multi_request; +- +- while ((request = fi_ibv_rdm_take_first_from_unexp_queue(ep))) { +- if (request->unexp_rbuf) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((multi_request = fi_ibv_rdm_take_first_from_multi_recv_list(ep))) +- util_buf_release(ep->fi_ibv_rdm_multi_request_pool, multi_request); +- +- while ((request = fi_ibv_rdm_take_first_from_posted_queue(ep))) { +- /* Check `request->context->internal[0] == NULL` in fi_cancel +- * will handle the case that request was already canceled +- * internally by provider */ +- request->context->internal[0] = NULL; +- if (request->iov_count > 0) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_postponed_queue(ep))) { +- if (request->iov_count > 0) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_cq(ep->fi_scq))) { +- if (request->iov_count > 0) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_cq(ep->fi_rcq))) { +- if (request->iov_count > 0) { +- util_buf_release(ep->fi_ibv_rdm_extra_buffers_pool, +- request->unexp_rbuf); +- } +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_errcq(ep->fi_scq))) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +- +- while ((request = fi_ibv_rdm_take_first_from_errcq(ep->fi_rcq))) { +- FI_IBV_RDM_DBG_REQUEST("to_pool: ", request, FI_LOG_DEBUG); +- util_buf_release(ep->fi_ibv_rdm_request_pool, request); +- } +-} +- +-ssize_t +-fi_ibv_rdm_send_common(struct fi_ibv_rdm_send_start_data* sdata) +-{ +- struct fi_ibv_rdm_request *request = +- util_buf_alloc(sdata->ep_rdm->fi_ibv_rdm_request_pool); +- if (OFI_UNLIKELY(!request)) +- return -FI_EAGAIN; +- request->ep = sdata->ep_rdm; +- FI_IBV_RDM_DBG_REQUEST("get_from_pool: ", request, FI_LOG_DEBUG); +- +- /* Initial state */ +- request->state.eager = FI_IBV_STATE_EAGER_BEGIN; +- request->state.rndv = FI_IBV_STATE_RNDV_NOT_USED; +- request->state.err = FI_SUCCESS; +- +- /* postponed_entry means that there are elements postponed to +- * send & current request must be queued */ +- const int in_order = (sdata->conn->postponed_entry) ? 0 : 1; +- int ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_SEND_START, sdata); +- +- if (!ret && in_order && +- fi_ibv_rdm_tagged_prepare_send_request(request, sdata->ep_rdm)) { +- struct fi_ibv_rdm_tagged_send_ready_data req_data = +- { .ep = sdata->ep_rdm }; +- ret = fi_ibv_rdm_req_hndl(request, FI_IBV_EVENT_POST_READY, +- &req_data); +- } +- +- return ret; +-} +- +-ssize_t +-rdm_trecv_second_event(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep) +-{ +- ssize_t ret = FI_SUCCESS; +- +- switch (request->state.rndv) +- { +- case FI_IBV_STATE_RNDV_NOT_USED: +- if (request->state.eager != FI_IBV_STATE_EAGER_RECV_WAIT4PKT) { +- struct fi_ibv_recv_got_pkt_process_data data = { +- .ep = ep +- }; +- ret = fi_ibv_rdm_req_hndl(request, +- FI_IBV_EVENT_RECV_START, +- &data); +- } +- break; +- case FI_IBV_STATE_RNDV_RECV_WAIT4RES: +- if (fi_ibv_rdm_tagged_prepare_send_request(request, ep)) { +- struct fi_ibv_rdm_tagged_send_ready_data data = { +- .ep = ep +- }; +- ret = fi_ibv_rdm_req_hndl(request, +- FI_IBV_EVENT_POST_READY, +- &data); +- } +- break; +- default: +- break; +- } +- +- return ret; +-} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.h +deleted file mode 100644 +index 7a3aeeb34..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ep_rdm/verbs_utils.h ++++ /dev/null +@@ -1,192 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#ifndef _VERBS_UTILS_H +-#define _VERBS_UTILS_H +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +- +-#include "../fi_verbs.h" +- +-#if (defined(__ICC) || defined(__INTEL_COMPILER) || \ +- defined(__GNUC__) || defined(__GNUG__)) && \ +- defined(__x86_64__) +-#include "xmmintrin.h" +-#define FI_IBV_PREFETCH_ADDR(_addr) { \ +- _mm_prefetch((const char *)(_addr), _MM_HINT_T0);\ +-} +-#else /* ICC || GCC && x86_64 */ +-#define FI_IBV_PREFETCH_ADDR(_addr) +-#endif /* ICC || GCC && x86_64 */ +- +-/* TODO: Merge anything useful into verbs_rdm.h */ +- +-struct fi_ibv_msg_ep; +- +-#define FI_IBV_RDM_DFLT_ADDRLEN (sizeof (struct sockaddr_in)) +- +-#define FI_IBV_RDM_CM_THREAD_TIMEOUT (100) +- +-#define FI_IBV_RDM_TAGGED_DFLT_BUFFER_NUM (8) +-#define FI_IBV_RDM_DFLT_CQREAD_BUNCH_SIZE (FI_IBV_RDM_TAGGED_DFLT_BUFFER_NUM) +- +-#define FI_IBV_RDM_DFLT_BUFFER_SIZE \ +- (3 * FI_IBV_BUF_ALIGNMENT) +- +-#define FI_IBV_RDM_DFLT_BUFFERED_SIZE \ +- (FI_IBV_RDM_DFLT_BUFFER_SIZE - \ +- FI_IBV_RDM_BUFF_SERVICE_DATA_SIZE - \ +- sizeof(struct fi_ibv_rdm_header)) +- +-/* +- * calculates internal buffer size from user defined buffered send size in +- * consideration of wired protocols, alignment, etc +- */ +-size_t rdm_buffer_size(size_t buf_send_size); +- +-#ifdef HAVE_VERBS_EXP_H +-/* 128MB is ODP MR limitation */ +-#define FI_IBV_RDM_SEG_MAXSIZE (128*1024*1024) +-#else /* HAVE_VERBS_EXP_H */ +-/* 1GB is RC_QP limitation */ +-#define FI_IBV_RDM_SEG_MAXSIZE (1024*1024*1024) +-#endif /* HAVE_VERBS_EXP_H */ +- +-/* TODO: CQs depths increased from 100 to 1000 to prevent +- * "Work Request Flushed Error" in stress tests like alltoall. +- */ +-#define FI_IBV_RDM_TAGGED_DFLT_SCQ_SIZE (1000) +-#define FI_IBV_RDM_TAGGED_DFLT_RCQ_SIZE (1000) +- +-#define FI_IBV_RDM_CM_RESOLVEADDR_TIMEOUT (30000) +- +-#if ENABLE_DEBUG +-#define FI_IBV_RDM_CHECK_RECV_WC(wc) \ +- ((wc->status == IBV_WC_SUCCESS) && \ +- (wc->opcode == IBV_WC_RECV_RDMA_WITH_IMM || wc->opcode == IBV_WC_RECV)) +-#else +-#define FI_IBV_RDM_CHECK_RECV_WC(wc) (wc->status == IBV_WC_SUCCESS) +-#endif /* ENABLE_DEBUG */ +- +-/* TODO: Holy macro batman, use verbs calls */ +-#define FI_IBV_DBG_OPCODE(wc_opcode, str) \ +- VERBS_DBG(FI_LOG_CQ, "CQ COMPL: "str" -> %s\n", \ +- wc_opcode == IBV_WC_SEND ? "IBV_WC_SEND" : \ +- wc_opcode == IBV_WC_RDMA_WRITE ? "IBV_WC_RDMA_WRITE" : \ +- wc_opcode == IBV_WC_RDMA_READ ? "IBV_WC_RDMA_READ" : \ +- wc_opcode == IBV_WC_COMP_SWAP ? "IBV_WC_COMP_SWAP" : \ +- wc_opcode == IBV_WC_FETCH_ADD ? "IBV_WC_FETCH_ADD" : \ +- wc_opcode == IBV_WC_BIND_MW ? "IBV_WC_BIND_MW" : \ +- wc_opcode == IBV_WC_RECV ? "IBV_WC_RECV" : \ +- wc_opcode == IBV_WC_RECV_RDMA_WITH_IMM ? "IBV_WC_RECV_RDMA_WITH_IMM" : \ +- "IBV_WC_UNKNOWN!!!"); +- +-#if ENABLE_DEBUG +- +-#define FI_IBV_RDM_DBG_REQUEST(prefix, request, level) \ +-do { \ +- const size_t max_str_len = 1024; \ +- char str[max_str_len]; \ +- snprintf(str, max_str_len, \ +- "%s request: %p, eager_state: %s, rndv_state: %s," \ +- " err_state: %ld, tag: 0x%lx, len: %lu, rest: %lu," \ +- "context: %p, connection: %p ep: %p\n", \ +- prefix, \ +- request, \ +- fi_ibv_rdm_req_eager_state_to_str(request->state.eager), \ +- fi_ibv_rdm_req_rndv_state_to_str(request->state.rndv), \ +- request->state.err, \ +- request->minfo.tag, \ +- request->len, \ +- request->rest_len, \ +- request->context, \ +- request->minfo.conn, \ +- request->ep); \ +- \ +- switch (level) \ +- { \ +- case FI_LOG_WARN: \ +- case FI_LOG_TRACE: \ +- case FI_LOG_INFO: \ +- VERBS_INFO(FI_LOG_EP_DATA, "%s", str); \ +- break; \ +- case FI_LOG_DEBUG: \ +- default: \ +- VERBS_DBG(FI_LOG_EP_DATA, "%s", str); \ +- break; \ +- } \ +-} while (0); +- +-#else // ENABLE_DEBUG +- +-#define FI_IBV_RDM_DBG_REQUEST(prefix, request, level) +- +-#endif // ENABLE_DEBUG +- +-struct fi_ibv_rdm_minfo { +- struct fi_ibv_rdm_conn *conn; +- uint64_t is_tagged; /* TODO: unexpected RTS for MSG */ +- uint64_t tag; +- uint64_t tagmask; +-}; +- +-struct fi_ibv_rdm_tagged_peek_data { +- struct fi_ibv_rdm_minfo minfo; +- void *context; +- uint64_t flags; +-}; +- +-struct fi_ibv_rdm_cm; +-struct fi_ibv_rdm_request; +-struct fi_ibv_rdm_send_start_data; +- +-int fi_ibv_rdm_req_match(struct dlist_entry *item, const void *other); +-int fi_ibv_rdm_req_match_by_info(struct dlist_entry *item, const void *info); +-int fi_ibv_rdm_req_match_by_info2(struct dlist_entry *item, const void *info); +-int fi_ibv_rdm_req_match_by_info3(struct dlist_entry *item, const void *info); +-int fi_ibv_rdm_postponed_process(struct dlist_entry *item, const void *arg); +-void fi_ibv_rdm_conn_init_cm_role(struct fi_ibv_rdm_conn *conn, +- struct fi_ibv_rdm_ep *ep); +- +-ssize_t fi_ibv_rdm_send_common(struct fi_ibv_rdm_send_start_data* sdata); +-ssize_t rdm_trecv_second_event(struct fi_ibv_rdm_request *request, +- struct fi_ibv_rdm_ep *ep); +- +-#endif /* _VERBS_UTILS_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.c +index cd8b85945..39182bcf2 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.c +@@ -35,7 +35,6 @@ + #include + + #include "fi_verbs.h" +-#include "ep_rdm/verbs_rdm.h" + + static void fi_ibv_fini(void); + +@@ -61,26 +60,33 @@ struct fi_ibv_gl_data fi_ibv_gl_data = { + .mr_max_cached_cnt = 4096, + .mr_max_cached_size = ULONG_MAX, + .mr_cache_merge_regions = 0, +- +- .rdm = { +- .buffer_num = FI_IBV_RDM_TAGGED_DFLT_BUFFER_NUM, +- .buffer_size = FI_IBV_RDM_DFLT_BUFFERED_SIZE, +- .rndv_seg_size = FI_IBV_RDM_SEG_MAXSIZE, +- .thread_timeout = FI_IBV_RDM_CM_THREAD_TIMEOUT, +- .eager_send_opcode = "IBV_WR_SEND", +- .cm_thread_affinity = NULL, +- }, +- + .dgram = { + .use_name_server = 1, + .name_server_port = 5678, + }, ++ ++ .msg = { ++ /* Disabled by default. Use XRC transport for message ++ * endpoint only if it is explicitly requested */ ++ .prefer_xrc = 0, ++ .xrcd_filename = "/tmp/verbs_xrcd", ++ }, ++}; ++ ++struct fi_ibv_dev_preset { ++ int max_inline_data; ++ const char *dev_name_prefix; ++} verbs_dev_presets[] = { ++ { ++ .max_inline_data = 48, ++ .dev_name_prefix = "i40iw", ++ }, + }; + + struct fi_provider fi_ibv_prov = { + .name = VERBS_PROV_NAME, + .version = VERBS_PROV_VERS, +- .fi_version = FI_VERSION(1, 6), ++ .fi_version = FI_VERSION(1, 7), + .getinfo = fi_ibv_getinfo, + .fabric = fi_ibv_fabric, + .cleanup = fi_ibv_fini +@@ -102,50 +108,6 @@ int fi_ibv_sockaddr_len(struct sockaddr *addr) + return ofi_sizeofaddr(addr); + } + +-int fi_ibv_rdm_cm_bind_ep(struct fi_ibv_rdm_cm *cm, struct fi_ibv_rdm_ep *ep) +-{ +- char my_ipoib_addr_str[INET6_ADDRSTRLEN]; +- +- assert(cm->ec && cm->listener); +- +- if (ep->info->src_addr) { +- memcpy(&ep->my_addr, ep->info->src_addr, sizeof(ep->my_addr)); +- +- inet_ntop(ep->my_addr.sin_family, +- &ep->my_addr.sin_addr.s_addr, +- my_ipoib_addr_str, INET_ADDRSTRLEN); +- } else { +- strcpy(my_ipoib_addr_str, "undefined"); +- } +- +- VERBS_INFO(FI_LOG_EP_CTRL, "My IPoIB: %s\n", my_ipoib_addr_str); +- +- if (!cm->is_bound) { +- if (rdma_bind_addr(cm->listener, (struct sockaddr *)&ep->my_addr)) { +- VERBS_INFO(FI_LOG_EP_CTRL, +- "Failed to bind cm listener to my IPoIB addr %s: %s\n", +- my_ipoib_addr_str, strerror(errno)); +- return -FI_EOTHER; +- } +- if (rdma_listen(cm->listener, 1024)) { +- VERBS_INFO(FI_LOG_EP_CTRL, "rdma_listen failed: %s\n", +- strerror(errno)); +- return -FI_EOTHER; +- } +- cm->is_bound = 1; +- } +- +- if (!ep->my_addr.sin_port) { +- ep->my_addr.sin_port = rdma_get_src_port(cm->listener); +- } +- assert(ep->my_addr.sin_family == AF_INET); +- +- VERBS_INFO(FI_LOG_EP_CTRL, "My ep_addr: %s:%u\n", +- inet_ntoa(ep->my_addr.sin_addr), ntohs(ep->my_addr.sin_port)); +- +- return FI_SUCCESS; +-} +- + int fi_ibv_get_rdma_rai(const char *node, const char *service, uint64_t flags, + const struct fi_info *hints, struct rdma_addrinfo **rai) + { +@@ -157,11 +119,8 @@ int fi_ibv_get_rdma_rai(const char *node, const char *service, uint64_t flags, + goto out; + + if (!node && !rai_hints.ai_dst_addr) { +- if ((!rai_hints.ai_src_addr && !service) || +- (!rai_hints.ai_src_addr && FI_IBV_EP_TYPE_IS_RDM(hints))) +- { ++ if (!rai_hints.ai_src_addr && !service) + node = local_node; +- } + rai_hints.ai_flags |= RAI_PASSIVE; + } + +@@ -204,6 +163,50 @@ out: + return ret; + } + ++int fi_ibv_get_rai_id(const char *node, const char *service, uint64_t flags, ++ const struct fi_info *hints, struct rdma_addrinfo **rai, ++ struct rdma_cm_id **id) ++{ ++ int ret; ++ ++ // TODO create a similar function that won't require pruning ib_rai ++ ret = fi_ibv_get_rdma_rai(node, service, flags, hints, rai); ++ if (ret) ++ return ret; ++ ++ ret = rdma_create_id(NULL, id, NULL, RDMA_PS_TCP); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_create_id", errno); ++ ret = -errno; ++ goto err1; ++ } ++ ++ if ((*rai)->ai_flags & RAI_PASSIVE) { ++ ret = rdma_bind_addr(*id, (*rai)->ai_src_addr); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_bind_addr", errno); ++ ret = -errno; ++ goto err2; ++ } ++ return 0; ++ } ++ ++ ret = rdma_resolve_addr(*id, (*rai)->ai_src_addr, ++ (*rai)->ai_dst_addr, 2000); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_resolve_addr", errno); ++ ret = -errno; ++ goto err2; ++ } ++ return 0; ++err2: ++ if (rdma_destroy_id(*id)) ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_destroy_id", errno); ++err1: ++ rdma_freeaddrinfo(*rai); ++ return ret; ++} ++ + int fi_ibv_create_ep(const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, + struct rdma_addrinfo **rai, struct rdma_cm_id **id) +@@ -359,23 +362,35 @@ int fi_ibv_set_rnr_timer(struct ibv_qp *qp) + } + + int fi_ibv_find_max_inline(struct ibv_pd *pd, struct ibv_context *context, +- enum ibv_qp_type qp_type) ++ enum ibv_qp_type qp_type) + { + struct ibv_qp_init_attr qp_attr; + struct ibv_qp *qp = NULL; +- struct ibv_cq *cq = ibv_create_cq(context, 1, NULL, NULL, 0); +- assert(cq); ++ struct ibv_cq *cq; + int max_inline = 2; + int rst = 0; ++ const char *dev_name = ibv_get_device_name(context->device); ++ uint8_t i; ++ ++ for (i = 0; i < count_of(verbs_dev_presets); i++) { ++ if (!strncmp(dev_name, verbs_dev_presets[i].dev_name_prefix, ++ strlen(verbs_dev_presets[i].dev_name_prefix))) ++ return verbs_dev_presets[i].max_inline_data; ++ } ++ ++ cq = ibv_create_cq(context, 1, NULL, NULL, 0); ++ assert(cq); + + memset(&qp_attr, 0, sizeof(qp_attr)); + qp_attr.send_cq = cq; +- qp_attr.recv_cq = cq; + qp_attr.qp_type = qp_type; + qp_attr.cap.max_send_wr = 1; +- qp_attr.cap.max_recv_wr = 1; + qp_attr.cap.max_send_sge = 1; +- qp_attr.cap.max_recv_sge = 1; ++ if (!fi_ibv_is_xrc_send_qp(qp_type)) { ++ qp_attr.recv_cq = cq; ++ qp_attr.cap.max_recv_wr = 1; ++ qp_attr.cap.max_recv_sge = 1; ++ } + qp_attr.sq_sig_all = 1; + + do { +@@ -575,6 +590,22 @@ static int fi_ibv_read_params(void) + "Invalid value of use_odp\n"); + return -FI_EINVAL; + } ++ ++ if (fi_ibv_get_param_bool("prefer_xrc", "Order XRC transport fi_infos" ++ "ahead of RC. Default orders RC first.", ++ &fi_ibv_gl_data.msg.prefer_xrc)) { ++ VERBS_WARN(FI_LOG_CORE, ++ "Invalid value of prefer_xrc\n"); ++ return -FI_EINVAL; ++ } ++ ++ if (fi_ibv_get_param_str("xrcd_filename", "A file to " ++ "associate with the XRC domain.", ++ &fi_ibv_gl_data.msg.xrcd_filename)) { ++ VERBS_WARN(FI_LOG_CORE, ++ "Invalid value of xrcd_filename\n"); ++ return -FI_EINVAL; ++ } + if (fi_ibv_get_param_int("cqread_bunch_size", "The number of entries to " + "be read from the verbs completion queue at a time", + &fi_ibv_gl_data.cqread_bunch_size) || +@@ -621,61 +652,6 @@ static int fi_ibv_read_params(void) + return -FI_EINVAL; + } + +- /* RDM-specific parameters */ +- if (fi_ibv_get_param_int("rdm_buffer_num", "The number of pre-registered " +- "buffers for buffered operations between " +- "the endpoints, must be a power of 2", +- &fi_ibv_gl_data.rdm.buffer_num) || +- (fi_ibv_gl_data.rdm.buffer_num & (fi_ibv_gl_data.rdm.buffer_num - 1))) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid value of rdm_buffer_num\n"); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_int("rdm_buffer_size", "The maximum size of a " +- "buffered operation (bytes)", +- &fi_ibv_gl_data.rdm.buffer_size) || +- (fi_ibv_gl_data.rdm.buffer_size < sizeof(struct fi_ibv_rdm_rndv_header))) { +- VERBS_WARN(FI_LOG_CORE, +- "rdm_buffer_size should be greater than %"PRIu64"\n", +- sizeof(struct fi_ibv_rdm_rndv_header)); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_int("rdm_rndv_seg_size", "The segment size for " +- "zero copy protocols (bytes)", +- &fi_ibv_gl_data.rdm.rndv_seg_size) || +- (fi_ibv_gl_data.rdm.rndv_seg_size <= 0)) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid value of rdm_rndv_seg_size\n"); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_int("rdm_thread_timeout", "The wake up timeout of " +- "the helper thread (usec)", +- &fi_ibv_gl_data.rdm.thread_timeout) || +- (fi_ibv_gl_data.rdm.thread_timeout < 0)) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid value of rdm_thread_timeout\n"); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_str("rdm_eager_send_opcode", "The operation code that " +- "will be used for eager messaging. Only IBV_WR_SEND " +- "and IBV_WR_RDMA_WRITE_WITH_IMM are supported. " +- "The last one is not applicable for iWarp.", +- &fi_ibv_gl_data.rdm.eager_send_opcode)) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid value of rdm_eager_send_opcode\n"); +- return -FI_EINVAL; +- } +- if (fi_ibv_get_param_str("rdm_cm_thread_affinity", +- "If specified, bind the CM thread to the indicated " +- "range(s) of Linux virtual processor ID(s). " +- "This option is currently not supported on OS X. " +- "Usage: id_start[-id_end[:stride]][,]", +- &fi_ibv_gl_data.rdm.cm_thread_affinity)) { +- VERBS_WARN(FI_LOG_CORE, +- "Invalid thread affinity range provided in the rdm_cm_thread_affinity\n"); +- return -FI_EINVAL; +- } +- + /* DGRAM-specific parameters */ + if (getenv("OMPI_COMM_WORLD_RANK") || getenv("PMI_RANK")) + fi_ibv_gl_data.dgram.use_name_server = 0; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.h +index 9f5aac571..90d1f495f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.h ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/fi_verbs.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corporation, Inc. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -49,7 +49,6 @@ + #include + #include + #include +-#include + + #include + #include +@@ -70,11 +69,15 @@ + #include "ofi_list.h" + #include "ofi_signal.h" + #include "ofi_util.h" ++#include "ofi_tree.h" ++#include "ofi_indexer.h" + + #ifdef HAVE_VERBS_EXP_H + #include + #endif /* HAVE_VERBS_EXP_H */ + ++#include "ofi_verbs_priv.h" ++ + #ifndef AF_IB + #define AF_IB 27 + #endif +@@ -93,24 +96,37 @@ + #define VERBS_WARN(subsys, ...) FI_WARN(&fi_ibv_prov, subsys, __VA_ARGS__) + + +-#define VERBS_INJECT_FLAGS(ep, len, flags) (((flags & FI_INJECT) || \ +- len <= ep->info->tx_attr->inject_size) ? IBV_SEND_INLINE : 0) +-#define VERBS_INJECT(ep, len) VERBS_INJECT_FLAGS(ep, len, ep->info->tx_attr->op_flags) ++#define VERBS_INJECT_FLAGS(ep, len, flags) ((((flags) & FI_INJECT) || \ ++ len <= (ep)->inject_limit) ? IBV_SEND_INLINE : 0) ++#define VERBS_INJECT(ep, len) VERBS_INJECT_FLAGS(ep, len, (ep)->info->tx_attr->op_flags) + +-#define VERBS_SELECTIVE_COMP(ep) (ep->ep_flags & FI_SELECTIVE_COMPLETION) +-#define VERBS_COMP_FLAGS(ep, flags) (ofi_need_completion(ep->ep_flags, flags) ? \ +- IBV_SEND_SIGNALED : 0) +-#define VERBS_COMP(ep) VERBS_COMP_FLAGS(ep, ep->info->tx_attr->op_flags) ++#define VERBS_COMP_FLAGS(ep, flags, context) \ ++ (((ep)->util_ep.tx_op_flags | (flags)) & \ ++ FI_COMPLETION ? context : VERBS_NO_COMP_FLAG) ++#define VERBS_COMP(ep, context) \ ++ VERBS_COMP_FLAGS((ep), (ep)->info->tx_attr->op_flags, context) + + #define VERBS_WCE_CNT 1024 + #define VERBS_WRE_CNT 1024 +-#define VERBS_EPE_CNT 1024 + + #define VERBS_DEF_CQ_SIZE 1024 + #define VERBS_MR_IOV_LIMIT 1 + ++#define VERBS_NO_COMP_FLAG ((uint64_t)-1) ++ ++#define FI_IBV_CM_DATA_SIZE (56) ++#define VERBS_CM_DATA_SIZE (FI_IBV_CM_DATA_SIZE - \ ++ sizeof(struct fi_ibv_cm_data_hdr)) ++ ++#define FI_IBV_CM_REJ_CONSUMER_DEFINED 28 ++ ++#define VERBS_DGRAM_MSG_PREFIX_SIZE (40) ++ + #define FI_IBV_EP_TYPE(info) \ + ((info && info->ep_attr) ? info->ep_attr->type : FI_EP_MSG) ++#define FI_IBV_EP_PROTO(info) \ ++ (((info) && (info)->ep_attr) ? (info)->ep_attr->protocol : \ ++ FI_PROTO_UNSPEC) + + #define FI_IBV_MEM_ALIGNMENT (64) + #define FI_IBV_BUF_ALIGNMENT (4096) /* TODO: Page or MTU size */ +@@ -119,54 +135,16 @@ + #define VERBS_ANY_DOMAIN "verbs_any_domain" + #define VERBS_ANY_FABRIC "verbs_any_fabric" + +-/* NOTE: +- * When ibv_post_send/recv returns '-1' it means the following: +- * Deal with non-compliant libibverbs drivers which set errno +- * instead of directly returning the error value +- */ +-#define FI_IBV_INVOKE_POST(type, wr_type, obj, wr, fail_action) \ +-({ \ +- ssize_t ret; \ +- struct ibv_ ## wr_type ## _wr *bad_wr; \ +- ret = ibv_post_ ## type(obj, wr, &bad_wr); \ +- if (OFI_UNLIKELY(ret)) { \ +- switch (ret) { \ +- case ENOMEM: \ +- ret = -FI_EAGAIN; \ +- break; \ +- case -1: \ +- ret = (errno == ENOMEM) ? -FI_EAGAIN : \ +- -errno; \ +- break; \ +- default: \ +- ret = -ret; \ +- break; \ +- } \ +- (void) fail_action; \ +- } \ +- ret; \ +-}) ++#define FI_IBV_MEMORY_HOOK_BEGIN(notifier) \ ++{ \ ++ pthread_mutex_lock(¬ifier->lock); \ ++ ofi_set_mem_free_hook(notifier->prev_free_hook); \ ++ ofi_set_mem_realloc_hook(notifier->prev_realloc_hook); \ + +-#define FI_IBV_RELEASE_WRE(ep, wre) \ +-({ \ +- if (wre) { \ +- fastlock_acquire(&ep->wre_lock); \ +- dlist_remove(&wre->entry); \ +- util_buf_release(ep->wre_pool, wre); \ +- fastlock_release(&ep->wre_lock); \ +- } \ +-}) +- +-#define FI_IBV_MEMORY_HOOK_BEGIN(notifier) \ +-{ \ +- pthread_mutex_lock(¬ifier->lock); \ +- fi_ibv_mem_notifier_set_free_hook(notifier->prev_free_hook); \ +- fi_ibv_mem_notifier_set_realloc_hook(notifier->prev_realloc_hook); \ +- +-#define FI_IBV_MEMORY_HOOK_END(notifier) \ +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier_realloc_hook); \ +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier_free_hook); \ +- pthread_mutex_unlock(¬ifier->lock); \ ++#define FI_IBV_MEMORY_HOOK_END(notifier) \ ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier_realloc_hook); \ ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier_free_hook); \ ++ pthread_mutex_unlock(¬ifier->lock); \ + } + + extern struct fi_provider fi_ibv_prov; +@@ -201,6 +179,11 @@ extern struct fi_ibv_gl_data { + int use_name_server; + int name_server_port; + } dgram; ++ ++ struct { ++ int prefer_xrc; ++ char *xrcd_filename; ++ } msg; + } fi_ibv_gl_data; + + struct verbs_addr { +@@ -217,7 +200,7 @@ struct verbs_addr { + * - GRH (Global Route Header) - Network Layer: + * - GID - destination Global Identifier + * - BTH (Base Transport Header) - Transport Layer: +- * - QPN - destination Queue Oair number ++ * - QPN - destination Queue Pair number + * - P_key - Partition Key + * + * Note: DON'T change the placement of the fields in the structure. +@@ -261,6 +244,7 @@ struct verbs_dev_info { + struct dlist_entry addrs; + }; + ++ + struct fi_ibv_fabric { + struct util_fabric util_fabric; + const struct fi_info *info; +@@ -280,6 +264,11 @@ struct fi_ibv_eq_entry { + + typedef int (*fi_ibv_trywait_func)(struct fid *fid); + ++/* The number of valid OFI indexer bits in the connection key used during ++ * XRC connection establishment. Note that only the lower 32-bits of the ++ * key are exchanged, so this value must be kept below 32-bits. */ ++#define VERBS_TAG_INDEX_BITS 18 ++ + struct fi_ibv_eq { + struct fid_eq eq_fid; + struct fi_ibv_fabric *fab; +@@ -289,47 +278,28 @@ struct fi_ibv_eq { + uint64_t flags; + struct fi_eq_err_entry err; + int epfd; ++ ++ struct { ++ /* The connection key map is used during the XRC connection ++ * process to map an XRC reciprocal connection request back ++ * to the active endpoint that initiated the original ++ * connection request. It is protected with the eq::lock */ ++ struct ofi_key_idx conn_key_idx; ++ struct indexer *conn_key_map; ++ ++ /* TODO: This is limiting and restricts applications to using ++ * a single listener per EQ. While sufficient for RXM we should ++ * consider using an internal PEP listener for handling the ++ * internally processed reciprocal connections. */ ++ uint16_t pep_port; ++ } xrc; + }; + + int fi_ibv_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, + struct fid_eq **eq, void *context); + +-struct fi_ibv_rdm_ep; +- +-typedef struct fi_ibv_rdm_conn * +- (*fi_ibv_rdm_addr_to_conn_func) +- (struct fi_ibv_rdm_ep *ep, fi_addr_t addr); +- +-typedef fi_addr_t +- (*fi_ibv_rdm_conn_to_addr_func) +- (struct fi_ibv_rdm_ep *ep, struct fi_ibv_rdm_conn *conn); +- +-typedef struct fi_ibv_rdm_av_entry * +- (*fi_ibv_rdm_addr_to_av_entry_func) +- (struct fi_ibv_rdm_ep *ep, fi_addr_t addr); +- +-typedef fi_addr_t +- (*fi_ibv_rdm_av_entry_to_addr_func) +- (struct fi_ibv_rdm_ep *ep, struct fi_ibv_rdm_av_entry *av_entry); +- +-struct fi_ibv_av { +- struct fid_av av_fid; +- struct fi_ibv_domain *domain; +- struct fi_ibv_rdm_ep *ep; +- struct fi_ibv_eq *eq; +- size_t count; +- size_t used; +- uint64_t flags; +- enum fi_av_type type; +- fi_ibv_rdm_addr_to_conn_func addr_to_conn; +- fi_ibv_rdm_conn_to_addr_func conn_to_addr; +- fi_ibv_rdm_addr_to_av_entry_func addr_to_av_entry; +- fi_ibv_rdm_av_entry_to_addr_func av_entry_to_addr; +-}; +- + int fi_ibv_av_open(struct fid_domain *domain, struct fi_av_attr *attr, + struct fid_av **av, void *context); +-struct fi_ops_av *fi_ibv_rdm_set_av_ops(void); + + struct fi_ibv_pep { + struct fid_pep pep_fid; +@@ -342,36 +312,41 @@ struct fi_ibv_pep { + }; + + struct fi_ops_cm *fi_ibv_pep_ops_cm(struct fi_ibv_pep *pep); +-struct fi_ibv_rdm_cm; + + struct fi_ibv_mem_desc; ++struct fi_ibv_domain; + typedef int(*fi_ibv_mr_reg_cb)(struct fi_ibv_domain *domain, void *buf, + size_t len, uint64_t access, + struct fi_ibv_mem_desc *md); + typedef int(*fi_ibv_mr_dereg_cb)(struct fi_ibv_mem_desc *md); + +-void fi_ibv_mem_notifier_free_hook(void *ptr, const void *caller); +-void *fi_ibv_mem_notifier_realloc_hook(void *ptr, size_t size, const void *caller); +- + struct fi_ibv_mem_notifier; + + struct fi_ibv_domain { + struct util_domain util_domain; + struct ibv_context *verbs; + struct ibv_pd *pd; +- /* +- * TODO: Currently, only 1 rdm EP can be created per rdm domain! +- * CM logic should be separated from EP, +- * excluding naming/addressing +- */ ++ + enum fi_ep_type ep_type; +- struct fi_ibv_rdm_cm *rdm_cm; +- struct slist ep_list; + struct fi_info *info; +- /* This EQ is utilized by verbs/RDM and verbs/DGRAM */ ++ /* The EQ is utilized by verbs/MSG */ + struct fi_ibv_eq *eq; + uint64_t eq_flags; + ++ /* Indicates that MSG endpoints should use the XRC transport. ++ * TODO: Move selection of XRC/RC to endpoint info from domain */ ++ int use_xrc; ++ struct { ++ int xrcd_fd; ++ struct ibv_xrcd *xrcd; ++ ++ /* The domain maintains a RBTree for mapping an endpoint ++ * destination addresses to physical XRC INI QP connected ++ * to that host. */ ++ fastlock_t ini_mgmt_lock; ++ struct ofi_rbmap *ini_conn_rbmap; ++ } xrc ; ++ + /* MR stuff */ + int use_odp; + struct ofi_mr_cache cache; +@@ -382,29 +357,16 @@ struct fi_ibv_domain { + }; + + struct fi_ibv_cq; +-typedef void (*fi_ibv_cq_read_entry)(struct ibv_wc *wc, int index, void *buf); ++typedef void (*fi_ibv_cq_read_entry)(struct ibv_wc *wc, void *buf); + + struct fi_ibv_wce { + struct slist_entry entry; + struct ibv_wc wc; + }; + +-enum fi_ibv_wre_type { +- IBV_SEND_WR, +- IBV_RECV_WR, +-}; +- +-struct fi_ibv_wre { +- struct dlist_entry entry; +- void *context; +- struct fi_ibv_msg_ep *ep; +- struct fi_ibv_srq_ep *srq; +- enum fi_ibv_wre_type wr_type; +-}; +- ++struct fi_ibv_srq_ep; + struct fi_ibv_cq { +- struct fid_cq cq_fid; +- struct fi_ibv_domain *domain; ++ struct util_cq util_cq; + struct ibv_comp_channel *channel; + struct ibv_cq *cq; + size_t entry_size; +@@ -414,32 +376,15 @@ struct fi_ibv_cq { + int signal_fd[2]; + fi_ibv_cq_read_entry read_entry; + struct slist wcq; +- fastlock_t lock; +- struct slist ep_list; +- uint64_t ep_cnt; +- uint64_t send_signal_wr_id; +- uint64_t wr_id_mask; + fi_ibv_trywait_func trywait; + ofi_atomic32_t nevents; +- struct util_buf_pool *epe_pool; + struct util_buf_pool *wce_pool; +-}; + +-struct fi_ibv_rdm_request; +-typedef void (*fi_ibv_rdm_cq_read_entry)(struct fi_ibv_rdm_request *cq_entry, +- int index, void *buf); +- +-struct fi_ibv_rdm_cq { +- struct fid_cq cq_fid; +- struct fi_ibv_domain *domain; +- struct fi_ibv_rdm_ep *ep; +- struct dlist_entry request_cq; +- struct dlist_entry request_errcq; +- uint64_t flags; +- size_t entry_size; +- fi_ibv_rdm_cq_read_entry read_entry; +- int read_bunch_size; +- enum fi_cq_wait_cond wait_cond; ++ struct { ++ /* The list of XRC SRQ contexts associated with this CQ */ ++ fastlock_t srq_list_lock; ++ struct dlist_entry srq_list; ++ } xrc; + }; + + int fi_ibv_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +@@ -454,12 +399,6 @@ struct fi_ibv_mem_desc { + struct ofi_mr_entry *entry; + }; + +-int fi_ibv_rdm_alloc_and_reg(struct fi_ibv_rdm_ep *ep, +- void **buf, size_t size, +- struct fi_ibv_mem_desc *md); +-ssize_t fi_ibv_rdm_dereg_and_free(struct fi_ibv_mem_desc *md, +- char **buff); +- + static inline uint64_t + fi_ibv_mr_internal_rkey(struct fi_ibv_mem_desc *md) + { +@@ -472,32 +411,33 @@ fi_ibv_mr_internal_lkey(struct fi_ibv_mem_desc *md) + return md->mr->lkey; + } + +-typedef void (*fi_ibv_mem_free_hook)(void *, const void *); +-typedef void *(*fi_ibv_mem_realloc_hook)(void *, size_t, const void *); +- + struct fi_ibv_mr_internal_ops { + struct fi_ops_mr *fi_ops; + fi_ibv_mr_reg_cb internal_mr_reg; + fi_ibv_mr_dereg_cb internal_mr_dereg; + }; + +-struct fi_ibv_mem_ptr_entry { +- struct dlist_entry entry; +- void *addr; +- struct ofi_subscription *subscription; +- UT_hash_handle hh; +-}; +- + struct fi_ibv_mem_notifier { +- struct fi_ibv_mem_ptr_entry *mem_ptrs_hash; +- struct util_buf_pool *mem_ptrs_ent_pool; +- struct dlist_entry event_list; +- fi_ibv_mem_free_hook prev_free_hook; +- fi_ibv_mem_realloc_hook prev_realloc_hook; ++ RbtHandle subscr_storage; ++ ofi_mem_free_hook prev_free_hook; ++ ofi_mem_realloc_hook prev_realloc_hook; + int ref_cnt; + pthread_mutex_t lock; + }; + ++struct fi_ibv_subscr_entry { ++ struct dlist_entry entry; ++ struct ofi_subscription *subscription; ++}; ++ ++struct fi_ibv_monitor_entry { ++ struct dlist_entry subscription_list; ++ struct iovec iov; ++}; ++ ++void fi_ibv_mem_notifier_free_hook(void *ptr, const void *caller); ++void *fi_ibv_mem_notifier_realloc_hook(void *ptr, size_t size, const void *caller); ++ + extern struct fi_ibv_mr_internal_ops fi_ibv_mr_internal_ops; + extern struct fi_ibv_mr_internal_ops fi_ibv_mr_internal_cache_ops; + extern struct fi_ibv_mr_internal_ops fi_ibv_mr_internal_ex_ops; +@@ -506,191 +446,290 @@ int fi_ibv_mr_cache_entry_reg(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry); + void fi_ibv_mr_cache_entry_dereg(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry); +-int fi_ibv_monitor_subscribe(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription); +-void fi_ibv_monitor_unsubscribe(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription); ++int fi_ibv_monitor_subscribe(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription); ++void fi_ibv_monitor_unsubscribe(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription); + struct ofi_subscription *fi_ibv_monitor_get_event(struct ofi_mem_monitor *notifier); + +-static inline void +-fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_free_hook free_hook) +-{ +-#ifdef HAVE_GLIBC_MALLOC_HOOKS +-# ifdef __INTEL_COMPILER /* ICC */ +-# pragma warning push +-# pragma warning disable 1478 +- __free_hook = free_hook; +-# pragma warning pop +-# elif defined __clang__ /* Clang */ +-# pragma clang diagnostic push +-# pragma clang diagnostic ignored "-Wdeprecated-declarations" +- __free_hook = free_hook; +-# pragma clang diagnostic pop +-# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- __free_hook = free_hook; +-# pragma GCC diagnostic pop +-# else /* others */ +- __free_hook = free_hook; +-# endif +-#else /* !HAVE_GLIBC_MALLOC_HOOKS */ +- OFI_UNUSED(free_hook); +-#endif /* HAVE_GLIBC_MALLOC_HOOKS */ +-} ++/* ++ * An XRC SRQ cannot be created until the associated RX CQ is known, ++ * maintain a list of validated pre-posted receives to post once ++ * the SRQ is created. ++ */ ++struct fi_ibv_xrc_srx_prepost { ++ struct slist_entry prepost_entry; ++ void *buf; ++ void *desc; ++ void *context; ++ size_t len; ++ fi_addr_t src_addr; ++}; + +-static inline void +-fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_realloc_hook realloc_hook) +-{ +-#ifdef HAVE_GLIBC_MALLOC_HOOKS +-# ifdef __INTEL_COMPILER /* ICC */ +-# pragma warning push +-# pragma warning disable 1478 +- __realloc_hook = realloc_hook; +-# pragma warning pop +-# elif defined __clang__ /* Clang */ +-# pragma clang diagnostic push +-# pragma clang diagnostic ignored "-Wdeprecated-declarations" +- __realloc_hook = realloc_hook; +-# pragma clang diagnostic pop +-# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- __realloc_hook = realloc_hook; +-# pragma GCC diagnostic pop +-# else /* others */ +- __realloc_hook = realloc_hook; +-# endif +-#else /* !HAVE_GLIBC_MALLOC_HOOKS */ +- OFI_UNUSED(realloc_hook); +-#endif /* HAVE_GLIBC_MALLOC_HOOKS */ +-} ++struct fi_ibv_srq_ep { ++ struct fid_ep ep_fid; ++ struct ibv_srq *srq; ++ struct fi_ibv_domain *domain; ++ ++ /* For XRC SRQ only */ ++ struct { ++ /* XRC SRQ is not created until endpoint enable */ ++ fastlock_t prepost_lock; ++ struct slist prepost_list; ++ uint32_t max_recv_wr; ++ uint32_t max_sge; ++ uint32_t prepost_count; ++ ++ /* The RX CQ associated with this XRC SRQ. This field ++ * and the srq_entry should only be modified while holding ++ * the associted cq::xrc.srq_list_lock. */ ++ struct fi_ibv_cq *cq; ++ ++ /* The CQ maintains a list of XRC SRQ associated with it */ ++ struct dlist_entry srq_entry; ++ } xrc; ++}; + +-static inline fi_ibv_mem_free_hook +-fi_ibv_mem_notifier_get_free_hook(void) ++int fi_ibv_srq_context(struct fid_domain *domain, struct fi_rx_attr *attr, ++ struct fid_ep **rx_ep, void *context); ++ ++static inline int fi_ibv_is_xrc(struct fi_info *info) + { +-#ifdef HAVE_GLIBC_MALLOC_HOOKS +-# ifdef __INTEL_COMPILER /* ICC */ +-# pragma warning push +-# pragma warning disable 1478 +- return __free_hook; +-# pragma warning pop +-# elif defined __clang__ /* Clang */ +-# pragma clang diagnostic push +-# pragma clang diagnostic ignored "-Wdeprecated-declarations" +- return __free_hook; +-# pragma clang diagnostic pop +-# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- return __free_hook; +-# pragma GCC diagnostic pop +-# else /* others */ +- return __free_hook; +-# endif +-#else /* !HAVE_GLIBC_MALLOC_HOOKS */ +- return NULL; +-#endif /* HAVE_GLIBC_MALLOC_HOOKS */ ++ return (FI_IBV_EP_TYPE(info) == FI_EP_MSG) && ++ (FI_IBV_EP_PROTO(info) == FI_PROTO_RDMA_CM_IB_XRC); + } + +-static inline fi_ibv_mem_realloc_hook +-fi_ibv_mem_notifier_get_realloc_hook(void) ++static inline int fi_ibv_is_xrc_send_qp(enum ibv_qp_type qp_type) + { +-#ifdef HAVE_GLIBC_MALLOC_HOOKS +-# ifdef __INTEL_COMPILER /* ICC */ +-# pragma warning push +-# pragma warning disable 1478 +- return __realloc_hook; +-# pragma warning pop +-# elif defined __clang__ /* Clang */ +-# pragma clang diagnostic push +-# pragma clang diagnostic ignored "-Wdeprecated-declarations" +- return __realloc_hook; +-# pragma clang diagnostic pop +-# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) /* GCC >= 4.6 */ +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- return __realloc_hook; +-# pragma GCC diagnostic pop +-# else /* others */ +- return __realloc_hook; +-# endif +-#else /* !HAVE_GLIBC_MALLOC_HOOKS */ +- return NULL; +-#endif /* HAVE_GLIBC_MALLOC_HOOKS */ ++ return qp_type == IBV_QPT_XRC_SEND; + } + +-struct fi_ibv_srq_ep { +- struct fid_ep ep_fid; +- struct ibv_srq *srq; +- fastlock_t wre_lock; +- struct util_buf_pool *wre_pool; +- struct dlist_entry wre_list; ++int fi_ibv_domain_xrc_init(struct fi_ibv_domain *domain); ++int fi_ibv_domain_xrc_cleanup(struct fi_ibv_domain *domain); ++ ++enum fi_ibv_ini_qp_state { ++ FI_IBV_INI_QP_UNCONNECTED, ++ FI_IBV_INI_QP_CONNECTING, ++ FI_IBV_INI_QP_CONNECTED + }; + +-int fi_ibv_srq_context(struct fid_domain *domain, struct fi_rx_attr *attr, +- struct fid_ep **rx_ep, void *context); ++#define FI_IBV_NO_INI_TGT_QPNUM 0 ++#define FI_IBV_RECIP_CONN 1 + +-struct fi_ibv_msg_ep { +- struct fid_ep ep_fid; +- struct rdma_cm_id *id; +- struct fi_ibv_eq *eq; +- struct fi_ibv_cq *rcq; +- struct fi_ibv_cq *scq; +- struct fi_ibv_srq_ep *srq_ep; +- uint64_t ep_flags; +- struct fi_info *info; +- ofi_atomic32_t unsignaled_send_cnt; +- int32_t send_signal_thr; +- int32_t send_comp_thr; +- ofi_atomic32_t comp_pending; +- fastlock_t wre_lock; +- struct util_buf_pool *wre_pool; +- struct dlist_entry wre_list; +- uint64_t ep_id; +- struct fi_ibv_domain *domain; ++/* ++ * An XRC transport INI QP connection can be shared within a process to ++ * communicate with all the ranks on the same remote node. This structure is ++ * only accessed during connection setup and tear down and should be ++ * done while holding the domain:xrc:ini_mgmt_lock. ++ */ ++struct fi_ibv_ini_shared_conn { ++ /* To share, EP must have same remote peer host addr and TX CQ */ ++ struct sockaddr *peer_addr; ++ struct fi_ibv_cq *tx_cq; ++ ++ /* The physical INI/TGT QPN connection. Virtual connections to the ++ * same remote peer and TGT QPN will share this connection, with ++ * the remote end opening the specified XRC TGT QPN for sharing. */ ++ enum fi_ibv_ini_qp_state state; ++ struct ibv_qp *ini_qp; ++ uint32_t tgt_qpn; ++ ++ /* EP waiting on or using this INI/TGT physical connection will be in ++ * one of these list and hold a reference to the shared connection. */ ++ struct dlist_entry pending_list; ++ struct dlist_entry active_list; ++ ofi_atomic32_t ref_cnt; + }; + +-struct fi_ibv_msg_epe { +- struct slist_entry entry; +- struct fi_ibv_msg_ep *ep; ++enum fi_ibv_xrc_ep_conn_state { ++ FI_IBV_XRC_UNCONNECTED, ++ FI_IBV_XRC_ORIG_CONNECTING, ++ FI_IBV_XRC_ORIG_CONNECTED, ++ FI_IBV_XRC_RECIP_CONNECTING, ++ FI_IBV_XRC_CONNECTED ++}; ++ ++/* ++ * The following XRC state is only required during XRC connection ++ * establishment and can be freed once bidirectional connectivity ++ * is established. ++ */ ++struct fi_ibv_xrc_ep_conn_setup { ++ uint32_t conn_tag; ++ ++ /* IB CM message stale/duplicate detection processing requires ++ * that shared INI/TGT connections use unique QP numbers during ++ * RDMA CM connection setup. To avoid conflicts with actual HCA ++ * QP number space, we allocate minimal QP that are left in the ++ * reset state and closed once the setup process completes. */ ++ struct ibv_qp *rsvd_ini_qpn; ++ struct ibv_qp *rsvd_tgt_qpn; ++ ++ ++ /* Delivery of the FI_CONNECTED event is delayed until ++ * bidirectional connectivity is established. */ ++ size_t event_len; ++ uint8_t event_data[FI_IBV_CM_DATA_SIZE]; ++ ++ /* Connection request may have to queue waiting for the ++ * physical XRC INI/TGT QP connection to complete. */ ++ int pending_recip; ++ size_t pending_paramlen; ++ uint8_t pending_param[FI_IBV_CM_DATA_SIZE]; ++}; ++ ++struct fi_ibv_ep { ++ struct util_ep util_ep; ++ struct ibv_qp *ibv_qp; ++ union { ++ struct rdma_cm_id *id; ++ struct { ++ struct ofi_ib_ud_ep_name ep_name; ++ int service; ++ }; ++ }; ++ ++ size_t inject_limit; ++ ++ struct fi_ibv_eq *eq; ++ struct fi_ibv_srq_ep *srq_ep; ++ struct fi_info *info; ++ ++ struct { ++ struct ibv_send_wr rma_wr; ++ struct ibv_send_wr msg_wr; ++ struct ibv_sge sge; ++ } *wrs; ++}; ++ ++struct fi_ibv_xrc_ep { ++ /* Must be first */ ++ struct fi_ibv_ep base_ep; ++ ++ /* XRC only fields */ ++ struct rdma_cm_id *tgt_id; ++ struct ibv_qp *tgt_ibv_qp; ++ enum fi_ibv_xrc_ep_conn_state conn_state; ++ uint32_t srqn; ++ uint32_t peer_srqn; ++ ++ /* A reference is held to a shared physical XRC INI/TGT QP connecting ++ * to the destination node. */ ++ struct fi_ibv_ini_shared_conn *ini_conn; ++ struct dlist_entry ini_conn_entry; ++ ++ /* The following state is allocated during XRC bidirectional setup and ++ * freed once the connection is established. */ ++ struct fi_ibv_xrc_ep_conn_setup *conn_setup; + }; + + int fi_ibv_open_ep(struct fid_domain *domain, struct fi_info *info, + struct fid_ep **ep, void *context); + int fi_ibv_passive_ep(struct fid_fabric *fabric, struct fi_info *info, + struct fid_pep **pep, void *context); +-int fi_ibv_rdm_open_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep, void *context); + int fi_ibv_create_ep(const char *node, const char *service, + uint64_t flags, const struct fi_info *hints, + struct rdma_addrinfo **rai, struct rdma_cm_id **id); + void fi_ibv_destroy_ep(struct rdma_addrinfo *rai, struct rdma_cm_id **id); +-int fi_rbv_rdm_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, +- struct fid_cntr **cntr, void *context); +-int fi_ibv_rdm_av_open(struct fid_domain *domain, struct fi_av_attr *attr, +- struct fid_av **av_fid, void *context); +-int fi_ibv_dgram_endpoint_open(struct fid_domain *domain_fid, +- struct fi_info *info, struct fid_ep **ep_fid, +- void *context); +-int fi_ibv_dgram_cq_open(struct fid_domain *domain_fid, struct fi_cq_attr *attr, +- struct fid_cq **cq_fid, void *context); +-int fi_ibv_dgram_cntr_open(struct fid_domain *domain, struct fi_cntr_attr *attr, +- struct fid_cntr **cntr_fid, void *context); + int fi_ibv_dgram_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, + struct fid_av **av_fid, void *context); ++static inline ++struct fi_ibv_domain *fi_ibv_ep_to_domain(struct fi_ibv_ep *ep) ++{ ++ return container_of(ep->util_ep.domain, struct fi_ibv_domain, ++ util_domain); ++} + + struct fi_ops_atomic fi_ibv_msg_ep_atomic_ops; ++struct fi_ops_atomic fi_ibv_msg_xrc_ep_atomic_ops; + struct fi_ops_cm fi_ibv_msg_ep_cm_ops; +-struct fi_ops_msg fi_ibv_msg_ep_msg_ops; ++struct fi_ops_cm fi_ibv_msg_xrc_ep_cm_ops; ++const struct fi_ops_msg fi_ibv_msg_ep_msg_ops_ts; ++const struct fi_ops_msg fi_ibv_msg_ep_msg_ops; ++const struct fi_ops_msg fi_ibv_dgram_msg_ops_ts; ++const struct fi_ops_msg fi_ibv_dgram_msg_ops; ++const struct fi_ops_msg fi_ibv_msg_xrc_ep_msg_ops; ++const struct fi_ops_msg fi_ibv_msg_xrc_ep_msg_ops_ts; ++const struct fi_ops_msg fi_ibv_msg_srq_xrc_ep_msg_ops; ++struct fi_ops_rma fi_ibv_msg_ep_rma_ops_ts; + struct fi_ops_rma fi_ibv_msg_ep_rma_ops; +-struct fi_ops_msg fi_ibv_msg_srq_ep_msg_ops; ++struct fi_ops_rma fi_ibv_msg_xrc_ep_rma_ops_ts; ++struct fi_ops_rma fi_ibv_msg_xrc_ep_rma_ops; ++ ++#define FI_IBV_XRC_VERSION 1 ++ ++struct fi_ibv_xrc_cm_data { ++ uint8_t version; ++ uint8_t reciprocal; ++ uint16_t port; ++ uint32_t param; ++ uint32_t conn_tag; ++}; ++ ++struct fi_ibv_xrc_conn_info { ++ uint32_t conn_tag; ++ uint32_t is_reciprocal; ++ uint32_t ini_qpn; ++ uint32_t conn_data; ++ uint16_t port; ++ struct rdma_conn_param conn_param; ++}; + + struct fi_ibv_connreq { +- struct fid handle; +- struct rdma_cm_id *id; ++ struct fid handle; ++ struct rdma_cm_id *id; ++ ++ /* Support for XRC bidirectional connections, and ++ * non-RDMA CM managed QP. */ ++ int is_xrc; ++ struct fi_ibv_xrc_conn_info xrc; ++}; ++ ++struct fi_ibv_cm_data_hdr { ++ uint8_t size; ++ char data[]; + }; + ++void fi_ibv_msg_ep_get_qp_attr(struct fi_ibv_ep *ep, ++ struct ibv_qp_init_attr *attr); ++int fi_ibv_process_xrc_connreq(struct fi_ibv_ep *ep, ++ struct fi_ibv_connreq *connreq); ++ ++void fi_ibv_next_xrc_conn_state(struct fi_ibv_xrc_ep *ep); ++void fi_ibv_prev_xrc_conn_state(struct fi_ibv_xrc_ep *ep); ++void fi_ibv_eq_set_xrc_conn_tag(struct fi_ibv_xrc_ep *ep); ++void fi_ibv_eq_clear_xrc_conn_tag(struct fi_ibv_xrc_ep *ep); ++struct fi_ibv_xrc_ep *fi_ibv_eq_xrc_conn_tag2ep(struct fi_ibv_eq *eq, ++ uint32_t conn_tag); ++void fi_ibv_set_xrc_cm_data(struct fi_ibv_xrc_cm_data *local, int reciprocal, ++ uint32_t conn_tag, uint16_t port, uint32_t param); ++int fi_ibv_verify_xrc_cm_data(struct fi_ibv_xrc_cm_data *remote, ++ int private_data_len); ++int fi_ibv_connect_xrc(struct fi_ibv_xrc_ep *ep, struct sockaddr *addr, ++ int reciprocal, void *param, size_t paramlen); ++int fi_ibv_accept_xrc(struct fi_ibv_xrc_ep *ep, int reciprocal, ++ void *param, size_t paramlen); ++void fi_ibv_free_xrc_conn_setup(struct fi_ibv_xrc_ep *ep); ++void fi_ibv_add_pending_ini_conn(struct fi_ibv_xrc_ep *ep, int reciprocal, ++ void *conn_param, size_t conn_paramlen); ++void fi_ibv_sched_ini_conn(struct fi_ibv_ini_shared_conn *ini_conn); ++int fi_ibv_get_shared_ini_conn(struct fi_ibv_xrc_ep *ep, ++ struct fi_ibv_ini_shared_conn **ini_conn); ++void fi_ibv_put_shared_ini_conn(struct fi_ibv_xrc_ep *ep); ++int fi_ibv_reserve_qpn(struct fi_ibv_xrc_ep *ep, struct ibv_qp **qp); ++ ++void fi_ibv_save_priv_data(struct fi_ibv_xrc_ep *ep, const void *data, ++ size_t len); ++int fi_ibv_ep_create_ini_qp(struct fi_ibv_xrc_ep *ep, void *dst_addr, ++ uint32_t *peer_tgt_qpn); ++void fi_ibv_ep_ini_conn_done(struct fi_ibv_xrc_ep *ep, uint32_t peer_srqn, ++ uint32_t peer_tgt_qpn); ++void fi_ibv_ep_ini_conn_rejected(struct fi_ibv_xrc_ep *ep); ++int fi_ibv_ep_create_tgt_qp(struct fi_ibv_xrc_ep *ep, uint32_t tgt_qpn); ++void fi_ibv_ep_tgt_conn_done(struct fi_ibv_xrc_ep *qp); ++int fi_ibv_ep_destroy_xrc_qp(struct fi_ibv_xrc_ep *ep); ++ ++int fi_ibv_xrc_close_srq(struct fi_ibv_srq_ep *srq_ep); + int fi_ibv_sockaddr_len(struct sockaddr *addr); + + +@@ -704,16 +743,15 @@ int fi_ibv_fi_to_rai(const struct fi_info *fi, uint64_t flags, + struct rdma_addrinfo *rai); + int fi_ibv_get_rdma_rai(const char *node, const char *service, uint64_t flags, + const struct fi_info *hints, struct rdma_addrinfo **rai); +-int fi_ibv_rdm_cm_bind_ep(struct fi_ibv_rdm_cm *cm, struct fi_ibv_rdm_ep *ep); +- + struct verbs_ep_domain { + char *suffix; + enum fi_ep_type type; ++ uint32_t protocol; + uint64_t caps; + }; + +-extern const struct verbs_ep_domain verbs_rdm_domain; + extern const struct verbs_ep_domain verbs_dgram_domain; ++extern const struct verbs_ep_domain verbs_msg_xrc_domain; + + int fi_ibv_check_ep_attr(const struct fi_info *hints, + const struct fi_info *info); +@@ -721,7 +759,16 @@ int fi_ibv_check_rx_attr(const struct fi_rx_attr *attr, + const struct fi_info *hints, + const struct fi_info *info); + +-ssize_t fi_ibv_poll_cq(struct fi_ibv_cq *cq, struct ibv_wc *wc); ++static inline int fi_ibv_cmp_xrc_domain_name(const char *domain_name, ++ const char *rdma_name) ++{ ++ size_t domain_len = strlen(domain_name); ++ size_t suffix_len = strlen(verbs_msg_xrc_domain.suffix); ++ ++ return domain_len > suffix_len ? strncmp(domain_name, rdma_name, ++ domain_len - suffix_len) : -1; ++} ++ + int fi_ibv_cq_signal(struct fid_cq *cq); + + ssize_t fi_ibv_eq_write_event(struct fi_ibv_eq *eq, uint32_t event, +@@ -731,29 +778,117 @@ int fi_ibv_query_atomic(struct fid_domain *domain_fid, enum fi_datatype datatype + enum fi_op op, struct fi_atomic_attr *attr, + uint64_t flags); + int fi_ibv_set_rnr_timer(struct ibv_qp *qp); +-void fi_ibv_empty_wre_list(struct util_buf_pool *wre_pool, +- struct dlist_entry *wre_list, +- enum fi_ibv_wre_type wre_type); +-void fi_ibv_cleanup_cq(struct fi_ibv_msg_ep *cur_ep); ++void fi_ibv_cleanup_cq(struct fi_ibv_ep *cur_ep); + int fi_ibv_find_max_inline(struct ibv_pd *pd, struct ibv_context *context, +- enum ibv_qp_type qp_type); ++ enum ibv_qp_type qp_type); ++ ++struct fi_ibv_dgram_av { ++ struct util_av util_av; ++ struct dlist_entry av_entry_list; ++}; ++ ++struct fi_ibv_dgram_av_entry { ++ struct dlist_entry list_entry; ++ struct ofi_ib_ud_ep_name addr; ++ struct ibv_ah *ah; ++}; ++ ++static inline struct fi_ibv_dgram_av_entry* ++fi_ibv_dgram_av_lookup_av_entry(fi_addr_t fi_addr) ++{ ++ return (struct fi_ibv_dgram_av_entry *)fi_addr; ++} ++ ++/* NOTE: ++ * When ibv_post_send/recv returns '-1' it means the following: ++ * Deal with non-compliant libibverbs drivers which set errno ++ * instead of directly returning the error value ++ */ ++static inline ssize_t fi_ibv_handle_post(int ret) ++{ ++ switch (ret) { ++ case -ENOMEM: ++ case ENOMEM: ++ ret = -FI_EAGAIN; ++ break; ++ case -1: ++ ret = (errno == ENOMEM) ? -FI_EAGAIN : ++ -errno; ++ break; ++ default: ++ ret = -abs(ret); ++ break; ++ } ++ return ret; ++} ++ ++/* Returns 0 if it processes WR entry for which user ++ * doesn't request the completion */ ++static inline int ++fi_ibv_process_wc(struct fi_ibv_cq *cq, struct ibv_wc *wc) ++{ ++ return (wc->wr_id == VERBS_NO_COMP_FLAG) ? 0 : 1; ++} ++ ++/* Returns 0 and tries read new completions if it processes ++ * WR entry for which user doesn't request the completion */ ++static inline int ++fi_ibv_process_wc_poll_new(struct fi_ibv_cq *cq, struct ibv_wc *wc) ++{ ++ if (wc->wr_id == VERBS_NO_COMP_FLAG) { ++ int ret; ++ ++ while ((ret = ibv_poll_cq(cq->cq, 1, wc)) > 0) { ++ if (wc->wr_id != VERBS_NO_COMP_FLAG) ++ return 1; ++ } ++ return ret; ++ } ++ return 1; ++} ++ ++static inline int fi_ibv_wc_2_wce(struct fi_ibv_cq *cq, ++ struct ibv_wc *wc, ++ struct fi_ibv_wce **wce) ++ ++{ ++ *wce = util_buf_alloc(cq->wce_pool); ++ if (OFI_UNLIKELY(!*wce)) ++ return -FI_ENOMEM; ++ memset(*wce, 0, sizeof(**wce)); ++ (*wce)->wc = *wc; ++ ++ return FI_SUCCESS; ++} + + #define fi_ibv_init_sge(buf, len, desc) (struct ibv_sge) \ + { .addr = (uintptr_t)buf, \ + .length = (uint32_t)len, \ + .lkey = (uint32_t)(uintptr_t)desc } + +-#define fi_ibv_set_sge_iov(sg_list, iov, count, desc, len) \ +-({ \ +- size_t i; \ +- sg_list = alloca(sizeof(*sg_list) * count); \ +- for (i = 0; i < count; i++) { \ +- sg_list[i] = fi_ibv_init_sge( \ +- iov[i].iov_base, \ +- iov[i].iov_len, \ +- desc[i]); \ +- len += iov[i].iov_len; \ +- } \ ++#define fi_ibv_set_sge_iov(sg_list, iov, count, desc) \ ++({ \ ++ size_t i; \ ++ sg_list = alloca(sizeof(*sg_list) * count); \ ++ for (i = 0; i < count; i++) { \ ++ sg_list[i] = fi_ibv_init_sge( \ ++ iov[i].iov_base, \ ++ iov[i].iov_len, \ ++ desc[i]); \ ++ } \ ++}) ++ ++#define fi_ibv_set_sge_iov_count_len(sg_list, iov, count, desc, len) \ ++({ \ ++ size_t i; \ ++ sg_list = alloca(sizeof(*sg_list) * count); \ ++ for (i = 0; i < count; i++) { \ ++ sg_list[i] = fi_ibv_init_sge( \ ++ iov[i].iov_base, \ ++ iov[i].iov_len, \ ++ desc[i]); \ ++ len += iov[i].iov_len; \ ++ } \ + }) + + #define fi_ibv_init_sge_inline(buf, len) fi_ibv_init_sge(buf, len, NULL) +@@ -766,16 +901,124 @@ int fi_ibv_find_max_inline(struct ibv_pd *pd, struct ibv_context *context, + sg_list[i] = fi_ibv_init_sge_inline( \ + iov[i].iov_base, \ + iov[i].iov_len); \ +- len += iov[i].iov_len; \ ++ len += iov[i].iov_len; \ + } \ + }) + +-#define fi_ibv_send_iov(ep, wr, iov, desc, count, context) \ +- fi_ibv_send_iov_flags(ep, wr, iov, desc, count, context, \ +- ep->info->tx_attr->op_flags) ++#define fi_ibv_send_iov(ep, wr, iov, desc, count) \ ++ fi_ibv_send_iov_flags(ep, wr, iov, desc, count, \ ++ (ep)->info->tx_attr->op_flags) + + #define fi_ibv_send_msg(ep, wr, msg, flags) \ +- fi_ibv_send_iov_flags(ep, wr, msg->msg_iov, msg->desc, \ +- msg->iov_count, msg->context, flags) ++ fi_ibv_send_iov_flags(ep, wr, (msg)->msg_iov, (msg)->desc, \ ++ (msg)->iov_count, flags) ++ ++ ++static inline int fi_ibv_poll_reap_unsig_cq(struct fi_ibv_ep *ep) ++{ ++ struct fi_ibv_wce *wce; ++ struct ibv_wc wc[10]; ++ int ret, i; ++ struct fi_ibv_cq *cq = ++ container_of(ep->util_ep.tx_cq, struct fi_ibv_cq, util_cq); ++ ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); ++ /* TODO: retrieve WCs as much as possible in a single ++ * ibv_poll_cq call */ ++ while (1) { ++ ret = ibv_poll_cq(cq->cq, 10, wc); ++ if (ret <= 0) { ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); ++ return ret; ++ } ++ ++ for (i = 0; i < ret; i++) { ++ if (!fi_ibv_process_wc(cq, &wc[i]) || ++ OFI_UNLIKELY(wc[i].status == IBV_WC_WR_FLUSH_ERR)) ++ continue; ++ if (OFI_LIKELY(!fi_ibv_wc_2_wce(cq, &wc[i], &wce))) ++ slist_insert_tail(&wce->entry, &cq->wcq); ++ } ++ } ++ ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); ++ return FI_SUCCESS; ++} ++ ++/* WR must be filled out by now except for context */ ++static inline ssize_t ++fi_ibv_send_poll_cq_if_needed(struct fi_ibv_ep *ep, struct ibv_send_wr *wr) ++{ ++ int ret; ++ struct ibv_send_wr *bad_wr; ++ ++ ret = ibv_post_send(ep->ibv_qp, wr, &bad_wr); ++ if (OFI_UNLIKELY(ret)) { ++ ret = fi_ibv_handle_post(ret); ++ if (OFI_LIKELY(ret == -FI_EAGAIN)) { ++ ret = fi_ibv_poll_reap_unsig_cq(ep); ++ if (OFI_UNLIKELY(ret)) ++ return -FI_EAGAIN; ++ /* Try again and return control to a caller */ ++ ret = fi_ibv_handle_post(ibv_post_send(ep->ibv_qp, wr, ++ &bad_wr)); ++ } ++ } ++ return ret; ++} ++ ++static inline ssize_t ++fi_ibv_send_buf(struct fi_ibv_ep *ep, struct ibv_send_wr *wr, ++ const void *buf, size_t len, void *desc) ++{ ++ struct ibv_sge sge = fi_ibv_init_sge(buf, len, desc); ++ ++ assert(wr->wr_id != VERBS_NO_COMP_FLAG); ++ ++ wr->sg_list = &sge; ++ wr->num_sge = 1; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, wr); ++} ++ ++static inline ssize_t ++fi_ibv_send_buf_inline(struct fi_ibv_ep *ep, struct ibv_send_wr *wr, ++ const void *buf, size_t len) ++{ ++ struct ibv_sge sge = fi_ibv_init_sge_inline(buf, len); ++ ++ assert(wr->wr_id == VERBS_NO_COMP_FLAG); ++ ++ wr->sg_list = &sge; ++ wr->num_sge = 1; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, wr); ++} ++ ++static inline ssize_t ++fi_ibv_send_iov_flags(struct fi_ibv_ep *ep, struct ibv_send_wr *wr, ++ const struct iovec *iov, void **desc, int count, ++ uint64_t flags) ++{ ++ size_t len = 0; ++ ++ if (!desc) ++ fi_ibv_set_sge_iov_inline(wr->sg_list, iov, count, len); ++ else ++ fi_ibv_set_sge_iov_count_len(wr->sg_list, iov, count, desc, len); ++ ++ wr->num_sge = count; ++ wr->send_flags = VERBS_INJECT_FLAGS(ep, len, flags); ++ wr->wr_id = VERBS_COMP_FLAGS(ep, flags, wr->wr_id); ++ ++ if (flags & FI_FENCE) ++ wr->send_flags |= IBV_SEND_FENCE; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, wr); ++} ++ ++int fi_ibv_get_rai_id(const char *node, const char *service, uint64_t flags, ++ const struct fi_info *hints, struct rdma_addrinfo **rai, ++ struct rdma_cm_id **id); + + #endif /* FI_VERBS_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ofi_verbs_priv.h b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ofi_verbs_priv.h +new file mode 100644 +index 000000000..c19a1f16e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/ofi_verbs_priv.h +@@ -0,0 +1,63 @@ ++/* ++ * Copyright (c) 2018 Cray Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef OFI_VERBS_PRIV_H ++#define OFI_VERBS_PRIV_H ++ ++#if !VERBS_HAVE_XRC ++#define IBV_QPT_XRC_SEND 9ull ++#define IBV_QPT_XRC_RECV 10ull ++ ++#define IBV_DEVICE_XRC (1 << 20) ++ ++#define IBV_SRQ_INIT_ATTR_TYPE 0ull ++#define IBV_SRQ_INIT_ATTR_PD 1ull ++#define IBV_SRQ_INIT_ATTR_XRCD 2ull ++#define IBV_SRQ_INIT_ATTR_CQ 3ull ++ ++#define IBV_SRQT_XRC 1ull ++#define FI_IBV_SET_REMOTE_SRQN(var, val) do { } while (0) ++#define FI_VERBS_XRC_ONLY __attribute__((unused)) ++ ++#define ibv_get_srq_num(srq, srqn) do { } while (0) ++#define ibv_create_srq_ex(context, attr) (NULL) ++#else /* !VERBS_HAVE_XRC */ ++ ++#define FI_IBV_SET_REMOTE_SRQN(var, val) \ ++ do { \ ++ (var).qp_type.xrc.remote_srqn = (val); \ ++ } while (0) ++ ++#define FI_VERBS_XRC_ONLY ++#endif /* VERBS_HAVE_XRC */ ++ ++#endif /* OFI_VERBS_PRIV_H */ +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm.c +index 23f702efd..92deef585 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm.c +@@ -55,12 +55,11 @@ static int fi_ibv_copy_addr(void *dst_addr, size_t *dst_addrlen, void *src_addr) + + static int fi_ibv_msg_ep_setname(fid_t ep_fid, void *addr, size_t addrlen) + { +- struct fi_ibv_msg_ep *ep; + void *save_addr; + struct rdma_cm_id *id; + int ret; +- +- ep = container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); + + if (addrlen != ep->info->src_addrlen) { + VERBS_INFO(FI_LOG_EP_CTRL,"addrlen expected: %zu, got: %zu.\n", +@@ -86,6 +85,7 @@ static int fi_ibv_msg_ep_setname(fid_t ep_fid, void *addr, size_t addrlen) + rdma_destroy_ep(ep->id); + + ep->id = id; ++ ep->ibv_qp = ep->id->qp; + free(save_addr); + + return 0; +@@ -98,48 +98,68 @@ err1: + + static int fi_ibv_msg_ep_getname(fid_t ep, void *addr, size_t *addrlen) + { +- struct fi_ibv_msg_ep *_ep; + struct sockaddr *sa; +- +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); + sa = rdma_get_local_addr(_ep->id); + return fi_ibv_copy_addr(addr, addrlen, sa); + } + + static int fi_ibv_msg_ep_getpeer(struct fid_ep *ep, void *addr, size_t *addrlen) + { +- struct fi_ibv_msg_ep *_ep; + struct sockaddr *sa; +- +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); + sa = rdma_get_peer_addr(_ep->id); + return fi_ibv_copy_addr(addr, addrlen, sa); + } + ++static inline void ++fi_ibv_msg_ep_prepare_cm_data(const void *param, size_t param_size, ++ struct fi_ibv_cm_data_hdr *cm_hdr) ++{ ++ cm_hdr->size = (uint8_t)param_size; ++ memcpy(cm_hdr->data, param, cm_hdr->size); ++} ++ ++static inline void ++fi_ibv_ep_prepare_rdma_cm_param(struct rdma_conn_param *conn_param, ++ struct fi_ibv_cm_data_hdr *cm_hdr, ++ size_t cm_hdr_data_size) ++{ ++ conn_param->private_data = cm_hdr; ++ conn_param->private_data_len = (uint8_t)cm_hdr_data_size; ++ conn_param->responder_resources = RDMA_MAX_RESP_RES; ++ conn_param->initiator_depth = RDMA_MAX_INIT_DEPTH; ++ conn_param->flow_control = 1; ++ conn_param->rnr_retry_count = 7; ++} ++ + static int + fi_ibv_msg_ep_connect(struct fid_ep *ep, const void *addr, +- const void *param, size_t paramlen) ++ const void *param, size_t paramlen) + { +- struct fi_ibv_msg_ep *_ep; +- struct rdma_conn_param conn_param; ++ struct rdma_conn_param conn_param = { 0 }; + struct sockaddr *src_addr, *dst_addr; + int ret; ++ struct fi_ibv_cm_data_hdr *cm_hdr; ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ if (OFI_UNLIKELY(paramlen > VERBS_CM_DATA_SIZE)) ++ return -FI_EINVAL; + +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); + if (!_ep->id->qp) { +- ret = ep->fid.ops->control(&ep->fid, FI_ENABLE, NULL); ++ ret = fi_control(&ep->fid, FI_ENABLE, NULL); + if (ret) + return ret; + } + +- memset(&conn_param, 0, sizeof conn_param); +- conn_param.private_data = param; +- conn_param.private_data_len = paramlen; +- conn_param.responder_resources = RDMA_MAX_RESP_RES; +- conn_param.initiator_depth = RDMA_MAX_INIT_DEPTH; +- conn_param.flow_control = 1; ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ fi_ibv_ep_prepare_rdma_cm_param(&conn_param, cm_hdr, ++ sizeof(*cm_hdr) + paramlen); + conn_param.retry_count = 15; +- conn_param.rnr_retry_count = 7; + + if (_ep->srq_ep) + conn_param.srq = 1; +@@ -164,25 +184,26 @@ fi_ibv_msg_ep_connect(struct fid_ep *ep, const void *addr, + static int + fi_ibv_msg_ep_accept(struct fid_ep *ep, const void *param, size_t paramlen) + { +- struct fi_ibv_msg_ep *_ep; + struct rdma_conn_param conn_param; + struct fi_ibv_connreq *connreq; + int ret; ++ struct fi_ibv_cm_data_hdr *cm_hdr; ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ if (OFI_UNLIKELY(paramlen > VERBS_CM_DATA_SIZE)) ++ return -FI_EINVAL; + +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); + if (!_ep->id->qp) { +- ret = ep->fid.ops->control(&ep->fid, FI_ENABLE, NULL); ++ ret = fi_control(&ep->fid, FI_ENABLE, NULL); + if (ret) + return ret; + } + +- memset(&conn_param, 0, sizeof conn_param); +- conn_param.private_data = param; +- conn_param.private_data_len = paramlen; +- conn_param.responder_resources = RDMA_MAX_RESP_RES; +- conn_param.initiator_depth = RDMA_MAX_INIT_DEPTH; +- conn_param.flow_control = 1; +- conn_param.rnr_retry_count = 7; ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ fi_ibv_ep_prepare_rdma_cm_param(&conn_param, cm_hdr, ++ sizeof(*cm_hdr) + paramlen); + + if (_ep->srq_ep) + conn_param.srq = 1; +@@ -197,24 +218,86 @@ fi_ibv_msg_ep_accept(struct fid_ep *ep, const void *param, size_t paramlen) + return 0; + } + ++static int fi_ibv_msg_alloc_xrc_params(void **adjusted_param, ++ const void *param, size_t *paramlen) ++{ ++ struct fi_ibv_xrc_cm_data *cm_data; ++ size_t cm_datalen = sizeof(*cm_data) + *paramlen; ++ ++ *adjusted_param = NULL; ++ ++ if (cm_datalen > FI_IBV_CM_DATA_SIZE) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "XRC CM data overflow %"PRIu64"\n", ++ cm_datalen); ++ return -FI_EINVAL; ++ } ++ ++ cm_data = malloc(cm_datalen); ++ if (!cm_data) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to allocate XRC CM data\n"); ++ return -FI_ENOMEM; ++ } ++ ++ if (*paramlen) ++ memcpy((cm_data + 1), param, *paramlen); ++ ++ *paramlen = cm_datalen; ++ *adjusted_param = cm_data; ++ return FI_SUCCESS; ++} ++ ++static int ++fi_ibv_msg_xrc_ep_reject(struct fi_ibv_connreq *connreq, ++ const void *param, size_t paramlen) ++{ ++ struct fi_ibv_xrc_cm_data *cm_data; ++ int ret; ++ ++ ret = fi_ibv_msg_alloc_xrc_params((void **)&cm_data, param, ¶mlen); ++ if (ret) ++ return ret; ++ ++ fi_ibv_set_xrc_cm_data(cm_data, connreq->xrc.is_reciprocal, ++ connreq->xrc.conn_tag, connreq->xrc.port, 0); ++ ret = rdma_reject(connreq->id, cm_data, ++ (uint8_t) paramlen) ? -errno : 0; ++ free(cm_data); ++ return ret; ++} ++ + static int + fi_ibv_msg_ep_reject(struct fid_pep *pep, fid_t handle, +- const void *param, size_t paramlen) ++ const void *param, size_t paramlen) + { +- struct fi_ibv_connreq *connreq; ++ struct fi_ibv_connreq *connreq = ++ container_of(handle, struct fi_ibv_connreq, handle); ++ struct fi_ibv_cm_data_hdr *cm_hdr; + int ret; + +- connreq = container_of(handle, struct fi_ibv_connreq, handle); +- ret = rdma_reject(connreq->id, param, (uint8_t) paramlen) ? -errno : 0; ++ if (OFI_UNLIKELY(paramlen > VERBS_CM_DATA_SIZE)) ++ return -FI_EINVAL; ++ ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ ++ if (connreq->is_xrc) ++ ret = fi_ibv_msg_xrc_ep_reject(connreq, cm_hdr, ++ (uint8_t)(sizeof(*cm_hdr) + paramlen)); ++ ++ else ++ ret = rdma_reject(connreq->id, cm_hdr, ++ (uint8_t)(sizeof(*cm_hdr) + paramlen)) ? -errno : 0; + free(connreq); + return ret; + } + + static int fi_ibv_msg_ep_shutdown(struct fid_ep *ep, uint64_t flags) + { +- struct fi_ibv_msg_ep *_ep; +- _ep = container_of(ep, struct fi_ibv_msg_ep, ep_fid); +- return rdma_disconnect(_ep->id) ? -errno : 0; ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); ++ if (_ep->id) ++ return rdma_disconnect(_ep->id) ? -errno : 0; ++ return 0; + } + + struct fi_ops_cm fi_ibv_msg_ep_cm_ops = { +@@ -230,6 +313,102 @@ struct fi_ops_cm fi_ibv_msg_ep_cm_ops = { + .join = fi_no_join, + }; + ++static int ++fi_ibv_msg_xrc_cm_common_verify(struct fi_ibv_xrc_ep *ep, size_t paramlen) ++{ ++ int ret; ++ ++ if (!fi_ibv_is_xrc(ep->base_ep.info)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "EP is not using XRC\n"); ++ return -FI_EINVAL; ++ } ++ ++ if (!ep->srqn) { ++ ret = fi_control(&ep->base_ep.util_ep.ep_fid.fid, ++ FI_ENABLE, NULL); ++ if (ret) ++ return ret; ++ } ++ ++ if (OFI_UNLIKELY(paramlen > VERBS_CM_DATA_SIZE - ++ sizeof(struct fi_ibv_xrc_cm_data))) ++ return -FI_EINVAL; ++ ++ return FI_SUCCESS; ++} ++ ++static int ++fi_ibv_msg_xrc_ep_connect(struct fid_ep *ep, const void *addr, ++ const void *param, size_t paramlen) ++{ ++ struct sockaddr *dst_addr; ++ void *adjusted_param; ++ struct fi_ibv_ep *_ep = container_of(ep, struct fi_ibv_ep, ++ util_ep.ep_fid); ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(_ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ int ret; ++ struct fi_ibv_cm_data_hdr *cm_hdr; ++ ++ ret = fi_ibv_msg_xrc_cm_common_verify(xrc_ep, paramlen); ++ if (ret) ++ return ret; ++ ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ paramlen += sizeof(*cm_hdr); ++ ++ ret = fi_ibv_msg_alloc_xrc_params(&adjusted_param, cm_hdr, ¶mlen); ++ if (ret) ++ return ret; ++ ++ dst_addr = rdma_get_peer_addr(_ep->id); ++ ret = fi_ibv_connect_xrc(xrc_ep, dst_addr, 0, adjusted_param, paramlen); ++ free(adjusted_param); ++ return ret; ++} ++ ++static int ++fi_ibv_msg_xrc_ep_accept(struct fid_ep *ep, const void *param, size_t paramlen) ++{ ++ void *adjusted_param; ++ struct fi_ibv_ep *_ep = ++ container_of(ep, struct fi_ibv_ep, util_ep.ep_fid); ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(_ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ int ret; ++ struct fi_ibv_cm_data_hdr *cm_hdr; ++ ++ ret = fi_ibv_msg_xrc_cm_common_verify(xrc_ep, paramlen); ++ if (ret) ++ return ret; ++ ++ cm_hdr = alloca(sizeof(*cm_hdr) + paramlen); ++ fi_ibv_msg_ep_prepare_cm_data(param, paramlen, cm_hdr); ++ paramlen += sizeof(*cm_hdr); ++ ++ ret = fi_ibv_msg_alloc_xrc_params(&adjusted_param, cm_hdr, ¶mlen); ++ if (ret) ++ return ret; ++ ++ ret = fi_ibv_accept_xrc(xrc_ep, 0, adjusted_param, paramlen); ++ free(adjusted_param); ++ return ret; ++} ++ ++struct fi_ops_cm fi_ibv_msg_xrc_ep_cm_ops = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = fi_ibv_msg_ep_setname, ++ .getname = fi_ibv_msg_ep_getname, ++ .getpeer = fi_ibv_msg_ep_getpeer, ++ .connect = fi_ibv_msg_xrc_ep_connect, ++ .listen = fi_no_listen, ++ .accept = fi_ibv_msg_xrc_ep_accept, ++ .reject = fi_no_reject, ++ .shutdown = fi_ibv_msg_ep_shutdown, ++ .join = fi_no_join, ++}; ++ + static int fi_ibv_pep_setname(fid_t pep_fid, void *addr, size_t addrlen) + { + struct fi_ibv_pep *pep; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm_xrc.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm_xrc.c +new file mode 100644 +index 000000000..481c8506f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cm_xrc.c +@@ -0,0 +1,381 @@ ++/* ++ * Copyright (c) 2018 Cray Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++#include "fi_verbs.h" ++ ++void fi_ibv_next_xrc_conn_state(struct fi_ibv_xrc_ep *ep) ++{ ++ switch (ep->conn_state) { ++ case FI_IBV_XRC_UNCONNECTED: ++ ep->conn_state = FI_IBV_XRC_ORIG_CONNECTING; ++ break; ++ case FI_IBV_XRC_ORIG_CONNECTING: ++ ep->conn_state = FI_IBV_XRC_ORIG_CONNECTED; ++ break; ++ case FI_IBV_XRC_ORIG_CONNECTED: ++ ep->conn_state = FI_IBV_XRC_RECIP_CONNECTING; ++ break; ++ case FI_IBV_XRC_RECIP_CONNECTING: ++ ep->conn_state = FI_IBV_XRC_CONNECTED; ++ break; ++ case FI_IBV_XRC_CONNECTED: ++ break; ++ default: ++ assert(0); ++ VERBS_WARN(FI_LOG_FABRIC, "Unkown XRC connection state %d\n", ++ ep->conn_state); ++ } ++} ++ ++void fi_ibv_prev_xrc_conn_state(struct fi_ibv_xrc_ep *ep) ++{ ++ switch (ep->conn_state) { ++ case FI_IBV_XRC_UNCONNECTED: ++ break; ++ case FI_IBV_XRC_ORIG_CONNECTING: ++ ep->conn_state = FI_IBV_XRC_UNCONNECTED; ++ break; ++ case FI_IBV_XRC_ORIG_CONNECTED: ++ ep->conn_state = FI_IBV_XRC_ORIG_CONNECTING; ++ break; ++ case FI_IBV_XRC_RECIP_CONNECTING: ++ ep->conn_state = FI_IBV_XRC_ORIG_CONNECTED; ++ break; ++ case FI_IBV_XRC_CONNECTED: ++ ep->conn_state = FI_IBV_XRC_RECIP_CONNECTING; ++ break; ++ default: ++ assert(0); ++ VERBS_WARN(FI_LOG_FABRIC, "Unkown XRC connection state %d\n", ++ ep->conn_state); ++ } ++} ++ ++void fi_ibv_save_priv_data(struct fi_ibv_xrc_ep *ep, const void *data, ++ size_t len) ++{ ++ ep->conn_setup->event_len = MIN(sizeof(ep->conn_setup->event_data), ++ len); ++ memcpy(ep->conn_setup->event_data, data, ep->conn_setup->event_len); ++} ++ ++void fi_ibv_set_xrc_cm_data(struct fi_ibv_xrc_cm_data *local, int reciprocal, ++ uint32_t conn_tag, uint16_t port, uint32_t param) ++{ ++ local->version = FI_IBV_XRC_VERSION; ++ local->reciprocal = reciprocal ? 1 : 0; ++ local->port = htons(port); ++ local->conn_tag = htonl(conn_tag); ++ local->param = htonl(param); ++} ++ ++int fi_ibv_verify_xrc_cm_data(struct fi_ibv_xrc_cm_data *remote, ++ int private_data_len) ++{ ++ if (sizeof(*remote) > private_data_len) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "XRC MSG EP CM data length mismatch\n"); ++ return -FI_EINVAL; ++ } ++ ++ if (remote->version != FI_IBV_XRC_VERSION) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "XRC MSG EP connection protocol mismatch " ++ "(local %"PRIu8", remote %"PRIu8")\n", ++ FI_IBV_XRC_VERSION, remote->version); ++ return -FI_EINVAL; ++ } ++ return FI_SUCCESS; ++} ++ ++void fi_ibv_log_ep_conn(struct fi_ibv_xrc_ep *ep, char *desc) ++{ ++ struct sockaddr *addr; ++ char buf[OFI_ADDRSTRLEN]; ++ size_t len = sizeof(buf); ++ ++ if (!fi_log_enabled(&fi_ibv_prov, FI_LOG_INFO, FI_LOG_FABRIC)) ++ return; ++ ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, %s\n", ep, desc); ++ VERBS_INFO(FI_LOG_FABRIC, ++ "EP %p, CM ID %p, TGT CM ID %p, SRQN %d Peer SRQN %d\n", ++ ep, ep->base_ep.id, ep->tgt_id, ep->srqn, ep->peer_srqn); ++ ++ assert(ep->base_ep.id); ++ ++ addr = rdma_get_local_addr(ep->base_ep.id); ++ if (addr) { ++ ofi_straddr(buf, &len, ep->base_ep.info->addr_format, addr); ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p src_addr: %s\n", ep, buf); ++ } ++ addr = rdma_get_peer_addr(ep->base_ep.id); ++ if (addr) { ++ len = sizeof(buf); ++ ofi_straddr(buf, &len, ep->base_ep.info->addr_format, addr); ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p dst_addr: %s\n", ep, buf); ++ } ++ ++ if (ep->base_ep.ibv_qp) { ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, INI QP Num %d\n", ++ ep, ep->base_ep.ibv_qp->qp_num); ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, Remote TGT QP Num %d\n", ep, ++ ep->ini_conn->tgt_qpn); ++ } ++ if (ep->tgt_ibv_qp) ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, TGT QP Num %d\n", ++ ep, ep->tgt_ibv_qp->qp_num); ++ if (ep->conn_setup && ep->conn_setup->rsvd_ini_qpn) ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, Reserved INI QPN %d\n", ++ ep, ep->conn_setup->rsvd_ini_qpn->qp_num); ++ if (ep->conn_setup && ep->conn_setup->rsvd_tgt_qpn) ++ VERBS_INFO(FI_LOG_FABRIC, "EP %p, Reserved TGT QPN %d\n", ++ ep, ep->conn_setup->rsvd_tgt_qpn->qp_num); ++} ++ ++void fi_ibv_free_xrc_conn_setup(struct fi_ibv_xrc_ep *ep) ++{ ++ assert(ep->conn_setup); ++ ++ if (ep->conn_setup->rsvd_ini_qpn) ++ ibv_destroy_qp(ep->conn_setup->rsvd_ini_qpn); ++ if (ep->conn_setup->rsvd_tgt_qpn) ++ ibv_destroy_qp(ep->conn_setup->rsvd_tgt_qpn); ++ ++ free(ep->conn_setup); ++ ep->conn_setup = NULL; ++ ++ /*Free RDMA CM IDs releasing their associated resources, RDMA CM ++ * is used for connection setup only with XRC */ ++ if (ep->base_ep.id) { ++ rdma_destroy_id(ep->base_ep.id); ++ ep->base_ep.id = NULL; ++ } ++ if (ep->tgt_id) { ++ rdma_destroy_id(ep->tgt_id); ++ ep->tgt_id = NULL; ++ } ++} ++ ++int fi_ibv_connect_xrc(struct fi_ibv_xrc_ep *ep, struct sockaddr *addr, ++ int reciprocal, void *param, size_t paramlen) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct sockaddr *peer_addr; ++ int ret; ++ ++ assert(ep->base_ep.id && !ep->base_ep.ibv_qp && !ep->ini_conn); ++ ++ peer_addr = rdma_get_local_addr(ep->base_ep.id); ++ if (peer_addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_FABRIC, ++ "XRC connect src_addr", peer_addr); ++ ++ peer_addr = rdma_get_peer_addr(ep->base_ep.id); ++ if (peer_addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_FABRIC, ++ "XRC connect dest_addr", peer_addr); ++ ++ if (!reciprocal) { ++ ep->conn_setup = calloc(1, sizeof(*ep->conn_setup)); ++ if (!ep->conn_setup) ++ return -FI_ENOMEM; ++ } ++ ++ fastlock_acquire(&domain->xrc.ini_mgmt_lock); ++ ret = fi_ibv_get_shared_ini_conn(ep, &ep->ini_conn); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Get of shared XRC INI connection failed %d\n", ret); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++ if (!reciprocal) { ++ free(ep->conn_setup); ++ ep->conn_setup = NULL; ++ } ++ return ret; ++ } ++ fi_ibv_add_pending_ini_conn(ep, reciprocal, param, paramlen); ++ fi_ibv_sched_ini_conn(ep->ini_conn); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++ ++ return FI_SUCCESS; ++} ++ ++void fi_ibv_ep_ini_conn_done(struct fi_ibv_xrc_ep *ep, uint32_t peer_srqn, ++ uint32_t tgt_qpn) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ ++ assert(ep->base_ep.id && ep->ini_conn); ++ ++ fastlock_acquire(&domain->xrc.ini_mgmt_lock); ++ ++ assert(ep->ini_conn->state == FI_IBV_INI_QP_CONNECTING || ++ ep->ini_conn->state == FI_IBV_INI_QP_CONNECTED); ++ ++ /* If this was a physical INI/TGT QP connection, remove the QP ++ * from control of the RDMA CM. We don't want the shared INI QP ++ * to be destroyed if this endpoint closes. */ ++ if (ep->base_ep.id->qp) { ++ ep->ini_conn->state = FI_IBV_INI_QP_CONNECTED; ++ ep->ini_conn->tgt_qpn = tgt_qpn; ++ ep->base_ep.id->qp = NULL; ++ VERBS_DBG(FI_LOG_EP_CTRL, ++ "Set INI Conn QP %d remote TGT QP %d\n", ++ ep->ini_conn->ini_qp->qp_num, ++ ep->ini_conn->tgt_qpn); ++ } ++ ++ fi_ibv_log_ep_conn(ep, "INI Connection Done"); ++ fi_ibv_sched_ini_conn(ep->ini_conn); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++} ++ ++void fi_ibv_ep_ini_conn_rejected(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ ++ assert(ep->base_ep.id && ep->ini_conn); ++ ++ fastlock_acquire(&domain->xrc.ini_mgmt_lock); ++ fi_ibv_log_ep_conn(ep, "INI Connection Rejected"); ++ ++ fi_ibv_put_shared_ini_conn(ep); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++} ++ ++void fi_ibv_ep_tgt_conn_done(struct fi_ibv_xrc_ep *ep) ++{ ++ fi_ibv_log_ep_conn(ep, "TGT Connection Done\n"); ++ ++ if (ep->tgt_id->qp) { ++ assert(ep->tgt_ibv_qp == ep->tgt_id->qp); ++ ep->tgt_id->qp = NULL; ++ } ++} ++ ++int fi_ibv_accept_xrc(struct fi_ibv_xrc_ep *ep, int reciprocal, ++ void *param, size_t paramlen) ++{ ++ struct sockaddr *addr; ++ struct fi_ibv_connreq *connreq; ++ struct rdma_conn_param conn_param = { 0 }; ++ struct fi_ibv_xrc_cm_data *cm_data = param; ++ int ret; ++ ++ addr = rdma_get_local_addr(ep->tgt_id); ++ if (addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_CORE, "src_addr", addr); ++ ++ addr = rdma_get_peer_addr(ep->tgt_id); ++ if (addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_CORE, "dest_addr", addr); ++ ++ connreq = container_of(ep->base_ep.info->handle, ++ struct fi_ibv_connreq, handle); ++ ret = fi_ibv_ep_create_tgt_qp(ep, connreq->xrc.conn_data); ++ if (ret) ++ return ret; ++ ++ fi_ibv_set_xrc_cm_data(cm_data, connreq->xrc.is_reciprocal, ++ connreq->xrc.conn_tag, connreq->xrc.port, ++ ep->srqn); ++ conn_param.private_data = cm_data; ++ conn_param.private_data_len = paramlen; ++ conn_param.responder_resources = RDMA_MAX_RESP_RES; ++ conn_param.initiator_depth = RDMA_MAX_INIT_DEPTH; ++ conn_param.flow_control = 1; ++ conn_param.rnr_retry_count = 7; ++ if (ep->base_ep.srq_ep) ++ conn_param.srq = 1; ++ ++ /* Shared INI/TGT QP connection use a temporarily reserved QP number ++ * avoid the appearance of being a stale/duplicate IB CM message */ ++ if (!ep->tgt_id->qp) ++ conn_param.qp_num = ep->conn_setup->rsvd_tgt_qpn->qp_num; ++ ++ if (connreq->xrc.is_reciprocal) ++ fi_ibv_eq_clear_xrc_conn_tag(ep); ++ else ++ ep->conn_setup->conn_tag = connreq->xrc.conn_tag; ++ ++ assert(ep->conn_state == FI_IBV_XRC_UNCONNECTED || ++ ep->conn_state == FI_IBV_XRC_ORIG_CONNECTED); ++ fi_ibv_next_xrc_conn_state(ep); ++ ++ ret = rdma_accept(ep->tgt_id, &conn_param); ++ if (ret) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "XRC TGT, ibv_open_qp", errno); ++ fi_ibv_prev_xrc_conn_state(ep); ++ } ++ free(connreq); ++ return ret; ++} ++ ++int fi_ibv_process_xrc_connreq(struct fi_ibv_ep *ep, ++ struct fi_ibv_connreq *connreq) ++{ ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ int ret; ++ ++ assert(ep->info->src_addr); ++ assert(ep->info->dest_addr); ++ ++ xrc_ep->conn_setup = calloc(1, sizeof(*xrc_ep->conn_setup)); ++ if (!xrc_ep->conn_setup) ++ return -FI_ENOMEM; ++ ++ /* This endpoint was created on the passive side of a connection ++ * request. The reciprocal connection request will go back to the ++ * passive port indicated by the active side */ ++ ofi_addr_set_port(ep->info->src_addr, 0); ++ ofi_addr_set_port(ep->info->dest_addr, connreq->xrc.port); ++ ++ ret = fi_ibv_create_ep(NULL, NULL, 0, ep->info, NULL, &ep->id); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Creation of INI cm_id failed %d\n", ret); ++ goto create_err; ++ } ++ xrc_ep->tgt_id = connreq->id; ++ xrc_ep->tgt_id->context = &ep->util_ep.ep_fid.fid; ++ ++ return FI_SUCCESS; ++ ++create_err: ++ free(xrc_ep->conn_setup); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cq.c +index 2343da682..7522b4266 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_cq.c +@@ -87,9 +87,9 @@ fi_ibv_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *entry, + struct slist_entry *slist_entry; + uint32_t api_version; + +- cq = container_of(cq_fid, struct fi_ibv_cq, cq_fid); ++ cq = container_of(cq_fid, struct fi_ibv_cq, util_cq.cq_fid); + +- fastlock_acquire(&cq->lock); ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); + if (slist_empty(&cq->wcq)) + goto err; + +@@ -97,10 +97,10 @@ fi_ibv_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *entry, + if (!wce->wc.status) + goto err; + +- api_version = cq->domain->util_domain.fabric->fabric_fid.api_version; ++ api_version = cq->util_cq.domain->fabric->fabric_fid.api_version; + + slist_entry = slist_remove_head(&cq->wcq); +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + + wce = container_of(slist_entry, struct fi_ibv_wce, entry); + +@@ -120,9 +120,9 @@ fi_ibv_cq_readerr(struct fid_cq *cq_fid, struct fi_cq_err_entry *entry, + } + + util_buf_release(cq->wce_pool, wce); +- return sizeof(*entry); ++ return 1; + err: +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + return -FI_EAGAIN; + } + +@@ -178,7 +178,7 @@ fi_ibv_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, + uint8_t *p; + + p = buf; +- _cq = container_of(cq, struct fi_ibv_cq, cq_fid); ++ _cq = container_of(cq, struct fi_ibv_cq, util_cq.cq_fid); + + if (!_cq->channel) + return -FI_ENOSYS; +@@ -193,7 +193,7 @@ fi_ibv_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, + break; + } + +- ret = _cq->cq_fid.ops->read(&_cq->cq_fid, p, count - cur); ++ ret = _cq->util_cq.cq_fid.ops->read(&_cq->util_cq.cq_fid, p, count - cur); + if (ret > 0) { + p += ret * _cq->entry_size; + cur += ret; +@@ -207,86 +207,34 @@ fi_ibv_cq_sread(struct fid_cq *cq, void *buf, size_t count, const void *cond, + return cur ? cur : ret; + } + +-static void fi_ibv_cq_read_context_entry(struct ibv_wc *wc, int i, void *buf) ++static void fi_ibv_cq_read_context_entry(struct ibv_wc *wc, void *buf) + { + struct fi_cq_entry *entry = buf; + +- entry[i].op_context = (void *)(uintptr_t)wc->wr_id; ++ entry->op_context = (void *)(uintptr_t)wc->wr_id; + } + +-static void fi_ibv_cq_read_msg_entry(struct ibv_wc *wc, int i, void *buf) ++static void fi_ibv_cq_read_msg_entry(struct ibv_wc *wc, void *buf) + { + struct fi_cq_msg_entry *entry = buf; + +- entry[i].op_context = (void *)(uintptr_t)wc->wr_id; +- fi_ibv_handle_wc(wc, &entry[i].flags, &entry[i].len, NULL); ++ entry->op_context = (void *)(uintptr_t)wc->wr_id; ++ fi_ibv_handle_wc(wc, &entry->flags, &entry->len, NULL); + } + +-static void fi_ibv_cq_read_data_entry(struct ibv_wc *wc, int i, void *buf) ++static void fi_ibv_cq_read_data_entry(struct ibv_wc *wc, void *buf) + { + struct fi_cq_data_entry *entry = buf; + +- entry[i].op_context = (void *)(uintptr_t)wc->wr_id; +- fi_ibv_handle_wc(wc, &entry[i].flags, &entry[i].len, &entry[i].data); +-} +- +-static int fi_ibv_match_ep_id(struct slist_entry *entry, +- const void *ep_id) +-{ +- struct fi_ibv_msg_epe *epe = +- container_of(entry, struct fi_ibv_msg_epe, entry); +- +- return (epe->ep->ep_id == (uint64_t)ep_id); +-} +- +-static inline int fi_ibv_handle_internal_signal_wc(struct fi_ibv_cq *cq, +- struct ibv_wc *wc) +-{ +- struct fi_ibv_msg_epe *epe; +- struct slist_entry *entry; +- +- entry = slist_remove_first_match(&cq->ep_list, +- fi_ibv_match_ep_id, +- (void *)wc->wr_id); +- if (!entry) { +- VERBS_WARN(FI_LOG_CQ, "No matching EP for :" +- "given signaled send completion\n"); +- return -FI_EOTHER; +- } +- epe = container_of(entry, struct fi_ibv_msg_epe, entry); +- ofi_atomic_sub32(&epe->ep->unsignaled_send_cnt, +- epe->ep->send_signal_thr); +- ofi_atomic_dec32(&epe->ep->comp_pending); +- util_buf_release(cq->epe_pool, epe); +- +- return FI_SUCCESS; +-} +- +-static inline int fi_ibv_wc_2_wce(struct fi_ibv_cq *cq, +- struct ibv_wc *wc, +- struct fi_ibv_wce **wce) +- +-{ +- struct fi_ibv_wre *wre = +- (struct fi_ibv_wre *)(uintptr_t)wc->wr_id; +- +- *wce = util_buf_alloc(cq->wce_pool); +- if (!*wce) +- return -FI_ENOMEM; +- memset(*wce, 0, sizeof(**wce)); +- wc->wr_id = (uintptr_t)wre->context; +- (*wce)->wc = *wc; +- +- return FI_SUCCESS; ++ entry->op_context = (void *)(uintptr_t)wc->wr_id; ++ fi_ibv_handle_wc(wc, &entry->flags, &entry->len, &entry->data); + } + + /* Must call with cq->lock held */ +-static inline int fi_ibv_poll_outstanding_cq(struct fi_ibv_msg_ep *ep, ++static inline int fi_ibv_poll_outstanding_cq(struct fi_ibv_ep *ep, + struct fi_ibv_cq *cq) + { +- struct fi_ibv_wre *wre; + struct fi_ibv_wce *wce; +- struct util_buf_pool *wre_pool; + struct ibv_wc wc; + ssize_t ret; + +@@ -294,145 +242,56 @@ static inline int fi_ibv_poll_outstanding_cq(struct fi_ibv_msg_ep *ep, + if (ret <= 0) + return ret; + +- if ((wc.opcode == IBV_WC_RECV) || +- (wc.opcode == IBV_WC_RECV_RDMA_WITH_IMM) || +- ((wc.wr_id & cq->wr_id_mask) != cq->send_signal_wr_id)) { +- wre = (struct fi_ibv_wre *)(uintptr_t)wc.wr_id; +- if (wre->ep) { +- wre_pool = wre->ep->wre_pool; +- if ((wre->ep != ep) && +- (wc.status != IBV_WC_WR_FLUSH_ERR)) { +- ret = fi_ibv_wc_2_wce(cq, &wc, &wce); +- if (ret) { +- wre->ep = NULL; +- ret = -FI_EAGAIN; +- goto fn; +- } +- slist_insert_tail(&wce->entry, &cq->wcq); +- } +- wre->ep = NULL; +- } else { +- /* WRE belongs to SRQ's wre pool and should be +- * handled or rejected if status == `IBV_WC_WR_FLUSH_ERR` */ +- assert(wre->srq); +- wre_pool = wre->srq->wre_pool; +- wre->srq = NULL; +- if (wc.status != IBV_WC_WR_FLUSH_ERR) { +- ret = fi_ibv_wc_2_wce(cq, &wc, &wce); +- if (ret) { +- ret = -FI_EAGAIN; +- goto fn; +- } +- slist_insert_tail(&wce->entry, &cq->wcq); +- } +- } +-fn: +- dlist_remove(&wre->entry); +- util_buf_release(wre_pool, wre); +- return ret; +- } else { +- ret = fi_ibv_handle_internal_signal_wc(cq, &wc); +- return ret ? ret : 1; ++ /* Handle WR entry when user doesn't request the completion */ ++ if (wc.wr_id == VERBS_NO_COMP_FLAG) { ++ /* To ensure the new iteration */ ++ return 1; + } +-} + +-/* Must call with `ep|srq::wre_lock` held */ +-void fi_ibv_empty_wre_list(struct util_buf_pool *wre_pool, +- struct dlist_entry *wre_list, +- enum fi_ibv_wre_type wre_type) +-{ +- struct fi_ibv_wre *wre; +- struct dlist_entry *tmp; +- +- dlist_foreach_container_safe(wre_list, struct fi_ibv_wre, +- wre, entry, tmp) { +- if (wre->wr_type == wre_type) { +- dlist_remove(&wre->entry); +- wre->ep = NULL; +- wre->srq = NULL; +- util_buf_release(wre_pool, wre); ++ if (OFI_LIKELY(wc.status != IBV_WC_WR_FLUSH_ERR)) { ++ ret = fi_ibv_wc_2_wce(cq, &wc, &wce); ++ if (OFI_UNLIKELY(ret)) { ++ ret = -FI_EAGAIN; ++ goto fn; + } ++ slist_insert_tail(&wce->entry, &cq->wcq); + } ++ ret = 1; ++fn: ++ ++ return ret; + } + +-void fi_ibv_cleanup_cq(struct fi_ibv_msg_ep *ep) ++void fi_ibv_cleanup_cq(struct fi_ibv_ep *ep) + { + int ret; + +- fastlock_acquire(&ep->rcq->lock); ++ ep->util_ep.rx_cq->cq_fastlock_acquire(&ep->util_ep.rx_cq->cq_lock); + do { +- ret = fi_ibv_poll_outstanding_cq(ep, ep->rcq); ++ ret = fi_ibv_poll_outstanding_cq(ep, container_of(ep->util_ep.rx_cq, ++ struct fi_ibv_cq, util_cq)); + } while (ret > 0); ++ ep->util_ep.rx_cq->cq_fastlock_release(&ep->util_ep.rx_cq->cq_lock); + +- /* Handle WRs for which there were no appropriate WCs */ +- fastlock_acquire(&ep->wre_lock); +- fi_ibv_empty_wre_list(ep->wre_pool, &ep->wre_list, IBV_RECV_WR); +- fastlock_release(&ep->wre_lock); +- fastlock_release(&ep->rcq->lock); +- +- fastlock_acquire(&ep->scq->lock); ++ ep->util_ep.tx_cq->cq_fastlock_acquire(&ep->util_ep.tx_cq->cq_lock); + do { +- ret = fi_ibv_poll_outstanding_cq(ep, ep->scq); ++ ret = fi_ibv_poll_outstanding_cq(ep, container_of(ep->util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq)); + } while (ret > 0); +- /* Handle WRs for which there were no appropriate WCs */ +- fastlock_acquire(&ep->wre_lock); +- fi_ibv_empty_wre_list(ep->wre_pool, &ep->wre_list, IBV_SEND_WR); +- fastlock_release(&ep->wre_lock); +- fastlock_release(&ep->scq->lock); +- +- fastlock_destroy(&ep->wre_lock); +- util_buf_pool_destroy(ep->wre_pool); ++ ep->util_ep.tx_cq->cq_fastlock_release(&ep->util_ep.tx_cq->cq_lock); + } + + /* Must call with cq->lock held */ ++static inline + ssize_t fi_ibv_poll_cq(struct fi_ibv_cq *cq, struct ibv_wc *wc) + { +- struct fi_ibv_wre *wre; +- struct util_buf_pool *wre_pool; +- fastlock_t *wre_lock; + ssize_t ret; + + ret = ibv_poll_cq(cq->cq, 1, wc); + if (ret <= 0) + return ret; + +- /* TODO Handle the case when app posts a send with same wr_id */ +- if ((wc->opcode == IBV_WC_RECV) || +- (wc->opcode == IBV_WC_RECV_RDMA_WITH_IMM) || +- ((wc->wr_id & cq->wr_id_mask) != cq->send_signal_wr_id)) { +- wre = (struct fi_ibv_wre *)(uintptr_t)wc->wr_id; +- assert(wre && (wre->ep || wre->srq)); +- wc->wr_id = (uintptr_t)wre->context; +- +- if (wc->status == IBV_WC_WR_FLUSH_ERR) { +- /* Handles case where remote side destroys +- * the connection, but local side isn't aware +- * about that yet */ +- ret = 0; +- } +- +- if (wre->ep) { +- wre_pool = wre->ep->wre_pool; +- wre_lock = &wre->ep->wre_lock; +- wre->ep = NULL; +- } else if (wre->srq) { +- wre_pool = wre->srq->wre_pool; +- wre_lock = &wre->srq->wre_lock; +- wre->srq = NULL; +- } else { +- assert(0); +- return -FI_EAVAIL; +- } +- +- fastlock_acquire(wre_lock); +- dlist_remove(&wre->entry); +- util_buf_release(wre_pool, wre); +- fastlock_release(wre_lock); +- } else { +- return fi_ibv_handle_internal_signal_wc(cq, wc); +- } +- +- return ret; ++ return fi_ibv_process_wc_poll_new(cq, wc); + } + + static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) +@@ -443,9 +302,9 @@ static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + struct ibv_wc wc; + ssize_t ret = 0, i; + +- cq = container_of(cq_fid, struct fi_ibv_cq, cq_fid); ++ cq = container_of(cq_fid, struct fi_ibv_cq, util_cq.cq_fid); + +- fastlock_acquire(&cq->lock); ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); + + for (i = 0; i < count; i++) { + if (!slist_empty(&cq->wcq)) { +@@ -456,7 +315,7 @@ static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + } + entry = slist_remove_head(&cq->wcq); + wce = container_of(entry, struct fi_ibv_wce, entry); +- cq->read_entry(&wce->wc, i, buf); ++ cq->read_entry(&wce->wc, (char *)buf + i * cq->entry_size); + util_buf_release(cq->wce_pool, wce); + continue; + } +@@ -466,10 +325,21 @@ static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + break; + + /* Insert error entry into wcq */ +- if (wc.status) { ++ if (OFI_UNLIKELY(wc.status)) { ++ if (wc.status == IBV_WC_WR_FLUSH_ERR) { ++ /* Handle case when remote side destroys ++ * the connection, but local side isn't aware ++ * about that yet */ ++ VERBS_DBG(FI_LOG_CQ, ++ "Ignoring WC with status " ++ "IBV_WC_WR_FLUSH_ERR(%d)\n", ++ wc.status); ++ i--; ++ continue; ++ } + wce = util_buf_alloc(cq->wce_pool); + if (!wce) { +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + return -FI_ENOMEM; + } + memset(wce, 0, sizeof(*wce)); +@@ -479,10 +349,10 @@ static ssize_t fi_ibv_cq_read(struct fid_cq *cq_fid, void *buf, size_t count) + break; + } + +- cq->read_entry(&wc, i, buf); ++ cq->read_entry(&wc, (char *)buf + i * cq->entry_size); + } + +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + return i ? i : (ret ? ret : -FI_EAGAIN); + } + +@@ -500,7 +370,7 @@ int fi_ibv_cq_signal(struct fid_cq *cq) + struct fi_ibv_cq *_cq; + char data = '0'; + +- _cq = container_of(cq, struct fi_ibv_cq, cq_fid); ++ _cq = container_of(cq, struct fi_ibv_cq, util_cq.cq_fid); + + if (write(_cq->signal_fd[1], &data, 1) != 1) { + VERBS_WARN(FI_LOG_CQ, "Error signalling CQ\n"); +@@ -517,14 +387,14 @@ static int fi_ibv_cq_trywait(struct fid *fid) + void *context; + int ret = -FI_EAGAIN, rc; + +- cq = container_of(fid, struct fi_ibv_cq, cq_fid.fid); ++ cq = container_of(fid, struct fi_ibv_cq, util_cq.cq_fid); + + if (!cq->channel) { + VERBS_WARN(FI_LOG_CQ, "No wait object object associated with CQ\n"); + return -FI_EINVAL; + } + +- fastlock_acquire(&cq->lock); ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); + if (!slist_empty(&cq->wcq)) + goto out; + +@@ -567,7 +437,7 @@ static int fi_ibv_cq_trywait(struct fid *fid) + err: + util_buf_release(cq->wce_pool, wce); + out: +- fastlock_release(&cq->lock); ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + return ret; + } + +@@ -587,7 +457,7 @@ static int fi_ibv_cq_control(fid_t fid, int command, void *arg) + struct fi_ibv_cq *cq; + int ret = 0; + +- cq = container_of(fid, struct fi_ibv_cq, cq_fid.fid); ++ cq = container_of(fid, struct fi_ibv_cq, util_cq.cq_fid); + switch(command) { + case FI_GETWAIT: + if (!cq->channel) { +@@ -606,36 +476,41 @@ static int fi_ibv_cq_control(fid_t fid, int command, void *arg) + + static int fi_ibv_cq_close(fid_t fid) + { +- struct fi_ibv_cq *cq; +- struct fi_ibv_msg_epe *epe; + struct fi_ibv_wce *wce; + struct slist_entry *entry; + int ret; +- +- cq = container_of(fid, struct fi_ibv_cq, cq_fid.fid); ++ struct fi_ibv_cq *cq = ++ container_of(fid, struct fi_ibv_cq, util_cq.cq_fid); ++ struct fi_ibv_srq_ep *srq_ep; ++ struct dlist_entry *srq_ep_temp; + + if (ofi_atomic_get32(&cq->nevents)) + ibv_ack_cq_events(cq->cq, ofi_atomic_get32(&cq->nevents)); + +- fastlock_acquire(&cq->lock); ++ /* Since an RX CQ and SRX context can be destroyed in any order, ++ * and the XRC SRQ references the RX CQ, we must destroy any ++ * XRC SRQ using this CQ before destroying the CQ. */ ++ fastlock_acquire(&cq->xrc.srq_list_lock); ++ dlist_foreach_container_safe(&cq->xrc.srq_list, struct fi_ibv_srq_ep, ++ srq_ep, xrc.srq_entry, srq_ep_temp) { ++ ret = fi_ibv_xrc_close_srq(srq_ep); ++ if (ret) { ++ fastlock_release(&cq->xrc.srq_list_lock); ++ return -ret; ++ } ++ } ++ fastlock_release(&cq->xrc.srq_list_lock); ++ ++ cq->util_cq.cq_fastlock_acquire(&cq->util_cq.cq_lock); + while (!slist_empty(&cq->wcq)) { + entry = slist_remove_head(&cq->wcq); + wce = container_of(entry, struct fi_ibv_wce, entry); + util_buf_release(cq->wce_pool, wce); + } ++ cq->util_cq.cq_fastlock_release(&cq->util_cq.cq_lock); + +- while (!slist_empty(&cq->ep_list)) { +- entry = slist_remove_head(&cq->ep_list); +- epe = container_of(entry, struct fi_ibv_msg_epe, entry); +- util_buf_release(cq->epe_pool, epe); +- } +- fastlock_release(&cq->lock); +- +- util_buf_pool_destroy(cq->epe_pool); + util_buf_pool_destroy(cq->wce_pool); + +- fastlock_destroy(&cq->lock); +- + if (cq->cq) { + ret = ibv_destroy_cq(cq->cq); + if (ret) +@@ -649,9 +524,12 @@ static int fi_ibv_cq_close(fid_t fid) + ofi_close_socket(cq->signal_fd[1]); + } + ++ ofi_cq_cleanup(&cq->util_cq); ++ + if (cq->channel) + ibv_destroy_comp_channel(cq->channel); + ++ fastlock_destroy(&cq->xrc.srq_list_lock); + free(cq); + return 0; + } +@@ -664,112 +542,111 @@ static struct fi_ops fi_ibv_cq_fi_ops = { + .ops_open = fi_no_ops_open, + }; + +-int fi_ibv_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, +- struct fid_cq **cq, void *context) ++static void fi_ibv_util_cq_progress_noop(struct util_cq *cq) + { +- struct fi_ibv_cq *_cq; +- int ep_cnt_bits = 0; ++ /* This routine shouldn't be called */ ++ assert(0); ++} ++ ++int fi_ibv_cq_open(struct fid_domain *domain_fid, struct fi_cq_attr *attr, ++ struct fid_cq **cq_fid, void *context) ++{ ++ struct fi_ibv_cq *cq; ++ struct fi_ibv_domain *domain = ++ container_of(domain_fid, struct fi_ibv_domain, ++ util_domain.domain_fid); + size_t size; + int ret; ++ struct fi_cq_attr tmp_attr = *attr; + +- _cq = calloc(1, sizeof *_cq); +- if (!_cq) ++ cq = calloc(1, sizeof(*cq)); ++ if (!cq) + return -FI_ENOMEM; + +- _cq->domain = container_of(domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- /* +- * RDM and DGRAM CQ functionalities are moved to correspond +- * separated functions +- */ +- assert(_cq->domain->ep_type == FI_EP_MSG); ++ /* verbs uses its own implementation of wait objects for CQ */ ++ tmp_attr.wait_obj = FI_WAIT_NONE; ++ ret = ofi_cq_init(&fi_ibv_prov, domain_fid, &tmp_attr, &cq->util_cq, ++ fi_ibv_util_cq_progress_noop, context); ++ if (ret) ++ goto err1; + + switch (attr->wait_obj) { + case FI_WAIT_UNSPEC: + case FI_WAIT_FD: +- _cq->channel = ibv_create_comp_channel(_cq->domain->verbs); +- if (!_cq->channel) { ++ cq->channel = ibv_create_comp_channel(domain->verbs); ++ if (!cq->channel) { + ret = -errno; + VERBS_WARN(FI_LOG_CQ, + "Unable to create completion channel\n"); +- goto err1; ++ goto err2; + } + +- ret = fi_fd_nonblock(_cq->channel->fd); ++ ret = fi_fd_nonblock(cq->channel->fd); + if (ret) +- goto err2; ++ goto err3; + +- if (socketpair(AF_UNIX, SOCK_STREAM, 0, _cq->signal_fd)) { ++ if (socketpair(AF_UNIX, SOCK_STREAM, 0, cq->signal_fd)) { + ret = -errno; +- goto err2; ++ goto err3; + } + +- ret = fi_fd_nonblock(_cq->signal_fd[0]); ++ ret = fi_fd_nonblock(cq->signal_fd[0]); + if (ret) +- goto err3; ++ goto err4; + + break; + case FI_WAIT_NONE: + break; + default: + ret = -FI_ENOSYS; +- goto err3; ++ goto err4; + } + + size = attr->size ? attr->size : VERBS_DEF_CQ_SIZE; + +- _cq->cq = ibv_create_cq(_cq->domain->verbs, size, _cq, _cq->channel, +- attr->signaling_vector); +- +- if (!_cq->cq) { ++ cq->cq = ibv_create_cq(domain->verbs, size, cq, cq->channel, ++ attr->signaling_vector); ++ if (!cq->cq) { + ret = -errno; + VERBS_WARN(FI_LOG_CQ, "Unable to create verbs CQ\n"); +- goto err3; ++ goto err4; + } + +- if (_cq->channel) { +- ret = ibv_req_notify_cq(_cq->cq, 0); ++ if (cq->channel) { ++ ret = ibv_req_notify_cq(cq->cq, 0); + if (ret) { + VERBS_WARN(FI_LOG_CQ, + "ibv_req_notify_cq failed\n"); +- goto err4; ++ goto err5; + } + } + +- ret = util_buf_pool_create(&_cq->wce_pool, sizeof(struct fi_ibv_wce), ++ ret = util_buf_pool_create(&cq->wce_pool, sizeof(struct fi_ibv_wce), + 16, 0, VERBS_WCE_CNT); + if (ret) { + VERBS_WARN(FI_LOG_CQ, "Failed to create wce_pool\n"); +- goto err4; +- } +- +- ret = util_buf_pool_create(&_cq->epe_pool, sizeof(struct fi_ibv_msg_epe), +- 16, 0, VERBS_EPE_CNT); +- if (ret) { +- VERBS_WARN(FI_LOG_CQ, "Failed to create epe_pool\n"); + goto err5; + } + +- _cq->flags |= attr->flags; +- _cq->wait_cond = attr->wait_cond; +- _cq->cq_fid.fid.fclass = FI_CLASS_CQ; +- _cq->cq_fid.fid.context = context; +- _cq->cq_fid.fid.ops = &fi_ibv_cq_fi_ops; +- _cq->cq_fid.ops = &fi_ibv_cq_ops; ++ cq->flags |= attr->flags; ++ cq->wait_cond = attr->wait_cond; ++ /* verbs uses its own ops for CQ */ ++ cq->util_cq.cq_fid.fid.ops = &fi_ibv_cq_fi_ops; ++ cq->util_cq.cq_fid.ops = &fi_ibv_cq_ops; + + switch (attr->format) { + case FI_CQ_FORMAT_UNSPEC: + case FI_CQ_FORMAT_CONTEXT: +- _cq->read_entry = fi_ibv_cq_read_context_entry; +- _cq->entry_size = sizeof(struct fi_cq_entry); ++ cq->read_entry = fi_ibv_cq_read_context_entry; ++ cq->entry_size = sizeof(struct fi_cq_entry); + break; + case FI_CQ_FORMAT_MSG: +- _cq->read_entry = fi_ibv_cq_read_msg_entry; +- _cq->entry_size = sizeof(struct fi_cq_msg_entry); ++ cq->read_entry = fi_ibv_cq_read_msg_entry; ++ cq->entry_size = sizeof(struct fi_cq_msg_entry); + break; + case FI_CQ_FORMAT_DATA: +- _cq->read_entry = fi_ibv_cq_read_data_entry; +- _cq->entry_size = sizeof(struct fi_cq_data_entry); ++ cq->read_entry = fi_ibv_cq_read_data_entry; ++ cq->entry_size = sizeof(struct fi_cq_data_entry); + break; + case FI_CQ_FORMAT_TAGGED: + default: +@@ -777,34 +654,28 @@ int fi_ibv_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr, + goto err6; + } + +- fastlock_init(&_cq->lock); +- +- slist_init(&_cq->wcq); +- slist_init(&_cq->ep_list); +- +- while (_cq->domain->info->domain_attr->ep_cnt >> ++ep_cnt_bits); ++ slist_init(&cq->wcq); ++ dlist_init(&cq->xrc.srq_list); ++ fastlock_init(&cq->xrc.srq_list_lock); + +- _cq->send_signal_wr_id = 0xffffffffffffc0de << ep_cnt_bits; +- _cq->wr_id_mask = (~_cq->wr_id_mask) << ep_cnt_bits; ++ cq->trywait = fi_ibv_cq_trywait; ++ ofi_atomic_initialize32(&cq->nevents, 0); + +- _cq->trywait = fi_ibv_cq_trywait; +- ofi_atomic_initialize32(&_cq->nevents, 0); +- +- *cq = &_cq->cq_fid; ++ *cq_fid = &cq->util_cq.cq_fid; + return 0; + err6: +- util_buf_pool_destroy(_cq->epe_pool); ++ util_buf_pool_destroy(cq->wce_pool); + err5: +- util_buf_pool_destroy(_cq->wce_pool); ++ ibv_destroy_cq(cq->cq); + err4: +- ibv_destroy_cq(_cq->cq); ++ ofi_close_socket(cq->signal_fd[0]); ++ ofi_close_socket(cq->signal_fd[1]); + err3: +- ofi_close_socket(_cq->signal_fd[0]); +- ofi_close_socket(_cq->signal_fd[1]); ++ if (cq->channel) ++ ibv_destroy_comp_channel(cq->channel); + err2: +- if (_cq->channel) +- ibv_destroy_comp_channel(_cq->channel); ++ ofi_cq_cleanup(&cq->util_cq); + err1: +- free(_cq); ++ free(cq); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_av.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_av.c +new file mode 100644 +index 000000000..71b1d5aab +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_av.c +@@ -0,0 +1,263 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "fi_verbs.h" ++ ++static inline int fi_ibv_dgram_av_is_addr_valid(struct fi_ibv_dgram_av *av, ++ const void *addr) ++{ ++ const struct ofi_ib_ud_ep_name *check_name = addr; ++ return (check_name->lid > 0); ++} ++ ++static inline int ++fi_ibv_dgram_verify_av_flags(struct util_av *av, uint64_t flags) ++{ ++ if ((av->flags & FI_EVENT) && !av->eq) { ++ VERBS_WARN(FI_LOG_AV, "No EQ bound to AV\n"); ++ return -FI_ENOEQ; ++ } ++ ++ if (flags & ~(FI_MORE)) { ++ VERBS_WARN(FI_LOG_AV, "Unsupported flags\n"); ++ return -FI_ENOEQ; ++ } ++ ++ return FI_SUCCESS; ++} ++ ++static int ++fi_ibv_dgram_av_insert_addr(struct fi_ibv_dgram_av *av, const void *addr, ++ fi_addr_t *fi_addr, void *context) ++{ ++ int ret; ++ struct fi_ibv_dgram_av_entry *av_entry; ++ struct fi_ibv_domain *domain = ++ container_of(av->util_av.domain, struct fi_ibv_domain, util_domain); ++ ++ if (OFI_UNLIKELY(!fi_ibv_dgram_av_is_addr_valid(av, addr))) { ++ ret = -FI_EADDRNOTAVAIL; ++ VERBS_WARN(FI_LOG_AV, "Invalid address\n"); ++ goto fn1; ++ } ++ ++ struct ibv_ah_attr ah_attr = { ++ .is_global = 0, ++ .dlid = ((struct ofi_ib_ud_ep_name *)addr)->lid, ++ .sl = ((struct ofi_ib_ud_ep_name *)addr)->sl, ++ .src_path_bits = 0, ++ .port_num = 1, ++ }; ++ ++ if (((struct ofi_ib_ud_ep_name *)addr)->gid.global.interface_id) { ++ ah_attr.is_global = 1; ++ ah_attr.grh.hop_limit = 64; ++ ah_attr.grh.dgid = ((struct ofi_ib_ud_ep_name *)addr)->gid; ++ ah_attr.grh.sgid_index = 0; ++ } ++ ++ av_entry = calloc(1, sizeof(*av_entry)); ++ if (OFI_UNLIKELY(!av_entry)) { ++ ret = -FI_ENOMEM; ++ VERBS_WARN(FI_LOG_AV, "Unable to allocate memory for AV entry\n"); ++ goto fn1; ++ } ++ ++ av_entry->ah = ibv_create_ah(domain->pd, &ah_attr); ++ if (OFI_UNLIKELY(!av_entry->ah)) { ++ ret = -errno; ++ VERBS_WARN(FI_LOG_AV, ++ "Unable to create Address Handle, errno - %d\n", errno); ++ goto fn2; ++ } ++ av_entry->addr = *(struct ofi_ib_ud_ep_name *)addr; ++ dlist_insert_tail(&av_entry->list_entry, &av->av_entry_list); ++ ++ if (fi_addr) ++ *fi_addr = (fi_addr_t)(uintptr_t)av_entry; ++ return 0; ++fn2: ++ free(av_entry); ++fn1: ++ if (fi_addr) ++ *fi_addr = FI_ADDR_NOTAVAIL; ++ return ret; ++} ++ ++static int fi_ibv_dgram_av_insert(struct fid_av *av_fid, const void *addr, ++ size_t count, fi_addr_t *fi_addr, ++ uint64_t flags, void *context) ++{ ++ int ret, success_cnt = 0; ++ size_t i; ++ struct fi_ibv_dgram_av *av = ++ container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); ++ ++ ret = fi_ibv_dgram_verify_av_flags(&av->util_av, flags); ++ if (ret) ++ return ret; ++ ++ VERBS_DBG(FI_LOG_AV, "Inserting %"PRIu64" addresses\n", count); ++ for (i = 0; i < count; i++) { ++ ret = fi_ibv_dgram_av_insert_addr( ++ av, (struct ofi_ib_ud_ep_name *)addr + i, ++ fi_addr ? &fi_addr[i] : NULL, context); ++ if (!ret) ++ success_cnt++; ++ } ++ ++ VERBS_DBG(FI_LOG_AV, ++ "%"PRIu64" addresses were inserted successfully\n", count); ++ return success_cnt; ++} ++ ++static inline void ++fi_ibv_dgram_av_remove_addr(struct fi_ibv_dgram_av_entry *av_entry) ++{ ++ int ret = ibv_destroy_ah(av_entry->ah); ++ if (ret) ++ VERBS_WARN(FI_LOG_AV, ++ "AH Destroying failed with status - %d\n", ++ ret); ++ dlist_remove(&av_entry->list_entry); ++ free(av_entry); ++} ++ ++static int fi_ibv_dgram_av_remove(struct fid_av *av_fid, fi_addr_t *fi_addr, ++ size_t count, uint64_t flags) ++{ ++ int i, ret; ++ struct fi_ibv_dgram_av *av = ++ container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid); ++ ++ ret = fi_ibv_dgram_verify_av_flags(&av->util_av, flags); ++ if (ret) ++ return ret; ++ ++ for (i = count - 1; i >= 0; i--) { ++ struct fi_ibv_dgram_av_entry *av_entry = ++ (struct fi_ibv_dgram_av_entry *)fi_addr[i]; ++ fi_ibv_dgram_av_remove_addr(av_entry); ++ } ++ return FI_SUCCESS; ++} ++ ++static inline ++int fi_ibv_dgram_av_lookup(struct fid_av *av_fid, fi_addr_t fi_addr, ++ void *addr, size_t *addrlen) ++{ ++ struct fi_ibv_dgram_av_entry *av_entry; ++ ++ av_entry = fi_ibv_dgram_av_lookup_av_entry(fi_addr); ++ if (!av_entry) ++ return -FI_ENOENT; ++ ++ memcpy(addr, &av_entry->addr, MIN(*addrlen, sizeof(av_entry->addr))); ++ *addrlen = sizeof(av_entry->addr); ++ return FI_SUCCESS; ++} ++ ++static inline const char * ++fi_ibv_dgram_av_straddr(struct fid_av *av, const void *addr, char *buf, size_t *len) ++{ ++ return ofi_straddr(buf, len, FI_ADDR_IB_UD, addr); ++} ++ ++static int fi_ibv_dgram_av_close(struct fid *av_fid) ++{ ++ struct fi_ibv_dgram_av_entry *av_entry; ++ struct fi_ibv_dgram_av *av = ++ container_of(av_fid, struct fi_ibv_dgram_av, util_av.av_fid.fid); ++ int ret = ofi_av_close_lightweight(&av->util_av); ++ if (ret) ++ return ret; ++ ++ while (!dlist_empty(&av->av_entry_list)) { ++ av_entry = container_of(av->av_entry_list.next, ++ struct fi_ibv_dgram_av_entry, ++ list_entry); ++ fi_ibv_dgram_av_remove_addr(av_entry); ++ } ++ ++ free(av); ++ return FI_SUCCESS; ++} ++ ++static struct fi_ops fi_ibv_dgram_fi_ops = { ++ .size = sizeof(fi_ibv_dgram_fi_ops), ++ .close = fi_ibv_dgram_av_close, ++ .bind = ofi_av_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_av fi_ibv_dgram_av_ops = { ++ .size = sizeof(fi_ibv_dgram_av_ops), ++ .insert = fi_ibv_dgram_av_insert, ++ .insertsvc = fi_no_av_insertsvc, ++ .insertsym = fi_no_av_insertsym, ++ .remove = fi_ibv_dgram_av_remove, ++ .lookup = fi_ibv_dgram_av_lookup, ++ .straddr = fi_ibv_dgram_av_straddr, ++}; ++ ++int fi_ibv_dgram_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, ++ struct fid_av **av_fid, void *context) ++{ ++ struct fi_ibv_domain *domain = ++ container_of(domain_fid, struct fi_ibv_domain, ++ util_domain.domain_fid); ++ struct fi_ibv_dgram_av *av; ++ int ret; ++ ++ av = calloc(1, sizeof(*av)); ++ if (!av) ++ return -FI_ENOMEM; ++ ++ if (attr->type == FI_AV_UNSPEC) ++ attr->type = FI_AV_MAP; ++ ++ ret = ofi_av_init_lightweight(&domain->util_domain, attr, ++ &av->util_av, context); ++ if (ret) ++ goto err_av_init; ++ dlist_init(&av->av_entry_list); ++ ++ av->util_av.av_fid.fid.ops = &fi_ibv_dgram_fi_ops; ++ av->util_av.av_fid.ops = &fi_ibv_dgram_av_ops; ++ *av_fid = &av->util_av.av_fid; ++ ++ return FI_SUCCESS; ++err_av_init: ++ free(av); ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_ep_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_ep_msg.c +new file mode 100644 +index 000000000..36ad816e5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_dgram_ep_msg.c +@@ -0,0 +1,276 @@ ++/* ++ * Copyright (c) 2017 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "fi_verbs.h" ++ ++static inline int ++fi_ibv_dgram_ep_set_addr(struct fi_ibv_ep *ep, fi_addr_t addr, ++ struct ibv_send_wr *wr) ++{ ++ struct fi_ibv_dgram_av_entry *av_entry = ++ fi_ibv_dgram_av_lookup_av_entry(addr); ++ if (OFI_UNLIKELY(!av_entry)) ++ return -FI_ENOENT; ++ wr->wr.ud.ah = av_entry->ah; ++ wr->wr.ud.remote_qpn = av_entry->addr.qpn; ++ wr->wr.ud.remote_qkey = 0x11111111; ++ ++ return 0; ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .num_sge = msg->iov_count, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ assert(ep->util_ep.rx_cq); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_handle_post(ibv_post_recv(ep->ibv_qp, &wr, &bad_wr)); ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct fi_msg msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = src_addr, ++ .context = context, ++ }; ++ ++ return fi_ibv_dgram_ep_recvmsg(ep_fid, &msg, 0); ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct iovec iov = { ++ .iov_base = buf, ++ .iov_len = len, ++ }; ++ ++ return fi_ibv_dgram_ep_recvv(ep_fid, &iov, &desc, ++ 1, src_addr, context); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ }; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_SEND_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_SEND; ++ } ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, msg->addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_msg(ep, &wr, msg, flags); ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, ++ void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_SEND, ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_iov(ep, &wr, iov, desc, count); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND, ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static inline ssize_t ++fi_ibv_dgram_ep_senddata(struct fid_ep *ep_fid, const void *buf, ++ size_t len, void *desc, uint64_t data, ++ fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_injectdata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ ssize_t ret; ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->msg_wr.imm_data = htonl((uint32_t)data); ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND_WITH_IMM; ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &ep->wrs->msg_wr)) ++ return -FI_ENOENT; ++ ++ ret = fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->msg_wr); ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND; ++ return ret; ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_dgram_ep_inject_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ if (fi_ibv_dgram_ep_set_addr(ep, dest_addr, &ep->wrs->msg_wr)) ++ return -FI_ENOENT; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->msg_wr); ++} ++ ++const struct fi_ops_msg fi_ibv_dgram_msg_ops = { ++ .size = sizeof(fi_ibv_dgram_msg_ops), ++ .recv = fi_ibv_dgram_ep_recv, ++ .recvv = fi_ibv_dgram_ep_recvv, ++ .recvmsg = fi_ibv_dgram_ep_recvmsg, ++ .send = fi_ibv_dgram_ep_send, ++ .sendv = fi_ibv_dgram_ep_sendv, ++ .sendmsg = fi_ibv_dgram_ep_sendmsg, ++ .inject = fi_ibv_dgram_ep_inject_fast, ++ .senddata = fi_ibv_dgram_ep_senddata, ++ .injectdata = fi_ibv_dgram_ep_injectdata_fast, ++}; ++ ++const struct fi_ops_msg fi_ibv_dgram_msg_ops_ts = { ++ .size = sizeof(fi_ibv_dgram_msg_ops), ++ .recv = fi_ibv_dgram_ep_recv, ++ .recvv = fi_ibv_dgram_ep_recvv, ++ .recvmsg = fi_ibv_dgram_ep_recvmsg, ++ .send = fi_ibv_dgram_ep_send, ++ .sendv = fi_ibv_dgram_ep_sendv, ++ .sendmsg = fi_ibv_dgram_ep_sendmsg, ++ .inject = fi_ibv_dgram_ep_inject, ++ .senddata = fi_ibv_dgram_ep_senddata, ++ .injectdata = fi_ibv_dgram_ep_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain.c +index 2b64379d3..6083935e9 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain.c +@@ -32,8 +32,7 @@ + + #include "config.h" + +-#include "ep_rdm/verbs_rdm.h" +-#include "ep_dgram/verbs_dgram.h" ++#include "ofi_iov.h" + + #include "fi_verbs.h" + #include +@@ -45,7 +44,6 @@ static int fi_ibv_domain_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + { + struct fi_ibv_domain *domain; + struct fi_ibv_eq *eq; +- struct fi_ibv_dgram_eq *dgram_eq; + + domain = container_of(fid, struct fi_ibv_domain, + util_domain.domain_fid.fid); +@@ -54,23 +52,19 @@ static int fi_ibv_domain_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + case FI_CLASS_EQ: + switch (domain->ep_type) { + case FI_EP_MSG: +- case FI_EP_RDM: + eq = container_of(bfid, struct fi_ibv_eq, eq_fid); + domain->eq = eq; + domain->eq_flags = flags; + break; + case FI_EP_DGRAM: +- dgram_eq = container_of(bfid, struct fi_ibv_dgram_eq, +- util_eq.eq_fid); +- if (!dgram_eq) +- return -FI_EINVAL; +- return ofi_domain_bind_eq(&domain->util_domain, +- &dgram_eq->util_eq); ++ return -FI_EINVAL; + default: + /* Shouldn't go here */ + assert(0); + return -FI_EINVAL; + } ++ break; ++ + default: + return -EINVAL; + } +@@ -78,44 +72,43 @@ static int fi_ibv_domain_bind(struct fid *fid, struct fid *bfid, uint64_t flags) + return 0; + } + +-static void fi_ibv_rdm_cm_set_thread_affinity(void) ++void fi_ibv_mem_notifier_handle_hook(void *arg, RbtIterator iter) + { +- if (fi_ibv_gl_data.rdm.cm_thread_affinity == NULL) +- return; ++ struct iovec *key; ++ struct fi_ibv_subscr_entry *subscr_entry; ++ struct fi_ibv_monitor_entry *entry; ++ ++ rbtKeyValue(fi_ibv_mem_notifier->subscr_storage, iter, ++ (void *)&key, (void *)&entry); ++ dlist_foreach_container(&entry->subscription_list, struct fi_ibv_subscr_entry, ++ subscr_entry, entry) { ++ ofi_monitor_add_event_to_nq(subscr_entry->subscription); ++ } + +- if (ofi_set_thread_affinity(fi_ibv_gl_data.rdm.cm_thread_affinity) == -FI_ENOSYS) +- VERBS_WARN(FI_LOG_DOMAIN, +- "FI_VERBS_RDM_CM_THREAD_AFFINITY is not supported on OS X\n"); ++ VERBS_DBG(FI_LOG_MR, "Write event for region %p:%lu\n", ++ key->iov_base, key->iov_len); + } + +-static void *fi_ibv_rdm_cm_progress_thread(void *dom) ++static inline void ++fi_ibv_mem_notifier_search_iov(struct fi_ibv_mem_notifier *notifier, ++ struct iovec *iov) + { +- struct fi_ibv_domain *domain = +- (struct fi_ibv_domain *)dom; +- struct slist_entry *item, *prev; +- +- fi_ibv_rdm_cm_set_thread_affinity(); +- +- while (domain->rdm_cm->fi_ibv_rdm_tagged_cm_progress_running) { +- struct fi_ibv_rdm_ep *ep = NULL; +- slist_foreach(&domain->ep_list, item, prev) { +- (void) prev; +- ep = container_of(item, struct fi_ibv_rdm_ep, +- list_entry); +- if (fi_ibv_rdm_cm_progress(ep)) { +- VERBS_INFO(FI_LOG_EP_DATA, +- "fi_ibv_rdm_cm_progress error\n"); +- abort(); +- } +- } +- usleep(domain->rdm_cm->cm_progress_timeout); ++ RbtIterator iter; ++ iter = rbtFind(notifier->subscr_storage, (void *)iov); ++ if (iter) { ++ VERBS_DBG(FI_LOG_MR, "Catch hook for memory %p:%lu\n", ++ iov->iov_base, iov->iov_len); ++ rbtTraversal(fi_ibv_mem_notifier->subscr_storage, iter, NULL, ++ fi_ibv_mem_notifier_handle_hook); + } +- return NULL; + } + + void fi_ibv_mem_notifier_free_hook(void *ptr, const void *caller) + { +- struct fi_ibv_mem_ptr_entry *entry; ++ struct iovec iov = { ++ .iov_base = ptr, ++ .iov_len = malloc_usable_size(ptr), ++ }; + OFI_UNUSED(caller); + + FI_IBV_MEMORY_HOOK_BEGIN(fi_ibv_mem_notifier) +@@ -124,23 +117,17 @@ void fi_ibv_mem_notifier_free_hook(void *ptr, const void *caller) + + if (!ptr) + goto out; +- +- HASH_FIND(hh, fi_ibv_mem_notifier->mem_ptrs_hash, &ptr, sizeof(void *), entry); +- if (!entry) +- goto out; +- VERBS_DBG(FI_LOG_MR, "Catch free hook for %p, entry - %p\n", ptr, entry); +- +- if (!dlist_empty(&entry->entry)) +- dlist_remove_init(&entry->entry); +- dlist_insert_tail(&entry->entry, +- &fi_ibv_mem_notifier->event_list); ++ fi_ibv_mem_notifier_search_iov(fi_ibv_mem_notifier, &iov); + out: + FI_IBV_MEMORY_HOOK_END(fi_ibv_mem_notifier) + } + + void *fi_ibv_mem_notifier_realloc_hook(void *ptr, size_t size, const void *caller) + { +- struct fi_ibv_mem_ptr_entry *entry; ++ struct iovec iov = { ++ .iov_base = ptr, ++ .iov_len = malloc_usable_size(ptr), ++ }; + void *ret_ptr; + OFI_UNUSED(caller); + +@@ -150,16 +137,7 @@ void *fi_ibv_mem_notifier_realloc_hook(void *ptr, size_t size, const void *calle + + if (!ptr) + goto out; +- +- HASH_FIND(hh, fi_ibv_mem_notifier->mem_ptrs_hash, &ptr, sizeof(void *), entry); +- if (!entry) +- goto out; +- VERBS_DBG(FI_LOG_MR, "Catch realloc hook for %p, entry - %p\n", ptr, entry); +- +- if (!dlist_empty(&entry->entry)) +- dlist_remove_init(&entry->entry); +- dlist_insert_tail(&entry->entry, +- &fi_ibv_mem_notifier->event_list); ++ fi_ibv_mem_notifier_search_iov(fi_ibv_mem_notifier, &iov); + out: + FI_IBV_MEMORY_HOOK_END(fi_ibv_mem_notifier) + return ret_ptr; +@@ -172,9 +150,9 @@ static void fi_ibv_mem_notifier_finalize(struct fi_ibv_mem_notifier *notifier) + assert(fi_ibv_mem_notifier && (notifier == fi_ibv_mem_notifier)); + pthread_mutex_lock(&fi_ibv_mem_notifier->lock); + if (--fi_ibv_mem_notifier->ref_cnt == 0) { +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier->prev_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier->prev_realloc_hook); +- util_buf_pool_destroy(fi_ibv_mem_notifier->mem_ptrs_ent_pool); ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier->prev_free_hook); ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier->prev_realloc_hook); ++ rbtDelete(fi_ibv_mem_notifier->subscr_storage); + fi_ibv_mem_notifier->prev_free_hook = NULL; + fi_ibv_mem_notifier->prev_realloc_hook = NULL; + pthread_mutex_unlock(&fi_ibv_mem_notifier->lock); +@@ -187,10 +165,35 @@ static void fi_ibv_mem_notifier_finalize(struct fi_ibv_mem_notifier *notifier) + #endif + } + ++#ifdef HAVE_GLIBC_MALLOC_HOOKS ++static int fi_ibv_mem_notifier_find_within(void *a, void *b) ++{ ++ struct iovec *iov1 = a, *iov2 = b; ++ ++ if (ofi_iov_shifted_left(iov1, iov2)) ++ return -1; ++ else if (ofi_iov_shifted_right(iov1, iov2)) ++ return 1; ++ else ++ return 0; ++} ++ ++static int fi_ibv_mem_notifier_find_overlap(void *a, void *b) ++{ ++ struct iovec *iov1 = a, *iov2 = b; ++ ++ if (ofi_iov_left(iov1, iov2)) ++ return -1; ++ else if (ofi_iov_right(iov1, iov2)) ++ return 1; ++ else ++ return 0; ++} ++#endif ++ + static struct fi_ibv_mem_notifier *fi_ibv_mem_notifier_init(void) + { + #ifdef HAVE_GLIBC_MALLOC_HOOKS +- int ret; + pthread_mutexattr_t mutex_attr; + if (fi_ibv_mem_notifier) { + /* already initialized */ +@@ -201,11 +204,11 @@ static struct fi_ibv_mem_notifier *fi_ibv_mem_notifier_init(void) + if (!fi_ibv_mem_notifier) + goto fn; + +- ret = util_buf_pool_create(&fi_ibv_mem_notifier->mem_ptrs_ent_pool, +- sizeof(struct fi_ibv_mem_ptr_entry), +- FI_IBV_MEM_ALIGNMENT, 0, +- fi_ibv_gl_data.mr_max_cached_cnt); +- if (ret) ++ fi_ibv_mem_notifier->subscr_storage = ++ rbtNew(fi_ibv_gl_data.mr_cache_merge_regions ? ++ fi_ibv_mem_notifier_find_overlap : ++ fi_ibv_mem_notifier_find_within); ++ if (!fi_ibv_mem_notifier->subscr_storage) + goto err1; + + pthread_mutexattr_init(&mutex_attr); +@@ -214,20 +217,18 @@ static struct fi_ibv_mem_notifier *fi_ibv_mem_notifier_init(void) + goto err2; + pthread_mutexattr_destroy(&mutex_attr); + +- dlist_init(&fi_ibv_mem_notifier->event_list); +- + pthread_mutex_lock(&fi_ibv_mem_notifier->lock); +- fi_ibv_mem_notifier->prev_free_hook = fi_ibv_mem_notifier_get_free_hook(); +- fi_ibv_mem_notifier->prev_realloc_hook = fi_ibv_mem_notifier_get_realloc_hook(); +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier_realloc_hook); ++ fi_ibv_mem_notifier->prev_free_hook = ofi_get_mem_free_hook(); ++ fi_ibv_mem_notifier->prev_realloc_hook = ofi_get_mem_realloc_hook(); ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier_free_hook); ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier_realloc_hook); + fi_ibv_mem_notifier->ref_cnt++; + pthread_mutex_unlock(&fi_ibv_mem_notifier->lock); + fn: + return fi_ibv_mem_notifier; + + err2: +- util_buf_pool_destroy(fi_ibv_mem_notifier->mem_ptrs_ent_pool); ++ rbtDelete(fi_ibv_mem_notifier->subscr_storage); + err1: + free(fi_ibv_mem_notifier); + fi_ibv_mem_notifier = NULL; +@@ -239,36 +240,13 @@ err1: + + static int fi_ibv_domain_close(fid_t fid) + { +- struct fi_ibv_domain *domain; +- struct fi_ibv_fabric *fab; +- struct fi_ibv_rdm_av_entry *av_entry = NULL; +- struct slist_entry *item; +- void *status = NULL; + int ret; +- +- domain = container_of(fid, struct fi_ibv_domain, +- util_domain.domain_fid.fid); ++ struct fi_ibv_fabric *fab; ++ struct fi_ibv_domain *domain = ++ container_of(fid, struct fi_ibv_domain, ++ util_domain.domain_fid.fid); + + switch (domain->ep_type) { +- case FI_EP_RDM: +- domain->rdm_cm->fi_ibv_rdm_tagged_cm_progress_running = 0; +- pthread_join(domain->rdm_cm->cm_progress_thread, &status); +- pthread_mutex_destroy(&domain->rdm_cm->cm_lock); +- +- for (item = slist_remove_head( +- &domain->rdm_cm->av_removed_entry_head); +- item; +- item = slist_remove_head( +- &domain->rdm_cm->av_removed_entry_head)) { +- av_entry = container_of(item, +- struct fi_ibv_rdm_av_entry, +- removed_next); +- fi_ibv_rdm_overall_conn_cleanup(av_entry); +- ofi_freealign(av_entry); +- } +- rdma_destroy_ep(domain->rdm_cm->listener); +- free(domain->rdm_cm); +- break; + case FI_EP_DGRAM: + fab = container_of(&domain->util_domain.fabric->fabric_fid, + struct fi_ibv_fabric, +@@ -280,6 +258,11 @@ static int fi_ibv_domain_close(fid_t fid) + ofi_ns_stop_server(&fab->name_server); + break; + case FI_EP_MSG: ++ if (domain->use_xrc) { ++ ret = fi_ibv_domain_xrc_cleanup(domain); ++ if (ret) ++ return ret; ++ } + break; + default: + /* Never should go here */ +@@ -325,11 +308,9 @@ static int fi_ibv_open_device_by_name(struct fi_ibv_domain *domain, const char * + const char *rdma_name = ibv_get_device_name(dev_list[i]->device); + switch (domain->ep_type) { + case FI_EP_MSG: +- ret = strcmp(name, rdma_name); +- break; +- case FI_EP_RDM: +- ret = strncmp(name, rdma_name, +- strlen(name) - strlen(verbs_rdm_domain.suffix)); ++ ret = domain->use_xrc ? ++ fi_ibv_cmp_xrc_domain_name(name, rdma_name) : ++ strcmp(name, rdma_name); + break; + case FI_EP_DGRAM: + ret = strncmp(name, rdma_name, +@@ -372,26 +353,12 @@ static struct fi_ops_domain fi_ibv_msg_domain_ops = { + .query_atomic = fi_ibv_query_atomic, + }; + +-static struct fi_ops_domain fi_ibv_rdm_domain_ops = { +- .size = sizeof(struct fi_ops_domain), +- .av_open = fi_ibv_rdm_av_open, +- .cq_open = fi_ibv_rdm_cq_open, +- .endpoint = fi_ibv_rdm_open_ep, +- .scalable_ep = fi_no_scalable_ep, +- .cntr_open = fi_rbv_rdm_cntr_open, +- .poll_open = fi_no_poll_open, +- .stx_ctx = fi_no_stx_context, +- .srx_ctx = fi_no_srx_context, +- .query_atomic = fi_ibv_query_atomic, +-}; +- + static struct fi_ops_domain fi_ibv_dgram_domain_ops = { + .size = sizeof(struct fi_ops_domain), + .av_open = fi_ibv_dgram_av_open, +- .cq_open = fi_ibv_dgram_cq_open, +- .endpoint = fi_ibv_dgram_endpoint_open, ++ .cq_open = fi_ibv_cq_open, ++ .endpoint = fi_ibv_open_ep, + .scalable_ep = fi_no_scalable_ep, +- .cntr_open = fi_ibv_dgram_cntr_open, + .poll_open = fi_no_poll_open, + .stx_ctx = fi_no_stx_context, + .srx_ctx = fi_no_srx_context, +@@ -423,17 +390,12 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + struct fid_domain **domain, void *context) + { + struct fi_ibv_domain *_domain; +- struct fi_ibv_fabric *fab; +- const struct fi_info *fi; +- void *status = NULL; +- pthread_mutexattr_t mutex_attr; + int ret; +- +- fab = container_of(fabric, struct fi_ibv_fabric, +- util_fabric.fabric_fid); +- +- fi = fi_ibv_get_verbs_info(fi_ibv_util_prov.info, +- info->domain_attr->name); ++ struct fi_ibv_fabric *fab = ++ container_of(fabric, struct fi_ibv_fabric, ++ util_fabric.fabric_fid); ++ const struct fi_info *fi = fi_ibv_get_verbs_info(fi_ibv_util_prov.info, ++ info->domain_attr->name); + if (!fi) + return -FI_EINVAL; + +@@ -455,9 +417,12 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + goto err2; + + _domain->ep_type = FI_IBV_EP_TYPE(info); ++ _domain->use_xrc = fi_ibv_is_xrc(info); ++ + ret = fi_ibv_open_device_by_name(_domain, info->domain_attr->name); + if (ret) + goto err3; ++ + _domain->pd = ibv_alloc_pd(_domain->verbs); + if (!_domain->pd) { + ret = -errno; +@@ -474,7 +439,6 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + _domain->notifier = fi_ibv_mem_notifier_init(); + _domain->monitor.subscribe = fi_ibv_monitor_subscribe; + _domain->monitor.unsubscribe = fi_ibv_monitor_unsubscribe; +- _domain->monitor.get_event = fi_ibv_monitor_get_event; + ofi_monitor_init(&_domain->monitor); + + _domain->cache.max_cached_cnt = fi_ibv_gl_data.mr_max_cached_cnt; +@@ -497,57 +461,6 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + } + + switch (_domain->ep_type) { +- case FI_EP_RDM: +- _domain->rdm_cm = calloc(1, sizeof(*_domain->rdm_cm)); +- if (!_domain->rdm_cm) { +- ret = -FI_ENOMEM; +- goto err5; +- } +- _domain->rdm_cm->cm_progress_timeout = +- fi_ibv_gl_data.rdm.thread_timeout; +- slist_init(&_domain->rdm_cm->av_removed_entry_head); +- +- pthread_mutexattr_init(&mutex_attr); +- pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE); +- pthread_mutex_init(&_domain->rdm_cm->cm_lock, &mutex_attr); +- pthread_mutexattr_destroy(&mutex_attr); +- _domain->rdm_cm->fi_ibv_rdm_tagged_cm_progress_running = 1; +- ret = pthread_create(&_domain->rdm_cm->cm_progress_thread, +- NULL, &fi_ibv_rdm_cm_progress_thread, +- (void *)_domain); +- if (ret) { +- VERBS_INFO(FI_LOG_DOMAIN, +- "Failed to launch CM progress thread, " +- "err :%d\n", ret); +- ret = -FI_EOTHER; +- goto err6; +- } +- _domain->util_domain.domain_fid.ops = &fi_ibv_rdm_domain_ops; +- +- _domain->rdm_cm->ec = rdma_create_event_channel(); +- if (!_domain->rdm_cm->ec) { +- VERBS_INFO(FI_LOG_DOMAIN, +- "Failed to create listener event channel: %s\n", +- strerror(errno)); +- ret = -FI_EOTHER; +- goto err7; +- } +- +- if (fi_fd_nonblock(_domain->rdm_cm->ec->fd) != 0) { +- VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "fcntl", errno); +- ret = -FI_EOTHER; +- goto err8; +- } +- +- if (rdma_create_id(_domain->rdm_cm->ec, +- &_domain->rdm_cm->listener, NULL, RDMA_PS_TCP)) { +- VERBS_INFO(FI_LOG_DOMAIN, "Failed to create cm listener: %s\n", +- strerror(errno)); +- ret = -FI_EOTHER; +- goto err8; +- } +- _domain->rdm_cm->is_bound = 0; +- break; + case FI_EP_DGRAM: + if (fi_ibv_gl_data.dgram.use_name_server) { + /* Even if it's invoked not for the first time +@@ -567,26 +480,22 @@ fi_ibv_domain(struct fid_fabric *fabric, struct fi_info *info, + _domain->util_domain.domain_fid.ops = &fi_ibv_dgram_domain_ops; + break; + case FI_EP_MSG: ++ if (_domain->use_xrc) { ++ ret = fi_ibv_domain_xrc_init(_domain); ++ if (ret) ++ goto err5; ++ } + _domain->util_domain.domain_fid.ops = &fi_ibv_msg_domain_ops; + break; + default: + VERBS_INFO(FI_LOG_DOMAIN, "Ivalid EP type is provided, " + "EP type :%d\n", _domain->ep_type); + ret = -FI_EINVAL; +- goto err5; ++ goto err3; + } + + *domain = &_domain->util_domain.domain_fid; + return FI_SUCCESS; +-/* Only verbs/RDM should be able to go through err[5-7] */ +-err8: +- rdma_destroy_event_channel(_domain->rdm_cm->ec); +-err7: +- _domain->rdm_cm->fi_ibv_rdm_tagged_cm_progress_running = 0; +- pthread_join(_domain->rdm_cm->cm_progress_thread, &status); +-err6: +- pthread_mutex_destroy(&_domain->rdm_cm->cm_lock); +- free(_domain->rdm_cm); + err5: + if (fi_ibv_gl_data.mr_cache_enable) + ofi_mr_cache_cleanup(&_domain->cache); +@@ -615,7 +524,7 @@ static int fi_ibv_trywait(struct fid_fabric *fabric, struct fid **fids, int coun + for (i = 0; i < count; i++) { + switch (fids[i]->fclass) { + case FI_CLASS_CQ: +- cq = container_of(fids[i], struct fi_ibv_cq, cq_fid.fid); ++ cq = container_of(fids[i], struct fi_ibv_cq, util_cq.cq_fid.fid); + ret = cq->trywait(fids[i]); + if (ret) + return ret; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain_xrc.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain_xrc.c +new file mode 100644 +index 000000000..3d7de4b1d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_domain_xrc.c +@@ -0,0 +1,564 @@ ++/* ++ * Copyright (c) 2018 Cray Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++#include "config.h" ++#include "fi_verbs.h" ++ ++/* Domain XRC INI QP RBTree key */ ++struct fi_ibv_ini_conn_key { ++ struct sockaddr *addr; ++ struct fi_ibv_cq *tx_cq; ++}; ++ ++static int fi_ibv_process_ini_conn(struct fi_ibv_xrc_ep *ep,int reciprocal, ++ void *param, size_t paramlen); ++ ++/* ++ * This routine is a work around that creates a QP for the only purpose of ++ * reserving the QP number. The QP is not transitioned out of the RESET state. ++ */ ++int fi_ibv_reserve_qpn(struct fi_ibv_xrc_ep *ep, struct ibv_qp **qp) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct fi_ibv_cq *cq = container_of(ep->base_ep.util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++ struct ibv_qp_init_attr attr = { 0 }; ++ int ret; ++ ++ /* Limit library allocated resources and do not INIT QP */ ++ attr.cap.max_send_wr = 1; ++ attr.cap.max_send_sge = 1; ++ attr.cap.max_recv_wr = 0; ++ attr.cap.max_recv_sge = 0; ++ attr.cap.max_inline_data = 0; ++ attr.send_cq = cq->cq; ++ attr.recv_cq = cq->cq; ++ attr.qp_type = IBV_QPT_RC; ++ ++ *qp = ibv_create_qp(domain->pd, &attr); ++ if (!*qp) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "Reservation QP create failed", ret); ++ } ++ return FI_SUCCESS; ++} ++ ++static int fi_ibv_create_ini_qp(struct fi_ibv_xrc_ep *ep) ++{ ++#if VERBS_HAVE_XRC ++ struct ibv_qp_init_attr_ex attr_ex; ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ int ret; ++ ++ fi_ibv_msg_ep_get_qp_attr(&ep->base_ep, ++ (struct ibv_qp_init_attr *)&attr_ex); ++ attr_ex.qp_type = IBV_QPT_XRC_SEND; ++ attr_ex.comp_mask = IBV_QP_INIT_ATTR_PD; ++ attr_ex.pd = domain->pd; ++ attr_ex.qp_context = domain; ++ ++ ret = rdma_create_qp_ex(ep->base_ep.id, &attr_ex); ++ if (ret) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "XRC INI QP, rdma_create_qp_ex()", -ret); ++ return ret; ++ } ++ return FI_SUCCESS; ++#else /* VERBS_HAVE_XRC */ ++ return -FI_ENOSYS; ++#endif /* !VERBS_HAVE_XRC */ ++} ++ ++static inline void fi_ibv_set_ini_conn_key(struct fi_ibv_xrc_ep *ep, ++ struct fi_ibv_ini_conn_key *key) ++{ ++ key->addr = ep->base_ep.info->dest_addr; ++ key->tx_cq = container_of(ep->base_ep.util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++int fi_ibv_get_shared_ini_conn(struct fi_ibv_xrc_ep *ep, ++ struct fi_ibv_ini_shared_conn **ini_conn) { ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct fi_ibv_ini_conn_key key; ++ struct fi_ibv_ini_shared_conn *conn; ++ struct ofi_rbnode *node; ++ int ret; ++ assert(ep->base_ep.id); ++ ++ fi_ibv_set_ini_conn_key(ep, &key); ++ node = ofi_rbmap_find(domain->xrc.ini_conn_rbmap, &key); ++ if (node) { ++ *ini_conn = node->data; ++ ofi_atomic_inc32(&(*ini_conn)->ref_cnt); ++ return FI_SUCCESS; ++ } ++ ++ *ini_conn = NULL; ++ conn = calloc(1, sizeof(*conn)); ++ if (!conn) ++ return -FI_ENOMEM; ++ ++ conn->tgt_qpn = FI_IBV_NO_INI_TGT_QPNUM; ++ conn->peer_addr = mem_dup(key.addr, ofi_sizeofaddr(key.addr)); ++ if (!conn->peer_addr) { ++ free(conn); ++ return -FI_ENOMEM; ++ } ++ conn->tx_cq = container_of(ep->base_ep.util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++ dlist_init(&conn->pending_list); ++ dlist_init(&conn->active_list); ++ ofi_atomic_initialize32(&conn->ref_cnt, 1); ++ ++ ret = ofi_rbmap_insert(domain->xrc.ini_conn_rbmap, ++ (void *) &key, (void *) conn); ++ assert(ret != -FI_EALREADY); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, "INI QP RBTree insert failed %d\n", ++ ret); ++ goto insert_err; ++ } ++ *ini_conn = conn; ++ return FI_SUCCESS; ++ ++insert_err: ++ free(conn->peer_addr); ++ free(conn); ++ return ret; ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++void fi_ibv_put_shared_ini_conn(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct fi_ibv_ini_shared_conn *ini_conn; ++ struct fi_ibv_ini_conn_key key; ++ struct ofi_rbnode *node; ++ ++ if (!ep->ini_conn) ++ return; ++ ++ /* remove from pending or active connection list */ ++ dlist_remove(&ep->ini_conn_entry); ++ ep->conn_state = FI_IBV_XRC_UNCONNECTED; ++ ini_conn = ep->ini_conn; ++ ep->ini_conn = NULL; ++ ep->base_ep.ibv_qp = NULL; ++ ++ /* Tear down physical INI/TGT when no longer being used */ ++ if (!ofi_atomic_dec32(&ini_conn->ref_cnt)) { ++ if (ini_conn->ini_qp && ibv_destroy_qp(ini_conn->ini_qp)) ++ VERBS_WARN(FI_LOG_FABRIC, "destroy of QP error %d\n", ++ errno); ++ ++ fi_ibv_set_ini_conn_key(ep, &key); ++ node = ofi_rbmap_find(domain->xrc.ini_conn_rbmap, &key); ++ assert(node); ++ ofi_rbmap_delete(domain->xrc.ini_conn_rbmap, node); ++ free(ini_conn->peer_addr); ++ free(ini_conn); ++ } else { ++ fi_ibv_sched_ini_conn(ini_conn); ++ } ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++void fi_ibv_add_pending_ini_conn(struct fi_ibv_xrc_ep *ep, int reciprocal, ++ void *conn_param, size_t conn_paramlen) ++{ ++ ep->conn_setup->pending_recip = reciprocal; ++ ep->conn_setup->pending_paramlen = MIN(conn_paramlen, ++ sizeof(ep->conn_setup->pending_param)); ++ memcpy(ep->conn_setup->pending_param, conn_param, ++ ep->conn_setup->pending_paramlen); ++ dlist_insert_tail(&ep->ini_conn_entry, &ep->ini_conn->pending_list); ++} ++ ++static void fi_ibv_create_shutdown_event(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_eq_cm_entry entry = { ++ .fid = &ep->base_ep.util_ep.ep_fid.fid, ++ }; ++ ++ fi_ibv_eq_write_event(ep->base_ep.eq, FI_SHUTDOWN, ++ &entry, sizeof(entry)); ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++void fi_ibv_sched_ini_conn(struct fi_ibv_ini_shared_conn *ini_conn) ++{ ++ struct fi_ibv_xrc_ep *ep; ++ enum fi_ibv_ini_qp_state last_state; ++ int ret; ++ ++ /* Continue to schedule shared connections if the physical connection ++ * has completed and there are connection requests pending. We could ++ * implement a throttle here if it is determined that it is better to ++ * limit the number of outstanding connections. */ ++ while (1) { ++ if (dlist_empty(&ini_conn->pending_list) || ++ ini_conn->state == FI_IBV_INI_QP_CONNECTING) ++ return; ++ ++ dlist_pop_front(&ini_conn->pending_list, ++ struct fi_ibv_xrc_ep, ep, ini_conn_entry); ++ ++ dlist_insert_tail(&ep->ini_conn_entry, ++ &ep->ini_conn->active_list); ++ last_state = ep->ini_conn->state; ++ if (last_state == FI_IBV_INI_QP_UNCONNECTED) { ++ ret = fi_ibv_create_ini_qp(ep); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, "Failed to create " ++ "physical INI QP %d\n", ret); ++ goto err; ++ } ++ ep->ini_conn->ini_qp = ep->base_ep.id->qp; ++ ep->ini_conn->state = FI_IBV_INI_QP_CONNECTING; ++ } else { ++ if (!ep->base_ep.id->qp) { ++ ret = fi_ibv_reserve_qpn(ep, ++ &ep->conn_setup->rsvd_ini_qpn); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, "rsvd_ini_qpn" ++ " create err %d\n", ret); ++ goto err; ++ } ++ } ++ } ++ ++ assert(ep->ini_conn->ini_qp); ++ ++ ep->base_ep.ibv_qp = ep->ini_conn->ini_qp; ++ ret = fi_ibv_process_ini_conn(ep, ep->conn_setup->pending_recip, ++ ep->conn_setup->pending_param, ++ ep->conn_setup->pending_paramlen); ++err: ++ if (ret) { ++ ep->ini_conn->state = last_state; ++ fi_ibv_put_shared_ini_conn(ep); ++ ++ /* We need to let the application know that the ++ * connect request has failed. */ ++ fi_ibv_create_shutdown_event(ep); ++ } ++ } ++} ++ ++/* Caller must hold domain:xrc:ini_mgmt_lock */ ++int fi_ibv_process_ini_conn(struct fi_ibv_xrc_ep *ep,int reciprocal, ++ void *param, size_t paramlen) ++{ ++ struct fi_ibv_xrc_cm_data *cm_data = param; ++ struct rdma_conn_param conn_param = { 0 }; ++ int ret; ++ ++ assert(ep->base_ep.ibv_qp); ++ ++ if (!reciprocal) ++ fi_ibv_eq_set_xrc_conn_tag(ep); ++ ++ fi_ibv_set_xrc_cm_data(cm_data, reciprocal, ep->conn_setup->conn_tag, ++ ep->base_ep.eq->xrc.pep_port, ++ ep->ini_conn->tgt_qpn); ++ conn_param.private_data = cm_data; ++ conn_param.private_data_len = paramlen; ++ conn_param.responder_resources = RDMA_MAX_RESP_RES; ++ conn_param.initiator_depth = RDMA_MAX_INIT_DEPTH; ++ conn_param.flow_control = 1; ++ conn_param.retry_count = 15; ++ conn_param.rnr_retry_count = 7; ++ conn_param.srq = 1; ++ ++ /* Shared connections use reserved temporary QP numbers to ++ * avoid the appearance of stale/duplicate CM messages */ ++ if (!ep->base_ep.id->qp) ++ conn_param.qp_num = ep->conn_setup->rsvd_ini_qpn->qp_num; ++ ++ assert(ep->conn_state == FI_IBV_XRC_UNCONNECTED || ++ ep->conn_state == FI_IBV_XRC_ORIG_CONNECTED); ++ fi_ibv_next_xrc_conn_state(ep); ++ ++ ret = rdma_connect(ep->base_ep.id, &conn_param) ? -errno : 0; ++ if (ret) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_connect", errno); ++ fi_ibv_prev_xrc_conn_state(ep); ++ } ++ return ret; ++} ++ ++int fi_ibv_ep_create_tgt_qp(struct fi_ibv_xrc_ep *ep, uint32_t tgt_qpn) ++{ ++#if VERBS_HAVE_XRC ++ struct ibv_qp_open_attr open_attr; ++ struct ibv_qp_init_attr_ex attr_ex; ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ struct ibv_qp *rsvd_qpn; ++ int ret; ++ ++ assert(ep->tgt_id && !ep->tgt_id->qp); ++ ++ /* If a target QP number was specified then open that existing ++ * QP for sharing. */ ++ if (tgt_qpn) { ++ ret = fi_ibv_reserve_qpn(ep, &rsvd_qpn); ++ if (!rsvd_qpn) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Create of XRC reserved QPN failed %d\n", ++ ret); ++ return ret; ++ } ++ ++ memset(&open_attr, 0, sizeof(open_attr)); ++ open_attr.qp_num = tgt_qpn; ++ open_attr.comp_mask = IBV_QP_OPEN_ATTR_NUM | ++ IBV_QP_OPEN_ATTR_XRCD | IBV_QP_OPEN_ATTR_TYPE | ++ IBV_QP_OPEN_ATTR_CONTEXT; ++ open_attr.xrcd = domain->xrc.xrcd; ++ open_attr.qp_type = IBV_QPT_XRC_RECV; ++ open_attr.qp_context = ep; ++ ++ ep->tgt_ibv_qp = ibv_open_qp(domain->verbs, &open_attr); ++ if (!ep->tgt_ibv_qp) { ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "XRC TGT QP, ibv_open_qp()", errno); ++ ibv_destroy_qp(rsvd_qpn); ++ return -errno; ++ } ++ ep->conn_setup->rsvd_tgt_qpn = rsvd_qpn; ++ return FI_SUCCESS; ++ } ++ ++ /* An existing XRC target was not specified, create XRC TGT ++ * side of new physical connection. */ ++ fi_ibv_msg_ep_get_qp_attr(&ep->base_ep, ++ (struct ibv_qp_init_attr *)&attr_ex); ++ attr_ex.qp_type = IBV_QPT_XRC_RECV; ++ attr_ex.qp_context = ep; ++ attr_ex.comp_mask = IBV_QP_INIT_ATTR_PD | IBV_QP_INIT_ATTR_XRCD; ++ attr_ex.pd = domain->pd; ++ attr_ex.xrcd = domain->xrc.xrcd; ++ if (rdma_create_qp_ex(ep->tgt_id, &attr_ex)) { ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "Physical XRC TGT QP, rdma_create_ep_ex()", ++ errno); ++ return -errno; ++ } ++ ep->tgt_ibv_qp = ep->tgt_id->qp; ++ ++ return FI_SUCCESS; ++#else /* VERBS_HAVE_XRC */ ++ return -FI_ENOSYS; ++#endif /* !VERBS_HAVE_XRC */ ++} ++ ++static int fi_ibv_put_tgt_qp(struct fi_ibv_xrc_ep *ep) ++{ ++ int ret; ++ ++ if (!ep->tgt_ibv_qp) ++ return FI_SUCCESS; ++ ++ /* The kernel will not destroy the detached TGT QP until all ++ * shared opens have called ibv_destroy_qp. */ ++ ret = ibv_destroy_qp(ep->tgt_ibv_qp); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_EP_CTRL, ++ "Close XRC TGT QP, ibv_destroy_qp()", errno); ++ return -errno; ++ } ++ ep->tgt_ibv_qp = NULL; ++ ++ return FI_SUCCESS; ++} ++ ++int fi_ibv_ep_destroy_xrc_qp(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(&ep->base_ep); ++ ++ if (ep->base_ep.ibv_qp) { ++ fastlock_acquire(&domain->xrc.ini_mgmt_lock); ++ fi_ibv_put_shared_ini_conn(ep); ++ fastlock_release(&domain->xrc.ini_mgmt_lock); ++ } ++ if (ep->base_ep.id) { ++ rdma_destroy_id(ep->base_ep.id); ++ ep->base_ep.id = NULL; ++ } ++ if (ep->tgt_ibv_qp) ++ fi_ibv_put_tgt_qp(ep); ++ ++ if (ep->tgt_id) { ++ rdma_destroy_id(ep->tgt_id); ++ ep->tgt_id = NULL; ++ } ++ return 0; ++} ++ ++FI_VERBS_XRC_ONLY ++static int fi_ibv_ini_conn_compare(struct ofi_rbmap *map, void *key, void *data) ++{ ++ struct fi_ibv_ini_shared_conn *ini_conn = data; ++ struct fi_ibv_ini_conn_key *_key = key; ++ int ret; ++ ++ assert(_key->addr->sa_family == ini_conn->peer_addr->sa_family); ++ ++ /* Only interested in the interface address and TX CQ */ ++ switch (_key->addr->sa_family) { ++ case AF_INET: ++ ret = memcmp(&ofi_sin_addr(_key->addr), ++ &ofi_sin_addr(ini_conn->peer_addr), ++ sizeof(ofi_sin_addr(_key->addr))); ++ break; ++ case AF_INET6: ++ ret = memcmp(&ofi_sin6_addr(_key->addr), ++ &ofi_sin6_addr(ini_conn->peer_addr), ++ sizeof(ofi_sin6_addr(_key->addr))); ++ break; ++ default: ++ VERBS_WARN(FI_LOG_FABRIC, "Unsupported address format\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ if (ret) ++ return ret; ++ ++ return _key->tx_cq < ini_conn->tx_cq ? ++ -1 : _key->tx_cq > ini_conn->tx_cq; ++} ++ ++FI_VERBS_XRC_ONLY ++static int fi_ibv_domain_xrc_validate_hw(struct fi_ibv_domain *domain) ++{ ++ struct ibv_device_attr attr; ++ int ret; ++ ++ ret = ibv_query_device(domain->verbs, &attr); ++ if (ret || !(attr.device_cap_flags & IBV_DEVICE_XRC)) { ++ VERBS_INFO(FI_LOG_DOMAIN, "XRC is not supported"); ++ return -FI_EINVAL; ++ } ++ return FI_SUCCESS; ++} ++ ++int fi_ibv_domain_xrc_init(struct fi_ibv_domain *domain) ++{ ++#if VERBS_HAVE_XRC ++ struct ibv_xrcd_init_attr attr; ++ int ret; ++ ++ ret = fi_ibv_domain_xrc_validate_hw(domain); ++ if (ret) ++ return ret; ++ ++ domain->xrc.xrcd_fd = -1; ++ if (fi_ibv_gl_data.msg.xrcd_filename) { ++ domain->xrc.xrcd_fd = open(fi_ibv_gl_data.msg.xrcd_filename, ++ O_CREAT, S_IWUSR | S_IRUSR); ++ if (domain->xrc.xrcd_fd < 0) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, ++ "XRCD file open", errno); ++ return -errno; ++ } ++ } ++ ++ attr.comp_mask = IBV_XRCD_INIT_ATTR_FD | IBV_XRCD_INIT_ATTR_OFLAGS; ++ attr.fd = domain->xrc.xrcd_fd; ++ attr.oflags = O_CREAT; ++ domain->xrc.xrcd = ibv_open_xrcd(domain->verbs, &attr); ++ if (!domain->xrc.xrcd) { ++ ret = -errno; ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_open_xrcd", errno); ++ goto xrcd_err; ++ } ++ ++ fastlock_init(&domain->xrc.ini_mgmt_lock); ++ domain->xrc.ini_conn_rbmap = calloc(1, ++ sizeof(*domain->xrc.ini_conn_rbmap)); ++ ++ if (!domain->xrc.ini_conn_rbmap) { ++ ret = -ENOMEM; ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "XRC INI QP RB Tree", -ret); ++ goto rbmap_err; ++ } ++ domain->xrc.ini_conn_rbmap->compare = &fi_ibv_ini_conn_compare; ++ ofi_rbmap_init(domain->xrc.ini_conn_rbmap); ++ ++ domain->use_xrc = 1; ++ return FI_SUCCESS; ++ ++rbmap_err: ++ (void)ibv_close_xrcd(domain->xrc.xrcd); ++xrcd_err: ++ if (domain->xrc.xrcd_fd >= 0) { ++ close(domain->xrc.xrcd_fd); ++ domain->xrc.xrcd_fd = -1; ++ } ++ return ret; ++#else /* VERBS_HAVE_XRC */ ++ return -FI_ENOSYS; ++#endif /* !VERBS_HAVE_XRC */ ++} ++ ++int fi_ibv_domain_xrc_cleanup(struct fi_ibv_domain *domain) ++{ ++#if VERBS_HAVE_XRC ++ int ret; ++ ++ assert(domain->xrc.xrcd); ++ ++ /* All endpoint and hence XRC INI QP should be closed */ ++ if (!ofi_rbmap_empty(domain->xrc.ini_conn_rbmap)) { ++ VERBS_WARN(FI_LOG_DOMAIN, "XRC domain busy\n"); ++ return -FI_EBUSY; ++ } ++ ++ ret = ibv_close_xrcd(domain->xrc.xrcd); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_close_xrcd", ret); ++ return -ret; ++ } ++ if (domain->xrc.xrcd_fd >= 0) { ++ close(domain->xrc.xrcd_fd); ++ domain->xrc.xrcd_fd = -1; ++ } ++ ++ ofi_rbmap_cleanup(domain->xrc.ini_conn_rbmap); ++ fastlock_destroy(&domain->xrc.ini_mgmt_lock); ++#endif /* VERBS_HAVE_XRC */ ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_ep.c +new file mode 100644 +index 000000000..2f0f08e10 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_ep.c +@@ -0,0 +1,2072 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++ ++#include "fi_verbs.h" ++ ++#define VERBS_RESOLVE_TIMEOUT 2000 // ms ++ ++static struct fi_ops_msg fi_ibv_srq_msg_ops; ++ ++static inline int fi_ibv_msg_ep_cmdata_size(fid_t fid) ++{ ++ struct fi_ibv_pep *pep; ++ struct fi_ibv_ep *ep; ++ struct fi_info *info; ++ ++ switch (fid->fclass) { ++ case FI_CLASS_PEP: ++ pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); ++ info = pep->info; ++ break; ++ case FI_CLASS_EP: ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ info = ep->info; ++ break; ++ default: ++ info = NULL; ++ }; ++ if (fi_ibv_is_xrc(info)) ++ return VERBS_CM_DATA_SIZE - sizeof(struct fi_ibv_xrc_cm_data); ++ else ++ return VERBS_CM_DATA_SIZE; ++} ++ ++static int fi_ibv_ep_getopt(fid_t fid, int level, int optname, ++ void *optval, size_t *optlen) ++{ ++ switch (level) { ++ case FI_OPT_ENDPOINT: ++ switch (optname) { ++ case FI_OPT_CM_DATA_SIZE: ++ if (*optlen < sizeof(size_t)) ++ return -FI_ETOOSMALL; ++ *((size_t *) optval) = fi_ibv_msg_ep_cmdata_size(fid); ++ *optlen = sizeof(size_t); ++ return 0; ++ default: ++ return -FI_ENOPROTOOPT; ++ } ++ default: ++ return -FI_ENOPROTOOPT; ++ } ++ return 0; ++} ++ ++static int fi_ibv_ep_setopt(fid_t fid, int level, int optname, ++ const void *optval, size_t optlen) ++{ ++ switch (level) { ++ case FI_OPT_ENDPOINT: ++ return -FI_ENOPROTOOPT; ++ default: ++ return -FI_ENOPROTOOPT; ++ } ++ return 0; ++} ++ ++static struct fi_ops_ep fi_ibv_ep_base_ops = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = fi_no_cancel, ++ .getopt = fi_ibv_ep_getopt, ++ .setopt = fi_ibv_ep_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++static struct fi_ops_rma fi_ibv_dgram_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_no_rma_read, ++ .readv = fi_no_rma_readv, ++ .readmsg = fi_no_rma_readmsg, ++ .write = fi_no_rma_write, ++ .writev = fi_no_rma_writev, ++ .writemsg = fi_no_rma_writemsg, ++ .inject = fi_no_rma_inject, ++ .writedata = fi_no_rma_writedata, ++ .injectdata = fi_no_rma_injectdata, ++}; ++ ++static int fi_ibv_alloc_wrs(struct fi_ibv_ep *ep) ++{ ++ ep->wrs = calloc(1, sizeof(*ep->wrs)); ++ if (!ep->wrs) ++ return -FI_ENOMEM; ++ ++ ep->wrs->msg_wr.wr_id = VERBS_NO_COMP_FLAG; ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND; ++ ep->wrs->msg_wr.send_flags = IBV_SEND_INLINE; ++ ep->wrs->msg_wr.sg_list = &ep->wrs->sge; ++ ep->wrs->msg_wr.num_sge = 1; ++ ++ ep->wrs->rma_wr.wr_id = VERBS_NO_COMP_FLAG; ++ ep->wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE; ++ ep->wrs->rma_wr.send_flags = IBV_SEND_INLINE; ++ ep->wrs->rma_wr.sg_list = &ep->wrs->sge; ++ ep->wrs->rma_wr.num_sge = 1; ++ ++ return FI_SUCCESS; ++} ++ ++static void fi_ibv_free_wrs(struct fi_ibv_ep *ep) ++{ ++ free(ep->wrs); ++} ++ ++static void fi_ibv_util_ep_progress_noop(struct util_ep *util_ep) ++{ ++ /* This routine shouldn't be called */ ++ assert(0); ++} ++ ++static struct fi_ibv_ep * ++fi_ibv_alloc_init_ep(struct fi_info *info, struct fi_ibv_domain *domain, ++ void *context) ++{ ++ struct fi_ibv_ep *ep; ++ struct fi_ibv_xrc_ep *xrc_ep; ++ int ret; ++ ++ if (fi_ibv_is_xrc(info)) { ++ xrc_ep = calloc(1, sizeof(*xrc_ep)); ++ if (!xrc_ep) ++ return NULL; ++ ep = &xrc_ep->base_ep; ++ } else { ++ ep = calloc(1, sizeof(*ep)); ++ if (!ep) ++ return NULL; ++ } ++ ++ ep->info = fi_dupinfo(info); ++ if (!ep->info) ++ goto err1; ++ ++ if (domain->util_domain.threading != FI_THREAD_SAFE) { ++ if (fi_ibv_alloc_wrs(ep)) ++ goto err2; ++ } ++ ++ ret = ofi_endpoint_init(&domain->util_domain.domain_fid, &fi_ibv_util_prov, info, ++ &ep->util_ep, context, fi_ibv_util_ep_progress_noop); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to initialize EP, error - %d\n", ret); ++ goto err3; ++ } ++ ++ ep->util_ep.ep_fid.msg = calloc(1, sizeof(*ep->util_ep.ep_fid.msg)); ++ if (!ep->util_ep.ep_fid.msg) ++ goto err4; ++ ++ return ep; ++err4: ++ (void) ofi_endpoint_close(&ep->util_ep); ++err3: ++ fi_ibv_free_wrs(ep); ++err2: ++ fi_freeinfo(ep->info); ++err1: ++ free(ep); ++ return NULL; ++} ++ ++static int fi_ibv_close_free_ep(struct fi_ibv_ep *ep) ++{ ++ int ret; ++ ++ free(ep->util_ep.ep_fid.msg); ++ ep->util_ep.ep_fid.msg = NULL; ++ ++ ret = ofi_endpoint_close(&ep->util_ep); ++ if (ret) ++ return ret; ++ ++ fi_ibv_free_wrs(ep); ++ fi_freeinfo(ep->info); ++ free(ep); ++ ++ return 0; ++} ++ ++static inline void fi_ibv_ep_xrc_close(struct fi_ibv_ep *ep) ++{ ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ ++ fi_ibv_ep_destroy_xrc_qp(xrc_ep); ++ if (xrc_ep->conn_setup) ++ fi_ibv_free_xrc_conn_setup(xrc_ep); ++} ++ ++static int fi_ibv_ep_close(fid_t fid) ++{ ++ int ret; ++ struct fi_ibv_fabric *fab; ++ struct fi_ibv_ep *ep = ++ container_of(fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ ++ switch (ep->util_ep.type) { ++ case FI_EP_MSG: ++ if (fi_ibv_is_xrc(ep->info)) ++ fi_ibv_ep_xrc_close(ep); ++ else ++ rdma_destroy_ep(ep->id); ++ fi_ibv_cleanup_cq(ep); ++ break; ++ case FI_EP_DGRAM: ++ fab = container_of(&ep->util_ep.domain->fabric->fabric_fid, ++ struct fi_ibv_fabric, util_fabric.fabric_fid.fid); ++ ofi_ns_del_local_name(&fab->name_server, ++ &ep->service, &ep->ep_name); ++ ret = ibv_destroy_qp(ep->ibv_qp); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to destroy QP (errno = %d)\n", errno); ++ return -errno; ++ } ++ fi_ibv_cleanup_cq(ep); ++ break; ++ default: ++ VERBS_INFO(FI_LOG_DOMAIN, "Unknown EP type\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ ++ VERBS_INFO(FI_LOG_DOMAIN, "EP %p is being closed\n", ep); ++ ++ ret = fi_ibv_close_free_ep(ep); ++ if (ret) { ++ VERBS_WARN(FI_LOG_DOMAIN, ++ "Unable to close EP (%p), error - %d\n", ep, ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static inline int fi_ibv_ep_xrc_set_tgt_chan(struct fi_ibv_ep *ep) ++{ ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ if (xrc_ep->tgt_id) ++ return rdma_migrate_id(xrc_ep->tgt_id, ep->eq->channel); ++ ++ return FI_SUCCESS; ++} ++ ++static int fi_ibv_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep; ++ struct util_cq *cq; ++ struct fi_ibv_dgram_av *av; ++ int ret; ++ ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ ret = ofi_ep_bind_valid(&fi_ibv_prov, bfid, flags); ++ if (ret) ++ return ret; ++ ++ switch (ep->util_ep.type) { ++ case FI_EP_MSG: ++ switch (bfid->fclass) { ++ case FI_CLASS_CQ: ++ cq = container_of(bfid, struct util_cq, cq_fid.fid); ++ ret = ofi_ep_bind_cq(&ep->util_ep, cq, flags); ++ if (ret) ++ return ret; ++ break; ++ case FI_CLASS_EQ: ++ ep->eq = container_of(bfid, struct fi_ibv_eq, eq_fid.fid); ++ ret = rdma_migrate_id(ep->id, ep->eq->channel); ++ if (ret) ++ return -errno; ++ if (fi_ibv_is_xrc(ep->info)) { ++ ret = fi_ibv_ep_xrc_set_tgt_chan(ep); ++ if (ret) ++ return -errno; ++ } ++ break; ++ case FI_CLASS_SRX_CTX: ++ ep->srq_ep = container_of(bfid, struct fi_ibv_srq_ep, ep_fid.fid); ++ break; ++ default: ++ return -FI_EINVAL; ++ } ++ break; ++ case FI_EP_DGRAM: ++ switch (bfid->fclass) { ++ case FI_CLASS_CQ: ++ cq = container_of(bfid, struct util_cq, cq_fid.fid); ++ ret = ofi_ep_bind_cq(&ep->util_ep, cq, flags); ++ if (ret) ++ return ret; ++ break; ++ case FI_CLASS_AV: ++ av = container_of(bfid, struct fi_ibv_dgram_av, ++ util_av.av_fid.fid); ++ return ofi_ep_bind_av(&ep->util_ep, &av->util_av); ++ default: ++ return -FI_EINVAL; ++ } ++ break; ++ default: ++ VERBS_INFO(FI_LOG_DOMAIN, "Unknown EP type\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ ++ return 0; ++} ++ ++static int fi_ibv_create_dgram_ep(struct fi_ibv_domain *domain, struct fi_ibv_ep *ep, ++ struct ibv_qp_init_attr *init_attr) ++{ ++ struct fi_ibv_fabric *fab; ++ struct ibv_qp_attr attr = { ++ .qp_state = IBV_QPS_INIT, ++ .pkey_index = 0, ++ .port_num = 1, ++ .qkey = 0x11111111, ++ }; ++ int ret = 0; ++ union ibv_gid gid; ++ uint16_t p_key; ++ struct ibv_port_attr port_attr; ++ ++ init_attr->qp_type = IBV_QPT_UD; ++ ++ ep->ibv_qp = ibv_create_qp(domain->pd, init_attr); ++ if (!ep->ibv_qp) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to create IBV " ++ "Queue Pair\n"); ++ return -errno; ++ } ++ ++ ret = ibv_modify_qp(ep->ibv_qp, &attr, ++ IBV_QP_STATE | ++ IBV_QP_PKEY_INDEX | ++ IBV_QP_PORT | ++ IBV_QP_QKEY); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " ++ "to INIT\n"); ++ return -errno; ++ } ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_RTR; ++ ret = ibv_modify_qp(ep->ibv_qp, &attr, ++ IBV_QP_STATE); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " ++ "to RTR\n"); ++ return -errno; ++ } ++ ++ if (ep->util_ep.tx_cq) { ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_RTS; ++ attr.sq_psn = 0xffffff; ++ ret = ibv_modify_qp(ep->ibv_qp, &attr, ++ IBV_QP_STATE | ++ IBV_QP_SQ_PSN); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to modify QP state " ++ "to RTS\n"); ++ return -errno; ++ } ++ } ++ ++ if (ibv_query_gid(domain->verbs, 1, 0, &gid)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to query GID, errno = %d", ++ errno); ++ return -errno; ++ } ++ ++ if (ibv_query_pkey(domain->verbs, 1, 0, &p_key)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to query P_Key, errno = %d", ++ errno); ++ return -errno; ++ } ++ ++ if (ibv_query_port(domain->verbs, 1, &port_attr)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to query port attributes, errno = %d", ++ errno); ++ return -errno; ++ } ++ ++ ep->ep_name.lid = port_attr.lid; ++ ep->ep_name.sl = port_attr.sm_sl; ++ ep->ep_name.gid = gid; ++ ep->ep_name.qpn = ep->ibv_qp->qp_num; ++ ep->ep_name.pkey = p_key; ++ ++ fab = container_of(ep->util_ep.domain->fabric, ++ struct fi_ibv_fabric, util_fabric); ++ ++ ofi_ns_add_local_name(&fab->name_server, ++ &ep->service, &ep->ep_name); ++ ++ return 0; ++} ++ ++/* fi_ibv_srq_ep::xrc.prepost_lock must be held */ ++FI_VERBS_XRC_ONLY ++static int fi_ibv_process_xrc_preposted(struct fi_ibv_srq_ep *srq_ep) ++{ ++ struct fi_ibv_xrc_srx_prepost *recv; ++ struct slist_entry *entry; ++ int ret; ++ ++ /* The pre-post SRQ function ops have been replaced so the ++ * posting here results in adding the RX entries to the SRQ */ ++ while (!slist_empty(&srq_ep->xrc.prepost_list)) { ++ entry = slist_remove_head(&srq_ep->xrc.prepost_list); ++ recv = container_of(entry, struct fi_ibv_xrc_srx_prepost, ++ prepost_entry); ++ ret = fi_recv(&srq_ep->ep_fid, recv->buf, recv->len, ++ recv->desc, recv->src_addr, recv->context); ++ free(recv); ++ if (ret) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "fi_recv", errno); ++ return -errno; ++ } ++ } ++ return FI_SUCCESS; ++} ++ ++static int fi_ibv_ep_enable_xrc(struct fi_ibv_ep *ep) ++{ ++#if VERBS_HAVE_XRC ++ struct fi_ibv_xrc_ep *xrc_ep = container_of(ep, struct fi_ibv_xrc_ep, ++ base_ep); ++ struct fi_ibv_srq_ep *srq_ep = ep->srq_ep; ++ struct fi_ibv_domain *domain = container_of(ep->util_ep.rx_cq->domain, ++ struct fi_ibv_domain, util_domain); ++ struct fi_ibv_cq *cq = container_of(ep->util_ep.rx_cq, ++ struct fi_ibv_cq, util_cq); ++ struct ibv_srq_init_attr_ex attr; ++ ssize_t ret; ++ ++ /* XRC EP additional initialization */ ++ dlist_init(&xrc_ep->ini_conn_entry); ++ xrc_ep->conn_state = FI_IBV_XRC_UNCONNECTED; ++ ++ fastlock_acquire(&srq_ep->xrc.prepost_lock); ++ if (srq_ep->srq) { ++ /* ++ * Multiple endpoints bound to the same XRC SRX context have ++ * the restriction that they must be bound to the same RX CQ ++ */ ++ if (!srq_ep->xrc.cq || srq_ep->xrc.cq != cq) { ++ fastlock_release(&srq_ep->xrc.prepost_lock); ++ VERBS_WARN(FI_LOG_EP_CTRL, "SRX_CTX/CQ mismatch\n"); ++ return -FI_EINVAL; ++ } ++ ibv_get_srq_num(srq_ep->srq, &xrc_ep->srqn); ++ ret = FI_SUCCESS; ++ goto done; ++ } ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.attr.max_wr = srq_ep->xrc.max_recv_wr; ++ attr.attr.max_sge = srq_ep->xrc.max_sge; ++ attr.comp_mask = IBV_SRQ_INIT_ATTR_TYPE | IBV_SRQ_INIT_ATTR_XRCD | ++ IBV_SRQ_INIT_ATTR_CQ | IBV_SRQ_INIT_ATTR_PD; ++ attr.srq_type = IBV_SRQT_XRC; ++ attr.xrcd = domain->xrc.xrcd; ++ attr.cq = cq->cq; ++ attr.pd = domain->pd; ++ ++ srq_ep->srq = ibv_create_srq_ex(domain->verbs, &attr); ++ if (!srq_ep->srq) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_create_srq_ex", errno); ++ ret = -errno; ++ goto done; ++ } ++ /* The RX CQ maintains a list of all the XRC SRQs that were created ++ * using it as the CQ */ ++ cq->util_cq.cq_fastlock_acquire(&cq->xrc.srq_list_lock); ++ dlist_insert_tail(&srq_ep->xrc.srq_entry, &cq->xrc.srq_list); ++ srq_ep->xrc.cq = cq; ++ cq->util_cq.cq_fastlock_release(&cq->xrc.srq_list_lock); ++ ++ ibv_get_srq_num(srq_ep->srq, &xrc_ep->srqn); ++ ++ /* Swap functions since locking is no longer required */ ++ srq_ep->ep_fid.msg = &fi_ibv_srq_msg_ops; ++ ret = fi_ibv_process_xrc_preposted(srq_ep); ++done: ++ fastlock_release(&srq_ep->xrc.prepost_lock); ++ ++ return ret; ++#else /* VERBS_HAVE_XRC */ ++ return -FI_ENOSYS; ++#endif /* !VERBS_HAVE_XRC */ ++} ++ ++void fi_ibv_msg_ep_get_qp_attr(struct fi_ibv_ep *ep, ++ struct ibv_qp_init_attr *attr) ++{ ++ if (ep->util_ep.tx_cq) { ++ struct fi_ibv_cq *cq = container_of(ep->util_ep.tx_cq, ++ struct fi_ibv_cq, util_cq); ++ ++ attr->cap.max_send_wr = ep->info->tx_attr->size; ++ attr->cap.max_send_sge = ep->info->tx_attr->iov_limit; ++ attr->send_cq = cq->cq; ++ } else { ++ struct fi_ibv_cq *cq = ++ container_of(ep->util_ep.rx_cq, struct fi_ibv_cq, util_cq); ++ ++ attr->send_cq = cq->cq; ++ } ++ ++ if (ep->util_ep.rx_cq) { ++ struct fi_ibv_cq *cq = ++ container_of(ep->util_ep.rx_cq, struct fi_ibv_cq, util_cq); ++ ++ attr->cap.max_recv_wr = ep->info->rx_attr->size; ++ attr->cap.max_recv_sge = ep->info->rx_attr->iov_limit; ++ attr->recv_cq = cq->cq; ++ } else { ++ struct fi_ibv_cq *cq = ++ container_of(ep->util_ep.tx_cq, struct fi_ibv_cq, util_cq); ++ ++ attr->recv_cq = cq->cq; ++ } ++ attr->cap.max_inline_data = ep->info->tx_attr->inject_size; ++ attr->qp_type = IBV_QPT_RC; ++ attr->sq_sig_all = 1; ++ ++ if (ep->srq_ep) { ++ attr->srq = ep->srq_ep->srq; ++ /* Recieve posts are done to SRQ not QP RQ */ ++ attr->cap.max_recv_wr = 0; ++ } ++} ++ ++ ++static int fi_ibv_ep_enable(struct fid_ep *ep_fid) ++{ ++ struct ibv_qp_init_attr attr = { 0 }; ++ struct fi_ibv_ep *ep = container_of(ep_fid, struct fi_ibv_ep, ++ util_ep.ep_fid); ++ struct fi_ibv_domain *domain = fi_ibv_ep_to_domain(ep); ++ int ret; ++ ++ if (!ep->eq && (ep->util_ep.type == FI_EP_MSG)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Endpoint is not bound to an event queue\n"); ++ return -FI_ENOEQ; ++ } ++ ++ if (!ep->util_ep.tx_cq && !ep->util_ep.rx_cq) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " ++ "a send or receive completion queue\n"); ++ return -FI_ENOCQ; ++ } ++ ++ if (!ep->util_ep.tx_cq && (ofi_send_allowed(ep->util_ep.caps) || ++ ofi_rma_initiate_allowed(ep->util_ep.caps))) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " ++ "a send completion queue when it has transmit " ++ "capabilities enabled (FI_SEND | FI_RMA).\n"); ++ return -FI_ENOCQ; ++ } ++ ++ if (!ep->util_ep.rx_cq && ofi_recv_allowed(ep->util_ep.caps)) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " ++ "a receive completion queue when it has receive " ++ "capabilities enabled. (FI_RECV)\n"); ++ return -FI_ENOCQ; ++ } ++ fi_ibv_msg_ep_get_qp_attr(ep, &attr); ++ ++ switch (ep->util_ep.type) { ++ case FI_EP_MSG: ++ if (ep->srq_ep) { ++ /* Override receive function pointers to prevent the user from ++ * posting Receive WRs to a QP where a SRQ is attached to it */ ++ if (domain->use_xrc) { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_srq_xrc_ep_msg_ops; ++ return fi_ibv_ep_enable_xrc(ep); ++ } else { ++ ep->util_ep.ep_fid.msg->recv = fi_no_msg_recv; ++ ep->util_ep.ep_fid.msg->recvv = fi_no_msg_recvv; ++ ep->util_ep.ep_fid.msg->recvmsg = fi_no_msg_recvmsg; ++ } ++ } else if (domain->use_xrc) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "XRC EP_MSG not bound " ++ "to srx_context\n"); ++ return -FI_EINVAL; ++ } ++ ++ attr.qp_context = ep; ++ ret = rdma_create_qp(ep->id, domain->pd, &attr); ++ if (ret) { ++ ret = -errno; ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "Unable to create rdma qp: %s (%d)\n", ++ fi_strerror(-ret), -ret); ++ return ret; ++ } ++ ++ /* Allow shared XRC INI QP not controlled by RDMA CM ++ * to share same post functions as RC QP. */ ++ ep->ibv_qp = ep->id->qp; ++ break; ++ case FI_EP_DGRAM: ++ assert(domain); ++ attr.sq_sig_all = 1; ++ ret = fi_ibv_create_dgram_ep(domain, ep, &attr); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Unable to create dgram EP: %s (%d)\n", ++ fi_strerror(-ret), -ret); ++ return ret; ++ } ++ break; ++ default: ++ VERBS_INFO(FI_LOG_DOMAIN, "Unknown EP type\n"); ++ assert(0); ++ return -FI_EINVAL; ++ } ++ return 0; ++} ++ ++static int fi_ibv_ep_control(struct fid *fid, int command, void *arg) ++{ ++ struct fid_ep *ep; ++ ++ switch (fid->fclass) { ++ case FI_CLASS_EP: ++ ep = container_of(fid, struct fid_ep, fid); ++ switch (command) { ++ case FI_ENABLE: ++ return fi_ibv_ep_enable(ep); ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++} ++ ++static int fi_ibv_dgram_ep_setname(fid_t ep_fid, void *addr, size_t addrlen) ++{ ++ struct fi_ibv_ep *ep; ++ void *save_addr; ++ int ret = FI_SUCCESS; ++ ++ if (ep_fid->fclass != FI_CLASS_EP) ++ return -FI_EINVAL; ++ ++ ep = container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ if (!ep) ++ return -FI_EINVAL; ++ ++ if (addrlen < ep->info->src_addrlen) { ++ VERBS_INFO(FI_LOG_EP_CTRL, ++ "addrlen expected: %"PRIu64", got: %"PRIu64"\n", ++ ep->info->src_addrlen, addrlen); ++ return -FI_ETOOSMALL; ++ } ++ /* ++ * save previous address to be able make ++ * a roll back on the previous one ++ */ ++ save_addr = ep->info->src_addr; ++ ++ ep->info->src_addr = calloc(1, ep->info->src_addrlen); ++ if (!ep->info->src_addr) { ++ ep->info->src_addr = save_addr; ++ ret = -FI_ENOMEM; ++ goto err; ++ } ++ ++ memcpy(ep->info->src_addr, addr, ep->info->src_addrlen); ++ memcpy(&ep->ep_name, addr, ep->info->src_addrlen); ++ ++err: ++ ep->info->src_addr = save_addr; ++ return ret; ++} ++ ++static int fi_ibv_dgram_ep_getname(fid_t ep_fid, void *addr, size_t *addrlen) ++{ ++ struct fi_ibv_ep *ep; ++ ++ if (ep_fid->fclass != FI_CLASS_EP) ++ return -FI_EINVAL; ++ ++ ep = container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid.fid); ++ if (!ep) ++ return -FI_EINVAL; ++ ++ if (*addrlen < sizeof(ep->ep_name)) { ++ *addrlen = sizeof(ep->ep_name); ++ VERBS_INFO(FI_LOG_EP_CTRL, ++ "addrlen expected: %"PRIu64", got: %"PRIu64"\n", ++ sizeof(ep->ep_name), *addrlen); ++ return -FI_ETOOSMALL; ++ } ++ ++ memset(addr, 0, *addrlen); ++ memcpy(addr, &ep->ep_name, sizeof(ep->ep_name)); ++ *addrlen = sizeof(ep->ep_name); ++ ++ return FI_SUCCESS; ++} ++ ++static struct fi_ops fi_ibv_ep_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = fi_ibv_ep_close, ++ .bind = fi_ibv_ep_bind, ++ .control = fi_ibv_ep_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_cm fi_ibv_dgram_cm_ops = { ++ .size = sizeof(fi_ibv_dgram_cm_ops), ++ .setname = fi_ibv_dgram_ep_setname, ++ .getname = fi_ibv_dgram_ep_getname, ++ .getpeer = fi_no_getpeer, ++ .connect = fi_no_connect, ++ .listen = fi_no_listen, ++ .accept = fi_no_accept, ++ .reject = fi_no_reject, ++ .shutdown = fi_no_shutdown, ++ .join = fi_no_join, ++}; ++ ++int fi_ibv_open_ep(struct fid_domain *domain, struct fi_info *info, ++ struct fid_ep **ep_fid, void *context) ++{ ++ struct fi_ibv_domain *dom; ++ struct fi_ibv_ep *ep; ++ struct fi_ibv_connreq *connreq; ++ struct fi_ibv_pep *pep; ++ struct fi_info *fi; ++ int ret; ++ ++ if (info->src_addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_FABRIC, ++ "open_ep src addr", info->src_addr); ++ if (info->dest_addr) ++ ofi_straddr_dbg(&fi_ibv_prov, FI_LOG_FABRIC, ++ "open_ep dest addr", info->dest_addr); ++ ++ dom = container_of(domain, struct fi_ibv_domain, ++ util_domain.domain_fid); ++ /* strncmp is used here, because the function is used ++ * to allocate DGRAM (has prefix -dgram) and MSG EPs */ ++ if (strncmp(dom->verbs->device->name, info->domain_attr->name, ++ strlen(dom->verbs->device->name))) { ++ VERBS_INFO(FI_LOG_DOMAIN, ++ "Invalid info->domain_attr->name: %s and %s\n", ++ dom->verbs->device->name, info->domain_attr->name); ++ return -FI_EINVAL; ++ } ++ ++ fi = dom->info; ++ ++ if (info->ep_attr) { ++ ret = fi_ibv_check_ep_attr(info, fi); ++ if (ret) ++ return ret; ++ } ++ ++ if (info->tx_attr) { ++ ret = ofi_check_tx_attr(&fi_ibv_prov, fi->tx_attr, ++ info->tx_attr, info->mode); ++ if (ret) ++ return ret; ++ } ++ ++ if (info->rx_attr) { ++ ret = fi_ibv_check_rx_attr(info->rx_attr, info, fi); ++ if (ret) ++ return ret; ++ } ++ ++ ep = fi_ibv_alloc_init_ep(info, dom, context); ++ if (!ep) ++ return -FI_ENOMEM; ++ ++ ep->inject_limit = ep->info->tx_attr->inject_size; ++ ++ switch (info->ep_attr->type) { ++ case FI_EP_MSG: ++ if (dom->use_xrc) { ++ if (dom->util_domain.threading == FI_THREAD_SAFE) { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_xrc_ep_msg_ops_ts; ++ ep->util_ep.ep_fid.rma = &fi_ibv_msg_xrc_ep_rma_ops_ts; ++ } else { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_xrc_ep_msg_ops; ++ ep->util_ep.ep_fid.rma = &fi_ibv_msg_xrc_ep_rma_ops; ++ } ++ ep->util_ep.ep_fid.cm = &fi_ibv_msg_xrc_ep_cm_ops; ++ ep->util_ep.ep_fid.atomic = &fi_ibv_msg_xrc_ep_atomic_ops; ++ } else { ++ if (dom->util_domain.threading == FI_THREAD_SAFE) { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_ep_msg_ops_ts; ++ ep->util_ep.ep_fid.rma = &fi_ibv_msg_ep_rma_ops_ts; ++ } else { ++ *ep->util_ep.ep_fid.msg = fi_ibv_msg_ep_msg_ops; ++ ep->util_ep.ep_fid.rma = &fi_ibv_msg_ep_rma_ops; ++ } ++ ep->util_ep.ep_fid.cm = &fi_ibv_msg_ep_cm_ops; ++ ep->util_ep.ep_fid.atomic = &fi_ibv_msg_ep_atomic_ops; ++ } ++ ++ if (!info->handle) { ++ ret = fi_ibv_create_ep(NULL, NULL, 0, info, NULL, &ep->id); ++ if (ret) ++ goto err1; ++ } else if (info->handle->fclass == FI_CLASS_CONNREQ) { ++ connreq = container_of(info->handle, ++ struct fi_ibv_connreq, handle); ++ if (dom->use_xrc) { ++ assert(connreq->is_xrc); ++ ++ if (!connreq->xrc.is_reciprocal) { ++ ret = fi_ibv_process_xrc_connreq(ep, ++ connreq); ++ if (ret) ++ goto err1; ++ } ++ } else { ++ ep->id = connreq->id; ++ ep->ibv_qp = ep->id->qp; ++ } ++ } else if (info->handle->fclass == FI_CLASS_PEP) { ++ pep = container_of(info->handle, struct fi_ibv_pep, pep_fid.fid); ++ ep->id = pep->id; ++ ep->ibv_qp = ep->id->qp; ++ pep->id = NULL; ++ ++ if (rdma_resolve_addr(ep->id, info->src_addr, info->dest_addr, ++ VERBS_RESOLVE_TIMEOUT)) { ++ ret = -errno; ++ VERBS_INFO(FI_LOG_DOMAIN, "Unable to rdma_resolve_addr\n"); ++ goto err2; ++ } ++ ++ if (rdma_resolve_route(ep->id, VERBS_RESOLVE_TIMEOUT)) { ++ ret = -errno; ++ VERBS_INFO(FI_LOG_DOMAIN, "Unable to rdma_resolve_route\n"); ++ goto err2; ++ } ++ } else { ++ ret = -FI_ENOSYS; ++ goto err1; ++ } ++ ep->id->context = &ep->util_ep.ep_fid.fid; ++ break; ++ case FI_EP_DGRAM: ++ ep->service = (info->src_addr) ? ++ (((struct ofi_ib_ud_ep_name *)info->src_addr)->service) : ++ (((getpid() & 0x7FFF) << 16) + ((uintptr_t)ep & 0xFFFF)); ++ ++ if (dom->util_domain.threading == FI_THREAD_SAFE) { ++ *ep->util_ep.ep_fid.msg = fi_ibv_dgram_msg_ops_ts; ++ } else { ++ *ep->util_ep.ep_fid.msg = fi_ibv_dgram_msg_ops; ++ } ++ ep->util_ep.ep_fid.rma = &fi_ibv_dgram_rma_ops; ++ ep->util_ep.ep_fid.cm = &fi_ibv_dgram_cm_ops; ++ break; ++ default: ++ VERBS_INFO(FI_LOG_DOMAIN, "Unknown EP type\n"); ++ ret = -FI_EINVAL; ++ assert(0); ++ goto err1; ++ } ++ ++ *ep_fid = &ep->util_ep.ep_fid; ++ ep->util_ep.ep_fid.fid.ops = &fi_ibv_ep_ops; ++ ep->util_ep.ep_fid.ops = &fi_ibv_ep_base_ops; ++ ++ return FI_SUCCESS; ++err2: ++ ep->ibv_qp = NULL; ++ rdma_destroy_ep(ep->id); ++err1: ++ fi_ibv_close_free_ep(ep); ++ return ret; ++} ++ ++static int fi_ibv_pep_bind(fid_t fid, struct fid *bfid, uint64_t flags) ++{ ++ struct fi_ibv_pep *pep; ++ int ret; ++ ++ pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); ++ if (bfid->fclass != FI_CLASS_EQ) ++ return -FI_EINVAL; ++ ++ pep->eq = container_of(bfid, struct fi_ibv_eq, eq_fid.fid); ++ /* ++ * This is a restrictive solution that enables an XRC EP to ++ * inform it's peer the port that should be used in making the ++ * reciprocal connection request. While it meets RXM requirements ++ * it limits an EQ to a single passive endpoint. TODO: implement ++ * a more general solution. ++ */ ++ if (fi_ibv_is_xrc(pep->info)) { ++ if (pep->eq->xrc.pep_port) { ++ VERBS_WARN(FI_LOG_EP_CTRL, ++ "XRC limits EQ binding to a single PEP\n"); ++ return -FI_EINVAL; ++ } ++ pep->eq->xrc.pep_port = ntohs(rdma_get_src_port(pep->id)); ++ } ++ ++ ret = rdma_migrate_id(pep->id, pep->eq->channel); ++ if (ret) ++ return -errno; ++ ++ return 0; ++} ++ ++static int fi_ibv_pep_control(struct fid *fid, int command, void *arg) ++{ ++ struct fi_ibv_pep *pep; ++ int ret = 0; ++ ++ switch (fid->fclass) { ++ case FI_CLASS_PEP: ++ pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); ++ switch (command) { ++ case FI_BACKLOG: ++ if (!arg) ++ return -FI_EINVAL; ++ pep->backlog = *(int *) arg; ++ break; ++ default: ++ ret = -FI_ENOSYS; ++ break; ++ } ++ break; ++ default: ++ ret = -FI_ENOSYS; ++ break; ++ } ++ ++ return ret; ++} ++ ++static int fi_ibv_pep_close(fid_t fid) ++{ ++ struct fi_ibv_pep *pep; ++ ++ pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); ++ if (pep->id) ++ rdma_destroy_ep(pep->id); ++ ++ fi_freeinfo(pep->info); ++ free(pep); ++ return 0; ++} ++ ++static struct fi_ops fi_ibv_pep_fi_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = fi_ibv_pep_close, ++ .bind = fi_ibv_pep_bind, ++ .control = fi_ibv_pep_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++static struct fi_ops_ep fi_ibv_pep_ops = { ++ .size = sizeof(struct fi_ops_ep), ++ .getopt = fi_ibv_ep_getopt, ++ .setopt = fi_no_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++int fi_ibv_passive_ep(struct fid_fabric *fabric, struct fi_info *info, ++ struct fid_pep **pep, void *context) ++{ ++ struct fi_ibv_pep *_pep; ++ int ret; ++ ++ _pep = calloc(1, sizeof *_pep); ++ if (!_pep) ++ return -FI_ENOMEM; ++ ++ if (!(_pep->info = fi_dupinfo(info))) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ ++ if (_pep->info->dest_addr || _pep->info->dest_addrlen) { ++ free(_pep->info->dest_addr); ++ _pep->info->dest_addr = NULL; ++ _pep->info->dest_addrlen = 0; ++ } ++ ++ ret = rdma_create_id(NULL, &_pep->id, &_pep->pep_fid.fid, RDMA_PS_TCP); ++ if (ret) { ++ VERBS_INFO(FI_LOG_DOMAIN, "Unable to create rdma_cm_id\n"); ++ goto err2; ++ } ++ ++ if (info->src_addr) { ++ ret = rdma_bind_addr(_pep->id, (struct sockaddr *)info->src_addr); ++ if (ret) { ++ VERBS_INFO(FI_LOG_DOMAIN, "Unable to bind address to rdma_cm_id\n"); ++ goto err3; ++ } ++ _pep->bound = 1; ++ } ++ ++ _pep->pep_fid.fid.fclass = FI_CLASS_PEP; ++ _pep->pep_fid.fid.context = context; ++ _pep->pep_fid.fid.ops = &fi_ibv_pep_fi_ops; ++ _pep->pep_fid.ops = &fi_ibv_pep_ops; ++ _pep->pep_fid.cm = fi_ibv_pep_ops_cm(_pep); ++ ++ _pep->src_addrlen = info->src_addrlen; ++ ++ *pep = &_pep->pep_fid; ++ return 0; ++ ++err3: ++ rdma_destroy_id(_pep->id); ++err2: ++ fi_freeinfo(_pep->info); ++err1: ++ free(_pep); ++ return ret; ++} ++ ++static struct fi_ops_ep fi_ibv_srq_ep_base_ops = { ++ .size = sizeof(struct fi_ops_ep), ++ .cancel = fi_no_cancel, ++ .getopt = fi_no_getopt, ++ .setopt = fi_no_setopt, ++ .tx_ctx = fi_no_tx_ctx, ++ .rx_ctx = fi_no_rx_ctx, ++ .rx_size_left = fi_no_rx_size_left, ++ .tx_size_left = fi_no_tx_size_left, ++}; ++ ++static struct fi_ops_cm fi_ibv_srq_cm_ops = { ++ .size = sizeof(struct fi_ops_cm), ++ .setname = fi_no_setname, ++ .getname = fi_no_getname, ++ .getpeer = fi_no_getpeer, ++ .connect = fi_no_connect, ++ .listen = fi_no_listen, ++ .accept = fi_no_accept, ++ .reject = fi_no_reject, ++ .shutdown = fi_no_shutdown, ++ .join = fi_no_join, ++}; ++ ++static struct fi_ops_rma fi_ibv_srq_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_no_rma_read, ++ .readv = fi_no_rma_readv, ++ .readmsg = fi_no_rma_readmsg, ++ .write = fi_no_rma_write, ++ .writev = fi_no_rma_writev, ++ .writemsg = fi_no_rma_writemsg, ++ .inject = fi_no_rma_inject, ++ .writedata = fi_no_rma_writedata, ++ .injectdata = fi_no_rma_injectdata, ++}; ++ ++static struct fi_ops_atomic fi_ibv_srq_atomic_ops = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = fi_no_atomic_write, ++ .writev = fi_no_atomic_writev, ++ .writemsg = fi_no_atomic_writemsg, ++ .inject = fi_no_atomic_inject, ++ .readwrite = fi_no_atomic_readwrite, ++ .readwritev = fi_no_atomic_readwritev, ++ .readwritemsg = fi_no_atomic_readwritemsg, ++ .compwrite = fi_no_atomic_compwrite, ++ .compwritev = fi_no_atomic_compwritev, ++ .compwritemsg = fi_no_atomic_compwritemsg, ++ .writevalid = fi_no_atomic_writevalid, ++ .readwritevalid = fi_no_atomic_readwritevalid, ++ .compwritevalid = fi_no_atomic_compwritevalid, ++}; ++ ++static inline ssize_t ++fi_ibv_srq_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct fi_ibv_srq_ep *ep = ++ container_of(ep_fid, struct fi_ibv_srq_ep, ep_fid); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .num_sge = msg->iov_count, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ assert(ep->srq); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_handle_post(ibv_post_srq_recv(ep->srq, &wr, &bad_wr)); ++} ++ ++static ssize_t ++fi_ibv_srq_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct fi_ibv_srq_ep *ep = ++ container_of(ep_fid, struct fi_ibv_srq_ep, ep_fid); ++ struct ibv_sge sge = fi_ibv_init_sge(buf, len, desc); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .num_sge = 1, ++ .sg_list = &sge, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ return fi_ibv_handle_post(ibv_post_srq_recv(ep->srq, &wr, &bad_wr)); ++} ++ ++static ssize_t ++fi_ibv_srq_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct fi_msg msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = src_addr, ++ .context = context, ++ }; ++ ++ return fi_ibv_srq_ep_recvmsg(ep_fid, &msg, 0); ++} ++ ++static struct fi_ops_msg fi_ibv_srq_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_ibv_srq_ep_recv, ++ .recvv = fi_ibv_srq_ep_recvv, ++ .recvmsg = fi_ibv_srq_ep_recvmsg, ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; ++ ++/* ++ * XRC SRQ semantics differ from basic SRQ semantics in that the SRQ not the ++ * QP selects which CQ will be used for receive completions. An artifact of ++ * this is that the XRC SRQ can not be created until a CQ is bound to the ++ * endpoint. This routine will be swapped out when the first endpoint bound ++ * to the shared receive context is enabled. ++ */ ++static ssize_t ++fi_ibv_xrc_srq_ep_prepost_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct fi_ibv_srq_ep *ep = ++ container_of(ep_fid, struct fi_ibv_srq_ep, ep_fid); ++ struct fi_ibv_xrc_srx_prepost *recv; ++ ssize_t ret; ++ ++ fastlock_acquire(&ep->xrc.prepost_lock); ++ ++ /* Handle race that can occur when SRQ is created and pre-post ++ * receive message function is swapped out. */ ++ if (ep->srq) { ++ fastlock_release(&ep->xrc.prepost_lock); ++ return fi_ibv_handle_post(fi_recv(ep_fid, buf, len, desc, ++ src_addr, context)); ++ } ++ ++ /* The only software error that can occur is overflow */ ++ if (OFI_UNLIKELY(ep->xrc.prepost_count >= ep->xrc.max_recv_wr)) { ++ ret = -FI_EAVAIL; ++ goto done; ++ } ++ ++ recv = calloc(1, sizeof(*recv)); ++ if (OFI_UNLIKELY(!recv)) { ++ ret = -FI_EAGAIN; ++ goto done; ++ } ++ ++ recv->buf = buf; ++ recv->desc = desc; ++ recv->src_addr = src_addr; ++ recv->len = len; ++ recv->context = context; ++ ep->xrc.prepost_count++; ++ slist_insert_tail(&recv->prepost_entry, &ep->xrc.prepost_list); ++ ret = FI_SUCCESS; ++done: ++ fastlock_release(&ep->xrc.prepost_lock); ++ return ret; ++} ++ ++static struct fi_ops_msg fi_ibv_xrc_srq_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_ibv_xrc_srq_ep_prepost_recv, ++ .recvv = fi_no_msg_recvv, /* Not used by RXM */ ++ .recvmsg = fi_no_msg_recvmsg, /* Not used by RXM */ ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; ++ ++static void fi_ibv_cleanup_prepost_bufs(struct fi_ibv_srq_ep *srq_ep) ++{ ++ struct fi_ibv_xrc_srx_prepost *recv; ++ struct slist_entry *entry; ++ ++ while (!slist_empty(&srq_ep->xrc.prepost_list)) { ++ entry = slist_remove_head(&srq_ep->xrc.prepost_list); ++ recv = container_of(entry, struct fi_ibv_xrc_srx_prepost, ++ prepost_entry); ++ free(recv); ++ } ++} ++ ++/* Must hold the associated CQ lock cq::xrc.srq_list_lock */ ++int fi_ibv_xrc_close_srq(struct fi_ibv_srq_ep *srq_ep) ++{ ++ int ret; ++ ++ assert(srq_ep->domain->use_xrc); ++ if (!srq_ep->xrc.cq || !srq_ep->srq) ++ return FI_SUCCESS; ++ ++ ret = ibv_destroy_srq(srq_ep->srq); ++ if (ret) { ++ VERBS_WARN(FI_LOG_EP_CTRL, "Cannot destroy SRQ rc=%d\n", ret); ++ return -ret; ++ } ++ srq_ep->srq = NULL; ++ srq_ep->xrc.cq = NULL; ++ dlist_remove(&srq_ep->xrc.srq_entry); ++ fi_ibv_cleanup_prepost_bufs(srq_ep); ++ ++ return FI_SUCCESS; ++} ++ ++static int fi_ibv_srq_close(fid_t fid) ++{ ++ struct fi_ibv_srq_ep *srq_ep = container_of(fid, struct fi_ibv_srq_ep, ++ ep_fid.fid); ++ int ret; ++ ++ if (srq_ep->domain->use_xrc) { ++ if (srq_ep->xrc.cq) { ++ fastlock_acquire(&srq_ep->xrc.cq->xrc.srq_list_lock); ++ ret = fi_ibv_xrc_close_srq(srq_ep); ++ fastlock_release(&srq_ep->xrc.cq->xrc.srq_list_lock); ++ if (ret) ++ goto err; ++ } ++ fastlock_destroy(&srq_ep->xrc.prepost_lock); ++ } else { ++ ret = ibv_destroy_srq(srq_ep->srq); ++ if (ret) ++ goto err; ++ } ++ free(srq_ep); ++ return FI_SUCCESS; ++ ++err: ++ VERBS_WARN(FI_LOG_EP_CTRL, "Cannot destroy SRQ rc=%d\n", ret); ++ return ret; ++} ++ ++static struct fi_ops fi_ibv_srq_ep_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = fi_ibv_srq_close, ++ .bind = fi_no_bind, ++ .control = fi_no_control, ++ .ops_open = fi_no_ops_open, ++}; ++ ++int fi_ibv_srq_context(struct fid_domain *domain, struct fi_rx_attr *attr, ++ struct fid_ep **srq_ep_fid, void *context) ++{ ++ struct ibv_srq_init_attr srq_init_attr = { 0 }; ++ struct fi_ibv_domain *dom; ++ struct fi_ibv_srq_ep *srq_ep; ++ int ret; ++ ++ if (!domain) ++ return -FI_EINVAL; ++ ++ srq_ep = calloc(1, sizeof(*srq_ep)); ++ if (!srq_ep) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ ++ dom = container_of(domain, struct fi_ibv_domain, ++ util_domain.domain_fid); ++ ++ srq_ep->ep_fid.fid.fclass = FI_CLASS_SRX_CTX; ++ srq_ep->ep_fid.fid.context = context; ++ srq_ep->ep_fid.fid.ops = &fi_ibv_srq_ep_ops; ++ srq_ep->ep_fid.ops = &fi_ibv_srq_ep_base_ops; ++ srq_ep->ep_fid.cm = &fi_ibv_srq_cm_ops; ++ srq_ep->ep_fid.rma = &fi_ibv_srq_rma_ops; ++ srq_ep->ep_fid.atomic = &fi_ibv_srq_atomic_ops; ++ srq_ep->domain = dom; ++ ++ /* XRC SRQ creation is delayed until the first endpoint it is bound ++ * to is enabled.*/ ++ if (dom->use_xrc) { ++ fastlock_init(&srq_ep->xrc.prepost_lock); ++ slist_init(&srq_ep->xrc.prepost_list); ++ dlist_init(&srq_ep->xrc.srq_entry); ++ srq_ep->xrc.max_recv_wr = attr->size; ++ srq_ep->xrc.max_sge = attr->iov_limit; ++ srq_ep->ep_fid.msg = &fi_ibv_xrc_srq_msg_ops; ++ goto done; ++ } ++ ++ srq_ep->ep_fid.msg = &fi_ibv_srq_msg_ops; ++ srq_init_attr.attr.max_wr = attr->size; ++ srq_init_attr.attr.max_sge = attr->iov_limit; ++ ++ srq_ep->srq = ibv_create_srq(dom->pd, &srq_init_attr); ++ if (!srq_ep->srq) { ++ VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_create_srq", errno); ++ ret = -errno; ++ goto err2; ++ } ++ ++done: ++ *srq_ep_fid = &srq_ep->ep_fid; ++ ++ return FI_SUCCESS; ++ ++err2: ++ /* Only basic SRQ can take this path */ ++ free(srq_ep); ++err1: ++ return ret; ++} ++ ++ ++#define fi_ibv_atomicvalid(name, flags) \ ++static int fi_ibv_msg_ep_atomic_ ## name(struct fid_ep *ep_fid, \ ++ enum fi_datatype datatype, \ ++ enum fi_op op, size_t *count) \ ++{ \ ++ struct fi_ibv_ep *ep = container_of(ep_fid, struct fi_ibv_ep, \ ++ util_ep.ep_fid); \ ++ struct fi_atomic_attr attr; \ ++ int ret; \ ++ \ ++ ret = fi_ibv_query_atomic(&ep->util_ep.domain->domain_fid, \ ++ datatype, op, &attr, flags); \ ++ if (!ret) \ ++ *count = attr.count; \ ++ return ret; \ ++} ++ ++fi_ibv_atomicvalid(writevalid, 0); ++fi_ibv_atomicvalid(readwritevalid, FI_FETCH_ATOMIC); ++fi_ibv_atomicvalid(compwritevalid, FI_COMPARE_ATOMIC); ++ ++int fi_ibv_query_atomic(struct fid_domain *domain_fid, enum fi_datatype datatype, ++ enum fi_op op, struct fi_atomic_attr *attr, ++ uint64_t flags) ++{ ++ struct fi_ibv_domain *domain = container_of(domain_fid, ++ struct fi_ibv_domain, ++ util_domain.domain_fid); ++ char *log_str_fetch = "fi_fetch_atomic with FI_SUM op"; ++ char *log_str_comp = "fi_compare_atomic"; ++ char *log_str; ++ ++ if (flags & FI_TAGGED) ++ return -FI_ENOSYS; ++ ++ if ((flags & FI_FETCH_ATOMIC) && (flags & FI_COMPARE_ATOMIC)) ++ return -FI_EBADFLAGS; ++ ++ if (!flags) { ++ switch (op) { ++ case FI_ATOMIC_WRITE: ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ } else { ++ if (flags & FI_FETCH_ATOMIC) { ++ switch (op) { ++ case FI_ATOMIC_READ: ++ goto check_datatype; ++ case FI_SUM: ++ log_str = log_str_fetch; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ } else if (flags & FI_COMPARE_ATOMIC) { ++ if (op != FI_CSWAP) ++ return -FI_ENOSYS; ++ log_str = log_str_comp; ++ } else { ++ return -FI_EBADFLAGS; ++ } ++ if (domain->info->tx_attr->op_flags & FI_INJECT) { ++ VERBS_INFO(FI_LOG_EP_DATA, ++ "FI_INJECT not supported for %s\n", log_str); ++ return -FI_EINVAL; ++ } ++ } ++check_datatype: ++ switch (datatype) { ++ case FI_INT64: ++ case FI_UINT64: ++#if __BITS_PER_LONG == 64 ++ case FI_DOUBLE: ++ case FI_FLOAT: ++#endif ++ break; ++ default: ++ return -FI_EINVAL; ++ } ++ ++ attr->size = ofi_datatype_size(datatype); ++ if (attr->size == 0) ++ return -FI_EINVAL; ++ ++ attr->count = 1; ++ return 0; ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)(uintptr_t)key, ++ .send_flags = VERBS_INJECT(ep, sizeof(uint64_t)) | ++ IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ if (OFI_UNLIKELY(op != FI_ATOMIC_WRITE)) ++ return -FI_ENOSYS; ++ ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, datatype, op, &count_copy); ++ if (ret) ++ return ret; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, sizeof(uint64_t), desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_writev(struct fid_ep *ep, ++ const struct fi_ioc *iov, void **desc, size_t count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ if (OFI_UNLIKELY(iov->count != 1)) ++ return -FI_E2BIG; ++ ++ return fi_ibv_msg_ep_atomic_write(ep, iov->addr, count, desc[0], ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(ep, flags, (uintptr_t)msg->context), ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, ++ .send_flags = VERBS_INJECT_FLAGS(ep, sizeof(uint64_t), flags) | ++ IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ if (OFI_UNLIKELY(msg->op != FI_ATOMIC_WRITE)) ++ return -FI_ENOSYS; ++ ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_RDMA_WRITE; ++ } ++ ++ return fi_ibv_send_buf(ep, &wr, msg->msg_iov->addr, sizeof(uint64_t), ++ msg->desc[0]); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, datatype, op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ switch (op) { ++ case FI_ATOMIC_READ: ++ wr.opcode = IBV_WR_RDMA_READ; ++ wr.wr.rdma.remote_addr = addr; ++ wr.wr.rdma.rkey = (uint32_t)(uintptr_t)key; ++ break; ++ case FI_SUM: ++ wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; ++ wr.wr.atomic.remote_addr = addr; ++ wr.wr.atomic.compare_add = (uintptr_t)buf; ++ wr.wr.atomic.swap = 0; ++ wr.wr.atomic.rkey = (uint32_t)(uintptr_t)key; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ return fi_ibv_send_buf(ep, &wr, result, sizeof(uint64_t), result_desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_readwritev(struct fid_ep *ep, const struct fi_ioc *iov, ++ void **desc, size_t count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ if (OFI_UNLIKELY(iov->count != 1)) ++ return -FI_E2BIG; ++ ++ return fi_ibv_msg_ep_atomic_readwrite(ep, iov->addr, count, ++ desc[0], resultv->addr, result_desc[0], ++ dest_addr, addr, key, datatype, op, context); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_readwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(ep, flags, (uintptr_t)msg->context), ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ switch (msg->op) { ++ case FI_ATOMIC_READ: ++ wr.opcode = IBV_WR_RDMA_READ; ++ wr.wr.rdma.remote_addr = msg->rma_iov->addr; ++ wr.wr.rdma.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; ++ break; ++ case FI_SUM: ++ wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; ++ wr.wr.atomic.remote_addr = msg->rma_iov->addr; ++ wr.wr.atomic.compare_add = (uintptr_t) msg->addr; ++ wr.wr.atomic.swap = 0; ++ wr.wr.atomic.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ if (flags & FI_REMOTE_CQ_DATA) ++ wr.imm_data = htonl((uint32_t) msg->data); ++ ++ return fi_ibv_send_buf(ep, &wr, resultv->addr, ++ sizeof(uint64_t), result_desc[0]); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, const void *compare, ++ void *compare_desc, void *result, ++ void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, ++ .wr.atomic.remote_addr = addr, ++ .wr.atomic.compare_add = (uintptr_t)compare, ++ .wr.atomic.swap = (uintptr_t)buf, ++ .wr.atomic.rkey = (uint32_t)(uintptr_t)key, ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, datatype, op, &count_copy); ++ if (ret) ++ return ret; ++ ++ return fi_ibv_send_buf(ep, &wr, result, sizeof(uint64_t), result_desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_compwritev(struct fid_ep *ep, const struct fi_ioc *iov, ++ void **desc, size_t count, ++ const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ if (OFI_UNLIKELY(iov->count != 1)) ++ return -FI_E2BIG; ++ ++ return fi_ibv_msg_ep_atomic_compwrite(ep, iov->addr, count, desc[0], ++ comparev->addr, compare_desc[0], resultv->addr, ++ result_desc[0], dest_addr, addr, key, ++ datatype, op, context); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_atomic_compwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(ep, flags, (uintptr_t)msg->context), ++ .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, ++ .wr.atomic.remote_addr = msg->rma_iov->addr, ++ .wr.atomic.compare_add = (uintptr_t)comparev->addr, ++ .wr.atomic.swap = (uintptr_t)msg->addr, ++ .wr.atomic.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ if (flags & FI_REMOTE_CQ_DATA) ++ wr.imm_data = htonl((uint32_t) msg->data); ++ ++ return fi_ibv_send_buf(ep, &wr, resultv->addr, sizeof(uint64_t), ++ result_desc[0]); ++} ++ ++struct fi_ops_atomic fi_ibv_msg_ep_atomic_ops = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = fi_ibv_msg_ep_atomic_write, ++ .writev = fi_ibv_msg_ep_atomic_writev, ++ .writemsg = fi_ibv_msg_ep_atomic_writemsg, ++ .inject = fi_no_atomic_inject, ++ .readwrite = fi_ibv_msg_ep_atomic_readwrite, ++ .readwritev = fi_ibv_msg_ep_atomic_readwritev, ++ .readwritemsg = fi_ibv_msg_ep_atomic_readwritemsg, ++ .compwrite = fi_ibv_msg_ep_atomic_compwrite, ++ .compwritev = fi_ibv_msg_ep_atomic_compwritev, ++ .compwritemsg = fi_ibv_msg_ep_atomic_compwritemsg, ++ .writevalid = fi_ibv_msg_ep_atomic_writevalid, ++ .readwritevalid = fi_ibv_msg_ep_atomic_readwritevalid, ++ .compwritevalid = fi_ibv_msg_ep_atomic_compwritevalid ++}; ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_write(struct fid_ep *ep_fid, const void *buf, ++ size_t count, void *desc, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key, enum fi_datatype datatype, enum fi_op op, ++ void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)(uintptr_t)key, ++ .send_flags = VERBS_INJECT(&ep->base_ep, sizeof(uint64_t)) | ++ IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ if (OFI_UNLIKELY(op != FI_ATOMIC_WRITE)) ++ return -FI_ENOSYS; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, datatype, op, &count_copy); ++ if (ret) ++ return ret; ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, sizeof(uint64_t), desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(&ep->base_ep, flags, ++ (uintptr_t)msg->context), ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, ++ .send_flags = VERBS_INJECT_FLAGS(&ep->base_ep, ++ sizeof(uint64_t), flags) | IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ if (OFI_UNLIKELY(msg->op != FI_ATOMIC_WRITE)) ++ return -FI_ENOSYS; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_RDMA_WRITE; ++ } ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, msg->msg_iov->addr, ++ sizeof(uint64_t), msg->desc[0]); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, ++ size_t count, void *desc, void *result, void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, enum fi_op op, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, datatype, op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ switch (op) { ++ case FI_ATOMIC_READ: ++ wr.opcode = IBV_WR_RDMA_READ; ++ wr.wr.rdma.remote_addr = addr; ++ wr.wr.rdma.rkey = (uint32_t)(uintptr_t)key; ++ break; ++ case FI_SUM: ++ wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; ++ wr.wr.atomic.remote_addr = addr; ++ wr.wr.atomic.compare_add = (uintptr_t)buf; ++ wr.wr.atomic.swap = 0; ++ wr.wr.atomic.rkey = (uint32_t)(uintptr_t)key; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, result, ++ sizeof(uint64_t), result_desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_readwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ struct fi_ioc *resultv, void **result_desc, ++ size_t result_count, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(&ep->base_ep, flags, ++ (uintptr_t)msg->context), ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ switch (msg->op) { ++ case FI_ATOMIC_READ: ++ wr.opcode = IBV_WR_RDMA_READ; ++ wr.wr.rdma.remote_addr = msg->rma_iov->addr; ++ wr.wr.rdma.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; ++ break; ++ case FI_SUM: ++ wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; ++ wr.wr.atomic.remote_addr = msg->rma_iov->addr; ++ wr.wr.atomic.compare_add = (uintptr_t) msg->addr; ++ wr.wr.atomic.swap = 0; ++ wr.wr.atomic.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; ++ break; ++ default: ++ return -FI_ENOSYS; ++ } ++ ++ if (flags & FI_REMOTE_CQ_DATA) ++ wr.imm_data = htonl((uint32_t) msg->data); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, resultv->addr, ++ sizeof(uint64_t), result_desc[0]); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, size_t count, ++ void *desc, const void *compare, ++ void *compare_desc, void *result, ++ void *result_desc, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key, ++ enum fi_datatype datatype, ++ enum fi_op op, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, ++ .wr.atomic.remote_addr = addr, ++ .wr.atomic.compare_add = (uintptr_t)compare, ++ .wr.atomic.swap = (uintptr_t)buf, ++ .wr.atomic.rkey = (uint32_t)(uintptr_t)key, ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(count != 1)) ++ return -FI_E2BIG; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = count; ++ ++ ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, datatype, op, &count_copy); ++ if (ret) ++ return ret; ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, result, ++ sizeof(uint64_t), result_desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_atomic_compwritemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_atomic *msg, ++ const struct fi_ioc *comparev, ++ void **compare_desc, size_t compare_count, ++ struct fi_ioc *resultv, ++ void **result_desc, size_t result_count, ++ uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_FLAGS(&ep->base_ep, flags, ++ (uintptr_t)msg->context), ++ .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, ++ .wr.atomic.remote_addr = msg->rma_iov->addr, ++ .wr.atomic.compare_add = (uintptr_t)comparev->addr, ++ .wr.atomic.swap = (uintptr_t)msg->addr, ++ .wr.atomic.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, ++ .send_flags = IBV_SEND_FENCE, ++ }; ++ size_t count_copy; ++ int ret; ++ ++ if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) ++ return -FI_E2BIG; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ count_copy = msg->iov_count; ++ ++ ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, msg->datatype, msg->op, ++ &count_copy); ++ if (ret) ++ return ret; ++ ++ if (flags & FI_REMOTE_CQ_DATA) ++ wr.imm_data = htonl((uint32_t) msg->data); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, resultv->addr, ++ sizeof(uint64_t), result_desc[0]); ++} ++ ++struct fi_ops_atomic fi_ibv_msg_xrc_ep_atomic_ops = { ++ .size = sizeof(struct fi_ops_atomic), ++ .write = fi_ibv_msg_xrc_ep_atomic_write, ++ .writev = fi_ibv_msg_ep_atomic_writev, ++ .writemsg = fi_ibv_msg_xrc_ep_atomic_writemsg, ++ .inject = fi_no_atomic_inject, ++ .readwrite = fi_ibv_msg_xrc_ep_atomic_readwrite, ++ .readwritev = fi_ibv_msg_ep_atomic_readwritev, ++ .readwritemsg = fi_ibv_msg_xrc_ep_atomic_readwritemsg, ++ .compwrite = fi_ibv_msg_xrc_ep_atomic_compwrite, ++ .compwritev = fi_ibv_msg_ep_atomic_compwritev, ++ .compwritemsg = fi_ibv_msg_xrc_ep_atomic_compwritemsg, ++ .writevalid = fi_ibv_msg_ep_atomic_writevalid, ++ .readwritevalid = fi_ibv_msg_ep_atomic_readwritevalid, ++ .compwritevalid = fi_ibv_msg_ep_atomic_compwritevalid ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_eq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_eq.c +index 911dc955f..157ccc333 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_eq.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_eq.c +@@ -1,5 +1,6 @@ + /* + * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. ++ * Copyright (c) 2018 Cray Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU +@@ -52,32 +53,92 @@ static ssize_t + fi_ibv_eq_readerr(struct fid_eq *eq, struct fi_eq_err_entry *entry, + uint64_t flags) + { +- struct fi_ibv_eq *_eq; +- uint32_t api_version; +- void *err_data = NULL; +- size_t err_data_size = 0; ++ struct fi_ibv_eq *_eq = ++ container_of(eq, struct fi_ibv_eq, eq_fid.fid); ++ ofi_eq_handle_err_entry(_eq->fab->util_fabric.fabric_fid.api_version, ++ flags, &_eq->err, entry); ++ return sizeof(*entry); ++} + +- _eq = container_of(eq, struct fi_ibv_eq, eq_fid.fid); +- if (!_eq->err.err) +- return 0; ++void fi_ibv_eq_set_xrc_conn_tag(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_eq *eq = ep->base_ep.eq; + +- api_version = _eq->fab->util_fabric.fabric_fid.api_version; ++ fastlock_acquire(&eq->lock); ++ ep->conn_setup->conn_tag = ++ (uint32_t)ofi_idx2key(&eq->xrc.conn_key_idx, ++ ofi_idx_insert(eq->xrc.conn_key_map, ep)); ++ fastlock_release(&eq->lock); ++} + +- if ((FI_VERSION_GE(api_version, FI_VERSION(1, 5))) +- && entry->err_data && entry->err_data_size) { +- err_data_size = MIN(entry->err_data_size, _eq->err.err_data_size); +- err_data = _eq->err.err_data; +- } ++void fi_ibv_eq_clear_xrc_conn_tag(struct fi_ibv_xrc_ep *ep) ++{ ++ struct fi_ibv_eq *eq = ep->base_ep.eq; ++ int index; + +- *entry = _eq->err; +- if (err_data) { +- memcpy(entry->err_data, err_data, err_data_size); +- entry->err_data_size = err_data_size; +- } ++ fastlock_acquire(&eq->lock); ++ index = ofi_key2idx(&eq->xrc.conn_key_idx, ++ (uint64_t)ep->conn_setup->conn_tag); ++ if (!ofi_idx_is_valid(eq->xrc.conn_key_map, index)) ++ VERBS_WARN(FI_LOG_EQ, "Invalid XRC connection connection tag\n"); ++ else ++ ofi_idx_remove(eq->xrc.conn_key_map, index); ++ ep->conn_setup->conn_tag = 0; ++ fastlock_release(&eq->lock); ++} + +- _eq->err.err = 0; +- _eq->err.prov_errno = 0; +- return sizeof(*entry); ++struct fi_ibv_xrc_ep *fi_ibv_eq_xrc_conn_tag2ep(struct fi_ibv_eq *eq, ++ uint32_t conn_tag) ++{ ++ struct fi_ibv_xrc_ep *ep; ++ int index; ++ ++ fastlock_acquire(&eq->lock); ++ index = ofi_key2idx(&eq->xrc.conn_key_idx, (uint64_t)conn_tag); ++ ep = ofi_idx_lookup(eq->xrc.conn_key_map, index); ++ if (!ep) ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Invalid XRC connection tag\n"); ++ fastlock_release(&eq->lock); ++ ++ return ep; ++} ++ ++static int fi_ibv_eq_set_xrc_info(struct rdma_cm_event *event, ++ struct fi_ibv_xrc_conn_info *info) ++{ ++ struct fi_ibv_xrc_cm_data *remote = (struct fi_ibv_xrc_cm_data *) ++ event->param.conn.private_data; ++ int ret; ++ ++ ret = fi_ibv_verify_xrc_cm_data(remote, ++ event->param.conn.private_data_len); ++ if (ret) ++ return ret; ++ ++ info->is_reciprocal = remote->reciprocal; ++ info->conn_tag = ntohl(remote->conn_tag); ++ info->port = ntohs(remote->port); ++ info->conn_data = ntohl(remote->param); ++ info->conn_param = event->param.conn; ++ info->conn_param.private_data = NULL; ++ info->conn_param.private_data_len = 0; ++ ++ return FI_SUCCESS; ++} ++ ++static int ++fi_ibv_pep_dev_domain_match(struct fi_info *hints, const char *devname) ++{ ++ int ret; ++ ++ if ((FI_IBV_EP_PROTO(hints)) == FI_PROTO_RDMA_CM_IB_XRC) ++ ret = fi_ibv_cmp_xrc_domain_name(hints->domain_attr->name, ++ devname); ++ else ++ ret = strcmp(hints->domain_attr->name, devname); ++ ++ return ret; + } + + static int +@@ -102,7 +163,7 @@ fi_ibv_eq_cm_getinfo(struct fi_ibv_fabric *fab, struct rdma_cm_event *event, + if (!(hints->domain_attr->name = strdup(devname))) + goto err1; + } else { +- if (strcmp(hints->domain_attr->name, devname)) { ++ if (fi_ibv_pep_dev_domain_match(hints, devname)) { + VERBS_WARN(FI_LOG_EQ, "Passive endpoint domain: %s does" + " not match device: %s where we got a " + "connection request\n", +@@ -144,9 +205,20 @@ fi_ibv_eq_cm_getinfo(struct fi_ibv_fabric *fab, struct rdma_cm_event *event, + + connreq->handle.fclass = FI_CLASS_CONNREQ; + connreq->id = event->id; ++ ++ if (fi_ibv_is_xrc(*info)) { ++ connreq->is_xrc = 1; ++ ret = fi_ibv_eq_set_xrc_info(event, &connreq->xrc); ++ if (ret) ++ goto err3; ++ } ++ + (*info)->handle = &connreq->handle; + fi_freeinfo(hints); + return 0; ++ ++err3: ++ free(connreq); + err2: + fi_freeinfo(*info); + err1: +@@ -154,20 +226,268 @@ err1: + return ret; + } + ++static inline int fi_ibv_eq_copy_event_data(struct fi_eq_cm_entry *entry, ++ size_t max_dest_len, const void *priv_data, ++ size_t priv_datalen) ++{ ++ const struct fi_ibv_cm_data_hdr *cm_hdr = priv_data; ++ ++ size_t datalen = MIN(max_dest_len - sizeof(*entry), cm_hdr->size); ++ if (datalen) ++ memcpy(entry->data, cm_hdr->data, datalen); ++ ++ return datalen; ++} ++ ++static void fi_ibv_eq_skip_xrc_cm_data(const void **priv_data, ++ size_t *priv_data_len) ++{ ++ const struct fi_ibv_xrc_cm_data *cm_data = *priv_data; ++ ++ if (*priv_data_len > sizeof(*cm_data)) { ++ *priv_data = (cm_data + 1); ++ *priv_data_len -= sizeof(*cm_data); ++ } ++} ++ ++static int ++fi_ibv_eq_xrc_connreq_event(struct fi_ibv_eq *eq, struct fi_eq_cm_entry *entry, ++ const void **priv_data, size_t *priv_datalen) ++{ ++ struct fi_ibv_connreq *connreq = container_of(entry->info->handle, ++ struct fi_ibv_connreq, handle); ++ struct fi_ibv_xrc_ep *ep; ++ struct fi_ibv_xrc_cm_data cm_data; ++ int ret; ++ ++ if (!connreq->xrc.is_reciprocal) { ++ fi_ibv_eq_skip_xrc_cm_data(priv_data, priv_datalen); ++ return FI_SUCCESS; ++ } ++ ++ /* ++ * Reciprocal connections are initiated and handled internally by ++ * the provider, get the endpoint that issued the original connection ++ * request. ++ */ ++ ep = fi_ibv_eq_xrc_conn_tag2ep(eq, connreq->xrc.conn_tag); ++ if (!ep) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Reciprocal XRC connection tag not found\n"); ++ goto send_reject; ++ } ++ ep->tgt_id = connreq->id; ++ ep->tgt_id->context = &ep->base_ep.util_ep.ep_fid.fid; ++ ep->base_ep.info->handle = entry->info->handle; ++ ++ ret = rdma_migrate_id(ep->tgt_id, ep->base_ep.eq->channel); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, "Could not migrate CM ID\n"); ++ goto send_reject; ++ } ++ ++ ret = fi_ibv_accept_xrc(ep, FI_IBV_RECIP_CONN, &cm_data, ++ sizeof(cm_data)); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Reciprocal XRC Accept failed %d\n", ret); ++ goto send_reject; ++ } ++ /* Event is handled internally and not passed to the application */ ++ return -FI_EAGAIN; ++ ++send_reject: ++ if (rdma_reject(connreq->id, *priv_data, *priv_datalen)) ++ VERBS_WARN(FI_LOG_FABRIC, "rdma_reject %d\n", -errno); ++ return -FI_EAGAIN; ++} ++ ++static int ++fi_ibv_eq_xrc_conn_event(struct fi_ibv_xrc_ep *ep, ++ struct rdma_cm_event *cma_event, ++ struct fi_eq_cm_entry *entry) ++{ ++ struct fi_ibv_xrc_conn_info xrc_info; ++ struct fi_ibv_xrc_cm_data cm_data; ++ const void *priv_data = cma_event->param.conn.private_data; ++ size_t priv_datalen = cma_event->param.conn.private_data_len; ++ int ret; ++ ++ VERBS_DBG(FI_LOG_FABRIC, "EP %p INITIAL CONNECTION DONE state %d\n", ++ ep, ep->conn_state); ++ fi_ibv_next_xrc_conn_state(ep); ++ ++ /* ++ * Original application initiated connect is done, if the passive ++ * side of that connection initiate the reciprocal connection request ++ * to create bidirectional connectivity. ++ */ ++ if (priv_data) { ++ ret = fi_ibv_eq_set_xrc_info(cma_event, &xrc_info); ++ if (ret) { ++ fi_ibv_prev_xrc_conn_state(ep); ++ rdma_disconnect(ep->base_ep.id); ++ goto err; ++ } ++ ep->peer_srqn = xrc_info.conn_data; ++ fi_ibv_ep_ini_conn_done(ep, xrc_info.conn_data, ++ xrc_info.conn_param.qp_num); ++ fi_ibv_eq_skip_xrc_cm_data(&priv_data, &priv_datalen); ++ fi_ibv_save_priv_data(ep, priv_data, priv_datalen); ++ } else { ++ fi_ibv_ep_tgt_conn_done(ep); ++ ret = fi_ibv_connect_xrc(ep, NULL, FI_IBV_RECIP_CONN, &cm_data, ++ sizeof(cm_data)); ++ if (ret) { ++ fi_ibv_prev_xrc_conn_state(ep); ++ rdma_disconnect(ep->tgt_id); ++ goto err; ++ } ++ } ++err: ++ entry->info = NULL; ++ /* Event is handled internally and not passed to the application */ ++ return -FI_EAGAIN; ++} ++ ++static size_t ++fi_ibv_eq_xrc_recip_conn_event(struct fi_ibv_eq *eq, ++ struct fi_ibv_xrc_ep *ep, ++ struct rdma_cm_event *cma_event, ++ struct fi_eq_cm_entry *entry, size_t len) ++{ ++ fid_t fid = cma_event->id->context; ++ struct fi_ibv_xrc_conn_info xrc_info; ++ int ret; ++ ++ fi_ibv_next_xrc_conn_state(ep); ++ VERBS_DBG(FI_LOG_FABRIC, "EP %p RECIPROCAL CONNECTION DONE state %d\n", ++ ep, ep->conn_state); ++ ++ /* If this is the reciprocal active side notification */ ++ if (cma_event->param.conn.private_data) { ++ ret = fi_ibv_eq_set_xrc_info(cma_event, &xrc_info); ++ if (ret) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Reciprocal connection protocol mismatch\n"); ++ eq->err.err = -ret; ++ eq->err.prov_errno = ret; ++ eq->err.fid = fid; ++ return -FI_EAVAIL; ++ } ++ ++ ep->peer_srqn = xrc_info.conn_data; ++ fi_ibv_ep_ini_conn_done(ep, xrc_info.conn_data, ++ xrc_info.conn_param.qp_num); ++ } else { ++ fi_ibv_ep_tgt_conn_done(ep); ++ } ++ ++ /* The internal reciprocal XRC connection has completed. Return the ++ * CONNECTED event application data associated with the original ++ * connection. */ ++ entry->fid = fid; ++ len = fi_ibv_eq_copy_event_data(entry, len, ++ ep->conn_setup->event_data, ++ ep->conn_setup->event_len); ++ entry->info = NULL; ++ return sizeof(*entry) + len; ++} ++ ++static int ++fi_ibv_eq_xrc_rej_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event) ++{ ++ struct fi_ibv_xrc_ep *ep; ++ fid_t fid = cma_event->id->context; ++ struct fi_ibv_xrc_conn_info xrc_info; ++ enum fi_ibv_xrc_ep_conn_state state; ++ ++ ep = container_of(fid, struct fi_ibv_xrc_ep, base_ep.util_ep.ep_fid); ++ state = ep->conn_state; ++ ++ if (ep->base_ep.id != cma_event->id || state == FI_IBV_XRC_CONNECTED) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "Stale CM Reject %d received\n", cma_event->status); ++ return -FI_EAGAIN; ++ } ++ ++ /* If reject comes from remote provider peer */ ++ if (cma_event->status == FI_IBV_CM_REJ_CONSUMER_DEFINED) { ++ if (cma_event->param.conn.private_data_len && ++ fi_ibv_eq_set_xrc_info(cma_event, &xrc_info)) { ++ VERBS_WARN(FI_LOG_FABRIC, ++ "CM REJ private data not valid\n"); ++ return -FI_EAGAIN; ++ } ++ ++ fi_ibv_ep_ini_conn_rejected(ep); ++ return FI_SUCCESS; ++ } ++ ++ VERBS_WARN(FI_LOG_FABRIC, "Non-application generated CM Reject %d\n", ++ cma_event->status); ++ if (cma_event->param.conn.private_data_len) ++ VERBS_WARN(FI_LOG_FABRIC, "Unexpected CM Reject priv_data\n"); ++ ++ fi_ibv_ep_ini_conn_rejected(ep); ++ ++ return state == FI_IBV_XRC_ORIG_CONNECTING ? FI_SUCCESS : -FI_EAGAIN; ++} ++ ++static inline int ++fi_ibv_eq_xrc_connected_event(struct fi_ibv_eq *eq, ++ struct rdma_cm_event *cma_event, ++ struct fi_eq_cm_entry *entry, size_t len, ++ int *acked) ++{ ++ struct fi_ibv_xrc_ep *ep; ++ fid_t fid = cma_event->id->context; ++ int ret; ++ ++ ep = container_of(fid, struct fi_ibv_xrc_ep, base_ep.util_ep.ep_fid); ++ ++ assert(ep->conn_state == FI_IBV_XRC_ORIG_CONNECTING || ++ ep->conn_state == FI_IBV_XRC_RECIP_CONNECTING); ++ ++ if (ep->conn_state == FI_IBV_XRC_ORIG_CONNECTING) ++ return fi_ibv_eq_xrc_conn_event(ep, cma_event, entry); ++ ++ ret = fi_ibv_eq_xrc_recip_conn_event(eq, ep, cma_event, entry, len); ++ ++ /* Bidirectional connection setup is complete, destroy RDMA CM ++ * ID(s) since RDMA CM is used for connection setup only */ ++ *acked = 1; ++ rdma_ack_cm_event(cma_event); ++ ++ /* TODO: Ultimately we will want to initiate freeing of the connection ++ * resources here with fi_ibv_free_xrc_conn_setup(ep); however, timewait ++ * issues in larger fabrics need to be resolved first. The resources ++ * will be freed at EP close if not freed here */ ++ ++ return ret; ++} ++ + static ssize_t +-fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event, +- uint32_t *event, struct fi_eq_cm_entry *entry, size_t len) ++fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, ++ struct rdma_cm_event *cma_event, uint32_t *event, ++ struct fi_eq_cm_entry *entry, size_t len, int *acked) + { +- struct fi_ibv_pep *pep; +- fid_t fid; +- size_t datalen; ++ const struct fi_ibv_cm_data_hdr *cm_hdr; ++ size_t datalen = 0; ++ size_t priv_datalen = cma_event->param.conn.private_data_len; ++ const void *priv_data = cma_event->param.conn.private_data; + int ret; ++ fid_t fid = cma_event->id->context; ++ struct fi_ibv_pep *pep = ++ container_of(fid, struct fi_ibv_pep, pep_fid); ++ struct fi_ibv_ep *ep; ++ ++ *acked = 0; + +- fid = cma_event->id->context; +- pep = container_of(fid, struct fi_ibv_pep, pep_fid); + switch (cma_event->event) { + case RDMA_CM_EVENT_CONNECT_REQUEST: + *event = FI_CONNREQ; ++ + ret = fi_ibv_eq_cm_getinfo(eq->fab, cma_event, pep->info, &entry->info); + if (ret) { + rdma_destroy_id(cma_event->id); +@@ -177,18 +497,34 @@ fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event + eq->err.prov_errno = ret; + goto err; + } ++ ++ if (fi_ibv_is_xrc(entry->info)) { ++ ret = fi_ibv_eq_xrc_connreq_event(eq, entry, &priv_data, ++ &priv_datalen); ++ if (ret == -FI_EAGAIN) ++ return ret; ++ } + break; + case RDMA_CM_EVENT_ESTABLISHED: + *event = FI_CONNECTED; +- entry->info = NULL; +- if (cma_event->id->qp->context->device->transport_type != ++ ++ if (cma_event->id->qp && ++ cma_event->id->qp->context->device->transport_type != + IBV_TRANSPORT_IWARP) { + ret = fi_ibv_set_rnr_timer(cma_event->id->qp); + if (ret) + return ret; + } ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid); ++ if (fi_ibv_is_xrc(ep->info)) ++ return fi_ibv_eq_xrc_connected_event(eq, cma_event, ++ entry, len, acked); ++ entry->info = NULL; + break; + case RDMA_CM_EVENT_DISCONNECTED: ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid); ++ if (fi_ibv_is_xrc(ep->info)) ++ return -FI_EAGAIN; + *event = FI_SHUTDOWN; + entry->info = NULL; + break; +@@ -199,8 +535,29 @@ fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event + eq->err.err = -cma_event->status; + goto err; + case RDMA_CM_EVENT_REJECTED: ++ ep = container_of(fid, struct fi_ibv_ep, util_ep.ep_fid); ++ if (fi_ibv_is_xrc(ep->info)) { ++ ret = fi_ibv_eq_xrc_rej_event(eq, cma_event); ++ if (ret == -FI_EAGAIN) ++ return ret; ++ fi_ibv_eq_skip_xrc_cm_data(&priv_data, &priv_datalen); ++ } + eq->err.err = ECONNREFUSED; + eq->err.prov_errno = -cma_event->status; ++ if (eq->err.err_data) { ++ free(eq->err.err_data); ++ eq->err.err_data = NULL; ++ eq->err.err_data_size = 0; ++ } ++ if (priv_datalen) { ++ cm_hdr = priv_data; ++ eq->err.err_data = calloc(1, cm_hdr->size); ++ if (OFI_LIKELY(eq->err.err_data != NULL)) { ++ memcpy(eq->err.err_data, cm_hdr->data, ++ cm_hdr->size); ++ eq->err.err_data_size = cm_hdr->size; ++ } ++ } + goto err; + case RDMA_CM_EVENT_DEVICE_REMOVAL: + eq->err.err = ENODEV; +@@ -213,9 +570,11 @@ fi_ibv_eq_cm_process_event(struct fi_ibv_eq *eq, struct rdma_cm_event *cma_event + } + + entry->fid = fid; +- datalen = MIN(len - sizeof(*entry), cma_event->param.conn.private_data_len); +- if (datalen) +- memcpy(entry->data, cma_event->param.conn.private_data, datalen); ++ ++ /* rdmacm has no way to track how much data is sent by peer */ ++ if (priv_datalen) ++ datalen = fi_ibv_eq_copy_event_data(entry, len, priv_data, ++ priv_datalen); + return sizeof(*entry) + datalen; + err: + eq->err.fid = fid; +@@ -223,7 +582,7 @@ err: + } + + ssize_t fi_ibv_eq_write_event(struct fi_ibv_eq *eq, uint32_t event, +- const void *buf, size_t len) ++ const void *buf, size_t len) + { + struct fi_ibv_eq_entry *entry; + +@@ -292,6 +651,7 @@ fi_ibv_eq_read(struct fid_eq *eq_fid, uint32_t *event, + struct fi_ibv_eq *eq; + struct rdma_cm_event *cma_event; + ssize_t ret = 0; ++ int acked; + + eq = container_of(eq_fid, struct fi_ibv_eq, eq_fid.fid); + +@@ -306,20 +666,23 @@ fi_ibv_eq_read(struct fid_eq *eq_fid, uint32_t *event, + if (ret) + return -errno; + ++ acked = 0; + if (len < sizeof(struct fi_eq_cm_entry)) { + ret = -FI_ETOOSMALL; + goto ack; + } + + ret = fi_ibv_eq_cm_process_event(eq, cma_event, event, +- (struct fi_eq_cm_entry *)buf, len); ++ (struct fi_eq_cm_entry *)buf, len, &acked); + if (ret < 0) + goto ack; + + if (flags & FI_PEEK) + ret = fi_ibv_eq_write_event(eq, *event, buf, len); + ack: +- rdma_ack_cm_event(cma_event); ++ if (!acked) ++ rdma_ack_cm_event(cma_event); ++ + return ret; + } + +@@ -410,6 +773,9 @@ static int fi_ibv_eq_close(fid_t fid) + } + + dlistfd_head_free(&eq->list_head); ++ ++ ofi_idx_reset(eq->xrc.conn_key_map); ++ free(eq->xrc.conn_key_map); + fastlock_destroy(&eq->lock); + free(eq); + +@@ -438,6 +804,12 @@ int fi_ibv_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, + _eq->fab = container_of(fabric, struct fi_ibv_fabric, + util_fabric.fabric_fid); + ++ ofi_key_idx_init(&_eq->xrc.conn_key_idx, VERBS_TAG_INDEX_BITS); ++ _eq->xrc.conn_key_map = calloc(1, sizeof(*_eq->xrc.conn_key_map)); ++ if (!_eq->xrc.conn_key_map) { ++ ret = -ENOMEM; ++ goto err0; ++ } + fastlock_init(&_eq->lock); + ret = dlistfd_head_init(&_eq->list_head); + if (ret) { +@@ -502,6 +874,8 @@ err2: + dlistfd_head_free(&_eq->list_head); + err1: + fastlock_destroy(&_eq->lock); ++ free(_eq->xrc.conn_key_map); ++err0: + free(_eq); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_info.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_info.c +index 65ebdc0e9..0aaae6494 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_info.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_info.c +@@ -34,9 +34,9 @@ + + #include + #include ++#include + + #include "fi_verbs.h" +-#include "ep_rdm/verbs_rdm.h" + + + #define VERBS_IB_PREFIX "IB-0x" +@@ -47,23 +47,15 @@ + #define VERBS_MSG_CAPS (FI_MSG | FI_RMA | FI_ATOMICS | FI_READ | FI_WRITE | \ + FI_SEND | FI_RECV | FI_REMOTE_READ | FI_REMOTE_WRITE | \ + VERBS_DOMAIN_CAPS) +-#define VERBS_RDM_CAPS (FI_MSG | FI_RMA | FI_TAGGED | FI_READ | FI_WRITE | \ +- FI_RECV | FI_MULTI_RECV | FI_SEND | FI_REMOTE_READ | \ +- FI_REMOTE_WRITE | VERBS_DOMAIN_CAPS) + #define VERBS_DGRAM_CAPS (FI_MSG | FI_RECV | FI_SEND | VERBS_DOMAIN_CAPS) + +-#define VERBS_RDM_MODE (FI_CONTEXT) ++#define VERBS_DGRAM_RX_MODE (FI_MSG_PREFIX) + + #define VERBS_TX_OP_FLAGS (FI_INJECT | FI_COMPLETION | FI_TRANSMIT_COMPLETE) + #define VERBS_TX_OP_FLAGS_IWARP (FI_INJECT | FI_COMPLETION) +-#define VERBS_TX_OP_FLAGS_IWARP_RDM (VERBS_TX_OP_FLAGS) +- +-#define VERBS_TX_RDM_MODE VERBS_RDM_MODE + + #define VERBS_RX_MODE (FI_RX_CQ_DATA) + +-#define VERBS_RX_RDM_OP_FLAGS (FI_COMPLETION) +- + #define VERBS_MSG_ORDER (FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_RAS | \ + FI_ORDER_WAW | FI_ORDER_WAS | FI_ORDER_SAW | FI_ORDER_SAS ) + +@@ -92,8 +84,9 @@ const struct fi_domain_attr verbs_domain_attr = { + .max_ep_tx_ctx = 1, + .max_ep_rx_ctx = 1, + .mr_iov_limit = VERBS_MR_IOV_LIMIT, +- /* max_err_data is size of ibv_wc::vendor_err for CQ, 0 - for EQ */ +- .max_err_data = sizeof_field(struct ibv_wc, vendor_err), ++ /* max_err_data is size of ibv_wc::vendor_err for CQ, UINT8_MAX - for EQ */ ++ .max_err_data = MAX(sizeof_field(struct ibv_wc, vendor_err), ++ UINT8_MAX), + }; + + const struct fi_ep_attr verbs_ep_attr = { +@@ -112,12 +105,11 @@ const struct fi_rx_attr verbs_rx_attr = { + .total_buffered_recv = 0, + }; + +-const struct fi_rx_attr verbs_rdm_rx_attr = { +- .mode = VERBS_RDM_MODE | VERBS_RX_MODE, +- .op_flags = VERBS_RX_RDM_OP_FLAGS, ++const struct fi_rx_attr verbs_dgram_rx_attr = { ++ .mode = VERBS_DGRAM_RX_MODE | VERBS_RX_MODE, + .msg_order = VERBS_MSG_ORDER, ++ .comp_order = FI_ORDER_STRICT | FI_ORDER_DATA, + .total_buffered_recv = 0, +- .iov_limit = 1 + }; + + const struct fi_tx_attr verbs_tx_attr = { +@@ -129,38 +121,36 @@ const struct fi_tx_attr verbs_tx_attr = { + .rma_iov_limit = 1, + }; + +-const struct fi_tx_attr verbs_rdm_tx_attr = { +- .mode = VERBS_TX_RDM_MODE, ++const struct fi_tx_attr verbs_dgram_tx_attr = { ++ .mode = 0, + .op_flags = VERBS_TX_OP_FLAGS, + .msg_order = VERBS_MSG_ORDER, +- .inject_size = FI_IBV_RDM_DFLT_BUFFERED_SIZE, ++ .comp_order = FI_ORDER_STRICT, ++ .inject_size = 0, + .rma_iov_limit = 1, + }; + + const struct verbs_ep_domain verbs_msg_domain = { + .suffix = "", + .type = FI_EP_MSG, ++ .protocol = FI_PROTO_UNSPEC, + .caps = VERBS_MSG_CAPS, + }; + +-const struct verbs_ep_domain verbs_rdm_domain = { +- .suffix = "-rdm", +- .type = FI_EP_RDM, +- .caps = VERBS_RDM_CAPS, ++const struct verbs_ep_domain verbs_msg_xrc_domain = { ++ .suffix = "-xrc", ++ .type = FI_EP_MSG, ++ .protocol = FI_PROTO_RDMA_CM_IB_XRC, ++ .caps = VERBS_MSG_CAPS, + }; + + const struct verbs_ep_domain verbs_dgram_domain = { + .suffix = "-dgram", + .type = FI_EP_DGRAM, ++ .protocol = FI_PROTO_UNSPEC, + .caps = VERBS_DGRAM_CAPS, + }; + +-struct fi_ibv_rdm_sysaddr +-{ +- struct sockaddr_in addr; +- int is_found; +-}; +- + int fi_ibv_check_ep_attr(const struct fi_info *hints, + const struct fi_info *info) + { +@@ -177,10 +167,9 @@ int fi_ibv_check_ep_attr(const struct fi_info *hints, + switch (hints->ep_attr->protocol) { + case FI_PROTO_UNSPEC: + case FI_PROTO_RDMA_CM_IB_RC: ++ case FI_PROTO_RDMA_CM_IB_XRC: + case FI_PROTO_IWARP: + case FI_PROTO_IB_UD: +- case FI_PROTO_IB_RDM: +- case FI_PROTO_IWARP_RDM: + break; + default: + VERBS_INFO(FI_LOG_CORE, +@@ -411,7 +400,7 @@ static int fi_ibv_rai_to_fi(struct rdma_addrinfo *rai, struct fi_info *fi) + } + + static inline int fi_ibv_get_qp_cap(struct ibv_context *ctx, +- struct fi_info *info) ++ struct fi_info *info, uint32_t protocol) + { + struct ibv_pd *pd; + struct ibv_cq *cq; +@@ -433,16 +422,21 @@ static inline int fi_ibv_get_qp_cap(struct ibv_context *ctx, + goto err1; + } + +- qp_type = (info->ep_attr->type != FI_EP_DGRAM) ? +- IBV_QPT_RC : IBV_QPT_UD; ++ if (protocol == FI_PROTO_RDMA_CM_IB_XRC) ++ qp_type = IBV_QPT_XRC_SEND; ++ else ++ qp_type = (info->ep_attr->type != FI_EP_DGRAM) ? ++ IBV_QPT_RC : IBV_QPT_UD; + + memset(&init_attr, 0, sizeof init_attr); + init_attr.send_cq = cq; +- init_attr.recv_cq = cq; + init_attr.cap.max_send_wr = fi_ibv_gl_data.def_tx_size; +- init_attr.cap.max_recv_wr = fi_ibv_gl_data.def_rx_size; + init_attr.cap.max_send_sge = fi_ibv_gl_data.def_tx_iov_limit; +- init_attr.cap.max_recv_sge = fi_ibv_gl_data.def_rx_iov_limit; ++ if (!fi_ibv_is_xrc_send_qp(qp_type)) { ++ init_attr.recv_cq = cq; ++ init_attr.cap.max_recv_wr = fi_ibv_gl_data.def_rx_size; ++ init_attr.cap.max_recv_sge = fi_ibv_gl_data.def_rx_iov_limit; ++ } + init_attr.cap.max_inline_data = fi_ibv_find_max_inline(pd, ctx, qp_type); + init_attr.qp_type = qp_type; + +@@ -483,7 +477,7 @@ static int fi_ibv_mtu_type_to_len(enum ibv_mtu mtu_type) + } + + static int fi_ibv_get_device_attrs(struct ibv_context *ctx, +- struct fi_info *info) ++ struct fi_info *info, uint32_t protocol) + { + struct ibv_device_attr device_attr; + struct ibv_port_attr port_attr; +@@ -498,6 +492,13 @@ static int fi_ibv_get_device_attrs(struct ibv_context *ctx, + return -errno; + } + ++ if (protocol == FI_PROTO_RDMA_CM_IB_XRC) { ++ if (!(device_attr.device_cap_flags & IBV_DEVICE_XRC)) { ++ VERBS_WARN(FI_LOG_FABRIC, "XRC not supported\n"); ++ return -FI_EINVAL; ++ } ++ } ++ + info->domain_attr->cq_cnt = device_attr.max_cq; + info->domain_attr->ep_cnt = device_attr.max_qp; + info->domain_attr->tx_ctx_cnt = MIN(info->domain_attr->tx_ctx_cnt, +@@ -510,9 +511,6 @@ static int fi_ibv_get_device_attrs(struct ibv_context *ctx, + device_attr.max_qp); + info->domain_attr->max_ep_srx_ctx = device_attr.max_srq; + info->domain_attr->mr_cnt = device_attr.max_mr; +- if (info->ep_attr->type == FI_EP_RDM) +- info->domain_attr->cntr_cnt = device_attr.max_qp * 4; +- + info->tx_attr->size = device_attr.max_qp_wr; + info->tx_attr->iov_limit = device_attr.max_sge; + +@@ -524,8 +522,12 @@ static int fi_ibv_get_device_attrs(struct ibv_context *ctx, + MIN(device_attr.max_sge, + device_attr.max_srq_sge) : + device_attr.max_sge; ++ if (protocol == FI_PROTO_RDMA_CM_IB_XRC) { ++ info->rx_attr->iov_limit = MIN(info->rx_attr->iov_limit, 1); ++ info->ep_attr->rx_ctx_cnt = FI_SHARED_CONTEXT; ++ } + +- ret = fi_ibv_get_qp_cap(ctx, info); ++ ret = fi_ibv_get_qp_cap(ctx, info, protocol); + if (ret) + return ret; + +@@ -608,47 +610,45 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + int ret; + + if ((ctx->device->transport_type != IBV_TRANSPORT_IB) && +- (ep_dom->type == FI_EP_DGRAM)) ++ ((ep_dom->type == FI_EP_DGRAM) || ++ (ep_dom->protocol == FI_PROTO_RDMA_CM_IB_XRC))) + return -FI_EINVAL; + + if (!(fi = fi_allocinfo())) + return -FI_ENOMEM; + +- fi->caps = ep_dom->caps; +- fi->handle = NULL; +- if (ep_dom->type == FI_EP_RDM) { +- fi->mode = VERBS_RDM_MODE; +- *(fi->tx_attr) = verbs_rdm_tx_attr; +- *(fi->rx_attr) = verbs_rdm_rx_attr; +- } else { +- *(fi->tx_attr) = verbs_tx_attr; +- *(fi->rx_attr) = verbs_rx_attr; +- } +- +- *(fi->ep_attr) = verbs_ep_attr; +- *(fi->domain_attr) = verbs_domain_attr; ++ fi->caps = ep_dom->caps; ++ fi->handle = NULL; ++ *(fi->ep_attr) = verbs_ep_attr; ++ *(fi->domain_attr) = verbs_domain_attr; + +- if (ep_dom->type == FI_EP_RDM) +- fi->domain_attr->mr_mode &= ~FI_MR_LOCAL; ++ switch (ep_dom->type) { ++ case FI_EP_MSG: ++ *(fi->tx_attr) = verbs_tx_attr; ++ *(fi->rx_attr) = verbs_rx_attr; ++ break; ++ case FI_EP_DGRAM: ++ fi->mode = VERBS_DGRAM_RX_MODE; ++ *(fi->tx_attr) = verbs_dgram_tx_attr; ++ *(fi->rx_attr) = verbs_dgram_rx_attr; ++ fi->ep_attr->msg_prefix_size = VERBS_DGRAM_MSG_PREFIX_SIZE; ++ break; ++ default: ++ assert(0); ++ return -FI_EINVAL; ++ } ++ + +- *(fi->fabric_attr) = verbs_fabric_attr; ++ *(fi->fabric_attr) = verbs_fabric_attr; + +- fi->ep_attr->type = ep_dom->type; +- fi->tx_attr->caps = ep_dom->caps; +- fi->rx_attr->caps = ep_dom->caps; ++ fi->ep_attr->type = ep_dom->type; ++ fi->tx_attr->caps = ep_dom->caps; ++ fi->rx_attr->caps = ep_dom->caps; + +- ret = fi_ibv_get_device_attrs(ctx, fi); ++ ret = fi_ibv_get_device_attrs(ctx, fi, ep_dom->protocol); + if (ret) + goto err; + +- if (ep_dom->type == FI_EP_RDM) { +- fi->tx_attr->iov_limit = 1; +- fi->tx_attr->rma_iov_limit = 1; +- fi->tx_attr->inject_size = fi_ibv_gl_data.rdm.buffer_size; +- +- fi->rx_attr->iov_limit = 1; +- } +- + switch (ctx->device->transport_type) { + case IBV_TRANSPORT_IB: + if(ibv_query_gid(ctx, 1, 0, &gid)) { +@@ -664,15 +664,14 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + goto err; + } + +- snprintf(fi->fabric_attr->name, name_len, VERBS_IB_PREFIX "%" PRIu64, ++ snprintf(fi->fabric_attr->name, name_len, VERBS_IB_PREFIX "%" PRIx64, + be64toh(gid.global.subnet_prefix)); + + switch (ep_dom->type) { + case FI_EP_MSG: +- fi->ep_attr->protocol = FI_PROTO_RDMA_CM_IB_RC; +- break; +- case FI_EP_RDM: +- fi->ep_attr->protocol = FI_PROTO_IB_RDM; ++ fi->ep_attr->protocol = ++ ep_dom->protocol == FI_PROTO_UNSPEC ? ++ FI_PROTO_RDMA_CM_IB_RC : ep_dom->protocol; + break; + case FI_EP_DGRAM: + fi->ep_attr->protocol = FI_PROTO_IB_UD; +@@ -689,14 +688,8 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + ret = -FI_ENOMEM; + goto err; + } +- +- if (ep_dom->type == FI_EP_MSG) { +- fi->ep_attr->protocol = FI_PROTO_IWARP; +- fi->tx_attr->op_flags = VERBS_TX_OP_FLAGS_IWARP; +- } else { +- fi->ep_attr->protocol = FI_PROTO_IWARP_RDM; +- fi->tx_attr->op_flags = VERBS_TX_OP_FLAGS_IWARP_RDM; +- } ++ fi->ep_attr->protocol = FI_PROTO_IWARP; ++ fi->tx_attr->op_flags = VERBS_TX_OP_FLAGS_IWARP; + + /* TODO Some iWarp HW may support immediate data as per RFC 7306 + * (RDMA Protocol Extensions). Update this to figure out if the +@@ -710,7 +703,7 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + } + + name_len = strlen(ctx->device->name) + strlen(ep_dom->suffix); +- fi->domain_attr->name = malloc(name_len + 1); ++ fi->domain_attr->name = calloc(1, name_len + 2); + if (!fi->domain_attr->name) { + ret = -FI_ENOMEM; + goto err; +@@ -718,7 +711,6 @@ static int fi_ibv_alloc_info(struct ibv_context *ctx, struct fi_info **info, + + snprintf(fi->domain_attr->name, name_len + 1, "%s%s", + ctx->device->name, ep_dom->suffix); +- fi->domain_attr->name[name_len] = '\0'; + + *info = fi; + return 0; +@@ -847,27 +839,25 @@ static int fi_ibv_getifaddrs(struct dlist_entry *verbs_devs) + goto err1; + } + +- ret = fi_ibv_create_ep(name, NULL, FI_NUMERICHOST | FI_SOURCE, +- NULL, &rai, &id); ++ ret = fi_ibv_get_rai_id(name, NULL, FI_NUMERICHOST | FI_SOURCE, ++ NULL, &rai, &id); + if (ret) + continue; + + ret = fi_ibv_add_rai(verbs_devs, id, rai); +- if (ret) +- goto err2; +- ++ if (ret) { ++ rdma_freeaddrinfo(rai); ++ rdma_destroy_id(id); ++ goto err1; ++ } + VERBS_DBG(FI_LOG_FABRIC, "Found active interface for verbs device: " + "%s with address: %s\n", + ibv_get_device_name(id->verbs->device), name); +- +- rdma_destroy_ep(id); +- ++ rdma_destroy_id(id); + num_verbs_ifs++; + } + freeifaddrs(ifaddr); + return num_verbs_ifs ? 0 : -FI_ENODATA; +-err2: +- rdma_destroy_ep(id); + err1: + fi_ibv_verbs_devs_free(verbs_devs); + freeifaddrs(ifaddr); +@@ -973,7 +963,7 @@ static void fi_ibv_sockaddr_set_port(struct sockaddr *sa, uint16_t port) + } + } + +-/* the `rai` parameter is used for the MSG/RDM EP types */ ++/* the `rai` parameter is used for the MSG EP type */ + /* the `fmt`, `[src | dest]_addr` parameters are used for the DGRAM EP type */ + /* if the `fmt` parameter isn't used, pass FI_FORMAT_UNSPEC */ + static int fi_ibv_set_info_addrs(struct fi_info *info, +@@ -1053,14 +1043,27 @@ rai_to_fi: + NULL, NULL); + } + ++#define VERBS_NUM_DOMAIN_TYPES 3 ++ + int fi_ibv_init_info(const struct fi_info **all_infos) + { + struct ibv_context **ctx_list; + struct fi_info *fi = NULL, *tail = NULL; +- int ret = 0, i, num_devices; ++ const struct verbs_ep_domain *ep_type[VERBS_NUM_DOMAIN_TYPES]; ++ int ret = 0, i, j, num_devices; + + *all_infos = NULL; + ++ /* List XRC MSG_EP domain before default RC MSG_EP if requested */ ++ if (fi_ibv_gl_data.msg.prefer_xrc) { ++ ep_type[0] = &verbs_msg_xrc_domain; ++ ep_type[1] = &verbs_msg_domain; ++ } else { ++ ep_type[0] = &verbs_msg_domain; ++ ep_type[1] = &verbs_msg_xrc_domain; ++ } ++ ep_type[2] = &verbs_dgram_domain; ++ + if (!fi_ibv_gl_data.fork_unsafe) { + VERBS_INFO(FI_LOG_CORE, "Enabling IB fork support\n"); + ret = ibv_fork_init(); +@@ -1088,25 +1091,13 @@ int fi_ibv_init_info(const struct fi_info **all_infos) + } + + for (i = 0; i < num_devices; i++) { +- ret = fi_ibv_alloc_info(ctx_list[i], &fi, &verbs_msg_domain); +- if (!ret) { +- if (!*all_infos) +- *all_infos = fi; +- else +- tail->next = fi; +- tail = fi; +- +- ret = fi_ibv_alloc_info(ctx_list[i], &fi, +- &verbs_rdm_domain); ++ for (j = 0; j < VERBS_NUM_DOMAIN_TYPES; j++) { ++ ret = fi_ibv_alloc_info(ctx_list[i], &fi, ep_type[j]); + if (!ret) { +- tail->next = fi; +- tail = fi; +- } +- +- ret = fi_ibv_alloc_info(ctx_list[i], &fi, +- &verbs_dgram_domain); +- if (!ret) { +- tail->next = fi; ++ if (!*all_infos) ++ *all_infos = fi; ++ else ++ tail->next = fi; + tail = fi; + } + } +@@ -1124,7 +1115,7 @@ static int fi_ibv_set_default_attr(struct fi_info *info, size_t *attr, + size_t default_attr, char *attr_str) + { + if (default_attr > *attr) { +- VERBS_WARN(FI_LOG_FABRIC, "Ignoring provider default value " ++ VERBS_INFO(FI_LOG_FABRIC, "Ignoring provider default value " + "for %s as it is greater than the value supported " + "by domain: %s\n", attr_str, info->domain_attr->name); + } else { +@@ -1150,34 +1141,26 @@ static int fi_ibv_set_default_info(struct fi_info *info) + "rx context size"); + if (ret) + return ret; ++ ret = fi_ibv_set_default_attr(info, &info->tx_attr->iov_limit, ++ fi_ibv_gl_data.def_tx_iov_limit, ++ "tx iov_limit"); ++ if (ret) ++ return ret; + +- /* Don't set defaults for verb/RDM as +- * it supports an iov limit of just 1 */ +- if (info->ep_attr->type != FI_EP_RDM) { +- ret = fi_ibv_set_default_attr( +- info, &info->tx_attr->iov_limit, +- fi_ibv_gl_data.def_tx_iov_limit, +- "tx iov_limit"); +- if (ret) +- return ret; ++ ret = fi_ibv_set_default_attr(info, &info->rx_attr->iov_limit, ++ fi_ibv_gl_data.def_rx_iov_limit, ++ "rx iov_limit"); ++ if (ret) ++ return ret; + +- ret = fi_ibv_set_default_attr( +- info, &info->rx_attr->iov_limit, +- fi_ibv_gl_data.def_rx_iov_limit, +- "rx iov_limit"); ++ if (info->ep_attr->type == FI_EP_MSG) { ++ /* For verbs iov limit is same for ++ * both regular messages and RMA */ ++ ret = fi_ibv_set_default_attr(info, &info->tx_attr->rma_iov_limit, ++ fi_ibv_gl_data.def_tx_iov_limit, ++ "tx rma_iov_limit"); + if (ret) + return ret; +- +- if (info->ep_attr->type != FI_EP_DGRAM) { +- /* For verbs iov limit is same for +- * both regular messages and RMA */ +- ret = fi_ibv_set_default_attr( +- info, &info->tx_attr->rma_iov_limit, +- fi_ibv_gl_data.def_tx_iov_limit, +- "tx rma_iov_limit"); +- if (ret) +- return ret; +- } + } + return 0; + } +@@ -1225,9 +1208,29 @@ static int fi_ibv_get_matching_info(uint32_t version, + *info = tail = NULL; + + for ( ; check_info; check_info = check_info->next) { ++ VERBS_DBG(FI_LOG_FABRIC, "Checking domain: %s\n", ++ check_info->domain_attr->name); ++ + if (hints) { +- VERBS_DBG(FI_LOG_FABRIC, "Checking domain: %s\n", +- check_info->domain_attr->name); ++ if ((check_info->ep_attr->protocol == ++ FI_PROTO_RDMA_CM_IB_XRC) && ++ (!hints->ep_attr || ++ (hints->ep_attr->rx_ctx_cnt != FI_SHARED_CONTEXT))) { ++ VERBS_INFO(FI_LOG_FABRIC, ++ "hints->ep_attr->rx_ctx_cnt != " ++ "FI_SHARED_CONTEXT. Skipping " ++ "XRC FI_EP_MSG endpoints\n"); ++ continue; ++ } ++ if ((check_info->ep_attr->protocol == ++ FI_PROTO_RDMA_CM_IB_XRC) && !VERBS_HAVE_XRC) { ++ VERBS_INFO(FI_LOG_FABRIC, ++ "XRC not built into provider, " ++ "skipping XRC FI_EP_MSG " ++ "endpoints\n"); ++ continue; ++ } ++ + ret = fi_ibv_check_hints(version, hints, + check_info); + if (ret) +@@ -1255,6 +1258,8 @@ static int fi_ibv_get_matching_info(uint32_t version, + } + } + ++ VERBS_DBG(FI_LOG_FABRIC, "Adding fi_info for domain: %s\n", ++ fi->domain_attr->name); + if (!*info) + *info = fi; + else +@@ -1279,8 +1284,7 @@ static int fi_ibv_del_info_not_belong_to_dev(const char *dev_name, struct fi_inf + *info = NULL; + + while (check_info) { +- /* Use strncmp since verbs RDM domain name +- * would have "-rdm" suffix */ ++ /* Use strncmp since verbs domain names would have "-" suffix */ + if (dev_name && strncmp(dev_name, check_info->domain_attr->name, + strlen(dev_name))) { + /* This branch removing `check_info` entry from the list */ +@@ -1369,8 +1373,15 @@ static int fi_ibv_handle_ib_ud_addr(const char *node, const char *service, + } + + if (flags & FI_SOURCE) { +- if (service) +- sscanf(service, "%" SCNu16, &src_addr->service); ++ if (service) { ++ ret = sscanf(service, "%" SCNu16, ++ &src_addr->service); ++ if (ret != 1) { ++ ret = -errno; ++ goto fn2; ++ } ++ } ++ + VERBS_INFO(FI_LOG_CORE, "node '%s' service '%s' " + "converted to \n", + node, service, src_addr->service); +@@ -1425,23 +1436,41 @@ static int fi_ibv_handle_sock_addr(const char *node, const char *service, + const char *dev_name = NULL; + int ret; + +- ret = fi_ibv_create_ep(node, service, flags, hints, &rai, &id); ++ ret = fi_ibv_get_rai_id(node, service, flags, hints, &rai, &id); + if (ret) + return ret; + if (id->verbs) { + dev_name = ibv_get_device_name(id->verbs->device); + ret = fi_ibv_del_info_not_belong_to_dev(dev_name, info); + if (ret) +- goto fn; ++ goto out; + } + + ret = fi_ibv_fill_addr(rai, info, id); + fi_ibv_remove_nosrc_info(info); +-fn: +- fi_ibv_destroy_ep(rai, &id); ++out: ++ rdma_freeaddrinfo(rai); ++ if (rdma_destroy_id(id)) ++ VERBS_INFO_ERRNO(FI_LOG_FABRIC, "rdma_destroy_id", errno); + return ret; + } + ++static inline int ++fi_ibv_hints_match_dgram_ep(const struct fi_info *hints) ++{ ++ return (hints && ((hints->addr_format == FI_ADDR_IB_UD) || ++ (hints->ep_attr && (hints->ep_attr->type == FI_EP_DGRAM)))); ++} ++ ++static inline int ++fi_ibv_hints_match_msg_ep(const struct fi_info *hints) ++{ ++ return (hints && ((hints->addr_format == FI_SOCKADDR) || ++ (hints->addr_format == FI_SOCKADDR_IN) || ++ (hints->addr_format == FI_SOCKADDR_IN6) || ++ (hints->addr_format == FI_SOCKADDR_IB) || ++ (hints->ep_attr && (hints->ep_attr->type == FI_EP_MSG)))); ++} + + static int fi_ibv_get_match_infos(uint32_t version, const char *node, + const char *service, uint64_t flags, +@@ -1458,21 +1487,45 @@ static int fi_ibv_get_match_infos(uint32_t version, const char *node, + if (ret) + return ret; + +- if (hints && (hints->addr_format == FI_ADDR_IB_UD)) { ++ /* Check if the user requested to support DGRAM EP type only */ ++ if (fi_ibv_hints_match_dgram_ep(hints)) { + /* This is case when only IB UD addresses are passed */ + ret = fi_ibv_handle_ib_ud_addr(node, service, flags, info); +- if (ret) ++ if (ret) { ++ VERBS_INFO(FI_LOG_CORE, ++ "Handling of the IB UD address fails - %d, " ++ "support of this was requested thru the passed hints\n", ++ ret); + fi_freeinfo(*info); ++ } ++ return ret; ++ } ++ ++ /* Check if the user requested to support MSG EP type only */ ++ if (fi_ibv_hints_match_msg_ep(hints)) { ++ ret = fi_ibv_handle_sock_addr(node, service, flags, hints, info); ++ if (ret) { ++ VERBS_INFO(FI_LOG_CORE, ++ "Handling of the socket address fails - %d, but the " ++ "support of this was requested thru the passed hints\n", ++ ret); ++ if (*info) ++ fi_freeinfo(*info); ++ } else { ++ if (!*info) ++ return -FI_ENODATA; ++ } + return ret; + } + + ret_sock_addr = fi_ibv_handle_sock_addr(node, service, flags, hints, info); +- if (ret_sock_addr) ++ if (ret_sock_addr) { + VERBS_INFO(FI_LOG_CORE, "Handling of the socket address fails - %d\n", + ret_sock_addr); +- +- if (!*info) +- return -FI_ENODATA; ++ } else { ++ if (!*info) ++ return -FI_ENODATA; ++ } + + ret_ib_ud_addr = fi_ibv_handle_ib_ud_addr(node, service, flags, info); + if (ret_ib_ud_addr) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_mr.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_mr.c +index 05f8514cb..2267287d8 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_mr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_mr.c +@@ -32,7 +32,6 @@ + + #include + #include "fi_verbs.h" +-#include "verbs_rdm.h" + + #define FI_IBV_DEFINE_MR_REG_OPS(type) \ + \ +@@ -180,13 +179,6 @@ fi_ibv_mr_ofi2ibv_access(uint64_t ofi_access, struct fi_ibv_domain *domain) + { + int ibv_access = 0; + +- /* Enable local write access by default for FI_EP_RDM which hides local +- * registration requirements. This allows to avoid buffering or double +- * registration */ +- if (!(domain->info->caps & FI_LOCAL_MR) && +- !(domain->info->domain_attr->mr_mode & FI_MR_LOCAL)) +- ibv_access |= IBV_ACCESS_LOCAL_WRITE; +- + /* Local read access to an MR is enabled by default in verbs */ + if (ofi_access & FI_RECV) + ibv_access |= IBV_ACCESS_LOCAL_WRITE; +@@ -261,38 +253,6 @@ int fi_ibv_mr_internal_dereg(struct fi_ibv_mem_desc *md) + return ret; + } + +-int fi_ibv_rdm_alloc_and_reg(struct fi_ibv_rdm_ep *ep, +- void **buf, size_t size, +- struct fi_ibv_mem_desc *md) +-{ +- if (!*buf) { +- if (ofi_memalign((void **)buf, +- FI_IBV_BUF_ALIGNMENT, size)) +- return -FI_ENOMEM; +- } +- +- memset(*buf, 0, size); +- return fi_ibv_mr_internal_reg(ep->domain, *buf, size, +- FI_WRITE | FI_REMOTE_WRITE, md); +-} +- +-ssize_t fi_ibv_rdm_dereg_and_free(struct fi_ibv_mem_desc *md, +- char **buff) +-{ +- ssize_t ret = FI_SUCCESS; +- ret = fi_ibv_mr_internal_dereg(md); +- if (ret) +- VERBS_WARN(FI_LOG_AV, +- "Unable to deregister MR, ret = %"PRId64"\n", ret); +- +- if (buff && *buff) { +- ofi_freealign(*buff); +- *buff = NULL; +- } +- +- return ret; +-} +- + static inline + int fi_ibv_mr_internal_cache_reg(struct fi_ibv_domain *domain, void *buf, + size_t len, uint64_t access, +@@ -376,88 +336,104 @@ static struct fi_ops fi_ibv_mr_cache_ops = { + .ops_open = fi_no_ops_open, + }; + +-int fi_ibv_monitor_subscribe(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription) ++int fi_ibv_monitor_subscribe(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription) + { + struct fi_ibv_domain *domain = + container_of(notifier, struct fi_ibv_domain, monitor); +- struct fi_ibv_mem_ptr_entry *entry; + int ret = FI_SUCCESS; ++ RbtStatus rbt_ret; ++ RbtIterator iter; ++ struct iovec *key; ++ struct fi_ibv_subscr_entry *subscr_entry; ++ struct fi_ibv_monitor_entry *entry = ++ calloc(1, sizeof(*entry)); ++ if (OFI_UNLIKELY(!entry)) ++ return -FI_ENOMEM; + + pthread_mutex_lock(&domain->notifier->lock); +- fi_ibv_mem_notifier_set_free_hook(domain->notifier->prev_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(domain->notifier->prev_realloc_hook); +- +- entry = util_buf_alloc(domain->notifier->mem_ptrs_ent_pool); +- if (OFI_UNLIKELY(!entry)) { +- ret = -FI_ENOMEM; +- goto fn; ++ ofi_set_mem_free_hook(domain->notifier->prev_free_hook); ++ ofi_set_mem_realloc_hook(domain->notifier->prev_realloc_hook); ++ ++ entry->iov = subscription->iov; ++ dlist_init(&entry->subscription_list); ++ ++ rbt_ret = rbtInsert(domain->notifier->subscr_storage, ++ (void *)&entry->iov, (void *)entry); ++ switch (rbt_ret) { ++ case RBT_STATUS_DUPLICATE_KEY: ++ free(entry); ++ iter = rbtFind(domain->notifier->subscr_storage, ++ (void *)&subscription->iov); ++ assert(iter); ++ rbtKeyValue(domain->notifier->subscr_storage, iter, ++ (void *)&key, (void *)&entry); ++ /* fall through */ ++ case RBT_STATUS_OK: ++ subscr_entry = calloc(1, sizeof(*subscr_entry)); ++ if (OFI_LIKELY(subscr_entry != NULL)) { ++ subscr_entry->subscription = subscription; ++ dlist_insert_tail(&subscr_entry->entry, &entry->subscription_list); ++ break; ++ } ++ /* Do not free monitor entry in case of diplicate key */ ++ if (rbt_ret == RBT_STATUS_OK) { ++ iter = rbtFind(domain->notifier->subscr_storage, ++ (void *)&subscription->iov); ++ assert(iter); ++ rbtErase(domain->notifier->subscr_storage, iter); ++ free(entry); ++ } ++ /* fall through */ ++ default: ++ ret = -FI_EAVAIL; ++ break; + } + +- entry->addr = addr; +- entry->subscription = subscription; +- dlist_init(&entry->entry); +- HASH_ADD(hh, domain->notifier->mem_ptrs_hash, addr, sizeof(void *), entry); +- +-fn: +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier_realloc_hook); ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier_free_hook); ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier_realloc_hook); + pthread_mutex_unlock(&domain->notifier->lock); + return ret; + } + +-void fi_ibv_monitor_unsubscribe(struct ofi_mem_monitor *notifier, void *addr, +- size_t len, struct ofi_subscription *subscription) ++void fi_ibv_monitor_unsubscribe(struct ofi_mem_monitor *notifier, ++ struct ofi_subscription *subscription) + { + struct fi_ibv_domain *domain = + container_of(notifier, struct fi_ibv_domain, monitor); +- struct fi_ibv_mem_ptr_entry *entry; ++ RbtIterator iter; ++ struct fi_ibv_subscr_entry *subscr_entry; ++ struct fi_ibv_monitor_entry *entry; ++ struct iovec *key; + + pthread_mutex_lock(&domain->notifier->lock); +- fi_ibv_mem_notifier_set_free_hook(domain->notifier->prev_free_hook); +- fi_ibv_mem_notifier_set_realloc_hook(domain->notifier->prev_realloc_hook); +- +- HASH_FIND(hh, domain->notifier->mem_ptrs_hash, &addr, sizeof(void *), entry); +- assert(entry); +- +- HASH_DEL(domain->notifier->mem_ptrs_hash, entry); +- +- if (!dlist_empty(&entry->entry)) +- dlist_remove_init(&entry->entry); ++ ofi_set_mem_free_hook(domain->notifier->prev_free_hook); ++ ofi_set_mem_realloc_hook(domain->notifier->prev_realloc_hook); ++ ++ iter = rbtFind(domain->notifier->subscr_storage, ++ (void *)&subscription->iov); ++ assert(iter); ++ rbtKeyValue(domain->notifier->subscr_storage, iter, ++ (void *)&key, (void *)&entry); ++ dlist_foreach_container(&entry->subscription_list, struct fi_ibv_subscr_entry, ++ subscr_entry, entry) { ++ if (subscr_entry->subscription == subscription) { ++ dlist_remove(&subscr_entry->entry); ++ free(subscr_entry); ++ break; ++ } ++ } + +- util_buf_release(domain->notifier->mem_ptrs_ent_pool, entry); ++ if (dlist_empty(&entry->subscription_list)) { ++ rbtErase(domain->notifier->subscr_storage, iter); ++ free(entry); ++ } + +- fi_ibv_mem_notifier_set_realloc_hook(fi_ibv_mem_notifier_realloc_hook); +- fi_ibv_mem_notifier_set_free_hook(fi_ibv_mem_notifier_free_hook); ++ ofi_set_mem_realloc_hook(fi_ibv_mem_notifier_realloc_hook); ++ ofi_set_mem_free_hook(fi_ibv_mem_notifier_free_hook); + pthread_mutex_unlock(&domain->notifier->lock); + } + +-struct ofi_subscription * +-fi_ibv_monitor_get_event(struct ofi_mem_monitor *notifier) +-{ +- struct fi_ibv_domain *domain = +- container_of(notifier, struct fi_ibv_domain, monitor); +- struct fi_ibv_mem_ptr_entry *entry; +- +- pthread_mutex_lock(&domain->notifier->lock); +- if (!dlist_empty(&domain->notifier->event_list)) { +- dlist_pop_front(&domain->notifier->event_list, +- struct fi_ibv_mem_ptr_entry, +- entry, entry); +- VERBS_DBG(FI_LOG_MR, +- "Retrieve %p (entry %p) from event list\n", +- entry->addr, entry); +- /* needed to protect against double insertions */ +- dlist_init(&entry->entry); +- +- pthread_mutex_unlock(&domain->notifier->lock); +- return entry->subscription; +- } else { +- pthread_mutex_unlock(&domain->notifier->lock); +- return NULL; +- } +-} +- + int fi_ibv_mr_cache_entry_reg(struct ofi_mr_cache *cache, + struct ofi_mr_entry *entry) + { +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg.c +new file mode 100644 +index 000000000..e8b79b50a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg.c +@@ -0,0 +1,385 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++ ++#include "fi_verbs.h" ++ ++ ++static inline ssize_t ++fi_ibv_msg_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .num_sge = msg->iov_count, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ assert(ep->util_ep.rx_cq); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_handle_post(ibv_post_recv(ep->ibv_qp, &wr, &bad_wr)); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_recv(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_sge sge = fi_ibv_init_sge(buf, len, desc); ++ struct ibv_recv_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .num_sge = 1, ++ .sg_list = &sge, ++ .next = NULL, ++ }; ++ struct ibv_recv_wr *bad_wr; ++ ++ assert(ep->util_ep.rx_cq); ++ ++ return fi_ibv_handle_post(ibv_post_recv(ep->ibv_qp, &wr, &bad_wr)); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_recvv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, void *context) ++{ ++ struct fi_msg msg = { ++ .msg_iov = iov, ++ .desc = desc, ++ .iov_count = count, ++ .addr = src_addr, ++ .context = context, ++ }; ++ ++ return fi_ibv_msg_ep_recvmsg(ep_fid, &msg, 0); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ }; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_SEND_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_SEND; ++ } ++ ++ return fi_ibv_send_msg(ep, &wr, msg, flags); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND, ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_SEND, ++ }; ++ ++ return fi_ibv_send_iov(ep, &wr, iov, desc, count); ++} ++ ++static ssize_t fi_ibv_msg_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t fi_ibv_msg_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_msg_inject_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->msg_wr); ++} ++ ++static ssize_t fi_ibv_msg_ep_injectdata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ ssize_t ret; ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->msg_wr.imm_data = htonl((uint32_t)data); ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND_WITH_IMM; ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ ret = fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->msg_wr); ++ ep->wrs->msg_wr.opcode = IBV_WR_SEND; ++ return ret; ++} ++ ++const struct fi_ops_msg fi_ibv_msg_ep_msg_ops_ts = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_ibv_msg_ep_recv, ++ .recvv = fi_ibv_msg_ep_recvv, ++ .recvmsg = fi_ibv_msg_ep_recvmsg, ++ .send = fi_ibv_msg_ep_send, ++ .sendv = fi_ibv_msg_ep_sendv, ++ .sendmsg = fi_ibv_msg_ep_sendmsg, ++ .inject = fi_ibv_msg_ep_inject, ++ .senddata = fi_ibv_msg_ep_senddata, ++ .injectdata = fi_ibv_msg_ep_injectdata, ++}; ++ ++const struct fi_ops_msg fi_ibv_msg_ep_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_ibv_msg_ep_recv, ++ .recvv = fi_ibv_msg_ep_recvv, ++ .recvmsg = fi_ibv_msg_ep_recvmsg, ++ .send = fi_ibv_msg_ep_send, ++ .sendv = fi_ibv_msg_ep_sendv, ++ .sendmsg = fi_ibv_msg_ep_sendmsg, ++ .inject = fi_ibv_msg_inject_fast, ++ .senddata = fi_ibv_msg_ep_senddata, ++ .injectdata = fi_ibv_msg_ep_injectdata_fast, ++}; ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_SEND_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_SEND; ++ } ++ ++ return fi_ibv_send_msg(&ep->base_ep, &wr, msg, flags); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND, ++ .send_flags = VERBS_INJECT(&ep->base_ep, len), ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = VERBS_INJECT(&ep->base_ep, len), ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_SEND, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_iov(&ep->base_ep, &wr, iov, desc, count); ++} ++ ++static ssize_t fi_ibv_msg_xrc_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf_inline(&ep->base_ep, &wr, buf, len); ++} ++ ++static ssize_t fi_ibv_msg_xrc_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_SEND_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf_inline(&ep->base_ep, &wr, buf, len); ++} ++ ++/* NOTE: Initially the XRC endpoint must be used with a SRQ. */ ++const struct fi_ops_msg fi_ibv_msg_xrc_ep_msg_ops_ts = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_no_msg_recv, ++ .recvv = fi_no_msg_recvv, ++ .recvmsg = fi_no_msg_recvmsg, ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; ++ ++const struct fi_ops_msg fi_ibv_msg_xrc_ep_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_no_msg_recv, ++ .recvv = fi_no_msg_recvv, ++ .recvmsg = fi_no_msg_recvmsg, ++ .send = fi_no_msg_send, ++ .sendv = fi_no_msg_sendv, ++ .sendmsg = fi_no_msg_sendmsg, ++ .inject = fi_no_msg_inject, ++ .senddata = fi_no_msg_senddata, ++ .injectdata = fi_no_msg_injectdata, ++}; ++ ++const struct fi_ops_msg fi_ibv_msg_srq_xrc_ep_msg_ops = { ++ .size = sizeof(struct fi_ops_msg), ++ .recv = fi_no_msg_recv, ++ .recvv = fi_no_msg_recvv, ++ .recvmsg = fi_no_msg_recvmsg, ++ .send = fi_ibv_msg_xrc_ep_send, ++ .sendv = fi_ibv_msg_xrc_ep_sendv, ++ .sendmsg = fi_ibv_msg_xrc_ep_sendmsg, ++ .inject = fi_ibv_msg_xrc_ep_inject, ++ .senddata = fi_ibv_msg_xrc_ep_senddata, ++ .injectdata = fi_ibv_msg_xrc_ep_injectdata, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg_ep.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg_ep.c +deleted file mode 100644 +index 385acbd53..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_msg_ep.c ++++ /dev/null +@@ -1,1457 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "config.h" +- +-#include "fi_verbs.h" +- +- +-#define VERBS_CM_DATA_SIZE 56 +-#define VERBS_RESOLVE_TIMEOUT 2000 // ms +- +- +-static int +-fi_ibv_msg_ep_getopt(fid_t fid, int level, int optname, +- void *optval, size_t *optlen) +-{ +- switch (level) { +- case FI_OPT_ENDPOINT: +- switch (optname) { +- case FI_OPT_CM_DATA_SIZE: +- if (*optlen < sizeof(size_t)) +- return -FI_ETOOSMALL; +- *((size_t *) optval) = VERBS_CM_DATA_SIZE; +- *optlen = sizeof(size_t); +- return 0; +- default: +- return -FI_ENOPROTOOPT; +- } +- default: +- return -FI_ENOPROTOOPT; +- } +- return 0; +-} +- +-static int +-fi_ibv_msg_ep_setopt(fid_t fid, int level, int optname, +- const void *optval, size_t optlen) +-{ +- switch (level) { +- case FI_OPT_ENDPOINT: +- return -FI_ENOPROTOOPT; +- default: +- return -FI_ENOPROTOOPT; +- } +- return 0; +-} +- +-static struct fi_ops_ep fi_ibv_msg_ep_base_ops = { +- .size = sizeof(struct fi_ops_ep), +- .cancel = fi_no_cancel, +- .getopt = fi_ibv_msg_ep_getopt, +- .setopt = fi_ibv_msg_ep_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-static struct fi_ibv_msg_ep *fi_ibv_alloc_msg_ep(struct fi_info *info) +-{ +- struct fi_ibv_msg_ep *ep; +- +- ep = calloc(1, sizeof *ep); +- if (!ep) +- return NULL; +- +- ep->info = fi_dupinfo(info); +- if (!ep->info) +- goto err; +- +- return ep; +-err: +- free(ep); +- return NULL; +-} +- +-static void fi_ibv_free_msg_ep(struct fi_ibv_msg_ep *ep) +-{ +- fi_freeinfo(ep->info); +- free(ep); +-} +- +-static int fi_ibv_msg_ep_close(fid_t fid) +-{ +- struct fi_ibv_msg_ep *ep; +- +- ep = container_of(fid, struct fi_ibv_msg_ep, ep_fid.fid); +- rdma_destroy_ep(ep->id); +- +- fi_ibv_cleanup_cq(ep); +- +- VERBS_INFO(FI_LOG_DOMAIN, "EP %p was closed \n", ep); +- +- fi_ibv_free_msg_ep(ep); +- +- return 0; +-} +- +-static int fi_ibv_msg_ep_bind(struct fid *fid, struct fid *bfid, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep; +- int ret; +- +- ep = container_of(fid, struct fi_ibv_msg_ep, ep_fid.fid); +- ret = ofi_ep_bind_valid(&fi_ibv_prov, bfid, flags); +- if (ret) +- return ret; +- +- switch (bfid->fclass) { +- case FI_CLASS_CQ: +- /* Must bind a CQ to either RECV or SEND completions, and +- * the FI_SELECTIVE_COMPLETION flag is only valid when binding the +- * FI_SEND CQ. */ +- if (!(flags & (FI_RECV|FI_SEND)) +- || (flags & (FI_SEND|FI_SELECTIVE_COMPLETION)) +- == FI_SELECTIVE_COMPLETION) { +- return -EINVAL; +- } +- if (flags & FI_RECV) { +- if (ep->rcq) +- return -EINVAL; +- ep->rcq = container_of(bfid, struct fi_ibv_cq, cq_fid.fid); +- } +- if (flags & FI_SEND) { +- if (ep->scq) +- return -EINVAL; +- ep->scq = container_of(bfid, struct fi_ibv_cq, cq_fid.fid); +- if (flags & FI_SELECTIVE_COMPLETION) +- ep->ep_flags |= FI_SELECTIVE_COMPLETION; +- else +- ep->info->tx_attr->op_flags |= FI_COMPLETION; +- ep->ep_id = ep->scq->send_signal_wr_id | ep->scq->ep_cnt++; +- } +- break; +- case FI_CLASS_EQ: +- ep->eq = container_of(bfid, struct fi_ibv_eq, eq_fid.fid); +- ret = rdma_migrate_id(ep->id, ep->eq->channel); +- if (ret) +- return -errno; +- break; +- case FI_CLASS_SRX_CTX: +- ep->srq_ep = container_of(bfid, struct fi_ibv_srq_ep, ep_fid.fid); +- break; +- default: +- return -EINVAL; +- } +- +- return 0; +-} +- +-static int fi_ibv_msg_ep_enable(struct fid_ep *ep_fid) +-{ +- struct ibv_qp_init_attr attr = { 0 }; +- struct fi_ibv_msg_ep *ep; +- struct ibv_pd *pd; +- int ret; +- +- ep = container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- if (!ep->eq) { +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Endpoint is not bound to an event queue\n"); +- return -FI_ENOEQ; +- } +- +- if (!ep->scq && !ep->rcq) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a send or receive completion queue\n"); +- return -FI_ENOCQ; +- } +- +- if (!ep->scq && (ofi_send_allowed(ep->info->caps) || +- ofi_rma_initiate_allowed(ep->info->caps))) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a send completion queue when it has transmit " +- "capabilities enabled (FI_SEND | FI_RMA).\n"); +- return -FI_ENOCQ; +- } +- +- if (!ep->rcq && ofi_recv_allowed(ep->info->caps)) { +- VERBS_WARN(FI_LOG_EP_CTRL, "Endpoint is not bound to " +- "a receive completion queue when it has receive " +- "capabilities enabled. (FI_RECV)\n"); +- return -FI_ENOCQ; +- } +- +- if (ep->scq) { +- attr.cap.max_send_wr = ep->info->tx_attr->size; +- attr.cap.max_send_sge = ep->info->tx_attr->iov_limit; +- attr.send_cq = ep->scq->cq; +- pd = ep->scq->domain->pd; +- } else { +- attr.send_cq = ep->rcq->cq; +- pd = ep->rcq->domain->pd; +- } +- +- if (ep->rcq) { +- attr.cap.max_recv_wr = ep->info->rx_attr->size; +- attr.cap.max_recv_sge = ep->info->rx_attr->iov_limit; +- attr.recv_cq = ep->rcq->cq; +- } else { +- attr.recv_cq = ep->scq->cq; +- } +- +- attr.cap.max_inline_data = ep->info->tx_attr->inject_size; +- +- if (ep->srq_ep) { +- attr.srq = ep->srq_ep->srq; +- /* Use of SRQ, no need to allocate recv_wr entries in the QP */ +- attr.cap.max_recv_wr = 0; +- +- /* Override the default ops to prevent the user from posting WRs to a +- * QP where a SRQ is attached to */ +- ep->ep_fid.msg = &fi_ibv_msg_srq_ep_msg_ops; +- } +- +- attr.qp_type = IBV_QPT_RC; +- attr.sq_sig_all = 0; +- attr.qp_context = ep; +- +- ret = rdma_create_qp(ep->id, pd, &attr); +- if (ret) { +- ret = -errno; +- VERBS_WARN(FI_LOG_EP_CTRL, "Unable to create rdma qp: %s (%d)\n", +- fi_strerror(-ret), -ret); +- return ret; +- } +- return 0; +-} +- +-static int fi_ibv_msg_ep_control(struct fid *fid, int command, void *arg) +-{ +- struct fid_ep *ep; +- +- switch (fid->fclass) { +- case FI_CLASS_EP: +- ep = container_of(fid, struct fid_ep, fid); +- switch (command) { +- case FI_ENABLE: +- return fi_ibv_msg_ep_enable(ep); +- break; +- default: +- return -FI_ENOSYS; +- } +- break; +- default: +- return -FI_ENOSYS; +- } +-} +- +-static struct fi_ops fi_ibv_msg_ep_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_msg_ep_close, +- .bind = fi_ibv_msg_ep_bind, +- .control = fi_ibv_msg_ep_control, +- .ops_open = fi_no_ops_open, +-}; +- +-int fi_ibv_open_ep(struct fid_domain *domain, struct fi_info *info, +- struct fid_ep **ep_fid, void *context) +-{ +- struct fi_ibv_domain *dom; +- struct fi_ibv_msg_ep *ep; +- struct fi_ibv_connreq *connreq; +- struct fi_ibv_pep *pep; +- struct fi_info *fi; +- int ret; +- +- dom = container_of(domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- if (strcmp(dom->verbs->device->name, info->domain_attr->name)) { +- VERBS_INFO(FI_LOG_DOMAIN, "Invalid info->domain_attr->name\n"); +- return -FI_EINVAL; +- } +- +- fi = dom->info; +- +- if (info->ep_attr) { +- ret = fi_ibv_check_ep_attr(info, fi); +- if (ret) +- return ret; +- } +- +- if (info->tx_attr) { +- ret = ofi_check_tx_attr(&fi_ibv_prov, fi->tx_attr, +- info->tx_attr, info->mode); +- if (ret) +- return ret; +- } +- +- if (info->rx_attr) { +- ret = fi_ibv_check_rx_attr(info->rx_attr, info, fi); +- if (ret) +- return ret; +- } +- +- ep = fi_ibv_alloc_msg_ep(info); +- if (!ep) +- return -FI_ENOMEM; +- +- if (!info->handle) { +- ret = fi_ibv_create_ep(NULL, NULL, 0, info, NULL, &ep->id); +- if (ret) +- goto err1; +- } else if (info->handle->fclass == FI_CLASS_CONNREQ) { +- connreq = container_of(info->handle, struct fi_ibv_connreq, handle); +- ep->id = connreq->id; +- } else if (info->handle->fclass == FI_CLASS_PEP) { +- pep = container_of(info->handle, struct fi_ibv_pep, pep_fid.fid); +- ep->id = pep->id; +- pep->id = NULL; +- +- if (rdma_resolve_addr(ep->id, info->src_addr, info->dest_addr, +- VERBS_RESOLVE_TIMEOUT)) { +- ret = -errno; +- VERBS_INFO(FI_LOG_DOMAIN, "Unable to rdma_resolve_addr\n"); +- goto err2; +- } +- +- if (rdma_resolve_route(ep->id, VERBS_RESOLVE_TIMEOUT)) { +- ret = -errno; +- VERBS_INFO(FI_LOG_DOMAIN, "Unable to rdma_resolve_route\n"); +- goto err2; +- } +- } else { +- ret = -FI_ENOSYS; +- goto err1; +- } +- +- fastlock_init(&ep->wre_lock); +- ret = util_buf_pool_create(&ep->wre_pool, sizeof(struct fi_ibv_wre), +- 16, 0, VERBS_WRE_CNT); +- if (ret) { +- VERBS_WARN(FI_LOG_CQ, "Failed to create wre_pool\n"); +- goto err3; +- } +- dlist_init(&ep->wre_list); +- +- ep->id->context = &ep->ep_fid.fid; +- ep->ep_fid.fid.fclass = FI_CLASS_EP; +- ep->ep_fid.fid.context = context; +- ep->ep_fid.fid.ops = &fi_ibv_msg_ep_ops; +- ep->ep_fid.ops = &fi_ibv_msg_ep_base_ops; +- ep->ep_fid.msg = &fi_ibv_msg_ep_msg_ops; +- ep->ep_fid.cm = &fi_ibv_msg_ep_cm_ops; +- ep->ep_fid.rma = &fi_ibv_msg_ep_rma_ops; +- ep->ep_fid.atomic = &fi_ibv_msg_ep_atomic_ops; +- +- ofi_atomic_initialize32(&ep->unsignaled_send_cnt, 0); +- ofi_atomic_initialize32(&ep->comp_pending, 0); +- /* The `send_signal_thr` and `send_comp_thr` values are necessary to avoid +- * overrun the send queue size */ +- /* A signaled Send Request must be posted when the `send_signal_thr` +- * value is reached */ +- ep->send_signal_thr = (ep->info->tx_attr->size * 4) / 5; +- /* Polling of CQ for internal signaled Send Requests must be initiated upon +- * reaching the `send_comp_thr` value */ +- ep->send_comp_thr = (ep->info->tx_attr->size * 9) / 10; +- +- ep->domain = dom; +- *ep_fid = &ep->ep_fid; +- +- return FI_SUCCESS; +-err3: +- fastlock_destroy(&ep->wre_lock); +-err2: +- rdma_destroy_ep(ep->id); +-err1: +- fi_ibv_free_msg_ep(ep); +- return ret; +-} +- +-static int fi_ibv_pep_bind(fid_t fid, struct fid *bfid, uint64_t flags) +-{ +- struct fi_ibv_pep *pep; +- int ret; +- +- pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); +- if (bfid->fclass != FI_CLASS_EQ) +- return -FI_EINVAL; +- +- pep->eq = container_of(bfid, struct fi_ibv_eq, eq_fid.fid); +- ret = rdma_migrate_id(pep->id, pep->eq->channel); +- if (ret) +- return -errno; +- +- return 0; +-} +- +-static int fi_ibv_pep_control(struct fid *fid, int command, void *arg) +-{ +- struct fi_ibv_pep *pep; +- int ret = 0; +- +- switch (fid->fclass) { +- case FI_CLASS_PEP: +- pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); +- switch (command) { +- case FI_BACKLOG: +- if (!arg) +- return -FI_EINVAL; +- pep->backlog = *(int *) arg; +- break; +- default: +- ret = -FI_ENOSYS; +- break; +- } +- break; +- default: +- ret = -FI_ENOSYS; +- break; +- } +- +- return ret; +-} +- +-static int fi_ibv_pep_close(fid_t fid) +-{ +- struct fi_ibv_pep *pep; +- +- pep = container_of(fid, struct fi_ibv_pep, pep_fid.fid); +- if (pep->id) +- rdma_destroy_ep(pep->id); +- +- fi_freeinfo(pep->info); +- free(pep); +- return 0; +-} +- +-static struct fi_ops fi_ibv_pep_fi_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_pep_close, +- .bind = fi_ibv_pep_bind, +- .control = fi_ibv_pep_control, +- .ops_open = fi_no_ops_open, +-}; +- +-static struct fi_ops_ep fi_ibv_pep_ops = { +- .size = sizeof(struct fi_ops_ep), +- .getopt = fi_ibv_msg_ep_getopt, +- .setopt = fi_no_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-int fi_ibv_passive_ep(struct fid_fabric *fabric, struct fi_info *info, +- struct fid_pep **pep, void *context) +-{ +- struct fi_ibv_pep *_pep; +- int ret; +- +- _pep = calloc(1, sizeof *_pep); +- if (!_pep) +- return -FI_ENOMEM; +- +- if (!(_pep->info = fi_dupinfo(info))) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- +- ret = rdma_create_id(NULL, &_pep->id, &_pep->pep_fid.fid, RDMA_PS_TCP); +- if (ret) { +- VERBS_INFO(FI_LOG_DOMAIN, "Unable to create rdma_cm_id\n"); +- goto err2; +- } +- +- if (info->src_addr) { +- ret = rdma_bind_addr(_pep->id, (struct sockaddr *)info->src_addr); +- if (ret) { +- VERBS_INFO(FI_LOG_DOMAIN, "Unable to bind address to rdma_cm_id\n"); +- goto err3; +- } +- _pep->bound = 1; +- } +- +- _pep->pep_fid.fid.fclass = FI_CLASS_PEP; +- _pep->pep_fid.fid.context = context; +- _pep->pep_fid.fid.ops = &fi_ibv_pep_fi_ops; +- _pep->pep_fid.ops = &fi_ibv_pep_ops; +- _pep->pep_fid.cm = fi_ibv_pep_ops_cm(_pep); +- +- _pep->src_addrlen = info->src_addrlen; +- +- *pep = &_pep->pep_fid; +- return 0; +- +-err3: +- rdma_destroy_id(_pep->id); +-err2: +- fi_freeinfo(_pep->info); +-err1: +- free(_pep); +- return ret; +-} +- +-#define VERBS_SIGNAL_SEND(ep) \ +- (ofi_atomic_get32(&ep->unsignaled_send_cnt) >= (ep)->send_signal_thr && \ +- !ofi_atomic_get32(&ep->comp_pending)) +- +-static inline int +-fi_ibv_signal_send(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr) +-{ +- struct fi_ibv_msg_epe *epe; +- +- fastlock_acquire(&ep->scq->lock); +- if (VERBS_SIGNAL_SEND(ep)) { +- epe = util_buf_alloc(ep->scq->epe_pool); +- if (!epe) { +- fastlock_release(&ep->scq->lock); +- return -FI_ENOMEM; +- } +- memset(epe, 0, sizeof(*epe)); +- wr->send_flags |= IBV_SEND_SIGNALED; +- wr->wr_id = ep->ep_id; +- epe->ep = ep; +- slist_insert_tail(&epe->entry, &ep->scq->ep_list); +- ofi_atomic_inc32(&ep->comp_pending); +- } +- fastlock_release(&ep->scq->lock); +- return 0; +-} +- +-static inline int +-fi_ibv_prepare_signal_send(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, +- struct fi_ibv_wre **wre, void *context) +-{ +- fastlock_acquire(&ep->wre_lock); +- *wre = util_buf_alloc(ep->wre_pool); +- if (OFI_UNLIKELY(!*wre)) { +- fastlock_release(&ep->wre_lock); +- return -FI_EAGAIN; +- } +- dlist_insert_tail(&(*wre)->entry, &ep->wre_list); +- fastlock_release(&ep->wre_lock); +- +- (*wre)->context = context; +- (*wre)->ep = ep; +- (*wre)->wr_type = IBV_SEND_WR; +- wr->wr_id = (uintptr_t)*wre; +- +- assert((wr->wr_id & ep->scq->wr_id_mask) != ep->scq->send_signal_wr_id); +- ofi_atomic_set32(&ep->unsignaled_send_cnt, 0); +- +- return FI_SUCCESS; +-} +- +-static int fi_ibv_reap_comp(struct fi_ibv_msg_ep *ep) +-{ +- struct fi_ibv_wce *wce = NULL; +- int got_wc = 0; +- int ret = 0; +- +- fastlock_acquire(&ep->scq->lock); +- while (ofi_atomic_get32(&ep->comp_pending) > 0) { +- if (!wce) { +- wce = util_buf_alloc(ep->scq->wce_pool); +- if (!wce) { +- fastlock_release(&ep->scq->lock); +- return -FI_ENOMEM; +- } +- memset(wce, 0, sizeof(*wce)); +- } +- ret = fi_ibv_poll_cq(ep->scq, &wce->wc); +- if (ret < 0) { +- VERBS_WARN(FI_LOG_EP_DATA, +- "Failed to read completion for signaled send\n"); +- util_buf_release(ep->scq->wce_pool, wce); +- fastlock_release(&ep->scq->lock); +- return ret; +- } else if (ret > 0) { +- slist_insert_tail(&wce->entry, &ep->scq->wcq); +- got_wc = 1; +- wce = NULL; +- } +- } +- if (wce) +- util_buf_release(ep->scq->wce_pool, wce); +- +- if (got_wc && ep->scq->channel) +- ret = fi_ibv_cq_signal(&ep->scq->cq_fid); +- +- fastlock_release(&ep->scq->lock); +- return ret; +-} +- +-/* WR must be filled out by now except for context */ +-static inline ssize_t +-fi_ibv_send(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, void *context) +-{ +- struct fi_ibv_wre *wre = NULL; +- int ret; +- +- if (wr->send_flags & IBV_SEND_SIGNALED) { +- ret = fi_ibv_prepare_signal_send(ep, wr, &wre, context); +- if (OFI_UNLIKELY(ret)) +- return ret; +- } else { +- if (VERBS_SIGNAL_SEND(ep)) { +- ret = fi_ibv_signal_send(ep, wr); +- if (ret) +- return ret; +- } else { +- wr->wr_id = 0ULL; +- if (ofi_atomic_inc32(&ep->unsignaled_send_cnt) >= +- ep->send_comp_thr) { +- ret = fi_ibv_reap_comp(ep); +- if (ret) +- return ret; +- } +- } +- } +- +- return FI_IBV_INVOKE_POST(send, send, ep->id->qp, wr, +- FI_IBV_RELEASE_WRE(ep, wre)); +-} +- +-static inline ssize_t +-fi_ibv_send_buf(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, +- const void *buf, size_t len, void *desc, void *context) +-{ +- struct ibv_sge sge = fi_ibv_init_sge(buf, len, desc); +- +- wr->sg_list = &sge; +- wr->num_sge = 1; +- +- return fi_ibv_send(ep, wr, context); +-} +- +-static inline ssize_t +-fi_ibv_send_buf_inline(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, +- const void *buf, size_t len) +-{ +- struct ibv_sge sge = fi_ibv_init_sge_inline(buf, len); +- +- wr->sg_list = &sge; +- wr->num_sge = 1; +- +- return fi_ibv_send(ep, wr, NULL); +-} +- +-static inline ssize_t +-fi_ibv_send_iov_flags(struct fi_ibv_msg_ep *ep, struct ibv_send_wr *wr, +- const struct iovec *iov, void **desc, int count, +- void *context, uint64_t flags) +-{ +- size_t len = 0; +- +- if (!desc) +- fi_ibv_set_sge_iov_inline(wr->sg_list, iov, count, len); +- else +- fi_ibv_set_sge_iov(wr->sg_list, iov, count, desc, len); +- +- wr->num_sge = count; +- wr->send_flags = VERBS_INJECT_FLAGS(ep, len, flags) | VERBS_COMP_FLAGS(ep, flags); +- +- if (flags & FI_FENCE) +- wr->send_flags |= IBV_SEND_FENCE; +- +- return fi_ibv_send(ep, wr, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct fi_ibv_wre *wre; +- struct ibv_sge *sge = NULL; +- struct ibv_recv_wr wr = { +- .num_sge = msg->iov_count, +- .next = NULL, +- }; +- size_t i; +- +- assert(ep->rcq); +- +- fastlock_acquire(&ep->wre_lock); +- wre = util_buf_alloc(ep->wre_pool); +- if (OFI_UNLIKELY(!wre)) { +- fastlock_release(&ep->wre_lock); +- return -FI_EAGAIN; +- } +- dlist_insert_tail(&wre->entry, &ep->wre_list); +- fastlock_release(&ep->wre_lock); +- +- wre->ep = ep; +- wre->srq = NULL; +- wre->context = msg->context; +- wre->wr_type = IBV_RECV_WR; +- +- wr.wr_id = (uintptr_t)wre; +- sge = alloca(sizeof(*sge) * msg->iov_count); +- for (i = 0; i < msg->iov_count; i++) { +- sge[i].addr = (uintptr_t)msg->msg_iov[i].iov_base; +- sge[i].length = (uint32_t)msg->msg_iov[i].iov_len; +- sge[i].lkey = (uint32_t)(uintptr_t)(msg->desc[i]); +- } +- wr.sg_list = sge; +- +- return FI_IBV_INVOKE_POST(recv, recv, ep->id->qp, &wr, +- FI_IBV_RELEASE_WRE(ep, wre)); +-} +- +-static ssize_t +-fi_ibv_msg_ep_recv(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = buf, +- .iov_len = len, +- }; +- struct fi_msg msg = { +- .msg_iov = &iov, +- .desc = &desc, +- .iov_count = 1, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_msg_ep_recvmsg(ep, &msg, 0); +-} +- +-static ssize_t +-fi_ibv_msg_ep_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) +-{ +- struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_msg_ep_recvmsg(ep, &msg, 0); +-} +- +-static ssize_t +-fi_ibv_msg_ep_sendmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { 0 }; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- wr.opcode = IBV_WR_SEND_WITH_IMM; +- wr.imm_data = htonl((uint32_t)msg->data); +- } else { +- wr.opcode = IBV_WR_SEND; +- } +- +- return fi_ibv_send_msg(ep, &wr, msg, flags); +-} +- +-static ssize_t +-fi_ibv_msg_ep_send(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_SEND, +- .send_flags = VERBS_INJECT(ep, len) | VERBS_COMP(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_senddata(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, uint64_t data, fi_addr_t dest_addr, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_SEND_WITH_IMM, +- .imm_data = htonl((uint32_t)data), +- .send_flags = VERBS_INJECT(ep, len) | VERBS_COMP(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_sendv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, void *context) +-{ +- struct fi_ibv_msg_ep *ep; +- struct ibv_send_wr wr = { 0 }; +- +- wr.opcode = IBV_WR_SEND; +- +- ep = container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- return fi_ibv_send_iov(ep, &wr, iov, desc, count, context); +-} +- +-static ssize_t fi_ibv_msg_ep_inject(struct fid_ep *ep_fid, const void *buf, size_t len, +- fi_addr_t dest_addr) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_SEND, +- .send_flags = IBV_SEND_INLINE, +- }; +- +- return fi_ibv_send_buf_inline(ep, &wr, buf, len); +-} +- +-static ssize_t fi_ibv_msg_ep_injectdata(struct fid_ep *ep_fid, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_SEND_WITH_IMM, +- .imm_data = htonl((uint32_t)data), +- .send_flags = IBV_SEND_INLINE, +- }; +- +- return fi_ibv_send_buf_inline(ep, &wr, buf, len); +-} +- +-struct fi_ops_msg fi_ibv_msg_ep_msg_ops = { +- .size = sizeof(struct fi_ops_msg), +- .recv = fi_ibv_msg_ep_recv, +- .recvv = fi_ibv_msg_ep_recvv, +- .recvmsg = fi_ibv_msg_ep_recvmsg, +- .send = fi_ibv_msg_ep_send, +- .sendv = fi_ibv_msg_ep_sendv, +- .sendmsg = fi_ibv_msg_ep_sendmsg, +- .inject = fi_ibv_msg_ep_inject, +- .senddata = fi_ibv_msg_ep_senddata, +- .injectdata = fi_ibv_msg_ep_injectdata, +-}; +- +-struct fi_ops_msg fi_ibv_msg_srq_ep_msg_ops = { +- .size = sizeof(struct fi_ops_msg), +- .recv = fi_no_msg_recv, +- .recvv = fi_no_msg_recvv, +- .recvmsg = fi_no_msg_recvmsg, +- .send = fi_ibv_msg_ep_send, +- .sendv = fi_ibv_msg_ep_sendv, +- .sendmsg = fi_ibv_msg_ep_sendmsg, +- .inject = fi_ibv_msg_ep_inject, +- .senddata = fi_ibv_msg_ep_senddata, +- .injectdata = fi_ibv_msg_ep_injectdata, +-}; +- +-#define VERBS_COMP_READ_FLAGS(ep, flags) \ +- ((!VERBS_SELECTIVE_COMP(ep) || (flags & \ +- (FI_COMPLETION | FI_TRANSMIT_COMPLETE | FI_DELIVERY_COMPLETE))) ? \ +- IBV_SEND_SIGNALED : 0) +-#define VERBS_COMP_READ(ep) \ +- VERBS_COMP_READ_FLAGS(ep, ep->info->tx_attr->op_flags) +- +-static ssize_t +-fi_ibv_msg_ep_rma_write(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = VERBS_INJECT(ep, len) | VERBS_COMP(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_writev(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key +- }; +- +- return fi_ibv_send_iov(ep, &wr, iov, desc, count, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .wr.rdma.remote_addr = msg->rma_iov->addr, +- .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, +- }; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; +- wr.imm_data = htonl((uint32_t)msg->data); +- } else { +- wr.opcode = IBV_WR_RDMA_WRITE; +- } +- +- return fi_ibv_send_msg(ep, &wr, msg, flags); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_read(struct fid_ep *ep_fid, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_READ, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = VERBS_COMP_READ(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_readv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_READ, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = VERBS_COMP_READ(ep), +- .num_sge = count, +- }; +- size_t len = 0; +- +- fi_ibv_set_sge_iov(wr.sg_list, iov, count, desc, len); +- +- return fi_ibv_send(ep, &wr, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, +- uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_READ, +- .wr.rdma.remote_addr = msg->rma_iov->addr, +- .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, +- .send_flags = VERBS_COMP_READ_FLAGS(ep, flags), +- .num_sge = msg->iov_count, +- }; +- size_t len = 0; +- +- fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc, len); +- +- return fi_ibv_send(ep, &wr, msg->context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, +- void *desc, uint64_t data, fi_addr_t dest_addr, +- uint64_t addr, uint64_t key, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, +- .imm_data = htonl((uint32_t)data), +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = VERBS_INJECT(ep, len) | VERBS_COMP(ep), +- }; +- +- return fi_ibv_send_buf(ep, &wr, buf, len, desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_inject_write(struct fid_ep *ep_fid, const void *buf, size_t len, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = IBV_SEND_INLINE, +- }; +- +- return fi_ibv_send_buf_inline(ep, &wr, buf, len); +-} +- +-static ssize_t +-fi_ibv_msg_ep_rma_inject_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, +- uint64_t data, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, +- .imm_data = htonl((uint32_t)data), +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)key, +- .send_flags = IBV_SEND_INLINE, +- }; +- +- return fi_ibv_send_buf_inline(ep, &wr, buf, len); +-} +- +-struct fi_ops_rma fi_ibv_msg_ep_rma_ops = { +- .size = sizeof(struct fi_ops_rma), +- .read = fi_ibv_msg_ep_rma_read, +- .readv = fi_ibv_msg_ep_rma_readv, +- .readmsg = fi_ibv_msg_ep_rma_readmsg, +- .write = fi_ibv_msg_ep_rma_write, +- .writev = fi_ibv_msg_ep_rma_writev, +- .writemsg = fi_ibv_msg_ep_rma_writemsg, +- .inject = fi_ibv_msg_ep_rma_inject_write, +- .writedata = fi_ibv_msg_ep_rma_writedata, +- .injectdata = fi_ibv_msg_ep_rma_inject_writedata, +-}; +- +-#define fi_ibv_atomicvalid(name, flags) \ +-static int fi_ibv_msg_ep_atomic_ ## name(struct fid_ep *ep_fid, \ +- enum fi_datatype datatype, \ +- enum fi_op op, size_t *count) \ +-{ \ +- struct fi_ibv_msg_ep *ep = container_of(ep_fid, \ +- struct fi_ibv_msg_ep, \ +- ep_fid); \ +- struct fi_atomic_attr attr; \ +- int ret; \ +- \ +- ret = fi_ibv_query_atomic(&ep->domain->util_domain.domain_fid, \ +- datatype, op, &attr, flags); \ +- if (!ret) \ +- *count = attr.count; \ +- return ret; \ +-} \ +- +-fi_ibv_atomicvalid(writevalid, 0); +-fi_ibv_atomicvalid(readwritevalid, FI_FETCH_ATOMIC); +-fi_ibv_atomicvalid(compwritevalid, FI_COMPARE_ATOMIC); +- +-int fi_ibv_query_atomic(struct fid_domain *domain_fid, enum fi_datatype datatype, +- enum fi_op op, struct fi_atomic_attr *attr, +- uint64_t flags) +-{ +- struct fi_ibv_domain *domain = container_of(domain_fid, +- struct fi_ibv_domain, +- util_domain.domain_fid); +- char *log_str_fetch = "fi_fetch_atomic with FI_SUM op"; +- char *log_str_comp = "fi_compare_atomic"; +- char *log_str; +- +- if (flags & FI_TAGGED) +- return -FI_ENOSYS; +- +- if ((flags & FI_FETCH_ATOMIC) && (flags & FI_COMPARE_ATOMIC)) +- return -FI_EBADFLAGS; +- +- if (!flags) { +- switch (op) { +- case FI_ATOMIC_WRITE: +- break; +- default: +- return -FI_ENOSYS; +- } +- } else { +- if (flags & FI_FETCH_ATOMIC) { +- switch (op) { +- case FI_ATOMIC_READ: +- goto check_datatype; +- case FI_SUM: +- log_str = log_str_fetch; +- break; +- default: +- return -FI_ENOSYS; +- } +- } else if (flags & FI_COMPARE_ATOMIC) { +- if (op != FI_CSWAP) +- return -FI_ENOSYS; +- log_str = log_str_comp; +- } else { +- return -FI_EBADFLAGS; +- } +- if (domain->info->tx_attr->op_flags & FI_INJECT) { +- VERBS_INFO(FI_LOG_EP_DATA, +- "FI_INJECT not supported for %s\n", log_str); +- return -FI_EINVAL; +- } +- } +-check_datatype: +- switch (datatype) { +- case FI_INT64: +- case FI_UINT64: +-#if __BITS_PER_LONG == 64 +- case FI_DOUBLE: +- case FI_FLOAT: +-#endif +- break; +- default: +- return -FI_EINVAL; +- } +- +- attr->size = ofi_datatype_size(datatype); +- if (attr->size == 0) +- return -FI_EINVAL; +- +- attr->count = 1; +- return 0; +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_write(struct fid_ep *ep_fid, const void *buf, size_t count, +- void *desc, fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, enum fi_op op, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_RDMA_WRITE, +- .wr.rdma.remote_addr = addr, +- .wr.rdma.rkey = (uint32_t)(uintptr_t)key, +- .send_flags = VERBS_INJECT(ep, sizeof(uint64_t)) | +- VERBS_COMP(ep) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(count != 1)) +- return -FI_E2BIG; +- +- if (OFI_UNLIKELY(op != FI_ATOMIC_WRITE)) +- return -FI_ENOSYS; +- +- count_copy = count; +- +- ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, datatype, op, &count_copy); +- if (ret) +- return ret; +- +- return fi_ibv_send_buf(ep, &wr, buf, sizeof(uint64_t), desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_writev(struct fid_ep *ep, +- const struct fi_ioc *iov, void **desc, size_t count, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, enum fi_op op, void *context) +-{ +- if (OFI_UNLIKELY(iov->count != 1)) +- return -FI_E2BIG; +- +- return fi_ibv_msg_ep_atomic_write(ep, iov->addr, count, desc[0], +- dest_addr, addr, key, datatype, op, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_writemsg(struct fid_ep *ep_fid, +- const struct fi_msg_atomic *msg, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .wr.rdma.remote_addr = msg->rma_iov->addr, +- .wr.rdma.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, +- .send_flags = VERBS_INJECT_FLAGS(ep, sizeof(uint64_t), flags) | +- VERBS_COMP_FLAGS(ep, flags) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) +- return -FI_E2BIG; +- +- if (OFI_UNLIKELY(msg->op != FI_ATOMIC_WRITE)) +- return -FI_ENOSYS; +- +- count_copy = msg->iov_count; +- +- ret = fi_ibv_msg_ep_atomic_writevalid(ep_fid, msg->datatype, msg->op, +- &count_copy); +- if (ret) +- return ret; +- +- if (flags & FI_REMOTE_CQ_DATA) { +- wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; +- wr.imm_data = htonl((uint32_t)msg->data); +- } else { +- wr.opcode = IBV_WR_RDMA_WRITE; +- } +- +- return fi_ibv_send_buf(ep, &wr, msg->msg_iov->addr, sizeof(uint64_t), +- msg->desc[0], msg->context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_readwrite(struct fid_ep *ep_fid, const void *buf, size_t count, +- void *desc, void *result, void *result_desc, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, +- enum fi_op op, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .send_flags = VERBS_COMP(ep) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(count != 1)) +- return -FI_E2BIG; +- +- count_copy = count; +- +- ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, datatype, op, +- &count_copy); +- if (ret) +- return ret; +- +- switch (op) { +- case FI_ATOMIC_READ: +- wr.opcode = IBV_WR_RDMA_READ; +- wr.wr.rdma.remote_addr = addr; +- wr.wr.rdma.rkey = (uint32_t)(uintptr_t)key; +- break; +- case FI_SUM: +- wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; +- wr.wr.atomic.remote_addr = addr; +- wr.wr.atomic.compare_add = (uintptr_t)buf; +- wr.wr.atomic.swap = 0; +- wr.wr.atomic.rkey = (uint32_t)(uintptr_t)key; +- break; +- default: +- return -FI_ENOSYS; +- } +- +- return fi_ibv_send_buf(ep, &wr, result, sizeof(uint64_t), result_desc, +- context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_readwritev(struct fid_ep *ep, const struct fi_ioc *iov, +- void **desc, size_t count, +- struct fi_ioc *resultv, void **result_desc, +- size_t result_count, fi_addr_t dest_addr, uint64_t addr, +- uint64_t key, enum fi_datatype datatype, +- enum fi_op op, void *context) +-{ +- if (OFI_UNLIKELY(iov->count != 1)) +- return -FI_E2BIG; +- +- return fi_ibv_msg_ep_atomic_readwrite(ep, iov->addr, count, +- desc[0], resultv->addr, result_desc[0], +- dest_addr, addr, key, datatype, op, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_readwritemsg(struct fid_ep *ep_fid, +- const struct fi_msg_atomic *msg, +- struct fi_ioc *resultv, void **result_desc, +- size_t result_count, uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .send_flags = VERBS_COMP_FLAGS(ep, flags) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) +- return -FI_E2BIG; +- +- count_copy = msg->iov_count; +- +- ret = fi_ibv_msg_ep_atomic_readwritevalid(ep_fid, msg->datatype, msg->op, +- &count_copy); +- if (ret) +- return ret; +- +- switch (msg->op) { +- case FI_ATOMIC_READ: +- wr.opcode = IBV_WR_RDMA_READ; +- wr.wr.rdma.remote_addr = msg->rma_iov->addr; +- wr.wr.rdma.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; +- break; +- case FI_SUM: +- wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; +- wr.wr.atomic.remote_addr = msg->rma_iov->addr; +- wr.wr.atomic.compare_add = (uintptr_t) msg->addr; +- wr.wr.atomic.swap = 0; +- wr.wr.atomic.rkey = (uint32_t) (uintptr_t) msg->rma_iov->key; +- break; +- default: +- return -FI_ENOSYS; +- } +- +- if (flags & FI_REMOTE_CQ_DATA) +- wr.imm_data = htonl((uint32_t) msg->data); +- +- return fi_ibv_send_buf(ep, &wr, resultv->addr, sizeof(uint64_t), +- result_desc[0], msg->context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_compwrite(struct fid_ep *ep_fid, const void *buf, size_t count, +- void *desc, const void *compare, +- void *compare_desc, void *result, +- void *result_desc, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, +- enum fi_op op, void *context) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, +- .wr.atomic.remote_addr = addr, +- .wr.atomic.compare_add = (uintptr_t)compare, +- .wr.atomic.swap = (uintptr_t)buf, +- .wr.atomic.rkey = (uint32_t)(uintptr_t)key, +- .send_flags = VERBS_COMP(ep) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(count != 1)) +- return -FI_E2BIG; +- +- count_copy = count; +- +- ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, datatype, op, &count_copy); +- if (ret) +- return ret; +- +- return fi_ibv_send_buf(ep, &wr, result, sizeof(uint64_t), result_desc, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_compwritev(struct fid_ep *ep, const struct fi_ioc *iov, +- void **desc, size_t count, +- const struct fi_ioc *comparev, +- void **compare_desc, size_t compare_count, +- struct fi_ioc *resultv, void **result_desc, +- size_t result_count, +- fi_addr_t dest_addr, uint64_t addr, uint64_t key, +- enum fi_datatype datatype, +- enum fi_op op, void *context) +-{ +- if (OFI_UNLIKELY(iov->count != 1)) +- return -FI_E2BIG; +- +- return fi_ibv_msg_ep_atomic_compwrite(ep, iov->addr, count, desc[0], +- comparev->addr, compare_desc[0], resultv->addr, +- result_desc[0], dest_addr, addr, key, +- datatype, op, context); +-} +- +-static ssize_t +-fi_ibv_msg_ep_atomic_compwritemsg(struct fid_ep *ep_fid, +- const struct fi_msg_atomic *msg, +- const struct fi_ioc *comparev, +- void **compare_desc, size_t compare_count, +- struct fi_ioc *resultv, +- void **result_desc, size_t result_count, +- uint64_t flags) +-{ +- struct fi_ibv_msg_ep *ep = +- container_of(ep_fid, struct fi_ibv_msg_ep, ep_fid); +- struct ibv_send_wr wr = { +- .opcode = IBV_WR_ATOMIC_CMP_AND_SWP, +- .wr.atomic.remote_addr = msg->rma_iov->addr, +- .wr.atomic.compare_add = (uintptr_t)comparev->addr, +- .wr.atomic.swap = (uintptr_t)msg->addr, +- .wr.atomic.rkey = (uint32_t)(uintptr_t)msg->rma_iov->key, +- .send_flags = VERBS_COMP_FLAGS(ep, flags) | IBV_SEND_FENCE, +- }; +- size_t count_copy; +- int ret; +- +- if (OFI_UNLIKELY(msg->iov_count != 1 || msg->msg_iov->count != 1)) +- return -FI_E2BIG; +- +- count_copy = msg->iov_count; +- +- ret = fi_ibv_msg_ep_atomic_compwritevalid(ep_fid, msg->datatype, msg->op, +- &count_copy); +- if (ret) +- return ret; +- +- if (flags & FI_REMOTE_CQ_DATA) +- wr.imm_data = htonl((uint32_t) msg->data); +- +- return fi_ibv_send_buf(ep, &wr, resultv->addr, sizeof(uint64_t), +- result_desc[0], msg->context); +-} +- +-struct fi_ops_atomic fi_ibv_msg_ep_atomic_ops = { +- .size = sizeof(struct fi_ops_atomic), +- .write = fi_ibv_msg_ep_atomic_write, +- .writev = fi_ibv_msg_ep_atomic_writev, +- .writemsg = fi_ibv_msg_ep_atomic_writemsg, +- .inject = fi_no_atomic_inject, +- .readwrite = fi_ibv_msg_ep_atomic_readwrite, +- .readwritev = fi_ibv_msg_ep_atomic_readwritev, +- .readwritemsg = fi_ibv_msg_ep_atomic_readwritemsg, +- .compwrite = fi_ibv_msg_ep_atomic_compwrite, +- .compwritev = fi_ibv_msg_ep_atomic_compwritev, +- .compwritemsg = fi_ibv_msg_ep_atomic_compwritemsg, +- .writevalid = fi_ibv_msg_ep_atomic_writevalid, +- .readwritevalid = fi_ibv_msg_ep_atomic_readwritevalid, +- .compwritevalid = fi_ibv_msg_ep_atomic_compwritevalid +-}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_rma.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_rma.c +new file mode 100644 +index 000000000..702c8959d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_rma.c +@@ -0,0 +1,533 @@ ++/* ++ * Copyright (c) 2013-2018 Intel Corporation, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include "config.h" ++ ++#include "fi_verbs.h" ++ ++ ++#define VERBS_COMP_READ_FLAGS(ep, flags, context) \ ++ (((ep)->util_ep.tx_op_flags | (flags)) & \ ++ (FI_COMPLETION | FI_TRANSMIT_COMPLETE | \ ++ FI_DELIVERY_COMPLETE) ? context : VERBS_NO_COMP_FLAG) ++ ++#define VERBS_COMP_READ(ep, context) \ ++ VERBS_COMP_READ_FLAGS(ep, 0, context) ++ ++static ssize_t ++fi_ibv_msg_ep_rma_write(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_writev(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ }; ++ ++ return fi_ibv_send_iov(ep, &wr, iov, desc, count); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_writemsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, ++ }; ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_RDMA_WRITE; ++ } ++ ++ return fi_ibv_send_msg(ep, &wr, msg, flags); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_read(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_readv(struct fid_ep *ep_fid, const struct iovec *iov, void **desc, ++ size_t count, fi_addr_t src_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .num_sge = count, ++ }; ++ ++ fi_ibv_set_sge_iov(wr.sg_list, iov, count, desc); ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &wr); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_readmsg(struct fid_ep *ep_fid, const struct fi_msg_rma *msg, ++ uint64_t flags) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ_FLAGS(ep, flags, (uintptr_t)msg->context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, ++ .num_sge = msg->iov_count, ++ }; ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &wr); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = VERBS_INJECT(ep, len), ++ }; ++ ++ return fi_ibv_send_buf(ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_inject_write(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_rma_write_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct fi_ibv_ep *ep; ++ ++ ep = container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ++ ep->wrs->rma_wr.wr.rdma.remote_addr = addr; ++ ep->wrs->rma_wr.wr.rdma.rkey = (uint32_t) key; ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ return fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->rma_wr); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_inject_writedata(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) ++{ ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ return fi_ibv_send_buf_inline(ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_msg_ep_rma_inject_writedata_fast(struct fid_ep *ep_fid, const void *buf, size_t len, ++ uint64_t data, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) ++{ ++ ssize_t ret; ++ struct fi_ibv_ep *ep = ++ container_of(ep_fid, struct fi_ibv_ep, util_ep.ep_fid); ++ ep->wrs->rma_wr.wr.rdma.remote_addr = addr; ++ ep->wrs->rma_wr.wr.rdma.rkey = (uint32_t) key; ++ ++ ep->wrs->rma_wr.imm_data = htonl((uint32_t) data); ++ ep->wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ ++ ep->wrs->sge.addr = (uintptr_t) buf; ++ ep->wrs->sge.length = (uint32_t) len; ++ ++ ret = fi_ibv_send_poll_cq_if_needed(ep, &ep->wrs->rma_wr); ++ ep->wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE; ++ return ret; ++} ++ ++struct fi_ops_rma fi_ibv_msg_ep_rma_ops_ts = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_ibv_msg_ep_rma_read, ++ .readv = fi_ibv_msg_ep_rma_readv, ++ .readmsg = fi_ibv_msg_ep_rma_readmsg, ++ .write = fi_ibv_msg_ep_rma_write, ++ .writev = fi_ibv_msg_ep_rma_writev, ++ .writemsg = fi_ibv_msg_ep_rma_writemsg, ++ .inject = fi_ibv_msg_ep_rma_inject_write, ++ .writedata = fi_ibv_msg_ep_rma_writedata, ++ .injectdata = fi_ibv_msg_ep_rma_inject_writedata, ++}; ++ ++struct fi_ops_rma fi_ibv_msg_ep_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_ibv_msg_ep_rma_read, ++ .readv = fi_ibv_msg_ep_rma_readv, ++ .readmsg = fi_ibv_msg_ep_rma_readmsg, ++ .write = fi_ibv_msg_ep_rma_write, ++ .writev = fi_ibv_msg_ep_rma_writev, ++ .writemsg = fi_ibv_msg_ep_rma_writemsg, ++ .inject = fi_ibv_rma_write_fast, ++ .writedata = fi_ibv_msg_ep_rma_writedata, ++ .injectdata = fi_ibv_msg_ep_rma_inject_writedata_fast, ++}; ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, void *desc, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = VERBS_INJECT(&ep->base_ep, len), ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_writev(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)context, ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_iov(&ep->base_ep, &wr, iov, desc, count); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_writemsg(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = (uintptr_t)msg->context, ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ if (flags & FI_REMOTE_CQ_DATA) { ++ wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ wr.imm_data = htonl((uint32_t)msg->data); ++ } else { ++ wr.opcode = IBV_WR_RDMA_WRITE; ++ } ++ ++ return fi_ibv_send_msg(&ep->base_ep, &wr, msg, flags); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_read(struct fid_ep *ep_fid, void *buf, size_t len, ++ void *desc, fi_addr_t src_addr, uint64_t addr, ++ uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_readv(struct fid_ep *ep_fid, const struct iovec *iov, ++ void **desc, size_t count, fi_addr_t src_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .num_sge = count, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, iov, count, desc); ++ ++ return fi_ibv_send_poll_cq_if_needed(&ep->base_ep, &wr); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_readmsg(struct fid_ep *ep_fid, ++ const struct fi_msg_rma *msg, uint64_t flags) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP_READ_FLAGS(&ep->base_ep, flags, ++ (uintptr_t)msg->context), ++ .opcode = IBV_WR_RDMA_READ, ++ .wr.rdma.remote_addr = msg->rma_iov->addr, ++ .wr.rdma.rkey = (uint32_t)msg->rma_iov->key, ++ .num_sge = msg->iov_count, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ fi_ibv_set_sge_iov(wr.sg_list, msg->msg_iov, msg->iov_count, msg->desc); ++ ++ return fi_ibv_send_poll_cq_if_needed(&ep->base_ep, &wr); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_writedata(struct fid_ep *ep_fid, const void *buf, ++ size_t len, void *desc, uint64_t data, fi_addr_t dest_addr, ++ uint64_t addr, uint64_t key, void *context) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_COMP(&ep->base_ep, (uintptr_t)context), ++ .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = VERBS_INJECT(&ep->base_ep, len), ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf(&ep->base_ep, &wr, buf, len, desc); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_inject_write(struct fid_ep *ep_fid, const void *buf, ++ size_t len, fi_addr_t dest_addr, uint64_t addr, ++ uint64_t key) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_RDMA_WRITE, ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf_inline(&ep->base_ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_xrc_rma_write_fast(struct fid_ep *ep_fid, const void *buf, ++ size_t len, fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ ++ ep->base_ep.wrs->rma_wr.wr.rdma.remote_addr = addr; ++ ep->base_ep.wrs->rma_wr.wr.rdma.rkey = (uint32_t) key; ++ FI_IBV_SET_REMOTE_SRQN(ep->base_ep.wrs->rma_wr, ep->peer_srqn); ++ ep->base_ep.wrs->sge.addr = (uintptr_t) buf; ++ ep->base_ep.wrs->sge.length = (uint32_t) len; ++ ++ return fi_ibv_send_poll_cq_if_needed(&ep->base_ep, ++ &ep->base_ep.wrs->rma_wr); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_inject_writedata(struct fid_ep *ep_fid, ++ const void *buf, size_t len, uint64_t data, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ ++ struct ibv_send_wr wr = { ++ .wr_id = VERBS_NO_COMP_FLAG, ++ .opcode = IBV_WR_RDMA_WRITE_WITH_IMM, ++ .imm_data = htonl((uint32_t)data), ++ .wr.rdma.remote_addr = addr, ++ .wr.rdma.rkey = (uint32_t)key, ++ .send_flags = IBV_SEND_INLINE, ++ }; ++ ++ FI_IBV_SET_REMOTE_SRQN(wr, ep->peer_srqn); ++ ++ return fi_ibv_send_buf_inline(&ep->base_ep, &wr, buf, len); ++} ++ ++static ssize_t ++fi_ibv_msg_xrc_ep_rma_inject_writedata_fast(struct fid_ep *ep_fid, ++ const void *buf, size_t len, uint64_t data, ++ fi_addr_t dest_addr, uint64_t addr, uint64_t key) ++{ ++ ssize_t ret; ++ struct fi_ibv_xrc_ep *ep = container_of(ep_fid, struct fi_ibv_xrc_ep, ++ base_ep.util_ep.ep_fid); ++ ep->base_ep.wrs->rma_wr.wr.rdma.remote_addr = addr; ++ ep->base_ep.wrs->rma_wr.wr.rdma.rkey = (uint32_t) key; ++ FI_IBV_SET_REMOTE_SRQN(ep->base_ep.wrs->rma_wr, ep->peer_srqn); ++ ++ ep->base_ep.wrs->rma_wr.imm_data = htonl((uint32_t) data); ++ ep->base_ep.wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM; ++ ++ ep->base_ep.wrs->sge.addr = (uintptr_t) buf; ++ ep->base_ep.wrs->sge.length = (uint32_t) len; ++ ++ ret = fi_ibv_send_poll_cq_if_needed(&ep->base_ep, ++ &ep->base_ep.wrs->rma_wr); ++ ep->base_ep.wrs->rma_wr.opcode = IBV_WR_RDMA_WRITE; ++ return ret; ++} ++ ++struct fi_ops_rma fi_ibv_msg_xrc_ep_rma_ops_ts = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_ibv_msg_xrc_ep_rma_read, ++ .readv = fi_ibv_msg_xrc_ep_rma_readv, ++ .readmsg = fi_ibv_msg_xrc_ep_rma_readmsg, ++ .write = fi_ibv_msg_xrc_ep_rma_write, ++ .writev = fi_ibv_msg_xrc_ep_rma_writev, ++ .writemsg = fi_ibv_msg_xrc_ep_rma_writemsg, ++ .inject = fi_ibv_msg_xrc_ep_rma_inject_write, ++ .writedata = fi_ibv_msg_xrc_ep_rma_writedata, ++ .injectdata = fi_ibv_msg_xrc_ep_rma_inject_writedata, ++}; ++ ++struct fi_ops_rma fi_ibv_msg_xrc_ep_rma_ops = { ++ .size = sizeof(struct fi_ops_rma), ++ .read = fi_ibv_msg_xrc_ep_rma_read, ++ .readv = fi_ibv_msg_xrc_ep_rma_readv, ++ .readmsg = fi_ibv_msg_xrc_ep_rma_readmsg, ++ .write = fi_ibv_msg_xrc_ep_rma_write, ++ .writev = fi_ibv_msg_xrc_ep_rma_writev, ++ .writemsg = fi_ibv_msg_xrc_ep_rma_writemsg, ++ .inject = fi_ibv_xrc_rma_write_fast, ++ .writedata = fi_ibv_msg_xrc_ep_rma_writedata, ++ .injectdata = fi_ibv_msg_xrc_ep_rma_inject_writedata_fast, ++}; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_srq.c b/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_srq.c +deleted file mode 100644 +index 23712dabf..000000000 +--- a/src/mpid/ch4/netmod/ofi/libfabric/prov/verbs/src/verbs_srq.c ++++ /dev/null +@@ -1,275 +0,0 @@ +-/* +- * Copyright (c) 2013-2015 Intel Corporation, Inc. All rights reserved. +- * +- * This software is available to you under a choice of one of two +- * licenses. You may choose to be licensed under the terms of the GNU +- * General Public License (GPL) Version 2, available from the file +- * COPYING in the main directory of this source tree, or the +- * BSD license below: +- * +- * Redistribution and use in source and binary forms, with or +- * without modification, are permitted provided that the following +- * conditions are met: +- * +- * - Redistributions of source code must retain the above +- * copyright notice, this list of conditions and the following +- * disclaimer. +- * +- * - Redistributions in binary form must reproduce the above +- * copyright notice, this list of conditions and the following +- * disclaimer in the documentation and/or other materials +- * provided with the distribution. +- * +- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +- * SOFTWARE. +- */ +- +-#include "config.h" +- +-#include "fi_verbs.h" +- +-static struct fi_ops_ep fi_ibv_srq_ep_base_ops = { +- .size = sizeof(struct fi_ops_ep), +- .cancel = fi_no_cancel, +- .getopt = fi_no_getopt, +- .setopt = fi_no_setopt, +- .tx_ctx = fi_no_tx_ctx, +- .rx_ctx = fi_no_rx_ctx, +- .rx_size_left = fi_no_rx_size_left, +- .tx_size_left = fi_no_tx_size_left, +-}; +- +-static struct fi_ops_cm fi_ibv_srq_cm_ops = { +- .size = sizeof(struct fi_ops_cm), +- .setname = fi_no_setname, +- .getname = fi_no_getname, +- .getpeer = fi_no_getpeer, +- .connect = fi_no_connect, +- .listen = fi_no_listen, +- .accept = fi_no_accept, +- .reject = fi_no_reject, +- .shutdown = fi_no_shutdown, +- .join = fi_no_join, +-}; +- +-static struct fi_ops_rma fi_ibv_srq_rma_ops = { +- .size = sizeof(struct fi_ops_rma), +- .read = fi_no_rma_read, +- .readv = fi_no_rma_readv, +- .readmsg = fi_no_rma_readmsg, +- .write = fi_no_rma_write, +- .writev = fi_no_rma_writev, +- .writemsg = fi_no_rma_writemsg, +- .inject = fi_no_rma_inject, +- .writedata = fi_no_rma_writedata, +- .injectdata = fi_no_rma_injectdata, +-}; +- +-static struct fi_ops_atomic fi_ibv_srq_atomic_ops = { +- .size = sizeof(struct fi_ops_atomic), +- .write = fi_no_atomic_write, +- .writev = fi_no_atomic_writev, +- .writemsg = fi_no_atomic_writemsg, +- .inject = fi_no_atomic_inject, +- .readwrite = fi_no_atomic_readwrite, +- .readwritev = fi_no_atomic_readwritev, +- .readwritemsg = fi_no_atomic_readwritemsg, +- .compwrite = fi_no_atomic_compwrite, +- .compwritev = fi_no_atomic_compwritev, +- .compwritemsg = fi_no_atomic_compwritemsg, +- .writevalid = fi_no_atomic_writevalid, +- .readwritevalid = fi_no_atomic_readwritevalid, +- .compwritevalid = fi_no_atomic_compwritevalid, +-}; +- +-static ssize_t +-fi_ibv_srq_ep_recvmsg(struct fid_ep *ep_fid, const struct fi_msg *msg, uint64_t flags) +-{ +- struct fi_ibv_srq_ep *ep = +- container_of(ep_fid, struct fi_ibv_srq_ep, ep_fid); +- struct fi_ibv_wre *wre; +- struct ibv_sge *sge = NULL; +- struct ibv_recv_wr wr = { +- .num_sge = msg->iov_count, +- .next = NULL, +- }; +- size_t i; +- +- assert(ep->srq); +- +- fastlock_acquire(&ep->wre_lock); +- wre = util_buf_alloc(ep->wre_pool); +- if (!wre) { +- fastlock_release(&ep->wre_lock); +- return -FI_EAGAIN; +- } +- dlist_insert_tail(&wre->entry, &ep->wre_list); +- fastlock_release(&ep->wre_lock); +- +- wre->srq = ep; +- wre->ep = NULL; +- wre->context = msg->context; +- wre->wr_type = IBV_RECV_WR; +- +- wr.wr_id = (uintptr_t)wre; +- sge = alloca(sizeof(*sge) * msg->iov_count); +- for (i = 0; i < msg->iov_count; i++) { +- sge[i].addr = (uintptr_t)msg->msg_iov[i].iov_base; +- sge[i].length = (uint32_t)msg->msg_iov[i].iov_len; +- sge[i].lkey = (uint32_t)(uintptr_t)(msg->desc[i]); +- } +- wr.sg_list = sge; +- +- return FI_IBV_INVOKE_POST(srq_recv, recv, ep->srq, &wr, +- FI_IBV_RELEASE_WRE(ep, wre)); +-} +- +-static ssize_t +-fi_ibv_srq_ep_recv(struct fid_ep *ep, void *buf, size_t len, +- void *desc, fi_addr_t src_addr, void *context) +-{ +- struct iovec iov = { +- .iov_base = buf, +- .iov_len = len, +- }; +- struct fi_msg msg = { +- .msg_iov = &iov, +- .desc = &desc, +- .iov_count = 1, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_srq_ep_recvmsg(ep, &msg, 0); +-} +- +-static ssize_t +-fi_ibv_srq_ep_recvv(struct fid_ep *ep, const struct iovec *iov, void **desc, +- size_t count, fi_addr_t src_addr, void *context) +-{ +- struct fi_msg msg = { +- .msg_iov = iov, +- .desc = desc, +- .iov_count = count, +- .addr = src_addr, +- .context = context, +- }; +- +- return fi_ibv_srq_ep_recvmsg(ep, &msg, 0); +-} +- +-static struct fi_ops_msg fi_ibv_srq_msg_ops = { +- .size = sizeof(struct fi_ops_msg), +- .recv = fi_ibv_srq_ep_recv, +- .recvv = fi_ibv_srq_ep_recvv, +- .recvmsg = fi_ibv_srq_ep_recvmsg, +- .send = fi_no_msg_send, +- .sendv = fi_no_msg_sendv, +- .sendmsg = fi_no_msg_sendmsg, +- .inject = fi_no_msg_inject, +- .senddata = fi_no_msg_senddata, +- .injectdata = fi_no_msg_injectdata, +-}; +- +-static int fi_ibv_srq_close(fid_t fid) +-{ +- struct fi_ibv_srq_ep *srq_ep; +- int ret; +- +- srq_ep = container_of(fid, struct fi_ibv_srq_ep, ep_fid.fid); +- ret = ibv_destroy_srq(srq_ep->srq); +- if (ret) +- VERBS_WARN(FI_LOG_EP_CTRL, +- "Cannot destroy SRQ rc=%d\n", ret); +- +- /* All WCs from Receive CQ belongs to SRQ, no need to check EP. */ +- /* Assumes that all EP that associated with the SRQ have +- * already been closed (therefore, no more completions would +- * arrive in CQ for the recv posted to SRQ) */ +- /* Just to be clear, passes `IBV_RECV_WR`, because SRQ's WREs +- * have `IBV_RECV_WR` type only */ +- fi_ibv_empty_wre_list(srq_ep->wre_pool, &srq_ep->wre_list, IBV_RECV_WR); +- util_buf_pool_destroy(srq_ep->wre_pool); +- fastlock_destroy(&srq_ep->wre_lock); +- +- free(srq_ep); +- +- return FI_SUCCESS; +-} +- +-static struct fi_ops fi_ibv_srq_ep_ops = { +- .size = sizeof(struct fi_ops), +- .close = fi_ibv_srq_close, +- .bind = fi_no_bind, +- .control = fi_no_control, +- .ops_open = fi_no_ops_open, +-}; +- +- +-int fi_ibv_srq_context(struct fid_domain *domain, struct fi_rx_attr *attr, +- struct fid_ep **srq_ep_fid, void *context) +-{ +- struct ibv_srq_init_attr srq_init_attr = { 0 }; +- struct fi_ibv_domain *dom; +- struct fi_ibv_srq_ep *srq_ep; +- int ret; +- +- if (!domain) +- return -FI_EINVAL; +- +- srq_ep = calloc(1, sizeof(*srq_ep)); +- if (!srq_ep) { +- ret = -FI_ENOMEM; +- goto err1; +- } +- +- dom = container_of(domain, struct fi_ibv_domain, +- util_domain.domain_fid); +- +- srq_ep->ep_fid.fid.fclass = FI_CLASS_SRX_CTX; +- srq_ep->ep_fid.fid.context = context; +- srq_ep->ep_fid.fid.ops = &fi_ibv_srq_ep_ops; +- srq_ep->ep_fid.ops = &fi_ibv_srq_ep_base_ops; +- srq_ep->ep_fid.msg = &fi_ibv_srq_msg_ops; +- srq_ep->ep_fid.cm = &fi_ibv_srq_cm_ops; +- srq_ep->ep_fid.rma = &fi_ibv_srq_rma_ops; +- srq_ep->ep_fid.atomic = &fi_ibv_srq_atomic_ops; +- +- srq_init_attr.attr.max_wr = attr->size; +- srq_init_attr.attr.max_sge = attr->iov_limit; +- +- srq_ep->srq = ibv_create_srq(dom->pd, &srq_init_attr); +- if (!srq_ep->srq) { +- VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_create_srq", errno); +- ret = -errno; +- goto err2; +- } +- +- fastlock_init(&srq_ep->wre_lock); +- ret = util_buf_pool_create(&srq_ep->wre_pool, sizeof(struct fi_ibv_wre), +- 16, 0, VERBS_WRE_CNT); +- if (ret) { +- VERBS_WARN(FI_LOG_DOMAIN, "Failed to create wre_pool\n"); +- goto err3; +- } +- dlist_init(&srq_ep->wre_list); +- +- *srq_ep_fid = &srq_ep->ep_fid; +- +- return FI_SUCCESS; +-err3: +- fastlock_destroy(&srq_ep->wre_lock); +- if (ibv_destroy_srq(srq_ep->srq)) +- VERBS_INFO_ERRNO(FI_LOG_DOMAIN, "ibv_destroy_srq", errno); +-err2: +- free(srq_ep); +-err1: +- return ret; +-} +- +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/abi_1_0.c b/src/mpid/ch4/netmod/ofi/libfabric/src/abi_1_0.c +index fb73b4890..c0fdd832f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/abi_1_0.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/abi_1_0.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2016 Intel Corporation. All rights reserved. ++ * Copyright (c) 2016-2018 Intel Corporation. All rights reserved. + * Copyright (c) 2017, Cisco Systems, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -105,6 +105,23 @@ struct fi_info_1_0 { + struct fi_fabric_attr_1_0 *fabric_attr; + }; + ++struct fi_info_1_1 { ++ struct fi_info *next; ++ uint64_t caps; ++ uint64_t mode; ++ uint32_t addr_format; ++ size_t src_addrlen; ++ size_t dest_addrlen; ++ void *src_addr; ++ void *dest_addr; ++ fid_t handle; ++ struct fi_tx_attr *tx_attr; ++ struct fi_rx_attr *rx_attr; ++ struct fi_ep_attr_1_0 *ep_attr; ++ struct fi_domain_attr_1_0 *domain_attr; ++ struct fi_fabric_attr_1_0 *fabric_attr; ++}; ++ + #define ofi_dup_attr(dst, src) \ + do { \ + dst = calloc(1, sizeof(*dst)); \ +@@ -113,6 +130,9 @@ struct fi_info_1_0 { + } while (0); + + ++/* ++ * ABI 1.0 ++ */ + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + void fi_freeinfo_1_0(struct fi_info_1_0 *info) + { +@@ -120,7 +140,6 @@ void fi_freeinfo_1_0(struct fi_info_1_0 *info) + } + COMPAT_SYMVER(fi_freeinfo_1_0, fi_freeinfo, FABRIC_1.0); + +- + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + struct fi_info_1_0 *fi_dupinfo_1_0(const struct fi_info_1_0 *info) + { +@@ -244,3 +263,56 @@ int fi_fabric_1_0(struct fi_fabric_attr_1_0 *attr_1_0, + return fi_fabric(&attr, fabric, context); + } + COMPAT_SYMVER(fi_fabric_1_0, fi_fabric, FABRIC_1.0); ++ ++ ++/* ++ * ABI 1.1 ++ */ ++__attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) ++void fi_freeinfo_1_1(struct fi_info_1_1 *info) ++{ ++ fi_freeinfo((struct fi_info *) info); ++} ++COMPAT_SYMVER(fi_freeinfo_1_1, fi_freeinfo, FABRIC_1.1); ++ ++__attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) ++struct fi_info_1_1 *fi_dupinfo_1_1(const struct fi_info_1_1 *info) ++{ ++ struct fi_info *dup, *base; ++ ++ if (!info) ++ return (struct fi_info_1_1 *) ofi_allocinfo_internal(); ++ ++ ofi_dup_attr(base, info); ++ if (base == NULL) ++ return NULL; ++ ++ dup = fi_dupinfo(base); ++ ++ free(base); ++ return (struct fi_info_1_1 *) dup; ++} ++COMPAT_SYMVER(fi_dupinfo_1_1, fi_dupinfo, FABRIC_1.1); ++ ++__attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) ++int fi_getinfo_1_1(uint32_t version, const char *node, const char *service, ++ uint64_t flags, const struct fi_info_1_1 *hints_1_1, ++ struct fi_info_1_1 **info) ++{ ++ struct fi_info *hints; ++ int ret; ++ ++ if (hints_1_1) { ++ hints = (struct fi_info *) fi_dupinfo_1_1(hints_1_1); ++ if (!hints) ++ return -FI_ENOMEM; ++ } else { ++ hints = NULL; ++ } ++ ret = fi_getinfo(version, node, service, flags, hints, ++ (struct fi_info **) info); ++ fi_freeinfo(hints); ++ ++ return ret; ++} ++COMPAT_SYMVER(fi_getinfo_1_1, fi_getinfo, FABRIC_1.1); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/common.c b/src/mpid/ch4/netmod/ofi/libfabric/src/common.c +index 0a85fcb46..a3b74773f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/common.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/common.c +@@ -1,7 +1,7 @@ + /* + * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. + * Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved. +- * Copyright (c) 2013 Intel Corp., Inc. All rights reserved. ++ * Copyright (c) 2013-2018 Intel Corp., Inc. All rights reserved. + * Copyright (c) 2015 Los Alamos Nat. Security, LLC. All rights reserved. + * + * This software is available to you under a choice of one of two +@@ -58,6 +58,8 @@ + #include + #include + #include ++#include ++#include + + struct fi_provider core_prov = { + .name = "core", +@@ -102,6 +104,11 @@ uint8_t ofi_msb(uint64_t num) + return msb; + } + ++uint8_t ofi_lsb(uint64_t num) ++{ ++ return ofi_msb(num & (~(num - 1))); ++} ++ + int ofi_send_allowed(uint64_t caps) + { + if (caps & FI_MSG || +@@ -220,6 +227,31 @@ uint64_t fi_gettime_us(void) + return now.tv_sec * 1000000 + now.tv_usec; + } + ++uint16_t ofi_get_sa_family(const struct fi_info *info) ++{ ++ if (!info) ++ return 0; ++ ++ switch (info->addr_format) { ++ case FI_SOCKADDR_IN: ++ return AF_INET; ++ case FI_SOCKADDR_IN6: ++ return AF_INET6; ++ case FI_SOCKADDR_IB: ++ return AF_IB; ++ case FI_SOCKADDR: ++ case FI_FORMAT_UNSPEC: ++ if (info->src_addr) ++ return ((struct sockaddr *) info->src_addr)->sa_family; ++ ++ if (info->dest_addr) ++ return ((struct sockaddr *) info->dest_addr)->sa_family; ++ /* fall through */ ++ default: ++ return 0; ++ } ++} ++ + const char *ofi_straddr(char *buf, size_t *len, + uint32_t addr_format, const void *addr) + { +@@ -433,6 +465,8 @@ static int ofi_str_to_sin(const char *str, void **addr, size_t *len) + if (ret == 1) + goto match_ip; + ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Malformed FI_ADDR_STR: %s\n", str); + err: + free(sin); + return -FI_EINVAL; +@@ -440,8 +474,11 @@ err: + match_ip: + ip[sizeof(ip) - 1] = '\0'; + ret = inet_pton(AF_INET, ip, &sin->sin_addr); +- if (ret != 1) ++ if (ret != 1) { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Unable to convert IPv4 address: %s\n", ip); + goto err; ++ } + + match_port: + sin->sin_port = htons(sin->sin_port); +@@ -473,6 +510,8 @@ static int ofi_str_to_sin6(const char *str, void **addr, size_t *len) + if (ret == 1) + goto match_ip; + ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Malformed FI_ADDR_STR: %s\n", str); + err: + free(sin6); + return -FI_EINVAL; +@@ -480,8 +519,11 @@ err: + match_ip: + ip[sizeof(ip) - 1] = '\0'; + ret = inet_pton(AF_INET6, ip, &sin6->sin6_addr); +- if (ret != 1) ++ if (ret != 1) { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Unable to convert IPv6 address: %s\n", ip); + goto err; ++ } + + match_port: + sin6->sin6_port = htons(sin6->sin6_port); +@@ -584,6 +626,14 @@ int ofi_is_wildcard_listen_addr(const char *node, const char *service, + struct addrinfo *res = NULL; + int ret; + ++ if (hints && hints->addr_format != FI_FORMAT_UNSPEC && ++ hints->addr_format != FI_SOCKADDR && ++ hints->addr_format != FI_SOCKADDR_IN && ++ hints->addr_format != FI_SOCKADDR_IN6) ++ return 0; ++ ++ /* else it's okay to call getaddrinfo, proceed with processing */ ++ + if (node) { + ret = getaddrinfo(node, service, NULL, &res); + if (ret) { +@@ -612,6 +662,35 @@ out: + return ((flags & FI_SOURCE) && service) ? 1 : 0; + } + ++size_t ofi_mask_addr(struct sockaddr *maskaddr, const struct sockaddr *srcaddr, ++ const struct sockaddr *netmask) ++{ ++ size_t i, size, len = 0; ++ uint8_t *ip, *mask, bits; ++ ++ memcpy(maskaddr, srcaddr, ofi_sizeofaddr(srcaddr)); ++ size = ofi_sizeofip(srcaddr); ++ ip = ofi_get_ipaddr(maskaddr); ++ mask = ofi_get_ipaddr(netmask); ++ ++ if (!size || !ip || !mask) ++ return 0; ++ ++ for (i = 0; i < size; i++) { ++ ip[i] &= mask[i]; ++ ++ if (mask[i] == 0xff) { ++ len += 8; ++ } else { ++ for (bits = mask[i]; bits; bits >>= 1) { ++ if (bits & 0x1) ++ len++; ++ } ++ } ++ } ++ return len; ++} ++ + void ofi_straddr_log_internal(const char *func, int line, + const struct fi_provider *prov, + enum fi_log_level level, +@@ -629,53 +708,175 @@ void ofi_straddr_log_internal(const char *func, int line, + } + } + ++int ofi_discard_socket(SOCKET sock, size_t len) ++{ ++ char buf; ++ ssize_t ret = 0; ++ ++ for (; len && !ret; len--) ++ ret = ofi_recvall_socket(sock, &buf, 1); ++ return ret; ++} ++ ++ + #ifndef HAVE_EPOLL + + int fi_epoll_create(struct fi_epoll **ep) + { ++ int ret; ++ + *ep = calloc(1, sizeof(struct fi_epoll)); +- return *ep ? 0 : -FI_ENOMEM; ++ if (!*ep) ++ return -FI_ENOMEM; ++ ++ (*ep)->size = 64; ++ (*ep)->fds = calloc((*ep)->size, sizeof(*(*ep)->fds) + ++ sizeof(*(*ep)->context)); ++ if (!(*ep)->fds) { ++ ret = -FI_ENOMEM; ++ goto err1; ++ } ++ (*ep)->context = (void *)((*ep)->fds + (*ep)->size); ++ ++ ret = fd_signal_init(&(*ep)->signal); ++ if (ret) ++ goto err2; ++ ++ (*ep)->fds[(*ep)->nfds].fd = (*ep)->signal.fd[FI_READ_FD]; ++ (*ep)->fds[(*ep)->nfds].events = FI_EPOLL_IN; ++ (*ep)->context[(*ep)->nfds++] = NULL; ++ slist_init(&(*ep)->work_item_list); ++ fastlock_init(&(*ep)->lock); ++ return FI_SUCCESS; ++err2: ++ free((*ep)->fds); ++err1: ++ free(*ep); ++ return ret; + } + +-int fi_epoll_add(struct fi_epoll *ep, int fd, void *context) ++ ++static int fi_epoll_ctl(struct fi_epoll *ep, enum fi_epoll_ctl op, ++ int fd, uint32_t events, void *context) + { +- struct pollfd *fds; +- void *contexts; ++ struct fi_epoll_work_item *item; + +- if (ep->nfds == ep->size) { +- fds = calloc(ep->size + 64, +- sizeof(*ep->fds) + sizeof(*ep->context)); +- if (!fds) +- return -FI_ENOMEM; ++ item = calloc(1,sizeof(*item)); ++ if (!item) ++ return -FI_ENOMEM; + +- ep->size += 64; +- contexts = fds + ep->size; ++ item->fd = fd; ++ item->events = events; ++ item->context = context; ++ item->type = op; ++ fastlock_acquire(&ep->lock); ++ slist_insert_tail(&item->entry, &ep->work_item_list); ++ fd_signal_set(&ep->signal); ++ fastlock_release(&ep->lock); ++ return 0; ++} + +- memcpy(fds, ep->fds, ep->nfds * sizeof(*ep->fds)); +- memcpy(contexts, ep->context, ep->nfds * sizeof(*ep->context)); +- free(ep->fds); +- ep->fds = fds; +- ep->context = contexts; +- } ++int fi_epoll_add(struct fi_epoll *ep, int fd, uint32_t events, void *context) ++{ ++ return fi_epoll_ctl(ep, EPOLL_CTL_ADD, fd, events, context); ++} + +- ep->fds[ep->nfds].fd = fd; +- ep->fds[ep->nfds].events = POLLIN; +- ep->context[ep->nfds++] = context; +- return 0; ++int fi_epoll_mod(struct fi_epoll *ep, int fd, uint32_t events, void *context) ++{ ++ return fi_epoll_ctl(ep, EPOLL_CTL_MOD, fd, events, context); + } + + int fi_epoll_del(struct fi_epoll *ep, int fd) ++{ ++ return fi_epoll_ctl(ep, EPOLL_CTL_DEL, fd, 0, NULL); ++} ++ ++static int fi_epoll_fd_array_grow(struct fi_epoll *ep) ++{ ++ struct pollfd *fds; ++ void *contexts; ++ ++ fds = calloc(ep->size + 64, ++ sizeof(*ep->fds) + sizeof(*ep->context)); ++ if (!fds) ++ return -FI_ENOMEM; ++ ++ ep->size += 64; ++ contexts = fds + ep->size; ++ ++ memcpy(fds, ep->fds, ep->nfds * sizeof(*ep->fds)); ++ memcpy(contexts, ep->context, ep->nfds * sizeof(*ep->context)); ++ free(ep->fds); ++ ep->fds = fds; ++ ep->context = contexts; ++ return FI_SUCCESS; ++} ++ ++static void fi_epoll_cleanup_array(struct fi_epoll *ep) + { + int i; + + for (i = 0; i < ep->nfds; i++) { +- if (ep->fds[i].fd == fd) { +- ep->fds[i].fd = ep->fds[ep->nfds - 1].fd; +- ep->context[i] = ep->context[--ep->nfds]; +- return 0; ++ while (ep->fds[i].fd == INVALID_SOCKET) { ++ ep->fds[i].fd = ep->fds[ep->nfds-1].fd; ++ ep->fds[i].events = ep->fds[ep->nfds-1].events; ++ ep->fds[i].revents = ep->fds[ep->nfds-1].revents; ++ ep->context[i] = ep->context[ep->nfds-1]; ++ ep->nfds--; ++ if (i == ep->nfds) ++ break; + } +- } +- return -FI_EINVAL; ++ } ++} ++ ++static void fi_epoll_process_work_item_list(struct fi_epoll *ep) ++{ ++ struct slist_entry *entry; ++ struct fi_epoll_work_item *item; ++ int i; ++ ++ while (!slist_empty(&ep->work_item_list)) { ++ if ((ep->nfds == ep->size) && ++ fi_epoll_fd_array_grow(ep)) ++ continue; ++ ++ entry = slist_remove_head(&ep->work_item_list); ++ item = container_of(entry, struct fi_epoll_work_item, entry); ++ ++ switch (item->type) { ++ case EPOLL_CTL_ADD: ++ ep->fds[ep->nfds].fd = item->fd; ++ ep->fds[ep->nfds].events = item->events; ++ ep->context[ep->nfds] = item->context; ++ ep->nfds++; ++ break; ++ case EPOLL_CTL_DEL: ++ for (i = 0; i < ep->nfds; i++) { ++ if (ep->fds[i].fd == item->fd) { ++ ep->fds[i].fd = INVALID_SOCKET; ++ break; ++ } ++ } ++ break; ++ case EPOLL_CTL_MOD: ++ for (i = 0; i < ep->nfds; i++) { ++ if (ep->fds[i].fd == item->fd) { ++ ++ ep->fds[i].events = item->events; ++ ep->fds[i].revents &= item->events; ++ ep->context = item->context; ++ break; ++ } ++ } ++ break; ++ default: ++ assert(0); ++ goto out; ++ } ++ free(item); ++ } ++out: ++ fi_epoll_cleanup_array(ep); + } + + int fi_epoll_wait(struct fi_epoll *ep, void **contexts, int max_contexts, +@@ -683,31 +884,59 @@ int fi_epoll_wait(struct fi_epoll *ep, void **contexts, int max_contexts, + { + int i, ret; + int found = 0; ++ uint64_t start = (timeout >= 0) ? fi_gettime_ms() : 0; + +- ret = poll(ep->fds, ep->nfds, timeout); +- if (ret == SOCKET_ERROR) +- return -ofi_sockerr(); +- else if (ret == 0) +- return 0; ++ do { ++ ret = poll(ep->fds, ep->nfds, timeout); ++ if (ret == SOCKET_ERROR) ++ return -ofi_sockerr(); ++ else if (ret == 0) ++ return 0; ++ ++ if (ep->fds[0].revents) ++ fd_signal_reset(&ep->signal); ++ ++ fastlock_acquire(&ep->lock); ++ if (!slist_empty(&ep->work_item_list)) ++ fi_epoll_process_work_item_list(ep); ++ ++ fastlock_release(&ep->lock); + +- for (i = ep->index; i < ep->nfds && found < max_contexts; i++) { +- if (ep->fds[i].revents) { +- contexts[found++] = ep->context[i]; +- ep->index = i; ++ for (i = ep->index; i < ep->nfds && found < max_contexts; i++) { ++ if (ep->fds[i].revents && i) { ++ contexts[found++] = ep->context[i]; ++ ep->index = i; ++ } + } +- } +- for (i = 0; i < ep->index && found < max_contexts; i++) { +- if (ep->fds[i].revents) { +- contexts[found++] = ep->context[i]; +- ep->index = i; ++ for (i = 0; i < ep->index && found < max_contexts; i++) { ++ if (ep->fds[i].revents && i) { ++ contexts[found++] = ep->context[i]; ++ ep->index = i; ++ } + } +- } ++ ++ if (timeout > 0) ++ timeout -= (int) (fi_gettime_ms() - start); ++ ++ } while (timeout > 0 && !found); ++ + return found; + } + + void fi_epoll_close(struct fi_epoll *ep) + { ++ struct fi_epoll_work_item *item; ++ struct slist_entry *entry; + if (ep) { ++ while (!slist_empty(&ep->work_item_list)) { ++ entry = slist_remove_head(&ep->work_item_list); ++ item = container_of(entry, ++ struct fi_epoll_work_item, ++ entry); ++ free(item); ++ } ++ fastlock_destroy(&ep->lock); ++ fd_signal_free(&ep->signal); + free(ep->fds); + free(ep); + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/fabric.c b/src/mpid/ch4/netmod/ofi/libfabric/src/fabric.c +index b23571587..1136b440f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/fabric.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/fabric.c +@@ -43,7 +43,9 @@ + #include + #include "ofi_util.h" + #include "ofi.h" ++#include "shared/ofi_str.h" + #include "ofi_prov.h" ++#include "ofi_perf.h" + + #ifdef HAVE_LIBDL + #include +@@ -73,11 +75,26 @@ static int ofi_find_name(char **names, const char *name) + return -1; + } + +-static int ofi_is_util_prov(const struct fi_provider *provider) ++static enum ofi_prov_type ofi_prov_type(const struct fi_provider *provider) + { + const struct fi_prov_context *ctx; + ctx = (const struct fi_prov_context *) &provider->context; +- return ctx->is_util_prov; ++ return ctx->type; ++} ++ ++static int ofi_is_util_prov(const struct fi_provider *provider) ++{ ++ return ofi_prov_type(provider) == OFI_PROV_UTIL; ++} ++ ++static int ofi_is_core_prov(const struct fi_provider *provider) ++{ ++ return ofi_prov_type(provider) == OFI_PROV_CORE; ++} ++ ++static int ofi_is_hook_prov(const struct fi_provider *provider) ++{ ++ return ofi_prov_type(provider) == OFI_PROV_HOOK; + } + + int ofi_apply_filter(struct fi_filter *filter, const char *name) +@@ -91,14 +108,15 @@ int ofi_apply_filter(struct fi_filter *filter, const char *name) + return 0; + } + +-/* +- * Utility providers may be disabled, but do not need to be explicitly +- * enabled. This allows them to always be available when only a core +- * provider is enabled. +- */ + static int ofi_getinfo_filter(const struct fi_provider *provider) + { +- if (!prov_filter.negated && ofi_is_util_prov(provider)) ++ /* Positive filters only apply to core providers. They must be ++ * explicitly enabled by the filter. Other providers (i.e. utility) ++ * are automatically enabled in this case, so that they can work ++ * over any enabled core filter. Negative filters may be used ++ * to disable any provider. ++ */ ++ if (!prov_filter.negated && !ofi_is_core_prov(provider)) + return 0; + + return ofi_apply_filter(&prov_filter, provider->name); +@@ -117,6 +135,38 @@ static struct ofi_prov *ofi_getprov(const char *prov_name, size_t len) + return NULL; + } + ++struct fi_provider *ofi_get_hook(const char *name) ++{ ++ struct ofi_prov *prov; ++ struct fi_provider *provider = NULL; ++ char *try_name = NULL; ++ int ret; ++ ++ prov = ofi_getprov(name, strlen(name)); ++ if (!prov) { ++ ret = asprintf(&try_name, "ofi_%s_hook", name); ++ if (ret > 0) ++ prov = ofi_getprov(try_name, ret); ++ else ++ try_name = NULL; ++ } ++ ++ if (prov) { ++ if (prov->provider && ofi_is_hook_prov(prov->provider)) { ++ provider = prov->provider; ++ } else { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "Specified provider is not a hook: %s\n", name); ++ } ++ } else { ++ FI_WARN(&core_prov, FI_LOG_CORE, ++ "No hook found for: %s\n", name); ++ } ++ ++ free(try_name); ++ return provider; ++} ++ + static void cleanup_provider(struct fi_provider *provider, void *dlhandle) + { + OFI_UNUSED(dlhandle); +@@ -166,26 +216,44 @@ static struct ofi_prov *ofi_create_prov_entry(const char *prov_name) + */ + static void ofi_ordered_provs_init(void) + { +- char *ordered_prov_names[] = +- {"psm2", "psm", "usnic", "mlx", "gni", +- "bgq", "netdir", "ofi_rxm", "ofi_rxd", "verbs", +- /* Initialize the socket(s) provider last. This will result in +- * it being the least preferred provider. */ ++ char *ordered_prov_names[] = { ++ "psm2", "psm", "usnic", "mlx", "gni", ++ "bgq", "netdir", "ofi_rxm", "ofi_rxd", "verbs", ++ /* Initialize the socket based providers last of the ++ * standard providers. This will result in them being ++ * the least preferred providers. ++ */ ++ ++ /* Before you add ANYTHING here, read the comment above!!! */ ++ "UDP", "sockets", "tcp", /* NOTHING GOES HERE! */ ++ /* Seriously, read it! */ + +- /* Before you add ANYTHING here, read the comment above!!! */ +- "UDP", "sockets", "tcp" /* NOTHING GOES HERE! */}; +- /* Seriously, read it! */ ++ /* These are hooking providers only. Their order ++ * doesn't matter ++ */ ++ "ofi_perf_hook", "ofi_noop_hook", ++ }; + int num_provs = sizeof(ordered_prov_names)/sizeof(ordered_prov_names[0]), i; + + for (i = 0; i < num_provs; i++) + ofi_create_prov_entry(ordered_prov_names[i]); + } + ++static void ofi_set_prov_type(struct fi_prov_context *ctx, ++ struct fi_provider *provider) ++{ ++ if (!provider->getinfo) ++ ctx->type = OFI_PROV_HOOK; ++ else if (ofi_has_util_prefix(provider->name)) ++ ctx->type = OFI_PROV_UTIL; ++ else ++ ctx->type = OFI_PROV_CORE; ++} ++ + static int ofi_register_provider(struct fi_provider *provider, void *dlhandle) + { + struct fi_prov_context *ctx; + struct ofi_prov *prov = NULL; +- size_t len; + int ret; + + if (!provider || !provider->name) { +@@ -199,7 +267,7 @@ static int ofi_register_provider(struct fi_provider *provider, void *dlhandle) + "registering provider: %s (%d.%d)\n", provider->name, + FI_MAJOR(provider->version), FI_MINOR(provider->version)); + +- if (!provider->getinfo || !provider->fabric) { ++ if (!provider->fabric) { + FI_WARN(&core_prov, FI_LOG_CORE, + "provider missing mandatory entry points\n"); + ret = -FI_EINVAL; +@@ -223,7 +291,7 @@ static int ofi_register_provider(struct fi_provider *provider, void *dlhandle) + } + + ctx = (struct fi_prov_context *) &provider->context; +- ctx->is_util_prov = (ofi_util_name(provider->name, &len) != NULL); ++ ofi_set_prov_type(ctx, provider); + + if (ofi_getinfo_filter(provider)) { + FI_INFO(&core_prov, FI_LOG_CORE, +@@ -295,75 +363,9 @@ static int lib_filter(const struct dirent *entry) + } + #endif + +-/* split the given string "s" using the specified delimiter(s) in the string +- * "delim" and return an array of strings. The array is terminated with a NULL +- * pointer. You can clean this array up with a call to free_string_array(). +- * +- * Returns NULL on failure. +- */ +-static char **split_and_alloc(const char *s, const char *delim) +-{ +- int i, n; +- char *tmp; +- char *dup = NULL; +- char **arr = NULL; +- +- if (!s || !delim) +- return NULL; +- +- dup = strdup(s); +- if (!dup) { +- FI_WARN(&core_prov, FI_LOG_CORE, "failed to allocate memory\n"); +- return NULL; +- } +- +- /* compute the array size */ +- n = 1; +- for (tmp = dup; *tmp != '\0'; ++tmp) { +- for (i = 0; delim[i] != '\0'; ++i) { +- if (*tmp == delim[i]) { +- ++n; +- break; +- } +- } +- } +- +- /* +1 to leave space for NULL terminating pointer */ +- arr = calloc(n + 1, sizeof(*arr)); +- if (!arr) { +- FI_WARN(&core_prov, FI_LOG_CORE, "failed to allocate memory\n"); +- goto cleanup; +- } +- +- /* set array elts to point inside the dup'ed string */ +- for (tmp = dup, i = 0; tmp != NULL; ++i) { +- arr[i] = strsep(&tmp, delim); +- } +- assert(i == n); +- +- return arr; +- +-cleanup: +- free(dup); +- free(arr); +- return NULL; +-} +- +-/* see split_and_alloc() */ +-static void free_string_array(char **s) +-{ +- /* all strings are allocated from the same strdup'ed slab, so just free +- * the first element */ +- if (s != NULL) +- free(s[0]); +- +- /* and then the actual array of pointers */ +- free(s); +-} +- + void ofi_free_filter(struct fi_filter *filter) + { +- free_string_array(filter->names); ++ ofi_free_string_array(filter->names); + } + + void ofi_create_filter(struct fi_filter *filter, const char *raw_filter) +@@ -377,7 +379,7 @@ void ofi_create_filter(struct fi_filter *filter, const char *raw_filter) + ++raw_filter; + } + +- filter->names = split_and_alloc(raw_filter, ","); ++ filter->names= ofi_split_and_alloc(raw_filter, ",", NULL); + if (!filter->names) + FI_WARN(&core_prov, FI_LOG_CORE, + "unable to parse filter from: %s\n", raw_filter); +@@ -444,6 +446,8 @@ void fi_ini(void) + fi_log_init(); + ofi_osd_init(); + ofi_pmem_init(); ++ ofi_perf_init(); ++ ofi_hook_init(); + + fi_param_define(NULL, "provider", FI_PARAM_STRING, + "Only use specified provider (default: all available)"); +@@ -481,12 +485,12 @@ void fi_ini(void) + if (!provdir) + provdir = PROVDLDIR; + +- dirs = split_and_alloc(provdir, ":"); ++ dirs = ofi_split_and_alloc(provdir, ":", NULL); + if (dirs) { + for (n = 0; dirs[n]; ++n) { + ofi_ini_dir(dirs[n]); + } +- free_string_array(dirs); ++ ofi_free_string_array(dirs); + } + libdl_done: + #endif +@@ -501,19 +505,16 @@ libdl_done: + ofi_register_provider(SHM_INIT, NULL); + ofi_register_provider(RXM_INIT, NULL); + ofi_register_provider(VERBS_INIT, NULL); +- +- { +- /* TODO: RXD is not stable for now. Disable it by default */ +- int enable_rxd = 0; +- fi_param_define(NULL, "rxd_enable", FI_PARAM_BOOL, +- "Enable RXD provider (default: no)"); +- fi_param_get_bool(NULL, "rxd_enable", &enable_rxd); +- if (enable_rxd) +- ofi_register_provider(RXD_INIT, NULL); +- } ++ /* ofi_register_provider(RSTREAM_INIT, NULL); - no support */ ++ ofi_register_provider(MRAIL_INIT, NULL); ++ ofi_register_provider(RXD_INIT, NULL); + + ofi_register_provider(UDP_INIT, NULL); + ofi_register_provider(SOCKETS_INIT, NULL); ++ ofi_register_provider(TCP_INIT, NULL); ++ ++ ofi_register_provider(PERF_HOOK_INIT, NULL); ++ ofi_register_provider(NOOP_HOOK_INIT, NULL); + + ofi_init = 1; + +@@ -542,6 +543,155 @@ FI_DESTRUCTOR(fi_fini(void)) + ofi_osd_fini(); + } + ++/* The provider must free any prov_attr data prior to calling this ++ * routine. ++ */ ++int ofi_nic_close(struct fid *fid) ++{ ++ struct fid_nic *nic = (struct fid_nic *) fid; ++ ++ assert(fid && fid->fclass == FI_CLASS_NIC); ++ ++ if (nic->device_attr) { ++ free(nic->device_attr->name); ++ free(nic->device_attr->device_id); ++ free(nic->device_attr->device_version); ++ free(nic->device_attr->vendor_id); ++ free(nic->device_attr->driver); ++ free(nic->device_attr->firmware); ++ free(nic->device_attr); ++ } ++ ++ free(nic->bus_attr); ++ ++ if (nic->link_attr) { ++ free(nic->link_attr->address); ++ free(nic->link_attr->network_type); ++ free(nic->link_attr); ++ } ++ ++ free(nic); ++ return 0; ++} ++ ++int ofi_nic_control(struct fid *fid, int command, void *arg) ++{ ++ struct fid_nic *nic = container_of(fid, struct fid_nic, fid); ++ struct fid_nic **dup = (struct fid_nic **) arg; ++ ++ switch(command) { ++ case FI_DUP: ++ *dup = ofi_nic_dup(nic); ++ return *dup ? FI_SUCCESS : -FI_ENOMEM; ++ default: ++ return -FI_ENOSYS; ++ } ++} ++ ++struct fi_ops default_nic_ops = { ++ .size = sizeof(struct fi_ops), ++ .close = ofi_nic_close, ++ .control = ofi_nic_control, ++ .tostr = ofi_nic_tostr, ++}; ++ ++static int ofi_dup_dev_attr(const struct fi_device_attr *attr, ++ struct fi_device_attr **dup_attr) ++{ ++ *dup_attr = calloc(1, sizeof(**dup_attr)); ++ if (!*dup_attr) ++ return -FI_ENOMEM; ++ ++ if (ofi_str_dup(attr->name, &(*dup_attr)->name) || ++ ofi_str_dup(attr->device_id, &(*dup_attr)->device_id) || ++ ofi_str_dup(attr->device_version, &(*dup_attr)->device_version) || ++ ofi_str_dup(attr->vendor_id, &(*dup_attr)->vendor_id) || ++ ofi_str_dup(attr->driver, &(*dup_attr)->driver) || ++ ofi_str_dup(attr->firmware, &(*dup_attr)->firmware)) ++ return -FI_ENOMEM; ++ ++ return 0; ++} ++ ++static int ofi_dup_bus_attr(const struct fi_bus_attr *attr, ++ struct fi_bus_attr **dup_attr) ++{ ++ *dup_attr = calloc(1, sizeof(**dup_attr)); ++ if (!*dup_attr) ++ return -FI_ENOMEM; ++ ++ **dup_attr = *attr; ++ return 0; ++} ++ ++static int ofi_dup_link_attr(const struct fi_link_attr *attr, ++ struct fi_link_attr **dup_attr) ++{ ++ *dup_attr = calloc(1, sizeof(**dup_attr)); ++ if (!*dup_attr) ++ return -FI_ENOMEM; ++ ++ if (ofi_str_dup(attr->address, &(*dup_attr)->address) || ++ ofi_str_dup(attr->network_type, &(*dup_attr)->network_type)) ++ return -FI_ENOMEM; ++ ++ (*dup_attr)->mtu = attr->mtu; ++ (*dup_attr)->speed = attr->speed; ++ (*dup_attr)->state = attr->state; ++ return 0; ++} ++ ++struct fid_nic *ofi_nic_dup(const struct fid_nic *nic) ++{ ++ struct fid_nic *dup_nic; ++ int ret; ++ ++ dup_nic = calloc(1, sizeof(*dup_nic)); ++ if (!dup_nic) ++ return NULL; ++ ++ if (!nic) { ++ dup_nic->fid.fclass = FI_CLASS_NIC; ++ dup_nic->device_attr = calloc(1, sizeof(*dup_nic->device_attr)); ++ dup_nic->bus_attr = calloc(1, sizeof(*dup_nic->bus_attr)); ++ dup_nic->link_attr = calloc(1, sizeof(*dup_nic->link_attr)); ++ ++ if (!dup_nic->device_attr || !dup_nic->bus_attr || ++ !dup_nic->link_attr) ++ goto fail; ++ ++ dup_nic->fid.ops = &default_nic_ops; ++ return dup_nic; ++ } ++ ++ assert(nic->fid.fclass == FI_CLASS_NIC); ++ dup_nic->fid = nic->fid; ++ ++ if (nic->device_attr) { ++ ret = ofi_dup_dev_attr(nic->device_attr, &dup_nic->device_attr); ++ if (ret) ++ goto fail; ++ } ++ ++ if (nic->bus_attr) { ++ ret = ofi_dup_bus_attr(nic->bus_attr, &dup_nic->bus_attr); ++ if (ret) ++ goto fail; ++ } ++ ++ if (nic->link_attr) { ++ ret = ofi_dup_link_attr(nic->link_attr, &dup_nic->link_attr); ++ if (ret) ++ goto fail; ++ } ++ ++ return dup_nic; ++ ++fail: ++ ofi_nic_close(&dup_nic->fid); ++ return NULL; ++} ++ + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + void DEFAULT_SYMVER_PRE(fi_freeinfo)(struct fi_info *info) + { +@@ -568,6 +718,10 @@ void DEFAULT_SYMVER_PRE(fi_freeinfo)(struct fi_info *info) + free(info->fabric_attr->prov_name); + free(info->fabric_attr); + } ++ if (info->nic && ++ FI_CHECK_OP(info->nic->fid.ops, struct fi_ops, close)) { ++ fi_close(&info->nic->fid); ++ } + free(info); + } + } +@@ -630,7 +784,7 @@ static void ofi_set_prov_attr(struct fi_fabric_attr *attr, + attr->prov_name = ofi_strdup_append(core_name, prov->name); + free(core_name); + } else { +- assert(!ofi_is_util_prov(prov)); ++ assert(ofi_is_core_prov(prov)); + attr->prov_name = strdup(prov->name); + } + attr->prov_version = prov->version; +@@ -638,59 +792,81 @@ static void ofi_set_prov_attr(struct fi_fabric_attr *attr, + + /* + * The layering of utility providers over core providers follows these rules. +- * 1. If both are specified, then only return that layering +- * 2. If a utility provider is specified, return it over any* core provider. +- * 3. If a core provider is specified, return any utility provider that can +- * layer over it, plus the core provider itself, if possible. +- * 4* A utility provider will not layer over the sockets provider unless the +- * user explicitly requests that combination. +- * +- * Utility providers use an internal flag, OFI_CORE_PROV_ONLY, to indicate +- * that only core providers should respond to an fi_getinfo query. This +- * prevents utility providers from layering over other utility providers. ++ * 0. Provider names are delimited by ";" ++ * 1. Rules when # of providers <= 2: ++ * 1a. If both are specified, then only return that layering ++ * 1b. If a utility provider is specified, return it over any* core provider. ++ * 1c. If a core provider is specified, return any utility provider that can ++ * layer over it, plus the core provider itself, if possible. ++ * 1d. A utility provider will not layer over the sockets provider unless the ++ * user explicitly requests that combination. ++ * 1e. OFI_CORE_PROV_ONLY flag prevents utility providers layering over other ++ * utility providers. ++ * 2. If both the providers are utility providers or if more than two providers ++ * are specified, the rightmost provider would be compared. ++ * 3. If any provider has a caret symbol "^" is prefixed before any provider ++ * name it would be excluded (internal use only). These excluded providers ++ * should be listed only at the end. + */ + static int ofi_layering_ok(const struct fi_provider *provider, +- const char *util_name, size_t util_len, +- const char *core_name, size_t core_len, ++ char **prov_vec, size_t count, + uint64_t flags) + { ++ char *prov_name; ++ int i; ++ ++ /* Excluded providers must be at the end */ ++ for (i = count - 1; i >= 0; i--) { ++ if (prov_vec[i][0] != '^') ++ break; ++ ++ if (!strcasecmp(&prov_vec[i][1], provider->name)) ++ return 0; ++ } ++ count = i + 1; ++ + if (flags & OFI_CORE_PROV_ONLY) { +- if (ofi_is_util_prov(provider)) { ++ assert((count == 1) || (count == 0)); ++ if (!ofi_is_core_prov(provider)) { + FI_INFO(&core_prov, FI_LOG_CORE, +- "Need core provider, skipping util %s\n", ++ "Need core provider, skipping %s\n", + provider->name); + return 0; + } + +- if ((!core_len || !core_name) && +- !strcasecmp(provider->name, "sockets")) { ++ if ((count == 0) && !strcasecmp(provider->name, "sockets")) { + FI_INFO(&core_prov, FI_LOG_CORE, + "Skipping util;sockets layering\n"); + return 0; + } + } + +- if (util_len && util_name) { +- assert(!(flags & OFI_CORE_PROV_ONLY)); +- if ((strlen(provider->name) != util_len) || +- strncasecmp(util_name, provider->name, util_len)) +- return 0; ++ if (!count) ++ return 1; ++ ++ /* To maintain backward compatibility with the previous behavior of ++ * ofi_layering_ok we need to check if the # of providers is two or ++ * fewer. In such a case, we have to be agnostic to the ordering of ++ * core and utility providers */ + +- } else if (core_len && core_name) { +- if (!strncasecmp(core_name, "sockets", core_len) && +- ofi_is_util_prov(provider)) { ++ if ((count == 1) && ofi_is_util_prov(provider) && ++ !ofi_has_util_prefix(prov_vec[0])) { ++ if (!strcasecmp(prov_vec[0], "sockets")) { + FI_INFO(&core_prov, FI_LOG_CORE, + "Sockets requested, skipping util layering\n"); + return 0; ++ } else { ++ return 1; + } +- +- if (!ofi_is_util_prov(provider) && +- ((strlen(provider->name) != core_len) || +- strncasecmp(core_name, provider->name, core_len))) +- return 0; + } + +- return 1; ++ if ((count == 2) && ofi_has_util_prefix(prov_vec[0]) && ++ !ofi_has_util_prefix(prov_vec[1])) ++ prov_name = prov_vec[0]; ++ else ++ prov_name = prov_vec[count - 1]; ++ ++ return !strcasecmp(provider->name, prov_name); + } + + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) +@@ -700,8 +876,8 @@ int DEFAULT_SYMVER_PRE(fi_getinfo)(uint32_t version, const char *node, + { + struct ofi_prov *prov; + struct fi_info *tail, *cur; +- const char *util_name = NULL, *core_name = NULL; +- size_t util_len = 0, core_len = 0; ++ char **prov_vec = NULL; ++ size_t count = 0; + int ret; + + if (!ofi_init) +@@ -718,19 +894,20 @@ int DEFAULT_SYMVER_PRE(fi_getinfo)(uint32_t version, const char *node, + } + + if (hints && hints->fabric_attr && hints->fabric_attr->prov_name) { +- util_name = ofi_util_name(hints->fabric_attr->prov_name, +- &util_len); +- core_name = ofi_core_name(hints->fabric_attr->prov_name, +- &core_len); ++ prov_vec = ofi_split_and_alloc(hints->fabric_attr->prov_name, ++ ";", &count); ++ if (!prov_vec) ++ return -FI_ENOMEM; ++ FI_DBG(&core_prov, FI_LOG_CORE, "hints prov_name: %s\n", ++ hints->fabric_attr->prov_name); + } + + *info = tail = NULL; + for (prov = prov_head; prov; prov = prov->next) { +- if (!prov->provider) ++ if (!prov->provider || !prov->provider->getinfo) + continue; + +- if (!ofi_layering_ok(prov->provider, util_name, util_len, +- core_name, core_len, flags)) ++ if (!ofi_layering_ok(prov->provider, prov_vec, count, flags)) + continue; + + if (FI_VERSION_LT(prov->provider->fi_version, version)) { +@@ -771,6 +948,7 @@ int DEFAULT_SYMVER_PRE(fi_getinfo)(uint32_t version, const char *node, + ofi_set_prov_attr(tail->fabric_attr, prov->provider); + tail->fabric_attr->api_version = version; + } ++ ofi_free_string_array(prov_vec); + + return *info ? 0 : -FI_ENODATA; + } +@@ -804,6 +982,7 @@ __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + struct fi_info *DEFAULT_SYMVER_PRE(fi_dupinfo)(const struct fi_info *info) + { + struct fi_info *dup; ++ int ret; + + if (!info) + return ofi_allocinfo_internal(); +@@ -891,6 +1070,13 @@ struct fi_info *DEFAULT_SYMVER_PRE(fi_dupinfo)(const struct fi_info *info) + goto fail; + } + } ++ ++ if (info->nic) { ++ ret = fi_control(&info->nic->fid, FI_DUP, &dup->nic); ++ if (ret && ret != -FI_ENOSYS) ++ goto fail; ++ } ++ + return dup; + + fail: +@@ -905,7 +1091,6 @@ int DEFAULT_SYMVER_PRE(fi_fabric)(struct fi_fabric_attr *attr, + { + struct ofi_prov *prov; + const char *top_name; +- size_t len; + int ret; + + if (!attr || !attr->prov_name || !attr->name) +@@ -914,23 +1099,32 @@ int DEFAULT_SYMVER_PRE(fi_fabric)(struct fi_fabric_attr *attr, + if (!ofi_init) + fi_ini(); + +- top_name = ofi_util_name(attr->prov_name, &len); +- if (!top_name) +- top_name = ofi_core_name(attr->prov_name, &len); ++ top_name = strrchr(attr->prov_name, OFI_NAME_DELIM); ++ if (top_name) ++ top_name++; ++ else ++ top_name = attr->prov_name; + + if (!top_name) + return -FI_EINVAL; + +- prov = ofi_getprov(top_name, len); ++ prov = ofi_getprov(top_name, strlen(top_name)); + if (!prov || !prov->provider || !prov->provider->fabric) + return -FI_ENODEV; + + ret = prov->provider->fabric(attr, fabric, context); +- if (!ret && FI_VERSION_GE(prov->provider->fi_version, FI_VERSION(1, 5))) +- (*fabric)->api_version = attr->api_version; ++ if (!ret) { ++ if (FI_VERSION_GE(prov->provider->fi_version, FI_VERSION(1, 5))) ++ (*fabric)->api_version = attr->api_version; ++ FI_INFO(&core_prov, FI_LOG_CORE, "Opened fabric: %s\n", ++ attr->name); ++ ++ ofi_hook_install(*fabric, fabric, prov->provider); ++ } ++ + return ret; + } +-CURRENT_SYMVER(fi_fabric_, fi_fabric); ++DEFAULT_SYMVER(fi_fabric_, fi_fabric, FABRIC_1.1); + + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) + uint32_t DEFAULT_SYMVER_PRE(fi_version)(void) +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/fi_tostr.c b/src/mpid/ch4/netmod/ofi/libfabric/src/fi_tostr.c +index b43ed7214..db5035c71 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/fi_tostr.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/fi_tostr.c +@@ -64,20 +64,24 @@ + * + * Printing functions are generally named after this pattern: + * +- * struct fi_info : fi_tostr_info(..., struct fi_info, ...) +- * fi_info->caps : fi_tostr_caps(..., typeof(caps), ...) ++ * struct fi_info : ofi_tostr_info(..., struct fi_info, ...) ++ * fi_info->caps : ofi_tostr_caps(..., typeof(caps), ...) + */ + +-#define FI_BUFSIZ 8192 ++#define OFI_BUFSIZ 8192 + + #define TAB " " + + #define CASEENUMSTR(SYM) \ +- case SYM: { strcatf(buf, #SYM); break; } ++ case SYM: { ofi_strcatf(buf, #SYM); break; } + #define IFFLAGSTR(flags, SYM) \ +- do { if (flags & SYM) strcatf(buf, #SYM ", "); } while(0) ++ do { if (flags & SYM) ofi_strcatf(buf, #SYM ", "); } while(0) ++#define CASEENUMSTRN(SYM, N) \ ++ case SYM: { ofi_strncatf(buf, N, #SYM); break; } ++#define IFFLAGSTRN(flags, SYM, N) \ ++ do { if (flags & SYM) ofi_strncatf(buf, N, #SYM ", "); } while(0) + +-static void fi_remove_comma(char *buffer) ++static void ofi_remove_comma(char *buffer) + { + size_t sz = strlen(buffer); + if (sz < 2) +@@ -86,30 +90,30 @@ static void fi_remove_comma(char *buffer) + buffer[sz-2] = '\0'; + } + +-static void strcatf(char *dest, const char *fmt, ...) ++static void ofi_strncatf(char *dest, size_t n, const char *fmt, ...) + { +- size_t len = strnlen(dest,FI_BUFSIZ); ++ size_t len = strnlen(dest, n); + va_list arglist; + +- va_start (arglist, fmt); +- vsnprintf(&dest[len], FI_BUFSIZ - 1 - len, fmt, arglist); +- va_end (arglist); ++ va_start(arglist, fmt); ++ vsnprintf(&dest[len], n - 1 - len, fmt, arglist); ++ va_end(arglist); + } + +-static void fi_tostr_flags(char *buf, uint64_t flags) ++#define ofi_strcatf(dest, ...) \ ++ ofi_strncatf(dest, OFI_BUFSIZ, __VA_ARGS__) ++ ++static void ofi_tostr_fid(const char *label, char *buf, const struct fid *fid) + { +- IFFLAGSTR(flags, FI_MSG); +- IFFLAGSTR(flags, FI_RMA); +- IFFLAGSTR(flags, FI_TAGGED); +- IFFLAGSTR(flags, FI_ATOMIC); +- IFFLAGSTR(flags, FI_MULTICAST); ++ if (!fid || !FI_CHECK_OP(fid->ops, struct fi_ops, tostr)) ++ ofi_strcatf(buf, "%s%p\n", label, fid); ++ else ++ fid->ops->tostr(fid, buf, OFI_BUFSIZ - strnlen(buf, OFI_BUFSIZ)); ++} + +- IFFLAGSTR(flags, FI_READ); +- IFFLAGSTR(flags, FI_WRITE); +- IFFLAGSTR(flags, FI_RECV); +- IFFLAGSTR(flags, FI_SEND); +- IFFLAGSTR(flags, FI_REMOTE_READ); +- IFFLAGSTR(flags, FI_REMOTE_WRITE); ++static void ofi_tostr_opflags(char *buf, uint64_t flags) ++{ ++ IFFLAGSTR(flags, FI_MULTICAST); + + IFFLAGSTR(flags, FI_MULTI_RECV); + IFFLAGSTR(flags, FI_REMOTE_CQ_DATA); +@@ -125,12 +129,13 @@ static void fi_tostr_flags(char *buf, uint64_t flags) + IFFLAGSTR(flags, FI_DELIVERY_COMPLETE); + IFFLAGSTR(flags, FI_AFFINITY); + +- IFFLAGSTR(flags, FI_RMA_PMEM); ++ IFFLAGSTR(flags, FI_CLAIM); ++ IFFLAGSTR(flags, FI_DISCARD); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_addr_format(char *buf, uint32_t addr_format) ++static void oofi_tostr_addr_format(char *buf, uint32_t addr_format) + { + switch (addr_format) { + CASEENUMSTR(FI_FORMAT_UNSPEC); +@@ -146,26 +151,26 @@ static void fi_tostr_addr_format(char *buf, uint32_t addr_format) + CASEENUMSTR(FI_ADDR_STR); + default: + if (addr_format & FI_PROV_SPECIFIC) +- strcatf(buf, "Provider specific"); ++ ofi_strcatf(buf, "Provider specific"); + else +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_progress(char *buf, enum fi_progress progress) ++static void ofi_tostr_progress(char *buf, enum fi_progress progress) + { + switch (progress) { + CASEENUMSTR(FI_PROGRESS_UNSPEC); + CASEENUMSTR(FI_PROGRESS_AUTO); + CASEENUMSTR(FI_PROGRESS_MANUAL); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_threading(char *buf, enum fi_threading threading) ++static void ofi_tostr_threading(char *buf, enum fi_threading threading) + { + switch (threading) { + CASEENUMSTR(FI_THREAD_UNSPEC); +@@ -175,14 +180,13 @@ static void fi_tostr_threading(char *buf, enum fi_threading threading) + CASEENUMSTR(FI_THREAD_COMPLETION); + CASEENUMSTR(FI_THREAD_ENDPOINT); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_order(char *buf, uint64_t flags) ++static void ofi_tostr_msgorder(char *buf, uint64_t flags) + { +- IFFLAGSTR(flags, FI_ORDER_NONE); + IFFLAGSTR(flags, FI_ORDER_RAR); + IFFLAGSTR(flags, FI_ORDER_RAW); + IFFLAGSTR(flags, FI_ORDER_RAS); +@@ -192,30 +196,59 @@ static void fi_tostr_order(char *buf, uint64_t flags) + IFFLAGSTR(flags, FI_ORDER_SAR); + IFFLAGSTR(flags, FI_ORDER_SAW); + IFFLAGSTR(flags, FI_ORDER_SAS); +- IFFLAGSTR(flags, FI_ORDER_STRICT); ++ ++ ++ ofi_remove_comma(buf); ++} ++ ++static void ofi_tostr_comporder(char *buf, uint64_t flags) ++{ ++ if ((flags & FI_ORDER_STRICT) == FI_ORDER_NONE) { ++ ofi_strcatf(buf, "FI_ORDER_NONE, "); ++ } else if ((flags & FI_ORDER_STRICT) == FI_ORDER_STRICT) { ++ ofi_strcatf(buf, "FI_ORDER_STRICT, "); ++ } ++ + IFFLAGSTR(flags, FI_ORDER_DATA); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_caps(char *buf, uint64_t caps) ++static void ofi_tostr_caps(char *buf, uint64_t caps) + { ++ IFFLAGSTR(caps, FI_MSG); ++ IFFLAGSTR(caps, FI_RMA); ++ IFFLAGSTR(caps, FI_TAGGED); ++ IFFLAGSTR(caps, FI_ATOMIC); ++ IFFLAGSTR(caps, FI_MULTICAST); ++ ++ IFFLAGSTR(caps, FI_READ); ++ IFFLAGSTR(caps, FI_WRITE); ++ IFFLAGSTR(caps, FI_RECV); ++ IFFLAGSTR(caps, FI_SEND); ++ IFFLAGSTR(caps, FI_REMOTE_READ); ++ IFFLAGSTR(caps, FI_REMOTE_WRITE); ++ ++ IFFLAGSTR(caps, FI_MULTI_RECV); ++ IFFLAGSTR(caps, FI_REMOTE_CQ_DATA); ++ IFFLAGSTR(caps, FI_TRIGGER); ++ IFFLAGSTR(caps, FI_FENCE); ++ ++ IFFLAGSTR(caps, FI_VARIABLE_MSG); + IFFLAGSTR(caps, FI_RMA_PMEM); + IFFLAGSTR(caps, FI_SOURCE_ERR); + IFFLAGSTR(caps, FI_LOCAL_COMM); + IFFLAGSTR(caps, FI_REMOTE_COMM); + IFFLAGSTR(caps, FI_SHARED_AV); +- IFFLAGSTR(caps, FI_NUMERICHOST); + IFFLAGSTR(caps, FI_RMA_EVENT); + IFFLAGSTR(caps, FI_SOURCE); + IFFLAGSTR(caps, FI_NAMED_RX_CTX); + IFFLAGSTR(caps, FI_DIRECTED_RECV); +- fi_tostr_flags(buf, caps); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_ep_type(char *buf, enum fi_ep_type ep_type) ++static void ofi_tostr_ep_type(char *buf, enum fi_ep_type ep_type) + { + switch (ep_type) { + CASEENUMSTR(FI_EP_UNSPEC); +@@ -225,12 +258,12 @@ static void fi_tostr_ep_type(char *buf, enum fi_ep_type ep_type) + CASEENUMSTR(FI_EP_SOCK_STREAM); + CASEENUMSTR(FI_EP_SOCK_DGRAM); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_protocol(char *buf, uint32_t protocol) ++static void ofi_tostr_protocol(char *buf, uint32_t protocol) + { + switch (protocol) { + CASEENUMSTR(FI_PROTO_UNSPEC); +@@ -249,16 +282,18 @@ static void fi_tostr_protocol(char *buf, uint32_t protocol) + CASEENUMSTR(FI_PROTO_MLX); + CASEENUMSTR(FI_PROTO_NETWORKDIRECT); + CASEENUMSTR(FI_PROTO_SHM); ++ CASEENUMSTR(FI_PROTO_RSTREAM); ++ CASEENUMSTR(FI_PROTO_RDMA_CM_IB_XRC); + default: + if (protocol & FI_PROV_SPECIFIC) +- strcatf(buf, "Provider specific"); ++ ofi_strcatf(buf, "Provider specific"); + else +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_mode(char *buf, uint64_t mode) ++static void ofi_tostr_mode(char *buf, uint64_t mode) + { + IFFLAGSTR(mode, FI_CONTEXT); + IFFLAGSTR(mode, FI_MSG_PREFIX); +@@ -268,11 +303,12 @@ static void fi_tostr_mode(char *buf, uint64_t mode) + IFFLAGSTR(mode, FI_NOTIFY_FLAGS_ONLY); + IFFLAGSTR(mode, FI_RESTRICTED_COMP); + IFFLAGSTR(mode, FI_CONTEXT2); ++ IFFLAGSTR(mode, FI_BUFFERED_RECV); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_addr(char *buf, uint32_t addr_format, void *addr) ++static void ofi_tostr_addr(char *buf, uint32_t addr_format, void *addr) + { + char *p; + size_t len; +@@ -280,7 +316,7 @@ static void fi_tostr_addr(char *buf, uint32_t addr_format, void *addr) + p = buf + strlen(buf); + + if (addr == NULL) { +- strcatf(p, "(null)"); ++ ofi_strcatf(p, "(null)"); + return; + } + +@@ -288,128 +324,128 @@ static void fi_tostr_addr(char *buf, uint32_t addr_format, void *addr) + ofi_straddr(p, &len, addr_format, addr); + } + +-static void fi_tostr_tx_attr(char *buf, const struct fi_tx_attr *attr, ++static void ofi_tostr_tx_attr(char *buf, const struct fi_tx_attr *attr, + const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_tx_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_tx_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_tx_attr:\n", prefix); +- strcatf(buf, "%s%scaps: [ ", prefix, TAB); +- fi_tostr_caps(buf, attr->caps); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%sfi_tx_attr:\n", prefix); ++ ofi_strcatf(buf, "%s%scaps: [ ", prefix, TAB); ++ ofi_tostr_caps(buf, attr->caps); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%smode: [ ", prefix, TAB); +- fi_tostr_mode(buf, attr->mode); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%smode: [ ", prefix, TAB); ++ ofi_tostr_mode(buf, attr->mode); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%sop_flags: [ ", prefix, TAB); +- fi_tostr_flags(buf, attr->op_flags); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%sop_flags: [ ", prefix, TAB); ++ ofi_tostr_opflags(buf, attr->op_flags); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%smsg_order: [ ", prefix, TAB); +- fi_tostr_order(buf, attr->msg_order); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%smsg_order: [ ", prefix, TAB); ++ ofi_tostr_msgorder(buf, attr->msg_order); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%scomp_order: [ ", prefix, TAB); +- fi_tostr_order(buf, attr->comp_order); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%scomp_order: [ ", prefix, TAB); ++ ofi_tostr_comporder(buf, attr->comp_order); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%sinject_size: %zd\n", prefix, TAB, attr->inject_size); +- strcatf(buf, "%s%ssize: %zd\n", prefix, TAB, attr->size); +- strcatf(buf, "%s%siov_limit: %zd\n", prefix, TAB, attr->iov_limit); +- strcatf(buf, "%s%srma_iov_limit: %zd\n", prefix, TAB, attr->rma_iov_limit); ++ ofi_strcatf(buf, "%s%sinject_size: %zu\n", prefix, TAB, attr->inject_size); ++ ofi_strcatf(buf, "%s%ssize: %zu\n", prefix, TAB, attr->size); ++ ofi_strcatf(buf, "%s%siov_limit: %zu\n", prefix, TAB, attr->iov_limit); ++ ofi_strcatf(buf, "%s%srma_iov_limit: %zu\n", prefix, TAB, attr->rma_iov_limit); + } + +-static void fi_tostr_rx_attr(char *buf, const struct fi_rx_attr *attr, ++static void ofi_tostr_rx_attr(char *buf, const struct fi_rx_attr *attr, + const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_rx_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_rx_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_rx_attr:\n", prefix); +- strcatf(buf, "%s%scaps: [ ", prefix, TAB); +- fi_tostr_caps(buf, attr->caps); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%sfi_rx_attr:\n", prefix); ++ ofi_strcatf(buf, "%s%scaps: [ ", prefix, TAB); ++ ofi_tostr_caps(buf, attr->caps); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%smode: [ ", prefix, TAB); +- fi_tostr_mode(buf, attr->mode); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%smode: [ ", prefix, TAB); ++ ofi_tostr_mode(buf, attr->mode); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%sop_flags: [ ", prefix, TAB); +- fi_tostr_flags(buf, attr->op_flags); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%sop_flags: [ ", prefix, TAB); ++ ofi_tostr_opflags(buf, attr->op_flags); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%smsg_order: [ ", prefix, TAB); +- fi_tostr_order(buf, attr->msg_order); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%smsg_order: [ ", prefix, TAB); ++ ofi_tostr_msgorder(buf, attr->msg_order); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%scomp_order: [ ", prefix, TAB); +- fi_tostr_order(buf, attr->comp_order); +- strcatf(buf, " ]\n"); ++ ofi_strcatf(buf, "%s%scomp_order: [ ", prefix, TAB); ++ ofi_tostr_comporder(buf, attr->comp_order); ++ ofi_strcatf(buf, " ]\n"); + +- strcatf(buf, "%s%stotal_buffered_recv: %zd\n", prefix, TAB, attr->total_buffered_recv); +- strcatf(buf, "%s%ssize: %zd\n", prefix, TAB, attr->size); +- strcatf(buf, "%s%siov_limit: %zd\n", prefix, TAB, attr->iov_limit); ++ ofi_strcatf(buf, "%s%stotal_buffered_recv: %zu\n", prefix, TAB, attr->total_buffered_recv); ++ ofi_strcatf(buf, "%s%ssize: %zu\n", prefix, TAB, attr->size); ++ ofi_strcatf(buf, "%s%siov_limit: %zu\n", prefix, TAB, attr->iov_limit); + } + +-static void fi_tostr_ep_attr(char *buf, const struct fi_ep_attr *attr, const char *prefix) ++static void ofi_tostr_ep_attr(char *buf, const struct fi_ep_attr *attr, const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_ep_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_ep_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_ep_attr:\n", prefix); +- strcatf(buf, "%s%stype: ", prefix, TAB); +- fi_tostr_ep_type(buf, attr->type); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sprotocol: ", prefix, TAB); +- fi_tostr_protocol(buf, attr->protocol); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sprotocol_version: %d\n", prefix, TAB, attr->protocol_version); +- strcatf(buf, "%s%smax_msg_size: %zd\n", prefix, TAB, attr->max_msg_size); +- strcatf(buf, "%s%smsg_prefix_size: %zd\n", prefix, TAB, attr->msg_prefix_size); +- strcatf(buf, "%s%smax_order_raw_size: %zd\n", prefix, TAB, attr->max_order_raw_size); +- strcatf(buf, "%s%smax_order_war_size: %zd\n", prefix, TAB, attr->max_order_war_size); +- strcatf(buf, "%s%smax_order_waw_size: %zd\n", prefix, TAB, attr->max_order_waw_size); +- strcatf(buf, "%s%smem_tag_format: 0x%016llx\n", prefix, TAB, attr->mem_tag_format); +- +- strcatf(buf, "%s%stx_ctx_cnt: %zd\n", prefix, TAB, attr->tx_ctx_cnt); +- strcatf(buf, "%s%srx_ctx_cnt: %zd\n", prefix, TAB, attr->rx_ctx_cnt); +- +- strcatf(buf, "%s%sauth_key_size: %zd\n", prefix, TAB, attr->auth_key_size); ++ ofi_strcatf(buf, "%sfi_ep_attr:\n", prefix); ++ ofi_strcatf(buf, "%s%stype: ", prefix, TAB); ++ ofi_tostr_ep_type(buf, attr->type); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sprotocol: ", prefix, TAB); ++ ofi_tostr_protocol(buf, attr->protocol); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sprotocol_version: %d\n", prefix, TAB, attr->protocol_version); ++ ofi_strcatf(buf, "%s%smax_msg_size: %zu\n", prefix, TAB, attr->max_msg_size); ++ ofi_strcatf(buf, "%s%smsg_prefix_size: %zu\n", prefix, TAB, attr->msg_prefix_size); ++ ofi_strcatf(buf, "%s%smax_order_raw_size: %zu\n", prefix, TAB, attr->max_order_raw_size); ++ ofi_strcatf(buf, "%s%smax_order_war_size: %zu\n", prefix, TAB, attr->max_order_war_size); ++ ofi_strcatf(buf, "%s%smax_order_waw_size: %zu\n", prefix, TAB, attr->max_order_waw_size); ++ ofi_strcatf(buf, "%s%smem_tag_format: 0x%016llx\n", prefix, TAB, attr->mem_tag_format); ++ ++ ofi_strcatf(buf, "%s%stx_ctx_cnt: %zu\n", prefix, TAB, attr->tx_ctx_cnt); ++ ofi_strcatf(buf, "%s%srx_ctx_cnt: %zu\n", prefix, TAB, attr->rx_ctx_cnt); ++ ++ ofi_strcatf(buf, "%s%sauth_key_size: %zu\n", prefix, TAB, attr->auth_key_size); + } + +-static void fi_tostr_resource_mgmt(char *buf, enum fi_resource_mgmt rm) ++static void ofi_tostr_resource_mgmt(char *buf, enum fi_resource_mgmt rm) + { + switch (rm) { + CASEENUMSTR(FI_RM_UNSPEC); + CASEENUMSTR(FI_RM_DISABLED); + CASEENUMSTR(FI_RM_ENABLED); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_av_type(char *buf, enum fi_av_type type) ++static void ofi_tostr_av_type(char *buf, enum fi_av_type type) + { + switch (type) { + CASEENUMSTR(FI_AV_UNSPEC); + CASEENUMSTR(FI_AV_MAP); + CASEENUMSTR(FI_AV_TABLE); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_mr_mode(char *buf, int mr_mode) ++static void ofi_tostr_mr_mode(char *buf, int mr_mode) + { + IFFLAGSTR(mr_mode, FI_MR_BASIC); + IFFLAGSTR(mr_mode, FI_MR_SCALABLE); +@@ -421,10 +457,10 @@ static void fi_tostr_mr_mode(char *buf, int mr_mode) + IFFLAGSTR(mr_mode, FI_MR_MMU_NOTIFY); + IFFLAGSTR(mr_mode, FI_MR_RMA_EVENT); + +- fi_remove_comma(buf); ++ ofi_remove_comma(buf); + } + +-static void fi_tostr_op_type(char *buf, int op_type) ++static void ofi_tostr_op_type(char *buf, int op_type) + { + switch (op_type) { + CASEENUMSTR(FI_OP_RECV); +@@ -439,120 +475,225 @@ static void fi_tostr_op_type(char *buf, int op_type) + CASEENUMSTR(FI_OP_CNTR_SET); + CASEENUMSTR(FI_OP_CNTR_ADD); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_domain_attr(char *buf, const struct fi_domain_attr *attr, ++static void ofi_tostr_domain_attr(char *buf, const struct fi_domain_attr *attr, + const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_domain_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_domain_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_domain_attr:\n", prefix); +- +- strcatf(buf, "%s%sdomain: 0x%x\n", prefix, TAB, attr->domain); +- +- strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name); +- strcatf(buf, "%s%sthreading: ", prefix, TAB); +- fi_tostr_threading(buf, attr->threading); +- strcatf(buf, "\n"); +- +- strcatf(buf, "%s%scontrol_progress: ", prefix,TAB); +- fi_tostr_progress(buf, attr->control_progress); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sdata_progress: ", prefix, TAB); +- fi_tostr_progress(buf, attr->data_progress); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sresource_mgmt: ", prefix, TAB); +- fi_tostr_resource_mgmt(buf, attr->resource_mgmt); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%sav_type: ", prefix, TAB); +- fi_tostr_av_type(buf, attr->av_type); +- strcatf(buf, "\n"); +- strcatf(buf, "%s%smr_mode: [ ", prefix, TAB); +- fi_tostr_mr_mode(buf, attr->mr_mode); +- strcatf(buf, " ]\n"); +- +- strcatf(buf, "%s%smr_key_size: %zd\n", prefix, TAB, attr->mr_key_size); +- strcatf(buf, "%s%scq_data_size: %zd\n", prefix, TAB, attr->cq_data_size); +- strcatf(buf, "%s%scq_cnt: %zd\n", prefix, TAB, attr->cq_cnt); +- strcatf(buf, "%s%sep_cnt: %zd\n", prefix, TAB, attr->ep_cnt); +- strcatf(buf, "%s%stx_ctx_cnt: %zd\n", prefix, TAB, attr->tx_ctx_cnt); +- strcatf(buf, "%s%srx_ctx_cnt: %zd\n", prefix, TAB, attr->rx_ctx_cnt); +- strcatf(buf, "%s%smax_ep_tx_ctx: %zd\n", prefix, TAB, attr->max_ep_tx_ctx); +- strcatf(buf, "%s%smax_ep_rx_ctx: %zd\n", prefix, TAB, attr->max_ep_rx_ctx); +- strcatf(buf, "%s%smax_ep_stx_ctx: %zd\n", prefix, TAB, attr->max_ep_stx_ctx); +- strcatf(buf, "%s%smax_ep_srx_ctx: %zd\n", prefix, TAB, attr->max_ep_srx_ctx); +- strcatf(buf, "%s%scntr_cnt: %zd\n", prefix, TAB, attr->cntr_cnt); +- strcatf(buf, "%s%smr_iov_limit: %zd\n", prefix, TAB, attr->mr_iov_limit); +- +- strcatf(buf, "%scaps: [ ", TAB); +- fi_tostr_caps(buf, attr->caps); +- strcatf(buf, " ]\n"); +- +- strcatf(buf, "%smode: [ ", TAB); +- fi_tostr_mode(buf, attr->mode); +- strcatf(buf, " ]\n"); +- +- strcatf(buf, "%s%sauth_key_size: %zd\n", prefix, TAB, attr->auth_key_size); +- strcatf(buf, "%s%smax_err_data: %zd\n", prefix, TAB, attr->max_err_data); +- strcatf(buf, "%s%smr_cnt: %zd\n", prefix, TAB, attr->mr_cnt); +-} +- +-static void fi_tostr_fabric_attr(char *buf, const struct fi_fabric_attr *attr, ++ ofi_strcatf(buf, "%sfi_domain_attr:\n", prefix); ++ ++ ofi_strcatf(buf, "%s%sdomain: 0x%x\n", prefix, TAB, attr->domain); ++ ++ ofi_strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name); ++ ofi_strcatf(buf, "%s%sthreading: ", prefix, TAB); ++ ofi_tostr_threading(buf, attr->threading); ++ ofi_strcatf(buf, "\n"); ++ ++ ofi_strcatf(buf, "%s%scontrol_progress: ", prefix,TAB); ++ ofi_tostr_progress(buf, attr->control_progress); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sdata_progress: ", prefix, TAB); ++ ofi_tostr_progress(buf, attr->data_progress); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sresource_mgmt: ", prefix, TAB); ++ ofi_tostr_resource_mgmt(buf, attr->resource_mgmt); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%sav_type: ", prefix, TAB); ++ ofi_tostr_av_type(buf, attr->av_type); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%s%smr_mode: [ ", prefix, TAB); ++ ofi_tostr_mr_mode(buf, attr->mr_mode); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%s%smr_key_size: %zu\n", prefix, TAB, attr->mr_key_size); ++ ofi_strcatf(buf, "%s%scq_data_size: %zu\n", prefix, TAB, attr->cq_data_size); ++ ofi_strcatf(buf, "%s%scq_cnt: %zu\n", prefix, TAB, attr->cq_cnt); ++ ofi_strcatf(buf, "%s%sep_cnt: %zu\n", prefix, TAB, attr->ep_cnt); ++ ofi_strcatf(buf, "%s%stx_ctx_cnt: %zu\n", prefix, TAB, attr->tx_ctx_cnt); ++ ofi_strcatf(buf, "%s%srx_ctx_cnt: %zu\n", prefix, TAB, attr->rx_ctx_cnt); ++ ofi_strcatf(buf, "%s%smax_ep_tx_ctx: %zu\n", prefix, TAB, attr->max_ep_tx_ctx); ++ ofi_strcatf(buf, "%s%smax_ep_rx_ctx: %zu\n", prefix, TAB, attr->max_ep_rx_ctx); ++ ofi_strcatf(buf, "%s%smax_ep_stx_ctx: %zu\n", prefix, TAB, attr->max_ep_stx_ctx); ++ ofi_strcatf(buf, "%s%smax_ep_srx_ctx: %zu\n", prefix, TAB, attr->max_ep_srx_ctx); ++ ofi_strcatf(buf, "%s%scntr_cnt: %zu\n", prefix, TAB, attr->cntr_cnt); ++ ofi_strcatf(buf, "%s%smr_iov_limit: %zu\n", prefix, TAB, attr->mr_iov_limit); ++ ++ ofi_strcatf(buf, "%scaps: [ ", TAB); ++ ofi_tostr_caps(buf, attr->caps); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%smode: [ ", TAB); ++ ofi_tostr_mode(buf, attr->mode); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%s%sauth_key_size: %zu\n", prefix, TAB, attr->auth_key_size); ++ ofi_strcatf(buf, "%s%smax_err_data: %zu\n", prefix, TAB, attr->max_err_data); ++ ofi_strcatf(buf, "%s%smr_cnt: %zu\n", prefix, TAB, attr->mr_cnt); ++} ++ ++static void ofi_tostr_fabric_attr(char *buf, const struct fi_fabric_attr *attr, + const char *prefix) + { + if (!attr) { +- strcatf(buf, "%sfi_fabric_attr: (null)\n", prefix); ++ ofi_strcatf(buf, "%sfi_fabric_attr: (null)\n", prefix); + return; + } + +- strcatf(buf, "%sfi_fabric_attr:\n", prefix); +- strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name); +- strcatf(buf, "%s%sprov_name: %s\n", prefix, TAB, attr->prov_name); +- strcatf(buf, "%s%sprov_version: %d.%d\n", prefix, TAB, ++ ofi_strcatf(buf, "%sfi_fabric_attr:\n", prefix); ++ ofi_strcatf(buf, "%s%sname: %s\n", prefix, TAB, attr->name); ++ ofi_strcatf(buf, "%s%sprov_name: %s\n", prefix, TAB, attr->prov_name); ++ ofi_strcatf(buf, "%s%sprov_version: %d.%d\n", prefix, TAB, + FI_MAJOR(attr->prov_version), FI_MINOR(attr->prov_version)); +- strcatf(buf, "%s%sapi_version: %d.%d\n", prefix, TAB, ++ ofi_strcatf(buf, "%s%sapi_version: %d.%d\n", prefix, TAB, + FI_MAJOR(attr->api_version), FI_MINOR(attr->api_version)); + } + +-static void fi_tostr_info(char *buf, const struct fi_info *info) ++static void ofi_tostr_device_attr(char *buf, size_t len, ++ const struct fi_device_attr *attr) + { +- strcatf(buf, "fi_info:\n"); +- strcatf(buf, "%scaps: [ ", TAB); +- fi_tostr_caps(buf, info->caps); +- strcatf(buf, " ]\n"); ++ const char *prefix = TAB TAB; ++ ++ ofi_strncatf(buf, len, "%sfi_device_attr:\n", prefix); ++ ++ prefix = TAB TAB TAB; ++ ofi_strncatf(buf, len, "%sname: %s\n", prefix, attr->name); ++ ofi_strncatf(buf, len, "%sdevice_id: %s\n", prefix, attr->device_id); ++ ofi_strncatf(buf, len, "%sdevice_version: %s\n", prefix, ++ attr->device_version); ++ ofi_strncatf(buf, len, "%svendor_id: %s\n", prefix, attr->vendor_id); ++ ofi_strncatf(buf, len, "%sdriver: %s\n", prefix, attr->driver); ++ ofi_strncatf(buf, len, "%sfirmware: %s\n", prefix, attr->firmware); ++} + +- strcatf(buf, "%smode: [ ", TAB); +- fi_tostr_mode(buf, info->mode); +- strcatf(buf, " ]\n"); ++static void ofi_tostr_pci_attr(char *buf, size_t len, ++ const struct fi_pci_attr *attr) ++{ ++ const char *prefix = TAB TAB TAB; + +- strcatf(buf, "%saddr_format: ", TAB); +- fi_tostr_addr_format(buf, info->addr_format); +- strcatf(buf, "\n"); ++ ofi_strncatf(buf, len, "%sfi_pci_attr:\n", prefix); + +- strcatf(buf, "%ssrc_addrlen: %zd\n", TAB, info->src_addrlen); +- strcatf(buf, "%sdest_addrlen: %zd\n", TAB, info->dest_addrlen); +- strcatf(buf, "%ssrc_addr: ", TAB); +- fi_tostr_addr(buf, info->addr_format, info->src_addr); +- strcatf(buf, "\n"); +- strcatf(buf, "%sdest_addr: ", TAB); +- fi_tostr_addr(buf, info->addr_format, info->dest_addr); +- strcatf(buf, "\n"); +- strcatf(buf, "%shandle: %s\n", TAB, info->handle); ++ prefix = TAB TAB TAB TAB; ++ ofi_strncatf(buf, len, "%sdomain_id: %u\n", prefix, attr->domain_id); ++ ofi_strncatf(buf, len, "%sbus_id: %u\n", prefix, attr->bus_id); ++ ofi_strncatf(buf, len, "%sdevice_id: %u\n", prefix, attr->device_id); ++ ofi_strncatf(buf, len, "%sfunction_id: %u\n", prefix, attr->function_id); ++} + +- fi_tostr_tx_attr(buf, info->tx_attr, TAB); +- fi_tostr_rx_attr(buf, info->rx_attr, TAB); +- fi_tostr_ep_attr(buf, info->ep_attr, TAB); +- fi_tostr_domain_attr(buf, info->domain_attr, TAB); +- fi_tostr_fabric_attr(buf, info->fabric_attr, TAB); ++static void ofi_tostr_bus_type(char *buf, size_t len, int type) ++{ ++ switch (type) { ++ CASEENUMSTRN(FI_BUS_UNKNOWN, len); ++ CASEENUMSTRN(FI_BUS_PCI, len); ++ default: ++ ofi_strncatf(buf, len, "Unknown"); ++ break; ++ } ++} ++ ++static void ofi_tostr_bus_attr(char *buf, size_t len, ++ const struct fi_bus_attr *attr) ++{ ++ const char *prefix = TAB TAB; ++ ++ ofi_strncatf(buf, len, "%sfi_bus_attr:\n", prefix); ++ ++ prefix = TAB TAB TAB; ++ ofi_strncatf(buf, len, "%sfi_bus_type: ", prefix); ++ ofi_tostr_bus_type(buf, len, attr->bus_type); ++ ofi_strncatf(buf, len, "\n"); ++ ++ switch (attr->bus_type) { ++ case FI_BUS_PCI: ++ ofi_tostr_pci_attr(buf, len, &attr->attr.pci); ++ break; ++ default: ++ break; ++ } + } + +-static void fi_tostr_atomic_type(char *buf, enum fi_datatype type) ++static void ofi_tostr_link_state(char *buf, size_t len, int state) ++{ ++ switch (state) { ++ CASEENUMSTRN(FI_LINK_UNKNOWN, len); ++ CASEENUMSTRN(FI_LINK_DOWN, len); ++ CASEENUMSTRN(FI_LINK_UP, len); ++ default: ++ ofi_strncatf(buf, len, "Unknown"); ++ break; ++ } ++} ++ ++static void ofi_tostr_link_attr(char *buf, size_t len, ++ const struct fi_link_attr *attr) ++{ ++ const char *prefix = TAB TAB; ++ ofi_strncatf(buf, len, "%sfi_link_attr:\n", prefix); ++ ++ prefix = TAB TAB TAB; ++ ofi_strncatf(buf, len, "%saddress: %s\n", prefix, attr->address); ++ ofi_strncatf(buf, len, "%smtu: %zu\n", prefix, attr->mtu); ++ ofi_strncatf(buf, len, "%sspeed: %zu\n", prefix, attr->speed); ++ ofi_strncatf(buf, len, "%sstate: ", prefix); ++ ofi_tostr_link_state(buf, len, attr->state); ++ ofi_strncatf(buf, len, "\n%snetwork_type: %s\n", prefix, ++ attr->network_type); ++} ++ ++int ofi_nic_tostr(const struct fid *fid_nic, char *buf, size_t len) ++{ ++ const struct fid_nic *nic = (const struct fid_nic*) fid_nic; ++ ++ assert(fid_nic->fclass == FI_CLASS_NIC); ++ ofi_strncatf(buf, len, "%sfid_nic:\n", TAB); ++ ++ ofi_tostr_device_attr(buf, len, nic->device_attr); ++ ofi_tostr_bus_attr(buf, len, nic->bus_attr); ++ ofi_tostr_link_attr(buf, len, nic->link_attr); ++ return 0; ++} ++ ++static void ofi_tostr_info(char *buf, const struct fi_info *info) ++{ ++ ofi_strcatf(buf, "fi_info:\n"); ++ ofi_strcatf(buf, "%scaps: [ ", TAB); ++ ofi_tostr_caps(buf, info->caps); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%smode: [ ", TAB); ++ ofi_tostr_mode(buf, info->mode); ++ ofi_strcatf(buf, " ]\n"); ++ ++ ofi_strcatf(buf, "%saddr_format: ", TAB); ++ oofi_tostr_addr_format(buf, info->addr_format); ++ ofi_strcatf(buf, "\n"); ++ ++ ofi_strcatf(buf, "%ssrc_addrlen: %zu\n", TAB, info->src_addrlen); ++ ofi_strcatf(buf, "%sdest_addrlen: %zu\n", TAB, info->dest_addrlen); ++ ofi_strcatf(buf, "%ssrc_addr: ", TAB); ++ ofi_tostr_addr(buf, info->addr_format, info->src_addr); ++ ofi_strcatf(buf, "\n"); ++ ofi_strcatf(buf, "%sdest_addr: ", TAB); ++ ofi_tostr_addr(buf, info->addr_format, info->dest_addr); ++ ofi_strcatf(buf, "\n"); ++ ofi_tostr_fid(TAB "handle: ", buf, info->handle); ++ ++ ofi_tostr_tx_attr(buf, info->tx_attr, TAB); ++ ofi_tostr_rx_attr(buf, info->rx_attr, TAB); ++ ofi_tostr_ep_attr(buf, info->ep_attr, TAB); ++ ofi_tostr_domain_attr(buf, info->domain_attr, TAB); ++ ofi_tostr_fabric_attr(buf, info->fabric_attr, TAB); ++ ofi_tostr_fid(TAB "nic_fid: ", buf, &info->nic->fid); ++} ++ ++static void ofi_tostr_atomic_type(char *buf, enum fi_datatype type) + { + switch (type) { + CASEENUMSTR(FI_INT8); +@@ -570,12 +711,12 @@ static void fi_tostr_atomic_type(char *buf, enum fi_datatype type) + CASEENUMSTR(FI_LONG_DOUBLE); + CASEENUMSTR(FI_LONG_DOUBLE_COMPLEX); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_atomic_op(char *buf, enum fi_op op) ++static void ofi_tostr_atomic_op(char *buf, enum fi_op op) + { + switch (op) { + CASEENUMSTR(FI_MIN); +@@ -598,18 +739,18 @@ static void fi_tostr_atomic_op(char *buf, enum fi_op op) + CASEENUMSTR(FI_CSWAP_GT); + CASEENUMSTR(FI_MSWAP); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_version(char *buf) ++static void ofi_tostr_version(char *buf) + { +- strcatf(buf, VERSION); +- strcatf(buf, BUILD_ID); ++ ofi_strcatf(buf, VERSION); ++ ofi_strcatf(buf, BUILD_ID); + } + +-static void fi_tostr_eq_event(char *buf, int type) ++static void ofi_tostr_eq_event(char *buf, int type) + { + switch (type) { + CASEENUMSTR(FI_NOTIFY); +@@ -619,12 +760,12 @@ static void fi_tostr_eq_event(char *buf, int type) + CASEENUMSTR(FI_MR_COMPLETE); + CASEENUMSTR(FI_AV_COMPLETE); + default: +- strcatf(buf, "Unknown"); ++ ofi_strcatf(buf, "Unknown"); + break; + } + } + +-static void fi_tostr_cq_event_flags(char *buf, uint64_t flags) ++static void ofi_tostr_cq_event_flags(char *buf, uint64_t flags) + { + IFFLAGSTR(flags, FI_SEND); + IFFLAGSTR(flags, FI_RECV); +@@ -638,7 +779,9 @@ static void fi_tostr_cq_event_flags(char *buf, uint64_t flags) + IFFLAGSTR(flags, FI_REMOTE_WRITE); + IFFLAGSTR(flags, FI_REMOTE_CQ_DATA); + IFFLAGSTR(flags, FI_MULTI_RECV); +- fi_remove_comma(buf); ++ IFFLAGSTR(flags, FI_MORE); ++ IFFLAGSTR(flags, FI_CLAIM); ++ ofi_remove_comma(buf); + } + + __attribute__((visibility ("default"),EXTERNALLY_VISIBLE)) +@@ -657,7 +800,7 @@ char *DEFAULT_SYMVER_PRE(fi_tostr)(const void *data, enum fi_type datatype) + enumval = (const int *) data; + + if (!buf) { +- buf = calloc(FI_BUFSIZ, 1); ++ buf = calloc(OFI_BUFSIZ, 1); + if (!buf) + return NULL; + } +@@ -665,77 +808,80 @@ char *DEFAULT_SYMVER_PRE(fi_tostr)(const void *data, enum fi_type datatype) + + switch (datatype) { + case FI_TYPE_INFO: +- fi_tostr_info(buf, data); ++ ofi_tostr_info(buf, data); + break; + case FI_TYPE_EP_TYPE: +- fi_tostr_ep_type(buf, *enumval); ++ ofi_tostr_ep_type(buf, *enumval); + break; + case FI_TYPE_CAPS: +- fi_tostr_caps(buf, *val64); ++ ofi_tostr_caps(buf, *val64); + break; + case FI_TYPE_OP_FLAGS: +- fi_tostr_flags(buf, *val64); ++ ofi_tostr_opflags(buf, *val64); + break; + case FI_TYPE_ADDR_FORMAT: +- fi_tostr_addr_format(buf, *val32); ++ oofi_tostr_addr_format(buf, *val32); + break; + case FI_TYPE_TX_ATTR: +- fi_tostr_tx_attr(buf, data, ""); ++ ofi_tostr_tx_attr(buf, data, ""); + break; + case FI_TYPE_RX_ATTR: +- fi_tostr_rx_attr(buf, data, ""); ++ ofi_tostr_rx_attr(buf, data, ""); + break; + case FI_TYPE_EP_ATTR: +- fi_tostr_ep_attr(buf, data, ""); ++ ofi_tostr_ep_attr(buf, data, ""); + break; + case FI_TYPE_DOMAIN_ATTR: +- fi_tostr_domain_attr(buf, data, ""); ++ ofi_tostr_domain_attr(buf, data, ""); + break; + case FI_TYPE_FABRIC_ATTR: +- fi_tostr_fabric_attr(buf, data, ""); ++ ofi_tostr_fabric_attr(buf, data, ""); + break; + case FI_TYPE_THREADING: +- fi_tostr_threading(buf, *enumval); ++ ofi_tostr_threading(buf, *enumval); + break; + case FI_TYPE_PROGRESS: +- fi_tostr_progress(buf, *enumval); ++ ofi_tostr_progress(buf, *enumval); + break; + case FI_TYPE_PROTOCOL: +- fi_tostr_protocol(buf, *val32); ++ ofi_tostr_protocol(buf, *val32); + break; + case FI_TYPE_MSG_ORDER: +- fi_tostr_order(buf, *val64); ++ ofi_tostr_msgorder(buf, *val64); + break; + case FI_TYPE_MODE: +- fi_tostr_mode(buf, *val64); ++ ofi_tostr_mode(buf, *val64); + break; + case FI_TYPE_AV_TYPE: +- fi_tostr_av_type(buf, *enumval); ++ ofi_tostr_av_type(buf, *enumval); + break; + case FI_TYPE_ATOMIC_TYPE: +- fi_tostr_atomic_type(buf, *enumval); ++ ofi_tostr_atomic_type(buf, *enumval); + break; + case FI_TYPE_ATOMIC_OP: +- fi_tostr_atomic_op(buf, *enumval); ++ ofi_tostr_atomic_op(buf, *enumval); + break; + case FI_TYPE_VERSION: +- fi_tostr_version(buf); ++ ofi_tostr_version(buf); + break; + case FI_TYPE_EQ_EVENT: +- fi_tostr_eq_event(buf, *enumval); ++ ofi_tostr_eq_event(buf, *enumval); + break; + case FI_TYPE_CQ_EVENT_FLAGS: +- fi_tostr_cq_event_flags(buf, *val64); ++ ofi_tostr_cq_event_flags(buf, *val64); + break; + case FI_TYPE_MR_MODE: + /* mr_mode was an enum converted to int flags */ +- fi_tostr_mr_mode(buf, *enumval); ++ ofi_tostr_mr_mode(buf, *enumval); + break; + case FI_TYPE_OP_TYPE: +- fi_tostr_op_type(buf, *enumval); ++ ofi_tostr_op_type(buf, *enumval); ++ break; ++ case FI_TYPE_FID: ++ ofi_tostr_fid("fid: ", buf, data); + break; + default: +- strcatf(buf, "Unknown type"); ++ ofi_strcatf(buf, "Unknown type"); + break; + } + return buf; +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/iov.c b/src/mpid/ch4/netmod/ofi/libfabric/src/iov.c +index c65c8853d..b40c2196e 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/iov.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/iov.c +@@ -101,3 +101,72 @@ int ofi_truncate_iov(struct iovec *iov, size_t *iov_count, size_t trim_size) + } + return -FI_ETRUNC; + } ++ ++/* Copy 'len' bytes worth of src iovec to dst */ ++int ofi_copy_iov_desc(struct iovec *dst_iov, void **dst_desc, size_t *dst_count, ++ struct iovec *src_iov, void **src_desc, size_t src_count, ++ size_t *index, size_t *offset, size_t len) ++{ ++ size_t i, j; ++ ++ assert(*index < src_count); ++ assert(*offset <= src_iov[*index].iov_len); ++ ++ for (i = 0, j = *index; j < src_count; i++, j++) { ++ dst_iov[i].iov_base = (uint8_t *)src_iov[j].iov_base + *offset; ++ if (src_desc) ++ dst_desc[i] = src_desc[j]; ++ ++ if (len <= src_iov[j].iov_len - *offset) { ++ dst_iov[i].iov_len = len; ++ *dst_count = i + 1; ++ ++ if (len == src_iov[j].iov_len - *offset) { ++ *index = j + 1; ++ *offset = 0; ++ } else { ++ *index = j; ++ *offset += len; ++ } ++ return 0; ++ } ++ dst_iov[i].iov_len = src_iov[j].iov_len - *offset; ++ len -= dst_iov[i].iov_len; ++ *offset = 0; ++ } ++ return -FI_ETOOSMALL; ++} ++ ++/* Copy 'len' bytes worth of src fi_rma_iov to dst */ ++int ofi_copy_rma_iov(struct fi_rma_iov *dst_iov, size_t *dst_count, ++ struct fi_rma_iov *src_iov, size_t src_count, ++ size_t *index, size_t *offset, size_t len) ++{ ++ size_t i, j; ++ ++ assert(*index < src_count); ++ assert(*offset <= src_iov[*index].len); ++ ++ for (i = 0, j = *index; j < src_count; i++, j++) { ++ dst_iov[i].addr = src_iov[j].addr + *offset; ++ dst_iov[i].key = src_iov[j].key; ++ ++ if (len <= src_iov[j].len - *offset) { ++ dst_iov[i].len = len; ++ *dst_count = i + 1; ++ ++ if (len == src_iov[j].len - *offset) { ++ *index = j + 1; ++ *offset = 0; ++ } else { ++ *index = j; ++ *offset += len; ++ } ++ return 0; ++ } ++ dst_iov[i].len = src_iov[j].len - *offset; ++ len -= dst_iov[i].len; ++ *offset = 0; ++ } ++ return -FI_ETOOSMALL; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/linux/osd.c b/src/mpid/ch4/netmod/ofi/libfabric/src/linux/osd.c +new file mode 100644 +index 000000000..977193c95 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/linux/osd.c +@@ -0,0 +1,66 @@ ++/* ++ * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif /* _GNU_SOURCE */ ++ ++#include ++#include ++#include ++ ++#include "ofi.h" ++#include "ofi_osd.h" ++ ++ssize_t ofi_get_hugepage_size(void) ++{ ++ FILE *fd; ++ char *line = NULL; ++ size_t len = 0; ++ ssize_t val = -1; ++ ++ fd = fopen("/proc/meminfo", "r"); ++ if (!fd) ++ return -errno; ++ ++ while (getline(&line, &len, fd) != -1) ++ if (sscanf(line, "Hugepagesize: %lu kB", &val) == 1) ++ break; ++ ++ free(line); ++ fclose(fd); ++ ++ if (val == -1) ++ return -FI_ENOENT; ++ ++ return val * 1024; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/perf.c b/src/mpid/ch4/netmod/ofi/libfabric/src/perf.c +index 5416510bf..1cd2a6590 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/perf.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/perf.c +@@ -42,6 +42,28 @@ + #include + + ++enum ofi_perf_domain perf_domain = OFI_PMU_CPU; ++uint32_t perf_cntr = OFI_PMC_CPU_INSTR; ++uint32_t perf_flags; ++ ++ ++void ofi_perf_init(void) ++{ ++ char *param_val = NULL; ++ ++ fi_param_define(NULL, "perf_cntr", FI_PARAM_STRING, ++ "Performance counter to analyze (default: cpu_instr). " ++ "Options: cpu_instr, cpu_cycles."); ++ fi_param_get_str(NULL, "perf_cntr", ¶m_val); ++ if (!param_val) ++ return; ++ ++ if (!strcasecmp(param_val, "cpu_cycles")) { ++ perf_domain = OFI_PMU_CPU; ++ perf_cntr = OFI_PMC_CPU_CYCLES; ++ } ++} ++ + int ofi_perfset_create(const struct fi_provider *prov, + struct ofi_perfset *set, size_t size, + enum ofi_perf_domain domain, uint32_t cntr_id, +@@ -56,7 +78,7 @@ int ofi_perfset_create(const struct fi_provider *prov, + return ret; + } + +- set->data = calloc(size, sizeof(*set->data) + sizeof(*set->names)); ++ set->data = calloc(size, sizeof(*set->data)); + if (!set->data) { + ofi_pmu_close(set->ctx); + return -FI_ENOMEM; +@@ -64,46 +86,65 @@ int ofi_perfset_create(const struct fi_provider *prov, + + set->prov = prov; + set->size = size; +- set->count = 0; +- set->names = (char **)(set->data + size); + return 0; + } + + void ofi_perfset_close(struct ofi_perfset *set) + { +- while (set->count--) +- free(set->names[set->count]); + ofi_pmu_close(set->ctx); + free(set->data); + } + +-struct ofi_perf_data *ofi_perfset_data(struct ofi_perfset *set, +- const char *name) ++static const char *ofi_perf_name(void) + { +- if (set->count == set->size) +- return NULL; +- +- if (name) { +- set->names[set->count] = strdup(name); +- if (!set->names[set->count]) +- return NULL; ++ switch (perf_domain) { ++ case OFI_PMU_CPU: ++ switch (perf_cntr) { ++ case OFI_PMC_CPU_CYCLES: ++ return "CPU cycles"; ++ case OFI_PMC_CPU_INSTR: ++ return "CPU instr"; ++ } ++ break; ++ case OFI_PMU_CACHE: ++ switch (perf_cntr) { ++ case OFI_PMC_CACHE_L1_DATA: ++ return "L1 data cache"; ++ case OFI_PMC_CACHE_L1_INSTR: ++ return "L1 instr cache"; ++ case OFI_PMC_CACHE_TLB_DATA: ++ return "TLB data cache"; ++ case OFI_PMC_CACHE_TLB_INSTR: ++ return "TLB instr cache"; ++ } ++ break; ++ case OFI_PMU_OS: ++ switch (perf_cntr) { ++ case OFI_PMC_OS_PAGE_FAULT: ++ return "page faults"; ++ } ++ break; ++ case OFI_PMU_NIC: ++ break; + } +- +- return &set->data[set->count++]; ++ return "unknown"; + } + +-void ofi_perfset_log(struct ofi_perfset *set) ++void ofi_perfset_log(struct ofi_perfset *set, const char *names[]) + { + size_t i; + +- for (i = 0; i < set->count; i++) { +- if (!set->data[i].sum) ++ FI_TRACE(set->prov, FI_LOG_CORE, "\n"); ++ FI_TRACE(set->prov, FI_LOG_CORE, "\tPERF: %s\n", ofi_perf_name()); ++ FI_TRACE(set->prov, FI_LOG_CORE, "\t%-20s%-10s%s\n", "Name", "Avg", "Events"); ++ ++ for (i = 0; i < set->size; i++) { ++ if (!set->data[i].events) + continue; + +- FI_INFO(set->prov, FI_LOG_CORE, "PERF (%s) " +- "events=%" PRIu64 " avg=%g\n", +- set->names[i] ? set->names[i] : "unknown", +- set->data[i].events, +- (double) set->data[i].sum / set->data[i].events); ++ FI_TRACE(set->prov, FI_LOG_CORE, "\t%-20s%-10g%" PRIu64 "\n", ++ names && names[i] ? names[i] : "unknown", ++ (double) set->data[i].sum / set->data[i].events, ++ set->data[i].events); + } + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/rbtree.c b/src/mpid/ch4/netmod/ofi/libfabric/src/rbtree.c +index 6b88fb879..c6377fa7c 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/rbtree.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/rbtree.c +@@ -434,3 +434,24 @@ void *rbtFind(RbtHandle h, void *key) { + } + return NULL; + } ++ ++void rbtTraversal(RbtHandle h, RbtIterator it, void *handler_arg, ++ void(*handler)(void *arg, RbtIterator it)) { ++ RbtType *rbt = h; ++ NodeType *root = it; ++ ++ // apply handler for: ++ // -o the root of the tree/subtree ++ handler(handler_arg, it); ++ // - the left subtree ++ if (root->left != SENTINEL) ++ rbtTraversal(h, root->left, handler_arg, handler); ++ // - the right subtree ++ if (root->right != SENTINEL) ++ rbtTraversal(h, root->right, handler_arg, handler); ++} ++ ++void *rbtRoot(RbtHandle h) { ++ RbtType *rbt = h; ++ return rbt->root; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/shared/ofi_str.c b/src/mpid/ch4/netmod/ofi/libfabric/src/shared/ofi_str.c +new file mode 100644 +index 000000000..80218f9de +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/shared/ofi_str.c +@@ -0,0 +1,171 @@ ++/* ++ * Copyright (c) 2018 Intel Corp., Inc. All rights reserved. ++ * Copyright (c) 2018 Cisco Systems, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++/* ++ * TODO remove this and include ofi_osd.h which would require merging osd.h ++ * files in libfabric and fabtests ++ */ ++#if defined _WIN32 ++#define strdup _strdup ++ ++static inline char* strsep(char **stringp, const char *delim) ++{ ++ char* ptr = *stringp; ++ char* p; ++ ++ p = ptr ? strpbrk(ptr, delim) : NULL; ++ ++ if(!p) ++ *stringp = NULL; ++ else ++ { ++ *p = 0; ++ *stringp = p + 1; ++ } ++ ++ return ptr; ++} ++#endif ++ ++/* String utility functions */ ++ ++int ofi_rm_substr(char *str, const char *substr) ++{ ++ char *dest, *src; ++ ++ dest = strstr(str, substr); ++ if (!dest) ++ return -FI_EINVAL; ++ ++ src = dest + strlen(substr); ++ memmove(dest, src, strlen(src) + 1); ++ return 0; ++} ++ ++int ofi_rm_substr_delim(char *str, const char *substr, const char delim) ++{ ++ char *pattern; ++ size_t len = strlen(substr) + 2; // account for delim and null char ++ int ret; ++ ++ pattern = malloc(len); ++ if (!pattern) ++ return -FI_ENOMEM; ++ ++ snprintf(pattern, len, "%c%s", delim, substr); ++ ret = ofi_rm_substr(str, pattern); ++ if (!ret) ++ goto out; ++ ++ snprintf(pattern, len, "%s%c", substr, delim); ++ ret = ofi_rm_substr(str, pattern); ++ if (!ret) ++ goto out; ++ ++ ret = ofi_rm_substr(str, substr); ++out: ++ free(pattern); ++ return ret; ++} ++ ++/* Split the given string "s" using the specified delimiter(s) in the string ++ * "delim" and return an array of strings. The array is terminated with a NULL ++ * pointer. Returned array should be freed with ofi_free_string_array(). ++ * ++ * Returns NULL on failure. ++ */ ++ ++char **ofi_split_and_alloc(const char *s, const char *delim, size_t *count) ++{ ++ int i, n; ++ char *tmp; ++ char *dup = NULL; ++ char **arr = NULL; ++ ++ if (!s || !delim) ++ return NULL; ++ ++ dup = strdup(s); ++ if (!dup) ++ return NULL; ++ ++ /* compute the array size */ ++ n = 1; ++ for (tmp = dup; *tmp != '\0'; ++tmp) { ++ for (i = 0; delim[i] != '\0'; ++i) { ++ if (*tmp == delim[i]) { ++ ++n; ++ break; ++ } ++ } ++ } ++ ++ /* +1 to leave space for NULL terminating pointer */ ++ arr = calloc(n + 1, sizeof(*arr)); ++ if (!arr) ++ goto cleanup; ++ ++ /* set array elts to point inside the dup'ed string */ ++ for (tmp = dup, i = 0; tmp != NULL; ++i) { ++ arr[i] = strsep(&tmp, delim); ++ } ++ assert(i == n); ++ ++ if (count) ++ *count = n; ++ return arr; ++ ++cleanup: ++ free(dup); ++ free(arr); ++ return NULL; ++} ++ ++/* see ofi_split_and_alloc() */ ++void ofi_free_string_array(char **s) ++{ ++ /* all strings are allocated from the same strdup'ed slab, so just free ++ * the first element */ ++ if (s != NULL) ++ free(s[0]); ++ ++ /* and then the actual array of pointers */ ++ free(s); ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/tree.c b/src/mpid/ch4/netmod/ofi/libfabric/src/tree.c +new file mode 100644 +index 000000000..ce3109076 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/tree.c +@@ -0,0 +1,326 @@ ++/* ++ * Copyright (c) 2015 Cray Inc. All rights reserved. ++ * Copyright (c) 2018 Intel Corp, Inc. All rights reserved. ++ * ++ * This software is available to you under a choice of one of two ++ * licenses. You may choose to be licensed under the terms of the GNU ++ * General Public License (GPL) Version 2, available from the file ++ * COPYING in the main directory of this source tree, or the ++ * BSD license below: ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials ++ * provided with the distribution. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++/* ++ * Copied from http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/RedBlackTrees_files/s_rbt.htm ++ * ++ * Disclosure from the author's main page: ++ * (http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/RedBlackTrees_files/s_rbt.htm) ++ * ++ * Source code when part of a software project may be used freely ++ * without reference to the author. ++ * ++ */ ++ ++// reentrant red-black tree ++ ++#include ++ ++#include ++#include ++ ++ ++void ofi_rbmap_init(struct ofi_rbmap *map) ++{ ++ assert(map->compare); ++ ++ map->root = &map->sentinel; ++ map->sentinel.left = &map->sentinel; ++ map->sentinel.right = &map->sentinel; ++ map->sentinel.parent = NULL; ++ map->sentinel.color = BLACK; ++ map->sentinel.data = NULL; ++} ++ ++static void ofi_delete_tree(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ if (node == &map->sentinel) ++ return; ++ ++ ofi_delete_tree(map, node->left); ++ ofi_delete_tree(map, node->right); ++ free(node); ++} ++ ++void ofi_rbmap_cleanup(struct ofi_rbmap *map) ++{ ++ ofi_delete_tree(map, map->root); ++ free(map); ++} ++ ++int ofi_rbmap_empty(struct ofi_rbmap *map) ++{ ++ return map->root == &map->sentinel; ++} ++ ++static void ofi_rotate_left(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ struct ofi_rbnode *y = node->right; ++ ++ node->right = y->left; ++ if (y->left != &map->sentinel) ++ y->left->parent = node; ++ ++ if (y != &map->sentinel) ++ y->parent = node->parent; ++ if (node->parent) { ++ if (node== node->parent->left) ++ node->parent->left = y; ++ else ++ node->parent->right = y; ++ } else { ++ map->root = y; ++ } ++ ++ y->left = node; ++ if (node != &map->sentinel) ++ node->parent = y; ++} ++ ++static void ofi_rotate_right(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ struct ofi_rbnode *y = node->left; ++ ++ node->left = y->right; ++ if (y->right != &map->sentinel) ++ y->right->parent = node; ++ ++ if (y != &map->sentinel) ++ y->parent = node->parent; ++ if (node->parent) { ++ if (node == node->parent->right) ++ node->parent->right = y; ++ else ++ node->parent->left = y; ++ } else { ++ map->root = y; ++ } ++ ++ y->right = node; ++ if (node != &map->sentinel) ++ node->parent = y; ++} ++ ++static void ++ofi_insert_rebalance(struct ofi_rbmap *map, struct ofi_rbnode *x) ++{ ++ struct ofi_rbnode *y; ++ ++ while (x != map->root && x->parent->color == RED) { ++ if (x->parent == x->parent->parent->left) { ++ y = x->parent->parent->right; ++ if (y->color == RED) { ++ x->parent->color = BLACK; ++ y->color = BLACK; ++ x->parent->parent->color = RED; ++ x = x->parent->parent; ++ } else { ++ if (x == x->parent->right) { ++ x = x->parent; ++ ofi_rotate_left(map, x); ++ } ++ ++ x->parent->color = BLACK; ++ x->parent->parent->color = RED; ++ ofi_rotate_right(map, x->parent->parent); ++ } ++ } else { ++ y = x->parent->parent->left; ++ if (y->color == RED) { ++ x->parent->color = BLACK; ++ y->color = BLACK; ++ x->parent->parent->color = RED; ++ x = x->parent->parent; ++ } else { ++ if (x == x->parent->left) { ++ x = x->parent; ++ ofi_rotate_right(map, x); ++ } ++ x->parent->color = BLACK; ++ x->parent->parent->color = RED; ++ ofi_rotate_left(map, x->parent->parent); ++ } ++ } ++ } ++ map->root->color = BLACK; ++} ++ ++int ofi_rbmap_insert(struct ofi_rbmap *map, void *key, void *data) ++{ ++ struct ofi_rbnode *current, *parent, *node; ++ int ret; ++ ++ current = map->root; ++ parent = NULL; ++ ++ while (current != &map->sentinel) { ++ ret = map->compare(map, key, current->data); ++ if (ret == 0) ++ return -FI_EALREADY; ++ ++ parent = current; ++ current = (ret < 0) ? current->left : current->right; ++ } ++ ++ node = malloc(sizeof(*node)); ++ if (!node) ++ return -FI_ENOMEM; ++ ++ node->parent = parent; ++ node->left = &map->sentinel; ++ node->right = &map->sentinel; ++ node->color = RED; ++ node->data = data; ++ ++ if (parent) { ++ if (map->compare(map, key, parent->data) < 0) ++ parent->left = node; ++ else ++ parent->right = node; ++ } else { ++ map->root = node; ++ } ++ ++ ofi_insert_rebalance(map, node); ++ return 0; ++} ++ ++static void ofi_delete_rebalance(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ struct ofi_rbnode *w; ++ ++ while (node != map->root && node->color == BLACK) { ++ if (node == node->parent->left) { ++ w = node->parent->right; ++ if (w->color == RED) { ++ w->color = BLACK; ++ node->parent->color = RED; ++ ofi_rotate_left(map, node->parent); ++ w = node->parent->right; ++ } ++ if (w->left->color == BLACK && w->right->color == BLACK) { ++ w->color = RED; ++ node = node->parent; ++ } else { ++ if (w->right->color == BLACK) { ++ w->left->color = BLACK; ++ w->color = RED; ++ ofi_rotate_right(map, w); ++ w = node->parent->right; ++ } ++ w->color = node->parent->color; ++ node->parent->color = BLACK; ++ w->right->color = BLACK; ++ ofi_rotate_left(map, node->parent); ++ node = map->root; ++ } ++ } else { ++ w = node->parent->left; ++ if (w->color == RED) { ++ w->color = BLACK; ++ node->parent->color = RED; ++ ofi_rotate_right(map, node->parent); ++ w = node->parent->left; ++ } ++ if (w->right->color == BLACK && w->left->color == BLACK) { ++ w->color = RED; ++ node = node->parent; ++ } else { ++ if (w->left->color == BLACK) { ++ w->right->color = BLACK; ++ w->color = RED; ++ ofi_rotate_left(map, w); ++ w = node->parent->left; ++ } ++ w->color = node->parent->color; ++ node->parent->color = BLACK; ++ w->left->color = BLACK; ++ ofi_rotate_right(map, node->parent); ++ node = map->root; ++ } ++ } ++ } ++ node->color = BLACK; ++} ++ ++void ofi_rbmap_delete(struct ofi_rbmap *map, struct ofi_rbnode *node) ++{ ++ struct ofi_rbnode *x, *y; ++ ++ if (node->left == &map->sentinel || node->right == &map->sentinel) { ++ y = node; ++ } else { ++ y = node->right; ++ while (y->left != &map->sentinel) ++ y = y->left; ++ } ++ ++ if (y->left != &map->sentinel) ++ x = y->left; ++ else ++ x = y->right; ++ ++ x->parent = y->parent; ++ if (y->parent) { ++ if (y == y->parent->left) ++ y->parent->left = x; ++ else ++ y->parent->right = x; ++ } else { ++ map->root = x; ++ } ++ ++ if (y != node) ++ node->data = y->data; ++ ++ if (y->color == BLACK) ++ ofi_delete_rebalance(map, x); ++ ++ free (y); ++} ++ ++struct ofi_rbnode *ofi_rbmap_find(struct ofi_rbmap *map, void *key) ++{ ++ struct ofi_rbnode *node; ++ int ret; ++ ++ node = map->root; ++ while (node != &map->sentinel) { ++ ret = map->compare(map, key, node->data); ++ if (ret == 0) ++ return node; ++ ++ node = (ret < 0) ? node->left : node->right; ++ } ++ return NULL; ++} +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/src/windows/osd.c b/src/mpid/ch4/netmod/ofi/libfabric/src/windows/osd.c +index 815a91612..f387a281d 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/src/windows/osd.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/src/windows/osd.c +@@ -42,8 +42,7 @@ + #include "ofi_osd.h" + #include "ofi_file.h" + #include "ofi_list.h" +- +-#include "prov/sockets/include/sock.h" ++#include "ofi_util.h" + + #include "rdma/providers/fi_log.h" + +@@ -132,6 +131,23 @@ int ofi_getsockname(SOCKET fd, struct sockaddr *addr, socklen_t *len) + return FI_SUCCESS; + } + ++int ofi_getpeername(SOCKET fd, struct sockaddr *addr, socklen_t *len) ++{ ++ struct sockaddr_storage sock_addr; ++ socklen_t sock_addr_len = sizeof(sock_addr); ++ int ret; ++ ++ ret = getpeername(fd, (struct sockaddr *) &sock_addr, &sock_addr_len); ++ if (ret) ++ return ret; ++ ++ if (addr) ++ memcpy(addr, &sock_addr, MIN(*len, sock_addr_len)); ++ *len = sock_addr_len; ++ ++ return FI_SUCCESS; ++} ++ + int fi_read_file(const char *dir, const char *file, char *buf, size_t size) + { + char *path = 0; +@@ -386,48 +402,6 @@ fn_nomem: + goto fn_complete; + } + +-/* enumerate existing addresses */ +-/* in case if GetIpAddrTable is not enough, try to use +- GetAdaptersInfo or GetAdaptersAddresses */ +-void sock_get_ip_addr_table(struct slist *addr_list) +-{ +- DWORD i; +- MIB_IPADDRTABLE _iptbl; +- MIB_IPADDRTABLE *iptbl = &_iptbl; +- ULONG ips = 1; +- ULONG res = GetIpAddrTable(iptbl, &ips, 0); +- if (res == ERROR_INSUFFICIENT_BUFFER) { +- iptbl = malloc(ips); +- if (!iptbl) +- goto failed_no_mem; +- res = GetIpAddrTable(iptbl, &ips, 0); +- if (res != NO_ERROR) +- goto failed_get_addr; +- } +- else if (res != NO_ERROR) { +- goto failed; +- } +- +- for (i = 0; i < iptbl->dwNumEntries; i++) { +- if (iptbl->table[i].dwAddr && iptbl->table[i].dwAddr != ntohl(INADDR_LOOPBACK)) { +- struct sock_host_list_entry *addr_entry; +- addr_entry = calloc(1, sizeof(struct sock_host_list_entry)); +- inet_ntop(AF_INET, &iptbl->table[i].dwAddr, addr_entry->hostname, sizeof(addr_entry->hostname)); +- slist_insert_tail(&addr_entry->entry, addr_list); +- } +- } +- +- if (iptbl != &_iptbl) +- free(iptbl); +- return; +- +-failed_get_addr: +- free(iptbl); +-failed_no_mem: +-failed: +- return; +-} +- + int getifaddrs(struct ifaddrs **ifap) + { + DWORD i; +@@ -500,44 +474,94 @@ void freeifaddrs(struct ifaddrs *ifa) + } + } + +-ssize_t ofi_writev_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt) ++static ssize_t ++ofi_sendv_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt, int flags) + { +- ssize_t size; ++ ssize_t size = 0; + int ret, i; +- WSABUF *wsa_buf; +- DWORD flags = 0; + +- wsa_buf = (WSABUF *)alloca(iov_cnt * sizeof(WSABUF)); ++ if (iov_cnt == 1) ++ return send(fd, iovec[0].iov_base, iovec[0].iov_len, flags); + + for (i = 0; i < iov_cnt; i++) { +- wsa_buf[i].buf = (char *)iovec[i].iov_base; +- wsa_buf[i].len = iovec[i].iov_len; ++ ret = send(fd, iovec[i].iov_base, iovec[i].iov_len, flags); ++ if (ret >= 0) { ++ size += ret; ++ if (ret != iovec[i].iov_len) ++ return size; ++ } else { ++ return size ? size : ret; ++ } + } ++ return size; ++} + +- ret = WSASend(fd, wsa_buf, iov_cnt, &size, &flags, NULL, NULL); +- if (ret) +- size = (ssize_t)ret; ++static ssize_t ++ofi_recvv_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt, int flags) ++{ ++ ssize_t size = 0; ++ int ret, i; + ++ if (iov_cnt == 1) ++ return recv(fd, iovec[0].iov_base, iovec[0].iov_len, flags); ++ ++ for (i = 0; i < iov_cnt; i++) { ++ ret = recv(fd, iovec[i].iov_base, iovec[i].iov_len, flags); ++ if (ret >= 0) { ++ size += ret; ++ if (ret != iovec[i].iov_len) ++ return size; ++ } else { ++ return size ? size : ret; ++ } ++ } + return size; + } + ++ssize_t ofi_writev_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt) ++{ ++ return ofi_sendv_socket(fd, iovec, iov_cnt, 0); ++} ++ + ssize_t ofi_readv_socket(SOCKET fd, const struct iovec *iovec, size_t iov_cnt) + { +- ssize_t size; +- int ret,i; +- WSABUF *wsa_buf; +- DWORD flags = 0; ++ return ofi_recvv_socket(fd, iovec, iov_cnt, 0); ++} + +- wsa_buf = (WSABUF *)alloca(iov_cnt *sizeof(WSABUF)); ++ssize_t ofi_sendmsg_tcp(SOCKET fd, const struct msghdr *msg, int flags) ++{ ++ return ofi_sendv_socket(fd, msg->msg_iov, msg->msg_iovlen, flags); ++} + +- for (i = 0; i msg_iov, msg->msg_iovlen, flags); ++} + +- ret = WSARecv(fd, wsa_buf, iov_cnt, &size, &flags, NULL, NULL); +- if (ret) +- size = (ssize_t)ret; ++/* ++ * We assume that the same WSARecvMsg pointer will work for all UDP sockets. ++ */ ++ssize_t ofi_recvmsg_udp(SOCKET fd, struct msghdr *msg, int flags) ++{ ++ static LPFN_WSARECVMSG WSARecvMsg = NULL; ++ GUID guid = WSAID_WSARECVMSG; ++ DWORD bytes; ++ int ret; + +- return size; ++ if (!WSARecvMsg) { ++ pthread_mutex_lock(&common_locks.ini_lock); ++ if (!WSARecvMsg) { ++ ret = WSAIoctl(fd, SIO_GET_EXTENSION_FUNCTION_POINTER, &guid, ++ sizeof(guid), &WSARecvMsg, sizeof(WSARecvMsg), ++ &bytes, NULL, NULL); ++ } else { ++ ret = 0; ++ } ++ pthread_mutex_unlock(&common_locks.ini_lock); ++ if (ret) ++ return ret; ++ } ++ ++ ret = WSARecvMsg(fd, msg, &bytes, NULL, NULL); ++ return ret ? ret : bytes; + } +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/strerror.vcxproj b/src/mpid/ch4/netmod/ofi/libfabric/strerror.vcxproj +index 92d685dac..ed0f356ca 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/strerror.vcxproj ++++ b/src/mpid/ch4/netmod/ofi/libfabric/strerror.vcxproj +@@ -30,8 +30,8 @@ + {C835FB00-8E80-4D4A-9791-4B7D6D37168A} + Win32Proj + strerror +- 8.1 + ++ + + + Application +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/util/info.c b/src/mpid/ch4/netmod/ofi/libfabric/util/info.c +index ae66bfb7f..131591d3f 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/util/info.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/util/info.c +@@ -19,7 +19,7 @@ + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +@@ -219,6 +219,8 @@ static const char *param_type(enum fi_param_type type) + return "String"; + case FI_PARAM_INT: + return "Integer"; ++ case FI_PARAM_SIZE_T: ++ return "size_t"; + case FI_PARAM_BOOL: + return "Boolean (0/1, on/off, true/false, yes/no)"; + default: +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/util/pingpong.c b/src/mpid/ch4/netmod/ofi/libfabric/util/pingpong.c +index 9651e62ff..23f3adc77 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/util/pingpong.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/util/pingpong.c +@@ -21,7 +21,7 @@ + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +@@ -65,10 +65,6 @@ + #define OFI_MR_BASIC_MAP (FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_VIRT_ADDR) + #endif + +-#ifndef PP_FIVERSION +-#define PP_FIVERSION FI_VERSION(1, 5) +-#endif +- + static const uint64_t TAG = 1234; + + enum precision { +@@ -182,7 +178,8 @@ struct ct_pingpong { + + fi_addr_t remote_fi_addr; + void *buf, *tx_buf, *rx_buf; +- size_t buf_size, tx_size, rx_size, msg_prefix_size; ++ size_t buf_size, tx_size, rx_size; ++ size_t rx_prefix_size, tx_prefix_size; + + int timeout_sec; + uint64_t start, end; +@@ -245,13 +242,8 @@ static long parse_ulong(char *str, long max) + + static void pp_banner_fabric_info(struct ct_pingpong *ct) + { +- PP_DEBUG( +- "Running pingpong test with the %s provider and %s endpoint type\n", +- ct->fi->fabric_attr->prov_name, +- fi_tostr(&ct->fi->ep_attr->type, FI_TYPE_EP_TYPE)); +- PP_DEBUG("%s", fi_tostr(ct->fi->fabric_attr, FI_TYPE_FABRIC_ATTR)); +- PP_DEBUG("%s", fi_tostr(ct->fi->domain_attr, FI_TYPE_DOMAIN_ATTR)); +- PP_DEBUG("%s", fi_tostr(ct->fi->ep_attr, FI_TYPE_EP_ATTR)); ++ PP_DEBUG("Running pingpong test with fi_info:\n%s\n", ++ fi_tostr(ct->fi, FI_TYPE_INFO)); + } + + static void pp_banner_options(struct ct_pingpong *ct) +@@ -565,6 +557,18 @@ static int pp_send_name(struct ct_pingpong *ct, struct fid *endpoint) + if (ret < 0) + goto fn; + ++ PP_DEBUG("Sending address format\n"); ++ if (ct->fi) { ++ ret = pp_ctrl_send(ct, (char *) &ct->fi->addr_format, ++ sizeof(ct->fi->addr_format)); ++ } else { ++ ret = pp_ctrl_send(ct, (char *) &ct->fi_pep->addr_format, ++ sizeof(ct->fi_pep->addr_format)); ++ ++ } ++ if (ret < 0) ++ goto fn; ++ + PP_DEBUG("Sending name\n"); + ret = pp_ctrl_send(ct, local_name, addrlen); + PP_DEBUG("Sent name\n"); +@@ -592,6 +596,12 @@ static int pp_recv_name(struct ct_pingpong *ct) + return -ENOMEM; + } + ++ PP_DEBUG("Receiving address format\n"); ++ ret = pp_ctrl_recv(ct, (char *) &ct->hints->addr_format, ++ sizeof(ct->hints->addr_format)); ++ if (ret < 0) ++ return ret; ++ + PP_DEBUG("Receiving name\n"); + ret = pp_ctrl_recv(ct, ct->rem_name, len); + if (ret < 0) +@@ -856,7 +866,7 @@ static int pp_check_buf(void *buf, int size) + + static void eq_readerr(struct fid_eq *eq) + { +- struct fi_eq_err_entry eq_err; ++ struct fi_eq_err_entry eq_err = { 0 }; + int rd; + + rd = fi_eq_readerr(eq, &eq_err, 0); +@@ -1042,7 +1052,7 @@ static void show_perf(char *name, int tsize, int sent, int acked, + + static int pp_cq_readerr(struct fid_cq *cq) + { +- struct fi_cq_err_entry cq_err; ++ struct fi_cq_err_entry cq_err = { 0 }; + int ret; + + ret = fi_cq_readerr(cq, &cq_err, 0); +@@ -1067,7 +1077,7 @@ static int pp_get_cq_comp(struct fid_cq *cq, uint64_t *cur, uint64_t total, + if (timeout_sec >= 0) + a = pp_gettime_us(); + +- while (total - *cur > 0) { ++ do { + ret = fi_cq_read(cq, &comp, 1); + if (ret > 0) { + if (timeout_sec >= 0) +@@ -1091,7 +1101,7 @@ static int pp_get_cq_comp(struct fid_cq *cq, uint64_t *cur, uint64_t total, + return -FI_ENODATA; + } + } +- } ++ } while (total - *cur > 0); + + return 0; + } +@@ -1171,9 +1181,9 @@ static ssize_t pp_tx(struct ct_pingpong *ct, struct fid_ep *ep, size_t size) + ssize_t ret; + + if (pp_check_opts(ct, PP_OPT_VERIFY_DATA | PP_OPT_ACTIVE)) +- pp_fill_buf((char *)ct->tx_buf + ct->msg_prefix_size, size); ++ pp_fill_buf((char *)ct->tx_buf + ct->tx_prefix_size, size); + +- ret = pp_post_tx(ct, ep, size + ct->msg_prefix_size, ct->tx_ctx_ptr); ++ ret = pp_post_tx(ct, ep, size + ct->tx_prefix_size, ct->tx_ctx_ptr); + if (ret) + return ret; + +@@ -1200,9 +1210,9 @@ static ssize_t pp_inject(struct ct_pingpong *ct, struct fid_ep *ep, size_t size) + ssize_t ret; + + if (pp_check_opts(ct, PP_OPT_VERIFY_DATA | PP_OPT_ACTIVE)) +- pp_fill_buf((char *)ct->tx_buf + ct->msg_prefix_size, size); ++ pp_fill_buf((char *)ct->tx_buf + ct->tx_prefix_size, size); + +- ret = pp_post_inject(ct, ep, size + ct->msg_prefix_size); ++ ret = pp_post_inject(ct, ep, size + ct->tx_prefix_size); + if (ret) + return ret; + +@@ -1214,12 +1224,10 @@ static ssize_t pp_post_rx(struct ct_pingpong *ct, struct fid_ep *ep, + { + if (!(ct->fi->caps & FI_TAGGED)) + PP_POST(fi_recv, pp_get_rx_comp, ct->rx_seq, "receive", ep, +- ct->rx_buf, MAX(size, PP_MAX_CTRL_MSG + ct->msg_prefix_size), +- fi_mr_desc(ct->mr), 0, ctx); ++ ct->rx_buf, size, fi_mr_desc(ct->mr), 0, ctx); + else + PP_POST(fi_trecv, pp_get_rx_comp, ct->rx_seq, "t-receive", ep, +- ct->rx_buf, MAX(size, PP_MAX_CTRL_MSG + ct->msg_prefix_size), +- fi_mr_desc(ct->mr), 0, TAG, 0, ctx); ++ ct->rx_buf, size, fi_mr_desc(ct->mr), 0, TAG, 0, ctx); + return 0; + } + +@@ -1232,7 +1240,7 @@ static ssize_t pp_rx(struct ct_pingpong *ct, struct fid_ep *ep, size_t size) + return ret; + + if (pp_check_opts(ct, PP_OPT_VERIFY_DATA | PP_OPT_ACTIVE)) { +- ret = pp_check_buf((char *)ct->rx_buf + ct->msg_prefix_size, ++ ret = pp_check_buf((char *)ct->rx_buf + ct->rx_prefix_size, + size); + if (ret) + return ret; +@@ -1244,8 +1252,8 @@ static ssize_t pp_rx(struct ct_pingpong *ct, struct fid_ep *ep, size_t size) + * before message size is updated. The recvs posted are always for the + * next incoming message. + */ +- ret = pp_post_rx(ct, ct->ep, ct->rx_size + ct->msg_prefix_size, +- ct->rx_ctx_ptr); ++ ret = pp_post_rx(ct, ct->ep, MAX(ct->rx_size , PP_MAX_CTRL_MSG) + ++ ct->rx_prefix_size, ct->rx_ctx_ptr); + if (!ret) + ct->cnt_ack_msg++; + +@@ -1287,7 +1295,7 @@ static int pp_alloc_msgs(struct ct_pingpong *ct) + ct->rx_size = ct->tx_size; + ct->buf_size = MAX(ct->tx_size, PP_MAX_CTRL_MSG) + + MAX(ct->rx_size, PP_MAX_CTRL_MSG) + +- 2 * ct->msg_prefix_size; ++ ct->tx_prefix_size + ct->rx_prefix_size; + + alignment = ofi_sysconf(_SC_PAGESIZE); + if (alignment < 0) { +@@ -1307,7 +1315,7 @@ static int pp_alloc_msgs(struct ct_pingpong *ct) + ct->rx_buf = ct->buf; + ct->tx_buf = (char *)ct->buf + + MAX(ct->rx_size, PP_MAX_CTRL_MSG) + +- ct->msg_prefix_size; ++ ct->tx_prefix_size; + ct->tx_buf = (void *)(((uintptr_t)ct->tx_buf + alignment - 1) & + ~(alignment - 1)); + +@@ -1395,7 +1403,11 @@ static int pp_alloc_active_res(struct ct_pingpong *ct, struct fi_info *fi) + return ret; + } + } +- ct->msg_prefix_size = fi->ep_attr->msg_prefix_size; ++ ++ if (fi->tx_attr->mode & FI_MSG_PREFIX) ++ ct->tx_prefix_size = fi->ep_attr->msg_prefix_size; ++ if (fi->rx_attr->mode & FI_MSG_PREFIX) ++ ct->rx_prefix_size = fi->ep_attr->msg_prefix_size; + + ret = fi_endpoint(ct->domain, fi, &(ct->ep), NULL); + if (ret) { +@@ -1415,7 +1427,8 @@ static int pp_getinfo(struct ct_pingpong *ct, struct fi_info *hints, + if (!hints->ep_attr->type) + hints->ep_attr->type = FI_EP_DGRAM; + +- ret = fi_getinfo(PP_FIVERSION, NULL, NULL, flags, hints, info); ++ ret = fi_getinfo(FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION), ++ NULL, NULL, flags, hints, info); + if (ret) { + PP_PRINTERR("fi_getinfo", ret); + return ret; +@@ -1445,7 +1458,7 @@ static int pp_getinfo(struct ct_pingpong *ct, struct fi_info *hints, + ct->rx_ctx_ptr = NULL; + } + +- if (hints && ((hints->caps & FI_DIRECTED_RECV) == 0)) { ++ if ((hints->caps & FI_DIRECTED_RECV) == 0) { + (*info)->caps &= ~FI_DIRECTED_RECV; + (*info)->rx_attr->caps &= ~FI_DIRECTED_RECV; + } +@@ -1483,8 +1496,8 @@ static int pp_init_ep(struct ct_pingpong *ct) + return ret; + } + +- ret = pp_post_rx(ct, ct->ep, MAX(ct->rx_size, PP_MAX_CTRL_MSG), +- ct->rx_ctx_ptr); ++ ret = pp_post_rx(ct, ct->ep, MAX(ct->rx_size, PP_MAX_CTRL_MSG) + ++ ct->rx_prefix_size, ct->rx_ctx_ptr); + if (ret) + return ret; + +@@ -1522,10 +1535,6 @@ static int pp_exchange_names_connected(struct ct_pingpong *ct) + + PP_DEBUG("Connection-based endpoint: setting up connection\n"); + +- ret = pp_ctrl_sync(ct); +- if (ret) +- return ret; +- + if (ct->opts.dst_addr) { + ret = pp_recv_name(ct); + if (ret < 0) +@@ -1599,26 +1608,21 @@ static int pp_server_connect(struct ct_pingpong *ct) + + ret = pp_exchange_names_connected(ct); + if (ret) +- goto err; +- +- ret = pp_ctrl_sync(ct); +- if (ret) +- goto err; ++ return ret; + + /* Listen */ + rd = fi_eq_sread(ct->eq, &event, &entry, sizeof(entry), -1, 0); + if (rd != sizeof(entry)) { + pp_process_eq_err(rd, ct->eq, "fi_eq_sread"); +- return (int)rd; ++ return (int) rd; + } + +- ct->fi = entry.info; + if (event != FI_CONNREQ) { + fprintf(stderr, "Unexpected CM event %d\n", event); +- ret = -FI_EOTHER; +- goto err; ++ return -FI_EOTHER; + } + ++ ct->fi = entry.info; + ret = fi_domain(ct->fabric, ct->fi, &(ct->domain), NULL); + if (ret) { + PP_PRINTERR("fi_domain", ret); +@@ -1641,10 +1645,6 @@ static int pp_server_connect(struct ct_pingpong *ct) + goto err; + } + +- ret = pp_ctrl_sync(ct); +- if (ret) +- goto err; +- + /* Accept */ + rd = fi_eq_sread(ct->eq, &event, &entry, sizeof(entry), -1, 0); + if (rd != sizeof(entry)) { +@@ -1679,11 +1679,6 @@ static int pp_client_connect(struct ct_pingpong *ct) + if (ret) + return ret; + +- /* Check that the remote is still up */ +- ret = pp_ctrl_sync(ct); +- if (ret) +- return ret; +- + ret = pp_open_fabric_res(ct); + if (ret) + return ret; +@@ -1702,10 +1697,6 @@ static int pp_client_connect(struct ct_pingpong *ct) + return ret; + } + +- ret = pp_ctrl_sync(ct); +- if (ret) +- return ret; +- + /* Connect */ + rd = fi_eq_sread(ct->eq, &event, &entry, sizeof(entry), -1, 0); + if (rd != sizeof(entry)) { +@@ -1846,7 +1837,7 @@ static int pp_finalize(struct ct_pingpong *ct) + { + struct iovec iov; + int ret; +- struct fi_context ctx; ++ struct fi_context ctx[2]; + struct fi_msg msg; + struct fi_msg_tagged tmsg; + +@@ -1854,14 +1845,14 @@ static int pp_finalize(struct ct_pingpong *ct) + + strcpy(ct->tx_buf, "fin"); + iov.iov_base = ct->tx_buf; +- iov.iov_len = 4 + ct->msg_prefix_size; ++ iov.iov_len = 4 + ct->tx_prefix_size; + + if (!(ct->fi->caps & FI_TAGGED)) { + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = &iov; + msg.iov_count = 1; + msg.addr = ct->remote_fi_addr; +- msg.context = &ctx; ++ msg.context = ctx; + + ret = fi_sendmsg(ct->ep, &msg, FI_INJECT | FI_TRANSMIT_COMPLETE); + if (ret) { +@@ -1873,7 +1864,7 @@ static int pp_finalize(struct ct_pingpong *ct) + tmsg.msg_iov = &iov; + tmsg.iov_count = 1; + tmsg.addr = ct->remote_fi_addr; +- tmsg.context = &ctx; ++ tmsg.context = ctx; + tmsg.tag = TAG; + + ret = fi_tsendmsg(ct->ep, &tmsg, FI_INJECT | FI_TRANSMIT_COMPLETE); +diff --git a/src/mpid/ch4/netmod/ofi/libfabric/util/strerror.c b/src/mpid/ch4/netmod/ofi/libfabric/util/strerror.c +index ed8d338ce..a890968f7 100644 +--- a/src/mpid/ch4/netmod/ofi/libfabric/util/strerror.c ++++ b/src/mpid/ch4/netmod/ofi/libfabric/util/strerror.c +@@ -19,7 +19,7 @@ + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN diff --git a/daos_adio-ucx.patch b/daos_adio-ucx.patch new file mode 100644 index 00000000000..a933a374134 --- /dev/null +++ b/daos_adio-ucx.patch @@ -0,0 +1,65680 @@ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/.gitlab-ci.yml b/src/mpid/ch4/netmod/ucx/ucx/.gitlab-ci.yml +new file mode 100644 +index 0000000..ba12093 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/.gitlab-ci.yml +@@ -0,0 +1,14 @@ ++build: ++ only: ++ - tags ++ script: ++ - "./autogen.sh" ++ - "./contrib/configure-release --disable-numa" ++ - make -j ++ - make dist ++ - 'export upload_url=$(curl -s -H "Authorization: token $github_token" "https://api.github.com/repos/openucx/ucx/releases" | python -c "import sys,os,json; d=json.load(sys.stdin); tag=os.environ.get(\"CI_COMMIT_TAG\"); rel = [r for r in d if r[\"tag_name\"] == tag]; url = rel[0][\"upload_url\"] if rel else \"\"; print url" | grep -oP "https\S+assets")' ++ - echo $upload_url ++ - 'export tar_name=$(ls *.tar.gz)' ++ - echo $tar_name ++ - 'curl -s -H "Authorization: token $github_token" -H "Content-Type: application/zip" --data-binary @"$tar_name" "${upload_url}?name=${tar_name}&label=${tar_name}"' ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/AUTHORS b/src/mpid/ch4/netmod/ucx/ucx/AUTHORS +index 9c4b28f..77d0527 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/AUTHORS ++++ b/src/mpid/ch4/netmod/ucx/ucx/AUTHORS +@@ -1,15 +1,23 @@ ++Akshay Venkatesh + Alexander Margolin + Alexander Mikheev + Alina Sklarevich ++Andrey Maslennikov ++Artem Polyakov ++Artemy Kovalyov + Aurelien Bouteiller ++Devendar Bureddy + Elad Persiko + Eugene Voronov + Evgeny Leksikov ++Gilles Gouaillardet + Graham Lopez + Guy Shattah + Howard Pritchard + Igor Ivanov + Ilya Nelkenbaum ++Jeff Daily ++Khaled Hamidouche + Manjunath Gorentla Venkata + Matthew Baker + Mike Dubman +@@ -18,15 +26,18 @@ Nathan Hjelm + Netanel Yosephian + Pavel Shamis + Sasha Kotchubievsky ++Sergey Oblomov + Sergey Shalnov ++Serguei Sagalovitch + Stephen Richmond + Swen Boehm +-Tony Curtis ++Tony Curtis + Xin Zhao + Yossi Itigin + +-In addition we would like to acknowledge the following members of UCX community for +-their participation in annual face-to-face meeting, design discussions, and code reviews: ++In addition we would like to acknowledge the following members of UCX community ++for their participation in annual face-to-face meeting, design discussions, and ++code reviews: + + Amith Mamidala + Barney Maccabe +diff --git a/src/mpid/ch4/netmod/ucx/ucx/CONTRIBUTING.md b/src/mpid/ch4/netmod/ucx/ucx/CONTRIBUTING.md +index 791e704..1408104 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/CONTRIBUTING.md ++++ b/src/mpid/ch4/netmod/ucx/ucx/CONTRIBUTING.md +@@ -1,7 +1,7 @@ + + 1. Please sign the [UCX contributors agreement](http://www.openucx.org/license). + +-1. Please follow the [code style](https://github.com/openucx/ucx/blob/master/doc/CodeStyle) and [logging style](https://github.com/openucx/ucx/blob/master/doc/LoggingStyle). ++1. Please follow the [code style](https://github.com/openucx/ucx/blob/master/doc/CodeStyle.md) and [logging style](https://github.com/openucx/ucx/blob/master/doc/LoggingStyle.md). + + 1. Make sure automatic tests pass. + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/NEWS b/src/mpid/ch4/netmod/ucx/ucx/NEWS +index a2750ac..d388f60 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/NEWS ++++ b/src/mpid/ch4/netmod/ucx/ucx/NEWS +@@ -1,12 +1,98 @@ + # +-## Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. ++## Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED. + ## Copyright (C) UT-Battelle, LLC. 2014-2015. ALL RIGHTS RESERVED. +-## Copyright (C) ARM Ltd. 2017. ALL RIGHTS RESERVED. ++## Copyright (C) ARM Ltd. 2017-2019. ALL RIGHTS RESERVED. + ## + ## See file LICENSE for terms. + ## + # + ++## 1.5.1 (April 1, 2019) ++Bugfixes: ++- Fix dc_mlx5 transport support check for inbox libmlx5 drivers - issue #3301 ++- Fix compilation warnings with gcc9 and clang ++- ROCm - reduce log level of device-not-found message ++ ++## 1.5.0 (February 14, 2019) ++Features: ++- New emulation mode enabling full UCX functionality (Atomic, Put, Get) ++ over TCP and RDMA-CORE interconnects which don't implement full RDMA semantics ++- Non-blocking API for all one-sided operations. All blocking communication APIs marked ++ as deprecated ++- New client/server connection establishment API, which allows connected handover between workers ++- Support for rdma-core direct-verbs (DEVX) and DC with mlx5 transports ++- GPU - Support for stream API and receive side pipelining ++- Malloc hooks using binary instrumentation instead of symbol override ++- Statistics for UCT tag API ++- GPU-to-Infiniband HCA affinity support based on locality/distance (PCIe) ++ ++Bugfixes: ++- Fix overflow in RC/DC flush operations ++- Update description in SPEC file and README ++- Fix RoCE source port for dc_mlx5 flow control ++- Improve ucx_info help message ++- Fix segfault in UCP, due to int truncation in count_one_bits() ++- Multiple other bugfixes (full list on github) ++ ++Tested configurations: ++- InfiniBand: MLNX_OFED 4.4-4.5, distribution inbox drivers, rdma-core ++- CUDA: gdrcopy 1.2, cuda 9.1.85 ++- XPMEM: 2.6.2 ++- KNEM: 1.1.2 ++ ++## 1.4.0 (October 23, 2018) ++ ++Features: ++- Improved support for installation with latest ROCm ++- Improved support for latest rdma-core ++- Adding support for CUDA IPC for intra-node GPU ++- Added support for CUDA memory allocation cache for mem-type detection ++- Added support for latest Mellanox devices ++- Added support for Nvidia GPU managed memory ++- Added support for multiple connections between the same pair of workers ++- Added support large worker address for client/server connection establishment ++ and INADDR_ANY ++- Added support for bitwise atomics operations ++ ++Bugfixes: ++- Performance fixes for rendezvous protocol ++- Memory hook fixes ++- Clang support fixes ++- Self tl multi-rail fix ++- Thread safety fixes in IB/RDMA transport ++- Compilation fixes with upstream rdma-core ++- Multiple minor bugfixes (full list on github) ++- Segfault fix for a code generated by armclang compiler ++- UCP memory-domain index fix for zero-copy active messages ++ ++Tested configurations: ++- InfiniBand: MLNX_OFED 4.2-4.4, distribution inbox drivers, rdma-core ++- CUDA: gdrcopy 1.2, cuda 9.1.85 ++- XPMEM: 2.6.2 ++- KNEM: 1.1.2 ++ ++Known issues: ++ #2919 - Segfault in CUDA support when KNEM not present and CMA is active ++ intra-node RMA transport. As a workaround user can disable CMA support at ++ compile time: --disable-cma. Alternatively user can remove CMA from UCX_TLS ++ list, for example: UCX_TLS=mm,rc,cuda_copy,cuda_ipc,gdr_copy. ++ ++## 1.3.1 (August 20, 2018) ++ ++Bugfixes: ++- Prevent potential out-of-order sending in shared memory active messages ++- CUDA: Include cudamem.h in source tarball, pass cudaFree memory size ++- Registration cache: fix large range lookup, handle shmat(REMAP)/mmap(FIXED) ++- Limit IB CQE size for specific ARM boards ++- RPM: explicitly set gcc-c++ as requirement ++- Multiple bugfixes (full list on github) ++ ++Tested configurations: ++- InfiniBand: MLNX_OFED 4.2, inbox OFED drivers. ++- CUDA: gdrcopy 1.2, cuda 9.1.85 ++- XPMEM: 2.6.2 ++- KNEM: 1.1.2 ++ + ## 1.3.0 (February 15, 2018) + + Features: +@@ -28,17 +114,19 @@ Features: + - Add support for external epoll fd and edge-triggered events + - Added registration cache for knem + - Initial support for Java bindings ++ + Bugfixes: +-- Multiple bugfixes (full list on githib) ++- Multiple bugfixes (full list on github) ++ + Tested configurations: + - InfiniBand: MLNX_OFED 4.2, inbox OFED drivers. + - CUDA: gdrcopy 1.2, cuda 9.1.85 + - XPMEM: 2.6.2 + - KNEM: 1.1.2 ++ + Known issues: + #2047 - UCP: ucp_do_am_bcopy_multi drops data on UCS_ERROR_NO_RESOURCE + #2047 - failure in ud/uct_flush_test.am_zcopy_flush_ep_nb/1 +- #2025 - Data corruption on some ARM machines + #1977 - failure in shm/test_ucp_rma.blocking_small/0 + #1926 - Timeout in mpi_test_suite with HW TM + #1920 - transport retry count exceeded in many-to-one tests +@@ -79,6 +167,7 @@ Supported platforms + for community evaluation and has not been tested in context of this release + - Cray Gemini and Aries + - Architectures: x86_64, ARMv8 (64bit), Power64 ++ + Features: + - Added support for InfiniBand DC and UD transports, including accelerated verbs for Mellanox devices + - Full support for PGAS/SHMEM interfaces, blocking and non-blocking APIs +@@ -91,8 +180,10 @@ Features: + - Support for ARMv8 64bit architecture + - A new API for efficient memory polling + - Support for malloc-hooks and memory registration caching ++ + Bugfixes: + - Multiple bugfixes improving overall stability of the library ++ + Known issues: + #1604 - Failure in ud/test_ud_slow_timer.retransmit1/1 with valgrind bug + #1588 - Fix reading cpuinfo timebase for ppc bug portability training +@@ -111,21 +202,14 @@ Known issues: + + ## 1.1.0 (September 1, 2015) + +-Workarounds: + Features: + - Added support for AM based on FIFO in `mm` shared memory transport + - Added support for UCT `knem` shared memory transport (http://knem.gforge.inria.fr) + - Added support for UCT `mm/xpmem` shared memory transport (https://github.com/hjelmn/xpmem) + +- +-Bugfixes: +-Known issues: +- +- + ## 1.0.0 (July 22, 2015) + + Features: +- + - Added support for UCT `cma` shared memory transport (Cross-Memory Attatch) + - Added support for UCT `mm` shared memory transport with mmap/sysv APIs + - Added support for UCT `rc` transport based on Infiniband/RC with verbs +diff --git a/src/mpid/ch4/netmod/ucx/ucx/PULL_REQUEST_TEMPLATE.md b/src/mpid/ch4/netmod/ucx/ucx/PULL_REQUEST_TEMPLATE.md +new file mode 100644 +index 0000000..80318ae +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/PULL_REQUEST_TEMPLATE.md +@@ -0,0 +1,10 @@ ++## What ++_Describe what this PR is doing._ ++ ++## Why ? ++_Justification for the PR. If there is existing issue/bug please reference. For ++bug fixes why and what can be merged in a single item._ ++ ++## How ? ++_It is optional but for complex PRs please provide information about the design, ++architecture, approach, etc. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/README b/src/mpid/ch4/netmod/ucx/ucx/README +index 7ffcdf5..b5a1c72 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/README ++++ b/src/mpid/ch4/netmod/ucx/ucx/README +@@ -1,17 +1,48 @@ +-UCX is a communication library implementing high-performance messaging for MPI/PGAS frameworks ++UCX stands for Unified Communication X. UCX provides an optimized communication ++layer for Message Passing (MPI), PGAS/OpenSHMEM libraries and RPC/data-centric ++applications. UCX utilizes high-speed networks, such as RDMA (InfiniBand, RoCE, ++etc), Cray Gemini or Aries, for inter-node communication. If no such network is ++available, TCP is used instead. UCX supports efficient transfer of data in ++either main memory (RAM) or GPU memory (through CUDA and ROCm libraries). ++In addition, UCX provides efficient intra-node communication, by leveraging the ++following shared memory mechanisms: posix, sysv, cma, knem, and xpmem. ++ ++### Running internal unit tests ++```sh ++$ ./autogen.sh ++$ ./contrib/configure-devel ++$ make ++$ make -C test/gtest test ++``` ++ ++### Running UCX hello-world ++Compile: + +-### Quick start + ```sh +-$ export PATH=$PATH:$MPI_HOME/bin + $ ./autogen.sh +-$ ./contrib/configure-release --prefix=$PWD/install --with-mpi +-$ make -j8 install +-$ salloc -N2 --ntasks-per-node=1 mpirun --display-map \ +- $PWD/install/bin/ucx_perftest -d mlx5_1:1 -x rc_mlx5 -c 12 -t put_lat ++$ ./contrib/configure-release --prefix=$PWD/install ++$ make ++``` ++Start server: ++ ++```sh ++$ ./src/tools/perf/ucx_perftest -c 0 ++``` ++ ++Connect client: ++ ++```sh ++$ ./src/tools/perf/ucx_perftest -t tag_lat -c 0 + ``` + +-### UCX layout +-- UCX - Unified Communication X +-- UCP - UCX Protocol +-- UCT - UCX Transport +-- UCS - UCX Services ++### UCX high-level layout ++UCX contains four main components: ++- UCP - UCX Protocol. Implements high-level abstractions such as tag-matching, ++ streams, connection negotiation and establishment, multi-rail, and handling ++ different memory types. ++- UCT - UCX Transport. Implements low-level communication primitives such as ++ active messages, remote memory access, and atomic operations. ++- UCS - UCX Services. A collection of data structures, algorithms, and system ++ utilities for common use. ++- UCM - UCX Memory. Intercepts memory allocation and release events, used by ++ memory registration cache. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/pom.xml b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/pom.xml +index 59d12b3..abebf4c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/pom.xml ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/pom.xml +@@ -18,11 +18,21 @@ + ${ucx.src.dir}/ucs/.libs + ${ucx.src.dir}/uct/.libs + ${ucx.src.dir}/ucp/.libs ++ 4.12 + **/jucx/** + **/dummy/** + false + + ++ ++ ++ junit ++ junit ++ ${junit.version} ++ test ++ ++ ++ + + + +@@ -62,7 +72,7 @@ + + ${testSources} + +- ++ + + testCompile + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Bridge.java b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Bridge.java +index cd9876b..5e52ed6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Bridge.java ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Bridge.java +@@ -4,6 +4,8 @@ + */ + package org.ucx.jucx; + ++import org.ucx.jucx.Worker.CompletionQueue; ++ + public class Bridge { + private static final String UCM = "libucm.so"; + private static final String UCS = "libucs.so"; +@@ -18,4 +20,20 @@ public class Bridge { + LoadLibrary.loadLibrary(UCP); // UCP library + LoadLibrary.loadLibrary(JUCX); // JUCP native library + } ++ ++ private static native long createWorkerNative(int maxCompletions, ++ CompletionQueue compQueue, ++ Worker worker); ++ ++ static long createWorker(final int maxCompletions, ++ final CompletionQueue compQueue, ++ final Worker worker) { ++ return createWorkerNative(maxCompletions, compQueue, worker); ++ } ++ ++ private static native void releaseWorkerNative(long workerNativeId); ++ ++ static void releaseWorker(final Worker worker) { ++ releaseWorkerNative(worker.getNativeId()); ++ } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/LoadLibrary.java b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/LoadLibrary.java +index 7454733..350a63f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/LoadLibrary.java ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/LoadLibrary.java +@@ -44,7 +44,7 @@ public class LoadLibrary { + System.load(filename); + } catch (UnsatisfiedLinkError e) { + errorMessage = "Native code library failed to load: " +- + resourceName; ++ + resourceName; + } + + file.deleteOnExit(); +@@ -75,7 +75,7 @@ public class LoadLibrary { + } + + File file = new File(tempDir, +- new File(resourceURL.getPath()).getName()); ++ new File(resourceURL.getPath()).getName()); + FileOutputStream os = null; + try { + os = new FileOutputStream(file); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Worker.java b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Worker.java +new file mode 100644 +index 0000000..b4f032b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Worker.java +@@ -0,0 +1,132 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++package org.ucx.jucx; ++ ++import java.io.Closeable; ++import java.io.IOException; ++import java.nio.ByteBuffer; ++import java.nio.ByteOrder; ++ ++/** ++ * Worker is the object representing a local communication resource such as a ++ * network interface or host channel adapter port. ++ */ ++@SuppressWarnings("unused") ++public class Worker implements Closeable { ++ public static final int MAX_QUEUED_EVENTS = (1 << 20); ++ ++ private long nativeId; ++ private CompletionQueue compQueue; ++ private byte[] workerAddress; ++ private Callback callback; ++ private int maxEvents; ++ private boolean closed; ++ ++ /** ++ * Creates a new Worker. ++ * ++ * @param cb ++ * Implementation of Worker.Callback interface ++ * ++ * @param maxEvents ++ * Number of maximum queued completed events ++ * ++ * @throws IllegalArgumentException ++ * In case cb == null or maxEvents <= 0 or ++ * maxEvents > MAX_QUEUED_EVENTS ++ * ++ * @throws UnsatisfiedLinkError ++ * In case an error while loading native libraries ++ * ++ * @throws IOException ++ * In case native Worker creation failed ++ */ ++ public Worker(Callback cb, int maxEvents) throws IOException { ++ if (cb == null || maxEvents <= 0 || maxEvents > MAX_QUEUED_EVENTS) { ++ throw new IllegalArgumentException(); ++ } ++ ++ // An error occurred while loading native libraries ++ if (LoadLibrary.errorMessage != null) { ++ throw new UnsatisfiedLinkError(LoadLibrary.errorMessage); ++ } ++ ++ this.callback = cb; ++ this.closed = false; ++ this.maxEvents = maxEvents; ++ this.workerAddress = null; ++ this.compQueue = new CompletionQueue(); // Shared queue wrapper ++ this.nativeId = Bridge.createWorker(maxEvents, compQueue, this); ++ if (nativeId == 0) { ++ throw new IOException("Failed to create Worker"); ++ } ++ ++ // align Java side shared queue operations endianness to be as ++ // allocated in native (C) code, in nativeCreateWorker() ++ this.compQueue.setEndianness(); ++ } ++ ++ /** ++ * Getter for native pointer as long. ++ * ++ * @return long integer representing native pointer ++ */ ++ long getNativeId() { ++ return nativeId; ++ } ++ ++ /** ++ * Getter for workerAddress as a byte array. ++ * ++ * @return clone of address (for safety reasons) ++ */ ++ public byte[] getWorkerAddress() { ++ return workerAddress.clone(); ++ } ++ ++ /** ++ * Frees all resources associated with this Worker.
++ * Worker should not be used after calling this method. ++ */ ++ @Override ++ public void close() { ++ closed = true; ++ Bridge.releaseWorker(this); ++ } ++ ++ /** ++ * Called when object is garbage collected. Frees native allocated ++ * resources. ++ */ ++ @Override ++ protected void finalize() throws Throwable { ++ if (!closed) { ++ close(); ++ } ++ } ++ ++ ++ /** ++ * Wrapper object for shared buffer between Java and native code. ++ */ ++ class CompletionQueue { ++ ByteBuffer completionBuff = null; ++ ++ private void setEndianness() { ++ completionBuff.order(ByteOrder.nativeOrder()); ++ } ++ } ++ ++ ++ /** ++ * The Callback interface must be implemented in-order to create a ++ * Worker.
++ * Worker will invoke the implemented method whenever a request is ++ * completed. ++ */ ++ public static interface Callback { ++ // Handlers to implement will be added when data path is added ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/Makefile.am +index 049de80..7abe96f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/Makefile.am +@@ -7,9 +7,9 @@ lib_LTLIBRARIES = libjucx.la + libjucx_la_CPPFLAGS = -I$(JDK)/include -I$(JDK)/include/linux \ + -I$(topdir)/src + +-libjucx_la_SOURCES = bridge.cc request_util.cc ++libjucx_la_SOURCES = bridge.cc worker.cc request_util.cc context.cc + +-libjucx_la_CXXFLAGS = -fPIC -DPIC -Werror -std=c++0x ++libjucx_la_CXXFLAGS = -fPIC -DPIC -Werror -std=c++11 + + libjucx_la_LIBADD = $(topdir)/src/ucs/libucs.la \ + $(topdir)/src/uct/libuct.la \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.cc b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.cc +index b3049fd..be1f84a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.cc +@@ -4,44 +4,63 @@ + */ + + #include "bridge.h" +-#include "request_util.h" ++#include "worker.h" + + #include +-#include "ucs/time/time.h" + + #include + #include + + +-#define ERR_EXIT(_msg, _ret) do { \ ++#define ERR_EXIT(_msg, _ret) do { \ + print_error(_msg); \ + return _ret; \ +- } while(0) ++ } while(0) + ++#define ERR_JUMP(_msg, _label) do { \ ++ print_error(_msg); \ ++ goto _label; \ ++ } while(0) + +-static JavaVM *cached_jvm; +-static jfieldID field_buff = NULL; +-static jfieldID field_addr = NULL; ++static JavaVM *cached_jvm = NULL; ++static jfieldID field_comp_queue = NULL; ++static jfieldID field_worker_addr_arr = NULL; + +-static ucp_context_h cached_ctx = NULL; ++static context cached_ctx; + + + static void print_error(const char* error); + +-// Create context when JNI first loads +-static ucs_status_t create_context(); + + extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void* reserved) { + cached_jvm = jvm; + JNIEnv *env; + + if (jvm->GetEnv((void **) &env, JNI_VERSION_1_8)) { +- ERR_EXIT("JNI version 1.8 or higher required.", JNI_ERR); ++ ERR_EXIT("JNI version 1.8 or higher required", JNI_ERR); + } + +- ucs_status_t status = create_context(); +- if (status != UCS_OK) { +- ERR_EXIT("Failed to create UCP context.", JNI_ERR); ++ jclass queue_cls_data = env->FindClass("org/ucx/jucx/Worker$CompletionQueue"); ++ if (queue_cls_data == NULL) { ++ ERR_EXIT("java org/ucx/jucx/Worker$CompletionQueue class was NOT found", ++ JNI_ERR); ++ } ++ ++ field_comp_queue = env->GetFieldID(queue_cls_data, "completionBuff", ++ "Ljava/nio/ByteBuffer;"); ++ if (field_comp_queue == NULL) { ++ ERR_EXIT("could not get completionBuff's field id", JNI_ERR); ++ } ++ ++ jclass worker_cls_data = env->FindClass("org/ucx/jucx/Worker"); ++ if (worker_cls_data == NULL) { ++ ERR_EXIT("java org/ucx/jucx/Worker class was NOT found", JNI_ERR); ++ } ++ ++ field_worker_addr_arr = env->GetFieldID(worker_cls_data, ++ "workerAddress", "[B"); ++ if (field_worker_addr_arr == NULL) { ++ ERR_EXIT("could not get workerAddress' field id", JNI_ERR); + } + + return JNI_VERSION_1_8; +@@ -51,33 +70,77 @@ static void print_error(const char* error_msg) { + fprintf(stderr, "[ERROR] JUCX - %s: %s\n", __FILE__, error_msg); + } + +-static ucs_status_t create_context() { +- if (cached_ctx) { +- return UCS_OK; ++JNIEXPORT jlong JNICALL ++Java_org_ucx_jucx_Bridge_createWorkerNative(JNIEnv *env, jclass cls, ++ jint max_comp, jobject comp_queue, ++ jobject jworker) { ++ ucp_worker_params_t worker_params = { 0 }; ++ worker* worker_ptr = NULL; ++ ucs_status_t status; ++ jobject jbyte_buff; ++ uint32_t cap = (uint32_t) max_comp; ++ ucp_address_t* local_addr; ++ size_t local_addr_len; ++ jbyteArray jaddr_arr; ++ jlong* addr_ptr; ++ jbyte* local_addr_wrap; ++ ++ worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE; ++ worker_params.thread_mode = UCS_THREAD_MODE_SINGLE; ++ ++ try { ++ worker_ptr = new worker(&cached_ctx, cap, worker_params); ++ } catch (const std::bad_alloc& ex) { ++ ERR_JUMP("Failed to initialize ucp native worker", err); + } + +- ucp_params_t ucp_params = { 0 }; +- ucp_config_t *config; +- ucs_status_t status; +- ucp_context_h ucp_context; ++ status = worker_ptr->extract_worker_address(&local_addr, local_addr_len); ++ if (!local_addr) { ++ ERR_JUMP("Failed to get ucp worker native address", err_worker); ++ } ++ ++ local_addr_wrap = new jbyte[local_addr_len]; ++ if (!local_addr_wrap) { ++ ERR_JUMP("Allocation failure", err_local_addr); ++ } ++ memcpy(local_addr_wrap, local_addr, local_addr_len); + +- status = ucp_config_read(NULL, NULL, &config); +- if (status != UCS_OK) { +- return status; ++ jaddr_arr = env->NewByteArray(local_addr_len); ++ if (!jaddr_arr) { ++ ERR_JUMP("Failed to create Java byte[] object", err_worker_addr); + } + +- ucp_params.features = UCP_FEATURE_TAG; +- ucp_params.field_mask = UCP_PARAM_FIELD_FEATURES | +- UCP_PARAM_FIELD_REQUEST_INIT | +- UCP_PARAM_FIELD_REQUEST_SIZE; ++ env->SetByteArrayRegion(jaddr_arr, 0, local_addr_len, local_addr_wrap); ++ delete[] local_addr_wrap; ++ worker_ptr->release_worker_address(local_addr); + +- ucp_params.request_size = sizeof(jucx_request); +- ucp_params.request_init = request_util::request_handler::request_init; ++ // Set the Java workerAddress field ++ env->SetObjectField(jworker, field_worker_addr_arr, jaddr_arr); + +- status = ucp_init(&ucp_params, config, &ucp_context); +- ucp_config_release(config); ++ jbyte_buff = env->NewDirectByteBuffer(worker_ptr->get_event_queue(), cap); ++ if (!jbyte_buff) { ++ env->ExceptionClear(); ++ ERR_JUMP("Failed to create Java ByteBuffer object", err_worker); ++ } + +- cached_ctx = ucp_context; ++ // Set the completion queue field ++ env->SetObjectField(comp_queue, field_comp_queue, jbyte_buff); ++ ++ return (native_ptr) worker_ptr; ++ ++err_worker_addr: ++ delete[] local_addr_wrap; ++err_local_addr: ++ worker_ptr->release_worker_address(local_addr); ++err_worker: ++ delete worker_ptr; ++err: ++ return 0; ++} + +- return status; ++JNIEXPORT void JNICALL ++Java_org_ucx_jucx_Bridge_releaseWorkerNative(JNIEnv *env, jclass cls, ++ jlong worker_id) { ++ worker* worker_ptr = (worker*) worker_id; ++ delete worker_ptr; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.h b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.h +index ac3fd2f..7ac8d53 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.h +@@ -11,7 +11,23 @@ + typedef uintptr_t native_ptr; + + extern "C" { +- // JNI methods proto-types goes here. Will be added later ++ ++/* ++ * Class: org_ucx_jucx_Bridge ++ * Method: createWorkerNative ++ * Signature: (ILorg/ucx/jucx/Worker/CompletionQueue;Lorg/ucx/jucx/Worker;)J ++ */ ++JNIEXPORT jlong JNICALL Java_org_ucx_jucx_Bridge_createWorkerNative ++ (JNIEnv *, jclass, jint, jobject, jobject); ++ ++ ++/* ++ * Class: org_ucx_jucx_Bridge ++ * Method: releaseWorkerNative ++ * Signature: (J)V ++ */ ++JNIEXPORT void JNICALL Java_org_ucx_jucx_Bridge_releaseWorkerNative ++ (JNIEnv *, jclass, jlong); + } + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.cc b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.cc +new file mode 100644 +index 0000000..4f2323c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.cc +@@ -0,0 +1,72 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++#include "context.h" ++#include "request_util.h" ++ ++ucs_status_t context::ref_context() { ++ ucs_status_t status = UCS_OK; ++ { // Lock before checking context and updating reference counter ++ std::lock_guard lk(ref_lock); ++ if (ucp_context == nullptr) { ++ status = create_context(); ++ } ++ ++ if (status == UCS_OK) { ++ ++ref_count; ++ } ++ } // Unlock ++ ++ return status; ++} ++ ++void context::deref_context() { ++ std::lock_guard lk(ref_lock); ++ if (--ref_count == 0) { // All workers released ++ release_context(); ++ } ++} ++ ++context::~context() { ++ if (ucp_context) { ++ ucp_cleanup(ucp_context); ++ } ++} ++ ++ucp_context_h context::get_ucp_context() { ++ return ucp_context; ++} ++ ++ucs_status_t context::create_context() { ++ ucp_params_t ucp_params = { 0 }; ++ ucp_config_t *config; ++ ucs_status_t status; ++ ++ status = ucp_config_read(nullptr, nullptr, &config); ++ if (status != UCS_OK) { ++ return status; ++ } ++ ++ uint64_t features = UCP_FEATURE_TAG; ++ uint64_t field_mask = UCP_PARAM_FIELD_FEATURES | ++ UCP_PARAM_FIELD_REQUEST_INIT | ++ UCP_PARAM_FIELD_REQUEST_SIZE; ++ ++ ucp_params.features = features; ++ ucp_params.field_mask = field_mask; ++ ucp_params.request_size = sizeof(jucx_request); ++ ucp_params.request_init = request_util::request_handler::request_init; ++ ++ status = ucp_init(&ucp_params, config, &ucp_context); ++ ucp_config_release(config); ++ ++ return status; ++} ++ ++void context::release_context() { ++ if (ucp_context) { ++ ucp_cleanup(ucp_context); ++ } ++ ucp_context = nullptr; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.h b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.h +new file mode 100644 +index 0000000..4011b70 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.h +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++#ifndef CONTEXT_H_ ++#define CONTEXT_H_ ++ ++#include ++ ++#include ++ ++ ++/** ++ * Context wrapper - allocates and releases ucp context ++ */ ++class context { ++public: ++ context() : ucp_context(nullptr), ref_count(0) {} ++ ++ ucs_status_t ref_context(); ++ ++ void deref_context(); ++ ++ ~context(); ++ ++ ucp_context_h get_ucp_context(); ++ ++private: ++ ucp_context_h ucp_context; ++ size_t ref_count; ++ std::mutex ref_lock; ++ ++ ucs_status_t create_context(); ++ ++ void release_context(); ++}; ++ ++ ++#endif /* CONTEXT_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.cc b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.cc +index aa62f1a..03d78a8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.cc +@@ -3,9 +3,10 @@ + * See file LICENSE for terms. + */ + #include "request_util.h" ++#include "worker.h" + + void request_util::request_handler::request_init(void *request) { + jucx_request* req = (jucx_request*) request; + +- // Currently no initialization needed ++ req->request_worker = NULL; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.h b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.h +index 3bd1888..76e9fe1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.h +@@ -10,14 +10,16 @@ + + #include + ++// forward declaration ++class worker; ++ + /** + * class to hold the request struct and request handlers + */ + class request_util { + public: + struct request_t { +- // User defined request +- // Data members will be added later ++ worker* request_worker; + }; + + class request_handler { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.cc b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.cc +new file mode 100644 +index 0000000..0f63b23 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.cc +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++#include "worker.h" ++ ++#include // bad_alloc exception ++ ++worker::worker(context* ctx, uint32_t cap, ucp_worker_params_t params) : ++ jucx_context(ctx), ucp_worker(nullptr), ++ queue_size(cap), event_queue(nullptr) { ++ ucs_status_t status = jucx_context->ref_context(); ++ if (status != UCS_OK) { ++ throw std::bad_alloc{}; ++ } ++ ++ status = ucp_worker_create(jucx_context->get_ucp_context(), ++ ¶ms, &ucp_worker); ++ if (status != UCS_OK) { ++ jucx_context->deref_context(); ++ throw std::bad_alloc{}; ++ } ++ event_queue = new char[queue_size]; ++} ++ ++worker::~worker() { ++ delete[] event_queue; ++ ucp_worker_destroy(ucp_worker); ++ jucx_context->deref_context(); ++} ++ ++ucs_status_t worker::extract_worker_address(ucp_address_t** worker_address, ++ size_t& address_length) { ++ return ucp_worker_get_address(ucp_worker, worker_address, &address_length); ++} ++ ++void worker::release_worker_address(ucp_address_t* worker_address) { ++ ucp_worker_release_address(ucp_worker, worker_address); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.h b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.h +new file mode 100644 +index 0000000..d941c08 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++#ifndef SRC_WORKER_H_ ++#define SRC_WORKER_H_ ++ ++#include "context.h" ++ ++#include ++ ++#include ++ ++class worker { ++public: ++ worker(context* ctx, uint32_t cap, ucp_worker_params_t params); ++ ++ ~worker(); ++ ++ ucs_status_t extract_worker_address(ucp_address_t** worker_address, ++ size_t& address_length); ++ ++ void release_worker_address(ucp_address_t* worker_address); ++ ++ char *get_event_queue() const { ++ return event_queue; ++ } ++ ++ ucp_worker_h get_ucp_worker() const { ++ return ucp_worker; ++ } ++ ++private: ++ context* jucx_context; ++ ucp_worker_h ucp_worker; ++ uint32_t queue_size; ++ char* event_queue; ++}; ++ ++#endif /* SRC_WORKER_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/test/java/org/ucx/jucx/WorkerTest.java b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/test/java/org/ucx/jucx/WorkerTest.java +new file mode 100644 +index 0000000..1c909e9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/test/java/org/ucx/jucx/WorkerTest.java +@@ -0,0 +1,97 @@ ++package org.ucx.jucx; ++ ++import static org.junit.Assert.assertTrue; ++import static org.junit.Assert.fail; ++ ++import java.io.IOException; ++import java.util.Random; ++ ++import org.junit.Before; ++import org.junit.Test; ++import org.ucx.jucx.Worker.Callback; ++ ++/** ++ * Worker unit tests class ++ */ ++public class WorkerTest { ++ private Callback cb; ++ ++ @Before ++ public void initCallback() { ++ cb = new Callback() {}; ++ } ++ ++ @Test ++ public void testMultipleWorkersInitialization() { ++ int numOfWorkers = 10; ++ int maxEvents = 128; ++ Worker[] workers = new Worker[numOfWorkers]; ++ ++ for (int i = 0; i < numOfWorkers; i++) { ++ try { ++ workers[i] = new Worker(cb, maxEvents); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ } ++ ++ for (int i = 0; i < workers.length; i++) { ++ workers[i].close(); ++ } ++ } ++ ++ @Test ++ public void testWorkerFieldsAndGetters() { ++ int maxEvents = 128; ++ Worker worker = null; ++ long nativeId = -1; ++ byte[] workerAddress = null; ++ ++ try { ++ worker = new Worker(cb, maxEvents); ++ nativeId = worker.getNativeId(); ++ workerAddress = worker.getWorkerAddress(); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ ++ assertTrue("Worker fields initialization failed", ++ nativeId > 0 && ++ workerAddress != null && ++ workerAddress.length > 0); ++ ++ worker.close(); ++ } ++ ++ @SuppressWarnings({ "resource", "unused" }) ++ @Test(expected = IllegalArgumentException.class) ++ public void testWorkerCbNullInitialization() { ++ // Random legal event queue size ++ int maxEvents = new Random().nextInt(Worker.MAX_QUEUED_EVENTS) + 1; ++ try { ++ Worker worker = new Worker(null, maxEvents); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ } ++ ++ @SuppressWarnings({ "resource", "unused" }) ++ @Test(expected = IllegalArgumentException.class) ++ public void testWorkerQueueSizeNonPositiveInitialization() { ++ try { ++ Worker worker = new Worker(cb, 0); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ } ++ ++ @SuppressWarnings({ "resource", "unused" }) ++ @Test(expected = IllegalArgumentException.class) ++ public void testWorkerQueueSizeExceedingInitialization() { ++ try { ++ Worker worker = new Worker(cb, Worker.MAX_QUEUED_EVENTS + 1); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/compiler.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/compiler.m4 +index e5ce14e..9982fea 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/compiler.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/compiler.m4 +@@ -1,6 +1,7 @@ + # + # Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. + # Copyright (c) UT-Battelle, LLC. 2017. ALL RIGHTS RESERVED. ++# Copyright (C) ARM Ltd. 2016-2018. ALL RIGHTS RESERVED. + # See file LICENSE for terms. + # + +@@ -84,16 +85,70 @@ AC_DEFUN([COMPILER_OPTION], + AS_IF([test "x$with_$1" != "xno"], + [SAVE_CFLAGS="$CFLAGS" + CFLAGS="$BASE_CFLAGS $CFLAGS $3" +- AC_MSG_CHECKING([$2]) ++ AC_MSG_CHECKING([$3]) + CHECK_CROSS_COMP([AC_LANG_SOURCE([$5])], + [AC_MSG_RESULT([yes]) +- OPT_CFLAGS="$OPT_CFLAGS|$1"], ++ # TODO: Add CPU UARCH detector and validator in UCX init. ++ # As for now we will avoid passing this information to ++ # library. ++ AS_IF([test "x$1" != "xmcpu" -a "x$1" != "xmarch"], ++ [OPT_CFLAGS="$OPT_CFLAGS|$1"],[])], + [AC_MSG_RESULT([no])]) + CFLAGS="$SAVE_CFLAGS"]) + ]) + + + # ++# Check platform uarch and apply micro-architecture specific optimizations ++# ++AC_DEFUN([DETECT_UARCH], ++[ ++ cpuimpl=`grep 'CPU implementer' /proc/cpuinfo 2> /dev/null | cut -d: -f2 | tr -d " " | head -n 1` ++ cpuarch=`grep 'CPU architecture' /proc/cpuinfo 2> /dev/null | cut -d: -f2 | tr -d " " | head -n 1` ++ cpuvar=`grep 'CPU variant' /proc/cpuinfo 2> /dev/null | cut -d: -f2 | tr -d " " | head -n 1` ++ cpupart=`grep 'CPU part' /proc/cpuinfo 2> /dev/null | cut -d: -f2 | tr -d " " | head -n 1` ++ ++ ax_cpu="" ++ ax_arch="" ++ ++ AC_MSG_NOTICE(Detected CPU implementation: ${cpuimpl}) ++ AC_MSG_NOTICE(Detected CPU arhitecture: ${cpuarch}) ++ AC_MSG_NOTICE(Detected CPU variant: ${cpuvar}) ++ AC_MSG_NOTICE(Detected CPU part: ${cpupart}) ++ ++ case $cpuimpl in ++ 0x42) case $cpupart in ++ 0x516 | 0x0516) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX2], 1, [Cavium ThunderX2]) ++ ax_cpu="thunderx2t99" ++ ax_arch="armv8.1-a+lse" ;; ++ 0xaf | 0x0af) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX2], 1, [Cavium ThunderX2]) ++ ax_cpu="thunderx2t99" ++ ax_arch="armv8.1-a+lse" ;; ++ esac ++ ;; ++ 0x43) case $cpupart in ++ 0x516 | 0x0516) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX2], 1, [Cavium ThunderX2]) ++ ax_cpu="thunderx2t99" ++ ax_arch="armv8.1-a+lse" ;; ++ 0xaf | 0x0af) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX2], 1, [Cavium ThunderX2]) ++ ax_cpu="thunderx2t99" ++ ax_arch="armv8.1-a+lse" ;; ++ 0xa1 | 0x0a1) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX1], 1, [Cavium ThunderX1]) ++ ax_cpu="thunderxt88" ;; ++ esac ++ ;; ++ *) ax_cpu="native" ++ ;; ++ esac ++]) ++ ++ ++# + # CHECK_DEPRECATED_DECL_FLAG (flag, variable) + # + # The macro checks if the given compiler flag enables usig deprecated declarations. +@@ -165,6 +220,25 @@ AS_IF([test "x$with_avx" != xyes], + ]) + + ++DETECT_UARCH() ++ ++# ++# CPU tuning ++# ++AS_IF([test "x$ax_cpu" != "x"], ++ [COMPILER_OPTION([mcpu], [CPU Model], [-mcpu=$ax_cpu], [$enable_optimizations], ++ [int main() { return 0;}]) ++ ]) ++ ++# ++# Architecture tuning ++# ++AS_IF([test "x$ax_arch" != "x"], ++ [COMPILER_OPTION([march], [architecture tuning], [-march=$ax_arch], [$enable_optimizations], ++ [int main() { return 0;}]) ++ ]) ++ ++ + # + # Check for compiler attribute which disables optimizations per-function. + # +@@ -173,6 +247,25 @@ CHECK_SPECIFIC_ATTRIBUTE([optimize], [NOOPTIMIZE], + + + # ++# Check for C++11 support ++# ++AC_MSG_CHECKING([c++11 support]) ++AC_LANG_PUSH([C++]) ++SAVE_CXXFLAGS="$CXXFLAGS" ++CXX11FLAGS="-std=c++11" ++CXXFLAGS="$CXXFLAGS $CXX11FLAGS" ++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main() { return 0; } ]])], ++ [AC_MSG_RESULT([yes]) ++ AC_SUBST([CXX11FLAGS]) ++ cxx11_happy=yes], ++ [AC_MSG_RESULT([no]) ++ cxx11_happy=no]) ++CXXFLAGS="$SAVE_CXXFLAGS" ++AC_LANG_POP ++AM_CONDITIONAL([HAVE_CXX11], [test "x$cxx11_happy" != xno]) ++ ++ ++# + # Set C++ optimization/debug flags to be the same as for C + # + BASE_CPPFLAGS="-DCPU_FLAGS=\"$OPT_CFLAGS\"" +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/cray_ugni.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/cray_ugni.m4 +index cbc03d5..97b9c83 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/cray_ugni.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/cray_ugni.m4 +@@ -8,8 +8,8 @@ cray_ugni_supported=no + AC_ARG_WITH([ugni], + [AC_HELP_STRING([--with-ugni(=DIR)], + [Build Cray UGNI support, adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])], +- [with_ugni=forced], +- [with_ugni=yes]) ++ [], ++ [with_ugni=default]) + + AS_IF([test "x$with_ugni" != "xno"], + [PKG_CHECK_MODULES([CRAY_UGNI], [cray-ugni cray-pmi], +@@ -17,7 +17,7 @@ AS_IF([test "x$with_ugni" != "xno"], + cray_ugni_supported=yes + AC_DEFINE([HAVE_TL_UGNI], [1], + [Define if UGNI transport exists.])], +- [AS_IF([test "x$with_ugni" == "xforced"], ++ [AS_IF([test "x$with_ugni" != "xdefault"], + [AC_MSG_WARN([UGNI support was requested but cray-ugni and cray-pmi packages can't be found]) + AC_MSG_ERROR([Cannot continue])],[])] + )]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ib.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ib.m4 +index 59cc567..e46b80c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ib.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ib.m4 +@@ -56,12 +56,15 @@ AC_ARG_WITH([cm], + + + # +-# mlx5 bare-metal support ++# mlx5 DV support + # +-AC_ARG_WITH([mlx5-hw], +- [AC_HELP_STRING([--with-mlx5-hw], [Compile with mlx5 bare-metal support])], ++AC_ARG_WITH([mlx5-dv], ++ [AC_HELP_STRING([--with-mlx5-dv], [Compile with mlx5 Direct Verbs ++ support. Direct Verbs (DV) support provides additional ++ acceleration capabilities that are not available in a ++ regular mode.])], + [], +- [with_mlx5_hw=yes]) ++ [with_mlx5_dv=yes]) + + + # +@@ -74,6 +77,15 @@ AC_ARG_WITH([ib-hw-tm], + + + # ++# DM Support ++# ++AC_ARG_WITH([dm], ++ [AC_HELP_STRING([--with-dm], [Compile with Device Memory support])], ++ [], ++ [with_dm=yes]) ++ ++ ++# + # Check basic IB support: User wanted at least one IB transport, and we found + # verbs header file and library. + # +@@ -133,40 +145,100 @@ AS_IF([test "x$with_ib" == xyes], + verbs_exp=yes], + [verbs_exp=no]) + +- AS_IF([test "x$with_mlx5_hw" != xno], +- [AC_CHECK_HEADERS([infiniband/mlx5_hw.h], +- [with_mlx5_hw=yes], +- [with_mlx5_hw=no])]) +- +- AC_CHECK_DECLS([ibv_mlx5_exp_get_qp_info, +- ibv_mlx5_exp_get_cq_info, +- ibv_mlx5_exp_get_srq_info, +- ibv_mlx5_exp_update_cq_ci, +- MLX5_WQE_CTRL_SOLICITED], +- [], [], [[#include ]]) +- +- # Disable mlx5_hw if the driver does not provide BF locking information +- AS_IF([test "x$ac_cv_have_decl_ibv_mlx5_exp_get_qp_info" == "xyes"], +- [AC_CHECK_MEMBERS([struct ibv_mlx5_qp_info.bf.need_lock], ++ AC_CHECK_MEMBERS([struct ibv_exp_device_attr.exp_device_cap_flags, ++ struct ibv_exp_device_attr.odp_caps, ++ struct ibv_exp_device_attr.odp_caps.per_transport_caps.dc_odp_caps, ++ struct ibv_exp_device_attr.odp_mr_max_size, ++ struct ibv_exp_qp_init_attr.max_inl_recv, ++ struct ibv_async_event.element.dct], ++ [], [], [[#include ]]) ++ ++ AC_CHECK_DECLS([IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN], ++ [have_cq_io=yes], [], [[#include ]]) ++ ++ AC_CHECK_DECLS([IBV_EXP_CQ_IGNORE_OVERRUN], ++ [have_cq_io=yes], [], [[#include ]]) ++ ++ AS_IF([test "x$with_mlx5_dv" != xno], [ ++ AC_MSG_NOTICE([Checking for legacy bare-metal support]) ++ AC_CHECK_HEADERS([infiniband/mlx5_hw.h], ++ [with_mlx5_hw=yes ++ mlx5_include=mlx5_hw.h ++ AC_CHECK_DECLS([ ++ ibv_mlx5_exp_get_qp_info, ++ ibv_mlx5_exp_get_cq_info, ++ ibv_mlx5_exp_get_srq_info, ++ ibv_mlx5_exp_update_cq_ci, ++ MLX5_WQE_CTRL_SOLICITED], ++ [], [], [[#include ]]) ++ AC_CHECK_MEMBERS([struct mlx5_srq.cmd_qp], ++ [], [with_ib_hw_tm=no], ++ [[#include ]]) ++ AC_CHECK_MEMBERS([struct mlx5_ah.ibv_ah], ++ [has_get_av=yes], [], ++ [[#include ]]) ++ AC_CHECK_MEMBERS([struct ibv_mlx5_qp_info.bf.need_lock], + [], + [AC_MSG_WARN([Cannot use mlx5 QP because it assumes dedicated BF]) + AC_MSG_WARN([Please upgrade MellanoxOFED to 3.0 or above]) + with_mlx5_hw=no], +- [[#include ]])], +- []) ++ [[#include ]]) ++ AC_CHECK_DECLS([ ++ IBV_EXP_QP_INIT_ATTR_RES_DOMAIN, ++ IBV_EXP_RES_DOMAIN_THREAD_MODEL, ++ ibv_exp_create_res_domain, ++ ibv_exp_destroy_res_domain], ++ [AC_DEFINE([HAVE_IBV_EXP_RES_DOMAIN], 1, [IB resource domain]) ++ has_res_domain=yes], [], [[#include ]]) ++ ], [with_mlx5_hw=no]) ++ ++ AC_MSG_NOTICE([Checking for DV bare-metal support]) ++ ++ AC_CHECK_LIB([mlx5-rdmav2], [mlx5dv_query_device], ++ [AC_SUBST(LIB_MLX5, [-lmlx5-rdmav2])],[ ++ AC_CHECK_LIB([mlx5], [mlx5dv_query_device], ++ [AC_SUBST(LIB_MLX5, [-lmlx5])], ++ [with_mlx5_dv=no], [-libverbs])], [-libverbs]) ++ ++ AS_IF([test "x$with_mlx5_dv" != xno], [ ++ AC_CHECK_HEADERS([infiniband/mlx5dv.h], ++ [with_mlx5_hw=yes ++ with_mlx5_dv=yes ++ mlx5_include=mlx5dv.h], [], [ ])]) ++ ++ AS_IF([test "x$with_mlx5_dv" == xyes -a "x$have_cq_io" == xyes ], [ ++ AC_CHECK_DECLS([ ++ mlx5dv_init_obj], ++ [], [], [[#include ]]) ++ AC_CHECK_MEMBERS([struct mlx5dv_cq.cq_uar], ++ [], [], [[#include ]]) ++ AC_CHECK_DECLS([MLX5DV_OBJ_AH], [has_get_av=yes], ++ [], [[#include ]]) ++ AC_CHECK_DECLS([MLX5DV_DCTYPE_DCT], ++ [have_dc_dv=yes], [], [[#include ]]) ++ AC_CHECK_DECLS([ibv_alloc_td], ++ [has_res_domain=yes], [], [[#include ]])]) ++ ++ AC_CHECK_DECLS([ibv_alloc_td], ++ [has_res_domain=yes], [], [[#include ]])]) ++ ++ AS_IF([test "x$has_res_domain" == xyes -a "x$have_cq_io" == xyes ], [], [ ++ with_mlx5_hw=no]) + + AS_IF([test "x$with_mlx5_hw" == xyes], + [AC_MSG_NOTICE([Compiling with mlx5 bare-metal support]) +- AC_DEFINE([HAVE_MLX5_HW], 1, [mlx5 bare-metal support])], +- []) ++ AC_DEFINE([HAVE_MLX5_HW], 1, [mlx5 bare-metal support]) ++ AS_IF([test "x$has_get_av" == xyes], ++ [AC_DEFINE([HAVE_MLX5_HW_UD], 1, [mlx5 UD bare-metal support]) ++ AC_DEFINE([HAVE_MLX5_HW_DC], 1, [mlx5 DC bare-metal support])], [])], []) + + AC_CHECK_DECLS([IBV_LINK_LAYER_INFINIBAND, + IBV_LINK_LAYER_ETHERNET, +- IBV_EVENT_GID_CHANGE], ++ IBV_EVENT_GID_CHANGE, ++ ibv_create_qp_ex], + [], [], [[#include ]]) + +- AC_CHECK_DECLS([IBV_EXP_CQ_IGNORE_OVERRUN, +- IBV_EXP_ACCESS_ALLOCATE_MR, ++ AC_CHECK_DECLS([IBV_EXP_ACCESS_ALLOCATE_MR, + IBV_EXP_ACCESS_ON_DEMAND, + IBV_EXP_DEVICE_MR_ALLOCATE, + IBV_EXP_WR_NOP, +@@ -180,7 +252,8 @@ AS_IF([test "x$with_ib" == xyes], + ibv_exp_create_qp, + ibv_exp_prefetch_mr, + ibv_exp_create_srq, +- ibv_exp_setenv], ++ ibv_exp_setenv, ++ ibv_exp_query_gid_attr], + [], [], [[#include ]]) + + AC_CHECK_DECLS([ibv_exp_post_send, +@@ -192,8 +265,11 @@ AS_IF([test "x$with_ib" == xyes], + [have_ext_atomics=no], + [[#include ]]) + ++ AC_CHECK_DECLS(IBV_EXP_DEVICE_ATTR_RESERVED_2, [], [], ++ [[#include ]]) ++ + # UMR support +- AC_CHECK_DECLS(IBV_EXP_WR_UMR_FILL, ++ AC_CHECK_DECLS(IBV_EXP_MR_INDIRECT_KLMS, + [AC_DEFINE([HAVE_EXP_UMR], 1, [IB UMR support])], + [], + [[#include ]]) +@@ -208,8 +284,8 @@ AS_IF([test "x$with_ib" == xyes], + [], + [[#include ]]) + +- AC_CHECK_DECLS(IBV_EXP_MR_INDIRECT_KLMS, +- [AC_DEFINE([HAVE_EXP_UMR_NEW_API], 1, [IB UMR new API])], ++ AC_CHECK_DECLS(IBV_EXP_MR_FIXED_BUFFER_SIZE, ++ [AC_DEFINE([HAVE_EXP_UMR_KSM], 1, [IB UMR KSM support])], + [], + [[#include ]]) + +@@ -226,27 +302,23 @@ AS_IF([test "x$with_ib" == xyes], + AC_CHECK_DECLS(IBV_EXP_ODP_SUPPORT_IMPLICIT, [], [], + [[#include ]]) + +- AC_CHECK_MEMBERS([struct ibv_exp_device_attr.exp_device_cap_flags, +- struct ibv_exp_device_attr.odp_caps, +- struct ibv_exp_device_attr.odp_caps.per_transport_caps.dc_odp_caps, +- struct ibv_exp_device_attr.odp_mr_max_size, +- struct ibv_exp_qp_init_attr.max_inl_recv, +- struct ibv_async_event.element.dct], +- [], [], [[#include ]]) +- + AC_CHECK_MEMBERS([struct mlx5_wqe_av.base, + struct mlx5_grh_av.rmac], +- [], [], [[#include ]]) ++ [], [], [[#include ]]) + + AC_DEFINE([HAVE_IB], 1, [IB support]) + +- AS_IF([test "x$with_dc" != xno], +- [AC_CHECK_DECLS(IBV_EXP_QPT_DC_INI, [], [with_dc=no], [[#include ]]) +- AC_CHECK_MEMBERS([struct ibv_exp_dct_init_attr.inline_size], [] , [with_dc=no], [[#include ]]) +- ]) +- AS_IF([test "x$with_dc" != xno], +- [AC_DEFINE([HAVE_TL_DC], 1, [DC transport support]) +- transports="${transports},dc"]) ++ AC_CHECK_DECLS([IBV_EXP_QPT_DC_INI], ++ [have_dc_exp=yes], [], [[#include ]]) ++ ++ AS_IF([test "x$with_dc" != xno -a \( "x$have_dc_exp" = xyes -o "x$have_dc_dv" = xyes \)], [ ++ AC_DEFINE([HAVE_TL_DC], 1, [DC transport support]) ++ transports="${transports},dc" ++ AS_IF([test -n "$have_dc_dv"], ++ [AC_DEFINE([HAVE_DC_DV], 1, [DC DV support])], [ ++ AS_IF([test -n "$have_dc_exp"], ++ [AC_DEFINE([HAVE_DC_EXP], 1, [DC EXP support])])])], ++ [with_dc=no]) + + AS_IF([test "x$with_rc" != xno], + [AC_DEFINE([HAVE_TL_RC], 1, [RC transport support]) +@@ -279,6 +351,21 @@ AS_IF([test "x$with_ib" == xyes], + [], [#include ]) + ]) + ++ # Device Memory support ++ AS_IF([test "x$with_dm" != xno], ++ [AC_TRY_COMPILE([#include ], ++ [ ++ struct ibv_exp_dm ibv_dm; ++ struct ibv_exp_alloc_dm_attr dm_attr; ++ void* a1 = ibv_exp_alloc_dm; ++ void* a2 = ibv_exp_reg_mr; ++ void* a3 = ibv_dereg_mr; ++ void* a4 = ibv_exp_free_dm; ++ ], ++ [AC_DEFINE([HAVE_IBV_EXP_DM], 1, [Device Memory support])], ++ []) ++ ]) ++ + AC_CHECK_DECLS([ibv_cmd_modify_qp], + [], [], [[#include ]]) + +@@ -297,6 +384,7 @@ AS_IF([test "x$with_ib" == xyes], + with_rc=no + with_ud=no + with_mlx5_hw=no ++ with_mlx5_dv=no + with_ib_hw_tm=no + ]) + +@@ -307,7 +395,12 @@ AS_IF([test "x$with_ib" == xyes], + AM_CONDITIONAL([HAVE_IB], [test "x$with_ib" != xno]) + AM_CONDITIONAL([HAVE_TL_RC], [test "x$with_rc" != xno]) + AM_CONDITIONAL([HAVE_TL_DC], [test "x$with_dc" != xno]) ++AM_CONDITIONAL([HAVE_DC_DV], [test -n "$have_dc_dv"]) ++AM_CONDITIONAL([HAVE_DC_EXP], [test -n "$have_dc_exp"]) + AM_CONDITIONAL([HAVE_TL_UD], [test "x$with_ud" != xno]) + AM_CONDITIONAL([HAVE_TL_CM], [test "x$with_cm" != xno]) + AM_CONDITIONAL([HAVE_MLX5_HW], [test "x$with_mlx5_hw" != xno]) ++AM_CONDITIONAL([HAVE_MLX5_DV], [test "x$with_mlx5_dv" != xno]) ++AM_CONDITIONAL([HAVE_MLX5_HW_UD], [test "x$with_mlx5_hw" != xno -a "x$has_get_av" != xno]) ++AM_CONDITIONAL([HAVE_MLX5_HW_DC], [test "x$with_mlx5_hw" != xno -a "x$has_get_av" != xno -a "x$have_dc" != xno]) + AM_CONDITIONAL([HAVE_IBV_EX_HW_TM], [test "x$with_ib_hw_tm" != xno]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/java.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/java.m4 +index 1217169..dc7c206 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/java.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/java.m4 +@@ -9,6 +9,7 @@ + # + # + java_happy="no" ++mvn_args="-Dsources=\"**/dummy/**\" -DtestSources=\"**/jucx/**\" -Dmaven.test.skip=true -DskipCopy=true" + AC_ARG_WITH([java], + [AC_HELP_STRING([--with-java=(PATH)], + [Compile Java UCX (default is guess).]) +@@ -21,8 +22,8 @@ AS_IF([test "x$with_java" != xno], + AS_IF([test "x${MVNBIN}" == "xyes" -a "x${JAVABIN}" == "xyes"], + [ + AC_MSG_CHECKING([mvn plugins and dependencies availability]) +- AC_SUBST([MVNAVAIL], [$(cd bindings/java && mvn -Dsources="**/dummy/**" -DtestSources="**/jucx/**" -DskipCopy="true" -q install >/dev/null && \ +- mvn -Dsources="**/dummy/**" -DtestSources="**/jucx/**" -DskipCopy="true" -q clean >/dev/null && \ ++ AC_SUBST([MVNAVAIL], [$(cd bindings/java && mvn $(echo "${mvn_args}") install >/dev/null && \ ++ mvn $(echo "${mvn_args}") clean >/dev/null && \ + echo yes || echo no)]) + AC_MSG_RESULT([${MVNAVAIL}]) + AS_IF([test -n "$with_java" -a "x$with_java" != "xyes" -a "x$with_java" != "xguess"], +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/knem.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/knem.m4 +index c748cf1..0cb894b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/knem.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/knem.m4 +@@ -7,22 +7,32 @@ AC_ARG_WITH([knem], + [], [with_knem=guess]) + + AS_IF([test "x$with_knem" != xno], +- [AS_IF([test ! -d $with_knem], +- [ +- AC_MSG_NOTICE([KNEM path was not found, guessing ...]) +- with_knem=$(${PKG_CONFIG} --variable=prefix knem || find /opt/knem* -name knem_io.h |xargs dirname |sed -e s,/include,,g) +- ], +- [:]) +- AC_CHECK_HEADER([$with_knem/include/knem_io.h], +- [BASE_CFLAGS="$BASE_CFLAGS -I$with_knem/include" +- BASE_CPPFLAGS="$BASE_CPPFLAGS -I$with_knem/include" +- AC_DEFINE([HAVE_KNEM], [1], [Enable the use of KNEM]) +- transports="${transports},knem" +- knem_happy="yes"], +- [AC_MSG_WARN([KNEM requested but not found]) +- AC_DEFINE([HAVE_KNEM], [0], [Disable the use of KNEM])])], +- [AC_MSG_WARN([KNEM was explicitly disabled]) +- AC_DEFINE([HAVE_KNEM], [0], [Disable the use of KNEM])] ++ [AS_IF([test "x$with_knem" == xguess -o "x$with_knem" == xyes -o "x$with_knem" == x], ++ [AC_MSG_NOTICE([KNEM path was not found, guessing ...]) ++ ucx_check_knem_include_dir=$(pkg-config --cflags knem)], ++ [ucx_check_knem_include_dir=-I$with_knem/include]) ++ ++ save_CPPFLAGS="$CPPFLAGS" ++ ++ CPPFLAGS="$ucx_check_knem_include_dir $CPPFLAGS" ++ ++ AC_CHECK_DECL([KNEM_CMD_GET_INFO], ++ [BASE_CFLAGS="$BASE_CFLAGS $ucx_check_knem_include_dir" ++ BASE_CPPFLAGS="$BASE_CPPFLAGS $ucx_check_knem_include_dir" ++ AC_DEFINE([HAVE_KNEM], [1], [Enable the use of KNEM]) ++ transports="${transports},knem" ++ knem_happy="yes"], ++ [AS_IF([test "x$with_knem" != xguess], ++ [AC_MSG_ERROR([KNEM requested but required file (knem_io.h) could not be found]) ++ AC_DEFINE([HAVE_KNEM], [0], [Disable the use of KNEM])], ++ [AC_MSG_WARN([KNEM requested but required file (knem_io.h) could not be found])])], ++ [[#include ]]) ++ ++ CPPFLAGS="$save_CPPFLAGS" ++ ++ ], ++ [AC_MSG_WARN([KNEM was explicitly disabled]) ++ AC_DEFINE([HAVE_KNEM], [0], [Disable the use of KNEM])] + ) + + AM_CONDITIONAL([HAVE_KNEM], [test "x$knem_happy" != xno]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/rocm.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/rocm.m4 +index 6aa9f8b..ee4e93c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/rocm.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/rocm.m4 +@@ -1,47 +1,93 @@ + # +-# Copyright (C) Advanced Micro Devices, Inc. 2016 - 2017. ALL RIGHTS RESERVED. ++# Copyright (C) Advanced Micro Devices, Inc. 2016 - 2018. ALL RIGHTS RESERVED. + # See file LICENSE for terms. + # + ++# ROCM_PARSE_FLAGS(ARG, VAR_LIBS, VAR_LDFLAGS, VAR_CPPFLAGS) ++# ---------------------------------------------------------- ++# Parse whitespace-separated ARG into appropriate LIBS, LDFLAGS, and ++# CPPFLAGS variables. ++AC_DEFUN([ROCM_PARSE_FLAGS], ++[for arg in $$1 ; do ++ AS_CASE([$arg], ++ [yes], [], ++ [no], [], ++ [-l*|*.a|*.so], [$2="$$2 $arg"], ++ [-L*|-WL*|-Wl*], [$3="$$3 $arg"], ++ [-I*], [$4="$$4 $arg"], ++ [*lib|*lib/|*lib64|*lib64/],[AS_IF([test -d $arg], [$3="$$3 -L$arg"], ++ [AC_MSG_WARN([$arg of $1 not parsed])])], ++ [*include|*include/],[AS_IF([test -d $arg], [$4="$$4 -I$arg"], ++ [AC_MSG_WARN([$arg of $1 not parsed])])], ++ [AC_MSG_WARN([$arg of $1 not parsed])]) ++done]) ++ + # + # Check for ROCm support + # +-rocm_happy="no" +- + AC_ARG_WITH([rocm], +- [AS_HELP_STRING([--with-rocm=(DIR)], [Enable the use of ROCm (default is autodetect).])], +- [], [with_rocm=guess]) ++ [AS_HELP_STRING([--with-rocm=(DIR)], ++ [Enable the use of ROCm (default is autodetect).])], ++ [], ++ [with_rocm=guess]) + ++rocm_happy=no + AS_IF([test "x$with_rocm" != "xno"], +- +- [AS_IF([test "x$with_rocm" == "x" || test "x$with_rocm" == "xguess" || test "x$with_rocm" == "xyes"], +- [ +- AC_MSG_NOTICE([ROCm path was not specified. Guessing ...]) +- with_rocm=/opt/rocm +- ], +- [:]) +- AC_CHECK_HEADERS([$with_rocm/include/hsa/hsa_ext_amd.h], +- [AC_CHECK_DECLS([hsaKmtProcessVMRead,hsaKmtProcessVMWrite], +- [rocm_happy="yes"], +- [AC_MSG_WARN([ROCm without CMA support was detected. Disable.]) +- rocm_happy="no"], +- [#include <$with_rocm/include/libhsakmt/hsakmt.h>]) +- AS_IF([test "x$rocm_happy" == "xyes"], +- [AC_DEFINE([HAVE_ROCM], 1, [Enable ROCm support]) +- transports="${transports},rocm" +- AC_SUBST(ROCM_CPPFLAGS, "-I$with_rocm/include/hsa -I$with_rocm/include/libhsakmt -DHAVE_ROCM=1") +- AC_SUBST(ROCM_CFLAGS, "-I$with_rocm/include/hsa -I$with_rocm/include/libhsakmt -DHAVE_ROCM=1") +- AC_SUBST(ROCM_LDFLAGS, "-lhsa-runtime64 -L$with_rocm/lib") +- CFLAGS="$CFLAGS $ROCM_CFLAGS" +- CPPFLAGS="$CPPFLAGS $ROCM_CPPFLAGS" +- LDFLAGS="$LDFLAGS $ROCM_LDFLAGS"], +- [])], +- [AC_MSG_WARN([ROCm not found]) +- AC_DEFINE([HAVE_ROCM], [0], [Disable the use of ROCm])])], +- [AC_MSG_WARN([ROCm was explicitly disabled]) +- AC_DEFINE([HAVE_ROCM], [0], [Disable the use of ROCm])] ++ [AS_CASE(["x$with_rocm"], ++ [x|xguess|xyes], ++ [AC_MSG_NOTICE([ROCm path was not specified. Guessing ...]) ++ with_rocm=/opt/rocm ++ ROCM_CPPFLAGS="-I$with_rocm/libhsakmt/include/libhsakmt -I$with_rocm/include/hsa -I$with_rocm/include" ++ ROCM_LDFLAGS="-L$with_rocm/hsa/lib -L$with_rocm/lib" ++ ROCM_LIBS="-lhsa-runtime64"], ++ [x/*], ++ [AC_MSG_NOTICE([ROCm path given as $with_rocm ...]) ++ ROCM_CPPFLAGS="-I$with_rocm/libhsakmt/include/libhsakmt -I$with_rocm/include/hsa -I$with_rocm/include" ++ ROCM_LDFLAGS="-L$with_rocm/hsa/lib -L$with_rocm/lib" ++ ROCM_LIBS="-lhsa-runtime64"], ++ [AC_MSG_NOTICE([ROCm flags given ...]) ++ ROCM_PARSE_FLAGS([with_rocm], ++ [ROCM_LIBS], [ROCM_LDFLAGS], [ROCM_CPPFLAGS])]) ++ SAVE_CPPFLAGS="$CPPFLAGS" ++ SAVE_LDFLAGS="$LDFLAGS" ++ SAVE_LIBS="$LIBS" ++ CPPFLAGS="$ROCM_CPPFLAGS $CPPFLAGS" ++ LDFLAGS="$ROCM_LDFLAGS $LDFLAGS" ++ LIBS="$ROCM_LIBS $LIBS" ++ rocm_happy=yes ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_CHECK_HEADERS([hsa.h], [rocm_happy=yes], [rocm_happy=no])]) ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_CHECK_HEADERS([hsa_ext_amd.h], [rocm_happy=yes], [rocm_happy=no])]) ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_CHECK_HEADERS([hsakmt.h], [rocm_happy=yes], [rocm_happy=no])]) ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_CHECK_DECLS([hsaKmtProcessVMRead,hsaKmtProcessVMWrite], ++ [rocm_happy=yes], ++ [rocm_happy=no ++ AC_MSG_WARN([ROCm without CMA support was detected. Disable.])], ++ [#include ])]) ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_SEARCH_LIBS([hsa_init], [hsa-runtime64]) ++ AS_CASE(["x$ac_cv_search_hsa_init"], ++ [xnone*], [], ++ [xno], [rocm_happy=no], ++ [x-l*], [ROCM_LIBS="$ac_cv_search_hsa_init $ROCM_LIBS"])]) ++ AS_IF([test "x$rocm_happy" == "xyes"], ++ [AC_DEFINE([HAVE_ROCM], [1], [Set to 1 to enable ROCm support]) ++ transports="${transports},rocm" ++ AC_SUBST([ROCM_CPPFLAGS]) ++ AC_SUBST([ROCM_LDFLAGS]) ++ AC_SUBST([ROCM_LIBS])], ++ [AC_DEFINE([HAVE_ROCM], [0], [Set to 1 to enable ROCm support]) ++ AC_MSG_WARN([ROCm not found])]) ++ CPPFLAGS="$SAVE_CPPFLAGS" ++ LDFLAGS="$SAVE_LDFLAGS" ++ LIBS="$SAVE_LIBS" ++ ], ++ [AC_DEFINE([HAVE_ROCM], [0], [Set to 1 to enable ROCm support]) ++ AC_MSG_WARN([ROCm was explicitly disabled])] + ) + +- + AM_CONDITIONAL([HAVE_ROCM], [test "x$rocm_happy" != xno]) + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/sysdep.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/sysdep.m4 +index aa5d5fe..03ea5ff 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/sysdep.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/sysdep.m4 +@@ -131,3 +131,14 @@ CHECK_CROSS_COMP([AC_LANG_SOURCE([#include + AC_MSG_WARN([malloc hooks are not supported])] + ) + CFLAGS=$SAVE_CFLAGS ++ ++ ++# ++# Check for capability.h header (usually comes from libcap-devel package) and ++# make sure it defines the types we need ++# ++AC_CHECK_HEADERS([sys/capability.h], ++ [AC_CHECK_TYPES([cap_user_header_t, cap_user_data_t], [], ++ [AC_DEFINE([HAVE_SYS_CAPABILITY_H], [0], [Linux capability API support])], ++ [[#include ]])] ++ ) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucm.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucm.m4 +index fd3750d..541bdb1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucm.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucm.m4 +@@ -47,3 +47,63 @@ AC_CHECK_FUNCS([malloc_get_state malloc_set_state], + [], + [#include ]) + ++ ++# ++# Madvise flags ++# ++AC_CHECK_DECLS([MADV_FREE, ++ MADV_REMOVE, ++ POSIX_MADV_DONTNEED], ++ [], ++ [], ++ [#include ]) ++ ++ ++# BISTRO hooks infrastructure ++# ++# SYS_xxx macro ++# ++mmap_hooks_happy=yes ++AC_CHECK_DECLS([SYS_mmap, ++ SYS_munmap, ++ SYS_mremap, ++ SYS_brk, ++ SYS_madvise], ++ [], ++ [mmap_hooks_happy=no], dnl mmap syscalls are not defined ++ [#include ]) ++ ++shm_hooks_happy=yes ++AC_CHECK_DECLS([SYS_shmat, ++ SYS_shmdt], ++ [], ++ [shm_hooks_happy=no], ++ [#include ]) ++ ++ipc_hooks_happy=yes ++AC_CHECK_DECLS([SYS_ipc], ++ [], ++ [ipc_hooks_happy=no], ++ [#include ]) ++ ++AS_IF([test "x$mmap_hooks_happy" == "xyes"], ++ AS_IF([test "x$ipc_hooks_happy" == "xyes" -o "x$shm_hooks_happy" == "xyes"], ++ [bistro_hooks_happy=yes])) ++ ++AS_IF([test "x$bistro_hooks_happy" == "xyes"], ++ [AC_DEFINE([UCM_BISTRO_HOOKS], [1], [Enable BISTRO hooks])], ++ [AC_DEFINE([UCM_BISTRO_HOOKS], [0], [Enable BISTRO hooks]) ++ AC_MSG_WARN([Some of required syscalls could not be found]) ++ AC_MSG_WARN([BISTRO mmap hook mode is disabled])]) ++ ++AC_CHECK_FUNCS([__curbrk], [], [], []) ++ ++# ++# tcmalloc library - for testing only ++# ++SAVE_LDFLAGS="$LDFLAGS" ++AC_CHECK_LIB([tcmalloc], [tc_malloc], ++ [have_tcmalloc=yes ++ TCMALLOC_LIB="-ltcmalloc"], ++ [have_tcmalloc=no]) ++AM_CONDITIONAL([HAVE_TCMALLOC],[test "x$have_tcmalloc" = "xyes"]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucs.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucs.m4 +index 450ec16..13d842b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucs.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucs.m4 +@@ -207,3 +207,6 @@ case ${host} in + # HW timer is supported for all other architectures + AC_DEFINE([HAVE_HW_TIMER], [1], [high-resolution hardware timer disabled]) + esac ++ ++AC_CHECK_FUNCS([__clear_cache], [], []) ++AC_CHECK_FUNCS([__aarch64_sync_cache_range], [], []) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/configure.ac b/src/mpid/ch4/netmod/ucx/ucx/configure.ac +index 6c60ecf..df15465 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/configure.ac ++++ b/src/mpid/ch4/netmod/ucx/ucx/configure.ac +@@ -9,8 +9,8 @@ + AC_PREREQ([2.63]) + + define([ucx_ver_major], 1) +-define([ucx_ver_minor], 3) +-define([ucx_ver_patch], 0) ++define([ucx_ver_minor], 5) ++define([ucx_ver_patch], 1) + define([ts], esyscmd([sh -c "date +%Y%m%d%H%M%S"])) + + # This is the API version (see libtool library versioning) +@@ -74,6 +74,7 @@ AC_PROG_LIBTOOL + AC_HEADER_STDC + LT_LIB_M + AC_C_RESTRICT ++AC_FUNC_STRERROR_R + + m4_include([config/m4/pkg.m4]) + PKG_PROG_PKG_CONFIG +@@ -117,8 +118,13 @@ AS_IF([test "x$with_docs_only" == xyes], + AM_CONDITIONAL([HAVE_MEMTRACK], [false]) + AM_CONDITIONAL([HAVE_IB], [false]) + AM_CONDITIONAL([HAVE_MLX5_HW], [false]) ++ AM_CONDITIONAL([HAVE_MLX5_HW_UD], [false]) ++ AM_CONDITIONAL([HAVE_MLX5_HW_DC], [false]) ++ AM_CONDITIONAL([HAVE_MLX5_DV], [false]) + AM_CONDITIONAL([HAVE_TL_RC], [false]) + AM_CONDITIONAL([HAVE_TL_DC], [false]) ++ AM_CONDITIONAL([HAVE_DC_DV], [false]) ++ AM_CONDITIONAL([HAVE_DC_EXP], [false]) + AM_CONDITIONAL([HAVE_TL_UD], [false]) + AM_CONDITIONAL([HAVE_TL_CM], [false]) + AM_CONDITIONAL([HAVE_IBV_EX_HW_TM], [false]) +@@ -136,6 +142,9 @@ AS_IF([test "x$with_docs_only" == xyes], + AM_CONDITIONAL([HAVE_PROFILING], [false]) + AM_CONDITIONAL([HAVE_UCM_PTMALLOC286], [false]) + AM_CONDITIONAL([HAVE_JAVA], [false]) ++ AM_CONDITIONAL([HAVE_CXX11], [false]) ++ AM_CONDITIONAL([HAVE_TCMALLOC], [false]) ++ AM_CONDITIONAL([HAVE_EXAMPLES], [false]) + ], + [ + AM_CONDITIONAL([DOCS_ONLY], [false]) +@@ -227,6 +236,15 @@ AS_IF([test "x$with_docs_only" == xyes], + # + AC_SUBST([VALGRIND_LIBPATH], [${valgrind_libpath}]) + ++ # ++ # Enable examples build ++ # ++ AC_ARG_ENABLE([examples], ++ [AC_HELP_STRING([--enable-examples], ++ [Enable examples build])], ++ [AM_CONDITIONAL([HAVE_EXAMPLES], [test "x$enable_examples" == "xyes"])], ++ [AM_CONDITIONAL([HAVE_EXAMPLES], [false])]) ++ + ]) # Docs only + + +@@ -248,6 +266,7 @@ AC_MSG_NOTICE([Supported transports: $transports]) + # Final output + # + AC_CONFIG_FILES([Makefile ++ doc/doxygen/header.tex + src/uct/api/version.h + ]) + AS_IF([test "x$with_docs_only" == xyes], [], [ +@@ -272,8 +291,10 @@ AC_CONFIG_FILES([ + src/tools/perf/Makefile + src/tools/profile/Makefile + test/apps/Makefile ++ test/apps/sockaddr/Makefile + test/examples/Makefile + test/gtest/Makefile ++ test/gtest/ucm/test_dlopen/Makefile + test/mpi/Makefile + bindings/java/src/main/native/Makefile + ]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/contrib/test_jenkins.sh b/src/mpid/ch4/netmod/ucx/ucx/contrib/test_jenkins.sh +index be57d6c..2f08588 100755 +--- a/src/mpid/ch4/netmod/ucx/ucx/contrib/test_jenkins.sh ++++ b/src/mpid/ch4/netmod/ucx/ucx/contrib/test_jenkins.sh +@@ -87,6 +87,18 @@ module_load() { + } + + # ++# try load cuda modules if nvidia driver is installed ++# ++try_load_cuda_env() { ++ num_gpus=0 ++ if [ -f "/proc/driver/nvidia/version" ]; then ++ module_load dev/cuda || true ++ module_load dev/gdrcopy || true ++ num_gpus=$(nvidia-smi -L | wc -l) ++ fi ++} ++ ++# + # Check whether this test should do a task with given index, + # according to the parallel test execution parameters. + # +@@ -169,6 +181,11 @@ prepare() { + # + build_docs() { + echo " ==== Build docs only ====" ++ # Try load newer doxygen if native is older than 1.8.11 ++ if ! (echo "1.8.11"; doxygen --version) | sort -CV ++ then ++ module_load tools/doxygen-1.8.11 || true ++ fi + ../configure --prefix=$ucx_inst --with-docs-only + $MAKE clean + $MAKE docs +@@ -208,15 +225,22 @@ build_release_pkg() { + $MAKE distcheck + + # Show UCX info +- ./src/tools/info/ucx_info -f -c -v -y -d -b -p -w -e -uart ++ ./src/tools/info/ucx_info -s -f -c -v -y -d -b -p -w -e -uart + +- set +e +- out=$(rpm -q rpm 2>/dev/null) +- rc=$? +- set -e +- rpm_based=yes +- if [[ $rc != 0 || "$out" == *"not installed"* ]]; then ++ if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then ++ rpm_based=yes ++ elif [ `cat /etc/os-release | grep -i "ubuntu\|mint"|wc -l` -gt 0 ]; then + rpm_based=no ++ else ++ # try rpm tool to detect distro ++ set +e ++ out=$(rpm -q rpm 2>/dev/null) ++ rc=$? ++ set -e ++ rpm_based=yes ++ if [[ $rc != 0 || "$out" == *"not installed"* ]]; then ++ rpm_based=no ++ fi + fi + + if [[ "$rpm_based" == "no" && -x /usr/bin/dpkg-buildpackage ]]; then +@@ -227,6 +251,16 @@ build_release_pkg() { + ../contrib/buildrpm.sh -s -b + fi + ++ # check that UCX version is present in spec file ++ cd ${WORKSPACE} ++ # extract version from configure.ac and convert to MAJOR.MINOR.PATCH representation ++ version=$(grep -P "define\S+ucx_ver" configure.ac | awk '{print $2}' | sed 's,),,' | xargs echo | tr ' ' '.') ++ if ! grep -q "$version" ucx.spec.in; then ++ echo "Current UCX version ($version) is not present in ucx.spec.in changelog" ++ exit 1 ++ fi ++ cd - ++ + $MAKE distclean + } + +@@ -235,19 +269,19 @@ build_release_pkg() { + # + build_icc() { + echo 1..1 > build_icc.tap +- if module_load intel/ics ++ if module_load intel/ics && icc -v + then + echo "==== Build with Intel compiler ====" + ../contrib/configure-devel --prefix=$ucx_inst CC=icc CXX=icpc + $MAKE clean + $MAKE + $MAKE distclean +- module unload intel/ics + echo "ok 1 - build successful " >> build_icc.tap + else + echo "==== Not building with Intel compiler ====" + echo "ok 1 - # SKIP because Coverity not installed" >> build_icc.tap + fi ++ module unload intel/ics + } + + # +@@ -255,7 +289,7 @@ build_icc() { + # + build_debug() { + echo "==== Build with --enable-debug option ====" +- ../contrib/configure-devel --prefix=$ucx_inst --enable-debug ++ ../contrib/configure-devel --prefix=$ucx_inst --enable-debug --enable-examples + $MAKE clean + $MAKE + $MAKE distclean +@@ -271,7 +305,7 @@ build_cuda() { + then + if module_load dev/gdrcopy + then +- echo "==== Build with enable cuda ====" ++ echo "==== Build with enable cuda, gdr_copy ====" + ../contrib/configure-devel --prefix=$ucx_inst --with-cuda --with-gdrcopy + $MAKE clean + $MAKE +@@ -282,12 +316,14 @@ build_cuda() { + $MAKE + $MAKE distclean + module unload dev/gdrcopy +- else +- ../contrib/configure-devel --prefix=$ucx_inst --with-cuda +- $MAKE clean +- $MAKE +- $MAKE distclean + fi ++ ++ echo "==== Build with enable cuda, w/o gdr_copy ====" ++ ../contrib/configure-devel --prefix=$ucx_inst --with-cuda --without-gdrcopy ++ $MAKE clean ++ $MAKE ++ $MAKE distclean ++ + module unload dev/cuda + echo "ok 1 - build successful " >> build_cuda.tap + else +@@ -307,6 +343,8 @@ build_clang() { + ../contrib/configure-devel --prefix=$ucx_inst CC=clang CXX=clang++ + $MAKE clean + $MAKE ++ $MAKE install ++ UCX_HANDLE_ERRORS=bt,freeze UCX_LOG_LEVEL_TRIGGER=ERROR $ucx_inst/bin/ucx_info -d + $MAKE distclean + echo "ok 1 - build successful " >> build_clang.tap + else +@@ -316,6 +354,27 @@ build_clang() { + } + + # ++# Build with gcc-latest module ++# ++build_gcc_latest() { ++ echo 1..1 > build_gcc_latest.tap ++ if module_load dev/gcc-latest ++ then ++ echo "==== Build with GCC compiler ($(gcc --version|head -1)) ====" ++ ../contrib/configure-devel --prefix=$ucx_inst ++ $MAKE clean ++ $MAKE ++ $MAKE install ++ UCX_HANDLE_ERRORS=bt,freeze UCX_LOG_LEVEL_TRIGGER=ERROR $ucx_inst/bin/ucx_info -d ++ $MAKE distclean ++ echo "ok 1 - build successful " >> build_gcc_latest.tap ++ else ++ echo "==== Not building with latest gcc compiler ====" ++ echo "ok 1 - # SKIP because dev/gcc-latest module is not available" >> build_gcc_latest.tap ++ fi ++} ++ ++# + # Build with armclang compiler + # + build_armclang() { +@@ -326,8 +385,11 @@ build_armclang() { + ../contrib/configure-devel --prefix=$ucx_inst CC=armclang CXX=armclang++ + $MAKE clean + $MAKE ++ $MAKE install ++ UCX_HANDLE_ERRORS=bt,freeze UCX_LOG_LEVEL_TRIGGER=ERROR $ucx_inst/bin/ucx_info -d + $MAKE distclean + echo "ok 1 - build successful " >> build_armclang.tap ++ module unload arm-compiler/latest + else + echo "==== Not building with armclang compiler ====" + echo "ok 1 - # SKIP because armclang not installed" >> build_armclang.tap +@@ -356,8 +418,8 @@ run_hello() { + if [ ! -x ${test_name} ] + then + gcc -o ${test_name} ${ucx_inst}/share/ucx/examples/${test_name}.c \ +- -l${api} -lucs -I${ucx_inst}/include -L${ucx_inst}/lib \ +- -Wl,-rpath=${ucx_inst}/lib ++ -l${api} -lucs -I${ucx_inst}/include -L${ucx_inst}/lib \ ++ -Wl,-rpath=${ucx_inst}/lib + fi + + # set smaller timeouts so the test will complete faster +@@ -374,7 +436,7 @@ run_hello() { + ./${test_name} ${test_args} -p ${tcp_port} & + hw_server_pid=$! + +- sleep 5 ++ sleep 15 + + # temporary disable + if [[ ${test_args} == *"-e"* ]] +@@ -405,6 +467,11 @@ run_hello() { + # Compile and run UCP hello world example + # + run_ucp_hello() { ++ if ./src/tools/info/ucx_info -e -u twe|grep ERROR ++ then ++ return # skip if cannot create ucp ep ++ fi ++ + for test_mode in -w -f -b -e + do + echo "==== Running UCP hello world with mode ${test_mode} ====" +@@ -417,17 +484,87 @@ run_ucp_hello() { + # Compile and run UCT hello world example + # + run_uct_hello() { +- for ucx_dev in $(get_active_ib_devices) ++ for send_func in -i -b -z + do +- for send_func in -i -b -z ++ for ucx_dev in $(get_active_ib_devices) + do +- echo "==== Running UCT hello world server on ${ucx_dev} with sending ${send_func} ====" +- run_hello uct -d ${ucx_dev} -t "rc" ++ echo "==== Running UCT hello world server on rc/${ucx_dev} with sending ${send_func} ====" ++ run_hello uct -d ${ucx_dev} -t "rc" ${send_func} ++ done ++ for ucx_dev in $(ip addr | awk '/state UP/ {print $2}' | sed s/://) ++ do ++ echo "==== Running UCT hello world server on tcp/${ucx_dev} with sending ${send_func} ====" ++ run_hello uct -d ${ucx_dev} -t "tcp" ${send_func} + done + done + rm -f ./uct_hello_world + } + ++run_client_server() { ++ ++ test_name=ucp_client_server ++ ++ if [ ! -x ${test_name} ] ++ then ++ gcc -o ${test_name} ${ucx_inst}/share/ucx/examples/${test_name}.c \ ++ -lucp -lucs -I${ucx_inst}/include -L${ucx_inst}/lib \ ++ -Wl,-rpath=${ucx_inst}/lib ++ fi ++ ++ iface=`ibdev2netdev | grep Up | awk '{print $5}' | head -1` ++ if [ -n "$iface" ] ++ then ++ server_ip=`ip addr show ${iface} | awk '/inet /{print $2}' | awk -F '/' '{print $1}'` ++ fi ++ ++ if [ -z "$server_ip" ] ++ then ++ # if there is no inet (IPv4) address, bail ++ return ++ fi ++ ++ ibdev=`ibdev2netdev | grep $iface | awk '{print $1}'` ++ node_guid=`cat /sys/class/infiniband/$ibdev/node_guid` ++ if [ $node_guid == "0000:0000:0000:0000" ] ++ then ++ return ++ fi ++ ++ server_port=$((10000 + EXECUTOR_NUMBER)) ++ ++ # run server side ++ ./${test_name} -p ${server_port} & ++ hw_server_pid=$! ++ ++ sleep 15 ++ ++ # need to be ran in background to reflect application PID in $! ++ ./${test_name} -a ${server_ip} -p ${server_port} & ++ hw_client_pid=$! ++ ++ wait ${hw_client_pid} ++ kill -9 ${hw_server_pid} ++} ++ ++run_ucp_client_server() { ++ ++ if [ ! -r /dev/infiniband/rdma_cm ] ++ then ++ return ++ fi ++ ++ ret=`which ibdev2netdev` ++ if [ -z "$ret" ] ++ then ++ return ++ fi ++ ++ echo "==== Running UCP client-server ====" ++ run_client_server ++ ++ rm -f ./ucp_client_server ++} ++ + # + # Run UCX performance test with MPI + # +@@ -465,9 +602,15 @@ run_ucx_perftest_mpi() { + # run cuda tests + if (lsmod | grep -q "nv_peer_mem") && (lsmod | grep -q "gdrdrv") + then ++ export CUDA_VISIBLE_DEVICES=$(($worker%$num_gpus)),$(($(($worker+1))%$num_gpus)) + cat $ucx_inst_ptest/test_types | grep cuda | sort -R > $ucx_inst_ptest/test_types_short + echo "==== Running ucx_perf with cuda memory====" +- $MPIRUN -np 2 -x UCX_TLS=rc,cuda_copy,gdr_copy $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 -x UCX_TLS=rc,cuda_copy,gdr_copy -x UCX_MEMTYPE_CACHE=y $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 -x UCX_TLS=rc,cuda_copy,gdr_copy -x UCX_MEMTYPE_CACHE=n $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 -x UCX_TLS=rc,cuda_copy $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 -x UCX_TLS=self,mm,cma,cuda_copy $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 $AFFINITY $UCX_PERFTEST ++ unset CUDA_VISIBLE_DEVICES + fi + } + +@@ -475,7 +618,7 @@ run_ucx_perftest_mpi() { + # Test malloc hooks with mpi + # + test_malloc_hooks_mpi() { +- for tname in malloc_hooks external_events flag_no_install ++ for tname in malloc_hooks malloc_hooks_unmapped external_events flag_no_install + do + echo "==== Running memory hook (${tname}) on MPI ====" + $MPIRUN -np 1 $AFFINITY ./test/mpi/test_memhooks -t $tname +@@ -492,26 +635,23 @@ test_malloc_hooks_mpi() { + # + run_mpi_tests() { + echo "1..2" > mpi_tests.tap +- +- #load cuda modules if available +- module_load dev/cuda || true +- module_load dev/gdrcopy || true +- + if module_load hpcx-gcc + then ++ # Prevent our tests from using UCX libraries from hpcx module by prepending ++ # our local library path first ++ export LD_LIBRARY_PATH=${ucx_inst}/lib:$LD_LIBRARY_PATH ++ + ../contrib/configure-release --prefix=$ucx_inst --with-mpi # TODO check in -devel mode as well + $MAKE clean + $MAKE install + $MAKE installcheck # check whether installation is valid (it compiles examples at least) + +- # Prevent our tests from using installed UCX libraries +- export LD_LIBRARY_PATH=${ucx_inst}/lib:$LD_LIBRARY_PATH +- + MPIRUN="mpirun \ + -x UCX_ERROR_SIGNALS \ + -x UCX_HANDLE_ERRORS \ + -mca pml ob1 \ +- -mca btl vader,self \ ++ -mca btl tcp,self \ ++ -mca btl_tcp_if_include lo \ + -mca coll ^hcoll,ml" + + run_ucx_perftest_mpi +@@ -533,22 +673,58 @@ run_mpi_tests() { + # Test profiling infrastructure + # + test_profiling() { +- echo "==== Running profiling test ====" +- UCX_PROFILE_MODE=log UCX_PROFILE_FILE=ucx_jenkins.prof ./test/apps/test_profiling ++ echo "==== Running profiling example ====" ++ ++ # configure release mode, application profiling should work ++ ../contrib/configure-release --prefix=$ucx_inst ++ $MAKE clean ++ $MAKE ++ ++ # compile the profiling example code ++ gcc -o ucx_profiling ${ucx_inst}/share/ucx/examples/ucx_profiling.c \ ++ -lm -lucs -I${ucx_inst}/include -L${ucx_inst}/lib -Wl,-rpath=${ucx_inst}/lib ++ ++ UCX_PROFILE_MODE=log UCX_PROFILE_FILE=ucx_jenkins.prof ./ucx_profiling + + UCX_READ_PROFILE=${ucx_inst}/bin/ucx_read_profile + $UCX_READ_PROFILE -r ucx_jenkins.prof | grep "printf" -C 20 + $UCX_READ_PROFILE -r ucx_jenkins.prof | grep -q "calc_pi" + $UCX_READ_PROFILE -r ucx_jenkins.prof | grep -q "print_pi" ++} ++ ++test_dlopen() { ++ ../contrib/configure-release --prefix=$ucx_inst ++ $MAKE clean ++ $MAKE + + echo "==== Running dlopen test ====" +- strace ./test/apps/test_profiling &> strace.log ++ strace ./ucx_profiling &> strace.log + ! grep '^socket' strace.log ++} ++ ++test_memtrack() { ++ ../contrib/configure-devel --prefix=$ucx_inst ++ $MAKE clean ++ $MAKE + + echo "==== Running memtrack test ====" + UCX_MEMTRACK_DEST=stdout ./test/gtest/gtest --gtest_filter=test_memtrack.sanity + } + ++test_unused_env_var() { ++ # We must create a UCP worker to get the warning about unused variables ++ echo "==== Running ucx_info env vars test ====" ++ UCX_IB_PORTS=mlx5_0:1 ./src/tools/info/ucx_info -epw -u t | grep "unused" | grep -q "UCX_IB_PORTS" ++} ++ ++test_malloc_hook() { ++ echo "==== Running malloc hooks test ====" ++ if [ -x ./test/apps/test_tcmalloc ] ++ then ++ ./test/apps/test_tcmalloc ++ fi ++} ++ + # + # Run Coverity and report errors + # +@@ -567,7 +743,11 @@ run_coverity() { + rc=$(($rc+$nerrors)) + + index_html=$(cd $cov_build && find . -name index.html | cut -c 3-) +- cov_url="$WS_URL/$cov_build_id/${index_html}" ++ if [ -z "$BUILD_URL" ]; then ++ cov_url="${WS_URL}/${cov_build_id}/${index_html}" ++ else ++ cov_url="${BUILD_URL}/artifact/${cov_build_id}/${index_html}" ++ fi + rm -f jenkins_sidelinks.txt + if [ $nerrors -gt 0 ]; then + cov-format-errors --dir $cov_build --emacs-style +@@ -589,14 +769,12 @@ run_coverity() { + + # + # Run the test suite (gtest) ++# Arguments: [configure-flags] + # + run_gtest() { +- +- #load cuda modules if available +- module_load dev/cuda || true +- module_load dev/gdrcopy || true +- +- ../contrib/configure-devel --prefix=$ucx_inst ++ compiler_name=$1 ++ shift ++ ../contrib/configure-devel --prefix=$ucx_inst $@ + $MAKE clean + $MAKE + +@@ -607,6 +785,10 @@ run_gtest() { + export GTEST_TAP=2 + export GTEST_REPORT_DIR=$WORKSPACE/reports/tap + ++ if [ $num_gpus -gt 0 ]; then ++ export CUDA_VISIBLE_DEVICES=$(($worker%$num_gpus)) ++ fi ++ + GTEST_EXTRA_ARGS="" + if [ "$JENKINS_TEST_PERF" == 1 ] + then +@@ -617,11 +799,11 @@ run_gtest() { + + mkdir -p $GTEST_REPORT_DIR + +- echo "==== Running unit tests ====" ++ echo "==== Running unit tests, $compiler_name compiler ====" + $AFFINITY $TIMEOUT make -C test/gtest test + (cd test/gtest && rename .tap _gtest.tap *.tap && mv *.tap $GTEST_REPORT_DIR) + +- echo "==== Running malloc hooks mallopt() test ====" ++ echo "==== Running malloc hooks mallopt() test, $compiler_name compiler ====" + # gtest returns with non zero exit code if there were no + # tests to run. As a workaround run a single test on every + # shard. +@@ -635,7 +817,7 @@ run_gtest() { + make -C test/gtest test + (cd test/gtest && rename .tap _mallopt_gtest.tap malloc_hook_cplusplus.tap && mv *.tap $GTEST_REPORT_DIR) + +- echo "==== Running malloc hooks mmap_ptrs test with MMAP_THRESHOLD=16384 ====" ++ echo "==== Running malloc hooks mmap_ptrs test with MMAP_THRESHOLD=16384, $compiler_name compiler ====" + $AFFINITY $TIMEOUT \ + env MALLOC_MMAP_THRESHOLD_=16384 \ + GTEST_SHARD_INDEX=0 \ +@@ -646,7 +828,7 @@ run_gtest() { + + if ! [[ $(uname -m) =~ "aarch" ]] && ! [[ $(uname -m) =~ "ppc" ]] + then +- echo "==== Running valgrind tests ====" ++ echo "==== Running valgrind tests, $compiler_name compiler ====" + + # Load newer valgrind if naative is older than 3.10 + if ! (echo "valgrind-3.10.0"; valgrind --version) | sort -CV +@@ -654,17 +836,34 @@ run_gtest() { + module load tools/valgrind-latest + fi + +- export VALGRIND_EXTRA_ARGS="--xml=yes --xml-file=valgrind.xml --child-silent-after-fork=yes" ++ export VALGRIND_EXTRA_ARGS="--xml=yes --xml-file=valgrind.xml --child-silent-after-fork=yes --gen-suppressions=all" + $AFFINITY $TIMEOUT_VALGRIND make -C test/gtest test_valgrind + (cd test/gtest && rename .tap _vg.tap *.tap && mv *.tap $GTEST_REPORT_DIR) + module unload tools/valgrind-latest + else +- echo "==== Not running valgrind tests ====" ++ echo "==== Not running valgrind tests with $compiler_name compiler ====" + echo "1..1" > vg_skipped.tap + echo "ok 1 - # SKIP because running on $(uname -m)" >> vg_skipped.tap + fi + } + ++run_gtest_default() { ++ run_gtest "default" ++} ++ ++run_gtest_armclang() { ++ if module_load arm-compiler/arm-hpc-compiler && armclang -v ++ then ++ run_gtest "armclang" CC=armclang CXX=armclang++ ++ else ++ echo "==== Not running with armclang compiler ====" ++ echo "1..1" > armclang_skipped.tap ++ echo "ok 1 - # SKIP because armclang not found" >> armclang_skipped.tap ++ fi ++ module unload arm-compiler/arm-hpc-compiler ++} ++ ++ + # + # Run the test suite (gtest) in release configuration + # +@@ -715,6 +914,7 @@ run_tests() { + do_distributed_task 2 4 build_cuda + do_distributed_task 3 4 build_clang + do_distributed_task 0 4 build_armclang ++ do_distributed_task 1 4 build_gcc_latest + + # all are running mpi tests + run_mpi_tests +@@ -727,16 +927,23 @@ run_tests() { + + do_distributed_task 1 4 run_ucp_hello + do_distributed_task 2 4 run_uct_hello ++ do_distributed_task 1 4 run_ucp_client_server + do_distributed_task 3 4 test_profiling ++ do_distributed_task 3 4 test_dlopen ++ do_distributed_task 3 4 test_memtrack ++ do_distributed_task 0 4 test_unused_env_var ++ do_distributed_task 1 3 test_malloc_hook + + # all are running gtest +- run_gtest ++ run_gtest_default ++ run_gtest_armclang + + do_distributed_task 3 4 run_coverity + do_distributed_task 0 4 run_gtest_release + } + + prepare ++try_load_cuda_env + do_distributed_task 0 4 build_docs + do_distributed_task 0 4 build_disable_numa + do_distributed_task 1 4 build_no_verbs +diff --git a/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/README b/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/README +index 7e092e0..47d88ad 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/README ++++ b/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/README +@@ -1,3 +1,3 @@ + This is an example of the "batch" configuration files for ucx_perftest. + The files are passed as an input parameter to the ucx_pertest benchmark: +-ucx_perftest --batch msg_pow2 --batch test_types --batch transports <...> ++ucx_perftest -b msg_pow2 -b test_types -b transports <...> +diff --git a/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/test_types b/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/test_types +index 36f1dd7..a89ca1d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/test_types ++++ b/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/test_types +@@ -32,7 +32,7 @@ ucp_iov_iov_tag_bw -t tag_bw -D iov,iov + ucp_contig_contig_tag_bw -t tag_bw -D contig,contig + #IOV with RNDV is not yet supported + #ucp_contig_iov_tag_bw -t tag_bw -D contig,iov +-ucp_sync_tag_lat -t tag_lat_sync ++ucp_sync_tag_lat -t tag_sync_lat + ucp_unexp_tag_lat -t tag_lat -U + ucp_wild_tag_lat -t tag_lat -C + ucp_contig_stream_bw -t stream_bw -r recv_data +@@ -42,4 +42,8 @@ ucp_contig_stream_lat -t stream_lat -r recv + #CUDA + ucp_contig_contig_cuda_tag_lat -t tag_lat -D contig,contig -m cuda + ucp_contig_contig_cuda_tag_bw -t tag_bw -D contig,contig -m cuda ++ucp_contig_cuda_stream_bw -t stream_bw -r recv_data -m cuda ++ucp_contig_cuda_stream_lat -t stream_lat -r recv_data -m cuda ++ucp_contig_cuda_stream_bw -t stream_bw -r recv -m cuda ++ucp_contig_cuda_stream_lat -t stream_lat -r recv -m cuda + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/contrib/valgrind.supp b/src/mpid/ch4/netmod/ucx/ucx/contrib/valgrind.supp +index c6f0737..1f9bdc5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/contrib/valgrind.supp ++++ b/src/mpid/ch4/netmod/ucx/ucx/contrib/valgrind.supp +@@ -75,8 +75,72 @@ + fun:gdr_copy_to_bar + } + { ++ gdr_copy_cond_1 ++ Memcheck:Cond ++ ... ++ fun:gdr_copy_from_bar ++} ++{ + gdr_copy_value8 + Memcheck:Value8 + ... + fun:gdr_copy_to_bar + } ++{ ++ gdr_copy_value8_1 ++ Memcheck:Value8 ++ ... ++ fun:gdr_copy_from_bar ++} ++{ ++ ibv_exp_reg_mr ++ Memcheck:Param ++ write(buf) ++ ... ++ fun:ibv_exp_reg_mr ++} ++{ ++ ibv_exp_free_dm ++ Memcheck:Param ++ write(buf) ++ ... ++ fun:ibv_exp_free_dm ++} ++{ ++ ibv_exp_cmd_free_dm ++ Memcheck:Param ++ write(buf) ++ ... ++ fun:ibv_exp_cmd_free_dm ++} ++{ ++ res_domain_leak ++ Memcheck:Leak ++ ... ++ fun:ibv_exp_create_res_domain ++} ++{ ++ ibverbs_get_device_list ++ Memcheck:Leak ++ ... ++ fun:ibverbs_get_device_list ++} ++{ ++ fix_dereg_mr ++ Memcheck:Cond ++ ... ++ fun:ibv_dereg_mr@@IBVERBS_1.1 ++} ++{ ++ exp_query_device_cond ++ Memcheck:Cond ++ fun:ibv_exp_cmd_query_device ++} ++{ ++ ucma_init_device ++ Memcheck:Leak ++ match-leak-kinds: possible ++ ... ++ fun:ucma_init_device ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.dox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.dox +deleted file mode 100644 +index 9e0ff9f..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.dox ++++ /dev/null +@@ -1,27 +0,0 @@ +-/* +- * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-/** +- * @page Conventions Conventions and Notations +- * This section describes the conventions and notations in the UCX specification. +- * +- * \section Blocking Blocking Behavior +- * The blocking UCX routines return only when an UCX operation is complete. +- * After the return, the resources used in the UCX routine are available +- * for reuse. +- * +- * \section Non-blocking Non-blocking Behavior +- * The non-blocking UCX routines return immediately, independent of operation +- * completion. After the return, the resources used for the routines are not +- * necessarily available for reuse. +- * +- * \section Fairness Fairness +- * UCX routines do not guarantee fairness. However, the routines +- * enable UCX consumers to write efficient and fair programs. +- * +- * \section Interaction with Signal Handler Functions +- * If UCX routines are invoked from signal a handler function, +- * the behavior of the program is undefined. +- */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.md b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.md +new file mode 100644 +index 0000000..0736181 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.md +@@ -0,0 +1,22 @@ ++Conventions and Notations ++========================= ++ ++This section describes the conventions and notations in the UCX specification. ++ ++\section Blocking Blocking Behavior ++The blocking UCX routines return only when an UCX operation is complete. ++After the return, the resources used in the UCX routine are available ++for reuse. ++ ++\section Non-blocking Non-blocking Behavior ++The non-blocking UCX routines return immediately, independent of operation ++completion. After the return, the resources used for the routines are not ++necessarily available for reuse. ++ ++\section Fairness Fairness ++UCX routines do not guarantee fairness. However, the routines ++enable UCX consumers to write efficient and fair programs. ++ ++\section Interaction with Signal Handler Functions ++If UCX routines are invoked from signal a handler function, ++the behavior of the program is undefined. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.dox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.dox +deleted file mode 100644 +index 6cd844c..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.dox ++++ /dev/null +@@ -1,105 +0,0 @@ +-/* +- * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-/** +- * \page Design +- * +- * The UCX framework consists of the three main components: UC-Services (UCS), +- * UC-Transports (UCT), and UC-Protocols (UCP). Each one of these components +- * exports a public API, and can be used as a stand-alone library. +- * +- * \image latex Architecture.pdf "UCX Framework Architecture" +- * \image html Architecture.png "UCX Framework Architecture" +- * +- * \section UCS +- * UCS is a service layer that provides the necessary functionality for +- * implementing portable and efficient utilities. This layer includes the +- * following services: +- * + an abstraction for accessing platform specific functionality (atomic operations, thread safety, etc.), +- * + tools for efficient memory management (memory pools, memory allocators, and memory allocators hooks), +- * + commonly used data structures (hashes, trees, lists). +- * +- * \section UCT +- * UCT is a transport layer that abstracts +- * the differences across various hardware architectures and provides a +- * low-level API that enables the implementation of communication protocols. +- * The primary goal of the layer is to provide direct and efficient access to +- * hardware network functionality. For this purpose, +- * UCT relies on vendor provided low-level drivers such as InfiniBand +- * Verbs, Cray’s uGNI, libfabrics, etc. In addition, the layer provides +- * constructs for communication context management (thread-based and application level), and +- * allocation and management of device-specific memories including those found +- * in accelerators. In terms of communication APIs, UCT defines interfaces for +- * immediate (short), buffered copy-and-send (bcopy), and zero-copy (zcopy) +- * communication operations. +- * +- * \b Short: This type of operation is optimized for small messages that can be posted and completed +- * in place @anchor uct_short_protocol_desc. +- * +- * \b Bcopy: This type of operation is optimized for medium size messages that are typically sent through a +- * so-called bouncing-buffer. This auxiliary buffer is typically allocated given network constraints and ready for +- * immediate utilization by the hardware. Since a custom data packing routine could be provided, this method +- * can be used for non-contiguos i/o @anchor uct_bcopy_protocol_desc. +- * +- * \b Zcopy: This type of operation exposes zero-copy memory-to-memory communication semantics, which means that +- * message is sent directly from user buffer, or received directly to user buffer, without being copied between +- * the network layers @anchor uct_zcopy_protocol_desc. +- * +- * \section UCP +- * UCP implements higher-level protocols that are typically used by message passing (MPI) +- * and PGAS programming models by using lower-level capabilities exposed +- * through the UCT layer. UCP is provides the following functionality: ability to select different transports for +- * communication, message fragmentation, multi-rail communication, and initializing and finalizing +- * the library. +- * Currently, the API has the following classes of interfaces: +- * Initialization, Remote Memory Access (RMA) communication, Atomic Memory +- * Operations (AMO), Active Message, Tag-Matching, and Collectives. +- * +- * \b Initialization: This subset of interfaces defines the communication +- * context setup, queries the network capabilities, and initializes the local +- * communication endpoints. The context represented by the UCX context is an +- * abstraction of the network transport resources. The communication endpoint +- * setup interfaces initialize the UCP endpoint, which is an abstraction of all +- * the necessary resources associated with a particular connection. The +- * communication endpoints are used as input to all communication operations to +- * describe the source and destination of the communication. +- * +- * \b RMA: This subset of interfaces defines one-sided communication operations such as PUT and +- * GET, required for implementing low overhead, direct memory access communications +- * constructs needed by both distributed and shared memory +- * programming models. UCP includes a separate set of interfaces for +- * communicating non-contiguous data. This functionality was included to +- * support various programming models’ communication requirements and leverage +- * the scatter/gather capabilities of modern network hardware. +- * +- * \b AMO: This subset of interfaces provides support for atomically performing operations +- * on the remote memory, an important class of operations for PGAS +- * programming models, particularly OpenSHMEM. +- * +- * \b Tag \b Matching: This interface supports tag-matching for send-receive semantics which is a key +- * communication semantic defined by the MPI specification. +- * +- * \b Stream : The API provides order and reliable communication semantics. +- * Data is treated as an ordered sequence of bytes pushed through the connection. +- * In contrast of tag-matching interface, the size of each individual send does +- * not necessarily have to match the size of each individual receive, as long as +- * the total number of bytes is the same. This API is designed to match widely +- * used BSD-socket based programming models. +- * +- * \b Active \b Message: A subset of functionality where the incoming packet invokes a +- * sender-specified callback in order to be processed by the receiving process. +- * As an example, the two-sided MPI interface can easily be implemented on top +- * of such a concept (TBD: cite openmpi ). However, these interfaces are more general and +- * suited for other programming paradigms where the receiver process does not +- * prepost receives, but expects to react to incoming packets directly. Like +- * RMA and tag-matching interfaces, the active message interface provides +- * separate APIs for different message types and non-contiguous data. +- * +- * \b Collectives: This subset of interfaces defines group com- munication and +- * synchronization operations. The collective operations include Barrier, +- * All-to-one, All-to-all, and reduction operations. When possible, we will +- * take advantage of hardware acceleration for collectives +- * (e.g., InfiniBand Switch collective acceleration). +- */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.md b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.md +new file mode 100644 +index 0000000..1c7911f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.md +@@ -0,0 +1,100 @@ ++Design ++====== ++ ++The UCX framework consists of the three main components: UC-Services (UCS), ++UC-Transports (UCT), and UC-Protocols (UCP). Each one of these components ++exports a public API, and can be used as a stand-alone library. ++ ++\image latex Architecture.pdf "UCX Framework Architecture" ++\image html Architecture.png "UCX Framework Architecture" ++ ++\section UCS ++UCS is a service layer that provides the necessary functionality for ++implementing portable and efficient utilities. This layer includes the ++following services: +++ an abstraction for accessing platform specific functionality (atomic operations, thread safety, etc.), +++ tools for efficient memory management (memory pools, memory allocators, and memory allocators hooks), +++ commonly used data structures (hashes, trees, lists). ++ ++\section UCT ++UCT is a transport layer that abstracts ++the differences across various hardware architectures and provides a ++low-level API that enables the implementation of communication protocols. ++The primary goal of the layer is to provide direct and efficient access to ++hardware network functionality. For this purpose, ++UCT relies on vendor provided low-level drivers such as InfiniBand ++Verbs, Cray's uGNI, libfabrics, etc. In addition, the layer provides ++constructs for communication context management (thread-based and application level), and ++allocation and management of device-specific memories including those found ++in accelerators. In terms of communication APIs, UCT defines interfaces for ++immediate (short), buffered copy-and-send (bcopy), and zero-copy (zcopy) ++communication operations. ++ ++\b Short: This type of operation is optimized for small messages that can be posted and completed ++in place @anchor uct_short_protocol_desc. ++ ++\b Bcopy: This type of operation is optimized for medium size messages that are typically sent through a ++so-called bouncing-buffer. This auxiliary buffer is typically allocated given network constraints and ready for ++immediate utilization by the hardware. Since a custom data packing routine could be provided, this method ++can be used for non-contiguos i/o @anchor uct_bcopy_protocol_desc. ++ ++\b Zcopy: This type of operation exposes zero-copy memory-to-memory communication semantics, which means that ++message is sent directly from user buffer, or received directly to user buffer, without being copied between ++the network layers @anchor uct_zcopy_protocol_desc. ++ ++\section UCP ++UCP implements higher-level protocols that are typically used by message passing (MPI) ++and PGAS programming models by using lower-level capabilities exposed ++through the UCT layer. UCP is provides the following functionality: ability to select different transports for ++communication, message fragmentation, multi-rail communication, and initializing and finalizing ++the library. ++Currently, the API has the following classes of interfaces: ++Initialization, Remote Memory Access (RMA) communication, Atomic Memory ++Operations (AMO), Active Message, Tag-Matching, and Collectives. ++ ++\b Initialization: This subset of interfaces defines the communication ++context setup, queries the network capabilities, and initializes the local ++communication endpoints. The context represented by the UCX context is an ++abstraction of the network transport resources. The communication endpoint ++setup interfaces initialize the UCP endpoint, which is an abstraction of all ++the necessary resources associated with a particular connection. The ++communication endpoints are used as input to all communication operations to ++describe the source and destination of the communication. ++ ++\b RMA: This subset of interfaces defines one-sided communication operations such as PUT and ++GET, required for implementing low overhead, direct memory access communications ++constructs needed by both distributed and shared memory ++programming models. UCP includes a separate set of interfaces for ++communicating non-contiguous data. This functionality was included to ++support various programming models' communication requirements and leverage ++the scatter/gather capabilities of modern network hardware. ++ ++\b AMO: This subset of interfaces provides support for atomically performing operations ++on the remote memory, an important class of operations for PGAS ++programming models, particularly OpenSHMEM. ++ ++\b Tag \b Matching: This interface supports tag-matching for send-receive semantics which is a key ++communication semantic defined by the MPI specification. ++ ++\b Stream : The API provides order and reliable communication semantics. ++Data is treated as an ordered sequence of bytes pushed through the connection. ++In contrast of tag-matching interface, the size of each individual send does ++not necessarily have to match the size of each individual receive, as long as ++the total number of bytes is the same. This API is designed to match widely ++used BSD-socket based programming models. ++ ++\b Active \b Message: A subset of functionality where the incoming packet invokes a ++sender-specified callback in order to be processed by the receiving process. ++As an example, the two-sided MPI interface can easily be implemented on top ++of such a concept (TBD: cite openmpi ). However, these interfaces are more general and ++suited for other programming paradigms where the receiver process does not ++prepost receives, but expects to react to incoming packets directly. Like ++RMA and tag-matching interfaces, the active message interface provides ++separate APIs for different message types and non-contiguous data. ++ ++\b Collectives: This subset of interfaces defines group com- munication and ++synchronization operations. The collective operations include Barrier, ++All-to-one, All-to-all, and reduction operations. When possible, we will ++take advantage of hardware acceleration for collectives ++(e.g., InfiniBand Switch collective acceleration). ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex +deleted file mode 100644 +index af58b39..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex ++++ /dev/null +@@ -1,143 +0,0 @@ +-% Latex header for doxygen 1.8.9.1 +-\documentclass[twoside]{book} +- +-% Packages required by doxygen +-\usepackage{fixltx2e} +-\usepackage{calc} +-\usepackage{doxygen} +-\usepackage[export]{adjustbox} % also loads graphicx +-\usepackage{graphicx} +-\usepackage[utf8]{inputenc} +-\usepackage{makeidx} +-\usepackage{multicol} +-\usepackage{multirow} +-\PassOptionsToPackage{warn}{textcomp} +-\usepackage{textcomp} +-\usepackage[nointegrals]{wasysym} +-\usepackage[table]{xcolor} +- +-% Font selection +-\usepackage[T1]{fontenc} +-\usepackage[scaled=.90]{helvet} +-\usepackage{courier} +-\usepackage{amssymb} +-\usepackage{sectsty} +-\renewcommand{\familydefault}{\sfdefault} +-\allsectionsfont{% +- \fontseries{bc}\selectfont% +- \color{darkgray}% +-} +-\renewcommand{\DoxyLabelFont}{% +- \fontseries{bc}\selectfont% +- \color{darkgray}% +-} +-\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} +- +-% Page & text layout +-\usepackage{geometry} +-\geometry{% +- a4paper,% +- top=2.5cm,% +- bottom=2.5cm,% +- left=2.5cm,% +- right=2.5cm% +-} +-\tolerance=750 +-\hfuzz=15pt +-\hbadness=750 +-\setlength{\emergencystretch}{15pt} +-\setlength{\parindent}{0cm} +-\setlength{\parskip}{0.2cm} +-\makeatletter +-\renewcommand{\paragraph}{% +- \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% +- \normalfont\normalsize\bfseries\SS@parafont% +- }% +-} +-\renewcommand{\subparagraph}{% +- \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% +- \normalfont\normalsize\bfseries\SS@subparafont% +- }% +-} +-\makeatother +- +-% Headers & footers +-\usepackage{fancyhdr} +-\pagestyle{fancyplain} +-\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}} +-\fancyhead[CE]{\fancyplain{}{}} +-\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}} +-\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}} +-\fancyhead[CO]{\fancyplain{}{}} +-\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}} +-\fancyfoot[LE]{\fancyplain{}{}} +-\fancyfoot[CE]{\fancyplain{}{}} +-\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize \textcircled{c} 2015 Unified Communication X (UCX). All rights reserved. }} +-\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize \textcircled{c} 2015 Unified Communication X (UCX). All rights reserved. }} +-\fancyfoot[CO]{\fancyplain{}{}} +-\fancyfoot[RO]{\fancyplain{}{}} +-\renewcommand{\footrulewidth}{0.4pt} +-\renewcommand{\chaptermark}[1]{% +- \markboth{#1}{}% +-} +-\renewcommand{\sectionmark}[1]{% +- \markright{\thesection\ #1}% +-} +- +-% Indices & bibliography +-\usepackage{natbib} +-\usepackage[titles]{tocloft} +-\setcounter{tocdepth}{3} +-\setcounter{secnumdepth}{5} +-\makeindex +- +-% Hyperlinks (required, but should be loaded last) +-\usepackage{ifpdf} +-\ifpdf +- \usepackage[pdftex,pagebackref=true]{hyperref} +-\else +- \usepackage[ps2pdf,pagebackref=true]{hyperref} +-\fi +-\hypersetup{% +- colorlinks=true,% +- linkcolor=blue,% +- citecolor=blue,% +- unicode% +-} +- +-% Custom commands +-\newcommand{\clearemptydoublepage}{% +- \newpage{\pagestyle{empty}\cleardoublepage}% +-} +- +- +-%===== C O N T E N T S ===== +- +-\begin{document} +- +-% Titlepage & ToC +-\hypersetup{pageanchor=false, +- bookmarks=true, +- bookmarksnumbered=true, +- pdfencoding=unicode +- } +-\pagenumbering{roman} +-\begin{titlepage} +-\vspace*{7cm} +-\begin{center}% +- {\Large Unified Communication X (UCX)}\\ +-\vspace*{0.5cm} +-{\large API Standard}\\ +-{\small Version 1.3}\\ +-\vspace*{0.5cm} +-\includegraphics[width=6cm]{UCX_Logo_930x933.png} +-\vspace*{0.5cm} +-\end{center} +-\end{titlepage} +-\clearemptydoublepage +-\tableofcontents +-\clearemptydoublepage +-\pagenumbering{arabic} +-\hypersetup{pageanchor=true} +- +-%--- Begin generated contents --- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex.in b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex.in +new file mode 100644 +index 0000000..4604087 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex.in +@@ -0,0 +1,143 @@ ++% Latex header for doxygen 1.8.9.1 ++\documentclass[twoside]{book} ++ ++% Packages required by doxygen ++\usepackage{fixltx2e} ++\usepackage{calc} ++\usepackage{doxygen} ++\usepackage[export]{adjustbox} % also loads graphicx ++\usepackage{graphicx} ++\usepackage[utf8]{inputenc} ++\usepackage{makeidx} ++\usepackage{multicol} ++\usepackage{multirow} ++\PassOptionsToPackage{warn}{textcomp} ++\usepackage{textcomp} ++\usepackage[nointegrals]{wasysym} ++\usepackage[table]{xcolor} ++ ++% Font selection ++\usepackage[T1]{fontenc} ++\usepackage[scaled=.90]{helvet} ++\usepackage{courier} ++\usepackage{amssymb} ++\usepackage{sectsty} ++\renewcommand{\familydefault}{\sfdefault} ++\allsectionsfont{% ++ \fontseries{bc}\selectfont% ++ \color{darkgray}% ++} ++\renewcommand{\DoxyLabelFont}{% ++ \fontseries{bc}\selectfont% ++ \color{darkgray}% ++} ++\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} ++ ++% Page & text layout ++\usepackage{geometry} ++\geometry{% ++ a4paper,% ++ top=2.5cm,% ++ bottom=2.5cm,% ++ left=2.5cm,% ++ right=2.5cm% ++} ++\tolerance=750 ++\hfuzz=15pt ++\hbadness=750 ++\setlength{\emergencystretch}{15pt} ++\setlength{\parindent}{0cm} ++\setlength{\parskip}{0.2cm} ++\makeatletter ++\renewcommand{\paragraph}{% ++ \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% ++ \normalfont\normalsize\bfseries\SS@parafont% ++ }% ++} ++\renewcommand{\subparagraph}{% ++ \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% ++ \normalfont\normalsize\bfseries\SS@subparafont% ++ }% ++} ++\makeatother ++ ++% Headers & footers ++\usepackage{fancyhdr} ++\pagestyle{fancyplain} ++\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}} ++\fancyhead[CE]{\fancyplain{}{}} ++\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}} ++\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}} ++\fancyhead[CO]{\fancyplain{}{}} ++\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}} ++\fancyfoot[LE]{\fancyplain{}{}} ++\fancyfoot[CE]{\fancyplain{}{}} ++\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize \textcircled{c} \the\year\space Unified Communication X (UCX). All rights reserved. }} ++\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize \textcircled{c} \the\year\space Unified Communication X (UCX). All rights reserved. }} ++\fancyfoot[CO]{\fancyplain{}{}} ++\fancyfoot[RO]{\fancyplain{}{}} ++\renewcommand{\footrulewidth}{0.4pt} ++\renewcommand{\chaptermark}[1]{% ++ \markboth{#1}{}% ++} ++\renewcommand{\sectionmark}[1]{% ++ \markright{\thesection\ #1}% ++} ++ ++% Indices & bibliography ++\usepackage{natbib} ++\usepackage[titles]{tocloft} ++\setcounter{tocdepth}{3} ++\setcounter{secnumdepth}{5} ++\makeindex ++ ++% Hyperlinks (required, but should be loaded last) ++\usepackage{ifpdf} ++\ifpdf ++ \usepackage[pdftex,pagebackref=true]{hyperref} ++\else ++ \usepackage[ps2pdf,pagebackref=true]{hyperref} ++\fi ++\hypersetup{% ++ colorlinks=true,% ++ linkcolor=blue,% ++ citecolor=blue,% ++ unicode% ++} ++ ++% Custom commands ++\newcommand{\clearemptydoublepage}{% ++ \newpage{\pagestyle{empty}\cleardoublepage}% ++} ++ ++ ++%===== C O N T E N T S ===== ++ ++\begin{document} ++ ++% Titlepage & ToC ++\hypersetup{pageanchor=false, ++ bookmarks=true, ++ bookmarksnumbered=true, ++ pdfencoding=unicode ++ } ++\pagenumbering{roman} ++\begin{titlepage} ++\vspace*{7cm} ++\begin{center}% ++ {\Large Unified Communication X (UCX)}\\ ++\vspace*{0.5cm} ++{\large API Standard}\\ ++{\small Version @MAJOR_VERSION@.@MINOR_VERSION@}\\ ++\vspace*{0.5cm} ++\includegraphics[width=6cm]{UCX_Logo_930x933.png} ++\vspace*{0.5cm} ++\end{center} ++\end{titlepage} ++\clearemptydoublepage ++\tableofcontents ++\clearemptydoublepage ++\pagenumbering{arabic} ++\hypersetup{pageanchor=true} ++ ++%--- Begin generated contents --- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.dox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.dox +deleted file mode 100644 +index 75dc39d..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.dox ++++ /dev/null +@@ -1,91 +0,0 @@ +-/* +- * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-/** +- * @page Introduction +- +- +- * \section Motivation +- * A communication middleware abstracts the vendor-specific software and hardware +- * interfaces. +- * They bridge the semantic and functionality gap between the programming models +- * and the software and hardware network interfaces by providing +- * data transfer interfaces and implementation, optimized protocols for data +- * transfer between various memories, and managing network resources. There are many +- * communication middleware APIs and libraries to support parallel programming +- * models such as MPI, OpenSHMEM, and task-based models. +- * +- * Current communication middleware designs typically take two approaches. First, +- * communication middleware such as Intel’s PSM (previously Qlogic), Mellanox’s +- * MXM, and IBM’s PAMI provide high-performance implementations for specific +- * network hardware. Second, communication middleware such as VMI, Cactus, ARMCI, +- * GASNet, and Open MPI are tightly coupled to a specific programming model. +- * Communication middleware designed with either of this design approach +- * requires significant porting effort to move a new network +- * interface or programming model. +- * +- * To achieve functional and performance portability across +- * architectures and programming models, we introduce Unified Communication X +- * (UCX). +- * +- * \section UCX +- * Unified Communication X (UCX) is a set of network APIs and their +- * implementations for high throughput computing. UCX is a combined +- * effort of national laboratories, industry, and academia to design and +- * implement a high-performing and highly-scalable network stack for next +- * generation applications and systems. UCX design provides the ability to +- * tailor its APIs and network functionality to suit a wide variety of +- * application domains. +- * We envision that these APIs will satisfy the networking needs of many +- * programming models such as the Message Passing Interface (MPI), OpenSHMEM, +- * Partitioned Global Address Space (PGAS) languages, task-based paradigms, and +- * I/O bound applications. +- * +- * The initial focus is on supporting semantics such as point-to-point +- * communications (one-sided and two-sided), collective communication, +- * and remote atomic operations required for popular parallel programming models. +- * Also, the initial UCX reference implementation +- * is targeted to support current network technologies such as: +- * + Open Fabrics - InfiniBand (Mellanox, Qlogic, IBM), libfabrics, iWARP, RoCE +- * + Cray GEMINI \& ARIES +- * + Shared memory (MMAP, Posix, CMA, KNEM, XPMEM, etc.) +- * + Ethernet (TCP/UDP) +- * +- +- * UCX design goals are focused on performance and scalability, while efficiently supporting +- * popular and emerging programming models. +- +- * UCX’s API and design do not impose architectural constraints on the network hardware +- * nor require any specific capabilities to the support the programming model functionality. +- * This is achieved by keeping the API flexible and ability to support the missing +- * functionality efficiently in the software. +- * +- * +- * Extreme scalability is an important design goal for UCX. +- * To achieve this, UCX follows these design principles : +- * + Minimal memory consumption : Design avoids data-structures that scale with the number of +- * processing elements (i.e., order N data structures), and share resources among multiple +- * programming models. +- * + Low-latency Interfaces: Design provides at least two sets of APIs with one set focused on the performance, +- * and the other focused on functionality. +- * + High bandwidth - With minimal software overhead combined and support for multi-rail and multi-device +- * capabilities, the design provides all the hooks that are necessary for exploiting hardware bandwidth +- * capabilities. +- * + Asynchronous Progress: API provides non-blocking communication interfaces and design supports asynchronous progress +- * required for communication and computation overlap +- * + Resilience - the API exposes communication control hooks required for fault +- * tolerant communication library implementation. +- * +- * UCX design provides native support for hybrid programming models. The +- * design enables resource sharing, optimal memory usage, and progress engine +- * coordination to efficiently implement hybrid programming models. For example, +- * hybrid applications that use both OpenSHMEM and MPI programming models will be +- * able to select between a single-shared UCX network context or a stand +- * alone UCX network context for each one of them. Such flexibility, +- * optimized resource sharing, and reduced memory consumption, improve network +- * and application performance. +- * +- * +- */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.md b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.md +new file mode 100644 +index 0000000..35404bb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.md +@@ -0,0 +1,82 @@ ++Introduction ++============ ++ ++\section Motivation ++A communication middleware abstracts the vendor-specific software and hardware ++interfaces. ++They bridge the semantic and functionality gap between the programming models ++and the software and hardware network interfaces by providing ++data transfer interfaces and implementation, optimized protocols for data ++transfer between various memories, and managing network resources. There are many ++communication middleware APIs and libraries to support parallel programming ++models such as MPI, OpenSHMEM, and task-based models. ++ ++Current communication middleware designs typically take two approaches. First, ++communication middleware such as Intel's PSM (previously Qlogic), Mellanox's ++MXM, and IBM's PAMI provide high-performance implementations for specific ++network hardware. Second, communication middleware such as VMI, Cactus, ARMCI, ++GASNet, and Open MPI are tightly coupled to a specific programming model. ++Communication middleware designed with either of this design approach ++requires significant porting effort to move a new network ++interface or programming model. ++ ++To achieve functional and performance portability across ++architectures and programming models, we introduce Unified Communication X ++(UCX). ++ ++\section UCX ++Unified Communication X (UCX) is a set of network APIs and their ++implementations for high throughput computing. UCX is a combined ++effort of national laboratories, industry, and academia to design and ++implement a high-performing and highly-scalable network stack for next ++generation applications and systems. UCX design provides the ability to ++tailor its APIs and network functionality to suit a wide variety of ++application domains. ++We envision that these APIs will satisfy the networking needs of many ++programming models such as the Message Passing Interface (MPI), OpenSHMEM, ++Partitioned Global Address Space (PGAS) languages, task-based paradigms, and ++I/O bound applications. ++ ++The initial focus is on supporting semantics such as point-to-point ++communications (one-sided and two-sided), collective communication, ++and remote atomic operations required for popular parallel programming models. ++Also, the initial UCX reference implementation ++is targeted to support current network technologies such as: +++ Open Fabrics - InfiniBand (Mellanox, Qlogic, IBM), libfabrics, iWARP, RoCE +++ Cray GEMINI \& ARIES +++ Shared memory (MMAP, Posix, CMA, KNEM, XPMEM, etc.) +++ Ethernet (TCP/UDP) ++ ++ ++UCX design goals are focused on performance and scalability, while efficiently supporting ++popular and emerging programming models. ++ ++UCX's API and design do not impose architectural constraints on the network hardware ++nor require any specific capabilities to the support the programming model functionality. ++This is achieved by keeping the API flexible and ability to support the missing ++functionality efficiently in the software. ++ ++ ++Extreme scalability is an important design goal for UCX. ++To achieve this, UCX follows these design principles: +++ Minimal memory consumption : Design avoids data-structures that scale with the number of ++processing elements (i.e., order N data structures), and share resources among multiple ++programming models. +++ Low-latency Interfaces: Design provides at least two sets of APIs with one set focused on the performance, ++and the other focused on functionality. +++ High bandwidth - With minimal software overhead combined and support for multi-rail and multi-device ++ capabilities, the design provides all the hooks that are necessary for exploiting hardware bandwidth ++capabilities. +++ Asynchronous Progress: API provides non-blocking communication interfaces and design supports asynchronous progress ++required for communication and computation overlap +++ Resilience - the API exposes communication control hooks required for fault ++tolerant communication library implementation. ++ ++UCX design provides native support for hybrid programming models. The ++design enables resource sharing, optimal memory usage, and progress engine ++coordination to efficiently implement hybrid programming models. For example, ++hybrid applications that use both OpenSHMEM and MPI programming models will be ++able to select between a single-shared UCX network context or a stand ++alone UCX network context for each one of them. Such flexibility, ++optimized resource sharing, and reduced memory consumption, improve network ++and application performance. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.dox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.dox +deleted file mode 100644 +index 417388d..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.dox ++++ /dev/null +@@ -1,32 +0,0 @@ +-/* +- * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-/** +- * \mainpage Preface +- * +- * \section Scope Scope of the Document +- * This document describes the UCX programming +- * interface. The programming interface exposes a high performance +- * communication API, which provides basic building blocks for PGAS, Message +- * Passing Interface (MPI), Big-Data, Analytics, File I/O, and storage library developers. +- * +- * \section Audience Audience +- * This manual is intended for programmers who want to +- * develop parallel programming models like OpenSHMEM, MPI, UPC, Chapel, etc. +- * The manual assumes that the reader is familiar with the following: +- * + Basic concepts of two-sided, one-sided, atomic, and collective operations +- * + C programming language +- * +- * \section Status Document Status +- * This section briefly describes a list of open +- * issues in the UCX specification. +- * + UCP API - work in progress +- * + UCT API - work in progress +- * +- * +- * \section License +- * UCX project follows open source development model and the software is +- * licensed under BSD-3 license. +- */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.md b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.md +new file mode 100644 +index 0000000..e3aef6f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.md +@@ -0,0 +1,25 @@ ++Preface {#mainpage} ++======= ++ ++\section Scope Scope of the Document ++This document describes the UCX programming ++interface. The programming interface exposes a high performance ++communication API, which provides basic building blocks for PGAS, Message ++Passing Interface (MPI), Big-Data, Analytics, File I/O, and storage library developers. ++ ++\section Audience Audience ++This manual is intended for programmers who want to ++develop parallel programming models like OpenSHMEM, MPI, UPC, Chapel, etc. ++The manual assumes that the reader is familiar with the following: +++ Basic concepts of two-sided, one-sided, atomic, and collective operations +++ C programming language ++ ++\section Status Document Status ++This section briefly describes a list of open ++issues in the UCX specification. +++ UCP API - work in progress +++ UCT API - work in progress ++ ++\section License ++UCX project follows open source development model and the software is ++licensed under BSD-3 license. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/ucxdox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/ucxdox +index 367fd9f..07a1822 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/ucxdox ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/ucxdox +@@ -1,4 +1,5 @@ + # Copyright (C) UT-Battelle, LLC. 2014-2015. ALL RIGHTS RESERVED. ++# Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. + # See file LICENSE for terms. + # + # Doxyfile 1.8.9.1 +@@ -761,16 +762,18 @@ WARN_LOGFILE = + # spaces. + # Note: If this tag is empty the current directory is searched. + +-INPUT = $(SRCDIR)/src/ucp/api/ \ +- $(SRCDIR)/src/uct/api/ \ +- $(SRCDIR)/src/ucs/type/ \ +- $(SRCDIR)/src/ucs/async/ \ +- $(SRCDIR)/src/ucs/time/ \ +- $(SRCDIR)/src/ucs/sys/ \ +- $(SRCDIR)/doc/doxygen/preface.dox \ +- $(SRCDIR)/doc/doxygen/intro.dox \ +- $(SRCDIR)/doc/doxygen/design.dox \ +- $(SRCDIR)/doc/doxygen/conventions.dox ++INPUT = $(SRCDIR)/src/ucp/api/ \ ++ $(SRCDIR)/src/uct/api/ \ ++ $(SRCDIR)/src/ucs/async/ \ ++ $(SRCDIR)/src/ucs/config/ \ ++ $(SRCDIR)/src/ucs/datastruct/ \ ++ $(SRCDIR)/src/ucs/time/ \ ++ $(SRCDIR)/src/ucs/type/ \ ++ $(SRCDIR)/src/ucs/sys/ \ ++ $(SRCDIR)/doc/doxygen/preface.md \ ++ $(SRCDIR)/doc/doxygen/intro.md \ ++ $(SRCDIR)/doc/doxygen/design.md \ ++ $(SRCDIR)/doc/doxygen/conventions.md + + # This tag can be used to specify the character encoding of the source files + # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +@@ -799,7 +802,9 @@ FILE_PATTERNS = ucp.h \ + async_fwd.h \ + compiler_def.h \ + time_def.h \ +- thread_mode.h ++ thread_mode.h \ ++ callbackq.h \ ++ types.h + + # The RECURSIVE tag can be used to specify whether or not subdirectories should + # be searched for input files as well. +@@ -1648,7 +1653,7 @@ EXTRA_PACKAGES = times + # to HTML_HEADER. + # This tag requires that the tag GENERATE_LATEX is set to YES. + +-LATEX_HEADER = $(SRCDIR)/doc/doxygen/header.tex ++LATEX_HEADER = doc/doxygen/header.tex + + # 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 +@@ -1839,7 +1844,7 @@ MAN_SUBDIR = + # The default value is: NO. + # This tag requires that the tag GENERATE_MAN is set to YES. + +-MAN_LINKS = NO ++MAN_LINKS = YES + + #--------------------------------------------------------------------------- + # Configuration options related to the XML output +@@ -2383,3 +2388,9 @@ GENERATE_LEGEND = YES + # This tag requires that the tag HAVE_DOT is set to YES. + + DOT_CLEANUP = YES ++ ++# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when ++# a warning is encountered. ++# The default value is: NO. ++ ++WARN_AS_ERROR = YES +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/Makefile.am +index af9e7a1..99d6b28 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/Makefile.am +@@ -32,7 +32,6 @@ endif + + ucx_info_SOURCES = \ + build_info.c \ +- cfg_info.c \ + proto_info.c \ + sys_info.c \ + tl_info.c \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/cfg_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/cfg_info.c +deleted file mode 100644 +index 49f32f5..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/cfg_info.c ++++ /dev/null +@@ -1,140 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include "ucx_info.h" +- +-#include +-#include +-#include +-#include +- +- +-static void print_tl_config(uct_md_h md, const char *tl_name, +- ucs_config_print_flags_t print_flags) +-{ +- char cfg_title[UCT_TL_NAME_MAX + 128]; +- uct_iface_config_t *config; +- ucs_status_t status; +- +- if (tl_name != NULL) { +- snprintf(cfg_title, sizeof(cfg_title), "%s transport configuration", tl_name); +- } else { +- snprintf(cfg_title, sizeof(cfg_title), "%s client-server transport configuration", +- md->component->name); +- } +- +- status = uct_md_iface_config_read(md, tl_name, NULL, NULL, &config); +- if (status != UCS_OK) { +- printf("# < Failed to read configuration >\n"); +- return; +- } +- +- uct_config_print(config, stdout, cfg_title, print_flags); +- uct_config_release(config); +-} +- +-void print_ucp_config(ucs_config_print_flags_t print_flags) +-{ +- ucp_config_t *config; +- ucs_status_t status; +- +- status = ucp_config_read(NULL, NULL, &config); +- if (status != UCS_OK) { +- printf("\n"); +- return; +- } +- +- ucp_config_print(config, stdout, "protocol layer configuration", print_flags); +- ucp_config_release(config); +-} +- +-void print_uct_config(ucs_config_print_flags_t print_flags, const char *tl_name) +-{ +- uct_md_resource_desc_t *md_resources; +- unsigned md_rsc_index, num_md_resources; +- uct_tl_resource_desc_t *tl_resources; +- unsigned tl_rsc_index, num_tl_resources; +- char tl_names[UINT8_MAX][UCT_TL_NAME_MAX]; +- unsigned i, num_tls; +- ucs_status_t status; +- uct_md_h md; +- uct_md_config_t *md_config; +- uct_md_attr_t md_attr; +- +- status = uct_query_md_resources(&md_resources, &num_md_resources); +- if (status != UCS_OK) { +- return; +- } +- +- uct_md_component_config_print(print_flags); +- +- num_tls = 0; +- for (md_rsc_index = 0; md_rsc_index < num_md_resources; ++md_rsc_index) { +- +- status = uct_md_config_read(md_resources[md_rsc_index].md_name, NULL, +- NULL, &md_config); +- if (status != UCS_OK) { +- continue; +- } +- +- status = uct_md_open(md_resources[md_rsc_index].md_name, md_config, &md); +- uct_config_release(md_config); +- if (status != UCS_OK) { +- continue; +- } +- +- status = uct_md_query_tl_resources(md, &tl_resources, &num_tl_resources); +- if (status != UCS_OK) { +- uct_md_close(md); +- continue; +- } +- +- /* handle the printing of a special case where cannot use tl_resources +- * since there aren't any */ +- status = uct_md_query(md, &md_attr); +- if (status != UCS_OK) { +- uct_release_tl_resource_list(tl_resources); +- uct_md_close(md); +- continue; +- } +- +- if (md_attr.cap.flags & UCT_MD_FLAG_SOCKADDR) { +- print_tl_config(md, NULL, print_flags); +- } +- +- for (tl_rsc_index = 0; tl_rsc_index < num_tl_resources; ++tl_rsc_index) { +- i = 0; +- while (i < num_tls) { +- if (!strcmp(tl_names[i], tl_resources[tl_rsc_index].tl_name)) { +- break; +- } +- ++i; +- } +- +- /* Make sure this transport is not inserted to the array before, and +- * if user selects a specific transport - also make sure this is it. +- */ +- if ((i == num_tls) && +- ((tl_name == NULL) || !strcmp(tl_name, tl_resources[tl_rsc_index].tl_name))) +- { +- ucs_strncpy_zero(tl_names[num_tls], tl_resources[tl_rsc_index].tl_name, +- UCT_TL_NAME_MAX); +- +- print_tl_config(md, tl_names[num_tls], print_flags); +- +- ++num_tls; +- } +- } +- +- uct_release_tl_resource_list(tl_resources); +- uct_md_close(md); +- } +- +- uct_release_md_resource_list(md_resources); +-} +- +- +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/proto_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/proto_info.c +index 29df72a..6587016 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/proto_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/proto_info.c +@@ -89,8 +89,8 @@ static void print_resource_usage(const resource_usage_t *usage_before, + } + + void print_ucp_info(int print_opts, ucs_config_print_flags_t print_flags, +- uint64_t features, size_t estimated_num_eps, +- unsigned dev_type_bitmap) ++ uint64_t ctx_features, const ucp_ep_params_t *base_ep_params, ++ size_t estimated_num_eps, unsigned dev_type_bitmap) + { + ucp_config_t *config; + ucs_status_t status; +@@ -113,7 +113,7 @@ void print_ucp_info(int print_opts, ucs_config_print_flags_t print_flags, + memset(¶ms, 0, sizeof(params)); + params.field_mask = UCP_PARAM_FIELD_FEATURES | + UCP_PARAM_FIELD_ESTIMATED_NUM_EPS; +- params.features = features; ++ params.features = ctx_features; + params.estimated_num_eps = estimated_num_eps; + + get_resource_usage(&usage); +@@ -166,8 +166,10 @@ void print_ucp_info(int print_opts, ucs_config_print_flags_t print_flags, + goto out_destroy_worker; + } + +- ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- ep_params.address = address; ++ ep_params = *base_ep_params; ++ ++ ep_params.field_mask |= UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ ep_params.address = address; + + status = ucp_ep_create(worker, &ep_params, &ep); + ucp_worker_release_address(worker, address); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/sys_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/sys_info.c +index fa2578e..426befb 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/sys_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/sys_info.c +@@ -21,7 +21,11 @@ static const char* cpu_model_names[] = { + [UCS_CPU_MODEL_INTEL_IVYBRIDGE] = "IvyBridge", + [UCS_CPU_MODEL_INTEL_SANDYBRIDGE] = "SandyBridge", + [UCS_CPU_MODEL_INTEL_NEHALEM] = "Nehalem", +- [UCS_CPU_MODEL_INTEL_WESTMERE] = "Westmere" ++ [UCS_CPU_MODEL_INTEL_WESTMERE] = "Westmere", ++ [UCS_CPU_MODEL_INTEL_HASWELL] = "Haswell", ++ [UCS_CPU_MODEL_INTEL_BROADWELL] = "Broadwell", ++ [UCS_CPU_MODEL_INTEL_SKYLAKE] = "Skylake", ++ [UCS_CPU_MODEL_ARM_AARCH64] = "ARM 64-bit" + }; + + static double measure_memcpy_bandwidth(size_t size) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/tl_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/tl_info.c +index b0be101..4e84509 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/tl_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/tl_info.c +@@ -17,18 +17,23 @@ + #define PRINT_CAP(_name, _cap_flags, _max) \ + if ((_cap_flags) & (UCT_IFACE_FLAG_##_name)) { \ + char *s = strduplower(#_name); \ +- printf("# %12s: %s\n", s, size_limit_to_str(0, _max)); \ ++ printf("# %15s: %s\n", s, size_limit_to_str(0, _max)); \ + free(s); \ + } + +-#define PRINT_ZCAP(_name, _cap_flags, _min, _max, _max_iov) \ +- if ((_cap_flags) & (UCT_IFACE_FLAG_##_name)) { \ ++#define PRINT_ZCAP_NO_CHECK(_name, _min, _max, _max_iov) \ ++ { \ + char *s = strduplower(#_name); \ +- printf("# %12s: %s, up to %zu iov\n", s, \ ++ printf("# %15s: %s, up to %zu iov\n", s, \ + size_limit_to_str((_min), (_max)), (_max_iov)); \ + free(s); \ + } + ++#define PRINT_ZCAP(_name, _cap_flags, _min, _max, _max_iov) \ ++ if ((_cap_flags) & (UCT_IFACE_FLAG_##_name)) { \ ++ PRINT_ZCAP_NO_CHECK(_name, _min, _max, _max_iov) \ ++ } ++ + #define PRINT_ATOMIC_CAP(_name, _cap_flags) \ + if ((_cap_flags) & (UCT_IFACE_FLAG_##_name##32 | UCT_IFACE_FLAG_##_name##64)) { \ + char *s = strduplower(#_name); \ +@@ -41,14 +46,22 @@ + if (ucs_test_all_flags(_cap_flags, \ + UCT_IFACE_FLAG_##_name##32 | UCT_IFACE_FLAG_##_name##64)) \ + { \ +- printf("# %12s: 32, 64 bit%s\n", s, domain); \ ++ printf("# %12s: 32, 64 bit%s (deprecated)\n", s, domain); \ + } else { \ +- printf("# %12s: %d bit%s\n", s, \ ++ printf("# %12s: %d bit%s (deprecated)\n", s, \ + ((_cap_flags) & UCT_IFACE_FLAG_##_name##32) ? 32 : 64, domain); \ + } \ + free(s); \ + } + ++#define PRINT_ATOMIC_POST(_name, _cap) \ ++ print_atomic_info(UCT_ATOMIC_OP_##_name, #_name, "", \ ++ _cap.atomic32.op_flags, _cap.atomic32.op_flags); ++ ++#define PRINT_ATOMIC_FETCH(_name, _cap, _suffix) \ ++ print_atomic_info(UCT_ATOMIC_OP_##_name, #_name, _suffix, \ ++ _cap.atomic32.fop_flags, _cap.atomic32.fop_flags); ++ + static char *strduplower(const char *str) + { + char *s, *p; +@@ -60,6 +73,27 @@ static char *strduplower(const char *str) + return s; + } + ++static void print_atomic_info(uct_atomic_op_t opcode, const char *name, ++ const char *suffix, uint64_t op32, uint64_t op64) ++{ ++ char amo[256] = "atomic_"; ++ char *s; ++ ++ if ((op32 & UCS_BIT(opcode)) || (op64 & UCS_BIT(opcode))) { ++ s = strduplower(name); ++ strncat(amo, suffix, sizeof(amo) - strlen(amo) - 1); ++ strncat(amo, s, sizeof(amo) - strlen(amo) - 1); ++ free(s); ++ ++ if ((op32 & UCS_BIT(opcode)) && (op64 & UCS_BIT(opcode))) { ++ printf("# %12s: 32, 64 bit\n", amo); ++ } else { ++ printf("# %12s: %d bit\n", amo, ++ (op32 & UCS_BIT(opcode)) ? 32 : 64); ++ } ++ } ++} ++ + static const char *size_limit_to_str(size_t min_size, size_t max_size) + { + static char buf[128]; +@@ -139,46 +173,90 @@ static void print_iface_info(uct_worker_h worker, uct_md_h md, + PRINT_ZCAP(PUT_ZCOPY, iface_attr.cap.flags, iface_attr.cap.put.min_zcopy, + iface_attr.cap.put.max_zcopy, iface_attr.cap.put.max_iov); + +- if((iface_attr.cap.flags) & (UCT_IFACE_FLAG_PUT_ZCOPY)) { ++ if (iface_attr.cap.flags & UCT_IFACE_FLAG_PUT_ZCOPY) { + printf("# put_opt_zcopy_align: %s\n", + size_limit_to_str(0, iface_attr.cap.put.opt_zcopy_align)); + printf("# put_align_mtu: %s\n", + size_limit_to_str(0, iface_attr.cap.put.align_mtu)); + } +- if((iface_attr.cap.flags) & (UCT_IFACE_FLAG_GET_ZCOPY)) { +- printf("# get_opt_zcopy_align: %s\n", +- size_limit_to_str(0, iface_attr.cap.get.opt_zcopy_align)); +- printf("# get_align_mtu: %s\n", +- size_limit_to_str(0, iface_attr.cap.get.align_mtu)); +- } +- if((iface_attr.cap.flags) & (UCT_IFACE_FLAG_AM_ZCOPY)) { +- printf("# am_opt_zcopy_align: %s\n", +- size_limit_to_str(0, iface_attr.cap.am.opt_zcopy_align)); +- printf("# am_align_mtu: %s\n", +- size_limit_to_str(0, iface_attr.cap.am.align_mtu)); +- } + ++ PRINT_CAP(GET_SHORT, iface_attr.cap.flags, iface_attr.cap.get.max_short); + PRINT_CAP(GET_BCOPY, iface_attr.cap.flags, iface_attr.cap.get.max_bcopy); + PRINT_ZCAP(GET_ZCOPY, iface_attr.cap.flags, iface_attr.cap.get.min_zcopy, + iface_attr.cap.get.max_zcopy, iface_attr.cap.get.max_iov); ++ if (iface_attr.cap.flags & UCT_IFACE_FLAG_GET_ZCOPY) { ++ printf("# get_opt_zcopy_align: %s\n", ++ size_limit_to_str(0, iface_attr.cap.get.opt_zcopy_align)); ++ printf("# get_align_mtu: %s\n", ++ size_limit_to_str(0, iface_attr.cap.get.align_mtu)); ++ } ++ + PRINT_CAP(AM_SHORT, iface_attr.cap.flags, iface_attr.cap.am.max_short); + PRINT_CAP(AM_BCOPY, iface_attr.cap.flags, iface_attr.cap.am.max_bcopy); + PRINT_ZCAP(AM_ZCOPY, iface_attr.cap.flags, iface_attr.cap.am.min_zcopy, + iface_attr.cap.am.max_zcopy, iface_attr.cap.am.max_iov); + if (iface_attr.cap.flags & UCT_IFACE_FLAG_AM_ZCOPY) { ++ printf("# am_opt_zcopy_align: %s\n", ++ size_limit_to_str(0, iface_attr.cap.am.opt_zcopy_align)); ++ printf("# am_align_mtu: %s\n", ++ size_limit_to_str(0, iface_attr.cap.am.align_mtu)); + printf("# am header: %s\n", + size_limit_to_str(0, iface_attr.cap.am.max_hdr)); + } + +- PRINT_ATOMIC_CAP(ATOMIC_ADD, iface_attr.cap.flags); +- PRINT_ATOMIC_CAP(ATOMIC_FADD, iface_attr.cap.flags); +- PRINT_ATOMIC_CAP(ATOMIC_SWAP, iface_attr.cap.flags); +- PRINT_ATOMIC_CAP(ATOMIC_CSWAP, iface_attr.cap.flags); ++ PRINT_CAP(TAG_EAGER_SHORT, iface_attr.cap.flags, ++ iface_attr.cap.tag.eager.max_short); ++ PRINT_CAP(TAG_EAGER_BCOPY, iface_attr.cap.flags, ++ iface_attr.cap.tag.eager.max_bcopy); ++ PRINT_ZCAP(TAG_EAGER_ZCOPY, iface_attr.cap.flags, 0, ++ iface_attr.cap.tag.eager.max_zcopy, ++ iface_attr.cap.tag.eager.max_iov); ++ ++ if (iface_attr.cap.flags & UCT_IFACE_FLAG_TAG_RNDV_ZCOPY) { ++ PRINT_ZCAP_NO_CHECK(TAG_RNDV_ZCOPY, 0, ++ iface_attr.cap.tag.rndv.max_zcopy, ++ iface_attr.cap.tag.rndv.max_iov); ++ printf("# rndv private header: %s\n", ++ size_limit_to_str(0, iface_attr.cap.tag.rndv.max_hdr)); ++ } ++ ++ if (iface_attr.cap.flags & (UCT_IFACE_FLAG_TAG_EAGER_SHORT | ++ UCT_IFACE_FLAG_TAG_EAGER_BCOPY | ++ UCT_IFACE_FLAG_TAG_EAGER_ZCOPY | ++ UCT_IFACE_FLAG_TAG_RNDV_ZCOPY)) { ++ PRINT_ZCAP_NO_CHECK(TAG_RECV, iface_attr.cap.tag.recv.min_recv, ++ iface_attr.cap.tag.recv.max_zcopy, ++ iface_attr.cap.tag.recv.max_iov); ++ printf("# tag_max_outstanding: %s\n", ++ size_limit_to_str(0, iface_attr.cap.tag.recv.max_outstanding)); ++ } ++ ++ if (iface_attr.cap.atomic32.op_flags || ++ iface_attr.cap.atomic64.op_flags || ++ iface_attr.cap.atomic32.fop_flags || ++ iface_attr.cap.atomic64.fop_flags) { ++ if (iface_attr.cap.flags & UCT_IFACE_FLAG_ATOMIC_DEVICE) { ++ printf("# domain: device\n"); ++ } else if (iface_attr.cap.flags & UCT_IFACE_FLAG_ATOMIC_CPU) { ++ printf("# domain: cpu\n"); ++ } ++ ++ PRINT_ATOMIC_POST(ADD, iface_attr.cap); ++ PRINT_ATOMIC_POST(AND, iface_attr.cap); ++ PRINT_ATOMIC_POST(OR, iface_attr.cap); ++ PRINT_ATOMIC_POST(XOR, iface_attr.cap); ++ ++ PRINT_ATOMIC_FETCH(ADD, iface_attr.cap, "f"); ++ PRINT_ATOMIC_FETCH(AND, iface_attr.cap, "f"); ++ PRINT_ATOMIC_FETCH(OR, iface_attr.cap, "f"); ++ PRINT_ATOMIC_FETCH(XOR, iface_attr.cap, "f"); ++ PRINT_ATOMIC_FETCH(SWAP , iface_attr.cap, ""); ++ PRINT_ATOMIC_FETCH(CSWAP, iface_attr.cap, ""); ++ } + + buf[0] = '\0'; + if (iface_attr.cap.flags & (UCT_IFACE_FLAG_CONNECT_TO_EP | +- UCT_IFACE_FLAG_CONNECT_TO_IFACE)) +- { ++ UCT_IFACE_FLAG_CONNECT_TO_IFACE)) { + if (iface_attr.cap.flags & UCT_IFACE_FLAG_CONNECT_TO_EP) { + strncat(buf, " to ep,", sizeof(buf) - 1); + } +@@ -207,12 +285,11 @@ static void print_iface_info(uct_worker_h worker, uct_md_h md, + UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF | + UCT_IFACE_FLAG_ERRHANDLE_AM_ID | + UCT_IFACE_FLAG_ERRHANDLE_REMOTE_MEM | +- UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE)) +- { ++ UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE)) { ++ + if (iface_attr.cap.flags & (UCT_IFACE_FLAG_ERRHANDLE_SHORT_BUF | + UCT_IFACE_FLAG_ERRHANDLE_BCOPY_BUF | +- UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF)) +- { ++ UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF)) { + strncat(buf, " buffer (", sizeof(buf) - 1); + if (iface_attr.cap.flags & UCT_IFACE_FLAG_ERRHANDLE_SHORT_BUF) { + strncat(buf, "short,", sizeof(buf) - 1); +@@ -263,7 +340,7 @@ static ucs_status_t print_tl_info(uct_md_h md, const char *tl_name, + } + + /* coverity[alloc_arg] */ +- status = uct_worker_create(&async, UCS_THREAD_MODE_MULTI, &worker); ++ status = uct_worker_create(&async, UCS_THREAD_MODE_SINGLE, &worker); + if (status != UCS_OK) { + goto out; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/type_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/type_info.c +index 37fee06..cd36d4f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/type_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/type_info.c +@@ -18,12 +18,13 @@ + #include + #include + #include ++#include + #include + #include + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -50,7 +51,7 @@ + # include + # include + # include +-# if HAVE_MLX5_HW ++# if HAVE_MLX5_HW_DC + # include + # endif + #endif +@@ -58,7 +59,7 @@ + #if HAVE_TL_UD + # include + # include +-# if HAVE_MLX5_HW ++# if HAVE_MLX5_HW_UD + # include + # endif + #endif +@@ -216,7 +217,7 @@ void print_type_info(const char * tl_name) + PRINT_SIZE(uct_dc_verbs_iface_t); + } + +-#if HAVE_MLX5_HW ++#if HAVE_MLX5_HW_DC + if (tl_name == NULL || !strcasecmp(tl_name, "dc_mlx5")) { + PRINT_SIZE(uct_dc_mlx5_ep_t); + PRINT_SIZE(uct_dc_mlx5_grh_ep_t); +@@ -247,7 +248,7 @@ void print_type_info(const char * tl_name) + PRINT_SIZE(uct_ud_verbs_iface_t); + } + +-#if HAVE_MLX5_HW ++#if HAVE_MLX5_HW_UD + if (tl_name == NULL || !strcasecmp(tl_name, "ud_mlx5")) { + PRINT_SIZE(uct_ud_mlx5_ep_t); + PRINT_SIZE(uct_ud_mlx5_iface_t); +@@ -275,9 +276,13 @@ void print_type_info(const char * tl_name) + PRINT_SIZE(ucp_context_t); + PRINT_SIZE(ucp_worker_t); + PRINT_SIZE(ucp_ep_t); ++ PRINT_SIZE(ucp_ep_ext_gen_t); ++ PRINT_SIZE(ucp_ep_ext_proto_t); ++ PRINT_SIZE(ucp_ep_match_entry_t); + PRINT_SIZE(ucp_ep_config_key_t); + PRINT_SIZE(ucp_ep_config_t); + PRINT_SIZE(ucp_request_t); ++ PRINT_SIZE(ucp_recv_desc_t); + PRINT_SIZE(ucp_tag_recv_info_t); + PRINT_SIZE(ucp_mem_t); + PRINT_SIZE(ucp_rkey_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.c +index 2499be7..e467a6b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.c +@@ -16,36 +16,42 @@ + + static void usage() { + printf("Usage: ucx_info [options]\n"); +- printf("Options are:\n"); +- printf(" -v Version\n"); +- printf(" -s System\n"); +- printf(" -d Devices\n"); +- printf(" -c Configuration\n"); +- printf(" -p UCP context\n"); +- printf(" -w UCP worker\n"); +- printf(" -e UCP endpoint\n"); +- printf(" -u UCP features to use. String of one or more of:\n"); +- printf(" 'a' : atomic operations\n"); +- printf(" 'r' : remote memory access\n"); +- printf(" 't' : tag matching \n"); +- printf(" 'w' : wakeup\n"); +- printf(" -D Set which device types to use\n"); +- printf(" 'all' : all possible devices (default)\n"); +- printf(" 'shm' : shared memory devices only\n"); +- printf(" 'net' : network devices only\n"); +- printf(" 'self' : self transport only\n"); +- printf(" -n Estimated UCP endpoint count (for ucp_init)\n"); +- printf(" -a Show also hidden configuration\n"); +- printf(" -b Build configuration\n"); +- printf(" -y Type information\n"); +- printf(" -f Fully decorated output\n"); +- printf(" -t Print information for a specific transport\n"); ++ printf("At least one of the following options has to be set:\n"); ++ printf(" -v Show version information\n"); ++ printf(" -d Show devices and transports\n"); ++ printf(" -b Show build configuration\n"); ++ printf(" -y Show type and structures information\n"); ++ printf(" -s Show system information\n"); ++ printf(" -c Show UCX configuration\n"); ++ printf(" -a Show also hidden configuration\n"); ++ printf(" -f Display fully decorated output\n"); ++ printf("\nUCP information (-u is required):\n"); ++ printf(" -p Show UCP context information\n"); ++ printf(" -w Show UCP worker information\n"); ++ printf(" -e Show UCP endpoint configuration\n"); ++ printf(" -u UCP context features to use. String of one or more of:\n"); ++ printf(" 'a' : atomic operations\n"); ++ printf(" 'r' : remote memory access\n"); ++ printf(" 't' : tag matching \n"); ++ printf(" 'w' : wakeup\n"); ++ printf(" Modifiers to use in combination with above features:\n"); ++ printf(" 'e' : error handling\n"); ++ printf("\nOther settings:\n"); ++ printf(" -t Filter devices information using specified transport (requires -d)\n"); ++ printf(" -n Estimated UCP endpoint count (for ucp_init)\n"); ++ printf(" -D Set which device types to use when creating UCP context:\n"); ++ printf(" 'all' : all possible devices (default)\n"); ++ printf(" 'shm' : shared memory devices only\n"); ++ printf(" 'net' : network devices only\n"); ++ printf(" 'self' : self transport only\n"); ++ printf(" -h Show this help message\n"); + printf("\n"); + } + + int main(int argc, char **argv) + { + ucs_config_print_flags_t print_flags; ++ ucp_ep_params_t ucp_ep_params; + unsigned dev_type_bitmap; + uint64_t ucp_features; + size_t ucp_num_eps; +@@ -54,12 +60,13 @@ int main(int argc, char **argv) + const char *f; + int c; + +- print_opts = 0; +- print_flags = 0; +- tl_name = NULL; +- ucp_features = 0; +- ucp_num_eps = 1; +- dev_type_bitmap = -1; ++ print_opts = 0; ++ print_flags = 0; ++ tl_name = NULL; ++ ucp_features = 0; ++ ucp_num_eps = 1; ++ dev_type_bitmap = -1; ++ ucp_ep_params.field_mask = 0; + while ((c = getopt(argc, argv, "fahvcydbswpet:n:u:D:")) != -1) { + switch (c) { + case 'f': +@@ -116,6 +123,10 @@ int main(int argc, char **argv) + case 'w': + ucp_features |= UCP_FEATURE_WAKEUP; + break; ++ case 'e': ++ ucp_ep_params.field_mask |= UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; ++ ucp_ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; ++ break; + default: + usage(); + return -1; +@@ -137,6 +148,8 @@ int main(int argc, char **argv) + } + break; + case 'h': ++ usage(); ++ return 0; + default: + usage(); + return -1; +@@ -165,10 +178,7 @@ int main(int argc, char **argv) + } + + if (print_flags & UCS_CONFIG_PRINT_CONFIG) { +- ucs_global_opts_print(stdout, print_flags); +- print_ucp_config(print_flags); +- print_uct_config(print_flags, tl_name); +- ucm_config_print(stdout, print_flags); ++ ucs_config_parser_print_all_opts(stdout, print_flags); + } + + if (print_opts & PRINT_DEVICES) { +@@ -177,11 +187,12 @@ int main(int argc, char **argv) + + if (print_opts & (PRINT_UCP_CONTEXT|PRINT_UCP_WORKER|PRINT_UCP_EP)) { + if (ucp_features == 0) { +- printf("Please select UCP features using -u switch\n"); ++ printf("Please select UCP features using -u switch: a|r|t|w\n"); ++ usage(); + return -1; + } +- print_ucp_info(print_opts, print_flags, ucp_features, ucp_num_eps, +- dev_type_bitmap); ++ print_ucp_info(print_opts, print_flags, ucp_features, &ucp_ep_params, ++ ucp_num_eps, dev_type_bitmap); + } + + return 0; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.h b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.h +index 313a982..fc51f9b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.h +@@ -24,10 +24,6 @@ enum { + }; + + +-void print_ucp_config(ucs_config_print_flags_t print_flags); +- +-void print_uct_config(ucs_config_print_flags_t print_flags, const char *tl_name); +- + void print_version(); + + void print_sys_info(); +@@ -40,15 +36,7 @@ void print_uct_info(int print_opts, ucs_config_print_flags_t print_flags, + void print_type_info(const char * tl_name); + + void print_ucp_info(int print_opts, ucs_config_print_flags_t print_flags, +- uint64_t features, size_t estimated_num_eps, +- unsigned dev_type_bitmap); +- +-/** +- * @ingroup RESOURCE +- * @brief Print MD component configuration to a stream. +- * +- * @param [in] print_flags Controls how the configuration is printed. +- */ +-void uct_md_component_config_print(ucs_config_print_flags_t print_flags); ++ uint64_t ctx_features, const ucp_ep_params_t *base_ep_params, ++ size_t estimated_num_eps, unsigned dev_type_bitmap); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/Makefile.am +index e0e6633..e8607c3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/Makefile.am +@@ -14,6 +14,9 @@ else + ucx_perftest_CC = $(CC) + endif + ++# override CXXFLAGS to link C++ code with C linker ++CXXFLAGS += -nostdlib -fno-exceptions -fno-rtti ++ + perftestdir = $(pkgdatadir)/perftest + dist_perftest_DATA = \ + $(top_srcdir)/contrib/ucx_perftest_config/msg_pow2 \ +@@ -43,7 +46,6 @@ libucxperf_la_LDFLAGS = \ + $(RTE_LDFLAGS) \ + $(OPENMP_CFLAGS) + libucxperf_la_CXXFLAGS = \ +- -nostdlib -fno-exceptions -fno-rtti \ + $(BASE_CXXFLAGS) \ + $(OPENMP_CFLAGS) + libucxperf_la_CFLAGS = \ +@@ -56,16 +58,19 @@ libucxperf_la_LIBADD = \ + #libucxperf_la_LINK = $(CXX) + + ucx_perftest_SOURCES = perftest.c +-ucx_perftest_LDFLAGS = \ +- $(RTE_LDFLAGS) \ +- $(OPENMP_CFLAGS) +-ucx_perftest_CFLAGS = \ +- $(OPENMP_CFLAGS) +-ucx_perftest_LDADD = \ +- $(abs_top_builddir)/src/uct/libuct.la \ +- $(abs_top_builddir)/src/ucp/libucp.la \ +- $(abs_top_builddir)/src/ucs/libucs.la \ +- libucxperf.la ++ucx_perftest_LDFLAGS = \ ++ $(RTE_LDFLAGS) \ ++ $(OPENMP_CFLAGS) ++ucx_perftest_CPPFLAGS = \ ++ $(BASE_CPPFLAGS) ++ucx_perftest_CFLAGS = \ ++ $(BASE_CFLAGS) \ ++ $(OPENMP_CFLAGS) ++ucx_perftest_LDADD = \ ++ $(abs_top_builddir)/src/uct/libuct.la \ ++ $(abs_top_builddir)/src/ucp/libucp.la \ ++ $(abs_top_builddir)/src/ucs/libucs.la \ ++ libucxperf.la + ucx_perftest_SOURCE_FILES = \ + $(patsubst %, $(srcdir)/%, $(ucx_perftest_SOURCES)) + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.c +index 2214d4f..a98eca3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.c +@@ -10,10 +10,29 @@ + #include "libperf_int.h" + + #include ++#include + #include + #include + #include + ++#define ATOMIC_OP_CONFIG(_size, _op32, _op64, _op, _msg, _params, _status) \ ++ _status = __get_atomic_flag((_size), (_op32), (_op64), (_op)); \ ++ if (_status != UCS_OK) { \ ++ ucs_error("%s/%s does not support atomic %s for message size %zu bytes", \ ++ (_params)->uct.tl_name, (_params)->uct.dev_name, \ ++ (_msg)[_op], (_size)); \ ++ return _status; \ ++ } ++ ++#define ATOMIC_OP_CHECK(_size, _attr, _required, _params, _msg) \ ++ if (!ucs_test_all_flags(_attr, _required)) { \ ++ if ((_params)->flags & UCX_PERF_TEST_FLAG_VERBOSE) { \ ++ ucs_error("%s/%s does not support required "#_size"-bit atomic: %s", \ ++ (_params)->uct.tl_name, (_params)->uct.dev_name, \ ++ (_msg)[ucs_ffs64(~(_attr) & (_required))]); \ ++ } \ ++ return UCS_ERR_UNSUPPORTED; \ ++ } + + typedef struct { + union { +@@ -30,6 +49,47 @@ typedef struct { + unsigned long recv_buffer; + } ucx_perf_ep_info_t; + ++static const char *perf_iface_ops[] = { ++ [ucs_ilog2(UCT_IFACE_FLAG_AM_SHORT)] = "am short", ++ [ucs_ilog2(UCT_IFACE_FLAG_AM_BCOPY)] = "am bcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_AM_ZCOPY)] = "am zcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_PUT_SHORT)] = "put short", ++ [ucs_ilog2(UCT_IFACE_FLAG_PUT_BCOPY)] = "put bcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_PUT_ZCOPY)] = "put zcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_GET_SHORT)] = "get short", ++ [ucs_ilog2(UCT_IFACE_FLAG_GET_BCOPY)] = "get bcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_GET_ZCOPY)] = "get zcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE)] = "peer failure handler", ++ [ucs_ilog2(UCT_IFACE_FLAG_CONNECT_TO_IFACE)] = "connect to iface", ++ [ucs_ilog2(UCT_IFACE_FLAG_CONNECT_TO_EP)] = "connect to ep", ++ [ucs_ilog2(UCT_IFACE_FLAG_AM_DUP)] = "full reliability", ++ [ucs_ilog2(UCT_IFACE_FLAG_CB_SYNC)] = "sync callback", ++ [ucs_ilog2(UCT_IFACE_FLAG_CB_ASYNC)] = "async callback", ++ [ucs_ilog2(UCT_IFACE_FLAG_EVENT_SEND_COMP)] = "send completion event", ++ [ucs_ilog2(UCT_IFACE_FLAG_EVENT_RECV)] = "tag or active message event", ++ [ucs_ilog2(UCT_IFACE_FLAG_EVENT_RECV_SIG)] = "signaled message event", ++ [ucs_ilog2(UCT_IFACE_FLAG_PENDING)] = "pending", ++ [ucs_ilog2(UCT_IFACE_FLAG_TAG_EAGER_SHORT)] = "tag eager short", ++ [ucs_ilog2(UCT_IFACE_FLAG_TAG_EAGER_BCOPY)] = "tag eager bcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_TAG_EAGER_ZCOPY)] = "tag eager zcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_TAG_RNDV_ZCOPY)] = "tag rndv zcopy" ++}; ++ ++static const char *perf_atomic_op[] = { ++ [UCT_ATOMIC_OP_ADD] = "add", ++ [UCT_ATOMIC_OP_AND] = "and", ++ [UCT_ATOMIC_OP_OR] = "or" , ++ [UCT_ATOMIC_OP_XOR] = "xor" ++}; ++ ++static const char *perf_atomic_fop[] = { ++ [UCT_ATOMIC_OP_ADD] = "fetch-add", ++ [UCT_ATOMIC_OP_AND] = "fetch-and", ++ [UCT_ATOMIC_OP_OR] = "fetch-or", ++ [UCT_ATOMIC_OP_XOR] = "fetch-xor", ++ [UCT_ATOMIC_OP_SWAP] = "swap", ++ [UCT_ATOMIC_OP_CSWAP] = "cswap" ++}; + + /* + * This Quickselect routine is based on the algorithm described in +@@ -314,11 +374,17 @@ static inline uint64_t __get_flag(uct_perf_data_layout_t layout, uint64_t short_ + 0; + } + +-static inline uint64_t __get_atomic_flag(size_t size, uint64_t flag32, uint64_t flag64) ++static inline ucs_status_t __get_atomic_flag(size_t size, uint64_t *op32, ++ uint64_t *op64, uint64_t op) + { +- return (size == 4) ? flag32 : +- (size == 8) ? flag64 : +- 0; ++ if (size == sizeof(uint32_t)) { ++ *op32 = UCS_BIT(op); ++ return UCS_OK; ++ } else if (size == sizeof(uint64_t)) { ++ *op64 = UCS_BIT(op); ++ return UCS_OK; ++ } ++ return UCS_ERR_UNSUPPORTED; + } + + static inline size_t __get_max_size(uct_perf_data_layout_t layout, size_t short_m, +@@ -333,9 +399,13 @@ static inline size_t __get_max_size(uct_perf_data_layout_t layout, size_t short_ + static ucs_status_t uct_perf_test_check_capabilities(ucx_perf_params_t *params, + uct_iface_h iface) + { ++ uint64_t required_flags = 0; ++ uint64_t atomic_op32 = 0; ++ uint64_t atomic_op64 = 0; ++ uint64_t atomic_fop32 = 0; ++ uint64_t atomic_fop64 = 0; + uct_iface_attr_t attr; + ucs_status_t status; +- uint64_t required_flags; + size_t min_size, max_size, max_iov, message_size; + + status = uct_iface_query(iface, &attr); +@@ -367,32 +437,32 @@ static ucs_status_t uct_perf_test_check_capabilities(ucx_perf_params_t *params, + max_iov = attr.cap.put.max_iov; + break; + case UCX_PERF_CMD_GET: +- required_flags = __get_flag(params->uct.data_layout, 0, ++ required_flags = __get_flag(params->uct.data_layout, UCT_IFACE_FLAG_GET_SHORT, + UCT_IFACE_FLAG_GET_BCOPY, UCT_IFACE_FLAG_GET_ZCOPY); + min_size = __get_max_size(params->uct.data_layout, 0, 0, + attr.cap.get.min_zcopy); +- max_size = __get_max_size(params->uct.data_layout, 0, ++ max_size = __get_max_size(params->uct.data_layout, attr.cap.get.max_short, + attr.cap.get.max_bcopy, attr.cap.get.max_zcopy); + max_iov = attr.cap.get.max_iov; + break; + case UCX_PERF_CMD_ADD: +- required_flags = __get_atomic_flag(message_size, UCT_IFACE_FLAG_ATOMIC_ADD32, +- UCT_IFACE_FLAG_ATOMIC_ADD64); ++ ATOMIC_OP_CONFIG(message_size, &atomic_op32, &atomic_op64, UCT_ATOMIC_OP_ADD, ++ perf_atomic_op, params, status); + max_size = 8; + break; + case UCX_PERF_CMD_FADD: +- required_flags = __get_atomic_flag(message_size, UCT_IFACE_FLAG_ATOMIC_FADD32, +- UCT_IFACE_FLAG_ATOMIC_FADD64); ++ ATOMIC_OP_CONFIG(message_size, &atomic_fop32, &atomic_fop64, UCT_ATOMIC_OP_ADD, ++ perf_atomic_fop, params, status); + max_size = 8; + break; + case UCX_PERF_CMD_SWAP: +- required_flags = __get_atomic_flag(message_size, UCT_IFACE_FLAG_ATOMIC_SWAP32, +- UCT_IFACE_FLAG_ATOMIC_SWAP64); ++ ATOMIC_OP_CONFIG(message_size, &atomic_fop32, &atomic_fop64, UCT_ATOMIC_OP_SWAP, ++ perf_atomic_fop, params, status); + max_size = 8; + break; + case UCX_PERF_CMD_CSWAP: +- required_flags = __get_atomic_flag(message_size, UCT_IFACE_FLAG_ATOMIC_CSWAP32, +- UCT_IFACE_FLAG_ATOMIC_CSWAP64); ++ ATOMIC_OP_CONFIG(message_size, &atomic_fop32, &atomic_fop64, UCT_ATOMIC_OP_CSWAP, ++ perf_atomic_fop, params, status); + max_size = 8; + break; + default: +@@ -407,23 +477,35 @@ static ucs_status_t uct_perf_test_check_capabilities(ucx_perf_params_t *params, + return status; + } + +- if (!ucs_test_all_flags(attr.cap.flags, required_flags) || !required_flags) { ++ /* check atomics first */ ++ ATOMIC_OP_CHECK(32, attr.cap.atomic32.op_flags, atomic_op32, params, perf_atomic_op); ++ ATOMIC_OP_CHECK(64, attr.cap.atomic64.op_flags, atomic_op64, params, perf_atomic_op); ++ ATOMIC_OP_CHECK(32, attr.cap.atomic32.fop_flags, atomic_fop32, params, perf_atomic_fop); ++ ATOMIC_OP_CHECK(64, attr.cap.atomic64.fop_flags, atomic_fop64, params, perf_atomic_fop); ++ ++ /* check iface flags */ ++ if (!(atomic_op32 | atomic_op64 | atomic_fop32 | atomic_fop64) && ++ (!ucs_test_all_flags(attr.cap.flags, required_flags) || !required_flags)) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("Device does not support required operation"); ++ ucs_error("%s/%s does not support operation %s", ++ params->uct.tl_name, params->uct.dev_name, ++ perf_iface_ops[ucs_ffs64(~attr.cap.flags & required_flags)]); + } + return UCS_ERR_UNSUPPORTED; + } + + if (message_size < min_size) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("Message size too small"); ++ ucs_error("Message size (%zu) is smaller than min supported (%zu)", ++ message_size, min_size); + } + return UCS_ERR_UNSUPPORTED; + } + + if (message_size > max_size) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("Message size too big"); ++ ucs_error("Message size (%zu) is larger than max supported (%zu)", ++ message_size, max_size); + } + return UCS_ERR_UNSUPPORTED; + } +@@ -439,25 +521,27 @@ static ucs_status_t uct_perf_test_check_capabilities(ucx_perf_params_t *params, + } + + if ((params->uct.data_layout == UCT_PERF_DATA_LAYOUT_ZCOPY) && +- (params->am_hdr_size > attr.cap.am.max_hdr)) ++ (params->am_hdr_size > attr.cap.am.max_hdr)) + { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("AM header size too big"); ++ ucs_error("AM header size (%zu) is larger than max supported (%zu)", ++ params->am_hdr_size, attr.cap.am.max_hdr); + } + return UCS_ERR_UNSUPPORTED; + } + + if (params->am_hdr_size > message_size) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("AM header size larger than message size"); ++ ucs_error("AM header size (%zu) is larger than message size (%zu)", ++ params->am_hdr_size, message_size); + } + return UCS_ERR_INVALID_PARAM; + } + + if (params->uct.fc_window > UCT_PERF_TEST_MAX_FC_WINDOW) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("AM flow-control window too large (should be <= %d)", +- UCT_PERF_TEST_MAX_FC_WINDOW); ++ ucs_error("AM flow-control window (%d) too large (should be <= %d)", ++ params->uct.fc_window, UCT_PERF_TEST_MAX_FC_WINDOW); + } + return UCS_ERR_INVALID_PARAM; + } +@@ -560,6 +644,7 @@ static ucs_status_t uct_perf_test_setup_endpoints(ucx_perf_context_t *perf) + } + + if (info.rkey_size > 0) { ++ memset(rkey_buffer, 0, info.rkey_size); + status = uct_md_mkey_pack(perf->uct.md, perf->uct.recv_mem.memh, rkey_buffer); + if (status != UCS_OK) { + ucs_error("Failed to uct_rkey_pack: %s", ucs_status_string(status)); +@@ -653,7 +738,7 @@ static ucs_status_t uct_perf_test_setup_endpoints(ucx_perf_context_t *perf) + uct_perf_iface_flush_b(perf); + + free(buffer); +- rte_call(perf, barrier); ++ uct_perf_barrier(perf); + return UCS_OK; + + err_destroy_eps: +@@ -676,9 +761,9 @@ static void uct_perf_test_cleanup_endpoints(ucx_perf_context_t *perf) + { + unsigned group_size, group_index, i; + +- rte_call(perf, barrier); ++ uct_perf_barrier(perf); + +- uct_iface_set_am_handler(perf->uct.iface, UCT_PERF_TEST_AM_ID, NULL, NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(perf->uct.iface, UCT_PERF_TEST_AM_ID, NULL, NULL, 0); + + group_size = rte_call(perf, group_size); + group_index = rte_call(perf, group_index); +@@ -821,6 +906,20 @@ ucp_perf_test_alloc_cuda(void **addr, size_t length) + } + + static ucs_status_t ++ucp_perf_test_alloc_cuda_managed(void **addr, size_t length) ++{ ++#if HAVE_CUDA ++ cudaError_t cerr; ++ ++ cerr = cudaMallocManaged(addr, length, cudaMemAttachGlobal); ++ if (cerr != cudaSuccess) { ++ return UCS_ERR_NO_MEMORY; ++ } ++#endif ++ return UCS_OK; ++} ++ ++static ucs_status_t + ucp_perf_test_alloc_contig(ucx_perf_context_t *perf, ucx_perf_params_t *params, + void **addr, size_t length, ucp_mem_h *memh, + int check_non_blk_flag) +@@ -830,6 +929,8 @@ ucp_perf_test_alloc_contig(ucx_perf_context_t *perf, ucx_perf_params_t *params, + check_non_blk_flag); + } else if (perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA) { + return ucp_perf_test_alloc_cuda(addr, length); ++ } else if (perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA_MANAGED) { ++ return ucp_perf_test_alloc_cuda_managed(addr, length); + } + + return UCS_ERR_UNSUPPORTED; +@@ -837,9 +938,15 @@ ucp_perf_test_alloc_contig(ucx_perf_context_t *perf, ucx_perf_params_t *params, + + static void ucp_perf_test_free_contig(ucx_perf_context_t *perf, void *addr, ucp_mem_h memh) + { ++ ucs_status_t status; ++ + if (perf->params.mem_type == UCT_MD_MEM_TYPE_HOST) { +- ucp_mem_unmap(perf->ucp.context, memh); +- } else if (perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA) { ++ status = ucp_mem_unmap(perf->ucp.context, memh); ++ if (status != UCS_OK) { ++ ucs_warn("ucp_mem_unmap() failed: %s", ucs_status_string(status)); ++ } ++ } else if ((perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA) || ++ (perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA_MANAGED)) { + #if HAVE_CUDA + cudaFree(addr); + #endif +@@ -950,7 +1057,7 @@ static ucs_status_t ucp_perf_test_exchange_status(ucx_perf_context_t *perf, + ucs_status_t status) + { + unsigned group_size = rte_call(perf, group_size); +- ucs_status_t collective_status = UCS_OK; ++ ucs_status_t collective_status = status; + struct iovec vec; + void *req = NULL; + unsigned i; +@@ -1081,6 +1188,13 @@ static ucs_status_t ucp_perf_test_setup_endpoints(ucx_perf_context_t *perf, + if (status != UCS_OK) { + ucp_perf_test_destroy_eps(perf, group_size); + } ++ ++ /* force wireup completion */ ++ status = ucp_worker_flush(perf->ucp.worker); ++ if (status != UCS_OK) { ++ ucs_warn("ucp_worker_flush() failed: %s", ucs_status_string(status)); ++ } ++ + return status; + + err_free_buffer: +@@ -1096,7 +1210,7 @@ static void ucp_perf_test_cleanup_endpoints(ucx_perf_context_t *perf) + { + unsigned group_size; + +- rte_call(perf, barrier); ++ ucp_perf_barrier(perf); + + group_size = rte_call(perf, group_size); + +@@ -1167,6 +1281,18 @@ out: + return status; + } + ++void uct_perf_barrier(ucx_perf_context_t *perf) ++{ ++ rte_call(perf, barrier, (void(*)(void*))uct_worker_progress, ++ (void*)perf->uct.worker); ++} ++ ++void ucp_perf_barrier(ucx_perf_context_t *perf) ++{ ++ rte_call(perf, barrier, (void(*)(void*))ucp_worker_progress, ++ (void*)perf->ucp.worker); ++} ++ + static ucs_status_t uct_perf_setup(ucx_perf_context_t *perf, ucx_perf_params_t *params) + { + uct_iface_config_t *iface_config; +@@ -1211,6 +1337,8 @@ static ucs_status_t uct_perf_setup(ucx_perf_context_t *perf, ucx_perf_params_t * + } + + status = uct_perf_test_check_capabilities(params, perf->uct.iface); ++ /* sync status across all processes */ ++ status = ucp_perf_test_exchange_status(perf, status); + if (status != UCS_OK) { + goto out_iface_close; + } +@@ -1320,7 +1448,7 @@ err: + static void ucp_perf_cleanup(ucx_perf_context_t *perf) + { + ucp_perf_test_cleanup_endpoints(perf); +- rte_call(perf, barrier); ++ ucp_perf_barrier(perf); + ucp_perf_test_free_mem(perf); + ucp_worker_destroy(perf->ucp.worker); + ucp_cleanup(perf->ucp.context); +@@ -1330,14 +1458,43 @@ static struct { + ucs_status_t (*setup)(ucx_perf_context_t *perf, ucx_perf_params_t *params); + void (*cleanup)(ucx_perf_context_t *perf); + ucs_status_t (*run)(ucx_perf_context_t *perf); ++ void (*barrier)(ucx_perf_context_t *perf); + } ucx_perf_funcs[] = { +- [UCX_PERF_API_UCT] = {uct_perf_setup, uct_perf_cleanup, uct_perf_test_dispatch}, +- [UCX_PERF_API_UCP] = {ucp_perf_setup, ucp_perf_cleanup, ucp_perf_test_dispatch} ++ [UCX_PERF_API_UCT] = {uct_perf_setup, uct_perf_cleanup, ++ uct_perf_test_dispatch, uct_perf_barrier}, ++ [UCX_PERF_API_UCP] = {ucp_perf_setup, ucp_perf_cleanup, ++ ucp_perf_test_dispatch, ucp_perf_barrier} + }; + + static int ucx_perf_thread_spawn(ucx_perf_context_t *perf, + ucx_perf_result_t* result); + ++#if HAVE_CUDA ++static ucs_status_t ucx_perf_init_cuda_device(ucx_perf_context_t *perf) ++{ ++ cudaError_t cerr; ++ unsigned group_index; ++ int num_gpus; ++ int gpu_index; ++ ++ group_index = rte_call(perf, group_index); ++ ++ cerr = cudaGetDeviceCount(&num_gpus); ++ if (cerr != cudaSuccess) { ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ gpu_index = group_index % num_gpus; ++ ++ cerr = cudaSetDevice(gpu_index); ++ if (cerr != cudaSuccess) { ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ return UCS_OK; ++} ++#endif ++ + ucs_status_t ucx_perf_run(ucx_perf_params_t *params, ucx_perf_result_t *result) + { + ucx_perf_context_t *perf; +@@ -1363,6 +1520,16 @@ ucs_status_t ucx_perf_run(ucx_perf_params_t *params, ucx_perf_result_t *result) + + ucx_perf_test_reset(perf, params); + ++#if HAVE_CUDA ++ if ((params->mem_type == UCT_MD_MEM_TYPE_CUDA) || ++ (params->mem_type == UCT_MD_MEM_TYPE_CUDA_MANAGED)) { ++ status = ucx_perf_init_cuda_device(perf); ++ if (status != UCS_OK) { ++ goto out_free; ++ } ++ } ++#endif ++ + status = ucx_perf_funcs[params->api].setup(perf, params); + if (status != UCS_OK) { + goto out_free; +@@ -1376,13 +1543,13 @@ ucs_status_t ucx_perf_run(ucx_perf_params_t *params, ucx_perf_result_t *result) + goto out_cleanup; + } + +- rte_call(perf, barrier); ++ ucx_perf_funcs[params->api].barrier(perf); + ucx_perf_test_reset(perf, params); + } + + /* Run test */ + status = ucx_perf_funcs[params->api].run(perf); +- rte_call(perf, barrier); ++ ucx_perf_funcs[params->api].barrier(perf); + if (status == UCS_OK) { + ucx_perf_calc_result(perf, result); + rte_call(perf, report, result, perf->params.report_arg, 1); +@@ -1426,7 +1593,7 @@ static void* ucx_perf_thread_run_test(void* arg) + if (params->warmup_iter > 0) { + ucx_perf_set_warmup(perf, params); + statuses[tid] = ucx_perf_funcs[params->api].run(perf); +- rte_call(perf, barrier); ++ ucx_perf_funcs[params->api].barrier(perf); + for (i = 0; i < tctx->ntid; i++) { + if (UCS_OK != statuses[i]) { + goto out; +@@ -1439,7 +1606,7 @@ static void* ucx_perf_thread_run_test(void* arg) + /* Run test */ + #pragma omp barrier + statuses[tid] = ucx_perf_funcs[params->api].run(perf); +- rte_call(perf, barrier); ++ ucx_perf_funcs[params->api].barrier(perf); + for (i = 0; i < tctx->ntid; i++) { + if (UCS_OK != statuses[i]) { + goto out; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.h b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.h +index 9c6853b..be584bd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.h +@@ -78,8 +78,8 @@ typedef enum { + + enum ucx_perf_test_flags { + UCX_PERF_TEST_FLAG_VALIDATE = UCS_BIT(1), /* Validate data. Affects performance. */ +- UCX_PERF_TEST_FLAG_ONE_SIDED = UCS_BIT(2), /* For test which involve only one side, +- the responder would not call progress(). */ ++ UCX_PERF_TEST_FLAG_ONE_SIDED = UCS_BIT(2), /* For tests which involves only one side, ++ the responder should not call progress(). */ + UCX_PERF_TEST_FLAG_MAP_NONBLOCK = UCS_BIT(3), /* Map memory in non-blocking mode */ + UCX_PERF_TEST_FLAG_TAG_WILDCARD = UCS_BIT(4), /* For tag tests, use wildcard mask */ + UCX_PERF_TEST_FLAG_TAG_UNEXP_PROBE = UCS_BIT(5), /* For tag tests, use probe to get unexpected receive */ +@@ -128,7 +128,8 @@ typedef struct ucx_perf_rte { + unsigned (*group_index)(void *rte_group); + + /* Barrier */ +- void (*barrier)(void *rte_group); ++ void (*barrier)(void *rte_group, void (*progress)(void *arg), ++ void *arg); + + /* Direct modex */ + void (*post_vec)(void *rte_group, const struct iovec *iovec, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf_int.h b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf_int.h +index 77a6bf0..c2ffb65 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf_int.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf_int.h +@@ -114,6 +114,12 @@ ucs_status_t ucp_perf_test_dispatch(ucx_perf_context_t *perf); + void ucx_perf_calc_result(ucx_perf_context_t *perf, ucx_perf_result_t *result); + + ++void uct_perf_barrier(ucx_perf_context_t *perf); ++ ++ ++void ucp_perf_barrier(ucx_perf_context_t *perf); ++ ++ + static UCS_F_ALWAYS_INLINE int ucx_perf_context_done(ucx_perf_context_t *perf) + { + return ucs_unlikely((perf->current.iters >= perf->max_iter) || +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/perftest.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/perftest.c +index ce83507..b770f43 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/perftest.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/perftest.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #if HAVE_MPI + # include +@@ -76,7 +77,7 @@ struct perftest_context { + sock_rte_group_t sock_rte_group; + }; + +-#define TEST_PARAMS_ARGS "t:n:s:W:O:w:D:i:H:oSCqMr:T:d:x:A:BUm:" ++#define TEST_PARAMS_ARGS "t:n:s:W:O:w:D:i:H:oSCqM:r:T:d:x:A:BUm:" + + + test_type_t tests[] = { +@@ -152,36 +153,53 @@ test_type_t tests[] = { + {NULL} + }; + +-static int safe_send(int sock, void *data, size_t size) ++static int sock_io(int sock, ssize_t (*sock_call)(int, void *, size_t, int), ++ int poll_events, void *data, size_t size, ++ void (*progress)(void *arg), void *arg, const char *name) + { + size_t total = 0; ++ struct pollfd pfd; + int ret; + + while (total < size) { +- ret = send(sock, (char*)data + total, size - total, 0); +- if (ret < 0) { +- ucs_error("send() failed: %m"); ++ pfd.fd = sock; ++ pfd.events = poll_events; ++ pfd.revents = 0; ++ ++ ret = poll(&pfd, 1, 1); /* poll for 1ms */ ++ if (ret > 0) { ++ ucs_assert(ret == 1); ++ ucs_assert(pfd.revents & poll_events); ++ ++ ret = sock_call(sock, (char*)data + total, size - total, 0); ++ if (ret < 0) { ++ ucs_error("%s() failed: %m", name); ++ return -1; ++ } ++ total += ret; ++ } else if ((ret < 0) && (errno != EINTR)) { ++ ucs_error("poll(fd=%d) failed: %m", sock); + return -1; + } +- total += ret; ++ ++ /* progress user context */ ++ if (progress != NULL) { ++ progress(arg); ++ } + } + return 0; + } + +-static int safe_recv(int sock, void *data, size_t size) ++static int safe_send(int sock, void *data, size_t size, ++ void (*progress)(void *arg), void *arg) + { +- size_t total = 0; +- int ret; ++ return sock_io(sock, (void*)send, POLLOUT, data, size, progress, arg, "send"); ++} + +- while (total < size) { +- ret = recv(sock, (char*)data + total, size - total, 0); +- if (ret < 0) { +- ucs_error("recv() failed: %m"); +- return -1; +- } +- total += ret; +- } +- return 0; ++static int safe_recv(int sock, void *data, size_t size, ++ void (*progress)(void *arg), void *arg) ++{ ++ return sock_io(sock, recv, POLLIN, data, size, progress, arg, "recv"); + } + + static void print_progress(char **test_names, unsigned num_names, +@@ -359,6 +377,7 @@ static void usage(const struct perftest_context *ctx, const char *program) + printf(" host - system memory(default)\n"); + #if HAVE_CUDA + printf(" cuda - NVIDIA GPU memory\n"); ++ printf(" cuda-managed - NVIDIA cuda managed/unified memory\n"); + #endif + printf(" -h show this help message\n"); + printf("\n"); +@@ -441,8 +460,8 @@ static ucs_status_t parse_message_sizes_params(const char *optarg, + } + ++token_num; + +- free(params->msg_size_list); /* free previously allocated buffer */ +- params->msg_size_list = malloc(sizeof(*params->msg_size_list) * token_num); ++ params->msg_size_list = realloc(params->msg_size_list, ++ sizeof(*params->msg_size_list) * token_num); + if (NULL == params->msg_size_list) { + return UCS_ERR_NO_MEMORY; + } +@@ -468,6 +487,7 @@ static ucs_status_t parse_message_sizes_params(const char *optarg, + + static void init_test_params(ucx_perf_params_t *params) + { ++ memset(params, 0, sizeof(*params)); + params->api = UCX_PERF_API_LAST; + params->command = UCX_PERF_CMD_LAST; + params->test_type = UCX_PERF_TEST_TYPE_LAST; +@@ -624,12 +644,13 @@ static ucs_status_t parse_test_params(ucx_perf_params_t *params, char opt, const + if (!strcmp(optarg, "host")) { + params->mem_type = UCT_MD_MEM_TYPE_HOST; + return UCS_OK; +- } else if(!strcmp(optarg, "cuda")) { ++ } else if(!strncmp(optarg, "cuda", 4)) { + #if HAVE_CUDA +- params->mem_type = UCT_MD_MEM_TYPE_CUDA; ++ params->mem_type = (!strcmp(optarg, "cuda-managed")) ? ++ UCT_MD_MEM_TYPE_CUDA_MANAGED : UCT_MD_MEM_TYPE_CUDA; + return UCS_OK; + #else +- ucs_error("not build with cuda support"); ++ ucs_error("not built with cuda support"); + return UCS_ERR_INVALID_PARAM; + #endif + } +@@ -639,7 +660,8 @@ static ucs_status_t parse_test_params(ucx_perf_params_t *params, char opt, const + } + } + +-static ucs_status_t read_batch_file(FILE *batch_file, ucx_perf_params_t *params, ++static ucs_status_t read_batch_file(FILE *batch_file, const char *file_name, ++ int *line_num, ucx_perf_params_t *params, + char** test_name_p) + { + #define MAX_SIZE 256 +@@ -655,6 +677,7 @@ static ucs_status_t read_batch_file(FILE *batch_file, ucx_perf_params_t *params, + if (fgets(buf, sizeof(buf) - 1, batch_file) == NULL) { + return UCS_ERR_NO_ELEM; + } ++ ++(*line_num); + + argc = 0; + p = strtok(buf, " \t\n\r"); +@@ -665,13 +688,12 @@ static ucs_status_t read_batch_file(FILE *batch_file, ucx_perf_params_t *params, + argv[argc] = NULL; + } while ((argc == 0) || (argv[0][0] == '#')); + +- + optind = 1; + while ((c = getopt (argc, argv, TEST_PARAMS_ARGS)) != -1) { + status = parse_test_params(params, c, optarg); + if (status != UCS_OK) { +- ucs_error("Invalid argument in batch file: -%c, status(%d):\"%s\"", +- c, status, ucs_status_string(status)); ++ ucs_error("in batch file '%s' line %d: -%c %s: %s", ++ file_name, *line_num, c, optarg, ucs_status_string(status)); + return status; + } + } +@@ -703,7 +725,7 @@ static ucs_status_t parse_opts(struct perftest_context *ctx, int mpi_initialized + break; + case 'b': + if (ctx->num_batch_files < MAX_BATCH_FILES) { +- ctx->batch_files[ctx->num_batch_files++] = strdup(optarg); ++ ctx->batch_files[ctx->num_batch_files++] = optarg; + } + break; + case 'N': +@@ -755,7 +777,8 @@ static unsigned sock_rte_group_index(void *rte_group) + return group->is_server ? 0 : 1; + } + +-static void sock_rte_barrier(void *rte_group) ++static void sock_rte_barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg) + { + #pragma omp master + { +@@ -764,10 +787,10 @@ static void sock_rte_barrier(void *rte_group) + unsigned sync; + + sync = magic; +- safe_send(group->connfd, &sync, sizeof(unsigned)); ++ safe_send(group->connfd, &sync, sizeof(unsigned), progress, arg); + + sync = 0; +- safe_recv(group->connfd, &sync, sizeof(unsigned)); ++ safe_recv(group->connfd, &sync, sizeof(unsigned), progress, arg); + + ucs_assert(sync == magic); + } +@@ -786,9 +809,10 @@ static void sock_rte_post_vec(void *rte_group, const struct iovec *iovec, + size += iovec[i].iov_len; + } + +- safe_send(group->connfd, &size, sizeof(size)); ++ safe_send(group->connfd, &size, sizeof(size), NULL, NULL); + for (i = 0; i < iovcnt; ++i) { +- safe_send(group->connfd, iovec[i].iov_base, iovec[i].iov_len); ++ safe_send(group->connfd, iovec[i].iov_base, iovec[i].iov_len, NULL, ++ NULL); + } + } + +@@ -805,9 +829,9 @@ static void sock_rte_recv(void *rte_group, unsigned src, void *buffer, + } + + ucs_assert_always(src == (1 - group_index)); +- safe_recv(group->connfd, &size, sizeof(size)); ++ safe_recv(group->connfd, &size, sizeof(size), NULL, NULL); + ucs_assert_always(size <= max); +- safe_recv(group->connfd, buffer, size); ++ safe_recv(group->connfd, buffer, size, NULL, NULL); + } + + static void sock_rte_report(void *rte_group, const ucx_perf_result_t *result, +@@ -882,7 +906,7 @@ static ucs_status_t setup_sock_rte(struct perftest_context *ctx) + } + + close(sockfd); +- safe_recv(connfd, &ctx->params, sizeof(ctx->params)); ++ safe_recv(connfd, &ctx->params, sizeof(ctx->params), NULL, NULL); + if (ctx->params.msg_size_cnt) { + ctx->params.msg_size_list = malloc(sizeof(*ctx->params.msg_size_list) * + ctx->params.msg_size_cnt); +@@ -891,7 +915,8 @@ static ucs_status_t setup_sock_rte(struct perftest_context *ctx) + goto err_close_connfd; + } + safe_recv(connfd, ctx->params.msg_size_list, +- sizeof(*ctx->params.msg_size_list) * ctx->params.msg_size_cnt); ++ sizeof(*ctx->params.msg_size_list) * ctx->params.msg_size_cnt, ++ NULL, NULL); + } + + ctx->sock_rte_group.connfd = connfd; +@@ -918,10 +943,11 @@ static ucs_status_t setup_sock_rte(struct perftest_context *ctx) + goto err_close_sockfd; + } + +- safe_send(sockfd, &ctx->params, sizeof(ctx->params)); ++ safe_send(sockfd, &ctx->params, sizeof(ctx->params), NULL, NULL); + if (ctx->params.msg_size_cnt) { + safe_send(sockfd, ctx->params.msg_size_list, +- sizeof(*ctx->params.msg_size_list) * ctx->params.msg_size_cnt); ++ sizeof(*ctx->params.msg_size_list) * ctx->params.msg_size_cnt, ++ NULL, NULL); + } + + ctx->sock_rte_group.connfd = sockfd; +@@ -969,10 +995,67 @@ static unsigned mpi_rte_group_index(void *rte_group) + return rank; + } + +-static void mpi_rte_barrier(void *rte_group) ++static void mpi_rte_barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg) + { ++ int group_size, my_rank, i; ++ MPI_Request *reqs; ++ int nreqs = 0; ++ int dummy; ++ int flag; ++ + #pragma omp master +- MPI_Barrier(MPI_COMM_WORLD); ++ ++ /* ++ * Naive non-blocking barrier implementation over send/recv, to call user ++ * progress while waiting for completion. ++ * Not using MPI_Ibarrier to be compatible with MPI-1. ++ */ ++ ++ MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); ++ MPI_Comm_size(MPI_COMM_WORLD, &group_size); ++ ++ /* allocate maximal possible number of requests */ ++ reqs = (MPI_Request*)alloca(sizeof(*reqs) * group_size); ++ ++ if (my_rank == 0) { ++ /* root gathers "ping" from all other ranks */ ++ for (i = 1; i < group_size; ++i) { ++ MPI_Irecv(&dummy, 0, MPI_INT, ++ i /* source */, ++ 1 /* tag */, ++ MPI_COMM_WORLD, ++ &reqs[nreqs++]); ++ } ++ } else { ++ /* every non-root rank sends "ping" and waits for "pong" */ ++ MPI_Send(&dummy, 0, MPI_INT, ++ 0 /* dest */, ++ 1 /* tag */, ++ MPI_COMM_WORLD); ++ MPI_Irecv(&dummy, 0, MPI_INT, ++ 0 /* source */, ++ 2 /* tag */, ++ MPI_COMM_WORLD, ++ &reqs[nreqs++]); ++ } ++ ++ /* Waiting for receive requests */ ++ do { ++ MPI_Testall(nreqs, reqs, &flag, MPI_STATUSES_IGNORE); ++ progress(arg); ++ } while (!flag); ++ ++ if (my_rank == 0) { ++ /* root sends "pong" to all ranks */ ++ for (i = 1; i < group_size; ++i) { ++ MPI_Send(&dummy, 0, MPI_INT, ++ i /* dest */, ++ 2 /* tag */, ++ MPI_COMM_WORLD); ++ } ++ } ++ + #pragma omp barrier + } + +@@ -1054,7 +1137,8 @@ static unsigned ext_rte_group_index(void *rte_group) + return rte_group_rank(group); + } + +-static void ext_rte_barrier(void *rte_group) ++static void ext_rte_barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg) + { + #pragma omp master + { +@@ -1255,6 +1339,16 @@ static ucs_status_t check_system(struct perftest_context *ctx) + return UCS_OK; + } + ++static void clone_params(ucx_perf_params_t *dest, const ucx_perf_params_t *src) ++{ ++ size_t msg_size_list_size; ++ ++ *dest = *src; ++ msg_size_list_size = dest->msg_size_cnt * sizeof(*dest->msg_size_list); ++ dest->msg_size_list = malloc(msg_size_list_size); ++ memcpy(dest->msg_size_list, src->msg_size_list, msg_size_list_size); ++} ++ + static ucs_status_t run_test_recurs(struct perftest_context *ctx, + ucx_perf_params_t *parent_params, + unsigned depth) +@@ -1263,6 +1357,7 @@ static ucs_status_t run_test_recurs(struct perftest_context *ctx, + ucx_perf_result_t result; + ucs_status_t status; + FILE *batch_file; ++ int line_num; + + ucs_trace_func("depth=%u, num_files=%u", depth, ctx->num_batch_files); + +@@ -1277,17 +1372,19 @@ static ucs_status_t run_test_recurs(struct perftest_context *ctx, + return UCS_ERR_IO_ERROR; + } + +- params = *parent_params; +- while ((status = read_batch_file(batch_file, ¶ms, &ctx->test_names[depth])) == UCS_OK) { ++ clone_params(¶ms, parent_params); ++ line_num = 0; ++ while ((status = read_batch_file(batch_file, ctx->batch_files[depth], ++ &line_num, ¶ms, ++ &ctx->test_names[depth])) == UCS_OK) { + status = run_test_recurs(ctx, ¶ms, depth + 1); ++ free(params.msg_size_list); + free(ctx->test_names[depth]); +- if ((NULL == parent_params->msg_size_list) && +- (NULL != params.msg_size_list)) { +- free(params.msg_size_list); +- params.msg_size_list = NULL; +- } +- params = *parent_params; ++ ctx->test_names[depth] = NULL; ++ ++ clone_params(¶ms, parent_params); + } ++ free(params.msg_size_list); + + fclose(batch_file); + return UCS_OK; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/ucp_tests.cc b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/ucp_tests.cc +index 7c06af6..c048ded 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/ucp_tests.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/ucp_tests.cc +@@ -80,7 +80,9 @@ public: + } + + void UCS_F_ALWAYS_INLINE progress_responder() { +- if (!(FLAGS & UCX_PERF_TEST_FLAG_ONE_SIDED)) { ++ if (!(FLAGS & UCX_PERF_TEST_FLAG_ONE_SIDED) && ++ !(m_perf.params.flags & UCX_PERF_TEST_FLAG_ONE_SIDED)) ++ { + ucp_worker_progress(m_perf.ucp.worker); + } + } +@@ -293,13 +295,14 @@ public: + + if (m_perf.params.mem_type == UCT_MD_MEM_TYPE_HOST) { + *((volatile uint8_t*)m_perf.recv_buffer + length - 1) = -1; +- } else if (m_perf.params.mem_type == UCT_MD_MEM_TYPE_CUDA) { ++ } else if ((m_perf.params.mem_type == UCT_MD_MEM_TYPE_CUDA) || ++ (m_perf.params.mem_type == UCT_MD_MEM_TYPE_CUDA_MANAGED)) { + #if HAVE_CUDA + cudaMemset(((uint8_t*)m_perf.recv_buffer + length - 1), -1, 1); + #endif + } + +- rte_call(&m_perf, barrier); ++ ucp_perf_barrier(&m_perf); + + my_index = rte_call(&m_perf, group_index); + +@@ -339,7 +342,7 @@ public: + + wait_window(m_max_outstanding); + ucp_worker_flush(m_perf.ucp.worker); +- rte_call(&m_perf, barrier); ++ ucp_perf_barrier(&m_perf); + return UCS_OK; + } + +@@ -360,7 +363,7 @@ public: + + ucp_perf_test_prepare_iov_buffers(); + +- rte_call(&m_perf, barrier); ++ ucp_perf_barrier(&m_perf); + + my_index = rte_call(&m_perf, group_index); + +@@ -404,7 +407,7 @@ public: + ucx_perf_update(&m_perf, 0, 0); + } + +- rte_call(&m_perf, barrier); ++ ucp_perf_barrier(&m_perf); + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/uct_tests.cc b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/uct_tests.cc +index 59a4524..7bdd235 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/uct_tests.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/uct_tests.cc +@@ -37,15 +37,19 @@ public: + uct_iface_attr_t attr; + status = uct_iface_query(m_perf.uct.iface, &attr); + ucs_assert_always(status == UCS_OK); +- if (attr.cap.flags & (UCT_IFACE_FLAG_AM_SHORT|UCT_IFACE_FLAG_AM_BCOPY|UCT_IFACE_FLAG_AM_ZCOPY)) { +- status = uct_iface_set_am_handler(m_perf.uct.iface, UCT_PERF_TEST_AM_ID, +- am_hander, m_perf.recv_buffer, UCT_CB_FLAG_SYNC); ++ if (attr.cap.flags & (UCT_IFACE_FLAG_AM_SHORT | ++ UCT_IFACE_FLAG_AM_BCOPY | ++ UCT_IFACE_FLAG_AM_ZCOPY)) { ++ status = uct_iface_set_am_handler(m_perf.uct.iface, ++ UCT_PERF_TEST_AM_ID, am_hander, ++ m_perf.recv_buffer, 0); + ucs_assert_always(status == UCS_OK); + } + } + + ~uct_perf_test_runner() { +- uct_iface_set_am_handler(m_perf.uct.iface, UCT_PERF_TEST_AM_ID, NULL, NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_perf.uct.iface, UCT_PERF_TEST_AM_ID, NULL, ++ NULL, 0); + } + + /** +@@ -213,29 +217,29 @@ public: + } + case UCX_PERF_CMD_ADD: + if (length == sizeof(uint32_t)) { +- return uct_ep_atomic_add32(ep, sn - prev_sn, remote_addr, rkey); ++ return uct_ep_atomic32_post(ep, UCT_ATOMIC_OP_ADD, sn - prev_sn, remote_addr, rkey); + } else if (length == sizeof(uint64_t)) { +- return uct_ep_atomic_add64(ep, sn - prev_sn, remote_addr, rkey); ++ return uct_ep_atomic64_post(ep, UCT_ATOMIC_OP_ADD, sn - prev_sn, remote_addr, rkey); + } else { + return UCS_ERR_INVALID_PARAM; + } + case UCX_PERF_CMD_FADD: + if (length == sizeof(uint32_t)) { +- return uct_ep_atomic_fadd32(ep, sn - prev_sn, remote_addr, rkey, +- (uint32_t*)buffer, comp); ++ return uct_ep_atomic32_fetch(ep, UCT_ATOMIC_OP_ADD, sn - prev_sn, ++ (uint32_t*)buffer, remote_addr, rkey, comp); + } else if (length == sizeof(uint64_t)) { +- return uct_ep_atomic_fadd64(ep, sn - prev_sn, remote_addr, rkey, +- (uint64_t*)buffer, comp); ++ return uct_ep_atomic64_fetch(ep, UCT_ATOMIC_OP_ADD, sn - prev_sn, ++ (uint64_t*)buffer, remote_addr, rkey, comp); + } else { + return UCS_ERR_INVALID_PARAM; + } + case UCX_PERF_CMD_SWAP: + if (length == sizeof(uint32_t)) { +- return uct_ep_atomic_swap32(ep, sn, remote_addr, rkey, +- (uint32_t*)buffer, comp); ++ return uct_ep_atomic32_fetch(ep, UCT_ATOMIC_OP_SWAP, sn, ++ (uint32_t*)buffer, remote_addr, rkey, comp); + } else if (length == sizeof(uint64_t)) { +- return uct_ep_atomic_swap64(ep, sn, remote_addr, rkey, +- (uint64_t*)buffer, comp); ++ return uct_ep_atomic64_fetch(ep, UCT_ATOMIC_OP_SWAP, sn, ++ (uint64_t*)buffer, remote_addr, rkey, comp); + } else { + return UCS_ERR_INVALID_PARAM; + } +@@ -312,7 +316,7 @@ public: + uct_perf_test_prepare_iov_buffer(); + + *recv_sn = -1; +- rte_call(&m_perf, barrier); ++ uct_perf_barrier(&m_perf); + + my_index = rte_call(&m_perf, group_index); + +@@ -376,7 +380,7 @@ public: + (psn_t*)m_perf.send_buffer; + my_index = rte_call(&m_perf, group_index); + +- rte_call(&m_perf, barrier); ++ uct_perf_barrier(&m_perf); + + ucx_perf_test_start_clock(&m_perf); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/profile/read_profile.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/profile/read_profile.c +index 5f428de..53e142c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/profile/read_profile.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/profile/read_profile.c +@@ -4,7 +4,7 @@ + * See file LICENSE for terms. + */ + +-#include ++#include + #include + + #include +@@ -455,6 +455,19 @@ static int show_profile_data(profile_data_t *data, options_t *opts) + return 0; + } + ++static void usage() ++{ ++ printf("Usage: ucx_read_profile [options] [profile-file]\n"); ++ printf("Options are:\n"); ++ printf(" -r Show raw output\n"); ++ printf(" -t Select time units to use:\n"); ++ printf(" sec - seconds\n"); ++ printf(" msec - milliseconds\n"); ++ printf(" usec - microseconds (default)\n"); ++ printf(" nsec - nanoseconds\n"); ++ printf(" -h Show this help message\n"); ++} ++ + int parse_args(int argc, char **argv, options_t *opts) + { + int c; +@@ -481,12 +494,17 @@ int parse_args(int argc, char **argv, options_t *opts) + } + break; + case 'h': ++ usage(); ++ return -127; + default: ++ usage(); + return -1; + } + } + + if (optind >= argc) { ++ printf("Error: missing profile file argument\n"); ++ usage(); + return -1; + } + +@@ -500,13 +518,9 @@ int main(int argc, char **argv) + options_t opts; + int ret; + +- if (parse_args(argc, argv, &opts) < 0) { +- printf("Usage: %s [options] \n", basename(argv[0])); +- printf("Options:\n"); +- printf(" -r raw output\n"); +- printf(" -t UNITS select time units (sec/msec/usec/nsec)\n"); +- printf("\n"); +- return -1; ++ ret = parse_args(argc, argv, &opts); ++ if (ret < 0) { ++ return (ret == -127) ? 0 : ret; + } + + if (read_profile_data(opts.filename, &data) < 0) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/Makefile.am +index 0a0b337..d0ba1b7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/Makefile.am +@@ -34,21 +34,33 @@ noinst_HEADERS = \ + malloc/malloc_hook.h \ + malloc/allocator.h \ + mmap/mmap.h \ +- util/ucm_config.h \ + util/replace.h \ + util/log.h \ + util/reloc.h \ +- util/sys.h ++ util/sys.h \ ++ bistro/bistro_int.h \ ++ bistro/bistro.h \ ++ bistro/bistro_x86_64.h \ ++ bistro/bistro_aarch64.h \ ++ bistro/bistro_ppc64.h ++ ++if HAVE_CUDA ++noinst_HEADERS += \ ++ cuda/cudamem.h ++endif + + libucm_la_SOURCES = \ + event/event.c \ + malloc/malloc_hook.c \ + mmap/install.c \ + util/replace.c \ +- util/ucm_config.c \ + util/log.c \ + util/reloc.c \ +- util/sys.c ++ util/sys.c \ ++ bistro/bistro.c \ ++ bistro/bistro_x86_64.c \ ++ bistro/bistro_aarch64.c \ ++ bistro/bistro_ppc64.c + + if HAVE_CUDA + libucm_la_SOURCES += \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/api/ucm.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/api/ucm.h +index 0b024e3..9d41118 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/api/ucm.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/api/ucm.h +@@ -32,16 +32,40 @@ typedef enum ucm_event_type { + UCM_EVENT_SHMAT = UCS_BIT(3), + UCM_EVENT_SHMDT = UCS_BIT(4), + UCM_EVENT_SBRK = UCS_BIT(5), ++ UCM_EVENT_MADVISE = UCS_BIT(6), + + /* Aggregate events */ + UCM_EVENT_VM_MAPPED = UCS_BIT(16), + UCM_EVENT_VM_UNMAPPED = UCS_BIT(17), + ++ /* Non-accessible memory alloc/free events */ ++ UCM_EVENT_MEM_TYPE_ALLOC = UCS_BIT(20), ++ UCM_EVENT_MEM_TYPE_FREE = UCS_BIT(21), ++ + /* Auxiliary flags */ + UCM_EVENT_FLAG_NO_INSTALL = UCS_BIT(24) + + } ucm_event_type_t; + ++/** ++ * @brief Memory types for alloc and free events ++ */ ++typedef enum ucm_mem_type { ++ /*cuda memory */ ++ UCM_MEM_TYPE_CUDA = UCS_BIT(0), ++ UCM_MEM_TYPE_CUDA_MANAGED = UCS_BIT(1) ++} ucm_mem_type_t; ++ ++ ++/** ++ * @brief MMAP hook modes ++ */ ++typedef enum ucm_mmap_hook_mode { ++ UCM_MMAP_HOOK_NONE, ++ UCM_MMAP_HOOK_RELOC, ++ UCM_MMAP_HOOK_BISTRO, ++ UCM_MMAP_HOOK_LAST ++} ucm_mmap_hook_mode_t; + + /** + * @brief Memory event parameters and result. +@@ -114,6 +138,17 @@ typedef union ucm_event { + } sbrk; + + /* ++ * UCM_EVENT_MADVISE ++ * madvise() is called. ++ */ ++ struct { ++ int result; ++ void *addr; ++ size_t length; ++ int advice; ++ } madvise; ++ ++ /* + * UCM_EVENT_VM_MAPPED, UCM_EVENT_VM_UNMAPPED + * + * This is a "read-only" event which is called whenever memory is mapped +@@ -128,10 +163,40 @@ typedef union ucm_event { + size_t size; + } vm_mapped, vm_unmapped; + ++ /* ++ * memory type allocation and deallocation event ++ */ ++ struct { ++ void *address; ++ size_t size; ++ ucm_mem_type_t mem_type; ++ } mem_type; ++ + } ucm_event_t; + + + /** ++ * @brief Global UCM configuration. ++ * ++ * Can be safely modified before using UCM functions. ++ */ ++typedef struct ucm_global_config { ++ ucs_log_level_t log_level; /* Logging level */ ++ int enable_events; /* Enable memory events */ ++ ucm_mmap_hook_mode_t mmap_hook_mode; /* MMAP hook mode */ ++ int enable_malloc_hooks; /* Enable installing malloc hooks */ ++ int enable_malloc_reloc; /* Enable installing malloc relocations */ ++ int enable_cuda_reloc; /* Enable installing CUDA relocations */ ++ int enable_dynamic_mmap_thresh; /* Enable adaptive mmap threshold */ ++ size_t alloc_alignment; /* Alignment for memory allocations */ ++} ucm_global_config_t; ++ ++ ++/* Global UCM configuration */ ++extern ucm_global_config_t ucm_global_opts; ++ ++ ++/** + * @brief Memory event callback. + * + * This type describes a callback which handles memory events in the current process. +@@ -169,27 +234,6 @@ typedef void (*ucm_event_callback_t)(ucm_event_type_t event_type, + ucm_event_t *event, void *arg); + + +- +-/** +- * @brief Print UCM global configuration to a stream. +- * +- * @param [in] stream Output stream to print to. +- * @param [in] print_flags Controls how the configuration is printed. +- */ +-void ucm_config_print(FILE *stream, ucs_config_print_flags_t print_flags); +- +- +-/** +- * @brief Modify UCM global configuration. +- * +- * @param [in] name Configuration variable name. +- * @param [in] value Value to set. +- * +- * @return Error code. +- */ +-ucs_status_t ucm_config_modify(const char *name, const char *value); +- +- + /** + * @brief Install a handler for memory events. + * +@@ -298,6 +342,18 @@ void *ucm_orig_sbrk(intptr_t increment); + + + /** ++ * @brief Call the original implementation of @ref brk without triggering events. ++ */ ++int ucm_orig_brk(void *addr); ++ ++ ++/** ++ * @brief Call the original implementation of @ref madvise without triggering events. ++ */ ++int ucm_orig_madvise(void *addr, size_t length, int advice); ++ ++ ++/** + * @brief Call the original implementation of @ref mmap and all handlers + * associated with it. + */ +@@ -352,6 +408,20 @@ int ucm_shmdt(const void *shmaddr); + void *ucm_sbrk(intptr_t increment); + + ++/** ++ * @brief Call the original implementation of @ref brk and all handlers ++ * associated with it. ++ */ ++int ucm_brk(void *addr); ++ ++ ++/** ++ * @brief Call the original implementation of @ref ucm_madvise and all handlers ++ * associated with it. ++ */ ++int ucm_madvise(void *addr, size_t length, int advice); ++ ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.c +new file mode 100644 +index 0000000..79bdbec +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.c +@@ -0,0 +1,106 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#include ++#include ++ ++#include ++#include ++ ++ucs_status_t ucm_bistro_remove_restore_point(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_assert(rp != NULL); ++ free(rp); ++ return UCS_OK; ++} ++ ++static void *ucm_bistro_page_align_ptr(void *ptr) ++{ ++ return (void*)ucs_align_down((uintptr_t)ptr, ucm_get_page_size()); ++} ++ ++static ucs_status_t ucm_bistro_protect(void *addr, size_t len, int prot) ++{ ++ void *aligned = ucm_bistro_page_align_ptr(addr); ++ size_t size = addr - aligned + len; ++ int res; ++ ++ res = mprotect(aligned, size, prot) ? UCS_ERR_INVALID_PARAM : UCS_OK; ++ if (res) { ++ ucm_error("Failed to change page protection: %m"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ return UCS_OK; ++} ++ ++ucs_status_t ucm_bistro_apply_patch(void *dst, void *patch, size_t len) ++{ ++ ucs_status_t status; ++ ++ status = ucm_bistro_protect(dst, len, UCM_PROT_READ_WRITE_EXEC); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ memcpy(dst, patch, len); ++ ++ status = ucm_bistro_protect(dst, len, UCM_PROT_READ_EXEC); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ ucs_clear_cache(dst, dst + len); ++ } ++ return status; ++} ++ ++#if defined(__x86_64__) || defined (__aarch64__) ++struct ucm_bistro_restore_point { ++ void *addr; /* address of function to restore */ ++ ucm_bistro_patch_t patch; /* original function body */ ++}; ++ ++ucs_status_t ucm_bistro_create_restore_point(void *addr, ucm_bistro_restore_point_t **rp) ++{ ++ ucm_bistro_restore_point_t *point; ++ ++ if (rp == NULL) { ++ /* restore point is not required */ ++ return UCS_OK; ++ } ++ ++ point = malloc(sizeof(*point)); ++ if (!point) { ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ point->addr = addr; ++ point->patch = *(ucm_bistro_patch_t*)addr; ++ *rp = point; ++ return UCS_OK; ++} ++ ++ucs_status_t ucm_bistro_restore(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_status_t status; ++ ++ status = ucm_bistro_apply_patch(rp->addr, &rp->patch, sizeof(rp->patch)); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ ucm_bistro_remove_restore_point(rp); ++ } ++ ++ return status; ++} ++ ++void *ucm_bistro_restore_addr(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_assert(rp != NULL); ++ return rp->addr; ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.h +new file mode 100644 +index 0000000..16e9887 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.h +@@ -0,0 +1,58 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++ ++#ifndef UCM_BISTRO_BISTRO_H_ ++#define UCM_BISTRO_BISTRO_H_ ++ ++#include ++ ++#include ++ ++typedef struct ucm_bistro_restore_point ucm_bistro_restore_point_t; ++ ++#if defined(__powerpc64__) ++# include "bistro_ppc64.h" ++#elif defined(__aarch64__) ++# include "bistro_aarch64.h" ++#elif defined(__x86_64__) ++# include "bistro_x86_64.h" ++#else ++# error "Unsupported architecture" ++#endif ++ ++ ++/** ++ * Restore original function body using restore point created ++ * by @ref ucm_bistro_patch ++ * ++ * @param rp restore point, is removed after success operation ++ * completed ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucm_bistro_restore(ucm_bistro_restore_point_t *rp); ++ ++/** ++ * Remove resore point created by @ref ucm_bistro_patch witout ++ * restore original function body ++ * ++ * @param rp restore point ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucm_bistro_remove_restore_point(ucm_bistro_restore_point_t *rp); ++ ++/** ++ * Get patch address for restore point ++ * ++ * @param rp restore point ++ * ++ * @return Address of patched function body ++ */ ++void *ucm_bistro_restore_addr(ucm_bistro_restore_point_t *rp); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.c +new file mode 100644 +index 0000000..2cf0927 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.c +@@ -0,0 +1,86 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++/* ******************************************************* ++ * ARM processors family * ++ * ***************************************************** */ ++#if defined(__aarch64__) ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++/* Register number used to store indirect jump address. ++ * r15 is the highest numbered temporary register, assuming this one is safe ++ * to use. */ ++#define R15 15 ++ ++#define _MOV(_reg, _shift, _val, _opcode) \ ++ (((_opcode) << 23) + ((uint32_t)(_shift) << 21) + ((uint32_t)((_val) & 0xffff) << 5) + (_reg)) ++ ++/** ++ * @brief Generate a mov immediate instruction ++ * ++ * @param[in] _reg register number (0-31) ++ * @param[in] _shift shift amount (0-3) * 16-bits ++ * @param[in] _value immediate value ++ */ ++#define MOVZ(_reg, _shift, _val) _MOV(_reg, _shift, _val, 0x1a5) ++ ++/** ++ * @brief Generate a mov immediate with keep instruction ++ * ++ * @param[in] _reg register number (0-31) ++ * @param[in] _shift shift amount (0-3) * 16-bits ++ * @param[in] _value immediate value ++ */ ++#define MOVK(_reg, _shift, _val) _MOV(_reg, _shift, _val, 0x1e5) ++ ++/** ++ * @brief Branch to address stored in register ++ * ++ * @param[in] _reg register number (0-31) ++ */ ++#define BR(_reg) ((0xd61f << 16) + ((_reg) << 5)) ++ ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp) ++{ ++ void *func; ++ ucs_status_t status; ++ ++ ucm_bistro_patch_t patch = { ++ .reg3 = MOVZ(R15, 3, (uintptr_t)hook >> 48), ++ .reg2 = MOVK(R15, 2, (uintptr_t)hook >> 32), ++ .reg1 = MOVK(R15, 1, (uintptr_t)hook >> 16), ++ .reg0 = MOVK(R15, 0, (uintptr_t)hook), ++ .br = BR(R15) ++ }; ++ ++ UCM_LOOKUP_SYMBOL(func, symbol); ++ ++ status = ucm_bistro_create_restore_point(func, rp); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ return ucm_bistro_apply_patch(func, &patch, sizeof(patch)); ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.h +new file mode 100644 +index 0000000..487aa92 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.h +@@ -0,0 +1,41 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++ ++#ifndef UCM_BISTRO_BISTRO_AARCH64_H_ ++#define UCM_BISTRO_BISTRO_AARCH64_H_ ++ ++#include ++ ++#include ++#include ++ ++#define UCM_BISTRO_PROLOGUE ++#define UCM_BISTRO_EPILOGUE ++ ++typedef struct ucm_bistro_patch { ++ uint32_t reg3; /* movz x15, addr, lsl #48 */ ++ uint32_t reg2; /* movk x15, addr, lsl #32 */ ++ uint32_t reg1; /* movk x15, addr, lsl #16 */ ++ uint32_t reg0; /* movk x15, addr */ ++ uint32_t br; /* br x15 */ ++} UCS_S_PACKED ucm_bistro_patch_t; ++ ++/** ++ * Set library function call hook using Binary Instrumentation ++ * method (BISTRO): replace function body by user defined call ++ * ++ * @param symbol function name to replace ++ * @param hook user-defined function-replacer ++ * @param rp restore point used to restore original function, ++ * optional, may be NULL ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_int.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_int.h +new file mode 100644 +index 0000000..40c80d5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_int.h +@@ -0,0 +1,48 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCM_BISTRO_BISTRO_INT_H_ ++#define UCM_BISTRO_BISTRO_INT_H_ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define UCM_PROT_READ_WRITE_EXEC (PROT_READ | PROT_WRITE | PROT_EXEC) ++#define UCM_PROT_READ_EXEC (PROT_READ | PROT_EXEC) ++ ++#define UCM_LOOKUP_SYMBOL(_func, _symbol) \ ++ _func = ucm_bistro_lookup(_symbol); \ ++ if (!_func) { \ ++ return UCS_ERR_NO_ELEM; \ ++ } ++ ++ucs_status_t ucm_bistro_apply_patch(void *dst, void *patch, size_t len); ++ ++ucs_status_t ucm_bistro_create_restore_point(void *addr, ucm_bistro_restore_point_t **rp); ++ ++static inline void *ucm_bistro_lookup(const char *symbol) ++{ ++ void *addr; ++ ++ ucs_assert(symbol != NULL); ++ ++ addr = dlsym(RTLD_NEXT, symbol); ++ if (!addr) { ++ addr = dlsym(RTLD_DEFAULT, symbol); ++ } ++ return addr; ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.c +new file mode 100644 +index 0000000..4b14250 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.c +@@ -0,0 +1,209 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++/* ******************************************************* ++ * POWER-PC processors family * ++ * ***************************************************** */ ++#if defined (__powerpc64__) ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* PowerPC instructions used in patching */ ++/* Reference: "PowerPC User Instruction Set Architecture" */ ++ ++/* Use r11 register for jump address */ ++#define R11 11 ++ ++#define OPCODE(_rt, _rs, _op) \ ++ (((_op) << 26) + ((_rt) << 21) + ((_rs) << 16)) ++ ++#define OP0(_rt, _rs, _ui, _op) \ ++ (OPCODE(_rt, _rs, _op) + ((_ui) & 0xffff)) ++ ++#define MTSPR(_spr, _rs) \ ++ (OPCODE(_rs, (_spr) & 0x1f, 31) + (((_spr) & ~UCS_MASK(5)) << 6) + (467 << 1)) ++ ++#define BCCTR(_bo, _bi, _bh) \ ++ (OPCODE(_bo, _bi, 19) + ((_bh) << 11) + (528<<1)) ++ ++#define RLDICR(_rt, _rs, _sh, _mb) \ ++ (OPCODE(_rs, _rt, 30) + (((_sh) & UCS_MASK(5)) << 11) + ((_sh & ~UCS_MASK(5)) >> 4) + \ ++ (((_mb) & UCS_MASK(5)) << 6) + ((_mb) && ~UCS_MASK(5)) + UCS_BIT(2)) ++ ++#define ADDIS(_rt, _rs, _ui) OP0(_rt, _rs, _ui, 15) ++#define ORI(_rt, _rs, _ui) OP0(_rs, _rt, _ui, 24) ++#define ORIS(_rt, _rs, _ui) OP0(_rs, _rt, _ui, 25) ++ ++typedef struct ucm_bistro_base_patch { ++ uint32_t addis; /* lis r11,(addr >> 48) */ ++ uint32_t ori1; /* ori r11,r11,(addr >> 32) */ ++ uint32_t rldicr; /* rldicr r11,r11,32,31 */ ++ uint32_t oris; /* oris r11,r11,(addr >> 16) */ ++ uint32_t ori2; /* ori r11,r11,addr */ ++} UCS_S_PACKED ucm_bistro_base_patch_t; ++ ++typedef struct ucm_bistro_patch { ++ ucm_bistro_base_patch_t super; ++ uint32_t mtspr; /* mtspr r11 */ ++ uint32_t bcctr; /* bcctr */ ++} UCS_S_PACKED ucm_bistro_patch_t; ++ ++struct ucm_bistro_restore_point { ++ void *entry; ++ void *hook; ++ ucm_bistro_base_patch_t hook_patch; ++ void *func; ++ ucm_bistro_patch_t func_patch; ++}; ++ ++static void ucm_bistro_fill_base_patch(ucm_bistro_base_patch_t *patch, ++ uint32_t reg, uintptr_t value) ++{ ++ ucs_assert(patch != NULL); ++ ++ patch->addis = ADDIS ( reg, 0, (value >> 48)); ++ patch->ori1 = ORI ( reg, reg, (value >> 32)); ++ patch->rldicr = RLDICR( reg, reg, 32, 31); ++ patch->oris = ORIS ( reg, reg, (value >> 16)); ++ patch->ori2 = ORI ( reg, reg, (value >> 0)); ++} ++ ++static void ucm_bistro_fill_patch(ucm_bistro_patch_t *patch, ++ uint32_t reg, uintptr_t value) ++{ ++ ucs_assert(patch != NULL); ++ ++ ucm_bistro_fill_base_patch(&patch->super, reg, value); ++ ++ patch->mtspr = MTSPR(9, reg); /* 9 = CTR */ ++ patch->bcctr = BCCTR(20, 0, 0); /* 20 = always */ ++} ++ ++static ucs_status_t ucm_bistro_patch_hook(void *hook, ucm_bistro_restore_point_t *rp, ++ uint64_t toc) ++{ ++ const uint32_t nop = 0x60000000; ++ uint32_t *toc_ptr; ++ ucm_bistro_base_patch_t *toc_patch; ++ ucm_bistro_base_patch_t patch; ++ ++ /* locate reserved code space in hook function */ ++ for (toc_ptr = hook;; toc_ptr++) { ++ toc_patch = (ucm_bistro_base_patch_t*)toc_ptr; ++ if ((toc_patch->addis == nop) && ++ (toc_patch->ori1 == nop) && ++ (toc_patch->rldicr == nop) && ++ (toc_patch->oris == nop) && ++ (toc_patch->ori2 == nop)) { ++ break; ++ } ++ } ++ ++ if (rp) { ++ rp->hook = toc_ptr; ++ rp->hook_patch = *toc_patch; ++ } ++ ++ ucm_bistro_fill_base_patch(&patch, 2, toc); ++ return ucm_bistro_apply_patch(toc_ptr, &patch, sizeof(patch)); ++} ++ ++static void *ucm_bistro_get_text_addr(void *addr) ++{ ++#if !defined (_CALL_ELF) || (_CALL_ELF != 2) ++ return addr ? *(void**)addr : 0; ++#else ++ return addr; ++#endif ++} ++ ++ucs_status_t ucm_bistro_patch_toc(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp, ++ uint64_t toc) ++{ ++ ucs_status_t status; ++ void *func; ++ ucm_bistro_restore_point_t restore; ++ ucm_bistro_patch_t patch; ++ ++ UCM_LOOKUP_SYMBOL(func, symbol); ++ ++ restore.entry = func; ++ ++ func = ucm_bistro_get_text_addr(func); ++ hook = ucm_bistro_get_text_addr(hook); ++ ++ status = ucm_bistro_patch_hook(hook, &restore, toc); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++#if defined(_CALL_ELF) && (_CALL_ELF == 2) ++ func += 8; ++ hook += 8; ++#endif ++ ++ ucm_bistro_fill_patch(&patch, R11, (uintptr_t)hook); ++ ++ restore.func = func; ++ restore.func_patch = *(ucm_bistro_patch_t*)func; ++ ++ status = ucm_bistro_apply_patch(func, &patch, sizeof(patch)); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ if (rp) { ++ *rp = malloc(sizeof(restore)); ++ if (!(*rp)) { ++ return UCS_ERR_NO_MEMORY; ++ } ++ **rp = restore; ++ } ++ ++ return UCS_OK; ++} ++ ++ucs_status_t ucm_bistro_restore(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_status_t status; ++ ++ ucs_assert(rp != NULL); ++ ++ status = ucm_bistro_apply_patch(rp->func, &rp->func_patch, sizeof(rp->func_patch)); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ status = ucm_bistro_apply_patch(rp->hook, &rp->hook_patch, sizeof(rp->hook_patch)); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ ucm_bistro_remove_restore_point(rp); ++ } ++ ++ return status; ++} ++ ++void *ucm_bistro_restore_addr(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_assert(rp != NULL); ++ return rp->entry; ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.h +new file mode 100644 +index 0000000..7b5c3b4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.h +@@ -0,0 +1,51 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++ ++#ifndef UCM_BISTRO_BISTRO_PPC64_H_ ++#define UCM_BISTRO_BISTRO_PPC64_H_ ++ ++#include ++ ++#include ++ ++/* special processing for ppc64 to save and restore TOC (r2) ++ * Reference: "64-bit PowerPC ELF Application Binary Interface Supplement 1.9" */ ++#define UCM_BISTRO_PROLOGUE \ ++ uint64_t toc_save; \ ++ asm volatile ("std 2, %0" : "=m" (toc_save)); \ ++ asm volatile ("nop; nop; nop; nop; nop"); ++#define UCM_BISTRO_EPILOGUE \ ++ asm volatile ("ld 2, %0" : : "m" (toc_save)); ++ ++ ++/** ++ * Set library function call hook using Binary Instrumentation ++ * method (BISTRO): replace function body by user defined call ++ * ++ * @param symbol function name to replace ++ * @param hook user-defined function-replacer ++ * @param rp restore point used to restore original function, ++ * optional, may be NULL ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++/* we have to use inline proxy call to save TOC register ++ * value - PPC is very sensible to this register value */ ++ucs_status_t ucm_bistro_patch_toc(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp, ++ uint64_t toc); ++ ++static inline ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp) ++{ ++ uint64_t toc; ++ asm volatile ("std 2, %0" : "=m" (toc)); ++ return ucm_bistro_patch_toc(symbol, hook, rp, toc); ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.c +new file mode 100644 +index 0000000..b2e57b0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.c +@@ -0,0 +1,51 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++/* ******************************************************* ++ * x86 processors family * ++ * ***************************************************** */ ++#if defined(__x86_64__) ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static const ucm_bistro_patch_t patch_tmpl = { ++ .mov_r11 = {0x49, 0xbb}, ++ .jmp_r11 = {0x41, 0xff, 0xe3} ++}; ++ ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp) ++{ ++ ucm_bistro_patch_t patch = patch_tmpl; ++ ucs_status_t status; ++ void *func; ++ ++ UCM_LOOKUP_SYMBOL(func, symbol); ++ ++ patch.ptr = hook; ++ ++ status = ucm_bistro_create_restore_point(func, rp); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ return ucm_bistro_apply_patch(func, &patch, sizeof(patch)); ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.h +new file mode 100644 +index 0000000..bf8d5e9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.h +@@ -0,0 +1,39 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++ ++#ifndef UCM_BISTRO_BISTRO_X86_64_H_ ++#define UCM_BISTRO_BISTRO_X86_64_H_ ++ ++#include ++ ++#include ++#include ++ ++#define UCM_BISTRO_PROLOGUE ++#define UCM_BISTRO_EPILOGUE ++ ++typedef struct ucm_bistro_patch { ++ uint8_t mov_r11[2]; /* mov %r11, addr */ ++ void *ptr; ++ uint8_t jmp_r11[3]; /* jmp r11 */ ++} UCS_S_PACKED ucm_bistro_patch_t; ++ ++/** ++ * Set library function call hook using Binary Instrumentation ++ * method (BISTRO): replace function body by user defined call ++ * ++ * @param symbol function name to replace ++ * @param hook user-defined function-replacer ++ * @param rp restore point used to restore original function, ++ * optional, may be NULL ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/cudamem.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/cudamem.h +index 76ae80e..ec9f648 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/cudamem.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/cudamem.h +@@ -13,8 +13,89 @@ + + ucs_status_t ucm_cudamem_install(); + +-cudaError_t ucm_override_cudaFree(void *addr); +-cudaError_t ucm_orig_cudaFree(void *address); +-cudaError_t ucm_cudaFree(void *address); ++/*cuMemFree */ ++CUresult ucm_override_cuMemFree(CUdeviceptr dptr); ++CUresult ucm_orig_cuMemFree(CUdeviceptr dptr); ++CUresult ucm_cuMemFree(CUdeviceptr dptr); + ++/*cuMemFreeHost */ ++CUresult ucm_override_cuMemFreeHost(void *p); ++CUresult ucm_orig_cuMemFreeHost(void *p); ++CUresult ucm_cuMemFreeHost(void *p); ++ ++/*cuMemAlloc*/ ++CUresult ucm_override_cuMemAlloc(CUdeviceptr *dptr, size_t size); ++CUresult ucm_orig_cuMemAlloc(CUdeviceptr *dptr, size_t size); ++CUresult ucm_cuMemAlloc(CUdeviceptr *dptr, size_t size); ++ ++/*cuMemAllocManaged*/ ++CUresult ucm_override_cuMemAllocManaged(CUdeviceptr *dptr, size_t size, ++ unsigned int flags); ++CUresult ucm_orig_cuMemAllocManaged(CUdeviceptr *dptr, size_t size, unsigned int flags); ++CUresult ucm_cuMemAllocManaged(CUdeviceptr *dptr, size_t size, unsigned int flags); ++ ++/*cuMemAllocPitch*/ ++CUresult ucm_override_cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, ++ size_t WidthInBytes, size_t Height, ++ unsigned int ElementSizeBytes); ++CUresult ucm_orig_cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, ++ size_t WidthInBytes, size_t Height, ++ unsigned int ElementSizeBytes); ++CUresult ucm_cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, ++ size_t WidthInBytes, size_t Height, ++ unsigned int ElementSizeBytes); ++ ++/*cuMemHostGetDevicePointer*/ ++CUresult ucm_override_cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, ++ unsigned int Flags); ++CUresult ucm_orig_cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, ++ unsigned int Flags); ++CUresult ucm_cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, unsigned int Flags); ++ ++/*cuMemHostUnregister */ ++CUresult ucm_override_cuMemHostUnregister(void *p); ++CUresult ucm_orig_cuMemHostUnregister(void *p); ++CUresult ucm_cuMemHostUnregister(void *p); ++ ++/*cudaFree*/ ++cudaError_t ucm_override_cudaFree(void *devPtr); ++cudaError_t ucm_orig_cudaFree(void *devPtr); ++cudaError_t ucm_cudaFree(void *devPtr); ++ ++/*cudaFreeHost*/ ++cudaError_t ucm_override_cudaFreeHost(void *ptr); ++cudaError_t ucm_orig_cudaFreeHost(void *ptr); ++cudaError_t ucm_cudaFreeHost(void *ptr); ++ ++/*cudaMalloc*/ ++cudaError_t ucm_override_cudaMalloc(void **devPtr, size_t size); ++cudaError_t ucm_orig_cudaMalloc(void **devPtr, size_t size); ++cudaError_t ucm_cudaMalloc(void **devPtr, size_t size); ++ ++/*cudaMallocManaged*/ ++cudaError_t ucm_override_cudaMallocManaged(void **devPtr, size_t size, ++ unsigned int flags); ++cudaError_t ucm_orig_cudaMallocManaged(void **devPtr, size_t size, unsigned int flags); ++cudaError_t ucm_cudaMallocManaged(void **devPtr, size_t size, unsigned int flags); ++ ++/*cudaMallocPitch*/ ++cudaError_t ucm_override_cudaMallocPitch(void **devPtr, size_t *pitch, ++ size_t width, size_t height); ++cudaError_t ucm_orig_cudaMallocPitch(void **devPtr, size_t *pitch, ++ size_t width, size_t height); ++cudaError_t ucm_cudaMallocPitch(void **devPtr, size_t *pitch, ++ size_t width, size_t height); ++ ++/*cudaHostGetDevicePointer*/ ++cudaError_t ucm_override_cudaHostGetDevicePointer(void **pDevice, void *pHost, ++ unsigned int flags); ++cudaError_t ucm_orig_cudaHostGetDevicePointer(void **pDevice, void *pHost, ++ unsigned int flags); ++cudaError_t ucm_cudaHostGetDevicePointer(void **pDevice, void *pHost, unsigned int flags); ++ ++ ++/*cudaHostUnregister*/ ++cudaError_t ucm_override_cudaHostUnregister(void *ptr); ++cudaError_t ucm_orig_cudaHostUnregister(void *ptr); ++cudaError_t ucm_cudaHostUnregister(void *ptr); + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/install.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/install.c +index 092bde4..2377aed 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/install.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/install.c +@@ -14,22 +14,40 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include + #include + #include + +-static ucm_reloc_patch_t patch = {"cudaFree", ucm_override_cudaFree}; ++static ucm_reloc_patch_t patches[] = { ++ {UCS_PP_MAKE_STRING(cuMemFree), ucm_override_cuMemFree}, ++ {UCS_PP_MAKE_STRING(cuMemFreeHost), ucm_override_cuMemFreeHost}, ++ {UCS_PP_MAKE_STRING(cuMemAlloc), ucm_override_cuMemAlloc}, ++ {UCS_PP_MAKE_STRING(cuMemAllocManaged), ucm_override_cuMemAllocManaged}, ++ {UCS_PP_MAKE_STRING(cuMemAllocPitch), ucm_override_cuMemAllocPitch}, ++ {UCS_PP_MAKE_STRING(cuMemHostGetDevicePointer), ucm_override_cuMemHostGetDevicePointer}, ++ {UCS_PP_MAKE_STRING(cuMemHostUnregister), ucm_override_cuMemHostUnregister}, ++ {UCS_PP_MAKE_STRING(cudaFree), ucm_override_cudaFree}, ++ {UCS_PP_MAKE_STRING(cudaFreeHost), ucm_override_cudaFreeHost}, ++ {UCS_PP_MAKE_STRING(cudaMalloc), ucm_override_cudaMalloc}, ++ {UCS_PP_MAKE_STRING(cudaMallocManaged), ucm_override_cudaMallocManaged}, ++ {UCS_PP_MAKE_STRING(cudaMallocPitch), ucm_override_cudaMallocPitch}, ++ {UCS_PP_MAKE_STRING(cudaHostGetDevicePointer), ucm_override_cudaHostGetDevicePointer}, ++ {UCS_PP_MAKE_STRING(cudaHostUnregister), ucm_override_cudaHostUnregister}, ++ {NULL, NULL} ++}; ++ + ucs_status_t ucm_cudamem_install() + { + static int ucm_cudamem_installed = 0; + static pthread_mutex_t install_mutex = PTHREAD_MUTEX_INITIALIZER; ++ ucm_reloc_patch_t *patch; + ucs_status_t status; + +- if (!ucm_global_config.enable_cuda_hooks) { ++ if (!ucm_global_opts.enable_cuda_reloc) { + ucm_debug("installing cudamem relocations is disabled by configuration"); + return UCS_ERR_UNSUPPORTED; + } +@@ -39,10 +57,12 @@ ucs_status_t ucm_cudamem_install() + + pthread_mutex_lock(&install_mutex); + +- status = ucm_reloc_modify(&patch); +- if (status != UCS_OK) { +- ucm_warn("failed to install relocation table entry for '%s'", patch.symbol); +- goto out_unlock; ++ for (patch = patches; patch->symbol != NULL; ++patch) { ++ status = ucm_reloc_modify(patch); ++ if (status != UCS_OK) { ++ ucm_warn("failed to install relocation table entry for '%s'", patch->symbol); ++ goto out_unlock; ++ } + } + + ucm_cudamem_installed = 1; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/event/event.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/event/event.c +index e9383e4..fdcd160 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/event/event.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/event/event.c +@@ -16,10 +16,11 @@ + #if HAVE_CUDA + #include + #endif +-#include + #include + #include + #include ++#include ++#include + + #include + #include +@@ -30,9 +31,14 @@ + #include + + ++static pthread_spinlock_t ucm_kh_lock; ++#define ucm_ptr_hash(_ptr) kh_int64_hash_func((uintptr_t)(_ptr)) ++KHASH_INIT(ucm_ptr_size, const void*, size_t, 1, ucm_ptr_hash, kh_int64_hash_equal) ++ + static pthread_rwlock_t ucm_event_lock = PTHREAD_RWLOCK_INITIALIZER; + static ucs_list_link_t ucm_event_handlers; + static int ucm_external_events = 0; ++static khash_t(ucm_ptr_size) ucm_shmat_ptrs; + + static size_t ucm_shm_size(int shmid) + { +@@ -92,6 +98,13 @@ static void ucm_event_call_orig(ucm_event_type_t event_type, ucm_event_t *event, + event->sbrk.result = ucm_orig_sbrk(event->sbrk.increment); + } + break; ++ case UCM_EVENT_MADVISE: ++ if (event->madvise.result == -1) { ++ event->madvise.result = ucm_orig_madvise(event->madvise.addr, ++ event->madvise.length, ++ event->madvise.advice); ++ } ++ break; + default: + ucm_warn("Got unknown event %d", event_type); + break; +@@ -105,7 +118,8 @@ static void ucm_event_call_orig(ucm_event_type_t event_type, ucm_event_t *event, + static ucm_event_handler_t ucm_event_orig_handler = { + .list = UCS_LIST_INITIALIZER(&ucm_event_handlers, &ucm_event_handlers), + .events = UCM_EVENT_MMAP | UCM_EVENT_MUNMAP | UCM_EVENT_MREMAP | +- UCM_EVENT_SHMAT | UCM_EVENT_SHMDT | UCM_EVENT_SBRK, /* All events */ ++ UCM_EVENT_SHMAT | UCM_EVENT_SHMDT | UCM_EVENT_SBRK | ++ UCM_EVENT_MADVISE, /* All events */ + .priority = 0, /* Between negative and positive handlers */ + .cb = ucm_event_call_orig + }; +@@ -156,6 +170,8 @@ ucm_dispatch_vm_mmap(void *addr, size_t length) + { + ucm_event_t event; + ++ ucm_trace("vm_map addr=%p length=%zu", addr, length); ++ + event.vm_mapped.address = addr; + event.vm_mapped.size = length; + ucm_event_dispatch(UCM_EVENT_VM_MAPPED, &event); +@@ -166,6 +182,8 @@ ucm_dispatch_vm_munmap(void *addr, size_t length) + { + ucm_event_t event; + ++ ucm_trace("vm_unmap addr=%p length=%zu", addr, length); ++ + event.vm_unmapped.address = addr; + event.vm_unmapped.size = length; + ucm_event_dispatch(UCM_EVENT_VM_UNMAPPED, &event); +@@ -180,6 +198,10 @@ void *ucm_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t off + + ucm_event_enter(); + ++ if ((flags & MAP_FIXED) && (addr != NULL)) { ++ ucm_dispatch_vm_munmap(addr, length); ++ } ++ + event.mmap.result = MAP_FAILED; + event.mmap.address = addr; + event.mmap.size = length; +@@ -269,8 +291,11 @@ void *ucm_mremap(void *old_address, size_t old_size, size_t new_size, int flags) + + void *ucm_shmat(int shmid, const void *shmaddr, int shmflg) + { ++ uintptr_t attach_addr; + ucm_event_t event; ++ khiter_t iter; + size_t size; ++ int result; + + ucm_event_enter(); + +@@ -278,14 +303,31 @@ void *ucm_shmat(int shmid, const void *shmaddr, int shmflg) + shmid, shmaddr, shmflg); + + size = ucm_shm_size(shmid); ++ ++ if ((shmflg & SHM_REMAP) && (shmaddr != NULL)) { ++ attach_addr = (uintptr_t)shmaddr; ++ if (shmflg & SHM_RND) { ++ attach_addr -= attach_addr % SHMLBA; ++ } ++ ucm_dispatch_vm_munmap((void*)shmaddr, size); ++ } ++ + event.shmat.result = MAP_FAILED; + event.shmat.shmid = shmid; + event.shmat.shmaddr = shmaddr; + event.shmat.shmflg = shmflg; + ucm_event_dispatch(UCM_EVENT_SHMAT, &event); + ++ pthread_spin_lock(&ucm_kh_lock); + if (event.shmat.result != MAP_FAILED) { ++ iter = kh_put(ucm_ptr_size, &ucm_shmat_ptrs, event.mmap.result, &result); ++ if (result != -1) { ++ kh_value(&ucm_shmat_ptrs, iter) = size; ++ } ++ pthread_spin_unlock(&ucm_kh_lock); + ucm_dispatch_vm_mmap(event.shmat.result, size); ++ } else { ++ pthread_spin_unlock(&ucm_kh_lock); + } + + ucm_event_leave(); +@@ -296,12 +338,24 @@ void *ucm_shmat(int shmid, const void *shmaddr, int shmflg) + int ucm_shmdt(const void *shmaddr) + { + ucm_event_t event; ++ khiter_t iter; ++ size_t size; + + ucm_event_enter(); + + ucm_debug("ucm_shmdt(shmaddr=%p)", shmaddr); + +- ucm_dispatch_vm_munmap((void*)shmaddr, ucm_get_shm_seg_size(shmaddr)); ++ pthread_spin_lock(&ucm_kh_lock); ++ iter = kh_get(ucm_ptr_size, &ucm_shmat_ptrs, shmaddr); ++ if (iter != kh_end(&ucm_shmat_ptrs)) { ++ size = kh_value(&ucm_shmat_ptrs, iter); ++ kh_del(ucm_ptr_size, &ucm_shmat_ptrs, iter); ++ } else { ++ size = ucm_get_shm_seg_size(shmaddr); ++ } ++ pthread_spin_unlock(&ucm_kh_lock); ++ ++ ucm_dispatch_vm_munmap((void*)shmaddr, size); + + event.shmdt.result = -1; + event.shmdt.shmaddr = shmaddr; +@@ -337,22 +391,347 @@ void *ucm_sbrk(intptr_t increment) + return event.sbrk.result; + } + ++int ucm_brk(void *addr) ++{ ++#if UCM_BISTRO_HOOKS ++ void *old_addr; ++ intptr_t increment; ++ ucm_event_t event; ++ ++ old_addr = ucm_brk_syscall(0); ++ /* in case if addr == NULL - it just returns current pointer */ ++ increment = addr ? ((intptr_t)addr - (intptr_t)old_addr) : 0; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_brk(addr=%p)", addr); ++ ++ if (increment < 0) { ++ ucm_dispatch_vm_munmap(old_addr + increment, -increment); ++ } ++ ++ event.sbrk.result = (void*)-1; ++ event.sbrk.increment = increment; ++ ucm_event_dispatch(UCM_EVENT_SBRK, &event); ++ ++ if ((increment > 0) && (event.sbrk.result != MAP_FAILED)) { ++ ucm_dispatch_vm_mmap(old_addr, increment); ++ } ++ ++ ucm_event_leave(); ++ ++ return event.sbrk.result == MAP_FAILED ? -1 : 0; ++#else ++ return -1; ++#endif ++} ++ ++int ucm_madvise(void *addr, size_t length, int advice) ++{ ++ ucm_event_t event; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_madvise(addr=%p length=%zu advice=%d)", addr, length, advice); ++ ++ /* madvise(MADV_DONTNEED) and madvise(MADV_FREE) are releasing pages */ ++ if ((advice == MADV_DONTNEED) ++#if HAVE_DECL_MADV_REMOVE ++ || (advice == MADV_REMOVE) ++#endif ++#if HAVE_DECL_POSIX_MADV_DONTNEED ++ || (advice == POSIX_MADV_DONTNEED) ++#endif ++#if HAVE_DECL_MADV_FREE ++ || (advice == MADV_FREE) ++#endif ++ ) { ++ ucm_dispatch_vm_munmap(addr, length); ++ } ++ ++ event.madvise.result = -1; ++ event.madvise.addr = addr; ++ event.madvise.length = length; ++ event.madvise.advice = advice; ++ ucm_event_dispatch(UCM_EVENT_MADVISE, &event); ++ ++ ucm_event_leave(); ++ ++ return event.madvise.result; ++} ++ ++ + #if HAVE_CUDA +-cudaError_t ucm_cudaFree(void *addr) ++static UCS_F_ALWAYS_INLINE void ++ucm_dispatch_mem_type_alloc(void *addr, size_t length, ucm_mem_type_t mem_type) ++{ ++ ucm_event_t event; ++ ++ event.mem_type.address = addr; ++ event.mem_type.size = length; ++ event.mem_type.mem_type = mem_type; ++ ucm_event_dispatch(UCM_EVENT_MEM_TYPE_ALLOC, &event); ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucm_dispatch_mem_type_free(void *addr, size_t length, ucm_mem_type_t mem_type) ++{ ++ ucm_event_t event; ++ ++ event.mem_type.address = addr; ++ event.mem_type.size = length; ++ event.mem_type.mem_type = mem_type; ++ ucm_event_dispatch(UCM_EVENT_MEM_TYPE_FREE, &event); ++} ++ ++static void ucm_cudafree_dispatch_events(void *dptr) ++{ ++ CUresult ret; ++ CUdeviceptr pbase; ++ size_t psize; ++ ++ if (dptr == NULL) { ++ return; ++ } ++ ++ ret = cuMemGetAddressRange(&pbase, &psize, (CUdeviceptr) dptr); ++ if (ret != CUDA_SUCCESS) { ++ ucm_warn("cuMemGetAddressRange(devPtr=%p) failed", (void *)dptr); ++ psize = 1; /* set minimum length */ ++ } ++ ucs_assert(dptr == (void *)pbase); ++ ++ ucm_dispatch_mem_type_free((void *)dptr, psize, UCM_MEM_TYPE_CUDA); ++} ++ ++CUresult ucm_cuMemFree(CUdeviceptr dptr) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cuMemFree(dptr=%p)",(void *)dptr); ++ ++ ucm_cudafree_dispatch_events((void *)dptr); ++ ++ ret = ucm_orig_cuMemFree(dptr); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemFreeHost(void *p) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cuMemFreeHost(ptr=%p)", p); ++ ++ ucm_dispatch_vm_munmap(p, 0); ++ ++ ret = ucm_orig_cuMemFreeHost(p); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemAlloc(CUdeviceptr *dptr, size_t size) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cuMemAlloc(dptr, size); ++ if (ret == CUDA_SUCCESS) { ++ ucm_trace("ucm_cuMemAlloc(dptr=%p size:%lu)",(void *)*dptr, size); ++ ucm_dispatch_mem_type_alloc((void *)*dptr, size, UCM_MEM_TYPE_CUDA); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemAllocManaged(CUdeviceptr *dptr, size_t size, unsigned int flags) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cuMemAllocManaged(dptr, size, flags); ++ if (ret == CUDA_SUCCESS) { ++ ucm_trace("ucm_cuMemAllocManaged(dptr=%p size:%lu, flags:%d)", ++ (void *)*dptr, size, flags); ++ ucm_dispatch_mem_type_alloc((void *)*dptr, size, UCM_MEM_TYPE_CUDA_MANAGED); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, ++ size_t WidthInBytes, size_t Height, ++ unsigned int ElementSizeBytes) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cuMemAllocPitch(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes); ++ if (ret == CUDA_SUCCESS) { ++ ucm_trace("ucm_cuMemAllocPitch(dptr=%p size:%lu)",(void *)*dptr, ++ (WidthInBytes * Height)); ++ ucm_dispatch_mem_type_alloc((void *)*dptr, WidthInBytes * Height, ++ UCM_MEM_TYPE_CUDA); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, unsigned int Flags) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cuMemHostGetDevicePointer(pdptr, p, Flags); ++ if (ret == CUDA_SUCCESS) { ++ ucm_trace("ucm_cuMemHostGetDevicePointer(pdptr=%p p=%p)",(void *)*pdptr, p); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemHostUnregister(void *p) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cuMemHostUnregister(ptr=%p)", p); ++ ++ ret = ucm_orig_cuMemHostUnregister(p); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++cudaError_t ucm_cudaFree(void *devPtr) + { + cudaError_t ret; + + ucm_event_enter(); + +- ucm_trace("ucm_cudaFree(addr=%p )", addr); ++ ucm_trace("ucm_cudaFree(devPtr=%p)", devPtr); ++ ++ ucm_cudafree_dispatch_events((void *)devPtr); + +- ucm_dispatch_vm_munmap(addr, 0); +- ret = ucm_orig_cudaFree(addr); ++ ret = ucm_orig_cudaFree(devPtr); + + ucm_event_leave(); + + return ret; + } ++ ++cudaError_t ucm_cudaFreeHost(void *ptr) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cudaFreeHost(ptr=%p)", ptr); ++ ++ ucm_dispatch_vm_munmap(ptr, 0); ++ ++ ret = ucm_orig_cudaFreeHost(ptr); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++cudaError_t ucm_cudaMalloc(void **devPtr, size_t size) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cudaMalloc(devPtr, size); ++ if (ret == cudaSuccess) { ++ ucm_trace("ucm_cudaMalloc(devPtr=%p size:%lu)", *devPtr, size); ++ ucm_dispatch_mem_type_alloc(*devPtr, size, UCM_MEM_TYPE_CUDA); ++ } ++ ++ ucm_event_leave(); ++ ++ return ret; ++} ++ ++cudaError_t ucm_cudaMallocManaged(void **devPtr, size_t size, unsigned int flags) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cudaMallocManaged(devPtr, size, flags); ++ if (ret == cudaSuccess) { ++ ucm_trace("ucm_cudaMallocManaged(devPtr=%p size:%lu flags:%d)", ++ *devPtr, size, flags); ++ ucm_dispatch_mem_type_alloc(*devPtr, size, UCM_MEM_TYPE_CUDA_MANAGED); ++ } ++ ++ ucm_event_leave(); ++ ++ return ret; ++} ++ ++cudaError_t ucm_cudaMallocPitch(void **devPtr, size_t *pitch, ++ size_t width, size_t height) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cudaMallocPitch(devPtr, pitch, width, height); ++ if (ret == cudaSuccess) { ++ ucm_trace("ucm_cudaMallocPitch(devPtr=%p size:%lu)",*devPtr, (width * height)); ++ ucm_dispatch_mem_type_alloc(*devPtr, (width * height), UCM_MEM_TYPE_CUDA); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++cudaError_t ucm_cudaHostGetDevicePointer(void **pDevice, void *pHost, unsigned int flags) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cudaHostGetDevicePointer(pDevice, pHost, flags); ++ if (ret == cudaSuccess) { ++ ucm_trace("ucm_cuMemHostGetDevicePointer(pDevice=%p pHost=%p)", pDevice, pHost); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++cudaError_t ucm_cudaHostUnregister(void *ptr) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cudaHostUnregister(ptr=%p)", ptr); ++ ++ ret = ucm_orig_cudaHostUnregister(ptr); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ + #endif + + void ucm_event_handler_add(ucm_event_handler_t *handler) +@@ -381,18 +760,20 @@ void ucm_event_handler_remove(ucm_event_handler_t *handler) + + static ucs_status_t ucm_event_install(int events) + { ++ int native_events, malloc_events; + ucs_status_t status; +- int native_events; + + /* Replace aggregate events with the native events which make them */ +- native_events = events & ~(UCM_EVENT_VM_MAPPED | UCM_EVENT_VM_UNMAPPED); ++ native_events = events & ~(UCM_EVENT_VM_MAPPED | UCM_EVENT_VM_UNMAPPED | ++ UCM_EVENT_MEM_TYPE_ALLOC | UCM_EVENT_MEM_TYPE_FREE); + if (events & UCM_EVENT_VM_MAPPED) { + native_events |= UCM_EVENT_MMAP | UCM_EVENT_MREMAP | + UCM_EVENT_SHMAT | UCM_EVENT_SBRK; + } + if (events & UCM_EVENT_VM_UNMAPPED) { +- native_events |= UCM_EVENT_MUNMAP | UCM_EVENT_MREMAP | +- UCM_EVENT_SHMDT | UCM_EVENT_SBRK; ++ native_events |= UCM_EVENT_MMAP | UCM_EVENT_MUNMAP | UCM_EVENT_MREMAP | ++ UCM_EVENT_SHMDT | UCM_EVENT_SHMAT | ++ UCM_EVENT_SBRK | UCM_EVENT_MADVISE; + } + + /* TODO lock */ +@@ -404,7 +785,9 @@ static ucs_status_t ucm_event_install(int events) + + ucm_debug("mmap hooks are ready"); + +- status = ucm_malloc_install(native_events); ++ malloc_events = events & ~(UCM_EVENT_MEM_TYPE_ALLOC | ++ UCM_EVENT_MEM_TYPE_FREE); ++ status = ucm_malloc_install(malloc_events); + if (status != UCS_OK) { + ucm_debug("failed to install malloc events"); + goto out_unlock; +@@ -413,12 +796,14 @@ static ucs_status_t ucm_event_install(int events) + ucm_debug("malloc hooks are ready"); + + #if HAVE_CUDA +- status = ucm_cudamem_install(); +- if (status != UCS_OK) { +- ucm_debug("failed to install cudamem events"); +- goto out_unlock; ++ if (events & (UCM_EVENT_MEM_TYPE_ALLOC | UCM_EVENT_MEM_TYPE_FREE)) { ++ status = ucm_cudamem_install(); ++ if (status != UCS_OK) { ++ ucm_debug("failed to install cudamem events"); ++ goto out_unlock; ++ } ++ ucm_debug("cudaFree hooks are ready"); + } +- ucm_debug("cudaFree hooks are ready"); + #endif + + status = UCS_OK; +@@ -434,12 +819,12 @@ ucs_status_t ucm_set_event_handler(int events, int priority, + ucm_event_handler_t *handler; + ucs_status_t status; + +- if (!ucm_global_config.enable_events) { ++ if (!ucm_global_opts.enable_events) { + return UCS_ERR_UNSUPPORTED; + } + +- if (!(events & (UCM_EVENT_FLAG_NO_INSTALL | ucm_external_events))) { +- status = ucm_event_install(events); ++ if (!(events & UCM_EVENT_FLAG_NO_INSTALL) && (events & ~ucm_external_events)) { ++ status = ucm_event_install(events & ~ucm_external_events); + if (status != UCS_OK) { + return status; + } +@@ -500,3 +885,12 @@ void ucm_unset_event_handler(int events, ucm_event_callback_t cb, void *arg) + } + } + ++UCS_STATIC_INIT { ++ pthread_spin_init(&ucm_kh_lock, PTHREAD_PROCESS_PRIVATE); ++ kh_init_inplace(ucm_ptr_size, &ucm_shmat_ptrs); ++} ++ ++UCS_STATIC_CLEANUP { ++ kh_destroy_inplace(ucm_ptr_size, &ucm_shmat_ptrs); ++ pthread_spin_destroy(&ucm_kh_lock); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/malloc/malloc_hook.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/malloc/malloc_hook.c +index d558b6a..eee3f94 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/malloc/malloc_hook.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/malloc/malloc_hook.c +@@ -21,10 +21,8 @@ + #include + #include + #include +-#include + #include + #include +-#include + #include + #include + #include +@@ -90,7 +88,7 @@ typedef struct ucm_malloc_hook_state { + /* + * Track record of which pointers are ours + */ +- ucs_spinlock_t lock; /* Protect heap counters. ++ pthread_spinlock_t lock; /* Protect heap counters. + Note: Cannot modify events when this lock + is held - may deadlock */ + /* Our heap address range. Used to identify whether a released pointer is ours, +@@ -137,14 +135,14 @@ static void ucm_malloc_mmaped_ptr_add(void *ptr) + int hash_extra_status; + khiter_t hash_it; + +- ucs_spin_lock(&ucm_malloc_hook_state.lock); ++ pthread_spin_lock(&ucm_malloc_hook_state.lock); + + hash_it = kh_put(mmap_ptrs, &ucm_malloc_hook_state.ptrs, ptr, + &hash_extra_status); + ucs_assert_always(hash_extra_status >= 0); + ucs_assert_always(hash_it != kh_end(&ucm_malloc_hook_state.ptrs)); + +- ucs_spin_unlock(&ucm_malloc_hook_state.lock); ++ pthread_spin_unlock(&ucm_malloc_hook_state.lock); + } + + static int ucm_malloc_mmaped_ptr_remove_if_exists(void *ptr) +@@ -152,7 +150,7 @@ static int ucm_malloc_mmaped_ptr_remove_if_exists(void *ptr) + khiter_t hash_it; + int found; + +- ucs_spin_lock(&ucm_malloc_hook_state.lock); ++ pthread_spin_lock(&ucm_malloc_hook_state.lock); + + hash_it = kh_get(mmap_ptrs, &ucm_malloc_hook_state.ptrs, ptr); + if (hash_it == kh_end(&ucm_malloc_hook_state.ptrs)) { +@@ -162,7 +160,7 @@ static int ucm_malloc_mmaped_ptr_remove_if_exists(void *ptr) + kh_del(mmap_ptrs, &ucm_malloc_hook_state.ptrs, hash_it); + } + +- ucs_spin_unlock(&ucm_malloc_hook_state.lock); ++ pthread_spin_unlock(&ucm_malloc_hook_state.lock); + return found; + } + +@@ -170,10 +168,10 @@ static int ucm_malloc_is_address_in_heap(void *ptr) + { + int in_heap; + +- ucs_spin_lock(&ucm_malloc_hook_state.lock); ++ pthread_spin_lock(&ucm_malloc_hook_state.lock); + in_heap = (ptr >= ucm_malloc_hook_state.heap_start) && + (ptr < ucm_malloc_hook_state.heap_end); +- ucs_spin_unlock(&ucm_malloc_hook_state.lock); ++ pthread_spin_unlock(&ucm_malloc_hook_state.lock); + return in_heap; + } + +@@ -226,8 +224,8 @@ static void *ucm_malloc_impl(size_t size, const char *debug_name) + void *ptr; + + ucm_malloc_hook_state.hook_called = 1; +- if (ucm_global_config.alloc_alignment > 1) { +- ptr = ucm_dlmemalign(ucm_global_config.alloc_alignment, size); ++ if (ucm_global_opts.alloc_alignment > 1) { ++ ptr = ucm_dlmemalign(ucm_global_opts.alloc_alignment, size); + } else { + ptr = ucm_dlmalloc(size); + } +@@ -240,7 +238,11 @@ static void ucm_malloc_adjust_thresholds(size_t size) + int mmap_thresh; + + if (size > ucm_malloc_hook_state.max_freed_size) { +- if (ucm_global_config.enable_dynamic_mmap_thresh && ++ /* Valgrind limits the size of brk() segments to 8mb, so must use mmap ++ * for large allocations. ++ */ ++ if (!RUNNING_ON_VALGRIND && ++ ucm_global_opts.enable_dynamic_mmap_thresh && + !ucm_malloc_hook_state.trim_thresh_set && + !ucm_malloc_hook_state.mmap_thresh_set) { + /* new mmap threshold is increased to the size of released block, +@@ -287,7 +289,7 @@ static void *ucm_memalign_impl(size_t alignment, size_t size, const char *debug_ + void *ptr; + + ucm_malloc_hook_state.hook_called = 1; +- ptr = ucm_dlmemalign(ucs_max(alignment, ucm_global_config.alloc_alignment), size); ++ ptr = ucm_dlmemalign(ucs_max(alignment, ucm_global_opts.alloc_alignment), size); + ucm_malloc_allocated(ptr, size, debug_name); + return ptr; + } +@@ -493,7 +495,7 @@ out: + static void ucm_malloc_sbrk(ucm_event_type_t event_type, + ucm_event_t *event, void *arg) + { +- ucs_spin_lock(&ucm_malloc_hook_state.lock); ++ pthread_spin_lock(&ucm_malloc_hook_state.lock); + + /* Copy return value from call. We assume the event handler uses a lock. */ + if (ucm_malloc_hook_state.heap_start == (void*)-1) { +@@ -505,7 +507,7 @@ static void ucm_malloc_sbrk(ucm_event_type_t event_type, + event->sbrk.increment, event->sbrk.result, + ucm_malloc_hook_state.heap_start, ucm_malloc_hook_state.heap_end); + +- ucs_spin_unlock(&ucm_malloc_hook_state.lock); ++ pthread_spin_unlock(&ucm_malloc_hook_state.lock); + } + + static int ucs_malloc_is_ready(int events) +@@ -521,11 +523,13 @@ static int ucs_malloc_is_ready(int events) + ucs_test_all_flags(ucm_malloc_hook_state.installed_events, events); + } + +-static ucm_event_handler_t ucm_malloc_sbrk_handler = { +- .events = UCM_EVENT_SBRK, +- .priority = 1000, +- .cb = ucm_malloc_sbrk +-}; ++static void ucm_malloc_event_test_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, void *arg) ++{ ++ int *out_events = arg; ++ ++ *out_events |= event_type; ++} + + /* Has to be called with install_mutex held */ + static void ucm_malloc_test(int events) +@@ -545,33 +549,40 @@ static void ucm_malloc_test(int events) + */ + handler.events = events; + handler.priority = -1; +- handler.cb = ucm_mmap_event_test_callback; ++ handler.cb = ucm_malloc_event_test_callback; + handler.arg = &out_events; + out_events = 0; + + ucm_event_handler_add(&handler); + +- /* Trigger both small and large allocations +- * TODO check address / stop all threads */ +- for (i = 0; i < small_alloc_count; ++i) { +- p[i] = malloc(small_alloc_size); +- } +- for (i = 0; i < small_alloc_count; ++i) { +- free(p[i]); +- } +- p[0] = malloc(large_alloc_size); +- p[0] = realloc(p[0], large_alloc_size * 2); +- free(p[0]); ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ /* Trigger both small and large allocations ++ * TODO check address / stop all threads */ ++ for (i = 0; i < small_alloc_count; ++i) { ++ p[i] = malloc(small_alloc_size); ++ } ++ for (i = 0; i < small_alloc_count; ++i) { ++ free(p[i]); ++ } + +- if (ucm_malloc_hook_state.hook_called) { +- ucm_dlmalloc_trim(0); ++ p[0] = malloc(large_alloc_size); ++ p[0] = realloc(p[0], large_alloc_size * 2); ++ free(p[0]); ++ ++ if (ucm_malloc_hook_state.hook_called) { ++ ucm_dlmalloc_trim(0); ++ } ++ } else { ++ /* in bistro mode we can't guarantee event fire on malloc calls, ++ * let's just try to call sbrk directly & catch it */ ++ ucm_fire_mmap_events(events); + } + + ucm_event_handler_remove(&handler); + + ucm_malloc_hook_state.installed_events |= out_events; + +- ucm_debug("malloc test: have 0x%x out of 0x%x, hooks were%s called", ++ ucm_debug("malloc test: have 0x%x out of 0x%x, malloc/free hooks were%s called", + ucm_malloc_hook_state.installed_events, events, + ucm_malloc_hook_state.hook_called ? "" : " not"); + } +@@ -615,20 +626,25 @@ static int ucm_malloc_mallopt(int param_number, int value) + return success; + } + ++static char *ucm_malloc_blacklist[] = { ++ "libnvidia-fatbinaryloader.so", ++ NULL ++}; ++ + static ucm_reloc_patch_t ucm_malloc_symbol_patches[] = { +- { "free", ucm_free }, +- { "realloc", ucm_realloc }, +- { "malloc", ucm_malloc }, +- { "memalign", ucm_memalign }, +- { "calloc", ucm_calloc }, +- { "valloc", ucm_valloc }, +- { "posix_memalign", ucm_posix_memalign }, +- { "setenv", ucm_setenv }, +- { UCM_OPERATOR_NEW_SYMBOL, ucm_operator_new }, +- { UCM_OPERATOR_DELETE_SYMBOL, ucm_operator_delete }, +- { UCM_OPERATOR_VEC_NEW_SYMBOL, ucm_operator_vec_new }, +- { UCM_OPERATOR_VEC_DELETE_SYMBOL, ucm_operator_vec_delete }, +- { NULL, NULL } ++ { .symbol = "free", .value = ucm_free, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "realloc", .value = ucm_realloc, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "malloc", .value = ucm_malloc, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "memalign", .value = ucm_memalign, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "calloc", .value = ucm_calloc, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "valloc", .value = ucm_valloc, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "posix_memalign", .value = ucm_posix_memalign, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "setenv", .value = ucm_setenv, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = UCM_OPERATOR_NEW_SYMBOL, .value = ucm_operator_new, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = UCM_OPERATOR_DELETE_SYMBOL, .value = ucm_operator_delete, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = UCM_OPERATOR_VEC_NEW_SYMBOL, .value = ucm_operator_vec_new, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = UCM_OPERATOR_VEC_DELETE_SYMBOL, .value = ucm_operator_vec_delete, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = NULL, .value = NULL } + }; + + static ucm_reloc_patch_t ucm_malloc_optional_symbol_patches[] = { +@@ -670,12 +686,15 @@ static void ucm_malloc_set_env_mallopt() + + ucs_status_t ucm_malloc_install(int events) + { ++ static ucm_event_handler_t sbrk_handler = { ++ .events = UCM_EVENT_SBRK, ++ .priority = 1000, ++ .cb = ucm_malloc_sbrk ++ }; + ucs_status_t status; + + pthread_mutex_lock(&ucm_malloc_hook_state.install_mutex); + +- events &= UCM_EVENT_MMAP | UCM_EVENT_MUNMAP | UCM_EVENT_MREMAP | UCM_EVENT_SBRK; +- + if (ucs_malloc_is_ready(events)) { + goto out_succ; + } +@@ -692,7 +711,7 @@ ucs_status_t ucm_malloc_install(int events) + + if (!(ucm_malloc_hook_state.install_state & UCM_MALLOC_INSTALLED_SBRK_EVH)) { + ucm_debug("installing malloc-sbrk event handler"); +- ucm_event_handler_add(&ucm_malloc_sbrk_handler); ++ ucm_event_handler_add(&sbrk_handler); + ucm_malloc_hook_state.install_state |= UCM_MALLOC_INSTALLED_SBRK_EVH; + } + +@@ -702,7 +721,7 @@ ucs_status_t ucm_malloc_install(int events) + * valgrind anyway. + */ + #if HAVE_MALLOC_HOOK +- if (ucm_global_config.enable_malloc_hooks) { ++ if (ucm_global_opts.enable_malloc_hooks) { + /* Install using malloc hooks. + * TODO detect glibc support in configure-time. + */ +@@ -727,7 +746,7 @@ ucs_status_t ucm_malloc_install(int events) + } + + /* Install using malloc symbols */ +- if (ucm_global_config.enable_malloc_reloc) { ++ if (ucm_global_opts.enable_malloc_reloc) { + if (!(ucm_malloc_hook_state.install_state & UCM_MALLOC_INSTALLED_MALL_SYMS)) { + ucm_debug("installing malloc relocations"); + ucm_malloc_populate_glibc_cache(); +@@ -768,7 +787,7 @@ void ucm_malloc_state_reset(int default_mmap_thresh, int default_trim_thresh) + } + + UCS_STATIC_INIT { +- ucs_spinlock_init(&ucm_malloc_hook_state.lock); ++ pthread_spin_init(&ucm_malloc_hook_state.lock, 0); + kh_init_inplace(mmap_ptrs, &ucm_malloc_hook_state.ptrs); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/install.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/install.c +index 9e903bb..ebf22aa 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/install.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/install.c +@@ -15,44 +15,99 @@ + #include + #include + #include +-#include ++#include ++#include + #include ++#include ++#include + + #include + #include + #include + #include + ++#define UCM_IS_HOOK_ENABLED(_entry) \ ++ ((_entry)->hook_type & UCS_BIT(ucm_mmap_hook_mode())) ++ ++#define UCM_HOOK_STR \ ++ ((ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) ? "reloc" : "bistro") ++ ++extern const char *ucm_mmap_hook_modes[]; ++ ++typedef enum ucm_mmap_hook_type { ++ UCM_HOOK_RELOC = UCS_BIT(UCM_MMAP_HOOK_RELOC), ++ UCM_HOOK_BISTRO = UCS_BIT(UCM_MMAP_HOOK_BISTRO), ++ UCM_HOOK_BOTH = UCM_HOOK_RELOC | UCM_HOOK_BISTRO ++} ucm_mmap_hook_type_t; + + typedef struct ucm_mmap_func { +- ucm_reloc_patch_t patch; +- ucm_event_type_t event_type; ++ ucm_reloc_patch_t patch; ++ ucm_event_type_t event_type; ++ ucm_event_type_t deps; ++ ucm_mmap_hook_type_t hook_type; + } ucm_mmap_func_t; + + static ucm_mmap_func_t ucm_mmap_funcs[] = { +- { {"mmap", ucm_override_mmap}, UCM_EVENT_MMAP}, +- { {"munmap", ucm_override_munmap}, UCM_EVENT_MUNMAP}, +- { {"mremap", ucm_override_mremap}, UCM_EVENT_MREMAP}, +- { {"shmat", ucm_override_shmat}, UCM_EVENT_SHMAT}, +- { {"shmdt", ucm_override_shmdt}, UCM_EVENT_SHMDT}, +- { {"sbrk", ucm_override_sbrk}, UCM_EVENT_SBRK}, ++ { {"mmap", ucm_override_mmap}, UCM_EVENT_MMAP, 0, UCM_HOOK_BOTH}, ++ { {"munmap", ucm_override_munmap}, UCM_EVENT_MUNMAP, 0, UCM_HOOK_BOTH}, ++ { {"mremap", ucm_override_mremap}, UCM_EVENT_MREMAP, 0, UCM_HOOK_BOTH}, ++ { {"shmat", ucm_override_shmat}, UCM_EVENT_SHMAT, 0, UCM_HOOK_BOTH}, ++ { {"shmdt", ucm_override_shmdt}, UCM_EVENT_SHMDT, UCM_EVENT_SHMAT, UCM_HOOK_BOTH}, ++ { {"sbrk", ucm_override_sbrk}, UCM_EVENT_SBRK, 0, UCM_HOOK_RELOC}, ++#if UCM_BISTRO_HOOKS ++ { {"brk", ucm_override_brk}, UCM_EVENT_SBRK, 0, UCM_HOOK_BISTRO}, ++#endif ++ { {"madvise", ucm_override_madvise}, UCM_EVENT_MADVISE, 0, UCM_HOOK_BOTH}, + { {NULL, NULL}, 0} + }; + +-void ucm_mmap_event_test_callback(ucm_event_type_t event_type, +- ucm_event_t *event, void *arg) ++static void ucm_mmap_event_test_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, void *arg) + { + int *out_events = arg; ++ + *out_events |= event_type; + } + ++void ucm_fire_mmap_events(int events) ++{ ++ void *p; ++ ++ if (events & (UCM_EVENT_MMAP|UCM_EVENT_MUNMAP|UCM_EVENT_MREMAP| ++ UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED)) { ++ p = mmap(NULL, 0, 0, 0, -1 ,0); ++ p = mremap(p, 0, 0, 0); ++ munmap(p, 0); ++ } ++ ++ if (events & (UCM_EVENT_SHMAT|UCM_EVENT_SHMDT|UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED)) { ++ p = shmat(0, NULL, 0); ++ shmdt(p); ++ } ++ ++ if (events & (UCM_EVENT_SBRK|UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED)) { ++ (void)sbrk(ucm_get_page_size()); ++ (void)sbrk(-ucm_get_page_size()); ++ } ++ ++ if (events & UCM_EVENT_MADVISE) { ++ p = mmap(NULL, ucm_get_page_size(), PROT_READ|PROT_WRITE, ++ MAP_PRIVATE|MAP_ANON, -1, 0); ++ if (p != MAP_FAILED) { ++ madvise(p, ucm_get_page_size(), MADV_NORMAL); ++ munmap(p, ucm_get_page_size()); ++ } else { ++ ucm_debug("mmap failed: %m"); ++ } ++ } ++} ++ + /* Called with lock held */ + static ucs_status_t ucm_mmap_test(int events) + { + static int installed_events = 0; + ucm_event_handler_t handler; + int out_events; +- void *p; + + if (ucs_test_all_flags(installed_events, events)) { + /* All requested events are already installed */ +@@ -70,20 +125,7 @@ static ucs_status_t ucm_mmap_test(int events) + + ucm_event_handler_add(&handler); + +- if (events & (UCM_EVENT_MMAP|UCM_EVENT_MUNMAP|UCM_EVENT_MREMAP)) { +- p = mmap(NULL, 0, 0, 0, -1 ,0); +- p = mremap(p, 0, 0, 0); +- munmap(p, 0); +- } +- +- if (events & (UCM_EVENT_SHMAT|UCM_EVENT_SHMDT)) { +- p = shmat(0, NULL, 0); +- shmdt(p); +- } +- +- if (events & UCM_EVENT_SBRK) { +- (void)sbrk(0); +- } ++ ucm_fire_mmap_events(events); + + ucm_event_handler_remove(&handler); + +@@ -107,13 +149,13 @@ static ucs_status_t ucs_mmap_install_reloc(int events) + ucm_mmap_func_t *entry; + ucs_status_t status; + +- if (!ucm_global_config.enable_mmap_reloc) { +- ucm_debug("installing mmap relocations is disabled by configuration"); ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_NONE) { ++ ucm_debug("installing mmap hooks is disabled by configuration"); + return UCS_ERR_UNSUPPORTED; + } + + for (entry = ucm_mmap_funcs; entry->patch.symbol != NULL; ++entry) { +- if (!(entry->event_type & events)) { ++ if (!((entry->event_type|entry->deps) & events)) { + /* Not required */ + continue; + } +@@ -123,17 +165,24 @@ static ucs_status_t ucs_mmap_install_reloc(int events) + continue; + } + +- ucm_debug("mmap: installing relocation table entry for %s = %p for event 0x%x", +- entry->patch.symbol, entry->patch.value, entry->event_type); +- +- status = ucm_reloc_modify(&entry->patch); +- if (status != UCS_OK) { +- ucm_warn("failed to install relocation table entry for '%s'", +- entry->patch.symbol); +- return status; ++ if (UCM_IS_HOOK_ENABLED(entry)) { ++ ucm_debug("mmap: installing %s hook for %s = %p for event 0x%x", UCM_HOOK_STR, ++ entry->patch.symbol, entry->patch.value, entry->event_type); ++ ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ status = ucm_reloc_modify(&entry->patch); ++ } else { ++ ucs_assert(ucm_mmap_hook_mode() == UCM_MMAP_HOOK_BISTRO); ++ status = ucm_bistro_patch(entry->patch.symbol, entry->patch.value, NULL); ++ } ++ if (status != UCS_OK) { ++ ucm_warn("failed to install %s hook for '%s'", ++ UCM_HOOK_STR, entry->patch.symbol); ++ return status; ++ } ++ ++ installed_events |= entry->event_type; + } +- +- installed_events |= entry->event_type; + } + + return UCS_OK; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/mmap.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/mmap.h +index d57b85a..35ac47f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/mmap.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/mmap.h +@@ -8,12 +8,20 @@ + #define UCM_MMAP_H_ + + #include ++#include + +-ucs_status_t ucm_mmap_install(int events); ++#define UCM_MMAP_HOOK_RELOC_STR "reloc" ++#define UCM_MMAP_HOOK_BISTRO_STR "bistro" + +-void ucm_mmap_event_test_callback(ucm_event_type_t event_type, +- ucm_event_t *event, void *arg); ++#if UCM_BISTRO_HOOKS ++# define UCM_DEFAULT_HOOK_MODE UCM_MMAP_HOOK_BISTRO ++# define UCM_DEFAULT_HOOK_MODE_STR UCM_MMAP_HOOK_BISTRO_STR ++#else ++# define UCM_DEFAULT_HOOK_MODE UCM_MMAP_HOOK_RELOC ++# define UCM_DEFAULT_HOOK_MODE_STR UCM_MMAP_HOOK_RELOC_STR ++#endif + ++ucs_status_t ucm_mmap_install(int events); + + void *ucm_override_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); + int ucm_override_munmap(void *addr, size_t length); +@@ -21,5 +29,19 @@ void *ucm_override_mremap(void *old_address, size_t old_size, size_t new_size, i + void *ucm_override_shmat(int shmid, const void *shmaddr, int shmflg); + int ucm_override_shmdt(const void *shmaddr); + void *ucm_override_sbrk(intptr_t increment); ++void *ucm_sbrk_select(intptr_t increment); ++int ucm_override_brk(void *addr); ++void *ucm_brk_syscall(void *addr); ++int ucm_override_madvise(void *addr, size_t length, int advice); ++void ucm_fire_mmap_events(int events); ++ ++static UCS_F_ALWAYS_INLINE ucm_mmap_hook_mode_t ucm_mmap_hook_mode(void) ++{ ++ if (RUNNING_ON_VALGRIND && (ucm_global_opts.mmap_hook_mode == UCM_MMAP_HOOK_BISTRO)) { ++ return UCM_MMAP_HOOK_RELOC; ++ } ++ ++ return ucm_global_opts.mmap_hook_mode; ++} + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.c +index 9a9a487..0ce92c9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.c +@@ -5,12 +5,14 @@ + */ + + #include "log.h" ++#include "sys.h" + + #include + #include + #include + #include + #include ++#include + #include + #include + #include +@@ -110,7 +112,7 @@ out: + static void ucm_log_vsnprintf(char *buf, size_t max, const char *fmt, va_list ap) + { + const char *pf; +- char *pb, *endb, *ps; ++ char *pb, *endb; + union { + char *s; + long d; +@@ -147,16 +149,16 @@ static void ucm_log_vsnprintf(char *buf, size_t max, const char *fmt, va_list ap + + /* Error message */ + case 'm': +- ps = strerror_r(eno, pb, endb - pb); +- if (ps != pb) { +- strncpy(pb, ps, endb - pb); +- } ++ ucm_strerror(eno, pb, endb - pb); + pb += strlen(pb); + goto done; + + /* String */ + case 's': + value.s = va_arg(ap, char *); ++ if (!value.s) { ++ value.s = "(null)"; ++ } + pad -= strlen(value.s); + if (!(flags & UCM_LOG_LTOA_PAD_LEFT)) { + pb = ucm_log_add_padding(pb, endb, pad, ' '); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.h +index 3c186dc..c697823 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.h +@@ -11,13 +11,12 @@ + # include "config.h" + #endif + ++#include + #include + +-#include "ucm_config.h" +- + + #define ucm_log(_level, _message, ...) \ +- if (((_level) <= UCS_MAX_LOG_LEVEL) && ((_level) <= ucm_global_config.log_level)) { \ ++ if (((_level) <= UCS_MAX_LOG_LEVEL) && ((_level) <= ucm_global_opts.log_level)) { \ + __ucm_log(__FILE__, __LINE__, __FUNCTION__, (_level), _message, \ + ## __VA_ARGS__); \ + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.c +index cce6493..e27b9d5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.c +@@ -19,7 +19,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +@@ -39,6 +39,7 @@ typedef struct ucm_auxv { + + + typedef struct ucm_reloc_dl_iter_context { ++ Dl_info def_dlinfo; + ucm_reloc_patch_t *patch; + ucs_status_t status; + } ucm_reloc_dl_iter_context_t; +@@ -143,7 +144,8 @@ static int ucm_reloc_get_aux_phsize() + + static ucs_status_t + ucm_reloc_modify_got(ElfW(Addr) base, const ElfW(Phdr) *phdr, const char *phname, +- int phnum, int phsize, ucm_reloc_patch_t *patch) ++ int phnum, int phsize, ++ const ucm_reloc_dl_iter_context_t *ctx) + { + ElfW(Phdr) *dphdr; + ElfW(Rela) *reloc; +@@ -156,12 +158,10 @@ ucm_reloc_modify_got(ElfW(Addr) base, const ElfW(Phdr) *phdr, const char *phname + void *page; + int ret; + int i; ++ Dl_info entry_dlinfo; ++ int success; + +- page_size = sysconf(_SC_PAGESIZE); +- if (page_size < 0) { +- ucm_error("failed to get page size: %m"); +- return UCS_ERR_IO_ERROR; +- } ++ page_size = ucm_get_page_size(); + + /* find PT_DYNAMIC */ + dphdr = NULL; +@@ -184,10 +184,10 @@ ucm_reloc_modify_got(ElfW(Addr) base, const ElfW(Phdr) *phdr, const char *phname + /* Find matching symbol and replace it */ + for (reloc = jmprel; (void*)reloc < jmprel + pltrelsz; ++reloc) { + elf_sym = (char*)strtab + symtab[ELF64_R_SYM(reloc->r_info)].st_name; +- if (!strcmp(patch->symbol, elf_sym)) { ++ if (!strcmp(ctx->patch->symbol, elf_sym)) { + entry = (void *)(base + reloc->r_offset); + +- ucm_trace("'%s' entry in '%s' is at %p", patch->symbol, ++ ucm_trace("'%s' entry in '%s' is at %p", ctx->patch->symbol, + basename(phname), entry); + + page = (void *)((intptr_t)entry & ~(page_size - 1)); +@@ -196,8 +196,21 @@ ucm_reloc_modify_got(ElfW(Addr) base, const ElfW(Phdr) *phdr, const char *phname + ucm_error("failed to modify GOT page %p to rw: %m", page); + return UCS_ERR_UNSUPPORTED; + } +- patch->prev_value = *entry; +- *entry = patch->value; ++ ++ success = dladdr(*entry, &entry_dlinfo); ++ ucs_assertv_always(success, "can't find shared object with entry %p", ++ *entry); ++ ++ /* store default entry to prev_value to guarantee valid pointers ++ * throughout life time of the process */ ++ if (ctx->def_dlinfo.dli_fbase == entry_dlinfo.dli_fbase) { ++ ctx->patch->prev_value = *entry; ++ ucm_trace("'%s' by address %p in '%s' is stored as original for %p", ++ ctx->patch->symbol, *entry, ++ basename(entry_dlinfo.dli_fname), ctx->patch->value); ++ } ++ ++ *entry = ctx->patch->value; + break; + } + } +@@ -209,6 +222,18 @@ static int ucm_reloc_phdr_iterator(struct dl_phdr_info *info, size_t size, void + { + ucm_reloc_dl_iter_context_t *ctx = data; + int phsize; ++ int i; ++ ++ /* check if module is black-listed for this patch */ ++ if (ctx->patch->blacklist) { ++ for (i = 0; ctx->patch->blacklist[i]; i++) { ++ if (strstr(info->dlpi_name, ctx->patch->blacklist[i])) { ++ /* module is black-listed */ ++ ctx->status = UCS_OK; ++ return 0; ++ } ++ } ++ } + + phsize = ucm_reloc_get_aux_phsize(); + if (phsize <= 0) { +@@ -219,7 +244,7 @@ static int ucm_reloc_phdr_iterator(struct dl_phdr_info *info, size_t size, void + + ctx->status = ucm_reloc_modify_got(info->dlpi_addr, info->dlpi_phdr, + info->dlpi_name, info->dlpi_phnum, +- phsize, ctx->patch); ++ phsize, ctx); + if (ctx->status == UCS_OK) { + return 0; /* continue iteration and patch all objects */ + } else { +@@ -230,10 +255,17 @@ static int ucm_reloc_phdr_iterator(struct dl_phdr_info *info, size_t size, void + /* called with lock held */ + static ucs_status_t ucm_reloc_apply_patch(ucm_reloc_patch_t *patch) + { +- ucm_reloc_dl_iter_context_t ctx = { +- .patch = patch, +- .status = UCS_OK +- }; ++ ucm_reloc_dl_iter_context_t ctx; ++ int success; ++ ++ /* Find default shared object, usually libc */ ++ success = dladdr(getpid, &ctx.def_dlinfo); ++ if (!success) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ ctx.patch = patch; ++ ctx.status = UCS_OK; + + /* Avoid locks here because we don't modify ELF data structures. + * Worst case the same symbol will be written more than once. +@@ -266,8 +298,8 @@ static void *ucm_dlopen(const char *filename, int flag) + */ + pthread_mutex_lock(&ucm_reloc_patch_list_lock); + ucs_list_for_each(patch, &ucm_reloc_patch_list, list) { +- ucm_debug("in dlopen(), re-applying '%s' to %p", patch->symbol, +- patch->value); ++ ucm_debug("in dlopen(%s), re-applying '%s' to %p", filename, ++ patch->symbol, patch->value); + ucm_reloc_apply_patch(patch); + } + pthread_mutex_unlock(&ucm_reloc_patch_list_lock); +@@ -318,6 +350,8 @@ static ucs_status_t ucm_reloc_install_dlopen() + return status; + } + ++ ucs_list_add_tail(&ucm_reloc_patch_list, &ucm_reloc_dlopen_patch.list); ++ + installed = 1; + return UCS_OK; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.h +index 36b1f0c..430781b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.h +@@ -22,6 +22,7 @@ typedef struct ucm_reloc_patch { + void *value; + void *prev_value; + ucs_list_link_t list; ++ char **blacklist; + } ucm_reloc_patch_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.c +index cde61b6..9cce7fe 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.c +@@ -8,13 +8,19 @@ + # include "config.h" + #endif + ++#include ++#include ++#include ++ + #include + #include + #include + #include ++#include + #include + #include + #include ++#include + + #if HAVE_CUDA + #include "ucm/cuda/cudamem.h" +@@ -26,28 +32,162 @@ + pthread_mutex_t ucm_reloc_get_orig_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; + pthread_t volatile ucm_reloc_get_orig_thread = -1; + +-UCM_DEFINE_REPLACE_FUNC(mmap, void*, MAP_FAILED, void*, size_t, int, int, int, off_t) +-UCM_DEFINE_REPLACE_FUNC(munmap, int, -1, void*, size_t) +-UCM_DEFINE_REPLACE_FUNC(mremap, void*, MAP_FAILED, void*, size_t, size_t, int) +-UCM_DEFINE_REPLACE_FUNC(shmat, void*, MAP_FAILED, int, const void*, int) +-UCM_DEFINE_REPLACE_FUNC(shmdt, int, -1, const void*) +-UCM_DEFINE_REPLACE_FUNC(sbrk, void*, MAP_FAILED, intptr_t) ++UCM_DEFINE_REPLACE_FUNC(mmap, void*, MAP_FAILED, void*, size_t, int, int, int, off_t) ++UCM_DEFINE_REPLACE_FUNC(munmap, int, -1, void*, size_t) ++UCM_DEFINE_REPLACE_FUNC(mremap, void*, MAP_FAILED, void*, size_t, size_t, int) ++UCM_DEFINE_REPLACE_FUNC(shmat, void*, MAP_FAILED, int, const void*, int) ++UCM_DEFINE_REPLACE_FUNC(shmdt, int, -1, const void*) ++UCM_DEFINE_REPLACE_FUNC(sbrk, void*, MAP_FAILED, intptr_t) ++UCM_DEFINE_REPLACE_FUNC(brk, int, -1, void*) ++UCM_DEFINE_REPLACE_FUNC(madvise, int, -1, void*, size_t, int) + +-#if ENABLE_SYMBOL_OVERRIDE +-UCM_OVERRIDE_FUNC(mmap, void) +-UCM_OVERRIDE_FUNC(munmap, void) +-UCM_OVERRIDE_FUNC(mremap, void) +-UCM_OVERRIDE_FUNC(shmat, void) +-UCM_OVERRIDE_FUNC(shmdt, void) +-UCM_OVERRIDE_FUNC(sbrk, void) +-#endif ++UCM_DEFINE_SELECT_FUNC(mmap, void*, MAP_FAILED, SYS_mmap, void*, size_t, int, int, int, off_t) ++UCM_DEFINE_SELECT_FUNC(munmap, int, -1, SYS_munmap, void*, size_t) ++UCM_DEFINE_SELECT_FUNC(mremap, void*, MAP_FAILED, SYS_mremap, void*, size_t, size_t, int) ++UCM_DEFINE_SELECT_FUNC(madvise, int, -1, SYS_madvise, void*, size_t, int) + + #if HAVE_CUDA + +-UCM_DEFINE_REPLACE_FUNC(cudaFree, cudaError_t, -1, void*) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemFree, CUresult,-1, CUdeviceptr) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemFreeHost, CUresult, -1, void *) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemAlloc, CUresult, -1, CUdeviceptr *, size_t) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemAllocManaged, CUresult, -1, CUdeviceptr *, ++ size_t, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemAllocPitch, CUresult, -1, CUdeviceptr *, size_t *, ++ size_t, size_t, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemHostGetDevicePointer, CUresult, -1, CUdeviceptr *, ++ void *, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemHostUnregister, CUresult, -1, void *) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaFree, cudaError_t, -1, void*) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaFreeHost, cudaError_t, -1, void*) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaMalloc, cudaError_t, -1, void**, size_t) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaMallocManaged, cudaError_t, -1, void**, size_t, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaMallocPitch, cudaError_t, -1, void**, size_t *, ++ size_t, size_t) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaHostGetDevicePointer, cudaError_t, -1, void**, ++ void *, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaHostUnregister, cudaError_t, -1, void*) + + #if ENABLE_SYMBOL_OVERRIDE +-UCM_OVERRIDE_FUNC(cudaFree, cudaError_t) ++UCM_OVERRIDE_FUNC(cuMemFree, CUresult) ++UCM_OVERRIDE_FUNC(cuMemFreeHost, CUresult) ++UCM_OVERRIDE_FUNC(cuMemAlloc, CUresult) ++UCM_OVERRIDE_FUNC(cuMemAllocManaged, CUresult) ++UCM_OVERRIDE_FUNC(cuMemAllocPitch, CUresult) ++UCM_OVERRIDE_FUNC(cuMemHostGetDevicePointer, CUresult) ++UCM_OVERRIDE_FUNC(cuMemHostUnregister, CUresult) ++UCM_OVERRIDE_FUNC(cudaFree, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaFreeHost, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaMalloc, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaMallocManaged, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaMallocPitch, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaHostGetDevicePointer, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaHostUnregister, cudaError_t) + #endif + + #endif ++ ++#if UCM_BISTRO_HOOKS ++#if HAVE_DECL_SYS_SHMAT ++ ++UCM_DEFINE_SELECT_FUNC(shmat, void*, MAP_FAILED, SYS_shmat, int, const void*, int) ++ ++#elif HAVE_DECL_SYS_IPC ++# ifndef IPCOP_shmat ++# define IPCOP_shmat 21 ++# endif ++ ++_UCM_DEFINE_DLSYM_FUNC(shmat, ucm_orig_dlsym_shmat, ucm_override_shmat, ++ void*, MAP_FAILED, int, const void*, int) ++ ++void *ucm_orig_shmat(int shmid, const void *shmaddr, int shmflg) ++{ ++ unsigned long res; ++ void *addr; ++ ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ return ucm_orig_dlsym_shmat(shmid, shmaddr, shmflg); ++ } else { ++ /* Using IPC syscall of shmat implementation */ ++ res = syscall(SYS_ipc, IPCOP_shmat, shmid, shmflg, &addr, shmaddr); ++ ++ return res ? MAP_FAILED : addr; ++ } ++} ++ ++#endif ++ ++#if HAVE_DECL_SYS_SHMDT ++ ++UCM_DEFINE_SELECT_FUNC(shmdt, int, -1, SYS_shmdt, const void*) ++ ++#elif HAVE_DECL_SYS_IPC ++# ifndef IPCOP_shmdt ++# define IPCOP_shmdt 22 ++# endif ++ ++_UCM_DEFINE_DLSYM_FUNC(shmdt, ucm_orig_dlsym_shmdt, ucm_override_shmdt, ++ int, -1, const void*) ++ ++int ucm_orig_shmdt(const void *shmaddr) ++{ ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ return ucm_orig_dlsym_shmdt(shmaddr); ++ } else { ++ /* Using IPC syscall of shmdt implementation */ ++ return syscall(SYS_ipc, IPCOP_shmdt, 0, 0, 0, shmaddr); ++ } ++} ++ ++#endif ++ ++#if HAVE___CURBRK ++extern void *__curbrk; ++#endif ++ ++_UCM_DEFINE_DLSYM_FUNC(brk, ucm_orig_dlsym_brk, ucm_override_brk, int, -1, void*) ++ ++void *ucm_brk_syscall(void *addr) ++{ ++ return (void*)syscall(SYS_brk, addr); ++} ++ ++int ucm_orig_brk(void *addr) ++{ ++ void *new_addr; ++ ++#if HAVE___CURBRK ++ __curbrk = ++#endif ++ new_addr = ucm_brk_syscall(addr); ++ ++ if (new_addr < addr) { ++ errno = ENOMEM; ++ return -1; ++ } else { ++ return 0; ++ } ++} ++ ++_UCM_DEFINE_DLSYM_FUNC(sbrk, ucm_orig_dlsym_sbrk, ucm_override_sbrk, ++ void*, MAP_FAILED, intptr_t) ++ ++void *ucm_orig_sbrk(intptr_t increment) ++{ ++ void *prev; ++ ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ return ucm_orig_dlsym_sbrk(increment); ++ } else { ++ prev = ucm_brk_syscall(0); ++ return ucm_orig_brk(prev + increment) ? (void*)-1 : prev; ++ } ++} ++ ++#else /* UCM_BISTRO_HOOKS */ ++ ++UCM_DEFINE_DLSYM_FUNC(sbrk, void*, MAP_FAILED, intptr_t) ++UCM_DEFINE_DLSYM_FUNC(shmat, void*, MAP_FAILED, int, const void*, int) ++UCM_DEFINE_DLSYM_FUNC(shmdt, int, -1, const void*) ++ ++#endif /* UCM_BISTRO_HOOKS */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.h +index 128e4a1..8e2c34b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.h +@@ -20,12 +20,41 @@ extern pthread_t volatile ucm_reloc_get_orig_thread; + * the event handler, and if event handler returns error code - calls the original + * function. + */ ++ ++/* Due to CUDA API redifinition we have to create proxy macro to eliminate ++ * redifinition of internal finction names */ + #define UCM_DEFINE_REPLACE_FUNC(_name, _rettype, _fail_val, ...) \ ++ _UCM_DEFINE_REPLACE_FUNC(ucm_override_##_name, ucm_##_name, _rettype, _fail_val, __VA_ARGS__) ++ ++#define _UCM_DEFINE_REPLACE_FUNC(_over_name, _ucm_name, _rettype, _fail_val, ...) \ + \ +- _rettype ucm_override_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)); \ ++ /* Define a symbol which goes to the replacement - in case we are loaded first */ \ ++ _rettype _over_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ ++ { \ ++ _rettype res; \ ++ UCM_BISTRO_PROLOGUE; \ ++ ucm_trace("%s()", __FUNCTION__); \ ++ \ ++ if (ucs_unlikely(ucm_reloc_get_orig_thread == pthread_self())) { \ ++ return _fail_val; \ ++ } \ ++ res = _ucm_name(UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ ++ UCM_BISTRO_EPILOGUE; \ ++ return res; \ ++ } ++ ++#define UCM_OVERRIDE_FUNC(_name, _rettype) \ ++ _rettype _name() __attribute__ ((alias (UCS_PP_QUOTE(ucm_override_##_name)))); \ ++ ++#define UCM_DEFINE_DLSYM_FUNC(_name, _rettype, _fail_val, ...) \ ++ _UCM_DEFINE_DLSYM_FUNC(_name, ucm_orig_##_name, ucm_override_##_name, \ ++ _rettype, _fail_val, __VA_ARGS__) ++ ++#define _UCM_DEFINE_DLSYM_FUNC(_name, _orig_name, _over_name, _rettype, _fail_val, ...) \ ++ _rettype _over_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)); \ + \ + /* Call the original function using dlsym(RTLD_NEXT) */ \ +- _rettype ucm_orig_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ ++ _rettype _orig_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ + { \ + typedef _rettype (*func_ptr_t) (__VA_ARGS__); \ + static func_ptr_t orig_func_ptr = NULL; \ +@@ -36,27 +65,41 @@ extern pthread_t volatile ucm_reloc_get_orig_thread; + pthread_mutex_lock(&ucm_reloc_get_orig_lock); \ + ucm_reloc_get_orig_thread = pthread_self(); \ + orig_func_ptr = ucm_reloc_get_orig(UCS_PP_QUOTE(_name), \ +- ucm_override_##_name); \ ++ _over_name); \ + ucm_reloc_get_orig_thread = -1; \ + pthread_mutex_unlock(&ucm_reloc_get_orig_lock); \ + } \ + return orig_func_ptr(UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ +- } \ +- \ +- /* Define a symbol which goes to the replacement - in case we are loaded first */ \ +- _rettype ucm_override_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ +- { \ +- ucm_trace("%s()", __FUNCTION__); \ +- \ +- if (ucs_unlikely(ucm_reloc_get_orig_thread == pthread_self())) { \ +- return _fail_val; \ +- } \ +- return ucm_##_name(UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ + } + +-#define UCM_OVERRIDE_FUNC(_name, _rettype) \ +- _rettype _name() __attribute__ ((alias ("ucm_override_" UCS_PP_QUOTE(_name)))); \ ++#define UCM_DEFINE_REPLACE_DLSYM_FUNC(_name, _rettype, _fail_val, ...) \ ++ _UCM_DEFINE_DLSYM_FUNC(_name, ucm_orig_##_name, ucm_override_##_name, \ ++ _rettype, _fail_val, __VA_ARGS__) \ ++ _UCM_DEFINE_REPLACE_FUNC(ucm_override_##_name, ucm_##_name, \ ++ _rettype, _fail_val, __VA_ARGS__) + ++#define UCM_DEFINE_SYSCALL_FUNC(_name, _rettype, _syscall_id, ...) \ ++ /* Call syscall */ \ ++ _rettype ucm_orig_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ ++ { \ ++ return (_rettype)syscall(_syscall_id, UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ ++ } ++ ++#if UCM_BISTRO_HOOKS ++# define UCM_DEFINE_SELECT_FUNC(_name, _rettype, _fail_val, _syscall_id, ...) \ ++ _UCM_DEFINE_DLSYM_FUNC(_name, ucm_orig_##_name##_dlsym, ucm_override_##_name, \ ++ _rettype, _fail_val, __VA_ARGS__) \ ++ UCM_DEFINE_SYSCALL_FUNC(_name##_syscall, _rettype, _syscall_id, __VA_ARGS__) \ ++ _rettype ucm_orig_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ ++ { \ ++ return (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_BISTRO) ? \ ++ ucm_orig_##_name##_syscall(UCM_FUNC_PASS_ARGS(__VA_ARGS__)) : \ ++ ucm_orig_##_name##_dlsym(UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ ++ } ++#else ++# define UCM_DEFINE_SELECT_FUNC(_name, _rettype, _fail_val, _syscall_id, ...) \ ++ UCM_DEFINE_DLSYM_FUNC(_name, _rettype, _fail_val, __VA_ARGS__) ++#endif + + /* + * Define argument list with given types. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.c +index bee9b48..ea98df9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.c +@@ -6,8 +6,13 @@ + + #include "sys.h" + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + #include ++#include + #include + #include + #include +@@ -20,8 +25,18 @@ + + #define UCM_PROC_SELF_MAPS "/proc/self/maps" + +- +-static size_t ucm_get_page_size() ++ucm_global_config_t ucm_global_opts = { ++ .log_level = UCS_LOG_LEVEL_WARN, ++ .enable_events = 1, ++ .mmap_hook_mode = UCM_DEFAULT_HOOK_MODE, ++ .enable_malloc_hooks = 1, ++ .enable_malloc_reloc = 0, ++ .enable_cuda_reloc = 1, ++ .enable_dynamic_mmap_thresh = 1, ++ .alloc_alignment = 16 ++}; ++ ++size_t ucm_get_page_size() + { + static long page_size = -1; + long value; +@@ -229,3 +244,15 @@ size_t ucm_get_shm_seg_size(const void *shmaddr) + ucm_parse_proc_self_maps(ucm_get_shm_seg_size_cb, &ctx); + return ctx.seg_size; + } ++ ++void ucm_strerror(int eno, char *buf, size_t max) ++{ ++#if STRERROR_R_CHAR_P ++ char *ret = strerror_r(eno, buf, max); ++ if (ret != buf) { ++ strncpy(buf, ret, max); ++ } ++#else ++ (void)strerror_r(eno, buf, max); ++#endif ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.h +index 3ac09eb..9cb7dea 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.h +@@ -36,6 +36,12 @@ typedef int (*ucm_proc_maps_cb_t)(void *arg, void *addr, size_t length, int prot + + + /** ++ * @return Page size on the system. ++ */ ++size_t ucm_get_page_size(); ++ ++ ++/** + * Read and process entries from /proc/self/maps. + * + * @param [in] cb Callback function that would be called for each entry +@@ -54,4 +60,14 @@ void ucm_parse_proc_self_maps(ucm_proc_maps_cb_t cb, void *arg); + size_t ucm_get_shm_seg_size(const void *shmaddr); + + ++/** ++ * @brief Convert a errno number to error string ++ * ++ * @param [in] en errno value ++ * @param [out] buf Buffer to put the error string in ++ * @param [in] max Size of the buffer ++ */ ++void ucm_strerror(int eno, char *buf, size_t max); ++ ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.c +deleted file mode 100644 +index 29657e9..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.c ++++ /dev/null +@@ -1,222 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#include "ucm_config.h" +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#define UCM_ENV_PREFIX UCS_CONFIG_PREFIX "MEM_" +- +-#define UCM_LOG_LEVEL_VAR "LOG_LEVEL" +-#define UCM_ALLOC_ALIGN_VAR "ALLOC_ALIGN" +-#define UCM_EN_EVENTS_VAR "EVENTS" +-#define UCM_EN_MMAP_RELOC_VAR "MMAP_RELOC" +-#define UCM_EN_MALLOC_HOOKS_VAR "MALLOC_HOOKS" +-#define UCM_EN_MALLOC_RELOC_VAR "MALLOC_RELOC" +-#define UCM_EN_DYNAMIC_MMAP_VAR "DYNAMIC_MMAP_THRESH" +-#define UCM_EN_CUDA_HOOKS_VAR "CUDA_HOOKS" +- +- +-ucm_config_t ucm_global_config = { +- .log_level = UCS_LOG_LEVEL_WARN, +- .alloc_alignment = 16, +- .enable_events = 1, +- .enable_mmap_reloc = 1, +- .enable_malloc_hooks = 1, +- .enable_malloc_reloc = 0, +- .enable_dynamic_mmap_thresh = 1, +-#if HAVE_CUDA +- .enable_cuda_hooks = 1 +-#endif +-}; +- +-static const char *ucm_config_bool_to_string(int value) +-{ +- return value ? "yes" : "no"; +-} +- +-static void ucm_config_print_doc(FILE *stream, const char *doc, const char *syntax, +- ucs_config_print_flags_t print_flags) +-{ +- if (!(print_flags & UCS_CONFIG_PRINT_DOC)) { +- return; +- } +- +- fprintf(stream, "\n"); +- fprintf(stream, "#\n"); +- fprintf(stream, "# %s\n", doc); +- fprintf(stream, "#\n"); +- fprintf(stream, "# Syntax: %s\n", syntax); +- fprintf(stream, "#\n"); +-} +- +-static void ucm_config_print_bool_doc(FILE *stream, const char *doc, +- ucs_config_print_flags_t print_flags) +-{ +- ucm_config_print_doc(stream, doc, "", print_flags); +-} +- +-void ucm_config_print(FILE *stream, ucs_config_print_flags_t print_flags) +-{ +- if (print_flags & UCS_CONFIG_PRINT_HEADER) { +- fprintf(stream, "#\n"); +- fprintf(stream, "# UCM configuration\n"); +- fprintf(stream, "#\n"); +- } +- +- if (!(print_flags & UCS_CONFIG_PRINT_CONFIG)) { +- return; +- } +- +- ucm_config_print_doc(stream, +- "Logging level", "", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_LOG_LEVEL_VAR, +- ucm_log_level_names[ucm_global_config.log_level]); +- +- ucm_config_print_doc(stream, +- "Minimal alignment of allocated blocks", +- "long integer", print_flags); +- fprintf(stream, "%s%s=%zu\n", UCM_ENV_PREFIX, UCM_ALLOC_ALIGN_VAR, +- ucm_global_config.alloc_alignment); +- +- ucm_config_print_bool_doc(stream, +- "Enable memory events", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_EVENTS_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_events)); +- +- ucm_config_print_bool_doc(stream, +- "Enable installing mmap symbols in the relocation table", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_MMAP_RELOC_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_mmap_reloc)); +- +- ucm_config_print_bool_doc(stream, +- "Enable using glibc malloc hooks", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_MALLOC_HOOKS_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_malloc_hooks)); +- +- ucm_config_print_bool_doc(stream, +- "Enable installing malloc symbols in the relocation table.\n" +- "This is unsafe and off by default, because sometimes glibc\n" +- "calls malloc/free without going through the relocation table,\n" +- "which would use the original implementation and not ours.", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_MALLOC_RELOC_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_malloc_reloc)); +- +- +- ucm_config_print_bool_doc(stream, +- "Enable dynamic mmap threshold: for every released block, the\n" +- "mmap threshold is adjusted upward to the size of the size of\n" +- "the block, and trim threshold is adjust to twice the size of\n" +- "the dynamic mmap threshold.", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_DYNAMIC_MMAP_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_dynamic_mmap_thresh)); +- +- +-#if HAVE_CUDA +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_CUDA_HOOKS_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_cuda_hooks)); +-#endif +-} +- +-static void ucm_config_set_value_table(const char *str_value, const char **table, +- int *value) +-{ +- int i; +- +- for (i = 0; table[i] != NULL; ++i) { +- if (!strcasecmp(table[i], str_value)) { +- ucm_global_config.log_level = i; +- return; +- } +- } +-} +- +-static void ucm_config_set_value_bool(const char *str_value, int *value) +-{ +- if (!strcasecmp(str_value, "1") || !strcasecmp(str_value, "y") || !strcasecmp(str_value, "yes")) { +- *value = 1; +- } else if (!strcasecmp(str_value, "0") || !strcasecmp(str_value, "n") || !strcasecmp(str_value, "no")) { +- *value = 0; +- } +-} +- +-static void ucm_config_set_value_size(const char *str_value, size_t *value) +-{ +- char *endptr; +- size_t n; +- +- n = strtoul(str_value, &endptr, 10); +- if (*endptr == '\0') { +- *value = n; +- } +-} +- +-ucs_status_t ucm_config_modify(const char *name, const char *value) +-{ +- if (!strcmp(name, UCM_LOG_LEVEL_VAR)) { +- ucm_config_set_value_table(value, ucm_log_level_names, +- (int*)&ucm_global_config.log_level); +- } else if (!strcmp(name, UCM_ALLOC_ALIGN_VAR)) { +- ucm_config_set_value_size(value, &ucm_global_config.alloc_alignment); +- } else if (!strcmp(name, UCM_EN_EVENTS_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_events); +- } else if (!strcmp(name, UCM_EN_MMAP_RELOC_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_mmap_reloc); +- } else if (!strcmp(name, UCM_EN_MALLOC_HOOKS_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_malloc_hooks); +- } else if (!strcmp(name, UCM_EN_MALLOC_RELOC_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_malloc_reloc); +- } else if (!strcmp(name, UCM_EN_DYNAMIC_MMAP_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_dynamic_mmap_thresh); +-#if HAVE_CUDA +- } else if (!strcmp(name, UCM_EN_CUDA_HOOKS_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_cuda_hooks); +-#endif +- } else { +- return UCS_ERR_INVALID_PARAM; +- } +- +- return UCS_OK; +-} +- +-static void ucm_config_set(const char *name) +-{ +- char var_name[64]; +- char *str_value; +- +- snprintf(var_name, sizeof(var_name), "%s%s", UCM_ENV_PREFIX, name); +- str_value = getenv(var_name); +- if (str_value != NULL) { +- ucm_config_modify(name, str_value); +- } +-} +- +-UCS_STATIC_INIT { +- if (RUNNING_ON_VALGRIND) { +- /* Valgrind limits the size of brk() segments to 8mb, so must use mmap +- * for large allocations. +- */ +- ucm_global_config.enable_dynamic_mmap_thresh = 0; +- } +- ucm_config_set(UCM_LOG_LEVEL_VAR); +- ucm_config_set(UCM_ALLOC_ALIGN_VAR); +- ucm_config_set(UCM_EN_EVENTS_VAR); +- ucm_config_set(UCM_EN_MMAP_RELOC_VAR); +- ucm_config_set(UCM_EN_MALLOC_HOOKS_VAR); +- ucm_config_set(UCM_EN_MALLOC_RELOC_VAR); +- ucm_config_set(UCM_EN_DYNAMIC_MMAP_VAR); +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.h +deleted file mode 100644 +index c99fcd5..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.h ++++ /dev/null +@@ -1,31 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#ifndef UCM_UTIL_CONFIG_H_ +-#define UCM_UTIL_CONFIG_H_ +- +-#include +-#include +-#include +- +- +-typedef struct ucm_config { +- ucs_log_level_t log_level; +- int enable_events; +- int enable_mmap_reloc; +- int enable_malloc_hooks; +- int enable_malloc_reloc; +- int enable_dynamic_mmap_thresh; +-#if HAVE_CUDA +- int enable_cuda_hooks; +-#endif +- size_t alloc_alignment; +-} ucm_config_t; +- +- +-extern ucm_config_t ucm_global_config; +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/Makefile.am +index 4c6a63e..f690c3c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/Makefile.am +@@ -22,7 +22,6 @@ nobase_dist_libucp_la_HEADERS = \ + endif + + noinst_HEADERS = \ +- amo/amo.inl \ + core/ucp_context.h \ + core/ucp_ep.h \ + core/ucp_ep.inl \ +@@ -41,19 +40,20 @@ noinst_HEADERS = \ + dt/dt_generic.h \ + proto/proto.h \ + proto/proto_am.inl \ ++ rma/rma.h \ ++ rma/rma.inl \ + tag/eager.h \ + tag/rndv.h \ + tag/tag_match.h \ + tag/tag_match.inl \ + tag/offload.h \ + wireup/address.h \ ++ wireup/ep_match.h \ + wireup/wireup_ep.h \ + wireup/wireup.h \ + stream/stream.h + + libucp_la_SOURCES = \ +- amo/basic_amo.c \ +- amo/nb_amo.c \ + core/ucp_context.c \ + core/ucp_ep.c \ + core/ucp_listener.c \ +@@ -68,7 +68,12 @@ libucp_la_SOURCES = \ + dt/dt_generic.c \ + dt/dt.c \ + proto/proto_am.c \ +- rma/basic_rma.c \ ++ rma/amo_basic.c \ ++ rma/amo_send.c \ ++ rma/amo_sw.c \ ++ rma/rma_basic.c \ ++ rma/rma_send.c \ ++ rma/rma_sw.c \ + rma/flush.c \ + tag/eager_rcv.c \ + tag/eager_snd.c \ +@@ -79,6 +84,7 @@ libucp_la_SOURCES = \ + tag/tag_send.c \ + tag/offload.c \ + wireup/address.c \ ++ wireup/ep_match.c \ + wireup/select.c \ + wireup/signaling_ep.c \ + wireup/wireup_ep.c \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/amo.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/amo.inl +deleted file mode 100644 +index 75f1ad4..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/amo.inl ++++ /dev/null +@@ -1,270 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +- * Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#ifndef UCP_AMO_INL_ +-#define UCP_AMO_INL_ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-static inline +-ucs_status_t ucp_amo_check_send_status(ucp_request_t *req, ucs_status_t status); +- +-#define UCP_AMO_ONE_PARAM (value) +-#define UCP_AMO_TWO_PARAM (value, *result) +- +-#define _UCP_PROGRESS_AMO_NAME(_function) \ +- UCS_PP_TOKENPASTE(ucp_amo_progress_, _function) +- +-#define UCP_PROGRESS_AMO_DECL(_type, _function, _params) \ +- static ucs_status_t _UCP_PROGRESS_AMO_NAME(_function)(uct_pending_req_t *_self) \ +- { \ +- ucp_request_t *req = ucs_container_of(_self, ucp_request_t, send.uct); \ +- ucp_rkey_h rkey = req->send.amo.rkey; \ +- ucp_ep_t *ep = req->send.ep; \ +- _type value = (_type)req->send.amo.value; \ +- _type *result = (_type *)req->send.amo.result; \ +- uint64_t remote_addr = req->send.amo.remote_addr; \ +- ucs_status_t status; \ +- \ +- status = UCP_RKEY_RESOLVE(rkey, ep, amo); \ +- if (status != UCS_OK) { \ +- return UCS_ERR_UNREACHABLE; \ +- } \ +- \ +- req->send.lane = rkey->cache.amo_lane; \ +- status = _function(ep->uct_eps[req->send.lane], \ +- UCS_PP_TUPLE_BREAK _params, \ +- remote_addr, rkey->cache.amo_rkey, result, \ +- &req->send.state.uct_comp); \ +- return ucp_amo_check_send_status(req, status); \ +- } +- +-UCP_PROGRESS_AMO_DECL(uint32_t, uct_ep_atomic_swap32, UCP_AMO_ONE_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint32_t, uct_ep_atomic_fadd32, UCP_AMO_ONE_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint32_t, uct_ep_atomic_cswap32, UCP_AMO_TWO_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint64_t, uct_ep_atomic_swap64, UCP_AMO_ONE_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint64_t, uct_ep_atomic_fadd64, UCP_AMO_ONE_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint64_t, uct_ep_atomic_cswap64, UCP_AMO_TWO_PARAM) +- +-#define UCP_POST_AMO_DECL(_type, _function) \ +- static ucs_status_t _UCP_PROGRESS_AMO_NAME(_function)(uct_pending_req_t *_self) \ +- { \ +- ucp_request_t *req = ucs_container_of(_self, ucp_request_t, send.uct); \ +- ucp_rkey_h rkey = req->send.amo.rkey; \ +- ucp_ep_t *ep = req->send.ep; \ +- _type value = (_type)req->send.amo.value; \ +- uint64_t remote_addr = req->send.amo.remote_addr; \ +- ucs_status_t status; \ +- \ +- status = UCP_RKEY_RESOLVE(rkey, ep, amo); \ +- if (status != UCS_OK) { \ +- return UCS_ERR_UNREACHABLE; \ +- } \ +- \ +- req->send.lane = rkey->cache.amo_lane; \ +- status = UCS_PROFILE_CALL(_function, ep->uct_eps[req->send.lane], value, \ +- remote_addr, rkey->cache.amo_rkey); \ +- return ucp_amo_check_send_status(req, status); \ +- } +- +-UCP_POST_AMO_DECL(uint64_t, uct_ep_atomic_add64) +- +-UCP_POST_AMO_DECL(uint32_t, uct_ep_atomic_add32) +- +-#define UCP_AMO_WITHOUT_RESULT(_ep, _param, _remote_addr, _rkey, _uct_func, _size) \ +- { \ +- ucs_status_t status; \ +- \ +- status = ucp_rma_check_atomic(_remote_addr, _size); \ +- if (status != UCS_OK) { \ +- goto out; \ +- } \ +- \ +- UCP_THREAD_CS_ENTER_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- for (;;) { \ +- status = UCP_RKEY_RESOLVE(_rkey, _ep, amo); \ +- if (status != UCS_OK) { \ +- goto out_unlock; \ +- } \ +- \ +- status = UCS_PROFILE_CALL(_uct_func, (_ep)->uct_eps[(_rkey)->cache.amo_lane], \ +- _param, _remote_addr, (_rkey)->cache.amo_rkey); \ +- if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { \ +- UCP_THREAD_CS_EXIT_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- return status; \ +- } \ +- ucp_worker_progress((_ep)->worker); \ +- } \ +- \ +- status = UCS_OK; \ +- out_unlock: \ +- UCP_THREAD_CS_EXIT_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- out: \ +- return status; \ +- } +- +-#define UCP_RMA_CHECK_ATOMIC_PTR(_addr, _op_size) \ +- do { \ +- ucs_status_t status = ucp_rma_check_atomic(_addr, _op_size); \ +- \ +- if (status != UCS_OK) { \ +- return UCS_STATUS_PTR(status); \ +- } \ +- } while(0) +- +-static inline +-ucs_status_t ucp_amo_check_send_status(ucp_request_t *req, ucs_status_t status) +-{ +- if (status == UCS_INPROGRESS) { +- return UCS_OK; +- } +- /* Complete for UCS_OK and unexpected errors */ +- if (status != UCS_ERR_NO_RESOURCE) { +- ucp_request_complete_send(req, status); +- } +- return status; +-} +- +-static void ucp_amo_completed_single(uct_completion_t *self, +- ucs_status_t status) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, +- send.state.uct_comp); +- ucs_trace("Invoking completion on AMO request %p", req); +- ucp_request_complete_send(req, status); +-} +- +-static inline ucs_status_t ucp_rma_check_atomic(uint64_t remote_addr, size_t size) +-{ +- if (ENABLE_PARAMS_CHECK && ((remote_addr % size) != 0)) { +- ucs_debug("Error: Atomic variable must be naturally aligned " +- "(got address 0x%"PRIx64", atomic size %zu)", (remote_addr), +- (size)); +- return UCS_ERR_INVALID_PARAM; +- } +- return UCS_OK; +-} +- +-static inline ucs_status_ptr_t +-ucp_amo_send_request(ucp_request_t *req, ucp_send_callback_t cb) +-{ +- ucs_status_t status = ucp_request_send(req); +- +- if (req->flags & UCP_REQUEST_FLAG_COMPLETED) { +- ucs_trace_req("releasing send request %p, returning status %s", req, +- ucs_status_string(status)); +- ucs_mpool_put(req); +- return UCS_STATUS_PTR(status); +- } +- ucs_trace_req("returning amo request %p, status %s", req, +- ucs_status_string(status)); +- ucp_request_set_callback(req, send.cb, cb); +- return req + 1; +-} +- +-static inline +-uct_pending_callback_t ucp_amo_select_uct_func(ucp_atomic_fetch_op_t opcode, size_t op_size) +-{ +- uct_pending_callback_t progress_func; +- +- if (op_size == sizeof(uint64_t)) { +- switch (opcode) { +- case UCP_ATOMIC_FETCH_OP_CSWAP: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_cswap64); +- break; +- case UCP_ATOMIC_FETCH_OP_SWAP: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_swap64); +- break; +- case UCP_ATOMIC_FETCH_OP_FADD: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_fadd64); +- break; +- default: +- progress_func = NULL; +- } +- } else { +- switch (opcode) { +- case UCP_ATOMIC_FETCH_OP_CSWAP: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_cswap32); +- break; +- case UCP_ATOMIC_FETCH_OP_SWAP: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_swap32); +- break; +- case UCP_ATOMIC_FETCH_OP_FADD: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_fadd32); +- break; +- default: +- progress_func = NULL; +- } +- } +- return progress_func; +-} +- +-static inline +-uct_pending_callback_t ucp_amo_post_select_uct_func(ucp_atomic_post_op_t opcode, size_t op_size) +-{ +- uct_pending_callback_t progress_func; +- +- if (opcode != UCP_ATOMIC_POST_OP_ADD) { +- return NULL; +- } +- switch (op_size) { +- case sizeof(uint32_t): +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_add32); +- break; +- case sizeof(uint64_t): +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_add64); +- break; +- default: +- progress_func = NULL; +- } +- +- return progress_func; +-} +- +-static inline void init_amo_common(ucp_request_t *req, ucp_ep_h ep, uint64_t remote_addr, +- ucp_rkey_h rkey, uint64_t value) +-{ +- req->flags = 0; +- req->send.ep = ep; +- req->send.amo.remote_addr = remote_addr; +- req->send.amo.rkey = rkey; +- req->send.amo.value = value; +-#if ENABLE_ASSERT +- req->send.lane = UCP_NULL_LANE; +-#endif +-} +- +-static inline void init_amo_req(ucp_request_t *req, ucp_ep_h ep, void *buffer, +- ucp_atomic_fetch_op_t op, size_t op_size, uint64_t remote_addr, +- ucp_rkey_h rkey, uint64_t value) +-{ +- init_amo_common(req, ep, remote_addr, rkey, value); +- req->send.state.uct_comp.count = 1; +- req->send.state.uct_comp.func = ucp_amo_completed_single; +- req->send.amo.result = buffer; +- req->send.uct.func = ucp_amo_select_uct_func(op, op_size); +-} +- +-static inline void init_amo_post(ucp_request_t *req, ucp_ep_h ep, ucp_atomic_post_op_t op, +- size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey, +- uint64_t value) +-{ +- init_amo_common(req, ep, remote_addr, rkey, value); +- req->send.uct.func = ucp_amo_post_select_uct_func(op, op_size); +-} +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/basic_amo.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/basic_amo.c +deleted file mode 100644 +index cce66ac..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/basic_amo.c ++++ /dev/null +@@ -1,120 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#define UCP_AMO_WITH_RESULT(_ep, _params, _remote_addr, _rkey, _result, _uct_func, _size) \ +- { \ +- uct_completion_t comp; \ +- ucs_status_t status; \ +- \ +- status = ucp_rma_check_atomic(_remote_addr, _size); \ +- if (status != UCS_OK) { \ +- goto out; \ +- } \ +- \ +- UCP_THREAD_CS_ENTER_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- comp.count = 2; \ +- \ +- for (;;) { \ +- status = UCP_RKEY_RESOLVE(_rkey, _ep, amo); \ +- if (status != UCS_OK) { \ +- goto out_unlock; \ +- } \ +- \ +- status = UCS_PROFILE_CALL(_uct_func, (_ep)->uct_eps[(_rkey)->cache.amo_lane], \ +- UCS_PP_TUPLE_BREAK _params, _remote_addr, \ +- (_rkey)->cache.amo_rkey, _result, &comp); \ +- if (ucs_likely(status == UCS_OK)) { \ +- goto out_unlock; \ +- } else if (status == UCS_INPROGRESS) { \ +- goto out_wait; \ +- } else if (status != UCS_ERR_NO_RESOURCE) { \ +- goto out_unlock; \ +- } \ +- ucp_worker_progress((_ep)->worker); \ +- } \ +- out_wait: \ +- do { \ +- ucp_worker_progress((_ep)->worker); \ +- } while (comp.count != 1); \ +- status = UCS_OK; \ +- out_unlock: \ +- UCP_THREAD_CS_EXIT_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- out: \ +- return status; \ +- } +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_add32, (ep, add, remote_addr, rkey), +- ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- UCP_AMO_WITHOUT_RESULT(ep, add, remote_addr, rkey, +- uct_ep_atomic_add32, sizeof(uint32_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_add64, (ep, add, remote_addr, rkey), +- ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- UCP_AMO_WITHOUT_RESULT(ep, add, remote_addr, rkey, +- uct_ep_atomic_add64, sizeof(uint64_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_fadd32, (ep, add, remote_addr, rkey, result), +- ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey, +- uint32_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (add), remote_addr, rkey, result, +- uct_ep_atomic_fadd32, sizeof(uint32_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_fadd64, (ep, add, remote_addr, rkey, result), +- ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey, +- uint64_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (add), remote_addr, rkey, result, +- uct_ep_atomic_fadd64, sizeof(uint64_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_swap32, (ep, swap, remote_addr, rkey, result), +- ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, ucp_rkey_h rkey, +- uint32_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (swap), remote_addr, rkey, result, +- uct_ep_atomic_swap32, sizeof(uint32_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_swap64, (ep, swap, remote_addr, rkey, result), +- ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, ucp_rkey_h rkey, +- uint64_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (swap), remote_addr, rkey, result, +- uct_ep_atomic_swap64, sizeof(uint64_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_cswap32, +- (ep, compare, swap, remote_addr, rkey, result), +- ucp_ep_h ep, uint32_t compare, uint32_t swap, +- uint64_t remote_addr, ucp_rkey_h rkey, uint32_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (compare, swap), remote_addr, rkey, result, +- uct_ep_atomic_cswap32, sizeof(uint32_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_cswap64, +- (ep, compare, swap, remote_addr, rkey, result), +- ucp_ep_h ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, ucp_rkey_h rkey, uint64_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (compare, swap), remote_addr, rkey, result, +- uct_ep_atomic_cswap64, sizeof(uint64_t)); +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/nb_amo.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/nb_amo.c +deleted file mode 100644 +index c629d0e..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/nb_amo.c ++++ /dev/null +@@ -1,81 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +- * Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#include "amo.inl" +-#include +-#include +-#include +-#include +-#include +-#include +- +-ucs_status_ptr_t ucp_atomic_fetch_nb(ucp_ep_h ep, ucp_atomic_fetch_op_t opcode, +- uint64_t value, void *result, size_t op_size, +- uint64_t remote_addr, ucp_rkey_h rkey, +- ucp_send_callback_t cb) +-{ +- ucp_request_t *req; +- ucs_status_ptr_t status; +- UCP_RMA_CHECK_ATOMIC_PTR(remote_addr, op_size); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- req = ucp_request_get(ep->worker); +- if (ucs_unlikely(NULL == req)) { +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); +- } +- init_amo_req(req, ep, result, opcode, op_size, remote_addr, rkey, value); +- status = ucp_amo_send_request(req, cb); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t value, +- size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucs_status_ptr_t status_p; +- ucs_status_t status; +- ucp_request_t *req; +- +- if (ucs_unlikely(opcode != UCP_ATOMIC_POST_OP_ADD)) { +- return UCS_ERR_INVALID_PARAM; +- } +- status = ucp_rma_check_atomic(remote_addr, op_size); +- if (status != UCS_OK) { +- return status; +- } +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, amo); +- if (status != UCS_OK) { +- goto out; +- } +- if (op_size == sizeof(uint32_t)) { +- status = UCS_PROFILE_CALL(uct_ep_atomic_add32, ep->uct_eps[rkey->cache.amo_lane], +- (uint32_t)value, remote_addr, rkey->cache.amo_rkey); +- } else if (op_size == sizeof(uint64_t)) { +- status = UCS_PROFILE_CALL(uct_ep_atomic_add64, ep->uct_eps[rkey->cache.amo_lane], +- (uint64_t)value, remote_addr, rkey->cache.amo_rkey); +- } +- if (ucs_unlikely(status == UCS_ERR_NO_RESOURCE)) { +- req = ucp_request_get(ep->worker); +- if (ucs_unlikely(NULL == req)) { +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return UCS_ERR_NO_MEMORY; +- } +- init_amo_post(req, ep, opcode, op_size, remote_addr, rkey, value); +- status_p = ucp_amo_send_request(req, (ucp_send_callback_t)ucs_empty_function); +- if (UCS_PTR_IS_PTR(status_p)) { +- ucp_request_release(status_p); +- status = UCS_INPROGRESS; +- } else { +- status = UCS_PTR_STATUS(status_p); +- } +- } +-out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp.h +index 4fe28ce..e029d5b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp.h +@@ -2,6 +2,7 @@ + * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. + * Copyright (C) UT-Battelle, LLC. 2014-2017. ALL RIGHTS RESERVED. + * Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED. ++* Copyright (C) Los Alamos National Security, LLC. 2018 ALL RIGHTS RESERVED. + * See file LICENSE for terms. + */ + +@@ -172,13 +173,19 @@ enum ucp_worker_params_field { + * are present. It is used for the enablement of backward compatibility support. + */ + enum ucp_listener_params_field { +- UCP_LISTENER_PARAM_FIELD_SOCK_ADDR = UCS_BIT(0), /**< Sock address and +- length */ +- UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER = UCS_BIT(1) /**< User's callback +- and argument +- for handling the +- creation of an +- endpoint */ ++ /** ++ * Sock address and length. ++ */ ++ UCP_LISTENER_PARAM_FIELD_SOCK_ADDR = UCS_BIT(0), ++ ++ /** ++ * User's callback and argument for handling the creation of an endpoint. ++ * */ ++ UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER = UCS_BIT(1), ++ ++ /**< User's callback and argument for handling the incoming connection ++ * request. */ ++ UCP_LISTENER_PARAM_FIELD_CONN_HANDLER = UCS_BIT(2) + }; + + +@@ -198,7 +205,8 @@ enum ucp_ep_params_field { + transport level errors */ + UCP_EP_PARAM_FIELD_USER_DATA = UCS_BIT(3), /**< User data pointer */ + UCP_EP_PARAM_FIELD_SOCK_ADDR = UCS_BIT(4), /**< Socket address field */ +- UCP_EP_PARAM_FIELD_FLAGS = UCS_BIT(5) /**< Endpoint flags */ ++ UCP_EP_PARAM_FIELD_FLAGS = UCS_BIT(5), /**< Endpoint flags */ ++ UCP_EP_PARAM_FIELD_CONN_REQUEST = UCS_BIT(6) /**< Connection request field */ + }; + + +@@ -210,7 +218,7 @@ enum ucp_ep_params_field { + * @ref ucp_ep_create() function. + */ + enum ucp_ep_params_flags_field { +- UCP_EP_PARAMS_FLAGS_CLIENT_SERVER = UCS_BIT(0) /**< Using a client-server ++ UCP_EP_PARAMS_FLAGS_CLIENT_SERVER = UCS_BIT(0), /**< Using a client-server + connection establishment + mechanism. + @ref ucs_sock_addr_t +@@ -218,6 +226,15 @@ enum ucp_ep_params_flags_field { + must be provided and + contain the address + of the remote peer */ ++ UCP_EP_PARAMS_FLAGS_NO_LOOPBACK = UCS_BIT(1) /**< Avoid connecting the ++ endpoint to itself when ++ connecting the endpoint ++ to the same worker it ++ was created on. ++ Affects protocols which ++ send to a particular ++ remote endpoint, for ++ example stream */ + }; + + +@@ -257,14 +274,12 @@ enum ucp_ep_close_mode { + enum ucp_mem_map_params_field { + UCP_MEM_MAP_PARAM_FIELD_ADDRESS = UCS_BIT(0), /**< Address of the memory that + would be used in the +- @ref ucp_mem_map routine, +- see @ref ucp_mem_map_matrix +- for details */ ++ @ref ucp_mem_map routine. */ + UCP_MEM_MAP_PARAM_FIELD_LENGTH = UCS_BIT(1), /**< The size of memory that + would be allocated or + registered in the + @ref ucp_mem_map routine.*/ +- UCP_MEM_MAP_PARAM_FIELD_FLAGS = UCS_BIT(2) /**< Allocation flags */ ++ UCP_MEM_MAP_PARAM_FIELD_FLAGS = UCS_BIT(2) /**< Allocation flags. */ + }; + + /** +@@ -276,7 +291,7 @@ enum ucp_mem_map_params_field { + */ + enum ucp_mem_advise_params_field { + UCP_MEM_ADVISE_PARAM_FIELD_ADDRESS = UCS_BIT(0), /**< Address of the memory */ +- UCP_MEM_ADVISE_PARAM_FIELD_LENGTH = UCS_BIT(1), /**< The size of memory */ ++ UCP_MEM_ADVISE_PARAM_FIELD_LENGTH = UCS_BIT(1), /**< The size of memory */ + UCP_MEM_ADVISE_PARAM_FIELD_ADVICE = UCS_BIT(2) /**< Advice on memory usage */ + }; + +@@ -357,6 +372,9 @@ enum { + */ + typedef enum { + UCP_ATOMIC_POST_OP_ADD, /**< Atomic add */ ++ UCP_ATOMIC_POST_OP_AND, /**< Atomic and */ ++ UCP_ATOMIC_POST_OP_OR, /**< Atomic or */ ++ UCP_ATOMIC_POST_OP_XOR, /**< Atomic xor */ + UCP_ATOMIC_POST_OP_LAST + } ucp_atomic_post_op_t; + +@@ -370,14 +388,33 @@ typedef enum { + * will fetch data from the remote node. + */ + typedef enum { +- UCP_ATOMIC_FETCH_OP_FADD, /**< Atomic Fetch and add */ +- UCP_ATOMIC_FETCH_OP_SWAP, /**< Atomic swap */ ++ UCP_ATOMIC_FETCH_OP_FADD, /**< Atomic Fetch and add */ ++ UCP_ATOMIC_FETCH_OP_SWAP, /**< Atomic swap */ + UCP_ATOMIC_FETCH_OP_CSWAP, /**< Atomic conditional swap */ ++ UCP_ATOMIC_FETCH_OP_FAND, /**< Atomic Fetch and and */ ++ UCP_ATOMIC_FETCH_OP_FOR, /**< Atomic Fetch and or */ ++ UCP_ATOMIC_FETCH_OP_FXOR, /**< Atomic Fetch and xor */ + UCP_ATOMIC_FETCH_OP_LAST + } ucp_atomic_fetch_op_t; + + + /** ++ * @ingroup UCP_COMM ++ * @brief Flags to define behavior of @ref ucp_stream_recv_nb function ++ * ++ * This enumeration defines behavior of @ref ucp_stream_recv_nb function. ++ */ ++typedef enum { ++ UCP_STREAM_RECV_FLAG_WAITALL = UCS_BIT(0) /**< This flag requests that ++ operation will not be ++ completed untill all amout ++ of requested data is ++ received and placed in the ++ user buffer. */ ++} ucp_stream_recv_flags_t; ++ ++ ++/** + * @ingroup UCP_DATATYPE + * @brief Generate an identifier for contiguous data type. + * +@@ -513,15 +550,15 @@ typedef struct ucp_generic_dt_ops { + * The pointer refers to application defined unpack routine. + * + * @param [in] state State as returned by +- * @ref ucp_generic_dt_ops::start_pack +- * "start_pack()" routine. ++ * @ref ucp_generic_dt_ops::start_unpack ++ * "start_unpack()" routine. + * @param [in] offset Virtual offset in the input stream. + * @param [in] src Source to unpack the data from. + * @param [in] length Length to unpack. + * + * @return UCS_OK or an error if unpacking failed. + */ +- ucs_status_t (*unpack)(void *state, size_t offset, const void *src, size_t count); ++ ucs_status_t (*unpack)(void *state, size_t offset, const void *src, size_t length); + + /** + * @ingroup UCP_DATATYPE +@@ -596,7 +633,7 @@ typedef struct ucp_params { + * Pointer to a routine that is responsible for final cleanup of the memory + * associated with the request. This routine may not be called every time a + * request is released. For some implementations, the cleanup call may be +- * delayed and only invoked at @ref ucp_worker_cleanup. ++ * delayed and only invoked at @ref ucp_worker_destroy. + * + * @e NULL can be used if no such function is required, which is also the + * default if this field is not specified by @ref field_mask. +@@ -620,6 +657,9 @@ typedef struct ucp_params { + * thread safety; if the context is used by worker 1 and worker 2, + * and worker 1 is used by thread 1 and worker 2 is used by thread 2, + * then this context needs thread safety. ++ * Note that actual thread mode may be different from mode passed ++ * to @ref ucp_init. To get actual thread mode use ++ * @ref ucp_context_query. + */ + int mt_workers_shared; + +@@ -706,11 +746,16 @@ typedef struct ucp_worker_params { + uint64_t field_mask; + + /** +- * Thread safety "mode" for the worker object and resources associated with it. +- * This value is optional. +- * If it's not set (along with its corresponding bit in the field_mask - +- * UCP_WORKER_PARAM_FIELD_THREAD_MODE), the UCS_THREAD_MODE_SINGLE mode +- * will be used. ++ * The parameter thread_mode suggests the thread safety mode which worker ++ * and the associated resources should be created with. This is an ++ * optional parameter. The default value is UCS_THREAD_MODE_SINGLE and ++ * it is used when the value of the parameter is not set. When this ++ * parameter along with its corresponding bit in the ++ * field_mask - UCP_WORKER_PARAM_FIELD_THREAD_MODE is set, the ++ * @ref ucp_worker_create attempts to create worker with this thread mode. ++ * The thread mode with which worker is created can differ from the ++ * suggested mode. The actual thread mode of the worker should be obtained ++ * using the query interface @ref ucp_worker_query. + */ + ucs_thread_mode_t thread_mode; + +@@ -745,12 +790,12 @@ typedef struct ucp_worker_params { + * This value is optional. + * If @ref UCP_WORKER_PARAM_FIELD_EVENT_FD is set in the field_mask, events + * on the worker will be reported on the provided event file descriptor. In +- * this case, calling @ref ucp_worker_get_efd() will result in an error. ++ * this case, calling @ref ucp_worker_get_efd will result in an error. + * The provided file descriptor must be capable of aggregating notifications + * for arbitrary events, for example @c epoll(7) on Linux systems. + * @ref user_data will be used as the event user-data on systems which + * support it. For example, on Linux, it will be placed in +- * @ref epoll_data_t::ptr, when returned from @ref epoll_wait(). ++ * @c epoll_data_t::ptr, when returned from @c epoll_wait(2). + * + * Otherwise, events would be reported to the event file descriptor returned + * from @ref ucp_worker_get_efd(). +@@ -774,7 +819,7 @@ typedef struct ucp_listener_params { + * Fields not specified in this mask would be ignored. + * Provides ABI compatibility with respect to adding new fields. + */ +- uint64_t field_mask; ++ uint64_t field_mask; + + /** + * An address in the form of a sockaddr. +@@ -783,7 +828,7 @@ typedef struct ucp_listener_params { + * The @ref ucp_listener_create routine will return with an error if sockaddr + * is not specified. + */ +- ucs_sock_addr_t sockaddr; ++ ucs_sock_addr_t sockaddr; + + /** + * Handler to endpoint creation in a client-server connection flow. +@@ -791,73 +836,16 @@ typedef struct ucp_listener_params { + * UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER needs to be set in the + * field_mask. + */ +- ucp_listener_accept_handler_t accept_handler; +-} ucp_listener_params_t; +- ++ ucp_listener_accept_handler_t accept_handler; + +-/** +- * @ingroup UCP_ENDPOINT +- * @brief Tuning parameters for the UCP endpoint. +- * +- * The structure defines the parameters that are used for the +- * UCP endpoint tuning during the UCP ep @ref ucp_ep_create "creation". +- */ +-typedef struct ucp_ep_params { + /** +- * Mask of valid fields in this structure, using bits from +- * @ref ucp_ep_params_field. +- * Fields not specified in this mask would be ignored. +- * Provides ABI compatibility with respect to adding new fields. +- */ +- uint64_t field_mask; +- +- /** +- * Destination address; if the @ref UCP_EP_PARAMS_FLAGS_CLIENT_SERVER flag +- * is not set, this address is mandatory for filling +- * (along with its corresponding bit in the field_mask - @ref +- * UCP_EP_PARAM_FIELD_REMOTE_ADDRESS) and must be obtained using +- * @ref ucp_worker_get_address. This field cannot be changed by +- * @ref ucp_ep_modify_nb. +- */ +- const ucp_address_t *address; +- +- /** +- * Desired error handling mode, optional parameter. Default value is +- * @ref UCP_ERR_HANDLING_MODE_NONE. This field cannot be changed by +- * @ref ucp_ep_modify_nb. +- */ +- ucp_err_handling_mode_t err_mode; +- +- /** +- * Handler to process transport level failure. +- */ +- ucp_err_handler_t err_handler; +- +- /** +- * User data associated with an endpoint. See @ref ucp_stream_poll_ep_t and +- * @ref ucp_err_handler_t +- */ +- void *user_data; +- +- /** +- * Endpoint flags from @ref ucp_ep_params_flags_field. +- * This value is optional. +- * If it's not set (along with its corresponding bit in the field_mask - +- * @ref UCP_EP_PARAM_FIELD_FLAGS), the @ref ucp_ep_create() routine will +- * consider the flags as set to zero. +- */ +- unsigned flags; +- +- /** +- * Destination address in the form of a sockaddr; +- * if the @ref UCP_EP_PARAMS_FLAGS_CLIENT_SERVER flag is set, this address +- * is mandatory for filling (along with its corresponding bit in the +- * field_mask - @ref UCP_EP_PARAM_FIELD_SOCK_ADDR) and should be obtained +- * from the user. This field cannot be changed by @ref ucp_ep_modify_nb. ++ * Handler of an incoming connection request in a client-server connection ++ * flow. In order for the callback inside this handler to be invoked, the ++ * @ref UCP_LISTENER_PARAM_FIELD_CONN_HANDLER needs to be set in the ++ * field_mask. + */ +- ucs_sock_addr_t sockaddr; +- +-} ucp_ep_params_t; ++ ucp_listener_conn_handler_t conn_handler; ++} ucp_listener_params_t; + + + /** +@@ -962,7 +950,7 @@ struct ucp_tag_recv_info { + * the run-time environment. Then, the fetched descriptor is used for + * UCP library @ref ucp_init "initialization". The Application can print out the + * descriptor using @ref ucp_config_print "print" routine. In addition +- * the application is responsible to @ref ucp_config_free "free" the ++ * the application is responsible to @ref ucp_config_release "release" the + * descriptor back to UCP library. + * + * @param [in] env_prefix If non-NULL, the routine searches for the +@@ -1308,8 +1296,8 @@ unsigned ucp_worker_progress(ucp_worker_h worker); + * @brief Poll for endpoints that are ready to consume streaming data. + * + * This non-blocking routine returns endpoints on a worker which are ready +- * to consume streaming data. The ready endpoints are placed in @poll_eps array, +- * and the function return value indicates how many are there. ++ * to consume streaming data. The ready endpoints are placed in @a poll_eps ++ * array, and the function return value indicates how many are there. + * + * @param [in] worker Worker to poll. + * @param [out] poll_eps Pointer to array of endpoints, should be +@@ -1318,7 +1306,7 @@ unsigned ucp_worker_progress(ucp_worker_h worker); + * in @a poll_eps. + * @param [in] flags Reserved for future use. + * +- * @return Negative value indicates an error according to @ref ucp_status_t. ++ * @return Negative value indicates an error according to @ref ucs_status_t. + * On success, non-negative value (less or equal @a max_eps) indicates + * actual number of endpoints filled in @a poll_eps array. + * +@@ -1412,6 +1400,7 @@ ucs_status_t ucp_worker_wait(ucp_worker_h worker); + * an opportunity for energy savings for architectures that support this + * functionality. + * ++ * @param [in] worker Worker to wait for updates on. + * @param [in] address Local memory address + */ + void ucp_worker_wait_mem(ucp_worker_h worker, void *address); +@@ -1440,26 +1429,31 @@ void ucp_worker_wait_mem(ucp_worker_h worker, void *address); + * + * @code {.c} + * void application_initialization() { ++ * // should be called once in application init flow and before ++ * // process_comminucation() is used + * ... + * status = ucp_worker_get_efd(worker, &fd); + * ... + * } + * + * void process_comminucation() { ++ * // should be called every time need to wait for some condition such as ++ * // ucp request completion in sleep mode. ++ * + * for (;;) { +- * // check for events as long as progress is made ++ * // check for stop condition as long as progress is made + * if (check_for_events()) { +- * break; // got something interesting, exit ++ * break; + * } else if (ucp_worker_progress(worker)) { +- * continue; // got something uninteresting, retry ++ * continue; // some progress happened but condition not met + * } + * + * // arm the worker and clean-up fd + * status = ucp_worker_arm(worker); + * if (UCS_OK == status) { +- * poll(&fds, nfds, timeout); // wait for events ++ * poll(&fds, nfds, timeout); // wait for events (sleep mode) + * } else if (UCS_ERR_BUSY == status) { +- * continue; // poll for more events ++ * continue; // could not arm, need to progress more + * } else { + * abort(); + * } +@@ -1493,6 +1487,11 @@ ucs_status_t ucp_worker_arm(ucp_worker_h worker); + * waiting on a file descriptor from @ref ucp_worker_get_efd to return, even + * if no event from the underlying interfaces has taken place. + * ++ * @note It’s safe to use this routine from any thread, even if UCX is compiled ++ * without multi-threading support and/or initialized with any value of ++ * @ref ucp_params_t::mt_workers_shared and ++ * @ref ucp_worker_params_t::thread_mode parameters ++ * + * @param [in] worker Worker to wait for events on. + * + * @return Error code as defined by @ref ucs_status_t +@@ -1555,6 +1554,18 @@ void ucp_listener_destroy(ucp_listener_h listener); + * @param [out] ep_p A handle to the created endpoint. + * + * @return Error code as defined by @ref ucs_status_t ++ * ++ * @note One of the following fields has to be specified: ++ * - ucp_ep_params_t::address ++ * - ucp_ep_params_t::sockaddr ++ * - ucp_ep_params_t::conn_request ++ ++ * @note By default, ucp_ep_create() will connect an endpoint to itself if ++ * the endpoint is destined to the same @a worker on which it was created, ++ * i.e. @a params.address belongs to @a worker. This behavior can be changed by ++ * passing the @ref UCP_EP_PARAMS_FLAGS_NO_LOOPBACK flag in @a params.flags. ++ * In that case, the endpoint will be connected to the *next* endpoint created ++ * in the same way on the same @a worker. + */ + ucs_status_t ucp_ep_create(ucp_worker_h worker, const ucp_ep_params_t *params, + ucp_ep_h *ep_p); +@@ -1562,37 +1573,6 @@ ucs_status_t ucp_ep_create(ucp_worker_h worker, const ucp_ep_params_t *params, + + /** + * @ingroup UCP_ENDPOINT +- * @brief Modify endpoint parameters. +- * +- * This routine modifies @ref ucp_ep_h "endpoint" created by @ref ucp_ep_create +- * or @ref ucp_listener_accept_callback_t. For example, this API can be used +- * to setup custom parameters like @ref ucp_ep_params_t::user_data or +- * @ref ucp_ep_params_t::err_handler_cb to endpoint created by +- * @ref ucp_listener_accept_callback_t. +- * +- * @param [in] ep A handle to the endpoint. +- * @param [in] params User defined @ref ucp_ep_params_t configurations +- * for the @ref ucp_ep_h "UCP endpoint". +- * +- * @return NULL - The endpoint is modified successfully. +- * @return UCS_PTR_IS_ERR(_ptr) - The reconfiguration failed and an error code +- * indicates the status. However, the @a endpoint +- * is not modified and can be used further. +- * @return otherwise - The reconfiguration process is started, and can be +- * completed at any point in time. A request handle +- * is returned to the application in order to track +- * progress of the endpoint modification. +- * The application is responsible for releasing the +- * handle using the @ref ucp_request_free routine. +- * +- * @note See the documentation of @ref ucp_ep_params_t for details, only some of +- * the parameters can be modified. +- */ +-ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params); +- +- +-/** +- * @ingroup UCP_ENDPOINT + * + * @brief Non-blocking @ref ucp_ep_h "endpoint" closure. + * +@@ -1614,13 +1594,33 @@ ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params); + * is responsible for releasing the handle using the + * @ref ucp_request_free routine. + * +- * @note @ref ucp_ep_close_nb replaces deprecated @ref ucp_disconnect_nb and ++ * @note @ref ucp_ep_close_nb replaces deprecated @ref ucp_disconnect_nb and + * @ref ucp_ep_destroy + */ + ucs_status_ptr_t ucp_ep_close_nb(ucp_ep_h ep, unsigned mode); + + + /** ++ * @ingroup UCP_WORKER ++ * ++ * @brief Reject an incoming connection request. ++ * ++ * Reject the incoming connection request and release associated resources. If ++ * the remote initiator endpoint has set an @ref ucp_ep_params_t::err_handler, ++ * it will be invoked with status @ref UCS_ERR_REJECTED. ++ * ++ * @param [in] listener Handle to the listener on which the connection ++ * request was received. ++ * @param [in] conn_request Handle to the connection request to reject. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ * ++ */ ++ucs_status_t ucp_listener_reject(ucp_listener_h listener, ++ ucp_conn_request_h conn_request); ++ ++ ++/** + * @ingroup UCP_ENDPOINT + * @brief Print endpoint information. + * +@@ -1681,7 +1681,7 @@ void ucp_ep_print_info(ucp_ep_h ep, FILE *stream); + * ucp_worker_progress(worker); + * status = ucp_request_check_status(request); + * } while (status == UCS_INPROGRESS); +- * ucp_request_release(request); ++ * ucp_request_free(request); + * return status; + * } + * } +@@ -1723,14 +1723,14 @@ ucs_status_ptr_t ucp_ep_flush_nb(ucp_ep_h ep, unsigned flags, + * management. + * + * +- * ++ * + * + * + * + * + * +- * + *
Matrix of behaviorMatrix of behavior
parameter/flag @ref UCP_MEM_MAP_NONBLOCK "NONBLOCK"@ref UCP_MEM_MAP_ALLOCATE "ALLOCATE"@ref UCP_MEM_MAP_FIXED "FIXED"@ref ucp_mem_map_params.address "address"@b result + *
@b value 0/1 - the value\n only affects the\n register/map\n phase0 0 0 @ref anch_err "error" ++ * 0 0 0 @ref anch_err "error" if length > 0 + *
1 0 0 @ref anch_alloc_reg "alloc+register" + *
0 1 0 @ref anch_err "error"
0 0 defined @ref anch_reg "register" +@@ -1825,7 +1825,7 @@ typedef enum ucp_mem_advice { + UCP_MADV_NORMAL = 0, /**< No special treatment */ + UCP_MADV_WILLNEED /**< can be used on the memory mapped with + @ref UCP_MEM_MAP_NONBLOCK to speed up memory +- mapping and to avoid page faults when ++ mapping and to avoid page faults when + the memory is accessed for the first time. */ + } ucp_mem_advice_t; + +@@ -1835,7 +1835,7 @@ typedef enum ucp_mem_advice { + * @brief Tuning parameters for the UCP memory advice. + * + * This structure defines the parameters that are used for the +- * UCP memory advice tuning during the @ref ucp_mem_advise "ucp_mem_advise" ++ * UCP memory advice tuning during the @ref ucp_mem_advise "ucp_mem_advise" + * routine. + */ + typedef struct ucp_mem_advise_params { +@@ -1847,7 +1847,7 @@ typedef struct ucp_mem_advise_params { + uint64_t field_mask; + + /** +- * Memory base address. ++ * Memory base address. + */ + void *address; + +@@ -1869,20 +1869,20 @@ typedef struct ucp_mem_advise_params { + * + * This routine advises the UCP about how to handle memory range beginning at + * address and size of length bytes. This call does not influence the semantics +- * of the application, but may influence its performance. The UCP may ignore ++ * of the application, but may influence its performance. The UCP may ignore + * the advice. + * + * @param [in] context Application @ref ucp_context_h "context" which was + * used to allocate/map the memory. + * @param [in] memh @ref ucp_mem_h "Handle" to memory region. +- * @param [in] params Memory base address and length. The advice field +- * is used to pass memory use advice as defined in ++ * @param [in] params Memory base address and length. The advice field ++ * is used to pass memory use advice as defined in + * the @ref ucp_mem_advice list + * The memory range must belong to the @a memh + * + * @return Error code as defined by @ref ucs_status_t + */ +-ucs_status_t ucp_mem_advise(ucp_context_h context, ucp_mem_h memh, ++ucs_status_t ucp_mem_advise(ucp_context_h context, ucp_mem_h memh, + ucp_mem_advise_params_t *params); + + +@@ -1970,13 +1970,13 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + * that are reacheble via shared memory. + * + * @param [in] rkey A remote key handle. +- * @param [in] raddr A remote address within the memory area ++ * @param [in] raddr A remote memory address within the memory area + * described by the rkey. + * @param [out] addr_p A pointer that can be used for direct + * access to the remote memory. + * + * @return Error code as defined by @ref ucs_status_t if the remote memory +- * cannot be accessed directly or the remote address is not valid. ++ * cannot be accessed directly or the remote memory address is not valid. + */ + ucs_status_t ucp_rkey_ptr(ucp_rkey_h rkey, uint64_t raddr, void **addr_p); + +@@ -2208,7 +2208,7 @@ ucs_status_ptr_t ucp_tag_send_sync_nb(ucp_ep_h ep, const void *buffer, size_t co + + /** + * @ingroup UCP_COMM +- * @brief Non-blocking stream receive operation of structured data into a ++ * @brief Non-blocking stream receive operation of structured data into a + * user-supplied buffer. + * + * This routine receives data that is described by the local address @a buffer, +@@ -2235,7 +2235,7 @@ ucs_status_ptr_t ucp_tag_send_sync_nb(ucp_ep_h ep, const void *buffer, size_t co + * valid only if return code is UCS_OK. + * @note The amount of data received, in bytes, is always an + * integral multiple of the @a datatype size. +- * @param [in] flags Reserved for future use. ++ * @param [in] flags Flags defined in @ref ucp_stream_recv_flags_t. + * + * @return UCS_OK - The receive operation was completed + * immediately. +@@ -2451,30 +2451,6 @@ ucs_status_ptr_t ucp_tag_msg_recv_nb(ucp_worker_h worker, void *buffer, + + /** + * @ingroup UCP_COMM +- * @brief Blocking remote memory put operation. +- * +- * This routine stores contiguous block of data that is described by the +- * local address @a buffer in the remote contiguous memory region described by +- * @a remote_addr address and the @ref ucp_rkey_h "memory handle" @a rkey. The +- * routine returns when it is safe to reuse the source address @e buffer. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] buffer Pointer to the local source address. +- * @param [in] length Length of the data (in bytes) stored under the +- * source address. +- * @param [in] remote_addr Pointer to the destination remote address +- * to write to. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_put(ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey); +- +- +-/** +- * @ingroup UCP_COMM + * @brief Non-blocking implicit remote memory put operation. + * + * This routine initiates a storage of contiguous block of data that is +@@ -2492,41 +2468,62 @@ ucs_status_t ucp_put(ucp_ep_h ep, const void *buffer, size_t length, + * @param [in] buffer Pointer to the local source address. + * @param [in] length Length of the data (in bytes) stored under the + * source address. +- * @param [in] remote_addr Pointer to the destination remote address ++ * @param [in] remote_addr Pointer to the destination remote memory address + * to write to. + * @param [in] rkey Remote memory key associated with the +- * remote address. ++ * remote memory address. + * + * @return Error code as defined by @ref ucs_status_t + */ + ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length, + uint64_t remote_addr, ucp_rkey_h rkey); + +- + /** + * @ingroup UCP_COMM +- * @brief Blocking remote memory get operation. ++ * @brief Non-blocking remote memory put operation. + * +- * This routine loads contiguous block of data that is described by the remote +- * address @a remote_addr and the @ref ucp_rkey_h "memory handle" @a rkey in +- * the local contiguous memory region described by @a buffer address. The +- * routine returns when remote data is loaded and stored under the local address +- * @e buffer. ++ * This routine initiates a storage of contiguous block of data that is ++ * described by the local address @a buffer in the remote contiguous memory ++ * region described by @a remote_addr address and the @ref ucp_rkey_h "memory ++ * handle" @a rkey. The routine returns immediately and @b does @b not ++ * guarantee re-usability of the source address @e buffer. If the operation is ++ * completed immediately the routine return UCS_OK, otherwise UCS_INPROGRESS ++ * or an error is returned to user. If the put operation completes immediately, ++ * the routine returns UCS_OK and the call-back routine @a cb is @b not ++ * invoked. If the operation is @b not completed immediately and no error is ++ * reported, then the UCP library will schedule invocation of the call-back ++ * routine @a cb upon completion of the put operation. In other words, the ++ * completion of a put operation can be signaled by the return code or ++ * execution of the call-back. + * ++ * @note A user can use @ref ucp_worker_flush_nb "ucp_worker_flush_nb()" ++ * in order to guarantee re-usability of the source address @e buffer. + * + * @param [in] ep Remote endpoint handle. + * @param [in] buffer Pointer to the local source address. + * @param [in] length Length of the data (in bytes) stored under the + * source address. +- * @param [in] remote_addr Pointer to the destination remote address ++ * @param [in] remote_addr Pointer to the destination remote memory address + * to write to. + * @param [in] rkey Remote memory key associated with the +- * remote address. ++ * remote memory address. ++ * @param [in] cb Call-back function that is invoked whenever the ++ * put operation is completed and the local buffer ++ * can be modified. Does not guarantee remote ++ * completion. + * +- * @return Error code as defined by @ref ucs_status_t ++ * @return UCS_OK - The operation was completed immediately. ++ * @return UCS_PTR_IS_ERR(_ptr) - The operation failed. ++ * @return otherwise - Operation was scheduled and can be ++ * completed at any point in time. The request handle ++ * is returned to the application in order to track ++ * progress of the operation. The application is ++ * responsible for releasing the handle using ++ * @ref ucp_request_free "ucp_request_free()" routine. + */ +-ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey); ++ucs_status_ptr_t ucp_put_nb(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb); + + + /** +@@ -2534,7 +2531,7 @@ ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, + * @brief Non-blocking implicit remote memory get operation. + * + * This routine initiate a load of contiguous block of data that is described +- * by the remote address @a remote_addr and the @ref ucp_rkey_h "memory handle" ++ * by the remote memory address @a remote_addr and the @ref ucp_rkey_h "memory handle" + * @a rkey in the local contiguous memory region described by @a buffer + * address. The routine returns immediately and @b does @b not guarantee that + * remote data is loaded and stored under the local address @e buffer. +@@ -2547,264 +2544,61 @@ ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, + * @param [in] buffer Pointer to the local source address. + * @param [in] length Length of the data (in bytes) stored under the + * source address. +- * @param [in] remote_addr Pointer to the destination remote address ++ * @param [in] remote_addr Pointer to the destination remote memory address + * to write to. + * @param [in] rkey Remote memory key associated with the +- * remote address. ++ * remote memory address. + * + * @return Error code as defined by @ref ucs_status_t + */ + ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length, + uint64_t remote_addr, ucp_rkey_h rkey); + +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic add operation for 32 bit integers +- * +- * This routine performs an add operation on a 32 bit integer value atomically. +- * The remote integer value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a add value is the value that is used for the add operation. +- * When the operation completes the sum of the original remote value and the +- * operand value (@a add) is stored in remote memory. +- * The call to the routine returns immediately, independent of operation +- * completion. +- * +- * @note The remote address must be aligned to 32 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] add Value to add. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_add32(ucp_ep_h ep, uint32_t add, +- uint64_t remote_addr, ucp_rkey_h rkey); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic add operation for 64 bit integers +- * +- * This routine performs an add operation on a 64 bit integer value atomically. +- * The remote integer value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a add value is the value that is used for the add operation. +- * When the operation completes the sum of the original remote value and the +- * operand value (@a add) is stored in remote memory. +- * The call to the routine returns immediately, independent of operation +- * completion. +- * +- * @note The remote address must be aligned to 64 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] add Value to add. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_add64(ucp_ep_h ep, uint64_t add, +- uint64_t remote_addr, ucp_rkey_h rkey); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic fetch and add operation for 32 bit integers +- * +- * This routine performs an add operation on a 32 bit integer value atomically. +- * The remote integer value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a add value is the value that is used for the add operation. +- * When the operation completes, the original remote value is stored in the +- * local memory @a result, and the sum of the original remote value and the +- * operand value is stored in remote memory. +- * The call to the routine returns when the operation is completed and the +- * @a result value is updated. +- * +- * @note The remote address must be aligned to 32 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] add Value to add. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_fadd32(ucp_ep_h ep, uint32_t add, uint64_t remote_addr, +- ucp_rkey_h rkey, uint32_t *result); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic fetch and add operation for 64 bit integers +- * +- * This routine performs an add operation on a 64 bit integer value atomically. +- * The remote integer value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a add value is the value that is used for the add operation. +- * When the operation completes, the original remote value is stored in the +- * local memory @a result, and the sum of the original remote value and the +- * operand value is stored in remote memory. +- * The call to the routine returns when the operation is completed and the +- * @a result value is updated. +- * +- * @note The remote address must be aligned to 64 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] add Value to add. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_fadd64(ucp_ep_h ep, uint64_t add, uint64_t remote_addr, +- ucp_rkey_h rkey, uint64_t *result); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic swap operation for 32 bit values +- * +- * This routine swaps a 32 bit value between local and remote memory. +- * The remote value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a swap value is the value that is used for the swap operation. +- * When the operation completes, the remote value is stored in the +- * local memory @a result, and the operand value (@a swap) is stored in remote +- * memory. The call to the routine returns when the operation is completed and +- * the @a result value is updated. +- * +- * @note The remote address must be aligned to 32 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] swap Value to swap. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_swap32(ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, +- ucp_rkey_h rkey, uint32_t *result); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic swap operation for 64 bit values +- * +- * This routine swaps a 64 bit value between local and remote memory. +- * The remote value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a swap value is the value that is used for the swap operation. +- * When the operation completes, the remote value is stored in the +- * local memory @a result, and the operand value (@a swap) is stored in remote +- * memory. The call to the routine returns when the operation is completed and +- * the @a result value is updated. +- * +- * @note The remote address must be aligned to 64 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] swap Value to swap. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_swap64(ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, +- ucp_rkey_h rkey, uint64_t *result); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic conditional swap (cswap) operation for 32 bit values. +- * +- * This routine conditionally swaps a 32 bit value between local and remote +- * memory. The swap occurs only if the condition value (@a continue) is equal +- * to the remote value, otherwise the remote memory is not modified. The +- * remote value is described by the combination of the remote memory address @p +- * remote_addr and the @ref ucp_rkey_h "remote memory handle" @a rkey. The @p +- * swap value is the value that is used to update the remote memory if the +- * condition is true. The call to the routine returns when the operation is +- * completed and the @a result value is updated. +- * +- * @note The remote address must be aligned to 32 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] compare Value to compare to. +- * @param [in] swap Value to swap. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_cswap32(ucp_ep_h ep, uint32_t compare, uint32_t swap, +- uint64_t remote_addr, ucp_rkey_h rkey, +- uint32_t *result); +- +- + /** + * @ingroup UCP_COMM +- * @brief Blocking atomic conditional swap (cswap) operation for 64 bit values. ++ * @brief Non-blocking remote memory get operation. ++ * ++ * This routine initiates a load of a contiguous block of data that is ++ * described by the remote memory address @a remote_addr and the @ref ucp_rkey_h ++ * "memory handle" @a rkey in the local contiguous memory region described ++ * by @a buffer address. The routine returns immediately and @b does @b not ++ * guarantee that remote data is loaded and stored under the local address @e ++ * buffer. If the operation is completed immediately the routine return UCS_OK, ++ * otherwise UCS_INPROGRESS or an error is returned to user. If the get ++ * operation completes immediately, the routine returns UCS_OK and the ++ * call-back routine @a cb is @b not invoked. If the operation is @b not ++ * completed immediately and no error is reported, then the UCP library will ++ * schedule invocation of the call-back routine @a cb upon completion of the ++ * get operation. In other words, the completion of a get operation can be ++ * signaled by the return code or execution of the call-back. + * +- * This routine conditionally swaps a 64 bit value between local and remote +- * memory. The swap occurs only if the condition value (@a continue) is equal +- * to the remote value, otherwise the remote memory is not modified. The +- * remote value is described by the combination of the remote memory address @p +- * remote_addr and the @ref ucp_rkey_h "remote memory handle" @a rkey. The @p +- * swap value is the value that is used to update the remote memory if the +- * condition is true. The call to the routine returns when the operation is +- * completed and the @a result value is updated. +- * +- * @note The remote address must be aligned to 64 bit. ++ * @note A user can use @ref ucp_worker_flush_nb "ucp_worker_flush_nb()" ++ * in order to guarantee re-usability of the source address @e buffer. + * + * @param [in] ep Remote endpoint handle. +- * @param [in] compare Value to compare to. +- * @param [in] swap Value to swap. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. ++ * @param [in] buffer Pointer to the local source address. ++ * @param [in] length Length of the data (in bytes) stored under the ++ * source address. ++ * @param [in] remote_addr Pointer to the destination remote memory address ++ * to write to. + * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr ++ * remote memory address. ++ * @param [in] cb Call-back function that is invoked whenever the ++ * get operation is completed and the data is ++ * visible to the local process. + * +- * @return Error code as defined by @ref ucs_status_t ++ * @return UCS_OK - The operation was completed immediately. ++ * @return UCS_PTR_IS_ERR(_ptr) - The operation failed. ++ * @return otherwise - Operation was scheduled and can be ++ * completed at any point in time. The request handle ++ * is returned to the application in order to track ++ * progress of the operation. The application is ++ * responsible for releasing the handle using ++ * @ref ucp_request_free "ucp_request_free()" routine. + */ +-ucs_status_t ucp_atomic_cswap64(ucp_ep_h ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, ucp_rkey_h rkey, +- uint64_t *result); +- ++ucs_status_ptr_t ucp_get_nb(ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb); + + /** + * @ingroup UCP_COMM +@@ -2823,7 +2617,7 @@ ucs_status_t ucp_atomic_cswap64(ucp_ep_h ep, uint64_t compare, uint64_t swap, + * @param [in] value Source operand for the atomic operation. + * @param [in] op_size Size of value in bytes + * @param [in] remote_addr Remote address to operate on. +- * @param [in] rkey Remote key handle for the remote address. ++ * @param [in] rkey Remote key handle for the remote memory address. + * + * @return Error code as defined by @ref ucs_status_t + */ +@@ -2862,7 +2656,7 @@ ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t + * is true. + * @param [in] op_size Size of value in bytes and pointer type for result + * @param [in] remote_addr Remote address to operate on. +- * @param [in] rkey Remote key handle for the remote address. ++ * @param [in] rkey Remote key handle for the remote memory address. + * @param [in] cb Call-back function that is invoked whenever the + * send operation is completed. It is important to note + * that the call-back function is only invoked in a case when +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_compat.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_compat.h +index e8309e4..fdc4e6e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_compat.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_compat.h +@@ -14,6 +14,18 @@ + + BEGIN_C_DECLS + ++ ++/** ++ * @ingroup UCP_WORKER ++ * @deprecated Replaced by @ref ucp_listener_conn_handler_t. ++ */ ++typedef struct ucp_listener_accept_handler { ++ ucp_listener_accept_callback_t cb; /**< Endpoint creation callback */ ++ void *arg; /**< User defined argument for the ++ callback */ ++} ucp_listener_accept_handler_t; ++ ++ + /** + * @ingroup UCP_COMM + * @deprecated Replaced by @ref ucp_request_test. +@@ -69,6 +81,28 @@ ucs_status_t ucp_ep_flush(ucp_ep_h ep); + * + * @brief Flush outstanding AMO and RMA operations on the @ref ucp_worker_h + * "worker" ++ * @deprecated Replaced by @ref ucp_worker_flush_nb. The following example ++ * implements the same functionality using @ref ucp_worker_flush_nb : ++ * @code ++ * ucs_status_t worker_flush(ucp_worker_h worker) ++ * { ++ * void *request = ucp_worker_flush_nb(worker); ++ * if (request == NULL) { ++ * return UCS_OK; ++ * } else if (UCS_PTR_IS_ERR(request)) { ++ * return UCS_PTR_STATUS(request); ++ * } else { ++ * ucs_status_t status; ++ * do { ++ * ucp_worker_progress(worker); ++ * status = ucp_request_check_status(request); ++ * } while (status == UCS_INPROGRESS); ++ * ucp_request_release(request); ++ * return status; ++ * } ++ * } ++ * @endcode ++ * + * + * This routine flushes all outstanding AMO and RMA communications on the + * @ref ucp_worker_h "worker". All the AMO and RMA operations issued on the +@@ -85,6 +119,385 @@ ucs_status_t ucp_ep_flush(ucp_ep_h ep); + */ + ucs_status_t ucp_worker_flush(ucp_worker_h worker); + ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking remote memory put operation. ++ * @deprecated Replaced by @ref ucp_put_nb. The following example implements ++ * the same functionality using @ref ucp_put_nb : ++ * @code ++ * void empty_callback(void *request, ucs_status_t status) ++ * { ++ * } ++ * ++ * ucs_status_t put(ucp_ep_h ep, const void *buffer, size_t length, ++ * uint64_t remote_addr, ucp_rkey_h rkey) ++ * { ++ * void *request = ucp_put_nb(ep, buffer, length, remote_addr, rkey, ++ * empty_callback), ++ * if (request == NULL) { ++ * return UCS_OK; ++ * } else if (UCS_PTR_IS_ERR(request)) { ++ * return UCS_PTR_STATUS(request); ++ * } else { ++ * ucs_status_t status; ++ * do { ++ * ucp_worker_progress(worker); ++ * status = ucp_request_check_status(request); ++ * } while (status == UCS_INPROGRESS); ++ * ucp_request_release(request); ++ * return status; ++ * } ++ * } ++ * @endcode ++ * ++ * This routine stores contiguous block of data that is described by the ++ * local address @a buffer in the remote contiguous memory region described by ++ * @a remote_addr address and the @ref ucp_rkey_h "memory handle" @a rkey. The ++ * routine returns when it is safe to reuse the source address @e buffer. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] buffer Pointer to the local source address. ++ * @param [in] length Length of the data (in bytes) stored under the ++ * source address. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * to write to. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_put(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking remote memory get operation. ++ * @deprecated Replaced by @ref ucp_get_nb. @see ucp_put. ++ * ++ * This routine loads contiguous block of data that is described by the remote ++ * address @a remote_addr and the @ref ucp_rkey_h "memory handle" @a rkey in ++ * the local contiguous memory region described by @a buffer address. The ++ * routine returns when remote data is loaded and stored under the local address ++ * @e buffer. ++ * ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] buffer Pointer to the local source address. ++ * @param [in] length Length of the data (in bytes) stored under the ++ * source address. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * to write to. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic add operation for 32 bit integers ++ * @deprecated Replaced by @ref ucp_atomic_post with opcode UCP_ATOMIC_POST_OP_ADD. ++ * @see ucp_put. ++ * ++ * This routine performs an add operation on a 32 bit integer value atomically. ++ * The remote integer value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a add value is the value that is used for the add operation. ++ * When the operation completes the sum of the original remote value and the ++ * operand value (@a add) is stored in remote memory. ++ * The call to the routine returns immediately, independent of operation ++ * completion. ++ * ++ * @note The remote address must be aligned to 32 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] add Value to add. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_add32(ucp_ep_h ep, uint32_t add, ++ uint64_t remote_addr, ucp_rkey_h rkey); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic add operation for 64 bit integers ++ * @deprecated Replaced by @ref ucp_atomic_post with opcode UCP_ATOMIC_POST_OP_ADD. ++ * @see ucp_put. ++ * ++ * This routine performs an add operation on a 64 bit integer value atomically. ++ * The remote integer value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a add value is the value that is used for the add operation. ++ * When the operation completes the sum of the original remote value and the ++ * operand value (@a add) is stored in remote memory. ++ * The call to the routine returns immediately, independent of operation ++ * completion. ++ * ++ * @note The remote address must be aligned to 64 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] add Value to add. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_add64(ucp_ep_h ep, uint64_t add, ++ uint64_t remote_addr, ucp_rkey_h rkey); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic fetch and add operation for 32 bit integers ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_FADD. ++ * @see ucp_put. ++ * ++ * This routine performs an add operation on a 32 bit integer value atomically. ++ * The remote integer value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a add value is the value that is used for the add operation. ++ * When the operation completes, the original remote value is stored in the ++ * local memory @a result, and the sum of the original remote value and the ++ * operand value is stored in remote memory. ++ * The call to the routine returns when the operation is completed and the ++ * @a result value is updated. ++ * ++ * @note The remote address must be aligned to 32 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] add Value to add. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_fadd32(ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint32_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic fetch and add operation for 64 bit integers ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_FADD. ++ * @see ucp_put. ++ * ++ * This routine performs an add operation on a 64 bit integer value atomically. ++ * The remote integer value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a add value is the value that is used for the add operation. ++ * When the operation completes, the original remote value is stored in the ++ * local memory @a result, and the sum of the original remote value and the ++ * operand value is stored in remote memory. ++ * The call to the routine returns when the operation is completed and the ++ * @a result value is updated. ++ * ++ * @note The remote address must be aligned to 64 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] add Value to add. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_fadd64(ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint64_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic swap operation for 32 bit values ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_SWAP. ++ * @see ucp_put. ++ * ++ * This routine swaps a 32 bit value between local and remote memory. ++ * The remote value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a swap value is the value that is used for the swap operation. ++ * When the operation completes, the remote value is stored in the ++ * local memory @a result, and the operand value (@a swap) is stored in remote ++ * memory. The call to the routine returns when the operation is completed and ++ * the @a result value is updated. ++ * ++ * @note The remote address must be aligned to 32 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] swap Value to swap. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_swap32(ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint32_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic swap operation for 64 bit values ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_SWAP. ++ * @see ucp_put. ++ * ++ * This routine swaps a 64 bit value between local and remote memory. ++ * The remote value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a swap value is the value that is used for the swap operation. ++ * When the operation completes, the remote value is stored in the ++ * local memory @a result, and the operand value (@a swap) is stored in remote ++ * memory. The call to the routine returns when the operation is completed and ++ * the @a result value is updated. ++ * ++ * @note The remote address must be aligned to 64 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] swap Value to swap. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_swap64(ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint64_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic conditional swap (cswap) operation for 32 bit values. ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_CSWAP. ++ * @see ucp_put. ++ * ++ * This routine conditionally swaps a 32 bit value between local and remote ++ * memory. The swap occurs only if the condition value (@a continue) is equal ++ * to the remote value, otherwise the remote memory is not modified. The ++ * remote value is described by the combination of the remote memory address @p ++ * remote_addr and the @ref ucp_rkey_h "remote memory handle" @a rkey. The @p ++ * swap value is the value that is used to update the remote memory if the ++ * condition is true. The call to the routine returns when the operation is ++ * completed and the @a result value is updated. ++ * ++ * @note The remote address must be aligned to 32 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] compare Value to compare to. ++ * @param [in] swap Value to swap. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_cswap32(ucp_ep_h ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ uint32_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic conditional swap (cswap) operation for 64 bit values. ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_CSWAP. ++ * @see ucp_put. ++ * ++ * This routine conditionally swaps a 64 bit value between local and remote ++ * memory. The swap occurs only if the condition value (@a continue) is equal ++ * to the remote value, otherwise the remote memory is not modified. The ++ * remote value is described by the combination of the remote memory address @p ++ * remote_addr and the @ref ucp_rkey_h "remote memory handle" @a rkey. The @p ++ * swap value is the value that is used to update the remote memory if the ++ * condition is true. The call to the routine returns when the operation is ++ * completed and the @a result value is updated. ++ * ++ * @note The remote address must be aligned to 64 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] compare Value to compare to. ++ * @param [in] swap Value to swap. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_cswap64(ucp_ep_h ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ uint64_t *result); ++ ++ ++/** ++ * @ingroup UCP_ENDPOINT ++ * @brief Modify endpoint parameters. ++ * ++ * @deprecated Use @ref ucp_listener_conn_handler_t instead of @ref ++ * ucp_listener_accept_handler_t, if you have other use case please ++ * submit an issue on https://github.com/openucx/ucx or report to ++ * ucx-group@elist.ornl.gov ++ * ++ * This routine modifies @ref ucp_ep_h "endpoint" created by @ref ucp_ep_create ++ * or @ref ucp_listener_accept_callback_t. For example, this API can be used ++ * to setup custom parameters like @ref ucp_ep_params_t::user_data or ++ * @ref ucp_ep_params_t::err_handler to endpoint created by ++ * @ref ucp_listener_accept_callback_t. ++ * ++ * @param [in] ep A handle to the endpoint. ++ * @param [in] params User defined @ref ucp_ep_params_t configurations ++ * for the @ref ucp_ep_h "UCP endpoint". ++ * ++ * @return NULL - The endpoint is modified successfully. ++ * @return UCS_PTR_IS_ERR(_ptr) - The reconfiguration failed and an error code ++ * indicates the status. However, the @a endpoint ++ * is not modified and can be used further. ++ * @return otherwise - The reconfiguration process is started, and can be ++ * completed at any point in time. A request handle ++ * is returned to the application in order to track ++ * progress of the endpoint modification. ++ * The application is responsible for releasing the ++ * handle using the @ref ucp_request_free routine. ++ * ++ * @note See the documentation of @ref ucp_ep_params_t for details, only some of ++ * the parameters can be modified. ++ */ ++ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params); ++ ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_def.h +index e2318e1..8b8cf4e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_def.h +@@ -10,6 +10,7 @@ + #define UCP_DEF_H_ + + #include ++#include + #include + #include + +@@ -82,6 +83,16 @@ typedef struct ucp_ep *ucp_ep_h; + + + /** ++ * @ingroup UCP_ENDPOINT ++ * @brief UCP connection request ++ * ++ * A server-side handle to incoming connection request. Can be used to create an ++ * endpoint which connects back to the client. ++ */ ++typedef struct ucp_conn_request *ucp_conn_request_h; ++ ++ ++/** + * @ingroup UCP_WORKER + * @brief UCP worker address + * +@@ -94,14 +105,18 @@ typedef struct ucp_address ucp_address_t; + /** + * @ingroup UCP_ENDPOINT + * @brief Error handling mode for the UCP endpoint. +- * ++ * + * Specifies error handling mode for the UCP endpoint. + */ + typedef enum { + UCP_ERR_HANDLING_MODE_NONE, /**< No guarantees about error + * reporting, imposes minimal + * overhead from a performance +- * perspective */ ++ * perspective. @note In this ++ * mode, any error reporting will ++ * not generate calls to @ref ++ * ucp_ep_params_t::err_handler. ++ */ + UCP_ERR_HANDLING_MODE_PEER /**< Guarantees that send requests + * are always completed + * (successfully or error) even in +@@ -307,15 +322,16 @@ typedef void (*ucp_err_handler_cb_t)(void *arg, ucp_ep_h ep, ucs_status_t status + /** + * @ingroup UCP_COMM + * @brief UCP endpoint error handling context. +- * ++ * + * This structure should be initialized in @ref ucp_ep_params_t to handle peer failure + */ + typedef struct ucp_err_handler { +- ucp_err_handler_cb_t cb; /**< Error handler callback */ ++ ucp_err_handler_cb_t cb; /**< Error handler callback, if NULL, will ++ not be called. */ + void *arg; /**< User defined argument associated with + an endpoint, it will be overridden by + @ref ucp_ep_params_t::user_data if both +- are set */ ++ are set. */ + } ucp_err_handler_t; + + +@@ -338,22 +354,42 @@ typedef void (*ucp_listener_accept_callback_t)(ucp_ep_h ep, void *arg); + + /** + * @ingroup UCP_WORKER +- * @brief UCP callback to handle the creation of an endpoint in a client-server ++ * @brief A callback for handling of incoming connection request @a conn_request ++ * from a client. ++ * ++ * This callback routine is invoked on the server side to handle incoming ++ * connections from remote clients. The user can pass an argument to this ++ * callback. The @a conn_request handle has to be released, either by @ref ++ * ucp_ep_create or @ref ucp_listener_reject routine. ++ * ++ * @param [in] conn_request Connection request handle. ++ * @param [in] arg User's argument for the callback. ++ */ ++typedef void ++(*ucp_listener_conn_callback_t)(ucp_conn_request_h conn_request, void *arg); ++ ++ ++/** ++ * @ingroup UCP_WORKER ++ * @brief UCP callback to handle the connection request in a client-server + * connection establishment flow. + * +- * This structure is used for handling the creation of an endpoint +- * to the remote peer after an incoming connection request on the listener. +- * Other than communication progress routines, it is allowed to call other +- * communication routines from the callback in the struct. +- * The callback should be thread safe with respect to the worker it is invoked +- * on. If the callback is called from different threads, this callback needs +- * thread safety support. ++ * This structure is used for handling an incoming connection request on ++ * the listener. Setting this type of handler allows creating an endpoint on ++ * any other worker and not limited to the worker on which the listener was ++ * created. ++ * @note ++ * - Other than communication progress routines, it is allowed to call all ++ * other communication routines from the callback in the struct. ++ * - The callback is thread safe with respect to the worker it is invoked on. ++ * - It is the user's responsibility to avoid potential dead lock accessing ++ * different worker. + */ +-typedef struct ucp_listener_accept_handler { +- ucp_listener_accept_callback_t cb; /**< Endpoint creation callback */ +- void *arg; /**< User defined argument for the +- callback */ +-} ucp_listener_accept_handler_t; ++typedef struct ucp_listener_conn_handler { ++ ucp_listener_conn_callback_t cb; /**< Connection request callback */ ++ void *arg; /**< User defined argument for the ++ callback */ ++} ucp_listener_conn_handler_t; + + + /** +@@ -433,4 +469,77 @@ typedef enum ucp_wakeup_event_types { + ones. */ + } ucp_wakeup_event_t; + ++ ++/** ++ * @ingroup UCP_ENDPOINT ++ * @brief Tuning parameters for the UCP endpoint. ++ * ++ * The structure defines the parameters that are used for the ++ * UCP endpoint tuning during the UCP ep @ref ucp_ep_create "creation". ++ */ ++typedef struct ucp_ep_params { ++ /** ++ * Mask of valid fields in this structure, using bits from ++ * @ref ucp_ep_params_field. ++ * Fields not specified in this mask would be ignored. ++ * Provides ABI compatibility with respect to adding new fields. ++ */ ++ uint64_t field_mask; ++ ++ /** ++ * Destination address; this field should be set along with its ++ * corresponding bit in the field_mask - @ref ++ * UCP_EP_PARAM_FIELD_REMOTE_ADDRESS and must be obtained using @ref ++ * ucp_worker_get_address. ++ */ ++ const ucp_address_t *address; ++ ++ /** ++ * Desired error handling mode, optional parameter. Default value is ++ * @ref UCP_ERR_HANDLING_MODE_NONE. ++ */ ++ ucp_err_handling_mode_t err_mode; ++ ++ /** ++ * Handler to process transport level failure. ++ */ ++ ucp_err_handler_t err_handler; ++ ++ /** ++ * User data associated with an endpoint. See @ref ucp_stream_poll_ep_t and ++ * @ref ucp_err_handler_t ++ */ ++ void *user_data; ++ ++ /** ++ * Endpoint flags from @ref ucp_ep_params_flags_field. ++ * This value is optional. ++ * If it's not set (along with its corresponding bit in the field_mask - ++ * @ref UCP_EP_PARAM_FIELD_FLAGS), the @ref ucp_ep_create() routine will ++ * consider the flags as set to zero. ++ */ ++ unsigned flags; ++ ++ /** ++ * Destination address in the form of a sockaddr; this field should be set ++ * along with its corresponding bit in the field_mask - @ref ++ * UCP_EP_PARAM_FIELD_SOCK_ADDR and must be obtained from the user, it means ++ * that this type of the endpoint creation is possible only on client side ++ * in client-server connection establishment flow. ++ */ ++ ucs_sock_addr_t sockaddr; ++ ++ /** ++ * Connection request from client; this field should be set along with its ++ * corresponding bit in the field_mask - @ref ++ * UCP_EP_PARAM_FIELD_CONN_REQUEST and must be obtained from @ref ++ * ucp_listener_conn_callback_t, it means that this type of the endpoint ++ * creation is possible only on server side in client-server connection ++ * establishment flow. ++ */ ++ ucp_conn_request_h conn_request; ++ ++} ucp_ep_params_t; ++ ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.c +index f7bf552..bce7c07 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -45,6 +46,11 @@ static const char * ucp_rndv_modes[] = { + [UCP_RNDV_MODE_LAST] = NULL, + }; + ++uct_memory_type_t ucm_to_uct_mem_type_map[] = { ++ [UCM_MEM_TYPE_CUDA] = UCT_MD_MEM_TYPE_CUDA, ++ [UCM_MEM_TYPE_CUDA_MANAGED] = UCT_MD_MEM_TYPE_CUDA_MANAGED ++}; ++ + static ucs_config_field_t ucp_config_table[] = { + {"NET_DEVICES", UCP_RSC_CONFIG_ALL, + "Specifies which network device(s) to use. The order is not meaningful.\n" +@@ -68,15 +74,16 @@ static ucs_config_field_t ucp_config_table[] = { + + {"TLS", UCP_RSC_CONFIG_ALL, + "Comma-separated list of transports to use. The order is not meaningful.\n" +- "In addition it's possible to use a combination of the following aliases:\n" + " - all : use all the available transports.\n" + " - sm/shm : all shared memory transports.\n" + " - mm : shared memory transports - only memory mappers.\n" + " - ugni : ugni_rdma and ugni_udt.\n" + " - ib : all infiniband transports.\n" +- " - rc : rc and ud.\n" +- " - rc_x : rc with accelerated verbs and ud.\n" ++ " - rc : rc verbs (uses ud for bootstrap).\n" ++ " - rc_x : rc with accelerated verbs (uses ud_x for bootstrap).\n" ++ " - ud : ud verbs.\n" + " - ud_x : ud with accelerated verbs.\n" ++ " - dc : dc verbs.\n" + " - dc_x : dc with accelerated verbs.\n" + " Using a \\ prefix before a transport name treats it as an explicit transport name\n" + " and disables aliasing.\n", +@@ -89,6 +96,15 @@ static ucs_config_field_t ucp_config_table[] = { + "name, or a wildcard - '*' - which expands to all MD components.", + ucs_offsetof(ucp_config_t, alloc_prio), UCS_CONFIG_TYPE_STRING_ARRAY}, + ++ {"SOCKADDR_AUX_TLS", "ud,ud_x", ++ "Transports to use for exchanging additional address information while\n" ++ "establishing client/server connection. ", ++ ucs_offsetof(ucp_config_t, sockaddr_aux_tls), UCS_CONFIG_TYPE_STRING_ARRAY}, ++ ++ {"WARN_INVALID_CONFIG", "y", ++ "Issue a warning in case of invalid device and/or transport configuration.", ++ ucs_offsetof(ucp_config_t, warn_invalid_config), UCS_CONFIG_TYPE_BOOL}, ++ + {"BCOPY_THRESH", "0", + "Threshold for switching from short to bcopy protocol", + ucs_offsetof(ucp_config_t, ctx.bcopy_thresh), UCS_CONFIG_TYPE_MEMUNITS}, +@@ -98,7 +114,8 @@ static ucs_config_field_t ucp_config_table[] = { + ucs_offsetof(ucp_config_t, ctx.rndv_thresh), UCS_CONFIG_TYPE_MEMUNITS}, + + {"RNDV_SEND_NBR_THRESH", "256k", +- "Threshold for switching from eager to rendezvous protocol in ucp_tag_send_nbr()", ++ "Threshold for switching from eager to rendezvous protocol in ucp_tag_send_nbr().\n" ++ "Relevant only if UCX_RNDV_THRESH is set to \"auto\".", + ucs_offsetof(ucp_config_t, ctx.rndv_send_nbr_thresh), UCS_CONFIG_TYPE_MEMUNITS}, + + {"RNDV_THRESH_FALLBACK", "inf", +@@ -111,11 +128,17 @@ static ucs_config_field_t ucp_config_table[] = { + "the eager_zcopy protocol", + ucs_offsetof(ucp_config_t, ctx.rndv_perf_diff), UCS_CONFIG_TYPE_DOUBLE}, + +- {"MAX_EAGER_LANES", "1", ++ {"MAX_EAGER_LANES", NULL, "", ++ ucs_offsetof(ucp_config_t, ctx.max_eager_lanes), UCS_CONFIG_TYPE_UINT}, ++ ++ {"MAX_EAGER_RAILS", "1", + "Maximal number of devices on which an eager operation may be executed in parallel", + ucs_offsetof(ucp_config_t, ctx.max_eager_lanes), UCS_CONFIG_TYPE_UINT}, + +- {"MAX_RNDV_LANES", "1", ++ {"MAX_RNDV_LANES", NULL,"", ++ ucs_offsetof(ucp_config_t, ctx.max_rndv_lanes), UCS_CONFIG_TYPE_UINT}, ++ ++ {"MAX_RNDV_RAILS", "1", + "Maximal number of devices on which a rendezvous operation may be executed in parallel", + ucs_offsetof(ucp_config_t, ctx.max_rndv_lanes), UCS_CONFIG_TYPE_UINT}, + +@@ -146,7 +169,13 @@ static ucs_config_field_t ucp_config_table[] = { + ucs_offsetof(ucp_config_t, ctx.atomic_mode), UCS_CONFIG_TYPE_ENUM(ucp_atomic_modes)}, + + {"MAX_WORKER_NAME", UCS_PP_MAKE_STRING(UCP_WORKER_NAME_MAX), +- "Maximal length of worker name. Affects the size of worker address in debug builds.", ++ "Maximal length of worker name. " ++#if ENABLE_DEBUG_DATA ++ "Sent to remote peer as part of worker address." ++#else ++ "Not sent to remote peer per build configuration." ++#endif ++ , + ucs_offsetof(ucp_config_t, ctx.max_worker_name), UCS_CONFIG_TYPE_UINT}, + + {"USE_MT_MUTEX", "n", "Use mutex for multithreading support in UCP.\n" +@@ -155,7 +184,7 @@ static ucs_config_field_t ucp_config_table[] = { + ucs_offsetof(ucp_config_t, ctx.use_mt_mutex), UCS_CONFIG_TYPE_BOOL}, + + {"ADAPTIVE_PROGRESS", "y", +- "Enable apaptive progress mechanism, which turns on polling only on active\n" ++ "Enable adaptive progress mechanism, which turns on polling only on active\n" + "transport interfaces.", + ucs_offsetof(ucp_config_t, ctx.adaptive_progress), UCS_CONFIG_TYPE_BOOL}, + +@@ -163,19 +192,19 @@ static ucs_config_field_t ucp_config_table[] = { + "Size of a segment in the worker preregistered memory pool.", + ucs_offsetof(ucp_config_t, ctx.seg_size), UCS_CONFIG_TYPE_MEMUNITS}, + +- {"TM_THRESH", "1024", /* TODO: calculate automaticlly */ ++ {"TM_THRESH", "1024", /* TODO: calculate automatically */ + "Threshold for using tag matching offload capabilities.\n" + "Smaller buffers will not be posted to the transport.", + ucs_offsetof(ucp_config_t, ctx.tm_thresh), UCS_CONFIG_TYPE_MEMUNITS}, + +- {"TM_MAX_BCOPY", "1024", /* TODO: calculate automaticlly */ +- "Maximal size for posting \"bounce buffer\" (UCX interal preregistered memory) for\n" ++ {"TM_MAX_BB_SIZE", "1024", /* TODO: calculate automatically */ ++ "Maximal size for posting \"bounce buffer\" (UCX internal preregistered memory) for\n" + "tag offload receives. When message arrives, it is copied into the user buffer (similar\n" + "to eager protocol). The size values has to be equal or less than segment size.\n" + "Also the value has to be bigger than UCX_TM_THRESH to take an effect." , +- ucs_offsetof(ucp_config_t, ctx.tm_max_bcopy), UCS_CONFIG_TYPE_MEMUNITS}, ++ ucs_offsetof(ucp_config_t, ctx.tm_max_bb_size), UCS_CONFIG_TYPE_MEMUNITS}, + +- {"TM_FORCE_THRESH", "8192", /* TODO: calculate automaticlly */ ++ {"TM_FORCE_THRESH", "8192", /* TODO: calculate automatically */ + "Threshold for forcing tag matching offload mode. Every tag receive operation\n" + "with buffer bigger than this threshold would force offloading of all uncompleted\n" + "non-offloaded receive operations to the transport (e. g. operations with\n" +@@ -195,12 +224,24 @@ static ucs_config_field_t ucp_config_table[] = { + "RNDV fragment size \n", + ucs_offsetof(ucp_config_t, ctx.rndv_frag_size), UCS_CONFIG_TYPE_MEMUNITS}, + ++ {"MEMTYPE_CACHE", "y", ++ "Enable memory type(cuda) cache \n", ++ ucs_offsetof(ucp_config_t, ctx.enable_memtype_cache), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"FLUSH_WORKER_EPS", "y", ++ "Enable flushing the worker by flushing its endpoints. Allows completing\n" ++ "the flush operation in a bounded time even if there are new requests on\n" ++ "another thread, or incoming active messages, but consumes more resources.", ++ ucs_offsetof(ucp_config_t, ctx.flush_worker_eps), UCS_CONFIG_TYPE_BOOL}, ++ + {NULL} + }; ++UCS_CONFIG_REGISTER_TABLE(ucp_config_table, "UCP context", NULL, ucp_config_t) ++ + + static ucp_tl_alias_t ucp_tl_aliases[] = { +- { "sm", { "mm", "knem", "cma", NULL } }, +- { "shm", { "mm", "knem", "cma", NULL } }, ++ { "sm", { "mm", "knem", "cma", "rdmacm", NULL } }, ++ { "shm", { "mm", "knem", "cma", "rdmacm", NULL } }, + { "ib", { "rc", "ud", "dc", "rc_mlx5", "ud_mlx5", "dc_mlx5", "rdmacm", NULL } }, + { "ud", { "ud", "rdmacm", NULL } }, + { "ud_x", { "ud_mlx5", "rdmacm", NULL } }, +@@ -317,12 +358,10 @@ static int ucp_tls_array_is_present(const char **tls, unsigned count, + } + } + +-static int ucp_config_is_tl_enabled(const ucp_config_t *config, const char *tl_name, +- int is_alias, uint8_t *rsc_flags, +- uint64_t *tl_cfg_mask) ++static int ucp_config_is_tl_enabled(const char **names, unsigned count, ++ const char *tl_name, int is_alias, ++ uint8_t *rsc_flags, uint64_t *tl_cfg_mask) + { +- const char **names = (const char**)config->tls.names; +- unsigned count = config->tls.count; + char strict_name[UCT_TL_NAME_MAX + 1]; + + snprintf(strict_name, sizeof(strict_name), "\\%s", tl_name); +@@ -368,28 +407,20 @@ static int ucp_is_resource_in_device_list(const uct_tl_resource_desc_t *resource + return !!mask; + } + +-static int ucp_is_resource_enabled(const uct_tl_resource_desc_t *resource, +- const ucp_config_t *config, uint8_t *rsc_flags, +- uint64_t dev_cfg_masks[], uint64_t *tl_cfg_mask) ++static int ucp_is_resource_in_transports_list(const char *tl_name, ++ const char **names, unsigned count, ++ uint8_t *rsc_flags, uint64_t *tl_cfg_mask) + { +- int device_enabled, tl_enabled; ++ uint64_t dummy_mask, tmp_tl_cfg_mask; ++ uint8_t tmp_rsc_flags; + ucp_tl_alias_t *alias; +- uint64_t dummy_mask; +- uint8_t tmp_flags; ++ int tl_enabled; + char info[32]; +- unsigned count; ++ unsigned alias_arr_count; + +- /* Find the enabled devices */ +- device_enabled = (*rsc_flags & UCP_TL_RSC_FLAG_SOCKADDR) || +- ucp_is_resource_in_device_list(resource, config->devices, +- &dev_cfg_masks[resource->dev_type], +- resource->dev_type); +- +- +- /* Find the enabled UCTs */ +- ucs_assert(config->tls.count > 0); +- if (ucp_config_is_tl_enabled(config, resource->tl_name, 0, rsc_flags, +- tl_cfg_mask)) { ++ ucs_assert(count > 0); ++ if (ucp_config_is_tl_enabled(names, count, tl_name, 0, ++ rsc_flags, tl_cfg_mask)) { + tl_enabled = 1; + } else { + tl_enabled = 0; +@@ -399,20 +430,44 @@ static int ucp_is_resource_enabled(const uct_tl_resource_desc_t *resource, + /* If an alias is enabled, and the transport is part of this alias, + * enable the transport. + */ +- count = ucp_tl_alias_count(alias); ++ alias_arr_count = ucp_tl_alias_count(alias); + snprintf(info, sizeof(info), "for alias '%s'", alias->alias); +- tmp_flags = 0; +- if (ucp_config_is_tl_enabled(config, alias->alias, 1, &tmp_flags, +- tl_cfg_mask) && +- ucp_tls_array_is_present(alias->tls, count, resource->tl_name, +- info, &tmp_flags, &dummy_mask)) { +- *rsc_flags |= tmp_flags; ++ tmp_rsc_flags = 0; ++ tmp_tl_cfg_mask = 0; ++ if (ucp_config_is_tl_enabled(names, count, alias->alias, 1, ++ &tmp_rsc_flags, &tmp_tl_cfg_mask) && ++ ucp_tls_array_is_present(alias->tls, alias_arr_count, tl_name, ++ info, &tmp_rsc_flags, &dummy_mask)) { ++ *rsc_flags |= tmp_rsc_flags; ++ *tl_cfg_mask |= tmp_tl_cfg_mask; + tl_enabled = 1; + break; + } + } + } + ++ return tl_enabled; ++} ++ ++static int ucp_is_resource_enabled(const uct_tl_resource_desc_t *resource, ++ const ucp_config_t *config, uint8_t *rsc_flags, ++ uint64_t dev_cfg_masks[], uint64_t *tl_cfg_mask) ++{ ++ int device_enabled, tl_enabled; ++ ++ /* Find the enabled devices */ ++ device_enabled = (*rsc_flags & UCP_TL_RSC_FLAG_SOCKADDR) || ++ ucp_is_resource_in_device_list(resource, config->devices, ++ &dev_cfg_masks[resource->dev_type], ++ resource->dev_type); ++ ++ ++ /* Find the enabled UCTs */ ++ tl_enabled = ucp_is_resource_in_transports_list(resource->tl_name, ++ (const char**)config->tls.names, ++ config->tls.count, rsc_flags, ++ tl_cfg_mask); ++ + ucs_trace(UCT_TL_RESOURCE_DESC_FMT " is %sabled", + UCT_TL_RESOURCE_DESC_ARG(resource), + (device_enabled && tl_enabled) ? "en" : "dis"); +@@ -509,7 +564,7 @@ static ucs_status_t ucp_add_tl_resources(ucp_context_h context, ucp_tl_md_t *md, + dev_cfg_masks, tl_cfg_mask); + } + +- /* add sockaddr dummy resource, if md suports it */ ++ /* add sockaddr dummy resource, if md supports it */ + if (md->attr.cap.flags & UCT_MD_FLAG_SOCKADDR) { + sa_rsc.dev_type = UCT_DEVICE_TYPE_NET; + ucs_snprintf_zero(sa_rsc.tl_name, UCT_TL_NAME_MAX, "%s", md->rsc.md_name); +@@ -571,10 +626,77 @@ static ucs_status_t ucp_check_tl_names(ucp_context_t *context) + return UCS_OK; + } + ++const char* ucp_tl_bitmap_str(ucp_context_h context, uint64_t tl_bitmap, ++ char *str, size_t max_str_len) ++{ ++ ucp_rsc_index_t i; ++ char *p, *endp; ++ ++ p = str; ++ endp = str + max_str_len; ++ ++ ucs_for_each_bit(i, tl_bitmap) { ++ ucs_snprintf_zero(p, endp - p, "%s ", ++ context->tl_rscs[i].tl_rsc.tl_name); ++ p += strlen(p); ++ } ++ ++ return str; ++} ++ ++static const char* ucp_feature_flag_str(unsigned feature_flag) ++{ ++ switch (feature_flag) { ++ case UCP_FEATURE_TAG: ++ return "UCP_FEATURE_TAG"; ++ case UCP_FEATURE_RMA: ++ return "UCP_FEATURE_RMA"; ++ case UCP_FEATURE_AMO32: ++ return "UCP_FEATURE_AMO32"; ++ case UCP_FEATURE_AMO64: ++ return "UCP_FEATURE_AMO64"; ++ case UCP_FEATURE_WAKEUP: ++ return "UCP_FEATURE_WAKEUP"; ++ case UCP_FEATURE_STREAM: ++ return "UCP_FEATURE_STREAM"; ++ default: ++ ucs_fatal("Unknown feature flag value %u", feature_flag); ++ } ++} ++ ++const char* ucp_feature_flags_str(unsigned feature_flags, char *str, ++ size_t max_str_len) ++{ ++ unsigned i, count; ++ char *p, *endp; ++ ++ p = str; ++ endp = str + max_str_len; ++ count = 0; ++ ++ ucs_for_each_bit(i, feature_flags) { ++ ucs_snprintf_zero(p, endp - p, "%s%s", (count == 0) ? "" : "|", ++ ucp_feature_flag_str(UCS_BIT(i))); ++ count++; ++ p += strlen(p); ++ } ++ ++ if (count == 0) { ++ ucs_assert(max_str_len > 0); ++ str[0] = '\0'; /* empty string */ ++ } ++ ++ return str; ++} ++ + static void ucp_free_resources(ucp_context_t *context) + { + ucp_rsc_index_t i; + ++ if (context->memtype_cache != NULL) { ++ ucs_memtype_cache_destroy(context->memtype_cache); ++ } ++ + ucs_free(context->tl_rscs); + for (i = 0; i < context->num_mds; ++i) { + uct_md_close(context->tl_mds[i].md); +@@ -697,6 +819,28 @@ static void ucp_resource_config_str(const ucp_config_t *config, char *buf, + } + } + ++static void ucp_fill_sockaddr_aux_tls_config(ucp_context_h context, ++ const ucp_config_t *config) ++{ ++ const char **tl_names = (const char**)config->sockaddr_aux_tls.aux_tls; ++ unsigned count = config->sockaddr_aux_tls.count; ++ ucp_rsc_index_t tl_id; ++ uint8_t dummy_flags; ++ uint64_t dummy_mask; ++ ++ context->config.sockaddr_aux_rscs_bitmap = 0; ++ ++ /* Check if any of the context's resources are present in the sockaddr ++ * auxiliary transports for the client-server flow */ ++ for (tl_id = 0; tl_id < context->num_tls; ++tl_id) { ++ if (ucp_is_resource_in_transports_list(context->tl_rscs[tl_id].tl_rsc.tl_name, ++ tl_names, count, &dummy_flags, ++ &dummy_mask)) { ++ context->config.sockaddr_aux_rscs_bitmap |= UCS_BIT(tl_id); ++ } ++ } ++} ++ + static ucs_status_t ucp_check_resources(ucp_context_h context, + const ucp_config_t *config) + { +@@ -751,6 +895,7 @@ static ucs_status_t ucp_fill_resources(ucp_context_h context, + context->tl_rscs = NULL; + context->num_tls = 0; + context->num_mem_type_mds = 0; ++ context->memtype_cache = NULL; + + status = ucp_check_resource_config(config); + if (status != UCS_OK) { +@@ -784,7 +929,7 @@ static ucs_status_t ucp_fill_resources(ucp_context_h context, + for (i = 0; i < num_md_resources; ++i) { + status = ucp_fill_tl_md(&md_rscs[i], &context->tl_mds[md_index]); + if (status != UCS_OK) { +- goto err_free_context_resources; ++ continue; + } + + /* Add communication resources of each MD */ +@@ -815,6 +960,14 @@ static ucs_status_t ucp_fill_resources(ucp_context_h context, + } + } + ++ if (context->num_mem_type_mds && context->config.ext.enable_memtype_cache) { ++ status = ucs_memtype_cache_create(&context->memtype_cache); ++ if (status != UCS_OK) { ++ ucs_debug("could not create memtype cache for mem_type allocations"); ++ goto err_free_context_resources; ++ } ++ } ++ + /* Validate context resources */ + status = ucp_check_resources(context, config); + if (status != UCS_OK) { +@@ -823,13 +976,17 @@ static ucs_status_t ucp_fill_resources(ucp_context_h context, + + uct_release_md_resource_list(md_rscs); + +- /* Notify the user if there are devices or transports from the command line +- * that are not available +- */ +- for (i = 0; i < UCT_DEVICE_TYPE_LAST; ++i) { +- ucp_report_unavailable(&config->devices[i], dev_cfg_masks[i], "device"); ++ if (config->warn_invalid_config) { ++ /* Notify the user if there are devices or transports from the command line ++ * that are not available ++ */ ++ for (i = 0; i < UCT_DEVICE_TYPE_LAST; ++i) { ++ ucp_report_unavailable(&config->devices[i], dev_cfg_masks[i], "device"); ++ } ++ ucp_report_unavailable(&config->tls, tl_cfg_mask, "transport"); + } +- ucp_report_unavailable(&config->tls, tl_cfg_mask, "transport"); ++ ++ ucp_fill_sockaddr_aux_tls_config(context, config); + + return UCS_OK; + +@@ -970,20 +1127,20 @@ static ucs_status_t ucp_fill_config(ucp_context_h context, + } + + /* Need to check MAX_BCOPY value if it is enabled only */ +- if (context->config.ext.tm_max_bcopy > context->config.ext.tm_thresh) { +- if (context->config.ext.tm_max_bcopy < sizeof(ucp_request_hdr_t)) { ++ if (context->config.ext.tm_max_bb_size > context->config.ext.tm_thresh) { ++ if (context->config.ext.tm_max_bb_size < sizeof(ucp_request_hdr_t)) { + /* In case of expected SW RNDV message, the header (ucp_request_hdr_t) is + * scattered to UCP user buffer. Make sure that bounce buffer is used for + * messages which can not fit SW RNDV hdr. */ +- context->config.ext.tm_max_bcopy = sizeof(ucp_request_hdr_t); +- ucs_info("UCX_TM_MAX_BCOPY value: %zu, adjusted to: %zu", +- context->config.ext.tm_max_bcopy, sizeof(ucp_request_hdr_t)); ++ context->config.ext.tm_max_bb_size = sizeof(ucp_request_hdr_t); ++ ucs_info("UCX_TM_MAX_BB_SIZE value: %zu, adjusted to: %zu", ++ context->config.ext.tm_max_bb_size, sizeof(ucp_request_hdr_t)); + } + +- if (context->config.ext.tm_max_bcopy > context->config.ext.seg_size) { +- context->config.ext.tm_max_bcopy = context->config.ext.seg_size; +- ucs_info("Wrong UCX_TM_MAX_BCOPY value: %zu, adjusted to: %zu", +- context->config.ext.tm_max_bcopy, ++ if (context->config.ext.tm_max_bb_size > context->config.ext.seg_size) { ++ context->config.ext.tm_max_bb_size = context->config.ext.seg_size; ++ ucs_info("Wrong UCX_TM_MAX_BB_SIZE value: %zu, adjusted to: %zu", ++ context->config.ext.tm_max_bb_size, + context->config.ext.seg_size); + } + } +@@ -1014,24 +1171,35 @@ ucs_status_t ucp_init_version(unsigned api_major_version, unsigned api_minor_ver + ucp_context_h *context_p) + { + unsigned major_version, minor_version, release_number; ++ ucp_config_t *dfl_config = NULL; + ucp_context_t *context; + ucs_status_t status; ++ ucs_debug_address_info_t addr_info; + + ucp_get_version(&major_version, &minor_version, &release_number); + +- if ((api_major_version != major_version) || (api_minor_version != minor_version)) { +- ucs_error("UCP version is incompatible, required: %d.%d, actual: %d.%d (release %d)", ++ if ((api_major_version != major_version) || ++ ((api_major_version == major_version) && (api_minor_version > minor_version))) { ++ status = ucs_debug_lookup_address(ucp_init_version, &addr_info); ++ ucs_warn("UCP version is incompatible, required: %d.%d, actual: %d.%d (release %d %s)", + api_major_version, api_minor_version, +- major_version, minor_version, release_number); +- status = UCS_ERR_NOT_IMPLEMENTED; +- goto err; ++ major_version, minor_version, release_number, ++ status == UCS_OK ? addr_info.file.path : ""); ++ } ++ ++ if (config == NULL) { ++ status = ucp_config_read(NULL, NULL, &dfl_config); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ config = dfl_config; + } + + /* allocate a ucp context */ + context = ucs_calloc(1, sizeof(*context), "ucp context"); + if (context == NULL) { + status = UCS_ERR_NO_MEMORY; +- goto err; ++ goto err_release_config; + } + + status = ucp_fill_config(context, params, config); +@@ -1054,6 +1222,10 @@ ucs_status_t ucp_init_version(unsigned api_major_version, unsigned api_minor_ver + goto err_free_resources; + } + ++ if (dfl_config != NULL) { ++ ucp_config_release(dfl_config); ++ } ++ + ucs_debug("created ucp context %p [%d mds %d tls] features 0x%lx", context, + context->num_mds, context->num_tls, context->config.features); + +@@ -1066,6 +1238,10 @@ err_free_config: + ucp_free_config(context); + err_free_ctx: + ucs_free(context); ++err_release_config: ++ if (dfl_config != NULL) { ++ ucp_config_release(dfl_config); ++ } + err: + return status; + } +@@ -1104,12 +1280,24 @@ void ucp_dump_payload(ucp_context_h context, char *buffer, size_t max, + } + } + +-uint64_t ucp_context_uct_atomic_iface_flags(ucp_context_h context) ++void ucp_context_uct_atomic_iface_flags(ucp_context_h context, ++ ucp_tl_iface_atomic_flags_t *atomic) + { +- return ((context->config.features & UCP_FEATURE_AMO32) ? +- UCP_UCT_IFACE_ATOMIC32_FLAGS : 0) | +- ((context->config.features & UCP_FEATURE_AMO64) ? +- UCP_UCT_IFACE_ATOMIC64_FLAGS : 0); ++ if (context->config.features & UCP_FEATURE_AMO32) { ++ atomic->atomic32.op_flags = UCP_ATOMIC_OP_MASK; ++ atomic->atomic32.fop_flags = UCP_ATOMIC_FOP_MASK; ++ } else { ++ atomic->atomic32.op_flags = 0; ++ atomic->atomic32.fop_flags = 0; ++ } ++ ++ if (context->config.features & UCP_FEATURE_AMO64) { ++ atomic->atomic64.op_flags = UCP_ATOMIC_OP_MASK; ++ atomic->atomic64.fop_flags = UCP_ATOMIC_FOP_MASK; ++ } else { ++ atomic->atomic64.op_flags = 0; ++ atomic->atomic64.fop_flags = 0; ++ } + } + + ucs_status_t ucp_context_query(ucp_context_h context, ucp_context_attr_t *attr) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.h +index beae69c..84cc8b3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -61,7 +62,7 @@ typedef struct ucp_context_config { + size_t tm_force_thresh; + /** Upper bound for posting tm offload receives with internal UCP + * preregistered bounce buffers. */ +- size_t tm_max_bcopy; ++ size_t tm_max_bb_size; + /** Maximal size of worker name for debugging */ + unsigned max_worker_name; + /** Atomic mode */ +@@ -76,6 +77,10 @@ typedef struct ucp_context_config { + unsigned max_rndv_lanes; + /** Estimated number of endpoints */ + size_t estimated_num_eps; ++ /** Memtype cache */ ++ int enable_memtype_cache; ++ /** Enable flushing endpoints while flushing a worker */ ++ int flush_worker_eps; + } ucp_context_config_t; + + +@@ -88,6 +93,10 @@ struct ucp_config { + ucs_config_names_array_t tls; + /** Array of memory allocation methods */ + UCS_CONFIG_STRING_ARRAY_FIELD(methods) alloc_prio; ++ /** Array of transports for partial worker address to pack */ ++ UCS_CONFIG_STRING_ARRAY_FIELD(aux_tls) sockaddr_aux_tls; ++ /** Warn on invalid configuration */ ++ int warn_invalid_config; + /** Configuration saved directly in the context */ + ucp_context_config_t ctx; + }; +@@ -135,6 +144,7 @@ typedef struct ucp_context { + /* List of MDs which detect non host memory type */ + ucp_rsc_index_t mem_type_tl_mds[UCT_MD_MEM_TYPE_LAST]; + ucp_rsc_index_t num_mem_type_mds; /* Number of mem type MDs */ ++ ucs_memtype_cache_t *memtype_cache; /* mem type allocation cache*/ + + ucp_tl_resource_desc_t *tl_rscs; /* Array of communication resources */ + ucp_rsc_index_t num_tls; /* Number of resources in the array*/ +@@ -169,6 +179,9 @@ typedef struct ucp_context { + } *alloc_methods; + unsigned num_alloc_methods; + ++ /* Bitmap of sockaddr auxiliary transports to pack for client/server flow */ ++ uint64_t sockaddr_aux_rscs_bitmap; ++ + /* Configuration supplied by the user */ + ucp_context_config_t ext; + +@@ -188,6 +201,26 @@ typedef struct ucp_am_handler { + uct_am_callback_t proxy_cb; + } ucp_am_handler_t; + ++typedef struct ucp_tl_iface_atomic_flags { ++ struct { ++ uint64_t op_flags; /**< Attributes for atomic-post operations */ ++ uint64_t fop_flags; /**< Attributes for atomic-fetch operations */ ++ } atomic32, atomic64; ++} ucp_tl_iface_atomic_flags_t; ++ ++ ++#define UCP_ATOMIC_OP_MASK (UCS_BIT(UCT_ATOMIC_OP_ADD) | \ ++ UCS_BIT(UCT_ATOMIC_OP_AND) | \ ++ UCS_BIT(UCT_ATOMIC_OP_OR) | \ ++ UCS_BIT(UCT_ATOMIC_OP_XOR)) ++ ++#define UCP_ATOMIC_FOP_MASK (UCS_BIT(UCT_ATOMIC_OP_ADD) | \ ++ UCS_BIT(UCT_ATOMIC_OP_AND) | \ ++ UCS_BIT(UCT_ATOMIC_OP_OR) | \ ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | \ ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | \ ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP)) ++ + + /* + * Define UCP active message handler. +@@ -229,6 +262,24 @@ typedef struct ucp_am_handler { + }; + + ++/** ++ * Check if at least one feature flag from @a _flags is initialized. ++ */ ++#define UCP_CONTEXT_CHECK_FEATURE_FLAGS(_context, _flags, _action) \ ++ do { \ ++ if (ENABLE_PARAMS_CHECK && \ ++ ucs_unlikely(!((_context)->config.features & (_flags)))) { \ ++ size_t feature_list_str_max = 512; \ ++ char *feature_list_str = ucs_alloca(feature_list_str_max); \ ++ ucs_error("feature flags %s were not set for ucp_init()", \ ++ ucp_feature_flags_str((_flags) & \ ++ ~(_context)->config.features, \ ++ feature_list_str, feature_list_str_max)); \ ++ _action; \ ++ } \ ++ } while (0) ++ ++ + #define UCP_PARAM_VALUE(_obj, _params, _name, _flag, _default) \ + (((_params)->field_mask & (UCP_##_obj##_PARAM_FIELD_##_flag)) ? \ + (_params)->_name : (_default)) +@@ -242,22 +293,45 @@ void ucp_dump_payload(ucp_context_h context, char *buffer, size_t max, + + void ucp_context_tag_offload_enable(ucp_context_h context); + +-uint64_t ucp_context_uct_atomic_iface_flags(ucp_context_h context); ++void ucp_context_uct_atomic_iface_flags(ucp_context_h context, ++ ucp_tl_iface_atomic_flags_t *atomic); + + const char * ucp_find_tl_name_by_csum(ucp_context_t *context, uint16_t tl_name_csum); + ++const char* ucp_tl_bitmap_str(ucp_context_h context, uint64_t tl_bitmap, ++ char *str, size_t max_str_len); ++ ++const char* ucp_feature_flags_str(unsigned feature_flags, char *str, ++ size_t max_str_len); ++ + static UCS_F_ALWAYS_INLINE double + ucp_tl_iface_latency(ucp_context_h context, const uct_iface_attr_t *iface_attr) + { + return iface_attr->latency.overhead + + (iface_attr->latency.growth * context->config.est_num_eps); + } ++extern uct_memory_type_t ucm_to_uct_mem_type_map[]; + + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_memory_type_detect_mds(ucp_context_h context, void *addr, size_t length, + uct_memory_type_t *mem_type_p) + { + unsigned i, md_index; ++ ucm_mem_type_t ucm_mem_type; ++ ++ *mem_type_p = UCT_MD_MEM_TYPE_HOST; ++ ++ if (ucs_likely(!context->num_mem_type_mds)) { ++ return UCS_OK; ++ } ++ ++ if (context->memtype_cache != NULL) { ++ if (ucs_memtype_cache_lookup(context->memtype_cache, addr, ++ length, &ucm_mem_type) == UCS_OK) { ++ *mem_type_p = ucm_to_uct_mem_type_map[ucm_mem_type]; ++ } ++ return UCS_OK; ++ } + + for (i = 0; i < context->num_mem_type_mds; ++i) { + md_index = context->mem_type_tl_mds[i]; +@@ -266,7 +340,7 @@ ucp_memory_type_detect_mds(ucp_context_h context, void *addr, size_t length, + return UCS_OK; + } + } +- *mem_type_p = UCT_MD_MEM_TYPE_HOST; ++ + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.c +index 0e1f239..3945a80 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -23,8 +24,6 @@ + + extern const ucp_proto_t ucp_stream_am_proto; + +-static void ucp_ep_cleanup_lanes(ucp_ep_h ep); +- + #if ENABLE_STATS + static ucs_stats_class_t ucp_ep_stats_class = { + .name = "ucp_ep", +@@ -55,41 +54,15 @@ void ucp_ep_config_key_reset(ucp_ep_config_key_t *key) + memset(key->amo_lanes, UCP_NULL_LANE, sizeof(key->amo_lanes)); + } + +-void ucp_ep_add_to_hash(ucp_ep_h ep) +-{ +- ucp_worker_h worker = ep->worker; +- int hash_extra_status = 0; +- khiter_t hash_it; +- +- hash_it = kh_put(ucp_worker_ep_hash, &worker->ep_hash, ep->dest_uuid, +- &hash_extra_status); +- if (ucs_unlikely(hash_it == kh_end(&worker->ep_hash))) { +- ucs_fatal("Hash failed with ep %p to %s 0x%"PRIx64"->0x%"PRIx64 +- "with status %d", ep, ucp_ep_peer_name(ep), worker->uuid, +- ep->dest_uuid, hash_extra_status); +- } +- kh_value(&worker->ep_hash, hash_it) = ep; +-} +- +-void ucp_ep_delete_from_hash(ucp_ep_h ep) +-{ +- khiter_t hash_it; +- +- hash_it = kh_get(ucp_worker_ep_hash, &ep->worker->ep_hash, ep->dest_uuid); +- if (hash_it != kh_end(&ep->worker->ep_hash)) { +- kh_del(ucp_worker_ep_hash, &ep->worker->ep_hash, hash_it); +- } +-} +- +-ucs_status_t ucp_ep_new(ucp_worker_h worker, uint64_t dest_uuid, +- const char *peer_name, const char *message, +- ucp_ep_h *ep_p) ++ucs_status_t ucp_ep_new(ucp_worker_h worker, const char *peer_name, ++ const char *message, ucp_ep_h *ep_p) + { + ucs_status_t status; + ucp_ep_config_key_t key; ++ ucp_lane_index_t lane; + ucp_ep_h ep; + +- ep = ucs_calloc(1, sizeof(*ep), "ucp ep"); ++ ep = ucs_strided_alloc_get(&worker->ep_alloc, "ucp_ep"); + if (ep == NULL) { + ucs_error("Failed to allocate ep"); + status = UCS_ERR_NO_MEMORY; +@@ -97,28 +70,25 @@ ucs_status_t ucp_ep_new(ucp_worker_h worker, uint64_t dest_uuid, + } + + ucp_ep_config_key_reset(&key); +- ep->worker = worker; +- ep->dest_uuid = dest_uuid; +- ep->user_data = NULL; +- ep->cfg_index = ucp_worker_get_ep_config(worker, &key); +- ep->am_lane = UCP_NULL_LANE; +- ep->flags = 0; +- +- if (worker->context->config.features & UCP_FEATURE_STREAM) { +- +- ep->ext.stream = ucs_calloc(1, sizeof(*ep->ext.stream), +- "ucp ep stream extension"); +- if (ep->ext.stream == NULL) { +- ucs_error("Failed to allocate ucp ep stream extension"); +- status = UCS_ERR_NO_MEMORY; +- goto err_free_ep; +- } +- +- ucs_queue_head_init(&ep->ext.stream->match_q); +- ep->ext.stream->ucp_ep = ep; +- ep->ext.stream->flags = UCP_EP_STREAM_FLAG_VALID; +- } else { +- ep->ext.stream = NULL; ++ ep->worker = worker; ++ ep->cfg_index = ucp_worker_get_ep_config(worker, &key); ++ ep->am_lane = UCP_NULL_LANE; ++ ep->flags = 0; ++ ep->conn_sn = -1; ++ ucp_ep_ext_gen(ep)->user_data = NULL; ++ ucp_ep_ext_gen(ep)->dest_ep_ptr = 0; ++ ucp_ep_ext_gen(ep)->err_cb = NULL; ++ UCS_STATIC_ASSERT(sizeof(ucp_ep_ext_gen(ep)->ep_match) >= ++ sizeof(ucp_ep_ext_gen(ep)->listener)); ++ UCS_STATIC_ASSERT(sizeof(ucp_ep_ext_gen(ep)->ep_match) >= ++ sizeof(ucp_ep_ext_gen(ep)->flush_state)); ++ memset(&ucp_ep_ext_gen(ep)->ep_match, 0, ++ sizeof(ucp_ep_ext_gen(ep)->ep_match)); ++ ++ ucp_stream_ep_init(ep); ++ ++ for (lane = 0; lane < UCP_MAX_LANES; ++lane) { ++ ep->uct_eps[lane] = NULL; + } + + #if ENABLE_DEBUG_DATA +@@ -129,106 +99,76 @@ ucs_status_t ucp_ep_new(ucp_worker_h worker, uint64_t dest_uuid, + status = UCS_STATS_NODE_ALLOC(&ep->stats, &ucp_ep_stats_class, + worker->stats, "-%p", ep); + if (status != UCS_OK) { +- goto err_free_ext_ep; ++ goto err_free_ep; + } + +- ucp_ep_add_to_hash(ep); +- ++ ucs_list_add_tail(&worker->all_eps, &ucp_ep_ext_gen(ep)->ep_list); + *ep_p = ep; +- ucs_debug("created ep %p to %s %s", ucp_ep_peer_name(ep), peer_name, message); ++ ucs_debug("created ep %p to %s %s", ep, ucp_ep_peer_name(ep), message); + return UCS_OK; + +-err_free_ext_ep: +- ucs_free(ep->ext.stream); + err_free_ep: + ucs_free(ep); + err: + return status; + } + +-static void ucp_ep_delete(ucp_ep_h ep) ++void ucp_ep_delete(ucp_ep_h ep) + { +- ucp_ep_delete_from_hash(ep); + UCS_STATS_NODE_FREE(ep->stats); +- ucs_free(ep->ext.stream); +- ucs_free(ep); ++ ucs_list_del(&ucp_ep_ext_gen(ep)->ep_list); ++ ucs_strided_alloc_put(&ep->worker->ep_alloc, ep); + } + +-void ucp_ep_config_key_set_params(ucp_ep_config_key_t *key, +- const ucp_ep_params_t *params) +-{ +- key->err_mode = UCP_PARAM_VALUE(EP, params, err_mode, ERR_HANDLING_MODE, +- UCP_ERR_HANDLING_MODE_NONE); +-} +- +-ucs_status_t ucp_ep_create_stub(ucp_worker_h worker, uint64_t dest_uuid, +- const ucp_ep_params_t *params, +- const char *peer_name, const char *message, +- ucp_ep_h *ep_p) ++ucs_status_t ucp_ep_create_sockaddr_aux(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ++ const ucp_unpacked_address_t *remote_address, ++ ucp_ep_h *ep_p) + { ++ ucp_wireup_ep_t *wireup_ep; + ucs_status_t status; +- ucp_ep_config_key_t key; +- ucp_ep_h ep = NULL; ++ ucp_ep_h ep; + +- status = ucp_ep_new(worker, dest_uuid, peer_name, message, &ep); ++ /* allocate endpoint */ ++ status = ucp_ep_new(worker, remote_address->name, "listener", &ep); + if (status != UCS_OK) { + goto err; + } + +- ucp_ep_config_key_reset(&key); +- +- if (params != NULL) { +- ucp_ep_config_key_set_params(&key, params); ++ status = ucp_ep_init_create_wireup(ep, params, &wireup_ep); ++ if (status != UCS_OK) { ++ goto err_delete; + } + +- /* all operations will use the first lane, which is a stub endpoint */ +- key.num_lanes = 1; +- key.lanes[0].rsc_index = UCP_NULL_RESOURCE; +- key.lanes[0].dst_md_index = UCP_NULL_RESOURCE; +- key.am_lane = 0; +- key.wireup_lane = 0; +- key.tag_lane = 0; +- key.am_bw_lanes[0] = 0; +- key.rma_lanes[0] = 0; +- key.rma_bw_lanes[0] = 0; +- key.amo_lanes[0] = 0; +- +- ep->cfg_index = ucp_worker_get_ep_config(worker, &key); +- ep->am_lane = 0; +- +- status = ucp_wireup_ep_create(ep, &ep->uct_eps[0]); ++ status = ucp_wireup_ep_connect_aux(wireup_ep, params, ++ remote_address->address_count, ++ remote_address->address_list); + if (status != UCS_OK) { +- goto err_delete; ++ goto err_destroy_wireup_ep; + } + + *ep_p = ep; +- return UCS_OK; ++ return status; + ++err_destroy_wireup_ep: ++ uct_ep_destroy(ep->uct_eps[0]); + err_delete: + ucp_ep_delete(ep); + err: + return status; + } + +-int ucp_ep_is_stub(ucp_ep_h ep) ++void ucp_ep_config_key_set_params(ucp_ep_config_key_t *key, ++ const ucp_ep_params_t *params) + { +- return ucp_ep_get_rsc_index(ep, 0) == UCP_NULL_RESOURCE; ++ key->err_mode = UCP_PARAM_VALUE(EP, params, err_mode, ERR_HANDLING_MODE, ++ UCP_ERR_HANDLING_MODE_NONE); + } + +-static void +-ucp_ep_setup_err_handler(ucp_ep_h ep, const ucp_err_handler_t *err_handler) ++int ucp_ep_is_sockaddr_stub(ucp_ep_h ep) + { +- khiter_t hash_it; +- int hash_extra_status = 0; +- +- hash_it = kh_put(ucp_ep_errh_hash, &ep->worker->ep_errh_hash, (uintptr_t)ep, +- &hash_extra_status); +- if (ucs_unlikely(hash_it == kh_end(&ep->worker->ep_errh_hash))) { +- ucs_fatal("Hash failed on setup error handler of endpoint %p with status %d ", +- ep, hash_extra_status); +- } +- kh_value(&ep->worker->ep_errh_hash, hash_it) = err_handler->cb; +- ep->user_data = err_handler->arg; ++ /* Only a sockaddr client-side endpoint may be created as a "stub" */ ++ return ucp_ep_get_rsc_index(ep, 0) == UCP_NULL_RESOURCE; + } + + static ucs_status_t +@@ -245,11 +185,14 @@ ucp_ep_adjust_params(ucp_ep_h ep, const ucp_ep_params_t *params) + } + + if (params->field_mask & UCP_EP_PARAM_FIELD_ERR_HANDLER) { +- ucp_ep_setup_err_handler(ep, ¶ms->err_handler); ++ ucp_ep_ext_gen(ep)->user_data = params->err_handler.arg; ++ ucp_ep_ext_gen(ep)->err_cb = params->err_handler.cb; + } + +- ep->user_data = UCP_PARAM_VALUE(EP, params, user_data, USER_DATA, +- ep->user_data); ++ if (params->field_mask & UCP_EP_PARAM_FIELD_USER_DATA) { ++ /* user_data overrides err_handler.arg */ ++ ucp_ep_ext_gen(ep)->user_data = params->user_data; ++ } + + return UCS_OK; + } +@@ -257,9 +200,10 @@ ucp_ep_adjust_params(ucp_ep_h ep, const ucp_ep_params_t *params) + ucs_status_t ucp_worker_create_mem_type_endpoints(ucp_worker_h worker) + { + ucp_context_h context = worker->context; ++ ucp_unpacked_address_t local_address; + unsigned i, mem_type, md_index; + ucs_status_t status; +- void *address; ++ void *address_buffer; + size_t address_length; + ucp_ep_params_t params; + +@@ -271,34 +215,40 @@ ucs_status_t ucp_worker_create_mem_type_endpoints(ucp_worker_h worker) + return UCS_OK; + } + +- params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ params.field_mask = 0; + + for (i = 0; i < context->num_mem_type_mds; ++i) { + md_index = context->mem_type_tl_mds[i]; + mem_type = context->tl_mds[md_index].attr.cap.mem_type; + + status = ucp_address_pack(worker, NULL, context->mem_type_tls[mem_type], NULL, +- &address_length, &address); ++ &address_length, &address_buffer); + if (status != UCS_OK) { + goto err_cleanup_eps; + } + +- /*reset uuid to mem_type id*/ +- *(uint64_t*)address = mem_type; +- +- params.address = (ucp_address_t*)address; ++ status = ucp_address_unpack(address_buffer, &local_address); ++ if (status != UCS_OK) { ++ goto err_free_address_buffer; ++ } + +- status = ucp_ep_create_to_worker_addr(worker, ¶ms, UCP_EP_INIT_FLAG_MEM_TYPE, +- "mem type", &worker->mem_type_ep[mem_type]); ++ status = ucp_ep_create_to_worker_addr(worker, ¶ms, &local_address, ++ UCP_EP_INIT_FLAG_MEM_TYPE, "mem type", ++ &worker->mem_type_ep[mem_type]); + if (status != UCS_OK) { +- goto err_cleanup_eps; ++ goto err_free_address_list; + } + +- ucs_free(address); ++ ucs_free(local_address.address_list); ++ ucs_free(address_buffer); + } + + return UCS_OK; + ++err_free_address_list: ++ ucs_free(local_address.address_list); ++err_free_address_buffer: ++ ucs_free(address_buffer); + err_cleanup_eps: + for (i = 0; i < UCT_MD_MEM_TYPE_LAST; i++) { + if (worker->mem_type_ep[i]) { +@@ -308,70 +258,78 @@ err_cleanup_eps: + return status; + } + +-ucs_status_t ucp_ep_create_to_worker_addr(ucp_worker_h worker, +- const ucp_ep_params_t *params, +- unsigned ep_init_flags, +- const char *message, ucp_ep_h *ep_p) ++ucs_status_t ucp_ep_init_create_wireup(ucp_ep_h ep, ++ const ucp_ep_params_t *params, ++ ucp_wireup_ep_t **wireup_ep) + { +- ucp_address_entry_t *address_list; +- uint8_t addr_indices[UCP_MAX_LANES]; +- char peer_name[UCP_WORKER_NAME_MAX]; +- unsigned address_count; ++ ucp_ep_config_key_t key; + ucs_status_t status; +- uint64_t dest_uuid; +- ucp_ep_h ep; + +- if (!(params->field_mask & UCP_EP_PARAM_FIELD_REMOTE_ADDRESS)) { +- status = UCS_ERR_INVALID_PARAM; +- ucs_error("remote worker address is missing"); +- goto out; +- } ++ ucp_ep_config_key_reset(&key); ++ ucp_ep_config_key_set_params(&key, params); + +- UCP_CHECK_PARAM_NON_NULL(params->address, status, goto out); ++ /* all operations will use the first lane, which is a stub endpoint */ ++ key.num_lanes = 1; ++ key.lanes[0].rsc_index = UCP_NULL_RESOURCE; ++ key.lanes[0].dst_md_index = UCP_NULL_RESOURCE; ++ key.am_lane = 0; ++ key.wireup_lane = 0; ++ key.tag_lane = 0; ++ key.am_bw_lanes[0] = 0; ++ key.rma_lanes[0] = 0; ++ key.rma_bw_lanes[0] = 0; ++ key.amo_lanes[0] = 0; ++ ++ ep->cfg_index = ucp_worker_get_ep_config(ep->worker, &key); ++ ep->am_lane = 0; ++ ep->flags |= UCP_EP_FLAG_CONNECT_REQ_QUEUED; + +- status = ucp_address_unpack(params->address, &dest_uuid, peer_name, +- sizeof(peer_name), &address_count, &address_list); ++ status = ucp_wireup_ep_create(ep, &ep->uct_eps[0]); + if (status != UCS_OK) { +- ucs_error("failed to unpack remote address: %s", ucs_status_string(status)); +- goto out; ++ return status; + } + +- ep = ucp_worker_ep_find(worker, dest_uuid); +- if (ep != NULL) { +- status = ucp_ep_adjust_params(ep, params); +- if ((status == UCS_OK) && (ep->ext.stream != NULL)) { +- ep->ext.stream->flags |= UCP_EP_STREAM_FLAG_VALID; +- } ++ *wireup_ep = ucs_derived_of(ep->uct_eps[0], ucp_wireup_ep_t); ++ return UCS_OK; ++} + +- goto out_free_address; +- } ++ucs_status_t ucp_ep_create_to_worker_addr(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ++ const ucp_unpacked_address_t *remote_address, ++ unsigned ep_init_flags, ++ const char *message, ucp_ep_h *ep_p) ++{ ++ uint8_t addr_indices[UCP_MAX_LANES]; ++ ucs_status_t status; ++ ucp_ep_h ep; + + /* allocate endpoint */ +- status = ucp_ep_new(worker, dest_uuid, peer_name, message, &ep); ++ status = ucp_ep_new(worker, remote_address->name, message, &ep); + if (status != UCS_OK) { +- goto out_free_address; ++ goto err; + } + +- ep->flags |= UCP_EP_FLAG_DEST_UUID_PEER; +- + /* initialize transport endpoints */ +- status = ucp_wireup_init_lanes(ep, params, ep_init_flags, address_count, +- address_list, addr_indices); ++ status = ucp_wireup_init_lanes(ep, params, ep_init_flags, ++ remote_address->address_count, ++ remote_address->address_list, addr_indices); + if (status != UCS_OK) { + goto err_delete; + } + +- status = UCS_OK; +- goto out_free_address; ++ status = ucp_ep_adjust_params(ep, params); ++ if (status != UCS_OK) { ++ goto err_cleanup_lanes; ++ } + ++ *ep_p = ep; ++ return UCS_OK; ++ ++err_cleanup_lanes: ++ ucp_ep_cleanup_lanes(ep); + err_delete: + ucp_ep_delete(ep); +-out_free_address: +- ucs_free(address_list); +- if (status == UCS_OK) { +- *ep_p = ep; +- } +-out: ++err: + return status; + } + +@@ -380,6 +338,7 @@ static ucs_status_t ucp_ep_create_to_sock_addr(ucp_worker_h worker, + ucp_ep_h *ep_p) + { + char peer_name[UCS_SOCKADDR_STRING_LEN]; ++ ucp_wireup_ep_t *wireup_ep; + ucs_status_t status; + ucp_ep_h ep; + +@@ -393,12 +352,22 @@ static ucs_status_t ucp_ep_create_to_sock_addr(ucp_worker_h worker, + + /* allocate endpoint */ + ucs_sockaddr_str(params->sockaddr.addr, peer_name, sizeof(peer_name)); +- status = ucp_ep_create_stub(worker, ucs_generate_uuid(0), params, peer_name, +- "from api call", &ep); ++ ++ status = ucp_ep_new(worker, peer_name, "from api call", &ep); + if (status != UCS_OK) { + goto err; + } + ++ status = ucp_ep_init_create_wireup(ep, params, &wireup_ep); ++ if (status != UCS_OK) { ++ goto err_delete; ++ } ++ ++ status = ucp_ep_adjust_params(ep, params); ++ if (status != UCS_OK) { ++ goto err_cleanup_lanes; ++ } ++ + status = ucp_wireup_ep_connect_to_sockaddr(ep->uct_eps[0], params); + if (status != UCS_OK) { + goto err_cleanup_lanes; +@@ -408,11 +377,204 @@ static ucs_status_t ucp_ep_create_to_sock_addr(ucp_worker_h worker, + return UCS_OK; + + err_cleanup_lanes: +- ucp_ep_destroy_internal(ep); ++ ucp_ep_cleanup_lanes(ep); ++err_delete: ++ ucp_ep_delete(ep); + err: + return status; + } + ++/** ++ * Create an endpoint on the server side connected to the client endpoint. ++ */ ++ucs_status_t ucp_ep_create_accept(ucp_worker_h worker, ++ const ucp_wireup_client_data_t *client_data, ++ ucp_ep_h *ep_p) ++{ ++ ucp_ep_params_t params; ++ ucp_unpacked_address_t remote_address; ++ ucs_status_t status; ++ ++ params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; ++ params.err_mode = client_data->err_mode; ++ ++ status = ucp_address_unpack(client_data + 1, &remote_address); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ if (client_data->is_full_addr) { ++ /* create endpoint to the worker address we got in the private data */ ++ status = ucp_ep_create_to_worker_addr(worker, ¶ms, &remote_address, ++ UCP_EP_CREATE_AM_LANE, "listener", ++ ep_p); ++ if (status == UCS_OK) { ++ ucp_ep_flush_state_reset(*ep_p); ++ } else { ++ goto out_free_address; ++ } ++ } else { ++ status = ucp_ep_create_sockaddr_aux(worker, ¶ms, &remote_address, ++ ep_p); ++ if (status == UCS_OK) { ++ /* the server's ep should be aware of the sent address from the client */ ++ (*ep_p)->flags |= UCP_EP_FLAG_LISTENER; ++ /* NOTE: protect union */ ++ ucs_assert(!((*ep_p)->flags & (UCP_EP_FLAG_ON_MATCH_CTX | ++ UCP_EP_FLAG_FLUSH_STATE_VALID))); ++ } else { ++ goto out_free_address; ++ } ++ } ++ ++ ucp_ep_update_dest_ep_ptr(*ep_p, client_data->ep_ptr); ++ ++out_free_address: ++ ucs_free(remote_address.address_list); ++out: ++ return status; ++} ++ ++static ucs_status_t ++ucp_ep_create_api_conn_request(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ucp_ep_h *ep_p) ++{ ++ ucp_conn_request_h conn_request = params->conn_request; ++ ucp_ep_h ep; ++ ucs_status_t status; ++ ++ /* coverity[overrun-buffer-val] */ ++ status = ucp_ep_create_accept(worker, &conn_request->client_data, &ep); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ status = ucp_ep_adjust_params(ep, params); ++ if (status != UCS_OK) { ++ goto out_ep_destroy; ++ } ++ ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ status = ucp_wireup_send_pre_request(ep); ++ } else { ++ /* send wireup request message, to connect the client to the server's ++ new endpoint */ ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED)); ++ status = ucp_wireup_send_request(ep); ++ } ++ ++ if (status == UCS_OK) { ++ *ep_p = ep; ++ goto out; ++ } ++ ++out_ep_destroy: ++ ucp_ep_destroy_internal(ep); ++out: ++ if (status == UCS_OK) { ++ status = uct_iface_accept(conn_request->listener->wiface.iface, ++ conn_request->uct_req); ++ } else { ++ uct_iface_reject(conn_request->listener->wiface.iface, ++ conn_request->uct_req); ++ } ++ ucs_free(params->conn_request); ++ ++ return status; ++} ++ ++static ucs_status_t ++ucp_ep_create_api_to_worker_addr(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ucp_ep_h *ep_p) ++{ ++ ucp_unpacked_address_t remote_address; ++ ucp_ep_conn_sn_t conn_sn; ++ ucs_status_t status; ++ unsigned flags; ++ ucp_ep_h ep; ++ ++ if (!(params->field_mask & UCP_EP_PARAM_FIELD_REMOTE_ADDRESS)) { ++ status = UCS_ERR_INVALID_PARAM; ++ ucs_error("remote worker address is missing"); ++ goto out; ++ } ++ ++ UCP_CHECK_PARAM_NON_NULL(params->address, status, goto out); ++ ++ status = ucp_address_unpack(params->address, &remote_address); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ /* Check if there is already an unconnected internal endpoint to the same ++ * destination address. ++ * In case of loopback connection, search the hash table for an endpoint with ++ * even/odd matching, so that every 2 endpoints connected to the local worker ++ * with be paired to each other. ++ * Note that if a loopback endpoint had the UCP_EP_PARAMS_FLAGS_NO_LOOPBACK ++ * flag set, it will not be added to ep_match as an unexpected ep. Because ++ * dest_ep_ptr will be initialized, a WIREUP_REQUEST (if sent) will have ++ * dst_ep != 0. So, ucp_wireup_request() will not create an unexpected ep ++ * in ep_match. ++ */ ++ conn_sn = ucp_ep_match_get_next_sn(&worker->ep_match_ctx, remote_address.uuid); ++ ep = ucp_ep_match_retrieve_unexp(&worker->ep_match_ctx, remote_address.uuid, ++ conn_sn ^ (remote_address.uuid == worker->uuid)); ++ if (ep != NULL) { ++ status = ucp_ep_adjust_params(ep, params); ++ if (status != UCS_OK) { ++ ucp_ep_destroy_internal(ep); ++ } ++ ++ ucp_ep_flush_state_reset(ep); ++ ucp_stream_ep_activate(ep); ++ goto out_free_address; ++ } ++ ++ status = ucp_ep_create_to_worker_addr(worker, params, &remote_address, 0, ++ "from api call", &ep); ++ if (status != UCS_OK) { ++ goto out_free_address; ++ } ++ ++ ep->conn_sn = conn_sn; ++ ++ /* ++ * If we are connecting to our own worker, and loopback is allowed, connect ++ * the endpoint to itself by updating dest_ep_ptr. ++ * Otherwise, add the new ep to the matching context as an expected endpoint, ++ * waiting for connection request from the peer endpoint ++ */ ++ flags = UCP_PARAM_VALUE(EP, params, flags, FLAGS, 0); ++ if ((remote_address.uuid == worker->uuid) && ++ !(flags & UCP_EP_PARAMS_FLAGS_NO_LOOPBACK)) { ++ ucp_ep_update_dest_ep_ptr(ep, (uintptr_t)ep); ++ ucp_ep_flush_state_reset(ep); ++ } else { ++ ucp_ep_match_insert_exp(&worker->ep_match_ctx, remote_address.uuid, ep); ++ } ++ ++ /* if needed, send initial wireup message */ ++ if (!(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED)) { ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED)); ++ status = ucp_wireup_send_request(ep); ++ if (status != UCS_OK) { ++ ucp_ep_destroy_internal(ep); ++ goto out_free_address; ++ } ++ } ++ ++ status = UCS_OK; ++ ++out_free_address: ++ ucs_free(remote_address.address_list); ++out: ++ if (status == UCS_OK) { ++ *ep_p = ep; ++ } ++ return status; ++} ++ + ucs_status_t ucp_ep_create(ucp_worker_h worker, const ucp_ep_params_t *params, + ucp_ep_h *ep_p) + { +@@ -420,39 +582,27 @@ ucs_status_t ucp_ep_create(ucp_worker_h worker, const ucp_ep_params_t *params, + unsigned flags; + ucp_ep_h ep = NULL; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + UCS_ASYNC_BLOCK(&worker->async); + + flags = UCP_PARAM_VALUE(EP, params, flags, FLAGS, 0); + if (flags & UCP_EP_PARAMS_FLAGS_CLIENT_SERVER) { + status = ucp_ep_create_to_sock_addr(worker, params, &ep); +- if (status != UCS_OK) { +- goto out; +- } ++ } else if (params->field_mask & UCP_EP_PARAM_FIELD_CONN_REQUEST) { ++ status = ucp_ep_create_api_conn_request(worker, params, &ep); ++ } else if (params->field_mask & UCP_EP_PARAM_FIELD_REMOTE_ADDRESS) { ++ status = ucp_ep_create_api_to_worker_addr(worker, params, &ep); + } else { +- status = ucp_ep_create_to_worker_addr(worker, params, 0, "from api call", +- &ep); +- if (status != UCS_OK) { +- goto out; +- } +- +- if (!(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED)) { +- /* send initial wireup message */ +- status = ucp_wireup_send_request(ep, ep->dest_uuid); +- if (status != UCS_OK) { +- ucp_ep_destroy_internal(ep); +- goto out; +- } +- } ++ status = UCS_ERR_INVALID_PARAM; + } + +- status = ucp_ep_adjust_params(ep, params); +- +- *ep_p = ep; ++ if (status == UCS_OK) { ++ ep->flags |= UCP_EP_FLAG_USED; ++ *ep_p = ep; ++ } + +-out: + UCS_ASYNC_UNBLOCK(&worker->async); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } + +@@ -467,13 +617,13 @@ ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params) + return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM); + } + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + UCS_ASYNC_BLOCK(&worker->async); + + status = ucp_ep_adjust_params(ep, params); + + UCS_ASYNC_UNBLOCK(&worker->async); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return UCS_STATUS_PTR(status); + } +@@ -498,7 +648,7 @@ void ucp_ep_destroy_internal(ucp_ep_h ep) + ucp_ep_delete(ep); + } + +-static void ucp_ep_cleanup_lanes(ucp_ep_h ep) ++void ucp_ep_cleanup_lanes(ucp_ep_h ep) + { + ucp_lane_index_t lane, proxy_lane; + uct_ep_h uct_ep; +@@ -530,31 +680,29 @@ static void ucp_ep_cleanup_lanes(ucp_ep_h ep) + ucs_debug("ep %p: destroy uct_ep[%d]=%p", ep, lane, uct_ep); + uct_ep_destroy(uct_ep); + } ++ ++ for (lane = 0; lane < ucp_ep_num_lanes(ep); ++lane) { ++ ep->uct_eps[lane] = NULL; ++ } + } + +-static void ucp_ep_ext_stream_invalidate(ucp_ep_h ep) ++void ucp_ep_disconnected(ucp_ep_h ep, int force) + { +- ucp_ep_ext_stream_t *ep_stream = ep->ext.stream; +- void *data; +- size_t length; ++ /* remove pending slow-path progress in case it wasn't removed yet */ ++ ucs_callbackq_remove_if(&ep->worker->uct->progress_q, ++ ucp_worker_err_handle_remove_filter, ep); + +- if (ep_stream == NULL) { +- return; +- } ++ /* remove pending slow-path function it wasn't removed yet */ ++ ucs_callbackq_remove_if(&ep->worker->uct->progress_q, ++ ucp_listener_accept_cb_remove_filter, ep); + +- while ((data = ucp_stream_recv_data_nb(ep, &length)) != NULL) { +- ucs_assert_always(!UCS_PTR_IS_ERR(data)); +- ucp_stream_data_release(ep, data); +- } ++ ucp_stream_ep_cleanup(ep); + +- ep->ext.stream->flags &= ~UCP_EP_STREAM_FLAG_VALID; +-} +- +-static void ucp_ep_disconnected(ucp_ep_h ep, int force) +-{ +- ucp_ep_ext_stream_invalidate(ep); ++ ep->flags &= ~UCP_EP_FLAG_USED; ++ ep->flags |= UCP_EP_FLAG_CLOSED; + +- if ((ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED) && !force) { ++ if ((ep->flags & (UCP_EP_FLAG_CONNECT_REQ_QUEUED|UCP_EP_FLAG_REMOTE_CONNECTED)) ++ && !force) { + /* Endpoints which have remote connection are destroyed only when the + * worker is destroyed, to enable remote endpoints keep sending + * TODO negotiate disconnect. +@@ -563,7 +711,7 @@ static void ucp_ep_disconnected(ucp_ep_h ep, int force) + return; + } + +- ucp_ep_delete_from_hash(ep); ++ ucp_ep_match_remove_ep(&ep->worker->ep_match_ctx, ep); + ucp_ep_destroy_internal(ep); + } + +@@ -608,21 +756,22 @@ ucs_status_ptr_t ucp_ep_close_nb(ucp_ep_h ep, unsigned mode) + return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM); + } + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + UCS_ASYNC_BLOCK(&worker->async); ++ + request = ucp_ep_flush_internal(ep, + (mode == UCP_EP_CLOSE_MODE_FLUSH) ? + UCT_FLUSH_FLAG_LOCAL : UCT_FLUSH_FLAG_CANCEL, +- NULL, 0, +- ucp_ep_close_flushed_callback); ++ NULL, 0, NULL, ++ ucp_ep_close_flushed_callback, "close"); + if (!UCS_PTR_IS_PTR(request)) { + ucp_ep_disconnected(ep, mode == UCP_EP_CLOSE_MODE_FORCE); + } + + UCS_ASYNC_UNBLOCK(&worker->async); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return request; + } +@@ -638,7 +787,7 @@ void ucp_ep_destroy(ucp_ep_h ep) + ucs_status_ptr_t *request; + ucs_status_t status; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + request = ucp_disconnect_nb(ep); + if (request == NULL) { + goto out; +@@ -651,11 +800,12 @@ void ucp_ep_destroy(ucp_ep_h ep) + ucp_worker_progress(worker); + status = ucp_request_check_status(request); + } while (status == UCS_INPROGRESS); ++ + ucp_request_release(request); + } + + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return; + } + +@@ -749,76 +899,63 @@ static size_t ucp_ep_config_calc_rndv_thresh(ucp_context_h context, + } + } + +-static void +-ucp_ep_config_set_am_rndv_send_nbr_thresh(ucp_context_h context, +- ucp_ep_config_t *config, +- size_t adjust_min_val) ++static size_t ucp_ep_thresh(size_t thresh_value, size_t min_value, ++ size_t max_value) + { +- size_t rndv_thresh; +- +- if (config->key.err_mode == UCP_ERR_HANDLING_MODE_PEER) { +- rndv_thresh = SIZE_MAX; +- } else { +- rndv_thresh = ucs_min(context->config.ext.rndv_send_nbr_thresh, +- adjust_min_val); +- } ++ size_t thresh; ++ ++ ucs_assert(min_value <= max_value); + +- config->tag.rndv_send_nbr.am_thresh = rndv_thresh; ++ thresh = ucs_max(min_value, thresh_value); ++ thresh = ucs_min(max_value, thresh); ++ ++ return thresh; + } + + static void ucp_ep_config_set_am_rndv_thresh(ucp_context_h context, uct_iface_attr_t *iface_attr, + uct_md_attr_t *md_attr, ucp_ep_config_t *config, +- size_t adjust_min_val) ++ size_t max_rndv_thresh) + { +- size_t rndv_thresh; ++ size_t rndv_thresh, rndv_nbr_thresh; + + ucs_assert(config->key.am_lane != UCP_NULL_LANE); + ucs_assert(config->key.lanes[config->key.am_lane].rsc_index != UCP_NULL_RESOURCE); + + if (config->key.err_mode == UCP_ERR_HANDLING_MODE_PEER) { + /* Disable RNDV */ +- rndv_thresh = SIZE_MAX; ++ rndv_thresh = rndv_nbr_thresh = SIZE_MAX; + } else if (context->config.ext.rndv_thresh == UCS_CONFIG_MEMUNITS_AUTO) { + /* auto - Make UCX calculate the AM rndv threshold on its own.*/ +- rndv_thresh = ucp_ep_config_calc_rndv_thresh(context, iface_attr, md_attr, +- context->config.ext.bcopy_bw, +- 0); +- ucs_trace("Active Message rendezvous threshold is %zu", rndv_thresh); ++ rndv_thresh = ucp_ep_config_calc_rndv_thresh(context, iface_attr, md_attr, ++ context->config.ext.bcopy_bw, ++ 0); ++ rndv_nbr_thresh = context->config.ext.rndv_send_nbr_thresh; + } else { +- rndv_thresh = context->config.ext.rndv_thresh; ++ rndv_thresh = context->config.ext.rndv_thresh; ++ rndv_nbr_thresh = context->config.ext.rndv_thresh; + } + +- ucs_assert(iface_attr->cap.am.min_zcopy <= iface_attr->cap.am.max_zcopy); +- /* use rendezvous only starting from minimal zero-copy am size */ +- rndv_thresh = ucs_max(rndv_thresh, iface_attr->cap.am.min_zcopy); +- config->tag.rndv.am_thresh = ucs_min(rndv_thresh, adjust_min_val); ++ config->tag.rndv.am_thresh = ucp_ep_thresh(rndv_thresh, ++ iface_attr->cap.am.min_zcopy, ++ max_rndv_thresh); + +- ucp_ep_config_set_am_rndv_send_nbr_thresh(context, config, adjust_min_val); +-} ++ config->tag.rndv_send_nbr.am_thresh = ucp_ep_thresh(rndv_nbr_thresh, ++ iface_attr->cap.am.min_zcopy, ++ max_rndv_thresh); + +-static void +-ucp_ep_config_set_rndv_send_nbr_thresh(ucp_context_h context, +- ucp_ep_config_t *config, +- size_t adjust_min_val, +- size_t adjust_max_val) +-{ +- size_t rndv_thresh; +- +- rndv_thresh = context->config.ext.rndv_send_nbr_thresh; +- rndv_thresh = ucs_max(rndv_thresh, adjust_max_val); +- +- config->tag.rndv_send_nbr.rma_thresh = ucs_min(rndv_thresh, adjust_min_val); ++ ucs_trace("Active Message rndv threshold is %zu (send_nbr: %zu)", ++ config->tag.rndv.am_thresh, config->tag.rndv_send_nbr.am_thresh); + } + + static void ucp_ep_config_set_rndv_thresh(ucp_worker_t *worker, + ucp_ep_config_t *config, + ucp_lane_index_t lane, + uint64_t rndv_cap_flag, +- size_t adjust_min_val) ++ size_t max_rndv_thresh) + { + ucp_context_t *context = worker->context; + ucp_rsc_index_t rsc_index; +- size_t rndv_thresh; ++ size_t rndv_thresh, rndv_nbr_thresh; + uct_iface_attr_t *iface_attr; + uct_md_attr_t *md_attr; + +@@ -838,22 +975,26 @@ static void ucp_ep_config_set_rndv_thresh(ucp_worker_t *worker, + + if (context->config.ext.rndv_thresh == UCS_CONFIG_MEMUNITS_AUTO) { + /* auto - Make UCX calculate the RMA (get_zcopy) rndv threshold on its own.*/ +- rndv_thresh = ucp_ep_config_calc_rndv_thresh(context, iface_attr, +- md_attr, SIZE_MAX, 1); ++ rndv_thresh = ucp_ep_config_calc_rndv_thresh(context, iface_attr, ++ md_attr, SIZE_MAX, 1); ++ rndv_nbr_thresh = context->config.ext.rndv_send_nbr_thresh; + } else { +- rndv_thresh = context->config.ext.rndv_thresh; ++ rndv_thresh = context->config.ext.rndv_thresh; ++ rndv_nbr_thresh = context->config.ext.rndv_thresh; + } + +- /* use rendezvous only starting from minimal zero-copy get size */ +- ucs_assert(iface_attr->cap.get.min_zcopy <= iface_attr->cap.get.max_zcopy); +- rndv_thresh = ucs_max(rndv_thresh, iface_attr->cap.get.min_zcopy); +- + config->tag.rndv.max_get_zcopy = iface_attr->cap.get.max_zcopy; + config->tag.rndv.max_put_zcopy = iface_attr->cap.put.max_zcopy; +- config->tag.rndv.rma_thresh = ucs_min(rndv_thresh, adjust_min_val); ++ config->tag.rndv.rma_thresh = ucp_ep_thresh(rndv_thresh, ++ iface_attr->cap.get.min_zcopy, ++ max_rndv_thresh); + +- ucp_ep_config_set_rndv_send_nbr_thresh(context, config, adjust_min_val, +- iface_attr->cap.get.max_zcopy); ++ config->tag.rndv_send_nbr.rma_thresh = ucp_ep_thresh(rndv_nbr_thresh, ++ iface_attr->cap.get.min_zcopy, ++ max_rndv_thresh); ++ ++ ucs_trace("rndv threshold is %zu (send_nbr: %zu)", ++ config->tag.rndv.rma_thresh, config->tag.rndv_send_nbr.rma_thresh); + } + + static void ucp_ep_config_init_attrs(ucp_worker_t *worker, ucp_rsc_index_t rsc_index, +@@ -868,6 +1009,7 @@ static void ucp_ep_config_init_attrs(ucp_worker_t *worker, ucp_rsc_index_t rsc_i + uct_md_attr_t *md_attr = &context->tl_mds[context->tl_rscs[rsc_index].md_index].attr; + size_t it; + size_t zcopy_thresh; ++ int mem_type; + + if (iface_attr->cap.flags & short_flag && !context->num_mem_type_mds) { + config->max_short = max_short - hdr_len; +@@ -902,6 +1044,14 @@ static void ucp_ep_config_init_attrs(ucp_worker_t *worker, ucp_rsc_index_t rsc_i + config->sync_zcopy_thresh[0] = config->zcopy_thresh[0] = + ucs_min(context->config.ext.zcopy_thresh, adjust_min_val); + } ++ ++ for (mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { ++ if (UCP_MEM_IS_HOST(mem_type)) { ++ config->mem_type_zcopy_thresh[mem_type] = config->zcopy_thresh[0]; ++ } else if (md_attr->cap.reg_mem_types & UCS_BIT(mem_type)) { ++ config->mem_type_zcopy_thresh[mem_type] = 1; ++ } ++ } + } + + void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) +@@ -910,6 +1060,7 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + ucp_ep_rma_config_t *rma_config; + uct_iface_attr_t *iface_attr; + uct_md_attr_t *md_attr; ++ uct_memory_type_t mem_type; + ucp_rsc_index_t rsc_index; + ucp_lane_index_t lane; + size_t it; +@@ -923,6 +1074,12 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + config->tag.eager.zcopy_thresh[it] = SIZE_MAX; + config->tag.eager.sync_zcopy_thresh[it] = SIZE_MAX; + } ++ ++ for (mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { ++ config->am.mem_type_zcopy_thresh[mem_type] = SIZE_MAX; ++ config->tag.eager.mem_type_zcopy_thresh[mem_type] = SIZE_MAX; ++ } ++ + config->tag.eager.zcopy_auto_thresh = 0; + config->am.zcopy_auto_thresh = 0; + config->p2p_lanes = 0; +@@ -939,6 +1096,8 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + config->tag.rndv.rkey_size = ucp_rkey_packed_size(context, + config->key.rma_bw_md_map); + config->stream.proto = &ucp_stream_am_proto; ++ config->tag.offload.max_eager_short = -1; ++ config->tag.max_eager_short = -1; + max_rndv_thresh = SIZE_MAX; + max_am_rndv_thresh = SIZE_MAX; + +@@ -970,16 +1129,18 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + UCT_IFACE_FLAG_TAG_EAGER_ZCOPY, 0, + iface_attr->cap.tag.eager.max_bcopy); + +- config->tag.offload.max_rndv_iov = iface_attr->cap.tag.rndv.max_iov; +- config->tag.offload.max_rndv_zcopy = iface_attr->cap.tag.rndv.max_zcopy; +- config->tag.sync_proto = &ucp_tag_offload_sync_proto; +- config->tag.proto = &ucp_tag_offload_proto; +- config->tag.lane = lane; +- max_rndv_thresh = iface_attr->cap.tag.eager.max_zcopy; +- max_am_rndv_thresh = iface_attr->cap.tag.eager.max_bcopy; ++ config->tag.offload.max_rndv_iov = iface_attr->cap.tag.rndv.max_iov; ++ config->tag.offload.max_rndv_zcopy = iface_attr->cap.tag.rndv.max_zcopy; ++ config->tag.offload.max_eager_short = config->tag.eager.max_short; ++ config->tag.sync_proto = &ucp_tag_offload_sync_proto; ++ config->tag.proto = &ucp_tag_offload_proto; ++ config->tag.lane = lane; ++ max_rndv_thresh = iface_attr->cap.tag.eager.max_zcopy; ++ max_am_rndv_thresh = iface_attr->cap.tag.eager.max_bcopy; + + ucs_assert_always(iface_attr->cap.tag.rndv.max_hdr >= + sizeof(ucp_tag_offload_unexp_rndv_hdr_t)); ++ ucs_assert_always(config->tag.offload.max_eager_short >= 0); + + if (config->key.am_lane != UCP_NULL_LANE) { + /* Must have active messages for using rendezvous */ +@@ -1024,8 +1185,9 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + config->key.rma_bw_lanes[0], + UCT_IFACE_FLAG_GET_ZCOPY, + max_rndv_thresh); +- config->tag.eager = config->am; +- config->tag.lane = lane; ++ config->tag.eager = config->am; ++ config->tag.lane = lane; ++ config->tag.max_eager_short = config->tag.eager.max_short; + } + } else { + /* Stub endpoint */ +@@ -1033,18 +1195,22 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + } + } + ++ memset(&config->rma, 0, sizeof(config->rma)); ++ + /* Configuration for remote memory access */ + for (lane = 0; lane < config->key.num_lanes; ++lane) { ++ rma_config = &config->rma[lane]; ++ rma_config->put_zcopy_thresh = SIZE_MAX; ++ rma_config->get_zcopy_thresh = SIZE_MAX; ++ rma_config->max_put_short = -1; ++ rma_config->max_get_short = -1; ++ + if (ucp_ep_config_get_multi_lane_prio(config->key.rma_lanes, lane) == -1) { + continue; + } + +- rma_config = &config->rma[lane]; + rsc_index = config->key.lanes[lane].rsc_index; + +- rma_config->put_zcopy_thresh = SIZE_MAX; +- rma_config->get_zcopy_thresh = SIZE_MAX; +- + if (rsc_index != UCP_NULL_RESOURCE) { + iface_attr = &worker->ifaces[rsc_index].attr; + if (iface_attr->cap.flags & UCT_IFACE_FLAG_PUT_SHORT) { +@@ -1064,6 +1230,9 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + rma_config->put_zcopy_thresh = ucs_max(rma_config->put_zcopy_thresh, + iface_attr->cap.put.min_zcopy); + } ++ if (iface_attr->cap.flags & UCT_IFACE_FLAG_GET_SHORT) { ++ rma_config->max_get_short = iface_attr->cap.get.max_short; ++ } + if (iface_attr->cap.flags & UCT_IFACE_FLAG_GET_BCOPY) { + rma_config->max_get_bcopy = iface_attr->cap.get.max_bcopy; + } +@@ -1071,7 +1240,7 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + /* TODO: formula */ + rma_config->max_get_zcopy = iface_attr->cap.get.max_zcopy; + if (context->config.ext.zcopy_thresh == UCS_CONFIG_MEMUNITS_AUTO) { +- rma_config->get_zcopy_thresh = 16384; ++ rma_config->get_zcopy_thresh = 16384; + } else { + rma_config->get_zcopy_thresh = context->config.ext.zcopy_thresh; + } +@@ -1315,19 +1484,12 @@ void ucp_ep_print_info(ucp_ep_h ep, FILE *stream) + ucp_lane_index_t wireup_lane; + uct_ep_h wireup_ep; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + + fprintf(stream, "#\n"); + fprintf(stream, "# UCP endpoint\n"); + fprintf(stream, "#\n"); +- +- fprintf(stream, "# peer: %s%suuid 0x%"PRIx64"\n", +-#if ENABLE_DEBUG_DATA +- ucp_ep_peer_name(ep), ", ", +-#else +- "", "", +-#endif +- ep->dest_uuid); ++ fprintf(stream, "# peer: %s\n", ucp_ep_peer_name(ep)); + + /* if there is a wireup lane, set aux_rsc_index to the stub ep resource */ + aux_rsc_index = UCP_NULL_RESOURCE; +@@ -1344,7 +1506,7 @@ void ucp_ep_print_info(ucp_ep_h ep, FILE *stream) + + fprintf(stream, "#\n"); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + } + + size_t ucp_ep_config_get_zcopy_auto_thresh(size_t iovcnt, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.h +index ef3f2d9..395fa24 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.h +@@ -9,11 +9,11 @@ + + #include "ucp_types.h" + ++#include + #include + #include +-#include + #include +-#include ++#include + + #define UCP_MAX_IOV 16UL + +@@ -22,21 +22,43 @@ + typedef uint16_t ucp_ep_cfg_index_t; + + ++/* Endpoint flags type */ ++#if ENABLE_DEBUG_DATA || ENABLE_ASSERT ++typedef uint32_t ucp_ep_flags_t; ++#else ++typedef uint16_t ucp_ep_flags_t; ++#endif ++ ++ + /** + * Endpoint flags + */ + enum { +- UCP_EP_FLAG_LOCAL_CONNECTED = UCS_BIT(0), /* All local endpoints are connected */ +- UCP_EP_FLAG_REMOTE_CONNECTED = UCS_BIT(1), /* All remote endpoints are connected */ +- UCP_EP_FLAG_CONNECT_REQ_QUEUED = UCS_BIT(2), /* Connection request was queued */ +- UCP_EP_FLAG_TAG_OFFLOAD_ENABLED = UCS_BIT(3), /* Endpoint uses tl offload for tag matching */ +- UCP_EP_FLAG_FAILED = UCS_BIT(4), /* EP is in failed state */ ++ UCP_EP_FLAG_LOCAL_CONNECTED = UCS_BIT(0), /* All local endpoints are connected */ ++ UCP_EP_FLAG_REMOTE_CONNECTED = UCS_BIT(1), /* All remote endpoints are connected */ ++ UCP_EP_FLAG_CONNECT_REQ_QUEUED = UCS_BIT(2), /* Connection request was queued */ ++ UCP_EP_FLAG_FAILED = UCS_BIT(3), /* EP is in failed state */ ++ UCP_EP_FLAG_USED = UCS_BIT(4), /* EP is in use by the user */ ++ UCP_EP_FLAG_STREAM_HAS_DATA = UCS_BIT(5), /* EP has data in the ext.stream.match_q */ ++ UCP_EP_FLAG_ON_MATCH_CTX = UCS_BIT(6), /* EP is on match queue */ ++ UCP_EP_FLAG_DEST_EP = UCS_BIT(7), /* dest_ep_ptr is valid */ ++ UCP_EP_FLAG_LISTENER = UCS_BIT(8), /* EP holds pointer to a listener ++ (on server side due to receiving partial ++ worker address from the client) */ ++ UCP_EP_FLAG_CONNECT_PRE_REQ_QUEUED = UCS_BIT(9), /* Pre-Connection request was queued */ ++ UCP_EP_FLAG_CLOSED = UCS_BIT(10),/* EP was closed */ + + /* DEBUG bits */ +- UCP_EP_FLAG_CONNECT_REQ_SENT = UCS_BIT(8), /* DEBUG: Connection request was sent */ +- UCP_EP_FLAG_CONNECT_REP_SENT = UCS_BIT(9), /* DEBUG: Connection reply was sent */ +- UCP_EP_FLAG_CONNECT_ACK_SENT = UCS_BIT(10),/* DEBUG: Connection ACK was sent */ +- UCP_EP_FLAG_DEST_UUID_PEER = UCS_BIT(11) /* DEBUG: dest_uuid is of the remote worker */ ++ UCP_EP_FLAG_CONNECT_REQ_SENT = UCS_BIT(16),/* DEBUG: Connection request was sent */ ++ UCP_EP_FLAG_CONNECT_REP_SENT = UCS_BIT(17),/* DEBUG: Connection reply was sent */ ++ UCP_EP_FLAG_CONNECT_ACK_SENT = UCS_BIT(18),/* DEBUG: Connection ACK was sent */ ++ UCP_EP_FLAG_CONNECT_REQ_IGNORED = UCS_BIT(19),/* DEBUG: Connection request was ignored */ ++ UCP_EP_FLAG_CONNECT_PRE_REQ_SENT = UCS_BIT(20),/* DEBUG: Connection pre-request was sent */ ++ UCP_EP_FLAG_SOCKADDR_PARTIAL_ADDR = UCS_BIT(21),/* DEBUG: Partial worker address was sent ++ to the remote peer when starting ++ connection establishment on this EP */ ++ UCP_EP_FLAG_FLUSH_STATE_VALID = UCS_BIT(22) /* DEBUG: flush_state is valid */ ++ + }; + + +@@ -55,7 +77,8 @@ enum { + * Endpoint init flags + */ + enum { +- UCP_EP_INIT_FLAG_MEM_TYPE = UCS_BIT(0) /**< Endpoint for local mem type transfers */ ++ UCP_EP_INIT_FLAG_MEM_TYPE = UCS_BIT(0), /**< Endpoint for local mem type transfers */ ++ UCP_EP_CREATE_AM_LANE = UCS_BIT(1) /**< Endpoint requires an AM lane */ + }; + + +@@ -119,6 +142,7 @@ typedef struct ucp_ep_rma_config { + size_t max_put_short; /* Maximal payload of put short */ + size_t max_put_bcopy; /* Maximal total size of put_bcopy */ + size_t max_put_zcopy; ++ size_t max_get_short; /* Maximal payload of get short */ + size_t max_get_bcopy; /* Maximal total size of get_bcopy */ + size_t max_get_zcopy; + size_t put_zcopy_thresh; +@@ -138,6 +162,9 @@ typedef struct ucp_ep_msg_config { + /* zero-copy threshold for operations which do not have to wait for remote side */ + size_t zcopy_thresh[UCP_MAX_IOV]; + ++ /* zero-copy threshold for mem type buffers */ ++ size_t mem_type_zcopy_thresh[UCT_MD_MEM_TYPE_LAST]; ++ + /* zero-copy threshold for operations which anyways have to wait for remote side */ + size_t sync_zcopy_thresh[UCP_MAX_IOV]; + uint8_t zcopy_auto_thresh; /* if != 0 the zcopy enabled */ +@@ -177,6 +204,8 @@ typedef struct ucp_ep_config { + /* Lane used for tag matching operations. */ + ucp_lane_index_t lane; + ++ ssize_t max_eager_short; ++ + /* Configuration of the lane used for eager protocols + * (can be AM or tag offload). */ + ucp_ep_msg_config_t eager; +@@ -203,6 +232,8 @@ typedef struct ucp_ep_config { + } rndv_send_nbr; + + struct { ++ /* Maximal size for eager short */ ++ ssize_t max_eager_short; + /* Maximal iov count for RNDV offload */ + size_t max_rndv_iov; + /* Maximal total size for RNDV offload */ +@@ -219,59 +250,90 @@ typedef struct ucp_ep_config { + + + /** +- * UCP_FEATURE_STREAM specific extention of the remote protocol layer endpoint +- */ +-typedef struct ucp_ep_ext_stream { +- /* List entry in worker's EP list */ +- ucs_list_link_t list; +- /* Queue of receive data or requests depends on flags field */ +- ucs_queue_head_t match_q; +- /* EP which owns the extension */ +- ucp_ep_h ucp_ep; +- /* Describes the state */ +- uint8_t flags; +-} ucp_ep_ext_stream_t; +- +- +-/** +- * Remote protocol layer endpoint ++ * Protocol layer endpoint, represents a connection to a remote worker + */ + typedef struct ucp_ep { + ucp_worker_h worker; /* Worker this endpoint belongs to */ + + ucp_ep_cfg_index_t cfg_index; /* Configuration index */ ++ ucp_ep_conn_sn_t conn_sn; /* Sequence number for remote connection */ + ucp_lane_index_t am_lane; /* Cached value */ +-#if ENABLE_ASSERT || ENABLE_DEBUG_DATA +- uint16_t flags; /* Endpoint flags */ +-#else +- uint8_t flags; /* Endpoint flags */ +-#endif +- +- uint64_t dest_uuid; /* Destination worker uuid */ +- void *user_data; /* user data associated with +- the endpoint */ ++ ucp_ep_flags_t flags; /* Endpoint flags */ + +- UCS_STATS_NODE_DECLARE(stats); ++ /* TODO allocate ep dynamically according to number of lanes */ ++ uct_ep_h uct_eps[UCP_MAX_LANES]; /* Transports for every lane */ + + #if ENABLE_DEBUG_DATA + char peer_name[UCP_WORKER_NAME_MAX]; + #endif + +- /* TODO allocate ep dynamically according to number of lanes */ +- uct_ep_h uct_eps[UCP_MAX_LANES]; /* Transports for every lane */ ++ UCS_STATS_NODE_DECLARE(stats); + +- /* Feature specific extensions allocated on demand */ +- struct { +- ucp_ep_ext_stream_t *stream; /* UCP_FEATURE_STREAM */ +- } ext; + } ucp_ep_t; + + +-void ucp_ep_config_key_reset(ucp_ep_config_key_t *key); ++/** ++ * Status of protocol-level remote completions ++ */ ++typedef struct { ++ ucs_queue_head_t reqs; /* Queue of flush requests which ++ are waiting for remote completion */ ++ uint32_t send_sn; /* Sequence number of sent operations */ ++ uint32_t cmpl_sn; /* Sequence number of completions */ ++} ucp_ep_flush_state_t; ++ ++ ++/* ++ * Endpoint extension for generic non fast-path data ++ */ ++typedef struct { ++ uintptr_t dest_ep_ptr; /* Remote EP pointer */ ++ void *user_data; /* User data associated with ep */ ++ ucs_list_link_t ep_list; /* List entry in worker's all eps list */ ++ ucp_err_handler_cb_t err_cb; /* Error handler */ ++ ++ /* Endpoint match context and remote completion status are mutually exclusive, ++ * since remote completions are counted only after the endpoint is already ++ * matched to a remote peer. ++ */ ++ union { ++ ucp_ep_match_t ep_match; /* Matching with remote endpoints */ ++ ucp_ep_flush_state_t flush_state; /* Remove completion status */ ++ ucp_listener_h listener; /* Listener that may be associated with ep */ ++ }; ++} ucp_ep_ext_gen_t; ++ ++ ++/* ++ * Endpoint extension for specific protocols ++ */ ++typedef struct { ++ struct { ++ ucs_list_link_t ready_list; /* List entry in worker's EP list */ ++ ucs_queue_head_t match_q; /* Queue of receive data or requests, ++ depends on UCP_EP_FLAG_STREAM_HAS_DATA */ ++ } stream; ++} ucp_ep_ext_proto_t; ++ ++ ++typedef struct ucp_wireup_client_data { ++ uintptr_t ep_ptr; /**< Client-side endpoint pointer */ ++ ucp_err_handling_mode_t err_mode; /**< Error handling mode */ ++ uint8_t is_full_addr; /**< Whether the attached address is ++ full or partial */ ++ /* packed worker address follows */ ++} UCS_S_PACKED ucp_wireup_client_data_t; + +-void ucp_ep_add_to_hash(ucp_ep_h ep); + +-void ucp_ep_delete_from_hash(ucp_ep_h ep); ++typedef struct ucp_conn_request { ++ ucp_listener_h listener; ++ uct_conn_request_h uct_req; ++ ucp_wireup_client_data_t client_data; ++ /* packed worker address follows */ ++} ucp_conn_request_t; ++ ++ ++void ucp_ep_config_key_reset(ucp_ep_config_key_t *key); + + void ucp_ep_config_lane_info_str(ucp_context_h context, + const ucp_ep_config_key_t *key, +@@ -280,33 +342,49 @@ void ucp_ep_config_lane_info_str(ucp_context_h context, + ucp_rsc_index_t aux_rsc_index, + char *buf, size_t max); + +-ucs_status_t ucp_ep_new(ucp_worker_h worker, uint64_t dest_uuid, +- const char *peer_name, const char *message, +- ucp_ep_h *ep_p); ++ucs_status_t ucp_ep_new(ucp_worker_h worker, const char *peer_name, ++ const char *message, ucp_ep_h *ep_p); + +-ucs_status_t ucp_ep_create_stub(ucp_worker_h worker, uint64_t dest_uuid, +- const ucp_ep_params_t *params, +- const char *peer_name, const char *message, +- ucp_ep_h *ep_p); ++void ucp_ep_delete(ucp_ep_h ep); ++ ++ucs_status_t ucp_ep_init_create_wireup(ucp_ep_h ep, ++ const ucp_ep_params_t *params, ++ ucp_wireup_ep_t **wireup_ep); + + ucs_status_t ucp_ep_create_to_worker_addr(ucp_worker_h worker, + const ucp_ep_params_t *params, ++ const ucp_unpacked_address_t *remote_address, + unsigned ep_init_flags, + const char *message, ucp_ep_h *ep_p); + ++ucs_status_t ucp_ep_create_accept(ucp_worker_h worker, ++ const ucp_wireup_client_data_t *client_data, ++ ucp_ep_h *ep_p); ++ + ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags, + ucp_send_callback_t req_cb, + unsigned req_flags, +- ucp_request_callback_t flushed_cb); ++ ucp_request_t *worker_req, ++ ucp_request_callback_t flushed_cb, ++ const char *debug_name); ++ ++ucs_status_t ucp_ep_create_sockaddr_aux(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ++ const ucp_unpacked_address_t *remote_address, ++ ucp_ep_h *ep_p); + + void ucp_ep_config_key_set_params(ucp_ep_config_key_t *key, + const ucp_ep_params_t *params); + + void ucp_ep_err_pending_purge(uct_pending_req_t *self, void *arg); + ++void ucp_ep_disconnected(ucp_ep_h ep, int force); ++ + void ucp_ep_destroy_internal(ucp_ep_h ep); + +-int ucp_ep_is_stub(ucp_ep_h ep); ++void ucp_ep_cleanup_lanes(ucp_ep_h ep); ++ ++int ucp_ep_is_sockaddr_stub(ucp_ep_h ep); + + void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.inl +index 69ae994..fbce498 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.inl +@@ -12,6 +12,7 @@ + #include "ucp_worker.h" + #include "ucp_context.h" + ++#include + #include + + +@@ -111,6 +112,72 @@ static inline const uct_md_attr_t* ucp_ep_md_attr(ucp_ep_h ep, ucp_lane_index_t + return &context->tl_mds[ucp_ep_md_index(ep, lane)].attr; + } + ++static UCS_F_ALWAYS_INLINE ucp_ep_ext_gen_t* ucp_ep_ext_gen(ucp_ep_h ep) ++{ ++ return (ucp_ep_ext_gen_t*)ucs_strided_elem_get(ep, 0, 1); ++} ++ ++static UCS_F_ALWAYS_INLINE ucp_ep_ext_proto_t* ucp_ep_ext_proto(ucp_ep_h ep) ++{ ++ return (ucp_ep_ext_proto_t*)ucs_strided_elem_get(ep, 0, 2); ++} ++ ++static UCS_F_ALWAYS_INLINE ucp_ep_h ucp_ep_from_ext_gen(ucp_ep_ext_gen_t *ep_ext) ++{ ++ return (ucp_ep_h)ucs_strided_elem_get(ep_ext, 1, 0); ++} ++ ++static UCS_F_ALWAYS_INLINE ucp_ep_h ucp_ep_from_ext_proto(ucp_ep_ext_proto_t *ep_ext) ++{ ++ return (ucp_ep_h)ucs_strided_elem_get(ep_ext, 2, 0); ++} ++ ++static UCS_F_ALWAYS_INLINE ucp_ep_flush_state_t* ucp_ep_flush_state(ucp_ep_h ep) ++{ ++ ucs_assert(ep->flags & UCP_EP_FLAG_FLUSH_STATE_VALID); ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_ON_MATCH_CTX)); ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_LISTENER)); ++ return &ucp_ep_ext_gen(ep)->flush_state; ++} ++ ++static UCS_F_ALWAYS_INLINE uintptr_t ucp_ep_dest_ep_ptr(ucp_ep_h ep) ++{ ++#if ENABLE_ASSERT ++ if (!(ep->flags & UCP_EP_FLAG_DEST_EP)) { ++ return 0; /* Let remote side assert if it gets NULL pointer */ ++ } ++#endif ++ return ucp_ep_ext_gen(ep)->dest_ep_ptr; ++} ++ ++/* ++ * Make sure we have a valid dest_ep_ptr value, so protocols which require a ++ * reply from remote side could be used. ++ */ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_ep_resolve_dest_ep_ptr(ucp_ep_h ep, ucp_lane_index_t lane) ++{ ++ if (ep->flags & UCP_EP_FLAG_DEST_EP) { ++ return UCS_OK; ++ } ++ ++ return ucp_wireup_connect_remote(ep, lane); ++} ++ ++static inline void ucp_ep_update_dest_ep_ptr(ucp_ep_h ep, uintptr_t ep_ptr) ++{ ++ if (ep->flags & UCP_EP_FLAG_DEST_EP) { ++ ucs_assertv(ep_ptr == ucp_ep_ext_gen(ep)->dest_ep_ptr, ++ "ep=%p ep_ptr=0x%lx ep->dest_ep_ptr=0x%lx", ++ ep, ep_ptr, ucp_ep_ext_gen(ep)->dest_ep_ptr); ++ } ++ ++ ucs_assert(ep_ptr != 0); ++ ucs_trace("ep %p: set dest_ep_ptr to 0x%lx", ep, ep_ptr); ++ ep->flags |= UCP_EP_FLAG_DEST_EP; ++ ucp_ep_ext_gen(ep)->dest_ep_ptr = ep_ptr; ++} ++ + static inline const char* ucp_ep_peer_name(ucp_ep_h ep) + { + #if ENABLE_DEBUG_DATA +@@ -120,4 +187,22 @@ static inline const char* ucp_ep_peer_name(ucp_ep_h ep) + #endif + } + ++static inline void ucp_ep_flush_state_reset(ucp_ep_h ep) ++{ ++ ucp_ep_flush_state_t *flush_state = &ucp_ep_ext_gen(ep)->flush_state; ++ ++ ucs_assert(!(ep->flags & (UCP_EP_FLAG_ON_MATCH_CTX | ++ UCP_EP_FLAG_LISTENER))); ++ if (!(ep->flags & UCP_EP_FLAG_FLUSH_STATE_VALID)) { ++ flush_state->send_sn = 0; ++ flush_state->cmpl_sn = 0; ++ ucs_queue_head_init(&flush_state->reqs); ++ ep->flags |= UCP_EP_FLAG_FLUSH_STATE_VALID; ++ } else { ++ ucs_assert(flush_state->send_sn == 0); ++ ucs_assert(flush_state->cmpl_sn == 0); ++ ucs_assert(ucs_queue_is_empty(&flush_state->reqs)); ++ } ++} ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.c +index 608d610..a027eb6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.c +@@ -6,90 +6,167 @@ + + #include "ucp_listener.h" + ++#include + #include ++#include ++#include + #include + #include + + +-static unsigned ucp_listener_conn_request_progress(void *arg) ++static unsigned ucp_listener_accept_cb_progress(void *arg) + { +- ucp_listener_accept_t *accept = arg; ++ ucp_ep_h ep = arg; ++ ucp_listener_h listener = ucp_ep_ext_gen(ep)->listener; ++ ++ /* NOTE: protect union */ ++ ucs_assert(!(ep->flags & (UCP_EP_FLAG_ON_MATCH_CTX | ++ UCP_EP_FLAG_FLUSH_STATE_VALID))); ++ ucs_assert(ep->flags & UCP_EP_FLAG_LISTENER); ++ ++ ep->flags &= ~UCP_EP_FLAG_LISTENER; ++ ep->flags |= UCP_EP_FLAG_USED; ++ ucp_stream_ep_activate(ep); ++ ucp_ep_flush_state_reset(ep); ++ ++ /* ++ * listener is NULL if the EP was created with UCP_EP_PARAM_FIELD_EP_ADDR ++ * and we are here because long address requires wireup protocol ++ */ ++ if (listener && listener->accept_cb) { ++ listener->accept_cb(ep, listener->arg); ++ } + +- ucs_trace_func("listener=%p ep=%p", accept->listener, accept->ep); ++ return 1; ++} + +- accept->listener->cb(accept->ep, accept->listener->arg); +- ucs_free(accept); +- return 0; ++int ucp_listener_accept_cb_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg) ++{ ++ ucp_ep_h ep = elem->arg; ++ ++ return (elem->cb == ucp_listener_accept_cb_progress) && (ep == arg); + } + +-static int ucp_listener_remove_filter(const ucs_callbackq_elem_t *elem, +- void *arg) ++void ucp_listener_schedule_accept_cb(ucp_ep_h ep) + { +- ucp_listener_h *listener = elem->arg; ++ uct_worker_cb_id_t prog_id = UCS_CALLBACKQ_ID_NULL; + +- return (elem->cb == ucp_listener_conn_request_progress) && (listener == arg); ++ uct_worker_progress_register_safe(ep->worker->uct, ++ ucp_listener_accept_cb_progress, ++ ep, UCS_CALLBACKQ_FLAG_ONESHOT, ++ &prog_id); + } + +-static ucs_status_t ucp_listener_conn_request_callback(void *arg, +- const void *conn_priv_data, +- size_t length) ++static unsigned ucp_listener_conn_request_progress(void *arg) + { +- const ucp_wireup_sockaddr_priv_t *client_data = conn_priv_data; +- ucp_listener_h listener = arg; +- ucp_listener_accept_t *accept; +- uct_worker_cb_id_t prog_id; +- ucp_ep_params_t params; +- ucs_status_t status; +- ucp_ep_h ep; ++ ucp_conn_request_h conn_request = arg; ++ ucp_listener_h listener = conn_request->listener; ++ const ucp_wireup_client_data_t *client_data = &conn_request->client_data; ++ ucp_worker_h worker; ++ ucp_ep_h ep; ++ ucs_status_t status; ++ ++ ucs_trace_func("listener=%p", listener); ++ ++ if (listener->conn_cb) { ++ listener->conn_cb(conn_request, listener->arg); ++ return 1; ++ } + +- ucs_trace("listener %p: got connection request", listener); ++ worker = listener->wiface.worker; ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); ++ UCS_ASYNC_BLOCK(&worker->async); ++ /* coverity[overrun-buffer-val] */ ++ status = ucp_ep_create_accept(worker, client_data, &ep); + +- params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | +- UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- params.err_mode = client_data->err_mode; +- params.address = (ucp_address_t*)(client_data + 1); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ status = ucp_wireup_send_pre_request(ep); ++ } else { ++ /* send wireup request message, to connect the client to the server's ++ new endpoint */ ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED)); ++ status = ucp_wireup_send_request(ep); ++ } + +- /* create endpoint to the worker address we got in the private data */ +- status = ucp_ep_create_to_worker_addr(listener->wiface.worker, ¶ms, 0, +- "listener", &ep); + if (status != UCS_OK) { +- goto err; ++ goto out; + } + +- /* send wireup request message, to connect the client to the new endpoint */ +- status = ucp_wireup_send_request(ep, client_data->ep_uuid); ++ status = uct_iface_accept(listener->wiface.iface, conn_request->uct_req); + if (status != UCS_OK) { +- goto err_destroy_ep; ++ ucp_ep_destroy_internal(ep); ++ goto out; + } + +- /* if user provided a callback for accepting new connection, launch it on +- * the main thread +- */ +- if (listener->cb != NULL) { +- accept = ucs_malloc(sizeof(*accept), "ucp_listener_accept"); +- if (accept == NULL) { +- ucs_error("failed to allocate listener accept context"); +- status = UCS_ERR_NO_MEMORY; +- goto err_destroy_ep; ++ if (listener->accept_cb != NULL) { ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_USED)); ++ ucp_ep_ext_gen(ep)->listener = listener; ++ } else { ++ ep->flags |= UCP_EP_FLAG_USED; ++ listener->accept_cb(ep, listener->arg); + } ++ } + +- accept->listener = listener; +- accept->ep = ep; ++out: ++ if (status != UCS_OK) { ++ ucs_error("connection request failed on listener %p with status %s", ++ listener, ucs_status_string(status)); ++ uct_iface_reject(listener->wiface.iface, conn_request->uct_req); ++ } ++ ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); ++ ucs_free(conn_request); ++ return 1; ++} + +- /* defer user callback to be invoked from the main thread */ +- prog_id = UCS_CALLBACKQ_ID_NULL; +- uct_worker_progress_register_safe(listener->wiface.worker->uct, +- ucp_listener_conn_request_progress, +- accept, UCS_CALLBACKQ_FLAG_ONESHOT, +- &prog_id); ++static int ucp_listener_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg) ++{ ++ ucp_listener_h *listener = elem->arg; ++ ++ return (elem->cb == ucp_listener_conn_request_progress) && (listener == arg); ++} ++ ++static void ucp_listener_conn_request_callback(uct_iface_h tl_iface, void *arg, ++ uct_conn_request_h uct_req, ++ const void *conn_priv_data, ++ size_t length) ++{ ++ ucp_listener_h listener = arg; ++ uct_worker_cb_id_t prog_id = UCS_CALLBACKQ_ID_NULL; ++ ucp_conn_request_h conn_request; ++ ++ ucs_trace("listener %p: got connection request", listener); ++ ++ /* Defer wireup init and user's callback to be invoked from the main thread */ ++ conn_request = ucs_malloc(ucs_offsetof(ucp_conn_request_t, client_data) + ++ length, "accept connection request"); ++ if (conn_request == NULL) { ++ ucs_error("failed to allocate connect request, rejecting connection request %p on TL iface %p, reason %s", ++ uct_req, tl_iface, ucs_status_string(UCS_ERR_NO_MEMORY)); ++ uct_iface_reject(tl_iface, uct_req); ++ return; + } + +- return UCS_OK; ++ conn_request->listener = listener; ++ conn_request->uct_req = uct_req; ++ memcpy(&conn_request->client_data, conn_priv_data, length); + +-err_destroy_ep: +- ucp_ep_destroy_internal(ep); +-err: +- return status; ++ uct_worker_progress_register_safe(listener->wiface.worker->uct, ++ ucp_listener_conn_request_progress, ++ conn_request, UCS_CALLBACKQ_FLAG_ONESHOT, ++ &prog_id); ++ ++ /* If the worker supports the UCP_FEATURE_WAKEUP feature, signal the user so ++ * that he can wake-up on this event */ ++ ucp_worker_signal_internal(listener->wiface.worker); + } + + ucs_status_t ucp_listener_create(ucp_worker_h worker, +@@ -105,16 +182,22 @@ ucs_status_t ucp_listener_create(ucp_worker_h worker, + ucp_tl_md_t *tl_md; + char saddr_str[UCS_SOCKADDR_STRING_LEN]; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); +- UCS_ASYNC_BLOCK(&worker->async); +- + if (!(params->field_mask & UCP_LISTENER_PARAM_FIELD_SOCK_ADDR)) { + ucs_error("Missing sockaddr for listener"); +- status = UCS_ERR_INVALID_PARAM; +- goto out; ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ UCP_CHECK_PARAM_NON_NULL(params->sockaddr.addr, status, return status); ++ ++ if (ucs_test_all_flags(params->field_mask, ++ UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER | ++ UCP_LISTENER_PARAM_FIELD_CONN_HANDLER)) { ++ ucs_error("Only one accept handler should be provided"); ++ return UCS_ERR_INVALID_PARAM; + } + +- UCP_CHECK_PARAM_NON_NULL(params->sockaddr.addr, status, goto out); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); ++ UCS_ASYNC_BLOCK(&worker->async); + + /* Go through all the available resources and for each one, check if the given + * sockaddr is accessible from its md. Start listening on the first md that +@@ -130,18 +213,22 @@ ucs_status_t ucp_listener_create(ucp_worker_h worker, + continue; + } + +- listener = ucs_malloc(sizeof(*listener), "ucp_listener"); ++ listener = ucs_calloc(1, sizeof(*listener), "ucp_listener"); + if (listener == NULL) { + status = UCS_ERR_NO_MEMORY; + goto out; + } + + if (params->field_mask & UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER) { +- UCP_CHECK_PARAM_NON_NULL(params->accept_handler.cb, status, goto err_free); +- listener->cb = params->accept_handler.cb; +- listener->arg = params->accept_handler.arg; +- } else { +- listener->cb = NULL; ++ UCP_CHECK_PARAM_NON_NULL(params->accept_handler.cb, status, ++ goto err_free); ++ listener->accept_cb = params->accept_handler.cb; ++ listener->arg = params->accept_handler.arg; ++ } else if (params->field_mask & UCP_LISTENER_PARAM_FIELD_CONN_HANDLER) { ++ UCP_CHECK_PARAM_NON_NULL(params->conn_handler.cb, status, ++ goto err_free); ++ listener->conn_cb = params->conn_handler.cb; ++ listener->arg = params->conn_handler.arg; + } + + memset(&iface_params, 0, sizeof(iface_params)); +@@ -157,6 +244,13 @@ ucs_status_t ucp_listener_create(ucp_worker_h worker, + goto err_free; + } + ++ if ((context->config.features & UCP_FEATURE_WAKEUP) && ++ !(listener->wiface.attr.cap.flags & UCT_IFACE_FLAG_CB_ASYNC)) { ++ ucp_worker_iface_cleanup(&listener->wiface); ++ ucs_free(listener); ++ continue; ++ } ++ + ucs_trace("listener %p: accepting connections on %s", listener, + tl_md->rsc.md_name); + +@@ -167,13 +261,14 @@ ucs_status_t ucp_listener_create(ucp_worker_h worker, + + ucs_error("none of the available transports can listen for connections on %s", + ucs_sockaddr_str(params->sockaddr.addr, saddr_str, sizeof(saddr_str))); +- status = UCS_ERR_INVALID_ADDR; ++ status = UCS_ERR_UNREACHABLE; ++ goto out; + + err_free: + ucs_free(listener); + out: + UCS_ASYNC_UNBLOCK(&worker->async); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } + +@@ -187,3 +282,21 @@ void ucp_listener_destroy(ucp_listener_h listener) + ucp_worker_iface_cleanup(&listener->wiface); + ucs_free(listener); + } ++ ++ucs_status_t ucp_listener_reject(ucp_listener_h listener, ++ ucp_conn_request_h conn_request) ++{ ++ ucp_worker_h worker = listener->wiface.worker; ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); ++ UCS_ASYNC_BLOCK(&worker->async); ++ ++ uct_iface_reject(listener->wiface.iface, conn_request->uct_req); ++ ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); ++ ++ ucs_free(conn_request); ++ ++ return UCS_OK; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.h +index 6883f8b..8b8f33f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.h +@@ -9,28 +9,30 @@ + #define UCP_LISTENER_H_ + + #include "ucp_worker.h" ++#include "wireup/wireup_ep.h" + + + /** + * UCP listener + */ + typedef struct ucp_listener { +- ucp_worker_iface_t wiface; /* UCT iface to listen on */ +- ucp_listener_accept_callback_t cb; /* Listen accept callback */ +- void *arg; /* User's arg for the accept callback */ +- uct_worker_cb_id_t prog_id; /* Slow-path callback */ ++ ucp_worker_iface_t wiface; /* UCT iface to listen on */ ++ ucp_listener_accept_callback_t accept_cb; /* Listen accept callback ++ which creates an endpoint ++ */ ++ ucp_listener_conn_callback_t conn_cb; /* Listen callback which ++ creates a handle to ++ connection request to the ++ remote endpoint */ ++ void *arg; /* User's arg for the accept ++ callback */ ++ uct_worker_cb_id_t prog_id; /* Slow-path callback */ + } ucp_listener_t; + + +-/** +- * Accepted connection on a listener +- */ +-typedef struct ucp_listener_accept { +- ucp_listener_h listener; /* Listener on which the connection +- was accepted */ +- ucp_ep_h ep; /* New endpoint which was created +- for the connection */ +-} ucp_listener_accept_t; ++void ucp_listener_schedule_accept_cb(ucp_ep_h ep); + ++int ucp_listener_accept_cb_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.c +index d2e35b9..3d8ab41 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.c +@@ -37,12 +37,13 @@ ucs_status_t ucp_mem_rereg_mds(ucp_context_h context, ucp_md_map_t reg_md_map, + unsigned prev_num_memh; + unsigned md_index; + ucs_status_t status; ++ int level; + + if (reg_md_map == *md_map_p) { + return UCS_OK; /* shortcut - no changes required */ + } + +- prev_num_memh = ucs_count_one_bits(*md_map_p); ++ prev_num_memh = ucs_popcount(*md_map_p); + prev_uct_memh = ucs_alloca(prev_num_memh * sizeof(*prev_uct_memh)); + + /* Go over previous handles, save only the ones we will need */ +@@ -77,7 +78,7 @@ ucs_status_t ucp_mem_rereg_mds(ucp_context_h context, ucp_md_map_t reg_md_map, + } + + /* prev_uct_memh should contain the handles which should be reused */ +- ucs_assert(prev_memh_index == ucs_count_one_bits(*md_map_p & reg_md_map)); ++ ucs_assert(prev_memh_index == ucs_popcount(*md_map_p & reg_md_map)); + + /* Go over requested MD map, and use / register new handles */ + new_md_map = 0; +@@ -99,10 +100,12 @@ ucs_status_t ucp_mem_rereg_mds(ucp_context_h context, ucp_md_map_t reg_md_map, + status = uct_md_mem_reg(context->tl_mds[md_index].md, address, + length, uct_flags, &uct_memh[memh_index]); + if (status != UCS_OK) { +- ucs_error("failed to register address %p length %zu on md[%d]=%s: %s", +- address, length, md_index, +- context->tl_mds[md_index].rsc.md_name, +- ucs_status_string(status)); ++ level = (uct_flags & UCT_MD_MEM_FLAG_HIDE_ERRORS) ? ++ UCS_LOG_LEVEL_DEBUG : UCS_LOG_LEVEL_ERROR; ++ ucs_log(level, ++ "failed to register address %p length %zu on md[%d]=%s: %s", ++ address, length, md_index, context->tl_mds[md_index].rsc.md_name, ++ ucs_status_string(status)); + ucp_mem_rereg_mds(context, 0, NULL, 0, 0, alloc_md, mem_type, + alloc_md_memh_p, uct_memh, md_map_p); + return status; +@@ -221,16 +224,16 @@ ucp_mem_map_params2uct_flags(ucp_mem_map_params_t *params) + } + + /* Matrix of behavior +- * |-----------------------------------------------------------------------------| +- * | parameter | value | +- * |-----------|-----------------------------------------------------------------| +- * | ALLOCATE | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | +- * | FIXED | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | +- * | addr | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | +- * |-----------|-----|-----------|-----|-----|-----|-----------|-----|-----------| +- * | result | err | alloc/reg | err | reg | err | alloc/reg | err | alloc/reg | +- * | | | | | | | (hint) | | (fixed) | +- * |-----------------------------------------------------------------------------| ++ * |--------------------------------------------------------------------------------| ++ * | parameter | value | ++ * |-----------|--------------------------------------------------------------------| ++ * | ALLOCATE | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | ++ * | FIXED | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | ++ * | addr | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | ++ * |-----------|--------|-----------|-----|-----|-----|-----------|-----|-----------| ++ * | result | err if | alloc/reg | err | reg | err | alloc/reg | err | alloc/reg | ++ * | | len >0 | | | | | (hint) | | (fixed) | ++ * |--------------------------------------------------------------------------------| + */ + static inline ucs_status_t ucp_mem_map_check_and_adjust_params(ucp_mem_map_params_t *params) + { +@@ -260,8 +263,9 @@ static inline ucs_status_t ucp_mem_map_check_and_adjust_params(ucp_mem_map_param + + /* Now, lets check the rest of erroneous cases from the matrix */ + if (params->address == NULL) { +- if (!(params->flags & UCP_MEM_MAP_ALLOCATE)) { +- ucs_error("Undefined address requires UCP_MEM_MAP_ALLOCATE flag"); ++ if (!(params->flags & UCP_MEM_MAP_ALLOCATE) && (params->length > 0)) { ++ ucs_error("Undefined address with nonzero length requires " ++ "UCP_MEM_MAP_ALLOCATE flag"); + return UCS_ERR_INVALID_PARAM; + } + } else if (!(params->flags & UCP_MEM_MAP_ALLOCATE) && +@@ -417,6 +421,72 @@ out: + return status; + } + ++ucs_status_t ucp_mem_type_reg_buffers(ucp_worker_h worker, void *remote_addr, ++ size_t length, uct_memory_type_t mem_type, ++ unsigned md_index, uct_mem_h *memh, ++ ucp_md_map_t *md_map, ++ uct_rkey_bundle_t *rkey_bundle) ++{ ++ ucp_context_h context = worker->context; ++ uct_md_h md; ++ ucs_status_t status; ++ char *rkey_buffer; ++ ++ md = context->tl_mds[md_index].md; ++ ++ *memh = UCT_MEM_HANDLE_NULL; ++ status = ucp_mem_rereg_mds(context, UCS_BIT(md_index), remote_addr, length, ++ UCT_MD_MEM_ACCESS_ALL, NULL, mem_type, ++ NULL, memh, md_map); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ ++ if (context->tl_mds[md_index].attr.cap.flags & UCT_MD_FLAG_NEED_RKEY) { ++ rkey_buffer = ucs_alloca(context->tl_mds[md_index].attr.rkey_packed_size); ++ ++ status = uct_md_mkey_pack(md, memh[0], rkey_buffer); ++ if (status != UCS_OK) { ++ ucs_error("failed to pack key from md[%d]: %s", ++ md_index, ucs_status_string(status)); ++ goto err_dreg_mem; ++ } ++ ++ status = uct_rkey_unpack(rkey_buffer, rkey_bundle); ++ if (status != UCS_OK) { ++ ucs_error("failed to unpack key from md[%d]: %s", ++ md_index, ucs_status_string(status)); ++ goto err_dreg_mem; ++ } ++ } else { ++ rkey_bundle->handle = NULL; ++ rkey_bundle->rkey = UCT_INVALID_RKEY; ++ rkey_bundle->type = NULL; ++ } ++ ++ return UCS_OK; ++ ++err_dreg_mem: ++ ucp_mem_rereg_mds(context, 0, NULL, 0, 0, NULL, mem_type, NULL, ++ memh, md_map); ++err: ++ return status; ++} ++ ++void ucp_mem_type_unreg_buffers(ucp_worker_h worker, uct_memory_type_t mem_type, ++ uct_mem_h *memh, ucp_md_map_t *md_map, ++ uct_rkey_bundle_t *rkey_bundle) ++{ ++ ucp_context_h context = worker->context; ++ ++ if (rkey_bundle->rkey != UCT_INVALID_RKEY) { ++ uct_rkey_release(rkey_bundle); ++ } ++ ++ ucp_mem_rereg_mds(context, 0, NULL, 0, 0, NULL, mem_type, NULL, ++ memh, md_map); ++} ++ + ucs_status_t ucp_mem_query(const ucp_mem_h memh, ucp_mem_attr_t *attr) + { + if (attr->field_mask & UCP_MEM_ATTR_FIELD_ADDRESS) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.h +index 128c893..be2e1d4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.h +@@ -38,8 +38,11 @@ typedef struct ucp_rkey { + unsigned max_put_short;/* Cached value of max_put_short */ + uct_rkey_t rma_rkey; /* Key to use for RMAs */ + uct_rkey_t amo_rkey; /* Key to use for AMOs */ ++ ucp_amo_proto_t *amo_proto; /* Protocol for AMOs */ ++ ucp_rma_proto_t *rma_proto; /* Protocol for RMAs */ + } cache; + ucp_md_map_t md_map; /* Which *remote* MDs have valid memory handles */ ++ uct_memory_type_t mem_type;/* Memory type of remote key memory */ + uct_rkey_bundle_t uct[0]; /* Remote key for every MD */ + } ucp_rkey_t; + +@@ -73,6 +76,7 @@ typedef struct ucp_mem_desc { + void ucp_rkey_resolve_inner(ucp_rkey_h rkey, ucp_ep_h ep); + + ucp_lane_index_t ucp_rkey_get_rma_bw_lane(ucp_rkey_h rkey, ucp_ep_h ep, ++ uct_memory_type_t mem_type, + uct_rkey_t *uct_rkey_p, + ucp_lane_map_t ignore); + +@@ -119,18 +123,29 @@ ucs_status_t ucp_mem_rereg_mds(ucp_context_h context, ucp_md_map_t reg_md_map, + size_t ucp_rkey_packed_size(ucp_context_h context, ucp_md_map_t md_map); + + void ucp_rkey_packed_copy(ucp_context_h context, ucp_md_map_t md_map, +- void *rkey_buffer, const void* uct_rkeys[]); ++ uct_memory_type_t mem_type, void *rkey_buffer, ++ const void* uct_rkeys[]); + + ssize_t ucp_rkey_pack_uct(ucp_context_h context, ucp_md_map_t md_map, +- const uct_mem_h *memh, void *rkey_buffer); ++ const uct_mem_h *memh, uct_memory_type_t mem_type, ++ void *rkey_buffer); + + void ucp_rkey_dump_packed(const void *rkey_buffer, char *buffer, size_t max); + ++ucs_status_t ucp_mem_type_reg_buffers(ucp_worker_h worker, void *remote_addr, ++ size_t length, uct_memory_type_t mem_type, ++ unsigned md_index, uct_mem_h *memh, ++ ucp_md_map_t *md_map, ++ uct_rkey_bundle_t *rkey_bundle); ++ ++void ucp_mem_type_unreg_buffers(ucp_worker_h worker, uct_memory_type_t mem_type, ++ uct_mem_h *memh, ucp_md_map_t *md_map, ++ uct_rkey_bundle_t *rkey_bundle); + + static UCS_F_ALWAYS_INLINE ucp_md_index_t + ucp_memh_map2idx(ucp_md_map_t md_map, ucp_md_index_t md_idx) + { +- return ucs_count_one_bits(md_map & UCS_MASK(md_idx)); ++ return ucs_popcount(md_map & UCS_MASK(md_idx)); + } + + static UCS_F_ALWAYS_INLINE uct_mem_h +@@ -165,5 +180,6 @@ ucp_memh2uct(ucp_mem_h memh, ucp_md_index_t md_idx) + }) + + #define UCP_MEM_IS_HOST(_mem_type) ((_mem_type) == UCT_MD_MEM_TYPE_HOST) ++#define UCP_MEM_IS_CUDA_MANAGED(_mem_type) ((_mem_type) == UCT_MD_MEM_TYPE_CUDA_MANAGED) + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.c +index 169d655..cdb62da 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.c +@@ -68,22 +68,18 @@ UCP_PROXY_EP_DEFINE_OP(ssize_t, am_bcopy, uint8_t, uct_pack_callback_t, void*, + unsigned) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, am_zcopy, uint8_t, const void*, unsigned, + const uct_iov_t*, size_t, unsigned, uct_completion_t*) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_add64, uint64_t, uint64_t, +- uct_rkey_t) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_fadd64, uint64_t, uint64_t, +- uct_rkey_t, uint64_t*, uct_completion_t*) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_swap64, uint64_t, uint64_t, +- uct_rkey_t, uint64_t*, uct_completion_t*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_cswap64, uint64_t, uint64_t, + uint64_t, uct_rkey_t, uint64_t*, uct_completion_t*) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_add32, uint32_t, uint64_t, +- uct_rkey_t) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_fadd32, uint32_t, uint64_t, +- uct_rkey_t, uint32_t*, uct_completion_t*) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_swap32, uint32_t, uint64_t, +- uct_rkey_t, uint32_t*, uct_completion_t*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_cswap32, uint32_t, uint32_t, + uint64_t, uct_rkey_t, uint32_t*, uct_completion_t*) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic64_post, uct_atomic_op_t, ++ uint64_t, uint64_t, uct_rkey_t) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic32_post, uct_atomic_op_t, ++ uint32_t, uint64_t, uct_rkey_t) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic64_fetch, uct_atomic_op_t, uint64_t, ++ uint64_t*, uint64_t, uct_rkey_t, uct_completion_t*) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic32_fetch, uct_atomic_op_t, uint32_t, ++ uint32_t*, uint64_t, uct_rkey_t, uct_completion_t*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, tag_eager_short, uct_tag_t, const void*, + size_t) + UCP_PROXY_EP_DEFINE_OP(ssize_t, tag_eager_bcopy, uct_tag_t, uint64_t, +@@ -96,7 +92,7 @@ UCP_PROXY_EP_DEFINE_OP(ucs_status_ptr_t, tag_rndv_zcopy, uct_tag_t, const void*, + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, tag_rndv_cancel, void*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, tag_rndv_request, uct_tag_t, const void*, + unsigned, unsigned) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, pending_add, uct_pending_req_t*) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, pending_add, uct_pending_req_t*, unsigned) + UCP_PROXY_EP_DEFINE_OP(void, pending_purge, uct_pending_purge_callback_t, void*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, flush, unsigned, uct_completion_t*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, fence, unsigned) +@@ -133,14 +129,12 @@ UCS_CLASS_INIT_FUNC(ucp_proxy_ep_t, const uct_iface_ops_t *ops, ucp_ep_h ucp_ep, + UCP_PROXY_EP_SET_OP(ep_am_short); + UCP_PROXY_EP_SET_OP(ep_am_bcopy); + UCP_PROXY_EP_SET_OP(ep_am_zcopy); +- UCP_PROXY_EP_SET_OP(ep_atomic_add64); +- UCP_PROXY_EP_SET_OP(ep_atomic_fadd64); +- UCP_PROXY_EP_SET_OP(ep_atomic_swap64); + UCP_PROXY_EP_SET_OP(ep_atomic_cswap64); +- UCP_PROXY_EP_SET_OP(ep_atomic_add32); +- UCP_PROXY_EP_SET_OP(ep_atomic_fadd32); +- UCP_PROXY_EP_SET_OP(ep_atomic_swap32); + UCP_PROXY_EP_SET_OP(ep_atomic_cswap32); ++ UCP_PROXY_EP_SET_OP(ep_atomic64_post); ++ UCP_PROXY_EP_SET_OP(ep_atomic32_post); ++ UCP_PROXY_EP_SET_OP(ep_atomic64_fetch); ++ UCP_PROXY_EP_SET_OP(ep_atomic32_fetch); + UCP_PROXY_EP_SET_OP(ep_tag_eager_short); + UCP_PROXY_EP_SET_OP(ep_tag_eager_bcopy); + UCP_PROXY_EP_SET_OP(ep_tag_eager_zcopy); +@@ -183,20 +177,59 @@ static UCS_CLASS_CLEANUP_FUNC(ucp_proxy_ep_t) + } + } + ++int ucp_proxy_ep_test(uct_ep_h uct_ep) ++{ ++ return uct_ep->iface->ops.ep_destroy == ucp_proxy_ep_destroy; ++} ++ ++uct_ep_h ucp_proxy_ep_extract(uct_ep_h ep) ++{ ++ ucp_proxy_ep_t *proxy_ep = ucs_derived_of(ep, ucp_proxy_ep_t); ++ uct_ep_h uct_ep; ++ ++ uct_ep = proxy_ep->uct_ep; ++ proxy_ep->uct_ep = NULL; ++ return uct_ep; ++} ++ ++static void ucp_proxy_ep_replace_if_owned(uct_ep_h uct_ep, uct_ep_h owned_ep, ++ uct_ep_h replacement_ep) ++{ ++ ucp_proxy_ep_t *proxy_ep; ++ ++ if (ucp_proxy_ep_test(uct_ep)) { ++ proxy_ep = ucs_derived_of(uct_ep, ucp_proxy_ep_t); ++ if (proxy_ep->uct_ep == owned_ep) { ++ proxy_ep->uct_ep = replacement_ep; ++ } ++ ucs_assert(replacement_ep != NULL); ++ } ++} ++ + void ucp_proxy_ep_replace(ucp_proxy_ep_t *proxy_ep) + { + ucp_ep_h ucp_ep = proxy_ep->ucp_ep; + ucp_lane_index_t lane; ++ uct_ep_h tl_ep = NULL; + + ucs_assert(proxy_ep->uct_ep != NULL); + for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { + if (ucp_ep->uct_eps[lane] == &proxy_ep->super) { ++ ucs_assert(proxy_ep->uct_ep != NULL); /* make sure there is only one match */ + ucp_ep->uct_eps[lane] = proxy_ep->uct_ep; ++ tl_ep = ucp_ep->uct_eps[lane]; + proxy_ep->uct_ep = NULL; +- break; + } + } + ++ /* go through the lanes and check if the proxy ep that is being destroyed, ++ * is pointed to by another proxy ep. if so, redirect that other proxy ep ++ * to point to the underlying uct ep. */ ++ for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { ++ ucp_proxy_ep_replace_if_owned(ucp_ep->uct_eps[lane], &proxy_ep->super, ++ tl_ep); ++ } ++ + uct_ep_destroy(&proxy_ep->super); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.h +index a23b4d8..fe15d32 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.h +@@ -42,6 +42,10 @@ UCS_CLASS_DECLARE(ucp_proxy_ep_t, const uct_iface_ops_t *ops, ucp_ep_h ucp_ep, + */ + void ucp_proxy_ep_replace(ucp_proxy_ep_t *proxy_ep); + ++int ucp_proxy_ep_test(uct_ep_h ep); ++ ++uct_ep_h ucp_proxy_ep_extract(uct_ep_h ep); ++ + void ucp_proxy_ep_set_uct_ep(ucp_proxy_ep_t *proxy_ep, uct_ep_h uct_ep, + int is_owner); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.c +index f42deaa..f6b3b1b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.c +@@ -66,7 +66,7 @@ ucp_request_release_common(void *request, uint8_t cb_flag, const char *debug_nam + ucp_worker_t, req_mp); + uint16_t flags; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + flags = req->flags; + ucs_trace_req("%s request %p (%p) "UCP_REQUEST_FLAGS_FMT, debug_name, +@@ -81,7 +81,7 @@ ucp_request_release_common(void *request, uint8_t cb_flag, const char *debug_nam + req->flags = (flags | UCP_REQUEST_FLAG_RELEASED) & ~cb_flag; + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + } + + UCS_PROFILE_FUNC_VOID(ucp_request_release, (request), void *request) +@@ -106,7 +106,7 @@ UCS_PROFILE_FUNC_VOID(ucp_request_cancel, (worker, request), + } + + if (req->flags & UCP_REQUEST_FLAG_EXPECTED) { +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + ucp_tag_exp_remove(&worker->tm, req); + /* If tag posted to the transport need to wait its completion */ +@@ -114,7 +114,7 @@ UCS_PROFILE_FUNC_VOID(ucp_request_cancel, (worker, request), + ucp_request_complete_tag_recv(req, UCS_ERR_CANCELED); + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + } + } + +@@ -163,7 +163,7 @@ int ucp_request_pending_add(ucp_request_t *req, ucs_status_t *req_status) + ucs_debug_get_symbol_name(req->send.uct.func)); + + uct_ep = req->send.ep->uct_eps[req->send.lane]; +- status = uct_ep_pending_add(uct_ep, &req->send.uct); ++ status = uct_ep_pending_add(uct_ep, &req->send.uct, 0); + if (status == UCS_OK) { + ucs_trace_data("ep %p: added pending uct request %p to lane[%d]=%p", + req->send.ep, req, req->send.lane, uct_ep); +@@ -195,26 +195,29 @@ static void ucp_request_dt_dereg(ucp_context_t *context, ucp_dt_reg_t *dt_reg, + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_request_memory_reg, +- (context, md_map, buffer, length, datatype, state, req_dbg), ++ (context, md_map, buffer, length, datatype, state, mem_type, req_dbg, uct_flags), + ucp_context_t *context, ucp_md_map_t md_map, void *buffer, + size_t length, ucp_datatype_t datatype, ucp_dt_state_t *state, +- ucp_request_t *req_dbg) ++ uct_memory_type_t mem_type, ucp_request_t *req_dbg, unsigned uct_flags) + { + size_t iov_it, iovcnt; + const ucp_dt_iov_t *iov; + ucp_dt_reg_t *dt_reg; + ucs_status_t status; ++ int flags; ++ int level; + + ucs_trace_func("context=%p md_map=0x%lx buffer=%p length=%zu datatype=0x%lu " + "state=%p", context, md_map, buffer, length, datatype, state); + + status = UCS_OK; ++ flags = UCT_MD_MEM_ACCESS_RMA | uct_flags; + switch (datatype & UCP_DATATYPE_CLASS_MASK) { + case UCP_DATATYPE_CONTIG: +- ucs_assert(ucs_count_one_bits(md_map) <= UCP_MAX_OP_MDS); +- status = ucp_mem_rereg_mds(context, md_map, buffer, length, +- UCT_MD_MEM_ACCESS_RMA, NULL, UCT_MD_MEM_TYPE_HOST, NULL, +- state->dt.contig.memh, &state->dt.contig.md_map); ++ ucs_assert(ucs_popcount(md_map) <= UCP_MAX_OP_MDS); ++ status = ucp_mem_rereg_mds(context, md_map, buffer, length, flags, ++ NULL, mem_type, NULL, state->dt.contig.memh, ++ &state->dt.contig.md_map); + ucp_trace_req(req_dbg, "mem reg md_map 0x%"PRIx64"/0x%"PRIx64, + state->dt.contig.md_map, md_map); + break; +@@ -230,10 +233,8 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_request_memory_reg, + dt_reg[iov_it].md_map = 0; + if (iov[iov_it].length) { + status = ucp_mem_rereg_mds(context, md_map, iov[iov_it].buffer, +- iov[iov_it].length, +- UCT_MD_MEM_ACCESS_RMA, NULL, +- UCT_MD_MEM_TYPE_HOST, NULL, +- dt_reg[iov_it].memh, ++ iov[iov_it].length, flags, NULL, ++ mem_type, NULL, dt_reg[iov_it].memh, + &dt_reg[iov_it].md_map); + if (status != UCS_OK) { + /* unregister previously registered memory */ +@@ -255,8 +256,11 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_request_memory_reg, + + err: + if (status != UCS_OK) { +- ucs_error("failed to register user buffer datatype 0x%lx address %p len %zu:" +- " %s", datatype, buffer, length, ucs_status_string(status)); ++ level = (flags & UCT_MD_MEM_FLAG_HIDE_ERRORS) ? ++ UCS_LOG_LEVEL_DEBUG : UCS_LOG_LEVEL_ERROR; ++ ucs_log(level, ++ "failed to register user buffer datatype 0x%lx address %p len %zu:" ++ " %s", datatype, buffer, length, ucs_status_string(status)); + } + return status; + } +@@ -302,11 +306,13 @@ ucs_status_t ucp_request_test(void *request, ucp_tag_recv_info_t *info) + + ucs_status_t + ucp_request_send_start(ucp_request_t *req, ssize_t max_short, +- size_t zcopy_thresh, size_t seg_size, +- size_t zcopy_max, const ucp_proto_t *proto) ++ size_t zcopy_thresh, size_t zcopy_max, size_t dt_count, ++ const ucp_ep_msg_config_t* msg_config, ++ const ucp_proto_t *proto) + { + size_t length = req->send.length; + ucs_status_t status; ++ int multi; + + if ((ssize_t)length <= max_short) { + /* short */ +@@ -316,13 +322,13 @@ ucp_request_send_start(ucp_request_t *req, ssize_t max_short, + } else if (length < zcopy_thresh) { + /* bcopy */ + ucp_request_send_state_reset(req, NULL, UCP_REQUEST_SEND_PROTO_BCOPY_AM); +- if (length < seg_size) { ++ if (length <= msg_config->max_bcopy - proto->only_hdr_size) { + req->send.uct.func = proto->bcopy_single; + UCS_PROFILE_REQUEST_EVENT(req, "start_bcopy_single", req->send.length); + } else { + req->send.uct.func = proto->bcopy_multi; + req->send.tag.message_id = req->send.ep->worker->tm.am.message_id++; +- req->send.tag.am_bw_index = 0; ++ req->send.tag.am_bw_index = 1; + req->send.pending_lane = UCP_NULL_LANE; + UCS_PROFILE_REQUEST_EVENT(req, "start_bcopy_multi", req->send.length); + } +@@ -336,15 +342,28 @@ ucp_request_send_start(ucp_request_t *req, ssize_t max_short, + return status; + } + +- if (length < seg_size) { +- req->send.uct.func = proto->zcopy_single; +- UCS_PROFILE_REQUEST_EVENT(req, "start_zcopy_single", req->send.length); ++ if (ucs_unlikely(length > msg_config->max_zcopy - proto->only_hdr_size)) { ++ multi = 1; ++ } else if (ucs_unlikely(UCP_DT_IS_IOV(req->send.datatype))) { ++ if (dt_count <= msg_config->max_iov) { ++ multi = 0; ++ } else { ++ multi = ucp_dt_iov_count_nonempty(req->send.buffer, dt_count) > ++ msg_config->max_iov; ++ } + } else { ++ multi = 0; ++ } ++ ++ if (multi) { + req->send.uct.func = proto->zcopy_multi; + req->send.tag.message_id = req->send.ep->worker->tm.am.message_id++; +- req->send.tag.am_bw_index = 0; ++ req->send.tag.am_bw_index = 1; + req->send.pending_lane = UCP_NULL_LANE; + UCS_PROFILE_REQUEST_EVENT(req, "start_zcopy_multi", req->send.length); ++ } else { ++ req->send.uct.func = proto->zcopy_single; ++ UCS_PROFILE_REQUEST_EVENT(req, "start_zcopy_single", req->send.length); + } + return UCS_OK; + } +@@ -352,3 +371,13 @@ ucp_request_send_start(ucp_request_t *req, ssize_t max_short, + return UCS_ERR_NO_PROGRESS; + } + ++void ucp_request_send_state_ff(ucp_request_t *req, ucs_status_t status) ++{ ++ if (req->send.state.uct_comp.func) { ++ req->send.state.dt.offset = req->send.length; ++ req->send.state.uct_comp.count = 0; ++ req->send.state.uct_comp.func(&req->send.state.uct_comp, status); ++ } else { ++ ucp_request_complete_send(req, status); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.h +index 71be525..1e0da8e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.h +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + + +@@ -38,9 +39,10 @@ enum { + UCP_REQUEST_FLAG_SYNC = UCS_BIT(8), + UCP_REQUEST_FLAG_OFFLOADED = UCS_BIT(10), + UCP_REQUEST_FLAG_BLOCK_OFFLOAD = UCS_BIT(11), +- UCP_REQUEST_FLAG_STREAM_RECV = UCS_BIT(13), ++ UCP_REQUEST_FLAG_STREAM_RECV_WAITALL = UCS_BIT(12), + + #if ENABLE_ASSERT ++ UCP_REQUEST_FLAG_STREAM_RECV = UCS_BIT(14), + UCP_REQUEST_DEBUG_FLAG_EXTERNAL = UCS_BIT(15) + #else + UCP_REQUEST_DEBUG_FLAG_EXTERNAL = 0 +@@ -90,9 +92,12 @@ struct ucp_request { + uint16_t flags; /* Request flags */ + + union { ++ ++ /* "send" part - used for tag_send, stream_send, put, get, and atomic ++ * operations */ + struct { + ucp_ep_h ep; +- const void *buffer; /* Send buffer */ ++ void *buffer; /* Send buffer */ + ucp_datatype_t datatype; /* Send type */ + size_t length; /* Total length, in bytes */ + uct_memory_type_t mem_type; /* Memory type */ +@@ -107,6 +112,8 @@ struct ucp_request { + ucp_tag_t tag; + uint64_t message_id; /* message ID used in AM */ + ucp_lane_index_t am_bw_index; /* AM BW lane index */ ++ uintptr_t rreq_ptr; /* receive request ptr on the ++ recv side (used in AM rndv) */ + } tag; + + struct { +@@ -118,7 +125,6 @@ struct ucp_request { + uintptr_t remote_request; /* pointer to the send request on receiver side */ + uint8_t am_id; + ucs_status_t status; +- uint64_t sender_uuid; /* Sender uuid, which is sent back in sync ack */ + ucp_tag_t sender_tag; /* Sender tag, which is sent back in sync ack */ + ucp_request_callback_t comp_cb; /* Called to complete the request */ + } proto; +@@ -146,20 +152,21 @@ struct ucp_request { + } rndv_put; + + struct { +- uintptr_t rreq_ptr; /* receive request ptr on the recv side */ +- } rndv_data; +- +- struct { + uintptr_t remote_request; /* pointer to the send request on receiver side */ + ucp_request_t *rreq; + } rndv_rtr; + + struct { + ucp_request_callback_t flushed_cb;/* Called when flushed */ ++ ucp_request_t *worker_req; ++ ucs_queue_elem_t queue; /* Queue element in proto_status */ ++ unsigned uct_flags; /* Flags to pass to @ref uct_ep_flush */ + uct_worker_cb_id_t prog_id; /* Progress callback ID */ ++ uint32_t cmpl_sn; /* Sequence number of the remote completion ++ this request is waiting for */ ++ uint8_t sw_started; ++ uint8_t sw_done; + ucp_lane_map_t lanes; /* Which lanes need to be flushed */ +- unsigned uct_flags; /* Flags to pass to +- @ref uct_ep_flush */ + } flush; + + struct { +@@ -168,10 +175,9 @@ struct ucp_request { + + struct { + uint64_t remote_addr; /* Remote address */ +- ucp_atomic_fetch_op_t op; /* Requested AMO */ +- ucp_rkey_h rkey; /* Remote memory key */ +- uint64_t value; +- void *result; ++ ucp_rkey_h rkey; /* Remote memory key */ ++ uint64_t value; /* Atomic argument */ ++ uct_atomic_op_t uct_op; /* Requested UCT AMO */ + } amo; + + struct { +@@ -179,7 +185,16 @@ struct ucp_request { + ucp_tag_t ssend_tag; /* Tag in offload sync send */ + void *rndv_op; /* Handler of issued rndv send. Need to cancel + the operation if it is completed by SW. */ +- } tag_offload; ++ } tag_offload; ++ ++ struct { ++ uintptr_t req; /* Remote get request pointer */ ++ } get_reply; ++ ++ struct { ++ uintptr_t req; /* Remote atomic request pointer */ ++ ucp_atomic_reply_t data; /* Atomic reply data */ ++ } atomic_reply; + }; + + /* This structure holds all mutable fields, and everything else +@@ -198,6 +213,7 @@ struct ucp_request { + ucp_mem_desc_t *mdesc; + } send; + ++ /* "receive" part - used for tag_recv and stream_recv operations */ + struct { + ucs_queue_elem_t queue; /* Expected queue element */ + void *buffer; /* Buffer to receive data to */ +@@ -234,13 +250,27 @@ struct ucp_request { + ucp_worker_h worker; /* Worker to flush */ + ucp_send_callback_t cb; /* Completion callback */ + uct_worker_cb_id_t prog_id; /* Progress callback ID */ ++ int comp_count; /* Countdown to request completion */ ++ ucp_ep_ext_gen_t *next_ep; /* Next endpoint to flush */ + } flush_worker; + }; + }; + + + /** +- * Unexpected receive descriptor. ++ * Unexpected receive descriptor. If it is initialized in the headroom of UCT ++ * descriptor, the layout looks like the following: ++ * ++ * ++ * headroom data ++ * |-------------------------------------------|-------------------------| ++ * | unused | ucp_recv_desc | priv_length | | ++ * | | | | | ++ * |-------------------------------------------|-------------------------| ++ * ++ * Some protocols (i. e. tag offload) may need some space right before the ++ * incoming data to add specific headers needed for further message processing. ++ * Note: priv_length value should be in [0, UCP_WORKER_HEADROOM_PRIV_SIZE] range. + */ + struct ucp_recv_desc { + union { +@@ -252,6 +282,11 @@ struct ucp_recv_desc { + uint32_t payload_offset; /* Offset from end of the descriptor + * to AM data */ + uint16_t flags; /* Flags */ ++ int16_t priv_length; /* Number of bytes consumed from ++ headroom private space, except the ++ space needed for ucp_recv_desc itself. ++ It is used for releasing descriptor ++ back to UCT only */ + }; + + +@@ -263,13 +298,19 @@ int ucp_request_pending_add(ucp_request_t *req, ucs_status_t *req_status); + + ucs_status_t ucp_request_memory_reg(ucp_context_t *context, ucp_md_map_t md_map, + void *buffer, size_t length, ucp_datatype_t datatype, +- ucp_dt_state_t *state, ucp_request_t *req_dbg); ++ ucp_dt_state_t *state, uct_memory_type_t mem_type, ++ ucp_request_t *req_dbg, unsigned uct_flags); + + void ucp_request_memory_dereg(ucp_context_t *context, ucp_datatype_t datatype, + ucp_dt_state_t *state, ucp_request_t *req_dbg); + + ucs_status_t ucp_request_send_start(ucp_request_t *req, ssize_t max_short, +- size_t zcopy_thresh, size_t multi_thresh, +- size_t rndv_thresh, const ucp_proto_t *proto); ++ size_t zcopy_thresh, size_t zcopy_max, ++ size_t dt_count, ++ const ucp_ep_msg_config_t* msg_config, ++ const ucp_proto_t *proto); ++ ++/* Fast-forward to data end */ ++void ucp_request_send_state_ff(ucp_request_t *req, ucs_status_t status); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.inl +index 4b58545..e73621c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.inl +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -13,7 +13,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +@@ -110,13 +110,12 @@ ucp_request_complete_tag_recv(ucp_request_t *req, ucs_status_t status) + } + + static UCS_F_ALWAYS_INLINE void +-ucp_request_complete_stream_recv(ucp_request_t *req, +- ucp_ep_ext_stream_t* ep_stream, ++ucp_request_complete_stream_recv(ucp_request_t *req, ucp_ep_ext_proto_t* ep_ext, + ucs_status_t status) + { + /* dequeue request before complete */ + ucp_request_t *check_req UCS_V_UNUSED = +- ucs_queue_pull_elem_non_empty(&ep_stream->match_q, ucp_request_t, ++ ucs_queue_pull_elem_non_empty(&ep_ext->stream.match_q, ucp_request_t, + recv.queue); + ucs_assert(check_req == req); + ucs_assert(req->recv.stream.offset > 0); +@@ -139,6 +138,10 @@ ucp_request_can_complete_stream_recv(ucp_request_t *req) + return 1; + } + ++ if (req->flags & UCP_REQUEST_FLAG_STREAM_RECV_WAITALL) { ++ return 0; ++ } ++ + /* 0-length stream recv is meaningless if this was not requested explicitely */ + if (req->recv.stream.offset == 0) { + return 0; +@@ -334,25 +337,13 @@ ucp_request_send_state_advance(ucp_request_t *req, + (req->send.state.dt.offset <= req->send.length)); + } + +-/* Fast-forward to data end */ +-static UCS_F_ALWAYS_INLINE void +-ucp_request_send_state_ff(ucp_request_t *req, ucs_status_t status) +-{ +- if (req->send.state.uct_comp.func) { +- req->send.state.dt.offset = req->send.length; +- req->send.state.uct_comp.count = 0; +- req->send.state.uct_comp.func(&req->send.state.uct_comp, status); +- } else { +- ucp_request_complete_send(req, status); +- } +-} +- + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_request_send_buffer_reg(ucp_request_t *req, ucp_md_map_t md_map) + { + return ucp_request_memory_reg(req->send.ep->worker->context, md_map, + (void*)req->send.buffer, req->send.length, +- req->send.datatype, &req->send.state.dt, req); ++ req->send.datatype, &req->send.state.dt, ++ req->send.mem_type, req, 0); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +@@ -368,16 +359,18 @@ ucp_send_request_add_reg_lane(ucp_request_t *req, ucp_lane_index_t lane) + /* add new lane to registration map */ + ucp_md_map_t md_map = UCS_BIT(ucp_ep_md_index(req->send.ep, lane)) | + req->send.state.dt.dt.contig.md_map; +- ucs_assert(ucs_count_one_bits(md_map) <= UCP_MAX_OP_MDS); ++ ucs_assert(ucs_popcount(md_map) <= UCP_MAX_OP_MDS); + return ucp_request_send_buffer_reg(req, md_map); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_request_recv_buffer_reg(ucp_request_t *req, ucp_md_map_t md_map) ++ucp_request_recv_buffer_reg(ucp_request_t *req, ucp_md_map_t md_map, ++ size_t length) + { + return ucp_request_memory_reg(req->recv.worker->context, md_map, +- req->recv.buffer, req->recv.length, +- req->recv.datatype, &req->recv.state, req); ++ req->recv.buffer, length, ++ req->recv.datatype, &req->recv.state, ++ req->recv.mem_type, req, 0); + } + + static UCS_F_ALWAYS_INLINE void ucp_request_send_buffer_dereg(ucp_request_t *req) +@@ -435,7 +428,8 @@ ucp_request_recv_data_unpack(ucp_request_t *req, const void *data, + + switch (req->recv.datatype & UCP_DATATYPE_CLASS_MASK) { + case UCP_DATATYPE_CONTIG: +- if (ucs_likely(UCP_MEM_IS_HOST(req->recv.mem_type))) { ++ if ((ucs_likely(UCP_MEM_IS_HOST(req->recv.mem_type))) || ++ (ucs_likely(UCP_MEM_IS_CUDA_MANAGED(req->recv.mem_type)))) { + UCS_PROFILE_NAMED_CALL("memcpy_recv", memcpy, req->recv.buffer + offset, + data, length); + } else { +@@ -477,17 +471,22 @@ ucp_request_recv_data_unpack(ucp_request_t *req, const void *data, + + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_recv_desc_init(ucp_worker_h worker, void *data, size_t length, +- unsigned am_flags, uint16_t hdr_len, uint16_t rdesc_flags, ++ int data_offset, unsigned am_flags, uint16_t hdr_len, ++ uint16_t rdesc_flags, uint16_t priv_length, + ucp_recv_desc_t **rdesc_p) + { + ucp_recv_desc_t *rdesc; ++ void *data_hdr; + ucs_status_t status; + + if (ucs_unlikely(am_flags & UCT_CB_PARAM_FLAG_DESC)) { + /* slowpath */ +- rdesc = (ucp_recv_desc_t *)data - 1; +- rdesc->flags = rdesc_flags | UCP_RECV_DESC_FLAG_UCT_DESC; +- status = UCS_INPROGRESS; ++ ucs_assert(priv_length <= UCP_WORKER_HEADROOM_PRIV_SIZE); ++ data_hdr = UCS_PTR_BYTE_OFFSET(data, -data_offset); ++ rdesc = (ucp_recv_desc_t *)data_hdr - 1; ++ rdesc->flags = rdesc_flags | UCP_RECV_DESC_FLAG_UCT_DESC; ++ rdesc->priv_length = priv_length; ++ status = UCS_INPROGRESS; + } else { + rdesc = (ucp_recv_desc_t*)ucs_mpool_get_inline(&worker->am_mp); + if (rdesc == NULL) { +@@ -495,17 +494,34 @@ ucp_recv_desc_init(ucp_worker_h worker, void *data, size_t length, + return UCS_ERR_NO_MEMORY; + } + ++ /* No need to initialize rdesc->priv_length here, because it is only ++ * needed for releasing UCT descriptor. */ ++ + rdesc->flags = rdesc_flags; +- memcpy(rdesc + 1, data, length); +- status = UCS_OK; ++ status = UCS_OK; ++ memcpy(UCS_PTR_BYTE_OFFSET(rdesc + 1, data_offset), data, length); + } + +- rdesc->length = length; ++ rdesc->length = length + data_offset; + rdesc->payload_offset = hdr_len; + *rdesc_p = rdesc; + return status; + } + ++static UCS_F_ALWAYS_INLINE void ++ucp_recv_desc_release(ucp_recv_desc_t *rdesc) ++{ ++ ucs_trace_req("release receive descriptor %p", rdesc); ++ if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_UCT_DESC)) { ++ /* uct desc is slowpath */ ++ uct_iface_release_desc(UCS_PTR_BYTE_OFFSET(rdesc, ++ -(UCP_WORKER_HEADROOM_PRIV_SIZE - ++ rdesc->priv_length))); ++ } else { ++ ucs_mpool_put_inline(rdesc); ++ } ++} ++ + static UCS_F_ALWAYS_INLINE ucp_lane_index_t + ucp_send_request_get_next_am_bw_lane(ucp_request_t *req) + { +@@ -526,4 +542,13 @@ ucp_send_request_get_next_am_bw_lane(ucp_request_t *req) + } + } + ++static UCS_F_ALWAYS_INLINE uintptr_t ucp_request_get_dest_ep_ptr(ucp_request_t *req) ++{ ++ /* This function may return 0, but in such cases the message should not be ++ * sent at all because the am_lane would point to a wireup (proxy) endpoint. ++ * So only the receiver side has an assertion that ep_ptr != 0. ++ */ ++ return ucp_ep_dest_ep_ptr(req->send.ep); ++} ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_rkey.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_rkey.c +index 126031b..98caba4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_rkey.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_rkey.c +@@ -8,16 +8,15 @@ + #include "ucp_request.h" + #include "ucp_ep.inl" + ++#include + #include + #include + + +-static ucp_rkey_t ucp_mem_dummy_rkey = { +- // TODO cache? +- .md_map = 0 +-}; +- +-static ucp_md_map_t ucp_mem_dummy_buffer = 0; ++static struct { ++ ucp_md_map_t md_map; ++ uint8_t mem_type; ++} UCS_S_PACKED ucp_mem_dummy_buffer = {0, UCT_MD_MEM_TYPE_HOST}; + + + size_t ucp_rkey_packed_size(ucp_context_h context, ucp_md_map_t md_map) +@@ -26,6 +25,7 @@ size_t ucp_rkey_packed_size(ucp_context_h context, ucp_md_map_t md_map) + unsigned md_index; + + size = sizeof(ucp_md_map_t); ++ size += sizeof(uint8_t); + ucs_for_each_bit (md_index, md_map) { + md_size = context->tl_mds[md_index].attr.rkey_packed_size; + ucs_assert_always(md_size <= UINT8_MAX); +@@ -35,7 +35,8 @@ size_t ucp_rkey_packed_size(ucp_context_h context, ucp_md_map_t md_map) + } + + void ucp_rkey_packed_copy(ucp_context_h context, ucp_md_map_t md_map, +- void *rkey_buffer, const void* uct_rkeys[]) ++ uct_memory_type_t mem_type, void *rkey_buffer, ++ const void* uct_rkeys[]) + { + void *p = rkey_buffer; + unsigned md_index; +@@ -44,6 +45,8 @@ void ucp_rkey_packed_copy(ucp_context_h context, ucp_md_map_t md_map, + *(ucp_md_map_t*)p = md_map; + p += sizeof(ucp_md_map_t); + ++ *((uint8_t *)p++) = mem_type; ++ + ucs_for_each_bit(md_index, md_map) { + md_size = context->tl_mds[md_index].attr.rkey_packed_size; + ucs_assert_always(md_size <= UINT8_MAX); +@@ -55,7 +58,8 @@ void ucp_rkey_packed_copy(ucp_context_h context, ucp_md_map_t md_map, + } + + ssize_t ucp_rkey_pack_uct(ucp_context_h context, ucp_md_map_t md_map, +- const uct_mem_h *memh, void *rkey_buffer) ++ const uct_mem_h *memh, uct_memory_type_t mem_type, ++ void *rkey_buffer) + { + void *p = rkey_buffer; + ucs_status_t status = UCS_OK; +@@ -70,6 +74,10 @@ ssize_t ucp_rkey_pack_uct(ucp_context_h context, ucp_md_map_t md_map, + *(ucp_md_map_t*)p = md_map; + p += sizeof(ucp_md_map_t); + ++ /* Write memory type */ ++ UCS_STATIC_ASSERT(UCT_MD_MEM_TYPE_LAST <= 255); ++ *((uint8_t*)p++) = mem_type; ++ + /* Write both size and rkey_buffer for each UCT rkey */ + uct_memh_index = 0; + ucs_for_each_bit (md_index, md_map) { +@@ -100,6 +108,9 @@ ucs_status_t ucp_rkey_pack(ucp_context_h context, ucp_mem_h memh, + ssize_t packed_size; + size_t size; + ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(context, UCP_FEATURE_RMA | UCP_FEATURE_AMO, ++ return UCS_ERR_INVALID_PARAM); ++ + /* always acquire context lock */ + UCP_THREAD_CS_ENTER(&context->mt_lock); + +@@ -123,7 +134,8 @@ ucs_status_t ucp_rkey_pack(ucp_context_h context, ucp_mem_h memh, + + p = rkey_buffer; + +- packed_size = ucp_rkey_pack_uct(context, memh->md_map, memh->uct, p); ++ packed_size = ucp_rkey_pack_uct(context, memh->md_map, memh->uct, ++ memh->mem_type, p); + if (packed_size < 0) { + status = (ucs_status_t)packed_size; + goto err_destroy; +@@ -162,6 +174,7 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + unsigned md_count; + ucs_status_t status; + ucp_rkey_h rkey; ++ uct_memory_type_t mem_type; + uint8_t md_size; + const void *p; + +@@ -173,14 +186,8 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + ucs_trace("unpacking rkey with md_map 0x%lx", remote_md_map); + + /* MD map for the unpacked rkey */ +- md_map = remote_md_map & ucp_ep_config(ep)->key.reachable_md_map; +- if (md_map == 0) { +- /* Dummy key return ok */ +- *rkey_p = &ucp_mem_dummy_rkey; +- return UCS_OK; +- } +- +- md_count = ucs_count_one_bits(md_map); ++ md_map = remote_md_map & ucp_ep_config(ep)->key.reachable_md_map; ++ md_count = ucs_popcount(md_map); + p += sizeof(ucp_md_map_t); + + /* Allocate rkey handle which holds UCT rkeys for all remote MDs. Small key +@@ -200,7 +207,11 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + goto err; + } + ++ /* Read memory type */ ++ mem_type = *((uint8_t*)p++); ++ + rkey->md_map = md_map; ++ rkey->mem_type = mem_type; + + /* Unpack rkey of each UCT MD */ + remote_md_index = 0; /* Index of remote MD */ +@@ -221,23 +232,26 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + ucs_assert(rkey_index < md_count); + + status = uct_rkey_unpack(p, &rkey->uct[rkey_index]); +- if (status != UCS_OK) { ++ ++ if (status == UCS_OK) { ++ ucs_trace("rkey[%d] for remote md %d is 0x%lx", rkey_index, ++ remote_md_index, rkey->uct[rkey_index].rkey); ++ rkey->md_map |= UCS_BIT(remote_md_index); ++ ++rkey_index; ++ } else if (status == UCS_ERR_UNREACHABLE) { ++ rkey->md_map &= ~UCS_BIT(remote_md_index); ++ ucs_trace("rkey[%d] for remote md %d is 0x%lx not reachable", rkey_index, ++ remote_md_index, rkey->uct[rkey_index].rkey); ++ } else { + ucs_error("Failed to unpack remote key from remote md[%d]: %s", + remote_md_index, ucs_status_string(status)); + goto err_destroy; + } +- +- ucs_trace("rkey[%d] for remote md %d is 0x%lx", rkey_index, +- remote_md_index, rkey->uct[rkey_index].rkey); +- rkey->md_map |= UCS_BIT(remote_md_index); +- ++rkey_index; + } + + p += md_size; + } + +- ucs_assert(rkey_index == md_count); +- + ucp_rkey_resolve_inner(rkey, ep); + *rkey_p = rkey; + return UCS_OK; +@@ -263,6 +277,8 @@ void ucp_rkey_dump_packed(const void *rkey_buffer, char *buffer, size_t max) + md_map = *(ucp_md_map_t*)(rkey_buffer); + rkey_buffer += sizeof(ucp_md_map_t); + ++ rkey_buffer += sizeof(uint8_t); ++ + first = 1; + ucs_for_each_bit(md_index, md_map) { + md_size = *((uint8_t*)rkey_buffer); +@@ -293,11 +309,7 @@ ucs_status_t ucp_rkey_ptr(ucp_rkey_h rkey, uint64_t raddr, void **addr_p) + unsigned i; + ucs_status_t status; + +- if (rkey == &ucp_mem_dummy_rkey) { +- return UCS_ERR_UNREACHABLE; +- } +- +- num_rkeys = ucs_count_one_bits(rkey->md_map); ++ num_rkeys = ucs_popcount(rkey->md_map); + + for (i = 0; i < num_rkeys; ++i) { + status = uct_rkey_ptr(&rkey->uct[i], raddr, addr_p); +@@ -316,17 +328,13 @@ void ucp_rkey_destroy(ucp_rkey_h rkey) + unsigned num_rkeys; + unsigned i; + +- if (rkey == &ucp_mem_dummy_rkey) { +- return; +- } +- +- num_rkeys = ucs_count_one_bits(rkey->md_map); ++ num_rkeys = ucs_popcount(rkey->md_map); + + for (i = 0; i < num_rkeys; ++i) { + uct_rkey_release(&rkey->uct[i]); + } + +- if (ucs_count_one_bits(rkey->md_map) <= UCP_RKEY_MPOOL_MAX_MD) { ++ if (ucs_popcount(rkey->md_map) <= UCP_RKEY_MPOOL_MAX_MD) { + context = ucs_container_of(ucs_mpool_obj_owner(rkey), ucp_context_t, + rkey_mp); + UCP_THREAD_CS_ENTER_CONDITIONAL(&context->mt_lock); +@@ -339,6 +347,7 @@ void ucp_rkey_destroy(ucp_rkey_h rkey) + + static ucp_lane_index_t ucp_config_find_rma_lane(ucp_context_h context, + const ucp_ep_config_t *config, ++ uct_memory_type_t mem_type, + const ucp_lane_index_t *lanes, + ucp_rkey_h rkey, + ucp_lane_map_t ignore, +@@ -348,6 +357,7 @@ static ucp_lane_index_t ucp_config_find_rma_lane(ucp_context_h context, + ucp_lane_index_t lane; + ucp_md_map_t dst_md_mask; + ucp_md_index_t md_index; ++ uct_md_attr_t *md_attr; + uint8_t rkey_index; + int prio; + +@@ -360,19 +370,29 @@ static ucp_lane_index_t ucp_config_find_rma_lane(ucp_context_h context, + } + + md_index = config->md_index[lane]; ++ md_attr = &context->tl_mds[md_index].attr; ++ + if ((md_index != UCP_NULL_RESOURCE) && +- (!(context->tl_mds[md_index].attr.cap.flags & UCT_MD_FLAG_NEED_RKEY))) ++ (!(md_attr->cap.flags & UCT_MD_FLAG_NEED_RKEY))) + { + /* Lane does not need rkey, can use the lane with invalid rkey */ +- *uct_rkey_p = UCT_INVALID_RKEY; +- return lane; ++ if (!rkey || ((mem_type == md_attr->cap.mem_type) && ++ (mem_type == rkey->mem_type))) { ++ *uct_rkey_p = UCT_INVALID_RKEY; ++ return lane; ++ } ++ } ++ ++ if ((md_index != UCP_NULL_RESOURCE) && ++ (!(md_attr->cap.reg_mem_types & UCS_BIT(mem_type)))) { ++ continue; + } + + dst_md_index = config->key.lanes[lane].dst_md_index; + dst_md_mask = UCS_BIT(dst_md_index); + if (rkey->md_map & dst_md_mask) { + /* Return first matching lane */ +- rkey_index = ucs_count_one_bits(rkey->md_map & (dst_md_mask - 1)); ++ rkey_index = ucs_popcount(rkey->md_map & (dst_md_mask - 1)); + *uct_rkey_p = rkey->uct[rkey_index].rkey; + return lane; + } +@@ -385,34 +405,75 @@ void ucp_rkey_resolve_inner(ucp_rkey_h rkey, ucp_ep_h ep) + { + ucp_context_h context = ep->worker->context; + ucp_ep_config_t *config = ucp_ep_config(ep); ++ ucs_status_t status; + uct_rkey_t uct_rkey; ++ int rma_sw, amo_sw; + + rkey->cache.rma_lane = ucp_config_find_rma_lane(context, config, ++ UCT_MD_MEM_TYPE_HOST, + config->key.rma_lanes, rkey, + 0, &uct_rkey); +- if (rkey->cache.rma_lane != UCP_NULL_LANE) { ++ rma_sw = (rkey->cache.rma_lane == UCP_NULL_LANE); ++ if (rma_sw) { ++ rkey->cache.rma_proto = &ucp_rma_sw_proto; ++ rkey->cache.rma_rkey = UCT_INVALID_RKEY; ++ rkey->cache.max_put_short = 0; ++ } else { ++ rkey->cache.rma_proto = &ucp_rma_basic_proto; + rkey->cache.rma_rkey = uct_rkey; ++ rkey->cache.rma_proto = &ucp_rma_basic_proto; + rkey->cache.max_put_short = config->rma[rkey->cache.rma_lane].max_put_short; + } + + rkey->cache.amo_lane = ucp_config_find_rma_lane(context, config, ++ UCT_MD_MEM_TYPE_HOST, + config->key.amo_lanes, rkey, + 0, &uct_rkey); +- if (rkey->cache.amo_lane != UCP_NULL_LANE) { ++ amo_sw = (rkey->cache.amo_lane == UCP_NULL_LANE); ++ if (amo_sw) { ++ rkey->cache.amo_proto = &ucp_amo_sw_proto; ++ rkey->cache.amo_rkey = UCT_INVALID_RKEY; ++ } else { ++ rkey->cache.amo_proto = &ucp_amo_basic_proto; + rkey->cache.amo_rkey = uct_rkey; + } + ++ /* If we use sw rma/amo need to resolve destination endpoint in order to ++ * receive responses and completion messages ++ */ ++ if ((amo_sw || rma_sw) && (config->key.am_lane != UCP_NULL_LANE)) { ++ status = ucp_ep_resolve_dest_ep_ptr(ep, config->key.am_lane); ++ if (status != UCS_OK) { ++ ucs_debug("ep %p: failed to resolve destination ep, " ++ "sw rma cannot be used", ep); ++ } else { ++ /* if we can resolve destination ep, save the active message lane ++ * as the rma/amo lane in the rkey cache ++ */ ++ if (amo_sw) { ++ rkey->cache.amo_lane = config->key.am_lane; ++ } ++ if (rma_sw) { ++ rkey->cache.rma_lane = config->key.am_lane; ++ } ++ } ++ } ++ + rkey->cache.ep_cfg_index = ep->cfg_index; +- ucs_trace("rkey %p ep %p @ cfg[%d] rma_lane %d amo_lane %d", rkey, ep, +- ep->cfg_index, rkey->cache.rma_lane, rkey->cache.amo_lane); ++ ++ ucs_trace("rkey %p ep %p @ cfg[%d] %s lane %d %s lane %d", ++ rkey, ep, ep->cfg_index, ++ rkey->cache.rma_proto->name, rkey->cache.rma_lane, ++ rkey->cache.amo_proto->name, rkey->cache.amo_lane); + } + + ucp_lane_index_t ucp_rkey_get_rma_bw_lane(ucp_rkey_h rkey, ucp_ep_h ep, ++ uct_memory_type_t mem_type, + uct_rkey_t *uct_rkey_p, + ucp_lane_map_t ignore) + { + ucp_ep_config_t *config = ucp_ep_config(ep); +- return ucp_config_find_rma_lane(ep->worker->context, config, ++ return ucp_config_find_rma_lane(ep->worker->context, config, mem_type, + config->key.rma_bw_lanes, rkey, + ignore, uct_rkey_p); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_thread.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_thread.h +index 0bc22f1..e5510bd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_thread.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_thread.h +@@ -11,6 +11,8 @@ + # include "config.h" + #endif + ++#include ++#include + #include + + +@@ -98,4 +100,14 @@ typedef struct ucp_mt_lock { + } \ + } + ++ ++#ifdef ENABLE_ASSERT ++ ++/* Debug macro */ ++#define UCP_THREAD_CS_IS_RECURSIVELY_LOCKED(_lock_ptr) \ ++ (((_lock_ptr)->mt_type == UCP_MT_TYPE_MUTEX) ? 0 : \ ++ ucs_spin_is_owner(&((_lock_ptr)->lock.mt_spinlock), pthread_self())) ++ ++#endif ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_types.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_types.h +index 853cdf6..ae13821 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_types.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_types.h +@@ -15,6 +15,7 @@ + + #define UCP_WORKER_NAME_MAX 32 /* Worker name for debugging */ + #define UCP_MIN_BCOPY 64 /* Minimal size for bcopy */ ++#define UCP_FEATURE_AMO (UCP_FEATURE_AMO32|UCP_FEATURE_AMO64) + + /* Resources */ + #define UCP_MAX_RESOURCES UINT8_MAX +@@ -26,24 +27,29 @@ typedef uint8_t ucp_rsc_index_t; + #define UCP_MD_INDEX_BITS 64 /* How many bits are in MD index */ + typedef ucp_rsc_index_t ucp_md_index_t; + #define UCP_MAX_MDS ucs_min(UCP_MD_INDEX_BITS, UCP_MAX_RESOURCES) +-#define UCP_MAX_OP_MDS 3 /* maximal number of MDs per single op */ ++#define UCP_MAX_OP_MDS 4 /* maximal number of MDs per single op */ + UCP_UINT_TYPE(UCP_MD_INDEX_BITS) ucp_md_map_t; + + /* Lanes */ +-#define UCP_MAX_LANES 8 ++#define UCP_MAX_LANES 6 + #define UCP_NULL_LANE ((ucp_lane_index_t)-1) + typedef uint8_t ucp_lane_index_t; +-UCP_UINT_TYPE(UCP_MAX_LANES) ucp_lane_map_t; ++typedef uint8_t ucp_lane_map_t; + ++/* Connection sequence number */ ++typedef uint16_t ucp_ep_conn_sn_t; + + /* Forward declarations */ + typedef struct ucp_request ucp_request_t; + typedef struct ucp_recv_desc ucp_recv_desc_t; + typedef struct ucp_address_iface_attr ucp_address_iface_attr_t; + typedef struct ucp_address_entry ucp_address_entry_t; ++typedef struct ucp_unpacked_address ucp_unpacked_address_t; + typedef struct ucp_wireup_ep ucp_wireup_ep_t; + typedef struct ucp_proto ucp_proto_t; + typedef struct ucp_worker_iface ucp_worker_iface_t; ++typedef struct ucp_rma_proto ucp_rma_proto_t; ++typedef struct ucp_amo_proto ucp_amo_proto_t; + + + /** +@@ -72,6 +78,13 @@ enum { + + UCP_AM_ID_RNDV_ATP = 16, /* Ack-to-put complete after finishing a put_zcopy */ + ++ UCP_AM_ID_PUT = 17, /* Remote memory write */ ++ UCP_AM_ID_GET_REQ = 18, /* Remote memory read request */ ++ UCP_AM_ID_GET_REP = 19, /* Remote memory read reply */ ++ UCP_AM_ID_ATOMIC_REQ = 20, /* Remote memory atomic request */ ++ UCP_AM_ID_ATOMIC_REP = 21, /* Remote memory atomic reply */ ++ UCP_AM_ID_CMPL = 22, /* Remote memory operation completion */ ++ + UCP_AM_ID_LAST + }; + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.c +index 9bdf66f..d94ed3b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -21,6 +22,11 @@ + #include + #include + ++ ++#define UCP_WORKER_HEADROOM_SIZE \ ++ (sizeof(ucp_recv_desc_t) + UCP_WORKER_HEADROOM_PRIV_SIZE) ++ ++ + #if ENABLE_STATS + static ucs_stats_class_t ucp_worker_stats_class = { + .name = "ucp_worker", +@@ -128,7 +134,7 @@ static void ucp_worker_set_am_handlers(ucp_worker_iface_t *wiface, int is_proxy) + continue; + } + +- if ((ucp_am_handlers[am_id].flags & UCT_CB_FLAG_SYNC) && ++ if (!(ucp_am_handlers[am_id].flags & UCT_CB_FLAG_ASYNC) && + !(wiface->attr.cap.flags & UCT_IFACE_FLAG_CB_SYNC)) + { + /* Do not register a sync callback on interface which does not +@@ -142,7 +148,7 @@ static void ucp_worker_set_am_handlers(ucp_worker_iface_t *wiface, int is_proxy) + /* we care only about sync active messages, and this also makes sure + * the counter is not accessed from another thread. + */ +- ucs_assert(ucp_am_handlers[am_id].flags & UCT_CB_FLAG_SYNC); ++ ucs_assert(!(ucp_am_handlers[am_id].flags & UCT_CB_FLAG_ASYNC)); + status = uct_iface_set_am_handler(wiface->iface, am_id, + ucp_am_handlers[am_id].proxy_cb, + wiface, +@@ -341,41 +347,23 @@ void ucp_worker_signal_internal(ucp_worker_h worker) + } + } + +-static ucs_status_t +-ucp_worker_iface_error_handler(void *arg, uct_ep_h uct_ep, ucs_status_t status) ++static unsigned ucp_worker_iface_err_handle_progress(void *arg) + { +- ucp_worker_h worker = (ucp_worker_h)arg; +- ucp_ep_h ucp_ep = NULL; +- uct_tl_resource_desc_t* tl_rsc; +- uint64_t dest_uuid UCS_V_UNUSED; +- khiter_t ucp_ep_errh_iter; +- ucp_err_handler_cb_t err_cb; +- ucp_lane_index_t lane, failed_lane; +- ucp_rsc_index_t rsc_index; ++ ucp_worker_err_handle_arg_t *err_handle_arg = arg; ++ ucp_worker_h worker = err_handle_arg->worker; ++ ucp_ep_h ucp_ep = err_handle_arg->ucp_ep; ++ uct_ep_h uct_ep = err_handle_arg->uct_ep; ++ ucs_status_t status = err_handle_arg->status; ++ ucp_lane_index_t failed_lane = err_handle_arg->failed_lane; ++ ucp_lane_index_t lane; ++ ucp_ep_config_key_t key; + +- /* TODO: need to optimize uct_ep -> ucp_ep lookup */ +- kh_foreach(&worker->ep_hash, dest_uuid, ucp_ep, { +- for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { +- if ((uct_ep == ucp_ep->uct_eps[lane]) || +- ucp_wireup_ep_is_owner(ucp_ep->uct_eps[lane], uct_ep)) { +- failed_lane = lane; +- goto found_ucp_ep; +- } +- } +- }); ++ UCS_ASYNC_BLOCK(&worker->async); + +- ucs_fatal("no uct_ep_h %p associated with ucp_ep_h on ucp_worker_h %p", +- uct_ep, worker); ++ ucs_debug("ep %p: handle error on lane[%d]=%p: %s", ++ ucp_ep, failed_lane, uct_ep, ucs_status_string(status)); + +-found_ucp_ep: +- if (ucp_ep_config(ucp_ep)->key.err_mode == UCP_ERR_HANDLING_MODE_NONE) { +- /* NOTE: if user has not requested error handling on the endpoint, +- * the failure is considered unhandled */ +- return status; +- } +- +- rsc_index = ucp_ep_get_rsc_index(ucp_ep, lane); +- tl_rsc = &worker->context->tl_rscs[rsc_index].tl_rsc; ++ ucs_assert(ucp_ep->flags & UCP_EP_FLAG_FAILED); + + /* Destroy all lanes except failed one since ucp_ep becomes unusable as well */ + for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { +@@ -398,7 +386,7 @@ found_ucp_ep: + } + + /* Move failed lane to index 0 */ +- if (failed_lane != 0) { ++ if ((failed_lane != 0) && (failed_lane != UCP_NULL_LANE)) { + ucp_ep->uct_eps[0] = ucp_ep->uct_eps[failed_lane]; + ucp_ep->uct_eps[failed_lane] = NULL; + } +@@ -415,7 +403,7 @@ found_ucp_ep: + } + + /* Redirect all lanes to failed one */ +- ucp_ep_config_key_t key = ucp_ep_config(ucp_ep)->key; ++ key = ucp_ep_config(ucp_ep)->key; + key.am_lane = 0; + key.wireup_lane = 0; + key.tag_lane = 0; +@@ -427,23 +415,137 @@ found_ucp_ep: + key.status = status; + + ucp_ep->cfg_index = ucp_worker_get_ep_config(worker, &key); +- ucp_ep->flags |= UCP_EP_FLAG_FAILED; + ucp_ep->am_lane = 0; + +- ucp_ep_errh_iter = kh_get(ucp_ep_errh_hash, &worker->ep_errh_hash, +- (uintptr_t)ucp_ep); +- if (ucp_ep_errh_iter == kh_end(&worker->ep_errh_hash)) { +- ucs_error("Error %s was not handled for ep %p - " +- UCT_TL_RESOURCE_DESC_FMT, +- ucs_status_string(status), ucp_ep, +- UCT_TL_RESOURCE_DESC_ARG(tl_rsc)); +- return status; ++ if (ucp_ep_ext_gen(ucp_ep)->err_cb != NULL) { ++ ucs_assert(ucp_ep->flags & UCP_EP_FLAG_USED); ++ ucs_debug("ep %p: calling user error callback %p with arg %p", ucp_ep, ++ ucp_ep_ext_gen(ucp_ep)->err_cb, ucp_ep_ext_gen(ucp_ep)->user_data); ++ ucp_ep_ext_gen(ucp_ep)->err_cb(ucp_ep_ext_gen(ucp_ep)->user_data, ucp_ep, ++ status); ++ } else if (!(ucp_ep->flags & UCP_EP_FLAG_USED)) { ++ ucs_debug("ep %p: destroy internal endpoint due to peer failure", ucp_ep); ++ ucp_ep_disconnected(ucp_ep, 1); + } + +- err_cb = kh_val(&worker->ep_errh_hash, ucp_ep_errh_iter); +- err_cb(ucp_ep->user_data, ucp_ep, status); ++ ucs_free(err_handle_arg); ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ return 1; ++} ++ ++int ucp_worker_err_handle_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg) ++{ ++ ucp_worker_err_handle_arg_t *err_handle_arg = elem->arg; + +- return UCS_OK; ++ return (elem->cb == ucp_worker_iface_err_handle_progress) && ++ (err_handle_arg->ucp_ep == arg); ++} ++ ++ucs_status_t ucp_worker_set_ep_failed(ucp_worker_h worker, ucp_ep_h ucp_ep, ++ uct_ep_h uct_ep, ucp_lane_index_t lane, ++ ucs_status_t status) ++{ ++ uct_worker_cb_id_t prog_id = UCS_CALLBACKQ_ID_NULL; ++ ucs_status_t ret_status = UCS_OK; ++ ucp_rsc_index_t rsc_index; ++ uct_tl_resource_desc_t *tl_rsc; ++ ucp_worker_err_handle_arg_t *err_handle_arg; ++ ++ if (ucp_ep->flags & UCP_EP_FLAG_FAILED) { ++ goto out_ok; ++ } ++ ++ /* set endpoint to failed to prevent wireup_ep switch */ ++ ucp_ep->flags |= UCP_EP_FLAG_FAILED; ++ ++ if (ucp_ep_config(ucp_ep)->key.err_mode == UCP_ERR_HANDLING_MODE_NONE) { ++ /* NOTE: if user has not requested error handling on the endpoint, ++ * the failure is considered unhandled */ ++ ret_status = status; ++ goto out; ++ } ++ ++ err_handle_arg = ucs_malloc(sizeof(*err_handle_arg), "ucp_worker_err_handle_arg"); ++ if (err_handle_arg == NULL) { ++ ucs_error("failed to allocate ucp_worker_err_handle_arg"); ++ ret_status = UCS_ERR_NO_MEMORY; ++ goto out; ++ } ++ ++ err_handle_arg->worker = worker; ++ err_handle_arg->ucp_ep = ucp_ep; ++ err_handle_arg->uct_ep = uct_ep; ++ err_handle_arg->status = status; ++ err_handle_arg->failed_lane = lane; ++ ++ /* invoke the rest of the error handling flow from the main thread */ ++ uct_worker_progress_register_safe(worker->uct, ++ ucp_worker_iface_err_handle_progress, ++ err_handle_arg, UCS_CALLBACKQ_FLAG_ONESHOT, ++ &prog_id); ++ ++ if ((ucp_ep_ext_gen(ucp_ep)->err_cb == NULL) && ++ (ucp_ep->flags & UCP_EP_FLAG_USED)) { ++ if (lane != UCP_NULL_LANE) { ++ rsc_index = ucp_ep_get_rsc_index(ucp_ep, lane); ++ tl_rsc = &worker->context->tl_rscs[rsc_index].tl_rsc; ++ ucs_error("error '%s' will not be handled for ep %p - " ++ UCT_TL_RESOURCE_DESC_FMT, ucs_status_string(status), ucp_ep, ++ UCT_TL_RESOURCE_DESC_ARG(tl_rsc)); ++ } else { ++ ucs_assert(uct_ep == NULL); ++ ucs_error("error '%s' occurred on wireup will not be handled for ep %p", ++ ucs_status_string(status), ucp_ep); ++ } ++ ret_status = status; ++ goto out; ++ } ++ ++out_ok: ++ ret_status = UCS_OK; ++ ++out: ++ /* If the worker supports the UCP_FEATURE_WAKEUP feature, signal the user so ++ * that he can wake-up on this event */ ++ ucp_worker_signal_internal(worker); ++ ++ return ret_status; ++} ++ ++static ucs_status_t ++ucp_worker_iface_error_handler(void *arg, uct_ep_h uct_ep, ucs_status_t status) ++{ ++ ucp_worker_h worker = (ucp_worker_h)arg; ++ ucp_lane_index_t lane; ++ ucs_status_t ret_status; ++ ucp_ep_ext_gen_t *ep_ext; ++ ucp_ep_h ucp_ep; ++ ++ UCS_ASYNC_BLOCK(&worker->async); ++ ++ ucs_debug("worker %p: error handler called for uct_ep %p: %s", ++ worker, uct_ep, ucs_status_string(status)); ++ ++ /* TODO: need to optimize uct_ep -> ucp_ep lookup */ ++ ucs_list_for_each(ep_ext, &worker->all_eps, ep_list) { ++ ucp_ep = ucp_ep_from_ext_gen(ep_ext); ++ for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { ++ if ((uct_ep == ucp_ep->uct_eps[lane]) || ++ ucp_wireup_ep_is_owner(ucp_ep->uct_eps[lane], uct_ep)) { ++ ret_status = ucp_worker_set_ep_failed(worker, ucp_ep, uct_ep, ++ lane, status); ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ return ret_status; ++ } ++ } ++ } ++ ++ ucs_error("no uct_ep_h %p associated with ucp_ep_h on ucp_worker_h %p", ++ uct_ep, worker); ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ ++ return UCS_ERR_NO_ELEM; + } + + void ucp_worker_iface_activate(ucp_worker_iface_t *wiface, unsigned uct_flags) +@@ -451,8 +553,8 @@ void ucp_worker_iface_activate(ucp_worker_iface_t *wiface, unsigned uct_flags) + ucp_worker_h worker = wiface->worker; + ucs_status_t status; + +- ucs_trace("activate iface %p acount=%u", wiface->iface, +- wiface->activate_count); ++ ucs_trace("activate iface %p acount=%u aifaces=%u", wiface->iface, ++ wiface->activate_count, worker->num_active_ifaces); + + if (wiface->activate_count++ > 0) { + return; /* was already activated */ +@@ -472,20 +574,24 @@ void ucp_worker_iface_activate(ucp_worker_iface_t *wiface, unsigned uct_flags) + ucs_list_add_tail(&worker->arm_ifaces, &wiface->arm_list); + } + ++ ++worker->num_active_ifaces; ++ + uct_iface_progress_enable(wiface->iface, + UCT_PROGRESS_SEND | UCT_PROGRESS_RECV | uct_flags); + } + + static void ucp_worker_iface_deactivate(ucp_worker_iface_t *wiface, int force) + { +- ucs_trace("deactivate iface %p force=%d acount=%u", wiface->iface, force, +- wiface->activate_count); ++ ucs_trace("deactivate iface %p force=%d acount=%u aifaces=%u", ++ wiface->iface, force, wiface->activate_count, ++ wiface->worker->num_active_ifaces); + + if (!force) { + ucs_assert(wiface->activate_count > 0); + if (--wiface->activate_count > 0) { + return; /* not completely deactivated yet */ + } ++ --wiface->worker->num_active_ifaces; + } + + /* Avoid progress on the interface to reduce overhead */ +@@ -693,11 +799,6 @@ static void ucp_worker_close_ifaces(ucp_worker_h worker) + UCS_ASYNC_UNBLOCK(&worker->async); + } + +-static size_t ucp_worker_rx_headroom(ucp_worker_h worker) +-{ +- return sizeof(ucp_recv_desc_t) + sizeof(ucp_eager_sync_hdr_t); +-} +- + ucs_status_t ucp_worker_iface_init(ucp_worker_h worker, ucp_rsc_index_t tl_id, + uct_iface_params_t *iface_params, + ucp_worker_iface_t *wiface) +@@ -729,15 +830,18 @@ ucs_status_t ucp_worker_iface_init(ucp_worker_h worker, ucp_rsc_index_t tl_id, + return status; + } + ++ UCS_STATIC_ASSERT(UCP_WORKER_HEADROOM_PRIV_SIZE >= sizeof(ucp_eager_sync_hdr_t)); ++ + /* Fill rest of uct_iface params (caller should fill specific mode fields) */ +- iface_params->stats_root = UCS_STATS_RVAL(worker->stats); +- iface_params->rx_headroom = ucp_worker_rx_headroom(worker); +- iface_params->err_handler_arg = worker; +- iface_params->err_handler = ucp_worker_iface_error_handler; +- iface_params->eager_arg = iface_params->rndv_arg = wiface; +- iface_params->eager_cb = ucp_tag_offload_unexp_eager; +- iface_params->rndv_cb = ucp_tag_offload_unexp_rndv; +- iface_params->cpu_mask = worker->cpu_mask; ++ iface_params->stats_root = UCS_STATS_RVAL(worker->stats); ++ iface_params->rx_headroom = UCP_WORKER_HEADROOM_SIZE; ++ iface_params->err_handler_arg = worker; ++ iface_params->err_handler = ucp_worker_iface_error_handler; ++ iface_params->err_handler_flags = UCT_CB_FLAG_ASYNC; ++ iface_params->eager_arg = iface_params->rndv_arg = wiface; ++ iface_params->eager_cb = ucp_tag_offload_unexp_eager; ++ iface_params->rndv_cb = ucp_tag_offload_unexp_rndv; ++ iface_params->cpu_mask = worker->cpu_mask; + + /* Open UCT interface */ + status = uct_iface_open(md, worker->uct, iface_params, iface_config, +@@ -749,8 +853,8 @@ ucs_status_t ucp_worker_iface_init(ucp_worker_h worker, ucp_rsc_index_t tl_id, + } + + ucs_debug("created interface[%d]=%p using "UCT_TL_RESOURCE_DESC_FMT" on worker %p", +- tl_id, wiface->iface, UCT_TL_RESOURCE_DESC_ARG(&resource->tl_rsc), +- worker); ++ tl_id, wiface->iface, UCT_TL_RESOURCE_DESC_ARG(&resource->tl_rsc), ++ worker); + + VALGRIND_MAKE_MEM_UNDEFINED(&wiface->attr, sizeof(wiface->attr)); + status = uct_iface_query(wiface->iface, &wiface->attr); +@@ -842,6 +946,8 @@ static void ucp_worker_init_cpu_atomics(ucp_worker_h worker) + ucp_context_h context = worker->context; + ucp_rsc_index_t rsc_index; + ++ ucs_debug("worker %p: using cpu atomics", worker); ++ + /* Enable all interfaces which have host-based atomics */ + for (rsc_index = 0; rsc_index < context->num_tls; ++rsc_index) { + if (worker->ifaces[rsc_index].attr.cap.flags & UCT_IFACE_FLAG_ATOMIC_CPU) { +@@ -863,9 +969,11 @@ static void ucp_worker_init_device_atomics(ucp_worker_h worker) + uct_md_attr_t *md_attr; + uint64_t supp_tls; + uint8_t priority, best_priority; ++ ucp_tl_iface_atomic_flags_t atomic; ++ ++ ucp_context_uct_atomic_iface_flags(context, &atomic); + +- iface_cap_flags = ucp_context_uct_atomic_iface_flags(context) | +- UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ iface_cap_flags = UCT_IFACE_FLAG_ATOMIC_DEVICE; + + dummy_iface_attr.bandwidth = 1e12; + dummy_iface_attr.cap_flags = -1; +@@ -886,7 +994,11 @@ static void ucp_worker_init_device_atomics(ucp_worker_h worker) + iface_attr = &worker->ifaces[rsc_index].attr; + + if (!(md_attr->cap.flags & UCT_MD_FLAG_REG) || +- !ucs_test_all_flags(iface_attr->cap.flags, iface_cap_flags)) ++ !ucs_test_all_flags(iface_attr->cap.flags, iface_cap_flags) || ++ !ucs_test_all_flags(iface_attr->cap.atomic32.op_flags, atomic.atomic32.op_flags) || ++ !ucs_test_all_flags(iface_attr->cap.atomic32.fop_flags, atomic.atomic32.fop_flags) || ++ !ucs_test_all_flags(iface_attr->cap.atomic64.op_flags, atomic.atomic64.op_flags) || ++ !ucs_test_all_flags(iface_attr->cap.atomic64.fop_flags, atomic.atomic64.fop_flags)) + { + continue; + } +@@ -910,6 +1022,8 @@ static void ucp_worker_init_device_atomics(ucp_worker_h worker) + return; + } + ++ ucs_debug("worker %p: using device atomics", worker); ++ + /* Enable atomics on all resources using same device as the "best" resource */ + for (rsc_index = 0; rsc_index < context->num_tls; ++rsc_index) { + rsc = &context->tl_rscs[rsc_index]; +@@ -946,7 +1060,7 @@ static void ucp_worker_init_atomic_tls(ucp_worker_h worker) + + worker->atomic_tls = 0; + +- if (context->config.features & (UCP_FEATURE_AMO32|UCP_FEATURE_AMO64)) { ++ if (context->config.features & UCP_FEATURE_AMO) { + switch(context->config.ext.atomic_mode) { + case UCP_ATOMIC_MODE_CPU: + ucp_worker_init_cpu_atomics(worker); +@@ -966,7 +1080,6 @@ static void ucp_worker_init_atomic_tls(ucp_worker_h worker) + + static ucs_status_t ucp_worker_init_mpools(ucp_worker_h worker) + { +- size_t rx_headroom = ucp_worker_rx_headroom(worker); + size_t max_mp_entry_size = 0; + ucp_context_t *context = worker->context; + uct_iface_attr_t *if_attr; +@@ -984,7 +1097,7 @@ static ucs_status_t ucp_worker_init_mpools(ucp_worker_h worker) + } + + status = ucs_mpool_init(&worker->am_mp, 0, +- max_mp_entry_size + rx_headroom, ++ max_mp_entry_size + UCP_WORKER_HEADROOM_SIZE, + 0, UCS_SYS_CACHE_LINE_SIZE, 128, UINT_MAX, + &ucp_am_mpool_ops, "ucp_am_bufs"); + if (status != UCS_OK) { +@@ -1000,9 +1113,9 @@ static ucs_status_t ucp_worker_init_mpools(ucp_worker_h worker) + } + + status = ucs_mpool_init(&worker->rndv_frag_mp, 0, +- context->config.ext.rndv_frag_size, +- 0, UCS_SYS_CACHE_LINE_SIZE, 128, UINT_MAX, +- &ucp_frag_mpool_ops, "ucp_rndv_frags"); ++ context->config.ext.rndv_frag_size + sizeof(ucp_mem_desc_t), ++ sizeof(ucp_mem_desc_t), UCS_SYS_CACHE_LINE_SIZE, 128, ++ UINT_MAX, &ucp_frag_mpool_ops, "ucp_rndv_frags"); + if (status != UCS_OK) { + goto err_release_reg_mpool; + } +@@ -1057,11 +1170,12 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + const ucp_worker_params_t *params, + ucp_worker_h *worker_p) + { +- ucp_worker_h worker; +- ucs_status_t status; ++ ucs_thread_mode_t uct_thread_mode; ++ ucs_thread_mode_t thread_mode; + unsigned config_count; + unsigned name_length; +- ucs_thread_mode_t thread_mode; ++ ucp_worker_h worker; ++ ucs_status_t status; + + config_count = ucs_min((context->num_tls + 1) * (context->num_tls + 1) * context->num_tls, + UINT8_MAX); +@@ -1074,7 +1188,14 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + } + + if (params->field_mask & UCP_WORKER_PARAM_FIELD_THREAD_MODE) { ++#if !ENABLE_MT ++ thread_mode = UCS_THREAD_MODE_SINGLE; ++ if (params->thread_mode != UCS_THREAD_MODE_SINGLE) { ++ ucs_debug("forced single thread mode on worker create"); ++ } ++#else + thread_mode = params->thread_mode; ++#endif + } else { + thread_mode = UCS_THREAD_MODE_SINGLE; + } +@@ -1087,17 +1208,35 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + worker->mt_lock.mt_type = UCP_MT_TYPE_SPINLOCK; + } + ++ if (thread_mode == UCS_THREAD_MODE_SINGLE) { ++ uct_thread_mode = UCS_THREAD_MODE_SINGLE; ++ } else { ++ /* UCT is serialized by UCP lock or by UCP user */ ++ uct_thread_mode = UCS_THREAD_MODE_SERIALIZED; ++ } ++ + UCP_THREAD_LOCK_INIT(&worker->mt_lock); + + worker->context = context; + worker->uuid = ucs_generate_uuid((uintptr_t)worker); +- worker->wireup_pend_count = 0; ++ worker->flush_ops_count = 0; + worker->flags = 0; + worker->inprogress = 0; + worker->ep_config_max = config_count; + worker->ep_config_count = 0; ++ worker->num_active_ifaces = 0; + ucs_list_head_init(&worker->arm_ifaces); +- ucs_list_head_init(&worker->stream_eps); ++ ucs_list_head_init(&worker->stream_ready_eps); ++ ucs_list_head_init(&worker->all_eps); ++ ucp_ep_match_init(&worker->ep_match_ctx); ++ ++ UCS_STATIC_ASSERT(sizeof(ucp_ep_ext_gen_t) <= sizeof(ucp_ep_t)); ++ if (context->config.features & UCP_FEATURE_STREAM) { ++ UCS_STATIC_ASSERT(sizeof(ucp_ep_ext_proto_t) <= sizeof(ucp_ep_t)); ++ ucs_strided_alloc_init(&worker->ep_alloc, sizeof(ucp_ep_t), 3); ++ } else { ++ ucs_strided_alloc_init(&worker->ep_alloc, sizeof(ucp_ep_t), 2); ++ } + + if (params->field_mask & UCP_WORKER_PARAM_FIELD_USER_DATA) { + worker->user_data = params->user_data; +@@ -1110,9 +1249,6 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + ucs_snprintf_zero(worker->name, name_length, "%s:%d", ucs_get_host_name(), + getpid()); + +- kh_init_inplace(ucp_worker_ep_hash, &worker->ep_hash); +- kh_init_inplace(ucp_ep_errh_hash, &worker->ep_errh_hash); +- + worker->ifaces = ucs_calloc(context->num_tls, sizeof(ucp_worker_iface_t), + "ucp iface"); + if (worker->ifaces == NULL) { +@@ -1140,7 +1276,7 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + } + + /* Create the underlying UCT worker */ +- status = uct_worker_create(&worker->async, thread_mode, &worker->uct); ++ status = uct_worker_create(&worker->async, uct_thread_mode, &worker->uct); + if (status != UCS_OK) { + goto err_destroy_async; + } +@@ -1193,6 +1329,11 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + /* Select atomic resources */ + ucp_worker_init_atomic_tls(worker); + ++ /* At this point all UCT memory domains and interfaces are already created ++ * so warn about unused environment variables. ++ */ ++ ucs_config_parser_warn_unused_env_vars(); ++ + *worker_p = worker; + return UCS_OK; + +@@ -1214,6 +1355,7 @@ err_free_stats: + err_free_ifaces: + ucs_free(worker->ifaces); + err_free: ++ ucs_strided_alloc_cleanup(&worker->ep_alloc); + UCP_THREAD_LOCK_FINALIZE(&worker->mt_lock); + ucs_free(worker); + return status; +@@ -1221,17 +1363,23 @@ err_free: + + static void ucp_worker_destroy_eps(ucp_worker_h worker) + { +- ucp_ep_h ep; ++ ucp_ep_ext_gen_t *ep_ext, *tmp; + + ucs_debug("worker %p: destroy all endpoints", worker); +- kh_foreach_value(&worker->ep_hash, ep, ucp_ep_destroy_internal(ep)); ++ ucs_list_for_each_safe(ep_ext, tmp, &worker->all_eps, ep_list) { ++ ucp_ep_disconnected(ucp_ep_from_ext_gen(ep_ext), 1); ++ } + } + + void ucp_worker_destroy(ucp_worker_h worker) + { + ucs_trace_func("worker=%p", worker); +- ucp_worker_remove_am_handlers(worker); ++ ++ UCS_ASYNC_BLOCK(&worker->async); + ucp_worker_destroy_eps(worker); ++ ucp_worker_remove_am_handlers(worker); ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ + ucs_mpool_cleanup(&worker->am_mp, 1); + ucs_mpool_cleanup(&worker->reg_mp, 1); + ucs_mpool_cleanup(&worker->rndv_frag_mp, 1); +@@ -1242,8 +1390,8 @@ void ucp_worker_destroy(ucp_worker_h worker) + uct_worker_destroy(worker->uct); + ucs_async_context_cleanup(&worker->async); + ucs_free(worker->ifaces); +- kh_destroy_inplace(ucp_worker_ep_hash, &worker->ep_hash); +- kh_destroy_inplace(ucp_ep_errh_hash, &worker->ep_errh_hash); ++ ucp_ep_match_cleanup(&worker->ep_match_ctx); ++ ucs_strided_alloc_cleanup(&worker->ep_alloc); + UCP_THREAD_LOCK_FINALIZE(&worker->mt_lock); + UCS_STATS_NODE_FREE(worker->tm_offload_stats); + UCS_STATS_NODE_FREE(worker->stats); +@@ -1271,8 +1419,9 @@ unsigned ucp_worker_progress(ucp_worker_h worker) + /* worker->inprogress is used only for assertion check. + * coverity[assert_side_effect] + */ +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + ++ /* check that ucp_worker_progress is not called from within ucp_worker_progress */ + ucs_assert(worker->inprogress++ == 0); + count = uct_worker_progress(worker->uct); + ucs_async_check_miss(&worker->async); +@@ -1280,7 +1429,7 @@ unsigned ucp_worker_progress(ucp_worker_h worker) + /* coverity[assert_side_effect] */ + ucs_assert(--worker->inprogress == 0); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return count; + } +@@ -1289,19 +1438,24 @@ ssize_t ucp_stream_worker_poll(ucp_worker_h worker, + ucp_stream_poll_ep_t *poll_eps, + size_t max_eps, unsigned flags) + { +- ucp_ep_ext_stream_t *ep; +- ssize_t count = 0; ++ ssize_t count = 0; ++ ucp_ep_ext_proto_t *ep_ext; ++ ucp_ep_h ep; ++ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_STREAM, ++ return UCS_ERR_INVALID_PARAM); + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + +- while ((count < max_eps) && !ucs_list_is_empty(&worker->stream_eps)) { +- ep = ucp_stream_worker_dequeue_ep_head(worker); +- poll_eps[count].ep = ep->ucp_ep; +- poll_eps[count].user_data = ep->ucp_ep->user_data; ++ while ((count < max_eps) && !ucs_list_is_empty(&worker->stream_ready_eps)) { ++ ep_ext = ucp_stream_worker_dequeue_ep_head(worker); ++ ep = ucp_ep_from_ext_proto(ep_ext); ++ poll_eps[count].ep = ep; ++ poll_eps[count].user_data = ucp_ep_ext_gen(ep)->user_data; + ++count; + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return count; + } +@@ -1310,14 +1464,17 @@ ucs_status_t ucp_worker_get_efd(ucp_worker_h worker, int *fd) + { + ucs_status_t status; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_WAKEUP, ++ return UCS_ERR_INVALID_PARAM); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + if (worker->flags & UCP_WORKER_FLAG_EXTERNAL_EVENT_FD) { + status = UCS_ERR_UNSUPPORTED; + } else { + *fd = worker->epfd; + status = UCS_OK; + } +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } + +@@ -1330,6 +1487,9 @@ ucs_status_t ucp_worker_arm(ucp_worker_h worker) + + ucs_trace_func("worker=%p", worker); + ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_WAKEUP, ++ return UCS_ERR_INVALID_PARAM); ++ + /* Read from event pipe. If some events are found, return BUSY, + * Otherwise, continue to arm the transport interfaces. + */ +@@ -1351,7 +1511,7 @@ ucs_status_t ucp_worker_arm(ucp_worker_h worker) + } + } while (ret != 0); + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + /* Go over arm_list of active interfaces which support events and arm them */ + ucs_list_for_each(wiface, &worker->arm_ifaces, arm_list) { +@@ -1367,7 +1527,7 @@ ucs_status_t ucp_worker_arm(ucp_worker_h worker) + status = UCS_OK; + + out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + out: + ucs_trace("ucp_worker_arm returning %s", ucs_status_string(status)); + return status; +@@ -1375,7 +1535,7 @@ out: + + void ucp_worker_wait_mem(ucp_worker_h worker, void *address) + { +- ucs_arch_wait_mem(address); ++ ucs_arch_wait_mem(address); + } + + ucs_status_t ucp_worker_wait(ucp_worker_h worker) +@@ -1388,7 +1548,10 @@ ucs_status_t ucp_worker_wait(ucp_worker_h worker) + + ucs_trace_func("worker %p", worker); + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_WAKEUP, ++ return UCS_ERR_INVALID_PARAM); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + status = ucp_worker_arm(worker); + if (status == UCS_ERR_BUSY) { /* if UCS_ERR_BUSY returned - no poll() must called */ +@@ -1429,21 +1592,16 @@ ucs_status_t ucp_worker_wait(ucp_worker_h worker) + } + + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } + + ucs_status_t ucp_worker_signal(ucp_worker_h worker) + { +- ucs_status_t status; +- + ucs_trace_func("worker %p", worker); +- +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); +- status = ucp_worker_wakeup_signal_fd(worker); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); +- +- return status; ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_WAKEUP, ++ return UCS_ERR_INVALID_PARAM); ++ return ucp_worker_wakeup_signal_fd(worker); + } + + ucs_status_t ucp_worker_get_address(ucp_worker_h worker, ucp_address_t **address_p, +@@ -1451,12 +1609,12 @@ ucs_status_t ucp_worker_get_address(ucp_worker_h worker, ucp_address_t **address + { + ucs_status_t status; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + status = ucp_address_pack(worker, NULL, -1, NULL, address_length_p, + (void**)address_p); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return status; + } +@@ -1466,47 +1624,6 @@ void ucp_worker_release_address(ucp_worker_h worker, ucp_address_t *address) + ucs_free(address); + } + +-ucp_ep_h ucp_worker_get_reply_ep(ucp_worker_h worker, uint64_t dest_uuid) +-{ +- ucs_status_t status; +- ucp_ep_h ep; +- +- UCS_ASYNC_BLOCK(&worker->async); +- +- ep = ucp_worker_ep_find(worker, dest_uuid); +- if (ep == NULL) { +- status = ucp_ep_create_stub(worker, dest_uuid, NULL, "??", +- "for-sending-reply", &ep); +- if (status != UCS_OK) { +- goto err; +- } +- ep->flags |= UCP_EP_FLAG_DEST_UUID_PEER; +- } else { +- ucs_debug("found reply ep %p to uuid %"PRIx64, ep, dest_uuid); +- } +- +- UCS_ASYNC_UNBLOCK(&worker->async); +- return ep; +- +-err: +- UCS_ASYNC_UNBLOCK(&worker->async); +- ucs_fatal("failed to create reply endpoint: %s", ucs_status_string(status)); +-} +- +-ucp_request_t *ucp_worker_allocate_reply(ucp_worker_h worker, uint64_t dest_uuid) +-{ +- ucp_request_t *req; +- +- req = ucp_request_get(worker); +- if (req == NULL) { +- ucs_fatal("could not allocate request"); +- } +- +- req->flags = 0; +- req->send.ep = ucp_worker_get_reply_ep(worker, dest_uuid); +- req->send.mdesc = NULL; +- return req; +-} + + void ucp_worker_print_info(ucp_worker_h worker, FILE *stream) + { +@@ -1517,7 +1634,7 @@ void ucp_worker_print_info(ucp_worker_h worker, FILE *stream) + ucp_rsc_index_t rsc_index; + int first; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + fprintf(stream, "#\n"); + fprintf(stream, "# UCP worker '%s'\n", ucp_worker_get_name(worker)); +@@ -1531,7 +1648,7 @@ void ucp_worker_print_info(ucp_worker_h worker, FILE *stream) + fprintf(stream, "# \n"); + } + +- if (context->config.features & (UCP_FEATURE_AMO32|UCP_FEATURE_AMO64)) { ++ if (context->config.features & UCP_FEATURE_AMO) { + fprintf(stream, "# atomics: "); + first = 1; + for (rsc_index = 0; rsc_index < worker->context->num_tls; ++rsc_index) { +@@ -1549,5 +1666,5 @@ void ucp_worker_print_info(ucp_worker_h worker, FILE *stream) + + fprintf(stream, "#\n"); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.h +index 28c2872..5417c0c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.h +@@ -11,28 +11,31 @@ + #include "ucp_ep.h" + #include "ucp_thread.h" + ++#include + #include ++#include + #include +-#include + #include +-#include ++#include + +-KHASH_MAP_INIT_INT64(ucp_worker_ep_hash, ucp_ep_t *); +-KHASH_MAP_INIT_INT64(ucp_ep_errh_hash, ucp_err_handler_cb_t); + ++/* The size of the private buffer in UCT descriptor headroom, which UCP may ++ * use for its own needs. This size does not include ucp_recv_desc_t length, ++ * because it is common for all cases and protocols (TAG, STREAM). */ ++#define UCP_WORKER_HEADROOM_PRIV_SIZE 24 + +-enum { +- UCP_UCT_IFACE_ATOMIC32_FLAGS = +- UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32, +- UCP_UCT_IFACE_ATOMIC64_FLAGS = +- UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 +-}; ++ ++#define UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(_worker) \ ++ do { \ ++ ucs_assert(!UCP_THREAD_IS_REQUIRED(&(_worker)->mt_lock) || \ ++ UCP_THREAD_CS_IS_RECURSIVELY_LOCKED(&(_worker)->mt_lock) || \ ++ !UCS_ASYNC_IS_RECURSIVELY_BLOCKED(&(_worker)->async)); \ ++ UCP_THREAD_CS_ENTER_CONDITIONAL(&(_worker)->mt_lock); \ ++ } while (0) ++ ++ ++#define UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(_worker) \ ++ UCP_THREAD_CS_EXIT_CONDITIONAL(&(_worker)->mt_lock) + + + /** +@@ -172,7 +175,7 @@ typedef struct ucp_worker { + int inprogress; + char name[UCP_WORKER_NAME_MAX]; /* Worker name */ + +- unsigned wireup_pend_count;/* Number of pending requests on wireup endpoints*/ ++ unsigned flush_ops_count;/* Number of pending operations */ + + unsigned flags; /* Worker flags */ + int epfd; /* Allocated (on-demand) epoll fd for wakeup */ +@@ -181,10 +184,12 @@ typedef struct ucp_worker { + ucs_list_link_t arm_ifaces; /* List of interfaces to arm */ + + void *user_data; /* User-defined data */ +- ucs_list_link_t stream_eps; /* List of EPs with received stream data */ +- khash_t(ucp_worker_ep_hash) ep_hash; /* Hash table of all endpoints */ +- khash_t(ucp_ep_errh_hash) ep_errh_hash; /* Hash table of error handlers associated with endpoints */ ++ ucs_strided_alloc_t ep_alloc; /* Endpoint allocator */ ++ ucs_list_link_t stream_ready_eps; /* List of EPs with received stream data */ ++ ucs_list_link_t all_eps; /* List of all endpoints */ ++ ucp_ep_match_ctx_t ep_match_ctx; /* Endpoint-to-endpoint matching context */ + ucp_worker_iface_t *ifaces; /* Array of interfaces, one for each resource */ ++ unsigned num_active_ifaces; /* Number of activated ifaces */ + ucs_mpool_t am_mp; /* Memory pool for AM receives */ + ucs_mpool_t reg_mp; /* Registered memory pool */ + ucs_mpool_t rndv_frag_mp; /* Memory pool for RNDV fragments */ +@@ -202,9 +207,17 @@ typedef struct ucp_worker { + } ucp_worker_t; + + +-ucp_ep_h ucp_worker_get_reply_ep(ucp_worker_h worker, uint64_t dest_uuid); ++/** ++ * UCP worker argument for the error handling callback ++ */ ++typedef struct ucp_worker_err_handle_arg { ++ ucp_worker_h worker; ++ ucp_ep_h ucp_ep; ++ uct_ep_h uct_ep; ++ ucp_lane_index_t failed_lane; ++ ucs_status_t status; ++} ucp_worker_err_handle_arg_t; + +-ucp_request_t *ucp_worker_allocate_reply(ucp_worker_h worker, uint64_t dest_uuid); + + unsigned ucp_worker_get_ep_config(ucp_worker_h worker, + const ucp_ep_config_key_t *key); +@@ -223,21 +236,27 @@ void ucp_worker_signal_internal(ucp_worker_h worker); + + void ucp_worker_iface_activate(ucp_worker_iface_t *wiface, unsigned uct_flags); + ++int ucp_worker_err_handle_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg); ++ucs_status_t ucp_worker_set_ep_failed(ucp_worker_h worker, ucp_ep_h ucp_ep, ++ uct_ep_h uct_ep, ucp_lane_index_t lane, ++ ucs_status_t status); ++ + static inline const char* ucp_worker_get_name(ucp_worker_h worker) + { + return worker->name; + } + +-static inline ucp_ep_h ucp_worker_ep_find(ucp_worker_h worker, uint64_t dest_uuid) ++/* get ep by pointer received from remote side, do some debug checks */ ++static inline ucp_ep_h ucp_worker_get_ep_by_ptr(ucp_worker_h worker, ++ uintptr_t ep_ptr) + { +- khiter_t hash_it; +- +- hash_it = kh_get(ucp_worker_ep_hash, &worker->ep_hash, dest_uuid); +- if (ucs_unlikely(hash_it == kh_end(&worker->ep_hash))) { +- return NULL; +- } ++ ucp_ep_h ep = (ucp_ep_h)ep_ptr; + +- return kh_value(&worker->ep_hash, hash_it); ++ ucs_assert(ep != NULL); ++ ucs_assertv(ep->worker == worker, "worker=%p ep=%p ep->worker=%p", worker, ++ ep, ep->worker); ++ return ep; + } + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.c +index 9759a08..1c0fa84 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.c +@@ -8,13 +8,93 @@ + + #include + #include +-#include ++#include ++#include + +-size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_mem_type_unpack, ++ (worker, buffer, recv_data, recv_length, mem_type), ++ ucp_worker_h worker, void *buffer, const void *recv_data, ++ size_t recv_length, uct_memory_type_t mem_type) ++{ ++ ucp_ep_h ep = worker->mem_type_ep[mem_type]; ++ ucp_md_map_t md_map = 0; ++ ucp_lane_index_t lane; ++ unsigned md_index; ++ uct_mem_h memh[1]; ++ ucs_status_t status; ++ uct_rkey_bundle_t rkey_bundle; ++ ++ if (recv_length == 0) { ++ return UCS_OK; ++ } ++ ++ lane = ucp_ep_config(ep)->key.rma_lanes[0]; ++ md_index = ucp_ep_md_index(ep, lane); ++ ++ status = ucp_mem_type_reg_buffers(worker, buffer, recv_length, ++ mem_type, md_index, memh, &md_map, ++ &rkey_bundle); ++ if (status != UCS_OK) { ++ ucs_error("failed to register buffer with mem type domian"); ++ return status; ++ } ++ ++ status = uct_ep_put_short(ep->uct_eps[lane], recv_data, recv_length, ++ (uint64_t)buffer, rkey_bundle.rkey); ++ if (status != UCS_OK) { ++ ucs_error("uct_ep_put_short() failed %s", ucs_status_string(status)); ++ } ++ ++ ucp_mem_type_unreg_buffers(worker, mem_type, memh, ++ &md_map, &rkey_bundle); ++ return status; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_mem_type_pack, ++ (worker, dest, src, length, mem_type), ++ ucp_worker_h worker, void *dest, const void *src, size_t length, ++ uct_memory_type_t mem_type) ++{ ++ ucp_ep_h ep = worker->mem_type_ep[mem_type]; ++ ucp_md_map_t md_map = 0; ++ ucp_lane_index_t lane; ++ unsigned md_index; ++ ucs_status_t status; ++ uct_mem_h memh[1]; ++ uct_rkey_bundle_t rkey_bundle; ++ ++ if (length == 0) { ++ return UCS_OK; ++ } ++ ++ lane = ucp_ep_config(ep)->key.rma_lanes[0]; ++ md_index = ucp_ep_md_index(ep, lane); ++ ++ status = ucp_mem_type_reg_buffers(worker, (void *)src, length, mem_type, md_index, ++ memh, &md_map, &rkey_bundle); ++ if (status != UCS_OK) { ++ ucs_error("failed to register buffer with mem type domian"); ++ return status; ++ } ++ ++ status = uct_ep_get_short(ep->uct_eps[lane], dest, length, ++ (uint64_t)src, rkey_bundle.rkey); ++ if (status != UCS_OK) { ++ ucs_error("uct_ep_put_short() failed %s", ucs_status_string(status)); ++ } ++ ++ ucp_mem_type_unreg_buffers(worker, mem_type, memh, ++ &md_map, &rkey_bundle); ++ return status; ++} ++ ++size_t ucp_dt_pack(ucp_worker_h worker, ucp_datatype_t datatype, ++ uct_memory_type_t mem_type, void *dest, const void *src, + ucp_dt_state_t *state, size_t length) + { +- ucp_dt_generic_t *dt; + size_t result_len = 0; ++ ucp_dt_generic_t *dt; + + if (!length) { + return length; +@@ -22,7 +102,12 @@ size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, + + switch (datatype & UCP_DATATYPE_CLASS_MASK) { + case UCP_DATATYPE_CONTIG: +- UCS_PROFILE_CALL(memcpy, dest, src + state->offset, length); ++ if ((ucs_likely(UCP_MEM_IS_HOST(mem_type))) || ++ (ucs_likely(UCP_MEM_IS_CUDA_MANAGED(mem_type)))) { ++ UCS_PROFILE_CALL(memcpy, dest, src + state->offset, length); ++ } else { ++ ucp_mem_type_pack(worker, dest, src + state->offset, length, mem_type); ++ } + result_len = length; + break; + +@@ -47,64 +132,3 @@ size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, + state->offset += result_len; + return result_len; + } +- +-UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_mem_type_unpack(ucp_worker_h worker, void *buffer, const void *recv_data, +- size_t recv_length, uct_memory_type_t mem_type) +-{ +- ucp_context_h context = worker->context; +- ucp_ep_h ep = worker->mem_type_ep[mem_type]; +- ucp_md_map_t md_map = 0; +- ucp_lane_index_t lane; +- uct_md_h md; +- unsigned md_index; +- uct_mem_h memh[1]; +- ucs_status_t status; +- char *rkey_buffer; +- uct_rkey_bundle_t rkey_bundle; +- +- if (recv_length == 0) { +- return UCS_OK; +- } +- +- lane = ucp_ep_config(ep)->key.rma_lanes[0]; +- md_index = ucp_ep_md_index(ep, lane); +- md = context->tl_mds[md_index].md; +- +- status = ucp_mem_rereg_mds(context, UCS_BIT(md_index), buffer, +- recv_length, UCT_MD_MEM_ACCESS_ALL, NULL, mem_type, +- NULL, memh, &md_map); +- if (status != UCS_OK) { +- goto err; +- } +- +- rkey_buffer = ucs_alloca(context->tl_mds[md_index].attr.rkey_packed_size); +- +- status = uct_md_mkey_pack(md, memh[0], rkey_buffer); +- if (status != UCS_OK) { +- ucs_error("failed to pack key from md[%d]: %s", +- md_index, ucs_status_string(status)); +- goto err_dreg_mem; +- } +- +- status = uct_rkey_unpack(rkey_buffer, &rkey_bundle); +- if (status != UCS_OK) { +- ucs_error("failed to unpack key from md[%d]: %s", +- md_index, ucs_status_string(status)); +- goto err_dreg_mem; +- } +- +- status = uct_ep_put_short(ep->uct_eps[lane], recv_data, recv_length, +- (uint64_t)buffer, rkey_bundle.rkey); +- if (status != UCS_OK) { +- ucs_error("uct_ep_put_short() failed %s", ucs_status_string(status)); +- goto err_destroy_rkey; +- } +- +-err_destroy_rkey: +- uct_rkey_release(&rkey_bundle); +-err_dreg_mem: +- ucp_mem_rereg_mds(context, 0, NULL, 0, 0, NULL, mem_type, NULL, memh, &md_map); +-err: +- return status; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.h +index 1156e90..bd034fc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.h +@@ -46,7 +46,8 @@ typedef struct ucp_dt_state { + } ucp_dt_state_t; + + +-size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, ++size_t ucp_dt_pack(ucp_worker_h worker, ucp_datatype_t datatype, ++ uct_memory_type_t mem_type, void *dest, const void *src, + ucp_dt_state_t *state, size_t length); + + ucs_status_t ucp_mem_type_unpack(ucp_worker_h worker, void *buffer, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.inl +index b8d47cb..99f8f31 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.inl +@@ -7,7 +7,7 @@ + #ifndef UCP_DT_INL_ + #define UCP_DT_INL_ + +-#include ++#include + + /** + * Get the total length of the data +@@ -56,7 +56,8 @@ ucp_dt_unpack_only(ucp_worker_h worker, void *buffer, size_t count, + ucs_unlikely(length > (buffer_size = ucp_contig_dt_length(datatype, count)))) { + goto err_truncated; + } +- if (ucs_likely(UCP_MEM_IS_HOST(mem_type))) { ++ if (ucs_likely(UCP_MEM_IS_HOST(mem_type)) || ++ (ucs_likely(UCP_MEM_IS_CUDA_MANAGED(mem_type)))) { + UCS_PROFILE_NAMED_CALL("memcpy_recv", memcpy, buffer, data, length); + } else { + ucp_mem_type_unpack(worker, buffer, data, length, mem_type); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_contig.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_contig.c +index 2c233b9..024de95 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_contig.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_contig.c +@@ -6,7 +6,7 @@ + + #include "dt_contig.h" + +-#include ++#include + #include + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_generic.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_generic.h +index db49261..bf0647b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_generic.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_generic.h +@@ -5,8 +5,8 @@ + */ + + +-#ifndef UCP_DATATYPE_H_ +-#define UCP_DATATYPE_H_ ++#ifndef UCP_DT_GENERIC_H_ ++#define UCP_DT_GENERIC_H_ + + #include + +@@ -28,4 +28,4 @@ static inline ucp_dt_generic_t* ucp_dt_generic(ucp_datatype_t datatype) + #define UCP_DT_IS_GENERIC(_datatype) \ + (((_datatype) & UCP_DATATYPE_CLASS_MASK) == UCP_DATATYPE_GENERIC) + +-#endif ++#endif /* UCP_DT_GENERIC_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.c +index c072cde..2ae6b60 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.c +@@ -92,3 +92,14 @@ void ucp_dt_iov_seek(ucp_dt_iov_t *iov, size_t iovcnt, ptrdiff_t distance, + + *iov_offset = new_iov_offset; + } ++ ++size_t ucp_dt_iov_count_nonempty(const ucp_dt_iov_t *iov, size_t iovcnt) ++{ ++ size_t iov_it, count; ++ ++ count = 0; ++ for (iov_it = 0; iov_it < iovcnt; ++iov_it) { ++ count += iov[iov_it].length != 0; ++ } ++ return count; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.h +index 43fc81f..c19a7ba 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.h +@@ -88,4 +88,14 @@ void ucp_dt_iov_seek(ucp_dt_iov_t *iov, size_t iovcnt, ptrdiff_t distance, + size_t *iov_offset, size_t *iovcnt_offset); + + ++/** ++ * Count non-empty buffers in the iov ++ * ++ * @param [in] iov @ref ucp_dt_iov_t buffer to count ++ * @param [in] iovcnt Number of entries the @a iov buffer ++ * ++ * @return Number of non-empty buffers in the iovec ++ */ ++size_t ucp_dt_iov_count_nonempty(const ucp_dt_iov_t *iov, size_t iovcnt); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto.h +index 5653f37..290efa7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto.h +@@ -8,9 +8,6 @@ + #define UCP_PROTO_H_ + + #include +-#include +-#include +-#include + #include + #include + +@@ -19,7 +16,7 @@ + * Header segment for a transaction + */ + typedef struct { +- uint64_t sender_uuid; ++ uintptr_t ep_ptr; + uintptr_t reqptr; + } UCS_S_PACKED ucp_request_hdr_t; + +@@ -55,17 +52,4 @@ void ucp_proto_am_zcopy_completion(uct_completion_t *self, ucs_status_t status); + + void ucp_proto_am_zcopy_req_complete(ucp_request_t *req, ucs_status_t status); + +-/* +- * Make sure the remote worker would be able to send replies to our endpoint. +- * Should be used before sending a message which requires a reply. +- */ +-static inline void ucp_ep_connect_remote(ucp_ep_h ep) +-{ +- if (ucs_unlikely(!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED))) { +- ucs_assert(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER); +- ucp_wireup_send_request(ep, ep->dest_uuid); +- } +-} +- +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.c +index ac9efa5..f5f5de6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.c +@@ -26,8 +26,8 @@ static size_t ucp_proto_pack(void *dest, void *arg) + return sizeof(*rep_hdr); + case UCP_AM_ID_OFFLOAD_SYNC_ACK: + off_rep_hdr = dest; +- off_rep_hdr->sender_tag = req->send.proto.sender_tag; +- off_rep_hdr->sender_uuid = req->send.proto.sender_uuid; ++ off_rep_hdr->sender_tag = req->send.proto.sender_tag; ++ off_rep_hdr->ep_ptr = ucp_request_get_dest_ep_ptr(req); + return sizeof(*off_rep_hdr); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.inl +index b35b85c..ab69172 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.inl +@@ -9,7 +9,7 @@ + #include + #include + #include +-#include ++#include + + #define UCP_STATUS_PENDING_SWITCH (UCS_ERR_LAST - 1) + +@@ -36,17 +36,16 @@ ucp_do_am_bcopy_single(uct_pending_req_t *self, uint8_t am_id, + + static UCS_F_ALWAYS_INLINE + ucs_status_t ucp_do_am_bcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, +- uint8_t am_id_middle, uint8_t am_id_last, ++ uint8_t am_id_middle, + size_t hdr_size_middle, + uct_pack_callback_t pack_first, + uct_pack_callback_t pack_middle, +- uct_pack_callback_t pack_last, + int enable_am_bw) + { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_ep_t *ep = req->send.ep; + ucs_status_t status; +- size_t max_middle; ++ size_t UCS_V_UNUSED max_middle; + ssize_t packed_len; + uct_ep_h uct_ep; + size_t offset; +@@ -65,20 +64,21 @@ ucs_status_t ucp_do_am_bcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, + packed_len = uct_ep_am_bcopy(uct_ep, am_id_first, pack_first, req, 0); + UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_bcopy_first", packed_len, + packed_len); +- } else if (offset + max_middle < req->send.length) { +- /* Middle */ ++ ucs_assertv(req->send.state.dt.offset < req->send.length, ++ "offset=%zd", req->send.state.dt.offset); ++ } else { ++ ucs_assert(offset < req->send.length); ++ /* Middle or last */ + packed_len = uct_ep_am_bcopy(uct_ep, am_id_middle, pack_middle, req, 0); + ucs_assertv((packed_len < 0) || (packed_len <= max_middle + hdr_size_middle), + "packed_len=%zd max_middle=%zu hdr_size_middle=%zu", + packed_len, max_middle, hdr_size_middle); + UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_bcopy_middle", + packed_len, packed_len); +- } else { +- /* Last */ +- packed_len = uct_ep_am_bcopy(uct_ep, am_id_last, pack_last, req, 0); +- UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_bcopy_last", packed_len, +- packed_len); +- if (packed_len >= 0) { ++ ucs_assert((packed_len < 0) || ++ (offset + packed_len - hdr_size_middle <= req->send.length)); ++ if ((packed_len > 0) && (offset + packed_len - hdr_size_middle == req->send.length)) { ++ /* Last */ + return UCS_OK; + } + } +@@ -188,7 +188,7 @@ ucs_status_t ucp_do_am_zcopy_single(uct_pending_req_t *self, uint8_t am_id, + + ucp_dt_iov_copy_uct(ep->worker->context,iov, &iovcnt, max_iov, + &state, req->send.buffer, req->send.datatype, +- req->send.length, 0, NULL); ++ req->send.length, ucp_ep_md_index(ep, req->send.lane), NULL); + + status = uct_ep_am_zcopy(ep->uct_eps[req->send.lane], am_id, (void*)hdr, + hdr_size, iov, iovcnt, 0, +@@ -205,7 +205,7 @@ ucs_status_t ucp_do_am_zcopy_single(uct_pending_req_t *self, uint8_t am_id, + + static UCS_F_ALWAYS_INLINE + ucs_status_t ucp_do_am_zcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, +- uint8_t am_id_middle, uint8_t am_id_last, ++ uint8_t am_id_middle, + const void *hdr_first, size_t hdr_size_first, + const void *hdr_middle, size_t hdr_size_middle, + ucp_req_complete_func_t complete, int enable_am_bw) +@@ -219,6 +219,7 @@ ucs_status_t ucp_do_am_zcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, + size_t max_iov; + uct_iov_t *iov; + size_t offset; ++ size_t mid_len; + ucs_status_t status; + uct_ep_h uct_ep; + int pending_adde_res; +@@ -262,6 +263,9 @@ ucs_status_t ucp_do_am_zcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, + req->send.buffer, req->send.datatype, + max_middle - hdr_size_first + hdr_size_middle, + ucp_ep_md_index(ep, req->send.lane), NULL); ++ ucs_assertv(state.offset != 0, "state must be changed on 1st stage"); ++ ucs_assertv(state.offset < req->send.length, "state.offset=%zu", ++ state.offset); + + status = uct_ep_am_zcopy(uct_ep, am_id_first, (void*)hdr_first, + hdr_size_first, iov, iovcnt, 0, +@@ -269,39 +273,45 @@ ucs_status_t ucp_do_am_zcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, + + UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_zcopy_first", + iov[0].length, status); +- } else if ((offset + max_middle < req->send.length) || flag_iov_mid) { +- /* Middle stage */ +- ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iov, +- &state, req->send.buffer, req->send.datatype, +- max_middle, ucp_ep_md_index(ep, req->send.lane), NULL); +- +- status = uct_ep_am_zcopy(uct_ep, am_id_middle, (void*)hdr_middle, +- hdr_size_middle, iov, iovcnt, 0, +- &req->send.state.uct_comp); +- +- UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_zcopy_middle", +- iov[0].length, status); + } else { +- /* Last stage */ ++ /* Middle or last stage */ ++ mid_len = ucs_min(max_middle, req->send.length - offset); ++ ucs_assert(offset + mid_len <= req->send.length); + ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iov, &state, +- req->send.buffer, req->send.datatype, +- req->send.length - offset, ++ req->send.buffer, req->send.datatype, mid_len, + ucp_ep_md_index(ep, req->send.lane), NULL); + +- status = uct_ep_am_zcopy(uct_ep, am_id_last, (void*)hdr_middle, +- hdr_size_middle, iov, iovcnt, 0, +- &req->send.state.uct_comp); +- UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_zcopy_last", +- iov[0].length, status); +- if (status == UCS_OK) { +- complete(req, UCS_OK); ++ if (offset < state.offset) { ++ status = uct_ep_am_zcopy(uct_ep, am_id_middle, (void*)hdr_middle, ++ hdr_size_middle, iov, iovcnt, 0, ++ &req->send.state.uct_comp); ++ } else if (state.offset == req->send.length) { ++ /* Empty IOVs on last stage */ + return UCS_OK; ++ } else { ++ ucs_assert(offset == state.offset); ++ /* Empty IOVs in the middle */ ++ ucp_request_send_state_advance(req, &state, ++ UCP_REQUEST_SEND_PROTO_ZCOPY_AM, ++ UCS_OK); ++ continue; + } +- ucp_request_send_state_advance(req, &state, +- UCP_REQUEST_SEND_PROTO_ZCOPY_AM, +- status); +- if (!UCS_STATUS_IS_ERR(status)) { +- return UCS_OK; ++ ++ UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_zcopy_middle", ++ iov[0].length, status); ++ ++ if (!flag_iov_mid && (offset + mid_len == req->send.length)) { ++ /* Last stage */ ++ if (status == UCS_OK) { ++ complete(req, UCS_OK); ++ return UCS_OK; ++ } ++ ucp_request_send_state_advance(req, &state, ++ UCP_REQUEST_SEND_PROTO_ZCOPY_AM, ++ status); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ return UCS_OK; ++ } + } + } + +@@ -340,7 +350,7 @@ ucp_proto_get_zcopy_threshold(const ucp_request_t *req, + } + + if (ucs_unlikely(!UCP_MEM_IS_HOST(req->send.mem_type))) { +- return 1; ++ return ucs_min(max_zcopy, msg_config->mem_type_zcopy_thresh[req->send.mem_type]); + } + + if (ucs_likely(UCP_DT_IS_CONTIG(req->send.datatype))) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_basic.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_basic.c +new file mode 100644 +index 0000000..e48030c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_basic.c +@@ -0,0 +1,100 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++ ++ ++static UCS_F_ALWAYS_INLINE ++ucs_status_t ucp_amo_check_send_status(ucp_request_t *req, ucs_status_t status) ++{ ++ if (status == UCS_INPROGRESS) { ++ return UCS_OK; ++ } ++ /* Complete for UCS_OK and unexpected errors */ ++ if (status != UCS_ERR_NO_RESOURCE) { ++ ucp_request_complete_send(req, status); ++ } ++ return status; ++} ++ ++static ucs_status_t ucp_amo_basic_progress_post(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_rkey_h rkey = req->send.amo.rkey; ++ ucp_ep_t *ep = req->send.ep; ++ uint64_t value = req->send.amo.value; ++ uint64_t remote_addr = req->send.amo.remote_addr; ++ uct_atomic_op_t op = req->send.amo.uct_op; ++ ucs_status_t status; ++ ++ req->send.lane = rkey->cache.amo_lane; ++ if (req->send.length == sizeof(uint64_t)) { ++ status = UCS_PROFILE_CALL(uct_ep_atomic64_post, ++ ep->uct_eps[req->send.lane], op, value, ++ remote_addr, rkey->cache.amo_rkey); ++ } else { ++ ucs_assert(req->send.length == sizeof(uint32_t)); ++ status = UCS_PROFILE_CALL(uct_ep_atomic32_post, ++ ep->uct_eps[req->send.lane], op, value, ++ remote_addr, rkey->cache.amo_rkey); ++ } ++ ++ return ucp_amo_check_send_status(req, status); ++} ++ ++static ucs_status_t ucp_amo_basic_progress_fetch(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_rkey_h rkey = req->send.amo.rkey; ++ ucp_ep_t *ep = req->send.ep; ++ uint64_t value = req->send.amo.value; ++ uint64_t *result = req->send.buffer; ++ uint64_t remote_addr = req->send.amo.remote_addr; ++ uct_atomic_op_t op = req->send.amo.uct_op; ++ ucs_status_t status; ++ ++ req->send.lane = rkey->cache.amo_lane; ++ if (req->send.length == sizeof(uint64_t)) { ++ if (op != UCT_ATOMIC_OP_CSWAP) { ++ status = uct_ep_atomic64_fetch(ep->uct_eps[req->send.lane], ++ op, value, result, ++ remote_addr, ++ rkey->cache.amo_rkey, ++ &req->send.state.uct_comp); ++ } else { ++ status = uct_ep_atomic_cswap64(ep->uct_eps[req->send.lane], ++ value, *result, ++ remote_addr, rkey->cache.amo_rkey, result, ++ &req->send.state.uct_comp); ++ } ++ } else { ++ ucs_assert(req->send.length == sizeof(uint32_t)); ++ if (op != UCT_ATOMIC_OP_CSWAP) { ++ status = uct_ep_atomic32_fetch(ep->uct_eps[req->send.lane], ++ op, value, (uint32_t*)result, ++ remote_addr, ++ rkey->cache.amo_rkey, ++ &req->send.state.uct_comp); ++ } else { ++ status = uct_ep_atomic_cswap32(ep->uct_eps[req->send.lane], ++ value, *result, remote_addr, ++ rkey->cache.amo_rkey, (uint32_t*)result, ++ &req->send.state.uct_comp); ++ } ++ } ++ ++ return ucp_amo_check_send_status(req, status); ++} ++ ++ucp_amo_proto_t ucp_amo_basic_proto = { ++ .name = "basic_amo", ++ .progress_fetch = ucp_amo_basic_progress_fetch, ++ .progress_post = ucp_amo_basic_progress_post ++}; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_send.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_send.c +new file mode 100644 +index 0000000..48985f1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_send.c +@@ -0,0 +1,278 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++#define UCP_AMO_CHECK_PARAM(_context, _remote_addr, _size, _opcode, \ ++ _last_opcode, _action) \ ++ { \ ++ if (ENABLE_PARAMS_CHECK && \ ++ ucs_unlikely(((_remote_addr) % (_size)) != 0)) { \ ++ ucs_error("atomic variable must be naturally aligned " \ ++ "(remote address 0x%"PRIx64", size %zu)", (_remote_addr), \ ++ (_size)); \ ++ _action; \ ++ } \ ++ \ ++ if (ENABLE_PARAMS_CHECK && \ ++ ucs_unlikely(((_size) != 4) && (_size != 8))) { \ ++ ucs_error("invalid atomic operation size: %zu", (_size)); \ ++ _action; \ ++ } \ ++ \ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS((_context), ((_size) == 4) ? \ ++ UCP_FEATURE_AMO32 : UCP_FEATURE_AMO64, \ ++ _action); \ ++ \ ++ if (ENABLE_PARAMS_CHECK && \ ++ (ucs_unlikely((_opcode) >= (_last_opcode)))) { \ ++ ucs_error("invalid atomic opcode %d ", _opcode); \ ++ _action; \ ++ } \ ++ } ++ ++ ++static uct_atomic_op_t ucp_uct_op_table[] = { ++ [UCP_ATOMIC_POST_OP_ADD] = UCT_ATOMIC_OP_ADD, ++ [UCP_ATOMIC_POST_OP_AND] = UCT_ATOMIC_OP_AND, ++ [UCP_ATOMIC_POST_OP_OR] = UCT_ATOMIC_OP_OR, ++ [UCP_ATOMIC_POST_OP_XOR] = UCT_ATOMIC_OP_XOR ++}; ++ ++static uct_atomic_op_t ucp_uct_fop_table[] = { ++ [UCP_ATOMIC_FETCH_OP_FADD] = UCT_ATOMIC_OP_ADD, ++ [UCP_ATOMIC_FETCH_OP_FAND] = UCT_ATOMIC_OP_AND, ++ [UCP_ATOMIC_FETCH_OP_FOR] = UCT_ATOMIC_OP_OR, ++ [UCP_ATOMIC_FETCH_OP_FXOR] = UCT_ATOMIC_OP_XOR, ++ [UCP_ATOMIC_FETCH_OP_SWAP] = UCT_ATOMIC_OP_SWAP, ++ [UCP_ATOMIC_FETCH_OP_CSWAP] = UCT_ATOMIC_OP_CSWAP, ++}; ++ ++ ++static void ucp_amo_completed_single(uct_completion_t *self, ++ ucs_status_t status) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, ++ send.state.uct_comp); ++ ucs_trace("invoking completion on AMO request %p", req); ++ ucp_request_complete_send(req, status); ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucp_amo_init_common(ucp_request_t *req, ucp_ep_h ep, uct_atomic_op_t op, ++ uint64_t remote_addr, ucp_rkey_h rkey, uint64_t value, ++ size_t size) ++{ ++ req->flags = 0; ++ req->send.ep = ep; ++ req->send.length = size; ++ req->send.amo.uct_op = op; ++ req->send.amo.remote_addr = remote_addr; ++ req->send.amo.rkey = rkey; ++ req->send.amo.value = value; ++#if ENABLE_ASSERT ++ req->send.lane = UCP_NULL_LANE; ++#endif ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucp_amo_init_fetch(ucp_request_t *req, ucp_ep_h ep, void *buffer, ++ uct_atomic_op_t op, size_t op_size, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint64_t value, const ucp_amo_proto_t *proto) ++{ ++ ucp_amo_init_common(req, ep, op, remote_addr, rkey, value, op_size); ++ req->send.state.uct_comp.count = 1; ++ req->send.state.uct_comp.func = ucp_amo_completed_single; ++ req->send.uct.func = proto->progress_fetch; ++ req->send.buffer = buffer; ++} ++ ++static UCS_F_ALWAYS_INLINE ++void ucp_amo_init_post(ucp_request_t *req, ucp_ep_h ep, uct_atomic_op_t op, ++ size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint64_t value, const ucp_amo_proto_t *proto) ++{ ++ ucp_amo_init_common(req, ep, op, remote_addr, rkey, value, op_size); ++ req->send.uct.func = proto->progress_post; ++} ++ ++ucs_status_ptr_t ucp_atomic_fetch_nb(ucp_ep_h ep, ucp_atomic_fetch_op_t opcode, ++ uint64_t value, void *result, size_t op_size, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb) ++{ ++ ucs_status_ptr_t status_p; ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ UCP_AMO_CHECK_PARAM(ep->worker->context, remote_addr, op_size, opcode, ++ UCP_ATOMIC_FETCH_OP_LAST, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, amo); ++ if (status != UCS_OK) { ++ status_p = UCS_STATUS_PTR(UCS_ERR_UNREACHABLE); ++ goto out; ++ } ++ ++ req = ucp_request_get(ep->worker); ++ if (ucs_unlikely(NULL == req)) { ++ status_p = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); ++ goto out; ++ } ++ ++ ucp_amo_init_fetch(req, ep, result, ucp_uct_fop_table[opcode], op_size, ++ remote_addr, rkey, value, rkey->cache.amo_proto); ++ ++ status_p = ucp_rma_send_request_cb(req, cb); ++ ++out: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status_p; ++} ++ ++ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t value, ++ size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ ucs_status_ptr_t status_p; ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ UCP_AMO_CHECK_PARAM(ep->worker->context, remote_addr, op_size, opcode, ++ UCP_ATOMIC_POST_OP_LAST, return UCS_ERR_INVALID_PARAM); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, amo); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ req = ucp_request_get(ep->worker); ++ if (ucs_unlikely(NULL == req)) { ++ status = UCS_ERR_NO_MEMORY; ++ goto out; ++ } ++ ++ ucp_amo_init_post(req, ep, ucp_uct_op_table[opcode], op_size, remote_addr, ++ rkey, value, rkey->cache.amo_proto); ++ ++ status_p = ucp_rma_send_request_cb(req, (ucp_send_callback_t)ucs_empty_function); ++ if (UCS_PTR_IS_PTR(status_p)) { ++ ucp_request_release(status_p); ++ status = UCS_OK; ++ } else { ++ status = UCS_PTR_STATUS(status_p); ++ } ++ ++out: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status; ++} ++ ++static inline ucs_status_t ++ucp_atomic_fetch_b(ucp_ep_h ep, ucp_atomic_fetch_op_t opcode, uint64_t value, ++ void *result, size_t size, uint64_t remote_addr, ++ ucp_rkey_h rkey, const char *op_name) ++{ ++ void *request; ++ ++ request = ucp_atomic_fetch_nb(ep, opcode, value, result, size, remote_addr, ++ rkey, (void*)ucs_empty_function); ++ return ucp_rma_wait(ep->worker, request, op_name); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_add32, (ep, add, remote_addr, rkey), ++ ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ return ucp_atomic_post(ep, UCP_ATOMIC_POST_OP_ADD, add, sizeof(add), ++ remote_addr, rkey); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_add64, (ep, add, remote_addr, rkey), ++ ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ return ucp_atomic_post(ep, UCP_ATOMIC_POST_OP_ADD, add, sizeof(add), ++ remote_addr, rkey); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_fadd32, (ep, add, remote_addr, rkey, result), ++ ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint32_t *result) ++{ ++ return ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_FADD, add, result, ++ sizeof(add), remote_addr, rkey, "atomic_fadd32"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_fadd64, (ep, add, remote_addr, rkey, result), ++ ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint64_t *result) ++{ ++ return ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_FADD, add, result, ++ sizeof(add), remote_addr, rkey, "atomic_fadd64"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_swap32, (ep, swap, remote_addr, rkey, result), ++ ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint32_t *result) ++{ ++ return ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_SWAP, swap, result, ++ sizeof(swap), remote_addr, rkey, "atomic_swap32"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_swap64, (ep, swap, remote_addr, rkey, result), ++ ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint64_t *result) ++{ ++ return ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_SWAP, swap, result, ++ sizeof(swap), remote_addr, rkey, "atomic_swap64"); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_atomic_cswap_b(ucp_ep_h ep, uint64_t compare, uint64_t swap, size_t size, ++ uint64_t remote_addr, ucp_rkey_h rkey, void *result, ++ const char *op_name) ++{ ++ char tmp[sizeof(swap)]; /* sufficient storage for maximal operand size */ ++ ucs_status_t status; ++ ++ memcpy(tmp, &swap, size); ++ status = ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_CSWAP, compare, &tmp, ++ size, remote_addr, rkey, op_name); ++ if (status == UCS_OK) { ++ memcpy(result, tmp, size); ++ } ++ return status; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_cswap32, ++ (ep, compare, swap, remote_addr, rkey, result), ++ ucp_ep_h ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, ucp_rkey_h rkey, uint32_t *result) ++{ ++ return ucp_atomic_cswap_b(ep, compare, swap, sizeof(swap), remote_addr, ++ rkey, result, "atomic_cswap32"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_cswap64, ++ (ep, compare, swap, remote_addr, rkey, result), ++ ucp_ep_h ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, ucp_rkey_h rkey, uint64_t *result) ++{ ++ return ucp_atomic_cswap_b(ep, compare, swap, sizeof(swap), remote_addr, ++ rkey, result, "atomic_cswap64"); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_sw.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_sw.c +new file mode 100644 +index 0000000..f9ec1f4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_sw.c +@@ -0,0 +1,292 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++#include ++ ++ ++static size_t ucp_amo_sw_pack(void *dest, void *arg, uint8_t fetch) ++{ ++ ucp_request_t *req = arg; ++ ucp_atomic_req_hdr_t *atomich = dest; ++ ucp_ep_t *ep = req->send.ep; ++ size_t size = req->send.length; ++ size_t length; ++ ++ atomich->address = req->send.rma.remote_addr; ++ atomich->req.ep_ptr = ucp_ep_dest_ep_ptr(ep); ++ atomich->req.reqptr = fetch ? (uintptr_t)req : 0; ++ atomich->length = size; ++ atomich->opcode = req->send.amo.uct_op; ++ ++ memcpy(atomich + 1, &req->send.amo.value, size); ++ length = sizeof(*atomich) + size; ++ ++ if (req->send.amo.uct_op == UCT_ATOMIC_OP_CSWAP) { ++ /* compare-swap has two arguments */ ++ memcpy((void*)(atomich + 1) + size, req->send.buffer, size); ++ length += size; ++ } ++ ++ return length; ++} ++ ++static size_t ucp_amo_sw_post_pack_cb(void *dest, void *arg) ++{ ++ return ucp_amo_sw_pack(dest, arg, 0); ++} ++ ++static size_t ucp_amo_sw_fetch_pack_cb(void *dest, void *arg) ++{ ++ return ucp_amo_sw_pack(dest, arg, 1); ++} ++ ++static ucs_status_t ucp_amo_sw_progress(uct_pending_req_t *self, ++ uct_pack_callback_t pack_cb, int fetch) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ucs_status_t status; ++ ssize_t packed_len; ++ ++ req->send.lane = ucp_ep_get_am_lane(ep); ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], ++ UCP_AM_ID_ATOMIC_REQ, pack_cb, req, 0); ++ if (packed_len > 0) { ++ ucp_ep_rma_remote_request_sent(ep); ++ if (!fetch) { ++ ucp_request_complete_send(req, UCS_OK); ++ } ++ return UCS_OK; ++ } else { ++ status = (ucs_status_t)packed_len; ++ if (status != UCS_ERR_NO_RESOURCE) { ++ /* failure */ ++ ucp_request_complete_send(req, status); ++ } ++ return status; ++ } ++} ++ ++static ucs_status_t ucp_amo_sw_progress_post(uct_pending_req_t *self) ++{ ++ return ucp_amo_sw_progress(self, ucp_amo_sw_post_pack_cb, 0); ++} ++ ++static ucs_status_t ucp_amo_sw_progress_fetch(uct_pending_req_t *self) ++{ ++ return ucp_amo_sw_progress(self, ucp_amo_sw_fetch_pack_cb, 1); ++} ++ ++ucp_amo_proto_t ucp_amo_sw_proto = { ++ .name = "sw_amo", ++ .progress_fetch = ucp_amo_sw_progress_fetch, ++ .progress_post = ucp_amo_sw_progress_post ++}; ++ ++static size_t ucp_amo_sw_pack_atomic_reply(void *dest, void *arg) ++{ ++ ucp_rma_rep_hdr_t *hdr = dest; ++ ucp_request_t *req = arg; ++ ++ hdr->req = req->send.get_reply.req; ++ ++ switch (req->send.length) { ++ case sizeof(uint32_t): ++ *(uint32_t*)(hdr + 1) = req->send.atomic_reply.data.reply32; ++ break; ++ case sizeof(uint64_t): ++ *(uint64_t*)(hdr + 1) = req->send.atomic_reply.data.reply64; ++ break; ++ default: ++ ucs_fatal("invalid atomic length: %zu", req->send.length); ++ } ++ ++ return sizeof(*hdr) + req->send.length; ++} ++ ++static ucs_status_t ucp_progress_atomic_reply(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ssize_t packed_len; ++ ++ req->send.lane = ucp_ep_get_am_lane(ep); ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_ATOMIC_REP, ++ ucp_amo_sw_pack_atomic_reply, req, 0); ++ ++ if (packed_len < 0) { ++ return (ucs_status_t)packed_len; ++ } ++ ++ ucs_assert(packed_len == sizeof(ucp_rma_rep_hdr_t) + req->send.length); ++ ucp_request_put(req); ++ return UCS_OK; ++} ++ ++#define DEFINE_AMO_SW_OP(_bits) \ ++ static void ucp_amo_sw_do_op##_bits(const ucp_atomic_req_hdr_t *atomicreqh) \ ++ { \ ++ uint##_bits##_t *ptr = (void*)atomicreqh->address; \ ++ uint##_bits##_t *args = (void*)(atomicreqh + 1); \ ++ \ ++ switch (atomicreqh->opcode) { \ ++ case UCT_ATOMIC_OP_ADD: \ ++ ucs_atomic_add##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_AND: \ ++ ucs_atomic_and##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_OR: \ ++ ucs_atomic_or##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_XOR: \ ++ ucs_atomic_xor##_bits(ptr, args[0]); \ ++ break; \ ++ default: \ ++ ucs_fatal("invalid opcode: %d", atomicreqh->opcode); \ ++ } \ ++ } ++ ++#define DEFINE_AMO_SW_FOP(_bits) \ ++ static void ucp_amo_sw_do_fop##_bits(const ucp_atomic_req_hdr_t *atomicreqh, \ ++ ucp_atomic_reply_t *result) \ ++ { \ ++ uint##_bits##_t *ptr = (void*)atomicreqh->address; \ ++ uint##_bits##_t *args = (void*)(atomicreqh + 1); \ ++ \ ++ switch (atomicreqh->opcode) { \ ++ case UCT_ATOMIC_OP_ADD: \ ++ result->reply##_bits = ucs_atomic_fadd##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_AND: \ ++ result->reply##_bits = ucs_atomic_fand##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_OR: \ ++ result->reply##_bits = ucs_atomic_for##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_XOR: \ ++ result->reply##_bits = ucs_atomic_fxor##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_SWAP: \ ++ result->reply##_bits = ucs_atomic_swap##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_CSWAP: \ ++ result->reply##_bits = ucs_atomic_cswap##_bits(ptr, args[0], args[1]); \ ++ break; \ ++ default: \ ++ ucs_fatal("invalid opcode: %d", atomicreqh->opcode); \ ++ } \ ++ } ++ ++DEFINE_AMO_SW_OP(32) ++DEFINE_AMO_SW_OP(64) ++DEFINE_AMO_SW_FOP(32) ++DEFINE_AMO_SW_FOP(64) ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_req_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_atomic_req_hdr_t *atomicreqh = data; ++ ucp_worker_h worker = arg; ++ ucp_ep_h ep = ucp_worker_get_ep_by_ptr(worker, ++ atomicreqh->req.ep_ptr); ++ ucp_request_t *req; ++ ++ if (atomicreqh->req.reqptr == 0) { ++ /* atomic operation without result */ ++ switch (atomicreqh->length) { ++ case sizeof(uint32_t): ++ ucp_amo_sw_do_op32(atomicreqh); ++ break; ++ case sizeof(uint64_t): ++ ucp_amo_sw_do_op64(atomicreqh); ++ break; ++ default: ++ ucs_fatal("invalid atomic length: %u", atomicreqh->length); ++ } ++ ucp_rma_sw_send_cmpl(ep); ++ } else { ++ /* atomic operation with result */ ++ req = ucp_request_get(worker); ++ ucs_assert(req != NULL); ++ ++ switch (atomicreqh->length) { ++ case sizeof(uint32_t): ++ ucp_amo_sw_do_fop32(atomicreqh, &req->send.atomic_reply.data); ++ break; ++ case sizeof(uint64_t): ++ ucp_amo_sw_do_fop64(atomicreqh, &req->send.atomic_reply.data); ++ break; ++ default: ++ ucs_fatal("invalid atomic length: %u", atomicreqh->length); ++ } ++ ++ req->send.ep = ep; ++ req->send.atomic_reply.req = atomicreqh->req.reqptr; ++ req->send.length = atomicreqh->length; ++ req->send.uct.func = ucp_progress_atomic_reply; ++ ucp_request_send(req); ++ } ++ ++ return UCS_OK; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_rep_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_rma_rep_hdr_t *hdr = data; ++ size_t frag_length = length - sizeof(*hdr); ++ ucp_request_t *req = (ucp_request_t*)hdr->req; ++ ucp_ep_h ep = req->send.ep; ++ ++ memcpy(req->send.buffer, hdr + 1, frag_length); ++ ucp_request_complete_send(req, UCS_OK); ++ ucp_ep_rma_remote_request_completed(ep); ++ return UCS_OK; ++} ++ ++static void ucp_amo_sw_dump_packet(ucp_worker_h worker, uct_am_trace_type_t type, ++ uint8_t id, const void *data, size_t length, ++ char *buffer, size_t max) ++{ ++ const ucp_atomic_req_hdr_t *atomich; ++ const ucp_rma_rep_hdr_t *reph; ++ size_t header_len; ++ char *p; ++ ++ switch (id) { ++ case UCP_AM_ID_ATOMIC_REQ: ++ atomich = data; ++ snprintf(buffer, max, ++ "ATOMIC_REQ [addr 0x%lx len %u reqptr 0x%lx ep 0x%lx op %d]", ++ atomich->address, atomich->length, atomich->req.reqptr, ++ atomich->req.ep_ptr, atomich->opcode); ++ header_len = sizeof(*atomich);; ++ break; ++ case UCP_AM_ID_ATOMIC_REP: ++ reph = data; ++ snprintf(buffer, max, "ATOMIC_REP [reqptr 0x%lx]", reph->req); ++ header_len = sizeof(*reph); ++ break; ++ default: ++ return; ++ } ++ ++ p = buffer + strlen(buffer); ++ ucp_dump_payload(worker->context, p, buffer + max - p, data + header_len, ++ length - header_len); ++} ++ ++UCP_DEFINE_AM(UCP_FEATURE_AMO, UCP_AM_ID_ATOMIC_REQ, ucp_atomic_req_handler, ++ ucp_amo_sw_dump_packet, 0); ++UCP_DEFINE_AM(UCP_FEATURE_AMO, UCP_AM_ID_ATOMIC_REP, ucp_atomic_rep_handler, ++ ucp_amo_sw_dump_packet, 0); ++ ++UCP_DEFINE_AM_PROXY(UCP_AM_ID_ATOMIC_REQ); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/basic_rma.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/basic_rma.c +deleted file mode 100644 +index 68b28cf..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/basic_rma.c ++++ /dev/null +@@ -1,425 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* Copyright (c) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include +- +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +- +- +-#define UCP_RMA_CHECK_PARAMS(_buffer, _length) \ +- if ((_length) == 0) { \ +- return UCS_OK; \ +- } \ +- if (ENABLE_PARAMS_CHECK && ((_buffer) == NULL)) { \ +- return UCS_ERR_INVALID_PARAM; \ +- } +- +-/* request can be released if +- * - all fragments were sent (length == 0) (bcopy & zcopy mix) +- * - all zcopy fragments are done (uct_comp.count == 0) +- * - and request was allocated from the mpool +- * (checked in ucp_request_complete_send) +- * +- * Request can be released either immediately or in the completion callback. +- * We must check req length in the completion callback to avoid the following +- * scenario: +- * partial_send;no_resos;progress; +- * send_completed;cb called;req free(ooops); +- * next_partial_send; (oops req already freed) +- */ +-static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_rma_request_advance(ucp_request_t *req, ssize_t frag_length, +- ucs_status_t status) +-{ +- if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { +- if (status != UCS_ERR_NO_RESOURCE) { +- ucp_request_send_buffer_dereg(req); +- ucp_request_complete_send(req, status); +- } +- return status; +- } +- +- req->send.length -= frag_length; +- if (req->send.length == 0) { +- /* bcopy is the fast path */ +- if (ucs_likely(req->send.state.uct_comp.count == 0)) { +- ucp_request_send_buffer_dereg(req); +- ucp_request_complete_send(req, UCS_OK); +- } +- return UCS_OK; +- } +- req->send.buffer += frag_length; +- req->send.rma.remote_addr += frag_length; +- return UCS_INPROGRESS; +-} +- +-static void ucp_rma_request_bcopy_completion(uct_completion_t *self, +- ucs_status_t status) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, +- send.state.uct_comp); +- +- if (ucs_likely(req->send.length == 0)) { +- ucp_request_complete_send(req, UCS_OK); +- } +-} +- +-static void ucp_rma_request_zcopy_completion(uct_completion_t *self, +- ucs_status_t status) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, +- send.state.uct_comp); +- +- if (ucs_likely(req->send.length == 0)) { +- ucp_request_send_buffer_dereg(req); +- ucp_request_complete_send(req, UCS_OK); +- } +-} +- +-static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_rma_request_init(ucp_request_t *req, ucp_ep_h ep, const void *buffer, +- size_t length, uint64_t remote_addr, ucp_rkey_h rkey, +- uct_pending_callback_t cb, size_t zcopy_thresh, int flags) +-{ +- req->flags = flags; /* Implicit release */ +- req->send.ep = ep; +- req->send.buffer = buffer; +- req->send.datatype = ucp_dt_make_contig(1); +- req->send.length = length; +- req->send.rma.remote_addr = remote_addr; +- req->send.rma.rkey = rkey; +- req->send.uct.func = cb; +- req->send.lane = rkey->cache.rma_lane; +- ucp_request_send_state_init(req, ucp_dt_make_contig(1), length); +- ucp_request_send_state_reset(req, +- (length < zcopy_thresh) ? +- ucp_rma_request_bcopy_completion : +- ucp_rma_request_zcopy_completion, +- UCP_REQUEST_SEND_PROTO_RMA); +-#if ENABLE_ASSERT +- req->send.cb = NULL; +-#endif +- if (length < zcopy_thresh) { +- return UCS_OK; +- } +- +- return ucp_request_send_buffer_reg_lane(req, req->send.lane); +-} +- +-static ucs_status_t ucp_progress_put(uct_pending_req_t *self) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); +- ucp_ep_t *ep = req->send.ep; +- ucp_rkey_h rkey = req->send.rma.rkey; +- ucp_lane_index_t lane = req->send.lane; +- ucp_ep_rma_config_t *rma_config = &ucp_ep_config(ep)->rma[lane]; +- ucs_status_t status; +- ssize_t packed_len; +- +- ucs_assert(rkey->cache.ep_cfg_index == ep->cfg_index); +- ucs_assert(rkey->cache.rma_lane == lane); +- +- if (req->send.length <= ucp_ep_config(ep)->bcopy_thresh) { +- packed_len = ucs_min(req->send.length, rma_config->max_put_short); +- status = UCS_PROFILE_CALL(uct_ep_put_short, +- ep->uct_eps[lane], +- req->send.buffer, +- packed_len, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey); +- } else if (ucs_likely(req->send.length < rma_config->put_zcopy_thresh)) { +- ucp_memcpy_pack_context_t pack_ctx; +- pack_ctx.src = req->send.buffer; +- pack_ctx.length = ucs_min(req->send.length, rma_config->max_put_bcopy); +- packed_len = UCS_PROFILE_CALL(uct_ep_put_bcopy, +- ep->uct_eps[lane], +- ucp_memcpy_pack, +- &pack_ctx, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey); +- status = (packed_len > 0) ? UCS_OK : (ucs_status_t)packed_len; +- } else { +- uct_iov_t iov; +- +- /* TODO: leave last fragment for bcopy */ +- packed_len = ucs_min(req->send.length, rma_config->max_put_zcopy); +- /* TODO: use ucp_dt_iov_copy_uct */ +- iov.buffer = (void *)req->send.buffer; +- iov.length = packed_len; +- iov.count = 1; +- iov.memh = req->send.state.dt.dt.contig.memh[0]; +- +- status = UCS_PROFILE_CALL(uct_ep_put_zcopy, +- ep->uct_eps[lane], +- &iov, 1, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey, +- &req->send.state.uct_comp); +- ucp_request_send_state_advance(req, NULL, UCP_REQUEST_SEND_PROTO_RMA, +- status); +- } +- +- return ucp_rma_request_advance(req, packed_len, status); +-} +- +-static ucs_status_t ucp_progress_get(uct_pending_req_t *self) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); +- ucp_ep_t *ep = req->send.ep; +- ucp_rkey_h rkey = req->send.rma.rkey; +- ucp_lane_index_t lane = req->send.lane; +- ucp_ep_rma_config_t *rma_config = &ucp_ep_config(ep)->rma[lane]; +- ucs_status_t status; +- size_t frag_length; +- +- ucs_assert(rkey->cache.ep_cfg_index == ep->cfg_index); +- ucs_assert(rkey->cache.rma_lane == lane); +- +- if (ucs_likely(req->send.length < rma_config->get_zcopy_thresh)) { +- frag_length = ucs_min(rma_config->max_get_bcopy, req->send.length); +- status = UCS_PROFILE_CALL(uct_ep_get_bcopy, +- ep->uct_eps[lane], +- (uct_unpack_callback_t)memcpy, +- (void*)req->send.buffer, +- frag_length, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey, +- &req->send.state.uct_comp); +- } else { +- uct_iov_t iov; +- frag_length = ucs_min(req->send.length, rma_config->max_get_zcopy); +- iov.buffer = (void *)req->send.buffer; +- iov.length = frag_length; +- iov.count = 1; +- iov.memh = req->send.state.dt.dt.contig.memh[0]; +- +- status = UCS_PROFILE_CALL(uct_ep_get_zcopy, +- ep->uct_eps[lane], +- &iov, 1, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey, +- &req->send.state.uct_comp); +- } +- +- if (status == UCS_INPROGRESS) { +- ucp_request_send_state_advance(req, 0, UCP_REQUEST_SEND_PROTO_RMA, +- UCS_INPROGRESS); +- } +- +- return ucp_rma_request_advance(req, frag_length, status); +-} +- +-static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_rma_blocking(ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey, +- uct_pending_callback_t progress_cb, size_t zcopy_thresh) +-{ +- ucs_status_t status; +- ucp_request_t req; +- +- status = ucp_rma_request_init(&req, ep, buffer, length, remote_addr, rkey, +- NULL, zcopy_thresh, 0); +- if (ucs_unlikely(status != UCS_OK)) { +- return status; +- } +- +- /* Loop until all message has been sent. +- * We re-check the configuration on every iteration except for zcopy, +- * because it can be * changed by transport switch. +- */ +- for (;;) { +- /* coverity[callee_ptr_arith] */ +- status = progress_cb(&req.send.uct); +- if (ucs_likely(status == UCS_OK)) { +- break; +- } else if (status == UCS_INPROGRESS) { +- continue; +- } else if (status != UCS_ERR_NO_RESOURCE) { +- break; +- } else { +- ucp_worker_progress(ep->worker); +- } +- } +- +- ucp_request_wait_uct_comp(&req); +- return status; +-} +- +-static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_rma_nonblocking(ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey, +- uct_pending_callback_t progress_cb, size_t zcopy_thresh) +-{ +- ucs_status_t status; +- ucp_request_t *req; +- +- req = ucp_request_get(ep->worker); +- if (req == NULL) { +- return UCS_ERR_NO_MEMORY; +- } +- +- status = ucp_rma_request_init(req, ep, buffer, length, remote_addr, rkey, +- progress_cb, zcopy_thresh, +- UCP_REQUEST_FLAG_RELEASED); +- if (ucs_unlikely(status != UCS_OK)) { +- return status; +- } +- +- return ucp_request_send(req); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_put, (ep, buffer, length, remote_addr, rkey), +- ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucp_ep_rma_config_t *rma_config; +- ucs_status_t status; +- +- UCP_RMA_CHECK_PARAMS(buffer, length); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- +- if (ucs_likely(length <= rkey->cache.max_put_short)) { +- do { +- /* testing shows that for put message rate it is better to finish +- * put_short here instead of doing it once, getting NO_RESOURCE +- * and continuing to ucp_rma_blocking() +- */ +- status = UCS_PROFILE_CALL(uct_ep_put_short, ep->uct_eps[rkey->cache.rma_lane], +- buffer, length, remote_addr, rkey->cache.rma_rkey); +- if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { +- goto out_unlock; +- } +- +- ucp_worker_progress(ep->worker); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- } while (1); +- } +- +- rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; +- status = ucp_rma_blocking(ep, buffer, length, remote_addr, rkey, +- ucp_progress_put, rma_config->put_zcopy_thresh); +-out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_get, (ep, buffer, length, remote_addr, rkey), +- ucp_ep_h ep, void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucp_ep_rma_config_t *rma_config; +- ucs_status_t status; +- +- UCP_RMA_CHECK_PARAMS(buffer, length); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- +- rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; +- status = ucp_rma_blocking(ep, buffer, length, remote_addr, rkey, +- ucp_progress_get, rma_config->get_zcopy_thresh); +-out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucp_ep_rma_config_t *rma_config; +- ucs_status_t status; +- +- UCP_RMA_CHECK_PARAMS(buffer, length); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- +- /* Fast path for a single short message */ +- if (ucs_likely(length <= rkey->cache.max_put_short)) { +- status = UCS_PROFILE_CALL(uct_ep_put_short, ep->uct_eps[rkey->cache.rma_lane], +- buffer, length, remote_addr, rkey->cache.rma_rkey); +- if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { +- goto out_unlock; +- } +- } +- +- rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; +- status = ucp_rma_nonblocking(ep, buffer, length, remote_addr, rkey, +- ucp_progress_put, rma_config->put_zcopy_thresh); +-out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucp_ep_rma_config_t *rma_config; +- ucs_status_t status; +- +- UCP_RMA_CHECK_PARAMS(buffer, length); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- +- rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; +- status = ucp_rma_nonblocking(ep, buffer, length, remote_addr, rkey, +- ucp_progress_get, rma_config->get_zcopy_thresh); +-out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_worker_fence, (worker), ucp_worker_h worker) +-{ +- unsigned rsc_index; +- ucs_status_t status; +- +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); +- +- for (rsc_index = 0; rsc_index < worker->context->num_tls; ++rsc_index) { +- if (worker->ifaces[rsc_index].iface == NULL) { +- continue; +- } +- +- status = uct_iface_fence(worker->ifaces[rsc_index].iface, 0); +- if (status != UCS_OK) { +- goto out; +- } +- } +- status = UCS_OK; +- +-out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); +- return status; +-} +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/flush.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/flush.c +index 71b6b74..05c8cea 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/flush.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/flush.c +@@ -8,6 +8,8 @@ + #include + #include + ++#include "rma.inl" ++ + + static void ucp_ep_flush_error(ucp_request_t *req, ucs_status_t status) + { +@@ -19,9 +21,15 @@ static void ucp_ep_flush_error(ucp_request_t *req, ucs_status_t status) + --req->send.state.uct_comp.count; + } + ++static int ucp_ep_flush_is_completed(ucp_request_t *req) ++{ ++ return (req->send.state.uct_comp.count == 0) && req->send.flush.sw_done; ++} ++ + static void ucp_ep_flush_progress(ucp_request_t *req) + { + ucp_ep_h ep = req->send.ep; ++ ucp_ep_flush_state_t *flush_state; + ucp_lane_index_t lane; + ucs_status_t status; + uct_ep_h uct_ep; +@@ -52,6 +60,8 @@ static void ucp_ep_flush_progress(ucp_request_t *req) + if (status == UCS_OK) { + req->send.flush.lanes &= ~UCS_BIT(lane); + --req->send.state.uct_comp.count; ++ ucs_trace("ep %p: flush comp %p count reduced to %d", ep, ++ &req->send.state.uct_comp, req->send.state.uct_comp.count); + } else if (status == UCS_INPROGRESS) { + req->send.flush.lanes &= ~UCS_BIT(lane); + } else if (status == UCS_ERR_NO_RESOURCE) { +@@ -62,7 +72,7 @@ static void ucp_ep_flush_progress(ucp_request_t *req) + break; + } + +- status = uct_ep_pending_add(uct_ep, &req->send.uct); ++ status = uct_ep_pending_add(uct_ep, &req->send.uct, 0); + ucs_trace("adding pending flush on ep %p lane[%d]: %s", ep, lane, + ucs_status_string(status)); + if (status == UCS_OK) { +@@ -77,6 +87,36 @@ static void ucp_ep_flush_progress(ucp_request_t *req) + break; + } + } ++ ++ if (!req->send.flush.sw_started && (req->send.state.uct_comp.count == 0)) { ++ /* Start waiting for remote completions only after all lanes are flushed ++ * on the transport level, so we are sure all pending requests were sent. ++ * We don't need to wait for remote completions in these cases: ++ * - The flush operation is in 'cancel' mode ++ * - The endpoint is either not used or did not resolve the peer endpoint, ++ * which means we didn't have any user operations which require remote ++ * completion. In this case, the flush state may not even be initialized. ++ */ ++ if ((req->send.flush.uct_flags & UCT_FLUSH_FLAG_CANCEL) || ++ !ucs_test_all_flags(ep->flags, UCP_EP_FLAG_USED|UCP_EP_FLAG_DEST_EP)) { ++ ucs_trace_req("flush request %p not waiting for remote completions", ++ req); ++ req->send.flush.sw_done = 1; ++ } else { ++ /* All pending requests were sent, so 'send_sn' value is up-to-date */ ++ flush_state = ucp_ep_flush_state(ep); ++ if (flush_state->send_sn == flush_state->cmpl_sn) { ++ req->send.flush.sw_done = 1; ++ ucs_trace_req("flush request %p remote completions done", req); ++ } else { ++ req->send.flush.cmpl_sn = flush_state->send_sn; ++ ucs_queue_push(&flush_state->reqs, &req->send.flush.queue); ++ ucs_trace_req("added flush request %p to ep remote completion queue" ++ " with sn %d", req, req->send.flush.cmpl_sn); ++ } ++ } ++ req->send.flush.sw_started = 1; ++ } + } + + static void ucp_ep_flush_slow_path_remove(ucp_request_t *req) +@@ -89,10 +129,11 @@ static void ucp_ep_flush_slow_path_remove(ucp_request_t *req) + static int ucp_flush_check_completion(ucp_request_t *req) + { + /* Check if flushed all lanes */ +- if (req->send.state.uct_comp.count != 0) { ++ if (!ucp_ep_flush_is_completed(req)) { + return 0; + } + ++ ucs_trace_req("flush req %p completed", req); + ucp_ep_flush_slow_path_remove(req); + req->send.flush.flushed_cb(req); + return 1; +@@ -141,7 +182,10 @@ static ucs_status_t ucp_ep_flush_progress_pending(uct_pending_req_t *self) + } + + if ((status == UCS_OK) || (status == UCS_INPROGRESS)) { +- req->send.lane = UCP_NULL_LANE; ++ /* flushed callback might release the request */ ++ if (!completed) { ++ req->send.lane = UCP_NULL_LANE; ++ } + return UCS_OK; + } else if (status == UCS_ERR_NO_RESOURCE) { + return UCS_ERR_NO_RESOURCE; +@@ -156,7 +200,7 @@ static void ucp_ep_flush_completion(uct_completion_t *self, ucs_status_t status) + ucp_request_t *req = ucs_container_of(self, ucp_request_t, + send.state.uct_comp); + +- ucs_trace("flush completion req=%p status=%d", req, status); ++ ucs_trace_req("flush completion req=%p status=%d", req, status); + + ucs_assert(!(req->flags & UCP_REQUEST_FLAG_COMPLETED)); + +@@ -165,27 +209,43 @@ static void ucp_ep_flush_completion(uct_completion_t *self, ucs_status_t status) + if (status == UCS_OK) { + ucp_ep_flush_progress(req); + } else { ++ /* force flush completion in case of error */ ++ req->send.flush.sw_done = 1; + req->send.state.uct_comp.count = 0; + } + ++ ++ ucs_trace_req("flush completion req=%p comp_count=%d", req, req->send.state.uct_comp.count); + ucp_flush_check_completion(req); + } + ++void ucp_ep_flush_remote_completed(ucp_request_t *req) ++{ ++ ucs_trace_req("flush remote ops completed req=%p", req); ++ ++ if (!req->send.flush.sw_done) { ++ req->send.flush.sw_done = 1; ++ ucp_flush_check_completion(req); ++ } ++} ++ + ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags, + ucp_send_callback_t req_cb, + unsigned req_flags, +- ucp_request_callback_t flushed_cb) ++ ucp_request_t *worker_req, ++ ucp_request_callback_t flushed_cb, ++ const char *debug_name) + { + ucs_status_t status; + ucp_request_t *req; + +- ucs_debug("disconnect ep %p", ep); ++ ucs_debug("%s ep %p", debug_name, ep); + + if (ep->flags & UCP_EP_FLAG_FAILED) { + return NULL; + } + +- req = ucs_mpool_get(&ep->worker->req_mp); ++ req = ucp_request_get(ep->worker); + if (req == NULL) { + return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + } +@@ -206,6 +266,9 @@ ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags, + req->send.flush.lanes = UCS_MASK(ucp_ep_num_lanes(ep)); + req->send.flush.prog_id = UCS_CALLBACKQ_ID_NULL; + req->send.flush.uct_flags = uct_flags; ++ req->send.flush.worker_req = worker_req; ++ req->send.flush.sw_started = 0; ++ req->send.flush.sw_done = 0; + + req->send.lane = UCP_NULL_LANE; + req->send.uct.func = ucp_ep_flush_progress_pending; +@@ -214,11 +277,11 @@ ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags, + + ucp_ep_flush_progress(req); + +- if (req->send.state.uct_comp.count == 0) { ++ if (ucp_ep_flush_is_completed(req)) { + status = req->status; + ucs_trace_req("ep %p: releasing flush request %p, returning status %s", + ep, req, ucs_status_string(status)); +- ucs_mpool_put(req); ++ ucp_request_put(req); + return UCS_STATUS_PTR(status); + } + +@@ -237,13 +300,13 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_ep_flush_nb, (ep, flags, cb), + { + void *request; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + +- request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, +- cb, UCP_REQUEST_FLAG_CALLBACK, +- ucp_ep_flushed_callback); ++ request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, cb, ++ UCP_REQUEST_FLAG_CALLBACK, NULL, ++ ucp_ep_flushed_callback, "flush_nb"); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + + return request; + } +@@ -253,7 +316,7 @@ static ucs_status_t ucp_worker_flush_check(ucp_worker_h worker) + ucs_status_t status; + unsigned rsc_index; + +- if (worker->wireup_pend_count > 0) { ++ if (worker->flush_ops_count) { + return UCS_INPROGRESS; + } + +@@ -264,6 +327,12 @@ static ucs_status_t ucp_worker_flush_check(ucp_worker_h worker) + + status = uct_iface_flush(worker->ifaces[rsc_index].iface, 0, NULL); + if (status != UCS_OK) { ++ if (UCS_STATUS_IS_ERR(status)) { ++ ucs_error("iface[%d] "UCT_TL_RESOURCE_DESC_FMT" flush failed: %s", ++ rsc_index, ++ UCT_TL_RESOURCE_DESC_ARG(&worker->context->tl_rscs[rsc_index].tl_rsc), ++ ucs_status_string(status)); ++ } + return status; + } + } +@@ -271,19 +340,73 @@ static ucs_status_t ucp_worker_flush_check(ucp_worker_h worker) + return UCS_OK; + } + +-static unsigned ucp_worker_flush_progress(void *arg) ++static void ucp_worker_flush_complete_one(ucp_request_t *req, ucs_status_t status, ++ int force_progress_unreg) + { +- ucp_request_t *req = arg; + ucp_worker_h worker = req->flush_worker.worker; ++ int complete; ++ ++ --req->flush_worker.comp_count; ++ complete = (req->flush_worker.comp_count == 0) || (status != UCS_OK); ++ ++ if (complete || force_progress_unreg) { ++ uct_worker_progress_unregister_safe(worker->uct, ++ &req->flush_worker.prog_id); ++ } ++ ++ if (complete) { ++ ucs_assert(status != UCS_INPROGRESS); ++ ucp_request_complete(req, flush_worker.cb, status); ++ } ++} ++ ++static void ucp_worker_flush_ep_flushed_cb(ucp_request_t *req) ++{ ++ ucp_worker_flush_complete_one(req->send.flush.worker_req, UCS_OK, 0); ++ ucp_request_put(req); ++} ++ ++static unsigned ucp_worker_flush_progress(void *arg) ++{ ++ ucp_request_t *req = arg; ++ ucp_worker_h worker = req->flush_worker.worker; ++ ucp_ep_ext_gen_t *next_ep = req->flush_worker.next_ep; ++ void *ep_flush_request; + ucs_status_t status; ++ ucp_ep_h ep; + + status = ucp_worker_flush_check(worker); +- if ((status == UCS_INPROGRESS) || (status == UCS_ERR_NO_RESOURCE)) { +- return 0; ++ if ((status == UCS_OK) || (&next_ep->ep_list == &worker->all_eps)) { ++ /* If all ifaces are flushed, or we finished going over all endpoints, ++ * no need to progress this request actively any more. Just wait until ++ * all associated endpoint flush requests are completed. ++ */ ++ ucp_worker_flush_complete_one(req, UCS_OK, 1); ++ } else if (status != UCS_INPROGRESS) { ++ /* Error returned from uct iface flush */ ++ ucp_worker_flush_complete_one(req, status, 1); ++ } else if (worker->context->config.ext.flush_worker_eps) { ++ /* Some endpoints are not flushed yet. Take next endpoint from the list ++ * and start flush operation on it. ++ */ ++ ep = ucp_ep_from_ext_gen(next_ep); ++ req->flush_worker.next_ep = ucs_list_next(&next_ep->ep_list, ++ ucp_ep_ext_gen_t, ep_list); ++ ++ ep_flush_request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, NULL, ++ UCP_REQUEST_FLAG_RELEASED, req, ++ ucp_worker_flush_ep_flushed_cb, ++ "flush_worker"); ++ if (UCS_PTR_IS_ERR(ep_flush_request)) { ++ /* endpoint flush resulted in an error */ ++ status = UCS_PTR_STATUS(ep_flush_request); ++ ucs_warn("ucp_ep_flush_internal() failed: %s", ucs_status_string(status)); ++ } else if (ep_flush_request != NULL) { ++ /* endpoint flush started, increment refcount */ ++ ++req->flush_worker.comp_count; ++ } + } + +- uct_worker_progress_unregister_safe(worker->uct, &req->flush_worker.prog_id); +- ucp_request_complete(req, flush_worker.cb, status); + return 0; + } + +@@ -299,16 +422,20 @@ static ucs_status_ptr_t ucp_worker_flush_nb_internal(ucp_worker_h worker, + return UCS_STATUS_PTR(status); + } + +- req = ucs_mpool_get(&worker->req_mp); ++ req = ucp_request_get(worker); + if (req == NULL) { + return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + } + +- req->flags = req_flags; +- req->status = UCS_OK; +- req->flush_worker.worker = worker; +- req->flush_worker.cb = cb; +- req->flush_worker.prog_id = UCS_CALLBACKQ_ID_NULL; ++ req->flags = req_flags; ++ req->status = UCS_OK; ++ req->flush_worker.worker = worker; ++ req->flush_worker.cb = cb; ++ req->flush_worker.comp_count = 1; /* counting starts from 1, and decremented ++ when finished going over all endpoints */ ++ req->flush_worker.prog_id = UCS_CALLBACKQ_ID_NULL; ++ req->flush_worker.next_ep = ucs_list_head(&worker->all_eps, ++ ucp_ep_ext_gen_t, ep_list); + + uct_worker_progress_register_safe(worker->uct, ucp_worker_flush_progress, + req, 0, &req->flush_worker.prog_id); +@@ -320,33 +447,19 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_worker_flush_nb, (worker, flags, cb), + { + void *request; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + request = ucp_worker_flush_nb_internal(worker, cb, + UCP_REQUEST_FLAG_CALLBACK); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return request; + } + + static ucs_status_t ucp_flush_wait(ucp_worker_h worker, void *request) + { +- ucs_status_t status; +- +- if (request == NULL) { +- return UCS_OK; +- } else if (UCS_PTR_IS_ERR(request)) { +- ucs_warn("flush failed: %s", ucs_status_string(UCS_PTR_STATUS(request))); +- return UCS_PTR_STATUS(request); +- } else { +- do { +- ucp_worker_progress(worker); +- status = ucp_request_check_status(request); +- } while (status == UCS_INPROGRESS); +- ucp_request_release(request); +- return status; +- } ++ return ucp_rma_wait(worker, request, "flush"); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_worker_flush, (worker), ucp_worker_h worker) +@@ -354,12 +467,12 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_worker_flush, (worker), ucp_worker_h worker) + ucs_status_t status; + void *request; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + request = ucp_worker_flush_nb_internal(worker, NULL, 0); + status = ucp_flush_wait(worker, request); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return status; + } +@@ -369,12 +482,36 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_ep_flush, (ep), ucp_ep_h ep) + ucs_status_t status; + void *request; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + +- request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, NULL, 0, +- ucp_ep_flushed_callback); ++ request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, NULL, 0, NULL, ++ ucp_ep_flushed_callback, "flush"); + status = ucp_flush_wait(ep->worker, request); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_worker_fence, (worker), ucp_worker_h worker) ++{ ++ unsigned rsc_index; ++ ucs_status_t status; ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); ++ ++ for (rsc_index = 0; rsc_index < worker->context->num_tls; ++rsc_index) { ++ if (worker->ifaces[rsc_index].iface == NULL) { ++ continue; ++ } ++ ++ status = uct_iface_fence(worker->ifaces[rsc_index].iface, 0); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ } ++ status = UCS_OK; ++ ++out: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.h +new file mode 100644 +index 0000000..84b9608 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.h +@@ -0,0 +1,86 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCP_RMA_H_ ++#define UCP_RMA_H_ ++ ++#include ++ ++ ++/** ++ * Defines functions for RMA protocol ++ */ ++struct ucp_rma_proto { ++ const char *name; ++ uct_pending_callback_t progress_put; ++ uct_pending_callback_t progress_get; ++}; ++ ++ ++/** ++ * Defines functions for AMO protocol ++ */ ++struct ucp_amo_proto { ++ const char *name; ++ uct_pending_callback_t progress_fetch; ++ uct_pending_callback_t progress_post; ++}; ++ ++ ++/** ++ * Atomic reply data ++ */ ++typedef union { ++ uint32_t reply32; /* 32-bit reply */ ++ uint64_t reply64; /* 64-bit reply */ ++} ucp_atomic_reply_t; ++ ++ ++typedef struct { ++ uint64_t address; ++ uintptr_t ep_ptr; ++} UCS_S_PACKED ucp_put_hdr_t; ++ ++ ++typedef struct { ++ uintptr_t ep_ptr; ++} UCS_S_PACKED ucp_cmpl_hdr_t; ++ ++ ++typedef struct { ++ uint64_t address; ++ uint64_t length; ++ ucp_request_hdr_t req; ++} UCS_S_PACKED ucp_get_req_hdr_t; ++ ++ ++typedef struct { ++ uintptr_t req; ++} UCS_S_PACKED ucp_rma_rep_hdr_t; ++ ++ ++typedef struct { ++ uint64_t address; ++ ucp_request_hdr_t req; // NULL if no reply ++ uint8_t length; ++ uint8_t opcode; ++} UCS_S_PACKED ucp_atomic_req_hdr_t; ++ ++ ++extern ucp_rma_proto_t ucp_rma_basic_proto; ++extern ucp_rma_proto_t ucp_rma_sw_proto; ++extern ucp_amo_proto_t ucp_amo_basic_proto; ++extern ucp_amo_proto_t ucp_amo_sw_proto; ++ ++ ++ucs_status_t ucp_rma_request_advance(ucp_request_t *req, ssize_t frag_length, ++ ucs_status_t status); ++ ++void ucp_ep_flush_remote_completed(ucp_request_t *req); ++ ++void ucp_rma_sw_send_cmpl(ucp_ep_h ep); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.inl +new file mode 100644 +index 0000000..d1828dd +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.inl +@@ -0,0 +1,80 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCP_RMA_INL_ ++#define UCP_RMA_INL_ ++ ++#include "rma.h" ++ ++#include ++#include ++#include ++ ++ ++static UCS_F_ALWAYS_INLINE ucs_status_ptr_t ++ucp_rma_send_request_cb(ucp_request_t *req, ucp_send_callback_t cb) ++{ ++ ucs_status_t status = ucp_request_send(req); ++ ++ if (req->flags & UCP_REQUEST_FLAG_COMPLETED) { ++ ucs_trace_req("releasing send request %p, returning status %s", req, ++ ucs_status_string(status)); ++ ucs_mpool_put(req); ++ return UCS_STATUS_PTR(status); ++ } ++ ++ ucs_trace_req("returning request %p, status %s", req, ++ ucs_status_string(status)); ++ ucp_request_set_callback(req, send.cb, cb); ++ return req + 1; ++} ++ ++static inline ucs_status_t ucp_rma_wait(ucp_worker_h worker, void *user_req, ++ const char *op_name) ++{ ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ if (ucs_likely(user_req == NULL)) { ++ return UCS_OK; ++ } else if (ucs_unlikely(UCS_PTR_IS_ERR(user_req))) { ++ ucs_warn("%s failed: %s", op_name, ++ ucs_status_string(UCS_PTR_STATUS(user_req))); ++ return UCS_PTR_STATUS(user_req); ++ } else { ++ req = (ucp_request_t*)user_req - 1; ++ do { ++ ucp_worker_progress(worker); ++ status = ucp_request_check_status(user_req); ++ } while (!(req->flags & UCP_REQUEST_FLAG_COMPLETED)); ++ status = req->status; ++ ucp_request_release(user_req); ++ return status; ++ } ++} ++ ++static inline void ucp_ep_rma_remote_request_sent(ucp_ep_t *ep) ++{ ++ ++ucp_ep_flush_state(ep)->send_sn; ++ ++ep->worker->flush_ops_count; ++} ++ ++static inline void ucp_ep_rma_remote_request_completed(ucp_ep_t *ep) ++{ ++ ucp_ep_flush_state_t *flush_state = ucp_ep_flush_state(ep); ++ ucp_request_t *req; ++ ++ --ep->worker->flush_ops_count; ++ ++flush_state->cmpl_sn; ++ ++ ucs_queue_for_each_extract(req, &flush_state->reqs, send.flush.queue, ++ UCS_CIRCULAR_COMPARE32(req->send.flush.cmpl_sn, ++ <= ,flush_state->cmpl_sn)) { ++ ucp_ep_flush_remote_completed(req); ++ } ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_basic.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_basic.c +new file mode 100644 +index 0000000..e101d23 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_basic.c +@@ -0,0 +1,123 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* Copyright (c) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. ++* Copyright (C) Los Alamos National Security, LLC. 2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "rma.h" ++ ++#include ++ ++ ++static ucs_status_t ucp_rma_basic_progress_put(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ucp_rkey_h rkey = req->send.rma.rkey; ++ ucp_lane_index_t lane = req->send.lane; ++ ucp_ep_rma_config_t *rma_config = &ucp_ep_config(ep)->rma[lane]; ++ ucs_status_t status; ++ ssize_t packed_len; ++ ++ ucs_assert(rkey->cache.ep_cfg_index == ep->cfg_index); ++ ucs_assert(rkey->cache.rma_lane == lane); ++ ++ if ((req->send.length <= rma_config->max_put_short) || ++ (req->send.length <= ucp_ep_config(ep)->bcopy_thresh)) ++ { ++ packed_len = ucs_min(req->send.length, rma_config->max_put_short); ++ status = UCS_PROFILE_CALL(uct_ep_put_short, ++ ep->uct_eps[lane], ++ req->send.buffer, ++ packed_len, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey); ++ } else if (ucs_likely(req->send.length < rma_config->put_zcopy_thresh)) { ++ ucp_memcpy_pack_context_t pack_ctx; ++ pack_ctx.src = req->send.buffer; ++ pack_ctx.length = ucs_min(req->send.length, rma_config->max_put_bcopy); ++ packed_len = UCS_PROFILE_CALL(uct_ep_put_bcopy, ++ ep->uct_eps[lane], ++ ucp_memcpy_pack, ++ &pack_ctx, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey); ++ status = (packed_len > 0) ? UCS_OK : (ucs_status_t)packed_len; ++ } else { ++ uct_iov_t iov; ++ ++ /* TODO: leave last fragment for bcopy */ ++ packed_len = ucs_min(req->send.length, rma_config->max_put_zcopy); ++ /* TODO: use ucp_dt_iov_copy_uct */ ++ iov.buffer = (void *)req->send.buffer; ++ iov.length = packed_len; ++ iov.count = 1; ++ iov.memh = req->send.state.dt.dt.contig.memh[0]; ++ ++ status = UCS_PROFILE_CALL(uct_ep_put_zcopy, ++ ep->uct_eps[lane], ++ &iov, 1, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey, ++ &req->send.state.uct_comp); ++ ucp_request_send_state_advance(req, NULL, UCP_REQUEST_SEND_PROTO_RMA, ++ status); ++ } ++ ++ return ucp_rma_request_advance(req, packed_len, status); ++} ++ ++static ucs_status_t ucp_rma_basic_progress_get(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ucp_rkey_h rkey = req->send.rma.rkey; ++ ucp_lane_index_t lane = req->send.lane; ++ ucp_ep_rma_config_t *rma_config = &ucp_ep_config(ep)->rma[lane]; ++ ucs_status_t status; ++ size_t frag_length; ++ ++ ucs_assert(rkey->cache.ep_cfg_index == ep->cfg_index); ++ ucs_assert(rkey->cache.rma_lane == lane); ++ ++ if (ucs_likely(req->send.length < rma_config->get_zcopy_thresh)) { ++ frag_length = ucs_min(rma_config->max_get_bcopy, req->send.length); ++ status = UCS_PROFILE_CALL(uct_ep_get_bcopy, ++ ep->uct_eps[lane], ++ (uct_unpack_callback_t)memcpy, ++ (void*)req->send.buffer, ++ frag_length, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey, ++ &req->send.state.uct_comp); ++ } else { ++ uct_iov_t iov; ++ frag_length = ucs_min(req->send.length, rma_config->max_get_zcopy); ++ iov.buffer = (void *)req->send.buffer; ++ iov.length = frag_length; ++ iov.count = 1; ++ iov.memh = req->send.state.dt.dt.contig.memh[0]; ++ ++ status = UCS_PROFILE_CALL(uct_ep_get_zcopy, ++ ep->uct_eps[lane], ++ &iov, 1, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey, ++ &req->send.state.uct_comp); ++ } ++ ++ if (status == UCS_INPROGRESS) { ++ ucp_request_send_state_advance(req, 0, UCP_REQUEST_SEND_PROTO_RMA, ++ UCS_INPROGRESS); ++ } ++ ++ return ucp_rma_request_advance(req, frag_length, status); ++} ++ ++ucp_rma_proto_t ucp_rma_basic_proto = { ++ .name = "basic_rma", ++ .progress_put = ucp_rma_basic_progress_put, ++ .progress_get = ucp_rma_basic_progress_get ++}; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_send.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_send.c +new file mode 100644 +index 0000000..aaca062 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_send.c +@@ -0,0 +1,341 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++ ++#include ++#include ++ ++ ++#define UCP_RMA_CHECK_BUFFER(_buffer, _action) \ ++ do { \ ++ if (ENABLE_PARAMS_CHECK && ucs_unlikely((_buffer) == NULL)) { \ ++ _action; \ ++ } \ ++ } while (0) ++ ++ ++#define UCP_RMA_CHECK_ZERO_LENGTH(_length, _action) \ ++ do { \ ++ if ((_length) == 0) { \ ++ _action; \ ++ } \ ++ } while (0) ++ ++ ++#define UCP_RMA_CHECK(_context, _buffer, _length) \ ++ do { \ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(_context, UCP_FEATURE_RMA, \ ++ return UCS_ERR_INVALID_PARAM); \ ++ UCP_RMA_CHECK_ZERO_LENGTH(_length, return UCS_OK); \ ++ UCP_RMA_CHECK_BUFFER(_buffer, return UCS_ERR_INVALID_PARAM); \ ++ } while (0) ++ ++ ++#define UCP_RMA_CHECK_PTR(_context, _buffer, _length) \ ++ do { \ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(_context, UCP_FEATURE_RMA, \ ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); \ ++ UCP_RMA_CHECK_ZERO_LENGTH(_length, return NULL); \ ++ UCP_RMA_CHECK_BUFFER(_buffer, \ ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); \ ++ } while (0) ++ ++ ++/* request can be released if ++ * - all fragments were sent (length == 0) (bcopy & zcopy mix) ++ * - all zcopy fragments are done (uct_comp.count == 0) ++ * - and request was allocated from the mpool ++ * (checked in ucp_request_complete_send) ++ * ++ * Request can be released either immediately or in the completion callback. ++ * We must check req length in the completion callback to avoid the following ++ * scenario: ++ * partial_send;no_resos;progress; ++ * send_completed;cb called;req free(ooops); ++ * next_partial_send; (oops req already freed) ++ */ ++ucs_status_t ucp_rma_request_advance(ucp_request_t *req, ssize_t frag_length, ++ ucs_status_t status) ++{ ++ ucs_assert(status != UCS_ERR_NOT_IMPLEMENTED); ++ ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ if (status != UCS_ERR_NO_RESOURCE) { ++ ucp_request_send_buffer_dereg(req); ++ ucp_request_complete_send(req, status); ++ } ++ return status; ++ } ++ ++ ucs_assert(frag_length >= 0); ++ ucs_assert(req->send.length >= frag_length); ++ req->send.length -= frag_length; ++ if (req->send.length == 0) { ++ /* bcopy is the fast path */ ++ if (ucs_likely(req->send.state.uct_comp.count == 0)) { ++ ucp_request_send_buffer_dereg(req); ++ ucp_request_complete_send(req, UCS_OK); ++ } ++ return UCS_OK; ++ } ++ req->send.buffer += frag_length; ++ req->send.rma.remote_addr += frag_length; ++ return UCS_INPROGRESS; ++} ++ ++static void ucp_rma_request_bcopy_completion(uct_completion_t *self, ++ ucs_status_t status) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, ++ send.state.uct_comp); ++ ++ if (ucs_likely(req->send.length == req->send.state.dt.offset)) { ++ ucp_request_complete_send(req, status); ++ } ++} ++ ++static void ucp_rma_request_zcopy_completion(uct_completion_t *self, ++ ucs_status_t status) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, ++ send.state.uct_comp); ++ ++ if (ucs_likely(req->send.length == req->send.state.dt.offset)) { ++ ucp_request_send_buffer_dereg(req); ++ ucp_request_complete_send(req, status); ++ } ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_rma_request_init(ucp_request_t *req, ucp_ep_h ep, const void *buffer, ++ size_t length, uint64_t remote_addr, ucp_rkey_h rkey, ++ uct_pending_callback_t cb, size_t zcopy_thresh, int flags) ++{ ++ req->flags = flags; /* Implicit release */ ++ req->send.ep = ep; ++ req->send.buffer = (void*)buffer; ++ req->send.datatype = ucp_dt_make_contig(1); ++ req->send.mem_type = UCT_MD_MEM_TYPE_HOST; ++ req->send.length = length; ++ req->send.rma.remote_addr = remote_addr; ++ req->send.rma.rkey = rkey; ++ req->send.uct.func = cb; ++ req->send.lane = rkey->cache.rma_lane; ++ ucp_request_send_state_init(req, ucp_dt_make_contig(1), length); ++ ucp_request_send_state_reset(req, ++ (length < zcopy_thresh) ? ++ ucp_rma_request_bcopy_completion : ++ ucp_rma_request_zcopy_completion, ++ UCP_REQUEST_SEND_PROTO_RMA); ++#if ENABLE_ASSERT ++ req->send.cb = NULL; ++#endif ++ if (length < zcopy_thresh) { ++ return UCS_OK; ++ } ++ ++ return ucp_request_send_buffer_reg_lane(req, req->send.lane); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_rma_nonblocking(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ uct_pending_callback_t progress_cb, size_t zcopy_thresh) ++{ ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ req = ucp_request_get(ep->worker); ++ if (req == NULL) { ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ status = ucp_rma_request_init(req, ep, buffer, length, remote_addr, rkey, ++ progress_cb, zcopy_thresh, ++ UCP_REQUEST_FLAG_RELEASED); ++ if (ucs_unlikely(status != UCS_OK)) { ++ return status; ++ } ++ ++ return ucp_request_send(req); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_ptr_t ++ucp_rma_nonblocking_cb(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ uct_pending_callback_t progress_cb, size_t zcopy_thresh, ++ ucp_send_callback_t cb) ++{ ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ req = ucp_request_get(ep->worker); ++ if (req == NULL) { ++ return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); ++ } ++ ++ status = ucp_rma_request_init(req, ep, buffer, length, remote_addr, rkey, ++ progress_cb, zcopy_thresh, 0); ++ if (ucs_unlikely(status != UCS_OK)) { ++ return UCS_STATUS_PTR(status); ++ } ++ ++ return ucp_rma_send_request_cb(req, cb); ++} ++ ++ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ ucp_ep_rma_config_t *rma_config; ++ ucs_status_t status; ++ ++ UCP_RMA_CHECK(ep->worker->context, buffer, length); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ ucs_trace_req("put_nbi buffer %p length %zu remote_addr %"PRIx64" rkey %p to %s", ++ buffer, length, remote_addr, rkey, ucp_ep_peer_name(ep)); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, rma); ++ if (status != UCS_OK) { ++ goto out_unlock; ++ } ++ ++ /* Fast path for a single short message */ ++ if (ucs_likely((ssize_t)length <= (int)rkey->cache.max_put_short)) { ++ status = UCS_PROFILE_CALL(uct_ep_put_short, ep->uct_eps[rkey->cache.rma_lane], ++ buffer, length, remote_addr, rkey->cache.rma_rkey); ++ if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { ++ goto out_unlock; ++ } ++ } ++ ++ rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; ++ status = ucp_rma_nonblocking(ep, buffer, length, remote_addr, rkey, ++ rkey->cache.rma_proto->progress_put, ++ rma_config->put_zcopy_thresh); ++out_unlock: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status; ++} ++ ++ucs_status_ptr_t ucp_put_nb(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb) ++{ ++ ucp_ep_rma_config_t *rma_config; ++ ucs_status_ptr_t ptr_status; ++ ucs_status_t status; ++ ++ UCP_RMA_CHECK_PTR(ep->worker->context, buffer, length); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ ucs_trace_req("put_nb buffer %p length %zu remote_addr %"PRIx64" rkey %p to %s cb %p", ++ buffer, length, remote_addr, rkey, ucp_ep_peer_name(ep), cb); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, rma); ++ if (status != UCS_OK) { ++ ptr_status = UCS_STATUS_PTR(status); ++ goto out_unlock; ++ } ++ ++ /* Fast path for a single short message */ ++ if (ucs_likely((ssize_t)length <= (int)rkey->cache.max_put_short)) { ++ status = UCS_PROFILE_CALL(uct_ep_put_short, ep->uct_eps[rkey->cache.rma_lane], ++ buffer, length, remote_addr, rkey->cache.rma_rkey); ++ if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { ++ ptr_status = UCS_STATUS_PTR(status); ++ goto out_unlock; ++ } ++ } ++ ++ rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; ++ ptr_status = ucp_rma_nonblocking_cb(ep, buffer, length, remote_addr, rkey, ++ rkey->cache.rma_proto->progress_put, ++ rma_config->put_zcopy_thresh, cb); ++out_unlock: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return ptr_status; ++} ++ ++ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ ucp_ep_rma_config_t *rma_config; ++ ucs_status_t status; ++ ++ UCP_RMA_CHECK(ep->worker->context, buffer, length); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ ucs_trace_req("get_nbi buffer %p length %zu remote_addr %"PRIx64" rkey %p from %s", ++ buffer, length, remote_addr, rkey, ucp_ep_peer_name(ep)); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, rma); ++ if (status != UCS_OK) { ++ goto out_unlock; ++ } ++ ++ rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; ++ status = ucp_rma_nonblocking(ep, buffer, length, remote_addr, rkey, ++ rkey->cache.rma_proto->progress_get, ++ rma_config->get_zcopy_thresh); ++out_unlock: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status; ++} ++ ++ucs_status_ptr_t ucp_get_nb(ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb) ++{ ++ ucp_ep_rma_config_t *rma_config; ++ ucs_status_ptr_t ptr_status; ++ ucs_status_t status; ++ ++ UCP_RMA_CHECK_PTR(ep->worker->context, buffer, length); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ ucs_trace_req("get_nb buffer %p length %zu remote_addr %"PRIx64" rkey %p from %s cb %p", ++ buffer, length, remote_addr, rkey, ucp_ep_peer_name(ep), cb); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, rma); ++ if (status != UCS_OK) { ++ ptr_status = UCS_STATUS_PTR(status); ++ goto out_unlock; ++ } ++ ++ rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; ++ ptr_status = ucp_rma_nonblocking_cb(ep, buffer, length, remote_addr, rkey, ++ rkey->cache.rma_proto->progress_get, ++ rma_config->get_zcopy_thresh, cb); ++out_unlock: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return ptr_status; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_put, (ep, buffer, length, remote_addr, rkey), ++ ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ return ucp_rma_wait(ep->worker, ++ ucp_put_nb(ep, buffer, length, remote_addr, rkey, ++ (void*)ucs_empty_function), ++ "put"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_get, (ep, buffer, length, remote_addr, rkey), ++ ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ return ucp_rma_wait(ep->worker, ++ ucp_get_nb(ep, buffer, length, remote_addr, rkey, ++ (void*)ucs_empty_function), ++ "get"); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_sw.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_sw.c +new file mode 100644 +index 0000000..bd40e85 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_sw.c +@@ -0,0 +1,294 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++#include ++ ++ ++static size_t ucp_rma_sw_put_pack_cb(void *dest, void *arg) ++{ ++ ucp_request_t *req = arg; ++ ucp_ep_t *ep = req->send.ep; ++ ucp_put_hdr_t *puth = dest; ++ size_t length; ++ ++ puth->address = req->send.rma.remote_addr; ++ puth->ep_ptr = ucp_ep_dest_ep_ptr(ep); ++ ++ ucs_assert(puth->ep_ptr != 0); ++ ++ length = ucs_min(req->send.length, ++ ucp_ep_config(ep)->am.max_bcopy - sizeof(*puth)); ++ memcpy(puth + 1, req->send.buffer, length); ++ ++ return sizeof(*puth) + length; ++} ++ ++static ucs_status_t ucp_rma_sw_progress_put(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ssize_t packed_len; ++ ucs_status_t status; ++ ++ ucs_assert(req->send.lane == ucp_ep_get_am_lane(ep)); ++ ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_PUT, ++ ucp_rma_sw_put_pack_cb, req, 0); ++ if (packed_len > 0) { ++ status = UCS_OK; ++ ucp_ep_rma_remote_request_sent(ep); ++ } else { ++ status = (ucs_status_t)packed_len; ++ } ++ ++ return ucp_rma_request_advance(req, packed_len - sizeof(ucp_put_hdr_t), ++ status); ++} ++ ++static size_t ucp_rma_sw_get_req_pack_cb(void *dest, void *arg) ++{ ++ ucp_request_t *req = arg; ++ ucp_get_req_hdr_t *getreqh = dest; ++ ++ getreqh->address = req->send.rma.remote_addr; ++ getreqh->length = req->send.length; ++ getreqh->req.ep_ptr = ucp_ep_dest_ep_ptr(req->send.ep); ++ getreqh->req.reqptr = (uintptr_t)req; ++ ucs_assert(getreqh->req.ep_ptr != 0); ++ ++ return sizeof(*getreqh); ++} ++ ++static ucs_status_t ucp_rma_sw_progress_get(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ucs_status_t status; ++ ssize_t packed_len; ++ ++ ucs_assert(req->send.lane == ucp_ep_get_am_lane(ep)); ++ ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_GET_REQ, ++ ucp_rma_sw_get_req_pack_cb, req, 0); ++ if (packed_len < 0) { ++ status = (ucs_status_t)packed_len; ++ if (status != UCS_ERR_NO_RESOURCE) { ++ ucp_request_complete_send(req, status); ++ } ++ return status; ++ } ++ ++ /* get request packet sent, complete the request object when all data arrives */ ++ ucs_assert(packed_len == sizeof(ucp_get_req_hdr_t)); ++ ucp_ep_rma_remote_request_sent(ep); ++ return UCS_OK; ++} ++ ++ucp_rma_proto_t ucp_rma_sw_proto = { ++ .name = "sw_rma", ++ .progress_put = ucp_rma_sw_progress_put, ++ .progress_get = ucp_rma_sw_progress_get ++}; ++ ++static size_t ucp_rma_sw_pack_rma_ack(void *dest, void *arg) ++{ ++ ucp_cmpl_hdr_t *hdr = dest; ++ ucp_request_t *req = arg; ++ ++ hdr->ep_ptr = ucp_ep_dest_ep_ptr(req->send.ep); ++ return sizeof(*hdr); ++} ++ ++static ucs_status_t ucp_progress_rma_cmpl(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ssize_t packed_len; ++ ++ req->send.lane = ucp_ep_get_am_lane(ep); ++ ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_CMPL, ++ ucp_rma_sw_pack_rma_ack, req, 0); ++ if (packed_len < 0) { ++ return (ucs_status_t)packed_len; ++ } ++ ++ ucs_assert(packed_len == sizeof(ucp_cmpl_hdr_t)); ++ ucp_request_put(req); ++ return UCS_OK; ++} ++ ++void ucp_rma_sw_send_cmpl(ucp_ep_h ep) ++{ ++ ucp_request_t *req; ++ ++ req = ucp_request_get(ep->worker); ++ ucs_assert(req != NULL); ++ ++ req->send.ep = ep; ++ req->send.uct.func = ucp_progress_rma_cmpl; ++ ucp_request_send(req); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_put_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_put_hdr_t *puth = data; ++ ucp_worker_h worker = arg; ++ ++ memcpy((void*)puth->address, puth + 1, length - sizeof(*puth)); ++ ucp_rma_sw_send_cmpl(ucp_worker_get_ep_by_ptr(worker, puth->ep_ptr)); ++ return UCS_OK; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_rma_cmpl_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_cmpl_hdr_t *putackh = data; ++ ucp_worker_h worker = arg; ++ ucp_ep_h ep = ucp_worker_get_ep_by_ptr(worker, putackh->ep_ptr); ++ ++ ucp_ep_rma_remote_request_completed(ep); ++ return UCS_OK; ++} ++ ++static size_t ucp_rma_sw_pack_get_reply(void *dest, void *arg) ++{ ++ ucp_rma_rep_hdr_t *hdr = dest; ++ ucp_request_t *req = arg; ++ size_t length; ++ ++ length = ucs_min(req->send.length, ++ ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr)); ++ hdr->req = req->send.get_reply.req; ++ memcpy(hdr + 1, req->send.buffer, length); ++ ++ return sizeof(*hdr) + length; ++} ++ ++static ucs_status_t ucp_progress_get_reply(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ssize_t packed_len, payload_len; ++ ++ req->send.lane = ucp_ep_get_am_lane(ep); ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_GET_REP, ++ ucp_rma_sw_pack_get_reply, req, 0); ++ if (packed_len < 0) { ++ return (ucs_status_t)packed_len; ++ } ++ ++ payload_len = packed_len - sizeof(ucp_rma_rep_hdr_t); ++ ucs_assert(payload_len >= 0); ++ ++ req->send.buffer += payload_len; ++ req->send.length -= payload_len; ++ ++ if (req->send.length == 0) { ++ ucp_request_put(req); ++ return UCS_OK; ++ } else { ++ return UCS_INPROGRESS; ++ } ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_get_req_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_get_req_hdr_t *getreqh = data; ++ ucp_worker_h worker = arg; ++ ucp_ep_h ep = ucp_worker_get_ep_by_ptr(worker, ++ getreqh->req.ep_ptr); ++ ucp_request_t *req; ++ ++ req = ucp_request_get(worker); ++ ucs_assert(req != NULL); ++ ++ req->send.ep = ep; ++ req->send.buffer = (void*)getreqh->address; ++ req->send.length = getreqh->length; ++ req->send.get_reply.req = getreqh->req.reqptr; ++ req->send.uct.func = ucp_progress_get_reply; ++ ++ ucp_request_send(req); ++ return UCS_OK; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_get_rep_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_rma_rep_hdr_t *getreph = data; ++ size_t frag_length = length - sizeof(*getreph); ++ ucp_request_t *req = (ucp_request_t*)getreph->req; ++ ucp_ep_h ep = req->send.ep; ++ ++ memcpy(req->send.buffer, getreph + 1, frag_length); ++ ++ /* complete get request on last fragment of the reply */ ++ if (ucp_rma_request_advance(req, frag_length, UCS_OK) == UCS_OK) { ++ ucp_ep_rma_remote_request_completed(ep); ++ } ++ ++ return UCS_OK; ++} ++ ++static void ucp_rma_sw_dump_packet(ucp_worker_h worker, uct_am_trace_type_t type, ++ uint8_t id, const void *data, size_t length, ++ char *buffer, size_t max) ++{ ++ const ucp_get_req_hdr_t *geth; ++ const ucp_rma_rep_hdr_t *reph; ++ const ucp_cmpl_hdr_t *cmplh; ++ const ucp_put_hdr_t *puth; ++ size_t header_len; ++ char *p; ++ ++ switch (id) { ++ case UCP_AM_ID_PUT: ++ puth = data; ++ snprintf(buffer, max, "PUT [addr 0x%lx ep_ptr 0x%lx]", puth->address, ++ puth->ep_ptr); ++ header_len = sizeof(*puth); ++ break; ++ case UCP_AM_ID_GET_REQ: ++ geth = data; ++ snprintf(buffer, max, "GET_REQ [addr 0x%lx len %zu reqptr 0x%lx ep 0x%lx]", ++ geth->address, geth->length, geth->req.reqptr, geth->req.ep_ptr); ++ return; ++ case UCP_AM_ID_GET_REP: ++ reph = data; ++ snprintf(buffer, max, "GET_REP [reqptr 0x%lx]", reph->req); ++ header_len = sizeof(*reph); ++ break; ++ case UCP_AM_ID_CMPL: ++ cmplh = data; ++ snprintf(buffer, max, "CMPL [ep_ptr 0x%lx]", cmplh->ep_ptr); ++ return; ++ default: ++ return; ++ } ++ ++ p = buffer + strlen(buffer); ++ ucp_dump_payload(worker->context, p, buffer + max - p, data + header_len, ++ length - header_len); ++} ++ ++UCP_DEFINE_AM(UCP_FEATURE_RMA, UCP_AM_ID_PUT, ucp_put_handler, ++ ucp_rma_sw_dump_packet, 0); ++UCP_DEFINE_AM(UCP_FEATURE_RMA, UCP_AM_ID_GET_REQ, ucp_get_req_handler, ++ ucp_rma_sw_dump_packet, 0); ++UCP_DEFINE_AM(UCP_FEATURE_RMA, UCP_AM_ID_GET_REP, ucp_get_rep_handler, ++ ucp_rma_sw_dump_packet, 0); ++UCP_DEFINE_AM(UCP_FEATURE_RMA|UCP_FEATURE_AMO, UCP_AM_ID_CMPL, ++ ucp_rma_cmpl_handler, ucp_rma_sw_dump_packet, 0); ++ ++UCP_DEFINE_AM_PROXY(UCP_AM_ID_PUT); ++UCP_DEFINE_AM_PROXY(UCP_AM_ID_GET_REQ); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream.h +index 5e98a0d..06c5bb2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream.h +@@ -8,10 +8,12 @@ + #define UCP_STREAM_H_ + + #include ++#include + #include + ++ + typedef struct { +- uint64_t sender_uuid; ++ uintptr_t ep_ptr; + } UCS_S_PACKED ucp_stream_am_hdr_t; + + +@@ -23,51 +25,44 @@ typedef struct { + } UCS_S_PACKED ucp_stream_am_data_t; + + +-/** +- * Stream specific endpoint flags +- */ +-enum { +- UCP_EP_STREAM_FLAG_IS_QUEUED = UCS_BIT(0), /* EP is queued in stream list of +- worker */ +- UCP_EP_STREAM_FLAG_HAS_DATA = UCS_BIT(1), /* EP has data in the match_q */ +- UCP_EP_STREAM_FLAG_VALID = UCS_BIT(2) /* EP is valid. EP can be +- invalidated by ucp_ep_close_cb +- (all incoming data will be +- dropped) then returned back by +- ucp_ep_create if internal +- connection is still alive */ +-}; +- +- +-static UCS_F_ALWAYS_INLINE void +-ucp_stream_ep_enqueue(ucp_ep_ext_stream_t *ep, ucp_worker_h worker) ++void ucp_stream_ep_init(ucp_ep_h ep); ++ ++void ucp_stream_ep_cleanup(ucp_ep_h ep); ++ ++void ucp_stream_ep_activate(ucp_ep_h ep); ++ ++ ++static UCS_F_ALWAYS_INLINE int ucp_stream_ep_is_queued(ucp_ep_ext_proto_t *ep_ext) ++{ ++ return ep_ext->stream.ready_list.next != NULL; ++} ++ ++static UCS_F_ALWAYS_INLINE int ucp_stream_ep_has_data(ucp_ep_ext_proto_t *ep_ext) + { +- ucs_assert(!(ep->flags & UCP_EP_STREAM_FLAG_IS_QUEUED)); +- ucs_list_add_tail(&worker->stream_eps, &ep->list); +- ep->flags |= UCP_EP_STREAM_FLAG_IS_QUEUED; ++ return ucp_ep_from_ext_proto(ep_ext)->flags & UCP_EP_FLAG_STREAM_HAS_DATA; + } + +-static UCS_F_ALWAYS_INLINE int +-ucp_stream_ep_is_queued(ucp_ep_ext_stream_t *ep) ++static UCS_F_ALWAYS_INLINE ++void ucp_stream_ep_enqueue(ucp_ep_ext_proto_t *ep_ext, ucp_worker_h worker) + { +- return ep->flags & UCP_EP_STREAM_FLAG_IS_QUEUED; ++ ucs_assert(!ucp_stream_ep_is_queued(ep_ext)); ++ ucs_list_add_tail(&worker->stream_ready_eps, &ep_ext->stream.ready_list); + } + +-static UCS_F_ALWAYS_INLINE void +-ucp_stream_ep_dequeue(ucp_ep_ext_stream_t *ep) ++static UCS_F_ALWAYS_INLINE void ucp_stream_ep_dequeue(ucp_ep_ext_proto_t *ep_ext) + { +- ucs_assert(ep->flags & UCP_EP_STREAM_FLAG_IS_QUEUED); +- ep->flags &= ~UCP_EP_STREAM_FLAG_IS_QUEUED; +- ucs_list_del(&ep->list); ++ ucs_list_del(&ep_ext->stream.ready_list); ++ ep_ext->stream.ready_list.next = NULL; + } + +-static UCS_F_ALWAYS_INLINE ucp_ep_ext_stream_t * ++static UCS_F_ALWAYS_INLINE ucp_ep_ext_proto_t* + ucp_stream_worker_dequeue_ep_head(ucp_worker_h worker) + { +- ucp_ep_ext_stream_t *ep = ucs_list_head(&worker->stream_eps, +- ucp_ep_ext_stream_t, list); +- ucp_stream_ep_dequeue(ep); +- return ep; ++ ucp_ep_ext_proto_t *ep_ext = ucs_list_head(&worker->stream_ready_eps, ++ ucp_ep_ext_proto_t, ++ stream.ready_list); ++ ucp_stream_ep_dequeue(ep_ext); ++ return ep_ext; + } + + #endif /* UCP_STREAM_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_recv.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_recv.c +index dbbf082..e2d0828 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_recv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_recv.c +@@ -12,9 +12,7 @@ + #include + + #include +-#include +- +-#include /* TODO: remove ucp_eager_sync_hdr_t usage */ ++#include + + + /* @verbatim +@@ -59,17 +57,16 @@ + + + static UCS_F_ALWAYS_INLINE ucp_recv_desc_t * +-ucp_stream_rdesc_dequeue(ucp_ep_ext_stream_t *ep_stream) ++ucp_stream_rdesc_dequeue(ucp_ep_ext_proto_t *ep_ext) + { +- ucp_recv_desc_t *rdesc = ucs_queue_pull_elem_non_empty(&ep_stream->match_q, ++ ucp_recv_desc_t *rdesc = ucs_queue_pull_elem_non_empty(&ep_ext->stream.match_q, + ucp_recv_desc_t, + stream_queue); +- ucs_assert(ep_stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA); +- +- if (ucs_unlikely(ucs_queue_is_empty(&ep_stream->match_q))) { +- ep_stream->flags &= ~UCP_EP_STREAM_FLAG_HAS_DATA; +- if (ucp_stream_ep_is_queued(ep_stream)) { +- ucp_stream_ep_dequeue(ep_stream); ++ ucs_assert(ucp_stream_ep_has_data(ep_ext)); ++ if (ucs_unlikely(ucs_queue_is_empty(&ep_ext->stream.match_q))) { ++ ucp_ep_from_ext_proto(ep_ext)->flags &= ~UCP_EP_FLAG_STREAM_HAS_DATA; ++ if (ucp_stream_ep_is_queued(ep_ext)) { ++ ucp_stream_ep_dequeue(ep_ext); + } + } + +@@ -77,35 +74,31 @@ ucp_stream_rdesc_dequeue(ucp_ep_ext_stream_t *ep_stream) + } + + static UCS_F_ALWAYS_INLINE ucp_recv_desc_t * +-ucp_stream_rdesc_get(ucp_ep_ext_stream_t *ep_stream) ++ucp_stream_rdesc_get(ucp_ep_ext_proto_t *ep_ext) + { +- ucp_recv_desc_t *rdesc = ucs_queue_head_elem_non_empty(&ep_stream->match_q, ++ ucp_recv_desc_t *rdesc = ucs_queue_head_elem_non_empty(&ep_ext->stream.match_q, + ucp_recv_desc_t, + stream_queue); + +- ucs_assert(ep_stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA); ++ ucs_assert(ucp_stream_ep_has_data(ep_ext)); + ucs_trace_data("ep %p, rdesc %p with %u stream bytes", +- ep_stream->ucp_ep, rdesc, rdesc->length); ++ ucp_ep_from_ext_proto(ep_ext), rdesc, rdesc->length); + + return rdesc; + } + +-UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_data_nb, +- (ep, length), ucp_ep_h ep, size_t *length) ++static UCS_F_ALWAYS_INLINE ucs_status_ptr_t ++ucp_stream_recv_data_nb_nolock(ucp_ep_h ep, size_t *length) + { ++ ucp_ep_ext_proto_t *ep_ext = ucp_ep_ext_proto(ep); + ucp_recv_desc_t *rdesc; + ucp_stream_am_data_t *am_data; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- if (ucs_unlikely(!(ep->ext.stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA))) { +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ if (ucs_unlikely(!ucp_stream_ep_has_data(ep_ext))) { + return UCS_STATUS_PTR(UCS_OK); + } + +- rdesc = ucp_stream_rdesc_dequeue(ep->ext.stream); +- +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ rdesc = ucp_stream_rdesc_dequeue(ep_ext); + + *length = rdesc->length; + am_data = ucp_stream_rdesc_am_data(rdesc); +@@ -113,27 +106,31 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_data_nb, + return am_data + 1; + } + +-static UCS_F_ALWAYS_INLINE void +-ucp_stream_rdesc_release(ucp_recv_desc_t *rdesc) ++UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_data_nb, (ep, length), ++ ucp_ep_h ep, size_t *length) + { +- if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_UCT_DESC)) { +- uct_iface_release_desc(UCS_PTR_BYTE_OFFSET(rdesc, +- -sizeof(ucp_eager_sync_hdr_t))); +- } else { +- ucs_mpool_put_inline(rdesc); +- } ++ ucs_status_ptr_t status_ptr; ++ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_STREAM, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ status_ptr = ucp_stream_recv_data_nb_nolock(ep, length); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ ++ return status_ptr; + } + + static UCS_F_ALWAYS_INLINE void + ucp_stream_rdesc_dequeue_and_release(ucp_recv_desc_t *rdesc, +- ucp_ep_ext_stream_t *ep) ++ ucp_ep_ext_proto_t *ep_ext) + { +- ucs_assert(ep->flags & UCP_EP_STREAM_FLAG_HAS_DATA); +- ucs_assert(rdesc == ucs_queue_head_elem_non_empty(&ep->match_q, ++ ucs_assert(ucp_stream_ep_has_data(ep_ext)); ++ ucs_assert(rdesc == ucs_queue_head_elem_non_empty(&ep_ext->stream.match_q, + ucp_recv_desc_t, + stream_queue)); +- ucp_stream_rdesc_dequeue(ep); +- ucp_stream_rdesc_release(rdesc); ++ ucp_stream_rdesc_dequeue(ep_ext); ++ ucp_recv_desc_release(rdesc); + } + + UCS_PROFILE_FUNC_VOID(ucp_stream_data_release, (ep, data), +@@ -141,23 +138,31 @@ UCS_PROFILE_FUNC_VOID(ucp_stream_data_release, (ep, data), + { + ucp_recv_desc_t *rdesc = ucp_stream_rdesc_from_data(data); + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + +- ucp_stream_rdesc_release(rdesc); ++ ucp_recv_desc_release(rdesc); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + } + + static UCS_F_ALWAYS_INLINE ssize_t + ucp_stream_rdata_unpack(const void *rdata, size_t length, ucp_request_t *dst_req) + { +- /* Truncated error is not actual for stream, need to adjust */ +- size_t valid_len = ucs_min((dst_req->recv.length - +- dst_req->recv.stream.offset), length); ++ size_t valid_len; ++ int last; + ucs_status_t status; + ++ /* Truncated error is not actual for stream, need to adjust */ ++ valid_len = dst_req->recv.length - dst_req->recv.stream.offset; ++ if (valid_len <= length) { ++ last = (valid_len == length); ++ } else { ++ valid_len = length; ++ last = !(dst_req->flags & UCP_REQUEST_FLAG_STREAM_RECV_WAITALL); ++ } ++ + status = ucp_request_recv_data_unpack(dst_req, rdata, valid_len, +- dst_req->recv.stream.offset, 1); ++ dst_req->recv.stream.offset, last); + if (ucs_likely(status == UCS_OK)) { + dst_req->recv.stream.offset += valid_len; + ucs_trace_data("unpacked %zd bytes of stream data %p", +@@ -171,14 +176,14 @@ ucp_stream_rdata_unpack(const void *rdata, size_t length, ucp_request_t *dst_req + + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_stream_rdesc_advance(ucp_recv_desc_t *rdesc, ssize_t offset, +- ucp_ep_ext_stream_t *ep) ++ ucp_ep_ext_proto_t *ep_ext) + { + ucs_assert(offset <= rdesc->length); + + if (ucs_unlikely(offset < 0)) { + return offset; + } else if (ucs_likely(offset == rdesc->length)) { +- ucp_stream_rdesc_dequeue_and_release(rdesc, ep); ++ ucp_stream_rdesc_dequeue_and_release(rdesc, ep_ext); + } else { + rdesc->length -= offset; + rdesc->payload_offset += offset; +@@ -190,22 +195,27 @@ ucp_stream_rdesc_advance(ucp_recv_desc_t *rdesc, ssize_t offset, + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_stream_process_rdesc_inplace(ucp_recv_desc_t *rdesc, ucp_datatype_t dt, + void *buffer, size_t count, size_t length, +- ucp_ep_ext_stream_t *ep_stream) ++ ucp_ep_ext_proto_t *ep_ext) + { + ucs_status_t status; + ssize_t unpacked; ++ uct_memory_type_t mem_type; ++ ++ ++ ucp_memory_type_detect_mds(ucp_ep_from_ext_proto(ep_ext)->worker->context, buffer, ++ length, &mem_type); + +- status = ucp_dt_unpack_only(ep_stream->ucp_ep->worker, buffer, count, dt, +- UCT_MD_MEM_TYPE_HOST, ucp_stream_rdesc_payload(rdesc), +- length, 0); ++ status = ucp_dt_unpack_only(ucp_ep_from_ext_proto(ep_ext)->worker, buffer, ++ count, dt, mem_type, ++ ucp_stream_rdesc_payload(rdesc), length, 0); + + unpacked = ucs_likely(status == UCS_OK) ? length : status; + +- return ucp_stream_rdesc_advance(rdesc, unpacked, ep_stream); ++ return ucp_stream_rdesc_advance(rdesc, unpacked, ep_ext); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_stream_process_rdesc(ucp_recv_desc_t *rdesc, ucp_ep_ext_stream_t *ep_stream, ++ucp_stream_process_rdesc(ucp_recv_desc_t *rdesc, ucp_ep_ext_proto_t *ep_ext, + ucp_request_t *req) + { + ssize_t unpacked; +@@ -214,36 +224,41 @@ ucp_stream_process_rdesc(ucp_recv_desc_t *rdesc, ucp_ep_ext_stream_t *ep_stream, + rdesc->length, req); + ucs_assert(req->recv.stream.offset <= req->recv.length); + +- return ucp_stream_rdesc_advance(rdesc, unpacked, ep_stream); ++ return ucp_stream_rdesc_advance(rdesc, unpacked, ep_ext); + } + + static UCS_F_ALWAYS_INLINE void +-ucp_stream_recv_request_init(ucp_request_t *req, void *buffer, size_t count, +- size_t length, ucp_datatype_t datatype, +- ucp_stream_recv_callback_t cb) ++ucp_stream_recv_request_init(ucp_request_t *req, ucp_ep_h ep, void *buffer, ++ size_t count, size_t length, ++ ucp_datatype_t datatype, ++ ucp_stream_recv_callback_t cb, ++ uint16_t request_flags) + { +- req->flags = UCP_REQUEST_FLAG_CALLBACK | +- UCP_REQUEST_FLAG_STREAM_RECV; ++ req->flags = UCP_REQUEST_FLAG_CALLBACK | request_flags; + #if ENABLE_ASSERT ++ req->flags |= UCP_REQUEST_FLAG_STREAM_RECV; + req->status = UCS_OK; /* for ucp_request_recv_data_unpack() */ + #endif + req->recv.stream.cb = cb; + req->recv.stream.length = 0; + req->recv.stream.offset = 0; + ++ ucp_dt_recv_state_init(&req->recv.state, buffer, datatype, count); ++ ++ req->recv.worker = ep->worker; + req->recv.buffer = buffer; + req->recv.datatype = datatype; +- req->recv.length = length; +- req->recv.mem_type = UCT_MD_MEM_TYPE_HOST; +- +- ucp_dt_recv_state_init(&req->recv.state, buffer, datatype, count); ++ req->recv.length = ucs_likely(!UCP_DT_IS_GENERIC(datatype)) ? length : ++ ucp_dt_length(datatype, count, NULL, &req->recv.state); ++ ucp_memory_type_detect_mds(ep->worker->context, (void *)buffer, ++ req->recv.length, &req->recv.mem_type); + } + + static UCS_F_ALWAYS_INLINE int +-ucp_stream_recv_nb_is_inplace(ucp_ep_ext_stream_t *ep, size_t dt_length) ++ucp_stream_recv_nb_is_inplace(ucp_ep_ext_proto_t *ep_ext, size_t dt_length) + { +- return (ep->flags & UCP_EP_STREAM_FLAG_HAS_DATA) && +- (ucp_stream_rdesc_get(ep)->length >= dt_length); ++ return ucp_stream_ep_has_data(ep_ext) && ++ (ucp_stream_rdesc_get(ep_ext)->length >= dt_length); + } + + UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_nb, +@@ -253,27 +268,26 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_nb, + size_t *length, unsigned flags) + { + ucs_status_t status = UCS_OK; +- ucp_ep_ext_stream_t *ep_stream = ep->ext.stream; ++ ucp_ep_ext_proto_t *ep_ext = ucp_ep_ext_proto(ep); + size_t dt_length; + ucp_request_t *req; +- ucs_status_ptr_t rdesc; +- ucp_dt_state_t dt_state; +- +- if (UCP_DT_IS_GENERIC(datatype)) { +- ucs_error("ucp_stream_recv_nb doesn't support generic datatype"); +- return UCS_STATUS_PTR(UCS_ERR_NOT_IMPLEMENTED); +- } +- +- dt_length = ucp_dt_length(datatype, count, buffer, &dt_state); +- +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- if (ucs_likely(ucp_stream_recv_nb_is_inplace(ep_stream, dt_length))) { +- status = ucp_stream_process_rdesc_inplace(ucp_stream_rdesc_get(ep_stream), +- datatype, buffer, count, +- dt_length, ep_stream); +- *length = dt_length; +- goto out_status; ++ ucp_recv_desc_t *rdesc; ++ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_STREAM, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ if (ucs_likely(!UCP_DT_IS_GENERIC(datatype))) { ++ dt_length = ucp_dt_length(datatype, count, buffer, NULL); ++ if (ucs_likely(ucp_stream_recv_nb_is_inplace(ep_ext, dt_length))) { ++ status = ucp_stream_process_rdesc_inplace(ucp_stream_rdesc_get(ep_ext), ++ datatype, buffer, count, ++ dt_length, ep_ext); ++ *length = dt_length; ++ goto out_status; ++ } ++ } else { ++ dt_length = 0; /* Suppress warnings of paranoid compilers */ + } + + req = ucp_request_get(ep->worker); +@@ -282,17 +296,29 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_nb, + goto out_status; + } + +- ucp_stream_recv_request_init(req, buffer, count, dt_length, datatype, cb); ++ ucp_stream_recv_request_init(req, ep, buffer, count, dt_length, datatype, ++ cb, (flags & UCP_STREAM_RECV_FLAG_WAITALL) ? ++ UCP_REQUEST_FLAG_STREAM_RECV_WAITALL : 0); + + /* OK, lets obtain all arrived data which matches the recv size */ + while ((req->recv.stream.offset < req->recv.length) && +- (ep_stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA)) { ++ ucp_stream_ep_has_data(ep_ext)) { + +- rdesc = ucp_stream_rdesc_get(ep_stream); +- status = ucp_stream_process_rdesc(rdesc, ep_stream, req); ++ rdesc = ucp_stream_rdesc_get(ep_ext); ++ status = ucp_stream_process_rdesc(rdesc, ep_ext, req); + if (ucs_unlikely(status != UCS_OK)) { + goto out_put_request; + } ++ ++ /* ++ * NOTE: generic datatype can be completed with any amount of data to ++ * avoid extra logic in ucp_stream_process_rdesc, exception is ++ * WAITALL flag ++ */ ++ if (ucs_unlikely(UCP_DT_IS_GENERIC(req->recv.datatype)) && ++ !(req->flags & UCP_REQUEST_FLAG_STREAM_RECV_WAITALL)) { ++ break; ++ } + } + + ucs_assert(req->recv.stream.offset <= req->recv.length); +@@ -300,8 +326,8 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_nb, + if (ucp_request_can_complete_stream_recv(req)) { + *length = req->recv.stream.offset; + } else { +- ucs_assert(!(ep_stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA)); +- ucs_queue_push(&ep_stream->match_q, &req->recv.queue); ++ ucs_assert(!ucp_stream_ep_has_data(ep_ext)); ++ ucs_queue_push(&ep_ext->stream.match_q, &req->recv.queue); + req += 1; + goto out; + } +@@ -313,12 +339,12 @@ out_status: + req = UCS_STATUS_PTR(status); + + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return req; + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_stream_t *ep, ++ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_proto_t *ep_ext, + ucp_stream_am_data_t *am_data, size_t length, + unsigned am_flags) + { +@@ -334,10 +360,10 @@ ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_stream_t *ep, + place */ + + /* First, process expected requests */ +- if (!(ep->flags & UCP_EP_STREAM_FLAG_HAS_DATA)) { +- while (!ucs_queue_is_empty(&ep->match_q)) { +- req = ucs_queue_head_elem_non_empty(&ep->match_q, ucp_request_t, +- recv.queue); ++ if (!ucp_stream_ep_has_data(ep_ext)) { ++ while (!ucs_queue_is_empty(&ep_ext->stream.match_q)) { ++ req = ucs_queue_head_elem_non_empty(&ep_ext->stream.match_q, ++ ucp_request_t, recv.queue); + payload = UCS_PTR_BYTE_OFFSET(am_data, rdesc_tmp.payload_offset); + unpacked = ucp_stream_rdata_unpack(payload, rdesc_tmp.length, req); + if (ucs_unlikely(unpacked < 0)) { +@@ -345,14 +371,14 @@ ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_stream_t *ep, + am_data, rdesc_tmp.payload_offset, req); + } else if (unpacked == rdesc_tmp.length) { + if (ucp_request_can_complete_stream_recv(req)) { +- ucp_request_complete_stream_recv(req, ep, UCS_OK); ++ ucp_request_complete_stream_recv(req, ep_ext, UCS_OK); + } + return UCS_OK; + } +- ucp_stream_rdesc_advance(&rdesc_tmp, unpacked, ep); ++ ucp_stream_rdesc_advance(&rdesc_tmp, unpacked, ep_ext); + /* This request is full, try next one */ + ucs_assert(ucp_request_can_complete_stream_recv(req)); +- ucp_request_complete_stream_recv(req, ep, UCS_OK); ++ ucp_request_complete_stream_recv(req, ep_ext, UCS_OK); + } + } + +@@ -375,43 +401,76 @@ ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_stream_t *ep, + rdesc = (ucp_recv_desc_t *)am_data - 1; + rdesc->length = rdesc_tmp.length; + rdesc->payload_offset = rdesc_tmp.payload_offset + sizeof(*rdesc); ++ rdesc->priv_length = 0; + rdesc->flags = UCP_RECV_DESC_FLAG_UCT_DESC; + } + +- ep->flags |= UCP_EP_STREAM_FLAG_HAS_DATA; +- ucs_queue_push(&ep->match_q, &rdesc->stream_queue); ++ ucp_ep_from_ext_proto(ep_ext)->flags |= UCP_EP_FLAG_STREAM_HAS_DATA; ++ ucs_queue_push(&ep_ext->stream.match_q, &rdesc->stream_queue); + + return UCS_INPROGRESS; + } + ++void ucp_stream_ep_init(ucp_ep_h ep) ++{ ++ ucp_ep_ext_proto_t *ep_ext = ucp_ep_ext_proto(ep); ++ ++ if (ep->worker->context->config.features & UCP_FEATURE_STREAM) { ++ ep_ext->stream.ready_list.prev = NULL; ++ ep_ext->stream.ready_list.next = NULL; ++ ucs_queue_head_init(&ep_ext->stream.match_q); ++ } ++} ++ ++void ucp_stream_ep_cleanup(ucp_ep_h ep) ++{ ++ size_t length; ++ void *data; ++ ++ if (ep->worker->context->config.features & UCP_FEATURE_STREAM) { ++ while ((data = ucp_stream_recv_data_nb_nolock(ep, &length)) != NULL) { ++ ucs_assert_always(!UCS_PTR_IS_ERR(data)); ++ ucp_stream_data_release(ep, data); ++ } ++ ++ if (ucp_stream_ep_is_queued(ucp_ep_ext_proto(ep))) { ++ ucp_stream_ep_dequeue(ucp_ep_ext_proto(ep)); ++ } ++ } ++} ++ ++void ucp_stream_ep_activate(ucp_ep_h ep) ++{ ++ ucp_ep_ext_proto_t *ep_ext = ucp_ep_ext_proto(ep); ++ ++ if ((ep->worker->context->config.features & UCP_FEATURE_STREAM) && ++ ucp_stream_ep_has_data(ep_ext) && !ucp_stream_ep_is_queued(ep_ext)) { ++ ucp_stream_ep_enqueue(ep_ext, ep->worker); ++ } ++} ++ + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_stream_am_handler(void *am_arg, void *am_data, size_t am_length, + unsigned am_flags) + { + ucp_worker_h worker = am_arg; + ucp_stream_am_data_t *data = am_data; +- ucp_ep_ext_stream_t *ep_stream; + ucp_ep_h ep; ++ ucp_ep_ext_proto_t *ep_ext; + ucs_status_t status; + + ucs_assert(am_length >= sizeof(ucp_stream_am_hdr_t)); + +- ep = ucp_worker_ep_find(worker, data->hdr.sender_uuid); +- if (ucs_unlikely(ep == NULL)) { +- ucs_trace_data("ep not found for uuid %"PRIx64, data->hdr.sender_uuid); +- /* drop the data */ +- return UCS_OK; +- } ++ ep = ucp_worker_get_ep_by_ptr(worker, data->hdr.ep_ptr); ++ ep_ext = ucp_ep_ext_proto(ep); + +- ep_stream = ep->ext.stream; +- if (ucs_unlikely(!(ep_stream->flags & UCP_EP_STREAM_FLAG_VALID))) { +- ucs_trace_data("stream ep with uuid %"PRIx64" is invalid", +- data->hdr.sender_uuid); ++ if (ucs_unlikely(ep->flags & UCP_EP_FLAG_CLOSED)) { ++ ucs_trace_data("ep %p: stream is invalid", ep); + /* drop the data */ + return UCS_OK; + } + +- status = ucp_stream_am_data_process(worker, ep_stream, data, ++ status = ucp_stream_am_data_process(worker, ep_ext, data, + am_length - sizeof(data->hdr), + am_flags); + if (status == UCS_OK) { +@@ -421,8 +480,8 @@ ucp_stream_am_handler(void *am_arg, void *am_data, size_t am_length, + + ucs_assert(status == UCS_INPROGRESS); + +- if (!ucp_stream_ep_is_queued(ep_stream)) { +- ucp_stream_ep_enqueue(ep_stream, worker); ++ if (!ucp_stream_ep_is_queued(ep_ext) && (ep->flags & UCP_EP_FLAG_USED)) { ++ ucp_stream_ep_enqueue(ep_ext, worker); + } + + return (am_flags & UCT_CB_PARAM_FLAG_DESC) ? UCS_INPROGRESS : UCS_OK; +@@ -436,15 +495,15 @@ static void ucp_stream_am_dump(ucp_worker_h worker, uct_am_trace_type_t type, + size_t hdr_len = sizeof(*hdr); + char *p; + +- snprintf(buffer, max, "STREAM ep uuid %"PRIx64, hdr->sender_uuid); ++ snprintf(buffer, max, "STREAM ep_ptr 0x%lx", hdr->ep_ptr); + p = buffer + strlen(buffer); + ++ ucs_assert(hdr->ep_ptr != 0); + ucp_dump_payload(worker->context, p, buffer + max - p, data + hdr_len, + length - hdr_len); + } + +-UCP_DEFINE_AM(UCP_FEATURE_STREAM, UCP_AM_ID_STREAM_DATA, +- ucp_stream_am_handler, ucp_stream_am_dump, +- UCT_CB_FLAG_SYNC); ++UCP_DEFINE_AM(UCP_FEATURE_STREAM, UCP_AM_ID_STREAM_DATA, ucp_stream_am_handler, ++ ucp_stream_am_dump, 0); + + UCP_DEFINE_AM_PROXY(UCP_AM_ID_STREAM_DATA); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_send.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_send.c +index 6be01cd..c0779b0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_send.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_send.c +@@ -21,7 +21,7 @@ ucp_stream_send_am_short(ucp_ep_t *ep, const void *buffer, size_t length) + UCS_STATIC_ASSERT(sizeof(ep->worker->uuid) == sizeof(uint64_t)); + + return uct_ep_am_short(ucp_ep_get_am_uct_ep(ep), UCP_AM_ID_STREAM_DATA, +- ep->worker->uuid, buffer, length); ++ ucp_ep_dest_ep_ptr(ep), buffer, length); + } + + static void ucp_stream_send_req_init(ucp_request_t* req, ucp_ep_h ep, +@@ -30,14 +30,15 @@ static void ucp_stream_send_req_init(ucp_request_t* req, ucp_ep_h ep, + { + req->flags = flags; + req->send.ep = ep; +- req->send.buffer = buffer; ++ req->send.buffer = (void*)buffer; + req->send.datatype = datatype; +- req->send.mem_type = UCT_MD_MEM_TYPE_HOST; + req->send.lane = ep->am_lane; + ucp_request_send_state_init(req, datatype, count); + req->send.length = ucp_dt_length(req->send.datatype, count, + req->send.buffer, + &req->send.state.dt); ++ ucp_memory_type_detect_mds(ep->worker->context, (void *)buffer, ++ req->send.length, &req->send.mem_type); + VALGRIND_MAKE_MEM_UNDEFINED(&req->send.tag, sizeof(req->send.tag)); + } + +@@ -48,11 +49,11 @@ ucp_stream_send_req(ucp_request_t *req, size_t count, + { + size_t zcopy_thresh = ucp_proto_get_zcopy_threshold(req, msg_config, + count, SIZE_MAX); +- size_t seg_size = msg_config->max_bcopy - proto->only_hdr_size; + ssize_t max_short = ucp_proto_get_short_max(req, msg_config); + + ucs_status_t status = ucp_request_send_start(req, max_short, zcopy_thresh, +- seg_size, SIZE_MAX, proto); ++ SIZE_MAX, count, msg_config, ++ proto); + if (status != UCS_OK) { + return UCS_STATUS_PTR(status); + } +@@ -85,9 +86,11 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_send_nb, + ucs_status_t status; + ucs_status_ptr_t ret; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_STREAM, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + +- ucs_trace_req("send_nb buffer %p count %zu to %s cb %p flags %u", ++ ucs_trace_req("stream_send_nb buffer %p count %zu to %s cb %p flags %u", + buffer, count, ucp_ep_peer_name(ep), cb, flags); + + if (ucs_unlikely(flags != 0)) { +@@ -95,6 +98,12 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_send_nb, + goto out; + } + ++ status = ucp_ep_resolve_dest_ep_ptr(ep, ep->am_lane); ++ if (status != UCS_OK) { ++ ret = UCS_STATUS_PTR(status); ++ goto out; ++ } ++ + if (ucs_likely(UCP_DT_IS_CONTIG(datatype))) { + length = ucp_contig_dt_length(datatype, count); + if (ucs_likely((ssize_t)length <= ucp_ep_config(ep)->am.max_short)) { +@@ -120,7 +129,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_send_nb, + ucp_ep_config(ep)->stream.proto); + + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return ret; + } + +@@ -142,11 +151,12 @@ static size_t ucp_stream_pack_am_single_dt(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- hdr->sender_uuid = req->send.ep->worker->uuid; ++ hdr->ep_ptr = ucp_request_get_dest_ep_ptr(req); + + ucs_assert(req->send.state.dt.offset == 0); + +- length = ucp_dt_pack(req->send.datatype, hdr + 1, req->send.buffer, ++ length = ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, + &req->send.state.dt, req->send.length); + ucs_assert(length == req->send.length); + return sizeof(*hdr) + length; +@@ -172,15 +182,14 @@ static size_t ucp_stream_pack_am_first_dt(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- hdr->sender_uuid = req->send.ep->worker->uuid; +- length = ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr); ++ hdr->ep_ptr = ucp_request_get_dest_ep_ptr(req); ++ length = ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr); + +- ucs_debug("pack stream_am_first paylen %zu", length); + ucs_assert(req->send.state.dt.offset == 0); + ucs_assert(req->send.length > length); +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + static size_t ucp_stream_pack_am_middle_dt(void *dest, void *arg) +@@ -189,32 +198,12 @@ static size_t ucp_stream_pack_am_middle_dt(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- hdr->sender_uuid = req->send.ep->worker->uuid; +- length = ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr); +- ucs_debug("pack stream_am_middle paylen %zu offset %zu", length, +- req->send.state.dt.offset); +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); +-} +- +-static size_t ucp_stream_pack_am_last_dt(void *dest, void *arg) +-{ +- size_t ret_length; +- ucp_stream_am_hdr_t *hdr = dest; +- ucp_request_t *req = arg; +- size_t length = req->send.length - req->send.state.dt.offset; +- +- hdr->sender_uuid = req->send.ep->worker->uuid; +- ret_length = ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); +- +- ucs_debug("pack stream_am_last paylen %zu offset %zu", length, +- req->send.state.dt.offset); +- ucs_assertv(ret_length == length, "length=%zu, max_length=%zu", +- ret_length, length); +- return sizeof(*hdr) + ret_length; ++ hdr->ep_ptr = ucp_request_get_dest_ep_ptr(req); ++ length = ucs_min(ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr), ++ req->send.length - req->send.state.dt.offset); ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + static ucs_status_t ucp_stream_bcopy_multi(uct_pending_req_t *self) +@@ -222,11 +211,9 @@ static ucs_status_t ucp_stream_bcopy_multi(uct_pending_req_t *self) + ucs_status_t status = ucp_do_am_bcopy_multi(self, + UCP_AM_ID_STREAM_DATA, + UCP_AM_ID_STREAM_DATA, +- UCP_AM_ID_STREAM_DATA, + sizeof(ucp_stream_am_hdr_t), + ucp_stream_pack_am_first_dt, +- ucp_stream_pack_am_middle_dt, +- ucp_stream_pack_am_last_dt, 0); ++ ucp_stream_pack_am_middle_dt, 0); + if (status == UCS_OK) { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_request_send_generic_dt_finish(req); +@@ -242,7 +229,7 @@ static ucs_status_t ucp_stream_eager_zcopy_single(uct_pending_req_t *self) + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_stream_am_hdr_t hdr; + +- hdr.sender_uuid = req->send.ep->worker->uuid; ++ hdr.ep_ptr = ucp_request_get_dest_ep_ptr(req); + return ucp_do_am_zcopy_single(self, UCP_AM_ID_STREAM_DATA, &hdr, + sizeof(hdr), ucp_proto_am_zcopy_req_complete); + } +@@ -252,11 +239,10 @@ static ucs_status_t ucp_stream_eager_zcopy_multi(uct_pending_req_t *self) + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_stream_am_hdr_t hdr; + +- hdr.sender_uuid = req->send.ep->worker->uuid; ++ hdr.ep_ptr = ucp_request_get_dest_ep_ptr(req); + return ucp_do_am_zcopy_multi(self, + UCP_AM_ID_STREAM_DATA, + UCP_AM_ID_STREAM_DATA, +- UCP_AM_ID_STREAM_DATA, + &hdr, sizeof(hdr), &hdr, sizeof(hdr), + ucp_proto_am_zcopy_req_complete, 0); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager.h +index 636eb16..a7656bf 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager.h +@@ -65,7 +65,7 @@ typedef struct { + extern const ucp_proto_t ucp_tag_eager_proto; + extern const ucp_proto_t ucp_tag_eager_sync_proto; + +-void ucp_tag_eager_sync_send_ack(ucp_worker_h worker, void *hdr, uint16_t flags); ++void ucp_tag_eager_sync_send_ack(ucp_worker_h worker, void *hdr, uint16_t recv_flags); + + void ucp_tag_eager_sync_completion(ucp_request_t *req, uint16_t flag, + ucs_status_t status); +@@ -78,18 +78,4 @@ void ucp_tag_eager_sync_zcopy_req_complete(ucp_request_t *req, ucs_status_t stat + + void ucp_tag_eager_sync_zcopy_completion(uct_completion_t *self, ucs_status_t status); + +-static inline ucs_status_t ucp_tag_send_eager_short(ucp_ep_t *ep, ucp_tag_t tag, +- const void *buffer, size_t length) +-{ +- if (ep->flags & UCP_EP_FLAG_TAG_OFFLOAD_ENABLED) { +- UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(uct_tag_t)); +- return uct_ep_tag_eager_short(ucp_ep_get_tag_uct_ep(ep), tag, buffer, length); +- } else { +- UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(ucp_eager_hdr_t)); +- UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(uint64_t)); +- return uct_ep_am_short(ucp_ep_get_am_uct_ep(ep), UCP_AM_ID_EAGER_ONLY, tag, +- buffer, length); +- } +-} +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_rcv.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_rcv.c +index 9ae1ca3..9e64399 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_rcv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_rcv.c +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -13,10 +13,63 @@ + #include + #include + ++static UCS_F_ALWAYS_INLINE void ++ucp_eager_expected_handler(ucp_worker_t *worker, ucp_request_t *req, ++ void *data, size_t recv_len, ucp_tag_t recv_tag, ++ uint16_t flags) ++{ ++ ucs_trace_req("found req %p", req); ++ UCS_PROFILE_REQUEST_EVENT(req, "eager_recv", recv_len); ++ ++ /* First fragment fills the receive information */ ++ UCP_WORKER_STAT_EAGER_MSG(worker, flags); ++ UCP_WORKER_STAT_EAGER_CHUNK(worker, EXP); ++ ++ req->recv.tag.info.sender_tag = recv_tag; ++ ++ /* Cancel req in transport if it was offloaded, ++ * because it arrived either: ++ * 1) via SW TM (e. g. peer doesn't support offload) ++ * 2) as unexpected via HW TM */ ++ ucp_tag_offload_try_cancel(worker, req, ++ UCP_TAG_OFFLOAD_CANCEL_FORCE | ++ UCP_TAG_OFFLOAD_CANCEL_DEREG); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_eager_offload_handler(void *arg, void *data, size_t length, ++ unsigned tl_flags, uint16_t flags, ucp_tag_t recv_tag) ++{ ++ ucp_worker_t *worker = arg; ++ ucp_request_t *req; ++ ucp_recv_desc_t *rdesc; ++ ucp_tag_t *rdesc_hdr; ++ ucs_status_t status; ++ ++ req = ucp_tag_exp_search(&worker->tm, recv_tag); ++ if (req != NULL) { ++ ucp_eager_expected_handler(worker, req, data, length, recv_tag, flags); ++ req->recv.tag.info.length = length; ++ status = ucp_request_recv_data_unpack(req, data, length, 0, 1); ++ ucp_request_complete_tag_recv(req, status); ++ status = UCS_OK; ++ } else { ++ status = ucp_recv_desc_init(worker, data, length, sizeof(ucp_tag_t), ++ tl_flags, sizeof(ucp_tag_t), flags, ++ sizeof(ucp_tag_t), &rdesc); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ rdesc_hdr = (ucp_tag_t*)(rdesc + 1); ++ *rdesc_hdr = recv_tag; ++ ucp_tag_unexp_recv(&worker->tm, rdesc, recv_tag); ++ } ++ } ++ ++ return status; ++} + + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_eager_tagged_handler(void *arg, void *data, size_t length, unsigned am_flags, +- uint16_t flags, uint16_t hdr_len) ++ uint16_t flags, uint16_t hdr_len, uint16_t priv_length) + { + ucp_worker_h worker = arg; + ucp_eager_hdr_t *eager_hdr = data; +@@ -35,22 +88,7 @@ ucp_eager_tagged_handler(void *arg, void *data, size_t length, unsigned am_flags + + req = ucp_tag_exp_search(&worker->tm, recv_tag); + if (req != NULL) { +- ucs_trace_req("found req %p", req); +- UCS_PROFILE_REQUEST_EVENT(req, "eager_recv", recv_len); +- +- /* First fragment fills the receive information */ +- UCP_WORKER_STAT_EAGER_MSG(worker, flags); +- UCP_WORKER_STAT_EAGER_CHUNK(worker, EXP); +- +- req->recv.tag.info.sender_tag = recv_tag; +- +- /* Cancel req in transport if it was offloaded, +- * because it arrived either: +- * 1) via SW TM (e. g. peer doesn't support offload) +- * 2) as unexpected via HW TM */ +- ucp_tag_offload_try_cancel(worker, req, +- UCP_TAG_OFFLOAD_CANCEL_FORCE | +- UCP_TAG_OFFLOAD_CANCEL_DEREG); ++ ucp_eager_expected_handler(worker, req, data, recv_len, recv_tag, flags); + + if (flags & UCP_RECV_DESC_FLAG_EAGER_SYNC) { + ucp_tag_eager_sync_send_ack(worker, data, flags); +@@ -76,8 +114,8 @@ ucp_eager_tagged_handler(void *arg, void *data, size_t length, unsigned am_flags + + status = UCS_OK; + } else { +- status = ucp_recv_desc_init(worker, data, length, am_flags, hdr_len, +- flags, &rdesc); ++ status = ucp_recv_desc_init(worker, data, length, 0, am_flags, hdr_len, ++ flags, priv_length, &rdesc); + if (!UCS_STATUS_IS_ERR(status)) { + ucp_tag_unexp_recv(&worker->tm, rdesc, recv_tag); + } +@@ -93,7 +131,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_only_handler, + return ucp_eager_tagged_handler(arg, data, length, am_flags, + UCP_RECV_DESC_FLAG_EAGER | + UCP_RECV_DESC_FLAG_EAGER_ONLY, +- sizeof(ucp_eager_hdr_t)); ++ sizeof(ucp_eager_hdr_t), 0); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_first_handler, +@@ -102,7 +140,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_first_handler, + { + return ucp_eager_tagged_handler(arg, data, length, am_flags, + UCP_RECV_DESC_FLAG_EAGER, +- sizeof(ucp_eager_first_hdr_t)); ++ sizeof(ucp_eager_first_hdr_t), 0); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_middle_handler, +@@ -128,8 +166,9 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_middle_handler, + + if (ucp_tag_frag_match_is_unexp(matchq)) { + /* add new received descriptor to the queue */ +- status = ucp_recv_desc_init(worker, data, length, am_flags, sizeof(*hdr), +- UCP_RECV_DESC_FLAG_EAGER, &rdesc); ++ status = ucp_recv_desc_init(worker, data, length, 0, am_flags, ++ sizeof(*hdr), UCP_RECV_DESC_FLAG_EAGER, 0, ++ &rdesc); + if (!UCS_STATUS_IS_ERR(status)) { + ucp_tag_frag_match_add_unexp(matchq, rdesc, hdr->offset); + } +@@ -160,7 +199,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_sync_only_handler, + UCP_RECV_DESC_FLAG_EAGER| + UCP_RECV_DESC_FLAG_EAGER_ONLY| + UCP_RECV_DESC_FLAG_EAGER_SYNC, +- sizeof(ucp_eager_sync_hdr_t)); ++ sizeof(ucp_eager_sync_hdr_t), 0); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_sync_first_handler, +@@ -170,7 +209,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_sync_first_handler, + return ucp_eager_tagged_handler(arg, data, length, am_flags, + UCP_RECV_DESC_FLAG_EAGER| + UCP_RECV_DESC_FLAG_EAGER_SYNC, +- sizeof(ucp_eager_sync_first_hdr_t)); ++ sizeof(ucp_eager_sync_first_hdr_t), 0); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_offload_sync_ack_handler, +@@ -185,15 +224,15 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_offload_sync_ack_handler, + + ucs_queue_for_each_safe(sreq, iter, queue, send.tag_offload.queue) { + if ((sreq->send.tag_offload.ssend_tag == rep_hdr->sender_tag) && +- (worker->uuid == rep_hdr->sender_uuid)) { ++ ((uintptr_t)sreq->send.ep == rep_hdr->ep_ptr)) { + ucp_tag_eager_sync_completion(sreq, UCP_REQUEST_FLAG_REMOTE_COMPLETED, + UCS_OK); + ucs_queue_del_iter(queue, iter); + return UCS_OK; + } + } +- ucs_error("Unexpected sync ack received: tag %"PRIx64" uuid %"PRIx64"", +- rep_hdr->sender_tag, rep_hdr->sender_uuid); ++ ucs_error("unexpected sync ack received: tag %"PRIx64" ep_ptr 0x%lx", ++ rep_hdr->sender_tag, rep_hdr->ep_ptr); + return UCS_OK; + } + +@@ -219,37 +258,36 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_offload_unexp_eager, + uint16_t flags = UCP_RECV_DESC_FLAG_EAGER | + UCP_RECV_DESC_FLAG_EAGER_ONLY | + UCP_RECV_DESC_FLAG_EAGER_OFFLOAD; +- ucp_eager_hdr_t *hdr; +- ucp_eager_sync_hdr_t *sync_hdr; +- unsigned hdr_len; ++ ucp_eager_sync_hdr_t *hdr; ++ int hdr_len; ++ ++ UCP_WORKER_STAT_TAG_OFFLOAD(wiface->worker, RX_UNEXP_EGR); + +- hdr_len = ucs_unlikely(imm) ? sizeof(ucp_eager_sync_hdr_t) : +- sizeof(ucp_eager_hdr_t); ++ ucp_tag_offload_unexp(wiface, stag, length); ++ ++ if (ucs_likely(!imm)) { ++ return ucp_eager_offload_handler(wiface->worker, data, length, tl_flags, ++ flags, stag); ++ } ++ ++ /* It is a sync send, imm data contains sender uuid */ ++ hdr_len = sizeof(ucp_eager_sync_hdr_t); + + if (ucs_unlikely(tl_flags & UCT_CB_PARAM_FLAG_DESC)) { +- hdr = (ucp_eager_hdr_t*)((char*)data - hdr_len); ++ hdr = (ucp_eager_sync_hdr_t*)(UCS_PTR_BYTE_OFFSET(data, -hdr_len)); + } else { + /* Can not shift back, no headroom */ + hdr = ucs_alloca(length + hdr_len); +- memcpy((char*)hdr + hdr_len, data, length); +- } +- +- hdr->super.tag = stag; +- +- if (ucs_unlikely(imm)) { +- /* It is a sync send, imm data contains sender uuid */ +- sync_hdr = ucs_derived_of(hdr, ucp_eager_sync_hdr_t); +- flags |= UCP_RECV_DESC_FLAG_EAGER_SYNC; +- sync_hdr->req.reqptr = 0ul; +- sync_hdr->req.sender_uuid = imm; ++ memcpy(UCS_PTR_BYTE_OFFSET(hdr, hdr_len), data, length); + } + +- UCP_WORKER_STAT_TAG_OFFLOAD(wiface->worker, RX_UNEXP_EGR); +- +- ucp_tag_offload_unexp(wiface, stag); ++ hdr->super.super.tag = stag; ++ hdr->req.reqptr = 0ul; ++ hdr->req.ep_ptr = imm; ++ flags |= UCP_RECV_DESC_FLAG_EAGER_SYNC; + + return ucp_eager_tagged_handler(wiface->worker, hdr, length + hdr_len, +- tl_flags, flags, hdr_len); ++ tl_flags, flags, hdr_len, hdr_len); + } + + static void ucp_eager_dump(ucp_worker_h worker, uct_am_trace_type_t type, +@@ -283,18 +321,19 @@ static void ucp_eager_dump(ucp_worker_h worker, uct_am_trace_type_t type, + header_len = sizeof(*eager_mid_hdr); + break; + case UCP_AM_ID_EAGER_SYNC_ONLY: +- snprintf(buffer, max, "EGRS tag %"PRIx64" uuid %"PRIx64" request 0x%lx", +- eagers_hdr->super.super.tag, eagers_hdr->req.sender_uuid, ++ ucs_assert(eagers_hdr->req.ep_ptr != 0); ++ snprintf(buffer, max, "EGRS tag %"PRIx64" ep_ptr 0x%lx request 0x%lx", ++ eagers_hdr->super.super.tag, eagers_hdr->req.ep_ptr, + eagers_hdr->req.reqptr); + header_len = sizeof(*eagers_hdr); + break; + case UCP_AM_ID_EAGER_SYNC_FIRST: + snprintf(buffer, max, "EGRS_F tag %"PRIx64" msgid %"PRIx64" len %zu " +- "uuid %"PRIx64" request 0x%lx", ++ "ep_ptr 0x%lx request 0x%lx", + eagers_first_hdr->super.super.super.tag, + eagers_first_hdr->super.msg_id, + eagers_first_hdr->super.total_len, +- eagers_first_hdr->req.sender_uuid, ++ eagers_first_hdr->req.ep_ptr, + eagers_first_hdr->req.reqptr); + header_len = sizeof(*eagers_first_hdr); + break; +@@ -304,8 +343,8 @@ static void ucp_eager_dump(ucp_worker_h worker, uct_am_trace_type_t type, + header_len = sizeof(*rep_hdr); + break; + case UCP_AM_ID_OFFLOAD_SYNC_ACK: +- snprintf(buffer, max, "EGRS_A_O tag %"PRIx64" uuid %"PRIx64"", +- off_rep_hdr->sender_tag, off_rep_hdr->sender_uuid); ++ snprintf(buffer, max, "EGRS_A_O tag %"PRIx64" ep_ptr 0x%lx", ++ off_rep_hdr->sender_tag, off_rep_hdr->ep_ptr); + header_len = sizeof(*rep_hdr); + break; + default: +@@ -318,19 +357,19 @@ static void ucp_eager_dump(ucp_worker_h worker, uct_am_trace_type_t type, + } + + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_ONLY, ucp_eager_only_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); ++ ucp_eager_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_FIRST, ucp_eager_first_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); ++ ucp_eager_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_MIDDLE, ucp_eager_middle_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); +-UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_ONLY, ucp_eager_sync_only_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); +-UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_FIRST, ucp_eager_sync_first_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); +-UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_ACK, ucp_eager_sync_ack_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); ++ ucp_eager_dump, 0); ++UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_ONLY, ++ ucp_eager_sync_only_handler, ucp_eager_dump, 0); ++UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_FIRST, ++ ucp_eager_sync_first_handler, ucp_eager_dump, 0); ++UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_ACK, ++ ucp_eager_sync_ack_handler, ucp_eager_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_OFFLOAD_SYNC_ACK, +- ucp_eager_offload_sync_ack_handler, ucp_eager_dump, UCT_CB_FLAG_SYNC); ++ ucp_eager_offload_sync_ack_handler, ucp_eager_dump, 0); + + UCP_DEFINE_AM_PROXY(UCP_AM_ID_EAGER_ONLY); + UCP_DEFINE_AM_PROXY(UCP_AM_ID_EAGER_FIRST); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_snd.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_snd.c +index 14469c9..8cbab1b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_snd.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_snd.c +@@ -23,7 +23,8 @@ static size_t ucp_tag_pack_eager_only_dt(void *dest, void *arg) + hdr->super.tag = req->send.tag.tag; + + ucs_assert(req->send.state.dt.offset == 0); +- length = ucp_dt_pack(req->send.datatype, hdr + 1, req->send.buffer, ++ length = ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, + &req->send.state.dt, req->send.length); + ucs_assert(length == req->send.length); + return sizeof(*hdr) + length; +@@ -36,11 +37,12 @@ static size_t ucp_tag_pack_eager_sync_only_dt(void *dest, void *arg) + size_t length; + + hdr->super.super.tag = req->send.tag.tag; +- hdr->req.sender_uuid = req->send.ep->worker->uuid; ++ hdr->req.ep_ptr = ucp_request_get_dest_ep_ptr(req); + hdr->req.reqptr = (uintptr_t)req; + + ucs_assert(req->send.state.dt.offset == 0); +- length = ucp_dt_pack(req->send.datatype, hdr + 1, req->send.buffer, ++ length = ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, + &req->send.state.dt, req->send.length); + ucs_assert(length == req->send.length); + return sizeof(*hdr) + length; +@@ -62,9 +64,9 @@ static size_t ucp_tag_pack_eager_first_dt(void *dest, void *arg) + + ucs_assert(req->send.state.dt.offset == 0); + ucs_assert(req->send.length > length); +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + static size_t ucp_tag_pack_eager_sync_first_dt(void *dest, void *arg) +@@ -79,15 +81,15 @@ static size_t ucp_tag_pack_eager_sync_first_dt(void *dest, void *arg) + sizeof(*hdr); + hdr->super.super.super.tag = req->send.tag.tag; + hdr->super.total_len = req->send.length; +- hdr->req.sender_uuid = req->send.ep->worker->uuid; ++ hdr->req.ep_ptr = ucp_request_get_dest_ep_ptr(req); + hdr->super.msg_id = req->send.tag.message_id; + hdr->req.reqptr = (uintptr_t)req; + + ucs_assert(req->send.state.dt.offset == 0); + ucs_assert(req->send.length > length); +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + static size_t ucp_tag_pack_eager_middle_dt(void *dest, void *arg) +@@ -96,29 +98,14 @@ static size_t ucp_tag_pack_eager_middle_dt(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- length = ucp_ep_get_max_bcopy(req->send.ep, req->send.lane) - +- sizeof(*hdr); ++ length = ucs_min(ucp_ep_get_max_bcopy(req->send.ep, req->send.lane) - ++ sizeof(*hdr), ++ req->send.length - req->send.state.dt.offset); + hdr->msg_id = req->send.tag.message_id; + hdr->offset = req->send.state.dt.offset; +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); +-} +- +-static size_t ucp_tag_pack_eager_last_dt(void *dest, void *arg) +-{ +- ucp_eager_middle_hdr_t *hdr = dest; +- ucp_request_t *req = arg; +- size_t length, ret_length; +- +- length = req->send.length - req->send.state.dt.offset; +- hdr->msg_id = req->send.tag.message_id; +- hdr->offset = req->send.state.dt.offset; +- ret_length = ucp_dt_pack(req->send.datatype, hdr + 1, req->send.buffer, +- &req->send.state.dt, length); +- ucs_assertv(ret_length == length, "length=%zu, max_length=%zu", +- ret_length, length); +- return sizeof(*hdr) + ret_length; ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + /* eager */ +@@ -157,11 +144,9 @@ static ucs_status_t ucp_tag_eager_bcopy_multi(uct_pending_req_t *self) + ucs_status_t status = ucp_do_am_bcopy_multi(self, + UCP_AM_ID_EAGER_FIRST, + UCP_AM_ID_EAGER_MIDDLE, +- UCP_AM_ID_EAGER_MIDDLE, + sizeof(ucp_eager_middle_hdr_t), + ucp_tag_pack_eager_first_dt, +- ucp_tag_pack_eager_middle_dt, +- ucp_tag_pack_eager_last_dt, 1); ++ ucp_tag_pack_eager_middle_dt, 1); + if (status == UCS_OK) { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_request_send_generic_dt_finish(req); +@@ -197,7 +182,6 @@ static ucs_status_t ucp_tag_eager_zcopy_multi(uct_pending_req_t *self) + return ucp_do_am_zcopy_multi(self, + UCP_AM_ID_EAGER_FIRST, + UCP_AM_ID_EAGER_MIDDLE, +- UCP_AM_ID_EAGER_MIDDLE, + &first_hdr, sizeof(first_hdr), + &middle_hdr, sizeof(middle_hdr), + ucp_proto_am_zcopy_req_complete, 1); +@@ -252,11 +236,9 @@ static ucs_status_t ucp_tag_eager_sync_bcopy_multi(uct_pending_req_t *self) + ucs_status_t status = ucp_do_am_bcopy_multi(self, + UCP_AM_ID_EAGER_SYNC_FIRST, + UCP_AM_ID_EAGER_MIDDLE, +- UCP_AM_ID_EAGER_MIDDLE, + sizeof(ucp_eager_middle_hdr_t), + ucp_tag_pack_eager_sync_first_dt, +- ucp_tag_pack_eager_middle_dt, +- ucp_tag_pack_eager_last_dt, 1); ++ ucp_tag_pack_eager_middle_dt, 1); + if (status == UCS_OK) { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_request_send_generic_dt_finish(req); +@@ -286,7 +268,7 @@ static ucs_status_t ucp_tag_eager_sync_zcopy_single(uct_pending_req_t *self) + ucp_eager_sync_hdr_t hdr; + + hdr.super.super.tag = req->send.tag.tag; +- hdr.req.sender_uuid = req->send.ep->worker->uuid; ++ hdr.req.ep_ptr = ucp_request_get_dest_ep_ptr(req); + hdr.req.reqptr = (uintptr_t)req; + + return ucp_do_am_zcopy_single(self, UCP_AM_ID_EAGER_SYNC_ONLY, &hdr, sizeof(hdr), +@@ -301,7 +283,7 @@ static ucs_status_t ucp_tag_eager_sync_zcopy_multi(uct_pending_req_t *self) + + first_hdr.super.super.super.tag = req->send.tag.tag; + first_hdr.super.total_len = req->send.length; +- first_hdr.req.sender_uuid = req->send.ep->worker->uuid; ++ first_hdr.req.ep_ptr = ucp_request_get_dest_ep_ptr(req); + first_hdr.req.reqptr = (uintptr_t)req; + first_hdr.super.msg_id = req->send.tag.message_id; + middle_hdr.msg_id = req->send.tag.message_id; +@@ -310,7 +292,6 @@ static ucs_status_t ucp_tag_eager_sync_zcopy_multi(uct_pending_req_t *self) + return ucp_do_am_zcopy_multi(self, + UCP_AM_ID_EAGER_SYNC_FIRST, + UCP_AM_ID_EAGER_MIDDLE, +- UCP_AM_ID_EAGER_MIDDLE, + &first_hdr, sizeof(first_hdr), + &middle_hdr, sizeof(middle_hdr), + ucp_tag_eager_sync_zcopy_req_complete, 1); +@@ -336,38 +317,41 @@ const ucp_proto_t ucp_tag_eager_sync_proto = { + .mid_hdr_size = sizeof(ucp_eager_hdr_t) + }; + +-void ucp_tag_eager_sync_send_ack(ucp_worker_h worker, void *hdr, uint16_t flags) ++void ucp_tag_eager_sync_send_ack(ucp_worker_h worker, void *hdr, uint16_t recv_flags) + { +- ucp_eager_sync_hdr_t *eagers_hdr; + ucp_request_hdr_t *reqhdr; + ucp_request_t *req; + +- ucs_assert(flags & UCP_RECV_DESC_FLAG_EAGER_SYNC); ++ ucs_assert(recv_flags & UCP_RECV_DESC_FLAG_EAGER_SYNC); + +- if (flags & UCP_RECV_DESC_FLAG_EAGER_OFFLOAD) { +- eagers_hdr = hdr; +- ucp_tag_offload_eager_sync_send_ack(worker, +- eagers_hdr->req.sender_uuid, +- eagers_hdr->super.super.tag); +- return; ++ if (recv_flags & UCP_RECV_DESC_FLAG_EAGER_ONLY) { ++ reqhdr = &((ucp_eager_sync_hdr_t*)hdr)->req; /* only */ ++ } else { ++ reqhdr = &((ucp_eager_sync_first_hdr_t*)hdr)->req; /* first */ + } + +- if (flags & UCP_RECV_DESC_FLAG_EAGER_ONLY) { +- reqhdr = &((ucp_eager_sync_hdr_t*)hdr)->req; +- } else /* first */ { +- reqhdr = &((ucp_eager_sync_first_hdr_t*)hdr)->req; ++ req = ucp_request_get(worker); ++ if (req == NULL) { ++ ucs_fatal("could not allocate request"); + } + +- ucs_assert(reqhdr->reqptr != 0); +- ucs_trace_req("send_sync_ack sender_uuid %"PRIx64" remote_request 0x%lx", +- reqhdr->sender_uuid, reqhdr->reqptr); +- +- req = ucp_worker_allocate_reply(worker, reqhdr->sender_uuid); +- req->send.uct.func = ucp_proto_progress_am_bcopy_single; +- req->send.proto.am_id = UCP_AM_ID_EAGER_SYNC_ACK; +- req->send.proto.remote_request = reqhdr->reqptr; +- req->send.proto.status = UCS_OK; +- req->send.proto.comp_cb = ucp_request_put; ++ req->flags = 0; ++ req->send.ep = ucp_worker_get_ep_by_ptr(worker, reqhdr->ep_ptr); ++ req->send.uct.func = ucp_proto_progress_am_bcopy_single; ++ req->send.proto.comp_cb = ucp_request_put; ++ req->send.proto.status = UCS_OK; ++ ++ ucs_trace_req("send_sync_ack req %p ep %p", req, req->send.ep); ++ ++ if (recv_flags & UCP_RECV_DESC_FLAG_EAGER_OFFLOAD) { ++ ucs_assert(recv_flags & UCP_RECV_DESC_FLAG_EAGER_ONLY); ++ req->send.proto.am_id = UCP_AM_ID_OFFLOAD_SYNC_ACK; ++ req->send.proto.sender_tag = ((ucp_eager_sync_hdr_t*)hdr)->super.super.tag; ++ } else { ++ ucs_assert(reqhdr->reqptr != 0); ++ req->send.proto.am_id = UCP_AM_ID_EAGER_SYNC_ACK; ++ req->send.proto.remote_request = reqhdr->reqptr; ++ } + + ucp_request_send(req); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.c +index d0bf512..3fe7fe7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.c +@@ -21,28 +21,27 @@ int ucp_tag_offload_iface_activate(ucp_worker_iface_t *iface) + ucp_worker_t *worker = iface->worker; + ucp_context_t *context = worker->context; + +- if (!worker->tm.offload.num_ifaces) { ++ if (worker->tm.offload.iface == NULL) { + ucs_assert(worker->tm.offload.thresh == SIZE_MAX); + ucs_assert(worker->tm.offload.zcopy_thresh == SIZE_MAX); + ucs_assert(worker->tm.offload.iface == NULL); + + worker->tm.offload.thresh = context->config.ext.tm_thresh; +- worker->tm.offload.zcopy_thresh = context->config.ext.tm_max_bcopy; ++ worker->tm.offload.zcopy_thresh = context->config.ext.tm_max_bb_size; + +- /* Cache active offload iface, in most cases only one iface should be +- * used for offload. If more ifaces will be activated, they will be +- * added to offload hash table. */ ++ /* Cache active offload iface. Can use it if this will be the only ++ * active iface on the worker. Otherwise would need to retrieve ++ * offload-capable iface from the offload hash table. */ + worker->tm.offload.iface = iface; + + ucs_debug("Enable TM offload: thresh %zu, zcopy_thresh %zu", + worker->tm.offload.thresh, worker->tm.offload.zcopy_thresh); + } + +- ++worker->tm.offload.num_ifaces; + iface->flags |= UCP_WORKER_IFACE_FLAG_OFFLOAD_ACTIVATED; + +- ucs_debug("Activate tag offload iface %p, num of offload ifaces %d", +- iface, worker->tm.offload.num_ifaces); ++ ucs_debug("Activate tag offload iface %p", iface); ++ + return 1; + } + +@@ -52,7 +51,7 @@ ucp_tag_offload_iface(ucp_worker_t *worker, ucp_tag_t tag) + khiter_t hash_it; + ucp_tag_t key_tag; + +- if (ucs_likely(worker->tm.offload.num_ifaces == 1)) { ++ if (worker->num_active_ifaces == 1) { + ucs_assert(worker->tm.offload.iface != NULL); + return worker->tm.offload.iface; + } +@@ -76,7 +75,8 @@ ucp_tag_offload_release_buf(ucp_request_t *req, int dereg) + } + + /* Tag consumed by the transport - need to remove it from expected queue */ +-void ucp_tag_offload_tag_consumed(uct_tag_context_t *self) ++UCS_PROFILE_FUNC_VOID(ucp_tag_offload_tag_consumed, (self), ++ uct_tag_context_t *self) + { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, recv.uct_ctx); + ucs_queue_head_t *queue; +@@ -86,10 +86,13 @@ void ucp_tag_offload_tag_consumed(uct_tag_context_t *self) + } + + /* Message is scattered to user buffer by the transport, complete the request */ +-void ucp_tag_offload_completed(uct_tag_context_t *self, uct_tag_t stag, +- uint64_t imm, size_t length, ucs_status_t status) ++UCS_PROFILE_FUNC_VOID(ucp_tag_offload_completed, ++ (self, stag, imm, length, status), ++ uct_tag_context_t *self, uct_tag_t stag, ++ uint64_t imm, size_t length, ucs_status_t status) + { +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, recv.uct_ctx); ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, recv.uct_ctx); ++ ucp_eager_sync_hdr_t hdr; + + req->recv.tag.info.sender_tag = stag; + req->recv.tag.info.length = length; +@@ -100,8 +103,15 @@ void ucp_tag_offload_completed(uct_tag_context_t *self, uct_tag_t stag, + } + + if (ucs_unlikely(imm)) { ++ hdr.req.ep_ptr = imm; ++ hdr.req.reqptr = 0; /* unused */ ++ hdr.super.super.tag = stag; ++ + /* Sync send - need to send a reply */ +- ucp_tag_offload_eager_sync_send_ack(req->recv.worker, imm, stag); ++ ucp_tag_eager_sync_send_ack(req->recv.worker, &hdr, ++ UCP_RECV_DESC_FLAG_EAGER_ONLY | ++ UCP_RECV_DESC_FLAG_EAGER_SYNC | ++ UCP_RECV_DESC_FLAG_EAGER_OFFLOAD); + } + + if (req->recv.tag.rdesc != NULL) { +@@ -119,9 +129,11 @@ out: + } + + /* RNDV request matched by the transport. Need to proceed with SW based RNDV */ +-void ucp_tag_offload_rndv_cb(uct_tag_context_t *self, uct_tag_t stag, +- const void *header, unsigned header_length, +- ucs_status_t status) ++UCS_PROFILE_FUNC_VOID(ucp_tag_offload_rndv_cb, ++ (self, stag, header, header_length, status), ++ uct_tag_context_t *self, uct_tag_t stag, ++ const void *header, unsigned header_length, ++ ucs_status_t status) + { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, recv.uct_ctx); + +@@ -169,13 +181,13 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_offload_unexp_rndv, + */ + dummy_rts = ucs_alloca(dummy_rts_size); + dummy_rts->super.tag = stag; +- dummy_rts->sreq.sender_uuid = rndv_hdr->sender_uuid; ++ dummy_rts->sreq.ep_ptr = rndv_hdr->ep_ptr; + dummy_rts->sreq.reqptr = rndv_hdr->reqptr; + dummy_rts->address = remote_addr; + dummy_rts->size = length; + +- ucp_rkey_packed_copy(worker->context, UCS_BIT(md_index), dummy_rts + 1, +- uct_rkeys); ++ ucp_rkey_packed_copy(worker->context, UCS_BIT(md_index), ++ UCT_MD_MEM_TYPE_HOST, dummy_rts + 1, uct_rkeys); + + UCP_WORKER_STAT_TAG_OFFLOAD(worker, RX_UNEXP_RNDV); + ucp_rndv_process_rts(worker, dummy_rts, dummy_rts_size, 0); +@@ -190,12 +202,16 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_offload_unexp_rndv, + ucp_rndv_process_rts(worker, (void*)hdr, hdr_length, 0); + } + +- ucp_tag_offload_unexp(iface, stag); ++ /* Unexpected RNDV (both SW and HW) need to enable offload capabilities. ++ * Pass TM_THRESH value as a length to make sure tag is added to the ++ * hash table if there is a need (i.e. we have several active ifaces). */ ++ ucp_tag_offload_unexp(iface, stag, worker->tm.offload.thresh); + + return UCS_OK; + } + +-void ucp_tag_offload_cancel(ucp_worker_t *worker, ucp_request_t *req, unsigned mode) ++UCS_PROFILE_FUNC_VOID(ucp_tag_offload_cancel, (worker, req, mode), ++ ucp_worker_t *worker, ucp_request_t *req, unsigned mode) + { + + ucp_worker_iface_t *wiface = req->recv.tag.wiface; +@@ -219,7 +235,7 @@ void ucp_tag_offload_cancel(ucp_worker_t *worker, ucp_request_t *req, unsigned m + } + + static UCS_F_ALWAYS_INLINE int +-ucp_tag_offload_do_post(ucp_request_t *req, ucp_request_queue_t *req_queue) ++ucp_tag_offload_do_post(ucp_request_t *req) + { + ucp_worker_t *worker = req->recv.worker; + ucp_context_t *context = worker->context; +@@ -252,7 +268,8 @@ ucp_tag_offload_do_post(ucp_request_t *req, ucp_request_queue_t *req_queue) + /* register the whole buffer to support SW RNDV fallback */ + status = ucp_request_memory_reg(context, UCS_BIT(mdi), req->recv.buffer, + req->recv.length, req->recv.datatype, +- &req->recv.state, req); ++ &req->recv.state, req->recv.mem_type, ++ req, UCT_MD_MEM_FLAG_HIDE_ERRORS); + if (status != UCS_OK) { + return status; + } +@@ -319,7 +336,6 @@ static UCS_F_ALWAYS_INLINE int + ucp_tag_offload_post_sw_reqs(ucp_request_t *req, ucp_request_queue_t *req_queue) + { + ucp_worker_t *worker = req->recv.worker; +- ucs_queue_iter_t iter; + ucs_status_t status; + ucp_request_t *req_exp; + ucp_worker_iface_t *wiface; +@@ -350,12 +366,12 @@ ucp_tag_offload_post_sw_reqs(ucp_request_t *req, ucp_request_queue_t *req_queue) + return 0; + } + +- ucs_queue_for_each_safe(req_exp, iter, &req_queue->queue, recv.queue) { ++ ucs_queue_for_each(req_exp, &req_queue->queue, recv.queue) { + if (req_exp->flags & UCP_REQUEST_FLAG_OFFLOADED) { + continue; + } + ucs_assert(req_exp != req); +- status = ucp_tag_offload_do_post(req_exp, req_queue); ++ status = ucp_tag_offload_do_post(req_exp); + if (status != UCS_OK) { + return 0; + } +@@ -366,7 +382,8 @@ ucp_tag_offload_post_sw_reqs(ucp_request_t *req, ucp_request_queue_t *req_queue) + return 1; + } + +-int ucp_tag_offload_post(ucp_request_t *req, ucp_request_queue_t *req_queue) ++UCS_PROFILE_FUNC(int, ucp_tag_offload_post, (req, req_queue), ++ ucp_request_t *req, ucp_request_queue_t *req_queue) + { + ucp_worker_t *worker = req->recv.worker; + ucp_context_t *context = worker->context; +@@ -395,7 +412,7 @@ int ucp_tag_offload_post(ucp_request_t *req, ucp_request_queue_t *req_queue) + return 0; + } + +- if (ucp_tag_offload_do_post(req, req_queue) != UCS_OK) { ++ if (ucp_tag_offload_do_post(req) != UCS_OK) { + return 0; + } + +@@ -407,7 +424,8 @@ static size_t ucp_tag_offload_pack_eager(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- length = ucp_dt_pack(req->send.datatype, dest, req->send.buffer, ++ length = ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, dest, req->send.buffer, + &req->send.state.dt, req->send.length); + ucs_assert(length == req->send.length); + return length; +@@ -462,7 +480,8 @@ ucp_do_tag_offload_zcopy(uct_pending_req_t *self, uint64_t imm_data, + req->send.lane = ucp_ep_get_tag_lane(ep); + + ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iov, &dt_state, +- req->send.buffer, req->send.datatype, req->send.length, 0, NULL); ++ req->send.buffer, req->send.datatype, req->send.length, ++ ucp_ep_md_index(ep, req->send.lane), NULL); + + status = uct_ep_tag_eager_zcopy(ep->uct_eps[req->send.lane], req->send.tag.tag, + imm_data, iov, iovcnt, 0, +@@ -539,7 +558,7 @@ ucs_status_t ucp_tag_offload_rndv_zcopy(uct_pending_req_t *self) + md_index = ucp_ep_md_index(ep, req->send.lane); + + ucp_tag_offload_unexp_rndv_hdr_t rndv_hdr = { +- .sender_uuid = ep->worker->uuid, ++ .ep_ptr = ucp_request_get_dest_ep_ptr(req), + .reqptr = (uintptr_t)req, + .md_index = md_index + }; +@@ -550,7 +569,8 @@ ucs_status_t ucp_tag_offload_rndv_zcopy(uct_pending_req_t *self) + ucs_assert_always(UCP_DT_IS_CONTIG(req->send.datatype)); + + ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iov, &dt_state, +- req->send.buffer, req->send.datatype, req->send.length, 0, NULL); ++ req->send.buffer, req->send.datatype, req->send.length, ++ ucp_ep_md_index(ep, req->send.lane), NULL); + + rndv_op = uct_ep_tag_rndv_zcopy(ep->uct_eps[req->send.lane], req->send.tag.tag, + &rndv_hdr, sizeof(rndv_hdr), iov, iovcnt, 0, +@@ -637,7 +657,7 @@ static ucs_status_t ucp_tag_offload_eager_sync_bcopy(uct_pending_req_t *self) + ucp_worker_t *worker = req->send.ep->worker; + ucs_status_t status; + +- status = ucp_do_tag_offload_bcopy(self, worker->uuid, ++ status = ucp_do_tag_offload_bcopy(self, ucp_request_get_dest_ep_ptr(req), + ucp_tag_offload_pack_eager); + if (status == UCS_OK) { + ucp_tag_offload_sync_posted(worker, req); +@@ -654,7 +674,7 @@ static ucs_status_t ucp_tag_offload_eager_sync_zcopy(uct_pending_req_t *self) + ucp_worker_t *worker = req->send.ep->worker; + ucs_status_t status; + +- status = ucp_do_tag_offload_zcopy(self, worker->uuid, ++ status = ucp_do_tag_offload_zcopy(self, ucp_request_get_dest_ep_ptr(req), + ucp_tag_eager_sync_zcopy_req_complete); + if (status == UCS_OK) { + ucp_tag_offload_sync_posted(worker, req); +@@ -662,24 +682,6 @@ static ucs_status_t ucp_tag_offload_eager_sync_zcopy(uct_pending_req_t *self) + return status; + } + +-void ucp_tag_offload_eager_sync_send_ack(ucp_worker_h worker, +- uint64_t sender_uuid, +- ucp_tag_t sender_tag) +-{ +- ucp_request_t *req; +- +- ucs_trace_req("offload_send_sync_ack sender_uuid %"PRIx64" sender_tag %"PRIx64"", +- sender_uuid, sender_tag); +- +- req = ucp_worker_allocate_reply(worker, sender_uuid); +- req->send.uct.func = ucp_proto_progress_am_bcopy_single; +- req->send.proto.am_id = UCP_AM_ID_OFFLOAD_SYNC_ACK; +- req->send.proto.sender_uuid = sender_uuid; +- req->send.proto.sender_tag = sender_tag; +- req->send.proto.comp_cb = ucp_request_put; +- ucp_request_send(req); +-} +- + const ucp_proto_t ucp_tag_offload_sync_proto = { + .contig_short = NULL, + .bcopy_single = ucp_tag_offload_eager_sync_bcopy, +@@ -691,5 +693,3 @@ const ucp_proto_t ucp_tag_offload_sync_proto = { + .first_hdr_size = 0, + .mid_hdr_size = 0 + }; +- +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.h +index 29e921d..fbdc4be 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.h +@@ -22,7 +22,7 @@ enum { + * Header for unexpected rendezvous + */ + typedef struct { +- uint64_t sender_uuid; /* Sender worker uuid */ ++ uintptr_t ep_ptr; + uintptr_t reqptr; /* Request pointer */ + uint8_t md_index; /* md index */ + } UCS_S_PACKED ucp_tag_offload_unexp_rndv_hdr_t; +@@ -32,7 +32,7 @@ typedef struct { + * Header for sync send acknowledgment + */ + typedef struct { +- uint64_t sender_uuid; ++ uintptr_t ep_ptr; + ucp_tag_t sender_tag; + } UCS_S_PACKED ucp_offload_ssend_hdr_t; + +@@ -49,10 +49,6 @@ void ucp_tag_offload_cancel_rndv(ucp_request_t *req); + + ucs_status_t ucp_tag_offload_start_rndv(ucp_request_t *sreq); + +-void ucp_tag_offload_eager_sync_send_ack(ucp_worker_h worker, +- uint64_t sender_uuid, +- ucp_tag_t sender_tag); +- + ucs_status_t ucp_tag_offload_unexp_eager(void *arg, void *data, size_t length, + unsigned flags, uct_tag_t stag, uint64_t imm); + +@@ -106,18 +102,21 @@ ucp_tag_offload_try_cancel(ucp_worker_t *worker, ucp_request_t *req, unsigned mo + * message received on this interface. Also it maintains hash of tags, if + * more than one interface is active. Then, when expected receive request needs + * to be offloaded, the corresponding offload-capable interface is retrieved +- * from the hash. Having just one offload-capable interface is supposed to be +- * a fast path, because it matches homogeneous cluster configurations. So, no +- * hashing is done, while only one offload-capable interface is active. ++ * from the hash. + * + * @note Hash key is a tag masked with 'tag_sender_mask', because it needs to + * identify a particular sender, rather than every single tag. + * ++ * @note Tag is added to the hash table for messages bigger than TM_THRESH. ++ * Smaller messages are not supposed to be matched in HW, thus no need ++ * to waste time on hashing for them. ++ * ++ * + * @param [in] wiface UCP worker interface. + * @param [in] tag Tag of the arrived unexpected message. + */ + static UCS_F_ALWAYS_INLINE void +-ucp_tag_offload_unexp(ucp_worker_iface_t *wiface, ucp_tag_t tag) ++ucp_tag_offload_unexp(ucp_worker_iface_t *wiface, ucp_tag_t tag, size_t length) + { + ucp_worker_t *worker = wiface->worker; + ucp_tag_t tag_key; +@@ -132,7 +131,8 @@ ucp_tag_offload_unexp(ucp_worker_iface_t *wiface, ucp_tag_t tag) + } + } + +- if (ucs_unlikely(worker->tm.offload.num_ifaces > 1)) { ++ if (ucs_unlikely((length >= worker->tm.offload.thresh) && ++ (worker->num_active_ifaces > 1))) { + tag_key = worker->context->config.tag_sender_mask & tag; + hash_it = kh_put(ucp_tag_offload_hash, &worker->tm.offload.tag_hash, + tag_key, &ret); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/probe.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/probe.c +index a097b8f..ec80139 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/probe.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/probe.c +@@ -21,7 +21,9 @@ ucp_tag_message_h ucp_tag_probe_nb(ucp_worker_h worker, ucp_tag_t tag, + ucp_recv_desc_t *rdesc; + uint16_t flags; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_TAG, ++ return NULL); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + ucs_trace_req("probe_nb tag %"PRIx64"/%"PRIx64" remove=%d", tag, tag_mask, + remove); +@@ -41,7 +43,7 @@ ucp_tag_message_h ucp_tag_probe_nb(ucp_worker_h worker, ucp_tag_t tag, + } + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return rdesc; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/rndv.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/rndv.c +index 41c1940..64ee634 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/rndv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/rndv.c +@@ -19,6 +19,26 @@ static int ucp_rndv_is_get_zcopy(ucp_request_t *sreq, ucp_rndv_mode_t rndv_mode) + UCP_MEM_IS_HOST(sreq->send.mem_type))); + } + ++static int ucp_rndv_is_pipeline_needed(ucp_request_t *sreq) { ++ uct_md_attr_t *md_attr; ++ unsigned md_index; ++ ++ if (UCP_MEM_IS_HOST(sreq->send.mem_type)) { ++ return 0; ++ } ++ ++ if (sreq->send.ep->worker->context->config.ext.rndv_mode == ++ UCP_RNDV_MODE_PUT_ZCOPY) { ++ return 0; ++ } ++ ++ md_index = ucp_ep_md_index(sreq->send.ep, sreq->send.lane); ++ md_attr = &sreq->send.ep->worker->context->tl_mds[md_index].attr; ++ ++ /* check if lane support only mem type */ ++ return md_attr->cap.reg_mem_types & UCS_BIT(UCT_MD_MEM_TYPE_HOST); ++} ++ + size_t ucp_tag_rndv_rts_pack(void *dest, void *arg) + { + ucp_request_t *sreq = arg; /* send request */ +@@ -28,7 +48,7 @@ size_t ucp_tag_rndv_rts_pack(void *dest, void *arg) + + rndv_rts_hdr->super.tag = sreq->send.tag.tag; + rndv_rts_hdr->sreq.reqptr = (uintptr_t)sreq; +- rndv_rts_hdr->sreq.sender_uuid = worker->uuid; ++ rndv_rts_hdr->sreq.ep_ptr = ucp_request_get_dest_ep_ptr(sreq); + rndv_rts_hdr->size = sreq->send.length; + + /* Pack remote keys (which can be empty list) */ +@@ -39,6 +59,7 @@ size_t ucp_tag_rndv_rts_pack(void *dest, void *arg) + packed_rkey_size = ucp_rkey_pack_uct(worker->context, + sreq->send.state.dt.dt.contig.md_map, + sreq->send.state.dt.dt.contig.memh, ++ sreq->send.mem_type, + rndv_rts_hdr + 1); + if (packed_rkey_size < 0) { + ucs_fatal("failed to pack rendezvous remote key: %s", +@@ -75,6 +96,7 @@ static size_t ucp_tag_rndv_rtr_pack(void *dest, void *arg) + packed_rkey_size = ucp_rkey_pack_uct(rndv_req->send.ep->worker->context, + rreq->recv.state.dt.contig.md_map, + rreq->recv.state.dt.contig.memh, ++ rreq->recv.mem_type, + rndv_rtr_hdr + 1); + if (packed_rkey_size < 0) { + return packed_rkey_size; +@@ -113,7 +135,12 @@ ucs_status_t ucp_tag_send_start_rndv(ucp_request_t *sreq) + sreq->send.length); + UCS_PROFILE_REQUEST_EVENT(sreq, "start_rndv", sreq->send.length); + +- if (ep->flags & UCP_EP_FLAG_TAG_OFFLOAD_ENABLED) { ++ status = ucp_ep_resolve_dest_ep_ptr(ep, sreq->send.lane); ++ if (status != UCS_OK) { ++ return status; ++ } ++ ++ if (ucp_ep_is_tag_offload_enabled(ucp_ep_config(ep))) { + status = ucp_tag_offload_start_rndv(sreq); + if (status != UCS_OK) { + return status; +@@ -133,7 +160,6 @@ ucs_status_t ucp_tag_send_start_rndv(ucp_request_t *sreq) + sreq->send.uct.func = ucp_proto_progress_rndv_rts; + } + +- ucp_ep_connect_remote(ep); + return UCS_OK; + } + +@@ -166,7 +192,6 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_complete_rma_put_zcopy, (sreq), + ucp_trace_req(sreq, "rndv_put completed"); + UCS_PROFILE_REQUEST_EVENT(sreq, "complete_rndv_put", 0); + +- ucp_rkey_destroy(sreq->send.rndv_put.rkey); + ucp_request_send_buffer_dereg(sreq); + ucp_request_complete_send(sreq, UCS_OK); + } +@@ -180,6 +205,9 @@ static void ucp_rndv_send_atp(ucp_request_t *sreq, uintptr_t remote_request) + ucp_trace_req(sreq, "send atp remote_request 0x%lx", remote_request); + UCS_PROFILE_REQUEST_EVENT(sreq, "send_atp", 0); + ++ /* destroy rkey before it gets overridden by ATP protocol data */ ++ ucp_rkey_destroy(sreq->send.rndv_put.rkey); ++ + sreq->send.lane = ucp_ep_get_am_lane(sreq->send.ep); + sreq->send.uct.func = ucp_proto_progress_am_bcopy_single; + sreq->send.proto.am_id = UCP_AM_ID_RNDV_ATP; +@@ -245,7 +273,7 @@ static void ucp_rndv_get_lanes_count(ucp_request_t *req) + return; /* already resolved */ + } + +- while ((lane = ucp_rkey_get_rma_bw_lane(req->send.rndv_get.rkey, ep, ++ while ((lane = ucp_rkey_get_rma_bw_lane(req->send.rndv_get.rkey, ep, req->send.mem_type, + &uct_rkey, map)) != UCP_NULL_LANE) { + req->send.rndv_get.lane_count++; + map |= UCS_BIT(lane); +@@ -265,7 +293,7 @@ static ucp_lane_index_t ucp_rndv_get_next_lane(ucp_request_t *rndv_req, uct_rkey + ucp_ep_h ep = rndv_req->send.ep; + ucp_lane_index_t lane; + +- lane = ucp_rkey_get_rma_bw_lane(rndv_req->send.rndv_get.rkey, ep, ++ lane = ucp_rkey_get_rma_bw_lane(rndv_req->send.rndv_get.rkey, ep, rndv_req->send.mem_type, + uct_rkey, rndv_req->send.rndv_get.lanes_map); + + if ((lane == UCP_NULL_LANE) && (rndv_req->send.rndv_get.lanes_map != 0)) { +@@ -273,7 +301,7 @@ static ucp_lane_index_t ucp_rndv_get_next_lane(ucp_request_t *rndv_req, uct_rkey + * is not NULL - we found at least one lane on previous iteration). + * reset used lanes map to NULL and iterate it again */ + rndv_req->send.rndv_get.lanes_map = 0; +- lane = ucp_rkey_get_rma_bw_lane(rndv_req->send.rndv_get.rkey, ep, ++ lane = ucp_rkey_get_rma_bw_lane(rndv_req->send.rndv_get.rkey, ep, rndv_req->send.mem_type, + uct_rkey, rndv_req->send.rndv_get.lanes_map); + } + +@@ -285,7 +313,7 @@ static ucp_lane_index_t ucp_rndv_get_next_lane(ucp_request_t *rndv_req, uct_rkey + rndv_req->send.rndv_get.lanes_map |= UCS_BIT(lane); + /* in case if masked too much lanes - reset mask to zero + * to select first lane next time */ +- if (ucs_count_one_bits(rndv_req->send.rndv_get.lanes_map) >= ++ if (ucs_popcount(rndv_req->send.rndv_get.lanes_map) >= + ep->worker->context->config.ext.max_rndv_lanes) { + rndv_req->send.rndv_get.lanes_map = 0; + } +@@ -309,11 +337,6 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_rma_get_zcopy, (self), + size_t max_zcopy; + size_t tail; + +- if (ucp_ep_is_stub(ep)) { +- rndv_req->send.lane = 0; +- return UCS_ERR_NO_RESOURCE; +- } +- + ucp_rndv_get_lanes_count(rndv_req); + + /* Figure out which lane to use for get operation */ +@@ -455,6 +478,7 @@ static void ucp_rndv_req_send_rma_get(ucp_request_t *rndv_req, ucp_request_t *rr + + rndv_req->send.uct.func = ucp_rndv_progress_rma_get_zcopy; + rndv_req->send.buffer = rreq->recv.buffer; ++ rndv_req->send.mem_type = rreq->recv.mem_type; + rndv_req->send.datatype = ucp_dt_make_contig(1); + rndv_req->send.length = rndv_rts_hdr->size; + rndv_req->send.rndv_get.remote_request = rndv_rts_hdr->sreq.reqptr; +@@ -496,7 +520,17 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_matched, (worker, rreq, rndv_rts_hdr), + + /* the internal send request allocated on receiver side (to perform a "get" + * operation, send "ATS" and "RTR") */ +- rndv_req = ucp_worker_allocate_reply(worker, rndv_rts_hdr->sreq.sender_uuid); ++ rndv_req = ucp_request_get(worker); ++ if (rndv_req == NULL) { ++ ucs_error("failed to allocate rendezvous reply"); ++ goto out; ++ } ++ ++ rndv_req->send.ep = ucp_worker_get_ep_by_ptr(worker, ++ rndv_rts_hdr->sreq.ep_ptr); ++ rndv_req->flags = 0; ++ rndv_req->send.mdesc = NULL; ++ rndv_req->send.pending_lane = UCP_NULL_LANE; + + ucp_trace_req(rreq, + "rndv matched remote {address 0x%"PRIx64" size %zu sreq 0x%lx}" +@@ -513,14 +547,9 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_matched, (worker, rreq, rndv_rts_hdr), + goto out; + } + +- rndv_req->send.pending_lane = UCP_NULL_LANE; + + /* if the receive side is not connected yet then the RTS was received on a stub ep */ + ep = rndv_req->send.ep; +- if (ucp_ep_is_stub(ep)) { +- ucs_debug("received rts on a stub ep, ep %p am_lane %d", ep, +- ucp_ep_get_am_lane(ep)); +- } + + rndv_mode = worker->context->config.ext.rndv_mode; + if (UCP_DT_IS_CONTIG(rreq->recv.datatype)) { +@@ -530,7 +559,8 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_matched, (worker, rreq, rndv_rts_hdr), + goto out; + } else if (rndv_mode != UCP_RNDV_MODE_GET_ZCOPY) { + /* put protocol is allowed - register receive buffer memory for rma */ +- ucp_request_recv_buffer_reg(rreq, ucp_ep_config(ep)->key.rma_bw_md_map); ++ ucp_request_recv_buffer_reg(rreq, ucp_ep_config(ep)->key.rma_bw_md_map, ++ ucs_min(rreq->recv.length, rndv_rts_hdr->size)); + } + } + +@@ -564,9 +594,9 @@ ucs_status_t ucp_rndv_process_rts(void *arg, void *data, size_t length, + UCP_WORKER_STAT_RNDV(worker, EXP); + status = UCS_OK; + } else { +- status = ucp_recv_desc_init(worker, data, length, tl_flags, ++ status = ucp_recv_desc_init(worker, data, length, 0, tl_flags, + sizeof(*rndv_rts_hdr), +- UCP_RECV_DESC_FLAG_RNDV, &rdesc); ++ UCP_RECV_DESC_FLAG_RNDV, 0, &rdesc); + if (!UCS_STATUS_IS_ERR(status)) { + ucp_tag_unexp_recv(&worker->tm, rdesc, rndv_rts_hdr->super.tag); + } +@@ -615,31 +645,17 @@ static size_t ucp_rndv_pack_data(void *dest, void *arg) + { + ucp_rndv_data_hdr_t *hdr = dest; + ucp_request_t *sreq = arg; +- size_t length; +- +- hdr->rreq_ptr = sreq->send.rndv_data.rreq_ptr; +- hdr->offset = sreq->send.state.dt.offset; +- length = ucp_ep_get_max_bcopy(sreq->send.ep, sreq->send.lane) - sizeof(*hdr); +- +- return sizeof(*hdr) + ucp_dt_pack(sreq->send.datatype, hdr + 1, +- sreq->send.buffer, &sreq->send.state.dt, +- length); +-} +- +-static size_t ucp_rndv_pack_data_last(void *dest, void *arg) +-{ +- ucp_rndv_data_hdr_t *hdr = dest; +- ucp_request_t *sreq = arg; + size_t length, offset; + + offset = sreq->send.state.dt.offset; +- hdr->rreq_ptr = sreq->send.rndv_data.rreq_ptr; +- length = sreq->send.length - offset; ++ hdr->rreq_ptr = sreq->send.tag.rreq_ptr; + hdr->offset = offset; ++ length = ucs_min(sreq->send.length - offset, ++ ucp_ep_get_max_bcopy(sreq->send.ep, sreq->send.lane) - sizeof(*hdr)); + +- return sizeof(*hdr) + ucp_dt_pack(sreq->send.datatype, hdr + 1, +- sreq->send.buffer, &sreq->send.state.dt, +- length); ++ return sizeof(*hdr) + ucp_dt_pack(sreq->send.ep->worker, sreq->send.datatype, ++ sreq->send.mem_type, hdr + 1, sreq->send.buffer, ++ &sreq->send.state.dt, length); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_am_bcopy, (self), +@@ -654,16 +670,13 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_am_bcopy, (self), + if (sreq->send.length <= ucp_ep_config(ep)->am.max_bcopy - sizeof(ucp_rndv_data_hdr_t)) { + /* send a single bcopy message */ + status = ucp_do_am_bcopy_single(self, UCP_AM_ID_RNDV_DATA, +- ucp_rndv_pack_data_last); ++ ucp_rndv_pack_data); + } else { +- /* send multiple bcopy messages (fragments of the original send message) */ + status = ucp_do_am_bcopy_multi(self, UCP_AM_ID_RNDV_DATA, + UCP_AM_ID_RNDV_DATA, +- UCP_AM_ID_RNDV_DATA, + sizeof(ucp_rndv_data_hdr_t), + ucp_rndv_pack_data, +- ucp_rndv_pack_data, +- ucp_rndv_pack_data_last, 1); ++ ucp_rndv_pack_data, 1); + } + if (status == UCS_OK) { + ucp_rndv_complete_send(sreq); +@@ -712,8 +725,8 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_rma_put_zcopy, (self), + + state = sreq->send.state.dt; + ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iovcnt, &state, +- sreq->send.buffer, ucp_dt_make_contig(1), length, 0, +- sreq->send.mdesc); ++ sreq->send.buffer, ucp_dt_make_contig(1), length, ++ ucp_ep_md_index(ep, sreq->send.lane), sreq->send.mdesc); + status = uct_ep_put_zcopy(ep->uct_eps[sreq->send.lane], + iov, iovcnt, + sreq->send.rndv_put.remote_address + offset, +@@ -724,7 +737,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_rma_put_zcopy, (self), + status); + if (sreq->send.state.dt.offset == sreq->send.length) { + if (sreq->send.state.uct_comp.count == 0) { +- ucp_rndv_send_atp(sreq, sreq->send.rndv_put.remote_request); ++ sreq->send.state.uct_comp.func(&sreq->send.state.uct_comp, status); + } + return UCS_OK; + } else if (!UCS_STATUS_IS_ERR(status)) { +@@ -758,7 +771,7 @@ static ucs_status_t ucp_rndv_progress_am_zcopy_single(uct_pending_req_t *self) + ucp_request_t *sreq = ucs_container_of(self, ucp_request_t, send.uct); + ucp_rndv_data_hdr_t hdr; + +- hdr.rreq_ptr = sreq->send.rndv_data.rreq_ptr; ++ hdr.rreq_ptr = sreq->send.tag.rreq_ptr; + hdr.offset = 0; + return ucp_do_am_zcopy_single(self, UCP_AM_ID_RNDV_DATA, &hdr, sizeof(hdr), + ucp_rndv_am_zcopy_send_req_complete); +@@ -769,12 +782,11 @@ static ucs_status_t ucp_rndv_progress_am_zcopy_multi(uct_pending_req_t *self) + ucp_request_t *sreq = ucs_container_of(self, ucp_request_t, send.uct); + ucp_rndv_data_hdr_t hdr; + +- hdr.rreq_ptr = sreq->send.rndv_data.rreq_ptr; ++ hdr.rreq_ptr = sreq->send.tag.rreq_ptr; + hdr.offset = sreq->send.state.dt.offset; + return ucp_do_am_zcopy_multi(self, + UCP_AM_ID_RNDV_DATA, + UCP_AM_ID_RNDV_DATA, +- UCP_AM_ID_RNDV_DATA, + &hdr, sizeof(hdr), + &hdr, sizeof(hdr), + ucp_rndv_am_zcopy_send_req_complete, 1); +@@ -787,6 +799,7 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_frag_put_completion, (self, status), + ucp_request_t *sreq = frag_req->send.rndv_put.sreq; + + ucs_mpool_put_inline((void *)frag_req->send.mdesc); ++ sreq->send.state.dt.offset += frag_req->send.length; + sreq->send.state.uct_comp.count--; + if (0 == sreq->send.state.uct_comp.count) { + ucp_rndv_send_atp(sreq, sreq->send.rndv_put.remote_request); +@@ -813,7 +826,6 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_frag_get_completion, (self, status), + frag_req->send.state.dt.dt.contig.md_map = 0; + + ucp_request_send(frag_req); +- sreq->send.state.dt.offset += frag_req->send.length; + } + + static ucs_status_t ucp_rndv_pipeline(ucp_request_t *sreq, ucp_rndv_rtr_hdr_t *rndv_rtr_hdr) +@@ -860,10 +872,12 @@ static ucs_status_t ucp_rndv_pipeline(ucp_request_t *sreq, ucp_rndv_rtr_hdr_t *r + frag_req->send.ep = pipeline_ep; + frag_req->send.buffer = mdesc + 1; + frag_req->send.datatype = ucp_dt_make_contig(1); ++ frag_req->send.mem_type = sreq->send.mem_type; + frag_req->send.state.dt.dt.contig.memh[0]= ucp_memh2uct(mdesc->memh, md_index); + frag_req->send.state.dt.dt.contig.md_map = UCS_BIT(md_index); + frag_req->send.length = length; + frag_req->send.uct.func = ucp_rndv_progress_rma_get_zcopy; ++ frag_req->send.rndv_get.rkey = NULL; + frag_req->send.rndv_get.remote_address = (uint64_t)(sreq->send.buffer + offset); + frag_req->send.rndv_get.lanes_map = 0; + frag_req->send.rndv_get.lane_count = 0; +@@ -885,7 +899,6 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_rtr_handler, + ucp_rndv_rtr_hdr_t *rndv_rtr_hdr = data; + ucp_request_t *sreq = (ucp_request_t*)rndv_rtr_hdr->sreq_ptr; + ucp_ep_h ep = sreq->send.ep; +- ucp_rndv_mode_t rndv_mode = ep->worker->context->config.ext.rndv_mode; + ucs_status_t status; + + ucp_trace_req(sreq, "received rtr address 0x%lx remote rreq 0x%lx", +@@ -907,11 +920,10 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_rtr_handler, + } + + sreq->send.lane = ucp_rkey_get_rma_bw_lane(sreq->send.rndv_put.rkey, ep, ++ sreq->send.mem_type, + &sreq->send.rndv_put.uct_rkey, 0); + if (sreq->send.lane != UCP_NULL_LANE) { +- if ((rndv_mode == UCP_RNDV_MODE_PUT_ZCOPY) || +- ((rndv_mode == UCP_RNDV_MODE_AUTO) && +- UCP_MEM_IS_HOST(sreq->send.mem_type))) { ++ if (!ucp_rndv_is_pipeline_needed(sreq)) { + ucp_request_send_state_reset(sreq, ucp_rndv_put_completion, + UCP_REQUEST_SEND_PROTO_RNDV_PUT); + sreq->send.uct.func = ucp_rndv_progress_rma_put_zcopy; +@@ -928,10 +940,11 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_rtr_handler, + } + + /* switch to AM */ +- sreq->send.rndv_data.rreq_ptr = rndv_rtr_hdr->rreq_ptr; ++ sreq->send.tag.rreq_ptr = rndv_rtr_hdr->rreq_ptr; + + if (UCP_DT_IS_CONTIG(sreq->send.datatype) && +- (sreq->send.length >= ucp_ep_config(ep)->am.zcopy_thresh[0])) ++ (sreq->send.length >= ++ ucp_ep_config(ep)->am.mem_type_zcopy_thresh[sreq->send.mem_type])) + { + status = ucp_request_send_buffer_reg_lane(sreq, ucp_ep_get_am_lane(ep)); + ucs_assert_always(status == UCS_OK); +@@ -944,12 +957,12 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_rtr_handler, + sreq->send.uct.func = ucp_rndv_progress_am_zcopy_single; + } else { + sreq->send.uct.func = ucp_rndv_progress_am_zcopy_multi; +- sreq->send.tag.am_bw_index = 0; ++ sreq->send.tag.am_bw_index = 1; + } + } else { + ucp_request_send_state_reset(sreq, NULL, UCP_REQUEST_SEND_PROTO_BCOPY_AM); + sreq->send.uct.func = ucp_rndv_progress_am_bcopy; +- sreq->send.tag.am_bw_index = 0; ++ sreq->send.tag.am_bw_index = 1; + } + + out_send: +@@ -996,9 +1009,10 @@ static void ucp_rndv_dump(ucp_worker_h worker, uct_am_trace_type_t type, + + switch (id) { + case UCP_AM_ID_RNDV_RTS: +- snprintf(buffer, max, "RNDV_RTS tag %"PRIx64" uuid %"PRIx64" sreq 0x%lx " ++ ucs_assert(rndv_rts_hdr->sreq.ep_ptr != 0); ++ snprintf(buffer, max, "RNDV_RTS tag %"PRIx64" ep_ptr %lx sreq 0x%lx " + "address 0x%"PRIx64" size %zu", rndv_rts_hdr->super.tag, +- rndv_rts_hdr->sreq.sender_uuid, rndv_rts_hdr->sreq.reqptr, ++ rndv_rts_hdr->sreq.ep_ptr, rndv_rts_hdr->sreq.reqptr, + rndv_rts_hdr->address, rndv_rts_hdr->size); + if (rndv_rts_hdr->address) { + ucp_rndv_dump_rkey(rndv_rts_hdr + 1, buffer + strlen(buffer), +@@ -1032,15 +1046,15 @@ static void ucp_rndv_dump(ucp_worker_h worker, uct_am_trace_type_t type, + } + + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_RTS, ucp_rndv_rts_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_ATS, ucp_rndv_ats_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_ATP, ucp_rndv_atp_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_RTR, ucp_rndv_rtr_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_DATA, ucp_rndv_data_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + + UCP_DEFINE_AM_PROXY(UCP_AM_ID_RNDV_RTS); + UCP_DEFINE_AM_PROXY(UCP_AM_ID_RNDV_ATS); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.c +index 1cd17fc..e8bc72f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.c +@@ -45,7 +45,6 @@ ucs_status_t ucp_tag_match_init(ucp_tag_match_t *tm) + tm->offload.thresh = SIZE_MAX; + tm->offload.zcopy_thresh = SIZE_MAX; + tm->offload.iface = NULL; +- tm->offload.num_ifaces = 0; + tm->am.message_id = ucs_generate_uuid(0); + return UCS_OK; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.h +index ac17593..9aa2c03 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.h +@@ -82,8 +82,9 @@ typedef struct ucp_tag_match { + struct { + ucs_queue_head_t sync_reqs; /* Outgoing sync send requests */ + khash_t(ucp_tag_offload_hash) tag_hash; /* Hash table of offload ifaces */ +- ucp_worker_iface_t *iface; /* Active offload iface (relevant if num_ifaces +- is 1, otherwise hash should be used) */ ++ ucp_worker_iface_t *iface; /* Active offload iface (relevant if just ++ one iface is activated on the worker, ++ otherwise hash should be used) */ + size_t thresh; /* Minimal receive buffer size to be + used with tag-matching offload. */ + size_t zcopy_thresh; /* Minimal size of user-provided +@@ -95,8 +96,6 @@ typedef struct ucp_tag_match { + or not be used with tag-matching + offload at all, according to + 'thresh' configuration. */ +- unsigned num_ifaces; /* Number of active offload +- capable interfaces */ + } offload; + + struct { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.inl +index 2accff8..94ba435 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.inl +@@ -212,27 +212,6 @@ ucp_tag_unexp_search(ucp_tag_match_t *tm, ucp_tag_t tag, uint64_t tag_mask, + return NULL; + } + +-static UCS_F_ALWAYS_INLINE void +-ucp_tag_unexp_desc_release(ucp_recv_desc_t *rdesc) +-{ +- ucs_trace_req("release receive descriptor %p", rdesc); +- if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_UCT_DESC)) { +- /* uct desc is slowpath */ +- if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_EAGER_OFFLOAD)) { +- if (rdesc->flags & UCP_RECV_DESC_FLAG_EAGER_SYNC) { +- uct_iface_release_desc(rdesc); +- } else { +- uct_iface_release_desc( (char*)rdesc - +- (sizeof(ucp_eager_sync_hdr_t) - sizeof(ucp_eager_hdr_t)) ); +- } +- } else { +- uct_iface_release_desc((char*)rdesc - sizeof(ucp_eager_sync_hdr_t)); +- } +- } else { +- ucs_mpool_put_inline(rdesc); +- } +-} +- + /* + * process data, complete receive if done + * @return UCS_OK/ERR - completed, UCS_INPROGRESS - not completed +@@ -280,7 +259,7 @@ ucp_tag_recv_request_process_rdesc(ucp_request_t *req, ucp_recv_desc_t *rdesc, + recv_len = rdesc->length - hdr_len; + status = ucp_tag_request_process_recv_data(req, (void*)(rdesc + 1) + hdr_len, + recv_len, offset, 0); +- ucp_tag_unexp_desc_release(rdesc); ++ ucp_recv_desc_release(rdesc); + return status; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_recv.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_recv.c +index e96fb29..d8a3ea2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_recv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_recv.c +@@ -69,7 +69,7 @@ ucp_tag_recv_common(ucp_worker_h worker, void *buffer, size_t count, + + status = ucp_dt_unpack_only(worker, buffer, count, datatype, mem_type, + (void*)(rdesc + 1) + hdr_len, recv_len, 1); +- ucp_tag_unexp_desc_release(rdesc); ++ ucp_recv_desc_release(rdesc); + + if (req_flags & UCP_REQUEST_FLAG_CALLBACK) { + cb(req + 1, status, &req->recv.tag.info); +@@ -125,7 +125,7 @@ ucp_tag_recv_common(ucp_worker_h worker, void *buffer, size_t count, + if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_RNDV)) { + ucp_rndv_matched(worker, req, (void*)(rdesc + 1)); + UCP_WORKER_STAT_RNDV(worker, UNEXP); +- ucp_tag_unexp_desc_release(rdesc); ++ ucp_recv_desc_release(rdesc); + return; + } + +@@ -160,14 +160,16 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_recv_nbr, + ucp_request_t *req = (ucp_request_t *)request - 1; + ucp_recv_desc_t *rdesc; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_TAG, ++ return UCS_ERR_INVALID_PARAM); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + rdesc = ucp_tag_unexp_search(&worker->tm, tag, tag_mask, 1, "recv_nbr"); + ucp_tag_recv_common(worker, buffer, count, datatype, tag, tag_mask, + req, UCP_REQUEST_DEBUG_FLAG_EXTERNAL, NULL, rdesc, + "recv_nbr"); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return UCS_OK; + } + +@@ -181,7 +183,9 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_recv_nb, + ucs_status_ptr_t ret; + ucp_request_t *req; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_TAG, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + req = ucp_request_get(worker); + if (ucs_likely(req != NULL)) { +@@ -193,7 +197,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_recv_nb, + ret = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return ret; + } + +@@ -207,7 +211,9 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_msg_recv_nb, + ucs_status_ptr_t ret; + ucp_request_t *req; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_TAG, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + req = ucp_request_get(worker); + if (ucs_likely(req != NULL)) { +@@ -219,6 +225,6 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_msg_recv_nb, + ret = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_send.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_send.c +index 04357b8..4294505 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_send.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_send.c +@@ -19,46 +19,45 @@ + static UCS_F_ALWAYS_INLINE size_t + ucp_tag_get_rndv_threshold(const ucp_request_t *req, size_t count, + size_t max_iov, size_t rndv_rma_thresh, +- size_t rndv_am_thresh, size_t seg_size) ++ size_t rndv_am_thresh) + { + switch (req->send.datatype & UCP_DATATYPE_CLASS_MASK) { +- case UCP_DATATYPE_IOV: ++ case UCP_DATATYPE_IOV: + if ((count > max_iov) && + ucp_ep_is_tag_offload_enabled(ucp_ep_config(req->send.ep))) { + /* Make sure SW RNDV will be used, because tag offload does + * not support multi-packet eager protocols. */ +- return seg_size; ++ return 1; + } + /* Fall through */ +- case UCP_DATATYPE_CONTIG: ++ case UCP_DATATYPE_CONTIG: + return ucs_min(rndv_rma_thresh, rndv_am_thresh); + case UCP_DATATYPE_GENERIC: + return rndv_am_thresh; + default: + ucs_error("Invalid data type %lx", req->send.datatype); + } +- ++ + return SIZE_MAX; + } + + static UCS_F_ALWAYS_INLINE ucs_status_ptr_t +-ucp_tag_send_req(ucp_request_t *req, size_t count, ++ucp_tag_send_req(ucp_request_t *req, size_t dt_count, + const ucp_ep_msg_config_t* msg_config, + size_t rndv_rma_thresh, size_t rndv_am_thresh, + ucp_send_callback_t cb, const ucp_proto_t *proto, + int enable_zcopy) + { +- size_t seg_size = (msg_config->max_bcopy - proto->only_hdr_size); +- size_t rndv_thresh = ucp_tag_get_rndv_threshold(req, count, ++ size_t rndv_thresh = ucp_tag_get_rndv_threshold(req, dt_count, + msg_config->max_iov, + rndv_rma_thresh, +- rndv_am_thresh, seg_size); ++ rndv_am_thresh); + ssize_t max_short = ucp_proto_get_short_max(req, msg_config); + ucs_status_t status; + size_t zcopy_thresh; + + if (enable_zcopy || ucs_unlikely(!UCP_MEM_IS_HOST(req->send.mem_type))) { +- zcopy_thresh = ucp_proto_get_zcopy_threshold(req, msg_config, count, ++ zcopy_thresh = ucp_proto_get_zcopy_threshold(req, msg_config, dt_count, + rndv_thresh); + } else { + zcopy_thresh = rndv_thresh; +@@ -70,8 +69,8 @@ ucp_tag_send_req(ucp_request_t *req, size_t count, + req, req->send.datatype, req->send.buffer, req->send.length, + max_short, rndv_thresh, zcopy_thresh, enable_zcopy); + +- status = ucp_request_send_start(req, max_short, zcopy_thresh, seg_size, +- rndv_thresh, proto); ++ status = ucp_request_send_start(req, max_short, zcopy_thresh, rndv_thresh, ++ dt_count, msg_config, proto); + if (ucs_unlikely(status != UCS_OK)) { + if (status == UCS_ERR_NO_PROGRESS) { + /* RMA/AM rendezvous */ +@@ -123,7 +122,7 @@ ucp_tag_send_req_init(ucp_request_t* req, ucp_ep_h ep, const void* buffer, + { + req->flags = flags; + req->send.ep = ep; +- req->send.buffer = buffer; ++ req->send.buffer = (void*)buffer; + req->send.datatype = datatype; + req->send.tag.tag = tag; + ucp_request_send_state_init(req, datatype, count); +@@ -148,14 +147,24 @@ ucp_tag_send_inline(ucp_ep_h ep, const void *buffer, size_t count, + } + + length = ucp_contig_dt_length(datatype, count); +- if (ucs_unlikely((ssize_t)length > ucp_ep_config(ep)->tag.eager.max_short)) { ++ ++ if ((ssize_t)length <= ucp_ep_config(ep)->tag.max_eager_short) { ++ UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(ucp_eager_hdr_t)); ++ UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(uint64_t)); ++ status = uct_ep_am_short(ucp_ep_get_am_uct_ep(ep), UCP_AM_ID_EAGER_ONLY, ++ tag, buffer, length); ++ } else if ((ssize_t)length <= ucp_ep_config(ep)->tag.offload.max_eager_short) { ++ UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(uct_tag_t)); ++ status = uct_ep_tag_eager_short(ucp_ep_get_tag_uct_ep(ep), tag, buffer, ++ length); ++ } else { + return UCS_ERR_NO_RESOURCE; + } + +- status = UCS_PROFILE_CALL(ucp_tag_send_eager_short, ep, tag, buffer, length); + if (status != UCS_ERR_NO_RESOURCE) { + UCP_EP_STAT_TAG_OP(ep, EAGER); + } ++ + return status; + } + +@@ -169,12 +178,15 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_nb, + ucp_request_t *req; + ucs_status_ptr_t ret; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_TAG, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + + ucs_trace_req("send_nb buffer %p count %zu tag %"PRIx64" to %s cb %p", + buffer, count, tag, ucp_ep_peer_name(ep), cb); + +- status = ucp_tag_send_inline(ep, buffer, count, datatype, tag); ++ status = UCS_PROFILE_CALL(ucp_tag_send_inline, ep, buffer, count, ++ datatype, tag); + if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { + ret = UCS_STATUS_PTR(status); /* UCS_OK also goes here */ + goto out; +@@ -193,7 +205,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_nb, + ucp_ep_config(ep)->tag.rndv.am_thresh, + cb, ucp_ep_config(ep)->tag.proto, 1); + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return ret; + } + +@@ -206,14 +218,17 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_send_nbr, + ucs_status_t status; + ucs_status_ptr_t ret; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_TAG, ++ return UCS_ERR_INVALID_PARAM); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + + ucs_trace_req("send_nbr buffer %p count %zu tag %"PRIx64" to %s req %p", + buffer, count, tag, ucp_ep_peer_name(ep), request); + +- status = ucp_tag_send_inline(ep, buffer, count, datatype, tag); ++ status = UCS_PROFILE_CALL(ucp_tag_send_inline, ep, buffer, count, ++ datatype, tag); + if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return status; + } + +@@ -224,7 +239,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_send_nbr, + ucp_ep_config(ep)->tag.rndv_send_nbr.am_thresh, + NULL, ucp_ep_config(ep)->tag.proto, 0); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + + if (ucs_unlikely(UCS_PTR_IS_ERR(ret))) { + return UCS_PTR_STATUS(ret); +@@ -239,8 +254,11 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_sync_nb, + { + ucp_request_t *req; + ucs_status_ptr_t ret; ++ ucs_status_t status; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_TAG, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + + ucs_trace_req("send_sync_nb buffer %p count %zu tag %"PRIx64" to %s cb %p", + buffer, count, tag, ucp_ep_peer_name(ep), cb); +@@ -250,15 +268,18 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_sync_nb, + goto out; + } + ++ status = ucp_ep_resolve_dest_ep_ptr(ep, ucp_ep_config(ep)->tag.lane); ++ if (status != UCS_OK) { ++ ret = UCS_STATUS_PTR(status); ++ goto out; ++ } ++ + req = ucp_request_get(ep->worker); + if (req == NULL) { + ret = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + goto out; + } + +- /* Remote side needs to send reply, so have it connect to us */ +- ucp_ep_connect_remote(ep); +- + ucp_tag_send_req_init(req, ep, buffer, datatype, count, tag, + UCP_REQUEST_FLAG_SYNC); + +@@ -267,6 +288,6 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_sync_nb, + ucp_ep_config(ep)->tag.rndv.am_thresh, + cb, ucp_ep_config(ep)->tag.sync_proto, 1); + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.c +index 3e92f45..e2cbe59 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.c +@@ -48,9 +48,11 @@ typedef struct { + float overhead; + float bandwidth; + float lat_ovh; +- uint32_t prio_cap_flags; /* 8 lsb: prio, 24 msb - cap flags */ ++ uint32_t prio_cap_flags; /* 8 lsb: prio, 22 msb: cap flags, 2 hsb: amo */ + } ucp_address_packed_iface_attr_t; + ++#define UCT_ADDRESS_FLAG_ATOMIC32 UCS_BIT(30) /* 32bit atomic operations */ ++#define UCT_ADDRESS_FLAG_ATOMIC64 UCS_BIT(31) /* 64bit atomic operations */ + + #define UCP_ADDRESS_FLAG_LAST 0x80 /* Last address in the list */ + #define UCP_ADDRESS_FLAG_EP_ADDR 0x40 /* Indicates that ep addr is packed +@@ -168,6 +170,15 @@ ucp_address_gather_devices(ucp_worker_h worker, uint64_t tl_bitmap, int has_ep, + return UCS_OK; + } + ++static const char *ucp_address_get_worker_name(ucp_worker_h worker) ++{ ++ #if ENABLE_DEBUG_DATA ++ return ucp_worker_get_name(worker); ++ #else ++ return ""; ++ #endif ++} ++ + static size_t ucp_address_packed_size(ucp_worker_h worker, + const ucp_address_packed_device_t *devices, + ucp_rsc_index_t num_devices) +@@ -176,7 +187,7 @@ static size_t ucp_address_packed_size(ucp_worker_h worker, + size_t size; + + size = sizeof(uint64_t) + +- ucp_address_string_packed_size(ucp_worker_get_name(worker)); ++ ucp_address_string_packed_size(ucp_address_get_worker_name(worker)); + + if (num_devices == 0) { + size += 1; /* NULL md_index */ +@@ -234,9 +245,6 @@ static void ucp_address_pack_iface_attr(ucp_address_packed_iface_attr_t *packed, + uint64_t bit; + + cap_flags = iface_attr->cap.flags; +- if (!enable_atomics) { +- cap_flags &= ~(UCP_UCT_IFACE_ATOMIC32_FLAGS | UCP_UCT_IFACE_ATOMIC64_FLAGS); +- } + + packed->prio_cap_flags = ((uint8_t)iface_attr->priority); + packed->overhead = iface_attr->overhead; +@@ -255,6 +263,18 @@ static void ucp_address_pack_iface_attr(ucp_address_packed_iface_attr_t *packed, + } + bit <<= 1; + } ++ ++ if (enable_atomics) { ++ if (ucs_test_all_flags(iface_attr->cap.atomic32.op_flags, UCP_ATOMIC_OP_MASK) && ++ ucs_test_all_flags(iface_attr->cap.atomic32.fop_flags, UCP_ATOMIC_FOP_MASK)) { ++ packed->prio_cap_flags |= UCT_ADDRESS_FLAG_ATOMIC32; ++ } ++ if (ucs_test_all_flags(iface_attr->cap.atomic64.op_flags, UCP_ATOMIC_OP_MASK) && ++ ucs_test_all_flags(iface_attr->cap.atomic64.fop_flags, UCP_ATOMIC_FOP_MASK)) { ++ packed->prio_cap_flags |= UCT_ADDRESS_FLAG_ATOMIC64; ++ } ++ } ++ + } + + static void +@@ -281,6 +301,15 @@ ucp_address_unpack_iface_attr(ucp_address_iface_attr_t *iface_attr, + } + bit <<= 1; + } ++ ++ if (packed->prio_cap_flags & UCT_ADDRESS_FLAG_ATOMIC32) { ++ iface_attr->atomic.atomic32.op_flags |= UCP_ATOMIC_OP_MASK; ++ iface_attr->atomic.atomic32.fop_flags |= UCP_ATOMIC_FOP_MASK; ++ } ++ if (packed->prio_cap_flags & UCT_ADDRESS_FLAG_ATOMIC64) { ++ iface_attr->atomic.atomic64.op_flags |= UCP_ATOMIC_OP_MASK; ++ iface_attr->atomic.atomic64.fop_flags |= UCP_ATOMIC_FOP_MASK; ++ } + } + + static ucs_status_t ucp_address_do_pack(ucp_worker_h worker, ucp_ep_h ep, +@@ -307,7 +336,7 @@ static ucs_status_t ucp_address_do_pack(ucp_worker_h worker, ucp_ep_h ep, + + *(uint64_t*)ptr = worker->uuid; + ptr += sizeof(uint64_t); +- ptr = ucp_address_pack_string(ucp_worker_get_name(worker), ptr); ++ ptr = ucp_address_pack_string(ucp_address_get_worker_name(worker), ptr); + + if (num_devices == 0) { + *((uint8_t*)ptr) = UCP_NULL_RESOURCE; +@@ -405,7 +434,7 @@ static ucs_status_t ucp_address_do_pack(ucp_worker_h worker, ucp_ep_h ep, + + /* Save the address index of this transport */ + if (order != NULL) { +- order[ucs_count_one_bits(tl_bitmap & UCS_MASK(i))] = index; ++ order[ucs_popcount(tl_bitmap & UCS_MASK(i))] = index; + } + + ucs_trace("pack addr[%d] : "UCT_TL_RESOURCE_DESC_FMT +@@ -476,10 +505,8 @@ out: + return status; + } + +-ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, +- char *remote_name, size_t max, +- unsigned *address_count_p, +- ucp_address_entry_t **address_list_p) ++ucs_status_t ucp_address_unpack(const void *buffer, ++ ucp_unpacked_address_t *unpacked_address) + { + ucp_address_entry_t *address_list, *address; + const uct_device_addr_t *dev_addr; +@@ -497,10 +524,11 @@ ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, + const void *aptr; + + ptr = buffer; +- *remote_uuid_p = *(uint64_t*)ptr; ++ unpacked_address->uuid = *(uint64_t*)ptr; + ptr += sizeof(uint64_t); + +- aptr = ucp_address_unpack_string(ptr, remote_name, max); ++ aptr = ucp_address_unpack_string(ptr, unpacked_address->name, ++ sizeof(unpacked_address->name)); + + address_count = 0; + +@@ -549,6 +577,7 @@ ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, + address_list = ucs_calloc(address_count, sizeof(*address_list), + "ucp_address_list"); + if (address_list == NULL) { ++ ucs_error("failed to allocate address list"); + return UCS_ERR_NO_MEMORY; + } + +@@ -622,8 +651,8 @@ ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, + ++dev_index; + } while (!last_dev); + +- *address_count_p = address_count; +- *address_list_p = address_list; ++ unpacked_address->address_count = address_count; ++ unpacked_address->address_list = address_list; + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.h +index 675ebe0..24529c5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.h +@@ -23,12 +23,11 @@ enum { + UCT_IFACE_FLAG_PUT_SHORT | + UCT_IFACE_FLAG_PUT_BCOPY | + UCT_IFACE_FLAG_PUT_ZCOPY | ++ UCT_IFACE_FLAG_GET_SHORT | + UCT_IFACE_FLAG_GET_BCOPY | + UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_TAG_EAGER_BCOPY | + UCT_IFACE_FLAG_TAG_RNDV_ZCOPY | +- UCP_UCT_IFACE_ATOMIC32_FLAGS | +- UCP_UCT_IFACE_ATOMIC64_FLAGS | + UCT_IFACE_FLAG_EVENT_RECV | + UCT_IFACE_FLAG_EVENT_RECV_SIG | + UCT_IFACE_FLAG_PENDING +@@ -39,11 +38,12 @@ enum { + * Remote interface attributes. + */ + struct ucp_address_iface_attr { +- uint64_t cap_flags; /* Interface capability flags */ +- double overhead; /* Interface performance - overhead */ +- double bandwidth; /* Interface performance - bandwidth */ +- int priority; /* Priority of device */ +- double lat_ovh; /* latency overhead */ ++ uint64_t cap_flags; /* Interface capability flags */ ++ double overhead; /* Interface performance - overhead */ ++ double bandwidth; /* Interface performance - bandwidth */ ++ int priority; /* Priority of device */ ++ double lat_ovh; /* Latency overhead */ ++ ucp_tl_iface_atomic_flags_t atomic; /* Atomic operations */ + }; + + +@@ -63,6 +63,17 @@ struct ucp_address_entry { + + + /** ++ * Unpacked remote address ++ */ ++struct ucp_unpacked_address { ++ uint64_t uuid; /* Remote worker UUID */ ++ char name[UCP_WORKER_NAME_MAX]; /* Remote worker name */ ++ unsigned address_count; /* Length of address list */ ++ ucp_address_entry_t *address_list; /* Pointer to address list */ ++}; ++ ++ ++/** + * Pack multiple addresses into a buffer, of resources specified in rsc_bitmap. + * For every resource in rcs_bitmap: + * - if iface is CONNECT_TO_IFACE, pack interface address +@@ -91,22 +102,16 @@ ucs_status_t ucp_address_pack(ucp_worker_h worker, ucp_ep_h ep, uint64_t tl_bitm + * Unpack a list of addresses. + * + * @param [in] buffer Buffer with data to unpack. +- * @param [out] remote_uuid_p Filled with remote worker uuid. +- * @param [out] remote_name Filled with remote worker name. +- * @param [in] max Maximal length on @a remote_name. +- * @param [out] address_count_p Filled with amount of addresses in the list. +- * @param [out] address_list_p Filled with pointer to unpacked address list. +- * It should be released by ucs_free(). ++ * @param [out] unpacked_address Filled with remote address data. + * + * @note Entries in the address list could point into the data buffer, so it +- * should not be released as long as the list is used. ++ * should not be released as long as the remote address is used. + * +- * @note The address list should be released by ucs_free(). ++ * @note The address list inside @ref ucp_remote_address_t should be released ++ * by ucs_free(). + */ +-ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, +- char *remote_name, size_t max, +- unsigned *address_count_p, +- ucp_address_entry_t **address_list_p); ++ucs_status_t ucp_address_unpack(const void *buffer, ++ ucp_unpacked_address_t *unpacked_address); + + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.c +new file mode 100644 +index 0000000..b08d160 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.c +@@ -0,0 +1,209 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++ ++__KHASH_IMPL(ucp_ep_match, static UCS_F_MAYBE_UNUSED inline, uint64_t, ++ ucp_ep_match_entry_t, 1, kh_int64_hash_func, kh_int64_hash_equal); ++ ++ ++#define ucp_ep_match_list_for_each(_elem, _head, _member) \ ++ for (_elem = ucs_container_of((_head)->next, typeof(*_elem), _member); \ ++ (_elem) != ucs_container_of(NULL, typeof(*_elem), _member); \ ++ _elem = ucs_container_of((_elem)->_member.next, typeof(*_elem), _member)) ++ ++static inline void ucp_ep_match_list_add_tail(ucs_list_link_t *head, ++ ucs_list_link_t *elem) ++{ ++ ucs_list_link_t *last; ++ ++ last = head->prev; ++ elem->next = NULL; ++ head->prev = elem; ++ ++ if (last == NULL) { ++ elem->prev = NULL; ++ head->next = elem; ++ } else { ++ elem->prev = last; ++ last->next = elem; ++ } ++} ++ ++static inline void ucp_ep_match_list_del(ucs_list_link_t *head, ++ ucs_list_link_t *elem) ++{ ++ (elem->prev ? elem->prev : head)->next = elem->next; ++ (elem->next ? elem->next : head)->prev = elem->prev; ++} ++ ++void ucp_ep_match_init(ucp_ep_match_ctx_t *match_ctx) ++{ ++ kh_init_inplace(ucp_ep_match, &match_ctx->hash); ++} ++ ++void ucp_ep_match_cleanup(ucp_ep_match_ctx_t *match_ctx) ++{ ++ ucp_ep_match_entry_t entry; ++ uint64_t dest_uuid; ++ ++ kh_foreach(&match_ctx->hash, dest_uuid, entry, { ++ if (entry.exp_ep_q.next != NULL) { ++ ucs_warn("match_ctx %p: uuid 0x%"PRIx64" expected queue is not empty", ++ match_ctx, dest_uuid); ++ } ++ if (entry.unexp_ep_q.next != NULL) { ++ ucs_warn("match_ctx %p: uuid 0x%"PRIx64" unexpected queue is not empty", ++ match_ctx, dest_uuid); ++ } ++ }) ++ kh_destroy_inplace(ucp_ep_match, &match_ctx->hash); ++} ++ ++static ucp_ep_match_entry_t* ++ucp_ep_match_entry_get(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid) ++{ ++ ucp_ep_match_entry_t *entry; ++ khiter_t iter; ++ int ret; ++ ++ iter = kh_put(ucp_ep_match, &match_ctx->hash, dest_uuid, &ret); ++ entry = &kh_value(&match_ctx->hash, iter); ++ ++ if (ret != 0) { ++ /* initialize match list on first use */ ++ entry->next_conn_sn = 0; ++ entry->exp_ep_q.next = NULL; ++ entry->exp_ep_q.prev = NULL; ++ entry->unexp_ep_q.next = NULL; ++ entry->unexp_ep_q.prev = NULL; ++ } ++ ++ return entry; ++} ++ ++ucp_ep_conn_sn_t ucp_ep_match_get_next_sn(ucp_ep_match_ctx_t *match_ctx, ++ uint64_t dest_uuid) ++{ ++ ucp_ep_match_entry_t *entry = ucp_ep_match_entry_get(match_ctx, dest_uuid); ++ return entry->next_conn_sn++; ++} ++ ++static void ucp_ep_match_insert_common(ucp_ep_match_ctx_t *match_ctx, ++ ucs_list_link_t *list, ucp_ep_h ep, ++ uint64_t dest_uuid, const char *title) ++{ ++ /* NOTE: protect union */ ++ ucs_assert(!(ep->flags & (UCP_EP_FLAG_ON_MATCH_CTX | ++ UCP_EP_FLAG_FLUSH_STATE_VALID | ++ UCP_EP_FLAG_LISTENER))); ++ ++ ucp_ep_match_list_add_tail(list, &ucp_ep_ext_gen(ep)->ep_match.list); ++ ep->flags |= UCP_EP_FLAG_ON_MATCH_CTX; ++ ucp_ep_ext_gen(ep)->ep_match.dest_uuid = dest_uuid; ++ ucs_trace("match_ctx %p: ep %p added as %s uuid 0x%"PRIx64" conn_sn %d", ++ match_ctx, ep, title, dest_uuid, ep->conn_sn); ++} ++ ++void ucp_ep_match_insert_exp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_h ep) ++{ ++ ucp_ep_match_entry_t *entry = ucp_ep_match_entry_get(match_ctx, dest_uuid); ++ ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_DEST_EP)); ++ ucp_ep_match_insert_common(match_ctx, &entry->exp_ep_q, ep, dest_uuid, ++ "expected"); ++} ++ ++void ucp_ep_match_insert_unexp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_h ep) ++{ ++ ucp_ep_match_entry_t *entry = ucp_ep_match_entry_get(match_ctx, dest_uuid); ++ ++ ucp_ep_match_insert_common(match_ctx, &entry->unexp_ep_q, ep, dest_uuid, ++ "unexpected"); ++} ++ ++static ucp_ep_h ++ucp_ep_match_retrieve_common(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn, int is_exp, ++ ucp_ep_flags_t exp_ep_flags, const char *title) ++{ ++ ucp_ep_match_entry_t *entry; ++ ucs_list_link_t *list; ++ ucp_ep_ext_gen_t *ep_ext; ++ khiter_t iter; ++ ucp_ep_h ep; ++ ++ iter = kh_get(ucp_ep_match, &match_ctx->hash, dest_uuid); ++ if (iter == kh_end(&match_ctx->hash)) { ++ goto notfound; /* no hash entry */ ++ } ++ ++ entry = &kh_value(&match_ctx->hash, iter); ++ list = is_exp ? &entry->exp_ep_q : &entry->unexp_ep_q; ++ ucp_ep_match_list_for_each(ep_ext, list, ep_match.list) { ++ ep = ucp_ep_from_ext_gen(ep_ext); ++ if (ep->conn_sn == conn_sn) { ++ ucp_ep_match_list_del(list, &ep_ext->ep_match.list); ++ ucs_trace("match_ctx %p: matched %s ep %p by uuid 0x%"PRIx64" conn_sn %d", ++ match_ctx, title, ep, dest_uuid, conn_sn); ++ ucs_assertv(ucs_test_all_flags(ep->flags, ++ exp_ep_flags | UCP_EP_FLAG_ON_MATCH_CTX), ++ "ep=%p flags=0x%x exp_flags=0x%x", ep, ep->flags, ++ exp_ep_flags); ++ ep->flags &= ~UCP_EP_FLAG_ON_MATCH_CTX; ++ return ep; ++ } ++ } ++ ++notfound: ++ ucs_trace("match_ctx %p: %s uuid 0x%"PRIx64" conn_sn %d not found", ++ match_ctx, title, dest_uuid, conn_sn); ++ return NULL; ++} ++ ++ucp_ep_h ucp_ep_match_retrieve_exp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn) ++{ ++ return ucp_ep_match_retrieve_common(match_ctx, dest_uuid, conn_sn, 1, 0, ++ "expected"); ++} ++ ++ucp_ep_h ucp_ep_match_retrieve_unexp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn) ++{ ++ return ucp_ep_match_retrieve_common(match_ctx, dest_uuid, conn_sn, 0, ++ UCP_EP_FLAG_DEST_EP, "unexpected"); ++} ++ ++void ucp_ep_match_remove_ep(ucp_ep_match_ctx_t *match_ctx, ucp_ep_h ep) ++{ ++ ucp_ep_ext_gen_t *ep_ext = ucp_ep_ext_gen(ep); ++ ucp_ep_match_entry_t *entry; ++ khiter_t iter; ++ ++ if (!(ep->flags & UCP_EP_FLAG_ON_MATCH_CTX)) { ++ return; ++ } ++ ++ iter = kh_get(ucp_ep_match, &match_ctx->hash, ep_ext->ep_match.dest_uuid); ++ ucs_assertv(iter != kh_end(&match_ctx->hash), "ep %p not found in hash", ep); ++ entry = &kh_value(&match_ctx->hash, iter); ++ ++ if (ep->flags & UCP_EP_FLAG_DEST_EP) { ++ ucs_trace("match_ctx %p: remove unexpected ep %p", match_ctx, ep); ++ ucp_ep_match_list_del(&entry->unexp_ep_q, &ep_ext->ep_match.list); ++ } else { ++ ucs_trace("match_ctx %p: remove expected ep %p", match_ctx, ep); ++ ucp_ep_match_list_del(&entry->exp_ep_q, &ep_ext->ep_match.list); ++ } ++ ep->flags &= ~UCP_EP_FLAG_ON_MATCH_CTX; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.h +new file mode 100644 +index 0000000..6b424d3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.h +@@ -0,0 +1,74 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCP_EP_MATCH_H_ ++#define UCP_EP_MATCH_H_ ++ ++#include ++#include ++#include ++ ++ ++/* ++ * Structure to embed in a UCP endpoint to support matching with remote endpoints ++ */ ++typedef struct { ++ uint64_t dest_uuid; /* Destination worker UUID */ ++ ucs_list_link_t list; /* List entry into endpoint ++ matching structure */ ++} ucp_ep_match_t; ++ ++ ++/** ++ * Endpoint-to-endpoint matching entry - allows *ordered* matching of endpoints ++ * between a pair of workers. ++ * The expected/unexpected lists are *not* circular ++ */ ++typedef struct ucp_ep_match_entry { ++ ucs_list_link_t exp_ep_q; /* Endpoints created by API and not ++ connected to remote endpoint */ ++ ucs_list_link_t unexp_ep_q; /* Endpoints created internally as ++ connected a to remote endpoints, ++ but not provided to user yet */ ++ ucp_ep_conn_sn_t next_conn_sn; /* Sequence number of matching ++ endpoints, since UCT may provide ++ wireup messages which were sent ++ on different endpoint out-of-order */ ++} ucp_ep_match_entry_t; ++ ++ ++__KHASH_TYPE(ucp_ep_match, uint64_t, ucp_ep_match_entry_t) ++ ++ ++/* Context for matching endpoints */ ++typedef struct { ++ khash_t(ucp_ep_match) hash; ++} ucp_ep_match_ctx_t; ++ ++ ++void ucp_ep_match_init(ucp_ep_match_ctx_t *match_ctx); ++ ++void ucp_ep_match_cleanup(ucp_ep_match_ctx_t *match_ctx); ++ ++ucp_ep_conn_sn_t ucp_ep_match_get_next_sn(ucp_ep_match_ctx_t *match_ctx, ++ uint64_t dest_uuid); ++ ++void ucp_ep_match_insert_exp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_h ep); ++ ++void ucp_ep_match_insert_unexp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_h ep); ++ ++ucp_ep_h ucp_ep_match_retrieve_exp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn); ++ ++ucp_ep_h ucp_ep_match_retrieve_unexp(ucp_ep_match_ctx_t *ep_conn, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn); ++ ++void ucp_ep_match_remove_ep(ucp_ep_match_ctx_t *ep_conn, ucp_ep_h ep); ++ ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/select.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/select.c +index bc1635a..8bb5db3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/select.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/select.c +@@ -16,6 +16,25 @@ + + #define UCP_WIREUP_RMA_BW_TEST_MSG_SIZE 262144 + ++#define UCP_WIREUP_CHECK_AMO_FLAGS(_ae, _criteria, _context, _addr_index, _op, _size) \ ++ if (!ucs_test_all_flags((_ae)->iface_attr.atomic.atomic##_size._op##_flags, \ ++ (_criteria)->remote_atomic_flags.atomic##_size._op##_flags)) { \ ++ char desc[256]; \ ++ ucs_trace("addr[%d] %s: no %s", (_addr_index), \ ++ ucp_find_tl_name_by_csum((_context), (_ae)->tl_name_csum), \ ++ ucp_wireup_get_missing_amo_flag_desc_##_op( \ ++ (_ae)->iface_attr.atomic.atomic##_size._op##_flags, \ ++ (_criteria)->remote_atomic_flags.atomic##_size._op##_flags, \ ++ (_size), desc, sizeof(desc))); \ ++ continue; \ ++ } ++ ++typedef struct ucp_wireup_atomic_flag { ++ const char *name; ++ const char *fetch; ++} ucp_wireup_atomic_flag_t; ++ ++ + enum { + UCP_WIREUP_LANE_USAGE_AM = UCS_BIT(0), /* Active messages */ + UCP_WIREUP_LANE_USAGE_AM_BW = UCS_BIT(1), /* High-BW active messages */ +@@ -64,14 +83,6 @@ static const char *ucp_wireup_iface_flags[] = { + [ucs_ilog2(UCT_IFACE_FLAG_GET_SHORT)] = "get short", + [ucs_ilog2(UCT_IFACE_FLAG_GET_BCOPY)] = "get bcopy", + [ucs_ilog2(UCT_IFACE_FLAG_GET_ZCOPY)] = "get zcopy", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_ADD32)] = "32-bit atomic add", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_ADD64)] = "64-bit atomic add", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_FADD32)] = "32-bit atomic fetch-add", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_FADD64)] = "64-bit atomic fetch-add", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_SWAP32)] = "32-bit atomic swap", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_SWAP64)] = "64-bit atomic swap", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_CSWAP32)] = "32-bit atomic compare-swap", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_CSWAP64)] = "64-bit atomic compare-swap", + [ucs_ilog2(UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE)] = "peer failure handler", + [ucs_ilog2(UCT_IFACE_FLAG_CONNECT_TO_IFACE)] = "connect to iface", + [ucs_ilog2(UCT_IFACE_FLAG_CONNECT_TO_EP)] = "connect to ep", +@@ -88,6 +99,16 @@ static const char *ucp_wireup_iface_flags[] = { + [ucs_ilog2(UCT_IFACE_FLAG_TAG_RNDV_ZCOPY)] = "tag rndv zcopy" + }; + ++static ucp_wireup_atomic_flag_t ucp_wireup_atomic_desc[] = { ++ [UCT_ATOMIC_OP_ADD] = {.name = "add", .fetch = "fetch-"}, ++ [UCT_ATOMIC_OP_AND] = {.name = "and", .fetch = "fetch-"}, ++ [UCT_ATOMIC_OP_OR] = {.name = "or", .fetch = "fetch-"}, ++ [UCT_ATOMIC_OP_XOR] = {.name = "xor", .fetch = "fetch-"}, ++ [UCT_ATOMIC_OP_SWAP] = {.name = "swap", .fetch = ""}, ++ [UCT_ATOMIC_OP_CSWAP] = {.name = "cscap", .fetch = ""} ++}; ++ ++ + static double ucp_wireup_aux_score_func(ucp_context_h context, + const uct_md_attr_t *md_attr, + const uct_iface_attr_t *iface_attr, +@@ -101,6 +122,37 @@ ucp_wireup_get_missing_flag_desc(uint64_t flags, uint64_t required_flags, + return flag_descs[ucs_ffs64(required_flags & (~flags))]; + } + ++static const char * ++ucp_wireup_get_missing_amo_flag_desc(uint64_t flags, uint64_t required_flags, ++ int op_size, int fetch, char *buf, size_t len) ++{ ++ int idx; ++ ++ ucs_assert((required_flags & (~flags)) != 0); ++ ++ idx = ucs_ffs64(required_flags & (~flags)); ++ ++ snprintf(buf, len, "%d-bit atomic %s%s", op_size, ++ fetch ? ucp_wireup_atomic_desc[idx].fetch : "", ++ ucp_wireup_atomic_desc[idx].name); ++ ++ return buf; ++} ++ ++static const char * ++ucp_wireup_get_missing_amo_flag_desc_op(uint64_t flags, uint64_t required_flags, ++ int op_size, char *buf, size_t len) ++{ ++ return ucp_wireup_get_missing_amo_flag_desc(flags, required_flags, op_size, 0, buf, len); ++} ++ ++static const char * ++ucp_wireup_get_missing_amo_flag_desc_fop(uint64_t flags, uint64_t required_flags, ++ int op_size, char *buf, size_t len) ++{ ++ return ucp_wireup_get_missing_amo_flag_desc(flags, required_flags, op_size, 1, buf, len); ++} ++ + static int ucp_wireup_check_flags(const uct_tl_resource_desc_t *resource, + uint64_t flags, uint64_t required_flags, + const char *title, const char ** flag_descs, +@@ -124,6 +176,30 @@ static int ucp_wireup_check_flags(const uct_tl_resource_desc_t *resource, + return 0; + } + ++static int ucp_wireup_check_amo_flags(const uct_tl_resource_desc_t *resource, ++ uint64_t flags, uint64_t required_flags, ++ int op_size, int fetch, ++ const char *title, char *reason, size_t max) ++{ ++ char missing_flag_desc[256]; ++ ++ if (ucs_test_all_flags(flags, required_flags)) { ++ return 1; ++ } ++ ++ if (required_flags) { ++ ucp_wireup_get_missing_amo_flag_desc(flags, required_flags, ++ op_size, fetch, missing_flag_desc, ++ sizeof(missing_flag_desc)); ++ ucs_trace(UCT_TL_RESOURCE_DESC_FMT " : not suitable for %s, no %s", ++ UCT_TL_RESOURCE_DESC_ARG(resource), title, ++ missing_flag_desc); ++ snprintf(reason, max, UCT_TL_RESOURCE_DESC_FMT" - no %s", ++ UCT_TL_RESOURCE_DESC_ARG(resource), missing_flag_desc); ++ } ++ return 0; ++} ++ + static int ucp_wireup_is_reachable(ucp_worker_h worker, ucp_rsc_index_t rsc_index, + const ucp_address_entry_t *ae) + { +@@ -191,7 +267,8 @@ ucp_wireup_select_transport(ucp_ep_h ep, const ucp_address_entry_t *address_list + + /* Make sure we are indeed passing all flags required by the criteria in + * ucp packed address */ +- ucs_assert(ucs_test_all_flags(UCP_ADDRESS_IFACE_FLAGS, criteria->remote_iface_flags)); ++ ucs_assert(ucs_test_all_flags(UCP_ADDRESS_IFACE_FLAGS, ++ criteria->remote_iface_flags)); + + if (!ucs_test_all_flags(ae->iface_attr.cap_flags, criteria->remote_iface_flags)) { + ucs_trace("addr[%d] %s: no %s", addr_index, +@@ -202,6 +279,11 @@ ucp_wireup_select_transport(ucp_ep_h ep, const ucp_address_entry_t *address_list + continue; + } + ++ UCP_WIREUP_CHECK_AMO_FLAGS(ae, criteria, context, addr_index, op, 32); ++ UCP_WIREUP_CHECK_AMO_FLAGS(ae, criteria, context, addr_index, op, 64); ++ UCP_WIREUP_CHECK_AMO_FLAGS(ae, criteria, context, addr_index, fop, 32); ++ UCP_WIREUP_CHECK_AMO_FLAGS(ae, criteria, context, addr_index, fop, 64); ++ + addr_index_map |= UCS_BIT(addr_index); + } + +@@ -230,7 +312,19 @@ ucp_wireup_select_transport(ucp_ep_h ep, const ucp_address_entry_t *address_list + ucp_wireup_md_flags, p, endp - p) || + !ucp_wireup_check_flags(resource, iface_attr->cap.flags, + criteria->local_iface_flags, criteria->title, +- ucp_wireup_iface_flags, p, endp - p)) ++ ucp_wireup_iface_flags, p, endp - p) || ++ !ucp_wireup_check_amo_flags(resource, iface_attr->cap.atomic32.op_flags, ++ criteria->local_atomic_flags.atomic32.op_flags, ++ 32, 0, criteria->title, p, endp - p) || ++ !ucp_wireup_check_amo_flags(resource, iface_attr->cap.atomic64.op_flags, ++ criteria->local_atomic_flags.atomic64.op_flags, ++ 64, 0, criteria->title, p, endp - p) || ++ !ucp_wireup_check_amo_flags(resource, iface_attr->cap.atomic32.fop_flags, ++ criteria->local_atomic_flags.atomic32.fop_flags, ++ 32, 1, criteria->title, p, endp - p) || ++ !ucp_wireup_check_amo_flags(resource, iface_attr->cap.atomic64.fop_flags, ++ criteria->local_atomic_flags.atomic64.fop_flags, ++ 64, 1, criteria->title, p, endp - p)) + { + p += strlen(p); + snprintf(p, endp - p, ", "); +@@ -469,7 +563,7 @@ ucp_wireup_add_memaccess_lanes(ucp_ep_h ep, unsigned address_count, + ucp_lane_index_t *num_lanes_p, + const ucp_wireup_criteria_t *criteria, + uint64_t tl_bitmap, uint32_t usage, +- int select_best) ++ int select_best, int show_error) + { + ucp_wireup_criteria_t mem_criteria = *criteria; + ucp_address_entry_t *address_list_copy; +@@ -499,7 +593,7 @@ ucp_wireup_add_memaccess_lanes(ucp_ep_h ep, unsigned address_count, + mem_criteria.remote_md_flags = UCT_MD_FLAG_REG | criteria->remote_md_flags; + status = ucp_wireup_select_transport(ep, address_list_copy, address_count, + &mem_criteria, tl_bitmap, remote_md_map, +- -1, -1, select_best, ++ -1, -1, show_error, + &rsc_index, &addr_index, &score); + if (status != UCS_OK) { + goto out_free_address_list; +@@ -573,11 +667,16 @@ static double ucp_wireup_rma_score_func(ucp_context_h context, + (4096.0 / ucs_min(iface_attr->bandwidth, remote_iface_attr->bandwidth))); + } + ++static int ucp_wireup_ep_params_is_err_mode_peer(const ucp_ep_params_t *params) ++{ ++ return (params->field_mask & UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE) && ++ (params->err_mode == UCP_ERR_HANDLING_MODE_PEER); ++} ++ + static void ucp_wireup_fill_ep_params_criteria(ucp_wireup_criteria_t *criteria, + const ucp_ep_params_t *params) + { +- if ((params->field_mask & UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE) && +- (params->err_mode == UCP_ERR_HANDLING_MODE_PEER)) { ++ if (ucp_wireup_ep_params_is_err_mode_peer(params)) { + criteria->local_iface_flags |= UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE; + } + } +@@ -600,22 +699,39 @@ static void ucp_wireup_fill_aux_criteria(ucp_wireup_criteria_t *criteria, + ucp_wireup_fill_ep_params_criteria(criteria, params); + } + ++static void ucp_wireup_clean_amo_criteria(ucp_wireup_criteria_t *criteria) ++{ ++ memset(&criteria->remote_atomic_flags, 0, ++ sizeof(criteria->remote_atomic_flags)); ++ memset(&criteria->local_atomic_flags, 0, ++ sizeof(criteria->local_atomic_flags)); ++} ++ ++static int ucp_wireup_allow_am_emulation_layer(const ucp_ep_params_t *params, ++ unsigned ep_init_flags) ++{ ++ return !(ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE) && ++ /* disable emulation layer if err handling is required due to lack of ++ * keep alive protocol */ ++ !ucp_wireup_ep_params_is_err_mode_peer(params); ++} ++ + static ucs_status_t ucp_wireup_add_rma_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + unsigned ep_init_flags, unsigned address_count, + const ucp_address_entry_t *address_list, + ucp_wireup_lane_desc_t *lane_descs, +- ucp_lane_index_t *num_lanes_p) ++ ucp_lane_index_t *num_lanes_p, ++ int *need_am) + { +- ucp_wireup_criteria_t criteria; ++ ucp_wireup_criteria_t criteria = {0}; ++ ucs_status_t status; ++ int allow_am; + + if (!(ucp_ep_get_context_features(ep) & UCP_FEATURE_RMA) && +- (!(ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE))) { ++ !(ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE)) { + return UCS_OK; + } + +- criteria.local_md_flags = 0; +- criteria.remote_md_flags = 0; +- + if (ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE) { + criteria.title = "copy across memory types"; + criteria.remote_iface_flags = UCT_IFACE_FLAG_PUT_SHORT; +@@ -632,9 +748,19 @@ static ucs_status_t ucp_wireup_add_rma_lanes(ucp_ep_h ep, const ucp_ep_params_t + criteria.tl_rsc_flags = 0; + ucp_wireup_fill_ep_params_criteria(&criteria, params); + +- return ucp_wireup_add_memaccess_lanes(ep, address_count, address_list, +- lane_descs, num_lanes_p, &criteria, +- -1, UCP_WIREUP_LANE_USAGE_RMA, 1); ++ allow_am = ucp_wireup_allow_am_emulation_layer(params, ep_init_flags); ++ status = ucp_wireup_add_memaccess_lanes(ep, address_count, address_list, ++ lane_descs, num_lanes_p, &criteria, ++ -1, UCP_WIREUP_LANE_USAGE_RMA, 1, ++ !allow_am); ++ if (status == UCS_OK) { ++ return status; /* using transport RMA operations */ ++ } else if (allow_am) { ++ *need_am = 1; /* using emulation over active messages */ ++ return UCS_OK; ++ } else { ++ return status; ++ } + } + + double ucp_wireup_amo_score_func(ucp_context_h context, +@@ -652,27 +778,29 @@ static ucs_status_t ucp_wireup_add_amo_lanes(ucp_ep_h ep, const ucp_ep_params_t + unsigned address_count, + const ucp_address_entry_t *address_list, + ucp_wireup_lane_desc_t *lane_descs, +- ucp_lane_index_t *num_lanes_p) ++ ucp_lane_index_t *num_lanes_p, ++ int *need_am) + { +- ucp_worker_h worker = ep->worker; +- ucp_context_h context = worker->context; +- ucp_wireup_criteria_t criteria; ++ ucp_worker_h worker = ep->worker; ++ ucp_context_h context = worker->context; ++ ucp_wireup_criteria_t criteria = {0}; + ucp_rsc_index_t rsc_index; ++ ucs_status_t status; + uint64_t tl_bitmap; ++ int allow_am; + +- criteria.remote_iface_flags = ucp_context_uct_atomic_iface_flags(context); +- if ((criteria.remote_iface_flags == 0) || ++ if (!ucs_test_flags(context->config.features, UCP_FEATURE_AMO32, UCP_FEATURE_AMO64) || + (ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE)) { + return UCS_OK; + } + ++ ucp_context_uct_atomic_iface_flags(context, &criteria.remote_atomic_flags); ++ + criteria.title = "atomic operations on %s memory"; +- criteria.local_md_flags = 0; +- criteria.remote_md_flags = 0; + criteria.local_iface_flags = criteria.remote_iface_flags | + UCT_IFACE_FLAG_PENDING; ++ criteria.local_atomic_flags = criteria.remote_atomic_flags; + criteria.calc_score = ucp_wireup_amo_score_func; +- criteria.tl_rsc_flags = 0; + ucp_wireup_fill_ep_params_criteria(&criteria, params); + + /* We can use only non-p2p resources or resources which are explicitly +@@ -686,9 +814,19 @@ static ucs_status_t ucp_wireup_add_amo_lanes(ucp_ep_h ep, const ucp_ep_params_t + } + } + +- return ucp_wireup_add_memaccess_lanes(ep, address_count, address_list, +- lane_descs, num_lanes_p, &criteria, +- tl_bitmap, UCP_WIREUP_LANE_USAGE_AMO, 1); ++ allow_am = ucp_wireup_allow_am_emulation_layer(params, ep_init_flags); ++ status = ucp_wireup_add_memaccess_lanes(ep, address_count, address_list, ++ lane_descs, num_lanes_p, &criteria, ++ tl_bitmap, UCP_WIREUP_LANE_USAGE_AMO, ++ 1, !allow_am); ++ if (status == UCS_OK) { ++ return status; /* using transport AMO operations */ ++ } else if (allow_am) { ++ *need_am = 1; /* using emulation over active messages */ ++ return UCS_OK; ++ } else { ++ return status; ++ } + } + + static double ucp_wireup_am_score_func(ucp_context_h context, +@@ -724,44 +862,61 @@ static int ucp_wireup_is_lane_proxy(ucp_ep_h ep, ucp_rsc_index_t rsc_index, + UCT_IFACE_FLAG_EVENT_RECV_SIG); + } + ++static inline int ucp_wireup_is_am_required(ucp_ep_h ep, ++ const ucp_ep_params_t *params, ++ unsigned ep_init_flags, ++ ucp_wireup_lane_desc_t *lane_descs, ++ int num_lanes_p) ++{ ++ ucp_lane_index_t lane; ++ ++ /* Check if we need active messages from the configurations, for wireup. ++ * If not, check if am is required due to p2p transports */ ++ ++ if ((ep_init_flags & UCP_EP_CREATE_AM_LANE) || ++ (params->field_mask & UCP_EP_PARAM_FIELD_SOCK_ADDR)) { ++ return 1; ++ } ++ ++ if (!(ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE) && ++ (ucp_ep_get_context_features(ep) & (UCP_FEATURE_TAG | UCP_FEATURE_STREAM))) { ++ return 1; ++ } ++ ++ for (lane = 0; lane < num_lanes_p; ++lane) { ++ if (ucp_worker_is_tl_p2p(ep->worker, lane_descs[lane].rsc_index)) { ++ return 1; ++ } ++ } ++ ++ return 0; ++} ++ + static ucs_status_t ucp_wireup_add_am_lane(ucp_ep_h ep, const ucp_ep_params_t *params, + unsigned ep_init_flags, unsigned address_count, + const ucp_address_entry_t *address_list, + ucp_wireup_lane_desc_t *lane_descs, + ucp_lane_index_t *num_lanes_p, ++ double *am_score, + ucp_err_handling_mode_t err_mode) + { +- ucp_wireup_criteria_t criteria; ++ ucp_wireup_criteria_t criteria = {0}; + ucp_rsc_index_t rsc_index; +- ucp_lane_index_t lane; + ucs_status_t status; + unsigned addr_index; + int is_proxy; +- double score; +- int need_am; + +- /* Check if we need active messages, for wireup */ +- if (!(ucp_ep_get_context_features(ep) & (UCP_FEATURE_TAG | UCP_FEATURE_STREAM)) || +- (ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE)) { +- need_am = 0; +- for (lane = 0; lane < *num_lanes_p; ++lane) { +- need_am = need_am || ucp_worker_is_tl_p2p(ep->worker, +- lane_descs[lane].rsc_index); +- } +- if (!need_am) { +- return UCS_OK; +- } ++ if (!ucp_wireup_is_am_required(ep, params, ep_init_flags, lane_descs, ++ *num_lanes_p)) { ++ return UCS_OK; + } + + /* Select one lane for active messages */ + criteria.title = "active messages"; +- criteria.local_md_flags = 0; +- criteria.remote_md_flags = 0; + criteria.remote_iface_flags = UCT_IFACE_FLAG_AM_BCOPY | + UCT_IFACE_FLAG_CB_SYNC; + criteria.local_iface_flags = UCT_IFACE_FLAG_AM_BCOPY; + criteria.calc_score = ucp_wireup_am_score_func; +- criteria.tl_rsc_flags = 0; + ucp_wireup_fill_ep_params_criteria(&criteria, params); + + if (ucs_test_all_flags(ucp_ep_get_context_features(ep), UCP_FEATURE_TAG | +@@ -770,7 +925,8 @@ static ucs_status_t ucp_wireup_add_am_lane(ucp_ep_h ep, const ucp_ep_params_t *p + } + + status = ucp_wireup_select_transport(ep, address_list, address_count, &criteria, +- -1, -1, -1, -1, 1, &rsc_index, &addr_index, &score); ++ -1, -1, -1, -1, 1, &rsc_index, &addr_index, ++ am_score); + if (status != UCS_OK) { + return status; + } +@@ -784,7 +940,7 @@ static ucs_status_t ucp_wireup_add_am_lane(ucp_ep_h ep, const ucp_ep_params_t *p + address_list[addr_index].iface_attr.cap_flags); + + ucp_wireup_add_lane_desc(lane_descs, num_lanes_p, rsc_index, addr_index, +- address_list[addr_index].md_index, score, ++ address_list[addr_index].md_index, *am_score, + UCP_WIREUP_LANE_USAGE_AM, is_proxy); + + return UCS_OK; +@@ -797,22 +953,25 @@ static double ucp_wireup_am_bw_score_func(ucp_context_h context, + { + /* best single MTU bandwidth */ + double size = iface_attr->cap.am.max_bcopy; +- double time = (size / iface_attr->bandwidth) + iface_attr->overhead + +- remote_iface_attr->overhead; ++ double time = (size / ucs_min(iface_attr->bandwidth, ++ remote_iface_attr->bandwidth)) + ++ iface_attr->overhead + remote_iface_attr->overhead + ++ ucp_wireup_tl_iface_latency(context, iface_attr, remote_iface_attr); ++ + return size / time * 1e-5; + } + +-static int ucp_wireup_is_ud_lane(ucp_context_h context, ucp_rsc_index_t rsc_index) ++static int ucp_wireup_is_ep_single_lane(ucp_ep_h ep, ucp_rsc_index_t rsc_index) + { +- return !strcmp(context->tl_rscs[rsc_index].tl_rsc.tl_name, "ud") || +- !strcmp(context->tl_rscs[rsc_index].tl_rsc.tl_name, "ud_mlx5"); ++ return (ep->worker->context->tl_rscs[rsc_index].tl_rsc.dev_type == UCT_DEVICE_TYPE_SHM) || ++ (ep->worker->context->tl_rscs[rsc_index].tl_rsc.dev_type == UCT_DEVICE_TYPE_SELF); + } + + static ucs_status_t ucp_wireup_add_bw_lanes(ucp_ep_h ep, + unsigned address_count, + const ucp_address_entry_t *address_list, + const ucp_wireup_select_bw_info_t *bw_info, +- int allow_proxy, ++ int allow_proxy, uint64_t tl_bitmap, + ucp_wireup_lane_desc_t *lane_descs, + ucp_lane_index_t *num_lanes_p) + { +@@ -837,9 +996,9 @@ static ucs_status_t ucp_wireup_add_bw_lanes(ucp_ep_h ep, + * (we have to limit MD's number to avoid malloc in + * memory registration) */ + while ((num_lanes < bw_info->max_lanes) && +- (ucs_count_one_bits(md_map) < UCP_MAX_OP_MDS)) { ++ (ucs_popcount(md_map) < UCP_MAX_OP_MDS)) { + status = ucp_wireup_select_transport(ep, address_list, address_count, +- &bw_info->criteria, -1, -1, ++ &bw_info->criteria, tl_bitmap, -1, + local_dev_bitmap, remote_dev_bitmap, + 0, &rsc_index, &addr_index, &score); + if (status != UCS_OK) { +@@ -850,19 +1009,16 @@ static ucs_status_t ucp_wireup_add_bw_lanes(ucp_ep_h ep, + ucp_wireup_is_lane_proxy(ep, rsc_index, + address_list[addr_index].iface_attr.cap_flags); + +- /* FIXME a temporary workaround to prevent the UD uct from using multilane. */ +- if (!ucp_wireup_is_ud_lane(context, rsc_index)) { +- ucp_wireup_add_lane_desc(lane_descs, num_lanes_p, rsc_index, addr_index, +- address_list[addr_index].md_index, score, +- bw_info->usage, is_proxy); +- md_map |= UCS_BIT(context->tl_rscs[rsc_index].md_index); +- num_lanes++; +- } ++ ucp_wireup_add_lane_desc(lane_descs, num_lanes_p, rsc_index, addr_index, ++ address_list[addr_index].md_index, score, ++ bw_info->usage, is_proxy); ++ md_map |= UCS_BIT(context->tl_rscs[rsc_index].md_index); ++ num_lanes++; + + local_dev_bitmap &= ~UCS_BIT(context->tl_rscs[rsc_index].dev_index); + remote_dev_bitmap &= ~UCS_BIT(address_list[addr_index].dev_index); + +- if (ep->worker->context->tl_rscs[rsc_index].tl_rsc.dev_type == UCT_DEVICE_TYPE_SHM) { ++ if (ucp_wireup_is_ep_single_lane(ep, rsc_index)) { + /* special case for SHM: do not try to lookup additional lanes when + * SHM transport detected (another transport will be significantly + * slower) */ +@@ -872,6 +1028,7 @@ static ucs_status_t ucp_wireup_add_bw_lanes(ucp_ep_h ep, + + return UCS_OK; + } ++ + static ucs_status_t ucp_wireup_add_am_bw_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + unsigned ep_init_flags, unsigned address_count, + const ucp_address_entry_t *address_list, +@@ -900,6 +1057,7 @@ static ucs_status_t ucp_wireup_add_am_bw_lanes(ucp_ep_h ep, const ucp_ep_params_ + bw_info.criteria.local_iface_flags = UCT_IFACE_FLAG_AM_BCOPY; + bw_info.criteria.calc_score = ucp_wireup_am_bw_score_func; + bw_info.criteria.tl_rsc_flags = 0; ++ ucp_wireup_clean_amo_criteria(&bw_info.criteria); + ucp_wireup_fill_ep_params_criteria(&bw_info.criteria, params); + + if (ucs_test_all_flags(ucp_ep_get_context_features(ep), UCP_FEATURE_TAG | +@@ -918,20 +1076,21 @@ static ucs_status_t ucp_wireup_add_am_bw_lanes(ucp_ep_h ep, const ucp_ep_params_ + if (lane_descs[lane_desc_idx].usage & UCP_WIREUP_LANE_USAGE_AM) { + addr_index = lane_descs[lane_desc_idx].addr_index; + rsc_index = lane_descs[lane_desc_idx].rsc_index; +- /* FIXME a temporary workaround to prevent the UD uct from using multilane. */ +- if (ucp_wireup_is_ud_lane(context, rsc_index)) { +- return UCS_OK; +- } + bw_info.md_map |= UCS_BIT(context->tl_rscs[rsc_index].md_index); + bw_info.local_dev_bitmap &= ~UCS_BIT(context->tl_rscs[rsc_index].dev_index); + bw_info.remote_dev_bitmap &= ~UCS_BIT(address_list[addr_index].dev_index); +- break; /* do not continue searching due to we found +- AM lane (and there is only one lane) */ ++ if (ucp_wireup_is_ep_single_lane(ep, rsc_index)) { ++ /* if AM lane is SELF or SHMEM - then do not use more lanes */ ++ return UCS_OK; ++ } else { ++ break; /* do not continue searching due to we found ++ AM lane (and there is only one lane) */ ++ } + } + } + + return ucp_wireup_add_bw_lanes(ep, address_count, address_list, &bw_info, 1, +- lane_descs, num_lanes_p); ++ -1, lane_descs, num_lanes_p); + } + + static ucs_status_t ucp_wireup_add_rma_bw_lanes(ucp_ep_h ep, +@@ -942,6 +1101,7 @@ static ucs_status_t ucp_wireup_add_rma_bw_lanes(ucp_ep_h ep, + ucp_lane_index_t *num_lanes_p) + { + ucp_wireup_select_bw_info_t bw_info; ++ uct_memory_type_t mem_type; + + if ((ucp_ep_get_context_features(ep) & UCP_FEATURE_RMA) || + (ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE)) { +@@ -955,13 +1115,14 @@ static ucs_status_t ucp_wireup_add_rma_bw_lanes(ucp_ep_h ep, + bw_info.criteria.remote_md_flags = bw_info.criteria.local_md_flags = UCT_MD_FLAG_REG; + } + +- bw_info.criteria.title = "high-bw remote %s memory access"; ++ bw_info.criteria.title = "high-bw remote memory access"; + bw_info.criteria.remote_iface_flags = UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_PUT_ZCOPY; + bw_info.criteria.local_iface_flags = bw_info.criteria.remote_iface_flags | + UCT_IFACE_FLAG_PENDING; + bw_info.criteria.calc_score = ucp_wireup_rma_bw_score_func; + bw_info.criteria.tl_rsc_flags = 0; ++ ucp_wireup_clean_amo_criteria(&bw_info.criteria); + ucp_wireup_fill_ep_params_criteria(&bw_info.criteria, params); + + if (ucs_test_all_flags(ucp_ep_get_context_features(ep), +@@ -975,8 +1136,17 @@ static ucs_status_t ucp_wireup_add_rma_bw_lanes(ucp_ep_h ep, + bw_info.max_lanes = ep->worker->context->config.ext.max_rndv_lanes; + bw_info.usage = UCP_WIREUP_LANE_USAGE_RMA_BW; + +- return ucp_wireup_add_bw_lanes(ep, address_count, address_list, &bw_info, 0, +- lane_descs, num_lanes_p); ++ for (mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { ++ if (!ep->worker->context->mem_type_tls[mem_type]) { ++ continue; ++ } ++ ++ ucp_wireup_add_bw_lanes(ep, address_count, address_list, &bw_info, 0, ++ ep->worker->context->mem_type_tls[mem_type], ++ lane_descs, num_lanes_p); ++ } ++ ++ return UCS_OK; + } + + /* Lane for transport offloaded tag interface */ +@@ -984,9 +1154,10 @@ static ucs_status_t ucp_wireup_add_tag_lane(ucp_ep_h ep, unsigned address_count, + const ucp_address_entry_t *address_list, + ucp_wireup_lane_desc_t *lane_descs, + ucp_lane_index_t *num_lanes_p, ++ double am_score, + ucp_err_handling_mode_t err_mode) + { +- ucp_wireup_criteria_t criteria; ++ ucp_wireup_criteria_t criteria = {0}; + ucp_rsc_index_t rsc_index; + ucs_status_t status; + unsigned addr_index; +@@ -1010,16 +1181,17 @@ static ucs_status_t ucp_wireup_add_tag_lane(ucp_ep_h ep, unsigned address_count, + UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_PENDING; + criteria.calc_score = ucp_wireup_am_score_func; +- criteria.tl_rsc_flags = 0; + + if (ucs_test_all_flags(ucp_ep_get_context_features(ep), UCP_FEATURE_WAKEUP)) { + criteria.local_iface_flags |= UCP_WORKER_UCT_UNSIG_EVENT_CAP_FLAGS; + } + ++ /* Do not add tag offload lane, if selected tag lane score is lower ++ * than AM score. In this case AM will be used for tag macthing. */ + status = ucp_wireup_select_transport(ep, address_list, address_count, &criteria, + -1, -1, -1, -1, 0, &rsc_index, &addr_index, + &score); +- if (status != UCS_OK) { ++ if ((status != UCS_OK) || (am_score > score)) { + goto out; + } + +@@ -1046,10 +1218,10 @@ ucp_wireup_select_wireup_msg_lane(ucp_worker_h worker, + const ucp_wireup_lane_desc_t *lane_descs, + ucp_lane_index_t num_lanes) + { +- ucp_context_h context = worker->context; +- ucp_lane_index_t p2p_lane = UCP_NULL_LANE; ++ ucp_context_h context = worker->context; ++ ucp_lane_index_t p2p_lane = UCP_NULL_LANE; ++ ucp_wireup_criteria_t criteria = {0}; + uct_tl_resource_desc_t *resource; +- ucp_wireup_criteria_t criteria; + ucp_rsc_index_t rsc_index; + ucp_lane_index_t lane; + unsigned addr_index; +@@ -1108,32 +1280,40 @@ ucs_status_t ucp_wireup_select_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + { + ucp_worker_h worker = ep->worker; + ucp_context_h context = worker->context; ++ double am_score = 0.0; + ucp_wireup_lane_desc_t lane_descs[UCP_MAX_LANES]; + ucp_rsc_index_t rsc_index; + ucp_md_index_t md_index; + ucp_lane_index_t lane; + ucp_lane_index_t i; + ucs_status_t status; ++ int need_am = 0; + + memset(lane_descs, 0, sizeof(lane_descs)); + ucp_ep_config_key_reset(key); + ucp_ep_config_key_set_params(key, params); + + status = ucp_wireup_add_rma_lanes(ep, params, ep_init_flags, address_count, +- address_list, lane_descs, &key->num_lanes); ++ address_list, lane_descs, &key->num_lanes, ++ &need_am); + if (status != UCS_OK) { + return status; + } + + status = ucp_wireup_add_amo_lanes(ep, params, ep_init_flags, address_count, +- address_list, lane_descs, &key->num_lanes); ++ address_list, lane_descs, &key->num_lanes, ++ &need_am); + if (status != UCS_OK) { + return status; + } + ++ if (need_am) { ++ ep_init_flags |= UCP_EP_CREATE_AM_LANE; ++ } ++ + status = ucp_wireup_add_am_lane(ep, params, ep_init_flags, address_count, + address_list, lane_descs, &key->num_lanes, +- key->err_mode); ++ &am_score, key->err_mode); + if (status != UCS_OK) { + return status; + } +@@ -1145,7 +1325,7 @@ ucs_status_t ucp_wireup_select_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + } + + status = ucp_wireup_add_tag_lane(ep, address_count, address_list, +- lane_descs, &key->num_lanes, ++ lane_descs, &key->num_lanes, am_score, + key->err_mode); + if (status != UCS_OK) { + return status; +@@ -1224,7 +1404,7 @@ ucs_status_t ucp_wireup_select_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + /* add to map first UCP_MAX_OP_MDS fastest MD's */ + for (i = 0; + (key->rma_bw_lanes[i] != UCP_NULL_LANE) && +- (ucs_count_one_bits(key->rma_bw_md_map) < UCP_MAX_OP_MDS); i++) { ++ (ucs_popcount(key->rma_bw_md_map) < UCP_MAX_OP_MDS); i++) { + lane = key->rma_bw_lanes[i]; + rsc_index = lane_descs[lane].rsc_index; + md_index = worker->context->tl_rscs[rsc_index].md_index; +@@ -1261,7 +1441,7 @@ ucs_status_t ucp_wireup_select_aux_transport(ucp_ep_h ep, + ucp_rsc_index_t *rsc_index_p, + unsigned *addr_index_p) + { +- ucp_wireup_criteria_t criteria; ++ ucp_wireup_criteria_t criteria = {0}; + double score; + + ucp_wireup_fill_aux_criteria(&criteria, params); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.c +index 53b3f0f..a7d75e6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -35,6 +36,7 @@ ucs_status_t ucp_wireup_msg_progress(uct_pending_req_t *self) + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_ep_h ep = req->send.ep; + ssize_t packed_len; ++ unsigned am_flags; + + if (req->send.wireup.type == UCP_WIREUP_MSG_REQUEST) { + if (ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED) { +@@ -42,6 +44,8 @@ ucs_status_t ucp_wireup_msg_progress(uct_pending_req_t *self) + ep); + goto out; + } ++ } else if (req->send.wireup.type == UCP_WIREUP_MSG_PRE_REQUEST) { ++ ucs_assert (!(ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED)); + } + + /* send the active message */ +@@ -50,8 +54,18 @@ ucs_status_t ucp_wireup_msg_progress(uct_pending_req_t *self) + } else { + req->send.lane = ucp_ep_get_wireup_msg_lane(ep); + } ++ ++ am_flags = 0; ++ if ((req->send.wireup.type == UCP_WIREUP_MSG_REQUEST) || ++ (req->send.wireup.type == UCP_WIREUP_MSG_PRE_REQUEST)) { ++ am_flags |= UCT_SEND_FLAG_SIGNALED; ++ } ++ ++ VALGRIND_CHECK_MEM_IS_DEFINED(&req->send.wireup, sizeof(req->send.wireup)); ++ VALGRIND_CHECK_MEM_IS_DEFINED(req->send.buffer, req->send.length); ++ + packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_WIREUP, +- ucp_wireup_msg_pack, req, 0); ++ ucp_wireup_msg_pack, req, am_flags); + if (packed_len < 0) { + if (packed_len != UCS_ERR_NO_RESOURCE) { + ucs_error("failed to send wireup: %s", ucs_status_string(packed_len)); +@@ -60,6 +74,9 @@ ucs_status_t ucp_wireup_msg_progress(uct_pending_req_t *self) + } + + switch (req->send.wireup.type) { ++ case UCP_WIREUP_MSG_PRE_REQUEST: ++ ep->flags |= UCP_EP_FLAG_CONNECT_PRE_REQ_SENT; ++ break; + case UCP_WIREUP_MSG_REQUEST: + ep->flags |= UCP_EP_FLAG_CONNECT_REQ_SENT; + break; +@@ -81,22 +98,27 @@ static unsigned ucp_wireup_address_index(const unsigned *order, + uint64_t tl_bitmap, + ucp_rsc_index_t tl_index) + { +- return order[ucs_count_one_bits(tl_bitmap & UCS_MASK(tl_index))]; ++ return order[ucs_popcount(tl_bitmap & UCS_MASK(tl_index))]; ++} ++ ++static inline int ucp_wireup_is_ep_needed(ucp_ep_h ep) ++{ ++ return (ep != NULL) && !(ep->flags & UCP_EP_FLAG_LISTENER); + } + + /* + * @param [in] rsc_tli Resource index for every lane. + */ + static ucs_status_t ucp_wireup_msg_send(ucp_ep_h ep, uint8_t type, +- uint64_t ep_uuid, uint64_t tl_bitmap, ++ uint64_t tl_bitmap, + const ucp_rsc_index_t *rsc_tli) + { + ucp_rsc_index_t rsc_index; + ucp_lane_index_t lane; +- unsigned order[UCP_MAX_LANES + 1]; + ucp_request_t* req; + ucs_status_t status; + void *address; ++ unsigned *order = ucs_alloca(ep->worker->context->num_tls * sizeof(*order)); + + ucs_assert(ep->cfg_index != (uint8_t)-1); + +@@ -112,14 +134,21 @@ static ucs_status_t ucp_wireup_msg_send(ucp_ep_h ep, uint8_t type, + req->send.ep = ep; + req->send.wireup.type = type; + req->send.wireup.err_mode = ucp_ep_config(ep)->key.err_mode; +- req->send.wireup.ep_uuid = ep_uuid; ++ req->send.wireup.conn_sn = ep->conn_sn; ++ req->send.wireup.src_ep_ptr = (uintptr_t)ep; ++ if (ep->flags & UCP_EP_FLAG_DEST_EP) { ++ req->send.wireup.dest_ep_ptr = ucp_ep_dest_ep_ptr(ep); ++ } else { ++ req->send.wireup.dest_ep_ptr = 0; ++ } ++ + req->send.uct.func = ucp_wireup_msg_progress; + req->send.datatype = ucp_dt_make_contig(1); + ucp_request_send_state_init(req, ucp_dt_make_contig(1), 0); + + /* pack all addresses */ +- status = ucp_address_pack(ep->worker, ep, tl_bitmap, order, +- &req->send.length, &address); ++ status = ucp_address_pack(ep->worker, ucp_wireup_is_ep_needed(ep) ? ep : NULL, ++ tl_bitmap, order, &req->send.length, &address); + if (status != UCS_OK) { + ucs_free(req); + ucs_error("failed to pack address: %s", ucs_status_string(status)); +@@ -175,80 +204,204 @@ static void ucp_wireup_remote_connected(ucp_ep_h ep) + { + ucp_lane_index_t lane; + ++ if (ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED) { ++ return; ++ } ++ + ucs_trace("ep %p: remote connected", ep); ++ ep->flags |= UCP_EP_FLAG_REMOTE_CONNECTED; ++ + for (lane = 0; lane < ucp_ep_num_lanes(ep); ++lane) { + if (ucp_ep_is_lane_p2p(ep, lane)) { ++ ucs_assert(ucp_wireup_ep_test(ep->uct_eps[lane])); ++ } ++ if (ucp_wireup_ep_test(ep->uct_eps[lane])) { + ucp_wireup_ep_remote_connected(ep->uct_eps[lane]); + } + } ++ ++ ucs_assert(ep->flags & UCP_EP_FLAG_DEST_EP); + } + +-static void ucp_wireup_process_request(ucp_worker_h worker, const ucp_wireup_msg_t *msg, +- uint64_t uuid, const char *peer_name, +- unsigned address_count, +- const ucp_address_entry_t *address_list) ++ ++static ucs_status_t ++ucp_wireup_init_lanes_by_request(ucp_worker_h worker, ucp_ep_h ep, ++ const ucp_ep_params_t *params, ++ unsigned ep_init_flags, unsigned address_count, ++ const ucp_address_entry_t *address_list, ++ uint8_t *addr_indices) + { ++ ucs_status_t status = ucp_wireup_init_lanes(ep, params, ep_init_flags, ++ address_count, address_list, ++ addr_indices); ++ if (status == UCS_OK) { ++ return UCS_OK; ++ } ++ ++ ucp_worker_set_ep_failed(worker, ep, NULL, UCP_NULL_LANE, status); ++ return status; ++} ++ ++ ++static UCS_F_NOINLINE void ++ucp_wireup_process_pre_request(ucp_worker_h worker, const ucp_wireup_msg_t *msg, ++ const ucp_unpacked_address_t *remote_address) ++{ ++ uint8_t addr_indices[UCP_MAX_LANES]; ++ ucp_ep_params_t params; ++ ucs_status_t status; ++ ucp_ep_h ep; ++ ++ ucs_assert(msg->type == UCP_WIREUP_MSG_PRE_REQUEST); ++ ucs_assert(msg->dest_ep_ptr != 0); ++ ucs_trace("got wireup pre_request from 0x%"PRIx64" src_ep 0x%lx dst_ep 0x%lx conn_sn %d", ++ remote_address->uuid, msg->src_ep_ptr, msg->dest_ep_ptr, msg->conn_sn); ++ ++ /* wireup pre_request for a specific ep */ ++ ep = ucp_worker_get_ep_by_ptr(worker, msg->dest_ep_ptr); ++ ucs_assert(ep->flags & UCP_EP_FLAG_SOCKADDR_PARTIAL_ADDR); ++ ++ ucp_ep_update_dest_ep_ptr(ep, msg->src_ep_ptr); ++ ucp_ep_flush_state_reset(ep); ++ ++ params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; ++ params.err_mode = ucp_ep_config(ep)->key.err_mode; ++ ++ /* initialize transport endpoints */ ++ status = ucp_wireup_init_lanes_by_request(worker, ep, ¶ms, ++ UCP_EP_CREATE_AM_LANE, ++ remote_address->address_count, ++ remote_address->address_list, ++ addr_indices); ++ if (status != UCS_OK) { ++ return; ++ } ++ ++ status = ucp_wireup_send_request(ep); ++ if (status != UCS_OK) { ++ ucp_ep_cleanup_lanes(ep); ++ } ++} ++ ++static UCS_F_NOINLINE void ++ucp_wireup_process_request(ucp_worker_h worker, const ucp_wireup_msg_t *msg, ++ const ucp_unpacked_address_t *remote_address) ++{ ++ uint64_t remote_uuid = remote_address->uuid; ++ uint64_t tl_bitmap = 0; ++ int send_reply = 0; ++ unsigned ep_init_flags = 0; + ucp_rsc_index_t rsc_tli[UCP_MAX_LANES]; + uint8_t addr_indices[UCP_MAX_LANES]; + ucp_lane_index_t lane, remote_lane; + ucp_rsc_index_t rsc_index; + ucp_ep_params_t params; + ucs_status_t status; +- uint64_t tl_bitmap = 0; ++ ucp_ep_flags_t listener_flag; + ucp_ep_h ep; + +- ucs_trace("got wireup request from 0x%"PRIx64, uuid); +- +- if (msg->ep_uuid == worker->uuid) { +- /* Request for a new connection to the worker */ +- ep = ucp_worker_ep_find(worker, uuid); ++ ucs_assert(msg->type == UCP_WIREUP_MSG_REQUEST); ++ ucs_trace("got wireup request from 0x%"PRIx64" src_ep 0x%lx dst_ep 0x%lx conn_sn %d", ++ remote_address->uuid, msg->src_ep_ptr, msg->dest_ep_ptr, msg->conn_sn); ++ ++ if (msg->dest_ep_ptr != 0) { ++ /* wireup request for a specific ep */ ++ ep = ucp_worker_get_ep_by_ptr(worker, msg->dest_ep_ptr); ++ ucp_ep_update_dest_ep_ptr(ep, msg->src_ep_ptr); ++ if (!(ep->flags & UCP_EP_FLAG_LISTENER)) { ++ /* Reset flush state only if it's not a client-server wireup on ++ * server side with long address exchange when listener (united with ++ * flush state) should be valid until user's callback invoking */ ++ ucp_ep_flush_state_reset(ep); ++ } ++ ep_init_flags |= UCP_EP_CREATE_AM_LANE; ++ } else { ++ ep = ucp_ep_match_retrieve_exp(&worker->ep_match_ctx, remote_uuid, ++ msg->conn_sn ^ (remote_uuid == worker->uuid)); + if (ep == NULL) { + /* Create a new endpoint if does not exist */ +- status = ucp_ep_new(worker, uuid, peer_name, "remote-request", &ep); ++ status = ucp_ep_new(worker, remote_address->name, "remote-request", ++ &ep); + if (status != UCS_OK) { + return; + } +- ep->flags |= UCP_EP_FLAG_DEST_UUID_PEER; ++ ++ /* add internal endpoint to hash */ ++ ep->conn_sn = msg->conn_sn; ++ ucp_ep_match_insert_unexp(&worker->ep_match_ctx, remote_uuid, ep); + } else { +- ucs_assert(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER); ++ ucp_ep_flush_state_reset(ep); + } +- } else { +- /* Reply for a client-server connection (client side) */ +- ep = ucp_worker_ep_find(worker, msg->ep_uuid); +- if (ep == NULL) { +- ucs_trace("got connection request with invalid ep_uuid 0x%"PRIx64, +- msg->ep_uuid); ++ ++ ucp_ep_update_dest_ep_ptr(ep, msg->src_ep_ptr); ++ ++ /* ++ * If the current endpoint already sent a connection request, we have a ++ * "simultaneous connect" situation. In this case, only one of the endpoints ++ * (instead of both) should respect the connect request, otherwise they ++ * will end up being connected to "internal" endpoints on the remote side ++ * instead of each other. We use the uniqueness of worker uuid to decide ++ * which connect request should be ignored. ++ */ ++ if ((ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED) && (remote_uuid > worker->uuid)) { ++ ucs_trace("ep %p: ignoring simultaneous connect request", ep); ++ ep->flags |= UCP_EP_FLAG_CONNECT_REQ_IGNORED; + return; + } +- +- /* Reinsert to hash table with destination worker uuid */ +- ucs_assert(!(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER)); +- ucp_ep_delete_from_hash(ep); +- ep->dest_uuid = uuid; +- ep->flags |= UCP_EP_FLAG_DEST_UUID_PEER; +- ucp_ep_add_to_hash(ep); + } + + params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; + params.err_mode = msg->err_mode; + ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ /* If this is an ep on a listener (server) that received a partial ++ * worker address from the client, then the following lanes initialization ++ * will be done after an aux lane was already created on this ep. ++ * Therefore, remove the existing aux endpoint since will need to create ++ * new lanes now */ ++ ucp_ep_cleanup_lanes(ep); ++ } ++ + /* Initialize lanes (possible destroy existing lanes) */ +- status = ucp_wireup_init_lanes(ep, ¶ms, 0, address_count, address_list, +- addr_indices); ++ status = ucp_wireup_init_lanes_by_request(worker, ep, ¶ms, ep_init_flags, ++ remote_address->address_count, ++ remote_address->address_list, ++ addr_indices); + if (status != UCS_OK) { + return; + } + ++ /* Send a reply if remote side does not have ep_ptr (active-active flow) or ++ * there are p2p lanes (client-server flow) ++ */ ++ send_reply = (msg->dest_ep_ptr == 0) || ucp_ep_config(ep)->p2p_lanes; ++ + /* Connect p2p addresses to remote endpoint */ + if (!(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED)) { +- status = ucp_wireup_connect_local(ep, addr_indices, address_count, +- address_list); ++ status = ucp_wireup_connect_local(ep, addr_indices, ++ remote_address->address_count, ++ remote_address->address_list); + if (status != UCS_OK) { + return; + } + + ep->flags |= UCP_EP_FLAG_LOCAL_CONNECTED; + ++ ucs_assert(send_reply); ++ } ++ ++ /* mark the endpoint as connected to remote */ ++ if (!ucp_ep_config(ep)->p2p_lanes) { ++ ucp_wireup_remote_connected(ep); ++ } ++ ++ if (send_reply) { ++ ++ listener_flag = ep->flags & UCP_EP_FLAG_LISTENER; ++ /* Remove this flag at this point if it's set ++ * (so that address packing would be correct) */ ++ ep->flags &= ~UCP_EP_FLAG_LISTENER; ++ + /* Construct the list that tells the remote side with which address we + * have connected to each of its lanes. + */ +@@ -266,35 +419,48 @@ static void ucp_wireup_process_request(ucp_worker_h worker, const ucp_wireup_msg + } + + ucs_trace("ep %p: sending wireup reply", ep); +- status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_REPLY, ep->dest_uuid, +- tl_bitmap, rsc_tli); ++ status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_REPLY, tl_bitmap, rsc_tli); + if (status != UCS_OK) { + return; + } ++ ++ /* Restore saved flag value */ ++ ep->flags |= listener_flag; ++ } else { ++ /* if in client-server flow, schedule invoking the user's callback ++ * (if server is connected) from the main thread */ ++ if (ucs_test_all_flags(ep->flags, ++ (UCP_EP_FLAG_LISTENER | UCP_EP_FLAG_LOCAL_CONNECTED))) { ++ ucp_listener_schedule_accept_cb(ep); ++ } + } + } + +-static void ucp_wireup_process_reply(ucp_worker_h worker, ucp_wireup_msg_t *msg, +- uint64_t uuid, unsigned address_count, +- const ucp_address_entry_t *address_list) ++static UCS_F_NOINLINE void ++ucp_wireup_process_reply(ucp_worker_h worker, const ucp_wireup_msg_t *msg, ++ const ucp_unpacked_address_t *remote_address) + { +- ucp_ep_h ep = ucp_worker_ep_find(worker, uuid); + ucp_rsc_index_t rsc_tli[UCP_MAX_LANES]; + ucs_status_t status; ++ ucp_ep_h ep; + int ack; + +- if (ep == NULL) { +- ucs_debug("ignoring connection reply - not exists"); +- return; +- } ++ ep = ucp_worker_get_ep_by_ptr(worker, msg->dest_ep_ptr); + +- ucs_trace("ep %p: got wireup reply", ep); ++ ucs_assert(msg->type == UCP_WIREUP_MSG_REPLY); ++ ucs_assert((!(ep->flags & UCP_EP_FLAG_LISTENER))); ++ ucs_trace("ep %p: got wireup reply src_ep 0x%lx dst_ep 0x%lx sn %d", ep, ++ msg->src_ep_ptr, msg->dest_ep_ptr, msg->conn_sn); + +- ucs_assert(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER); ++ ucp_ep_match_remove_ep(&worker->ep_match_ctx, ep); ++ ucp_ep_update_dest_ep_ptr(ep, msg->src_ep_ptr); ++ ucp_ep_flush_state_reset(ep); + + /* Connect p2p addresses to remote endpoint */ + if (!(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED)) { +- status = ucp_wireup_connect_local(ep, msg->tli, address_count, address_list); ++ status = ucp_wireup_connect_local(ep, msg->tli, ++ remote_address->address_count, ++ remote_address->address_list); + if (status != UCS_OK) { + return; + } +@@ -305,40 +471,41 @@ static void ucp_wireup_process_reply(ucp_worker_h worker, ucp_wireup_msg_t *msg, + ack = 0; + } + +- if (!(ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED)) { +- ucp_wireup_remote_connected(ep); +- ep->flags |= UCP_EP_FLAG_REMOTE_CONNECTED; +- } ++ ucp_wireup_remote_connected(ep); + + if (ack) { + /* Send ACK without any address, we've already sent it as part of the request */ + ucs_trace("ep %p: sending wireup ack", ep); + memset(rsc_tli, -1, sizeof(rsc_tli)); +- status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_ACK, ep->dest_uuid, 0, +- rsc_tli); ++ status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_ACK, 0, rsc_tli); + if (status != UCS_OK) { + return; + } + } + } + +-static void ucp_wireup_process_ack(ucp_worker_h worker, uint64_t uuid) ++static UCS_F_NOINLINE ++void ucp_wireup_process_ack(ucp_worker_h worker, const ucp_wireup_msg_t *msg) + { +- ucp_ep_h ep = ucp_worker_ep_find(worker, uuid); ++ ucp_ep_h ep; + +- if (ep == NULL) { +- ucs_debug("ignoring connection ack - ep not exists"); +- return; +- } ++ ep = ucp_worker_get_ep_by_ptr(worker, msg->dest_ep_ptr); + ++ ucs_assert(msg->type == UCP_WIREUP_MSG_ACK); + ucs_trace("ep %p: got wireup ack", ep); + +- ucs_assert(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER); ++ ucs_assert(ep->flags & UCP_EP_FLAG_DEST_EP); + ucs_assert(ep->flags & UCP_EP_FLAG_CONNECT_REP_SENT); + ucs_assert(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED); + +- ep->flags |= UCP_EP_FLAG_REMOTE_CONNECTED; + ucp_wireup_remote_connected(ep); ++ ++ /* if this ack is received as part of the client-server flow, when handling ++ * a large worker address from the client, invoke the cached user callback ++ * from the main thread */ ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ ucp_listener_schedule_accept_cb(ep); ++ } + } + + static ucs_status_t ucp_wireup_msg_handler(void *arg, void *data, +@@ -346,34 +513,31 @@ static ucs_status_t ucp_wireup_msg_handler(void *arg, void *data, + { + ucp_worker_h worker = arg; + ucp_wireup_msg_t *msg = data; +- char peer_name[UCP_WORKER_NAME_MAX]; +- ucp_address_entry_t *address_list; +- unsigned address_count; ++ ucp_unpacked_address_t remote_address; + ucs_status_t status; +- uint64_t uuid; + + UCS_ASYNC_BLOCK(&worker->async); + +- status = ucp_address_unpack(msg + 1, &uuid, peer_name, UCP_WORKER_NAME_MAX, +- &address_count, &address_list); ++ status = ucp_address_unpack(msg + 1, &remote_address); + if (status != UCS_OK) { + ucs_error("failed to unpack address: %s", ucs_status_string(status)); + goto out; + } + + if (msg->type == UCP_WIREUP_MSG_ACK) { +- ucs_assert(address_count == 0); +- ucp_wireup_process_ack(worker, uuid); ++ ucs_assert(remote_address.address_count == 0); ++ ucp_wireup_process_ack(worker, msg); ++ } else if (msg->type == UCP_WIREUP_MSG_PRE_REQUEST) { ++ ucp_wireup_process_pre_request(worker, msg, &remote_address); + } else if (msg->type == UCP_WIREUP_MSG_REQUEST) { +- ucp_wireup_process_request(worker, msg, uuid, peer_name, address_count, +- address_list); ++ ucp_wireup_process_request(worker, msg, &remote_address); + } else if (msg->type == UCP_WIREUP_MSG_REPLY) { +- ucp_wireup_process_reply(worker, msg, uuid, address_count, address_list); ++ ucp_wireup_process_reply(worker, msg, &remote_address); + } else { + ucs_bug("invalid wireup message"); + } + +- ucs_free(address_list); ++ ucs_free(remote_address.address_list); + + out: + UCS_ASYNC_UNBLOCK(&worker->async); +@@ -590,7 +754,7 @@ ucs_status_t ucp_wireup_init_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + status = ucp_wireup_select_lanes(ep, params, ep_init_flags, address_count, + address_list, addr_indices, &key); + if (status != UCS_OK) { +- goto err; ++ return status; + } + + key.reachable_md_map |= ucp_ep_config(ep)->key.reachable_md_map; +@@ -600,7 +764,7 @@ ucs_status_t ucp_wireup_init_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + return UCS_OK; /* No change */ + } + +- if ((ep->cfg_index != 0) && !ucp_ep_is_stub(ep)) { ++ if ((ep->cfg_index != 0) && !ucp_ep_is_sockaddr_stub(ep)) { + /* + * TODO handle a case where we have to change lanes and reconfigure the ep: + * +@@ -631,13 +795,13 @@ ucs_status_t ucp_wireup_init_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + status = ucp_wireup_connect_lane(ep, params, lane, address_count, + address_list, addr_indices[lane]); + if (status != UCS_OK) { +- goto err; ++ return status; + } + } + + status = ucp_wireup_resolve_proxy_lanes(ep); + if (status != UCS_OK) { +- goto err; ++ return status; + } + + /* If we don't have a p2p transport, we're connected */ +@@ -645,24 +809,10 @@ ucs_status_t ucp_wireup_init_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + ep->flags |= UCP_EP_FLAG_LOCAL_CONNECTED; + } + +- /* Cache tag offload state in the flags for fast-path */ +- if (ucp_ep_is_tag_offload_enabled(ucp_ep_config(ep))) { +- ep->flags |= UCP_EP_FLAG_TAG_OFFLOAD_ENABLED; +- } +- + return UCS_OK; +- +-err: +- for (lane = 0; lane < ucp_ep_num_lanes(ep); ++lane) { +- if (ep->uct_eps[lane] != NULL) { +- uct_ep_destroy(ep->uct_eps[lane]); +- ep->uct_eps[lane] = NULL; +- } +- } +- return status; + } + +-ucs_status_t ucp_wireup_send_request(ucp_ep_h ep, uint64_t ep_uuid) ++ucs_status_t ucp_wireup_send_request(ucp_ep_h ep) + { + ucp_worker_h worker = ep->worker; + ucp_rsc_index_t rsc_tli[UCP_MAX_LANES]; +@@ -671,12 +821,6 @@ ucs_status_t ucp_wireup_send_request(ucp_ep_h ep, uint64_t ep_uuid) + ucp_lane_index_t lane; + ucs_status_t status; + +- if (ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED) { +- return UCS_OK; +- } +- +- ucs_assert_always(!ucp_ep_is_stub(ep)); +- + for (lane = 0; lane < UCP_MAX_LANES; ++lane) { + if (lane < ucp_ep_num_lanes(ep)) { + rsc_index = ucp_ep_get_rsc_index(ep, lane); +@@ -696,9 +840,112 @@ ucs_status_t ucp_wireup_send_request(ucp_ep_h ep, uint64_t ep_uuid) + } + + ucs_debug("ep %p: send wireup request (flags=0x%x)", ep, ep->flags); +- status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_REQUEST, ep_uuid, tl_bitmap, +- rsc_tli); ++ status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_REQUEST, tl_bitmap, rsc_tli); ++ + ep->flags |= UCP_EP_FLAG_CONNECT_REQ_QUEUED; ++ ++ return status; ++} ++ ++static void ucp_wireup_connect_remote_purge_cb(uct_pending_req_t *self, void *arg) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucs_queue_head_t *queue = arg; ++ ++ ucs_trace_req("ep %p: extracted request %p from pending queue", req->send.ep, ++ req); ++ ucs_queue_push(queue, (ucs_queue_elem_t*)&req->send.uct.priv); ++} ++ ++ucs_status_t ucp_wireup_send_pre_request(ucp_ep_h ep) ++{ ++ ucp_rsc_index_t rsc_tli[UCP_MAX_LANES]; ++ uint64_t tl_bitmap = -1; /* pack full worker address */ ++ ucs_status_t status; ++ ++ ucs_assert(ep->flags & UCP_EP_FLAG_LISTENER); ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_CONNECT_PRE_REQ_QUEUED)); ++ memset(rsc_tli, UCP_NULL_RESOURCE, sizeof(rsc_tli)); ++ ++ ucs_debug("ep %p: send wireup pre-request (flags=0x%x)", ep, ep->flags); ++ status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_PRE_REQUEST, tl_bitmap, rsc_tli); ++ ++ ep->flags |= UCP_EP_FLAG_CONNECT_PRE_REQ_QUEUED; ++ return status; ++} ++ ++ucs_status_t ucp_wireup_connect_remote(ucp_ep_h ep, ucp_lane_index_t lane) ++{ ++ ucs_queue_head_t tmp_q; ++ ucs_status_t status; ++ ucp_request_t *req; ++ uct_ep_h uct_ep; ++ ++ ucs_trace("ep %p: connect lane %d to remote peer", ep, lane); ++ ++ UCS_ASYNC_BLOCK(&ep->worker->async); ++ ++ /* checking again, with lock held, if already connected or connection is ++ * in progress */ ++ if ((ep->flags & UCP_EP_FLAG_DEST_EP) || ++ ucp_wireup_ep_test(ep->uct_eps[lane])) { ++ status = UCS_OK; ++ goto out_unlock; ++ } ++ ++ if (ucp_proxy_ep_test(ep->uct_eps[lane])) { ++ /* signaling ep is not needed now since we will send wireup request ++ * with signaling flag ++ */ ++ uct_ep = ucp_proxy_ep_extract(ep->uct_eps[lane]); ++ uct_ep_destroy(ep->uct_eps[lane]); ++ } else { ++ uct_ep = ep->uct_eps[lane]; ++ } ++ ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED)); ++ ++ ucs_trace("ep %p: connect lane %d to remote peer with wireup ep", ep, lane); ++ ++ /* make ep->uct_eps[lane] a stub */ ++ status = ucp_wireup_ep_create(ep, &ep->uct_eps[lane]); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ ++ /* Extract all pending requests from the transport endpoint, otherwise they ++ * will prevent the wireup message from being sent (because those requests ++ * could not be progressed any more after switching to wireup proxy). ++ */ ++ ucs_queue_head_init(&tmp_q); ++ uct_ep_pending_purge(uct_ep, ucp_wireup_connect_remote_purge_cb, &tmp_q); ++ ++ /* the wireup ep should use the existing [am_lane] as next_ep */ ++ ucp_wireup_ep_set_next_ep(ep->uct_eps[lane], uct_ep); ++ ++ if (!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED)) { ++ status = ucp_wireup_send_request(ep); ++ if (status != UCS_OK) { ++ goto err_destroy_wireup_ep; ++ } ++ } ++ ++ ucs_queue_for_each_extract(req, &tmp_q, send.uct.priv, 1) { ++ ucs_trace_req("ep %p: requeue request %p after wireup request", ++ req->send.ep, req); ++ status = uct_ep_pending_add(ep->uct_eps[lane], &req->send.uct, 0); ++ ucs_assert(status == UCS_OK); /* because it's a wireup proxy */ ++ } ++ ++ status = UCS_OK; ++ goto out_unlock; ++ ++err_destroy_wireup_ep: ++ uct_ep_destroy(ep->uct_eps[lane]); ++err: ++ ep->uct_eps[lane] = uct_ep; /* restore am lane */ ++out_unlock: ++ UCS_ASYNC_UNBLOCK(&ep->worker->async); + return status; + } + +@@ -708,27 +955,37 @@ static void ucp_wireup_msg_dump(ucp_worker_h worker, uct_am_trace_type_t type, + { + ucp_context_h context = worker->context; + const ucp_wireup_msg_t *msg = data; +- char peer_name[UCP_WORKER_NAME_MAX + 1]; +- ucp_address_entry_t *address_list, *ae; ++ ucp_unpacked_address_t unpacked_address; ++ const ucp_address_entry_t *ae; + ucp_tl_resource_desc_t *rsc; +- unsigned address_count; + ucp_lane_index_t lane; +- uint64_t uuid; ++ unsigned addr_index; ++ ucs_status_t status; + char *p, *end; + +- ucp_address_unpack(msg + 1, &uuid, peer_name, sizeof(peer_name), +- &address_count, &address_list); ++ status = ucp_address_unpack(msg + 1, &unpacked_address); ++ if (status != UCS_OK) { ++ strncpy(unpacked_address.name, "", UCP_WORKER_NAME_MAX); ++ unpacked_address.uuid = 0; ++ unpacked_address.address_count = 0; ++ unpacked_address.address_list = NULL; ++ } + + p = buffer; + end = buffer + max; +- snprintf(p, end - p, "WIREUP %s [%s uuid 0x%"PRIx64" ep_uuid 0x%"PRIx64"]", +- (msg->type == UCP_WIREUP_MSG_REQUEST ) ? "REQ" : +- (msg->type == UCP_WIREUP_MSG_REPLY ) ? "REP" : +- (msg->type == UCP_WIREUP_MSG_ACK ) ? "ACK" : "", +- peer_name, uuid, msg->ep_uuid); + ++ snprintf(p, end - p, ++ "WIREUP %s [%s uuid 0x%"PRIx64" src_ep 0x%lx dst_ep 0x%lx conn_sn %d]", ++ (msg->type == UCP_WIREUP_MSG_PRE_REQUEST ) ? "PRE_REQ" : ++ (msg->type == UCP_WIREUP_MSG_REQUEST ) ? "REQ" : ++ (msg->type == UCP_WIREUP_MSG_REPLY ) ? "REP" : ++ (msg->type == UCP_WIREUP_MSG_ACK ) ? "ACK" : "", ++ unpacked_address.name, unpacked_address.uuid, msg->src_ep_ptr, ++ msg->dest_ep_ptr, msg->conn_sn); + p += strlen(p); +- for (ae = address_list; ae < address_list + address_count; ++ae) { ++ ++ for (addr_index = 0; addr_index < unpacked_address.address_count; ++addr_index) { ++ ae = &unpacked_address.address_list[addr_index]; + for (rsc = context->tl_rscs; rsc < context->tl_rscs + context->num_tls; ++rsc) { + if (ae->tl_name_csum == rsc->tl_name_csum) { + snprintf(p, end - p, " "UCT_TL_RESOURCE_DESC_FMT, +@@ -741,14 +998,14 @@ static void ucp_wireup_msg_dump(ucp_worker_h worker, uct_am_trace_type_t type, + p += strlen(p); + + for (lane = 0; lane < UCP_MAX_LANES; ++lane) { +- if (msg->tli[lane] == (ae - address_list)) { ++ if (msg->tli[lane] == addr_index) { + snprintf(p, end - p, "/lane[%d]", lane); + p += strlen(p); + } + } + } + +- ucs_free(address_list); ++ ucs_free(unpacked_address.address_list); + } + + UCP_DEFINE_AM(-1, UCP_AM_ID_WIREUP, ucp_wireup_msg_handler, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.h +index ae58ef1..21bc6b4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.h +@@ -18,6 +18,7 @@ + * Wireup message types + */ + enum { ++ UCP_WIREUP_MSG_PRE_REQUEST, + UCP_WIREUP_MSG_REQUEST, + UCP_WIREUP_MSG_REPLY, + UCP_WIREUP_MSG_ACK, +@@ -51,6 +52,8 @@ typedef struct { + const ucp_address_iface_attr_t *remote_iface_attr); + uint8_t tl_rsc_flags; /* Flags that describe TL specifics */ + ++ ucp_tl_iface_atomic_flags_t local_atomic_flags; ++ ucp_tl_iface_atomic_flags_t remote_atomic_flags; + } ucp_wireup_criteria_t; + + +@@ -60,7 +63,9 @@ typedef struct { + typedef struct ucp_wireup_msg { + uint8_t type; /* Message type */ + ucp_err_handling_mode_t err_mode; /* Peer error handling mode */ +- uint64_t ep_uuid; /* Peer endpoint dest_uuid */ ++ ucp_ep_conn_sn_t conn_sn; /* Connection sequence number */ ++ uintptr_t src_ep_ptr; /* Endpoint of source */ ++ uintptr_t dest_ep_ptr; /* Endpoint of destination (0 - invalid) */ + + /* REQUEST - which p2p lanes must be connected + * REPLY - which p2p lanes have been connected +@@ -71,7 +76,11 @@ typedef struct ucp_wireup_msg { + } UCS_S_PACKED ucp_wireup_msg_t; + + +-ucs_status_t ucp_wireup_send_request(ucp_ep_h ep, uint64_t ep_uuid); ++ucs_status_t ucp_wireup_send_request(ucp_ep_h ep); ++ ++ucs_status_t ucp_wireup_send_pre_request(ucp_ep_h ep); ++ ++ucs_status_t ucp_wireup_connect_remote(ucp_ep_h ep, ucp_lane_index_t lane); + + ucs_status_t ucp_wireup_select_aux_transport(ucp_ep_h ep, + const ucp_ep_params_t *params, +@@ -113,5 +122,4 @@ static inline int ucp_worker_is_tl_p2p(ucp_worker_h worker, ucp_rsc_index_t rsc_ + !(flags & UCT_IFACE_FLAG_CONNECT_TO_IFACE); + } + +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.c +index 9f2c3a0..3143edc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.c +@@ -56,7 +56,17 @@ static unsigned ucp_wireup_ep_progress(void *arg) + + /* If we still have pending wireup messages, send them out first */ + if (wireup_ep->pending_count != 0) { +- goto out; ++ goto out_unblock; ++ } ++ ++ /* If an error happened on the endpoint (but perhaps the deferred error handler, ++ * ucp_worker_iface_err_handle_progress(), was not called yet, avoid changing ++ * ep state, and let the error handler take care of cleanup. ++ */ ++ if (ucp_ep->flags & UCP_EP_FLAG_FAILED) { ++ ucs_trace("ep %p: not switching wireup_ep %p to ready state because of error", ++ ucp_ep, wireup_ep); ++ goto out_unblock; + } + + ucs_trace("ep %p: switching wireup_ep %p to ready state", ucp_ep, wireup_ep); +@@ -73,15 +83,19 @@ static unsigned ucp_wireup_ep_progress(void *arg) + ucp_proxy_ep_replace(&wireup_ep->super); + wireup_ep = NULL; + ++ UCS_ASYNC_UNBLOCK(&ucp_ep->worker->async); ++ + /* Replay pending requests */ + ucs_queue_for_each_extract(uct_req, &tmp_pending_queue, priv, 1) { + req = ucs_container_of(uct_req, ucp_request_t, send.uct); + ucs_assert(req->send.ep == ucp_ep); + ucp_request_send(req); +- --ucp_ep->worker->wireup_pend_count; ++ --ucp_ep->worker->flush_ops_count; + } + +-out: ++ return 0; ++ ++out_unblock: + UCS_ASYNC_UNBLOCK(&ucp_ep->worker->async); + return 0; + } +@@ -95,7 +109,7 @@ static uct_ep_h ucp_wireup_ep_get_msg_ep(ucp_wireup_ep_t *wireup_ep) + { + uct_ep_h wireup_msg_ep; + +- if (wireup_ep->flags & UCP_WIREUP_EP_FLAG_READY) { ++ if ((wireup_ep->flags & UCP_WIREUP_EP_FLAG_READY) || (wireup_ep->aux_ep == NULL)) { + wireup_msg_ep = wireup_ep->super.uct_ep; + } else { + wireup_msg_ep = wireup_ep->aux_ep; +@@ -119,7 +133,7 @@ static ucs_status_t ucp_wireup_ep_progress_pending(uct_pending_req_t *self) + status = req->func(req); + if (status == UCS_OK) { + ucs_atomic_add32(&wireup_ep->pending_count, -1); +- ucp_request_put(proxy_req); ++ ucs_free(proxy_req); + } + return status; + } +@@ -141,11 +155,12 @@ ucp_wireup_ep_pending_req_release(uct_pending_req_t *self, void *arg) + ucs_free(req); + } + +- ucp_request_put(proxy_req); ++ ucs_free(proxy_req); + } + + static ucs_status_t ucp_wireup_ep_pending_add(uct_ep_h uct_ep, +- uct_pending_req_t *req) ++ uct_pending_req_t *req, ++ unsigned flags) + { + ucp_wireup_ep_t *wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); + ucp_ep_h ucp_ep = wireup_ep->super.ucp_ep; +@@ -156,7 +171,7 @@ static ucs_status_t ucp_wireup_ep_pending_add(uct_ep_h uct_ep, + + UCS_ASYNC_BLOCK(&worker->async); + if (req->func == ucp_wireup_msg_progress) { +- proxy_req = ucs_mpool_get(&worker->req_mp); ++ proxy_req = ucs_malloc(sizeof(*proxy_req), "ucp_wireup_proxy_req"); + if (proxy_req == NULL) { + status = UCS_ERR_NO_MEMORY; + goto out; +@@ -169,15 +184,15 @@ static ucs_status_t ucp_wireup_ep_pending_add(uct_ep_h uct_ep, + proxy_req->send.proxy.wireup_ep = wireup_ep; + proxy_req->send.state.uct_comp.func = NULL; + +- status = uct_ep_pending_add(wireup_msg_ep, &proxy_req->send.uct); ++ status = uct_ep_pending_add(wireup_msg_ep, &proxy_req->send.uct, 0); + if (status == UCS_OK) { + ucs_atomic_add32(&wireup_ep->pending_count, +1); + } else { +- ucp_request_put(proxy_req); ++ ucs_free(proxy_req); + } + } else { + ucs_queue_push(&wireup_ep->pending_q, ucp_wireup_ep_req_priv(req)); +- ++ucp_ep->worker->wireup_pend_count; ++ ++ucp_ep->worker->flush_ops_count; + status = UCS_OK; + } + out: +@@ -189,19 +204,27 @@ static void + ucp_wireup_ep_pending_purge(uct_ep_h uct_ep, uct_pending_purge_callback_t cb, + void *arg) + { +- ucp_wireup_ep_t *wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); ++ ucp_wireup_ep_t *wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); ++ ucp_worker_h worker; + uct_pending_req_t *req; +- ucp_request_t *ucp_req; ++ ucp_request_t *ucp_req; ++ ++ worker = wireup_ep->super.ucp_ep->worker; + + ucs_queue_for_each_extract(req, &wireup_ep->pending_q, priv, 1) { + ucp_req = ucs_container_of(req, ucp_request_t, send.uct); ++ UCS_ASYNC_BLOCK(&worker->async); ++ --worker->flush_ops_count; ++ UCS_ASYNC_UNBLOCK(&worker->async); + cb(&ucp_req->send.uct, arg); + } + +- if (wireup_ep->aux_ep != NULL) { +- uct_ep_pending_purge(wireup_ep->aux_ep, ucp_wireup_ep_pending_req_release, +- arg); ++ if (wireup_ep->pending_count > 0) { ++ uct_ep_pending_purge(ucp_wireup_ep_get_msg_ep(wireup_ep), ++ ucp_wireup_ep_pending_req_release, arg); + } ++ ++ ucs_assert(wireup_ep->pending_count == 0); + } + + static ssize_t ucp_wireup_ep_am_bcopy(uct_ep_h uct_ep, uint8_t id, +@@ -222,7 +245,7 @@ static ssize_t ucp_wireup_ep_am_bcopy(uct_ep_h uct_ep, uint8_t id, + UCS_CLASS_DEFINE_NAMED_NEW_FUNC(ucp_wireup_ep_create, ucp_wireup_ep_t, uct_ep_t, + ucp_ep_h); + +-static ucs_status_t ++ucs_status_t + ucp_wireup_ep_connect_aux(ucp_wireup_ep_t *wireup_ep, + const ucp_ep_params_t *params, unsigned address_count, + const ucp_address_entry_t *address_list) +@@ -290,6 +313,7 @@ UCS_CLASS_INIT_FUNC(ucp_wireup_ep_t, ucp_ep_h ucp_ep) + .ep_put_short = (void*)ucs_empty_function_return_no_resource, + .ep_put_bcopy = (void*)ucp_wireup_ep_bcopy_send_func, + .ep_put_zcopy = (void*)ucs_empty_function_return_no_resource, ++ .ep_get_short = (void*)ucs_empty_function_return_no_resource, + .ep_get_bcopy = (void*)ucs_empty_function_return_no_resource, + .ep_get_zcopy = (void*)ucs_empty_function_return_no_resource, + .ep_am_short = (void*)ucs_empty_function_return_no_resource, +@@ -300,26 +324,29 @@ UCS_CLASS_INIT_FUNC(ucp_wireup_ep_t, ucp_ep_h ucp_ep) + .ep_tag_eager_zcopy = (void*)ucs_empty_function_return_no_resource, + .ep_tag_rndv_zcopy = (void*)ucs_empty_function_return_ptr_no_resource, + .ep_tag_rndv_request = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_add64 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_fadd64 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_swap64 = (void*)ucs_empty_function_return_no_resource, ++ .ep_atomic64_post = (void*)ucs_empty_function_return_no_resource, ++ .ep_atomic64_fetch = (void*)ucs_empty_function_return_no_resource, + .ep_atomic_cswap64 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_add32 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_fadd32 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_swap32 = (void*)ucs_empty_function_return_no_resource, ++ .ep_atomic32_post = (void*)ucs_empty_function_return_no_resource, ++ .ep_atomic32_fetch = (void*)ucs_empty_function_return_no_resource, + .ep_atomic_cswap32 = (void*)ucs_empty_function_return_no_resource + }; + + UCS_CLASS_CALL_SUPER_INIT(ucp_proxy_ep_t, &ops, ucp_ep, NULL, 0); + +- self->aux_ep = NULL; +- self->sockaddr_ep = NULL; +- self->aux_rsc_index = UCP_NULL_RESOURCE; +- self->pending_count = 0; +- self->flags = 0; +- self->progress_id = UCS_CALLBACKQ_ID_NULL; ++ self->aux_ep = NULL; ++ self->sockaddr_ep = NULL; ++ self->aux_rsc_index = UCP_NULL_RESOURCE; ++ self->sockaddr_rsc_index = UCP_NULL_RESOURCE; ++ self->pending_count = 0; ++ self->flags = 0; ++ self->progress_id = UCS_CALLBACKQ_ID_NULL; + ucs_queue_head_init(&self->pending_q); + ++ UCS_ASYNC_BLOCK(&ucp_ep->worker->async); ++ ++ucp_ep->worker->flush_ops_count; ++ UCS_ASYNC_UNBLOCK(&ucp_ep->worker->async); ++ + ucs_trace("ep %p: created wireup ep %p to %s ", ucp_ep, self, + ucp_ep_peer_name(ucp_ep)); + return UCS_OK; +@@ -343,6 +370,10 @@ static UCS_CLASS_CLEANUP_FUNC(ucp_wireup_ep_t) + if (self->sockaddr_ep != NULL) { + uct_ep_destroy(self->sockaddr_ep); + } ++ ++ UCS_ASYNC_BLOCK(&worker->async); ++ --worker->flush_ops_count; ++ UCS_ASYNC_UNBLOCK(&worker->async); + } + + UCS_CLASS_DEFINE(ucp_wireup_ep_t, ucp_proxy_ep_t); +@@ -355,7 +386,10 @@ ucp_rsc_index_t ucp_wireup_ep_get_aux_rsc_index(uct_ep_h uct_ep) + return UCP_NULL_RESOURCE; + } + +- ucs_assert(wireup_ep->aux_ep != NULL); ++ if (wireup_ep->aux_ep == NULL) { ++ return UCP_NULL_RESOURCE; ++ } ++ + return wireup_ep->aux_rsc_index; + } + +@@ -401,17 +435,137 @@ err: + return status; + } + ++static ucs_status_t ucp_wireup_ep_pack_sockaddr_aux_tls(ucp_worker_h worker, ++ const char *dev_name, ++ uint64_t *tl_bitmap_p, ++ ucp_address_t **address_p, ++ size_t *address_length_p) ++{ ++ ucp_context_h context = worker->context; ++ int tl_id, found_supported_tl = 0; ++ ucs_status_t status; ++ uint64_t tl_bitmap = 0; ++ ++ /* Find a transport which matches the given dev_name and the user's configuration. ++ * It also has to be a UCT_IFACE_FLAG_CONNECT_TO_IFACE transport and support ++ * active messaging for sending a wireup message */ ++ ucs_for_each_bit(tl_id, context->config.sockaddr_aux_rscs_bitmap) { ++ if ((!strncmp(context->tl_rscs[tl_id].tl_rsc.dev_name, dev_name, ++ UCT_DEVICE_NAME_MAX)) && ++ (ucs_test_all_flags(worker->ifaces[tl_id].attr.cap.flags, ++ UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_AM_BCOPY))) { ++ found_supported_tl = 1; ++ tl_bitmap |= UCS_BIT(tl_id); ++ } ++ } ++ ++ if (found_supported_tl) { ++ status = ucp_address_pack(worker, NULL, tl_bitmap, NULL, ++ address_length_p, (void**)address_p); ++ } else { ++ ucs_error("no supported sockaddr auxiliary transports found for %s", dev_name); ++ status = UCS_ERR_UNREACHABLE; ++ } ++ ++ *tl_bitmap_p = tl_bitmap; ++ return status; ++} ++ ++ssize_t ucp_wireup_ep_sockaddr_fill_private_data(void *arg, const char *dev_name, ++ void *priv_data) ++{ ++ ucp_wireup_client_data_t *client_data = priv_data; ++ ucp_wireup_ep_t *wireup_ep = arg; ++ ucp_ep_h ucp_ep = wireup_ep->super.ucp_ep; ++ ucp_rsc_index_t sockaddr_rsc = wireup_ep->sockaddr_rsc_index; ++ ucp_worker_h worker = ucp_ep->worker; ++ ucp_context_h context = worker->context; ++ size_t address_length, conn_priv_len; ++ ucp_address_t *worker_address, *rsc_address; ++ ucp_worker_iface_t *wiface; ++ ucs_status_t status; ++ uint64_t tl_bitmap; ++ char aux_tls_str[64]; ++ ++ status = ucp_address_pack(worker, NULL, -1, NULL, &address_length, ++ (void**)&worker_address); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ ++ conn_priv_len = sizeof(*client_data) + address_length; ++ ++ /* pack client data */ ++ client_data->err_mode = ucp_ep_config(ucp_ep)->key.err_mode; ++ client_data->ep_ptr = (uintptr_t)ucp_ep; ++ ++ wiface = &worker->ifaces[sockaddr_rsc]; ++ ++ /* check private data length limitation */ ++ if (conn_priv_len > wiface->attr.max_conn_priv) { ++ ++ /* since the full worker address is too large to fit into the trasnport's ++ * private data, try to pack sockaddr aux tls to pass in the address */ ++ status = ucp_wireup_ep_pack_sockaddr_aux_tls(worker, dev_name, &tl_bitmap, ++ &rsc_address, &address_length); ++ if (status != UCS_OK) { ++ goto err_free_address; ++ } ++ ++ conn_priv_len = sizeof(*client_data) + address_length; ++ ++ /* check the private data length limitation again, now with partial ++ * resources packed (and not the entire worker address) */ ++ if (conn_priv_len > wiface->attr.max_conn_priv) { ++ ucs_error("sockaddr aux resources addresses (%s transports)" ++ " information (%zu) exceeds max_priv on " ++ UCT_TL_RESOURCE_DESC_FMT" (%zu)", ++ ucp_tl_bitmap_str(context, tl_bitmap, aux_tls_str, ++ sizeof(aux_tls_str)), ++ conn_priv_len, ++ UCT_TL_RESOURCE_DESC_ARG(&context->tl_rscs[sockaddr_rsc].tl_rsc), ++ wiface->attr.max_conn_priv); ++ status = UCS_ERR_UNREACHABLE; ++ ucs_free(rsc_address); ++ goto err_free_address; ++ } ++ ++ client_data->is_full_addr = 0; ++ memcpy(client_data + 1, rsc_address, address_length); ++ ucp_ep->flags |= UCP_EP_FLAG_SOCKADDR_PARTIAL_ADDR; ++ ++ ucs_free(rsc_address); ++ ++ ucs_trace("sockaddr tl ("UCT_TL_RESOURCE_DESC_FMT") sending partial address: " ++ "(%s transports) (len=%zu) to server. " ++ "total client priv data len: %zu", ++ context->tl_rscs[sockaddr_rsc].tl_rsc.tl_name, dev_name, ++ ucp_tl_bitmap_str(context, tl_bitmap, aux_tls_str, ++ sizeof(aux_tls_str)), ++ address_length, conn_priv_len); ++ ++ } else { ++ client_data->is_full_addr = 1; ++ memcpy(client_data + 1, worker_address, address_length); ++ } ++ ++ ucp_worker_release_address(worker, worker_address); ++ return conn_priv_len; ++ ++err_free_address: ++ ucp_worker_release_address(worker, worker_address); ++err: ++ return status; ++} ++ + ucs_status_t ucp_wireup_ep_connect_to_sockaddr(uct_ep_h uct_ep, + const ucp_ep_params_t *params) + { + ucp_wireup_ep_t *wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); + ucp_ep_h ucp_ep = wireup_ep->super.ucp_ep; + ucp_worker_h worker = ucp_ep->worker; +- ucp_context_h context = worker->context; + char saddr_str[UCS_SOCKADDR_STRING_LEN]; +- ucp_wireup_sockaddr_priv_t *conn_priv; +- size_t address_length, conn_priv_len; +- ucp_address_t *worker_address; + ucp_rsc_index_t sockaddr_rsc; + ucp_worker_iface_t *wiface; + ucs_status_t status; +@@ -421,54 +575,25 @@ ucs_status_t ucp_wireup_ep_connect_to_sockaddr(uct_ep_h uct_ep, + status = ucp_wireup_select_sockaddr_transport(ucp_ep, params, &sockaddr_rsc); + if (status != UCS_OK) { + goto out; +- } +- +- status = ucp_worker_get_address(worker, &worker_address, &address_length); +- if (status != UCS_OK) { +- goto out; + } + +- conn_priv_len = sizeof(*conn_priv) + address_length; +- +- /* check private data limitation */ + wiface = &worker->ifaces[sockaddr_rsc]; +- if (conn_priv_len > wiface->attr.max_conn_priv) { +- ucs_error("sockaddr connection priv data (%zu) exceeds max_priv on " +- UCT_TL_RESOURCE_DESC_FMT" (%zu)", conn_priv_len, +- UCT_TL_RESOURCE_DESC_ARG(&context->tl_rscs[sockaddr_rsc].tl_rsc), +- wiface->attr.max_conn_priv); +- status = UCS_ERR_UNREACHABLE; +- goto out_free_address; +- } + +- conn_priv = ucs_malloc(conn_priv_len ,"ucp_sockaddr_conn_priv"); +- if (conn_priv == NULL) { +- ucs_error("failed to allocate buffer for sockaddr conn priv"); +- status = UCS_ERR_NO_MEMORY; +- goto out_free_address; +- } +- +- /* pack private data */ +- conn_priv->err_mode = UCP_PARAM_VALUE(EP, params, err_mode, ERR_HANDLING_MODE, +- UCP_ERR_HANDLING_MODE_NONE); +- conn_priv->ep_uuid = ucp_ep->dest_uuid; +- memcpy(conn_priv + 1, worker_address, address_length); ++ wireup_ep->sockaddr_rsc_index = sockaddr_rsc; + + /* send connection request using the transport */ +- status = uct_ep_create_sockaddr(wiface->iface, ¶ms->sockaddr, conn_priv, +- conn_priv_len, &wireup_ep->sockaddr_ep); ++ status = uct_ep_create_sockaddr(wiface->iface, ¶ms->sockaddr, ++ ucp_wireup_ep_sockaddr_fill_private_data, ++ wireup_ep, UCT_CB_FLAG_ASYNC, ++ &wireup_ep->sockaddr_ep); + if (status != UCS_OK) { +- goto out_free_priv; ++ goto out; + } + + ucs_debug("ep %p connecting to %s", ucp_ep, + ucs_sockaddr_str(params->sockaddr.addr, saddr_str, sizeof(saddr_str))); + status = UCS_OK; + +-out_free_priv: +- ucs_free(conn_priv); +-out_free_address: +- ucp_worker_release_address(worker, worker_address); + out: + return status; + } +@@ -526,8 +651,9 @@ int ucp_wireup_ep_is_owner(uct_ep_h uct_ep, uct_ep_h owned_ep) + } + + wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); +- return (wireup_ep->aux_ep == owned_ep) || (wireup_ep->sockaddr_ep == owned_ep); +- ++ return (wireup_ep->aux_ep == owned_ep) || ++ (wireup_ep->sockaddr_ep == owned_ep) || ++ (wireup_ep->super.uct_ep == owned_ep); + } + + void ucp_wireup_ep_disown(uct_ep_h uct_ep, uct_ep_h owned_ep) +@@ -539,5 +665,7 @@ void ucp_wireup_ep_disown(uct_ep_h uct_ep, uct_ep_h owned_ep) + wireup_ep->aux_ep = NULL; + } else if (wireup_ep->sockaddr_ep == owned_ep) { + wireup_ep->sockaddr_ep = NULL; ++ } else if (wireup_ep->super.uct_ep == owned_ep) { ++ ucp_proxy_ep_extract(uct_ep); + } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.h +index 2940505..e1a6a77 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.h +@@ -35,16 +35,12 @@ struct ucp_wireup_ep { + uct_ep_h aux_ep; /**< Used to wireup the "real" endpoint */ + uct_ep_h sockaddr_ep; /**< Used for client-server wireup */ + ucp_rsc_index_t aux_rsc_index; /**< Index of auxiliary transport */ ++ ucp_rsc_index_t sockaddr_rsc_index; /**< Index of sockaddr transport */ + volatile uint32_t pending_count; /**< Number of pending wireup operations */ + volatile uint32_t flags; /**< Connection state flags */ + uct_worker_cb_id_t progress_id; /**< ID of progress function */ + }; + +-typedef struct ucp_wireup_client_data { +- ucp_err_handling_mode_t err_mode; +- uint64_t ep_uuid; +- /* packed worker address follows */ +-} UCS_S_PACKED ucp_wireup_sockaddr_priv_t; + + /** + * Create a proxy endpoint for wireup. +@@ -77,6 +73,11 @@ ucs_status_t ucp_wireup_ep_connect(uct_ep_h uct_ep, const ucp_ep_params_t *param + ucs_status_t ucp_wireup_ep_connect_to_sockaddr(uct_ep_h uct_ep, + const ucp_ep_params_t *params); + ++ucs_status_t ucp_wireup_ep_connect_aux(ucp_wireup_ep_t *wireup_ep, ++ const ucp_ep_params_t *params, ++ unsigned address_count, ++ const ucp_address_entry_t *address_list); ++ + void ucp_wireup_ep_set_next_ep(uct_ep_h uct_ep, uct_ep_h next_ep); + + uct_ep_h ucp_wireup_ep_extract_next_ep(uct_ep_h uct_ep); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/Makefile.am +index fc50d20..0075285 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/Makefile.am +@@ -25,19 +25,23 @@ nobase_dist_libucs_la_HEADERS = \ + config/global_opts.h \ + config/parser.h \ + config/types.h \ +- datastruct/arbiter.h \ + datastruct/callbackq.h \ + datastruct/list_types.h \ + datastruct/list.h \ + datastruct/mpool.h \ + datastruct/pgtable.h \ + datastruct/queue_types.h \ ++ datastruct/strided_alloc.h \ ++ profile/profile_defs.h \ ++ profile/profile_off.h \ ++ profile/profile_on.h \ + stats/stats_fwd.h \ + stats/libstats.h \ + sys/compiler_def.h\ + sys/math.h \ + sys/preprocessor.h \ + sys/rcache.h \ ++ sys/memtype_cache.h \ + sys/string.h \ + time/time_def.h \ + type/class.h \ +@@ -61,6 +65,7 @@ noinst_HEADERS = \ + arch/atomic.h \ + arch/bitops.h \ + arch/cpu.h \ ++ datastruct/arbiter.h \ + datastruct/frag_list.h \ + datastruct/mpmc.h \ + datastruct/mpool.inl \ +@@ -73,11 +78,12 @@ noinst_HEADERS = \ + debug/debug.h \ + debug/log.h \ + debug/memtrack.h \ +- debug/profile.h \ ++ profile/profile.h \ + stats/stats.h \ + sys/checker.h \ + sys/compiler.h \ + sys/numa.h \ ++ sys/rcache_int.h \ + sys/sys.h \ + time/time.h \ + time/timerq.h \ +@@ -91,6 +97,7 @@ noinst_HEADERS = \ + libucs_la_SOURCES = \ + algorithm/crc.c \ + algorithm/qsort_r.c \ ++ arch/aarch64/cpu.c \ + arch/ppc64/timebase.c \ + arch/x86_64/cpu.c \ + async/async.c \ +@@ -98,6 +105,7 @@ libucs_la_SOURCES = \ + async/pipe.c \ + async/thread.c \ + config/global_opts.c \ ++ config/ucm_opts.c \ + config/parser.c \ + datastruct/arbiter.c \ + datastruct/callbackq.c \ +@@ -106,16 +114,18 @@ libucs_la_SOURCES = \ + datastruct/mpool.c \ + datastruct/pgtable.c \ + datastruct/ptr_array.c \ ++ datastruct/strided_alloc.c \ + debug/assert.c \ + debug/debug.c \ + debug/log.c \ + debug/memtrack.c \ +- debug/profile.c \ ++ profile/profile.c \ + stats/stats.c \ + sys/init.c \ + sys/math.c \ + sys/numa.c \ + sys/rcache.c \ ++ sys/memtype_cache.c \ + sys/string.c \ + sys/sys.c \ + time/time.c \ +@@ -123,6 +133,7 @@ libucs_la_SOURCES = \ + time/timerq.c \ + type/class.c \ + type/component.c \ ++ type/spinlock.c \ + type/status.c + + if HAVE_STATS +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.c +new file mode 100644 +index 0000000..4d8c830 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.c +@@ -0,0 +1,67 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#if defined(__aarch64__) ++ ++#include ++#include ++ ++ ++static void ucs_aarch64_cpuid_from_proc(ucs_aarch64_cpuid_t *cpuid) ++{ ++ char buf[256]; ++ int value; ++ FILE* f; ++ ++ cpuid->implementer = -1; ++ cpuid->architecture = -1; ++ cpuid->variant = -1; ++ cpuid->part = -1; ++ cpuid->revision = -1; ++ ++ f = fopen("/proc/cpuinfo","r"); ++ if (!f) { ++ return; ++ } ++ ++ while (fgets(buf, sizeof(buf), f)) { ++ if (sscanf(buf, "CPU implementer : 0x%x", &value) == 1) { ++ cpuid->implementer = value; ++ } else if (sscanf(buf, "CPU architecture : %d", &value) == 1) { ++ cpuid->architecture = value; ++ } else if (sscanf(buf, "CPU variant : 0x%x", &value) == 1) { ++ cpuid->variant = value; ++ } else if (sscanf(buf, "CPU part : 0x%x", &value) == 1) { ++ cpuid->part = value; ++ } else if (sscanf(buf, "CPU revision : %d", &value) == 1) { ++ cpuid->revision = value; ++ } ++ ++ if ((cpuid->implementer != -1) && (cpuid->architecture != -1) && ++ (cpuid->variant != -1) && (cpuid->part != -1) && (cpuid->revision != -1)) { ++ break; ++ } ++ } ++ ++ fclose(f); ++} ++ ++void ucs_aarch64_cpuid(ucs_aarch64_cpuid_t *cpuid) ++{ ++ static ucs_aarch64_cpuid_t cached_cpuid; ++ static int initialized = 0; ++ ++ if (!initialized) { ++ ucs_aarch64_cpuid_from_proc(&cached_cpuid); ++ ucs_memory_cpu_store_fence(); ++ initialized = 1; ++ } ++ ++ ucs_memory_cpu_load_fence(); ++ *cpuid = cached_cpuid; ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.h +index 431c025..5f42b12 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #if __ARM_NEON + #include + #endif +@@ -28,10 +29,30 @@ BEGIN_C_DECLS + #define ucs_memory_bus_fence() asm volatile ("dsb sy" ::: "memory"); + #define ucs_memory_bus_store_fence() asm volatile ("dsb st" ::: "memory"); + #define ucs_memory_bus_load_fence() asm volatile ("dsb ld" ::: "memory"); +- ++#define ucs_memory_bus_wc_flush() + #define ucs_memory_cpu_fence() asm volatile ("dmb ish" ::: "memory"); + #define ucs_memory_cpu_store_fence() asm volatile ("dmb ishst" ::: "memory"); + #define ucs_memory_cpu_load_fence() asm volatile ("dmb ishld" ::: "memory"); ++#define ucs_memory_cpu_wc_fence() asm volatile ("dmb st" ::: "memory"); ++ ++ ++/* ++ * ARM processor ID (ARM ISA - Main ID Register, EL1) ++ */ ++typedef struct ucs_aarch64_cpuid { ++ int implementer; ++ int architecture; ++ int variant; ++ int part; ++ int revision; ++} ucs_aarch64_cpuid_t; ++ ++ ++/** ++ * Get ARM CPU identifier and version ++ */ ++void ucs_aarch64_cpuid(ucs_aarch64_cpuid_t *cpuid); ++ + + #if HAVE_HW_TIMER + static inline uint64_t ucs_arch_read_hres_clock(void) +@@ -69,13 +90,74 @@ static inline int ucs_arch_get_cpu_flag() + static inline void ucs_arch_wait_mem(void *address) + { + unsigned long tmp; +- __asm__ __volatile__ ("ldxr %0, [%1] \n" +- "wfe \n" +- : "=&r"(tmp) +- : "r"(address)); ++ asm volatile ("ldxrb %w0, %1 \n" ++ "wfe \n" ++ : "=&r"(tmp) ++ : "Q"(address)); + } + +-END_C_DECLS ++#if !HAVE___CLEAR_CACHE ++static inline void ucs_arch_clear_cache(void *start, void *end) ++{ ++#if HAVE___AARCH64_SYNC_CACHE_RANGE ++ /* do not allow global declaration of compiler intrinsic */ ++ void __aarch64_sync_cache_range(void* beg, void* end); + ++ __aarch64_sync_cache_range(start, end); ++#else ++ uintptr_t ptr; ++ unsigned icache; ++ unsigned dcache; ++ unsigned ctr_el0; ++ ++ /* Get cache line size, using ctr_el0 register ++ * ++ * Bits Name Function ++ * ***************************** ++ * [31] - Reserved, res1. ++ * [30:28] - Reserved, res0. ++ * [27:24] CWG Cache Write-Back granule. Log2 of the number of words of the ++ * maximum size of memory that can be overwritten as a result of ++ * the eviction of a cache entry that has had a memory location ++ * in it modified: ++ * 0x4 ++ * Cache Write-Back granule size is 16 words. ++ * [23:20] ERG Exclusives Reservation Granule. Log2 of the number of words of ++ * the maximum size of the reservation granule that has been ++ * implemented for the Load-Exclusive and Store-Exclusive instructions: ++ * 0x4 ++ * Exclusive reservation granule size is 16 words. ++ * [19:16] DminLine Log2 of the number of words in the smallest cache line of all the ++ * data and unified caches that the processor controls: ++ * 0x4 ++ * Smallest data cache line size is 16 words. ++ * [15:14] L1lp L1 Instruction cache policy. Indicates the indexing and tagging ++ * policy for the L1 Instruction cache: ++ * 0b10 ++ * Virtually Indexed Physically Tagged (VIPT). ++ * [13:4] - Reserved, res0. ++ * [3:0] IminLine Log2 of the number of words in the smallest cache line of all ++ * the instruction caches that the processor controls. ++ * 0x4 ++ * Smallest instruction cache line size is 16 words. ++ */ ++ asm volatile ("mrs\t%0, ctr_el0":"=r" (ctr_el0)); ++ icache = sizeof(int) << (ctr_el0 & 0xf); ++ dcache = sizeof(int) << ((ctr_el0 >> 16) & 0xf); ++ ++ for (ptr = ucs_align_down((uintptr_t)start, dcache); ptr < (uintptr_t)end; ptr += dcache) { ++ asm volatile ("dc cvau, %0" :: "r" (ptr) : "memory"); ++ } ++ asm volatile ("dsb ish" ::: "memory"); ++ ++ for (ptr = ucs_align_down((uintptr_t)start, icache); ptr < (uintptr_t)end; ptr += icache) { ++ asm volatile ("ic ivau, %0" :: "r" (ptr) : "memory"); ++ } ++ asm volatile ("dsb ish; isb" ::: "memory"); ++#endif ++} + #endif + ++END_C_DECLS ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/atomic.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/atomic.h +index 7649971..0caea9b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/atomic.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/atomic.h +@@ -19,6 +19,42 @@ + # error "Unsupported architecture" + #endif + ++#define UCS_DEFINE_ATOMIC_AND(_wordsize, _suffix) \ ++ static inline void ucs_atomic_and##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ __sync_and_and_fetch(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_FAND(_wordsize, _suffix) \ ++ static inline uint##_wordsize##_t ucs_atomic_fand##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ return __sync_fetch_and_and(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_XOR(_wordsize, _suffix) \ ++ static inline void ucs_atomic_xor##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ __sync_xor_and_fetch(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_FXOR(_wordsize, _suffix) \ ++ static inline uint##_wordsize##_t ucs_atomic_fxor##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ return __sync_fetch_and_xor(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_OR(_wordsize, _suffix) \ ++ static inline void ucs_atomic_or##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ __sync_or_and_fetch(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_FOR(_wordsize, _suffix) \ ++ static inline uint##_wordsize##_t ucs_atomic_for##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ return __sync_fetch_and_or(ptr, value); \ ++ } ++ + /* + * Define atomic functions + */ +@@ -32,6 +68,36 @@ UCS_DEFINE_ATOMIC_FADD(16, w); + UCS_DEFINE_ATOMIC_FADD(32, l); + UCS_DEFINE_ATOMIC_FADD(64, q); + ++UCS_DEFINE_ATOMIC_AND(8, b); ++UCS_DEFINE_ATOMIC_AND(16, w); ++UCS_DEFINE_ATOMIC_AND(32, l); ++UCS_DEFINE_ATOMIC_AND(64, q); ++ ++UCS_DEFINE_ATOMIC_FAND(8, b); ++UCS_DEFINE_ATOMIC_FAND(16, w); ++UCS_DEFINE_ATOMIC_FAND(32, l); ++UCS_DEFINE_ATOMIC_FAND(64, q); ++ ++UCS_DEFINE_ATOMIC_OR(8, b); ++UCS_DEFINE_ATOMIC_OR(16, w); ++UCS_DEFINE_ATOMIC_OR(32, l); ++UCS_DEFINE_ATOMIC_OR(64, q); ++ ++UCS_DEFINE_ATOMIC_FOR(8, b); ++UCS_DEFINE_ATOMIC_FOR(16, w); ++UCS_DEFINE_ATOMIC_FOR(32, l); ++UCS_DEFINE_ATOMIC_FOR(64, q); ++ ++UCS_DEFINE_ATOMIC_XOR(8, b); ++UCS_DEFINE_ATOMIC_XOR(16, w); ++UCS_DEFINE_ATOMIC_XOR(32, l); ++UCS_DEFINE_ATOMIC_XOR(64, q); ++ ++UCS_DEFINE_ATOMIC_FXOR(8, b); ++UCS_DEFINE_ATOMIC_FXOR(16, w); ++UCS_DEFINE_ATOMIC_FXOR(32, l); ++UCS_DEFINE_ATOMIC_FXOR(64, q); ++ + UCS_DEFINE_ATOMIC_SWAP(8, b); + UCS_DEFINE_ATOMIC_SWAP(16, w); + UCS_DEFINE_ATOMIC_SWAP(32, l); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/bitops.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/bitops.h +index f4dd3ab..2049b7c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/bitops.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/bitops.h +@@ -18,87 +18,89 @@ + # error "Unsupported architecture" + #endif + +-#define ucs_ilog2(n) \ +-( \ +- __builtin_constant_p(n) ? ( \ +- (n) < 1 ? 0 : \ +- (n) & (1ULL << 63) ? 63 : \ +- (n) & (1ULL << 62) ? 62 : \ +- (n) & (1ULL << 61) ? 61 : \ +- (n) & (1ULL << 60) ? 60 : \ +- (n) & (1ULL << 59) ? 59 : \ +- (n) & (1ULL << 58) ? 58 : \ +- (n) & (1ULL << 57) ? 57 : \ +- (n) & (1ULL << 56) ? 56 : \ +- (n) & (1ULL << 55) ? 55 : \ +- (n) & (1ULL << 54) ? 54 : \ +- (n) & (1ULL << 53) ? 53 : \ +- (n) & (1ULL << 52) ? 52 : \ +- (n) & (1ULL << 51) ? 51 : \ +- (n) & (1ULL << 50) ? 50 : \ +- (n) & (1ULL << 49) ? 49 : \ +- (n) & (1ULL << 48) ? 48 : \ +- (n) & (1ULL << 47) ? 47 : \ +- (n) & (1ULL << 46) ? 46 : \ +- (n) & (1ULL << 45) ? 45 : \ +- (n) & (1ULL << 44) ? 44 : \ +- (n) & (1ULL << 43) ? 43 : \ +- (n) & (1ULL << 42) ? 42 : \ +- (n) & (1ULL << 41) ? 41 : \ +- (n) & (1ULL << 40) ? 40 : \ +- (n) & (1ULL << 39) ? 39 : \ +- (n) & (1ULL << 38) ? 38 : \ +- (n) & (1ULL << 37) ? 37 : \ +- (n) & (1ULL << 36) ? 36 : \ +- (n) & (1ULL << 35) ? 35 : \ +- (n) & (1ULL << 34) ? 34 : \ +- (n) & (1ULL << 33) ? 33 : \ +- (n) & (1ULL << 32) ? 32 : \ +- (n) & (1ULL << 31) ? 31 : \ +- (n) & (1ULL << 30) ? 30 : \ +- (n) & (1ULL << 29) ? 29 : \ +- (n) & (1ULL << 28) ? 28 : \ +- (n) & (1ULL << 27) ? 27 : \ +- (n) & (1ULL << 26) ? 26 : \ +- (n) & (1ULL << 25) ? 25 : \ +- (n) & (1ULL << 24) ? 24 : \ +- (n) & (1ULL << 23) ? 23 : \ +- (n) & (1ULL << 22) ? 22 : \ +- (n) & (1ULL << 21) ? 21 : \ +- (n) & (1ULL << 20) ? 20 : \ +- (n) & (1ULL << 19) ? 19 : \ +- (n) & (1ULL << 18) ? 18 : \ +- (n) & (1ULL << 17) ? 17 : \ +- (n) & (1ULL << 16) ? 16 : \ +- (n) & (1ULL << 15) ? 15 : \ +- (n) & (1ULL << 14) ? 14 : \ +- (n) & (1ULL << 13) ? 13 : \ +- (n) & (1ULL << 12) ? 12 : \ +- (n) & (1ULL << 11) ? 11 : \ +- (n) & (1ULL << 10) ? 10 : \ +- (n) & (1ULL << 9) ? 9 : \ +- (n) & (1ULL << 8) ? 8 : \ +- (n) & (1ULL << 7) ? 7 : \ +- (n) & (1ULL << 6) ? 6 : \ +- (n) & (1ULL << 5) ? 5 : \ +- (n) & (1ULL << 4) ? 4 : \ +- (n) & (1ULL << 3) ? 3 : \ +- (n) & (1ULL << 2) ? 2 : \ +- (n) & (1ULL << 1) ? 1 : \ +- (n) & (1ULL << 0) ? 0 : \ +- 0 \ +- ) : \ +- (sizeof(n) <= 4) ? \ +- __ucs_ilog2_u32((uint32_t)(n)) : \ +- __ucs_ilog2_u64((uint64_t)(n)) \ ++#define ucs_ilog2(_n) \ ++( \ ++ __builtin_constant_p(_n) ? ( \ ++ (_n) < 1 ? 0 : \ ++ (_n) & (1ULL << 63) ? 63 : \ ++ (_n) & (1ULL << 62) ? 62 : \ ++ (_n) & (1ULL << 61) ? 61 : \ ++ (_n) & (1ULL << 60) ? 60 : \ ++ (_n) & (1ULL << 59) ? 59 : \ ++ (_n) & (1ULL << 58) ? 58 : \ ++ (_n) & (1ULL << 57) ? 57 : \ ++ (_n) & (1ULL << 56) ? 56 : \ ++ (_n) & (1ULL << 55) ? 55 : \ ++ (_n) & (1ULL << 54) ? 54 : \ ++ (_n) & (1ULL << 53) ? 53 : \ ++ (_n) & (1ULL << 52) ? 52 : \ ++ (_n) & (1ULL << 51) ? 51 : \ ++ (_n) & (1ULL << 50) ? 50 : \ ++ (_n) & (1ULL << 49) ? 49 : \ ++ (_n) & (1ULL << 48) ? 48 : \ ++ (_n) & (1ULL << 47) ? 47 : \ ++ (_n) & (1ULL << 46) ? 46 : \ ++ (_n) & (1ULL << 45) ? 45 : \ ++ (_n) & (1ULL << 44) ? 44 : \ ++ (_n) & (1ULL << 43) ? 43 : \ ++ (_n) & (1ULL << 42) ? 42 : \ ++ (_n) & (1ULL << 41) ? 41 : \ ++ (_n) & (1ULL << 40) ? 40 : \ ++ (_n) & (1ULL << 39) ? 39 : \ ++ (_n) & (1ULL << 38) ? 38 : \ ++ (_n) & (1ULL << 37) ? 37 : \ ++ (_n) & (1ULL << 36) ? 36 : \ ++ (_n) & (1ULL << 35) ? 35 : \ ++ (_n) & (1ULL << 34) ? 34 : \ ++ (_n) & (1ULL << 33) ? 33 : \ ++ (_n) & (1ULL << 32) ? 32 : \ ++ (_n) & (1ULL << 31) ? 31 : \ ++ (_n) & (1ULL << 30) ? 30 : \ ++ (_n) & (1ULL << 29) ? 29 : \ ++ (_n) & (1ULL << 28) ? 28 : \ ++ (_n) & (1ULL << 27) ? 27 : \ ++ (_n) & (1ULL << 26) ? 26 : \ ++ (_n) & (1ULL << 25) ? 25 : \ ++ (_n) & (1ULL << 24) ? 24 : \ ++ (_n) & (1ULL << 23) ? 23 : \ ++ (_n) & (1ULL << 22) ? 22 : \ ++ (_n) & (1ULL << 21) ? 21 : \ ++ (_n) & (1ULL << 20) ? 20 : \ ++ (_n) & (1ULL << 19) ? 19 : \ ++ (_n) & (1ULL << 18) ? 18 : \ ++ (_n) & (1ULL << 17) ? 17 : \ ++ (_n) & (1ULL << 16) ? 16 : \ ++ (_n) & (1ULL << 15) ? 15 : \ ++ (_n) & (1ULL << 14) ? 14 : \ ++ (_n) & (1ULL << 13) ? 13 : \ ++ (_n) & (1ULL << 12) ? 12 : \ ++ (_n) & (1ULL << 11) ? 11 : \ ++ (_n) & (1ULL << 10) ? 10 : \ ++ (_n) & (1ULL << 9) ? 9 : \ ++ (_n) & (1ULL << 8) ? 8 : \ ++ (_n) & (1ULL << 7) ? 7 : \ ++ (_n) & (1ULL << 6) ? 6 : \ ++ (_n) & (1ULL << 5) ? 5 : \ ++ (_n) & (1ULL << 4) ? 4 : \ ++ (_n) & (1ULL << 3) ? 3 : \ ++ (_n) & (1ULL << 2) ? 2 : \ ++ (_n) & (1ULL << 1) ? 1 : \ ++ (_n) & (1ULL << 0) ? 0 : \ ++ 0 \ ++ ) : \ ++ (sizeof(_n) <= 4) ? \ ++ __ucs_ilog2_u32((uint32_t)(_n)) : \ ++ __ucs_ilog2_u64((uint64_t)(_n)) \ + ) + + /* Returns the number of 1-bits in x */ +-#define ucs_count_one_bits(x) __builtin_popcount(x) ++#define ucs_popcount(_n) \ ++ ((sizeof(_n) <= 4) ? __builtin_popcount((uint32_t)(_n)) : __builtin_popcountl(_n)) + + /* Returns the number of trailing 0-bits in x, starting at the least + * significant bit position. If x is 0, the result is undefined. + */ +-#define ucs_count_zero_bits(x) __builtin_ctz(x) ++#define ucs_count_trailing_zero_bits(_n) \ ++ ((sizeof(_n) <= 4) ? __builtin_ctz((uint32_t)(_n)) : __builtin_ctzl(_n)) + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/cpu.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/cpu.h +index 1c362bc..58a8382 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/cpu.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/cpu.h +@@ -22,6 +22,9 @@ typedef enum ucs_cpu_model { + UCS_CPU_MODEL_INTEL_SANDYBRIDGE, + UCS_CPU_MODEL_INTEL_NEHALEM, + UCS_CPU_MODEL_INTEL_WESTMERE, ++ UCS_CPU_MODEL_INTEL_HASWELL, ++ UCS_CPU_MODEL_INTEL_BROADWELL, ++ UCS_CPU_MODEL_INTEL_SKYLAKE, + UCS_CPU_MODEL_ARM_AARCH64, + UCS_CPU_MODEL_LAST + } ucs_cpu_model_t; +@@ -66,4 +69,22 @@ typedef enum ucs_cpu_flag { + #define UCS_SYS_CACHE_LINE_SIZE UCS_ARCH_CACHE_LINE_SIZE + #endif + ++/** ++ * Clear processor data and instruction caches, intended for ++ * self-modifying code. ++ * ++ * @start start of region to clear cache, including address ++ * @end end of region to clear cache, excluding address ++ */ ++static inline void ucs_clear_cache(void *start, void *end) ++{ ++#if HAVE___CLEAR_CACHE ++ /* do not allow global declaration of compiler intrinsic */ ++ void __clear_cache(void* beg, void* end); ++ ++ __clear_cache(start, end); ++#else ++ ucs_arch_clear_cache(start, end); ++#endif ++} + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/ppc64/cpu.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/ppc64/cpu.h +index ae067c5..10cdc62 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/ppc64/cpu.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/ppc64/cpu.h +@@ -25,9 +25,14 @@ BEGIN_C_DECLS + #define ucs_memory_bus_fence() asm volatile ("sync"::: "memory") + #define ucs_memory_bus_store_fence() ucs_memory_bus_fence() + #define ucs_memory_bus_load_fence() ucs_memory_bus_fence() ++#define ucs_memory_bus_wc_flush() + #define ucs_memory_cpu_fence() ucs_memory_bus_fence() +-#define ucs_memory_cpu_store_fence() ucs_memory_bus_fence() +-#define ucs_memory_cpu_load_fence() ucs_memory_bus_fence() ++#define ucs_memory_cpu_store_fence() asm volatile ("lwsync \n" \ ++ ::: "memory") ++#define ucs_memory_cpu_load_fence() asm volatile ("lwsync \n" \ ++ "isync \n" \ ++ ::: "memory") ++#define ucs_memory_cpu_wc_fence() ucs_memory_bus_fence() + + + static inline uint64_t ucs_arch_read_hres_clock() +@@ -55,6 +60,13 @@ double ucs_arch_get_clocks_per_sec(); + + #define ucs_arch_wait_mem ucs_arch_generic_wait_mem + ++#if !HAVE___CLEAR_CACHE ++static inline void ucs_arch_clear_cache(void *start, void *end) ++{ ++ ucs_memory_cpu_fence(); ++} ++#endif ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.c +index 7abe242..cec9c5c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.c +@@ -1,5 +1,5 @@ + /** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2013. ALL RIGHTS RESERVED. ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -49,7 +49,9 @@ static void ucs_x86_check_invariant_tsc() + + return; + warn: +- ucs_warn("CPU does not support invariant TSC, time may be unstable"); ++ if (ucs_global_opts.warn_inv_tsc) { ++ ucs_warn("CPU does not support invariant TSC, time may be unstable"); ++ } + } + + static double ucs_x86_tsc_freq_from_cpu_model() +@@ -156,6 +158,20 @@ ucs_cpu_model_t ucs_arch_get_cpu_model() + case 0x2c: + case 0x2f: + return UCS_CPU_MODEL_INTEL_WESTMERE; ++ case 0x3c: ++ case 0x3f: ++ case 0x45: ++ case 0x46: ++ return UCS_CPU_MODEL_INTEL_HASWELL; ++ case 0x3d: ++ case 0x47: ++ case 0x4f: ++ case 0x56: ++ return UCS_CPU_MODEL_INTEL_BROADWELL; ++ case 0x5e: ++ case 0x4e: ++ case 0x55: ++ return UCS_CPU_MODEL_INTEL_SKYLAKE; + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.h +index 583b06a..7b9b8f1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.h +@@ -31,9 +31,11 @@ BEGIN_C_DECLS + #define ucs_memory_bus_fence() asm volatile ("mfence"::: "memory") + #define ucs_memory_bus_store_fence() asm volatile ("sfence" ::: "memory") + #define ucs_memory_bus_load_fence() asm volatile ("lfence" ::: "memory") ++#define ucs_memory_bus_wc_flush() + #define ucs_memory_cpu_fence() ucs_compiler_fence() + #define ucs_memory_cpu_store_fence() ucs_compiler_fence() + #define ucs_memory_cpu_load_fence() ucs_compiler_fence() ++#define ucs_memory_cpu_wc_fence() asm volatile ("sfence" ::: "memory") + + + static inline uint64_t ucs_arch_read_hres_clock() +@@ -50,6 +52,17 @@ ucs_cpu_flag_t ucs_arch_get_cpu_flag() UCS_F_NOOPTIMIZE; + + #define ucs_arch_wait_mem ucs_arch_generic_wait_mem + ++#if !HAVE___CLEAR_CACHE ++static inline void ucs_arch_clear_cache(void *start, void *end) ++{ ++ char *ptr; ++ ++ for (ptr = (char*)start; ptr < (char*)end; ptr++) { ++ asm volatile("mfence; clflush %0; mfence" :: "m" (*ptr)); ++ } ++} ++#endif ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.c +index 5c756cd..bb5aa5d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.c +@@ -25,13 +25,13 @@ KHASH_MAP_INIT_INT(ucs_async_handler, ucs_async_handler_t *); + typedef struct ucs_async_global_context { + khash_t(ucs_async_handler) handlers; + pthread_rwlock_t handlers_lock; +- volatile uint32_t timer_id; ++ volatile uint32_t handler_id; + } ucs_async_global_context_t; + + + static ucs_async_global_context_t ucs_async_global_context = { + .handlers_lock = PTHREAD_RWLOCK_INITIALIZER, +- .timer_id = UCS_ASYNC_TIMER_ID_MIN ++ .handler_id = UCS_ASYNC_TIMER_ID_MIN + }; + + +@@ -65,6 +65,7 @@ static ucs_async_ops_t ucs_async_poll_ops = { + .block = ucs_empty_function, + .unblock = ucs_empty_function, + .context_init = ucs_async_poll_init, ++ .context_cleanup = ucs_empty_function, + .context_try_block = ucs_async_poll_tryblock, + .context_unblock = ucs_empty_function, + .add_event_fd = ucs_empty_function_return_success, +@@ -147,26 +148,43 @@ static void ucs_async_handler_put(ucs_async_handler_t *handler) + } + + /* add new handler to the table */ +-static ucs_status_t ucs_async_handler_add(ucs_async_handler_t *handler) ++static ucs_status_t ucs_async_handler_add(int min_id, int max_id, ++ ucs_async_handler_t *handler) + { + int hash_extra_status; + ucs_status_t status; + khiter_t hash_it; ++ int i, id; + + pthread_rwlock_wrlock(&ucs_async_global_context.handlers_lock); + ++ handler->id = -1; + ucs_assert_always(handler->refcount == 1); +- hash_it = kh_put(ucs_async_handler, &ucs_async_global_context.handlers, +- handler->id, &hash_extra_status); +- if (hash_extra_status == -1) { +- ucs_error("Failed to add async handler " UCS_ASYNC_HANDLER_FMT " to hash", +- UCS_ASYNC_HANDLER_ARG(handler)); +- status = UCS_ERR_NO_MEMORY; +- goto out_unlock; +- } else if (hash_extra_status == 0) { +- ucs_error("Async handler " UCS_ASYNC_HANDLER_FMT " exists - cannot add %s()", +- UCS_ASYNC_HANDLER_ARG(kh_value(&ucs_async_global_context.handlers, hash_it)), +- ucs_debug_get_symbol_name(handler->cb)); ++ ++ /* ++ * Search for an empty key in the range [min_id, max_id) ++ * ucs_async_global_context.handler_id is used to generate "unique" keys. ++ */ ++ for (i = min_id; i < max_id; ++i) { ++ id = min_id + (ucs_atomic_fadd32(&ucs_async_global_context.handler_id, 1) % ++ (max_id - min_id)); ++ hash_it = kh_put(ucs_async_handler, &ucs_async_global_context.handlers, ++ id, &hash_extra_status); ++ if (hash_extra_status == -1) { ++ ucs_error("Failed to add async handler " UCS_ASYNC_HANDLER_FMT ++ " to hash", UCS_ASYNC_HANDLER_ARG(handler)); ++ status = UCS_ERR_NO_MEMORY; ++ goto out_unlock; ++ } else if (hash_extra_status != 0) { ++ handler->id = id; ++ ucs_assert(id != -1); ++ break; ++ } ++ } ++ ++ if (handler->id == -1) { ++ ucs_error("Cannot add async handler %s() - id range [%d..%d) is full", ++ ucs_debug_get_symbol_name(handler->cb), min_id, max_id); + status = UCS_ERR_ALREADY_EXISTS; + goto out_unlock; + } +@@ -330,6 +348,8 @@ void ucs_async_context_cleanup(ucs_async_context_t *async) + ucs_warn("releasing async context with %d handlers", async->num_handlers); + pthread_rwlock_unlock(&ucs_async_global_context.handlers_lock); + } ++ ++ ucs_async_method_call(async->mode, context_cleanup, async); + ucs_mpmc_queue_cleanup(&async->missed); + } + +@@ -340,17 +360,18 @@ void ucs_async_context_destroy(ucs_async_context_t *async) + } + + static ucs_status_t +-ucs_async_alloc_handler(int id, ucs_async_mode_t mode, int events, +- ucs_async_event_cb_t cb, void *arg, +- ucs_async_context_t *async) ++ucs_async_alloc_handler(int min_id, int max_id, ucs_async_mode_t mode, ++ int events, ucs_async_event_cb_t cb, void *arg, ++ ucs_async_context_t *async, int *id_p) + { + ucs_async_handler_t *handler; + ucs_status_t status; + + /* If async context is given, it should have same mode */ + if ((async != NULL) && (async->mode != mode)) { +- ucs_error("Async mode mismatch for handler [id=%d], " +- "mode: %d async context mode: %d", id, mode, async->mode); ++ ucs_error("Async mode mismatch for handler %s(), " ++ "mode: %d async context mode: %d", ++ ucs_debug_get_symbol_name(cb), mode, async->mode); + status = UCS_ERR_INVALID_PARAM; + goto err; + } +@@ -369,7 +390,6 @@ ucs_async_alloc_handler(int id, ucs_async_mode_t mode, int events, + goto err_dec_num_handlers; + } + +- handler->id = id; + handler->mode = mode; + handler->events = events; + handler->cb = cb; +@@ -378,12 +398,14 @@ ucs_async_alloc_handler(int id, ucs_async_mode_t mode, int events, + handler->missed = 0; + handler->refcount = 1; + ucs_async_method_call(mode, block); +- status = ucs_async_handler_add(handler); ++ status = ucs_async_handler_add(min_id, max_id, handler); + ucs_async_method_call(mode, unblock); + if (status != UCS_OK) { + goto err_free; + } + ++ ucs_assert((handler->id >= min_id) && (handler->id < max_id)); ++ *id_p = handler->id; + return UCS_OK; + + err_free: +@@ -401,6 +423,7 @@ ucs_status_t ucs_async_set_event_handler(ucs_async_mode_t mode, int event_fd, + void *arg, ucs_async_context_t *async) + { + ucs_status_t status; ++ int event_id; + + if (event_fd >= UCS_ASYNC_TIMER_ID_MIN) { + /* File descriptor too large */ +@@ -408,10 +431,12 @@ ucs_status_t ucs_async_set_event_handler(ucs_async_mode_t mode, int event_fd, + goto err; + } + +- status = ucs_async_alloc_handler(event_fd, mode, events, cb, arg, async); ++ status = ucs_async_alloc_handler(event_fd, event_fd + 1, mode, events, cb, ++ arg, async, &event_id); + if (status != UCS_OK) { + goto err; + } ++ ucs_assert(event_id == event_fd); + + status = ucs_async_method_call(mode, add_event_fd, async, event_fd, events); + if (status != UCS_OK) { +@@ -435,15 +460,8 @@ ucs_status_t ucs_async_add_timer(ucs_async_mode_t mode, ucs_time_t interval, + ucs_status_t status; + int timer_id; + +- /* Search for unused timer ID */ +- do { +- timer_id = ucs_atomic_fadd32(&ucs_async_global_context.timer_id, 1); +- if (timer_id >= UCS_ASYNC_TIMER_ID_MAX) { +- timer_id = UCS_ASYNC_TIMER_ID_MIN; +- } +- +- status = ucs_async_alloc_handler(timer_id, mode, 1, cb, arg, async); +- } while (status == UCS_ERR_ALREADY_EXISTS); ++ status = ucs_async_alloc_handler(UCS_ASYNC_TIMER_ID_MIN, UCS_ASYNC_TIMER_ID_MAX, ++ mode, 1, cb, arg, async, &timer_id); + if (status != UCS_OK) { + goto err; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.h +index 3866dbe..406b1f3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.h +@@ -121,6 +121,25 @@ static inline int ucs_async_check_miss(ucs_async_context_t *async) + } while (0) + + ++/** ++ * Check if asynchronous event delivery is blocked by the current thread. ++ * ++ * @param _async Event context to check status for. ++ */ ++#define UCS_ASYNC_IS_RECURSIVELY_BLOCKED(_async) \ ++ ({ \ ++ int _ret; \ ++ if ((_async)->mode == UCS_ASYNC_MODE_THREAD) { \ ++ _ret = UCS_ASYNC_THREAD_IS_RECURSIVELY_BLOCKED(_async); \ ++ } else if ((_async)->mode == UCS_ASYNC_MODE_SIGNAL) { \ ++ _ret = UCS_ASYNC_SIGNAL_IS_RECURSIVELY_BLOCKED(_async); \ ++ } else { \ ++ _ret = (_async)->poll_block; \ ++ } \ ++ _ret; \ ++ }) ++ ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async_int.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async_int.h +index e11f63e..8835642 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async_int.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async_int.h +@@ -57,6 +57,7 @@ typedef struct ucs_async_ops { + void (*unblock)(); + + ucs_status_t (*context_init)(ucs_async_context_t *async); ++ void (*context_cleanup)(ucs_async_context_t *async); + int (*context_try_block)(ucs_async_context_t *async); + void (*context_unblock)(ucs_async_context_t *async); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.c +index c610be1..7784fd4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.c +@@ -298,6 +298,14 @@ static ucs_status_t ucs_async_signal_init(ucs_async_context_t *async) + return UCS_OK; + } + ++static void ucs_async_signal_cleanup(ucs_async_context_t *async) ++{ ++ if (async->signal.block_count > 0) { ++ ucs_warn("destroying async signal context with block_count %d", ++ async->signal.block_count); ++ } ++} ++ + static ucs_status_t ucs_async_signal_modify_event_fd(ucs_async_context_t *async, + int event_fd, int events) + { +@@ -580,6 +588,7 @@ ucs_async_ops_t ucs_async_signal_ops = { + .block = ucs_async_signal_block_all, + .unblock = ucs_async_signal_unblock_all, + .context_init = ucs_async_signal_init, ++ .context_cleanup = ucs_async_signal_cleanup, + .context_try_block = ucs_async_signal_try_block, + .context_unblock = ucs_async_signal_unblock, + .add_event_fd = ucs_async_signal_add_event_fd, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.h +index 51ed37c..72e78f3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.h +@@ -29,10 +29,17 @@ typedef struct ucs_async_signal_context { + ucs_memory_cpu_fence(); \ + } + ++ + #define UCS_ASYNC_SIGNAL_UNBLOCK(_async) \ + { \ + ucs_memory_cpu_fence(); \ + --(_async)->signal.block_count; \ + } + ++ ++#define UCS_ASYNC_SIGNAL_IS_RECURSIVELY_BLOCKED(_async) \ ++ (((_async)->signal.block_count > 0) && \ ++ ((_async)->signal.tid == ucs_get_tid())) ++ ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.c +index 03f16f3..f44da04 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.c +@@ -257,7 +257,7 @@ static ucs_status_t ucs_async_thread_init(ucs_async_context_t *async) + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + ret = pthread_mutex_init(&async->thread.mutex, &attr); + if (ret != 0) { +- ucs_error("Failed to initialize lock: %s", strerror(ret)); ++ ucs_error("failed to initialize async lock: %s", strerror(ret)); + return UCS_ERR_INVALID_PARAM; + } + +@@ -267,6 +267,21 @@ static ucs_status_t ucs_async_thread_init(ucs_async_context_t *async) + return ucs_spinlock_init(&async->thread.spinlock); + } + ++static void ucs_async_thread_cleanup(ucs_async_context_t *async) ++{ ++#if !(NVALGRIND) ++ int ret; ++ ++ if (RUNNING_ON_VALGRIND) { ++ ret = pthread_mutex_destroy(&async->thread.mutex); ++ if (ret != 0) { ++ ucs_warn("failed to destroy async lock: %s", strerror(ret)); ++ } ++ } else ++#endif ++ ucs_spinlock_destroy(&async->thread.spinlock); ++} ++ + static ucs_status_t ucs_async_thread_add_event_fd(ucs_async_context_t *async, + int event_fd, int events) + { +@@ -407,6 +422,7 @@ ucs_async_ops_t ucs_async_thread_ops = { + .block = ucs_empty_function, + .unblock = ucs_empty_function, + .context_init = ucs_async_thread_init, ++ .context_cleanup = ucs_async_thread_cleanup, + .context_try_block = ucs_async_thread_try_block, + .context_unblock = ucs_async_thread_unblock, + .add_event_fd = ucs_async_thread_add_event_fd, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.h +index 5a2726f..074f5a9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.h +@@ -29,6 +29,8 @@ typedef struct ucs_async_thread_context { + #define UCS_ASYNC_THREAD_UNBLOCK(_async) \ + ucs_spin_unlock(&(_async)->thread.spinlock) + ++#define UCS_ASYNC_THREAD_IS_RECURSIVELY_BLOCKED(...) 0 ++ + #else + + #define UCS_ASYNC_THREAD_BLOCK(_async) \ +@@ -45,6 +47,14 @@ typedef struct ucs_async_thread_context { + ucs_spin_unlock(&(_async)->thread.spinlock); \ + } + ++#ifdef ENABLE_ASSERT ++ ++#define UCS_ASYNC_THREAD_IS_RECURSIVELY_BLOCKED(_async) \ ++ ((RUNNING_ON_VALGRIND) ? 0 : \ ++ ucs_spin_is_owner(&(_async)->thread.spinlock, pthread_self())) ++ ++#endif /* ENABLE_ASSERT */ ++ + #endif /* NVALGRIND */ + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.c +index 0fb6cd7..b1f37e2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.c +@@ -7,7 +7,7 @@ + #include "global_opts.h" + + #include +-#include ++#include + #include + #include + #include +@@ -27,6 +27,8 @@ ucs_global_opts_t ucs_global_opts = { + .error_mail_footer = "", + .gdb_command = "gdb", + .debug_signo = SIGHUP, ++ .log_level_trigger = UCS_LOG_LEVEL_FATAL, ++ .warn_unused_env_vars = 1, + .async_max_events = 64, + .async_signo = SIGALRM, + .stats_dest = "", +@@ -37,6 +39,8 @@ ucs_global_opts_t ucs_global_opts = { + .profile_file = "", + .stats_filter = { NULL, 0 }, + .stats_format = UCS_STATS_FULL, ++ .rcache_check_pfn = 0, ++ .warn_inv_tsc = 1 + }; + + static const char *ucs_handle_error_modes[] = { +@@ -120,6 +124,11 @@ static ucs_config_field_t ucs_global_opts_table[] = { + "Log level to trigger error handling.", + ucs_offsetof(ucs_global_opts_t, log_level_trigger), UCS_CONFIG_TYPE_ENUM(ucs_log_level_names)}, + ++ {UCS_GLOBAL_OPTS_WARN_UNUSED_CONFIG, "yes", ++ "Issue warning about UCX_ environment variables which were not used by the\n" ++ "configuration parser.", ++ ucs_offsetof(ucs_global_opts_t, warn_unused_env_vars), UCS_CONFIG_TYPE_BOOL}, ++ + {"ASYNC_MAX_EVENTS", "1024", /* TODO remove this; resize mpmc */ + "Maximal number of events which can be handled from one context", + ucs_offsetof(ucs_global_opts_t, async_max_events), UCS_CONFIG_TYPE_UINT}, +@@ -176,7 +185,6 @@ static ucs_config_field_t ucs_global_opts_table[] = { + ucs_offsetof(ucs_global_opts_t, memtrack_dest), UCS_CONFIG_TYPE_STRING}, + #endif + +-#if HAVE_PROFILING + {"PROFILE_MODE", "", + "Profile collection modes. If none is specified, profiling is disabled.\n" + " - log - Record all timestamps.\n" +@@ -192,10 +200,21 @@ static ucs_config_field_t ucs_global_opts_table[] = { + {"PROFILE_LOG_SIZE", "4m", + "Maximal size of profiling log. New records will replace old records.", + ucs_offsetof(ucs_global_opts_t, profile_log_size), UCS_CONFIG_TYPE_MEMUNITS}, +-#endif ++ ++ {"RCACHE_CHECK_PFN", "n", ++ "Registration cache to check that the physical page frame number of a found\n" ++ "memory region was not changed since the time the region was registered.\n", ++ ucs_offsetof(ucs_global_opts_t, rcache_check_pfn), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"WARN_INVARIANT_TSC", "y", ++ "Issue a warning in case of invariant TSC.\n", ++ ucs_offsetof(ucs_global_opts_t, warn_inv_tsc), UCS_CONFIG_TYPE_BOOL}, + + {NULL} + }; ++UCS_CONFIG_REGISTER_TABLE(ucs_global_opts_table, "UCS global", NULL, ++ ucs_global_opts_t) ++ + + void ucs_global_opts_init() + { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.h +index b451296..35a3f38 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.h +@@ -17,6 +17,7 @@ + + BEGIN_C_DECLS + ++#define UCS_GLOBAL_OPTS_WARN_UNUSED_CONFIG "WARN_UNUSED_ENV_VARS" + + /** + * UCS global options. +@@ -63,6 +64,9 @@ typedef struct { + /* Log level to trigger error handling */ + ucs_log_level_t log_level_trigger; + ++ /* Issue warning about UCX_ env vars which were not used by config parser */ ++ int warn_unused_env_vars; ++ + /* Max. events per context, will be removed in the future */ + unsigned async_max_events; + +@@ -94,7 +98,7 @@ typedef struct { + char *profile_file; + + /* Limit for profiling log size */ +- size_t profile_log_size; ++ size_t profile_log_size; + + /* Counters to be included in statistics summary */ + ucs_config_names_array_t stats_filter; +@@ -102,6 +106,11 @@ typedef struct { + /* statistics format options */ + ucs_stats_formats_t stats_format; + ++ /* registration cache checks if physical page is not moved */ ++ int rcache_check_pfn; ++ ++ /* Prompt/suppress invariant TSC warning (used in gtest) */ ++ int warn_inv_tsc; + } ucs_global_opts_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.c +index 8e53849..4bf4205 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.c +@@ -9,8 +9,11 @@ + #endif + #include "parser.h" + ++#include + #include + #include ++#include ++#include + #include + #include + #include +@@ -18,13 +21,36 @@ + #include + + ++/* configuration value which specifies "infinity" for a numeric variable */ ++#define UCS_CONFIG_PARSER_NUMERIC_INF_STR "inf" ++ ++/* width of titles in docstring */ ++#define UCP_CONFIG_PARSER_DOCSTR_WIDTH 10 ++ ++ ++/* list of prefixes for a configuration variable, used to dump all possible ++ * aliases. ++ */ ++typedef struct ucs_config_parser_prefix_list { ++ const char *prefix; ++ ucs_list_link_t list; ++} ucs_config_parser_prefix_t; ++ ++ + typedef UCS_CONFIG_ARRAY_FIELD(void, data) ucs_config_array_field_t; + ++KHASH_SET_INIT_STR(ucs_config_env_vars) ++ + + /* Process environment variables */ + extern char **environ; + + ++UCS_LIST_HEAD(ucs_config_global_list); ++static khash_t(ucs_config_env_vars) ucs_config_parser_env_vars = {0}; ++static pthread_mutex_t ucs_config_parser_env_vars_hash_lock = PTHREAD_MUTEX_INITIALIZER; ++ ++ + const char *ucs_async_mode_names[] = { + [UCS_ASYNC_MODE_SIGNAL] = "signal", + [UCS_ASYNC_MODE_THREAD] = "thread", +@@ -99,7 +125,12 @@ int ucs_config_sprintf_int(char *buf, size_t max, void *src, const void *arg) + + int ucs_config_sscanf_uint(const char *buf, void *dest, const void *arg) + { +- return sscanf(buf, "%u", (unsigned*)dest); ++ if (!strcasecmp(buf, UCS_CONFIG_PARSER_NUMERIC_INF_STR)) { ++ *(unsigned*)dest = UINT_MAX; ++ return 1; ++ } else { ++ return sscanf(buf, "%u", (unsigned*)dest); ++ } + } + + ucs_status_t ucs_config_clone_uint(void *src, void *dest, const void *arg) +@@ -110,7 +141,13 @@ ucs_status_t ucs_config_clone_uint(void *src, void *dest, const void *arg) + + int ucs_config_sprintf_uint(char *buf, size_t max, void *src, const void *arg) + { +- return snprintf(buf, max, "%u", *(unsigned*)src); ++ unsigned value = *(unsigned*)src; ++ if (value == UINT_MAX) { ++ snprintf(buf, max, UCS_CONFIG_PARSER_NUMERIC_INF_STR); ++ return 1; ++ } else { ++ return snprintf(buf, max, "%u", value); ++ } + } + + int ucs_config_sscanf_ulong(const char *buf, void *dest, const void *arg) +@@ -372,7 +409,7 @@ int ucs_config_sscanf_memunits(const char *buf, void *dest, const void *arg) + size_t bytes; + + /* Special value: infinity */ +- if (!strcasecmp(buf, "inf")) { ++ if (!strcasecmp(buf, UCS_CONFIG_PARSER_NUMERIC_INF_STR)) { + *(size_t*)dest = UCS_CONFIG_MEMUNITS_INF; + return 1; + } +@@ -414,7 +451,7 @@ int ucs_config_sprintf_memunits(char *buf, size_t max, void *src, const void *ar + size_t sz = *(size_t*)src; + + if (sz == UCS_CONFIG_MEMUNITS_INF) { +- snprintf(buf, max, "inf"); ++ snprintf(buf, max, UCS_CONFIG_PARSER_NUMERIC_INF_STR); + } else if (sz == UCS_CONFIG_MEMUNITS_AUTO) { + snprintf(buf, max, "auto"); + } else { +@@ -843,6 +880,34 @@ ucs_config_parser_set_value_internal(void *opts, ucs_config_field_t *fields, + return (count == 0) ? UCS_ERR_NO_ELEM : UCS_OK; + } + ++static void ucs_config_parser_mark_env_var_used(const char *name) ++{ ++ khiter_t iter; ++ char *key; ++ int ret; ++ ++ if (!ucs_global_opts.warn_unused_env_vars) { ++ return; ++ } ++ ++ pthread_mutex_lock(&ucs_config_parser_env_vars_hash_lock); ++ ++ iter = kh_get(ucs_config_env_vars, &ucs_config_parser_env_vars, name); ++ if (iter != kh_end(&ucs_config_parser_env_vars)) { ++ goto out; /* already exists */ ++ } ++ ++ key = ucs_strdup(name, "config_parser_env_var"); ++ if (key == NULL) { ++ ucs_error("strdup(%s) failed", name); ++ goto out; ++ } ++ ++ kh_put(ucs_config_env_vars, &ucs_config_parser_env_vars, key, &ret); ++out: ++ pthread_mutex_unlock(&ucs_config_parser_env_vars_hash_lock); ++} ++ + static ucs_status_t ucs_config_apply_env_vars(void *opts, ucs_config_field_t *fields, + const char *prefix, const char *table_prefix, + int recurse, int ignore_errors) +@@ -889,6 +954,7 @@ static ucs_status_t ucs_config_apply_env_vars(void *opts, ucs_config_field_t *fi + env_value = getenv(buf); + if (env_value != NULL) { + ucs_config_parser_release_field(field, var); ++ ucs_config_parser_mark_env_var_used(buf); + status = ucs_config_parser_parse_field(field, env_value, var); + if (status != UCS_OK) { + /* If set to ignore errors, restore the default value */ +@@ -1075,14 +1141,18 @@ static void __print_stream_cb(int num, const char *line, void *arg) + + static void + ucs_config_parser_print_field(FILE *stream, const void *opts, const char *env_prefix, +- const char *prefix, const char *name, +- const ucs_config_field_t *field, +- unsigned long flags, const char *docstr, ...) ++ ucs_list_link_t *prefix_list, const char *name, ++ const ucs_config_field_t *field, unsigned long flags, ++ const char *docstr, ...) + { +- char value_buf[128] = {0}; ++ ucs_config_parser_prefix_t *prefix, *head; ++ char value_buf[128] = {0}; + char syntax_buf[256] = {0}; + va_list ap; + ++ ucs_assert(!ucs_list_is_empty(prefix_list)); ++ head = ucs_list_head(prefix_list, ucs_config_parser_prefix_t, list); ++ + field->parser.write(value_buf, sizeof(value_buf) - 1, (char*)opts + field->offset, + field->parser.arg); + field->parser.help(syntax_buf, sizeof(syntax_buf) - 1, field->parser.arg); +@@ -1091,8 +1161,8 @@ ucs_config_parser_print_field(FILE *stream, const void *opts, const char *env_pr + fprintf(stream, "#\n"); + ucs_config_print_doc_line_by_line(field, __print_stream_cb, stream); + fprintf(stream, "#\n"); +- fprintf(stream, "# Syntax: %s\n", syntax_buf); +- fprintf(stream, "#\n"); ++ fprintf(stream, "# %-*s %s\n", UCP_CONFIG_PARSER_DOCSTR_WIDTH, "syntax:", ++ syntax_buf); + + /* Extra docstring */ + if (docstr != NULL) { +@@ -1102,9 +1172,27 @@ ucs_config_parser_print_field(FILE *stream, const void *opts, const char *env_pr + va_end(ap); + fprintf(stream, "\n"); + } +- } + +- fprintf(stream, "%s%s%s=%s\n", env_prefix, prefix, name, value_buf); ++ /* Parents in configuration hierarchy */ ++ if (prefix_list->next != prefix_list->prev) { ++ fprintf(stream, "# %-*s", UCP_CONFIG_PARSER_DOCSTR_WIDTH, "inherits:"); ++ ucs_list_for_each(prefix, prefix_list, list) { ++ if (prefix == head) { ++ continue; ++ } ++ ++ fprintf(stream, " %s%s%s", env_prefix, prefix->prefix, name); ++ if (prefix != ucs_list_tail(prefix_list, ucs_config_parser_prefix_t, list)) { ++ fprintf(stream, ","); ++ } ++ } ++ fprintf(stream, "\n"); ++ } ++ ++ fprintf(stream, "#\n"); ++ } ++ ++ fprintf(stream, "%s%s%s=%s\n", env_prefix, head->prefix, name, value_buf); + + if (flags & UCS_CONFIG_PRINT_DOC) { + fprintf(stream, "\n"); +@@ -1115,26 +1203,23 @@ static void + ucs_config_parser_print_opts_recurs(FILE *stream, const void *opts, + const ucs_config_field_t *fields, + unsigned flags, const char *env_prefix, +- const char *table_prefix) ++ ucs_list_link_t *prefix_list) + { + const ucs_config_field_t *field, *aliased_field; ++ ucs_config_parser_prefix_t inner_prefix; + size_t alias_table_offset; +- const char *prefix; +- +- prefix = table_prefix == NULL ? "" : table_prefix; + + for (field = fields; field->name; ++field) { + if (ucs_config_is_table_field(field)) { +- /* Parse with sub-table prefix */ +- if (table_prefix == NULL) { +- ucs_config_parser_print_opts_recurs(stream, opts + field->offset, +- field->parser.arg, flags, +- env_prefix, field->name); +- } else { +- ucs_config_parser_print_opts_recurs(stream, opts + field->offset, +- field->parser.arg, flags, +- env_prefix, table_prefix); +- } ++ /* Parse with sub-table prefix. ++ * We start the leaf prefix and continue up the hierarchy. ++ */ ++ inner_prefix.prefix = field->name; ++ ucs_list_add_tail(prefix_list, &inner_prefix.list); ++ ucs_config_parser_print_opts_recurs(stream, opts + field->offset, ++ field->parser.arg, flags, ++ env_prefix, prefix_list); ++ ucs_list_del(&inner_prefix.list); + } else if (ucs_config_is_alias_field(field)) { + if (flags & UCS_CONFIG_PRINT_HIDDEN) { + aliased_field = ucs_config_find_aliased_field(fields, field, +@@ -1144,14 +1229,15 @@ ucs_config_parser_print_opts_recurs(FILE *stream, const void *opts, + } + ucs_config_parser_print_field(stream, + opts + alias_table_offset, +- env_prefix, table_prefix, ++ env_prefix, prefix_list, + field->name, aliased_field, +- flags, "(alias of %s%s%s)", +- env_prefix, table_prefix, ++ flags, "%-*s %s%s%s", "alias of:", ++ UCP_CONFIG_PARSER_DOCSTR_WIDTH, ++ env_prefix, prefix_list, + aliased_field->name); + } + } else { +- ucs_config_parser_print_field(stream, opts, env_prefix, prefix, ++ ucs_config_parser_print_field(stream, opts, env_prefix, prefix_list, + field->name, field, flags, NULL); + } + } +@@ -1162,6 +1248,9 @@ void ucs_config_parser_print_opts(FILE *stream, const char *title, const void *o + ucs_config_field_t *fields, const char *table_prefix, + ucs_config_print_flags_t flags) + { ++ ucs_config_parser_prefix_t table_prefix_elem; ++ UCS_LIST_HEAD(prefix_list); ++ + if (flags & UCS_CONFIG_PRINT_HEADER) { + fprintf(stream, "\n"); + fprintf(stream, "#\n"); +@@ -1171,8 +1260,10 @@ void ucs_config_parser_print_opts(FILE *stream, const char *title, const void *o + } + + if (flags & UCS_CONFIG_PRINT_CONFIG) { ++ table_prefix_elem.prefix = table_prefix ? table_prefix : ""; ++ ucs_list_add_tail(&prefix_list, &table_prefix_elem.list); + ucs_config_parser_print_opts_recurs(stream, opts, fields, flags, +- UCS_CONFIG_PREFIX, table_prefix); ++ UCS_CONFIG_PREFIX, &prefix_list); + } + + if (flags & UCS_CONFIG_PRINT_HEADER) { +@@ -1180,6 +1271,107 @@ void ucs_config_parser_print_opts(FILE *stream, const char *title, const void *o + } + } + ++void ucs_config_parser_print_all_opts(FILE *stream, ucs_config_print_flags_t flags) ++{ ++ const ucs_config_global_list_entry_t *entry; ++ ucs_status_t status; ++ char title[64]; ++ void *opts; ++ ++ ucs_list_for_each(entry, &ucs_config_global_list, list) { ++ opts = ucs_malloc(entry->size, "tmp_opts"); ++ if (opts == NULL) { ++ ucs_error("could not allocate configuration of size %zu", entry->size); ++ continue; ++ } ++ ++ status = ucs_config_parser_fill_opts(opts, entry->fields, NULL, ++ entry->prefix, 0); ++ if (status != UCS_OK) { ++ ucs_free(opts); ++ continue; ++ } ++ ++ snprintf(title, sizeof(title), "%s configuration", entry->name); ++ ucs_config_parser_print_opts(stream, title, opts, entry->fields, ++ entry->prefix, flags); ++ ++ ucs_config_parser_release_opts(opts, entry->fields); ++ ucs_free(opts); ++ } ++} ++ ++void ucs_config_parser_warn_unused_env_vars() ++{ ++ static uint32_t warn_once = 1; ++ char unused_env_vars_names[40]; ++ int num_unused_vars; ++ char **envp, *envstr; ++ size_t prefix_len; ++ char *var_name; ++ char *p, *endp; ++ khiter_t iter; ++ char *saveptr; ++ int truncated; ++ int ret; ++ ++ if (!ucs_global_opts.warn_unused_env_vars) { ++ return; ++ } ++ ++ if (!ucs_atomic_cswap32(&warn_once, 1, 0)) { ++ return; ++ } ++ ++ pthread_mutex_lock(&ucs_config_parser_env_vars_hash_lock); ++ ++ prefix_len = strlen(UCS_CONFIG_PREFIX); ++ p = unused_env_vars_names; ++ endp = p + sizeof(unused_env_vars_names) - 1; ++ *endp = '\0'; ++ truncated = 0; ++ num_unused_vars = 0; ++ ++ for (envp = environ; !truncated && (*envp != NULL); ++envp) { ++ envstr = ucs_strdup(*envp, "env_str"); ++ if (envstr == NULL) { ++ continue; ++ } ++ ++ var_name = strtok_r(envstr, "=", &saveptr); ++ if (!var_name || strncmp(var_name, UCS_CONFIG_PREFIX, prefix_len)) { ++ ucs_free(envstr); ++ continue; /* Not UCX */ ++ } ++ ++ iter = kh_get(ucs_config_env_vars, &ucs_config_parser_env_vars, var_name); ++ if (iter == kh_end(&ucs_config_parser_env_vars)) { ++ ret = snprintf(p, endp - p, " %s,", var_name); ++ if (ret > endp - p) { ++ truncated = 1; ++ *p = '\0'; ++ } else { ++ p += strlen(p); ++ ++num_unused_vars; ++ } ++ } ++ ++ ucs_free(envstr); ++ } ++ ++ if (num_unused_vars > 0) { ++ if (!truncated) { ++ p[-1] = '\0'; /* remove trailing comma */ ++ } ++ ucs_warn("unused env variable%s:%s%s (set %s%s=n to suppress this warning)", ++ num_unused_vars > 1 ? "s" : "", unused_env_vars_names, ++ truncated ? "..." : "", UCS_CONFIG_PREFIX, ++ UCS_GLOBAL_OPTS_WARN_UNUSED_CONFIG); ++ } ++ ++ pthread_mutex_unlock(&ucs_config_parser_env_vars_hash_lock); ++} ++ + size_t ucs_config_memunits_get(size_t config_size, size_t auto_size, + size_t max_size) + { +@@ -1204,3 +1396,11 @@ int ucs_config_names_search(ucs_config_names_array_t config_names, + return -1; + } + ++UCS_STATIC_CLEANUP { ++ const char *key; ++ ++ kh_foreach_key(&ucs_config_parser_env_vars, key, { ++ ucs_free((void*)key); ++ }) ++ kh_destroy_inplace(ucs_config_env_vars, &ucs_config_parser_env_vars); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.h +index b85cf7c..87c6142 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.h +@@ -9,6 +9,8 @@ + + #include "types.h" + ++#include ++#include + #include + #include + #include +@@ -34,27 +36,27 @@ BEGIN_C_DECLS + */ + + typedef struct ucs_config_parser { +- int (*read) (const char *buf, void *dest, const void *arg); +- int (*write)(char *buf, size_t max, void *src, const void *arg); +- ucs_status_t (*clone)(void *src, void *dest, const void *arg); +- void (*release)(void *ptr, const void *arg); +- void (*help)(char *buf, size_t max, const void *arg); +- const void *arg; ++ int (*read) (const char *buf, void *dest, const void *arg); ++ int (*write)(char *buf, size_t max, void *src, const void *arg); ++ ucs_status_t (*clone)(void *src, void *dest, const void *arg); ++ void (*release)(void *ptr, const void *arg); ++ void (*help)(char *buf, size_t max, const void *arg); ++ const void *arg; + } ucs_config_parser_t; + + + typedef struct ucs_config_array { +- size_t elem_size; +- ucs_config_parser_t parser; ++ size_t elem_size; ++ ucs_config_parser_t parser; + } ucs_config_array_t; + + + typedef struct ucs_config_field { +- const char *name; +- const char *dfl_value; +- const char *doc; +- size_t offset; +- ucs_config_parser_t parser; ++ const char *name; ++ const char *dfl_value; ++ const char *doc; ++ size_t offset; ++ ucs_config_parser_t parser; + } ucs_config_field_t; + + +@@ -65,11 +67,32 @@ typedef struct ucs_ib_port_spec { + + + typedef struct ucs_range_spec { +- unsigned first; /* the first value in the range */ +- unsigned last; /* the last value in the range */ ++ unsigned first; /* the first value in the range */ ++ unsigned last; /* the last value in the range */ + } ucs_range_spec_t; + + ++typedef struct ucs_config_global_list_entry { ++ ucs_list_link_t list; ++ const char *name; ++ const char *prefix; ++ ucs_config_field_t *fields; ++ size_t size; ++} ucs_config_global_list_entry_t; ++ ++ ++#define UCS_CONFIG_REGISTER_TABLE(_fields, _name, _prefix, _type) \ ++ UCS_STATIC_INIT { \ ++ extern ucs_list_link_t ucs_config_global_list; \ ++ static ucs_config_global_list_entry_t entry; \ ++ entry.fields = _fields; \ ++ entry.name = _name; \ ++ entry.prefix = _prefix; \ ++ entry.size = sizeof(_type); \ ++ ucs_list_add_tail(&ucs_config_global_list, &entry.list); \ ++ } ++ ++ + /* + * Parsing and printing different data types + */ +@@ -294,6 +317,14 @@ void ucs_config_parser_print_opts(FILE *stream, const char *title, const void *o + ucs_config_print_flags_t flags); + + /** ++ * Print all options defined in the library - names, values, documentation. ++ * ++ * @param stream Output stream to print to. ++ * @param flags Flags which control the output. ++ */ ++void ucs_config_parser_print_all_opts(FILE *stream, ucs_config_print_flags_t flags); ++ ++/** + * Read a value from options structure. + * + * @param opts User-defined options structure. +@@ -317,6 +348,13 @@ ucs_status_t ucs_config_parser_set_value(void *opts, ucs_config_field_t *fields, + const char *name, const char *value); + + /** ++ * Check all UCX_ environment variables have been used so far by the ++ * configuration parser, issue a warning if not. Called just before program exit. ++ */ ++void ucs_config_parser_warn_unused_env_vars(); ++ ++ ++/** + * Translate configuration value of "MEMUNITS" type to actual value. + * + * @param config_size Size specified by configuration. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/types.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/types.h +index 0578740..f1e168e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/types.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/types.h +@@ -95,13 +95,16 @@ typedef enum { + unsigned pad; \ + } + ++ + /* Specific structure for an array of strings */ + #define UCS_CONFIG_STRING_ARRAY_FIELD(_array_name) \ + UCS_CONFIG_ARRAY_FIELD(char*, _array_name) + ++ + typedef UCS_CONFIG_STRING_ARRAY_FIELD(names) ucs_config_names_array_t; + + /** ++ * @ingroup UCS_RESOURCE + * BSD socket address specification. + */ + typedef struct ucs_sock_addr { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/ucm_opts.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/ucm_opts.c +new file mode 100644 +index 0000000..97d48ac +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/ucm_opts.c +@@ -0,0 +1,82 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "parser.h" ++ ++#include ++#include ++#include ++ ++ ++#define UCM_CONFIG_PREFIX "MEM_" ++ ++static const char *ucm_mmap_hook_modes[] = { ++ [UCM_MMAP_HOOK_NONE] = "none", ++ [UCM_MMAP_HOOK_RELOC] = UCM_MMAP_HOOK_RELOC_STR, ++#if UCM_BISTRO_HOOKS ++ [UCM_MMAP_HOOK_BISTRO] = UCM_MMAP_HOOK_BISTRO_STR, ++#endif ++ [UCM_MMAP_HOOK_LAST] = NULL ++}; ++ ++static ucs_config_field_t ucm_global_config_table[] = { ++ {"LOG_LEVEL", "warn", ++ "Logging level for memory events", ucs_offsetof(ucm_global_config_t, log_level), ++ UCS_CONFIG_TYPE_ENUM(ucm_log_level_names)}, ++ ++ {"ALLOC_ALIGN", "16", ++ "Minimal alignment of allocated blocks", ++ ucs_offsetof(ucm_global_config_t, alloc_alignment), UCS_CONFIG_TYPE_MEMUNITS}, ++ ++ {"EVENTS", "yes", ++ "Enable memory events", ++ ucs_offsetof(ucm_global_config_t, enable_events), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"MMAP_HOOK_MODE", UCM_DEFAULT_HOOK_MODE_STR, ++ "MMAP hook mode\n" ++ " none - don't set mmap hooks.\n" ++ " reloc - use ELF relocation table to set hooks.\n" ++#if UCM_BISTRO_HOOKS ++ " bistro - use binary instrumentation to set hooks.\n" ++#endif ++ ,ucs_offsetof(ucm_global_config_t, mmap_hook_mode), UCS_CONFIG_TYPE_ENUM(ucm_mmap_hook_modes)}, ++ ++ {"MALLOC_HOOKS", "yes", ++ "Enable using glibc malloc hooks", ++ ucs_offsetof(ucm_global_config_t, enable_malloc_hooks), ++ UCS_CONFIG_TYPE_BOOL}, ++ ++ {"MALLOC_RELOC", "yes", ++ "Enable installing malloc symbols in the relocation table.\n" ++ "This is unsafe and off by default, because sometimes glibc\n" ++ "calls malloc/free without going through the relocation table,\n" ++ "which would use the original implementation and not ours.", ++ ucs_offsetof(ucm_global_config_t, enable_malloc_reloc), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"CUDA_RELOC", "yes", ++ "Enable installing CUDA symbols in the relocation table", ++ ucs_offsetof(ucm_global_config_t, enable_cuda_reloc), ++ UCS_CONFIG_TYPE_BOOL}, ++ ++ {"DYNAMIC_MMAP_THRESH", "yes", ++ "Enable dynamic mmap threshold: for every released block, the\n" ++ "mmap threshold is adjusted upward to the size of the size of\n" ++ "the block, and trim threshold is adjust to twice the size of\n" ++ "the dynamic mmap threshold.\n" ++ "Note: dynamic mmap threshold is disabled when running on valgrind.", ++ ucs_offsetof(ucm_global_config_t, enable_dynamic_mmap_thresh), ++ UCS_CONFIG_TYPE_BOOL}, ++ ++ {NULL} ++}; ++ ++UCS_CONFIG_REGISTER_TABLE(ucm_global_config_table, "UCM", UCM_CONFIG_PREFIX, ++ ucm_global_config_t) ++ ++UCS_STATIC_INIT { ++ (void)ucs_config_parser_fill_opts(&ucm_global_opts, ucm_global_config_table, ++ NULL, UCM_CONFIG_PREFIX, 0); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.c +index 092af59..88651a3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.c +@@ -15,6 +15,7 @@ + void ucs_arbiter_init(ucs_arbiter_t *arbiter) + { + arbiter->current = NULL; ++ UCS_ARBITER_GUARD_INIT(arbiter); + } + + void ucs_arbiter_group_init(ucs_arbiter_group_t *group) +@@ -96,6 +97,8 @@ void ucs_arbiter_group_schedule_nonempty(ucs_arbiter_t *arbiter, + ucs_arbiter_elem_t *tail = group->tail; + ucs_arbiter_elem_t *current, *head; + ++ UCS_ARBITER_GUARD_CHECK(arbiter); ++ + ucs_assert(tail != NULL); + head = tail->next; + +@@ -164,7 +167,9 @@ void ucs_arbiter_dispatch_nonempty(ucs_arbiter_t *arbiter, unsigned per_group, + + ucs_assert(elem->group == group); + ucs_trace_poll("dispatching arbiter element %p", elem); ++ UCS_ARBITER_GUARD_ENTER(arbiter); + result = cb(arbiter, elem, cb_arg); ++ UCS_ARBITER_GUARD_EXIT(arbiter); + ucs_trace_poll("dispatch result %d", result); + ++group_dispatch_count; + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.h +index bdcc8d5..1c9a23b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.h +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + /* + * A mechanism to arbitrate among groups of queued work elements, which attempts +@@ -92,6 +93,22 @@ typedef enum { + will start from the group that returned STOP */ + } ucs_arbiter_cb_result_t; + ++#if ENABLE_ASSERT ++#define UCS_ARBITER_GUARD int guard ++#define UCS_ARBITER_GUARD_INIT(_arbiter) (_arbiter)->guard = 0 ++#define UCS_ARBITER_GUARD_ENTER(_arbiter) (_arbiter)->guard++ ++#define UCS_ARBITER_GUARD_EXIT(_arbiter) (_arbiter)->guard-- ++#define UCS_ARBITER_GUARD_CHECK(_arbiter) \ ++ ucs_assertv((_arbiter)->guard == 0, \ ++ "scheduling group from the arbiter callback") ++#else ++#define UCS_ARBITER_GUARD ++#define UCS_ARBITER_GUARD_INIT(_arbiter) ++#define UCS_ARBITER_GUARD_ENTER(_arbiter) ++#define UCS_ARBITER_GUARD_EXIT(_arbiter) ++#define UCS_ARBITER_GUARD_CHECK(_arbiter) ++#endif ++ + + /** + * Arbiter callback function. +@@ -112,6 +129,7 @@ typedef ucs_arbiter_cb_result_t (*ucs_arbiter_callback_t)(ucs_arbiter_t *arbiter + */ + struct ucs_arbiter { + ucs_arbiter_elem_t *current; ++ UCS_ARBITER_GUARD; + }; + + +@@ -317,4 +335,13 @@ ucs_arbiter_elem_is_last(ucs_arbiter_group_t *group, ucs_arbiter_elem_t *elem) + return group->tail == elem; + } + ++/** ++ * @return true if element is the only one in the group ++ */ ++static inline int ++ucs_arbiter_elem_is_only(ucs_arbiter_group_t *group, ucs_arbiter_elem_t *elem) ++{ ++ return ucs_arbiter_elem_is_last(group, elem) && (elem->next == elem); ++} ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/callbackq.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/callbackq.h +index 1085dc4..472e4d2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/callbackq.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/callbackq.h +@@ -59,6 +59,7 @@ typedef int (*ucs_callbackq_predicate_t)(const ucs_callbackq_elem_t *elem, + + + /** ++ * @ingroup UCS_RESOURCE + * Callback flags + */ + enum ucs_callbackq_flags { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/khash.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/khash.h +index dcc9237..a9d7dc6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/khash.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/khash.h +@@ -379,6 +379,12 @@ static const double __ac_HASH_UPPER = 0.77; + #define KHASH_INIT(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ + KHASH_INIT2(name, static kh_inline klib_unused, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) + ++#define KHASH_TYPE(name, khkey_t, khval_t) \ ++ __KHASH_TYPE(name, khkey_t, khval_t) ++ ++#define KHASH_IMPL(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ ++ __KHASH_IMPL(name, static kh_inline klib_unused, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) ++ + /* --- BEGIN OF HASH FUNCTIONS --- */ + + /*! @function +@@ -592,6 +598,19 @@ static kh_inline khint_t __ac_Wang_hash(khint_t key) + } } + + /*! @function ++ @abstract Iterate over the keys in the hash table ++ @param h Pointer to the hash table [khash_t(name)*] ++ @param kvar Variable to which key will be assigned ++ @param code Block of code to execute ++ */ ++#define kh_foreach_key(h, kvar, code) { khint_t __i; \ ++ for (__i = kh_begin(h); __i != kh_end(h); ++__i) { \ ++ if (!kh_exist(h,__i)) continue; \ ++ (kvar) = kh_key(h,__i); \ ++ code; \ ++ } } ++ ++/*! @function + @abstract Iterate over the values in the hash table + @param h Pointer to the hash table [khash_t(name)*] + @param vvar Variable to which value will be assigned +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/mpool.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/mpool.c +index fcb0616..21b72b9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/mpool.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/mpool.c +@@ -172,8 +172,8 @@ void ucs_mpool_grow(ucs_mpool_t *mp, unsigned num_elems) + (num_elems * ucs_mpool_elem_total_size(data)); + status = data->ops->chunk_alloc(mp, &chunk_size, &ptr); + if (status != UCS_OK) { +- ucs_error("Failed to allocate memory pool chunk: %s", +- ucs_status_string(status)); ++ ucs_error("Failed to allocate memory pool (name=%s) chunk: %s", ++ ucs_mpool_name(mp), ucs_status_string(status)); + return; + } + +@@ -182,8 +182,8 @@ void ucs_mpool_grow(ucs_mpool_t *mp, unsigned num_elems) + chunk_padding = ucs_padding((uintptr_t)(chunk + 1) + data->align_offset, + data->alignment); + chunk->elems = (void*)(chunk + 1) + chunk_padding; +- chunk->num_elems = (chunk_size - chunk_padding - sizeof(*chunk)) / +- ucs_mpool_elem_total_size(data); ++ chunk->num_elems = ucs_min(data->quota, (chunk_size - chunk_padding - sizeof(*chunk)) / ++ ucs_mpool_elem_total_size(data)); + + ucs_debug("mpool %s: allocated chunk %p of %lu bytes with %u elements", + ucs_mpool_name(mp), chunk, chunk_size, chunk->num_elems); +@@ -285,7 +285,7 @@ ucs_status_t ucs_mpool_hugetlb_malloc(ucs_mpool_t *mp, size_t *size_p, void **ch + /* First, try hugetlb */ + real_size = *size_p; + status = ucs_sysv_alloc(&real_size, real_size * 2, (void**)&ptr, SHM_HUGETLB, +- &shmid UCS_MEMTRACK_NAME(ucs_mpool_name(mp))); ++ ucs_mpool_name(mp), &shmid); + if (status == UCS_OK) { + chunk = ptr; + chunk->hugetlb = 1; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/pgtable.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/pgtable.c +index a71dbfd..1ee0d48 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/pgtable.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/pgtable.c +@@ -287,7 +287,10 @@ ucs_pgtable_insert_page(ucs_pgtable_t *pgtable, ucs_pgt_addr_t address, + ++pgd->count; + break; + } else { +- ucs_assert(!ucs_pgt_entry_test(pte, UCS_PGT_ENTRY_FLAG_REGION)); ++ if (ucs_pgt_entry_test(pte, UCS_PGT_ENTRY_FLAG_REGION)) { ++ goto err; ++ } ++ + ucs_assertv(shift >= UCS_PGT_ENTRY_SHIFT + order, + "shift=%u order=%u", shift, order); /* sub PTE should be able to hold it */ + +@@ -549,6 +552,15 @@ void ucs_pgtable_search_range(const ucs_pgtable_t *pgtable, + ucs_pgt_region_t *last; + unsigned order = 0; + ++ /* if the page table is covering only part of the address space, intersect ++ * the range with page table address span */ ++ if (pgtable->shift < (sizeof(uint64_t) * 8)) { ++ address = ucs_max(address, pgtable->base); ++ end = ucs_min(end, pgtable->base + UCS_BIT(pgtable->shift)); ++ } else { ++ ucs_assert(pgtable->base == 0); ++ } ++ + last = NULL; + while ((address <= to) && (order != UCS_PGT_ADDR_ORDER)) { + order = ucs_pgtable_get_next_page_order(address, end); +@@ -575,6 +587,7 @@ void ucs_pgtable_purge(ucs_pgtable_t *pgtable, ucs_pgt_search_callback_t cb, + unsigned num_regions = pgtable->num_regions; + ucs_pgt_region_t **all_regions, **next_region, *region; + ucs_pgt_addr_t from, to; ++ ucs_status_t status; + unsigned i; + + all_regions = ucs_calloc(num_regions, sizeof(*all_regions), +@@ -595,7 +608,11 @@ void ucs_pgtable_purge(ucs_pgtable_t *pgtable, ucs_pgt_search_callback_t cb, + + for (i = 0; i < num_regions; ++i) { + region = all_regions[i]; +- ucs_pgtable_remove(pgtable, region); ++ status = ucs_pgtable_remove(pgtable, region); ++ if (status != UCS_OK) { ++ ucs_warn("failed to remove pgtable region" UCS_PGT_REGION_FMT, ++ UCS_PGT_REGION_ARG(region)); ++ } + cb(pgtable, region, arg); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/queue.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/queue.h +index 7a9402f..5c1860d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/queue.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/queue.h +@@ -196,7 +196,7 @@ static inline void ucs_queue_splice(ucs_queue_head_t *queue, + #define ucs_queue_for_each(elem, queue, member) \ + for (*(queue)->ptail = NULL, \ + elem = ucs_container_of((queue)->head, typeof(*elem), member); \ +- &elem->member != NULL; \ ++ (elem) != ucs_container_of(NULL, typeof(*elem), member); \ + elem = ucs_container_of(elem->member.next, typeof(*elem), member)) + + /** +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.c +new file mode 100644 +index 0000000..b8cb08c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.c +@@ -0,0 +1,180 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#include "strided_alloc.h" ++#include "queue.h" ++ ++#include ++#include ++#include ++#include ++ ++ ++#define ucs_strided_alloc_chunk_to_mem(_chunk) \ ++ UCS_PTR_BYTE_OFFSET(_chunk, + sizeof(ucs_strided_alloc_chunk_t) \ ++ - UCS_STRIDED_ALLOC_STRIDE) ++ ++#define ucs_strided_alloc_mem_to_chunk(_mem) \ ++ UCS_PTR_BYTE_OFFSET(_mem, - sizeof(ucs_strided_alloc_chunk_t) \ ++ + UCS_STRIDED_ALLOC_STRIDE) ++ ++typedef struct ucs_splitalloc_chunk { ++ ucs_queue_elem_t queue; ++} ucs_strided_alloc_chunk_t; ++ ++struct ucs_strided_alloc_elem { ++ ucs_strided_alloc_elem_t *next; ++}; ++ ++static ucs_strided_alloc_chunk_t * ++ucs_strided_alloc_chunk_alloc(ucs_strided_alloc_t *sa, size_t chunk_size ++ UCS_MEMTRACK_ARG) ++{ ++ ucs_status_t status; ++ size_t size; ++ void *ptr; ++ ++ size = chunk_size; ++ ptr = NULL; ++ status = ucs_mmap_alloc(&size, &ptr, 0 UCS_MEMTRACK_VAL); ++ if (status != UCS_OK) { ++ ucs_error("failed to allocate a chunk of %zu bytes", chunk_size); ++ return NULL; ++ } ++ ++ return ucs_strided_alloc_mem_to_chunk(ptr); ++} ++ ++static void ucs_strided_alloc_chunk_free(ucs_strided_alloc_t *sa, ++ ucs_strided_alloc_chunk_t *chunk, ++ size_t chunk_size) ++{ ++ /* coverity[offset_free] */ ++ ucs_mmap_free(ucs_strided_alloc_chunk_to_mem(chunk), chunk_size); ++} ++ ++static void ucs_strided_alloc_push_to_freelist(ucs_strided_alloc_t *sa, ++ ucs_strided_alloc_elem_t *elem) ++{ ++ elem->next = sa->freelist; ++ sa->freelist = elem; ++} ++ ++static void ucs_strided_alloc_calc(ucs_strided_alloc_t *sa, size_t *chunk_size, ++ size_t *elems_per_chunk) ++{ ++ *chunk_size = ucs_align_up_pow2(UCS_STRIDED_ALLOC_STRIDE * sa->stride_count, ++ ucs_get_page_size()); ++ *elems_per_chunk = (UCS_STRIDED_ALLOC_STRIDE - ++ sizeof(ucs_strided_alloc_chunk_t)) / sa->elem_size; ++} ++ ++static void ucs_strided_alloc_grow(ucs_strided_alloc_t *sa UCS_MEMTRACK_ARG) ++{ ++ size_t chunk_size, elems_per_chunk; ++ ucs_strided_alloc_chunk_t *chunk; ++ ucs_strided_alloc_elem_t *elem; ++ void *chunk_mem; ++ ssize_t i; ++ ++ ucs_strided_alloc_calc(sa, &chunk_size, &elems_per_chunk); ++ ++ chunk = ucs_strided_alloc_chunk_alloc(sa, chunk_size UCS_MEMTRACK_VAL); ++ if (chunk == NULL) { ++ return; ++ } ++ ++ chunk_mem = ucs_strided_alloc_chunk_to_mem(chunk); ++ for (i = elems_per_chunk - 1; i >= 0; --i) { ++ elem = chunk_mem + (i * sa->elem_size); ++ ucs_strided_alloc_push_to_freelist(sa, elem); ++ } ++ ++ ucs_queue_push(&sa->chunks, &chunk->queue); ++ ++ VALGRIND_MAKE_MEM_NOACCESS(chunk_mem, chunk_size); ++} ++ ++void ucs_strided_alloc_init(ucs_strided_alloc_t *sa, size_t elem_size, ++ unsigned stride_count) ++{ ++ ucs_assert(elem_size >= sizeof(ucs_strided_alloc_elem_t)); ++ ucs_assert(elem_size <= (UCS_STRIDED_ALLOC_STRIDE - ++ sizeof(ucs_strided_alloc_chunk_t))); ++ ucs_assert(stride_count >= 1); ++ ++ ucs_queue_head_init(&sa->chunks); ++ ++ sa->freelist = NULL; ++ sa->elem_size = elem_size; ++ sa->stride_count = stride_count; ++ sa->inuse_count = 0; ++ VALGRIND_CREATE_MEMPOOL(sa, 0, 0); ++} ++ ++void ucs_strided_alloc_cleanup(ucs_strided_alloc_t *sa) ++{ ++ size_t chunk_size, elems_per_chunk; ++ ucs_strided_alloc_chunk_t *chunk; ++ ++ VALGRIND_DESTROY_MEMPOOL(sa); ++ ++ ucs_strided_alloc_calc(sa, &chunk_size, &elems_per_chunk); ++ ++ while (!ucs_queue_is_empty(&sa->chunks)) { ++ chunk = ucs_queue_head_elem_non_empty(&sa->chunks, ucs_strided_alloc_chunk_t, ++ queue); ++ VALGRIND_MAKE_MEM_DEFINED(chunk, sizeof(*chunk)); ++ ucs_queue_pull_non_empty(&sa->chunks); ++ ucs_strided_alloc_chunk_free(sa, chunk, chunk_size); ++ } ++} ++ ++void* ucs_strided_alloc_get(ucs_strided_alloc_t *sa, const char *alloc_name) ++{ ++ ucs_strided_alloc_elem_t *elem; ++ unsigned i; ++ ++ if (sa->freelist == NULL) { ++ ucs_strided_alloc_grow(sa UCS_MEMTRACK_VAL); ++ } ++ ++ ucs_assert(sa->freelist != NULL); ++ ++ elem = sa->freelist; ++ VALGRIND_MAKE_MEM_DEFINED(elem, sizeof(*elem)); ++ sa->freelist = elem->next; ++ VALGRIND_MAKE_MEM_NOACCESS(elem, sizeof(*elem)); ++ ++ for (i = 0; i < sa->stride_count; ++i) { ++ VALGRIND_MEMPOOL_ALLOC(sa, ucs_strided_elem_get(elem, 0, i), ++ sa->elem_size); ++ } ++ ++ ++sa->inuse_count; ++ ++ return elem; ++} ++ ++void ucs_strided_alloc_put(ucs_strided_alloc_t *sa, void *base) ++{ ++ ucs_strided_alloc_elem_t *elem = base; ++ unsigned i; ++ ++ ucs_assert(sa->inuse_count > 0); ++ ++ ucs_strided_alloc_push_to_freelist(sa, elem); ++ ++ for (i = 0; i < sa->stride_count; ++i) { ++ VALGRIND_MEMPOOL_FREE(sa, ucs_strided_elem_get(elem, 0, i)); ++ } ++ ++ --sa->inuse_count; ++} ++ ++unsigned ucs_strided_alloc_inuse_count(ucs_strided_alloc_t *sa) ++{ ++ return sa->inuse_count; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.h +new file mode 100644 +index 0000000..2598ba8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.h +@@ -0,0 +1,134 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCS_STRIDED_ALLOC_H_ ++#define UCS_STRIDED_ALLOC_H_ ++ ++#include "queue_types.h" ++ ++#include ++#include ++#include ++#include ++ ++ ++BEGIN_C_DECLS ++ ++ ++/* the distance between allocated elements */ ++#define UCS_STRIDED_ALLOC_STRIDE (128 * UCS_KBYTE) ++ ++ ++/** ++ * Get a pointer to another element in the strided object ++ * ++ * Example with stride_count=3: ++ * ++ * chunk ++ * start -+ ++ * | ++ * | ++ * | <-- 128 kB --> . <-- 128 kB --> . ++ * | . . ++ * \/ . . ++ * +--------+-- ... --+--------+-- ... --+--------+ ++ * | stride | | stride | | stride | ++ * obj0: | elem 0 | | elem 1 | | elem 2 | ++ * | (base) | | | | | ++ * +--------+-- ... --+--------+-- ... --+--------+ ++ * +--------+-- ... --+--------+-- ... --+--------+ ++ * | stride | | stride | | stride | ++ * obj1: | elem 0 | | elem 1 | | elem 2 | ++ * | (base) | | | | | ++ * +--------+-- ... -+--------+-- ... --+--------+ ++ * +--------+-- ... --+--------+-- ... --+--------+ ++ * | stride | | stride | | stride | ++ * obj2: | elem 0 | | elem 1 | | elem 2 | ++ * | (base) | | | | | ++ * +--------+-- ... -+--------+-- ... --+--------+ ++ * ++ * ... ++ * ++ * @param _elem Pointer to the current element ++ * @param _stride_idx Stride index of the current element ++ * @param _wanted_idx Stride index of the desired element ++ * ++ * @return Pointer to the desired element ++ */ ++#define ucs_strided_elem_get(_elem, _stride_idx, _wanted_idx) \ ++ UCS_PTR_BYTE_OFFSET(_elem, UCS_STRIDED_ALLOC_STRIDE * \ ++ ((ptrdiff_t)(_wanted_idx) - (ptrdiff_t)(_stride_idx))) ++ ++ ++/* Forward declaration, used internally */ ++typedef struct ucs_strided_alloc_elem ucs_strided_alloc_elem_t; ++ ++ ++/** ++ * Strided allocator - allows allocating objects which are split to several ++ * memory areas with a constant stride (gap) in-between. ++ * This improves the cache locality when the first memory area is used mostly. ++ */ ++typedef struct ucs_strided_alloc { ++ ucs_strided_alloc_elem_t *freelist; /* LIFO of free elements */ ++ ucs_queue_head_t chunks; /* Queue of allocated chunks */ ++ size_t elem_size; /* Size of a single memory area */ ++ unsigned stride_count; /* Number of strides */ ++ unsigned inuse_count; /* Number of allocated elements */ ++} ucs_strided_alloc_t; ++ ++ ++/** ++ * Initialize the split allocator context ++ * ++ * @param [in] sa Strided allocator structure to initialize ++ * @param [in] elem_size Size of a single stride element ++ * @param [in] stride_count How many memory strides per object ++ */ ++void ucs_strided_alloc_init(ucs_strided_alloc_t *sa, size_t elem_size, ++ unsigned stride_count); ++ ++ ++/** ++ * Cleanup the split allocator context ++ * ++ * @param [in] sa Strided allocator structure to cleanup ++ */ ++void ucs_strided_alloc_cleanup(ucs_strided_alloc_t *sa); ++ ++ ++/** ++ * Allocate an object ++ * ++ * @param [in] sa Strided allocator to allocate on ++ * @param [in] alloc_name Debug name of the allocation ++ * ++ * @return Pointer to the first stride of the allocated object. ++ */ ++void* ucs_strided_alloc_get(ucs_strided_alloc_t *sa, const char *alloc_name); ++ ++ ++/** ++ * Release an object ++ * ++ * @param [in] sa Strided allocator to release the object to ++ * @param [in] base Pointer to the first stride of the object to release ++ */ ++void ucs_strided_alloc_put(ucs_strided_alloc_t *sa, void *base); ++ ++ ++/** ++ * Get the number of currently allocated objects ++ * ++ * @param [in] sa Strided allocator to get the information for ++* ++ * @return Number of currently allocated objects ++ */ ++unsigned ucs_strided_alloc_inuse_count(ucs_strided_alloc_t *sa); ++ ++ ++END_C_DECLS ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/assert.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/assert.c +index 43a1f33..fbc0f82 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/assert.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/assert.c +@@ -28,12 +28,9 @@ void ucs_fatal_error(const char *error_type, const char *file, unsigned line, + vsnprintf(buffer, buffer_size, format, ap); + va_end(ap); + +- ucs_debug_cleanup(); +- ucs_log_flush(); +- + short_file = strrchr(file, '/'); + short_file = (short_file == NULL) ? file : short_file + 1; +- ucs_handle_error(error_type, "%13s:%-4u %s", short_file, line, buffer); ++ ucs_handle_error(error_type, "%13s:%-4u UCX %s", short_file, line, buffer); + + abort(); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/debug.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/debug.c +index 421672d..e458113 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/debug.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/debug.c +@@ -10,11 +10,12 @@ + + #include "debug.h" + #include "log.h" +-#include "profile.h" + + #include ++#include + #include + #include ++#include + #include + #include + #include +@@ -891,6 +892,7 @@ static const char *ucs_signal_cause_segv(int si_code) + static const char *ucs_signal_cause_bus(int si_code) + { + switch (si_code) { ++ case BUS_ADRALN : return "invalid address alignment"; + case BUS_ADRERR : return "nonexistent physical address"; + case BUS_OBJERR : return "object-specific hardware error"; + default : return ucs_signal_cause_common(si_code); +@@ -975,6 +977,9 @@ void ucs_handle_error(const char *error_type, const char *message, ...) + char *buffer; + va_list ap; + ++ ucs_debug_cleanup(); ++ ucs_log_flush(); ++ + buffer = ucs_alloca(buffer_size + 1); + va_start(ap, message); + vsnprintf(buffer, buffer_size, message, ap); +@@ -1134,6 +1139,7 @@ static int ucs_debug_backtrace_is_excluded(void *address, const char *symbol) + !strcmp(symbol, "ucs_debug_show_innermost_source_file") || + !strcmp(symbol, "ucs_log_default_handler") || + !strcmp(symbol, "__ucs_abort") || ++ !strcmp(symbol, "ucs_log_dispatch") || + !strcmp(symbol, "__ucs_log") || + !strcmp(symbol, "ucs_debug_send_mail") || + (strstr(symbol, "_L_unlock_") == symbol) || +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.c +index d4a39f6..2bb00ea 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.c +@@ -32,7 +32,7 @@ const char *ucs_log_level_names[] = { + [UCS_LOG_LEVEL_PRINT] = "PRINT" + }; + +-static unsigned ucs_log_num_handlers = 0; ++static unsigned ucs_log_handlers_count = 0; + static ucs_log_func_t ucs_log_handlers[UCS_MAX_LOG_HANDLERS]; + static int ucs_log_initialized = 0; + static char ucs_log_hostname[256] = {0}; +@@ -100,7 +100,7 @@ ucs_log_default_handler(const char *file, unsigned line, const char *function, + return UCS_LOG_FUNC_RC_CONTINUE; + } + +- buf = ucs_alloca(buffer_size + 1); ++ buf = ucs_alloca(buffer_size + 1); + buf[buffer_size] = 0; + + vsnprintf(buf, buffer_size, format, ap); +@@ -141,18 +141,23 @@ ucs_log_default_handler(const char *file, unsigned line, const char *function, + + void ucs_log_push_handler(ucs_log_func_t handler) + { +- if (ucs_log_num_handlers < UCS_MAX_LOG_HANDLERS) { +- ucs_log_handlers[ucs_log_num_handlers++] = handler; ++ if (ucs_log_handlers_count < UCS_MAX_LOG_HANDLERS) { ++ ucs_log_handlers[ucs_log_handlers_count++] = handler; + } + } + + void ucs_log_pop_handler() + { +- if (ucs_log_num_handlers > 0) { +- --ucs_log_num_handlers; ++ if (ucs_log_handlers_count > 0) { ++ --ucs_log_handlers_count; + } + } + ++unsigned ucs_log_num_handlers() ++{ ++ return ucs_log_handlers_count; ++} ++ + void ucs_log_dispatch(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *format, ...) + { +@@ -162,7 +167,7 @@ void ucs_log_dispatch(const char *file, unsigned line, const char *function, + + /* Call handlers in reverse order */ + rc = UCS_LOG_FUNC_RC_CONTINUE; +- index = ucs_log_num_handlers; ++ index = ucs_log_handlers_count; + while ((index > 0) && (rc == UCS_LOG_FUNC_RC_CONTINUE)) { + --index; + va_start(ap, format); +@@ -331,7 +336,7 @@ void ucs_log_cleanup() + if (ucs_log_file_close) { + fclose(ucs_log_file); + } +- ucs_log_file = NULL; +- ucs_log_initialized = 0; +- ucs_log_num_handlers = 0; ++ ucs_log_file = NULL; ++ ucs_log_initialized = 0; ++ ucs_log_handlers_count = 0; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.h +index 4c6e724..ba5be3a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.h +@@ -148,6 +148,7 @@ const char *ucs_log_dump_hex(const void* data, size_t length, char *buf, + */ + void ucs_log_push_handler(ucs_log_func_t handler); + void ucs_log_pop_handler(); ++unsigned ucs_log_num_handlers(); + + END_C_DECLS + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.c +index c947a94..0fb4699 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.c +@@ -6,42 +6,34 @@ + + #include "memtrack.h" + +-#include +-#include +-#include +- ++#include + #include + #include +-#include +-#include +-#include +-#include +-#include +-#include +-#include + #include ++#include ++#include ++#include + + + #if ENABLE_MEMTRACK + +-#define UCS_MEMTRACK_MAGIC 0x1ee7beefa880feedULL +-#define UCS_MEMTRACK_FORMAT_STRING ("%22s: size: %9lu / %9lu\tcount: %9lu / %9lu\n") +-#define UCS_MEMTRACK_ENTRY_HASH_SIZE 127 ++#define UCS_MEMTRACK_FORMAT_STRING ("%22s: size: %9lu / %9lu\tcount: %9u / %9u\n") + + +-typedef struct ucs_memtrack_buffer { +- uint64_t magic; /* Make sure this buffer is "memtracked" */ +- size_t size; /* length of user-requested buffer */ +- off_t offset; /* Offset between result of memory allocation and the +- location of this buffer struct (mainly for ucs_memalign) */ +- ucs_memtrack_entry_t *entry; /* Entry which tracks this allocation */ +-} ucs_memtrack_buffer_t; ++typedef struct ucs_memtrack_ptr { ++ size_t size; /* Length of allocated buffer */ ++ ucs_memtrack_entry_t *entry; /* Entry which tracks this allocation */ ++} ucs_memtrack_ptr_t; + ++KHASH_MAP_INIT_INT64(ucs_memtrack_ptr_hash, ucs_memtrack_ptr_t) ++KHASH_MAP_INIT_STR(ucs_memtrack_entry_hash, ucs_memtrack_entry_t*); + + typedef struct ucs_memtrack_context { +- int enabled; +- pthread_mutex_t lock; +- ucs_memtrack_entry_t *entries[UCS_MEMTRACK_ENTRY_HASH_SIZE]; ++ int enabled; ++ pthread_mutex_t lock; ++ ucs_memtrack_entry_t total; ++ khash_t(ucs_memtrack_ptr_hash) ptrs; ++ khash_t(ucs_memtrack_entry_hash) entries; + UCS_STATS_NODE_DECLARE(stats); + } ucs_memtrack_context_t; + +@@ -49,14 +41,10 @@ typedef struct ucs_memtrack_context { + /* Global context for tracking allocated memory */ + static ucs_memtrack_context_t ucs_memtrack_context = { + .enabled = 0, +- .lock = PTHREAD_MUTEX_INITIALIZER ++ .lock = PTHREAD_MUTEX_INITIALIZER, ++ .total = {0} + }; + +-SGLIB_DEFINE_LIST_PROTOTYPES(ucs_memtrack_entry_t, ucs_memtrack_entry_compare, next) +-SGLIB_DEFINE_HASHED_CONTAINER_PROTOTYPES(ucs_memtrack_entry_t, +- UCS_MEMTRACK_ENTRY_HASH_SIZE, +- ucs_memtrack_entry_hash) +- + #if ENABLE_STATS + static ucs_stats_class_t ucs_memtrack_stats_class = { + .name = "memtrack", +@@ -68,299 +56,177 @@ static ucs_stats_class_t ucs_memtrack_stats_class = { + }; + #endif + ++static void ucs_memtrack_entry_reset(ucs_memtrack_entry_t *entry) ++{ ++ entry->size = 0; ++ entry->peak_size = 0; ++ entry->count = 0; ++ entry->peak_count = 0; ++} + +-static inline ucs_memtrack_entry_t* ucs_memtrack_entry_new(const char* name) ++static ucs_memtrack_entry_t* ucs_memtrack_entry_get(const char* name) + { + ucs_memtrack_entry_t *entry; ++ khiter_t iter; ++ int ret; + +- entry = malloc(sizeof(*entry)); ++ iter = kh_get(ucs_memtrack_entry_hash, &ucs_memtrack_context.entries, name); ++ if (iter != kh_end(&ucs_memtrack_context.entries)) { ++ return kh_val(&ucs_memtrack_context.entries, iter); ++ } ++ ++ entry = malloc(sizeof(*entry) + strlen(name) + 1); + if (entry == NULL) { + return NULL; + } + +- entry->size = 0; +- entry->peak_size = 0; +- entry->count = 0; +- entry->peak_count = 0; +- ucs_snprintf_zero(entry->name, UCS_MEMTRACK_NAME_MAX, "%s", name); +- sglib_hashed_ucs_memtrack_entry_t_add(ucs_memtrack_context.entries, entry); ++ ucs_memtrack_entry_reset(entry); ++ strcpy(entry->name, name); ++ ++ iter = kh_put(ucs_memtrack_entry_hash, &ucs_memtrack_context.entries, ++ entry->name, &ret); ++ ucs_assertv(ret == 1 || ret == 2, "ret=%d", ret); ++ kh_val(&ucs_memtrack_context.entries, iter) = entry; ++ + return entry; + } + +-static void ucs_memtrack_record_alloc(ucs_memtrack_buffer_t* buffer, size_t size, +- off_t offset, const char *name) ++static void ucs_memtrack_entry_update(ucs_memtrack_entry_t *entry, ssize_t size) + { +- ucs_memtrack_entry_t *entry, search; +- if (!ucs_memtrack_is_enabled()) { +- goto out; +- } ++ int count = (size < 0) ? -1 : 1; ++ ++ ucs_assert((int)entry->count >= -count); ++ ucs_assert((ssize_t)entry->size >= -size); ++ entry->count += count; ++ entry->size += size; ++ entry->peak_count = ucs_max(entry->peak_count, entry->count); ++ entry->peak_size = ucs_max(entry->peak_size, entry->size); ++} + +- if (strlen(name) >= UCS_MEMTRACK_NAME_MAX - 1) { +- ucs_fatal("memory allocation name too long: '%s' (len: %ld, max: %d)", +- name, strlen(name), UCS_MEMTRACK_NAME_MAX - 1); ++void ucs_memtrack_allocated(void *ptr, size_t size, const char *name) ++{ ++ ucs_memtrack_entry_t *entry; ++ khiter_t iter; ++ int ret; ++ ++ if ((ptr == NULL) || !ucs_memtrack_is_enabled()) { ++ return; + } + +- ucs_assert(buffer != NULL); +- ucs_assert(ucs_memtrack_context.entries != NULL); // context initialized + pthread_mutex_lock(&ucs_memtrack_context.lock); + +- ucs_snprintf_zero(search.name, UCS_MEMTRACK_NAME_MAX, "%s", name); +- entry = sglib_hashed_ucs_memtrack_entry_t_find_member(ucs_memtrack_context.entries, +- &search); ++ entry = ucs_memtrack_entry_get(name); + if (entry == NULL) { +- entry = ucs_memtrack_entry_new(name); +- if (entry == NULL) { +- goto out_unlock; +- } ++ goto out_unlock; + } + +- ucs_assert(!strcmp(name, entry->name)); +- buffer->magic = UCS_MEMTRACK_MAGIC; +- buffer->size = size; +- buffer->offset = offset; +- buffer->entry = entry; +- VALGRIND_MAKE_MEM_NOACCESS(buffer, sizeof(*buffer)); ++ /* Add pointer to hash */ ++ iter = kh_put(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs, ++ (uintptr_t)ptr, &ret); ++ ucs_assertv(ret == 1 || ret == 2, "ret=%d", ret); ++ kh_value(&ucs_memtrack_context.ptrs, iter).entry = entry; ++ kh_value(&ucs_memtrack_context.ptrs, iter).size = size; + +- /* Update total count */ +- entry->count++; +- UCS_STATS_UPDATE_COUNTER(ucs_memtrack_context.stats, UCS_MEMTRACK_STAT_ALLOCATION_COUNT, 1); +- entry->peak_count = ucs_max(entry->peak_count, entry->count); ++ /* update specific and global entries */ ++ ucs_memtrack_entry_update(entry, size); ++ ucs_memtrack_entry_update(&ucs_memtrack_context.total, size); + +- /* Update total size */ +- entry->size += size; ++ UCS_STATS_UPDATE_COUNTER(ucs_memtrack_context.stats, UCS_MEMTRACK_STAT_ALLOCATION_COUNT, 1); + UCS_STATS_UPDATE_COUNTER(ucs_memtrack_context.stats, UCS_MEMTRACK_STAT_ALLOCATION_SIZE, size); +- entry->peak_size = ucs_max(entry->peak_size, entry->size); + + out_unlock: + pthread_mutex_unlock(&ucs_memtrack_context.lock); +-out: +- UCS_EMPTY_STATEMENT; + } + +-static ucs_memtrack_entry_t* +-ucs_memtrack_record_release(ucs_memtrack_buffer_t *buffer, size_t size) ++void ucs_memtrack_releasing(void* ptr) + { + ucs_memtrack_entry_t *entry; ++ khiter_t iter; ++ size_t size; + +- if (!ucs_memtrack_is_enabled()) { +- return NULL; ++ if ((ptr == NULL) || !ucs_memtrack_is_enabled()) { ++ return; + } + + pthread_mutex_lock(&ucs_memtrack_context.lock); +- VALGRIND_MAKE_MEM_DEFINED(buffer, sizeof(*buffer)); + +- ucs_assert_always(buffer->magic == UCS_MEMTRACK_MAGIC); +- buffer->magic = UCS_MEMTRACK_MAGIC + 1; /* protect from double free */ +- if (size != 0) { +- ucs_assert(buffer->size == size); ++ iter = kh_get(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs, (uintptr_t)ptr); ++ if (iter == kh_end(&ucs_memtrack_context.ptrs)) { ++ ucs_debug("address %p not found in memtrack ptr hash", ptr); ++ goto out_unlock; + } + +- entry = buffer->entry; +- +- /* Update total count */ +- ucs_assert(entry->count >= 1); +- --entry->count; ++ /* remote pointer from hash */ ++ entry = kh_val(&ucs_memtrack_context.ptrs, iter).entry; ++ size = kh_val(&ucs_memtrack_context.ptrs, iter).size; ++ kh_del(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs, iter); + +- /* Update total size */ +- ucs_assert(entry->size >= buffer->size); +- entry->size -= buffer->size; ++ /* update counts */ ++ ucs_memtrack_entry_update(entry, -size); ++ ucs_memtrack_entry_update(&ucs_memtrack_context.total, -size); + ++out_unlock: + pthread_mutex_unlock(&ucs_memtrack_context.lock); +- return entry; + } + + void *ucs_malloc(size_t size, const char *name) + { +- ucs_memtrack_buffer_t *buffer; +- +- buffer = malloc(size + (ucs_memtrack_is_enabled() ? sizeof(*buffer) : 0)); +- if ((buffer == NULL) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- ucs_memtrack_record_alloc(buffer, size, 0, name); +- return buffer + 1; ++ void *ptr = malloc(size); ++ ucs_memtrack_allocated(ptr, size, name); ++ return ptr; + } + + void *ucs_calloc(size_t nmemb, size_t size, const char *name) + { +- ucs_memtrack_buffer_t *buffer; +- +- buffer = calloc(1, nmemb * size + (ucs_memtrack_is_enabled() ? sizeof(*buffer) : 0)); +- if ((buffer == NULL) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- ucs_memtrack_record_alloc(buffer, nmemb * size, 0, name); +- return buffer + 1; ++ void *ptr = calloc(nmemb, size); ++ ucs_memtrack_allocated(ptr, nmemb * size, name); ++ return ptr; + } + + void *ucs_realloc(void *ptr, size_t size, const char *name) + { +- ucs_memtrack_buffer_t *buffer = (ucs_memtrack_buffer_t*)ptr - 1; +- ucs_memtrack_entry_t *entry; +- +- if (!ucs_memtrack_is_enabled()) { +- return realloc(ptr, size); +- } +- +- if (ptr == NULL) { +- return ucs_malloc(size, name); +- } +- +- entry = ucs_memtrack_record_release(buffer, 0); +- +- buffer = realloc((void*)buffer - buffer->offset, size + sizeof(*buffer)); +- if (buffer == NULL) { +- return NULL; +- } +- +- ucs_memtrack_record_alloc(buffer, size, 0, entry->name); +- return buffer + 1; ++ ucs_memtrack_releasing(ptr); ++ ptr = realloc(ptr, size); ++ ucs_memtrack_allocated(ptr, size, name); ++ return ptr; + } + + void *ucs_memalign(size_t boundary, size_t size, const char *name) + { +- ucs_memtrack_buffer_t *buffer; +- off_t offset; +- +- if (!ucs_memtrack_is_enabled()) { +- return memalign(boundary, size); +- } +- +- if (boundary > sizeof(*buffer)) { +- buffer = memalign(boundary, size + boundary); +- offset = boundary - sizeof(*buffer); +- } else { +- if (sizeof(*buffer) % boundary != 0) { +- offset = boundary - (sizeof(*buffer) % boundary); +- } else { +- offset = 0; +- } +- buffer = memalign(boundary, size + sizeof(*buffer) + offset); +- } +- if ((buffer == NULL) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- buffer = (void*)buffer + offset; +- ucs_memtrack_record_alloc(buffer, size, offset, name); +- return buffer + 1; ++ void *ptr = memalign(boundary, size); ++ ucs_memtrack_allocated(ptr, size, name); ++ return ptr; + } + + void ucs_free(void *ptr) + { +- ucs_memtrack_buffer_t *buffer; +- +- if ((ptr == NULL) || !ucs_memtrack_is_enabled()) { +- free(ptr); +- return; +- } +- +- buffer = (ucs_memtrack_buffer_t*)ptr - 1; +- ucs_memtrack_record_release(buffer, 0); +- free((void*)buffer - buffer->offset); ++ ucs_memtrack_releasing(ptr); ++ free(ptr); + } + + void *ucs_mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset, const char *name) + { +- ucs_memtrack_buffer_t *buffer; +- +- if (ucs_memtrack_is_enabled() && +- ((flags & MAP_FIXED) || !(prot & PROT_WRITE))) { +- return MAP_FAILED; ++ void *ptr = mmap(addr, length, prot, flags, fd, offset); ++ if (ptr != MAP_FAILED) { ++ ucs_memtrack_allocated(ptr, length, name); + } +- +- buffer = mmap(addr, length + (ucs_memtrack_is_enabled() ? sizeof(*buffer) : 0), +- prot, flags, fd, offset); +- if ((buffer == MAP_FAILED) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- if (fd > 0) { +- memmove(buffer + 1, buffer, length); +- } +- +- ucs_memtrack_record_alloc(buffer, length, 0, name); +- return buffer + 1; +-} +- +-#ifdef __USE_LARGEFILE64 +-void *ucs_mmap64(void *addr, size_t size, int prot, int flags, int fd, +- off64_t offset, const char *name) +-{ +- ucs_memtrack_buffer_t *buffer; +- +- if ((flags & MAP_FIXED) || !(prot & PROT_WRITE)) { +- return NULL; +- } +- +- buffer = mmap64(addr, size + (ucs_memtrack_is_enabled() ? sizeof(*buffer) : 0), +- prot, flags, fd, offset); +- if ((buffer == MAP_FAILED) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- if (fd > 0) { +- memmove(buffer + 1, buffer, size); +- } +- +- ucs_memtrack_record_alloc(buffer, size, 0, name); +- return buffer + 1; ++ return ptr; + } +-#endif + + int ucs_munmap(void *addr, size_t length) + { +- ucs_memtrack_buffer_t *buffer; +- +- if (!ucs_memtrack_is_enabled()) { +- return munmap(addr, length); +- } +- +- buffer = (ucs_memtrack_buffer_t*)addr - 1; +- ucs_memtrack_record_release(buffer, length); +- return munmap((void*)buffer - buffer->offset, +- length + sizeof(*buffer) + buffer->offset); ++ ucs_memtrack_releasing(addr); ++ return munmap(addr, length); + } + + char *ucs_strdup(const char *src, const char *name) + { +- char *str; +- size_t len = strlen(src); +- +- str = ucs_malloc(len + 1, name); +- if (str) { +- memcpy(str, src, len + 1); +- } +- ++ char *str = strdup(src); ++ ucs_memtrack_allocated(str, strlen(str) + 1, name); + return str; + } + +-static unsigned ucs_memtrack_total_internal(ucs_memtrack_entry_t* total) +-{ +- struct sglib_hashed_ucs_memtrack_entry_t_iterator entry_it; +- ucs_memtrack_entry_t *entry; +- unsigned num_entries; +- +- ucs_memtrack_total_reset(total); +- +- num_entries = 0; +- for (entry = sglib_hashed_ucs_memtrack_entry_t_it_init(&entry_it, +- ucs_memtrack_context.entries); +- entry != NULL; +- entry = sglib_hashed_ucs_memtrack_entry_t_it_next(&entry_it)) +- { +- total->size += entry->size; +- total->peak_size += entry->peak_size; +- total->count += entry->count; +- total->peak_count += entry->peak_count; +- ++num_entries; +- } +- return num_entries; +-} +- + void ucs_memtrack_total(ucs_memtrack_entry_t* total) + { + if (!ucs_memtrack_is_enabled()) { +@@ -368,58 +234,51 @@ void ucs_memtrack_total(ucs_memtrack_entry_t* total) + } + + pthread_mutex_lock(&ucs_memtrack_context.lock); +- ucs_memtrack_total_internal(total); ++ *total = ucs_memtrack_context.total; + pthread_mutex_unlock(&ucs_memtrack_context.lock); + } + + static int ucs_memtrack_cmp_entries(const void *ptr1, const void *ptr2) + { +- const ucs_memtrack_entry_t *e1 = ptr1; +- const ucs_memtrack_entry_t *e2 = ptr2; ++ ucs_memtrack_entry_t * const *e1 = ptr1; ++ ucs_memtrack_entry_t * const *e2 = ptr2; + +- return (int)((ssize_t)e2->peak_size - (ssize_t)e1->peak_size); ++ return (int)((ssize_t)(*e2)->peak_size - (ssize_t)(*e1)->peak_size); + } + + static void ucs_memtrack_dump_internal(FILE* output_stream) + { +- struct sglib_hashed_ucs_memtrack_entry_t_iterator entry_it; +- ucs_memtrack_entry_t *entry, *all_entries; +- ucs_memtrack_entry_t total = {"", 0}; ++ ucs_memtrack_entry_t *entry, **all_entries; + unsigned num_entries, i; + + if (!ucs_memtrack_is_enabled()) { + return; + } + +- num_entries = ucs_memtrack_total_internal(&total); ++ /* collect all entries to one array */ ++ all_entries = ucs_alloca(sizeof(*all_entries) * ++ kh_size(&ucs_memtrack_context.entries)); ++ num_entries = 0; ++ kh_foreach_value(&ucs_memtrack_context.entries, entry, { ++ all_entries[num_entries++] = entry; ++ }); ++ ucs_assert(num_entries <= kh_size(&ucs_memtrack_context.entries)); ++ ++ /* sort entries according to peak size */ ++ qsort(all_entries, num_entries, sizeof(*all_entries), ucs_memtrack_cmp_entries); + ++ /* print title */ + fprintf(output_stream, "%31s current / peak %16s current / peak\n", "", ""); + fprintf(output_stream, UCS_MEMTRACK_FORMAT_STRING, "TOTAL", +- total.size, total.peak_size, +- total.count, total.peak_count); +- +- all_entries = malloc(sizeof(ucs_memtrack_entry_t) * num_entries); +- +- /* Copy all entries to one array */ +- i = 0; +- for (entry = sglib_hashed_ucs_memtrack_entry_t_it_init(&entry_it, +- ucs_memtrack_context.entries); +- entry != NULL; +- entry = sglib_hashed_ucs_memtrack_entry_t_it_next(&entry_it)) +- { +- all_entries[i++] = *entry; +- } +- ucs_assert(i == num_entries); ++ ucs_memtrack_context.total.size, ucs_memtrack_context.total.peak_size, ++ ucs_memtrack_context.total.count, ucs_memtrack_context.total.peak_count); + +- /* Sort the entries from large to small */ +- qsort(all_entries, num_entries, sizeof(ucs_memtrack_entry_t), ucs_memtrack_cmp_entries); ++ /* print sorted entries */ + for (i = 0; i < num_entries; ++i) { +- entry = &all_entries[i]; ++ entry = all_entries[i]; + fprintf(output_stream, UCS_MEMTRACK_FORMAT_STRING, entry->name, + entry->size, entry->peak_size, entry->count, entry->peak_count); + } +- +- free(all_entries); + } + + void ucs_memtrack_dump(FILE* output_stream) +@@ -461,7 +320,11 @@ void ucs_memtrack_init() + return; + } + +- sglib_hashed_ucs_memtrack_entry_t_init(ucs_memtrack_context.entries); ++ // TODO use ucs_memtrack_entry_reset ++ ucs_memtrack_entry_reset(&ucs_memtrack_context.total); ++ kh_init_inplace(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs); ++ kh_init_inplace(ucs_memtrack_entry_hash, &ucs_memtrack_context.entries); ++ + status = UCS_STATS_NODE_ALLOC(&ucs_memtrack_context.stats, + &ucs_memtrack_stats_class, + ucs_stats_get_root()); +@@ -475,7 +338,6 @@ void ucs_memtrack_init() + + void ucs_memtrack_cleanup() + { +- struct sglib_hashed_ucs_memtrack_entry_t_iterator entry_it; + ucs_memtrack_entry_t *entry; + + if (!ucs_memtrack_context.enabled) { +@@ -489,82 +351,22 @@ void ucs_memtrack_cleanup() + /* disable before releasing the stats node */ + ucs_memtrack_context.enabled = 0; + UCS_STATS_NODE_FREE(ucs_memtrack_context.stats); +- for (entry = sglib_hashed_ucs_memtrack_entry_t_it_init(&entry_it, +- ucs_memtrack_context.entries); +- entry != NULL; +- entry = sglib_hashed_ucs_memtrack_entry_t_it_next(&entry_it)) +- { +- sglib_hashed_ucs_memtrack_entry_t_delete(ucs_memtrack_context.entries, entry); +- free(entry); +- } +- pthread_mutex_unlock(&ucs_memtrack_context.lock); +-} + +-int ucs_memtrack_is_enabled() +-{ +- return ucs_memtrack_context.enabled; +-} +- +-size_t ucs_memtrack_adjust_alloc_size(size_t size) +-{ +- return size + sizeof(ucs_memtrack_buffer_t); +-} +- +-void ucs_memtrack_allocated(void **ptr_p, size_t *size_p, const char *name) +-{ +- ucs_memtrack_buffer_t *buffer; +- +- if (!ucs_memtrack_is_enabled()) { +- return; +- } +- +- buffer = *ptr_p; +- *ptr_p = buffer + 1; +- *size_p -= sizeof(*buffer); +- ucs_memtrack_record_alloc(buffer, *size_p, 0, name); +-} +- +-void ucs_memtrack_releasing(void **ptr_p) +-{ +- ucs_memtrack_buffer_t *buffer; ++ /* cleanup entries */ ++ kh_foreach_value(&ucs_memtrack_context.entries, entry, { ++ free(entry); ++ }); + +- if (!ucs_memtrack_is_enabled()) { +- return; +- } +- +- buffer = *ptr_p -= sizeof(*buffer); +- ucs_memtrack_record_release(buffer, 0); +-} ++ /* destroy hash tables */ ++ kh_destroy_inplace(ucs_memtrack_entry_hash, &ucs_memtrack_context.entries); ++ kh_destroy_inplace(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs); + +-void ucs_memtrack_releasing_adjusted(void *ptr) +-{ +- ucs_memtrack_record_release(ptr, 0); +-} +- +-static uint64_t ucs_memtrack_entry_hash(ucs_memtrack_entry_t *entry) +-{ +- return ucs_string_to_id(entry->name); ++ pthread_mutex_unlock(&ucs_memtrack_context.lock); + } + +-static int ucs_memtrack_entry_compare(ucs_memtrack_entry_t *entry1, +- ucs_memtrack_entry_t *entry2) ++int ucs_memtrack_is_enabled() + { +- return strcmp(entry1->name, entry2->name); ++ return ucs_memtrack_context.enabled; + } + +-SGLIB_DEFINE_LIST_FUNCTIONS(ucs_memtrack_entry_t, ucs_memtrack_entry_compare, next) +-SGLIB_DEFINE_HASHED_CONTAINER_FUNCTIONS(ucs_memtrack_entry_t, +- UCS_MEMTRACK_ENTRY_HASH_SIZE, +- ucs_memtrack_entry_hash) +- + #endif +- +- +-void ucs_memtrack_total_reset(ucs_memtrack_entry_t* total) +-{ +- ucs_snprintf_zero(total->name, UCS_MEMTRACK_NAME_MAX, "total"); +- total->size = 0; +- total->peak_size = 0; +- total->count = 0; +- total->peak_count = 0; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.h +index 695620e..b02cd10 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.h +@@ -12,12 +12,11 @@ + #endif + + #include +- +-#include +-#include + #include ++#include + #include + ++ + BEGIN_C_DECLS + + enum { +@@ -26,27 +25,19 @@ enum { + UCS_MEMTRACK_STAT_LAST + }; + +-#define UCS_MEMTRACK_NAME_MAX 31 + + /** +- * Allocation site entry. ++ * Allocation site entry + */ +-typedef struct ucs_memtrack_entry ucs_memtrack_entry_t; +-struct ucs_memtrack_entry { +- char name[UCS_MEMTRACK_NAME_MAX]; +- size_t size; +- size_t peak_size; +- size_t count; +- size_t peak_count; +- ucs_memtrack_entry_t *next; +-}; ++typedef struct ucs_memtrack_entry { ++ size_t size; /* currently allocated total size */ ++ size_t peak_size; /* peak allocated total size */ ++ unsigned count; /* number of currently allocated blocks */ ++ unsigned peak_count; /* peak number of allocated blocks */ ++ char name[0]; /* allocation name */ ++} ucs_memtrack_entry_t; + + +-/** +- * Initialize the total allocations structure. +- */ +-void ucs_memtrack_total_reset(ucs_memtrack_entry_t* total); +- + + #if ENABLE_MEMTRACK + +@@ -61,16 +52,19 @@ void ucs_memtrack_total_reset(ucs_memtrack_entry_t* total); + */ + void ucs_memtrack_init(); + ++ + /** + * Stop trakcing memory (or decrement reference count). + */ + void ucs_memtrack_cleanup(); + ++ + /* + * Check if memtrack is enabled at the moment. + */ + int ucs_memtrack_is_enabled(); + ++ + /** + * Print a summary of memory tracked so far. + * +@@ -78,6 +72,7 @@ int ucs_memtrack_is_enabled(); + */ + void ucs_memtrack_dump(FILE* output); + ++ + /** + * Calculates the total of buffers currently tracked. + * +@@ -85,32 +80,18 @@ void ucs_memtrack_dump(FILE* output); + */ + void ucs_memtrack_total(ucs_memtrack_entry_t* total); + +-/** +- * Adjust size before doing custom allocation. Need to be called in order to +- * obtain the size of a custom allocation to have room for memtrack descriptor. +- */ +-size_t ucs_memtrack_adjust_alloc_size(size_t size); +- +-/** +- * Track custom allocation. Need to be called after custom allocation returns, +- * it will adjust the pointer and size to user buffer instead of the memtrack +- * descriptor. +- */ +-void ucs_memtrack_allocated(void **ptr_p, size_t *size_p, const char *name); + + /** +- * Track release of custom allocation. Need to be called before actually +- * releasing the memory. ++ * Track custom allocation. Need to be called after custom allocation returns. + */ +-void ucs_memtrack_releasing(void **ptr_p); ++void ucs_memtrack_allocated(void *ptr, size_t size, const char *name); + + + /** + * Track release of custom allocation. Need to be called before actually +- * releasing the memory. Unlike @ref ucs_memtrack_releasing(), the pointer passed +- * to this function is the actual memory block including memtrack header. ++ * releasing the memory. + */ +-void ucs_memtrack_releasing_adjusted(void *ptr); ++void ucs_memtrack_releasing(void *ptr); + + + /* +@@ -124,10 +105,6 @@ void *ucs_memalign(size_t boundary, size_t size, const char *name); + void ucs_free(void *ptr); + void *ucs_mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset, const char *name); +-#ifdef __USE_LARGEFILE64 +-void *ucs_mmap64(void *addr, size_t size, int prot, int flags, int fd, +- off64_t offset, const char *name); +-#endif + int ucs_munmap(void *addr, size_t length); + char *ucs_strdup(const char *src, const char *name); + +@@ -144,10 +121,8 @@ char *ucs_strdup(const char *src, const char *name); + #define ucs_memtrack_dump(_output) UCS_EMPTY_STATEMENT + #define ucs_memtrack_total(_total) ucs_memtrack_total_init(_total) + +-#define ucs_memtrack_adjust_alloc_size(_size) (_size) +-#define ucs_memtrack_allocated(_ptr_p, _sz_p, ...) UCS_EMPTY_STATEMENT ++#define ucs_memtrack_allocated(_ptr, _sz, ...) UCS_EMPTY_STATEMENT + #define ucs_memtrack_releasing(_ptr) UCS_EMPTY_STATEMENT +-#define ucs_memtrack_releasing_adjusted(_ptr) UCS_EMPTY_STATEMENT + + #define ucs_malloc(_s, ...) malloc(_s) + #define ucs_calloc(_n, _s, ...) calloc(_n, _s) +@@ -155,7 +130,6 @@ char *ucs_strdup(const char *src, const char *name); + #define ucs_memalign(_b, _s, ...) memalign(_b, _s) + #define ucs_free(_p) free(_p) + #define ucs_mmap(_a, _l, _p, _fl, _fd, _o, ...) mmap(_a, _l, _p, _fl, _fd, _o) +-#define ucs_mmap64(_a, _l, _p, _fl, _fd, _o, ...) mmap64(_a, _l, _p, _fl, _fd, _o) + #define ucs_munmap(_a, _l) munmap(_a, _l) + #define ucs_strdup(_src, ...) strdup(_src) + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.c +deleted file mode 100644 +index 1bb9eb9..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.c ++++ /dev/null +@@ -1,246 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#include "profile.h" +- +-#include +-#include +-#include +- +-#if HAVE_PROFILING +- +-const char *ucs_profile_mode_names[] = { +- [UCS_PROFILE_MODE_ACCUM] = "accum", +- [UCS_PROFILE_MODE_LOG] = "log", +- [UCS_PROFILE_MODE_LAST] = NULL +-}; +- +-ucs_profile_global_context_t ucs_profile_ctx = { +- .locations = NULL, +- .log.start = NULL, +- .log.end = NULL, +- .log.current = NULL, +- .log.wraparound = 0, +- .accum.stack_top = -1, +- .num_locations = 0, +- .max_locations = 0, +-}; +- +-static void ucs_profile_file_write_data(int fd, void *data, size_t size) +-{ +- ssize_t written = write(fd, data, size); +- if (written < 0) { +- ucs_warn("failed to write %zu bytes to profiling file: %m", size); +- } else if (size != written) { +- ucs_warn("wrote only %zd of %zu bytes to profiling file: %m", +- written, size); +- } +-} +- +-static void ucs_profile_file_write_records(int fd, ucs_profile_record_t *begin, +- ucs_profile_record_t *end) +-{ +- ucs_profile_file_write_data(fd, begin, (void*)end - (void*)begin); +-} +- +-static void ucs_profile_write() +-{ +- ucs_profile_header_t header; +- char fullpath[1024] = {0}; +- char filename[1024] = {0}; +- int fd; +- +- if (!ucs_global_opts.profile_mode) { +- return; +- } +- +- ucs_fill_filename_template(ucs_global_opts.profile_file, +- filename, sizeof(filename)); +- ucs_expand_path(filename, fullpath, sizeof(fullpath) - 1); +- +- fd = open(fullpath, O_WRONLY|O_CREAT|O_TRUNC, 0600); +- if (fd < 0) { +- ucs_error("failed to write profiling data to '%s': %m", fullpath); +- return; +- } +- +- /* write header */ +- memset(&header, 0, sizeof(header)); +- ucs_read_file(header.cmdline, sizeof(header.cmdline), 1, "/proc/self/cmdline"); +- strncpy(header.hostname, ucs_get_host_name(), sizeof(header.hostname) - 1); +- header.pid = getpid(); +- header.mode = ucs_global_opts.profile_mode; +- header.num_locations = ucs_profile_ctx.num_locations; +- header.num_records = ucs_profile_ctx.log.wraparound ? +- (ucs_profile_ctx.log.end - ucs_profile_ctx.log.start) : +- (ucs_profile_ctx.log.current - ucs_profile_ctx.log.start); +- header.one_second = ucs_time_from_sec(1.0); +- ucs_profile_file_write_data(fd, &header, sizeof(header)); +- +- /* write locations */ +- ucs_profile_file_write_data(fd, ucs_profile_ctx.locations, +- sizeof(*ucs_profile_ctx.locations) * +- ucs_profile_ctx.num_locations); +- +- /* write records */ +- if (ucs_profile_ctx.log.wraparound > 0) { +- ucs_profile_file_write_records(fd, ucs_profile_ctx.log.current, +- ucs_profile_ctx.log.end); +- } +- ucs_profile_file_write_records(fd, ucs_profile_ctx.log.start, +- ucs_profile_ctx.log.current); +- +- close(fd); +-} +- +-void ucs_profile_get_location(ucs_profile_type_t type, const char *name, +- const char *file, int line, const char *function, +- int *loc_id_p) +-{ +- ucs_profile_location_t *loc; +- int location; +- +- /* Check if profiling is disabled */ +- if (!ucs_global_opts.profile_mode) { +- *loc_id_p = 0; +- return; +- } +- +- /* Location ID must be uninitialized */ +- ucs_assert(*loc_id_p == -1); +- +- location = ucs_profile_ctx.num_locations++; +- +- /* Reallocate array if needed */ +- if (ucs_profile_ctx.num_locations > ucs_profile_ctx.max_locations) { +- ucs_profile_ctx.max_locations = ucs_profile_ctx.num_locations * 2; +- ucs_profile_ctx.locations = ucs_realloc(ucs_profile_ctx.locations, +- sizeof(*ucs_profile_ctx.locations) * +- ucs_profile_ctx.max_locations, +- "profile_locations"); +- if (ucs_profile_ctx.locations == NULL) { +- ucs_warn("failed to expand locations array"); +- *loc_id_p = 0; +- return; +- } +- } +- +- /* Initialize new location */ +- loc = &ucs_profile_ctx.locations[location]; +- ucs_strncpy_zero(loc->file, basename(file), sizeof(loc->file)); +- ucs_strncpy_zero(loc->function, function, sizeof(loc->function)); +- ucs_strncpy_zero(loc->name, name, sizeof(loc->name)); +- loc->line = line; +- loc->type = type; +- loc->total_time = 0; +- loc->count = 0; +- loc->loc_id_p = loc_id_p; +- *loc_id_p = location + 1; +-} +- +-void ucs_profile_global_init() +-{ +- size_t num_records; +- +- if (!ucs_global_opts.profile_mode) { +- goto off; +- } +- +- if (!strlen(ucs_global_opts.profile_file)) { +- ucs_warn("profiling file not specified, profiling is disabled"); +- goto disable; +- } +- +- if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_LOG)) { +- num_records = ucs_global_opts.profile_log_size / sizeof(ucs_profile_record_t); +- ucs_profile_ctx.log.start = ucs_calloc(num_records, +- sizeof(ucs_profile_record_t), +- "profile_log"); +- if (ucs_profile_ctx.log.start == NULL) { +- ucs_warn("failed to allocate profiling log"); +- goto disable; +- } +- +- ucs_profile_ctx.log.end = ucs_profile_ctx.log.start + num_records; +- ucs_profile_ctx.log.current = ucs_profile_ctx.log.start; +- } +- +- if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_ACCUM)) { +- ucs_profile_ctx.accum.stack_top = -1; +- } +- +- ucs_info("profiling is enabled"); +- return; +- +-disable: +- ucs_global_opts.profile_mode = 0; +-off: +- ucs_trace("profiling is disabled"); +-} +- +-static void ucs_profile_reset_locations() +-{ +- ucs_profile_location_t *loc; +- +- for (loc = ucs_profile_ctx.locations; +- loc < ucs_profile_ctx.locations + ucs_profile_ctx.num_locations; +- ++loc) +- { +- *loc->loc_id_p = -1; +- } +- +- ucs_profile_ctx.num_locations = 0; +- ucs_profile_ctx.max_locations = 0; +- ucs_free(ucs_profile_ctx.locations); +- ucs_profile_ctx.locations = NULL; +-} +- +-void ucs_profile_global_cleanup() +-{ +- ucs_profile_write(); +- ucs_free(ucs_profile_ctx.log.start); +- ucs_profile_ctx.log.start = NULL; +- ucs_profile_ctx.log.end = NULL; +- ucs_profile_ctx.log.current = NULL; +- ucs_profile_ctx.log.wraparound = 0; +- ucs_profile_reset_locations(); +-} +- +-void ucs_profile_dump() +-{ +- ucs_profile_location_t *loc; +- +- ucs_profile_write(); +- +- for (loc = ucs_profile_ctx.locations; +- loc < ucs_profile_ctx.locations + ucs_profile_ctx.num_locations; +- ++loc) +- { +- loc->count = 0; +- loc->total_time = 0; +- } +- +- if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_LOG)) { +- ucs_profile_ctx.log.wraparound = 0; +- ucs_profile_ctx.log.current = ucs_profile_ctx.log.start; +- } +-} +- +-#else +- +-void ucs_profile_global_init() +-{ +-} +- +-void ucs_profile_global_cleanup() +-{ +-} +- +-void ucs_profile_dump() +-{ +-} +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.h +deleted file mode 100644 +index 51d2b7e..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.h ++++ /dev/null +@@ -1,473 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#ifndef UCS_PROFILE_H_ +-#define UCS_PROFILE_H_ +- +-#ifdef HAVE_CONFIG_H +-# include "config.h" +-#endif +- +-#include +-#include +-#include +-#include +-#include +- +- +-#define UCS_PROFILE_STACK_MAX 64 +- +- +-/** +- * Profiling modes +- */ +-enum { +- UCS_PROFILE_MODE_ACCUM, /**< Accumulate elapsed time per location */ +- UCS_PROFILE_MODE_LOG, /**< Record all events */ +- UCS_PROFILE_MODE_LAST +-}; +- +- +-/** +- * Profiling location type +- */ +-typedef enum { +- UCS_PROFILE_TYPE_SAMPLE, /**< Sample only */ +- UCS_PROFILE_TYPE_SCOPE_BEGIN, /**< Begin a scope */ +- UCS_PROFILE_TYPE_SCOPE_END, /**< End a scope */ +- UCS_PROFILE_TYPE_REQUEST_NEW, /**< New asynchronous request */ +- UCS_PROFILE_TYPE_REQUEST_EVENT, /**< Some progress is made on a request */ +- UCS_PROFILE_TYPE_REQUEST_FREE, /**< Asynchronous request released */ +- UCS_PROFILE_TYPE_LAST +-} ucs_profile_type_t; +- +- +-/** +- * Profile output file header +- */ +-typedef struct ucs_profile_header { +- char cmdline[1024]; /**< Command line */ +- char hostname[40]; /**< Host name */ +- uint32_t pid; /**< Process ID */ +- uint32_t mode; /**< Profiling mode */ +- uint32_t num_locations; /**< Number of locations in the file */ +- uint64_t num_records; /**< Number of records in the file */ +- uint64_t one_second; /**< How much time is one second on the sampled machine */ +-} UCS_S_PACKED ucs_profile_header_t; +- +- +-/** +- * Profile output file sample record +- */ +-typedef struct ucs_profile_record { +- uint64_t timestamp; /**< Record timestamp */ +- uint64_t param64; /**< Custom 64-bit parameter */ +- uint32_t param32; /**< Custom 32-bit parameter */ +- uint32_t location; /**< Location identifier */ +-} UCS_S_PACKED ucs_profile_record_t; +- +- +-/** +- * Profile location record +- */ +-typedef struct ucs_profile_location { +- char file[64]; /**< Source file name */ +- char function[64]; /**< Function name */ +- char name[32]; /**< User-provided name */ +- int *loc_id_p; /**< Back-pointer for location ID */ +- int line; /**< Source line number */ +- uint8_t type; /**< From ucs_profile_type_t */ +- uint64_t total_time; /**< Total interval from previous location */ +- size_t count; /**< Number of times we've hit this location */ +-} UCS_S_PACKED ucs_profile_location_t; +- +- +-/** +- * Profiling global context +- */ +-typedef struct ucs_profile_global_context { +- +- ucs_profile_location_t *locations; /**< Array of all locations */ +- unsigned num_locations; /**< Number of valid locations */ +- unsigned max_locations; /**< Size of locations array */ +- +- struct { +- ucs_profile_record_t *start, *end; /**< Circular log buffer */ +- ucs_profile_record_t *current; /**< Current log pointer */ +- int wraparound; /**< Whether log was rotated */ +- } log; +- +- struct { +- int stack_top; /**< Index of stack top */ +- ucs_time_t stack[UCS_PROFILE_STACK_MAX]; /**< Timestamps for each nested scope */ +- } accum; +- +-} ucs_profile_global_context_t; +- +- +-/** +- * Initialize profiling system. +- */ +-void ucs_profile_global_init(); +- +- +-/** +- * Save and cleanup profiling. +- */ +-void ucs_profile_global_cleanup(); +- +- +-/** +- * Save and reset profiling. +- */ +-void ucs_profile_dump(); +- +- +-#if HAVE_PROFILING +- +-extern const char *ucs_profile_mode_names[]; +- +-/* +- * Register a profiling location - should be called once per location in the +- * code, before the first record of each such location is made. +- * Should not be used directly - use UCS_PROFILE macros instead. +- * +- * @param [in] type Location type. +- * @param [in] file Source file name. +- * @param [in] line Source line number. +- * @param [in] function Calling function name. +- * @param [in] name Location name. +- * @param [out] loc_id_p Filled with location ID: +- * 0 - profiling is disabled +- * >0 - location index + 1 +- */ +-void ucs_profile_get_location(ucs_profile_type_t type, const char *name, +- const char *file, int line, const char *function, +- int *loc_id_p); +- +- +-/* +- * Store a new record with the given data. +- * Should not be used directly - use UCS_PROFILE macros instead. +- * +- * @param [in] type Location type. +- * @param [in] name Location name. +- * @param [in] param32 custom 32-bit parameter. +- * @param [in] param64 custom 64-bit parameter. +- * @param [in] file Source file name. +- * @param [in] line Source line number. +- * @param [in] function Calling function name. +- * @param [in,out] loc_id_p Variable used to maintain the location ID. +- */ +-static inline void ucs_profile_record(ucs_profile_type_t type, const char *name, +- uint32_t param32, uint64_t param64, +- const char *file, int line, +- const char *function, int *loc_id_p) +-{ +- extern ucs_profile_global_context_t ucs_profile_ctx; +- ucs_profile_global_context_t *ctx = &ucs_profile_ctx; +- ucs_profile_record_t *rec; +- ucs_profile_location_t *loc; +- ucs_time_t current_time; +- int loc_id; +- +-retry: +- loc_id = *loc_id_p; +- if (ucs_likely(loc_id == 0)) { +- return; +- } +- +- if (ucs_unlikely(loc_id == -1)) { +- ucs_profile_get_location(type, name, file, line, function, loc_id_p); +- goto retry; +- } +- +- current_time = ucs_get_time(); +- if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_ACCUM)) { +- loc = &ctx->locations[loc_id - 1]; +- switch (type) { +- case UCS_PROFILE_TYPE_SCOPE_BEGIN: +- ctx->accum.stack[++ctx->accum.stack_top] = current_time; +- ucs_assert(ctx->accum.stack_top < UCS_PROFILE_STACK_MAX); +- break; +- case UCS_PROFILE_TYPE_SCOPE_END: +- ucs_assert(ctx->accum.stack_top >= 0); +- loc->total_time += current_time - ctx->accum.stack[ctx->accum.stack_top]; +- --ctx->accum.stack_top; +- break; +- default: +- break; +- } +- ++loc->count; +- } +- if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_LOG)) { +- rec = ctx->log.current; +- rec->timestamp = current_time; +- rec->param64 = param64; +- rec->param32 = param32; +- rec->location = loc_id - 1; +- if (++ctx->log.current >= ctx->log.end) { +- ctx->log.current = ctx->log.start; +- ctx->log.wraparound = 1; +- } +- } +-} +- +-/* Helper macro */ +-#define _UCS_PROFILE_RECORD(_type, _name, _param64, _param32, _loc_id_p) \ +- ucs_profile_record((_type), (_name), (_param64), (_param32), __FILE__, \ +- __LINE__, __FUNCTION__, (_loc_id_p)) +- +- +-/* Helper macro */ +-#define __UCS_PROFILE_CODE(_name, _loop_var) \ +- int _loop_var ; \ +- for (({ UCS_PROFILE_SCOPE_BEGIN(); _loop_var = 1;}); \ +- _loop_var; \ +- ({ UCS_PROFILE_SCOPE_END(_name); _loop_var = 0;})) +- +- +-/* Helper macro */ +-#define _UCS_PROFILE_CODE(_name, _var_suffix) \ +- __UCS_PROFILE_CODE(_name, UCS_PP_TOKENPASTE(loop, _var_suffix)) +- +- +-/** +- * Record a profiling event. +- * +- * @param _type Event type. +- * @param _name Event name. +- * @param _param32 Custom 32-bit parameter. +- * @param _param64 Custom 64-bit parameter. +- */ +-#define UCS_PROFILE(_type, _name, _param32, _param64) \ +- { \ +- static int loc_id = -1; \ +- _UCS_PROFILE_RECORD((_type), (_name), (_param32), (_param64), &loc_id); \ +- } +- +- +-/** +- * Record a profiling sample event. +- * +- * @param _name Event name. +- */ +-#define UCS_PROFILE_SAMPLE(_name) \ +- UCS_PROFILE(UCS_PROFILE_TYPE_SAMPLE, (_name), 0, 0) +- +- +-/** +- * Record a scope-begin profiling event. +- */ +-#define UCS_PROFILE_SCOPE_BEGIN() \ +- { \ +- UCS_PROFILE(UCS_PROFILE_TYPE_SCOPE_BEGIN, "", 0, 0); \ +- ucs_compiler_fence(); \ +- } +- +- +-/** +- * Record a scope-end profiling event. +- * +- * @param _name Scope name. +- */ +-#define UCS_PROFILE_SCOPE_END(_name) \ +- { \ +- ucs_compiler_fence(); \ +- UCS_PROFILE(UCS_PROFILE_TYPE_SCOPE_END, _name, 0, 0); \ +- } +- +- +-/** +- * Declare a profiled scope of code. +- * +- * Usage: +- * UCS_PROFILE_CODE() { +- * +- * } +- * +- * @param _name Scope name. +- */ +-#define UCS_PROFILE_CODE(_name) \ +- _UCS_PROFILE_CODE(_name, UCS_PP_UNIQUE_ID) +- +- +-/** +- * Create a profiled function. +- * +- * Usage: +- * UCS_PROFILE_FUNC(, , (a, b), int a, char b) +- * +- * @param _ret_type Function return type. +- * @param _name Function name. +- * @param _arglist List of argument *names* only. +- * @param ... Argument declarations (with types). +- */ +-#define UCS_PROFILE_FUNC(_ret_type, _name, _arglist, ...) \ +- static UCS_F_ALWAYS_INLINE _ret_type _name##_inner(__VA_ARGS__); \ +- \ +- _ret_type _name(__VA_ARGS__) { \ +- UCS_PROFILE_SCOPE_BEGIN(); \ +- _ret_type _ret = _name##_inner _arglist; \ +- UCS_PROFILE_SCOPE_END(#_name); \ +- return _ret; \ +- } \ +- static UCS_F_ALWAYS_INLINE _ret_type _name##_inner(__VA_ARGS__) +- +- +-/** +- * Create a profiled function whose return type is void. +- * +- * Usage: +- * UCS_PROFILE_FUNC_VOID(, (a, b), int a, char b) +- * +- * @param _name Function name. +- * @param _arglist List of argument *names* only. +- * @param ... Argument declarations (with types). +- */ +-#define UCS_PROFILE_FUNC_VOID(_name, _arglist, ...) \ +- static UCS_F_ALWAYS_INLINE void _name##_inner(__VA_ARGS__); \ +- \ +- void _name(__VA_ARGS__) { \ +- UCS_PROFILE_SCOPE_BEGIN(); \ +- _name##_inner _arglist; \ +- UCS_PROFILE_SCOPE_END(#_name); \ +- } \ +- static UCS_F_ALWAYS_INLINE void _name##_inner(__VA_ARGS__) +- +- +-/* +- * Profile a function call, and specify explicit name string for the profile. +- * Useful when calling a function by a pointer. +- * +- * Usage: +- * UCS_PROFILE_NAMED_CALL("name", function, arg1, arg2) +- * +- * @param _name Name string for the profile. +- * @param _func Function name. +- * @param ... Function call arguments. +- */ +-#define UCS_PROFILE_NAMED_CALL(_name, _func, ...) \ +- ({ \ +- typeof(_func(__VA_ARGS__)) retval; \ +- UCS_PROFILE_SCOPE_BEGIN(); \ +- retval = _func(__VA_ARGS__); \ +- UCS_PROFILE_SCOPE_END(_name); \ +- retval; \ +- }) +- +- +-/* +- * Profile a function call. +- * +- * Usage: +- * UCS_PROFILE_CALL(function, arg1, arg2) +- * +- * @param _func Function name. +- * @param ... Function call arguments. +- */ +-#define UCS_PROFILE_CALL(_func, ...) \ +- UCS_PROFILE_NAMED_CALL(#_func, _func, ## __VA_ARGS__) +- +- +-/* +- * Profile a function call which does not return a value, and specify explicit +- * name string for the profile. Useful when calling a function by a pointer. +- * +- * Usage: +- * UCS_PROFILE_NAMED_CALL_VOID("name", function, arg1, arg2) +- * +- * @param _name Name string for the profile. +- * @param _func Function name. +- * @param ... Function call arguments. +- */ +-#define UCS_PROFILE_NAMED_CALL_VOID(_name, _func, ...) \ +- { \ +- UCS_PROFILE_SCOPE_BEGIN(); \ +- _func(__VA_ARGS__); \ +- UCS_PROFILE_SCOPE_END(_name); \ +- } +- +- +-/* +- * Profile a function call which does not return a value. +- * +- * Usage: +- * UCS_PROFILE_CALL_VOID(function, arg1, arg2) +- * +- * @param _func Function name. +- * @param ... Function call arguments. +- */ +-#define UCS_PROFILE_CALL_VOID(_func, ...) \ +- UCS_PROFILE_NAMED_CALL_VOID(#_func, _func, ## __VA_ARGS__) +- +- +-/* +- * Profile a new request allocation. +- * +- * @param _req Request pointer. +- * @param _name Allocation site name. +- * @param _param32 Custom 32-bit parameter. +- */ +-#define UCS_PROFILE_REQUEST_NEW(_req, _name, _param32) \ +- UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_NEW, (_name), (_param32), (uintptr_t)(_req)); +- +- +-/* +- * Profile a request progress event. +- * +- * @param _req Request pointer. +- * @param _name Event name. +- * @param _param32 Custom 32-bit parameter. +- */ +-#define UCS_PROFILE_REQUEST_EVENT(_req, _name, _param32) \ +- UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_EVENT, (_name), (_param32), (uintptr_t)(_req)); +- +- +-/* +- * Profile a request progress event with status check. +- * +- * @param _req Request pointer. +- * @param _name Event name. +- * @param _param32 Custom 32-bit parameter. +- * @param _status Status of the last progress event. +- */ +-#define UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(_req, _name, _param32, _status) \ +- if (!UCS_STATUS_IS_ERR(_status)) { \ +- UCS_PROFILE_REQUEST_EVENT((_req), (_name), (_param32)); \ +- } +- +- +-/* +- * Profile a request release. +- * +- * @param _req Request pointer. +- */ +-#define UCS_PROFILE_REQUEST_FREE(_req) \ +- UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_FREE, "", 0, (uintptr_t)(_req)); +- +- +-#else +- +-#define UCS_PROFILE(...) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_SAMPLE(_name) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_SCOPE_BEGIN() UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_SCOPE_END(_name) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_CODE(_name) +-#define UCS_PROFILE_FUNC(_ret_type, _name, _arglist, ...) _ret_type _name(__VA_ARGS__) +-#define UCS_PROFILE_FUNC_VOID(_name, _arglist, ...) void _name(__VA_ARGS__) +-#define UCS_PROFILE_NAMED_CALL(_name, _func, ...) _func(__VA_ARGS__) +-#define UCS_PROFILE_CALL(_func, ...) _func(__VA_ARGS__) +-#define UCS_PROFILE_NAMED_CALL_VOID(_name, _func, ...) _func(__VA_ARGS__) +-#define UCS_PROFILE_CALL_VOID(_func, ...) _func(__VA_ARGS__) +-#define UCS_PROFILE_REQUEST_NEW(...) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_REQUEST_EVENT(...) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(...) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_REQUEST_FREE(...) UCS_EMPTY_STATEMENT +- +-#endif +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.c +new file mode 100644 +index 0000000..8f7c1c0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.c +@@ -0,0 +1,353 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "profile.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++/** ++ * Profiling global context ++ */ ++typedef struct ucs_profile_global_context { ++ ++ ucs_profile_location_t *locations; /**< Array of all locations */ ++ unsigned num_locations; /**< Number of valid locations */ ++ unsigned max_locations; /**< Size of locations array */ ++ pthread_mutex_t mutex; /**< Protects updating the locations array */ ++ ++ struct { ++ ucs_profile_record_t *start, *end; /**< Circular log buffer */ ++ ucs_profile_record_t *current; /**< Current log pointer */ ++ int wraparound; /**< Whether log was rotated */ ++ } log; ++ ++ struct { ++ int stack_top; /**< Index of stack top */ ++ ucs_time_t stack[UCS_PROFILE_STACK_MAX]; /**< Timestamps for each nested scope */ ++ } accum; ++ ++} ucs_profile_global_context_t; ++ ++ ++const char *ucs_profile_mode_names[] = { ++ [UCS_PROFILE_MODE_ACCUM] = "accum", ++ [UCS_PROFILE_MODE_LOG] = "log", ++ [UCS_PROFILE_MODE_LAST] = NULL ++}; ++ ++ucs_profile_global_context_t ucs_profile_ctx = { ++ .locations = NULL, ++ .log.start = NULL, ++ .log.end = NULL, ++ .log.current = NULL, ++ .log.wraparound = 0, ++ .accum.stack_top = -1, ++ .num_locations = 0, ++ .max_locations = 0, ++ .mutex = PTHREAD_MUTEX_INITIALIZER ++}; ++ ++static void ucs_profile_file_write_data(int fd, void *data, size_t size) ++{ ++ ssize_t written = write(fd, data, size); ++ if (written < 0) { ++ ucs_warn("failed to write %zu bytes to profiling file: %m", size); ++ } else if (size != written) { ++ ucs_warn("wrote only %zd of %zu bytes to profiling file: %m", ++ written, size); ++ } ++} ++ ++static void ucs_profile_file_write_records(int fd, ucs_profile_record_t *begin, ++ ucs_profile_record_t *end) ++{ ++ ucs_profile_file_write_data(fd, begin, (void*)end - (void*)begin); ++} ++ ++static void ucs_profile_write() ++{ ++ ucs_profile_header_t header; ++ char fullpath[1024] = {0}; ++ char filename[1024] = {0}; ++ int fd; ++ ++ if (!ucs_global_opts.profile_mode) { ++ return; ++ } ++ ++ ucs_fill_filename_template(ucs_global_opts.profile_file, ++ filename, sizeof(filename)); ++ ucs_expand_path(filename, fullpath, sizeof(fullpath) - 1); ++ ++ fd = open(fullpath, O_WRONLY|O_CREAT|O_TRUNC, 0600); ++ if (fd < 0) { ++ ucs_error("failed to write profiling data to '%s': %m", fullpath); ++ return; ++ } ++ ++ /* write header */ ++ memset(&header, 0, sizeof(header)); ++ ucs_read_file(header.cmdline, sizeof(header.cmdline), 1, "/proc/self/cmdline"); ++ strncpy(header.hostname, ucs_get_host_name(), sizeof(header.hostname) - 1); ++ header.pid = getpid(); ++ header.mode = ucs_global_opts.profile_mode; ++ header.num_locations = ucs_profile_ctx.num_locations; ++ header.num_records = ucs_profile_ctx.log.wraparound ? ++ (ucs_profile_ctx.log.end - ucs_profile_ctx.log.start) : ++ (ucs_profile_ctx.log.current - ucs_profile_ctx.log.start); ++ header.one_second = ucs_time_from_sec(1.0); ++ ucs_profile_file_write_data(fd, &header, sizeof(header)); ++ ++ /* write locations */ ++ ucs_profile_file_write_data(fd, ucs_profile_ctx.locations, ++ sizeof(*ucs_profile_ctx.locations) * ++ ucs_profile_ctx.num_locations); ++ ++ /* write records */ ++ if (ucs_profile_ctx.log.wraparound > 0) { ++ ucs_profile_file_write_records(fd, ucs_profile_ctx.log.current, ++ ucs_profile_ctx.log.end); ++ } ++ ucs_profile_file_write_records(fd, ucs_profile_ctx.log.start, ++ ucs_profile_ctx.log.current); ++ ++ close(fd); ++} ++ ++/* ++ * Register a profiling location - should be called once per location in the ++ * code, before the first record of each such location is made. ++ * SHOULD NOT be used directly - use UCS_PROFILE macros instead. ++ * ++ * @param [in] type Location type. ++ * @param [in] file Source file name. ++ * @param [in] line Source line number. ++ * @param [in] function Calling function name. ++ * @param [in] name Location name. ++ * @param [out] loc_id_p Filled with location ID: ++ * 0 - profiling is disabled ++ * >0 - location index + 1 ++ */ ++static void ucs_profile_get_location(ucs_profile_type_t type, const char *name, ++ const char *file, int line, ++ const char *function, volatile int *loc_id_p) ++{ ++ ucs_profile_global_context_t *ctx = &ucs_profile_ctx; ++ ucs_profile_location_t *loc; ++ int location; ++ int i; ++ ++ pthread_mutex_lock(&ucs_profile_ctx.mutex); ++ ++ if (*loc_id_p == 0) { ++ goto out_unlock; ++ } ++ ++ /* Check if profiling is disabled */ ++ if (!ucs_global_opts.profile_mode) { ++ *loc_id_p = 0; ++ goto out_unlock; ++ } ++ ++ /* Location ID must be uninitialized */ ++ ucs_assert(*loc_id_p == -1); ++ ++ for (i = 0; i < ctx->num_locations; ++i) { ++ loc = &ctx->locations[i]; ++ ++ if ((type == loc->type) && ++ (line == loc->line) && ++ !strcmp(loc->name, name) && ++ !strcmp(loc->file, basename(file)) && ++ !strcmp(loc->function, function)) { ++ ++ *loc_id_p = i + 1; ++ goto out_unlock; ++ } ++ } ++ ++ location = ucs_profile_ctx.num_locations++; ++ ++ /* Reallocate array if needed */ ++ if (ucs_profile_ctx.num_locations > ucs_profile_ctx.max_locations) { ++ ucs_profile_ctx.max_locations = ucs_profile_ctx.num_locations * 2; ++ ucs_profile_ctx.locations = ucs_realloc(ucs_profile_ctx.locations, ++ sizeof(*ucs_profile_ctx.locations) * ++ ucs_profile_ctx.max_locations, ++ "profile_locations"); ++ if (ucs_profile_ctx.locations == NULL) { ++ ucs_warn("failed to expand locations array"); ++ *loc_id_p = 0; ++ goto out_unlock; ++ } ++ } ++ ++ /* Initialize new location */ ++ loc = &ucs_profile_ctx.locations[location]; ++ ucs_strncpy_zero(loc->file, basename(file), sizeof(loc->file)); ++ ucs_strncpy_zero(loc->function, function, sizeof(loc->function)); ++ ucs_strncpy_zero(loc->name, name, sizeof(loc->name)); ++ loc->line = line; ++ loc->type = type; ++ loc->total_time = 0; ++ loc->count = 0; ++ loc->loc_id_p = loc_id_p; ++ ++ ucs_memory_cpu_store_fence(); ++ *loc_id_p = location + 1; ++ ++out_unlock: ++ pthread_mutex_unlock(&ucs_profile_ctx.mutex); ++} ++ ++void ucs_profile_record(ucs_profile_type_t type, const char *name, ++ uint32_t param32, uint64_t param64, const char *file, ++ int line, const char *function, volatile int *loc_id_p) ++{ ++ extern ucs_profile_global_context_t ucs_profile_ctx; ++ ucs_profile_global_context_t *ctx = &ucs_profile_ctx; ++ ucs_profile_record_t *rec; ++ ucs_profile_location_t *loc; ++ ucs_time_t current_time; ++ int loc_id; ++ ++ /* If the location id is -1 or 0, need to re-read it with lock held */ ++ if (ucs_unlikely((loc_id = *loc_id_p) <= 0)) { ++ ucs_profile_get_location(type, name, file, line, function, loc_id_p); ++ if ((loc_id = *loc_id_p) == 0) { ++ return; ++ } ++ } ++ ++ ucs_memory_cpu_load_fence(); ++ ucs_assert(*loc_id_p != 0); ++ ucs_assert(ucs_global_opts.profile_mode != 0); ++ ++ current_time = ucs_get_time(); ++ if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_ACCUM)) { ++ loc = &ctx->locations[loc_id - 1]; ++ switch (type) { ++ case UCS_PROFILE_TYPE_SCOPE_BEGIN: ++ ctx->accum.stack[++ctx->accum.stack_top] = current_time; ++ break; ++ case UCS_PROFILE_TYPE_SCOPE_END: ++ loc->total_time += current_time - ctx->accum.stack[ctx->accum.stack_top]; ++ --ctx->accum.stack_top; ++ break; ++ default: ++ break; ++ } ++ ++loc->count; ++ } ++ ++ if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_LOG)) { ++ rec = ctx->log.current; ++ rec->timestamp = current_time; ++ rec->param64 = param64; ++ rec->param32 = param32; ++ rec->location = loc_id - 1; ++ if (++ctx->log.current >= ctx->log.end) { ++ ctx->log.current = ctx->log.start; ++ ctx->log.wraparound = 1; ++ } ++ } ++} ++ ++ ++void ucs_profile_global_init() ++{ ++ size_t num_records; ++ ++ if (!ucs_global_opts.profile_mode) { ++ goto off; ++ } ++ ++ if (!strlen(ucs_global_opts.profile_file)) { ++ ucs_warn("profiling file not specified, profiling is disabled"); ++ goto disable; ++ } ++ ++ if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_LOG)) { ++ num_records = ucs_global_opts.profile_log_size / sizeof(ucs_profile_record_t); ++ ucs_profile_ctx.log.start = ucs_calloc(num_records, ++ sizeof(ucs_profile_record_t), ++ "profile_log"); ++ if (ucs_profile_ctx.log.start == NULL) { ++ ucs_warn("failed to allocate profiling log"); ++ goto disable; ++ } ++ ++ ucs_profile_ctx.log.end = ucs_profile_ctx.log.start + num_records; ++ ucs_profile_ctx.log.current = ucs_profile_ctx.log.start; ++ } ++ ++ if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_ACCUM)) { ++ ucs_profile_ctx.accum.stack_top = -1; ++ } ++ ++ ucs_info("profiling is enabled"); ++ return; ++ ++disable: ++ ucs_global_opts.profile_mode = 0; ++off: ++ ucs_trace("profiling is disabled"); ++} ++ ++static void ucs_profile_reset_locations() ++{ ++ ucs_profile_location_t *loc; ++ ++ pthread_mutex_lock(&ucs_profile_ctx.mutex); ++ for (loc = ucs_profile_ctx.locations; ++ loc < ucs_profile_ctx.locations + ucs_profile_ctx.num_locations; ++ ++loc) ++ { ++ *loc->loc_id_p = -1; ++ } ++ ++ ucs_profile_ctx.num_locations = 0; ++ ucs_profile_ctx.max_locations = 0; ++ ucs_free(ucs_profile_ctx.locations); ++ ucs_profile_ctx.locations = NULL; ++ pthread_mutex_unlock(&ucs_profile_ctx.mutex); ++} ++ ++void ucs_profile_global_cleanup() ++{ ++ ucs_profile_write(); ++ ucs_free(ucs_profile_ctx.log.start); ++ ucs_profile_ctx.log.start = NULL; ++ ucs_profile_ctx.log.end = NULL; ++ ucs_profile_ctx.log.current = NULL; ++ ucs_profile_ctx.log.wraparound = 0; ++ ucs_profile_reset_locations(); ++} ++ ++void ucs_profile_dump() ++{ ++ ucs_profile_location_t *loc; ++ ++ ucs_profile_write(); ++ ++ for (loc = ucs_profile_ctx.locations; ++ loc < ucs_profile_ctx.locations + ucs_profile_ctx.num_locations; ++ ++loc) ++ { ++ loc->count = 0; ++ loc->total_time = 0; ++ } ++ ++ if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_LOG)) { ++ ucs_profile_ctx.log.wraparound = 0; ++ ucs_profile_ctx.log.current = ucs_profile_ctx.log.start; ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.h +new file mode 100644 +index 0000000..e8e7fe8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.h +@@ -0,0 +1,20 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCS_PROFILE_H_ ++#define UCS_PROFILE_H_ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#if HAVE_PROFILING ++# include "profile_on.h" ++#else ++# include "profile_off.h" ++#endif ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_defs.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_defs.h +new file mode 100644 +index 0000000..930ed6b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_defs.h +@@ -0,0 +1,106 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCS_PROFILE_DEFS_H_ ++#define UCS_PROFILE_DEFS_H_ ++ ++#include ++#include ++#include ++ ++ ++BEGIN_C_DECLS ++ ++#define UCS_PROFILE_STACK_MAX 64 ++ ++ ++/** ++ * Profiling modes ++ */ ++enum { ++ UCS_PROFILE_MODE_ACCUM, /**< Accumulate elapsed time per location */ ++ UCS_PROFILE_MODE_LOG, /**< Record all events */ ++ UCS_PROFILE_MODE_LAST ++}; ++ ++ ++/** ++ * Profiling location type ++ */ ++typedef enum { ++ UCS_PROFILE_TYPE_SAMPLE, /**< Sample only */ ++ UCS_PROFILE_TYPE_SCOPE_BEGIN, /**< Begin a scope */ ++ UCS_PROFILE_TYPE_SCOPE_END, /**< End a scope */ ++ UCS_PROFILE_TYPE_REQUEST_NEW, /**< New asynchronous request */ ++ UCS_PROFILE_TYPE_REQUEST_EVENT, /**< Some progress is made on a request */ ++ UCS_PROFILE_TYPE_REQUEST_FREE, /**< Asynchronous request released */ ++ UCS_PROFILE_TYPE_LAST ++} ucs_profile_type_t; ++ ++ ++/** ++ * Profile output file header ++ */ ++typedef struct ucs_profile_header { ++ char cmdline[1024]; /**< Command line */ ++ char hostname[40]; /**< Host name */ ++ uint32_t pid; /**< Process ID */ ++ uint32_t mode; /**< Profiling mode */ ++ uint32_t num_locations; /**< Number of locations in the file */ ++ uint64_t num_records; /**< Number of records in the file */ ++ uint64_t one_second; /**< How much time is one second on the sampled machine */ ++} UCS_S_PACKED ucs_profile_header_t; ++ ++ ++/** ++ * Profile output file sample record ++ */ ++typedef struct ucs_profile_record { ++ uint64_t timestamp; /**< Record timestamp */ ++ uint64_t param64; /**< Custom 64-bit parameter */ ++ uint32_t param32; /**< Custom 32-bit parameter */ ++ uint32_t location; /**< Location identifier */ ++} UCS_S_PACKED ucs_profile_record_t; ++ ++ ++/** ++ * Profile location record ++ */ ++typedef struct ucs_profile_location { ++ char file[64]; /**< Source file name */ ++ char function[64]; /**< Function name */ ++ char name[32]; /**< User-provided name */ ++ volatile int *loc_id_p; /**< Back-pointer for location ID */ ++ int line; /**< Source line number */ ++ uint8_t type; /**< From ucs_profile_type_t */ ++ uint64_t total_time; /**< Total interval from previous location */ ++ size_t count; /**< Number of times we've hit this location */ ++} UCS_S_PACKED ucs_profile_location_t; ++ ++ ++extern const char *ucs_profile_mode_names[]; ++ ++ ++/** ++ * Initialize profiling system. ++ */ ++void ucs_profile_global_init(); ++ ++ ++/** ++ * Save and cleanup profiling. ++ */ ++void ucs_profile_global_cleanup(); ++ ++ ++/** ++ * Save and reset profiling. ++ */ ++void ucs_profile_dump(); ++ ++END_C_DECLS ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_off.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_off.h +new file mode 100644 +index 0000000..06df5a1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_off.h +@@ -0,0 +1,31 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCS_PROFILE_OFF_H_ ++#define UCS_PROFILE_OFF_H_ ++ ++#include "profile_defs.h" ++ ++#include ++ ++ ++#define UCS_PROFILE(...) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_SAMPLE(_name) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_SCOPE_BEGIN() UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_SCOPE_END(_name) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_CODE(_name) ++#define UCS_PROFILE_FUNC(_ret_type, _name, _arglist, ...) _ret_type _name(__VA_ARGS__) ++#define UCS_PROFILE_FUNC_VOID(_name, _arglist, ...) void _name(__VA_ARGS__) ++#define UCS_PROFILE_NAMED_CALL(_name, _func, ...) _func(__VA_ARGS__) ++#define UCS_PROFILE_CALL(_func, ...) _func(__VA_ARGS__) ++#define UCS_PROFILE_NAMED_CALL_VOID(_name, _func, ...) _func(__VA_ARGS__) ++#define UCS_PROFILE_CALL_VOID(_func, ...) _func(__VA_ARGS__) ++#define UCS_PROFILE_REQUEST_NEW(...) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_REQUEST_EVENT(...) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(...) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_REQUEST_FREE(...) UCS_EMPTY_STATEMENT ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_on.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_on.h +new file mode 100644 +index 0000000..49eaa15 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_on.h +@@ -0,0 +1,276 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCS_PROFILE_ON_H_ ++#define UCS_PROFILE_ON_H_ ++ ++#include "profile_defs.h" ++ ++#include ++#include ++#include ++ ++ ++BEGIN_C_DECLS ++ ++/* Helper macro */ ++#define _UCS_PROFILE_RECORD(_type, _name, _param64, _param32, _loc_id_p) \ ++ { \ ++ if (*(_loc_id_p) != 0) { \ ++ ucs_profile_record((_type), (_name), (_param64), (_param32), \ ++ __FILE__, __LINE__, __FUNCTION__, (_loc_id_p)); \ ++ } \ ++ } ++ ++ ++/* Helper macro */ ++#define __UCS_PROFILE_CODE(_name, _loop_var) \ ++ int _loop_var ; \ ++ for (({ UCS_PROFILE_SCOPE_BEGIN(); _loop_var = 1;}); \ ++ _loop_var; \ ++ ({ UCS_PROFILE_SCOPE_END(_name); _loop_var = 0;})) ++ ++ ++/* Helper macro */ ++#define _UCS_PROFILE_CODE(_name, _var_suffix) \ ++ __UCS_PROFILE_CODE(_name, UCS_PP_TOKENPASTE(loop, _var_suffix)) ++ ++ ++/** ++ * Record a profiling event. ++ * ++ * @param _type Event type. ++ * @param _name Event name. ++ * @param _param32 Custom 32-bit parameter. ++ * @param _param64 Custom 64-bit parameter. ++ */ ++#define UCS_PROFILE(_type, _name, _param32, _param64) \ ++ { \ ++ static int loc_id = -1; \ ++ _UCS_PROFILE_RECORD((_type), (_name), (_param32), (_param64), &loc_id); \ ++ } ++ ++ ++/** ++ * Record a profiling sample event. ++ * ++ * @param _name Event name. ++ */ ++#define UCS_PROFILE_SAMPLE(_name) \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_SAMPLE, (_name), 0, 0) ++ ++ ++/** ++ * Record a scope-begin profiling event. ++ */ ++#define UCS_PROFILE_SCOPE_BEGIN() \ ++ { \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_SCOPE_BEGIN, "", 0, 0); \ ++ ucs_compiler_fence(); \ ++ } ++ ++ ++/** ++ * Record a scope-end profiling event. ++ * ++ * @param _name Scope name. ++ */ ++#define UCS_PROFILE_SCOPE_END(_name) \ ++ { \ ++ ucs_compiler_fence(); \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_SCOPE_END, _name, 0, 0); \ ++ } ++ ++ ++/** ++ * Declare a profiled scope of code. ++ * ++ * Usage: ++ * UCS_PROFILE_CODE() { ++ * ++ * } ++ * ++ * @param _name Scope name. ++ */ ++#define UCS_PROFILE_CODE(_name) \ ++ _UCS_PROFILE_CODE(_name, UCS_PP_UNIQUE_ID) ++ ++ ++/** ++ * Create a profiled function. ++ * ++ * Usage: ++ * UCS_PROFILE_FUNC(, , (a, b), int a, char b) ++ * ++ * @param _ret_type Function return type. ++ * @param _name Function name. ++ * @param _arglist List of argument *names* only. ++ * @param ... Argument declarations (with types). ++ */ ++#define UCS_PROFILE_FUNC(_ret_type, _name, _arglist, ...) \ ++ static UCS_F_ALWAYS_INLINE _ret_type _name##_inner(__VA_ARGS__); \ ++ \ ++ _ret_type _name(__VA_ARGS__) { \ ++ UCS_PROFILE_SCOPE_BEGIN(); \ ++ _ret_type _ret = _name##_inner _arglist; \ ++ UCS_PROFILE_SCOPE_END(#_name); \ ++ return _ret; \ ++ } \ ++ static UCS_F_ALWAYS_INLINE _ret_type _name##_inner(__VA_ARGS__) ++ ++ ++/** ++ * Create a profiled function whose return type is void. ++ * ++ * Usage: ++ * UCS_PROFILE_FUNC_VOID(, (a, b), int a, char b) ++ * ++ * @param _name Function name. ++ * @param _arglist List of argument *names* only. ++ * @param ... Argument declarations (with types). ++ */ ++#define UCS_PROFILE_FUNC_VOID(_name, _arglist, ...) \ ++ static UCS_F_ALWAYS_INLINE void _name##_inner(__VA_ARGS__); \ ++ \ ++ void _name(__VA_ARGS__) { \ ++ UCS_PROFILE_SCOPE_BEGIN(); \ ++ _name##_inner _arglist; \ ++ UCS_PROFILE_SCOPE_END(#_name); \ ++ } \ ++ static UCS_F_ALWAYS_INLINE void _name##_inner(__VA_ARGS__) ++ ++ ++/* ++ * Profile a function call, and specify explicit name string for the profile. ++ * Useful when calling a function by a pointer. ++ * ++ * Usage: ++ * UCS_PROFILE_NAMED_CALL("name", function, arg1, arg2) ++ * ++ * @param _name Name string for the profile. ++ * @param _func Function name. ++ * @param ... Function call arguments. ++ */ ++#define UCS_PROFILE_NAMED_CALL(_name, _func, ...) \ ++ ({ \ ++ typeof(_func(__VA_ARGS__)) retval; \ ++ UCS_PROFILE_SCOPE_BEGIN(); \ ++ retval = _func(__VA_ARGS__); \ ++ UCS_PROFILE_SCOPE_END(_name); \ ++ retval; \ ++ }) ++ ++ ++/* ++ * Profile a function call. ++ * ++ * Usage: ++ * UCS_PROFILE_CALL(function, arg1, arg2) ++ * ++ * @param _func Function name. ++ * @param ... Function call arguments. ++ */ ++#define UCS_PROFILE_CALL(_func, ...) \ ++ UCS_PROFILE_NAMED_CALL(#_func, _func, ## __VA_ARGS__) ++ ++ ++/* ++ * Profile a function call which does not return a value, and specify explicit ++ * name string for the profile. Useful when calling a function by a pointer. ++ * ++ * Usage: ++ * UCS_PROFILE_NAMED_CALL_VOID("name", function, arg1, arg2) ++ * ++ * @param _name Name string for the profile. ++ * @param _func Function name. ++ * @param ... Function call arguments. ++ */ ++#define UCS_PROFILE_NAMED_CALL_VOID(_name, _func, ...) \ ++ { \ ++ UCS_PROFILE_SCOPE_BEGIN(); \ ++ _func(__VA_ARGS__); \ ++ UCS_PROFILE_SCOPE_END(_name); \ ++ } ++ ++ ++/* ++ * Profile a function call which does not return a value. ++ * ++ * Usage: ++ * UCS_PROFILE_CALL_VOID(function, arg1, arg2) ++ * ++ * @param _func Function name. ++ * @param ... Function call arguments. ++ */ ++#define UCS_PROFILE_CALL_VOID(_func, ...) \ ++ UCS_PROFILE_NAMED_CALL_VOID(#_func, _func, ## __VA_ARGS__) ++ ++ ++/* ++ * Profile a new request allocation. ++ * ++ * @param _req Request pointer. ++ * @param _name Allocation site name. ++ * @param _param32 Custom 32-bit parameter. ++ */ ++#define UCS_PROFILE_REQUEST_NEW(_req, _name, _param32) \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_NEW, (_name), (_param32), (uintptr_t)(_req)); ++ ++ ++/* ++ * Profile a request progress event. ++ * ++ * @param _req Request pointer. ++ * @param _name Event name. ++ * @param _param32 Custom 32-bit parameter. ++ */ ++#define UCS_PROFILE_REQUEST_EVENT(_req, _name, _param32) \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_EVENT, (_name), (_param32), (uintptr_t)(_req)); ++ ++ ++/* ++ * Profile a request progress event with status check. ++ * ++ * @param _req Request pointer. ++ * @param _name Event name. ++ * @param _param32 Custom 32-bit parameter. ++ * @param _status Status of the last progress event. ++ */ ++#define UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(_req, _name, _param32, _status) \ ++ if (!UCS_STATUS_IS_ERR(_status)) { \ ++ UCS_PROFILE_REQUEST_EVENT((_req), (_name), (_param32)); \ ++ } ++ ++ ++/* ++ * Profile a request release. ++ * ++ * @param _req Request pointer. ++ */ ++#define UCS_PROFILE_REQUEST_FREE(_req) \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_FREE, "", 0, (uintptr_t)(_req)); ++ ++ ++/* ++ * Store a new record with the given data. ++ * SHOULD NOT be used directly - use UCS_PROFILE macros instead. ++ * ++ * @param [in] type Location type. ++ * @param [in] name Location name. ++ * @param [in] param32 custom 32-bit parameter. ++ * @param [in] param64 custom 64-bit parameter. ++ * @param [in] file Source file name. ++ * @param [in] line Source line number. ++ * @param [in] function Calling function name. ++ * @param [in,out] loc_id_p Variable used to maintain the location ID. ++ */ ++void ucs_profile_record(ucs_profile_type_t type, const char *name, ++ uint32_t param32, uint64_t param64, const char *file, ++ int line, const char *function, volatile int *loc_id_p); ++ ++END_C_DECLS ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/libstats.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/libstats.h +index 425aab6..64abd50 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/libstats.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/libstats.h +@@ -28,7 +28,7 @@ enum { + #define UCS_STATS_DEFAULT_UDP_PORT 37873 + + +-#define UCS_STAT_NAME_MAX 31 ++#define UCS_STAT_NAME_MAX 39 + + #define UCS_STATS_NODE_FMT \ + "%s%s" +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/stats_fwd.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/stats_fwd.h +index 69a0d72..7fc0db6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/stats_fwd.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/stats_fwd.h +@@ -26,7 +26,7 @@ typedef enum { + } ucs_stats_formats_t; + + extern const char *ucs_stats_formats_names[]; +-ucs_stats_node_t * ucs_stats_get_root(); ++ucs_stats_node_t * ucs_stats_get_root(void); + + END_C_DECLS + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler.h +index 8f56c47..c9c6c60 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler.h +@@ -36,23 +36,21 @@ + #endif + + +-/* Helper macro for address arithmetic in bytes */ +-#define UCS_PTR_BYTE_OFFSET(_ptr, _offset) \ +- ((void *)((uintptr_t)(_ptr) + (_offset))) +- + /** + * Copy words from _src to _dst. + * ++ * @param _dst_type Type to use for destination buffer. + * @param _dst Destination buffer. ++ * @param _src_type Type to use for source buffer. + * @param _src Source buffer. +- * @param _word_type Type to use for copying. + * @param _size Number of bytes to copy. + */ +-#define UCS_WORD_COPY(_dst, _src, _word_type, _size) \ ++#define UCS_WORD_COPY(_dst_type, _dst, _src_type, _src, _size) \ + { \ + unsigned i; \ +- for (i = 0; i < (_size) / sizeof(_word_type); ++i) { \ +- *((_word_type*)(_dst) + i) = *((_word_type*)(_src) + i); \ ++ UCS_STATIC_ASSERT(sizeof(_src_type) == sizeof(_dst_type)); \ ++ for (i = 0; i < (_size) / sizeof(_src_type); ++i) { \ ++ *((_dst_type*)(_dst) + i) = *((_src_type*)(_src) + i); \ + } \ + } + +@@ -67,6 +65,11 @@ + alloca(_size); \ + }) + ++/** ++ * suppress unaligned pointer warning (actual on armclang5 platform) ++ */ ++#define ucs_unaligned_ptr(_ptr) ({void *_p = (void*)(_ptr); _p;}) ++ + + /** + * Define cache-line padding variable inside a structure +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler_def.h +index c337e9d..011cb81 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler_def.h +@@ -87,6 +87,10 @@ + /* Used for labels */ + #define UCS_EMPTY_STATEMENT {} + ++/* Helper macro for address arithmetic in bytes */ ++#define UCS_PTR_BYTE_OFFSET(_ptr, _offset) \ ++ ((void *)((uintptr_t)(_ptr) + (_offset))) ++ + /** + * Size of statically-declared array + */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/init.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/init.c +index f3bdecd..2c2a51c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/init.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/init.c +@@ -6,10 +6,11 @@ + + #include + #include ++#include + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -86,6 +87,7 @@ static void UCS_F_CTOR ucs_init() + ucs_async_global_init(); + ucs_debug("%s loaded at 0x%lx", ucs_debug_get_lib_path(), + ucs_debug_get_lib_base_addr()); ++ ucs_debug("cmd line: %s", ucs_get_process_cmdline()); + } + + static void UCS_F_DTOR ucs_cleanup(void) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.c +new file mode 100644 +index 0000000..de78381 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.c +@@ -0,0 +1,214 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "memtype_cache.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++static ucs_pgt_dir_t *ucs_memtype_cache_pgt_dir_alloc(const ucs_pgtable_t *pgtable) ++{ ++ return ucs_memalign(UCS_PGT_ENTRY_MIN_ALIGN, sizeof(ucs_pgt_dir_t), ++ "memtype_cache_pgdir"); ++} ++ ++static void ucs_memtype_cache_pgt_dir_release(const ucs_pgtable_t *pgtable, ++ ucs_pgt_dir_t *dir) ++{ ++ ucs_free(dir); ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucs_memtype_cache_insert(ucs_memtype_cache_t *memtype_cache, void *address, ++ size_t size, ucm_mem_type_t mem_type) ++{ ++ ucs_memtype_cache_region_t *region; ++ ucs_pgt_addr_t start, end; ++ ucs_status_t status; ++ ++ ucs_trace("memtype_cache:insert address:%p length:%zu mem_type:%d", ++ address, size, mem_type); ++ ++ pthread_rwlock_wrlock(&memtype_cache->lock); ++ ++ /* Align to page size */ ++ start = ucs_align_down_pow2((uintptr_t)address, UCS_PGT_ADDR_ALIGN); ++ end = ucs_align_up_pow2 ((uintptr_t)address + size, UCS_PGT_ADDR_ALIGN); ++ region = NULL; ++ ++ /* Allocate structure for new region */ ++ region = ucs_memalign(UCS_PGT_ENTRY_MIN_ALIGN, sizeof(ucs_memtype_cache_region_t), ++ "memtype_cache_region"); ++ if (region == NULL) { ++ ucs_warn("failed to allocate memtype_cache region"); ++ goto out_unlock; ++ } ++ ++ region->super.start = start; ++ region->super.end = end; ++ region->mem_type = mem_type; ++ status = UCS_PROFILE_CALL(ucs_pgtable_insert, &memtype_cache->pgtable, ++ ®ion->super); ++ if (status != UCS_OK) { ++ ucs_error("failed to insert region " UCS_PGT_REGION_FMT ": %s", ++ UCS_PGT_REGION_ARG(®ion->super), ucs_status_string(status)); ++ ucs_free(region); ++ goto out_unlock; ++ } ++ ++out_unlock: ++ pthread_rwlock_unlock(&memtype_cache->lock); ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucs_memtype_cache_delete(ucs_memtype_cache_t *memtype_cache, void *address, ++ size_t size, ucm_mem_type_t mem_type) ++{ ++ ucs_pgt_addr_t start = (uintptr_t)address; ++ ucs_pgt_region_t *pgt_region; ++ ucs_memtype_cache_region_t *region; ++ ucs_status_t status; ++ ++ ucs_trace("memtype_cache:delete address:%p length:%zu mem_type:%d", ++ address, size, mem_type); ++ ++ pthread_rwlock_rdlock(&memtype_cache->lock); ++ ++ pgt_region = UCS_PROFILE_CALL(ucs_pgtable_lookup, &memtype_cache->pgtable, start); ++ assert(pgt_region != NULL); ++ ++ region = ucs_derived_of(pgt_region, ucs_memtype_cache_region_t); ++ ++ status = ucs_pgtable_remove(&memtype_cache->pgtable, ®ion->super); ++ if (status != UCS_OK) { ++ ucs_warn("failed to remove address:%p from memtype_cache", address); ++ } ++ ucs_free(region); ++ pthread_rwlock_unlock(&memtype_cache->lock); ++} ++ ++static void ucs_memtype_cache_event_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, void *arg) ++{ ++ ucs_memtype_cache_t *memtype_cache = arg; ++ ++ if (event_type & UCM_EVENT_MEM_TYPE_ALLOC) { ++ ucs_memtype_cache_insert(memtype_cache, event->mem_type.address, ++ event->mem_type.size, event->mem_type.mem_type); ++ } else if (event_type & UCM_EVENT_MEM_TYPE_FREE) { ++ ucs_memtype_cache_delete(memtype_cache, event->mem_type.address, ++ event->mem_type.size, event->mem_type.mem_type); ++ } ++} ++ ++static void ucs_memtype_cache_region_collect_callback(const ucs_pgtable_t *pgtable, ++ ucs_pgt_region_t *pgt_region, ++ void *arg) ++{ ++ ucs_memtype_cache_region_t *region = ucs_derived_of(pgt_region, ++ ucs_memtype_cache_region_t); ++ ucs_list_link_t *list = arg; ++ ucs_list_add_tail(list, ®ion->list); ++} ++ ++static void ucs_memtype_cache_purge(ucs_memtype_cache_t *memtype_cache) ++{ ++ ucs_memtype_cache_region_t *region, *tmp; ++ ucs_list_link_t region_list; ++ ++ ucs_trace_func("memtype_cache purge"); ++ ++ ucs_list_head_init(®ion_list); ++ ucs_pgtable_purge(&memtype_cache->pgtable, ucs_memtype_cache_region_collect_callback, ++ ®ion_list); ++ ucs_list_for_each_safe(region, tmp, ®ion_list, list) { ++ ucs_warn("destroying inuse address:%p ", (void *)region->super.start); ++ ucs_free(region); ++ } ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucs_memtype_cache_lookup, ++ (memtype_cache, address, length, ucm_mem_type), ++ ucs_memtype_cache_t *memtype_cache, void *address, ++ size_t length, ucm_mem_type_t *ucm_mem_type) ++{ ++ ucs_pgt_addr_t start = (uintptr_t)address; ++ ucs_pgt_region_t *pgt_region; ++ ucs_memtype_cache_region_t *region; ++ ucs_status_t status; ++ ++ pthread_rwlock_rdlock(&memtype_cache->lock); ++ ++ pgt_region = UCS_PROFILE_CALL(ucs_pgtable_lookup, &memtype_cache->pgtable, start); ++ if (pgt_region && pgt_region->end >= (start + length)) { ++ region = ucs_derived_of(pgt_region, ucs_memtype_cache_region_t); ++ *ucm_mem_type = region->mem_type; ++ status = UCS_OK; ++ goto out_unlock; ++ } ++ status = UCS_ERR_NO_ELEM; ++out_unlock: ++ pthread_rwlock_unlock(&memtype_cache->lock); ++ return status; ++} ++ ++static UCS_CLASS_INIT_FUNC(ucs_memtype_cache_t) ++{ ++ ucs_status_t status; ++ int ret; ++ ++ ret = pthread_rwlock_init(&self->lock, NULL); ++ if (ret) { ++ ucs_error("pthread_rwlock_init() failed: %m"); ++ status = UCS_ERR_INVALID_PARAM; ++ goto err; ++ } ++ ++ status = ucs_pgtable_init(&self->pgtable, ucs_memtype_cache_pgt_dir_alloc, ++ ucs_memtype_cache_pgt_dir_release); ++ if (status != UCS_OK) { ++ goto err_destroy_rwlock; ++ } ++ ++ status = ucm_set_event_handler((UCM_EVENT_MEM_TYPE_ALLOC | UCM_EVENT_MEM_TYPE_FREE), ++ 1000, ucs_memtype_cache_event_callback, self); ++ if (status != UCS_OK) { ++ goto err_cleanup_pgtable; ++ } ++ ++ return UCS_OK; ++ ++err_cleanup_pgtable: ++ ucs_pgtable_cleanup(&self->pgtable); ++err_destroy_rwlock: ++ pthread_rwlock_destroy(&self->lock); ++err: ++ return status; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(ucs_memtype_cache_t) ++{ ++ ucm_unset_event_handler((UCM_EVENT_MEM_TYPE_ALLOC | UCM_EVENT_MEM_TYPE_FREE), ++ ucs_memtype_cache_event_callback, self); ++ ucs_memtype_cache_purge(self); ++ ucs_pgtable_cleanup(&self->pgtable); ++ pthread_rwlock_destroy(&self->lock); ++} ++ ++UCS_CLASS_DEFINE(ucs_memtype_cache_t, void); ++UCS_CLASS_DEFINE_NAMED_NEW_FUNC(ucs_memtype_cache_create, ucs_memtype_cache_t, ++ ucs_memtype_cache_t) ++UCS_CLASS_DEFINE_NAMED_DELETE_FUNC(ucs_memtype_cache_destroy, ucs_memtype_cache_t, ++ ucs_memtype_cache_t) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.h +new file mode 100644 +index 0000000..209be05 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.h +@@ -0,0 +1,61 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCS_MEMTYPE_CACHE_H_ ++#define UCS_MEMTYPE_CACHE_H_ ++ ++#include ++#include ++#include ++#include ++ ++typedef struct ucs_memtype_cache ucs_memtype_cache_t; ++typedef struct ucs_memtype_cache_region ucs_memtype_cache_region_t; ++ ++ ++struct ucs_memtype_cache_region { ++ ucs_pgt_region_t super; /**< Base class - page table region */ ++ ucs_list_link_t list; /**< List element */ ++ ucm_mem_type_t mem_type; /**< Memory type the address belongs to */ ++}; ++ ++ ++struct ucs_memtype_cache { ++ pthread_rwlock_t lock; /**< protests the page table */ ++ ucs_pgtable_t pgtable; /**< Page table to hold the regions */ ++}; ++ ++ ++/** ++ * Create a memtype cache. ++ * ++ * @param [out] memtype_cache_p Filled with a pointer to the memtype cache. ++ */ ++ucs_status_t ucs_memtype_cache_create(ucs_memtype_cache_t **memtype_cache_p); ++ ++ ++/** ++ * Destroy a memtype cache. ++ * ++ * @param [in] memtype_cache Memtype cache to destroy. ++ */ ++void ucs_memtype_cache_destroy(ucs_memtype_cache_t *memtype_cache); ++ ++ ++/** Find if address range is in memtype cache. ++ * ++ * @param [in] memtype_cache Memtype cache to search ++ * @param [in] address Address to lookup ++ * @param [in] length Length of the memory ++ * @param [out] ucm_mem_type Memory type of the address ++ * ++ * @return Error code. ++ */ ++ucs_status_t ucs_memtype_cache_lookup(ucs_memtype_cache_t *memtype_cache, void *address, ++ size_t length, ucm_mem_type_t *ucm_mem_type); ++ ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.c +index 39ac9d2..0594be3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.c +@@ -1,21 +1,23 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ + +-#include "rcache.h" + + #include + #include + #include + #include +-#include ++#include + #include + #include ++#include + #include + #include + ++#include "rcache.h" ++#include "rcache_int.h" + + #define ucs_rcache_region_log(_level, _message, ...) \ + do { \ +@@ -34,6 +36,9 @@ + #define ucs_rcache_region_trace(_message, ...) \ + ucs_rcache_region_log(UCS_LOG_LEVEL_TRACE, _message, ## __VA_ARGS__) + ++#define ucs_rcache_region_pfn(_region) \ ++ ((_region)->priv) ++ + + typedef struct ucs_rcache_inv_entry { + ucs_queue_elem_t queue; +@@ -42,6 +47,26 @@ typedef struct ucs_rcache_inv_entry { + } ucs_rcache_inv_entry_t; + + ++#if ENABLE_STATS ++static ucs_stats_class_t ucs_rcache_stats_class = { ++ .name = "rcache", ++ .num_counters = UCS_RCACHE_STAT_LAST, ++ .counter_names = { ++ [UCS_RCACHE_GETS] = "gets", ++ [UCS_RCACHE_HITS_FAST] = "hits_fast", ++ [UCS_RCACHE_HITS_SLOW] = "hits_slow", ++ [UCS_RCACHE_MISSES] = "misses", ++ [UCS_RCACHE_MERGES] = "regions_merged", ++ [UCS_RCACHE_UNMAPS] = "unmap_events", ++ [UCS_RCACHE_UNMAP_INVALIDATES] = "regions_inv_unmap", ++ [UCS_RCACHE_PUTS] = "puts", ++ [UCS_RCACHE_REGS] = "mem_regs", ++ [UCS_RCACHE_DEREGS] = "mem_deregs", ++ } ++}; ++#endif ++ ++ + static void __ucs_rcache_region_log(const char *file, int line, const char *function, + ucs_log_level_t level, ucs_rcache_t *rcache, + ucs_rcache_region_t *region, const char *fmt, +@@ -127,6 +152,26 @@ static ucs_mpool_ops_t ucs_rcache_mp_ops = { + .obj_cleanup = NULL + }; + ++/* Lock must be held for read */ ++static void ucs_rcache_region_validate_pfn(ucs_rcache_t *rcache, ++ ucs_rcache_region_t *region) ++{ ++ unsigned long region_pfn, actual_pfn; ++ ++ if (!ucs_unlikely(ucs_global_opts.rcache_check_pfn)) { ++ return; ++ } ++ ++ region_pfn = ucs_rcache_region_pfn(region); ++ actual_pfn = ucs_sys_get_pfn(region->super.start); ++ if (region_pfn != actual_pfn) { ++ ucs_rcache_region_error(rcache, region, "pfn check failed"); ++ ucs_fatal("%s: page at virtual address 0x%lx moved from pfn 0x%lx to pfn 0x%lx", ++ rcache->name, region->super.start, region_pfn, actual_pfn); ++ } else { ++ ucs_rcache_region_trace(rcache, region, "pfn ok"); ++ } ++} + + /* Lock must be held */ + static void ucs_rcache_region_collect_callback(const ucs_pgtable_t *pgtable, +@@ -156,6 +201,7 @@ static void ucs_mem_region_destroy_internal(ucs_rcache_t *rcache, + ucs_assert(!(region->flags & UCS_RCACHE_REGION_FLAG_PGTABLE)); + + if (region->flags & UCS_RCACHE_REGION_FLAG_REGISTERED) { ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_DEREGS, 1); + UCS_PROFILE_CODE("mem_dereg") { + rcache->params.ops->mem_dereg(rcache->params.context, rcache, region); + } +@@ -223,6 +269,7 @@ static void ucs_rcache_invalidate_range(ucs_rcache_t *rcache, ucs_pgt_addr_t sta + ucs_list_for_each_safe(region, tmp, ®ion_list, list) { + /* all regions on the list are in the page table */ + ucs_rcache_region_invalidate(rcache, region, 1, 0); ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_UNMAP_INVALIDATES, 1); + } + } + +@@ -260,10 +307,20 @@ static void ucs_rcache_unmapped_callback(ucm_event_type_t event_type, + ucs_rcache_inv_entry_t *entry; + ucs_pgt_addr_t start, end; + +- ucs_assert(event_type == UCM_EVENT_VM_UNMAPPED); ++ ucs_assert(event_type == UCM_EVENT_VM_UNMAPPED || ++ event_type == UCM_EVENT_MEM_TYPE_FREE); ++ ++ if (event_type == UCM_EVENT_VM_UNMAPPED) { ++ start = (uintptr_t)event->vm_unmapped.address; ++ end = (uintptr_t)event->vm_unmapped.address + event->vm_unmapped.size; ++ } else if(event_type == UCM_EVENT_MEM_TYPE_FREE) { ++ start = (uintptr_t)event->mem_type.address; ++ end = (uintptr_t)event->mem_type.address + event->mem_type.size; ++ } else { ++ ucs_warn("%s: unknown event type: %x", rcache->name, event_type); ++ return; ++ } + +- start = (uintptr_t)event->vm_unmapped.address; +- end = (uintptr_t)event->vm_unmapped.address + event->vm_unmapped.size; + ucs_trace_func("%s: event vm_unmapped 0x%lx..0x%lx", rcache->name, start, end); + + pthread_spin_lock(&rcache->inv_lock); +@@ -273,6 +330,7 @@ static void ucs_rcache_unmapped_callback(ucm_event_type_t event_type, + entry->start = start; + entry->end = end; + ucs_queue_push(&rcache->inv_q, &entry->queue); ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_UNMAPS, 1); + } else { + ucs_error("Failed to allocate invalidation entry for 0x%lx..0x%lx, " + "data corruption may occur", start, end); +@@ -341,6 +399,7 @@ ucs_rcache_check_overlap(ucs_rcache_t *rcache, ucs_pgt_addr_t *start, + return UCS_ERR_ALREADY_EXISTS; + } + ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_MERGES, 1); + /* + * If we don't provide some of the permissions the other region had, + * we might want to expand our permissions to support them. We can +@@ -426,7 +485,9 @@ retry: + /* Found a matching region (it could have been added after we released + * the lock) + */ ++ ucs_rcache_region_validate_pfn(rcache, region); + status = region->status; ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_HITS_SLOW, 1); + goto out_set_region; + } else if (status != UCS_OK) { + /* Could not create a region because there are overlapping regions which +@@ -458,12 +519,15 @@ retry: + /* If memory registration failed, keep the region and mark it as invalid, + * to avoid numerous retries of registering the region. + */ ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_REGS, 1); ++ + region->prot = prot; + region->flags = UCS_RCACHE_REGION_FLAG_PGTABLE; + region->refcount = 1; + region->status = status = + UCS_PROFILE_NAMED_CALL("mem_reg", rcache->params.ops->mem_reg, +- rcache->params.context, rcache, arg, region); ++ rcache->params.context, rcache, arg, region, ++ merged ? UCS_RCACHE_MEM_REG_HIDE_ERRORS : 0); + if (status != UCS_OK) { + if (merged) { + /* failure may be due to merge, because memory of the merged +@@ -477,8 +541,8 @@ retry: + ucs_rcache_region_invalidate(rcache, region, 1, 1); + goto retry; + } else { +- ucs_warn("failed to register region " UCS_PGT_REGION_FMT ": %s", +- UCS_PGT_REGION_ARG(®ion->super), ucs_status_string(status)); ++ ucs_debug("failed to register region " UCS_PGT_REGION_FMT ": %s", ++ UCS_PGT_REGION_ARG(®ion->super), ucs_status_string(status)); + goto out_unlock; + } + } +@@ -486,6 +550,14 @@ retry: + region->flags |= UCS_RCACHE_REGION_FLAG_REGISTERED; + region->refcount = 2; /* Page-table + user */ + ++ if (ucs_global_opts.rcache_check_pfn) { ++ ucs_rcache_region_pfn(region) = ucs_sys_get_pfn(region->super.start); ++ } else { ++ ucs_rcache_region_pfn(region) = 0; ++ } ++ ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_MISSES, 1); ++ + ucs_rcache_region_trace(rcache, region, "created"); + + out_set_region: +@@ -512,6 +584,7 @@ ucs_status_t ucs_rcache_get(ucs_rcache_t *rcache, void *address, size_t length, + length); + + pthread_rwlock_rdlock(&rcache->lock); ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_GETS, 1); + if (ucs_queue_is_empty(&rcache->inv_q)) { + pgt_region = UCS_PROFILE_CALL(ucs_pgtable_lookup, &rcache->pgtable, + start); +@@ -521,7 +594,9 @@ ucs_status_t ucs_rcache_get(ucs_rcache_t *rcache, void *address, size_t length, + ucs_rcache_region_test(region, prot)) + { + ucs_rcache_region_hold(rcache, region); ++ ucs_rcache_region_validate_pfn(rcache, region); + *region_p = region; ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_HITS_FAST, 1); + pthread_rwlock_unlock(&rcache->lock); + return UCS_OK; + } +@@ -541,6 +616,7 @@ ucs_status_t ucs_rcache_get(ucs_rcache_t *rcache, void *address, size_t length, + void ucs_rcache_region_put(ucs_rcache_t *rcache, ucs_rcache_region_t *region) + { + ucs_rcache_region_put_internal(rcache, region, 1, 0); ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_PUTS, 1); + } + + static UCS_CLASS_INIT_FUNC(ucs_rcache_t, const ucs_rcache_params_t *params, +@@ -565,12 +641,18 @@ static UCS_CLASS_INIT_FUNC(ucs_rcache_t, const ucs_rcache_params_t *params, + goto err; + } + ++ status = UCS_STATS_NODE_ALLOC(&self->stats, &ucs_rcache_stats_class, ++ stats_parent); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ + self->params = *params; + + self->name = strdup(name); + if (self->name == NULL) { + status = UCS_ERR_NO_MEMORY; +- goto err; ++ goto err_destroy_stats; + } + + ret = pthread_rwlock_init(&self->lock, NULL); +@@ -599,13 +681,14 @@ static UCS_CLASS_INIT_FUNC(ucs_rcache_t, const ucs_rcache_params_t *params, + goto err_cleanup_pgtable; + } + +- status = ucm_set_event_handler(UCM_EVENT_VM_UNMAPPED, params->ucm_event_priority, ++ ucs_queue_head_init(&self->inv_q); ++ ++ status = ucm_set_event_handler(params->ucm_events, params->ucm_event_priority, + ucs_rcache_unmapped_callback, self); + if (status != UCS_OK) { + goto err_destroy_mp; + } + +- ucs_queue_head_init(&self->inv_q); + return UCS_OK; + + err_destroy_mp: +@@ -618,13 +701,15 @@ err_destroy_rwlock: + pthread_rwlock_destroy(&self->lock); + err_free_name: + free(self->name); ++err_destroy_stats: ++ UCS_STATS_NODE_FREE(self->stats); + err: + return status; + } + + static UCS_CLASS_CLEANUP_FUNC(ucs_rcache_t) + { +- ucm_unset_event_handler(UCM_EVENT_VM_UNMAPPED, ucs_rcache_unmapped_callback, ++ ucm_unset_event_handler(self->params.ucm_events, ucs_rcache_unmapped_callback, + self); + ucs_rcache_check_inv_queue(self); + ucs_rcache_purge(self); +@@ -633,6 +718,7 @@ static UCS_CLASS_CLEANUP_FUNC(ucs_rcache_t) + ucs_pgtable_cleanup(&self->pgtable); + pthread_spin_destroy(&self->inv_lock); + pthread_rwlock_destroy(&self->lock); ++ UCS_STATS_NODE_FREE(self->stats); + free(self->name); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.h +index 47c8c42..d9db909 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.h +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -39,6 +39,12 @@ enum { + UCS_RCACHE_REGION_FLAG_PGTABLE = UCS_BIT(1) /**< In the page table */ + }; + ++/* ++ * Memory registration flags. ++ */ ++enum { ++ UCS_RCACHE_MEM_REG_HIDE_ERRORS = UCS_BIT(0) /**< Hide errors on memory registration */ ++}; + + /* + * Registration cache operations. +@@ -55,6 +61,7 @@ struct ucs_rcache_ops { + * `region_struct_size' in @ref ucs_rcache_params. + * This function may store relevant information (such + * as memory keys) inside the larger structure. ++ * @param [in] flags Memory registration flags. + * + * @return UCS_OK if registration is successful, error otherwise. + * +@@ -63,7 +70,8 @@ struct ucs_rcache_ops { + * such as error messages or fatal failure. + */ + ucs_status_t (*mem_reg)(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *region); ++ void *arg, ucs_rcache_region_t *region, ++ uint16_t flags); + /** + * Deregister a memory region. + * +@@ -98,6 +106,9 @@ struct ucs_rcache_params { + Must be smaller or equal to + system page size. */ + size_t max_alignment; /**< Maximum alignment */ ++ int ucm_events; /**< UCM events to register. Currently ++ UCM_EVENT_VM_UNMAPPED and ++ UCM_EVENT_MEM_TYPE_FREE are supported */ + int ucm_event_priority; /**< Priority of memory events */ + const ucs_rcache_ops_t *ops; /**< Memory operations functions */ + void *context; /**< User-defined context that will +@@ -113,26 +124,7 @@ struct ucs_rcache_region { + ucs_status_t status; /**< Current status code */ + uint8_t prot; /**< Protection bits */ + uint16_t flags; /**< Status flags. Protected by page table lock. */ +-}; +- +- +-struct ucs_rcache { +- ucs_rcache_params_t params; /**< rcache parameters (immutable) */ +- pthread_rwlock_t lock; /**< Protects the page table and all regions +- whose refcount is 0 */ +- ucs_pgtable_t pgtable; /**< page table to hold the regions */ +- +- pthread_spinlock_t inv_lock; /**< Lock for inv_q and inv_mp. This is a +- separate lock because we may want to put +- regions on inv_q while the page table +- lock is held by the calling context */ +- ucs_queue_head_t inv_q; /**< Regions which were invalidated during +- memory events */ +- ucs_mpool_t inv_mp; /**< Memory pool to allocate entries for inv_q, +- since we cannot use regulat malloc(). +- The backing storage is original mmap() +- which does not generate memory events */ +- char *name; ++ uint64_t priv; /**< Used internally */ + }; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache_int.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache_int.h +new file mode 100644 +index 0000000..2d8d532 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache_int.h +@@ -0,0 +1,47 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCS_REG_CACHE_INT_H_ ++#define UCS_REG_CACHE_INT_H_ ++ ++/* Names of rcache stats counters */ ++enum { ++ UCS_RCACHE_GETS, /* number of get operations */ ++ UCS_RCACHE_HITS_FAST, /* number of fast path hits */ ++ UCS_RCACHE_HITS_SLOW, /* number of slow path hits */ ++ UCS_RCACHE_MISSES, /* number of misses */ ++ UCS_RCACHE_MERGES, /* number of region merges */ ++ UCS_RCACHE_UNMAPS, /* number of memory unmap events */ ++ UCS_RCACHE_UNMAP_INVALIDATES, /* number of regions invalidated because ++ of unmap events */ ++ UCS_RCACHE_PUTS, /* number of put operations */ ++ UCS_RCACHE_REGS, /* number of memory registrations */ ++ UCS_RCACHE_DEREGS, /* number of memory deregistrations */ ++ UCS_RCACHE_STAT_LAST ++}; ++ ++ ++struct ucs_rcache { ++ ucs_rcache_params_t params; /**< rcache parameters (immutable) */ ++ pthread_rwlock_t lock; /**< Protects the page table and all regions ++ whose refcount is 0 */ ++ ucs_pgtable_t pgtable; /**< page table to hold the regions */ ++ ++ pthread_spinlock_t inv_lock; /**< Lock for inv_q and inv_mp. This is a ++ separate lock because we may want to put ++ regions on inv_q while the page table ++ lock is held by the calling context */ ++ ucs_queue_head_t inv_q; /**< Regions which were invalidated during ++ memory events */ ++ ucs_mpool_t inv_mp; /**< Memory pool to allocate entries for inv_q, ++ since we cannot use regulat malloc(). ++ The backing storage is original mmap() ++ which does not generate memory events */ ++ char *name; ++ UCS_STATS_NODE_DECLARE(stats); ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/string.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/string.c +index d2407e0..5ce1734 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/string.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/string.c +@@ -162,3 +162,5 @@ char* ucs_strncpy_safe(char *dst, const char *src, size_t len) + dst[length - 1] = '\0'; + return dst; + } ++ ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.c +index 498021e..fd72d49 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.c +@@ -27,9 +27,11 @@ + #include + #include + ++#if HAVE_SYS_CAPABILITY_H ++# include ++#endif + + /* Default huge page size is 2 MBytes */ +-#define UCS_DEFAULT_HUGEPAGE_SIZE (2 * UCS_MBYTE) + #define UCS_DEFAULT_MEM_FREE 640000 + #define UCS_PROCESS_MAPS_FILE "/proc/self/maps" + +@@ -403,12 +405,12 @@ size_t ucs_get_page_size() + return page_size; + } + +-size_t ucs_get_meminfo_entry(const char* pattern) ++static ssize_t ucs_get_meminfo_entry(const char* pattern) + { + char buf[256]; + char final_pattern[80]; + int val = 0; +- size_t val_b = 0; ++ ssize_t val_b = -1; + FILE *f; + + f = fopen("/proc/meminfo", "r"); +@@ -432,7 +434,7 @@ size_t ucs_get_memfree_size() + size_t mem_free; + + mem_free = ucs_get_meminfo_entry("MemFree"); +- if (mem_free == 0) { ++ if (mem_free == -1) { + mem_free = UCS_DEFAULT_MEM_FREE; + ucs_info("cannot determine free mem size, using default: %zu", + mem_free); +@@ -441,17 +443,15 @@ size_t ucs_get_memfree_size() + return mem_free; + } + +-size_t ucs_get_huge_page_size() ++ssize_t ucs_get_huge_page_size() + { +- static size_t huge_page_size = 0; ++ static ssize_t huge_page_size = 0; + + /* Cache the huge page size value */ + if (huge_page_size == 0) { + huge_page_size = ucs_get_meminfo_entry("Hugepagesize"); +- if (huge_page_size == 0) { +- huge_page_size = UCS_DEFAULT_HUGEPAGE_SIZE; +- ucs_warn("cannot determine huge page size, using default: %zu", +- huge_page_size); ++ if (huge_page_size == -1) { ++ ucs_debug("huge pages are not supported on the system"); + } else { + ucs_trace("detected huge page size: %zu", huge_page_size); + } +@@ -509,20 +509,137 @@ size_t ucs_get_shmmax() + return size; + } + ++static void ucs_sysv_shmget_error_check_ENOSPC(size_t alloc_size, ++ const struct shminfo *ipc_info, ++ char *buf, size_t max) ++{ ++ unsigned long new_used_ids; ++ unsigned long new_shm_tot; ++ struct shm_info shm_info; ++ char *p, *endp; ++ int ret; ++ ++ p = buf; ++ endp = p + max; ++ ++ ret = shmctl(0, SHM_INFO, (struct shmid_ds *)&shm_info); ++ if (ret >= 0) { ++ return; ++ } ++ ++ new_used_ids = shm_info.used_ids; ++ if (new_used_ids > ipc_info->shmmni) { ++ snprintf(p, endp - p, ++ ", total number of segments in the system (%lu) would exceed the" ++ " limit in /proc/sys/kernel/shmmni (=%lu)", ++ new_used_ids, ipc_info->shmmni); ++ p += strlen(p); ++ } ++ ++ new_shm_tot = shm_info.shm_tot + ++ (alloc_size + ucs_get_page_size() - 1) / ucs_get_page_size(); ++ if (new_shm_tot > ipc_info->shmall) { ++ snprintf(p, endp - p, ++ ", total shared memory pages in the system (%lu) would exceed the" ++ " limit in /proc/sys/kernel/shmall (=%lu)", ++ new_shm_tot, ipc_info->shmall); ++ p += strlen(p); ++ } ++} ++ ++static void ucs_sysv_shmget_error_check_EPERM(int flags, char *buf, size_t max) ++{ ++#if HAVE_SYS_CAPABILITY_H ++ cap_user_header_t hdr = ucs_alloca(sizeof(*hdr)); ++ cap_user_data_t data = ucs_alloca(sizeof(*data) * _LINUX_CAPABILITY_U32S_3); ++ int ret; ++ ++ hdr->pid = 0; /* current thread */ ++ hdr->version = _LINUX_CAPABILITY_VERSION_3; ++ ret = capget(hdr, data); ++ if (ret == 0) { ++ UCS_STATIC_ASSERT(CAP_IPC_LOCK < 32); /* we check this bit in data[0] */ ++ if (!(data->effective & UCS_BIT(CAP_IPC_LOCK))) { ++ /* detected missing CAP_IPC_LOCK */ ++ snprintf(buf, max, ", CAP_IPC_LOCK privilege is needed for SHM_HUGETLB"); ++ } ++ return; ++ } ++ ++ /* log error and fallback to speculative error message */ ++ ucs_debug("capget(pid=%d version=0x%x) failed: %m", hdr->pid, hdr->version); ++#endif ++ ++ snprintf(buf, max, ++ ", please check for CAP_IPC_LOCK privilege for using SHM_HUGETLB"); ++} ++ ++static void ucs_sysv_shmget_format_error(size_t alloc_size, int flags, ++ const char *alloc_name, int sys_errno, ++ char *buf, size_t max) ++{ ++ struct shminfo ipc_info; ++ char *p, *endp, *errp; ++ int ret; ++ ++ buf[0] = '\0'; ++ p = buf; ++ endp = p + max; ++ ++ snprintf(p, endp - p, "shmget(size=%zu flags=0x%x) for %s failed: %s", ++ alloc_size, flags, alloc_name, strerror(sys_errno)); ++ p += strlen(p); ++ errp = p; /* save current string pointer to detect if anything was added */ ++ ++ ret = shmctl(0, IPC_INFO, (struct shmid_ds *)&ipc_info); ++ if (ret >= 0) { ++ if ((sys_errno == EINVAL) && (alloc_size > ipc_info.shmmax)) { ++ snprintf(p, endp - p, ++ ", allocation size exceeds /proc/sys/kernel/shmmax (=%zu)", ++ ipc_info.shmmax); ++ p += strlen(p); ++ } ++ ++ if (sys_errno == ENOSPC) { ++ ucs_sysv_shmget_error_check_ENOSPC(alloc_size, &ipc_info, p, endp - p); ++ p += strlen(p); ++ } ++ } ++ ++ if (sys_errno == EPERM) { ++ ucs_sysv_shmget_error_check_EPERM(flags, p, endp - p); ++ p += strlen(p); ++ } ++ ++ /* default error message if no useful information was added to the string */ ++ if (p == errp) { ++ snprintf(p, endp - p, ", please check shared memory limits by 'ipcs -l'"); ++ p += strlen(p); ++ } ++} ++ + ucs_status_t ucs_sysv_alloc(size_t *size, size_t max_size, void **address_p, +- int flags, int *shmid UCS_MEMTRACK_ARG) ++ int flags, const char *alloc_name, int *shmid) + { +- struct shminfo shminfo, *shminfo_ptr; ++ char error_string[256]; ++ ssize_t huge_page_size; + size_t alloc_size; ++ int sys_errno; + void *ptr; +- int ret, err; ++ int ret; + +- alloc_size = ucs_memtrack_adjust_alloc_size(*size); ++ if (flags & SHM_HUGETLB) { ++ huge_page_size = ucs_get_huge_page_size(); ++ if (huge_page_size <= 0) { ++ ucs_debug("huge pages are not supported on the system"); ++ return UCS_ERR_NO_MEMORY; /* Huge pages not supported */ ++ } ++ } + +- if (flags & SHM_HUGETLB){ +- alloc_size = ucs_align_up(alloc_size, ucs_get_huge_page_size()); ++ if (flags & SHM_HUGETLB) { ++ alloc_size = ucs_align_up(*size, huge_page_size); + } else { +- alloc_size = ucs_align_up(alloc_size, ucs_get_page_size()); ++ alloc_size = ucs_align_up(*size, ucs_get_page_size()); + } + + if (alloc_size >= max_size) { +@@ -532,32 +649,22 @@ ucs_status_t ucs_sysv_alloc(size_t *size, size_t max_size, void **address_p, + flags |= IPC_CREAT | SHM_R | SHM_W; + *shmid = shmget(IPC_PRIVATE, alloc_size, flags); + if (*shmid < 0) { +- switch (errno) { +- case ENFILE: ++ sys_errno = errno; ++ ucs_sysv_shmget_format_error(alloc_size, flags, alloc_name, sys_errno, ++ error_string, sizeof(error_string)); ++ switch (sys_errno) { + case ENOMEM: +- case ENOSPC: + case EPERM: + if (!(flags & SHM_HUGETLB)) { +- err = errno; +- shminfo_ptr = &shminfo; +- if ((shmctl(0, IPC_INFO, (struct shmid_ds *) shminfo_ptr)) > -1) { +- ucs_error("shmget failed: %s. (size=%zu). The max number of shared memory segments in the system is = %ld. " +- "Please try to increase this value through /proc/sys/kernel/shmmni", +- strerror(err), alloc_size, shminfo.shmmni); +- } ++ ucs_error("%s", error_string); + } +- + return UCS_ERR_NO_MEMORY; ++ case ENOSPC: + case EINVAL: +- ucs_error("A new segment was to be created and size < SHMMIN or size > SHMMAX, " +- "or no new segment was to be created. A segment with given key existed, " +- "but size is greater than the size of that segment. " +- "Please check shared memory limits by 'ipcs -l'."); ++ ucs_error("%s", error_string); + return UCS_ERR_NO_MEMORY; + default: +- ucs_error("shmget(size=%zu, flags=0x%x) returned unexpected error: %m. " +- "Please check shared memory limits by 'ipcs -l'.", +- alloc_size, flags); ++ ucs_error("%s", error_string); + return UCS_ERR_SHMEM_SEGMENT; + } + } +@@ -589,10 +696,9 @@ ucs_status_t ucs_sysv_alloc(size_t *size, size_t max_size, void **address_p, + } + } + ++ ucs_memtrack_allocated(ptr, alloc_size UCS_MEMTRACK_VAL); + *address_p = ptr; + *size = alloc_size; +- +- ucs_memtrack_allocated(address_p, size UCS_MEMTRACK_VAL); + return UCS_OK; + } + +@@ -600,7 +706,7 @@ ucs_status_t ucs_sysv_free(void *address) + { + int ret; + +- ucs_memtrack_releasing(&address); ++ ucs_memtrack_releasing(address); + ret = shmdt(address); + if (ret) { + ucs_warn("Unable to detach shared memory segment at %p: %m", address); +@@ -767,6 +873,43 @@ const char* ucs_get_process_cmdline() + return cmdline; + } + ++unsigned long ucs_sys_get_pfn(uintptr_t address) ++{ ++ static const char *pagemap_file = "/proc/self/pagemap"; ++ static int initialized = 0; ++ static int pagemap_fd; ++ uint64_t data; ++ off_t offset; ++ ssize_t ret; ++ ++ if (!initialized) { ++ pagemap_fd = open(pagemap_file, O_RDONLY); ++ if (pagemap_fd < 0) { ++ ucs_warn("failed to open %s: %m", pagemap_file); ++ } ++ initialized = 1; ++ } ++ ++ if (pagemap_fd < 0) { ++ return 0; /* could not open file */ ++ } ++ ++ offset = (address / ucs_get_page_size()) * sizeof(data); ++ data = 0; ++ ret = pread(pagemap_fd, &data, sizeof(data), offset); ++ if (ret < 0) { ++ ucs_warn("pread(file=%s offset=%zu) failed: %m", pagemap_file, offset); ++ return 0; ++ } ++ ++ if (!(data & UCS_BIT(63))) { ++ ucs_trace("address 0x%lx not present", address); ++ return 0; ++ } ++ ++ return data & UCS_MASK(55); ++} ++ + ucs_status_t ucs_sys_fcntl_modfl(int fd, int add, int remove) + { + int oldfl, ret; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.h +index 0bdd3dd..43b8ba9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.h +@@ -164,9 +164,9 @@ size_t ucs_get_page_size(); + + + /** +- * @return Huge page size on the system. ++ * @return Huge page size on the system, or -1 if unsupported. + */ +-size_t ucs_get_huge_page_size(); ++ssize_t ucs_get_huge_page_size(); + + + /** +@@ -184,17 +184,18 @@ size_t ucs_get_phys_mem_size(); + /** + * Allocate shared memory using SystemV API. + * +- * @param size Pointer to memory size to allocate, updated with actual size +- * (rounded up to huge page size or to regular page size). +- * @param max_size maximal size to allocate. If need to allocate more than this, +- * the function fails and returns UCS_ERR_EXCEEDS_LIMIT. +- * @param address_p Filled with allocated memory address. +- * @param flags Flags to indicate the permissions for the allocate memory. +- * (also, whether or not to allocate memory with huge pages). +- * @param shmid Filled with the shmid from the shmget call in the function. ++ * @param size Pointer to memory size to allocate, updated with actual size ++ * (rounded up to huge page size or to regular page size). ++ * @param max_size maximal size to allocate. If need to allocate more than this, ++ * the function fails and returns UCS_ERR_EXCEEDS_LIMIT. ++ * @param address_p Filled with allocated memory address. ++ * @param flags Flags to indicate the permissions for the allocate memory. ++ * (also, whether or not to allocate memory with huge pages). ++ * @param alloc_name Name of memory allocation, for debug/error reporting purposes. ++ * @param shmid Filled with the shmid from the shmget call in the function. + */ + ucs_status_t ucs_sysv_alloc(size_t *size, size_t max_size, void **address_p, +- int flags, int *shimd UCS_MEMTRACK_ARG); ++ int flags, const char *alloc_name, int *shimd); + + + /** +@@ -238,6 +239,17 @@ int ucs_get_mem_prot(unsigned long start, unsigned long end); + + + /** ++ * Returns the physical page frame number of a given virtual page address. ++ * If the page map file is non-readable (for example, due to permissions), or ++ * the page is not present, this function returns 0. ++ * ++ * @param address Virtual address to get the PFN for ++ * @return PFN number, or 0 if failed. ++ */ ++unsigned long ucs_sys_get_pfn(uintptr_t address); ++ ++ ++/** + * Modify file descriptor flags via fcntl(). + * + * @param fd File descriptor to modify. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/time/timerq.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/time/timerq.c +index 3fe810c..311761e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/time/timerq.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/time/timerq.c +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + + ucs_status_t ucs_timerq_init(ucs_timer_queue_t *timerq) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/class.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/class.h +index c5352bf..97010cc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/class.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/class.h +@@ -184,8 +184,6 @@ struct ucs_class { + */ + #define UCS_CLASS_CALL_SUPER_INIT(_superclass, ...) \ + { \ +- ucs_assert(*_init_count >= 1); \ +- ucs_assert(&_UCS_CLASS_DECL_NAME(_superclass) == _myclass->superclass); \ + { \ + ucs_status_t status = _UCS_CLASS_INIT_NAME(_superclass)\ + (&self->super, _myclass->superclass, _init_count, ## __VA_ARGS__); \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/component.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/component.h +index e0122bb..29cef0b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/component.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/component.h +@@ -45,6 +45,13 @@ typedef struct ucs_component { + static void UCS_F_CTOR UCS_PP_APPEND_UNIQUE_ID(ucs_initializer)() + + ++/* ++ * Define code which runs at global destructor phase ++ */ ++#define UCS_STATIC_CLEANUP \ ++ static void UCS_F_DTOR UCS_PP_APPEND_UNIQUE_ID(ucs_initializer)() ++ ++ + /** + * Define a list of components for specific base type. + * +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.c +new file mode 100644 +index 0000000..da17059 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.c +@@ -0,0 +1,40 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "spinlock.h" ++ ++#include ++#include ++ ++ ++ucs_status_t ucs_spinlock_init(ucs_spinlock_t *lock) ++{ ++ int ret; ++ ++ ret = pthread_spin_init(&lock->lock, 0); ++ if (ret != 0) { ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ lock->count = 0; ++ lock->owner = 0xfffffffful; ++ return UCS_OK; ++} ++ ++void ucs_spinlock_destroy(ucs_spinlock_t *lock) ++{ ++ int ret; ++ ++ if (lock->count != 0) { ++ ucs_warn("destroying spinlock %p with use count %d (owner: 0x%lx)", ++ lock, lock->count, lock->owner); ++ } ++ ++ ret = pthread_spin_destroy(&lock->lock); ++ if (ret != 0) { ++ ucs_warn("failed to destroy spinlock %p: %s", lock, strerror(ret)); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.h +index 2a7d77b..45ee8d7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.h +@@ -22,31 +22,9 @@ typedef struct ucs_spinlock { + } ucs_spinlock_t; + + +-static inline ucs_status_t ucs_spinlock_init(ucs_spinlock_t *lock) +-{ +- int ret; +- +- ret = pthread_spin_init(&lock->lock, 0); +- if (ret != 0) { +- return UCS_ERR_IO_ERROR; +- } +- +- lock->count = 0; +- lock->owner = 0xfffffffful; +- return UCS_OK; +-} ++ucs_status_t ucs_spinlock_init(ucs_spinlock_t *lock); + +-static inline ucs_status_t ucs_spinlock_destroy(ucs_spinlock_t *lock) +-{ +- int ret; +- +- ret = pthread_spin_destroy(&lock->lock); +- if (ret != 0) { +- return UCS_ERR_IO_ERROR; +- } +- +- return UCS_OK; +-} ++void ucs_spinlock_destroy(ucs_spinlock_t *lock); + + static inline int ucs_spin_is_owner(ucs_spinlock_t *lock, pthread_t self) + { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.c +index 79b9742..0986787 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.c +@@ -62,6 +62,8 @@ const char *ucs_status_string(ucs_status_t status) + return "User-defined limit was reached"; + case UCS_ERR_UNSUPPORTED: + return "Unsupported operation"; ++ case UCS_ERR_REJECTED: ++ return "Operation rejected by remote peer"; + case UCS_ERR_ENDPOINT_TIMEOUT: + return "Endpoint timeout"; + default: +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.h +index 2ab1652..e414fe5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.h +@@ -70,6 +70,7 @@ typedef enum { + UCS_ERR_TIMED_OUT = -20, + UCS_ERR_EXCEEDS_LIMIT = -21, + UCS_ERR_UNSUPPORTED = -22, ++ UCS_ERR_REJECTED = -23, + + UCS_ERR_FIRST_LINK_FAILURE = -40, + UCS_ERR_LAST_LINK_FAILURE = -59, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/uct/Makefile.am +index 7ef6857..1ca5bef 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/Makefile.am +@@ -29,9 +29,7 @@ noinst_HEADERS = \ + base/uct_iface.h \ + base/uct_log.h \ + base/uct_worker.h \ +- sm/self/self_md.h \ +- sm/self/self_iface.h \ +- sm/self/self_ep.h \ ++ sm/self/self.h \ + tcp/tcp.h + + libuct_la_SOURCES = \ +@@ -39,9 +37,7 @@ libuct_la_SOURCES = \ + base/uct_mem.c \ + base/uct_iface.c \ + base/uct_worker.c \ +- sm/self/self_md.c \ +- sm/self/self_iface.c \ +- sm/self/self_ep.c \ ++ sm/self/self.c \ + tcp/tcp_ep.c \ + tcp/tcp_iface.c \ + tcp/tcp_md.c \ +@@ -69,14 +65,21 @@ libuct_la_CPPFLAGS += \ + + libuct_la_SOURCES += \ + ib/mlx5/ib_mlx5_log.c \ +- ib/mlx5/ib_mlx5.c ++ ib/mlx5/ib_mlx5.c \ ++ ib/mlx5/ib_mlx5_dv.c \ ++ ib/mlx5/ib_mlx5_hw.c + + noinst_HEADERS += \ + ib/mlx5/ib_mlx5_log.h \ + ib/mlx5/ib_mlx5.h \ +- ib/mlx5/ib_mlx5.inl +-endif ++ ib/mlx5/ib_mlx5.inl \ ++ ib/mlx5/ib_mlx5_dv.h \ ++ ib/mlx5/ib_mlx5_hw.h + ++if HAVE_MLX5_DV ++libuct_la_LDFLAGS += $(LIB_MLX5) ++endif ++endif + + if HAVE_TL_RC + noinst_HEADERS += \ +@@ -108,15 +111,21 @@ endif + if HAVE_TL_DC + noinst_HEADERS += \ + ib/dc/base/dc_iface.h \ +- ib/dc/base/dc_ep.h \ +- ib/dc/verbs/dc_verbs.h ++ ib/dc/base/dc_ep.h + + libuct_la_SOURCES += \ + ib/dc/base/dc_iface.c \ +- ib/dc/base/dc_ep.c \ ++ ib/dc/base/dc_ep.c ++ ++if HAVE_DC_EXP ++noinst_HEADERS += \ ++ ib/dc/verbs/dc_verbs.h ++ ++libuct_la_SOURCES += \ + ib/dc/verbs/dc_verbs.c ++endif + +-if HAVE_MLX5_HW ++if HAVE_MLX5_HW_DC + noinst_HEADERS += \ + ib/dc/accel/dc_mlx5.h + +@@ -141,7 +150,7 @@ noinst_HEADERS += \ + ib/ud/base/ud_inl.h \ + ib/ud/verbs/ud_verbs.h + +-if HAVE_MLX5_HW ++if HAVE_MLX5_HW_UD + noinst_HEADERS += \ + ib/ud/accel/ud_mlx5_common.h \ + ib/ud/accel/ud_mlx5.h +@@ -225,18 +234,36 @@ libuct_la_SOURCES += \ + cuda/gdr_copy/gdr_copy_ep.c + endif + noinst_HEADERS += \ ++ cuda/base/cuda_md.h \ ++ cuda/base/cuda_iface.h \ + cuda/cuda_copy/cuda_copy_md.h \ + cuda/cuda_copy/cuda_copy_iface.h \ + cuda/cuda_copy/cuda_copy_ep.h + + libuct_la_SOURCES += \ ++ cuda/base/cuda_md.c \ + cuda/cuda_copy/cuda_copy_md.c \ + cuda/cuda_copy/cuda_copy_iface.c \ + cuda/cuda_copy/cuda_copy_ep.c + ++noinst_HEADERS += \ ++ cuda/cuda_ipc/cuda_ipc_md.h \ ++ cuda/cuda_ipc/cuda_ipc_iface.h \ ++ cuda/cuda_ipc/cuda_ipc_ep.h \ ++ cuda/cuda_ipc/cuda_ipc_cache.h ++ ++libuct_la_SOURCES += \ ++ cuda/cuda_ipc/cuda_ipc_md.c \ ++ cuda/cuda_ipc/cuda_ipc_iface.c \ ++ cuda/cuda_ipc/cuda_ipc_ep.c \ ++ cuda/cuda_ipc/cuda_ipc_cache.c ++ + endif + + if HAVE_ROCM ++libuct_la_CPPFLAGS += $(ROCM_CPPFLAGS) ++libuct_la_LDFLAGS += $(ROCM_LDFLAGS) $(ROCM_LIBS) ++ + noinst_HEADERS += \ + rocm/rocm_cma_md.h \ + rocm/rocm_cma_iface.h \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/tl.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/tl.h +index c6d078c..2f51e3a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/tl.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/tl.h +@@ -42,6 +42,9 @@ typedef struct uct_iface_ops { + + /* endpoint - get */ + ++ ucs_status_t (*ep_get_short)(uct_ep_h ep, void *buffer, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ + ucs_status_t (*ep_get_bcopy)(uct_ep_h ep, uct_unpack_callback_t unpack_cb, + void *arg, size_t length, + uint64_t remote_addr, uct_rkey_t rkey, +@@ -67,36 +70,28 @@ typedef struct uct_iface_ops { + + /* endpoint - atomics */ + +- ucs_status_t (*ep_atomic_add64)(uct_ep_h ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +- +- ucs_status_t (*ep_atomic_fadd64)(uct_ep_h ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- +- ucs_status_t (*ep_atomic_swap64)(uct_ep_h ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- + ucs_status_t (*ep_atomic_cswap64)(uct_ep_h ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp); + +- ucs_status_t (*ep_atomic_add32)(uct_ep_h ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +- +- ucs_status_t (*ep_atomic_fadd32)(uct_ep_h ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); +- +- ucs_status_t (*ep_atomic_swap32)(uct_ep_h ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); +- + ucs_status_t (*ep_atomic_cswap32)(uct_ep_h ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp); + ++ ucs_status_t (*ep_atomic32_post)(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ ++ ucs_status_t (*ep_atomic64_post)(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ ++ ucs_status_t (*ep_atomic32_fetch)(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint32_t *result, uint64_t remote_addr, ++ uct_rkey_t rkey, uct_completion_t *comp); ++ ++ ucs_status_t (*ep_atomic64_fetch)(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t *result, uint64_t remote_addr, ++ uct_rkey_t rkey, uct_completion_t *comp); ++ + /* endpoint - tagged operations */ + + ucs_status_t (*ep_tag_eager_short)(uct_ep_h ep, uct_tag_t tag, +@@ -137,7 +132,8 @@ typedef struct uct_iface_ops { + + /* endpoint - pending queue */ + +- ucs_status_t (*ep_pending_add)(uct_ep_h ep, uct_pending_req_t *n); ++ ucs_status_t (*ep_pending_add)(uct_ep_h ep, uct_pending_req_t *n, ++ unsigned flags); + + void (*ep_pending_purge)(uct_ep_h ep, uct_pending_purge_callback_t cb, + void *arg); +@@ -162,8 +158,8 @@ typedef struct uct_iface_ops { + + ucs_status_t (*ep_create_sockaddr)(uct_iface_h iface, + const ucs_sock_addr_t *sockaddr, +- const void *priv_data, size_t length, +- uct_ep_h *ep_p); ++ uct_sockaddr_priv_pack_callback_t pack_cb, ++ void *arg, uint32_t cb_flags, uct_ep_h *ep_p); + + void (*ep_destroy)(uct_ep_h ep); + +@@ -173,6 +169,12 @@ typedef struct uct_iface_ops { + const uct_device_addr_t *dev_addr, + const uct_ep_addr_t *ep_addr); + ++ ucs_status_t (*iface_accept)(uct_iface_h iface, ++ uct_conn_request_h conn_request); ++ ++ ucs_status_t (*iface_reject)(uct_iface_h iface, ++ uct_conn_request_h conn_request); ++ + /* interface - synchronization */ + + ucs_status_t (*iface_flush)(uct_iface_h iface, unsigned flags, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct.h +index 9993cad..12cbfc7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct.h +@@ -150,6 +150,24 @@ typedef struct uct_tl_resource_desc { + + + /** ++ * @brief Atomic operation requested for uct_ep_atomic32_post, uct_ep_atomic64_post, ++ * uct_ep_atomic32_fetch and uct_ep_atomic64_fetch. ++ * ++ * This enumeration defines which atomic memory operation should be ++ * performed by the uct_ep_atomic family of fuctions. ++ */ ++typedef enum uct_atomic_op { ++ UCT_ATOMIC_OP_ADD, /**< Atomic add */ ++ UCT_ATOMIC_OP_AND, /**< Atomic and */ ++ UCT_ATOMIC_OP_OR, /**< Atomic or */ ++ UCT_ATOMIC_OP_XOR, /**< Atomic xor */ ++ UCT_ATOMIC_OP_SWAP, /**< Atomic swap */ ++ UCT_ATOMIC_OP_CSWAP, /**< Atomic compare-and-swap */ ++ UCT_ATOMIC_OP_LAST ++} uct_atomic_op_t; ++ ++ ++/** + * @defgroup UCT_RESOURCE_IFACE_CAP UCT interface operations and capabilities + * @ingroup UCT_RESOURCE + * +@@ -176,16 +194,6 @@ typedef struct uct_tl_resource_desc { + #define UCT_IFACE_FLAG_GET_BCOPY UCS_BIT(9) /**< Buffered get */ + #define UCT_IFACE_FLAG_GET_ZCOPY UCS_BIT(10) /**< Zero-copy get */ + +- /* Atomic operations capabilities */ +-#define UCT_IFACE_FLAG_ATOMIC_ADD32 UCS_BIT(16) /**< 32bit atomic add */ +-#define UCT_IFACE_FLAG_ATOMIC_ADD64 UCS_BIT(17) /**< 64bit atomic add */ +-#define UCT_IFACE_FLAG_ATOMIC_FADD32 UCS_BIT(18) /**< 32bit atomic fetch-and-add */ +-#define UCT_IFACE_FLAG_ATOMIC_FADD64 UCS_BIT(19) /**< 64bit atomic fetch-and-add */ +-#define UCT_IFACE_FLAG_ATOMIC_SWAP32 UCS_BIT(20) /**< 32bit atomic swap */ +-#define UCT_IFACE_FLAG_ATOMIC_SWAP64 UCS_BIT(21) /**< 64bit atomic swap */ +-#define UCT_IFACE_FLAG_ATOMIC_CSWAP32 UCS_BIT(22) /**< 32bit atomic compare-and-swap */ +-#define UCT_IFACE_FLAG_ATOMIC_CSWAP64 UCS_BIT(23) /**< 64bit atomic compare-and-swap */ +- + /* Atomic operations domain */ + #define UCT_IFACE_FLAG_ATOMIC_CPU UCS_BIT(30) /**< Atomic communications are consistent + with respect to CPU operations. */ +@@ -330,22 +338,23 @@ enum uct_msg_flags { + * @brief Callback flags. + * + * List of flags for a callback. +- * A callback must have either the SYNC or ASYNC flag set. + */ + enum uct_cb_flags { +- UCT_CB_FLAG_SYNC = UCS_BIT(1), /**< Callback is always invoked from the context (thread, process) +- that called uct_iface_progress(). An interface must +- have the @ref UCT_IFACE_FLAG_CB_SYNC flag set to support sync +- callback invocation. */ +- +- UCT_CB_FLAG_ASYNC = UCS_BIT(2) /**< Callback may be invoked from any context. For example, +- it may be called from a transport async progress thread. To guarantee +- async invocation, the interface must have the @ref UCT_IFACE_FLAG_CB_ASYNC +- flag set. +- If async callback is requested on an interface +- which only supports sync callback +- (i.e., only the @ref UCT_IFACE_FLAG_CB_SYNC flag is set), +- it will behave exactly like a sync callback. */ ++ UCT_CB_FLAG_RESERVED = UCS_BIT(1), /**< Reserved for future use. */ ++ UCT_CB_FLAG_ASYNC = UCS_BIT(2) /**< Callback may be invoked from any ++ context (thread, process). For ++ example, it may be called from a ++ transport async progress thread. To ++ guarantee async invocation, the ++ interface must have the @ref ++ UCT_IFACE_FLAG_CB_ASYNC flag set. If ++ async callback is requested on an ++ interface which only supports sync ++ callback (i.e., only the @ref ++ UCT_IFACE_FLAG_CB_SYNC flag is set), ++ the callback may be invoked only ++ from the context that called @ref ++ uct_iface_progress). */ + }; + + +@@ -406,6 +415,7 @@ enum { + typedef enum { + UCT_MD_MEM_TYPE_HOST = 0, /**< Default system memory */ + UCT_MD_MEM_TYPE_CUDA, /**< NVIDIA CUDA memory */ ++ UCT_MD_MEM_TYPE_CUDA_MANAGED, /**< NVIDIA CUDA managed (or unified) memory*/ + UCT_MD_MEM_TYPE_LAST + } uct_memory_type_t; + +@@ -415,17 +425,21 @@ typedef enum { + * @brief Memory allocation/registration flags. + */ + enum uct_md_mem_flags { +- UCT_MD_MEM_FLAG_NONBLOCK = UCS_BIT(0), /**< Hint to perform non-blocking +- allocation/registration: page +- mapping may be deferred until +- it is accessed by the CPU or a +- transport. */ +- UCT_MD_MEM_FLAG_FIXED = UCS_BIT(1), /**< Place the mapping at exactly +- defined address */ +- UCT_MD_MEM_FLAG_LOCK = UCS_BIT(2), /**< Registered memory should be +- locked. May incur extra cost for +- registration, but memory access +- is usually faster. */ ++ UCT_MD_MEM_FLAG_NONBLOCK = UCS_BIT(0), /**< Hint to perform non-blocking ++ allocation/registration: page ++ mapping may be deferred until ++ it is accessed by the CPU or a ++ transport. */ ++ UCT_MD_MEM_FLAG_FIXED = UCS_BIT(1), /**< Place the mapping at exactly ++ defined address */ ++ UCT_MD_MEM_FLAG_LOCK = UCS_BIT(2), /**< Registered memory should be ++ locked. May incur extra cost for ++ registration, but memory access ++ is usually faster. */ ++ UCT_MD_MEM_FLAG_HIDE_ERRORS = UCS_BIT(3), /**< Hide errors on memory registration. ++ In some cases registration failure ++ is not an error (e. g. for merged ++ memory regions). */ + + /* memory access flags */ + UCT_MD_MEM_ACCESS_REMOTE_PUT = UCS_BIT(5), /**< enable remote put access */ +@@ -494,6 +508,7 @@ struct uct_iface_attr { + } put; /**< Attributes for PUT operations */ + + struct { ++ size_t max_short; /**< Maximal size for get_short */ + size_t max_bcopy; /**< Maximal size for get_bcopy */ + size_t min_zcopy; /**< Minimal size for get_zcopy (total + of @ref uct_iov_t::length of the +@@ -561,6 +576,11 @@ struct uct_iface_attr { + } rndv; /**< Attributes related to rendezvous protocol */ + } tag; /**< Attributes for TAG operations */ + ++ struct { ++ uint64_t op_flags; /**< Attributes for atomic-post operations */ ++ uint64_t fop_flags; /**< Attributes for atomic-fetch operations */ ++ } atomic32, atomic64; /**< Attributes for atomic operations */ ++ + uint64_t flags; /**< Flags from @ref UCT_RESOURCE_IFACE_CAP */ + } cap; /**< Interface capabilities */ + +@@ -633,6 +653,9 @@ struct uct_iface_params { + void *err_handler_arg; + /** The callback to handle transport level error.*/ + uct_error_handler_t err_handler; ++ /** Callback flags to indicate where the @a err_handler callback can be ++ * invoked from. @ref uct_cb_flags */ ++ uint32_t err_handler_flags; + + /** These callbacks are only relevant for HW Tag Matching */ + void *eager_arg; +@@ -889,9 +912,7 @@ void uct_release_tl_resource_list(uct_tl_resource_desc_t *resources); + * Transports can allocate separate communication resources for every worker, + * so that every worker can be progressed independently of others. + * +- * @param [in] async Context for async event handlers. +- * Can be NULL, which means that event handlers will +- * not have particular context. ++ * @param [in] async Context for async event handlers. Must not be NULL. + * @param [in] thread_mode Thread access mode to the worker and all interfaces + * and endpoints associated with it. + * @param [out] worker_p Filled with a pointer to the worker object. +@@ -1005,19 +1026,6 @@ void uct_config_release(void *config); + + + /** +- * @ingroup UCT_RESOURCE +- * @brief Print interface/MD configuration to a stream. +- * +- * @param [in] config Configuration to print. +- * @param [in] stream Output stream to print to. +- * @param [in] title Title to the output. +- * @param [in] print_flags Controls how the configuration is printed. +- */ +-void uct_config_print(const void *config, FILE *stream, const char *title, +- ucs_config_print_flags_t print_flags); +- +- +-/** + * @ingroup UCT_CONTEXT + * @brief Get value by name from interface/MD configuration. + * +@@ -1161,8 +1169,8 @@ ucs_status_t uct_ep_check(const uct_ep_h ep, unsigned flags, + * @ingroup UCT_RESOURCE + * @brief Obtain a notification file descriptor for polling. + * +- * Only interfaces supporting the @ref UCT_IFACE_FLAG_EVENT_FD implement this +- * function. ++ * Only interfaces that support at least one of the UCT_IFACE_FLAG_EVENT* flags ++ * will implement this function. + * + * @param [in] iface Interface to get the notification descriptor. + * @param [out] fd_p Location to write the notification file descriptor. +@@ -1262,6 +1270,37 @@ ucs_status_t uct_iface_set_am_tracer(uct_iface_h iface, uct_am_tracer_t tracer, + + /** + * @ingroup UCT_RESOURCE ++ * @brief Accept connection request. ++ * ++ * @param [in] iface Transport interface which generated connection ++ * request @a conn_request. ++ * @param [in] conn_request Connection establishment request passed as parameter ++ * of @ref uct_sockaddr_conn_request_callback_t. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t uct_iface_accept(uct_iface_h iface, ++ uct_conn_request_h conn_request); ++ ++ ++/** ++ * @ingroup UCT_RESOURCE ++ * @brief Reject connection request. Will invoke an error handler @ref ++ * uct_error_handler_t on the remote transport interface, if set. ++ * ++ * @param [in] iface Interface which generated connection establishment ++ * request @a conn_request. ++ * @param [in] conn_request Connection establishment request passed as parameter ++ * of @ref uct_sockaddr_conn_request_callback_t. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t uct_iface_reject(uct_iface_h iface, ++ uct_conn_request_h conn_request); ++ ++ ++/** ++ * @ingroup UCT_RESOURCE + * @brief Create new endpoint. + * + * @param [in] iface Interface to create the endpoint on. +@@ -1327,32 +1366,39 @@ ucs_status_t uct_ep_connect_to_ep(uct_ep_h ep, const uct_device_addr_t *dev_addr + * + * This routine will create an endpoint for a connection to the remote peer, + * specified by its socket address. +- * The user may provide private data to be sent on a connection request to the +- * remote peer. ++ * The user may provide a callback function which will be used to fill the ++ * private data that will be sent on a connection request to the remote peer. ++ * ++ * @note It is never guaranteed that the callaback will be called. ++ * If, for example, the endpoint goes into error state before issuing the ++ * connection request, the callback will not be invoked. + * + * @note The interface in this routine requires the + * @ref UCT_IFACE_FLAG_CONNECT_TO_SOCKADDR capability. + * +- * @param [in] iface Interface to create the endpoint on. +- * @param [in] sockaddr The sockaddr to connect to on the remote peer. +- * @param [in] priv_data User's private data for connecting to the +- * remote peer. +- * @param [in] length Length of the private data. +- * @param [out] ep_p Handle to the created endpoint. +- * +- * @return UCS_OK - Connection request was sent to the server. +- * This does not guarantee that the server has +- * received the message; in case of failure, the +- * error will be reported to the interface error +- * handler callback provided to @ref uct_iface_open +- * via @ref uct_iface_params_t.err_handler. +- * +- * @return error code - In case of an error. (@ref ucs_status_t) ++ * @param [in] iface Interface to create the endpoint on. ++ * @param [in] sockaddr The sockaddr to connect to on the remote peer. ++ * @param [in] pack_cb Callback for filling the user's private data. ++ * @param [in] arg User defined argument for the callback. ++ * @param [in] cb_flags Required @ref uct_cb_flags "callback flags" to ++ * indicate where the ++ * @ref uct_sockaddr_priv_pack_callback_t ++ * callback can be invoked from. ++ * @param [out] ep_p Handle to the created endpoint. ++ * ++ * @return UCS_OK Connection request was sent to the server. ++ * This does not guarantee that the server has ++ * received the message; in case of failure, the ++ * error will be reported to the interface error ++ * handler callback provided to @ref uct_iface_open ++ * via @ref uct_iface_params_t.err_handler. ++ * ++ * @return error code In case of an error. (@ref ucs_status_t) + */ + ucs_status_t uct_ep_create_sockaddr(uct_iface_h iface, + const ucs_sock_addr_t *sockaddr, +- const void *priv_data, size_t length, +- uct_ep_h *ep_p); ++ uct_sockaddr_priv_pack_callback_t pack_cb, ++ void *arg, uint32_t cb_flags, uct_ep_h *ep_p); + + + /** +@@ -1452,7 +1498,7 @@ ucs_status_t uct_md_mem_dereg(uct_md_h md, uct_mem_h memh); + * @return Nonzero if memory is owned, 0 if not owned + * + * @param [in] md Memory domain to detect if memory belongs to. +- * @param [in] address Memory address to detect. ++ * @param [in] addr Memory address to detect. + * @param [in] length Size of memory + */ + int uct_md_is_mem_type_owned(uct_md_h md, void *addr, size_t length); +@@ -1463,7 +1509,7 @@ int uct_md_is_mem_type_owned(uct_md_h md, void *addr, size_t length); + * + * Allocate potentially registered memory. Every one of the provided allocation + * methods will be used, in turn, to perform the allocation, until one succeeds. +- * Whenever the MD method is encountered, every one of the provided MDs will be ++ * Whenever the MD method is encountered, every one of the provided MDs will be + * used, in turn, to allocate the memory, until one succeeds, or they are + * exhausted. In this case the next allocation method from the initial list will + * be attempted. +@@ -1765,6 +1811,17 @@ UCT_INLINE_API ucs_status_t uct_ep_put_zcopy(uct_ep_h ep, + * @ingroup UCT_RMA + * @brief + */ ++UCT_INLINE_API ucs_status_t uct_ep_get_short(uct_ep_h ep, void *buffer, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey) ++{ ++ return ep->iface->ops.ep_get_short(ep, buffer, length, remote_addr, rkey); ++} ++ ++ ++/** ++ * @ingroup UCT_RMA ++ * @brief ++ */ + UCT_INLINE_API ucs_status_t uct_ep_get_bcopy(uct_ep_h ep, uct_unpack_callback_t unpack_cb, + void *arg, size_t length, + uint64_t remote_addr, uct_rkey_t rkey, +@@ -1882,34 +1939,11 @@ UCT_INLINE_API ucs_status_t uct_ep_am_zcopy(uct_ep_h ep, uint8_t id, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_add64(uct_ep_h ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) +-{ +- return ep->iface->ops.ep_atomic_add64(ep, add, remote_addr, rkey); +-} +- +- +-/** +- * @ingroup UCT_AMO +- * @brief +- */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_fadd64(uct_ep_h ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return ep->iface->ops.ep_atomic_fadd64(ep, add, remote_addr, rkey, result, comp); +-} +- +- +-/** +- * @ingroup UCT_AMO +- * @brief +- */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_swap64(uct_ep_h ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap64(uct_ep_h ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp) + { +- return ep->iface->ops.ep_atomic_swap64(ep, swap, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic_cswap64(ep, compare, swap, remote_addr, rkey, result, comp); + } + + +@@ -1917,11 +1951,11 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_swap64(uct_ep_h ep, uint64_t swap, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap64(uct_ep_h ep, uint64_t compare, uint64_t swap, ++UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap32(uct_ep_h ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ uint32_t *result, uct_completion_t *comp) + { +- return ep->iface->ops.ep_atomic_cswap64(ep, compare, swap, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic_cswap32(ep, compare, swap, remote_addr, rkey, result, comp); + } + + +@@ -1929,10 +1963,11 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap64(uct_ep_h ep, uint64_t compare, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_add32(uct_ep_h ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++UCT_INLINE_API ucs_status_t uct_ep_atomic32_post(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint64_t remote_addr, ++ uct_rkey_t rkey) + { +- return ep->iface->ops.ep_atomic_add32(ep, add, remote_addr, rkey); ++ return ep->iface->ops.ep_atomic32_post(ep, opcode, value, remote_addr, rkey); + } + + +@@ -1940,11 +1975,11 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_add32(uct_ep_h ep, uint32_t add, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_fadd32(uct_ep_h ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++UCT_INLINE_API ucs_status_t uct_ep_atomic64_post(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t remote_addr, ++ uct_rkey_t rkey) + { +- return ep->iface->ops.ep_atomic_fadd32(ep, add, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic64_post(ep, opcode, value, remote_addr, rkey); + } + + +@@ -1952,11 +1987,13 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_fadd32(uct_ep_h ep, uint32_t add, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_swap32(uct_ep_h ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++UCT_INLINE_API ucs_status_t uct_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return ep->iface->ops.ep_atomic_swap32(ep, swap, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic32_fetch(ep, opcode, value, result, ++ remote_addr, rkey, comp); + } + + +@@ -1964,11 +2001,13 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_swap32(uct_ep_h ep, uint32_t swap, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap32(uct_ep_h ep, uint32_t compare, uint32_t swap, ++UCT_INLINE_API ucs_status_t uct_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ uct_completion_t *comp) + { +- return ep->iface->ops.ep_atomic_cswap32(ep, compare, swap, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic64_fetch(ep, opcode, value, result, ++ remote_addr, rkey, comp); + } + + +@@ -1985,15 +2024,18 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap32(uct_ep_h ep, uint32_t compare, + * the "func" field. + * After passed to the function, the request is owned by UCT, + * until the callback is called and returns UCS_OK. ++ * @param [in] flags Reserved for future use. + * + * @return UCS_OK - request added to pending queue + * UCS_ERR_BUSY - request was not added to pending queue, because send + * resources are available now. The user is advised to + * retry. + */ +-UCT_INLINE_API ucs_status_t uct_ep_pending_add(uct_ep_h ep, uct_pending_req_t *req) ++UCT_INLINE_API ucs_status_t uct_ep_pending_add(uct_ep_h ep, ++ uct_pending_req_t *req, ++ unsigned flags) + { +- return ep->iface->ops.ep_pending_add(ep, req); ++ return ep->iface->ops.ep_pending_add(ep, req, flags); + } + + +@@ -2402,7 +2444,8 @@ UCT_INLINE_API void uct_iface_progress_disable(uct_iface_h iface, unsigned flags + + + /** +- * Perform a progress on an interface. ++ * @ingroup UCT_RESOURCE ++ * @brief Perform a progress on an interface. + */ + UCT_INLINE_API unsigned uct_iface_progress(uct_iface_h iface) + { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct_def.h +index 241618b..bf1f7f3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct_def.h +@@ -18,7 +18,7 @@ + #define UCT_MD_COMPONENT_NAME_MAX 8 + #define UCT_MD_NAME_MAX 16 + #define UCT_DEVICE_NAME_MAX 32 +-#define UCT_PENDING_REQ_PRIV_LEN 32 ++#define UCT_PENDING_REQ_PRIV_LEN 40 + #define UCT_TAG_PRIV_LEN 32 + #define UCT_AM_ID_BITS 5 + #define UCT_AM_ID_MAX UCS_BIT(UCT_AM_ID_BITS) +@@ -91,6 +91,7 @@ typedef struct uct_ep_addr uct_ep_addr_t; + typedef struct uct_tag_context uct_tag_context_t; + typedef uint64_t uct_tag_t; /* tag type - 64 bit */ + typedef int uct_worker_cb_id_t; ++typedef void* uct_conn_request_h; + /** + * @} + */ +@@ -139,7 +140,7 @@ typedef struct uct_iov { + * @brief Callback to process incoming active message + * + * When the callback is called, @a flags indicates how @a data should be handled. +- * If @a flags contain @ref UCT_CB_FLAG_DESC value, it means @a data is part of ++ * If @a flags contain @ref UCT_CB_PARAM_FLAG_DESC value, it means @a data is part of + * a descriptor which must be released later by @ref uct_iface_release_desc by + * the user if the callback returns @ref UCS_INPROGRESS. + * +@@ -156,7 +157,7 @@ typedef struct uct_iov { + * by the caller. + * @retval UCS_INPROGRESS - descriptor is owned by the callee, and would be + * released later. Supported only if @a flags contain +- * @ref UCT_CB_FLAG_DESC value. Otherwise, this is ++ * @ref UCT_CB_PARAM_FLAG_DESC value. Otherwise, this is + * an error. + * + */ +@@ -280,23 +281,56 @@ typedef void (*uct_unpack_callback_t)(void *arg, const void *data, size_t length + * Other than communication progress routines, it is allowed to call other UCT + * communication routines from this callback. + * ++ * @param [in] iface Transport interface. + * @param [in] arg User defined argument for this callback. ++ * @param [in] conn_request Transport level connection request. The user ++ * should accept or reject the request by calling ++ * @ref uct_iface_accept or @ref uct_iface_reject ++ * routines respectively. + * @param [in] conn_priv_data Points to the received data. + * This is the private data that was passed to the + * @ref uct_ep_create_sockaddr function on the + * client side. + * @param [in] length Length of the received data. + * +- * @retval UCS_OK - the server will accept the connection request from +- * the client. +- * @retval Otherwise - the server will reject the connection request from +- * the client which will invoke the error handling flow +- * on the client side. +- * + */ +-typedef ucs_status_t (*uct_sockaddr_conn_request_callback_t)(void *arg, +- const void *conn_priv_data, +- size_t length); ++typedef void ++(*uct_sockaddr_conn_request_callback_t)(uct_iface_h iface, void *arg, ++ uct_conn_request_h conn_request, ++ const void *conn_priv_data, ++ size_t length); ++ ++ ++/** ++ * @ingroup UCT_RESOURCE ++ * @brief Callback to fill the user's private data on the client side. ++ * ++ * This callback routine will be invoked on the client side before sending the ++ * transport's connection request to the server. ++ * The callback routine must be set by the client when creating an endpoint. ++ * The user's private data should be placed inside the priv_data buffer to be ++ * sent to the server side. ++ * The maximal allowed length of the private data is indicated by the field ++ * max_conn_priv inside @ref uct_iface_attr. ++ * Communication progress routines should not be called from this callback. ++ * It is allowed to call other UCT communication routines from this callback. ++ * ++ * @param [in] arg User defined argument for this callback. ++ * @param [in] dev_name Device name. This routine may fill the user's private ++ * data according to the given device name. ++ * The device name that is passed to this routine, ++ * corresponds to the dev_name field inside ++ * @ref uct_tl_resource_desc_t as returned from ++ * @ref uct_md_query_tl_resources. ++ * @param [out] priv_data User's private data to be passed to the server side. ++ * ++ * @return Negative value indicates an error according to @ref ucs_status_t. ++ * On success, non-negative value indicates actual number of ++ * bytes written to the @a priv_data buffer. ++ */ ++typedef ssize_t (*uct_sockaddr_priv_pack_callback_t)(void *arg, ++ const char *dev_name, ++ void *priv_data); + + + /** +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.c +index c623103..e777e78 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.c +@@ -22,6 +22,9 @@ static ucs_stats_class_t uct_ep_stats_class = { + [UCT_EP_STAT_PUT] = "put", + [UCT_EP_STAT_GET] = "get", + [UCT_EP_STAT_ATOMIC] = "atomic", ++#if IBV_EXP_HW_TM ++ [UCT_EP_STAT_TAG] = "tag", ++#endif + [UCT_EP_STAT_BYTES_SHORT] = "bytes_short", + [UCT_EP_STAT_BYTES_BCOPY] = "bytes_bcopy", + [UCT_EP_STAT_BYTES_ZCOPY] = "bytes_zcopy", +@@ -81,20 +84,17 @@ ucs_status_t uct_iface_set_am_handler(uct_iface_h tl_iface, uint8_t id, + return UCS_OK; + } + +- if (!(flags & (UCT_CB_FLAG_SYNC|UCT_CB_FLAG_ASYNC))) { +- ucs_error("invalid active message flags 0x%x", flags); +- return UCS_ERR_INVALID_PARAM; +- } +- + status = uct_iface_query(tl_iface, &attr); + if (status != UCS_OK) { + return status; + } + ++ UCT_CB_FLAGS_CHECK(flags); ++ + /* If user wants a synchronous callback, it must be supported, or the + * callback could be called from another thread. + */ +- if ((flags & UCT_CB_FLAG_SYNC) && !(attr.cap.flags & UCT_IFACE_FLAG_CB_SYNC)) { ++ if (!(flags & UCT_CB_FLAG_ASYNC) && !(attr.cap.flags & UCT_IFACE_FLAG_CB_SYNC)) { + ucs_error("Synchronous callback requested, but not supported"); + return UCS_ERR_INVALID_PARAM; + } +@@ -329,19 +329,18 @@ ucs_status_t uct_set_ep_failed(ucs_class_t *cls, uct_ep_h tl_ep, + ops->ep_put_short = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_put_bcopy = (void*)ucs_empty_function_return_bc_ep_timeout; + ops->ep_put_zcopy = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_get_short = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_get_bcopy = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_get_zcopy = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_am_short = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_am_bcopy = (void*)ucs_empty_function_return_bc_ep_timeout; + ops->ep_am_zcopy = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_add64 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_fadd64 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_swap64 = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_atomic_cswap64 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_add32 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_fadd32 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_swap32 = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_atomic_cswap32 = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_atomic64_post = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_atomic32_post = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_atomic64_fetch = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_atomic32_fetch = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_tag_eager_short = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_tag_eager_bcopy = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_tag_eager_zcopy = (void*)ucs_empty_function_return_ep_timeout; +@@ -410,13 +409,16 @@ UCS_CLASS_INIT_FUNC(uct_base_iface_t, uct_iface_ops_t *ops, uct_md_h md, + + UCS_CLASS_CALL_SUPER_INIT(uct_iface_t, ops); + +- self->md = md; +- self->worker = ucs_derived_of(worker, uct_priv_worker_t); +- self->am_tracer = NULL; +- self->am_tracer_arg = NULL; +- self->err_handler = params->err_handler; +- self->err_handler_arg = params->err_handler_arg; +- self->progress_flags = 0; ++ UCT_CB_FLAGS_CHECK(params->err_handler_flags); ++ ++ self->md = md; ++ self->worker = ucs_derived_of(worker, uct_priv_worker_t); ++ self->am_tracer = NULL; ++ self->am_tracer_arg = NULL; ++ self->err_handler = params->err_handler; ++ self->err_handler_flags = params->err_handler_flags; ++ self->err_handler_arg = params->err_handler_arg; ++ self->progress_flags = 0; + uct_worker_progress_init(&self->prog); + + for (id = 0; id < UCT_AM_ID_MAX; ++id) { +@@ -452,6 +454,20 @@ static UCS_CLASS_CLEANUP_FUNC(uct_base_iface_t) + UCS_CLASS_DEFINE(uct_base_iface_t, uct_iface_t); + + ++ucs_status_t uct_iface_accept(uct_iface_h iface, ++ uct_conn_request_h conn_request) ++{ ++ return iface->ops.iface_accept(iface, conn_request); ++} ++ ++ ++ucs_status_t uct_iface_reject(uct_iface_h iface, ++ uct_conn_request_h conn_request) ++{ ++ return iface->ops.iface_reject(iface, conn_request); ++} ++ ++ + ucs_status_t uct_ep_create(uct_iface_h iface, uct_ep_h *ep_p) + { + return iface->ops.ep_create(iface, ep_p); +@@ -466,9 +482,11 @@ uct_ep_create_connected(uct_iface_h iface, const uct_device_addr_t *dev_addr, + + ucs_status_t + uct_ep_create_sockaddr(uct_iface_h iface, const ucs_sock_addr_t *sockaddr, +- const void *priv_data, size_t length, uct_ep_h *ep_p) ++ uct_sockaddr_priv_pack_callback_t pack_cb, ++ void *arg, uint32_t cb_flags, uct_ep_h *ep_p) + { +- return iface->ops.ep_create_sockaddr(iface, sockaddr, priv_data, length, ep_p); ++ return iface->ops.ep_create_sockaddr(iface, sockaddr, pack_cb, arg, ++ cb_flags, ep_p); + } + + void uct_ep_destroy(uct_ep_h ep) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.h +index 3be8800..ebbf781 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.h +@@ -26,6 +26,9 @@ enum { + UCT_EP_STAT_PUT, + UCT_EP_STAT_GET, + UCT_EP_STAT_ATOMIC, ++#if IBV_EXP_HW_TM ++ UCT_EP_STAT_TAG, ++#endif + UCT_EP_STAT_BYTES_SHORT, + UCT_EP_STAT_BYTES_BCOPY, + UCT_EP_STAT_BYTES_ZCOPY, +@@ -76,6 +79,15 @@ enum { + UCS_STATS_UPDATE_COUNTER((_iface)->stats, UCT_IFACE_STAT_TX_NO_DESC, 1); + + ++#define UCT_CB_FLAGS_CHECK(_flags) \ ++ do { \ ++ if ((_flags) & UCT_CB_FLAG_RESERVED) { \ ++ ucs_error("Unsupported callback flag 0x%x", UCT_CB_FLAG_RESERVED); \ ++ return UCS_ERR_INVALID_PARAM; \ ++ } \ ++ } while (0) ++ ++ + /** + * In release mode - do nothing. + * +@@ -175,6 +187,7 @@ typedef struct uct_base_iface { + void *am_tracer_arg; /* Tracer argument */ + uct_error_handler_t err_handler; /* Error handler */ + void *err_handler_arg; /* Error handler argument */ ++ uint32_t err_handler_flags; /* Error handler callback flags */ + uct_worker_progress_t prog; /* Will be removed once all transports + support progress control */ + unsigned progress_flags; /* Which progress is currently enabled */ +@@ -245,7 +258,9 @@ typedef struct uct_tl_component { + .cfg_prefix = _cfg_prefix, \ + .iface_config_table = _cfg_table, \ + .iface_config_size = sizeof(_cfg_struct) \ +- }; ++ }; \ ++ UCS_CONFIG_REGISTER_TABLE(_cfg_table, _name" transport", _cfg_prefix, \ ++ _cfg_struct) + + + /** +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.c +index 8983a2c..4c97122 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.c +@@ -401,14 +401,6 @@ void uct_config_release(void *config) + ucs_free(bundle); + } + +-void uct_config_print(const void *config, FILE *stream, const char *title, +- ucs_config_print_flags_t print_flags) +-{ +- uct_config_bundle_t *bundle = (uct_config_bundle_t *)config - 1; +- ucs_config_parser_print_opts(stream, title, bundle->data, bundle->table, +- bundle->table_prefix, print_flags); +-} +- + ucs_status_t uct_config_get(void *config, const char *name, char *value, + size_t max) + { +@@ -423,28 +415,6 @@ ucs_status_t uct_config_modify(void *config, const char *name, const char *value + return ucs_config_parser_set_value(bundle->data, bundle->table, name, value); + } + +-void uct_md_component_config_print(ucs_config_print_flags_t print_flags) +-{ +- uct_md_component_t *mdc; +- uct_md_config_t *md_config; +- char cfg_title[UCT_TL_NAME_MAX + 128]; +- ucs_status_t status; +- +- /* go over the list of md components and print the config table per each */ +- ucs_list_for_each(mdc, &uct_md_components_list, list) +- { +- snprintf(cfg_title, sizeof(cfg_title), "%s MD component configuration", +- mdc->name); +- status = uct_md_config_read(mdc->name, NULL, NULL, &md_config); +- if (status != UCS_OK) { +- ucs_error("Failed to read md_config for MD component %s", mdc->name); +- continue; +- } +- uct_config_print(md_config, stdout, cfg_title, print_flags); +- uct_config_release(md_config); +- } +-} +- + ucs_status_t uct_md_mkey_pack(uct_md_h md, uct_mem_h memh, void *rkey_buffer) + { + void *rbuf = uct_md_fill_md_name(md, rkey_buffer); +@@ -522,7 +492,7 @@ ucs_status_t uct_md_mem_alloc(uct_md_h md, size_t *length_p, void **address_p, + return status; + } + +- return md->ops->mem_alloc(md, length_p, address_p, flags, memh_p UCS_MEMTRACK_VAL); ++ return md->ops->mem_alloc(md, length_p, address_p, flags, alloc_name, memh_p); + } + + ucs_status_t uct_md_mem_free(uct_md_h md, uct_mem_h memh) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.h +index e127688..091e99f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.h +@@ -54,9 +54,8 @@ extern ucs_config_field_t uct_md_config_rcache_table[]; + * Specific MDs extend this structure. + */ + struct uct_md_config { +-#ifdef __cplusplus +- char __dummy; +-#endif ++ /* C standard prohibits empty structures */ ++ char __dummy; + }; + + +@@ -102,7 +101,9 @@ typedef struct uct_md_registered_tl { + }; \ + UCS_STATIC_INIT { \ + ucs_list_add_tail(&uct_md_components_list, &_mdc.list); \ +- } ++ } \ ++ UCS_CONFIG_REGISTER_TABLE(_cfg_table, _name" memory domain", _cfg_prefix, \ ++ _cfg_struct) + + + /** +@@ -129,7 +130,8 @@ struct uct_md_ops { + ucs_status_t (*query)(uct_md_h md, uct_md_attr_t *md_attr); + + ucs_status_t (*mem_alloc)(uct_md_h md, size_t *length_p, void **address_p, +- unsigned flags, uct_mem_h *memh_p UCS_MEMTRACK_ARG); ++ unsigned flags, const char *alloc_name, ++ uct_mem_h *memh_p); + + ucs_status_t (*mem_free)(uct_md_h md, uct_mem_h memh); + ucs_status_t (*mem_advise)(uct_md_h md, uct_mem_h memh, void *addr, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_mem.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_mem.c +index 4cb55ce..cf84504 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_mem.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_mem.c +@@ -8,7 +8,8 @@ + #include "uct_md.h" + + #include +-#include ++#include ++#include + + + typedef struct { +@@ -64,6 +65,7 @@ ucs_status_t uct_mem_alloc(void *addr, size_t min_length, unsigned flags, + void *address; + int shmid; + #ifdef MADV_HUGEPAGE ++ ssize_t huge_page_size; + int ret; + #endif + +@@ -119,9 +121,9 @@ ucs_status_t uct_mem_alloc(void *addr, size_t min_length, unsigned flags, + status = uct_md_mem_alloc(md, &alloc_length, &address, flags, + alloc_name, &memh); + if (status != UCS_OK) { +- ucs_error("failed to allocate %zu bytes using md %s: %s", ++ ucs_error("failed to allocate %zu bytes using md %s for %s: %s", + alloc_length, md->component->name, +- ucs_status_string(status)); ++ alloc_name, ucs_status_string(status)); + return status; + } + +@@ -136,22 +138,26 @@ ucs_status_t uct_mem_alloc(void *addr, size_t min_length, unsigned flags, + + case UCT_ALLOC_METHOD_THP: + #ifdef MADV_HUGEPAGE ++ /* Fixed option is not supported for thp allocation*/ ++ if (flags & UCT_MD_MEM_FLAG_FIXED) { ++ break; ++ } ++ + if (!ucs_is_thp_enabled()) { + break; + } + +- /* Fixed option is not supported for thp allocation*/ +- if (flags & UCT_MD_MEM_FLAG_FIXED) { ++ huge_page_size = ucs_get_huge_page_size(); ++ if (huge_page_size <= 0) { + break; + } + +- alloc_length = ucs_align_up(min_length, ucs_get_huge_page_size()); ++ alloc_length = ucs_align_up(min_length, huge_page_size); + if (alloc_length >= 2 * min_length) { + break; + } + +- address = ucs_memalign(ucs_get_huge_page_size(), alloc_length +- UCS_MEMTRACK_VAL); ++ address = ucs_memalign(huge_page_size, alloc_length UCS_MEMTRACK_VAL); + if (address == NULL) { + ucs_trace("failed to allocate %zu bytes using THP: %m", alloc_length); + } else { +@@ -206,7 +212,7 @@ ucs_status_t uct_mem_alloc(void *addr, size_t min_length, unsigned flags, + alloc_length = min_length; + address = (flags & UCT_MD_MEM_FLAG_FIXED) ? addr : NULL; + status = ucs_sysv_alloc(&alloc_length, min_length * 2, &address, +- SHM_HUGETLB, &shmid UCS_MEMTRACK_VAL); ++ SHM_HUGETLB, alloc_name, &shmid); + if (status == UCS_OK) { + goto allocated_without_md; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.c +index a2c75b9..e9da0de 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.c +@@ -31,6 +31,10 @@ static UCS_CLASS_INIT_FUNC(uct_priv_worker_t, ucs_async_context_t *async, + { + UCS_CLASS_CALL_SUPER_INIT(uct_worker_t); + ++ if (async == NULL) { ++ return UCS_ERR_INVALID_PARAM; ++ } ++ + self->async = async; + self->thread_mode = thread_mode; + ucs_list_head_init(&self->tl_data); +@@ -101,8 +105,8 @@ void uct_worker_progress_register_safe(uct_worker_h tl_worker, ucs_callback_t fu + if (*id_p == UCS_CALLBACKQ_ID_NULL) { + UCS_ASYNC_BLOCK(worker->async); + *id_p = ucs_callbackq_add_safe(&worker->super.progress_q, func, arg, flags); +- UCS_ASYNC_UNBLOCK(worker->async); + ucs_assert(*id_p != UCS_CALLBACKQ_ID_NULL); ++ UCS_ASYNC_UNBLOCK(worker->async); + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.h +index 9342b17..78abfb1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.h +@@ -19,7 +19,6 @@ typedef struct uct_worker_tl_data { + ucs_list_link_t list; + uint32_t refcount; + uint32_t key; +- void *ptr; + } uct_worker_tl_data_t; + + +@@ -40,6 +39,8 @@ typedef struct uct_worker_progress { + #define uct_worker_tl_data_get(_worker, _key, _type, _cmp_fn, _init_fn, ...) \ + ({ \ + uct_worker_tl_data_t *data; \ ++ _type *result; \ ++ ucs_status_t status; \ + \ + ucs_list_for_each(data, &(_worker)->tl_data, list) { \ + if ((data->key == (_key)) && _cmp_fn(ucs_derived_of(data, _type), \ +@@ -50,16 +51,26 @@ typedef struct uct_worker_progress { + } \ + } \ + \ +- if (&data->list == &(_worker)->tl_data) { \ ++ if (&data->list == &(_worker)->tl_data) { /* not found */ \ + data = ucs_malloc(sizeof(_type), UCS_PP_QUOTE(_type)); \ +- if (data != NULL) { \ ++ if (data == NULL) { \ ++ result = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); \ ++ } else { \ + data->key = (_key); \ + data->refcount = 1; \ +- _init_fn(ucs_derived_of(data, _type), ## __VA_ARGS__); \ +- ucs_list_add_tail(&(_worker)->tl_data, &data->list); \ ++ status = _init_fn(ucs_derived_of(data, _type), ## __VA_ARGS__); \ ++ if (status != UCS_OK) { \ ++ ucs_free(data); \ ++ result = UCS_STATUS_PTR(status); \ ++ } else { \ ++ ucs_list_add_tail(&(_worker)->tl_data, &data->list); \ ++ result = ucs_derived_of(data, _type); \ ++ } \ + } \ ++ } else { \ ++ result = ucs_derived_of(data, _type); \ + } \ +- ucs_derived_of(data, _type); \ ++ result; \ + }) + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_iface.h +new file mode 100644 +index 0000000..4891182 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_iface.h +@@ -0,0 +1,47 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_IFACE_H ++#define UCT_CUDA_IFACE_H ++ ++#include ++#include ++#include ++ ++#define UCT_CUDA_FUNC(_func) \ ++ ({ \ ++ ucs_status_t _status = UCS_OK; \ ++ do { \ ++ cudaError_t _result = (_func); \ ++ if (cudaSuccess != _result) { \ ++ ucs_error("%s is failed. ret:%s", \ ++ UCS_PP_MAKE_STRING(_func), \ ++ cudaGetErrorString(_result)); \ ++ _status = UCS_ERR_IO_ERROR; \ ++ } \ ++ } while (0); \ ++ _status; \ ++ }) ++ ++ ++#define UCT_CUDADRV_FUNC(_func) \ ++ ({ \ ++ ucs_status_t _status = UCS_OK; \ ++ do { \ ++ CUresult _result = (_func); \ ++ const char *cu_err_str; \ ++ if (CUDA_ERROR_NOT_READY == _result) { \ ++ _status = UCS_INPROGRESS; \ ++ } else if (CUDA_SUCCESS != _result) { \ ++ cuGetErrorString(_result, &cu_err_str); \ ++ ucs_error("%s is failed. ret:%s", \ ++ UCS_PP_MAKE_STRING(_func),cu_err_str);\ ++ _status = UCS_ERR_IO_ERROR; \ ++ } \ ++ } while (0); \ ++ _status; \ ++ }) ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.c +new file mode 100644 +index 0000000..d9cf0f9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.c +@@ -0,0 +1,26 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#include ++ ++#include ++#include ++ ++int uct_cuda_is_mem_type_owned(uct_md_h md, void *addr, size_t length) ++{ ++ CUmemorytype memType = 0; ++ uint32_t isManaged = 0; ++ void *attrdata[] = {(void *)&memType, (void *)&isManaged}; ++ CUpointer_attribute attributes[2] = {CU_POINTER_ATTRIBUTE_MEMORY_TYPE, ++ CU_POINTER_ATTRIBUTE_IS_MANAGED}; ++ CUresult cu_err; ++ ++ if (addr == NULL) { ++ return 0; ++ } ++ ++ cu_err = cuPointerGetAttributes(2, attributes, attrdata, (CUdeviceptr)addr); ++ return ((cu_err == CUDA_SUCCESS) && (!isManaged && (memType == CU_MEMORYTYPE_DEVICE))); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.h +new file mode 100644 +index 0000000..050848a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.h +@@ -0,0 +1,13 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_MD_H ++#define UCT_CUDA_MD_H ++ ++#include ++ ++int uct_cuda_is_mem_type_owned(uct_md_h md, void *addr, size_t length); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.c +index 46cab05..a323e9e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.c +@@ -127,3 +127,35 @@ ucs_status_t uct_cuda_copy_ep_put_zcopy(uct_ep_h tl_ep, const uct_iov_t *iov, si + return status; + + } ++ ++ ++ucs_status_t uct_cuda_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) ++{ ++ ucs_status_t status; ++ ++ status = UCT_CUDA_FUNC(cudaMemcpy((void *)remote_addr, buffer, ++ length, cudaMemcpyHostToDevice)); ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), PUT, SHORT, length); ++ ucs_trace_data("PUT_SHORT size %d from %p to %p", ++ length, buffer, (void *)remote_addr); ++ return status; ++} ++ ++ucs_status_t uct_cuda_copy_ep_get_short(uct_ep_h tl_ep, void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) ++{ ++ ucs_status_t status; ++ ++ status = UCT_CUDA_FUNC(cudaMemcpy(buffer, (void *)remote_addr, ++ length, cudaMemcpyDeviceToHost)); ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), GET, SHORT, length); ++ ucs_trace_data("GET_SHORT size %d from %p to %p", ++ length, (void *)remote_addr, buffer); ++ return status; ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.h +index e029a39..ed0e88b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.h +@@ -33,4 +33,13 @@ ucs_status_t uct_cuda_copy_ep_put_zcopy(uct_ep_h tl_ep, + const uct_iov_t *iov, size_t iovcnt, + uint64_t remote_addr, uct_rkey_t rkey, + uct_completion_t *comp); ++ ++ucs_status_t uct_cuda_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey); ++ ++ucs_status_t uct_cuda_copy_ep_get_short(uct_ep_h tl_ep, void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.c +index f5e393b..7b877b7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.c +@@ -9,6 +9,7 @@ + + #include + #include ++#include + + + static ucs_config_field_t uct_cuda_copy_iface_config_table[] = { +@@ -19,7 +20,11 @@ static ucs_config_field_t uct_cuda_copy_iface_config_table[] = { + + {"MAX_POLL", "16", + "Max number of event completions to pick during cuda events polling", +- ucs_offsetof(uct_cuda_copy_iface_config_t, max_poll), UCS_CONFIG_TYPE_UINT}, ++ ucs_offsetof(uct_cuda_copy_iface_config_t, max_poll), UCS_CONFIG_TYPE_UINT}, ++ ++ {"MAX_EVENTS", "1024", ++ "Max number of cuda events. -1 is infinite", ++ ucs_offsetof(uct_cuda_copy_iface_config_t, max_cuda_events), UCS_CONFIG_TYPE_UINT}, + + {NULL} + }; +@@ -32,17 +37,20 @@ static void UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_copy_iface_t)(uct_iface_t*); + static ucs_status_t uct_cuda_copy_iface_get_address(uct_iface_h tl_iface, + uct_iface_addr_t *iface_addr) + { +- int *cuda_copy_addr = (int*)iface_addr; ++ uct_cuda_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_copy_iface_t); + +- *cuda_copy_addr = 0; ++ *(uct_cuda_copy_iface_addr_t*)iface_addr = iface->id; + return UCS_OK; + } + +-static int uct_cuda_copy_iface_is_reachable(const uct_iface_h iface, ++static int uct_cuda_copy_iface_is_reachable(const uct_iface_h tl_iface, + const uct_device_addr_t *dev_addr, + const uct_iface_addr_t *iface_addr) + { +- return 1; ++ uct_cuda_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_copy_iface_t); ++ uct_cuda_copy_iface_addr_t *addr = (uct_cuda_copy_iface_addr_t*)iface_addr; ++ ++ return (addr != NULL) && (iface->id == *addr); + } + + static ucs_status_t uct_cuda_copy_iface_query(uct_iface_h iface, +@@ -50,15 +58,17 @@ static ucs_status_t uct_cuda_copy_iface_query(uct_iface_h iface, + { + memset(iface_attr, 0, sizeof(uct_iface_attr_t)); + +- iface_attr->iface_addr_len = sizeof(int); ++ iface_attr->iface_addr_len = sizeof(uct_cuda_copy_iface_addr_t); + iface_attr->device_addr_len = 0; + iface_attr->ep_addr_len = 0; + iface_attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_GET_SHORT | ++ UCT_IFACE_FLAG_PUT_SHORT | + UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_PUT_ZCOPY | + UCT_IFACE_FLAG_PENDING; + +- iface_attr->cap.put.max_short = 0; ++ iface_attr->cap.put.max_short = UINT_MAX; + iface_attr->cap.put.max_bcopy = 0; + iface_attr->cap.put.min_zcopy = 0; + iface_attr->cap.put.max_zcopy = SIZE_MAX; +@@ -66,6 +76,7 @@ static ucs_status_t uct_cuda_copy_iface_query(uct_iface_h iface, + iface_attr->cap.put.align_mtu = iface_attr->cap.put.opt_zcopy_align; + iface_attr->cap.put.max_iov = 1; + ++ iface_attr->cap.get.max_short = UINT_MAX; + iface_attr->cap.get.max_bcopy = 0; + iface_attr->cap.get.min_zcopy = 0; + iface_attr->cap.get.max_zcopy = SIZE_MAX; +@@ -151,6 +162,8 @@ static unsigned uct_cuda_copy_iface_progress(uct_iface_h tl_iface) + } + + static uct_iface_ops_t uct_cuda_copy_iface_ops = { ++ .ep_get_short = uct_cuda_copy_ep_get_short, ++ .ep_put_short = uct_cuda_copy_ep_put_short, + .ep_get_zcopy = uct_cuda_copy_ep_get_zcopy, + .ep_put_zcopy = uct_cuda_copy_ep_put_zcopy, + .ep_pending_add = ucs_empty_function_return_busy, +@@ -220,7 +233,9 @@ static UCS_CLASS_INIT_FUNC(uct_cuda_copy_iface_t, uct_md_h md, uct_worker_h work + return UCS_ERR_NO_DEVICE; + } + +- self->config.max_poll = config->max_poll; ++ self->id = ucs_generate_uuid((uintptr_t)self); ++ self->config.max_poll = config->max_poll; ++ self->config.max_cuda_events = config->max_cuda_events; + + status = ucs_mpool_init(&self->cuda_event_desc, + 0, +@@ -228,7 +243,7 @@ static UCS_CLASS_INIT_FUNC(uct_cuda_copy_iface_t, uct_md_h md, uct_worker_h work + 0, + UCS_SYS_CACHE_LINE_SIZE, + 128, +- 1024, ++ self->config.max_cuda_events, + &uct_cuda_copy_event_desc_mpool_ops, + "CUDA EVENT objects"); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.h +index 47ce350..7c8c5de 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.h +@@ -7,37 +7,27 @@ + #define UCT_CUDA_COPY_IFACE_H + + #include +-#include +-#include +-#include +-#include ++#include + + + #define UCT_CUDA_COPY_TL_NAME "cuda_copy" +-#define UCT_CUDA_DEV_NAME "cudacopy0" +- +-#define UCT_CUDA_FUNC(_func) ({ \ +-ucs_status_t _status = UCS_OK; \ +-do { \ +- cudaError_t _result = (_func); \ +- if (cudaSuccess != _result) { \ +- ucs_error("%s failed with %d \n", \ +- UCS_PP_MAKE_STRING(_func), _result); \ +- _status = UCS_ERR_IO_ERROR; \ +- } \ +-} while (0); \ +-_status; \ +-}) ++#define UCT_CUDA_DEV_NAME "cudacopy0" ++ ++ ++typedef uint64_t uct_cuda_copy_iface_addr_t; ++ + + typedef struct uct_cuda_copy_iface { +- uct_base_iface_t super; +- ucs_mpool_t cuda_event_desc; +- ucs_queue_head_t outstanding_d2h_cuda_event_q; +- ucs_queue_head_t outstanding_h2d_cuda_event_q; +- cudaStream_t stream_d2h; +- cudaStream_t stream_h2d; ++ uct_base_iface_t super; ++ uct_cuda_copy_iface_addr_t id; ++ ucs_mpool_t cuda_event_desc; ++ ucs_queue_head_t outstanding_d2h_cuda_event_q; ++ ucs_queue_head_t outstanding_h2d_cuda_event_q; ++ cudaStream_t stream_d2h; ++ cudaStream_t stream_h2d; + struct { +- unsigned max_poll; ++ unsigned max_poll; ++ unsigned max_cuda_events; + } config; + } uct_cuda_copy_iface_t; + +@@ -45,8 +35,10 @@ typedef struct uct_cuda_copy_iface { + typedef struct uct_cuda_copy_iface_config { + uct_iface_config_t super; + unsigned max_poll; ++ unsigned max_cuda_events; + } uct_cuda_copy_iface_config_t; + ++ + typedef struct uct_cuda_copy_event_desc { + cudaEvent_t event; + uct_completion_t *comp; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.c +index b255f84..af6e17b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.c +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2017. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2017-2018. ALL RIGHTS RESERVED. + * See file LICENSE for terms. + */ + +@@ -92,33 +92,6 @@ static ucs_status_t uct_cuda_copy_mem_dereg(uct_md_h md, uct_mem_h memh) + return UCS_OK; + } + +-static int uct_is_cuda_copy_mem_type_owned(uct_md_h md, void *addr, size_t length) +-{ +- int memory_type; +- struct cudaPointerAttributes attributes; +- cudaError_t cuda_err; +- CUresult cu_err; +- +- if (addr == NULL) { +- return 0; +- } +- +- cu_err = cuPointerGetAttribute(&memory_type, +- CU_POINTER_ATTRIBUTE_MEMORY_TYPE, +- (CUdeviceptr)addr); +- if (cu_err != CUDA_SUCCESS) { +- cuda_err = cudaPointerGetAttributes (&attributes, addr); +- if (cuda_err == cudaSuccess) { +- if (attributes.memoryType == cudaMemoryTypeDevice) { +- return 1; +- } +- } +- } else if (memory_type == CU_MEMORYTYPE_DEVICE) { +- return 1; +- } +- return 0; +-} +- + static ucs_status_t uct_cuda_copy_query_md_resources(uct_md_resource_desc_t **resources_p, + unsigned *num_resources_p) + { +@@ -148,7 +121,7 @@ static uct_md_ops_t md_ops = { + .mkey_pack = uct_cuda_copy_mkey_pack, + .mem_reg = uct_cuda_copy_mem_reg, + .mem_dereg = uct_cuda_copy_mem_dereg, +- .is_mem_type_owned = uct_is_cuda_copy_mem_type_owned, ++ .is_mem_type_owned = uct_cuda_is_mem_type_owned, + }; + + static ucs_status_t uct_cuda_copy_md_open(const char *md_name, const uct_md_config_t *md_config, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.h +index 4af2863..bd50206 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.h +@@ -7,6 +7,7 @@ + #define UCT_CUDA_COPY_MD_H + + #include ++#include + + #define UCT_CUDA_COPY_MD_NAME "cuda_cpy" + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.c +new file mode 100644 +index 0000000..becb90a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.c +@@ -0,0 +1,263 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "cuda_ipc_cache.h" ++#include ++#include ++#include ++#include ++#include ++ ++static ucs_pgt_dir_t *uct_cuda_ipc_cache_pgt_dir_alloc(const ucs_pgtable_t *pgtable) ++{ ++ return ucs_memalign(UCS_PGT_ENTRY_MIN_ALIGN, sizeof(ucs_pgt_dir_t), ++ "cuda_ipc_cache_pgdir"); ++} ++ ++static void uct_cuda_ipc_cache_pgt_dir_release(const ucs_pgtable_t *pgtable, ++ ucs_pgt_dir_t *dir) ++{ ++ ucs_free(dir); ++} ++ ++static void ++uct_cuda_ipc_cache_region_collect_callback(const ucs_pgtable_t *pgtable, ++ ucs_pgt_region_t *pgt_region, ++ void *arg) ++{ ++ ucs_list_link_t *list = arg; ++ uct_cuda_ipc_cache_region_t *region; ++ ++ region = ucs_derived_of(pgt_region, uct_cuda_ipc_cache_region_t); ++ ucs_list_add_tail(list, ®ion->list); ++} ++ ++static void uct_cuda_ipc_cache_purge(uct_cuda_ipc_cache_t *cache) ++{ ++ uct_cuda_ipc_cache_region_t *region, *tmp; ++ ucs_list_link_t region_list; ++ ++ ucs_list_head_init(®ion_list); ++ ucs_pgtable_purge(&cache->pgtable, uct_cuda_ipc_cache_region_collect_callback, ++ ®ion_list); ++ ucs_list_for_each_safe(region, tmp, ®ion_list, list) { ++ UCT_CUDADRV_FUNC(cuIpcCloseMemHandle((CUdeviceptr)region->mapped_addr)); ++ ucs_free(region); ++ } ++ ucs_trace("%s: cuda ipc cache purged", cache->name); ++} ++ ++static ucs_status_t uct_cuda_ipc_open_memhandle(CUipcMemHandle memh, ++ CUdeviceptr *mapped_addr) ++{ ++ CUresult cuerr; ++ ++ cuerr = cuIpcOpenMemHandle(mapped_addr, memh, ++ CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS); ++ if (cuerr != CUDA_SUCCESS) { ++ if (cuerr == CUDA_ERROR_ALREADY_MAPPED) { ++ return UCS_ERR_ALREADY_EXISTS; ++ } ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ return UCS_OK; ++} ++ ++static void uct_cuda_ipc_cache_invalidate_regions(uct_cuda_ipc_cache_t *cache, ++ void *from, void *to) ++{ ++ ucs_list_link_t region_list; ++ ucs_status_t status; ++ uct_cuda_ipc_cache_region_t *region, *tmp; ++ ++ ucs_list_head_init(®ion_list); ++ ucs_pgtable_search_range(&cache->pgtable, (ucs_pgt_addr_t)from, ++ (ucs_pgt_addr_t)to, ++ uct_cuda_ipc_cache_region_collect_callback, ++ ®ion_list); ++ ucs_list_for_each_safe(region, tmp, ®ion_list, list) { ++ status = ucs_pgtable_remove(&cache->pgtable, ®ion->super); ++ if (status != UCS_OK) { ++ ucs_error("failed to remove address:%p from cache (%s)", ++ (void *)region->key.d_bptr, ucs_status_string(status)); ++ } ++ UCT_CUDADRV_FUNC(cuIpcCloseMemHandle((CUdeviceptr)region->mapped_addr)); ++ ucs_free(region); ++ } ++ ucs_trace("%s: closed memhandles in the range [%p..%p]", ++ cache->name, from, to); ++} ++ ++ucs_status_t uct_cuda_ipc_cache_map_memhandle(void *arg, uct_cuda_ipc_key_t *key, ++ void **mapped_addr) ++{ ++ uct_cuda_ipc_cache_t *cache = (uct_cuda_ipc_cache_t *)arg; ++ ucs_status_t status; ++ ucs_pgt_region_t *pgt_region; ++ uct_cuda_ipc_cache_region_t *region; ++ ++ pthread_rwlock_rdlock(&cache->lock); ++ pgt_region = UCS_PROFILE_CALL(ucs_pgtable_lookup, ++ &cache->pgtable, key->d_bptr); ++ if (ucs_likely(pgt_region != NULL)) { ++ region = ucs_derived_of(pgt_region, uct_cuda_ipc_cache_region_t); ++ if (memcmp((const void *)&key->ph, (const void *)®ion->key.ph, ++ sizeof(key->ph)) == 0) { ++ /*cache hit */ ++ ucs_trace("%s: cuda_ipc cache hit addr:%p size:%lu region:" ++ UCS_PGT_REGION_FMT, cache->name, (void *)key->d_bptr, ++ key->b_len, UCS_PGT_REGION_ARG(®ion->super)); ++ ++ *mapped_addr = region->mapped_addr; ++ pthread_rwlock_unlock(&cache->lock); ++ return UCS_OK; ++ } else { ++ ucs_trace("%s: cuda_ipc cache remove stale region:" ++ UCS_PGT_REGION_FMT " new_addr:%p new_size:%lu", ++ cache->name, UCS_PGT_REGION_ARG(®ion->super), ++ (void *)key->d_bptr, key->b_len); ++ ++ status = ucs_pgtable_remove(&cache->pgtable, ®ion->super); ++ if (status != UCS_OK) { ++ ucs_error("%s: failed to remove address:%p from cache", ++ cache->name, (void *)key->d_bptr); ++ goto err; ++ } ++ ++ /* close memhandle */ ++ UCT_CUDADRV_FUNC(cuIpcCloseMemHandle((CUdeviceptr) ++ region->mapped_addr)); ++ ucs_free(region); ++ } ++ } ++ ++ status = uct_cuda_ipc_open_memhandle(key->ph, (CUdeviceptr *)mapped_addr); ++ if (ucs_unlikely(status != UCS_OK)) { ++ if (ucs_likely(status == UCS_ERR_ALREADY_EXISTS)) { ++ /* unmap all overlapping regions and retry*/ ++ uct_cuda_ipc_cache_invalidate_regions(cache, (void *)key->d_bptr, ++ (void *)key->d_bptr + key->b_len); ++ status = uct_cuda_ipc_open_memhandle(key->ph, (CUdeviceptr *)mapped_addr); ++ if (ucs_unlikely(status != UCS_OK)) { ++ if (ucs_likely(status == UCS_ERR_ALREADY_EXISTS)) { ++ /* unmap all cache entries and retry */ ++ uct_cuda_ipc_cache_purge(cache); ++ status = uct_cuda_ipc_open_memhandle(key->ph, (CUdeviceptr *)mapped_addr); ++ if (status != UCS_OK) { ++ ucs_fatal("%s: failed to open ipc mem handle. addr:%p " ++ "len:%lu (%s)", cache->name, ++ (void *)key->d_bptr, key->b_len, ++ ucs_status_string(status)); ++ } ++ } else { ++ ucs_fatal("%s: failed to open ipc mem handle. addr:%p len:%lu", ++ cache->name, (void *)key->d_bptr, key->b_len); ++ } ++ } ++ } else { ++ ucs_fatal("%s: failed to open ipc mem handle. addr:%p len:%lu", ++ cache->name, (void *)key->d_bptr, key->b_len); ++ } ++ } ++ ++ /*create new cache entry */ ++ region = ucs_memalign(UCS_PGT_ENTRY_MIN_ALIGN, ++ sizeof(uct_cuda_ipc_cache_region_t), ++ "uct_cuda_ipc_cache_region"); ++ if (region == NULL) { ++ ucs_warn("failed to allocate uct_cuda_ipc_cache region"); ++ status = UCS_ERR_NO_MEMORY; ++ goto err; ++ } ++ ++ region->super.start = ucs_align_down_pow2((uintptr_t)key->d_bptr, ++ UCS_PGT_ADDR_ALIGN); ++ region->super.end = ucs_align_up_pow2 ((uintptr_t)key->d_bptr + key->b_len, ++ UCS_PGT_ADDR_ALIGN); ++ region->key = *key; ++ region->mapped_addr = *mapped_addr; ++ ++ status = UCS_PROFILE_CALL(ucs_pgtable_insert, ++ &cache->pgtable, ®ion->super); ++ if (status == UCS_ERR_ALREADY_EXISTS) { ++ /* overlapped region means memory freed at source. remove and try insert */ ++ uct_cuda_ipc_cache_invalidate_regions(cache, ++ (void *)region->super.start, ++ (void *)region->super.end); ++ status = UCS_PROFILE_CALL(ucs_pgtable_insert, ++ &cache->pgtable, ®ion->super); ++ } ++ if (status != UCS_OK) { ++ ++ ucs_error("%s: failed to insert region:"UCS_PGT_REGION_FMT" size:%lu :%s", ++ cache->name, UCS_PGT_REGION_ARG(®ion->super), key->b_len, ++ ucs_status_string(status)); ++ ucs_free(region); ++ goto err; ++ } ++ ++ ucs_trace("%s: cuda_ipc cache new region:"UCS_PGT_REGION_FMT" size:%lu", ++ cache->name, UCS_PGT_REGION_ARG(®ion->super), key->b_len); ++ ++ pthread_rwlock_unlock(&cache->lock); ++ return UCS_OK; ++err: ++ pthread_rwlock_unlock(&cache->lock); ++ return status; ++} ++ ++ucs_status_t uct_cuda_ipc_create_cache(uct_cuda_ipc_cache_t **cache, ++ const char *name) ++{ ++ ucs_status_t status; ++ uct_cuda_ipc_cache_t *cache_desc; ++ int ret; ++ ++ cache_desc = ucs_malloc(sizeof(uct_cuda_ipc_cache_t), "uct_cuda_ipc_cache_t"); ++ if (cache_desc == NULL) { ++ ucs_error("failed to allocate memory for cuda_ipc cache"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ ret = pthread_rwlock_init(&cache_desc->lock, NULL); ++ if (ret) { ++ ucs_error("pthread_rwlock_init() failed: %m"); ++ status = UCS_ERR_INVALID_PARAM; ++ goto err; ++ } ++ ++ status = ucs_pgtable_init(&cache_desc->pgtable, ++ uct_cuda_ipc_cache_pgt_dir_alloc, ++ uct_cuda_ipc_cache_pgt_dir_release); ++ if (status != UCS_OK) { ++ goto err_destroy_rwlock; ++ } ++ ++ cache_desc->name = strdup(name); ++ if (cache_desc->name == NULL) { ++ status = UCS_ERR_NO_MEMORY; ++ goto err_destroy_rwlock; ++ } ++ ++ *cache = cache_desc; ++ return UCS_OK; ++ ++err_destroy_rwlock: ++ pthread_rwlock_destroy(&cache_desc->lock); ++err: ++ free(cache_desc); ++ return status; ++} ++ ++void uct_cuda_ipc_destroy_cache(uct_cuda_ipc_cache_t *cache) ++{ ++ uct_cuda_ipc_cache_purge(cache); ++ ucs_pgtable_cleanup(&cache->pgtable); ++ pthread_rwlock_destroy(&cache->lock); ++ free(cache->name); ++ ucs_free(cache); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.h +new file mode 100644 +index 0000000..fa5f867 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.h +@@ -0,0 +1,48 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_IPC_CACHE_H_ ++#define UCT_CUDA_IPC_CACHE_H_ ++ ++#include ++#include ++#include "cuda_ipc_md.h" ++#include ++#include ++ ++ ++typedef struct uct_cuda_ipc_cache uct_cuda_ipc_cache_t; ++typedef struct uct_cuda_ipc_cache_region uct_cuda_ipc_cache_region_t; ++ ++ ++typedef struct uct_cuda_ipc_rem_memh uct_cuda_ipc_rem_memh_t; ++ ++ ++struct uct_cuda_ipc_cache_region { ++ ucs_pgt_region_t super; /**< Base class - page table region */ ++ ucs_list_link_t list; /**< List element */ ++ uct_cuda_ipc_key_t key; /**< Remote memory key */ ++ void *mapped_addr; /**< Local mapped address */ ++}; ++ ++ ++struct uct_cuda_ipc_cache { ++ pthread_rwlock_t lock; /**< protests the page table */ ++ ucs_pgtable_t pgtable; /**< Page table to hold the regions */ ++ char *name; /**< Name */ ++}; ++ ++ ++ucs_status_t uct_cuda_ipc_create_cache(uct_cuda_ipc_cache_t **cache, ++ const char *name); ++ ++ ++void uct_cuda_ipc_destroy_cache(uct_cuda_ipc_cache_t *cache); ++ ++ ++ucs_status_t uct_cuda_ipc_cache_map_memhandle(void *arg, uct_cuda_ipc_key_t *key, ++ void **mapped_addr); ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.c +new file mode 100644 +index 0000000..f3cf0b0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.c +@@ -0,0 +1,168 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#include "cuda_ipc_ep.h" ++#include "cuda_ipc_iface.h" ++#include "cuda_ipc_md.h" ++ ++#include ++#include ++#include ++ ++#define UCT_CUDA_IPC_PUT 0 ++#define UCT_CUDA_IPC_GET 1 ++ ++static UCS_CLASS_INIT_FUNC(uct_cuda_ipc_ep_t, uct_iface_t *tl_iface, ++ const uct_device_addr_t *dev_addr, ++ const uct_iface_addr_t *iface_addr) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_ipc_iface_t); ++ ucs_status_t status; ++ char target_name[64]; ++ ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &iface->super); ++ self->remote_memh_cache = NULL; ++ ++ if (iface->config.enable_cache) { ++ snprintf(target_name, sizeof(target_name), "dest:%d", *(pid_t*)iface_addr); ++ status = uct_cuda_ipc_create_cache(&self->remote_memh_cache, target_name); ++ if (status != UCS_OK) { ++ ucs_error("could not create create cuda ipc cache: %s", ++ ucs_status_string(status)); ++ return status; ++ } ++ } ++ ++ return UCS_OK; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(uct_cuda_ipc_ep_t) ++{ ++ if (self->remote_memh_cache) { ++ uct_cuda_ipc_destroy_cache(self->remote_memh_cache); ++ } ++} ++ ++UCS_CLASS_DEFINE(uct_cuda_ipc_ep_t, uct_base_ep_t) ++UCS_CLASS_DEFINE_NEW_FUNC(uct_cuda_ipc_ep_t, uct_ep_t, uct_iface_t*, ++ const uct_device_addr_t *, const uct_iface_addr_t *); ++UCS_CLASS_DEFINE_DELETE_FUNC(uct_cuda_ipc_ep_t, uct_ep_t); ++ ++#define uct_cuda_ipc_trace_data(_addr, _rkey, _fmt, ...) \ ++ ucs_trace_data(_fmt " to %"PRIx64"(%+ld)", ## __VA_ARGS__, (_addr), (_rkey)) ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++uct_cuda_ipc_post_cuda_async_copy(uct_ep_h tl_ep, uint64_t remote_addr, ++ const uct_iov_t *iov, uct_rkey_t rkey, ++ uct_completion_t *comp, int direction) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_cuda_ipc_iface_t); ++ uct_cuda_ipc_ep_t *ep = ucs_derived_of(tl_ep, uct_cuda_ipc_ep_t); ++ uct_cuda_ipc_key_t *key = (uct_cuda_ipc_key_t *) rkey; ++ void *mapped_rem_addr; ++ void *mapped_addr; ++ uct_cuda_ipc_event_desc_t *cuda_ipc_event; ++ ucs_queue_head_t *outstanding_queue; ++ ucs_status_t status; ++ CUdeviceptr dst, src; ++ CUdevice cu_device; ++ CUstream stream; ++ size_t offset; ++ ++ if (0 == iov[0].length) { ++ ucs_trace_data("Zero length request: skip it"); ++ return UCS_OK; ++ } ++ ++ UCT_CUDA_IPC_GET_DEVICE(cu_device); ++ ++ status = iface->map_memhandle((void *)ep->remote_memh_cache, key, &mapped_addr); ++ if (status != UCS_OK) { ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ offset = (uintptr_t)remote_addr - (uintptr_t)key->d_bptr; ++ mapped_rem_addr = (void *) ((uintptr_t) mapped_addr + offset); ++ ucs_assert(offset <= key->b_len); ++ ++ if (!iface->streams_initialized) { ++ status = uct_cuda_ipc_iface_init_streams(iface); ++ if (UCS_OK != status) { ++ return status; ++ } ++ } ++ ++ stream = iface->stream_d2d[key->dev_num]; ++ outstanding_queue = &iface->outstanding_d2d_event_q; ++ cuda_ipc_event = ucs_mpool_get(&iface->event_desc); ++ ++ if (ucs_unlikely(cuda_ipc_event == NULL)) { ++ ucs_error("Failed to allocate cuda_ipc event object"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ dst = (CUdeviceptr) ++ ((direction == UCT_CUDA_IPC_PUT) ? mapped_rem_addr : iov[0].buffer); ++ src = (CUdeviceptr) ++ ((direction == UCT_CUDA_IPC_PUT) ? iov[0].buffer : mapped_rem_addr); ++ ++ status = UCT_CUDADRV_FUNC(cuMemcpyDtoDAsync(dst, src, iov[0].length, stream)); ++ if (UCS_OK != status) { ++ ucs_mpool_put(cuda_ipc_event); ++ return status; ++ } ++ ++ status = UCT_CUDADRV_FUNC(cuEventRecord(cuda_ipc_event->event, stream)); ++ if (UCS_OK != status) { ++ ucs_mpool_put(cuda_ipc_event); ++ return status; ++ } ++ ++ ucs_queue_push(outstanding_queue, &cuda_ipc_event->queue); ++ cuda_ipc_event->comp = comp; ++ cuda_ipc_event->mapped_addr = mapped_addr; ++ ucs_trace("cuMemcpyDtoDAsync issued :%p dst:%p, src:%p len:%ld", ++ cuda_ipc_event, (void *) dst, (void *) src, iov[0].length); ++ return UCS_INPROGRESS; ++} ++ ++ucs_status_t uct_cuda_ipc_ep_get_zcopy(uct_ep_h tl_ep, const uct_iov_t *iov, size_t iovcnt, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) ++{ ++ ucs_status_t status; ++ ++ status = uct_cuda_ipc_post_cuda_async_copy(tl_ep, remote_addr, iov, ++ rkey, comp, UCT_CUDA_IPC_GET); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), GET, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ uct_cuda_ipc_trace_data(remote_addr, rkey, "GET_ZCOPY [length %zu]", ++ uct_iov_total_length(iov, iovcnt)); ++ return status; ++} ++ ++ucs_status_t uct_cuda_ipc_ep_put_zcopy(uct_ep_h tl_ep, const uct_iov_t *iov, size_t iovcnt, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) ++{ ++ ucs_status_t status; ++ ++ status = uct_cuda_ipc_post_cuda_async_copy(tl_ep, remote_addr, iov, ++ rkey, comp, UCT_CUDA_IPC_PUT); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), PUT, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ uct_cuda_ipc_trace_data(remote_addr, rkey, "PUT_ZCOPY [length %zu]", ++ uct_iov_total_length(iov, iovcnt)); ++ return status; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.h +new file mode 100644 +index 0000000..4643806 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.h +@@ -0,0 +1,37 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCT_CUDA_IPC_EP_H ++#define UCT_CUDA_IPC_EP_H ++ ++#include ++#include ++#include ++#include "cuda_ipc_md.h" ++#include "cuda_ipc_cache.h" ++ ++typedef struct uct_cuda_ipc_ep_addr { ++ int ep_id; ++} uct_cuda_ipc_ep_addr_t; ++ ++typedef struct uct_cuda_ipc_ep { ++ uct_base_ep_t super; ++ uct_cuda_ipc_cache_t *remote_memh_cache; ++} uct_cuda_ipc_ep_t; ++ ++UCS_CLASS_DECLARE_NEW_FUNC(uct_cuda_ipc_ep_t, uct_ep_t, uct_iface_t*, ++ const uct_device_addr_t *, const uct_iface_addr_t *); ++UCS_CLASS_DECLARE_DELETE_FUNC(uct_cuda_ipc_ep_t, uct_ep_t); ++ ++ucs_status_t uct_cuda_ipc_ep_get_zcopy(uct_ep_h tl_ep, ++ const uct_iov_t *iov, size_t iovcnt, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); ++ ++ucs_status_t uct_cuda_ipc_ep_put_zcopy(uct_ep_h tl_ep, ++ const uct_iov_t *iov, size_t iovcnt, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c +new file mode 100644 +index 0000000..785bdc0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c +@@ -0,0 +1,358 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#include "cuda_ipc_iface.h" ++#include "cuda_ipc_md.h" ++#include "cuda_ipc_ep.h" ++ ++#include ++#include ++ ++ ++static ucs_config_field_t uct_cuda_ipc_iface_config_table[] = { ++ ++ {"", "", NULL, ++ ucs_offsetof(uct_cuda_ipc_iface_config_t, super), ++ UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, ++ ++ {"MAX_POLL", "16", ++ "Max number of event completions to pick during cuda events polling", ++ ucs_offsetof(uct_cuda_ipc_iface_config_t, max_poll), UCS_CONFIG_TYPE_UINT}, ++ ++ {"CACHE", "y", ++ "Enable remote endpoint IPC memhandle mapping cache", ++ ucs_offsetof(uct_cuda_ipc_iface_config_t, enable_cache), ++ UCS_CONFIG_TYPE_BOOL}, ++ ++ {NULL} ++}; ++ ++ ++/* Forward declaration for the delete function */ ++static void UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_ipc_iface_t)(uct_iface_t*); ++ ++ ++static uint64_t uct_cuda_ipc_iface_node_guid(uct_base_iface_t *iface) ++{ ++ return ucs_machine_guid() * ++ ucs_string_to_id(iface->md->component->name); ++} ++ ++ucs_status_t uct_cuda_ipc_iface_get_device_address(uct_iface_t *tl_iface, ++ uct_device_addr_t *addr) ++{ ++ uct_base_iface_t *iface = ucs_derived_of(tl_iface, uct_base_iface_t); ++ ++ *(uint64_t*)addr = uct_cuda_ipc_iface_node_guid(iface); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_iface_get_address(uct_iface_h tl_iface, ++ uct_iface_addr_t *iface_addr) ++{ ++ *(pid_t*)iface_addr = getpid(); ++ return UCS_OK; ++} ++ ++static int uct_cuda_ipc_iface_is_reachable(const uct_iface_h tl_iface, ++ const uct_device_addr_t *dev_addr, ++ const uct_iface_addr_t *iface_addr) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_ipc_iface_t); ++ ++ return ((uct_cuda_ipc_iface_node_guid(&iface->super) == ++ *((const uint64_t *)dev_addr)) && ((getpid() != *(pid_t *)iface_addr))); ++} ++ ++static ucs_status_t uct_cuda_ipc_iface_query(uct_iface_h iface, ++ uct_iface_attr_t *iface_attr) ++{ ++ memset(iface_attr, 0, sizeof(uct_iface_attr_t)); ++ iface_attr->iface_addr_len = sizeof(pid_t); ++ iface_attr->device_addr_len = sizeof(uint64_t); ++ iface_attr->ep_addr_len = 0; ++ iface_attr->max_conn_priv = 0; ++ iface_attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_PENDING | ++ UCT_IFACE_FLAG_GET_ZCOPY | ++ UCT_IFACE_FLAG_PUT_ZCOPY; ++ ++ iface_attr->cap.put.max_short = 0; ++ iface_attr->cap.put.max_bcopy = 0; ++ iface_attr->cap.put.min_zcopy = 0; ++ iface_attr->cap.put.max_zcopy = UCT_CUDA_IPC_MAX_ALLOC_SZ; ++ iface_attr->cap.put.opt_zcopy_align = 1; ++ iface_attr->cap.put.align_mtu = iface_attr->cap.put.opt_zcopy_align; ++ iface_attr->cap.put.max_iov = 1; ++ ++ iface_attr->cap.get.max_bcopy = 0; ++ iface_attr->cap.get.min_zcopy = 0; ++ iface_attr->cap.get.max_zcopy = UCT_CUDA_IPC_MAX_ALLOC_SZ; ++ iface_attr->cap.get.opt_zcopy_align = 1; ++ iface_attr->cap.get.align_mtu = iface_attr->cap.get.opt_zcopy_align; ++ iface_attr->cap.get.max_iov = 1; ++ ++ iface_attr->latency.overhead = 1e-9; ++ iface_attr->latency.growth = 0; ++ iface_attr->bandwidth = 6911 * 1024.0 * 1024.0; ++ iface_attr->overhead = 0; ++ iface_attr->priority = 0; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t ++uct_cuda_ipc_iface_flush(uct_iface_h tl_iface, unsigned flags, ++ uct_completion_t *comp) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_ipc_iface_t); ++ ++ if (comp != NULL) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ if (ucs_queue_is_empty(&iface->outstanding_d2d_event_q)) { ++ UCT_TL_IFACE_STAT_FLUSH(ucs_derived_of(tl_iface, uct_base_iface_t)); ++ return UCS_OK; ++ } ++ ++ UCT_TL_IFACE_STAT_FLUSH_WAIT(ucs_derived_of(tl_iface, uct_base_iface_t)); ++ return UCS_INPROGRESS; ++} ++ ++static UCS_F_ALWAYS_INLINE unsigned ++uct_cuda_ipc_progress_event_q(uct_cuda_ipc_iface_t *iface, ++ ucs_queue_head_t *event_q, unsigned max_events) ++{ ++ unsigned count = 0; ++ uct_cuda_ipc_event_desc_t *cuda_ipc_event; ++ ucs_queue_iter_t iter; ++ ucs_status_t status; ++ ++ ucs_queue_for_each_safe(cuda_ipc_event, iter, event_q, queue) { ++ status = UCT_CUDADRV_FUNC(cuEventQuery(cuda_ipc_event->event)); ++ if (UCS_INPROGRESS == status) { ++ continue; ++ } else if (UCS_OK != status) { ++ return status; ++ } ++ ++ ucs_queue_del_iter(event_q, iter); ++ if (cuda_ipc_event->comp != NULL) { ++ uct_invoke_completion(cuda_ipc_event->comp, UCS_OK); ++ } ++ ++ status = iface->unmap_memhandle(cuda_ipc_event->mapped_addr); ++ if (status != UCS_OK) { ++ ucs_fatal("failed to unmap addr:%p", cuda_ipc_event->mapped_addr); ++ } ++ ++ ucs_trace_poll("CUDA_IPC Event Done :%p", cuda_ipc_event); ++ ucs_mpool_put(cuda_ipc_event); ++ count++; ++ ++ if (count >= max_events) { ++ break; ++ } ++ } ++ ++ return count; ++} ++ ++static unsigned uct_cuda_ipc_iface_progress(uct_iface_h tl_iface) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_ipc_iface_t); ++ unsigned max_events = iface->config.max_poll; ++ ++ return uct_cuda_ipc_progress_event_q(iface, &iface->outstanding_d2d_event_q, ++ max_events); ++} ++ ++static uct_iface_ops_t uct_cuda_ipc_iface_ops = { ++ .ep_get_zcopy = uct_cuda_ipc_ep_get_zcopy, ++ .ep_put_zcopy = uct_cuda_ipc_ep_put_zcopy, ++ .ep_pending_add = ucs_empty_function_return_busy, ++ .ep_pending_purge = ucs_empty_function, ++ .ep_flush = uct_base_ep_flush, ++ .ep_fence = uct_base_ep_fence, ++ .ep_create_connected = UCS_CLASS_NEW_FUNC_NAME(uct_cuda_ipc_ep_t), ++ .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_ipc_ep_t), ++ .iface_flush = uct_cuda_ipc_iface_flush, ++ .iface_fence = uct_base_iface_fence, ++ .iface_progress_enable = uct_base_iface_progress_enable, ++ .iface_progress_disable = uct_base_iface_progress_disable, ++ .iface_progress = uct_cuda_ipc_iface_progress, ++ .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_ipc_iface_t), ++ .iface_query = uct_cuda_ipc_iface_query, ++ .iface_get_device_address = uct_cuda_ipc_iface_get_device_address, ++ .iface_get_address = uct_cuda_ipc_iface_get_address, ++ .iface_is_reachable = uct_cuda_ipc_iface_is_reachable, ++}; ++ ++static void uct_cuda_ipc_event_desc_init(ucs_mpool_t *mp, void *obj, void *chunk) ++{ ++ uct_cuda_ipc_event_desc_t *base = (uct_cuda_ipc_event_desc_t *) obj; ++ ++ memset(base, 0, sizeof(*base)); ++ UCT_CUDADRV_FUNC(cuEventCreate(&base->event, CU_EVENT_DISABLE_TIMING)); ++} ++ ++static void uct_cuda_ipc_event_desc_cleanup(ucs_mpool_t *mp, void *obj) ++{ ++ uct_cuda_ipc_event_desc_t *base = (uct_cuda_ipc_event_desc_t *) obj; ++ ++ UCT_CUDADRV_FUNC(cuEventDestroy(base->event)); ++} ++ ++ucs_status_t uct_cuda_ipc_iface_init_streams(uct_cuda_ipc_iface_t *iface) ++{ ++ ucs_status_t status; ++ int i; ++ ++ for (i = 0; i < iface->device_count; i++) { ++ status = UCT_CUDADRV_FUNC(cuStreamCreate(&iface->stream_d2d[i], ++ CU_STREAM_NON_BLOCKING)); ++ if (UCS_OK != status) { ++ return status; ++ } ++ } ++ ++ iface->streams_initialized = 1; ++ ++ return UCS_OK; ++} ++ ++static ucs_mpool_ops_t uct_cuda_ipc_event_desc_mpool_ops = { ++ .chunk_alloc = ucs_mpool_chunk_malloc, ++ .chunk_release = ucs_mpool_chunk_free, ++ .obj_init = uct_cuda_ipc_event_desc_init, ++ .obj_cleanup = uct_cuda_ipc_event_desc_cleanup, ++}; ++ ++ucs_status_t uct_cuda_ipc_map_memhandle(void *arg, uct_cuda_ipc_key_t *key, ++ void **mapped_addr) ++{ ++ return UCT_CUDADRV_FUNC(cuIpcOpenMemHandle((CUdeviceptr *)mapped_addr, ++ key->ph, CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS)); ++} ++ ++ucs_status_t uct_cuda_ipc_unmap_memhandle(void *mapped_addr) ++{ ++ return UCT_CUDADRV_FUNC(cuIpcCloseMemHandle((CUdeviceptr)mapped_addr)); ++} ++ ++static UCS_CLASS_INIT_FUNC(uct_cuda_ipc_iface_t, uct_md_h md, uct_worker_h worker, ++ const uct_iface_params_t *params, ++ const uct_iface_config_t *tl_config) ++{ ++ uct_cuda_ipc_iface_config_t *config = NULL; ++ ucs_status_t status; ++ int dev_count; ++ ++ config = ucs_derived_of(tl_config, uct_cuda_ipc_iface_config_t); ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &uct_cuda_ipc_iface_ops, md, worker, ++ params, tl_config UCS_STATS_ARG(params->stats_root) ++ UCS_STATS_ARG(UCT_CUDA_IPC_TL_NAME)); ++ ++ if (strncmp(params->mode.device.dev_name, ++ UCT_CUDA_IPC_DEV_NAME, strlen(UCT_CUDA_IPC_DEV_NAME)) != 0) { ++ ucs_error("No device was found: %s", params->mode.device.dev_name); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ status = UCT_CUDADRV_FUNC(cuDeviceGetCount(&dev_count)); ++ if (UCS_OK != status) { ++ return status; ++ } ++ ucs_assert(dev_count <= UCT_CUDA_IPC_MAX_PEERS); ++ ++ self->device_count = dev_count; ++ self->config.max_poll = config->max_poll; ++ self->config.enable_cache = config->enable_cache; ++ ++ if (self->config.enable_cache) { ++ self->map_memhandle = uct_cuda_ipc_cache_map_memhandle; ++ self->unmap_memhandle = ucs_empty_function_return_success; ++ } else { ++ self->map_memhandle = uct_cuda_ipc_map_memhandle; ++ self->unmap_memhandle = uct_cuda_ipc_unmap_memhandle; ++ } ++ ++ status = ucs_mpool_init(&self->event_desc, ++ 0, ++ sizeof(uct_cuda_ipc_event_desc_t), ++ 0, ++ UCS_SYS_CACHE_LINE_SIZE, ++ 128, ++ 1024, ++ &uct_cuda_ipc_event_desc_mpool_ops, ++ "CUDA_IPC EVENT objects"); ++ if (UCS_OK != status) { ++ ucs_error("mpool creation failed"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ self->streams_initialized = 0; ++ ucs_queue_head_init(&self->outstanding_d2d_event_q); ++ return UCS_OK; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(uct_cuda_ipc_iface_t) ++{ ++ ucs_status_t status; ++ int i; ++ ++ if (self->streams_initialized) { ++ for (i = 0; i < self->device_count; i++) { ++ status = UCT_CUDADRV_FUNC(cuStreamDestroy(self->stream_d2d[i])); ++ if (UCS_OK != status) { ++ continue; ++ } ++ } ++ self->streams_initialized = 0; ++ } ++ ++ uct_base_iface_progress_disable(&self->super.super, ++ UCT_PROGRESS_SEND | UCT_PROGRESS_RECV); ++ ucs_mpool_cleanup(&self->event_desc, 1); ++} ++ ++UCS_CLASS_DEFINE(uct_cuda_ipc_iface_t, uct_base_iface_t); ++UCS_CLASS_DEFINE_NEW_FUNC(uct_cuda_ipc_iface_t, uct_iface_t, uct_md_h, uct_worker_h, ++ const uct_iface_params_t*, const uct_iface_config_t*); ++static UCS_CLASS_DEFINE_DELETE_FUNC(uct_cuda_ipc_iface_t, uct_iface_t); ++ ++static ucs_status_t uct_cuda_ipc_query_tl_resources(uct_md_h md, ++ uct_tl_resource_desc_t **resource_p, ++ unsigned *num_resources_p) ++{ ++ uct_tl_resource_desc_t *resource; ++ ++ resource = ucs_calloc(1, sizeof(uct_tl_resource_desc_t), "resource desc"); ++ if (NULL == resource) { ++ ucs_error("Failed to allocate memory"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ ucs_snprintf_zero(resource->tl_name, sizeof(resource->tl_name), "%s", ++ UCT_CUDA_IPC_TL_NAME); ++ ucs_snprintf_zero(resource->dev_name, sizeof(resource->dev_name), "%s", ++ UCT_CUDA_IPC_DEV_NAME); ++ resource->dev_type = UCT_DEVICE_TYPE_ACC; ++ ++ *num_resources_p = 1; ++ *resource_p = resource; ++ return UCS_OK; ++} ++ ++UCT_TL_COMPONENT_DEFINE(uct_cuda_ipc_tl, ++ uct_cuda_ipc_query_tl_resources, ++ uct_cuda_ipc_iface_t, ++ UCT_CUDA_IPC_TL_NAME, ++ "CUDA_IPC_", ++ uct_cuda_ipc_iface_config_table, ++ uct_cuda_ipc_iface_config_t); ++UCT_MD_REGISTER_TL(&uct_cuda_ipc_md_component, &uct_cuda_ipc_tl); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.h +new file mode 100644 +index 0000000..a1e3060 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.h +@@ -0,0 +1,57 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_IPC_IFACE_H ++#define UCT_CUDA_IPC_IFACE_H ++ ++#include ++#include ++#include ++#include ++ ++#include "cuda_ipc_md.h" ++ ++ ++#define UCT_CUDA_IPC_TL_NAME "cuda_ipc" ++#define UCT_CUDA_IPC_DEV_NAME "cudaipc0" ++#define UCT_CUDA_IPC_MAX_PEERS 16 ++ ++ ++typedef struct uct_cuda_ipc_iface { ++ uct_base_iface_t super; ++ ucs_mpool_t event_desc; /* cuda event desc */ ++ ucs_queue_head_t outstanding_d2d_event_q; /* stream for outstanding d2d */ ++ int device_count; ++ int streams_initialized; /* indicates if stream created */ ++ CUstream stream_d2d[UCT_CUDA_IPC_MAX_PEERS]; ++ /* per-peer stream */ ++ struct { ++ unsigned max_poll; /* query attempts w.o success */ ++ int enable_cache; /* enable/disable ipc handle cache */ ++ } config; ++ ucs_status_t (*map_memhandle)(void *context, uct_cuda_ipc_key_t *key, ++ void **map_addr); ++ ucs_status_t (*unmap_memhandle)(void *map_addr); ++} uct_cuda_ipc_iface_t; ++ ++ ++typedef struct uct_cuda_ipc_iface_config { ++ uct_iface_config_t super; ++ unsigned max_poll; ++ int enable_cache; ++} uct_cuda_ipc_iface_config_t; ++ ++ ++typedef struct uct_cuda_ipc_event_desc { ++ CUevent event; ++ void *mapped_addr; ++ uct_completion_t *comp; ++ ucs_queue_elem_t queue; ++} uct_cuda_ipc_event_desc_t; ++ ++ ++ucs_status_t uct_cuda_ipc_iface_init_streams(uct_cuda_ipc_iface_t *iface); ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.c +new file mode 100644 +index 0000000..2321264 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.c +@@ -0,0 +1,184 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#include "cuda_ipc_md.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++static ucs_config_field_t uct_cuda_ipc_md_config_table[] = { ++ {"", "", NULL, ++ ucs_offsetof(uct_cuda_ipc_md_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_md_config_table)}, ++ ++ {NULL} ++}; ++ ++static ucs_status_t uct_cuda_ipc_md_query(uct_md_h md, uct_md_attr_t *md_attr) ++{ ++ md_attr->cap.flags = UCT_MD_FLAG_REG | ++ UCT_MD_FLAG_NEED_RKEY; ++ md_attr->cap.reg_mem_types = UCS_BIT(UCT_MD_MEM_TYPE_CUDA); ++ md_attr->cap.mem_type = UCT_MD_MEM_TYPE_CUDA; ++ md_attr->cap.max_alloc = 0; ++ md_attr->cap.max_reg = UCT_CUDA_IPC_MAX_ALLOC_SZ; ++ md_attr->rkey_packed_size = sizeof(uct_cuda_ipc_key_t); ++ md_attr->reg_cost.overhead = 0; ++ md_attr->reg_cost.growth = 0; ++ memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus)); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_mkey_pack(uct_md_h md, uct_mem_h memh, ++ void *rkey_buffer) ++{ ++ uct_cuda_ipc_key_t *packed = (uct_cuda_ipc_key_t *) rkey_buffer; ++ uct_cuda_ipc_key_t *mem_hndl = (uct_cuda_ipc_key_t *) memh; ++ ++ *packed = *mem_hndl; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_rkey_unpack(uct_md_component_t *mdc, ++ const void *rkey_buffer, uct_rkey_t *rkey_p, ++ void **handle_p) ++{ ++ uct_cuda_ipc_key_t *packed = (uct_cuda_ipc_key_t *) rkey_buffer; ++ uct_cuda_ipc_key_t *key; ++ ucs_status_t status; ++ CUdevice cu_device; ++ int peer_accessble; ++ ++ UCT_CUDA_IPC_GET_DEVICE(cu_device); ++ ++ status = UCT_CUDADRV_FUNC(cuDeviceCanAccessPeer(&peer_accessble, ++ cu_device, packed->dev_num)); ++ if ((status != UCS_OK) || (peer_accessble == 0)) { ++ return UCS_ERR_UNREACHABLE; ++ } ++ ++ key = ucs_malloc(sizeof(uct_cuda_ipc_key_t), "uct_cuda_ipc_key_t"); ++ if (NULL == key) { ++ ucs_error("failed to allocate memory for uct_cuda_ipc_key_t"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ *key = *packed; ++ *handle_p = NULL; ++ *rkey_p = (uintptr_t) key; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_rkey_release(uct_md_component_t *mdc, uct_rkey_t rkey, ++ void *handle) ++{ ++ ucs_assert(NULL == handle); ++ ucs_free((void *)rkey); ++ return UCS_OK; ++} ++ ++static ucs_status_t ++uct_cuda_ipc_mem_reg_internal(uct_md_h uct_md, void *addr, size_t length, ++ unsigned flags, uct_cuda_ipc_key_t *key) ++{ ++ CUdevice cu_device; ++ ucs_status_t status; ++ ++ if (!length) { ++ return UCS_OK; ++ } ++ ++ status = UCT_CUDADRV_FUNC(cuIpcGetMemHandle(&(key->ph), (CUdeviceptr) addr)); ++ if (UCS_OK != status) { ++ return status; ++ } ++ ++ UCT_CUDA_IPC_GET_DEVICE(cu_device); ++ ++ UCT_CUDADRV_FUNC(cuMemGetAddressRange(&(key->d_bptr), ++ &(key->b_len), ++ (CUdeviceptr) addr)); ++ key->dev_num = (int) cu_device; ++ ucs_trace("registered memory:%p..%p length:%lu dev_num:%d", ++ addr, addr + length, length, (int) cu_device); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_mem_reg(uct_md_h md, void *address, size_t length, ++ unsigned flags, uct_mem_h *memh_p) ++{ ++ uct_cuda_ipc_key_t *key; ++ ++ key = ucs_malloc(sizeof(uct_cuda_ipc_key_t), "uct_cuda_ipc_key_t"); ++ if (NULL == key) { ++ ucs_error("failed to allocate memory for uct_cuda_ipc_key_t"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ if (UCS_OK != uct_cuda_ipc_mem_reg_internal(md, address, length, 0, key)) { ++ ucs_free(key); ++ return UCS_ERR_IO_ERROR; ++ } ++ *memh_p = key; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_mem_dereg(uct_md_h md, uct_mem_h memh) ++{ ++ ucs_free(memh); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_query_md_resources(uct_md_resource_desc_t **resources_p, ++ unsigned *num_resources_p) ++{ ++ int num_gpus; ++ cudaError_t cudaErr; ++ ++ cudaErr = cudaGetDeviceCount(&num_gpus); ++ if ((cudaErr!= cudaSuccess) || (num_gpus == 0)) { ++ ucs_debug("Not found cuda devices"); ++ *resources_p = NULL; ++ *num_resources_p = 0; ++ return UCS_OK; ++ } ++ ++ return uct_single_md_resource(&uct_cuda_ipc_md_component, resources_p, num_resources_p); ++} ++ ++static ucs_status_t uct_cuda_ipc_md_open(const char *md_name, const uct_md_config_t *md_config, ++ uct_md_h *md_p) ++{ ++ static uct_md_ops_t md_ops = { ++ .close = (void*)ucs_empty_function, ++ .query = uct_cuda_ipc_md_query, ++ .mkey_pack = uct_cuda_ipc_mkey_pack, ++ .mem_reg = uct_cuda_ipc_mem_reg, ++ .mem_dereg = uct_cuda_ipc_mem_dereg, ++ .is_mem_type_owned = uct_cuda_is_mem_type_owned, ++ }; ++ static uct_md_t md = { ++ .ops = &md_ops, ++ .component = &uct_cuda_ipc_md_component ++ }; ++ ++ *md_p = &md; ++ return UCS_OK; ++} ++ ++UCT_MD_COMPONENT_DEFINE(uct_cuda_ipc_md_component, UCT_CUDA_IPC_MD_NAME, ++ uct_cuda_ipc_query_md_resources, uct_cuda_ipc_md_open, NULL, ++ uct_cuda_ipc_rkey_unpack, uct_cuda_ipc_rkey_release, "CUDA_IPC_", ++ uct_cuda_ipc_md_config_table, uct_cuda_ipc_md_config_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.h +new file mode 100644 +index 0000000..b36fa4e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.h +@@ -0,0 +1,56 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_IPC_MD_H ++#define UCT_CUDA_IPC_MD_H ++ ++#include ++#include ++#include ++ ++ ++#define UCT_CUDA_IPC_MD_NAME "cuda_ipc" ++#define UCT_CUDA_IPC_MAX_ALLOC_SZ (1 << 30) ++ ++ ++extern uct_md_component_t uct_cuda_ipc_md_component; ++ ++ ++/** ++ * @brief cuda ipc MD descriptor ++ */ ++typedef struct uct_cuda_ipc_md { ++ struct uct_md super; /**< Domain info */ ++} uct_cuda_ipc_md_t; ++ ++ ++/** ++ * @brief cuda ipc domain configuration. ++ */ ++typedef struct uct_cuda_ipc_md_config { ++ uct_md_config_t super; ++} uct_cuda_ipc_md_config_t; ++ ++ ++/** ++ * @brief cuda_ipc packed and remote key for put/get ++ */ ++typedef struct uct_cuda_ipc_key { ++ CUipcMemHandle ph; /* Memory handle of GPU memory */ ++ CUdeviceptr d_bptr; /* Allocation base address */ ++ size_t b_len; /* Allocation size */ ++ int dev_num; /* GPU Device number */ ++} uct_cuda_ipc_key_t; ++ ++ ++#define UCT_CUDA_IPC_GET_DEVICE(_cu_device) \ ++ do { \ ++ if (UCS_OK != UCT_CUDADRV_FUNC(cuCtxGetDevice(&_cu_device))) { \ ++ return UCS_ERR_IO_ERROR; \ ++ } \ ++ } while(0); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.c +index 8cc1da4..3cd339e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.c +@@ -42,7 +42,7 @@ ucs_status_t uct_gdr_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, + + if (ucs_likely(length)) { + bar_offset = remote_addr - gdr_copy_key->vaddr; +- ret = gdr_copy_to_bar((gdr_copy_key->bar_ptr + bar_offset), buffer, length); ++ ret = gdr_copy_to_bar(gdr_copy_key->bar_ptr + bar_offset, buffer, length); + if (ret) { + ucs_error("gdr_copy_to_bar failed. ret:%d", ret); + return UCS_ERR_IO_ERROR; +@@ -54,3 +54,26 @@ ucs_status_t uct_gdr_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, + length, buffer, (void *)remote_addr); + return UCS_OK; + } ++ ++ucs_status_t uct_gdr_copy_ep_get_short(uct_ep_h tl_ep, void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) ++{ ++ uct_gdr_copy_key_t *gdr_copy_key = (uct_gdr_copy_key_t *) rkey; ++ size_t bar_offset; ++ int ret; ++ ++ if (ucs_likely(length)) { ++ bar_offset = remote_addr - gdr_copy_key->vaddr; ++ ret = gdr_copy_from_bar(buffer, gdr_copy_key->bar_ptr + bar_offset, length); ++ if (ret) { ++ ucs_error("gdr_copy_from_bar failed. ret:%d", ret); ++ return UCS_ERR_IO_ERROR; ++ } ++ } ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), GET, SHORT, length); ++ ucs_trace_data("GET_SHORT size %d from %p to %p", ++ length, (void *)remote_addr, buffer); ++ return UCS_OK; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.h +index 3ce697c..2a09cdf 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.h +@@ -31,4 +31,8 @@ ucs_status_t uct_gdr_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, + unsigned length, uint64_t remote_addr, + uct_rkey_t rkey); + ++ucs_status_t uct_gdr_copy_ep_get_short(uct_ep_h tl_ep, void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.c +index 746b985..eae362c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.c +@@ -26,17 +26,20 @@ static void UCS_CLASS_DELETE_FUNC_NAME(uct_gdr_copy_iface_t)(uct_iface_t*); + static ucs_status_t uct_gdr_copy_iface_get_address(uct_iface_h tl_iface, + uct_iface_addr_t *iface_addr) + { +- int *gdr_copy_addr = (int*)iface_addr; ++ uct_gdr_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_gdr_copy_iface_t); + +- *gdr_copy_addr = 0; ++ *(uct_gdr_copy_iface_addr_t*)iface_addr = iface->id; + return UCS_OK; + } + +-static int uct_gdr_copy_iface_is_reachable(const uct_iface_h iface, ++static int uct_gdr_copy_iface_is_reachable(const uct_iface_h tl_iface, + const uct_device_addr_t *dev_addr, + const uct_iface_addr_t *iface_addr) + { +- return 1; ++ uct_gdr_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_gdr_copy_iface_t); ++ uct_gdr_copy_iface_addr_t *addr = (uct_gdr_copy_iface_addr_t*)iface_addr; ++ ++ return (addr != NULL) && (iface->id == *addr); + } + + static ucs_status_t uct_gdr_copy_iface_query(uct_iface_h iface, +@@ -44,11 +47,12 @@ static ucs_status_t uct_gdr_copy_iface_query(uct_iface_h iface, + { + memset(iface_attr, 0, sizeof(uct_iface_attr_t)); + +- iface_attr->iface_addr_len = sizeof(int); ++ iface_attr->iface_addr_len = sizeof(uct_gdr_copy_iface_addr_t); + iface_attr->device_addr_len = 0; + iface_attr->ep_addr_len = 0; + iface_attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | +- UCT_IFACE_FLAG_PUT_SHORT; ++ UCT_IFACE_FLAG_PUT_SHORT | ++ UCT_IFACE_FLAG_GET_SHORT; + + iface_attr->cap.put.max_short = UINT_MAX; + iface_attr->cap.put.max_bcopy = 0; +@@ -58,6 +62,7 @@ static ucs_status_t uct_gdr_copy_iface_query(uct_iface_h iface, + iface_attr->cap.put.align_mtu = iface_attr->cap.put.opt_zcopy_align; + iface_attr->cap.put.max_iov = 1; + ++ iface_attr->cap.get.max_short = UINT_MAX; + iface_attr->cap.get.max_bcopy = 0; + iface_attr->cap.get.min_zcopy = 0; + iface_attr->cap.get.max_zcopy = 0; +@@ -85,6 +90,7 @@ static ucs_status_t uct_gdr_copy_iface_query(uct_iface_h iface, + + static uct_iface_ops_t uct_gdr_copy_iface_ops = { + .ep_put_short = uct_gdr_copy_ep_put_short, ++ .ep_get_short = uct_gdr_copy_ep_get_short, + .ep_pending_add = ucs_empty_function_return_busy, + .ep_pending_purge = ucs_empty_function, + .ep_flush = uct_base_ep_flush, +@@ -117,6 +123,8 @@ static UCS_CLASS_INIT_FUNC(uct_gdr_copy_iface_t, uct_md_h md, uct_worker_h worke + return UCS_ERR_NO_DEVICE; + } + ++ self->id = ucs_generate_uuid((uintptr_t)self); ++ + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.h +index 3ecb41a..882ec9c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.h +@@ -10,11 +10,15 @@ + + + #define UCT_GDR_COPY_TL_NAME "gdr_copy" +-#define UCT_CUDA_DEV_NAME "gdrcopy0" ++#define UCT_CUDA_DEV_NAME "gdrcopy0" ++ ++ ++typedef uint64_t uct_gdr_copy_iface_addr_t; + + + typedef struct uct_gdr_copy_iface { +- uct_base_iface_t super; ++ uct_base_iface_t super; ++ uct_gdr_copy_iface_addr_t id; + } uct_gdr_copy_iface_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.c +index 70a7f36..10aea7d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.c +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2017. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2017-2018. ALL RIGHTS RESERVED. + * See file LICENSE for terms. + */ + +@@ -9,10 +9,11 @@ + #include + #include + #include ++#include + #include + #include +-#include +-#include ++#include ++#include + + #define UCT_GDR_COPY_MD_RCACHE_DEFAULT_ALIGN 65536 + +@@ -178,8 +179,7 @@ static ucs_status_t uct_gdr_copy_mem_reg(uct_md_h uct_md, void *address, size_t + unsigned flags, uct_mem_h *memh_p) + { + uct_gdr_copy_mem_t *mem_hndl = NULL; +- size_t reg_size; +- void *ptr; ++ void *start, *end; + ucs_status_t status; + + mem_hndl = ucs_malloc(sizeof(uct_gdr_copy_mem_t), "gdr_copy handle"); +@@ -188,10 +188,11 @@ static ucs_status_t uct_gdr_copy_mem_reg(uct_md_h uct_md, void *address, size_t + return UCS_ERR_NO_MEMORY; + } + +- reg_size = (length + GPU_PAGE_SIZE - 1) & GPU_PAGE_MASK; +- ptr = (void *) ((uintptr_t)address & GPU_PAGE_MASK); ++ start = ucs_align_down_pow2_ptr(address, GPU_PAGE_SIZE); ++ end = ucs_align_up_pow2_ptr(address + length, GPU_PAGE_SIZE); ++ ucs_assert_always(start <= end); + +- status = uct_gdr_copy_mem_reg_internal(uct_md, ptr, reg_size, 0, mem_hndl); ++ status = uct_gdr_copy_mem_reg_internal(uct_md, start, end - start, 0, mem_hndl); + if (status != UCS_OK) { + ucs_free(mem_hndl); + return status; +@@ -215,33 +216,6 @@ static ucs_status_t uct_gdr_copy_mem_dereg(uct_md_h uct_md, uct_mem_h memh) + return status; + } + +-static int uct_is_gdr_copy_mem_type_owned(uct_md_h md, void *addr, size_t length) +-{ +- int memory_type; +- struct cudaPointerAttributes attributes; +- cudaError_t cuda_err; +- CUresult cu_err; +- +- if (addr == NULL) { +- return 0; +- } +- +- cu_err = cuPointerGetAttribute(&memory_type, +- CU_POINTER_ATTRIBUTE_MEMORY_TYPE, +- (CUdeviceptr)addr); +- if (cu_err != CUDA_SUCCESS) { +- cuda_err = cudaPointerGetAttributes (&attributes, addr); +- if (cuda_err == cudaSuccess) { +- if (attributes.memoryType == cudaMemoryTypeDevice) { +- return 1; +- } +- } +- } else if (memory_type == CU_MEMORYTYPE_DEVICE) { +- return 1; +- } +- return 0; +-} +- + static ucs_status_t uct_gdr_copy_query_md_resources(uct_md_resource_desc_t **resources_p, + unsigned *num_resources_p) + { +@@ -293,7 +267,7 @@ static uct_md_ops_t md_ops = { + .mkey_pack = uct_gdr_copy_mkey_pack, + .mem_reg = uct_gdr_copy_mem_reg, + .mem_dereg = uct_gdr_copy_mem_dereg, +- .is_mem_type_owned = uct_is_gdr_copy_mem_type_owned, ++ .is_mem_type_owned = uct_cuda_is_mem_type_owned, + }; + + static inline uct_gdr_copy_rcache_region_t* +@@ -311,7 +285,7 @@ uct_gdr_copy_mem_rcache_reg(uct_md_h uct_md, void *address, size_t length, + ucs_status_t status; + uct_gdr_copy_mem_t *memh; + +- status = ucs_rcache_get(md->rcache, address, length, PROT_READ|PROT_WRITE, ++ status = ucs_rcache_get(md->rcache, (void *)address, length, PROT_READ|PROT_WRITE, + &flags, &rregion); + if (status != UCS_OK) { + return status; +@@ -338,12 +312,13 @@ static uct_md_ops_t md_rcache_ops = { + .mkey_pack = uct_gdr_copy_mkey_pack, + .mem_reg = uct_gdr_copy_mem_rcache_reg, + .mem_dereg = uct_gdr_copy_mem_rcache_dereg, +- .is_mem_type_owned = uct_is_gdr_copy_mem_type_owned, ++ .is_mem_type_owned = uct_cuda_is_mem_type_owned, + }; + + static ucs_status_t + uct_gdr_copy_rcache_mem_reg_cb(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *rregion) ++ void *arg, ucs_rcache_region_t *rregion, ++ uint16_t rcache_mem_reg_flags) + { + uct_gdr_copy_md_t *md = context; + int *flags = arg; +@@ -415,6 +390,7 @@ static ucs_status_t uct_gdr_copy_md_open(const char *md_name, + rcache_params.region_struct_size = sizeof(uct_gdr_copy_rcache_region_t); + rcache_params.alignment = md_config->rcache.alignment; + rcache_params.max_alignment = UCT_GDR_COPY_MD_RCACHE_DEFAULT_ALIGN; ++ rcache_params.ucm_events = UCM_EVENT_MEM_TYPE_FREE; + rcache_params.ucm_event_priority = md_config->rcache.event_prio; + rcache_params.context = md; + rcache_params.ops = &uct_gdr_copy_rcache_ops; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.h +index f6fc505..f941785 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.h +@@ -7,6 +7,7 @@ + #define UCT_GDR_COPY_MD_H + + #include ++#include + #include + #include "gdrapi.h" + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.c +index 4d71c33..a934655 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.c +@@ -18,6 +18,25 @@ + #include + + ++/* use both gid + lid data for key generarion (lid - ib based, gid - RoCE) */ ++static UCS_F_ALWAYS_INLINE ++khint32_t uct_ib_kh_ah_hash_func(struct ibv_ah_attr attr) ++{ ++ return kh_int64_hash_func(attr.grh.dgid.global.subnet_prefix ^ ++ attr.grh.dgid.global.interface_id ^ ++ attr.dlid); ++} ++ ++static UCS_F_ALWAYS_INLINE ++int uct_ib_kh_ah_hash_equal(struct ibv_ah_attr a, struct ibv_ah_attr b) ++{ ++ return !memcmp(&a, &b, sizeof(a)); ++} ++ ++KHASH_IMPL(uct_ib_ah, struct ibv_ah_attr, struct ibv_ah*, 1, ++ uct_ib_kh_ah_hash_func, uct_ib_kh_ah_hash_equal) ++ ++ + #if ENABLE_STATS + static ucs_stats_class_t uct_ib_device_stats_class = { + .name = "", +@@ -57,9 +76,27 @@ static uct_ib_device_spec_t uct_ib_builtin_device_specs[] = { + {0x02c9, 41682, "ConnectX-5", + UCT_IB_DEVICE_FLAG_MELLANOX | UCT_IB_DEVICE_FLAG_MLX5_PRM | + UCT_IB_DEVICE_FLAG_DC_V2, 37}, ++ {0x02c9, 4122, "ConnectX-5", ++ UCT_IB_DEVICE_FLAG_MELLANOX | UCT_IB_DEVICE_FLAG_MLX5_PRM | ++ UCT_IB_DEVICE_FLAG_DC_V2, 36}, ++ {0x02c9, 4123, "ConnectX-6", ++ UCT_IB_DEVICE_FLAG_MELLANOX | UCT_IB_DEVICE_FLAG_MLX5_PRM | ++ UCT_IB_DEVICE_FLAG_DC_V2, 50}, + {0, 0, "Generic HCA", 0, 0} + }; + ++UCS_LIST_HEAD(uct_ib_device_init_list); ++ ++#if HAVE_DECL_IBV_EXP_QUERY_GID_ATTR ++/* This struct defines the RoCE versions priorities */ ++static uct_ib_roce_version_desc_t roce_versions_priorities[] = { ++ {IBV_EXP_ROCE_V2_GID_TYPE, AF_INET, 1}, ++ {IBV_EXP_ROCE_V2_GID_TYPE, AF_INET6, 2}, ++ {IBV_EXP_IB_ROCE_V1_GID_TYPE, AF_INET, 3}, ++ {IBV_EXP_IB_ROCE_V1_GID_TYPE, AF_INET6, 4} ++}; ++#endif ++ + static void uct_ib_device_get_locailty(const char *dev_name, cpu_set_t *cpu_mask, + int *numa_node) + { +@@ -212,6 +249,7 @@ ucs_status_t uct_ib_device_init(uct_ib_device_t *dev, + struct ibv_device *ibv_device, int async_events + UCS_STATS_ARG(ucs_stats_node_t *stats_parent)) + { ++ uct_ib_device_init_entry_t *init_entry; + ucs_status_t status; + uint8_t i; + int ret; +@@ -221,7 +259,7 @@ ucs_status_t uct_ib_device_init(uct_ib_device_t *dev, + /* Open verbs context */ + dev->ibv_context = ibv_open_device(ibv_device); + if (dev->ibv_context == NULL) { +- ucs_error("Failed to open %s: %m", ibv_get_device_name(ibv_device)); ++ ucs_error("ibv_open_device(%s) failed: %m", ibv_get_device_name(ibv_device)); + status = UCS_ERR_IO_ERROR; + goto err; + } +@@ -249,6 +287,13 @@ ucs_status_t uct_ib_device_init(uct_ib_device_t *dev, + break; + } + ++ ucs_list_for_each(init_entry, &uct_ib_device_init_list, list) { ++ status = init_entry->init(dev); ++ if (status != UCS_OK) { ++ goto err_free_context; ++ } ++ } ++ + if (dev->num_ports > UCT_IB_DEV_MAX_PORTS) { + ucs_error("%s has %d ports, but only up to %d are supported", + ibv_get_device_name(ibv_device), dev->num_ports, +@@ -294,6 +339,9 @@ ucs_status_t uct_ib_device_init(uct_ib_device_t *dev, + } + } + ++ kh_init_inplace(uct_ib_ah, &dev->ah_hash); ++ ucs_spinlock_init(&dev->ah_lock); ++ + ucs_debug("initialized device '%s' (%s) with %d ports", uct_ib_device_name(dev), + ibv_node_type_str(ibv_device->node_type), + dev->num_ports); +@@ -307,10 +355,20 @@ err: + return status; + } + ++void uct_ib_device_cleanup_ah_cached(uct_ib_device_t *dev) ++{ ++ struct ibv_ah *ah; ++ ++ kh_foreach_value(&dev->ah_hash, ah, ibv_destroy_ah(ah)); ++} ++ + void uct_ib_device_cleanup(uct_ib_device_t *dev) + { + ucs_debug("destroying ib device %s", uct_ib_device_name(dev)); + ++ kh_destroy_inplace(uct_ib_ah, &dev->ah_hash); ++ ucs_spinlock_destroy(&dev->ah_lock); ++ + if (dev->async_events) { + ucs_async_remove_handler(dev->ibv_context->async_fd, 1); + } +@@ -347,11 +405,23 @@ const uct_ib_device_spec_t* uct_ib_device_spec(uct_ib_device_t *dev) + default settings for unknown devices */ + } + ++static size_t uct_ib_device_get_ib_gid_index(uct_ib_md_t *md) ++{ ++ if (md->config.gid_index == UCS_CONFIG_ULUNITS_AUTO) { ++ return UCT_IB_MD_DEFAULT_GID_INDEX; ++ } else { ++ return md->config.gid_index; ++ } ++} ++ + ucs_status_t uct_ib_device_port_check(uct_ib_device_t *dev, uint8_t port_num, + unsigned flags) + { ++ uct_ib_md_t *md = ucs_container_of(dev, uct_ib_md_t, dev); + const uct_ib_device_spec_t *dev_info; + uint8_t required_dev_flags; ++ ucs_status_t status; ++ union ibv_gid gid; + + if (port_num < dev->first_port || port_num >= dev->first_port + dev->num_ports) { + return UCS_ERR_NO_DEVICE; +@@ -370,7 +440,7 @@ ucs_status_t uct_ib_device_port_check(uct_ib_device_t *dev, uint8_t port_num, + } + + if (flags & UCT_IB_DEVICE_FLAG_DC) { +- if (!IBV_DEVICE_HAS_DC(&dev->dev_attr)) { ++ if (!IBV_DEVICE_HAS_DC(dev)) { + ucs_trace("%s:%d does not support DC", uct_ib_device_name(dev), port_num); + return UCS_ERR_UNSUPPORTED; + } +@@ -386,9 +456,131 @@ ucs_status_t uct_ib_device_port_check(uct_ib_device_t *dev, uint8_t port_num, + return UCS_ERR_UNSUPPORTED; + } + ++ if (md->check_subnet_filter && uct_ib_device_is_port_ib(dev, port_num)) { ++ status = uct_ib_device_query_gid(dev, port_num, ++ uct_ib_device_get_ib_gid_index(md), &gid); ++ if (status) { ++ return status; ++ } ++ ++ if (md->subnet_filter != gid.global.subnet_prefix) { ++ ucs_trace("%s:%d subnet_prefix does not match", ++ uct_ib_device_name(dev), port_num); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ } ++ + return UCS_OK; + } + ++static int uct_ib_device_is_addr_ipv4_mcast(const struct in6_addr *raw, ++ const uint32_t addr_last_bits) ++{ ++ /* IPv4 encoded multicast addresses */ ++ return (raw->s6_addr32[0] == htonl(0xff0e0000)) && ++ !(raw->s6_addr32[1] | addr_last_bits); ++} ++ ++static int uct_ib_device_get_addr_family(union ibv_gid *gid, int gid_index) ++{ ++ const struct in6_addr *raw = (struct in6_addr *)gid->raw; ++ const uint32_t addr_last_bits = raw->s6_addr32[2] ^ htonl(0x0000ffff); ++ char p[128]; ++ ++ ucs_debug("testing addr_family on gid index %d: %s", ++ gid_index, inet_ntop(AF_INET6, gid, p, sizeof(p))); ++ ++ if (!((raw->s6_addr32[0] | raw->s6_addr32[1]) | addr_last_bits) || ++ uct_ib_device_is_addr_ipv4_mcast(raw, addr_last_bits)) { ++ return AF_INET; ++ } else { ++ return AF_INET6; ++ } ++} ++ ++static ucs_status_t uct_ib_device_set_roce_gid_index(uct_ib_device_t *dev, ++ uint8_t port_num, ++ uint8_t *gid_index) ++{ ++ int i, gid_tbl_len = uct_ib_device_port_attr(dev, port_num)->gid_tbl_len; ++ ucs_status_t status = UCS_OK; ++#if HAVE_DECL_IBV_EXP_QUERY_GID_ATTR ++ int priorities_arr_len = ucs_static_array_size(roce_versions_priorities); ++ struct ibv_exp_gid_attr attr; ++ int prio_idx; ++#else ++ union ibv_gid gid; ++#endif ++ ++#if HAVE_DECL_IBV_EXP_QUERY_GID_ATTR ++ for (prio_idx = 0; prio_idx < priorities_arr_len; prio_idx++) { ++ for (i = 0; i < gid_tbl_len; i++) { ++ attr.comp_mask = IBV_EXP_QUERY_GID_ATTR_TYPE | IBV_EXP_QUERY_GID_ATTR_GID; ++ if (ibv_exp_query_gid_attr(dev->ibv_context, port_num, i, &attr)) { ++ ucs_error("failed to query gid attributes " ++ "(%s:%d gid_idx %d). %m", uct_ib_device_name(dev), port_num, i); ++ status = UCS_ERR_INVALID_PARAM; ++ goto out; ++ } ++ ++ if ((roce_versions_priorities[prio_idx].type == attr.type) && ++ (roce_versions_priorities[prio_idx].address_family == ++ uct_ib_device_get_addr_family(&attr.gid, i))) { ++ *gid_index = i; ++ goto out_print; ++ } ++ } ++ } ++ ++ ucs_error("failed to find a gid index that matches one of the RoCE priorities"); ++ status = UCS_ERR_INVALID_PARAM; ++ goto out; ++ ++#else ++ for (i = 0; i < gid_tbl_len; i++) { ++ status = uct_ib_device_query_gid(dev, port_num, i, &gid); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ /* assume RoCE v1 */ ++ if (uct_ib_device_get_addr_family(&gid, i) == AF_INET) { ++ /* take the first gid that has IPv4 */ ++ *gid_index = i; ++ goto out_print; ++ } ++ } ++ ++ *gid_index = UCT_IB_MD_DEFAULT_GID_INDEX; ++#endif ++ ++out_print: ++ ucs_debug("%s:%d set gid_index %d", ++ uct_ib_device_name(dev), port_num, *gid_index); ++out: ++ return status; ++} ++ ++ucs_status_t uct_ib_device_select_gid_index(uct_ib_device_t *dev, ++ uint8_t port_num, ++ size_t md_config_index, ++ uint8_t *ib_gid_index) ++{ ++ ucs_status_t status = UCS_OK; ++ ++ if (md_config_index == UCS_CONFIG_ULUNITS_AUTO) { ++ if (uct_ib_device_is_port_ib(dev, port_num)) { ++ *ib_gid_index = UCT_IB_MD_DEFAULT_GID_INDEX; ++ } else { ++ status = uct_ib_device_set_roce_gid_index(dev, port_num, ib_gid_index); ++ } ++ } else { ++ *ib_gid_index = md_config_index; ++ } ++ ++ return status; ++} ++ + const char *uct_ib_device_name(uct_ib_device_t *dev) + { + return ibv_get_device_name(dev->ibv_context->device); +@@ -445,150 +637,21 @@ uint8_t uct_ib_to_fabric_time(double time) + } + } + +-uct_ib_address_type_t uct_ib_address_scope(uint64_t subnet_prefix) +-{ +- if (subnet_prefix == UCT_IB_LINK_LOCAL_PREFIX) { +- return UCT_IB_ADDRESS_TYPE_LINK_LOCAL; +- } else if ((subnet_prefix & UCT_IB_SITE_LOCAL_MASK) == UCT_IB_SITE_LOCAL_PREFIX) { +- return UCT_IB_ADDRESS_TYPE_SITE_LOCAL; +- } else { +- return UCT_IB_ADDRESS_TYPE_GLOBAL; +- } +-} +- +-size_t uct_ib_address_size(uct_ib_address_type_t type) +-{ +- switch (type) { +- case UCT_IB_ADDRESS_TYPE_LINK_LOCAL: +- return sizeof(uct_ib_address_t) + +- sizeof(uint16_t); /* lid */ +- case UCT_IB_ADDRESS_TYPE_SITE_LOCAL: +- return sizeof(uct_ib_address_t) + +- sizeof(uint16_t) + /* lid */ +- sizeof(uint64_t) + /* if_id */ +- sizeof(uint16_t); /* subnet16 */ +- case UCT_IB_ADDRESS_TYPE_GLOBAL: +- return sizeof(uct_ib_address_t) + +- sizeof(uint16_t) + /* lid */ +- sizeof(uint64_t) + /* if_id */ +- sizeof(uint64_t); /* subnet64 */ +- case UCT_IB_ADDRESS_TYPE_ETH: +- return sizeof(uct_ib_address_t) + +- sizeof(union ibv_gid); /* raw gid */ +- default: +- ucs_fatal("Invalid IB address type: %d", type); +- } +-} +- +-void uct_ib_address_pack(uct_ib_device_t *dev, uct_ib_address_type_t type, +- const union ibv_gid *gid, uint16_t lid, +- uct_ib_address_t *ib_addr) +-{ +- void *ptr = ib_addr + 1; +- +- ib_addr->flags = 0; +- +- if (type != UCT_IB_ADDRESS_TYPE_ETH) { +- /* IB */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_LINK_LAYER_IB; +- +- /* LID */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_LID; +- *(uint16_t*) ptr = lid; +- ptr += sizeof(uint16_t); +- +- if (type >= UCT_IB_ADDRESS_TYPE_SITE_LOCAL) { +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_IF_ID; +- *(uint64_t*) ptr = gid->global.interface_id; +- ptr += sizeof(uint64_t); +- +- if (type >= UCT_IB_ADDRESS_TYPE_GLOBAL) { +- /* Global */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_SUBNET64; +- *(uint64_t*) ptr = gid->global.subnet_prefix; +- } else { +- /* Site-local */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_SUBNET16; +- *(uint16_t*) ptr = gid->global.subnet_prefix >> 48; +- } +- } +- } else { +- /* RoCE */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_LINK_LAYER_ETH; +- /* in this case we don't use the lid and set the GID flag */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_GID; +- /* uint8_t raw[16]; */ +- memcpy(ptr, gid->raw, sizeof(gid->raw) * sizeof(uint8_t)); +- } +- +-} +- +-void uct_ib_address_unpack(const uct_ib_address_t *ib_addr, uint16_t *lid, +- uint8_t *is_global, union ibv_gid *gid) +-{ +- const void *ptr = ib_addr + 1; +- +- +- gid->global.subnet_prefix = UCT_IB_LINK_LOCAL_PREFIX; /* Default prefix */ +- gid->global.interface_id = 0; +- *lid = 0; +- *is_global = 0; +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_GID) { +- memcpy(gid->raw, ptr, sizeof(gid->raw) * sizeof(uint8_t)); /* uint8_t raw[16]; */ +- *is_global = 1; +- } +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LID) { +- *lid = *(uint16_t*)ptr; +- ptr += sizeof(uint16_t); +- } +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_IF_ID) { +- gid->global.interface_id = *(uint64_t*)ptr; +- ptr += sizeof(uint64_t); +- } +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_SUBNET16) { +- gid->global.subnet_prefix = UCT_IB_SITE_LOCAL_PREFIX | +- ((uint64_t) *(uint16_t*) ptr << 48); +- *is_global = 1; +- ptr += sizeof(uint16_t); +- } +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_SUBNET64) { +- gid->global.subnet_prefix = *(uint64_t*) ptr; +- *is_global = 1; +- ptr += sizeof(uint64_t); +- } +-} +- +-const char *uct_ib_address_str(const uct_ib_address_t *ib_addr, char *buf, +- size_t max) ++ucs_status_t uct_ib_modify_qp(struct ibv_qp *qp, enum ibv_qp_state state) + { +- union ibv_gid gid; +- uint8_t is_global; +- uint16_t lid; +- char *p, *endp; ++ struct ibv_qp_attr qp_attr; + +- uct_ib_address_unpack(ib_addr, &lid, &is_global, &gid); +- +- if (is_global) { +- p = buf; +- endp = buf + max; +- if (lid != 0) { +- snprintf(p, endp - p, "lid %d ", lid); +- p += strlen(p); +- } +- inet_ntop(AF_INET6, &gid, p, endp - p); +- } else { +- snprintf(buf, max, "lid %d", lid); ++ ucs_debug("modify QP 0x%x to state %d", qp->qp_num, state); ++ memset(&qp_attr, 0, sizeof(qp_attr)); ++ qp_attr.qp_state = state; ++ if (ibv_modify_qp(qp, &qp_attr, IBV_QP_STATE)) { ++ ucs_warn("modify qp 0x%x to state %d failed: %m", qp->qp_num, state); ++ return UCS_ERR_IO_ERROR; + } + +- return buf; ++ return UCS_OK; + } + +- + ucs_status_t uct_ib_device_query_tl_resources(uct_ib_device_t *dev, + const char *tl_name, unsigned flags, + uct_tl_resource_desc_t **resources_p, +@@ -802,7 +865,7 @@ size_t uct_ib_device_odp_max_size(uct_ib_device_t *dev) + return 0; + } + +- if (IBV_DEVICE_HAS_DC(dev_attr) ++ if (IBV_DEVICE_HAS_DC(dev) + # if HAVE_STRUCT_IBV_EXP_DEVICE_ATTR_ODP_CAPS_PER_TRANSPORT_CAPS_DC_ODP_CAPS + && !ucs_test_all_flags(IBV_EXP_ODP_CAPS(dev_attr, dc), required_rc_odp_caps) + # endif +@@ -873,3 +936,84 @@ int uct_ib_device_odp_has_global_mr(uct_ib_device_t *dev) + + return 1; + } ++ ++const char *uct_ib_wc_status_str(enum ibv_wc_status wc_status) ++{ ++ return ibv_wc_status_str(wc_status); ++} ++ ++static ucs_status_t uct_ib_device_create_ah(uct_ib_device_t *dev, ++ struct ibv_ah_attr *ah_attr, ++ struct ibv_pd *pd, ++ struct ibv_ah **ah_p) ++{ ++ char buf[128]; ++ char *p, *endp; ++ struct ibv_ah *ah; ++ ++ ah = ibv_create_ah(pd, ah_attr); ++ if (ah == NULL) { ++ p = buf; ++ endp = buf + sizeof(buf); ++ snprintf(p, endp - p, "dlid=%d sl=%d port=%d src_path_bits=%d", ++ ah_attr->dlid, ah_attr->sl, ++ ah_attr->port_num, ah_attr->src_path_bits); ++ p += strlen(p); ++ ++ if (ah_attr->is_global) { ++ snprintf(p, endp - p, " dgid="); ++ p += strlen(p); ++ inet_ntop(AF_INET6, &ah_attr->grh.dgid, p, endp - p); ++ p += strlen(p); ++ snprintf(p, endp - p, " sgid_index=%d traffic_class=%d", ++ ah_attr->grh.sgid_index, ah_attr->grh.traffic_class); ++ } ++ ++ ucs_error("ibv_create_ah(%s) failed: %m", buf); ++ return UCS_ERR_INVALID_ADDR; ++ } ++ ++ *ah_p = ah; ++ return UCS_OK; ++} ++ ++ucs_status_t uct_ib_device_create_ah_cached(uct_ib_device_t *dev, ++ struct ibv_ah_attr *ah_attr, ++ struct ibv_pd *pd, ++ struct ibv_ah **ah_p) ++{ ++ ucs_status_t status = UCS_OK; ++ khiter_t iter; ++ int ret; ++ ++ ucs_spin_lock(&dev->ah_lock); ++ ++ /* looking for existing AH with same attributes */ ++ iter = kh_get(uct_ib_ah, &dev->ah_hash, *ah_attr); ++ if (iter == kh_end(&dev->ah_hash)) { ++ /* new AH */ ++ status = uct_ib_device_create_ah(dev, ah_attr, pd, ah_p); ++ if (status != UCS_OK) { ++ goto unlock; ++ } ++ ++ /* store AH in hash */ ++ iter = kh_put(uct_ib_ah, &dev->ah_hash, *ah_attr, &ret); ++ ++ /* failed to store - rollback */ ++ if (iter == kh_end(&dev->ah_hash)) { ++ ibv_destroy_ah(*ah_p); ++ status = UCS_ERR_NO_MEMORY; ++ goto unlock; ++ } ++ ++ kh_value(&dev->ah_hash, iter) = *ah_p; ++ } else { ++ /* found existing AH */ ++ *ah_p = kh_value(&dev->ah_hash, iter); ++ } ++ ++unlock: ++ ucs_spin_unlock(&dev->ah_lock); ++ return status; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.h +index 5e63957..73fd9f1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.h +@@ -12,6 +12,8 @@ + #include + #include + #include ++#include ++#include + + #include + +@@ -61,15 +63,6 @@ enum { + }; + + +-typedef enum { +- UCT_IB_ADDRESS_TYPE_LINK_LOCAL, /* Subnet-local address */ +- UCT_IB_ADDRESS_TYPE_SITE_LOCAL, /* Site local, 16-bit subnet prefix */ +- UCT_IB_ADDRESS_TYPE_GLOBAL, /* Global, 64-bit subnet prefix */ +- UCT_IB_ADDRESS_TYPE_ETH, /* RoCE address */ +- UCT_IB_ADDRESS_TYPE_LAST +-} uct_ib_address_type_t; +- +- + /** + * Flags which specify which address fields are present + */ +@@ -113,6 +106,8 @@ typedef struct uct_ib_device_spec { + } uct_ib_device_spec_t; + + ++KHASH_TYPE(uct_ib_ah, struct ibv_ah_attr, struct ibv_ah*); ++ + /** + * IB device (corresponds to HCA) + */ +@@ -124,12 +119,47 @@ typedef struct uct_ib_device { + cpu_set_t local_cpus; /* CPUs local to device */ + int numa_node; /* NUMA node of the device */ + int async_events; /* Whether async events are handled */ ++ int max_zcopy_log_sge; /* Maximum sges log for zcopy am */ + UCS_STATS_NODE_DECLARE(stats); + struct ibv_exp_port_attr port_attr[UCT_IB_DEV_MAX_PORTS]; /* Cached port attributes */ ++ unsigned flags; ++ /* AH hash */ ++ khash_t(uct_ib_ah) ah_hash; ++ ucs_spinlock_t ah_lock; + } uct_ib_device_t; + + + /** ++ * IB device private initializer. ++ */ ++typedef struct uct_ib_device_init_entry { ++ ucs_list_link_t list; ++ ucs_status_t (*init)(uct_ib_device_t *dev); ++} uct_ib_device_init_entry_t; ++ ++#define UCT_IB_DEVICE_INIT(_init_fn) \ ++ UCS_STATIC_INIT { \ ++ extern ucs_list_link_t uct_ib_device_init_list; \ ++ static uct_ib_device_init_entry_t init_entry = { \ ++ .init = _init_fn, \ ++ }; \ ++ ucs_list_add_tail(&uct_ib_device_init_list, &init_entry.list); \ ++ } ++ ++ ++#if HAVE_DECL_IBV_EXP_QUERY_GID_ATTR ++/** ++ * RoCE version description ++ */ ++typedef struct uct_ib_roce_version_desc { ++ enum ibv_exp_roce_gid_type type; ++ int address_family; ++ int priority; ++} uct_ib_roce_version_desc_t; ++#endif ++ ++ ++/** + * Check if a port on a device is active and supports the given flags. + */ + ucs_status_t uct_ib_device_port_check(uct_ib_device_t *dev, uint8_t port_num, +@@ -165,6 +195,20 @@ const uct_ib_device_spec_t* uct_ib_device_spec(uct_ib_device_t *dev); + + + /** ++ * Select the IB gid index to use. ++ * ++ * @param dev IB device. ++ * @param port_num Port number. ++ * @param md_config_index Gid index from the md configuration. ++ * @param ib_gid_index Filled with the selected gid index. ++ */ ++ucs_status_t uct_ib_device_select_gid_index(uct_ib_device_t *dev, ++ uint8_t port_num, ++ size_t md_config_index, ++ uint8_t *ib_gid_index); ++ ++ ++/** + * @return device name. + */ + const char *uct_ib_device_name(uct_ib_device_t *dev); +@@ -195,49 +239,9 @@ size_t uct_ib_mtu_value(enum ibv_mtu mtu); + + + /** +- * @return IB address scope of a given subnet prefix (according to IBTA 4.1.1 12). +- */ +-uct_ib_address_type_t uct_ib_address_scope(uint64_t subnet_prefix); +- +- +-/** +- * @return IB address size of the given link scope. +- */ +-size_t uct_ib_address_size(uct_ib_address_type_t type); +- +- +-/** +- * Pack IB address. +- * +- * @param [in] dev IB device. TODO remove this. +- * @param [in] scope Address scope. +- * @param [in] gid GID address to pack. +- * @param [in] lid LID address to pack. +- * @param [out] ib_addr Filled with packed ib address. Size of the structure +- * must be at least what @ref uct_ib_address_size() returns +- * for the given scope. +- */ +-void uct_ib_address_pack(uct_ib_device_t *dev, uct_ib_address_type_t scope, +- const union ibv_gid *gid, uint16_t lid, +- uct_ib_address_t *ib_addr); +- +- +-/** +- * Unpack IB address. +- * +- * @param [in] ib_addr IB address to unpack. +- * @param [out] lid Filled with address LID, or 0 if not present. +- * @param [out] is_global Filled with 0, or 1 if the address is IB global +- */ +-void uct_ib_address_unpack(const uct_ib_address_t *ib_addr, uint16_t *lid, +- uint8_t *is_global, union ibv_gid *gid); +- +- +-/** +- * Convert IB address to a human-readable string. ++ * Modify QP to a given state and check for error + */ +-const char *uct_ib_address_str(const uct_ib_address_t *ib_addr, char *buf, +- size_t max); ++ucs_status_t uct_ib_modify_qp(struct ibv_qp *qp, enum ibv_qp_state state); + + + /** +@@ -258,6 +262,15 @@ size_t uct_ib_device_odp_max_size(uct_ib_device_t *dev); + + int uct_ib_device_odp_has_global_mr(uct_ib_device_t *dev); + ++const char *uct_ib_wc_status_str(enum ibv_wc_status wc_status); ++ ++ucs_status_t uct_ib_device_create_ah_cached(uct_ib_device_t *dev, ++ struct ibv_ah_attr *ah_attr, ++ struct ibv_pd *pd, ++ struct ibv_ah **ah_p); ++ ++void uct_ib_device_cleanup_ah_cached(uct_ib_device_t *dev); ++ + static inline struct ibv_exp_port_attr* + uct_ib_device_port_attr(uct_ib_device_t *dev, uint8_t port_num) + { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.c +index a4a6ac2..0a81b14 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.c +@@ -18,7 +18,13 @@ + #include + #include + #include ++#if HAVE_CUDA ++#include ++#include ++#endif ++#include + ++#define MAXPATHSIZE 1024 + + static UCS_CONFIG_DEFINE_ARRAY(path_bits_spec, + sizeof(ucs_range_spec_t), +@@ -34,6 +40,11 @@ const char *uct_ib_mtu_values[] = { + }; + + enum { ++ UCT_IB_ADDRESS_TYPE_LINK_LOCAL, ++ UCT_IB_ADDRESS_TYPE_SITE_LOCAL, ++ UCT_IB_ADDRESS_TYPE_GLOBAL, ++ UCT_IB_ADDRESS_TYPE_ETH, ++ UCT_IB_ADDRESS_TYPE_LAST, + UCT_IB_IFACE_ADDRESS_TYPE_AUTO = UCT_IB_ADDRESS_TYPE_LAST, + UCT_IB_IFACE_ADDRESS_TYPE_LAST + }; +@@ -80,7 +91,7 @@ ucs_config_field_t uct_ib_iface_config_table[] = { + ucs_offsetof(uct_ib_iface_config_t, tx.min_sge), UCS_CONFIG_TYPE_UINT}, + + {"TX_CQ_MODERATION", "64", +- "Number of send WQEs for which completion is requested.", ++ "Maximum number of send WQEs which can be posted without requesting a completion.", + ucs_offsetof(uct_ib_iface_config_t, tx.cq_moderation), UCS_CONFIG_TYPE_UINT}, + + #if HAVE_DECL_IBV_EXP_CQ_MODERATION +@@ -129,24 +140,29 @@ ucs_config_field_t uct_ib_iface_config_table[] = { + + {"ADDR_TYPE", "auto", + "Set the interface address type. \"auto\" mode detects the type according to\n" +- "link layer type and IB subnet prefix.", ++ "link layer type and IB subnet prefix.\n" ++ "Deprecated. To force use of global routing use IS_GLOBAL.", + ucs_offsetof(uct_ib_iface_config_t, addr_type), + UCS_CONFIG_TYPE_ENUM(uct_ib_iface_addr_types)}, + +- {"GID_INDEX", "0", +- "Port GID index to use.", +- ucs_offsetof(uct_ib_iface_config_t, gid_index), UCS_CONFIG_TYPE_UINT}, ++ {"IS_GLOBAL", "n", ++ "Force interface to use global routing.", ++ ucs_offsetof(uct_ib_iface_config_t, is_global), UCS_CONFIG_TYPE_BOOL}, + + {"SL", "0", +- "Which IB service level to use.\n", ++ "IB Service Level / RoCEv2 Ethernet Priority.\n", + ucs_offsetof(uct_ib_iface_config_t, sl), UCS_CONFIG_TYPE_UINT}, + + {"TRAFFIC_CLASS", "0", +- "Which IB traffic class to use.\n", ++ "IB Traffic Class / RoCEv2 Differentiated Services Code Point (DSCP)\n", + ucs_offsetof(uct_ib_iface_config_t, traffic_class), UCS_CONFIG_TYPE_UINT}, + ++ {"HOP_LIMIT", "255", ++ "IB Hop limit / RoCEv2 Time to Live. Should be between 0 and 255.\n", ++ ucs_offsetof(uct_ib_iface_config_t, hop_limit), UCS_CONFIG_TYPE_UINT}, ++ + {"LID_PATH_BITS", "0-17", +- "list of IB Path bits separated by comma (a,b,c) " ++ "List of IB Path bits separated by comma (a,b,c) " + "which will be the low portion of the LID, according to the LMC in the fabric.", + ucs_offsetof(uct_ib_iface_config_t, lid_path_bits), UCS_CONFIG_TYPE_ARRAY(path_bits_spec)}, + +@@ -154,6 +170,12 @@ ucs_config_field_t uct_ib_iface_config_table[] = { + "Which pkey value to use. Should be between 0 and 0x7fff.", + ucs_offsetof(uct_ib_iface_config_t, pkey_value), UCS_CONFIG_TYPE_HEX}, + ++#if HAVE_IBV_EXP_RES_DOMAIN ++ {"RESOURCE_DOMAIN", "y", ++ "Enable multiple resource domains (experimental).", ++ ucs_offsetof(uct_ib_iface_config_t, enable_res_domain), UCS_CONFIG_TYPE_BOOL}, ++#endif ++ + + {NULL} + }; +@@ -198,12 +220,130 @@ void uct_ib_iface_release_desc(uct_recv_desc_t *self, void *desc) + ucs_mpool_put_inline(ib_desc); + } + ++size_t uct_ib_address_size(uct_ib_iface_t *iface) ++{ ++ if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface))) { ++ return sizeof(uct_ib_address_t) + ++ sizeof(union ibv_gid); /* raw gid */ ++ } else if ((iface->gid.global.subnet_prefix == UCT_IB_LINK_LOCAL_PREFIX) && ++ !iface->is_global_addr) { ++ return sizeof(uct_ib_address_t) + ++ sizeof(uint16_t); /* lid */ ++ } else if (((iface->gid.global.subnet_prefix & UCT_IB_SITE_LOCAL_MASK) == ++ UCT_IB_SITE_LOCAL_PREFIX) && ++ !iface->is_global_addr) { ++ return sizeof(uct_ib_address_t) + ++ sizeof(uint16_t) + /* lid */ ++ sizeof(uint64_t) + /* if_id */ ++ sizeof(uint16_t); /* subnet16 */ ++ } else { ++ return sizeof(uct_ib_address_t) + ++ sizeof(uint16_t) + /* lid */ ++ sizeof(uint64_t) + /* if_id */ ++ sizeof(uint64_t); /* subnet64 */ ++ } ++} ++ ++void uct_ib_address_pack(uct_ib_iface_t *iface, ++ const union ibv_gid *gid, uint16_t lid, ++ uct_ib_address_t *ib_addr) ++{ ++ void *ptr = ib_addr + 1; ++ ++ if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface))) { ++ /* RoCE, in this case we don't use the lid and set the GID flag */ ++ ib_addr->flags = UCT_IB_ADDRESS_FLAG_LINK_LAYER_ETH | ++ UCT_IB_ADDRESS_FLAG_GID; ++ /* uint8_t raw[16]; */ ++ memcpy(ptr, gid->raw, sizeof(gid->raw) * sizeof(uint8_t)); ++ } else { ++ /* IB, LID */ ++ ib_addr->flags = UCT_IB_ADDRESS_FLAG_LINK_LAYER_IB | ++ UCT_IB_ADDRESS_FLAG_LID; ++ *(uint16_t*) ptr = lid; ++ ptr += sizeof(uint16_t); ++ ++ if ((gid->global.subnet_prefix != UCT_IB_LINK_LOCAL_PREFIX) || ++ iface->is_global_addr) { ++ ib_addr->flags |= UCT_IB_ADDRESS_FLAG_IF_ID; ++ *(uint64_t*) ptr = gid->global.interface_id; ++ ptr += sizeof(uint64_t); ++ ++ if (((gid->global.subnet_prefix & UCT_IB_SITE_LOCAL_MASK) == ++ UCT_IB_SITE_LOCAL_PREFIX) && ++ !iface->is_global_addr) { ++ /* Site-local */ ++ ib_addr->flags |= UCT_IB_ADDRESS_FLAG_SUBNET16; ++ *(uint16_t*) ptr = gid->global.subnet_prefix >> 48; ++ } else { ++ /* Global */ ++ ib_addr->flags |= UCT_IB_ADDRESS_FLAG_SUBNET64; ++ *(uint64_t*) ptr = gid->global.subnet_prefix; ++ } ++ } ++ } ++} ++ ++void uct_ib_address_unpack(const uct_ib_address_t *ib_addr, uint16_t *lid, ++ union ibv_gid *gid) ++{ ++ const void *ptr = ib_addr + 1; ++ ++ gid->global.subnet_prefix = UCT_IB_LINK_LOCAL_PREFIX; /* Default prefix */ ++ gid->global.interface_id = 0; ++ *lid = 0; ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_GID) { ++ memcpy(gid->raw, ptr, sizeof(gid->raw) * sizeof(uint8_t)); /* uint8_t raw[16]; */ ++ } ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LID) { ++ *lid = *(uint16_t*)ptr; ++ ptr += sizeof(uint16_t); ++ } ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_IF_ID) { ++ gid->global.interface_id = *(uint64_t*)ptr; ++ ptr += sizeof(uint64_t); ++ } ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_SUBNET16) { ++ gid->global.subnet_prefix = UCT_IB_SITE_LOCAL_PREFIX | ++ ((uint64_t) *(uint16_t*) ptr << 48); ++ ptr += sizeof(uint16_t); ++ } ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_SUBNET64) { ++ gid->global.subnet_prefix = *(uint64_t*) ptr; ++ ptr += sizeof(uint64_t); ++ } ++} ++ ++const char *uct_ib_address_str(const uct_ib_address_t *ib_addr, char *buf, ++ size_t max) ++{ ++ union ibv_gid gid; ++ uint16_t lid; ++ char *p, *endp; ++ ++ uct_ib_address_unpack(ib_addr, &lid, &gid); ++ ++ p = buf; ++ endp = buf + max; ++ if (lid != 0) { ++ snprintf(p, endp - p, "lid %d ", lid); ++ p += strlen(p); ++ } ++ inet_ntop(AF_INET6, &gid, p, endp - p); ++ ++ return buf; ++} ++ + ucs_status_t uct_ib_iface_get_device_address(uct_iface_h tl_iface, + uct_device_addr_t *dev_addr) + { + uct_ib_iface_t *iface = ucs_derived_of(tl_iface, uct_ib_iface_t); +- uct_ib_address_pack(uct_ib_iface_device(iface), iface->addr_type, +- &iface->gid, uct_ib_iface_port_attr(iface)->lid, ++ uct_ib_address_pack(iface, &iface->gid, uct_ib_iface_port_attr(iface)->lid, + (void*)dev_addr); + return UCS_OK; + } +@@ -212,33 +352,17 @@ int uct_ib_iface_is_reachable(const uct_iface_h tl_iface, const uct_device_addr_ + const uct_iface_addr_t *iface_addr) + { + uct_ib_iface_t *iface = ucs_derived_of(tl_iface, uct_ib_iface_t); ++ int is_local_eth = IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface)); + const uct_ib_address_t *ib_addr = (const void*)dev_addr; + union ibv_gid gid; +- uint8_t is_global; + uint16_t lid; +- int is_local_ib; +- +- uct_ib_address_unpack(ib_addr, &lid, &is_global, &gid); +- +- ucs_assert(iface->addr_type < UCT_IB_ADDRESS_TYPE_LAST); +- switch (iface->addr_type) { +- case UCT_IB_ADDRESS_TYPE_LINK_LOCAL: +- case UCT_IB_ADDRESS_TYPE_SITE_LOCAL: +- case UCT_IB_ADDRESS_TYPE_GLOBAL: +- is_local_ib = 1; +- break; +- case UCT_IB_ADDRESS_TYPE_ETH: +- is_local_ib = 0; +- break; +- default: +- ucs_fatal("Unknown address type %d", iface->addr_type); +- break; +- } + +- if (is_local_ib && (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LINK_LAYER_IB)) { ++ uct_ib_address_unpack(ib_addr, &lid, &gid); ++ ++ if (!is_local_eth && (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LINK_LAYER_IB)) { + /* same subnet prefix */ + return gid.global.subnet_prefix == iface->gid.global.subnet_prefix; +- } else if (!is_local_ib && (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LINK_LAYER_ETH)) { ++ } else if (is_local_eth && (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LINK_LAYER_ETH)) { + /* there shouldn't be a lid and the gid flag should be on */ + ucs_assert(ib_addr->flags & UCT_IB_ADDRESS_FLAG_GID); + ucs_assert(!(ib_addr->flags & UCT_IB_ADDRESS_FLAG_LID)); +@@ -253,36 +377,8 @@ ucs_status_t uct_ib_iface_create_ah(uct_ib_iface_t *iface, + struct ibv_ah_attr *ah_attr, + struct ibv_ah **ah_p) + { +- struct ibv_ah *ah; +- char buf[128]; +- char *p, *endp; +- +- ah = ibv_create_ah(uct_ib_iface_md(iface)->pd, ah_attr); +- +- if (ah == NULL) { +- p = buf; +- endp = buf + sizeof(buf); +- snprintf(p, endp - p, "dlid=%d sl=%d port=%d src_path_bits=%d", +- ah_attr->dlid, ah_attr->sl, +- ah_attr->port_num, ah_attr->src_path_bits); +- p += strlen(p); +- +- if (ah_attr->is_global) { +- snprintf(p, endp - p, " dgid="); +- p += strlen(p); +- inet_ntop(AF_INET6, &ah_attr->grh.dgid, p, endp - p); +- p += strlen(p); +- snprintf(p, endp - p, " sgid_index=%d traffic_class=%d", +- ah_attr->grh.sgid_index, ah_attr->grh.traffic_class); +- } +- +- ucs_error("ibv_create_ah(%s) on "UCT_IB_IFACE_FMT" failed: %m", buf, +- UCT_IB_IFACE_ARG(iface)); +- return UCS_ERR_INVALID_ADDR; +- } +- +- *ah_p = ah; +- return UCS_OK; ++ return uct_ib_device_create_ah_cached(uct_ib_iface_device(iface), ah_attr, ++ uct_ib_iface_md(iface)->pd, ah_p); + } + + static ucs_status_t uct_ib_iface_init_pkey(uct_ib_iface_t *iface, +@@ -393,17 +489,174 @@ static ucs_status_t uct_ib_iface_init_lmc(uct_ib_iface_t *iface, + return UCS_OK; + } + ++static const char *uct_ib_qp_type_str(int qp_type) ++{ ++ switch (qp_type) { ++ case IBV_QPT_RC: ++ return "rc"; ++ case IBV_QPT_UD: ++ return "ud"; ++#if HAVE_TL_DC ++ case UCT_IB_QPT_DCI: ++ return "dci"; ++#endif ++ default: ++ ucs_bug("invalid qp type: %d", qp_type); ++ return "unknown"; ++ } ++} ++ ++void uct_ib_iface_fill_attr(uct_ib_iface_t *iface, uct_ib_qp_attr_t *attr) ++{ ++ attr->ibv.send_cq = iface->cq[UCT_IB_DIR_TX]; ++ attr->ibv.recv_cq = iface->cq[UCT_IB_DIR_RX]; ++ ++ attr->ibv.srq = attr->srq; ++ attr->ibv.cap = attr->cap; ++ attr->ibv.qp_type = attr->qp_type; ++ attr->ibv.sq_sig_all = attr->sq_sig_all; ++ ++#if HAVE_DECL_IBV_EXP_CREATE_QP ++ attr->ibv.comp_mask = IBV_EXP_QP_INIT_ATTR_PD; ++ attr->ibv.pd = uct_ib_iface_qp_pd(iface); ++#elif HAVE_DECL_IBV_CREATE_QP_EX ++ attr->ibv.comp_mask = IBV_QP_INIT_ATTR_PD; ++ attr->ibv.pd = uct_ib_iface_qp_pd(iface); ++#endif ++ ++#if HAVE_IBV_EXP_RES_DOMAIN ++ if (iface->res_domain != NULL) { ++ attr->ibv.comp_mask |= IBV_EXP_QP_INIT_ATTR_RES_DOMAIN; ++ attr->ibv.res_domain = iface->res_domain->ibv_domain; ++ } ++#endif ++ ++ if (attr->qp_type == IBV_QPT_UD) { ++ return; ++ } ++ ++#if HAVE_IB_EXT_ATOMICS ++ attr->ibv.comp_mask |= IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG; ++ attr->ibv.max_atomic_arg = UCT_IB_MAX_ATOMIC_SIZE; ++#endif ++ ++#if HAVE_DECL_IBV_EXP_ATOMIC_HCA_REPLY_BE ++ if (uct_ib_iface_device(iface)->dev_attr.exp_atomic_cap == ++ IBV_EXP_ATOMIC_HCA_REPLY_BE) { ++ attr->ibv.comp_mask |= IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS; ++ attr->ibv.exp_create_flags = IBV_EXP_QP_CREATE_ATOMIC_BE_REPLY; ++ } ++#endif ++ ++#if HAVE_STRUCT_IBV_EXP_QP_INIT_ATTR_MAX_INL_RECV ++ attr->ibv.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; ++ attr->ibv.max_inl_recv = attr->max_inl_recv; ++#endif ++} ++ ++ucs_status_t uct_ib_iface_create_qp(uct_ib_iface_t *iface, ++ uct_ib_qp_attr_t *attr, ++ struct ibv_qp **qp_p) ++{ ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ struct ibv_qp *qp; ++ ++ uct_ib_iface_fill_attr(iface, attr); ++ ++#if HAVE_DECL_IBV_EXP_CREATE_QP ++ qp = ibv_exp_create_qp(dev->ibv_context, &attr->ibv); ++#elif HAVE_DECL_IBV_CREATE_QP_EX ++ qp = ibv_create_qp_ex(dev->ibv_context, &attr->ibv); ++#else ++ qp = ibv_create_qp(uct_ib_iface_qp_pd(iface), &attr->ibv); ++#endif ++ if (qp == NULL) { ++ ucs_error("iface=%p: failed to create %s QP TX wr:%d sge:%d inl:%d RX wr:%d sge:%d inl %d: %m", ++ iface, uct_ib_qp_type_str(attr->qp_type), ++ attr->cap.max_send_wr, attr->cap.max_send_sge, attr->cap.max_inline_data, ++ attr->cap.max_recv_wr, attr->cap.max_recv_sge, attr->max_inl_recv); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ attr->cap = attr->ibv.cap; ++ *qp_p = qp; ++ ++ ucs_debug("iface=%p: created %s QP 0x%x on %s:%d TX wr:%d sge:%d inl:%d RX wr:%d sge:%d inl %d", ++ iface, uct_ib_qp_type_str(attr->qp_type), qp->qp_num, ++ uct_ib_device_name(dev), iface->config.port_num, ++ attr->cap.max_send_wr, attr->cap.max_send_sge, attr->cap.max_inline_data, ++ attr->cap.max_recv_wr, attr->cap.max_recv_sge, attr->max_inl_recv); ++ ++ return UCS_OK; ++} ++ ++#if HAVE_DECL_IBV_EXP_SETENV ++static int uct_ib_max_cqe_size() ++{ ++ static int max_cqe_size = -1; ++ ++ if (max_cqe_size == -1) { ++#ifdef __aarch64__ ++ char arm_board_vendor[128]; ++ ucs_aarch64_cpuid_t cpuid; ++ ucs_aarch64_cpuid(&cpuid); ++ ++ arm_board_vendor[0] = '\0'; ++ ucs_read_file(arm_board_vendor, sizeof(arm_board_vendor), 1, ++ "/sys/devices/virtual/dmi/id/board_vendor"); ++ ucs_debug("arm_board_vendor is '%s'", arm_board_vendor); ++ ++ max_cqe_size = ((strcasestr(arm_board_vendor, "Huawei")) && ++ (cpuid.implementer == 0x41) && (cpuid.architecture == 8) && ++ (cpuid.variant == 0) && (cpuid.part == 0xd08) && ++ (cpuid.revision == 2)) ++ ? 64 : 128; ++#else ++ max_cqe_size = 128; ++#endif ++ ucs_debug("max IB CQE size is %d", max_cqe_size); ++ } ++ ++ return max_cqe_size; ++} ++#endif ++ ++struct ibv_cq *uct_ib_create_cq(struct ibv_context *context, int cqe, ++ struct ibv_comp_channel *channel, ++ int comp_vector, int ignore_overrun) ++{ ++ struct ibv_cq *cq; ++#if HAVE_DECL_IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN ++ struct ibv_cq_init_attr_ex cq_attr = {}; ++ ++ cq_attr.cqe = cqe; ++ cq_attr.channel = channel; ++ cq_attr.comp_vector = comp_vector; ++ if (ignore_overrun) { ++ cq_attr.comp_mask = IBV_CQ_INIT_ATTR_MASK_FLAGS; ++ cq_attr.flags = IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN; ++ } ++ ++ cq = ibv_cq_ex_to_cq(ibv_create_cq_ex(context, &cq_attr)); ++#else ++ cq = ibv_create_cq(context, cqe, NULL, channel, comp_vector); ++#endif ++ return cq; ++} ++ + static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + size_t *inl, int preferred_cpu, +- struct ibv_cq **cq_p) ++ int flags, struct ibv_cq **cq_p) + { +- static const char *cqe_size_env_var = "MLX5_CQE_SIZE"; + uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ struct ibv_cq *cq; ++ size_t cqe_size = 64; ++ ucs_status_t status; ++#if HAVE_DECL_IBV_EXP_SETENV ++ static const char *cqe_size_env_var = "MLX5_CQE_SIZE"; + const char *cqe_size_env_value; +- size_t cqe_size_min, cqe_size; ++ size_t cqe_size_min; + char cqe_size_buf[32]; +- ucs_status_t status; +- struct ibv_cq *cq; + int env_var_added = 0; + int ret; + +@@ -415,8 +668,7 @@ static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + if (cqe_size < cqe_size_min) { + ucs_error("%s is set to %zu, but at least %zu is required (inl: %zu)", + cqe_size_env_var, cqe_size, cqe_size_min, *inl); +- status = UCS_ERR_INVALID_PARAM; +- goto out; ++ return UCS_ERR_INVALID_PARAM; + } + } else { + /* CQE size is not defined by the environment, set it according to inline +@@ -424,7 +676,7 @@ static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + */ + cqe_size = ucs_max(cqe_size_min, UCS_SYS_CACHE_LINE_SIZE); + cqe_size = ucs_max(cqe_size, 64); /* at least 64 */ +- cqe_size = ucs_min(cqe_size, 128); /* at most 128 */ ++ cqe_size = ucs_min(cqe_size, uct_ib_max_cqe_size()); + snprintf(cqe_size_buf, sizeof(cqe_size_buf),"%zu", cqe_size); + ucs_debug("%s: setting %s=%s", uct_ib_device_name(dev), cqe_size_env_var, + cqe_size_buf); +@@ -432,15 +684,14 @@ static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + if (ret) { + ucs_error("ibv_exp_setenv(%s=%s) failed: %m", cqe_size_env_var, + cqe_size_buf); +- status = UCS_ERR_INVALID_PARAM; +- goto out; ++ return UCS_ERR_INVALID_PARAM; + } + + env_var_added = 1; + } +- +- cq = ibv_create_cq(dev->ibv_context, cq_length, NULL, iface->comp_channel, +- preferred_cpu); ++#endif ++ cq = uct_ib_create_cq(dev->ibv_context, cq_length, iface->comp_channel, ++ preferred_cpu, flags & UCT_IB_CQ_IGNORE_OVERRUN); + if (cq == NULL) { + ucs_error("ibv_create_cq(cqe=%d) failed: %m", cq_length); + status = UCS_ERR_IO_ERROR; +@@ -452,6 +703,7 @@ static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + status = UCS_OK; + + out_unsetenv: ++#if HAVE_DECL_IBV_EXP_SETENV + if (env_var_added) { + /* if we created a new environment variable, remove it */ + ret = ibv_exp_unsetenv(dev->ibv_context, cqe_size_env_var); +@@ -459,7 +711,7 @@ out_unsetenv: + ucs_warn("unsetenv(%s) failed: %m", cqe_size_env_var); + } + } +-out: ++#endif + return status; + } + +@@ -505,19 +757,125 @@ static ucs_status_t uct_ib_iface_set_moderation(struct ibv_cq *cq, + return UCS_OK; + } + +-/** +- * @param rx_headroom Headroom requested by the user. +- * @param rx_priv_len Length of transport private data to reserve (0 if unused) +- * @param rx_hdr_len Length of transport network header. +- * @param mss Maximal segment size (transport limit). +- */ ++static int uct_ib_iface_res_domain_cmp(uct_ib_iface_res_domain_t *res_domain, ++ uct_ib_iface_t *iface) ++{ ++#if HAVE_IBV_EXP_RES_DOMAIN ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ ++ return res_domain->ibv_domain->context == dev->ibv_context; ++#elif HAVE_DECL_IBV_ALLOC_TD ++ uct_ib_md_t *md = uct_ib_iface_md(iface); ++ ++ return res_domain->pd == md->pd; ++#else ++ return 1; ++#endif ++} ++ ++static ucs_status_t ++uct_ib_iface_res_domain_init(uct_ib_iface_res_domain_t *res_domain, ++ uct_ib_iface_t *iface) ++{ ++#if HAVE_IBV_EXP_RES_DOMAIN ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ struct ibv_exp_res_domain_init_attr attr; ++ ++ attr.comp_mask = IBV_EXP_RES_DOMAIN_THREAD_MODEL | ++ IBV_EXP_RES_DOMAIN_MSG_MODEL; ++ attr.msg_model = IBV_EXP_MSG_LOW_LATENCY; ++ ++ switch (iface->super.worker->thread_mode) { ++ case UCS_THREAD_MODE_SINGLE: ++ attr.thread_model = IBV_EXP_THREAD_SINGLE; ++ break; ++ case UCS_THREAD_MODE_SERIALIZED: ++ attr.thread_model = IBV_EXP_THREAD_UNSAFE; ++ break; ++ default: ++ attr.thread_model = IBV_EXP_THREAD_SAFE; ++ break; ++ } ++ ++ res_domain->ibv_domain = ibv_exp_create_res_domain(dev->ibv_context, &attr); ++ if (res_domain->ibv_domain == NULL) { ++ ucs_error("ibv_exp_create_res_domain() on %s failed: %m", ++ uct_ib_device_name(dev)); ++ return UCS_ERR_IO_ERROR; ++ } ++#elif HAVE_DECL_IBV_ALLOC_TD ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ uct_ib_md_t *md = uct_ib_iface_md(iface); ++ struct ibv_parent_domain_init_attr attr; ++ struct ibv_td_init_attr td_attr; ++ ++ if (iface->super.worker->thread_mode == UCS_THREAD_MODE_MULTI) { ++ td_attr.comp_mask = 0; ++ res_domain->td = ibv_alloc_td(dev->ibv_context, &td_attr); ++ if (res_domain->td == NULL) { ++ ucs_error("ibv_alloc_td() on %s failed: %m", ++ uct_ib_device_name(dev)); ++ return UCS_ERR_IO_ERROR; ++ } ++ } else { ++ res_domain->td = NULL; ++ res_domain->ibv_domain = NULL; ++ res_domain->pd = md->pd; ++ return UCS_OK; ++ } ++ ++ attr.td = res_domain->td; ++ attr.pd = md->pd; ++ attr.comp_mask = 0; ++ res_domain->ibv_domain = ibv_alloc_parent_domain(dev->ibv_context, &attr); ++ if (res_domain->ibv_domain == NULL) { ++ ucs_error("ibv_alloc_parent_domain() on %s failed: %m", ++ uct_ib_device_name(dev)); ++ ibv_dealloc_td(res_domain->td); ++ return UCS_ERR_IO_ERROR; ++ } ++ res_domain->pd = md->pd; ++#endif ++ return UCS_OK; ++} ++ ++static void uct_ib_iface_res_domain_cleanup(uct_ib_iface_res_domain_t *res_domain) ++{ ++#if HAVE_IBV_EXP_RES_DOMAIN ++ struct ibv_exp_destroy_res_domain_attr attr; ++ int ret; ++ ++ attr.comp_mask = 0; ++ ret = ibv_exp_destroy_res_domain(res_domain->ibv_domain->context, ++ res_domain->ibv_domain, &attr); ++ if (ret != 0) { ++ ucs_warn("ibv_exp_destroy_res_domain() failed: %m"); ++ } ++#elif HAVE_DECL_IBV_ALLOC_TD ++ int ret; ++ ++ if (res_domain->ibv_domain != NULL) { ++ ret = ibv_dealloc_pd(res_domain->ibv_domain); ++ if (ret != 0) { ++ ucs_warn("ibv_dealloc_pd() failed: %m"); ++ return; ++ } ++ ++ ret = ibv_dealloc_td(res_domain->td); ++ if (ret != 0) { ++ ucs_warn("ibv_dealloc_td() failed: %m"); ++ } ++ } ++#endif ++} ++ + UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + uct_worker_h worker, const uct_iface_params_t *params, +- unsigned rx_priv_len, unsigned rx_hdr_len, +- unsigned tx_cq_len, unsigned rx_cq_len, size_t mss, +- const uct_ib_iface_config_t *config) ++ const uct_ib_iface_config_t *config, ++ const uct_ib_iface_init_attr_t *init_attr) + { +- uct_ib_device_t *dev = &ucs_derived_of(md, uct_ib_md_t)->dev; ++ uct_ib_md_t *ib_md = ucs_derived_of(md, uct_ib_md_t); ++ uct_ib_device_t *dev = &ib_md->dev; + int preferred_cpu = ucs_cpu_set_find_lcs(¶ms->cpu_mask); + ucs_status_t status; + uint8_t port_num; +@@ -525,48 +883,58 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + + ucs_assert(params->open_mode & UCT_IFACE_OPEN_MODE_DEVICE); + +- if (params->stats_root == NULL) { +- UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &ops->super, md, worker, +- params, &config->super +- UCS_STATS_ARG(dev->stats) +- UCS_STATS_ARG(params->mode.device.dev_name)); +- } else { +- UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &ops->super, md, worker, +- params, &config->super +- UCS_STATS_ARG(params->stats_root) +- UCS_STATS_ARG(params->mode.device.dev_name)); +- } ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &ops->super, md, worker, ++ params, &config->super ++ UCS_STATS_ARG((params->stats_root == NULL) ? ++ dev->stats : params->stats_root) ++ UCS_STATS_ARG(params->mode.device.dev_name)); + + status = uct_ib_device_find_port(dev, params->mode.device.dev_name, &port_num); + if (status != UCS_OK) { + goto err; + } + +- self->ops = ops; +- +- self->config.rx_payload_offset = sizeof(uct_ib_iface_recv_desc_t) + +- ucs_max(sizeof(uct_recv_desc_t) + +- params->rx_headroom, +- rx_priv_len + rx_hdr_len); +- self->config.rx_hdr_offset = self->config.rx_payload_offset - rx_hdr_len; +- self->config.rx_headroom_offset= self->config.rx_payload_offset - +- params->rx_headroom; +- self->config.seg_size = ucs_min(mss, config->super.max_bcopy); +- self->config.tx_max_poll = config->tx.max_poll; +- self->config.rx_max_poll = config->rx.max_poll; +- self->config.rx_max_batch = ucs_min(config->rx.max_batch, +- config->rx.queue_len / 4); +- self->config.port_num = port_num; +- self->config.sl = config->sl; +- self->config.traffic_class = config->traffic_class; +- self->config.gid_index = config->gid_index; +- self->release_desc.cb = uct_ib_iface_release_desc; ++ self->ops = ops; ++ ++ self->config.rx_payload_offset = sizeof(uct_ib_iface_recv_desc_t) + ++ ucs_max(sizeof(uct_recv_desc_t) + ++ params->rx_headroom, ++ init_attr->rx_priv_len + ++ init_attr->rx_hdr_len); ++ self->config.rx_hdr_offset = self->config.rx_payload_offset - ++ init_attr->rx_hdr_len; ++ self->config.rx_headroom_offset = self->config.rx_payload_offset - ++ params->rx_headroom; ++ self->config.seg_size = init_attr->seg_size; ++ self->config.tx_max_poll = config->tx.max_poll; ++ self->config.rx_max_poll = config->rx.max_poll; ++ self->config.rx_max_batch = ucs_min(config->rx.max_batch, ++ config->rx.queue_len / 4); ++ self->config.port_num = port_num; ++ self->config.sl = config->sl; ++ self->config.traffic_class = config->traffic_class; ++ self->config.hop_limit = config->hop_limit; ++ self->release_desc.cb = uct_ib_iface_release_desc; ++ ++ self->config.enable_res_domain = config->enable_res_domain; ++ ++ if (ucs_derived_of(worker, uct_priv_worker_t)->thread_mode == UCS_THREAD_MODE_MULTI) { ++ ucs_error("IB transports do not support multi-threaded worker"); ++ return UCS_ERR_INVALID_PARAM; ++ } + + status = uct_ib_iface_init_pkey(self, config); + if (status != UCS_OK) { + goto err; + } + ++ status = uct_ib_device_select_gid_index(dev, self->config.port_num, ++ ib_md->config.gid_index, ++ &self->config.gid_index); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ + status = uct_ib_device_query_gid(dev, self->config.port_num, + self->config.gid_index, &self->gid); + if (status != UCS_OK) { +@@ -578,11 +946,27 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + goto err; + } + ++ if ((init_attr->res_domain_key == UCT_IB_IFACE_NULL_RES_DOMAIN_KEY) || ++ !self->config.enable_res_domain) { ++ self->res_domain = NULL; ++ } else { ++ self->res_domain = uct_worker_tl_data_get(self->super.worker, ++ init_attr->res_domain_key, ++ uct_ib_iface_res_domain_t, ++ uct_ib_iface_res_domain_cmp, ++ uct_ib_iface_res_domain_init, ++ self); ++ if (UCS_PTR_IS_ERR(self->res_domain)) { ++ status = UCS_PTR_STATUS(self->res_domain); ++ goto err_free_path_bits; ++ } ++ } ++ + self->comp_channel = ibv_create_comp_channel(dev->ibv_context); + if (self->comp_channel == NULL) { + ucs_error("ibv_create_comp_channel() failed: %m"); + status = UCS_ERR_IO_ERROR; +- goto err_free_path_bits; ++ goto err_put_res_domain; + } + + status = ucs_sys_fcntl_modfl(self->comp_channel->fd, O_NONBLOCK, 0); +@@ -591,15 +975,16 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + } + + inl = config->rx.inl; +- status = uct_ib_iface_create_cq(self, tx_cq_len, &inl, preferred_cpu, +- &self->send_cq); ++ status = uct_ib_iface_create_cq(self, init_attr->tx_cq_len, &inl, ++ preferred_cpu, init_attr->flags, ++ &self->cq[UCT_IB_DIR_TX]); + if (status != UCS_OK) { + goto err_destroy_comp_channel; + } + ucs_assert_always(inl <= UINT8_MAX); + self->config.max_inl_resp = inl; + +- status = uct_ib_iface_set_moderation(self->send_cq, ++ status = uct_ib_iface_set_moderation(self->cq[UCT_IB_DIR_TX], + config->tx.cq_moderation_count, + config->tx.cq_moderation_period); + if (status != UCS_OK) { +@@ -607,13 +992,14 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + } + + inl = config->rx.inl; +- status = uct_ib_iface_create_cq(self, rx_cq_len, &inl, +- preferred_cpu, &self->recv_cq); ++ status = uct_ib_iface_create_cq(self, init_attr->rx_cq_len, &inl, ++ preferred_cpu, init_attr->flags, ++ &self->cq[UCT_IB_DIR_RX]); + if (status != UCS_OK) { + goto err_destroy_send_cq; + } + +- status = uct_ib_iface_set_moderation(self->recv_cq, ++ status = uct_ib_iface_set_moderation(self->cq[UCT_IB_DIR_RX], + config->rx.cq_moderation_count, + config->rx.cq_moderation_period); + if (status != UCS_OK) { +@@ -621,18 +1007,17 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + } + + /* Address scope and size */ +- if (config->addr_type == UCT_IB_IFACE_ADDRESS_TYPE_AUTO) { +- if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(self))) { +- self->addr_type = UCT_IB_ADDRESS_TYPE_ETH; +- } else { +- self->addr_type = uct_ib_address_scope(self->gid.global.subnet_prefix); +- } ++ if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(self)) || ++ config->is_global || ++ /* check ADDR_TYPE for backward compatibility */ ++ (config->addr_type == UCT_IB_ADDRESS_TYPE_SITE_LOCAL) || ++ (config->addr_type == UCT_IB_ADDRESS_TYPE_GLOBAL)) { ++ self->is_global_addr = 1; + } else { +- ucs_assert(config->addr_type < UCT_IB_ADDRESS_TYPE_LAST); +- self->addr_type = config->addr_type; ++ self->is_global_addr = 0; + } + +- self->addr_size = uct_ib_address_size(self->addr_type); ++ self->addr_size = uct_ib_address_size(self); + + ucs_debug("created uct_ib_iface_t headroom_ofs %d payload_ofs %d hdr_ofs %d data_sz %d", + self->config.rx_headroom_offset, self->config.rx_payload_offset, +@@ -641,11 +1026,15 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + return UCS_OK; + + err_destroy_recv_cq: +- ibv_destroy_cq(self->recv_cq); ++ ibv_destroy_cq(self->cq[UCT_IB_DIR_RX]); + err_destroy_send_cq: +- ibv_destroy_cq(self->send_cq); ++ ibv_destroy_cq(self->cq[UCT_IB_DIR_TX]); + err_destroy_comp_channel: + ibv_destroy_comp_channel(self->comp_channel); ++err_put_res_domain: ++ if (self->res_domain != NULL) { ++ uct_worker_tl_data_put(self->res_domain, uct_ib_iface_res_domain_cleanup); ++ } + err_free_path_bits: + ucs_free(self->path_bits); + err: +@@ -656,12 +1045,12 @@ static UCS_CLASS_CLEANUP_FUNC(uct_ib_iface_t) + { + int ret; + +- ret = ibv_destroy_cq(self->recv_cq); ++ ret = ibv_destroy_cq(self->cq[UCT_IB_DIR_RX]); + if (ret != 0) { + ucs_warn("ibv_destroy_cq(recv_cq) returned %d: %m", ret); + } + +- ret = ibv_destroy_cq(self->send_cq); ++ ret = ibv_destroy_cq(self->cq[UCT_IB_DIR_TX]); + if (ret != 0) { + ucs_warn("ibv_destroy_cq(send_cq) returned %d: %m", ret); + } +@@ -671,6 +1060,9 @@ static UCS_CLASS_CLEANUP_FUNC(uct_ib_iface_t) + ucs_warn("ibv_destroy_comp_channel(comp_channel) returned %d: %m", ret); + } + ++ if (self->res_domain != NULL) { ++ uct_worker_tl_data_put(self->res_domain, uct_ib_iface_res_domain_cleanup); ++ } + ucs_free(self->path_bits); + } + +@@ -758,6 +1150,140 @@ static ucs_status_t uct_ib_iface_get_numa_latency(uct_ib_iface_t *iface, + return UCS_OK; + } + ++#if HAVE_CUDA ++static int uct_ib_iface_cuda_sysfs_path(int cuda_dev, char** path) ++{ ++ char* cuda_rpath = NULL; ++ char bus_path[] = "/sys/class/pci_bus/0000:00/device"; ++ char bus_id[16]; ++ char pathname[MAXPATHSIZE]; ++ int i; ++ CUresult cu_err; ++ ++ /* Initialize bus_id array to avoid valgrind complaints */ ++ for (i = 0; i < 16; i++) { ++ bus_id[i] = 0; ++ } ++ ++ cu_err = cuDeviceGetPCIBusId(bus_id, 16, cuda_dev); ++ if (CUDA_SUCCESS != cu_err) { ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ for (i = 0; i < 16; i++) { ++ bus_id[i] = tolower(bus_id[i]); ++ } ++ ++ memcpy(bus_path + sizeof("/sys/class/pci_bus/") - 1, bus_id, ++ sizeof("0000:00") - 1); ++ cuda_rpath = realpath(bus_path, NULL); ++ snprintf(pathname, MAXPATHSIZE, "%s/%s", cuda_rpath, bus_id); ++ ++ *path = realpath(pathname, NULL); ++ if (*path == NULL) { ++ ucs_error("Could not find real path of %s", pathname); ++ free(cuda_rpath); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ free(cuda_rpath); ++ ++ return UCS_OK; ++} ++ ++static int uct_ib_iface_ibdev_sysfs_path(const char* ib_name, char** path) ++{ ++ char device_path[MAXPATHSIZE]; ++ ++ snprintf(device_path, MAXPATHSIZE, "/sys/class/infiniband/%s/device", ++ ib_name); ++ ++ *path = realpath(device_path, NULL); ++ if (*path == NULL) { ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ return UCS_OK; ++} ++ ++static int uct_ib_iface_pci_distance(char* cuda_path, char* ibdev_path) ++{ ++ int score = 0; ++ int depth = 0; ++ int same = 1; ++ int i; ++ ++ /* Compare cuda and ibdev paths to determine distance between them ++ Example for UCT_IB_PATH_PIX: ++ ++ ibdev_path: ++ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/0000:04:04.0/0000:05:00.0 ++ cuda path: ++ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/0000:04:08.0 ++ */ ++ for (i = 0; i < strlen(cuda_path); i++) { ++ if (cuda_path[i] != ibdev_path[i]) same = 0; ++ if (cuda_path[i] == '/') { ++ depth++; ++ if (same) { ++ score++; ++ } ++ } ++ } ++ ++ if (3 == score) { ++ return UCT_IB_PATH_SOC; ++ } ++ ++ if (4 == score) { ++ return UCT_IB_PATH_PHB; ++ } ++ ++ if ((depth - 1) == score) { ++ return UCT_IB_PATH_PIX; ++ } ++ ++ return UCT_IB_PATH_PXB; ++} ++ ++static ucs_status_t uct_ib_iface_get_cuda_latency(uct_ib_iface_t *iface, ++ double *latency) ++{ ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ int pci_distance; ++ CUdevice cuda_device; ++ CUresult cu_err; ++ char *cuda_dev_path; ++ char *ibdev_path; ++ ++ /* Find cuda dev that the current ctx is using and find it's path*/ ++ cu_err = cuCtxGetDevice(&cuda_device); ++ if (CUDA_SUCCESS != cu_err) { ++ *latency = 0.0; ++ return UCS_OK; ++ } ++ uct_ib_iface_cuda_sysfs_path(cuda_device, &cuda_dev_path); ++ ++ /* Find ibdev path for given iface */ ++ uct_ib_iface_ibdev_sysfs_path(uct_ib_device_name(dev), &ibdev_path); ++ ++ /* Obtain pci_distance from the cuda device and ibdev device pair */ ++ pci_distance = uct_ib_iface_pci_distance(cuda_dev_path, ibdev_path); ++ ucs_debug("device = %d ib = %s pci_distance = %d\n", ++ (int) cuda_device, uct_ib_device_name(dev), pci_distance); ++ ++ /* Assign latency as a factor of pci_distance */ ++ ++ *latency = 200e-9 * pci_distance; ++ ++ /* release realpath resources */ ++ free(cuda_dev_path); ++ free(ibdev_path); ++ ++ return UCS_OK; ++} ++#endif ++ + ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + uct_iface_attr_t *iface_attr) + { +@@ -766,13 +1292,17 @@ ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + [0] = 1, + [1] = 4, + [2] = 8, +- [3] = 12 ++ [3] = 12, ++ [4] = 16 + }; + uint8_t active_width, active_speed, active_mtu; + double encoding, signal_rate, wire_speed; + size_t mtu, width, extra_pkt_len; + ucs_status_t status; + double numa_latency; ++#if HAVE_CUDA ++ double cuda_latency; ++#endif + + active_width = uct_ib_iface_port_attr(iface)->active_width; + active_speed = uct_ib_iface_port_attr(iface)->active_speed; +@@ -780,7 +1310,7 @@ ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + + /* Get active width */ + if (!ucs_is_pow2(active_width) || +- (active_width < 1) || (ucs_ilog2(active_width) > 3)) ++ (active_width < 1) || (ucs_ilog2(active_width) > 4)) + { + ucs_error("Invalid active_width on %s:%d: %d", + UCT_IB_IFACE_ARG(iface), active_width); +@@ -845,6 +1375,14 @@ ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + return status; + } + ++#if HAVE_CUDA ++ status = uct_ib_iface_get_cuda_latency(iface, &cuda_latency); ++ if (status != UCS_OK) { ++ return status; ++ } ++ iface_attr->latency.overhead += cuda_latency; ++#endif ++ + iface_attr->latency.overhead += numa_latency; + iface_attr->latency.growth = 0; + +@@ -860,6 +1398,7 @@ ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + + if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface))) { + extra_pkt_len += UCT_IB_GRH_LEN + UCT_IB_ROCE_LEN; ++ iface_attr->latency.overhead += 200e-9; + } else { + /* TODO check if UCT_IB_DELIM_LEN is present in RoCE as well */ + extra_pkt_len += UCT_IB_LRH_LEN; +@@ -889,10 +1428,12 @@ ucs_status_t uct_ib_iface_pre_arm(uct_ib_iface_t *iface) + do { + res = ibv_get_cq_event(iface->comp_channel, &cq, &cq_context); + if (0 == res) { +- if (iface->send_cq == cq) { ++ if (iface->cq[UCT_IB_DIR_TX] == cq) { ++ iface->ops->event_cq(iface, UCT_IB_DIR_TX); + ++send_cq_count; + } +- if (iface->recv_cq == cq) { ++ if (iface->cq[UCT_IB_DIR_RX] == cq) { ++ iface->ops->event_cq(iface, UCT_IB_DIR_RX); + ++recv_cq_count; + } + } +@@ -903,11 +1444,11 @@ ucs_status_t uct_ib_iface_pre_arm(uct_ib_iface_t *iface) + } + + if (send_cq_count > 0) { +- ibv_ack_cq_events(iface->send_cq, send_cq_count); ++ ibv_ack_cq_events(iface->cq[UCT_IB_DIR_TX], send_cq_count); + } + + if (recv_cq_count > 0) { +- ibv_ack_cq_events(iface->recv_cq, recv_cq_count); ++ ibv_ack_cq_events(iface->cq[UCT_IB_DIR_RX], recv_cq_count); + } + + /* avoid re-arming the interface if any events exists */ +@@ -920,26 +1461,18 @@ ucs_status_t uct_ib_iface_pre_arm(uct_ib_iface_t *iface) + return UCS_OK; + } + +-static ucs_status_t uct_ib_iface_arm_cq(uct_ib_iface_t *iface, struct ibv_cq *cq, +- int solicited_only) ++ucs_status_t uct_ib_iface_arm_cq(uct_ib_iface_t *iface, ++ uct_ib_dir_t dir, ++ int solicited_only) + { + int ret; + +- ret = ibv_req_notify_cq(cq, solicited_only); ++ ret = ibv_req_notify_cq(iface->cq[dir], solicited_only); + if (ret != 0) { +- ucs_error("ibv_req_notify_cq("UCT_IB_IFACE_FMT", cq, sol=%d) failed: %m", +- UCT_IB_IFACE_ARG(iface), solicited_only); ++ ucs_error("ibv_req_notify_cq("UCT_IB_IFACE_FMT", %d, sol=%d) failed: %m", ++ UCT_IB_IFACE_ARG(iface), dir, solicited_only); + return UCS_ERR_IO_ERROR; + } + return UCS_OK; + } + +-ucs_status_t uct_ib_iface_arm_tx_cq(uct_ib_iface_t *iface) +-{ +- return uct_ib_iface_arm_cq(iface, iface->send_cq, 0); +-} +- +-ucs_status_t uct_ib_iface_arm_rx_cq(uct_ib_iface_t *iface, int solicited_only) +-{ +- return uct_ib_iface_arm_cq(iface, iface->recv_cq, solicited_only); +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.h +index e929e7a..c90c435 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.h +@@ -16,12 +16,15 @@ + #include + #include + +-#define UCT_IB_MAX_IOV 8UL ++#define UCT_IB_MAX_IOV 8UL ++#define UCT_IB_IFACE_NULL_RES_DOMAIN_KEY 0u ++#define UCT_IB_MAX_ATOMIC_SIZE sizeof(uint64_t) ++ + + /* Forward declarations */ + typedef struct uct_ib_iface_config uct_ib_iface_config_t; + typedef struct uct_ib_iface_ops uct_ib_iface_ops_t; +-typedef struct uct_ib_iface uct_ib_iface_t; ++typedef struct uct_ib_iface uct_ib_iface_t; + + + /** +@@ -37,6 +40,39 @@ typedef enum uct_ib_mtu { + } uct_ib_mtu_t; + + ++/** ++ * Traffic direction. ++ */ ++typedef enum { ++ UCT_IB_DIR_RX, ++ UCT_IB_DIR_TX, ++ UCT_IB_DIR_NUM ++} uct_ib_dir_t; ++ ++enum { ++ UCT_IB_QPT_UNKNOWN, ++#if HAVE_DC_EXP ++ UCT_IB_QPT_DCI = IBV_EXP_QPT_DC_INI, ++#elif HAVE_DC_DV ++ UCT_IB_QPT_DCI = IBV_QPT_DRIVER, ++#endif ++}; ++ ++#if HAVE_CUDA ++enum { ++ /* ++ PHB = Connection traversing PCIe as well as a PCIe Host Bridge ++ PXB = Connection traversing multiple PCIe switches ++ PIX = Connection traversing a single PCIe switch ++ */ ++ ++ UCT_IB_PATH_PIX = 0, ++ UCT_IB_PATH_PXB = 1, ++ UCT_IB_PATH_PHB = 2, ++ UCT_IB_PATH_SOC = 3 ++}; ++#endif ++ + struct uct_ib_iface_config { + uct_iface_config_t super; + +@@ -70,8 +106,8 @@ struct uct_ib_iface_config { + /* Change the address type */ + int addr_type; + +- /* IB GID index to use */ +- unsigned gid_index; ++ /* Forice global routing */ ++ int is_global; + + /* IB SL to use */ + unsigned sl; +@@ -79,30 +115,68 @@ struct uct_ib_iface_config { + /* IB Traffic Class to use */ + unsigned traffic_class; + ++ /* IB hop limit / TTL */ ++ unsigned hop_limit; ++ + /* Ranges of path bits */ + UCS_CONFIG_ARRAY_FIELD(ucs_range_spec_t, ranges) lid_path_bits; + + /* IB PKEY to use */ + unsigned pkey_value; ++ ++ /* Multiple resource domains */ ++ int enable_res_domain; + }; + + ++typedef struct uct_ib_qp_attr { ++ int qp_type; ++ struct ibv_qp_cap cap; ++ struct ibv_srq *srq; ++ unsigned sq_sig_all; ++ unsigned max_inl_recv; ++#if HAVE_DECL_IBV_EXP_CREATE_QP ++ struct ibv_exp_qp_init_attr ibv; ++#elif HAVE_DECL_IBV_CREATE_QP_EX ++ struct ibv_qp_init_attr_ex ibv; ++#else ++ struct ibv_qp_init_attr ibv; ++#endif ++} uct_ib_qp_attr_t; ++ ++ + struct uct_ib_iface_ops { + uct_iface_ops_t super; +- ucs_status_t (*arm_tx_cq)(uct_ib_iface_t *iface); +- ucs_status_t (*arm_rx_cq)(uct_ib_iface_t *iface, int solicited_only); ++ ucs_status_t (*arm_cq)(uct_ib_iface_t *iface, ++ uct_ib_dir_t dir, ++ int solicited_only); ++ void (*event_cq)(uct_ib_iface_t *iface, ++ uct_ib_dir_t dir); + void (*handle_failure)(uct_ib_iface_t *iface, void *arg, + ucs_status_t status); + ucs_status_t (*set_ep_failed)(uct_ib_iface_t *iface, uct_ep_h ep, + ucs_status_t status); ++ ucs_status_t (*create_qp)(uct_ib_iface_t *iface, uct_ib_qp_attr_t *attr, ++ struct ibv_qp **qp_p); + }; + + ++typedef struct uct_ib_iface_res_domain { ++ uct_worker_tl_data_t super; ++#if HAVE_IBV_EXP_RES_DOMAIN ++ struct ibv_exp_res_domain *ibv_domain; ++#elif HAVE_DECL_IBV_ALLOC_TD ++ struct ibv_td *td; ++ struct ibv_pd *pd; ++ struct ibv_pd *ibv_domain; ++#endif ++} uct_ib_iface_res_domain_t; ++ ++ + struct uct_ib_iface { + uct_base_iface_t super; + +- struct ibv_cq *send_cq; +- struct ibv_cq *recv_cq; ++ struct ibv_cq *cq[UCT_IB_DIR_NUM]; + struct ibv_comp_channel *comp_channel; + uct_recv_desc_t release_desc; + +@@ -110,9 +184,10 @@ struct uct_ib_iface { + unsigned path_bits_count; + uint16_t pkey_index; + uint16_t pkey_value; +- uct_ib_address_type_t addr_type; ++ uint8_t is_global_addr; + uint8_t addr_size; + union ibv_gid gid; ++ uct_ib_iface_res_domain_t *res_domain; + + struct { + unsigned rx_payload_offset; /* offset from desc to payload */ +@@ -126,17 +201,35 @@ struct uct_ib_iface { + uint8_t port_num; + uint8_t sl; + uint8_t traffic_class; +- uint8_t gid_index; ++ uint8_t hop_limit; ++ uint8_t gid_index; /* IB GID index to use */ ++ int enable_res_domain; /* Disable multiple resource domains */ + size_t max_iov; /* Maximum buffers in IOV array */ + } config; + + uct_ib_iface_ops_t *ops; ++}; + ++enum { ++ UCT_IB_CQ_IGNORE_OVERRUN = UCS_BIT(0), + }; +-UCS_CLASS_DECLARE(uct_ib_iface_t, uct_ib_iface_ops_t*, uct_md_h, uct_worker_h, +- const uct_iface_params_t*, unsigned, unsigned, unsigned, +- unsigned, size_t, const uct_ib_iface_config_t*) + ++typedef struct uct_ib_iface_init_attr { ++ ++ unsigned rx_priv_len; /* Length of transport private data to reserve */ ++ unsigned rx_hdr_len; /* Length of transport network header */ ++ unsigned tx_cq_len; /* Send CQ length */ ++ unsigned rx_cq_len; /* Receive CQ length */ ++ size_t seg_size; /* Transport segment size */ ++ uint32_t res_domain_key; /* Resource domain key */ ++ int tm_cap_bit; /* Required HW tag-matching capabilities */ ++ unsigned fc_req_size; /* Flow control request size */ ++ int flags; /* Various flags (see enum) */ ++} uct_ib_iface_init_attr_t; ++ ++UCS_CLASS_DECLARE(uct_ib_iface_t, uct_ib_iface_ops_t*, uct_md_h, uct_worker_h, ++ const uct_iface_params_t*, const uct_ib_iface_config_t*, ++ const uct_ib_iface_init_attr_t*); + + /* + * The offset to the payload is the maximum between user-requested headroom +@@ -213,6 +306,44 @@ uct_ib_iface_invoke_am_desc(uct_ib_iface_t *iface, uint8_t am_id, void *data, + } + } + ++ ++/** ++ * @return IB address size of the given link scope. ++ */ ++size_t uct_ib_address_size(uct_ib_iface_t *iface); ++ ++ ++/** ++ * Pack IB address. ++ * ++ * @param [in] dev IB device. TODO remove this. ++ * @param [in] gid GID address to pack. ++ * @param [in] lid LID address to pack. ++ * @param [out] ib_addr Filled with packed ib address. Size of the structure ++ * must be at least what @ref uct_ib_address_size() returns ++ * for the given scope. ++ */ ++void uct_ib_address_pack(uct_ib_iface_t *iface, ++ const union ibv_gid *gid, uint16_t lid, ++ uct_ib_address_t *ib_addr); ++ ++ ++/** ++ * Unpack IB address. ++ * ++ * @param [in] ib_addr IB address to unpack. ++ * @param [out] lid Filled with address LID, or 0 if not present. ++ */ ++void uct_ib_address_unpack(const uct_ib_address_t *ib_addr, uint16_t *lid, ++ union ibv_gid *gid); ++ ++ ++/** ++ * Convert IB address to a human-readable string. ++ */ ++const char *uct_ib_address_str(const uct_ib_address_t *ib_addr, char *buf, ++ size_t max); ++ + ucs_status_t uct_ib_iface_get_device_address(uct_iface_h tl_iface, + uct_device_addr_t *dev_addr); + +@@ -260,9 +391,6 @@ typedef struct uct_ib_recv_wr { + int uct_ib_iface_prepare_rx_wrs(uct_ib_iface_t *iface, ucs_mpool_t *mp, + uct_ib_recv_wr_t *wrs, unsigned n); + +-void uct_ib_iface_fill_ah_attr(uct_ib_iface_t *iface, const uct_ib_address_t *ib_addr, +- uint8_t src_path_bits, struct ibv_ah_attr *ah_attr); +- + ucs_status_t uct_ib_iface_create_ah(uct_ib_iface_t *iface, + struct ibv_ah_attr *ah_attr, + struct ibv_ah **ah_p); +@@ -271,16 +399,22 @@ ucs_status_t uct_ib_iface_pre_arm(uct_ib_iface_t *iface); + + ucs_status_t uct_ib_iface_event_fd_get(uct_iface_h iface, int *fd_p); + +-ucs_status_t uct_ib_iface_arm_tx_cq(uct_ib_iface_t *iface); +- +-ucs_status_t uct_ib_iface_arm_rx_cq(uct_ib_iface_t *iface, int solicited_only); +- ++ucs_status_t uct_ib_iface_arm_cq(uct_ib_iface_t *iface, ++ uct_ib_dir_t dir, ++ int solicited_only); + + static inline uint8_t uct_ib_iface_get_atomic_mr_id(uct_ib_iface_t *iface) + { + return uct_ib_md_get_atomic_mr_id(ucs_derived_of(iface->super.md, uct_ib_md_t)); + } + ++ucs_status_t uct_ib_iface_create_qp(uct_ib_iface_t *iface, ++ uct_ib_qp_attr_t *attr, ++ struct ibv_qp **qp_p); ++ ++void uct_ib_iface_fill_attr(uct_ib_iface_t *iface, ++ uct_ib_qp_attr_t *attr); ++ + + #define UCT_IB_IFACE_FMT \ + "%s:%d" +@@ -291,7 +425,7 @@ static inline uint8_t uct_ib_iface_get_atomic_mr_id(uct_ib_iface_t *iface) + #define UCT_IB_IFACE_VERBS_COMPLETION_ERR(_type, _iface, _i, _wc) \ + ucs_fatal("%s completion[%d] with error on %s/%p: %s, vendor_err 0x%x wr_id 0x%lx", \ + _type, _i, uct_ib_device_name(uct_ib_iface_device(_iface)), _iface, \ +- ibv_wc_status_str(_wc[i].status), _wc[i].vendor_err, \ ++ uct_ib_wc_status_str(_wc[i].status), _wc[i].vendor_err, \ + _wc[i].wr_id); + + #define UCT_IB_IFACE_VERBS_FOREACH_RXWQE(_iface, _i, _hdr, _wc, _wc_count) \ +@@ -304,6 +438,9 @@ static inline uint8_t uct_ib_iface_get_atomic_mr_id(uct_ib_iface_t *iface) + VALGRIND_MAKE_MEM_DEFINED(_hdr, _wc[i].byte_len); \ + 1; }); ++_i) + ++#define UCT_IB_MAX_ZCOPY_LOG_SGE(_iface) \ ++ (uct_ib_iface_device(_iface)->max_zcopy_log_sge) ++ + /** + * Fill ibv_sge data structure by data provided in uct_iov_t + * The function avoids copying IOVs with zero length +@@ -369,15 +506,15 @@ void uct_ib_iface_fill_ah_attr_from_gid_lid(uct_ib_iface_t *iface, uint16_t lid, + ah_attr->port_num = iface->config.port_num; + ah_attr->grh.traffic_class = iface->config.traffic_class; + +- if ((gid != NULL) && +- ((iface->addr_type == UCT_IB_ADDRESS_TYPE_ETH) || +- (iface->addr_type == UCT_IB_ADDRESS_TYPE_GLOBAL) || +- (iface->gid.global.subnet_prefix != gid->global.subnet_prefix))) { +- ah_attr->is_global = 1; ++ if (iface->is_global_addr || ++ (iface->gid.global.subnet_prefix != gid->global.subnet_prefix)) { ++ ucs_assert_always(gid->global.interface_id != 0); ++ ah_attr->is_global = 1; ++ ah_attr->grh.dgid = *gid; + ah_attr->grh.sgid_index = iface->config.gid_index; +- ah_attr->grh.dgid = *gid; ++ ah_attr->grh.hop_limit = iface->config.hop_limit; + } else { +- ah_attr->is_global = 0; ++ ah_attr->is_global = 0; + } + } + +@@ -387,18 +524,26 @@ void uct_ib_iface_fill_ah_attr_from_addr(uct_ib_iface_t *iface, + uint8_t path_bits, + struct ibv_ah_attr *ah_attr) + { +- union ibv_gid *gid_p = NULL; + union ibv_gid gid; +- uint8_t is_global; + uint16_t lid; + +- uct_ib_address_unpack(ib_addr, &lid, &is_global, &gid); ++ uct_ib_address_unpack(ib_addr, &lid, &gid); + +- if (is_global) { +- gid_p = &gid; +- } ++ uct_ib_iface_fill_ah_attr_from_gid_lid(iface, lid, &gid, path_bits, ah_attr); ++} ++ ++static UCS_F_ALWAYS_INLINE ++struct ibv_pd *uct_ib_iface_qp_pd(uct_ib_iface_t *iface) ++{ ++ struct ibv_pd *pd; + +- uct_ib_iface_fill_ah_attr_from_gid_lid(iface, lid, gid_p, path_bits, ah_attr); ++ pd = uct_ib_iface_md(iface)->pd; ++#if HAVE_DECL_IBV_ALLOC_TD ++ if (iface->res_domain && iface->res_domain->ibv_domain) { ++ pd = iface->res_domain->ibv_domain; ++ } ++#endif ++ return pd; + } + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.c +index 9bafb93..6230e5e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.c +@@ -9,10 +9,10 @@ + #include + + +-void uct_ib_log_dump_opcode(uint32_t qp_num, uct_ib_opcode_t *op, int signal, +- int fence, int se, char *buf, size_t max) ++void uct_ib_log_dump_opcode(uint32_t qp_num, unsigned idx, uct_ib_opcode_t *op, ++ int signal, int fence, int se, char *buf, size_t max) + { +- snprintf(buf, max, "%s qp 0x%x %c%c%c", op->name, qp_num, ++ snprintf(buf, max, "%s qp 0x%x %03d %c%c%c", op->name, qp_num, idx, + signal ? 's' : '-', fence ? 'f' : '-', se ? 'e' : '-'); + } + +@@ -39,16 +39,19 @@ void uct_ib_log_dump_sg_list(uct_ib_iface_t *iface, uct_am_trace_type_t type, + sg_list[i].addr, sg_list[i].length, sg_list[i].lkey); + } + +- len = ucs_min(sg_list[i].length, (void*)data + sizeof(data) - md); +- memcpy(md, (void*)sg_list[i].addr, len); +- + s += strlen(s); +- md += len; +- total_len += len; +- total_valid_len += sg_list[i].length; ++ ++ if (data_dump) { ++ len = ucs_min(sg_list[i].length, (void*)data + sizeof(data) - md); ++ memcpy(md, (void*)sg_list[i].addr, len); ++ ++ md += len; ++ total_len += len; ++ total_valid_len += sg_list[i].length; ++ } + } + +- if (data_dump != NULL) { ++ if (data_dump) { + data_dump(&iface->super, type, data, total_len, total_valid_len, s, ends - s); + } + } +@@ -83,7 +86,7 @@ void uct_ib_log_dump_atomic_masked_cswap(int argsize, uint64_t compare, uint64_t + argsize * 8, compare, compare_mask, swap, swap_mask); + } + +-void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, int qp_type, + uint32_t local_qp, uint32_t sender_qp, + uint16_t sender_lid, void *data, size_t length, + uct_log_data_dump_func_t data_dump, +@@ -109,10 +112,11 @@ void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, enum ibv_qp_type qp_ + } + } + +-static void uct_ib_dump_wr_opcode(struct ibv_qp *qp, uct_ib_opcode_t *op, +- int send_flags, char *buf, size_t max) ++static void uct_ib_dump_wr_opcode(struct ibv_qp *qp, uint64_t wr_id, ++ uct_ib_opcode_t *op, int send_flags, ++ char *buf, size_t max) + { +- uct_ib_log_dump_opcode(qp->qp_num, op, ++ uct_ib_log_dump_opcode(qp->qp_num, wr_id, op, + send_flags & IBV_SEND_SIGNALED, + send_flags & IBV_SEND_FENCE, + send_flags & IBV_SEND_SOLICITED, +@@ -153,7 +157,7 @@ static void uct_ib_dump_wr(struct ibv_qp *qp, uct_ib_opcode_t *op, + } + + static void uct_ib_dump_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_send_wr *wr, ++ struct ibv_send_wr *wr, int max_sge, + uct_log_data_dump_func_t data_dump, + char *buf, size_t max) + { +@@ -161,40 +165,42 @@ static void uct_ib_dump_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, + [IBV_WR_RDMA_WRITE] = { "RDMA_WRITE", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [IBV_WR_RDMA_READ] = { "RDMA_READ", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [IBV_WR_SEND] = { "SEND", 0 }, +- [IBV_WR_ATOMIC_CMP_AND_SWP] = { "CS", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, +- [IBV_WR_ATOMIC_FETCH_AND_ADD] = { "FA", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [IBV_WR_SEND_WITH_IMM] = { "SEND_IMM", 0 }, ++ [IBV_WR_ATOMIC_CMP_AND_SWP] = { "CSWAP", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [IBV_WR_ATOMIC_FETCH_AND_ADD] = { "FETCH_ADD", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, + }; + + char *s = buf; + char *ends = buf + max; + uct_ib_opcode_t *op = &opcodes[wr->opcode]; + +- uct_ib_dump_wr_opcode(qp, op, wr->send_flags, s, ends - s); ++ uct_ib_dump_wr_opcode(qp, wr->wr_id, op, wr->send_flags, s, ends - s); + s += strlen(s); + + uct_ib_dump_wr(qp, op, wr, s, ends - s); + s += strlen(s); + +- uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, wr->sg_list, wr->num_sge, ++ uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, wr->sg_list, ++ ucs_min(wr->num_sge, max_sge), + (wr->send_flags & IBV_SEND_INLINE) ? -1 : 0, + data_dump, s, ends - s); + } + + void __uct_ib_log_post_send(const char *file, int line, const char *function, + uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_send_wr *wr, ++ struct ibv_send_wr *wr, int max_sge, + uct_log_data_dump_func_t data_dump_cb) + { + char buf[256] = {0}; + while (wr != NULL) { +- uct_ib_dump_send_wr(iface, qp, wr, data_dump_cb, buf, sizeof(buf) - 1); ++ uct_ib_dump_send_wr(iface, qp, wr, max_sge, data_dump_cb, buf, sizeof(buf) - 1); + uct_log_data(file, line, function, buf); + wr = wr->next; + } + } + + void __uct_ib_log_recv_completion(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++ uct_ib_iface_t *iface, int qp_type, + uint32_t l_qp, uint32_t r_qp, uint16_t slid, + void *data, size_t length, + uct_log_data_dump_func_t packet_dump_cb) +@@ -214,7 +220,7 @@ void __uct_ib_log_recv_completion(const char *file, int line, const char *functi + + #if HAVE_DECL_IBV_EXP_POST_SEND + static void uct_ib_dump_exp_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_exp_send_wr *wr, ++ struct ibv_exp_send_wr *wr, int max_sge, + uct_log_data_dump_func_t data_dump_cb, + char *buf, size_t max) + { +@@ -225,13 +231,16 @@ static void uct_ib_dump_exp_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, + [IBV_EXP_WR_RDMA_WRITE] = { "RDMA_WRITE", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [IBV_EXP_WR_RDMA_READ] = { "RDMA_READ", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [IBV_EXP_WR_SEND] = { "SEND", 0 }, +- [IBV_EXP_WR_ATOMIC_CMP_AND_SWP] = { "CS", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, +- [IBV_EXP_WR_ATOMIC_FETCH_AND_ADD] = { "FA", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [IBV_EXP_WR_SEND_WITH_IMM] = { "SEND_IMM", 0 }, ++ [IBV_EXP_WR_ATOMIC_CMP_AND_SWP] = { "CSWAP", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [IBV_EXP_WR_ATOMIC_FETCH_AND_ADD] = { "FETCH_ADD", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, + #if HAVE_DECL_IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP +- [IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP] = { "MASKED_CS", UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, ++ [IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP] = { "MASKED_CSWAP", ++ UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, + #endif + #if HAVE_DECL_IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD +- [IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD] = { "MASKED_FA", UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, ++ [IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD] = { "MASKED_FETCH_ADD", ++ UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, + #endif + }; + +@@ -243,7 +252,7 @@ static void uct_ib_dump_exp_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, + UCS_STATIC_ASSERT((int)IBV_SEND_SIGNALED == (int)IBV_EXP_SEND_SIGNALED); + UCS_STATIC_ASSERT((int)IBV_SEND_FENCE == (int)IBV_EXP_SEND_FENCE); + UCS_STATIC_ASSERT((int)IBV_SEND_SOLICITED == (int)IBV_EXP_SEND_SOLICITED); +- uct_ib_dump_wr_opcode(qp, op, wr->exp_send_flags, s, ends - s); ++ uct_ib_dump_wr_opcode(qp, wr->wr_id, op, wr->exp_send_flags, s, ends - s); + s += strlen(s); + + /* TODO DC address handle */ +@@ -283,19 +292,21 @@ static void uct_ib_dump_exp_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, + } + #endif + +- uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, wr->sg_list, wr->num_sge, ++ uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, wr->sg_list, ++ ucs_min(wr->num_sge, max_sge), + (wr->exp_send_flags & IBV_EXP_SEND_INLINE) ? -1 : 0, + data_dump_cb, s, ends - s); + } + + void __uct_ib_log_exp_post_send(const char *file, int line, const char *function, + uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_exp_send_wr *wr, ++ struct ibv_exp_send_wr *wr, int max_sge, + uct_log_data_dump_func_t packet_dump_cb) + { + char buf[256] = {0}; + while (wr != NULL) { +- uct_ib_dump_exp_send_wr(iface, qp, wr, packet_dump_cb, buf, sizeof(buf) - 1); ++ uct_ib_dump_exp_send_wr(iface, qp, wr, max_sge, packet_dump_cb, ++ buf, sizeof(buf) - 1); + uct_log_data(file, line, function, buf); + wr = wr->next; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.h +index 3f608fb..fc7d756 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.h +@@ -28,8 +28,8 @@ typedef struct uct_ib_opcode { + } uct_ib_opcode_t; + + +-void uct_ib_log_dump_opcode(uint32_t qp_num, uct_ib_opcode_t *op, int signal, +- int fence, int se, char *buf, size_t max); ++void uct_ib_log_dump_opcode(uint32_t qp_num, unsigned idx, uct_ib_opcode_t *op, ++ int signal, int fence, int se, char *buf, size_t max); + + void uct_ib_log_dump_sg_list(uct_ib_iface_t *iface, uct_am_trace_type_t type, + struct ibv_sge *sg_list, int num_sge, +@@ -51,7 +51,7 @@ void uct_ib_log_dump_atomic_masked_cswap(int argsize, uint64_t compare, uint64_t + uint64_t swap, uint64_t swap_mask, + char *buf, size_t max); + +-void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, int qp_type, + uint32_t local_qp, uint32_t sender_qp, + uint16_t sender_lid, void *data, size_t length, + uct_log_data_dump_func_t data_dump, +@@ -59,25 +59,26 @@ void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, enum ibv_qp_type qp_ + + void __uct_ib_log_post_send(const char *file, int line, const char *function, + uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_send_wr *wr, ++ struct ibv_send_wr *wr, int max_sge, + uct_log_data_dump_func_t packet_dump_cb); + + void __uct_ib_log_recv_completion(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++ uct_ib_iface_t *iface, int qp_type, + uint32_t l_qp, uint32_t r_qp, uint16_t slid, void *data, + size_t length, uct_log_data_dump_func_t packet_dump_cb); + + #if HAVE_DECL_IBV_EXP_POST_SEND + void __uct_ib_log_exp_post_send(const char *file, int line, const char *function, + uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_exp_send_wr *wr, ++ struct ibv_exp_send_wr *wr, int max_sge, + uct_log_data_dump_func_t packet_dump_cb); + #endif + + +-#define uct_ib_log_post_send(_iface, _qp, _wr, _dump_cb) \ ++#define uct_ib_log_post_send(_iface, _qp, _wr, _max_sge, _dump_cb) \ + if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { \ +- __uct_ib_log_post_send(__FILE__, __LINE__, __FUNCTION__, _iface, _qp, _wr, _dump_cb); \ ++ __uct_ib_log_post_send(__FILE__, __LINE__, __FUNCTION__, \ ++ _iface, _qp, _wr, _max_sge, _dump_cb); \ + } + + /* Suitable for both: regular and exp wcs */ +@@ -88,9 +89,10 @@ void __uct_ib_log_exp_post_send(const char *file, int line, const char *function + _data, _length, _dump_cb, ## __VA_ARGS__); \ + } + +-#define uct_ib_log_exp_post_send(_iface, _qp, _wr, _dump_cb) \ ++#define uct_ib_log_exp_post_send(_iface, _qp, _wr, _max_sge,_dump_cb) \ + if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { \ +- __uct_ib_log_exp_post_send(__FILE__, __LINE__, __FUNCTION__, _iface, _qp, _wr, _dump_cb); \ ++ __uct_ib_log_exp_post_send(__FILE__, __LINE__, __FUNCTION__, \ ++ _iface, _qp, _wr, _max_sge, _dump_cb); \ + } + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.c +index 791933e..9df15e0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.c +@@ -10,8 +10,12 @@ + #include "ib_device.h" + + #include +-#include ++#include ++#include ++#include ++#include + #include ++#include + + + #define UCT_IB_MD_PREFIX "ib" +@@ -98,6 +102,31 @@ static ucs_config_field_t uct_ib_md_config_table[] = { + "cause stack smashing.\n", + ucs_offsetof(uct_ib_md_config_t, ext.enable_contig_pages), UCS_CONFIG_TYPE_BOOL}, + ++ {"INDIRECT_ATOMIC", "y", ++ "Use indirect atomic\n", ++ ucs_offsetof(uct_ib_md_config_t, ext.enable_indirect_atomic), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"GID_INDEX", "auto", ++ "Port GID index to use.", ++ ucs_offsetof(uct_ib_md_config_t, ext.gid_index), UCS_CONFIG_TYPE_ULUNITS}, ++ ++ {"SUBNET_PREFIX", "", ++ "Infiniband subnet prefix to filter ports by, empty means no filter. " ++ "Relevant for IB link layer only\n" ++ "For example a filter for the default subnet prefix can be specified as: fe80:0:0:0", ++ ucs_offsetof(uct_ib_md_config_t, subnet_prefix), UCS_CONFIG_TYPE_STRING}, ++ ++ {"GPU_DIRECT_RDMA", "try", ++ "Use GPU Direct RDMA for HCA to access GPU pages directly\n", ++ ucs_offsetof(uct_ib_md_config_t, ext.enable_gpudirect_rdma), UCS_CONFIG_TYPE_TERNARY}, ++ ++#if HAVE_EXP_UMR ++ {"MAX_INLINE_KLM_LIST", "inf", ++ "When posting a UMR, KLM lists shorter or equal to this value will be posted as inline.\n" ++ "The actual maximal length is also limited by device capabilities.", ++ ucs_offsetof(uct_ib_md_config_t, ext.max_inline_klm_list), UCS_CONFIG_TYPE_UINT}, ++#endif ++ + {NULL} + }; + +@@ -125,9 +154,18 @@ static ucs_status_t uct_ib_md_query(uct_md_h uct_md, uct_md_attr_t *md_attr) + md_attr->cap.reg_mem_types = UCS_BIT(UCT_MD_MEM_TYPE_HOST); + + #if HAVE_CUDA +- /* check if GDR driver is loaded */ +- if (!access("/sys/kernel/mm/memory_peers/nv_mem/version", F_OK)) { +- md_attr->cap.reg_mem_types |= UCS_BIT(UCT_MD_MEM_TYPE_CUDA); ++ if (md->config.enable_gpudirect_rdma != UCS_NO) { ++ /* check if GDR driver is loaded */ ++ if (!access("/sys/kernel/mm/memory_peers/nv_mem/version", F_OK)) { ++ md_attr->cap.reg_mem_types |= UCS_BIT(UCT_MD_MEM_TYPE_CUDA); ++ ucs_debug("%s: GPUDirect RDMA is enabled", uct_ib_device_name(&md->dev)); ++ } else if (md->config.enable_gpudirect_rdma == UCS_YES) { ++ ucs_error("%s: Couldn't enable GPUDirect RDMA. Please make sure nv_peer_mem" ++ " plugin installed correctly.", uct_ib_device_name(&md->dev)); ++ return UCS_ERR_UNSUPPORTED; ++ } else { ++ ucs_debug("%s: GPUDirect RDMA is disabled", uct_ib_device_name(&md->dev)); ++ } + } + #endif + +@@ -157,7 +195,8 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + + ibdev = &md->dev; + +- if (!(ibdev->dev_attr.exp_device_cap_flags & IBV_EXP_DEVICE_UMR)) { ++ if (!(ibdev->dev_attr.exp_device_cap_flags & IBV_EXP_DEVICE_UMR) || ++ !md->config.enable_indirect_atomic) { + return UCS_ERR_UNSUPPORTED; + } + +@@ -173,6 +212,9 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + goto err; + } + ++ md->config.max_inline_klm_list = ucs_min(md->config.max_inline_klm_list, ++ ibdev->dev_attr.umr_caps.max_send_wqe_inline_klms); ++ + qp_init_attr.qp_type = IBV_QPT_RC; + qp_init_attr.send_cq = md->umr_cq; + qp_init_attr.recv_cq = md->umr_cq; +@@ -185,11 +227,7 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + qp_init_attr.pd = md->pd; + qp_init_attr.comp_mask = IBV_EXP_QP_INIT_ATTR_PD|IBV_EXP_QP_INIT_ATTR_MAX_INL_KLMS; + qp_init_attr.max_inl_recv = 0; +-#if (HAVE_IBV_EXP_QP_CREATE_UMR_CAPS || HAVE_EXP_UMR_NEW_API) +- qp_init_attr.max_inl_send_klms = ibdev->dev_attr.umr_caps.max_send_wqe_inline_klms; +-#else +- qp_init_attr.max_inl_send_klms = ibdev->dev_attr.max_send_wqe_inline_klms; +-#endif ++ qp_init_attr.max_inl_send_klms = md->config.max_inline_klm_list; + + #if HAVE_IBV_EXP_QP_CREATE_UMR + qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS; +@@ -224,7 +262,8 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + qp_attr.ah_attr.port_num = port_num; + qp_attr.ah_attr.dlid = port_attr->lid; + qp_attr.ah_attr.is_global = 1; +- if (uct_ib_device_query_gid(ibdev, port_num, 0, &qp_attr.ah_attr.grh.dgid) != UCS_OK) { ++ if (uct_ib_device_query_gid(ibdev, port_num, UCT_IB_MD_DEFAULT_GID_INDEX, ++ &qp_attr.ah_attr.grh.dgid) != UCS_OK) { + goto err_destroy_qp; + } + qp_attr.rq_psn = 0; +@@ -254,6 +293,9 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + ucs_error("Failed to modify UMR QP to RTS: %m"); + goto err_destroy_qp; + } ++ ++ ucs_debug("initialized UMR QP 0x%x, max_inline_klm_list %u", ++ md->umr_qp->qp_num, md->config.max_inline_klm_list); + return UCS_OK; + + err_destroy_qp: +@@ -297,6 +339,29 @@ uint8_t uct_ib_md_get_atomic_mr_id(uct_ib_md_t *md) + #endif + } + ++static void uct_ib_md_print_mem_reg_err_msg(ucs_log_level_t level, void *address, ++ size_t length, uint64_t exp_access, ++ const char *exp_prefix) ++{ ++ char msg[200] = {0}; ++ struct rlimit limit_info; ++ ++ ucs_snprintf_zero(msg, sizeof(msg), ++ "ibv_%sreg_mr(address=%p, length=%zu, %saccess=0x%lx) failed: %m", ++ exp_prefix, address, length, exp_prefix, exp_access); ++ ++ /* Check the value of the max locked memory which is set on the system ++ * (ulimit -l) */ ++ if (!getrlimit(RLIMIT_MEMLOCK, &limit_info) && ++ (limit_info.rlim_cur != RLIM_INFINITY)) { ++ ucs_snprintf_zero(msg + strlen(msg), sizeof(msg) - strlen(msg), ++ ". Please set max locked memory (ulimit -l) to 'unlimited' " ++ "(current: %llu kbytes)", limit_info.rlim_cur / UCS_KBYTE); ++ } ++ ++ ucs_log(level, "%s", msg); ++} ++ + static ucs_status_t uct_ib_md_reg_mr(uct_ib_md_t *md, void *address, + size_t length, uint64_t exp_access, + int silent, struct ibv_mr **mr_p) +@@ -316,8 +381,8 @@ static ucs_status_t uct_ib_md_reg_mr(uct_ib_md_t *md, void *address, + + mr = UCS_PROFILE_CALL(ibv_exp_reg_mr, &in); + if (mr == NULL) { +- ucs_log(level, "ibv_exp_reg_mr(address=%p, length=%zu, exp_access=0x%lx) failed: %m", +- in.addr, in.length, in.exp_access); ++ uct_ib_md_print_mem_reg_err_msg(level, in.addr, in.length, ++ in.exp_access, "exp_"); + return UCS_ERR_IO_ERROR; + } + #else +@@ -327,8 +392,8 @@ static ucs_status_t uct_ib_md_reg_mr(uct_ib_md_t *md, void *address, + mr = UCS_PROFILE_CALL(ibv_reg_mr, md->pd, address, length, + UCT_IB_MEM_ACCESS_FLAGS); + if (mr == NULL) { +- ucs_log(level, "ibv_reg_mr(address=%p, length=%zu, access=0x%x) failed: %m", +- address, length, UCT_IB_MEM_ACCESS_FLAGS); ++ uct_ib_md_print_mem_reg_err_msg(level, address, length, ++ UCT_IB_MEM_ACCESS_FLAGS, ""); + return UCS_ERR_IO_ERROR; + } + } +@@ -341,12 +406,14 @@ static ucs_status_t uct_ib_md_post_umr(uct_ib_md_t *md, struct ibv_mr *mr, + off_t offset, struct ibv_mr **umr_p) + { + #if HAVE_EXP_UMR +- struct ibv_exp_mem_region mem_reg; ++ struct ibv_exp_mem_region *mem_reg = NULL; + struct ibv_exp_send_wr wr, *bad_wr; + struct ibv_exp_create_mr_in mrin; + ucs_status_t status; + struct ibv_mr *umr; + struct ibv_wc wc; ++ int i, list_size; ++ size_t reg_length; + int ret; + + if (md->umr_qp == NULL) { +@@ -354,20 +421,56 @@ static ucs_status_t uct_ib_md_post_umr(uct_ib_md_t *md, struct ibv_mr *mr, + goto err; + } + +- /* Create memory key */ ++ /* Create and fill memory key */ + memset(&mrin, 0, sizeof(mrin)); +- mrin.pd = md->pd; ++ memset(&wr, 0, sizeof(wr)); + +-#ifdef HAVE_EXP_UMR_NEW_API +- mrin.attr.create_flags = IBV_EXP_MR_INDIRECT_KLMS; +- mrin.attr.exp_access_flags = UCT_IB_MEM_ACCESS_FLAGS; +- mrin.attr.max_klm_list_size = 1; ++ mrin.pd = md->pd; ++ wr.exp_opcode = IBV_EXP_WR_UMR_FILL; ++ wr.exp_send_flags = IBV_EXP_SEND_SIGNALED; ++ wr.ext_op.umr.exp_access = UCT_IB_MEM_ACCESS_FLAGS; ++ ++ reg_length = UCT_IB_MD_MAX_MR_SIZE; ++#ifdef HAVE_EXP_UMR_KSM ++ if ((md->dev.dev_attr.comp_mask & IBV_EXP_DEVICE_ATTR_COMP_MASK_2) && ++ (md->dev.dev_attr.comp_mask_2 & IBV_EXP_DEVICE_ATTR_UMR_FIXED_SIZE_CAPS) && ++ (md->dev.dev_attr.exp_device_cap_flags & IBV_EXP_DEVICE_UMR_FIXED_SIZE)) ++ { ++ reg_length = md->dev.dev_attr.umr_fixed_size_caps.max_entity_size; ++ list_size = ucs_div_round_up(mr->length, reg_length); ++ } else if (mr->length < reg_length) { ++ list_size = 1; ++ } else { ++ status = UCS_ERR_UNSUPPORTED; ++ goto err; ++ } ++ ++ if (list_size > 1) { ++ mrin.attr.create_flags = IBV_EXP_MR_FIXED_BUFFER_SIZE; ++ wr.ext_op.umr.umr_type = IBV_EXP_UMR_MR_LIST_FIXED_SIZE; ++ } else { ++ mrin.attr.create_flags = IBV_EXP_MR_INDIRECT_KLMS; ++ wr.ext_op.umr.umr_type = IBV_EXP_UMR_MR_LIST; ++ } + #else +- mrin.attr.create_flags = IBV_MR_NONCONTIG_MEM; +- mrin.attr.access_flags = UCT_IB_MEM_ACCESS_FLAGS; +- mrin.attr.max_reg_descriptors = 1; ++ if (mr->length >= reg_length) { ++ status = UCS_ERR_UNSUPPORTED; ++ goto err; ++ } ++ ++ list_size = 1; ++ mrin.attr.create_flags = IBV_EXP_MR_INDIRECT_KLMS; ++ wr.ext_op.umr.umr_type = IBV_EXP_UMR_MR_LIST; + #endif + ++ mrin.attr.exp_access_flags = UCT_IB_MEM_ACCESS_FLAGS; ++ mrin.attr.max_klm_list_size = list_size; ++ mem_reg = ucs_calloc(list_size, sizeof(mem_reg[0]), "mem_reg"); ++ if (!mem_reg) { ++ status = UCS_ERR_NO_MEMORY; ++ goto err; ++ } ++ + umr = ibv_exp_create_mr(&mrin); + if (!umr) { + ucs_error("Failed to create modified_mr: %m"); +@@ -375,44 +478,50 @@ static ucs_status_t uct_ib_md_post_umr(uct_ib_md_t *md, struct ibv_mr *mr, + goto err; + } + +- /* Fill memory list and UMR */ +- memset(&wr, 0, sizeof(wr)); +- memset(&mem_reg, 0, sizeof(mem_reg)); +- +- mem_reg.base_addr = (uintptr_t) mr->addr; +- mem_reg.length = mr->length; +- +-#ifdef HAVE_EXP_UMR_NEW_API +- mem_reg.mr = mr; +- wr.ext_op.umr.umr_type = IBV_EXP_UMR_MR_LIST; +- wr.ext_op.umr.mem_list.mem_reg_list = &mem_reg; +- wr.ext_op.umr.exp_access = UCT_IB_MEM_ACCESS_FLAGS; +- wr.ext_op.umr.modified_mr = umr; +- wr.ext_op.umr.base_addr = (uint64_t) (uintptr_t) mr->addr + offset; +- wr.ext_op.umr.num_mrs = 1; +- ucs_trace_data("UMR_FILL qp 0x%x lkey 0x%x base 0x%lx [addr %lx len %zu lkey 0x%x]", +- md->umr_qp->qp_num, wr.ext_op.umr.modified_mr->lkey, +- wr.ext_op.umr.base_addr, mem_reg.base_addr, mem_reg.length, +- mem_reg.mr->lkey); +-#else +- mem_reg.m_key = mr; +- wr.ext_op.umr.memory_key.mkey_type = IBV_EXP_UMR_MEM_LAYOUT_NONCONTIG; +- wr.ext_op.umr.memory_key.mem_list.mem_reg_list = &mem_reg; +- wr.ext_op.umr.memory_key.access = UCT_IB_MEM_ACCESS_FLAGS; +- wr.ext_op.umr.memory_key.modified_mr = umr; +- wr.ext_op.umr.memory_key.region_base_addr = mr->addr + offset; +- wr.num_sge = 1; +-#endif ++ for (i = 0; i < list_size; i++) { ++ mem_reg[i].base_addr = (uintptr_t) mr->addr + i * reg_length; ++ mem_reg[i].length = reg_length; ++ mem_reg[i].mr = mr; ++ } ++ ++ ucs_assert(list_size >= 1); ++ mem_reg[list_size - 1].length = mr->length % reg_length; ++ wr.ext_op.umr.mem_list.mem_reg_list = mem_reg; ++ wr.ext_op.umr.base_addr = (uint64_t) (uintptr_t) mr->addr + offset; ++ wr.ext_op.umr.num_mrs = list_size; ++ wr.ext_op.umr.modified_mr = umr; ++ ++ /* If the list exceeds max inline size, allocate a container object */ ++ if (list_size > md->config.max_inline_klm_list) { ++ struct ibv_exp_mkey_list_container_attr in = { ++ .pd = md->pd, ++ .mkey_list_type = IBV_EXP_MKEY_LIST_TYPE_INDIRECT_MR, ++ .max_klm_list_size = list_size ++ }; ++ ++ wr.ext_op.umr.memory_objects = ibv_exp_alloc_mkey_list_memory(&in); ++ if (wr.ext_op.umr.memory_objects == NULL) { ++ ucs_error("ibv_exp_alloc_mkey_list_memory(list_size=%d) failed: %m", ++ list_size); ++ status = UCS_ERR_IO_ERROR; ++ goto err_free_umr; ++ } ++ } else { ++ wr.ext_op.umr.memory_objects = NULL; ++ wr.exp_send_flags |= IBV_EXP_SEND_INLINE; ++ } + +- wr.exp_opcode = IBV_EXP_WR_UMR_FILL; +- wr.exp_send_flags = IBV_EXP_SEND_INLINE | IBV_EXP_SEND_SIGNALED; ++ ucs_trace_data("UMR_FILL qp 0x%x lkey 0x%x base 0x%lx [addr %lx len %zu lkey 0x%x] list_size %d", ++ md->umr_qp->qp_num, wr.ext_op.umr.modified_mr->lkey, ++ wr.ext_op.umr.base_addr, mem_reg[0].base_addr, ++ mem_reg[0].length, mem_reg[0].mr->lkey, list_size); + + /* Post UMR */ + ret = ibv_exp_post_send(md->umr_qp, &wr, &bad_wr); + if (ret) { + ucs_error("ibv_exp_post_send(UMR_FILL) failed: %m"); + status = UCS_ERR_IO_ERROR; +- goto err_free_umr; ++ goto err_free_klm_container; + } + + /* Wait for send UMR completion */ +@@ -421,29 +530,39 @@ static ucs_status_t uct_ib_md_post_umr(uct_ib_md_t *md, struct ibv_mr *mr, + if (ret < 0) { + ucs_error("ibv_exp_poll_cq(umr_cq) failed: %m"); + status = UCS_ERR_IO_ERROR; +- goto err_free_umr; ++ goto err_free_klm_container; + } + if (ret == 1) { + if (wc.status != IBV_WC_SUCCESS) { + ucs_error("UMR_FILL completed with error: %s vendor_err %d", + ibv_wc_status_str(wc.status), wc.vendor_err); + status = UCS_ERR_IO_ERROR; +- goto err_free_umr; ++ goto err_free_klm_container; + } + break; + } + } + +- ucs_trace("UMR registered memory %p..%p offset 0x%lx on %s lkey 0x%x rkey 0x%x", ++ if (wr.ext_op.umr.memory_objects != NULL) { ++ ibv_exp_dealloc_mkey_list_memory(wr.ext_op.umr.memory_objects); ++ } ++ ++ ucs_debug("UMR registered memory %p..%p offset 0x%lx on %s lkey 0x%x rkey 0x%x", + mr->addr, mr->addr + mr->length, offset, uct_ib_device_name(&md->dev), + umr->lkey, umr->rkey); + *umr_p = umr; + ++ ucs_free(mem_reg); + return UCS_OK; + ++err_free_klm_container: ++ if (wr.ext_op.umr.memory_objects != NULL) { ++ ibv_exp_dealloc_mkey_list_memory(wr.ext_op.umr.memory_objects); ++ } + err_free_umr: + UCS_PROFILE_CALL(ibv_dereg_mr, umr); + err: ++ ucs_free(mem_reg); + return status; + #else + return UCS_ERR_UNSUPPORTED; +@@ -639,7 +758,7 @@ static void uct_ib_mem_init(uct_ib_mem_t *memh, unsigned uct_flags, + + static ucs_status_t uct_ib_mem_alloc(uct_md_h uct_md, size_t *length_p, + void **address_p, unsigned flags, +- uct_mem_h *memh_p UCS_MEMTRACK_ARG) ++ const char *alloc_name, uct_mem_h *memh_p) + { + #if HAVE_DECL_IBV_EXP_ACCESS_ALLOCATE_MR + uct_ib_md_t *md = ucs_derived_of(uct_md, uct_ib_md_t); +@@ -658,7 +777,7 @@ static ucs_status_t uct_ib_mem_alloc(uct_md_h uct_md, size_t *length_p, + goto err; + } + +- length = ucs_memtrack_adjust_alloc_size(*length_p); ++ length = *length_p; + exp_access = uct_ib_md_access_flags(md, flags, length) | + IBV_EXP_ACCESS_ALLOCATE_MR; + status = uct_ib_md_reg_mr(md, NULL, length, exp_access, 0, &memh->mr); +@@ -678,10 +797,11 @@ static ucs_status_t uct_ib_mem_alloc(uct_md_h uct_md, size_t *length_p, + } + + UCS_STATS_UPDATE_COUNTER(md->stats, UCT_IB_MD_STAT_MEM_ALLOC, +1); ++ ucs_memtrack_allocated(memh->mr->addr, memh->mr->length UCS_MEMTRACK_VAL); ++ + *address_p = memh->mr->addr; + *length_p = memh->mr->length; + *memh_p = memh; +- ucs_memtrack_allocated(address_p, length_p UCS_MEMTRACK_VAL); + return UCS_OK; + + err_free_memh: +@@ -698,7 +818,7 @@ static ucs_status_t uct_ib_mem_free(uct_md_h md, uct_mem_h memh) + uct_ib_mem_t *ib_memh = memh; + ucs_status_t status; + +- ucs_memtrack_releasing_adjusted(ib_memh->mr->addr); ++ ucs_memtrack_releasing(ib_memh->mr->addr); + + status = UCS_PROFILE_CALL(uct_ib_memh_dereg, memh); + if (status != UCS_OK) { +@@ -841,8 +961,6 @@ static ucs_status_t uct_ib_rkey_unpack(uct_md_component_t *mdc, + return UCS_OK; + } + +-static void uct_ib_md_close(uct_md_h md); +- + static uct_md_ops_t uct_ib_md_ops = { + .close = uct_ib_md_close, + .query = uct_ib_md_query, +@@ -910,16 +1028,19 @@ static uct_md_ops_t uct_ib_md_rcache_ops = { + }; + + static ucs_status_t uct_ib_rcache_mem_reg_cb(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *rregion) ++ void *arg, ucs_rcache_region_t *rregion, ++ uint16_t rcache_mem_reg_flags) + { + uct_ib_rcache_region_t *region = ucs_derived_of(rregion, uct_ib_rcache_region_t); + uct_ib_md_t *md = context; +- int *flags = arg; ++ int *flags = arg; ++ int silent = (rcache_mem_reg_flags & UCS_RCACHE_MEM_REG_HIDE_ERRORS) || ++ (*flags & UCT_MD_MEM_FLAG_HIDE_ERRORS); + ucs_status_t status; + + status = uct_ib_mem_reg_internal(&md->super, (void*)region->super.super.start, + region->super.super.end - region->super.super.start, +- *flags, 1, ®ion->memh); ++ *flags, silent, ®ion->memh); + if (status != UCS_OK) { + return status; + } +@@ -1012,10 +1133,10 @@ static uct_md_ops_t UCS_V_UNUSED uct_ib_md_global_odp_ops = { + .is_mem_type_owned = (void*)ucs_empty_function_return_zero, + }; + +-static void uct_ib_make_md_name(char md_name[UCT_MD_NAME_MAX], struct ibv_device *device) ++void uct_ib_make_md_name(char md_name[UCT_MD_NAME_MAX], struct ibv_device *device) + { +- snprintf(md_name, UCT_MD_NAME_MAX, "%s/", UCT_IB_MD_PREFIX); +- strncat(md_name, device->name, UCT_MD_NAME_MAX - strlen(device->name) - 1); ++ snprintf(md_name, UCT_MD_NAME_MAX, "%s/%s", UCT_IB_MD_PREFIX, ++ ibv_get_device_name(device)); + } + + static ucs_status_t uct_ib_query_md_resources(uct_md_resource_desc_t **resources_p, +@@ -1086,7 +1207,8 @@ static void uct_ib_md_release_device_config(uct_ib_md_t *md) + } + + static ucs_status_t +-uct_ib_md_parse_reg_methods(uct_ib_md_t *md, const uct_ib_md_config_t *md_config) ++uct_ib_md_parse_reg_methods(uct_ib_md_t *md, uct_md_attr_t *md_attr, ++ const uct_ib_md_config_t *md_config) + { + ucs_rcache_params_t rcache_params; + ucs_status_t status; +@@ -1097,6 +1219,10 @@ uct_ib_md_parse_reg_methods(uct_ib_md_t *md, const uct_ib_md_config_t *md_config + rcache_params.region_struct_size = sizeof(uct_ib_rcache_region_t); + rcache_params.alignment = md_config->rcache.alignment; + rcache_params.max_alignment = ucs_get_page_size(); ++ rcache_params.ucm_events = UCM_EVENT_VM_UNMAPPED; ++ if (md_attr->cap.reg_mem_types & ~UCS_BIT(UCT_MD_MEM_TYPE_HOST)) { ++ rcache_params.ucm_events |= UCM_EVENT_MEM_TYPE_FREE; ++ } + rcache_params.ucm_event_priority = md_config->rcache.event_prio; + rcache_params.context = md; + rcache_params.ops = &uct_ib_rcache_ops; +@@ -1234,6 +1360,29 @@ static void uct_ib_md_release_reg_method(uct_ib_md_t *md) + } + + static ucs_status_t ++uct_ib_md_parse_subnet_prefix(const char *subnet_prefix_str, ++ uint64_t *subnet_prefix) ++{ ++ uint16_t pfx[4] = {0}; ++ uint64_t pfx64 = 0; ++ int res, i; ++ ++ res = sscanf(subnet_prefix_str, "%hx:%hx:%hx:%hx", ++ &pfx[0], &pfx[1], &pfx[2], &pfx[3]); ++ if (res != 4) { ++ ucs_error("subnet filter '%s' is invalid", subnet_prefix_str); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ for (i = 0; i < 4; i++) { ++ pfx64 = pfx[i] + (pfx64 << 16); ++ } ++ ++ *subnet_prefix = htobe64(pfx64); ++ return UCS_OK; ++} ++ ++ucs_status_t + uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md_h *md_p) + { + const uct_ib_md_config_t *md_config = ucs_derived_of(uct_md_config, uct_ib_md_config_t); +@@ -1242,6 +1391,9 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + ucs_status_t status; + int i, num_devices, ret; + uct_ib_md_t *md; ++ uct_md_attr_t md_attr; ++ ++ ucs_trace("opening IB device %s", md_name); + + /* Get device list from driver */ + ib_device_list = ibv_get_device_list(&num_devices); +@@ -1260,6 +1412,7 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + } + } + if (ib_device == NULL) { ++ ucs_debug("IB device %s not found", md_name); + status = UCS_ERR_NO_DEVICE; + goto out_free_dev_list; + } +@@ -1270,6 +1423,7 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + goto out_free_dev_list; + } + ++ md->super.ops = &uct_ib_md_ops; + md->super.component = &uct_ib_mdc; + md->config = md_config->ext; + +@@ -1313,6 +1467,17 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + md->config.odp.max_size = uct_ib_device_odp_max_size(&md->dev); + } + ++ if (strlen(md_config->subnet_prefix) > 0) { ++ status = uct_ib_md_parse_subnet_prefix(md_config->subnet_prefix, ++ &md->subnet_filter); ++ ++ if (status != UCS_OK) { ++ goto err_cleanup_device; ++ } ++ ++ md->check_subnet_filter = 1; ++ } ++ + /* Allocate memory domain */ + md->pd = ibv_alloc_pd(md->dev.ibv_context); + if (md->pd == NULL) { +@@ -1329,7 +1494,12 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + goto err_dealloc_pd; + } + +- status = uct_ib_md_parse_reg_methods(md, md_config); ++ status = uct_md_query(&md->super, &md_attr); ++ if (status != UCS_OK) { ++ goto err_destroy_umr_qp; ++ } ++ ++ status = uct_ib_md_parse_reg_methods(md, &md_attr, md_config); + if (status != UCS_OK) { + goto err_destroy_umr_qp; + } +@@ -1339,6 +1509,11 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + goto err_release_reg_method; + } + ++ md->dev.max_zcopy_log_sge = INT_MAX; ++ if (md_attr.cap.reg_mem_types & ~UCS_BIT(UCT_MD_MEM_TYPE_HOST)) { ++ md->dev.max_zcopy_log_sge = 1; ++ } ++ + *md_p = &md->super; + status = UCS_OK; + +@@ -1362,13 +1537,14 @@ err_free_md: + goto out_free_dev_list; + } + +-static void uct_ib_md_close(uct_md_h uct_md) ++void uct_ib_md_close(uct_md_h uct_md) + { + uct_ib_md_t *md = ucs_derived_of(uct_md, uct_ib_md_t); + + uct_ib_md_release_device_config(md); + uct_ib_md_release_reg_method(md); + uct_ib_md_umr_qp_destroy(md); ++ uct_ib_device_cleanup_ah_cached(&md->dev); + ibv_dealloc_pd(md->pd); + uct_ib_device_cleanup(&md->dev); + UCS_STATS_NODE_FREE(md->stats); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.h +index 2e3148b..bc23f30 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.h +@@ -16,9 +16,10 @@ + #include + #include + +- ++#define UCT_IB_MD_MAX_MR_SIZE 0x80000000UL + #define UCT_IB_MD_PACKED_RKEY_SIZE sizeof(uint64_t) + ++#define UCT_IB_MD_DEFAULT_GID_INDEX 0 /**< The gid index used by default for an IB/RoCE port */ + + /** + * IB MD statistics counters +@@ -47,6 +48,11 @@ typedef struct uct_ib_md_ext_config { + int prefer_nearest_device; /**< Give priority for near + device */ + int enable_contig_pages; /** Enable contiguous pages */ ++ int enable_indirect_atomic; /** Enable indirect atomic */ ++ int enable_gpudirect_rdma; /** Enable GPUDirect RDMA */ ++#if HAVE_EXP_UMR ++ unsigned max_inline_klm_list; /* Maximal length of inline KLM list */ ++#endif + + struct { + ucs_numa_policy_t numa_policy; /**< NUMA policy flags for ODP */ +@@ -55,6 +61,7 @@ typedef struct uct_ib_md_ext_config { + size_t max_size; /**< Maximal memory region size for ODP */ + } odp; + ++ size_t gid_index; /**< IB GID index to use */ + } uct_ib_md_ext_config_t; + + +@@ -84,6 +91,8 @@ typedef struct uct_ib_md { + uct_ib_device_spec_t *specs; /* Custom device specifications */ + unsigned count; /* Number of custom devices */ + } custom_devices; ++ int check_subnet_filter; ++ uint64_t subnet_filter; + } uct_ib_md_t; + + +@@ -106,6 +115,7 @@ typedef struct uct_ib_md_config { + + UCS_CONFIG_STRING_ARRAY_FIELD(spec) custom_devices; /**< Custom device specifications */ + ++ char *subnet_prefix; /**< Filter of subnet_prefix for IB ports */ + } uct_ib_md_config_t; + + +@@ -172,4 +182,12 @@ static inline uint16_t uct_ib_md_atomic_offset(uint8_t atomic_mr_id) + return 8 * atomic_mr_id; + } + ++ ++void uct_ib_make_md_name(char md_name[UCT_MD_NAME_MAX], struct ibv_device *device); ++ ++ucs_status_t ++uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md_h *md_p); ++ ++void uct_ib_md_close(uct_md_h uct_md); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_verbs.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_verbs.h +index 449f3db..b56d180 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_verbs.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_verbs.h +@@ -60,7 +60,14 @@ + + #else + # define IBV_SHARED_MR_ACCESS_FLAGS(_shared_mr) ((_shared_mr)->access) ++#if HAVE_DECL_IBV_EXP_DEVICE_ATTR_RESERVED_2 ++# define IBV_EXP_DEVICE_ATTR_SET_COMP_MASK(_attr) do { \ ++ (_attr)->comp_mask = 0xffffffff; \ ++ (_attr)->comp_mask_2 = (IBV_EXP_DEVICE_ATTR_RESERVED_2 - 1); \ ++ } while (0) ++#else + # define IBV_EXP_DEVICE_ATTR_SET_COMP_MASK(_attr) (_attr)->comp_mask = (IBV_EXP_DEVICE_ATTR_RESERVED - 1) ++#endif /* HAVE_DECL_IBV_EXP_DEVICE_ATTR_RESERVED_2 */ + # define IBV_EXP_PORT_ATTR_SET_COMP_MASK(_attr) (_attr)->comp_mask = 0 + #endif /* HAVE_VERBS_EXP_H */ + +@@ -97,12 +104,7 @@ + /* + * DC support + */ +-#if HAVE_DECL_IBV_EXP_DEVICE_DC_TRANSPORT && HAVE_STRUCT_IBV_EXP_DEVICE_ATTR_EXP_DEVICE_CAP_FLAGS +-# define IBV_DEVICE_HAS_DC(_attr) ((_attr)->exp_device_cap_flags & IBV_EXP_DEVICE_DC_TRANSPORT) +-#else +-# define IBV_DEVICE_HAS_DC(_attr) 0 +-#endif /* HAVE_DECL_IBV_EXP_DEVICE_DC_TRANSPORT */ +- ++#define IBV_DEVICE_HAS_DC(dev) (dev->flags & UCT_IB_DEVICE_FLAG_DC) + + /* + * NOP support +@@ -142,11 +144,13 @@ + #if HAVE_DECL_IBV_EXP_CQ_IGNORE_OVERRUN + static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) + { +- struct ibv_exp_cq_attr cq_attr = {0}; ++ struct ibv_exp_cq_attr cq_attr = {}; + cq_attr.comp_mask = IBV_EXP_CQ_ATTR_CQ_CAP_FLAGS; + cq_attr.cq_cap_flags = IBV_EXP_CQ_IGNORE_OVERRUN; + return ibv_exp_modify_cq(cq, &cq_attr, IBV_EXP_CQ_CAP_FLAGS); + } ++#elif HAVE_DECL_IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN ++static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) { return 0; } + #else + static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) + { +@@ -204,8 +208,6 @@ static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) + # define ibv_exp_create_srq_attr ibv_srq_init_attr + #endif + +- +- + typedef uint8_t uct_ib_uint24_t[3]; + + static inline void uct_ib_pack_uint24(uct_ib_uint24_t buf, const uint32_t qp_num) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm.h +index bfd8855..6783ac6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm.h +@@ -50,6 +50,7 @@ typedef struct uct_cm_iface { + struct ib_cm_id *listen_id; /* Listening "socket" */ + ucs_queue_head_t notify_q; /* Notification queue */ + uint32_t num_outstanding; /* Number of outstanding sends */ ++ uint32_t num_completions; /* Number of completed sends */ + ucs_queue_head_t outstanding_q; /* Outstanding operations queue */ + uct_worker_cb_id_t slow_prog_id; /* Callback id for slowpath progress */ + +@@ -67,7 +68,6 @@ typedef struct uct_cm_iface { + typedef struct uct_cm_ep { + uct_base_ep_t super; + uint16_t dlid; +- uint8_t is_global; + uint32_t dest_service_id; + union ibv_gid dgid; + } uct_cm_ep_t; +@@ -104,7 +104,8 @@ ucs_status_t uct_cm_iface_flush_do(uct_cm_iface_t *iface, uct_completion_t *comp + ssize_t uct_cm_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, uct_pack_callback_t pack_cb, + void *arg, unsigned flags); + +-ucs_status_t uct_cm_ep_pending_add(uct_ep_h ep, uct_pending_req_t *req); ++ucs_status_t uct_cm_ep_pending_add(uct_ep_h ep, uct_pending_req_t *req, ++ unsigned flags); + void uct_cm_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, + void *arg); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_ep.c +index 16a389f..63fb7c5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_ep.c +@@ -30,7 +30,7 @@ static UCS_CLASS_INIT_FUNC(uct_cm_ep_t, uct_iface_t *tl_iface, + UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &iface->super.super); + + uct_ib_address_unpack((const uct_ib_address_t*)dev_addr, &self->dlid, +- &self->is_global, &self->dgid); ++ &self->dgid); + self->dest_service_id = *(const uint32_t*)iface_addr; + return UCS_OK; + } +@@ -54,9 +54,10 @@ static ucs_status_t uct_cm_ep_fill_path_rec(uct_cm_ep_t *ep, + path->sgid = iface->super.gid; + path->dlid = htons(ep->dlid); + path->slid = htons(uct_ib_iface_port_attr(&iface->super)->lid); +- if (ep->is_global) { ++ if (iface->super.is_global_addr) { ++ ucs_assert_always(ep->dgid.global.interface_id != 0); + path->dgid = ep->dgid; +- path->hop_limit = 64; ++ path->hop_limit = iface->super.config.hop_limit; + } else { + memset(&path->dgid, 0, sizeof(path->dgid)); + path->hop_limit = 0; +@@ -198,7 +199,8 @@ err: + return status; + } + +-ucs_status_t uct_cm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req) ++ucs_status_t uct_cm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req, ++ unsigned flags) + { + uct_cm_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_cm_iface_t); + uct_cm_ep_t *ep = ucs_derived_of(tl_ep, uct_cm_ep_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_iface.c +index ad2a914..3d1b81c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_iface.c +@@ -56,6 +56,10 @@ static unsigned uct_cm_iface_progress(void *arg) + ++count; + } + ++ /* we are in the progress() context. Now it is safe to release resources. */ ++ iface->num_outstanding -= iface->num_completions; ++ iface->num_completions = 0; ++ + /* Dispatch pending operations */ + uct_pending_queue_dispatch(priv, &iface->notify_q, + iface->num_outstanding < iface->config.max_outstanding); +@@ -154,7 +158,19 @@ static void uct_cm_iface_outstanding_remove(uct_cm_iface_t* iface, + ucs_queue_for_each_safe(op, iter, &iface->outstanding_q, queue) { + if (op->is_id && (op->id == id)) { + ucs_queue_del_iter(&iface->outstanding_q, iter); +- --iface->num_outstanding; ++ /* Must not release resources from the async context ++ * because it will break pending op ordering. ++ * For example bcopy() may succeed while there are queued ++ * pending ops: ++ * bcopy() -> no resources ++ * pending_add() -> ok ++ * <-- async event: resources available ++ * bcopy() --> ok. oops this is out of order send ++ * ++ * save the number and do actual release in the ++ * progress() context. ++ */ ++ ++iface->num_completions; + ucs_free(op); + return; + } +@@ -255,17 +271,20 @@ static UCS_CLASS_INIT_FUNC(uct_cm_iface_t, uct_md_h md, uct_worker_h worker, + const uct_iface_config_t *tl_config) + { + uct_cm_iface_config_t *config = ucs_derived_of(tl_config, uct_cm_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + int ret; + + ucs_trace_func(""); + ++ init_attr.tx_cq_len = 1; ++ init_attr.rx_cq_len = config->super.rx.queue_len; ++ init_attr.seg_size = ucs_min(IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE, ++ config->super.super.max_bcopy); ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_ib_iface_t, &uct_cm_iface_ops, md, worker, +- params, 0 /* rx_priv_len */, 0 /* rx_hdr_len */, +- 1 /* tx_cq_len */, +- config->super.rx.queue_len /* rx_cq_len */, +- IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE, /* mss */ +- &config->super); ++ params, &config->super, &init_attr); + + if (self->super.super.worker->async == NULL) { + ucs_error("cm must have async!=NULL"); +@@ -273,6 +292,7 @@ static UCS_CLASS_INIT_FUNC(uct_cm_iface_t, uct_md_h md, uct_worker_h worker, + } + + self->num_outstanding = 0; ++ self->num_completions = 0; + self->service_id = 0; + self->config.timeout_ms = (int)(config->timeout * 1e3 + 0.5); + self->config.max_outstanding = config->max_outstanding; +@@ -432,8 +452,7 @@ static uct_ib_iface_ops_t uct_cm_iface_ops = { + .iface_get_address = uct_cm_iface_get_address, + .iface_is_reachable = uct_ib_iface_is_reachable + }, +- .arm_tx_cq = (void*)ucs_empty_function_return_success, +- .arm_rx_cq = (void*)ucs_empty_function_return_success ++ .arm_cq = (void*)ucs_empty_function_return_success, + }; + + static ucs_status_t uct_cm_query_resources(uct_md_h md, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.c +index 0b25d4f..d763b97 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.c +@@ -26,6 +26,10 @@ static ucs_config_field_t uct_dc_mlx5_iface_config_table[] = { + ucs_offsetof(uct_dc_mlx5_iface_config_t, ud_common), + UCS_CONFIG_TYPE_TABLE(uct_ud_mlx5_iface_common_config_table)}, + ++ {"", "", NULL, ++ ucs_offsetof(uct_dc_mlx5_iface_config_t, mlx5_common), ++ UCS_CONFIG_TYPE_TABLE(uct_ib_mlx5_iface_config_table)}, ++ + {NULL} + }; + +@@ -35,16 +39,30 @@ static UCS_CLASS_CLEANUP_FUNC(uct_dc_mlx5_ep_t) + ucs_trace_func(""); + } + ++static void uct_dc_mlx5_iface_set_av_sport(uct_dc_mlx5_iface_t *iface, ++ uct_ib_mlx5_base_av_t *av, ++ uint32_t remote_dctn) ++{ ++ uct_ib_mlx5_iface_set_av_sport(&iface->super.super.super, av, ++ remote_dctn ^ uct_dc_get_dct_num(&iface->super)); ++} ++ + static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_ep_t, uct_dc_mlx5_iface_t *dc_iface, + const uct_dc_iface_addr_t *if_addr, + const uct_ib_mlx5_base_av_t *av) + { ++ uint32_t remote_dctn; ++ + ucs_trace_func(""); + + UCS_CLASS_CALL_SUPER_INIT(uct_dc_ep_t, &dc_iface->super, if_addr); + ++ remote_dctn = uct_ib_unpack_uint24(if_addr->qp_num); ++ + memcpy(&self->av, av, sizeof(*av)); +- self->av.dqp_dct |= htonl(uct_ib_unpack_uint24(if_addr->qp_num)); ++ self->av.dqp_dct |= htonl(remote_dctn); ++ uct_dc_mlx5_iface_set_av_sport(dc_iface, &self->av, remote_dctn); ++ + return UCS_OK; + } + +@@ -116,18 +134,30 @@ static void uct_dc_mlx5_ep_destroy(uct_ep_h tl_ep) + static ucs_status_t uct_dc_mlx5_iface_query(uct_iface_h tl_iface, uct_iface_attr_t *iface_attr) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_iface, uct_dc_mlx5_iface_t); ++ size_t max_am_inline = UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE); ++ size_t max_put_inline = UCT_IB_MLX5_PUT_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE); + ucs_status_t status; + ++#if HAVE_IBV_EXP_DM ++ if (iface->mlx5_common.dm.dm != NULL) { ++ max_am_inline = ucs_max(iface->mlx5_common.dm.dm->seg_len, ++ UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)); ++ max_put_inline = ucs_max(iface->mlx5_common.dm.dm->seg_len, ++ UCT_IB_MLX5_PUT_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)); ++ } ++#endif ++ + status = uct_dc_iface_query(&iface->super, iface_attr, +- UCT_IB_MLX5_PUT_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE), +- UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE), ++ max_put_inline, ++ max_am_inline, + UCT_IB_MLX5_AM_ZCOPY_MAX_HDR(UCT_IB_MLX5_AV_FULL_SIZE), +- UCT_IB_MLX5_AM_ZCOPY_MAX_IOV); ++ UCT_IB_MLX5_AM_ZCOPY_MAX_IOV, ++ UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(UCT_IB_MLX5_AV_FULL_SIZE)); + if (status != UCS_OK) { + return status; + } + +- uct_rc_mlx5_iface_common_query(iface_attr); ++ uct_rc_mlx5_iface_common_query(&iface->super.super.super, iface_attr); + return UCS_OK; + } + +@@ -148,19 +178,21 @@ uct_dc_mlx5_iface_bcopy_post(uct_dc_mlx5_iface_t *iface, uct_dc_mlx5_ep_t *ep, + unsigned opcode, unsigned length, + /* RDMA */ uint64_t rdma_raddr, uct_rkey_t rdma_rkey, + uct_rc_iface_send_desc_t *desc, uint8_t send_flags, +- uint32_t imm_val_be) ++ uint32_t imm_val_be, const void *buffer, ++ uct_ib_log_sge_t *log_sge) + { + UCT_DC_MLX5_TXQP_DECL(txqp, txwq); + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + desc->super.sn = txwq->sw_pi; +- uct_rc_mlx5_txqp_dptr_post(&iface->super.super, IBV_EXP_QPT_DC_INI, txqp, txwq, +- opcode, desc + 1, length, &desc->lkey, ++ uct_rc_mlx5_txqp_dptr_post(&iface->super.super, UCT_IB_QPT_DCI, txqp, txwq, ++ opcode, buffer, length, &desc->lkey, + rdma_raddr, uct_ib_md_direct_rkey(rdma_rkey), +- 0, 0, 0, ++ 0, 0, 0, 0, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), +- MLX5_WQE_CTRL_CQ_UPDATE | send_flags, imm_val_be); ++ MLX5_WQE_CTRL_CQ_UPDATE | send_flags, imm_val_be, INT_MAX, ++ log_sge); + uct_rc_txqp_add_send_op(txqp, &desc->super); + } + +@@ -179,14 +211,15 @@ uct_dc_mlx5_iface_zcopy_post(uct_dc_mlx5_iface_t *iface, uct_dc_mlx5_ep_t *ep, + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + + sn = txwq->sw_pi; +- uct_rc_mlx5_txqp_dptr_post_iov(&iface->super.super, IBV_EXP_QPT_DC_INI, txqp, ++ uct_rc_mlx5_txqp_dptr_post_iov(&iface->super.super, UCT_IB_QPT_DCI, txqp, + txwq, opcode, iov, iovcnt, + am_id, am_hdr, am_hdr_len, + rdma_raddr, uct_ib_md_direct_rkey(rdma_rkey), + tag, app_ctx, ib_imm_be, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), +- MLX5_WQE_CTRL_CQ_UPDATE | send_flags); ++ MLX5_WQE_CTRL_CQ_UPDATE | send_flags, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + + uct_rc_txqp_add_send_comp(&iface->super.super, txqp, comp, sn); + } +@@ -195,7 +228,8 @@ static UCS_F_ALWAYS_INLINE void + uct_dc_mlx5_iface_atomic_post(uct_dc_mlx5_iface_t *iface, uct_dc_mlx5_ep_t *ep, + unsigned opcode, uct_rc_iface_send_desc_t *desc, unsigned length, + uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t compare_mask, uint64_t compare, uint64_t swap_add) ++ uint64_t compare_mask, uint64_t compare, ++ uint64_t swap_mask, uint64_t swap_add) + { + uint32_t ib_rkey = uct_ib_resolve_atomic_rkey(rkey, ep->super.atomic_mr_offset, + &remote_addr); +@@ -204,138 +238,147 @@ uct_dc_mlx5_iface_atomic_post(uct_dc_mlx5_iface_t *iface, uct_dc_mlx5_ep_t *ep, + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + + desc->super.sn = txwq->sw_pi; +- uct_rc_mlx5_txqp_dptr_post(&iface->super.super, IBV_EXP_QPT_DC_INI, txqp, txwq, ++ uct_rc_mlx5_txqp_dptr_post(&iface->super.super, UCT_IB_QPT_DCI, txqp, txwq, + opcode, desc + 1, length, &desc->lkey, + remote_addr, ib_rkey, +- compare_mask, compare, swap_add, ++ compare_mask, compare, swap_mask, swap_add, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), +- MLX5_WQE_CTRL_CQ_UPDATE, 0); ++ MLX5_WQE_CTRL_CQ_UPDATE, 0, INT_MAX, NULL); + + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); + uct_rc_txqp_add_send_op(txqp, &desc->super); + } + +-static inline void uct_dc_mlx5_iface_add_send_comp(uct_dc_mlx5_iface_t *iface, +- uct_dc_mlx5_ep_t *ep, +- uct_completion_t *comp) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_atomic_op_post(uct_ep_h tl_ep, unsigned opcode, unsigned size, ++ uint64_t value, uint64_t remote_addr, uct_rkey_t rkey) + { +- UCT_DC_MLX5_TXQP_DECL(txqp, txwq); +- +- UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); +- uct_rc_txqp_add_send_comp(&iface->super.super, txqp, comp, txwq->sig_pi); +-} +- +-ucs_status_t uct_dc_mlx5_ep_atomic_add(uct_ep_h tl_ep, +- int opcode, unsigned length, +- uint64_t add, uint64_t remote_addr, uct_rkey_t rkey) +-{ +- + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); +- uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); + uct_rc_iface_send_desc_t *desc; ++ int op; ++ uint64_t compare_mask; ++ uint64_t compare; ++ uint64_t swap_mask; ++ uint64_t swap; ++ int ext; /* not used here */ ++ ucs_status_t status; + + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super.super, &iface->mlx5_common.tx.atomic_desc_mp, desc); +- uct_dc_mlx5_iface_atomic_post(iface, ep, opcode, desc, length, +- remote_addr, rkey, 0, 0, add); ++ UCT_RC_MLX5_CHECK_ATOMIC_OPS(opcode, size, UCT_RC_MLX5_ATOMIC_OPS); ++ ++ status = uct_rc_mlx5_iface_common_atomic_data(opcode, size, value, &op, &compare_mask, ++ &compare, &swap_mask, &swap, &ext); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->mlx5_common.tx.atomic_desc_mp, desc); ++ uct_dc_mlx5_iface_atomic_post(iface, ep, op, desc, size, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap); + return UCS_OK; + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +-uct_dc_mlx5_ep_atomic(uct_dc_mlx5_ep_t *ep, int opcode, void *result, int ext, +- unsigned length, uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t compare_mask, uint64_t compare, +- uint64_t swap_add, uct_completion_t *comp) ++uct_dc_mlx5_ep_atomic_fop(uct_dc_mlx5_ep_t *ep, int opcode, void *result, int ext, ++ unsigned length, uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t compare_mask, uint64_t compare, ++ uint64_t swap_mask, uint64_t swap_add, uct_completion_t *comp) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, uct_dc_mlx5_iface_t); + uct_rc_iface_send_desc_t *desc; + + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->mlx5_common.tx.atomic_desc_mp, desc, +- uct_rc_iface_atomic_handler(&iface->super.super, ext, length), +- result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super.super, &iface->mlx5_common.tx.atomic_desc_mp, ++ desc, uct_rc_iface_atomic_handler(&iface->super.super, ++ ext, length), ++ result, comp); + uct_dc_mlx5_iface_atomic_post(iface, ep, opcode, desc, length, remote_addr, rkey, +- compare_mask, compare, swap_add); ++ compare_mask, compare, swap_mask, swap_add); + return UCS_INPROGRESS; + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_atomic_fop_post(uct_ep_h tl_ep, unsigned opcode, unsigned size, ++ uint64_t value, void *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_dc_mlx5_ep_atomic_add(tl_ep, MLX5_OPCODE_ATOMIC_FA, sizeof(uint64_t), +- htobe64(add), remote_addr, rkey); +-} ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ int op; ++ uint64_t compare_mask; ++ uint64_t compare; ++ uint64_t swap_mask; ++ uint64_t swap; ++ int ext; ++ ucs_status_t status; + +-ucs_status_t uct_dc_mlx5_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_FA, result, 0, sizeof(uint64_t), +- remote_addr, rkey, 0, 0, htobe64(add), comp); +-} ++ UCT_RC_MLX5_CHECK_ATOMIC_OPS(opcode, size, UCT_RC_MLX5_ATOMIC_FOPS); + +-ucs_status_t uct_dc_mlx5_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint64_t), remote_addr, rkey, 0, 0, +- htobe64(swap), comp); ++ status = uct_rc_mlx5_iface_common_atomic_data(opcode, size, value, &op, &compare_mask, ++ &compare, &swap_mask, &swap, &ext); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ return uct_dc_mlx5_ep_atomic_fop(ep, op, result, ext, size, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap, comp); + } + + ucs_status_t uct_dc_mlx5_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp) + { +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_CS, result, 0, sizeof(uint64_t), +- remote_addr, rkey, 0, htobe64(compare), htobe64(swap), +- comp); ++ return uct_dc_mlx5_ep_atomic_fop(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), ++ MLX5_OPCODE_ATOMIC_CS, result, 0, sizeof(uint64_t), ++ remote_addr, rkey, 0, htobe64(compare), -1, ++ htobe64(swap), comp); ++} ++ ++ucs_status_t uct_dc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp) ++{ ++ return uct_dc_mlx5_ep_atomic_fop(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), ++ MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, ++ sizeof(uint32_t), remote_addr, rkey, UCS_MASK(32), ++ htonl(compare), -1, htonl(swap), comp); + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_dc_mlx5_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_dc_mlx5_ep_atomic_add(tl_ep, MLX5_OPCODE_ATOMIC_MASKED_FA, +- sizeof(uint32_t), htonl(add), remote_addr, +- rkey); ++ return uct_dc_mlx5_ep_atomic_op_post(ep, opcode, sizeof(value), value, remote_addr, rkey); + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_dc_mlx5_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_FA, result, 1, +- sizeof(uint32_t), remote_addr, rkey, 0, 0, +- htonl(add), comp); ++ return uct_dc_mlx5_ep_atomic_op_post(ep, opcode, sizeof(value), value, remote_addr, rkey); + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_dc_mlx5_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint32_t), remote_addr, rkey, 0, 0, +- htonl(swap), comp); ++ return uct_dc_mlx5_ep_atomic_fop_post(ep, opcode, sizeof(value), value, result, ++ remote_addr, rkey, comp); + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ucs_status_t uct_dc_mlx5_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ uct_completion_t *comp) + { +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint32_t), remote_addr, rkey, UCS_MASK(32), +- htonl(compare), htonl(swap), comp); ++ return uct_dc_mlx5_ep_atomic_fop_post(ep, opcode, sizeof(value), value, result, ++ remote_addr, rkey, comp); + } + +-ucs_status_t uct_dc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, +- const void *buffer, unsigned length) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_am_short_inline(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *buffer, unsigned length) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); + uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); +@@ -346,20 +389,86 @@ ucs_status_t uct_dc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + +- uct_rc_mlx5_txqp_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, + MLX5_OPCODE_SEND, + buffer, length, id, hdr, 0, + 0, 0, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), +- MLX5_WQE_CTRL_SOLICITED); ++ MLX5_WQE_CTRL_SOLICITED, INT_MAX); + + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); + return UCS_OK; + } + ++#if HAVE_IBV_EXP_DM ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_short_dm(uct_dc_mlx5_ep_t *ep, uct_rc_mlx5_dm_copy_data_t *cache, ++ size_t hdr_len, const void *payload, unsigned length, ++ unsigned opcode, uint8_t fm_ce_se, ++ uint64_t rdma_raddr, uct_rkey_t rdma_rkey) ++{ ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, uct_dc_mlx5_iface_t); ++ uct_rc_iface_send_desc_t *desc; ++ void *buffer; ++ ucs_status_t status; ++ uct_ib_log_sge_t log_sge; ++ ++ status = uct_rc_mlx5_common_dm_make_data(&iface->mlx5_common, &iface->super.super, ++ cache, hdr_len, payload, length, &desc, ++ &buffer, &log_sge); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ uct_dc_mlx5_iface_bcopy_post(iface, ep, opcode, ++ hdr_len + length, ++ rdma_raddr, rdma_rkey, ++ desc, fm_ce_se, 0, buffer, ++ log_sge.num_sge ? &log_sge : NULL); ++ return UCS_OK; ++} ++#endif ++ ++ucs_status_t uct_dc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *buffer, unsigned length) ++{ ++#if HAVE_IBV_EXP_DM ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ ucs_status_t status; ++ uct_rc_mlx5_dm_copy_data_t cache; ++ ++ if (ucs_likely((sizeof(uct_rc_am_short_hdr_t) + length <= ++ UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_dc_mlx5_ep_am_short_inline(tl_ep, id, hdr, buffer, length); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length + sizeof(uct_rc_am_short_hdr_t), 0, ++ iface->mlx5_common.dm.seg_len, "am_short"); ++ UCT_DC_CHECK_RES_AND_FC(&iface->super, &ep->super); ++ ++ uct_rc_am_hdr_fill(&cache.am_hdr.rc_hdr, id); ++ cache.am_hdr.am_hdr = hdr; ++ ++ status = uct_dc_mlx5_ep_short_dm(ep, &cache, sizeof(cache.am_hdr), buffer, length, ++ MLX5_OPCODE_SEND, ++ MLX5_WQE_CTRL_SOLICITED | MLX5_WQE_CTRL_CQ_UPDATE, ++ 0, 0); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(cache.am_hdr) + length); ++ UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); ++ return UCS_OK; ++#endif ++} ++ + ssize_t uct_dc_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + uct_pack_callback_t pack_cb, void *arg, + unsigned flags) +@@ -375,7 +484,7 @@ ssize_t uct_dc_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + + uct_dc_mlx5_iface_bcopy_post(iface, ep, MLX5_OPCODE_SEND, + sizeof(uct_rc_hdr_t) + length, 0, 0, desc, +- MLX5_WQE_CTRL_SOLICITED, 0); ++ MLX5_WQE_CTRL_SOLICITED, 0, desc + 1, NULL); + + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); +@@ -410,9 +519,10 @@ ucs_status_t uct_dc_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *hea + } + + +-ucs_status_t uct_dc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, +- unsigned length, uint64_t remote_addr, +- uct_rkey_t rkey) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_put_short_inline(uct_ep_h tl_ep, const void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); + uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); +@@ -422,19 +532,49 @@ ucs_status_t uct_dc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, + UCT_DC_CHECK_RES(&iface->super, &ep->super); + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); +- uct_rc_mlx5_txqp_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, + MLX5_OPCODE_RDMA_WRITE, + buffer, length, 0, 0, 0, + remote_addr, uct_ib_md_direct_rkey(rkey), + &ep->av, uct_dc_mlx5_ep_get_grh(ep), +- uct_ib_mlx5_wqe_av_size(&ep->av), 0); ++ uct_ib_mlx5_wqe_av_size(&ep->av), 0, INT_MAX); + + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); + + return UCS_OK; + } + ++ucs_status_t uct_dc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *payload, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) ++{ ++#if HAVE_IBV_EXP_DM ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ ucs_status_t status; ++ ++ if (ucs_likely((length <= UCT_IB_MLX5_PUT_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_dc_mlx5_ep_put_short_inline(tl_ep, payload, length, remote_addr, rkey); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length, 0, iface->mlx5_common.dm.seg_len, "put_short"); ++ UCT_DC_CHECK_RES(&iface->super, &ep->super); ++ status = uct_dc_mlx5_ep_short_dm(ep, NULL, 0, payload, length, ++ MLX5_OPCODE_RDMA_WRITE, ++ MLX5_WQE_CTRL_CQ_UPDATE, ++ remote_addr, rkey); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); ++ return UCS_OK; ++#endif ++} ++ + ssize_t uct_dc_mlx5_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + void *arg, uint64_t remote_addr, uct_rkey_t rkey) + { +@@ -447,7 +587,7 @@ ssize_t uct_dc_mlx5_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + UCT_RC_IFACE_GET_TX_PUT_BCOPY_DESC(&iface->super.super, &iface->super.super.tx.mp, + desc, pack_cb, arg, length); + uct_dc_mlx5_iface_bcopy_post(iface, ep, MLX5_OPCODE_RDMA_WRITE, length, +- remote_addr, rkey, desc, 0, 0); ++ remote_addr, rkey, desc, 0, 0, desc + 1, NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, BCOPY, length); + return length; + } +@@ -489,7 +629,7 @@ ucs_status_t uct_dc_mlx5_ep_get_bcopy(uct_ep_h tl_ep, + UCT_RC_IFACE_GET_TX_GET_BCOPY_DESC(&iface->super.super, &iface->super.super.tx.mp, + desc, unpack_cb, comp, arg, length); + uct_dc_mlx5_iface_bcopy_post(iface, ep, MLX5_OPCODE_RDMA_READ, length, +- remote_addr, rkey, desc, 0, 0); ++ remote_addr, rkey, desc, 0, 0, desc + 1, NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, GET, BCOPY, length); + return UCS_INPROGRESS; + } +@@ -521,8 +661,9 @@ ucs_status_t uct_dc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, + uct_dc_mlx5_iface_t); +- uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ uct_dc_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_ep_t); + ucs_status_t status; ++ UCT_DC_MLX5_TXQP_DECL(txqp, txwq); + + status = uct_dc_ep_flush(tl_ep, flags, comp); + if (status == UCS_OK) { +@@ -530,8 +671,10 @@ ucs_status_t uct_dc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion + } + + if (status == UCS_INPROGRESS) { +- ucs_assert(ep->super.dci != UCT_DC_EP_NO_DCI); +- uct_dc_mlx5_iface_add_send_comp(iface, ep, comp); ++ ucs_assert(ep->dci != UCT_DC_EP_NO_DCI); ++ UCT_DC_MLX5_IFACE_TXQP_GET(iface, ep, txqp, txwq); ++ status = uct_rc_txqp_add_flush_comp(&iface->super.super, txqp, comp, ++ txwq->sig_pi); + } + return status; + } +@@ -542,10 +685,11 @@ uct_dc_mlx5_poll_tx(uct_dc_mlx5_iface_t *iface) + uint8_t dci; + struct mlx5_cqe64 *cqe; + uint32_t qp_num; +- uint16_t hw_ci, bb_num; ++ uint16_t hw_ci; + UCT_DC_MLX5_TXQP_DECL(txqp, txwq); + +- cqe = uct_ib_mlx5_poll_cq(&iface->super.super.super, &iface->mlx5_common.tx.cq); ++ cqe = uct_ib_mlx5_poll_cq(&iface->super.super.super, ++ &iface->mlx5_common.cq[UCT_IB_DIR_TX]); + if (cqe == NULL) { + return 0; + } +@@ -562,10 +706,7 @@ uct_dc_mlx5_poll_tx(uct_dc_mlx5_iface_t *iface) + ucs_trace_poll("dc_mlx5 iface %p tx_cqe: dci[%d] qpn 0x%x txqp %p hw_ci %d", + iface, dci, qp_num, txqp, hw_ci); + +- bb_num = uct_ib_mlx5_txwq_update_bb(txwq, hw_ci) - uct_rc_txqp_available(txqp); +- uct_rc_txqp_available_add(txqp, bb_num); +- iface->super.super.tx.cq_available += bb_num; +- ++ uct_rc_mlx5_common_update_tx_res(&iface->super.super, txwq, txqp, hw_ci); + uct_dc_iface_dci_put(&iface->super, dci); + uct_rc_mlx5_txqp_process_tx_cqe(txqp, cqe, hw_ci); + +@@ -588,8 +729,9 @@ static unsigned uct_dc_mlx5_iface_progress(void *arg) + + + #if IBV_EXP_HW_TM_DC +-ucs_status_t uct_dc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, +- const void *data, size_t length) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_tag_eager_short_inline(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); + uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); +@@ -602,16 +744,53 @@ ucs_status_t uct_dc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + +- uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND, data, length, + NULL, tag, 0, IBV_EXP_TMH_EAGER, 0, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), NULL, 0, + MLX5_WQE_CTRL_SOLICITED); + ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ + return UCS_OK; + } + ++ucs_status_t uct_dc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length) ++{ ++#if HAVE_IBV_EXP_DM ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ uct_rc_mlx5_dm_copy_data_t cache; ++ ucs_status_t status; ++ ++ if (ucs_likely((sizeof(struct ibv_exp_tmh) + length <= ++ UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_dc_mlx5_ep_tag_eager_short_inline(tl_ep, tag, data, length); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length + sizeof(struct ibv_exp_tmh), 0, ++ iface->mlx5_common.dm.seg_len, "tag_short"); ++ UCT_DC_CHECK_RES(&iface->super, &ep->super); ++ ++ uct_rc_mlx5_fill_tmh(ucs_unaligned_ptr(&cache.tm_hdr), tag, 0, IBV_EXP_TMH_EAGER); ++ ++ status = uct_dc_mlx5_ep_short_dm(ep, &cache, sizeof(cache.tm_hdr), data, ++ length, MLX5_OPCODE_SEND, ++ MLX5_WQE_CTRL_SOLICITED | MLX5_WQE_CTRL_CQ_UPDATE, ++ 0, 0); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ } ++ ++ return status; ++#endif ++} ++ + ssize_t uct_dc_mlx5_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + uint64_t imm, + uct_pack_callback_t pack_cb, +@@ -628,12 +807,15 @@ ssize_t uct_dc_mlx5_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + + UCT_RC_IFACE_FILL_TM_IMM(imm, app_ctx, ib_imm, opcode, MLX5_OPCODE_SEND, _IMM); + +- UCT_RC_IFACE_GET_TM_BCOPY_DESC(&iface->super.super, &iface->super.super.tx.mp, +- desc, tag, app_ctx, pack_cb, arg, length); ++ UCT_RC_MLX5_IFACE_GET_TM_BCOPY_DESC(&iface->super.super, ++ &iface->super.super.tx.mp, desc, tag, ++ app_ctx, pack_cb, arg, length); + + uct_dc_mlx5_iface_bcopy_post(iface, ep, opcode, + sizeof(struct ibv_exp_tmh) + length, +- 0, 0, desc, MLX5_WQE_CTRL_SOLICITED, ib_imm); ++ 0, 0, desc, MLX5_WQE_CTRL_SOLICITED, ib_imm, desc + 1, NULL); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, BCOPY, length); + + return length; + } +@@ -648,7 +830,8 @@ ucs_status_t uct_dc_mlx5_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + uint32_t app_ctx, ib_imm; + int opcode; + +- UCT_CHECK_IOV_SIZE(iovcnt, 1ul, "uct_dc_mlx5_ep_tag_eager_zcopy"); ++ UCT_CHECK_IOV_SIZE(iovcnt, UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(UCT_IB_MLX5_AV_FULL_SIZE), ++ "uct_dc_mlx5_ep_tag_eager_zcopy"); + UCT_RC_CHECK_ZCOPY_DATA(sizeof(struct ibv_exp_tmh), + uct_iov_total_length(iov, iovcnt), + iface->super.super.super.config.seg_size); +@@ -660,6 +843,9 @@ ucs_status_t uct_dc_mlx5_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + iov, iovcnt, 0, "", 0, 0, 0, tag, app_ctx, + ib_imm, comp, MLX5_WQE_CTRL_SOLICITED); + ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ + return UCS_INPROGRESS; + } + +@@ -687,11 +873,11 @@ ucs_status_ptr_t uct_dc_mlx5_ep_tag_rndv_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + + op_index = uct_rc_iface_tag_get_op_id(&iface->super.super, comp); + +- uct_dc_iface_fill_ravh(&ravh, iface->super.rx.dct->dct_num); ++ uct_dc_iface_fill_ravh(&ravh, uct_dc_get_dct_num(&iface->super)); + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + +- uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND, header, + header_length, iov, tag, op_index, + IBV_EXP_TMH_RNDV, 0, &ep->av, +@@ -718,7 +904,7 @@ ucs_status_t uct_dc_mlx5_ep_tag_rndv_request(uct_ep_h tl_ep, uct_tag_t tag, + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + +- uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND_IMM, header, + header_length, NULL, tag, 0, + IBV_EXP_TMH_EAGER, 0, &ep->av, +@@ -766,6 +952,13 @@ static unsigned uct_dc_mlx5_iface_progress_tm(void *arg) + } + #endif + ++static void uct_dc_mlx5_iface_progress_enable(uct_iface_h tl_iface, unsigned flags) ++{ ++ uct_rc_iface_t *iface = ucs_derived_of(tl_iface, uct_rc_iface_t); ++ ++ uct_base_iface_progress_enable_cb(&iface->super.super, iface->progress, flags); ++} ++ + static void uct_dc_mlx5_iface_handle_failure(uct_ib_iface_t *ib_iface, + void *arg, ucs_status_t status) + { +@@ -778,7 +971,7 @@ static void uct_dc_mlx5_iface_handle_failure(uct_ib_iface_t *ib_iface, + log_lvl = ib_iface->super.config.failure_level; + } + +- uct_ib_mlx5_completion_with_err(arg, log_lvl); ++ uct_ib_mlx5_completion_with_err(ib_iface, arg, log_lvl); + } + + static ucs_status_t uct_dc_mlx5_ep_set_failed(uct_ib_iface_t *ib_iface, +@@ -823,7 +1016,7 @@ ucs_status_t uct_dc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + /* TODO: look at common code with uct_ud_mlx5_iface_get_av */ + if (dc_req->sender.global.is_global) { + uct_ib_iface_fill_ah_attr_from_gid_lid(ib_iface, dc_req->lid, +- (void*)&dc_req->sender.global.gid, ++ ucs_unaligned_ptr(&dc_req->sender.global.gid), + ib_iface->path_bits[0], &ah_attr); + + status = uct_ib_iface_create_ah(ib_iface, &ah_attr, &ah); +@@ -832,8 +1025,6 @@ ucs_status_t uct_dc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + } + + uct_ib_mlx5_get_av(ah, &mlx5_av); +- +- ibv_destroy_ah(ah); + } + + /* Note av initialization is copied from exp verbs */ +@@ -841,19 +1032,21 @@ ucs_status_t uct_dc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + av.fl_mlid = ib_iface->path_bits[0] & 0x7f; + + /* lid in dc_req is in BE already */ +- av.rlid = dc_req->lid | htons(ib_iface->path_bits[0]); ++ av.rlid = IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(ib_iface)) ? ++ 0 : (dc_req->lid | htons(ib_iface->path_bits[0])); + av.dqp_dct = htonl(dc_req->dct_num); ++ uct_dc_mlx5_iface_set_av_sport(iface, &av, dc_req->dct_num); + + if (!iface->ud_common.config.compact_av || ah_attr.is_global) { + av.dqp_dct |= UCT_IB_MLX5_EXTENDED_UD_AV; + } + +- uct_rc_mlx5_txqp_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND, + &av /*dummy*/, 0, op, sender_ep, 0, + 0, 0, + &av, ah_attr.is_global ? mlx5_av_grh(&mlx5_av) : NULL, +- uct_ib_mlx5_wqe_av_size(&av), 0); ++ uct_ib_mlx5_wqe_av_size(&av), 0, INT_MAX); + } else { + ucs_assert(op == UCT_RC_EP_FC_FLAG_HARD_REQ); + dc_mlx5_ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); +@@ -864,21 +1057,20 @@ ucs_status_t uct_dc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + UCS_STATS_UPDATE_COUNTER(dc_ep->fc.stats, + UCT_RC_FC_STAT_TX_HARD_REQ, 1); + +- uct_rc_mlx5_txqp_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND_IMM, + &sender.global, sizeof(sender.global), op, sender.ep, +- iface->super.rx.dct->dct_num, ++ uct_dc_get_dct_num(&iface->super), + 0, 0, + &dc_mlx5_ep->av, + uct_dc_mlx5_ep_get_grh(dc_mlx5_ep), + uct_ib_mlx5_wqe_av_size(&dc_mlx5_ep->av), +- MLX5_WQE_CTRL_SOLICITED); ++ MLX5_WQE_CTRL_SOLICITED, INT_MAX); + } + + return UCS_OK; + } + +- + static void UCS_CLASS_DELETE_FUNC_NAME(uct_dc_mlx5_iface_t)(uct_iface_t*); + + static ucs_status_t uct_dc_mlx5_iface_reset_dci(uct_dc_iface_t *dc_iface, int dci) +@@ -893,16 +1085,199 @@ static ucs_status_t uct_dc_mlx5_iface_reset_dci(uct_dc_iface_t *dc_iface, int dc + */ + uct_rc_mlx5_iface_common_update_cqs_ci(&iface->mlx5_common, + &iface->super.super.super); +- status = uct_rc_modify_qp(&iface->super.tx.dcis[dci].txqp, IBV_QPS_RESET); ++ status = uct_ib_modify_qp(iface->super.tx.dcis[dci].txqp.qp, IBV_QPS_RESET); + uct_rc_mlx5_iface_common_sync_cqs_ci(&iface->mlx5_common, + &iface->super.super.super); + ++ uct_rc_mlx5_iface_commom_clean(&iface->mlx5_common.cq[UCT_IB_DIR_TX], NULL, ++ iface->super.tx.dcis[dci].txqp.qp->qp_num); ++ + /* Resume posting from to the beginning of the QP */ + uct_ib_mlx5_txwq_reset(&iface->dci_wqs[dci]); + + return status; + } + ++static void uct_dc_mlx5_iface_event_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir) ++{ ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_dc_mlx5_iface_t); ++ ++ iface->mlx5_common.cq[dir].cq_sn++; ++} ++ ++#if HAVE_DC_DV ++static ucs_status_t uct_dc_mlx5_iface_create_qp(uct_ib_iface_t *iface, ++ uct_ib_qp_attr_t *attr, ++ struct ibv_qp **qp_p) ++{ ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ struct mlx5dv_qp_init_attr dv_attr = {}; ++ struct ibv_qp *qp; ++ ++ uct_ib_iface_fill_attr(iface, attr); ++ attr->ibv.cap.max_recv_sge = 0; ++ ++ dv_attr.comp_mask = MLX5DV_QP_INIT_ATTR_MASK_DC; ++ dv_attr.dc_init_attr.dc_type = MLX5DV_DCTYPE_DCI; ++ dv_attr.dc_init_attr.dct_access_key = UCT_IB_KEY; ++ qp = mlx5dv_create_qp(dev->ibv_context, &attr->ibv, &dv_attr); ++ if (qp == NULL) { ++ ucs_error("iface=%p: failed to create DCI: %m", iface); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ attr->cap = attr->ibv.cap; ++ *qp_p = qp; ++ ++ return UCS_OK; ++} ++ ++ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, ++ uct_rc_txqp_t *dci) ++{ ++ struct ibv_qp_attr attr; ++ long attr_mask; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_INIT; ++ attr.pkey_index = 0; ++ attr.qp_access_flags = 0; ++ attr.port_num = iface->super.super.config.port_num; ++ ++ if (ibv_modify_qp(dci->qp, &attr, ++ IBV_QP_STATE | ++ IBV_QP_PKEY_INDEX | ++ IBV_QP_PORT)) { ++ ucs_error("error modifying QP to INIT : %m"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ /* Move QP to the RTR state */ ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_RTR; ++ attr.path_mtu = iface->super.config.path_mtu; ++ attr.min_rnr_timer = iface->super.config.min_rnr_timer; ++ attr.max_dest_rd_atomic = 1; ++ attr.ah_attr.is_global = iface->super.super.is_global_addr; ++ attr.ah_attr.sl = iface->super.super.config.sl; ++ attr_mask = IBV_QP_STATE | ++ IBV_QP_PATH_MTU; ++ ++ if (ibv_modify_qp(dci->qp, &attr, attr_mask)) { ++ ucs_error("error modifying DCI QP to RTR: %m"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ /* Move QP to the RTS state */ ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_RTS; ++ attr.timeout = iface->super.config.timeout; ++ attr.rnr_retry = iface->super.config.rnr_retry; ++ attr.retry_cnt = iface->super.config.retry_cnt; ++ attr.max_rd_atomic = iface->super.config.max_rd_atomic; ++ attr_mask = IBV_QP_STATE | ++ IBV_QP_SQ_PSN | ++ IBV_QP_TIMEOUT | ++ IBV_QP_RETRY_CNT | ++ IBV_QP_RNR_RETRY | ++ IBV_QP_MAX_QP_RD_ATOMIC; ++ ++ if (ibv_modify_qp(dci->qp, &attr, attr_mask)) { ++ ucs_error("error modifying DCI QP to RTS: %m"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ return UCS_OK; ++} ++ ++ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) ++{ ++ uct_dc_mlx5_iface_t *mlx5 = ucs_derived_of(iface, uct_dc_mlx5_iface_t); ++ uct_ib_device_t *dev = uct_ib_iface_device(&iface->super.super); ++ struct mlx5dv_qp_init_attr dv_init_attr = {}; ++ struct ibv_qp_init_attr_ex init_attr = {}; ++ struct ibv_qp_attr attr = {}; ++ int ret; ++ ++ init_attr.comp_mask = IBV_QP_INIT_ATTR_PD; ++ init_attr.pd = uct_ib_iface_md(&iface->super.super)->pd; ++ init_attr.recv_cq = iface->super.super.cq[UCT_IB_DIR_RX]; ++ /* DCT can't send, but send_cq have to point to valid CQ */ ++ init_attr.send_cq = iface->super.super.cq[UCT_IB_DIR_RX]; ++ init_attr.srq = iface->super.rx.srq.srq; ++ init_attr.qp_type = IBV_QPT_DRIVER; ++ init_attr.cap.max_inline_data = iface->super.config.rx_inline; ++ ++ dv_init_attr.comp_mask = MLX5DV_QP_INIT_ATTR_MASK_DC; ++ dv_init_attr.dc_init_attr.dc_type = MLX5DV_DCTYPE_DCT; ++ dv_init_attr.dc_init_attr.dct_access_key = UCT_IB_KEY; ++ ++ mlx5->rx_dct = mlx5dv_create_qp(dev->ibv_context, ++ &init_attr, &dv_init_attr); ++ if (mlx5->rx_dct == NULL) { ++ ucs_error("Failed to created DC target %m"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ attr.qp_state = IBV_QPS_INIT; ++ attr.port_num = iface->super.super.config.port_num; ++ attr.qp_access_flags = IBV_ACCESS_REMOTE_WRITE | ++ IBV_ACCESS_REMOTE_READ | ++ IBV_ACCESS_REMOTE_ATOMIC; ++ ++ ret = ibv_modify_qp(mlx5->rx_dct, &attr, IBV_QP_STATE | ++ IBV_QP_PKEY_INDEX | ++ IBV_QP_PORT | ++ IBV_QP_ACCESS_FLAGS); ++ ++ if (ret) { ++ ucs_error("error modifying DCT to INIT: %m"); ++ goto err; ++ } ++ ++ attr.qp_state = IBV_QPS_RTR; ++ attr.path_mtu = iface->super.config.path_mtu; ++ attr.min_rnr_timer = iface->super.config.min_rnr_timer; ++ attr.ah_attr.grh.hop_limit = iface->super.super.config.hop_limit; ++ attr.ah_attr.grh.traffic_class = iface->super.super.config.traffic_class; ++ attr.ah_attr.grh.sgid_index = uct_ib_iface_md(&iface->super.super)->config.gid_index; ++ attr.ah_attr.port_num = iface->super.super.config.port_num; ++ ++ ret = ibv_modify_qp(mlx5->rx_dct, &attr, IBV_QP_STATE | ++ IBV_QP_MIN_RNR_TIMER | ++ IBV_QP_AV | ++ IBV_QP_PATH_MTU); ++ if (ret) { ++ ucs_error("error modifying DCT to RTR: %m"); ++ goto err; ++ } ++ ++ return UCS_OK; ++ ++err: ++ ibv_destroy_qp(mlx5->rx_dct); ++ return UCS_ERR_IO_ERROR; ++} ++ ++int uct_dc_get_dct_num(uct_dc_iface_t *iface) ++{ ++ uct_dc_mlx5_iface_t *mlx5 = ucs_derived_of(iface, uct_dc_mlx5_iface_t); ++ ++ return mlx5->rx_dct->qp_num; ++} ++ ++void uct_dc_destroy_dct(uct_dc_iface_t *iface) ++{ ++ uct_dc_mlx5_iface_t *mlx5 = ucs_derived_of(iface, uct_dc_mlx5_iface_t); ++ ++ if (mlx5->rx_dct != NULL) { ++ ibv_destroy_qp(mlx5->rx_dct); ++ } ++ mlx5->rx_dct = NULL; ++} ++#endif ++ + static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + { + { +@@ -915,14 +1290,12 @@ static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + .ep_am_short = uct_dc_mlx5_ep_am_short, + .ep_am_bcopy = uct_dc_mlx5_ep_am_bcopy, + .ep_am_zcopy = uct_dc_mlx5_ep_am_zcopy, +- .ep_atomic_add64 = uct_dc_mlx5_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_dc_mlx5_ep_atomic_fadd64, +- .ep_atomic_swap64 = uct_dc_mlx5_ep_atomic_swap64, + .ep_atomic_cswap64 = uct_dc_mlx5_ep_atomic_cswap64, +- .ep_atomic_add32 = uct_dc_mlx5_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_dc_mlx5_ep_atomic_fadd32, +- .ep_atomic_swap32 = uct_dc_mlx5_ep_atomic_swap32, + .ep_atomic_cswap32 = uct_dc_mlx5_ep_atomic_cswap32, ++ .ep_atomic64_post = uct_dc_mlx5_ep_atomic64_post, ++ .ep_atomic32_post = uct_dc_mlx5_ep_atomic32_post, ++ .ep_atomic64_fetch = uct_dc_mlx5_ep_atomic64_fetch, ++ .ep_atomic32_fetch = uct_dc_mlx5_ep_atomic32_fetch, + .ep_pending_add = uct_dc_ep_pending_add, + .ep_pending_purge = uct_dc_ep_pending_purge, + .ep_flush = uct_dc_mlx5_ep_flush, +@@ -939,7 +1312,7 @@ static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + #endif + .iface_flush = uct_dc_iface_flush, + .iface_fence = uct_base_iface_fence, +- .iface_progress_enable = uct_base_iface_progress_enable, ++ .iface_progress_enable = uct_dc_mlx5_iface_progress_enable, + .iface_progress_disable = uct_base_iface_progress_disable, + .iface_progress = uct_rc_iface_do_progress, + .iface_event_fd_get = uct_ib_iface_event_fd_get, +@@ -952,10 +1325,15 @@ static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + .iface_is_reachable = uct_dc_iface_is_reachable, + .iface_get_address = uct_dc_iface_get_address, + }, +- .arm_tx_cq = uct_ib_iface_arm_tx_cq, +- .arm_rx_cq = uct_ib_iface_arm_rx_cq, ++ .arm_cq = uct_ib_iface_arm_cq, ++ .event_cq = uct_dc_mlx5_iface_event_cq, + .handle_failure = uct_dc_mlx5_iface_handle_failure, +- .set_ep_failed = uct_dc_mlx5_ep_set_failed ++ .set_ep_failed = uct_dc_mlx5_ep_set_failed, ++#if HAVE_DC_DV ++ .create_qp = uct_dc_mlx5_iface_create_qp ++#else ++ .create_qp = uct_ib_iface_create_qp ++#endif + }, + .fc_ctrl = uct_dc_mlx5_ep_fc_ctrl, + .fc_handler = uct_dc_iface_fc_handler, +@@ -964,7 +1342,8 @@ static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + }; + + +-static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface) ++static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface, ++ uct_ib_mlx5_mmio_mode_t mmio_mode) + { + ucs_status_t status; + uint16_t bb_max; +@@ -973,7 +1352,7 @@ static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface) + bb_max = 0; + for (i = 0; i < iface->super.tx.ndci; i++) { + status = uct_ib_mlx5_txwq_init(iface->super.super.super.super.worker, +- &iface->dci_wqs[i], ++ mmio_mode, &iface->dci_wqs[i], + iface->super.tx.dcis[i].txqp.qp); + if (status != UCS_OK) { + return status; +@@ -988,8 +1367,17 @@ static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface) + return UCS_OK; + } + ++static void uct_dc_mlx5_iface_cleanup_dcis(uct_dc_mlx5_iface_t *iface) ++{ ++ int i; ++ ++ for (i = 0; i < iface->super.tx.ndci; i++) { ++ uct_ib_mlx5_txwq_cleanup(&iface->dci_wqs[i]); ++ } ++} ++ + static ucs_status_t uct_dc_mlx5_iface_tag_init(uct_dc_mlx5_iface_t *iface, +- uct_rc_iface_config_t *rc_config) ++ uct_dc_mlx5_iface_config_t *config) + { + #if IBV_EXP_HW_TM_DC + if (UCT_RC_IFACE_TM_ENABLED(&iface->super.super)) { +@@ -1000,7 +1388,9 @@ static ucs_status_t uct_dc_mlx5_iface_tag_init(uct_dc_mlx5_iface_t *iface, + uct_dc_iface_fill_xrq_init_attrs(&iface->super.super, &srq_init_attr, &dc_op); + + status = uct_rc_mlx5_iface_common_tag_init(&iface->mlx5_common, +- &iface->super.super, rc_config, ++ &iface->super.super, ++ &config->super.super, ++ &config->mlx5_common, + &srq_init_attr, + sizeof(struct ibv_exp_tmh_rvh) + + sizeof(struct ibv_exp_tmh_ravh)); +@@ -1027,8 +1417,7 @@ static ucs_status_t uct_dc_mlx5_iface_tag_init(uct_dc_mlx5_iface_t *iface, + static void uct_dc_mlx5_iface_tag_cleanup(uct_dc_mlx5_iface_t *iface) + { + if (UCT_RC_IFACE_TM_ENABLED(&iface->super.super)) { +- ibv_exp_destroy_dct(iface->super.rx.dct); +- iface->super.rx.dct = NULL; ++ uct_dc_destroy_dct(&iface->super); + } + + uct_rc_mlx5_iface_common_tag_cleanup(&iface->mlx5_common, &iface->super.super); +@@ -1040,20 +1429,25 @@ static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + { + uct_dc_mlx5_iface_config_t *config = ucs_derived_of(tl_config, + uct_dc_mlx5_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + + ucs_trace_func(""); ++ ++ init_attr.res_domain_key = UCT_IB_MLX5_RES_DOMAIN_KEY; ++ init_attr.tm_cap_bit = IBV_EXP_TM_CAP_DC; ++ init_attr.flags = UCT_IB_CQ_IGNORE_OVERRUN; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_dc_iface_t, &uct_dc_mlx5_iface_ops, md, +- worker, params, 0, &config->super, +- IBV_EXP_TM_CAP_DC); ++ worker, params, &config->super, &init_attr); + +- status = uct_dc_mlx5_iface_tag_init(self, &config->super.super); ++ status = uct_dc_mlx5_iface_tag_init(self, config); + if (status != UCS_OK) { + goto err; + } + + status = uct_rc_mlx5_iface_common_init(&self->mlx5_common, &self->super.super, +- &config->super.super); ++ &config->super.super, &config->mlx5_common); + if (status != UCS_OK) { + goto err_rc_mlx5_tag_cleanup; + } +@@ -1064,7 +1458,7 @@ static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + goto err_rc_mlx5_common_cleanup; + } + +- status = uct_dc_mlx5_iface_init_dcis(self); ++ status = uct_dc_mlx5_iface_init_dcis(self, config->mlx5_common.mmio_mode); + if (status != UCS_OK) { + goto err_rc_mlx5_common_cleanup; + } +@@ -1072,7 +1466,7 @@ static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + uct_dc_iface_set_quota(&self->super, &config->super); + /* Set max_iov for put_zcopy and get_zcopy */ + uct_ib_iface_set_max_iov(&self->super.super.super, +- ((UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB) - ++ (UCT_IB_MLX5_MAX_SEND_WQE_SIZE - + sizeof(struct mlx5_wqe_raddr_seg) - + sizeof(struct mlx5_wqe_ctrl_seg) - + UCT_IB_MLX5_AV_FULL_SIZE) / +@@ -1097,6 +1491,7 @@ static UCS_CLASS_CLEANUP_FUNC(uct_dc_mlx5_iface_t) + ucs_trace_func(""); + uct_base_iface_progress_disable(&self->super.super.super.super.super, + UCT_PROGRESS_SEND | UCT_PROGRESS_RECV); ++ uct_dc_mlx5_iface_cleanup_dcis(self); + uct_rc_mlx5_iface_common_cleanup(&self->mlx5_common); + uct_dc_mlx5_iface_tag_cleanup(self); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.h +index a82474a..1e89c0a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.h +@@ -16,6 +16,7 @@ + typedef struct uct_dc_mlx5_iface_config { + uct_dc_iface_config_t super; + uct_ud_mlx5_iface_common_config_t ud_common; ++ uct_ib_mlx5_iface_config_t mlx5_common; + } uct_dc_mlx5_iface_config_t; + + +@@ -24,6 +25,7 @@ typedef struct uct_dc_mlx5_iface { + uct_rc_mlx5_iface_common_t mlx5_common; + uct_ud_mlx5_iface_common_t ud_common; + uct_ib_mlx5_txwq_t dci_wqs[UCT_DC_IFACE_MAX_DCIS]; ++ struct ibv_qp *rx_dct; + } uct_dc_mlx5_iface_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.c +index 8b1175d..9967df8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.c +@@ -77,7 +77,8 @@ void uct_dc_ep_release(uct_dc_ep_t *ep) + currently pending code supports only dcs policy + support hash/random policies + */ +-ucs_status_t uct_dc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *r) ++ucs_status_t uct_dc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *r, ++ unsigned flags) + { + uct_dc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_iface_t); + uct_dc_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_ep_t); +@@ -129,11 +130,9 @@ uct_dc_iface_dci_do_pending_wait(ucs_arbiter_t *arbiter, + uct_dc_ep_t *ep = ucs_container_of(ucs_arbiter_elem_group(elem), uct_dc_ep_t, arb_group); + uct_dc_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_dc_iface_t); + +- /** +- * stop if dci can not be allocated +- * else move group to the dci arbiter +- */ +- ucs_assert_always(ep->dci == UCT_DC_EP_NO_DCI); ++ if (ep->dci != UCT_DC_EP_NO_DCI) { ++ return UCS_ARBITER_CB_RESULT_DESCHED_GROUP; ++ } + + if (!uct_dc_iface_dci_can_alloc(iface)) { + return UCS_ARBITER_CB_RESULT_STOP; +@@ -254,10 +253,6 @@ ucs_status_t uct_dc_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion_t *c + return UCS_OK; + } + +- /* If waiting for FC grant, return NO_RESOURCE to prevent ep destruction. +- * Otherwise grant for destroyed ep will arrive and there will be a +- * segfault when we will try to access the ep by address from the grant +- * message. */ + if (!uct_rc_iface_has_tx_resources(&iface->super)) { + return UCS_ERR_NO_RESOURCE; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.h +index 79ff47e..ce68e7a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.h +@@ -53,7 +53,8 @@ uct_dc_iface_dci_do_pending_tx(ucs_arbiter_t *arbiter, + ucs_arbiter_elem_t *elem, + void *arg); + +-ucs_status_t uct_dc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *r); ++ucs_status_t uct_dc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *r, ++ unsigned flags); + void uct_dc_ep_pending_purge(uct_ep_h tl_ep, uct_pending_purge_callback_t cb, void *arg); + + void uct_dc_ep_cleanup(uct_ep_h tl_ep, ucs_class_t *cls); +@@ -105,7 +106,7 @@ enum uct_dc_ep_flags { + UCT_DC_EP_FLAG_TX_WAIT = UCS_BIT(0), /* ep is in the tx_wait state. See + description of the dcs+quota dci + selection policy above */ +- UCT_DC_EP_FLAG_GRH = UCS_BIT(1), /* ep has GRH address. Used by ++ UCT_DC_EP_FLAG_GRH = UCS_BIT(1), /* ep has GRH address. Used by + dc_mlx5 endpoint */ + UCT_DC_EP_FLAG_VALID = UCS_BIT(2) /* ep is a valid endpoint */ + }; +@@ -212,6 +213,9 @@ static inline void uct_dc_iface_dci_put_dcs(uct_dc_iface_t *iface, uint8_t dci) + } + iface->tx.stack_top--; + iface->tx.dcis_stack[iface->tx.stack_top] = dci; ++#if ENABLE_ASSERT ++ iface->tx.dcis[dci].flags = 0; ++#endif + + if (ucs_unlikely(ep == NULL)) { + return; +@@ -221,9 +225,7 @@ static inline void uct_dc_iface_dci_put_dcs(uct_dc_iface_t *iface, uint8_t dci) + ep->dci = UCT_DC_EP_NO_DCI; + ep->flags &= ~UCT_DC_EP_FLAG_TX_WAIT; + iface->tx.dcis[dci].ep = NULL; +-#if ENABLE_ASSERT +- iface->tx.dcis[dci].flags = 0; +-#endif ++ + /* it is possible that dci is released while ep still has scheduled pending ops. + * move the group to the 'wait for dci alloc' state + */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.c +index 50bd0c0..2962560 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.c +@@ -10,7 +10,6 @@ + #include + #include + +- + const static char *uct_dc_tx_policy_names[] = { + [UCT_DC_TX_POLICY_DCS] = "dcs", + [UCT_DC_TX_POLICY_DCS_QUOTA] = "dcs_quota", +@@ -52,6 +51,7 @@ ucs_config_field_t uct_dc_iface_config_table[] = { + {NULL} + }; + ++#if HAVE_DC_EXP + ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) + { + struct ibv_exp_dct_init_attr init_attr; +@@ -59,7 +59,7 @@ ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) + memset(&init_attr, 0, sizeof(init_attr)); + + init_attr.pd = uct_ib_iface_md(&iface->super.super)->pd; +- init_attr.cq = iface->super.super.recv_cq; ++ init_attr.cq = iface->super.super.cq[UCT_IB_DIR_RX]; + init_attr.srq = iface->super.rx.srq.srq; + init_attr.dc_key = UCT_IB_KEY; + init_attr.port = iface->super.super.config.port_num; +@@ -68,7 +68,9 @@ ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) + IBV_EXP_ACCESS_REMOTE_READ | + IBV_EXP_ACCESS_REMOTE_ATOMIC; + init_attr.min_rnr_timer = iface->super.config.min_rnr_timer; +- init_attr.hop_limit = 1; ++ init_attr.tclass = iface->super.super.config.traffic_class; ++ init_attr.hop_limit = iface->super.super.config.hop_limit; ++ init_attr.gid_index = iface->super.super.config.gid_index; + init_attr.inline_size = iface->super.config.rx_inline; + + #if HAVE_DECL_IBV_EXP_DCT_OOO_RW_DATA_PLACEMENT +@@ -81,19 +83,18 @@ ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) + } + #endif + +- iface->rx.dct = ibv_exp_create_dct(uct_ib_iface_device(&iface->super.super)->ibv_context, ++ iface->rx_dct = ibv_exp_create_dct(uct_ib_iface_device(&iface->super.super)->ibv_context, + &init_attr); +- if (iface->rx.dct == NULL) { ++ if (iface->rx_dct == NULL) { + ucs_error("Failed to created DC target %m"); + return UCS_ERR_INVALID_PARAM; + } +- + return UCS_OK; + } + + /* take dc qp to rts state */ +-static ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, +- uct_rc_txqp_t *dci) ++ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, ++ uct_rc_txqp_t *dci) + { + struct ibv_exp_qp_attr attr; + long attr_mask; +@@ -121,11 +122,7 @@ static ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, + attr.path_mtu = iface->super.config.path_mtu; + attr.min_rnr_timer = 0; + attr.max_dest_rd_atomic = 1; +- if ((iface->super.super.addr_type == UCT_IB_ADDRESS_TYPE_ETH) || +- (iface->super.super.addr_type == UCT_IB_ADDRESS_TYPE_GLOBAL)) +- { +- attr.ah_attr.is_global = 1; +- } ++ attr.ah_attr.is_global = iface->super.super.is_global_addr; + attr.ah_attr.sl = iface->super.super.config.sl; + attr_mask = IBV_EXP_QP_STATE | + IBV_EXP_QP_PATH_MTU | +@@ -167,6 +164,33 @@ static ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, + return UCS_OK; + } + ++int uct_dc_get_dct_num(uct_dc_iface_t *iface) ++{ ++ return iface->rx_dct->dct_num; ++} ++ ++void uct_dc_destroy_dct(uct_dc_iface_t *iface) ++{ ++ if (iface->rx_dct != NULL) { ++ ibv_exp_destroy_dct(iface->rx_dct); ++ } ++ iface->rx_dct = NULL; ++} ++ ++static ucs_status_t uct_dc_device_init(uct_ib_device_t *dev) ++{ ++#if HAVE_DECL_IBV_EXP_DEVICE_DC_TRANSPORT && HAVE_STRUCT_IBV_EXP_DEVICE_ATTR_EXP_DEVICE_CAP_FLAGS ++ if (dev->dev_attr.exp_device_cap_flags & IBV_EXP_DEVICE_DC_TRANSPORT) { ++ dev->flags |= UCT_IB_DEVICE_FLAG_DC; ++ } ++#endif ++ return UCS_OK; ++} ++ ++UCT_IB_DEVICE_INIT(uct_dc_device_init); ++ ++#endif ++ + static void uct_dc_iface_dcis_destroy(uct_dc_iface_t *iface, int max) + { + int i; +@@ -187,7 +211,7 @@ static ucs_status_t uct_dc_iface_create_dcis(uct_dc_iface_t *iface, + iface->tx.stack_top = 0; + for (i = 0; i < iface->tx.ndci; i++) { + status = uct_rc_txqp_init(&iface->tx.dcis[i].txqp, &iface->super, +- IBV_EXP_QPT_DC_INI, &cap ++ UCT_IB_QPT_DCI, &cap + UCS_STATS_ARG(iface->super.stats)); + if (status != UCS_OK) { + goto err; +@@ -241,15 +265,16 @@ static void uct_dc_iface_init_version(uct_dc_iface_t *iface, uct_md_h md) + + UCS_CLASS_INIT_FUNC(uct_dc_iface_t, uct_dc_iface_ops_t *ops, uct_md_h md, + uct_worker_h worker, const uct_iface_params_t *params, +- unsigned rx_priv_len, uct_dc_iface_config_t *config, +- int tm_cap_bit) ++ uct_dc_iface_config_t *config, ++ uct_ib_iface_init_attr_t *init_attr) + { + ucs_status_t status; + ucs_trace_func(""); + ++ init_attr->fc_req_size = sizeof(uct_dc_fc_request_t); ++ + UCS_CLASS_CALL_SUPER_INIT(uct_rc_iface_t, &ops->super, md, worker, params, +- &config->super, rx_priv_len, +- sizeof(uct_dc_fc_request_t), tm_cap_bit); ++ &config->super, init_attr); + if (config->ndci < 1) { + ucs_error("dc interface must have at least 1 dci (requested: %d)", + config->ndci); +@@ -287,7 +312,7 @@ UCS_CLASS_INIT_FUNC(uct_dc_iface_t, uct_dc_iface_ops_t *ops, uct_md_h md, + ucs_debug("dc iface %p: using '%s' policy with %d dcis, dct 0x%x", self, + uct_dc_tx_policy_names[self->tx.policy], self->tx.ndci, + UCT_RC_IFACE_TM_ENABLED(&self->super) ? +- 0 : self->rx.dct->dct_num); ++ 0 : uct_dc_get_dct_num(self)); + + /* Create fake endpoint which will be used for sending FC grants */ + uct_dc_iface_init_fc_ep(self); +@@ -297,7 +322,7 @@ UCS_CLASS_INIT_FUNC(uct_dc_iface_t, uct_dc_iface_ops_t *ops, uct_md_h md, + + err_destroy_dct: + if (!UCT_RC_IFACE_TM_ENABLED(&self->super)) { +- ibv_exp_destroy_dct(self->rx.dct); ++ uct_dc_destroy_dct(self); + } + err: + return status; +@@ -308,15 +333,13 @@ static UCS_CLASS_CLEANUP_FUNC(uct_dc_iface_t) + uct_dc_ep_t *ep, *tmp; + + ucs_trace_func(""); +- if (self->rx.dct != NULL) { +- ibv_exp_destroy_dct(self->rx.dct); +- } ++ uct_dc_destroy_dct(self); + ucs_list_for_each_safe(ep, tmp, &self->tx.gc_list, list) { + uct_dc_ep_release(ep); + } + uct_dc_iface_dcis_destroy(self, self->tx.ndci); +- ucs_arbiter_cleanup(&self->tx.dci_arbiter); + uct_dc_iface_cleanup_fc_ep(self); ++ ucs_arbiter_cleanup(&self->tx.dci_arbiter); + } + + UCS_CLASS_DEFINE(uct_dc_iface_t, uct_rc_iface_t); +@@ -324,12 +347,13 @@ UCS_CLASS_DEFINE(uct_dc_iface_t, uct_rc_iface_t); + ucs_status_t uct_dc_iface_query(uct_dc_iface_t *iface, + uct_iface_attr_t *iface_attr, + size_t put_max_short, size_t max_inline, +- size_t am_max_hdr, size_t am_max_iov) ++ size_t am_max_hdr, size_t am_max_iov, ++ size_t tag_max_iov) + { + ucs_status_t status; + + status = uct_rc_iface_query(&iface->super, iface_attr, put_max_short, +- max_inline, am_max_hdr, am_max_iov); ++ max_inline, am_max_hdr, am_max_iov, tag_max_iov); + if (status != UCS_OK) { + return status; + } +@@ -367,7 +391,7 @@ uct_dc_iface_get_address(uct_iface_h tl_iface, uct_iface_addr_t *iface_addr) + uct_dc_iface_t *iface = ucs_derived_of(tl_iface, uct_dc_iface_t); + uct_dc_iface_addr_t *addr = (uct_dc_iface_addr_t *)iface_addr; + +- uct_ib_pack_uint24(addr->qp_num, iface->rx.dct->dct_num); ++ uct_ib_pack_uint24(addr->qp_num, uct_dc_get_dct_num(iface)); + addr->atomic_mr_id = uct_ib_iface_get_atomic_mr_id(&iface->super.super); + addr->flags = iface->version_flag; + if (UCT_RC_IFACE_TM_ENABLED(&iface->super)) { +@@ -395,7 +419,7 @@ static inline ucs_status_t uct_dc_iface_flush_dcis(uct_dc_iface_t *iface) + for (i = 0; i < iface->tx.ndci; i++) { + if ((iface->tx.dcis[i].ep != NULL) && + uct_dc_ep_fc_wait_for_grant(iface->tx.dcis[i].ep)) { +- return UCS_ERR_NO_RESOURCE; ++ return UCS_INPROGRESS; + } + if (uct_dc_iface_flush_dci(iface, i) != UCS_OK) { + is_flush_done = 0; +@@ -517,7 +541,8 @@ ucs_status_t uct_dc_iface_fc_handler(uct_rc_iface_t *rc_iface, unsigned qp_num, + + status = uct_dc_iface_fc_grant(&dc_req->super.super); + if (status == UCS_ERR_NO_RESOURCE){ +- status = uct_ep_pending_add(&ep->super.super, &dc_req->super.super); ++ status = uct_ep_pending_add(&ep->super.super, &dc_req->super.super, ++ 0); + } + ucs_assertv_always(status == UCS_OK, "Failed to send FC grant msg: %s", + ucs_status_string(status)); +@@ -590,8 +615,18 @@ ucs_status_t uct_dc_handle_failure(uct_ib_iface_t *ib_iface, uint32_t qp_num, + uct_dc_iface_dci_put(iface, dci); + ucs_assert_always(ep->dci == UCT_DC_EP_NO_DCI); + +- ep_status = iface->super.super.ops->set_ep_failed(ib_iface, +- &ep->super.super, status); ++ if (ep == iface->tx.fc_ep) { ++ /* Cannot handle errors on flow-control endpoint, so ignore them */ ++ ucs_error("got error on DC flow-control endpoint, iface %p: %s", iface, ++ ucs_status_string(status)); ++ ep_status = UCS_OK; ++ } else { ++ ep_status = iface->super.super.ops->set_ep_failed(ib_iface, ++ &ep->super.super, status); ++ if (ep_status != UCS_OK) { ++ return ep_status; ++ } ++ } + + status = dc_ops->reset_dci(iface, dci); + if (status != UCS_OK) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.h +index 4959449..6f494bb 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.h +@@ -118,17 +118,17 @@ struct uct_dc_iface { + ucs_list_link_t gc_list; + } tx; + +- struct { +- struct ibv_exp_dct *dct; +- } rx; ++#if HAVE_DC_EXP ++ struct ibv_exp_dct *rx_dct; ++#endif + + uint8_t version_flag; + }; + + + UCS_CLASS_DECLARE(uct_dc_iface_t, uct_dc_iface_ops_t*, uct_md_h, +- uct_worker_h, const uct_iface_params_t*, unsigned, +- uct_dc_iface_config_t*, int) ++ uct_worker_h, const uct_iface_params_t*, ++ uct_dc_iface_config_t*, uct_ib_iface_init_attr_t*) + + extern ucs_config_field_t uct_dc_iface_config_table[]; + +@@ -136,7 +136,8 @@ ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface); + + ucs_status_t uct_dc_iface_query(uct_dc_iface_t *iface, uct_iface_attr_t *iface_attr, + size_t put_max_short, size_t max_inline, +- size_t am_max_hdr, size_t am_max_iov); ++ size_t am_max_hdr, size_t am_max_iov, ++ size_t tag_max_iov); + + int uct_dc_iface_is_reachable(const uct_iface_h tl_iface, + const uct_device_addr_t *dev_addr, +@@ -155,6 +156,8 @@ void uct_dc_iface_set_quota(uct_dc_iface_t *iface, uct_dc_iface_config_t *config + + ucs_status_t uct_dc_iface_init_fc_ep(uct_dc_iface_t *iface); + ++ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, uct_rc_txqp_t *dci); ++ + void uct_dc_iface_cleanup_fc_ep(uct_dc_iface_t *iface); + + ucs_status_t uct_dc_iface_fc_grant(uct_pending_req_t *self); +@@ -166,6 +169,10 @@ ucs_status_t uct_dc_iface_fc_handler(uct_rc_iface_t *rc_iface, unsigned qp_num, + ucs_status_t uct_dc_handle_failure(uct_ib_iface_t *ib_iface, uint32_t qp_num, + ucs_status_t status); + ++int uct_dc_get_dct_num(uct_dc_iface_t *iface); ++ ++void uct_dc_destroy_dct(uct_dc_iface_t *iface); ++ + #if IBV_EXP_HW_TM_DC + void uct_dc_iface_fill_xrq_init_attrs(uct_rc_iface_t *rc_iface, + struct ibv_exp_create_srq_attr *srq_attr, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/verbs/dc_verbs.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/verbs/dc_verbs.c +index 1392787..dfac716 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/verbs/dc_verbs.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/verbs/dc_verbs.c +@@ -56,7 +56,6 @@ static UCS_CLASS_INIT_FUNC(uct_dc_verbs_ep_t, + static UCS_CLASS_CLEANUP_FUNC(uct_dc_verbs_ep_t) + { + ucs_trace_func(""); +- ibv_destroy_ah(self->ah); + } + + UCS_CLASS_DEFINE(uct_dc_verbs_ep_t, uct_dc_ep_t); +@@ -78,6 +77,7 @@ static ucs_status_t uct_dc_verbs_iface_query(uct_iface_h tl_iface, uct_iface_att + verbs_common->config.max_inline, + verbs_common->config.max_inline, + verbs_common->config.short_desc_size, ++ uct_ib_iface_get_max_iov(&iface->super.super.super) - 1, + uct_ib_iface_get_max_iov(&iface->super.super.super) - 1); + if (status != UCS_OK) { + return status; +@@ -93,7 +93,8 @@ static UCS_F_ALWAYS_INLINE void + uct_dc_verbs_iface_post_send_to_dci(uct_dc_verbs_iface_t* iface, + struct ibv_exp_send_wr *wr, + uint8_t dci, struct ibv_ah *ah, +- uint32_t dct_num, uint64_t send_flags) ++ uint32_t dct_num, uint64_t send_flags, ++ int max_log_sge) + { + struct ibv_exp_send_wr *bad_wr; + int ret; +@@ -109,9 +110,10 @@ uct_dc_verbs_iface_post_send_to_dci(uct_dc_verbs_iface_t* iface, + wr->dc.dct_number = dct_num; + wr->dc.dct_access_key = UCT_IB_KEY; + +- uct_ib_log_exp_post_send(&iface->super.super.super, txqp->qp, wr, +- (wr->exp_opcode == IBV_EXP_WR_SEND) ? +- uct_rc_ep_am_packet_dump : NULL); ++ uct_ib_log_exp_post_send(&iface->super.super.super, txqp->qp, wr, max_log_sge, ++ ((wr->exp_opcode == IBV_EXP_WR_SEND) || ++ (wr->exp_opcode == IBV_EXP_WR_SEND_WITH_IMM)) ? ++ uct_rc_verbs_common_packet_dump : NULL); + + ret = ibv_exp_post_send(txqp->qp, wr, &bad_wr); + if (ret != 0) { +@@ -124,20 +126,22 @@ uct_dc_verbs_iface_post_send_to_dci(uct_dc_verbs_iface_t* iface, + + static UCS_F_ALWAYS_INLINE void + uct_dc_verbs_iface_post_send(uct_dc_verbs_iface_t* iface, uct_dc_verbs_ep_t *ep, +- struct ibv_exp_send_wr *wr, uint64_t send_flags) ++ struct ibv_exp_send_wr *wr, uint64_t send_flags, ++ int max_log_sge) + { + uct_dc_verbs_iface_post_send_to_dci(iface, wr, ep->super.dci, ep->ah, +- ep->dest_qpn, send_flags); ++ ep->dest_qpn, send_flags, max_log_sge); + } + + static UCS_F_ALWAYS_INLINE void + uct_dc_verbs_iface_post_send_desc(uct_dc_verbs_iface_t *iface, + uct_dc_verbs_ep_t *ep, + struct ibv_exp_send_wr *wr, +- uct_rc_iface_send_desc_t *desc, uint64_t send_flags) ++ uct_rc_iface_send_desc_t *desc, ++ uint64_t send_flags, int max_log_sge) + { + UCT_RC_VERBS_FILL_DESC_WR(wr, desc); +- uct_dc_verbs_iface_post_send(iface, ep, wr, send_flags); ++ uct_dc_verbs_iface_post_send(iface, ep, wr, send_flags, max_log_sge); + uct_rc_txqp_add_send_op_sn(&iface->super.tx.dcis[ep->super.dci].txqp, &desc->super, + iface->dcis_txcnt[ep->super.dci].pi); + } +@@ -170,7 +174,8 @@ uct_dc_verbs_ep_rdma_zcopy(uct_dc_verbs_ep_t *ep, const uct_iov_t *iov, + remote_addr, rkey); + wr.next = NULL; + +- uct_dc_verbs_iface_post_send(iface, ep, &wr, IBV_SEND_SIGNALED); ++ uct_dc_verbs_iface_post_send(iface, ep, &wr, IBV_SEND_SIGNALED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + uct_dc_verbs_iface_add_send_comp(iface, ep, comp); + return UCS_INPROGRESS; + } +@@ -195,7 +200,7 @@ ucs_status_t uct_dc_verbs_ep_get_bcopy(uct_ep_h tl_ep, + UCT_RC_VERBS_FILL_RDMA_WR(wr, wr.exp_opcode, IBV_EXP_WR_RDMA_READ, sge, + length, remote_addr, rkey); + UCT_TL_EP_STAT_OP(&ep->super.super, GET, BCOPY, length); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SIGNALED); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SIGNALED, INT_MAX); + + return UCS_INPROGRESS; + } +@@ -236,7 +241,7 @@ ucs_status_t uct_dc_verbs_ep_put_short(uct_ep_h tl_ep, const void *buffer, + UCT_RC_VERBS_FILL_INL_PUT_WR(iface, remote_addr, rkey, buffer, length); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); + uct_dc_verbs_iface_post_send(iface, ep, &iface->inl_rwrite_wr, +- IBV_SEND_INLINE|IBV_SEND_SIGNALED); ++ IBV_SEND_INLINE|IBV_SEND_SIGNALED, INT_MAX); + + return UCS_OK; + } +@@ -257,7 +262,7 @@ ssize_t uct_dc_verbs_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + UCT_RC_VERBS_FILL_RDMA_WR(wr, wr.exp_opcode, IBV_EXP_WR_RDMA_WRITE, sge, + length, remote_addr, rkey); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, BCOPY, length); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SIGNALED); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SIGNALED, INT_MAX); + + return length; + } +@@ -295,7 +300,7 @@ ucs_status_t uct_dc_verbs_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + uct_rc_verbs_iface_fill_inl_am_sge(verbs_common, id, hdr, buffer, length); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); + uct_dc_verbs_iface_post_send(iface, ep, &iface->inl_am_wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ IBV_SEND_INLINE | IBV_SEND_SOLICITED, INT_MAX); + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + + return UCS_OK; +@@ -321,7 +326,7 @@ ssize_t uct_dc_verbs_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + UCT_RC_VERBS_FILL_AM_BCOPY_WR(wr, sge, length + sizeof(uct_rc_hdr_t), + wr.exp_opcode); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SOLICITED); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SOLICITED, INT_MAX); + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + + return length; +@@ -360,7 +365,8 @@ ucs_status_t uct_dc_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *he + UCT_TL_EP_STAT_OP(&ep->super.super, AM, ZCOPY, + header_length + uct_iov_total_length(iov, iovcnt)); + uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, +- send_flags | IBV_SEND_SOLICITED); ++ send_flags | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + + return UCS_INPROGRESS; +@@ -381,7 +387,7 @@ uct_dc_verbs_iface_atomic_post(uct_dc_verbs_iface_t *iface, uct_dc_verbs_ep_t *e + UCT_RC_VERBS_FILL_ATOMIC_WR(wr, wr.exp_opcode, sge, opcode, compare_add, + swap, remote_addr, ib_rkey); + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, force_sig); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, force_sig, INT_MAX); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +@@ -394,9 +400,9 @@ uct_dc_verbs_ep_atomic(uct_dc_verbs_ep_t *ep, int opcode, void *result, + uct_rc_iface_send_desc_t *desc; + + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc, +- iface->super.super.config.atomic64_handler, +- result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, ++ desc, iface->super.super.config.atomic64_handler, ++ result, comp); + uct_dc_verbs_iface_atomic_post(iface, ep, opcode, compare_add, swap, remote_addr, + rkey, desc, IBV_SEND_SIGNALED); + return UCS_INPROGRESS; +@@ -415,7 +421,8 @@ uct_dc_verbs_iface_ext_atomic_post(uct_dc_verbs_iface_t *iface, uct_dc_verbs_ep_ + uct_rc_verbs_fill_ext_atomic_wr(&wr, &sge, opcode, length, compare_mask, + compare_add, swap, remote_addr, rkey, ep->super.atomic_mr_offset); + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, force_sig|IBV_EXP_SEND_EXT_ATOMIC_INLINE); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, ++ force_sig|IBV_EXP_SEND_EXT_ATOMIC_INLINE, INT_MAX); + } + + +@@ -431,8 +438,8 @@ uct_dc_verbs_ep_ext_atomic(uct_dc_verbs_ep_t *ep, int opcode, void *result, + uct_rc_send_handler_t handler = uct_rc_iface_atomic_handler(&iface->super.super, 1, length); + + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc, +- handler, result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, ++ desc, handler, result, comp); + uct_dc_verbs_iface_ext_atomic_post(iface, ep, opcode, length, compare_mask, + compare_add, swap, remote_addr, + rkey, desc, IBV_SEND_SIGNALED); +@@ -440,74 +447,44 @@ uct_dc_verbs_ep_ext_atomic(uct_dc_verbs_ep_t *ep, int opcode, void *result, + } + #endif + +-ucs_status_t uct_dc_verbs_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_dc_verbs_ep_atomic64_post(uct_ep_h tl_ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- + uct_dc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_verbs_iface_t); +- uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); ++ uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); + uct_rc_iface_send_desc_t *desc; + +- /* TODO don't allocate descriptor - have dummy buffer */ ++ if (opcode != UCT_ATOMIC_OP_ADD) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc); ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc); + + uct_dc_verbs_iface_atomic_post(iface, ep, +- IBV_WR_ATOMIC_FETCH_AND_ADD, add, 0, ++ IBV_WR_ATOMIC_FETCH_AND_ADD, value, 0, + remote_addr, rkey, desc, + IBV_SEND_SIGNALED); + return UCS_OK; + } + +-ucs_status_t uct_dc_verbs_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- +- return uct_dc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_WR_ATOMIC_FETCH_AND_ADD, result, add, 0, +- remote_addr, rkey, comp); +-} +- +- +-ucs_status_t uct_dc_verbs_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +-#if HAVE_IB_EXT_ATOMICS +- return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, +- result, sizeof(uint64_t), 0, 0, swap, remote_addr, +- rkey, comp); +-#else +- return UCS_ERR_UNSUPPORTED; +-#endif +-} +- +-ucs_status_t uct_dc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_dc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_WR_ATOMIC_CMP_AND_SWP, result, compare, swap, +- remote_addr, rkey, comp); +-} +- +- +-ucs_status_t uct_dc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_dc_verbs_ep_atomic32_post(uct_ep_h tl_ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { + #if HAVE_IB_EXT_ATOMICS + uct_dc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_verbs_iface_t); +- uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); ++ uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); + uct_rc_iface_send_desc_t *desc; + ++ if (opcode != UCT_ATOMIC_OP_ADD) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc); ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc); + +- /* TODO don't allocate descriptor - have dummy buffer */ + uct_dc_verbs_iface_ext_atomic_post(iface, ep, IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD, +- sizeof(uint32_t), 0, add, 0, remote_addr, ++ sizeof(uint32_t), 0, value, 0, remote_addr, + rkey, desc, IBV_EXP_SEND_SIGNALED); + return UCS_OK; + #else +@@ -515,34 +492,61 @@ ucs_status_t uct_dc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, + #endif + } + +-ucs_status_t uct_dc_verbs_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_dc_verbs_ep_atomic64_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +-#if HAVE_IB_EXT_ATOMICS +- return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD, +- result, sizeof(uint32_t), 0, add, 0, ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_dc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), ++ IBV_WR_ATOMIC_FETCH_AND_ADD, result, value, 0, + remote_addr, rkey, comp); +-#else +- return UCS_ERR_UNSUPPORTED; ++#if HAVE_IB_EXT_ATOMICS ++ case UCT_ATOMIC_OP_SWAP: ++ return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), ++ IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, ++ result, sizeof(uint64_t), 0, 0, value, remote_addr, ++ rkey, comp); + #endif ++ default: ++ return UCS_ERR_UNSUPPORTED; ++ } + } + +-ucs_status_t uct_dc_verbs_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_dc_verbs_ep_atomic32_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { + #if HAVE_IB_EXT_ATOMICS +- return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, +- result, sizeof(uint32_t), 0, 0, swap, +- remote_addr, rkey, comp); ++ int op; ++ uint32_t add; ++ uint32_t swap; ++ ucs_status_t status; ++ ++ status = uct_rc_verbs_ep_atomic32_data(opcode, value, &op, &add, &swap); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), op, ++ result, sizeof(uint32_t), 0, add, swap, ++ remote_addr, rkey, comp); + #else + return UCS_ERR_UNSUPPORTED; + #endif + } + ++ucs_status_t uct_dc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp) ++{ ++ return uct_dc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), ++ IBV_WR_ATOMIC_CMP_AND_SWP, result, compare, swap, ++ remote_addr, rkey, comp); ++} ++ + ucs_status_t uct_dc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp) +@@ -557,13 +561,13 @@ ucs_status_t uct_dc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, ui + #endif + } + +- + ucs_status_t uct_dc_verbs_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion_t *comp) + { + uct_dc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, + uct_dc_verbs_iface_t); + uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); + ucs_status_t status; ++ uint8_t dci; + + status = uct_dc_ep_flush(tl_ep, flags, comp); + if (status == UCS_OK) { +@@ -571,9 +575,13 @@ ucs_status_t uct_dc_verbs_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completio + } + + if (status == UCS_INPROGRESS) { +- ucs_assert(ep->super.dci != UCT_DC_EP_NO_DCI); +- uct_dc_verbs_iface_add_send_comp(iface, ep, comp); ++ dci = ep->super.dci; ++ ucs_assert(dci != UCT_DC_EP_NO_DCI); ++ status = uct_rc_txqp_add_flush_comp(&iface->super.super, ++ &iface->super.tx.dcis[dci].txqp, ++ comp, iface->dcis_txcnt[dci].pi); + } ++ + return status; + } + +@@ -624,7 +632,7 @@ static ucs_status_t uct_dc_verbs_reset_dci(uct_dc_iface_t *dc_iface, int dci) + iface->dcis_txcnt[dci].ci, new_ci); + iface->dcis_txcnt[dci].ci = new_ci; + +- return uct_rc_modify_qp(&dc_iface->tx.dcis[dci].txqp, IBV_QPS_RESET); ++ return uct_ib_modify_qp(dc_iface->tx.dcis[dci].txqp.qp, IBV_QPS_RESET); + } + + /* Send either request for grants or grant message. Request includes ep +@@ -647,7 +655,7 @@ ucs_status_t uct_dc_verbs_ep_fc_ctrl(uct_ep_h tl_ep, unsigned op, + uct_dc_fc_sender_data_t sender = { + .ep = (uintptr_t)dc_ep, + .global.gid = ib_iface->gid, +- .global.is_global = ib_iface->addr_type != UCT_IB_ADDRESS_TYPE_LINK_LOCAL}; ++ .global.is_global = ib_iface->is_global_addr}; + + ucs_assert(sizeof(*hdr) + sizeof(sender) <= + iface->verbs_common.config.max_inline); +@@ -670,7 +678,7 @@ ucs_status_t uct_dc_verbs_ep_fc_ctrl(uct_ep_h tl_ep, unsigned op, + + status = uct_dc_verbs_iface_create_ah( + &iface->super, dc_req->lid, +- dc_req->sender.global.is_global ? (void*)&dc_req->sender.global.gid : NULL, ++ ucs_unaligned_ptr(&dc_req->sender.global.gid), + &ah); + if (status != UCS_OK) { + return status; +@@ -680,8 +688,7 @@ ucs_status_t uct_dc_verbs_ep_fc_ctrl(uct_ep_h tl_ep, unsigned op, + iface->verbs_common.inl_sge[1].length = sizeof(dc_req->sender.ep); + uct_dc_verbs_iface_post_send_to_dci(iface, &wr, dc_ep->dci, ah, + dc_req->dct_num, +- IBV_SEND_INLINE | IBV_SEND_SIGNALED); +- ibv_destroy_ah(ah); ++ IBV_SEND_INLINE | IBV_SEND_SIGNALED, INT_MAX); + } else { + ucs_assert(op == UCT_RC_EP_FC_FLAG_HARD_REQ); + wr.exp_opcode = IBV_EXP_WR_SEND_WITH_IMM; +@@ -690,12 +697,12 @@ ucs_status_t uct_dc_verbs_ep_fc_ctrl(uct_ep_h tl_ep, unsigned op, + + /* Send out DCT number to the peer, so it will be able + * to send grants back */ +- wr.ex.imm_data = iface->super.rx.dct->dct_num; ++ wr.ex.imm_data = iface->super.rx_dct->dct_num; + + dc_verbs_ep = ucs_derived_of(dc_ep, uct_dc_verbs_ep_t); + uct_dc_verbs_iface_post_send(iface, dc_verbs_ep, &wr, + IBV_SEND_INLINE | IBV_SEND_SIGNALED | +- IBV_SEND_SOLICITED) ; ++ IBV_SEND_SOLICITED, INT_MAX) ; + UCS_STATS_UPDATE_COUNTER(dc_ep->fc.stats, + UCT_RC_FC_STAT_TX_HARD_REQ, 1); + } +@@ -765,7 +772,9 @@ ucs_status_t uct_dc_verbs_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, + uct_rc_verbs_iface_fill_inl_sge(&iface->verbs_common, &tmh, sizeof(tmh), + data, length); + uct_dc_verbs_iface_post_send(iface, ep, &iface->inl_am_wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ IBV_SEND_INLINE | IBV_SEND_SOLICITED, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); + + return UCS_OK; + } +@@ -792,7 +801,9 @@ ssize_t uct_dc_verbs_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + &iface->super.super.tx.mp, desc, + tag, app_ctx, pack_cb, arg, length); + UCT_RC_VERBS_FILL_SGE(wr, sge, length + sizeof(struct ibv_exp_tmh)); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SOLICITED); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SOLICITED, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, BCOPY, length); + + return length; + } +@@ -812,7 +823,9 @@ ucs_status_t uct_dc_verbs_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + size_t sge_cnt; + uint32_t app_ctx; + +- UCT_CHECK_IOV_SIZE(iovcnt, 1ul, "uct_dc_verbs_ep_tag_eager_zcopy"); ++ UCT_CHECK_IOV_SIZE(iovcnt, ++ uct_ib_iface_get_max_iov(&iface->super.super.super) - 1, ++ "uct_dc_verbs_ep_tag_eager_zcopy"); + UCT_RC_CHECK_ZCOPY_DATA(sizeof(struct ibv_exp_tmh), + uct_iov_total_length(iov, iovcnt), + iface->super.super.super.config.seg_size); +@@ -829,7 +842,11 @@ ucs_status_t uct_dc_verbs_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + wr.num_sge = sge_cnt + 1; + wr.sg_list = sge; + uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, +- send_flags | IBV_SEND_SOLICITED); ++ send_flags | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); + + return UCS_INPROGRESS; + } +@@ -864,10 +881,11 @@ ucs_status_ptr_t uct_dc_verbs_ep_tag_rndv_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + tmh_len, tag, iov, comp); + + uct_dc_iface_fill_ravh(rvh + sizeof(struct ibv_exp_tmh_rvh), +- iface->super.rx.dct->dct_num); ++ iface->super.rx_dct->dct_num); + + uct_dc_verbs_iface_post_send(iface, ep, &iface->inl_am_wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ IBV_SEND_INLINE | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + return (ucs_status_ptr_t)((uint64_t)rndv_idx); + } + +@@ -898,8 +916,8 @@ ucs_status_t uct_dc_verbs_ep_tag_rndv_request(uct_ep_h tl_ep, uct_tag_t tag, + uct_rc_iface_fill_tmh(&tmh, tag, app_ctx, IBV_EXP_TMH_EAGER); + uct_rc_verbs_iface_fill_inl_sge(&iface->verbs_common, &tmh, sizeof(tmh), + header, header_length); +- uct_dc_verbs_iface_post_send(iface, ep, &wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ uct_dc_verbs_iface_post_send(iface, ep, &wr, IBV_SEND_INLINE | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + + return UCS_OK; + } +@@ -990,8 +1008,8 @@ uct_dc_verbs_iface_tag_init(uct_dc_verbs_iface_t *iface, + static void uct_dc_verbs_iface_tag_cleanup(uct_dc_verbs_iface_t *iface) + { + if (UCT_RC_IFACE_TM_ENABLED(&iface->super.super)) { +- ibv_exp_destroy_dct(iface->super.rx.dct); +- iface->super.rx.dct = NULL; ++ ibv_exp_destroy_dct(iface->super.rx_dct); ++ iface->super.rx_dct = NULL; + } + + uct_rc_iface_tag_cleanup(&iface->super.super); +@@ -1021,14 +1039,12 @@ static uct_dc_iface_ops_t uct_dc_verbs_iface_ops = { + .ep_am_short = uct_dc_verbs_ep_am_short, + .ep_am_bcopy = uct_dc_verbs_ep_am_bcopy, + .ep_am_zcopy = uct_dc_verbs_ep_am_zcopy, +- .ep_atomic_add64 = uct_dc_verbs_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_dc_verbs_ep_atomic_fadd64, +- .ep_atomic_swap64 = uct_dc_verbs_ep_atomic_swap64, + .ep_atomic_cswap64 = uct_dc_verbs_ep_atomic_cswap64, +- .ep_atomic_add32 = uct_dc_verbs_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_dc_verbs_ep_atomic_fadd32, +- .ep_atomic_swap32 = uct_dc_verbs_ep_atomic_swap32, ++ .ep_atomic64_post = uct_dc_verbs_ep_atomic64_post, ++ .ep_atomic64_fetch = uct_dc_verbs_ep_atomic64_fetch, + .ep_atomic_cswap32 = uct_dc_verbs_ep_atomic_cswap32, ++ .ep_atomic32_post = uct_dc_verbs_ep_atomic32_post, ++ .ep_atomic32_fetch = uct_dc_verbs_ep_atomic32_fetch, + .ep_pending_add = uct_dc_ep_pending_add, + .ep_pending_purge = uct_dc_ep_pending_purge, + .ep_flush = uct_dc_verbs_ep_flush, +@@ -1058,10 +1074,11 @@ static uct_dc_iface_ops_t uct_dc_verbs_iface_ops = { + .iface_is_reachable = uct_dc_iface_is_reachable, + .iface_get_address = uct_dc_iface_get_address + }, +- .arm_tx_cq = uct_ib_iface_arm_tx_cq, +- .arm_rx_cq = uct_ib_iface_arm_rx_cq, ++ .arm_cq = uct_ib_iface_arm_cq, ++ .event_cq = (void*)ucs_empty_function, + .handle_failure = uct_dc_verbs_handle_failure, +- .set_ep_failed = uct_dc_verbs_ep_set_failed ++ .set_ep_failed = uct_dc_verbs_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .fc_ctrl = uct_dc_verbs_ep_fc_ctrl, + .fc_handler = uct_dc_iface_fc_handler, +@@ -1094,6 +1111,7 @@ static UCS_CLASS_INIT_FUNC(uct_dc_verbs_iface_t, uct_md_h md, uct_worker_h worke + { + uct_dc_verbs_iface_config_t *config = ucs_derived_of(tl_config, + uct_dc_verbs_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + struct ibv_qp_init_attr dci_init_attr; + struct ibv_qp_attr dci_attr; + ucs_status_t status; +@@ -1102,9 +1120,11 @@ static UCS_CLASS_INIT_FUNC(uct_dc_verbs_iface_t, uct_md_h md, uct_worker_h worke + + ucs_trace_func(""); + ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ init_attr.tm_cap_bit = IBV_EXP_TM_CAP_DC; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_dc_iface_t, &uct_dc_verbs_iface_ops, md, +- worker, params, 0, &config->super, +- IBV_EXP_TM_CAP_DC); ++ worker, params, &config->super, &init_attr); + + uct_dc_verbs_iface_init_wrs(self); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.c +index ceed2f8..6e65f55 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.c +@@ -17,166 +17,67 @@ + #include + + +-typedef struct uct_ib_mlx5_qp_info { +- uint32_t qpn; /* QP number */ +- volatile uint32_t *dbrec; /* QP doorbell record in RAM */ +- +- struct { +- void *buf; /* Work queue buffer */ +- unsigned wqe_cnt; /* Number of WQEs in the work queue */ +- unsigned stride; /* Size of each WQE */ +- } sq, rq; +- +- struct { +- void *reg; /* BlueFlame register */ +- unsigned size; /* BlueFlame register size (0 - unsupported) */ +- } bf; +-} uct_ib_mlx5_qp_info_t; +- +- +-typedef struct uct_ib_mlx5_srq_info { +- void *buf; /* SRQ queue buffer */ +- volatile uint32_t *dbrec; /* SRQ doorbell record in RAM */ +- unsigned stride; /* Size of each WQE */ +- unsigned head; +- unsigned tail; +-} uct_ib_mlx5_srq_info_t; +- +-static void UCS_F_MAYBE_UNUSED uct_ib_mlx5_obj_error(const char *obj_name) +-{ +- ucs_error("Failed to get mlx5 %s information. Please make sure the installed " +- "libmlx5 version matches the one UCX was compiled with (%s)", +- obj_name, LIB_MLX5_VER); +-} +- +-static ucs_status_t uct_ib_mlx5_get_qp_info(struct ibv_qp *qp, uct_ib_mlx5_qp_info_t *qp_info) +-{ +-#if HAVE_DECL_IBV_MLX5_EXP_GET_QP_INFO +- struct ibv_mlx5_qp_info ibv_qp_info; +- int ret; +- +- ret = ibv_mlx5_exp_get_qp_info(qp, &ibv_qp_info); +- if (ret != 0) { +- uct_ib_mlx5_obj_error("qp"); +- return UCS_ERR_NO_DEVICE; +- } +- +- qp_info->qpn = ibv_qp_info.qpn; +- qp_info->dbrec = ibv_qp_info.dbrec; +- qp_info->sq.buf = ibv_qp_info.sq.buf; +- qp_info->sq.wqe_cnt = ibv_qp_info.sq.wqe_cnt; +- qp_info->sq.stride = ibv_qp_info.sq.stride; +- qp_info->rq.buf = ibv_qp_info.rq.buf; +- qp_info->rq.wqe_cnt = ibv_qp_info.rq.wqe_cnt; +- qp_info->rq.stride = ibv_qp_info.rq.stride; +- qp_info->bf.reg = ibv_qp_info.bf.reg; +- qp_info->bf.size = ibv_qp_info.bf.size; +-#else +- struct mlx5_qp *mqp = ucs_container_of(qp, struct mlx5_qp, verbs_qp.qp); +- +- if ((mqp->sq.cur_post != 0) || (mqp->rq.head != 0)) { +- ucs_warn("cur_post=%d head=%d need_lock=%d", mqp->sq.cur_post, +- mqp->rq.head, mqp->bf->need_lock); +- return UCS_ERR_NO_DEVICE; +- } +- +- qp_info->qpn = qp->qp_num; +- qp_info->dbrec = mqp->db; +- qp_info->sq.buf = mqp->buf.buf + mqp->sq.offset; +- qp_info->sq.wqe_cnt = mqp->sq.wqe_cnt; +- qp_info->sq.stride = 1 << mqp->sq.wqe_shift; +- qp_info->rq.buf = mqp->buf.buf + mqp->rq.offset; +- qp_info->rq.wqe_cnt = mqp->rq.wqe_cnt; +- qp_info->rq.stride = 1 << mqp->rq.wqe_shift; +- qp_info->bf.reg = mqp->bf->reg; +- +- if (mqp->bf->uuarn > 0) { +- qp_info->bf.size = mqp->bf->buf_size; +- } else { +- qp_info->bf.size = 0; /* No BF */ +- } ++static const char *uct_ib_mlx5_mmio_modes[] = { ++ [UCT_IB_MLX5_MMIO_MODE_BF_POST] = "bf_post", ++ [UCT_IB_MLX5_MMIO_MODE_BF_POST_MT] = "bf_post_mt", ++ [UCT_IB_MLX5_MMIO_MODE_DB] = "db", ++ [UCT_IB_MLX5_MMIO_MODE_AUTO] = "auto", ++ [UCT_IB_MLX5_MMIO_MODE_LAST] = NULL ++}; ++ ++ucs_config_field_t uct_ib_mlx5_iface_config_table[] = { ++#if HAVE_IBV_EXP_DM ++ {"DM_SIZE", "2k", ++ "Device Memory segment size (0 - disabled)", ++ ucs_offsetof(uct_ib_mlx5_iface_config_t, dm.seg_len), UCS_CONFIG_TYPE_MEMUNITS}, ++ {"DM_COUNT", "1", ++ "Device Memory segments count (0 - disabled)", ++ ucs_offsetof(uct_ib_mlx5_iface_config_t, dm.count), UCS_CONFIG_TYPE_UINT}, + #endif +- return UCS_OK; +-} + +-static ucs_status_t uct_ib_mlx5_get_srq_info(struct ibv_srq *srq, +- uct_ib_mlx5_srq_info_t *srq_info) +-{ +-#if HAVE_DECL_IBV_MLX5_EXP_GET_SRQ_INFO +- struct ibv_mlx5_srq_info ibv_srq_info; +- int ret; ++ {"MMIO_MODE", "auto", ++ "How to write to MMIO register when posting sends on a QP. One of the following:\n" ++ " bf_post - BlueFlame post, write the WQE fully to MMIO register.\n" ++ " bf_post_mt - Thread-safe BlueFlame, same as bf_post but same MMIO register can be used\n" ++ " by multiple threads.\n" ++ " db - Doorbell mode, write only 8 bytes to MMIO register, followed by a memory\n" ++ " store fence, which makes sure the doorbell goes out on the bus.\n" ++ " auto - Select best according to worker thread mode.", ++ ucs_offsetof(uct_ib_mlx5_iface_config_t, mmio_mode), ++ UCS_CONFIG_TYPE_ENUM(uct_ib_mlx5_mmio_modes)}, + +- ret = ibv_mlx5_exp_get_srq_info(srq, &ibv_srq_info); +- if (ret != 0) { +- uct_ib_mlx5_obj_error("srq"); +- return UCS_ERR_NO_DEVICE; +- } +- +- srq_info->buf = ibv_srq_info.buf; +- srq_info->dbrec = ibv_srq_info.dbrec; +- srq_info->stride = ibv_srq_info.stride; +- srq_info->head = ibv_srq_info.head; +- srq_info->tail = ibv_srq_info.tail; +-#else +- struct mlx5_srq *msrq; +- +- if (srq->handle == LEGACY_XRC_SRQ_HANDLE) { +- srq = (struct ibv_srq *)(((struct ibv_srq_legacy *)srq)->ibv_srq); +- } +- +- msrq = ucs_container_of(srq, struct mlx5_srq, vsrq.srq); +- +- if (msrq->counter != 0) { +- ucs_error("SRQ counter is not 0 (%d)", msrq->counter); +- return UCS_ERR_NO_DEVICE; +- } +- +- srq_info->buf = msrq->buf.buf; +- srq_info->dbrec = msrq->db; +- srq_info->stride = 1 << msrq->wqe_shift; +- srq_info->head = msrq->head; +- srq_info->tail = msrq->tail; +-#endif +- return UCS_OK; +-} ++ {NULL} ++}; + + ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5_cq_t *mlx5_cq) + { ++ uct_ib_mlx5dv_cq_t dcq = {}; ++ uct_ib_mlx5dv_t obj = {}; ++ struct mlx5_cqe64 *cqe; + unsigned cqe_size; +-#if HAVE_DECL_IBV_MLX5_EXP_GET_CQ_INFO +- struct ibv_mlx5_cq_info ibv_cq_info; +- int ret; ++ ucs_status_t status; ++ int ret, i; + +- ret = ibv_mlx5_exp_get_cq_info(cq, &ibv_cq_info); +- if (ret != 0) { +- uct_ib_mlx5_obj_error("cq"); +- return UCS_ERR_NO_DEVICE; ++ obj.dv.cq.in = cq; ++ obj.dv.cq.out = &dcq.dv; ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_CQ); ++ if (status != UCS_OK) { ++ return UCS_ERR_IO_ERROR; + } + +- mlx5_cq->cq_buf = ibv_cq_info.buf; ++ mlx5_cq->cq_buf = dcq.dv.buf; + mlx5_cq->cq_ci = 0; +- mlx5_cq->cq_length = ibv_cq_info.cqe_cnt; +-#if ENABLE_DEBUG_DATA +- mlx5_cq->cq_num = ibv_cq_info.cqn; +-#endif +- cqe_size = ibv_cq_info.cqe_size; ++ mlx5_cq->cq_sn = 0; ++ mlx5_cq->cq_length = dcq.dv.cqe_cnt; ++ mlx5_cq->cq_num = dcq.dv.cqn; ++#if HAVE_STRUCT_MLX5DV_CQ_CQ_UAR ++ mlx5_cq->uar = dcq.dv.cq_uar; + #else +- struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); +- int ret; +- +- if (mcq->cons_index != 0) { +- ucs_error("CQ consumer index is not 0 (%d)", mcq->cons_index); +- return UCS_ERR_NO_DEVICE; +- } +- +- mlx5_cq->cq_buf = mcq->active_buf->buf; +- mlx5_cq->cq_ci = 0; +- mlx5_cq->cq_length = mcq->ibv_cq.cqe + 1; +-#if ENABLE_DEBUG_DATA +- mlx5_cq->cq_num = mcq->cqn; +-#endif +- cqe_size = mcq->cqe_sz; ++ /* coverity[var_deref_model] */ ++ mlx5_cq->uar = uct_dv_get_info_uar0(dcq.dv.uar); + #endif ++ mlx5_cq->dbrec = dcq.dv.dbrec; ++ cqe_size = dcq.dv.cqe_size; + + /* Move buffer forward for 128b CQE, so we would get pointer to the 2nd + * 64b when polling. +@@ -191,28 +92,18 @@ ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5_cq_t *mlx5_cq) + + mlx5_cq->cqe_size_log = ucs_ilog2(cqe_size); + ucs_assert_always((1<cqe_size_log) == cqe_size); +- return UCS_OK; +-} + +-void uct_ib_mlx5_update_cq_ci(struct ibv_cq *cq, unsigned cq_ci) +-{ +-#if HAVE_DECL_IBV_MLX5_EXP_UPDATE_CQ_CI +- ibv_mlx5_exp_update_cq_ci(cq, cq_ci); +-#else +- struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); +- mcq->cons_index = cq_ci; +-#endif +-} ++ /* Set owner bit for all CQEs, so that CQE would look like it is in HW ++ * ownership. In this case CQ polling functions will return immediately if ++ * no any CQE ready, there is no need to check opcode for ++ * MLX5_CQE_INVALID value anymore. */ ++ for (i = 0; i < mlx5_cq->cq_length; ++i) { ++ cqe = uct_ib_mlx5_get_cqe(mlx5_cq, i); ++ cqe->op_own |= MLX5_CQE_OWNER_MASK; ++ } + +-unsigned uct_ib_mlx5_get_cq_ci(struct ibv_cq *cq) +-{ +- struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); +- return mcq->cons_index; +-} + +-void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av) +-{ +- memcpy(av, &ucs_container_of(ah, struct mlx5_ah, ibv_ah)->av, sizeof(*av)); ++ return UCS_OK; + } + + ucs_status_t uct_ib_mlx5_get_compact_av(uct_ib_iface_t *iface, int *compact_av) +@@ -233,13 +124,13 @@ ucs_status_t uct_ib_mlx5_get_compact_av(uct_ib_iface_t *iface, int *compact_av) + } + + uct_ib_iface_fill_ah_attr_from_addr(iface, ib_addr, iface->path_bits[0], &ah_attr); ++ ah_attr.is_global = iface->is_global_addr; + status = uct_ib_iface_create_ah(iface, &ah_attr, &ah); + if (status != UCS_OK) { + return status; + } + + uct_ib_mlx5_get_av(ah, &mlx5_av); +- ibv_destroy_ah(ah); + + /* copy MLX5_EXTENDED_UD_AV from the driver, if the flag is not present then + * the device supports compact address vector. */ +@@ -247,7 +138,6 @@ ucs_status_t uct_ib_mlx5_get_compact_av(uct_ib_iface_t *iface, int *compact_av) + return UCS_OK; + } + +- + void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, + struct mlx5_cqe64 *cqe) + { +@@ -258,14 +148,15 @@ void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, + /* update ci before invoking error callback, since it can poll on cq */ + UCS_STATIC_ASSERT(MLX5_CQE_REQ_ERR & (UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK >> 4)); + ++cq->cq_ci; +- status = uct_ib_mlx5_completion_with_err((void*)cqe, UCS_LOG_LEVEL_DEBUG); ++ status = uct_ib_mlx5_completion_with_err(iface, (void*)cqe, ++ UCS_LOG_LEVEL_DEBUG); + iface->ops->handle_failure(iface, cqe, status); + return; + case MLX5_CQE_RESP_ERR: + /* Local side failure - treat as fatal */ + UCS_STATIC_ASSERT(MLX5_CQE_RESP_ERR & (UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK >> 4)); + ++cq->cq_ci; +- uct_ib_mlx5_completion_with_err((void*)cqe, UCS_LOG_LEVEL_FATAL); ++ uct_ib_mlx5_completion_with_err(iface, (void*)cqe, UCS_LOG_LEVEL_FATAL); + return; + default: + /* CQE might have been updated by HW. Skip it now, and it would be handled +@@ -274,74 +165,106 @@ void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, + } + } + +-static int uct_ib_mlx5_bf_cmp(uct_ib_mlx5_bf_t *bf, uintptr_t addr, unsigned bf_size) ++static int uct_ib_mlx5_mmio_cmp(uct_ib_mlx5_mmio_reg_t *reg, uintptr_t addr, ++ unsigned bf_size) + { +- return ((bf->reg.addr & ~UCT_IB_MLX5_BF_REG_SIZE) == (addr & ~UCT_IB_MLX5_BF_REG_SIZE)); ++ return (reg->addr.uint & ~UCT_IB_MLX5_BF_REG_SIZE) == ++ (addr & ~UCT_IB_MLX5_BF_REG_SIZE); + } + +-static void uct_ib_mlx5_bf_init(uct_ib_mlx5_bf_t *bf, uintptr_t addr, unsigned bf_size) ++static ucs_status_t uct_ib_mlx5_mmio_init(uct_ib_mlx5_mmio_reg_t *reg, ++ uintptr_t addr, ++ uct_ib_mlx5_mmio_mode_t mmio_mode) + { +- bf->reg.addr = addr; +- bf->enable_bf = bf_size; ++ reg->addr.uint = addr; ++ reg->mode = mmio_mode; ++ return UCS_OK; + } + +-static void uct_ib_mlx5_bf_cleanup(uct_ib_mlx5_bf_t *bf) ++static void uct_ib_mlx5_mmio_cleanup(uct_ib_mlx5_mmio_reg_t *reg) + { + } + + void uct_ib_mlx5_txwq_reset(uct_ib_mlx5_txwq_t *txwq) + { +- txwq->curr = txwq->qstart; +- txwq->sw_pi = txwq->prev_sw_pi = 0; ++ txwq->curr = txwq->qstart; ++ txwq->sw_pi = 0; ++ txwq->prev_sw_pi = -1; + #if ENABLE_ASSERT +- txwq->hw_ci = 0xFFFF; ++ txwq->hw_ci = 0xFFFF; + #endif + memset(txwq->qstart, 0, txwq->qend - txwq->qstart); + } + + ucs_status_t uct_ib_mlx5_txwq_init(uct_priv_worker_t *worker, ++ uct_ib_mlx5_mmio_mode_t cfg_mmio_mode, + uct_ib_mlx5_txwq_t *txwq, + struct ibv_qp *verbs_qp) + { +- uct_ib_mlx5_qp_info_t qp_info; ++ uct_ib_mlx5_mmio_mode_t mmio_mode; ++ uct_ib_mlx5dv_qp_t qp_info = {}; ++ uct_ib_mlx5dv_t obj = {}; + ucs_status_t status; + +- status = uct_ib_mlx5_get_qp_info(verbs_qp, &qp_info); ++ obj.dv.qp.in = verbs_qp; ++ obj.dv.qp.out = &qp_info.dv; ++ ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_QP); + if (status != UCS_OK) { + return UCS_ERR_IO_ERROR; + } + +- if ((qp_info.sq.stride != MLX5_SEND_WQE_BB) || !ucs_is_pow2(qp_info.sq.wqe_cnt) || +- ((qp_info.bf.size != 0) && (qp_info.bf.size != UCT_IB_MLX5_BF_REG_SIZE))) ++ if ((qp_info.dv.sq.stride != MLX5_SEND_WQE_BB) || !ucs_is_pow2(qp_info.dv.sq.wqe_cnt) || ++ ((qp_info.dv.bf.size != 0) && (qp_info.dv.bf.size != UCT_IB_MLX5_BF_REG_SIZE))) + { + ucs_error("mlx5 device parameters not suitable for transport " + "bf.size(%d) %d, sq.stride(%d) %d, wqe_cnt %d", +- UCT_IB_MLX5_BF_REG_SIZE, qp_info.bf.size, +- MLX5_SEND_WQE_BB, qp_info.sq.stride, qp_info.sq.wqe_cnt); ++ UCT_IB_MLX5_BF_REG_SIZE, qp_info.dv.bf.size, ++ MLX5_SEND_WQE_BB, qp_info.dv.sq.stride, qp_info.dv.sq.wqe_cnt); + return UCS_ERR_IO_ERROR; + } + +- ucs_debug("tx wq %d bytes [bb=%d, nwqe=%d]", +- qp_info.sq.stride * qp_info.sq.wqe_cnt, +- qp_info.sq.stride, qp_info.sq.wqe_cnt); ++ if (cfg_mmio_mode != UCT_IB_MLX5_MMIO_MODE_AUTO) { ++ mmio_mode = cfg_mmio_mode; ++ } else if (qp_info.dv.bf.size > 0) { ++ if (worker->thread_mode == UCS_THREAD_MODE_SINGLE) { ++ mmio_mode = UCT_IB_MLX5_MMIO_MODE_BF_POST; ++ } else if (worker->thread_mode == UCS_THREAD_MODE_SERIALIZED) { ++ mmio_mode = UCT_IB_MLX5_MMIO_MODE_BF_POST_MT; ++ } else { ++ ucs_error("unsupported thread mode for mlx5: %d", worker->thread_mode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ } else { ++ mmio_mode = UCT_IB_MLX5_MMIO_MODE_DB; ++ } + +- txwq->qstart = qp_info.sq.buf; +- txwq->qend = qp_info.sq.buf + (qp_info.sq.stride * qp_info.sq.wqe_cnt); +- txwq->bf = uct_worker_tl_data_get(worker, ++ ucs_debug("tx wq %d bytes [bb=%d, nwqe=%d] mmio_mode %s", ++ qp_info.dv.sq.stride * qp_info.dv.sq.wqe_cnt, ++ qp_info.dv.sq.stride, qp_info.dv.sq.wqe_cnt, ++ uct_ib_mlx5_mmio_modes[mmio_mode]); ++ ++ txwq->qstart = qp_info.dv.sq.buf; ++ txwq->qend = qp_info.dv.sq.buf + (qp_info.dv.sq.stride * qp_info.dv.sq.wqe_cnt); ++ txwq->reg = uct_worker_tl_data_get(worker, + UCT_IB_MLX5_WORKER_BF_KEY, +- uct_ib_mlx5_bf_t, +- uct_ib_mlx5_bf_cmp, +- uct_ib_mlx5_bf_init, +- (uintptr_t)qp_info.bf.reg, +- qp_info.bf.size); +- txwq->dbrec = &qp_info.dbrec[MLX5_SND_DBR]; ++ uct_ib_mlx5_mmio_reg_t, ++ uct_ib_mlx5_mmio_cmp, ++ uct_ib_mlx5_mmio_init, ++ (uintptr_t)qp_info.dv.bf.reg, ++ mmio_mode); ++ if (UCS_PTR_IS_ERR(txwq->reg)) { ++ return UCS_PTR_STATUS(txwq->reg); ++ } ++ ++ txwq->dbrec = &qp_info.dv.dbrec[MLX5_SND_DBR]; + /* need to reserve 2x because: + * - on completion we only get the index of last wqe and we do not + * really know how many bb is there (but no more than max bb + * - on send we check that there is at least one bb. We know + * exact number of bbs once we actually are sending. + */ +- txwq->bb_max = qp_info.sq.wqe_cnt - 2 * UCT_IB_MLX5_MAX_BB; ++ txwq->bb_max = qp_info.dv.sq.wqe_cnt - 2 * UCT_IB_MLX5_MAX_BB; + ucs_assert_always(txwq->bb_max > 0); + + uct_ib_mlx5_txwq_reset(txwq); +@@ -350,32 +273,36 @@ ucs_status_t uct_ib_mlx5_txwq_init(uct_priv_worker_t *worker, + + void uct_ib_mlx5_txwq_cleanup(uct_ib_mlx5_txwq_t* txwq) + { +- uct_worker_tl_data_put(txwq->bf, uct_ib_mlx5_bf_cleanup); ++ uct_worker_tl_data_put(txwq->reg, uct_ib_mlx5_mmio_cleanup); + } + + ucs_status_t uct_ib_mlx5_get_rxwq(struct ibv_qp *verbs_qp, uct_ib_mlx5_rxwq_t *rxwq) + { +- uct_ib_mlx5_qp_info_t qp_info; ++ uct_ib_mlx5dv_qp_t qp_info = {}; ++ uct_ib_mlx5dv_t obj = {}; + ucs_status_t status; + +- status = uct_ib_mlx5_get_qp_info(verbs_qp, &qp_info); ++ obj.dv.qp.in = verbs_qp; ++ obj.dv.qp.out = &qp_info.dv; ++ ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_QP); + if (status != UCS_OK) { + return UCS_ERR_IO_ERROR; + } + +- if (!ucs_is_pow2(qp_info.rq.wqe_cnt) || +- qp_info.rq.stride != sizeof(struct mlx5_wqe_data_seg)) { ++ if (!ucs_is_pow2(qp_info.dv.rq.wqe_cnt) || ++ qp_info.dv.rq.stride != sizeof(struct mlx5_wqe_data_seg)) { + ucs_error("mlx5 rx wq [count=%d stride=%d] has invalid parameters", +- qp_info.rq.wqe_cnt, +- qp_info.rq.stride); ++ qp_info.dv.rq.wqe_cnt, ++ qp_info.dv.rq.stride); + return UCS_ERR_IO_ERROR; + } +- rxwq->wqes = qp_info.rq.buf; ++ rxwq->wqes = qp_info.dv.rq.buf; + rxwq->rq_wqe_counter = 0; + rxwq->cq_wqe_counter = 0; +- rxwq->mask = qp_info.rq.wqe_cnt - 1; +- rxwq->dbrec = &qp_info.dbrec[MLX5_RCV_DBR]; +- memset(rxwq->wqes, 0, qp_info.rq.wqe_cnt * sizeof(struct mlx5_wqe_data_seg)); ++ rxwq->mask = qp_info.dv.rq.wqe_cnt - 1; ++ rxwq->dbrec = &qp_info.dv.dbrec[MLX5_RCV_DBR]; ++ memset(rxwq->wqes, 0, qp_info.dv.rq.wqe_cnt * sizeof(struct mlx5_wqe_data_seg)); + + return UCS_OK; + } +@@ -383,41 +310,45 @@ ucs_status_t uct_ib_mlx5_get_rxwq(struct ibv_qp *verbs_qp, uct_ib_mlx5_rxwq_t *r + ucs_status_t uct_ib_mlx5_srq_init(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_srq, + size_t sg_byte_count) + { +- uct_ib_mlx5_srq_info_t srq_info; ++ uct_ib_mlx5dv_srq_t srq_info = {}; + uct_ib_mlx5_srq_seg_t *seg; ++ uct_ib_mlx5dv_t obj = {}; + ucs_status_t status; + unsigned i; + +- status = uct_ib_mlx5_get_srq_info(verbs_srq, &srq_info); ++ obj.dv.srq.in = verbs_srq; ++ obj.dv.srq.out = &srq_info.dv; ++ ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_SRQ); + if (status != UCS_OK) { + return status; + } + +- if (srq_info.head != 0) { +- ucs_error("SRQ head is not 0 (%d)", srq_info.head); ++ if (srq_info.dv.head != 0) { ++ ucs_error("SRQ head is not 0 (%d)", srq_info.dv.head); + return UCS_ERR_NO_DEVICE; + } + +- if (srq_info.stride != UCT_IB_MLX5_SRQ_STRIDE) { ++ if (srq_info.dv.stride != UCT_IB_MLX5_SRQ_STRIDE) { + ucs_error("SRQ stride is not %lu (%d)", UCT_IB_MLX5_SRQ_STRIDE, +- srq_info.stride); ++ srq_info.dv.stride); + return UCS_ERR_NO_DEVICE; + } + +- if (!ucs_is_pow2(srq_info.tail + 1)) { +- ucs_error("SRQ length is not power of 2 (%d)", srq_info.tail + 1); ++ if (!ucs_is_pow2(srq_info.dv.tail + 1)) { ++ ucs_error("SRQ length is not power of 2 (%d)", srq_info.dv.tail + 1); + return UCS_ERR_NO_DEVICE; + } + +- srq->buf = srq_info.buf; +- srq->db = srq_info.dbrec; +- srq->free_idx = srq_info.tail; ++ srq->buf = srq_info.dv.buf; ++ srq->db = srq_info.dv.dbrec; ++ srq->free_idx = srq_info.dv.tail; + srq->ready_idx = -1; + srq->sw_pi = -1; +- srq->mask = srq_info.tail; +- srq->tail = srq_info.tail; ++ srq->mask = srq_info.dv.tail; ++ srq->tail = srq_info.dv.tail; + +- for (i = srq_info.head; i <= srq_info.tail; ++i) { ++ for (i = srq_info.dv.head; i <= srq_info.dv.tail; ++i) { + seg = uct_ib_mlx5_srq_get_wqe(srq, i); + seg->srq.free = 0; + seg->srq.desc = NULL; +@@ -429,11 +360,15 @@ ucs_status_t uct_ib_mlx5_srq_init(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_ + + void uct_ib_mlx5_srq_cleanup(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_srq) + { +- uct_ib_mlx5_srq_info_t srq_info; ++ uct_ib_mlx5dv_srq_t srq_info = {}; ++ uct_ib_mlx5dv_t obj = {}; + ucs_status_t status; + +- status = uct_ib_mlx5_get_srq_info(verbs_srq, &srq_info); ++ obj.dv.srq.in = verbs_srq; ++ obj.dv.srq.out = &srq_info.dv; ++ ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_SRQ); + ucs_assert_always(status == UCS_OK); +- ucs_assertv_always(srq->tail == srq_info.tail, "srq->tail=%d srq_info.tail=%d", +- srq->tail, srq_info.tail); ++ ucs_assertv_always(srq->tail == srq_info.dv.tail, "srq->tail=%d srq_info.tail=%d", ++ srq->tail, srq_info.dv.tail); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.h +index 372fc68..10c7672 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.h +@@ -16,7 +16,30 @@ + #include + #include + +-#include ++/** ++ * When using a clang version that is higher than 3.0, the GNUC_MINOR is set ++ * to 2, which affects the offset of several fields that are used by UCX from ++ * the liblmlx5 library (from the mlx5_qp struct). ++ * According to libmlx5, resetting the GNUC_MINOR version to 3, will make the ++ * offset of these fields inside libmlx5 (when compiled with GCC) the same as ++ * the one used by UCX (when compiled with clang). ++ */ ++#ifdef __clang__ ++# define CLANG_VERSION ( __clang_major__ * 100 + __clang_minor__) ++# if CLANG_VERSION >= 300 ++# undef __GNUC_MINOR__ ++# define __GNUC_MINOR__ 3 ++# endif ++#endif ++ ++#if HAVE_INFINIBAND_MLX5DV_H ++# include ++#else ++# include ++# include "ib_mlx5_hw.h" ++#endif ++#include "ib_mlx5_dv.h" ++ + #include + #include + #include +@@ -29,10 +52,17 @@ + #define UCT_IB_MLX5_CQE128_SIZE_LOG 7 + #define UCT_IB_MLX5_MAX_BB 4 + #define UCT_IB_MLX5_WORKER_BF_KEY 0x00c1b7e8u ++#define UCT_IB_MLX5_RES_DOMAIN_KEY 0x1b1bda7aU ++#define UCT_IB_MLX5_WORKER_DM_KEY 0xacdf1245u + #define UCT_IB_MLX5_EXTENDED_UD_AV 0x80 /* htonl(0x80000000) */ ++#define UCT_IB_MLX5_AV_GRH_PRESENT 0x40 /* htonl(UCS_BIT(30)) */ + #define UCT_IB_MLX5_BF_REG_SIZE 256 + #define UCT_IB_MLX5_CQE_VENDOR_SYND_ODP 0x93 + #define UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK 0x80 ++#define UCT_IB_MLX5_MAX_SEND_WQE_SIZE (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB) ++#define UCT_IB_MLX5_CQ_SET_CI 0 ++#define UCT_IB_MLX5_CQ_ARM_DB 1 ++#define UCT_IB_MLX5_ROCE_SRC_PORT_MIN 0xC000 + + + #define UCT_IB_MLX5_OPMOD_EXT_ATOMIC(_log_arg_size) \ +@@ -51,9 +81,11 @@ + /* do not use direct cast from address of reserved0 to avoid compilation warnings */ + # define mlx5_av_grh(_av) ((struct mlx5_grh_av *)(((char*)(_av)) + \ + ucs_offsetof(struct mlx5_wqe_av, reserved0[0]))) +-# define UCT_IB_MLX5_AV_BASE_SIZE sizeof(struct mlx5_wqe_av) ++# define UCT_IB_MLX5_AV_BASE_SIZE ucs_offsetof(struct mlx5_wqe_av, reserved0[0]) + # define UCT_IB_MLX5_AV_FULL_SIZE sizeof(struct mlx5_wqe_av) + ++# define mlx5_base_av mlx5_wqe_av ++ + struct mlx5_grh_av { + uint8_t reserved0[4]; + uint8_t rmac[6]; +@@ -72,7 +104,7 @@ struct mlx5_grh_av { + #define UCT_IB_MLX5_AM_ZCOPY_MAX_IOV 3UL + + #define UCT_IB_MLX5_AM_MAX_SHORT(_av_size) \ +- (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB - \ ++ (UCT_IB_MLX5_MAX_SEND_WQE_SIZE - \ + (sizeof(struct mlx5_wqe_ctrl_seg) + \ + (_av_size) + \ + sizeof(struct mlx5_wqe_inl_data_seg))) +@@ -87,6 +119,28 @@ struct mlx5_grh_av { + #define UCT_IB_MLX5_SRQ_STRIDE (sizeof(struct mlx5_wqe_srq_next_seg) + \ + sizeof(struct mlx5_wqe_data_seg)) + ++typedef enum { ++ UCT_IB_MLX5_MMIO_MODE_BF_POST, /* BF without flush, can be used only from ++ one thread */ ++ UCT_IB_MLX5_MMIO_MODE_BF_POST_MT, /* BF with order, can be used by multiple ++ serialized threads */ ++ UCT_IB_MLX5_MMIO_MODE_DB, /* 8-byte doorbell (with the mandatory flush) */ ++ UCT_IB_MLX5_MMIO_MODE_AUTO, /* Auto-select according to driver/HW capabilities ++ and multi-thread support level */ ++ UCT_IB_MLX5_MMIO_MODE_LAST ++} uct_ib_mlx5_mmio_mode_t; ++ ++ ++typedef struct uct_ib_mlx5_iface_config { ++#if HAVE_IBV_EXP_DM ++ struct { ++ size_t seg_len; ++ unsigned count; ++ } dm; ++#endif ++ uct_ib_mlx5_mmio_mode_t mmio_mode; ++} uct_ib_mlx5_iface_config_t; ++ + + /* Shared receive queue */ + typedef struct uct_ib_mlx5_srq { +@@ -104,30 +158,31 @@ typedef struct uct_ib_mlx5_srq { + typedef struct uct_ib_mlx5_cq { + void *cq_buf; + unsigned cq_ci; ++ unsigned cq_sn; + unsigned cq_length; + unsigned cqe_size_log; +-#if ENABLE_DEBUG_DATA + unsigned cq_num; +-#endif ++ void *uar; ++ volatile uint32_t *dbrec; + } uct_ib_mlx5_cq_t; + + + /* Blue flame register */ +-typedef struct uct_ib_mlx5_bf { ++typedef struct uct_ib_mlx5_mmio_reg { + uct_worker_tl_data_t super; + union { + void *ptr; +- uintptr_t addr; +- } reg; +- unsigned enable_bf; /* BF/DB method selector. DB used if zero */ +-} uct_ib_mlx5_bf_t; ++ uintptr_t uint; ++ } addr; ++ uct_ib_mlx5_mmio_mode_t mode; ++} uct_ib_mlx5_mmio_reg_t; + + + /* Send work-queue */ + typedef struct uct_ib_mlx5_txwq { + uint16_t sw_pi; /* PI for next WQE */ + uint16_t prev_sw_pi; /* PI where last WQE *started* */ +- uct_ib_mlx5_bf_t *bf; ++ uct_ib_mlx5_mmio_reg_t *reg; + void *curr; + volatile uint32_t *dbrec; + void *qstart; +@@ -163,6 +218,21 @@ typedef struct uct_ib_mlx5_base_av { + } UCS_S_PACKED uct_ib_mlx5_base_av_t; + + ++typedef struct uct_ib_mlx5_err_cqe { ++ uint8_t rsvd0[32]; ++ uint32_t srqn; ++ uint8_t rsvd1[16]; ++ uint8_t hw_err_synd; ++ uint8_t hw_synd_type; ++ uint8_t vendor_err_synd; ++ uint8_t syndrome; ++ uint32_t s_wqe_opcode_qpn; ++ uint16_t wqe_counter; ++ uint8_t signature; ++ uint8_t op_own; ++} UCS_S_PACKED uct_ib_mlx5_err_cqe_t; ++ ++ + /** + * SRQ segment + * +@@ -208,25 +278,18 @@ struct uct_ib_mlx5_atomic_masked_cswap64_seg { + } UCS_S_PACKED; + + +-/** +- * Get internal CQ information. +- */ +-ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5_cq_t *mlx5_cq); ++struct uct_ib_mlx5_atomic_masked_fadd64_seg { ++ uint64_t add; ++ uint64_t filed_boundary; ++} UCS_S_PACKED; + +-/** +- * Update CI to support req_notify_cq +- */ +-void uct_ib_mlx5_update_cq_ci(struct ibv_cq *cq, unsigned cq_ci); + +-/** +- * Retrieve CI from the driver +- */ +-unsigned uct_ib_mlx5_get_cq_ci(struct ibv_cq *cq); ++extern ucs_config_field_t uct_ib_mlx5_iface_config_table[]; + + /** +- * Get internal AV information. ++ * Get internal CQ information. + */ +-void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av); ++ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5_cq_t *mlx5_cq); + + /** + * Get flag indicating compact AV support. +@@ -234,6 +297,11 @@ void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av); + ucs_status_t uct_ib_mlx5_get_compact_av(uct_ib_iface_t *iface, int *compact_av); + + /** ++ * Requests completion notification. ++ */ ++int uct_ib_mlx5dv_arm_cq(uct_ib_mlx5_cq_t *cq, int solicited); ++ ++/** + * Check for completion with error. + */ + void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, +@@ -242,8 +310,9 @@ void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, + /** + * Initialize txwq structure. + */ +-ucs_status_t uct_ib_mlx5_txwq_init(uct_priv_worker_t *worker, uct_ib_mlx5_txwq_t *txwq, +- struct ibv_qp *verbs_qp); ++ucs_status_t uct_ib_mlx5_txwq_init(uct_priv_worker_t *worker, ++ uct_ib_mlx5_mmio_mode_t cfg_mmio_mode, ++ uct_ib_mlx5_txwq_t *txwq, struct ibv_qp *verbs_qp); + void uct_ib_mlx5_txwq_cleanup(uct_ib_mlx5_txwq_t* txwq); + + /** +@@ -263,5 +332,4 @@ ucs_status_t uct_ib_mlx5_srq_init(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_ + size_t sg_byte_count); + void uct_ib_mlx5_srq_cleanup(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_srq); + +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.inl b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.inl +index ab80201..3efe759 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.inl +@@ -13,6 +13,12 @@ uct_ib_mlx5_get_cqe(uct_ib_mlx5_cq_t *cq, unsigned index) + return cq->cq_buf + ((index & (cq->cq_length - 1)) << cq->cqe_size_log); + } + ++static UCS_F_ALWAYS_INLINE int ++uct_ib_mlx5_cqe_is_hw_owned(uint8_t op_own, unsigned index, unsigned mask) ++{ ++ return (op_own & MLX5_CQE_OWNER_MASK) == !(index & mask); ++} ++ + static UCS_F_ALWAYS_INLINE struct mlx5_cqe64* + uct_ib_mlx5_poll_cq(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq) + { +@@ -24,13 +30,12 @@ uct_ib_mlx5_poll_cq(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq) + cqe = uct_ib_mlx5_get_cqe(cq, index); + op_own = cqe->op_own; + +- if (ucs_unlikely((op_own & MLX5_CQE_OWNER_MASK) == !(index & cq->cq_length))) { ++ if (ucs_unlikely(uct_ib_mlx5_cqe_is_hw_owned(op_own, index, cq->cq_length))) { + return NULL; +- } else if (ucs_unlikely(op_own & 0x80)) { ++ } else if (ucs_unlikely(op_own & UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK)) { + UCS_STATIC_ASSERT(MLX5_CQE_INVALID & (UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK >> 4)); +- if (ucs_unlikely((op_own >> 4) != MLX5_CQE_INVALID)) { +- uct_ib_mlx5_check_completion(iface, cq, cqe); +- } ++ ucs_assert((op_own >> 4) != MLX5_CQE_INVALID); ++ uct_ib_mlx5_check_completion(iface, cq, cqe); + return NULL; /* No CQE */ + } + +@@ -196,12 +201,14 @@ uct_ib_mlx5_ep_set_rdma_seg(struct mlx5_wqe_raddr_seg *raddr, uint64_t rdma_radd + static UCS_F_ALWAYS_INLINE void + uct_ib_mlx5_set_dgram_seg(struct mlx5_wqe_datagram_seg *seg, + uct_ib_mlx5_base_av_t *av, struct mlx5_grh_av *grh_av, +- enum ibv_qp_type qp_type) ++ int qp_type) + { + if (qp_type == IBV_QPT_UD) { + mlx5_av_base(&seg->av)->key.qkey.qkey = htonl(UCT_IB_KEY); +- } else if (qp_type == IBV_EXP_QPT_DC_INI) { ++#if HAVE_TL_DC ++ } else if (qp_type == UCT_IB_QPT_DCI) { + mlx5_av_base(&seg->av)->key.dc_key = htobe64(UCT_IB_KEY); ++#endif + } + mlx5_av_base(&seg->av)->dqp_dct = av->dqp_dct; + mlx5_av_base(&seg->av)->stat_rate_sl = av->stat_rate_sl; +@@ -355,20 +362,36 @@ static UCS_F_ALWAYS_INLINE void uct_ib_mlx5_bf_copy_bb(void * restrict dst, + void * restrict src) + { + #if defined( __SSE4_2__) +- UCS_WORD_COPY(dst, src, __m128i, MLX5_SEND_WQE_BB); ++ UCS_WORD_COPY(__m128i, dst, __m128i, src, MLX5_SEND_WQE_BB); + #elif defined(__ARM_NEON) +- UCS_WORD_COPY(dst, src, int16x8_t, MLX5_SEND_WQE_BB); ++ UCS_WORD_COPY(int16x8_t, dst, int16x8_t, src, MLX5_SEND_WQE_BB); + #else /* NO SIMD support */ +- UCS_WORD_COPY(dst, src, uint64_t, MLX5_SEND_WQE_BB); ++ UCS_WORD_COPY(uint64_t, dst, uint64_t, src, MLX5_SEND_WQE_BB); + #endif + } + ++static UCS_F_ALWAYS_INLINE ++void *uct_ib_mlx5_bf_copy(void *dst, void *src, uint16_t num_bb, ++ const uct_ib_mlx5_txwq_t *wq) ++{ ++ uint16_t n; ++ ++ for (n = 0; n < num_bb; ++n) { ++ uct_ib_mlx5_bf_copy_bb(dst, src); ++ dst += MLX5_SEND_WQE_BB; ++ src += MLX5_SEND_WQE_BB; ++ if (ucs_unlikely(src == wq->qend)) { ++ src = wq->qstart; ++ } ++ } ++ return src; ++} + + static UCS_F_ALWAYS_INLINE uint16_t + uct_ib_mlx5_post_send(uct_ib_mlx5_txwq_t *wq, + struct mlx5_wqe_ctrl_seg *ctrl, unsigned wqe_size) + { +- uint16_t n, sw_pi, num_bb; ++ uint16_t sw_pi, num_bb, res_count; + void *src, *dst; + + ucs_assert(((unsigned long)ctrl % UCT_IB_MLX5_WQE_SEG_SIZE) == 0); +@@ -386,24 +409,23 @@ uct_ib_mlx5_post_send(uct_ib_mlx5_txwq_t *wq, + ucs_memory_bus_store_fence(); + + /* Set up copy pointers */ +- dst = wq->bf->reg.ptr; ++ dst = wq->reg->addr.ptr; + src = ctrl; + + ucs_assert(wqe_size <= UCT_IB_MLX5_BF_REG_SIZE); + ucs_assert(num_bb <= UCT_IB_MLX5_MAX_BB); +- if (ucs_likely(wq->bf->enable_bf)) { +- /* BF copy */ +- for (n = 0; n < num_bb; ++n) { +- uct_ib_mlx5_bf_copy_bb(dst, src); +- dst += MLX5_SEND_WQE_BB; +- src += MLX5_SEND_WQE_BB; +- if (ucs_unlikely(src == wq->qend)) { +- src = wq->qstart; +- } +- } ++ if (ucs_likely(wq->reg->mode == UCT_IB_MLX5_MMIO_MODE_BF_POST)) { ++ src = uct_ib_mlx5_bf_copy(dst, src, num_bb, wq); ++ ucs_memory_bus_wc_flush(); ++ } else if (wq->reg->mode == UCT_IB_MLX5_MMIO_MODE_BF_POST_MT) { ++ src = uct_ib_mlx5_bf_copy(dst, src, num_bb, wq); ++ /* Make sure that HW observes WC writes in order, in case of multiple ++ * threads which use the same BF register in a serialized way ++ */ ++ ucs_memory_cpu_wc_fence(); + } else { +- /* DB copy */ +- *(volatile uint64_t *)dst = *(volatile uint64_t *)src; ++ ucs_assert(wq->reg->mode == UCT_IB_MLX5_MMIO_MODE_DB); ++ *(volatile uint64_t*)dst = *(volatile uint64_t*)src; + ucs_memory_bus_store_fence(); + src = uct_ib_mlx5_txwq_wrap_any(wq, src + (num_bb * MLX5_SEND_WQE_BB)); + } +@@ -411,15 +433,22 @@ uct_ib_mlx5_post_send(uct_ib_mlx5_txwq_t *wq, + /* We don't want the compiler to reorder instructions and hurt latency */ + ucs_compiler_fence(); + +- /* Advance queue pointer */ ++ /* ++ * Advance queue pointer. ++ * We return the number of BBs the *previous* WQE has consumed, since CQEs ++ * are reporting the index of the first BB rather than the last. We have ++ * reserved QP space for at least UCT_IB_MLX5_MAX_BB to accommodate. ++ * */ + ucs_assert(ctrl == wq->curr); +- wq->curr = src; +- wq->prev_sw_pi = wq->sw_pi; +- wq->sw_pi = sw_pi; ++ res_count = wq->sw_pi - wq->prev_sw_pi; ++ wq->curr = src; ++ wq->prev_sw_pi += res_count; ++ ucs_assert(wq->prev_sw_pi == wq->sw_pi); ++ wq->sw_pi = sw_pi; + + /* Flip BF register */ +- wq->bf->reg.addr ^= UCT_IB_MLX5_BF_REG_SIZE; +- return num_bb; ++ wq->reg->addr.uint ^= UCT_IB_MLX5_BF_REG_SIZE; ++ return res_count; + } + + +@@ -429,3 +458,18 @@ uct_ib_mlx5_srq_get_wqe(uct_ib_mlx5_srq_t *srq, uint16_t index) + ucs_assert(index <= srq->mask); + return srq->buf + index * UCT_IB_MLX5_SRQ_STRIDE; + } ++ ++static inline void uct_ib_mlx5_iface_set_av_sport(uct_ib_iface_t *iface, ++ uct_ib_mlx5_base_av_t *av, ++ uint32_t flow_id) ++{ ++ uint16_t sport; ++ ++ if (!IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface)) || ++ (ntohs(av->rlid) >= UCT_IB_MLX5_ROCE_SRC_PORT_MIN)) { ++ return; ++ } ++ ++ sport = flow_id ^ (flow_id >> 16); ++ av->rlid = htons(UCT_IB_MLX5_ROCE_SRC_PORT_MIN | sport); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.c +new file mode 100644 +index 0000000..9fc78ba +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.c +@@ -0,0 +1,166 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "ib_mlx5.h" ++#include "ib_mlx5_log.h" ++ ++#if HAVE_DECL_MLX5DV_INIT_OBJ ++ucs_status_t uct_ib_mlx5dv_init_obj(uct_ib_mlx5dv_t *obj, uint64_t type) ++{ ++ int ret; ++ ++ ret = mlx5dv_init_obj(&obj->dv, type); ++ if (ret != 0) { ++ ucs_error("DV failed to get mlx5 information. Type %lx.", type); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ return UCS_OK; ++} ++#endif ++ ++#if HAVE_DC_DV ++static ucs_status_t uct_ib_mlx5_device_init(uct_ib_device_t *dev) ++{ ++ struct ibv_context *ctx = dev->ibv_context; ++ struct ibv_srq_init_attr srq_attr = {}; ++ struct ibv_qp_init_attr_ex qp_attr = {}; ++ struct mlx5dv_qp_init_attr dv_attr = {}; ++ struct ibv_qp_attr attr = {}; ++ ucs_status_t status = UCS_OK; ++ struct ibv_srq *srq; ++ struct ibv_pd *pd; ++ struct ibv_cq *cq; ++ struct ibv_qp *qp; ++ int ret; ++ ++ if (!(uct_ib_device_spec(dev)->flags & UCT_IB_DEVICE_FLAG_MLX5_PRM)) { ++ return UCS_OK; ++ } ++ ++ pd = ibv_alloc_pd(ctx); ++ if (pd == NULL) { ++ ucs_error("ibv_alloc_pd() failed: %m"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ cq = ibv_create_cq(ctx, 1, NULL, NULL, 0); ++ if (cq == NULL) { ++ ucs_error("ibv_create_cq() failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto err_cq; ++ } ++ ++ srq_attr.attr.max_sge = 1; ++ srq_attr.attr.max_wr = 1; ++ srq = ibv_create_srq(pd, &srq_attr); ++ if (srq == NULL) { ++ ucs_error("ibv_create_srq() failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto err_srq; ++ } ++ ++ qp_attr.send_cq = cq; ++ qp_attr.recv_cq = cq; ++ qp_attr.qp_type = IBV_QPT_DRIVER; ++ qp_attr.comp_mask = IBV_QP_INIT_ATTR_PD; ++ qp_attr.pd = pd; ++ qp_attr.srq = srq; ++ ++ dv_attr.comp_mask = MLX5DV_QP_INIT_ATTR_MASK_DC; ++ dv_attr.dc_init_attr.dc_type = MLX5DV_DCTYPE_DCT; ++ dv_attr.dc_init_attr.dct_access_key = UCT_IB_KEY; ++ ++ /* create DCT qp successful means DC is supported */ ++ qp = mlx5dv_create_qp(ctx, &qp_attr, &dv_attr); ++ if (qp == NULL) { ++ goto err_qp; ++ } ++ ++ attr.qp_state = IBV_QPS_INIT; ++ attr.port_num = 1; ++ attr.qp_access_flags = IBV_ACCESS_REMOTE_WRITE | ++ IBV_ACCESS_REMOTE_READ | ++ IBV_ACCESS_REMOTE_ATOMIC; ++ ret = ibv_modify_qp(qp, &attr, IBV_QP_STATE | ++ IBV_QP_PKEY_INDEX | ++ IBV_QP_PORT | ++ IBV_QP_ACCESS_FLAGS); ++ if (ret != 0) { ++ goto err; ++ } ++ ++ attr.qp_state = IBV_QPS_RTR; ++ attr.path_mtu = IBV_MTU_256; ++ attr.ah_attr.port_num = 1; ++ ++ ret = ibv_modify_qp(qp, &attr, IBV_QP_STATE | ++ IBV_QP_MIN_RNR_TIMER | ++ IBV_QP_AV | ++ IBV_QP_PATH_MTU); ++ ++ if (ret == 0) { ++ dev->flags |= UCT_IB_DEVICE_FLAG_DC; ++ } ++ ++err: ++ ibv_destroy_qp(qp); ++err_qp: ++ ibv_destroy_srq(srq); ++err_srq: ++ ibv_destroy_cq(cq); ++err_cq: ++ ibv_dealloc_pd(pd); ++ return status; ++} ++ ++UCT_IB_DEVICE_INIT(uct_ib_mlx5_device_init); ++ ++#endif ++ ++int uct_ib_mlx5dv_arm_cq(uct_ib_mlx5_cq_t *cq, int solicited) ++{ ++ uint64_t doorbell, sn_ci_cmd; ++ uint32_t sn, ci, cmd; ++ ++ sn = cq->cq_sn & 3; ++ ci = cq->cq_ci & 0xffffff; ++ cmd = solicited ? MLX5_CQ_DB_REQ_NOT_SOL : MLX5_CQ_DB_REQ_NOT; ++ sn_ci_cmd = (sn << 28) | cmd | ci; ++ ++ cq->dbrec[UCT_IB_MLX5_CQ_ARM_DB] = htobe32(sn_ci_cmd); ++ ++ ucs_memory_cpu_fence(); ++ ++ doorbell = (sn_ci_cmd << 32) | cq->cq_num; ++ ++ *(uint64_t *)((uint8_t *)cq->uar + MLX5_CQ_DOORBELL) = htobe64(doorbell); ++ ++ ucs_memory_bus_store_fence(); ++ ++ return 0; ++} ++ ++#if HAVE_DECL_MLX5DV_OBJ_AH ++void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av) ++{ ++ struct mlx5dv_obj dv; ++ struct mlx5dv_ah dah; ++ ++ dv.ah.in = ah; ++ dv.ah.out = &dah; ++ mlx5dv_init_obj(&dv, MLX5DV_OBJ_AH); ++ ++ *av = *(dah.av); ++ av->dqp_dct |= UCT_IB_MLX5_EXTENDED_UD_AV; ++} ++#elif !HAVE_INFINIBAND_MLX5_HW_H ++void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av) ++{ ++ ucs_bug("MLX5DV_OBJ_AH not supported"); ++} ++#endif ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.h +new file mode 100644 +index 0000000..67fbb0f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.h +@@ -0,0 +1,61 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCT_IB_MLX5_DV_H_ ++#define UCT_IB_MLX5_DV_H_ ++ ++#ifndef UCT_IB_MLX5_H_ ++# error "Never include directly; use instead." ++#endif ++ ++#include ++#include ++ ++typedef struct { ++ struct mlx5dv_obj dv; ++} uct_ib_mlx5dv_t; ++ ++typedef struct { ++ struct mlx5dv_qp dv; ++} uct_ib_mlx5dv_qp_t; ++ ++typedef struct { ++ struct mlx5dv_srq dv; ++} uct_ib_mlx5dv_srq_t; ++ ++/* Completion queue */ ++typedef struct { ++ struct mlx5dv_cq dv; ++} uct_ib_mlx5dv_cq_t; ++ ++/** ++ * Get internal verbs information. ++ */ ++ucs_status_t uct_ib_mlx5dv_init_obj(uct_ib_mlx5dv_t *obj, uint64_t type); ++ ++/** ++ * Update CI to support req_notify_cq ++ */ ++void uct_ib_mlx5_update_cq_ci(struct ibv_cq *cq, unsigned cq_ci); ++ ++/** ++ * Retrieve CI from the driver ++ */ ++unsigned uct_ib_mlx5_get_cq_ci(struct ibv_cq *cq); ++ ++/** ++ * Get internal AV information. ++ */ ++void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av); ++ ++/** ++ * Backports for legacy bare-metal support ++ */ ++struct ibv_qp *uct_dv_get_cmd_qp(struct ibv_srq *srq); ++ ++void *uct_dv_get_info_uar0(void *uar); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.c +new file mode 100644 +index 0000000..bde4ce0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.c +@@ -0,0 +1,239 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#if HAVE_INFINIBAND_MLX5_HW_H ++ ++#include "ib_mlx5_hw.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Since this file intended to emulate DV using legacy mlx5_hw.h definitions ++ * we include DV declarations. */ ++#define UCT_IB_MLX5_H_ ++#include "ib_mlx5_dv.h" ++ ++static void UCS_F_MAYBE_UNUSED uct_ib_mlx5_obj_error(const char *obj_name) ++{ ++ ucs_error("Failed to get mlx5 %s information. Please make sure the installed " ++ "libmlx5 version matches the one UCX was compiled with (%s)", ++ obj_name, LIB_MLX5_VER); ++} ++ ++#if !HAVE_DECL_MLX5DV_INIT_OBJ ++ucs_status_t uct_ib_mlx5_get_qp_info(struct ibv_qp *qp, uct_ib_mlx5dv_qp_t *qp_info) ++{ ++#if HAVE_DECL_IBV_MLX5_EXP_GET_QP_INFO ++ struct ibv_mlx5_qp_info ibv_qp_info; ++ int ret; ++ ++ ret = ibv_mlx5_exp_get_qp_info(qp, &ibv_qp_info); ++ if (ret != 0) { ++ uct_ib_mlx5_obj_error("qp"); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ qp_info->dv.dbrec = ibv_qp_info.dbrec; ++ qp_info->dv.sq.buf = ibv_qp_info.sq.buf; ++ qp_info->dv.sq.wqe_cnt = ibv_qp_info.sq.wqe_cnt; ++ qp_info->dv.sq.stride = ibv_qp_info.sq.stride; ++ qp_info->dv.rq.buf = ibv_qp_info.rq.buf; ++ qp_info->dv.rq.wqe_cnt = ibv_qp_info.rq.wqe_cnt; ++ qp_info->dv.rq.stride = ibv_qp_info.rq.stride; ++ qp_info->dv.bf.reg = ibv_qp_info.bf.reg; ++ qp_info->dv.bf.size = ibv_qp_info.bf.size; ++#else ++ struct mlx5_qp *mqp = ucs_container_of(qp, struct mlx5_qp, verbs_qp.qp); ++ ++ if ((mqp->sq.cur_post != 0) || (mqp->rq.head != 0)) { ++ ucs_warn("cur_post=%d head=%d need_lock=%d", mqp->sq.cur_post, ++ mqp->rq.head, mqp->bf->need_lock); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ qp_info->dv.qpn = qp->qp_num; ++ qp_info->dv.dbrec = mqp->db; ++ qp_info->dv.sq.buf = mqp->buf.buf + mqp->sq.offset; ++ qp_info->dv.sq.wqe_cnt = mqp->sq.wqe_cnt; ++ qp_info->dv.sq.stride = 1 << mqp->sq.wqe_shift; ++ qp_info->dv.rq.buf = mqp->buf.buf + mqp->rq.offset; ++ qp_info->dv.rq.wqe_cnt = mqp->rq.wqe_cnt; ++ qp_info->dv.rq.stride = 1 << mqp->rq.wqe_shift; ++ qp_info->dv.bf.reg = mqp->bf->reg; ++ ++ if (mqp->bf->uuarn > 0) { ++ qp_info->dv.bf.size = mqp->bf->buf_size; ++ } else { ++ qp_info->dv.bf.size = 0; /* No BF */ ++ } ++#endif ++ return UCS_OK; ++} ++ ++ucs_status_t uct_ib_mlx5_get_srq_info(struct ibv_srq *srq, ++ uct_ib_mlx5dv_srq_t *srq_info) ++{ ++#if HAVE_DECL_IBV_MLX5_EXP_GET_SRQ_INFO ++ struct ibv_mlx5_srq_info ibv_srq_info; ++ int ret; ++ ++ ret = ibv_mlx5_exp_get_srq_info(srq, &ibv_srq_info); ++ if (ret != 0) { ++ uct_ib_mlx5_obj_error("srq"); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ srq_info->dv.buf = ibv_srq_info.buf; ++ srq_info->dv.dbrec = ibv_srq_info.dbrec; ++ srq_info->dv.stride = ibv_srq_info.stride; ++ srq_info->dv.head = ibv_srq_info.head; ++ srq_info->dv.tail = ibv_srq_info.tail; ++#else ++ struct mlx5_srq *msrq; ++ ++ if (srq->handle == LEGACY_XRC_SRQ_HANDLE) { ++ srq = (struct ibv_srq *)(((struct ibv_srq_legacy *)srq)->ibv_srq); ++ } ++ ++ msrq = ucs_container_of(srq, struct mlx5_srq, vsrq.srq); ++ ++ if (msrq->counter != 0) { ++ ucs_error("SRQ counter is not 0 (%d)", msrq->counter); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ srq_info->dv.buf = msrq->buf.buf; ++ srq_info->dv.dbrec = msrq->db; ++ srq_info->dv.stride = 1 << msrq->wqe_shift; ++ srq_info->dv.head = msrq->head; ++ srq_info->dv.tail = msrq->tail; ++#endif ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5dv_cq_t *mlx5_cq) ++{ ++#if HAVE_DECL_IBV_MLX5_EXP_GET_CQ_INFO ++ struct ibv_mlx5_cq_info ibv_cq_info; ++ int ret; ++ ++ ret = ibv_mlx5_exp_get_cq_info(cq, &ibv_cq_info); ++ if (ret != 0) { ++ uct_ib_mlx5_obj_error("cq"); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ mlx5_cq->dv.buf = ibv_cq_info.buf; ++ mlx5_cq->dv.cqe_cnt = ibv_cq_info.cqe_cnt; ++ mlx5_cq->dv.cqn = ibv_cq_info.cqn; ++ mlx5_cq->dv.cqe_size = ibv_cq_info.cqe_size; ++#else ++ struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); ++ int ret; ++ ++ if (mcq->cons_index != 0) { ++ ucs_error("CQ consumer index is not 0 (%d)", mcq->cons_index); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ mlx5_cq->dv.buf = mcq->active_buf->buf; ++ mlx5_cq->dv.cqe_cnt = mcq->ibv_cq.cqe + 1; ++ mlx5_cq->dv.cqn = mcq->cqn; ++ mlx5_cq->dv.cqe_size = mcq->cqe_sz; ++#endif ++ return UCS_OK; ++} ++ ++ucs_status_t uct_ib_mlx5dv_init_obj(uct_ib_mlx5dv_t *obj, uint64_t obj_type) ++{ ++ ucs_status_t ret = UCS_OK; ++ ++ if (obj_type & MLX5DV_OBJ_QP) { ++ ret = uct_ib_mlx5_get_qp_info(obj->dv.qp.in, ++ ucs_container_of(obj->dv.qp.out, uct_ib_mlx5dv_qp_t, dv)); ++ } ++ ++ if (!ret && (obj_type & MLX5DV_OBJ_CQ)) { ++ ret = uct_ib_mlx5_get_cq(obj->dv.cq.in, ++ ucs_container_of(obj->dv.cq.out, uct_ib_mlx5dv_cq_t, dv)); ++ } ++ ++ if (!ret && (obj_type & MLX5DV_OBJ_SRQ)) { ++ ret = uct_ib_mlx5_get_srq_info(obj->dv.srq.in, ++ ucs_container_of(obj->dv.srq.out, uct_ib_mlx5dv_srq_t, dv)); ++ } ++ ++ return ret; ++} ++#endif ++ ++void uct_ib_mlx5_update_cq_ci(struct ibv_cq *cq, unsigned cq_ci) ++{ ++#if HAVE_DECL_IBV_MLX5_EXP_UPDATE_CQ_CI ++ ibv_mlx5_exp_update_cq_ci(cq, cq_ci); ++#else ++ struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); ++ mcq->cons_index = cq_ci; ++#endif ++} ++ ++unsigned uct_ib_mlx5_get_cq_ci(struct ibv_cq *cq) ++{ ++ struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); ++ return mcq->cons_index; ++} ++ ++#if !HAVE_DECL_MLX5DV_OBJ_AH ++void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av) ++{ ++ memcpy(av, &ucs_container_of(ah, struct mlx5_ah, ibv_ah)->av, sizeof(*av)); ++} ++#endif ++ ++struct ibv_qp *uct_dv_get_cmd_qp(struct ibv_srq *srq) ++{ ++#if HAVE_STRUCT_MLX5_SRQ_CMD_QP ++ struct mlx5_srq *msrq; ++ ++ if (srq->handle == LEGACY_XRC_SRQ_HANDLE) { ++ srq = (struct ibv_srq *)(((struct ibv_srq_legacy *)srq)->ibv_srq); ++ } ++ ++ msrq = ucs_container_of(srq, struct mlx5_srq, vsrq.srq); ++ if (msrq->counter != 0) { ++ ucs_error("SRQ counter is not 0 (%d)", msrq->counter); ++ return NULL; ++ } ++ ++ return &msrq->cmd_qp->verbs_qp.qp; ++#else ++ return NULL; ++#endif ++} ++ ++struct mlx5_uar_data { ++ enum { __DUMMY } map_type; ++ void *regs; ++}; ++ ++void *uct_dv_get_info_uar0(void *uar) ++{ ++#if HAVE_DECL_MLX5DV_INIT_OBJ ++ struct mlx5_uar_data *muar = uar; ++ return muar[0].regs; ++#else ++ return NULL; ++#endif ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.h +new file mode 100644 +index 0000000..320e46a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.h +@@ -0,0 +1,79 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCT_IB_MLX5_HW_H_ ++#define UCT_IB_MLX5_HW_H_ ++ ++#include ++ ++struct mlx5dv_qp { ++ volatile uint32_t *dbrec; ++ struct { ++ void *buf; ++ uint32_t wqe_cnt; ++ uint32_t stride; ++ } sq; ++ struct { ++ void *buf; ++ uint32_t wqe_cnt; ++ uint32_t stride; ++ } rq; ++ struct { ++ void *reg; ++ uint32_t size; ++ } bf; ++ uint64_t comp_mask; ++}; ++ ++struct mlx5dv_cq { ++ void *buf; ++ volatile uint32_t *dbrec; ++ uint32_t cqe_cnt; ++ uint32_t cqe_size; ++ void *cq_uar; ++/* DV backport will behave as DV with fixed CQ UAR */ ++#undef HAVE_STRUCT_MLX5DV_CQ_CQ_UAR ++#define HAVE_STRUCT_MLX5DV_CQ_CQ_UAR 1 ++ uint32_t cqn; ++ uint64_t comp_mask; ++}; ++ ++struct mlx5dv_srq { ++ void *buf; ++ volatile uint32_t *dbrec; ++ uint32_t stride; ++ uint32_t head; ++ uint32_t tail; ++ uint64_t comp_mask; ++}; ++ ++struct mlx5dv_obj { ++ struct { ++ struct ibv_qp *in; ++ struct mlx5dv_qp *out; ++ } qp; ++ struct { ++ struct ibv_cq *in; ++ struct mlx5dv_cq *out; ++ } cq; ++ struct { ++ struct ibv_srq *in; ++ struct mlx5dv_srq *out; ++ } srq; ++ struct { ++ struct ibv_exp_wq *in; ++ struct mlx5dv_rwq *out; ++ } rwq; ++}; ++ ++enum mlx5dv_obj_type { ++ MLX5DV_OBJ_QP = 1 << 0, ++ MLX5DV_OBJ_CQ = 1 << 1, ++ MLX5DV_OBJ_SRQ = 1 << 2, ++ MLX5DV_OBJ_RWQ = 1 << 3, ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.c +index 02eff31..3bb6ebd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.c +@@ -10,7 +10,7 @@ + #include + + +-static const char *uct_ib_mlx5_cqe_err_opcode(struct mlx5_err_cqe *ecqe) ++static const char *uct_ib_mlx5_cqe_err_opcode(uct_ib_mlx5_err_cqe_t *ecqe) + { + uint8_t wqe_err_opcode = ntohl(ecqe->s_wqe_opcode_qpn) >> 24; + +@@ -27,11 +27,11 @@ static const char *uct_ib_mlx5_cqe_err_opcode(struct mlx5_err_cqe *ecqe) + case MLX5_OPCODE_RDMA_READ: + return "RDMA_READ"; + case MLX5_OPCODE_ATOMIC_CS: +- return "COMPARE_SWAP"; ++ return "CSWAP"; + case MLX5_OPCODE_ATOMIC_FA: + return "FETCH_ADD"; + case MLX5_OPCODE_ATOMIC_MASKED_CS: +- return "MASKED_COMPARE_SWAP"; ++ return "MASKED_CSWAP"; + case MLX5_OPCODE_ATOMIC_MASKED_FA: + return "MASKED_FETCH_ADD"; + default: +@@ -44,7 +44,8 @@ static const char *uct_ib_mlx5_cqe_err_opcode(struct mlx5_err_cqe *ecqe) + } + } + +-ucs_status_t uct_ib_mlx5_completion_with_err(struct mlx5_err_cqe *ecqe, ++ucs_status_t uct_ib_mlx5_completion_with_err(uct_ib_iface_t *iface, ++ uct_ib_mlx5_err_cqe_t *ecqe, + ucs_log_level_t log_level) + { + uint16_t wqe_counter; +@@ -108,8 +109,10 @@ ucs_status_t uct_ib_mlx5_completion_with_err(struct mlx5_err_cqe *ecqe, + break; + } + +- ucs_log(log_level, "Error on QP 0x%x wqe[%d]: %s (synd 0x%x vend 0x%x) opcode %s", +- qp_num, wqe_counter, info, ecqe->syndrome, ecqe->vendor_err_synd, ++ ucs_log(log_level, "Error on "UCT_IB_IFACE_FMT" QP 0x%x wqe[%03d]: " ++ "%s (synd 0x%x vend 0x%x hw_synd %d/%d) opcode %s", ++ UCT_IB_IFACE_ARG(iface), qp_num, wqe_counter, info, ecqe->syndrome, ++ ecqe->vendor_err_synd, ecqe->hw_synd_type >> 4, ecqe->hw_err_synd, + uct_ib_mlx5_cqe_err_opcode(ecqe)); + return status; + } +@@ -174,25 +177,67 @@ static uint64_t network_to_host(void *ptr, int size) + return *(uint64_t*)ptr; + } + } +-static size_t uct_ib_mlx5_dump_dgram(char *buf, size_t max, void *seg) ++static size_t uct_ib_mlx5_dump_dgram(char *buf, size_t max, void *seg, int is_eth) + { + struct mlx5_wqe_datagram_seg *dgseg = seg; +- +- snprintf(buf, max-1, " [dlid %d rqpn 0x%x]", +- ntohs(mlx5_av_base(&dgseg->av)->rlid), +- ntohl(mlx5_av_base(&dgseg->av)->dqp_dct & ~UCT_IB_MLX5_EXTENDED_UD_AV)); ++ struct mlx5_base_av *base_av; ++ struct mlx5_grh_av *grh_av; ++ char gid_buf[32]; ++ int sgid_index; ++ char *p, *endp; ++ ++ p = buf; ++ endp = buf + max - 1; ++ base_av = mlx5_av_base(&dgseg->av); ++ ++ snprintf(p, endp - p, " [rqpn 0x%x", ++ ntohl(base_av->dqp_dct & ~UCT_IB_MLX5_EXTENDED_UD_AV)); ++ p += strlen(p); ++ ++ if (!is_eth) { ++ snprintf(p, endp - p, " rlid %d", ntohs(base_av->rlid)); ++ p += strlen(p); ++ } + + if (mlx5_av_base(&dgseg->av)->dqp_dct & UCT_IB_MLX5_EXTENDED_UD_AV) { ++ grh_av = mlx5_av_grh(&dgseg->av); ++ if (is_eth || (grh_av->grh_gid_fl & UCT_IB_MLX5_AV_GRH_PRESENT)) { ++ if (is_eth) { ++ snprintf(p, endp - p, " rmac %02x:%02x:%02x:%02x:%02x:%02x", ++ grh_av->rmac[0], grh_av->rmac[1], grh_av->rmac[2], ++ grh_av->rmac[3], grh_av->rmac[4], grh_av->rmac[5]); ++ p += strlen(p); ++ } ++ ++ sgid_index = (htonl(grh_av->grh_gid_fl) >> 20) & UCS_MASK(8); ++ snprintf(p, endp - p, " sgix %d dgid %s tc %d]", sgid_index, ++ inet_ntop(AF_INET6, grh_av->rgid, gid_buf, sizeof(gid_buf)), ++ grh_av->tclass); ++ } + return UCT_IB_MLX5_AV_FULL_SIZE; + } else { ++ snprintf(p, endp - p, "]"); + return UCT_IB_MLX5_AV_BASE_SIZE; + } + } + +-static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type, +- void *wqe, void *qstart, void *qend, ++static int uct_ib_mlx5_is_qp_require_av_seg(int qp_type) ++{ ++ if (qp_type == IBV_QPT_UD) { ++ return 1; ++ } ++#if HAVE_TL_DC ++ if (qp_type == UCT_IB_QPT_DCI) { ++ return 1; ++ } ++#endif ++ return 0; ++} ++ ++static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, int qp_type, ++ void *wqe, void *qstart, void *qend, int max_sge, + uct_log_data_dump_func_t packet_dump_cb, +- char *buffer, size_t max) ++ char *buffer, size_t max, uct_ib_log_sge_t *log_sge) + { + static uct_ib_opcode_t opcodes[] = { + [MLX5_OPCODE_NOP] = { "NOP", 0 }, +@@ -200,10 +245,12 @@ static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type + [MLX5_OPCODE_RDMA_READ] = { "RDMA_READ", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [MLX5_OPCODE_SEND] = { "SEND", 0 }, + [MLX5_OPCODE_SEND_IMM] = { "SEND_IMM", 0 }, +- [MLX5_OPCODE_ATOMIC_CS] = { "CS", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, +- [MLX5_OPCODE_ATOMIC_FA] = { "FA", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, +- [MLX5_OPCODE_ATOMIC_MASKED_CS] = { "MASKED_CS", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, +- [MLX5_OPCODE_ATOMIC_MASKED_FA] = { "MASKED_FA", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, ++ [MLX5_OPCODE_ATOMIC_CS] = { "CSWAP", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [MLX5_OPCODE_ATOMIC_FA] = { "FETCH_ADD", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [MLX5_OPCODE_ATOMIC_MASKED_CS] = { "MASKED_CSWAP", ++ UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, ++ [MLX5_OPCODE_ATOMIC_MASKED_FA] = { "MASKED_FETCH_ADD", ++ UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, + }; + + struct mlx5_wqe_ctrl_seg *ctrl = wqe; +@@ -216,11 +263,12 @@ static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type + char *ends = buffer + max; + struct ibv_sge sg_list[16]; + uint64_t inline_bitmap; +- int i, is_inline; ++ int i, is_inline, is_eth; ++ size_t dg_size; + void *seg; + + /* QP number and opcode name */ +- uct_ib_log_dump_opcode(qp_num, op, ++ uct_ib_log_dump_opcode(qp_num, (wqe - qstart) / MLX5_SEND_WQE_BB, op, + ctrl->fm_ce_se & MLX5_WQE_CTRL_CQ_UPDATE, + ctrl->fm_ce_se & MLX5_WQE_CTRL_FENCE, + ctrl->fm_ce_se & (1 << 1), +@@ -234,8 +282,9 @@ static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type + seg = qstart; + } + +- if ((qp_type == IBV_QPT_UD) || (qp_type == IBV_EXP_QPT_DC_INI)) { +- size_t dg_size = uct_ib_mlx5_dump_dgram(s, ends - s, seg); ++ if (uct_ib_mlx5_is_qp_require_av_seg(qp_type)) { ++ is_eth = IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface)); ++ dg_size = uct_ib_mlx5_dump_dgram(s, ends - s, seg, is_eth); + s += strlen(s); + + seg = (char *)seg + dg_size; +@@ -314,29 +363,35 @@ static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type + } + + /* Data segments*/ +- i = 0; +- inline_bitmap = 0; +- +- while ((ds > 0) && (i < sizeof(sg_list) / sizeof(sg_list[0]))) { +- ds -= uct_ib_mlx5_parse_dseg(&seg, qstart, qend, sg_list, &i, &is_inline); +- if (is_inline) { +- inline_bitmap |= UCS_BIT(i-1); ++ if (log_sge == NULL) { ++ i = 0; ++ inline_bitmap = 0; ++ ++ while ((ds > 0) && (i < sizeof(sg_list) / sizeof(sg_list[0]))) { ++ ds -= uct_ib_mlx5_parse_dseg(&seg, qstart, qend, sg_list, &i, &is_inline); ++ if (is_inline) { ++ inline_bitmap |= UCS_BIT(i-1); ++ } ++ s += strlen(s); + } +- s += strlen(s); + } + +- uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, sg_list, i, +- inline_bitmap, packet_dump_cb, s, ends - s); ++ uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, ++ log_sge ? log_sge->sg_list : sg_list, ++ log_sge ? log_sge->num_sge : ucs_min(i, max_sge), ++ log_sge ? log_sge->inline_bitmap : inline_bitmap, ++ packet_dump_cb, s, ends - s); + } + + void __uct_ib_mlx5_log_tx(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, +- void *wqe, void *qstart, void *qend, ++ uct_ib_iface_t *iface, int qp_type, ++ void *wqe, void *qstart, void *qend, int max_sge, ++ uct_ib_log_sge_t *log_sge, + uct_log_data_dump_func_t packet_dump_cb) + { + char buf[256] = {0}; +- uct_ib_mlx5_wqe_dump(iface, qp_type, wqe, qstart, qend, packet_dump_cb, +- buf, sizeof(buf) - 1); ++ uct_ib_mlx5_wqe_dump(iface, qp_type, wqe, qstart, qend, max_sge, packet_dump_cb, ++ buf, sizeof(buf) - 1, log_sge); + uct_log_data(file, line, function, buf); + } + +@@ -357,7 +412,7 @@ void uct_ib_mlx5_cqe_dump(const char *file, int line, const char *function, stru + } + + void __uct_ib_mlx5_log_rx(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++ uct_ib_iface_t *iface, int qp_type, + struct mlx5_cqe64 *cqe, void *data, + uct_log_data_dump_func_t packet_dump_cb) + { +@@ -365,7 +420,7 @@ void __uct_ib_mlx5_log_rx(const char *file, int line, const char *function, + size_t length; + + length = ntohl(cqe->byte_cnt); +- if ((qp_type == IBV_QPT_UD) || (qp_type == IBV_EXP_QPT_DC_INI)) { ++ if (uct_ib_mlx5_is_qp_require_av_seg(qp_type)) { + length -= UCT_IB_GRH_LEN; + data += UCT_IB_GRH_LEN; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.h +index 7ed8e5d..ebdf2d4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.h +@@ -12,27 +12,35 @@ + #include + + +-ucs_status_t uct_ib_mlx5_completion_with_err(struct mlx5_err_cqe *ecqe, ++typedef struct uct_ib_log_sge { ++ int num_sge; ++ uint64_t inline_bitmap; ++ struct ibv_sge sg_list[2]; ++} uct_ib_log_sge_t; ++ ++ucs_status_t uct_ib_mlx5_completion_with_err(uct_ib_iface_t *iface, ++ uct_ib_mlx5_err_cqe_t *ecqe, + ucs_log_level_t log_level); + + + void __uct_ib_mlx5_log_tx(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, +- void *wqe, void *qstart, void *qend, ++ uct_ib_iface_t *iface, int qp_type, ++ void *wqe, void *qstart, void *qend, int max_log_sge, ++ uct_ib_log_sge_t *log_sge, + uct_log_data_dump_func_t packet_dump_cb); + + void __uct_ib_mlx5_log_rx(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++ uct_ib_iface_t *iface, int qp_type, + struct mlx5_cqe64 *cqe, void *data, + uct_log_data_dump_func_t packet_dump_cb); + + void uct_ib_mlx5_cqe_dump(const char *file, int line, const char *function, + struct mlx5_cqe64 *cqe); + +-#define uct_ib_mlx5_log_tx(_iface, _qpt, _wqe, _qstart, _qend, _dump_cb) \ ++#define uct_ib_mlx5_log_tx(_iface, _qpt, _wqe, _qstart, _qend, _max_sge, _log_sge, _dump_cb) \ + if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { \ + __uct_ib_mlx5_log_tx(__FILE__, __LINE__, __FUNCTION__, \ +- _iface, _qpt, _wqe, _qstart, _qend, _dump_cb); \ ++ _iface, _qpt, _wqe, _qstart, _qend, _max_sge, _log_sge, _dump_cb); \ + } + + #define uct_ib_mlx5_log_rx(_iface, _qpt, _cqe, _data, _dump_cb) \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5.h +index a057456..4e3c87c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5.h +@@ -19,9 +19,10 @@ + * RC mlx5 interface configuration + */ + typedef struct uct_rc_mlx5_iface_config { +- uct_rc_iface_config_t super; +- uct_rc_fc_config_t fc; +- unsigned tx_max_bb; ++ uct_rc_iface_config_t super; ++ uct_rc_fc_config_t fc; ++ uct_ib_mlx5_iface_config_t mlx5_common; ++ unsigned tx_max_bb; + /* TODO wc_mode, UAR mode SnB W/A... */ + } uct_rc_mlx5_iface_config_t; + +@@ -47,7 +48,8 @@ typedef struct { + uct_rc_iface_t super; + uct_rc_mlx5_iface_common_t mlx5_common; + struct { +- uint16_t bb_max; /* limit number of outstanding WQE BBs */ ++ uct_ib_mlx5_mmio_mode_t mmio_mode; ++ uint16_t bb_max; /* limit number of outstanding WQE BBs */ + } tx; + } uct_rc_mlx5_iface_t; + +@@ -88,35 +90,29 @@ ucs_status_t uct_rc_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *hea + size_t iovcnt, unsigned flags, + uct_completion_t *comp); + +-ucs_status_t uct_rc_mlx5_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +- +-ucs_status_t uct_rc_mlx5_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- +-ucs_status_t uct_rc_mlx5_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- + ucs_status_t uct_rc_mlx5_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp); + +-ucs_status_t uct_rc_mlx5_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_rc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp); ++ ++ucs_status_t uct_rc_mlx5_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); + +-ucs_status_t uct_rc_mlx5_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_rc_mlx5_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); + +-ucs_status_t uct_rc_mlx5_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_rc_mlx5_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); + +-ucs_status_t uct_rc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ucs_status_t uct_rc_mlx5_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ uct_completion_t *comp); + + ucs_status_t uct_rc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion_t *comp); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.c +index adfb20d..112fb6f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.c +@@ -22,6 +22,24 @@ ucs_stats_class_t uct_rc_mlx5_iface_stats_class = { + }; + #endif + ++ ++#if HAVE_IBV_EXP_DM ++/* uct_mlx5_dm_va is used to get pointer to DM mapped into process address space */ ++typedef struct uct_mlx5_dm_va { ++ struct ibv_exp_dm ibv_dm; ++ size_t length; ++ uint64_t *start_va; ++} uct_mlx5_dm_va_t; ++#endif ++ ++ ++void uct_rc_mlx5_common_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max) ++{ ++ uct_rc_ep_packet_dump(iface, type, data, length, valid_length, buffer, max, 0); ++} ++ + unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_iface_t *iface, uct_ib_mlx5_srq_t *srq) + { + uct_ib_mlx5_srq_seg_t *seg; +@@ -67,6 +85,8 @@ unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_iface_t *iface, uct_ib_mlx5_srq_ + } + + count = index - srq->sw_pi; ++ ucs_assert(iface->rx.srq.available >= count); ++ + if (count > 0) { + srq->ready_idx = index; + srq->sw_pi = index; +@@ -115,13 +135,13 @@ ucs_status_t + uct_rc_mlx5_iface_common_tag_init(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface, + uct_rc_iface_config_t *rc_config, ++ const uct_ib_mlx5_iface_config_t *mlx5_config, + struct ibv_exp_create_srq_attr *srq_init_attr, + unsigned rndv_hdr_len) + { + ucs_status_t status = UCS_OK; + #if IBV_EXP_HW_TM +- struct ibv_srq *srq; +- struct mlx5_srq *msrq; ++ struct ibv_qp *cmd_qp; + int i; + + if (!UCT_RC_IFACE_TM_ENABLED(rc_iface)) { +@@ -134,26 +154,20 @@ uct_rc_mlx5_iface_common_tag_init(uct_rc_mlx5_iface_common_t *iface, + goto err; + } + +- srq = rc_iface->rx.srq.srq; +- if (srq->handle == LEGACY_XRC_SRQ_HANDLE) { +- srq = (struct ibv_srq *)(((struct ibv_srq_legacy *)srq)->ibv_srq); +- } +- +- msrq = ucs_container_of(srq, struct mlx5_srq, vsrq.srq); +- if (msrq->counter != 0) { +- ucs_error("SRQ counter is not 0 (%d)", msrq->counter); ++ cmd_qp = uct_dv_get_cmd_qp(rc_iface->rx.srq.srq); ++ if (!cmd_qp) { + status = UCS_ERR_NO_DEVICE; + goto err_tag_cleanup; + } + + status = uct_ib_mlx5_txwq_init(rc_iface->super.super.worker, +- &iface->tm.cmd_wq.super, +- &msrq->cmd_qp->verbs_qp.qp); ++ mlx5_config->mmio_mode, ++ &iface->tm.cmd_wq.super, cmd_qp); + if (status != UCS_OK) { + goto err_tag_cleanup; + } + +- iface->tm.cmd_wq.qp_num = msrq->cmd_qp->verbs_qp.qp.qp_num; ++ iface->tm.cmd_wq.qp_num = cmd_qp->qp_num; + iface->tm.cmd_wq.ops_mask = rc_iface->tm.cmd_qp_len - 1; + iface->tm.cmd_wq.ops_head = iface->tm.cmd_wq.ops_tail = 0; + iface->tm.cmd_wq.ops = ucs_calloc(rc_iface->tm.cmd_qp_len, +@@ -205,18 +219,176 @@ void uct_rc_mlx5_iface_common_tag_cleanup(uct_rc_mlx5_iface_common_t *iface, + #endif + } + ++ ++#if HAVE_IBV_EXP_DM ++static ucs_status_t ++uct_rc_mlx5_iface_common_dm_mpool_chunk_malloc(ucs_mpool_t *mp, size_t *size_p, void **chunk_p) ++{ ++ ucs_status_t status; ++ ++ status = ucs_mpool_chunk_malloc(mp, size_p, chunk_p); ++ if (status == UCS_OK) { ++ memset(*chunk_p, 0, *size_p); ++ } ++ ++ return status; ++} ++ ++static void uct_rc_mlx5_iface_common_dm_mp_obj_init(ucs_mpool_t *mp, void *obj, void *chunk) ++{ ++ uct_mlx5_dm_data_t *dm = ucs_container_of(mp, uct_mlx5_dm_data_t, mp); ++ uct_rc_iface_send_desc_t* desc = (uct_rc_iface_send_desc_t*)obj; ++ ++ ucs_assert(desc->super.buffer == NULL); ++ ucs_assert(dm->seg_attached < dm->seg_count); ++ ++ desc->lkey = dm->mr->lkey; ++ desc->super.buffer = UCS_PTR_BYTE_OFFSET(dm->start_va, dm->seg_attached * dm->seg_len); ++ desc->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; ++ dm->seg_attached++; ++} ++ ++static ucs_mpool_ops_t uct_dm_iface_mpool_ops = { ++ .chunk_alloc = uct_rc_mlx5_iface_common_dm_mpool_chunk_malloc, ++ .chunk_release = ucs_mpool_chunk_free, ++ .obj_init = uct_rc_mlx5_iface_common_dm_mp_obj_init, ++ .obj_cleanup = NULL ++}; ++ ++ ++static int uct_rc_mlx5_iface_common_dm_device_cmp(uct_mlx5_dm_data_t *dm_data, ++ uct_rc_iface_t *iface, ++ const uct_ib_mlx5_iface_config_t *config) ++{ ++ uct_ib_device_t *dev = uct_ib_iface_device(&iface->super); ++ ++ return dm_data->device->ibv_context == dev->ibv_context; ++} ++ ++static ucs_status_t ++uct_rc_mlx5_iface_common_dm_tl_init(uct_mlx5_dm_data_t *data, ++ uct_rc_iface_t *iface, ++ const uct_ib_mlx5_iface_config_t *config) ++{ ++ ucs_status_t status; ++ struct ibv_exp_alloc_dm_attr dm_attr; ++ struct ibv_exp_reg_mr_in mr_in; ++ ++ data->seg_len = ucs_min(ucs_align_up(config->dm.seg_len, ++ sizeof(uct_rc_mlx5_dm_copy_data_t)), ++ iface->super.config.seg_size); ++ data->seg_count = config->dm.count; ++ data->seg_attached = 0; ++ data->device = uct_ib_iface_device(&iface->super); ++ ++ dm_attr.length = data->seg_len * data->seg_count; ++ dm_attr.comp_mask = 0; ++ data->dm = ibv_exp_alloc_dm(data->device->ibv_context, &dm_attr); ++ ++ if (data->dm == NULL) { ++ /* TODO: prompt warning? */ ++ ucs_debug("ibv_exp_alloc_dm(dev=%s length=%zu) failed: %m", ++ uct_ib_device_name(data->device), dm_attr.length); ++ return UCS_ERR_NO_RESOURCE; ++ } ++ ++ memset(&mr_in, 0, sizeof(mr_in)); ++ mr_in.pd = uct_ib_iface_md(&iface->super)->pd; ++ mr_in.comp_mask = IBV_EXP_REG_MR_DM; ++ mr_in.dm = data->dm; ++ mr_in.length = dm_attr.length; ++ data->mr = ibv_exp_reg_mr(&mr_in); ++ if (data->mr == NULL) { ++ ucs_warn("ibv_exp_reg_mr() error - On Device Memory registration failed, %d %m", errno); ++ status = UCS_ERR_NO_RESOURCE; ++ goto failed_mr; ++ } ++ ++ data->start_va = ((uct_mlx5_dm_va_t*)data->dm)->start_va; ++ ++ status = ucs_mpool_init(&data->mp, 0, ++ sizeof(uct_rc_iface_send_desc_t), 0, UCS_SYS_CACHE_LINE_SIZE, ++ data->seg_count, data->seg_count, ++ &uct_dm_iface_mpool_ops, "mlx5_dm_desc"); ++ if (status != UCS_OK) { ++ goto failed_mpool; ++ } ++ ++ /* DM initialization may fail due to any reason, just ++ * free resources & continue without DM */ ++ return UCS_OK; ++ ++failed_mpool: ++ ibv_dereg_mr(data->mr); ++failed_mr: ++ ibv_exp_free_dm(data->dm); ++ data->dm = NULL; ++ return status; ++} ++ ++static void uct_rc_mlx5_iface_common_dm_tl_cleanup(uct_mlx5_dm_data_t *data) ++{ ++ ucs_assert(data->dm != NULL); ++ ucs_assert(data->mr != NULL); ++ ++ ucs_mpool_cleanup(&data->mp, 1); ++ ibv_dereg_mr(data->mr); ++ ibv_exp_free_dm(data->dm); ++} ++#endif ++ ++static ucs_status_t ++uct_rc_mlx5_iface_common_dm_init(uct_rc_mlx5_iface_common_t *iface, ++ uct_rc_iface_t *rc_iface, ++ const uct_ib_mlx5_iface_config_t *mlx5_config) ++{ ++#if HAVE_IBV_EXP_DM ++ if ((mlx5_config->dm.seg_len * mlx5_config->dm.count) == 0) { ++ goto fallback; ++ } ++ ++ iface->dm.dm = uct_worker_tl_data_get(rc_iface->super.super.worker, ++ UCT_IB_MLX5_WORKER_DM_KEY, ++ uct_mlx5_dm_data_t, ++ uct_rc_mlx5_iface_common_dm_device_cmp, ++ uct_rc_mlx5_iface_common_dm_tl_init, ++ rc_iface, mlx5_config); ++ if (UCS_PTR_IS_ERR(iface->dm.dm)) { ++ goto fallback; ++ } ++ ++ ucs_assert(iface->dm.dm->dm != NULL); ++ iface->dm.seg_len = iface->dm.dm->seg_len; ++ return UCS_OK; ++ ++fallback: ++ iface->dm.dm = NULL; ++#endif ++ return UCS_OK; ++} ++ ++static void uct_rc_mlx5_iface_common_dm_cleanup(uct_rc_mlx5_iface_common_t *iface) ++{ ++#if HAVE_IBV_EXP_DM ++ if (iface->dm.dm) { ++ uct_worker_tl_data_put(iface->dm.dm, uct_rc_mlx5_iface_common_dm_tl_cleanup); ++ } ++#endif ++} ++ + ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface, +- uct_rc_iface_config_t *config) ++ const uct_rc_iface_config_t *config, ++ const uct_ib_mlx5_iface_config_t *mlx5_config) + { + ucs_status_t status; + +- status = uct_ib_mlx5_get_cq(rc_iface->super.send_cq, &iface->tx.cq); ++ status = uct_ib_mlx5_get_cq(rc_iface->super.cq[UCT_IB_DIR_TX], &iface->cq[UCT_IB_DIR_TX]); + if (status != UCS_OK) { + return status; + } + +- status = uct_ib_mlx5_get_cq(rc_iface->super.recv_cq, &iface->rx.cq); ++ status = uct_ib_mlx5_get_cq(rc_iface->super.cq[UCT_IB_DIR_RX], &iface->cq[UCT_IB_DIR_RX]); + if (status != UCS_OK) { + return status; + } +@@ -227,6 +399,11 @@ ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + return status; + } + ++ status = uct_rc_mlx5_iface_common_dm_init(iface, rc_iface, mlx5_config); ++ if (status != UCS_OK) { ++ return status; ++ } ++ + rc_iface->rx.srq.quota = iface->rx.srq.mask + 1; + + /* By default set to something that is always in cache */ +@@ -235,13 +412,13 @@ ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + status = UCS_STATS_NODE_ALLOC(&iface->stats, &uct_rc_mlx5_iface_stats_class, + rc_iface->stats); + if (status != UCS_OK) { +- return status; ++ goto cleanup_dm; + } + + status = uct_iface_mpool_init(&rc_iface->super.super, + &iface->tx.atomic_desc_mp, +- sizeof(uct_rc_iface_send_desc_t) + UCT_RC_MAX_ATOMIC_SIZE, +- sizeof(uct_rc_iface_send_desc_t) + UCT_RC_MAX_ATOMIC_SIZE, ++ sizeof(uct_rc_iface_send_desc_t) + UCT_IB_MAX_ATOMIC_SIZE, ++ sizeof(uct_rc_iface_send_desc_t) + UCT_IB_MAX_ATOMIC_SIZE, + UCS_SYS_CACHE_LINE_SIZE, + &config->super.tx.mp, + rc_iface->config.tx_qp_len, +@@ -249,6 +426,7 @@ ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + "rc_mlx5_atomic_desc"); + if (status != UCS_OK) { + UCS_STATS_NODE_FREE(iface->stats); ++ goto cleanup_dm; + } + + /* For little-endian atomic reply, override the default functions, to still +@@ -264,6 +442,10 @@ ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + rc_iface->config.atomic64_ext_handler = uct_rc_mlx5_common_atomic64_le_handler; + } + ++ return UCS_OK; ++ ++cleanup_dm: ++ uct_rc_mlx5_iface_common_dm_cleanup(iface); + return status; + } + +@@ -271,14 +453,50 @@ void uct_rc_mlx5_iface_common_cleanup(uct_rc_mlx5_iface_common_t *iface) + { + UCS_STATS_NODE_FREE(iface->stats); + ucs_mpool_cleanup(&iface->tx.atomic_desc_mp, 1); ++ uct_rc_mlx5_iface_common_dm_cleanup(iface); + } + +-void uct_rc_mlx5_iface_common_query(uct_iface_attr_t *iface_attr) ++void uct_rc_mlx5_iface_common_query(uct_ib_iface_t *iface, uct_iface_attr_t *iface_attr) + { ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ + /* Atomics */ + iface_attr->cap.flags |= UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF | + UCT_IFACE_FLAG_ERRHANDLE_REMOTE_MEM; + ++ if (uct_ib_atomic_is_supported(dev, 0, sizeof(uint64_t))) { ++ iface_attr->cap.atomic64.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD); ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ } ++ ++ if (uct_ib_atomic_is_supported(dev, 1, sizeof(uint64_t))) { ++ iface_attr->cap.atomic64.op_flags |= UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP); ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ } ++ ++ if (uct_ib_atomic_is_supported(dev, 1, sizeof(uint32_t))) { ++ iface_attr->cap.atomic32.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ iface_attr->cap.atomic32.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ } ++ + /* Software overhead */ + iface_attr->overhead = 40e-9; + +@@ -287,61 +505,72 @@ void uct_rc_mlx5_iface_common_query(uct_iface_attr_t *iface_attr) + void uct_rc_mlx5_iface_common_update_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + uct_ib_iface_t *ib_iface) + { +- uct_ib_mlx5_update_cq_ci(ib_iface->send_cq, iface->tx.cq.cq_ci); +- uct_ib_mlx5_update_cq_ci(ib_iface->recv_cq, iface->rx.cq.cq_ci); ++#if !HAVE_DECL_MLX5DV_INIT_OBJ ++ uct_ib_mlx5_update_cq_ci(ib_iface->cq[UCT_IB_DIR_TX], iface->cq[UCT_IB_DIR_TX].cq_ci); ++ uct_ib_mlx5_update_cq_ci(ib_iface->cq[UCT_IB_DIR_RX], iface->cq[UCT_IB_DIR_RX].cq_ci); ++#endif + } + + void uct_rc_mlx5_iface_common_sync_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + uct_ib_iface_t *ib_iface) + { +- iface->tx.cq.cq_ci = uct_ib_mlx5_get_cq_ci(ib_iface->send_cq); +- iface->rx.cq.cq_ci = uct_ib_mlx5_get_cq_ci(ib_iface->recv_cq); ++#if !HAVE_DECL_MLX5DV_INIT_OBJ ++ iface->cq[UCT_IB_DIR_TX].cq_ci = uct_ib_mlx5_get_cq_ci(ib_iface->cq[UCT_IB_DIR_TX]); ++ iface->cq[UCT_IB_DIR_RX].cq_ci = uct_ib_mlx5_get_cq_ci(ib_iface->cq[UCT_IB_DIR_RX]); ++#endif + } + +-void uct_rc_mlx5_iface_commom_clean_srq(uct_rc_mlx5_iface_common_t *mlx5_common_iface, +- uct_rc_iface_t *rc_iface, uint32_t qpn) ++int uct_rc_mlx5_iface_commom_clean(uct_ib_mlx5_cq_t *mlx5_cq, ++ uct_ib_mlx5_srq_t *srq, uint32_t qpn) + { +- uct_ib_mlx5_cq_t *mlx5_cq = &mlx5_common_iface->rx.cq; + const size_t cqe_sz = 1ul << mlx5_cq->cqe_size_log; + struct mlx5_cqe64 *cqe, *dest; + uct_ib_mlx5_srq_seg_t *seg; +- unsigned ci, pi, idx; ++ unsigned pi, idx; + uint8_t owner_bit; + int nfreed; + +- pi = ci = mlx5_cq->cq_ci; +- while (uct_ib_mlx5_poll_cq(&rc_iface->super, mlx5_cq)) { +- if (pi == ci + mlx5_cq->cq_length - 1) { ++ pi = mlx5_cq->cq_ci; ++ for (;;) { ++ cqe = uct_ib_mlx5_get_cqe(mlx5_cq, pi); ++ if (uct_ib_mlx5_cqe_is_hw_owned(cqe->op_own, pi, mlx5_cq->cq_length)) { + break; + } ++ ++ ucs_assert((cqe->op_own >> 4) != MLX5_CQE_INVALID); ++ + ++pi; ++ if (pi == (mlx5_cq->cq_ci + mlx5_cq->cq_length - 1)) { ++ break; ++ } + } +- ucs_assert(pi == mlx5_cq->cq_ci); + + ucs_memory_cpu_load_fence(); + +- /* Remove CQEs of the destroyed QP, so the drive would not see them and try ++ /* Remove CQEs of the destroyed QP, so the driver would not see them and try + * to remove them itself, creating a mess with the free-list. + */ + nfreed = 0; +- while ((int)--pi - (int)ci >= 0) { ++ while ((int)--pi - (int)mlx5_cq->cq_ci >= 0) { + cqe = uct_ib_mlx5_get_cqe(mlx5_cq, pi); + if ((ntohl(cqe->sop_drop_qpn) & UCS_MASK(UCT_IB_QPN_ORDER)) == qpn) { + idx = ntohs(cqe->wqe_counter); +- seg = uct_ib_mlx5_srq_get_wqe(&mlx5_common_iface->rx.srq, idx); +- seg->srq.free = 1; +- ucs_trace("iface %p: freed srq seg[%d] of qpn 0x%x", +- mlx5_common_iface, idx, qpn); ++ if (srq) { ++ seg = uct_ib_mlx5_srq_get_wqe(srq, idx); ++ seg->srq.free = 1; ++ ucs_trace("cq %p: freed srq seg[%d] of qpn 0x%x", ++ mlx5_cq, idx, qpn); ++ } + ++nfreed; + } else if (nfreed) { +- /* push the CQEs we want to keep to cq_ci, and move cq_ci backwards */ +- dest = uct_ib_mlx5_get_cqe(mlx5_cq, mlx5_cq->cq_ci); ++ dest = uct_ib_mlx5_get_cqe(mlx5_cq, pi + nfreed); + owner_bit = dest->op_own & MLX5_CQE_OWNER_MASK; + memcpy((void*)(dest + 1) - cqe_sz, (void*)(cqe + 1) - cqe_sz, cqe_sz); + dest->op_own = (dest->op_own & ~MLX5_CQE_OWNER_MASK) | owner_bit; +- --mlx5_cq->cq_ci; + } + } + +- rc_iface->rx.srq.available += nfreed; ++ mlx5_cq->cq_ci += nfreed; ++ ++ return nfreed; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.h +index 55f2879..cca23e2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.h +@@ -7,6 +7,7 @@ + #ifndef UCT_RC_MLX5_COMMON_H + #define UCT_RC_MLX5_COMMON_H + ++#include + #include + #include + #include +@@ -32,6 +33,23 @@ + #define UCT_RC_MLX5_CHECK_PUT_SHORT(_length, _av_size) \ + UCT_CHECK_LENGTH(_length, 0, UCT_IB_MLX5_PUT_MAX_SHORT(_av_size), "put_short") + ++#define UCT_RC_MLX5_ATOMIC_OPS (UCS_BIT(UCT_ATOMIC_OP_ADD) | \ ++ UCS_BIT(UCT_ATOMIC_OP_AND) | \ ++ UCS_BIT(UCT_ATOMIC_OP_OR) | \ ++ UCS_BIT(UCT_ATOMIC_OP_XOR)) ++ ++#define UCT_RC_MLX5_ATOMIC_FOPS (UCT_RC_MLX5_ATOMIC_OPS | UCS_BIT(UCT_ATOMIC_OP_SWAP)) ++ ++#define UCT_RC_MLX5_CHECK_ATOMIC_OPS(_op, _size, _flags) \ ++ if (ucs_unlikely(!(UCS_BIT(_op) & (_flags)))) { \ ++ ucs_assertv(0, "incorrect opcode for atomic: %d", _op); \ ++ return UCS_ERR_UNSUPPORTED; \ ++ } else { \ ++ ucs_assert((_size == sizeof(uint64_t)) || (_size == sizeof(uint32_t))); \ ++ } ++ ++#define UCT_RC_MLX5_TO_BE(_val, _size) \ ++ ((_size) == sizeof(uint64_t) ? htobe64(_val) : htobe32(_val)) + + enum { + UCT_RC_MLX5_IFACE_STAT_RX_INL_32, +@@ -66,9 +84,15 @@ enum { + UCT_RC_MLX5_CQE_APP_OP_TM_CONSUMED_MSG = 0xA + }; + ++# define UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(_av_size) \ ++ (UCT_IB_MLX5_AM_MAX_SHORT(_av_size + sizeof(struct ibv_exp_tmh))/ \ ++ sizeof(struct mlx5_wqe_data_seg)) ++ ++# define UCT_RC_MLX5_TM_CQE_WITH_IMM(_cqe64) \ ++ (((_cqe64)->op_own >> 4) == MLX5_CQE_RESP_SEND_IMM) ++ + # define UCT_RC_MLX5_TM_IS_SW_RNDV(_cqe64, _imm_data) \ +- (ucs_unlikely((((_cqe64)->op_own >> 4) == MLX5_CQE_RESP_SEND_IMM) && \ +- !(_imm_data))) ++ (ucs_unlikely(UCT_RC_MLX5_TM_CQE_WITH_IMM(_cqe64) && !(_imm_data))) + + # define UCT_RC_MLX5_CHECK_TAG(_mlx5_common_iface) \ + if (ucs_unlikely((_mlx5_common_iface)->tm.head->next == NULL)) { \ +@@ -114,18 +138,63 @@ typedef struct uct_rc_mlx5_cmd_wq { + ops array size */ + } uct_rc_mlx5_cmd_wq_t; + ++static UCS_F_ALWAYS_INLINE void ++uct_rc_mlx5_fill_tmh(struct ibv_exp_tmh *tmh, uct_tag_t tag, ++ uint32_t app_ctx, unsigned op) ++{ ++ tmh->opcode = op; ++ tmh->app_ctx = app_ctx; ++ tmh->tag = tag; ++} ++ ++# define UCT_RC_MLX5_IFACE_GET_TM_BCOPY_DESC(_iface, _mp, _desc, _tag, _app_ctx, \ ++ _pack_cb, _arg, _length) \ ++ { \ ++ void *hdr; \ ++ UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ ++ (_desc)->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; \ ++ hdr = (_desc) + 1; \ ++ uct_rc_mlx5_fill_tmh(hdr, _tag, _app_ctx, IBV_EXP_TMH_EAGER); \ ++ hdr += sizeof(struct ibv_exp_tmh); \ ++ _length = _pack_cb(hdr, _arg); \ ++ } ++# else ++ ++# define UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(_av_size) 0 ++ + #endif /* IBV_EXP_HW_TM */ + ++#if HAVE_IBV_EXP_DM ++typedef struct uct_mlx5_dm_data { ++ uct_worker_tl_data_t super; ++ ucs_mpool_t mp; ++ struct ibv_mr *mr; ++ struct ibv_exp_dm *dm; ++ void *start_va; ++ size_t seg_len; ++ unsigned seg_count; ++ unsigned seg_attached; ++ uct_ib_device_t *device; ++} uct_mlx5_dm_data_t; ++ ++typedef union uct_rc_mlx5_dm_copy_data { ++ uct_rc_am_short_hdr_t am_hdr; ++#if IBV_EXP_HW_TM ++ struct ibv_exp_tmh tm_hdr; ++#endif ++ char bytes[sizeof(uint64_t) * 2]; ++} UCS_S_PACKED uct_rc_mlx5_dm_copy_data_t; ++#endif ++ + typedef struct uct_rc_mlx5_iface_common { + struct { +- uct_ib_mlx5_cq_t cq; + ucs_mpool_t atomic_desc_mp; + } tx; + struct { +- uct_ib_mlx5_cq_t cq; + uct_ib_mlx5_srq_t srq; + void *pref_ptr; + } rx; ++ uct_ib_mlx5_cq_t cq[UCT_IB_DIR_NUM]; + #if IBV_EXP_HW_TM + struct { + uct_rc_mlx5_cmd_wq_t cmd_wq; +@@ -134,10 +203,24 @@ typedef struct uct_rc_mlx5_iface_common { + uct_rc_mlx5_tag_entry_t *list; + } tm; + #endif ++#if HAVE_IBV_EXP_DM ++ struct { ++ uct_mlx5_dm_data_t *dm; ++ size_t seg_len; /* cached value to avoid double-pointer access */ ++ ucs_status_t (*am_short)(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *payload, unsigned length); ++#if IBV_EXP_HW_TM ++ ucs_status_t (*tag_short)(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length); ++#endif ++ } dm; ++#endif + UCS_STATS_NODE_DECLARE(stats); + } uct_rc_mlx5_iface_common_t; + + ++extern ucs_config_field_t uct_ib_mlx5_iface_config_table[]; ++ + unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_iface_t *iface, uct_ib_mlx5_srq_t *srq); + + void uct_rc_mlx5_iface_common_prepost_recvs(uct_rc_iface_t *iface, +@@ -145,11 +228,12 @@ void uct_rc_mlx5_iface_common_prepost_recvs(uct_rc_iface_t *iface, + + ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface, +- uct_rc_iface_config_t *config); ++ const uct_rc_iface_config_t *config, ++ const uct_ib_mlx5_iface_config_t *mlx5_config); + + void uct_rc_mlx5_iface_common_cleanup(uct_rc_mlx5_iface_common_t *iface); + +-void uct_rc_mlx5_iface_common_query(uct_iface_attr_t *iface_attr); ++void uct_rc_mlx5_iface_common_query(uct_ib_iface_t *ib_iface, uct_iface_attr_t *iface_attr); + + void uct_rc_mlx5_iface_common_update_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + uct_ib_iface_t *ib_iface); +@@ -157,19 +241,49 @@ void uct_rc_mlx5_iface_common_update_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + void uct_rc_mlx5_iface_common_sync_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + uct_ib_iface_t *ib_iface); + +-void uct_rc_mlx5_iface_commom_clean_srq(uct_rc_mlx5_iface_common_t *mlx5_common_iface, +- uct_rc_iface_t *rc_iface, uint32_t qpn); ++int uct_rc_mlx5_iface_commom_clean(uct_ib_mlx5_cq_t *mlx5_cq, ++ uct_ib_mlx5_srq_t *srq, uint32_t qpn); + + ucs_status_t + uct_rc_mlx5_iface_common_tag_init(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface, + uct_rc_iface_config_t *rc_config, ++ const uct_ib_mlx5_iface_config_t *mlx5_config, + struct ibv_exp_create_srq_attr *srq_init_attr, + unsigned rndv_hdr_len); + + void uct_rc_mlx5_iface_common_tag_cleanup(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface); + ++void uct_rc_mlx5_common_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max); ++ ++static UCS_F_ALWAYS_INLINE void ++uct_rc_mlx5_common_update_tx_res(uct_rc_iface_t *rc_iface, uct_ib_mlx5_txwq_t *txwq, ++ uct_rc_txqp_t *txqp, uint16_t hw_ci) ++{ ++ uint16_t bb_num; ++ ++ bb_num = uct_ib_mlx5_txwq_update_bb(txwq, hw_ci) - uct_rc_txqp_available(txqp); ++ ++ /* Must always have positive number of released resources. The first completion ++ * will report bb_num=1 (because prev_sw_pi is initialized to -1) and all the rest ++ * report the amount of BBs the previous WQE has consumed. ++ */ ++ ucs_assertv(bb_num > 0, "hw_ci=%d prev_sw_pi=%d available=%d bb_num=%d", ++ hw_ci, txwq->prev_sw_pi, txqp->available, bb_num); ++ ++ uct_rc_txqp_available_add(txqp, bb_num); ++ ucs_assert(uct_rc_txqp_available(txqp) <= txwq->bb_max); ++ ++ rc_iface->tx.cq_available += bb_num; ++ ucs_assertv(rc_iface->tx.cq_available <= rc_iface->config.tx_cq_len, ++ "cq_available=%d tx_cq_len=%d bb_num=%d txwq=%p txqp=%p", ++ rc_iface->tx.cq_available, rc_iface->config.tx_cq_len, bb_num, ++ txwq, txqp); ++} ++ + static UCS_F_ALWAYS_INLINE void + uct_rc_mlx5_txqp_process_tx_cqe(uct_rc_txqp_t *txqp, struct mlx5_cqe64 *cqe, + uint16_t hw_ci) +@@ -249,7 +363,7 @@ uct_rc_mlx5_iface_check_rx_completion(uct_rc_mlx5_iface_common_t *mlx5_common_if + uct_rc_iface_t *rc_iface, + struct mlx5_cqe64 *cqe) + { +- uct_ib_mlx5_cq_t *cq = &mlx5_common_iface->rx.cq; ++ uct_ib_mlx5_cq_t *cq = &mlx5_common_iface->cq[UCT_IB_DIR_RX]; + struct mlx5_err_cqe *ecqe = (void*)cqe; + uct_ib_mlx5_srq_seg_t *seg; + uint16_t wqe_ctr; +@@ -268,7 +382,8 @@ uct_rc_mlx5_iface_check_rx_completion(uct_rc_mlx5_iface_common_t *mlx5_common_if + wqe_ctr, UCS_OK, + rc_iface->super.config.rx_headroom_offset, + &rc_iface->super.release_desc); +- } else if ((ecqe->op_own >> 4) != MLX5_CQE_INVALID) { ++ } else { ++ ucs_assert((ecqe->op_own >> 4) != MLX5_CQE_INVALID); + uct_ib_mlx5_check_completion(&rc_iface->super, cq, cqe); + } + } +@@ -277,7 +392,7 @@ static UCS_F_ALWAYS_INLINE struct mlx5_cqe64* + uct_rc_mlx5_iface_poll_rx_cq(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + uct_rc_iface_t *rc_iface) + { +- uct_ib_mlx5_cq_t *cq = &mlx5_common_iface->rx.cq; ++ uct_ib_mlx5_cq_t *cq = &mlx5_common_iface->cq[UCT_IB_DIR_RX]; + struct mlx5_cqe64 *cqe; + unsigned index; + uint8_t op_own; +@@ -289,7 +404,7 @@ uct_rc_mlx5_iface_poll_rx_cq(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + cqe = uct_ib_mlx5_get_cqe(cq, index); + op_own = cqe->op_own; + +- if (ucs_unlikely((op_own & MLX5_CQE_OWNER_MASK) == !(index & cq->cq_length))) { ++ if (ucs_unlikely(uct_ib_mlx5_cqe_is_hw_owned(op_own, index, cq->cq_length))) { + return NULL; + } else if (ucs_unlikely(op_own & UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK)) { + uct_rc_mlx5_iface_check_rx_completion(mlx5_common_iface, rc_iface, cqe); +@@ -356,7 +471,7 @@ uct_rc_mlx5_iface_common_am_handler(uct_rc_mlx5_iface_common_t *mlx5_iface, + seg = uct_ib_mlx5_srq_get_wqe(&mlx5_iface->rx.srq, wqe_ctr); + + uct_ib_mlx5_log_rx(&rc_iface->super, IBV_QPT_RC, cqe, hdr, +- uct_rc_ep_am_packet_dump); ++ uct_rc_mlx5_common_packet_dump); + + if (ucs_unlikely(hdr->am_id & UCT_RC_EP_FC_MASK)) { + qp_num = ntohl(cqe->sop_drop_qpn) & UCS_MASK(UCT_IB_QPN_ORDER); +@@ -376,14 +491,15 @@ uct_rc_mlx5_iface_common_am_handler(uct_rc_mlx5_iface_common_t *mlx5_iface, + } + + static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_common_post_send(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++uct_rc_mlx5_common_post_send(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + uint8_t opcode, uint8_t opmod, uint8_t fm_ce_se, + size_t wqe_size, uct_ib_mlx5_base_av_t *av, +- struct mlx5_grh_av *grh_av, uint32_t imm) ++ struct mlx5_grh_av *grh_av, uint32_t imm, int max_log_sge, ++ uct_ib_log_sge_t *log_sge) + { + struct mlx5_wqe_ctrl_seg *ctrl; +- uint16_t posted; ++ uint16_t res_count; + + ctrl = txwq->curr; + +@@ -396,20 +512,22 @@ uct_rc_mlx5_common_post_send(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + txqp->qp->qp_num, fm_ce_se, wqe_size); + } + +- if (qp_type == IBV_EXP_QPT_DC_INI) { ++#if HAVE_TL_DC ++ if (qp_type == UCT_IB_QPT_DCI) { + uct_ib_mlx5_set_dgram_seg((void*)(ctrl + 1), av, grh_av, qp_type); + } ++#endif + +- uct_ib_mlx5_log_tx(&iface->super, qp_type, ctrl, txwq->qstart, txwq->qend, ++ uct_ib_mlx5_log_tx(&iface->super, qp_type, ctrl, txwq->qstart, ++ txwq->qend, max_log_sge, log_sge, + ((opcode == MLX5_OPCODE_SEND) || (opcode == MLX5_OPCODE_SEND_IMM)) ? +- uct_rc_ep_am_packet_dump : NULL); ++ uct_rc_mlx5_common_packet_dump : NULL); + +- posted = uct_ib_mlx5_post_send(txwq, ctrl, wqe_size); ++ res_count = uct_ib_mlx5_post_send(txwq, ctrl, wqe_size); + if (fm_ce_se & MLX5_WQE_CTRL_CQ_UPDATE) { +- txwq->sig_pi = txwq->sw_pi - posted; ++ txwq->sig_pi = txwq->prev_sw_pi; + } +- +- uct_rc_txqp_posted(txqp, iface, posted, fm_ce_se & MLX5_WQE_CTRL_CQ_UPDATE); ++ uct_rc_txqp_posted(txqp, iface, res_count, fm_ce_se & MLX5_WQE_CTRL_CQ_UPDATE); + } + + +@@ -430,13 +548,13 @@ uct_rc_mlx5_common_post_send(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + * is a compile time constant + */ + static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + unsigned opcode, const void *buffer, unsigned length, + /* SEND */ uint8_t am_id, uint64_t am_hdr, uint32_t imm_val_be, + /* RDMA */ uint64_t rdma_raddr, uct_rkey_t rdma_rkey, + /* AV */ uct_ib_mlx5_base_av_t *av, struct mlx5_grh_av *grh_av, +- size_t av_size, unsigned fm_ce_se) ++ size_t av_size, unsigned fm_ce_se, int max_log_sge) + { + struct mlx5_wqe_ctrl_seg *ctrl; + struct mlx5_wqe_raddr_seg *raddr; +@@ -487,7 +605,7 @@ uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + inl = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); + inl->byte_count = htonl(length | MLX5_INLINE_SEG); + uct_ib_mlx5_inline_copy(inl + 1, buffer, length, txwq); +- fm_ce_se |= MLX5_WQE_CTRL_CQ_UPDATE; ++ fm_ce_se |= uct_rc_iface_tx_moderation(iface, txqp, MLX5_WQE_CTRL_CQ_UPDATE); + break; + + case MLX5_OPCODE_NOP: +@@ -503,7 +621,7 @@ uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + } + + uct_rc_mlx5_common_post_send(iface, qp_type, txqp, txwq, opcode, 0, fm_ce_se, +- wqe_size, av, grh_av, imm_val_be); ++ wqe_size, av, grh_av, imm_val_be, max_log_sge, NULL); + } + + /* +@@ -525,14 +643,16 @@ uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + * is a compile time constant + */ + static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + unsigned opcode_flags, const void *buffer, + unsigned length, uint32_t *lkey_p, + /* RDMA/ATOMIC */ uint64_t remote_addr, uct_rkey_t rkey, +- /* ATOMIC */ uint64_t compare_mask, uint64_t compare, uint64_t swap_add, ++ /* ATOMIC */ uint64_t compare_mask, uint64_t compare, ++ /* ATOMIC */ uint64_t swap_mask, uint64_t swap_add, + /* AV */ uct_ib_mlx5_base_av_t *av, struct mlx5_grh_av *grh_av, +- size_t av_size, uint8_t fm_ce_se, uint32_t imm_val_be) ++ size_t av_size, uint8_t fm_ce_se, uint32_t imm_val_be, ++ int max_log_sge, uct_ib_log_sge_t *log_sge) + { + struct mlx5_wqe_ctrl_seg *ctrl; + struct mlx5_wqe_raddr_seg *raddr; +@@ -541,6 +661,7 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + struct uct_ib_mlx5_atomic_masked_cswap32_seg *masked_cswap32; + struct uct_ib_mlx5_atomic_masked_fadd32_seg *masked_fadd32; + struct uct_ib_mlx5_atomic_masked_cswap64_seg *masked_cswap64; ++ struct uct_ib_mlx5_atomic_masked_fadd64_seg *masked_fadd64; + size_t wqe_size, ctrl_av_size; + uint8_t opmod; + void *next_seg; +@@ -613,7 +734,7 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + masked_cswap32 = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); + masked_cswap32->swap = swap_add; + masked_cswap32->compare = compare; +- masked_cswap32->swap_mask = (uint32_t)-1; ++ masked_cswap32->swap_mask = swap_mask; + masked_cswap32->compare_mask = compare_mask; + dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_cswap32 + 1); + wqe_size = ctrl_av_size + sizeof(*raddr) + +@@ -627,7 +748,7 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + + /* 2nd half of masked_cswap64 can wrap */ + masked_cswap64 = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_cswap64 + 1); +- masked_cswap64->swap = (uint64_t)-1; ++ masked_cswap64->swap = swap_mask; + masked_cswap64->compare = compare_mask; + + dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_cswap64 + 1); +@@ -641,18 +762,33 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + break; + + case MLX5_OPCODE_ATOMIC_MASKED_FA: +- ucs_assert(length == sizeof(uint32_t)); +- raddr = uct_ib_mlx5_txwq_wrap_exact(txwq, (void*)ctrl + ctrl_av_size); ++ raddr = next_seg; + uct_ib_mlx5_ep_set_rdma_seg(raddr, remote_addr, rkey); + +- opmod = UCT_IB_MLX5_OPMOD_EXT_ATOMIC(2); +- masked_fadd32 = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); +- masked_fadd32->add = swap_add; +- masked_fadd32->filed_boundary = 0; +- +- dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_fadd32 + 1); +- wqe_size = ctrl_av_size + sizeof(*raddr) + +- sizeof(*masked_fadd32) + sizeof(*dptr); ++ switch (length) { ++ case sizeof(uint32_t): ++ opmod = UCT_IB_MLX5_OPMOD_EXT_ATOMIC(2); ++ masked_fadd32 = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); ++ masked_fadd32->add = swap_add; ++ masked_fadd32->filed_boundary = compare; ++ ++ dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_fadd32 + 1); ++ wqe_size = ctrl_av_size + sizeof(*raddr) + ++ sizeof(*masked_fadd32) + sizeof(*dptr); ++ break; ++ case sizeof(uint64_t): ++ opmod = UCT_IB_MLX5_OPMOD_EXT_ATOMIC(3); /* Ext. atomic, size 2**3 */ ++ masked_fadd64 = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); ++ masked_fadd64->add = swap_add; ++ masked_fadd64->filed_boundary = compare; ++ ++ dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_fadd64 + 1); ++ wqe_size = ctrl_av_size + sizeof(*raddr) + ++ sizeof(*masked_fadd64) + sizeof(*dptr); ++ break; ++ default: ++ ucs_fatal("invalid atomic type length %d", length); ++ } + uct_ib_mlx5_set_data_seg(dptr, buffer, length, *lkey_p); + break; + +@@ -661,12 +797,13 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + } + + uct_rc_mlx5_common_post_send(iface, qp_type, txqp, txwq, +- (opcode_flags & UCT_RC_MLX5_OPCODE_MASK), +- opmod, fm_ce_se, wqe_size, av, grh_av, imm_val_be); ++ (opcode_flags & UCT_RC_MLX5_OPCODE_MASK), opmod, ++ fm_ce_se, wqe_size, av, grh_av, imm_val_be, ++ max_log_sge, log_sge); + } + + static UCS_F_ALWAYS_INLINE +-void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + unsigned opcode_flags, + /* IOV */ const uct_iov_t *iov, size_t iovcnt, +@@ -674,7 +811,7 @@ void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_t + /* RDMA */ uint64_t remote_addr, uct_rkey_t rkey, + /* TAG */ uct_tag_t tag, uint32_t app_ctx, uint32_t ib_imm_be, + /* AV */ uct_ib_mlx5_base_av_t *av, struct mlx5_grh_av *grh_av, +- size_t av_size, uint8_t fm_ce_se) ++ size_t av_size, uint8_t fm_ce_se, int max_log_sge) + { + struct mlx5_wqe_ctrl_seg *ctrl; + struct mlx5_wqe_raddr_seg *raddr; +@@ -713,7 +850,7 @@ void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_t + wqe_size = ctrl_av_size + inl_seg_size + + uct_ib_mlx5_set_data_seg_iov(txwq, dptr, iov, iovcnt); + +- ucs_assert(wqe_size <= (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB)); ++ ucs_assert(wqe_size <= UCT_IB_MLX5_MAX_SEND_WQE_SIZE); + break; + + #if IBV_EXP_HW_TM +@@ -727,9 +864,9 @@ void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_t + wqe_size = ctrl_av_size + inl_seg_size + + uct_ib_mlx5_set_data_seg_iov(txwq, dptr, iov, iovcnt); + +- uct_rc_iface_fill_tmh((struct ibv_exp_tmh*)(inl + 1), tag, app_ctx, +- IBV_EXP_TMH_EAGER); +- ucs_assert(wqe_size <= (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB)); ++ uct_rc_mlx5_fill_tmh((struct ibv_exp_tmh*)(inl + 1), tag, app_ctx, ++ IBV_EXP_TMH_EAGER); ++ ucs_assert(wqe_size <= UCT_IB_MLX5_MAX_SEND_WQE_SIZE); + break; + #endif + +@@ -753,7 +890,8 @@ void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_t + + uct_rc_mlx5_common_post_send(iface, qp_type, txqp, txwq, + opcode_flags & UCT_RC_MLX5_OPCODE_MASK, +- 0, fm_ce_se, wqe_size, av, grh_av, ib_imm_be); ++ 0, fm_ce_se, wqe_size, av, grh_av, ib_imm_be, ++ max_log_sge, NULL); + } + + #if IBV_EXP_HW_TM +@@ -778,8 +916,8 @@ uct_rc_mlx5_set_tm_seg(uct_ib_mlx5_txwq_t *txwq, + return; + } + +- tmseg->append_tag = htobe64(tag); +- tmseg->append_mask = htobe64(mask); ++ tmseg->append_tag = tag; ++ tmseg->append_mask = mask; + } + + static UCS_F_ALWAYS_INLINE void +@@ -805,7 +943,7 @@ uct_rc_mlx5_add_cmd_qp_op(uct_rc_mlx5_iface_common_t *iface, + } + + static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_txqp_tag_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++uct_rc_mlx5_txqp_tag_inline_post(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + unsigned opcode, const void *buffer, unsigned length, + const uct_iov_t *iov, /* relevant for RNDV */ +@@ -845,7 +983,7 @@ uct_rc_mlx5_txqp_tag_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type + ((uct_ib_mem_t*)iov->memh)->mr->rkey, iov->length); + uct_ib_mlx5_inline_copy(tmh + 1, &rvh, sizeof(rvh), txwq); + +- if (qp_type == IBV_EXP_QPT_DC_INI) { ++ if (qp_type == UCT_IB_QPT_DCI) { + /* RAVH can be wrapped as well */ + ravh_ptr = uct_ib_mlx5_txwq_wrap_data(txwq, (char*)tmh + + sizeof(*tmh) + sizeof(rvh)); +@@ -870,16 +1008,16 @@ uct_rc_mlx5_txqp_tag_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type + break; + } + +- ucs_assert(wqe_size <= (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB)); ++ ucs_assert(wqe_size <= UCT_IB_MLX5_MAX_SEND_WQE_SIZE); + +- uct_rc_iface_fill_tmh(tmh, tag, app_ctx, tm_op); ++ uct_rc_mlx5_fill_tmh(tmh, tag, app_ctx, tm_op); + + /* In case of RNDV first bytes of data could be stored in TMH */ + uct_ib_mlx5_inline_copy(data, (char*)buffer + tmh_data_len, length, txwq); + fm_ce_se |= uct_rc_iface_tx_moderation(iface, txqp, MLX5_WQE_CTRL_CQ_UPDATE); + + uct_rc_mlx5_common_post_send(iface, qp_type, txqp, txwq, opcode, 0, fm_ce_se, +- wqe_size, av, grh_av, imm_val_be); ++ wqe_size, av, grh_av, imm_val_be, INT_MAX, NULL); + } + + static UCS_F_ALWAYS_INLINE void +@@ -951,6 +1089,9 @@ uct_rc_mlx5_iface_common_tag_recv(uct_rc_mlx5_iface_common_t *iface, + tag_mask, + UCT_RC_MLX5_SRQ_FLAG_TM_CQE_REQ | + UCT_RC_MLX5_SRQ_FLAG_TM_SW_CNT); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_ADD); ++ + return UCS_OK; + } + +@@ -978,6 +1119,9 @@ uct_rc_mlx5_iface_common_tag_recv_cancel(uct_rc_mlx5_iface_common_t *iface, + UCT_RC_MLX5_TM_OPCODE_REMOVE, index, + rc_iface->tm.unexpected_cnt, 0ul, 0ul, + flags); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_DEL); ++ + return UCS_OK; + } + +@@ -1018,8 +1162,8 @@ uct_rc_mlx5_iface_tag_consumed(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + /* Need to save TMH info, which will be used when + * UCT_RC_MLX5_CQE_APP_OP_TM_EXPECTED CQE is received */ + priv = uct_rc_iface_ctx_priv(ctx); +- priv->tag = be64toh(tmh->tag); +- priv->app_ctx = ntohl(tmh->app_ctx); ++ priv->tag = tmh->tag; ++ priv->app_ctx = tmh->app_ctx; + } + } + +@@ -1052,8 +1196,10 @@ uct_rc_mlx5_iface_handle_expected(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + + if (UCT_RC_MLX5_TM_IS_SW_RNDV(cqe, imm_data)) { + ctx->rndv_cb(ctx, tag, priv->buffer, byte_len, UCS_OK); ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_REQ_EXP); + } else { + ctx->completed_cb(ctx, tag, imm_data, byte_len, UCS_OK); ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_EXP); + } + } + +@@ -1075,6 +1221,8 @@ uct_rc_mlx5_iface_unexp_consumed(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + UCT_RC_MLX5_TM_OPCODE_NOP, 0, + rc_iface->tm.unexpected_cnt, 0ul, 0ul, + UCT_RC_MLX5_SRQ_FLAG_TM_SW_CNT); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_SYNC); + } + } + +@@ -1091,41 +1239,51 @@ uct_rc_mlx5_iface_tag_handle_unexp(uct_rc_mlx5_iface_common_t *mlx5_common_iface + tmh = uct_rc_mlx5_iface_common_data(mlx5_common_iface, rc_iface, cqe, + byte_len, &flags); + +- switch (tmh->opcode) { +- case IBV_EXP_TMH_EAGER: ++ if (ucs_likely((tmh->opcode == IBV_EXP_TMH_EAGER) && ++ !UCT_RC_MLX5_TM_CQE_WITH_IMM(cqe))) { ++ status = rc_iface->tm.eager_unexp.cb(rc_iface->tm.eager_unexp.arg, ++ tmh + 1, byte_len - sizeof(*tmh), ++ flags, tmh->tag, 0); ++ ++ uct_rc_mlx5_iface_unexp_consumed(mlx5_common_iface, rc_iface, ++ &rc_iface->tm.eager_desc, status, ++ ntohs(cqe->wqe_counter)); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_EAGER_UNEXP); ++ ++ } else if (tmh->opcode == IBV_EXP_TMH_EAGER) { + imm_data = uct_rc_iface_tag_imm_data_unpack(cqe->imm_inval_pkey, +- ntohl(tmh->app_ctx), +- (cqe->op_own >> 4) == +- MLX5_CQE_RESP_SEND_IMM); ++ tmh->app_ctx, 1); + +- if (UCT_RC_MLX5_TM_IS_SW_RNDV(cqe, cqe->imm_inval_pkey)) { ++ if (ucs_unlikely(!imm_data)) { ++ /* Opcode is WITH_IMM, but imm_data is 0 - this must be SW RNDV */ + status = rc_iface->tm.rndv_unexp.cb(rc_iface->tm.rndv_unexp.arg, +- flags, be64toh(tmh->tag), tmh + 1, ++ flags, tmh->tag, tmh + 1, + byte_len - sizeof(*tmh), + 0ul, 0, NULL); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_REQ_UNEXP); + } else { + status = rc_iface->tm.eager_unexp.cb(rc_iface->tm.eager_unexp.arg, + tmh + 1, byte_len - sizeof(*tmh), +- flags, be64toh(tmh->tag), +- imm_data); ++ flags, tmh->tag, imm_data); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_EAGER_UNEXP); + } + + uct_rc_mlx5_iface_unexp_consumed(mlx5_common_iface, rc_iface, + &rc_iface->tm.eager_desc, status, + ntohs(cqe->wqe_counter)); +- break; +- +- case IBV_EXP_TMH_RNDV: +- status = uct_rc_iface_handle_rndv(rc_iface, tmh, byte_len); ++ } else { ++ ucs_assertv_always(tmh->opcode == IBV_EXP_TMH_RNDV, ++ "Unsupported packet arrived %d", tmh->opcode); ++ status = uct_rc_iface_handle_rndv(rc_iface, tmh, tmh->tag, byte_len); + + uct_rc_mlx5_iface_unexp_consumed(mlx5_common_iface, rc_iface, + &rc_iface->tm.rndv_desc, status, + ntohs(cqe->wqe_counter)); +- break; + +- default: +- ucs_fatal("Unsupported packet arrived %d", tmh->opcode); +- break; ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_UNEXP); + } + } + +@@ -1176,6 +1334,14 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + #if IBV_EXP_HW_TM + ucs_assert(cqe->app == UCT_RC_MLX5_CQE_APP_TAG_MATCHING); + ++ /* Should be a fast path, because small (latency-critical) messages ++ * are not supposed to be offloaded to the HW. */ ++ if (ucs_likely(cqe->app_op == UCT_RC_MLX5_CQE_APP_OP_TM_UNEXPECTED)) { ++ uct_rc_mlx5_iface_tag_handle_unexp(mlx5_common_iface, rc_iface, cqe, ++ byte_len); ++ goto done; ++ } ++ + switch (cqe->app_op) { + case UCT_RC_MLX5_CQE_APP_OP_TM_APPEND: + uct_rc_mlx5_iface_handle_tm_list_op(mlx5_common_iface, +@@ -1196,19 +1362,16 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + byte_len); + } else { + ucs_assert(tmh->opcode == IBV_EXP_TMH_FIN); +- uct_rc_iface_handle_rndv_fin(rc_iface, tmh); ++ uct_rc_iface_handle_rndv_fin(rc_iface, tmh->app_ctx); + seg = uct_ib_mlx5_srq_get_wqe(&mlx5_common_iface->rx.srq, + ntohs(cqe->wqe_counter)); + + uct_rc_mlx5_iface_release_srq_seg(mlx5_common_iface, rc_iface, seg, + ntohs(cqe->wqe_counter), UCS_OK, 0, + NULL); +- } +- break; + +- case UCT_RC_MLX5_CQE_APP_OP_TM_UNEXPECTED: +- uct_rc_mlx5_iface_tag_handle_unexp(mlx5_common_iface, rc_iface, cqe, +- byte_len); ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_FIN); ++ } + break; + + case UCT_RC_MLX5_CQE_APP_OP_TM_CONSUMED: +@@ -1223,8 +1386,7 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + UCT_RC_MLX5_CQE_APP_OP_TM_CONSUMED_MSG); + + uct_rc_mlx5_iface_handle_expected(mlx5_common_iface, rc_iface, cqe, +- byte_len, be64toh(tmh->tag), +- ntohl(tmh->app_ctx)); ++ byte_len, tmh->tag, tmh->app_ctx); + break; + + case UCT_RC_MLX5_CQE_APP_OP_TM_EXPECTED: +@@ -1249,4 +1411,179 @@ done: + return count; + } + ++#if HAVE_IBV_EXP_DM ++/* DM memory should be written by 8 bytes to eliminate ++ * processor cache issues. To make this used uct_rc_mlx5_dm_copy_data_t ++ * datatype where first hdr_len bytes are filled by message header ++ * and tail is filled by head of message. */ ++static void UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_iface_common_copy_to_dm(uct_rc_mlx5_dm_copy_data_t *cache, size_t hdr_len, ++ const void *payload, size_t length, void *dm, ++ uct_ib_log_sge_t *log_sge) ++{ ++ typedef uint64_t misaligned_t UCS_V_ALIGNED(1); ++ ++ uint64_t padding = 0; /* init by 0 to suppress valgrind error */ ++ size_t head = (cache && hdr_len) ? ucs_min(length, sizeof(*cache) - hdr_len) : 0; ++ size_t body = ucs_align_down(length - head, sizeof(padding)); ++ size_t tail = length - (head + body); ++ char *dst = dm; ++ int i = 0; ++ ++ ucs_assert(sizeof(*cache) >= hdr_len); ++ ucs_assert(head + body + tail == length); ++ ucs_assert(tail < sizeof(padding)); ++ ++ /* copy head of payload to tail of cache */ ++ memcpy(cache->bytes + hdr_len, payload, head); ++ ++ UCS_STATIC_ASSERT(sizeof(*cache) == sizeof(cache->bytes)); ++ UCS_STATIC_ASSERT(sizeof(log_sge->sg_list) / sizeof(log_sge->sg_list[0]) >= 2); ++ ++ /* condition is static-evaluated */ ++ if (cache && hdr_len) { ++ /* atomically by 8 bytes copy data to DM */ ++ /* cache buffer must be aligned, so, source data type is aligned */ ++ UCS_WORD_COPY(volatile uint64_t, dst, uint64_t, cache->bytes, sizeof(cache->bytes)); ++ dst += sizeof(cache->bytes); ++ if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { ++ log_sge->sg_list[0].addr = (uint64_t)cache; ++ log_sge->sg_list[0].length = (uint32_t)hdr_len; ++ i++; ++ } ++ } ++ if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { ++ log_sge->sg_list[i].addr = (uint64_t)payload; ++ log_sge->sg_list[i].length = (uint32_t)length; ++ i++; ++ } ++ log_sge->num_sge = i; ++ ++ /* copy payload to DM */ ++ UCS_WORD_COPY(volatile uint64_t, dst, misaligned_t, payload + head, body); ++ if (tail) { ++ dst += body; ++ memcpy(&padding, payload + head + body, tail); ++ /* use uint64_t for source datatype because it is aligned buffer on stack */ ++ UCS_WORD_COPY(volatile uint64_t, dst, uint64_t, &padding, sizeof(padding)); ++ } ++} ++ ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_common_dm_make_data(uct_rc_mlx5_iface_common_t *iface, ++ uct_rc_iface_t *rc_iface, ++ uct_rc_mlx5_dm_copy_data_t *cache, ++ size_t hdr_len, const void *payload, ++ unsigned length, ++ uct_rc_iface_send_desc_t **desc_p, ++ void **buffer_p, uct_ib_log_sge_t *log_sge) ++{ ++ uct_rc_iface_send_desc_t *desc; ++ void *buffer; ++ ++ ucs_assert(iface->dm.dm != NULL); ++ ucs_assert(log_sge != NULL); ++ ++ desc = ucs_mpool_get_inline(&iface->dm.dm->mp); ++ if (ucs_unlikely(desc == NULL)) { ++ /* in case if no resources available - fallback to bcopy */ ++ UCT_RC_IFACE_GET_TX_DESC(rc_iface, &rc_iface->tx.mp, desc); ++ desc->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; ++ buffer = desc + 1; ++ ++ /* condition is static-evaluated, no performance penalty */ ++ if (cache && hdr_len) { ++ memcpy(buffer, cache->bytes, hdr_len); ++ } ++ memcpy(UCS_PTR_BYTE_OFFSET(buffer, hdr_len), payload, length); ++ log_sge->num_sge = 0; ++ } else { ++ /* desc must be partially initialized by mpool. ++ * hint to valgrind to make it defined */ ++ VALGRIND_MAKE_MEM_DEFINED(desc, sizeof(*desc)); ++ ucs_assert(desc->super.buffer != NULL); ++ buffer = (void*)(desc->super.buffer - iface->dm.dm->start_va); ++ ++ uct_rc_mlx5_iface_common_copy_to_dm(cache, hdr_len, payload, ++ length, desc->super.buffer, log_sge); ++ if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { ++ log_sge->sg_list[0].lkey = log_sge->sg_list[1].lkey = desc->lkey; ++ log_sge->inline_bitmap = 0; ++ } ++ } ++ ++ *desc_p = desc; ++ *buffer_p = buffer; ++ return UCS_OK; ++} ++#endif ++ ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_iface_common_atomic_data(unsigned opcode, unsigned size, uint64_t value, ++ int *op, uint64_t *compare_mask, uint64_t *compare, ++ uint64_t *swap_mask, uint64_t *swap, int *ext) ++{ ++ ucs_assert((size == sizeof(uint64_t)) || (size == sizeof(uint32_t))); ++ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ switch (size) { ++ case sizeof(uint64_t): ++ *op = MLX5_OPCODE_ATOMIC_FA; ++ *ext = 0; ++ break; ++ case sizeof(uint32_t): ++ *op = MLX5_OPCODE_ATOMIC_MASKED_FA; ++ *ext = 1; ++ break; ++ default: ++ ucs_assertv(0, "incorrect atomic size: %d", size); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ *compare_mask = 0; ++ *compare = 0; ++ *swap_mask = 0; ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ *op = MLX5_OPCODE_ATOMIC_MASKED_CS; ++ *compare_mask = 0; ++ *compare = 0; ++ *swap_mask = UCT_RC_MLX5_TO_BE(~value, size); ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ *ext = 1; ++ break; ++ case UCT_ATOMIC_OP_OR: ++ *op = MLX5_OPCODE_ATOMIC_MASKED_CS; ++ *compare_mask = 0; ++ *compare = 0; ++ *swap_mask = UCT_RC_MLX5_TO_BE(value, size); ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ *ext = 1; ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ *op = MLX5_OPCODE_ATOMIC_MASKED_FA; ++ *compare_mask = 0; ++ *compare = -1; ++ *swap_mask = 0; ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ *ext = 1; ++ break; ++ case UCT_ATOMIC_OP_SWAP: ++ *op = MLX5_OPCODE_ATOMIC_MASKED_CS; ++ *compare_mask = 0; ++ *compare = 0; ++ *swap_mask = -1; ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ *ext = 1; ++ break; ++ default: ++ ucs_assertv(0, "incorrect atomic opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ return UCS_OK; ++} ++ ++ ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_ep.c +index e839b05..5c6599c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_ep.c +@@ -24,14 +24,15 @@ uct_rc_mlx5_txqp_bcopy_post(uct_rc_iface_t *iface, uct_rc_txqp_t *txqp, uct_ib_m + unsigned opcode, unsigned length, + /* RDMA */ uint64_t rdma_raddr, uct_rkey_t rdma_rkey, + uint8_t fm_ce_se, uint32_t imm_val_be, +- uct_rc_iface_send_desc_t *desc) ++ uct_rc_iface_send_desc_t *desc, const void *buffer, ++ uct_ib_log_sge_t *log_sge) + { + desc->super.sn = txwq->sw_pi; + uct_rc_mlx5_txqp_dptr_post(iface, IBV_QPT_RC, txqp, txwq, +- opcode, desc + 1, length, &desc->lkey, ++ opcode, buffer, length, &desc->lkey, + rdma_raddr, uct_ib_md_direct_rkey(rdma_rkey), +- 0, 0, 0, +- NULL, NULL, 0, fm_ce_se, imm_val_be); ++ 0, 0, 0, 0, ++ NULL, NULL, 0, fm_ce_se, imm_val_be, INT_MAX, log_sge); + uct_rc_txqp_add_send_op(txqp, &desc->super); + } + +@@ -61,89 +62,119 @@ uct_rc_mlx5_ep_zcopy_post(uct_rc_mlx5_ep_t *ep, + rdma_raddr, uct_ib_md_direct_rkey(rdma_rkey), + tag, app_ctx, ib_imm_be, + NULL, NULL, 0, +- (comp == NULL) ? force_sig : MLX5_WQE_CTRL_CQ_UPDATE); ++ (comp == NULL) ? force_sig : MLX5_WQE_CTRL_CQ_UPDATE, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super)); + + uct_rc_txqp_add_send_comp(iface, &ep->super.txqp, comp, sn); + return UCS_INPROGRESS; + } + +-static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_ep_atomic_post(uct_rc_mlx5_ep_t *ep, unsigned opcode, +- uct_rc_iface_send_desc_t *desc, unsigned length, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t compare_mask, uint64_t compare, +- uint64_t swap_add, int signal) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_put_short_inline(uct_ep_h tl_ep, const void *buffer, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- uct_rc_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, +- uct_rc_iface_t); +- uint32_t ib_rkey = uct_ib_resolve_atomic_rkey(rkey, ep->super.atomic_mr_offset, +- &remote_addr); ++ uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); + +- desc->super.sn = ep->tx.wq.sw_pi; +- uct_rc_mlx5_txqp_dptr_post(iface, IBV_QPT_RC, +- &ep->super.txqp, &ep->tx.wq, +- opcode, desc + 1, length, &desc->lkey, +- remote_addr, ib_rkey, +- compare_mask, compare, swap_add, +- NULL, NULL, 0, signal, 0); ++ UCT_RC_MLX5_CHECK_PUT_SHORT(length, 0); ++ UCT_RC_CHECK_RES(iface, &ep->super); + +- UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_rc_txqp_add_send_op(&ep->super.txqp, &desc->super); ++ uct_rc_mlx5_txqp_inline_post(iface, IBV_QPT_RC, ++ &ep->super.txqp, &ep->tx.wq, ++ MLX5_OPCODE_RDMA_WRITE, ++ buffer, length, 0, 0, 0, ++ remote_addr, uct_ib_md_direct_rkey(rkey), ++ NULL, NULL, 0, 0, INT_MAX); ++ UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); ++ return UCS_OK; + } + +-static UCS_F_ALWAYS_INLINE ucs_status_t +-uct_rc_mlx5_ep_atomic(uct_rc_mlx5_ep_t *ep, int opcode, void *result, int ext, +- unsigned length, uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t compare_mask, uint64_t compare, +- uint64_t swap_add, uct_completion_t *comp) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_am_short_inline(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *payload, unsigned length) + { +- uct_rc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, +- uct_rc_mlx5_iface_t); +- uct_rc_iface_send_desc_t *desc; ++ uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); + +- UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->mlx5_common.tx.atomic_desc_mp, desc, +- uct_rc_iface_atomic_handler(&iface->super, ext, length), +- result, comp); +- uct_rc_mlx5_ep_atomic_post(ep, opcode, desc, length, remote_addr, rkey, +- compare_mask, compare, swap_add, +- MLX5_WQE_CTRL_CQ_UPDATE); +- return UCS_INPROGRESS; ++ UCT_RC_MLX5_CHECK_AM_SHORT(id, length, 0); ++ ++ UCT_RC_CHECK_RES(iface, &ep->super); ++ UCT_RC_CHECK_FC(iface, &ep->super, id); ++ ++ uct_rc_mlx5_txqp_inline_post(iface, IBV_QPT_RC, ++ &ep->super.txqp, &ep->tx.wq, ++ MLX5_OPCODE_SEND, ++ payload, length, ++ id, hdr, 0, ++ 0, 0, ++ NULL, NULL, 0, ++ MLX5_WQE_CTRL_SOLICITED, ++ INT_MAX); ++ UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); ++ UCT_RC_UPDATE_FC(iface, &ep->super, id); ++ return UCS_OK; + } + +-static UCS_F_ALWAYS_INLINE ucs_status_t +-uct_rc_mlx5_ep_atomic_add(uct_ep_h tl_ep, int opcode, unsigned length, +- uint64_t add, uint64_t remote_addr, uct_rkey_t rkey) ++#if HAVE_IBV_EXP_DM ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_short_dm(uct_rc_mlx5_ep_t *ep, uct_rc_mlx5_dm_copy_data_t *cache, ++ size_t hdr_len, const void *payload, unsigned length, ++ unsigned opcode, uint8_t fm_ce_se, ++ uint64_t rdma_raddr, uct_rkey_t rdma_rkey) + { +- uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); +- uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; + uct_rc_iface_send_desc_t *desc; ++ void *buffer; ++ ucs_status_t status; ++ uct_ib_log_sge_t log_sge; + +- UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super, &iface->mlx5_common.tx.atomic_desc_mp, desc); ++ status = uct_rc_mlx5_common_dm_make_data(&iface->mlx5_common, &iface->super, ++ cache, hdr_len, payload, length, &desc, ++ &buffer, &log_sge); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } + +- uct_rc_mlx5_ep_atomic_post(ep, opcode, desc, length, remote_addr, rkey, 0, +- 0, add, 0); ++ uct_rc_mlx5_txqp_bcopy_post(rc_iface, &ep->super.txqp, &ep->tx.wq, ++ opcode, hdr_len + length, ++ rdma_raddr, rdma_rkey, fm_ce_se, ++ 0, desc, buffer, ++ log_sge.num_sge ? &log_sge : NULL); + return UCS_OK; + } ++#endif + +-ucs_status_t uct_rc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, unsigned length, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t ++uct_rc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); +- uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++#if HAVE_IBV_EXP_DM ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ ucs_status_t status; + +- UCT_RC_MLX5_CHECK_PUT_SHORT(length, 0); +- UCT_RC_CHECK_RES(iface, &ep->super); ++ if (ucs_likely((length <= UCT_IB_MLX5_PUT_MAX_SHORT(0)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_rc_mlx5_ep_put_short_inline(tl_ep, buffer, length, remote_addr, rkey); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length, 0, iface->mlx5_common.dm.seg_len, "put_short"); ++ UCT_RC_CHECK_RES(rc_iface, &ep->super); ++ status = uct_rc_mlx5_ep_short_dm(ep, NULL, 0, buffer, length, ++ MLX5_OPCODE_RDMA_WRITE, ++ MLX5_WQE_CTRL_CQ_UPDATE, ++ remote_addr, rkey); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } + +- uct_rc_mlx5_txqp_inline_post(iface, IBV_QPT_RC, +- &ep->super.txqp, &ep->tx.wq, +- MLX5_OPCODE_RDMA_WRITE, +- buffer, length, 0, 0, 0, +- remote_addr, uct_ib_md_direct_rkey(rkey), +- NULL, NULL, 0, 0); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); + return UCS_OK; ++#endif + } + + ssize_t uct_rc_mlx5_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, +@@ -160,7 +191,8 @@ ssize_t uct_rc_mlx5_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + + uct_rc_mlx5_txqp_bcopy_post(iface, &ep->super.txqp, &ep->tx.wq, + MLX5_OPCODE_RDMA_WRITE, length, remote_addr, +- rkey, MLX5_WQE_CTRL_CQ_UPDATE, 0, desc); ++ rkey, MLX5_WQE_CTRL_CQ_UPDATE, 0, desc, desc + 1, ++ NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, BCOPY, length); + return length; + } +@@ -203,7 +235,8 @@ ucs_status_t uct_rc_mlx5_ep_get_bcopy(uct_ep_h tl_ep, + + uct_rc_mlx5_txqp_bcopy_post(iface, &ep->super.txqp, &ep->tx.wq, + MLX5_OPCODE_RDMA_READ, length, remote_addr, +- rkey, MLX5_WQE_CTRL_CQ_UPDATE, 0, desc); ++ rkey, MLX5_WQE_CTRL_CQ_UPDATE, 0, desc, desc + 1, ++ NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, GET, BCOPY, length); + return UCS_INPROGRESS; + } +@@ -230,28 +263,45 @@ ucs_status_t uct_rc_mlx5_ep_get_zcopy(uct_ep_h tl_ep, const uct_iov_t *iov, size + return status; + } + +-ucs_status_t uct_rc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, +- const void *payload, unsigned length) ++ucs_status_t ++uct_rc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *payload, unsigned length) + { +- uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); +- uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++#if HAVE_IBV_EXP_DM ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ ucs_status_t status; ++ uct_rc_mlx5_dm_copy_data_t cache; + +- UCT_RC_MLX5_CHECK_AM_SHORT(id, length, 0); ++ if (ucs_likely((sizeof(uct_rc_am_short_hdr_t) + length <= UCT_IB_MLX5_AM_MAX_SHORT(0)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_rc_mlx5_ep_am_short_inline(tl_ep, id, hdr, payload, length); ++#if HAVE_IBV_EXP_DM ++ } + +- UCT_RC_CHECK_RES(iface, &ep->super); +- UCT_RC_CHECK_FC(iface, &ep->super, id); ++ UCT_CHECK_LENGTH(length + sizeof(uct_rc_am_short_hdr_t), 0, ++ iface->mlx5_common.dm.seg_len, "am_short"); ++ UCT_CHECK_AM_ID(id); ++ UCT_RC_CHECK_RES(rc_iface, &ep->super); ++ UCT_RC_CHECK_FC(rc_iface, &ep->super, id); + +- uct_rc_mlx5_txqp_inline_post(iface, IBV_QPT_RC, +- &ep->super.txqp, &ep->tx.wq, +- MLX5_OPCODE_SEND, +- payload, length, +- id, hdr, 0, +- 0, 0, +- NULL, NULL, 0, +- MLX5_WQE_CTRL_SOLICITED); +- UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); +- UCT_RC_UPDATE_FC(iface, &ep->super, id); ++ uct_rc_am_hdr_fill(&cache.am_hdr.rc_hdr, id); ++ cache.am_hdr.am_hdr = hdr; ++ ++ status = uct_rc_mlx5_ep_short_dm(ep, &cache, sizeof(cache.am_hdr), payload, length, ++ MLX5_OPCODE_SEND, ++ MLX5_WQE_CTRL_SOLICITED | MLX5_WQE_CTRL_CQ_UPDATE, ++ 0, 0); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(cache.am_hdr) + length); ++ UCT_RC_UPDATE_FC(rc_iface, &ep->super, id); + return UCS_OK; ++#endif + } + + ssize_t uct_rc_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, +@@ -271,7 +321,8 @@ ssize_t uct_rc_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + + uct_rc_mlx5_txqp_bcopy_post(iface, &ep->super.txqp, &ep->tx.wq, + MLX5_OPCODE_SEND, sizeof(uct_rc_hdr_t) + length, +- 0, 0, MLX5_WQE_CTRL_SOLICITED, 0, desc); ++ 0, 0, MLX5_WQE_CTRL_SOLICITED, 0, desc, desc + 1, ++ NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); + UCT_RC_UPDATE_FC(iface, &ep->super, id); + return length; +@@ -303,78 +354,157 @@ ucs_status_t uct_rc_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *hea + return status; + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++static UCS_F_ALWAYS_INLINE void ++uct_rc_mlx5_ep_atomic_post(uct_rc_mlx5_ep_t *ep, unsigned opcode, ++ uct_rc_iface_send_desc_t *desc, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t compare_mask, uint64_t compare, ++ uint64_t swap_mask, uint64_t swap_add, int signal) ++{ ++ uct_rc_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, ++ uct_rc_iface_t); ++ uint32_t ib_rkey = uct_ib_resolve_atomic_rkey(rkey, ep->super.atomic_mr_offset, ++ &remote_addr); ++ ++ desc->super.sn = ep->tx.wq.sw_pi; ++ uct_rc_mlx5_txqp_dptr_post(iface, IBV_QPT_RC, ++ &ep->super.txqp, &ep->tx.wq, ++ opcode, desc + 1, length, &desc->lkey, ++ remote_addr, ib_rkey, ++ compare_mask, compare, swap_mask, swap_add, ++ NULL, NULL, 0, signal, 0, INT_MAX, NULL); ++ ++ UCT_TL_EP_STAT_ATOMIC(&ep->super.super); ++ uct_rc_txqp_add_send_op(&ep->super.txqp, &desc->super); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++uct_rc_mlx5_ep_atomic_fop(uct_rc_mlx5_ep_t *ep, int opcode, void *result, int ext, ++ unsigned length, uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t compare_mask, uint64_t compare, ++ uint64_t swap_mask, uint64_t swap_add, uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic_add(tl_ep, MLX5_OPCODE_ATOMIC_FA, sizeof(uint64_t), +- htobe64(add), remote_addr, rkey); ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, ++ uct_rc_mlx5_iface_t); ++ uct_rc_iface_send_desc_t *desc; ++ ++ UCT_RC_CHECK_RES(&iface->super, &ep->super); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super, &iface->mlx5_common.tx.atomic_desc_mp, ++ desc, uct_rc_iface_atomic_handler(&iface->super, ext, ++ length), ++ result, comp); ++ uct_rc_mlx5_ep_atomic_post(ep, opcode, desc, length, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap_add, ++ MLX5_WQE_CTRL_CQ_UPDATE); ++ return UCS_INPROGRESS; + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_atomic_op_post(uct_ep_h tl_ep, unsigned opcode, unsigned size, ++ uint64_t value, uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_FA, result, 0, sizeof(uint64_t), +- remote_addr, rkey, 0, 0, htobe64(add), comp); ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ uct_rc_iface_send_desc_t *desc; ++ int op; ++ uint64_t compare_mask; ++ uint64_t compare; ++ uint64_t swap_mask; ++ uint64_t swap; ++ int ext; /* not used here */ ++ ucs_status_t status; ++ ++ UCT_RC_CHECK_RES(&iface->super, &ep->super); ++ UCT_RC_MLX5_CHECK_ATOMIC_OPS(opcode, size, UCT_RC_MLX5_ATOMIC_OPS); ++ ++ status = uct_rc_mlx5_iface_common_atomic_data(opcode, size, value, &op, &compare_mask, ++ &compare, &swap_mask, &swap, &ext); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->mlx5_common.tx.atomic_desc_mp, desc); ++ ++ uct_rc_mlx5_ep_atomic_post(ep, op, desc, size, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap, 0); ++ return UCS_OK; + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_atomic_fop_post(uct_ep_h tl_ep, unsigned opcode, unsigned size, ++ uint64_t value, void *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint64_t), remote_addr, rkey, 0, 0, +- htobe64(swap), comp); ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ int op; ++ uint64_t compare_mask; ++ uint64_t compare; ++ uint64_t swap_mask; ++ uint64_t swap; ++ int ext; ++ ucs_status_t status; ++ ++ UCT_RC_MLX5_CHECK_ATOMIC_OPS(opcode, size, UCT_RC_MLX5_ATOMIC_FOPS); ++ ++ status = uct_rc_mlx5_iface_common_atomic_data(opcode, size, value, &op, &compare_mask, ++ &compare, &swap_mask, &swap, &ext); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ return uct_rc_mlx5_ep_atomic_fop(ep, op, result, ext, size, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap, comp); + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_mlx5_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_CS, result, 0, sizeof(uint64_t), +- remote_addr, rkey, 0, htobe64(compare), htobe64(swap), +- comp); ++ return uct_rc_mlx5_ep_atomic_op_post(ep, opcode, sizeof(value), value, remote_addr, rkey); + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_rc_mlx5_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_rc_mlx5_ep_atomic_add(tl_ep, MLX5_OPCODE_ATOMIC_MASKED_FA, +- sizeof(uint32_t), htonl(add), remote_addr, +- rkey); ++ return uct_rc_mlx5_ep_atomic_op_post(ep, opcode, sizeof(value), value, remote_addr, rkey); + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_mlx5_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_FA, result, 1, +- sizeof(uint32_t), remote_addr, rkey, 0, 0, +- htonl(add), comp); ++ return uct_rc_mlx5_ep_atomic_fop_post(ep, opcode, sizeof(value), value, result, ++ remote_addr, rkey, comp); + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_mlx5_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint32_t), remote_addr, rkey, 0, 0, +- htonl(swap), comp); ++ return uct_rc_mlx5_ep_atomic_fop_post(ep, opcode, sizeof(value), value, result, ++ remote_addr, rkey, comp); ++} ++ ++ucs_status_t uct_rc_mlx5_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp) ++{ ++ return uct_rc_mlx5_ep_atomic_fop(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), ++ MLX5_OPCODE_ATOMIC_CS, result, 0, sizeof(uint64_t), ++ remote_addr, rkey, 0, htobe64(compare), -1, htobe64(swap), ++ comp); + } + + ucs_status_t uct_rc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint32_t), remote_addr, rkey, UCS_MASK(32), +- htonl(compare), htonl(swap), comp); ++ return uct_rc_mlx5_ep_atomic_fop(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), ++ MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, ++ sizeof(uint32_t), remote_addr, rkey, UCS_MASK(32), ++ htonl(compare), -1, htonl(swap), comp); + } + + ucs_status_t uct_rc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, +@@ -398,14 +528,18 @@ ucs_status_t uct_rc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, + MLX5_OPCODE_NOP, NULL, 0, + 0, 0, 0, + 0, 0, +- NULL, NULL, 0, 0); ++ NULL, NULL, 0, 0, ++ INT_MAX); + } else { + sn = ep->tx.wq.sig_pi; + } + +- uct_rc_txqp_add_send_comp(&iface->super, &ep->super.txqp, comp, sn); +- UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super.super); +- return UCS_INPROGRESS; ++ status = uct_rc_txqp_add_flush_comp(&iface->super, &ep->super.txqp, comp, sn); ++ if (status == UCS_INPROGRESS) { ++ UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super.super); ++ } ++ ++ return status; + } + + ucs_status_t uct_rc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, +@@ -425,13 +559,16 @@ ucs_status_t uct_rc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + NULL, 0, + UCT_RC_EP_FC_PURE_GRANT, 0, 0, + 0, 0, +- NULL, NULL, 0, 0); ++ NULL, NULL, 0, 0, ++ INT_MAX); + return UCS_OK; + } + + #if IBV_EXP_HW_TM +-ucs_status_t uct_rc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, +- const void *data, size_t length) ++ ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_tag_eager_short_inline(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length) + { + uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); + uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); +@@ -444,9 +581,47 @@ ucs_status_t uct_rc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, + &ep->tx.wq, MLX5_OPCODE_SEND, data, length, + NULL, tag, 0, IBV_EXP_TMH_EAGER, 0, NULL, + NULL, 0, NULL, 0, MLX5_WQE_CTRL_SOLICITED); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ + return UCS_OK; + } + ++ucs_status_t uct_rc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length) ++{ ++#if HAVE_IBV_EXP_DM ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ uct_rc_mlx5_dm_copy_data_t cache; ++ ucs_status_t status; ++ ++ if (ucs_likely((sizeof(struct ibv_exp_tmh) + length <= UCT_IB_MLX5_AM_MAX_SHORT(0)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_rc_mlx5_ep_tag_eager_short_inline(tl_ep, tag, data, length); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length + sizeof(struct ibv_exp_tmh), 0, ++ iface->mlx5_common.dm.seg_len, "tag_short"); ++ UCT_RC_CHECK_RES(rc_iface, &ep->super); ++ ++ uct_rc_mlx5_fill_tmh(ucs_unaligned_ptr(&cache.tm_hdr), tag, 0, IBV_EXP_TMH_EAGER); ++ ++ status = uct_rc_mlx5_ep_short_dm(ep, &cache, sizeof(cache.tm_hdr), data, length, ++ MLX5_OPCODE_SEND, ++ MLX5_WQE_CTRL_SOLICITED | MLX5_WQE_CTRL_CQ_UPDATE, ++ 0, 0); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ } ++ ++ return status; ++#endif ++} ++ + ssize_t uct_rc_mlx5_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + uint64_t imm, + uct_pack_callback_t pack_cb, +@@ -464,12 +639,16 @@ ssize_t uct_rc_mlx5_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + UCT_RC_IFACE_FILL_TM_IMM(imm, app_ctx, ib_imm, opcode, MLX5_OPCODE_SEND, + _IMM); + +- UCT_RC_IFACE_GET_TM_BCOPY_DESC(iface, &iface->tx.mp, desc, +- tag, app_ctx, pack_cb, arg, length); ++ UCT_RC_MLX5_IFACE_GET_TM_BCOPY_DESC(iface, &iface->tx.mp, desc, tag, ++ app_ctx, pack_cb, arg, length); + + uct_rc_mlx5_txqp_bcopy_post(iface, &ep->super.txqp, &ep->tx.wq, + opcode, sizeof(struct ibv_exp_tmh) + length, +- 0, 0, MLX5_WQE_CTRL_SOLICITED, ib_imm, desc); ++ 0, 0, MLX5_WQE_CTRL_SOLICITED, ib_imm, ++ desc, desc + 1, NULL); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, BCOPY, length); ++ + return length; + } + +@@ -483,7 +662,8 @@ ucs_status_t uct_rc_mlx5_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + uint32_t app_ctx, ib_imm; + int opcode; + +- UCT_CHECK_IOV_SIZE(iovcnt, 1ul, "uct_rc_mlx5_ep_tag_eager_zcopy"); ++ UCT_CHECK_IOV_SIZE(iovcnt, UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(0), ++ "uct_rc_mlx5_ep_tag_eager_zcopy"); + UCT_RC_CHECK_ZCOPY_DATA(sizeof(struct ibv_exp_tmh), + uct_iov_total_length(iov, iovcnt), + iface->super.config.seg_size); +@@ -491,6 +671,9 @@ ucs_status_t uct_rc_mlx5_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + UCT_RC_IFACE_FILL_TM_IMM(imm, app_ctx, ib_imm, opcode, MLX5_OPCODE_SEND, + _IMM); + ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ + return uct_rc_mlx5_ep_zcopy_post(ep, opcode|UCT_RC_MLX5_OPCODE_FLAG_TM, + iov, iovcnt, 0, "", 0, 0, 0, + tag, app_ctx, ib_imm, +@@ -557,7 +740,8 @@ UCS_CLASS_INIT_FUNC(uct_rc_mlx5_ep_t, uct_iface_h tl_iface) + + UCS_CLASS_CALL_SUPER_INIT(uct_rc_ep_t, &iface->super); + +- status = uct_ib_mlx5_txwq_init(iface->super.super.super.worker, &self->tx.wq, ++ status = uct_ib_mlx5_txwq_init(iface->super.super.super.worker, ++ iface->tx.mmio_mode, &self->tx.wq, + self->super.txqp.qp); + if (status != UCS_OK) { + ucs_error("Failed to get mlx5 QP information"); +@@ -570,9 +754,10 @@ UCS_CLASS_INIT_FUNC(uct_rc_mlx5_ep_t, uct_iface_h tl_iface) + return UCS_OK; + } + +-static void uct_rc_mlx5_ep_reset_qp(uct_rc_mlx5_ep_t *ep) ++static void uct_rc_mlx5_ep_clean_qp(uct_rc_mlx5_ep_t *ep, struct ibv_qp *qp) + { +- uct_rc_txqp_t *txqp = &ep->super.txqp; ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, ++ uct_rc_mlx5_iface_t); + + /* Make the HW generate CQEs for all in-progress SRQ receives from the QP, + * so we clean them all before ibv_modify_qp() can see them. +@@ -587,13 +772,24 @@ static void uct_rc_mlx5_ep_reset_qp(uct_rc_mlx5_ep_t *ep) + */ + memset(&qp_attr, 0, sizeof(qp_attr)); + qp_attr.qp_state = IBV_QPS_RESET; +- ret = ibv_cmd_modify_qp(txqp->qp, &qp_attr, IBV_QP_STATE, &cmd, sizeof(cmd)); ++ ret = ibv_cmd_modify_qp(qp, &qp_attr, IBV_QP_STATE, &cmd, sizeof(cmd)); + if (ret) { +- ucs_warn("modify qp 0x%x to RESET failed: %m", txqp->qp->qp_num); ++ ucs_warn("modify qp 0x%x to RESET failed: %m", qp->qp_num); + } + #else +- (void)uct_rc_modify_qp(txqp, IBV_QPS_ERR); ++ (void)uct_ib_modify_qp(qp, IBV_QPS_ERR); + #endif ++ ++ iface->super.rx.srq.available += uct_rc_mlx5_iface_commom_clean( ++ &iface->mlx5_common.cq[UCT_IB_DIR_RX], ++ &iface->mlx5_common.rx.srq, qp->qp_num); ++ ++ /* Synchronize CQ index with the driver, since it would remove pending ++ * completions for this QP (both send and receive) during ibv_destroy_qp(). ++ */ ++ uct_rc_mlx5_iface_common_update_cqs_ci(&iface->mlx5_common, &iface->super.super); ++ (void)uct_ib_modify_qp(qp, IBV_QPS_RESET); ++ uct_rc_mlx5_iface_common_sync_cqs_ci(&iface->mlx5_common, &iface->super.super); + } + + static UCS_CLASS_CLEANUP_FUNC(uct_rc_mlx5_ep_t) +@@ -602,17 +798,12 @@ static UCS_CLASS_CLEANUP_FUNC(uct_rc_mlx5_ep_t) + uct_rc_mlx5_iface_t); + + uct_ib_mlx5_txwq_cleanup(&self->tx.wq); +- +- uct_rc_mlx5_ep_reset_qp(self); +- uct_rc_mlx5_iface_commom_clean_srq(&iface->mlx5_common, &iface->super, +- self->qp_num); +- +- /* Synchronize CQ index with the driver, since it would remove pending +- * completions for this QP (both send and receive) during ibv_destroy_qp(). +- */ +- uct_rc_mlx5_iface_common_update_cqs_ci(&iface->mlx5_common, &iface->super.super); +- (void)uct_rc_modify_qp(&self->super.txqp, IBV_QPS_RESET); +- uct_rc_mlx5_iface_common_sync_cqs_ci(&iface->mlx5_common, &iface->super.super); ++ uct_rc_mlx5_ep_clean_qp(self, self->super.txqp.qp); ++#if IBV_EXP_HW_TM ++ if (UCT_RC_IFACE_TM_ENABLED(&iface->super)) { ++ uct_rc_mlx5_ep_clean_qp(self, self->super.tm_qp); ++ } ++#endif + + /* Return all credits if user do flush(UCT_FLUSH_FLAG_CANCEL) before + * ep_destroy. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_iface.c +index fce6f8d..1d4eaa2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_iface.c +@@ -7,6 +7,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -23,6 +24,10 @@ ucs_config_field_t uct_rc_mlx5_iface_config_table[] = { + ucs_offsetof(uct_rc_mlx5_iface_config_t, fc), + UCS_CONFIG_TYPE_TABLE(uct_rc_fc_config_table)}, + ++ {"", "", NULL, ++ ucs_offsetof(uct_rc_mlx5_iface_config_t, mlx5_common), ++ UCS_CONFIG_TYPE_TABLE(uct_ib_mlx5_iface_config_table)}, ++ + {"TX_MAX_BB", "-1", + "Limits the number of outstanding WQE building blocks. The actual limit is\n" + "a minimum between this value and the number of building blocks in the TX QP.\n" +@@ -40,9 +45,9 @@ uct_rc_mlx5_iface_poll_tx(uct_rc_mlx5_iface_t *iface) + struct mlx5_cqe64 *cqe; + uct_rc_mlx5_ep_t *ep; + unsigned qp_num; +- uint16_t hw_ci, bb_num; ++ uint16_t hw_ci; + +- cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->mlx5_common.tx.cq); ++ cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->mlx5_common.cq[UCT_IB_DIR_TX]); + if (cqe == NULL) { + return 0; + } +@@ -58,11 +63,8 @@ uct_rc_mlx5_iface_poll_tx(uct_rc_mlx5_iface_t *iface) + ucs_trace_poll("rc_mlx5 iface %p tx_cqe: ep %p qpn 0x%x hw_ci %d", iface, ep, + qp_num, hw_ci); + +- bb_num = uct_ib_mlx5_txwq_update_bb(&ep->tx.wq, hw_ci) - +- uct_rc_txqp_available(&ep->super.txqp); +- uct_rc_txqp_available_add(&ep->super.txqp, bb_num); +- iface->super.tx.cq_available += bb_num; +- ++ uct_rc_mlx5_common_update_tx_res(&iface->super, &ep->tx.wq, &ep->super.txqp, ++ hw_ci); + uct_rc_mlx5_txqp_process_tx_cqe(&ep->super.txqp, cqe, hw_ci); + + ucs_arbiter_group_schedule(&iface->super.tx.arbiter, &ep->super.arb_group); +@@ -86,36 +88,46 @@ unsigned uct_rc_mlx5_iface_progress(void *arg) + + static ucs_status_t uct_rc_mlx5_iface_query(uct_iface_h tl_iface, uct_iface_attr_t *iface_attr) + { +- uct_rc_iface_t *iface = ucs_derived_of(tl_iface, uct_rc_iface_t); ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; ++ size_t max_am_inline = UCT_IB_MLX5_AM_MAX_SHORT(0); ++ size_t max_put_inline = UCT_IB_MLX5_PUT_MAX_SHORT(0); + ucs_status_t status; + +- status = uct_rc_iface_query(iface, iface_attr, +- UCT_IB_MLX5_PUT_MAX_SHORT(0), +- UCT_IB_MLX5_AM_MAX_SHORT(0), ++#if HAVE_IBV_EXP_DM ++ if (iface->mlx5_common.dm.dm != NULL) { ++ max_am_inline = ucs_max(iface->mlx5_common.dm.dm->seg_len, UCT_IB_MLX5_AM_MAX_SHORT(0)); ++ max_put_inline = ucs_max(iface->mlx5_common.dm.dm->seg_len, UCT_IB_MLX5_PUT_MAX_SHORT(0)); ++ } ++#endif ++ ++ status = uct_rc_iface_query(rc_iface, iface_attr, ++ max_put_inline, ++ max_am_inline, + UCT_IB_MLX5_AM_ZCOPY_MAX_HDR(0), +- UCT_IB_MLX5_AM_ZCOPY_MAX_IOV); ++ UCT_IB_MLX5_AM_ZCOPY_MAX_IOV, ++ UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(0)); + if (status != UCS_OK) { + return status; + } + +- uct_rc_mlx5_iface_common_query(iface_attr); ++ uct_rc_mlx5_iface_common_query(&rc_iface->super, iface_attr); + iface_attr->latency.growth += 1e-9; /* 1 ns per each extra QP */ + return UCS_OK; + } + +-static ucs_status_t uct_rc_mlx5_iface_arm_tx_cq(uct_ib_iface_t *ib_iface) +-{ +- uct_rc_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_rc_mlx5_iface_t); +- uct_ib_mlx5_update_cq_ci(iface->super.super.send_cq, iface->mlx5_common.tx.cq.cq_ci); +- return uct_ib_iface_arm_tx_cq(ib_iface); +-} +- +-static ucs_status_t uct_rc_mlx5_iface_arm_rx_cq(uct_ib_iface_t *ib_iface, +- int solicited_only) ++static ucs_status_t uct_rc_mlx5_iface_arm_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir, ++ int solicited_only) + { + uct_rc_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_rc_mlx5_iface_t); +- uct_ib_mlx5_update_cq_ci(iface->super.super.recv_cq, iface->mlx5_common.rx.cq.cq_ci); +- return uct_ib_iface_arm_rx_cq(ib_iface, solicited_only); ++#if HAVE_DECL_MLX5DV_INIT_OBJ ++ return uct_ib_mlx5dv_arm_cq(&iface->mlx5_common.cq[dir], solicited_only); ++#else ++ uct_ib_mlx5_update_cq_ci(iface->super.super.cq[dir], ++ iface->mlx5_common.cq[dir].cq_ci); ++ return uct_ib_iface_arm_cq(ib_iface, dir, solicited_only); ++#endif + } + + static void +@@ -145,7 +157,7 @@ uct_rc_mlx5_iface_handle_failure(uct_ib_iface_t *ib_iface, void *arg, + log_lvl = ib_iface->super.config.failure_level; + } + +- uct_ib_mlx5_completion_with_err(arg, log_lvl); ++ uct_ib_mlx5_completion_with_err(ib_iface, arg, log_lvl); + } + + static ucs_status_t uct_rc_mlx5_ep_set_failed(uct_ib_iface_t *iface, +@@ -207,7 +219,7 @@ static ucs_status_t uct_rc_mlx5_iface_tag_recv_cancel(uct_iface_h tl_iface, + + static ucs_status_t + uct_rc_mlx5_iface_tag_init(uct_rc_mlx5_iface_t *iface, +- uct_rc_iface_config_t *rc_config) ++ uct_rc_mlx5_iface_config_t *config) + { + #if IBV_EXP_HW_TM + if (UCT_RC_IFACE_TM_ENABLED(&iface->super)) { +@@ -216,7 +228,8 @@ uct_rc_mlx5_iface_tag_init(uct_rc_mlx5_iface_t *iface, + iface->super.progress = uct_rc_mlx5_iface_progress_tm; + + return uct_rc_mlx5_iface_common_tag_init(&iface->mlx5_common, +- &iface->super, rc_config, ++ &iface->super, &config->super, ++ &config->mlx5_common, + &srq_init_attr, + sizeof(struct ibv_exp_tmh_rvh)); + } +@@ -225,6 +238,14 @@ uct_rc_mlx5_iface_tag_init(uct_rc_mlx5_iface_t *iface, + return UCS_OK; + } + ++static void uct_rc_mlx5_iface_event_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir) ++{ ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_rc_mlx5_iface_t); ++ ++ iface->mlx5_common.cq[dir].cq_sn++; ++} ++ + + static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_t, uct_md_h md, uct_worker_h worker, + const uct_iface_params_t *params, +@@ -232,13 +253,19 @@ static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + { + uct_rc_mlx5_iface_config_t *config = ucs_derived_of(tl_config, + uct_rc_mlx5_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + ++ init_attr.res_domain_key = UCT_IB_MLX5_RES_DOMAIN_KEY; ++ init_attr.tm_cap_bit = IBV_EXP_TM_CAP_RC; ++ init_attr.fc_req_size = sizeof(uct_rc_fc_request_t); ++ init_attr.flags = UCT_IB_CQ_IGNORE_OVERRUN; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_rc_iface_t, &uct_rc_mlx5_iface_ops, md, worker, +- params, &config->super, 0, +- sizeof(uct_rc_fc_request_t), IBV_EXP_TM_CAP_RC); ++ params, &config->super, &init_attr); + + ++ self->tx.mmio_mode = config->mlx5_common.mmio_mode; + self->tx.bb_max = ucs_min(config->tx_max_bb, UINT16_MAX); + self->super.config.tx_moderation = ucs_min(self->super.config.tx_moderation, + self->tx.bb_max / 4); +@@ -248,12 +275,13 @@ static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + return status; + } + +- status = uct_rc_mlx5_iface_tag_init(self, &config->super); ++ status = uct_rc_mlx5_iface_tag_init(self, config); + if (status != UCS_OK) { + return status; + } + +- status = uct_rc_mlx5_iface_common_init(&self->mlx5_common, &self->super, &config->super); ++ status = uct_rc_mlx5_iface_common_init(&self->mlx5_common, &self->super, ++ &config->super, &config->mlx5_common); + if (status != UCS_OK) { + uct_rc_mlx5_iface_common_tag_cleanup(&self->mlx5_common, &self->super); + return status; +@@ -261,7 +289,7 @@ static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + + /* Set max_iov for put_zcopy and get_zcopy */ + uct_ib_iface_set_max_iov(&self->super.super, +- ((UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB) - ++ (UCT_IB_MLX5_MAX_SEND_WQE_SIZE - + sizeof(struct mlx5_wqe_raddr_seg) - + sizeof(struct mlx5_wqe_ctrl_seg)) / + sizeof(struct mlx5_wqe_data_seg)); +@@ -296,14 +324,12 @@ static uct_rc_iface_ops_t uct_rc_mlx5_iface_ops = { + .ep_am_short = uct_rc_mlx5_ep_am_short, + .ep_am_bcopy = uct_rc_mlx5_ep_am_bcopy, + .ep_am_zcopy = uct_rc_mlx5_ep_am_zcopy, +- .ep_atomic_add64 = uct_rc_mlx5_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_rc_mlx5_ep_atomic_fadd64, +- .ep_atomic_swap64 = uct_rc_mlx5_ep_atomic_swap64, + .ep_atomic_cswap64 = uct_rc_mlx5_ep_atomic_cswap64, +- .ep_atomic_add32 = uct_rc_mlx5_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_rc_mlx5_ep_atomic_fadd32, +- .ep_atomic_swap32 = uct_rc_mlx5_ep_atomic_swap32, + .ep_atomic_cswap32 = uct_rc_mlx5_ep_atomic_cswap32, ++ .ep_atomic64_post = uct_rc_mlx5_ep_atomic64_post, ++ .ep_atomic32_post = uct_rc_mlx5_ep_atomic32_post, ++ .ep_atomic64_fetch = uct_rc_mlx5_ep_atomic64_fetch, ++ .ep_atomic32_fetch = uct_rc_mlx5_ep_atomic32_fetch, + .ep_pending_add = uct_rc_ep_pending_add, + .ep_pending_purge = uct_rc_ep_pending_purge, + .ep_flush = uct_rc_mlx5_ep_flush, +@@ -335,10 +361,11 @@ static uct_rc_iface_ops_t uct_rc_mlx5_iface_ops = { + .iface_get_device_address = uct_ib_iface_get_device_address, + .iface_is_reachable = uct_rc_iface_is_reachable + }, +- .arm_tx_cq = uct_rc_mlx5_iface_arm_tx_cq, +- .arm_rx_cq = uct_rc_mlx5_iface_arm_rx_cq, ++ .arm_cq = uct_rc_mlx5_iface_arm_cq, ++ .event_cq = uct_rc_mlx5_iface_event_cq, + .handle_failure = uct_rc_mlx5_iface_handle_failure, +- .set_ep_failed = uct_rc_mlx5_ep_set_failed ++ .set_ep_failed = uct_rc_mlx5_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .fc_ctrl = uct_rc_mlx5_ep_fc_ctrl, + .fc_handler = uct_rc_iface_fc_handler +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.c +index 72c34aa..71f09e0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.c +@@ -125,8 +125,7 @@ static void uct_rc_ep_tag_qp_destroy(uct_rc_ep_t *ep) + #endif + } + +-static ucs_status_t uct_rc_ep_tag_qp_create(uct_rc_iface_t *iface, +- uct_rc_ep_t *ep) ++static ucs_status_t uct_rc_ep_tag_qp_create(uct_rc_iface_t *iface, uct_rc_ep_t *ep) + { + #if IBV_EXP_HW_TM + struct ibv_qp_cap cap; +@@ -283,46 +282,54 @@ ucs_status_t uct_rc_ep_connect_to_ep(uct_ep_h tl_ep, const uct_device_addr_t *de + return UCS_OK; + } + +-ucs_status_t uct_rc_modify_qp(uct_rc_txqp_t *txqp, enum ibv_qp_state state) +-{ +- struct ibv_qp_attr qp_attr; +- +- ucs_debug("modify QP 0x%x to state %d", txqp->qp->qp_num, state); +- memset(&qp_attr, 0, sizeof(qp_attr)); +- qp_attr.qp_state = state; +- if (ibv_modify_qp(txqp->qp, &qp_attr, IBV_QP_STATE)) { +- ucs_warn("modify qp 0x%x to state %d failed: %m", state, +- txqp->qp->qp_num); +- return UCS_ERR_IO_ERROR; +- } +- +- return UCS_OK; +-} +- +-void uct_rc_ep_am_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, +- void *data, size_t length, size_t valid_length, +- char *buffer, size_t max) ++void uct_rc_ep_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max, int is_tmh_be) + { + uct_rc_hdr_t *rch = data; + uint8_t fc_hdr = uct_rc_fc_get_fc_hdr(rch->am_id); + uint8_t am_wo_fc; + ++#if IBV_EXP_HW_TM ++ if (rch->tmh_opcode != IBV_EXP_TMH_NO_TAG) { ++ struct ibv_exp_tmh *tmh = (void*)rch; ++ struct ibv_exp_tmh_rvh *rvh = (void*)(tmh + 1); ++ uct_tag_t tag; ++ uint32_t app_ctx; ++ ++ if (is_tmh_be) { ++ tag = be64toh(tmh->tag); ++ app_ctx = ntohl(tmh->app_ctx); ++ } else { ++ tag = tmh->tag; ++ app_ctx = tmh->app_ctx; ++ } ++ ++ switch (rch->tmh_opcode) { ++ case IBV_EXP_TMH_EAGER: ++ snprintf(buffer, max, " EAGER tag %lx app_ctx %d", tag, app_ctx); ++ return; ++ case IBV_EXP_TMH_RNDV: ++ snprintf(buffer, max, " RNDV tag %lx app_ctx %d va 0x%lx len %d rkey %x", ++ tag, app_ctx, be64toh(rvh->va), ntohl(rvh->len), ntohl(rvh->rkey)); ++ return; ++ case IBV_EXP_TMH_FIN: ++ snprintf(buffer, max, " FIN tag %lx app_ctx %d", tag, app_ctx); ++ return; ++ default: ++ break; ++ } ++ } ++#endif ++ + /* Do not invoke AM tracer for auxiliary pure FC_GRANT message */ + if (fc_hdr != UCT_RC_EP_FC_PURE_GRANT) { + am_wo_fc = rch->am_id & ~UCT_RC_EP_FC_MASK; /* mask out FC bits*/ +- snprintf(buffer, max, " %c%c am %d " +-#if IBV_EXP_HW_TM +- "tm_op %d " +-#endif +- , ++ snprintf(buffer, max, " %c%c am %d ", + fc_hdr & UCT_RC_EP_FC_FLAG_SOFT_REQ ? 's' : + fc_hdr & UCT_RC_EP_FC_FLAG_HARD_REQ ? 'h' : '-', + fc_hdr & UCT_RC_EP_FC_FLAG_GRANT ? 'g' : '-', +- am_wo_fc +-#if IBV_EXP_HW_TM +- , rch->tmh_opcode +-#endif +- ); ++ am_wo_fc); + uct_iface_dump_am(iface, type, am_wo_fc, rch + 1, length - sizeof(*rch), + buffer + strlen(buffer), max - strlen(buffer)); + } else { +@@ -362,7 +369,15 @@ void uct_rc_ep_send_op_completion_handler(uct_rc_iface_send_op_t *op, + uct_rc_iface_put_send_op(op); + } + +-ucs_status_t uct_rc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n) ++void uct_rc_ep_flush_op_completion_handler(uct_rc_iface_send_op_t *op, ++ const void *resp) ++{ ++ uct_invoke_completion(op->user_comp, UCS_OK); ++ ucs_mpool_put(op); ++} ++ ++ucs_status_t uct_rc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags) + { + uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); + uct_rc_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_ep_t); +@@ -493,6 +508,8 @@ void uct_rc_txqp_purge_outstanding(uct_rc_txqp_t *txqp, ucs_status_t status, + op->flags &= ~UCT_RC_IFACE_SEND_OP_FLAG_INUSE; + if (op->handler == uct_rc_ep_send_op_completion_handler) { + uct_rc_iface_put_send_op(op); ++ } else if (op->handler == uct_rc_ep_flush_op_completion_handler) { ++ ucs_mpool_put(op); + } else { + desc = ucs_derived_of(op, uct_rc_iface_send_desc_t); + ucs_mpool_put(desc); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.h +index a8dff96..2e303dd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.h +@@ -230,11 +230,9 @@ ucs_status_t uct_rc_ep_get_address(uct_ep_h tl_ep, uct_ep_addr_t *addr); + ucs_status_t uct_rc_ep_connect_to_ep(uct_ep_h tl_ep, const uct_device_addr_t *dev_addr, + const uct_ep_addr_t *ep_addr); + +-ucs_status_t uct_rc_modify_qp(uct_rc_txqp_t *txqp, enum ibv_qp_state state); +- +-void uct_rc_ep_am_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, +- void *data, size_t length, size_t valid_length, +- char *buffer, size_t max); ++void uct_rc_ep_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max, int is_tmh_be); + + void uct_rc_ep_get_bcopy_handler(uct_rc_iface_send_op_t *op, const void *resp); + +@@ -244,7 +242,11 @@ void uct_rc_ep_get_bcopy_handler_no_completion(uct_rc_iface_send_op_t *op, + void uct_rc_ep_send_op_completion_handler(uct_rc_iface_send_op_t *op, + const void *resp); + +-ucs_status_t uct_rc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n); ++void uct_rc_ep_flush_op_completion_handler(uct_rc_iface_send_op_t *op, ++ const void *resp); ++ ++ucs_status_t uct_rc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags); + + void uct_rc_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, + void*arg); +@@ -358,6 +360,28 @@ uct_rc_txqp_add_send_comp(uct_rc_iface_t *iface, uct_rc_txqp_t *txqp, + uct_rc_txqp_add_send_op_sn(txqp, op, sn); + } + ++static UCS_F_ALWAYS_INLINE ucs_status_t ++uct_rc_txqp_add_flush_comp(uct_rc_iface_t *iface, uct_rc_txqp_t *txqp, ++ uct_completion_t *comp, uint16_t sn) ++{ ++ uct_rc_iface_send_op_t *op; ++ ++ if (comp != NULL) { ++ op = (uct_rc_iface_send_op_t*)ucs_mpool_get(&iface->tx.flush_mp); ++ if (ucs_unlikely(op == NULL)) { ++ ucs_error("Failed to allocate flush completion"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ op->flags = 0; ++ op->user_comp = comp; ++ uct_rc_txqp_add_send_op_sn(txqp, op, sn); ++ VALGRIND_MAKE_MEM_DEFINED(op, sizeof(*op)); /* handler set by mpool init */ ++ } ++ ++ return UCS_INPROGRESS; ++} ++ + static UCS_F_ALWAYS_INLINE void + uct_rc_txqp_completion_op(uct_rc_iface_send_op_t *op, const void *resp) + { +@@ -399,7 +423,8 @@ uct_rc_iface_tx_moderation(uct_rc_iface_t *iface, uct_rc_txqp_t *txqp, uint8_t f + } + + static UCS_F_ALWAYS_INLINE void +-uct_rc_txqp_posted(uct_rc_txqp_t *txqp, uct_rc_iface_t *iface, uint16_t res_count, int signaled) ++uct_rc_txqp_posted(uct_rc_txqp_t *txqp, uct_rc_iface_t *iface, uint16_t res_count, ++ int signaled) + { + if (signaled) { + ucs_assert(uct_rc_iface_have_tx_cqe_avail(iface)); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.c +index 270be52..bc2f449 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.c +@@ -76,6 +76,10 @@ ucs_config_field_t uct_rc_iface_config_table[] = { + "is a minimum between this value and the maximum value supported by the HW. \n" + "-1 means no limit.", + ucs_offsetof(uct_rc_iface_config_t, tm.list_size), UCS_CONFIG_TYPE_UINT}, ++ ++ {"TM_MAX_BCOPY", "48k", ++ "Maximal size of copy-out sends when tag-matching offload is enabled", ++ ucs_offsetof(uct_rc_iface_config_t, tm.max_bcopy), UCS_CONFIG_TYPE_MEMUNITS}, + #endif + + {NULL} +@@ -99,11 +103,30 @@ static ucs_stats_class_t uct_rc_iface_stats_class = { + .counter_names = { + [UCT_RC_IFACE_STAT_RX_COMPLETION] = "rx_completion", + [UCT_RC_IFACE_STAT_TX_COMPLETION] = "tx_completion", +- [UCT_RC_IFACE_STAT_NO_CQE] = "no_cqe", ++ [UCT_RC_IFACE_STAT_NO_CQE] = "no_cqe" ++ } ++}; ++ ++#if IBV_EXP_HW_TM ++static ucs_stats_class_t uct_rc_iface_tag_stats_class = { ++ .name = "tag", ++ .num_counters = UCT_RC_IFACE_STAT_TAG_LAST, ++ .counter_names = { ++ [UCT_RC_IFACE_STAT_TAG_RX_EXP] = "rx_exp", ++ [UCT_RC_IFACE_STAT_TAG_RX_EAGER_UNEXP] = "rx_unexp_eager", ++ [UCT_RC_IFACE_STAT_TAG_RX_RNDV_UNEXP] = "rx_unexp_rndv", ++ [UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_EXP] = "rx_exp_rndv_req", ++ [UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_UNEXP] = "rx_unexp_rndv_req", ++ [UCT_RC_IFACE_STAT_TAG_RX_RNDV_FIN] = "rx_rndv_fin", ++ [UCT_RC_IFACE_STAT_TAG_LIST_ADD] = "tx_add_op", ++ [UCT_RC_IFACE_STAT_TAG_LIST_DEL] = "tx_del_op", ++ [UCT_RC_IFACE_STAT_TAG_LIST_SYNC] = "tx_sync_op" + } + }; + #endif + ++#endif /* ENABLE_STATS */ ++ + + static ucs_mpool_ops_t uct_rc_fc_pending_mpool_ops = { + .chunk_alloc = ucs_mpool_chunk_malloc, +@@ -112,9 +135,27 @@ static ucs_mpool_ops_t uct_rc_fc_pending_mpool_ops = { + .obj_cleanup = NULL + }; + ++static void ++uct_rc_iface_flush_comp_init(ucs_mpool_t *mp, void *obj, void *chunk) ++{ ++ uct_rc_iface_t *iface = ucs_container_of(mp, uct_rc_iface_t, tx.flush_mp); ++ uct_rc_iface_send_op_t *op = obj; ++ ++ op->handler = uct_rc_ep_flush_op_completion_handler; ++ op->flags = 0; ++ op->iface = iface; ++} ++ ++static ucs_mpool_ops_t uct_rc_flush_comp_mpool_ops = { ++ .chunk_alloc = ucs_mpool_chunk_malloc, ++ .chunk_release = ucs_mpool_chunk_free, ++ .obj_init = uct_rc_iface_flush_comp_init, ++ .obj_cleanup = NULL ++}; ++ + static void uct_rc_iface_tag_query(uct_rc_iface_t *iface, + uct_iface_attr_t *iface_attr, +- size_t max_inline) ++ size_t max_inline, size_t max_iov) + { + #if IBV_EXP_HW_TM + unsigned eager_hdr_size = sizeof(struct ibv_exp_tmh); +@@ -137,13 +178,14 @@ static void uct_rc_iface_tag_query(uct_rc_iface_t *iface, + eager_hdr_size; + iface_attr->cap.tag.eager.max_zcopy = iface->super.config.seg_size - + eager_hdr_size; +- iface_attr->cap.tag.eager.max_iov = 1; ++ iface_attr->cap.tag.eager.max_iov = max_iov; + + port_attr = uct_ib_iface_port_attr(&iface->super); + iface_attr->cap.tag.rndv.max_zcopy = port_attr->max_msg_sz; + + /* TMH can carry 2 additional bytes of private data */ +- iface_attr->cap.tag.rndv.max_hdr = iface->tm.max_rndv_data + 2; ++ iface_attr->cap.tag.rndv.max_hdr = iface->tm.max_rndv_data + ++ UCT_RC_IFACE_TMH_PRIV_LEN; + iface_attr->cap.tag.rndv.max_iov = 1; + + iface_attr->cap.tag.recv.max_zcopy = port_attr->max_msg_sz; +@@ -156,7 +198,8 @@ static void uct_rc_iface_tag_query(uct_rc_iface_t *iface, + ucs_status_t uct_rc_iface_query(uct_rc_iface_t *iface, + uct_iface_attr_t *iface_attr, + size_t put_max_short, size_t max_inline, +- size_t am_max_hdr, size_t am_max_iov) ++ size_t am_max_hdr, size_t am_max_iov, ++ size_t tag_max_iov) + { + uct_ib_device_t *dev = uct_ib_iface_device(&iface->super); + ucs_status_t status; +@@ -186,24 +229,32 @@ ucs_status_t uct_rc_iface_query(uct_rc_iface_t *iface, + UCT_IFACE_FLAG_EVENT_RECV; + + if (uct_ib_atomic_is_supported(dev, 0, sizeof(uint64_t))) { +- iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 | +- UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ /* TODO: remove deprecated flags */ ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ ++ iface_attr->cap.atomic64.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD); ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); + } + ++#if HAVE_IB_EXT_ATOMICS + if (uct_ib_atomic_is_supported(dev, 1, sizeof(uint64_t))) { +- iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ /* TODO: remove deprecated flags */ ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_SWAP); + } + + if (uct_ib_atomic_is_supported(dev, 1, sizeof(uint32_t))) { +- iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32 | +- UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ /* TODO: remove deprecated flags */ ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ ++ iface_attr->cap.atomic32.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD); ++ iface_attr->cap.atomic32.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); + } ++#endif + + iface_attr->cap.put.opt_zcopy_align = UCS_SYS_PCI_MAX_PAYLOAD; + iface_attr->cap.get.opt_zcopy_align = UCS_SYS_PCI_MAX_PAYLOAD; +@@ -238,7 +289,7 @@ ucs_status_t uct_rc_iface_query(uct_rc_iface_t *iface, + iface_attr->cap.flags |= UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE; + + /* Tag Offload */ +- uct_rc_iface_tag_query(iface, iface_attr, max_inline); ++ uct_rc_iface_tag_query(iface, iface_attr, max_inline, tag_max_iov); + + return UCS_OK; + } +@@ -440,7 +491,7 @@ ucs_status_t uct_rc_iface_fc_handler(uct_rc_iface_t *iface, unsigned qp_num, + status = uct_rc_ep_fc_grant(&fc_req->super); + + if (status == UCS_ERR_NO_RESOURCE){ +- status = uct_ep_pending_add(&ep->super.super, &fc_req->super); ++ status = uct_ep_pending_add(&ep->super.super, &fc_req->super, 0); + } + ucs_assertv_always(status == UCS_OK, "Failed to send FC grant msg: %s", + ucs_status_string(status)); +@@ -455,6 +506,7 @@ static ucs_status_t uct_rc_iface_tx_ops_init(uct_rc_iface_t *iface) + { + const unsigned count = iface->config.tx_ops_count; + uct_rc_iface_send_op_t *op; ++ ucs_status_t status; + + iface->tx.ops_buffer = ucs_calloc(count, sizeof(*iface->tx.ops_buffer), + "rc_tx_ops"); +@@ -463,14 +515,22 @@ static ucs_status_t uct_rc_iface_tx_ops_init(uct_rc_iface_t *iface) + } + + iface->tx.free_ops = &iface->tx.ops_buffer[0]; +- for (op = iface->tx.ops_buffer; op < iface->tx.ops_buffer + count - 1; ++op) { ++ for (op = iface->tx.ops_buffer; op < iface->tx.ops_buffer + count; ++op) { + op->handler = uct_rc_ep_send_op_completion_handler; + op->flags = UCT_RC_IFACE_SEND_OP_FLAG_IFACE; + op->iface = iface; +- op->next = op + 1; ++ op->next = (op == (iface->tx.ops_buffer + count - 1)) ? NULL : (op + 1); + } +- iface->tx.ops_buffer[count - 1].next = NULL; +- return UCS_OK; ++ ++ /* Create memory pool for flush completions. Can't just alloc a certain ++ * size buffer, because number of simultaneous flushes is not limited by ++ * CQ or QP resources. */ ++ status = ucs_mpool_init(&iface->tx.flush_mp, 0, sizeof(*op), 0, ++ UCS_SYS_CACHE_LINE_SIZE, 256, ++ UINT_MAX, &uct_rc_flush_comp_mpool_ops, ++ "flush-comps-only"); ++ ++ return status; + } + + static void uct_rc_iface_tx_ops_cleanup(uct_rc_iface_t *iface) +@@ -489,6 +549,8 @@ static void uct_rc_iface_tx_ops_cleanup(uct_rc_iface_t *iface) + total_count- free_count, total_count); + } + ucs_free(iface->tx.ops_buffer); ++ ++ ucs_mpool_cleanup(&iface->tx.flush_mp, 1); + } + + #if IBV_EXP_HW_TM +@@ -500,8 +562,10 @@ static void uct_rc_iface_release_desc(uct_recv_desc_t *self, void *desc) + ucs_mpool_put_inline(ib_desc); + } + ++/* tag is passed as parameter, because some (but not all!) transports may need ++ * to translate TMH to LE */ + ucs_status_t uct_rc_iface_handle_rndv(uct_rc_iface_t *iface, +- struct ibv_exp_tmh *tmh, ++ struct ibv_exp_tmh *tmh, uct_tag_t tag, + unsigned byte_len) + { + uct_rc_iface_tmh_priv_data_t *priv = (uct_rc_iface_tmh_priv_data_t*)tmh->reserved; +@@ -537,8 +601,7 @@ ucs_status_t uct_rc_iface_handle_rndv(uct_rc_iface_t *iface, + uct_ib_md_pack_rkey(ntohl(rvh->rkey), UCT_IB_INVALID_RKEY, rb); + + /* Do not pass flags to cb, because rkey is allocated on stack */ +- return iface->tm.rndv_unexp.cb(iface->tm.rndv_unexp.arg, 0, +- be64toh(tmh->tag), ++ return iface->tm.rndv_unexp.cb(iface->tm.rndv_unexp.arg, 0, tag, + (char *)rndv_usr_hdr - priv->length, + rndv_usr_hdr_len + priv->length, + be64toh(rvh->va), rndv_data_len, +@@ -549,14 +612,15 @@ ucs_status_t uct_rc_iface_handle_rndv(uct_rc_iface_t *iface, + static void uct_rc_iface_preinit(uct_rc_iface_t *iface, uct_md_h md, + const uct_rc_iface_config_t *config, + const uct_iface_params_t *params, +- int tm_cap_flag, unsigned *rx_cq_len) ++ uct_ib_iface_init_attr_t *init_attr) + { + #if IBV_EXP_HW_TM +- struct ibv_exp_tmh tmh; + uct_ib_device_t *dev = &ucs_derived_of(md, uct_ib_md_t)->dev; + uint32_t cap_flags = IBV_DEVICE_TM_CAPS(dev, capability_flags); ++ struct ibv_exp_tmh tmh; + +- iface->tm.enabled = (config->tm.enable && (cap_flags & tm_cap_flag)); ++ iface->tm.enabled = config->tm.enable && ++ (cap_flags & init_attr->tm_cap_bit); + + if (!iface->tm.enabled) { + goto out_tm_disabled; +@@ -585,13 +649,17 @@ static void uct_rc_iface_preinit(uct_rc_iface_t *iface, uct_md_h md, + * - up to 3 CQEs for every posted tag: ADD, TM_CONSUMED and MSG_ARRIVED + * - one SYNC CQE per every IBV_DEVICE_MAX_UNEXP_COUNT unexpected receives */ + UCS_STATIC_ASSERT(IBV_DEVICE_MAX_UNEXP_COUNT); +- *rx_cq_len = config->super.rx.queue_len + iface->tm.num_tags * 3 + +- config->super.rx.queue_len / IBV_DEVICE_MAX_UNEXP_COUNT; ++ init_attr->rx_cq_len = config->super.rx.queue_len + iface->tm.num_tags * 3 + ++ config->super.rx.queue_len / ++ IBV_DEVICE_MAX_UNEXP_COUNT; ++ init_attr->seg_size = ucs_max(config->tm.max_bcopy, ++ config->super.super.max_bcopy); + return; + + out_tm_disabled: + #endif +- *rx_cq_len = config->super.rx.queue_len; ++ init_attr->rx_cq_len = config->super.rx.queue_len; ++ init_attr->seg_size = config->super.super.max_bcopy; + } + + ucs_status_t uct_rc_iface_tag_init(uct_rc_iface_t *iface, +@@ -604,6 +672,7 @@ ucs_status_t uct_rc_iface_tag_init(uct_rc_iface_t *iface, + #if IBV_EXP_HW_TM + uct_ib_md_t *md = uct_ib_iface_md(&iface->super); + unsigned tmh_hdrs_len = sizeof(struct ibv_exp_tmh) + rndv_hdr_len; ++ ucs_status_t status; + + if (!UCT_RC_IFACE_TM_ENABLED(iface)) { + goto out_tm_disabled; +@@ -634,7 +703,7 @@ ucs_status_t uct_rc_iface_tag_init(uct_rc_iface_t *iface, + srq_init_attr->base.srq_context = iface; + srq_init_attr->srq_type = IBV_EXP_SRQT_TAG_MATCHING; + srq_init_attr->pd = md->pd; +- srq_init_attr->cq = iface->super.recv_cq; ++ srq_init_attr->cq = iface->super.cq[UCT_IB_DIR_RX]; + srq_init_attr->tm_cap.max_num_tags = iface->tm.num_tags; + + /* 2 ops for each tag (ADD + DEL) and extra ops for SYNC. +@@ -648,11 +717,18 @@ ucs_status_t uct_rc_iface_tag_init(uct_rc_iface_t *iface, + + iface->rx.srq.srq = ibv_exp_create_srq(md->dev.ibv_context, srq_init_attr); + if (iface->rx.srq.srq == NULL) { +- ucs_error("Failed to create TM XRQ: %m"); ++ ucs_error("ibv_exp_create_srq(device=%s) failed: %m", ++ uct_ib_device_name(&md->dev)); + return UCS_ERR_IO_ERROR; + } + +- iface->rx.srq.available = srq_init_attr->base.attr.max_wr; ++ iface->rx.srq.quota = srq_init_attr->base.attr.max_wr; ++ ++ status = UCS_STATS_NODE_ALLOC(&iface->tm.stats, &uct_rc_iface_tag_stats_class, ++ iface->stats); ++ if (status != UCS_OK) { ++ ucs_bug("Failed to allocate tag stats: %s", ucs_status_string(status)); ++ } + + ucs_debug("Tag Matching enabled: tag list size %d", iface->tm.num_tags); + +@@ -667,6 +743,7 @@ void uct_rc_iface_tag_cleanup(uct_rc_iface_t *iface) + #if IBV_EXP_HW_TM + if (UCT_RC_IFACE_TM_ENABLED(iface)) { + ucs_ptr_array_cleanup(&iface->tm.rndv_comps); ++ UCS_STATS_NODE_FREE(iface->tm.stats); + } + #endif + } +@@ -679,22 +756,21 @@ unsigned uct_rc_iface_do_progress(uct_iface_h tl_iface) + + UCS_CLASS_INIT_FUNC(uct_rc_iface_t, uct_rc_iface_ops_t *ops, uct_md_h md, + uct_worker_h worker, const uct_iface_params_t *params, +- const uct_rc_iface_config_t *config, unsigned rx_priv_len, +- unsigned fc_req_size, int tm_cap_flag) ++ const uct_rc_iface_config_t *config, ++ uct_ib_iface_init_attr_t *init_attr) + { + uct_ib_device_t *dev = &ucs_derived_of(md, uct_ib_md_t)->dev; +- unsigned tx_cq_len = config->tx.cq_len; + struct ibv_srq_init_attr srq_init_attr; + ucs_status_t status; +- unsigned rx_cq_len; + +- uct_rc_iface_preinit(self, md, config, params, tm_cap_flag, &rx_cq_len); ++ uct_rc_iface_preinit(self, md, config, params, init_attr); ++ init_attr->rx_hdr_len = sizeof(uct_rc_hdr_t); ++ init_attr->tx_cq_len = config->tx.cq_len; + + UCS_CLASS_CALL_SUPER_INIT(uct_ib_iface_t, &ops->super, md, worker, params, +- rx_priv_len, sizeof(uct_rc_hdr_t), tx_cq_len, +- rx_cq_len, SIZE_MAX, &config->super); ++ &config->super, init_attr); + +- self->tx.cq_available = tx_cq_len - 1; ++ self->tx.cq_available = init_attr->tx_cq_len - 1; + self->rx.srq.available = 0; + self->rx.srq.quota = 0; + self->config.tx_qp_len = config->super.tx.queue_len; +@@ -702,7 +778,7 @@ UCS_CLASS_INIT_FUNC(uct_rc_iface_t, uct_rc_iface_ops_t *ops, uct_md_h md, + self->config.tx_min_inline = config->super.tx.min_inline; + self->config.tx_moderation = ucs_min(config->super.tx.cq_moderation, + config->super.tx.queue_len / 4); +- self->config.tx_ops_count = tx_cq_len; ++ self->config.tx_ops_count = init_attr->tx_cq_len; + self->config.rx_inline = config->super.rx.inl; + self->config.min_rnr_timer = uct_ib_to_fabric_time(config->tx.rnr_timeout); + self->config.timeout = uct_ib_to_fabric_time(config->tx.timeout); +@@ -712,6 +788,9 @@ UCS_CLASS_INIT_FUNC(uct_rc_iface_t, uct_rc_iface_ops_t *ops, uct_md_h md, + UCR_RC_QP_MAX_RETRY_COUNT); + self->config.max_rd_atomic = config->max_rd_atomic; + self->config.ooo_rw = config->ooo_rw; ++#if ENABLE_ASSERT ++ self->config.tx_cq_len = init_attr->tx_cq_len; ++#endif + + uct_rc_iface_set_path_mtu(self, config); + memset(self->eps, 0, sizeof(self->eps)); +@@ -802,7 +881,7 @@ UCS_CLASS_INIT_FUNC(uct_rc_iface_t, uct_rc_iface_ops_t *ops, uct_md_h md, + /* Create mempool for pending requests for FC grant */ + status = ucs_mpool_init(&self->tx.fc_mp, + 0, +- fc_req_size, ++ init_attr->fc_req_size, + 0, + 1, + 128, +@@ -875,27 +954,9 @@ ucs_status_t uct_rc_iface_qp_create(uct_rc_iface_t *iface, int qp_type, + struct ibv_qp **qp_p, struct ibv_qp_cap *cap, + unsigned max_send_wr) + { +- uct_ib_device_t *dev UCS_V_UNUSED = uct_ib_iface_device(&iface->super); +- struct ibv_exp_qp_init_attr qp_init_attr; +- const char *qp_type_str; +- struct ibv_qp *qp; +- int inline_recv = 0; ++ uct_ib_qp_attr_t qp_init_attr = {}; ++ static ucs_status_t status; + +- /* Check QP type */ +- if (qp_type == IBV_QPT_RC) { +- qp_type_str = "rc"; +-#if HAVE_DECL_IBV_EXP_QPT_DC_INI +- } else if (qp_type == IBV_EXP_QPT_DC_INI) { +- qp_type_str = "dci"; +-#endif +- } else { +- ucs_bug("invalid qp type: %d", qp_type); +- } +- +- memset(&qp_init_attr, 0, sizeof(qp_init_attr)); +- qp_init_attr.qp_context = NULL; +- qp_init_attr.send_cq = iface->super.send_cq; +- qp_init_attr.recv_cq = iface->super.recv_cq; + if (qp_type == IBV_QPT_RC) { + qp_init_attr.srq = iface->rx.srq.srq; + } +@@ -906,50 +967,14 @@ ucs_status_t uct_rc_iface_qp_create(uct_rc_iface_t *iface, int qp_type, + qp_init_attr.cap.max_inline_data = iface->config.tx_min_inline; + qp_init_attr.qp_type = qp_type; + qp_init_attr.sq_sig_all = !iface->config.tx_moderation; ++ qp_init_attr.max_inl_recv = iface->config.rx_inline; + +-#if HAVE_DECL_IBV_EXP_CREATE_QP +- qp_init_attr.comp_mask = IBV_EXP_QP_INIT_ATTR_PD; +- qp_init_attr.pd = uct_ib_iface_md(&iface->super)->pd; +- +-# if HAVE_IB_EXT_ATOMICS +- qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG; +- qp_init_attr.max_atomic_arg = UCT_RC_MAX_ATOMIC_SIZE; +-# endif +- +-# if HAVE_DECL_IBV_EXP_ATOMIC_HCA_REPLY_BE +- if (dev->dev_attr.exp_atomic_cap == IBV_EXP_ATOMIC_HCA_REPLY_BE) { +- qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS; +- qp_init_attr.exp_create_flags = IBV_EXP_QP_CREATE_ATOMIC_BE_REPLY; +- } +-# endif +- +-# if HAVE_STRUCT_IBV_EXP_QP_INIT_ATTR_MAX_INL_RECV +- qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; +- qp_init_attr.max_inl_recv = iface->config.rx_inline; +-# endif +- +- qp = ibv_exp_create_qp(dev->ibv_context, &qp_init_attr); +-#else +- qp = ibv_create_qp(uct_ib_iface_md(&iface->super)->pd, &qp_init_attr); +-#endif +- if (qp == NULL) { +- ucs_error("failed to create qp: %m"); +- return UCS_ERR_IO_ERROR; ++ status = iface->super.ops->create_qp(&iface->super, &qp_init_attr, qp_p); ++ if (status == UCS_OK) { ++ *cap = qp_init_attr.cap; + } + +-#if HAVE_STRUCT_IBV_EXP_QP_INIT_ATTR_MAX_INL_RECV +- qp_init_attr.max_inl_recv = qp_init_attr.max_inl_recv / 2; /* Driver bug W/A */ +- inline_recv = qp_init_attr.max_inl_recv; +-#endif +- +- ucs_debug("created %s qp 0x%x tx %d rx %d tx_inline %d rx_inline %d", +- qp_type_str, qp->qp_num, qp_init_attr.cap.max_send_wr, +- qp_init_attr.cap.max_recv_wr, qp_init_attr.cap.max_inline_data, +- inline_recv); +- +- *qp_p = qp; +- *cap = qp_init_attr.cap; +- return UCS_OK; ++ return status; + } + + ucs_status_t uct_rc_iface_qp_init(uct_rc_iface_t *iface, struct ibv_qp *qp) +@@ -1072,7 +1097,7 @@ ucs_status_t uct_rc_iface_common_event_arm(uct_iface_h tl_iface, + } + + if (events & UCT_EVENT_SEND_COMP) { +- status = iface->super.ops->arm_tx_cq(&iface->super); ++ status = iface->super.ops->arm_cq(&iface->super, UCT_IB_DIR_TX, 0); + if (status != UCS_OK) { + return status; + } +@@ -1089,8 +1114,8 @@ ucs_status_t uct_rc_iface_common_event_arm(uct_iface_h tl_iface, + } + + if (arm_rx_solicited || arm_rx_all) { +- status = iface->super.ops->arm_rx_cq(&iface->super, +- arm_rx_solicited && !arm_rx_all); ++ status = iface->super.ops->arm_cq(&iface->super, UCT_IB_DIR_RX, ++ arm_rx_solicited && !arm_rx_all); + if (status != UCS_OK) { + return status; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.h +index 859248f..cd8dbc9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.h +@@ -21,7 +21,6 @@ + #define UCT_RC_QP_TABLE_ORDER 12 + #define UCT_RC_QP_TABLE_SIZE UCS_BIT(UCT_RC_QP_TABLE_ORDER) + #define UCT_RC_QP_TABLE_MEMB_ORDER (UCT_IB_QPN_ORDER - UCT_RC_QP_TABLE_ORDER) +-#define UCT_RC_MAX_ATOMIC_SIZE sizeof(uint64_t) + #define UCR_RC_QP_MAX_RETRY_COUNT 7 + + #define UCT_RC_CHECK_AM_SHORT(_am_id, _length, _max_inline) \ +@@ -55,8 +54,8 @@ + + #define UCT_RC_IFACE_GET_TX_PUT_BCOPY_DESC(_iface, _mp, _desc, _pack_cb, _arg, _length) \ + UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ +- desc->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; \ +- _length = pack_cb(_desc + 1, _arg); \ ++ (_desc)->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; \ ++ _length = _pack_cb(_desc + 1, _arg); \ + UCT_SKIP_ZERO_LENGTH(_length, _desc); + + #define UCT_RC_IFACE_GET_TX_GET_BCOPY_DESC(_iface, _mp, _desc, _unpack_cb, _comp, _arg, _length) \ +@@ -71,11 +70,11 @@ + _desc->unpack_cb = _unpack_cb; + + +-#define UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(_iface, _mp, _desc) \ ++#define UCT_RC_IFACE_GET_TX_ATOMIC_DESC(_iface, _mp, _desc) \ + UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ + _desc->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; + +-#define UCT_RC_IFACE_GET_TX_ATOMIC_DESC(_iface, _mp, _desc, _handler, _result, _comp) \ ++#define UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(_iface, _mp, _desc, _handler, _result, _comp) \ + UCT_CHECK_PARAM(_comp != NULL, "completion must be non-NULL"); \ + UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ + _desc->super.handler = _handler; \ +@@ -162,6 +161,7 @@ struct uct_rc_iface_config { + struct { + int enable; + unsigned list_size; ++ size_t max_bcopy; + } tm; + #endif + +@@ -188,6 +188,19 @@ typedef struct uct_rc_srq { + + #if IBV_EXP_HW_TM + ++enum { ++ UCT_RC_IFACE_STAT_TAG_RX_EXP, ++ UCT_RC_IFACE_STAT_TAG_RX_EAGER_UNEXP, ++ UCT_RC_IFACE_STAT_TAG_RX_RNDV_UNEXP, ++ UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_EXP, ++ UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_UNEXP, ++ UCT_RC_IFACE_STAT_TAG_RX_RNDV_FIN, ++ UCT_RC_IFACE_STAT_TAG_LIST_ADD, ++ UCT_RC_IFACE_STAT_TAG_LIST_DEL, ++ UCT_RC_IFACE_STAT_TAG_LIST_SYNC, ++ UCT_RC_IFACE_STAT_TAG_LAST ++}; ++ + typedef struct uct_rc_iface_tmh_priv_data { + uint8_t length; + uint16_t data; +@@ -215,8 +228,9 @@ struct uct_rc_iface { + uct_ib_iface_t super; + + struct { +- ucs_mpool_t mp; /* pool for send descriptors */ +- ucs_mpool_t fc_mp; /* pool for FC grant pending requests */ ++ ucs_mpool_t mp; /* pool for send descriptors */ ++ ucs_mpool_t fc_mp; /* pool for FC grant pending requests */ ++ ucs_mpool_t flush_mp; /* pool for flush completions */ + /* Credits for completions. + * May be negative in case mlx5 because we take "num_bb" credits per + * post to be able to calculate credits of outstanding ops on failure. +@@ -253,7 +267,7 @@ struct uct_rc_iface { + } rndv_unexp; + uct_rc_iface_release_desc_t eager_desc; + uct_rc_iface_release_desc_t rndv_desc; +- ++ UCS_STATS_NODE_DECLARE(stats); + } tm; + #endif + +@@ -284,6 +298,9 @@ struct uct_rc_iface { + enum ibv_mtu path_mtu; + /* Enable out-of-order RDMA data placement */ + uint8_t ooo_rw; ++#if ENABLE_ASSERT ++ int tx_cq_len; ++#endif + + /* Atomic callbacks */ + uct_rc_send_handler_t atomic64_handler; /* 64bit ib-spec */ +@@ -299,9 +316,9 @@ struct uct_rc_iface { + /* Progress function (either regular or TM aware) */ + ucs_callback_t progress; + }; +-UCS_CLASS_DECLARE(uct_rc_iface_t, uct_rc_iface_ops_t*, uct_md_h, +- uct_worker_h, const uct_iface_params_t*, +- const uct_rc_iface_config_t*, unsigned, unsigned, int) ++UCS_CLASS_DECLARE(uct_rc_iface_t, uct_rc_iface_ops_t*, uct_md_h, uct_worker_h, ++ const uct_iface_params_t*, const uct_rc_iface_config_t*, ++ uct_ib_iface_init_attr_t*); + + + struct uct_rc_iface_send_op { +@@ -340,8 +357,13 @@ typedef struct uct_rc_am_short_hdr { + + #if IBV_EXP_HW_TM + ++# define UCT_RC_IFACE_TM_STAT(_iface, _op) \ ++ UCS_STATS_UPDATE_COUNTER((_iface)->tm.stats, UCT_RC_IFACE_STAT_TAG_##_op, 1) ++ + # define UCT_RC_IFACE_TM_ENABLED(_iface) (_iface)->tm.enabled + ++ ++ + /* TMH can carry 2 bytes of data in its reserved filed */ + # define UCT_RC_IFACE_TMH_PRIV_LEN ucs_field_sizeof(uct_rc_iface_tmh_priv_data_t, \ + data) +@@ -377,22 +399,22 @@ typedef struct uct_rc_am_short_hdr { + # define UCT_RC_IFACE_GET_TX_TM_DESC(_iface, _mp, _desc, _tag, _app_ctx, _hdr) \ + { \ + UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ +- hdr = _desc + 1; \ ++ _hdr = _desc + 1; \ + uct_rc_iface_fill_tmh(_hdr, _tag, _app_ctx, IBV_EXP_TMH_EAGER); \ +- hdr += sizeof(struct ibv_exp_tmh); \ ++ _hdr += sizeof(struct ibv_exp_tmh); \ + } + + # define UCT_RC_IFACE_GET_TM_BCOPY_DESC(_iface, _mp, _desc, _tag, _app_ctx, \ +- _pack_cb, _arg, _length) \ ++ _pack_cb, _arg, _length) \ + { \ + void *hdr; \ + UCT_RC_IFACE_GET_TX_TM_DESC(_iface, _mp, _desc, _tag, _app_ctx, hdr) \ + (_desc)->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; \ +- _length = pack_cb(hdr, arg); \ ++ _length = _pack_cb(hdr, _arg); \ + } + + ucs_status_t uct_rc_iface_handle_rndv(uct_rc_iface_t *iface, +- struct ibv_exp_tmh *tmh, ++ struct ibv_exp_tmh *tmh, uct_tag_t tag, + unsigned byte_len); + + +@@ -462,18 +484,15 @@ uct_rc_iface_ctx_priv(uct_tag_context_t *ctx) + } + + static UCS_F_ALWAYS_INLINE void +-uct_rc_iface_handle_rndv_fin(uct_rc_iface_t *iface, struct ibv_exp_tmh *tmh) ++uct_rc_iface_handle_rndv_fin(uct_rc_iface_t *iface, uint32_t app_ctx) + { + int found; + void *rndv_comp; + +- ucs_assert(tmh->opcode == IBV_EXP_TMH_FIN); +- +- found = ucs_ptr_array_lookup(&iface->tm.rndv_comps, ntohl(tmh->app_ctx), +- rndv_comp); ++ found = ucs_ptr_array_lookup(&iface->tm.rndv_comps, app_ctx, rndv_comp); + ucs_assert_always(found > 0); + uct_invoke_completion((uct_completion_t*)rndv_comp, UCS_OK); +- ucs_ptr_array_remove(&iface->tm.rndv_comps, ntohl(tmh->app_ctx), 0); ++ ucs_ptr_array_remove(&iface->tm.rndv_comps, app_ctx, 0); + } + + #else +@@ -491,7 +510,8 @@ unsigned uct_rc_iface_do_progress(uct_iface_h tl_iface); + ucs_status_t uct_rc_iface_query(uct_rc_iface_t *iface, + uct_iface_attr_t *iface_attr, + size_t put_max_short, size_t max_inline, +- size_t am_max_hdr, size_t am_max_iov); ++ size_t am_max_hdr, size_t am_max_iov, ++ size_t tag_max_iov); + + ucs_status_t uct_rc_iface_get_address(uct_iface_h tl_iface, + uct_iface_addr_t *addr); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs.h +index a13e067..8fd83db 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs.h +@@ -117,35 +117,29 @@ ucs_status_t uct_rc_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *he + size_t iovcnt, unsigned flags, + uct_completion_t *comp); + +-ucs_status_t uct_rc_verbs_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +- +-ucs_status_t uct_rc_verbs_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- +-ucs_status_t uct_rc_verbs_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- + ucs_status_t uct_rc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp); + +-ucs_status_t uct_rc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_rc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp); ++ ++ucs_status_t uct_rc_verbs_ep_atomic64_post(uct_ep_h tl_ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); + +-ucs_status_t uct_rc_verbs_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_rc_verbs_ep_atomic32_post(uct_ep_h tl_ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); + +-ucs_status_t uct_rc_verbs_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_rc_verbs_ep_atomic64_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); + +-ucs_status_t uct_rc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ucs_status_t uct_rc_verbs_ep_atomic32_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ uct_completion_t *comp); + + ucs_status_t uct_rc_verbs_ep_flush(uct_ep_h tl_ep, unsigned flags, + uct_completion_t *comp); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.c +index 7a39ad9..4e32a80 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.c +@@ -142,7 +142,7 @@ ucs_status_t uct_rc_verbs_iface_common_init(uct_rc_verbs_iface_common_t *iface, + /* Configuration */ + iface->config.short_desc_size = ucs_max(sizeof(uct_rc_hdr_t), + config->max_am_hdr); +- iface->config.short_desc_size = ucs_max(UCT_RC_MAX_ATOMIC_SIZE, ++ iface->config.short_desc_size = ucs_max(UCT_IB_MAX_ATOMIC_SIZE, + iface->config.short_desc_size); + + /* Create AM headers and Atomic mempool */ +@@ -189,3 +189,11 @@ ucs_status_t uct_rc_verbs_wc_to_ucs_status(enum ibv_wc_status status) + return UCS_ERR_IO_ERROR; + } + } ++ ++void uct_rc_verbs_common_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max) ++{ ++ uct_rc_ep_packet_dump(iface, type, data, length, valid_length, buffer, max, 1); ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.h +index 7461374..221947c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.h +@@ -17,7 +17,7 @@ + + + #define UCT_RC_VERBS_IFACE_FOREACH_TXWQE(_iface, _i, _wc, _num_wcs) \ +- status = uct_ib_poll_cq((_iface)->super.send_cq, &_num_wcs, _wc); \ ++ status = uct_ib_poll_cq((_iface)->super.cq[UCT_IB_DIR_TX], &_num_wcs, _wc); \ + if (status != UCS_OK) { \ + return 0; \ + } \ +@@ -69,6 +69,10 @@ void uct_rc_verbs_txcnt_init(uct_rc_verbs_txcnt_t *txcnt); + + ucs_status_t uct_rc_verbs_wc_to_ucs_status(enum ibv_wc_status status); + ++void uct_rc_verbs_common_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max); ++ + static inline void + uct_rc_verbs_txqp_posted(uct_rc_txqp_t *txqp, uct_rc_verbs_txcnt_t *txcnt, + uct_rc_iface_t *iface, int signaled) +@@ -175,7 +179,7 @@ uct_rc_verbs_iface_poll_rx_common(uct_rc_iface_t *iface) + unsigned num_wcs = iface->super.config.rx_max_poll; + struct ibv_wc wc[num_wcs]; + +- status = uct_ib_poll_cq(iface->super.recv_cq, &num_wcs, wc); ++ status = uct_ib_poll_cq(iface->super.cq[UCT_IB_DIR_RX], &num_wcs, wc); + if (status != UCS_OK) { + num_wcs = 0; + goto out; +@@ -183,7 +187,7 @@ uct_rc_verbs_iface_poll_rx_common(uct_rc_iface_t *iface) + + UCT_IB_IFACE_VERBS_FOREACH_RXWQE(&iface->super, i, hdr, wc, num_wcs) { + uct_ib_log_recv_completion(&iface->super, IBV_QPT_RC, &wc[i], hdr, +- wc[i].byte_len, uct_rc_ep_am_packet_dump); ++ wc[i].byte_len, uct_rc_verbs_common_packet_dump); + uct_rc_verbs_iface_handle_am(iface, hdr, wc[i].wr_id, wc[i].qp_num, + wc[i].byte_len, wc[i].imm_data, wc[i].slid); + } +@@ -331,6 +335,9 @@ uct_rc_verbs_iface_common_tag_recv(uct_rc_verbs_iface_common_t *iface, + priv->tag = tag; + priv->buffer = iov->buffer; /* Only one iov is supported so far */ + priv->length = uct_iov_total_length(iov, iovcnt); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_ADD); ++ + return UCS_OK; + } + +@@ -367,6 +374,8 @@ uct_rc_verbs_iface_common_tag_recv_cancel(uct_rc_verbs_iface_common_t *iface, + } + } + ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_DEL); ++ + return UCS_OK; + } + +@@ -404,7 +413,7 @@ uct_rc_verbs_iface_wc_error(enum ibv_wc_status status) + { + /* TODO: handle MSG TRUNCATED error */ + ucs_fatal("Receive completion with error on XRQ: %s", +- ibv_wc_status_str(status)); ++ uct_ib_wc_status_str(status)); + } + + static UCS_F_ALWAYS_INLINE void +@@ -429,8 +438,10 @@ uct_rc_verbs_iface_tag_handle_exp(uct_rc_iface_t *iface, struct ibv_exp_wc *wc) + VALGRIND_MAKE_MEM_DEFINED(priv->buffer, wc->byte_len); + if (UCT_RC_VERBS_TM_IS_SW_RNDV(wc->exp_wc_flags, imm_data)) { + ctx->rndv_cb(ctx, priv->tag, priv->buffer, wc->byte_len, UCS_OK); ++ UCT_RC_IFACE_TM_STAT(iface, RX_RNDV_REQ_EXP); + } else { + ctx->completed_cb(ctx, priv->tag, imm_data, wc->byte_len, UCS_OK); ++ UCT_RC_IFACE_TM_STAT(iface, RX_EXP); + } + ++iface->tm.num_tags; + } +@@ -456,6 +467,7 @@ uct_rc_verbs_iface_unexp_consumed(uct_rc_verbs_iface_common_t *iface, + if (ucs_unlikely(!(++rc_iface->tm.unexpected_cnt % IBV_DEVICE_MAX_UNEXP_COUNT))) { + uct_rc_verbs_iface_post_signaled_op(iface, rc_iface, &wr, + IBV_EXP_WR_TAG_SYNC); ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_SYNC); + } + } + +@@ -486,11 +498,15 @@ uct_rc_verbs_iface_tag_handle_unexp(uct_rc_verbs_iface_common_t *iface, + be64toh(tmh->tag), tmh + 1, + wc->byte_len - sizeof(*tmh), + 0ul, 0, NULL); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_REQ_UNEXP); + } else { + status = rc_iface->tm.eager_unexp.cb(rc_iface->tm.eager_unexp.arg, + tmh + 1, wc->byte_len - sizeof(*tmh), + UCT_CB_PARAM_FLAG_DESC, + be64toh(tmh->tag), imm_data); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_EAGER_UNEXP); + } + uct_rc_verbs_iface_unexp_consumed(iface, rc_iface, ib_desc, + &rc_iface->tm.eager_desc, status); +@@ -499,21 +515,25 @@ uct_rc_verbs_iface_tag_handle_unexp(uct_rc_verbs_iface_common_t *iface, + case IBV_EXP_TMH_NO_TAG: + rc_hdr = (uct_rc_hdr_t*)tmh; + uct_ib_log_recv_completion(&rc_iface->super, IBV_QPT_RC, wc, rc_hdr, +- wc->byte_len, uct_rc_ep_am_packet_dump); ++ wc->byte_len, uct_rc_verbs_common_packet_dump); + uct_rc_verbs_iface_handle_am(rc_iface, rc_hdr, wc->wr_id, wc->qp_num, + wc->byte_len, wc->imm_data, wc->slid); + break; + + case IBV_EXP_TMH_RNDV: +- status = uct_rc_iface_handle_rndv(rc_iface, tmh, wc->byte_len); ++ status = uct_rc_iface_handle_rndv(rc_iface, tmh, be64toh(tmh->tag), ++ wc->byte_len); + + uct_rc_verbs_iface_unexp_consumed(iface, rc_iface, ib_desc, + &rc_iface->tm.rndv_desc, status); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_UNEXP); + break; + + case IBV_EXP_TMH_FIN: +- uct_rc_iface_handle_rndv_fin(rc_iface, tmh); ++ uct_rc_iface_handle_rndv_fin(rc_iface, ntohl(tmh->app_ctx)); + ucs_mpool_put_inline(ib_desc); ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_FIN); + break; + + default: +@@ -534,7 +554,7 @@ uct_rc_verbs_iface_poll_rx_tm(uct_rc_verbs_iface_common_t *iface, + uct_rc_iface_ctx_priv_t *priv; + int num_wcs, i; + +- num_wcs = ibv_exp_poll_cq(rc_iface->super.recv_cq, max_wcs, wc, ++ num_wcs = ibv_exp_poll_cq(rc_iface->super.cq[UCT_IB_DIR_RX], max_wcs, wc, + sizeof(wc[0])); + if (num_wcs <= 0) { + if (ucs_unlikely(num_wcs < 0)) { +@@ -684,6 +704,26 @@ uct_rc_verbs_fill_ext_atomic_wr(struct ibv_exp_send_wr *wr, struct ibv_sge *sge, + break; + } + } ++ ++static UCS_F_ALWAYS_INLINE ++ucs_status_t uct_rc_verbs_ep_atomic32_data(uct_atomic_op_t opcode, uint32_t value, ++ int *op, uint32_t *add, uint32_t *swap) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ *op = IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD; ++ *add = value; ++ *swap = 0; ++ return UCS_OK; ++ case UCT_ATOMIC_OP_SWAP: ++ *op = IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP; ++ *add = 0; ++ *swap = value; ++ return UCS_OK; ++ default: ++ return UCS_ERR_UNSUPPORTED; ++ } ++} + #endif + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_ep.c +index 1cc8743..d8abee6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_ep.c +@@ -12,7 +12,7 @@ + + static UCS_F_ALWAYS_INLINE void + uct_rc_verbs_ep_post_send(uct_rc_verbs_iface_t* iface, uct_rc_verbs_ep_t* ep, +- struct ibv_send_wr *wr, int send_flags) ++ struct ibv_send_wr *wr, int send_flags, int max_log_sge) + { + struct ibv_send_wr *bad_wr; + int ret; +@@ -26,8 +26,8 @@ uct_rc_verbs_ep_post_send(uct_rc_verbs_iface_t* iface, uct_rc_verbs_ep_t* ep, + wr->send_flags = send_flags; + wr->wr_id = uct_rc_txqp_unsignaled(&ep->super.txqp); + +- uct_ib_log_post_send(&iface->super.super, ep->super.txqp.qp, wr, +- (wr->opcode == IBV_WR_SEND) ? uct_rc_ep_am_packet_dump : NULL); ++ uct_ib_log_post_send(&iface->super.super, ep->super.txqp.qp, wr, max_log_sge, ++ (wr->opcode == IBV_WR_SEND) ? uct_rc_verbs_common_packet_dump : NULL); + + ret = ibv_post_send(ep->super.txqp.qp, wr, &bad_wr); + if (ret != 0) { +@@ -40,7 +40,7 @@ uct_rc_verbs_ep_post_send(uct_rc_verbs_iface_t* iface, uct_rc_verbs_ep_t* ep, + #if HAVE_DECL_IBV_EXP_POST_SEND && (HAVE_DECL_IBV_EXP_WR_NOP || HAVE_IB_EXT_ATOMICS) + static UCS_F_ALWAYS_INLINE void + uct_rc_verbs_exp_post_send(uct_rc_verbs_ep_t *ep, struct ibv_exp_send_wr *wr, +- uint64_t signal) ++ uint64_t signal, int max_log_sge) + { + uct_rc_verbs_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, + uct_rc_verbs_iface_t); +@@ -54,9 +54,9 @@ uct_rc_verbs_exp_post_send(uct_rc_verbs_ep_t *ep, struct ibv_exp_send_wr *wr, + wr->exp_send_flags = signal; + wr->wr_id = uct_rc_txqp_unsignaled(&ep->super.txqp); + +- uct_ib_log_exp_post_send(&iface->super.super, ep->super.txqp.qp, wr, ++ uct_ib_log_exp_post_send(&iface->super.super, ep->super.txqp.qp, wr, max_log_sge, + (wr->exp_opcode == IBV_EXP_WR_SEND) ? +- uct_rc_ep_am_packet_dump : NULL); ++ uct_rc_verbs_common_packet_dump : NULL); + + ret = ibv_exp_post_send(ep->super.txqp.qp, wr, &bad_wr); + if (ret != 0) { +@@ -74,12 +74,13 @@ uct_rc_verbs_exp_post_send(uct_rc_verbs_ep_t *ep, struct ibv_exp_send_wr *wr, + */ + static UCS_F_ALWAYS_INLINE void + uct_rc_verbs_ep_post_send_desc(uct_rc_verbs_ep_t* ep, struct ibv_send_wr *wr, +- uct_rc_iface_send_desc_t *desc, int send_flags) ++ uct_rc_iface_send_desc_t *desc, int send_flags, ++ int max_log_sge) + { + uct_rc_verbs_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, + uct_rc_verbs_iface_t); + UCT_RC_VERBS_FILL_DESC_WR(wr, desc); +- uct_rc_verbs_ep_post_send(iface, ep, wr, send_flags); ++ uct_rc_verbs_ep_post_send(iface, ep, wr, send_flags, max_log_sge); + uct_rc_txqp_add_send_op_sn(&ep->super.txqp, &desc->super, ep->txcnt.pi); + } + +@@ -100,7 +101,7 @@ uct_rc_verbs_ep_rdma_zcopy(uct_rc_verbs_ep_t *ep, const uct_iov_t *iov, + UCT_RC_VERBS_FILL_RDMA_WR_IOV(wr, wr.opcode, opcode, sge, sge_cnt, remote_addr, rkey); + wr.next = NULL; + +- uct_rc_verbs_ep_post_send(iface, ep, &wr, IBV_SEND_SIGNALED); ++ uct_rc_verbs_ep_post_send(iface, ep, &wr, IBV_SEND_SIGNALED, INT_MAX); + uct_rc_txqp_add_send_comp(&iface->super, &ep->super.txqp, comp, ep->txcnt.pi); + return UCS_INPROGRESS; + } +@@ -118,7 +119,7 @@ uct_rc_verbs_ep_atomic_post(uct_rc_verbs_ep_t *ep, int opcode, uint64_t compare_ + UCT_RC_VERBS_FILL_ATOMIC_WR(wr, wr.opcode, sge, opcode, compare_add, swap, + remote_addr, ib_rkey); + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, force_sig); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, force_sig, INT_MAX); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +@@ -131,9 +132,9 @@ uct_rc_verbs_ep_atomic(uct_rc_verbs_ep_t *ep, int opcode, void *result, + uct_rc_iface_send_desc_t *desc; + + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc, +- iface->super.config.atomic64_handler, +- result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super, &iface->verbs_common.short_desc_mp, ++ desc, iface->super.config.atomic64_handler, ++ result, comp); + uct_rc_verbs_ep_atomic_post(ep, opcode, compare_add, swap, remote_addr, + rkey, desc, IBV_SEND_SIGNALED); + return UCS_INPROGRESS; +@@ -153,7 +154,7 @@ uct_rc_verbs_ep_ext_atomic_post(uct_rc_verbs_ep_t *ep, int opcode, uint32_t leng + compare_add, swap, remote_addr, rkey, ep->super.atomic_mr_offset); + UCT_RC_VERBS_FILL_DESC_WR(&wr, desc); + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_rc_verbs_exp_post_send(ep, &wr, force_sig|IBV_EXP_SEND_EXT_ATOMIC_INLINE); ++ uct_rc_verbs_exp_post_send(ep, &wr, force_sig|IBV_EXP_SEND_EXT_ATOMIC_INLINE, INT_MAX); + uct_rc_txqp_add_send_op_sn(&ep->super.txqp, &desc->super, ep->txcnt.pi); + } + +@@ -170,8 +171,8 @@ uct_rc_verbs_ep_ext_atomic(uct_rc_verbs_ep_t *ep, int opcode, void *result, + uct_rc_iface_send_desc_t *desc; + + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc, +- handler, result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super, &iface->verbs_common.short_desc_mp, ++ desc, handler, result, comp); + uct_rc_verbs_ep_ext_atomic_post(ep, opcode, length, compare_mask, compare_add, + swap, remote_addr, rkey, desc, + IBV_EXP_SEND_SIGNALED); +@@ -192,7 +193,7 @@ ucs_status_t uct_rc_verbs_ep_put_short(uct_ep_h tl_ep, const void *buffer, + UCT_RC_VERBS_FILL_INL_PUT_WR(iface, remote_addr, rkey, buffer, length); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); + uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_rwrite_wr, +- IBV_SEND_INLINE | IBV_SEND_SIGNALED); ++ IBV_SEND_INLINE | IBV_SEND_SIGNALED, INT_MAX); + return UCS_OK; + } + +@@ -212,7 +213,7 @@ ssize_t uct_rc_verbs_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + UCT_RC_VERBS_FILL_RDMA_WR(wr, wr.opcode, IBV_WR_RDMA_WRITE, sge, + length, remote_addr, rkey); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, BCOPY, length); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SIGNALED); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SIGNALED, INT_MAX); + return length; + } + +@@ -254,7 +255,7 @@ ucs_status_t uct_rc_verbs_ep_get_bcopy(uct_ep_h tl_ep, + rkey); + + UCT_TL_EP_STAT_OP(&ep->super.super, GET, BCOPY, length); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SIGNALED); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SIGNALED, INT_MAX); + return UCS_INPROGRESS; + } + +@@ -290,7 +291,7 @@ ucs_status_t uct_rc_verbs_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + uct_rc_verbs_iface_fill_inl_am_sge(verbs_common, id, hdr, buffer, length); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); + uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ IBV_SEND_INLINE | IBV_SEND_SOLICITED, INT_MAX); + UCT_RC_UPDATE_FC(&iface->super, &ep->super, id); + + return UCS_OK; +@@ -316,7 +317,7 @@ ssize_t uct_rc_verbs_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + UCT_RC_VERBS_FILL_AM_BCOPY_WR(wr, sge, length + sizeof(uct_rc_hdr_t), + wr.opcode); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SOLICITED); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SOLICITED, INT_MAX); + UCT_RC_UPDATE_FC(&iface->super, &ep->super, id); + + return length; +@@ -353,76 +354,52 @@ ucs_status_t uct_rc_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *he + UCT_TL_EP_STAT_OP(&ep->super.super, AM, ZCOPY, + (header_length + uct_iov_total_length(iov, iovcnt))); + +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, send_flags | IBV_SEND_SOLICITED); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, send_flags | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super)); + UCT_RC_UPDATE_FC(&iface->super, &ep->super, id); + + return UCS_INPROGRESS; + } + +-ucs_status_t uct_rc_verbs_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_rc_verbs_ep_atomic64_post(uct_ep_h tl_ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { + uct_rc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_verbs_iface_t); +- uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); ++ uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); + uct_rc_iface_send_desc_t *desc; + ++ if (opcode != UCT_ATOMIC_OP_ADD) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ + /* TODO don't allocate descriptor - have dummy buffer */ + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc); ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc); + + uct_rc_verbs_ep_atomic_post(ep, +- IBV_WR_ATOMIC_FETCH_AND_ADD, add, 0, ++ IBV_WR_ATOMIC_FETCH_AND_ADD, value, 0, + remote_addr, rkey, desc, + IBV_SEND_SIGNALED); + return UCS_OK; + } + +-ucs_status_t uct_rc_verbs_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_rc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_WR_ATOMIC_FETCH_AND_ADD, result, add, 0, +- remote_addr, rkey, comp); +-} +- +-ucs_status_t uct_rc_verbs_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +-#if HAVE_IB_EXT_ATOMICS +- return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, +- result, sizeof(uint64_t), 0, 0, swap, remote_addr, +- rkey, comp); +-#else +- return UCS_ERR_UNSUPPORTED; +-#endif +-} +- +-ucs_status_t uct_rc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_rc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_WR_ATOMIC_CMP_AND_SWP, result, compare, swap, +- remote_addr, rkey, comp); +-} +- +-ucs_status_t uct_rc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_rc_verbs_ep_atomic32_post(uct_ep_h tl_ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { + #if HAVE_IB_EXT_ATOMICS + uct_rc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_verbs_iface_t); +- uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); ++ uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); + uct_rc_iface_send_desc_t *desc; + ++ if (opcode != UCT_ATOMIC_OP_ADD) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc); ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc); + +- /* TODO don't allocate descriptor - have dummy buffer */ + uct_rc_verbs_ep_ext_atomic_post(ep, IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD, +- sizeof(uint32_t), 0, add, 0, remote_addr, ++ sizeof(uint32_t), 0, value, 0, remote_addr, + rkey, desc, IBV_EXP_SEND_SIGNALED); + return UCS_OK; + #else +@@ -430,34 +407,63 @@ ucs_status_t uct_rc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, + #endif + } + +-ucs_status_t uct_rc_verbs_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_verbs_ep_atomic64_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +-#if HAVE_IB_EXT_ATOMICS +- return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD, +- result, sizeof(uint32_t), 0, add, 0, ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_rc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), ++ IBV_WR_ATOMIC_FETCH_AND_ADD, result, value, 0, + remote_addr, rkey, comp); +-#else +- return UCS_ERR_UNSUPPORTED; ++#if HAVE_IB_EXT_ATOMICS ++ case UCT_ATOMIC_OP_SWAP: ++ return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), ++ IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, ++ result, sizeof(uint64_t), 0, 0, value, remote_addr, ++ rkey, comp); + #endif ++ default: ++ break; ++ } ++ ++ return UCS_ERR_UNSUPPORTED; + } + +-ucs_status_t uct_rc_verbs_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_verbs_ep_atomic32_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { + #if HAVE_IB_EXT_ATOMICS +- return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, +- result, sizeof(uint32_t), 0, 0, swap, +- remote_addr, rkey, comp); ++ int op; ++ uint32_t add; ++ uint32_t swap; ++ ucs_status_t status; ++ ++ status = uct_rc_verbs_ep_atomic32_data(opcode, value, &op, &add, &swap); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), op, ++ result, sizeof(uint32_t), 0, add, swap, ++ remote_addr, rkey, comp); + #else + return UCS_ERR_UNSUPPORTED; + #endif + } + ++ucs_status_t uct_rc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp) ++{ ++ return uct_rc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), ++ IBV_WR_ATOMIC_CMP_AND_SWP, result, compare, swap, ++ remote_addr, rkey, comp); ++} ++ + ucs_status_t uct_rc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp) +@@ -485,7 +491,7 @@ static ucs_status_t uct_rc_verbs_ep_nop(uct_rc_verbs_ep_t *ep) + wr.exp_send_flags = IBV_EXP_SEND_FENCE; + wr.comp_mask = 0; + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- uct_rc_verbs_exp_post_send(ep, &wr, IBV_EXP_SEND_SIGNALED); ++ uct_rc_verbs_exp_post_send(ep, &wr, IBV_EXP_SEND_SIGNALED, INT_MAX); + return UCS_OK; + #else + return UCS_ERR_UNSUPPORTED; +@@ -515,9 +521,13 @@ ucs_status_t uct_rc_verbs_ep_flush(uct_ep_h tl_ep, unsigned flags, + } + } + +- uct_rc_txqp_add_send_comp(&iface->super, &ep->super.txqp, comp, ep->txcnt.pi); +- UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super.super); +- return UCS_INPROGRESS; ++ status = uct_rc_txqp_add_flush_comp(&iface->super, &ep->super.txqp, comp, ++ ep->txcnt.pi); ++ if (status == UCS_INPROGRESS) { ++ UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super.super); ++ } ++ ++ return status; + } + + ucs_status_t uct_rc_verbs_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, +@@ -547,7 +557,7 @@ ucs_status_t uct_rc_verbs_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + iface->verbs_common.inl_sge[0].addr = (uintptr_t)hdr; + iface->verbs_common.inl_sge[0].length = sizeof(*hdr); + +- uct_rc_verbs_ep_post_send(iface, ep, &fc_wr, IBV_SEND_INLINE); ++ uct_rc_verbs_ep_post_send(iface, ep, &fc_wr, IBV_SEND_INLINE, INT_MAX); + return UCS_OK; + } + +@@ -567,7 +577,10 @@ ucs_status_t uct_rc_verbs_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, + uct_rc_iface_fill_tmh(&tmh, tag, 0, IBV_EXP_TMH_EAGER); + uct_rc_verbs_iface_fill_inl_sge(&iface->verbs_common, &tmh, sizeof(tmh), data, length); + +- uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE); ++ uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ + return UCS_OK; + } + +@@ -591,7 +604,10 @@ ssize_t uct_rc_verbs_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + UCT_RC_IFACE_GET_TM_BCOPY_DESC(iface, &iface->tx.mp, desc, tag, app_ctx, + pack_cb, arg, length); + UCT_RC_VERBS_FILL_SGE(wr, sge, length + sizeof(struct ibv_exp_tmh)); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, 0); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, 0, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, BCOPY, length); ++ + return length; + } + +@@ -609,7 +625,8 @@ ucs_status_t uct_rc_verbs_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + size_t sge_cnt; + uint32_t app_ctx; + +- UCT_CHECK_IOV_SIZE(iovcnt, 1ul, "uct_rc_verbs_ep_tag_eager_zcopy"); ++ UCT_CHECK_IOV_SIZE(iovcnt, uct_ib_iface_get_max_iov(&iface->super.super) - 1, ++ "uct_rc_verbs_ep_tag_eager_zcopy"); + UCT_RC_CHECK_ZCOPY_DATA(sizeof(struct ibv_exp_tmh), + uct_iov_total_length(iov, iovcnt), + iface->super.super.config.seg_size); +@@ -626,7 +643,11 @@ ucs_status_t uct_rc_verbs_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + wr.num_sge = sge_cnt + 1; + wr.sg_list = sge; + +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, send_flags); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, send_flags, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ + return UCS_INPROGRESS; + } + +@@ -657,7 +678,7 @@ ucs_status_ptr_t uct_rc_verbs_ep_tag_rndv_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + iface->super.tm.max_rndv_data, + tmh_len, tag, iov, comp); + +- uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE); ++ uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE, INT_MAX); + return (ucs_status_ptr_t)((uint64_t)rndv_idx); + } + +@@ -688,7 +709,7 @@ ucs_status_t uct_rc_verbs_ep_tag_rndv_request(uct_ep_h tl_ep, uct_tag_t tag, + uct_rc_iface_fill_tmh(&tmh, tag, app_ctx, IBV_EXP_TMH_EAGER); + uct_rc_verbs_iface_fill_inl_sge(&iface->verbs_common, &tmh, sizeof(tmh), + header, header_length); +- uct_rc_verbs_ep_post_send(iface, ep, &wr, IBV_SEND_INLINE); ++ uct_rc_verbs_ep_post_send(iface, ep, &wr, IBV_SEND_INLINE, INT_MAX); + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_iface.c +index 98a395d..7182b63 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_iface.c +@@ -202,6 +202,7 @@ static ucs_status_t uct_rc_verbs_iface_query(uct_iface_h tl_iface, uct_iface_att + verbs_common->config.max_inline, + verbs_common->config.max_inline, + verbs_common->config.short_desc_size, ++ uct_ib_iface_get_max_iov(&iface->super.super) - 1, + uct_ib_iface_get_max_iov(&iface->super.super) - 1); + if (status != UCS_OK) { + return status; +@@ -221,12 +222,16 @@ static UCS_CLASS_INIT_FUNC(uct_rc_verbs_iface_t, uct_md_h md, uct_worker_h worke + uct_rc_verbs_iface_config_t *config = + ucs_derived_of(tl_config, uct_rc_verbs_iface_config_t); + ucs_status_t status; ++ uct_ib_iface_init_attr_t init_attr = {}; + struct ibv_qp_cap cap; + struct ibv_qp *qp; + ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ init_attr.tm_cap_bit = IBV_EXP_TM_CAP_RC; ++ init_attr.fc_req_size = sizeof(uct_rc_fc_request_t); ++ + UCS_CLASS_CALL_SUPER_INIT(uct_rc_iface_t, &uct_rc_verbs_iface_ops, md, +- worker, params, &config->super, 0, +- sizeof(uct_rc_fc_request_t), IBV_EXP_TM_CAP_RC); ++ worker, params, &config->super, &init_attr); + + self->config.tx_max_wr = ucs_min(config->verbs_common.tx_max_wr, + self->super.config.tx_qp_len); +@@ -301,14 +306,12 @@ static uct_rc_iface_ops_t uct_rc_verbs_iface_ops = { + .ep_put_zcopy = uct_rc_verbs_ep_put_zcopy, + .ep_get_bcopy = uct_rc_verbs_ep_get_bcopy, + .ep_get_zcopy = uct_rc_verbs_ep_get_zcopy, +- .ep_atomic_add64 = uct_rc_verbs_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_rc_verbs_ep_atomic_fadd64, +- .ep_atomic_swap64 = uct_rc_verbs_ep_atomic_swap64, + .ep_atomic_cswap64 = uct_rc_verbs_ep_atomic_cswap64, +- .ep_atomic_add32 = uct_rc_verbs_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_rc_verbs_ep_atomic_fadd32, +- .ep_atomic_swap32 = uct_rc_verbs_ep_atomic_swap32, ++ .ep_atomic64_post = uct_rc_verbs_ep_atomic64_post, ++ .ep_atomic64_fetch = uct_rc_verbs_ep_atomic64_fetch, + .ep_atomic_cswap32 = uct_rc_verbs_ep_atomic_cswap32, ++ .ep_atomic32_post = uct_rc_verbs_ep_atomic32_post, ++ .ep_atomic32_fetch = uct_rc_verbs_ep_atomic32_fetch, + .ep_pending_add = uct_rc_ep_pending_add, + .ep_pending_purge = uct_rc_ep_pending_purge, + .ep_flush = uct_rc_verbs_ep_flush, +@@ -340,10 +343,11 @@ static uct_rc_iface_ops_t uct_rc_verbs_iface_ops = { + .iface_get_device_address = uct_ib_iface_get_device_address, + .iface_is_reachable = uct_rc_iface_is_reachable, + }, +- .arm_tx_cq = uct_ib_iface_arm_tx_cq, +- .arm_rx_cq = uct_ib_iface_arm_rx_cq, ++ .arm_cq = uct_ib_iface_arm_cq, ++ .event_cq = (void*)ucs_empty_function, + .handle_failure = uct_rc_verbs_handle_failure, +- .set_ep_failed = uct_rc_verbs_ep_set_failed ++ .set_ep_failed = uct_rc_verbs_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .fc_ctrl = uct_rc_verbs_ep_fc_ctrl, + .fc_handler = uct_rc_iface_fc_handler +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_def.h +index c1cddcc..fe4a245 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_def.h +@@ -25,6 +25,7 @@ typedef struct uct_rdmacm_ep uct_rdmacm_ep_t; + + typedef struct uct_rdmacm_priv_data_hdr { + uint8_t length; /* length of the private data */ ++ int8_t status; + } uct_rdmacm_priv_data_hdr_t; + + typedef struct uct_rdmacm_ctx { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.c +index 63331cf..5679a13 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.c +@@ -5,6 +5,16 @@ + + #include "rdmacm_ep.h" + ++ ++#define UCT_RDMACM_CB_FLAGS_CHECK(_flags) \ ++ do { \ ++ UCT_CB_FLAGS_CHECK(_flags); \ ++ if (!((_flags) & UCT_CB_FLAG_ASYNC)) { \ ++ return UCS_ERR_UNSUPPORTED; \ ++ } \ ++ } while (0) ++ ++ + ucs_status_t uct_rdmacm_ep_resolve_addr(uct_rdmacm_ep_t *ep) + { + uct_rdmacm_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_rdmacm_iface_t); +@@ -74,11 +84,11 @@ static inline void uct_rdmacm_ep_add_to_pending(uct_rdmacm_iface_t *iface, uct_r + + static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + const ucs_sock_addr_t *sockaddr, +- const void *priv_data, size_t length) ++ uct_sockaddr_priv_pack_callback_t pack_cb, ++ void *arg, uint32_t cb_flags) + { + uct_rdmacm_iface_t *iface = ucs_derived_of(tl_iface, uct_rdmacm_iface_t); + char ip_port_str[UCS_SOCKADDR_STRING_LEN]; +- uct_rdmacm_priv_data_hdr_t hdr; + ucs_status_t status; + + UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &iface->super); +@@ -88,18 +98,16 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + return UCS_ERR_UNSUPPORTED; + } + ++ UCT_RDMACM_CB_FLAGS_CHECK(cb_flags); ++ + /* Initialize these fields before calling rdma_resolve_addr to avoid a race + * where they are used before being initialized (from the async thread + * - after an RDMA_CM_EVENT_ROUTE_RESOLVED event) */ +- hdr.length = length; +- self->priv_data = ucs_malloc(sizeof(hdr) + length, "client private data"); +- if (self->priv_data == NULL) { +- status = UCS_ERR_NO_MEMORY; +- goto err; +- } +- +- memcpy(self->priv_data, &hdr, sizeof(hdr)); +- memcpy(self->priv_data + sizeof(hdr), priv_data, length); ++ self->pack_cb = pack_cb; ++ self->pack_cb_arg = arg; ++ self->pack_cb_flags = cb_flags; ++ pthread_mutex_init(&self->ops_mutex, NULL); ++ ucs_queue_head_init(&self->ops); + + /* Save the remote address */ + if (sockaddr->addr->sa_family == AF_INET) { +@@ -109,7 +117,7 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + } else { + ucs_error("rdmacm ep: unknown remote sa_family=%d", sockaddr->addr->sa_family); + status = UCS_ERR_IO_ERROR; +- goto err_free_priv_data; ++ goto err; + } + + self->slow_prog_id = UCS_CALLBACKQ_ID_NULL; +@@ -118,7 +126,7 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + if (status == UCS_ERR_NO_RESOURCE) { + goto add_to_pending; + } else if (status != UCS_OK) { +- goto err_free_priv_data; ++ goto err; + } + + self->is_on_pending = 0; +@@ -130,7 +138,7 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + * All endpoints share the interface's event_channel. */ + status = uct_rdmacm_ep_resolve_addr(self); + if (status != UCS_OK) { +- goto err_free_priv_data; ++ goto err; + } + + goto out; +@@ -145,11 +153,12 @@ out: + iface, iface->event_ch, iface->cm_id, + ucs_sockaddr_str((struct sockaddr *)sockaddr->addr, + ip_port_str, UCS_SOCKADDR_STRING_LEN)); ++ self->status = UCS_INPROGRESS; + return UCS_OK; + +-err_free_priv_data: +- ucs_free(self->priv_data); + err: ++ pthread_mutex_destroy(&self->ops_mutex); ++ + return status; + } + +@@ -171,6 +180,11 @@ static UCS_CLASS_CLEANUP_FUNC(uct_rdmacm_ep_t) + uct_worker_progress_unregister_safe(&iface->super.worker->super, + &self->slow_prog_id); + ++ pthread_mutex_destroy(&self->ops_mutex); ++ if (!ucs_queue_is_empty(&self->ops)) { ++ ucs_warn("destroying endpoint %p with not completed operations", self); ++ } ++ + /* mark this ep as destroyed so that arriving events on it won't try to + * use it */ + if (self->cm_id_ctx != NULL) { +@@ -179,35 +193,63 @@ static UCS_CLASS_CLEANUP_FUNC(uct_rdmacm_ep_t) + ucs_debug("ep destroy: cm_id %p", cm_id_ctx->cm_id); + } + UCS_ASYNC_UNBLOCK(iface->super.worker->async); +- +- ucs_free(self->priv_data); + } + + UCS_CLASS_DEFINE(uct_rdmacm_ep_t, uct_base_ep_t) + UCS_CLASS_DEFINE_NEW_FUNC(uct_rdmacm_ep_t, uct_ep_t, uct_iface_t*, + const ucs_sock_addr_t *, +- const void *, size_t); ++ uct_sockaddr_priv_pack_callback_t, void *, ++ uint32_t); + UCS_CLASS_DEFINE_DELETE_FUNC(uct_rdmacm_ep_t, uct_ep_t); + + static unsigned uct_rdmacm_client_err_handle_progress(void *arg) + { +- uct_rdmacm_ep_t *ep = arg; +- ucs_trace_func("err_handle ep=%p",ep); ++ uct_rdmacm_ep_t *rdmacm_ep = arg; ++ uct_rdmacm_iface_t *iface = ucs_derived_of(rdmacm_ep->super.super.iface, ++ uct_rdmacm_iface_t); + +- ep->slow_prog_id = UCS_CALLBACKQ_ID_NULL; +- uct_set_ep_failed(&UCS_CLASS_NAME(uct_rdmacm_ep_t), &ep->super.super, +- ep->super.super.iface, UCS_ERR_IO_ERROR); ++ ucs_trace_func("err_handle ep=%p", rdmacm_ep); ++ UCS_ASYNC_BLOCK(iface->super.worker->async); ++ ++ rdmacm_ep->slow_prog_id = UCS_CALLBACKQ_ID_NULL; ++ uct_set_ep_failed(&UCS_CLASS_NAME(uct_rdmacm_ep_t), &rdmacm_ep->super.super, ++ rdmacm_ep->super.super.iface, rdmacm_ep->status); ++ ++ UCS_ASYNC_UNBLOCK(iface->super.worker->async); + return 0; + } + +-void uct_rdmacm_ep_set_failed(uct_iface_t *iface, uct_ep_h ep) ++void uct_rdmacm_ep_set_failed(uct_iface_t *iface, uct_ep_h ep, ucs_status_t status) + { + uct_rdmacm_iface_t *rdmacm_iface = ucs_derived_of(iface, uct_rdmacm_iface_t); +- uct_rdmacm_ep_t *rdmacm_ep = ucs_derived_of(ep, uct_rdmacm_ep_t); ++ uct_rdmacm_ep_t *rdmacm_ep = ucs_derived_of(ep, uct_rdmacm_ep_t); ++ ++ if (rdmacm_iface->super.err_handler_flags & UCT_CB_FLAG_ASYNC) { ++ uct_set_ep_failed(&UCS_CLASS_NAME(uct_rdmacm_ep_t), &rdmacm_ep->super.super, ++ &rdmacm_iface->super.super, status); ++ } else { ++ /* invoke the error handling flow from the main thread */ ++ rdmacm_ep->status = status; ++ uct_worker_progress_register_safe(&rdmacm_iface->super.worker->super, ++ uct_rdmacm_client_err_handle_progress, ++ rdmacm_ep, UCS_CALLBACKQ_FLAG_ONESHOT, ++ &rdmacm_ep->slow_prog_id); ++ } ++} + +- /* invoke the error handling flow from the main thread */ +- uct_worker_progress_register_safe(&rdmacm_iface->super.worker->super, +- uct_rdmacm_client_err_handle_progress, +- rdmacm_ep, UCS_CALLBACKQ_FLAG_ONESHOT, +- &rdmacm_ep->slow_prog_id); ++/** ++ * Caller must lock ep->ops_mutex ++ */ ++void uct_rdmacm_ep_invoke_completions(uct_rdmacm_ep_t *ep, ucs_status_t status) ++{ ++ uct_rdmacm_ep_op_t *op; ++ ++ ucs_assert(pthread_mutex_trylock(&ep->ops_mutex) == EBUSY); ++ ++ ucs_queue_for_each_extract(op, &ep->ops, queue_elem, 1) { ++ pthread_mutex_unlock(&ep->ops_mutex); ++ uct_invoke_completion(op->user_comp, status); ++ ucs_free(op); ++ pthread_mutex_lock(&ep->ops_mutex); ++ } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.h +index 436670d..232f00d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.h +@@ -8,21 +8,40 @@ + + #include "rdmacm_iface.h" + ++ ++typedef struct uct_rdmacm_ep_op uct_rdmacm_ep_op_t; ++ ++struct uct_rdmacm_ep_op { ++ ucs_queue_elem_t queue_elem; ++ uct_completion_t *user_comp; ++}; ++ ++ + struct uct_rdmacm_ep { + uct_base_ep_t super; +- void *priv_data; +- ucs_list_link_t list_elem; /* for the pending_eps_list*/ +- struct sockaddr_storage remote_addr; ++ uct_sockaddr_priv_pack_callback_t pack_cb; ++ void *pack_cb_arg; ++ uint32_t pack_cb_flags; + int is_on_pending; ++ ++ pthread_mutex_t ops_mutex; /* guards ops and status */ ++ ucs_queue_head_t ops; ++ ucs_status_t status; /* client EP status */ ++ ++ ucs_list_link_t list_elem; /* for the pending_eps_list */ ++ struct sockaddr_storage remote_addr; + uct_worker_cb_id_t slow_prog_id; + uct_rdmacm_ctx_t *cm_id_ctx; + }; + + UCS_CLASS_DECLARE_NEW_FUNC(uct_rdmacm_ep_t, uct_ep_t, uct_iface_t*, + const ucs_sock_addr_t *, +- const void *, size_t); ++ uct_sockaddr_priv_pack_callback_t, void *, ++ uint32_t); + UCS_CLASS_DECLARE_DELETE_FUNC(uct_rdmacm_ep_t, uct_ep_t); + +-void uct_rdmacm_ep_set_failed(uct_iface_t *iface, uct_ep_h ep); ++void uct_rdmacm_ep_set_failed(uct_iface_t *iface, uct_ep_h ep, ucs_status_t status); ++ ++void uct_rdmacm_ep_invoke_completions(uct_rdmacm_ep_t *ep, ucs_status_t status); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_iface.c +index 5e7337b..accf09a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_iface.c +@@ -8,6 +8,12 @@ + #include + #include + ++ ++enum uct_rdmacm_process_event_flags { ++ UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG = UCS_BIT(0), ++ UCT_RDMACM_PROCESS_EVENT_ACK_EVENT_FLAG = UCS_BIT(1) ++}; ++ + static ucs_config_field_t uct_rdmacm_iface_config_table[] = { + {"BACKLOG", "1024", + "Maximum number of pending connections for an rdma_cm_id.", +@@ -56,12 +62,87 @@ static ucs_status_t uct_rdmacm_iface_get_address(uct_iface_h tl_iface, uct_iface + return UCS_OK; + } + ++static ucs_status_t uct_rdmacm_accept(struct rdma_cm_id *id) ++{ ++ /* The server will not send any reply data back to the client */ ++ struct rdma_conn_param conn_param = {0}; ++ ++ /* Accepting the connection will generate the RDMA_CM_EVENT_ESTABLISHED ++ * event on the client side. */ ++ if (rdma_accept(id, &conn_param)) { ++ ucs_error("rdma_accept(to id=%p) failed: %m", id); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_rdmacm_iface_accept(uct_iface_h tl_iface, ++ uct_conn_request_h conn_request) ++{ ++ struct rdma_cm_event *event = conn_request; ++ ucs_status_t status; ++ ++ ucs_trace("accepting event %p with id %p", event, event->id); ++ status = uct_rdmacm_accept(event->id); ++ rdma_destroy_id(event->id); ++ rdma_ack_cm_event(event); ++ ++ return status; ++} ++ ++static ucs_status_t uct_rdmacm_iface_reject(uct_iface_h tl_iface, ++ uct_conn_request_h conn_request) ++{ ++ struct rdma_cm_event *event = conn_request; ++ ucs_status_t status = UCS_OK; ++ uct_rdmacm_priv_data_hdr_t hdr = { ++ .length = 0, ++ .status = UCS_ERR_REJECTED ++ }; ++ ++ ucs_trace("rejecting event %p with id %p", event, event->id); ++ if (rdma_reject(event->id, &hdr, sizeof(hdr))) { ++ ucs_warn("rdma_reject(id=%p) failed: %m", event->id); ++ status = UCS_ERR_IO_ERROR; ++ } ++ ++ rdma_destroy_id(event->id); ++ rdma_ack_cm_event(event); ++ return status; ++} ++ ++static ucs_status_t uct_rdmacm_ep_flush(uct_ep_h tl_ep, unsigned flags, ++ uct_completion_t *comp) ++{ ++ uct_rdmacm_ep_t *ep = ucs_derived_of(tl_ep, uct_rdmacm_ep_t); ++ ucs_status_t status; ++ uct_rdmacm_ep_op_t *op; ++ ++ pthread_mutex_lock(&ep->ops_mutex); ++ status = ep->status; ++ if ((status == UCS_INPROGRESS) && (comp != NULL)) { ++ op = ucs_malloc(sizeof(*op), "uct_rdmacm_ep_flush op"); ++ if (op != NULL) { ++ op->user_comp = comp; ++ ucs_queue_push(&ep->ops, &op->queue_elem); ++ } else { ++ status = UCS_ERR_NO_MEMORY; ++ } ++ } ++ pthread_mutex_unlock(&ep->ops_mutex); ++ ++ return status; ++} ++ + static uct_iface_ops_t uct_rdmacm_iface_ops = { + .ep_create_sockaddr = UCS_CLASS_NEW_FUNC_NAME(uct_rdmacm_ep_t), + .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_rdmacm_ep_t), +- .ep_flush = uct_base_ep_flush, ++ .ep_flush = uct_rdmacm_ep_flush, + .ep_fence = uct_base_ep_fence, + .ep_pending_purge = ucs_empty_function, ++ .iface_accept = uct_rdmacm_iface_accept, ++ .iface_reject = uct_rdmacm_iface_reject, + .iface_progress_enable = (void*)ucs_empty_function_return_success, + .iface_progress_disable = (void*)ucs_empty_function_return_success, + .iface_progress = ucs_empty_function_return_zero, +@@ -110,18 +191,22 @@ void uct_rdmacm_iface_client_start_next_ep(uct_rdmacm_iface_t *iface) + break; + } + +- uct_rdmacm_ep_set_failed(&iface->super.super, &ep->super.super); ++ uct_rdmacm_ep_set_failed(&iface->super.super, &ep->super.super, status); + } + + UCS_ASYNC_UNBLOCK(iface->super.worker->async); + } + + static void uct_rdmacm_client_handle_failure(uct_rdmacm_iface_t *iface, +- uct_rdmacm_ep_t *ep) ++ uct_rdmacm_ep_t *ep, ++ ucs_status_t status) + { + ucs_assert(!iface->is_server); + if (ep != NULL) { +- uct_rdmacm_ep_set_failed(&iface->super.super, &ep->super.super); ++ pthread_mutex_lock(&ep->ops_mutex); ++ uct_rdmacm_ep_set_failed(&iface->super.super, &ep->super.super, status); ++ uct_rdmacm_ep_invoke_completions(ep, status); ++ pthread_mutex_unlock(&ep->ops_mutex); + } + } + +@@ -130,40 +215,20 @@ static void uct_rdmacm_iface_process_conn_req(uct_rdmacm_iface_t *iface, + struct sockaddr *remote_addr) + { + uct_rdmacm_priv_data_hdr_t *hdr; +- struct rdma_conn_param conn_param; +- char ip_port_str[UCS_SOCKADDR_STRING_LEN]; +- ucs_status_t status; + + hdr = (uct_rdmacm_priv_data_hdr_t*) event->param.ud.private_data; +- ++ ucs_assert(hdr->status == UCS_OK); + + /* TODO check the iface's cb_flags to determine when to invoke this callback. + * currently only UCT_CB_FLAG_ASYNC is supported so the cb is invoked from here */ +- status = iface->conn_request_cb(iface->conn_request_arg, +- event->param.ud.private_data + +- /* private data */ +- sizeof(uct_rdmacm_priv_data_hdr_t), +- /* length */ +- hdr->length); +- if (status != UCS_OK) { +- rdma_reject(event->id, NULL, 0); +- return; +- } +- +- /* The server will not send any reply data back to the client */ +- memset(&conn_param, 0, sizeof(conn_param)); +- /* Accepting the connection will generate the RDMA_CM_EVENT_ESTABLISHED +- * event on the client side. */ +- if (rdma_accept(event->id, &conn_param)) { +- ucs_error("rdma_accept(to addr=%s) failed: %m.", +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); +- rdma_reject(event->id, NULL, 0); +- return; +- } +- +- /* Destroy the new rdma_cm_id which was created when receiving the +- * RDMA_CM_EVENT_CONNECT_REQUEST event. (this is not the listening rdma_cm_id)*/ +- rdma_destroy_id(event->id); ++ iface->conn_request_cb(&iface->super.super, iface->conn_request_arg, ++ /* connection request*/ ++ event, ++ /* private data */ ++ UCS_PTR_BYTE_OFFSET(event->param.ud.private_data, ++ sizeof(uct_rdmacm_priv_data_hdr_t)), ++ /* length */ ++ hdr->length); + } + + /** +@@ -173,7 +238,7 @@ static void uct_rdmacm_iface_process_conn_req(uct_rdmacm_iface_t *iface, + static void uct_rdmacm_iface_release_cm_id(uct_rdmacm_iface_t *iface, + uct_rdmacm_ctx_t *cm_id_ctx) + { +- ucs_debug("destroying cm_id %p", cm_id_ctx->cm_id); ++ ucs_trace("destroying cm_id %p", cm_id_ctx->cm_id); + + ucs_list_del(&cm_id_ctx->list); + if (cm_id_ctx->ep != NULL) { +@@ -184,17 +249,28 @@ static void uct_rdmacm_iface_release_cm_id(uct_rdmacm_iface_t *iface, + iface->cm_id_quota++; + } + +-static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma_cm_event *event) ++static void uct_rdmacm_iface_cm_id_to_dev_name(struct rdma_cm_id *cm_id, ++ char *dev_name) ++{ ++ ucs_snprintf_zero(dev_name, UCT_DEVICE_NAME_MAX, "%s:%d", ++ ibv_get_device_name(cm_id->verbs->device), cm_id->port_num); ++} ++ ++static unsigned ++uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, ++ struct rdma_cm_event *event) + { + struct sockaddr *remote_addr = rdma_get_peer_addr(event->id); + uct_rdmacm_md_t *rdmacm_md = (uct_rdmacm_md_t *)iface->super.md; ++ unsigned ret_flags = UCT_RDMACM_PROCESS_EVENT_ACK_EVENT_FLAG; ++ uct_rdmacm_ep_t *ep = NULL; + char ip_port_str[UCS_SOCKADDR_STRING_LEN]; +- uct_rdmacm_priv_data_hdr_t *hdr; ++ char dev_name[UCT_DEVICE_NAME_MAX]; ++ uct_rdmacm_priv_data_hdr_t hdr; + struct rdma_conn_param conn_param; + uct_rdmacm_ctx_t *cm_id_ctx; +- uct_rdmacm_ep_t *ep = NULL; +- int destroy_cm_id = 0; +- ++ ssize_t priv_data_ret; ++ ucs_status_t status; + + if (iface->is_server) { + ucs_assert((iface->cm_id == event->id) || +@@ -205,23 +281,26 @@ static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma + ep = cm_id_ctx->ep; + } + +- ucs_debug("rdmacm event (fd=%d cm_id %p) on %s (ep=%p): %s. Peer: %s.", ++ ucs_trace("rdmacm event (fd=%d cm_id %p) on %s (ep=%p): %s. Peer: %s.", + iface->event_ch->fd, event->id, (iface->is_server ? "server" : "client"), + ep, rdma_event_str(event->event), + ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); + ++ status = UCS_ERR_UNREACHABLE; + /* The following applies for rdma_cm_id of type RDMA_PS_UDP only */ + switch (event->event) { + case RDMA_CM_EVENT_ADDR_RESOLVED: + /* Client - resolve the route to the server */ + if (ep == NULL) { + /* received an event on an non-existing ep - an already destroyed ep */ +- destroy_cm_id = 1; +- } else if (rdma_resolve_route(event->id, UCS_MSEC_PER_SEC * rdmacm_md->addr_resolve_timeout)) { ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ } else if (rdma_resolve_route(event->id, UCS_MSEC_PER_SEC * ++ rdmacm_md->addr_resolve_timeout)) { + ucs_error("rdma_resolve_route(to addr=%s) failed: %m", +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); +- destroy_cm_id = 1; +- uct_rdmacm_client_handle_failure(iface, ep); ++ ucs_sockaddr_str(remote_addr, ip_port_str, ++ UCS_SOCKADDR_STRING_LEN)); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, UCS_ERR_INVALID_ADDR); + } + break; + +@@ -229,20 +308,44 @@ static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma + /* Client - send a connection request to the server */ + if (ep == NULL) { + /* received an event on an non-existing ep - an already destroyed ep */ +- destroy_cm_id = 1; ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; + } else { +- hdr = (uct_rdmacm_priv_data_hdr_t*)ep->priv_data; +- + memset(&conn_param, 0, sizeof(conn_param)); +- conn_param.private_data = ep->priv_data; ++ conn_param.private_data = ucs_alloca(UCT_RDMACM_MAX_CONN_PRIV + ++ sizeof(uct_rdmacm_priv_data_hdr_t)); ++ ++ uct_rdmacm_iface_cm_id_to_dev_name(ep->cm_id_ctx->cm_id, dev_name); ++ /* TODO check the ep's cb_flags to determine when to invoke this callback. ++ * currently only UCT_CB_FLAG_ASYNC is supported so the cb is invoked from here */ ++ priv_data_ret = ep->pack_cb(ep->pack_cb_arg, dev_name, ++ (void*)(conn_param.private_data + ++ sizeof(uct_rdmacm_priv_data_hdr_t))); ++ if (priv_data_ret < 0) { ++ ucs_trace("rdmacm client (iface=%p cm_id=%p fd=%d) failed to fill " ++ "private data. status: %s", ++ iface, event->id, iface->event_ch->fd, ++ ucs_status_string(priv_data_ret)); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, priv_data_ret); ++ break; ++ } ++ ++ hdr.length = (uint8_t)priv_data_ret; ++ hdr.status = UCS_OK; ++ UCS_STATIC_ASSERT(sizeof(hdr) == sizeof(uct_rdmacm_priv_data_hdr_t)); ++ /* The private_data starts with the header of the user's private data ++ * and then the private data itself */ ++ memcpy((void*)conn_param.private_data, &hdr, sizeof(uct_rdmacm_priv_data_hdr_t)); + conn_param.private_data_len = sizeof(uct_rdmacm_priv_data_hdr_t) + +- hdr->length; ++ hdr.length; + + if (rdma_connect(event->id, &conn_param)) { + ucs_error("rdma_connect(to addr=%s) failed: %m", +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); +- destroy_cm_id = 1; +- uct_rdmacm_client_handle_failure(iface, ep); ++ ucs_sockaddr_str(remote_addr, ip_port_str, ++ UCS_SOCKADDR_STRING_LEN)); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, ++ UCS_ERR_SOME_CONNECTS_FAILED); + } + } + break; +@@ -251,39 +354,58 @@ static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma + /* Server - handle a connection request from the client */ + ucs_assert(iface->is_server); + uct_rdmacm_iface_process_conn_req(iface, event, remote_addr); ++ ret_flags &= ~UCT_RDMACM_PROCESS_EVENT_ACK_EVENT_FLAG; + break; + + case RDMA_CM_EVENT_REJECTED: + /* Client - server rejected the connection request */ +- ucs_warn("rdmacm connection request to %s rejected", +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); ++ ucs_warn("rdmacm connection request to %s rejected, id %p", ++ ucs_sockaddr_str(remote_addr, ip_port_str, ++ UCS_SOCKADDR_STRING_LEN), event->id); + +- destroy_cm_id = 1; +- uct_rdmacm_client_handle_failure(iface, ep); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, UCS_ERR_REJECTED); + break; + + case RDMA_CM_EVENT_ESTABLISHED: + /* Client - connection is ready */ +- destroy_cm_id = 1; ++ ucs_assert(!iface->is_server); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ if (ep != NULL) { ++ pthread_mutex_lock(&ep->ops_mutex); ++ ep->status = UCS_OK; ++ uct_rdmacm_ep_invoke_completions(ep, UCS_OK); ++ pthread_mutex_unlock(&ep->ops_mutex); ++ } + break; + + /* client error events */ ++ case RDMA_CM_EVENT_UNREACHABLE: ++ hdr = *(uct_rdmacm_priv_data_hdr_t *)event->param.conn.private_data; ++ if ((event->param.conn.private_data_len > 0) && ++ (hdr.status == UCS_ERR_REJECTED)) { ++ ucs_assert(hdr.length == 0); ++ ucs_assert(event->param.conn.private_data_len >= sizeof(hdr)); ++ ucs_assert(!iface->is_server); ++ status = UCS_ERR_REJECTED; ++ } ++ /* Fall through */ + case RDMA_CM_EVENT_ADDR_ERROR: + case RDMA_CM_EVENT_ROUTE_ERROR: + case RDMA_CM_EVENT_CONNECT_RESPONSE: +- case RDMA_CM_EVENT_UNREACHABLE: +- + /* client and server error events */ + case RDMA_CM_EVENT_CONNECT_ERROR: + case RDMA_CM_EVENT_DISCONNECTED: + /* Server/Client - connection was disconnected */ +- ucs_error("received event %s. status = %d. Peer: %s.", +- rdma_event_str(event->event), event->status, +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); ++ if (status != UCS_ERR_REJECTED) { ++ ucs_error("received event %s. status = %d. Peer: %s.", ++ rdma_event_str(event->event), event->status, ++ ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); ++ } + + if (!iface->is_server) { +- destroy_cm_id = 1; +- uct_rdmacm_client_handle_failure(iface, ep); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, status); + } + break; + +@@ -292,15 +414,16 @@ static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma + break; + } + +- return destroy_cm_id; ++ return ret_flags; + } + + static void uct_rdmacm_iface_event_handler(int fd, void *arg) + { +- uct_rdmacm_iface_t *iface = arg; +- struct rdma_cm_event *event; +- int ret, destroy_cm_id; +- uct_rdmacm_ctx_t *cm_id_ctx = NULL; ++ uct_rdmacm_iface_t *iface = arg; ++ uct_rdmacm_ctx_t *cm_id_ctx = NULL; ++ struct rdma_cm_event *event; ++ unsigned proc_event_flags; ++ int ret; + + for (;;) { + /* Fetch an event */ +@@ -314,17 +437,20 @@ static void uct_rdmacm_iface_event_handler(int fd, void *arg) + return; + } + +- destroy_cm_id = uct_rdmacm_iface_process_event(iface, event); ++ proc_event_flags = uct_rdmacm_iface_process_event(iface, event); + if (!iface->is_server) { + cm_id_ctx = (uct_rdmacm_ctx_t *)event->id->context; + } + +- ret = rdma_ack_cm_event(event); +- if (ret) { +- ucs_warn("rdma_ack_cm_event() failed: %m"); ++ if (proc_event_flags & UCT_RDMACM_PROCESS_EVENT_ACK_EVENT_FLAG) { ++ ret = rdma_ack_cm_event(event); ++ if (ret) { ++ ucs_warn("rdma_ack_cm_event() failed: %m"); ++ } + } + +- if (destroy_cm_id && (cm_id_ctx != NULL)) { ++ if ((proc_event_flags & UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG) && ++ (cm_id_ctx != NULL)) { + uct_rdmacm_iface_release_cm_id(iface, cm_id_ctx); + uct_rdmacm_iface_client_start_next_ep(iface); + } +@@ -407,8 +533,8 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_iface_t, uct_md_h md, uct_worker_h worker, + ip_port_str, UCS_SOCKADDR_STRING_LEN), + ntohs(rdma_get_src_port(self->cm_id))); + +- if (params->mode.sockaddr.cb_flags != UCT_CB_FLAG_ASYNC) { +- ucs_fatal("UCT_CB_FLAG_SYNC is not supported"); ++ if (!(params->mode.sockaddr.cb_flags & UCT_CB_FLAG_ASYNC)) { ++ ucs_fatal("Synchronous callback is not supported"); + } + + self->cb_flags = params->mode.sockaddr.cb_flags; +@@ -416,7 +542,8 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_iface_t, uct_md_h md, uct_worker_h worker, + self->conn_request_arg = params->mode.sockaddr.conn_request_arg; + self->is_server = 1; + } else { +- self->is_server = 0; ++ self->cm_id = NULL; ++ self->is_server = 0; + } + + self->cm_id_quota = config->cm_id_quota; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_md.c +index b28bea1..98d6a11 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_md.c +@@ -106,6 +106,25 @@ static int uct_rdmacm_is_addr_route_resolved(struct rdma_cm_id *cm_id, + return 1; + } + ++static int uct_rdmacm_is_sockaddr_inaddr_any(struct sockaddr *addr) ++{ ++ struct sockaddr_in6 *addr_in6; ++ struct sockaddr_in *addr_in; ++ ++ switch (addr->sa_family) { ++ case AF_INET: ++ addr_in = (struct sockaddr_in *)addr; ++ return addr_in->sin_addr.s_addr == INADDR_ANY; ++ case AF_INET6: ++ addr_in6 = (struct sockaddr_in6 *)addr; ++ return !memcmp(&addr_in6->sin6_addr, &in6addr_any, sizeof(addr_in6->sin6_addr)); ++ default: ++ ucs_debug("Invalid address family: %d", addr->sa_family); ++ } ++ ++ return 0; ++} ++ + int uct_rdmacm_is_sockaddr_accessible(uct_md_h md, const ucs_sock_addr_t *sockaddr, + uct_sockaddr_accessibility_t mode) + { +@@ -139,6 +158,11 @@ int uct_rdmacm_is_sockaddr_accessible(uct_md_h md, const ucs_sock_addr_t *sockad + ip_port_str, UCS_SOCKADDR_STRING_LEN)); + goto out_destroy_id; + } ++ ++ if (uct_rdmacm_is_sockaddr_inaddr_any((struct sockaddr *)sockaddr->addr)) { ++ is_accessible = 1; ++ goto out_print; ++ } + } + + /* Client and server sides check if can access the given sockaddr. +@@ -150,6 +174,7 @@ int uct_rdmacm_is_sockaddr_accessible(uct_md_h md, const ucs_sock_addr_t *sockad + goto out_destroy_id; + } + ++out_print: + ucs_debug("address %s (port %d) is accessible from rdmacm_md %p with mode: %d", + ucs_sockaddr_str((struct sockaddr *)sockaddr->addr, ip_port_str, + UCS_SOCKADDR_STRING_LEN), +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.c +index 1d11f39..2143b43 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.c +@@ -19,6 +19,7 @@ + + #include + #include ++#include + + #include + #include +@@ -33,6 +34,10 @@ static ucs_config_field_t uct_ud_mlx5_iface_config_table[] = { + + {"", "", NULL, + ucs_offsetof(uct_ud_mlx5_iface_config_t, mlx5_common), ++ UCS_CONFIG_TYPE_TABLE(uct_ib_mlx5_iface_config_table)}, ++ ++ {"", "", NULL, ++ ucs_offsetof(uct_ud_mlx5_iface_config_t, ud_mlx5_common), + UCS_CONFIG_TYPE_TABLE(uct_ud_mlx5_iface_common_config_table)}, + + {NULL} +@@ -46,7 +51,8 @@ uct_ud_mlx5_ep_ctrl_av_size(uct_ud_mlx5_ep_t *ep) + + static UCS_F_ALWAYS_INLINE void + uct_ud_mlx5_post_send(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, +- uint8_t se, struct mlx5_wqe_ctrl_seg *ctrl, size_t wqe_size) ++ uint8_t se, struct mlx5_wqe_ctrl_seg *ctrl, size_t wqe_size, ++ int max_log_sge) + { + struct mlx5_wqe_datagram_seg *dgram = (void*)(ctrl + 1); + +@@ -58,7 +64,7 @@ uct_ud_mlx5_post_send(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + + uct_ib_mlx5_log_tx(&iface->super.super, IBV_QPT_UD, ctrl, + iface->tx.wq.qstart, iface->tx.wq.qend, +- uct_ud_dump_packet); ++ max_log_sge, NULL, uct_ud_dump_packet); + iface->super.tx.available -= uct_ib_mlx5_post_send(&iface->tx.wq, ctrl, + wqe_size); + ucs_assert((int16_t)iface->tx.wq.bb_max >= iface->super.tx.available); +@@ -66,7 +72,7 @@ uct_ud_mlx5_post_send(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + + static UCS_F_ALWAYS_INLINE void + uct_ud_mlx5_ep_tx_skb(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, +- uct_ud_send_skb_t *skb, uint8_t se) ++ uct_ud_send_skb_t *skb, uint8_t se, int max_log_sge) + { + size_t ctrl_av_size = uct_ud_mlx5_ep_ctrl_av_size(ep); + struct mlx5_wqe_ctrl_seg *ctrl; +@@ -76,7 +82,7 @@ uct_ud_mlx5_ep_tx_skb(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + dptr = uct_ib_mlx5_txwq_wrap_exact(&iface->tx.wq, (void*)ctrl + ctrl_av_size); + uct_ib_mlx5_set_data_seg(dptr, skb->neth, skb->len, skb->lkey); + UCT_UD_EP_HOOK_CALL_TX(&ep->super, skb->neth); +- uct_ud_mlx5_post_send(iface, ep, se, ctrl, ctrl_av_size + sizeof(*dptr)); ++ uct_ud_mlx5_post_send(iface, ep, se, ctrl, ctrl_av_size + sizeof(*dptr), max_log_sge); + } + + static inline void +@@ -93,7 +99,7 @@ uct_ud_mlx5_ep_tx_inl(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + uct_ib_mlx5_inline_copy(inl + 1, buf, length, &iface->tx.wq); + UCT_UD_EP_HOOK_CALL_TX(&ep->super, (uct_ud_neth_t *)buf); + uct_ud_mlx5_post_send(iface, ep, se, ctrl, +- ctrl_av_size + sizeof(*inl) + length); ++ ctrl_av_size + sizeof(*inl) + length, INT_MAX); + } + + +@@ -107,7 +113,7 @@ static void uct_ud_mlx5_ep_tx_ctl_skb(uct_ud_ep_t *ud_ep, uct_ud_send_skb_t *skb + + se = solicited ? MLX5_WQE_CTRL_SOLICITED : 0; + if (skb->len >= iface->super.config.max_inline) { +- uct_ud_mlx5_ep_tx_skb(iface, ep, skb, se); ++ uct_ud_mlx5_ep_tx_skb(iface, ep, skb, se, INT_MAX); + } else { + uct_ud_mlx5_ep_tx_inl(iface, ep, skb->neth, skb->len, se); + } +@@ -185,7 +191,7 @@ uct_ud_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + 0, iface->super.config.max_inline, "am_short"); + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + skb = uct_ud_ep_get_tx_skb(&iface->super, &ep->super); + if (!skb) { + uct_ud_leave(&iface->super); +@@ -208,10 +214,9 @@ uct_ud_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + uct_ib_mlx5_inline_copy(am + 1, buffer, length, &iface->tx.wq); + + wqe_size += ctrl_av_size + sizeof(*inl); +- UCT_CHECK_LENGTH(wqe_size, 0, UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB, +- "am_short"); ++ UCT_CHECK_LENGTH(wqe_size, 0, UCT_IB_MLX5_MAX_SEND_WQE_SIZE, "am_short"); + UCT_UD_EP_HOOK_CALL_TX(&ep->super, neth); +- uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size); ++ uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size, INT_MAX); + + skb->len = sizeof(*neth) + sizeof(*am); + memcpy(skb->neth, neth, skb->len); +@@ -234,7 +239,7 @@ static ssize_t uct_ud_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + size_t length; + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + status = uct_ud_am_common(&iface->super, &ep->super, id, &skb); + if (status != UCS_OK) { + uct_ud_leave(&iface->super); +@@ -244,7 +249,7 @@ static ssize_t uct_ud_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + length = uct_ud_skb_bcopy(skb, pack_cb, arg); + UCT_UD_CHECK_BCOPY_LENGTH(&iface->super, length); + +- uct_ud_mlx5_ep_tx_skb(iface, ep, skb, 0); ++ uct_ud_mlx5_ep_tx_skb(iface, ep, skb, 0, INT_MAX); + uct_ud_iface_complete_tx_skb(&iface->super, &ep->super, skb); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); + uct_ud_leave(&iface->super); +@@ -275,7 +280,6 @@ uct_ud_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *header, + uct_iov_total_length(iov, iovcnt)); + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); + + skb = uct_ud_ep_get_tx_skb(&iface->super, &ep->super); + if (!skb) { +@@ -299,10 +303,11 @@ uct_ud_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *header, + UCT_IB_MLX5_WQE_SEG_SIZE); + wqe_size += uct_ib_mlx5_set_data_seg_iov(&iface->tx.wq, (void *)ctrl + wqe_size, + iov, iovcnt); +- ucs_assert(wqe_size <= (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB)); ++ ucs_assert(wqe_size <= UCT_IB_MLX5_MAX_SEND_WQE_SIZE); + + UCT_UD_EP_HOOK_CALL_TX(&ep->super, neth); +- uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size); ++ uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super)); + + skb->len = sizeof(*neth) + header_length; + memcpy(skb->neth, neth, sizeof(*neth)); +@@ -332,7 +337,7 @@ uct_ud_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, unsigned length, + size_t wqe_size; + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + skb = uct_ud_ep_get_tx_skb(&iface->super, &ep->super); + if (!skb) { + uct_ud_leave(&iface->super); +@@ -358,10 +363,9 @@ uct_ud_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, unsigned length, + uct_ib_mlx5_inline_copy(put_hdr + 1, buffer, length, &iface->tx.wq); + + wqe_size += ctrl_av_size + sizeof(*inl); +- UCT_CHECK_LENGTH(wqe_size, 0, UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB, +- "put_short"); ++ UCT_CHECK_LENGTH(wqe_size, 0, UCT_IB_MLX5_MAX_SEND_WQE_SIZE, "put_short"); + UCT_UD_EP_HOOK_CALL_TX(&ep->super, neth); +- uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size); ++ uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size, INT_MAX); + + skb->len = sizeof(*neth) + sizeof(*put_hdr); + memcpy(skb->neth, neth, skb->len); +@@ -387,7 +391,7 @@ uct_ud_mlx5_iface_poll_rx(uct_ud_mlx5_iface_t *iface, int is_async) + ucs_prefetch(packet + UCT_IB_GRH_LEN); + desc = (uct_ib_iface_recv_desc_t *)(packet - iface->super.super.config.rx_hdr_offset); + +- cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->rx.cq); ++ cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->cq[UCT_IB_DIR_RX]); + if (cqe == NULL) { + count = 0; + goto out; +@@ -416,7 +420,7 @@ uct_ud_mlx5_iface_poll_rx(uct_ud_mlx5_iface_t *iface, int is_async) + uct_ud_ep_process_rx(&iface->super, + (uct_ud_neth_t *)(packet + UCT_IB_GRH_LEN), + len - UCT_IB_GRH_LEN, +- (uct_ud_recv_skb_t *)desc, is_async); ++ (uct_ud_recv_skb_t *)ucs_unaligned_ptr(desc), is_async); + out: + if (iface->super.rx.available >= iface->super.super.config.rx_max_batch) { + /* we need to try to post buffers always. Otherwise it is possible +@@ -428,18 +432,22 @@ out: + return count; + } + +-static UCS_F_ALWAYS_INLINE void ++static UCS_F_ALWAYS_INLINE unsigned + uct_ud_mlx5_iface_poll_tx(uct_ud_mlx5_iface_t *iface) + { + struct mlx5_cqe64 *cqe; + +- cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->tx.cq); ++ cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->cq[UCT_IB_DIR_TX]); + if (cqe == NULL) { +- return; ++ return 0; + } ++ + ucs_memory_cpu_load_fence(); ++ + uct_ib_mlx5_log_cqe(cqe); +- iface->super.tx.available = uct_ib_mlx5_txwq_update_bb(&iface->tx.wq, ntohs(cqe->wqe_counter)); ++ iface->super.tx.available = uct_ib_mlx5_txwq_update_bb(&iface->tx.wq, ++ ntohs(cqe->wqe_counter)); ++ return 1; + } + + static unsigned uct_ud_mlx5_iface_progress(uct_iface_h tl_iface) +@@ -450,6 +458,7 @@ static unsigned uct_ud_mlx5_iface_progress(uct_iface_h tl_iface) + + uct_ud_enter(&iface->super); + uct_ud_iface_dispatch_zcopy_comps(&iface->super); ++ + status = uct_ud_iface_dispatch_pending_rx(&iface->super); + if (ucs_likely(status == UCS_OK)) { + do { +@@ -457,22 +466,29 @@ static unsigned uct_ud_mlx5_iface_progress(uct_iface_h tl_iface) + count += n; + } while ((n > 0) && (count < iface->super.super.config.rx_max_poll)); + } +- uct_ud_mlx5_iface_poll_tx(iface); ++ ++ count += uct_ud_mlx5_iface_poll_tx(iface); + uct_ud_iface_progress_pending(&iface->super, 0); + uct_ud_leave(&iface->super); + return count; + } + +-static void uct_ud_mlx5_iface_async_progress(uct_ud_iface_t *ud_iface) ++static unsigned uct_ud_mlx5_iface_async_progress(uct_ud_iface_t *ud_iface) + { + uct_ud_mlx5_iface_t *iface = ucs_derived_of(ud_iface, uct_ud_mlx5_iface_t); +- unsigned count; ++ unsigned n, count; + ++ count = 0; + do { +- count = uct_ud_mlx5_iface_poll_rx(iface, 1); +- } while (count > 0); +- uct_ud_mlx5_iface_poll_tx(iface); ++ n = uct_ud_mlx5_iface_poll_rx(iface, 1); ++ count += n; ++ } while (n > 0); ++ ++ count += uct_ud_mlx5_iface_poll_tx(iface); ++ + uct_ud_iface_progress_pending(&iface->super, 1); ++ ++ return count; + } + + static ucs_status_t +@@ -502,17 +518,21 @@ uct_ud_mlx5_ep_create_ah(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + const uct_ud_iface_addr_t *if_addr) + { + ucs_status_t status; ++ uint32_t remote_qpn; + int is_global; + +- status = uct_ud_mlx5_iface_get_av(&iface->super.super, &iface->mlx5_common, ++ status = uct_ud_mlx5_iface_get_av(&iface->super.super, &iface->ud_mlx5_common, + ib_addr, ep->super.path_bits, &ep->av, + &ep->grh_av, &is_global); + if (status != UCS_OK) { + return status; + } + ++ remote_qpn = uct_ib_unpack_uint24(if_addr->qp_num); + ep->is_global = is_global; +- ep->av.dqp_dct |= htonl(uct_ib_unpack_uint24(if_addr->qp_num)); ++ ep->av.dqp_dct |= htonl(remote_qpn); ++ uct_ib_mlx5_iface_set_av_sport(&iface->super.super, &ep->av, ++ remote_qpn ^ iface->super.qp->qp_num); + return UCS_OK; + } + +@@ -591,19 +611,18 @@ uct_ud_mlx5_ep_connect_to_ep(uct_ep_h tl_ep, + return UCS_OK; + } + +-static ucs_status_t uct_ud_mlx5_iface_arm_tx_cq(uct_ib_iface_t *ib_iface) +-{ +- uct_ud_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_ud_mlx5_iface_t); +- uct_ib_mlx5_update_cq_ci(iface->super.super.send_cq, iface->tx.cq.cq_ci); +- return uct_ib_iface_arm_tx_cq(ib_iface); +-} +- +-static ucs_status_t uct_ud_mlx5_iface_arm_rx_cq(uct_ib_iface_t *ib_iface, +- int solicited) ++static ucs_status_t uct_ud_mlx5_iface_arm_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir, ++ int solicited) + { + uct_ud_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_ud_mlx5_iface_t); +- uct_ib_mlx5_update_cq_ci(iface->super.super.recv_cq, iface->rx.cq.cq_ci); +- return uct_ib_iface_arm_rx_cq(ib_iface, solicited); ++#if HAVE_DECL_MLX5DV_INIT_OBJ ++ return uct_ib_mlx5dv_arm_cq(&iface->cq[dir], solicited); ++#else ++ uct_ib_mlx5_update_cq_ci(iface->super.super.cq[dir], ++ iface->cq[dir].cq_ci); ++ return uct_ib_iface_arm_cq(ib_iface, dir, solicited); ++#endif + } + + static ucs_status_t uct_ud_mlx5_ep_set_failed(uct_ib_iface_t *iface, +@@ -613,8 +632,27 @@ static ucs_status_t uct_ud_mlx5_ep_set_failed(uct_ib_iface_t *iface, + &iface->super.super, status); + } + ++static void uct_ud_mlx5_iface_event_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir) ++{ ++ uct_ud_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_ud_mlx5_iface_t); ++ ++ iface->cq[dir].cq_sn++; ++} ++ + static void UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_iface_t)(uct_iface_t*); + ++static void uct_ud_mlx5_iface_handle_failure(uct_ib_iface_t *iface, void *arg, ++ ucs_status_t status) ++{ ++ if (status == UCS_ERR_ENDPOINT_TIMEOUT) { ++ uct_ud_iface_handle_failure(iface, arg, status); ++ } else { ++ /* Local side failure - treat as fatal */ ++ uct_ib_mlx5_completion_with_err(iface, arg, UCS_LOG_LEVEL_FATAL); ++ } ++} ++ + static uct_ud_iface_ops_t uct_ud_mlx5_iface_ops = { + { + { +@@ -644,13 +682,15 @@ static uct_ud_iface_ops_t uct_ud_mlx5_iface_ops = { + .iface_get_address = uct_ud_iface_get_address, + .iface_is_reachable = uct_ib_iface_is_reachable + }, +- .arm_tx_cq = uct_ud_mlx5_iface_arm_tx_cq, +- .arm_rx_cq = uct_ud_mlx5_iface_arm_rx_cq, +- .handle_failure = uct_ud_iface_handle_failure, +- .set_ep_failed = uct_ud_mlx5_ep_set_failed ++ .arm_cq = uct_ud_mlx5_iface_arm_cq, ++ .event_cq = uct_ud_mlx5_iface_event_cq, ++ .handle_failure = uct_ud_mlx5_iface_handle_failure, ++ .set_ep_failed = uct_ud_mlx5_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .async_progress = uct_ud_mlx5_iface_async_progress, + .tx_skb = uct_ud_mlx5_ep_tx_ctl_skb, ++ .ep_free = UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_ep_t) + }; + + static UCS_CLASS_INIT_FUNC(uct_ud_mlx5_iface_t, +@@ -660,28 +700,33 @@ static UCS_CLASS_INIT_FUNC(uct_ud_mlx5_iface_t, + { + uct_ud_mlx5_iface_config_t *config = ucs_derived_of(tl_config, + uct_ud_mlx5_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + int i; + + ucs_trace_func(""); + ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ init_attr.flags = UCT_IB_CQ_IGNORE_OVERRUN; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_ud_iface_t, &uct_ud_mlx5_iface_ops, +- md, worker, params, 0, &config->super); ++ md, worker, params, &config->super, &init_attr); + + uct_ib_iface_set_max_iov(&self->super.super, UCT_IB_MLX5_AM_ZCOPY_MAX_IOV); + self->super.config.max_inline = UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE); + +- status = uct_ib_mlx5_get_cq(self->super.super.send_cq, &self->tx.cq); ++ status = uct_ib_mlx5_get_cq(self->super.super.cq[UCT_IB_DIR_TX], &self->cq[UCT_IB_DIR_TX]); + if (status != UCS_OK) { + return status; + } + +- status = uct_ib_mlx5_get_cq(self->super.super.recv_cq, &self->rx.cq); ++ status = uct_ib_mlx5_get_cq(self->super.super.cq[UCT_IB_DIR_RX], &self->cq[UCT_IB_DIR_RX]); + if (status != UCS_OK) { + return status; + } + +- status = uct_ib_mlx5_txwq_init(self->super.super.super.worker, &self->tx.wq, ++ status = uct_ib_mlx5_txwq_init(self->super.super.super.worker, ++ config->mlx5_common.mmio_mode, &self->tx.wq, + self->super.qp); + if (status != UCS_OK) { + return status; +@@ -694,7 +739,8 @@ static UCS_CLASS_INIT_FUNC(uct_ud_mlx5_iface_t, + } + + status = uct_ud_mlx5_iface_common_init(&self->super.super, +- &self->mlx5_common, &config->mlx5_common); ++ &self->ud_mlx5_common, ++ &config->ud_mlx5_common); + if (status != UCS_OK) { + return status; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.h +index e7c1937..3cd43f1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.h +@@ -22,7 +22,8 @@ typedef struct { + + typedef struct { + uct_ud_iface_config_t super; +- uct_ud_mlx5_iface_common_config_t mlx5_common; ++ uct_ib_mlx5_iface_config_t mlx5_common; ++ uct_ud_mlx5_iface_common_config_t ud_mlx5_common; + } uct_ud_mlx5_iface_config_t; + + +@@ -30,13 +31,12 @@ typedef struct { + uct_ud_iface_t super; + struct { + uct_ib_mlx5_txwq_t wq; +- uct_ib_mlx5_cq_t cq; + } tx; + struct { + uct_ib_mlx5_rxwq_t wq; +- uct_ib_mlx5_cq_t cq; + } rx; +- uct_ud_mlx5_iface_common_t mlx5_common; ++ uct_ib_mlx5_cq_t cq[UCT_IB_DIR_NUM]; ++ uct_ud_mlx5_iface_common_t ud_mlx5_common; + } uct_ud_mlx5_iface_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5_common.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5_common.c +index 466a1e5..23b56dc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5_common.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5_common.c +@@ -49,14 +49,15 @@ ucs_status_t uct_ud_mlx5_iface_get_av(uct_ib_iface_t *iface, + *is_global = ah_attr.is_global; + + uct_ib_mlx5_get_av(ah, &mlx5_av); +- ibv_destroy_ah(ah); + + base_av->stat_rate_sl = mlx5_av_base(&mlx5_av)->stat_rate_sl; + base_av->fl_mlid = mlx5_av_base(&mlx5_av)->fl_mlid; + base_av->rlid = mlx5_av_base(&mlx5_av)->rlid; ++ base_av->dqp_dct = 0; + +- base_av->dqp_dct = (ud_common_iface->config.compact_av) ? 0 : +- UCT_IB_MLX5_EXTENDED_UD_AV; ++ if (!ud_common_iface->config.compact_av || ah_attr.is_global) { ++ base_av->dqp_dct |= UCT_IB_MLX5_EXTENDED_UD_AV; ++ } + + ucs_assertv_always((UCT_IB_MLX5_AV_FULL_SIZE > UCT_IB_MLX5_AV_BASE_SIZE) || + (base_av->dqp_dct & UCT_IB_MLX5_EXTENDED_UD_AV), +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.c +index cc5f13e..5b21415 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.c +@@ -12,6 +12,15 @@ + #include + #include + #include ++#include ++ ++ ++/* Must be less then peer_timeout to avoid false positive errors taking into ++ * account timer resolution and not too small to avoid performance degradation ++ */ ++#define UCT_UD_SLOW_TIMER_MAX_TICK(_iface) ((_iface)->config.peer_timeout / 3) ++ ++static void uct_ud_ep_do_pending_ctl(uct_ud_ep_t *ep, uct_ud_iface_t *iface); + + static void uct_ud_peer_name(uct_ud_peer_name_t *peer) + { +@@ -99,29 +108,57 @@ static void uct_ud_ep_reset(uct_ud_ep_t *ep) + ep->resend.pos = ucs_queue_iter_begin(&ep->tx.window); + ep->resend.psn = ep->tx.psn; + ep->resend.max_psn = ep->tx.acked_psn; ++ ep->rx_creq_count = 0; + + ep->rx.acked_psn = UCT_UD_INITIAL_PSN - 1; + ucs_frag_list_init(ep->tx.psn-1, &ep->rx.ooo_pkts, 0 /*TODO: ooo support */ + UCS_STATS_ARG(ep->super.stats)); + } + ++static ucs_status_t uct_ud_ep_free_by_timeout(uct_ud_ep_t *ep, ++ uct_ud_iface_t *iface) ++{ ++ uct_ud_iface_ops_t *ops; ++ ucs_time_t diff; ++ ++ diff = ucs_twheel_get_time(&iface->async.slow_timer) - ep->close_time; ++ if (diff > iface->config.peer_timeout) { ++ ucs_debug("ud_ep %p is destroyed after %fs with timeout %fs\n", ++ ep, ucs_time_to_sec(diff), ++ ucs_time_to_sec(iface->config.peer_timeout)); ++ ops = ucs_derived_of(iface->super.ops, uct_ud_iface_ops_t); ++ ops->ep_free(&ep->super.super); ++ return UCS_OK; ++ } ++ return UCS_INPROGRESS; ++} ++ + static void uct_ud_ep_slow_timer(ucs_wtimer_t *self) + { +- uct_ud_ep_t *ep = ucs_container_of(self, uct_ud_ep_t, slow_timer); +- uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, +- uct_ud_iface_t); +- ucs_time_t now; +- ucs_time_t diff; ++ uct_ud_ep_t *ep = ucs_container_of(self, uct_ud_ep_t, slow_timer); ++ uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, ++ uct_ud_iface_t); ++ ucs_time_t now; ++ ucs_time_t diff; ++ ucs_status_t status; + + UCT_UD_EP_HOOK_CALL_TIMER(ep); +- now = ucs_twheel_get_time(&iface->async.slow_timer); +- diff = now - ep->tx.send_time; + + if (ucs_queue_is_empty(&ep->tx.window)) { ++ /* Do not free the EP until all scheduled communications are done. */ ++ if (ep->flags & UCT_UD_EP_FLAG_DISCONNECTED) { ++ status = uct_ud_ep_free_by_timeout(ep, iface); ++ if (status == UCS_INPROGRESS) { ++ goto again; ++ } ++ } + return; + } + ++ now = ucs_twheel_get_time(&iface->async.slow_timer); ++ diff = now - ep->tx.send_time; + if (diff > iface->config.peer_timeout) { ++ ucs_debug("ep %p: timeout of %.2f sec", ep, ucs_time_to_sec(diff)); + iface->super.ops->handle_failure(&iface->super, ep, + UCS_ERR_ENDPOINT_TIMEOUT); + return; +@@ -140,9 +177,11 @@ static void uct_ud_ep_slow_timer(ucs_wtimer_t *self) + uct_ud_ep_ctl_op_add(iface, ep, UCT_UD_EP_OP_ACK_REQ); + } + ++again: + /* Cool down the timer on rescheduling/resending */ + ep->tx.slow_tick *= iface->config.slow_timer_backoff; +- ep->tx.slow_tick = ucs_min(ep->tx.slow_tick, iface->config.peer_timeout/3); ++ ep->tx.slow_tick = ucs_min(ep->tx.slow_tick, ++ UCT_UD_SLOW_TIMER_MAX_TICK(iface)); + ucs_wtimer_add(&iface->async.slow_timer, &ep->slow_timer, ep->tx.slow_tick); + } + +@@ -176,7 +215,6 @@ uct_ud_ep_pending_cancel_cb(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + { + uct_ud_ep_t *ep = ucs_container_of(ucs_arbiter_elem_group(elem), + uct_ud_ep_t, tx.pending.group); +- uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_ud_iface_t); + uct_pending_req_t *req; + + /* we may have pending op on ep */ +@@ -188,7 +226,6 @@ uct_ud_ep_pending_cancel_cb(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + /* uct user should not have anything pending */ + req = ucs_container_of(elem, uct_pending_req_t, priv); + ucs_warn("ep=%p removing user pending req=%p", ep, req); +- iface->tx.pending_q_len--; + + /* return ignored by arbiter */ + return UCS_ARBITER_CB_RESULT_REMOVE_ELEM; +@@ -283,6 +320,7 @@ ucs_status_t uct_ud_ep_create_connected_common(uct_ud_iface_t *iface, + ep = uct_ud_iface_cep_lookup(iface, ib_addr, if_addr, UCT_UD_EP_CONN_ID_MAX); + if (ep) { + uct_ud_ep_set_state(ep, UCT_UD_EP_FLAG_CREQ_NOTSENT); ++ ep->flags &= ~UCT_UD_EP_FLAG_PRIVATE; + *new_ep_p = ep; + *skb_p = NULL; + return UCS_ERR_ALREADY_EXISTS; +@@ -467,7 +505,7 @@ static void uct_ud_ep_rx_creq(uct_ud_iface_t *iface, uct_ud_neth_t *neth) + ep = uct_ud_ep_create_passive(iface, ctl); + ucs_assert_always(ep != NULL); + ep->rx.ooo_pkts.head_sn = neth->psn; +- uct_ud_peer_copy(&ep->peer, (void*)&ctl->peer); ++ uct_ud_peer_copy(&ep->peer, ucs_unaligned_ptr(&ctl->peer)); + uct_ud_ep_ctl_op_add(iface, ep, UCT_UD_EP_OP_CREP); + uct_ud_ep_set_state(ep, UCT_UD_EP_FLAG_PRIVATE); + } else { +@@ -475,7 +513,7 @@ static void uct_ud_ep_rx_creq(uct_ud_iface_t *iface, uct_ud_neth_t *neth) + /* simultanuous CREQ */ + ep->dest_ep_id = uct_ib_unpack_uint24(ctl->conn_req.ep_addr.ep_id); + ep->rx.ooo_pkts.head_sn = neth->psn; +- uct_ud_peer_copy(&ep->peer, (void*)&ctl->peer); ++ uct_ud_peer_copy(&ep->peer, ucs_unaligned_ptr(&ctl->peer)); + ucs_debug("simultanuous CREQ ep=%p" + "(iface=%p conn_id=%d ep_id=%d, dest_ep_id=%d rx_psn=%u)", + ep, iface, ep->conn_id, ep->ep_id, +@@ -490,10 +528,17 @@ static void uct_ud_ep_rx_creq(uct_ud_iface_t *iface, uct_ud_neth_t *neth) + } + } + ++ ++ep->rx_creq_count; ++ + ucs_assert_always(ctl->conn_req.conn_id == ep->conn_id); + ucs_assert_always(uct_ib_unpack_uint24(ctl->conn_req.ep_addr.ep_id) == ep->dest_ep_id); + /* creq must always have same psn */ +- ucs_assert_always(ep->rx.ooo_pkts.head_sn == neth->psn); ++ ucs_assertv_always(ep->rx.ooo_pkts.head_sn == neth->psn, ++ "iface=%p ep=%p conn_id=%d ep_id=%d, dest_ep_id=%d rx_psn=%u " ++ "neth_psn=%u ep_flags=0x%x ctl_ops=0x%x rx_creq_count=%d", ++ iface, ep, ep->conn_id, ep->ep_id, ep->dest_ep_id, ++ ep->rx.ooo_pkts.head_sn, neth->psn, ep->flags, ++ ep->tx.pending.ops, ep->rx_creq_count); + /* scedule connection reply op */ + UCT_UD_EP_HOOK_CALL_RX(ep, neth, sizeof(*neth) + sizeof(*ctl)); + if (uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_CREQ)) { +@@ -521,7 +566,7 @@ static void uct_ud_ep_rx_ctl(uct_ud_iface_t *iface, uct_ud_ep_t *ep, + ep->rx.ooo_pkts.head_sn = neth->psn; + ep->dest_ep_id = ctl->conn_rep.src_ep_id; + ucs_arbiter_group_schedule(&iface->tx.pending_q, &ep->tx.pending.group); +- uct_ud_peer_copy(&ep->peer, (void*)&ctl->peer); ++ uct_ud_peer_copy(&ep->peer, ucs_unaligned_ptr(&ctl->peer)); + uct_ud_ep_set_state(ep, UCT_UD_EP_FLAG_CREP_RCVD); + } + +@@ -536,6 +581,15 @@ uct_ud_send_skb_t *uct_ud_ep_prepare_creq(uct_ud_ep_t *ep) + ucs_assert_always(ep->dest_ep_id == UCT_UD_EP_NULL_ID); + ucs_assert_always(ep->ep_id != UCT_UD_EP_NULL_ID); + ++ /* CREQ should not be sent if CREP for the counter CREQ is scheduled ++ * (or sent already) */ ++ ucs_assertv_always(!uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_CREP) && ++ !(ep->flags & UCT_UD_EP_FLAG_CREP_SENT), ++ "iface=%p ep=%p conn_id=%d rx_psn=%u ep_flags=0x%x " ++ "ctl_ops=0x%x rx_creq_count=%d", ++ iface, ep, ep->conn_id, ep->rx.ooo_pkts.head_sn, ++ ep->flags, ep->tx.pending.ops, ep->rx_creq_count); ++ + skb = uct_ud_iface_get_tx_skb(iface, ep); + if (!skb) { + return NULL; +@@ -564,7 +618,7 @@ uct_ud_send_skb_t *uct_ud_ep_prepare_creq(uct_ud_ep_t *ep) + return NULL; + } + +- uct_ud_peer_name((void*)&creq->peer); ++ uct_ud_peer_name(ucs_unaligned_ptr(&creq->peer)); + + skb->len = sizeof(*neth) + sizeof(*creq) + iface->super.addr_size; + return skb; +@@ -639,10 +693,16 @@ void uct_ud_ep_process_rx(uct_ud_iface_t *iface, uct_ud_neth_t *neth, unsigned b + } + + if (ucs_unlikely(is_async && +- (iface->super.super.am[am_id].flags & UCT_CB_FLAG_SYNC))) { ++ !(iface->super.super.am[am_id].flags & UCT_CB_FLAG_ASYNC))) { + skb->u.am.len = byte_len - sizeof(*neth); + ucs_queue_push(&iface->rx.pending_q, &skb->u.am.queue); + } else { ++ /* Avoid reordering with respect to pending operations, if user AM handler ++ * initiates sends from any endpoint created on the iface. ++ * This flag would be cleared after all incoming messages ++ * are processed. */ ++ uct_ud_iface_raise_pending_async_ev(iface); ++ + uct_ib_iface_invoke_am_desc(&iface->super, am_id, neth + 1, + byte_len - sizeof(*neth), &skb->super); + } +@@ -709,11 +769,24 @@ ucs_status_t uct_ud_ep_flush_nolock(uct_ud_iface_t *iface, uct_ud_ep_t *ep, + skb = ucs_queue_tail_elem_non_empty(&ep->tx.window, uct_ud_send_skb_t, queue); + psn = skb->neth->psn; + if (!(skb->flags & UCT_UD_SEND_SKB_FLAG_ACK_REQ)) { +- /* If we didn't ask for ACK on last skb, schedule an ACK message. ++ /* If we didn't ask for ACK on last skb, send an ACK_REQ message. ++ * It will speed up the flush because we will not have to wait untill ++ * retransmit is triggered. + * Also, prevent from sending more control messages like this after + * first time by turning on the flag on the last skb. + */ +- uct_ud_ep_ctl_op_add_safe(iface, ep, UCT_UD_SEND_SKB_FLAG_ACK_REQ); ++ ++ /* Since the function can be called from the arbiter context it is ++ * impossible to schedule a control operation. So just raise a ++ * flag and if there is no other control send ACK_REQ directly. ++ * ++ * If there is other control arbiter will take care of it. ++ */ ++ ep->tx.pending.ops |= UCT_UD_EP_OP_ACK_REQ; ++ if (uct_ud_ep_ctl_op_check_ex(ep, UCT_UD_EP_OP_ACK_REQ)) { ++ uct_ud_ep_do_pending_ctl(ep, iface); ++ } ++ + skb->flags |= UCT_UD_SEND_SKB_FLAG_ACK_REQ; + } + +@@ -774,18 +847,23 @@ ucs_status_t uct_ud_ep_flush(uct_ep_h ep_h, unsigned flags, + uct_ep_pending_purge(ep_h, NULL, 0); + /* Open window after cancellation for next sending */ + uct_ud_ep_ca_ack(ep); ++ status = UCS_OK; ++ goto out; ++ } + +- uct_ud_leave(iface); +- return UCS_OK; ++ if (ucs_unlikely(uct_ud_iface_has_pending_async_ev(iface))) { ++ status = UCS_ERR_NO_RESOURCE; ++ goto out; + } + +- uct_ud_iface_progress_pending_tx(iface); + status = uct_ud_ep_flush_nolock(iface, ep, comp); + if (status == UCS_OK) { + UCT_TL_EP_STAT_FLUSH(&ep->super); + } else if (status == UCS_INPROGRESS) { + UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super); + } ++ ++out: + uct_ud_leave(iface); + return status; + } +@@ -800,6 +878,15 @@ static uct_ud_send_skb_t *uct_ud_ep_prepare_crep(uct_ud_ep_t *ep) + ucs_assert_always(ep->dest_ep_id != UCT_UD_EP_NULL_ID); + ucs_assert_always(ep->ep_id != UCT_UD_EP_NULL_ID); + ++ /* Check that CREQ is neither sheduled nor waiting for CREP ack */ ++ ucs_assertv_always(!uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_CREQ) && ++ ucs_queue_is_empty(&ep->tx.window), ++ "iface=%p ep=%p conn_id=%d ep_id=%d, dest_ep_id=%d rx_psn=%u " ++ "ep_flags=0x%x ctl_ops=0x%x rx_creq_count=%d", ++ iface, ep, ep->conn_id, ep->ep_id, ep->dest_ep_id, ++ ep->rx.ooo_pkts.head_sn, ep->flags, ep->tx.pending.ops, ++ ep->rx_creq_count); ++ + skb = uct_ud_iface_get_tx_skb(iface, ep); + if (!skb) { + return NULL; +@@ -816,7 +903,7 @@ static uct_ud_send_skb_t *uct_ud_ep_prepare_crep(uct_ud_ep_t *ep) + crep->type = UCT_UD_PACKET_CREP; + crep->conn_rep.src_ep_id = ep->ep_id; + +- uct_ud_peer_name((void*)&crep->peer); ++ uct_ud_peer_name(ucs_unaligned_ptr(&crep->peer)); + + skb->len = sizeof(*neth) + sizeof(*crep); + uct_ud_ep_ctl_op_del(ep, UCT_UD_EP_OP_CREP); +@@ -916,7 +1003,7 @@ static void uct_ud_ep_do_pending_ctl(uct_ud_ep_t *ep, uct_ud_iface_t *iface) + skb = uct_ud_ep_resend(ep); + } else if (uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_ACK)) { + if (uct_ud_ep_is_connected(ep)) { +- skb = (void*)&iface->tx.skb_inl.super; ++ skb = ucs_unaligned_ptr(&iface->tx.skb_inl.super); + uct_ud_neth_ctl_ack(ep, skb->neth); + } else { + /* Do not send ACKs if not connected yet. It may happen if +@@ -926,7 +1013,7 @@ static void uct_ud_ep_do_pending_ctl(uct_ud_ep_t *ep, uct_ud_iface_t *iface) + } + uct_ud_ep_ctl_op_del(ep, UCT_UD_EP_OP_ACK); + } else if (uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_ACK_REQ)) { +- skb = (void*)&iface->tx.skb_inl.super; ++ skb = ucs_unaligned_ptr(&iface->tx.skb_inl.super); + uct_ud_neth_ctl_ack_req(ep, skb->neth); + uct_ud_ep_ctl_op_del(ep, UCT_UD_EP_OP_ACK_REQ); + } else if (uct_ud_ep_ctl_op_isany(ep)) { +@@ -1032,16 +1119,18 @@ uct_ud_ep_do_pending(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + + /* user pending can be send iff + * - not in async progress +- * - there are only low priority ctl pending or not ctl at all ++ * - there are no high priority pending control messages + */ +- if (!in_async_progress && +- (uct_ud_ep_ctl_op_check_ex(ep, UCT_UD_EP_OP_CTL_LOW_PRIO) || +- !uct_ud_ep_ctl_op_isany(ep))) { ++ if (!in_async_progress && !uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_CTL_HI_PRIO)) { + uct_pending_req_t *req; + ucs_status_t status; + + req = ucs_container_of(elem, uct_pending_req_t, priv); ++ ++ ucs_assert(!(ep->flags & UCT_UD_EP_FLAG_IN_PENDING)); ++ ep->flags |= UCT_UD_EP_FLAG_IN_PENDING; + status = req->func(req); ++ ep->flags &= ~UCT_UD_EP_FLAG_IN_PENDING; + + if (status == UCS_INPROGRESS) { + return UCS_ARBITER_CB_RESULT_NEXT_GROUP; +@@ -1053,15 +1142,25 @@ uct_ud_ep_do_pending(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + uct_ud_ep_do_pending_ctl(ep, iface); + return uct_ud_ep_ctl_op_next(ep); + } +- iface->tx.pending_q_len--; + return UCS_ARBITER_CB_RESULT_REMOVE_ELEM; + } ++ + /* try to send ctl messages */ + uct_ud_ep_do_pending_ctl(ep, iface); +- return uct_ud_ep_ctl_op_next(ep); ++ if (in_async_progress) { ++ return uct_ud_ep_ctl_op_next(ep); ++ } else { ++ /* we still didn't process the current pending request because of hi-prio ++ * control messages, so cannot stop sending yet. If we stop, not all ++ * resources will be exhausted and out-of-order with pending can occur. ++ * (pending control ops may be cleared by uct_ud_ep_do_pending_ctl) ++ */ ++ return UCS_ARBITER_CB_RESULT_NEXT_GROUP; ++ } + } + +-ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep_h, uct_pending_req_t *req) ++ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep_h, uct_pending_req_t *req, ++ unsigned flags) + { + uct_ud_ep_t *ep = ucs_derived_of(ep_h, uct_ud_ep_t); + uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, +@@ -1069,8 +1168,15 @@ ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep_h, uct_pending_req_t *req) + + uct_ud_enter(iface); + +- /* try to flush pending queue first */ +- uct_ud_iface_progress_pending(iface, 0); ++ /* if there was an async progress all 'send' ops return ++ * UCS_ERR_NO_RESOURCE. If we return UCS_ERR_BUSY there will ++ * be a deadlock. ++ * So we must skip a resource check and add a pending op in order to ++ * avoid a deadlock. ++ */ ++ if (ucs_unlikely(uct_ud_iface_has_pending_async_ev(iface))) { ++ goto add_req; ++ } + + if (uct_ud_iface_can_tx(iface) && + uct_ud_iface_has_skbs(iface) && +@@ -1081,12 +1187,14 @@ ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep_h, uct_pending_req_t *req) + return UCS_ERR_BUSY; + } + ++add_req: + ucs_arbiter_elem_init((ucs_arbiter_elem_t *)req->priv); + ucs_arbiter_group_push_elem(&ep->tx.pending.group, + (ucs_arbiter_elem_t *)req->priv); + ucs_arbiter_group_schedule(&iface->tx.pending_q, &ep->tx.pending.group); ++ ucs_trace_data("ud ep %p: added pending req %p tx_psn %d acked_psn %d cwnd %d", ++ ep, req, ep->tx.psn, ep->tx.acked_psn, ep->ca.cwnd); + +- iface->tx.pending_q_len++; + uct_ud_leave(iface); + return UCS_OK; + } +@@ -1097,10 +1205,9 @@ uct_ud_ep_pending_purge_cb(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + { + uct_ud_ep_t *ep = ucs_container_of(ucs_arbiter_elem_group(elem), + uct_ud_ep_t, tx.pending.group); +- uct_pending_req_t *req; +- uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_ud_iface_t); + uct_purge_cb_args_t *cb_args = arg; + uct_pending_purge_callback_t cb = cb_args->cb; ++ uct_pending_req_t *req; + + if (&ep->tx.pending.elem == elem) { + /* return ignored by arbiter */ +@@ -1112,7 +1219,6 @@ uct_ud_ep_pending_purge_cb(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + } else { + ucs_debug("ep=%p cancelling user pending request %p", ep, req); + } +- iface->tx.pending_q_len--; + + /* return ignored by arbiter */ + return UCS_ARBITER_CB_RESULT_REMOVE_ELEM; +@@ -1140,24 +1246,22 @@ void uct_ud_ep_pending_purge(uct_ep_h ep_h, uct_pending_purge_callback_t cb, + + void uct_ud_ep_disconnect(uct_ep_h tl_ep) + { +- uct_ud_ep_t *ep = ucs_derived_of(tl_ep, uct_ud_ep_t); +- /* +- * At the moment scedule flush and keep ep +- * until interface is destroyed. User should not send any +- * new data +- * In the future consider doin full fledged disconnect +- * protocol. Kind of TCP (FIN/ACK). Doing this will save memory +- * on the other hand active ep will need more memory to keep its state +- * and such protocol will add extra complexity +- */ ++ uct_ud_ep_t *ep = ucs_derived_of(tl_ep, uct_ud_ep_t); ++ uct_ud_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ud_iface_t); ++ ++ ucs_debug("ep %p: disconnect", ep); + +- ucs_trace_func(""); + /* cancel user pending */ + uct_ud_ep_pending_purge(tl_ep, NULL, NULL); + + /* schedule flush */ + uct_ud_ep_flush(tl_ep, 0, NULL); + ++ /* the EP will be destroyed by interface destroy or timeout in ++ * uct_ud_ep_slow_timer ++ */ ++ ep->close_time = ucs_twheel_get_time(&iface->async.slow_timer); + ep->flags |= UCT_UD_EP_FLAG_DISCONNECTED; +- /* TODO: at least in debug mode keep and check tl_ep state */ ++ ucs_wtimer_add(&iface->async.slow_timer, &ep->slow_timer, ++ UCT_UD_SLOW_TIMER_MAX_TICK(iface)); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.h +index dd93e28..95fe92f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.h +@@ -188,16 +188,23 @@ enum { + UCT_UD_EP_FLAG_ASYNC_COMPS = UCS_BIT(0), /* set if there are completions that + * were picked by async thread and queued */ + UCT_UD_EP_FLAG_DISCONNECTED = UCS_BIT(1), /* set if the endpoint was disconnected */ ++ UCT_UD_EP_FLAG_PRIVATE = UCS_BIT(2), /* EP is was created as internal */ + + /* debug flags */ +- UCT_UD_EP_FLAG_PRIVATE = UCS_BIT(2), /* EP is was created as internal */ + UCT_UD_EP_FLAG_CREQ_RCVD = UCS_BIT(3), /* CREQ message was received */ + UCT_UD_EP_FLAG_CREP_RCVD = UCS_BIT(4), /* CREP message was received */ + UCT_UD_EP_FLAG_CREQ_SENT = UCS_BIT(5), /* CREQ message was sent */ + UCT_UD_EP_FLAG_CREP_SENT = UCS_BIT(6), /* CREP message was sent */ +- UCT_UD_EP_FLAG_CREQ_NOTSENT = UCS_BIT(7) /* CREQ message is NOT sent, because ++ UCT_UD_EP_FLAG_CREQ_NOTSENT = UCS_BIT(7), /* CREQ message is NOT sent, because + connection establishment process + is driven by remote side. */ ++ ++ /* Endpoint is currently executing the pending queue */ ++#if ENABLE_ASSERT ++ UCT_UD_EP_FLAG_IN_PENDING = UCS_BIT(8) ++#else ++ UCT_UD_EP_FLAG_IN_PENDING = 0 ++#endif + }; + + typedef struct uct_ud_peer_name { +@@ -222,26 +229,28 @@ struct uct_ud_ep { + UCT_UD_EP_HOOK_DECLARE(tx_hook); + } tx; + struct { +- uct_ud_psn_t psn; /* last psn that was retransmitted */ +- uct_ud_psn_t max_psn; /* max psn that should be retransmitted */ +- ucs_queue_iter_t pos; /* points to the part of tx window that needs to be resent */ +- } resend; +- struct { +- uct_ud_psn_t wmax; +- uct_ud_psn_t cwnd; +- } ca; +- struct { + uct_ud_psn_t acked_psn; /* Last psn we acked */ + ucs_frag_list_t ooo_pkts; /* Out of order packets that can not be processed yet, + also keeps last psn we successfully received and processed */ + UCS_STATS_NODE_DECLARE(stats); + UCT_UD_EP_HOOK_DECLARE(rx_hook); + } rx; ++ struct { ++ uct_ud_psn_t wmax; ++ uct_ud_psn_t cwnd; ++ } ca; ++ struct UCS_S_PACKED { ++ uct_ud_psn_t psn; /* last psn that was retransmitted */ ++ uct_ud_psn_t max_psn; /* max psn that should be retransmitted */ ++ ucs_queue_iter_t pos; /* points to the part of tx window that needs to be resent */ ++ } resend; + ucs_list_link_t cep_list; + uint32_t conn_id; /* connection id. assigned in connect_to_iface() */ +- ucs_wtimer_t slow_timer; +- uint8_t flags; ++ uint16_t flags; + uint8_t path_bits; ++ uint8_t rx_creq_count; /* TODO: remove when reason for DUP/OOO CREQ is found */ ++ ucs_wtimer_t slow_timer; ++ ucs_time_t close_time; /* timestamp of closure */ + UCS_STATS_NODE_DECLARE(stats); + UCT_UD_EP_HOOK_DECLARE(timer_hook); + #if ENABLE_DEBUG_DATA +@@ -266,7 +275,8 @@ ucs_status_t uct_ud_ep_connect_to_ep(uct_ud_ep_t *ep, + const uct_ib_address_t *ib_addr, + const uct_ud_ep_addr_t *ep_addr); + +-ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep, uct_pending_req_t *n); ++ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep, uct_pending_req_t *n, ++ unsigned flags); + + void uct_ud_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, + void *arg); +@@ -372,7 +382,10 @@ uct_ud_ep_ctl_op_isany(uct_ud_ep_t *ep) + static UCS_F_ALWAYS_INLINE int + uct_ud_ep_ctl_op_check_ex(uct_ud_ep_t *ep, uint32_t ops) + { +- return ep->tx.pending.ops == ops; ++ /* check that at least one the given ops is set and ++ * all ops not given are not set */ ++ return (ep->tx.pending.ops & ops) && ++ ((ep->tx.pending.ops & ~ops) == 0); + } + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.c +index 05d6538..db2f133 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.c +@@ -99,10 +99,9 @@ uct_ud_iface_cep_lookup_peer(uct_ud_iface_t *iface, + { + uint32_t dest_qpn = uct_ib_unpack_uint24(src_if_addr->qp_num); + union ibv_gid dgid; +- uint8_t is_global; + uint16_t dlid; + +- uct_ib_address_unpack(src_ib_addr, &dlid, &is_global, &dgid); ++ uct_ib_address_unpack(src_ib_addr, &dlid, &dgid); + return uct_ud_iface_cep_lookup_addr(iface, dlid, &dgid, dest_qpn); + } + +@@ -150,11 +149,10 @@ ucs_status_t uct_ud_iface_cep_insert(uct_ud_iface_t *iface, + uint32_t dest_qpn = uct_ib_unpack_uint24(src_if_addr->qp_num); + uct_ud_iface_peer_t *peer; + union ibv_gid dgid; +- uint8_t is_global; + uct_ud_ep_t *cep; + uint16_t dlid; + +- uct_ib_address_unpack(src_ib_addr, &dlid, &is_global, &dgid); ++ uct_ib_address_unpack(src_ib_addr, &dlid, &dgid); + peer = uct_ud_iface_cep_lookup_addr(iface, dlid, &dgid, dest_qpn); + if (peer == NULL) { + peer = malloc(sizeof *peer); +@@ -250,21 +248,13 @@ static void uct_ud_iface_send_skb_init(uct_iface_h tl_iface, void *obj, + static ucs_status_t + uct_ud_iface_create_qp(uct_ud_iface_t *self, const uct_ud_iface_config_t *config) + { +- /* TODO: exp attrs autoconf */ +- struct ibv_exp_qp_init_attr qp_init_attr; ++ uct_ib_qp_attr_t qp_init_attr = {}; + struct ibv_qp_attr qp_attr; ++ static ucs_status_t status; + int ret; + +- /* Create QP */ +- memset(&qp_init_attr, 0, sizeof(qp_init_attr)); +- qp_init_attr.qp_context = NULL; +- qp_init_attr.send_cq = self->super.send_cq; +- qp_init_attr.recv_cq = self->super.recv_cq; +- qp_init_attr.srq = NULL; /* TODO */ + qp_init_attr.qp_type = IBV_QPT_UD; + qp_init_attr.sq_sig_all = 0; +- +- /* TODO: cap setting */ + qp_init_attr.cap.max_send_wr = config->super.tx.queue_len; + qp_init_attr.cap.max_recv_wr = config->super.rx.queue_len; + qp_init_attr.cap.max_send_sge = 2; +@@ -272,28 +262,9 @@ uct_ud_iface_create_qp(uct_ud_iface_t *self, const uct_ud_iface_config_t *config + qp_init_attr.cap.max_inline_data = ucs_max(config->super.tx.min_inline, + UCT_UD_MIN_INLINE); + +-#if HAVE_VERBS_EXP_H +- qp_init_attr.pd = uct_ib_iface_md(&self->super)->pd; +- qp_init_attr.comp_mask = IBV_QP_INIT_ATTR_PD; +- /* TODO: inline rcv */ +-#if 0 +- if (mxm_ud_ep_opts(ep)->ud.ib.rx.max_inline > 0) { +- qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; +- qp_init_attr.max_inl_recv = mxm_ud_ep_opts(ep)->ud.ib.rx.max_inline; +- } +-#endif +- self->qp = ibv_exp_create_qp(uct_ib_iface_device(&self->super)->ibv_context, +- &qp_init_attr); +-#else +- self->qp = ibv_exp_create_qp(uct_ib_iface_md(&self->super)->pd, &qp_init_attr); +-#endif +- if (self->qp == NULL) { +- ucs_error("Failed to create qp: %s [inline: %u rsge: %u ssge: %u rwr: %u swr: %u]", +- strerror(errno), +- qp_init_attr.cap.max_inline_data, qp_init_attr.cap.max_recv_sge, +- qp_init_attr.cap.max_send_sge, qp_init_attr.cap.max_recv_wr, +- qp_init_attr.cap.max_send_wr); +- goto err; ++ status = self->super.ops->create_qp(&self->super, &qp_init_attr, &self->qp); ++ if (status != UCS_OK) { ++ return status; + } + + self->config.max_inline = qp_init_attr.cap.max_inline_data; +@@ -330,16 +301,9 @@ uct_ud_iface_create_qp(uct_ud_iface_t *self, const uct_ud_iface_config_t *config + goto err_destroy_qp; + } + +- ucs_debug("iface=%p: created qp 0x%x max_send_wr %u max_recv_wr %u max_inline %u", +- self, self->qp->qp_num, +- qp_init_attr.cap.max_send_wr, +- qp_init_attr.cap.max_recv_wr, +- qp_init_attr.cap.max_inline_data); +- + return UCS_OK; + err_destroy_qp: + ibv_destroy_qp(self->qp); +-err: + return UCS_ERR_INVALID_PARAM; + } + +@@ -417,17 +381,16 @@ static void uct_ud_iface_calc_gid_len(uct_ud_iface_t *iface) + + UCS_CLASS_INIT_FUNC(uct_ud_iface_t, uct_ud_iface_ops_t *ops, uct_md_h md, + uct_worker_h worker, const uct_iface_params_t *params, +- unsigned ud_rx_priv_len, +- const uct_ud_iface_config_t *config) ++ const uct_ud_iface_config_t *config, ++ uct_ib_iface_init_attr_t *init_attr) + { +- unsigned rx_priv_len, rx_hdr_len; + ucs_status_t status; + size_t data_size; + int mtu; + +- ucs_trace_func("%s: iface=%p ops=%p worker=%p rx_headroom=%zu ud_rx_priv_len=%u", ++ ucs_trace_func("%s: iface=%p ops=%p worker=%p rx_headroom=%zu", + params->mode.device.dev_name, self, ops, worker, +- params->rx_headroom, ud_rx_priv_len); ++ params->rx_headroom); + + if (config->super.tx.queue_len <= UCT_UD_TX_MODERATION) { + ucs_error("%s ud iface tx queue is too short (%d <= %d)", +@@ -441,15 +404,15 @@ UCS_CLASS_INIT_FUNC(uct_ud_iface_t, uct_ud_iface_ops_t *ops, uct_md_h md, + return status; + } + +- rx_priv_len = ud_rx_priv_len + +- sizeof(uct_ud_recv_skb_t) - sizeof(uct_ib_iface_recv_desc_t); +- rx_hdr_len = UCT_IB_GRH_LEN + sizeof(uct_ud_neth_t); ++ init_attr->rx_priv_len = sizeof(uct_ud_recv_skb_t) - ++ sizeof(uct_ib_iface_recv_desc_t); ++ init_attr->rx_hdr_len = UCT_IB_GRH_LEN + sizeof(uct_ud_neth_t); ++ init_attr->tx_cq_len = config->super.tx.queue_len; ++ init_attr->rx_cq_len = config->super.rx.queue_len; ++ init_attr->seg_size = ucs_min(mtu, config->super.super.max_bcopy); + + UCS_CLASS_CALL_SUPER_INIT(uct_ib_iface_t, &ops->super, md, worker, +- params, rx_priv_len, rx_hdr_len, +- config->super.tx.queue_len, +- config->super.rx.queue_len, +- mtu, &config->super); ++ params, &config->super, init_attr); + + if (self->super.super.worker->async == NULL) { + ucs_error("%s ud iface must have valid async context", params->mode.device.dev_name); +@@ -464,7 +427,7 @@ UCS_CLASS_INIT_FUNC(uct_ud_iface_t, uct_ud_iface_ops_t *ops, uct_md_h md, + self->config.tx_qp_len = config->super.tx.queue_len; + self->config.peer_timeout = ucs_time_from_sec(config->peer_timeout); + self->config.check_grh_dgid = (config->dgid_check && +- (self->super.addr_type == UCT_IB_ADDRESS_TYPE_ETH)); ++ IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(&self->super))); + + if (config->slow_timer_backoff <= 0.) { + ucs_error("The slow timer back off should be > 0 (%lf)", +@@ -518,13 +481,13 @@ UCS_CLASS_INIT_FUNC(uct_ud_iface_t, uct_ud_iface_ops_t *ops, uct_md_h md, + self->tx.resend_skbs_quota = 0; + + ucs_arbiter_init(&self->tx.pending_q); +- self->tx.pending_q_len = 0; + + ucs_queue_head_init(&self->tx.async_comp_q); +- self->tx.in_pending = 0; + + ucs_queue_head_init(&self->rx.pending_q); + ++ self->tx.async_before_pending = 0; ++ + uct_ud_iface_calc_gid_len(self); + + status = UCS_STATS_NODE_ALLOC(&self->stats, &uct_ud_iface_stats_class, +@@ -563,7 +526,6 @@ static UCS_CLASS_CLEANUP_FUNC(uct_ud_iface_t) + ucs_debug("iface(%p): ptr_array cleanup", self); + ucs_ptr_array_cleanup(&self->eps); + ucs_arbiter_cleanup(&self->tx.pending_q); +- ucs_assert(self->tx.pending_q_len == 0); + UCS_STATS_NODE_FREE(self->stats); + uct_ud_leave(self); + } +@@ -664,7 +626,11 @@ ucs_status_t uct_ud_iface_flush(uct_iface_h tl_iface, unsigned flags, + + uct_ud_enter(iface); + +- uct_ud_iface_progress_pending_tx(iface); ++ if (ucs_unlikely(uct_ud_iface_has_pending_async_ev(iface))) { ++ UCT_TL_IFACE_STAT_FLUSH_WAIT(&iface->super.super); ++ uct_ud_leave(iface); ++ return UCS_INPROGRESS; ++ } + + count = 0; + ucs_ptr_array_for_each(ep, i, &iface->eps) { +@@ -680,6 +646,7 @@ ucs_status_t uct_ud_iface_flush(uct_iface_h tl_iface, unsigned flags, + UCT_TL_IFACE_STAT_FLUSH_WAIT(&iface->super.super); + return UCS_INPROGRESS; + } ++ + UCT_TL_IFACE_STAT_FLUSH(&iface->super.super); + return UCS_OK; + } +@@ -742,11 +709,34 @@ static void uct_ud_iface_free_resend_skbs(uct_ud_iface_t *iface) + } + } + ++static void uct_ud_ep_dispatch_err_comp(uct_ud_ep_t *ep, uct_ud_send_skb_t *skb) ++{ ++ uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_ud_iface_t); ++ ucs_status_t status; ++ ++ ucs_assert(ep->tx.err_skb_count > 0); ++ --ep->tx.err_skb_count; ++ ++ if ((ep->tx.err_skb_count > 0) || (ep->flags & UCT_UD_EP_FLAG_DISCONNECTED)) { ++ return; ++ } ++ ++ if (ep->flags & UCT_UD_EP_FLAG_PRIVATE) { ++ uct_ep_destroy(&ep->super.super); ++ return; ++ } ++ ++ status = iface->super.ops->set_ep_failed(&iface->super, &ep->super.super, ++ skb->status); ++ if (status != UCS_OK) { ++ ucs_fatal("transport error: %s", ucs_status_string(status)); ++ } ++} ++ + void uct_ud_iface_dispatch_async_comps_do(uct_ud_iface_t *iface) + { + uct_ud_comp_desc_t *cdesc; + uct_ud_send_skb_t *skb; +- ucs_status_t status; + uct_ud_ep_t *ep; + + do { +@@ -761,17 +751,7 @@ void uct_ud_iface_dispatch_async_comps_do(uct_ud_iface_t *iface) + } + + if (ucs_unlikely(skb->flags & UCT_UD_SEND_SKB_FLAG_ERR)) { +- ucs_assert(ep->tx.err_skb_count > 0); +- --ep->tx.err_skb_count; +- if ((ep->tx.err_skb_count == 0) && +- !(ep->flags & UCT_UD_EP_FLAG_DISCONNECTED)) { +- status = iface->super.ops->set_ep_failed(&iface->super, +- &ep->super.super, +- skb->status); +- if (status != UCS_OK) { +- ucs_fatal("transport error: %s", ucs_status_string(status)); +- } +- } ++ uct_ud_ep_dispatch_err_comp(ep, skb); + } + + ep->flags &= ~UCT_UD_EP_FLAG_ASYNC_COMPS; +@@ -830,7 +810,14 @@ static void uct_ud_iface_free_pending_rx(uct_ud_iface_t *iface) + + static inline void uct_ud_iface_async_progress(uct_ud_iface_t *iface) + { +- ucs_derived_of(iface->super.ops, uct_ud_iface_ops_t)->async_progress(iface); ++ unsigned ev_count; ++ uct_ud_iface_ops_t *ops; ++ ++ ops = ucs_derived_of(iface->super.ops, uct_ud_iface_ops_t); ++ ev_count = ops->async_progress(iface); ++ if (ev_count > 0) { ++ uct_ud_iface_raise_pending_async_ev(iface); ++ } + } + + static void uct_ud_iface_timer(int timer_id, void *arg) +@@ -892,7 +879,7 @@ ucs_status_t uct_ud_iface_event_arm(uct_iface_h tl_iface, unsigned events) + } + + if (events & UCT_EVENT_SEND_COMP) { +- status = iface->super.ops->arm_tx_cq(&iface->super); ++ status = iface->super.ops->arm_cq(&iface->super, UCT_IB_DIR_TX, 0); + if (status != UCS_OK) { + goto out; + } +@@ -900,7 +887,7 @@ ucs_status_t uct_ud_iface_event_arm(uct_iface_h tl_iface, unsigned events) + + if (events & (UCT_EVENT_SEND_COMP | UCT_EVENT_RECV)) { + /* we may get send completion through ACKs as well */ +- status = iface->super.ops->arm_rx_cq(&iface->super, 0); ++ status = iface->super.ops->arm_cq(&iface->super, UCT_IB_DIR_RX, 0); + if (status != UCS_OK) { + goto out; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.h +index e4c6db5..ab36374 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.h +@@ -103,9 +103,10 @@ static inline ucs_status_t uct_ud_iface_null_hook(uct_ud_iface_t *iface, + + typedef struct uct_ud_iface_ops { + uct_ib_iface_ops_t super; +- void (*async_progress)(uct_ud_iface_t *iface); ++ unsigned (*async_progress)(uct_ud_iface_t *iface); + void (*tx_skb)(uct_ud_ep_t *ep, uct_ud_send_skb_t *skb, + int solicited); ++ void (*ep_free)(uct_ep_h ep); + } uct_ud_iface_ops_t; + + struct uct_ud_iface { +@@ -122,14 +123,14 @@ struct uct_ud_iface { + uct_ud_send_skb_t *skb; /* ready to use skb */ + uct_ud_send_skb_inl_t skb_inl; + ucs_mpool_t mp; ++ /* got async events but pending queue was not dispatched */ ++ uint8_t async_before_pending; + int16_t available; + unsigned unsignaled; + /* pool of skbs that are reserved for retransmissions */ + ucs_queue_head_t resend_skbs; + unsigned resend_skbs_quota; + ucs_arbiter_t pending_q; +- int pending_q_len; +- int in_pending; + ucs_queue_head_t async_comp_q; + } tx; + struct { +@@ -154,7 +155,8 @@ struct uct_ud_iface { + + UCS_CLASS_DECLARE(uct_ud_iface_t, uct_ud_iface_ops_t*, uct_md_h, + uct_worker_h, const uct_iface_params_t*, +- unsigned, const uct_ud_iface_config_t*) ++ const uct_ud_iface_config_t*, ++ uct_ib_iface_init_attr_t*) + + struct uct_ud_ctl_hdr { + uint8_t type; +@@ -213,7 +215,7 @@ uct_ud_send_skb_t *uct_ud_iface_resend_skb_get(uct_ud_iface_t *iface); + static inline void + uct_ud_iface_resend_skb_put(uct_ud_iface_t *iface, uct_ud_send_skb_t *skb) + { +- if (skb != (void*)&iface->tx.skb_inl.super) { ++ if (skb != ucs_unaligned_ptr(&iface->tx.skb_inl.super)) { + ucs_queue_push(&iface->tx.resend_skbs, &skb->queue); + } + } +@@ -376,26 +378,29 @@ uct_ud_iface_get_async_time(uct_ud_iface_t *iface) + static UCS_F_ALWAYS_INLINE void + uct_ud_iface_progress_pending(uct_ud_iface_t *iface, const uintptr_t is_async) + { ++ if (!is_async) { ++ iface->tx.async_before_pending = 0; ++ } + + if (!uct_ud_iface_can_tx(iface)) { + return; + } + +- iface->tx.in_pending = 1; +- ucs_arbiter_dispatch(&iface->tx.pending_q, 1, +- uct_ud_ep_do_pending, (void *)is_async); +- iface->tx.in_pending = 0; ++ ucs_arbiter_dispatch(&iface->tx.pending_q, 1, uct_ud_ep_do_pending, ++ (void *)is_async); ++} ++ ++static UCS_F_ALWAYS_INLINE int ++uct_ud_iface_has_pending_async_ev(uct_ud_iface_t *iface) ++{ ++ return iface->tx.async_before_pending; + } + + static UCS_F_ALWAYS_INLINE void +-uct_ud_iface_progress_pending_tx(uct_ud_iface_t *iface) ++uct_ud_iface_raise_pending_async_ev(uct_ud_iface_t *iface) + { +- if (ucs_unlikely(iface->tx.pending_q_len > 0 && +- iface->tx.in_pending == 0)) { +- iface->tx.in_pending = 1; +- ucs_arbiter_dispatch(&iface->tx.pending_q, 1, +- uct_ud_ep_do_pending, (void *)0); +- iface->tx.in_pending = 0; ++ if (!ucs_arbiter_is_empty(&iface->tx.pending_q)) { ++ iface->tx.async_before_pending = 1; + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_inl.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_inl.h +index 55e4816..b7f6b44 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_inl.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_inl.h +@@ -7,7 +7,6 @@ + static UCS_F_ALWAYS_INLINE void + uct_ud_ep_ctl_op_schedule(uct_ud_iface_t *iface, uct_ud_ep_t *ep) + { +- ucs_assert(!iface->tx.in_pending); + ucs_arbiter_group_push_elem(&ep->tx.pending.group, + &ep->tx.pending.elem); + ucs_arbiter_group_schedule(&iface->tx.pending_q, &ep->tx.pending.group); +@@ -24,15 +23,6 @@ uct_ud_ep_ctl_op_add(uct_ud_iface_t *iface, uct_ud_ep_t *ep, int op) + } + + static UCS_F_ALWAYS_INLINE void +-uct_ud_ep_ctl_op_add_safe(uct_ud_iface_t *iface, uct_ud_ep_t *ep, int op) +-{ +- ep->tx.pending.ops |= op; +- if (!iface->tx.in_pending) { +- uct_ud_ep_ctl_op_schedule(iface, ep); +- } +-} +- +-static UCS_F_ALWAYS_INLINE void + uct_ud_ep_tx_stop(uct_ud_ep_t *ep) + { + ep->tx.max_psn = ep->tx.psn; +@@ -81,8 +71,9 @@ static UCS_F_ALWAYS_INLINE uct_ud_send_skb_t * + uct_ud_ep_get_tx_skb(uct_ud_iface_t *iface, uct_ud_ep_t *ep) + { + if (ucs_unlikely(!uct_ud_ep_is_connected(ep) || +- uct_ud_ep_no_window(ep))) { +- ucs_trace_data("iface=%p ep=%p (%d->%d) no ep resources (psn=%u max_psn=%u)", ++ uct_ud_ep_no_window(ep) || ++ uct_ud_iface_has_pending_async_ev(iface))) { ++ ucs_trace_poll("iface=%p ep=%p (%d->%d) no ep resources (psn=%u max_psn=%u)", + iface, ep, ep->ep_id, ep->dest_ep_id, + (unsigned)ep->tx.psn, + (unsigned)ep->tx.max_psn); +@@ -170,6 +161,17 @@ uct_ud_am_common(uct_ud_iface_t *iface, uct_ud_ep_t *ep, uint8_t id, + return UCS_ERR_NO_RESOURCE; + } + ++ /* either we are executing pending operations, or there are no any pending ++ * elements, or the only pending element is for sending control messages ++ * (we don't care about reordering with respect to control messages) ++ */ ++ ucs_assertv((ep->flags & UCT_UD_EP_FLAG_IN_PENDING) || ++ ucs_arbiter_group_is_empty(&ep->tx.pending.group) || ++ ucs_arbiter_elem_is_only(&ep->tx.pending.group, &ep->tx.pending.elem), ++ "out-of-order send detected for ep %p am %d ep_pending %d arbtail %p arbelem %p", ++ ep, id, (ep->flags & UCT_UD_EP_FLAG_IN_PENDING), ++ ep->tx.pending.group.tail, ++ &ep->tx.pending.elem); + uct_ud_am_set_neth(skb->neth, ep, id); + + *skb_p = skb; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/verbs/ud_verbs.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/verbs/ud_verbs.c +index 1209ca1..3d3bd50 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/verbs/ud_verbs.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/verbs/ud_verbs.c +@@ -50,10 +50,6 @@ UCS_CLASS_INIT_FUNC(uct_ud_verbs_ep_t, uct_iface_h tl_iface) + static UCS_CLASS_CLEANUP_FUNC(uct_ud_verbs_ep_t) + { + ucs_trace_func(""); +- if (self->ah) { +- ibv_destroy_ah(self->ah); +- self->ah = NULL; +- } + } + + UCS_CLASS_DEFINE(uct_ud_verbs_ep_t, uct_ud_ep_t); +@@ -90,7 +86,7 @@ uct_ud_verbs_ep_tx_inlv(uct_ud_verbs_iface_t *iface, uct_ud_verbs_ep_t *ep, + ret = ibv_post_send(iface->super.qp, &iface->tx.wr_inl, &bad_wr); + ucs_assertv(ret == 0, "ibv_post_send() returned %d (%m)", ret); + uct_ib_log_post_send(&iface->super.super, iface->super.qp, &iface->tx.wr_inl, +- uct_ud_dump_packet); ++ INT_MAX, uct_ud_dump_packet); + --iface->super.tx.available; + } + +@@ -109,7 +105,7 @@ uct_ud_verbs_ep_tx_skb(uct_ud_verbs_iface_t *iface, + ret = ibv_post_send(iface->super.qp, &iface->tx.wr_skb, &bad_wr); + ucs_assertv(ret == 0, "ibv_post_send() returned %d (%m)", ret); + uct_ib_log_post_send(&iface->super.super, iface->super.qp, &iface->tx.wr_skb, +- uct_ud_dump_packet); ++ INT_MAX, uct_ud_dump_packet); + --iface->super.tx.available; + } + +@@ -145,7 +141,7 @@ ucs_status_t uct_ud_verbs_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + 0, iface->super.config.max_inline, "am_short"); + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + status = uct_ud_am_common(&iface->super, &ep->super, id, &skb); + if (status != UCS_OK) { + uct_ud_leave(&iface->super); +@@ -180,7 +176,7 @@ static ssize_t uct_ud_verbs_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + size_t length; + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + status = uct_ud_am_common(&iface->super, &ep->super, id, &skb); + if (status != UCS_OK) { + uct_ud_leave(&iface->super); +@@ -217,7 +213,7 @@ uct_ud_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *header, + uct_iov_total_length(iov, iovcnt)); + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + status = uct_ud_am_common(&iface->super, &ep->super, id, &skb); + if (status != UCS_OK) { + uct_ud_leave(&iface->super); +@@ -256,7 +252,7 @@ ucs_status_t uct_ud_verbs_ep_put_short(uct_ep_h tl_ep, + + /* TODO: UCT_CHECK_LENGTH(length <= iface->config.max_inline, "put_short"); */ + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + skb = uct_ud_ep_get_tx_skb(&iface->super, &ep->super); + if (!skb) { + uct_ud_leave(&iface->super); +@@ -290,7 +286,7 @@ uct_ud_verbs_iface_poll_tx(uct_ud_verbs_iface_t *iface) + struct ibv_wc wc; + int ret; + +- ret = ibv_poll_cq(iface->super.super.send_cq, 1, &wc); ++ ret = ibv_poll_cq(iface->super.super.cq[UCT_IB_DIR_TX], 1, &wc); + if (ucs_unlikely(ret < 0)) { + ucs_fatal("Failed to poll send CQ"); + return 0; +@@ -319,7 +315,7 @@ uct_ud_verbs_iface_poll_rx(uct_ud_verbs_iface_t *iface, int is_async) + void *packet; + int i; + +- status = uct_ib_poll_cq(iface->super.super.recv_cq, &num_wcs, wc); ++ status = uct_ib_poll_cq(iface->super.super.cq[UCT_IB_DIR_RX], &num_wcs, wc); + if (status != UCS_OK) { + num_wcs = 0; + goto out; +@@ -353,16 +349,21 @@ static ucs_status_t uct_ud_verbs_ep_set_failed(uct_ib_iface_t *iface, + &iface->super.super, status); + } + +-static void uct_ud_verbs_iface_async_progress(uct_ud_iface_t *ud_iface) ++static unsigned uct_ud_verbs_iface_async_progress(uct_ud_iface_t *ud_iface) + { + uct_ud_verbs_iface_t *iface = ucs_derived_of(ud_iface, uct_ud_verbs_iface_t); +- unsigned count; ++ unsigned count, n; + ++ count = 0; + do { +- count = uct_ud_verbs_iface_poll_rx(iface, 1); +- } while (count > 0); +- uct_ud_verbs_iface_poll_tx(iface); ++ n = uct_ud_verbs_iface_poll_rx(iface, 1); ++ count += n; ++ } while (n > 0); ++ ++ count += uct_ud_verbs_iface_poll_tx(iface); ++ + uct_ud_iface_progress_pending(&iface->super, 1); ++ return count; + } + + static unsigned uct_ud_verbs_iface_progress(uct_iface_h tl_iface) +@@ -382,8 +383,10 @@ static unsigned uct_ud_verbs_iface_progress(uct_iface_h tl_iface) + } else { + count = 0; + } ++ + uct_ud_iface_progress_pending(&iface->super, 0); + uct_ud_leave(&iface->super); ++ + return count; + } + +@@ -513,13 +516,15 @@ static uct_ud_iface_ops_t uct_ud_verbs_iface_ops = { + .iface_get_address = uct_ud_iface_get_address, + .iface_is_reachable = uct_ib_iface_is_reachable + }, +- .arm_tx_cq = uct_ib_iface_arm_tx_cq, +- .arm_rx_cq = uct_ib_iface_arm_rx_cq, ++ .arm_cq = uct_ib_iface_arm_cq, ++ .event_cq = (void*)ucs_empty_function, + .handle_failure = uct_ud_iface_handle_failure, +- .set_ep_failed = uct_ud_verbs_ep_set_failed ++ .set_ep_failed = uct_ud_verbs_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .async_progress = uct_ud_verbs_iface_async_progress, +- .tx_skb = uct_ud_verbs_ep_tx_ctl_skb ++ .tx_skb = uct_ud_verbs_ep_tx_ctl_skb, ++ .ep_free = UCS_CLASS_DELETE_FUNC_NAME(uct_ud_verbs_ep_t) + }; + + static UCS_F_NOINLINE void +@@ -562,12 +567,15 @@ static UCS_CLASS_INIT_FUNC(uct_ud_verbs_iface_t, uct_md_h md, uct_worker_h worke + { + uct_ud_iface_config_t *config = ucs_derived_of(tl_config, + uct_ud_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + + ucs_trace_func(""); + ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_ud_iface_t, &uct_ud_verbs_iface_ops, md, +- worker, params, 0, config); ++ worker, params, config, &init_attr); + + memset(&self->tx.wr_inl, 0, sizeof(self->tx.wr_inl)); + self->tx.wr_inl.opcode = IBV_WR_SEND; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_ep.c +index b61d8a5..29ef06b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_ep.c +@@ -46,42 +46,6 @@ UCS_CLASS_DEFINE_DELETE_FUNC(uct_rocm_cma_ep_t, uct_ep_t); + (_rkey)) + + +-/** Convert pointer to pointer which could be used for +- * GPU access. +-*/ +-static ucs_status_t uct_rocm_cma_ptr_to_gpu_ptr(void *ptr, void **gpu_address, +- size_t size, int any_memory, +- int *locked) +-{ +- /* Assume that we do not need to lock memory */ +- *locked = 0; +- +- /* Try to get GPU address if any */ +- if (!uct_rocm_is_ptr_gpu_accessible(ptr, gpu_address)) { +- /* We do not have GPU address. Check what to do. */ +- if (!any_memory) { +- /* We do not want to deal with memory about which +- * ROCm stack is not aware */ +- ucs_warn("Address %p is not GPU registered", ptr); +- return UCS_ERR_INVALID_ADDR; +- } else { +- /* Register / lock this memory for GPU access */ +- hsa_status_t status = uct_rocm_memory_lock(ptr, size, gpu_address); +- +- if (status != HSA_STATUS_SUCCESS) { +- ucs_error("Could not lock %p. Status %d", ptr, status); +- return UCS_ERR_INVALID_ADDR; +- } else { +- ucs_trace("Lock address %p as GPU %p", ptr, *gpu_address); +- /* We locked this memory. Set the flag to be aware that +- * we need to unlock it later */ +- *locked = 1; +- } +- } +- } +- +- return UCS_OK; +-} + + /** Release GPU address if it was previously locked */ + static void uct_rocm_cma_unlock_ptrs(void **local_ptr, int *locked, +@@ -131,8 +95,8 @@ ucs_status_t uct_rocm_cma_ep_common_zcopy(uct_ep_h tl_ep, + size_t length = 0; + HsaMemoryRange local_iov[UCT_SM_MAX_IOV]; + HsaMemoryRange remote_iov; +- ucs_status_t ucs_status; + HSAKMT_STATUS hsa_status; ++ hsa_status_t status; + void *local_ptr[UCT_SM_MAX_IOV]; + int local_ptr_locked[UCT_SM_MAX_IOV]; + uint64_t remote_gpu_address; +@@ -212,15 +176,15 @@ ucs_status_t uct_rocm_cma_ep_common_zcopy(uct_ep_h tl_ep, + * If this is memory was not yet registered with ROCm stack and + * flag "any_memory" is set than lock this memory. + */ +- ucs_status = uct_rocm_cma_ptr_to_gpu_ptr(local_ptr[local_iov_it], +- &local_iov[local_iov_it].MemoryAddress, +- local_iov[local_iov_it].SizeInBytes, +- rocm_md->any_memory, +- &local_ptr_locked[local_iov_it]); ++ status = uct_rocm_cma_ptr_to_gpu_ptr(local_ptr[local_iov_it], ++ &local_iov[local_iov_it].MemoryAddress, ++ local_iov[local_iov_it].SizeInBytes, ++ rocm_md->any_memory, ++ &local_ptr_locked[local_iov_it]); + +- if (ucs_status != UCS_OK) { ++ if (status != HSA_STATUS_SUCCESS) { + uct_rocm_cma_unlock_ptrs(local_ptr, local_ptr_locked, local_iov_it); +- return ucs_status; ++ return UCS_ERR_INVALID_ADDR; + } + + ucs_trace("[%d] Local address %p (GPU ptr %p), Local Size 0x%x", +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_md.c +index 9bc7c76..07dd5f4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_md.c +@@ -57,7 +57,7 @@ static ucs_status_t uct_rocm_cma_query_md_resources(uct_md_resource_desc_t **res + * Note: We do not support PnP so ROCm configuration will be the same. + */ + if (uct_rocm_init() != HSA_STATUS_SUCCESS) { +- ucs_error("Could not initialize ROCm support"); ++ ucs_debug("Could not initialize ROCm support"); + *resources_p = NULL; + *num_resources_p = 0; + return UCS_OK; +@@ -99,27 +99,14 @@ static ucs_status_t uct_rocm_cma_mem_reg(uct_md_h md, void *address, size_t leng + /* Assume memory is already GPU accessible */ + key->is_locked = 0; + +- /* Check if memory is already GPU accessible. If yes then GPU +- * address will be returned. +- * Note that we could have case of "malloc"-ed memory which +- * was "locked" outside of UCX. In this case CPU address may be +- * not the same as GPU one. +- */ +- if (!uct_rocm_is_ptr_gpu_accessible(address, &gpu_address)) { +- if (!rocm_md->any_memory) { +- ucs_warn("Address %p is not GPU allocated.", address); +- return UCS_ERR_INVALID_ADDR; +- } else { +- status = uct_rocm_memory_lock(address, length, &gpu_address); +- +- if (status != HSA_STATUS_SUCCESS) { +- ucs_error("Could not lock %p. Status %d", address, status); +- return UCS_ERR_INVALID_ADDR; +- } else { +- ucs_trace("Lock address %p as GPU %p", address, gpu_address); +- key->is_locked = 1; /* Set flag that memory was locked by us */ +- } +- } ++ status = uct_rocm_cma_ptr_to_gpu_ptr(address, &gpu_address, ++ length, rocm_md->any_memory, ++ &key->is_locked); ++ if (status != HSA_STATUS_SUCCESS) { ++ ucs_error("Failed to convert cma %p for gpu access", address); ++ *memh_p = NULL; ++ ucs_free(key); ++ return UCS_ERR_INVALID_ADDR; + } + + key->length = length; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.c +index 016c7d8..1cee2c4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.c +@@ -1,5 +1,6 @@ + /* + * Copyright (C) Advanced Micro Devices, Inc. 2016 - 2017. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2019. ALL RIGHTS RESERVED. + * See file LICENSE for terms. + */ + +@@ -98,7 +99,7 @@ static hsa_status_t uct_rocm_hsa_agent_callback(hsa_agent_t agent, void* data) + + if (device_type == HSA_DEVICE_TYPE_GPU) { + +- status = hsa_agent_get_info(agent, HSA_AMD_AGENT_INFO_BDFID, &bdfid); ++ status = hsa_agent_get_info(agent, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_BDFID, &bdfid); + + if (status != HSA_STATUS_SUCCESS) { + ucs_warn("Failure to get pci info: 0x%x", status); +@@ -179,17 +180,15 @@ hsa_status_t uct_rocm_init() + + /* Initialize HSA RT just in case if it was not initialized before */ + status = hsa_init(); +- + if (status != HSA_STATUS_SUCCESS) { +- ucs_error("Failure to open HSA connection: 0x%x", status); ++ ucs_debug("Failure to open HSA connection: 0x%x", status); + goto end; + } + + /* Collect information about GPU agents */ + status = hsa_iterate_agents(uct_rocm_hsa_agent_callback, NULL); +- + if (status != HSA_STATUS_SUCCESS && status != HSA_STATUS_INFO_BREAK) { +- ucs_error("Failure to iterate HSA agents: 0x%x", status); ++ ucs_debug("Failure to iterate HSA agents: 0x%x", status); + goto end; + } + +@@ -200,12 +199,21 @@ end: + return status; + } + +-int uct_rocm_is_ptr_gpu_accessible(void *ptr, void **gpu_ptr) ++/* Checks if ptr is ROCm allocated, if so then set need_lock to 0 */ ++static hsa_status_t uct_rocm_check_ptr_info(void *ptr, void **gpu_ptr, ++ int *need_lock) + { ++ hsa_status_t status; + hsa_amd_pointer_info_t info; + info.size = sizeof(hsa_amd_pointer_info_t); + +- hsa_status_t status = hsa_amd_pointer_info(ptr, (hsa_amd_pointer_info_t *)&info, ++ *need_lock = 1; ++ ++ if (gpu_ptr) { ++ *gpu_ptr = 0; ++ } ++ ++ status = hsa_amd_pointer_info(ptr, (hsa_amd_pointer_info_t *)&info, + NULL, NULL, NULL); + + if (status == HSA_STATUS_SUCCESS) { +@@ -224,26 +232,27 @@ int uct_rocm_is_ptr_gpu_accessible(void *ptr, void **gpu_ptr) + else if (info.type == HSA_EXT_POINTER_TYPE_HSA) { + /* This is the GPU pointer */ + *gpu_ptr += ptr - info.agentBaseAddress; ++ *need_lock = 0; + } + else { + /* Assume that "ptr" is GPU pointer */ + *gpu_ptr += ptr - info.agentBaseAddress; ++ *need_lock = 0; + } + } +- +- ucs_trace("%p is GPU accessible (agent addr %p, Host Base %p)", ++ ucs_trace("%p info (agent addr %p, Host Base %p)", + ptr, info.agentBaseAddress, info.hostBaseAddress); +- return 1; + } + } + + ucs_trace_func("%p is not GPU accessible", ptr); +- return 0; ++ return status; + } + + + hsa_status_t uct_rocm_memory_lock(void *ptr, size_t size, void **gpu_ptr) + { ++ + /* We need to lock / register memory on all GPUs because we do not know + the location of other memory */ + hsa_status_t status = hsa_amd_memory_lock(ptr, size, +@@ -257,3 +266,41 @@ hsa_status_t uct_rocm_memory_lock(void *ptr, size_t size, void **gpu_ptr) + + return status; + } ++ ++/** Convert pointer to pointer which could be used for GPU access. ++*/ ++hsa_status_t uct_rocm_cma_ptr_to_gpu_ptr(void *ptr, void **gpu_address, ++ size_t size, int any_memory, ++ int *locked) ++{ ++ hsa_status_t status; ++ int need_lock = 0; ++ ++ /* Assume that we do not need to lock memory */ ++ *locked = 0; ++ ++ if (!any_memory) { ++ /* We do not want to deal with memory about which ++ * ROCm stack is not aware */ ++ ucs_warn("Address %p is not GPU registered", ptr); ++ return HSA_STATUS_ERROR; ++ } ++ ++ status = uct_rocm_check_ptr_info(ptr, gpu_address, &need_lock); ++ if (status != HSA_STATUS_SUCCESS || !need_lock) ++ return status; ++ ++ /* Register / lock this memory for GPU access */ ++ status = uct_rocm_memory_lock(ptr, size, gpu_address); ++ if (status != HSA_STATUS_SUCCESS) { ++ ucs_error("Could not lock %p. Status %d", ptr, status); ++ return status; ++ } else { ++ ucs_trace("Lock address %p as GPU %p", ptr, *gpu_address); ++ /* We locked this memory. Set the flag to be aware that ++ * we need to unlock it later */ ++ *locked = 1; ++ } ++ ++ return status; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.h +index 4205d21..827cee1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.h +@@ -20,16 +20,19 @@ hsa_status_t uct_rocm_init(); + + + /** +- * @brief Check if memory is GPU accessible ++ * @brief Convert pointer to pointer which could be used for GPU access + * + * @param [in] ptr Pointer to memory + * @param [out] gpu_ptr If not NULL return host address to be used for + * GPU access. +- * +- * @return true if GPU accessible false otherwise ++ * @param [out] indicates if memory is locked for GPU access. If locked ++ * then hsa_amd_unlock() should be called ++ * @return HSA status + * + */ +-int uct_rocm_is_ptr_gpu_accessible(void *ptr, void **gpu_ptr); ++hsa_status_t uct_rocm_cma_ptr_to_gpu_ptr(void *ptr, void **gpu_address, ++ size_t size, int any_memory, ++ int *locked); + + + /** +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.c +index cce8dad..e6910f3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.c +@@ -54,39 +54,145 @@ ucs_status_t uct_sm_ep_get_bcopy(uct_ep_h tl_ep, uct_unpack_callback_t unpack_cb + return UCS_OK; + } + +-ucs_status_t uct_sm_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_sm_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- uint64_t *ptr = (uint64_t *)(rkey + remote_addr); +- ucs_atomic_add64(ptr, add); +- uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_ADD64 [add %"PRIu64"]", add); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); ++ uint32_t *ptr = (uint32_t *)(rkey + remote_addr); ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ ucs_atomic_add32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_ADD32 [value %"PRIu32"]", value); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ ucs_atomic_and32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_AND32 [value %"PRIu32"]", value); ++ break; ++ case UCT_ATOMIC_OP_OR: ++ ucs_atomic_or32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_OR32 [value %"PRIu32"]", value); ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ ucs_atomic_xor32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_XOR32 [value %"PRIu32"]", value); ++ break; ++ default: ++ ucs_assertv(0, "incorrect opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(ep, uct_base_ep_t)); + return UCS_OK; + } + +-ucs_status_t uct_sm_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ucs_status_t uct_sm_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { + uint64_t *ptr = (uint64_t *)(rkey + remote_addr); +- *result = ucs_atomic_fadd64(ptr, add); +- uct_sm_ep_trace_data(remote_addr, rkey, +- "ATOMIC_FADD64 [add %"PRIu64" result %"PRIu64"]", +- add, *result); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ ucs_atomic_add64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_ADD64 [value %"PRIu64"]", value); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ ucs_atomic_and64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_AND64 [value %"PRIu64"]", value); ++ break; ++ case UCT_ATOMIC_OP_OR: ++ ucs_atomic_or64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_OR64 [value %"PRIu64"]", value); ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ ucs_atomic_xor64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_XOR64 [value %"PRIu64"]", value); ++ break; ++ default: ++ ucs_assertv(0, "incorrect opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(ep, uct_base_ep_t)); + return UCS_OK; + } + +-ucs_status_t uct_sm_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ucs_status_t uct_sm_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { + uint64_t *ptr = (uint64_t *)(rkey + remote_addr); +- *result = ucs_atomic_swap64(ptr, swap); +- uct_sm_ep_trace_data(remote_addr, rkey, +- "ATOMIC_SWAP64 [swap %"PRIu64" result %"PRIu64"]", +- swap, *result); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ *result = ucs_atomic_fadd64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FADD64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ *result = ucs_atomic_fand64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FAND64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_OR: ++ *result = ucs_atomic_for64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FOR64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ *result = ucs_atomic_fxor64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FXOR64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_SWAP: ++ *result = ucs_atomic_swap64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_SWAP64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ default: ++ ucs_assertv(0, "incorrect opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(ep, uct_base_ep_t)); ++ return UCS_OK; ++} ++ ++ucs_status_t uct_sm_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) ++{ ++ uint32_t *ptr = (uint32_t *)(rkey + remote_addr); ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ *result = ucs_atomic_fadd32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FADD32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ *result = ucs_atomic_fand32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FAND32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_OR: ++ *result = ucs_atomic_for32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FOR32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ *result = ucs_atomic_fxor32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FXOR32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_SWAP: ++ *result = ucs_atomic_swap32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_SWAP32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ default: ++ ucs_assertv(0, "incorrect opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(ep, uct_base_ep_t)); + return UCS_OK; + } + +@@ -104,40 +210,6 @@ ucs_status_t uct_sm_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, + return UCS_OK; + } + +-ucs_status_t uct_sm_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) +-{ +- uint32_t *ptr = (uint32_t *)(rkey + remote_addr); +- ucs_atomic_add32(ptr, add); +- uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_ADD32 [add %"PRIu32"]", add); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return UCS_OK; +-} +- +-ucs_status_t uct_sm_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) +-{ +- uint32_t *ptr = (uint32_t *)(rkey + remote_addr); +- *result = ucs_atomic_fadd32(ptr, add); +- uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FADD32 [add %"PRIu32 +- " result %"PRIu32"]", add, *result); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return UCS_OK; +-} +- +-ucs_status_t uct_sm_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) +-{ +- uint32_t *ptr = (uint32_t *)(rkey + remote_addr); +- *result = ucs_atomic_swap32(ptr, swap); +- uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_SWAP32 [swap %"PRIu32 +- " result %"PRIu32"]", swap, *result); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return UCS_OK; +-} +- + ucs_status_t uct_sm_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, + uint32_t swap, uint64_t remote_addr, + uct_rkey_t rkey, uint32_t *result, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.h +index 9940b3b..78454fb 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.h +@@ -20,30 +20,25 @@ ucs_status_t uct_sm_ep_get_bcopy(uct_ep_h ep, uct_unpack_callback_t unpack_cb, + uint64_t remote_addr, uct_rkey_t rkey, + uct_completion_t *comp); + +-ucs_status_t uct_sm_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +-ucs_status_t uct_sm_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +-ucs_status_t uct_sm_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); + ucs_status_t uct_sm_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, + uint64_t swap, uint64_t remote_addr, + uct_rkey_t rkey, uint64_t *result, + uct_completion_t *comp); +- +-ucs_status_t uct_sm_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +-ucs_status_t uct_sm_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); +-ucs_status_t uct_sm_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); + ucs_status_t uct_sm_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, + uint32_t swap, uint64_t remote_addr, + uct_rkey_t rkey, uint32_t *result, + uct_completion_t *comp); ++ucs_status_t uct_sm_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_sm_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); ++ucs_status_t uct_sm_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_sm_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/knem/knem_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/knem/knem_md.c +index 34f42e6..ba2865c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/knem/knem_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/knem/knem_md.c +@@ -9,6 +9,7 @@ + #include "knem_io.h" + + #include ++#include + + static ucs_config_field_t uct_knem_md_config_table[] = { + {"", "", NULL, +@@ -278,7 +279,8 @@ static uct_md_ops_t uct_knem_md_rcache_ops = { + + + static ucs_status_t uct_knem_rcache_mem_reg_cb(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *rregion) ++ void *arg, ucs_rcache_region_t *rregion, ++ uint16_t rcache_mem_reg_flags) + { + uct_knem_rcache_region_t *region = ucs_derived_of(rregion, uct_knem_rcache_region_t); + uct_knem_md_t *md = context; +@@ -286,7 +288,9 @@ static ucs_status_t uct_knem_rcache_mem_reg_cb(void *context, ucs_rcache_t *rcac + + return uct_knem_mem_reg_internal(&md->super, (void*)region->super.super.start, + region->super.super.end - region->super.super.start, +- *flags, 1, ®ion->key); ++ *flags, ++ rcache_mem_reg_flags & UCS_RCACHE_MEM_REG_HIDE_ERRORS, ++ ®ion->key); + } + + static void uct_knem_rcache_mem_dereg_cb(void *context, ucs_rcache_t *rcache, +@@ -346,6 +350,7 @@ static ucs_status_t uct_knem_md_open(const char *md_name, + rcache_params.region_struct_size = sizeof(uct_knem_rcache_region_t); + rcache_params.alignment = md_config->rcache.alignment; + rcache_params.max_alignment = ucs_get_page_size(); ++ rcache_params.ucm_events = UCM_EVENT_VM_UNMAPPED; + rcache_params.ucm_event_priority = md_config->rcache.event_prio; + rcache_params.context = knem_md; + rcache_params.ops = &uct_knem_rcache_ops; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.c +index 547ff83..3c16061 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.c +@@ -188,7 +188,7 @@ static inline ucs_status_t uct_mm_ep_get_remote_elem(uct_mm_ep_t *ep, uint64_t h + *elem = UCT_MM_IFACE_GET_FIFO_ELEM(iface, ep->fifo, elem_index); + + /* try to get ownership of the head element */ +- returned_val = ucs_atomic_cswap64(&ep->fifo_ctl->head, head, head+1); ++ returned_val = ucs_atomic_cswap64(ucs_unaligned_ptr(&ep->fifo_ctl->head), head, head+1); + if (returned_val != head) { + return UCS_ERR_NO_RESOURCE; + } +@@ -220,6 +220,7 @@ uct_mm_ep_am_common_send(unsigned is_short, uct_mm_ep_t *ep, uct_mm_iface_t *ifa + + UCT_CHECK_AM_ID(am_id); + ++retry: + head = ep->fifo_ctl->head; + /* check if there is room in the remote process's receive FIFO to write */ + if (!UCT_MM_EP_IS_ABLE_TO_SEND(head, ep->cached_tail, iface->config.fifo_size)) { +@@ -240,9 +241,9 @@ uct_mm_ep_am_common_send(unsigned is_short, uct_mm_ep_t *ep, uct_mm_iface_t *ifa + + status = uct_mm_ep_get_remote_elem(ep, head, &elem); + if (status != UCS_OK) { +- ucs_trace_poll("couldn't get an available FIFO element"); +- UCS_STATS_UPDATE_COUNTER(ep->super.stats, UCT_EP_STAT_NO_RES, 1); +- return status; ++ ucs_assert(status == UCS_ERR_NO_RESOURCE); ++ ucs_trace_poll("couldn't get an available FIFO element. retrying"); ++ goto retry; + } + + if (is_short) { +@@ -329,13 +330,15 @@ static inline int uct_mm_ep_has_tx_resources(uct_mm_ep_t *ep) + iface->config.fifo_size); + } + +-ucs_status_t uct_mm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n) ++ucs_status_t uct_mm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags) + { + uct_mm_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_mm_iface_t); + uct_mm_ep_t *ep = ucs_derived_of(tl_ep, uct_mm_ep_t); + + /* check if resources became available */ + if (uct_mm_ep_has_tx_resources(ep)) { ++ ucs_assert(ucs_arbiter_group_is_empty(&ep->arb_group)); + return UCS_ERR_BUSY; + } + +@@ -360,8 +363,7 @@ ucs_arbiter_cb_result_t uct_mm_ep_process_pending(ucs_arbiter_t *arbiter, + + /* update the local tail with its actual value from the remote peer + * making sure that the pending sends would use the real tail value */ +- ucs_memory_cpu_load_fence(); +- ep->cached_tail = ep->fifo_ctl->tail; ++ uct_mm_ep_update_cached_tail(ep); + + if (!uct_mm_ep_has_tx_resources(ep)) { + return UCS_ARBITER_CB_RESULT_RESCHED_GROUP; +@@ -417,10 +419,15 @@ ucs_status_t uct_mm_ep_flush(uct_ep_h tl_ep, unsigned flags, + { + uct_mm_ep_t *ep = ucs_derived_of(tl_ep, uct_mm_ep_t); + +- uct_mm_ep_update_cached_tail(ep); +- + if (!uct_mm_ep_has_tx_resources(ep)) { +- return UCS_ERR_NO_RESOURCE; ++ if (!ucs_arbiter_group_is_empty(&ep->arb_group)) { ++ return UCS_ERR_NO_RESOURCE; ++ } else { ++ uct_mm_ep_update_cached_tail(ep); ++ if (!uct_mm_ep_has_tx_resources(ep)) { ++ return UCS_ERR_NO_RESOURCE; ++ } ++ } + } + + ucs_memory_cpu_store_fence(); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.h +index e6e7d22..45b9879 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.h +@@ -52,7 +52,8 @@ ssize_t uct_mm_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, uct_pack_callback_t pack_ + ucs_status_t uct_mm_ep_flush(uct_ep_h tl_ep, unsigned flags, + uct_completion_t *comp); + +-ucs_status_t uct_mm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n); ++ucs_status_t uct_mm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags); + + void uct_mm_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, + void *arg); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_iface.c +index 6329728..2fbe9c1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_iface.c +@@ -117,14 +117,6 @@ static ucs_status_t uct_mm_iface_query(uct_iface_h tl_iface, + iface_attr->max_conn_priv = 0; + iface_attr->cap.flags = UCT_IFACE_FLAG_PUT_SHORT | + UCT_IFACE_FLAG_PUT_BCOPY | +- UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32 | + UCT_IFACE_FLAG_ATOMIC_CPU | + UCT_IFACE_FLAG_GET_BCOPY | + UCT_IFACE_FLAG_AM_SHORT | +@@ -135,6 +127,19 @@ static ucs_status_t uct_mm_iface_query(uct_iface_h tl_iface, + UCT_IFACE_FLAG_EVENT_RECV_SIG | + UCT_IFACE_FLAG_CONNECT_TO_IFACE; + ++ iface_attr->cap.atomic32.op_flags = ++ iface_attr->cap.atomic64.op_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ iface_attr->cap.atomic32.fop_flags = ++ iface_attr->cap.atomic64.fop_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ + iface_attr->latency.overhead = 80e-9; /* 80 ns */ + iface_attr->latency.growth = 0; + iface_attr->bandwidth = 6911 * 1024.0 * 1024.0; +@@ -302,14 +307,12 @@ static uct_iface_ops_t uct_mm_iface_ops = { + .ep_get_bcopy = uct_sm_ep_get_bcopy, + .ep_am_short = uct_mm_ep_am_short, + .ep_am_bcopy = uct_mm_ep_am_bcopy, +- .ep_atomic_add64 = uct_sm_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_sm_ep_atomic_fadd64, + .ep_atomic_cswap64 = uct_sm_ep_atomic_cswap64, +- .ep_atomic_swap64 = uct_sm_ep_atomic_swap64, +- .ep_atomic_add32 = uct_sm_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_sm_ep_atomic_fadd32, ++ .ep_atomic64_post = uct_sm_ep_atomic64_post, ++ .ep_atomic64_fetch = uct_sm_ep_atomic64_fetch, + .ep_atomic_cswap32 = uct_sm_ep_atomic_cswap32, +- .ep_atomic_swap32 = uct_sm_ep_atomic_swap32, ++ .ep_atomic32_post = uct_sm_ep_atomic32_post, ++ .ep_atomic32_fetch = uct_sm_ep_atomic32_fetch, + .ep_pending_add = uct_mm_ep_pending_add, + .ep_pending_purge = uct_mm_ep_pending_purge, + .ep_flush = uct_mm_ep_flush, +@@ -366,8 +369,8 @@ ucs_status_t uct_mm_allocate_fifo_mem(uct_mm_iface_t *iface, + size_to_alloc = UCT_MM_GET_FIFO_SIZE(iface); + + status = uct_mm_md_mapper_ops(md)->alloc(md, &size_to_alloc, config->hugetlb_mode, +- 0, &iface->shared_mem, &iface->fifo_mm_id, +- &iface->path UCS_MEMTRACK_NAME("mm fifo")); ++ 0, "mm fifo", &iface->shared_mem, ++ &iface->fifo_mm_id, &iface->path); + if (status != UCS_OK) { + ucs_error("Failed to allocate memory for the receive FIFO in mm. size: %zu : %m", + size_to_alloc); +@@ -427,7 +430,7 @@ static ucs_status_t uct_mm_iface_create_signal_fd(uct_mm_iface_t *iface) + addrlen = sizeof(struct sockaddr_un); + memset(&iface->recv_fifo_ctl->signal_sockaddr, 0, addrlen); + ret = getsockname(iface->signal_fd, +- (struct sockaddr *)&iface->recv_fifo_ctl->signal_sockaddr, ++ (struct sockaddr *)ucs_unaligned_ptr(&iface->recv_fifo_ctl->signal_sockaddr), + &addrlen); + if (ret < 0) { + ucs_error("Failed to retrieve unix domain socket address: %m"); +@@ -461,6 +464,11 @@ static UCS_CLASS_INIT_FUNC(uct_mm_iface_t, uct_md_h md, uct_worker_h worker, + + ucs_trace_func("Creating an MM iface=%p worker=%p", self, worker); + ++ if (ucs_derived_of(worker, uct_priv_worker_t)->thread_mode == UCS_THREAD_MODE_MULTI) { ++ ucs_error("Shared memory transport does not support multi-threaded worker"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ + /* check that the fifo size, from the user, is a power of two and bigger than 1 */ + if ((mm_config->fifo_size <= 1) || ucs_is_pow2(mm_config->fifo_size) != 1) { + ucs_error("The MM FIFO size must be a power of two and bigger than 1."); +@@ -491,7 +499,7 @@ static UCS_CLASS_INIT_FUNC(uct_mm_iface_t, uct_md_h md, uct_worker_h worker, + (mm_config->fifo_size * mm_config->release_fifo_factor), + 1))); + self->fifo_mask = mm_config->fifo_size - 1; +- self->fifo_shift = ucs_count_zero_bits(mm_config->fifo_size); ++ self->fifo_shift = ucs_count_trailing_zero_bits(mm_config->fifo_size); + self->rx_headroom = params->rx_headroom; + self->release_desc.cb = uct_mm_iface_release_desc; + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.c +index e6942ff..e46ff50 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.c +@@ -23,7 +23,8 @@ ucs_config_field_t uct_mm_md_config_table[] = { + }; + + ucs_status_t uct_mm_mem_alloc(uct_md_h md, size_t *length_p, void **address_p, +- unsigned flags, uct_mem_h *memh_p UCS_MEMTRACK_ARG) ++ unsigned flags, const char *alloc_name, ++ uct_mem_h *memh_p) + { + ucs_status_t status; + uct_mm_seg_t *seg; +@@ -36,8 +37,8 @@ ucs_status_t uct_mm_mem_alloc(uct_md_h md, size_t *length_p, void **address_p, + + + status = uct_mm_md_mapper_ops(md)->alloc(md, length_p, UCS_TRY, flags, +- address_p, &seg->mmid, &seg->path +- UCS_MEMTRACK_VAL); ++ alloc_name, address_p, &seg->mmid, ++ &seg->path); + if (status != UCS_OK) { + ucs_free(seg); + return status; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.h +index d3557a1..02b8b40 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.h +@@ -49,8 +49,8 @@ typedef struct uct_mm_mapper_ops { + ucs_status_t (*dereg)(uct_mm_id_t mm_id); + + ucs_status_t (*alloc)(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, +- unsigned flags, void **address_p, uct_mm_id_t *mmid_p, +- const char **path_p UCS_MEMTRACK_ARG); ++ unsigned flags, const char *alloc_name, void **address_p, ++ uct_mm_id_t *mmid_p, const char **path_p); + + ucs_status_t (*attach)(uct_mm_id_t mmid, size_t length, + void *remote_address, void **address, uint64_t *cookie, +@@ -142,7 +142,8 @@ typedef struct uct_mm_md { + + + ucs_status_t uct_mm_mem_alloc(uct_md_h md, size_t *length_p, void **address_p, +- unsigned flags, uct_mem_h *memh_p UCS_MEMTRACK_ARG); ++ unsigned flags, const char *alloc_name, ++ uct_mem_h *memh_p); + + ucs_status_t uct_mm_mem_free(uct_md_h md, uct_mem_h memh); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_posix.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_posix.c +index 6d5ca90..278d397 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_posix.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_posix.c +@@ -250,8 +250,8 @@ out: + + static ucs_status_t + uct_posix_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, +- unsigned md_map_flags, void **address_p, uct_mm_id_t *mmid_p, +- const char **path_p UCS_MEMTRACK_ARG) ++ unsigned md_map_flags, const char *alloc_name, void **address_p, ++ uct_mm_id_t *mmid_p, const char **path_p) + { + ucs_status_t status; + int shm_fd = -1; +@@ -370,7 +370,8 @@ uct_posix_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, + goto out_ok; + } + +- ucs_debug("mm failed to allocate %zu bytes without hugetlb %m", *length_p); ++ ucs_debug("mm failed to allocate %zu bytes without hugetlb for %s: %m", ++ *length_p, alloc_name); + } + + err_shm_unlink: +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_sysv.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_sysv.c +index 1cffaf7..4bcb94b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_sysv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_sysv.c +@@ -27,8 +27,8 @@ static ucs_config_field_t uct_sysv_md_config_table[] = { + + static ucs_status_t + uct_sysv_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, +- unsigned md_map_flags, void **address_p, uct_mm_id_t *mmid_p, +- const char **path_p UCS_MEMTRACK_ARG) ++ unsigned md_map_flags, const char *alloc_name, void **address_p, ++ uct_mm_id_t *mmid_p, const char **path_p) + { + ucs_status_t status = UCS_ERR_NO_MEMORY; + int flags, shmid = 0; +@@ -47,7 +47,7 @@ uct_sysv_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, + + if (hugetlb != UCS_NO) { + status = ucs_sysv_alloc(length_p, (*length_p) * 2, address_p, +- flags | SHM_HUGETLB, &shmid UCS_MEMTRACK_VAL); ++ flags | SHM_HUGETLB, alloc_name, &shmid); + if (status == UCS_OK) { + goto out_ok; + } +@@ -56,8 +56,8 @@ uct_sysv_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, + } + + if (hugetlb != UCS_YES) { +- status = ucs_sysv_alloc(length_p, SIZE_MAX, address_p, flags , &shmid +- UCS_MEMTRACK_VAL); ++ status = ucs_sysv_alloc(length_p, SIZE_MAX, address_p, flags, alloc_name, ++ &shmid); + if (status == UCS_OK) { + goto out_ok; + } +@@ -66,7 +66,7 @@ uct_sysv_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, + } + + err: +- ucs_error("failed to allocate %zu bytes with mm", *length_p); ++ ucs_error("failed to allocate %zu bytes with mm for %s", *length_p, alloc_name); + return status; + + out_ok: +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_xpmem.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_xpmem.c +index 4394d17..f323a66 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_xpmem.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_xpmem.c +@@ -147,9 +147,9 @@ static ucs_status_t uct_xpmem_detach(uct_mm_remote_seg_t *mm_desc) + + static ucs_status_t uct_xpmem_alloc(uct_md_h md, size_t *length_p, + ucs_ternary_value_t hugetlb, +- unsigned md_map_flags, void **address_p, +- uct_mm_id_t *mmid_p, const char **path_p +- UCS_MEMTRACK_ARG) ++ unsigned md_map_flags, const char *alloc_name, ++ void **address_p, uct_mm_id_t *mmid_p, ++ const char **path_p) + { + ucs_status_t status; + int mmap_flags; +@@ -170,11 +170,13 @@ static ucs_status_t uct_xpmem_alloc(uct_md_h md, size_t *length_p, + /* TBD: any ideas for better allocation */ + status = ucs_mmap_alloc(length_p, address_p, mmap_flags UCS_MEMTRACK_VAL); + if (status != UCS_OK) { +- ucs_error("Failed to allocate %zu bytes of memory", *length_p); ++ ucs_error("Failed to allocate %zu bytes of memory for %s", *length_p, ++ alloc_name); + goto out; + } + +- ucs_trace("xpmem allocated address %p length %zu", *address_p, *length_p); ++ ucs_trace("xpmem allocated address %p length %zu for %s", *address_p, ++ *length_p, alloc_name); + + status = uct_xmpem_reg(*address_p, *length_p, mmid_p); + if (UCS_OK != status) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.c +new file mode 100644 +index 0000000..8898559 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.c +@@ -0,0 +1,386 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#include "self.h" ++ ++#include ++#include ++#include ++#include ++#include "self.h" ++ ++ ++#define UCT_SELF_NAME "self" ++ ++#define UCT_SELF_IFACE_SEND_BUFFER_GET(_iface) \ ++ ({ /* use buffers from mpool to avoid buffer re-usage */ \ ++ /* till operation completes */ \ ++ void *ptr = ucs_mpool_get_inline(&(_iface)->msg_mp); \ ++ if (ucs_unlikely(ptr == NULL)) { \ ++ return UCS_ERR_NO_MEMORY; \ ++ } \ ++ ptr; \ ++ }) ++ ++ ++/* Forward declarations */ ++static uct_iface_ops_t uct_self_iface_ops; ++static uct_md_component_t uct_self_md; ++ ++ ++static ucs_status_t uct_self_iface_query(uct_iface_h tl_iface, uct_iface_attr_t *attr) ++{ ++ uct_self_iface_t *iface = ucs_derived_of(tl_iface, uct_self_iface_t); ++ ++ ucs_trace_func("iface=%p", iface); ++ memset(attr, 0, sizeof(*attr)); ++ ++ attr->iface_addr_len = sizeof(uct_self_iface_addr_t); ++ attr->device_addr_len = 0; ++ attr->ep_addr_len = 0; ++ attr->max_conn_priv = 0; ++ attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_AM_SHORT | ++ UCT_IFACE_FLAG_AM_BCOPY | ++ UCT_IFACE_FLAG_PUT_SHORT | ++ UCT_IFACE_FLAG_PUT_BCOPY | ++ UCT_IFACE_FLAG_GET_BCOPY | ++ UCT_IFACE_FLAG_ATOMIC_CPU | ++ UCT_IFACE_FLAG_PENDING | ++ UCT_IFACE_FLAG_CB_SYNC | ++ UCT_IFACE_FLAG_EP_CHECK; ++ ++ attr->cap.atomic32.op_flags = ++ attr->cap.atomic64.op_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ attr->cap.atomic32.fop_flags = ++ attr->cap.atomic64.fop_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ ++ attr->cap.put.max_short = UINT_MAX; ++ attr->cap.put.max_bcopy = SIZE_MAX; ++ attr->cap.put.min_zcopy = 0; ++ attr->cap.put.max_zcopy = 0; ++ attr->cap.put.opt_zcopy_align = 1; ++ attr->cap.put.align_mtu = attr->cap.put.opt_zcopy_align; ++ attr->cap.put.max_iov = 1; ++ ++ attr->cap.get.max_bcopy = SIZE_MAX; ++ attr->cap.get.min_zcopy = 0; ++ attr->cap.get.max_zcopy = 0; ++ attr->cap.get.opt_zcopy_align = 1; ++ attr->cap.get.align_mtu = attr->cap.get.opt_zcopy_align; ++ attr->cap.get.max_iov = 1; ++ ++ attr->cap.am.max_short = iface->send_size; ++ attr->cap.am.max_bcopy = iface->send_size; ++ attr->cap.am.min_zcopy = 0; ++ attr->cap.am.max_zcopy = 0; ++ attr->cap.am.opt_zcopy_align = 1; ++ attr->cap.am.align_mtu = attr->cap.am.opt_zcopy_align; ++ attr->cap.am.max_hdr = 0; ++ attr->cap.am.max_iov = 1; ++ ++ attr->latency.overhead = 0; ++ attr->latency.growth = 0; ++ attr->bandwidth = 6911 * 1024.0 * 1024.0; ++ attr->overhead = 10e-9; ++ attr->priority = 0; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_self_iface_get_address(uct_iface_h tl_iface, ++ uct_iface_addr_t *addr) ++{ ++ const uct_self_iface_t *iface = ucs_derived_of(tl_iface, uct_self_iface_t); ++ ++ *(uct_self_iface_addr_t*)addr = iface->id; ++ return UCS_OK; ++} ++ ++static int uct_self_iface_is_reachable(const uct_iface_h tl_iface, ++ const uct_device_addr_t *dev_addr, ++ const uct_iface_addr_t *iface_addr) ++{ ++ const uct_self_iface_t *iface = ucs_derived_of(tl_iface, uct_self_iface_t); ++ const uct_self_iface_addr_t *addr = (const uct_self_iface_addr_t*)iface_addr; ++ ++ return (addr != NULL) && (iface->id == *addr); ++} ++ ++static void uct_self_iface_sendrecv_am(uct_self_iface_t *iface, uint8_t am_id, ++ void *buffer, size_t length, const char *title) ++{ ++ ucs_status_t UCS_V_UNUSED status; ++ ++ uct_iface_trace_am(&iface->super, UCT_AM_TRACE_TYPE_SEND, am_id, ++ buffer, length, "TX: AM_%s", title); ++ uct_iface_trace_am(&iface->super, UCT_AM_TRACE_TYPE_RECV, am_id, ++ buffer, length, "RX: AM_%s", title); ++ ++ status = uct_iface_invoke_am(&iface->super, am_id, buffer, ++ length, 0); ++ ucs_assert(status == UCS_OK); ++ ucs_mpool_put_inline(buffer); ++} ++ ++static ucs_mpool_ops_t uct_self_iface_mpool_ops = { ++ .chunk_alloc = ucs_mpool_chunk_malloc, ++ .chunk_release = ucs_mpool_chunk_free, ++ .obj_init = NULL, ++ .obj_cleanup = NULL ++}; ++ ++static UCS_CLASS_DEFINE_DELETE_FUNC(uct_self_iface_t, uct_iface_t); ++ ++static UCS_CLASS_INIT_FUNC(uct_self_iface_t, uct_md_h md, uct_worker_h worker, ++ const uct_iface_params_t *params, ++ const uct_iface_config_t *tl_config) ++{ ++ ucs_status_t status; ++ ++ if (!(params->open_mode & UCT_IFACE_OPEN_MODE_DEVICE)) { ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ if (ucs_derived_of(worker, uct_priv_worker_t)->thread_mode == UCS_THREAD_MODE_MULTI) { ++ ucs_error("Self transport does not support multi-threaded worker"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ if (strcmp(params->mode.device.dev_name, UCT_SELF_NAME) != 0) { ++ ucs_error("No device was found: %s", params->mode.device.dev_name); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &uct_self_iface_ops, md, worker, ++ params, tl_config UCS_STATS_ARG(params->stats_root) ++ UCS_STATS_ARG(UCT_SELF_NAME)); ++ ++ self->id = ucs_generate_uuid((uintptr_t)self); ++ self->send_size = tl_config->max_bcopy; ++ ++ status = ucs_mpool_init(&self->msg_mp, 0, self->send_size, 0, ++ UCS_SYS_CACHE_LINE_SIZE, ++ 2, /* 2 elements are enough for most of communications */ ++ UINT_MAX, &uct_self_iface_mpool_ops, "self_msg_desc"); ++ ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ ucs_debug("created self iface id 0x%lx send_size %zu", self->id, ++ self->send_size); ++ return UCS_OK; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(uct_self_iface_t) ++{ ++ ucs_mpool_cleanup(&self->msg_mp, 1); ++} ++ ++UCS_CLASS_DEFINE(uct_self_iface_t, uct_base_iface_t); ++static UCS_CLASS_DEFINE_NEW_FUNC(uct_self_iface_t, uct_iface_t, uct_md_h, ++ uct_worker_h, const uct_iface_params_t*, ++ const uct_iface_config_t*); ++ ++static ucs_status_t uct_self_query_tl_resources(uct_md_h md, ++ uct_tl_resource_desc_t **resource_p, ++ unsigned *num_resources_p) ++{ ++ uct_tl_resource_desc_t *resource = 0; ++ ++ ucs_trace_func("md=%p", md); ++ ++ resource = ucs_calloc(1, sizeof(*resource), "resource desc"); ++ if (NULL == resource) { ++ ucs_error("Failed to allocate memory"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ ucs_snprintf_zero(resource->tl_name, sizeof(resource->tl_name), "%s", ++ UCT_SELF_NAME); ++ ucs_snprintf_zero(resource->dev_name, sizeof(resource->dev_name), "%s", ++ UCT_SELF_NAME); ++ resource->dev_type = UCT_DEVICE_TYPE_SELF; ++ ++ *num_resources_p = 1; ++ *resource_p = resource; ++ return UCS_OK; ++} ++ ++static UCS_CLASS_INIT_FUNC(uct_self_ep_t, uct_iface_t *tl_iface, ++ const uct_device_addr_t *dev_addr, ++ const uct_iface_addr_t *iface_addr) ++{ ++ uct_self_iface_t *iface = ucs_derived_of(tl_iface, uct_self_iface_t); ++ ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &iface->super) ++ return UCS_OK; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(uct_self_ep_t) ++{ ++} ++ ++UCS_CLASS_DEFINE(uct_self_ep_t, uct_base_ep_t); ++UCS_CLASS_DEFINE_NEW_FUNC(uct_self_ep_t, uct_ep_t, uct_iface_t *, ++ const uct_device_addr_t *, const uct_iface_addr_t *); ++UCS_CLASS_DEFINE_DELETE_FUNC(uct_self_ep_t, uct_ep_t); ++ ++ ++ucs_status_t uct_self_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t header, ++ const void *payload, unsigned length) ++{ ++ uct_self_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_self_iface_t); ++ uct_self_ep_t UCS_V_UNUSED *ep = ucs_derived_of(tl_ep, uct_self_ep_t); ++ size_t total_length; ++ void *send_buffer; ++ ++ UCT_CHECK_AM_ID(id); ++ ++ total_length = length + sizeof(header); ++ UCT_CHECK_LENGTH(total_length, 0, iface->send_size, "am_short"); ++ ++ send_buffer = UCT_SELF_IFACE_SEND_BUFFER_GET(iface); ++ *(uint64_t*)send_buffer = header; ++ memcpy(send_buffer + sizeof(uint64_t), payload, length); ++ ++ UCT_TL_EP_STAT_OP(&ep->super, AM, SHORT, total_length); ++ uct_self_iface_sendrecv_am(iface, id, send_buffer, total_length, "SHORT"); ++ return UCS_OK; ++} ++ ++ssize_t uct_self_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, ++ uct_pack_callback_t pack_cb, void *arg, ++ unsigned flags) ++{ ++ uct_self_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_self_iface_t); ++ uct_self_ep_t UCS_V_UNUSED *ep = ucs_derived_of(tl_ep, uct_self_ep_t); ++ size_t length; ++ void *send_buffer; ++ ++ UCT_CHECK_AM_ID(id); ++ ++ send_buffer = UCT_SELF_IFACE_SEND_BUFFER_GET(iface); ++ length = pack_cb(send_buffer, arg); ++ ++ UCT_CHECK_LENGTH(length, 0, iface->send_size, "am_bcopy"); ++ UCT_TL_EP_STAT_OP(&ep->super, AM, BCOPY, length); ++ ++ uct_self_iface_sendrecv_am(iface, id, send_buffer, length, "BCOPY"); ++ return length; ++} ++ ++static uct_iface_ops_t uct_self_iface_ops = { ++ .ep_put_short = uct_sm_ep_put_short, ++ .ep_put_bcopy = uct_sm_ep_put_bcopy, ++ .ep_get_bcopy = uct_sm_ep_get_bcopy, ++ .ep_am_short = uct_self_ep_am_short, ++ .ep_am_bcopy = uct_self_ep_am_bcopy, ++ .ep_atomic_cswap64 = uct_sm_ep_atomic_cswap64, ++ .ep_atomic64_post = uct_sm_ep_atomic64_post, ++ .ep_atomic64_fetch = uct_sm_ep_atomic64_fetch, ++ .ep_atomic_cswap32 = uct_sm_ep_atomic_cswap32, ++ .ep_atomic32_post = uct_sm_ep_atomic32_post, ++ .ep_atomic32_fetch = uct_sm_ep_atomic32_fetch, ++ .ep_flush = uct_base_ep_flush, ++ .ep_fence = uct_base_ep_fence, ++ .ep_check = ucs_empty_function_return_success, ++ .ep_pending_add = ucs_empty_function_return_busy, ++ .ep_pending_purge = ucs_empty_function, ++ .ep_create_connected = UCS_CLASS_NEW_FUNC_NAME(uct_self_ep_t), ++ .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_self_ep_t), ++ .iface_flush = uct_base_iface_flush, ++ .iface_fence = uct_base_iface_fence, ++ .iface_progress_enable = ucs_empty_function, ++ .iface_progress_disable = ucs_empty_function, ++ .iface_progress = ucs_empty_function_return_zero, ++ .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_self_iface_t), ++ .iface_query = uct_self_iface_query, ++ .iface_get_device_address = ucs_empty_function_return_success, ++ .iface_get_address = uct_self_iface_get_address, ++ .iface_is_reachable = uct_self_iface_is_reachable ++}; ++ ++UCT_TL_COMPONENT_DEFINE(uct_self_tl, uct_self_query_tl_resources, uct_self_iface_t, ++ UCT_SELF_NAME, "SELF_", uct_iface_config_table, uct_iface_config_t); ++UCT_MD_REGISTER_TL(&uct_self_md, &uct_self_tl); ++ ++static ucs_status_t uct_self_md_query(uct_md_h md, uct_md_attr_t *attr) ++{ ++ /* Dummy memory registration provided. No real memory handling exists */ ++ attr->cap.flags = UCT_MD_FLAG_REG | ++ UCT_MD_FLAG_NEED_RKEY; /* TODO ignore rkey in rma/amo ops */ ++ attr->cap.reg_mem_types = UCS_BIT(UCT_MD_MEM_TYPE_HOST); ++ attr->cap.mem_type = UCT_MD_MEM_TYPE_HOST; ++ attr->cap.max_alloc = 0; ++ attr->cap.max_reg = ULONG_MAX; ++ attr->rkey_packed_size = 0; /* uct_md_query adds UCT_MD_COMPONENT_NAME_MAX to this */ ++ attr->reg_cost.overhead = 0; ++ attr->reg_cost.growth = 0; ++ memset(&attr->local_cpus, 0xff, sizeof(attr->local_cpus)); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_self_query_md_resources(uct_md_resource_desc_t **resources_p, ++ unsigned *num_resources_p) ++{ ++ return uct_single_md_resource(&uct_self_md, resources_p, num_resources_p); ++} ++ ++static ucs_status_t uct_self_mem_reg(uct_md_h md, void *address, size_t length, ++ unsigned flags, uct_mem_h *memh_p) ++{ ++ /* We have to emulate memory registration. Return dummy pointer */ ++ *memh_p = (void *) 0xdeadbeef; ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_self_md_open(const char *md_name, const uct_md_config_t *md_config, ++ uct_md_h *md_p) ++{ ++ static uct_md_ops_t md_ops = { ++ .close = (void*)ucs_empty_function, ++ .query = uct_self_md_query, ++ .mkey_pack = ucs_empty_function_return_success, ++ .mem_reg = uct_self_mem_reg, ++ .mem_dereg = ucs_empty_function_return_success, ++ .is_mem_type_owned = (void *)ucs_empty_function_return_zero, ++ }; ++ static uct_md_t md = { ++ .ops = &md_ops, ++ .component = &uct_self_md ++ }; ++ ++ *md_p = &md; ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_self_md_rkey_unpack(uct_md_component_t *mdc, ++ const void *rkey_buffer, uct_rkey_t *rkey_p, ++ void **handle_p) ++{ ++ /** ++ * Pseudo stub function for the key unpacking ++ * Need rkey == 0 due to work with same process to reuse uct_base_[put|get|atomic]* ++ */ ++ *rkey_p = 0; ++ *handle_p = NULL; ++ return UCS_OK; ++} ++ ++static UCT_MD_COMPONENT_DEFINE(uct_self_md, UCT_SELF_NAME, ++ uct_self_query_md_resources, uct_self_md_open, NULL, ++ uct_self_md_rkey_unpack, ++ ucs_empty_function_return_success, "SELF_", ++ uct_md_config_table, uct_md_config_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.h +new file mode 100644 +index 0000000..21c4bf9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.h +@@ -0,0 +1,30 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_SELF_H ++#define UCT_SELF_H ++ ++#include ++#include ++ ++ ++typedef uint64_t uct_self_iface_addr_t; ++ ++ ++typedef struct uct_self_iface { ++ uct_base_iface_t super; ++ uct_self_iface_addr_t id; /* Unique identifier for the instance */ ++ size_t send_size; /* Maximum size for payload */ ++ ucs_mpool_t msg_mp; /* Messages memory pool */ ++} uct_self_iface_t; ++ ++ ++typedef struct uct_self_ep { ++ uct_base_ep_t super; ++} uct_self_ep_t; ++ ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.c +deleted file mode 100644 +index d692f41..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.c ++++ /dev/null +@@ -1,128 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#include "self_ep.h" +-#include "self_iface.h" +- +-static UCS_CLASS_INIT_FUNC(uct_self_ep_t, uct_iface_t *tl_iface, +- const uct_device_addr_t *dev_addr, +- const uct_iface_addr_t *iface_addr) +-{ +- uct_self_iface_t *local_iface = 0; +- +- ucs_trace_func("Creating an EP for loop-back transport self=%p", self); +- local_iface = ucs_derived_of(tl_iface, uct_self_iface_t); +- UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &local_iface->super) +- return UCS_OK; +-} +- +-static UCS_CLASS_CLEANUP_FUNC(uct_self_ep_t) +-{ +- ucs_trace_func("self=%p", self); +-} +- +-UCS_CLASS_DEFINE(uct_self_ep_t, uct_base_ep_t); +-UCS_CLASS_DEFINE_NEW_FUNC(uct_self_ep_t, uct_ep_t, uct_iface_t *, +- const uct_device_addr_t *, const uct_iface_addr_t *); +-UCS_CLASS_DEFINE_DELETE_FUNC(uct_self_ep_t, uct_ep_t); +- +-/** +- * Reserve the buffer and set the descriptor empty for later initialization +- * in case if UCS_ERR_NO_RESOURCE obtained from active message handler +- */ +-static void UCS_F_ALWAYS_INLINE uct_self_ep_am_reserve_buffer(uct_self_iface_t *self_iface, +- void *desc) +-{ +- uct_recv_desc(desc) = &self_iface->release_desc; +-} +- +-ucs_status_t uct_self_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t header, +- const void *payload, unsigned length) +-{ +- ucs_status_t status; +- uct_self_iface_t *self_iface = 0; +- uct_self_ep_t *self_ep = 0; +- void *desc = 0, *p_data = 0; +- unsigned total_length = 0; +- uct_recv_desc_t *cur_desc; +- +- self_ep = ucs_derived_of(tl_ep, uct_self_ep_t); +- self_iface = ucs_derived_of(self_ep->super.super.iface, uct_self_iface_t); +- total_length = length + sizeof(header); +- +- /* Send part */ +- UCT_CHECK_AM_ID(id); +- UCT_CHECK_LENGTH(total_length, 0, self_iface->data_length, "am_short"); +- UCT_TL_IFACE_GET_TX_DESC(&self_iface->super, &self_iface->msg_desc_mp, +- cur_desc, return UCS_ERR_NO_MEMORY); +- +- desc = cur_desc + 1; +- p_data = desc + self_iface->rx_headroom; +- *(typeof(header)*) p_data = header; +- memcpy(p_data + sizeof(header), payload, length); +- +- UCT_TL_EP_STAT_OP(&self_ep->super, AM, SHORT, total_length); +- uct_iface_trace_am(&self_iface->super, UCT_AM_TRACE_TYPE_SEND, id, p_data, +- total_length, "TX: AM_SHORT"); +- +- /* Receive part */ +- uct_iface_trace_am(&self_iface->super, UCT_AM_TRACE_TYPE_RECV, id, p_data, +- total_length, "RX: AM_SHORT"); +- status = uct_iface_invoke_am(&self_iface->super, id, p_data, total_length, +- UCT_CB_PARAM_FLAG_DESC); +- +- if (ucs_unlikely(UCS_INPROGRESS == status)) { +- uct_self_ep_am_reserve_buffer(self_iface, desc); +- status = UCS_OK; +- } else { +- UCT_TL_IFACE_PUT_DESC(cur_desc); +- } +- +- return status; +-} +- +-ssize_t uct_self_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, +- uct_pack_callback_t pack_cb, void *arg, +- unsigned flags) +-{ +- ucs_status_t status; +- uct_self_iface_t *self_iface = 0; +- uct_self_ep_t *self_ep = 0; +- void *desc = 0, *payload = 0; +- ssize_t length = 0; +- uct_recv_desc_t *cur_desc; +- +- self_ep = ucs_derived_of(tl_ep, uct_self_ep_t); +- self_iface = ucs_derived_of(self_ep->super.super.iface, uct_self_iface_t); +- +- /* Send part */ +- UCT_CHECK_AM_ID(id); +- UCT_TL_IFACE_GET_TX_DESC(&self_iface->super, &self_iface->msg_desc_mp, +- cur_desc, return UCS_ERR_NO_MEMORY); +- +- desc = cur_desc + 1; +- payload = desc + self_iface->rx_headroom; +- length = pack_cb(payload, arg); +- +- UCT_CHECK_LENGTH(length, 0, self_iface->data_length, "am_bcopy"); +- UCT_TL_EP_STAT_OP(&self_ep->super, AM, BCOPY, length); +- uct_iface_trace_am(&self_iface->super, UCT_AM_TRACE_TYPE_SEND, id, payload, +- length, "TX: AM_BCOPY"); +- +- /* Receive part */ +- uct_iface_trace_am(&self_iface->super, UCT_AM_TRACE_TYPE_RECV, id, payload, +- length, "RX: AM_BCOPY"); +- status = uct_iface_invoke_am(&self_iface->super, id, payload, length, +- UCT_CB_PARAM_FLAG_DESC); +- +- if (ucs_unlikely(UCS_INPROGRESS == status)) { +- uct_self_ep_am_reserve_buffer(self_iface, desc); +- status = UCS_OK; +- } else { +- UCT_TL_IFACE_PUT_DESC(cur_desc); +- } +- +- return length; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.h +deleted file mode 100644 +index de28130..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.h ++++ /dev/null +@@ -1,28 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#ifndef UCT_SELF_EP_H +-#define UCT_SELF_EP_H +- +-#include +- +- +-typedef struct uct_self_ep { +- uct_base_ep_t super; +-} uct_self_ep_t; +- +-UCS_CLASS_DECLARE_NEW_FUNC(uct_self_ep_t, uct_ep_t, uct_iface_t *, +- const uct_device_addr_t *, const uct_iface_addr_t *); +-UCS_CLASS_DECLARE_DELETE_FUNC(uct_self_ep_t, uct_ep_t); +- +-ucs_status_t uct_self_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t header, +- const void *payload, unsigned length); +-ssize_t uct_self_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, +- uct_pack_callback_t pack_cb, void *arg, +- unsigned flags); +- +-ucs_status_t uct_self_ep_check(uct_ep_h ep, unsigned flags, uct_completion_t *comp); +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.c +deleted file mode 100644 +index 6c81f2f..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.c ++++ /dev/null +@@ -1,243 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#include "self_iface.h" +-#include "self_md.h" +-#include "self_ep.h" +- +-#include +-#include +-#include +- +- +-static ucs_config_field_t uct_self_iface_config_table[] = { +- {"", "", NULL, +- ucs_offsetof(uct_self_iface_config_t, super), +- UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, +- +- UCT_IFACE_MPOOL_CONFIG_FIELDS("", 16384, 16, "", +- ucs_offsetof(uct_self_iface_config_t, mp), ""), +- +- {NULL} +-}; +- +-static ucs_status_t uct_self_iface_query(uct_iface_h iface, uct_iface_attr_t *attr) +-{ +- uct_self_iface_t *self_iface = ucs_derived_of(iface, uct_self_iface_t); +- +- ucs_trace_func("iface=%p", iface); +- memset(attr, 0, sizeof(*attr)); +- +- attr->iface_addr_len = sizeof(uct_self_iface_addr_t); +- attr->device_addr_len = 0; +- attr->ep_addr_len = 0; /* No UCT_IFACE_FLAG_CONNECT_TO_EP supported */ +- attr->max_conn_priv = 0; +- attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | +- UCT_IFACE_FLAG_AM_SHORT | +- UCT_IFACE_FLAG_AM_BCOPY | +- UCT_IFACE_FLAG_PUT_SHORT | +- UCT_IFACE_FLAG_PUT_BCOPY | +- UCT_IFACE_FLAG_GET_BCOPY | +- UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CPU | +- UCT_IFACE_FLAG_PENDING | +- UCT_IFACE_FLAG_CB_SYNC | +- UCT_IFACE_FLAG_EP_CHECK; +- +- attr->cap.put.max_short = UINT_MAX; +- attr->cap.put.max_bcopy = SIZE_MAX; +- attr->cap.put.min_zcopy = 0; +- attr->cap.put.max_zcopy = 0; +- attr->cap.put.opt_zcopy_align = UCS_SYS_CACHE_LINE_SIZE; +- attr->cap.put.align_mtu = attr->cap.put.opt_zcopy_align; +- attr->cap.put.max_iov = 1; +- +- attr->cap.get.max_bcopy = SIZE_MAX; +- attr->cap.get.min_zcopy = 0; +- attr->cap.get.max_zcopy = 0; +- attr->cap.get.opt_zcopy_align = UCS_SYS_CACHE_LINE_SIZE; +- attr->cap.get.align_mtu = attr->cap.get.opt_zcopy_align; +- attr->cap.get.max_iov = 1; +- +- attr->cap.am.max_short = self_iface->data_length; +- attr->cap.am.max_bcopy = self_iface->data_length; +- attr->cap.am.min_zcopy = 0; +- attr->cap.am.max_zcopy = 0; +- attr->cap.am.opt_zcopy_align = UCS_SYS_CACHE_LINE_SIZE; +- attr->cap.am.align_mtu = attr->cap.am.opt_zcopy_align; +- attr->cap.am.max_hdr = 0; +- attr->cap.am.max_iov = 1; +- +- attr->latency.overhead = 0; +- attr->latency.growth = 0; +- attr->bandwidth = 6911 * 1024.0 * 1024.0; +- attr->overhead = 10e-9; +- attr->priority = 0; +- +- return UCS_OK; +-} +- +-static ucs_status_t uct_self_iface_get_address(uct_iface_h iface, +- uct_iface_addr_t *addr) +-{ +- const uct_self_iface_t *self_iface = 0; +- +- ucs_trace_func("iface=%p", iface); +- self_iface = ucs_derived_of(iface, uct_self_iface_t); +- *(uct_self_iface_addr_t*)addr = self_iface->id; +- return UCS_OK; +-} +- +-static int uct_self_iface_is_reachable(const uct_iface_h iface, const uct_device_addr_t *dev_addr, +- const uct_iface_addr_t *iface_addr) +-{ +- const uct_self_iface_t *self_iface = NULL; +- const uct_self_iface_addr_t *self_addr = NULL; +- +- if (NULL == iface_addr) { +- return 0; +- } +- self_iface = ucs_derived_of(iface, uct_self_iface_t); +- self_addr = (const uct_self_iface_addr_t *) iface_addr; +- ucs_trace_func("iface=%p id=%lx addr=%lx", iface, self_iface->id, *self_addr); +- return self_iface->id == *self_addr; +-} +- +-static void uct_self_iface_release_desc(uct_recv_desc_t *self, void *desc) +-{ +- uct_recv_desc_t *self_desc = (uct_recv_desc_t *)desc - 1; +- ucs_mpool_put(self_desc); +-} +- +-static UCS_CLASS_DEFINE_DELETE_FUNC(uct_self_iface_t, uct_iface_t); +- +-static uct_iface_ops_t uct_self_iface_ops = { +- .ep_put_short = uct_sm_ep_put_short, +- .ep_put_bcopy = uct_sm_ep_put_bcopy, +- .ep_get_bcopy = uct_sm_ep_get_bcopy, +- .ep_am_short = uct_self_ep_am_short, +- .ep_am_bcopy = uct_self_ep_am_bcopy, +- .ep_atomic_add64 = uct_sm_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_sm_ep_atomic_fadd64, +- .ep_atomic_cswap64 = uct_sm_ep_atomic_cswap64, +- .ep_atomic_swap64 = uct_sm_ep_atomic_swap64, +- .ep_atomic_add32 = uct_sm_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_sm_ep_atomic_fadd32, +- .ep_atomic_cswap32 = uct_sm_ep_atomic_cswap32, +- .ep_atomic_swap32 = uct_sm_ep_atomic_swap32, +- .ep_flush = uct_base_ep_flush, +- .ep_fence = uct_base_ep_fence, +- .ep_check = ucs_empty_function_return_success, +- .ep_pending_add = ucs_empty_function_return_busy, +- .ep_pending_purge = ucs_empty_function, +- .ep_create_connected = UCS_CLASS_NEW_FUNC_NAME(uct_self_ep_t), +- .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_self_ep_t), +- .iface_flush = uct_base_iface_flush, +- .iface_fence = uct_base_iface_fence, +- .iface_progress_enable = ucs_empty_function, +- .iface_progress_disable = ucs_empty_function, +- .iface_progress = ucs_empty_function_return_zero, +- .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_self_iface_t), +- .iface_query = uct_self_iface_query, +- .iface_get_device_address = ucs_empty_function_return_success, +- .iface_get_address = uct_self_iface_get_address, +- .iface_is_reachable = uct_self_iface_is_reachable +-}; +- +-static UCS_CLASS_INIT_FUNC(uct_self_iface_t, uct_md_h md, uct_worker_h worker, +- const uct_iface_params_t *params, +- const uct_iface_config_t *tl_config) +-{ +- ucs_status_t status; +- uct_self_iface_config_t *self_config = 0; +- +- ucs_trace_func("Creating a loop-back transport self=%p rxh=%lu", +- self, params->rx_headroom); +- +- ucs_assert(params->open_mode & UCT_IFACE_OPEN_MODE_DEVICE); +- +- if (strcmp(params->mode.device.dev_name, UCT_SELF_NAME) != 0) { +- ucs_error("No device was found: %s", params->mode.device.dev_name); +- return UCS_ERR_NO_DEVICE; +- } +- +- UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &uct_self_iface_ops, md, worker, +- params, tl_config UCS_STATS_ARG(params->stats_root) +- UCS_STATS_ARG(UCT_SELF_NAME)); +- +- self_config = ucs_derived_of(tl_config, uct_self_iface_config_t); +- +- self->id = ucs_generate_uuid((uintptr_t)self); +- self->rx_headroom = params->rx_headroom; +- self->data_length = self_config->super.max_bcopy; +- self->release_desc.cb = uct_self_iface_release_desc; +- +- /* create a memory pool for data transferred */ +- status = uct_iface_mpool_init(&self->super, +- &self->msg_desc_mp, +- sizeof(uct_recv_desc_t) + self->rx_headroom + +- self->data_length, +- sizeof(uct_recv_desc_t) + self->rx_headroom, +- UCS_SYS_CACHE_LINE_SIZE, +- &self_config->mp, +- 256, +- ucs_empty_function, +- "self_msg_desc"); +- if (UCS_OK != status) { +- ucs_error("Failed to create a memory pool for the loop-back transport"); +- return status; +- } +- +- ucs_debug("Created a loop-back iface. id=0x%lx, len=%u, tx_hdr=%lu", +- self->id, self->data_length, self->rx_headroom); +- return UCS_OK; +-} +- +-static UCS_CLASS_CLEANUP_FUNC(uct_self_iface_t) +-{ +- ucs_trace_func("self=%p", self); +- +- ucs_mpool_cleanup(&self->msg_desc_mp, 1); +-} +- +-UCS_CLASS_DEFINE(uct_self_iface_t, uct_base_iface_t); +-static UCS_CLASS_DEFINE_NEW_FUNC(uct_self_iface_t, uct_iface_t, uct_md_h, +- uct_worker_h, const uct_iface_params_t*, +- const uct_iface_config_t*); +- +-static ucs_status_t uct_self_query_tl_resources(uct_md_h md, +- uct_tl_resource_desc_t **resource_p, +- unsigned *num_resources_p) +-{ +- uct_tl_resource_desc_t *resource = 0; +- +- ucs_trace_func("md=%p", md); +- resource = ucs_calloc(1, sizeof(*resource), "resource desc"); +- if (NULL == resource) { +- ucs_error("Failed to allocate memory"); +- return UCS_ERR_NO_MEMORY; +- } +- +- ucs_snprintf_zero(resource->tl_name, sizeof(resource->tl_name), "%s", +- UCT_SELF_NAME); +- ucs_snprintf_zero(resource->dev_name, sizeof(resource->dev_name), "%s", +- UCT_SELF_NAME); +- resource->dev_type = UCT_DEVICE_TYPE_SELF; +- +- *num_resources_p = 1; +- *resource_p = resource; +- return UCS_OK; +-} +- +-UCT_TL_COMPONENT_DEFINE(uct_self_tl, uct_self_query_tl_resources, uct_self_iface_t, +- UCT_SELF_NAME, "SELF_", uct_self_iface_config_table, uct_self_iface_config_t); +-UCT_MD_REGISTER_TL(&uct_self_md, &uct_self_tl); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.h +deleted file mode 100644 +index 7726927..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.h ++++ /dev/null +@@ -1,30 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#ifndef UCT_SELF_IFACE_H +-#define UCT_SELF_IFACE_H +- +-#include +-#include +- +-typedef uint64_t uct_self_iface_addr_t; +- +-typedef struct uct_self_iface { +- uct_base_iface_t super; +- uct_self_iface_addr_t id; /* Unique identifier for the instance */ +- size_t rx_headroom; /* User data size precedes payload */ +- unsigned data_length; /* Maximum size for payload */ +- uct_recv_desc_t release_desc; /* Callback to desc release func */ +- ucs_mpool_t msg_desc_mp; /* Messages memory pool */ +-} UCS_V_ALIGNED(UCS_SYS_CACHE_LINE_SIZE) uct_self_iface_t; +- +-typedef struct uct_self_iface_config { +- uct_iface_config_t super; +- uct_iface_mpool_config_t mp; +-} uct_self_iface_config_t; +- +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.c +deleted file mode 100644 +index 01641b4..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.c ++++ /dev/null +@@ -1,76 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#include "self_md.h" +- +- +-static ucs_status_t uct_self_md_query(uct_md_h md, uct_md_attr_t *attr) +-{ +- /* Dummy memory registration provided. No real memory handling exists */ +- attr->cap.flags = UCT_MD_FLAG_REG | +- UCT_MD_FLAG_NEED_RKEY; /* TODO ignore rkey in rma/amo ops */ +- attr->cap.reg_mem_types = UCS_BIT(UCT_MD_MEM_TYPE_HOST); +- attr->cap.mem_type = UCT_MD_MEM_TYPE_HOST; +- attr->cap.max_alloc = 0; +- attr->cap.max_reg = ULONG_MAX; +- attr->rkey_packed_size = 0; /* uct_md_query adds UCT_MD_COMPONENT_NAME_MAX to this */ +- attr->reg_cost.overhead = 0; +- attr->reg_cost.growth = 0; +- memset(&attr->local_cpus, 0xff, sizeof(attr->local_cpus)); +- return UCS_OK; +-} +- +-static ucs_status_t uct_self_query_md_resources(uct_md_resource_desc_t **resources_p, +- unsigned *num_resources_p) +-{ +- return uct_single_md_resource(&uct_self_md, resources_p, num_resources_p); +-} +- +-static ucs_status_t uct_self_mem_reg(uct_md_h md, void *address, size_t length, +- unsigned flags, uct_mem_h *memh_p) +-{ +- /* We have to emulate memory registration. Return dummy pointer */ +- *memh_p = (void *) 0xdeadbeef; +- return UCS_OK; +-} +- +-static ucs_status_t uct_self_md_open(const char *md_name, const uct_md_config_t *md_config, +- uct_md_h *md_p) +-{ +- static uct_md_ops_t md_ops = { +- .close = (void*)ucs_empty_function, +- .query = uct_self_md_query, +- .mkey_pack = ucs_empty_function_return_success, +- .mem_reg = uct_self_mem_reg, +- .mem_dereg = ucs_empty_function_return_success, +- .is_mem_type_owned = (void *)ucs_empty_function_return_zero, +- }; +- static uct_md_t md = { +- .ops = &md_ops, +- .component = &uct_self_md +- }; +- +- *md_p = &md; +- return UCS_OK; +-} +-/** +- * Pseudo stub function for the key unpacking +- * Need rkey == 0 due to work with same process to reuse uct_base_[put|get|atomic]* +- */ +-static ucs_status_t uct_self_md_rkey_unpack(uct_md_component_t *mdc, +- const void *rkey_buffer, uct_rkey_t *rkey_p, +- void **handle_p) +-{ +- *rkey_p = 0; +- *handle_p = NULL; +- return UCS_OK; +-} +- +-UCT_MD_COMPONENT_DEFINE(uct_self_md, UCT_SELF_NAME, +- uct_self_query_md_resources, uct_self_md_open, NULL, +- uct_self_md_rkey_unpack, +- ucs_empty_function_return_success, "SELF_", +- uct_md_config_table, uct_md_config_t); +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.h +deleted file mode 100644 +index c2ee021..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.h ++++ /dev/null +@@ -1,16 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#ifndef UCT_SELF_MD_H +-#define UCT_SELF_MD_H +- +-#include +- +-#define UCT_SELF_NAME "self" +- +-extern uct_md_component_t uct_self_md; +- +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp.h +index a355e29..4d8aff8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp.h +@@ -120,7 +120,8 @@ ssize_t uct_tcp_ep_am_bcopy(uct_ep_h uct_ep, uint8_t am_id, + uct_pack_callback_t pack_cb, void *arg, + unsigned flags); + +-ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req); ++ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req, ++ unsigned flags); + + void uct_tcp_ep_pending_purge(uct_ep_h tl_ep, uct_pending_purge_callback_t cb, + void *arg); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_ep.c +index 0268b39..b038150 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_ep.c +@@ -209,6 +209,8 @@ unsigned uct_tcp_ep_progress_rx(uct_tcp_ep_t *ep) + + /* Receive next chunk of data */ + recv_length = iface->config.buf_size - ep->length; ++ ucs_assertv(recv_length > 0, "ep=%p", ep); ++ + status = uct_tcp_recv(ep->fd, ep->buf + ep->length, &recv_length); + if (status != UCS_OK) { + if (status == UCS_ERR_CANCELED) { +@@ -225,6 +227,8 @@ unsigned uct_tcp_ep_progress_rx(uct_tcp_ep_t *ep) + /* Parse received active messages */ + while ((remainder = ep->length - ep->offset) >= sizeof(*hdr)) { + hdr = ep->buf + ep->offset; ++ ucs_assert(hdr->length <= (iface->config.buf_size - sizeof(uct_tcp_am_hdr_t))); ++ + if (remainder < sizeof(*hdr) + hdr->length) { + break; + } +@@ -272,6 +276,9 @@ ssize_t uct_tcp_ep_am_bcopy(uct_ep_h uct_ep, uint8_t am_id, + hdr->length = packed_length = pack_cb(hdr + 1, arg); + ep->length = sizeof(*hdr) + packed_length; + ++ UCT_CHECK_LENGTH(hdr->length, 0, ++ iface->config.buf_size - sizeof(uct_tcp_am_hdr_t), ++ "am_bcopy"); + UCT_TL_EP_STAT_OP(&ep->super, AM, BCOPY, hdr->length); + uct_iface_trace_am(&iface->super, UCT_AM_TRACE_TYPE_SEND, hdr->am_id, + hdr + 1, hdr->length, "SEND fd %d", ep->fd); +@@ -284,7 +291,8 @@ ssize_t uct_tcp_ep_am_bcopy(uct_ep_h uct_ep, uint8_t am_id, + return packed_length; + } + +-ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req) ++ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req, ++ unsigned flags) + { + uct_tcp_ep_t *ep = ucs_derived_of(tl_ep, uct_tcp_ep_t); + +@@ -314,7 +322,6 @@ ucs_status_t uct_tcp_ep_flush(uct_ep_h tl_ep, unsigned flags, + return UCS_ERR_NO_RESOURCE; + } + +- ucs_assert(ucs_queue_is_empty(&ep->pending_q)); + UCT_TL_EP_STAT_FLUSH(&ep->super); + return UCS_OK; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_iface.c +index e0bfe8a..68f0e49 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_iface.c +@@ -173,6 +173,14 @@ static ucs_status_t uct_tcp_iface_flush(uct_iface_h tl_iface, unsigned flags, + return UCS_OK; + } + ++static void uct_tcp_iface_listen_close(uct_tcp_iface_t *iface) ++{ ++ if (iface->listen_fd != -1) { ++ close(iface->listen_fd); ++ iface->listen_fd = -1; ++ } ++} ++ + static void uct_tcp_iface_connect_handler(int listen_fd, void *arg) + { + uct_tcp_iface_t *iface = arg; +@@ -189,6 +197,7 @@ static void uct_tcp_iface_connect_handler(int listen_fd, void *arg) + if (fd < 0) { + if ((errno != EAGAIN) && (errno != EINTR)) { + ucs_error("accept() failed: %m"); ++ uct_tcp_iface_listen_close(iface); + } + return; + } +@@ -275,6 +284,11 @@ static UCS_CLASS_INIT_FUNC(uct_tcp_iface_t, uct_md_h md, uct_worker_h worker, + self->sockopt.sndbuf = config->sockopt_sndbuf; + ucs_list_head_init(&self->ep_list); + ++ if (ucs_derived_of(worker, uct_priv_worker_t)->thread_mode == UCS_THREAD_MODE_MULTI) { ++ ucs_error("TCP transport does not support multi-threaded worker"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ + status = uct_tcp_netif_inaddr(self->if_name, &self->config.ifaddr, + &self->config.netmask); + if (status != UCS_OK) { +@@ -366,7 +380,7 @@ static UCS_CLASS_CLEANUP_FUNC(uct_tcp_iface_t) + uct_tcp_ep_destroy(&ep->super.super); + } + +- close(self->listen_fd); ++ uct_tcp_iface_listen_close(self); + close(self->epfd); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_net.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_net.c +index a821388..4aaf880 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_net.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_net.c +@@ -45,10 +45,12 @@ ucs_status_t uct_tcp_netif_caps(const char *if_name, double *latency_p, + ucs_status_t status; + struct ifreq ifr; + size_t mtu, ll_headers; ++ int speed_known; + short ether_type; + + memset(&ifr, 0, sizeof(ifr)); + ++ speed_known = 0; + edata.cmd = ETHTOOL_GSET; + ifr.ifr_data = (void*)&edata; + status = ucs_netif_ioctl(if_name, SIOCETHTOOL, &ifr); +@@ -59,15 +61,15 @@ ucs_status_t uct_tcp_netif_caps(const char *if_name, double *latency_p, + speed_mbps = edata.speed; + #endif + #if HAVE_DECL_SPEED_UNKNOWN +- if (speed_mbps == SPEED_UNKNOWN) { ++ speed_known = speed_mbps != SPEED_UNKNOWN; + #else +- if ((speed_mbps == 0) || ((uint16_t)speed_mbps == (uint16_t)-1)) { ++ speed_known = (speed_mbps != 0) && ((uint16_t)speed_mbps != (uint16_t)-1); + #endif +- ucs_error("speed of %s is UNKNOWN", if_name); +- return UCS_ERR_NO_DEVICE; +- } +- } else { +- speed_mbps = 100; /* Default value if SIOCETHTOOL is not supported */ ++ } ++ ++ if (!speed_known) { ++ speed_mbps = 100; ++ ucs_debug("speed of %s is UNKNOWN, assuming %d Mbps", if_name, speed_mbps); + } + + status = ucs_netif_ioctl(if_name, SIOCGIFHWADDR, &ifr); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_def.h +index 88701e8..c3e9720 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_def.h +@@ -60,7 +60,7 @@ if (uct_ugni_check_lock_needed(_cdm)) { \ + } + #else + #define uct_ugni_cdm_init_lock(x) UCS_OK +-#define uct_ugni_cdm_destroy_lock(x) UCS_OK ++#define uct_ugni_cdm_destroy_lock(x) {} + #define uct_ugni_cdm_lock(x) + #define uct_ugni_cdm_unlock(x) + #define uct_ugni_check_lock_needed(x) 0 +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_device.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_device.c +index 7795f6f..2510652 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_device.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_device.c +@@ -27,7 +27,7 @@ typedef struct uct_ugni_job_info { + int pmi_rank_id; /**< rank id assigned by PMI */ + int num_devices; /**< Number of devices */ + uct_ugni_device_t devices[UCT_UGNI_MAX_DEVICES]; /**< Array of devices */ +- bool initialized; /**< Info status */ ++ int initialized; /**< Info status */ + } uct_ugni_job_info_t; + + static uct_ugni_job_info_t job_info = { +@@ -36,7 +36,7 @@ static uct_ugni_job_info_t job_info = { + .pmi_num_of_ranks = 0, + .pmi_rank_id = 0, + .num_devices = -1, +- .initialized = false, ++ .initialized = 0, + }; + + uint32_t ugni_domain_counter = 0; +@@ -168,7 +168,7 @@ static ucs_status_t uct_ugni_fetch_pmi() + ucs_debug("PMI cookie %d", job_info.cookie); + + /* Context and domain is activated */ +- job_info.initialized = true; ++ job_info.initialized = 1; + ucs_debug("UGNI job info was activated"); + return UCS_OK; + } +@@ -447,12 +447,8 @@ ucs_status_t uct_ugni_create_md_cdm(uct_ugni_cdm_t *cdm) + ucs_status_t uct_ugni_destroy_cdm(uct_ugni_cdm_t *cdm) + { + gni_return_t ugni_rc; +- ucs_status_t status; + +- status = uct_ugni_cdm_destroy_lock(cdm); +- if (UCS_OK != status) { +- ucs_error("Couldn't destroy cdm lock."); +- } ++ uct_ugni_cdm_destroy_lock(cdm); + + ucs_trace_func("cdm=%p", cdm); + ugni_rc = GNI_CdmDestroy(cdm->cdm_handle); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.c +index 51d588a..71125e2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.c +@@ -12,7 +12,8 @@ + SGLIB_DEFINE_LIST_FUNCTIONS(uct_ugni_ep_t, uct_ugni_ep_compare, next); + SGLIB_DEFINE_HASHED_CONTAINER_FUNCTIONS(uct_ugni_ep_t, UCT_UGNI_HASH_SIZE, uct_ugni_ep_hash); + +-ucs_status_t uct_ugni_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n){ ++ucs_status_t uct_ugni_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags){ + uct_ugni_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_iface_t); + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.h +index 53ddb24..52743dd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.h +@@ -35,7 +35,8 @@ UCS_CLASS_DECLARE_DELETE_FUNC(uct_ugni_ep_t, uct_ep_t); + uct_ugni_ep_t *uct_ugni_iface_lookup_ep(uct_ugni_iface_t *iface, uintptr_t hash_key); + ucs_status_t ugni_connect_ep(uct_ugni_iface_t *iface, const uct_devaddr_ugni_t *dev_addr, + const uct_sockaddr_ugni_t *iface_addr, uct_ugni_ep_t *ep); +-ucs_status_t uct_ugni_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n); ++ucs_status_t uct_ugni_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags); + void uct_ugni_ep_pending_purge(uct_ep_h tl_ep, uct_pending_purge_callback_t cb, + void *arg); + ucs_arbiter_cb_result_t uct_ugni_ep_process_pending(ucs_arbiter_t *arbiter, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_types.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_types.h +index 5c2f7ec..23e1447 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_types.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_types.h +@@ -11,7 +11,6 @@ + #include + #include + #include +-#include + + typedef struct uct_ugni_device { + gni_nic_device_t type; /**< Device type */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.c +index 63994f8..486e5b5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.c +@@ -243,51 +243,6 @@ static void uct_ugni_amo_unpack64(uct_completion_t *self, ucs_status_t status) + uct_ugni_invoke_orig_comp(fma, status); + } + +-ucs_status_t uct_ugni_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) +-{ +- uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); +- uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +- uct_ugni_rdma_fetch_desc_t *fma; +- +- UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, +- return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC_ADD, +- add, 0, NULL, remote_addr, +- rkey, LEN_64, ep, NULL, NULL, NULL); +- ucs_trace_data("Posting AMO ADD, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, add, +- (void *)fma->super.desc.remote_addr, +- fma->super.desc.remote_mem_hndl.qword1, +- fma->super.desc.remote_mem_hndl.qword2); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return uct_ugni_post_fma(iface, ep, &fma->super, UCS_OK); +-} +- +-ucs_status_t uct_ugni_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); +- uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +- uct_ugni_rdma_fetch_desc_t *fma; +- +- UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, +- return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC_FADD, +- add, 0, fma + 1, remote_addr, +- rkey, LEN_64, ep, comp, uct_ugni_amo_unpack64, (void *)result); +- ucs_trace_data("Posting AMO FADD, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, add, +- (void *)fma->super.desc.remote_addr, +- fma->super.desc.remote_mem_hndl.qword1, +- fma->super.desc.remote_mem_hndl.qword2); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); +-} +- + ucs_status_t uct_ugni_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp) +@@ -321,9 +276,9 @@ static void uct_ugni_amo_unpack32(uct_completion_t *self, ucs_status_t status) + uct_ugni_invoke_orig_comp(fma, status); + } + +-ucs_status_t uct_ugni_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -331,12 +286,12 @@ ucs_status_t uct_ugni_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FSWAP, +- swap, 0, fma + 1, remote_addr, +- rkey, LEN_64, ep, comp, uct_ugni_amo_unpack64, (void *)result); +- ucs_trace_data("Posting AMO SWAP, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, swap, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FCSWAP_S, ++ (uint64_t)compare, (uint64_t)swap, fma + 1, remote_addr, ++ rkey, LEN_32, ep, comp, uct_ugni_amo_unpack32, (void *)result); ++ ucs_trace_data("Posting AMO CSWAP, GNI_PostFma of size %"PRIx64" value" ++ "%"PRIx32" compare %"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", ++ fma->super.desc.length, swap, compare, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); +@@ -344,8 +299,9 @@ ucs_status_t uct_ugni_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, + return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); + } + +-ucs_status_t uct_ugni_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_ugni_ep_atomic_op32(uct_ep_h tl_ep, uint32_t op, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ gni_fma_cmd_type_t op_type, char *op_str) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -353,12 +309,12 @@ ucs_status_t uct_ugni_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_IADD_S, +- (uint64_t)add, 0, NULL, remote_addr, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, op_type, ++ (uint64_t)op, 0, NULL, remote_addr, + rkey, LEN_32, ep, NULL, NULL, NULL); +- ucs_trace_data("Posting AMO ADD, GNI_PostFma of size %"PRIx64" value" ++ ucs_trace_data("Posting AMO %s, GNI_PostFma of size %"PRIx64" value" + "%"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, add, ++ op_str, fma->super.desc.length, op, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); +@@ -366,9 +322,31 @@ ucs_status_t uct_ugni_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, + return uct_ugni_post_fma(iface, ep, &fma->super, UCS_OK); + } + +-ucs_status_t uct_ugni_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_ugni_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_ugni_ep_atomic_op32(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC2_IADD_S, "ADD"); ++ case UCT_ATOMIC_OP_XOR: ++ return uct_ugni_ep_atomic_op32(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC2_XOR_S, "XOR"); ++ case UCT_ATOMIC_OP_AND: ++ return uct_ugni_ep_atomic_op32(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC2_AND_S, "AND"); ++ case UCT_ATOMIC_OP_OR: ++ return uct_ugni_ep_atomic_op32(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC2_OR_S, "OR"); ++ default: ++ ucs_assertv(0, "incorrect opcode for atomic: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++} ++ ++ucs_status_t uct_ugni_ep_atomic_op64(uct_ep_h tl_ep, uint64_t op, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ gni_fma_cmd_type_t op_type, char *op_str) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -376,22 +354,45 @@ ucs_status_t uct_ugni_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FIADD_S, +- (uint64_t)add, 0, fma + 1, remote_addr, +- rkey, LEN_32, ep, comp, uct_ugni_amo_unpack32, (void *)result); +- ucs_trace_data("Posting AMO FADD, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, add, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, op_type, ++ op, 0, NULL, remote_addr, ++ rkey, LEN_64, ep, NULL, NULL, NULL); ++ ucs_trace_data("Posting AMO %s, GNI_PostFma of size %"PRIx64" value" ++ "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", ++ op_str, fma->super.desc.length, op, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); + UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); ++ return uct_ugni_post_fma(iface, ep, &fma->super, UCS_OK); ++} ++ ++ucs_status_t uct_ugni_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_ugni_ep_atomic_op64(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC_ADD, "ADD"); ++ case UCT_ATOMIC_OP_XOR: ++ return uct_ugni_ep_atomic_op64(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC_XOR, "XOR"); ++ case UCT_ATOMIC_OP_AND: ++ return uct_ugni_ep_atomic_op64(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC_AND, "AND"); ++ case UCT_ATOMIC_OP_OR: ++ return uct_ugni_ep_atomic_op64(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC_OR, "OR"); ++ default: ++ ucs_assertv(0, "incorrect opcode for atomic: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } + } + +-ucs_status_t uct_ugni_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_ugni_ep_atomic_fop64(uct_ep_h tl_ep, uint64_t op, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp, ++ gni_fma_cmd_type_t op_type, char *op_str) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -399,12 +400,12 @@ ucs_status_t uct_ugni_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FSWAP_S, +- (uint64_t)swap, 0, fma + 1, remote_addr, +- rkey, LEN_32, ep, comp, uct_ugni_amo_unpack64, (void *)result); +- ucs_trace_data("Posting AMO SWAP, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, swap, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, op_type, ++ op, 0, fma + 1, remote_addr, ++ rkey, LEN_64, ep, comp, uct_ugni_amo_unpack64, (void *)result); ++ ucs_trace_data("Posting AMO %s, GNI_PostFma of size %"PRIx64" value" ++ "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", ++ op_str, fma->super.desc.length, op, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); +@@ -412,9 +413,37 @@ ucs_status_t uct_ugni_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, + return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); + } + +-ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ucs_status_t uct_ugni_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ uct_completion_t *comp) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC_FADD, "FADD"); ++ case UCT_ATOMIC_OP_SWAP: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FSWAP, "FSWAP"); ++ case UCT_ATOMIC_OP_XOR: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC_FXOR, "FXOR"); ++ case UCT_ATOMIC_OP_AND: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC_FAND, "FAND"); ++ case UCT_ATOMIC_OP_OR: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC_FOR, "FOR"); ++ default: ++ ucs_assertv(0, "incorrect opcode for atomic: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++} ++ ++ucs_status_t uct_ugni_ep_atomic_fop32(uct_ep_h tl_ep, uint32_t op, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp, ++ gni_fma_cmd_type_t op_type, char *op_str) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -422,12 +451,12 @@ ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32 + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FCSWAP_S, +- (uint64_t)compare, (uint64_t)swap, fma + 1, remote_addr, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, op_type, ++ (uint64_t)op, 0, fma + 1, remote_addr, + rkey, LEN_32, ep, comp, uct_ugni_amo_unpack32, (void *)result); +- ucs_trace_data("Posting AMO CSWAP, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx32" compare %"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, swap, compare, ++ ucs_trace_data("Posting AMO %s, GNI_PostFma of size %"PRIx64" value" ++ "%"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", ++ op_str, fma->super.desc.length, op, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); +@@ -435,6 +464,33 @@ ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32 + return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); + } + ++ucs_status_t uct_ugni_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FIADD_S, "ADD"); ++ case UCT_ATOMIC_OP_SWAP: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FSWAP_S, "SWAP"); ++ case UCT_ATOMIC_OP_XOR: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FXOR_S, "XOR"); ++ case UCT_ATOMIC_OP_AND: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FAND_S, "AND"); ++ case UCT_ATOMIC_OP_OR: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FOR_S, "OR"); ++ default: ++ ucs_assertv(0, "incorrect opcode for atomic: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++} ++ + static void uct_ugni_unalign_fma_get_cb(uct_completion_t *self, ucs_status_t status) + { + uct_ugni_rdma_fetch_desc_t *fma = (uct_ugni_rdma_fetch_desc_t *) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.h +index 1466ad9..a8711b8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.h +@@ -45,6 +45,18 @@ ucs_status_t uct_ugni_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, + ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_ugni_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_ugni_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_ugni_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); ++ucs_status_t uct_ugni_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); + ucs_status_t uct_ugni_ep_get_bcopy(uct_ep_h tl_ep, + uct_unpack_callback_t unpack_cb, + void *arg, size_t length, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_iface.c +index a07bdce..77a395e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_iface.c +@@ -62,22 +62,39 @@ static ucs_status_t uct_ugni_rdma_iface_query(uct_iface_h tl_iface, uct_iface_at + iface_attr->cap.flags = UCT_IFACE_FLAG_PUT_SHORT | + UCT_IFACE_FLAG_PUT_BCOPY | + UCT_IFACE_FLAG_PUT_ZCOPY | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_DEVICE | + UCT_IFACE_FLAG_GET_BCOPY | + UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_ATOMIC_DEVICE | + UCT_IFACE_FLAG_PENDING; + ++ iface_attr->cap.atomic64.op_flags = UCS_BIT(UCT_ATOMIC_OP_ADD)| ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ ++ iface_attr->cap.atomic64.fop_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ ++ + if (uct_ugni_check_device_type(&iface->super, GNI_DEVICE_ARIES)) { +- iface_attr->cap.flags |= UCT_IFACE_FLAG_PUT_SHORT | +- UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32; ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_PUT_SHORT; ++ ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_SWAP); ++ iface_attr->cap.atomic32.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ iface_attr->cap.atomic32.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); + } + iface_attr->overhead = 80e-9; /* 80 ns */ + iface_attr->latency.overhead = 900e-9; /* 900 ns */ +@@ -169,14 +186,12 @@ static uct_iface_ops_t uct_ugni_aries_rdma_iface_ops = { + .ep_get_bcopy = uct_ugni_ep_get_bcopy, + .ep_get_zcopy = uct_ugni_ep_get_zcopy, + .ep_am_short = uct_ugni_ep_am_short, +- .ep_atomic_add64 = uct_ugni_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_ugni_ep_atomic_fadd64, + .ep_atomic_cswap64 = uct_ugni_ep_atomic_cswap64, +- .ep_atomic_swap64 = uct_ugni_ep_atomic_swap64, +- .ep_atomic_add32 = uct_ugni_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_ugni_ep_atomic_fadd32, + .ep_atomic_cswap32 = uct_ugni_ep_atomic_cswap32, +- .ep_atomic_swap32 = uct_ugni_ep_atomic_swap32, ++ .ep_atomic64_post = uct_ugni_ep_atomic64_post, ++ .ep_atomic32_post = uct_ugni_ep_atomic32_post, ++ .ep_atomic64_fetch = uct_ugni_ep_atomic64_fetch, ++ .ep_atomic32_fetch = uct_ugni_ep_atomic32_fetch, + .ep_pending_add = uct_ugni_ep_pending_add, + .ep_pending_purge = uct_ugni_ep_pending_purge, + .ep_flush = uct_ugni_ep_flush, +@@ -202,8 +217,6 @@ static uct_iface_ops_t uct_ugni_gemini_rdma_iface_ops = { + .ep_get_bcopy = uct_ugni_ep_get_bcopy, + .ep_get_zcopy = uct_ugni_ep_get_zcopy, + .ep_am_short = uct_ugni_ep_am_short, +- .ep_atomic_add64 = uct_ugni_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_ugni_ep_atomic_fadd64, + .ep_atomic_cswap64 = uct_ugni_ep_atomic_cswap64, + .ep_pending_add = uct_ugni_ep_pending_add, + .ep_pending_purge = uct_ugni_ep_pending_purge, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.c +index aa2ffe2..99c31f4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.c +@@ -11,10 +11,11 @@ + + #define uct_ugni_udt_can_send(_ep) ((uct_ugni_ep_can_send(&_ep->super)) && (_ep->posted_desc == NULL)) + +-ucs_status_t uct_ugni_udt_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n) ++ucs_status_t uct_ugni_udt_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags) + { + uct_ugni_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_iface_t); +- ucs_status_t status = uct_ugni_ep_pending_add(tl_ep, n); ++ ucs_status_t status = uct_ugni_ep_pending_add(tl_ep, n, flags); + + if (UCS_OK == status) { + uct_worker_progress_add_safe(iface->super.worker, uct_ugni_udt_progress, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.h +index 05559e7..48d11de 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.h +@@ -29,7 +29,8 @@ ucs_status_t uct_ugni_udt_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t heade + ssize_t uct_ugni_udt_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + uct_pack_callback_t pack_cb, void *arg, + unsigned flags); +-ucs_status_t uct_ugni_udt_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n); ++ucs_status_t uct_ugni_udt_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags); + ucs_arbiter_cb_result_t uct_ugni_udt_ep_process_pending(ucs_arbiter_t *arbiter, + ucs_arbiter_elem_t *elem, + void *arg); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/apps/Makefile.am +index b4ea055..4341b56 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/apps/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/Makefile.am +@@ -6,23 +6,28 @@ + # See file LICENSE for terms. + # + ++if HAVE_CXX11 ++SUBDIRS = sockaddr ++endif ++ + noinst_PROGRAMS = \ + test_dlopen + + + objdir = $(shell sed -n -e 's/^objdir=\(.*\)$$/\1/p' $(LIBTOOL)) + +-test_dlopen_SOURCES = dlopen.c ++test_dlopen_SOURCES = test_dlopen.c + test_dlopen_CPPFLAGS = $(BASE_CPPFLAGS) -g -DUCP_LIB_PATH=$(abs_top_builddir)/src/ucp/$(objdir)/libucp.so + test_dlopen_CFLAGS = $(BASE_CFLAGS) + test_dlopen_LDADD = -ldl + +-if HAVE_PROFILING +-noinst_PROGRAMS += \ +- test_profiling +- +-test_profiling_SOURCES = profiling.c +-test_profiling_LDADD = $(top_builddir)/src/ucs/libucs.la -lm +-test_profiling_CPPFLAGS = $(BASE_CPPFLAGS) -g -I$(top_srcdir)/src +-test_profiling_CFLAGS = $(BASE_CFLAGS) ++if HAVE_TCMALLOC ++noinst_PROGRAMS += test_tcmalloc ++test_tcmalloc_SOURCES = test_tcmalloc.c ++test_tcmalloc_CPPFLAGS = $(BASE_CPPFLAGS) -g \ ++ -I$(abs_top_builddir)/src \ ++ -I$(abs_top_srcdir)/src ++test_tcmalloc_CFLAGS = $(BASE_CFLAGS) ++test_tcmalloc_LDADD = -ldl $(TCMALLOC_LIB) \ ++ $(top_builddir)/src/ucp/libucp.la + endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/dlopen.c b/src/mpid/ch4/netmod/ucx/ucx/test/apps/dlopen.c +deleted file mode 100644 +index 8ed29f1..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/apps/dlopen.c ++++ /dev/null +@@ -1,29 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#include +-#include +- +-#define _QUOTE(x) #x +-#define QUOTE(x) _QUOTE(x) +- +-int main(int argc, char **argv) +-{ +- const char *filename = QUOTE(UCP_LIB_PATH); +- void *handle; +- +- printf("opening '%s'\n", filename); +- handle = dlopen(filename, RTLD_LAZY); +- if (handle == NULL) { +- fprintf(stderr, "failed to open %s: %m\n", filename); +- return -1; +- } +- +- printf("done\n"); +- dlclose(handle); +- return 0; +-} +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/profiling.c b/src/mpid/ch4/netmod/ucx/ucx/test/apps/profiling.c +deleted file mode 100644 +index 1347205..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/apps/profiling.c ++++ /dev/null +@@ -1,44 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#define HAVE_PROFILING 1 +-#include +- +-#include +- +- +-/* calc_pi() would be profiled */ +-UCS_PROFILE_FUNC(double, calc_pi, (count), int count) { +- double pi_d_4; +- int n; +- +- pi_d_4 = 0.0; +- +- /* Profile a block of code */ +- UCS_PROFILE_CODE("leibnitz") { +- for (n = 0; n < count; ++n) { +- pi_d_4 += pow(-1.0, n) / (2 * n + 1); +- +- /* create a timestamp for each step */ +- UCS_PROFILE_SAMPLE("step"); +- } +- } +- +- return pi_d_4 * 4.0; +-} +- +-/* print_pi() would be profiled */ +-UCS_PROFILE_FUNC_VOID(print_pi, (pi), double pi) { +- /* Call printf() and profile it */ +- UCS_PROFILE_CALL(printf, "PI estimation is %.10f\n", pi); +-} +- +-int main(int argc, char **argv) +-{ +- double pi = calc_pi(10); +- print_pi(pi); +- return 0; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/Makefile.am +new file mode 100644 +index 0000000..7ce7a01 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/Makefile.am +@@ -0,0 +1,23 @@ ++# ++# Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++# ++# See file LICENSE for terms. ++# ++ ++noinst_PROGRAMS = sa ++ ++noinst_HEADERS = \ ++ sa_base.h \ ++ sa_tcp.h \ ++ sa_util.h ++ ++sa_CXXFLAGS = \ ++ -std=c++11 -g -Wall -Werror ++ ++sa_CPPFLAGS = $(BASE_CPPFLAGS) ++ ++sa_SOURCES = \ ++ sa_base.cc \ ++ sa_main.cc \ ++ sa_tcp.cc \ ++ sa_util.cc +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.cc b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.cc +new file mode 100644 +index 0000000..dfb7389 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.cc +@@ -0,0 +1,37 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "sa_base.h" ++#include "sa_tcp.h" ++#include "sa_util.h" ++ ++#include ++ ++ ++connection::~connection() { ++} ++ ++void connection::set_id(uint64_t id) { ++ m_id = id; ++} ++ ++uint64_t connection::id() const { ++ return m_id; ++} ++ ++worker::~worker() { ++} ++ ++std::shared_ptr worker::make(const std::string& mode, ++ const struct sockaddr *listen_addr, ++ socklen_t addrlen) ++{ ++ if (mode == "tcp") { ++ return std::make_shared(listen_addr, addrlen); ++ } else { ++ throw error("invalid mode: " + mode); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.h b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.h +new file mode 100644 +index 0000000..531f044 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.h +@@ -0,0 +1,68 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef SA_BASE_H_ ++#define SA_BASE_H_ ++ ++#include "sa_util.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++/* interface for classes which generate events */ ++class event_source { ++public: ++ virtual void add_to_evpoll(evpoll_set& evpoll) = 0; ++}; ++ ++ ++/* one data connection */ ++class connection : public event_source { ++public: ++ virtual ~connection(); ++ ++ virtual size_t send(const char *buffer, size_t size) = 0; ++ ++ virtual size_t recv(char *buffer, size_t size) = 0; ++ ++ virtual bool is_closed() const = 0; ++ ++ uint64_t id() const; ++ ++protected: ++ void set_id(uint64_t id); ++ ++private: ++ uint64_t m_id; ++}; ++ ++typedef std::shared_ptr conn_ptr_t; ++ ++ ++/* communication context */ ++class worker : public event_source { ++public: ++ typedef std::function conn_handler_t; ++ typedef std::function data_handler_t; ++ ++ virtual ~worker(); ++ ++ virtual conn_ptr_t connect(const struct sockaddr *addr, socklen_t addrlen) = 0; ++ ++ virtual void wait(const evpoll_set& evpoll, conn_handler_t conn_handler, ++ data_handler_t data_handler, int timeout_ms) = 0; ++ ++ /* factory function to create workers of given type */ ++ static std::shared_ptr make(const std::string& mode, ++ const struct sockaddr *listen_addr, ++ socklen_t addrlen); ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_main.cc b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_main.cc +new file mode 100644 +index 0000000..57ccf88 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_main.cc +@@ -0,0 +1,420 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "sa_base.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++class application { ++public: ++ class usage_exception : public error { ++ public: ++ usage_exception(const std::string& message = ""); ++ }; ++ ++ application(int argc, char **argv); ++ ++ int run(); ++ ++ static void usage(const std::string& error); ++ ++private: ++ typedef struct { ++ std::string hostname; ++ int port; ++ } dest_t; ++ ++ typedef std::vector dest_vec_t; ++ ++ enum connection_type { ++ CONNECTION_CLIENT, ++ CONNECTION_SERVER ++ }; ++ ++ struct params { ++ params() : port(0), ++ total_conns(1000), ++ conn_ratio(1.5), ++ request_size(32), ++ response_size(1024) { ++ } ++ ++ std::string mode; ++ int port; ++ int total_conns; ++ double conn_ratio; ++ size_t request_size; ++ size_t response_size; ++ dest_vec_t dests; ++ }; ++ ++ struct connection_state { ++ conn_ptr_t conn_ptr; ++ connection_type conn_type; ++ size_t bytes_sent; ++ size_t bytes_recvd; ++ std::string send_data; ++ std::string recv_data; ++ }; ++ ++ typedef std::shared_ptr conn_state_ptr_t; ++ typedef std::map conn_map_t; ++ ++ void parse_hostfile(const std::string& filename); ++ ++ void initiate_connections(); ++ ++ int max_conns_inflight() const; ++ ++ void create_worker(); ++ ++ void add_connection(conn_ptr_t conn_ptr, connection_type conn_type); ++ ++ conn_ptr_t connect(const dest_t& dst); ++ ++ void advance_connection(conn_state_ptr_t s, uint32_t events); ++ ++ void connection_completed(conn_state_ptr_t s); ++ ++ static void pton(const dest_t& dst, struct sockaddr_storage& saddr, ++ socklen_t &addrlen); ++ ++ template ++ friend typename O::__basic_ostream& operator<<(O& os, connection_type conn_type); ++ ++ params m_params; ++ std::shared_ptr m_worker; ++ evpoll_set m_evpoll; ++ conn_map_t m_connections; ++ int m_num_conns_inflight; ++ int m_num_conns_started; ++}; ++ ++ ++application::usage_exception::usage_exception(const std::string& message) : ++ error(message) { ++}; ++ ++application::application(int argc, char **argv) : m_num_conns_inflight(0), ++ m_num_conns_started(0) { ++ int c; ++ ++ while ( (c = getopt(argc, argv, "p:f:m:r:n:S:s:vh")) != -1 ) { ++ switch (c) { ++ case 'p': ++ m_params.port = atoi(optarg); ++ break; ++ case 'f': ++ parse_hostfile(optarg); ++ break; ++ case 'm': ++ m_params.mode = optarg; ++ break; ++ case 'r': ++ m_params.conn_ratio = atof(optarg); ++ break; ++ case 'n': ++ m_params.total_conns = atoi(optarg); ++ break; ++ case 'S': ++ m_params.request_size = atoi(optarg); ++ break; ++ case 's': ++ m_params.response_size = atoi(optarg); ++ break; ++ case 'v': ++ log::more_verbose(); ++ break; ++ default: ++ throw usage_exception(); ++ } ++ } ++ ++ if (m_params.mode.empty()) { ++ throw usage_exception("missing mode argument"); ++ } ++ ++ if (m_params.dests.empty()) { ++ throw usage_exception("no remote destinations specified"); ++ } ++ ++ if (m_params.port == 0) { ++ throw usage_exception("local port not specified"); ++ } ++} ++ ++int application::run() { ++ LOG_INFO << "starting application with " ++ << max_conns_inflight() << " simultaneous connections, " ++ << m_params.total_conns << " total"; ++ ++ create_worker(); ++ ++ while ((m_num_conns_started > m_params.total_conns) || !m_connections.empty()) { ++ initiate_connections(); ++ m_worker->wait(m_evpoll, ++ [this](conn_ptr_t conn) { ++ LOG_DEBUG << "accepted new connection"; ++ add_connection(conn, CONNECTION_SERVER); ++ }, ++ [this](uint64_t conn_id, uint32_t events) { ++ LOG_DEBUG << "new event on connection id " ++ << conn_id << " events " ++ << ((events & EPOLLIN ) ? "i" : "") ++ << ((events & EPOLLOUT) ? "o" : "") ++ << ((events & EPOLLERR) ? "e" : "") ++ ; ++ advance_connection(m_connections.at(conn_id), events); ++ }, ++ -1); ++ } ++ ++ LOG_INFO << "all connections completed"; ++ ++ m_worker.reset(); ++ return 0; ++} ++ ++void application::create_worker() { ++ struct sockaddr_in inaddr_any; ++ memset(&inaddr_any, 0, sizeof(inaddr_any)); ++ inaddr_any.sin_family = AF_INET; ++ inaddr_any.sin_port = htons(m_params.port); ++ inaddr_any.sin_addr.s_addr = INADDR_ANY; ++ ++ m_worker = worker::make(m_params.mode, reinterpret_cast(&inaddr_any), ++ sizeof(inaddr_any)); ++ m_worker->add_to_evpoll(m_evpoll); ++} ++ ++std::shared_ptr application::connect(const dest_t& dst) { ++ struct sockaddr_storage saddr; ++ socklen_t addrlen; ++ pton(dst, saddr, addrlen); ++ return m_worker->connect(reinterpret_cast(&saddr), ++ addrlen); ++} ++ ++template ++typename O::__basic_ostream& operator<<(O& os, application::connection_type conn_type) { ++ switch (conn_type) { ++ case application::CONNECTION_CLIENT: ++ return os << "client"; ++ case application::CONNECTION_SERVER: ++ return os << "server"; ++ default: ++ return os; ++ } ++} ++ ++void application::add_connection(conn_ptr_t conn_ptr, connection_type conn_type) { ++ auto s = std::make_shared(); ++ s->conn_type = conn_type; ++ s->conn_ptr = conn_ptr; ++ s->bytes_sent = 0; ++ s->bytes_recvd = 0; ++ ++ switch (s->conn_type) { ++ case CONNECTION_CLIENT: ++ s->send_data.assign(m_params.request_size, 'r'); ++ s->recv_data.resize(m_params.response_size); ++ break; ++ case CONNECTION_SERVER: ++ s->send_data.resize(m_params.response_size); ++ s->recv_data.resize(m_params.request_size); ++ break; ++ } ++ ++ LOG_DEBUG << "add " << conn_type << " connection with id " << conn_ptr->id(); ++ conn_ptr->add_to_evpoll(m_evpoll); ++ m_connections[conn_ptr->id()] = s; ++ advance_connection(s, 0); ++} ++ ++void application::initiate_connections() { ++ int max = max_conns_inflight(); ++ while ((m_num_conns_started < m_params.total_conns) && (m_num_conns_inflight < max)) { ++ /* coverity[dont_call] */ ++ const dest_t& dest = m_params.dests[::rand() % m_params.dests.size()]; ++ ++m_num_conns_started; ++ ++m_num_conns_inflight; ++ LOG_DEBUG << "connecting to " << dest.hostname << ":" << dest.port; ++ add_connection(connect(dest), CONNECTION_CLIENT); ++ } ++} ++ ++int application::max_conns_inflight() const { ++ return m_params.conn_ratio * m_params.dests.size() + 0.5; ++} ++ ++void application::advance_connection(conn_state_ptr_t s, uint32_t events) { ++ LOG_DEBUG << "advance " << s->conn_type << " connection id " << s->conn_ptr->id() ++ << " total sent " << s->bytes_sent << ", received " << s->bytes_recvd; ++ switch (s->conn_type) { ++ case CONNECTION_CLIENT: ++ if (s->bytes_sent < m_params.request_size) { ++ /* more data should be sent */ ++ size_t nsent = s->conn_ptr->send(&s->send_data[s->bytes_sent], ++ m_params.request_size - s->bytes_sent); ++ LOG_DEBUG << "sent " << nsent << " bytes on connection id " ++ << s->conn_ptr->id(); ++ s->bytes_sent += nsent; ++ } ++ if (events & EPOLLIN) { ++ size_t nrecv = s->conn_ptr->recv(&s->recv_data[s->bytes_recvd], ++ m_params.response_size - s->bytes_recvd); ++ LOG_DEBUG << "received " << nrecv << " bytes on connection id " ++ << s->conn_ptr->id(); ++ s->bytes_recvd += nrecv; ++ } ++ if (s->bytes_recvd == m_params.response_size) { ++ connection_completed(s); ++ } ++ break; ++ case CONNECTION_SERVER: ++ if (events & EPOLLIN) { ++ size_t nrecv = s->conn_ptr->recv(&s->recv_data[s->bytes_recvd], ++ m_params.request_size - s->bytes_recvd); ++ LOG_DEBUG << "received " << nrecv << " bytes on connection id " ++ << s->conn_ptr->id(); ++ s->bytes_recvd += nrecv; ++ } ++ if ((s->bytes_recvd == m_params.request_size) && ++ (s->bytes_sent < m_params.response_size)) { ++ /* more data should be sent */ ++ size_t nsent = s->conn_ptr->send(&s->send_data[s->bytes_sent], ++ m_params.response_size - s->bytes_sent); ++ LOG_DEBUG << "sent " << nsent << " bytes on connection id " ++ << s->conn_ptr->id(); ++ s->bytes_sent += nsent; ++ } ++ if (s->conn_ptr->is_closed()) { ++ connection_completed(s); ++ } ++ break; ++ } ++} ++ ++void application::connection_completed(conn_state_ptr_t s) { ++ LOG_DEBUG << "completed " << s->conn_type << " connection id " << s->conn_ptr->id(); ++ m_connections.erase(s->conn_ptr->id()); ++ --m_num_conns_inflight; ++} ++ ++void application::pton(const dest_t& dst, struct sockaddr_storage& saddr, ++ socklen_t &addrlen) { ++ ++ struct hostent *he = gethostbyname(dst.hostname.c_str()); ++ if (he == NULL || he->h_addr_list == NULL) { ++ throw error("host " + dst.hostname + " not found: "+ hstrerror(h_errno)); ++ } ++ ++ memset(&saddr, 0, sizeof(saddr)); ++ saddr.ss_family = he->h_addrtype; ++ ++ void *addr; ++ int addr_datalen = 0; ++ switch (saddr.ss_family) { ++ case AF_INET: ++ reinterpret_cast(&saddr)->sin_port = ++ htons(dst.port); ++ addr = &reinterpret_cast(&saddr)->sin_addr; ++ addrlen = sizeof(struct sockaddr_in); ++ addr_datalen = sizeof(struct in_addr); ++ break; ++ case AF_INET6: ++ reinterpret_cast(&saddr)->sin6_port = ++ htons(dst.port); ++ addr = &reinterpret_cast(&saddr)->sin6_addr; ++ addrlen = sizeof(struct sockaddr_in6); ++ addr_datalen = sizeof(struct in6_addr); ++ break; ++ default: ++ throw error("unsupported address family"); ++ } ++ ++ if (he->h_length != addr_datalen) { ++ throw error("mismatching address length"); ++ } ++ ++ memcpy(addr, he->h_addr_list[0], addr_datalen); ++} ++ ++void application::usage(const std::string& error) { ++ if (!error.empty()) { ++ std::cout << "Error: " << error << std::endl; ++ std::cout << std::endl; ++ } ++ ++ params defaults; ++ std::cout << "Usage: ./sa [ options ]" << std::endl; ++ std::cout << "Options:" << std::endl; ++ std::cout << " -m Application mode (tcp)" << std::endl; ++ std::cout << " -p Local port number to listen on" << std::endl; ++ std::cout << " -f File with list of hosts and ports to connect to" << std::endl; ++ std::cout << " Each line in the file is formatter as follows:" << std::endl; ++ std::cout << "
" << std::endl; ++ std::cout << " -r How many in-flight connection to hold as multiple" << std::endl; ++ std::cout << " of number of possible destinations (" << defaults.conn_ratio << ")" << std::endl; ++ std::cout << " -n How many total exchanges to perform (" << defaults.total_conns << ")" << std::endl; ++ std::cout << " -S Request message size, in bytes (" << defaults.request_size << ")" << std::endl; ++ std::cout << " -s Response message size, in bytes (" << defaults.response_size << ")" << std::endl; ++ std::cout << " -v Increase verbosity level (may be specified several times)" << std::endl; ++} ++ ++void application::parse_hostfile(const std::string& filename) { ++ std::ifstream f(filename.c_str()); ++ if (!f) { ++ throw error("failed to open '" + filename + "'"); ++ } ++ ++ /* ++ * Each line in the file contains 2 whitespace-separated tokens: host-name ++ * and port number. ++ */ ++ std::string line; ++ int lineno = 1; ++ while (std::getline(f, line)) { ++ std::stringstream ss(line); ++ if (line.empty()) { ++ continue; ++ } ++ ++ dest_t dest; ++ if ((ss >> dest.hostname) && (ss >> dest.port)) { ++ m_params.dests.push_back(dest); ++ } else { ++ std::stringstream errss; ++ errss << "syntax error in file '" << filename << "' line " << lineno << ++ " near `" << line << "'"; ++ throw error(errss.str()); ++ } ++ ++lineno; ++ } ++} ++ ++int main(int argc, char **argv) ++{ ++ try { ++ application app(argc, argv); ++ return app.run(); ++ } catch (application::usage_exception& e) { ++ application::usage(e.what()); ++ return -127; ++ } catch (error& e) { ++ std::cerr << "Error: " << e.what() << std::endl; ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.cc b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.cc +new file mode 100644 +index 0000000..7d15776 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.cc +@@ -0,0 +1,127 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "sa_tcp.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++tcp_socket::tcp_socket() : file_desc(create_socket()) { ++} ++ ++tcp_socket::tcp_socket(int fd) : file_desc(fd) { ++} ++ ++tcp_socket::~tcp_socket() { ++} ++ ++int tcp_socket::create_socket() { ++ int fd = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ++ if (fd < 0) { ++ throw sys_error("failed to create tcp socket", errno); ++ } ++ return fd; ++} ++ ++tcp_connection::tcp_connection(const struct sockaddr *addr, socklen_t addrlen) : ++ m_is_closed(false) { ++ initialize(); ++ int ret = ::connect(m_socket, addr, addrlen); ++ if ((ret < 0) && (errno != EINPROGRESS)) { ++ throw sys_error("failed to connect tcp socket", errno); ++ } ++} ++ ++tcp_connection::tcp_connection(int fd) : m_socket(fd), m_is_closed(false) { ++ initialize(); ++} ++ ++void tcp_connection::initialize() { ++ int ret = fcntl(m_socket, F_SETFL, fcntl(m_socket, F_GETFL) | O_NONBLOCK); ++ if (ret < 0) { ++ throw sys_error("failed to set tcp socket to nonblocking", errno); ++ } ++ ++ set_id(m_socket); ++} ++ ++void tcp_connection::add_to_evpoll(evpoll_set& evpoll) { ++ evpoll.add(m_socket, EPOLLIN | EPOLLOUT | EPOLLERR | EPOLLET); ++} ++ ++size_t tcp_connection::send(const char *buffer, size_t size) { ++ ssize_t ret = ::send(m_socket, buffer, size, 0); ++ if (ret < 0) { ++ if (errno != EAGAIN) { ++ throw sys_error("failed to send on tcp socket", errno); ++ } ++ return 0; ++ } ++ return ret; ++} ++ ++size_t tcp_connection::recv(char *buffer, size_t size) { ++ ssize_t ret = ::recv(m_socket, buffer, size, 0); ++ if (ret < 0) { ++ if (errno != EAGAIN) { ++ throw sys_error("failed to receive from tcp socket", errno); ++ } ++ return 0; ++ } ++ if (ret == 0) { ++ m_is_closed = true; ++ } ++ return ret; ++} ++ ++bool tcp_connection::is_closed() const { ++ return m_is_closed; ++} ++ ++tcp_worker::tcp_worker(const struct sockaddr *listen_addr, socklen_t addrlen) { ++ int retb = ::bind(m_server_socket, listen_addr, addrlen); ++ if (retb != 0) { ++ throw sys_error("failed to bind tcp socket", errno); ++ } ++ ++ int retl = ::listen(m_server_socket, 1024); ++ if (retl != 0) { ++ throw sys_error("failed to listen on tcp socket", errno); ++ } ++} ++ ++void tcp_worker::add_to_evpoll(evpoll_set& evpoll) { ++ evpoll.add(m_server_socket, EPOLLIN | EPOLLERR); ++} ++ ++void tcp_worker::wait(const evpoll_set& evpoll, conn_handler_t conn_handler, ++ data_handler_t data_handler, int timeout_ms) { ++ std::vector events; ++ evpoll.wait(events, timeout_ms); ++ for (auto ev : events) { ++ if (ev.fd == m_server_socket) { ++ int ret = accept(m_server_socket, NULL, NULL); ++ if (ret < 0) { ++ throw sys_error("failed to accept", errno); ++ } ++ auto conn = std::make_shared(ret); ++ conn_handler(conn); ++ } else { ++ data_handler(ev.fd, ev.ev_flags); ++ } ++ } ++} ++ ++std::shared_ptr tcp_worker::connect(const struct sockaddr *addr, ++ socklen_t addrlen) { ++ return std::make_shared(addr, addrlen); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.h b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.h +new file mode 100644 +index 0000000..f8c3717 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.h +@@ -0,0 +1,64 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef SA_TCP_H_ ++#define SA_TCP_H_ ++ ++#include "sa_base.h" ++#include "sa_util.h" ++ ++ ++class tcp_socket : public file_desc { ++public: ++ tcp_socket(); ++ ++ tcp_socket(int fd); ++ ++ virtual ~tcp_socket(); ++ ++private: ++ static int create_socket(); ++}; ++ ++ ++class tcp_connection : public connection { ++public: ++ tcp_connection(const struct sockaddr *addr, socklen_t addrlen); ++ ++ tcp_connection(int fd); ++ ++ virtual void add_to_evpoll(evpoll_set& evpoll); ++ ++ virtual size_t send(const char *buffer, size_t size); ++ ++ virtual size_t recv(char *buffer, size_t size); ++ ++ virtual bool is_closed() const; ++ ++private: ++ void initialize(); ++ ++ tcp_socket m_socket; ++ bool m_is_closed; ++}; ++ ++ ++class tcp_worker : public worker { ++public: ++ tcp_worker(const struct sockaddr *listen_addr, socklen_t addrlen); ++ ++ virtual void add_to_evpoll(evpoll_set& evpoll); ++ ++ virtual conn_ptr_t connect(const struct sockaddr *addr, socklen_t addrlen); ++ ++ virtual void wait(const evpoll_set& evpoll, conn_handler_t conn_handler, ++ data_handler_t data_handler, int timeout_ms); ++ ++private: ++ tcp_socket m_server_socket; ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.cc b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.cc +new file mode 100644 +index 0000000..9e2a97e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.cc +@@ -0,0 +1,124 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "sa_util.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++error::error(const std::string& message) : m_message(message) { ++} ++ ++error::~error() throw() { ++} ++ ++const char* error::what() const throw() { ++ return m_message.c_str(); ++} ++ ++sys_error::~sys_error() throw() { ++} ++ ++sys_error::sys_error(const std::string& message, int errn) : ++ error(message + ": " + strerror(errn) + " (" + std::to_string(errn) + ")") { ++} ++ ++file_desc::file_desc(int fd) : m_fd(fd) { ++} ++ ++file_desc::~file_desc() { ++ int ret = ::close(m_fd); ++ if (ret < 0) { ++ fprintf(stderr, "Warning: failed to close fd %d: %m", m_fd); ++ } ++} ++ ++file_desc::operator int() const { ++ return m_fd; ++} ++ ++evpoll_set::evpoll_set() : file_desc(create_epfd()) { ++} ++ ++void evpoll_set::add(int fd, uint32_t ev_flags) { ++ struct epoll_event ev; ++ memset(&ev, 0, sizeof(ev)); ++ ev.events = ev_flags; ++ ev.data.fd = fd; ++ int ret = ::epoll_ctl(*this, EPOLL_CTL_ADD, fd, &ev); ++ if (ret != 0) { ++ throw sys_error("failed to add fd to epoll", errno); ++ } ++} ++ ++void evpoll_set::wait(std::vector& events, int timeout_ms) const { ++ static const size_t maxevents = 32; ++ struct epoll_event ev_array[maxevents]; ++ ++ LOG_DEBUG << "epoll_wait with timeout " << timeout_ms << " milliseconds"; ++ int ret = epoll_wait(*this, ev_array, maxevents, timeout_ms); ++ if (ret < 0) { ++ if (errno != EINTR) { ++ throw sys_error("epoll_wait failed", errno); ++ } ++ } else { ++ for (int i = 0; i < ret; ++i) { ++ event ev = { ev_array[i].data.fd, ev_array[i].events }; ++ events.push_back(ev); ++ } ++ } ++} ++ ++int evpoll_set::create_epfd() { ++ int fd = epoll_create(1); ++ if (fd < 0) { ++ throw sys_error("failed to create epoll set", errno); ++ } ++ return fd; ++} ++ ++log::level_t log::m_log_level = INFO; ++ ++log::log(log::level_t level, const std::string& file, int line) : ++ m_enabled(level <= m_log_level) { ++ if (m_enabled) { ++ struct timeval tv; ++ gettimeofday(&tv, NULL); ++ ++ char cstr[64]; ++ snprintf(cstr, sizeof(cstr), "[%lu.%06lu] %12s:%-5d", ++ tv.tv_sec, tv.tv_usec, basename(file.c_str()), line); ++ m_msg << cstr << " " << level_str(level) << " "; ++ } ++} ++ ++log::~log() { ++ if (m_enabled) { ++ m_msg << std::endl; ++ std::cout << m_msg.str() << std::flush; ++ } ++} ++ ++std::string log::level_str(log::level_t level) { ++ switch (level) { ++ case INFO: ++ return "INFO "; ++ case DEBUG: ++ return "DEBUG"; ++ default: ++ throw error("invalid log level"); ++ } ++} ++ ++void log::more_verbose() { ++ if (m_log_level == INFO) { ++ m_log_level = DEBUG; ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.h b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.h +new file mode 100644 +index 0000000..7cd46bc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.h +@@ -0,0 +1,107 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef SA_UTIL_H_ ++#define SA_UTIL_H_ ++ ++#include ++#include ++#include ++#include ++ ++ ++/* runtime error exception */ ++class error : public std::exception { ++public: ++ error(const std::string& message); ++ ++ virtual ~error() throw(); ++ ++ virtual const char* what() const throw(); ++ ++private: ++ std::string m_message; ++}; ++ ++ ++/* system error exception */ ++class sys_error : public error { ++public: ++ virtual ~sys_error() throw(); ++ ++ sys_error(const std::string& message, int errn); ++}; ++ ++ ++/* file descriptor wrapper which closes the file automatically */ ++class file_desc { ++public: ++ file_desc(int fd); ++ ++ virtual ~file_desc(); ++ ++ operator int() const; ++ ++private: ++ file_desc(const file_desc&); ++ ++ const file_desc& operator=(const file_desc&); ++ ++ int m_fd; ++}; ++ ++ ++/* event poll set */ ++class evpoll_set : public file_desc { ++public: ++ struct event { ++ int fd; ++ uint32_t ev_flags; ++ }; ++ ++ evpoll_set(); ++ ++ void add(int fd, uint32_t ev_flags); ++ ++ void wait(std::vector& events, int timeout_ms = -1) const; ++ ++private: ++ static int create_epfd(); ++}; ++ ++#define LOG_INFO \ ++ log(log::INFO, __FILE__, __LINE__) ++#define LOG_DEBUG \ ++ log(log::DEBUG, __FILE__, __LINE__) ++ ++/* logger */ ++class log { ++public: ++ typedef enum { ++ INFO, ++ DEBUG ++ } level_t; ++ ++ log(level_t level, const std::string& file, int line); ++ ~log(); ++ ++ template ++ log& operator<<(const T& value) { ++ m_msg << value; ++ return *this; ++ } ++ ++ static void more_verbose(); ++ ++private: ++ static std::string level_str(level_t level); ++ ++ static level_t m_log_level; ++ const bool m_enabled; ++ std::ostringstream m_msg; ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_dlopen.c b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_dlopen.c +new file mode 100644 +index 0000000..8ed29f1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_dlopen.c +@@ -0,0 +1,29 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++#include ++ ++#define _QUOTE(x) #x ++#define QUOTE(x) _QUOTE(x) ++ ++int main(int argc, char **argv) ++{ ++ const char *filename = QUOTE(UCP_LIB_PATH); ++ void *handle; ++ ++ printf("opening '%s'\n", filename); ++ handle = dlopen(filename, RTLD_LAZY); ++ if (handle == NULL) { ++ fprintf(stderr, "failed to open %s: %m\n", filename); ++ return -1; ++ } ++ ++ printf("done\n"); ++ dlclose(handle); ++ return 0; ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_tcmalloc.c b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_tcmalloc.c +new file mode 100644 +index 0000000..a987ed7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_tcmalloc.c +@@ -0,0 +1,33 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++#include ++#include ++ ++ ++int main(int argc, char **argv) ++{ ++ ucp_params_t params; ++ ucs_status_t status; ++ ucp_context_h context; ++ ++ params.field_mask = UCP_PARAM_FIELD_FEATURES; ++ params.features = UCP_FEATURE_TAG; ++ ++ status = ucp_init(¶ms, NULL, &context); ++ if (status != UCS_OK) { ++ return -1; ++ } ++ ++ dlopen("libselinux.so", RTLD_LAZY); ++ ++ ucp_cleanup(context); ++ ++ printf("SUCCESS\n"); ++ return 0; ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_ucx_tls.py b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_ucx_tls.py +index 6e62944..fcf1c87 100755 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_ucx_tls.py ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_ucx_tls.py +@@ -9,6 +9,8 @@ import sys + import subprocess + import os + import re ++from distutils.version import LooseVersion ++ + + #expected AM transport selections per given number of eps + mlx4_am = { +@@ -31,7 +33,7 @@ mlx5_am = { + 1000000 : "dc_mlx5", + } + +-mlx5_am_roce = { ++mlx5_am_no_dc = { + 2 : "rc_mlx5", + 16 : "rc_mlx5", + 32 : "rc_mlx5", +@@ -62,12 +64,13 @@ mlx4_am_override = { + 1000000 : "rc", + } + +-am_tls = { +- "mlx4" : mlx4_am, +- "mlx5" : mlx5_am, +- "mlx5_roce" : mlx5_am_roce, +- "mlx4_override" : mlx4_am_override, +- "mlx5_override" : mlx5_am_override ++am_tls = { ++ "mlx4" : mlx4_am, ++ "mlx5" : mlx5_am, ++ "mlx5_roce_dc" : mlx5_am, # mlx5 RoCE port which supports DC ++ "mlx5_roce_no_dc" : mlx5_am_no_dc, # mlx5 RoCE port which doesn't support DC ++ "mlx4_override" : mlx4_am_override, ++ "mlx5_override" : mlx5_am_override + } + + def find_am_transport(dev, neps, override = 0) : +@@ -111,7 +114,11 @@ for dev in sorted(dev_list): + dev_tl_override_map = am_tls[dev[0:dev.index('_')] + "_override"] + override = 1 + else: +- dev_tl_map = am_tls[dev[0:dev.index('_')]+"_roce"] ++ fw_ver = open("/sys/class/infiniband/%s/fw_ver" % dev).read() ++ if LooseVersion(fw_ver) >= LooseVersion("16.23.0"): ++ dev_tl_map = am_tls[dev[0:dev.index('_')]+"_roce_dc"] ++ else: ++ dev_tl_map = am_tls[dev[0:dev.index('_')]+"_roce_no_dc"] + override = 0 + + for n_eps in sorted(dev_tl_map): +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/examples/Makefile.am +index 73ec193..3eecc2a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/examples/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/Makefile.am +@@ -1,5 +1,5 @@ + # +-# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. ++# Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + # + # Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. + # See file LICENSE for terms. +@@ -9,10 +9,53 @@ examplesdir = $(pkgdatadir)/examples + dist_examples_DATA = \ + ucx_hello_world.h \ + ucp_hello_world.c \ +- uct_hello_world.c ++ uct_hello_world.c \ ++ ucx_profiling.c \ ++ ucp_client_server.c ++ ++EXAMPLE_CC_FLAGS = -lucs -lucm -I$(includedir) -L$(libdir) -Wall -Werror -Wl,-rpath,$(libdir) + + installcheck-local: + @echo "INSTALLCHECK: Compiling examples with installed library" +- $(CC) -o uct_hello_world $(examplesdir)/uct_hello_world.c -luct -lucs -I$(includedir) -L$(libdir) -pedantic -Werror -Wl,-rpath,$(libdir) +- $(CC) -o ucp_hello_world $(examplesdir)/ucp_hello_world.c -lucp -lucs -I$(includedir) -L$(libdir) -pedantic -Werror -Wl,-rpath,$(libdir) +- $(RM) *.o uct_hello_world ucp_hello_world ++ $(CC) -o uct_hello_world $(examplesdir)/uct_hello_world.c -luct $(EXAMPLE_CC_FLAGS) -pedantic ++ $(CC) -o ucp_hello_world $(examplesdir)/ucp_hello_world.c -lucp $(EXAMPLE_CC_FLAGS) -pedantic ++ $(CC) -o ucp_client_server $(examplesdir)/ucp_client_server.c -lucp $(EXAMPLE_CC_FLAGS) -pedantic ++ $(CC) -o ucx_profiling $(examplesdir)/ucx_profiling.c -lucs $(EXAMPLE_CC_FLAGS) -Wall -lm ++ $(RM) *.o uct_hello_world ucp_hello_world ucp_client_server ucx_profiling ++ ++if HAVE_EXAMPLES ++ ++EXAMPLE_INCLUDE_FLAGS = \ ++ -I$(abs_top_srcdir)/src \ ++ -I$(abs_top_builddir)/src ++ ++EXAMPLE_CPPFLAGS = \ ++ $(EXAMPLE_INCLUDE_FLAGS) ++ ++noinst_PROGRAMS = \ ++ ucp_hello_world \ ++ uct_hello_world \ ++ ucx_profiling \ ++ ucp_client_server ++ ++ucp_hello_world_SOURCES = ucp_hello_world.c ++ucp_hello_world_CFLAGS = $(BASE_CFLAGS) ++ucp_hello_world_CPPFLAGS = $(EXAMPLE_CPPFLAGS) ++ucp_hello_world_LDADD = $(top_builddir)/src/ucp/libucp.la ++ ++uct_hello_world_SOURCES = uct_hello_world.c ++uct_hello_world_CFLAGS = $(BASE_CFLAGS) ++uct_hello_world_CPPFLAGS = $(EXAMPLE_CPPFLAGS) ++uct_hello_world_LDADD = $(top_builddir)/src/uct/libuct.la ++ ++ucp_client_server_SOURCES = ucp_client_server.c ++ucp_client_server_CFLAGS = $(BASE_CFLAGS) ++ucp_client_server_CPPFLAGS = $(EXAMPLE_CPPFLAGS) ++ucp_client_server_LDADD = $(top_builddir)/src/ucp/libucp.la ++ ++ucx_profiling_SOURCES = ucx_profiling.c ++ucx_profiling_CFLAGS = $(BASE_CFLAGS) ++ucx_profiling_CPPFLAGS = $(EXAMPLE_CPPFLAGS) ++ucx_profiling_LDADD = $(top_builddir)/src/ucs/libucs.la ++ ++endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_client_server.c b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_client_server.c +new file mode 100644 +index 0000000..44f4926 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_client_server.c +@@ -0,0 +1,485 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++/* ++ * UCP client - server example utility ++ * ----------------------------------------------- ++ * ++ * Server side: ++ * ++ * ./ucp_client_server ++ * ++ * Client side: ++ * ++ * ./ucp_client_server -a ++ * ++ * Notes: ++ * ++ * - The server will listen to incoming connection requests on INADDR_ANY. ++ * - The client needs to pass the IP address of the server side to connect to ++ * as an argument to the test. ++ * - Currently, the passed IP needs to be an IPoIB or a RoCE address. ++ * - The port which the server side would listen on can be modified with the ++ * '-p' option and should be used on both sides. The default port to use is ++ * 13337. ++ */ ++ ++#include ++ ++#include /* memset */ ++#include /* inet_addr */ ++#include /* getopt */ ++#include /* atoi */ ++ ++ ++const char test_message[] = "UCX Client-Server Hello World"; ++static uint16_t server_port = 13337; ++ ++#define TEST_STRING_LEN sizeof(test_message) ++ ++ ++/** ++ * Server context to be used in the user's accept callback. ++ * It holds the server's endpoint which will be created upon accepting a ++ * connection request from the client. ++ */ ++typedef struct ucx_server_ctx { ++ ucp_ep_h ep; ++} ucx_server_ctx_t; ++ ++ ++/** ++ * Stream request context. Holds a value to indicate whether or not the ++ * request is completed. ++ */ ++typedef struct test_req { ++ int complete; ++} test_req_t; ++ ++ ++/** ++ * The callback on the receiving side, which is invoked upon receiving the ++ * stream message. ++ */ ++static void stream_recv_cb(void *request, ucs_status_t status, size_t length) ++{ ++ test_req_t *req = request; ++ ++ req->complete = 1; ++ ++ printf("stream_recv_cb returned with status %d (%s), length: %lu\n", ++ status, ucs_status_string(status), length); ++} ++ ++/** ++ * The callback on the sending side, which is invoked after finishing sending ++ * the stream message. ++ */ ++static void stream_send_cb(void *request, ucs_status_t status) ++{ ++ test_req_t *req = request; ++ ++ req->complete = 1; ++ ++ printf("stream_send_cb returned with status %d (%s)\n", ++ status, ucs_status_string(status)); ++} ++ ++/** ++ * The callback on the server side which is invoked upon receiving a connection ++ * request from the client. ++ */ ++static void server_accept_cb(ucp_ep_h ep, void *arg) ++{ ++ ucx_server_ctx_t *context = arg; ++ ++ /* Save the server's endpoint in the user's context, for future usage */ ++ context->ep = ep; ++} ++ ++/** ++ * Set an address for the server to listen on - INADDR_ANY on a well known port. ++ */ ++void set_listen_addr(struct sockaddr_in *listen_addr) ++{ ++ /* The server will listen on INADDR_ANY */ ++ memset(listen_addr, 0, sizeof(struct sockaddr_in)); ++ listen_addr->sin_family = AF_INET; ++ listen_addr->sin_addr.s_addr = INADDR_ANY; ++ listen_addr->sin_port = server_port; ++} ++ ++/** ++ * Set an address to connect to. A given IP address on a well known port. ++ */ ++void set_connect_addr(const char *address_str, struct sockaddr_in *connect_addr) ++{ ++ memset(connect_addr, 0, sizeof(struct sockaddr_in)); ++ connect_addr->sin_family = AF_INET; ++ connect_addr->sin_addr.s_addr = inet_addr(address_str); ++ connect_addr->sin_port = server_port; ++} ++ ++/** ++ * Initialize the server side. The server starts listening on the set address ++ * and waits for its connected endpoint to be created. ++ */ ++static int start_server(ucp_worker_h ucp_worker, ucx_server_ctx_t *context, ++ ucp_listener_h *listener) ++{ ++ struct sockaddr_in listen_addr; ++ ucp_listener_params_t params; ++ ucs_status_t status; ++ ++ set_listen_addr(&listen_addr); ++ ++ params.field_mask = UCP_LISTENER_PARAM_FIELD_SOCK_ADDR | ++ UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER; ++ params.sockaddr.addr = (const struct sockaddr*)&listen_addr; ++ params.sockaddr.addrlen = sizeof(listen_addr); ++ params.accept_handler.cb = server_accept_cb; ++ params.accept_handler.arg = context; ++ ++ /* Create a listener on the server side to listen on the given address.*/ ++ status = ucp_listener_create(ucp_worker, ¶ms, listener); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to listen (%s)\n", ucs_status_string(status)); ++ } ++ ++ return status; ++} ++ ++/** ++ * Initialize the client side. Create an endpoint from the client side to be ++ * connected to the remote server (to the given IP). ++ */ ++static int start_client(ucp_worker_h ucp_worker, const char *ip, ++ ucp_ep_h *client_ep) ++{ ++ ucp_ep_params_t ep_params; ++ struct sockaddr_in connect_addr; ++ ucs_status_t status; ++ ++ set_connect_addr(ip, &connect_addr); ++ ++ /* ++ * Endpoint field mask bits: ++ * UCP_EP_PARAM_FIELD_FLAGS - Use the value of the 'flags' field. ++ * UCP_EP_PARAM_FIELD_SOCK_ADDR - Use a remote sockaddr to connect ++ * to the remote peer. ++ * UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE - Error handling mode - this flag ++ * is temporarily required since the ++ * endpoint will be closed with ++ * UCP_EP_CLOSE_MODE_FORCE which ++ * requires this mode. ++ * Once UCP_EP_CLOSE_MODE_FORCE is ++ * removed, the error handling mode ++ * will be removed. ++ */ ++ ep_params.field_mask = UCP_EP_PARAM_FIELD_FLAGS | ++ UCP_EP_PARAM_FIELD_SOCK_ADDR | ++ UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; ++ ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; ++ ep_params.flags = UCP_EP_PARAMS_FLAGS_CLIENT_SERVER; ++ ep_params.sockaddr.addr = (struct sockaddr*)&connect_addr; ++ ep_params.sockaddr.addrlen = sizeof(connect_addr); ++ ++ status = ucp_ep_create(ucp_worker, &ep_params, client_ep); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to connect to %s (%s)\n", ip, ucs_status_string(status)); ++ } ++ ++ return status; ++} ++ ++/** ++ * Print the received message on the server side or the sent data on the client ++ * side. ++ */ ++static void print_result(int is_server, char *recv_message) ++{ ++ if (is_server) { ++ printf("\n\n----- UCP TEST SUCCESS -------\n\n"); ++ printf("%s", recv_message); ++ printf("\n\n------------------------------\n\n"); ++ } else { ++ printf("\n\n-----------------------------------------\n\n"); ++ printf("Client sent message: \n%s.\nlength: %ld\n", ++ test_message, TEST_STRING_LEN); ++ printf("\n-----------------------------------------\n\n"); ++ } ++} ++ ++static void request_wait(ucp_worker_h ucp_worker, test_req_t *request) ++{ ++ while (request->complete == 0) { ++ ucp_worker_progress(ucp_worker); ++ } ++ ++ /* This request may be reused so initialize it for next time */ ++ request->complete = 0; ++ ucp_request_free(request); ++} ++ ++/** ++ * Send and receive a message using the Stream API. ++ * The client sends a message to the server and waits until the send it completed. ++ * The server receives a message from the client and waits for its completion. ++ */ ++static int send_recv_stream(ucp_worker_h ucp_worker, ucp_ep_h ep, int is_server) ++{ ++ char recv_message[TEST_STRING_LEN]= ""; ++ test_req_t *request; ++ size_t length; ++ int ret = 0; ++ ++ if (!is_server) { ++ /* Client sends a message to the server using the stream API */ ++ request = ucp_stream_send_nb(ep, test_message, 1, ++ ucp_dt_make_contig(TEST_STRING_LEN), ++ stream_send_cb, 0); ++ if (UCS_PTR_IS_ERR(request)) { ++ fprintf(stderr, "unable to send UCX message (%s)\n", ++ ucs_status_string(UCS_PTR_STATUS(request))); ++ ret = -1; ++ goto out; ++ } else if (UCS_PTR_STATUS(request) != UCS_OK) { ++ request_wait(ucp_worker, request); ++ } ++ } else { ++ /* Server receives a message from the client using the stream API */ ++ request = ucp_stream_recv_nb(ep, &recv_message, 1, ++ ucp_dt_make_contig(TEST_STRING_LEN), ++ stream_recv_cb, &length , 0); ++ if (UCS_PTR_IS_ERR(request)) { ++ fprintf(stderr, "unable to receive UCX message (%s)\n", ++ ucs_status_string(UCS_PTR_STATUS(request))); ++ ret = -1; ++ goto out; ++ } else { ++ request_wait(ucp_worker, request); ++ printf("UCX data message was received\n"); ++ } ++ } ++ ++ print_result(is_server, recv_message); ++ ++out: ++ return ret; ++} ++ ++/** ++ * Close the given endpoint. ++ * Currently closing the endpoint with UCP_EP_CLOSE_MODE_FORCE since we currently ++ * cannot rely on the client side to be present during the server's endpoint ++ * closing process. ++ */ ++static void ep_close(ucp_worker_h ucp_worker, ucp_ep_h ep) ++{ ++ ucs_status_t status; ++ void *close_req; ++ ++ close_req = ucp_ep_close_nb(ep, UCP_EP_CLOSE_MODE_FORCE); ++ if (UCS_PTR_IS_PTR(close_req)) { ++ do { ++ ucp_worker_progress(ucp_worker); ++ status = ucp_request_check_status(close_req); ++ } while (status == UCS_INPROGRESS); ++ ++ ucp_request_free(close_req); ++ } else if (UCS_PTR_STATUS(close_req) != UCS_OK) { ++ fprintf(stderr, "failed to close ep %p\n", (void*)ep); ++ } ++} ++ ++/** ++ * A callback to be invoked by UCX in order to initialize the user's request. ++ */ ++static void request_init(void *request) ++{ ++ test_req_t *req = request; ++ req->complete = 0; ++} ++ ++/** ++ * Print this application's usage help message. ++ */ ++static void usage() ++{ ++ fprintf(stderr, "Usage: ucp_client_server [parameters]\n"); ++ fprintf(stderr, "UCP client-server example utility\n"); ++ fprintf(stderr, "\nParameters are:\n"); ++ fprintf(stderr, " -a Set IP address of the server " ++ "(required for client and should not be specified " ++ "for the server)\n"); ++ fprintf(stderr, " -p Set alternative server port (default:13337)\n"); ++ fprintf(stderr, "\n"); ++} ++ ++/** ++ * Parse the command line arguments. ++ */ ++static int parse_cmd(int argc, char *const argv[], char **server_addr) ++{ ++ int c = 0; ++ opterr = 0; ++ ++ while ((c = getopt(argc, argv, "a:p:")) != -1) { ++ switch (c) { ++ case 'a': ++ *server_addr = optarg; ++ break; ++ case 'p': ++ server_port = atoi(optarg); ++ if (server_port < 0) { ++ fprintf(stderr, "Wrong server port number %d\n", server_port); ++ return -1; ++ } ++ break; ++ default: ++ usage(); ++ return -1; ++ } ++ } ++ ++ return 0; ++} ++ ++/** ++ * Initialize the UCP context and worker. ++ */ ++static int init_context(ucp_context_h *ucp_context, ucp_worker_h *ucp_worker) ++{ ++ /* UCP objects */ ++ ucp_worker_params_t worker_params; ++ ucp_params_t ucp_params; ++ ucs_status_t status; ++ int ret = 0; ++ ++ memset(&ucp_params, 0, sizeof(ucp_params)); ++ memset(&worker_params, 0, sizeof(worker_params)); ++ ++ /* UCP initialization */ ++ ucp_params.field_mask = UCP_PARAM_FIELD_FEATURES | ++ UCP_PARAM_FIELD_REQUEST_SIZE | ++ UCP_PARAM_FIELD_REQUEST_INIT; ++ ucp_params.features = UCP_FEATURE_STREAM; ++ ++ ucp_params.request_size = sizeof(test_req_t); ++ ucp_params.request_init = request_init; ++ ++ status = ucp_init(&ucp_params, NULL, ucp_context); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to ucp_init (%s)\n", ucs_status_string(status)); ++ ret = -1; ++ goto err; ++ } ++ ++ worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE; ++ worker_params.thread_mode = UCS_THREAD_MODE_SINGLE; ++ ++ status = ucp_worker_create(*ucp_context, &worker_params, ucp_worker); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to ucp_worker_create (%s)\n", ucs_status_string(status)); ++ ret = -1; ++ goto err_cleanup; ++ } ++ ++ return ret; ++ ++err_cleanup: ++ ucp_cleanup(*ucp_context); ++ ++err: ++ return ret; ++} ++ ++ ++int main(int argc, char **argv) ++{ ++ ucx_server_ctx_t context; ++ int is_server, ret; ++ char *server_addr = NULL; ++ ++ /* UCP objects */ ++ ucp_context_h ucp_context; ++ ucp_listener_h listener; ++ ucp_worker_h ucp_worker; ++ ucs_status_t status; ++ ucp_ep_h ep; ++ ++ ret = parse_cmd(argc, argv, &server_addr); ++ if (ret != 0) { ++ goto err; ++ } ++ ++ /* Initialize the UCX required objects */ ++ ret = init_context(&ucp_context, &ucp_worker); ++ if (ret != 0) { ++ goto err; ++ } ++ ++ /* Client-Server initialization */ ++ if (server_addr == NULL) { ++ /* Server side */ ++ is_server = 1; ++ ++ /* Initialize the server's endpoint to NULL. Once the server's endpoint ++ * is created, this field will have a valid value. */ ++ context.ep = NULL; ++ ++ status = start_server(ucp_worker, &context, &listener); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to start server\n"); ++ goto err_worker; ++ } ++ ++ /* Server is always up */ ++ while (1) { ++ printf("Waiting for connection...\n"); ++ ++ /* Wait for the server's callback to set the context->ep field, thus ++ * indicating that the server's endpoint was created and is ready to ++ * be used. The client side should initiate the connection, leading ++ * to this ep's creation */ ++ while (context.ep == NULL) { ++ ucp_worker_progress(ucp_worker); ++ } ++ ++ /* Client-Server communication via Stream API */ ++ send_recv_stream(ucp_worker, context.ep, is_server); ++ ++ /* Close the endpoint to the client */ ++ ep_close(ucp_worker, context.ep); ++ ++ /* Initialize server's endpoint for the next connection with a new ++ * client */ ++ context.ep = NULL; ++ } ++ } else { ++ /* Client side */ ++ is_server = 0; ++ status = start_client(ucp_worker, server_addr, &ep); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to start client\n"); ++ goto err_worker; ++ } ++ ++ /* Client-Server communication via Stream API */ ++ ret = send_recv_stream(ucp_worker, ep, is_server); ++ ++ /* Close the endpoint to the server */ ++ ep_close(ucp_worker, ep); ++ } ++ ++err_worker: ++ ucp_worker_destroy(ucp_worker); ++ ++ ucp_cleanup(ucp_context); ++ ++err: ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_hello_world.c b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_hello_world.c +index 49a3a4a..dbaeff8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_hello_world.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_hello_world.c +@@ -1,11 +1,14 @@ + /** + * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++* Copyright (C) Advanced Micro Devices, Inc. 2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ + +-#define HAVE_CONFIG_H /* Force using config.h, so test would fail if header +- actually tries to use it */ ++#ifndef HAVE_CONFIG_H ++# define HAVE_CONFIG_H /* Force using config.h, so test would fail if header ++ actually tries to use it */ ++#endif + + /* + * UCP hello world client / server example utility +@@ -88,7 +91,7 @@ static void request_init(void *request) + ctx->completed = 0; + } + +-static void send_handle(void *request, ucs_status_t status) ++static void send_handler(void *request, ucs_status_t status) + { + struct ucx_context *context = (struct ucx_context *) request; + +@@ -108,7 +111,7 @@ static void failure_handler(void *arg, ucp_ep_h ep, ucs_status_t status) + *arg_status = status; + } + +-static void recv_handle(void *request, ucs_status_t status, ++static void recv_handler(void *request, ucs_status_t status, + ucp_tag_recv_info_t *info) + { + struct ucx_context *context = (struct ucx_context *) request; +@@ -197,7 +200,7 @@ static int run_ucx_client(ucp_worker_h ucp_worker) + + request = ucp_tag_send_nb(server_ep, msg, msg_len, + ucp_dt_make_contig(1), tag, +- send_handle); ++ send_handler); + if (UCS_PTR_IS_ERR(request)) { + fprintf(stderr, "unable to send UCX address message\n"); + free(msg); +@@ -247,7 +250,7 @@ static int run_ucx_client(ucp_worker_h ucp_worker) + + request = ucp_tag_msg_recv_nb(ucp_worker, msg, info_tag.length, + ucp_dt_make_contig(1), msg_tag, +- recv_handle); ++ recv_handler); + + if (UCS_PTR_IS_ERR(request)) { + fprintf(stderr, "unable to receive UCX data message (%u)\n", +@@ -324,7 +327,7 @@ static int run_ucx_server(ucp_worker_h ucp_worker) + msg = malloc(info_tag.length); + CHKERR_JUMP(!msg, "allocate memory\n", err); + request = ucp_tag_msg_recv_nb(ucp_worker, msg, info_tag.length, +- ucp_dt_make_contig(1), msg_tag, recv_handle); ++ ucp_dt_make_contig(1), msg_tag, recv_handler); + + if (UCS_PTR_IS_ERR(request)) { + fprintf(stderr, "unable to receive UCX address message (%s)\n", +@@ -373,7 +376,7 @@ static int run_ucx_server(ucp_worker_h ucp_worker) + + request = ucp_tag_send_nb(client_ep, msg, msg_len, + ucp_dt_make_contig(1), tag, +- send_handle); ++ send_handler); + if (UCS_PTR_IS_ERR(request)) { + fprintf(stderr, "unable to send UCX data message\n"); + free(msg); +@@ -386,7 +389,7 @@ static int run_ucx_server(ucp_worker_h ucp_worker) + } + + status = flush_ep(ucp_worker, client_ep); +- fprintf(stderr, "ucp_ep_flush is completed with status %d (%s)\n", ++ printf("flush_ep completed with status %d (%s)\n", + status, ucs_status_string(status)); + + ret = 0; +@@ -599,78 +602,3 @@ int parse_cmd(int argc, char * const argv[], char **server_name) + } + return UCS_OK; + } +- +-int run_server() +-{ +- struct sockaddr_in inaddr; +- int lsock = -1; +- int dsock = -1; +- int optval = 1; +- int ret; +- +- lsock = socket(AF_INET, SOCK_STREAM, 0); +- CHKERR_JUMP(lsock < 0, "open server socket\n", err); +- +- optval = 1; +- ret = setsockopt(lsock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)); +- CHKERR_JUMP(ret < 0, "setsockopt server\n", err_sock); +- +- inaddr.sin_family = AF_INET; +- inaddr.sin_port = htons(server_port); +- inaddr.sin_addr.s_addr = INADDR_ANY; +- memset(inaddr.sin_zero, 0, sizeof(inaddr.sin_zero)); +- ret = bind(lsock, (struct sockaddr*)&inaddr, sizeof(inaddr)); +- CHKERR_JUMP(ret < 0, "bind server\n", err_sock); +- +- ret = listen(lsock, 0); +- CHKERR_JUMP(ret < 0, "listen server\n", err_sock); +- +- printf("Waiting for connection...\n"); +- +- /* Accept next connection */ +- dsock = accept(lsock, NULL, NULL); +- CHKERR_JUMP(dsock < 0, "accept server\n", err_sock); +- +- close(lsock); +- +- return dsock; +- +-err_sock: +- close(lsock); +- +-err: +- return -1; +-} +- +-int run_client(const char *server) +-{ +- struct sockaddr_in conn_addr; +- struct hostent *he; +- int connfd; +- int ret; +- +- connfd = socket(AF_INET, SOCK_STREAM, 0); +- if (connfd < 0) { +- fprintf(stderr, "socket() failed: %s\n", strerror(errno)); +- return -1; +- } +- +- he = gethostbyname(server); +- CHKERR_JUMP((he == NULL || he->h_addr_list == NULL), "found host\n", err_conn); +- +- conn_addr.sin_family = he->h_addrtype; +- conn_addr.sin_port = htons(server_port); +- +- memcpy(&conn_addr.sin_addr, he->h_addr_list[0], he->h_length); +- memset(conn_addr.sin_zero, 0, sizeof(conn_addr.sin_zero)); +- +- ret = connect(connfd, (struct sockaddr*)&conn_addr, sizeof(conn_addr)); +- CHKERR_JUMP(ret < 0, "connect client\n", err_conn); +- +- return connfd; +- +-err_conn: +- close(connfd); +- +- return -1; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/uct_hello_world.c b/src/mpid/ch4/netmod/ucx/ucx/test/examples/uct_hello_world.c +index c422594..c19602a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/examples/uct_hello_world.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/uct_hello_world.c +@@ -98,14 +98,22 @@ void am_short_params_pack(char *buf, size_t len, am_short_args_t *args) + } + } + +-ucs_status_t do_am_short(uct_ep_h ep, uint8_t id, const cmd_args_t *cmd_args, +- char *buf) ++ucs_status_t do_am_short(iface_info_t *if_info, uct_ep_h ep, uint8_t id, ++ const cmd_args_t *cmd_args, char *buf) + { ++ ucs_status_t status; + am_short_args_t send_args; ++ + am_short_params_pack(buf, cmd_args->test_strlen, &send_args); +- /* Send active message to remote endpoint */ +- return uct_ep_am_short(ep, id, send_args.header, send_args.payload, +- send_args.len); ++ ++ do { ++ /* Send active message to remote endpoint */ ++ status = uct_ep_am_short(ep, id, send_args.header, send_args.payload, ++ send_args.len); ++ uct_worker_progress(if_info->worker); ++ } while (status == UCS_ERR_NO_RESOURCE); ++ ++ return status; + } + + /* Pack callback for am_bcopy */ +@@ -116,8 +124,8 @@ size_t am_bcopy_data_pack_cb(void *dest, void *arg) + return bc_args->len; + } + +-ucs_status_t do_am_bcopy(uct_ep_h ep, uint8_t id, const cmd_args_t *cmd_args, +- char *buf) ++ucs_status_t do_am_bcopy(iface_info_t *if_info, uct_ep_h ep, uint8_t id, ++ const cmd_args_t *cmd_args, char *buf) + { + am_bcopy_args_t args; + ssize_t len; +@@ -126,7 +134,10 @@ ucs_status_t do_am_bcopy(uct_ep_h ep, uint8_t id, const cmd_args_t *cmd_args, + args.len = cmd_args->test_strlen; + + /* Send active message to remote endpoint */ +- len = uct_ep_am_bcopy(ep, id, am_bcopy_data_pack_cb, &args, 0); ++ do { ++ len = uct_ep_am_bcopy(ep, id, am_bcopy_data_pack_cb, &args, 0); ++ uct_worker_progress(if_info->worker); ++ } while (len == UCS_ERR_NO_RESOURCE); + /* Negative len is an error code */ + return (len >= 0) ? UCS_OK : len; + } +@@ -148,7 +159,7 @@ ucs_status_t do_am_zcopy(iface_info_t *if_info, uct_ep_h ep, uint8_t id, + zcopy_comp_t comp; + + ucs_status_t status = uct_md_mem_reg(if_info->pd, buf, cmd_args->test_strlen, +- 0, &memh); ++ UCT_MD_MEM_ACCESS_RMA, &memh); + iov.buffer = buf; + iov.length = cmd_args->test_strlen; + iov.memh = memh; +@@ -161,8 +172,12 @@ ucs_status_t do_am_zcopy(iface_info_t *if_info, uct_ep_h ep, uint8_t id, + comp.memh = memh; + + if (status == UCS_OK) { +- status = uct_ep_am_zcopy(ep, id, NULL, 0, &iov, 1, 0, +- (uct_completion_t *)&comp); ++ do { ++ status = uct_ep_am_zcopy(ep, id, NULL, 0, &iov, 1, 0, ++ (uct_completion_t *)&comp); ++ uct_worker_progress(if_info->worker); ++ } while (status == UCS_ERR_NO_RESOURCE); ++ + if (status == UCS_INPROGRESS) { + while (!desc_holder) { + /* Explicitly progress outstanding active message request */ +@@ -276,7 +291,7 @@ static ucs_status_t dev_tl_lookup(const cmd_args_t *cmd_args, + int j; + + status = uct_query_md_resources(&md_resources, &num_md_resources); +- CHKERR_JUMP(UCS_OK != status, "query for protected domain resources", error_ret); ++ CHKERR_JUMP(UCS_OK != status, "query for memory domain resources", error_ret); + + /* Iterate through protected domain resources */ + for (i = 0; i < num_md_resources; ++i) { +@@ -285,7 +300,7 @@ static ucs_status_t dev_tl_lookup(const cmd_args_t *cmd_args, + + status = uct_md_open(md_resources[i].md_name, md_config, &iface_p->pd); + uct_config_release(md_config); +- CHKERR_JUMP(UCS_OK != status, "open protected domains", release_pd); ++ CHKERR_JUMP(UCS_OK != status, "open memory domains", release_pd); + + status = uct_md_query_tl_resources(iface_p->pd, &tl_resources, &num_tl_resources); + CHKERR_JUMP(UCS_OK != status, "query transport resources", close_pd); +@@ -473,7 +488,7 @@ int main(int argc, char **argv) + uct_device_addr_t *peer_dev = NULL; + uct_iface_addr_t *own_iface; + uct_iface_addr_t *peer_iface = NULL; +- uct_ep_addr_t *own_ep; ++ uct_ep_addr_t *own_ep = NULL; + uct_ep_addr_t *peer_ep = NULL; + ucs_status_t status = UCS_OK; /* status codes for UCS */ + uct_ep_h ep; /* Remote endpoint */ +@@ -584,8 +599,7 @@ int main(int argc, char **argv) + + /*Set active message handler */ + status = uct_iface_set_am_handler(if_info.iface, id, hello_world, +- &cmd_args.func_am_type, +- UCT_CB_FLAG_SYNC); ++ &cmd_args.func_am_type, 0); + CHKERR_JUMP(UCS_OK != status, "set callback", out_free_ep); + + if (cmd_args.server_name) { +@@ -594,9 +608,9 @@ int main(int argc, char **argv) + + /* Send active message to remote endpoint */ + if (cmd_args.func_am_type == FUNC_AM_SHORT) { +- status = do_am_short(ep, id, &cmd_args, str); ++ status = do_am_short(&if_info, ep, id, &cmd_args, str); + } else if (cmd_args.func_am_type == FUNC_AM_BCOPY) { +- status = do_am_bcopy(ep, id, &cmd_args, str); ++ status = do_am_bcopy(&if_info, ep, id, &cmd_args, str); + } else if (cmd_args.func_am_type == FUNC_AM_ZCOPY) { + status = do_am_zcopy(&if_info, ep, id, &cmd_args, str); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucx_profiling.c b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucx_profiling.c +new file mode 100644 +index 0000000..38c3eb6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucx_profiling.c +@@ -0,0 +1,43 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++#include ++#include ++ ++ ++/* calc_pi() would be profiled */ ++UCS_PROFILE_FUNC(double, calc_pi, (count), int count) { ++ double pi_d_4; ++ int n; ++ ++ pi_d_4 = 0.0; ++ ++ /* Profile a block of code */ ++ UCS_PROFILE_CODE("leibnitz") { ++ for (n = 0; n < count; ++n) { ++ pi_d_4 += pow(-1.0, n) / (2 * n + 1); ++ ++ /* create a timestamp for each step */ ++ UCS_PROFILE_SAMPLE("step"); ++ } ++ } ++ ++ return pi_d_4 * 4.0; ++} ++ ++/* print_pi() would be profiled */ ++UCS_PROFILE_FUNC_VOID(print_pi, (pi), double pi) { ++ /* Call printf() and profile it */ ++ UCS_PROFILE_CALL(printf, "PI estimation is %.10f\n", pi); ++} ++ ++int main(int argc, char **argv) ++{ ++ double pi = calc_pi(10); ++ print_pi(pi); ++ return 0; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/Makefile.am +index 1ca9649..29492aa 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/Makefile.am +@@ -6,20 +6,21 @@ + # See file LICENSE for terms. + # + ++if HAVE_GTEST + + # Set default configuration for running tests + UCX_HANDLE_ERRORS ?= freeze + UCX_LOG_LEVEL ?= info +-UCX_MEM_LOG_LEVEL ?= info + UCX_LOG_PRINT_ENABLE ?= y + GTEST_FILTER ?= * + GTEST_EXTRA_ARGS ?= + LAUNCHER ?= + VALGRIND_EXTRA_ARGS ?= + ++SUBDIRS = ucm/test_dlopen ++ + export UCX_HANDLE_ERRORS + export UCX_LOG_LEVEL +-export UCX_MEM_LOG_LEVEL + export UCX_LOG_PRINT_ENABLE + + GTEST_ARGS = \ +@@ -57,7 +58,8 @@ gtest_CPPFLAGS = \ + + gtest_LDFLAGS = $(GTEST_LDFLAGS) -no-install + gtest_CFLAGS = $(BASE_CFLAGS) +-gtest_CXXFLAGS = $(BASE_CXXFLAGS) $(GTEST_CXXFLAGS) -g -fno-tree-vectorize ++gtest_CXXFLAGS = $(BASE_CXXFLAGS) $(GTEST_CXXFLAGS) -fno-tree-vectorize \ ++ -DGTEST_UCM_HOOK_LIB_DIR="\"${abs_builddir}/ucm/test_dlopen/.libs\"" + + gtest_SOURCES = \ + common/gtest-all.cc \ +@@ -70,9 +72,11 @@ gtest_SOURCES = \ + ucm/malloc_hook.cc \ + \ + uct/test_amo.cc \ +- uct/test_amo_add.cc \ ++ uct/test_amo_add_xor.cc \ ++ uct/test_amo_and_or.cc \ + uct/test_amo_cswap.cc \ +- uct/test_amo_fadd.cc \ ++ uct/test_amo_fadd_fxor.cc \ ++ uct/test_amo_fand_for.cc \ + uct/test_amo_swap.cc \ + uct/test_event.cc \ + uct/test_fence.cc \ +@@ -121,6 +125,7 @@ gtest_SOURCES = \ + ucp/test_ucp_fence.cc \ + ucp/test_ucp_sockaddr.cc \ + ucp/ucp_test.cc \ ++ ucp/ucp_datatype.cc \ + \ + ucs/test_algorithm.cc \ + ucs/test_arbiter.cc \ +@@ -138,12 +143,13 @@ gtest_SOURCES = \ + ucs/test_pgtable.cc \ + ucs/test_profile.cc \ + ucs/test_rcache.cc \ ++ ucs/test_memtype_cache.cc \ + ucs/test_stats.cc \ ++ ucs/test_strided_alloc.cc \ + ucs/test_sys.cc \ + ucs/test_time.cc \ + ucs/test_twheel.cc \ + ucs/test_frag_list.cc \ +- ucs/test_hash_perf.cc \ + ucs/test_type.cc \ + ucs/test_log.cc + +@@ -200,7 +206,8 @@ noinst_HEADERS = \ + ucp/test_ucp_atomic.h \ + ucp/test_ucp_memheap.h \ + ucp/test_ucp_tag.h \ +- ucp/ucp_test.h ++ ucp/ucp_test.h \ ++ ucp/ucp_datatype.h + + .PHONY: test test gdb valgrind fix_rpath ucx + +@@ -237,7 +244,7 @@ list: gtest + # + test: ucx gtest + @rm -f core.* +- $(LAUNCHER) $(abs_builddir)/gtest $(GTEST_ARGS) ++ $(LAUNCHER) stdbuf -e0 -o0 $(abs_builddir)/gtest $(GTEST_ARGS) + + # + # Run unit tests with GDB +@@ -245,7 +252,6 @@ test: ucx gtest + test_gdb: ucx gtest + echo -e 'r\ninit-if-undefined $$_exitcode=-1\nif $$_exitcode>=0\n\tq\nend' > .gdbcommands + $(LAUNCHER) env UCX_HANDLE_ERRORS=none \ +- UCX_GDB_PATH="" \ + gdb -x .gdbcommands --args $(GDB_ARGS) \ + $(abs_builddir)/gtest $(GTEST_ARGS) + +@@ -254,4 +260,5 @@ test_gdb: ucx gtest + # + test_valgrind: ucx gtest + $(LAUNCHER) env LD_LIBRARY_PATH="$(VALGRIND_LIBPATH):${LD_LIBRARY_PATH}" \ +- valgrind $(VALGRIND_ARGS) $(abs_builddir)/gtest $(GTEST_ARGS) ++ stdbuf -e0 -o0 valgrind $(VALGRIND_ARGS) $(abs_builddir)/gtest $(GTEST_ARGS) ++endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/main.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/main.cc +index 0cde317..f5540b8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/main.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/main.cc +@@ -8,6 +8,7 @@ + # include "config.h" + #endif + #include ++#include + #include + #include + #include "test_helpers.h" +@@ -79,8 +80,10 @@ int main(int argc, char **argv) { + modify_config_for_valgrind("IB_TX_BUFS_GROW", "64"); + modify_config_for_valgrind("RC_TX_CQ_LEN", "256"); + modify_config_for_valgrind("CM_TIMEOUT", "600ms"); +- ucm_config_modify("MALLOC_RELOC", "y"); /* Test reloc hooks with valgrind, +- though it's generally unsafe. */ ++ ucm_global_opts.enable_malloc_reloc = 1; /* Test reloc hooks with valgrind, ++ though it's generally unsafe. */ + } ++ ucs_global_opts.warn_unused_env_vars = 0; /* Avoid warnings if not all ++ config vars are being used */ + return RUN_ALL_TESTS(); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.cc +index 6499fd5..341023b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.cc +@@ -16,6 +16,7 @@ pthread_mutex_t test_base::m_logger_mutex = PTHREAD_MUTEX_INITIALIZER; + unsigned test_base::m_total_warnings = 0; + unsigned test_base::m_total_errors = 0; + std::vector test_base::m_errors; ++std::vector test_base::m_warnings; + + test_base::test_base() : + m_state(NEW), +@@ -23,7 +24,8 @@ test_base::test_base() : + m_num_threads(1), + m_num_valgrind_errors_before(0), + m_num_errors_before(0), +- m_num_warnings_before(0) ++ m_num_warnings_before(0), ++ m_num_log_handlers_before(0) + { + push_config(); + } +@@ -93,13 +95,14 @@ void test_base::modify_config(const std::string& name, const std::string& value, + bool optional) + { + ucs_status_t status = ucs_global_opts_set_value(name.c_str(), value.c_str()); +- if ((status == UCS_OK) || (optional && (status == UCS_ERR_NO_ELEM))) { +- return; ++ if ((status == UCS_ERR_NO_ELEM) && optional) { ++ m_env_stack.push_back(new scoped_setenv(("UCX_" + name).c_str(), ++ value.c_str())); ++ } else if (status != UCS_OK) { ++ GTEST_FAIL() << "Invalid UCS configuration for " << name << " : " ++ << value << ", error message: " ++ << ucs_status_string(status) << "(" << status << ")"; + } +- +- GTEST_FAIL() << "Invalid UCS configuration for " << name << " : " +- << value << ", error message: " +- << ucs_status_string(status) << "(" << status << ")"; + } + + void test_base::push_config() +@@ -121,21 +124,6 @@ void test_base::pop_config() + m_config_stack.pop_back(); + } + +-void test_base::hide_errors() +-{ +- ucs_log_push_handler(hide_errors_logger); +-} +- +-void test_base::wrap_errors() +-{ +- ucs_log_push_handler(wrap_errors_logger); +-} +- +-void test_base::restore_errors() +-{ +- ucs_log_pop_handler(); +-} +- + ucs_log_func_rc_t + test_base::count_warns_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap) +@@ -176,6 +164,24 @@ test_base::hide_errors_logger(const char *file, unsigned line, const char *funct + } + + ucs_log_func_rc_t ++test_base::hide_warns_logger(const char *file, unsigned line, const char *function, ++ ucs_log_level_t level, const char *message, va_list ap) ++{ ++ if (level == UCS_LOG_LEVEL_WARN) { ++ pthread_mutex_lock(&m_logger_mutex); ++ va_list ap2; ++ va_copy(ap2, ap); ++ m_warnings.push_back(format_message(message, ap2)); ++ va_end(ap2); ++ level = UCS_LOG_LEVEL_DEBUG; ++ pthread_mutex_unlock(&m_logger_mutex); ++ } ++ ++ ucs_log_default_handler(file, line, function, level, message, ap); ++ return UCS_LOG_FUNC_RC_STOP; ++} ++ ++ucs_log_func_rc_t + test_base::wrap_errors_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap) + { +@@ -199,6 +205,7 @@ void test_base::SetUpProxy() { + m_num_errors_before = m_total_errors; + + m_errors.clear(); ++ m_num_log_handlers_before = ucs_log_num_handlers(); + ucs_log_push_handler(count_warns_logger); + + try { +@@ -223,9 +230,15 @@ void test_base::TearDownProxy() { + cleanup(); + } + +- ucs_log_pop_handler(); + m_errors.clear(); + ++ ucs_log_pop_handler(); ++ ++ unsigned num_not_removed = ucs_log_num_handlers() - m_num_log_handlers_before; ++ if (num_not_removed != 0) { ++ ADD_FAILURE() << num_not_removed << " log handlers were not removed"; ++ } ++ + int num_valgrind_errors = VALGRIND_COUNT_ERRORS - m_num_valgrind_errors_before; + if (num_valgrind_errors > 0) { + ADD_FAILURE() << "Got " << num_valgrind_errors << " valgrind errors during the test"; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.h +index e96972c..0991dd2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.h +@@ -38,11 +38,16 @@ public: + virtual void push_config(); + virtual void pop_config(); + +- static void hide_errors(); +- static void wrap_errors(); +- static void restore_errors(); +- + protected: ++ class scoped_log_handler { ++ public: ++ scoped_log_handler(ucs_log_func_t handler) { ++ ucs_log_push_handler(handler); ++ } ++ ~scoped_log_handler() { ++ ucs_log_pop_handler(); ++ } ++ }; + + typedef enum { + NEW, RUNNING, SKIPPED, ABORTED, FINISHED +@@ -61,24 +66,6 @@ protected: + + virtual void test_body() = 0; + +- state_t m_state; +- bool m_initialized; +- unsigned m_num_threads; +- config_stack_t m_config_stack; +- int m_num_valgrind_errors_before; +- unsigned m_num_errors_before; +- unsigned m_num_warnings_before; +- +- static pthread_mutex_t m_logger_mutex; +- static unsigned m_total_errors; +- static unsigned m_total_warnings; +- static std::vector m_errors; +- +-private: +- void skipped(const test_skip_exception& e); +- void run(); +- static void *thread_func(void *arg); +- + static ucs_log_func_rc_t + count_warns_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap); +@@ -88,9 +75,34 @@ private: + ucs_log_level_t level, const char *message, va_list ap); + + static ucs_log_func_rc_t ++ hide_warns_logger(const char *file, unsigned line, const char *function, ++ ucs_log_level_t level, const char *message, va_list ap); ++ ++ static ucs_log_func_rc_t + wrap_errors_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap); + ++ state_t m_state; ++ bool m_initialized; ++ unsigned m_num_threads; ++ config_stack_t m_config_stack; ++ ptr_vector m_env_stack; ++ int m_num_valgrind_errors_before; ++ unsigned m_num_errors_before; ++ unsigned m_num_warnings_before; ++ unsigned m_num_log_handlers_before; ++ ++ static pthread_mutex_t m_logger_mutex; ++ static unsigned m_total_errors; ++ static unsigned m_total_warnings; ++ static std::vector m_errors; ++ static std::vector m_warnings; ++ ++private: ++ void skipped(const test_skip_exception& e); ++ void run(); ++ static void *thread_func(void *arg); ++ + pthread_barrier_t m_barrier; + }; + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.cc +index af672dc..a609e18 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.cc +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + namespace ucs { + +@@ -25,19 +26,19 @@ int test_time_multiplier() + return factor; + } + +-std::ostream& operator<<(std::ostream& os, const std::vector& vec) { +- static const size_t LIMIT = 100; +- size_t i = 0; +- for (std::vector::const_iterator iter = vec.begin(); iter != vec.end(); ++iter) { +- if (i >= LIMIT) { +- os << "..."; +- break; +- } +- int n = static_cast(*iter); +- os << "[" << i << "]=" << n << " "; +- ++i; ++int max_tcp_connections() ++{ ++ int max_conn = 65535 - 1024; /* limit on number of ports */ ++ ++ /* Limit numer of endpoints to number of open files, for TCP */ ++ struct rlimit rlim; ++ int ret = getrlimit(RLIMIT_NOFILE, &rlim); ++ if (ret == 0) { ++ /* assume no more than 100 fd-s are already used */ ++ max_conn = ucs_min((static_cast(rlim.rlim_cur) - 100) / 2, max_conn); + } +- return os << std::endl; ++ ++ return max_conn; + } + + void fill_random(void *data, size_t size) +@@ -89,19 +90,42 @@ bool is_inet_addr(const struct sockaddr* ifa_addr) { + return ifa_addr->sa_family == AF_INET; + } + +-bool is_ib_netdev(const char *ifa_name) { ++bool is_rdmacm_netdev(const char *ifa_name) { ++ struct dirent *entry; + char path[PATH_MAX]; ++ char dev_name[16]; ++ char guid_buf[32]; + DIR *dir; + + snprintf(path, PATH_MAX, "/sys/class/net/%s/device/infiniband", ifa_name); +- + dir = opendir(path); + if (dir == NULL) { + return false; +- } else { +- closedir(dir); +- return true; + } ++ ++ /* read IB device name */ ++ for (;;) { ++ entry = readdir(dir); ++ if (entry == NULL) { ++ closedir(dir); ++ return false; ++ } else if (entry->d_name[0] != '.') { ++ ucs_strncpy_zero(dev_name, entry->d_name, sizeof(dev_name)); ++ break; ++ } ++ } ++ closedir(dir); ++ ++ /* read node guid */ ++ memset(guid_buf, 0, sizeof(guid_buf)); ++ ssize_t nread = ucs_read_file(guid_buf, sizeof(guid_buf), 1, ++ "/sys/class/infiniband/%s/node_guid", dev_name); ++ if (nread < 0) { ++ return false; ++ } ++ ++ /* use the device if node_guid != 0 */ ++ return strstr(guid_buf, "0000:0000:0000:0000") == NULL; + } + + uint16_t get_port() { +@@ -120,9 +144,10 @@ uint16_t get_port() { + + do { + addr_in.sin_port = htons(0); +- /* Ports below 1024 are considered "privileged" (can be used only by user root). +- * Ports above and including 1024 can be used by anyone */ +- ret = bind(sock_fd, (struct sockaddr*)&addr_in, sizeof(struct sockaddr_in)); ++ /* Ports below 1024 are considered "privileged" (can be used only by ++ * user root). Ports above and including 1024 can be used by anyone */ ++ ret = bind(sock_fd, (struct sockaddr*)&addr_in, ++ sizeof(struct sockaddr_in)); + } while (ret); + + ret = getsockname(sock_fd, (struct sockaddr*)&ret_addr, &len); +@@ -157,59 +182,3 @@ message_stream::~message_stream() { + } // detail + + } // ucs +- +-namespace ucp { +- +- +-data_type_desc_t & +-data_type_desc_t::make(ucp_datatype_t datatype, const void *buf, size_t length, +- size_t iov_cnt) +-{ +- EXPECT_FALSE(is_valid()); +- +- if (m_length == 0) { +- m_length = length; +- } +- +- if (m_origin == uintptr_t(NULL)) { +- m_origin = uintptr_t(buf); +- } +- +- m_dt = datatype; +- memset(m_iov, 0, sizeof(m_iov)); +- +- switch (m_dt & UCP_DATATYPE_CLASS_MASK) { +- case UCP_DATATYPE_CONTIG: +- m_buf = buf; +- m_count = length / ucp_contig_dt_elem_size(datatype); +- break; +- case UCP_DATATYPE_IOV: +- { +- const size_t iov_length = (length > iov_cnt) ? +- ucs::rand() % (length / iov_cnt) : 0; +- size_t iov_length_it = 0; +- for (size_t iov_it = 0; iov_it < iov_cnt - 1; ++iov_it) { +- m_iov[iov_it].buffer = (char *)(buf) + iov_length_it; +- m_iov[iov_it].length = iov_length; +- iov_length_it += iov_length; +- } +- +- /* Last entry */ +- m_iov[iov_cnt - 1].buffer = (char *)(buf) + iov_length_it; +- m_iov[iov_cnt - 1].length = length - iov_length_it; +- +- m_buf = m_iov; +- m_count = iov_cnt; +- break; +- } +- default: +- m_buf = NULL; +- m_count = 0; +- EXPECT_TRUE(false) << "Unsupported datatype"; +- break; +- } +- +- return *this; +-} +- +-} // ucp +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.h +index 8a0ad6e..afcfa24 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.h +@@ -10,12 +10,6 @@ + + #include "gtest.h" + +-#include +-extern "C" { +-#include +-#include +-} +- + #include + #include + #include +@@ -31,6 +25,138 @@ extern "C" { + #include + + ++#ifndef UINT16_MAX ++#define UINT16_MAX (65535) ++#endif /* UINT16_MAX */ ++ ++ ++/* Test output */ ++#define UCS_TEST_MESSAGE \ ++ ucs::detail::message_stream("INFO") ++ ++ ++/* Skip test */ ++#define UCS_TEST_SKIP \ ++ do { \ ++ throw ucs::test_skip_exception(); \ ++ } while(0) ++ ++ ++#define UCS_TEST_SKIP_R(_reason) \ ++ do { \ ++ throw ucs::test_skip_exception(_reason); \ ++ } while(0) ++ ++ ++/* Abort test */ ++#define UCS_TEST_ABORT(_message) \ ++ do { \ ++ std::stringstream ss; \ ++ ss << _message; \ ++ GTEST_MESSAGE_(ss.str().c_str(), ::testing::TestPartResult::kFatalFailure); \ ++ throw ucs::test_abort_exception(); \ ++ } while(0) ++ ++ ++/* UCS error check */ ++#define EXPECT_UCS_OK(_expr) \ ++ do { \ ++ ucs_status_t _status = (_expr); \ ++ EXPECT_EQ(UCS_OK, _status) << "Error: " << ucs_status_string(_status); \ ++ } while (0) ++ ++ ++#define ASSERT_UCS_OK(_expr, ...) \ ++ do { \ ++ ucs_status_t _status = (_expr); \ ++ if ((_status) != UCS_OK) { \ ++ UCS_TEST_ABORT("Error: " << ucs_status_string(_status) __VA_ARGS__); \ ++ } \ ++ } while (0) ++ ++ ++#define ASSERT_UCS_OK_OR_INPROGRESS(_expr) \ ++ do { \ ++ ucs_status_t _status = (_expr); \ ++ if (((_status) != UCS_OK) && ((_status) != UCS_INPROGRESS)) { \ ++ UCS_TEST_ABORT("Error: " << ucs_status_string(_status)); \ ++ } \ ++ } while (0) ++ ++ ++#define ASSERT_UCS_PTR_OK(_expr) \ ++ do { \ ++ ucs_status_ptr_t _status = (_expr); \ ++ if (UCS_PTR_IS_ERR(_status)) { \ ++ UCS_TEST_ABORT("Error: " << ucs_status_string(UCS_PTR_STATUS(_status))); \ ++ } \ ++ } while (0) ++ ++ ++#define EXPECT_UD_CHECK(_val1, _val2, _exp_ud, _exp_non_ud) \ ++ do { \ ++ if ((GetParam()->tl_name == "ud") || (GetParam()->tl_name == "ud_mlx5")) { \ ++ EXPECT_##_exp_ud(_val1, _val2); \ ++ } else { \ ++ EXPECT_##_exp_non_ud(_val1, _val2); \ ++ } \ ++ } while (0) ++ ++ ++/* Run code block with given time limit */ ++#define UCS_TEST_TIME_LIMIT(_seconds) \ ++ for (ucs_time_t _start_time = ucs_get_time(), _elapsed = 0; \ ++ _start_time != 0; \ ++ ((ucs_time_to_sec(_elapsed = ucs_get_time() - _start_time) >= \ ++ (_seconds) * ucs::test_time_multiplier()) && \ ++ (ucs::perf_retry_count > 0)) \ ++ ? (GTEST_NONFATAL_FAILURE_("Time limit exceeded:") << \ ++ "Expected time: " << ((_seconds) * ucs::test_time_multiplier()) << " seconds\n" << \ ++ "Actual time: " << ucs_time_to_sec(_elapsed) << " seconds", 0) \ ++ : 0, \ ++ _start_time = 0) ++ ++ ++/** ++ * Scoped exit for C++. Usage: ++ * ++ * UCS_TEST_SCOPE_EXIT() { } UCS_TEST_SCOPE_EXIT_END ++ */ ++#define _UCS_TEST_SCOPE_EXIT(_classname, ...) \ ++ class _classname { \ ++ public: \ ++ _classname() {} \ ++ ~_classname() ++#define UCS_TEST_SCOPE_EXIT(...) \ ++ _UCS_TEST_SCOPE_EXIT(UCS_PP_APPEND_UNIQUE_ID(onexit), ## __VA_ARGS__) ++ ++ ++#define UCS_TEST_SCOPE_EXIT_END \ ++ } UCS_PP_APPEND_UNIQUE_ID(onexit_var); ++ ++ ++/** ++ * Make uct_iov_t iov[iovcnt] array with pointer elements to original buffer ++ */ ++#define UCS_TEST_GET_BUFFER_IOV(_name_iov, _name_iovcnt, _buffer_ptr, _buffer_length, _memh, _iovcnt) \ ++ uct_iov_t _name_iov[_iovcnt]; \ ++ const size_t _name_iovcnt = _iovcnt; \ ++ const size_t _buffer_iov_length = _buffer_length / _name_iovcnt; \ ++ size_t _buffer_iov_length_it = 0; \ ++ for (size_t iov_it = 0; iov_it < _name_iovcnt; ++iov_it) { \ ++ _name_iov[iov_it].buffer = (char *)(_buffer_ptr) + _buffer_iov_length_it; \ ++ _name_iov[iov_it].count = 1; \ ++ _name_iov[iov_it].stride = 0; \ ++ _name_iov[iov_it].memh = _memh; \ ++ if (iov_it == (_name_iovcnt - 1)) { /* Last iteration */ \ ++ _name_iov[iov_it].length = _buffer_length - _buffer_iov_length_it; \ ++ } else { \ ++ _name_iov[iov_it].length = _buffer_iov_length; \ ++ _buffer_iov_length_it += _buffer_iov_length; \ ++ } \ ++ } ++ ++ + namespace ucs { + + class test_abort_exception : public std::exception { +@@ -51,8 +177,8 @@ public: + + private: + const bool m_failed; +-} +-; ++}; ++ + + class test_skip_exception : public std::exception { + public: +@@ -77,6 +203,11 @@ int test_time_multiplier(); + + + /** ++ * @return System limit on number of TCP connections. ++ */ ++int max_tcp_connections(); ++ ++/** + * Signal-safe sleep. + */ + void safe_sleep(double sec); +@@ -90,9 +221,9 @@ bool is_inet_addr(const struct sockaddr* ifa_addr); + + + /** +- * Check if the given interface is associated with a device. ++ * Check if the given network device is supported by rdmacm. + */ +-bool is_ib_netdev(const char *ifa_name); ++bool is_rdmacm_netdev(const char *ifa_name); + + + /** +@@ -125,7 +256,8 @@ template + static std::ostream& operator<<(std::ostream& os, const std::vector& vec) { + static const size_t LIMIT = 2000; + size_t i = 0; +- for (std::vector::const_iterator iter = vec.begin(); iter != vec.end(); ++iter) { ++ for (std::vector::const_iterator iter = vec.begin(); ++ iter != vec.end(); ++iter) { + if (i >= LIMIT) { + os << "..."; + break; +@@ -159,7 +291,8 @@ static void fill_random(C& c, size_t size) { + + template + static inline T random_upper() { +- return static_cast((rand() / static_cast(RAND_MAX)) * std::numeric_limits::max()); ++ return static_cast((rand() / static_cast(RAND_MAX)) * ++ std::numeric_limits::max()); + } + + template +@@ -319,15 +452,16 @@ public: + EXPECT_TRUE(value != NULL); + } + +- handle(const T& value, dtor2_t dtor, ArgT *arg) : ++ handle(const T& value, dtor2_t dtor, ArgT arg) : + m_initialized(true), m_value(value), m_dtor(NULL), + m_dtor_with_arg(dtor), m_dtor_arg(arg) + { + EXPECT_TRUE(value != NULL); + } + +- handle(const handle& other) : m_initialized(false), m_value(NULL), m_dtor(NULL), +- m_dtor_with_arg(NULL), m_dtor_arg(NULL) { ++ handle(const handle& other) : m_initialized(false), m_value(NULL), ++ m_dtor(NULL), m_dtor_with_arg(NULL), ++ m_dtor_arg(NULL) { + *this = other; + } + +@@ -507,201 +641,4 @@ private: + + } // ucs + +- +-namespace ucp { +- +-class data_type_desc_t { +-public: +- data_type_desc_t() +- : m_origin(uintptr_t(NULL)), m_length(0), m_dt(0), m_buf(NULL), +- m_count(0), m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { +- memset(m_iov, 0, sizeof(m_iov)); +- }; +- +- data_type_desc_t(ucp_datatype_t datatype, const void *buf, size_t length) +- : m_origin(uintptr_t(buf)), m_length(length), m_buf(NULL), +- m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { +- make(datatype, buf, length); +- } +- +- data_type_desc_t(ucp_datatype_t datatype, const void *buf, size_t length, +- size_t iov_count) +- : m_origin(uintptr_t(buf)), m_length(length), m_buf(NULL), +- m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { +- make(datatype, buf, length, iov_count); +- }; +- +- data_type_desc_t &make(ucp_datatype_t datatype, const void *buf, +- size_t length, size_t iov_count); +- +- data_type_desc_t &make(ucp_datatype_t datatype, const void *buf, +- size_t length) { +- return make(datatype, buf, length, m_iov_cnt_limit); +- }; +- +- data_type_desc_t &forward_to(size_t offset) { +- EXPECT_LE(offset, m_length); +- invalidate(); +- return make(m_dt, (const void *)(m_origin + offset), m_length - offset, +- m_iov_cnt_limit); +- }; +- +- ucp_datatype_t dt() const { +- EXPECT_TRUE(is_valid()); +- return m_dt; +- }; +- +- void *buf() const { +- EXPECT_TRUE(is_valid()); +- return const_cast(m_buf); +- }; +- +- size_t count() const { +- EXPECT_TRUE(is_valid()); +- return m_count; +- }; +- +- bool is_valid() const { +- return (m_buf != NULL) && (m_count != 0) && +- (UCP_DT_IS_IOV(m_dt) ? (m_count <= m_iov_cnt_limit) : +- UCP_DT_IS_CONTIG(m_dt)); +- } +- +-private: +- void invalidate() { +- EXPECT_TRUE(is_valid()); +- m_buf = NULL; +- m_count = 0; +- } +- +- uintptr_t m_origin; +- size_t m_length; +- +- ucp_datatype_t m_dt; +- const void *m_buf; +- size_t m_count; +- +- const size_t m_iov_cnt_limit; +- ucp_dt_iov_t m_iov[40]; +-}; +- +-} // ucp +- +- +-#ifndef UINT16_MAX +-#define UINT16_MAX (65535) +-#endif /* UINT16_MAX */ +- +- +-/* Test output */ +-#define UCS_TEST_MESSAGE \ +- ucs::detail::message_stream("INFO") +- +- +-/* Skip test */ +-#define UCS_TEST_SKIP \ +- do { \ +- throw ucs::test_skip_exception(); \ +- } while(0) +-#define UCS_TEST_SKIP_R(_reason) \ +- do { \ +- throw ucs::test_skip_exception(_reason); \ +- } while(0) +- +- +-/* Abort test */ +-#define UCS_TEST_ABORT(_message) \ +- do { \ +- std::stringstream ss; \ +- ss << _message; \ +- GTEST_MESSAGE_(ss.str().c_str(), ::testing::TestPartResult::kFatalFailure); \ +- throw ucs::test_abort_exception(); \ +- } while(0) +- +- +-/* UCS error check */ +-#define EXPECT_UCS_OK(_expr) \ +- do { \ +- ucs_status_t _status = (_expr); \ +- EXPECT_EQ(UCS_OK, _status) << "Error: " << ucs_status_string(_status); \ +- } while (0) +- +-#define ASSERT_UCS_OK(_expr, ...) \ +- do { \ +- ucs_status_t _status = (_expr); \ +- if ((_status) != UCS_OK) { \ +- UCS_TEST_ABORT("Error: " << ucs_status_string(_status) __VA_ARGS__); \ +- } \ +- } while (0) +- +-#define ASSERT_UCS_OK_OR_INPROGRESS(_expr) \ +- do { \ +- ucs_status_t _status = (_expr); \ +- if ((status) != UCS_OK && (_status) != UCS_INPROGRESS) { \ +- UCS_TEST_ABORT("Error: " << ucs_status_string(_status)); \ +- } \ +- } while (0) +- +-#define EXPECT_UD_CHECK(_val1, _val2, _exp_ud, _exp_non_ud) \ +- do { \ +- if ((GetParam()->tl_name == "ud") || (GetParam()->tl_name == "ud_mlx5")) { \ +- EXPECT_##_exp_ud(_val1, _val2); \ +- } else { \ +- EXPECT_##_exp_non_ud(_val1, _val2); \ +- } \ +- } while (0) +- +- +-/* Run code block with given time limit */ +-#define UCS_TEST_TIME_LIMIT(_seconds) \ +- for (ucs_time_t _start_time = ucs_get_time(), _elapsed = 0; \ +- _start_time != 0; \ +- ((ucs_time_to_sec(_elapsed = ucs_get_time() - _start_time) >= \ +- (_seconds) * ucs::test_time_multiplier()) && \ +- (ucs::perf_retry_count > 0)) \ +- ? (GTEST_NONFATAL_FAILURE_("Time limit exceeded:") << \ +- "Expected time: " << ((_seconds) * ucs::test_time_multiplier()) << " seconds\n" << \ +- "Actual time: " << ucs_time_to_sec(_elapsed) << " seconds", 0) \ +- : 0, \ +- _start_time = 0) +- +- +-/** +- * Scoped exit for C++. Usage: +- * +- * UCS_TEST_SCOPE_EXIT() { } UCS_TEST_SCOPE_EXIT_END +- */ +-#define _UCS_TEST_SCOPE_EXIT(_classname, ...) \ +- class _classname { \ +- public: \ +- _classname() {} \ +- ~_classname() +-#define UCS_TEST_SCOPE_EXIT(...) \ +- _UCS_TEST_SCOPE_EXIT(UCS_PP_APPEND_UNIQUE_ID(onexit), ## __VA_ARGS__) +- +-#define UCS_TEST_SCOPE_EXIT_END \ +- } UCS_PP_APPEND_UNIQUE_ID(onexit_var); +- +-/** +- * Make uct_iov_t iov[iovcnt] array with pointer elements to original buffer +- */ +-#define UCS_TEST_GET_BUFFER_IOV(_name_iov, _name_iovcnt, _buffer_ptr, _buffer_length, _memh, _iovcnt) \ +- uct_iov_t _name_iov[_iovcnt]; \ +- const size_t _name_iovcnt = _iovcnt; \ +- const size_t _buffer_iov_length = _buffer_length / _name_iovcnt; \ +- size_t _buffer_iov_length_it = 0; \ +- for (size_t iov_it = 0; iov_it < _name_iovcnt; ++iov_it) { \ +- _name_iov[iov_it].buffer = (char *)(_buffer_ptr) + _buffer_iov_length_it; \ +- _name_iov[iov_it].count = 1; \ +- _name_iov[iov_it].stride = 0; \ +- _name_iov[iov_it].memh = _memh; \ +- if (iov_it == (_name_iovcnt - 1)) { /* Last iteration */ \ +- _name_iov[iov_it].length = _buffer_length - _buffer_iov_length_it; \ +- } else { \ +- _name_iov[iov_it].length = _buffer_iov_length; \ +- _buffer_iov_length_it += _buffer_iov_length; \ +- } \ +- } +- +- +-#endif ++#endif /* UCS_TEST_HELPERS_H */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_obj_size.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_obj_size.cc +index 4d7bd40..fd8a051 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_obj_size.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_obj_size.cc +@@ -11,12 +11,13 @@ + #include + #include + ++extern "C" { + #include + #include + #include + #include + #include +-#include ++#include + #include + #if HAVE_TL_RC + # include +@@ -30,11 +31,12 @@ + # include + # include + #endif ++} + + class test_obj_size : public ucs::test { + }; + +-#define EXPECTED_SIZE(_obj, _size) EXPECT_EQ(sizeof(_obj), (size_t)_size) ++#define EXPECTED_SIZE(_obj, _size) EXPECT_EQ((size_t)_size, sizeof(_obj)) + + UCS_TEST_F(test_obj_size, size) { + +@@ -42,9 +44,12 @@ UCS_TEST_F(test_obj_size, size) { + UCS_TEST_SKIP_R("Debug data"); + #elif ENABLE_STATS + UCS_TEST_SKIP_R("Statistic enabled"); ++#elif ENABLE_ASSERT ++ UCS_TEST_SKIP_R("Assert enabled"); + #else +- EXPECTED_SIZE(ucp_ep_t, 104); +- EXPECTED_SIZE(ucp_request_t, 224); ++ EXPECTED_SIZE(ucp_ep_t, 64); ++ EXPECTED_SIZE(ucp_request_t, 232); ++ EXPECTED_SIZE(ucp_recv_desc_t, 48); + EXPECTED_SIZE(uct_ep_t, 8); + EXPECTED_SIZE(uct_base_ep_t, 8); + EXPECTED_SIZE(uct_rkey_bundle_t, 24); +@@ -64,8 +69,8 @@ UCS_TEST_F(test_obj_size, size) { + EXPECTED_SIZE(uct_dc_verbs_ep_t, 40); + # endif + # if HAVE_TL_UD +- EXPECTED_SIZE(uct_ud_ep_t, 248); +- EXPECTED_SIZE(uct_ud_verbs_ep_t, 264); ++ EXPECTED_SIZE(uct_ud_ep_t, 240); ++ EXPECTED_SIZE(uct_ud_verbs_ep_t, 256); + # endif + #endif + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.cc +index f46ba36..ef27243 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.cc +@@ -28,7 +28,8 @@ void test_perf::rte_comm::push(const void *data, size_t size) { + pthread_mutex_unlock(&m_mutex); + } + +-void test_perf::rte_comm::pop(void *data, size_t size) { ++void test_perf::rte_comm::pop(void *data, size_t size, ++ void (*progress)(void *arg), void *arg) { + bool done = false; + do { + pthread_mutex_lock(&m_mutex); +@@ -38,6 +39,9 @@ void test_perf::rte_comm::pop(void *data, size_t size) { + done = true; + } + pthread_mutex_unlock(&m_mutex); ++ if (!done) { ++ progress(arg); ++ } + } while (!done); + } + +@@ -59,13 +63,14 @@ unsigned test_perf::rte::group_index(void *rte_group) { + return self->index(); + } + +-void test_perf::rte::barrier(void *rte_group) { ++void test_perf::rte::barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg) { + static const uint32_t magic = 0xdeadbeed; + rte *self = reinterpret_cast(rte_group); + uint32_t dummy = magic; + self->m_send.push(&dummy, sizeof(dummy)); + dummy = 0; +- self->m_recv.pop(&dummy, sizeof(dummy)); ++ self->m_recv.pop(&dummy, sizeof(dummy), progress, arg); + ucs_assert_always(dummy == magic); + } + +@@ -97,9 +102,9 @@ void test_perf::rte::recv(void *rte_group, unsigned src, void *buffer, + return; + } + +- self->m_recv.pop(&size, sizeof(size)); ++ self->m_recv.pop(&size, sizeof(size), (void(*)(void*))ucs_empty_function, NULL); + ucs_assert_always(size <= max); +- self->m_recv.pop(buffer, size); ++ self->m_recv.pop(buffer, size, (void(*)(void*))ucs_empty_function, NULL); + } + + void test_perf::rte::exchange_vec(void *rte_group, void * req) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.h +index 743d5cd..48952b1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.h +@@ -45,7 +45,7 @@ private: + + void push(const void *data, size_t size); + +- void pop(void *data, size_t size); ++ void pop(void *data, size_t size, void (*progress)(void *arg), void *arg); + + private: + pthread_mutex_t m_mutex; +@@ -63,7 +63,8 @@ private: + + static unsigned group_index(void *rte_group); + +- static void barrier(void *rte_group); ++ static void barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg); + + static void post_vec(void *rte_group, const struct iovec *iovec, + int iovcnt, void **req); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/cuda_hooks.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/cuda_hooks.cc +index a3feec3..9e2ce5a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/cuda_hooks.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/cuda_hooks.cc +@@ -7,66 +7,229 @@ + #include + #include + +-class cuda_hook : public ucs::test { +-}; ++static ucm_event_t alloc_event, free_event; + +-static void *free_ptr; +-static void cuda_mem_event_callback(ucm_event_type_t event_type, ++static void cuda_mem_alloc_callback(ucm_event_type_t event_type, + ucm_event_t *event, void *arg) + { +- free_ptr = event->vm_unmapped.address; ++ alloc_event.mem_type.address = event->mem_type.address; ++ alloc_event.mem_type.size = event->mem_type.size; ++ alloc_event.mem_type.mem_type = event->mem_type.mem_type; + } + +-UCS_TEST_F(cuda_hook, cudafree) { +- ucs_status_t result; +- cudaError_t ret; +- void *ptr, *ptr1; ++static void cuda_mem_free_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, void *arg) ++{ ++ free_event.mem_type.address = event->mem_type.address; ++ free_event.mem_type.size = event->mem_type.size; ++ free_event.mem_type.mem_type = event->mem_type.mem_type; ++} ++ ++ ++class cuda_hooks : public ucs::test { ++protected: ++ ++ virtual void init() { ++ ucs_status_t result; ++ CUresult ret; ++ ucs::test::init(); ++ ++ /* intialize device context */ ++ if (cudaSetDevice(0) != cudaSuccess) { ++ UCS_TEST_SKIP_R("can't set cuda device"); ++ } ++ ++ ret = cuInit(0); ++ if (ret != CUDA_SUCCESS) { ++ UCS_TEST_SKIP_R("can't init cuda device"); ++ } ++ ++ ret = cuDeviceGet(&device, 0); ++ if (ret != CUDA_SUCCESS) { ++ UCS_TEST_SKIP_R("can't get cuda device"); ++ } ++ ++ ret = cuCtxCreate(&context, 0, device); ++ if (ret != CUDA_SUCCESS) { ++ UCS_TEST_SKIP_R("can't create cuda context"); ++ } ++ ++ /* install memory hooks */ ++ result = ucm_set_event_handler(UCM_EVENT_MEM_TYPE_ALLOC, 0, cuda_mem_alloc_callback, ++ reinterpret_cast(this)); ++ ASSERT_UCS_OK(result); ++ ++ result = ucm_set_event_handler(UCM_EVENT_MEM_TYPE_FREE, 0, cuda_mem_free_callback, ++ reinterpret_cast(this)); ++ ASSERT_UCS_OK(result); ++ } + +- /* set cuda device */ +- if (cudaSetDevice(0) != cudaSuccess) { +- UCS_TEST_SKIP_R("can't set cuda device"); ++ virtual void cleanup() { ++ CUresult ret; ++ ++ ucm_unset_event_handler(UCM_EVENT_MEM_TYPE_ALLOC, cuda_mem_alloc_callback, ++ reinterpret_cast(this)); ++ ucm_unset_event_handler(UCM_EVENT_MEM_TYPE_FREE, cuda_mem_free_callback, ++ reinterpret_cast(this)); ++ ++ ret = cuCtxDestroy(context); ++ EXPECT_EQ(ret, CUDA_SUCCESS); ++ ++ ucs::test::cleanup(); ++ } ++ ++ ++ void check_mem_alloc_events(void *ptr, size_t size, ++ int expect_mem_type = UCM_MEM_TYPE_CUDA) { ++ ASSERT_EQ(ptr, alloc_event.mem_type.address); ++ ASSERT_EQ(size, alloc_event.mem_type.size); ++ ASSERT_EQ(expect_mem_type, alloc_event.mem_type.mem_type); + } + +- /* Install memory hooks */ +- result = ucm_set_event_handler(UCM_EVENT_VM_UNMAPPED, 0, cuda_mem_event_callback, +- reinterpret_cast(this)); +- ASSERT_UCS_OK(result); ++ void check_mem_free_events(void *ptr, size_t size, ++ int expect_mem_type = UCM_MEM_TYPE_CUDA) { ++ ASSERT_EQ(ptr, free_event.mem_type.address); ++ ASSERT_EQ(expect_mem_type, free_event.mem_type.mem_type); ++ } ++ ++ CUdevice device; ++ CUcontext context; ++}; ++ ++UCS_TEST_F(cuda_hooks, test_cuMem_Alloc_Free) { ++ CUresult ret; ++ CUdeviceptr dptr, dptr1; ++ ++ /* small allocation */ ++ ret = cuMemAlloc(&dptr, 64); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, 64); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, 64); ++ ++ /* large allocation */ ++ ret = cuMemAlloc(&dptr, (256 * 1024 *1024)); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, (256 * 1024 *1024)); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, (256 * 1024 *1024)); ++ ++ /* multiple allocations, cudafree in reverse order */ ++ ret = cuMemAlloc(&dptr, (1 * 1024 *1024)); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, (1 * 1024 *1024)); ++ ++ ret = cuMemAlloc(&dptr1, (1 * 1024 *1024)); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr1, (1 * 1024 *1024)); ++ ++ ret = cuMemFree(dptr1); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr1, (1 * 1024 *1024)); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, (1 * 1024 *1024)); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cuMemAllocManaged) { ++ CUresult ret; ++ CUdeviceptr dptr; ++ ++ ret = cuMemAllocManaged(&dptr, 64, CU_MEM_ATTACH_GLOBAL); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, 64, UCM_MEM_TYPE_CUDA_MANAGED); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, 0); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cuMemAllocPitch) { ++ CUresult ret; ++ CUdeviceptr dptr; ++ size_t pitch; ++ ++ ret = cuMemAllocPitch(&dptr, &pitch, 4, 8, 4); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, (4 * 8)); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, 0); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cuda_Malloc_Free) { ++ cudaError_t ret; ++ void *ptr, *ptr1; + + /* small allocation */ +- free_ptr = NULL; + ret = cudaMalloc(&ptr, 64); +- EXPECT_EQ(ret, cudaSuccess); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr, 64); + + ret = cudaFree(ptr); +- EXPECT_EQ(ret, cudaSuccess); +- EXPECT_EQ(ptr, free_ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr, 64); + + /* large allocation */ +- free_ptr = NULL; + ret = cudaMalloc(&ptr, (256 * 1024 *1024)); +- EXPECT_EQ(ret, cudaSuccess); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr, (256 * 1024 *1024)); + + ret = cudaFree(ptr); +- EXPECT_EQ(ret, cudaSuccess); +- EXPECT_EQ(ptr, free_ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr, (256 * 1024 *1024)); + + /* multiple allocations, cudafree in reverse order */ +- free_ptr = NULL; + ret = cudaMalloc(&ptr, (1 * 1024 *1024)); +- EXPECT_EQ(ret, cudaSuccess); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr, (1 * 1024 *1024)); + + ret = cudaMalloc(&ptr1, (1 * 1024 *1024)); +- EXPECT_EQ(ret, cudaSuccess); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr1, (1 * 1024 *1024)); + + ret = cudaFree(ptr1); +- EXPECT_EQ(ret, cudaSuccess); +- EXPECT_EQ(ptr1, free_ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr1, (1 * 1024 *1024)); ++ ++ ret = cudaFree(ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr, (1 * 1024 *1024)); ++ ++ /* cudaFree with NULL */ ++ ret = cudaFree(NULL); ++ ASSERT_EQ(ret, cudaSuccess); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cudaMallocManaged) { ++ cudaError_t ret; ++ void *ptr; ++ ++ ret = cudaMallocManaged(&ptr, 64, cudaMemAttachGlobal); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr, 64, UCM_MEM_TYPE_CUDA_MANAGED); + +- free_ptr = NULL; + ret = cudaFree(ptr); +- EXPECT_EQ(ret, cudaSuccess); +- EXPECT_EQ(ptr, free_ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr, 0); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cudaMallocPitch) { ++ cudaError_t ret; ++ void *devPtr; ++ size_t pitch; ++ ++ ret = cudaMallocPitch(&devPtr, &pitch, 4, 8); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(devPtr, (4 * 8)); + +- ucm_unset_event_handler(UCM_EVENT_VM_UNMAPPED, cuda_mem_event_callback, +- reinterpret_cast(this)); ++ ret = cudaFree(devPtr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(devPtr, 0); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/malloc_hook.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/malloc_hook.cc +index dbb767a..5dd5005 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/malloc_hook.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/malloc_hook.cc +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -15,11 +15,13 @@ + #include + #include + #include ++#include ++#include + + extern "C" { + #include + #include +-#include ++#include + #include + #include + } +@@ -28,93 +30,166 @@ extern "C" { + # define HAVE_MALLOC_STATES 1 + #endif /* HAVE_MALLOC_SET_STATE && HAVE_MALLOC_GET_STATE */ + ++#define EXPECT_INCREASED(_value, _prev, _size, _name) \ ++ { \ ++ EXPECT_GE(_value, (_prev) + (_size)) << _name; \ ++ _prev = _value; \ ++ } ++ ++template ++class mhook_thread { ++public: ++ mhook_thread(T *test): m_test(test) ++ { ++ pthread_create(&m_thread, NULL, thread_func, reinterpret_cast(m_test)); ++ } ++ ++ ~mhook_thread() { ++ join(); ++ delete m_test; ++ } ++ ++ void join() { ++ void *retval; ++ pthread_join(m_thread, &retval); ++ } ++ ++protected: ++ T *m_test; ++ pthread_t m_thread; ++ ++ static void *thread_func(void *arg) { ++ T *test = reinterpret_cast(arg); ++ test->test(); ++ return NULL; ++ } ++}; ++ ++template ++class mmap_event { ++public: ++ mmap_event(T *test): m_test(test), m_events(0) ++ { ++ } ++ ++ ~mmap_event() ++ { ++ unset(); ++ } ++ ++ ucs_status_t set(int events) ++ { ++ ucs_status_t status; ++ ++ status = ucm_set_event_handler(events, 0, mem_event_callback, ++ reinterpret_cast(m_test)); ++ ASSERT_UCS_OK(status); ++ m_events |= events; ++ return status; ++ } ++ ++ void unset() ++ { ++ if (m_events) { ++ ucm_unset_event_handler(m_events, mem_event_callback, ++ reinterpret_cast(m_test)); ++ m_events = 0; ++ } ++ } ++ ++protected: ++ T *m_test; ++ int m_events; ++ ++ static void mem_event_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, ++ void *arg) ++ { ++ T *test = reinterpret_cast(arg); ++ test->mem_event(event_type, event); ++ } ++}; ++ + + class malloc_hook : public ucs::test { ++ friend class mmap_event; + protected: ++ void mem_event(ucm_event_type_t event_type, ucm_event_t *event) ++ { ++ m_got_event = 1; ++ } ++ + virtual void init() { +- size_t free_space, min_free_space, prev_free_space, alloc_size; +- struct mallinfo mi; ++ ucs_status_t status; ++ mmap_event event(this); + ++ m_got_event = 0; + ucm_malloc_state_reset(128 * 1024, 128 * 1024); + malloc_trim(0); +- +- /* Take up free space so we would definitely get mmap events */ +- min_free_space = SIZE_MAX; +- alloc_size = 0; +- mi = mallinfo(); +- prev_free_space = mi.fsmblks + mi.fordblks; +- +- while (alloc_size < (size_t)(prev_free_space * 0.90)) { +- m_pts.push_back(malloc(small_alloc_size)); +- alloc_size += small_alloc_size; +- } ++ status = event.set(UCM_EVENT_VM_MAPPED); ++ ASSERT_UCS_OK(status); + + for (;;) { + void *ptr = malloc(small_alloc_size); +- mi = mallinfo(); +- free_space = mi.fsmblks + mi.fordblks; +- if (free_space > min_free_space) { ++ if (m_got_event) { + /* If the heap grew, the minimal size is the previous one */ + free(ptr); +- min_free_space = free_space; + break; + } else { + m_pts.push_back(ptr); +- alloc_size += small_alloc_size; +- min_free_space = free_space; + } + } ++ event.unset(); ++ } + +- UCS_TEST_MESSAGE << "Reduced heap free space from " << prev_free_space << +- " to " << free_space << " after allocating " << +- alloc_size << " bytes"; ++ static int bistro_munmap_hook(void *addr, size_t length) ++ { ++ UCM_BISTRO_PROLOGUE; ++ bistro_call_counter++; ++ int res = (intptr_t)syscall(SYS_munmap, addr, length); ++ UCM_BISTRO_EPILOGUE; ++ return res; ++ } ++ ++ void skip_on_bistro() { ++ /* BISTRO is disabled under valgrind, we may run tests */ ++ if ((ucm_global_opts.mmap_hook_mode == UCM_MMAP_HOOK_BISTRO) && ++ !RUNNING_ON_VALGRIND) { ++ UCS_TEST_SKIP_R("skipping on BISTRO hooks"); ++ } + } + + public: + static int small_alloc_count; +- static const size_t small_alloc_size = 10000; ++ static const size_t small_alloc_size = 10000; + ucs::ptr_vector m_pts; ++ int m_got_event; ++ static volatile int bistro_call_counter; + }; + +-int malloc_hook::small_alloc_count = 1000 / ucs::test_time_multiplier(); ++int malloc_hook::small_alloc_count = 1000 / ucs::test_time_multiplier(); ++volatile int malloc_hook::bistro_call_counter = 0; + + class test_thread { + public: + test_thread(const std::string& name, int num_threads, pthread_barrier_t *barrier, +- malloc_hook *test) : ++ malloc_hook *test, void (test_thread::*test_func)() = &test_thread::test) : + m_name(name), m_num_threads(num_threads), m_barrier(barrier), +- m_map_size(0), m_unmap_size(0), m_test(test) ++ m_map_size(0), m_unmap_size(0), m_test(test), m_event(this) + { + pthread_mutex_init(&m_stats_lock, NULL); +- pthread_create(&m_thread, NULL, thread_func, reinterpret_cast(this)); + } + + ~test_thread() { +- join(); + pthread_mutex_destroy(&m_stats_lock); + } + +- void join() { +- void *retval; +- pthread_join(m_thread, &retval); +- } ++ void test(); ++ void mem_event(ucm_event_type_t event_type, ucm_event_t *event); + + private: + typedef std::pair range; + +- static void *thread_func(void *arg) { +- test_thread *self = reinterpret_cast(arg); +- self->test(); +- return NULL; +- } +- +- static void mem_event_callback(ucm_event_type_t event_type, ucm_event_t *event, +- void *arg) +- { +- test_thread *self = reinterpret_cast(arg); +- self->mem_event(event_type, event); +- } +- + bool is_ptr_in_range(void *ptr, size_t size, const std::vector &ranges) { + for (std::vector::const_iterator iter = ranges.begin(); iter != ranges.end(); ++iter) { + if ((ptr >= iter->first) && ((char*)ptr < iter->second)) { +@@ -124,16 +199,12 @@ private: + return false; + } + +- void test(); +- void mem_event(ucm_event_type_t event_type, ucm_event_t *event); +- + static pthread_mutex_t lock; + static pthread_barrier_t barrier; + + std::string m_name; + int m_num_threads; + pthread_barrier_t *m_barrier; +- pthread_t m_thread; + + pthread_mutex_t m_stats_lock; + size_t m_map_size; +@@ -142,6 +213,7 @@ private: + std::vector m_unmap_ranges; + + malloc_hook *m_test; ++ mmap_event m_event; + }; + + pthread_mutex_t test_thread::lock = PTHREAD_MUTEX_INITIALIZER; +@@ -192,9 +264,7 @@ void test_thread::test() { + pthread_barrier_wait(m_barrier); + + /* Install memory hooks */ +- result = ucm_set_event_handler(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED, +- 0, mem_event_callback, +- reinterpret_cast(this)); ++ result = m_event.set(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED); + ASSERT_UCS_OK(result); + + /* Allocate small pointers with new heap manager */ +@@ -316,32 +386,36 @@ void test_thread::test() { + std::cout.flush(); + pthread_mutex_unlock(&lock); + +- ucm_unset_event_handler(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED, +- mem_event_callback, +- reinterpret_cast(this)); ++ m_event.unset(); + } + + UCS_TEST_F(malloc_hook, single_thread) { ++ skip_on_bistro(); ++ + pthread_barrier_t barrier; + pthread_barrier_init(&barrier, NULL, 1); + { +- test_thread thread("single-thread", 1, &barrier, this); ++ mhook_thread(new test_thread("single-thread", 1, &barrier, this)); + } + pthread_barrier_destroy(&barrier); + } + + UCS_TEST_F(malloc_hook, multi_threads) { ++ typedef mhook_thread thread_t; ++ + static const int num_threads = 8; +- ucs::ptr_vector threads; ++ ucs::ptr_vector threads; + pthread_barrier_t barrier; + ++ skip_on_bistro(); ++ + malloc_trim(0); + + pthread_barrier_init(&barrier, NULL, num_threads); + for (int i = 0; i < num_threads; ++i) { + std::stringstream ss; + ss << "thread " << i << "/" << num_threads; +- threads.push_back(new test_thread(ss.str(), num_threads, &barrier, this)); ++ threads.push_back(new thread_t(new test_thread(ss.str(), num_threads, &barrier, this))); + } + + threads.clear(); +@@ -384,44 +458,39 @@ public: + + malloc_hook_cplusplus() : + m_mapped_size(0), m_unmapped_size(0), +- m_dynamic_mmap_config(ucm_global_config.enable_dynamic_mmap_thresh) { ++ m_dynamic_mmap_config(ucm_global_opts.enable_dynamic_mmap_thresh), ++ m_event(this) { + } + + ~malloc_hook_cplusplus() { +- ucm_global_config.enable_dynamic_mmap_thresh = m_dynamic_mmap_config; ++ ucm_global_opts.enable_dynamic_mmap_thresh = m_dynamic_mmap_config; + } + + void set() { + ucs_status_t status; +- status = ucm_set_event_handler(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED, +- 0, mem_event_callback, +- reinterpret_cast(this)); ++ status = m_event.set(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED); + ASSERT_UCS_OK(status); + } + + void unset() { +- ucm_unset_event_handler(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED, +- mem_event_callback, reinterpret_cast(this)); ++ m_event.unset(); + } + +-protected: +- static void mem_event_callback(ucm_event_type_t event_type, +- ucm_event_t *event, void *arg) ++ void mem_event(ucm_event_type_t event_type, ucm_event_t *event) + { +- malloc_hook_cplusplus *self = +- reinterpret_cast(arg); + switch (event_type) { + case UCM_EVENT_VM_MAPPED: +- self->m_mapped_size += event->vm_mapped.size; ++ m_mapped_size += event->vm_mapped.size; + break; + case UCM_EVENT_VM_UNMAPPED: +- self->m_unmapped_size += event->vm_unmapped.size; ++ m_unmapped_size += event->vm_unmapped.size; + break; + default: + break; + } + } + ++protected: + double measure_alloc_time(size_t size, unsigned iters) + { + ucs_time_t start_time = ucs_get_time(); +@@ -459,7 +528,7 @@ protected: + + m_unmapped_size = 0; + strs.clear(); +- if (ucm_global_config.enable_dynamic_mmap_thresh) { ++ if (ucm_global_opts.enable_dynamic_mmap_thresh) { + EXPECT_EQ(0ul, m_unmapped_size); + } else { + EXPECT_GE(m_unmapped_size, size); +@@ -471,6 +540,139 @@ protected: + size_t m_mapped_size; + size_t m_unmapped_size; + int m_dynamic_mmap_config; ++ mmap_event m_event; ++}; ++ ++ ++class mmap_hooks { ++public: ++ mmap_hooks(const std::string& name, int num_threads, pthread_barrier_t *barrier): ++ m_num_threads(num_threads), m_mapped_size(0), m_unmapped_size(0), ++ m_name(name), m_barrier(barrier), m_event(this) ++ { ++ } ++ ++ void mem_event(ucm_event_type_t event_type, ucm_event_t *event) ++ { ++ switch (event_type) { ++ case UCM_EVENT_VM_MAPPED: ++ m_mapped_size += event->vm_mapped.size; ++ break; ++ case UCM_EVENT_VM_UNMAPPED: ++ m_unmapped_size += event->vm_unmapped.size; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ void test() ++ { ++ /* ++ * Test memory mapping functions which override an existing mapping ++ */ ++ size_t size = ucs_get_page_size() * 800; ++ size_t mapped_size = 0; ++ size_t unmapped_size = 0; ++ void *buffer; ++ int shmid; ++ ucs_status_t status; ++ ++ EXPECT_EQ(0u, m_mapped_size) << m_name; ++ EXPECT_EQ(0u, m_unmapped_size) << m_name; ++ ++ status = m_event.set(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED); ++ ASSERT_UCS_OK(status); ++ ++ pthread_barrier_wait(m_barrier); ++ ++ /* 1. Map a large buffer */ ++ { ++ buffer = mmap(NULL, size, PROT_READ|PROT_WRITE, ++ MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); ++ ASSERT_NE(MAP_FAILED, buffer) << strerror(errno); ++ ++ EXPECT_INCREASED(m_mapped_size, mapped_size, size, m_name); ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, 0, m_name); ++ } ++ ++ /* ++ * 2. Map another buffer in the same place. ++ * Expected behavior: unmap event on the old buffer ++ */ ++ { ++ void *remap = mmap(buffer, size, PROT_READ|PROT_WRITE, ++ MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0); ++ ASSERT_EQ(buffer, remap); ++ ++ EXPECT_INCREASED(m_mapped_size, mapped_size, size, m_name); ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ ++ /* 3. Create a shared memory segment */ ++ { ++ shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | SHM_R | SHM_W); ++ ASSERT_NE(-1, shmid) << strerror(errno) << m_name; ++ } ++ ++ /* ++ * 4. Attach the segment at the same buffer address. ++ * Expected behavior: unmap event on the old buffer ++ */ ++ { ++ void *shmaddr = shmat(shmid, buffer, SHM_REMAP); ++ ASSERT_EQ(buffer, shmaddr) << m_name; ++ ++ EXPECT_INCREASED(m_mapped_size, mapped_size, size, m_name); ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ ++ /* 5. Detach the sysv segment */ ++ { ++ shmdt(buffer); ++ ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ ++ /* 6. Remove the shared memory segment */ ++ { ++ int ret = shmctl(shmid, IPC_RMID, NULL); ++ ASSERT_NE(-1, ret) << strerror(errno); ++ } ++ ++ /* 7. Unmap the buffer */ ++ { ++ munmap(buffer, size); ++ ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ ++ /* 8. sbrk call - single thread only */ ++ { ++ if (!RUNNING_ON_VALGRIND && m_num_threads < 2) { ++ /* valgrind failed when sbrk is called directly, ++ * also sbrk is not thread safe */ ++ ++ /* sbrk call is used to extend/cut memory heap, ++ * don't add any evaluations between calls sbrk+/sbrk- - it ++ * may break heap */ ++ sbrk(size); ++ sbrk(-size); ++ ++ EXPECT_INCREASED(m_mapped_size, mapped_size, size, m_name); ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ } ++ pthread_barrier_wait(m_barrier); ++ } ++ ++protected: ++ int m_num_threads; ++ size_t m_mapped_size; ++ size_t m_unmapped_size; ++ std::string m_name; ++ pthread_barrier_t *m_barrier; ++ mmap_event m_event; + }; + + +@@ -503,12 +705,16 @@ UCS_TEST_F(malloc_hook_cplusplus, dynamic_mmap_enable) { + if (RUNNING_ON_VALGRIND) { + UCS_TEST_SKIP_R("skipping on valgrind"); + } +- EXPECT_TRUE(ucm_global_config.enable_dynamic_mmap_thresh); ++ skip_on_bistro(); ++ EXPECT_TRUE(ucm_global_opts.enable_dynamic_mmap_thresh); + test_dynamic_mmap_thresh(); + } + + UCS_TEST_F(malloc_hook_cplusplus, dynamic_mmap_disable) { +- ucm_global_config.enable_dynamic_mmap_thresh = 0; ++ skip_on_bistro(); ++ ++ ucm_global_opts.enable_dynamic_mmap_thresh = 0; ++ + test_dynamic_mmap_thresh(); + } + +@@ -523,6 +729,8 @@ UCS_TEST_F(malloc_hook_cplusplus, mallopt) { + char *p; + size_t size; + ++ skip_on_bistro(); ++ + /* This test can not be run with the other + * tests because it assumes that malloc hooks + * are not initialized +@@ -585,7 +793,7 @@ UCS_TEST_F(malloc_hook_cplusplus, mmap_ptrs) { + UCS_TEST_SKIP_R("skipping on valgrind"); + } + +- ucm_global_config.enable_dynamic_mmap_thresh = 0; ++ ucm_global_opts.enable_dynamic_mmap_thresh = 0; + set(); + + const size_t size = ucm_dlmallopt_get(M_MMAP_THRESHOLD) * 2; +@@ -647,3 +855,157 @@ UCS_TEST_F(malloc_hook_cplusplus, mmap_ptrs) { + unset(); + + } ++ ++UCS_TEST_F(malloc_hook_cplusplus, remap_override_single_thread) { ++ pthread_barrier_t barrier; ++ pthread_barrier_init(&barrier, NULL, 1); ++ { ++ mhook_thread(new mmap_hooks("single-thread", 1, &barrier)); ++ } ++ pthread_barrier_destroy(&barrier); ++} ++ ++UCS_TEST_F(malloc_hook_cplusplus, remap_override_multi_threads) { ++ typedef mhook_thread thread_t; ++ ++ static const int num_threads = 8; ++ ucs::ptr_vector threads; ++ pthread_barrier_t barrier; ++ ++ pthread_barrier_init(&barrier, NULL, num_threads); ++ for (int i = 0; i < num_threads; ++i) { ++ std::stringstream ss; ++ ss << "thread " << i << "/" << num_threads; ++ threads.push_back(new thread_t(new mmap_hooks(ss.str(), num_threads, &barrier))); ++ } ++ ++ threads.clear(); ++ pthread_barrier_destroy(&barrier); ++} ++ ++typedef int (munmap_f_t)(void *addr, size_t len); ++ ++UCS_TEST_F(malloc_hook, bistro_patch) { ++ const char *symbol = "munmap"; ++ ucm_bistro_restore_point_t *rp = NULL; ++ ucs_status_t status; ++ munmap_f_t *munmap_f; ++ void *ptr; ++ int res; ++ uint64_t UCS_V_UNUSED patched; ++ uint64_t UCS_V_UNUSED origin; ++ ++ if (RUNNING_ON_VALGRIND) { ++ UCS_TEST_SKIP_R("skipping on valgrind"); ++ } ++ ++ /* set hook to mmap call */ ++ status = ucm_bistro_patch(symbol, (void*)bistro_munmap_hook, &rp); ++ ASSERT_UCS_OK(status); ++ EXPECT_NE((intptr_t)rp, NULL); ++ ++ munmap_f = (munmap_f_t*)ucm_bistro_restore_addr(rp); ++ EXPECT_NE((intptr_t)munmap_f, NULL); ++ ++ /* save partial body of patched function */ ++ patched = *(uint64_t*)munmap_f; ++ ++ bistro_call_counter = 0; ++ ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); ++ EXPECT_NE(ptr, MAP_FAILED); ++ ++ /* try to call munmap, we should jump into munmap_hook instead */ ++ res = munmap_f(ptr, 4096); ++ EXPECT_EQ(res, 0); ++ /* due to cache coherency issues on ARM systems could be executed ++ * original function body, so, skip counter evaluation */ ++ EXPECT_GT(bistro_call_counter, 0); ++ ++ /* restore original mmap body */ ++ status = ucm_bistro_restore(rp); ++ ASSERT_UCS_OK(status); ++ ++ bistro_call_counter = 0; ++ /* now try to call mmap, we should NOT jump into mmap_hook */ ++ ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); ++ EXPECT_NE(ptr, MAP_FAILED); ++ res = munmap_f(ptr, 4096); ++ EXPECT_EQ(res, 0); ++ EXPECT_EQ(bistro_call_counter, 0); /* hook is not called */ ++ /* save partial body of restored function */ ++ origin = *(uint64_t*)munmap_f; ++ ++#if !defined (__powerpc64__) ++ EXPECT_NE(patched, origin); ++#endif ++} ++ ++/* test for mmap events are fired from non-direct load modules ++ * we are trying to load lib1, from lib1 load lib2, and ++ * fire mmap event from lib2 */ ++UCS_TEST_F(malloc_hook, dlopen) { ++#ifndef GTEST_UCM_HOOK_LIB_DIR ++# error "Missing build configuration" ++#else ++ typedef void (fire_mmap_f)(void); ++ typedef void* (load_lib_f)(const char *path); ++ ++ const char *libdlopen_load = "/libdlopen_test_do_load.so"; ++ const char *libdlopen_mmap = "/libdlopen_test_do_mmap.so"; ++ const char *load_lib = "load_lib"; ++ const char *fire_mmap = "fire_mmap"; ++ ++ std::string lib_load; ++ std::string lib_mmap; ++ void *lib; ++ void *lib2; ++ load_lib_f *load; ++ fire_mmap_f *fire; ++ ucs_status_t status; ++ mmap_event event(this); ++ ++ status = event.set(UCM_EVENT_VM_MAPPED); ++ ASSERT_UCS_OK(status); ++ ++ lib_load = std::string(GTEST_UCM_HOOK_LIB_DIR) + libdlopen_load; ++ lib_mmap = std::string(GTEST_UCM_HOOK_LIB_DIR) + libdlopen_mmap; ++ ++ UCS_TEST_MESSAGE << "Loading " << lib_load; ++ UCS_TEST_MESSAGE << "Loading " << lib_mmap; ++ ++ lib = dlopen(lib_load.c_str(), RTLD_NOW); ++ EXPECT_NE((uintptr_t)lib, (uintptr_t)NULL); ++ if (!lib) { ++ goto no_lib; ++ } ++ ++ load = (load_lib_f*)dlsym(lib, load_lib); ++ EXPECT_NE((uintptr_t)load, (uintptr_t)NULL); ++ if (!load) { ++ goto no_load; ++ } ++ ++ lib2 = load(lib_mmap.c_str()); ++ EXPECT_NE((uintptr_t)lib2, (uintptr_t)NULL); ++ if (!lib2) { ++ goto no_load; ++ } ++ ++ fire = (fire_mmap_f*)dlsym(lib2, fire_mmap); ++ EXPECT_NE((uintptr_t)fire, (uintptr_t)NULL); ++ if (!fire) { ++ goto no_fire; ++ } ++ ++ m_got_event = 0; ++ fire(); ++ EXPECT_GT(m_got_event, 0); ++ ++no_fire: ++ dlclose(lib2); ++no_load: ++ dlclose(lib); ++no_lib: ++ event.unset(); ++#endif /* GTEST_UCM_HOOK_LIB_DIR */ ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/Makefile.am +new file mode 100644 +index 0000000..5aaf5d0 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/Makefile.am +@@ -0,0 +1,16 @@ ++# ++# Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++# ++# See file LICENSE for terms. ++# ++ ++ ++noinst_lib_LTLIBRARIES = \ ++ libdlopen_test_do_mmap.la \ ++ libdlopen_test_do_load.la ++ ++libdlopen_test_do_mmap_la_SOURCES = dlopen_test_do_mmap.c ++libdlopen_test_do_load_la_SOURCES = dlopen_test_do_load.c ++noinst_libdir = ${PWD}/.noinst ++ ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_load.c b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_load.c +new file mode 100644 +index 0000000..a6dae7e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_load.c +@@ -0,0 +1,12 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++ ++void* load_lib(const char *path) ++{ ++ return dlopen(path, RTLD_NOW); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_mmap.c b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_mmap.c +new file mode 100644 +index 0000000..91bead8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_mmap.c +@@ -0,0 +1,15 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++ ++void fire_mmap(void) ++{ ++ void* map_ptr; ++ ++ map_ptr = mmap(0, 4096, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); ++ munmap(map_ptr, 4096); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.cc +index 9d54c90..53322c6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.cc +@@ -38,7 +38,7 @@ void test_ucp_atomic::init() { + + template + void test_ucp_atomic::blocking_add(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) ++ ucp_rkey_h rkey, std::string& expected_data) + { + ucs_status_t status; + T add, prev; +@@ -63,126 +63,35 @@ void test_ucp_atomic::unaligned_blocking_add64(entity *e, size_t max_size, + void *memheap_addr, ucp_rkey_h rkey, + std::string& expected_data) + { +- /* Test that unaligned addresses generate error */ + ucs_status_t status; +- status = ucp_atomic_add64(e->ep(), 0, (uintptr_t)memheap_addr + 1, rkey); ++ { ++ /* Test that unaligned addresses generate error */ ++ scoped_log_handler slh(hide_errors_logger); ++ status = ucp_atomic_add64(e->ep(), 0, (uintptr_t)memheap_addr + 1, rkey); ++ } + EXPECT_EQ(UCS_ERR_INVALID_PARAM, status); + expected_data.clear(); + } + + template +-void test_ucp_atomic::blocking_fadd(entity *e, size_t max_size, +- void *memheap_addr, ucp_rkey_h rkey, +- std::string& expected_data) +-{ +- ucs_status_t status; +- T add, prev, result; +- +- prev = *(T*)memheap_addr; +- add = (T)ucs::rand() * (T)ucs::rand(); +- +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_fadd32(e->ep(), add, (uintptr_t)memheap_addr, rkey, +- (uint32_t*)(void*)&result); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_fadd64(e->ep(), add, (uintptr_t)memheap_addr, rkey, +- (uint64_t*)(void*)&result); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } +- ASSERT_UCS_OK(status); +- +- EXPECT_EQ(prev, result); +- +- expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = add + prev; +-} +- +-template +-void test_ucp_atomic::blocking_swap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) +-{ +- ucs_status_t status; +- T swap, prev, result; +- +- prev = *(T*)memheap_addr; +- swap = (T)ucs::rand() * (T)ucs::rand(); +- +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_swap32(e->ep(), swap, (uintptr_t)memheap_addr, +- rkey, (uint32_t*)(void*)&result); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_swap64(e->ep(), swap, (uintptr_t)memheap_addr, +- rkey, (uint64_t*)(void*)&result); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } +- ASSERT_UCS_OK(status); +- +- EXPECT_EQ(prev, result); +- +- expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = swap; +-} +- +-template +-void test_ucp_atomic::blocking_cswap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) +-{ +- ucs_status_t status; +- T compare, swap, prev, result; +- +- prev = *(T*)memheap_addr; +- if ((ucs::rand() % 2) == 0) { +- compare = prev; /* success mode */ +- } else { +- compare = ~prev; /* fail mode */ +- } +- swap = (T)ucs::rand() * (T)ucs::rand(); +- +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_cswap32(e->ep(), compare, swap, +- (uintptr_t)memheap_addr, rkey, +- (uint32_t*)(void*)&result); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_cswap64(e->ep(), compare, swap, +- (uintptr_t)memheap_addr, rkey, +- (uint64_t*)(void*)&result); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } +- ASSERT_UCS_OK(status); +- +- EXPECT_EQ(prev, result); +- +- expected_data.resize(sizeof(T)); +- if (compare == prev) { +- *(T*)&expected_data[0] = swap; +- } else { +- *(T*)&expected_data[0] = prev; +- } +-} +- +-template + ucs_status_t test_ucp_atomic::ucp_atomic_post_nbi(ucp_ep_h ep, ucp_atomic_post_op_t opcode, +- T value, void *remote_addr, +- ucp_rkey_h rkey) ++ T value, void *remote_addr, ++ ucp_rkey_h rkey) + { + return ucp_atomic_post(ep, opcode, value, sizeof(T), (uintptr_t)remote_addr, rkey); + } + +-template +-void test_ucp_atomic::nb_add(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) ++template ++void test_ucp_atomic::nb_post(entity *e, size_t max_size, void *memheap_addr, ++ ucp_rkey_h rkey, std::string& expected_data) + { + ucs_status_t status; +- T add, prev; ++ T val, prev; + +- prev = *(T*)memheap_addr; +- add = (T)ucs::rand() * (T)ucs::rand(); ++ prev = *(T*)memheap_addr; ++ val = (T)ucs::rand() * (T)ucs::rand(); + +- status = test_ucp_atomic::ucp_atomic_post_nbi(e->ep(), UCP_ATOMIC_POST_OP_ADD, add, +- memheap_addr, rkey); ++ status = test_ucp_atomic::ucp_atomic_post_nbi(e->ep(), OP, val, memheap_addr, rkey); + + if (status == UCS_INPROGRESS) { + flush_worker(*e); +@@ -190,20 +99,21 @@ void test_ucp_atomic::nb_add(entity *e, size_t max_size, void *memheap_addr, + ASSERT_UCS_OK(status); + } + expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = add + prev; ++ *(T*)&expected_data[0] = atomic_op_val(val, prev); + } + +-void test_ucp_atomic::unaligned_nb_add64(entity *e, size_t max_size, +- void *memheap_addr, ucp_rkey_h rkey, +- std::string& expected_data) ++template ++void test_ucp_atomic::unaligned_nb_post(entity *e, size_t max_size, ++ void *memheap_addr, ucp_rkey_h rkey, ++ std::string& expected_data) + { +- /* Test that unaligned addresses generate error */ + ucs_status_t status; +- +- status = test_ucp_atomic::ucp_atomic_post_nbi(e->ep(), +- UCP_ATOMIC_POST_OP_ADD, 0, +- (void *)((uintptr_t)memheap_addr + 1), +- rkey); ++ { ++ /* Test that unaligned addresses generate error */ ++ scoped_log_handler slh(hide_errors_logger); ++ status = test_ucp_atomic::ucp_atomic_post_nbi ++ (e->ep(), OP, 0, (void *)((uintptr_t)memheap_addr + 1), rkey); ++ } + EXPECT_EQ(UCS_ERR_INVALID_PARAM, status); + expected_data.clear(); + } +@@ -218,41 +128,19 @@ ucs_status_ptr_t test_ucp_atomic::ucp_atomic_fetch(ucp_ep_h ep, + (uintptr_t)remote_addr, rkey, send_completion); + } + +-template +-void test_ucp_atomic::nb_fadd(entity *e, size_t max_size, +- void *memheap_addr, ucp_rkey_h rkey, +- std::string& expected_data) +-{ +- void *amo_req; +- T add, prev, result; +- +- prev = *(T*)memheap_addr; +- add = (T)ucs::rand() * (T)ucs::rand(); +- +- amo_req = test_ucp_atomic::ucp_atomic_fetch(e->ep(), UCP_ATOMIC_FETCH_OP_FADD, +- add, &result, memheap_addr, rkey); +- if(UCS_PTR_IS_PTR(amo_req)){ +- wait(amo_req); +- } +- +- EXPECT_EQ(prev, result); +- +- expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = add + prev; +-} +- +-template +-void test_ucp_atomic::nb_swap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) ++template ++void test_ucp_atomic::nb_fetch(entity *e, size_t max_size, ++ void *memheap_addr, ucp_rkey_h rkey, ++ std::string& expected_data) + { +- T swap, prev, result; + void *amo_req; ++ T val, prev, result; + +- prev = *(T*)memheap_addr; +- swap = (T)ucs::rand() * (T)ucs::rand(); ++ prev = *(T*)memheap_addr; ++ val = (T)ucs::rand() * (T)ucs::rand(); + +- amo_req = test_ucp_atomic::ucp_atomic_fetch(e->ep(), UCP_ATOMIC_FETCH_OP_SWAP, +- swap, &result, memheap_addr, rkey); ++ amo_req = test_ucp_atomic::ucp_atomic_fetch(e->ep(), FOP, ++ val, &result, memheap_addr, rkey); + if(UCS_PTR_IS_PTR(amo_req)){ + wait(amo_req); + } +@@ -260,7 +148,7 @@ void test_ucp_atomic::nb_swap(entity *e, size_t max_size, void *memheap_addr, + EXPECT_EQ(prev, result); + + expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = swap; ++ *(T*)&expected_data[0] = atomic_fop_val(val, prev); + } + + template +@@ -319,33 +207,48 @@ UCS_TEST_P(test_ucp_atomic32, atomic_add) { + } + + UCS_TEST_P(test_ucp_atomic32, atomic_add_nb) { +- test(&test_ucp_atomic32::nb_add, false); +- test(&test_ucp_atomic32::nb_add, true); ++ test(&test_ucp_atomic32::nb_post, false); ++ test(&test_ucp_atomic32::nb_post, true); + } + +-UCS_TEST_P(test_ucp_atomic32, atomic_fadd) { +- test(&test_ucp_atomic32::blocking_fadd, false); +- test(&test_ucp_atomic32::blocking_fadd, true); ++UCS_TEST_P(test_ucp_atomic32, atomic_and_nb) { ++ test(&test_ucp_atomic32::nb_post, false); ++ test(&test_ucp_atomic32::nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic32, atomic_or_nb) { ++ test(&test_ucp_atomic32::nb_post, false); ++ test(&test_ucp_atomic32::nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic32, atomic_xor_nb) { ++ test(&test_ucp_atomic32::nb_post, false); ++ test(&test_ucp_atomic32::nb_post, true); + } + + UCS_TEST_P(test_ucp_atomic32, atomic_fadd_nb) { +- test(&test_ucp_atomic32::nb_fadd, false); +- test(&test_ucp_atomic32::nb_fadd, true); ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic32, atomic_swap) { +- test(&test_ucp_atomic32::blocking_swap, false); +- test(&test_ucp_atomic32::blocking_swap, true); ++UCS_TEST_P(test_ucp_atomic32, atomic_fand_nb) { ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic32, atomic_swap_nb) { +- test(&test_ucp_atomic32::nb_swap, false); +- test(&test_ucp_atomic32::nb_swap, true); ++UCS_TEST_P(test_ucp_atomic32, atomic_for_nb) { ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic32, atomic_cswap) { +- test(&test_ucp_atomic32::blocking_cswap, false); +- test(&test_ucp_atomic32::blocking_cswap, true); ++UCS_TEST_P(test_ucp_atomic32, atomic_fxor_nb) { ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic32, atomic_swap_nb) { ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); + } + + UCS_TEST_P(test_ucp_atomic32, atomic_cswap_nb) { +@@ -370,35 +273,49 @@ UCS_TEST_P(test_ucp_atomic64, atomic_add) { + } + + UCS_TEST_P(test_ucp_atomic64, atomic_add_nb) { +- test(&test_ucp_atomic64::nb_add, false); +- test(&test_ucp_atomic64::nb_add, true); ++ test(&test_ucp_atomic64::nb_post, false); ++ test(&test_ucp_atomic64::nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, atomic_and_nb) { ++ test(&test_ucp_atomic64::nb_post, false); ++ test(&test_ucp_atomic64::nb_post, true); + } + +-UCS_TEST_P(test_ucp_atomic64, atomic_fadd) { +- test(&test_ucp_atomic64::blocking_fadd, false); +- test(&test_ucp_atomic64::blocking_fadd, true); ++UCS_TEST_P(test_ucp_atomic64, atomic_or_nb) { ++ test(&test_ucp_atomic64::nb_post, false); ++ test(&test_ucp_atomic64::nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, atomic_xor_nb) { ++ test(&test_ucp_atomic64::nb_post, false); ++ test(&test_ucp_atomic64::nb_post, true); + } + + UCS_TEST_P(test_ucp_atomic64, atomic_fadd_nb) { +- test(&test_ucp_atomic64::nb_fadd, false); +- test(&test_ucp_atomic64::nb_fadd, true); ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic64, atomic_swap) { +- test(&test_ucp_atomic64::blocking_swap, false); +- test(&test_ucp_atomic64::blocking_swap, true); ++UCS_TEST_P(test_ucp_atomic64, atomic_fand_nb) { ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic64, atomic_swap_nb) { +- test(&test_ucp_atomic64::nb_swap, false); +- test(&test_ucp_atomic64::nb_swap, true); ++UCS_TEST_P(test_ucp_atomic64, atomic_for_nb) { ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic64, atomic_cswap) { +- test(&test_ucp_atomic64::blocking_cswap, false); +- test(&test_ucp_atomic64::blocking_cswap, true); ++UCS_TEST_P(test_ucp_atomic64, atomic_fxor_nb) { ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); + } + ++UCS_TEST_P(test_ucp_atomic64, atomic_swap_nb) { ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); ++} + + UCS_TEST_P(test_ucp_atomic64, atomic_cswap_nb) { + test(&test_ucp_atomic64::nb_cswap, false); +@@ -412,8 +329,23 @@ UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_add) { + } + + UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_add_nb) { +- test(&test_ucp_atomic::unaligned_nb_add64, false); +- test(&test_ucp_atomic::unaligned_nb_add64, true); ++ test(&test_ucp_atomic::unaligned_nb_post, false); ++ test(&test_ucp_atomic::unaligned_nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_and_nb) { ++ test(&test_ucp_atomic::unaligned_nb_post, false); ++ test(&test_ucp_atomic::unaligned_nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_or_nb) { ++ test(&test_ucp_atomic::unaligned_nb_post, false); ++ test(&test_ucp_atomic::unaligned_nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_xor_nb) { ++ test(&test_ucp_atomic::unaligned_nb_post, false); ++ test(&test_ucp_atomic::unaligned_nb_post, true); + } + #endif + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.h +index 4370e37..0c48efe 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.h +@@ -30,40 +30,63 @@ public: + void unaligned_blocking_add64(entity *e, size_t max_size, void *memheap_addr, + ucp_rkey_h rkey, std::string& expected_data); + +- template +- void blocking_fadd(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void blocking_swap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void blocking_cswap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void nb_add(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- void unaligned_nb_add64(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void nb_fadd(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void nb_swap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); ++ template ++ void unaligned_nb_post(entity *e, size_t max_size, void *memheap_addr, ++ ucp_rkey_h rkey, std::string& expected_data); + + template + void nb_cswap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); ++ ucp_rkey_h rkey, std::string& expected_data); + + template + void test(F f, bool malloc_allocate); + ++ template ++ void nb_post(entity *e, size_t max_size, void *memheap_addr, ++ ucp_rkey_h rkey, std::string& expected_data); ++ ++ template ++ void nb_fetch(entity *e, size_t max_size, void *memheap_addr, ++ ucp_rkey_h rkey, std::string& expected_data); ++ ++ template ++ T atomic_op_val(T v1, T v2) ++ { ++ /* coverity[switch_selector_expr_is_constant] */ ++ switch (OP) { ++ case UCP_ATOMIC_POST_OP_ADD: ++ return v1 + v2; ++ case UCP_ATOMIC_POST_OP_AND: ++ return v1 & v2; ++ case UCP_ATOMIC_POST_OP_OR: ++ return v1 | v2; ++ case UCP_ATOMIC_POST_OP_XOR: ++ return v1 ^ v2; ++ default: ++ return 0; ++ } ++ } ++ ++ template ++ T atomic_fop_val(T v1, T v2) ++ { ++ /* coverity[switch_selector_expr_is_constant] */ ++ switch (OP) { ++ case UCP_ATOMIC_FETCH_OP_FADD: ++ return v1 + v2; ++ case UCP_ATOMIC_FETCH_OP_FAND: ++ return v1 & v2; ++ case UCP_ATOMIC_FETCH_OP_FOR: ++ return v1 | v2; ++ case UCP_ATOMIC_FETCH_OP_FXOR: ++ return v1 ^ v2; ++ case UCP_ATOMIC_FETCH_OP_SWAP: ++ return v1; ++ default: ++ return 0; ++ } ++ } ++ + private: + static void send_completion(void *request, ucs_status_t status){} + template +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_context.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_context.cc +index bbb7656..964a2cd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_context.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_context.cc +@@ -78,14 +78,19 @@ UCS_TEST_P(test_ucp_version, wrong_api_version) { + ucp_params_t params = get_ctx_params(); + ucp_context_h ucph; + ucs_status_t status; ++ size_t warn_count; + { +- wrap_errors(); ++ scoped_log_handler slh(hide_warns_logger); ++ warn_count = m_warnings.size(); + status = ucp_init_version(99, 99, ¶ms, config.get(), &ucph); +- restore_errors(); + } +- if (status == UCS_OK) { ++ if (status != UCS_OK) { ++ ADD_FAILURE() << "Failed to create UCP with wrong version"; ++ } else { ++ if (m_warnings.size() == warn_count) { ++ ADD_FAILURE() << "Missing wrong version warning"; ++ } + ucp_cleanup(ucph); +- ADD_FAILURE() << "Created UCP with wrong version"; + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_fence.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_fence.cc +index b911afd..4e5afc4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_fence.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_fence.cc +@@ -5,6 +5,7 @@ + */ + + #include "test_ucp_atomic.h" ++#include "common/gtest.h" + + class test_ucp_fence : public test_ucp_atomic { + public: +@@ -12,19 +13,16 @@ public: + uint64_t *result_buf, void *memheap_addr, + ucp_rkey_h rkey); + ++ static void send_cb(void *request, ucs_status_t status) ++ { ++ } ++ + template + void blocking_add(entity *e, uint64_t *initial_buf, uint64_t *result_buf, + void *memheap_addr, ucp_rkey_h rkey) { +- ucs_status_t status; +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_add32(e->ep(), (uint32_t)(*initial_buf), +- (uintptr_t)memheap_addr, rkey); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_add64(e->ep(), (uint64_t)(*initial_buf), +- (uintptr_t)memheap_addr, rkey); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } ++ ucs_status_t status = ucp_atomic_post(e->ep(), UCP_ATOMIC_POST_OP_ADD, ++ *initial_buf, sizeof(T), ++ (uintptr_t)memheap_addr, rkey); + ASSERT_UCS_OK(status); + } + +@@ -32,19 +30,10 @@ public: + void blocking_fadd(entity *e, uint64_t *initial_buf, uint64_t *result_buf, + void *memheap_addr, ucp_rkey_h rkey) + { +- ucs_status_t status; +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_fadd32(e->ep(), (uint32_t)(*initial_buf), +- (uintptr_t)memheap_addr, +- rkey, (uint32_t*)(void*)result_buf); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_fadd64(e->ep(), (uint64_t)(*initial_buf), +- (uintptr_t)memheap_addr, +- rkey, (uint64_t*)(void*)result_buf); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } +- ASSERT_UCS_OK(status); ++ void *request = ucp_atomic_fetch_nb(e->ep(), UCP_ATOMIC_FETCH_OP_FADD, ++ *initial_buf, (T*)result_buf, sizeof(T), ++ (uintptr_t)memheap_addr, rkey, send_cb); ++ wait(request); + } + + template +@@ -65,7 +54,7 @@ public: + } + + ~worker() { +- ucs_assert(!running); ++ assert(!running); + } + + static void *run(void *arg) { +@@ -142,6 +131,7 @@ protected: + uint32_t error = 0; + + sender().connect(&receiver(), get_ep_params()); ++ flush_worker(sender()); /* avoid deadlock for blocking amo */ + + params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | + UCP_MEM_MAP_PARAM_FIELD_LENGTH | +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mem_type.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mem_type.cc +index afa947d..6e99e2a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mem_type.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mem_type.cc +@@ -5,9 +5,11 @@ + */ + + #include "ucp_test.h" ++extern "C" { + #include "uct/api/uct.h" + #include "ucp/core/ucp_context.h" + #include "ucp/core/ucp_mm.h" ++} + + + class test_ucp_mem_type : public ucp_test { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_memheap.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_memheap.cc +index cac3e8c..f1eacf8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_memheap.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_memheap.cc +@@ -102,9 +102,8 @@ void test_ucp_memheap::test_nonblocking_implicit_stream_xfer(nonblocking_send_fu + + ucs_assert(size * i + alignment <= memheap_size); + +- (this->*send)(&sender(), size, +- (void*)((uintptr_t)memheap + alignment + i * size), +- rkey, expected_data[i]); ++ char *ptr = (char*)memheap + alignment + i * size; ++ (this->*send)(&sender(), size, (void*)ptr, rkey, expected_data[i]); + + ASSERT_UCS_OK(status); + +@@ -117,9 +116,10 @@ void test_ucp_memheap::test_nonblocking_implicit_stream_xfer(nonblocking_send_fu + } + + for (int i = 0; i < max_iter; ++i) { +- EXPECT_EQ(expected_data[i], +- std::string((char *)((uintptr_t)memheap + alignment + i * size), +- expected_data[i].length())); ++ char *ptr = (char*)memheap + alignment + i * size; ++ EXPECT_EQ(expected_data[i].substr(0, 20), ++ std::string(ptr, expected_data[i].length()).substr(0, 20)) << ++ ((void*)ptr); + } + + ucp_rkey_destroy(rkey); +@@ -159,6 +159,9 @@ void test_ucp_memheap::test_blocking_xfer(blocking_send_func_t send, + + sender().connect(&receiver(), get_ep_params()); + ++ /* avoid deadlock for blocking rma/amo */ ++ flush_worker(sender()); ++ + ucp_mem_h memh; + void *memheap = NULL; + +@@ -223,7 +226,6 @@ void test_ucp_memheap::test_blocking_xfer(blocking_send_func_t send, + expected_data.resize(size); + + ucs::fill_random(expected_data); +- + (this->*send)(&sender(), size, (void*)((uintptr_t)memheap + offset), + rkey, expected_data); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mmap.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mmap.cc +index 192cefa..965634b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mmap.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mmap.cc +@@ -30,14 +30,19 @@ protected: + bool resolve_rma(entity *e, ucp_rkey_h rkey); + bool resolve_amo(entity *e, ucp_rkey_h rkey); + bool resolve_rma_bw(entity *e, ucp_rkey_h rkey); ++ void test_length0(unsigned flags); + void test_rkey_management(entity *e, ucp_mem_h memh, bool is_dummy); + }; + + bool test_ucp_mmap::resolve_rma(entity *e, ucp_rkey_h rkey) + { +- hide_errors(); +- ucs_status_t status = UCP_RKEY_RESOLVE(rkey, e->ep(), rma); +- restore_errors(); ++ ucs_status_t status; ++ ++ { ++ scoped_log_handler slh(hide_errors_logger); ++ status = UCP_RKEY_RESOLVE(rkey, e->ep(), rma); ++ } ++ + if (status == UCS_OK) { + EXPECT_NE(UCP_NULL_LANE, rkey->cache.rma_lane); + return true; +@@ -51,9 +56,13 @@ bool test_ucp_mmap::resolve_rma(entity *e, ucp_rkey_h rkey) + + bool test_ucp_mmap::resolve_amo(entity *e, ucp_rkey_h rkey) + { +- hide_errors(); +- ucs_status_t status = UCP_RKEY_RESOLVE(rkey, e->ep(), amo); +- restore_errors(); ++ ucs_status_t status; ++ ++ { ++ scoped_log_handler slh(hide_errors_logger); ++ status = UCP_RKEY_RESOLVE(rkey, e->ep(), amo); ++ } ++ + if (status == UCS_OK) { + EXPECT_NE(UCP_NULL_LANE, rkey->cache.amo_lane); + return true; +@@ -70,7 +79,7 @@ bool test_ucp_mmap::resolve_rma_bw(entity *e, ucp_rkey_h rkey) + ucp_lane_index_t lane; + uct_rkey_t uct_rkey; + +- lane = ucp_rkey_get_rma_bw_lane(rkey, e->ep(), &uct_rkey, 0); ++ lane = ucp_rkey_get_rma_bw_lane(rkey, e->ep(), UCT_MD_MEM_TYPE_HOST, &uct_rkey, 0); + if (lane != UCP_NULL_LANE) { + return true; + } else { +@@ -203,8 +212,8 @@ UCS_TEST_P(test_ucp_mmap, reg) { + } + } + +-UCS_TEST_P(test_ucp_mmap, dummy_mem) { +- ++void test_ucp_mmap::test_length0(unsigned flags) ++{ + ucs_status_t status; + int buf_num = 2; + ucp_mem_h memh[buf_num]; +@@ -222,7 +231,7 @@ UCS_TEST_P(test_ucp_mmap, dummy_mem) { + UCP_MEM_MAP_PARAM_FIELD_FLAGS; + params.address = NULL; + params.length = 0; +- params.flags = rand_flags() | UCP_MEM_MAP_ALLOCATE; ++ params.flags = rand_flags() | flags; + + status = ucp_mem_map(sender().ucph(), ¶ms, &memh[0]); + ASSERT_UCS_OK(status); +@@ -238,6 +247,14 @@ UCS_TEST_P(test_ucp_mmap, dummy_mem) { + } + } + ++UCS_TEST_P(test_ucp_mmap, reg0) { ++ test_length0(0); ++} ++ ++UCS_TEST_P(test_ucp_mmap, alloc0) { ++ test_length0(UCP_MEM_MAP_ALLOCATE); ++} ++ + UCS_TEST_P(test_ucp_mmap, alloc_advise) { + ucs_status_t status; + bool is_dummy; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_peer_failure.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_peer_failure.cc +index 9df647e..7b0a62c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_peer_failure.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_peer_failure.cc +@@ -5,655 +5,409 @@ + */ + + #include "test_ucp_tag.h" +-#include "ucp/api/ucp_def.h" ++#include "ucp_datatype.h" + + extern "C" { +-#include ++#include /* for testing memory consumption */ ++#include // for debug + } + ++class test_ucp_peer_failure : public ucp_test { ++public: ++ test_ucp_peer_failure(); ++ ++ static std::vector ++ enum_test_params(const ucp_params_t& ctx_params, const std::string& name, ++ const std::string& test_case_name, const std::string& tls); ++ ++ ucp_ep_params_t get_ep_params(); + +-class test_ucp_peer_failure_base { + protected: + enum { +- FAIL_AFTER_WIREUP = ucp_test::DEFAULT_PARAM_VARIANT, +- FAIL_IMMEDIATELY ++ TEST_TAG = UCS_BIT(0), ++ TEST_RMA = UCS_BIT(1), ++ FAIL_IMM = UCS_BIT(2) + }; + +- test_ucp_peer_failure_base() { +- /* Set small TL timeouts to reduce testing time */ +- m_env.push_back(new ucs::scoped_setenv("UCX_RC_TIMEOUT", "10us")); +- m_env.push_back(new ucs::scoped_setenv("UCX_RC_RETRY_COUNT", "2")); +- std::string ud_timeout = ucs::to_string(1 * ucs::test_time_multiplier()) + "s"; +- m_env.push_back(new ucs::scoped_setenv("UCX_UD_TIMEOUT", ud_timeout.c_str())); +- } ++ enum { ++ STABLE_EP_INDEX, ++ FAILING_EP_INDEX ++ }; + +- virtual ucp_ep_params_t get_ep_params() { +- ucp_ep_params_t params; +- memset(¶ms, 0, sizeof(params)); +- params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | +- UCP_EP_PARAM_FIELD_ERR_HANDLER; +- params.err_mode = UCP_ERR_HANDLING_MODE_PEER; +- params.err_handler.cb = err_cb; +- params.err_handler.arg = NULL; +- return params; +- } ++ typedef ucs::handle mem_handle_t; ++ ++ void set_timeouts(); ++ static void err_cb(void *arg, ucp_ep_h ep, ucs_status_t status); ++ ucp_ep_h stable_sender(); ++ ucp_ep_h failing_sender(); ++ entity& stable_receiver(); ++ entity& failing_receiver(); ++ void *send_nb(ucp_ep_h ep, ucp_rkey_h rkey); ++ void *recv_nb(entity& e); ++ void fail_receiver(); ++ void smoke_test(bool stable_pair); ++ static void unmap_memh(ucp_mem_h memh, ucp_context_h context); ++ void get_rkey(ucp_ep_h ep, entity& dst, mem_handle_t& memh, ++ ucs::handle& rkey); ++ void set_rkeys(); ++ static void send_cb(void *request, ucs_status_t status); ++ static void recv_cb(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t *info); + +- void init() { +- m_err_cntr = 0; +- m_err_status = UCS_OK; +- } ++ virtual void cleanup(); + +- static void err_cb(void *arg, ucp_ep_h ep, ucs_status_t status) { +- EXPECT_EQ(UCS_ERR_ENDPOINT_TIMEOUT, status); +- m_err_status = status; +- ++m_err_cntr; +- } ++ void do_test(size_t msg_size, int pre_msg_count, bool force_close, ++ bool request_must_fail); + +-protected: +- static size_t m_err_cntr; +- static ucs_status_t m_err_status; ++ size_t m_err_count; ++ ucs_status_t m_err_status; ++ std::string m_sbuf, m_rbuf; ++ mem_handle_t m_stable_memh, m_failing_memh; ++ ucs::handle m_stable_rkey, m_failing_rkey; + ucs::ptr_vector m_env; + }; + +-size_t test_ucp_peer_failure_base::m_err_cntr = 0; +-ucs_status_t test_ucp_peer_failure_base::m_err_status = UCS_OK; +- +- +-class test_ucp_peer_failure : +- public test_ucp_tag, +- protected test_ucp_peer_failure_base { +-public: +- test_ucp_peer_failure() : m_msg_size(1024) { +- } +- +- static std::vector +- enum_test_params(const ucp_params_t& ctx_params, +- const std::string& name, +- const std::string& test_case_name, +- const std::string& tls) +- { +- std::vector result = +- test_ucp_tag::enum_test_params(ctx_params, name, test_case_name, tls); +- +- generate_test_params_variant(ctx_params, name, test_case_name, tls, +- FAIL_AFTER_WIREUP, result); +- generate_test_params_variant(ctx_params, name, test_case_name, tls, +- FAIL_IMMEDIATELY, result); +- return result; +- } +- +- virtual void init(); +- virtual void cleanup(); +- +- void test_status_after(bool request_must_fail); +- void test_force_close(); +- +-protected: +- virtual ucp_ep_params_t get_ep_params() { +- return test_ucp_peer_failure_base::get_ep_params(); +- } +- +- void fail_receiver() { +- /* TODO: need to handle non-empty TX window in UD EP destructor", +- * see debug message (ud_ep.c:220) +- * ucs_debug("ep=%p id=%d conn_id=%d has %d unacked packets", +- * self, self->ep_id, self->conn_id, +- * (int)ucs_queue_length(&self->tx.window)); +- */ +- flush_worker(receiver()); +- m_entities.remove(&receiver()); +- } ++UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure) + +- void smoke_test() { +- long buf = 0; +- request *req = recv_nb(&buf, sizeof(buf), DATATYPE, 0, 0); +- send_b(&buf, sizeof(buf), DATATYPE, 0, 0); +- wait_and_validate(req); +- } + +- void wait_err() { +- while (!m_err_cntr) { +- progress(); +- } +- } ++test_ucp_peer_failure::test_ucp_peer_failure() : m_err_count(0), m_err_status(UCS_OK) { ++ ucs::fill_random(m_sbuf); ++ set_timeouts(); ++} + +- static void err_cb_mod(void *arg, ucp_ep_h ep, ucs_status_t status) { +- EXPECT_EQ(uintptr_t(MAGIC), uintptr_t(arg)); +- err_cb(arg, ep, status); +- m_err_cb_mod = true; +- } ++std::vector ++test_ucp_peer_failure::enum_test_params(const ucp_params_t& ctx_params, ++ const std::string& name, ++ const std::string& test_case_name, ++ const std::string& tls) ++{ ++ std::vector result; + +-protected: +- const size_t m_msg_size; +- static bool m_err_cb_mod; +-}; ++ ucp_params_t params = ucp_test::get_ctx_params(); + +-bool test_ucp_peer_failure::m_err_cb_mod = false; ++ params.field_mask |= UCP_PARAM_FIELD_FEATURES; + +-void test_ucp_peer_failure::init() { +- m_err_cb_mod = false; ++ params.features = UCP_FEATURE_TAG; ++ generate_test_params_variant(params, name, test_case_name + "/tag", tls, ++ TEST_TAG, result); ++ generate_test_params_variant(params, name, test_case_name + "/tag_fail_imm", ++ tls, TEST_TAG | FAIL_IMM, result); + +- test_ucp_peer_failure_base::init(); +- test_ucp_tag::init(); +- if (GetParam().variant != FAIL_IMMEDIATELY) { +- smoke_test(); +- } ++ params.features = UCP_FEATURE_RMA; ++ generate_test_params_variant(params, name, test_case_name + "/rma", tls, ++ TEST_RMA, result); ++ generate_test_params_variant(params, name, test_case_name + "/rma_fail_imm", ++ tls, TEST_RMA | FAIL_IMM, result); + +- /* Make second pair */ +- create_entity(true); +- create_entity(false); +- sender().connect(&receiver(), get_ep_params()); +- if (GetParam().variant != FAIL_IMMEDIATELY) { +- smoke_test(); +- } +- wrap_errors(); +- +- ucp_ep_params_t ep_params_mod = {0}; +- ep_params_mod.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLER; +- ep_params_mod.err_handler.cb = err_cb_mod; +- /* NOTE: using of ucp_ep_params_t::user_data field is more preferable but +- * need to test err_handler.arg as well */ +- ep_params_mod.err_handler.arg = reinterpret_cast(uintptr_t(MAGIC)); +- +- for (size_t i = 0; i < m_entities.size(); ++i) { +- for (int widx = 0; widx < e(i).get_num_workers(); ++widx) { +- for (int epidx = 0; epidx < e(i).get_num_eps(widx); ++epidx) { +- void *req = e(i).modify_ep(ep_params_mod, widx, epidx); +- ucp_test::wait(req, widx); +- } +- } +- } ++ return result; + } + +-void test_ucp_peer_failure::cleanup() { +- restore_errors(); +- test_ucp_tag::cleanup(); ++ucp_ep_params_t test_ucp_peer_failure::get_ep_params() { ++ ucp_ep_params_t params; ++ memset(¶ms, 0, sizeof(params)); ++ params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | ++ UCP_EP_PARAM_FIELD_ERR_HANDLER; ++ params.err_mode = UCP_ERR_HANDLING_MODE_PEER; ++ params.err_handler.cb = err_cb; ++ params.err_handler.arg = reinterpret_cast(this); ++ return params; + } + +-void test_ucp_peer_failure::test_status_after(bool request_must_fail) +-{ +- fail_receiver(); +- +- std::vector buf(m_msg_size, 0); +- request *req = send_nb(buf.data(), buf.size(), DATATYPE, +- 0x111337); +- wait_err(); +- EXPECT_NE(UCS_OK, m_err_status); +- EXPECT_TRUE(m_err_cb_mod); +- +- if (UCS_PTR_IS_PTR(req)) { +- /* The request may either succeed or fail, even though the data is not +- * delivered - depends on when the error is detected on sender side and +- * if zcopy/bcopy protocol is used. In any case, the request must +- * complete, and all resources have to be released. +- */ +- EXPECT_TRUE(req->completed); +- if (request_must_fail) { +- EXPECT_EQ(m_err_status, req->status); +- } else { +- EXPECT_TRUE((m_err_status == req->status) || (UCS_OK == req->status)); +- } +- request_release(req); +- } +- +- ucs_status_ptr_t status_ptr = ucp_tag_send_nb(sender().ep(), NULL, 0, DATATYPE, +- 0x111337, NULL); +- EXPECT_FALSE(UCS_PTR_IS_PTR(status_ptr)); +- EXPECT_EQ(m_err_status, UCS_PTR_STATUS(status_ptr)); +- +- /* Destroy failed sender */ +- sender().destroy_worker(); +- m_entities.remove(&sender()); +- +- /* Check workability of second pair */ +- smoke_test(); ++void test_ucp_peer_failure::set_timeouts() { ++ /* Set small TL timeouts to reduce testing time */ ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_TIMEOUT", "10ms")); ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_RNR_TIMEOUT", "10ms")); ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_RETRY_COUNT", "2")); ++ std::string ud_timeout = ucs::to_string(3 * ucs::test_time_multiplier()) + "s"; ++ m_env.push_back(new ucs::scoped_setenv("UCX_UD_TIMEOUT", ud_timeout.c_str())); + } + +-void test_ucp_peer_failure::test_force_close() +-{ +- const size_t msg_size = 16000; +- const size_t iter = 1000; +- uint8_t *buf = (uint8_t *)calloc(msg_size, iter); +- struct mallinfo mem_before, mem_after; +- std::vector reqs; ++void test_ucp_peer_failure::err_cb(void *arg, ucp_ep_h ep, ucs_status_t status) { ++ test_ucp_peer_failure *self = reinterpret_cast(arg); ++ EXPECT_EQ(UCS_ERR_ENDPOINT_TIMEOUT, status); ++ self->m_err_status = status; ++ ++self->m_err_count; ++} + +- reqs.reserve(iter); +- for (size_t i = 0; i < iter; ++i) { +- request *sreq = send_nb(&buf[i * msg_size], msg_size, DATATYPE, 17); ++ucp_ep_h test_ucp_peer_failure::stable_sender() { ++ return sender().ep(0, STABLE_EP_INDEX); ++} + +- if (UCS_PTR_IS_PTR(sreq)) { +- reqs.push_back(sreq); +- } else if (UCS_PTR_IS_ERR(sreq)) { +- EXPECT_EQ(UCS_ERR_NO_RESOURCE, UCS_PTR_STATUS(sreq)); +- break; +- } +- } ++ucp_ep_h test_ucp_peer_failure::failing_sender() { ++ return sender().ep(0, FAILING_EP_INDEX); ++} + +- fail_receiver(); ++ucp_test::entity& test_ucp_peer_failure::stable_receiver() { ++ return m_entities.at(m_entities.size() - 2); ++} + +- mem_before = mallinfo(); ++ucp_test::entity& test_ucp_peer_failure::failing_receiver() { ++ return m_entities.at(m_entities.size() - 1); ++} + +- request *close_req = (request *)ucp_ep_close_nb(sender().ep(), +- UCP_EP_CLOSE_MODE_FORCE); +- if (UCS_PTR_IS_PTR(close_req)) { +- wait(close_req); +- ucp_request_release(close_req); ++void *test_ucp_peer_failure::send_nb(ucp_ep_h ep, ucp_rkey_h rkey) { ++ if (GetParam().variant & TEST_TAG) { ++ return ucp_tag_send_nb(ep, &m_sbuf[0], m_sbuf.size(), DATATYPE, 0, ++ send_cb); ++ } else if (GetParam().variant & TEST_RMA) { ++ return ucp_put_nb(ep, &m_sbuf[0], m_sbuf.size(), (uintptr_t)&m_rbuf[0], ++ rkey, send_cb); + } else { +- EXPECT_FALSE(UCS_PTR_IS_ERR(close_req)); +- } +- +- mem_after = mallinfo(); +- /* Too low chance to predict memory consumption on wire up for all TLS */ +- if (GetParam().variant != FAIL_IMMEDIATELY) { +- EXPECT_GT(mem_before.uordblks, mem_after.uordblks); +- } +- +- /* The EP can't be used now */ +- sender().revoke_ep(); +- +- while (!reqs.empty()) { +- EXPECT_NE(UCS_INPROGRESS, ucp_request_test(reqs.back(), NULL)); +- ucp_request_release(reqs.back()); +- reqs.pop_back(); ++ ucs_fatal("invalid test case"); + } +- +- /* Check that TX polling is working well */ +- while (sender().progress()); +- +- /* When all requests on sender are done we need to prevent LOCAL_FLUSH +- * in test teardown. Receiver is killed and doesn't respond on FC requests +- */ +- sender().destroy_worker(); +- free(buf); + } + +-UCS_TEST_P(test_ucp_peer_failure, disable_sync_send) { +- /* 1GB memory markup takes too long time with valgrind, reduce to 1MB */ +- const size_t max_size = RUNNING_ON_VALGRIND ? (1024 * 1024) : +- (1024 * 1024 * 1024); +- std::vector buf(max_size, 0); +- request *req; +- +- /* Make sure API is disabled for any size and data type */ +- for (size_t size = 1; size <= max_size; size *= 2) { +- req = send_sync_nb(buf.data(), size, DATATYPE, 0x111337); +- EXPECT_FALSE(UCS_PTR_IS_PTR(req)); +- EXPECT_EQ(UCS_ERR_UNSUPPORTED, UCS_PTR_STATUS(req)); +- +- ucp::data_type_desc_t dt_desc(DATATYPE_IOV, buf.data(), size); +- req = send_sync_nb(dt_desc.buf(), dt_desc.count(), dt_desc.dt(), 0x111337); +- EXPECT_FALSE(UCS_PTR_IS_PTR(req)); +- EXPECT_EQ(UCS_ERR_UNSUPPORTED, UCS_PTR_STATUS(req)); ++void *test_ucp_peer_failure::recv_nb(entity& e) { ++ ucs_assert(m_rbuf.size() >= m_sbuf.size()); ++ if (GetParam().variant & TEST_TAG) { ++ return ucp_tag_recv_nb(e.worker(), &m_rbuf[0], m_rbuf.size(), DATATYPE, 0, ++ 0, recv_cb); ++ } else if (GetParam().variant & TEST_RMA) { ++ return NULL; ++ } else { ++ ucs_fatal("invalid test case"); + } + } + +-UCS_TEST_P(test_ucp_peer_failure, status_after_error) { +- test_status_after(false); ++void test_ucp_peer_failure::fail_receiver() { ++ /* TODO: need to handle non-empty TX window in UD EP destructor", ++ * see debug message (ud_ep.c:220) ++ * ucs_debug("ep=%p id=%d conn_id=%d has %d unacked packets", ++ * self, self->ep_id, self->conn_id, ++ * (int)ucs_queue_length(&self->tx.window)); ++ */ ++ // TODO use force-close to close connections ++ flush_worker(failing_receiver()); ++ m_failing_memh.reset(); ++ failing_receiver().cleanup(); + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure) +- +- +-class test_ucp_peer_failure_zcopy : public test_ucp_peer_failure +-{ +-public: +- virtual void init() { +- modify_config("ZCOPY_THRESH", ucs::to_string(m_msg_size - 1)); +- test_ucp_peer_failure::init(); +- } +-}; +- +-UCS_TEST_P(test_ucp_peer_failure_zcopy, status_after_error) { +- test_status_after(true); ++void test_ucp_peer_failure::smoke_test(bool stable_pair) { ++ void *rreq = recv_nb(stable_pair ? stable_receiver() : failing_receiver()); ++ void *sreq = send_nb(stable_pair ? stable_sender() : failing_sender(), ++ stable_pair ? m_stable_rkey : m_failing_rkey); ++ wait(sreq); ++ wait(rreq); ++ EXPECT_EQ(m_sbuf, m_rbuf); + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure_zcopy) +- +- +-class test_ucp_peer_failure_zcopy_multi : public test_ucp_peer_failure_zcopy ++void test_ucp_peer_failure::unmap_memh(ucp_mem_h memh, ucp_context_h context) + { +-public: +- virtual void init() { +- /* MAX BCOPY is internally used as fragment size */ +- m_env.push_back(new ucs::scoped_setenv("UCX_MAX_BCOPY", +- (ucs::to_string(m_msg_size/2) + "b").c_str())); +- /* HW TM does not support multiprotocols and eager protocol for messages +- * bigger than UCT segment size */ +- m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_ENABLE", "n")); +- test_ucp_peer_failure_zcopy::init(); ++ ucs_status_t status = ucp_mem_unmap(context, memh); ++ if (status != UCS_OK) { ++ ucs_warn("failed to unmap memory: %s", ucs_status_string(status)); + } +-}; +- +-UCS_TEST_P(test_ucp_peer_failure_zcopy_multi, status_after_error) { +- test_status_after(true); + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure_zcopy_multi) +- +- +-class test_ucp_peer_failure_with_rma : public test_ucp_peer_failure { +-public: +- enum { +- FAIL_ON_RMA = FAIL_IMMEDIATELY + 1 +- }; +- +- static std::vector +- enum_test_params(const ucp_params_t& ctx_params, +- const std::string& name, +- const std::string& test_case_name, +- const std::string& tls) +- { +- std::vector result = +- test_ucp_peer_failure::enum_test_params(ctx_params, name, +- test_case_name, tls); +- +- generate_test_params_variant(ctx_params, name, test_case_name, tls, +- FAIL_ON_RMA, result); +- return result; +- } +- +- static ucp_params_t get_ctx_params() { +- ucp_params_t params = test_ucp_tag::get_ctx_params(); +- params.features |= UCP_FEATURE_RMA; +- return params; +- } +-}; +- +-UCS_TEST_P(test_ucp_peer_failure_with_rma, status_after_error) { +- unsigned buf = 0; ++void test_ucp_peer_failure::get_rkey(ucp_ep_h ep, entity& dst, mem_handle_t& memh, ++ ucs::handle& rkey) { + ucp_mem_map_params_t params; ++ + memset(¶ms, 0, sizeof(params)); + params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | + UCP_MEM_MAP_PARAM_FIELD_LENGTH; +- params.address = &buf; +- params.length = sizeof(buf); ++ params.address = &m_rbuf[0]; ++ params.length = m_rbuf.size(); + +- ucp_mem_h memh; +- ucs_status_t status = ucp_mem_map(receiver().ucph(), ¶ms, &memh); +- ASSERT_UCS_OK(status); +- ucp_mem_attr_t mem_attr; +- mem_attr.field_mask = UCP_MEM_ATTR_FIELD_ADDRESS; +- status = ucp_mem_query(memh, &mem_attr); ++ ucp_mem_h ucp_memh; ++ ucs_status_t status = ucp_mem_map(dst.ucph(), ¶ms, &ucp_memh); + ASSERT_UCS_OK(status); ++ memh.reset(ucp_memh, unmap_memh, dst.ucph()); + + void *rkey_buffer; + size_t rkey_buffer_size; +- status = ucp_rkey_pack(receiver().ucph(), memh, &rkey_buffer, &rkey_buffer_size); +- ASSERT_UCS_OK(status); +- ucp_rkey_h rkey; +- status = ucp_ep_rkey_unpack(sender().ep(), rkey_buffer, &rkey); ++ status = ucp_rkey_pack(dst.ucph(), memh, &rkey_buffer, &rkey_buffer_size); + ASSERT_UCS_OK(status); +- ucp_rkey_buffer_release(rkey_buffer); +- ucp_mem_unmap(receiver().ucph(), memh); + +- fail_receiver(); +- if (GetParam().variant == FAIL_ON_RMA) { +- ucp_get_nbi(sender().ep(), mem_attr.address, 1, (uintptr_t)&buf, rkey); +- } else { +- request *req = send_nb(NULL, 0, DATATYPE, 0x111337); +- if (UCS_PTR_IS_PTR(req)) { +- request_release(req); +- } +- } +- +- ucp_ep_flush(sender().ep()); +- wait_err(); ++ ucp_rkey_h ucp_rkey; ++ status = ucp_ep_rkey_unpack(ep, rkey_buffer, &ucp_rkey); ++ ASSERT_UCS_OK(status); ++ rkey.reset(ucp_rkey, ucp_rkey_destroy); + +- EXPECT_NE(UCS_OK, m_err_status); ++ ucp_rkey_buffer_release(rkey_buffer); ++} + +- ucs_status_ptr_t status_ptr = ucp_tag_send_nb(sender().ep(), NULL, 0, DATATYPE, +- 0x111337, NULL); +- EXPECT_FALSE(UCS_PTR_IS_PTR(status_ptr)); +- EXPECT_EQ(m_err_status, UCS_PTR_STATUS(status_ptr)); ++void test_ucp_peer_failure::set_rkeys() { + +- status = ucp_put(sender().ep(), mem_attr.address, 1, (uintptr_t)&buf, rkey); +- EXPECT_FALSE(UCS_PTR_IS_PTR(status)); +- EXPECT_EQ(m_err_status, status); +- ucp_rkey_destroy(rkey); ++ if (GetParam().variant & TEST_RMA) { ++ get_rkey(failing_sender(), failing_receiver(), m_failing_memh, ++ m_failing_rkey); ++ get_rkey(stable_sender(), stable_receiver(), m_stable_memh, ++ m_stable_rkey); ++ } ++} + +- /* Destroy failed sender */ +- sender().destroy_worker(); +- m_entities.remove(&sender()); ++void test_ucp_peer_failure::send_cb(void *request, ucs_status_t status) ++{ ++} + +- /* Check workability of second pair */ +- smoke_test(); ++void test_ucp_peer_failure::recv_cb(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t *info) ++{ + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure_with_rma) ++void test_ucp_peer_failure::cleanup() { ++ m_failing_rkey.reset(); ++ m_stable_rkey.reset(); ++ m_failing_memh.reset(); ++ m_stable_memh.reset(); ++ ucp_test::cleanup(); ++} + +-class test_ucp_peer_failure_2pairs : +- public ucp_test, +- protected test_ucp_peer_failure_base ++void test_ucp_peer_failure::do_test(size_t msg_size, int pre_msg_count, ++ bool force_close, bool request_must_fail) + { +-public: +- static ucp_params_t get_ctx_params() { +- ucp_params_t params = ucp_test::get_ctx_params(); +- params.features = UCP_FEATURE_TAG; +- return params; +- } ++ skip_loopback(); + +-protected: +- virtual void init(); +- virtual void cleanup(); ++ /* connect 2 ep's from sender() to 2 receiver entities */ ++ create_entity(); ++ sender().connect(&stable_receiver(), get_ep_params(), STABLE_EP_INDEX); ++ sender().connect(&failing_receiver(), get_ep_params(), FAILING_EP_INDEX); + +- static void err_cb(void *arg, ucp_ep_h ep, ucs_status_t); +- ucp_worker_h rworker(int i); +- ucp_worker_h sworker(); +- void progress(); +- void wait_err(); +- ucs_status_t wait_req(void *req); +- static void rcomplete_cb(void *req, ucs_status_t status, +- ucp_tag_recv_info_t *info); +- static void scomplete_cb(void *req, ucs_status_t status); +- void smoke_test(size_t idx); +- +- static void ep_destructor(ucp_ep_h ep, test_ucp_peer_failure_2pairs* test) { +- test->wait_req(ucp_disconnect_nb(ep)); +- } ++ m_sbuf.resize(msg_size); ++ m_rbuf.resize(msg_size); + +- virtual ucp_ep_params_t get_ep_params() { +- return test_ucp_peer_failure_base::get_ep_params(); +- } ++ set_rkeys(); + +- ucs::handle m_ucph; +- std::vector > m_workers; +- std::vector > m_eps; +- ucs::ptr_vector m_env; +-}; ++ if (!(GetParam().variant & FAIL_IMM)) { ++ /* if not faill immediately, run traffic on failing pair to connect it */ ++ smoke_test(false); ++ } + +-void test_ucp_peer_failure_2pairs::init() +-{ +- test_base::init(); /* skip entities creation */ +- test_ucp_peer_failure_base::init(); +- +- set_ucp_config(m_ucp_config); +- ucp_params_t cparams = get_ctx_params(); +- UCS_TEST_CREATE_HANDLE(ucp_context_h, m_ucph, ucp_cleanup, +- ucp_init, &cparams, m_ucp_config); +- +- m_workers.resize(3); +- for (int i = 0; i < 3; ++i) { +- ucp_worker_params_t wparams = get_worker_params(); +- UCS_TEST_CREATE_HANDLE(ucp_worker_h, m_workers[i], ucp_worker_destroy, +- ucp_worker_create, m_ucph, &wparams); ++ /* put some sends on the failing pair */ ++ std::vector sreqs_pre; ++ for (int i = 0; i < pre_msg_count; ++i) { ++ progress(); ++ void *req = send_nb(failing_sender(), m_failing_rkey); ++ ASSERT_FALSE(UCS_PTR_IS_ERR(req)); ++ if (UCS_PTR_IS_PTR(req)) { ++ sreqs_pre.push_back(req); ++ } + } + +- m_eps.resize(2); +- for (int i = 0; i < 2; ++i) { +- ucp_address_t *address; +- size_t address_length; +- ucs_status_t status; +- ucp_ep_h ep; ++ EXPECT_EQ(UCS_OK, m_err_status); + +- status = ucp_worker_get_address(rworker(i), &address, &address_length); +- ASSERT_UCS_OK(status); ++ { ++ scoped_log_handler slh(wrap_errors_logger); + +- ucp_ep_params ep_params = get_ep_params(); +- ep_params.field_mask |= UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- ep_params.address = address; ++ fail_receiver(); + +- hide_errors(); +- status = ucp_ep_create(sworker(), &ep_params, &ep); +- restore_errors(); ++ void *sreq = send_nb(failing_sender(), m_failing_rkey); + +- ucp_worker_release_address(rworker(i), address); ++ while (!m_err_count) { ++ progress(); ++ } ++ EXPECT_NE(UCS_OK, m_err_status); + +- if (status == UCS_ERR_UNREACHABLE) { +- UCS_TEST_SKIP_R(m_errors.empty() ? "" : m_errors.back()); ++ if (UCS_PTR_IS_PTR(sreq)) { ++ /* The request may either succeed or fail, even though the data is ++ * not * delivered - depends on when the error is detected on sender ++ * side and if zcopy/bcopy protocol is used. In any case, the ++ * request must complete, and all resources have to be released. ++ */ ++ ucs_status_t status = ucp_request_check_status(sreq); ++ EXPECT_NE(UCS_INPROGRESS, status); ++ if (request_must_fail) { ++ EXPECT_EQ(m_err_status, status); ++ } else { ++ EXPECT_TRUE((m_err_status == status) || (UCS_OK == status)); ++ } ++ ucp_request_release(sreq); + } + +- m_eps[i].reset(ep, ep_destructor, this); +- } ++ /* Additional sends must fail */ ++ void *sreq2 = send_nb(failing_sender(), m_failing_rkey); ++ EXPECT_FALSE(UCS_PTR_IS_PTR(sreq2)); ++ EXPECT_EQ(m_err_status, UCS_PTR_STATUS(sreq2)); + +- /* Make sure wire up is done*/ +- smoke_test(0); +- smoke_test(1); ++ if (force_close) { ++ unsigned allocd_eps_before = ++ ucs_strided_alloc_inuse_count(&sender().worker()->ep_alloc); + +- wrap_errors(); +-} ++ ucp_ep_h ep = sender().revoke_ep(0, FAILING_EP_INDEX); + +-void test_ucp_peer_failure_2pairs::cleanup() +-{ +- restore_errors(); +- m_eps.clear(); +- m_workers.clear(); +- test_base::cleanup(); +-} ++ void *creq = ucp_ep_close_nb(ep, UCP_EP_CLOSE_MODE_FORCE); ++ wait(creq); + +-void test_ucp_peer_failure_2pairs::err_cb(void *arg, ucp_ep_h ep, ucs_status_t) { +- test_ucp_peer_failure_2pairs *self; +- self = *reinterpret_cast(arg); +- self->m_err_cntr++; +-} ++ unsigned allocd_eps_after = ++ ucs_strided_alloc_inuse_count(&sender().worker()->ep_alloc); + +-ucp_worker_h test_ucp_peer_failure_2pairs::rworker(int i) +-{ +- return m_workers[i]; +-} +- +-ucp_worker_h test_ucp_peer_failure_2pairs::sworker() +-{ +- return m_workers[2]; +-} +- +-void test_ucp_peer_failure_2pairs::progress() +-{ +- for (std::vector >::iterator iter = m_workers.begin(); +- iter != m_workers.end(); ++iter) +- { +- if (*iter) { +- ucp_worker_progress(*iter); ++ if (!(GetParam().variant & FAIL_IMM)) { ++ EXPECT_LT(allocd_eps_after, allocd_eps_before); ++ } + } +- } +-} + +-void test_ucp_peer_failure_2pairs::wait_err() +-{ +- while (!m_err_cntr) { +- progress(); ++ /* release requests */ ++ while (!sreqs_pre.empty()) { ++ void *req = sreqs_pre.back(); ++ sreqs_pre.pop_back(); ++ EXPECT_NE(UCS_INPROGRESS, ucp_request_test(req, NULL)); ++ ucp_request_release(req); ++ } + } +-} + +-ucs_status_t test_ucp_peer_failure_2pairs::wait_req(void *req) +-{ +- if (req == NULL) { +- return UCS_OK; +- } ++ /* Check workability of stable pair */ ++ smoke_test(true); + +- ucs_assert(!!req); +- if (UCS_PTR_IS_ERR(req)) { +- return UCS_PTR_STATUS(req); +- } ++ /* Check that TX polling is working well */ ++ while (sender().progress()); + +- ucs_status_t status; +- do { +- progress(); +- status = ucp_request_check_status(req); +- } while (status == UCS_INPROGRESS); +- ucp_request_release(req); +- return status; ++ /* When all requests on sender are done we need to prevent LOCAL_FLUSH ++ * in test teardown. Receiver is killed and doesn't respond on FC requests ++ */ ++ sender().destroy_worker(); + } + +-void test_ucp_peer_failure_2pairs::rcomplete_cb(void *req, ucs_status_t status, +- ucp_tag_recv_info_t *info) +-{ ++UCS_TEST_P(test_ucp_peer_failure, basic) { ++ do_test(1024, /* msg_size */ ++ 0, /* pre_msg_cnt */ ++ false, /* force_close */ ++ false /* must_fail */); + } + +-void test_ucp_peer_failure_2pairs::scomplete_cb(void *req, ucs_status_t status) +-{ ++UCS_TEST_P(test_ucp_peer_failure, zcopy, "ZCOPY_THRESH=1023") { ++ do_test(1024, /* msg_size */ ++ 0, /* pre_msg_cnt */ ++ false, /* force_close */ ++ true /* must_fail */); + } + +-void test_ucp_peer_failure_2pairs::smoke_test(size_t idx) +-{ +- long buf = 0; +- void *rreq = ucp_tag_recv_nb(rworker(idx), &buf, 1, +- ucp_dt_make_contig(1), 0, 0, +- rcomplete_cb); +- void *sreq = ucp_tag_send_nb(m_eps[idx], &buf, 1, +- ucp_dt_make_contig(1), 0, +- scomplete_cb); +- wait_req(sreq); +- wait_req(rreq); ++UCS_TEST_P(test_ucp_peer_failure, bcopy_multi, "MAX_BCOPY?=512", "RC_TM_ENABLE?=n") { ++ do_test(1024, /* msg_size */ ++ 0, /* pre_msg_cnt */ ++ false, /* force_close */ ++ false /* must_fail */); + } + +-UCS_TEST_P(test_ucp_peer_failure_2pairs, status_after_error) { +- +- m_workers[0].reset(); +- +- ucs_status_t status; +- void *sreq; +- unsigned buf = 0; +- +- do { +- sreq = ucp_tag_send_nb(m_eps[0], &buf, 1, ucp_dt_make_contig(1), +- 0x111337, scomplete_cb); +- status = wait_req(sreq); +- } while ((status == UCS_OK) || !m_err_cntr); +- +- wait_err(); +- +- EXPECT_NE(UCS_OK, m_err_status); +- +- sreq = ucp_tag_send_nb(m_eps[0], NULL, 0, ucp_dt_make_contig(1), 0x111337, +- scomplete_cb); +- EXPECT_FALSE(UCS_PTR_IS_PTR(sreq)); +- EXPECT_EQ(m_err_status, UCS_PTR_STATUS(sreq)); ++UCS_TEST_P(test_ucp_peer_failure, force_close, "RC_FC_ENABLE?=n") { ++ do_test(16000, /* msg_size */ ++ 1000, /* pre_msg_cnt */ ++ true, /* force_close */ ++ false /* must_fail */); ++} + +- /* Destroy failed sender */ +- m_eps[0].reset(); ++UCS_TEST_P(test_ucp_peer_failure, disable_sync_send) { ++ const size_t max_size = UCS_MBYTE; ++ std::vector buf(max_size, 0); ++ void *req; + +- /* Check workability of second pair */ +- smoke_test(1); +-} ++ if (!(GetParam().variant & TEST_TAG)) { ++ UCS_TEST_SKIP_R("Skip non-tagged variant"); ++ } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure_2pairs) ++ sender().connect(&receiver(), get_ep_params()); + +-class test_ucp_ep_force_disconnect : public test_ucp_peer_failure +-{ +-public: +- virtual void init() { +- const std::vector &tls = GetParam().transports; +- std::vector skip_tls; +- +- skip_tls.push_back("rc_x"); +- skip_tls.push_back("ib"); +- +- if (std::find_first_of(tls.begin(), tls.end(), +- skip_tls.begin(), skip_tls.end()) != tls.end()) { +- UCS_TEST_SKIP_R("TEMPORATY DISABLED. There is a known issue with " +- "rc_mlx5 transport: it can't successfully clean up " +- "iface resources if it's receiving on closure. " +- "The issue is hardly reproducible with running 4+ " +- "gtest instances on the same node"); +- } ++ /* Make sure API is disabled for any size and data type */ ++ for (size_t size = 1; size <= max_size; size *= 2) { ++ req = ucp_tag_send_sync_nb(sender().ep(), buf.data(), size, DATATYPE, ++ 0x111337, NULL); ++ EXPECT_FALSE(UCS_PTR_IS_PTR(req)); ++ EXPECT_EQ(UCS_ERR_UNSUPPORTED, UCS_PTR_STATUS(req)); + +- m_env.clear(); /* restore default timeouts. */ +- test_ucp_peer_failure::init(); ++ ucp::data_type_desc_t dt_desc(DATATYPE_IOV, buf.data(), size); ++ req = ucp_tag_send_sync_nb(sender().ep(), dt_desc.buf(), dt_desc.count(), ++ dt_desc.dt(), 0x111337, NULL); ++ EXPECT_FALSE(UCS_PTR_IS_PTR(req)); ++ EXPECT_EQ(UCS_ERR_UNSUPPORTED, UCS_PTR_STATUS(req)); + } +-}; +- +-UCS_TEST_P(test_ucp_ep_force_disconnect, test) { +- test_force_close(); + } +- +-UCP_INSTANTIATE_TEST_CASE(test_ucp_ep_force_disconnect) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_perf.cc +index 50376c3..0109bca 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_perf.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_perf.cc +@@ -66,7 +66,7 @@ test_perf::test_spec test_ucp_perf::tests[] = + { "tag sync mr", "Mpps", + UCX_PERF_API_UCP, UCX_PERF_CMD_TAG_SYNC, UCX_PERF_TEST_TYPE_STREAM_UNI, + UCP_PERF_DATATYPE_CONTIG, 0, 1, { 8 }, 1, 2000000l, +- ucs_offsetof(ucx_perf_result_t, msgrate.total_average), 1e-6, 0.1, 100.0, 0}, ++ ucs_offsetof(ucx_perf_result_t, msgrate.total_average), 1e-6, 0.05, 100.0, 0}, + + { "tag wild mr", "Mpps", + UCX_PERF_API_UCP, UCX_PERF_CMD_TAG, UCX_PERF_TEST_TYPE_STREAM_UNI, +@@ -139,7 +139,7 @@ test_perf::test_spec test_ucp_perf::tests[] = + { "atomic add rate", "Mpps", + UCX_PERF_API_UCP, UCX_PERF_CMD_ADD, UCX_PERF_TEST_TYPE_STREAM_UNI, + UCP_PERF_DATATYPE_CONTIG, 0, 1, { 8 }, 1, 1000000l, +- ucs_offsetof(ucx_perf_result_t, msgrate.total_average), 1e-6, 0.5, 100.0, ++ ucs_offsetof(ucx_perf_result_t, msgrate.total_average), 1e-6, 0.1, 500.0, + 0 }, + + { "atomic fadd latency", "usec", +@@ -175,14 +175,14 @@ UCS_TEST_P(test_ucp_perf, envelope) { + + /* coverity[tainted_string_argument] */ + ucs::scoped_setenv tls("UCX_TLS", ss.str().c_str()); ++ ucs::scoped_setenv warn_invalid("UCX_WARN_INVALID_CONFIG", "no"); ++ + for (test_spec *test = tests; test->title != NULL; ++test) { +- unsigned flags = (test->command == UCX_PERF_CMD_TAG) ? 0 : +- UCX_PERF_TEST_FLAG_ONE_SIDED; + if (ucs_arch_get_cpu_model() == UCS_CPU_MODEL_ARM_AARCH64) { + test->max *= UCP_ARM_PERF_TEST_MULTIPLIER; + test->min /= UCP_ARM_PERF_TEST_MULTIPLIER; + } +- run_test(*test, flags, check_perf, "", ""); ++ run_test(*test, 0, check_perf, "", ""); + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma.cc +index 690de20..6bb31e2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma.cc +@@ -10,6 +10,8 @@ + + + class test_ucp_rma : public test_ucp_memheap { ++private: ++ static void send_completion(void *request, ucs_status_t status){} + public: + static ucp_params_t get_ctx_params() { + ucp_params_t params = ucp_test::get_ctx_params(); +@@ -42,15 +44,19 @@ public: + ASSERT_UCS_OK_OR_INPROGRESS(status); + } + +- void blocking_put(entity *e, size_t max_size, +- void *memheap_addr, +- ucp_rkey_h rkey, +- std::string& expected_data) ++ void nonblocking_put_nb(entity *e, size_t max_size, ++ void *memheap_addr, ++ ucp_rkey_h rkey, ++ std::string& expected_data) + { +- ucs_status_t status; +- status = ucp_put(e->ep(), &expected_data[0], expected_data.length(), +- (uintptr_t)memheap_addr, rkey); +- ASSERT_UCS_OK(status); ++ void *status; ++ ++ status = ucp_put_nb(e->ep(), &expected_data[0], expected_data.length(), ++ (uintptr_t)memheap_addr, rkey, send_completion); ++ ASSERT_UCS_PTR_OK(status); ++ if (UCS_PTR_IS_PTR(status)) { ++ wait(status); ++ } + } + + void nonblocking_get_nbi(entity *e, size_t max_size, +@@ -66,17 +72,20 @@ public: + ASSERT_UCS_OK_OR_INPROGRESS(status); + } + +- void blocking_get(entity *e, size_t max_size, +- void *memheap_addr, +- ucp_rkey_h rkey, +- std::string& expected_data) ++ void nonblocking_get_nb(entity *e, size_t max_size, ++ void *memheap_addr, ++ ucp_rkey_h rkey, ++ std::string& expected_data) + { +- ucs_status_t status; ++ void *status; + + ucs::fill_random(memheap_addr, ucs_min(max_size, 16384U)); +- status = ucp_get(e->ep(), (void *)&expected_data[0], expected_data.length(), +- (uintptr_t)memheap_addr, rkey); +- ASSERT_UCS_OK(status); ++ status = ucp_get_nb(e->ep(), &expected_data[0], expected_data.length(), ++ (uintptr_t)memheap_addr, rkey, send_completion); ++ ASSERT_UCS_PTR_OK(status); ++ if (UCS_PTR_IS_PTR(status)) { ++ wait(status); ++ } + } + + void test_message_sizes(blocking_send_func_t func, size_t *msizes, int iters, int is_nbi); +@@ -96,38 +105,8 @@ void test_ucp_rma::test_message_sizes(blocking_send_func_t func, size_t *msizes, + } + } + +-UCS_TEST_P(test_ucp_rma, blocking_small) { +- size_t sizes[] = { 8, 24, 96, 120, 250, 0}; +- +- test_message_sizes(static_cast(&test_ucp_rma::blocking_put), +- sizes, 1000, 0); +- test_message_sizes(static_cast(&test_ucp_rma::blocking_get), +- sizes, 1000, 0); +-} +- +-UCS_TEST_P(test_ucp_rma, blocking_med) { +- size_t sizes[] = { 1000, 3000, 9000, 17300, 31000, 99000, 130000, 0}; +- +- test_message_sizes(static_cast(&test_ucp_rma::blocking_put), +- sizes, 100, 0); +- test_message_sizes(static_cast(&test_ucp_rma::blocking_get), +- sizes, 100, 0); +-} +- + static const size_t MEG = 1024 * 1024ULL; + +-UCS_TEST_P(test_ucp_rma, blocking_large) { +- size_t sizes[] = { 1 * MEG, 3 * MEG, 9 * MEG, 17 * MEG, 32 * MEG, 0}; +- +- if (RUNNING_ON_VALGRIND) { +- UCS_TEST_SKIP_R("skipping on valgrind"); +- } +- test_message_sizes(static_cast(&test_ucp_rma::blocking_put), +- sizes, 3, 0); +- test_message_sizes(static_cast(&test_ucp_rma::blocking_get), +- sizes, 3, 0); +-} +- + UCS_TEST_P(test_ucp_rma, nbi_small) { + size_t sizes[] = { 8, 24, 96, 120, 250, 0}; + +@@ -159,16 +138,35 @@ UCS_TEST_P(test_ucp_rma, nbi_large) { + sizes, 3, 1); + } + +-UCS_TEST_P(test_ucp_rma, blocking_put_allocated) { +- test_blocking_xfer(static_cast(&test_ucp_rma::blocking_put), +- DEFAULT_SIZE, DEFAULT_ITERS, +- 1, false, false); ++UCS_TEST_P(test_ucp_rma, nb_small) { ++ size_t sizes[] = { 8, 24, 96, 120, 250, 0}; ++ ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ sizes, 1000, 1); ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ sizes, 1000, 1); + } + +-UCS_TEST_P(test_ucp_rma, blocking_put_registered) { +- test_blocking_xfer(static_cast(&test_ucp_rma::blocking_put), +- DEFAULT_SIZE, DEFAULT_ITERS, +- 1, true, false); ++UCS_TEST_P(test_ucp_rma, nb_med) { ++ size_t sizes[] = { 1000, 3000, 9000, 17300, 31000, 99000, 130000, 0}; ++ ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ sizes, 100, 1); ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ sizes, 100, 1); ++} ++ ++UCS_TEST_P(test_ucp_rma, nb_large) { ++ size_t sizes[] = { 1 * MEG, 3 * MEG, 9 * MEG, 17 * MEG, 32 * MEG, 0}; ++ ++ if (RUNNING_ON_VALGRIND) { ++ UCS_TEST_SKIP_R("skipping on valgrind"); ++ } ++ ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ sizes, 3, 1); ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ sizes, 3, 1); + } + + UCS_TEST_P(test_ucp_rma, nonblocking_put_nbi_flush_worker) { +@@ -207,15 +205,42 @@ UCS_TEST_P(test_ucp_rma, nonblocking_stream_put_nbi_flush_ep) { + 1, true, true); + } + +-UCS_TEST_P(test_ucp_rma, blocking_get) { +- test_blocking_xfer(static_cast(&test_ucp_rma::blocking_get), ++UCS_TEST_P(test_ucp_rma, nonblocking_put_nb_flush_worker) { ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), + DEFAULT_SIZE, DEFAULT_ITERS, + 1, false, false); +- test_blocking_xfer(static_cast(&test_ucp_rma::blocking_get), ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), + DEFAULT_SIZE, DEFAULT_ITERS, + 1, true, false); + } + ++UCS_TEST_P(test_ucp_rma, nonblocking_put_nb_flush_ep) { ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, true); ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, true); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_stream_put_nb_flush_worker) { ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, false); ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, false); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_stream_put_nb_flush_ep) { ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, true); ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, true); ++} ++ + UCS_TEST_P(test_ucp_rma, nonblocking_get_nbi_flush_worker) { + test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nbi), + DEFAULT_SIZE, DEFAULT_ITERS, +@@ -252,4 +277,40 @@ UCS_TEST_P(test_ucp_rma, nonblocking_stream_get_nbi_flush_ep) { + 1, true, true); + } + ++UCS_TEST_P(test_ucp_rma, nonblocking_get_nb_flush_worker) { ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, false); ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, false); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_get_nb_flush_ep) { ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, true); ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, true); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_stream_get_nb_flush_worker) { ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, false); ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, false); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_stream_get_nb_flush_ep) { ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, true); ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, true); ++} ++ + UCP_INSTANTIATE_TEST_CASE(test_ucp_rma) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma_mt.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma_mt.cc +index 9f9b97c..8ca56c8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma_mt.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma_mt.cc +@@ -27,6 +27,14 @@ public: + { + ucp_test::init(); + sender().connect(&receiver(), get_ep_params()); ++ for (int i = 0; i < sender().get_num_workers(); i++) { ++ /* avoid deadlock for blocking rma */ ++ flush_worker(sender(), i); ++ } ++ } ++ ++ static void send_cb(void *req, ucs_status_t status) ++ { + } + + static std::vector enum_test_params(const ucp_params_t& ctx_params, +@@ -90,15 +98,16 @@ UCS_TEST_P(test_ucp_rma_mt, put_get) { + #if _OPENMP && ENABLE_MT + #pragma omp parallel for + for (i = 0; i < MT_TEST_NUM_THREADS; i++) { +- ucs_status_t status; + int worker_index = 0; + +- if (GetParam().thread_type == MULTI_THREAD_CONTEXT) ++ if (GetParam().thread_type == MULTI_THREAD_CONTEXT) { + worker_index = i; ++ } + +- status = ucp_put(sender().ep(worker_index), &orig_data[i], sizeof(uint64_t), +- (uintptr_t)((uint64_t *)memheap + i), rkey[worker_index]); +- ASSERT_UCS_OK(status); ++ void* req = ucp_put_nb(sender().ep(worker_index), &orig_data[i], ++ sizeof(uint64_t), (uintptr_t)((uint64_t*)memheap + i), ++ rkey[worker_index], send_cb); ++ wait(req, worker_index); + + flush_worker(sender(), worker_index); + +@@ -123,7 +132,7 @@ UCS_TEST_P(test_ucp_rma_mt, put_get) { + worker_index = i; + + status = ucp_put_nbi(sender().ep(worker_index), &orig_data[i], sizeof(uint64_t), +- (uintptr_t)((uint64_t *)memheap + i), rkey[worker_index]); ++ (uintptr_t)((uint64_t*)memheap + i), rkey[worker_index]); + ASSERT_UCS_OK_OR_INPROGRESS(status); + + flush_worker(sender(), worker_index); +@@ -142,15 +151,16 @@ UCS_TEST_P(test_ucp_rma_mt, put_get) { + #if _OPENMP && ENABLE_MT + #pragma omp parallel for + for (i = 0; i < MT_TEST_NUM_THREADS; i++) { +- ucs_status_t status; + int worker_index = 0; + +- if (GetParam().thread_type == MULTI_THREAD_CONTEXT) ++ if (GetParam().thread_type == MULTI_THREAD_CONTEXT) { + worker_index = i; ++ } + +- status = ucp_get(sender().ep(worker_index), &orig_data[i], sizeof(uint64_t), +- (uintptr_t)((uint64_t *)memheap + i), rkey[worker_index]); +- ASSERT_UCS_OK(status); ++ void *req = ucp_get_nb(sender().ep(worker_index), &orig_data[i], ++ sizeof(uint64_t), (uintptr_t)((uint64_t*)memheap + i), ++ rkey[worker_index], send_cb); ++ wait(req, worker_index); + + flush_worker(sender(), worker_index); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_sockaddr.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_sockaddr.cc +index 8fb00b5..0de1d75 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_sockaddr.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_sockaddr.cc +@@ -9,16 +9,79 @@ + #include + #include + #include ++#include ++ ++#define UCP_INSTANTIATE_ALL_TEST_CASE(_test_case) \ ++ UCP_INSTANTIATE_TEST_CASE (_test_case) \ ++ UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, shm, "shm") \ ++ UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, dc_ud, "dc_x,dc,ud,ud_x,mm") \ ++ UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, no_ud_ud_x, "dc_x,dc,mm") \ ++ /* dc_ud case is for testing handling of a large worker address on ++ * UCT_IFACE_FLAG_CONNECT_TO_IFACE transports (dc, dc_x) */ ++ /* no_ud_ud_x case is for testing handling a large worker address ++ * but with the lack of ud/ud_x transports, which would return an error ++ * and skipped */ + + class test_ucp_sockaddr : public ucp_test { + public: + static ucp_params_t get_ctx_params() { + ucp_params_t params = ucp_test::get_ctx_params(); + params.field_mask |= UCP_PARAM_FIELD_FEATURES; +- params.features = UCP_FEATURE_TAG; ++ params.features = UCP_FEATURE_TAG | UCP_FEATURE_STREAM; + return params; + } + ++ enum { ++ MT_PARAM_VARIANT = DEFAULT_PARAM_VARIANT + 1, /* Enabled worker level ++ multi-threading */ ++ CONN_REQ_TAG, /* Accepting by ucp_conn_request_h, ++ send/recv by TAG API */ ++ CONN_REQ_STREAM /* Accepting by ucp_conn_request_h, ++ send/recv by STREAM API */ ++ }; ++ ++ typedef enum { ++ SEND_RECV_TAG, ++ SEND_RECV_STREAM ++ } send_recv_type_t; ++ ++ static std::vector ++ enum_test_params(const ucp_params_t& ctx_params, ++ const std::string& name, ++ const std::string& test_case_name, ++ const std::string& tls) ++ { ++ std::vector result = ++ ucp_test::enum_test_params(ctx_params, name, test_case_name, tls); ++ ++ generate_test_params_variant(ctx_params, name, test_case_name, tls, ++ MT_PARAM_VARIANT, result, ++ MULTI_THREAD_WORKER); ++ generate_test_params_variant(ctx_params, name, test_case_name, tls, ++ CONN_REQ_TAG, result); ++ generate_test_params_variant(ctx_params, name, test_case_name, tls, ++ CONN_REQ_STREAM, result); ++ return result; ++ } ++ ++ static ucs_log_func_rc_t ++ detect_error_logger(const char *file, unsigned line, const char *function, ++ ucs_log_level_t level, const char *message, va_list ap) ++ { ++ if (level == UCS_LOG_LEVEL_ERROR) { ++ std::string err_str = format_message(message, ap); ++ if ((strstr(err_str.c_str(), "no supported sockaddr auxiliary transports found for")) || ++ (strstr(err_str.c_str(), "sockaddr aux resources addresses")) || ++ (strstr(err_str.c_str(), "no peer failure handler")) || ++ /* when the "peer failure" error happens, it is followed by: */ ++ (strstr(err_str.c_str(), "received event RDMA_CM_EVENT_UNREACHABLE"))) { ++ UCS_TEST_MESSAGE << err_str; ++ return UCS_LOG_FUNC_RC_STOP; ++ } ++ } ++ return UCS_LOG_FUNC_RC_CONTINUE; ++ } ++ + void get_listen_addr(struct sockaddr_in *listen_addr) { + struct ifaddrs* ifaddrs; + int ret = getifaddrs(&ifaddrs); +@@ -27,7 +90,7 @@ public: + for (struct ifaddrs *ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { + if (ucs_netif_is_active(ifa->ifa_name) && + ucs::is_inet_addr(ifa->ifa_addr) && +- ucs::is_ib_netdev(ifa->ifa_name)) ++ ucs::is_rdmacm_netdev(ifa->ifa_name)) + { + *listen_addr = *(struct sockaddr_in*)(void*)ifa->ifa_addr; + listen_addr->sin_port = ucs::get_port(); +@@ -39,41 +102,172 @@ public: + UCS_TEST_SKIP_R("No interface for testing"); + } + ++ void inaddr_any_addr(struct sockaddr_in *addr, in_port_t port) ++ { ++ memset(addr, 0, sizeof(struct sockaddr_in)); ++ addr->sin_family = AF_INET; ++ addr->sin_addr.s_addr = INADDR_ANY; ++ addr->sin_port = port; ++ } ++ ++ void start_listener(ucp_test_base::entity::listen_cb_type_t cb_type, ++ const struct sockaddr* addr) ++ { ++ ucs_status_t status = receiver().listen(cb_type, addr, sizeof(*addr)); ++ if (status == UCS_ERR_UNREACHABLE) { ++ UCS_TEST_SKIP_R("cannot listen to " + ucs::sockaddr_to_str(addr)); ++ } ++ } ++ + static void scomplete_cb(void *req, ucs_status_t status) + { +- ASSERT_UCS_OK(status); ++ if ((status == UCS_OK) || ++ (status == UCS_ERR_UNREACHABLE) || ++ (status == UCS_ERR_REJECTED)) { ++ return; ++ } ++ UCS_TEST_ABORT("Error: " << ucs_status_string(status)); ++ } ++ ++ static void rtag_complete_cb(void *req, ucs_status_t status, ++ ucp_tag_recv_info_t *info) ++ { ++ EXPECT_UCS_OK(status); + } + +- static void rcomplete_cb(void *req, ucs_status_t status, +- ucp_tag_recv_info_t *info) ++ static void rstream_complete_cb(void *req, ucs_status_t status, ++ size_t length) + { ++ EXPECT_UCS_OK(status); ++ } ++ ++ static void wait_for_wakeup(ucp_worker_h send_worker, ucp_worker_h recv_worker) ++ { ++ int ret, send_efd, recv_efd; ++ ucs_status_t status; ++ ++ ASSERT_UCS_OK(ucp_worker_get_efd(send_worker, &send_efd)); ++ ASSERT_UCS_OK(ucp_worker_get_efd(recv_worker, &recv_efd)); ++ ++ status = ucp_worker_arm(recv_worker); ++ if (status == UCS_ERR_BUSY) { ++ return; ++ } + ASSERT_UCS_OK(status); ++ ++ status = ucp_worker_arm(send_worker); ++ if (status == UCS_ERR_BUSY) { ++ return; ++ } ++ ASSERT_UCS_OK(status); ++ ++ do { ++ struct pollfd pfd[2]; ++ pfd[0].fd = send_efd; ++ pfd[1].fd = recv_efd; ++ pfd[0].events = POLLIN; ++ pfd[1].events = POLLIN; ++ ret = poll(pfd, 2, -1); ++ } while ((ret < 0) && (errno == EINTR)); ++ if (ret < 0) { ++ UCS_TEST_MESSAGE << "poll() failed: " << strerror(errno); ++ } ++ ++ EXPECT_GE(ret, 1); + } + +- void tag_send(entity& from, entity& to) { +- uint64_t send_data = ucs_generate_uuid(0); +- void *send_req = ucp_tag_send_nb(from.ep(), &send_data, 1, +- ucp_dt_make_contig(sizeof(send_data)), +- 1, scomplete_cb); ++ void check_events(ucp_worker_h send_worker, ucp_worker_h recv_worker, ++ bool wakeup, void *req) ++ { ++ if (progress()) { ++ return; ++ } ++ ++ if ((req != NULL) && (ucp_request_check_status(req) == UCS_ERR_UNREACHABLE)) { ++ return; ++ } ++ ++ if (wakeup) { ++ wait_for_wakeup(send_worker, recv_worker); ++ } ++ } ++ ++ void send_recv(entity& from, entity& to, send_recv_type_t send_recv_type, ++ bool wakeup, ucp_test_base::entity::listen_cb_type_t cb_type) ++ { ++ const uint64_t send_data = ucs_generate_uuid(0); ++ void *send_req = NULL; ++ if (send_recv_type == SEND_RECV_TAG) { ++ send_req = ucp_tag_send_nb(from.ep(), &send_data, 1, ++ ucp_dt_make_contig(sizeof(send_data)), 1, ++ scomplete_cb); ++ } else if (send_recv_type == SEND_RECV_STREAM) { ++ send_req = ucp_stream_send_nb(from.ep(), &send_data, 1, ++ ucp_dt_make_contig(sizeof(send_data)), ++ scomplete_cb, 0); ++ } else { ++ ASSERT_TRUE(false) << "unsupported communication type"; ++ } ++ ++ ucs_status_t send_status; + if (send_req == NULL) { ++ send_status = UCS_OK; + } else if (UCS_PTR_IS_ERR(send_req)) { +- ASSERT_UCS_OK(UCS_PTR_STATUS(send_req)); ++ send_status = UCS_PTR_STATUS(send_req); ++ ASSERT_UCS_OK(send_status); + } else { + while (!ucp_request_is_completed(send_req)) { +- progress(); ++ check_events(from.worker(), to.worker(), wakeup, send_req); + } ++ send_status = ucp_request_check_status(send_req); + ucp_request_free(send_req); + } + ++ if (send_status == UCS_ERR_UNREACHABLE) { ++ /* Check if the error was completed due to the error handling flow. ++ * If so, skip the test since a valid error occurred - the one expected ++ * from the error handling flow - cases of failure to handle long worker ++ * address or transport doesn't support the error handling requirement */ ++ UCS_TEST_SKIP_R("Skipping due an unreachable destination (unsupported " ++ "feature or too long worker address or no " ++ "supported transport to send partial worker " ++ "address)"); ++ } else if ((send_status == UCS_ERR_REJECTED) && ++ (cb_type == ucp_test_base::entity::LISTEN_CB_REJECT)) { ++ return; ++ } else { ++ ASSERT_UCS_OK(send_status); ++ } ++ + uint64_t recv_data = 0; +- void *recv_req = ucp_tag_recv_nb(to.worker(), &recv_data, 1, +- ucp_dt_make_contig(sizeof(recv_data)), +- 1, 0, rcomplete_cb); +- if (UCS_PTR_IS_ERR(recv_req)) { +- ASSERT_UCS_OK(UCS_PTR_STATUS(recv_req)); ++ void *recv_req; ++ if (send_recv_type == SEND_RECV_TAG) { ++ recv_req = ucp_tag_recv_nb(to.worker(), &recv_data, 1, ++ ucp_dt_make_contig(sizeof(recv_data)), ++ 1, 0, rtag_complete_cb); + } else { +- while (!ucp_request_is_completed(recv_req)) { ++ ASSERT_TRUE(send_recv_type == SEND_RECV_STREAM); ++ ucp_stream_poll_ep_t poll_eps; ++ ssize_t ep_count; ++ size_t recv_length; ++ do { + progress(); ++ ep_count = ucp_stream_worker_poll(to.worker(), &poll_eps, 1, 0); ++ } while (ep_count == 0); ++ ASSERT_EQ(1, ep_count); ++ EXPECT_EQ(to.ep(), poll_eps.ep); ++ EXPECT_EQ((void *)0xdeadbeef, poll_eps.user_data); ++ ++ recv_req = ucp_stream_recv_nb(to.ep(), &recv_data, 1, ++ ucp_dt_make_contig(sizeof(recv_data)), ++ rstream_complete_cb, &recv_length, ++ UCP_STREAM_RECV_FLAG_WAITALL); ++ } ++ ++ if (recv_req != NULL) { ++ ASSERT_TRUE(UCS_PTR_IS_PTR(recv_req)); ++ while (!ucp_request_is_completed(recv_req)) { ++ check_events(from.worker(), to.worker(), wakeup, recv_req); + } + ucp_request_free(recv_req); + } +@@ -81,81 +275,266 @@ public: + EXPECT_EQ(send_data, recv_data); + } + ++ bool wait_for_server_ep(bool wakeup) ++ { ++ ucs_time_t time_limit = ucs_get_time() + ucs_time_from_sec(UCP_TEST_TIMEOUT_IN_SEC); ++ ++ while ((receiver().get_num_eps() == 0) && (m_err_handler_count == 0) && ++ (ucs_get_time() < time_limit)) { ++ check_events(sender().worker(), receiver().worker(), wakeup, NULL); ++ } ++ return (m_err_handler_count == 0) && (receiver().get_num_eps() > 0); ++ } ++ ++ void wait_for_reject(entity &e, bool wakeup) ++ { ++ ucs_time_t time_limit = ucs_get_time() + ++ ucs_time_from_sec(UCP_TEST_TIMEOUT_IN_SEC); ++ ++ while ((e.get_rejected_cntr() == 0) && ++ (ucs_get_time() < time_limit)) { ++ check_events(sender().worker(), receiver().worker(), wakeup, NULL); ++ } ++ EXPECT_GT(time_limit, ucs_get_time()); ++ EXPECT_EQ(1ul, e.get_rejected_cntr()); ++ } ++ ++ virtual ucp_ep_params_t get_ep_params() ++ { ++ ucp_ep_params_t ep_params = ucp_test::get_ep_params(); ++ ep_params.field_mask |= UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | ++ UCP_EP_PARAM_FIELD_ERR_HANDLER | ++ UCP_EP_PARAM_FIELD_USER_DATA; ++ /* The error handling requirement is needed since we need to take ++ * care of a case where the client gets an error. In case ucp needs to ++ * handle a large worker address but neither ud nor ud_x are present */ ++ ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; ++ ep_params.err_handler.cb = err_handler_cb; ++ ep_params.err_handler.arg = NULL; ++ ep_params.user_data = reinterpret_cast(this); ++ return ep_params; ++ } ++ ++ void client_ep_connect(struct sockaddr *connect_addr) ++ { ++ ucp_ep_params_t ep_params = get_ep_params(); ++ ep_params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS | ++ UCP_EP_PARAM_FIELD_SOCK_ADDR; ++ ep_params.flags = UCP_EP_PARAMS_FLAGS_CLIENT_SERVER; ++ ep_params.sockaddr.addr = connect_addr; ++ ep_params.sockaddr.addrlen = sizeof(*connect_addr); ++ sender().connect(&receiver(), ep_params); ++ } ++ ++ void connect_and_send_recv(struct sockaddr *connect_addr, bool wakeup) ++ { ++ { ++ scoped_log_handler slh(detect_error_logger); ++ client_ep_connect(connect_addr); ++ if (!wait_for_server_ep(wakeup)) { ++ UCS_TEST_SKIP_R("cannot connect to server"); ++ } ++ } ++ ++ send_recv(sender(), receiver(), ++ (GetParam().variant == CONN_REQ_STREAM) ? SEND_RECV_STREAM : ++ SEND_RECV_TAG, wakeup, cb_type()); ++ } ++ ++ void connect_and_reject(struct sockaddr *connect_addr, bool wakeup) ++ { ++ { ++ scoped_log_handler slh(detect_error_logger); ++ client_ep_connect(connect_addr); ++ /* Check reachability with tagged send */ ++ send_recv(sender(), receiver(), SEND_RECV_TAG, wakeup, ++ ucp_test_base::entity::LISTEN_CB_REJECT); ++ } ++ wait_for_reject(receiver(), wakeup); ++ wait_for_reject(sender(), wakeup); ++ } ++ ++ void listen_and_communicate(ucp_test_base::entity::listen_cb_type_t cb_type, ++ bool wakeup) ++ { ++ struct sockaddr_in connect_addr; ++ get_listen_addr(&connect_addr); ++ ++ UCS_TEST_MESSAGE << "Testing " ++ << ucs::sockaddr_to_str( ++ (const struct sockaddr*)&connect_addr); ++ ++ start_listener(cb_type, (const struct sockaddr*)&connect_addr); ++ connect_and_send_recv((struct sockaddr*)&connect_addr, wakeup); ++ } ++ ++ void listen_and_reject(ucp_test_base::entity::listen_cb_type_t cb_type, ++ bool wakeup) ++ { ++ struct sockaddr_in connect_addr; ++ get_listen_addr(&connect_addr); ++ ++ UCS_TEST_MESSAGE << "Testing " ++ << ucs::sockaddr_to_str( ++ (const struct sockaddr*)&connect_addr); ++ start_listener(cb_type, (const struct sockaddr*)&connect_addr); ++ connect_and_reject((struct sockaddr*)&connect_addr, wakeup); ++ } ++ ++ + static void err_handler_cb(void *arg, ucp_ep_h ep, ucs_status_t status) { + test_ucp_sockaddr *self = reinterpret_cast(arg); +- self->err_handler_count++; ++ ucp_test::err_handler_cb(static_cast(self), ep, status); ++ ++ if (status == UCS_ERR_REJECTED) { ++ entity *e = self->get_entity_by_ep(ep); ++ if (e != NULL) { ++ e->inc_rejected_cntr(); ++ return; ++ } ++ } ++ ++ /* The current expected errors are only from the err_handle test ++ * and from transports where the worker address is too long but ud/ud_x ++ * are not present, or ud/ud_x are present but their addresses are too ++ * long as well */ ++ if (status != UCS_ERR_UNREACHABLE) { ++ UCS_TEST_ABORT("Error: " << ucs_status_string(status)); ++ } + } + + protected: +- volatile int err_handler_count; ++ ucp_test_base::entity::listen_cb_type_t cb_type() const { ++ if ((GetParam().variant == CONN_REQ_TAG) || ++ (GetParam().variant == CONN_REQ_STREAM)) { ++ return ucp_test_base::entity::LISTEN_CB_CONN; ++ } ++ return ucp_test_base::entity::LISTEN_CB_EP; ++ } + }; + + UCS_TEST_P(test_ucp_sockaddr, listen) { ++ listen_and_communicate(cb_type(), false); ++} + +- struct sockaddr_in listen_addr; +- get_listen_addr(&listen_addr); ++UCS_TEST_P(test_ucp_sockaddr, listen_inaddr_any) { + +- ucs_status_t status = receiver().listen((const struct sockaddr*)&listen_addr, +- sizeof(listen_addr)); +- if (status == UCS_ERR_INVALID_ADDR) { +- UCS_TEST_SKIP_R("cannot listen to " + ucs::sockaddr_to_str(&listen_addr)); +- } ++ struct sockaddr_in connect_addr, inaddr_any_listen_addr; ++ get_listen_addr(&connect_addr); ++ inaddr_any_addr(&inaddr_any_listen_addr, connect_addr.sin_port); + +- ucp_ep_params_t ep_params = ucp_test::get_ep_params(); +- ep_params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS | +- UCP_EP_PARAM_FIELD_SOCK_ADDR | +- UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; +- ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; +- ep_params.flags = UCP_EP_PARAMS_FLAGS_CLIENT_SERVER; +- ep_params.sockaddr.addr = (struct sockaddr*)&listen_addr; +- ep_params.sockaddr.addrlen = sizeof(listen_addr); +- sender().connect(&receiver(), ep_params); ++ UCS_TEST_MESSAGE << "Testing " ++ << ucs::sockaddr_to_str( ++ (const struct sockaddr*)&inaddr_any_listen_addr); + +- tag_send(sender(), receiver()); ++ start_listener(cb_type(), (const struct sockaddr*)&inaddr_any_listen_addr); ++ connect_and_send_recv((struct sockaddr*)&connect_addr, false); ++} + +- /* wait for reverse ep to appear */ +- while (receiver().get_num_eps() == 0) { +- progress(); ++UCS_TEST_P(test_ucp_sockaddr, reject) { ++ if (GetParam().variant > 0) { ++ UCS_TEST_SKIP_R("Not parameterized test"); + } +- tag_send(receiver(), sender()); ++ ++ listen_and_reject(ucp_test_base::entity::LISTEN_CB_REJECT, false); + } + + UCS_TEST_P(test_ucp_sockaddr, err_handle) { + + struct sockaddr_in listen_addr; +- err_handler_count = 0; + + get_listen_addr(&listen_addr); + +- ucs_status_t status = receiver().listen((const struct sockaddr*)&listen_addr, ++ ucs_status_t status = receiver().listen(cb_type(), ++ (const struct sockaddr*)&listen_addr, + sizeof(listen_addr)); +- if (status == UCS_ERR_INVALID_ADDR) { ++ if (status == UCS_ERR_UNREACHABLE) { + UCS_TEST_SKIP_R("cannot listen to " + ucs::sockaddr_to_str(&listen_addr)); + } + + /* make the client try to connect to a non-existing port on the server side */ + listen_addr.sin_port = 1; + +- ucp_ep_params_t ep_params = ucp_test::get_ep_params(); +- ep_params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS | +- UCP_EP_PARAM_FIELD_SOCK_ADDR | +- UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | +- UCP_EP_PARAM_FIELD_ERR_HANDLER | +- UCP_EP_PARAM_FIELD_USER_DATA; +- ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; +- ep_params.err_handler.cb = err_handler_cb; +- ep_params.err_handler.arg = NULL; +- ep_params.user_data = reinterpret_cast(this); +- ep_params.flags = UCP_EP_PARAMS_FLAGS_CLIENT_SERVER; +- ep_params.sockaddr.addr = (struct sockaddr*)&listen_addr; +- ep_params.sockaddr.addrlen = sizeof(listen_addr); +- wrap_errors(); +- sender().connect(&receiver(), ep_params); +- /* allow for the unreachable event to arrive before restoring errors */ +- wait_for_flag(&err_handler_count); +- restore_errors(); +- +- EXPECT_EQ(1, err_handler_count); ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ client_ep_connect((struct sockaddr*)&listen_addr); ++ /* allow for the unreachable event to arrive before restoring errors */ ++ wait_for_flag(&m_err_handler_count); ++ } ++ ++ EXPECT_EQ(1, m_err_handler_count); ++} ++ ++UCP_INSTANTIATE_ALL_TEST_CASE(test_ucp_sockaddr) ++ ++ ++class test_ucp_sockaddr_with_wakeup : public test_ucp_sockaddr { ++public: ++ ++ static ucp_params_t get_ctx_params() { ++ ucp_params_t params = test_ucp_sockaddr::get_ctx_params(); ++ params.features |= UCP_FEATURE_WAKEUP; ++ return params; ++ } ++}; ++ ++UCS_TEST_P(test_ucp_sockaddr_with_wakeup, wakeup) { ++ listen_and_communicate(cb_type(), true); ++} ++ ++UCS_TEST_P(test_ucp_sockaddr_with_wakeup, reject) { ++ if (GetParam().variant > 0) { ++ UCS_TEST_SKIP_R("Invalid test parameter"); ++ } ++ ++ listen_and_reject(ucp_test_base::entity::LISTEN_CB_REJECT, true); ++} ++ ++UCP_INSTANTIATE_ALL_TEST_CASE(test_ucp_sockaddr_with_wakeup) ++ ++ ++class test_ucp_sockaddr_with_rma_atomic : public test_ucp_sockaddr { ++public: ++ ++ static ucp_params_t get_ctx_params() { ++ ucp_params_t params = test_ucp_sockaddr::get_ctx_params(); ++ params.field_mask |= UCP_PARAM_FIELD_FEATURES; ++ params.features |= UCP_FEATURE_RMA | ++ UCP_FEATURE_AMO32 | ++ UCP_FEATURE_AMO64; ++ return params; ++ } ++}; ++ ++UCS_TEST_P(test_ucp_sockaddr_with_rma_atomic, wireup) { ++ ++ /* This test makes sure that the client-server flow works when the required ++ * features are RMA/ATOMIC. With these features, need to make sure that ++ * there is a lane for ucp-wireup (an am_lane should be created and used) */ ++ struct sockaddr_in connect_addr; ++ get_listen_addr(&connect_addr); ++ ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str((const struct sockaddr*)&connect_addr); ++ ++ start_listener(cb_type(), (const struct sockaddr*)&connect_addr); ++ ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ ++ client_ep_connect((struct sockaddr*)&connect_addr); ++ ++ /* allow the err_handler callback to be invoked if needed */ ++ if (!wait_for_server_ep(false)) { ++ EXPECT_EQ(1, m_err_handler_count); ++ UCS_TEST_SKIP_R("cannot connect to server"); ++ } ++ ++ EXPECT_EQ(0, m_err_handler_count); ++ /* even if server EP is created, in case of long address, wireup will be ++ * done later, need to communicate */ ++ send_recv(sender(), receiver(), (GetParam().variant == CONN_REQ_STREAM) ? ++ SEND_RECV_STREAM : SEND_RECV_TAG, false, cb_type()); ++ } + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_sockaddr) ++UCP_INSTANTIATE_ALL_TEST_CASE(test_ucp_sockaddr_with_rma_atomic) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_stream.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_stream.cc +index 377614f..e7c99d2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_stream.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_stream.cc +@@ -9,8 +9,8 @@ + #include + #include + ++#include "ucp_datatype.h" + #include "ucp_test.h" +-#include + + + class test_ucp_stream_base : public ucp_test { +@@ -40,7 +40,7 @@ size_t test_ucp_stream_base::wait_stream_recv(void *request) + status = ucp_stream_recv_request_test(request, &length); + } while (status == UCS_INPROGRESS); + ASSERT_UCS_OK(status); +- ucp_request_release(request); ++ ucp_request_free(request); + + return length; + } +@@ -52,6 +52,67 @@ test_ucp_stream_base::stream_send_nb(const ucp::data_type_desc_t& dt_desc) + dt_desc.dt(), ucp_send_cb, 0); + } + ++class test_ucp_stream_onesided : public test_ucp_stream_base { ++public: ++ ucp_ep_params_t get_ep_params() { ++ ucp_ep_params_t params = test_ucp_stream_base::get_ep_params(); ++ params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS; ++ params.flags |= UCP_EP_PARAMS_FLAGS_NO_LOOPBACK; ++ return params; ++ } ++}; ++ ++UCS_TEST_P(test_ucp_stream_onesided, send_recv_no_ep) { ++ ++ /* connect from sender side only and send */ ++ sender().connect(&receiver(), get_ep_params()); ++ uint64_t send_data = ucs::rand(); ++ ucp::data_type_desc_t dt_desc(ucp_dt_make_contig(sizeof(uint64_t)), ++ &send_data, sizeof(send_data)); ++ void *sreq = stream_send_nb(dt_desc); ++ wait(sreq); ++ ++ /* must not receive data before ep is created on receiver side */ ++ static const size_t max_eps = 10; ++ ucp_stream_poll_ep_t poll_eps[max_eps]; ++ ssize_t count = ucp_stream_worker_poll(receiver().worker(), poll_eps, ++ max_eps, 0); ++ EXPECT_EQ(0l, count) << "ucp_stream_worker_poll returned ep too early"; ++ ++ /* create receiver side ep */ ++ ucp_ep_params_t recv_ep_param = get_ep_params(); ++ recv_ep_param.field_mask |= UCP_EP_PARAM_FIELD_USER_DATA; ++ recv_ep_param.user_data = reinterpret_cast(static_cast(ucs::rand())); ++ receiver().connect(&sender(), recv_ep_param); ++ ++ /* expect ep to be ready */ ++ ucs_time_t deadline = ucs_get_time() + ++ (ucs_time_from_sec(10.0) * ucs::test_time_multiplier()); ++ do { ++ progress(); ++ count = ucp_stream_worker_poll(receiver().worker(), poll_eps, max_eps, 0); ++ } while ((count == 0) && (ucs_get_time() < deadline)); ++ EXPECT_EQ(1l, count); ++ EXPECT_EQ(recv_ep_param.user_data, poll_eps[0].user_data); ++ EXPECT_EQ(receiver().ep(0), poll_eps[0].ep); ++ ++ /* expect data to be received */ ++ uint64_t recv_data = 0; ++ size_t recv_length = 0; ++ void *rreq = ucp_stream_recv_nb(receiver().ep(), &recv_data, 1, ++ ucp_dt_make_contig(sizeof(uint64_t)), ++ ucp_recv_cb, &recv_length, 0); ++ ASSERT_UCS_PTR_OK(rreq); ++ if (rreq != NULL) { ++ recv_length = wait_stream_recv(rreq); ++ } ++ ++ EXPECT_EQ(sizeof(uint64_t), recv_length); ++ EXPECT_EQ(send_data, recv_data); ++} ++ ++UCP_INSTANTIATE_TEST_CASE(test_ucp_stream_onesided) ++ + class test_ucp_stream : public test_ucp_stream_base + { + public: +@@ -66,11 +127,16 @@ public: + + protected: + void do_send_recv_data_test(ucp_datatype_t datatype); +- template ++ template + void do_send_recv_test(ucp_datatype_t datatype); +- template ++ template + void do_send_exp_recv_test(ucp_datatype_t datatype); + void do_send_recv_data_recv_test(ucp_datatype_t datatype); ++ ++ /* for self-validation of generic datatype ++ * NOTE: it's tested only with byte array data since it's recv completion ++ * granularity without UCP_RECV_FLAG_WAITALL flag */ ++ std::vector context; + }; + + void test_ucp_stream::do_send_recv_data_test(ucp_datatype_t datatype) +@@ -82,10 +148,17 @@ void test_ucp_stream::do_send_recv_data_test(ucp_datatype_t datatype) + + /* send all msg sizes*/ + for (size_t i = 3; i < sbuf.size(); i *= 2) { +- ucs::fill_random(sbuf, i); +- check_pattern.insert(check_pattern.end(), sbuf.begin(), +- sbuf.begin() + i); +- sstatus = stream_send_nb(ucp::data_type_desc_t(datatype, sbuf.data(), i)); ++ if (UCP_DT_IS_GENERIC(datatype)) { ++ for (size_t j = 0; j < i; ++j) { ++ check_pattern.push_back(char(j)); ++ } ++ } else { ++ ucs::fill_random(sbuf, i); ++ check_pattern.insert(check_pattern.end(), sbuf.begin(), ++ sbuf.begin() + i); ++ } ++ ucp::data_type_desc_t dt_desc(datatype, sbuf.data(), i); ++ sstatus = stream_send_nb(dt_desc); + EXPECT_FALSE(UCS_PTR_IS_ERR(sstatus)); + wait(sstatus); + ssize += i; +@@ -111,7 +184,7 @@ void test_ucp_stream::do_send_recv_data_test(ucp_datatype_t datatype) + EXPECT_EQ(check_pattern, rbuf); + } + +-template ++template + void test_ucp_stream::do_send_recv_test(ucp_datatype_t datatype) + { + const size_t dt_elem_size = UCP_DT_IS_CONTIG(datatype) ? +@@ -123,20 +196,33 @@ void test_ucp_stream::do_send_recv_test(ucp_datatype_t datatype) + + /* send all msg sizes in bytes*/ + for (size_t i = 3; i < sbuf.size(); i *= 2) { +- ucs::fill_random(sbuf, i); +- check_pattern.insert(check_pattern.end(), sbuf.begin(), sbuf.begin() + i); +- sstatus = stream_send_nb(ucp::data_type_desc_t(DATATYPE, sbuf.data(), i)); ++ ucp_datatype_t dt; ++ if (UCP_DT_IS_GENERIC(datatype)) { ++ dt = datatype; ++ for (size_t j = 0; j < i; ++j) { ++ context.push_back(uint8_t(j)); ++ } ++ } else { ++ dt = DATATYPE; ++ ucs::fill_random(sbuf, i); ++ check_pattern.insert(check_pattern.end(), sbuf.begin(), ++ sbuf.begin() + i); ++ } ++ ucp::data_type_desc_t dt_desc(dt, sbuf.data(), i); ++ sstatus = stream_send_nb(dt_desc); + EXPECT_FALSE(UCS_PTR_IS_ERR(sstatus)); + wait(sstatus); + ssize += i; + } + +- size_t align_tail = dt_elem_size - ssize % dt_elem_size; ++ size_t align_tail = UCP_DT_IS_GENERIC(datatype) ? 0 : ++ (dt_elem_size - ssize % dt_elem_size); + if (align_tail != 0) { + ucs::fill_random(sbuf, align_tail); + check_pattern.insert(check_pattern.end(), sbuf.begin(), sbuf.begin() + align_tail); +- sstatus = stream_send_nb(ucp::data_type_desc_t(ucp_dt_make_contig(align_tail), +- sbuf.data(), align_tail)); ++ ucp::data_type_desc_t dt_desc(ucp_dt_make_contig(align_tail), ++ sbuf.data(), align_tail); ++ sstatus = stream_send_nb(dt_desc); + EXPECT_FALSE(UCS_PTR_IS_ERR(sstatus)); + wait(sstatus); + ssize += align_tail; +@@ -146,6 +232,7 @@ void test_ucp_stream::do_send_recv_test(ucp_datatype_t datatype) + + std::vector rbuf(ssize / dt_elem_size, 'r'); + size_t roffset = 0; ++ size_t counter = 0; + do { + ucp::data_type_desc_t dt_desc(datatype, &rbuf[roffset / dt_elem_size], + ssize - roffset); +@@ -153,22 +240,30 @@ void test_ucp_stream::do_send_recv_test(ucp_datatype_t datatype) + size_t length; + void *rreq = ucp_stream_recv_nb(receiver().ep(), dt_desc.buf(), + dt_desc.count(), dt_desc.dt(), +- ucp_recv_cb, &length, 0); ++ ucp_recv_cb, &length, recv_flags); + ASSERT_TRUE(!UCS_PTR_IS_ERR(rreq)); + if (UCS_PTR_IS_PTR(rreq)) { + length = wait_stream_recv(rreq); + } + EXPECT_EQ(size_t(0), length % dt_elem_size); + roffset += length; ++ counter++; + } while (roffset < ssize); + ++ /* waitall flag requires completion by single request */ ++ if (recv_flags & UCP_STREAM_RECV_FLAG_WAITALL) { ++ EXPECT_EQ(size_t(1), counter); ++ } ++ + EXPECT_EQ(roffset, ssize); +- const T *check_ptr = reinterpret_cast(check_pattern.data()); +- const size_t check_size = check_pattern.size() / dt_elem_size; +- EXPECT_EQ(std::vector(check_ptr, check_ptr + check_size), rbuf); ++ if (!UCP_DT_IS_GENERIC(datatype)) { ++ const T *check_ptr = reinterpret_cast(check_pattern.data()); ++ const size_t check_size = check_pattern.size() / dt_elem_size; ++ EXPECT_EQ(std::vector(check_ptr, check_ptr + check_size), rbuf); ++ } + } + +-template ++template + void test_ucp_stream::do_send_exp_recv_test(ucp_datatype_t datatype) + { + const size_t dt_elem_size = UCP_DT_IS_CONTIG(datatype) ? +@@ -189,7 +284,7 @@ void test_ucp_stream::do_send_exp_recv_test(ucp_datatype_t datatype) + + void *rreq = ucp_stream_recv_nb(receiver().ep(), rdesc.buf(), + rdesc.count(), rdesc.dt(), ucp_recv_cb, +- &length, 0); ++ &length, recv_flags); + EXPECT_TRUE(UCS_PTR_IS_PTR(rreq)); + rreqs.push_back(rreq); + } +@@ -213,6 +308,7 @@ void test_ucp_stream::do_send_exp_recv_test(ucp_datatype_t datatype) + rcount += length; + } + ++ size_t counter = 0; + while (rcount < scount) { + size_t length = std::numeric_limits::max(); + ucs_status_ptr_t rreq; +@@ -226,9 +322,15 @@ void test_ucp_stream::do_send_exp_recv_test(ucp_datatype_t datatype) + ASSERT_LE(length, msg_size); + EXPECT_EQ(size_t(0), length % dt_elem_size); + rcount += length; ++ counter++; + } + EXPECT_EQ(scount, rcount); + ++ /* waitall flag requires completion by single request */ ++ if (recv_flags & UCP_STREAM_RECV_FLAG_WAITALL) { ++ EXPECT_EQ(size_t(0), counter); ++ } ++ + /* double check, no data should be here */ + while (progress()); + +@@ -263,8 +365,8 @@ void test_ucp_stream::do_send_recv_data_recv_test(ucp_datatype_t datatype) + ucs::fill_random(sbuf, send_i); + check_pattern.insert(check_pattern.end(), sbuf.begin(), + sbuf.begin() + send_i); +- sstatus = stream_send_nb(ucp::data_type_desc_t(datatype, sbuf.data(), +- send_i)); ++ ucp::data_type_desc_t dt_desc(datatype, sbuf.data(), send_i); ++ sstatus = stream_send_nb(dt_desc); + EXPECT_FALSE(UCS_PTR_IS_ERR(sstatus)); + wait(sstatus); + ssize += send_i; +@@ -306,44 +408,91 @@ UCS_TEST_P(test_ucp_stream, send_iov_recv_data) { + do_send_recv_data_test(DATATYPE_IOV); + } + ++UCS_TEST_P(test_ucp_stream, send_generic_recv_data) { ++ ucp_datatype_t dt; ++ ucs_status_t status; ++ ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, &dt); ++ ASSERT_UCS_OK(status); ++ do_send_recv_data_test(dt); ++ ucp_dt_destroy(dt); ++} ++ + UCS_TEST_P(test_ucp_stream, send_recv_8) { +- do_send_recv_test(ucp_dt_make_contig(sizeof(uint8_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint8_t)); ++ ++ do_send_recv_test(datatype); ++ do_send_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_recv_16) { +- do_send_recv_test(ucp_dt_make_contig(sizeof(uint16_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint16_t)); ++ ++ do_send_recv_test(datatype); ++ do_send_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_recv_32) { +- do_send_recv_test(ucp_dt_make_contig(sizeof(uint32_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint32_t)); ++ ++ do_send_recv_test(datatype); ++ do_send_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_recv_64) { +- do_send_recv_test(ucp_dt_make_contig(sizeof(uint64_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint64_t)); ++ ++ do_send_recv_test(datatype); ++ do_send_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_recv_iov) { +- do_send_recv_test(DATATYPE_IOV); ++ do_send_recv_test(DATATYPE_IOV); ++ do_send_recv_test(DATATYPE_IOV); ++} ++ ++UCS_TEST_P(test_ucp_stream, send_recv_generic) { ++ ucp_datatype_t dt; ++ ucs_status_t status; ++ ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, &context, &dt); ++ ASSERT_UCS_OK(status); ++ do_send_recv_test(dt); ++ ucp_dt_destroy(dt); ++ + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_8) { +- do_send_exp_recv_test(ucp_dt_make_contig(sizeof(uint8_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint8_t)); ++ ++ do_send_exp_recv_test(datatype); ++ do_send_exp_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_16) { +- do_send_exp_recv_test(ucp_dt_make_contig(sizeof(uint16_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint16_t)); ++ ++ do_send_exp_recv_test(datatype); ++ do_send_exp_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_32) { +- do_send_exp_recv_test(ucp_dt_make_contig(sizeof(uint32_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint32_t)); ++ ++ do_send_exp_recv_test(datatype); ++ do_send_exp_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_64) { +- do_send_exp_recv_test(ucp_dt_make_contig(sizeof(uint64_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint64_t)); ++ ++ do_send_exp_recv_test(datatype); ++ do_send_exp_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_iov) { +- do_send_exp_recv_test(DATATYPE_IOV); ++ do_send_exp_recv_test(DATATYPE_IOV); ++ do_send_exp_recv_test(DATATYPE_IOV); + } + + UCS_TEST_P(test_ucp_stream, send_recv_data_recv_8) { +@@ -366,6 +515,52 @@ UCS_TEST_P(test_ucp_stream, send_recv_data_recv_iov) { + do_send_recv_data_recv_test(DATATYPE_IOV); + } + ++UCS_TEST_P(test_ucp_stream, send_zero_ending_iov_recv_data) { ++ const size_t min_size = 1024; ++ const size_t max_size = min_size * 64; ++ const size_t iov_num = 8; /* must be divisible by 4 without a ++ * remainder, caught on mlx5 based TLs ++ * where max_iov = 3 for zcopy multi ++ * protocol, where every posting includes: ++ * 1 header + 2 nonempty IOVs */ ++ const size_t iov_num_nonempty = iov_num / 2; ++ ++ std::vector buf(max_size * 2); ++ ucs::fill_random(buf, buf.size()); ++ std::vector v(iov_num); ++ ++ for (size_t size = min_size; size < max_size; ++size) { ++ size_t slen = 0; ++ for (size_t j = 0; j < iov_num; ++j) { ++ if ((j % 2) == 0) { ++ uint8_t *ptr = buf.data(); ++ v[j].buffer = &(ptr[j * size / iov_num_nonempty]); ++ v[j].length = size / iov_num_nonempty; ++ slen += v[j].length; ++ } else { ++ v[j].buffer = NULL; ++ v[j].length = 0; ++ } ++ } ++ ++ void *sreq = ucp_stream_send_nb(sender().ep(), &v[0], iov_num, ++ DATATYPE_IOV, ucp_send_cb, 0); ++ ++ size_t rlen = 0; ++ while (rlen < slen) { ++ progress(); ++ size_t length; ++ void *rdata = ucp_stream_recv_data_nb(receiver().ep(), &length); ++ EXPECT_FALSE(UCS_PTR_IS_ERR(rdata)); ++ if (rdata != NULL) { ++ rlen += length; ++ ucp_stream_data_release(receiver().ep(), rdata); ++ } ++ } ++ wait(sreq); ++ } ++} ++ + UCP_INSTANTIATE_TEST_CASE(test_ucp_stream) + + class test_ucp_stream_many2one : public test_ucp_stream_base { +@@ -403,7 +598,7 @@ protected: + size_t send_all(ucp_datatype_t datatype, size_t n_iter); + void check_no_data(); + std::set check_no_data(entity &e); +- void check_recv_data(size_t n_iter); ++ void check_recv_data(size_t n_iter, ucp_datatype_t dt); + + std::vector m_msgs; + std::vector > m_recv_data; +@@ -476,7 +671,7 @@ void test_ucp_stream_many2one::do_send_worker_poll_test(ucp_datatype_t dt) + } while (!sreqs.empty() || (total_len != 0)); + + check_no_data(); +- check_recv_data(niter); ++ check_recv_data(niter, dt); + } + + void test_ucp_stream_many2one::do_send_recv_test(ucp_datatype_t dt) +@@ -495,7 +690,7 @@ void test_ucp_stream_many2one::do_send_recv_test(ucp_datatype_t dt) + m_recv_data[i].resize(m_msgs[i].length() * niter + 1); + ucp::data_type_desc_t &rdesc = dt_rdescs[i].make(dt, + &m_recv_data[i][roffsets[i]], +- m_recv_data[i].size()); ++ m_recv_data[i].size()); + size_t length; + void *rreq = ucp_stream_recv_nb(e(m_receiver_idx).ep(0, i), + rdesc.buf(), rdesc.count(), rdesc.dt(), +@@ -514,35 +709,44 @@ void test_ucp_stream_many2one::do_send_recv_test(ucp_datatype_t dt) + roffsets[rreqs[i].first] += wait_stream_recv(rreqs[i].second.m_req); + } + rreqs.clear(); ++ progress(); + +- do { +- const size_t max_eps = 10; +- ucp_stream_poll_ep_t poll_eps[max_eps]; +- progress(); +- count = ucp_stream_worker_poll(e(m_receiver_idx).worker(), +- poll_eps, max_eps, 0); +- EXPECT_LE(0, count); ++ const size_t max_eps = 10; ++ ucp_stream_poll_ep_t poll_eps[max_eps]; ++ count = ucp_stream_worker_poll(e(m_receiver_idx).worker(), ++ poll_eps, max_eps, 0); ++ EXPECT_LE(0, count); ++ EXPECT_LE(size_t(count), m_nsenders); + +- for (ssize_t i = 0; i < count; ++i) { ++ for (ssize_t i = 0; i < count; ++i) { ++ bool again = true; ++ while (again) { + size_t sender_idx = uintptr_t(poll_eps[i].user_data); + size_t &roffset = roffsets[sender_idx]; + ucp::data_type_desc_t &dt_desc = + dt_rdescs[sender_idx].forward_to(roffset); + EXPECT_TRUE(dt_desc.is_valid()); + size_t length; +- void *rreq = ucp_stream_recv_nb(poll_eps[i].ep, dt_desc.buf(), +- dt_desc.count(), dt_desc.dt(), ++ void *rreq = ucp_stream_recv_nb(poll_eps[i].ep, ++ dt_desc.buf(), ++ dt_desc.count(), ++ dt_desc.dt(), + ucp_recv_cb, &length, 0); +- if (UCS_PTR_STATUS(rreq) == UCS_OK) { ++ EXPECT_FALSE(UCS_PTR_IS_ERR(rreq)); ++ if (rreq == NULL) { ++ EXPECT_LT(size_t(0), length); + roffset += length; ++ if (ssize_t(length) < dt_desc.buf_length()) { ++ continue; /* Need to drain the EP */ ++ } + } else { + rreqs.push_back(std::make_pair(sender_idx, + request_wrapper_t(rreq, + &dt_desc))); + } +- EXPECT_FALSE(UCS_PTR_IS_ERR(rreq)); ++ again = false; + } +- } while (count > 0); ++ } + + erase_completed_reqs(sreqs); + } while (!rreqs.empty() || !sreqs.empty() || +@@ -552,7 +756,7 @@ void test_ucp_stream_many2one::do_send_recv_test(ucp_datatype_t dt) + EXPECT_EQ(total_sdata, std::accumulate(roffsets.begin(), + roffsets.end(), 0ul)); + check_no_data(); +- check_recv_data(niter); ++ check_recv_data(niter, dt); + } + + ucs_status_ptr_t +@@ -653,16 +857,25 @@ std::set test_ucp_stream_many2one::check_no_data(entity &e) + return ret; + } + +-void test_ucp_stream_many2one::check_recv_data(size_t n_iter) ++void test_ucp_stream_many2one::check_recv_data(size_t n_iter, ucp_datatype_t dt) + { + for (size_t i = 0; i < m_nsenders; ++i) { +- const std::string test = std::string("sender_") + ucs::to_string(i); ++ std::string test = std::string("sender_") + ucs::to_string(i); + const std::string str(&m_recv_data[i].front()); ++ if (UCP_DT_IS_GENERIC(dt)) { ++ std::vector test_gen; ++ for (size_t j = 0; j < test.length(); ++j) { ++ test_gen.push_back(char(j)); ++ } ++ test_gen.push_back('\0'); ++ test = std::string(test_gen.data()); ++ } ++ + size_t next = 0; + for (size_t j = 0; j < n_iter; ++j) { + size_t match = str.find(test, next); +- EXPECT_NE(std::string::npos, match) << "failed on " << j +- << " iteration"; ++ EXPECT_NE(std::string::npos, match) << "failed on sender " << i ++ << " iteration " << j; + if (match == std::string::npos) { + break; + } +@@ -682,7 +895,7 @@ test_ucp_stream_many2one::erase_completed_reqs(std::vector &r + ucs_status_t status = ucp_request_check_status(i->m_req); + if (status != UCS_INPROGRESS) { + EXPECT_EQ(UCS_OK, status); +- ucp_request_release(i->m_req); ++ ucp_request_free(i->m_req); + delete i->m_dt_desc; + i = reqs.erase(i); + } else { +@@ -707,9 +920,23 @@ UCS_TEST_P(test_ucp_stream_many2one, drop_data) { + m_entities.at(0).revoke_ep(); + m_entities.at(m_receiver_idx).revoke_ep(0, 0); + ++ /* wait for 1-st byte on the last EP to be sure the network packets have ++ been arrived */ ++ uint8_t check; ++ size_t check_length; ++ ucp_ep_h last_ep = m_entities.at(m_receiver_idx).ep(0, m_nsenders - 1); ++ void *check_req = ucp_stream_recv_nb(last_ep, &check, 1, DATATYPE, ++ ucp_recv_cb, &check_length, 0); ++ EXPECT_FALSE(UCS_PTR_IS_ERR(check_req)); ++ if (UCS_PTR_IS_PTR(check_req)) { ++ wait_stream_recv(check_req); ++ } ++ + /* data from disconnected EP should be dropped */ + std::set others = check_no_data(m_entities.at(0)); +- EXPECT_EQ(m_nsenders - 1, others.size()); ++ /* since ordering between EPs is not guaranteed, some data may be still in ++ * the network or buffered by transport */ ++ EXPECT_LE(others.size(), m_nsenders - 1); + + /* reconnect */ + m_entities.at(0).connect(&m_entities.at(m_receiver_idx), get_ep_params(), 0); +@@ -737,6 +964,16 @@ UCS_TEST_P(test_ucp_stream_many2one, send_worker_poll_iov) { + do_send_worker_poll_test(DATATYPE_IOV); + } + ++UCS_TEST_P(test_ucp_stream_many2one, send_worker_poll_generic) { ++ ucp_datatype_t dt; ++ ucs_status_t status; ++ ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, &dt); ++ ASSERT_UCS_OK(status); ++ do_send_worker_poll_test(dt); ++ ucp_dt_destroy(dt); ++} ++ + UCS_TEST_P(test_ucp_stream_many2one, send_recv_nb) { + do_send_recv_test(DATATYPE); + } +@@ -745,4 +982,14 @@ UCS_TEST_P(test_ucp_stream_many2one, send_recv_nb_iov) { + do_send_recv_test(DATATYPE_IOV); + } + ++UCS_TEST_P(test_ucp_stream_many2one, send_recv_nb_generic) { ++ ucp_datatype_t dt; ++ ucs_status_t status; ++ ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, &dt); ++ ASSERT_UCS_OK(status); ++ do_send_recv_test(dt); ++ ucp_dt_destroy(dt); ++} ++ + UCP_INSTANTIATE_TEST_CASE(test_ucp_stream_many2one) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.cc +index ec39189..732e141 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.cc +@@ -7,9 +7,12 @@ + + #include "test_ucp_tag.h" + +-#include ++#include "ucp_datatype.h" ++ + extern "C" { + #include ++#include ++#include + } + + +@@ -34,8 +37,8 @@ void test_ucp_tag::init() + ctx_attr.field_mask |= UCP_ATTR_FIELD_THREAD_MODE; + ucp_context_query(receiver().ucph(), &ctx_attr); + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + } + + void test_ucp_tag::request_init(void *request) +@@ -145,6 +148,16 @@ void test_ucp_tag::wait_for_unexpected_msg(ucp_worker_h worker, double sec) + } while (ucp_tag_unexp_is_empty(&worker->tm) && (ucs_get_time() < timeout)); + } + ++void test_ucp_tag::check_offload_support(bool offload_required) ++{ ++ bool offload_supported = ucp_ep_is_tag_offload_enabled(ucp_ep_config(sender().ep())); ++ if (offload_supported != offload_required) { ++ cleanup(); ++ std::string reason = offload_supported ? "tag offload" : "no tag offload"; ++ UCS_TEST_SKIP_R(reason); ++ } ++} ++ + int test_ucp_tag::get_worker_index(int buf_index) + { + int worker_index = 0; +@@ -306,131 +319,9 @@ ucs_status_t test_ucp_tag::recv_req_b(void *buffer, size_t count, ucp_datatype_t + return status; + } + +-void* test_ucp_tag::dt_common_start(size_t count) +-{ +- dt_gen_state *dt_state = new dt_gen_state; +- dt_state->count = count; +- dt_state->started = 1; +- dt_state->magic = MAGIC; +- dt_gen_start_count++; +- return dt_state; +-} +- +-void* test_ucp_tag::dt_common_start_pack(void *context, const void *buffer, size_t count) +-{ +- return dt_common_start(count); +-} +- +-void* test_ucp_tag::dt_common_start_unpack(void *context, void *buffer, size_t count) +-{ +- return dt_common_start(count); +-} +- +-template +-size_t test_ucp_tag::dt_packed_size(void *state) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- return dt_state->count * sizeof(T); +-} +- +-template +-size_t test_ucp_tag::dt_pack(void *state, size_t offset, void *dest, size_t max_length) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- T *p = reinterpret_cast (dest); +- uint32_t count; +- +- EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); +- EXPECT_EQ(1, dt_state->started); +- EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); +- +- ucs_assert((offset % sizeof(T)) == 0); +- +- count = ucs_min(max_length / sizeof(T), +- dt_state->count - (offset / sizeof(T))); +- for (unsigned i = 0; i < count; ++i) { +- p[i] = (offset / sizeof(T)) + i; +- } +- return count * sizeof(T); +-} +- +-template +-ucs_status_t test_ucp_tag::dt_unpack(void *state, size_t offset, const void *src, +- size_t length) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- uint32_t count; +- +- EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); +- EXPECT_EQ(1, dt_state->started); +- EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); +- +- count = length / sizeof(T); +- for (unsigned i = 0; i < count; ++i) { +- T expected = (offset / sizeof(T)) + i; +- T actual = ((T*)src)[i]; +- if (actual != expected) { +- UCS_TEST_ABORT("Invalid data at index " << i << ". expected: " << +- expected << " actual: " << actual << " offset: " << +- offset << "."); +- } +- } +- return UCS_OK; +-} +- +-ucs_status_t test_ucp_tag::dt_err_unpack(void *state, size_t offset, const void *src, +- size_t length) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- +- EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); +- EXPECT_EQ(1, dt_state->started); +- EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); +- +- return UCS_ERR_NO_MEMORY; +-} +- +-void test_ucp_tag::dt_common_finish(void *state) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- --dt_state->started; +- EXPECT_EQ(0, dt_state->started); +- dt_gen_finish_count++; +- delete dt_state; +-} +- + bool test_ucp_tag::is_external_request() + { + return false; + } + +-ucp_generic_dt_ops test_ucp_tag::test_dt_uint32_ops = { +- test_ucp_tag::dt_common_start_pack, +- test_ucp_tag::dt_common_start_unpack, +- test_ucp_tag::dt_packed_size, +- test_ucp_tag::dt_pack, +- test_ucp_tag::dt_unpack, +- test_ucp_tag::dt_common_finish +-}; +- +-ucp_generic_dt_ops test_ucp_tag::test_dt_uint8_ops = { +- test_ucp_tag::dt_common_start_pack, +- test_ucp_tag::dt_common_start_unpack, +- test_ucp_tag::dt_packed_size, +- test_ucp_tag::dt_pack, +- test_ucp_tag::dt_unpack, +- test_ucp_tag::dt_common_finish +-}; +- +-ucp_generic_dt_ops test_ucp_tag::test_dt_uint32_err_ops = { +- test_ucp_tag::dt_common_start_pack, +- test_ucp_tag::dt_common_start_unpack, +- test_ucp_tag::dt_packed_size, +- test_ucp_tag::dt_pack, +- test_ucp_tag::dt_err_unpack, +- test_ucp_tag::dt_common_finish +-}; +- +-int test_ucp_tag::dt_gen_start_count = 0; +-int test_ucp_tag::dt_gen_finish_count = 0; + ucp_context_attr_t test_ucp_tag::ctx_attr; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.h +index db2ea2a..e7331d8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.h +@@ -30,12 +30,6 @@ protected: + ucp_tag_recv_info_t info; + }; + +- struct dt_gen_state { +- size_t count; +- int started; +- uint32_t magic; +- }; +- + virtual void init(); + + static void request_init(void *request); +@@ -90,35 +84,10 @@ protected: + + void wait_for_unexpected_msg(ucp_worker_h worker, double sec); + +- static void* dt_common_start(size_t count); +- +- static void* dt_common_start_pack(void *context, const void *buffer, size_t count); +- +- static void* dt_common_start_unpack(void *context, void *buffer, size_t count); +- +- template +- static size_t dt_packed_size(void *state); +- +- template +- static size_t dt_pack(void *state, size_t offset, void *dest, size_t max_length); +- +- template +- static ucs_status_t dt_unpack(void *state, size_t offset, const void *src, +- size_t length); +- +- static ucs_status_t dt_err_unpack(void *state, size_t offset, const void *src, +- size_t length); +- +- static void dt_common_finish(void *state); ++ void check_offload_support(bool offload_required); + + virtual bool is_external_request(); + +- static const uint32_t MAGIC = 0xd7d7d7d7U; +- static ucp_generic_dt_ops test_dt_uint32_ops; +- static ucp_generic_dt_ops test_dt_uint32_err_ops; +- static ucp_generic_dt_ops test_dt_uint8_ops; +- static int dt_gen_start_count; +- static int dt_gen_finish_count; + static ucp_context_attr_t ctx_attr; + private: + int get_worker_index(int buf_index); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_match.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_match.cc +index d4279ef..9d0919c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_match.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_match.cc +@@ -17,7 +17,11 @@ public: + virtual void init() + { + m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_ENABLE", "y")); ++ if (RUNNING_ON_VALGRIND) { ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_MAX_BCOPY", "8k")); ++ } + modify_config("TM_THRESH", "1"); ++ + test_ucp_tag::init(); + ucp_test_param param = GetParam(); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_offload.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_offload.cc +index a30b936..7ea54dd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_offload.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_offload.cc +@@ -6,10 +6,9 @@ + + #include "test_ucp_tag.h" + +-#include ++#include "ucp_datatype.h" + + extern "C" { +-#include + #include + #include + } +@@ -20,12 +19,8 @@ public: + void init() + { + m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_ENABLE", "y")); +- + test_ucp_tag::init(); +- if (!(sender().ep()->flags & UCP_EP_FLAG_TAG_OFFLOAD_ENABLED)) { +- test_ucp_tag::cleanup(); +- UCS_TEST_SKIP_R("no tag offload"); +- } ++ check_offload_support(true); + } + + request* recv_nb_and_check(void *buffer, size_t count, ucp_datatype_t dt, +@@ -37,30 +32,31 @@ public: + return req; + } + +- void send_b_from(entity &se, const void *buffer, size_t count, +- ucp_datatype_t datatype, ucp_tag_t tag) ++ void send_recv(entity &se, ucp_tag_t tag, size_t length) + { ++ std::vector sendbuf(length); ++ std::vector recvbuf(length); + +- request *req = (request*)ucp_tag_send_nb(se.ep(), buffer, count, +- datatype, tag, send_callback); +- if (UCS_PTR_IS_ERR(req)) { +- ASSERT_UCS_OK(UCS_PTR_STATUS(req)); +- } else if (req != NULL) { +- wait(req); +- request_free(req); ++ request *rreq = recv_nb_and_check(&recvbuf[0], length, DATATYPE, tag, ++ UCP_TAG_MASK_FULL); ++ request *sreq = (request*)ucp_tag_send_nb(se.ep(), &sendbuf[0], length, ++ DATATYPE, tag, send_callback); ++ if (UCS_PTR_IS_ERR(sreq)) { ++ ASSERT_UCS_OK(UCS_PTR_STATUS(sreq)); ++ } else if (sreq != NULL) { ++ wait(sreq); ++ request_free(sreq); + } ++ ++ wait(rreq); ++ request_free(rreq); + } + + void activate_offload(entity &se, ucp_tag_t tag = 0x11) + { + uint64_t small_val = 0xFAFA; + +- request *req = recv_nb_and_check(&small_val, sizeof(small_val), +- DATATYPE, tag, UCP_TAG_MASK_FULL); +- +- send_b_from(se, &small_val, sizeof(small_val), DATATYPE, tag); +- wait(req); +- request_free(req); ++ send_recv(se, tag, sizeof(small_val)); + } + + void req_cancel(entity &e, request *req) +@@ -293,18 +289,19 @@ public: + + // TODO: add more tls which support tag offloading + std::vector tls; +- tls.push_back("rc"); ++ tls.push_back("dc_x"); + tls.push_back("dc"); + tls.push_back("rc_x"); +- tls.push_back("dc_x"); + ucp_test_param params = GetParam(); + ++ // Create new entity and add to to the end of vector ++ // (thus it will be receiver without any connections) ++ create_entity(false); + for (std::vector::const_iterator i = tls.begin(); + i != tls.end(); ++i) { + params.transports.clear(); + params.transports.push_back(*i); + create_entity(true, params); +- e(0).connect(&receiver(), get_ep_params()); + } + } + +@@ -320,6 +317,15 @@ public: + return (i << 48) | t; + } + ++ void activate_offload_hashing(entity &se, ucp_tag_t tag) ++ { ++ se.connect(&receiver(), get_ep_params()); ++ // Need to send twice, since the first message may not enable hashing ++ // (num_active_iface on worker is increased after unexpected offload handler) ++ send_recv(se, tag, 2048); ++ send_recv(se, tag, 2048); ++ } ++ + void post_recv_and_check(entity &e, unsigned sw_count, ucp_tag_t tag, + ucp_tag_t tag_mask) + { +@@ -342,19 +348,20 @@ UCS_TEST_P(test_ucp_tag_offload_multi, recv_from_multi) + ucp_tag_t tag = 0x11; + + // Activate first offload iface. Tag hashing is not done yet, since we +- // have only one iface so far. +- activate_offload(e(0), make_tag(e(0), tag)); ++ // have only one active iface so far. ++ activate_offload_hashing(e(0), make_tag(e(0), tag)); + EXPECT_EQ(0u, kh_size(&receiver().worker()->tm.offload.tag_hash)); + + // Activate second offload iface. The tag has been added to the hash. + // From now requests will be offloaded only for those tags which are + // in the hash. +- activate_offload(e(1), make_tag(e(1), tag)); ++ activate_offload_hashing(e(1), make_tag(e(1), tag)); + EXPECT_EQ(1u, kh_size(&receiver().worker()->tm.offload.tag_hash)); + + // Need to send a message on the first iface again, for its 'tag_sender' + // part of the tag to be added to the hash. +- activate_offload(e(0), make_tag(e(0), tag)); ++ send_recv(e(0), make_tag(e(0), tag), 2048); ++ EXPECT_EQ(2u, kh_size(&receiver().worker()->tm.offload.tag_hash)); + + // Now requests from first two senders should be always offloaded regardless + // of the tag value. Tag does not matter, because hashing is done with +@@ -367,11 +374,15 @@ UCS_TEST_P(test_ucp_tag_offload_multi, recv_from_multi) + // sender and its 'tag_sender_mask' is not added to the hash yet. + post_recv_and_check(e(2), 1u, tag, UCP_TAG_MASK_FULL); + +- activate_offload(e(2), make_tag(e(2), tag)); ++ activate_offload_hashing(e(2), make_tag(e(2), tag)); ++ EXPECT_EQ(3u, kh_size(&receiver().worker()->tm.offload.tag_hash)); ++ + // Check that this sender was added as well + post_recv_and_check(e(2), 0u, tag + 1, UCP_TAG_MASK_FULL); + } + ++// Do not include SM transports, because they would be selected for tag matching. ++// And since they do not support TM offload, this test would be skipped. + UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_tag_offload_multi, all_rcdc, + "\\rc,\\dc,\\ud,rc_x,dc_x") + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_perf.cc +index 8701be5..60fcf6e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_perf.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_perf.cc +@@ -6,8 +6,6 @@ + + #include "test_ucp_tag.h" + +-#include +- + + class test_ucp_tag_perf : public test_ucp_tag { + public: +@@ -36,7 +34,7 @@ double test_ucp_tag_perf::check_perf(size_t count, bool is_exp) + + for (size_t i = 0; i < count; ++i) { + request *rreq = recv_nb(NULL, 0, DATATYPE, i, TAG_MASK); +- ucs_assert(!UCS_PTR_IS_ERR(rreq)); ++ assert(!UCS_PTR_IS_ERR(rreq)); + EXPECT_FALSE(rreq->completed); + rreqs.push_back(rreq); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_xfer.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_xfer.cc +index e5a5249..068da45 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_xfer.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_xfer.cc +@@ -7,12 +7,13 @@ + + #include "test_ucp_tag.h" + ++#include "ucp_datatype.h" ++ + extern "C" { + #include + #include + } + +-#include + #include + + +@@ -32,6 +33,12 @@ public: + } else if (GetParam().variant == VARIANT_RNDV_AUTO) { + modify_config("RNDV_SCHEME", "auto"); + } ++ modify_config("MAX_EAGER_LANES", "2"); ++ modify_config("MAX_RNDV_LANES", "2"); ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_ENABLE", "y")); ++ if (RUNNING_ON_VALGRIND) { ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_MAX_BCOPY", "8k")); ++ } + test_ucp_tag::init(); + } + +@@ -87,6 +94,10 @@ protected: + typedef void (test_ucp_tag_xfer::* xfer_func_t)(size_t size, bool expected, + bool sync, bool truncated); + ++ size_t do_xfer(const void *sendbuf, void *recvbuf, size_t count, ++ ucp_datatype_t send_dt, ucp_datatype_t recv_dt, ++ bool expected, bool sync, bool truncated); ++ + void test_xfer(xfer_func_t func, bool expected, bool sync, bool truncated); + void test_run_xfer(bool send_contig, bool recv_contig, + bool expected, bool sync, bool truncated); +@@ -97,16 +108,15 @@ protected: + void test_xfer_probe(bool send_contig, bool recv_contig, + bool expected, bool sync); + +-private: +- size_t do_xfer(const void *sendbuf, void *recvbuf, size_t count, +- ucp_datatype_t send_dt, ucp_datatype_t recv_dt, +- bool expected, bool sync, bool truncated); ++ void test_xfer_len_offset(); + ++private: + request* do_send(const void *sendbuf, size_t count, ucp_datatype_t dt, bool sync); + + static const uint64_t SENDER_TAG = 0x111337; + static const uint64_t RECV_MASK = 0xffff; + static const uint64_t RECV_TAG = 0x1337; ++ ucs::ptr_vector m_env; + + }; + +@@ -179,7 +189,7 @@ void test_ucp_tag_xfer::test_xfer_prepare_bufs(uint8_t *sendbuf, uint8_t *recvbu + *send_dt = DATATYPE; + } else { + /* the sender has a generic datatype */ +- status = ucp_dt_create_generic(&test_dt_uint8_ops, NULL, send_dt); ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, send_dt); + ASSERT_UCS_OK(status); + } + +@@ -188,7 +198,7 @@ void test_ucp_tag_xfer::test_xfer_prepare_bufs(uint8_t *sendbuf, uint8_t *recvbu + *recv_dt = DATATYPE; + } else { + /* the receiver has a generic datatype */ +- status = ucp_dt_create_generic(&test_dt_uint8_ops, NULL, recv_dt); ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, recv_dt); + /* the recvbuf can be NULL because we only validate the received data in the + * unpack function - we don't copy it to the recvbuf */ + ASSERT_UCS_OK(status); +@@ -207,8 +217,8 @@ void test_ucp_tag_xfer::test_run_xfer(bool send_contig, bool recv_contig, + skip_err_handling(); + } + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + + if (send_contig) { + /* the sender has a contig datatype for the data buffer */ +@@ -258,8 +268,8 @@ void test_ucp_tag_xfer::test_xfer_probe(bool send_contig, bool recv_contig, + UCS_TEST_SKIP_R("loop-back unsupported"); + } + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + + sendbuf = (uint8_t*) malloc(count * sizeof(*sendbuf)); + recvbuf = (uint8_t*) malloc(count * sizeof(*recvbuf)); +@@ -335,23 +345,23 @@ void test_ucp_tag_xfer::test_xfer_generic(size_t size, bool expected, bool sync, + ucs_status_t status; + size_t recvd; + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + + /* if count is zero, truncation has no effect */ + if ((truncated) && (!count)) { + truncated = false; + } + +- status = ucp_dt_create_generic(&test_dt_uint32_ops, this, &dt); ++ status = ucp_dt_create_generic(&ucp::test_dt_uint32_ops, NULL, &dt); + ASSERT_UCS_OK(status); + + recvd = do_xfer(NULL, NULL, count, dt, dt, expected, sync, truncated); + if (!truncated) { + EXPECT_EQ(count * sizeof(uint32_t), recvd); + } +- EXPECT_EQ(2, dt_gen_start_count); +- EXPECT_EQ(2, dt_gen_finish_count); ++ EXPECT_EQ(2, ucp::dt_gen_start_count); ++ EXPECT_EQ(2, ucp::dt_gen_finish_count); + + ucp_dt_destroy(dt); + } +@@ -389,10 +399,10 @@ void test_ucp_tag_xfer::test_xfer_generic_err(size_t size, bool expected, + ucs_status_t status; + request *rreq, *sreq; + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + +- status = ucp_dt_create_generic(&test_dt_uint32_err_ops, this, &dt); ++ status = ucp_dt_create_generic(&ucp::test_dt_uint32_err_ops, this, &dt); + ASSERT_UCS_OK(status); + + if (expected) { +@@ -417,8 +427,8 @@ void test_ucp_tag_xfer::test_xfer_generic_err(size_t size, bool expected, + /* the generic unpack function is expected to fail */ + EXPECT_EQ(UCS_ERR_NO_MEMORY, rreq->status); + request_release(rreq); +- EXPECT_EQ(2, dt_gen_start_count); +- EXPECT_EQ(2, dt_gen_finish_count); ++ EXPECT_EQ(2, ucp::dt_gen_start_count); ++ EXPECT_EQ(2, ucp::dt_gen_finish_count); + ucp_dt_destroy(dt); + } + +@@ -472,7 +482,7 @@ size_t test_ucp_tag_xfer::do_xfer(const void *sendbuf, void *recvbuf, + + recvd = rreq->info.length; + if (!truncated) { +- ASSERT_UCS_OK(rreq->status); ++ EXPECT_UCS_OK(rreq->status); + EXPECT_EQ((ucp_tag_t)SENDER_TAG, rreq->info.sender_tag); + } else { + EXPECT_EQ(UCS_ERR_MESSAGE_TRUNCATED, rreq->status); +@@ -482,11 +492,66 @@ size_t test_ucp_tag_xfer::do_xfer(const void *sendbuf, void *recvbuf, + return recvd; + } + ++void test_ucp_tag_xfer::test_xfer_len_offset() ++{ ++ const size_t max_offset = 128; ++ const size_t max_length = 64 * 1024; ++ const size_t min_length = 1024; ++ const size_t offset_step = 16; ++ const size_t length_step = 16; ++ const size_t buf_size = max_length + max_offset + 2; ++ ucp_datatype_t type = ucp_dt_make_contig(1); ++ void *send_buf = 0; ++ void *recv_buf = 0;; ++ size_t offset; ++ size_t length; ++ ucs::detail::message_stream *ms; ++ ++ skip_err_handling(); ++ if (RUNNING_ON_VALGRIND) { ++ UCS_TEST_SKIP_R("valgrind"); ++ } ++ ++ EXPECT_EQ(posix_memalign(&send_buf, 8192, buf_size), 0); ++ EXPECT_EQ(posix_memalign(&recv_buf, 8192, buf_size), 0); ++ ++ memset(send_buf, 0, buf_size); ++ memset(recv_buf, 0, buf_size); ++ ++ for (offset = 0; offset <= max_offset; offset += offset_step) { ++ if (!offset || ucs_is_pow2(offset)) { ++ ms = new ucs::detail::message_stream("INFO"); ++ *ms << "offset: " << offset << ": "; ++ } else { ++ ms = NULL; ++ } ++ for (length = min_length; length <= max_length; length += length_step) { ++ if (ms && ucs_is_pow2(length)) { ++ *ms << length << " "; ++ fflush(stdout); ++ } ++ ++ do_xfer((char*)send_buf + offset, (char*)recv_buf + offset, ++ length, type, type, true, true, false); ++ do_xfer((char*)send_buf + max_offset - offset, ++ (char*)recv_buf + max_offset - offset, ++ length, type, type, true, true, false); ++ } ++ if (ms) { ++ delete(ms); ++ } ++ } ++ ++ free(recv_buf); ++ free(send_buf); ++} ++ + UCS_TEST_P(test_ucp_tag_xfer, contig_exp) { + test_xfer(&test_ucp_tag_xfer::test_xfer_contig, true, false, false); + } + +-UCS_TEST_P(test_ucp_tag_xfer, contig_exp_truncated, "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_xfer, contig_exp_truncated) { ++ check_offload_support(false); + test_xfer(&test_ucp_tag_xfer::test_xfer_contig, true, false, true); + } + +@@ -523,6 +588,11 @@ UCS_TEST_P(test_ucp_tag_xfer, generic_err_exp) { + } + + UCS_TEST_P(test_ucp_tag_xfer, generic_err_unexp) { ++#if HAVE_DC_DV ++ if (GetParam().transports.front().compare("dc_x") == 0) { ++ UCS_TEST_SKIP_R("DCI stuck bug"); ++ } ++#endif + test_xfer(&test_ucp_tag_xfer::test_xfer_generic_err, false, false, false); + } + +@@ -544,6 +614,11 @@ UCS_TEST_P(test_ucp_tag_xfer, contig_exp_sync) { + test_xfer(&test_ucp_tag_xfer::test_xfer_contig, true, true, false); + } + ++UCS_TEST_P(test_ucp_tag_xfer, contig_exp_sync_zcopy, "ZCOPY_THRESH=1000") { ++ skip_loopback(); ++ test_xfer(&test_ucp_tag_xfer::test_xfer_contig, true, true, false); ++} ++ + UCS_TEST_P(test_ucp_tag_xfer, contig_unexp_sync) { + test_xfer(&test_ucp_tag_xfer::test_xfer_contig, false, true, false); + } +@@ -634,8 +709,8 @@ UCS_TEST_P(test_ucp_tag_xfer, send_contig_recv_contig_exp_rndv, "RNDV_THRESH=100 + } + + UCS_TEST_P(test_ucp_tag_xfer, send_contig_recv_contig_exp_rndv_truncated, "RNDV_THRESH=1000", +- "ZCOPY_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++ "ZCOPY_THRESH=1248576") { ++ check_offload_support(false); + test_run_xfer(true, true, true, false, true); + } + +@@ -878,6 +953,46 @@ UCS_TEST_P(test_ucp_tag_xfer, send_contig_recv_generic_exp_rndv_probe_zcopy, "RN + test_xfer_probe(true, false, true, false); + } + ++UCS_TEST_P(test_ucp_tag_xfer, test_xfer_len_offset, "RNDV_THRESH=1000") { ++ test_xfer_len_offset(); ++} ++ ++UCS_TEST_P(test_ucp_tag_xfer, iov_with_empty_buffers, "ZCOPY_THRESH=512") { ++ const size_t iovcnt = ucp::data_type_desc_t::MAX_IOV; ++ const size_t size = 1024; ++ const int expected = 1; ++ const int sync = 0; ++ const int truncated = 0; ++ ++ std::vector sendbuf(size, 0); ++ std::vector recvbuf(size, 0); ++ ucp_dt_iov_t iovec[iovcnt]; ++ ++ ucs::fill_random(sendbuf); ++ ++ /* initialize iovec with MAX_IOV-1 empty buffers and one non-empty */ ++ for (size_t i = 0; i < iovcnt - 1; ++i) { ++ iovec[i].buffer = NULL; ++ iovec[i].length = 0; ++ } ++ ++ /* coverity[escape] */ ++ iovec[iovcnt - 1].buffer = &sendbuf[0]; ++ iovec[iovcnt - 1].length = size; ++ ++ ucp::data_type_desc_t recv_dt_desc(DATATYPE_IOV, recvbuf.data(), ++ recvbuf.size(), iovcnt); ++ ++ size_t recvd = do_xfer(iovec, recv_dt_desc.buf(), iovcnt, ++ DATATYPE_IOV, DATATYPE_IOV, expected, 0, ++ truncated); ++ ++ ASSERT_EQ(sendbuf.size(), recvd); ++ EXPECT_TRUE(!check_buffers(sendbuf, recvbuf, recvd, iovcnt, ++ recv_dt_desc.count(), size, expected, sync, ++ "IOV")); ++} ++ + UCP_INSTANTIATE_TEST_CASE(test_ucp_tag_xfer) + + +@@ -924,8 +1039,8 @@ public: + }; + + +-UCS_TEST_P(test_ucp_tag_stats, eager_expected, "RNDV_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, eager_expected, "RNDV_THRESH=1248576") { ++ check_offload_support(false); + test_run_xfer(true, true, true, false, false); + validate_counters(UCP_EP_STAT_TAG_TX_EAGER, + UCP_WORKER_STAT_TAG_RX_EAGER_MSG); +@@ -936,8 +1051,8 @@ UCS_TEST_P(test_ucp_tag_stats, eager_expected, "RNDV_THRESH=1248576", + EXPECT_EQ(cnt, 0ul); + } + +-UCS_TEST_P(test_ucp_tag_stats, eager_unexpected, "RNDV_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, eager_unexpected, "RNDV_THRESH=1248576") { ++ check_offload_support(false); + test_run_xfer(true, true, false, false, false); + validate_counters(UCP_EP_STAT_TAG_TX_EAGER, + UCP_WORKER_STAT_TAG_RX_EAGER_MSG); +@@ -947,8 +1062,8 @@ UCS_TEST_P(test_ucp_tag_stats, eager_unexpected, "RNDV_THRESH=1248576", + EXPECT_GT(cnt, 0ul); + } + +-UCS_TEST_P(test_ucp_tag_stats, sync_expected, "RNDV_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, sync_expected, "RNDV_THRESH=1248576") { ++ check_offload_support(false); + skip_loopback(); + test_run_xfer(true, true, true, true, false); + validate_counters(UCP_EP_STAT_TAG_TX_EAGER_SYNC, +@@ -960,8 +1075,8 @@ UCS_TEST_P(test_ucp_tag_stats, sync_expected, "RNDV_THRESH=1248576", + EXPECT_EQ(cnt, 0ul); + } + +-UCS_TEST_P(test_ucp_tag_stats, sync_unexpected, "RNDV_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, sync_unexpected, "RNDV_THRESH=1248576") { ++ check_offload_support(false); + skip_loopback(); + test_run_xfer(true, true, false, true, false); + validate_counters(UCP_EP_STAT_TAG_TX_EAGER_SYNC, +@@ -972,15 +1087,15 @@ UCS_TEST_P(test_ucp_tag_stats, sync_unexpected, "RNDV_THRESH=1248576", + EXPECT_GT(cnt, 0ul); + } + +-UCS_TEST_P(test_ucp_tag_stats, rndv_expected, "RNDV_THRESH=1000", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, rndv_expected, "RNDV_THRESH=1000") { ++ check_offload_support(false); + test_run_xfer(true, true, true, false, false); + validate_counters(UCP_EP_STAT_TAG_TX_RNDV, + UCP_WORKER_STAT_TAG_RX_RNDV_EXP); + } + +-UCS_TEST_P(test_ucp_tag_stats, rndv_unexpected, "RNDV_THRESH=1000", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, rndv_unexpected, "RNDV_THRESH=1000") { ++ check_offload_support(false); + test_run_xfer(true, true, false, false, false); + validate_counters(UCP_EP_STAT_TAG_TX_RNDV, + UCP_WORKER_STAT_TAG_RX_RNDV_UNEXP); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_wireup.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_wireup.cc +index 055c940..dfed76d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_wireup.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_wireup.cc +@@ -14,20 +14,23 @@ + extern "C" { + #include + #include ++#include + } + + class test_ucp_wireup : public ucp_test { + public: + static std::vector +- enum_test_params(const ucp_params_t& ctx_params, +- const std::string& name, +- const std::string& test_case_name, +- const std::string& tls); ++ enum_test_params_features(const ucp_params_t& ctx_params, ++ const std::string& name, ++ const std::string& test_case_name, ++ const std::string& tls, ++ uint64_t features); + + protected: + enum { + TEST_RMA, +- TEST_TAG ++ TEST_TAG, ++ TEST_STREAM + }; + + typedef uint64_t elem_type; +@@ -41,13 +44,17 @@ protected: + virtual void init(); + virtual void cleanup(); + +- void send_nb(ucp_ep_h ep, size_t length, int repeat, std::vector& reqs); ++ void send_nb(ucp_ep_h ep, size_t length, int repeat, std::vector& reqs, ++ uint64_t send_data = SEND_DATA); + +- void send_b(ucp_ep_h ep, size_t length, int repeat); ++ void send_b(ucp_ep_h ep, size_t length, int repeat, ++ uint64_t send_data = SEND_DATA); + +- void recv_b(ucp_worker_h worker, size_t length, int repeat); ++ void recv_b(ucp_worker_h worker, ucp_ep_h ep, size_t length, int repeat, ++ uint64_t recv_data = SEND_DATA); + +- void send_recv(ucp_ep_h ep, ucp_worker_h worker, size_t vecsize, int repeat); ++ void send_recv(ucp_ep_h send_ep, ucp_worker_h recv_worker, ucp_ep_h recv_ep, ++ size_t vecsize, int repeat); + + void waitall(std::vector reqs); + +@@ -56,50 +63,76 @@ protected: + void disconnect(ucp_test::entity &e); + + private: +- vec_type m_send_data; +- vec_type m_recv_data; +- ucp_mem_h m_memh1, m_memh2; +- ucp_rkey_h m_rkey1, m_rkey2; ++ vec_type m_send_data; ++ vec_type m_recv_data; ++ ucs::handle m_memh_sender; ++ ucs::handle m_memh_receiver; ++ std::vector< ucs::handle > m_rkeys; + + void clear_recv_data(); + +- ucp_rkey_h get_rkey(ucp_mem_h memh); ++ ucp_rkey_h get_rkey(ucp_ep_h ep, ucp_mem_h memh); + + static void send_completion(void *request, ucs_status_t status); + +- static void recv_completion(void *request, ucs_status_t status, +- ucp_tag_recv_info_t *info); ++ static void tag_recv_completion(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t *info); ++ ++ static void stream_recv_completion(void *request, ucs_status_t status, ++ size_t length); ++ ++ static void unmap_memh(ucp_mem_h memh, ucp_context_h context); + }; + + std::vector +-test_ucp_wireup::enum_test_params(const ucp_params_t& ctx_params, +- const std::string& name, +- const std::string& test_case_name, +- const std::string& tls) ++test_ucp_wireup::enum_test_params_features(const ucp_params_t& ctx_params, ++ const std::string& name, ++ const std::string& test_case_name, ++ const std::string& tls, ++ uint64_t features) + { + std::vector result; + ucp_params_t tmp_ctx_params = ctx_params; + +- tmp_ctx_params.features = UCP_FEATURE_RMA; +- generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/rma", +- tls, TEST_RMA, result); ++ if (features & UCP_FEATURE_RMA) { ++ tmp_ctx_params.features = UCP_FEATURE_RMA; ++ generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/rma", ++ tls, TEST_RMA, result); ++ } ++ ++ if (features & UCP_FEATURE_TAG) { ++ tmp_ctx_params.features = UCP_FEATURE_TAG; ++ generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/tag", ++ tls, TEST_TAG, result); ++ } + +- tmp_ctx_params.features = UCP_FEATURE_TAG; +- generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/tag", +- tls, TEST_TAG, result); ++ if (features & UCP_FEATURE_STREAM) { ++ tmp_ctx_params.features = UCP_FEATURE_STREAM; ++ generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/stream", ++ tls, TEST_STREAM, result); ++ } + + return result; + } + ++void test_ucp_wireup::unmap_memh(ucp_mem_h memh, ucp_context_h context) ++{ ++ ucs_status_t status = ucp_mem_unmap(context, memh); ++ if (status != UCS_OK) { ++ ucs_warn("failed to unmap memory: %s", ucs_status_string(status)); ++ } ++} ++ + void test_ucp_wireup::init() { + ucp_test::init(); + +- m_send_data.resize(BUFFER_LENGTH, elem_type(SEND_DATA)); ++ m_send_data.resize(BUFFER_LENGTH, 0); + m_recv_data.resize(BUFFER_LENGTH, 0); + +- if (GetParam().variant == UCP_FEATURE_RMA) { ++ if (GetParam().variant == TEST_RMA) { + ucs_status_t status; + ucp_mem_map_params_t params; ++ ucp_mem_h memh; + + params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | + UCP_MEM_MAP_PARAM_FIELD_LENGTH | +@@ -108,28 +141,33 @@ void test_ucp_wireup::init() { + params.length = m_recv_data.size() * sizeof(m_recv_data[0]); + params.flags = 0; + +- status = ucp_mem_map(receiver().ucph(), ¶ms, &m_memh1); ++ status = ucp_mem_map(sender().ucph(), ¶ms, &memh); + ASSERT_UCS_OK(status); ++ m_memh_sender.reset(memh, unmap_memh, sender().ucph()); + +- status = ucp_mem_map(sender().ucph(), ¶ms, &m_memh2); ++ status = ucp_mem_map(receiver().ucph(), ¶ms, &memh); + ASSERT_UCS_OK(status); +- +- m_rkey1 = get_rkey(m_memh1); +- m_rkey2 = get_rkey(m_memh2); ++ m_memh_receiver.reset(memh, unmap_memh, receiver().ucph()); + } + } + +-ucp_rkey_h test_ucp_wireup::get_rkey(ucp_mem_h memh) ++ucp_rkey_h test_ucp_wireup::get_rkey(ucp_ep_h ep, ucp_mem_h memh) + { + void *rkey_buffer; + size_t rkey_size; + ucs_status_t status; + ucp_rkey_h rkey; + +- status = ucp_rkey_pack(receiver().ucph(), memh, &rkey_buffer, &rkey_size); ++ if (memh == m_memh_receiver) { ++ status = ucp_rkey_pack(receiver().ucph(), memh, &rkey_buffer, &rkey_size); ++ } else if (memh == m_memh_sender) { ++ status = ucp_rkey_pack(sender().ucph(), memh, &rkey_buffer, &rkey_size); ++ } else { ++ status = UCS_ERR_INVALID_PARAM; ++ } + ASSERT_UCS_OK(status); + +- status = ucp_ep_rkey_unpack(sender().ep(), rkey_buffer, &rkey); ++ status = ucp_ep_rkey_unpack(ep, rkey_buffer, &rkey); + ASSERT_UCS_OK(status); + + ucp_rkey_buffer_release(rkey_buffer); +@@ -138,12 +176,9 @@ ucp_rkey_h test_ucp_wireup::get_rkey(ucp_mem_h memh) + } + + void test_ucp_wireup::cleanup() { +- if (GetParam().variant == UCP_FEATURE_RMA) { +- ucp_rkey_destroy(m_rkey1); +- ucp_mem_unmap(receiver().ucph(), m_memh1); +- ucp_rkey_destroy(m_rkey2); +- ucp_mem_unmap(sender().ucph(), m_memh2); +- } ++ m_rkeys.clear(); ++ m_memh_sender.reset(); ++ m_memh_receiver.reset(); + ucp_test::cleanup(); + } + +@@ -152,9 +187,10 @@ void test_ucp_wireup::clear_recv_data() { + } + + void test_ucp_wireup::send_nb(ucp_ep_h ep, size_t length, int repeat, +- std::vector& reqs) ++ std::vector& reqs, uint64_t send_data) + { +- if (GetParam().variant == UCP_FEATURE_TAG) { ++ if (GetParam().variant == TEST_TAG) { ++ std::fill(m_send_data.begin(), m_send_data.end(), send_data); + for (int i = 0; i < repeat; ++i) { + void *req = ucp_tag_send_nb(ep, &m_send_data[0], length, + DT_U64, TAG, send_completion); +@@ -164,47 +200,86 @@ void test_ucp_wireup::send_nb(ucp_ep_h ep, size_t length, int repeat, + ASSERT_UCS_OK(UCS_PTR_STATUS(req)); + } + } +- } else if (GetParam().variant == UCP_FEATURE_RMA) { ++ } else if (GetParam().variant == TEST_STREAM) { ++ std::fill(m_send_data.begin(), m_send_data.end(), send_data); ++ for (int i = 0; i < repeat; ++i) { ++ void *req = ucp_stream_send_nb(ep, &m_send_data[0], length, DT_U64, ++ send_completion, 0); ++ if (UCS_PTR_IS_PTR(req)) { ++ reqs.push_back(req); ++ } else { ++ ASSERT_UCS_OK(UCS_PTR_STATUS(req)); ++ } ++ } ++ } else if (GetParam().variant == TEST_RMA) { + clear_recv_data(); ++ ++ ucp_mem_h memh = (sender().ucph() == ep->worker->context) ? ++ m_memh_receiver : m_memh_sender; ++ ucp_rkey_h rkey = get_rkey(ep, memh); ++ ++ m_rkeys.push_back(ucs::handle(rkey, ucp_rkey_destroy)); ++ + for (int i = 0; i < repeat; ++i) { +- std::fill(m_send_data.begin(), m_send_data.end(), SEND_DATA + i); +- ucs_status_t status; +- status = ucp_put(ep, &m_send_data[0], +- m_send_data.size() * sizeof(m_send_data[0]), +- (uintptr_t)&m_recv_data[0], +- (sender().ep() == ep) ? m_rkey1 : m_rkey2); +- ASSERT_UCS_OK(status); ++ std::fill(m_send_data.begin(), m_send_data.end(), send_data + i); ++ void *req = ucp_put_nb(ep, &m_send_data[0], ++ m_send_data.size() * sizeof(m_send_data[0]), ++ (uintptr_t)&m_recv_data[0], rkey, ++ send_completion); ++ if (UCS_PTR_IS_PTR(req)) { ++ reqs.push_back(req); ++ } else { ++ ASSERT_UCS_OK(UCS_PTR_STATUS(req)); ++ } + } + } + } + +-void test_ucp_wireup::send_b(ucp_ep_h ep, size_t length, int repeat) ++void test_ucp_wireup::send_b(ucp_ep_h ep, size_t length, int repeat, ++ uint64_t send_data) + { + std::vector reqs; +- send_nb(ep, length, repeat, reqs); ++ send_nb(ep, length, repeat, reqs, send_data); + waitall(reqs); + } + +-void test_ucp_wireup::recv_b(ucp_worker_h worker, size_t length, int repeat) ++void test_ucp_wireup::recv_b(ucp_worker_h worker, ucp_ep_h ep, size_t length, ++ int repeat, uint64_t recv_data) + { +- if (GetParam().variant == UCP_FEATURE_TAG) { ++ if ((GetParam().variant == TEST_TAG) || (GetParam().variant == TEST_STREAM)) ++ { + for (int i = 0; i < repeat; ++i) { ++ size_t recv_length; ++ void *req; ++ + clear_recv_data(); +- void *req = ucp_tag_recv_nb(worker, &m_recv_data[0], length, +- DT_U64, TAG, (ucp_tag_t)-1, +- recv_completion); ++ if (GetParam().variant == TEST_TAG) { ++ req = ucp_tag_recv_nb(worker, &m_recv_data[0], length, DT_U64, ++ TAG, (ucp_tag_t)-1, tag_recv_completion); ++ } else if (GetParam().variant == TEST_STREAM) { ++ req = ucp_stream_recv_nb(ep, &m_recv_data[0], length, DT_U64, ++ stream_recv_completion, &recv_length, ++ UCP_STREAM_RECV_FLAG_WAITALL); ++ } else { ++ req = NULL; ++ } + if (UCS_PTR_IS_PTR(req)) { + wait(req); + } else { + ASSERT_UCS_OK(UCS_PTR_STATUS(req)); + } ++ EXPECT_EQ(recv_data, m_recv_data[0]) ++ << "repeat " << i << "/" << repeat; + EXPECT_EQ(length, +- (size_t)std::count(m_recv_data.begin(), m_recv_data.begin() + length, +- elem_type(SEND_DATA))); ++ (size_t)std::count(m_recv_data.begin(), ++ m_recv_data.begin() + length, ++ recv_data)); + } +- } else if (GetParam().variant == UCP_FEATURE_RMA) { ++ } else if (GetParam().variant == TEST_RMA) { + for (size_t i = 0; i < length; ++i) { +- while (m_recv_data[i] != SEND_DATA + repeat); ++ while (m_recv_data[i] != recv_data + repeat - 1) { ++ progress(); ++ } + } + } + } +@@ -213,18 +288,27 @@ void test_ucp_wireup::send_completion(void *request, ucs_status_t status) + { + } + +-void test_ucp_wireup::recv_completion(void *request, ucs_status_t status, +- ucp_tag_recv_info_t *info) ++void test_ucp_wireup::tag_recv_completion(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t *info) ++{ ++} ++ ++void test_ucp_wireup::stream_recv_completion(void *request, ucs_status_t status, ++ size_t length) + { + } + +-void test_ucp_wireup::send_recv(ucp_ep_h ep, ucp_worker_h worker, +- size_t length, int repeat) ++void test_ucp_wireup::send_recv(ucp_ep_h send_ep, ucp_worker_h recv_worker, ++ ucp_ep_h recv_ep, size_t length, int repeat) + { + std::vector send_reqs; +- send_nb(ep, length, repeat, send_reqs); +- recv_b (worker, length, repeat); ++ static uint64_t next_send_data = 0; ++ uint64_t send_data = next_send_data++; ++ ++ send_nb(send_ep, length, repeat, send_reqs, send_data); ++ recv_b (recv_worker, recv_ep, length, repeat, send_data); + waitall(send_reqs); ++ m_rkeys.clear(); + } + + void test_ucp_wireup::disconnect(ucp_ep_h ep) { +@@ -247,12 +331,22 @@ void test_ucp_wireup::waitall(std::vector reqs) + } + } + +-UCS_TEST_P(test_ucp_wireup, address) { ++class test_ucp_wireup_1sided : public test_ucp_wireup { ++public: ++ static std::vector ++ enum_test_params(const ucp_params_t& ctx_params, const std::string& name, ++ const std::string& test_case_name, const std::string& tls) ++ { ++ return enum_test_params_features(ctx_params, name, test_case_name, tls, ++ UCP_FEATURE_RMA | UCP_FEATURE_TAG); ++ } ++}; ++ ++UCS_TEST_P(test_ucp_wireup_1sided, address) { + ucs_status_t status; + size_t size; + void *buffer; + unsigned order[UCP_MAX_RESOURCES]; +- const ucp_address_entry_t *ae; + std::set packed_dev_priorities, unpacked_dev_priorities; + int tl; + +@@ -268,30 +362,35 @@ UCS_TEST_P(test_ucp_wireup, address) { + packed_dev_priorities.insert(sender().worker()->ifaces[tl].attr.priority); + } + +- char name[UCP_WORKER_NAME_MAX]; +- uint64_t uuid; +- unsigned address_count; +- ucp_address_entry_t *address_list; ++ ucp_unpacked_address unpacked_address; + +- ucp_address_unpack(buffer, &uuid, name, sizeof(name), &address_count, +- &address_list); +- EXPECT_EQ(sender().worker()->uuid, uuid); +- EXPECT_EQ(std::string(ucp_worker_get_name(sender().worker())), std::string(name)); +- EXPECT_LE(address_count, static_cast(sender().ucph()->num_tls)); +- for (ae = address_list; ae < address_list + address_count; ++ae) { ++ status = ucp_address_unpack(buffer, &unpacked_address); ++ ASSERT_UCS_OK(status); ++ ++ EXPECT_EQ(sender().worker()->uuid, unpacked_address.uuid); ++#if ENABLE_DEBUG_DATA ++ EXPECT_EQ(std::string(ucp_worker_get_name(sender().worker())), ++ std::string(unpacked_address.name)); ++#endif ++ EXPECT_LE(unpacked_address.address_count, ++ static_cast(sender().ucph()->num_tls)); ++ ++ for (const ucp_address_entry_t *ae = unpacked_address.address_list; ++ ae < unpacked_address.address_list + unpacked_address.address_count; ++ ++ae) { + unpacked_dev_priorities.insert(ae->iface_attr.priority); + } + + /* TODO test addresses */ + +- ucs_free(address_list); ++ ucs_free(unpacked_address.address_list); + ucs_free(buffer); + /* Make sure that the packed device priorities are equal to the unpacked + * device priorities */ + ASSERT_TRUE(packed_dev_priorities == unpacked_dev_priorities); + } + +-UCS_TEST_P(test_ucp_wireup, empty_address) { ++UCS_TEST_P(test_ucp_wireup_1sided, empty_address) { + ucs_status_t status; + size_t size; + void *buffer; +@@ -302,41 +401,40 @@ UCS_TEST_P(test_ucp_wireup, empty_address) { + ASSERT_TRUE(buffer != NULL); + ASSERT_GT(size, 0ul); + +- char name[UCP_WORKER_NAME_MAX]; +- uint64_t uuid; +- unsigned address_count; +- ucp_address_entry_t *address_list; ++ ucp_unpacked_address unpacked_address; ++ ++ status = ucp_address_unpack(buffer, &unpacked_address); ++ ASSERT_UCS_OK(status); + +- ucp_address_unpack(buffer, &uuid, name, sizeof(name), &address_count, +- &address_list); +- EXPECT_EQ(sender().worker()->uuid, uuid); +- EXPECT_EQ(std::string(ucp_worker_get_name(sender().worker())), std::string(name)); +- EXPECT_LE(address_count, sender().ucph()->num_tls); +- EXPECT_EQ(0u, address_count); ++ EXPECT_EQ(sender().worker()->uuid, unpacked_address.uuid); ++#if ENABLE_DEBUG_DATA ++ EXPECT_EQ(std::string(ucp_worker_get_name(sender().worker())), ++ std::string(unpacked_address.name)); ++#endif ++ EXPECT_EQ(0u, unpacked_address.address_count); + +- ucs_free(address_list); ++ ucs_free(unpacked_address.address_list); + ucs_free(buffer); + } + +-UCS_TEST_P(test_ucp_wireup, one_sided_wireup) { ++UCS_TEST_P(test_ucp_wireup_1sided, one_sided_wireup) { + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, 1); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); + flush_worker(sender()); + } + +-UCS_TEST_P(test_ucp_wireup, two_sided_wireup) { ++UCS_TEST_P(test_ucp_wireup_1sided, one_sided_wireup_rndv, "RNDV_THRESH=1") { + sender().connect(&receiver(), get_ep_params()); +- if (&sender() != &receiver()) { +- receiver().connect(&sender(), get_ep_params()); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), BUFFER_LENGTH, 1); ++ if (is_loopback() && (GetParam().variant == TEST_TAG)) { ++ /* expect the endpoint to be connected to itself */ ++ ucp_ep_h ep = sender().ep(); ++ EXPECT_EQ((uintptr_t)ep, ucp_ep_dest_ep_ptr(ep)); + } +- +- send_recv(sender().ep(), receiver().worker(), 1, 1); + flush_worker(sender()); +- send_recv(receiver().ep(), sender().worker(), 1, 1); +- flush_worker(receiver()); + } + +-UCS_TEST_P(test_ucp_wireup, multi_wireup) { ++UCS_TEST_P(test_ucp_wireup_1sided, multi_wireup) { + skip_loopback(); + + const size_t count = 10; +@@ -346,53 +444,14 @@ UCS_TEST_P(test_ucp_wireup, multi_wireup) { + + /* connect from sender() to all the rest */ + for (size_t i = 0; i < count; ++i) { +- sender().connect(&entities().at(i), get_ep_params()); +- } +-} +- +-UCS_TEST_P(test_ucp_wireup, reply_ep_send_before) { +- skip_loopback(); +- +- sender().connect(&receiver(), get_ep_params()); +- +- if (GetParam().variant == TEST_TAG) { +- /* Send a reply */ +- ucp_ep_connect_remote(sender().ep()); +- ucp_ep_h ep = ucp_worker_get_reply_ep(receiver().worker(), +- sender().worker()->uuid); +- send_recv(ep, sender().worker(), 1, 1); +- flush_worker(sender()); +- +- disconnect(ep); ++ sender().connect(&entities().at(i), get_ep_params(), i); + } + } + +-UCS_TEST_P(test_ucp_wireup, reply_ep_send_after) { +- skip_loopback(); +- +- sender().connect(&receiver(), get_ep_params()); +- +- if (GetParam().variant == TEST_TAG) { +- ucp_ep_connect_remote(sender().ep()); +- +- /* Make sure the wireup message arrives before sending a reply */ +- send_recv(sender().ep(), receiver().worker(), 1, 1); +- flush_worker(sender()); +- +- /* Send a reply */ +- ucp_ep_h ep = ucp_worker_get_reply_ep(receiver().worker(), sender().worker()->uuid); +- send_recv(ep, sender().worker(), 1, 1); +- +- flush_worker(sender()); +- +- disconnect(ep); +- } +-} +- +-UCS_TEST_P(test_ucp_wireup, stress_connect) { ++UCS_TEST_P(test_ucp_wireup_1sided, stress_connect) { + for (int i = 0; i < 30; ++i) { + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, + 10000 / ucs::test_time_multiplier()); + if (!is_loopback()) { + receiver().connect(&sender(), get_ep_params()); +@@ -405,10 +464,11 @@ UCS_TEST_P(test_ucp_wireup, stress_connect) { + } + } + +-UCS_TEST_P(test_ucp_wireup, stress_connect2) { +- for (int i = 0; i < 1000 / ucs::test_time_multiplier(); ++i) { ++UCS_TEST_P(test_ucp_wireup_1sided, stress_connect2) { ++ int count = ucs_min(1000 / ucs::test_time_multiplier(), max_connections() / 2); ++ for (int i = 0; i < count; ++i) { + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, 1); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); + if (&sender() != &receiver()) { + receiver().connect(&sender(), get_ep_params()); + } +@@ -420,18 +480,7 @@ UCS_TEST_P(test_ucp_wireup, stress_connect2) { + } + } + +-UCS_TEST_P(test_ucp_wireup, connect_disconnect) { +- sender().connect(&receiver(), get_ep_params()); +- if (!is_loopback()) { +- receiver().connect(&sender(), get_ep_params()); +- } +- disconnect(sender()); +- if (!is_loopback()) { +- disconnect(receiver()); +- } +-} +- +-UCS_TEST_P(test_ucp_wireup, disconnect_nonexistent) { ++UCS_TEST_P(test_ucp_wireup_1sided, disconnect_nonexistent) { + skip_loopback(); + sender().connect(&receiver(), get_ep_params()); + disconnect(sender()); +@@ -439,33 +488,41 @@ UCS_TEST_P(test_ucp_wireup, disconnect_nonexistent) { + sender().destroy_worker(); + } + +-UCS_TEST_P(test_ucp_wireup, disconnect_reconnect) { ++UCS_TEST_P(test_ucp_wireup_1sided, disconnect_reconnect) { + sender().connect(&receiver(), get_ep_params()); + send_b(sender().ep(), 1000, 1); + disconnect(sender()); +- recv_b(receiver().worker(), 1000, 1); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 1); + + sender().connect(&receiver(), get_ep_params()); + send_b(sender().ep(), 1000, 1); + disconnect(sender()); +- recv_b(receiver().worker(), 1000, 1); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 1); + } + +-UCS_TEST_P(test_ucp_wireup, send_disconnect_onesided) { ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_onesided) { + sender().connect(&receiver(), get_ep_params()); + send_b(sender().ep(), 1000, 100); + disconnect(sender()); +- recv_b(receiver().worker(), 1000, 100); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 100); + } + +-UCS_TEST_P(test_ucp_wireup, send_disconnect_onesided_nozcopy, "ZCOPY_THRESH=-1") { ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_onesided_nozcopy, "ZCOPY_THRESH=-1") { + sender().connect(&receiver(), get_ep_params()); + send_b(sender().ep(), 1000, 100); + disconnect(sender()); +- recv_b(receiver().worker(), 1000, 100); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 100); ++} ++ ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_onesided_wait) { ++ sender().connect(&receiver(), get_ep_params()); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 8, 1); ++ send_b(sender().ep(), 1000, 200); ++ disconnect(sender()); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 200); + } + +-UCS_TEST_P(test_ucp_wireup, send_disconnect_reply1) { ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_reply1) { + sender().connect(&receiver(), get_ep_params()); + if (!is_loopback()) { + receiver().connect(&sender(), get_ep_params()); +@@ -476,20 +533,20 @@ UCS_TEST_P(test_ucp_wireup, send_disconnect_reply1) { + disconnect(sender()); + } + +- recv_b(receiver().worker(), 8, 1); ++ recv_b(receiver().worker(), receiver().ep(), 8, 1); + send_b(receiver().ep(), 8, 1); + disconnect(receiver()); +- recv_b(sender().worker(), 8, 1); ++ recv_b(sender().worker(), sender().ep(), 8, 1); + } + +-UCS_TEST_P(test_ucp_wireup, send_disconnect_reply2) { ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_reply2) { + sender().connect(&receiver(), get_ep_params()); + + send_b(sender().ep(), 8, 1); + if (!is_loopback()) { + disconnect(sender()); + } +- recv_b(receiver().worker(), 8, 1); ++ recv_b(receiver().worker(), receiver().ep(), 8, 1); + + if (!is_loopback()) { + receiver().connect(&sender(), get_ep_params()); +@@ -497,18 +554,10 @@ UCS_TEST_P(test_ucp_wireup, send_disconnect_reply2) { + + send_b(receiver().ep(), 8, 1); + disconnect(receiver()); +- recv_b(sender().worker(), 8, 1); +-} +- +-UCS_TEST_P(test_ucp_wireup, send_disconnect_onesided_wait) { +- sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 8, 1); +- send_b(sender().ep(), 1000, 200); +- disconnect(sender()); +- recv_b(receiver().worker(), 1000, 200); ++ recv_b(sender().worker(), receiver().ep(), 8, 1); + } + +-UCS_TEST_P(test_ucp_wireup, disconnect_nb_onesided) { ++UCS_TEST_P(test_ucp_wireup_1sided, disconnect_nb_onesided) { + sender().connect(&receiver(), get_ep_params()); + + std::vector sreqs; +@@ -520,15 +569,155 @@ UCS_TEST_P(test_ucp_wireup, disconnect_nb_onesided) { + } + + wait(dreq); +- recv_b(receiver().worker(), 1000, 1000); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 1000); + + waitall(sreqs); ++} ++ ++UCS_TEST_P(test_ucp_wireup_1sided, multi_ep_1sided) { ++ const unsigned count = 10; ++ ++ for (unsigned i = 0; i < count; ++i) { ++ sender().connect(&receiver(), get_ep_params(), i); ++ } ++ ++ for (unsigned i = 0; i < count; ++i) { ++ send_recv(sender().ep(0, i), receiver().worker(), receiver().ep(), 8, 1); ++ } ++} ++ ++UCP_INSTANTIATE_TEST_CASE(test_ucp_wireup_1sided) ++ ++class test_ucp_wireup_2sided : public test_ucp_wireup { ++public: ++ static std::vector ++ enum_test_params(const ucp_params_t& ctx_params, const std::string& name, ++ const std::string& test_case_name, const std::string& tls) ++ { ++ return enum_test_params_features(ctx_params, name, test_case_name, tls, ++ UCP_FEATURE_RMA | UCP_FEATURE_TAG | ++ UCP_FEATURE_STREAM); ++ } ++ ++protected: ++ void test_connect_loopback(bool delay_before_connect, bool enable_loopback); ++}; ++ ++UCS_TEST_P(test_ucp_wireup_2sided, two_sided_wireup) { ++ sender().connect(&receiver(), get_ep_params()); ++ if (!is_loopback()) { ++ receiver().connect(&sender(), get_ep_params()); ++ } ++ ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); ++ flush_worker(sender()); ++ send_recv(receiver().ep(), sender().worker(), sender().ep(), 1, 1); ++ flush_worker(receiver()); ++} ++ ++void test_ucp_wireup_2sided::test_connect_loopback(bool delay_before_connect, ++ bool enable_loopback) { ++ ucp_ep_params_t params = test_ucp_wireup::get_ep_params(); ++ if (!enable_loopback) { ++ params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS; ++ params.flags |= UCP_EP_PARAMS_FLAGS_NO_LOOPBACK; ++ } ++ ++ for (int i = 0; i < 5; ++i) { ++ int base_index = i * 2; ++ sender().connect(&sender(), params, base_index); ++ ucp_ep_h ep1 = sender().ep(0, base_index); ++ ++ if (delay_before_connect) { ++ /* let one side create ep */ ++ short_progress_loop(0); ++ } ++ ++ sender().connect(&sender(), params, base_index + 1); ++ ucp_ep_h ep2 = sender().ep(0, base_index + 1); ++ ++ EXPECT_NE(ep1, ep2); ++ ++ if (GetParam().variant == TEST_STREAM) { ++ uint64_t data1 = (base_index * 10) + 1; ++ uint64_t data2 = (base_index * 10) + 2; ++ ++ send_b(ep1, 1, 1, data1); ++ send_b(ep2, 1, 1, data2); ++ ++ if (enable_loopback) { ++ /* self-send - each ep receives what was sent on it */ ++ recv_b(sender().worker(), ep1, 1, 1, data1); ++ recv_b(sender().worker(), ep2, 1, 1, data2); ++ } else { ++ /* cross-send - each ep receives what was sent on the other ep */ ++ recv_b(sender().worker(), ep1, 1, 1, data2); ++ recv_b(sender().worker(), ep2, 1, 1, data1); ++ } ++ } ++ } ++ flush_worker(sender()); ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, loopback) { ++ test_connect_loopback(false, true); ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, loopback_with_delay) { ++ test_connect_loopback(true, true); ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, no_loopback) { ++ test_connect_loopback(false, false); ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, no_loopback_with_delay) { ++ test_connect_loopback(true, false); ++} + ++UCS_TEST_P(test_ucp_wireup_2sided, connect_disconnect) { ++ sender().connect(&receiver(), get_ep_params()); ++ if (!is_loopback()) { ++ receiver().connect(&sender(), get_ep_params()); ++ } ++ disconnect(sender()); ++ if (!is_loopback()) { ++ disconnect(receiver()); ++ } ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, multi_ep_2sided) { ++ const unsigned count = 10; ++ ++ for (unsigned j = 0; j < 4; ++j) { ++ ++ unsigned offset = j * count; ++ ++ for (unsigned i = 0; i < count; ++i) { ++ unsigned ep_idx = offset + i; ++ sender().connect(&receiver(), get_ep_params(), ep_idx); ++ if (!is_loopback()) { ++ receiver().connect(&sender(), get_ep_params(), ep_idx); ++ } ++ UCS_TEST_MESSAGE << "iteration " << j << " pair " << i << ": " << ++ sender().ep(0, ep_idx) << " <--> " << receiver().ep(0, ep_idx); ++ } ++ ++ for (unsigned i = 0; i < count; ++i) { ++ unsigned ep_idx = offset + i; ++ send_recv(sender().ep(0, ep_idx), receiver().worker(), ++ receiver().ep(0, ep_idx), 8, 1); ++ send_recv(receiver().ep(0, ep_idx), sender().worker(), ++ sender().ep(0, ep_idx), 8, 1); ++ } ++ ++ short_progress_loop(0); ++ } + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_wireup) ++UCP_INSTANTIATE_TEST_CASE(test_ucp_wireup_2sided) + +-class test_ucp_wireup_errh_peer : public test_ucp_wireup ++class test_ucp_wireup_errh_peer : public test_ucp_wireup_1sided + { + public: + virtual ucp_ep_params_t get_ep_params() { +@@ -553,19 +742,19 @@ UCS_TEST_P(test_ucp_wireup_errh_peer, msg_after_ep_create) { + receiver().connect(&sender(), get_ep_params()); + + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, 1); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); + flush_worker(sender()); + } + + UCS_TEST_P(test_ucp_wireup_errh_peer, msg_before_ep_create) { + + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, 1); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); + flush_worker(sender()); + + receiver().connect(&sender(), get_ep_params()); + +- send_recv(receiver().ep(), sender().worker(), 1, 1); ++ send_recv(receiver().ep(), sender().worker(), receiver().ep(), 1, 1); + flush_worker(receiver()); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.cc +new file mode 100644 +index 0000000..5c1cce7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.cc +@@ -0,0 +1,201 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* See file LICENSE for terms. ++*/ ++ ++#include "ucp_datatype.h" ++#include "ucp_test.h" ++ ++#include ++ ++namespace ucp { ++ ++ ++data_type_desc_t & ++data_type_desc_t::make(ucp_datatype_t datatype, const void *buf, size_t length, ++ size_t iov_cnt) ++{ ++ EXPECT_FALSE(is_valid()); ++ ++ if (m_length == 0) { ++ m_length = length; ++ } ++ ++ if (m_origin == uintptr_t(NULL)) { ++ m_origin = uintptr_t(buf); ++ } ++ ++ m_dt = datatype; ++ memset(m_iov, 0, sizeof(m_iov)); ++ ++ switch (m_dt & UCP_DATATYPE_CLASS_MASK) { ++ case UCP_DATATYPE_CONTIG: ++ m_buf = buf; ++ m_count = length / ucp_contig_dt_elem_size(datatype); ++ break; ++ case UCP_DATATYPE_IOV: ++ { ++ const size_t iov_length = (length > iov_cnt) ? ++ ucs::rand() % (length / iov_cnt) : 0; ++ size_t iov_length_it = 0; ++ for (size_t iov_it = 0; iov_it < iov_cnt - 1; ++iov_it) { ++ m_iov[iov_it].buffer = (char *)(buf) + iov_length_it; ++ m_iov[iov_it].length = iov_length; ++ iov_length_it += iov_length; ++ } ++ ++ /* Last entry */ ++ m_iov[iov_cnt - 1].buffer = (char *)(buf) + iov_length_it; ++ m_iov[iov_cnt - 1].length = length - iov_length_it; ++ ++ m_buf = m_iov; ++ m_count = iov_cnt; ++ break; ++ } ++ case UCP_DATATYPE_GENERIC: ++ m_buf = buf; ++ m_count = length; ++ break; ++ default: ++ m_buf = NULL; ++ m_count = 0; ++ EXPECT_TRUE(false) << "Unsupported datatype"; ++ break; ++ } ++ ++ return *this; ++} ++ ++int dt_gen_start_count = 0; ++int dt_gen_finish_count = 0; ++ ++static void* dt_common_start(void *context, size_t count) ++{ ++ dt_gen_state *dt_state = new dt_gen_state; ++ ++ dt_state->count = count; ++ dt_state->started = 1; ++ dt_state->magic = ucp::MAGIC; ++ dt_state->context = context; ++ dt_gen_start_count++; ++ ++ return dt_state; ++} ++ ++static void* dt_common_start_pack(void *context, const void *buffer, ++ size_t count) ++{ ++ return dt_common_start(NULL, count); ++} ++ ++static void* dt_common_start_unpack(void *context, void *buffer, size_t count) ++{ ++ return dt_common_start(context, count); ++} ++ ++template ++size_t dt_packed_size(void *state) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ ++ return dt_state->count * sizeof(T); ++} ++ ++template ++size_t dt_pack(void *state, size_t offset, void *dest, size_t max_length) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ T *p = reinterpret_cast (dest); ++ uint32_t count; ++ ++ EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); ++ EXPECT_EQ(1, dt_state->started); ++ EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); ++ ++ ucs_assert((offset % sizeof(T)) == 0); ++ ++ count = std::min(max_length / sizeof(T), ++ dt_state->count - (offset / sizeof(T))); ++ for (unsigned i = 0; i < count; ++i) { ++ p[i] = (offset / sizeof(T)) + i; ++ } ++ return count * sizeof(T); ++} ++ ++template ++ucs_status_t dt_unpack(void *state, size_t offset, const void *src, ++ size_t length) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ std::vector *ctx; ++ uint32_t count; ++ ++ EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); ++ EXPECT_EQ(1, dt_state->started); ++ EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); ++ ++ ctx = reinterpret_cast*>(dt_state->context); ++ count = length / sizeof(T); ++ for (unsigned i = 0; i < count; ++i) { ++ T expected = ctx ? (*ctx)[offset / sizeof(T) + i] : ++ (offset / sizeof(T)) + i; ++ T actual = ((T*)src)[i]; ++ if (actual != expected) { ++ UCS_TEST_ABORT("Invalid data at index " << i << ". expected: " << ++ expected << " actual: " << actual << " offset: " << ++ offset << "."); ++ } ++ } ++ return UCS_OK; ++} ++ ++static ucs_status_t dt_err_unpack(void *state, size_t offset, const void *src, ++ size_t length) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ ++ EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); ++ EXPECT_EQ(1, dt_state->started); ++ EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); ++ ++ return UCS_ERR_NO_MEMORY; ++} ++ ++static void dt_common_finish(void *state) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ ++ --dt_state->started; ++ EXPECT_EQ(0, dt_state->started); ++ dt_gen_finish_count++; ++ delete dt_state; ++} ++ ++ucp_generic_dt_ops test_dt_uint32_ops = { ++ dt_common_start_pack, ++ dt_common_start_unpack, ++ dt_packed_size, ++ dt_pack, ++ dt_unpack, ++ dt_common_finish ++}; ++ ++ucp_generic_dt_ops test_dt_uint8_ops = { ++ dt_common_start_pack, ++ dt_common_start_unpack, ++ dt_packed_size, ++ dt_pack, ++ dt_unpack, ++ dt_common_finish ++}; ++ ++ucp_generic_dt_ops test_dt_uint32_err_ops = { ++ dt_common_start_pack, ++ dt_common_start_unpack, ++ dt_packed_size, ++ dt_pack, ++ dt_err_unpack, ++ dt_common_finish ++}; ++ ++} // ucp +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.h +new file mode 100644 +index 0000000..545c860 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.h +@@ -0,0 +1,132 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* See file LICENSE for terms. ++*/ ++ ++#ifndef TEST_UCP_DATATYPE_H_ ++#define TEST_UCP_DATATYPE_H_ ++ ++#include ++ ++#include ++extern "C" { ++#include ++#include ++#include ++} ++ ++#include ++ ++namespace ucp { ++ ++/* Can't be destroyed before related UCP request is completed */ ++class data_type_desc_t { ++public: ++ enum { ++ MAX_IOV = 40 ++ }; ++ ++ data_type_desc_t() ++ : m_origin(uintptr_t(NULL)), m_length(0), m_dt(0), m_buf(NULL), ++ m_count(0), m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { ++ memset(m_iov, 0, sizeof(m_iov)); ++ }; ++ ++ data_type_desc_t(ucp_datatype_t datatype, const void *buf, size_t length) ++ : m_origin(uintptr_t(buf)), m_length(length), m_dt(0), m_buf(NULL), ++ m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { ++ make(datatype, buf, length); ++ } ++ ++ data_type_desc_t(ucp_datatype_t datatype, const void *buf, size_t length, ++ size_t iov_count) ++ : m_origin(uintptr_t(buf)), m_length(length), m_dt(0), m_buf(NULL), ++ m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { ++ make(datatype, buf, length, iov_count); ++ }; ++ ++ data_type_desc_t &make(ucp_datatype_t datatype, const void *buf, ++ size_t length) { ++ return make(datatype, buf, length, m_iov_cnt_limit); ++ }; ++ ++ data_type_desc_t &forward_to(size_t offset) { ++ EXPECT_LE(offset, m_length); ++ invalidate(); ++ return make(m_dt, (const void *)(m_origin + offset), m_length - offset, ++ m_iov_cnt_limit); ++ }; ++ ++ ucp_datatype_t dt() const { ++ EXPECT_TRUE(is_valid()); ++ return m_dt; ++ }; ++ ++ void *buf() const { ++ EXPECT_TRUE(is_valid()); ++ return const_cast(m_buf); ++ }; ++ ++ ssize_t buf_length() const { ++ EXPECT_TRUE(is_valid()); ++ if (UCP_DT_IS_CONTIG(m_dt) || UCP_DT_IS_GENERIC(m_dt)) { ++ return m_length - (uintptr_t(m_buf) - m_origin); ++ } else if (UCP_DT_IS_IOV(m_dt)) { ++ size_t length = 0; ++ for (size_t i = 0; i < count(); ++i) { ++ length += m_iov[i].length; ++ } ++ return length; ++ } ++ ADD_FAILURE() << "Not supported datatype"; ++ return -1; ++ } ++ ++ size_t count() const { ++ EXPECT_TRUE(is_valid()); ++ return m_count; ++ }; ++ ++ bool is_valid() const { ++ return (m_buf != NULL) && (m_count != 0) && ++ (UCP_DT_IS_IOV(m_dt) ? (m_count <= m_iov_cnt_limit) : ++ (UCP_DT_IS_CONTIG(m_dt) || UCP_DT_IS_GENERIC(m_dt))); ++ } ++ ++private: ++ data_type_desc_t &make(ucp_datatype_t datatype, const void *buf, ++ size_t length, size_t iov_count); ++ ++ void invalidate() { ++ EXPECT_TRUE(is_valid()); ++ m_buf = NULL; ++ m_count = 0; ++ } ++ ++ uintptr_t m_origin; ++ size_t m_length; ++ ++ ucp_datatype_t m_dt; ++ const void *m_buf; ++ size_t m_count; ++ ++ const size_t m_iov_cnt_limit; ++ ucp_dt_iov_t m_iov[MAX_IOV]; ++}; ++ ++struct dt_gen_state { ++ size_t count; ++ int started; ++ uint32_t magic; ++ void *context; ++}; ++ ++extern int dt_gen_start_count; ++extern int dt_gen_finish_count; ++extern ucp_generic_dt_ops test_dt_uint32_ops; ++extern ucp_generic_dt_ops test_dt_uint32_err_ops; ++extern ucp_generic_dt_ops test_dt_uint8_ops; ++ ++} // ucp ++ ++#endif /* TEST_UCP_DATATYPE_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.cc +index 84ce786..c54ebd2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.cc +@@ -8,8 +8,13 @@ + #include + #include + #include ++#include + + ++namespace ucp { ++const uint32_t MAGIC = 0xd7d7d7d7U; ++} ++ + std::ostream& operator<<(std::ostream& os, const ucp_test_param& test_param) + { + std::vector::const_iterator iter; +@@ -26,7 +31,7 @@ std::ostream& operator<<(std::ostream& os, const ucp_test_param& test_param) + const ucp_datatype_t ucp_test::DATATYPE = ucp_dt_make_contig(1); + const ucp_datatype_t ucp_test::DATATYPE_IOV = ucp_dt_make_iov(); + +-ucp_test::ucp_test() { ++ucp_test::ucp_test() : m_err_handler_count(0) { + ucs_status_t status; + status = ucp_config_read(NULL, NULL, &m_ucp_config); + ASSERT_UCS_OK(status); +@@ -87,6 +92,20 @@ ucp_test_base::entity* ucp_test::create_entity(bool add_in_front, + return e; + } + ++ucp_test::entity* ucp_test::get_entity_by_ep(ucp_ep_h ep) { ++ ucs::ptr_vector::const_iterator e_it; ++ for (e_it = entities().begin(); e_it != entities().end(); ++e_it) { ++ for (int w_idx = 0; w_idx < (*e_it)->get_num_workers(); ++w_idx) { ++ for (int ep_idx = 0; ep_idx < (*e_it)->get_num_eps(w_idx); ++ep_idx) { ++ if (ep == (*e_it)->ep(w_idx, ep_idx)) { ++ return *e_it; ++ } ++ } ++ } ++ } ++ return NULL; ++} ++ + ucp_params_t ucp_test::get_ctx_params() { + ucp_params_t params; + memset(¶ms, 0, sizeof(params)); +@@ -114,6 +133,7 @@ unsigned ucp_test::progress(int worker_index) const { + iter != entities().end(); ++iter) + { + count += (*iter)->progress(worker_index); ++ sched_yield(); + } + return count; + } +@@ -139,9 +159,14 @@ void ucp_test::flush_worker(const entity &e, int worker_index) + + void ucp_test::disconnect(const entity& entity) { + for (int i = 0; i < entity.get_num_workers(); i++) { +- flush_worker(entity, i); ++ if (m_err_handler_count == 0) { ++ flush_worker(entity, i); ++ } ++ + for (int j = 0; j < entity.get_num_eps(i); j++) { +- void *dreq = entity.disconnect_nb(i, j); ++ void *dreq = entity.disconnect_nb(i, j, m_err_handler_count == 0 ? ++ UCP_EP_CLOSE_MODE_FLUSH : ++ UCP_EP_CLOSE_MODE_FORCE); + if (!UCS_PTR_IS_PTR(dreq)) { + ASSERT_UCS_OK(UCS_PTR_STATUS(dreq)); + } +@@ -156,6 +181,12 @@ void ucp_test::wait(void *req, int worker_index) + return; + } + ++ if (UCS_PTR_IS_ERR(req)) { ++ ucs_error("operation returned error: %s", ++ ucs_status_string(UCS_PTR_STATUS(req))); ++ return; ++ } ++ + ucs_status_t status; + do { + progress(worker_index); +@@ -175,6 +206,15 @@ void ucp_test::set_ucp_config(ucp_config_t *config) { + set_ucp_config(config, GetParam()); + } + ++int ucp_test::max_connections() { ++ std::vector::const_iterator end = GetParam().transports.end(); ++ if (std::find(GetParam().transports.begin(), end, "tcp") != end) { ++ return ucs::max_tcp_connections(); ++ } else { ++ return std::numeric_limits::max(); ++ } ++} ++ + std::vector + ucp_test::enum_test_params(const ucp_params_t& ctx_params, + const std::string& name, +@@ -228,6 +268,8 @@ void ucp_test::set_ucp_config(ucp_config_t *config, + std::stringstream ss; + ss << test_param; + ucp_config_modify(config, "TLS", ss.str().c_str()); ++ /* prevent configuration warnings in the UCP testing */ ++ ucp_config_modify(config, "WARN_INVALID_CONFIG", "no"); + } + + void ucp_test::modify_config(const std::string& name, const std::string& value, +@@ -283,13 +325,13 @@ bool ucp_test::check_test_param(const std::string& name, + UCS_TEST_CREATE_HANDLE(ucp_config_t*, config, ucp_config_release, + ucp_config_read, NULL, NULL); + set_ucp_config(config, test_param); ++ ucp_config_modify(config.get(), "WARN_INVARIANT_TSC", "n"); + + ucp_context_h ucph; + ucs_status_t status; + { +- hide_errors(); ++ scoped_log_handler slh(hide_errors_logger); + status = ucp_init(&test_param.ctx_params, config, &ucph); +- restore_errors(); + } + + bool result; +@@ -311,9 +353,11 @@ bool ucp_test::check_test_param(const std::string& name, + ucp_test_base::entity::entity(const ucp_test_param& test_param, + ucp_config_t* ucp_config, + const ucp_worker_params_t& worker_params) ++ : m_rejected_cntr(0) + { + ucp_test_param entity_param = test_param; + ucp_worker_params_t local_worker_params = worker_params; ++ int num_workers; + + if (test_param.thread_type == MULTI_THREAD_CONTEXT) { + num_workers = MT_TEST_NUM_THREADS; +@@ -334,8 +378,11 @@ ucp_test_base::entity::entity(const ucp_test_param& test_param, + + ucp_test::set_ucp_config(ucp_config, entity_param); + +- UCS_TEST_CREATE_HANDLE(ucp_context_h, m_ucph, ucp_cleanup, ucp_init, +- &entity_param.ctx_params, ucp_config); ++ { ++ scoped_log_handler slh(hide_errors_logger); ++ UCS_TEST_CREATE_HANDLE(ucp_context_h, m_ucph, ucp_cleanup, ucp_init, ++ &entity_param.ctx_params, ucp_config); ++ } + + m_workers.resize(num_workers); + for (int i = 0; i < num_workers; i++) { +@@ -351,38 +398,63 @@ ucp_test_base::entity::~entity() { + + void ucp_test_base::entity::connect(const entity* other, + const ucp_ep_params_t& ep_params, +- int ep_idx) { +- assert(num_workers == other->get_num_workers()); +- for (unsigned i = 0; i < unsigned(num_workers); i++) { ++ int ep_idx, int do_set_ep) { ++ assert(get_num_workers() == other->get_num_workers()); ++ for (unsigned i = 0; i < unsigned(get_num_workers()); i++) { + ucs_status_t status; + ucp_address_t *address; + size_t address_length; + ucp_ep_h ep; +- ucp_ep_params_t local_ep_params = ep_params; + + status = ucp_worker_get_address(other->worker(i), &address, &address_length); + ASSERT_UCS_OK(status); + +- ucp_test::hide_errors(); +- local_ep_params.field_mask |= UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- local_ep_params.address = address; ++ { ++ scoped_log_handler slh(hide_errors_logger); + +- status = ucp_ep_create(m_workers[i].first, &local_ep_params, &ep); +- ucp_test::restore_errors(); ++ ucp_ep_params_t local_ep_params = ep_params; ++ local_ep_params.field_mask |= UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ local_ep_params.address = address; ++ ++ status = ucp_ep_create(m_workers[i].first, &local_ep_params, &ep); ++ } + + if (status == UCS_ERR_UNREACHABLE) { + ucp_worker_release_address(other->worker(i), address); +- UCS_TEST_SKIP_R(m_errors.empty() ? "" : m_errors.back()); ++ UCS_TEST_SKIP_R(m_errors.empty() ? "Unreachable" : m_errors.back()); + } + +- ASSERT_UCS_OK(status); ++ ASSERT_UCS_OK(status, << " (" << m_errors.back() << ")"); + +- set_ep(ep, i, ep_idx); ++ if (do_set_ep) { ++ set_ep(ep, i, ep_idx); ++ } + + ucp_worker_release_address(other->worker(i), address); + } + } + ++ucp_ep_h ucp_test_base::entity::accept(ucp_worker_h worker, ++ ucp_conn_request_h conn_request) ++{ ++ ucp_ep_h ep; ++ ucp_ep_params_t ep_params; ++ ep_params.field_mask = UCP_EP_PARAM_FIELD_USER_DATA | ++ UCP_EP_PARAM_FIELD_CONN_REQUEST; ++ ep_params.user_data = (void *)0xdeadbeef; ++ ep_params.conn_request = conn_request; ++ ++ ucs_status_t status = ucp_ep_create(worker, &ep_params, &ep); ++ if (status == UCS_ERR_UNREACHABLE) { ++ UCS_TEST_SKIP_R("Skipping due an unreachable destination (unsupported " ++ "feature or no supported transport to send partial " ++ "worker address)"); ++ } ++ ASSERT_UCS_OK(status); ++ return ep; ++} ++ ++ + void* ucp_test_base::entity::modify_ep(const ucp_ep_params_t& ep_params, + int worker_idx, int ep_idx) { + return ucp_ep_modify_nb(ep(worker_idx, ep_idx), &ep_params); +@@ -402,12 +474,25 @@ void ucp_test_base::entity::set_ep(ucp_ep_h ep, int worker_index, int ep_index) + void ucp_test_base::entity::empty_send_completion(void *r, ucs_status_t status) { + } + +-void ucp_test_base::entity::accept_cb(ucp_ep_h ep, void *arg) { ++void ucp_test_base::entity::accept_ep_cb(ucp_ep_h ep, void *arg) { + entity *self = reinterpret_cast(arg); + int worker_index = 0; /* TODO pass worker index in arg */ + self->set_ep(ep, worker_index, self->get_num_eps(worker_index)); + } + ++void ucp_test_base::entity::accept_conn_cb(ucp_conn_request_h conn_req, void* arg) ++{ ++ entity *self = reinterpret_cast(arg); ++ self->m_conn_reqs.push(conn_req); ++} ++ ++void ucp_test_base::entity::reject_conn_cb(ucp_conn_request_h conn_req, void* arg) ++{ ++ entity *self = reinterpret_cast(arg); ++ ucp_listener_reject(self->m_listener, conn_req); ++ self->m_rejected_cntr++; ++} ++ + void* ucp_test_base::entity::flush_ep_nb(int worker_index, int ep_index) const { + return ucp_ep_flush_nb(ep(worker_index, ep_index), 0, empty_send_completion); + } +@@ -424,12 +509,13 @@ void ucp_test_base::entity::fence(int worker_index) const { + ASSERT_UCS_OK(status); + } + +-void* ucp_test_base::entity::disconnect_nb(int worker_index, int ep_index) const { ++void* ucp_test_base::entity::disconnect_nb(int worker_index, int ep_index, ++ enum ucp_ep_close_mode mode) const { + ucp_ep_h ep = revoke_ep(worker_index, ep_index); + if (ep == NULL) { + return NULL; + } +- return ucp_disconnect_nb(ep); ++ return ucp_ep_close_nb(ep, mode); + } + + void ucp_test_base::entity::destroy_worker(int worker_index) { +@@ -458,33 +544,59 @@ ucp_ep_h ucp_test_base::entity::revoke_ep(int worker_index, int ep_index) const + return ucp_ep; + } + +-ucs_status_t ucp_test_base::entity::listen(const struct sockaddr* saddr, ++ucs_status_t ucp_test_base::entity::listen(listen_cb_type_t cb_type, ++ const struct sockaddr* saddr, + socklen_t addrlen, int worker_index) + { + ucp_listener_params_t params; +- ucp_listener_h listener; +- +- params.field_mask = UCP_LISTENER_PARAM_FIELD_SOCK_ADDR | +- UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER; +- params.sockaddr.addr = saddr; +- params.sockaddr.addrlen = addrlen; +- params.accept_handler.cb = accept_cb; +- params.accept_handler.arg = reinterpret_cast(this); +- +- wrap_errors(); +- ucs_status_t status = ucp_listener_create(worker(worker_index), ¶ms, &listener); +- restore_errors(); ++ ucp_listener_h listener; ++ ++ params.field_mask = UCP_LISTENER_PARAM_FIELD_SOCK_ADDR; ++ params.sockaddr.addr = saddr; ++ params.sockaddr.addrlen = addrlen; ++ ++ switch (cb_type) { ++ case LISTEN_CB_EP: ++ params.field_mask |= UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER; ++ params.accept_handler.cb = accept_ep_cb; ++ params.accept_handler.arg = reinterpret_cast(this); ++ break; ++ case LISTEN_CB_CONN: ++ params.field_mask |= UCP_LISTENER_PARAM_FIELD_CONN_HANDLER; ++ params.conn_handler.cb = accept_conn_cb; ++ params.conn_handler.arg = reinterpret_cast(this); ++ break; ++ case LISTEN_CB_REJECT: ++ params.field_mask |= UCP_LISTENER_PARAM_FIELD_CONN_HANDLER; ++ params.conn_handler.cb = reject_conn_cb; ++ params.conn_handler.arg = reinterpret_cast(this); ++ break; ++ default: ++ UCS_TEST_ABORT("invalid test parameter"); ++ } ++ ++ ucs_status_t status; ++ { ++ scoped_log_handler wrap_err(wrap_errors_logger); ++ status = ucp_listener_create(worker(worker_index), ¶ms, &listener); ++ } ++ + if (status == UCS_OK) { + m_listener.reset(listener, ucp_listener_destroy); +- } else if (status != UCS_ERR_INVALID_ADDR) { +- /* throw error if status is not (UCS_OK or UCS_ERR_INVALID_ADDR) */ +- ASSERT_UCS_OK(status); ++ } else { ++ /* throw error if status is not (UCS_OK or UCS_ERR_UNREACHABLE). ++ * UCS_ERR_INVALID_PARAM may also return but then the test should fail */ ++ EXPECT_EQ(UCS_ERR_UNREACHABLE, status); + } + return status; + } + + ucp_worker_h ucp_test_base::entity::worker(int worker_index) const { +- return m_workers[worker_index].first; ++ if (worker_index < get_num_workers()) { ++ return m_workers[worker_index].first; ++ } else { ++ return NULL; ++ } + } + + ucp_context_h ucp_test_base::entity::ucph() const { +@@ -494,18 +606,40 @@ ucp_context_h ucp_test_base::entity::ucph() const { + unsigned ucp_test_base::entity::progress(int worker_index) + { + ucp_worker_h ucp_worker = worker(worker_index); +- return ucp_worker ? ucp_worker_progress(ucp_worker) : 0; ++ ++ if (ucp_worker == NULL) { ++ return 0; ++ } ++ ++ unsigned progress_count = 0; ++ if (!m_conn_reqs.empty()) { ++ ucp_conn_request_h conn_req = m_conn_reqs.back(); ++ m_conn_reqs.pop(); ++ ucp_ep_h ep = accept(ucp_worker, conn_req); ++ set_ep(ep, worker_index, std::numeric_limits::max()); ++ ++progress_count; ++ } ++ ++ return progress_count + ucp_worker_progress(ucp_worker); + } + + int ucp_test_base::entity::get_num_workers() const { +- ucs_assert(m_workers.size() == size_t(num_workers)); +- return num_workers; ++ return m_workers.size(); + } + + int ucp_test_base::entity::get_num_eps(int worker_index) const { + return m_workers[worker_index].second.size(); + } + ++size_t ucp_test_base::entity::get_rejected_cntr() const { ++ return m_rejected_cntr; ++} ++ ++void ucp_test_base::entity::inc_rejected_cntr() { ++ ++m_rejected_cntr; ++} ++ ++ + void ucp_test_base::entity::warn_existing_eps() const { + for (size_t worker_index = 0; worker_index < m_workers.size(); ++worker_index) { + for (size_t ep_index = 0; ep_index < m_workers[worker_index].second.size(); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.h +index 361176f..bf07578 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.h +@@ -16,9 +16,17 @@ + + #include + ++#include ++ + #define MT_TEST_NUM_THREADS 4 + #define UCP_TEST_TIMEOUT_IN_SEC 10.0 + ++ ++namespace ucp { ++extern const uint32_t MAGIC; ++} ++ ++ + struct ucp_test_param { + ucp_params_t ctx_params; + std::vector transports; +@@ -40,13 +48,21 @@ public: + ep_vec_t> > worker_vec_t; + + public: ++ typedef enum { ++ LISTEN_CB_EP, /* User's callback accepts ucp_ep_h */ ++ LISTEN_CB_CONN, /* User's callback accepts ucp_conn_request_h */ ++ LISTEN_CB_REJECT /* User's callback rejects ucp_conn_request_h */ ++ } listen_cb_type_t; ++ + entity(const ucp_test_param& test_param, ucp_config_t* ucp_config, + const ucp_worker_params_t& worker_params); + + ~entity(); + + void connect(const entity* other, const ucp_ep_params_t& ep_params, +- int ep_idx = 0); ++ int ep_idx = 0, int do_set_ep = 1); ++ ++ ucp_ep_h accept(ucp_worker_h worker, ucp_conn_request_h conn_request); + + void* modify_ep(const ucp_ep_params_t& ep_params, int worker_idx = 0, + int ep_idx = 0); +@@ -57,11 +73,13 @@ public: + + void fence(int worker_index = 0) const; + +- void* disconnect_nb(int worker_index = 0, int ep_index = 0) const; ++ void* disconnect_nb(int worker_index = 0, int ep_index = 0, ++ enum ucp_ep_close_mode mode = UCP_EP_CLOSE_MODE_FLUSH) const; + + void destroy_worker(int worker_index = 0); + +- ucs_status_t listen(const struct sockaddr *saddr, socklen_t addrlen, ++ ucs_status_t listen(listen_cb_type_t cb_type, ++ const struct sockaddr *saddr, socklen_t addrlen, + int worker_index = 0); + + ucp_ep_h ep(int worker_index = 0, int ep_index = 0) const; +@@ -78,6 +96,10 @@ public: + + int get_num_eps(int worker_index = 0) const; + ++ void inc_rejected_cntr(); ++ ++ size_t get_rejected_cntr() const; ++ + void warn_existing_eps() const; + + void cleanup(); +@@ -85,15 +107,17 @@ public: + static void ep_destructor(ucp_ep_h ep, entity *e); + + protected: +- ucs::handle m_ucph; +- worker_vec_t m_workers; +- ucs::handle m_listener; +- +- int num_workers; ++ ucs::handle m_ucph; ++ worker_vec_t m_workers; ++ ucs::handle m_listener; ++ std::queue m_conn_reqs; ++ size_t m_rejected_cntr; + + private: + static void empty_send_completion(void *r, ucs_status_t status); +- static void accept_cb(ucp_ep_h ep, void *arg); ++ static void accept_ep_cb(ucp_ep_h ep, void *arg); ++ static void accept_conn_cb(ucp_conn_request_h conn_req, void *arg); ++ static void reject_conn_cb(ucp_conn_request_h conn_req, void *arg); + + void set_ep(ucp_ep_h ep, int worker_index, int ep_index); + }; +@@ -150,6 +174,7 @@ protected: + virtual void cleanup(); + entity* create_entity(bool add_in_front = false); + entity* create_entity(bool add_in_front, const ucp_test_param& test_param); ++ entity* get_entity_by_ep(ucp_ep_h ep); + unsigned progress(int worker_index = 0) const; + void short_progress_loop(int worker_index = 0) const; + void flush_ep(const entity &e, int worker_index = 0, int ep_index = 0); +@@ -157,6 +182,12 @@ protected: + void disconnect(const entity& entity); + void wait(void *req, int worker_index = 0); + void set_ucp_config(ucp_config_t *config); ++ int max_connections(); ++ ++ static void err_handler_cb(void *arg, ucp_ep_h ep, ucs_status_t status) { ++ ucp_test *self = reinterpret_cast(arg); ++ self->m_err_handler_count++; ++ } + + template + void wait_for_flag(volatile T *flag, double timeout = 10.0) { +@@ -174,6 +205,7 @@ private: + const ucp_test_param& test_param); + + protected: ++ volatile int m_err_handler_count; + static const ucp_datatype_t DATATYPE; + static const ucp_datatype_t DATATYPE_IOV; + }; +@@ -181,7 +213,6 @@ protected: + + std::ostream& operator<<(std::ostream& os, const ucp_test_param& test_param); + +- + /** + * Instantiate the parameterized test case a combination of transports. + * +@@ -209,11 +240,9 @@ std::ostream& operator<<(std::ostream& os, const ucp_test_param& test_param); + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, udx, "ud_x") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, rc, "rc") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, rcx, "rc_x") \ +- UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, rcx_cm, "\\rc_mlx5,cm:aux") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, shm_ib, "shm,ib") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, ugni, "ugni") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, self, "self") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, tcp, "tcp") + +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_async.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_async.cc +index cb74fda..8dae204 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_async.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_async.cc +@@ -240,8 +240,10 @@ public: + UCS_TEST_BASE_IMPL; + + protected: +- static const int COUNT = 40; +- static const unsigned SLEEP_USEC = 1000; ++ static const int COUNT = 40; ++ static const unsigned SLEEP_USEC = 1000; ++ static const int TIMER_RETRIES = 100; ++ static const int TIMER_EXP_COUNT = COUNT / 4; + + void suspend(double scale = 1.0) { + ucs::safe_usleep(ucs_max(scale * SLEEP_USEC, 0) * +@@ -414,6 +416,28 @@ UCS_TEST_P(test_async, max_events, "ASYNC_MAX_EVENTS=4") { + ucs_async_context_cleanup(&async); + } + ++UCS_TEST_P(test_async, many_timers) { ++ ++ for (int count = 0; count < 4010; ++count) { ++ std::vector timers; ++ ucs_status_t status; ++ int timer_id; ++ ++ for (int count2 = 0; count2 < 250; ++count2) { ++ status = ucs_async_add_timer(GetParam(), ucs_time_from_sec(1.0), ++ (ucs_async_event_cb_t)ucs_empty_function, ++ NULL, NULL, &timer_id); ++ ASSERT_UCS_OK(status); ++ timers.push_back(timer_id); ++ } ++ ++ while (!timers.empty()) { ++ ucs_async_remove_handler(timers.back(), 0); ++ timers.pop_back(); ++ } ++ } ++} ++ + UCS_TEST_P(test_async, ctx_event) { + local_event le(GetParam()); + le.push_event(); +@@ -423,16 +447,29 @@ UCS_TEST_P(test_async, ctx_event) { + + UCS_TEST_P(test_async, ctx_timer) { + local_timer lt(GetParam()); +- suspend_and_poll(<, COUNT * 4); +- EXPECT_GE(lt.count(), COUNT / 4); ++ for (int i = 0; i < TIMER_RETRIES; ++i) { ++ suspend_and_poll(<, COUNT * 4); ++ if (lt.count() >= TIMER_EXP_COUNT) { ++ break; ++ } ++ UCS_TEST_MESSAGE << "retry " << (i + 1); ++ } ++ EXPECT_GE(lt.count(), int(TIMER_EXP_COUNT)); + } + + UCS_TEST_P(test_async, two_timers) { + local_timer lt1(GetParam()); + local_timer lt2(GetParam()); +- suspend_and_poll2(<1, <2, COUNT * 4); +- EXPECT_GE(lt1.count(), COUNT / 4); +- EXPECT_GE(lt2.count(), COUNT / 4); ++ for (int i = 0; i < TIMER_RETRIES; ++i) { ++ suspend_and_poll2(<1, <2, COUNT * 4); ++ if ((lt1.count() >= TIMER_EXP_COUNT) && ++ (lt2.count() >= TIMER_EXP_COUNT)) { ++ break; ++ } ++ UCS_TEST_MESSAGE << "retry " << (i + 1); ++ } ++ EXPECT_GE(lt1.count(), int(TIMER_EXP_COUNT)); ++ EXPECT_GE(lt2.count(), int(TIMER_EXP_COUNT)); + } + + UCS_TEST_P(test_async, ctx_event_block) { +@@ -484,13 +521,19 @@ UCS_TEST_P(test_async, ctx_event_block_two_miss) { + UCS_TEST_P(test_async, ctx_timer_block) { + local_timer lt(GetParam()); + +- lt.block(); +- int count = lt.count(); +- suspend_and_poll(<, COUNT); +- EXPECT_EQ(count, lt.count()); +- lt.unblock(); ++ for (int i = 0; i < TIMER_RETRIES; ++i) { ++ lt.block(); ++ int count = lt.count(); ++ suspend_and_poll(<, COUNT); ++ EXPECT_EQ(count, lt.count()); ++ lt.unblock(); + +- lt.check_miss(); ++ lt.check_miss(); ++ if (lt.count() >= 1) { ++ break; ++ } ++ UCS_TEST_MESSAGE << "retry " << (i + 1); ++ } + EXPECT_GE(lt.count(), 1); /* Timer could expire again after unblock */ + } + +@@ -523,6 +566,25 @@ UCS_TEST_P(test_async, modify_event) { + EXPECT_EQ(le.count(), count); + } + ++UCS_TEST_P(test_async, warn_block) { ++ { ++ scoped_log_handler slh(hide_warns_logger); ++ { ++ local_event le(GetParam()); ++ le.block(); ++ } ++ } ++ ++ int warn_count = m_warnings.size(); ++ for (int i = 0; i < warn_count; ++i) { ++ UCS_TEST_MESSAGE << "< " << m_warnings[i] << " >"; ++ } ++ ++ if (GetParam() != UCS_ASYNC_MODE_POLL) { ++ EXPECT_GE(warn_count, 1); ++ } ++} ++ + class local_timer_remove_handler : public local_timer { + public: + local_timer_remove_handler(ucs_async_mode_t mode) : local_timer(mode) { +@@ -649,20 +711,27 @@ UCS_TEST_P(test_async_event_mt, multithread) { + + for (unsigned i = 0; i < NUM_THREADS; ++i) { + int count = thread_count(i); +- EXPECT_GE(count, (int)(COUNT * 0.75)); ++ EXPECT_GE(count, (int)(COUNT * 0.4)); + } + } + UCS_TEST_P(test_async_timer_mt, multithread) { +- spawn(); +- +- suspend(2 * COUNT); +- +- stop(); +- +- for (unsigned i = 0; i < NUM_THREADS; ++i) { +- int count = thread_count(i); +- EXPECT_GE(count, (int)(COUNT * 0.10)); ++ const int exp_min_count = (int)(COUNT * 0.10); ++ int min_count = 0; ++ for (int r = 0; r < TIMER_RETRIES; ++r) { ++ spawn(); ++ suspend(2 * COUNT); ++ stop(); ++ ++ min_count = std::numeric_limits::max(); ++ for (unsigned i = 0; i < NUM_THREADS; ++i) { ++ int count = thread_count(i); ++ min_count = ucs_min(count, min_count); ++ } ++ if (min_count >= exp_min_count) { ++ break; ++ } + } ++ EXPECT_GE(min_count, exp_min_count); + } + + INSTANTIATE_TEST_CASE_P(signal, test_async, ::testing::Values(UCS_ASYNC_MODE_SIGNAL)); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_config.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_config.cc +index e94f1c1..9b30c95 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_config.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_config.cc +@@ -267,7 +267,7 @@ UCS_TEST_F(test_config, performance) { + } + + /* Now test the time */ +- UCS_TEST_TIME_LIMIT(0.005) { ++ UCS_TEST_TIME_LIMIT(0.05) { + car_opts opts(NULL, NULL); + } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_datatype.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_datatype.cc +index 5e4dd80..2b1652e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_datatype.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_datatype.cc +@@ -147,27 +147,17 @@ UCS_TEST_F(test_datatype, queue) { + + UCS_TEST_F(test_datatype, queue_iter) { + ++ const int num_elems = 4; + ucs_queue_head_t head; +- elem_t *elem1, *elem2, *elem3, *elem4; ++ std::vector elems(num_elems); + + ucs_queue_head_init(&head); + EXPECT_TRUE(ucs_queue_is_empty(&head)); + +- elem1 = (elem_t*)malloc(sizeof(elem_t)); +- elem2 = (elem_t*)malloc(sizeof(elem_t)); +- elem3 = (elem_t*)malloc(sizeof(elem_t)); +- elem4 = (elem_t*)malloc(sizeof(elem_t)); +- +- elem1->i = 1; +- elem2->i = 2; +- elem3->i = 3; +- elem4->i = 4; +- +- ucs_queue_push(&head, &elem1->queue); +- ucs_queue_push(&head, &elem2->queue); +- ucs_queue_push(&head, &elem3->queue); +- ucs_queue_push(&head, &elem4->queue); +- ++ for (int i = 0; i < num_elems; ++i) { ++ elems[i].i = i + 1; ++ ucs_queue_push(&head, &elems[i].queue); ++ } + + { + std::vector vec; +@@ -176,7 +166,7 @@ UCS_TEST_F(test_datatype, queue_iter) { + ucs_queue_for_each(elem, &head, queue) { + vec.push_back(elem->i); + } +- ASSERT_EQ(4u, vec.size()); ++ ASSERT_EQ(static_cast(num_elems), vec.size()); + EXPECT_EQ(1, vec[0]); + EXPECT_EQ(2, vec[1]); + EXPECT_EQ(3, vec[2]); +@@ -192,7 +182,7 @@ UCS_TEST_F(test_datatype, queue_iter) { + { + if (elem->i == 3 || elem->i == 4) { + ucs_queue_del_iter(&head, iter); +- free(elem); ++ memset(elem, 0xff, sizeof(*elem)); + } + } + ASSERT_EQ((unsigned long)2, ucs_queue_length(&head)); +@@ -200,7 +190,7 @@ UCS_TEST_F(test_datatype, queue_iter) { + ucs_queue_for_each_safe(elem, iter, &head, queue) { + vec.push_back(elem->i); + ucs_queue_del_iter(&head, iter); +- free(elem); ++ memset(elem, 0xff, sizeof(*elem)); + } + ASSERT_EQ(2u, vec.size()); + EXPECT_EQ(1, vec[0]); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_hash_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_hash_perf.cc +deleted file mode 100644 +index 49b0e76..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_hash_perf.cc ++++ /dev/null +@@ -1,297 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#include +- +-extern "C" { +-#include +-#include +-#include +-#include +-#include +-} +- +-#include +-#include +-#include +- +-typedef uint64_t key_type; +-typedef ucp_ep_t hash_type; +- +-#define MAX_COUNT 4194304 +-#define START_TIME ucs_time_t time = -ucs_get_time(); +-#define END_TIME (ucs_time_to_nsec(time + ucs_get_time()) / num_elem) +-#define FIELD_ALIGN(_x_) ":" << std::right << std::setw(_x_) +- +-static key_type keys[MAX_COUNT]; /* the keys array */ +- +-static void generate_keys() +-{ +- for (int i = 0; i < MAX_COUNT; ++i) { +- keys[i] = ucs_generate_uuid((key_type)keys); +- } +-} +- +-class perf_compare_base { +-public: +- virtual ~perf_compare_base() {}; +- +- ucs_time_t initialize(const size_t num_elem) { +- START_TIME +- init_storage(); +- for (size_t i = 0; i < num_elem; ++i) { +- add_elem(keys[i]); +- } +- return (ucs_time_t)END_TIME; +- } +- +- ucs_time_t lookup(const size_t num_elem) const { +- START_TIME +- for (size_t i = 0; i < num_elem; ++i) { +- hash_type *ep = find_elem(keys[i]); +- EXPECT_TRUE(ep->dest_uuid == keys[i]); +- } +- return (ucs_time_t)END_TIME; +- } +- +- ucs_time_t cleanup(const size_t num_elem) { +- START_TIME +- del_elems(); +- return (ucs_time_t)END_TIME; +- } +- +- virtual void init_storage() = 0; +- virtual void add_elem(const uint64_t key) = 0; +- virtual hash_type *find_elem(const uint64_t key) const = 0; +- virtual void del_elems() = 0; +- virtual const char *get_name() const = 0; +- +- template +- _type_to_alloc *create_element(const uint64_t key) const { +- _type_to_alloc *ep = (_type_to_alloc *) ucs_malloc(sizeof(_type_to_alloc), get_name()); +- EXPECT_TRUE(ep); +- ep->dest_uuid = key; +- return ep; +- } +-}; +- +-class perf_compare_map : public perf_compare_base { +-public: +- const char *get_name() const { +- return "map"; +- } +- +- void init_storage() {} +- +- void add_elem(const uint64_t key) { +- obj[key] = create_element(key); +- } +- +- hash_type *find_elem(const uint64_t key) const { +- std::map::const_iterator ep_found = obj.find(key); +- EXPECT_TRUE(ep_found != obj.end()); +- return ep_found->second; +- } +- +- void del_elems() { +- for (std::map::const_iterator it = obj.begin(); +- it != obj.end(); ++it) { +- hash_type *ep = it->second; +- free(ep); +- } +- obj.clear(); +- } +- +- std::map obj; +-}; +- +-class perf_compare_unordered_map : public perf_compare_base { +-public: +- const char *get_name() const { +- return "unmap"; +- } +- +- void init_storage() {} +- +- void add_elem(const uint64_t key) { +- obj[key] = create_element(key); +- } +- +- hash_type *find_elem(const uint64_t key) const { +- std::tr1::unordered_map::const_iterator ep_found = obj.find(key); +- EXPECT_TRUE(ep_found != obj.end()); +- return ep_found->second; +- } +- +- void del_elems() { +- for (std::tr1::unordered_map::const_iterator it = obj.begin(); +- it != obj.end(); ++it) { +- hash_type *ep = it->second; +- free(ep); +- } +- obj.clear(); +- } +- +- std::tr1::unordered_map obj; +-}; +- +-class perf_compare_khash : public perf_compare_base { +-public: +- const char *get_name() const { +- return "khash"; +- } +- +- KHASH_MAP_INIT_INT64(khash_ep_hash, hash_type *); +- +- void init_storage() { +- kh_init_inplace(khash_ep_hash, &obj); +- } +- +- void add_elem(const uint64_t key) { +- int hash_extra_status = 0; +- +- khiter_t hash_it = kh_put(khash_ep_hash, &obj, key, &hash_extra_status); +- EXPECT_TRUE(hash_it != kh_end(&obj)); +- kh_value(&obj, hash_it) = create_element(key); +- } +- +- hash_type *find_elem(const uint64_t key) const { +- khiter_t ep_found = kh_get(khash_ep_hash, &obj, key); +- EXPECT_TRUE(ep_found != kh_end(&obj)); +- return kh_value(&obj, ep_found); +- } +- +- void del_elems() { +- for (khiter_t it = kh_begin(obj); it != kh_end(&obj); ++it) { +- if (!kh_exist(&obj, it)) { +- continue; +- } +- hash_type *ep = kh_value(&obj, it); +- free(ep); +- } +- kh_destroy_inplace(khash_ep_hash, &obj); +- } +- +- khash_t(khash_ep_hash) obj; +-}; +- +-#define SGLIB_HASH_SIZE 32767 +-#define test_sglib_compare(_ep1, _ep2) ((int64_t)(_ep1)->dest_uuid - (int64_t)(_ep2)->dest_uuid) +-#define test_sglib_hash(_ep) ((_ep)->dest_uuid) +- +-struct sglib_hash_type : public hash_type { +- sglib_hash_type *next; +-}; +- +-SGLIB_DEFINE_LIST_PROTOTYPES(sglib_hash_type, test_sglib_compare, next); +-SGLIB_DEFINE_LIST_FUNCTIONS(sglib_hash_type, test_sglib_compare, next); +-SGLIB_DEFINE_HASHED_CONTAINER_PROTOTYPES(sglib_hash_type, SGLIB_HASH_SIZE, test_sglib_hash); +-SGLIB_DEFINE_HASHED_CONTAINER_FUNCTIONS(sglib_hash_type, SGLIB_HASH_SIZE, test_sglib_hash); +- +-class perf_compare_sglib : public perf_compare_base { +-public: +- const char *get_name() const { +- return "sglib"; +- } +- +- void init_storage() { +- obj = (sglib_hash_type **) ucs_malloc(sizeof(*obj) * SGLIB_HASH_SIZE, "sglib_hash"); +- sglib_hashed_sglib_hash_type_init(obj); +- } +- +- void add_elem(const uint64_t key) { +- sglib_hash_type *ep = create_element(key); +- sglib_hashed_sglib_hash_type_add(obj, ep); +- } +- +- hash_type *find_elem(const uint64_t key) const { +- sglib_hash_type ep, *ep_found = 0; +- ep.dest_uuid = key; +- ep_found = sglib_hashed_sglib_hash_type_find_member(obj, &ep); +- EXPECT_TRUE(ep_found); +- return ep_found; +- } +- +- void del_elems() { +- struct sglib_hashed_sglib_hash_type_iterator it; +- for (sglib_hash_type *local_it = sglib_hashed_sglib_hash_type_it_init(&it, obj); +- local_it != NULL; +- local_it = sglib_hashed_sglib_hash_type_it_next(&it)) { +- sglib_hashed_sglib_hash_type_delete(obj, local_it); +- free(local_it); +- } +- free(obj); +- } +- +- sglib_hash_type **obj; +-}; +- +-class test_hash_perf : public ucs::test { +-protected: +- void check_lookup_perf(perf_compare_base* hash, size_t num_elems); +-}; +- +-void test_hash_perf::check_lookup_perf(perf_compare_base* hash, size_t num_elems) { +- const ucs_time_t MAX_LOOKUP_NS_1024 = 400; +- for (int i = 0; i < (ucs::perf_retry_count + 1); ++i) { +- ucs_time_t lookup_ns = hash->lookup(num_elems); +- if (!ucs::perf_retry_count) { +- UCS_TEST_MESSAGE << "not validating performance"; +- return; /* Skip */ +- } else if (lookup_ns < MAX_LOOKUP_NS_1024) { +- return; /* Success */ +- } else { +- ucs::safe_sleep(ucs::perf_retry_interval); +- } +- } +- ADD_FAILURE() << hash->get_name() << " bad lookup performance"; +-} +- +-UCS_TEST_F(test_hash_perf, perf_compare) { +- +- size_t trip_counts[] = {1, 2, 8, 128, 1024, 32768, 262144, 1048576, 0}; +- +- if (ucs::test_time_multiplier() > 1) { +- UCS_TEST_SKIP_R("Long run expected. Skipped."); +- } +- perf_compare_base *perf_compare_khash_ptr = new perf_compare_khash; +- perf_compare_base *perf_compare_sglib_ptr = new perf_compare_sglib; +- perf_compare_base *hashes[] = { +- perf_compare_khash_ptr, +- perf_compare_sglib_ptr, +- new perf_compare_map, +- new perf_compare_unordered_map, +- NULL +- }; +- +- generate_keys(); +- +- UCS_TEST_MESSAGE << ": elements :init :lookup:remove"; +- for (int i = 0; hashes[i] != NULL; ++i) { +- perf_compare_base *cur_hash = hashes[i]; +- for (int j = 0; trip_counts[j] > 0; ++j) { +- size_t num_elems = trip_counts[j]; +- +- ucs_time_t insert_ns = cur_hash->initialize(num_elems); +- ucs_time_t lookup_ns = cur_hash->lookup(num_elems); +- +- if ((1024 == num_elems) && +- ((cur_hash == perf_compare_khash_ptr) || +- (cur_hash == perf_compare_sglib_ptr))) +- { +- check_lookup_perf(cur_hash, num_elems); +- } +- +- ucs_time_t remove_ns = cur_hash->cleanup(num_elems); +- +- UCS_TEST_MESSAGE << FIELD_ALIGN(6) << cur_hash->get_name() +- << FIELD_ALIGN(8) << num_elems +- << FIELD_ALIGN(6) << insert_ns +- << FIELD_ALIGN(6) << lookup_ns +- << FIELD_ALIGN(6) << remove_ns; +- } +- delete cur_hash; +- } +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_log.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_log.cc +index 3778019..89ca330 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_log.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_log.cc +@@ -41,6 +41,7 @@ public: + + virtual void cleanup() { + ucs_log_cleanup(); ++ m_num_log_handlers_before = 0; + pop_config(); + check_log_file(); + unlink(logfile); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_math.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_math.cc +index b39feab..16cc44a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_math.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_math.cc +@@ -54,17 +54,26 @@ UCS_TEST_F(test_math, circular_compare) { + } + + UCS_TEST_F(test_math, bitops) { +- EXPECT_EQ((unsigned)0, ucs_ffs64(0xfffff)); +- EXPECT_EQ((unsigned)16, ucs_ffs64(0xf0000)); +- EXPECT_EQ((unsigned)1, ucs_ffs64(0x4002)); +- EXPECT_EQ((unsigned)41, ucs_ffs64(1ull<<41)); +- +- EXPECT_EQ((unsigned)0, ucs_ilog2(1)); +- EXPECT_EQ((unsigned)2, ucs_ilog2(4)); +- EXPECT_EQ((unsigned)2, ucs_ilog2(5)); +- EXPECT_EQ((unsigned)2, ucs_ilog2(7)); +- EXPECT_EQ((unsigned)14, ucs_ilog2(17000)); +- EXPECT_EQ((unsigned)40, ucs_ilog2(1ull<<40)); ++ EXPECT_EQ(0u, ucs_ffs64(0xfffff)); ++ EXPECT_EQ(16u, ucs_ffs64(0xf0000)); ++ EXPECT_EQ(1u, ucs_ffs64(0x4002)); ++ EXPECT_EQ(41u, ucs_ffs64(1ull<<41)); ++ ++ EXPECT_EQ(0u, ucs_ilog2(1)); ++ EXPECT_EQ(2u, ucs_ilog2(4)); ++ EXPECT_EQ(2u, ucs_ilog2(5)); ++ EXPECT_EQ(2u, ucs_ilog2(7)); ++ EXPECT_EQ(14u, ucs_ilog2(17000)); ++ EXPECT_EQ(40u, ucs_ilog2(1ull<<40)); ++ ++ EXPECT_EQ(0, ucs_popcount(0)); ++ EXPECT_EQ(2, ucs_popcount(5)); ++ EXPECT_EQ(16, ucs_popcount(0xffff)); ++ EXPECT_EQ(48, ucs_popcount(0xffffffffffffUL)); ++ ++ EXPECT_EQ(0, ucs_count_trailing_zero_bits(1)); ++ EXPECT_EQ(28, ucs_count_trailing_zero_bits(0x10000000)); ++ EXPECT_EQ(32, ucs_count_trailing_zero_bits(0x100000000UL)); + } + + #define TEST_ATOMIC_ADD(_bitsize) \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtrack.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtrack.cc +index 6978e08..830890f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtrack.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtrack.cc +@@ -147,7 +147,7 @@ UCS_TEST_F(test_memtrack, sysv) { + size = ALLOC_SIZE; + + status = ucs_sysv_alloc(&size, std::numeric_limits::max(), &ptr, 0, +- &shmid, ALLOC_NAME); ++ ALLOC_NAME, &shmid); + ASSERT_UCS_OK(status); + ASSERT_NE((void *)NULL, ptr); + +@@ -188,16 +188,13 @@ UCS_TEST_F(test_memtrack, mmap) { + + UCS_TEST_F(test_memtrack, custom) { + void *ptr, *initial_ptr; +- size_t size; + +- size = ucs_memtrack_adjust_alloc_size(ALLOC_SIZE); +- initial_ptr = ptr = malloc(size); +- ucs_memtrack_allocated(&ptr, &size, ALLOC_NAME); ++ initial_ptr = ptr = malloc(ALLOC_SIZE); ++ ucs_memtrack_allocated(ptr, ALLOC_SIZE, ALLOC_NAME); + +- EXPECT_EQ(size_t(ALLOC_SIZE), size); +- memset(ptr, 0, size); ++ memset(ptr, 0, ALLOC_SIZE); + +- ucs_memtrack_releasing(&ptr); ++ ucs_memtrack_releasing(ptr); + ASSERT_EQ(initial_ptr, ptr); + free(ptr); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtype_cache.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtype_cache.cc +new file mode 100644 +index 0000000..32602b9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtype_cache.cc +@@ -0,0 +1,80 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++#if HAVE_CUDA ++#include ++#include ++#endif ++extern "C" { ++#include ++} ++ ++ ++class test_memtype_cache : public ucs::test { ++protected: ++ ++ virtual void init() { ++ ucs_status_t status; ++ ++ ucs::test::init(); ++ status = ucs_memtype_cache_create(&m_memtype_cache); ++ ASSERT_UCS_OK(status); ++ } ++ ++ virtual void cleanup() { ++ ucs_memtype_cache_destroy(m_memtype_cache); ++ ucs::test::cleanup(); ++ } ++ ++ ucs_memtype_cache_t *m_memtype_cache; ++}; ++ ++#if HAVE_CUDA ++UCS_TEST_F(test_memtype_cache, basic_cuda) { ++ cudaError_t cerr; ++ void *ptr; ++ ucm_mem_type_t ucm_mem_type; ++ ucs_status_t status; ++ ++ /* set cuda device */ ++ if (cudaSetDevice(0) != cudaSuccess) { ++ UCS_TEST_SKIP_R("can't set cuda device"); ++ } ++ ++ cerr = cudaMalloc(&ptr, 64); ++ EXPECT_EQ(cerr, cudaSuccess); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 64, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 32, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, (void *)((uintptr_t)ptr + 1), 7, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 1, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, (void *)((uintptr_t) ptr + 63), 1, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 0, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 65, &ucm_mem_type); ++ EXPECT_TRUE(status == UCS_ERR_NO_ELEM); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, (void *)((uintptr_t) ptr + 64), 1, &ucm_mem_type); ++ EXPECT_TRUE(status == UCS_ERR_NO_ELEM); ++ ++ cerr = cudaFree(ptr); ++ EXPECT_EQ(cerr, cudaSuccess); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 64, &ucm_mem_type); ++ EXPECT_TRUE(status == UCS_ERR_NO_ELEM); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 1, &ucm_mem_type); ++ EXPECT_TRUE(status == UCS_ERR_NO_ELEM); ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_pgtable.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_pgtable.cc +index 16895bd..3444e29 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_pgtable.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_pgtable.cc +@@ -258,6 +258,17 @@ UCS_TEST_F(test_pgtable, nonexist_remove) { + remove(®ion2); + } + ++UCS_TEST_F(test_pgtable, search_large_region) { ++ ucs_pgt_region_t region = {0x3c03cb00, 0x3c03f600}; ++ insert(®ion, UCS_OK); ++ ++ search_result_t result = search(0x36990000, 0x3c810000); ++ EXPECT_EQ(1u, result.size()); ++ EXPECT_EQ(®ion, result.front()); ++ ++ remove(®ion); ++} ++ + class test_pgtable_perf : public test_pgtable { + protected: + +@@ -279,9 +290,10 @@ protected: + return NULL; + } else { + ucs_pgt_region_t *region = *iter; +- ucs_assertv(address < region->end, +- "address=0x%lx region 0x%lx..0x%lx", address, +- region->start, region->end); ++ EXPECT_LT(address, region->end) << std::hex << "address=" ++ << address << " region " ++ << region->start << ".." ++ << region->end << std::dec; + return (address >= region->start) ? region : NULL; + } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_profile.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_profile.cc +index db41b86..11b9b9c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_profile.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_profile.cc +@@ -7,7 +7,8 @@ + #include + extern "C" { + #include +-#include ++#include ++#include + } + + #include +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_rcache.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_rcache.cc +index ff2bd3c..ffacc9c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_rcache.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_rcache.cc +@@ -8,8 +8,11 @@ + extern "C" { + #include + #include ++#include + #include ++#include + #include ++#include + } + + +@@ -36,12 +39,13 @@ protected: + sizeof(region), + UCS_PGT_ADDR_ALIGN, + ucs_get_page_size(), ++ UCM_EVENT_VM_UNMAPPED, + 1000, + &ops, + reinterpret_cast(this) + }; + UCS_TEST_CREATE_HANDLE(ucs_rcache_t*, m_rcache, ucs_rcache_destroy, +- ucs_rcache_create, ¶ms, "test", NULL); ++ ucs_rcache_create, ¶ms, "test", ucs_stats_get_root()); + } + + virtual void cleanup() { +@@ -133,7 +137,8 @@ protected: + private: + + static ucs_status_t mem_reg_cb(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *r) ++ void *arg, ucs_rcache_region_t *r, ++ uint16_t rcache_mem_reg_flags) + { + return reinterpret_cast(context)->mem_reg( + ucs_derived_of(r, struct region)); +@@ -602,3 +607,166 @@ UCS_MT_TEST_F(test_rcache_no_register, merge_invalid_prot_slow, 5) + + munmap(mem, size1+size2); + } ++ ++#if ENABLE_STATS ++class test_rcache_stats : public test_rcache { ++protected: ++ ++ virtual void init() { ++ ucs_stats_cleanup(); ++ push_config(); ++ modify_config("STATS_DEST", "file:/dev/null"); ++ modify_config("STATS_TRIGGER", "exit"); ++ ucs_stats_init(); ++ ASSERT_TRUE(ucs_stats_is_active()); ++ test_rcache::init(); ++ } ++ ++ virtual void cleanup() { ++ test_rcache::cleanup(); ++ ucs_stats_cleanup(); ++ pop_config(); ++ ucs_stats_init(); ++ } ++ ++ int get_counter(int stat) { ++ return (int)UCS_STATS_GET_COUNTER(m_rcache.get()->stats, stat); ++ } ++ ++ /* a helper function for stats tests debugging */ ++ void dump_stats() { ++ printf("gets %d hf %d hs %d misses %d merges %d unmaps %d" ++ " unmaps_inv %d puts %d regs %d deregs %d\n", ++ get_counter(UCS_RCACHE_GETS), ++ get_counter(UCS_RCACHE_HITS_FAST), ++ get_counter(UCS_RCACHE_HITS_SLOW), ++ get_counter(UCS_RCACHE_MISSES), ++ get_counter(UCS_RCACHE_MERGES), ++ get_counter(UCS_RCACHE_UNMAPS), ++ get_counter(UCS_RCACHE_UNMAP_INVALIDATES), ++ get_counter(UCS_RCACHE_PUTS), ++ get_counter(UCS_RCACHE_REGS), ++ get_counter(UCS_RCACHE_DEREGS)); ++ } ++}; ++ ++UCS_TEST_F(test_rcache_stats, basic) { ++ static const size_t size = 4096; ++ void *ptr = malloc(size); ++ region *r1, *r2; ++ ++ r1 = get(ptr, size); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_MISSES)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_REGS)); ++ ++ r2 = get(ptr, size); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_HITS_FAST)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_MISSES)); ++ ++ put(r1); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_PUTS)); ++ ++ put(r2); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_PUTS)); ++ ++ free(ptr); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_PUTS)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_DEREGS)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_UNMAPS)); ++} ++ ++UCS_TEST_F(test_rcache_stats, unmap_dereg) { ++ static const size_t size1 = 1024 * 1024; ++ void *mem = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ region *r1; ++ ++ r1 = get(mem, size1); ++ put(r1); ++ ++ /* Should generate umap event but no dereg or unmap invalidation. ++ * We can have more unmap events if releasing the region structure triggers ++ * releasing memory back to the OS. ++ */ ++ munmap(mem, size1); ++ EXPECT_GE(get_counter(UCS_RCACHE_UNMAPS), 1); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_UNMAP_INVALIDATES)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_DEREGS)); ++ ++ mem = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ ++ /* ++ * Adding a new region shall force a processing of invalidation queue and dereg ++ */ ++ r1 = get(mem, size1); ++ EXPECT_GE(get_counter(UCS_RCACHE_UNMAPS), 1); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_UNMAP_INVALIDATES)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_DEREGS)); ++ ++ /* cleanup */ ++ put(r1); ++ munmap(mem, size1); ++} ++ ++UCS_TEST_F(test_rcache_stats, merge) { ++ static const size_t size1 = 1024 * 1024; ++ void *mem = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ region *r1, *r2; ++ ++ r1 = get(mem, 8192); ++ /* should trigger merge of the two regions */ ++ r2 = get((char *)mem + 4096, 8192); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_MERGES)); ++ ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_MISSES)); ++ ++ put(r1); ++ put(r2); ++ munmap(mem, size1); ++} ++ ++UCS_TEST_F(test_rcache_stats, hits_slow) { ++ static const size_t size1 = 1024 * 1024; ++ region *r1, *r2; ++ void *mem1, *mem2; ++ ++ mem1 = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ r1 = get(mem1, size1); ++ put(r1); ++ ++ mem2 = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ r1 = get(mem2, size1); ++ ++ /* generate unmap event */ ++ munmap(mem1, size1); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_UNMAPS)); ++ ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_PUTS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_MISSES)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_UNMAP_INVALIDATES)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_DEREGS)); ++ /* it should produce a slow hit because there is ++ * a pending unmap event ++ */ ++ r2 = get(mem2, size1); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_HITS_SLOW)); ++ ++ EXPECT_EQ(3, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_PUTS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_MISSES)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_UNMAPS)); ++ /* unmap event processed */ ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_UNMAP_INVALIDATES)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_DEREGS)); ++ ++ put(r1); ++ put(r2); ++ munmap(mem2, size1); ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats.cc +index a8a6f44..d29dfa0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats.cc +@@ -57,7 +57,7 @@ public: + void prepare_nodes(ucs_stats_node_t **cat_node, + ucs_stats_node_t *data_nodes[NUM_DATA_NODES]) { + static ucs_stats_class_t category_stats_class = { +- "category", 0, {} ++ "category", 0 + }; + + ucs_status_t status = UCS_STATS_NODE_ALLOC(cat_node, +@@ -149,7 +149,6 @@ public: + + void read_and_check_stats(ucs_stats_node_t *data_nodes[NUM_DATA_NODES]) { + ucs_list_link_t *list = ucs_stats_server_get_stats(m_server); +- ucs_assert(1ul == ucs_list_length(list)); + ASSERT_EQ(1ul, ucs_list_length(list)); + check_tree(ucs_list_head(list, ucs_stats_node_t, list), data_nodes); + ucs_stats_server_purge_stats(m_server); +@@ -258,7 +257,7 @@ UCS_TEST_F(stats_on_demand_test, null_root) { + ucs_stats_node_t *cat_node; + + static ucs_stats_class_t category_stats_class = { +- "category", 0, {} ++ "category", 0 + }; + ucs_status_t status = UCS_STATS_NODE_ALLOC(&cat_node, &category_stats_class, + NULL); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats_filter.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats_filter.cc +index 6a5b21c..9dcfa20 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats_filter.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats_filter.cc +@@ -7,6 +7,7 @@ + #include + extern "C" { + #include ++#include + #include + } + +@@ -44,6 +45,7 @@ public: + modify_config("STATS_DEST", stats_dest_config().c_str()); + modify_config("STATS_TRIGGER", stats_trigger_config().c_str()); + modify_config("STATS_FORMAT", stats_format_config().c_str()); ++ modify_config("WARN_INVARIANT_TSC", "n"); + ucs_stats_init(); + ASSERT_TRUE(ucs_stats_is_active()); + } +@@ -61,7 +63,7 @@ public: + + void prepare_nodes() { + static ucs_stats_class_t category_stats_class = { +- "category", 0, {} ++ "category", 0 + }; + + ucs_status_t status = UCS_STATS_NODE_ALLOC(&cat_node, &category_stats_class, +@@ -192,8 +194,10 @@ UCS_TEST_F(stats_filter_report, report) { + } + } + +- std::string compared_string = std::string(ucs_get_host_name()) + ":" + +- ucs::to_string(getpid()) + ":" + ++ std::string header = std::string(ucs_get_host_name()) + ":" + ++ ucs::to_string(getpid()); ++ ++ std::string compared_string = header.substr(0, UCS_STAT_NAME_MAX - 1) + ":" + + "\n category:\n" + + " data-0:\n" + + " counter0: 10\n" + +@@ -234,8 +238,11 @@ UCS_TEST_F(stats_filter_agg, report_agg) { + } + } + +- std::string compared_string = std::string(ucs_get_host_name()) + ":" + +- ucs::to_string(getpid()) + ":" + ++ std::string header = std::string(ucs_get_host_name()) + ":" + ++ ucs::to_string(getpid()); ++ ++ std::string compared_string = header.substr(0, UCS_STAT_NAME_MAX - 1) + ++ ":" + + "\n category:\n" + " data*:\n" + " counter0: 30\n" +@@ -264,8 +271,11 @@ UCS_TEST_F(stats_filter_summary, summary) { + break; + } + } +- std::string compared_string = std::string(ucs_get_host_name()) + ":" + +- ucs::to_string(getpid()) + ++ ++ std::string node_name = std::string(ucs_get_host_name()) + ":" + ++ ucs::to_string(getpid()); ++ node_name.resize(std::min(node_name.length(), UCS_STAT_NAME_MAX - 1)); ++ std::string compared_string = node_name + + ":data*:{counter0:30 counter1:60 " + + "counter2:90 counter3:120} \n"; + EXPECT_EQ(compared_string, output); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_strided_alloc.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_strided_alloc.cc +new file mode 100644 +index 0000000..e309b5a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_strided_alloc.cc +@@ -0,0 +1,63 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include ++extern "C" { ++#include ++} ++ ++#include ++#include ++#include ++ ++class test_strided_alloc : public ucs::test { ++protected: ++ static const size_t area_size = 64; ++ static const unsigned num_areas = 3; ++}; ++ ++ ++UCS_TEST_F(test_strided_alloc, basic) { ++ ++ ucs_strided_alloc_t sa; ++ ++ ucs_strided_alloc_init(&sa, area_size, num_areas); ++ ++ std::vector objs; ++ for (size_t i = 0; i < 2; ++i) { ++ /* allocate */ ++ void *base = ucs_strided_alloc_get(&sa, "test"); ++ ++ for (unsigned j = 0; j < num_areas; ++j) { ++ void *area = ucs_strided_elem_get(base, 0, j); ++ memset(area, i*j, area_size); ++ } ++ ++ /* save in a vector */ ++ objs.push_back(base); ++ } ++ ++ /* check data integrity */ ++ char buf[area_size]; ++ for (size_t i = 0; i < objs.size(); ++i) { ++ void *base = objs[i]; ++ ++ for (unsigned j = 0; j < num_areas; ++j) { ++ void *area = ucs_strided_elem_get(base, 0, j); ++ memset(buf, i*j, area_size); ++ EXPECT_EQ(0, memcmp(area, buf, area_size)); ++ } ++ } ++ ++ /* release */ ++ while (!objs.empty()) { ++ void *base = objs.back(); ++ objs.pop_back(); ++ ucs_strided_alloc_put(&sa, base); ++ } ++ ++ ucs_strided_alloc_cleanup(&sa); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_cq_moderation.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_cq_moderation.cc +index a3826e5..4aee357 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_cq_moderation.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_cq_moderation.cc +@@ -117,7 +117,7 @@ void test_uct_cq_moderation::run_test(uct_iface_h iface) { + check_caps(UCT_IFACE_FLAG_EVENT_SEND_COMP); + check_caps(UCT_IFACE_FLAG_EVENT_RECV); + +- uct_iface_set_am_handler(m_receiver->iface(), 0, am_cb, this, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_receiver->iface(), 0, am_cb, this, 0); + + connect(); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_dc.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_dc.cc +index 442c593..cb105da 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_dc.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_dc.cc +@@ -22,7 +22,7 @@ extern "C" { + _UCT_INSTANTIATE_TEST_CASE(_test_case, dc_mlx5) + + +-class test_dc : public uct_test { ++class test_dc : public test_rc { + public: + virtual void init() { + uct_test::init(); +@@ -33,10 +33,8 @@ public: + m_e2 = uct_test::create_entity(0); + m_entities.push_back(m_e2); + +- uct_iface_set_am_handler(m_e1->iface(), 0, am_dummy_handler, +- NULL, UCT_CB_FLAG_SYNC); +- uct_iface_set_am_handler(m_e2->iface(), 0, am_dummy_handler, +- NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e1->iface(), 0, am_dummy_handler, NULL, 0); ++ uct_iface_set_am_handler(m_e2->iface(), 0, am_dummy_handler, NULL, 0); + } + + static uct_dc_iface_t* dc_iface(entity *e) { +@@ -73,7 +71,6 @@ public: + } + + protected: +- entity *m_e1, *m_e2; + + struct dcs_comp { + uct_completion_t uct_comp; +@@ -85,7 +82,7 @@ protected: + struct dcs_comp *comp = (struct dcs_comp *)uct_comp; + uct_dc_ep_t *ep; + +- ASSERT_UCS_OK(status); ++ EXPECT_UCS_OK(status); + + ep = dc_ep(comp->e, 0); + /* dci must be released before completion cb is called */ +@@ -304,9 +301,9 @@ UCS_TEST_P(test_dc, dcs_ep_flush_pending) { + preq.is_done = 0; + preq.e = m_e1; + preq.uct_req.func = uct_pending_flush; +- status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req); ++ status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req, 0); + EXPECT_UCS_OK(status); +- ++ + /* progress till ep is flushed */ + do { + progress(); +@@ -319,6 +316,48 @@ UCS_TEST_P(test_dc, dcs_ep_flush_pending) { + EXPECT_EQ(0, iface->tx.stack_top); + } + ++/* Check that the following sequnce works ok: ++ * - Add some pending request to DCI wait queue ++ * - Try to send something from this ep. This will force ep to take free DCI ++ * (the send will not succeed anyway) ++ * - Progress all pendings ++ * - Make sure that there is no any assertion and everyting is ok ++ * (just send something). ++ * */ ++UCS_TEST_P(test_dc, dcs_ep_am_pending) { ++ ++ ucs_status_t status; ++ uct_dc_iface_t *iface; ++ ++ m_e1->connect_to_iface(0, *m_e2); ++ m_e1->connect_to_iface(1, *m_e2); ++ ++ /* use all iface resources */ ++ iface = dc_iface(m_e1); ++ iface->super.tx.cq_available = 8; ++ do { ++ status = uct_ep_am_short(m_e1->ep(1), 0, 0, NULL, 0); ++ } while (status == UCS_OK); ++ ++ EXPECT_EQ(UCS_ERR_NO_RESOURCE, status); ++ ++ /* put AM op on pending */ ++ preq.e = m_e1; ++ preq.uct_req.func = uct_pending_flush; ++ status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req, 0); ++ EXPECT_UCS_OK(status); ++ ++ status = uct_ep_am_short(m_e1->ep(0), 0, 0, NULL, 0); ++ EXPECT_EQ(UCS_ERR_NO_RESOURCE, status); ++ ++ flush(); ++ ++ status = uct_ep_am_short(m_e1->ep(0), 0, 0, NULL, 0); ++ EXPECT_EQ(UCS_OK, status); ++ ++ flush(); ++} ++ + /* check that ep does not hold dci after + * purge + */ +@@ -350,7 +389,7 @@ UCS_TEST_P(test_dc, dcs_ep_purge_pending) { + preq.is_done = 0; + preq.e = m_e1; + preq.uct_req.func = uct_pending_dummy; +- status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req); ++ status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req, 0); + EXPECT_UCS_OK(status); + + do { +@@ -364,6 +403,10 @@ UCS_TEST_P(test_dc, dcs_ep_purge_pending) { + EXPECT_EQ(0, iface->tx.stack_top); + } + ++UCS_TEST_P(test_dc, stress_iface_ops) { ++ test_iface_ops(); ++} ++ + UCT_DC_INSTANTIATE_TEST_CASE(test_dc) + + +@@ -418,7 +461,7 @@ UCS_TEST_P(test_dc_flow_control, fc_disabled_pending_no_dci) { + get_fc_ptr(m_e1, ep_index)->fc_wnd = 0; + + /* Add to pending */ +- status = uct_ep_pending_add(m_e1->ep(ep_index), &pending_req.uct); ++ status = uct_ep_pending_add(m_e1->ep(ep_index), &pending_req.uct, 0); + ASSERT_UCS_OK(status); + + wait_for_flag(&pending_req.cb_count); +@@ -448,10 +491,13 @@ UCS_TEST_P(test_dc_flow_control, soft_request) + EXPECT_EQ(get_fc_ptr(m_e1)->fc_wnd, s_thresh - 1); + } + +-/* Check that flush returns UCS_OK even if there is an outgoing grant request */ ++/* Check that: ++ * 1) flush returns UCS_OK even if there is an outgoing grant request ++ * 2) No crash when grant for destroyed ep arrives */ + UCS_TEST_P(test_dc_flow_control, flush_destroy) + { + int wnd = 5; ++ ucs_status_t status; + + disable_entity(m_e2); + +@@ -461,11 +507,24 @@ UCS_TEST_P(test_dc_flow_control, flush_destroy) + + send_am_and_flush(m_e1, wnd); + +- EXPECT_UCS_OK(uct_ep_flush(m_e1->ep(0), 0, NULL)); ++ /* At this point m_e1 sent grant request to m_e2, m_e2 received all ++ * messages and added grant to m_e1 to pending queue ++ * (because it does not have tx resources yet) */ ++ ++ /* Invoke flush in a loop, because some send completions may not be polled yet */ ++ ucs_time_t timeout = ucs_get_time() + ucs_time_from_sec(DEFAULT_TIMEOUT_SEC); ++ do { ++ short_progress_loop(); ++ status = uct_ep_flush(m_e1->ep(0), 0, NULL); ++ } while (((status == UCS_ERR_NO_RESOURCE) || (status == UCS_INPROGRESS)) && ++ (ucs_get_time() < timeout)); ++ ASSERT_UCS_OK(status); ++ + m_e1->destroy_eps(); + +- /* Enable send capabilities of m_e2 and send AM message +- * to force pending queue dispatch */ ++ /* Enable send capabilities of m_e2 and send AM message to force pending queue ++ * dispatch. Thus, pending grant will be sent to m_e1. There should not be ++ * any warning/error and/or crash. */ + enable_entity(m_e2); + set_tx_moderation(m_e2, 0); + send_am_and_flush(m_e2, 1); +@@ -486,7 +545,7 @@ UCS_TEST_P(test_dc_flow_control, dci_leak) + uct_pending_req_t req; + req.func = reinterpret_cast + (ucs_empty_function_return_no_resource); +- EXPECT_UCS_OK(uct_ep_pending_add(m_e1->ep(0), &req)); ++ EXPECT_UCS_OK(uct_ep_pending_add(m_e1->ep(0), &req, 0)); + + /* Make sure that ep does not hold dci when sends completed */ + uct_dc_iface_t *iface = ucs_derived_of(m_e1->iface(), uct_dc_iface_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib.cc +index f2df45f..7066a74 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib.cc +@@ -13,6 +13,7 @@ extern "C" { + #include + #include + #include ++#include + } + + +@@ -80,18 +81,35 @@ public: + } + + #if HAVE_DECL_IBV_LINK_LAYER_ETHERNET +- void test_eth_port(struct ibv_port_attr port_attr, struct ibv_context *ibctx, +- unsigned port_num, uct_ib_iface_config_t *ib_config, ++ void test_eth_port(struct ibv_device *device, struct ibv_port_attr port_attr, ++ struct ibv_context *ibctx, unsigned port_num, + ib_port_desc_t *port_desc) { + + union ibv_gid gid; ++ uct_ib_md_config_t *md_config = ucs_derived_of(m_md_config, uct_ib_md_config_t); ++ char md_name[UCT_MD_NAME_MAX]; ++ uct_md_h uct_md; ++ uct_ib_md_t *ib_md; ++ ucs_status_t status; ++ uint8_t gid_index; + + /* no pkeys for Ethernet */ + port_desc->have_pkey = 0; + ++ uct_ib_make_md_name(md_name, device); ++ ++ status = uct_ib_md_open(md_name, m_md_config, &uct_md); ++ ASSERT_UCS_OK(status); ++ ++ ib_md = ucs_derived_of(uct_md, uct_ib_md_t); ++ status = uct_ib_device_select_gid_index(&ib_md->dev, ++ port_num, md_config->ext.gid_index, ++ &gid_index); ++ ASSERT_UCS_OK(status); ++ + /* check the gid index */ +- if (ibv_query_gid(ibctx, port_num, ib_config->gid_index, &gid) != 0) { +- UCS_TEST_ABORT("Failed to query gid (index=" << ib_config->gid_index << ")"); ++ if (ibv_query_gid(ibctx, port_num, gid_index, &gid) != 0) { ++ UCS_TEST_ABORT("Failed to query gid (index=" << gid_index << ")"); + } + if (uct_ib_device_is_gid_raw_empty(gid.raw)) { + port_desc->have_valid_gid_idx = 0; +@@ -99,6 +117,7 @@ public: + port_desc->have_valid_gid_idx = 1; + } + ++ uct_ib_md_close(uct_md); + } + #endif + +@@ -113,7 +132,6 @@ public: + struct ibv_device **device_list; + struct ibv_context *ibctx = NULL; + struct ibv_port_attr port_attr; +- uct_ib_iface_config_t *ib_config = ucs_derived_of(m_iface_config, uct_ib_iface_config_t); + int num_devices, i, found = 0; + + /* get device list */ +@@ -147,7 +165,7 @@ public: + lmc_find(port_attr, port_desc); + + if (IBV_PORT_IS_LINK_LAYER_ETHERNET(&port_attr)) { +- test_eth_port(port_attr, ibctx, port_num, ib_config, port_desc); ++ test_eth_port(device_list[i], port_attr, ibctx, port_num, port_desc); + goto out; + } + +@@ -179,25 +197,28 @@ out: + free(dev_name); + } + +- void test_address_pack(uct_ib_address_type_t scope, uint64_t subnet_prefix) { ++ void test_address_pack(uint64_t subnet_prefix) { ++ uct_ib_iface_t *iface = ucs_derived_of(m_e1->iface(), uct_ib_iface_t); + static const uint16_t lid_in = 0x1ee7; + union ibv_gid gid_in, gid_out; + uct_ib_address_t *ib_addr; + uint16_t lid_out; +- uint8_t is_global; + +- ib_addr = (uct_ib_address_t*)malloc(uct_ib_address_size(scope)); ++ ib_addr = (uct_ib_address_t*)malloc(uct_ib_address_size(iface)); + + gid_in.global.subnet_prefix = subnet_prefix; + gid_in.global.interface_id = 0xdeadbeef; +- uct_ib_address_pack(ib_device(m_e1), scope, &gid_in, lid_in, ib_addr); ++ uct_ib_address_pack(iface, &gid_in, lid_in, ib_addr); + +- uct_ib_address_unpack(ib_addr, &lid_out, &is_global, &gid_out); ++ uct_ib_address_unpack(ib_addr, &lid_out, &gid_out); + +- EXPECT_EQ((scope != UCT_IB_ADDRESS_TYPE_LINK_LOCAL), is_global); +- EXPECT_EQ(lid_in, lid_out); ++ if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface))) { ++ EXPECT_TRUE(iface->is_global_addr); ++ } else { ++ EXPECT_EQ(lid_in, lid_out); ++ } + +- if (is_global) { ++ if (iface->is_global_addr) { + EXPECT_EQ(gid_in.global.subnet_prefix, gid_out.global.subnet_prefix); + EXPECT_EQ(gid_in.global.interface_id, gid_out.global.interface_id); + } +@@ -217,7 +238,7 @@ out: + recv_buffer->length = 0; /* Initialize length to 0 */ + + /* set a callback for the uct to invoke for receiving the data */ +- uct_iface_set_am_handler(m_e2->iface(), 0, ib_am_handler , recv_buffer, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e2->iface(), 0, ib_am_handler , recv_buffer, 0); + + /* send the data */ + uct_ep_am_short(m_e1->ep(0), 0, test_ib_hdr, &send_data, sizeof(send_data)); +@@ -281,7 +302,7 @@ UCS_TEST_P(test_uct_ib, non_default_lmc, "IB_LID_PATH_BITS=1") + } + + #if HAVE_DECL_IBV_LINK_LAYER_ETHERNET +-UCS_TEST_P(test_uct_ib, non_default_gid_idx, "IB_GID_INDEX=1") ++UCS_TEST_P(test_uct_ib, non_default_gid_idx, "GID_INDEX=1") + { + ib_port_desc_t *port_desc; + +@@ -303,9 +324,9 @@ UCS_TEST_P(test_uct_ib, non_default_gid_idx, "IB_GID_INDEX=1") + + UCS_TEST_P(test_uct_ib, address_pack) { + initialize(); +- test_address_pack(UCT_IB_ADDRESS_TYPE_LINK_LOCAL, UCT_IB_LINK_LOCAL_PREFIX); +- test_address_pack(UCT_IB_ADDRESS_TYPE_SITE_LOCAL, UCT_IB_SITE_LOCAL_PREFIX | htobe64(0x7200)); +- test_address_pack(UCT_IB_ADDRESS_TYPE_GLOBAL, 0xdeadfeedbeefa880ul); ++ test_address_pack(UCT_IB_LINK_LOCAL_PREFIX); ++ test_address_pack(UCT_IB_SITE_LOCAL_PREFIX | htobe64(0x7200)); ++ test_address_pack(0xdeadfeedbeefa880ul); + } + + +@@ -344,7 +365,7 @@ public: + + /* set a callback for the uct to invoke for receiving the data */ + uct_iface_set_am_handler(m_e1->iface(), 0, ib_am_handler, m_buf1->ptr(), +- UCT_CB_FLAG_SYNC); ++ 0); + + test_uct_event_ib::bcopy_pack_count = 0; + } +@@ -377,12 +398,12 @@ public: + + void check_send_cq(uct_iface_t *iface, size_t val) { + uct_ib_iface_t *ib_iface = ucs_derived_of(iface, uct_ib_iface_t); +- struct ibv_cq *send_cq = ib_iface->send_cq; ++ struct ibv_cq *send_cq = ib_iface->cq[UCT_IB_DIR_TX]; + + if (val != send_cq->comp_events_completed) { + uint32_t completed_evt = send_cq->comp_events_completed; + /* need this call to acknowledge the completion to prevent iface dtor hung*/ +- ibv_ack_cq_events(ib_iface->send_cq, 1); ++ ibv_ack_cq_events(ib_iface->cq[UCT_IB_DIR_TX], 1); + UCS_TEST_ABORT("send_cq->comp_events_completed have to be 1 but the value " + << completed_evt); + } +@@ -390,12 +411,12 @@ public: + + void check_recv_cq(uct_iface_t *iface, size_t val) { + uct_ib_iface_t *ib_iface = ucs_derived_of(iface, uct_ib_iface_t); +- struct ibv_cq *recv_cq = ib_iface->recv_cq; ++ struct ibv_cq *recv_cq = ib_iface->cq[UCT_IB_DIR_RX]; + + if (val != recv_cq->comp_events_completed) { + uint32_t completed_evt = recv_cq->comp_events_completed; + /* need this call to acknowledge the completion to prevent iface dtor hung*/ +- ibv_ack_cq_events(ib_iface->recv_cq, 1); ++ ibv_ack_cq_events(ib_iface->cq[UCT_IB_DIR_RX], 1); + UCS_TEST_ABORT("recv_cq->comp_events_completed have to be 1 but the value " + << completed_evt); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_md.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_md.cc +index 901443f..6a8105c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_md.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_md.cc +@@ -5,18 +5,20 @@ + * See file LICENSE for terms. + */ + +-extern "C" { + #include + #include + #include +-} ++ + #include + #include + + class test_ib_md : public test_md + { + protected: +- void ib_md_umr_check(void *rkey_buffer, bool amo_access); ++ void ib_md_umr_check(void *rkey_buffer, ++ bool amo_access, ++ size_t size = 8192); ++ bool has_ksm() const; + }; + + +@@ -25,15 +27,29 @@ protected: + * UCT_MD_MEM_ACCESS_REMOTE_ATOMIC is not set + */ + +-void test_ib_md::ib_md_umr_check(void *rkey_buffer, bool amo_access) { +- ++void test_ib_md::ib_md_umr_check(void *rkey_buffer, ++ bool amo_access, ++ size_t size) ++{ + ucs_status_t status; +- size_t size = 8192; +- void *buffer = malloc(size); +- ASSERT_TRUE(buffer != NULL); ++ size_t alloc_size; ++ void *buffer; ++ ++ if (ucs_get_phys_mem_size() < size * 8) { ++ UCS_TEST_SKIP_R("not enough physical memory"); ++ } ++ if (ucs_get_memfree_size() < size * 4) { ++ UCS_TEST_SKIP_R("not enough free memory"); ++ } ++ ++ buffer = NULL; ++ alloc_size = size; ++ status = ucs_mmap_alloc(&alloc_size, &buffer, 0 ++ UCS_MEMTRACK_NAME("test_umr")); ++ ASSERT_UCS_OK(status); + + uct_mem_h memh; +- status = uct_md_mem_reg(pd(), buffer, size, ++ status = uct_md_mem_reg(md(), buffer, size, + amo_access ? UCT_MD_MEM_ACCESS_REMOTE_ATOMIC : + UCT_MD_MEM_ACCESS_RMA, + &memh); +@@ -41,7 +57,7 @@ void test_ib_md::ib_md_umr_check(void *rkey_buffer, bool amo_access) { + ASSERT_TRUE(memh != UCT_MEM_HANDLE_NULL); + + uct_ib_mem_t *ib_memh = (uct_ib_mem_t *)memh; +- uct_ib_md_t *ib_md = (uct_ib_md_t *)pd(); ++ uct_ib_md_t *ib_md = (uct_ib_md_t *)md(); + + if (amo_access) { + EXPECT_TRUE(ib_memh->flags & UCT_IB_MEM_ACCESS_REMOTE_ATOMIC); +@@ -51,7 +67,7 @@ void test_ib_md::ib_md_umr_check(void *rkey_buffer, bool amo_access) { + EXPECT_FALSE(ib_memh->flags & UCT_IB_MEM_FLAG_ATOMIC_MR); + } + +- status = uct_md_mkey_pack(pd(), memh, rkey_buffer); ++ status = uct_md_mkey_pack(md(), memh, rkey_buffer); + EXPECT_UCS_OK(status); + + if (amo_access) { +@@ -67,50 +83,56 @@ void test_ib_md::ib_md_umr_check(void *rkey_buffer, bool amo_access) { + EXPECT_TRUE(ib_memh->atomic_mr == NULL); + } + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + EXPECT_UCS_OK(status); +- free(buffer); +-} + +-UCS_TEST_P(test_ib_md, ib_md_umr_rcache, "REG_METHODS=rcache") { ++ ucs_mmap_free(buffer, alloc_size); ++} + +- ucs_status_t status; +- uct_md_attr_t md_attr; +- void *rkey_buffer; ++bool test_ib_md::has_ksm() const { ++#ifdef HAVE_EXP_UMR_KSM ++ return ucs_derived_of(md(), uct_ib_md_t)->dev.dev_attr.exp_device_cap_flags & ++ IBV_EXP_DEVICE_UMR_FIXED_SIZE; ++#else ++ return false; ++#endif ++} + +- status = uct_md_query(pd(), &md_attr); +- ASSERT_UCS_OK(status); +- rkey_buffer = malloc(md_attr.rkey_packed_size); +- ASSERT_TRUE(rkey_buffer != NULL); ++UCS_TEST_P(test_ib_md, ib_md_umr_rcache, "REG_METHODS=rcache") { ++ std::string rkey_buffer(md_attr().rkey_packed_size, '\0'); + + /* The order is important here because + * of registration cache. A cached region will + * be promoted to atomic access but it will never be demoted + */ +- ib_md_umr_check(rkey_buffer, false); +- ib_md_umr_check(rkey_buffer, true); +- +- free(rkey_buffer); ++ ib_md_umr_check(&rkey_buffer[0], false); ++ ib_md_umr_check(&rkey_buffer[0], true); + } + + UCS_TEST_P(test_ib_md, ib_md_umr_direct, "REG_METHODS=direct") { ++ std::string rkey_buffer(md_attr().rkey_packed_size, '\0'); + +- ucs_status_t status; +- uct_md_attr_t md_attr; +- void *rkey_buffer; ++ /* without rcache the order is not really important */ ++ ib_md_umr_check(&rkey_buffer[0], true); ++ ib_md_umr_check(&rkey_buffer[0], false); ++ ib_md_umr_check(&rkey_buffer[0], true); ++ ib_md_umr_check(&rkey_buffer[0], false); ++} + +- status = uct_md_query(pd(), &md_attr); +- ASSERT_UCS_OK(status); +- rkey_buffer = malloc(md_attr.rkey_packed_size); +- ASSERT_TRUE(rkey_buffer != NULL); ++UCS_TEST_P(test_ib_md, ib_md_umr_ksm) { ++ std::string rkey_buffer(md_attr().rkey_packed_size, '\0'); ++ ib_md_umr_check(&rkey_buffer[0], has_ksm(), UCT_IB_MD_MAX_MR_SIZE + 0x1000); ++} + +- /* without rcache the order is not really important */ +- ib_md_umr_check(rkey_buffer, true); +- ib_md_umr_check(rkey_buffer, false); +- ib_md_umr_check(rkey_buffer, true); +- ib_md_umr_check(rkey_buffer, false); ++#if HAVE_UMR_KSM ++UCS_TEST_P(test_ib_md, umr_noninline_klm, "MAX_INLINE_KLM_LIST=1") { + +- free(rkey_buffer); ++ /* KLM list size would be 2, and setting MAX_INLINE_KLM_LIST=1 would force ++ * using non-inline UMR post_send. ++ */ ++ std::string rkey_buffer(md_attr().rkey_packed_size, '\0'); ++ ib_md_umr_check(&rkey_buffer[0], has_ksm(), UCT_IB_MD_MAX_MR_SIZE + 0x1000); + } ++#endif + + _UCT_MD_INSTANTIATE_TEST_CASE(test_ib_md, ib) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_xfer.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_xfer.cc +index 510094e..c592b87 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_xfer.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_xfer.cc +@@ -72,7 +72,7 @@ UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_rma_test_alloc_methods) + class uct_p2p_mix_test_alloc_methods : public uct_p2p_mix_test {}; + + UCS_TEST_P(uct_p2p_mix_test_alloc_methods, mix1000_odp, +- "REG_METHODS=odp,direct") ++ "REG_METHODS=odp,direct", "DM_COUNT?=0") + { + run(1000); + } +@@ -85,3 +85,14 @@ UCS_TEST_P(uct_p2p_mix_test_alloc_methods, mix1000_rcache, + + UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_mix_test_alloc_methods) + ++ ++class uct_p2p_mix_test_indirect_atomic : public uct_p2p_mix_test {}; ++ ++UCS_TEST_P(uct_p2p_mix_test_indirect_atomic, mix1000_indirect_atomic, ++ "INDIRECT_ATOMIC=n") ++{ ++ run(1000); ++} ++ ++UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_mix_test_indirect_atomic) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.cc +index 552dcfb..8b336e7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.cc +@@ -31,12 +31,59 @@ void test_rc::connect() + m_e1->connect(0, *m_e2, 0); + m_e2->connect(0, *m_e1, 0); + +- uct_iface_set_am_handler(m_e1->iface(), 0, am_dummy_handler, +- NULL, UCT_CB_FLAG_SYNC); +- uct_iface_set_am_handler(m_e2->iface(), 0, am_dummy_handler, +- NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e1->iface(), 0, am_dummy_handler, NULL, 0); ++ uct_iface_set_am_handler(m_e2->iface(), 0, am_dummy_handler, NULL, 0); + } + ++// Check that iface tx ops buffer and flush comp memory pool are moderated ++// properly when we have communication ops + lots of flushes ++void test_rc::test_iface_ops() ++{ ++ check_caps(UCT_IFACE_FLAG_PUT_ZCOPY); ++ int cq_len = 16; ++ ++ if (UCS_OK != uct_config_modify(m_iface_config, "RC_TX_CQ_LEN", ++ ucs::to_string(cq_len).c_str())) { ++ UCS_TEST_ABORT("Error: cannot enable random DCI policy"); ++ } ++ ++ entity *e = uct_test::create_entity(0); ++ m_entities.push_back(e); ++ e->connect(0, *m_e2, 0); ++ ++ mapped_buffer sendbuf(1024, 0ul, *e); ++ mapped_buffer recvbuf(1024, 0ul, *m_e2); ++ uct_completion_t comp; ++ comp.count = cq_len * 512; // some big value to avoid func invocation ++ comp.func = NULL; ++ ++ UCS_TEST_GET_BUFFER_IOV(iov, iovcnt, sendbuf.ptr(), sendbuf.length(), ++ sendbuf.memh(), ++ m_e1->iface_attr().cap.am.max_iov); ++ // For _x transports several CQEs can be consumed per WQE, post less put zcopy ++ // ops, so that flush would be sucessfull (otherwise flush will return ++ // NO_RESOURCES and completion will not be added for it). ++ for (int i = 0; i < cq_len / 3; i++) { ++ ASSERT_UCS_OK_OR_INPROGRESS(uct_ep_put_zcopy(e->ep(0), iov, iovcnt, ++ recvbuf.addr(), ++ recvbuf.rkey(), &comp)); ++ ++ // Create some stress on iface (flush mp): ++ // post 10 flushes per every put. ++ for (int j = 0; j < 10; j++) { ++ ASSERT_UCS_OK_OR_INPROGRESS(uct_ep_flush(e->ep(0), 0, &comp)); ++ } ++ } ++ ++ flush(); ++} ++ ++UCS_TEST_P(test_rc, stress_iface_ops) { ++ test_iface_ops(); ++} ++ ++UCT_RC_INSTANTIATE_TEST_CASE(test_rc) ++ + + class test_rc_max_wr : public test_rc { + protected: +@@ -80,10 +127,8 @@ void test_rc_flow_control::init() + ucs_assert(rc_iface(m_e1)->config.fc_enabled); + ucs_assert(rc_iface(m_e2)->config.fc_enabled); + +- uct_iface_set_am_handler(m_e1->iface(), FLUSH_AM_ID, am_handler, +- NULL, UCT_CB_FLAG_SYNC); +- uct_iface_set_am_handler(m_e2->iface(), FLUSH_AM_ID, am_handler, +- NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e1->iface(), FLUSH_AM_ID, am_handler, NULL, 0); ++ uct_iface_set_am_handler(m_e2->iface(), FLUSH_AM_ID, am_handler, NULL, 0); + + } + +@@ -192,7 +237,7 @@ void test_rc_flow_control::test_pending_purge(int wnd, int num_pend_sends) + for (int i = 0; i < num_pend_sends; i++) { + reqs[i].uct.func = NULL; /* make valgrind happy */ + reqs[i].purge_count = 0; +- EXPECT_EQ(uct_ep_pending_add(m_e2->ep(0), &reqs[i].uct), UCS_OK); ++ EXPECT_EQ(uct_ep_pending_add(m_e2->ep(0), &reqs[i].uct, 0), UCS_OK); + } + uct_ep_pending_purge(m_e2->ep(0), purge_cb, NULL); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.h +index d443703..c5cd271 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.h +@@ -41,6 +41,8 @@ public: + uct_test::short_progress_loop(delta_ms); + } + ++ void test_iface_ops(); ++ + static ucs_status_t am_dummy_handler(void *arg, void *data, size_t length, + unsigned flags) { + return UCS_OK; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_sockaddr.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_sockaddr.cc +index f015287..3470fd6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_sockaddr.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_sockaddr.cc +@@ -13,41 +13,71 @@ extern "C" { + #include + } + ++#include ++ + class test_uct_sockaddr : public uct_test { + public: ++ struct completion : public uct_completion_t { ++ volatile bool m_flag; ++ ++ completion() : m_flag(false), m_status(UCS_INPROGRESS) { ++ count = 1; ++ func = completion_cb; ++ } ++ ++ ucs_status_t status() const { ++ return m_status; ++ } ++ private: ++ static void completion_cb(uct_completion_t *self, ucs_status_t status) ++ { ++ completion *c = static_cast(self); ++ c->m_status = status; ++ c->m_flag = true; ++ } ++ ++ ucs_status_t m_status; ++ }; ++ ++ test_uct_sockaddr() : server(NULL), client(NULL), err_count(0), ++ server_recv_req(0), delay_conn_reply(false) { ++ memset(&listen_sock_addr, 0, sizeof(listen_sock_addr)); ++ memset(&connect_sock_addr, 0, sizeof(connect_sock_addr)); ++ } ++ + void init() { + uct_test::init(); + + uct_iface_params server_params, client_params; +- struct sockaddr_in *addr_in; ++ struct sockaddr_in *listen_addr_in, *connect_addr_in; + + /* If we reached here, the interface is active, as it was tested at the + * resource creation */ +- if (!ucs::is_inet_addr((struct sockaddr *)&(GetParam()->if_addr))) { ++ if (!ucs::is_inet_addr((struct sockaddr *)&(GetParam()->connect_if_addr))) { + UCS_TEST_SKIP_R("There is no IP on the interface"); + } + +- /* If rdmacm is tested, make sure that this is an IPoIB or RoCE interface */ +- if (!strcmp(GetParam()->md_name.c_str(), "rdmacm") && +- (!ucs::is_ib_netdev(GetParam()->dev_name.c_str()))) { +- UCS_TEST_SKIP_R("rdmacm - not an IPoIB or RoCE interface"); +- } +- + /* This address is accessible, as it was tested at the resource creation */ +- sock_addr.addr = (struct sockaddr *)&(GetParam()->if_addr); +- ASSERT_TRUE(sock_addr.addr != NULL); ++ listen_sock_addr.addr = (struct sockaddr *)&(GetParam()->listen_if_addr); ++ ASSERT_TRUE(listen_sock_addr.addr != NULL); + +- addr_in = (struct sockaddr_in *) (sock_addr.addr); ++ listen_addr_in = (struct sockaddr_in *) (listen_sock_addr.addr); + + /* Get a usable port on the host */ +- addr_in->sin_port = ucs::get_port(); ++ listen_addr_in->sin_port = ucs::get_port(); ++ ++ connect_sock_addr.addr = (struct sockaddr *)&(GetParam()->connect_if_addr); ++ ASSERT_TRUE(connect_sock_addr.addr != NULL); ++ connect_addr_in = (struct sockaddr_in *)connect_sock_addr.addr; ++ connect_addr_in->sin_port = listen_addr_in->sin_port; + + /* open iface for the server side */ + memset(&server_params, 0, sizeof(server_params)); + server_params.open_mode = UCT_IFACE_OPEN_MODE_SOCKADDR_SERVER; + server_params.err_handler = err_handler; + server_params.err_handler_arg = reinterpret_cast(this); +- server_params.mode.sockaddr.listen_sockaddr = sock_addr; ++ server_params.err_handler_flags = 0; ++ server_params.mode.sockaddr.listen_sockaddr = listen_sock_addr; + server_params.mode.sockaddr.cb_flags = UCT_CB_FLAG_ASYNC; + server_params.mode.sockaddr.conn_request_cb = conn_request_cb; + server_params.mode.sockaddr.conn_request_arg = reinterpret_cast(this); +@@ -60,13 +90,18 @@ public: + client_params.open_mode = UCT_IFACE_OPEN_MODE_SOCKADDR_CLIENT; + client_params.err_handler = err_handler; + client_params.err_handler_arg = reinterpret_cast(this); ++ client_params.err_handler_flags = 0; + + client = uct_test::create_entity(client_params); + m_entities.push_back(client); ++ ++ /* initiate the client's private data callback argument */ ++ client->client_cb_arg = server->iface_attr().max_conn_priv; + } + +- static ucs_status_t conn_request_cb(void *arg, const void *conn_priv_data, +- size_t length) ++ static void conn_request_cb(uct_iface_h iface, void *arg, ++ uct_conn_request_h conn_request, ++ const void *conn_priv_data, size_t length) + { + test_uct_sockaddr *self = reinterpret_cast(arg); + +@@ -74,9 +109,13 @@ public: + (uct_test::entity::client_priv_data.c_str())), + std::string(reinterpret_cast(conn_priv_data))); + +- EXPECT_EQ(uct_test::entity::client_priv_data.length(), length); ++ EXPECT_EQ(1 + uct_test::entity::client_priv_data.length(), length); ++ if (self->delay_conn_reply) { ++ self->delayed_conn_reqs.push(conn_request); ++ } else { ++ uct_iface_accept(iface, conn_request); ++ } + self->server_recv_req++; +- return UCS_OK; + } + + static ucs_status_t err_handler(void *arg, uct_ep_h ep, ucs_status_t status) +@@ -88,21 +127,22 @@ public: + + protected: + entity *server, *client; +- ucs_sock_addr_t sock_addr; ++ ucs_sock_addr_t listen_sock_addr, connect_sock_addr; + volatile int err_count, server_recv_req; ++ std::queue delayed_conn_reqs; ++ bool delay_conn_reply; + }; + + UCS_TEST_P(test_uct_sockaddr, connect_client_to_server) + { +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + +- server_recv_req = 0; +- err_count = 0; +- client->connect(0, *server, 0); ++ client->connect(0, *server, 0, &connect_sock_addr); + + /* wait for the server to connect */ + while (server_recv_req == 0) { +- sched_yield(); ++ progress(); + } + ASSERT_TRUE(server_recv_req == 1); + /* since the transport may support a graceful exit in case of an error, +@@ -115,11 +155,64 @@ UCS_TEST_P(test_uct_sockaddr, connect_client_to_server) + * test ends and the client's ep was destroyed */ + } + ++UCS_TEST_P(test_uct_sockaddr, connect_client_to_server_with_delay) ++{ ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); ++ delay_conn_reply = true; ++ client->connect(0, *server, 0, &connect_sock_addr); ++ ++ /* wait for the server to connect */ ++ while (server_recv_req == 0) { ++ progress(); ++ } ++ ASSERT_EQ(1, server_recv_req); ++ ASSERT_EQ(1ul, delayed_conn_reqs.size()); ++ EXPECT_EQ(0, err_count); ++ while (!delayed_conn_reqs.empty()) { ++ uct_iface_accept(server->iface(), delayed_conn_reqs.front()); ++ delayed_conn_reqs.pop(); ++ } ++ ++ completion comp; ++ ucs_status_t status = uct_ep_flush(client->ep(0), 0, &comp); ++ if (status == UCS_INPROGRESS) { ++ wait_for_flag(&comp.m_flag); ++ EXPECT_EQ(UCS_OK, comp.status()); ++ } else { ++ EXPECT_EQ(UCS_OK, status); ++ } ++ EXPECT_EQ(0, err_count); ++} ++ ++UCS_TEST_P(test_uct_sockaddr, connect_client_to_server_reject_with_delay) ++{ ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); ++ delay_conn_reply = true; ++ client->connect(0, *server, 0, &connect_sock_addr); ++ ++ /* wait for the server to connect */ ++ while (server_recv_req == 0) { ++ progress(); ++ } ++ ASSERT_EQ(1, server_recv_req); ++ ASSERT_EQ(1ul, delayed_conn_reqs.size()); ++ EXPECT_EQ(0, err_count); ++ while (!delayed_conn_reqs.empty()) { ++ uct_iface_reject(server->iface(), delayed_conn_reqs.front()); ++ delayed_conn_reqs.pop(); ++ } ++ while (err_count == 0) { ++ progress(); ++ } ++ EXPECT_EQ(1, err_count); ++} ++ + UCS_TEST_P(test_uct_sockaddr, many_clients_to_one_server) + { +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); +- server_recv_req = 0; +- err_count = 0; ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + + uct_iface_params client_params; + entity *client_test; +@@ -129,18 +222,20 @@ UCS_TEST_P(test_uct_sockaddr, many_clients_to_one_server) + for (i = 0; i < num_clients; ++i) { + /* open iface for the client side */ + memset(&client_params, 0, sizeof(client_params)); +- client_params.open_mode = UCT_IFACE_OPEN_MODE_SOCKADDR_CLIENT; +- client_params.err_handler = err_handler; +- client_params.err_handler_arg = reinterpret_cast(this); ++ client_params.open_mode = UCT_IFACE_OPEN_MODE_SOCKADDR_CLIENT; ++ client_params.err_handler = err_handler; ++ client_params.err_handler_arg = reinterpret_cast(this); ++ client_params.err_handler_flags = 0; + + client_test = uct_test::create_entity(client_params); + m_entities.push_back(client_test); + +- client_test->connect(i, *server, 0); ++ client_test->client_cb_arg = server->iface_attr().max_conn_priv; ++ client_test->connect(i, *server, 0, &connect_sock_addr); + } + + while (server_recv_req < num_clients){ +- sched_yield(); ++ progress(); + } + ASSERT_TRUE(server_recv_req == num_clients); + EXPECT_EQ(0, err_count); +@@ -148,19 +243,18 @@ UCS_TEST_P(test_uct_sockaddr, many_clients_to_one_server) + + UCS_TEST_P(test_uct_sockaddr, many_conns_on_client) + { +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); +- server_recv_req = 0; +- err_count = 0; ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + + int i, num_conns_on_client = 100; + + /* multiple clients, on the same iface, connecting to the same server */ + for (i = 0; i < num_conns_on_client; ++i) { +- client->connect(i, *server, 0); ++ client->connect(i, *server, 0, &connect_sock_addr); + } + + while (server_recv_req < num_conns_on_client) { +- sched_yield(); ++ progress(); + } + ASSERT_TRUE(server_recv_req == num_conns_on_client); + EXPECT_EQ(0, err_count); +@@ -169,15 +263,13 @@ UCS_TEST_P(test_uct_sockaddr, many_conns_on_client) + UCS_TEST_P(test_uct_sockaddr, err_handle) + { + check_caps(UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE); +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); +- +- server_recv_req = 0; +- err_count = 0; ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + +- client->connect(0, *server, 0); ++ client->connect(0, *server, 0, &connect_sock_addr); + ++ scoped_log_handler slh(wrap_errors_logger); + /* kill the server */ +- wrap_errors(); + m_entities.remove(server); + + /* If the server didn't receive a connection request from the client yet, +@@ -186,35 +278,40 @@ UCS_TEST_P(test_uct_sockaddr, err_handle) + wait_for_flag(&err_count); + EXPECT_EQ(1, err_count); + } +- restore_errors(); + } + + UCS_TEST_P(test_uct_sockaddr, conn_to_non_exist_server) + { + check_caps(UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE); + +- struct sockaddr_in *addr_in; +- addr_in = (struct sockaddr_in *) (sock_addr.addr); +- in_port_t orig_port = addr_in->sin_port; ++ struct sockaddr_in *connect_addr_in; ++ connect_addr_in = (struct sockaddr_in *) (connect_sock_addr.addr); ++ in_port_t orig_port = connect_addr_in->sin_port; + +- addr_in->sin_port = 1; +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); ++ connect_addr_in->sin_port = 1; ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + + err_count = 0; + + /* wrap errors now since the client will try to connect to a non existing port */ +- wrap_errors(); +- /* client - try to connect to a non-existing port on the server side */ +- client->connect(0, *server, 0); +- +- /* destroy the client's ep. this ep shouldn't be accessed anymore */ +- client->destroy_ep(0); +- /* wait for the transport's events to arrive */ +- sleep(3); +- restore_errors(); +- ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ /* client - try to connect to a non-existing port on the server side */ ++ client->connect(0, *server, 0, &connect_sock_addr); ++ completion comp; ++ ucs_status_t status = uct_ep_flush(client->ep(0), 0, &comp); ++ if (status == UCS_INPROGRESS) { ++ wait_for_flag(&comp.m_flag); ++ EXPECT_EQ(UCS_ERR_UNREACHABLE, comp.status()); ++ } else { ++ EXPECT_EQ(UCS_ERR_UNREACHABLE, status); ++ } ++ /* destroy the client's ep. this ep shouldn't be accessed anymore */ ++ client->destroy_ep(0); ++ } + /* restore the previous existing port */ +- addr_in->sin_port = orig_port; ++ connect_addr_in->sin_port = orig_port; + } + + UCT_INSTANTIATE_SOCKADDR_TEST_CASE(test_uct_sockaddr) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud.cc +index 4841906..36a25cd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud.cc +@@ -434,13 +434,19 @@ UCS_TEST_P(test_ud, crep_ack_drop) { + NULL, UCT_CB_FLAG_ASYNC); + ASSERT_UCS_OK(status); + ++ /* allow sending the active message, in case the congestion window is ++ * already reduced to minimum (=2) by the slow timer, since CREP ACK ++ * was not received. ++ */ ++ set_tx_win(m_e1, 10); ++ + do { + status = uct_ep_am_short(m_e1->ep(0), 0, 0, NULL, 0); + progress(); + } while (status == UCS_ERR_NO_RESOURCE); + ASSERT_UCS_OK(status); + +- validate_recv(ep(m_e2), 3U); ++ validate_recv(ep(m_e2), 3u - no_creq_cnt(ep(m_e1))); + + ep(m_e1, 0)->rx.rx_hook = uct_ud_ep_null_hook; + ep(m_e2, 0)->rx.rx_hook = uct_ud_ep_null_hook; +@@ -543,6 +549,12 @@ UCS_TEST_P(test_ud, ca_md, "IB_TX_QUEUE_LEN=" UCS_PP_MAKE_STRING(UCT_UD_CA_MAX_W + ep(m_e2, 0)->rx.rx_hook = drop_rx; + for (i = 1; i < UCT_UD_CA_MAX_WINDOW; i++) { + status = tx(m_e1); ++ if (status == UCS_ERR_NO_RESOURCE) { ++ // the congestion window can shrink by async timer if ACKs are ++ // not received fast enough ++ EXPECT_GT(i, 1); /* at least one packet should be sent */ ++ break; ++ } + EXPECT_UCS_OK(status); + progress(); + } +@@ -590,7 +602,7 @@ UCS_TEST_P(test_ud, ca_resend) { + ack_req_tx_cnt = 0; + do { + progress(); +- } while(ep(m_e1)->ca.cwnd != max_window/2); ++ } while(ep(m_e1)->ca.cwnd > max_window/2); + /* expect that: + * 4 packets will be retransmitted + * first packet will have ack_req, +@@ -601,9 +613,9 @@ UCS_TEST_P(test_ud, ca_resend) { + disable_async(m_e1); + disable_async(m_e2); + short_progress_loop(100); +- EXPECT_LE(4, rx_drop_count); ++ EXPECT_LE(0, rx_drop_count); + EXPECT_GE(4+2, rx_drop_count); +- EXPECT_LE(2, ack_req_tx_cnt); ++ EXPECT_LE(0, ack_req_tx_cnt); + EXPECT_GE(2+2, ack_req_tx_cnt); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_ds.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_ds.cc +index a1d1235..3c3cef2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_ds.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_ds.cc +@@ -65,9 +65,8 @@ unsigned test_ud_ds::N = 1000; + UCS_TEST_P(test_ud_ds, if_addr) { + union ibv_gid gid1, gid2; + uint16_t lid1, lid2; +- uint8_t is_global; +- uct_ib_address_unpack(ib_adr1, &lid1, &is_global, &gid1); +- uct_ib_address_unpack(ib_adr2, &lid2, &is_global, &gid2); ++ uct_ib_address_unpack(ib_adr1, &lid1, &gid1); ++ uct_ib_address_unpack(ib_adr2, &lid2, &gid2); + EXPECT_EQ(lid1, lid2); + EXPECT_EQ(gid1.global.subnet_prefix, gid2.global.subnet_prefix); + EXPECT_EQ(gid1.global.interface_id, gid2.global.interface_id); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_pending.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_pending.cc +index 8e46398..10492d1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_pending.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_pending.cc +@@ -38,7 +38,7 @@ public: + /* queuee some work */ + for(i = 0; i < N; i++) { + m_r[i].func = pending_cb_dispatch; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &m_r[i])); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &m_r[i], 0)); + } + } + +@@ -102,7 +102,7 @@ UCS_TEST_P(test_ud_pending, async_progress) { + EXPECT_UCS_OK(tx(m_e1)); + + for(i = 0; i < N; i++) { +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i])); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i], 0)); + } + twait(300); + /* requests must not be dispatched from async progress */ +@@ -123,7 +123,7 @@ UCS_TEST_P(test_ud_pending, sync_progress) { + + for(i = 0; i < N; i++) { + r[i].func = pending_cb; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i])); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i], 0)); + } + wait_for_value(&req_count, N, true); + /* requests must be dispatched from progress */ +@@ -144,7 +144,7 @@ UCS_TEST_P(test_ud_pending, err_busy) { + + for(i = 0; i < N; i++) { + r[i].func = pending_cb_busy; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i])); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i], 0)); + } + short_progress_loop(); + /* requests will not be dispatched from progress */ +@@ -183,7 +183,7 @@ UCS_TEST_P(test_ud_pending, window) + } + EXPECT_EQ(UCS_ERR_NO_RESOURCE, tx(m_e1)); + r.func = pending_cb_dispatch; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r)); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r, 0)); + wait_for_value(&req_count, 1, true); + EXPECT_EQ(1, req_count); + uct_ep_pending_purge(m_e1->ep(0), purge_cb, NULL); +@@ -208,7 +208,7 @@ UCS_TEST_P(test_ud_pending, tx_wqe) + } while (status == UCS_OK); + + r.func = pending_cb_dispatch; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r)); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r, 0)); + wait_for_value(&req_count, 1, true); + EXPECT_EQ(1, req_count); + short_progress_loop(); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_slow_timer.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_slow_timer.cc +index bf29df4..cf28a29 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_slow_timer.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_slow_timer.cc +@@ -11,6 +11,7 @@ + extern "C" { + #include + #include ++#include + #include + #include + } +@@ -35,7 +36,7 @@ public: + static ucs_status_t tick_counter(uct_ud_ep_t *ep, uct_ud_neth_t *neth) + { + uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, +- uct_ud_iface_t); ++ uct_ud_iface_t); + + /* hack to disable retransmit */ + ep->tx.send_time = ucs_twheel_get_time(&iface->async.slow_timer); +@@ -56,6 +57,18 @@ public: + usleep(1000); + } + } ++ ++ void wait_for_ep_destroyed(uct_ud_iface_t *iface, uint32_t ep_idx) ++ { ++ ucs_time_t deadline = ucs_get_time() + ++ ucs_time_from_sec(60) * ucs::test_time_multiplier(); ++ void *ud_ep_tmp; ++ ++ while ((ucs_get_time() < deadline) && ++ ucs_ptr_array_lookup(&iface->eps, ep_idx, ud_ep_tmp)) { ++ usleep(1000); ++ } ++ } + }; + + int test_ud_slow_timer::rx_limit = 10; +@@ -67,7 +80,7 @@ int test_ud_slow_timer::tick_count = 0; + UCS_TEST_P(test_ud_slow_timer, tx1) { + connect(); + EXPECT_UCS_OK(tx(m_e1)); +- twait(200); ++ wait_for_rx_sn(1); + EXPECT_EQ(2, ep(m_e1)->tx.psn); + EXPECT_EQ(1, ucs_frag_list_sn(&ep(m_e2)->rx.ooo_pkts)); + } +@@ -85,6 +98,21 @@ UCS_TEST_P(test_ud_slow_timer, txn) { + EXPECT_EQ(N, ucs_frag_list_sn(&ep(m_e2)->rx.ooo_pkts)); + } + ++UCS_TEST_P(test_ud_slow_timer, ep_destroy, "UD_TIMEOUT=1s") { ++ void *ud_ep_tmp; ++ connect(); ++ ++ uct_ud_ep_t *ud_ep = ep(m_e1); ++ uct_ud_iface_t *iface = ucs_derived_of(ud_ep->super.super.iface, ++ uct_ud_iface_t); ++ uint32_t ep_idx = ud_ep->ep_id; ++ EXPECT_TRUE(ucs_ptr_array_lookup(&iface->eps, ep_idx, ud_ep_tmp)); ++ ++ m_e1->destroy_eps(); ++ wait_for_ep_destroyed(iface, ep_idx); ++ EXPECT_FALSE(ucs_ptr_array_lookup(&iface->eps, ep_idx, ud_ep_tmp)); ++} ++ + #ifdef UCT_UD_EP_DEBUG_HOOKS + /* no traffic - no ticks */ + UCS_TEST_P(test_ud_slow_timer, tick1) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.cc +index b29b0ad..b898610 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.cc +@@ -196,4 +196,3 @@ void uct_amo_test::worker::join() { + pthread_join(m_thread, &retval); + running = false; + } +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.h +index ba11f45..9e58c8d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.h +@@ -79,6 +79,83 @@ public: + std::vector m_completions; + }; + ++ ucs_status_t atomic_post(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint64_t remote_addr, ++ uct_rkey_t rkey) { ++ return uct_ep_atomic32_post(ep, opcode, value, remote_addr, rkey); ++ } ++ ++ ucs_status_t atomic_post(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t remote_addr, ++ uct_rkey_t rkey) { ++ return uct_ep_atomic64_post(ep, opcode, value, remote_addr, rkey); ++ } ++ ++ ucs_status_t atomic_fetch_nb(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) { ++ return uct_ep_atomic32_fetch(ep, opcode, value, result, remote_addr, rkey, comp); ++ } ++ ++ ucs_status_t atomic_fetch_nb(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) { ++ return uct_ep_atomic64_fetch(ep, opcode, value, result, remote_addr, rkey, comp); ++ } ++ ++ template ++ ucs_status_t atomic_op(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, ++ uint64_t *result, completion *comp) { ++ return atomic_post(ep, opcode, (T)worker.value, recvbuf.addr(), recvbuf.rkey()); ++ } ++ ++ template ++ ucs_status_t atomic_fop(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, ++ uint64_t *result, completion *comp) { ++ comp->self = this; ++ comp->uct.func = atomic_reply_cb; ++ return atomic_fetch_nb(ep, opcode, (T)worker.value, ++ (T*)result, recvbuf.addr(), recvbuf.rkey(), ++ &comp->uct); ++ } ++ ++ template ++ static T and_op(T v1, T v2) ++ { ++ return v1 & v2; ++ } ++ ++ template ++ static T or_op(T v1, T v2) ++ { ++ return v1 | v2; ++ } ++ ++ template ++ static T add_op(T v1, T v2) ++ { ++ return v1 + v2; ++ } ++ ++ template ++ static T xor_op(T v1, T v2) ++ { ++ return v1 ^ v2; ++ } ++ ++ template ++ static T and_val(unsigned i) ++ { ++ return ~(UCS_BIT(i * 2) | UCS_BIT(i + 16)); ++ } ++ ++ template ++ static T or_val(unsigned i) ++ { ++ return UCS_BIT(i * 2) | UCS_BIT(i + 16); ++ } + + protected: + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add.cc +deleted file mode 100644 +index e8f6b5a..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add.cc ++++ /dev/null +@@ -1,66 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include "test_amo.h" +- +- +-class uct_amo_add_test : public uct_amo_test { +-public: +- +- ucs_status_t add32(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, +- uint64_t *result, completion *comp) { +- return uct_ep_atomic_add32(ep, worker.value, recvbuf.addr(), recvbuf.rkey()); +- } +- +- ucs_status_t add64(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, +- uint64_t *result, completion *comp) { +- return uct_ep_atomic_add64(ep, worker.value, recvbuf.addr(), recvbuf.rkey()); +- } +- +- template +- void test_add(send_func_t send) { +- /* +- * Method: Add may random values from multiple workers running at the same +- * time. We expect the final result to be the sum of all these values. +- */ +- +- mapped_buffer recvbuf(sizeof(T), 0, receiver()); +- +- T value = rand64(); +- *(T*)recvbuf.ptr() = value; +- +- T exp_result = value; +- std::vector add_vec; +- for (unsigned i = 0; i < num_senders(); ++i) { +- value = rand64(); +- add_vec.push_back(value); +- +- for (unsigned j = 0; j < count(); ++j) { +- exp_result += value; +- value = hash64(value); +- } +- } +- +- run_workers(send, recvbuf, add_vec, true); +- +- wait_for_remote(); +- EXPECT_EQ(exp_result, *(T*)recvbuf.ptr()); +- } +-}; +- +- +-UCS_TEST_P(uct_amo_add_test, add32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD32); +- test_add(static_cast(&uct_amo_add_test::add32)); +-} +- +-UCS_TEST_P(uct_amo_add_test, add64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD64); +- test_add(static_cast(&uct_amo_add_test::add64)); +-} +- +-UCT_INSTANTIATE_TEST_CASE(uct_amo_add_test) +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add_xor.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add_xor.cc +new file mode 100644 +index 0000000..f89477b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add_xor.cc +@@ -0,0 +1,66 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "test_amo.h" ++ ++ ++class uct_amo_add_xor_test : public uct_amo_test { ++public: ++ ++ template ++ void test_op(T (*op)(T, T)) { ++ /* ++ * Method: Add/xor may random values from multiple workers running at the same ++ * time. We expect the final result to be the sum/xor of all these values. ++ */ ++ ++ mapped_buffer recvbuf(sizeof(T), 0, receiver()); ++ ++ T value = rand64(); ++ *(T*)recvbuf.ptr() = value; ++ ++ T exp_result = value; ++ std::vector add_vec; ++ for (unsigned i = 0; i < num_senders(); ++i) { ++ value = rand64(); ++ add_vec.push_back(value); ++ ++ for (unsigned j = 0; j < count(); ++j) { ++ exp_result = op(exp_result, value); ++ value = hash64(value); ++ } ++ } ++ ++ run_workers(static_cast(&uct_amo_test::atomic_op), ++ recvbuf, add_vec, true); ++ ++ wait_for_remote(); ++ EXPECT_EQ(exp_result, *(T*)recvbuf.ptr()); ++ } ++}; ++ ++UCS_TEST_P(uct_amo_add_xor_test, add32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), OP32); ++ test_op(add_op); ++} ++ ++UCS_TEST_P(uct_amo_add_xor_test, add64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), OP64); ++ test_op(add_op); ++} ++ ++UCS_TEST_P(uct_amo_add_xor_test, xor32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), OP32); ++ test_op(xor_op); ++} ++ ++UCS_TEST_P(uct_amo_add_xor_test, xor64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), OP64); ++ test_op(xor_op); ++} ++ ++UCT_INSTANTIATE_TEST_CASE(uct_amo_add_xor_test) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_and_or.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_and_or.cc +new file mode 100644 +index 0000000..1cf0edb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_and_or.cc +@@ -0,0 +1,65 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "test_amo.h" ++ ++ ++class uct_amo_and_or_test : public uct_amo_test { ++public: ++ ++ template ++ void test_op(T (*op)(T, T), T (*val)(unsigned)) { ++ /* ++ * Method: Add may random values from multiple workers running at the same ++ * time. We expect the final result to be the and/or of all these values. ++ * This is simplified version of add/xor test: operated value is costant ++ * for every worker to eliminate result to 0 or MAX_INT ++ */ ++ ++ check_atomics(UCS_BIT(opcode), sizeof(T) == sizeof(uint64_t) ? OP64 : OP32); ++ ++ mapped_buffer recvbuf(sizeof(T), 0, receiver()); ++ ++ T value = 0x0ff0f00f; ++ *(T*)recvbuf.ptr() = value; ++ ++ T exp_result = value; ++ std::vector op_vec; ++ for (unsigned i = 0; i < num_senders(); ++i) { ++ value = val(i); ++ op_vec.push_back(value); ++ ++ for (unsigned j = 0; j < count(); ++j) { ++ exp_result = op(exp_result, value); ++ } ++ } ++ ++ run_workers(static_cast(&uct_amo_test::atomic_op), ++ recvbuf, op_vec, false); ++ ++ wait_for_remote(); ++ EXPECT_EQ(exp_result, *(T*)recvbuf.ptr()); ++ } ++}; ++ ++UCS_TEST_P(uct_amo_and_or_test, and32) { ++ test_op(and_op, and_val); ++} ++ ++UCS_TEST_P(uct_amo_and_or_test, add64) { ++ test_op(and_op, and_val); ++} ++ ++UCS_TEST_P(uct_amo_and_or_test, or32) { ++ test_op(or_op, or_val); ++} ++ ++UCS_TEST_P(uct_amo_and_or_test, or64) { ++ test_op(or_op, or_val); ++} ++ ++UCT_INSTANTIATE_TEST_CASE(uct_amo_and_or_test) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_cswap.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_cswap.cc +index dfcd8e2..5bb7f8e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_cswap.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_cswap.cc +@@ -95,12 +95,12 @@ public: + + + UCS_TEST_P(uct_amo_cswap_test, cswap32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_CSWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_CSWAP), FOP32); + test_cswap(static_cast(&uct_amo_cswap_test::cswap32)); + } + + UCS_TEST_P(uct_amo_cswap_test, cswap64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_CSWAP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_CSWAP), FOP64); + test_cswap(static_cast(&uct_amo_cswap_test::cswap64)); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd.cc +deleted file mode 100644 +index 6672968..0000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd.cc ++++ /dev/null +@@ -1,89 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include "test_amo.h" +- +- +-class uct_amo_fadd_test : public uct_amo_test { +-public: +- +- ucs_status_t fadd32(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, +- uint64_t *result, completion *comp) { +- comp->self = this; +- comp->uct.func = atomic_reply_cb; +- return uct_ep_atomic_fadd32(ep, worker.value, recvbuf.addr(), recvbuf.rkey(), +- (uint32_t*)result, &comp->uct); +- } +- +- ucs_status_t fadd64(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, +- uint64_t *result, completion *comp) { +- comp->self = this; +- comp->uct.func = atomic_reply_cb; +- return uct_ep_atomic_fadd64(ep, worker.value, recvbuf.addr(), recvbuf.rkey(), +- result, &comp->uct); +- } +- +- template +- void test_fadd(send_func_t send) { +- /* +- * Method: Do concurrent atomic fetch-and-add of constant random value +- * to a single atomic variable. Check that every sender gets a unique reply +- * and the final value of atomic variable is the sum of all. +- */ +- +- mapped_buffer recvbuf(sizeof(T), 0, receiver()); +- +- T value = rand64(); +- T add = rand64(); +- *(T*)recvbuf.ptr() = value; +- +- std::vector exp_replies; +- for (unsigned i = 0; i < count() * num_senders(); ++i) { +- exp_replies.push_back(value); +- value += add; +- } +- +- run_workers(send, recvbuf, std::vector(num_senders(), add), false); +- +- validate_replies(exp_replies); +- +- wait_for_remote(); +- EXPECT_EQ(value, *(T*)recvbuf.ptr()); +- } +-}; +- +- +-UCS_TEST_P(uct_amo_fadd_test, fadd32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD32); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd32)); +-} +- +-UCS_TEST_P(uct_amo_fadd_test, fadd64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd64)); +-} +- +-UCT_INSTANTIATE_TEST_CASE(uct_amo_fadd_test) +- +-class uct_amo_fadd_test_inlresp : public uct_amo_fadd_test {}; +- +-UCS_TEST_P(uct_amo_fadd_test_inlresp, fadd64_inlresp0, "IB_TX_INLINE_RESP=0") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd64)); +-} +- +-UCS_TEST_P(uct_amo_fadd_test_inlresp, fadd64_inlresp32, "IB_TX_INLINE_RESP=32") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd64)); +-} +- +-UCS_TEST_P(uct_amo_fadd_test_inlresp, fadd64_inlresp64, "IB_TX_INLINE_RESP=64") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd64)); +-} +- +-UCT_INSTANTIATE_IB_TEST_CASE(uct_amo_fadd_test_inlresp) +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd_fxor.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd_fxor.cc +new file mode 100644 +index 0000000..b4ebfb5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd_fxor.cc +@@ -0,0 +1,98 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "test_amo.h" ++ ++ ++class uct_amo_fadd_fxor_test : public uct_amo_test { ++public: ++ ++ template ++ void test_fop(T (*op)(T, T)) { ++ /* ++ * Method: Do concurrent atomic fetch-and-add/xor of constant random value ++ * to a single atomic variable. Check that every sender gets a unique reply ++ * and the final value of atomic variable is the sum/xor of all. ++ */ ++ ++ mapped_buffer recvbuf(sizeof(T), 0, receiver()); ++ ++ T value = rand64(); ++ T add = rand64(); ++ *(T*)recvbuf.ptr() = value; ++ ++ std::vector exp_replies; ++ for (unsigned i = 0; i < count() * num_senders(); ++i) { ++ exp_replies.push_back(value); ++ value = op(value, add); ++ } ++ ++ run_workers(static_cast(&uct_amo_test::atomic_fop), ++ recvbuf, std::vector(num_senders(), add), false); ++ ++ validate_replies(exp_replies); ++ ++ wait_for_remote(); ++ EXPECT_EQ(value, *(T*)recvbuf.ptr()); ++ } ++}; ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test, fadd32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP32); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test, fadd64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test, fxor32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP32); ++ test_fop(xor_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test, fxor64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fop(xor_op); ++} ++ ++UCT_INSTANTIATE_TEST_CASE(uct_amo_fadd_fxor_test) ++ ++class uct_amo_fadd_fxor_test_inlresp : public uct_amo_fadd_fxor_test {}; ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fadd64_inlresp0, "IB_TX_INLINE_RESP=0") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fadd64_inlresp32, "IB_TX_INLINE_RESP=32") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fadd64_inlresp64, "IB_TX_INLINE_RESP=64") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fxor64_inlresp0, "IB_TX_INLINE_RESP=0") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fop(xor_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fxor64_inlresp32, "IB_TX_INLINE_RESP=32") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fop(xor_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fxor64_inlresp64, "IB_TX_INLINE_RESP=64") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fop(xor_op); ++} ++ ++UCT_INSTANTIATE_IB_TEST_CASE(uct_amo_fadd_fxor_test_inlresp) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fand_for.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fand_for.cc +new file mode 100644 +index 0000000..4c8dc2a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fand_for.cc +@@ -0,0 +1,90 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "test_amo.h" ++ ++ ++class uct_amo_fand_for_test : public uct_amo_test { ++public: ++ ++ template ++ void test_fop(T (*op)(T, T)) { ++ /* ++ * Method: Do concurrent atomic fetch-and-and/or of constant random value ++ * to a single atomic variable. Check that every sender gets a unique reply ++ * and the final value of atomic variable is the and/or of all. ++ */ ++ ++ check_atomics(UCS_BIT(opcode), sizeof(T) == sizeof(uint64_t) ? FOP64 : FOP32); ++ ++ mapped_buffer recvbuf(sizeof(T), 0, receiver()); ++ ++ T value = rand64(); ++ T add = rand64(); ++ *(T*)recvbuf.ptr() = value; ++ ++ std::vector exp_replies; ++ for (unsigned i = 0; i < count() * num_senders(); ++i) { ++ exp_replies.push_back(value); ++ value = op(value, add); ++ } ++ ++ run_workers(static_cast(&uct_amo_test::atomic_fop), ++ recvbuf, std::vector(num_senders(), add), false); ++ ++ validate_replies(exp_replies); ++ ++ wait_for_remote(); ++ EXPECT_EQ(value, *(T*)recvbuf.ptr()); ++ } ++}; ++ ++UCS_TEST_P(uct_amo_fand_for_test, fand32) { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test, fand64) { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test, for32) { ++ test_fop(or_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test, for64) { ++ test_fop(or_op); ++} ++ ++UCT_INSTANTIATE_TEST_CASE(uct_amo_fand_for_test) ++ ++class uct_amo_fand_for_test_inlresp : public uct_amo_fand_for_test {}; ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, fand64_inlresp0, "IB_TX_INLINE_RESP=0") { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, fand64_inlresp32, "IB_TX_INLINE_RESP=32") { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, fand64_inlresp64, "IB_TX_INLINE_RESP=64") { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, for64_inlresp0, "IB_TX_INLINE_RESP=0") { ++ test_fop(or_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, for64_inlresp32, "IB_TX_INLINE_RESP=32") { ++ test_fop(or_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, for64_inlresp64, "IB_TX_INLINE_RESP=64") { ++ test_fop(or_op); ++} ++ ++UCT_INSTANTIATE_IB_TEST_CASE(uct_amo_fand_for_test_inlresp) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_swap.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_swap.cc +index dc6bcbf..10f2334 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_swap.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_swap.cc +@@ -14,16 +14,16 @@ public: + uint64_t *result, completion *comp) { + comp->self = this; + comp->uct.func = atomic_reply_cb; +- return uct_ep_atomic_swap32(ep, worker.value, recvbuf.addr(), recvbuf.rkey(), +- (uint32_t*)result, &comp->uct); ++ return uct_ep_atomic32_fetch(ep, UCT_ATOMIC_OP_SWAP, worker.value, (uint32_t*)result, ++ recvbuf.addr(), recvbuf.rkey(), &comp->uct); + } + + ucs_status_t swap64(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, + uint64_t *result, completion *comp) { + comp->self = this; + comp->uct.func = atomic_reply_cb; +- return uct_ep_atomic_swap64(ep, worker.value, recvbuf.addr(), recvbuf.rkey(), +- result, &comp->uct); ++ return uct_ep_atomic64_fetch(ep, UCT_ATOMIC_OP_SWAP, worker.value, (uint64_t*)result, ++ recvbuf.addr(), recvbuf.rkey(), &comp->uct); + } + + template +@@ -65,12 +65,12 @@ public: + + + UCS_TEST_P(uct_amo_swap_test, swap32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP32); + test_swap(static_cast(&uct_amo_swap_test::swap32)); + } + + UCS_TEST_P(uct_amo_swap_test, swap64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP64); + test_swap(static_cast(&uct_amo_swap_test::swap64)); + } + +@@ -79,17 +79,17 @@ UCT_INSTANTIATE_TEST_CASE(uct_amo_swap_test) + class uct_amo_swap_test_inlresp : public uct_amo_swap_test {}; + + UCS_TEST_P(uct_amo_swap_test_inlresp, swap32_inlresp0, "IB_TX_INLINE_RESP=0") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP32); + test_swap(static_cast(&uct_amo_swap_test::swap32)); + } + + UCS_TEST_P(uct_amo_swap_test_inlresp, swap32_inlresp32, "IB_TX_INLINE_RESP=32") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP32); + test_swap(static_cast(&uct_amo_swap_test::swap32)); + } + + UCS_TEST_P(uct_amo_swap_test_inlresp, swap32_inlresp64, "IB_TX_INLINE_RESP=64") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP32); + test_swap(static_cast(&uct_amo_swap_test::swap32)); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_event.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_event.cc +index 2a4b282..1b5d6ab 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_event.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_event.cc +@@ -110,8 +110,7 @@ void test_uct_event_fd::test_recv_am(bool signaled) + recv_buffer->length = 0; /* Initialize length to 0 */ + + /* set a callback for the uct to invoke for receiving the data */ +- uct_iface_set_am_handler(m_e2->iface(), 0, am_handler, recv_buffer, +- UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e2->iface(), 0, am_handler, recv_buffer, 0); + + /* create receiver wakeup */ + status = uct_iface_event_fd_get(m_e2->iface(), &wakeup_fd.fd); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_fence.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_fence.cc +index 090d0ba..b568cb1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_fence.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_fence.cc +@@ -58,9 +58,9 @@ public: + public: + worker(uct_fence_test* test, send_func_t send, recv_func_t recv, + const mapped_buffer& recvbuf, +- const entity& entity, uint64_t initial_value, uint32_t* error) : +- test(test), value(initial_value), result32(0), result64(0), +- error(error), running(true), m_send(send), m_recv(recv), ++ const entity& entity, uct_atomic_op_t op, uint32_t* error) : ++ test(test), value(0), result32(0), result64(0), ++ error(error), running(true), op(op), m_send(send), m_recv(recv), + m_recvbuf(recvbuf), m_entity(entity) { + pthread_create(&m_thread, NULL, run, reinterpret_cast(this)); + } +@@ -81,19 +81,46 @@ public: + running = false; + } + ++ uint64_t atomic_op_val(uct_atomic_op_t op, uint64_t v1, uint64_t v2) ++ { ++ switch (op) { ++ case UCT_ATOMIC_OP_ADD: ++ return v1 + v2; ++ case UCT_ATOMIC_OP_AND: ++ return v1 & v2; ++ case UCT_ATOMIC_OP_OR: ++ return v1 | v2; ++ case UCT_ATOMIC_OP_XOR: ++ return v1 ^ v2; ++ default: ++ return 0; ++ } ++ } ++ + uct_fence_test* const test; + uint64_t value; + uint32_t result32; + uint64_t result64; + uint32_t* error; + bool running; ++ uct_atomic_op_t op; + + private: + void run() { + uct_completion_t uct_comp; + uct_comp.func = completion_cb; + for (unsigned i = 0; i < uct_fence_test::count(); i++) { +- uct_comp.count = 1; ++ uint64_t local_val = ucs::rand(); ++ uint64_t remote_val = ucs::rand(); ++ uct_comp.count = 1; ++ ++ if (m_recvbuf.length() == sizeof(uint32_t)) { ++ *(uint32_t*)m_recvbuf.ptr() = remote_val; ++ } else { ++ *(uint64_t*)m_recvbuf.ptr() = remote_val; ++ } ++ value = local_val; ++ + (test->*m_send)(m_entity.ep(0), *this, m_recvbuf); + uct_ep_fence(m_entity.ep(0), 0); + (test->*m_recv)(m_entity.ep(0), *this, +@@ -103,7 +130,7 @@ public: + uint64_t result = (m_recvbuf.length() == sizeof(uint32_t)) ? + result32 : result64; + +- if (result != (uint64_t)(i+1)) ++ if (result != atomic_op_val(op, local_val, remote_val)) + (*error)++; + + // reset for next loop +@@ -119,39 +146,40 @@ public: + pthread_t m_thread; + }; + ++ template + void run_workers(send_func_t send, recv_func_t recv, +- const mapped_buffer& recvbuf, +- uint64_t initial_value, uint32_t* error) { ++ const mapped_buffer& recvbuf, uint32_t* error) { + ucs::ptr_vector m_workers; + m_workers.clear(); + m_workers.push_back(new worker(this, send, recv, recvbuf, +- sender(), initial_value, error)); ++ sender(), OP, error)); + m_workers.at(0).join(); + m_workers.clear(); + } + +- ucs_status_t add32(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf) { +- return uct_ep_atomic_add32(ep, worker.value, recvbuf.addr(), recvbuf.rkey()); +- } +- +- ucs_status_t add64(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf) { +- return uct_ep_atomic_add64(ep, worker.value, recvbuf.addr(), recvbuf.rkey()); +- } +- +- ucs_status_t fadd32(uct_ep_h ep, worker& worker, +- const mapped_buffer& recvbuf, uct_completion_t *comp) { +- return uct_ep_atomic_fadd32(ep, 0, recvbuf.addr(), recvbuf.rkey(), +- &worker.result32, comp); ++ template ++ ucs_status_t atomic_op(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf) { ++ if (sizeof(T) == sizeof(uint32_t)) { ++ return uct_ep_atomic32_post(ep, OP, worker.value, recvbuf.addr(), recvbuf.rkey()); ++ } else { ++ return uct_ep_atomic64_post(ep, OP, worker.value, recvbuf.addr(), recvbuf.rkey()); ++ } + } + +- ucs_status_t fadd64(uct_ep_h ep, worker& worker, +- const mapped_buffer& recvbuf, uct_completion_t *comp) { +- return uct_ep_atomic_fadd64(ep, 0, recvbuf.addr(), recvbuf.rkey(), +- &worker.result64, comp); ++ template ++ ucs_status_t atomic_fop(uct_ep_h ep, worker& worker, ++ const mapped_buffer& recvbuf, uct_completion_t *comp) { ++ if (sizeof(T) == sizeof(uint32_t)) { ++ return uct_ep_atomic32_fetch(ep, OP, 0, &worker.result32, ++ recvbuf.addr(), recvbuf.rkey(), comp); ++ } else { ++ return uct_ep_atomic64_fetch(ep, OP, 0, &worker.result64, ++ recvbuf.addr(), recvbuf.rkey(), comp); ++ } + } + +- template +- void test_fence(send_func_t send, recv_func_t recv) { ++ template ++ void test_fence() { + + mapped_buffer recvbuf(sizeof(T), 0, receiver()); + +@@ -159,24 +187,60 @@ public: + + *(T*)recvbuf.ptr() = 0; + +- run_workers(send, recv, recvbuf, 1, &error); ++ run_workers(static_cast(&uct_fence_test::atomic_op), ++ static_cast(&uct_fence_test::atomic_fop), ++ recvbuf, &error); + + EXPECT_EQ(error, (uint32_t)0); + } + }; + + UCS_TEST_P(uct_fence_test, add32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD32); +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD32); +- test_fence(static_cast(&uct_fence_test::add32), +- static_cast(&uct_fence_test::fadd32)); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), OP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP32); ++ test_fence(); + } + + UCS_TEST_P(uct_fence_test, add64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD64); +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fence(static_cast(&uct_fence_test::add64), +- static_cast(&uct_fence_test::fadd64)); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), OP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, and32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_AND), OP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_AND), FOP32); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, and64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_AND), OP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_AND), FOP64); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, or32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_OR), OP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_OR), FOP32); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, or64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_OR), OP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_OR), FOP64); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, xor32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), OP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP32); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, xor64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), OP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fence(); + } + + UCT_INSTANTIATE_TEST_CASE(uct_fence_test) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_flush.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_flush.cc +index 08627ea..f37eb7d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_flush.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_flush.cc +@@ -343,7 +343,7 @@ void uct_flush_test::test_flush_am_pending(flush_func_t flush, bool destroy_ep) + it->uct.func = am_progress; + it->comp.count = 2; + it->comp.func = NULL; +- status = uct_ep_pending_add(sender().ep(0), &it->uct); ++ status = uct_ep_pending_add(sender().ep(0), &it->uct, 0); + if (UCS_ERR_BUSY == status) { + /* User advised to retry the send. It means no requests added + * to the queue +@@ -373,7 +373,7 @@ void uct_flush_test::test_flush_am_pending(flush_func_t flush, bool destroy_ep) + /* If flush returned NO_RESOURCE, add to pending must succeed */ + flush_req.test = this; + flush_req.uct.func = flush_progress; +- status = uct_ep_pending_add(sender().ep(0), &flush_req.uct); ++ status = uct_ep_pending_add(sender().ep(0), &flush_req.uct, 0); + if (status == UCS_ERR_BUSY) { + continue; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_many2one_am.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_many2one_am.cc +index 07f6d42..4d74aa1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_many2one_am.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_many2one_am.cc +@@ -100,7 +100,7 @@ UCS_TEST_P(test_many2one_am, am_bcopy, "MAX_BCOPY=16384") + m_am_count = 0; + + status = uct_iface_set_am_handler(receiver->iface(), AM_ID, am_handler, +- (void*)this, UCT_CB_FLAG_SYNC); ++ (void*)this, 0); + ASSERT_UCS_OK(status); + + for (unsigned i = 0; i < num_sends; ++i) { +@@ -129,8 +129,7 @@ UCS_TEST_P(test_many2one_am, am_bcopy, "MAX_BCOPY=16384") + progress(); + } + +- status = uct_iface_set_am_handler(receiver->iface(), AM_ID, NULL, NULL, +- UCT_CB_FLAG_SYNC); ++ status = uct_iface_set_am_handler(receiver->iface(), AM_ID, NULL, NULL, 0); + ASSERT_UCS_OK(status); + + check_backlog(); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.cc +index 680ff23..49dc722 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.cc +@@ -24,7 +24,7 @@ extern "C" { + #include + #endif + +-std::string const test_md::mem_types[] = {"host", "cuda"}; ++std::string const test_md::mem_types[] = {"host", "cuda", "cuda-managed"}; + + void* test_md::alloc_thread(void *arg) + { +@@ -75,18 +75,22 @@ test_md::test_md() + UCS_TEST_CREATE_HANDLE(uct_md_config_t*, m_md_config, + (void (*)(uct_md_config_t*))uct_config_release, + uct_md_config_read, GetParam().c_str(), NULL, NULL); ++ memset(&m_md_attr, 0, sizeof(m_md_attr)); + } + + void test_md::init() + { + ucs::test_base::init(); +- UCS_TEST_CREATE_HANDLE(uct_md_h, m_pd, uct_md_close, uct_md_open, ++ UCS_TEST_CREATE_HANDLE(uct_md_h, m_md, uct_md_close, uct_md_open, + GetParam().c_str(), m_md_config); ++ ++ ucs_status_t status = uct_md_query(m_md, &m_md_attr); ++ ASSERT_UCS_OK(status); + } + + void test_md::cleanup() + { +- m_pd.reset(); ++ m_md.reset(); + ucs::test_base::cleanup(); + } + +@@ -104,7 +108,7 @@ void test_md::modify_config(const std::string& name, const std::string& value, + void test_md::check_caps(uint64_t flags, const std::string& name) + { + uct_md_attr_t md_attr; +- ucs_status_t status = uct_md_query(pd(), &md_attr); ++ ucs_status_t status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + if (!ucs_test_all_flags(md_attr.cap.flags, flags)) { + std::stringstream ss; +@@ -187,23 +191,23 @@ UCS_TEST_P(test_md, rkey_ptr) { + check_caps(UCT_MD_FLAG_ALLOC|UCT_MD_FLAG_RKEY_PTR, "allocation+direct access"); + // alloc (should work with both sysv and xpmem + size = 1024 * 1024 * sizeof(unsigned); +- status = uct_md_mem_alloc(pd(), &size, (void **)&rva, ++ status = uct_md_mem_alloc(md(), &size, (void **)&rva, + UCT_MD_MEM_ACCESS_ALL, + "test", &memh); + ASSERT_UCS_OK(status); + EXPECT_LE(1024 * 1024 * sizeof(unsigned), size); + + // pack +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + rkey_buffer = malloc(md_attr.rkey_packed_size); + if (rkey_buffer == NULL) { + // make coverity happy +- uct_md_mem_free(pd(), memh); ++ uct_md_mem_free(md(), memh); + GTEST_FAIL(); + } + +- status = uct_md_mkey_pack(pd(), memh, rkey_buffer); ++ status = uct_md_mkey_pack(md(), memh, rkey_buffer); + + // unpack + status = uct_rkey_unpack(rkey_buffer, &rkey_bundle); +@@ -234,7 +238,7 @@ UCS_TEST_P(test_md, rkey_ptr) { + EXPECT_EQ(UCS_ERR_INVALID_ADDR, status); + + free(rkey_buffer); +- uct_md_mem_free(pd(), memh); ++ uct_md_mem_free(md(), memh); + uct_rkey_release(&rkey_bundle); + } + +@@ -252,7 +256,7 @@ UCS_TEST_P(test_md, alloc) { + continue; + } + +- status = uct_md_mem_alloc(pd(), &size, &address, ++ status = uct_md_mem_alloc(md(), &size, &address, + UCT_MD_MEM_ACCESS_ALL, "test", &memh); + EXPECT_GT(size, 0ul); + +@@ -262,7 +266,7 @@ UCS_TEST_P(test_md, alloc) { + EXPECT_TRUE(memh != UCT_MEM_HANDLE_NULL); + + memset(address, 0xBB, size); +- uct_md_mem_free(pd(), memh); ++ uct_md_mem_free(md(), memh); + } + } + +@@ -273,7 +277,7 @@ UCS_TEST_P(test_md, mem_type_owned) { + int ret; + void *address; + +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + + if (md_attr.cap.mem_type == UCT_MD_MEM_TYPE_HOST) { +@@ -282,7 +286,7 @@ UCS_TEST_P(test_md, mem_type_owned) { + + alloc_memory(&address, 1024, NULL, md_attr.cap.mem_type); + +- ret = uct_md_is_mem_type_owned(pd(), address, 1024); ++ ret = uct_md_is_mem_type_owned(md(), address, 1024); + EXPECT_TRUE(ret > 0); + } + +@@ -295,7 +299,7 @@ UCS_TEST_P(test_md, reg) { + + check_caps(UCT_MD_FLAG_REG, "registration"); + +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + for (unsigned mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { + if (!(md_attr.cap.reg_mem_types & UCS_BIT(mem_type))) { +@@ -314,13 +318,13 @@ UCS_TEST_P(test_md, reg) { + + alloc_memory(&address, size, &fill_buffer[0], mem_type); + +- status = uct_md_mem_reg(pd(), address, size, UCT_MD_MEM_ACCESS_ALL, &memh); ++ status = uct_md_mem_reg(md(), address, size, UCT_MD_MEM_ACCESS_ALL, &memh); + + ASSERT_UCS_OK(status); + ASSERT_TRUE(memh != UCT_MEM_HANDLE_NULL); + check_memory(address, &fill_buffer[0], size, mem_type); + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + ASSERT_UCS_OK(status); + check_memory(address, &fill_buffer[0], size, mem_type); + +@@ -338,7 +342,7 @@ UCS_TEST_P(test_md, reg_perf) { + + check_caps(UCT_MD_FLAG_REG, "registration"); + +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + for (unsigned mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { + if (!(md_attr.cap.reg_mem_types & UCS_BIT(mem_type))) { +@@ -355,12 +359,12 @@ UCS_TEST_P(test_md, reg_perf) { + unsigned n = 0; + while (n < count) { + uct_mem_h memh; +- status = uct_md_mem_reg(pd(), ptr, size, UCT_MD_MEM_ACCESS_ALL, ++ status = uct_md_mem_reg(md(), ptr, size, UCT_MD_MEM_ACCESS_ALL, + &memh); + ASSERT_UCS_OK(status); + ASSERT_TRUE(memh != UCT_MEM_HANDLE_NULL); + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + ASSERT_UCS_OK(status); + + ++n; +@@ -392,16 +396,16 @@ UCS_TEST_P(test_md, reg_advise) { + address = malloc(size); + ASSERT_TRUE(address != NULL); + +- status = uct_md_mem_reg(pd(), address, size, ++ status = uct_md_mem_reg(md(), address, size, + UCT_MD_MEM_FLAG_NONBLOCK|UCT_MD_MEM_ACCESS_ALL, + &memh); + ASSERT_UCS_OK(status); + ASSERT_TRUE(memh != UCT_MEM_HANDLE_NULL); + +- status = uct_md_mem_advise(pd(), memh, (char *)address + 7, 32*1024, UCT_MADV_WILLNEED); ++ status = uct_md_mem_advise(md(), memh, (char *)address + 7, 32*1024, UCT_MADV_WILLNEED); + EXPECT_UCS_OK(status); + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + EXPECT_UCS_OK(status); + free(address); + } +@@ -416,7 +420,7 @@ UCS_TEST_P(test_md, alloc_advise) { + + orig_size = size = 128 * 1024 * 1024; + +- status = uct_md_mem_alloc(pd(), &size, &address, ++ status = uct_md_mem_alloc(md(), &size, &address, + UCT_MD_MEM_FLAG_NONBLOCK| + UCT_MD_MEM_ACCESS_ALL, + "test", &memh); +@@ -425,11 +429,11 @@ UCS_TEST_P(test_md, alloc_advise) { + EXPECT_TRUE(address != NULL); + EXPECT_TRUE(memh != UCT_MEM_HANDLE_NULL); + +- status = uct_md_mem_advise(pd(), memh, (char *)address + 7, 32*1024, UCT_MADV_WILLNEED); ++ status = uct_md_mem_advise(md(), memh, (char *)address + 7, 32*1024, UCT_MADV_WILLNEED); + EXPECT_UCS_OK(status); + + memset(address, 0xBB, size); +- uct_md_mem_free(pd(), memh); ++ uct_md_mem_free(md(), memh); + } + + /* +@@ -442,7 +446,7 @@ UCS_TEST_P(test_md, reg_multi_thread) { + + check_caps(UCT_MD_FLAG_REG, "registration"); + +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + + if (!(md_attr.cap.reg_mem_types & UCS_BIT(UCT_MD_MEM_TYPE_HOST))) { +@@ -461,7 +465,7 @@ UCS_TEST_P(test_md, reg_multi_thread) { + ASSERT_TRUE(buffer != NULL); + + uct_mem_h memh; +- status = uct_md_mem_reg(pd(), buffer, size, ++ status = uct_md_mem_reg(md(), buffer, size, + UCT_MD_MEM_FLAG_NONBLOCK| + UCT_MD_MEM_ACCESS_ALL, + &memh); +@@ -470,7 +474,7 @@ UCS_TEST_P(test_md, reg_multi_thread) { + + sched_yield(); + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + EXPECT_UCS_OK(status); + free(buffer); + } +@@ -482,7 +486,7 @@ UCS_TEST_P(test_md, reg_multi_thread) { + UCS_TEST_P(test_md, sockaddr_accessibility) { + ucs_sock_addr_t sock_addr; + struct ifaddrs *ifaddr, *ifa; +- int rc_local, rc_remote, found_ipoib = 0; ++ int found_ipoib = 0; + + check_caps(UCT_MD_FLAG_SOCKADDR, "sockaddr"); + +@@ -493,22 +497,23 @@ UCS_TEST_P(test_md, sockaddr_accessibility) { + if (ucs::is_inet_addr(ifa->ifa_addr) && ucs_netif_is_active(ifa->ifa_name)) { + sock_addr.addr = ifa->ifa_addr; + +- rc_local = uct_md_is_sockaddr_accessible(pd(), &sock_addr, UCT_SOCKADDR_ACC_LOCAL); +- rc_remote = uct_md_is_sockaddr_accessible(pd(), &sock_addr, UCT_SOCKADDR_ACC_REMOTE); +- + if (!strcmp(GetParam().c_str(), "rdmacm")) { +- if (ucs::is_ib_netdev(ifa->ifa_name)) { ++ if (ucs::is_rdmacm_netdev(ifa->ifa_name)) { + UCS_TEST_MESSAGE << "Testing " << ifa->ifa_name << " with " << + ucs::sockaddr_to_str(ifa->ifa_addr); +- ASSERT_TRUE(rc_local); +- ASSERT_TRUE(rc_remote); ++ ASSERT_TRUE(uct_md_is_sockaddr_accessible(md(), &sock_addr, ++ UCT_SOCKADDR_ACC_LOCAL)); ++ ASSERT_TRUE(uct_md_is_sockaddr_accessible(md(), &sock_addr, ++ UCT_SOCKADDR_ACC_REMOTE)); + found_ipoib = 1; + } + } else { + UCS_TEST_MESSAGE << "Testing " << ifa->ifa_name << " with " << + ucs::sockaddr_to_str(ifa->ifa_addr); +- ASSERT_TRUE(rc_local); +- ASSERT_TRUE(rc_remote); ++ ASSERT_TRUE(uct_md_is_sockaddr_accessible(md(), &sock_addr, ++ UCT_SOCKADDR_ACC_LOCAL)); ++ ASSERT_TRUE(uct_md_is_sockaddr_accessible(md(), &sock_addr, ++ UCT_SOCKADDR_ACC_REMOTE)); + } + } + } +@@ -528,6 +533,7 @@ UCS_TEST_P(test_md, sockaddr_accessibility) { + sysv, \ + xpmem, \ + cuda_cpy, \ ++ cuda_ipc, \ + rocm, \ + ib, \ + ugni, \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.h +index e12f243..7d9aa98 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.h +@@ -34,16 +34,22 @@ protected: + + void test_registration(); + +- uct_md_h pd() { +- return m_pd; ++ uct_md_h md() const { ++ return m_md; + } + ++ const uct_md_attr_t& md_attr() const { ++ return m_md_attr; ++ } ++ ++ + static void* alloc_thread(void *arg); + static std::string const mem_types[]; + + private: + ucs::handle m_md_config; +- ucs::handle m_pd; ++ ucs::handle m_md; ++ uct_md_attr_t m_md_attr; + }; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_mm.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_mm.cc +index c59b719..af0f721 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_mm.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_mm.cc +@@ -84,7 +84,7 @@ UCS_TEST_P(test_uct_mm, open_for_posix) { + + /* set a callback for the uct to invoke for receiving the data */ + uct_iface_set_am_handler(m_e2->iface(), 0, mm_am_handler , recv_buffer, +- UCT_CB_FLAG_SYNC); ++ 0); + + /* send the data */ + uct_ep_am_short(m_e1->ep(0), 0, test_mm_hdr, &send_data, sizeof(send_data)); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_am.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_am.cc +index f4314e9..b8ee988 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_am.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_am.cc +@@ -208,7 +208,7 @@ public: + uct_memory_type_t mem_type) { + + if (receiver().iface_attr().cap.flags & UCT_IFACE_FLAG_CB_SYNC) { +- test_xfer_do(send, length, flags, UCT_CB_FLAG_SYNC, mem_type); ++ test_xfer_do(send, length, flags, 0, mem_type); + } + if (receiver().iface_attr().cap.flags & UCT_IFACE_FLAG_CB_ASYNC) { + test_xfer_do(send, length, flags, UCT_CB_FLAG_ASYNC, mem_type); +@@ -263,7 +263,7 @@ UCS_TEST_P(uct_p2p_am_test, am_sync) { + unsigned am_count = m_am_count = 0; + + status = uct_iface_set_am_handler(receiver().iface(), AM_ID, am_handler, +- this, UCT_CB_FLAG_SYNC); ++ this, 0); + ASSERT_UCS_OK(status); + + if (receiver().iface_attr().cap.flags & UCT_IFACE_FLAG_AM_SHORT) { +@@ -407,7 +407,7 @@ public: + + + UCS_TEST_P(uct_p2p_am_test, am_short) { +- check_caps(UCT_IFACE_FLAG_AM_SHORT); ++ check_caps(UCT_IFACE_FLAG_AM_SHORT, UCT_IFACE_FLAG_AM_DUP); + test_xfer_multi(static_cast(&uct_p2p_am_test::am_short), + sizeof(uint64_t), + sender().iface_attr().cap.am.max_short, +@@ -415,7 +415,7 @@ UCS_TEST_P(uct_p2p_am_test, am_short) { + } + + UCS_TEST_P(uct_p2p_am_test, am_bcopy) { +- check_caps(UCT_IFACE_FLAG_AM_BCOPY); ++ check_caps(UCT_IFACE_FLAG_AM_BCOPY, UCT_IFACE_FLAG_AM_DUP); + test_xfer_multi(static_cast(&uct_p2p_am_test::am_bcopy), + 0ul, + sender().iface_attr().cap.am.max_bcopy, +@@ -432,7 +432,7 @@ UCS_TEST_P(uct_p2p_am_test, am_short_keep_data) { + } + + UCS_TEST_P(uct_p2p_am_test, am_bcopy_keep_data) { +- check_caps(UCT_IFACE_FLAG_AM_BCOPY); ++ check_caps(UCT_IFACE_FLAG_AM_BCOPY, UCT_IFACE_FLAG_AM_DUP); + set_keep_data(true); + test_xfer_multi(static_cast(&uct_p2p_am_test::am_bcopy), + sizeof(uint64_t), +@@ -441,7 +441,7 @@ UCS_TEST_P(uct_p2p_am_test, am_bcopy_keep_data) { + } + + UCS_TEST_P(uct_p2p_am_test, am_zcopy) { +- check_caps(UCT_IFACE_FLAG_AM_ZCOPY); ++ check_caps(UCT_IFACE_FLAG_AM_ZCOPY, UCT_IFACE_FLAG_AM_DUP); + test_xfer_multi(static_cast(&uct_p2p_am_test::am_zcopy), + 0ul, + sender().iface_attr().cap.am.max_zcopy, +@@ -476,7 +476,7 @@ UCS_TEST_P(uct_p2p_am_misc, no_rx_buffs) { + + /* set a callback for the uct to invoke for receiving the data */ + status = uct_iface_set_am_handler(receiver().iface(), AM_ID, am_handler, +- (void*)this, UCT_CB_FLAG_SYNC); ++ (void*)this, 0); + ASSERT_UCS_OK(status); + + /* send many messages and progress the receiver. the receiver will keep getting +@@ -527,11 +527,14 @@ UCS_TEST_P(uct_p2p_am_misc, am_max_short_multi) { + ASSERT_UCS_OK(status); + } + +- /* do some progress */ +- short_progress_loop(50); +- +- /* should be able to send again */ +- status = uct_ep_am_short(sender_ep(), AM_ID, SEED1, NULL, 0); ++ /* should be able to send again after a while */ ++ ucs_time_t deadline = ucs_get_time() + ++ (ucs::test_time_multiplier() * ++ ucs_time_from_sec(DEFAULT_TIMEOUT_SEC)); ++ do { ++ progress(); ++ status = uct_ep_am_short(sender_ep(), AM_ID, SEED1, NULL, 0); ++ } while ((status == UCS_ERR_NO_RESOURCE) && (ucs_get_time() < deadline)); + EXPECT_EQ(UCS_OK, status); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_err.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_err.cc +index 6026836..12f0b1c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_err.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_err.cc +@@ -26,7 +26,7 @@ public: + }; + + uct_p2p_err_test() : +- uct_p2p_test(0, uct_error_handler_t(ucs_empty_function_return_success)) { ++ uct_p2p_test(0, error_handler) { + } + + static size_t pack_cb(void *dest, void *arg) +@@ -43,9 +43,7 @@ public: + { + pack_arg arg; + +- wrap_errors(); +- +- UCS_TEST_SCOPE_EXIT() { restore_errors(); } UCS_TEST_SCOPE_EXIT_END ++ scoped_log_handler slh(wrap_errors_logger); + + ucs_status_t status = UCS_OK; + ssize_t packed_len; +@@ -130,6 +128,20 @@ public: + + static ucs_status_t last_error; + ++private: ++ static ucs_status_t ++ error_handler(void *arg, uct_ep_h ep, ucs_status_t status) { ++ uct_p2p_err_test *self = static_cast(arg); ++ const p2p_resource *r = dynamic_cast(self->GetParam()); ++ ucs_assert_always(r != NULL); ++ if (r->loopback) { ++ /* In loop back IB TLs can generate QP flush error before remote ++ * access error. */ ++ ucs_log(UCS_LOG_LEVEL_ERROR, "Error on ep %p with status %s is handled", ++ ep, ucs_status_string(status)); ++ } ++ return UCS_OK; ++ } + }; + + ucs_status_t uct_p2p_err_test::last_error = UCS_OK; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.cc +index 9f9e324..c5ece1f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.cc +@@ -24,16 +24,21 @@ ucs_status_t uct_p2p_mix_test::am_callback(void *arg, void *data, size_t length, + + void uct_p2p_mix_test::completion_callback(uct_completion_t *comp, ucs_status_t status) + { +- ASSERT_UCS_OK(status); ++ EXPECT_UCS_OK(status); + } + +-ucs_status_t uct_p2p_mix_test::swap64(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp) ++template ++ucs_status_t uct_p2p_mix_test::uct_p2p_mix_test::atomic_fop(const mapped_buffer &sendbuf, ++ const mapped_buffer &recvbuf, ++ uct_completion_t *comp) + { +- return uct_ep_atomic_swap64(sender().ep(0), 1, recvbuf.addr(), +- recvbuf.rkey(), (uint64_t*)sendbuf.ptr(), +- comp); ++ if (sizeof(T) == sizeof(uint32_t)) { ++ return uct_ep_atomic32_fetch(sender().ep(0), OP, 1, (uint32_t*)sendbuf.ptr(), ++ recvbuf.addr(), recvbuf.rkey(), comp); ++ } else { ++ return uct_ep_atomic64_fetch(sender().ep(0), OP, 1, (uint64_t*)sendbuf.ptr(), ++ recvbuf.addr(), recvbuf.rkey(), comp); ++ } + } + + ucs_status_t uct_p2p_mix_test::cswap64(const mapped_buffer &sendbuf, +@@ -45,22 +50,6 @@ ucs_status_t uct_p2p_mix_test::cswap64(const mapped_buffer &sendbuf, + comp); + } + +-ucs_status_t uct_p2p_mix_test::uct_p2p_mix_test::fadd32(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp) +-{ +- return uct_ep_atomic_fadd32(sender().ep(0), 1, recvbuf.addr(), +- recvbuf.rkey(), (uint32_t*)sendbuf.ptr(), comp); +-} +- +-ucs_status_t uct_p2p_mix_test::swap32(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp) +-{ +- return uct_ep_atomic_swap32(sender().ep(0), 1, recvbuf.addr(), +- recvbuf.rkey(), (uint32_t*)sendbuf.ptr(), comp); +-} +- + ucs_status_t uct_p2p_mix_test::put_short(const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf, + uct_completion_t *comp) +@@ -166,6 +155,8 @@ void uct_p2p_mix_test::run(unsigned count) { + for (unsigned i = 0; i < count; ++i) { + random_op(sendbuf, recvbuf); + } ++ ++ sender().flush(); + } + + void uct_p2p_mix_test::init() { +@@ -192,17 +183,38 @@ void uct_p2p_mix_test::init() { + m_avail_send_funcs.push_back(&uct_p2p_mix_test::put_bcopy); + m_send_size = ucs_min(m_send_size, sender().iface_attr().cap.put.max_bcopy); + } +- if (sender().iface_attr().cap.flags & UCT_IFACE_FLAG_ATOMIC_SWAP64) { +- m_avail_send_funcs.push_back(&uct_p2p_mix_test::swap64); +- } +- if (sender().iface_attr().cap.flags & UCT_IFACE_FLAG_ATOMIC_CSWAP64) { ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_CSWAP)) { + m_avail_send_funcs.push_back(&uct_p2p_mix_test::cswap64); + } +- if (sender().iface_attr().cap.flags & UCT_IFACE_FLAG_ATOMIC_SWAP32) { +- m_avail_send_funcs.push_back(&uct_p2p_mix_test::swap32); ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_ADD)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_ADD)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_AND)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_AND)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_OR)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_OR)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_XOR)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_XOR)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_SWAP)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); + } +- if (sender().iface_attr().cap.flags & UCT_IFACE_FLAG_ATOMIC_FADD32) { +- m_avail_send_funcs.push_back(&uct_p2p_mix_test::fadd32); ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_SWAP)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.h +index d4dc51c..4588095 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.h +@@ -28,22 +28,15 @@ protected: + + static void completion_callback(uct_completion_t *comp, ucs_status_t status); + +- ucs_status_t swap64(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp); ++ template ++ ucs_status_t atomic_fop(const mapped_buffer &sendbuf, ++ const mapped_buffer &recvbuf, ++ uct_completion_t *comp); + + ucs_status_t cswap64(const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf, + uct_completion_t *comp); + +- ucs_status_t fadd32(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp); +- +- ucs_status_t swap32(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp); +- + ucs_status_t put_short(const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf, + uct_completion_t *comp); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.cc +index 574a778..832f02e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.cc +@@ -42,6 +42,13 @@ ucs_status_t uct_p2p_rma_test::put_zcopy(uct_ep_h ep, const mapped_buffer &sendb + return uct_ep_put_zcopy(ep, iov, iovcnt, recvbuf.addr(), recvbuf.rkey(), comp()); + } + ++ucs_status_t uct_p2p_rma_test::get_short(uct_ep_h ep, const mapped_buffer &sendbuf, ++ const mapped_buffer &recvbuf) ++{ ++ return uct_ep_get_short(ep, sendbuf.ptr(), sendbuf.length(), ++ recvbuf.addr(), recvbuf.rkey()); ++} ++ + ucs_status_t uct_p2p_rma_test::get_bcopy(uct_ep_h ep, const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf) + { +@@ -62,7 +69,13 @@ ucs_status_t uct_p2p_rma_test::get_zcopy(uct_ep_h ep, const mapped_buffer &sendb + void uct_p2p_rma_test::test_xfer(send_func_t send, size_t length, + unsigned flags, uct_memory_type_t mem_type) + { +- mapped_buffer sendbuf(length, SEED1, sender(), 1); ++ uct_memory_type_t src_mem_type = UCT_MD_MEM_TYPE_HOST; ++ ++ if ((GetParam()->tl_name.compare("cuda_ipc") == 0)) { ++ src_mem_type = mem_type; ++ } ++ ++ mapped_buffer sendbuf(length, SEED1, sender(), 1, src_mem_type); + mapped_buffer recvbuf(length, SEED2, receiver(), 3, mem_type); + + blocking_send(send, sender_ep(), sendbuf, recvbuf, true); +@@ -98,6 +111,13 @@ UCS_TEST_P(uct_p2p_rma_test, put_zcopy) { + TEST_UCT_FLAG_SEND_ZCOPY); + } + ++UCS_TEST_P(uct_p2p_rma_test, get_short) { ++ check_caps(UCT_IFACE_FLAG_GET_SHORT); ++ test_xfer_multi(static_cast(&uct_p2p_rma_test::get_short), ++ 0ul, sender().iface_attr().cap.get.max_short, ++ TEST_UCT_FLAG_RECV_ZCOPY); ++} ++ + UCS_TEST_P(uct_p2p_rma_test, get_bcopy) { + check_caps(UCT_IFACE_FLAG_GET_BCOPY); + test_xfer_multi(static_cast(&uct_p2p_rma_test::get_bcopy), +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.h +index d983593..599abe9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.h +@@ -26,6 +26,9 @@ public: + ucs_status_t put_zcopy(uct_ep_h ep, const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf); + ++ ucs_status_t get_short(uct_ep_h ep, const mapped_buffer &sendbuf, ++ const mapped_buffer &recvbuf); ++ + ucs_status_t get_bcopy(uct_ep_h ep, const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_peer_failure.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_peer_failure.cc +index 40bff86..78f0b08 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_peer_failure.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_peer_failure.cc +@@ -22,8 +22,7 @@ private: + void operator() (test_uct_peer_failure::entity *e) { + uct_iface_set_am_handler(e->iface(), 0, + am_dummy_handler, +- reinterpret_cast(m_test), +- UCT_CB_FLAG_SYNC); ++ reinterpret_cast(m_test), 0); + } + + test_uct_peer_failure* m_test; +@@ -40,8 +39,9 @@ public: + static uct_iface_params_t params; + + memset(¶ms, 0, sizeof(params)); +- params.err_handler = get_err_handler(); +- params.err_handler_arg = reinterpret_cast(this); ++ params.err_handler = get_err_handler(); ++ params.err_handler_arg = reinterpret_cast(this); ++ params.err_handler_flags = 0; + return params; + } + +@@ -187,9 +187,9 @@ void test_uct_peer_failure::init() + if (GetParam()->tl_name == "rc" || GetParam()->tl_name == "rc_mlx5" || + GetParam()->tl_name == "dc" || GetParam()->tl_name == "dc_mlx5") { + set_config("RC_TIMEOUT=100us"); /* 100 us should be enough */ +- set_config("RC_RETRY_COUNT=2"); ++ set_config("RC_RETRY_COUNT=4"); + } else if (GetParam()->tl_name == "ud" || GetParam()->tl_name == "ud_mlx5") { +- set_config("UD_TIMEOUT=1s"); ++ set_config("UD_TIMEOUT=3s"); + } + + uct_iface_params_t p = entity_params(); +@@ -210,14 +210,14 @@ UCS_TEST_P(test_uct_peer_failure, peer_failure) + { + check_caps(UCT_IFACE_FLAG_PUT_SHORT); + +- wrap_errors(); +- +- kill_receiver(); +- EXPECT_EQ(uct_ep_put_short(ep0(), NULL, 0, 0, 0), UCS_OK); ++ { ++ scoped_log_handler slh(wrap_errors_logger); + +- flush(); ++ kill_receiver(); ++ EXPECT_EQ(UCS_OK, uct_ep_put_short(ep0(), NULL, 0, 0, 0)); + +- restore_errors(); ++ flush(); ++ } + + UCS_TEST_GET_BUFFER_IOV(iov, iovcnt, NULL, 0, NULL, 1); + +@@ -234,15 +234,11 @@ UCS_TEST_P(test_uct_peer_failure, peer_failure) + UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_get_zcopy(ep0(), iov, iovcnt, 0, 0, NULL), + UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_add64(ep0(), 0, 0, 0), UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_add32(ep0(), 0, 0, 0), UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_fadd64(ep0(), 0, 0, 0, NULL, NULL), +- UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_fadd32(ep0(), 0, 0, 0, NULL, NULL), +- UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_swap64(ep0(), 0, 0, 0, NULL, NULL), ++ EXPECT_EQ(uct_ep_atomic64_post(ep0(), UCT_ATOMIC_OP_ADD, 0, 0, 0), UCS_ERR_ENDPOINT_TIMEOUT); ++ EXPECT_EQ(uct_ep_atomic32_post(ep0(), UCT_ATOMIC_OP_ADD, 0, 0, 0), UCS_ERR_ENDPOINT_TIMEOUT); ++ EXPECT_EQ(uct_ep_atomic64_fetch(ep0(), UCT_ATOMIC_OP_ADD, 0, NULL, 0, 0, NULL), + UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_swap32(ep0(), 0, 0, 0, NULL, NULL), ++ EXPECT_EQ(uct_ep_atomic32_fetch(ep0(), UCT_ATOMIC_OP_ADD, 0, NULL, 0, 0, NULL), + UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_atomic_cswap64(ep0(), 0, 0, 0, 0, NULL, NULL), + UCS_ERR_ENDPOINT_TIMEOUT); +@@ -250,7 +246,7 @@ UCS_TEST_P(test_uct_peer_failure, peer_failure) + UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_flush(ep0(), 0, NULL), UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_get_address(ep0(), NULL), UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_pending_add(ep0(), NULL), UCS_ERR_ENDPOINT_TIMEOUT); ++ EXPECT_EQ(uct_ep_pending_add(ep0(), NULL, 0), UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_connect_to_ep(ep0(), NULL, NULL), UCS_ERR_ENDPOINT_TIMEOUT); + + EXPECT_GT(m_err_count, 0ul); +@@ -265,23 +261,25 @@ UCS_TEST_P(test_uct_peer_failure, purge_failed_peer) + send_recv_am(0); + send_recv_am(1); + +- wrap_errors(); +- kill_receiver(); +- +- ucs_status_t status; +- do { +- status = uct_ep_am_short(ep0(), 0, 0, NULL, 0); +- } while (status == UCS_OK); +- + const size_t num_pend_sends = 3ul; + uct_pending_req_t reqs[num_pend_sends]; +- for (size_t i = 0; i < num_pend_sends; i ++) { +- reqs[i].func = pending_cb; +- EXPECT_EQ(uct_ep_pending_add(ep0(), &reqs[i]), UCS_OK); +- } ++ { ++ scoped_log_handler slh(wrap_errors_logger); + +- flush(); +- restore_errors(); ++ kill_receiver(); ++ ++ ucs_status_t status; ++ do { ++ status = uct_ep_am_short(ep0(), 0, 0, NULL, 0); ++ } while (status == UCS_OK); ++ ++ for (size_t i = 0; i < num_pend_sends; i ++) { ++ reqs[i].func = pending_cb; ++ EXPECT_EQ(uct_ep_pending_add(ep0(), &reqs[i], 0), UCS_OK); ++ } ++ ++ flush(); ++ } + + EXPECT_EQ(uct_ep_am_short(ep0(), 0, 0, NULL, 0), UCS_ERR_ENDPOINT_TIMEOUT); + +@@ -302,12 +300,13 @@ UCS_TEST_P(test_uct_peer_failure, two_pairs_send) + } + + /* kill the 1st receiver while sending on 2nd pair */ +- wrap_errors(); +- kill_receiver(); +- send_am(0); +- send_recv_am(1); +- flush(); +- restore_errors(); ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ kill_receiver(); ++ send_am(0); ++ send_recv_am(1); ++ flush(); ++ } + + /* test flushing one operations */ + send_recv_am(0, UCS_ERR_ENDPOINT_TIMEOUT); +@@ -329,13 +328,14 @@ UCS_TEST_P(test_uct_peer_failure, two_pairs_send_after) + + set_am_handlers(); + +- wrap_errors(); +- kill_receiver(); +- for (int i = 0; i < 100; ++i) { +- send_am(0); ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ kill_receiver(); ++ for (int i = 0; i < 100; ++i) { ++ send_am(0); ++ } ++ flush(); + } +- flush(); +- restore_errors(); + + send_recv_am(0, UCS_ERR_ENDPOINT_TIMEOUT); + +@@ -368,11 +368,10 @@ UCS_TEST_P(test_uct_peer_failure_cb, desproy_ep_cb) + { + check_caps(UCT_IFACE_FLAG_PUT_SHORT); + +- wrap_errors(); ++ scoped_log_handler slh(wrap_errors_logger); + kill_receiver(); + EXPECT_EQ(uct_ep_put_short(ep0(), NULL, 0, 0, 0), UCS_OK); + flush(); +- restore_errors(); + } + + UCT_INSTANTIATE_TEST_CASE(test_uct_peer_failure_cb) +@@ -445,24 +444,25 @@ UCS_TEST_P(test_uct_peer_failure_multiple, test, "RC_TM_ENABLE?=n") + ucs_time_t timeout = ucs_get_time() + + ucs_time_from_sec(200 * ucs::test_time_multiplier()); + +- wrap_errors(); +- for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { +- for (size_t i = 0; i < m_tx_window; ++i) { +- send_am(idx); ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { ++ for (size_t i = 0; i < m_tx_window; ++i) { ++ send_am(idx); ++ } ++ kill_receiver(); + } +- kill_receiver(); +- } +- flush(timeout); ++ flush(timeout); + +- /* if EPs are not failed yet, these ops should trigger that */ +- for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { +- for (size_t i = 0; i < m_tx_window; ++i) { +- send_am(idx); ++ /* if EPs are not failed yet, these ops should trigger that */ ++ for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { ++ for (size_t i = 0; i < m_tx_window; ++i) { ++ send_am(idx); ++ } + } +- } + +- flush(timeout); +- restore_errors(); ++ flush(timeout); ++ } + + for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { + send_recv_am(idx, UCS_ERR_ENDPOINT_TIMEOUT); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_pending.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_pending.cc +index 6bbf74b..3893547 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_pending.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_pending.cc +@@ -34,6 +34,7 @@ public: + uct_pending_req_t uct; + int active; + int id; ++ mapped_buffer *buf; + } pending_send_request_t; + + static ucs_status_t am_handler(void *arg, void *data, size_t length, +@@ -70,7 +71,7 @@ public: + status = uct_ep_am_short(req->ep, 0, test_pending_hdr, &req->data, + sizeof(req->data)); + if (status == UCS_OK) { +- delete req; ++ pending_delete(req); + } + return status; + } +@@ -91,6 +92,29 @@ public: + return status; + } + ++ static ucs_status_t pending_send_op_bcopy(uct_pending_req_t *self) { ++ ++ pending_send_request_t *req = ucs_container_of(self, pending_send_request_t, uct); ++ ssize_t packed_len; ++ ++ packed_len = uct_ep_am_bcopy(req->ep, 0, mapped_buffer::pack, req->buf, 0); ++ if (packed_len > 0) { ++ req->countdown ++; ++ n_pending--; ++ req->active = 0; ++ return UCS_OK; ++ } ++ return (ucs_status_t)packed_len; ++ } ++ ++ static ucs_status_t pending_send_op_ok(uct_pending_req_t *self) { ++ pending_send_request_t *req = ucs_container_of(self, pending_send_request_t, uct); ++ ++ pending_delete(req); ++ n_pending--; ++ return UCS_OK; ++ } ++ + pending_send_request_t* pending_alloc(uint64_t send_data) { + pending_send_request_t *req = new pending_send_request_t(); + req->ep = m_e1->ep(0); +@@ -111,6 +135,20 @@ public: + return req; + } + ++ pending_send_request_t* pending_alloc_simple(mapped_buffer *sbuf, int idx) { ++ pending_send_request_t *req = new pending_send_request_t(); ++ req->ep = m_e1->ep(idx); ++ req->buf = sbuf; ++ req->countdown = 0; ++ req->uct.func = pending_send_op_bcopy; ++ req->active = 0; ++ req->id = idx; ++ return req; ++ } ++ ++ static void pending_delete(pending_send_request_t *req) { ++ delete req; ++ } + + protected: + static const uint64_t test_pending_hdr = 0xabcd; +@@ -129,8 +167,9 @@ void install_handler_sync_or_async(uct_iface_t *iface, uint8_t id, uct_am_callba + ASSERT_UCS_OK(status); + + if (attr.cap.flags & UCT_IFACE_FLAG_CB_SYNC) { +- uct_iface_set_am_handler(iface, id, cb, arg, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(iface, id, cb, arg, 0); + } else { ++ ASSERT_TRUE(attr.cap.flags & UCT_IFACE_FLAG_CB_ASYNC); + uct_iface_set_am_handler(iface, id, cb, arg, UCT_CB_FLAG_ASYNC); + } + } +@@ -159,11 +198,11 @@ UCS_TEST_P(test_uct_pending, pending_op) + + pending_send_request_t *req = pending_alloc(send_data); + +- status = uct_ep_pending_add(m_e1->ep(0), &req->uct); ++ status = uct_ep_pending_add(m_e1->ep(0), &req->uct, 0); + if (status != UCS_OK) { + /* the request wasn't added to the pending data structure + * since resources became available. retry sending this message */ +- delete req; ++ pending_delete(req); + } else { + /* the request was added to the pending data structure */ + send_data += 1; +@@ -209,9 +248,9 @@ UCS_TEST_P(test_uct_pending, send_ooo_with_pending) + + pending_send_request_t *req = pending_alloc(send_data); + +- status_pend = uct_ep_pending_add(m_e1->ep(0), &req->uct); ++ status_pend = uct_ep_pending_add(m_e1->ep(0), &req->uct, 0); + if (status_pend == UCS_ERR_BUSY) { +- delete req; ++ pending_delete(req); + } else { + /* coverity[leaked_storage] */ + ++send_data; +@@ -254,6 +293,116 @@ UCS_TEST_P(test_uct_pending, send_ooo_with_pending) + EXPECT_EQ(exp_counter, counter); + } + ++/* ++ * test that the pending op callback is only called from the progress() ++ */ ++UCS_TEST_P(test_uct_pending, pending_async) ++{ ++ pending_send_request_t *req = NULL; ++ ucs_status_t status; ++ ssize_t packed_len; ++ ++ initialize(); ++ check_caps(UCT_IFACE_FLAG_AM_BCOPY | UCT_IFACE_FLAG_PENDING); ++ ++ mapped_buffer sbuf(ucs_min(64ul, m_e1->iface_attr().cap.am.max_bcopy), 0, ++ *m_e1); ++ ++ req = pending_alloc_simple(&sbuf, 0); ++ ++ /* set a callback for the uct to invoke when receiving the data */ ++ install_handler_sync_or_async(m_e2->iface(), 0, am_handler_simple, 0); ++ ++ /* send while resources are available */ ++ n_pending = 0; ++ do { ++ packed_len = uct_ep_am_bcopy(m_e1->ep(0), 0, mapped_buffer::pack, ++ &sbuf, 0); ++ } while (packed_len >= 0); ++ ++ EXPECT_TRUE(packed_len == UCS_ERR_NO_RESOURCE); ++ ++ status = uct_ep_pending_add(m_e1->ep(0), &req->uct, 0); ++ EXPECT_UCS_OK(status); ++ n_pending++; ++ ++ /* pending op must not be called either asynchronously or from the ++ * uct_ep_am_bcopy() */ ++ twait(300); ++ EXPECT_EQ(1, n_pending); ++ ++ packed_len = uct_ep_am_bcopy(m_e1->ep(0), 0, mapped_buffer::pack, &sbuf, 0); ++ EXPECT_EQ(1, n_pending); ++ EXPECT_GT(0, packed_len); ++ ++ wait_for_value(&n_pending, 0, true); ++ EXPECT_EQ(0, n_pending); ++ pending_delete(req); ++} ++ ++/* ++ * test that arbiter does not block when ucs_ok is returned ++ * The issue is a dc transport specific but test may be also useful ++ * for other transports ++ */ ++UCS_TEST_P(test_uct_pending, pending_ucs_ok_dc_arbiter_bug) ++{ ++ ucs_status_t status; ++ ssize_t packed_len; ++ int N; ++ int i; ++ ++ initialize(); ++ check_caps(UCT_IFACE_FLAG_AM_BCOPY | UCT_IFACE_FLAG_PENDING); ++ ++ mapped_buffer sbuf(ucs_min(64ul, m_e1->iface_attr().cap.am.max_bcopy), 0, ++ *m_e1); ++ ++ /* set a callback for the uct to invoke when receiving the data */ ++ install_handler_sync_or_async(m_e2->iface(), 0, am_handler_simple, 0); ++ ++ if (RUNNING_ON_VALGRIND) { ++ N = 64; ++ } else if (m_e1->iface_attr().cap.flags & UCT_IFACE_FLAG_CONNECT_TO_IFACE) { ++ N = 2048; ++ } else { ++ N = 128; ++ } ++ ++ N = ucs_min(N, max_connections()); ++ ++ /* idx 0 is setup in initialize(). only need to alloc request */ ++ for (i = 1; i < N; i++) { ++ m_e1->connect(i, *m_e2, i); ++ } ++ /* give a chance to finish connection for some transports (ud) */ ++ short_progress_loop(); ++ ++ n_pending = 0; ++ ++ /* try to exaust global resources and create a pending queue */ ++ for (i = 0; i < N; i++) { ++ packed_len = uct_ep_am_bcopy(m_e1->ep(i), 0, mapped_buffer::pack, ++ &sbuf, 0); ++ ++ if (packed_len == UCS_ERR_NO_RESOURCE) { ++ pending_send_request_t *req = pending_alloc(i); ++ ++ req->uct.func = pending_send_op_ok; ++ status = uct_ep_pending_add(m_e1->ep(i), &req->uct, 0); ++ EXPECT_UCS_OK(status); ++ n_pending++; ++ /* coverity[leaked_storage] */ ++ } ++ } ++ ++ UCS_TEST_MESSAGE << "pending queue len: " << n_pending; ++ ++ wait_for_value(&n_pending, 0, true); ++ EXPECT_EQ(0, n_pending); ++} ++ ++ + UCS_TEST_P(test_uct_pending, pending_fairness) + { + int N=16; +@@ -296,7 +445,8 @@ UCS_TEST_P(test_uct_pending, pending_fairness) + &send_data, sizeof(send_data)); + if (status == UCS_ERR_NO_RESOURCE) { + /* schedule pending */ +- status = uct_ep_pending_add(m_e1->ep(i), &reqs[i]->uct); ++ status = uct_ep_pending_add(m_e1->ep(i), &reqs[i]->uct, ++ 0); + if (status == UCS_ERR_BUSY) { + continue; /* retry */ + } +@@ -343,7 +493,7 @@ UCS_TEST_P(test_uct_pending, pending_fairness) + flush(); + + for (i = 0; i < N; i++) { +- delete reqs[i]; ++ pending_delete(reqs[i]); + } + + /* there must be no starvation */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_stats.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_stats.cc +index 571b4c6..77ce0b6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_stats.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_stats.cc +@@ -31,7 +31,7 @@ public: + void init_bufs(size_t min, size_t max) + { + size_t size = ucs_max(min, ucs_min(64ul, max)); +- lbuf = new mapped_buffer(size, 0, sender()); ++ lbuf = new mapped_buffer(size, 0, sender(), 0, sender().md_attr().cap.mem_type); + rbuf = new mapped_buffer(size, 0, receiver(), 0, sender().md_attr().cap.mem_type); + } + +@@ -284,43 +284,55 @@ UCS_TEST_P(test_uct_stats, get_zcopy) + lbuf->length()); + } + +-#define TEST_STATS_ATOMIC_ADD(val) \ +-UCS_TEST_P(test_uct_stats, atomic_add ## val) \ +-{ \ +- ucs_status_t status; \ +-\ +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD ## val); \ +- init_bufs(sizeof(uint##val##_t), sizeof(uint##val##_t)); \ +- status = uct_ep_atomic_add ## val (sender_ep(), 1, rbuf->addr(), rbuf->rkey()); \ +- EXPECT_UCS_OK(status); \ +- check_atomic_counters(); \ ++#define TEST_STATS_ATOMIC_POST(_op, _val) \ ++UCS_TEST_P(test_uct_stats, atomic_post_ ## _op ## _val) \ ++{ \ ++ ucs_status_t status; \ ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ ## _op), OP ## _val); \ ++ init_bufs(sizeof(uint##_val##_t), sizeof(uint##_val##_t)); \ ++ status = uct_ep_atomic ##_val##_post(sender_ep(), (UCT_ATOMIC_OP_ ## _op), \ ++ 1, rbuf->addr(), rbuf->rkey()); \ ++ EXPECT_UCS_OK(status); \ ++ check_atomic_counters(); \ + } + +-TEST_STATS_ATOMIC_ADD(32) +- +-TEST_STATS_ATOMIC_ADD(64) +- +-#define TEST_STATS_ATOMIC_FUNC(func, flag, val) \ +-UCS_TEST_P(test_uct_stats, atomic_##func##val) \ +-{ \ +- ucs_status_t status; \ +- uint##val##_t result; \ +-\ +- check_caps(UCT_IFACE_FLAG_ATOMIC_ ## flag ## val); \ +- init_bufs(sizeof(result), sizeof(result)); \ +-\ +- init_completion(); \ +- status = uct_ep_atomic_##func##val (sender_ep(), 1, rbuf->addr(), rbuf->rkey(), &result, &m_comp); \ +- wait_for_completion(status); \ +-\ +- check_atomic_counters(); \ ++TEST_STATS_ATOMIC_POST(ADD, 32) ++TEST_STATS_ATOMIC_POST(ADD, 64) ++TEST_STATS_ATOMIC_POST(AND, 32) ++TEST_STATS_ATOMIC_POST(AND, 64) ++TEST_STATS_ATOMIC_POST(OR, 32) ++TEST_STATS_ATOMIC_POST(OR, 64) ++TEST_STATS_ATOMIC_POST(XOR, 32) ++TEST_STATS_ATOMIC_POST(XOR, 64) ++ ++ ++#define TEST_STATS_ATOMIC_FETCH(_op, _val) \ ++UCS_TEST_P(test_uct_stats, atomic_fetch_## _op ## _val) \ ++{ \ ++ ucs_status_t status; \ ++ uint##_val##_t result; \ ++ \ ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ ## _op), FOP ## _val); \ ++ init_bufs(sizeof(result), sizeof(result)); \ ++ \ ++ init_completion(); \ ++ status = uct_ep_atomic##_val##_fetch(sender_ep(), (UCT_ATOMIC_OP_ ## _op), 1, \ ++ &result, rbuf->addr(), rbuf->rkey(), &m_comp); \ ++ wait_for_completion(status); \ ++ \ ++ check_atomic_counters(); \ + } + +-TEST_STATS_ATOMIC_FUNC(fadd, FADD, 32) +-TEST_STATS_ATOMIC_FUNC(fadd, FADD, 64) +- +-TEST_STATS_ATOMIC_FUNC(swap, SWAP, 32) +-TEST_STATS_ATOMIC_FUNC(swap, SWAP, 64) ++TEST_STATS_ATOMIC_FETCH(ADD, 32) ++TEST_STATS_ATOMIC_FETCH(ADD, 64) ++TEST_STATS_ATOMIC_FETCH(AND, 32) ++TEST_STATS_ATOMIC_FETCH(AND, 64) ++TEST_STATS_ATOMIC_FETCH(OR, 32) ++TEST_STATS_ATOMIC_FETCH(OR, 64) ++TEST_STATS_ATOMIC_FETCH(XOR, 32) ++TEST_STATS_ATOMIC_FETCH(XOR, 64) ++TEST_STATS_ATOMIC_FETCH(SWAP, 32) ++TEST_STATS_ATOMIC_FETCH(SWAP, 64) + + #define TEST_STATS_ATOMIC_CSWAP(val) \ + UCS_TEST_P(test_uct_stats, atomic_cswap##val) \ +@@ -328,7 +340,7 @@ UCS_TEST_P(test_uct_stats, atomic_cswap##val) \ + ucs_status_t status; \ + uint##val##_t result; \ + \ +- check_caps(UCT_IFACE_FLAG_ATOMIC_CSWAP ## val); \ ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_CSWAP), FOP ## val); \ + init_bufs(sizeof(result), sizeof(result)); \ + \ + init_completion(); \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_tag.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_tag.cc +index dc0d483..b86218e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_tag.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_tag.cc +@@ -10,6 +10,11 @@ extern "C" { + #include + #include "uct_test.h" + ++#define UCT_TAG_INSTANTIATE_TEST_CASE(_test_case) \ ++ _UCT_INSTANTIATE_TEST_CASE(_test_case, rc) \ ++ _UCT_INSTANTIATE_TEST_CASE(_test_case, dc) \ ++ _UCT_INSTANTIATE_TEST_CASE(_test_case, rc_mlx5) \ ++ _UCT_INSTANTIATE_TEST_CASE(_test_case, dc_mlx5) + + class test_tag : public uct_test { + public: +@@ -36,30 +41,28 @@ public: + }; + + struct send_ctx { +- send_ctx(mapped_buffer *b, uct_tag_t t, uint64_t i) : +- mbuf(b), rndv_op(NULL), tag(t), imm_data(i) { +- +- uct_comp.count = 2; +- uct_comp.func = NULL; +- sw_rndv = false; +- } + mapped_buffer *mbuf; + void *rndv_op; + uct_tag_t tag; + uint64_t imm_data; + uct_completion_t uct_comp; +- bool sw_rndv; ++ ucs_status_t status; ++ bool sw_rndv; ++ bool comp; ++ bool unexp; + }; + + typedef ucs_status_t (test_tag::*send_func)(entity&, send_ctx&); + +- void init() { ++ void init() ++ { + ucs_status_t status = uct_config_modify(m_iface_config, "RC_TM_ENABLE", "y"); + ASSERT_TRUE((status == UCS_OK) || (status == UCS_ERR_NO_ELEM)); + + uct_test::init(); + + uct_iface_params params; ++ memset(¶ms, 0, sizeof(params)); + + // tl and dev names are taken from resources via GetParam, no need + // to fill it here +@@ -86,8 +89,23 @@ public: + } + } + ++ void init_send_ctx(send_ctx &s,mapped_buffer *b, uct_tag_t t, uint64_t i, ++ bool unexp_flow = true) ++ { ++ s.mbuf = b; ++ s.rndv_op = NULL; ++ s.tag = t; ++ s.imm_data = i; ++ s.uct_comp.count = 1; ++ s.uct_comp.func = send_completion; ++ s.sw_rndv = s.comp = false; ++ s.unexp = unexp_flow; ++ s.status = UCS_ERR_NO_PROGRESS; ++ } ++ + void init_recv_ctx(recv_ctx &r, mapped_buffer *b, uct_tag_t t, +- uct_tag_t m = MASK, bool uct_d = false) { ++ uct_tag_t m = MASK, bool uct_d = false) ++ { + r.mbuf = b; + r.tag = t; + r.tmask = m; +@@ -95,13 +113,17 @@ public: + r.uct_ctx.tag_consumed_cb = tag_consumed; + r.uct_ctx.rndv_cb = sw_rndv_completed; + r.take_uct_desc = uct_d; ++ r.status = UCS_ERR_NO_PROGRESS; + r.comp = r.unexp = r.consumed = r.sw_rndv = false; + } + + ucs_status_t tag_eager_short(entity &e, send_ctx &ctx) + { +- return uct_ep_tag_eager_short(e.ep(0), ctx.tag, ctx.mbuf->ptr(), +- ctx.mbuf->length()); ++ ctx.status = uct_ep_tag_eager_short(e.ep(0), ctx.tag, ctx.mbuf->ptr(), ++ ctx.mbuf->length()); ++ ctx.comp = true; ++ ++ return ctx.status; + } + + ucs_status_t tag_eager_bcopy(entity &e, send_ctx &ctx) +@@ -110,8 +132,10 @@ public: + ctx.imm_data, mapped_buffer::pack, + reinterpret_cast(ctx.mbuf), + 0); ++ ctx.status = (status >= 0) ? UCS_OK : static_cast(status); ++ ctx.comp = true; + +- return (status >= 0) ? UCS_OK : static_cast(status); ++ return ctx.status; + } + + ucs_status_t tag_eager_zcopy(entity &e, send_ctx &ctx) +@@ -155,14 +179,25 @@ public: + + ucs_status_t tag_rndv_request(entity &e, send_ctx &ctx) + { +- rndv_hdr hdr = {{ctx.imm_data, +- reinterpret_cast(&ctx) +- }, +- 0xFAFA +- }; + ctx.sw_rndv = true; + +- return uct_ep_tag_rndv_request(e.ep(0), ctx.tag, &hdr, sizeof(hdr), 0); ++ if (ctx.unexp) { ++ // Unexpected flow, will need to analyze ctx data on the receiver ++ rndv_hdr hdr = {{ctx.imm_data, ++ reinterpret_cast(&ctx) ++ }, ++ 0xFAFA ++ }; ++ ctx.status = uct_ep_tag_rndv_request(e.ep(0), ctx.tag, &hdr, ++ sizeof(hdr), 0); ++ } else { ++ // Expected flow, send just plain data (will be stored in rx buf by HCA) ++ ctx.status = uct_ep_tag_rndv_request(e.ep(0), ctx.tag, ctx.mbuf->ptr(), ++ ctx.mbuf->length(), 0); ++ } ++ ctx.comp = true; ++ ++ return ctx.status; + } + + ucs_status_t tag_post(entity &e, recv_ctx &ctx) +@@ -184,20 +219,33 @@ public: + // called). And it is vice versa if message arrives unexpectedly. + // If expected SW RNDV request arrives tag_consumed and sw_rndv_cb + // should be called. +- void check_completion(recv_ctx &ctx, bool is_expected, uint64_t seed, +- ucs_status_t status = UCS_OK, bool is_sw_rndv = false) { +- EXPECT_EQ(ctx.consumed, is_expected); +- EXPECT_EQ(ctx.comp, (is_expected && !is_sw_rndv)); +- EXPECT_EQ(ctx.unexp, (!is_expected && !is_sw_rndv)); +- EXPECT_EQ(ctx.sw_rndv, is_sw_rndv); +- EXPECT_EQ(ctx.status, status); +- if (is_expected) { +- ctx.mbuf->pattern_check(seed); +- } +- } +- +- void test_tag_expected(send_func sfunc, size_t length = 75) { +- uct_tag_t tag = 11; ++ void check_rx_completion(recv_ctx &ctx, bool is_expected, uint64_t seed, ++ ucs_status_t status = UCS_OK, bool is_sw_rndv = false) ++ { ++ EXPECT_EQ(ctx.consumed, is_expected); ++ EXPECT_EQ(ctx.comp, (is_expected && !is_sw_rndv)); ++ EXPECT_EQ(ctx.unexp, (!is_expected && !is_sw_rndv)); ++ EXPECT_EQ(ctx.sw_rndv, is_sw_rndv); ++ EXPECT_EQ(ctx.status, status); ++ if (is_expected) { ++ ctx.mbuf->pattern_check(seed); ++ } ++ } ++ ++ void check_tx_completion(send_ctx &ctx) ++ { ++ wait_for_flag(&ctx.comp); ++ EXPECT_TRUE(ctx.comp); ++ EXPECT_EQ(ctx.status, UCS_OK); ++ } ++ ++ void test_tag_expected(send_func sfunc, size_t length = 75, ++ bool is_sw_rndv = false) { ++ uct_tag_t tag = 11; ++ ++ if (RUNNING_ON_VALGRIND) { ++ length = ucs_min(length, 128U); ++ } + + mapped_buffer recvbuf(length, RECV_SEED, receiver()); + recv_ctx r_ctx; +@@ -207,25 +255,36 @@ public: + short_progress_loop(); + + mapped_buffer sendbuf(length, SEND_SEED, sender()); +- send_ctx s_ctx(&sendbuf, tag, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, tag, reinterpret_cast(&r_ctx), ++ false); + ASSERT_UCS_OK((this->*sfunc)(sender(), s_ctx)); + +- wait_for_flag(&r_ctx.comp); ++ wait_for_flag(is_sw_rndv ? &r_ctx.sw_rndv : &r_ctx.comp); ++ ++ check_rx_completion(r_ctx, true, SEND_SEED, UCS_OK, is_sw_rndv); + +- check_completion(r_ctx, true, SEND_SEED); ++ // If it was RNDV send, need to wait send completion as well ++ check_tx_completion(s_ctx); + + flush(); + } + + void test_tag_unexpected(send_func sfunc, size_t length = 75, +- bool take_uct_desc = false) { ++ bool take_uct_desc = false) ++ { + uct_tag_t tag = 11; + ++ if (RUNNING_ON_VALGRIND) { ++ length = ucs_min(length, 128U); ++ } ++ + mapped_buffer recvbuf(length, RECV_SEED, receiver()); + mapped_buffer sendbuf(length, SEND_SEED, sender()); + recv_ctx r_ctx; + init_recv_ctx(r_ctx, &recvbuf, tag, MASK, take_uct_desc); +- send_ctx s_ctx(&sendbuf, tag, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, tag, reinterpret_cast(&r_ctx)); + ASSERT_UCS_OK((this->*sfunc)(sender(), s_ctx)); + + wait_for_flag(&r_ctx.unexp); +@@ -236,11 +295,12 @@ public: + ASSERT_UCS_OK(tag_rndv_cancel(sender(), s_ctx.rndv_op)); + } + +- check_completion(r_ctx, false, SEND_SEED); ++ check_rx_completion(r_ctx, false, SEND_SEED); + flush(); + } + +- void test_tag_wrong_tag(send_func sfunc) { ++ void test_tag_wrong_tag(send_func sfunc) ++ { + const size_t length = 65; + uct_tag_t tag = 11; + +@@ -251,7 +311,8 @@ public: + // and not to be macthed. + recv_ctx r_ctx; + init_recv_ctx(r_ctx, &recvbuf, tag + 1); +- send_ctx s_ctx(&sendbuf, tag, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, tag, reinterpret_cast(&r_ctx)); + + ASSERT_UCS_OK((this->*sfunc)(sender(), s_ctx)); + +@@ -263,11 +324,12 @@ public: + + // Message should be reported as unexpected and filled with + // recv seed (unchanged), as the incoming tag does not match the expected +- check_completion(r_ctx, false, RECV_SEED); ++ check_rx_completion(r_ctx, false, RECV_SEED); + flush(); + } + +- void test_tag_mask(send_func sfunc) { ++ void test_tag_mask(send_func sfunc) ++ { + const size_t length = 65; + + mapped_buffer recvbuf(length, RECV_SEED, receiver()); +@@ -281,12 +343,16 @@ public: + short_progress_loop(); + + mapped_buffer sendbuf(length, SEND_SEED, sender()); +- send_ctx s_ctx(&sendbuf, 0xffff, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, 0xffff, reinterpret_cast(&r_ctx)); + ASSERT_UCS_OK((this->*sfunc)(sender(), s_ctx)); + wait_for_flag(&r_ctx.comp); + + // Should be matched because tags are equal with tag mask applied. +- check_completion(r_ctx, true, SEND_SEED); ++ check_rx_completion(r_ctx, true, SEND_SEED); ++ ++ // If it was RNDV send, need to wait send completion as well ++ check_tx_completion(s_ctx); + flush(); + } + +@@ -366,7 +432,8 @@ public: + } + + static ucs_status_t am_handler(void *arg, void *data, size_t length, +- unsigned flags) { ++ unsigned flags) ++ { + is_am_received = true; + return UCS_OK; + } +@@ -382,6 +449,14 @@ public: + return UCS_LOG_FUNC_RC_CONTINUE; + } + ++ static void send_completion(uct_completion_t *self, ucs_status_t status) ++ { ++ send_ctx *user_ctx = ucs_container_of(self, send_ctx, uct_comp); ++ user_ctx->comp = true; ++ user_ctx->status = status; ++ } ++ ++ + protected: + uct_test::entity& sender() { + return **m_entities.begin(); +@@ -509,8 +584,7 @@ UCS_TEST_P(test_tag, tag_send_no_tag) + { + check_caps(UCT_IFACE_FLAG_TAG_EAGER_BCOPY); + +- uct_iface_set_am_handler(receiver().iface(), 0, am_handler, +- NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(receiver().iface(), 0, am_handler, NULL, 0); + mapped_buffer lbuf(200, SEND_SEED, sender()); + ssize_t len = uct_ep_am_bcopy(sender().ep(0), 0, mapped_buffer::pack, + reinterpret_cast(&lbuf), 0); +@@ -535,13 +609,14 @@ UCS_TEST_P(test_tag, tag_cancel_force) + short_progress_loop(); + + mapped_buffer sendbuf(length, SEND_SEED, sender()); +- send_ctx s_ctx(&sendbuf, 1, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, 1, reinterpret_cast(&r_ctx)); + ASSERT_UCS_OK(tag_eager_bcopy(sender(), s_ctx)); + + // Message should arrive unexpected, since tag was cancelled + // on the receiver. + wait_for_flag(&r_ctx.unexp); +- check_completion(r_ctx, false, SEND_SEED); ++ check_rx_completion(r_ctx, false, SEND_SEED); + } + + UCS_TEST_P(test_tag, tag_cancel_noforce) +@@ -557,7 +632,7 @@ UCS_TEST_P(test_tag, tag_cancel_noforce) + short_progress_loop(200); + ASSERT_UCS_OK(tag_cancel(receiver(), r_ctx, 0)); + +- short_progress_loop(); ++ wait_for_flag(&r_ctx.comp); + + // Check that completed callback has been called with CANCELED status + // (because 0 was passed as force parameter to cancel). +@@ -604,28 +679,8 @@ UCS_TEST_P(test_tag, sw_rndv_expected) + { + check_caps(UCT_IFACE_FLAG_TAG_EAGER_BCOPY | UCT_IFACE_FLAG_TAG_RNDV_ZCOPY); + +- uct_tag_t tag = 11; +- const size_t length = sender().iface_attr().cap.tag.rndv.max_hdr; +- +- mapped_buffer recvbuf(length, RECV_SEED, receiver()); +- recv_ctx r_ctx; +- init_recv_ctx(r_ctx, &recvbuf, tag); +- ASSERT_UCS_OK(tag_post(receiver(), r_ctx)); +- +- short_progress_loop(); +- +- mapped_buffer sendbuf(length, SEND_SEED, sender()); +- send_ctx s_ctx(&sendbuf, tag, reinterpret_cast(&r_ctx)); +- +- ASSERT_UCS_OK(uct_ep_tag_rndv_request(sender().ep(0), s_ctx.tag, +- s_ctx.mbuf->ptr(), +- s_ctx.mbuf->length(), 0)); +- +- wait_for_flag(&r_ctx.sw_rndv); +- +- check_completion(r_ctx, true, SEND_SEED, UCS_OK, true); +- +- flush(); ++ test_tag_expected(static_cast(&test_tag::tag_rndv_request), ++ sender().iface_attr().cap.tag.rndv.max_hdr, true); + } + + UCS_TEST_P(test_tag, rndv_limit) +@@ -639,7 +694,8 @@ UCS_TEST_P(test_tag, rndv_limit) + void *op; + + do { +- sctx_p = new send_ctx(&sendbuf, 0xffff, 0); ++ sctx_p = new send_ctx; ++ init_send_ctx(*sctx_p, &sendbuf, 0xffff, 0); + status = tag_rndv_zcopy(sender(), *sctx_p); + sctxs.push_back(sctx_p); + } while (status == UCS_OK); +@@ -666,7 +722,171 @@ UCS_TEST_P(test_tag, sw_rndv_unexpected) + test_tag_unexpected(static_cast(&test_tag::tag_rndv_request)); + } + +-_UCT_INSTANTIATE_TEST_CASE(test_tag, rc) +-_UCT_INSTANTIATE_TEST_CASE(test_tag, dc) +-_UCT_INSTANTIATE_TEST_CASE(test_tag, rc_mlx5) +-_UCT_INSTANTIATE_TEST_CASE(test_tag, dc_mlx5) ++UCT_TAG_INSTANTIATE_TEST_CASE(test_tag) ++ ++ ++#if ENABLE_STATS && IBV_EXP_HW_TM ++extern "C" { ++#include ++#include ++#include ++} ++ ++class test_tag_stats : public test_tag { ++public: ++ void init() { ++ stats_activate(); ++ test_tag::init(); ++ } ++ ++ void cleanup() { ++ test_tag::cleanup(); ++ stats_restore(); ++ } ++ ++ ucs_stats_node_t *ep_stats(const entity &e) ++ { ++ return ucs_derived_of(e.ep(0), uct_base_ep_t)->stats; ++ } ++ ++ ucs_stats_node_t *iface_stats(const entity &e) ++ { ++ return ucs_derived_of(e.iface(), uct_rc_iface_t)->tm.stats; ++ } ++ ++ void provoke_sync(const entity &e) ++ { ++ uct_rc_iface_t *iface = ucs_derived_of(e.iface(), uct_rc_iface_t); ++ ++ // Counters are synced every IBV_DEVICE_MAX_UNEXP_COUNT ops, set ++ // it one op before, so that any following unexpected message would ++ // cause HW ans SW counters sync. ++ iface->tm.unexpected_cnt = IBV_DEVICE_MAX_UNEXP_COUNT - 1; ++ } ++ ++ void check_tx_counters(int op, uint64_t op_val, int type, size_t len) ++ { ++ uint64_t v; ++ ++ v = UCS_STATS_GET_COUNTER(ep_stats(sender()), op); ++ EXPECT_EQ(op_val, v); ++ ++ // With valgrind reduced messages is sent ++ if (!RUNNING_ON_VALGRIND) { ++ v = UCS_STATS_GET_COUNTER(ep_stats(sender()), type); ++ EXPECT_EQ(len, v); ++ } ++ } ++ ++ void check_rx_counter(int op, uint64_t val, entity &e) ++ { ++ EXPECT_EQ(val, UCS_STATS_GET_COUNTER(iface_stats(e), op)); ++ } ++}; ++ ++UCS_TEST_P(test_tag_stats, tag_expected_eager) ++{ ++ check_caps(UCT_IFACE_FLAG_TAG_EAGER_SHORT | ++ UCT_IFACE_FLAG_TAG_EAGER_BCOPY | ++ UCT_IFACE_FLAG_TAG_EAGER_ZCOPY); ++ ++ std::pair > sfuncs[3] = { ++ std::make_pair(static_cast(&test_tag::tag_eager_short), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_short, ++ static_cast(UCT_EP_STAT_BYTES_SHORT))), ++ ++ std::make_pair(static_cast(&test_tag::tag_eager_bcopy), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_bcopy, ++ static_cast(UCT_EP_STAT_BYTES_BCOPY))), ++ ++ std::make_pair(static_cast(&test_tag::tag_eager_zcopy), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_zcopy, ++ static_cast(UCT_EP_STAT_BYTES_ZCOPY))) ++ }; ++ ++ for (int i = 0; i < 3; ++i) { ++ test_tag_expected(sfuncs[i].first, sfuncs[i].second.first); ++ check_tx_counters(UCT_EP_STAT_TAG, i + 1, ++ sfuncs[i].second.second, ++ sfuncs[i].second.first); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_EXP, i + 1, receiver()); ++ } ++} ++ ++UCS_TEST_P(test_tag_stats, tag_unexpected_eager) ++{ ++ check_caps(UCT_IFACE_FLAG_TAG_EAGER_BCOPY | UCT_IFACE_FLAG_TAG_EAGER_ZCOPY); ++ ++ std::pair > sfuncs[2] = { ++ std::make_pair(static_cast(&test_tag::tag_eager_bcopy), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_bcopy, ++ static_cast(UCT_EP_STAT_BYTES_BCOPY))), ++ ++ std::make_pair(static_cast(&test_tag::tag_eager_zcopy), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_zcopy, ++ static_cast(UCT_EP_STAT_BYTES_ZCOPY))) ++ }; ++ ++ for (int i = 0; i < 2; ++i) { ++ test_tag_unexpected(sfuncs[i].first, sfuncs[i].second.first); ++ check_tx_counters(UCT_EP_STAT_TAG, i + 1, ++ sfuncs[i].second.second, ++ sfuncs[i].second.first); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_EAGER_UNEXP, i + 1, receiver()); ++ } ++} ++ ++UCS_TEST_P(test_tag_stats, tag_list_ops) ++{ ++ check_caps(UCT_IFACE_FLAG_TAG_EAGER_BCOPY); ++ mapped_buffer recvbuf(32, RECV_SEED, receiver()); ++ recv_ctx rctx; ++ ++ init_recv_ctx(rctx, &recvbuf, 1); ++ ++ ASSERT_UCS_OK(tag_post(receiver(), rctx)); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_LIST_ADD, 1ul, receiver()); ++ ++ ASSERT_UCS_OK(tag_cancel(receiver(), rctx, 1)); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_LIST_DEL, 1ul, receiver()); ++ ++ // Every ADD and DEL is paired with SYNC, but stats counter is increased ++ // when separate SYNC op is issued only. So, we expect it to be 0 after ++ // ADD and DEL operations. ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_LIST_SYNC, 0ul, receiver()); ++ ++ // Provoke real SYNC op and send a message unexpectedly ++ provoke_sync(receiver()); ++ test_tag_unexpected(static_cast(&test_tag::tag_eager_bcopy)); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_LIST_SYNC, 1ul, receiver()); ++} ++ ++ ++UCS_TEST_P(test_tag_stats, tag_rndv) ++{ ++ check_caps(UCT_IFACE_FLAG_TAG_RNDV_ZCOPY | UCT_IFACE_FLAG_TAG_EAGER_BCOPY); ++ ++ size_t len = sender().iface_attr().cap.tag.rndv.max_zcopy / 8; ++ ++ // Check UNEXP_RNDV on the receiver ++ test_tag_unexpected(static_cast(&test_tag::tag_rndv_zcopy), len); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_RNDV_UNEXP, 1ul, receiver()); ++ ++ // Check that sender receives RNDV_FIN in case of expected rndv message ++ test_tag_expected(static_cast(&test_tag::tag_rndv_zcopy), len); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_RNDV_FIN, 1ul, sender()); ++ ++ ++ // Check UNEXP_RNDV_REQ on the receiver ++ test_tag_unexpected(static_cast(&test_tag::tag_rndv_request)); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_UNEXP, 1ul, receiver()); ++ ++ // Check NEXP_RNDV_REQ on the receiver ++ test_tag_expected(static_cast(&test_tag::tag_rndv_request), ++ sender().iface_attr().cap.tag.rndv.max_hdr, true); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_EXP, 1ul, receiver()); ++} ++ ++UCT_TAG_INSTANTIATE_TEST_CASE(test_tag_stats) ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_ep.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_ep.cc +index baf4810..ce985a5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_ep.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_ep.cc +@@ -45,6 +45,12 @@ UCS_TEST_P(test_uct_ep, disconnect_after_send) { + ucs_status_t status; + unsigned count; + ++#if HAVE_DC_DV ++ if (GetParam()->tl_name.compare("dc_mlx5") == 0) { ++ UCS_TEST_SKIP_R("DCI stuck bug"); ++ } ++#endif ++ + check_caps(UCT_IFACE_FLAG_AM_ZCOPY); + + mapped_buffer buffer(256, 0, *m_sender); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_perf.cc +index 1749953..fdcb46f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_perf.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_perf.cc +@@ -132,7 +132,7 @@ test_perf::test_spec test_uct_perf::tests[] = + UCS_TEST_P(test_uct_perf, envelope) { + bool check_perf; + +- if (GetParam()->tl_name == "cm" || GetParam()->tl_name == "ugni_udt") { ++ if (GetParam()->tl_name == "cm" || GetParam()->tl_name == "ugni_udt" || GetParam()->tl_name == "cuda_ipc") { + UCS_TEST_SKIP; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_zcopy_comp.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_zcopy_comp.cc +index b7f95a1..be8f901 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_zcopy_comp.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_zcopy_comp.cc +@@ -31,6 +31,12 @@ UCS_TEST_P(test_zcopy_comp, issue1440) + size_t size_large = ucs_min(65536ul, sender->iface_attr().cap.put.max_zcopy); + ucs_assert(size_large > size_small); + ++ if (sender->md_attr().cap.mem_type != UCT_MD_MEM_TYPE_HOST) { ++ std::stringstream ss; ++ ss << "test_zcopy_comp is not supported by " << GetParam(); ++ UCS_TEST_SKIP_R(ss.str()); ++ } ++ + mapped_buffer sendbuf_small(size_small, 0, *sender); + mapped_buffer sendbuf_large(size_large, 0, *sender); + mapped_buffer recvbuf_small(size_small, 0, *receiver_small); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_p2p_test.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_p2p_test.cc +index e40adb2..3c70977 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_p2p_test.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_p2p_test.cc +@@ -149,8 +149,12 @@ void uct_p2p_test::test_xfer_multi(send_func_t send, size_t min_length, + { + + for (int mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { ++ /* test mem type if md supports mem type ++ * (or) if HOST MD can register mem type ++ */ + if (!((sender().md_attr().cap.mem_type == mem_type) || +- (sender().md_attr().cap.reg_mem_types & UCS_BIT(mem_type)))) { ++ (sender().md_attr().cap.mem_type == UCT_MD_MEM_TYPE_HOST && ++ sender().md_attr().cap.reg_mem_types & UCS_BIT(mem_type)))) { + continue; + } + if (mem_type == UCT_MD_MEM_TYPE_CUDA) { +@@ -162,6 +166,7 @@ void uct_p2p_test::test_xfer_multi(send_func_t send, size_t min_length, + (uct_memory_type_t) mem_type); + } + } ++ + void uct_p2p_test::test_xfer_multi_mem_type(send_func_t send, size_t min_length, + size_t max_length, unsigned flags, + uct_memory_type_t mem_type) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.cc +index 00effe2..002cf9c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.cc +@@ -58,6 +58,65 @@ uct_test::~uct_test() { + uct_config_release(m_md_config); + } + ++void uct_test::init_sockaddr_rsc(resource *rsc, struct sockaddr *listen_addr, ++ struct sockaddr *connect_addr, size_t size) ++{ ++ memcpy(&rsc->listen_if_addr, listen_addr, size); ++ memcpy(&rsc->connect_if_addr, connect_addr, size); ++} ++ ++void uct_test::set_interface_rscs(char *md_name, cpu_set_t local_cpus, ++ struct ifaddrs *ifa, ++ std::vector& all_resources) ++{ ++ int i; ++ ++ /* Create two resources on the same interface. the first one will have the ++ * ip of the interface and the second one will have INADDR_ANY */ ++ for (i = 0; i < 2; i++) { ++ resource rsc; ++ rsc.md_name = md_name, ++ rsc.local_cpus = local_cpus, ++ rsc.tl_name = "sockaddr", ++ rsc.dev_name = ifa->ifa_name; ++ rsc.dev_type = UCT_DEVICE_TYPE_NET; ++ ++ if (i == 0) { ++ /* first rsc */ ++ if (ifa->ifa_addr->sa_family == AF_INET) { ++ uct_test::init_sockaddr_rsc(&rsc, ifa->ifa_addr, ifa->ifa_addr, ++ sizeof(struct sockaddr_in)); ++ } else if (ifa->ifa_addr->sa_family == AF_INET6) { ++ uct_test::init_sockaddr_rsc(&rsc, ifa->ifa_addr, ifa->ifa_addr, ++ sizeof(struct sockaddr_in6)); ++ } else { ++ UCS_TEST_ABORT("Unknown sa_family " << ifa->ifa_addr->sa_family); ++ } ++ all_resources.push_back(rsc); ++ } else { ++ /* second rsc */ ++ if (ifa->ifa_addr->sa_family == AF_INET) { ++ struct sockaddr_in sin; ++ memset(&sin, 0, sizeof(struct sockaddr_in)); ++ sin.sin_family = AF_INET; ++ sin.sin_addr.s_addr = INADDR_ANY; ++ uct_test::init_sockaddr_rsc(&rsc, (struct sockaddr*)&sin, ++ ifa->ifa_addr, sizeof(struct sockaddr_in)); ++ } else if (ifa->ifa_addr->sa_family == AF_INET6) { ++ struct sockaddr_in6 sin; ++ memset(&sin, 0, sizeof(struct sockaddr_in6)); ++ sin.sin6_family = AF_INET6; ++ sin.sin6_addr = in6addr_any; ++ uct_test::init_sockaddr_rsc(&rsc, (struct sockaddr*)&sin, ++ ifa->ifa_addr, sizeof(struct sockaddr_in6)); ++ } else { ++ UCS_TEST_ABORT("Unknown sa_family " << ifa->ifa_addr->sa_family); ++ } ++ all_resources.push_back(rsc); ++ } ++ } ++} ++ + void uct_test::set_sockaddr_resources(uct_md_h md, char *md_name, cpu_set_t local_cpus, + std::vector& all_resources) { + +@@ -69,24 +128,16 @@ void uct_test::set_sockaddr_resources(uct_md_h md, char *md_name, cpu_set_t loca + for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { + sock_addr.addr = ifa->ifa_addr; + ++ /* If rdmacm is tested, make sure that this is an IPoIB or RoCE interface */ ++ if (!strcmp(md_name, "rdmacm") && (!ucs::is_rdmacm_netdev(ifa->ifa_name))) { ++ continue; ++ } ++ + if (uct_md_is_sockaddr_accessible(md, &sock_addr, UCT_SOCKADDR_ACC_LOCAL) && + uct_md_is_sockaddr_accessible(md, &sock_addr, UCT_SOCKADDR_ACC_REMOTE) && + ucs_netif_is_active(ifa->ifa_name)) { +- resource rsc; +- rsc.md_name = md_name, +- rsc.local_cpus = local_cpus, +- rsc.tl_name = "sockaddr", +- rsc.dev_name = ifa->ifa_name; +- rsc.dev_type = UCT_DEVICE_TYPE_NET; + +- if (ifa->ifa_addr->sa_family == AF_INET) { +- memcpy(&rsc.if_addr, ifa->ifa_addr, sizeof(struct sockaddr_in)); +- } else if (ifa->ifa_addr->sa_family == AF_INET6) { +- memcpy(&rsc.if_addr, ifa->ifa_addr, sizeof(struct sockaddr_in6)); +- } else { +- UCS_TEST_ABORT("Unknown sa_family " << ifa->ifa_addr->sa_family); +- } +- all_resources.push_back(rsc); ++ uct_test::set_interface_rscs(md_name, local_cpus, ifa, all_resources); + } + } + +@@ -114,9 +165,14 @@ std::vector uct_test::enum_resources(const std::string& tl_name + &md_config); + ASSERT_UCS_OK(status); + +- status = uct_md_open(md_resources[i].md_name, md_config, &pd); ++ { ++ scoped_log_handler slh(hide_errors_logger); ++ status = uct_md_open(md_resources[i].md_name, md_config, &pd); ++ } + uct_config_release(md_config); +- ASSERT_UCS_OK(status); ++ if (status != UCS_OK) { ++ continue; ++ } + + uct_md_attr_t md_attr; + status = uct_md_query(pd, &md_attr); +@@ -176,6 +232,12 @@ void uct_test::check_caps(uint64_t required_flags, uint64_t invalid_flags) { + } + } + ++void uct_test::check_atomics(uint64_t required_ops, atomic_mode mode) { ++ FOR_EACH_ENTITY(iter) { ++ (*iter)->check_atomics(required_ops, mode); ++ } ++} ++ + void uct_test::modify_config(const std::string& name, const std::string& value, + bool optional) { + ucs_status_t status; +@@ -235,9 +297,11 @@ uct_test::entity* uct_test::create_entity(size_t rx_headroom, + uct_iface_params_t iface_params; + + memset(&iface_params, 0, sizeof(iface_params)); +- iface_params.rx_headroom = rx_headroom; +- iface_params.open_mode = UCT_IFACE_OPEN_MODE_DEVICE; +- iface_params.err_handler = err_handler; ++ iface_params.rx_headroom = rx_headroom; ++ iface_params.open_mode = UCT_IFACE_OPEN_MODE_DEVICE; ++ iface_params.err_handler = err_handler; ++ iface_params.err_handler_arg = this; ++ iface_params.err_handler_flags = 0; + entity *new_ent = new entity(*GetParam(), m_iface_config, &iface_params, + m_md_config); + return new_ent; +@@ -301,7 +365,17 @@ void uct_test::twait(int delta_ms) const { + } while (now + ucs_time_from_msec(delta_ms) > ucs_get_time()); + } + +-const std::string uct_test::entity::client_priv_data = "Client private data"; ++int uct_test::max_connections() ++{ ++ if (GetParam()->tl_name == "tcp") { ++ return ucs::max_tcp_connections(); ++ } else { ++ return std::numeric_limits::max(); ++ } ++} ++ ++std::string uct_test::entity::client_priv_data = ""; ++size_t uct_test::entity::client_cb_arg = 0; + + uct_test::entity::entity(const resource& resource, uct_iface_config_t *iface_config, + uct_iface_params_t *params, uct_md_config_t *md_config) { +@@ -317,7 +391,7 @@ uct_test::entity::entity(const resource& resource, uct_iface_config_t *iface_con + UCS_CPU_ZERO(¶ms->cpu_mask); + + UCS_TEST_CREATE_HANDLE(uct_worker_h, m_worker, uct_worker_destroy, +- uct_worker_create, &m_async.m_async, UCS_THREAD_MODE_MULTI /* TODO */); ++ uct_worker_create, &m_async.m_async, UCS_THREAD_MODE_SINGLE); + + UCS_TEST_CREATE_HANDLE(uct_md_h, m_md, uct_md_close, + uct_md_open, resource.md_name.c_str(), md_config); +@@ -466,6 +540,33 @@ void uct_test::entity::check_caps(uint64_t required_flags, + } + } + ++void uct_test::entity::check_atomics(uint64_t required_ops, atomic_mode mode) ++{ ++ uint64_t amo; ++ ++ switch (mode) { ++ case OP32: ++ amo = iface_attr().cap.atomic32.op_flags; ++ break; ++ case OP64: ++ amo = iface_attr().cap.atomic64.op_flags; ++ break; ++ case FOP32: ++ amo = iface_attr().cap.atomic32.fop_flags; ++ break; ++ case FOP64: ++ amo = iface_attr().cap.atomic64.fop_flags; ++ break; ++ default: ++ UCS_TEST_ABORT("Incorrect atomic mode: " << mode); ++ break; ++ } ++ ++ if (!ucs_test_all_flags(amo, required_ops)) { ++ UCS_TEST_SKIP_R("unsupported"); ++ } ++} ++ + uct_md_h uct_test::entity::md() const { + return m_md; + } +@@ -558,7 +659,23 @@ void uct_test::entity::destroy_eps() { + } + } + +-void uct_test::entity::connect_to_sockaddr(unsigned index, entity& other) ++ssize_t uct_test::entity::client_priv_data_cb(void *arg, const char *dev_name, ++ void *priv_data) ++{ ++ size_t *max_conn_priv = (size_t*)arg; ++ size_t priv_data_len; ++ ++ client_priv_data = "Client private data"; ++ priv_data_len = 1 + client_priv_data.length(); ++ ++ memcpy(priv_data, client_priv_data.c_str(), priv_data_len); ++ EXPECT_LE(priv_data_len, (*max_conn_priv)); ++ ++ return priv_data_len; ++} ++ ++void uct_test::entity::connect_to_sockaddr(unsigned index, entity& other, ++ ucs_sock_addr_t *remote_addr) + { + uct_ep_h ep; + ucs_status_t status; +@@ -568,13 +685,10 @@ void uct_test::entity::connect_to_sockaddr(unsigned index, entity& other) + return; /* Already connected */ + } + +- ASSERT_TRUE(client_priv_data.length() <= other.iface_attr().max_conn_priv); +- + /* Connect to the server */ +- status = uct_ep_create_sockaddr(iface(), +- &other.iface_params().mode.sockaddr.listen_sockaddr, +- client_priv_data.c_str(), +- client_priv_data.length(), &ep); ++ status = uct_ep_create_sockaddr(iface(), remote_addr, ++ client_priv_data_cb, (void*)&client_cb_arg, ++ UCT_CB_FLAG_ASYNC, &ep); + ASSERT_UCS_OK(status); + + m_eps[index].reset(ep, uct_ep_destroy); +@@ -639,19 +753,25 @@ void uct_test::entity::connect_to_iface(unsigned index, entity& other) { + } + + void uct_test::entity::connect(unsigned index, entity& other, +- unsigned other_index) ++ unsigned other_index, ++ ucs_sock_addr_t *remote_addr) + { + if (iface_attr().cap.flags & UCT_IFACE_FLAG_CONNECT_TO_EP) { + connect_to_ep(index, other, other_index); + } else if (iface_attr().cap.flags & UCT_IFACE_FLAG_CONNECT_TO_IFACE) { + connect_to_iface(index, other); + } else if (iface_attr().cap.flags & UCT_IFACE_FLAG_CONNECT_TO_SOCKADDR) { +- connect_to_sockaddr(index, other); ++ connect_to_sockaddr(index, other, remote_addr); + } else { + UCS_TEST_SKIP_R("cannot connect"); + } + } + ++void uct_test::entity::connect(unsigned index, entity& other, unsigned other_index) ++{ ++ connect(index, other, other_index, NULL); ++} ++ + void uct_test::entity::flush() const { + ucs_status_t status; + do { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.h +index 092b4aa..78a92c8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.h +@@ -35,7 +35,8 @@ struct resource { + std::string tl_name; + std::string dev_name; + uct_device_type_t dev_type; +- struct sockaddr_storage if_addr; ++ struct sockaddr_storage listen_if_addr; /* sockaddr to listen on */ ++ struct sockaddr_storage connect_if_addr; /* sockaddr to connect to */ + }; + + +@@ -53,10 +54,19 @@ public: + uct_test(); + virtual ~uct_test(); + ++ enum atomic_mode { ++ OP32, ++ OP64, ++ FOP32, ++ FOP64 ++ }; ++ + protected: + + class entity { + public: ++ typedef uct_test::atomic_mode atomic_mode; ++ + entity(const resource& resource, uct_iface_config_t *iface_config, + uct_iface_params_t *params, uct_md_config_t *md_config); + +@@ -71,6 +81,7 @@ protected: + + bool is_caps_supported(uint64_t required_flags); + void check_caps(uint64_t required_flags, uint64_t invalid_flags = 0); ++ void check_atomics(uint64_t required_ops, atomic_mode mode); + + uct_md_h md() const; + +@@ -90,14 +101,17 @@ protected: + void destroy_ep(unsigned index); + void destroy_eps(); + void connect(unsigned index, entity& other, unsigned other_index); ++ void connect(unsigned index, entity& other, unsigned other_index, ++ ucs_sock_addr_t *remote_addr); + void connect_to_iface(unsigned index, entity& other); + void connect_to_ep(unsigned index, entity& other, + unsigned other_index); +- void connect_to_sockaddr(unsigned index, entity& other); ++ void connect_to_sockaddr(unsigned index, entity& other, ucs_sock_addr_t *remote_addr); + + void flush() const; + +- static const std::string client_priv_data; ++ static std::string client_priv_data; ++ static size_t client_cb_arg; + + private: + class async_wrapper { +@@ -118,6 +132,8 @@ protected: + void connect_p2p_ep(uct_ep_h from, uct_ep_h to); + void cuda_mem_alloc(size_t length, uct_allocated_memory_t *mem) const; + void cuda_mem_free(const uct_allocated_memory_t *mem) const; ++ static ssize_t client_priv_data_cb(void *arg, const char *dev_name, ++ void *priv_data); + + ucs::handle m_md; + uct_md_attr_t m_md_attr; +@@ -214,6 +230,7 @@ protected: + bool is_caps_supported(uint64_t required_flags); + void check_caps(uint64_t required_flags, uint64_t invalid_flags = 0); + void check_caps(const entity& e, uint64_t required_flags, uint64_t invalid_flags = 0); ++ void check_atomics(uint64_t required_ops, atomic_mode mode); + const entity& ent(unsigned index) const; + unsigned progress() const; + void flush(ucs_time_t deadline = ULONG_MAX) const; +@@ -221,11 +238,17 @@ protected: + virtual void twait(int delta_ms = DEFAULT_DELAY_MS) const; + static void set_sockaddr_resources(uct_md_h pd, char *md_name, cpu_set_t local_cpus, + std::vector& all_resources); ++ static void set_interface_rscs(char *md_name, cpu_set_t local_cpus, ++ struct ifaddrs *ifa, ++ std::vector& all_resources); ++ static void init_sockaddr_rsc(resource *rsc, struct sockaddr *listen_addr, ++ struct sockaddr *connect_addr, size_t size); + static const char *uct_mem_type_names[]; + + uct_test::entity* create_entity(size_t rx_headroom, + uct_error_handler_t err_handler = NULL); + uct_test::entity* create_entity(uct_iface_params_t ¶ms); ++ int max_connections(); + + ucs::ptr_vector m_entities; + uct_iface_config_t *m_iface_config; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/mpi/test_memhooks.c b/src/mpid/ch4/netmod/ucx/ucx/test/mpi/test_memhooks.c +index c029c9b..e6366b1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/mpi/test_memhooks.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/mpi/test_memhooks.c +@@ -9,10 +9,12 @@ + #include + #include + #include ++#include + #include + #include + #include + #include ++#include + + #define CHKERR_JUMP(cond, msg, label) \ + do { \ +@@ -35,9 +37,12 @@ + } \ + } while (0); + ++#define SHMAT_FAILED ((void*)-1) ++ + void* open_dyn_lib(const char *lib_path); + void* flag_no_install_init(const char *path); +-int malloc_hooks_run(void *dl); ++int malloc_hooks_run_all(void *dl); ++int malloc_hooks_run_unmapped(void *dl); + int ext_event_run(void *dl); + void *ext_event_init(const char *path); + +@@ -48,9 +53,10 @@ typedef struct memtest_type { + } memtest_type_t; + + memtest_type_t tests[] = { +- {"malloc_hooks", open_dyn_lib, malloc_hooks_run}, +- {"external_events", ext_event_init, ext_event_run}, +- {"flag_no_install", flag_no_install_init, ext_event_run}, ++ {"malloc_hooks", open_dyn_lib, malloc_hooks_run_all}, ++ {"malloc_hooks_unmapped", open_dyn_lib, malloc_hooks_run_unmapped}, ++ {"external_events", ext_event_init, ext_event_run}, ++ {"flag_no_install", flag_no_install_init, ext_event_run}, + {NULL} + }; + +@@ -62,9 +68,10 @@ static void usage() { + printf("Options are:\n"); + printf(" -h Print this info.\n"); + printf(" -t Test name to execute (malloc_hooks)\n"); +- printf(" malloc_hooks : General UCM test.\n"); +- printf(" external_events : Test of ucm_set_external_event() API.\n"); +- printf(" flag_no_install : Test of UCM_EVENT_FLAG_NO_INSTALL flag.\n"); ++ printf(" malloc_hooks : General UCM test for VM_MAPPED and VM_UNMAPPED\n"); ++ printf(" malloc_hooks_unmapped : Test VM_UNMAPPED event only\n"); ++ printf(" external_events : Test of ucm_set_external_event() API\n"); ++ printf(" flag_no_install : Test of UCM_EVENT_FLAG_NO_INSTALL flag\n"); + printf("\n"); + } + +@@ -78,7 +85,7 @@ static void event_callback(ucm_event_type_t event_type, ucm_event_t *event, + } + } + +-static ucs_status_t set_event_handler (void *dl, int events) ++static ucs_status_t set_event_handler(void *dl, int events) + { + ucs_status_t (*set_handler)(int events, int priority, + ucm_event_callback_t cb, void *arg); +@@ -91,18 +98,9 @@ static ucs_status_t set_event_handler (void *dl, int events) + + static ucs_status_t disable_memory_hooks(void *dl) + { +- ucs_status_t (*modify_cfg)(const char *name, const char *val); +- ucs_status_t status; +- +- DL_FIND_FUNC(dl, "ucm_config_modify", modify_cfg, +- return UCS_ERR_UNSUPPORTED); +- +- status = modify_cfg("MALLOC_HOOKS", "no"); +- if (status == UCS_OK) { +- status = modify_cfg("MMAP_RELOC", "no"); +- } +- +- return status; ++ setenv("UCX_MEM_MALLOC_HOOKS", "n", 1); ++ setenv("UCX_MEM_MMAP_RELOC", "n", 1); ++ return UCS_OK; + } + + void* open_dyn_lib(const char *lib_path) +@@ -171,59 +169,141 @@ fail: + return NULL; + } + +-int malloc_hooks_run(void *dl) ++int malloc_hooks_run_flags(void *dl, ucm_event_type_t events) + { + ucs_status_t status; + void *ptr_malloc_core = NULL; + void *ptr_malloc_mmap = NULL; + void *ptr_direct_mmap = MAP_FAILED; ++ int shmid = -1; ++ void *ptr_shmat = SHMAT_FAILED; + void *dl_test; + const size_t size = 1024 * 1024; + const char *lib_path = UCS_PP_MAKE_STRING(TEST_LIB_DIR) "/" "libtest_memhooks.so"; + const char *cust_mmap_name = "memhook_test_lib_call_mmap"; + void * (*cust_mmap)(size_t size); + +- status = set_event_handler(dl, UCM_EVENT_VM_MAPPED | UCM_EVENT_VM_UNMAPPED); ++ status = set_event_handler(dl, events); + CHKERR_JUMP(status != UCS_OK, "Failed to set event handler", fail_close_ucm); + + printf("Allocating memory\n"); + ++ /* Create SysV segment */ ++ shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|SHM_R|SHM_W); ++ CHKERR_JUMP(shmid == -1, "Failed to create shared memory segment: %m", ++ fail_close_ucm); ++ ++ /* ++ * Test shmat/shmdt before malloc() because shmat() add entires to an internal ++ * hash of pointers->size, which makes previous pointers un-releasable ++ */ ++ ++ /* Attach SysV segment */ ++ total_mapped = 0; ++ ptr_shmat = shmat(shmid, NULL, 0); ++ CHKERR_JUMP(ptr_shmat == SHMAT_FAILED, "Failed to attach shared memory segment", ++ fail_close_ucm); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped < size, "No callback for shmat", fail_close_ucm); ++ } ++ printf("After shmat: reported mapped=%zu\n", total_mapped); ++ ++ /* Detach SysV segment */ ++ total_unmapped = 0; ++ shmdt(ptr_shmat); ++ ptr_shmat = SHMAT_FAILED; ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped < size, "No callback for shmdt", fail_close_ucm); ++ } ++ printf("After shmdt: reported unmapped=%zu\n", total_unmapped); ++ ++ /* Attach SysV segment at fixed address */ ++ total_mapped = 0; ++ total_unmapped = 0; ++ ptr_shmat = shmat(shmid, (void*)0xff000000, SHM_REMAP); ++ CHKERR_JUMP(ptr_shmat == SHMAT_FAILED, "Failed to attach shared memory segment", ++ fail_close_ucm); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped < size, "No map callback for shmat(REMAP)", fail_close_ucm); ++ } ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped < size, "No unmap callback for shmat(REMAP)", ++ fail_close_ucm); ++ } ++ printf("After shmat(REMAP): reported mapped=%zu unmapped=%zu\n", total_mapped, ++ total_unmapped); ++ ++ /* Detach SysV segment */ ++ total_unmapped = 0; ++ shmdt(ptr_shmat); ++ ptr_shmat = SHMAT_FAILED; ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped < size, "No callback for shmdt", fail_close_ucm); ++ } ++ printf("After shmdt: reported unmapped=%zu\n", total_unmapped); ++ ++ /* Destroy SysV segment */ ++ shmctl(shmid, IPC_RMID, NULL); ++ shmid = -1; ++ + /* Allocate using morecore */ + mallopt(M_MMAP_THRESHOLD, size * 2); + mallopt(M_TRIM_THRESHOLD, size / 2); + total_mapped = 0; + ptr_malloc_core = malloc(1024 * 1024); +- CHKERR_JUMP(total_mapped == 0, "No callback for core malloc", fail_close_ucm); +- printf("After core malloc: mapped=%zu\n", total_mapped); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped == 0, "No callback for core malloc", ++ fail_close_ucm); ++ } ++ printf("After core malloc: reported mapped=%zu\n", total_mapped); + + /* Allocate using mmap */ + mallopt(M_MMAP_THRESHOLD, size / 2); + total_mapped = 0; + ptr_malloc_mmap = malloc(2 * 1024 * 1024); +- CHKERR_JUMP(total_mapped == 0, "No callback for mmap malloc", fail_close_ucm); +- printf("After mmap malloc: mapped=%zu\n", total_mapped); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped == 0, "No callback for mmap malloc", ++ fail_close_ucm); ++ } ++ printf("After mmap malloc: reported mapped=%zu\n", total_mapped); + + /* Allocate directly with mmap */ + total_mapped = 0; + ptr_direct_mmap = mmap(NULL, size, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANON, -1, 0); +- CHKERR_JUMP(total_mapped == 0, "No callback for mmap", fail_close_ucm); +- printf("After mmap: mapped=%zu\n", total_mapped); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped < size, "No callback for mmap", fail_close_ucm); ++ } ++ printf("After mmap: reported mapped=%zu\n", total_mapped); ++ ++ /* Remap */ ++ total_unmapped = 0; ++ ptr_direct_mmap = mmap(ptr_direct_mmap, size, PROT_READ|PROT_WRITE, ++ MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0); ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped < size, "No unmap callback for mmap(FIXED)", ++ fail_close_ucm); ++ } ++ printf("After mmap(FIXED): reported unmapped=%zu\n", total_unmapped); + + /* Call munmap directly */ + total_unmapped = 0; + munmap(ptr_direct_mmap, size); +- CHKERR_JUMP(total_unmapped == 0, "No callback for munmap", fail_close_ucm); +- printf("After munmap: unmapped=%zu\n", total_unmapped); ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped == 0, "No callback for munmap", fail_close_ucm); ++ } ++ printf("After munmap: reported unmapped=%zu\n", total_unmapped); + + /* Release indirectly */ + total_unmapped = 0; + free(ptr_malloc_mmap); + ptr_malloc_mmap = NULL; + malloc_trim(0); +- CHKERR_JUMP(total_unmapped == 0, "No callback for munmap from malloc", +- fail_close_ucm); +- printf("After mmap free + trim: unmapped=%zu\n", total_unmapped); ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped == 0, "No callback for munmap from free", ++ fail_close_ucm); ++ } ++ printf("After mmap free + trim: reported unmapped=%zu\n", total_unmapped); + + /* Call mmap from a library we load after hooks are installed */ + dl_test = open_dyn_lib(lib_path); +@@ -234,15 +314,17 @@ int malloc_hooks_run(void *dl) + ptr_direct_mmap = cust_mmap(size); + CHKERR_JUMP(ptr_direct_mmap == MAP_FAILED, "Failed to mmap from dynamic lib", + fail_close_all); +- CHKERR_JUMP(total_mapped == 0,"No callback for mmap from dynamic lib", +- fail_close_all); +- printf("After another mmap from dynamic lib: mapped=%zu\n", total_mapped); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped == 0,"No callback for mmap from dynamic lib", ++ fail_close_all); ++ } ++ printf("After another mmap from dynamic lib: reported mapped=%zu\n", total_mapped); + munmap(ptr_direct_mmap, size); + ptr_direct_mmap = MAP_FAILED; + + /* + * Test closing UCM. +- * The library should not really be unloaded, because the meory hooks still ++ * The library should not really be unloaded, because the memory hooks still + * point to functions inside it. + */ + total_unmapped = 0; +@@ -250,8 +332,10 @@ int malloc_hooks_run(void *dl) + dlclose(dl_test); + free(ptr_malloc_core); /* This should still work */ + ptr_malloc_core = NULL; +- CHKERR_JUMP(total_unmapped == 0, "No callback for munmap from malloc", fail); +- printf("After core malloc free: unmapped=%zu\n", total_unmapped); ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped == 0, "No callback for munmap from malloc", fail); ++ } ++ printf("After core malloc free: reported unmapped=%zu\n", total_unmapped); + + return 0; + +@@ -260,6 +344,12 @@ fail_close_all: + fail_close_ucm: + dlclose(dl); + fail: ++ if (ptr_shmat != SHMAT_FAILED) { ++ shmdt(ptr_shmat); ++ } ++ if (shmid != -1) { ++ shmctl(shmid, IPC_RMID, NULL); ++ } + free(ptr_malloc_mmap); + free(ptr_malloc_core); + if (ptr_direct_mmap != MAP_FAILED) { +@@ -269,6 +359,16 @@ fail: + return -1; + } + ++int malloc_hooks_run_all(void *dl) ++{ ++ return malloc_hooks_run_flags(dl, UCM_EVENT_VM_MAPPED | UCM_EVENT_VM_UNMAPPED); ++} ++ ++int malloc_hooks_run_unmapped(void *dl) ++{ ++ return malloc_hooks_run_flags(dl, UCM_EVENT_VM_UNMAPPED); ++} ++ + int ext_event_run(void *dl) + { + void *ptr_direct_mmap; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/ucx.spec.in b/src/mpid/ch4/netmod/ucx/ucx/ucx.spec.in +index e909619..b0c2cb3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/ucx.spec.in ++++ b/src/mpid/ch4/netmod/ucx/ucx/ucx.spec.in +@@ -16,15 +16,17 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + ExclusiveArch: aarch64 ppc64le x86_64 + + BuildRequires: numactl-devel libibverbs-devel +-BuildRequires: automake autoconf libtool ++BuildRequires: automake autoconf libtool gcc-c++ + + %description +-UCX stands for Unified Communication X. It requires either RDMA-capable device +-(InfiniBand, RoCE, etc), Cray Gemini or Aries, for inter-node communication. +-Future versions will support also TCP for inter-node, to lift that hardware +-dependency. +-In addition, the library can be used for intra-node communication by leveraging +-the following shared memory mechanisms: posix. sysv, cma, knem, xpmem. ++UCX stands for Unified Communication X. UCX provides an optimized communication ++layer for Message Passing (MPI), PGAS/OpenSHMEM libraries and RPC/data-centric ++applications. UCX utilizes high-speed networks, such as RDMA (InfiniBand, RoCE, ++etc), Cray Gemini or Aries, for inter-node communication. If no such network is ++available, TCP is used instead. UCX supports efficient transfer of data in ++either main memory (RAM) or GPU memory (through CUDA and ROCm libraries). ++In addition, UCX provides efficient intra-node communication, by leveraging the ++following shared memory mechanisms: posix, sysv, cma, knem, and xpmem. + + %package devel + Requires: %{name}%{?_isa} = %{version}-%{release} +@@ -51,7 +53,6 @@ Provides static libraries required for development with UCX. + --disable-debug \ + --disable-assertions \ + --disable-params-check \ +- CXXFLAGS="%{optflags} -fno-exceptions" \ + %{?configure_options} + make %{?_smp_mflags} V=1 + +@@ -81,6 +82,18 @@ rm -f %{buildroot}%{_libdir}/*.la + %postun -p /sbin/ldconfig + + %changelog ++* Sat Mar 23 2019 Yossi Itigin 1.5.1-1 ++- Bump version to 1.5.1 ++- See NEWS for details ++* Tue Nov 6 2018 Andrey Maslennikov 1.5.0-1 ++- Bump version to 1.5.0 ++- See NEWS for details ++* Tue Oct 30 2018 Andrey Maslennikov 1.4.0-1 ++- See NEWS for details ++* Mon Aug 20 2018 Andrey Maslennikov 1.3.1-1 ++- See NEWS for details ++* Thu Aug 16 2018 Andrey Maslennikov 1.3.0-1 ++- Explicitly set gcc-c++ as requirements + * Wed Mar 7 2018 Andrey Maslennikov 1.3.0-1 + - See NEWS for details + * Mon Aug 21 2017 Andrey Maslennikov 1.2.1-1 diff --git a/daos_adio-ucx.patch.old b/daos_adio-ucx.patch.old new file mode 100644 index 00000000000..cf2ce14e44c --- /dev/null +++ b/daos_adio-ucx.patch.old @@ -0,0 +1,64750 @@ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/.gitlab-ci.yml b/src/mpid/ch4/netmod/ucx/ucx/.gitlab-ci.yml +new file mode 100644 +index 000000000..ba1209350 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/.gitlab-ci.yml +@@ -0,0 +1,14 @@ ++build: ++ only: ++ - tags ++ script: ++ - "./autogen.sh" ++ - "./contrib/configure-release --disable-numa" ++ - make -j ++ - make dist ++ - 'export upload_url=$(curl -s -H "Authorization: token $github_token" "https://api.github.com/repos/openucx/ucx/releases" | python -c "import sys,os,json; d=json.load(sys.stdin); tag=os.environ.get(\"CI_COMMIT_TAG\"); rel = [r for r in d if r[\"tag_name\"] == tag]; url = rel[0][\"upload_url\"] if rel else \"\"; print url" | grep -oP "https\S+assets")' ++ - echo $upload_url ++ - 'export tar_name=$(ls *.tar.gz)' ++ - echo $tar_name ++ - 'curl -s -H "Authorization: token $github_token" -H "Content-Type: application/zip" --data-binary @"$tar_name" "${upload_url}?name=${tar_name}&label=${tar_name}"' ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/AUTHORS b/src/mpid/ch4/netmod/ucx/ucx/AUTHORS +index 9c4b28f28..77d052761 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/AUTHORS ++++ b/src/mpid/ch4/netmod/ucx/ucx/AUTHORS +@@ -1,15 +1,23 @@ ++Akshay Venkatesh + Alexander Margolin + Alexander Mikheev + Alina Sklarevich ++Andrey Maslennikov ++Artem Polyakov ++Artemy Kovalyov + Aurelien Bouteiller ++Devendar Bureddy + Elad Persiko + Eugene Voronov + Evgeny Leksikov ++Gilles Gouaillardet + Graham Lopez + Guy Shattah + Howard Pritchard + Igor Ivanov + Ilya Nelkenbaum ++Jeff Daily ++Khaled Hamidouche + Manjunath Gorentla Venkata + Matthew Baker + Mike Dubman +@@ -18,15 +26,18 @@ Nathan Hjelm + Netanel Yosephian + Pavel Shamis + Sasha Kotchubievsky ++Sergey Oblomov + Sergey Shalnov ++Serguei Sagalovitch + Stephen Richmond + Swen Boehm +-Tony Curtis ++Tony Curtis + Xin Zhao + Yossi Itigin + +-In addition we would like to acknowledge the following members of UCX community for +-their participation in annual face-to-face meeting, design discussions, and code reviews: ++In addition we would like to acknowledge the following members of UCX community ++for their participation in annual face-to-face meeting, design discussions, and ++code reviews: + + Amith Mamidala + Barney Maccabe +diff --git a/src/mpid/ch4/netmod/ucx/ucx/CONTRIBUTING.md b/src/mpid/ch4/netmod/ucx/ucx/CONTRIBUTING.md +index 791e70445..140810400 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/CONTRIBUTING.md ++++ b/src/mpid/ch4/netmod/ucx/ucx/CONTRIBUTING.md +@@ -1,7 +1,7 @@ + + 1. Please sign the [UCX contributors agreement](http://www.openucx.org/license). + +-1. Please follow the [code style](https://github.com/openucx/ucx/blob/master/doc/CodeStyle) and [logging style](https://github.com/openucx/ucx/blob/master/doc/LoggingStyle). ++1. Please follow the [code style](https://github.com/openucx/ucx/blob/master/doc/CodeStyle.md) and [logging style](https://github.com/openucx/ucx/blob/master/doc/LoggingStyle.md). + + 1. Make sure automatic tests pass. + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/NEWS b/src/mpid/ch4/netmod/ucx/ucx/NEWS +index a2750ac9c..fa6864e1b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/NEWS ++++ b/src/mpid/ch4/netmod/ucx/ucx/NEWS +@@ -1,12 +1,92 @@ + # +-## Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. ++## Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED. + ## Copyright (C) UT-Battelle, LLC. 2014-2015. ALL RIGHTS RESERVED. +-## Copyright (C) ARM Ltd. 2017. ALL RIGHTS RESERVED. ++## Copyright (C) ARM Ltd. 2017-2019. ALL RIGHTS RESERVED. + ## + ## See file LICENSE for terms. + ## + # + ++## 1.5.0 (February 14, 2019) ++Features: ++- New emulation mode enabling full UCX functionality (Atomic, Put, Get) ++ over TCP and RDMA-CORE interconnects which don't implement full RDMA semantics ++- Non-blocking API for all one-sided operations. All blocking communication APIs marked ++ as deprecated ++- New client/server connection establishment API, which allows connected handover between workers ++- Support for rdma-core direct-verbs (DEVX) and DC with mlx5 transports ++- GPU - Support for stream API and receive side pipelining ++- Malloc hooks using binary instrumentation instead of symbol override ++- Statistics for UCT tag API ++- GPU-to-Infiniband HCA affinity support based on locality/distance (PCIe) ++ ++Bugfixes: ++- Fix overflow in RC/DC flush operations ++- Update description in SPEC file and README ++- Fix RoCE source port for dc_mlx5 flow control ++- Improve ucx_info help message ++- Fix segfault in UCP, due to int truncation in count_one_bits() ++- Multiple other bugfixes (full list on github) ++ ++Tested configurations: ++- InfiniBand: MLNX_OFED 4.4-4.5, distribution inbox drivers, rdma-core ++- CUDA: gdrcopy 1.2, cuda 9.1.85 ++- XPMEM: 2.6.2 ++- KNEM: 1.1.2 ++ ++## 1.4.0 (October 23, 2018) ++ ++Features: ++- Improved support for installation with latest ROCm ++- Improved support for latest rdma-core ++- Adding support for CUDA IPC for intra-node GPU ++- Added support for CUDA memory allocation cache for mem-type detection ++- Added support for latest Mellanox devices ++- Added support for Nvidia GPU managed memory ++- Added support for multiple connections between the same pair of workers ++- Added support large worker address for client/server connection establishment ++ and INADDR_ANY ++- Added support for bitwise atomics operations ++ ++Bugfixes: ++- Performance fixes for rendezvous protocol ++- Memory hook fixes ++- Clang support fixes ++- Self tl multi-rail fix ++- Thread safety fixes in IB/RDMA transport ++- Compilation fixes with upstream rdma-core ++- Multiple minor bugfixes (full list on github) ++- Segfault fix for a code generated by armclang compiler ++- UCP memory-domain index fix for zero-copy active messages ++ ++Tested configurations: ++- InfiniBand: MLNX_OFED 4.2-4.4, distribution inbox drivers, rdma-core ++- CUDA: gdrcopy 1.2, cuda 9.1.85 ++- XPMEM: 2.6.2 ++- KNEM: 1.1.2 ++ ++Known issues: ++ #2919 - Segfault in CUDA support when KNEM not present and CMA is active ++ intra-node RMA transport. As a workaround user can disable CMA support at ++ compile time: --disable-cma. Alternatively user can remove CMA from UCX_TLS ++ list, for example: UCX_TLS=mm,rc,cuda_copy,cuda_ipc,gdr_copy. ++ ++## 1.3.1 (August 20, 2018) ++ ++Bugfixes: ++- Prevent potential out-of-order sending in shared memory active messages ++- CUDA: Include cudamem.h in source tarball, pass cudaFree memory size ++- Registration cache: fix large range lookup, handle shmat(REMAP)/mmap(FIXED) ++- Limit IB CQE size for specific ARM boards ++- RPM: explicitly set gcc-c++ as requirement ++- Multiple bugfixes (full list on github) ++ ++Tested configurations: ++- InfiniBand: MLNX_OFED 4.2, inbox OFED drivers. ++- CUDA: gdrcopy 1.2, cuda 9.1.85 ++- XPMEM: 2.6.2 ++- KNEM: 1.1.2 ++ + ## 1.3.0 (February 15, 2018) + + Features: +@@ -28,17 +108,19 @@ Features: + - Add support for external epoll fd and edge-triggered events + - Added registration cache for knem + - Initial support for Java bindings ++ + Bugfixes: +-- Multiple bugfixes (full list on githib) ++- Multiple bugfixes (full list on github) ++ + Tested configurations: + - InfiniBand: MLNX_OFED 4.2, inbox OFED drivers. + - CUDA: gdrcopy 1.2, cuda 9.1.85 + - XPMEM: 2.6.2 + - KNEM: 1.1.2 ++ + Known issues: + #2047 - UCP: ucp_do_am_bcopy_multi drops data on UCS_ERROR_NO_RESOURCE + #2047 - failure in ud/uct_flush_test.am_zcopy_flush_ep_nb/1 +- #2025 - Data corruption on some ARM machines + #1977 - failure in shm/test_ucp_rma.blocking_small/0 + #1926 - Timeout in mpi_test_suite with HW TM + #1920 - transport retry count exceeded in many-to-one tests +@@ -79,6 +161,7 @@ Supported platforms + for community evaluation and has not been tested in context of this release + - Cray Gemini and Aries + - Architectures: x86_64, ARMv8 (64bit), Power64 ++ + Features: + - Added support for InfiniBand DC and UD transports, including accelerated verbs for Mellanox devices + - Full support for PGAS/SHMEM interfaces, blocking and non-blocking APIs +@@ -91,8 +174,10 @@ Features: + - Support for ARMv8 64bit architecture + - A new API for efficient memory polling + - Support for malloc-hooks and memory registration caching ++ + Bugfixes: + - Multiple bugfixes improving overall stability of the library ++ + Known issues: + #1604 - Failure in ud/test_ud_slow_timer.retransmit1/1 with valgrind bug + #1588 - Fix reading cpuinfo timebase for ppc bug portability training +@@ -111,21 +196,14 @@ Known issues: + + ## 1.1.0 (September 1, 2015) + +-Workarounds: + Features: + - Added support for AM based on FIFO in `mm` shared memory transport + - Added support for UCT `knem` shared memory transport (http://knem.gforge.inria.fr) + - Added support for UCT `mm/xpmem` shared memory transport (https://github.com/hjelmn/xpmem) + +- +-Bugfixes: +-Known issues: +- +- + ## 1.0.0 (July 22, 2015) + + Features: +- + - Added support for UCT `cma` shared memory transport (Cross-Memory Attatch) + - Added support for UCT `mm` shared memory transport with mmap/sysv APIs + - Added support for UCT `rc` transport based on Infiniband/RC with verbs +diff --git a/src/mpid/ch4/netmod/ucx/ucx/PULL_REQUEST_TEMPLATE.md b/src/mpid/ch4/netmod/ucx/ucx/PULL_REQUEST_TEMPLATE.md +new file mode 100644 +index 000000000..80318aecb +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/PULL_REQUEST_TEMPLATE.md +@@ -0,0 +1,10 @@ ++## What ++_Describe what this PR is doing._ ++ ++## Why ? ++_Justification for the PR. If there is existing issue/bug please reference. For ++bug fixes why and what can be merged in a single item._ ++ ++## How ? ++_It is optional but for complex PRs please provide information about the design, ++architecture, approach, etc. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/README b/src/mpid/ch4/netmod/ucx/ucx/README +index 7ffcdf5cc..b5a1c721d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/README ++++ b/src/mpid/ch4/netmod/ucx/ucx/README +@@ -1,17 +1,48 @@ +-UCX is a communication library implementing high-performance messaging for MPI/PGAS frameworks ++UCX stands for Unified Communication X. UCX provides an optimized communication ++layer for Message Passing (MPI), PGAS/OpenSHMEM libraries and RPC/data-centric ++applications. UCX utilizes high-speed networks, such as RDMA (InfiniBand, RoCE, ++etc), Cray Gemini or Aries, for inter-node communication. If no such network is ++available, TCP is used instead. UCX supports efficient transfer of data in ++either main memory (RAM) or GPU memory (through CUDA and ROCm libraries). ++In addition, UCX provides efficient intra-node communication, by leveraging the ++following shared memory mechanisms: posix, sysv, cma, knem, and xpmem. ++ ++### Running internal unit tests ++```sh ++$ ./autogen.sh ++$ ./contrib/configure-devel ++$ make ++$ make -C test/gtest test ++``` ++ ++### Running UCX hello-world ++Compile: + +-### Quick start + ```sh +-$ export PATH=$PATH:$MPI_HOME/bin + $ ./autogen.sh +-$ ./contrib/configure-release --prefix=$PWD/install --with-mpi +-$ make -j8 install +-$ salloc -N2 --ntasks-per-node=1 mpirun --display-map \ +- $PWD/install/bin/ucx_perftest -d mlx5_1:1 -x rc_mlx5 -c 12 -t put_lat ++$ ./contrib/configure-release --prefix=$PWD/install ++$ make ++``` ++Start server: ++ ++```sh ++$ ./src/tools/perf/ucx_perftest -c 0 ++``` ++ ++Connect client: ++ ++```sh ++$ ./src/tools/perf/ucx_perftest -t tag_lat -c 0 + ``` + +-### UCX layout +-- UCX - Unified Communication X +-- UCP - UCX Protocol +-- UCT - UCX Transport +-- UCS - UCX Services ++### UCX high-level layout ++UCX contains four main components: ++- UCP - UCX Protocol. Implements high-level abstractions such as tag-matching, ++ streams, connection negotiation and establishment, multi-rail, and handling ++ different memory types. ++- UCT - UCX Transport. Implements low-level communication primitives such as ++ active messages, remote memory access, and atomic operations. ++- UCS - UCX Services. A collection of data structures, algorithms, and system ++ utilities for common use. ++- UCM - UCX Memory. Intercepts memory allocation and release events, used by ++ memory registration cache. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/pom.xml b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/pom.xml +index 59d12b39a..abebf4c80 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/pom.xml ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/pom.xml +@@ -18,11 +18,21 @@ + ${ucx.src.dir}/ucs/.libs + ${ucx.src.dir}/uct/.libs + ${ucx.src.dir}/ucp/.libs ++ 4.12 + **/jucx/** + **/dummy/** + false + + ++ ++ ++ junit ++ junit ++ ${junit.version} ++ test ++ ++ ++ + + + +@@ -62,7 +72,7 @@ + + ${testSources} + +- ++ + + testCompile + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Bridge.java b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Bridge.java +index cd9876b92..5e52ed616 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Bridge.java ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Bridge.java +@@ -4,6 +4,8 @@ + */ + package org.ucx.jucx; + ++import org.ucx.jucx.Worker.CompletionQueue; ++ + public class Bridge { + private static final String UCM = "libucm.so"; + private static final String UCS = "libucs.so"; +@@ -18,4 +20,20 @@ public class Bridge { + LoadLibrary.loadLibrary(UCP); // UCP library + LoadLibrary.loadLibrary(JUCX); // JUCP native library + } ++ ++ private static native long createWorkerNative(int maxCompletions, ++ CompletionQueue compQueue, ++ Worker worker); ++ ++ static long createWorker(final int maxCompletions, ++ final CompletionQueue compQueue, ++ final Worker worker) { ++ return createWorkerNative(maxCompletions, compQueue, worker); ++ } ++ ++ private static native void releaseWorkerNative(long workerNativeId); ++ ++ static void releaseWorker(final Worker worker) { ++ releaseWorkerNative(worker.getNativeId()); ++ } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/LoadLibrary.java b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/LoadLibrary.java +index 745473329..350a63f4f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/LoadLibrary.java ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/LoadLibrary.java +@@ -44,7 +44,7 @@ public class LoadLibrary { + System.load(filename); + } catch (UnsatisfiedLinkError e) { + errorMessage = "Native code library failed to load: " +- + resourceName; ++ + resourceName; + } + + file.deleteOnExit(); +@@ -75,7 +75,7 @@ public class LoadLibrary { + } + + File file = new File(tempDir, +- new File(resourceURL.getPath()).getName()); ++ new File(resourceURL.getPath()).getName()); + FileOutputStream os = null; + try { + os = new FileOutputStream(file); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Worker.java b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Worker.java +new file mode 100644 +index 000000000..b4f032b29 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/java/org/ucx/jucx/Worker.java +@@ -0,0 +1,132 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++package org.ucx.jucx; ++ ++import java.io.Closeable; ++import java.io.IOException; ++import java.nio.ByteBuffer; ++import java.nio.ByteOrder; ++ ++/** ++ * Worker is the object representing a local communication resource such as a ++ * network interface or host channel adapter port. ++ */ ++@SuppressWarnings("unused") ++public class Worker implements Closeable { ++ public static final int MAX_QUEUED_EVENTS = (1 << 20); ++ ++ private long nativeId; ++ private CompletionQueue compQueue; ++ private byte[] workerAddress; ++ private Callback callback; ++ private int maxEvents; ++ private boolean closed; ++ ++ /** ++ * Creates a new Worker. ++ * ++ * @param cb ++ * Implementation of Worker.Callback interface ++ * ++ * @param maxEvents ++ * Number of maximum queued completed events ++ * ++ * @throws IllegalArgumentException ++ * In case cb == null or maxEvents <= 0 or ++ * maxEvents > MAX_QUEUED_EVENTS ++ * ++ * @throws UnsatisfiedLinkError ++ * In case an error while loading native libraries ++ * ++ * @throws IOException ++ * In case native Worker creation failed ++ */ ++ public Worker(Callback cb, int maxEvents) throws IOException { ++ if (cb == null || maxEvents <= 0 || maxEvents > MAX_QUEUED_EVENTS) { ++ throw new IllegalArgumentException(); ++ } ++ ++ // An error occurred while loading native libraries ++ if (LoadLibrary.errorMessage != null) { ++ throw new UnsatisfiedLinkError(LoadLibrary.errorMessage); ++ } ++ ++ this.callback = cb; ++ this.closed = false; ++ this.maxEvents = maxEvents; ++ this.workerAddress = null; ++ this.compQueue = new CompletionQueue(); // Shared queue wrapper ++ this.nativeId = Bridge.createWorker(maxEvents, compQueue, this); ++ if (nativeId == 0) { ++ throw new IOException("Failed to create Worker"); ++ } ++ ++ // align Java side shared queue operations endianness to be as ++ // allocated in native (C) code, in nativeCreateWorker() ++ this.compQueue.setEndianness(); ++ } ++ ++ /** ++ * Getter for native pointer as long. ++ * ++ * @return long integer representing native pointer ++ */ ++ long getNativeId() { ++ return nativeId; ++ } ++ ++ /** ++ * Getter for workerAddress as a byte array. ++ * ++ * @return clone of address (for safety reasons) ++ */ ++ public byte[] getWorkerAddress() { ++ return workerAddress.clone(); ++ } ++ ++ /** ++ * Frees all resources associated with this Worker.
++ * Worker should not be used after calling this method. ++ */ ++ @Override ++ public void close() { ++ closed = true; ++ Bridge.releaseWorker(this); ++ } ++ ++ /** ++ * Called when object is garbage collected. Frees native allocated ++ * resources. ++ */ ++ @Override ++ protected void finalize() throws Throwable { ++ if (!closed) { ++ close(); ++ } ++ } ++ ++ ++ /** ++ * Wrapper object for shared buffer between Java and native code. ++ */ ++ class CompletionQueue { ++ ByteBuffer completionBuff = null; ++ ++ private void setEndianness() { ++ completionBuff.order(ByteOrder.nativeOrder()); ++ } ++ } ++ ++ ++ /** ++ * The Callback interface must be implemented in-order to create a ++ * Worker.
++ * Worker will invoke the implemented method whenever a request is ++ * completed. ++ */ ++ public static interface Callback { ++ // Handlers to implement will be added when data path is added ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/Makefile.am +index 049de80f8..7abe96fa3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/Makefile.am +@@ -7,9 +7,9 @@ lib_LTLIBRARIES = libjucx.la + libjucx_la_CPPFLAGS = -I$(JDK)/include -I$(JDK)/include/linux \ + -I$(topdir)/src + +-libjucx_la_SOURCES = bridge.cc request_util.cc ++libjucx_la_SOURCES = bridge.cc worker.cc request_util.cc context.cc + +-libjucx_la_CXXFLAGS = -fPIC -DPIC -Werror -std=c++0x ++libjucx_la_CXXFLAGS = -fPIC -DPIC -Werror -std=c++11 + + libjucx_la_LIBADD = $(topdir)/src/ucs/libucs.la \ + $(topdir)/src/uct/libuct.la \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.cc b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.cc +index b3049fdaf..be1f84a48 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.cc +@@ -4,44 +4,63 @@ + */ + + #include "bridge.h" +-#include "request_util.h" ++#include "worker.h" + + #include +-#include "ucs/time/time.h" + + #include + #include + + +-#define ERR_EXIT(_msg, _ret) do { \ ++#define ERR_EXIT(_msg, _ret) do { \ + print_error(_msg); \ + return _ret; \ +- } while(0) ++ } while(0) + ++#define ERR_JUMP(_msg, _label) do { \ ++ print_error(_msg); \ ++ goto _label; \ ++ } while(0) + +-static JavaVM *cached_jvm; +-static jfieldID field_buff = NULL; +-static jfieldID field_addr = NULL; ++static JavaVM *cached_jvm = NULL; ++static jfieldID field_comp_queue = NULL; ++static jfieldID field_worker_addr_arr = NULL; + +-static ucp_context_h cached_ctx = NULL; ++static context cached_ctx; + + + static void print_error(const char* error); + +-// Create context when JNI first loads +-static ucs_status_t create_context(); + + extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void* reserved) { + cached_jvm = jvm; + JNIEnv *env; + + if (jvm->GetEnv((void **) &env, JNI_VERSION_1_8)) { +- ERR_EXIT("JNI version 1.8 or higher required.", JNI_ERR); ++ ERR_EXIT("JNI version 1.8 or higher required", JNI_ERR); + } + +- ucs_status_t status = create_context(); +- if (status != UCS_OK) { +- ERR_EXIT("Failed to create UCP context.", JNI_ERR); ++ jclass queue_cls_data = env->FindClass("org/ucx/jucx/Worker$CompletionQueue"); ++ if (queue_cls_data == NULL) { ++ ERR_EXIT("java org/ucx/jucx/Worker$CompletionQueue class was NOT found", ++ JNI_ERR); ++ } ++ ++ field_comp_queue = env->GetFieldID(queue_cls_data, "completionBuff", ++ "Ljava/nio/ByteBuffer;"); ++ if (field_comp_queue == NULL) { ++ ERR_EXIT("could not get completionBuff's field id", JNI_ERR); ++ } ++ ++ jclass worker_cls_data = env->FindClass("org/ucx/jucx/Worker"); ++ if (worker_cls_data == NULL) { ++ ERR_EXIT("java org/ucx/jucx/Worker class was NOT found", JNI_ERR); ++ } ++ ++ field_worker_addr_arr = env->GetFieldID(worker_cls_data, ++ "workerAddress", "[B"); ++ if (field_worker_addr_arr == NULL) { ++ ERR_EXIT("could not get workerAddress' field id", JNI_ERR); + } + + return JNI_VERSION_1_8; +@@ -51,33 +70,77 @@ static void print_error(const char* error_msg) { + fprintf(stderr, "[ERROR] JUCX - %s: %s\n", __FILE__, error_msg); + } + +-static ucs_status_t create_context() { +- if (cached_ctx) { +- return UCS_OK; ++JNIEXPORT jlong JNICALL ++Java_org_ucx_jucx_Bridge_createWorkerNative(JNIEnv *env, jclass cls, ++ jint max_comp, jobject comp_queue, ++ jobject jworker) { ++ ucp_worker_params_t worker_params = { 0 }; ++ worker* worker_ptr = NULL; ++ ucs_status_t status; ++ jobject jbyte_buff; ++ uint32_t cap = (uint32_t) max_comp; ++ ucp_address_t* local_addr; ++ size_t local_addr_len; ++ jbyteArray jaddr_arr; ++ jlong* addr_ptr; ++ jbyte* local_addr_wrap; ++ ++ worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE; ++ worker_params.thread_mode = UCS_THREAD_MODE_SINGLE; ++ ++ try { ++ worker_ptr = new worker(&cached_ctx, cap, worker_params); ++ } catch (const std::bad_alloc& ex) { ++ ERR_JUMP("Failed to initialize ucp native worker", err); + } + +- ucp_params_t ucp_params = { 0 }; +- ucp_config_t *config; +- ucs_status_t status; +- ucp_context_h ucp_context; ++ status = worker_ptr->extract_worker_address(&local_addr, local_addr_len); ++ if (!local_addr) { ++ ERR_JUMP("Failed to get ucp worker native address", err_worker); ++ } ++ ++ local_addr_wrap = new jbyte[local_addr_len]; ++ if (!local_addr_wrap) { ++ ERR_JUMP("Allocation failure", err_local_addr); ++ } ++ memcpy(local_addr_wrap, local_addr, local_addr_len); + +- status = ucp_config_read(NULL, NULL, &config); +- if (status != UCS_OK) { +- return status; ++ jaddr_arr = env->NewByteArray(local_addr_len); ++ if (!jaddr_arr) { ++ ERR_JUMP("Failed to create Java byte[] object", err_worker_addr); + } + +- ucp_params.features = UCP_FEATURE_TAG; +- ucp_params.field_mask = UCP_PARAM_FIELD_FEATURES | +- UCP_PARAM_FIELD_REQUEST_INIT | +- UCP_PARAM_FIELD_REQUEST_SIZE; ++ env->SetByteArrayRegion(jaddr_arr, 0, local_addr_len, local_addr_wrap); ++ delete[] local_addr_wrap; ++ worker_ptr->release_worker_address(local_addr); + +- ucp_params.request_size = sizeof(jucx_request); +- ucp_params.request_init = request_util::request_handler::request_init; ++ // Set the Java workerAddress field ++ env->SetObjectField(jworker, field_worker_addr_arr, jaddr_arr); + +- status = ucp_init(&ucp_params, config, &ucp_context); +- ucp_config_release(config); ++ jbyte_buff = env->NewDirectByteBuffer(worker_ptr->get_event_queue(), cap); ++ if (!jbyte_buff) { ++ env->ExceptionClear(); ++ ERR_JUMP("Failed to create Java ByteBuffer object", err_worker); ++ } + +- cached_ctx = ucp_context; ++ // Set the completion queue field ++ env->SetObjectField(comp_queue, field_comp_queue, jbyte_buff); ++ ++ return (native_ptr) worker_ptr; ++ ++err_worker_addr: ++ delete[] local_addr_wrap; ++err_local_addr: ++ worker_ptr->release_worker_address(local_addr); ++err_worker: ++ delete worker_ptr; ++err: ++ return 0; ++} + +- return status; ++JNIEXPORT void JNICALL ++Java_org_ucx_jucx_Bridge_releaseWorkerNative(JNIEnv *env, jclass cls, ++ jlong worker_id) { ++ worker* worker_ptr = (worker*) worker_id; ++ delete worker_ptr; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.h b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.h +index ac3fd2f39..7ac8d5304 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/bridge.h +@@ -11,7 +11,23 @@ + typedef uintptr_t native_ptr; + + extern "C" { +- // JNI methods proto-types goes here. Will be added later ++ ++/* ++ * Class: org_ucx_jucx_Bridge ++ * Method: createWorkerNative ++ * Signature: (ILorg/ucx/jucx/Worker/CompletionQueue;Lorg/ucx/jucx/Worker;)J ++ */ ++JNIEXPORT jlong JNICALL Java_org_ucx_jucx_Bridge_createWorkerNative ++ (JNIEnv *, jclass, jint, jobject, jobject); ++ ++ ++/* ++ * Class: org_ucx_jucx_Bridge ++ * Method: releaseWorkerNative ++ * Signature: (J)V ++ */ ++JNIEXPORT void JNICALL Java_org_ucx_jucx_Bridge_releaseWorkerNative ++ (JNIEnv *, jclass, jlong); + } + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.cc b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.cc +new file mode 100644 +index 000000000..4f2323c03 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.cc +@@ -0,0 +1,72 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++#include "context.h" ++#include "request_util.h" ++ ++ucs_status_t context::ref_context() { ++ ucs_status_t status = UCS_OK; ++ { // Lock before checking context and updating reference counter ++ std::lock_guard lk(ref_lock); ++ if (ucp_context == nullptr) { ++ status = create_context(); ++ } ++ ++ if (status == UCS_OK) { ++ ++ref_count; ++ } ++ } // Unlock ++ ++ return status; ++} ++ ++void context::deref_context() { ++ std::lock_guard lk(ref_lock); ++ if (--ref_count == 0) { // All workers released ++ release_context(); ++ } ++} ++ ++context::~context() { ++ if (ucp_context) { ++ ucp_cleanup(ucp_context); ++ } ++} ++ ++ucp_context_h context::get_ucp_context() { ++ return ucp_context; ++} ++ ++ucs_status_t context::create_context() { ++ ucp_params_t ucp_params = { 0 }; ++ ucp_config_t *config; ++ ucs_status_t status; ++ ++ status = ucp_config_read(nullptr, nullptr, &config); ++ if (status != UCS_OK) { ++ return status; ++ } ++ ++ uint64_t features = UCP_FEATURE_TAG; ++ uint64_t field_mask = UCP_PARAM_FIELD_FEATURES | ++ UCP_PARAM_FIELD_REQUEST_INIT | ++ UCP_PARAM_FIELD_REQUEST_SIZE; ++ ++ ucp_params.features = features; ++ ucp_params.field_mask = field_mask; ++ ucp_params.request_size = sizeof(jucx_request); ++ ucp_params.request_init = request_util::request_handler::request_init; ++ ++ status = ucp_init(&ucp_params, config, &ucp_context); ++ ucp_config_release(config); ++ ++ return status; ++} ++ ++void context::release_context() { ++ if (ucp_context) { ++ ucp_cleanup(ucp_context); ++ } ++ ucp_context = nullptr; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.h b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.h +new file mode 100644 +index 000000000..4011b702f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/context.h +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++#ifndef CONTEXT_H_ ++#define CONTEXT_H_ ++ ++#include ++ ++#include ++ ++ ++/** ++ * Context wrapper - allocates and releases ucp context ++ */ ++class context { ++public: ++ context() : ucp_context(nullptr), ref_count(0) {} ++ ++ ucs_status_t ref_context(); ++ ++ void deref_context(); ++ ++ ~context(); ++ ++ ucp_context_h get_ucp_context(); ++ ++private: ++ ucp_context_h ucp_context; ++ size_t ref_count; ++ std::mutex ref_lock; ++ ++ ucs_status_t create_context(); ++ ++ void release_context(); ++}; ++ ++ ++#endif /* CONTEXT_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.cc b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.cc +index aa62f1a95..03d78a878 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.cc +@@ -3,9 +3,10 @@ + * See file LICENSE for terms. + */ + #include "request_util.h" ++#include "worker.h" + + void request_util::request_handler::request_init(void *request) { + jucx_request* req = (jucx_request*) request; + +- // Currently no initialization needed ++ req->request_worker = NULL; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.h b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.h +index 3bd1888bb..76e9fe17f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/request_util.h +@@ -10,14 +10,16 @@ + + #include + ++// forward declaration ++class worker; ++ + /** + * class to hold the request struct and request handlers + */ + class request_util { + public: + struct request_t { +- // User defined request +- // Data members will be added later ++ worker* request_worker; + }; + + class request_handler { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.cc b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.cc +new file mode 100644 +index 000000000..0f63b2342 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.cc +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++#include "worker.h" ++ ++#include // bad_alloc exception ++ ++worker::worker(context* ctx, uint32_t cap, ucp_worker_params_t params) : ++ jucx_context(ctx), ucp_worker(nullptr), ++ queue_size(cap), event_queue(nullptr) { ++ ucs_status_t status = jucx_context->ref_context(); ++ if (status != UCS_OK) { ++ throw std::bad_alloc{}; ++ } ++ ++ status = ucp_worker_create(jucx_context->get_ucp_context(), ++ ¶ms, &ucp_worker); ++ if (status != UCS_OK) { ++ jucx_context->deref_context(); ++ throw std::bad_alloc{}; ++ } ++ event_queue = new char[queue_size]; ++} ++ ++worker::~worker() { ++ delete[] event_queue; ++ ucp_worker_destroy(ucp_worker); ++ jucx_context->deref_context(); ++} ++ ++ucs_status_t worker::extract_worker_address(ucp_address_t** worker_address, ++ size_t& address_length) { ++ return ucp_worker_get_address(ucp_worker, worker_address, &address_length); ++} ++ ++void worker::release_worker_address(ucp_address_t* worker_address) { ++ ucp_worker_release_address(ucp_worker, worker_address); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.h b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.h +new file mode 100644 +index 000000000..d941c08ab +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/main/native/worker.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++#ifndef SRC_WORKER_H_ ++#define SRC_WORKER_H_ ++ ++#include "context.h" ++ ++#include ++ ++#include ++ ++class worker { ++public: ++ worker(context* ctx, uint32_t cap, ucp_worker_params_t params); ++ ++ ~worker(); ++ ++ ucs_status_t extract_worker_address(ucp_address_t** worker_address, ++ size_t& address_length); ++ ++ void release_worker_address(ucp_address_t* worker_address); ++ ++ char *get_event_queue() const { ++ return event_queue; ++ } ++ ++ ucp_worker_h get_ucp_worker() const { ++ return ucp_worker; ++ } ++ ++private: ++ context* jucx_context; ++ ucp_worker_h ucp_worker; ++ uint32_t queue_size; ++ char* event_queue; ++}; ++ ++#endif /* SRC_WORKER_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/test/java/org/ucx/jucx/WorkerTest.java b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/test/java/org/ucx/jucx/WorkerTest.java +new file mode 100644 +index 000000000..1c909e9d5 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/bindings/java/src/test/java/org/ucx/jucx/WorkerTest.java +@@ -0,0 +1,97 @@ ++package org.ucx.jucx; ++ ++import static org.junit.Assert.assertTrue; ++import static org.junit.Assert.fail; ++ ++import java.io.IOException; ++import java.util.Random; ++ ++import org.junit.Before; ++import org.junit.Test; ++import org.ucx.jucx.Worker.Callback; ++ ++/** ++ * Worker unit tests class ++ */ ++public class WorkerTest { ++ private Callback cb; ++ ++ @Before ++ public void initCallback() { ++ cb = new Callback() {}; ++ } ++ ++ @Test ++ public void testMultipleWorkersInitialization() { ++ int numOfWorkers = 10; ++ int maxEvents = 128; ++ Worker[] workers = new Worker[numOfWorkers]; ++ ++ for (int i = 0; i < numOfWorkers; i++) { ++ try { ++ workers[i] = new Worker(cb, maxEvents); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ } ++ ++ for (int i = 0; i < workers.length; i++) { ++ workers[i].close(); ++ } ++ } ++ ++ @Test ++ public void testWorkerFieldsAndGetters() { ++ int maxEvents = 128; ++ Worker worker = null; ++ long nativeId = -1; ++ byte[] workerAddress = null; ++ ++ try { ++ worker = new Worker(cb, maxEvents); ++ nativeId = worker.getNativeId(); ++ workerAddress = worker.getWorkerAddress(); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ ++ assertTrue("Worker fields initialization failed", ++ nativeId > 0 && ++ workerAddress != null && ++ workerAddress.length > 0); ++ ++ worker.close(); ++ } ++ ++ @SuppressWarnings({ "resource", "unused" }) ++ @Test(expected = IllegalArgumentException.class) ++ public void testWorkerCbNullInitialization() { ++ // Random legal event queue size ++ int maxEvents = new Random().nextInt(Worker.MAX_QUEUED_EVENTS) + 1; ++ try { ++ Worker worker = new Worker(null, maxEvents); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ } ++ ++ @SuppressWarnings({ "resource", "unused" }) ++ @Test(expected = IllegalArgumentException.class) ++ public void testWorkerQueueSizeNonPositiveInitialization() { ++ try { ++ Worker worker = new Worker(cb, 0); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ } ++ ++ @SuppressWarnings({ "resource", "unused" }) ++ @Test(expected = IllegalArgumentException.class) ++ public void testWorkerQueueSizeExceedingInitialization() { ++ try { ++ Worker worker = new Worker(cb, Worker.MAX_QUEUED_EVENTS + 1); ++ } catch (IOException e) { ++ fail(e.getMessage()); ++ } ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/compiler.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/compiler.m4 +index e5ce14ed2..9982feadf 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/compiler.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/compiler.m4 +@@ -1,6 +1,7 @@ + # + # Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. + # Copyright (c) UT-Battelle, LLC. 2017. ALL RIGHTS RESERVED. ++# Copyright (C) ARM Ltd. 2016-2018. ALL RIGHTS RESERVED. + # See file LICENSE for terms. + # + +@@ -84,15 +85,69 @@ AC_DEFUN([COMPILER_OPTION], + AS_IF([test "x$with_$1" != "xno"], + [SAVE_CFLAGS="$CFLAGS" + CFLAGS="$BASE_CFLAGS $CFLAGS $3" +- AC_MSG_CHECKING([$2]) ++ AC_MSG_CHECKING([$3]) + CHECK_CROSS_COMP([AC_LANG_SOURCE([$5])], + [AC_MSG_RESULT([yes]) +- OPT_CFLAGS="$OPT_CFLAGS|$1"], ++ # TODO: Add CPU UARCH detector and validator in UCX init. ++ # As for now we will avoid passing this information to ++ # library. ++ AS_IF([test "x$1" != "xmcpu" -a "x$1" != "xmarch"], ++ [OPT_CFLAGS="$OPT_CFLAGS|$1"],[])], + [AC_MSG_RESULT([no])]) + CFLAGS="$SAVE_CFLAGS"]) + ]) + + ++# ++# Check platform uarch and apply micro-architecture specific optimizations ++# ++AC_DEFUN([DETECT_UARCH], ++[ ++ cpuimpl=`grep 'CPU implementer' /proc/cpuinfo 2> /dev/null | cut -d: -f2 | tr -d " " | head -n 1` ++ cpuarch=`grep 'CPU architecture' /proc/cpuinfo 2> /dev/null | cut -d: -f2 | tr -d " " | head -n 1` ++ cpuvar=`grep 'CPU variant' /proc/cpuinfo 2> /dev/null | cut -d: -f2 | tr -d " " | head -n 1` ++ cpupart=`grep 'CPU part' /proc/cpuinfo 2> /dev/null | cut -d: -f2 | tr -d " " | head -n 1` ++ ++ ax_cpu="" ++ ax_arch="" ++ ++ AC_MSG_NOTICE(Detected CPU implementation: ${cpuimpl}) ++ AC_MSG_NOTICE(Detected CPU arhitecture: ${cpuarch}) ++ AC_MSG_NOTICE(Detected CPU variant: ${cpuvar}) ++ AC_MSG_NOTICE(Detected CPU part: ${cpupart}) ++ ++ case $cpuimpl in ++ 0x42) case $cpupart in ++ 0x516 | 0x0516) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX2], 1, [Cavium ThunderX2]) ++ ax_cpu="thunderx2t99" ++ ax_arch="armv8.1-a+lse" ;; ++ 0xaf | 0x0af) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX2], 1, [Cavium ThunderX2]) ++ ax_cpu="thunderx2t99" ++ ax_arch="armv8.1-a+lse" ;; ++ esac ++ ;; ++ 0x43) case $cpupart in ++ 0x516 | 0x0516) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX2], 1, [Cavium ThunderX2]) ++ ax_cpu="thunderx2t99" ++ ax_arch="armv8.1-a+lse" ;; ++ 0xaf | 0x0af) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX2], 1, [Cavium ThunderX2]) ++ ax_cpu="thunderx2t99" ++ ax_arch="armv8.1-a+lse" ;; ++ 0xa1 | 0x0a1) ++ AC_DEFINE([HAVE_AARCH64_THUNDERX1], 1, [Cavium ThunderX1]) ++ ax_cpu="thunderxt88" ;; ++ esac ++ ;; ++ *) ax_cpu="native" ++ ;; ++ esac ++]) ++ ++ + # + # CHECK_DEPRECATED_DECL_FLAG (flag, variable) + # +@@ -165,6 +220,25 @@ AS_IF([test "x$with_avx" != xyes], + ]) + + ++DETECT_UARCH() ++ ++# ++# CPU tuning ++# ++AS_IF([test "x$ax_cpu" != "x"], ++ [COMPILER_OPTION([mcpu], [CPU Model], [-mcpu=$ax_cpu], [$enable_optimizations], ++ [int main() { return 0;}]) ++ ]) ++ ++# ++# Architecture tuning ++# ++AS_IF([test "x$ax_arch" != "x"], ++ [COMPILER_OPTION([march], [architecture tuning], [-march=$ax_arch], [$enable_optimizations], ++ [int main() { return 0;}]) ++ ]) ++ ++ + # + # Check for compiler attribute which disables optimizations per-function. + # +@@ -172,6 +246,25 @@ CHECK_SPECIFIC_ATTRIBUTE([optimize], [NOOPTIMIZE], + [int foo (int arg) __attribute__ ((optimize("O0")));]) + + ++# ++# Check for C++11 support ++# ++AC_MSG_CHECKING([c++11 support]) ++AC_LANG_PUSH([C++]) ++SAVE_CXXFLAGS="$CXXFLAGS" ++CXX11FLAGS="-std=c++11" ++CXXFLAGS="$CXXFLAGS $CXX11FLAGS" ++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main() { return 0; } ]])], ++ [AC_MSG_RESULT([yes]) ++ AC_SUBST([CXX11FLAGS]) ++ cxx11_happy=yes], ++ [AC_MSG_RESULT([no]) ++ cxx11_happy=no]) ++CXXFLAGS="$SAVE_CXXFLAGS" ++AC_LANG_POP ++AM_CONDITIONAL([HAVE_CXX11], [test "x$cxx11_happy" != xno]) ++ ++ + # + # Set C++ optimization/debug flags to be the same as for C + # +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/cray_ugni.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/cray_ugni.m4 +index cbc03d5c3..97b9c832c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/cray_ugni.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/cray_ugni.m4 +@@ -8,8 +8,8 @@ cray_ugni_supported=no + AC_ARG_WITH([ugni], + [AC_HELP_STRING([--with-ugni(=DIR)], + [Build Cray UGNI support, adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])], +- [with_ugni=forced], +- [with_ugni=yes]) ++ [], ++ [with_ugni=default]) + + AS_IF([test "x$with_ugni" != "xno"], + [PKG_CHECK_MODULES([CRAY_UGNI], [cray-ugni cray-pmi], +@@ -17,7 +17,7 @@ AS_IF([test "x$with_ugni" != "xno"], + cray_ugni_supported=yes + AC_DEFINE([HAVE_TL_UGNI], [1], + [Define if UGNI transport exists.])], +- [AS_IF([test "x$with_ugni" == "xforced"], ++ [AS_IF([test "x$with_ugni" != "xdefault"], + [AC_MSG_WARN([UGNI support was requested but cray-ugni and cray-pmi packages can't be found]) + AC_MSG_ERROR([Cannot continue])],[])] + )]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ib.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ib.m4 +index 59cc567dd..e46b80c5c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ib.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ib.m4 +@@ -56,12 +56,15 @@ AC_ARG_WITH([cm], + + + # +-# mlx5 bare-metal support ++# mlx5 DV support + # +-AC_ARG_WITH([mlx5-hw], +- [AC_HELP_STRING([--with-mlx5-hw], [Compile with mlx5 bare-metal support])], ++AC_ARG_WITH([mlx5-dv], ++ [AC_HELP_STRING([--with-mlx5-dv], [Compile with mlx5 Direct Verbs ++ support. Direct Verbs (DV) support provides additional ++ acceleration capabilities that are not available in a ++ regular mode.])], + [], +- [with_mlx5_hw=yes]) ++ [with_mlx5_dv=yes]) + + + # +@@ -73,6 +76,15 @@ AC_ARG_WITH([ib-hw-tm], + [with_ib_hw_tm=yes]) + + ++# ++# DM Support ++# ++AC_ARG_WITH([dm], ++ [AC_HELP_STRING([--with-dm], [Compile with Device Memory support])], ++ [], ++ [with_dm=yes]) ++ ++ + # + # Check basic IB support: User wanted at least one IB transport, and we found + # verbs header file and library. +@@ -133,40 +145,100 @@ AS_IF([test "x$with_ib" == xyes], + verbs_exp=yes], + [verbs_exp=no]) + +- AS_IF([test "x$with_mlx5_hw" != xno], +- [AC_CHECK_HEADERS([infiniband/mlx5_hw.h], +- [with_mlx5_hw=yes], +- [with_mlx5_hw=no])]) +- +- AC_CHECK_DECLS([ibv_mlx5_exp_get_qp_info, +- ibv_mlx5_exp_get_cq_info, +- ibv_mlx5_exp_get_srq_info, +- ibv_mlx5_exp_update_cq_ci, +- MLX5_WQE_CTRL_SOLICITED], +- [], [], [[#include ]]) +- +- # Disable mlx5_hw if the driver does not provide BF locking information +- AS_IF([test "x$ac_cv_have_decl_ibv_mlx5_exp_get_qp_info" == "xyes"], +- [AC_CHECK_MEMBERS([struct ibv_mlx5_qp_info.bf.need_lock], ++ AC_CHECK_MEMBERS([struct ibv_exp_device_attr.exp_device_cap_flags, ++ struct ibv_exp_device_attr.odp_caps, ++ struct ibv_exp_device_attr.odp_caps.per_transport_caps.dc_odp_caps, ++ struct ibv_exp_device_attr.odp_mr_max_size, ++ struct ibv_exp_qp_init_attr.max_inl_recv, ++ struct ibv_async_event.element.dct], ++ [], [], [[#include ]]) ++ ++ AC_CHECK_DECLS([IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN], ++ [have_cq_io=yes], [], [[#include ]]) ++ ++ AC_CHECK_DECLS([IBV_EXP_CQ_IGNORE_OVERRUN], ++ [have_cq_io=yes], [], [[#include ]]) ++ ++ AS_IF([test "x$with_mlx5_dv" != xno], [ ++ AC_MSG_NOTICE([Checking for legacy bare-metal support]) ++ AC_CHECK_HEADERS([infiniband/mlx5_hw.h], ++ [with_mlx5_hw=yes ++ mlx5_include=mlx5_hw.h ++ AC_CHECK_DECLS([ ++ ibv_mlx5_exp_get_qp_info, ++ ibv_mlx5_exp_get_cq_info, ++ ibv_mlx5_exp_get_srq_info, ++ ibv_mlx5_exp_update_cq_ci, ++ MLX5_WQE_CTRL_SOLICITED], ++ [], [], [[#include ]]) ++ AC_CHECK_MEMBERS([struct mlx5_srq.cmd_qp], ++ [], [with_ib_hw_tm=no], ++ [[#include ]]) ++ AC_CHECK_MEMBERS([struct mlx5_ah.ibv_ah], ++ [has_get_av=yes], [], ++ [[#include ]]) ++ AC_CHECK_MEMBERS([struct ibv_mlx5_qp_info.bf.need_lock], + [], + [AC_MSG_WARN([Cannot use mlx5 QP because it assumes dedicated BF]) + AC_MSG_WARN([Please upgrade MellanoxOFED to 3.0 or above]) + with_mlx5_hw=no], +- [[#include ]])], +- []) ++ [[#include ]]) ++ AC_CHECK_DECLS([ ++ IBV_EXP_QP_INIT_ATTR_RES_DOMAIN, ++ IBV_EXP_RES_DOMAIN_THREAD_MODEL, ++ ibv_exp_create_res_domain, ++ ibv_exp_destroy_res_domain], ++ [AC_DEFINE([HAVE_IBV_EXP_RES_DOMAIN], 1, [IB resource domain]) ++ has_res_domain=yes], [], [[#include ]]) ++ ], [with_mlx5_hw=no]) ++ ++ AC_MSG_NOTICE([Checking for DV bare-metal support]) ++ ++ AC_CHECK_LIB([mlx5-rdmav2], [mlx5dv_query_device], ++ [AC_SUBST(LIB_MLX5, [-lmlx5-rdmav2])],[ ++ AC_CHECK_LIB([mlx5], [mlx5dv_query_device], ++ [AC_SUBST(LIB_MLX5, [-lmlx5])], ++ [with_mlx5_dv=no], [-libverbs])], [-libverbs]) ++ ++ AS_IF([test "x$with_mlx5_dv" != xno], [ ++ AC_CHECK_HEADERS([infiniband/mlx5dv.h], ++ [with_mlx5_hw=yes ++ with_mlx5_dv=yes ++ mlx5_include=mlx5dv.h], [], [ ])]) ++ ++ AS_IF([test "x$with_mlx5_dv" == xyes -a "x$have_cq_io" == xyes ], [ ++ AC_CHECK_DECLS([ ++ mlx5dv_init_obj], ++ [], [], [[#include ]]) ++ AC_CHECK_MEMBERS([struct mlx5dv_cq.cq_uar], ++ [], [], [[#include ]]) ++ AC_CHECK_DECLS([MLX5DV_OBJ_AH], [has_get_av=yes], ++ [], [[#include ]]) ++ AC_CHECK_DECLS([MLX5DV_DCTYPE_DCT], ++ [have_dc_dv=yes], [], [[#include ]]) ++ AC_CHECK_DECLS([ibv_alloc_td], ++ [has_res_domain=yes], [], [[#include ]])]) ++ ++ AC_CHECK_DECLS([ibv_alloc_td], ++ [has_res_domain=yes], [], [[#include ]])]) ++ ++ AS_IF([test "x$has_res_domain" == xyes -a "x$have_cq_io" == xyes ], [], [ ++ with_mlx5_hw=no]) + + AS_IF([test "x$with_mlx5_hw" == xyes], + [AC_MSG_NOTICE([Compiling with mlx5 bare-metal support]) +- AC_DEFINE([HAVE_MLX5_HW], 1, [mlx5 bare-metal support])], +- []) ++ AC_DEFINE([HAVE_MLX5_HW], 1, [mlx5 bare-metal support]) ++ AS_IF([test "x$has_get_av" == xyes], ++ [AC_DEFINE([HAVE_MLX5_HW_UD], 1, [mlx5 UD bare-metal support]) ++ AC_DEFINE([HAVE_MLX5_HW_DC], 1, [mlx5 DC bare-metal support])], [])], []) + + AC_CHECK_DECLS([IBV_LINK_LAYER_INFINIBAND, + IBV_LINK_LAYER_ETHERNET, +- IBV_EVENT_GID_CHANGE], ++ IBV_EVENT_GID_CHANGE, ++ ibv_create_qp_ex], + [], [], [[#include ]]) + +- AC_CHECK_DECLS([IBV_EXP_CQ_IGNORE_OVERRUN, +- IBV_EXP_ACCESS_ALLOCATE_MR, ++ AC_CHECK_DECLS([IBV_EXP_ACCESS_ALLOCATE_MR, + IBV_EXP_ACCESS_ON_DEMAND, + IBV_EXP_DEVICE_MR_ALLOCATE, + IBV_EXP_WR_NOP, +@@ -180,7 +252,8 @@ AS_IF([test "x$with_ib" == xyes], + ibv_exp_create_qp, + ibv_exp_prefetch_mr, + ibv_exp_create_srq, +- ibv_exp_setenv], ++ ibv_exp_setenv, ++ ibv_exp_query_gid_attr], + [], [], [[#include ]]) + + AC_CHECK_DECLS([ibv_exp_post_send, +@@ -192,8 +265,11 @@ AS_IF([test "x$with_ib" == xyes], + [have_ext_atomics=no], + [[#include ]]) + ++ AC_CHECK_DECLS(IBV_EXP_DEVICE_ATTR_RESERVED_2, [], [], ++ [[#include ]]) ++ + # UMR support +- AC_CHECK_DECLS(IBV_EXP_WR_UMR_FILL, ++ AC_CHECK_DECLS(IBV_EXP_MR_INDIRECT_KLMS, + [AC_DEFINE([HAVE_EXP_UMR], 1, [IB UMR support])], + [], + [[#include ]]) +@@ -208,8 +284,8 @@ AS_IF([test "x$with_ib" == xyes], + [], + [[#include ]]) + +- AC_CHECK_DECLS(IBV_EXP_MR_INDIRECT_KLMS, +- [AC_DEFINE([HAVE_EXP_UMR_NEW_API], 1, [IB UMR new API])], ++ AC_CHECK_DECLS(IBV_EXP_MR_FIXED_BUFFER_SIZE, ++ [AC_DEFINE([HAVE_EXP_UMR_KSM], 1, [IB UMR KSM support])], + [], + [[#include ]]) + +@@ -226,27 +302,23 @@ AS_IF([test "x$with_ib" == xyes], + AC_CHECK_DECLS(IBV_EXP_ODP_SUPPORT_IMPLICIT, [], [], + [[#include ]]) + +- AC_CHECK_MEMBERS([struct ibv_exp_device_attr.exp_device_cap_flags, +- struct ibv_exp_device_attr.odp_caps, +- struct ibv_exp_device_attr.odp_caps.per_transport_caps.dc_odp_caps, +- struct ibv_exp_device_attr.odp_mr_max_size, +- struct ibv_exp_qp_init_attr.max_inl_recv, +- struct ibv_async_event.element.dct], +- [], [], [[#include ]]) +- + AC_CHECK_MEMBERS([struct mlx5_wqe_av.base, + struct mlx5_grh_av.rmac], +- [], [], [[#include ]]) ++ [], [], [[#include ]]) + + AC_DEFINE([HAVE_IB], 1, [IB support]) + +- AS_IF([test "x$with_dc" != xno], +- [AC_CHECK_DECLS(IBV_EXP_QPT_DC_INI, [], [with_dc=no], [[#include ]]) +- AC_CHECK_MEMBERS([struct ibv_exp_dct_init_attr.inline_size], [] , [with_dc=no], [[#include ]]) +- ]) +- AS_IF([test "x$with_dc" != xno], +- [AC_DEFINE([HAVE_TL_DC], 1, [DC transport support]) +- transports="${transports},dc"]) ++ AC_CHECK_DECLS([IBV_EXP_QPT_DC_INI], ++ [have_dc_exp=yes], [], [[#include ]]) ++ ++ AS_IF([test "x$with_dc" != xno -a \( "x$have_dc_exp" = xyes -o "x$have_dc_dv" = xyes \)], [ ++ AC_DEFINE([HAVE_TL_DC], 1, [DC transport support]) ++ transports="${transports},dc" ++ AS_IF([test -n "$have_dc_dv"], ++ [AC_DEFINE([HAVE_DC_DV], 1, [DC DV support])], [ ++ AS_IF([test -n "$have_dc_exp"], ++ [AC_DEFINE([HAVE_DC_EXP], 1, [DC EXP support])])])], ++ [with_dc=no]) + + AS_IF([test "x$with_rc" != xno], + [AC_DEFINE([HAVE_TL_RC], 1, [RC transport support]) +@@ -279,6 +351,21 @@ AS_IF([test "x$with_ib" == xyes], + [], [#include ]) + ]) + ++ # Device Memory support ++ AS_IF([test "x$with_dm" != xno], ++ [AC_TRY_COMPILE([#include ], ++ [ ++ struct ibv_exp_dm ibv_dm; ++ struct ibv_exp_alloc_dm_attr dm_attr; ++ void* a1 = ibv_exp_alloc_dm; ++ void* a2 = ibv_exp_reg_mr; ++ void* a3 = ibv_dereg_mr; ++ void* a4 = ibv_exp_free_dm; ++ ], ++ [AC_DEFINE([HAVE_IBV_EXP_DM], 1, [Device Memory support])], ++ []) ++ ]) ++ + AC_CHECK_DECLS([ibv_cmd_modify_qp], + [], [], [[#include ]]) + +@@ -297,6 +384,7 @@ AS_IF([test "x$with_ib" == xyes], + with_rc=no + with_ud=no + with_mlx5_hw=no ++ with_mlx5_dv=no + with_ib_hw_tm=no + ]) + +@@ -307,7 +395,12 @@ AS_IF([test "x$with_ib" == xyes], + AM_CONDITIONAL([HAVE_IB], [test "x$with_ib" != xno]) + AM_CONDITIONAL([HAVE_TL_RC], [test "x$with_rc" != xno]) + AM_CONDITIONAL([HAVE_TL_DC], [test "x$with_dc" != xno]) ++AM_CONDITIONAL([HAVE_DC_DV], [test -n "$have_dc_dv"]) ++AM_CONDITIONAL([HAVE_DC_EXP], [test -n "$have_dc_exp"]) + AM_CONDITIONAL([HAVE_TL_UD], [test "x$with_ud" != xno]) + AM_CONDITIONAL([HAVE_TL_CM], [test "x$with_cm" != xno]) + AM_CONDITIONAL([HAVE_MLX5_HW], [test "x$with_mlx5_hw" != xno]) ++AM_CONDITIONAL([HAVE_MLX5_DV], [test "x$with_mlx5_dv" != xno]) ++AM_CONDITIONAL([HAVE_MLX5_HW_UD], [test "x$with_mlx5_hw" != xno -a "x$has_get_av" != xno]) ++AM_CONDITIONAL([HAVE_MLX5_HW_DC], [test "x$with_mlx5_hw" != xno -a "x$has_get_av" != xno -a "x$have_dc" != xno]) + AM_CONDITIONAL([HAVE_IBV_EX_HW_TM], [test "x$with_ib_hw_tm" != xno]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/java.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/java.m4 +index 121716999..dc7c20674 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/java.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/java.m4 +@@ -9,6 +9,7 @@ + # + # + java_happy="no" ++mvn_args="-Dsources=\"**/dummy/**\" -DtestSources=\"**/jucx/**\" -Dmaven.test.skip=true -DskipCopy=true" + AC_ARG_WITH([java], + [AC_HELP_STRING([--with-java=(PATH)], + [Compile Java UCX (default is guess).]) +@@ -21,8 +22,8 @@ AS_IF([test "x$with_java" != xno], + AS_IF([test "x${MVNBIN}" == "xyes" -a "x${JAVABIN}" == "xyes"], + [ + AC_MSG_CHECKING([mvn plugins and dependencies availability]) +- AC_SUBST([MVNAVAIL], [$(cd bindings/java && mvn -Dsources="**/dummy/**" -DtestSources="**/jucx/**" -DskipCopy="true" -q install >/dev/null && \ +- mvn -Dsources="**/dummy/**" -DtestSources="**/jucx/**" -DskipCopy="true" -q clean >/dev/null && \ ++ AC_SUBST([MVNAVAIL], [$(cd bindings/java && mvn $(echo "${mvn_args}") install >/dev/null && \ ++ mvn $(echo "${mvn_args}") clean >/dev/null && \ + echo yes || echo no)]) + AC_MSG_RESULT([${MVNAVAIL}]) + AS_IF([test -n "$with_java" -a "x$with_java" != "xyes" -a "x$with_java" != "xguess"], +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/knem.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/knem.m4 +index c748cf151..0cb894bd7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/knem.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/knem.m4 +@@ -7,22 +7,32 @@ AC_ARG_WITH([knem], + [], [with_knem=guess]) + + AS_IF([test "x$with_knem" != xno], +- [AS_IF([test ! -d $with_knem], +- [ +- AC_MSG_NOTICE([KNEM path was not found, guessing ...]) +- with_knem=$(${PKG_CONFIG} --variable=prefix knem || find /opt/knem* -name knem_io.h |xargs dirname |sed -e s,/include,,g) +- ], +- [:]) +- AC_CHECK_HEADER([$with_knem/include/knem_io.h], +- [BASE_CFLAGS="$BASE_CFLAGS -I$with_knem/include" +- BASE_CPPFLAGS="$BASE_CPPFLAGS -I$with_knem/include" +- AC_DEFINE([HAVE_KNEM], [1], [Enable the use of KNEM]) +- transports="${transports},knem" +- knem_happy="yes"], +- [AC_MSG_WARN([KNEM requested but not found]) +- AC_DEFINE([HAVE_KNEM], [0], [Disable the use of KNEM])])], +- [AC_MSG_WARN([KNEM was explicitly disabled]) +- AC_DEFINE([HAVE_KNEM], [0], [Disable the use of KNEM])] ++ [AS_IF([test "x$with_knem" == xguess -o "x$with_knem" == xyes -o "x$with_knem" == x], ++ [AC_MSG_NOTICE([KNEM path was not found, guessing ...]) ++ ucx_check_knem_include_dir=$(pkg-config --cflags knem)], ++ [ucx_check_knem_include_dir=-I$with_knem/include]) ++ ++ save_CPPFLAGS="$CPPFLAGS" ++ ++ CPPFLAGS="$ucx_check_knem_include_dir $CPPFLAGS" ++ ++ AC_CHECK_DECL([KNEM_CMD_GET_INFO], ++ [BASE_CFLAGS="$BASE_CFLAGS $ucx_check_knem_include_dir" ++ BASE_CPPFLAGS="$BASE_CPPFLAGS $ucx_check_knem_include_dir" ++ AC_DEFINE([HAVE_KNEM], [1], [Enable the use of KNEM]) ++ transports="${transports},knem" ++ knem_happy="yes"], ++ [AS_IF([test "x$with_knem" != xguess], ++ [AC_MSG_ERROR([KNEM requested but required file (knem_io.h) could not be found]) ++ AC_DEFINE([HAVE_KNEM], [0], [Disable the use of KNEM])], ++ [AC_MSG_WARN([KNEM requested but required file (knem_io.h) could not be found])])], ++ [[#include ]]) ++ ++ CPPFLAGS="$save_CPPFLAGS" ++ ++ ], ++ [AC_MSG_WARN([KNEM was explicitly disabled]) ++ AC_DEFINE([HAVE_KNEM], [0], [Disable the use of KNEM])] + ) + + AM_CONDITIONAL([HAVE_KNEM], [test "x$knem_happy" != xno]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/rocm.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/rocm.m4 +index 6aa9f8bf5..ee4e93c85 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/rocm.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/rocm.m4 +@@ -1,47 +1,93 @@ + # +-# Copyright (C) Advanced Micro Devices, Inc. 2016 - 2017. ALL RIGHTS RESERVED. ++# Copyright (C) Advanced Micro Devices, Inc. 2016 - 2018. ALL RIGHTS RESERVED. + # See file LICENSE for terms. + # + ++# ROCM_PARSE_FLAGS(ARG, VAR_LIBS, VAR_LDFLAGS, VAR_CPPFLAGS) ++# ---------------------------------------------------------- ++# Parse whitespace-separated ARG into appropriate LIBS, LDFLAGS, and ++# CPPFLAGS variables. ++AC_DEFUN([ROCM_PARSE_FLAGS], ++[for arg in $$1 ; do ++ AS_CASE([$arg], ++ [yes], [], ++ [no], [], ++ [-l*|*.a|*.so], [$2="$$2 $arg"], ++ [-L*|-WL*|-Wl*], [$3="$$3 $arg"], ++ [-I*], [$4="$$4 $arg"], ++ [*lib|*lib/|*lib64|*lib64/],[AS_IF([test -d $arg], [$3="$$3 -L$arg"], ++ [AC_MSG_WARN([$arg of $1 not parsed])])], ++ [*include|*include/],[AS_IF([test -d $arg], [$4="$$4 -I$arg"], ++ [AC_MSG_WARN([$arg of $1 not parsed])])], ++ [AC_MSG_WARN([$arg of $1 not parsed])]) ++done]) ++ + # + # Check for ROCm support + # +-rocm_happy="no" +- + AC_ARG_WITH([rocm], +- [AS_HELP_STRING([--with-rocm=(DIR)], [Enable the use of ROCm (default is autodetect).])], +- [], [with_rocm=guess]) ++ [AS_HELP_STRING([--with-rocm=(DIR)], ++ [Enable the use of ROCm (default is autodetect).])], ++ [], ++ [with_rocm=guess]) + ++rocm_happy=no + AS_IF([test "x$with_rocm" != "xno"], +- +- [AS_IF([test "x$with_rocm" == "x" || test "x$with_rocm" == "xguess" || test "x$with_rocm" == "xyes"], +- [ +- AC_MSG_NOTICE([ROCm path was not specified. Guessing ...]) +- with_rocm=/opt/rocm +- ], +- [:]) +- AC_CHECK_HEADERS([$with_rocm/include/hsa/hsa_ext_amd.h], +- [AC_CHECK_DECLS([hsaKmtProcessVMRead,hsaKmtProcessVMWrite], +- [rocm_happy="yes"], +- [AC_MSG_WARN([ROCm without CMA support was detected. Disable.]) +- rocm_happy="no"], +- [#include <$with_rocm/include/libhsakmt/hsakmt.h>]) +- AS_IF([test "x$rocm_happy" == "xyes"], +- [AC_DEFINE([HAVE_ROCM], 1, [Enable ROCm support]) +- transports="${transports},rocm" +- AC_SUBST(ROCM_CPPFLAGS, "-I$with_rocm/include/hsa -I$with_rocm/include/libhsakmt -DHAVE_ROCM=1") +- AC_SUBST(ROCM_CFLAGS, "-I$with_rocm/include/hsa -I$with_rocm/include/libhsakmt -DHAVE_ROCM=1") +- AC_SUBST(ROCM_LDFLAGS, "-lhsa-runtime64 -L$with_rocm/lib") +- CFLAGS="$CFLAGS $ROCM_CFLAGS" +- CPPFLAGS="$CPPFLAGS $ROCM_CPPFLAGS" +- LDFLAGS="$LDFLAGS $ROCM_LDFLAGS"], +- [])], +- [AC_MSG_WARN([ROCm not found]) +- AC_DEFINE([HAVE_ROCM], [0], [Disable the use of ROCm])])], +- [AC_MSG_WARN([ROCm was explicitly disabled]) +- AC_DEFINE([HAVE_ROCM], [0], [Disable the use of ROCm])] ++ [AS_CASE(["x$with_rocm"], ++ [x|xguess|xyes], ++ [AC_MSG_NOTICE([ROCm path was not specified. Guessing ...]) ++ with_rocm=/opt/rocm ++ ROCM_CPPFLAGS="-I$with_rocm/libhsakmt/include/libhsakmt -I$with_rocm/include/hsa -I$with_rocm/include" ++ ROCM_LDFLAGS="-L$with_rocm/hsa/lib -L$with_rocm/lib" ++ ROCM_LIBS="-lhsa-runtime64"], ++ [x/*], ++ [AC_MSG_NOTICE([ROCm path given as $with_rocm ...]) ++ ROCM_CPPFLAGS="-I$with_rocm/libhsakmt/include/libhsakmt -I$with_rocm/include/hsa -I$with_rocm/include" ++ ROCM_LDFLAGS="-L$with_rocm/hsa/lib -L$with_rocm/lib" ++ ROCM_LIBS="-lhsa-runtime64"], ++ [AC_MSG_NOTICE([ROCm flags given ...]) ++ ROCM_PARSE_FLAGS([with_rocm], ++ [ROCM_LIBS], [ROCM_LDFLAGS], [ROCM_CPPFLAGS])]) ++ SAVE_CPPFLAGS="$CPPFLAGS" ++ SAVE_LDFLAGS="$LDFLAGS" ++ SAVE_LIBS="$LIBS" ++ CPPFLAGS="$ROCM_CPPFLAGS $CPPFLAGS" ++ LDFLAGS="$ROCM_LDFLAGS $LDFLAGS" ++ LIBS="$ROCM_LIBS $LIBS" ++ rocm_happy=yes ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_CHECK_HEADERS([hsa.h], [rocm_happy=yes], [rocm_happy=no])]) ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_CHECK_HEADERS([hsa_ext_amd.h], [rocm_happy=yes], [rocm_happy=no])]) ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_CHECK_HEADERS([hsakmt.h], [rocm_happy=yes], [rocm_happy=no])]) ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_CHECK_DECLS([hsaKmtProcessVMRead,hsaKmtProcessVMWrite], ++ [rocm_happy=yes], ++ [rocm_happy=no ++ AC_MSG_WARN([ROCm without CMA support was detected. Disable.])], ++ [#include ])]) ++ AS_IF([test "x$rocm_happy" = xyes], ++ [AC_SEARCH_LIBS([hsa_init], [hsa-runtime64]) ++ AS_CASE(["x$ac_cv_search_hsa_init"], ++ [xnone*], [], ++ [xno], [rocm_happy=no], ++ [x-l*], [ROCM_LIBS="$ac_cv_search_hsa_init $ROCM_LIBS"])]) ++ AS_IF([test "x$rocm_happy" == "xyes"], ++ [AC_DEFINE([HAVE_ROCM], [1], [Set to 1 to enable ROCm support]) ++ transports="${transports},rocm" ++ AC_SUBST([ROCM_CPPFLAGS]) ++ AC_SUBST([ROCM_LDFLAGS]) ++ AC_SUBST([ROCM_LIBS])], ++ [AC_DEFINE([HAVE_ROCM], [0], [Set to 1 to enable ROCm support]) ++ AC_MSG_WARN([ROCm not found])]) ++ CPPFLAGS="$SAVE_CPPFLAGS" ++ LDFLAGS="$SAVE_LDFLAGS" ++ LIBS="$SAVE_LIBS" ++ ], ++ [AC_DEFINE([HAVE_ROCM], [0], [Set to 1 to enable ROCm support]) ++ AC_MSG_WARN([ROCm was explicitly disabled])] + ) + +- + AM_CONDITIONAL([HAVE_ROCM], [test "x$rocm_happy" != xno]) + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/sysdep.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/sysdep.m4 +index aa5d5fec5..03ea5ff0f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/sysdep.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/sysdep.m4 +@@ -131,3 +131,14 @@ CHECK_CROSS_COMP([AC_LANG_SOURCE([#include + AC_MSG_WARN([malloc hooks are not supported])] + ) + CFLAGS=$SAVE_CFLAGS ++ ++ ++# ++# Check for capability.h header (usually comes from libcap-devel package) and ++# make sure it defines the types we need ++# ++AC_CHECK_HEADERS([sys/capability.h], ++ [AC_CHECK_TYPES([cap_user_header_t, cap_user_data_t], [], ++ [AC_DEFINE([HAVE_SYS_CAPABILITY_H], [0], [Linux capability API support])], ++ [[#include ]])] ++ ) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucm.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucm.m4 +index fd3750d56..541bdb132 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucm.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucm.m4 +@@ -47,3 +47,63 @@ AC_CHECK_FUNCS([malloc_get_state malloc_set_state], + [], + [#include ]) + ++ ++# ++# Madvise flags ++# ++AC_CHECK_DECLS([MADV_FREE, ++ MADV_REMOVE, ++ POSIX_MADV_DONTNEED], ++ [], ++ [], ++ [#include ]) ++ ++ ++# BISTRO hooks infrastructure ++# ++# SYS_xxx macro ++# ++mmap_hooks_happy=yes ++AC_CHECK_DECLS([SYS_mmap, ++ SYS_munmap, ++ SYS_mremap, ++ SYS_brk, ++ SYS_madvise], ++ [], ++ [mmap_hooks_happy=no], dnl mmap syscalls are not defined ++ [#include ]) ++ ++shm_hooks_happy=yes ++AC_CHECK_DECLS([SYS_shmat, ++ SYS_shmdt], ++ [], ++ [shm_hooks_happy=no], ++ [#include ]) ++ ++ipc_hooks_happy=yes ++AC_CHECK_DECLS([SYS_ipc], ++ [], ++ [ipc_hooks_happy=no], ++ [#include ]) ++ ++AS_IF([test "x$mmap_hooks_happy" == "xyes"], ++ AS_IF([test "x$ipc_hooks_happy" == "xyes" -o "x$shm_hooks_happy" == "xyes"], ++ [bistro_hooks_happy=yes])) ++ ++AS_IF([test "x$bistro_hooks_happy" == "xyes"], ++ [AC_DEFINE([UCM_BISTRO_HOOKS], [1], [Enable BISTRO hooks])], ++ [AC_DEFINE([UCM_BISTRO_HOOKS], [0], [Enable BISTRO hooks]) ++ AC_MSG_WARN([Some of required syscalls could not be found]) ++ AC_MSG_WARN([BISTRO mmap hook mode is disabled])]) ++ ++AC_CHECK_FUNCS([__curbrk], [], [], []) ++ ++# ++# tcmalloc library - for testing only ++# ++SAVE_LDFLAGS="$LDFLAGS" ++AC_CHECK_LIB([tcmalloc], [tc_malloc], ++ [have_tcmalloc=yes ++ TCMALLOC_LIB="-ltcmalloc"], ++ [have_tcmalloc=no]) ++AM_CONDITIONAL([HAVE_TCMALLOC],[test "x$have_tcmalloc" = "xyes"]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucs.m4 b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucs.m4 +index 450ec16fc..13d842b80 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucs.m4 ++++ b/src/mpid/ch4/netmod/ucx/ucx/config/m4/ucs.m4 +@@ -207,3 +207,6 @@ case ${host} in + # HW timer is supported for all other architectures + AC_DEFINE([HAVE_HW_TIMER], [1], [high-resolution hardware timer disabled]) + esac ++ ++AC_CHECK_FUNCS([__clear_cache], [], []) ++AC_CHECK_FUNCS([__aarch64_sync_cache_range], [], []) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/configure.ac b/src/mpid/ch4/netmod/ucx/ucx/configure.ac +index 6c60ecfe1..ba01f7ef7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/configure.ac ++++ b/src/mpid/ch4/netmod/ucx/ucx/configure.ac +@@ -9,7 +9,7 @@ + AC_PREREQ([2.63]) + + define([ucx_ver_major], 1) +-define([ucx_ver_minor], 3) ++define([ucx_ver_minor], 5) + define([ucx_ver_patch], 0) + define([ts], esyscmd([sh -c "date +%Y%m%d%H%M%S"])) + +@@ -74,6 +74,7 @@ AC_PROG_LIBTOOL + AC_HEADER_STDC + LT_LIB_M + AC_C_RESTRICT ++AC_FUNC_STRERROR_R + + m4_include([config/m4/pkg.m4]) + PKG_PROG_PKG_CONFIG +@@ -117,8 +118,13 @@ AS_IF([test "x$with_docs_only" == xyes], + AM_CONDITIONAL([HAVE_MEMTRACK], [false]) + AM_CONDITIONAL([HAVE_IB], [false]) + AM_CONDITIONAL([HAVE_MLX5_HW], [false]) ++ AM_CONDITIONAL([HAVE_MLX5_HW_UD], [false]) ++ AM_CONDITIONAL([HAVE_MLX5_HW_DC], [false]) ++ AM_CONDITIONAL([HAVE_MLX5_DV], [false]) + AM_CONDITIONAL([HAVE_TL_RC], [false]) + AM_CONDITIONAL([HAVE_TL_DC], [false]) ++ AM_CONDITIONAL([HAVE_DC_DV], [false]) ++ AM_CONDITIONAL([HAVE_DC_EXP], [false]) + AM_CONDITIONAL([HAVE_TL_UD], [false]) + AM_CONDITIONAL([HAVE_TL_CM], [false]) + AM_CONDITIONAL([HAVE_IBV_EX_HW_TM], [false]) +@@ -136,6 +142,9 @@ AS_IF([test "x$with_docs_only" == xyes], + AM_CONDITIONAL([HAVE_PROFILING], [false]) + AM_CONDITIONAL([HAVE_UCM_PTMALLOC286], [false]) + AM_CONDITIONAL([HAVE_JAVA], [false]) ++ AM_CONDITIONAL([HAVE_CXX11], [false]) ++ AM_CONDITIONAL([HAVE_TCMALLOC], [false]) ++ AM_CONDITIONAL([HAVE_EXAMPLES], [false]) + ], + [ + AM_CONDITIONAL([DOCS_ONLY], [false]) +@@ -227,6 +236,15 @@ AS_IF([test "x$with_docs_only" == xyes], + # + AC_SUBST([VALGRIND_LIBPATH], [${valgrind_libpath}]) + ++ # ++ # Enable examples build ++ # ++ AC_ARG_ENABLE([examples], ++ [AC_HELP_STRING([--enable-examples], ++ [Enable examples build])], ++ [AM_CONDITIONAL([HAVE_EXAMPLES], [test "x$enable_examples" == "xyes"])], ++ [AM_CONDITIONAL([HAVE_EXAMPLES], [false])]) ++ + ]) # Docs only + + +@@ -248,6 +266,7 @@ AC_MSG_NOTICE([Supported transports: $transports]) + # Final output + # + AC_CONFIG_FILES([Makefile ++ doc/doxygen/header.tex + src/uct/api/version.h + ]) + AS_IF([test "x$with_docs_only" == xyes], [], [ +@@ -272,8 +291,10 @@ AC_CONFIG_FILES([ + src/tools/perf/Makefile + src/tools/profile/Makefile + test/apps/Makefile ++ test/apps/sockaddr/Makefile + test/examples/Makefile + test/gtest/Makefile ++ test/gtest/ucm/test_dlopen/Makefile + test/mpi/Makefile + bindings/java/src/main/native/Makefile + ]) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/contrib/test_jenkins.sh b/src/mpid/ch4/netmod/ucx/ucx/contrib/test_jenkins.sh +index be57d6c9d..2f085887b 100755 +--- a/src/mpid/ch4/netmod/ucx/ucx/contrib/test_jenkins.sh ++++ b/src/mpid/ch4/netmod/ucx/ucx/contrib/test_jenkins.sh +@@ -86,6 +86,18 @@ module_load() { + fi + } + ++# ++# try load cuda modules if nvidia driver is installed ++# ++try_load_cuda_env() { ++ num_gpus=0 ++ if [ -f "/proc/driver/nvidia/version" ]; then ++ module_load dev/cuda || true ++ module_load dev/gdrcopy || true ++ num_gpus=$(nvidia-smi -L | wc -l) ++ fi ++} ++ + # + # Check whether this test should do a task with given index, + # according to the parallel test execution parameters. +@@ -169,6 +181,11 @@ prepare() { + # + build_docs() { + echo " ==== Build docs only ====" ++ # Try load newer doxygen if native is older than 1.8.11 ++ if ! (echo "1.8.11"; doxygen --version) | sort -CV ++ then ++ module_load tools/doxygen-1.8.11 || true ++ fi + ../configure --prefix=$ucx_inst --with-docs-only + $MAKE clean + $MAKE docs +@@ -208,15 +225,22 @@ build_release_pkg() { + $MAKE distcheck + + # Show UCX info +- ./src/tools/info/ucx_info -f -c -v -y -d -b -p -w -e -uart ++ ./src/tools/info/ucx_info -s -f -c -v -y -d -b -p -w -e -uart + +- set +e +- out=$(rpm -q rpm 2>/dev/null) +- rc=$? +- set -e +- rpm_based=yes +- if [[ $rc != 0 || "$out" == *"not installed"* ]]; then ++ if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then ++ rpm_based=yes ++ elif [ `cat /etc/os-release | grep -i "ubuntu\|mint"|wc -l` -gt 0 ]; then + rpm_based=no ++ else ++ # try rpm tool to detect distro ++ set +e ++ out=$(rpm -q rpm 2>/dev/null) ++ rc=$? ++ set -e ++ rpm_based=yes ++ if [[ $rc != 0 || "$out" == *"not installed"* ]]; then ++ rpm_based=no ++ fi + fi + + if [[ "$rpm_based" == "no" && -x /usr/bin/dpkg-buildpackage ]]; then +@@ -227,6 +251,16 @@ build_release_pkg() { + ../contrib/buildrpm.sh -s -b + fi + ++ # check that UCX version is present in spec file ++ cd ${WORKSPACE} ++ # extract version from configure.ac and convert to MAJOR.MINOR.PATCH representation ++ version=$(grep -P "define\S+ucx_ver" configure.ac | awk '{print $2}' | sed 's,),,' | xargs echo | tr ' ' '.') ++ if ! grep -q "$version" ucx.spec.in; then ++ echo "Current UCX version ($version) is not present in ucx.spec.in changelog" ++ exit 1 ++ fi ++ cd - ++ + $MAKE distclean + } + +@@ -235,19 +269,19 @@ build_release_pkg() { + # + build_icc() { + echo 1..1 > build_icc.tap +- if module_load intel/ics ++ if module_load intel/ics && icc -v + then + echo "==== Build with Intel compiler ====" + ../contrib/configure-devel --prefix=$ucx_inst CC=icc CXX=icpc + $MAKE clean + $MAKE + $MAKE distclean +- module unload intel/ics + echo "ok 1 - build successful " >> build_icc.tap + else + echo "==== Not building with Intel compiler ====" + echo "ok 1 - # SKIP because Coverity not installed" >> build_icc.tap + fi ++ module unload intel/ics + } + + # +@@ -255,7 +289,7 @@ build_icc() { + # + build_debug() { + echo "==== Build with --enable-debug option ====" +- ../contrib/configure-devel --prefix=$ucx_inst --enable-debug ++ ../contrib/configure-devel --prefix=$ucx_inst --enable-debug --enable-examples + $MAKE clean + $MAKE + $MAKE distclean +@@ -271,7 +305,7 @@ build_cuda() { + then + if module_load dev/gdrcopy + then +- echo "==== Build with enable cuda ====" ++ echo "==== Build with enable cuda, gdr_copy ====" + ../contrib/configure-devel --prefix=$ucx_inst --with-cuda --with-gdrcopy + $MAKE clean + $MAKE +@@ -282,12 +316,14 @@ build_cuda() { + $MAKE + $MAKE distclean + module unload dev/gdrcopy +- else +- ../contrib/configure-devel --prefix=$ucx_inst --with-cuda +- $MAKE clean +- $MAKE +- $MAKE distclean + fi ++ ++ echo "==== Build with enable cuda, w/o gdr_copy ====" ++ ../contrib/configure-devel --prefix=$ucx_inst --with-cuda --without-gdrcopy ++ $MAKE clean ++ $MAKE ++ $MAKE distclean ++ + module unload dev/cuda + echo "ok 1 - build successful " >> build_cuda.tap + else +@@ -307,6 +343,8 @@ build_clang() { + ../contrib/configure-devel --prefix=$ucx_inst CC=clang CXX=clang++ + $MAKE clean + $MAKE ++ $MAKE install ++ UCX_HANDLE_ERRORS=bt,freeze UCX_LOG_LEVEL_TRIGGER=ERROR $ucx_inst/bin/ucx_info -d + $MAKE distclean + echo "ok 1 - build successful " >> build_clang.tap + else +@@ -315,6 +353,27 @@ build_clang() { + fi + } + ++# ++# Build with gcc-latest module ++# ++build_gcc_latest() { ++ echo 1..1 > build_gcc_latest.tap ++ if module_load dev/gcc-latest ++ then ++ echo "==== Build with GCC compiler ($(gcc --version|head -1)) ====" ++ ../contrib/configure-devel --prefix=$ucx_inst ++ $MAKE clean ++ $MAKE ++ $MAKE install ++ UCX_HANDLE_ERRORS=bt,freeze UCX_LOG_LEVEL_TRIGGER=ERROR $ucx_inst/bin/ucx_info -d ++ $MAKE distclean ++ echo "ok 1 - build successful " >> build_gcc_latest.tap ++ else ++ echo "==== Not building with latest gcc compiler ====" ++ echo "ok 1 - # SKIP because dev/gcc-latest module is not available" >> build_gcc_latest.tap ++ fi ++} ++ + # + # Build with armclang compiler + # +@@ -326,8 +385,11 @@ build_armclang() { + ../contrib/configure-devel --prefix=$ucx_inst CC=armclang CXX=armclang++ + $MAKE clean + $MAKE ++ $MAKE install ++ UCX_HANDLE_ERRORS=bt,freeze UCX_LOG_LEVEL_TRIGGER=ERROR $ucx_inst/bin/ucx_info -d + $MAKE distclean + echo "ok 1 - build successful " >> build_armclang.tap ++ module unload arm-compiler/latest + else + echo "==== Not building with armclang compiler ====" + echo "ok 1 - # SKIP because armclang not installed" >> build_armclang.tap +@@ -356,8 +418,8 @@ run_hello() { + if [ ! -x ${test_name} ] + then + gcc -o ${test_name} ${ucx_inst}/share/ucx/examples/${test_name}.c \ +- -l${api} -lucs -I${ucx_inst}/include -L${ucx_inst}/lib \ +- -Wl,-rpath=${ucx_inst}/lib ++ -l${api} -lucs -I${ucx_inst}/include -L${ucx_inst}/lib \ ++ -Wl,-rpath=${ucx_inst}/lib + fi + + # set smaller timeouts so the test will complete faster +@@ -374,7 +436,7 @@ run_hello() { + ./${test_name} ${test_args} -p ${tcp_port} & + hw_server_pid=$! + +- sleep 5 ++ sleep 15 + + # temporary disable + if [[ ${test_args} == *"-e"* ]] +@@ -405,6 +467,11 @@ run_hello() { + # Compile and run UCP hello world example + # + run_ucp_hello() { ++ if ./src/tools/info/ucx_info -e -u twe|grep ERROR ++ then ++ return # skip if cannot create ucp ep ++ fi ++ + for test_mode in -w -f -b -e + do + echo "==== Running UCP hello world with mode ${test_mode} ====" +@@ -417,17 +484,87 @@ run_ucp_hello() { + # Compile and run UCT hello world example + # + run_uct_hello() { +- for ucx_dev in $(get_active_ib_devices) ++ for send_func in -i -b -z + do +- for send_func in -i -b -z ++ for ucx_dev in $(get_active_ib_devices) + do +- echo "==== Running UCT hello world server on ${ucx_dev} with sending ${send_func} ====" +- run_hello uct -d ${ucx_dev} -t "rc" ++ echo "==== Running UCT hello world server on rc/${ucx_dev} with sending ${send_func} ====" ++ run_hello uct -d ${ucx_dev} -t "rc" ${send_func} ++ done ++ for ucx_dev in $(ip addr | awk '/state UP/ {print $2}' | sed s/://) ++ do ++ echo "==== Running UCT hello world server on tcp/${ucx_dev} with sending ${send_func} ====" ++ run_hello uct -d ${ucx_dev} -t "tcp" ${send_func} + done + done + rm -f ./uct_hello_world + } + ++run_client_server() { ++ ++ test_name=ucp_client_server ++ ++ if [ ! -x ${test_name} ] ++ then ++ gcc -o ${test_name} ${ucx_inst}/share/ucx/examples/${test_name}.c \ ++ -lucp -lucs -I${ucx_inst}/include -L${ucx_inst}/lib \ ++ -Wl,-rpath=${ucx_inst}/lib ++ fi ++ ++ iface=`ibdev2netdev | grep Up | awk '{print $5}' | head -1` ++ if [ -n "$iface" ] ++ then ++ server_ip=`ip addr show ${iface} | awk '/inet /{print $2}' | awk -F '/' '{print $1}'` ++ fi ++ ++ if [ -z "$server_ip" ] ++ then ++ # if there is no inet (IPv4) address, bail ++ return ++ fi ++ ++ ibdev=`ibdev2netdev | grep $iface | awk '{print $1}'` ++ node_guid=`cat /sys/class/infiniband/$ibdev/node_guid` ++ if [ $node_guid == "0000:0000:0000:0000" ] ++ then ++ return ++ fi ++ ++ server_port=$((10000 + EXECUTOR_NUMBER)) ++ ++ # run server side ++ ./${test_name} -p ${server_port} & ++ hw_server_pid=$! ++ ++ sleep 15 ++ ++ # need to be ran in background to reflect application PID in $! ++ ./${test_name} -a ${server_ip} -p ${server_port} & ++ hw_client_pid=$! ++ ++ wait ${hw_client_pid} ++ kill -9 ${hw_server_pid} ++} ++ ++run_ucp_client_server() { ++ ++ if [ ! -r /dev/infiniband/rdma_cm ] ++ then ++ return ++ fi ++ ++ ret=`which ibdev2netdev` ++ if [ -z "$ret" ] ++ then ++ return ++ fi ++ ++ echo "==== Running UCP client-server ====" ++ run_client_server ++ ++ rm -f ./ucp_client_server ++} ++ + # + # Run UCX performance test with MPI + # +@@ -465,9 +602,15 @@ run_ucx_perftest_mpi() { + # run cuda tests + if (lsmod | grep -q "nv_peer_mem") && (lsmod | grep -q "gdrdrv") + then ++ export CUDA_VISIBLE_DEVICES=$(($worker%$num_gpus)),$(($(($worker+1))%$num_gpus)) + cat $ucx_inst_ptest/test_types | grep cuda | sort -R > $ucx_inst_ptest/test_types_short + echo "==== Running ucx_perf with cuda memory====" +- $MPIRUN -np 2 -x UCX_TLS=rc,cuda_copy,gdr_copy $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 -x UCX_TLS=rc,cuda_copy,gdr_copy -x UCX_MEMTYPE_CACHE=y $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 -x UCX_TLS=rc,cuda_copy,gdr_copy -x UCX_MEMTYPE_CACHE=n $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 -x UCX_TLS=rc,cuda_copy $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 -x UCX_TLS=self,mm,cma,cuda_copy $AFFINITY $UCX_PERFTEST ++ $MPIRUN -np 2 $AFFINITY $UCX_PERFTEST ++ unset CUDA_VISIBLE_DEVICES + fi + } + +@@ -475,7 +618,7 @@ run_ucx_perftest_mpi() { + # Test malloc hooks with mpi + # + test_malloc_hooks_mpi() { +- for tname in malloc_hooks external_events flag_no_install ++ for tname in malloc_hooks malloc_hooks_unmapped external_events flag_no_install + do + echo "==== Running memory hook (${tname}) on MPI ====" + $MPIRUN -np 1 $AFFINITY ./test/mpi/test_memhooks -t $tname +@@ -492,26 +635,23 @@ test_malloc_hooks_mpi() { + # + run_mpi_tests() { + echo "1..2" > mpi_tests.tap +- +- #load cuda modules if available +- module_load dev/cuda || true +- module_load dev/gdrcopy || true +- + if module_load hpcx-gcc + then ++ # Prevent our tests from using UCX libraries from hpcx module by prepending ++ # our local library path first ++ export LD_LIBRARY_PATH=${ucx_inst}/lib:$LD_LIBRARY_PATH ++ + ../contrib/configure-release --prefix=$ucx_inst --with-mpi # TODO check in -devel mode as well + $MAKE clean + $MAKE install + $MAKE installcheck # check whether installation is valid (it compiles examples at least) + +- # Prevent our tests from using installed UCX libraries +- export LD_LIBRARY_PATH=${ucx_inst}/lib:$LD_LIBRARY_PATH +- + MPIRUN="mpirun \ + -x UCX_ERROR_SIGNALS \ + -x UCX_HANDLE_ERRORS \ + -mca pml ob1 \ +- -mca btl vader,self \ ++ -mca btl tcp,self \ ++ -mca btl_tcp_if_include lo \ + -mca coll ^hcoll,ml" + + run_ucx_perftest_mpi +@@ -533,22 +673,58 @@ run_mpi_tests() { + # Test profiling infrastructure + # + test_profiling() { +- echo "==== Running profiling test ====" +- UCX_PROFILE_MODE=log UCX_PROFILE_FILE=ucx_jenkins.prof ./test/apps/test_profiling ++ echo "==== Running profiling example ====" ++ ++ # configure release mode, application profiling should work ++ ../contrib/configure-release --prefix=$ucx_inst ++ $MAKE clean ++ $MAKE ++ ++ # compile the profiling example code ++ gcc -o ucx_profiling ${ucx_inst}/share/ucx/examples/ucx_profiling.c \ ++ -lm -lucs -I${ucx_inst}/include -L${ucx_inst}/lib -Wl,-rpath=${ucx_inst}/lib ++ ++ UCX_PROFILE_MODE=log UCX_PROFILE_FILE=ucx_jenkins.prof ./ucx_profiling + + UCX_READ_PROFILE=${ucx_inst}/bin/ucx_read_profile + $UCX_READ_PROFILE -r ucx_jenkins.prof | grep "printf" -C 20 + $UCX_READ_PROFILE -r ucx_jenkins.prof | grep -q "calc_pi" + $UCX_READ_PROFILE -r ucx_jenkins.prof | grep -q "print_pi" ++} ++ ++test_dlopen() { ++ ../contrib/configure-release --prefix=$ucx_inst ++ $MAKE clean ++ $MAKE + + echo "==== Running dlopen test ====" +- strace ./test/apps/test_profiling &> strace.log ++ strace ./ucx_profiling &> strace.log + ! grep '^socket' strace.log ++} ++ ++test_memtrack() { ++ ../contrib/configure-devel --prefix=$ucx_inst ++ $MAKE clean ++ $MAKE + + echo "==== Running memtrack test ====" + UCX_MEMTRACK_DEST=stdout ./test/gtest/gtest --gtest_filter=test_memtrack.sanity + } + ++test_unused_env_var() { ++ # We must create a UCP worker to get the warning about unused variables ++ echo "==== Running ucx_info env vars test ====" ++ UCX_IB_PORTS=mlx5_0:1 ./src/tools/info/ucx_info -epw -u t | grep "unused" | grep -q "UCX_IB_PORTS" ++} ++ ++test_malloc_hook() { ++ echo "==== Running malloc hooks test ====" ++ if [ -x ./test/apps/test_tcmalloc ] ++ then ++ ./test/apps/test_tcmalloc ++ fi ++} ++ + # + # Run Coverity and report errors + # +@@ -567,7 +743,11 @@ run_coverity() { + rc=$(($rc+$nerrors)) + + index_html=$(cd $cov_build && find . -name index.html | cut -c 3-) +- cov_url="$WS_URL/$cov_build_id/${index_html}" ++ if [ -z "$BUILD_URL" ]; then ++ cov_url="${WS_URL}/${cov_build_id}/${index_html}" ++ else ++ cov_url="${BUILD_URL}/artifact/${cov_build_id}/${index_html}" ++ fi + rm -f jenkins_sidelinks.txt + if [ $nerrors -gt 0 ]; then + cov-format-errors --dir $cov_build --emacs-style +@@ -589,14 +769,12 @@ run_coverity() { + + # + # Run the test suite (gtest) ++# Arguments: [configure-flags] + # + run_gtest() { +- +- #load cuda modules if available +- module_load dev/cuda || true +- module_load dev/gdrcopy || true +- +- ../contrib/configure-devel --prefix=$ucx_inst ++ compiler_name=$1 ++ shift ++ ../contrib/configure-devel --prefix=$ucx_inst $@ + $MAKE clean + $MAKE + +@@ -607,6 +785,10 @@ run_gtest() { + export GTEST_TAP=2 + export GTEST_REPORT_DIR=$WORKSPACE/reports/tap + ++ if [ $num_gpus -gt 0 ]; then ++ export CUDA_VISIBLE_DEVICES=$(($worker%$num_gpus)) ++ fi ++ + GTEST_EXTRA_ARGS="" + if [ "$JENKINS_TEST_PERF" == 1 ] + then +@@ -617,11 +799,11 @@ run_gtest() { + + mkdir -p $GTEST_REPORT_DIR + +- echo "==== Running unit tests ====" ++ echo "==== Running unit tests, $compiler_name compiler ====" + $AFFINITY $TIMEOUT make -C test/gtest test + (cd test/gtest && rename .tap _gtest.tap *.tap && mv *.tap $GTEST_REPORT_DIR) + +- echo "==== Running malloc hooks mallopt() test ====" ++ echo "==== Running malloc hooks mallopt() test, $compiler_name compiler ====" + # gtest returns with non zero exit code if there were no + # tests to run. As a workaround run a single test on every + # shard. +@@ -635,7 +817,7 @@ run_gtest() { + make -C test/gtest test + (cd test/gtest && rename .tap _mallopt_gtest.tap malloc_hook_cplusplus.tap && mv *.tap $GTEST_REPORT_DIR) + +- echo "==== Running malloc hooks mmap_ptrs test with MMAP_THRESHOLD=16384 ====" ++ echo "==== Running malloc hooks mmap_ptrs test with MMAP_THRESHOLD=16384, $compiler_name compiler ====" + $AFFINITY $TIMEOUT \ + env MALLOC_MMAP_THRESHOLD_=16384 \ + GTEST_SHARD_INDEX=0 \ +@@ -646,7 +828,7 @@ run_gtest() { + + if ! [[ $(uname -m) =~ "aarch" ]] && ! [[ $(uname -m) =~ "ppc" ]] + then +- echo "==== Running valgrind tests ====" ++ echo "==== Running valgrind tests, $compiler_name compiler ====" + + # Load newer valgrind if naative is older than 3.10 + if ! (echo "valgrind-3.10.0"; valgrind --version) | sort -CV +@@ -654,17 +836,34 @@ run_gtest() { + module load tools/valgrind-latest + fi + +- export VALGRIND_EXTRA_ARGS="--xml=yes --xml-file=valgrind.xml --child-silent-after-fork=yes" ++ export VALGRIND_EXTRA_ARGS="--xml=yes --xml-file=valgrind.xml --child-silent-after-fork=yes --gen-suppressions=all" + $AFFINITY $TIMEOUT_VALGRIND make -C test/gtest test_valgrind + (cd test/gtest && rename .tap _vg.tap *.tap && mv *.tap $GTEST_REPORT_DIR) + module unload tools/valgrind-latest + else +- echo "==== Not running valgrind tests ====" ++ echo "==== Not running valgrind tests with $compiler_name compiler ====" + echo "1..1" > vg_skipped.tap + echo "ok 1 - # SKIP because running on $(uname -m)" >> vg_skipped.tap + fi + } + ++run_gtest_default() { ++ run_gtest "default" ++} ++ ++run_gtest_armclang() { ++ if module_load arm-compiler/arm-hpc-compiler && armclang -v ++ then ++ run_gtest "armclang" CC=armclang CXX=armclang++ ++ else ++ echo "==== Not running with armclang compiler ====" ++ echo "1..1" > armclang_skipped.tap ++ echo "ok 1 - # SKIP because armclang not found" >> armclang_skipped.tap ++ fi ++ module unload arm-compiler/arm-hpc-compiler ++} ++ ++ + # + # Run the test suite (gtest) in release configuration + # +@@ -715,6 +914,7 @@ run_tests() { + do_distributed_task 2 4 build_cuda + do_distributed_task 3 4 build_clang + do_distributed_task 0 4 build_armclang ++ do_distributed_task 1 4 build_gcc_latest + + # all are running mpi tests + run_mpi_tests +@@ -727,16 +927,23 @@ run_tests() { + + do_distributed_task 1 4 run_ucp_hello + do_distributed_task 2 4 run_uct_hello ++ do_distributed_task 1 4 run_ucp_client_server + do_distributed_task 3 4 test_profiling ++ do_distributed_task 3 4 test_dlopen ++ do_distributed_task 3 4 test_memtrack ++ do_distributed_task 0 4 test_unused_env_var ++ do_distributed_task 1 3 test_malloc_hook + + # all are running gtest +- run_gtest ++ run_gtest_default ++ run_gtest_armclang + + do_distributed_task 3 4 run_coverity + do_distributed_task 0 4 run_gtest_release + } + + prepare ++try_load_cuda_env + do_distributed_task 0 4 build_docs + do_distributed_task 0 4 build_disable_numa + do_distributed_task 1 4 build_no_verbs +diff --git a/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/README b/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/README +index 7e092e0fb..47d88adeb 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/README ++++ b/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/README +@@ -1,3 +1,3 @@ + This is an example of the "batch" configuration files for ucx_perftest. + The files are passed as an input parameter to the ucx_pertest benchmark: +-ucx_perftest --batch msg_pow2 --batch test_types --batch transports <...> ++ucx_perftest -b msg_pow2 -b test_types -b transports <...> +diff --git a/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/test_types b/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/test_types +index 36f1dd7af..a89ca1d67 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/test_types ++++ b/src/mpid/ch4/netmod/ucx/ucx/contrib/ucx_perftest_config/test_types +@@ -32,7 +32,7 @@ ucp_iov_iov_tag_bw -t tag_bw -D iov,iov + ucp_contig_contig_tag_bw -t tag_bw -D contig,contig + #IOV with RNDV is not yet supported + #ucp_contig_iov_tag_bw -t tag_bw -D contig,iov +-ucp_sync_tag_lat -t tag_lat_sync ++ucp_sync_tag_lat -t tag_sync_lat + ucp_unexp_tag_lat -t tag_lat -U + ucp_wild_tag_lat -t tag_lat -C + ucp_contig_stream_bw -t stream_bw -r recv_data +@@ -42,4 +42,8 @@ ucp_contig_stream_lat -t stream_lat -r recv + #CUDA + ucp_contig_contig_cuda_tag_lat -t tag_lat -D contig,contig -m cuda + ucp_contig_contig_cuda_tag_bw -t tag_bw -D contig,contig -m cuda ++ucp_contig_cuda_stream_bw -t stream_bw -r recv_data -m cuda ++ucp_contig_cuda_stream_lat -t stream_lat -r recv_data -m cuda ++ucp_contig_cuda_stream_bw -t stream_bw -r recv -m cuda ++ucp_contig_cuda_stream_lat -t stream_lat -r recv -m cuda + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/contrib/valgrind.supp b/src/mpid/ch4/netmod/ucx/ucx/contrib/valgrind.supp +index c6f073767..1f9bdc5ef 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/contrib/valgrind.supp ++++ b/src/mpid/ch4/netmod/ucx/ucx/contrib/valgrind.supp +@@ -74,9 +74,73 @@ + ... + fun:gdr_copy_to_bar + } ++{ ++ gdr_copy_cond_1 ++ Memcheck:Cond ++ ... ++ fun:gdr_copy_from_bar ++} + { + gdr_copy_value8 + Memcheck:Value8 + ... + fun:gdr_copy_to_bar + } ++{ ++ gdr_copy_value8_1 ++ Memcheck:Value8 ++ ... ++ fun:gdr_copy_from_bar ++} ++{ ++ ibv_exp_reg_mr ++ Memcheck:Param ++ write(buf) ++ ... ++ fun:ibv_exp_reg_mr ++} ++{ ++ ibv_exp_free_dm ++ Memcheck:Param ++ write(buf) ++ ... ++ fun:ibv_exp_free_dm ++} ++{ ++ ibv_exp_cmd_free_dm ++ Memcheck:Param ++ write(buf) ++ ... ++ fun:ibv_exp_cmd_free_dm ++} ++{ ++ res_domain_leak ++ Memcheck:Leak ++ ... ++ fun:ibv_exp_create_res_domain ++} ++{ ++ ibverbs_get_device_list ++ Memcheck:Leak ++ ... ++ fun:ibverbs_get_device_list ++} ++{ ++ fix_dereg_mr ++ Memcheck:Cond ++ ... ++ fun:ibv_dereg_mr@@IBVERBS_1.1 ++} ++{ ++ exp_query_device_cond ++ Memcheck:Cond ++ fun:ibv_exp_cmd_query_device ++} ++{ ++ ucma_init_device ++ Memcheck:Leak ++ match-leak-kinds: possible ++ ... ++ fun:ucma_init_device ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.dox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.dox +deleted file mode 100644 +index 9e0ff9f59..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.dox ++++ /dev/null +@@ -1,27 +0,0 @@ +-/* +- * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-/** +- * @page Conventions Conventions and Notations +- * This section describes the conventions and notations in the UCX specification. +- * +- * \section Blocking Blocking Behavior +- * The blocking UCX routines return only when an UCX operation is complete. +- * After the return, the resources used in the UCX routine are available +- * for reuse. +- * +- * \section Non-blocking Non-blocking Behavior +- * The non-blocking UCX routines return immediately, independent of operation +- * completion. After the return, the resources used for the routines are not +- * necessarily available for reuse. +- * +- * \section Fairness Fairness +- * UCX routines do not guarantee fairness. However, the routines +- * enable UCX consumers to write efficient and fair programs. +- * +- * \section Interaction with Signal Handler Functions +- * If UCX routines are invoked from signal a handler function, +- * the behavior of the program is undefined. +- */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.md b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.md +new file mode 100644 +index 000000000..0736181a9 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/conventions.md +@@ -0,0 +1,22 @@ ++Conventions and Notations ++========================= ++ ++This section describes the conventions and notations in the UCX specification. ++ ++\section Blocking Blocking Behavior ++The blocking UCX routines return only when an UCX operation is complete. ++After the return, the resources used in the UCX routine are available ++for reuse. ++ ++\section Non-blocking Non-blocking Behavior ++The non-blocking UCX routines return immediately, independent of operation ++completion. After the return, the resources used for the routines are not ++necessarily available for reuse. ++ ++\section Fairness Fairness ++UCX routines do not guarantee fairness. However, the routines ++enable UCX consumers to write efficient and fair programs. ++ ++\section Interaction with Signal Handler Functions ++If UCX routines are invoked from signal a handler function, ++the behavior of the program is undefined. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.dox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.dox +deleted file mode 100644 +index 6cd844ce8..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.dox ++++ /dev/null +@@ -1,105 +0,0 @@ +-/* +- * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-/** +- * \page Design +- * +- * The UCX framework consists of the three main components: UC-Services (UCS), +- * UC-Transports (UCT), and UC-Protocols (UCP). Each one of these components +- * exports a public API, and can be used as a stand-alone library. +- * +- * \image latex Architecture.pdf "UCX Framework Architecture" +- * \image html Architecture.png "UCX Framework Architecture" +- * +- * \section UCS +- * UCS is a service layer that provides the necessary functionality for +- * implementing portable and efficient utilities. This layer includes the +- * following services: +- * + an abstraction for accessing platform specific functionality (atomic operations, thread safety, etc.), +- * + tools for efficient memory management (memory pools, memory allocators, and memory allocators hooks), +- * + commonly used data structures (hashes, trees, lists). +- * +- * \section UCT +- * UCT is a transport layer that abstracts +- * the differences across various hardware architectures and provides a +- * low-level API that enables the implementation of communication protocols. +- * The primary goal of the layer is to provide direct and efficient access to +- * hardware network functionality. For this purpose, +- * UCT relies on vendor provided low-level drivers such as InfiniBand +- * Verbs, Cray’s uGNI, libfabrics, etc. In addition, the layer provides +- * constructs for communication context management (thread-based and application level), and +- * allocation and management of device-specific memories including those found +- * in accelerators. In terms of communication APIs, UCT defines interfaces for +- * immediate (short), buffered copy-and-send (bcopy), and zero-copy (zcopy) +- * communication operations. +- * +- * \b Short: This type of operation is optimized for small messages that can be posted and completed +- * in place @anchor uct_short_protocol_desc. +- * +- * \b Bcopy: This type of operation is optimized for medium size messages that are typically sent through a +- * so-called bouncing-buffer. This auxiliary buffer is typically allocated given network constraints and ready for +- * immediate utilization by the hardware. Since a custom data packing routine could be provided, this method +- * can be used for non-contiguos i/o @anchor uct_bcopy_protocol_desc. +- * +- * \b Zcopy: This type of operation exposes zero-copy memory-to-memory communication semantics, which means that +- * message is sent directly from user buffer, or received directly to user buffer, without being copied between +- * the network layers @anchor uct_zcopy_protocol_desc. +- * +- * \section UCP +- * UCP implements higher-level protocols that are typically used by message passing (MPI) +- * and PGAS programming models by using lower-level capabilities exposed +- * through the UCT layer. UCP is provides the following functionality: ability to select different transports for +- * communication, message fragmentation, multi-rail communication, and initializing and finalizing +- * the library. +- * Currently, the API has the following classes of interfaces: +- * Initialization, Remote Memory Access (RMA) communication, Atomic Memory +- * Operations (AMO), Active Message, Tag-Matching, and Collectives. +- * +- * \b Initialization: This subset of interfaces defines the communication +- * context setup, queries the network capabilities, and initializes the local +- * communication endpoints. The context represented by the UCX context is an +- * abstraction of the network transport resources. The communication endpoint +- * setup interfaces initialize the UCP endpoint, which is an abstraction of all +- * the necessary resources associated with a particular connection. The +- * communication endpoints are used as input to all communication operations to +- * describe the source and destination of the communication. +- * +- * \b RMA: This subset of interfaces defines one-sided communication operations such as PUT and +- * GET, required for implementing low overhead, direct memory access communications +- * constructs needed by both distributed and shared memory +- * programming models. UCP includes a separate set of interfaces for +- * communicating non-contiguous data. This functionality was included to +- * support various programming models’ communication requirements and leverage +- * the scatter/gather capabilities of modern network hardware. +- * +- * \b AMO: This subset of interfaces provides support for atomically performing operations +- * on the remote memory, an important class of operations for PGAS +- * programming models, particularly OpenSHMEM. +- * +- * \b Tag \b Matching: This interface supports tag-matching for send-receive semantics which is a key +- * communication semantic defined by the MPI specification. +- * +- * \b Stream : The API provides order and reliable communication semantics. +- * Data is treated as an ordered sequence of bytes pushed through the connection. +- * In contrast of tag-matching interface, the size of each individual send does +- * not necessarily have to match the size of each individual receive, as long as +- * the total number of bytes is the same. This API is designed to match widely +- * used BSD-socket based programming models. +- * +- * \b Active \b Message: A subset of functionality where the incoming packet invokes a +- * sender-specified callback in order to be processed by the receiving process. +- * As an example, the two-sided MPI interface can easily be implemented on top +- * of such a concept (TBD: cite openmpi ). However, these interfaces are more general and +- * suited for other programming paradigms where the receiver process does not +- * prepost receives, but expects to react to incoming packets directly. Like +- * RMA and tag-matching interfaces, the active message interface provides +- * separate APIs for different message types and non-contiguous data. +- * +- * \b Collectives: This subset of interfaces defines group com- munication and +- * synchronization operations. The collective operations include Barrier, +- * All-to-one, All-to-all, and reduction operations. When possible, we will +- * take advantage of hardware acceleration for collectives +- * (e.g., InfiniBand Switch collective acceleration). +- */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.md b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.md +new file mode 100644 +index 000000000..1c7911f97 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/design.md +@@ -0,0 +1,100 @@ ++Design ++====== ++ ++The UCX framework consists of the three main components: UC-Services (UCS), ++UC-Transports (UCT), and UC-Protocols (UCP). Each one of these components ++exports a public API, and can be used as a stand-alone library. ++ ++\image latex Architecture.pdf "UCX Framework Architecture" ++\image html Architecture.png "UCX Framework Architecture" ++ ++\section UCS ++UCS is a service layer that provides the necessary functionality for ++implementing portable and efficient utilities. This layer includes the ++following services: +++ an abstraction for accessing platform specific functionality (atomic operations, thread safety, etc.), +++ tools for efficient memory management (memory pools, memory allocators, and memory allocators hooks), +++ commonly used data structures (hashes, trees, lists). ++ ++\section UCT ++UCT is a transport layer that abstracts ++the differences across various hardware architectures and provides a ++low-level API that enables the implementation of communication protocols. ++The primary goal of the layer is to provide direct and efficient access to ++hardware network functionality. For this purpose, ++UCT relies on vendor provided low-level drivers such as InfiniBand ++Verbs, Cray's uGNI, libfabrics, etc. In addition, the layer provides ++constructs for communication context management (thread-based and application level), and ++allocation and management of device-specific memories including those found ++in accelerators. In terms of communication APIs, UCT defines interfaces for ++immediate (short), buffered copy-and-send (bcopy), and zero-copy (zcopy) ++communication operations. ++ ++\b Short: This type of operation is optimized for small messages that can be posted and completed ++in place @anchor uct_short_protocol_desc. ++ ++\b Bcopy: This type of operation is optimized for medium size messages that are typically sent through a ++so-called bouncing-buffer. This auxiliary buffer is typically allocated given network constraints and ready for ++immediate utilization by the hardware. Since a custom data packing routine could be provided, this method ++can be used for non-contiguos i/o @anchor uct_bcopy_protocol_desc. ++ ++\b Zcopy: This type of operation exposes zero-copy memory-to-memory communication semantics, which means that ++message is sent directly from user buffer, or received directly to user buffer, without being copied between ++the network layers @anchor uct_zcopy_protocol_desc. ++ ++\section UCP ++UCP implements higher-level protocols that are typically used by message passing (MPI) ++and PGAS programming models by using lower-level capabilities exposed ++through the UCT layer. UCP is provides the following functionality: ability to select different transports for ++communication, message fragmentation, multi-rail communication, and initializing and finalizing ++the library. ++Currently, the API has the following classes of interfaces: ++Initialization, Remote Memory Access (RMA) communication, Atomic Memory ++Operations (AMO), Active Message, Tag-Matching, and Collectives. ++ ++\b Initialization: This subset of interfaces defines the communication ++context setup, queries the network capabilities, and initializes the local ++communication endpoints. The context represented by the UCX context is an ++abstraction of the network transport resources. The communication endpoint ++setup interfaces initialize the UCP endpoint, which is an abstraction of all ++the necessary resources associated with a particular connection. The ++communication endpoints are used as input to all communication operations to ++describe the source and destination of the communication. ++ ++\b RMA: This subset of interfaces defines one-sided communication operations such as PUT and ++GET, required for implementing low overhead, direct memory access communications ++constructs needed by both distributed and shared memory ++programming models. UCP includes a separate set of interfaces for ++communicating non-contiguous data. This functionality was included to ++support various programming models' communication requirements and leverage ++the scatter/gather capabilities of modern network hardware. ++ ++\b AMO: This subset of interfaces provides support for atomically performing operations ++on the remote memory, an important class of operations for PGAS ++programming models, particularly OpenSHMEM. ++ ++\b Tag \b Matching: This interface supports tag-matching for send-receive semantics which is a key ++communication semantic defined by the MPI specification. ++ ++\b Stream : The API provides order and reliable communication semantics. ++Data is treated as an ordered sequence of bytes pushed through the connection. ++In contrast of tag-matching interface, the size of each individual send does ++not necessarily have to match the size of each individual receive, as long as ++the total number of bytes is the same. This API is designed to match widely ++used BSD-socket based programming models. ++ ++\b Active \b Message: A subset of functionality where the incoming packet invokes a ++sender-specified callback in order to be processed by the receiving process. ++As an example, the two-sided MPI interface can easily be implemented on top ++of such a concept (TBD: cite openmpi ). However, these interfaces are more general and ++suited for other programming paradigms where the receiver process does not ++prepost receives, but expects to react to incoming packets directly. Like ++RMA and tag-matching interfaces, the active message interface provides ++separate APIs for different message types and non-contiguous data. ++ ++\b Collectives: This subset of interfaces defines group com- munication and ++synchronization operations. The collective operations include Barrier, ++All-to-one, All-to-all, and reduction operations. When possible, we will ++take advantage of hardware acceleration for collectives ++(e.g., InfiniBand Switch collective acceleration). ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex.in +similarity index 94% +rename from doc/doxygen/header.tex +rename to doc/doxygen/header.tex.in +index af58b3966..460408753 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/header.tex.in +@@ -72,8 +72,8 @@ + \fancyhead[RO]{\fancyplain{}{\bfseries\thepage}} + \fancyfoot[LE]{\fancyplain{}{}} + \fancyfoot[CE]{\fancyplain{}{}} +-\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize \textcircled{c} 2015 Unified Communication X (UCX). All rights reserved. }} +-\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize \textcircled{c} 2015 Unified Communication X (UCX). All rights reserved. }} ++\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize \textcircled{c} \the\year\space Unified Communication X (UCX). All rights reserved. }} ++\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize \textcircled{c} \the\year\space Unified Communication X (UCX). All rights reserved. }} + \fancyfoot[CO]{\fancyplain{}{}} + \fancyfoot[RO]{\fancyplain{}{}} + \renewcommand{\footrulewidth}{0.4pt} +@@ -128,7 +128,7 @@ + {\Large Unified Communication X (UCX)}\\ + \vspace*{0.5cm} + {\large API Standard}\\ +-{\small Version 1.3}\\ ++{\small Version @MAJOR_VERSION@.@MINOR_VERSION@}\\ + \vspace*{0.5cm} + \includegraphics[width=6cm]{UCX_Logo_930x933.png} + \vspace*{0.5cm} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.dox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.dox +deleted file mode 100644 +index 75dc39d6c..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.dox ++++ /dev/null +@@ -1,91 +0,0 @@ +-/* +- * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-/** +- * @page Introduction +- +- +- * \section Motivation +- * A communication middleware abstracts the vendor-specific software and hardware +- * interfaces. +- * They bridge the semantic and functionality gap between the programming models +- * and the software and hardware network interfaces by providing +- * data transfer interfaces and implementation, optimized protocols for data +- * transfer between various memories, and managing network resources. There are many +- * communication middleware APIs and libraries to support parallel programming +- * models such as MPI, OpenSHMEM, and task-based models. +- * +- * Current communication middleware designs typically take two approaches. First, +- * communication middleware such as Intel’s PSM (previously Qlogic), Mellanox’s +- * MXM, and IBM’s PAMI provide high-performance implementations for specific +- * network hardware. Second, communication middleware such as VMI, Cactus, ARMCI, +- * GASNet, and Open MPI are tightly coupled to a specific programming model. +- * Communication middleware designed with either of this design approach +- * requires significant porting effort to move a new network +- * interface or programming model. +- * +- * To achieve functional and performance portability across +- * architectures and programming models, we introduce Unified Communication X +- * (UCX). +- * +- * \section UCX +- * Unified Communication X (UCX) is a set of network APIs and their +- * implementations for high throughput computing. UCX is a combined +- * effort of national laboratories, industry, and academia to design and +- * implement a high-performing and highly-scalable network stack for next +- * generation applications and systems. UCX design provides the ability to +- * tailor its APIs and network functionality to suit a wide variety of +- * application domains. +- * We envision that these APIs will satisfy the networking needs of many +- * programming models such as the Message Passing Interface (MPI), OpenSHMEM, +- * Partitioned Global Address Space (PGAS) languages, task-based paradigms, and +- * I/O bound applications. +- * +- * The initial focus is on supporting semantics such as point-to-point +- * communications (one-sided and two-sided), collective communication, +- * and remote atomic operations required for popular parallel programming models. +- * Also, the initial UCX reference implementation +- * is targeted to support current network technologies such as: +- * + Open Fabrics - InfiniBand (Mellanox, Qlogic, IBM), libfabrics, iWARP, RoCE +- * + Cray GEMINI \& ARIES +- * + Shared memory (MMAP, Posix, CMA, KNEM, XPMEM, etc.) +- * + Ethernet (TCP/UDP) +- * +- +- * UCX design goals are focused on performance and scalability, while efficiently supporting +- * popular and emerging programming models. +- +- * UCX’s API and design do not impose architectural constraints on the network hardware +- * nor require any specific capabilities to the support the programming model functionality. +- * This is achieved by keeping the API flexible and ability to support the missing +- * functionality efficiently in the software. +- * +- * +- * Extreme scalability is an important design goal for UCX. +- * To achieve this, UCX follows these design principles : +- * + Minimal memory consumption : Design avoids data-structures that scale with the number of +- * processing elements (i.e., order N data structures), and share resources among multiple +- * programming models. +- * + Low-latency Interfaces: Design provides at least two sets of APIs with one set focused on the performance, +- * and the other focused on functionality. +- * + High bandwidth - With minimal software overhead combined and support for multi-rail and multi-device +- * capabilities, the design provides all the hooks that are necessary for exploiting hardware bandwidth +- * capabilities. +- * + Asynchronous Progress: API provides non-blocking communication interfaces and design supports asynchronous progress +- * required for communication and computation overlap +- * + Resilience - the API exposes communication control hooks required for fault +- * tolerant communication library implementation. +- * +- * UCX design provides native support for hybrid programming models. The +- * design enables resource sharing, optimal memory usage, and progress engine +- * coordination to efficiently implement hybrid programming models. For example, +- * hybrid applications that use both OpenSHMEM and MPI programming models will be +- * able to select between a single-shared UCX network context or a stand +- * alone UCX network context for each one of them. Such flexibility, +- * optimized resource sharing, and reduced memory consumption, improve network +- * and application performance. +- * +- * +- */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.md b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.md +new file mode 100644 +index 000000000..35404bbfd +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/intro.md +@@ -0,0 +1,82 @@ ++Introduction ++============ ++ ++\section Motivation ++A communication middleware abstracts the vendor-specific software and hardware ++interfaces. ++They bridge the semantic and functionality gap between the programming models ++and the software and hardware network interfaces by providing ++data transfer interfaces and implementation, optimized protocols for data ++transfer between various memories, and managing network resources. There are many ++communication middleware APIs and libraries to support parallel programming ++models such as MPI, OpenSHMEM, and task-based models. ++ ++Current communication middleware designs typically take two approaches. First, ++communication middleware such as Intel's PSM (previously Qlogic), Mellanox's ++MXM, and IBM's PAMI provide high-performance implementations for specific ++network hardware. Second, communication middleware such as VMI, Cactus, ARMCI, ++GASNet, and Open MPI are tightly coupled to a specific programming model. ++Communication middleware designed with either of this design approach ++requires significant porting effort to move a new network ++interface or programming model. ++ ++To achieve functional and performance portability across ++architectures and programming models, we introduce Unified Communication X ++(UCX). ++ ++\section UCX ++Unified Communication X (UCX) is a set of network APIs and their ++implementations for high throughput computing. UCX is a combined ++effort of national laboratories, industry, and academia to design and ++implement a high-performing and highly-scalable network stack for next ++generation applications and systems. UCX design provides the ability to ++tailor its APIs and network functionality to suit a wide variety of ++application domains. ++We envision that these APIs will satisfy the networking needs of many ++programming models such as the Message Passing Interface (MPI), OpenSHMEM, ++Partitioned Global Address Space (PGAS) languages, task-based paradigms, and ++I/O bound applications. ++ ++The initial focus is on supporting semantics such as point-to-point ++communications (one-sided and two-sided), collective communication, ++and remote atomic operations required for popular parallel programming models. ++Also, the initial UCX reference implementation ++is targeted to support current network technologies such as: +++ Open Fabrics - InfiniBand (Mellanox, Qlogic, IBM), libfabrics, iWARP, RoCE +++ Cray GEMINI \& ARIES +++ Shared memory (MMAP, Posix, CMA, KNEM, XPMEM, etc.) +++ Ethernet (TCP/UDP) ++ ++ ++UCX design goals are focused on performance and scalability, while efficiently supporting ++popular and emerging programming models. ++ ++UCX's API and design do not impose architectural constraints on the network hardware ++nor require any specific capabilities to the support the programming model functionality. ++This is achieved by keeping the API flexible and ability to support the missing ++functionality efficiently in the software. ++ ++ ++Extreme scalability is an important design goal for UCX. ++To achieve this, UCX follows these design principles: +++ Minimal memory consumption : Design avoids data-structures that scale with the number of ++processing elements (i.e., order N data structures), and share resources among multiple ++programming models. +++ Low-latency Interfaces: Design provides at least two sets of APIs with one set focused on the performance, ++and the other focused on functionality. +++ High bandwidth - With minimal software overhead combined and support for multi-rail and multi-device ++ capabilities, the design provides all the hooks that are necessary for exploiting hardware bandwidth ++capabilities. +++ Asynchronous Progress: API provides non-blocking communication interfaces and design supports asynchronous progress ++required for communication and computation overlap +++ Resilience - the API exposes communication control hooks required for fault ++tolerant communication library implementation. ++ ++UCX design provides native support for hybrid programming models. The ++design enables resource sharing, optimal memory usage, and progress engine ++coordination to efficiently implement hybrid programming models. For example, ++hybrid applications that use both OpenSHMEM and MPI programming models will be ++able to select between a single-shared UCX network context or a stand ++alone UCX network context for each one of them. Such flexibility, ++optimized resource sharing, and reduced memory consumption, improve network ++and application performance. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.dox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.dox +deleted file mode 100644 +index 417388d9d..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.dox ++++ /dev/null +@@ -1,32 +0,0 @@ +-/* +- * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-/** +- * \mainpage Preface +- * +- * \section Scope Scope of the Document +- * This document describes the UCX programming +- * interface. The programming interface exposes a high performance +- * communication API, which provides basic building blocks for PGAS, Message +- * Passing Interface (MPI), Big-Data, Analytics, File I/O, and storage library developers. +- * +- * \section Audience Audience +- * This manual is intended for programmers who want to +- * develop parallel programming models like OpenSHMEM, MPI, UPC, Chapel, etc. +- * The manual assumes that the reader is familiar with the following: +- * + Basic concepts of two-sided, one-sided, atomic, and collective operations +- * + C programming language +- * +- * \section Status Document Status +- * This section briefly describes a list of open +- * issues in the UCX specification. +- * + UCP API - work in progress +- * + UCT API - work in progress +- * +- * +- * \section License +- * UCX project follows open source development model and the software is +- * licensed under BSD-3 license. +- */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.md b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.md +new file mode 100644 +index 000000000..e3aef6f0e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/preface.md +@@ -0,0 +1,25 @@ ++Preface {#mainpage} ++======= ++ ++\section Scope Scope of the Document ++This document describes the UCX programming ++interface. The programming interface exposes a high performance ++communication API, which provides basic building blocks for PGAS, Message ++Passing Interface (MPI), Big-Data, Analytics, File I/O, and storage library developers. ++ ++\section Audience Audience ++This manual is intended for programmers who want to ++develop parallel programming models like OpenSHMEM, MPI, UPC, Chapel, etc. ++The manual assumes that the reader is familiar with the following: +++ Basic concepts of two-sided, one-sided, atomic, and collective operations +++ C programming language ++ ++\section Status Document Status ++This section briefly describes a list of open ++issues in the UCX specification. +++ UCP API - work in progress +++ UCT API - work in progress ++ ++\section License ++UCX project follows open source development model and the software is ++licensed under BSD-3 license. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/ucxdox b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/ucxdox +index 367fd9fa7..07a1822b3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/ucxdox ++++ b/src/mpid/ch4/netmod/ucx/ucx/doc/doxygen/ucxdox +@@ -1,4 +1,5 @@ + # Copyright (C) UT-Battelle, LLC. 2014-2015. ALL RIGHTS RESERVED. ++# Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. + # See file LICENSE for terms. + # + # Doxyfile 1.8.9.1 +@@ -761,16 +762,18 @@ WARN_LOGFILE = + # spaces. + # Note: If this tag is empty the current directory is searched. + +-INPUT = $(SRCDIR)/src/ucp/api/ \ +- $(SRCDIR)/src/uct/api/ \ +- $(SRCDIR)/src/ucs/type/ \ +- $(SRCDIR)/src/ucs/async/ \ +- $(SRCDIR)/src/ucs/time/ \ +- $(SRCDIR)/src/ucs/sys/ \ +- $(SRCDIR)/doc/doxygen/preface.dox \ +- $(SRCDIR)/doc/doxygen/intro.dox \ +- $(SRCDIR)/doc/doxygen/design.dox \ +- $(SRCDIR)/doc/doxygen/conventions.dox ++INPUT = $(SRCDIR)/src/ucp/api/ \ ++ $(SRCDIR)/src/uct/api/ \ ++ $(SRCDIR)/src/ucs/async/ \ ++ $(SRCDIR)/src/ucs/config/ \ ++ $(SRCDIR)/src/ucs/datastruct/ \ ++ $(SRCDIR)/src/ucs/time/ \ ++ $(SRCDIR)/src/ucs/type/ \ ++ $(SRCDIR)/src/ucs/sys/ \ ++ $(SRCDIR)/doc/doxygen/preface.md \ ++ $(SRCDIR)/doc/doxygen/intro.md \ ++ $(SRCDIR)/doc/doxygen/design.md \ ++ $(SRCDIR)/doc/doxygen/conventions.md + + # This tag can be used to specify the character encoding of the source files + # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +@@ -799,7 +802,9 @@ FILE_PATTERNS = ucp.h \ + async_fwd.h \ + compiler_def.h \ + time_def.h \ +- thread_mode.h ++ thread_mode.h \ ++ callbackq.h \ ++ types.h + + # The RECURSIVE tag can be used to specify whether or not subdirectories should + # be searched for input files as well. +@@ -1648,7 +1653,7 @@ EXTRA_PACKAGES = times + # to HTML_HEADER. + # This tag requires that the tag GENERATE_LATEX is set to YES. + +-LATEX_HEADER = $(SRCDIR)/doc/doxygen/header.tex ++LATEX_HEADER = doc/doxygen/header.tex + + # 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 +@@ -1839,7 +1844,7 @@ MAN_SUBDIR = + # The default value is: NO. + # This tag requires that the tag GENERATE_MAN is set to YES. + +-MAN_LINKS = NO ++MAN_LINKS = YES + + #--------------------------------------------------------------------------- + # Configuration options related to the XML output +@@ -2383,3 +2388,9 @@ GENERATE_LEGEND = YES + # This tag requires that the tag HAVE_DOT is set to YES. + + DOT_CLEANUP = YES ++ ++# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when ++# a warning is encountered. ++# The default value is: NO. ++ ++WARN_AS_ERROR = YES +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/Makefile.am +index af9e7a1aa..99d6b2899 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/Makefile.am +@@ -32,7 +32,6 @@ endif + + ucx_info_SOURCES = \ + build_info.c \ +- cfg_info.c \ + proto_info.c \ + sys_info.c \ + tl_info.c \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/cfg_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/cfg_info.c +deleted file mode 100644 +index 49f32f501..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/cfg_info.c ++++ /dev/null +@@ -1,140 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include "ucx_info.h" +- +-#include +-#include +-#include +-#include +- +- +-static void print_tl_config(uct_md_h md, const char *tl_name, +- ucs_config_print_flags_t print_flags) +-{ +- char cfg_title[UCT_TL_NAME_MAX + 128]; +- uct_iface_config_t *config; +- ucs_status_t status; +- +- if (tl_name != NULL) { +- snprintf(cfg_title, sizeof(cfg_title), "%s transport configuration", tl_name); +- } else { +- snprintf(cfg_title, sizeof(cfg_title), "%s client-server transport configuration", +- md->component->name); +- } +- +- status = uct_md_iface_config_read(md, tl_name, NULL, NULL, &config); +- if (status != UCS_OK) { +- printf("# < Failed to read configuration >\n"); +- return; +- } +- +- uct_config_print(config, stdout, cfg_title, print_flags); +- uct_config_release(config); +-} +- +-void print_ucp_config(ucs_config_print_flags_t print_flags) +-{ +- ucp_config_t *config; +- ucs_status_t status; +- +- status = ucp_config_read(NULL, NULL, &config); +- if (status != UCS_OK) { +- printf("\n"); +- return; +- } +- +- ucp_config_print(config, stdout, "protocol layer configuration", print_flags); +- ucp_config_release(config); +-} +- +-void print_uct_config(ucs_config_print_flags_t print_flags, const char *tl_name) +-{ +- uct_md_resource_desc_t *md_resources; +- unsigned md_rsc_index, num_md_resources; +- uct_tl_resource_desc_t *tl_resources; +- unsigned tl_rsc_index, num_tl_resources; +- char tl_names[UINT8_MAX][UCT_TL_NAME_MAX]; +- unsigned i, num_tls; +- ucs_status_t status; +- uct_md_h md; +- uct_md_config_t *md_config; +- uct_md_attr_t md_attr; +- +- status = uct_query_md_resources(&md_resources, &num_md_resources); +- if (status != UCS_OK) { +- return; +- } +- +- uct_md_component_config_print(print_flags); +- +- num_tls = 0; +- for (md_rsc_index = 0; md_rsc_index < num_md_resources; ++md_rsc_index) { +- +- status = uct_md_config_read(md_resources[md_rsc_index].md_name, NULL, +- NULL, &md_config); +- if (status != UCS_OK) { +- continue; +- } +- +- status = uct_md_open(md_resources[md_rsc_index].md_name, md_config, &md); +- uct_config_release(md_config); +- if (status != UCS_OK) { +- continue; +- } +- +- status = uct_md_query_tl_resources(md, &tl_resources, &num_tl_resources); +- if (status != UCS_OK) { +- uct_md_close(md); +- continue; +- } +- +- /* handle the printing of a special case where cannot use tl_resources +- * since there aren't any */ +- status = uct_md_query(md, &md_attr); +- if (status != UCS_OK) { +- uct_release_tl_resource_list(tl_resources); +- uct_md_close(md); +- continue; +- } +- +- if (md_attr.cap.flags & UCT_MD_FLAG_SOCKADDR) { +- print_tl_config(md, NULL, print_flags); +- } +- +- for (tl_rsc_index = 0; tl_rsc_index < num_tl_resources; ++tl_rsc_index) { +- i = 0; +- while (i < num_tls) { +- if (!strcmp(tl_names[i], tl_resources[tl_rsc_index].tl_name)) { +- break; +- } +- ++i; +- } +- +- /* Make sure this transport is not inserted to the array before, and +- * if user selects a specific transport - also make sure this is it. +- */ +- if ((i == num_tls) && +- ((tl_name == NULL) || !strcmp(tl_name, tl_resources[tl_rsc_index].tl_name))) +- { +- ucs_strncpy_zero(tl_names[num_tls], tl_resources[tl_rsc_index].tl_name, +- UCT_TL_NAME_MAX); +- +- print_tl_config(md, tl_names[num_tls], print_flags); +- +- ++num_tls; +- } +- } +- +- uct_release_tl_resource_list(tl_resources); +- uct_md_close(md); +- } +- +- uct_release_md_resource_list(md_resources); +-} +- +- +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/proto_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/proto_info.c +index 29df72a34..658701624 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/proto_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/proto_info.c +@@ -89,8 +89,8 @@ static void print_resource_usage(const resource_usage_t *usage_before, + } + + void print_ucp_info(int print_opts, ucs_config_print_flags_t print_flags, +- uint64_t features, size_t estimated_num_eps, +- unsigned dev_type_bitmap) ++ uint64_t ctx_features, const ucp_ep_params_t *base_ep_params, ++ size_t estimated_num_eps, unsigned dev_type_bitmap) + { + ucp_config_t *config; + ucs_status_t status; +@@ -113,7 +113,7 @@ void print_ucp_info(int print_opts, ucs_config_print_flags_t print_flags, + memset(¶ms, 0, sizeof(params)); + params.field_mask = UCP_PARAM_FIELD_FEATURES | + UCP_PARAM_FIELD_ESTIMATED_NUM_EPS; +- params.features = features; ++ params.features = ctx_features; + params.estimated_num_eps = estimated_num_eps; + + get_resource_usage(&usage); +@@ -166,8 +166,10 @@ void print_ucp_info(int print_opts, ucs_config_print_flags_t print_flags, + goto out_destroy_worker; + } + +- ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- ep_params.address = address; ++ ep_params = *base_ep_params; ++ ++ ep_params.field_mask |= UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ ep_params.address = address; + + status = ucp_ep_create(worker, &ep_params, &ep); + ucp_worker_release_address(worker, address); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/sys_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/sys_info.c +index fa2578ed2..426befb74 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/sys_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/sys_info.c +@@ -21,7 +21,11 @@ static const char* cpu_model_names[] = { + [UCS_CPU_MODEL_INTEL_IVYBRIDGE] = "IvyBridge", + [UCS_CPU_MODEL_INTEL_SANDYBRIDGE] = "SandyBridge", + [UCS_CPU_MODEL_INTEL_NEHALEM] = "Nehalem", +- [UCS_CPU_MODEL_INTEL_WESTMERE] = "Westmere" ++ [UCS_CPU_MODEL_INTEL_WESTMERE] = "Westmere", ++ [UCS_CPU_MODEL_INTEL_HASWELL] = "Haswell", ++ [UCS_CPU_MODEL_INTEL_BROADWELL] = "Broadwell", ++ [UCS_CPU_MODEL_INTEL_SKYLAKE] = "Skylake", ++ [UCS_CPU_MODEL_ARM_AARCH64] = "ARM 64-bit" + }; + + static double measure_memcpy_bandwidth(size_t size) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/tl_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/tl_info.c +index b0be10144..4e845093d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/tl_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/tl_info.c +@@ -17,18 +17,23 @@ + #define PRINT_CAP(_name, _cap_flags, _max) \ + if ((_cap_flags) & (UCT_IFACE_FLAG_##_name)) { \ + char *s = strduplower(#_name); \ +- printf("# %12s: %s\n", s, size_limit_to_str(0, _max)); \ ++ printf("# %15s: %s\n", s, size_limit_to_str(0, _max)); \ + free(s); \ + } + +-#define PRINT_ZCAP(_name, _cap_flags, _min, _max, _max_iov) \ +- if ((_cap_flags) & (UCT_IFACE_FLAG_##_name)) { \ ++#define PRINT_ZCAP_NO_CHECK(_name, _min, _max, _max_iov) \ ++ { \ + char *s = strduplower(#_name); \ +- printf("# %12s: %s, up to %zu iov\n", s, \ ++ printf("# %15s: %s, up to %zu iov\n", s, \ + size_limit_to_str((_min), (_max)), (_max_iov)); \ + free(s); \ + } + ++#define PRINT_ZCAP(_name, _cap_flags, _min, _max, _max_iov) \ ++ if ((_cap_flags) & (UCT_IFACE_FLAG_##_name)) { \ ++ PRINT_ZCAP_NO_CHECK(_name, _min, _max, _max_iov) \ ++ } ++ + #define PRINT_ATOMIC_CAP(_name, _cap_flags) \ + if ((_cap_flags) & (UCT_IFACE_FLAG_##_name##32 | UCT_IFACE_FLAG_##_name##64)) { \ + char *s = strduplower(#_name); \ +@@ -41,14 +46,22 @@ + if (ucs_test_all_flags(_cap_flags, \ + UCT_IFACE_FLAG_##_name##32 | UCT_IFACE_FLAG_##_name##64)) \ + { \ +- printf("# %12s: 32, 64 bit%s\n", s, domain); \ ++ printf("# %12s: 32, 64 bit%s (deprecated)\n", s, domain); \ + } else { \ +- printf("# %12s: %d bit%s\n", s, \ ++ printf("# %12s: %d bit%s (deprecated)\n", s, \ + ((_cap_flags) & UCT_IFACE_FLAG_##_name##32) ? 32 : 64, domain); \ + } \ + free(s); \ + } + ++#define PRINT_ATOMIC_POST(_name, _cap) \ ++ print_atomic_info(UCT_ATOMIC_OP_##_name, #_name, "", \ ++ _cap.atomic32.op_flags, _cap.atomic32.op_flags); ++ ++#define PRINT_ATOMIC_FETCH(_name, _cap, _suffix) \ ++ print_atomic_info(UCT_ATOMIC_OP_##_name, #_name, _suffix, \ ++ _cap.atomic32.fop_flags, _cap.atomic32.fop_flags); ++ + static char *strduplower(const char *str) + { + char *s, *p; +@@ -60,6 +73,27 @@ static char *strduplower(const char *str) + return s; + } + ++static void print_atomic_info(uct_atomic_op_t opcode, const char *name, ++ const char *suffix, uint64_t op32, uint64_t op64) ++{ ++ char amo[256] = "atomic_"; ++ char *s; ++ ++ if ((op32 & UCS_BIT(opcode)) || (op64 & UCS_BIT(opcode))) { ++ s = strduplower(name); ++ strncat(amo, suffix, sizeof(amo) - strlen(amo) - 1); ++ strncat(amo, s, sizeof(amo) - strlen(amo) - 1); ++ free(s); ++ ++ if ((op32 & UCS_BIT(opcode)) && (op64 & UCS_BIT(opcode))) { ++ printf("# %12s: 32, 64 bit\n", amo); ++ } else { ++ printf("# %12s: %d bit\n", amo, ++ (op32 & UCS_BIT(opcode)) ? 32 : 64); ++ } ++ } ++} ++ + static const char *size_limit_to_str(size_t min_size, size_t max_size) + { + static char buf[128]; +@@ -139,46 +173,90 @@ static void print_iface_info(uct_worker_h worker, uct_md_h md, + PRINT_ZCAP(PUT_ZCOPY, iface_attr.cap.flags, iface_attr.cap.put.min_zcopy, + iface_attr.cap.put.max_zcopy, iface_attr.cap.put.max_iov); + +- if((iface_attr.cap.flags) & (UCT_IFACE_FLAG_PUT_ZCOPY)) { ++ if (iface_attr.cap.flags & UCT_IFACE_FLAG_PUT_ZCOPY) { + printf("# put_opt_zcopy_align: %s\n", + size_limit_to_str(0, iface_attr.cap.put.opt_zcopy_align)); + printf("# put_align_mtu: %s\n", + size_limit_to_str(0, iface_attr.cap.put.align_mtu)); + } +- if((iface_attr.cap.flags) & (UCT_IFACE_FLAG_GET_ZCOPY)) { +- printf("# get_opt_zcopy_align: %s\n", +- size_limit_to_str(0, iface_attr.cap.get.opt_zcopy_align)); +- printf("# get_align_mtu: %s\n", +- size_limit_to_str(0, iface_attr.cap.get.align_mtu)); +- } +- if((iface_attr.cap.flags) & (UCT_IFACE_FLAG_AM_ZCOPY)) { +- printf("# am_opt_zcopy_align: %s\n", +- size_limit_to_str(0, iface_attr.cap.am.opt_zcopy_align)); +- printf("# am_align_mtu: %s\n", +- size_limit_to_str(0, iface_attr.cap.am.align_mtu)); +- } + ++ PRINT_CAP(GET_SHORT, iface_attr.cap.flags, iface_attr.cap.get.max_short); + PRINT_CAP(GET_BCOPY, iface_attr.cap.flags, iface_attr.cap.get.max_bcopy); + PRINT_ZCAP(GET_ZCOPY, iface_attr.cap.flags, iface_attr.cap.get.min_zcopy, + iface_attr.cap.get.max_zcopy, iface_attr.cap.get.max_iov); ++ if (iface_attr.cap.flags & UCT_IFACE_FLAG_GET_ZCOPY) { ++ printf("# get_opt_zcopy_align: %s\n", ++ size_limit_to_str(0, iface_attr.cap.get.opt_zcopy_align)); ++ printf("# get_align_mtu: %s\n", ++ size_limit_to_str(0, iface_attr.cap.get.align_mtu)); ++ } ++ + PRINT_CAP(AM_SHORT, iface_attr.cap.flags, iface_attr.cap.am.max_short); + PRINT_CAP(AM_BCOPY, iface_attr.cap.flags, iface_attr.cap.am.max_bcopy); + PRINT_ZCAP(AM_ZCOPY, iface_attr.cap.flags, iface_attr.cap.am.min_zcopy, + iface_attr.cap.am.max_zcopy, iface_attr.cap.am.max_iov); + if (iface_attr.cap.flags & UCT_IFACE_FLAG_AM_ZCOPY) { ++ printf("# am_opt_zcopy_align: %s\n", ++ size_limit_to_str(0, iface_attr.cap.am.opt_zcopy_align)); ++ printf("# am_align_mtu: %s\n", ++ size_limit_to_str(0, iface_attr.cap.am.align_mtu)); + printf("# am header: %s\n", + size_limit_to_str(0, iface_attr.cap.am.max_hdr)); + } + +- PRINT_ATOMIC_CAP(ATOMIC_ADD, iface_attr.cap.flags); +- PRINT_ATOMIC_CAP(ATOMIC_FADD, iface_attr.cap.flags); +- PRINT_ATOMIC_CAP(ATOMIC_SWAP, iface_attr.cap.flags); +- PRINT_ATOMIC_CAP(ATOMIC_CSWAP, iface_attr.cap.flags); ++ PRINT_CAP(TAG_EAGER_SHORT, iface_attr.cap.flags, ++ iface_attr.cap.tag.eager.max_short); ++ PRINT_CAP(TAG_EAGER_BCOPY, iface_attr.cap.flags, ++ iface_attr.cap.tag.eager.max_bcopy); ++ PRINT_ZCAP(TAG_EAGER_ZCOPY, iface_attr.cap.flags, 0, ++ iface_attr.cap.tag.eager.max_zcopy, ++ iface_attr.cap.tag.eager.max_iov); ++ ++ if (iface_attr.cap.flags & UCT_IFACE_FLAG_TAG_RNDV_ZCOPY) { ++ PRINT_ZCAP_NO_CHECK(TAG_RNDV_ZCOPY, 0, ++ iface_attr.cap.tag.rndv.max_zcopy, ++ iface_attr.cap.tag.rndv.max_iov); ++ printf("# rndv private header: %s\n", ++ size_limit_to_str(0, iface_attr.cap.tag.rndv.max_hdr)); ++ } ++ ++ if (iface_attr.cap.flags & (UCT_IFACE_FLAG_TAG_EAGER_SHORT | ++ UCT_IFACE_FLAG_TAG_EAGER_BCOPY | ++ UCT_IFACE_FLAG_TAG_EAGER_ZCOPY | ++ UCT_IFACE_FLAG_TAG_RNDV_ZCOPY)) { ++ PRINT_ZCAP_NO_CHECK(TAG_RECV, iface_attr.cap.tag.recv.min_recv, ++ iface_attr.cap.tag.recv.max_zcopy, ++ iface_attr.cap.tag.recv.max_iov); ++ printf("# tag_max_outstanding: %s\n", ++ size_limit_to_str(0, iface_attr.cap.tag.recv.max_outstanding)); ++ } ++ ++ if (iface_attr.cap.atomic32.op_flags || ++ iface_attr.cap.atomic64.op_flags || ++ iface_attr.cap.atomic32.fop_flags || ++ iface_attr.cap.atomic64.fop_flags) { ++ if (iface_attr.cap.flags & UCT_IFACE_FLAG_ATOMIC_DEVICE) { ++ printf("# domain: device\n"); ++ } else if (iface_attr.cap.flags & UCT_IFACE_FLAG_ATOMIC_CPU) { ++ printf("# domain: cpu\n"); ++ } ++ ++ PRINT_ATOMIC_POST(ADD, iface_attr.cap); ++ PRINT_ATOMIC_POST(AND, iface_attr.cap); ++ PRINT_ATOMIC_POST(OR, iface_attr.cap); ++ PRINT_ATOMIC_POST(XOR, iface_attr.cap); ++ ++ PRINT_ATOMIC_FETCH(ADD, iface_attr.cap, "f"); ++ PRINT_ATOMIC_FETCH(AND, iface_attr.cap, "f"); ++ PRINT_ATOMIC_FETCH(OR, iface_attr.cap, "f"); ++ PRINT_ATOMIC_FETCH(XOR, iface_attr.cap, "f"); ++ PRINT_ATOMIC_FETCH(SWAP , iface_attr.cap, ""); ++ PRINT_ATOMIC_FETCH(CSWAP, iface_attr.cap, ""); ++ } + + buf[0] = '\0'; + if (iface_attr.cap.flags & (UCT_IFACE_FLAG_CONNECT_TO_EP | +- UCT_IFACE_FLAG_CONNECT_TO_IFACE)) +- { ++ UCT_IFACE_FLAG_CONNECT_TO_IFACE)) { + if (iface_attr.cap.flags & UCT_IFACE_FLAG_CONNECT_TO_EP) { + strncat(buf, " to ep,", sizeof(buf) - 1); + } +@@ -207,12 +285,11 @@ static void print_iface_info(uct_worker_h worker, uct_md_h md, + UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF | + UCT_IFACE_FLAG_ERRHANDLE_AM_ID | + UCT_IFACE_FLAG_ERRHANDLE_REMOTE_MEM | +- UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE)) +- { ++ UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE)) { ++ + if (iface_attr.cap.flags & (UCT_IFACE_FLAG_ERRHANDLE_SHORT_BUF | + UCT_IFACE_FLAG_ERRHANDLE_BCOPY_BUF | +- UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF)) +- { ++ UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF)) { + strncat(buf, " buffer (", sizeof(buf) - 1); + if (iface_attr.cap.flags & UCT_IFACE_FLAG_ERRHANDLE_SHORT_BUF) { + strncat(buf, "short,", sizeof(buf) - 1); +@@ -263,7 +340,7 @@ static ucs_status_t print_tl_info(uct_md_h md, const char *tl_name, + } + + /* coverity[alloc_arg] */ +- status = uct_worker_create(&async, UCS_THREAD_MODE_MULTI, &worker); ++ status = uct_worker_create(&async, UCS_THREAD_MODE_SINGLE, &worker); + if (status != UCS_OK) { + goto out; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/type_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/type_info.c +index 37fee06bf..cd36d4f3b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/type_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/type_info.c +@@ -18,12 +18,13 @@ + #include + #include + #include ++#include + #include + #include + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -50,7 +51,7 @@ + # include + # include + # include +-# if HAVE_MLX5_HW ++# if HAVE_MLX5_HW_DC + # include + # endif + #endif +@@ -58,7 +59,7 @@ + #if HAVE_TL_UD + # include + # include +-# if HAVE_MLX5_HW ++# if HAVE_MLX5_HW_UD + # include + # endif + #endif +@@ -216,7 +217,7 @@ void print_type_info(const char * tl_name) + PRINT_SIZE(uct_dc_verbs_iface_t); + } + +-#if HAVE_MLX5_HW ++#if HAVE_MLX5_HW_DC + if (tl_name == NULL || !strcasecmp(tl_name, "dc_mlx5")) { + PRINT_SIZE(uct_dc_mlx5_ep_t); + PRINT_SIZE(uct_dc_mlx5_grh_ep_t); +@@ -247,7 +248,7 @@ void print_type_info(const char * tl_name) + PRINT_SIZE(uct_ud_verbs_iface_t); + } + +-#if HAVE_MLX5_HW ++#if HAVE_MLX5_HW_UD + if (tl_name == NULL || !strcasecmp(tl_name, "ud_mlx5")) { + PRINT_SIZE(uct_ud_mlx5_ep_t); + PRINT_SIZE(uct_ud_mlx5_iface_t); +@@ -275,9 +276,13 @@ void print_type_info(const char * tl_name) + PRINT_SIZE(ucp_context_t); + PRINT_SIZE(ucp_worker_t); + PRINT_SIZE(ucp_ep_t); ++ PRINT_SIZE(ucp_ep_ext_gen_t); ++ PRINT_SIZE(ucp_ep_ext_proto_t); ++ PRINT_SIZE(ucp_ep_match_entry_t); + PRINT_SIZE(ucp_ep_config_key_t); + PRINT_SIZE(ucp_ep_config_t); + PRINT_SIZE(ucp_request_t); ++ PRINT_SIZE(ucp_recv_desc_t); + PRINT_SIZE(ucp_tag_recv_info_t); + PRINT_SIZE(ucp_mem_t); + PRINT_SIZE(ucp_rkey_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.c +index 2499be719..e467a6bcd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.c +@@ -16,36 +16,42 @@ + + static void usage() { + printf("Usage: ucx_info [options]\n"); +- printf("Options are:\n"); +- printf(" -v Version\n"); +- printf(" -s System\n"); +- printf(" -d Devices\n"); +- printf(" -c Configuration\n"); +- printf(" -p UCP context\n"); +- printf(" -w UCP worker\n"); +- printf(" -e UCP endpoint\n"); +- printf(" -u UCP features to use. String of one or more of:\n"); +- printf(" 'a' : atomic operations\n"); +- printf(" 'r' : remote memory access\n"); +- printf(" 't' : tag matching \n"); +- printf(" 'w' : wakeup\n"); +- printf(" -D Set which device types to use\n"); +- printf(" 'all' : all possible devices (default)\n"); +- printf(" 'shm' : shared memory devices only\n"); +- printf(" 'net' : network devices only\n"); +- printf(" 'self' : self transport only\n"); +- printf(" -n Estimated UCP endpoint count (for ucp_init)\n"); +- printf(" -a Show also hidden configuration\n"); +- printf(" -b Build configuration\n"); +- printf(" -y Type information\n"); +- printf(" -f Fully decorated output\n"); +- printf(" -t Print information for a specific transport\n"); ++ printf("At least one of the following options has to be set:\n"); ++ printf(" -v Show version information\n"); ++ printf(" -d Show devices and transports\n"); ++ printf(" -b Show build configuration\n"); ++ printf(" -y Show type and structures information\n"); ++ printf(" -s Show system information\n"); ++ printf(" -c Show UCX configuration\n"); ++ printf(" -a Show also hidden configuration\n"); ++ printf(" -f Display fully decorated output\n"); ++ printf("\nUCP information (-u is required):\n"); ++ printf(" -p Show UCP context information\n"); ++ printf(" -w Show UCP worker information\n"); ++ printf(" -e Show UCP endpoint configuration\n"); ++ printf(" -u UCP context features to use. String of one or more of:\n"); ++ printf(" 'a' : atomic operations\n"); ++ printf(" 'r' : remote memory access\n"); ++ printf(" 't' : tag matching \n"); ++ printf(" 'w' : wakeup\n"); ++ printf(" Modifiers to use in combination with above features:\n"); ++ printf(" 'e' : error handling\n"); ++ printf("\nOther settings:\n"); ++ printf(" -t Filter devices information using specified transport (requires -d)\n"); ++ printf(" -n Estimated UCP endpoint count (for ucp_init)\n"); ++ printf(" -D Set which device types to use when creating UCP context:\n"); ++ printf(" 'all' : all possible devices (default)\n"); ++ printf(" 'shm' : shared memory devices only\n"); ++ printf(" 'net' : network devices only\n"); ++ printf(" 'self' : self transport only\n"); ++ printf(" -h Show this help message\n"); + printf("\n"); + } + + int main(int argc, char **argv) + { + ucs_config_print_flags_t print_flags; ++ ucp_ep_params_t ucp_ep_params; + unsigned dev_type_bitmap; + uint64_t ucp_features; + size_t ucp_num_eps; +@@ -54,12 +60,13 @@ int main(int argc, char **argv) + const char *f; + int c; + +- print_opts = 0; +- print_flags = 0; +- tl_name = NULL; +- ucp_features = 0; +- ucp_num_eps = 1; +- dev_type_bitmap = -1; ++ print_opts = 0; ++ print_flags = 0; ++ tl_name = NULL; ++ ucp_features = 0; ++ ucp_num_eps = 1; ++ dev_type_bitmap = -1; ++ ucp_ep_params.field_mask = 0; + while ((c = getopt(argc, argv, "fahvcydbswpet:n:u:D:")) != -1) { + switch (c) { + case 'f': +@@ -116,6 +123,10 @@ int main(int argc, char **argv) + case 'w': + ucp_features |= UCP_FEATURE_WAKEUP; + break; ++ case 'e': ++ ucp_ep_params.field_mask |= UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; ++ ucp_ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; ++ break; + default: + usage(); + return -1; +@@ -137,6 +148,8 @@ int main(int argc, char **argv) + } + break; + case 'h': ++ usage(); ++ return 0; + default: + usage(); + return -1; +@@ -165,10 +178,7 @@ int main(int argc, char **argv) + } + + if (print_flags & UCS_CONFIG_PRINT_CONFIG) { +- ucs_global_opts_print(stdout, print_flags); +- print_ucp_config(print_flags); +- print_uct_config(print_flags, tl_name); +- ucm_config_print(stdout, print_flags); ++ ucs_config_parser_print_all_opts(stdout, print_flags); + } + + if (print_opts & PRINT_DEVICES) { +@@ -177,11 +187,12 @@ int main(int argc, char **argv) + + if (print_opts & (PRINT_UCP_CONTEXT|PRINT_UCP_WORKER|PRINT_UCP_EP)) { + if (ucp_features == 0) { +- printf("Please select UCP features using -u switch\n"); ++ printf("Please select UCP features using -u switch: a|r|t|w\n"); ++ usage(); + return -1; + } +- print_ucp_info(print_opts, print_flags, ucp_features, ucp_num_eps, +- dev_type_bitmap); ++ print_ucp_info(print_opts, print_flags, ucp_features, &ucp_ep_params, ++ ucp_num_eps, dev_type_bitmap); + } + + return 0; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.h b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.h +index 313a98220..fc51f9b37 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/info/ucx_info.h +@@ -24,10 +24,6 @@ enum { + }; + + +-void print_ucp_config(ucs_config_print_flags_t print_flags); +- +-void print_uct_config(ucs_config_print_flags_t print_flags, const char *tl_name); +- + void print_version(); + + void print_sys_info(); +@@ -40,15 +36,7 @@ void print_uct_info(int print_opts, ucs_config_print_flags_t print_flags, + void print_type_info(const char * tl_name); + + void print_ucp_info(int print_opts, ucs_config_print_flags_t print_flags, +- uint64_t features, size_t estimated_num_eps, +- unsigned dev_type_bitmap); +- +-/** +- * @ingroup RESOURCE +- * @brief Print MD component configuration to a stream. +- * +- * @param [in] print_flags Controls how the configuration is printed. +- */ +-void uct_md_component_config_print(ucs_config_print_flags_t print_flags); ++ uint64_t ctx_features, const ucp_ep_params_t *base_ep_params, ++ size_t estimated_num_eps, unsigned dev_type_bitmap); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/Makefile.am +index e0e6633c2..e8607c3aa 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/Makefile.am +@@ -14,6 +14,9 @@ else + ucx_perftest_CC = $(CC) + endif + ++# override CXXFLAGS to link C++ code with C linker ++CXXFLAGS += -nostdlib -fno-exceptions -fno-rtti ++ + perftestdir = $(pkgdatadir)/perftest + dist_perftest_DATA = \ + $(top_srcdir)/contrib/ucx_perftest_config/msg_pow2 \ +@@ -43,7 +46,6 @@ libucxperf_la_LDFLAGS = \ + $(RTE_LDFLAGS) \ + $(OPENMP_CFLAGS) + libucxperf_la_CXXFLAGS = \ +- -nostdlib -fno-exceptions -fno-rtti \ + $(BASE_CXXFLAGS) \ + $(OPENMP_CFLAGS) + libucxperf_la_CFLAGS = \ +@@ -56,16 +58,19 @@ libucxperf_la_LIBADD = \ + #libucxperf_la_LINK = $(CXX) + + ucx_perftest_SOURCES = perftest.c +-ucx_perftest_LDFLAGS = \ +- $(RTE_LDFLAGS) \ +- $(OPENMP_CFLAGS) +-ucx_perftest_CFLAGS = \ +- $(OPENMP_CFLAGS) +-ucx_perftest_LDADD = \ +- $(abs_top_builddir)/src/uct/libuct.la \ +- $(abs_top_builddir)/src/ucp/libucp.la \ +- $(abs_top_builddir)/src/ucs/libucs.la \ +- libucxperf.la ++ucx_perftest_LDFLAGS = \ ++ $(RTE_LDFLAGS) \ ++ $(OPENMP_CFLAGS) ++ucx_perftest_CPPFLAGS = \ ++ $(BASE_CPPFLAGS) ++ucx_perftest_CFLAGS = \ ++ $(BASE_CFLAGS) \ ++ $(OPENMP_CFLAGS) ++ucx_perftest_LDADD = \ ++ $(abs_top_builddir)/src/uct/libuct.la \ ++ $(abs_top_builddir)/src/ucp/libucp.la \ ++ $(abs_top_builddir)/src/ucs/libucs.la \ ++ libucxperf.la + ucx_perftest_SOURCE_FILES = \ + $(patsubst %, $(srcdir)/%, $(ucx_perftest_SOURCES)) + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.c +index 2214d4fa6..a98eca39a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.c +@@ -10,10 +10,29 @@ + #include "libperf_int.h" + + #include ++#include + #include + #include + #include + ++#define ATOMIC_OP_CONFIG(_size, _op32, _op64, _op, _msg, _params, _status) \ ++ _status = __get_atomic_flag((_size), (_op32), (_op64), (_op)); \ ++ if (_status != UCS_OK) { \ ++ ucs_error("%s/%s does not support atomic %s for message size %zu bytes", \ ++ (_params)->uct.tl_name, (_params)->uct.dev_name, \ ++ (_msg)[_op], (_size)); \ ++ return _status; \ ++ } ++ ++#define ATOMIC_OP_CHECK(_size, _attr, _required, _params, _msg) \ ++ if (!ucs_test_all_flags(_attr, _required)) { \ ++ if ((_params)->flags & UCX_PERF_TEST_FLAG_VERBOSE) { \ ++ ucs_error("%s/%s does not support required "#_size"-bit atomic: %s", \ ++ (_params)->uct.tl_name, (_params)->uct.dev_name, \ ++ (_msg)[ucs_ffs64(~(_attr) & (_required))]); \ ++ } \ ++ return UCS_ERR_UNSUPPORTED; \ ++ } + + typedef struct { + union { +@@ -30,6 +49,47 @@ typedef struct { + unsigned long recv_buffer; + } ucx_perf_ep_info_t; + ++static const char *perf_iface_ops[] = { ++ [ucs_ilog2(UCT_IFACE_FLAG_AM_SHORT)] = "am short", ++ [ucs_ilog2(UCT_IFACE_FLAG_AM_BCOPY)] = "am bcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_AM_ZCOPY)] = "am zcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_PUT_SHORT)] = "put short", ++ [ucs_ilog2(UCT_IFACE_FLAG_PUT_BCOPY)] = "put bcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_PUT_ZCOPY)] = "put zcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_GET_SHORT)] = "get short", ++ [ucs_ilog2(UCT_IFACE_FLAG_GET_BCOPY)] = "get bcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_GET_ZCOPY)] = "get zcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE)] = "peer failure handler", ++ [ucs_ilog2(UCT_IFACE_FLAG_CONNECT_TO_IFACE)] = "connect to iface", ++ [ucs_ilog2(UCT_IFACE_FLAG_CONNECT_TO_EP)] = "connect to ep", ++ [ucs_ilog2(UCT_IFACE_FLAG_AM_DUP)] = "full reliability", ++ [ucs_ilog2(UCT_IFACE_FLAG_CB_SYNC)] = "sync callback", ++ [ucs_ilog2(UCT_IFACE_FLAG_CB_ASYNC)] = "async callback", ++ [ucs_ilog2(UCT_IFACE_FLAG_EVENT_SEND_COMP)] = "send completion event", ++ [ucs_ilog2(UCT_IFACE_FLAG_EVENT_RECV)] = "tag or active message event", ++ [ucs_ilog2(UCT_IFACE_FLAG_EVENT_RECV_SIG)] = "signaled message event", ++ [ucs_ilog2(UCT_IFACE_FLAG_PENDING)] = "pending", ++ [ucs_ilog2(UCT_IFACE_FLAG_TAG_EAGER_SHORT)] = "tag eager short", ++ [ucs_ilog2(UCT_IFACE_FLAG_TAG_EAGER_BCOPY)] = "tag eager bcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_TAG_EAGER_ZCOPY)] = "tag eager zcopy", ++ [ucs_ilog2(UCT_IFACE_FLAG_TAG_RNDV_ZCOPY)] = "tag rndv zcopy" ++}; ++ ++static const char *perf_atomic_op[] = { ++ [UCT_ATOMIC_OP_ADD] = "add", ++ [UCT_ATOMIC_OP_AND] = "and", ++ [UCT_ATOMIC_OP_OR] = "or" , ++ [UCT_ATOMIC_OP_XOR] = "xor" ++}; ++ ++static const char *perf_atomic_fop[] = { ++ [UCT_ATOMIC_OP_ADD] = "fetch-add", ++ [UCT_ATOMIC_OP_AND] = "fetch-and", ++ [UCT_ATOMIC_OP_OR] = "fetch-or", ++ [UCT_ATOMIC_OP_XOR] = "fetch-xor", ++ [UCT_ATOMIC_OP_SWAP] = "swap", ++ [UCT_ATOMIC_OP_CSWAP] = "cswap" ++}; + + /* + * This Quickselect routine is based on the algorithm described in +@@ -314,11 +374,17 @@ static inline uint64_t __get_flag(uct_perf_data_layout_t layout, uint64_t short_ + 0; + } + +-static inline uint64_t __get_atomic_flag(size_t size, uint64_t flag32, uint64_t flag64) ++static inline ucs_status_t __get_atomic_flag(size_t size, uint64_t *op32, ++ uint64_t *op64, uint64_t op) + { +- return (size == 4) ? flag32 : +- (size == 8) ? flag64 : +- 0; ++ if (size == sizeof(uint32_t)) { ++ *op32 = UCS_BIT(op); ++ return UCS_OK; ++ } else if (size == sizeof(uint64_t)) { ++ *op64 = UCS_BIT(op); ++ return UCS_OK; ++ } ++ return UCS_ERR_UNSUPPORTED; + } + + static inline size_t __get_max_size(uct_perf_data_layout_t layout, size_t short_m, +@@ -333,9 +399,13 @@ static inline size_t __get_max_size(uct_perf_data_layout_t layout, size_t short_ + static ucs_status_t uct_perf_test_check_capabilities(ucx_perf_params_t *params, + uct_iface_h iface) + { ++ uint64_t required_flags = 0; ++ uint64_t atomic_op32 = 0; ++ uint64_t atomic_op64 = 0; ++ uint64_t atomic_fop32 = 0; ++ uint64_t atomic_fop64 = 0; + uct_iface_attr_t attr; + ucs_status_t status; +- uint64_t required_flags; + size_t min_size, max_size, max_iov, message_size; + + status = uct_iface_query(iface, &attr); +@@ -367,32 +437,32 @@ static ucs_status_t uct_perf_test_check_capabilities(ucx_perf_params_t *params, + max_iov = attr.cap.put.max_iov; + break; + case UCX_PERF_CMD_GET: +- required_flags = __get_flag(params->uct.data_layout, 0, ++ required_flags = __get_flag(params->uct.data_layout, UCT_IFACE_FLAG_GET_SHORT, + UCT_IFACE_FLAG_GET_BCOPY, UCT_IFACE_FLAG_GET_ZCOPY); + min_size = __get_max_size(params->uct.data_layout, 0, 0, + attr.cap.get.min_zcopy); +- max_size = __get_max_size(params->uct.data_layout, 0, ++ max_size = __get_max_size(params->uct.data_layout, attr.cap.get.max_short, + attr.cap.get.max_bcopy, attr.cap.get.max_zcopy); + max_iov = attr.cap.get.max_iov; + break; + case UCX_PERF_CMD_ADD: +- required_flags = __get_atomic_flag(message_size, UCT_IFACE_FLAG_ATOMIC_ADD32, +- UCT_IFACE_FLAG_ATOMIC_ADD64); ++ ATOMIC_OP_CONFIG(message_size, &atomic_op32, &atomic_op64, UCT_ATOMIC_OP_ADD, ++ perf_atomic_op, params, status); + max_size = 8; + break; + case UCX_PERF_CMD_FADD: +- required_flags = __get_atomic_flag(message_size, UCT_IFACE_FLAG_ATOMIC_FADD32, +- UCT_IFACE_FLAG_ATOMIC_FADD64); ++ ATOMIC_OP_CONFIG(message_size, &atomic_fop32, &atomic_fop64, UCT_ATOMIC_OP_ADD, ++ perf_atomic_fop, params, status); + max_size = 8; + break; + case UCX_PERF_CMD_SWAP: +- required_flags = __get_atomic_flag(message_size, UCT_IFACE_FLAG_ATOMIC_SWAP32, +- UCT_IFACE_FLAG_ATOMIC_SWAP64); ++ ATOMIC_OP_CONFIG(message_size, &atomic_fop32, &atomic_fop64, UCT_ATOMIC_OP_SWAP, ++ perf_atomic_fop, params, status); + max_size = 8; + break; + case UCX_PERF_CMD_CSWAP: +- required_flags = __get_atomic_flag(message_size, UCT_IFACE_FLAG_ATOMIC_CSWAP32, +- UCT_IFACE_FLAG_ATOMIC_CSWAP64); ++ ATOMIC_OP_CONFIG(message_size, &atomic_fop32, &atomic_fop64, UCT_ATOMIC_OP_CSWAP, ++ perf_atomic_fop, params, status); + max_size = 8; + break; + default: +@@ -407,23 +477,35 @@ static ucs_status_t uct_perf_test_check_capabilities(ucx_perf_params_t *params, + return status; + } + +- if (!ucs_test_all_flags(attr.cap.flags, required_flags) || !required_flags) { ++ /* check atomics first */ ++ ATOMIC_OP_CHECK(32, attr.cap.atomic32.op_flags, atomic_op32, params, perf_atomic_op); ++ ATOMIC_OP_CHECK(64, attr.cap.atomic64.op_flags, atomic_op64, params, perf_atomic_op); ++ ATOMIC_OP_CHECK(32, attr.cap.atomic32.fop_flags, atomic_fop32, params, perf_atomic_fop); ++ ATOMIC_OP_CHECK(64, attr.cap.atomic64.fop_flags, atomic_fop64, params, perf_atomic_fop); ++ ++ /* check iface flags */ ++ if (!(atomic_op32 | atomic_op64 | atomic_fop32 | atomic_fop64) && ++ (!ucs_test_all_flags(attr.cap.flags, required_flags) || !required_flags)) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("Device does not support required operation"); ++ ucs_error("%s/%s does not support operation %s", ++ params->uct.tl_name, params->uct.dev_name, ++ perf_iface_ops[ucs_ffs64(~attr.cap.flags & required_flags)]); + } + return UCS_ERR_UNSUPPORTED; + } + + if (message_size < min_size) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("Message size too small"); ++ ucs_error("Message size (%zu) is smaller than min supported (%zu)", ++ message_size, min_size); + } + return UCS_ERR_UNSUPPORTED; + } + + if (message_size > max_size) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("Message size too big"); ++ ucs_error("Message size (%zu) is larger than max supported (%zu)", ++ message_size, max_size); + } + return UCS_ERR_UNSUPPORTED; + } +@@ -439,25 +521,27 @@ static ucs_status_t uct_perf_test_check_capabilities(ucx_perf_params_t *params, + } + + if ((params->uct.data_layout == UCT_PERF_DATA_LAYOUT_ZCOPY) && +- (params->am_hdr_size > attr.cap.am.max_hdr)) ++ (params->am_hdr_size > attr.cap.am.max_hdr)) + { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("AM header size too big"); ++ ucs_error("AM header size (%zu) is larger than max supported (%zu)", ++ params->am_hdr_size, attr.cap.am.max_hdr); + } + return UCS_ERR_UNSUPPORTED; + } + + if (params->am_hdr_size > message_size) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("AM header size larger than message size"); ++ ucs_error("AM header size (%zu) is larger than message size (%zu)", ++ params->am_hdr_size, message_size); + } + return UCS_ERR_INVALID_PARAM; + } + + if (params->uct.fc_window > UCT_PERF_TEST_MAX_FC_WINDOW) { + if (params->flags & UCX_PERF_TEST_FLAG_VERBOSE) { +- ucs_error("AM flow-control window too large (should be <= %d)", +- UCT_PERF_TEST_MAX_FC_WINDOW); ++ ucs_error("AM flow-control window (%d) too large (should be <= %d)", ++ params->uct.fc_window, UCT_PERF_TEST_MAX_FC_WINDOW); + } + return UCS_ERR_INVALID_PARAM; + } +@@ -560,6 +644,7 @@ static ucs_status_t uct_perf_test_setup_endpoints(ucx_perf_context_t *perf) + } + + if (info.rkey_size > 0) { ++ memset(rkey_buffer, 0, info.rkey_size); + status = uct_md_mkey_pack(perf->uct.md, perf->uct.recv_mem.memh, rkey_buffer); + if (status != UCS_OK) { + ucs_error("Failed to uct_rkey_pack: %s", ucs_status_string(status)); +@@ -653,7 +738,7 @@ static ucs_status_t uct_perf_test_setup_endpoints(ucx_perf_context_t *perf) + uct_perf_iface_flush_b(perf); + + free(buffer); +- rte_call(perf, barrier); ++ uct_perf_barrier(perf); + return UCS_OK; + + err_destroy_eps: +@@ -676,9 +761,9 @@ static void uct_perf_test_cleanup_endpoints(ucx_perf_context_t *perf) + { + unsigned group_size, group_index, i; + +- rte_call(perf, barrier); ++ uct_perf_barrier(perf); + +- uct_iface_set_am_handler(perf->uct.iface, UCT_PERF_TEST_AM_ID, NULL, NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(perf->uct.iface, UCT_PERF_TEST_AM_ID, NULL, NULL, 0); + + group_size = rte_call(perf, group_size); + group_index = rte_call(perf, group_index); +@@ -820,6 +905,20 @@ ucp_perf_test_alloc_cuda(void **addr, size_t length) + return UCS_OK; + } + ++static ucs_status_t ++ucp_perf_test_alloc_cuda_managed(void **addr, size_t length) ++{ ++#if HAVE_CUDA ++ cudaError_t cerr; ++ ++ cerr = cudaMallocManaged(addr, length, cudaMemAttachGlobal); ++ if (cerr != cudaSuccess) { ++ return UCS_ERR_NO_MEMORY; ++ } ++#endif ++ return UCS_OK; ++} ++ + static ucs_status_t + ucp_perf_test_alloc_contig(ucx_perf_context_t *perf, ucx_perf_params_t *params, + void **addr, size_t length, ucp_mem_h *memh, +@@ -830,6 +929,8 @@ ucp_perf_test_alloc_contig(ucx_perf_context_t *perf, ucx_perf_params_t *params, + check_non_blk_flag); + } else if (perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA) { + return ucp_perf_test_alloc_cuda(addr, length); ++ } else if (perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA_MANAGED) { ++ return ucp_perf_test_alloc_cuda_managed(addr, length); + } + + return UCS_ERR_UNSUPPORTED; +@@ -837,9 +938,15 @@ ucp_perf_test_alloc_contig(ucx_perf_context_t *perf, ucx_perf_params_t *params, + + static void ucp_perf_test_free_contig(ucx_perf_context_t *perf, void *addr, ucp_mem_h memh) + { ++ ucs_status_t status; ++ + if (perf->params.mem_type == UCT_MD_MEM_TYPE_HOST) { +- ucp_mem_unmap(perf->ucp.context, memh); +- } else if (perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA) { ++ status = ucp_mem_unmap(perf->ucp.context, memh); ++ if (status != UCS_OK) { ++ ucs_warn("ucp_mem_unmap() failed: %s", ucs_status_string(status)); ++ } ++ } else if ((perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA) || ++ (perf->params.mem_type == UCT_MD_MEM_TYPE_CUDA_MANAGED)) { + #if HAVE_CUDA + cudaFree(addr); + #endif +@@ -950,7 +1057,7 @@ static ucs_status_t ucp_perf_test_exchange_status(ucx_perf_context_t *perf, + ucs_status_t status) + { + unsigned group_size = rte_call(perf, group_size); +- ucs_status_t collective_status = UCS_OK; ++ ucs_status_t collective_status = status; + struct iovec vec; + void *req = NULL; + unsigned i; +@@ -1081,6 +1188,13 @@ static ucs_status_t ucp_perf_test_setup_endpoints(ucx_perf_context_t *perf, + if (status != UCS_OK) { + ucp_perf_test_destroy_eps(perf, group_size); + } ++ ++ /* force wireup completion */ ++ status = ucp_worker_flush(perf->ucp.worker); ++ if (status != UCS_OK) { ++ ucs_warn("ucp_worker_flush() failed: %s", ucs_status_string(status)); ++ } ++ + return status; + + err_free_buffer: +@@ -1096,7 +1210,7 @@ static void ucp_perf_test_cleanup_endpoints(ucx_perf_context_t *perf) + { + unsigned group_size; + +- rte_call(perf, barrier); ++ ucp_perf_barrier(perf); + + group_size = rte_call(perf, group_size); + +@@ -1167,6 +1281,18 @@ out: + return status; + } + ++void uct_perf_barrier(ucx_perf_context_t *perf) ++{ ++ rte_call(perf, barrier, (void(*)(void*))uct_worker_progress, ++ (void*)perf->uct.worker); ++} ++ ++void ucp_perf_barrier(ucx_perf_context_t *perf) ++{ ++ rte_call(perf, barrier, (void(*)(void*))ucp_worker_progress, ++ (void*)perf->ucp.worker); ++} ++ + static ucs_status_t uct_perf_setup(ucx_perf_context_t *perf, ucx_perf_params_t *params) + { + uct_iface_config_t *iface_config; +@@ -1211,6 +1337,8 @@ static ucs_status_t uct_perf_setup(ucx_perf_context_t *perf, ucx_perf_params_t * + } + + status = uct_perf_test_check_capabilities(params, perf->uct.iface); ++ /* sync status across all processes */ ++ status = ucp_perf_test_exchange_status(perf, status); + if (status != UCS_OK) { + goto out_iface_close; + } +@@ -1320,7 +1448,7 @@ err: + static void ucp_perf_cleanup(ucx_perf_context_t *perf) + { + ucp_perf_test_cleanup_endpoints(perf); +- rte_call(perf, barrier); ++ ucp_perf_barrier(perf); + ucp_perf_test_free_mem(perf); + ucp_worker_destroy(perf->ucp.worker); + ucp_cleanup(perf->ucp.context); +@@ -1330,14 +1458,43 @@ static struct { + ucs_status_t (*setup)(ucx_perf_context_t *perf, ucx_perf_params_t *params); + void (*cleanup)(ucx_perf_context_t *perf); + ucs_status_t (*run)(ucx_perf_context_t *perf); ++ void (*barrier)(ucx_perf_context_t *perf); + } ucx_perf_funcs[] = { +- [UCX_PERF_API_UCT] = {uct_perf_setup, uct_perf_cleanup, uct_perf_test_dispatch}, +- [UCX_PERF_API_UCP] = {ucp_perf_setup, ucp_perf_cleanup, ucp_perf_test_dispatch} ++ [UCX_PERF_API_UCT] = {uct_perf_setup, uct_perf_cleanup, ++ uct_perf_test_dispatch, uct_perf_barrier}, ++ [UCX_PERF_API_UCP] = {ucp_perf_setup, ucp_perf_cleanup, ++ ucp_perf_test_dispatch, ucp_perf_barrier} + }; + + static int ucx_perf_thread_spawn(ucx_perf_context_t *perf, + ucx_perf_result_t* result); + ++#if HAVE_CUDA ++static ucs_status_t ucx_perf_init_cuda_device(ucx_perf_context_t *perf) ++{ ++ cudaError_t cerr; ++ unsigned group_index; ++ int num_gpus; ++ int gpu_index; ++ ++ group_index = rte_call(perf, group_index); ++ ++ cerr = cudaGetDeviceCount(&num_gpus); ++ if (cerr != cudaSuccess) { ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ gpu_index = group_index % num_gpus; ++ ++ cerr = cudaSetDevice(gpu_index); ++ if (cerr != cudaSuccess) { ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ return UCS_OK; ++} ++#endif ++ + ucs_status_t ucx_perf_run(ucx_perf_params_t *params, ucx_perf_result_t *result) + { + ucx_perf_context_t *perf; +@@ -1363,6 +1520,16 @@ ucs_status_t ucx_perf_run(ucx_perf_params_t *params, ucx_perf_result_t *result) + + ucx_perf_test_reset(perf, params); + ++#if HAVE_CUDA ++ if ((params->mem_type == UCT_MD_MEM_TYPE_CUDA) || ++ (params->mem_type == UCT_MD_MEM_TYPE_CUDA_MANAGED)) { ++ status = ucx_perf_init_cuda_device(perf); ++ if (status != UCS_OK) { ++ goto out_free; ++ } ++ } ++#endif ++ + status = ucx_perf_funcs[params->api].setup(perf, params); + if (status != UCS_OK) { + goto out_free; +@@ -1376,13 +1543,13 @@ ucs_status_t ucx_perf_run(ucx_perf_params_t *params, ucx_perf_result_t *result) + goto out_cleanup; + } + +- rte_call(perf, barrier); ++ ucx_perf_funcs[params->api].barrier(perf); + ucx_perf_test_reset(perf, params); + } + + /* Run test */ + status = ucx_perf_funcs[params->api].run(perf); +- rte_call(perf, barrier); ++ ucx_perf_funcs[params->api].barrier(perf); + if (status == UCS_OK) { + ucx_perf_calc_result(perf, result); + rte_call(perf, report, result, perf->params.report_arg, 1); +@@ -1426,7 +1593,7 @@ static void* ucx_perf_thread_run_test(void* arg) + if (params->warmup_iter > 0) { + ucx_perf_set_warmup(perf, params); + statuses[tid] = ucx_perf_funcs[params->api].run(perf); +- rte_call(perf, barrier); ++ ucx_perf_funcs[params->api].barrier(perf); + for (i = 0; i < tctx->ntid; i++) { + if (UCS_OK != statuses[i]) { + goto out; +@@ -1439,7 +1606,7 @@ static void* ucx_perf_thread_run_test(void* arg) + /* Run test */ + #pragma omp barrier + statuses[tid] = ucx_perf_funcs[params->api].run(perf); +- rte_call(perf, barrier); ++ ucx_perf_funcs[params->api].barrier(perf); + for (i = 0; i < tctx->ntid; i++) { + if (UCS_OK != statuses[i]) { + goto out; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.h b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.h +index 9c6853b54..be584bd0c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf.h +@@ -78,8 +78,8 @@ typedef enum { + + enum ucx_perf_test_flags { + UCX_PERF_TEST_FLAG_VALIDATE = UCS_BIT(1), /* Validate data. Affects performance. */ +- UCX_PERF_TEST_FLAG_ONE_SIDED = UCS_BIT(2), /* For test which involve only one side, +- the responder would not call progress(). */ ++ UCX_PERF_TEST_FLAG_ONE_SIDED = UCS_BIT(2), /* For tests which involves only one side, ++ the responder should not call progress(). */ + UCX_PERF_TEST_FLAG_MAP_NONBLOCK = UCS_BIT(3), /* Map memory in non-blocking mode */ + UCX_PERF_TEST_FLAG_TAG_WILDCARD = UCS_BIT(4), /* For tag tests, use wildcard mask */ + UCX_PERF_TEST_FLAG_TAG_UNEXP_PROBE = UCS_BIT(5), /* For tag tests, use probe to get unexpected receive */ +@@ -128,7 +128,8 @@ typedef struct ucx_perf_rte { + unsigned (*group_index)(void *rte_group); + + /* Barrier */ +- void (*barrier)(void *rte_group); ++ void (*barrier)(void *rte_group, void (*progress)(void *arg), ++ void *arg); + + /* Direct modex */ + void (*post_vec)(void *rte_group, const struct iovec *iovec, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf_int.h b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf_int.h +index 77a6bf057..c2ffb6542 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf_int.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/libperf_int.h +@@ -114,6 +114,12 @@ ucs_status_t ucp_perf_test_dispatch(ucx_perf_context_t *perf); + void ucx_perf_calc_result(ucx_perf_context_t *perf, ucx_perf_result_t *result); + + ++void uct_perf_barrier(ucx_perf_context_t *perf); ++ ++ ++void ucp_perf_barrier(ucx_perf_context_t *perf); ++ ++ + static UCS_F_ALWAYS_INLINE int ucx_perf_context_done(ucx_perf_context_t *perf) + { + return ucs_unlikely((perf->current.iters >= perf->max_iter) || +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/perftest.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/perftest.c +index ce83507b9..b770f43a3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/perftest.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/perftest.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #if HAVE_MPI + # include +@@ -76,7 +77,7 @@ struct perftest_context { + sock_rte_group_t sock_rte_group; + }; + +-#define TEST_PARAMS_ARGS "t:n:s:W:O:w:D:i:H:oSCqMr:T:d:x:A:BUm:" ++#define TEST_PARAMS_ARGS "t:n:s:W:O:w:D:i:H:oSCqM:r:T:d:x:A:BUm:" + + + test_type_t tests[] = { +@@ -152,36 +153,53 @@ test_type_t tests[] = { + {NULL} + }; + +-static int safe_send(int sock, void *data, size_t size) ++static int sock_io(int sock, ssize_t (*sock_call)(int, void *, size_t, int), ++ int poll_events, void *data, size_t size, ++ void (*progress)(void *arg), void *arg, const char *name) + { + size_t total = 0; ++ struct pollfd pfd; + int ret; + + while (total < size) { +- ret = send(sock, (char*)data + total, size - total, 0); +- if (ret < 0) { +- ucs_error("send() failed: %m"); ++ pfd.fd = sock; ++ pfd.events = poll_events; ++ pfd.revents = 0; ++ ++ ret = poll(&pfd, 1, 1); /* poll for 1ms */ ++ if (ret > 0) { ++ ucs_assert(ret == 1); ++ ucs_assert(pfd.revents & poll_events); ++ ++ ret = sock_call(sock, (char*)data + total, size - total, 0); ++ if (ret < 0) { ++ ucs_error("%s() failed: %m", name); ++ return -1; ++ } ++ total += ret; ++ } else if ((ret < 0) && (errno != EINTR)) { ++ ucs_error("poll(fd=%d) failed: %m", sock); + return -1; + } +- total += ret; ++ ++ /* progress user context */ ++ if (progress != NULL) { ++ progress(arg); ++ } + } + return 0; + } + +-static int safe_recv(int sock, void *data, size_t size) ++static int safe_send(int sock, void *data, size_t size, ++ void (*progress)(void *arg), void *arg) + { +- size_t total = 0; +- int ret; ++ return sock_io(sock, (void*)send, POLLOUT, data, size, progress, arg, "send"); ++} + +- while (total < size) { +- ret = recv(sock, (char*)data + total, size - total, 0); +- if (ret < 0) { +- ucs_error("recv() failed: %m"); +- return -1; +- } +- total += ret; +- } +- return 0; ++static int safe_recv(int sock, void *data, size_t size, ++ void (*progress)(void *arg), void *arg) ++{ ++ return sock_io(sock, recv, POLLIN, data, size, progress, arg, "recv"); + } + + static void print_progress(char **test_names, unsigned num_names, +@@ -359,6 +377,7 @@ static void usage(const struct perftest_context *ctx, const char *program) + printf(" host - system memory(default)\n"); + #if HAVE_CUDA + printf(" cuda - NVIDIA GPU memory\n"); ++ printf(" cuda-managed - NVIDIA cuda managed/unified memory\n"); + #endif + printf(" -h show this help message\n"); + printf("\n"); +@@ -441,8 +460,8 @@ static ucs_status_t parse_message_sizes_params(const char *optarg, + } + ++token_num; + +- free(params->msg_size_list); /* free previously allocated buffer */ +- params->msg_size_list = malloc(sizeof(*params->msg_size_list) * token_num); ++ params->msg_size_list = realloc(params->msg_size_list, ++ sizeof(*params->msg_size_list) * token_num); + if (NULL == params->msg_size_list) { + return UCS_ERR_NO_MEMORY; + } +@@ -468,6 +487,7 @@ static ucs_status_t parse_message_sizes_params(const char *optarg, + + static void init_test_params(ucx_perf_params_t *params) + { ++ memset(params, 0, sizeof(*params)); + params->api = UCX_PERF_API_LAST; + params->command = UCX_PERF_CMD_LAST; + params->test_type = UCX_PERF_TEST_TYPE_LAST; +@@ -624,12 +644,13 @@ static ucs_status_t parse_test_params(ucx_perf_params_t *params, char opt, const + if (!strcmp(optarg, "host")) { + params->mem_type = UCT_MD_MEM_TYPE_HOST; + return UCS_OK; +- } else if(!strcmp(optarg, "cuda")) { ++ } else if(!strncmp(optarg, "cuda", 4)) { + #if HAVE_CUDA +- params->mem_type = UCT_MD_MEM_TYPE_CUDA; ++ params->mem_type = (!strcmp(optarg, "cuda-managed")) ? ++ UCT_MD_MEM_TYPE_CUDA_MANAGED : UCT_MD_MEM_TYPE_CUDA; + return UCS_OK; + #else +- ucs_error("not build with cuda support"); ++ ucs_error("not built with cuda support"); + return UCS_ERR_INVALID_PARAM; + #endif + } +@@ -639,7 +660,8 @@ static ucs_status_t parse_test_params(ucx_perf_params_t *params, char opt, const + } + } + +-static ucs_status_t read_batch_file(FILE *batch_file, ucx_perf_params_t *params, ++static ucs_status_t read_batch_file(FILE *batch_file, const char *file_name, ++ int *line_num, ucx_perf_params_t *params, + char** test_name_p) + { + #define MAX_SIZE 256 +@@ -655,6 +677,7 @@ static ucs_status_t read_batch_file(FILE *batch_file, ucx_perf_params_t *params, + if (fgets(buf, sizeof(buf) - 1, batch_file) == NULL) { + return UCS_ERR_NO_ELEM; + } ++ ++(*line_num); + + argc = 0; + p = strtok(buf, " \t\n\r"); +@@ -665,13 +688,12 @@ static ucs_status_t read_batch_file(FILE *batch_file, ucx_perf_params_t *params, + argv[argc] = NULL; + } while ((argc == 0) || (argv[0][0] == '#')); + +- + optind = 1; + while ((c = getopt (argc, argv, TEST_PARAMS_ARGS)) != -1) { + status = parse_test_params(params, c, optarg); + if (status != UCS_OK) { +- ucs_error("Invalid argument in batch file: -%c, status(%d):\"%s\"", +- c, status, ucs_status_string(status)); ++ ucs_error("in batch file '%s' line %d: -%c %s: %s", ++ file_name, *line_num, c, optarg, ucs_status_string(status)); + return status; + } + } +@@ -703,7 +725,7 @@ static ucs_status_t parse_opts(struct perftest_context *ctx, int mpi_initialized + break; + case 'b': + if (ctx->num_batch_files < MAX_BATCH_FILES) { +- ctx->batch_files[ctx->num_batch_files++] = strdup(optarg); ++ ctx->batch_files[ctx->num_batch_files++] = optarg; + } + break; + case 'N': +@@ -755,7 +777,8 @@ static unsigned sock_rte_group_index(void *rte_group) + return group->is_server ? 0 : 1; + } + +-static void sock_rte_barrier(void *rte_group) ++static void sock_rte_barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg) + { + #pragma omp master + { +@@ -764,10 +787,10 @@ static void sock_rte_barrier(void *rte_group) + unsigned sync; + + sync = magic; +- safe_send(group->connfd, &sync, sizeof(unsigned)); ++ safe_send(group->connfd, &sync, sizeof(unsigned), progress, arg); + + sync = 0; +- safe_recv(group->connfd, &sync, sizeof(unsigned)); ++ safe_recv(group->connfd, &sync, sizeof(unsigned), progress, arg); + + ucs_assert(sync == magic); + } +@@ -786,9 +809,10 @@ static void sock_rte_post_vec(void *rte_group, const struct iovec *iovec, + size += iovec[i].iov_len; + } + +- safe_send(group->connfd, &size, sizeof(size)); ++ safe_send(group->connfd, &size, sizeof(size), NULL, NULL); + for (i = 0; i < iovcnt; ++i) { +- safe_send(group->connfd, iovec[i].iov_base, iovec[i].iov_len); ++ safe_send(group->connfd, iovec[i].iov_base, iovec[i].iov_len, NULL, ++ NULL); + } + } + +@@ -805,9 +829,9 @@ static void sock_rte_recv(void *rte_group, unsigned src, void *buffer, + } + + ucs_assert_always(src == (1 - group_index)); +- safe_recv(group->connfd, &size, sizeof(size)); ++ safe_recv(group->connfd, &size, sizeof(size), NULL, NULL); + ucs_assert_always(size <= max); +- safe_recv(group->connfd, buffer, size); ++ safe_recv(group->connfd, buffer, size, NULL, NULL); + } + + static void sock_rte_report(void *rte_group, const ucx_perf_result_t *result, +@@ -882,7 +906,7 @@ static ucs_status_t setup_sock_rte(struct perftest_context *ctx) + } + + close(sockfd); +- safe_recv(connfd, &ctx->params, sizeof(ctx->params)); ++ safe_recv(connfd, &ctx->params, sizeof(ctx->params), NULL, NULL); + if (ctx->params.msg_size_cnt) { + ctx->params.msg_size_list = malloc(sizeof(*ctx->params.msg_size_list) * + ctx->params.msg_size_cnt); +@@ -891,7 +915,8 @@ static ucs_status_t setup_sock_rte(struct perftest_context *ctx) + goto err_close_connfd; + } + safe_recv(connfd, ctx->params.msg_size_list, +- sizeof(*ctx->params.msg_size_list) * ctx->params.msg_size_cnt); ++ sizeof(*ctx->params.msg_size_list) * ctx->params.msg_size_cnt, ++ NULL, NULL); + } + + ctx->sock_rte_group.connfd = connfd; +@@ -918,10 +943,11 @@ static ucs_status_t setup_sock_rte(struct perftest_context *ctx) + goto err_close_sockfd; + } + +- safe_send(sockfd, &ctx->params, sizeof(ctx->params)); ++ safe_send(sockfd, &ctx->params, sizeof(ctx->params), NULL, NULL); + if (ctx->params.msg_size_cnt) { + safe_send(sockfd, ctx->params.msg_size_list, +- sizeof(*ctx->params.msg_size_list) * ctx->params.msg_size_cnt); ++ sizeof(*ctx->params.msg_size_list) * ctx->params.msg_size_cnt, ++ NULL, NULL); + } + + ctx->sock_rte_group.connfd = sockfd; +@@ -969,10 +995,67 @@ static unsigned mpi_rte_group_index(void *rte_group) + return rank; + } + +-static void mpi_rte_barrier(void *rte_group) ++static void mpi_rte_barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg) + { ++ int group_size, my_rank, i; ++ MPI_Request *reqs; ++ int nreqs = 0; ++ int dummy; ++ int flag; ++ + #pragma omp master +- MPI_Barrier(MPI_COMM_WORLD); ++ ++ /* ++ * Naive non-blocking barrier implementation over send/recv, to call user ++ * progress while waiting for completion. ++ * Not using MPI_Ibarrier to be compatible with MPI-1. ++ */ ++ ++ MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); ++ MPI_Comm_size(MPI_COMM_WORLD, &group_size); ++ ++ /* allocate maximal possible number of requests */ ++ reqs = (MPI_Request*)alloca(sizeof(*reqs) * group_size); ++ ++ if (my_rank == 0) { ++ /* root gathers "ping" from all other ranks */ ++ for (i = 1; i < group_size; ++i) { ++ MPI_Irecv(&dummy, 0, MPI_INT, ++ i /* source */, ++ 1 /* tag */, ++ MPI_COMM_WORLD, ++ &reqs[nreqs++]); ++ } ++ } else { ++ /* every non-root rank sends "ping" and waits for "pong" */ ++ MPI_Send(&dummy, 0, MPI_INT, ++ 0 /* dest */, ++ 1 /* tag */, ++ MPI_COMM_WORLD); ++ MPI_Irecv(&dummy, 0, MPI_INT, ++ 0 /* source */, ++ 2 /* tag */, ++ MPI_COMM_WORLD, ++ &reqs[nreqs++]); ++ } ++ ++ /* Waiting for receive requests */ ++ do { ++ MPI_Testall(nreqs, reqs, &flag, MPI_STATUSES_IGNORE); ++ progress(arg); ++ } while (!flag); ++ ++ if (my_rank == 0) { ++ /* root sends "pong" to all ranks */ ++ for (i = 1; i < group_size; ++i) { ++ MPI_Send(&dummy, 0, MPI_INT, ++ i /* dest */, ++ 2 /* tag */, ++ MPI_COMM_WORLD); ++ } ++ } ++ + #pragma omp barrier + } + +@@ -1054,7 +1137,8 @@ static unsigned ext_rte_group_index(void *rte_group) + return rte_group_rank(group); + } + +-static void ext_rte_barrier(void *rte_group) ++static void ext_rte_barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg) + { + #pragma omp master + { +@@ -1255,6 +1339,16 @@ static ucs_status_t check_system(struct perftest_context *ctx) + return UCS_OK; + } + ++static void clone_params(ucx_perf_params_t *dest, const ucx_perf_params_t *src) ++{ ++ size_t msg_size_list_size; ++ ++ *dest = *src; ++ msg_size_list_size = dest->msg_size_cnt * sizeof(*dest->msg_size_list); ++ dest->msg_size_list = malloc(msg_size_list_size); ++ memcpy(dest->msg_size_list, src->msg_size_list, msg_size_list_size); ++} ++ + static ucs_status_t run_test_recurs(struct perftest_context *ctx, + ucx_perf_params_t *parent_params, + unsigned depth) +@@ -1263,6 +1357,7 @@ static ucs_status_t run_test_recurs(struct perftest_context *ctx, + ucx_perf_result_t result; + ucs_status_t status; + FILE *batch_file; ++ int line_num; + + ucs_trace_func("depth=%u, num_files=%u", depth, ctx->num_batch_files); + +@@ -1277,17 +1372,19 @@ static ucs_status_t run_test_recurs(struct perftest_context *ctx, + return UCS_ERR_IO_ERROR; + } + +- params = *parent_params; +- while ((status = read_batch_file(batch_file, ¶ms, &ctx->test_names[depth])) == UCS_OK) { ++ clone_params(¶ms, parent_params); ++ line_num = 0; ++ while ((status = read_batch_file(batch_file, ctx->batch_files[depth], ++ &line_num, ¶ms, ++ &ctx->test_names[depth])) == UCS_OK) { + status = run_test_recurs(ctx, ¶ms, depth + 1); ++ free(params.msg_size_list); + free(ctx->test_names[depth]); +- if ((NULL == parent_params->msg_size_list) && +- (NULL != params.msg_size_list)) { +- free(params.msg_size_list); +- params.msg_size_list = NULL; +- } +- params = *parent_params; ++ ctx->test_names[depth] = NULL; ++ ++ clone_params(¶ms, parent_params); + } ++ free(params.msg_size_list); + + fclose(batch_file); + return UCS_OK; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/ucp_tests.cc b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/ucp_tests.cc +index 7c06af6f2..c048dedcd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/ucp_tests.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/ucp_tests.cc +@@ -80,7 +80,9 @@ public: + } + + void UCS_F_ALWAYS_INLINE progress_responder() { +- if (!(FLAGS & UCX_PERF_TEST_FLAG_ONE_SIDED)) { ++ if (!(FLAGS & UCX_PERF_TEST_FLAG_ONE_SIDED) && ++ !(m_perf.params.flags & UCX_PERF_TEST_FLAG_ONE_SIDED)) ++ { + ucp_worker_progress(m_perf.ucp.worker); + } + } +@@ -293,13 +295,14 @@ public: + + if (m_perf.params.mem_type == UCT_MD_MEM_TYPE_HOST) { + *((volatile uint8_t*)m_perf.recv_buffer + length - 1) = -1; +- } else if (m_perf.params.mem_type == UCT_MD_MEM_TYPE_CUDA) { ++ } else if ((m_perf.params.mem_type == UCT_MD_MEM_TYPE_CUDA) || ++ (m_perf.params.mem_type == UCT_MD_MEM_TYPE_CUDA_MANAGED)) { + #if HAVE_CUDA + cudaMemset(((uint8_t*)m_perf.recv_buffer + length - 1), -1, 1); + #endif + } + +- rte_call(&m_perf, barrier); ++ ucp_perf_barrier(&m_perf); + + my_index = rte_call(&m_perf, group_index); + +@@ -339,7 +342,7 @@ public: + + wait_window(m_max_outstanding); + ucp_worker_flush(m_perf.ucp.worker); +- rte_call(&m_perf, barrier); ++ ucp_perf_barrier(&m_perf); + return UCS_OK; + } + +@@ -360,7 +363,7 @@ public: + + ucp_perf_test_prepare_iov_buffers(); + +- rte_call(&m_perf, barrier); ++ ucp_perf_barrier(&m_perf); + + my_index = rte_call(&m_perf, group_index); + +@@ -404,7 +407,7 @@ public: + ucx_perf_update(&m_perf, 0, 0); + } + +- rte_call(&m_perf, barrier); ++ ucp_perf_barrier(&m_perf); + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/uct_tests.cc b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/uct_tests.cc +index 59a452452..7bdd235e5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/uct_tests.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/perf/uct_tests.cc +@@ -37,15 +37,19 @@ public: + uct_iface_attr_t attr; + status = uct_iface_query(m_perf.uct.iface, &attr); + ucs_assert_always(status == UCS_OK); +- if (attr.cap.flags & (UCT_IFACE_FLAG_AM_SHORT|UCT_IFACE_FLAG_AM_BCOPY|UCT_IFACE_FLAG_AM_ZCOPY)) { +- status = uct_iface_set_am_handler(m_perf.uct.iface, UCT_PERF_TEST_AM_ID, +- am_hander, m_perf.recv_buffer, UCT_CB_FLAG_SYNC); ++ if (attr.cap.flags & (UCT_IFACE_FLAG_AM_SHORT | ++ UCT_IFACE_FLAG_AM_BCOPY | ++ UCT_IFACE_FLAG_AM_ZCOPY)) { ++ status = uct_iface_set_am_handler(m_perf.uct.iface, ++ UCT_PERF_TEST_AM_ID, am_hander, ++ m_perf.recv_buffer, 0); + ucs_assert_always(status == UCS_OK); + } + } + + ~uct_perf_test_runner() { +- uct_iface_set_am_handler(m_perf.uct.iface, UCT_PERF_TEST_AM_ID, NULL, NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_perf.uct.iface, UCT_PERF_TEST_AM_ID, NULL, ++ NULL, 0); + } + + /** +@@ -213,29 +217,29 @@ public: + } + case UCX_PERF_CMD_ADD: + if (length == sizeof(uint32_t)) { +- return uct_ep_atomic_add32(ep, sn - prev_sn, remote_addr, rkey); ++ return uct_ep_atomic32_post(ep, UCT_ATOMIC_OP_ADD, sn - prev_sn, remote_addr, rkey); + } else if (length == sizeof(uint64_t)) { +- return uct_ep_atomic_add64(ep, sn - prev_sn, remote_addr, rkey); ++ return uct_ep_atomic64_post(ep, UCT_ATOMIC_OP_ADD, sn - prev_sn, remote_addr, rkey); + } else { + return UCS_ERR_INVALID_PARAM; + } + case UCX_PERF_CMD_FADD: + if (length == sizeof(uint32_t)) { +- return uct_ep_atomic_fadd32(ep, sn - prev_sn, remote_addr, rkey, +- (uint32_t*)buffer, comp); ++ return uct_ep_atomic32_fetch(ep, UCT_ATOMIC_OP_ADD, sn - prev_sn, ++ (uint32_t*)buffer, remote_addr, rkey, comp); + } else if (length == sizeof(uint64_t)) { +- return uct_ep_atomic_fadd64(ep, sn - prev_sn, remote_addr, rkey, +- (uint64_t*)buffer, comp); ++ return uct_ep_atomic64_fetch(ep, UCT_ATOMIC_OP_ADD, sn - prev_sn, ++ (uint64_t*)buffer, remote_addr, rkey, comp); + } else { + return UCS_ERR_INVALID_PARAM; + } + case UCX_PERF_CMD_SWAP: + if (length == sizeof(uint32_t)) { +- return uct_ep_atomic_swap32(ep, sn, remote_addr, rkey, +- (uint32_t*)buffer, comp); ++ return uct_ep_atomic32_fetch(ep, UCT_ATOMIC_OP_SWAP, sn, ++ (uint32_t*)buffer, remote_addr, rkey, comp); + } else if (length == sizeof(uint64_t)) { +- return uct_ep_atomic_swap64(ep, sn, remote_addr, rkey, +- (uint64_t*)buffer, comp); ++ return uct_ep_atomic64_fetch(ep, UCT_ATOMIC_OP_SWAP, sn, ++ (uint64_t*)buffer, remote_addr, rkey, comp); + } else { + return UCS_ERR_INVALID_PARAM; + } +@@ -312,7 +316,7 @@ public: + uct_perf_test_prepare_iov_buffer(); + + *recv_sn = -1; +- rte_call(&m_perf, barrier); ++ uct_perf_barrier(&m_perf); + + my_index = rte_call(&m_perf, group_index); + +@@ -376,7 +380,7 @@ public: + (psn_t*)m_perf.send_buffer; + my_index = rte_call(&m_perf, group_index); + +- rte_call(&m_perf, barrier); ++ uct_perf_barrier(&m_perf); + + ucx_perf_test_start_clock(&m_perf); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/tools/profile/read_profile.c b/src/mpid/ch4/netmod/ucx/ucx/src/tools/profile/read_profile.c +index 5f428dec1..53e142c70 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/tools/profile/read_profile.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/tools/profile/read_profile.c +@@ -4,7 +4,7 @@ + * See file LICENSE for terms. + */ + +-#include ++#include + #include + + #include +@@ -455,6 +455,19 @@ static int show_profile_data(profile_data_t *data, options_t *opts) + return 0; + } + ++static void usage() ++{ ++ printf("Usage: ucx_read_profile [options] [profile-file]\n"); ++ printf("Options are:\n"); ++ printf(" -r Show raw output\n"); ++ printf(" -t Select time units to use:\n"); ++ printf(" sec - seconds\n"); ++ printf(" msec - milliseconds\n"); ++ printf(" usec - microseconds (default)\n"); ++ printf(" nsec - nanoseconds\n"); ++ printf(" -h Show this help message\n"); ++} ++ + int parse_args(int argc, char **argv, options_t *opts) + { + int c; +@@ -481,12 +494,17 @@ int parse_args(int argc, char **argv, options_t *opts) + } + break; + case 'h': ++ usage(); ++ return -127; + default: ++ usage(); + return -1; + } + } + + if (optind >= argc) { ++ printf("Error: missing profile file argument\n"); ++ usage(); + return -1; + } + +@@ -500,13 +518,9 @@ int main(int argc, char **argv) + options_t opts; + int ret; + +- if (parse_args(argc, argv, &opts) < 0) { +- printf("Usage: %s [options] \n", basename(argv[0])); +- printf("Options:\n"); +- printf(" -r raw output\n"); +- printf(" -t UNITS select time units (sec/msec/usec/nsec)\n"); +- printf("\n"); +- return -1; ++ ret = parse_args(argc, argv, &opts); ++ if (ret < 0) { ++ return (ret == -127) ? 0 : ret; + } + + if (read_profile_data(opts.filename, &data) < 0) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/Makefile.am +index 0a0b33705..d0ba1b74b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/Makefile.am +@@ -34,21 +34,33 @@ noinst_HEADERS = \ + malloc/malloc_hook.h \ + malloc/allocator.h \ + mmap/mmap.h \ +- util/ucm_config.h \ + util/replace.h \ + util/log.h \ + util/reloc.h \ +- util/sys.h ++ util/sys.h \ ++ bistro/bistro_int.h \ ++ bistro/bistro.h \ ++ bistro/bistro_x86_64.h \ ++ bistro/bistro_aarch64.h \ ++ bistro/bistro_ppc64.h ++ ++if HAVE_CUDA ++noinst_HEADERS += \ ++ cuda/cudamem.h ++endif + + libucm_la_SOURCES = \ + event/event.c \ + malloc/malloc_hook.c \ + mmap/install.c \ + util/replace.c \ +- util/ucm_config.c \ + util/log.c \ + util/reloc.c \ +- util/sys.c ++ util/sys.c \ ++ bistro/bistro.c \ ++ bistro/bistro_x86_64.c \ ++ bistro/bistro_aarch64.c \ ++ bistro/bistro_ppc64.c + + if HAVE_CUDA + libucm_la_SOURCES += \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/api/ucm.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/api/ucm.h +index 0b024e3d2..9d41118e3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/api/ucm.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/api/ucm.h +@@ -32,16 +32,40 @@ typedef enum ucm_event_type { + UCM_EVENT_SHMAT = UCS_BIT(3), + UCM_EVENT_SHMDT = UCS_BIT(4), + UCM_EVENT_SBRK = UCS_BIT(5), ++ UCM_EVENT_MADVISE = UCS_BIT(6), + + /* Aggregate events */ + UCM_EVENT_VM_MAPPED = UCS_BIT(16), + UCM_EVENT_VM_UNMAPPED = UCS_BIT(17), + ++ /* Non-accessible memory alloc/free events */ ++ UCM_EVENT_MEM_TYPE_ALLOC = UCS_BIT(20), ++ UCM_EVENT_MEM_TYPE_FREE = UCS_BIT(21), ++ + /* Auxiliary flags */ + UCM_EVENT_FLAG_NO_INSTALL = UCS_BIT(24) + + } ucm_event_type_t; + ++/** ++ * @brief Memory types for alloc and free events ++ */ ++typedef enum ucm_mem_type { ++ /*cuda memory */ ++ UCM_MEM_TYPE_CUDA = UCS_BIT(0), ++ UCM_MEM_TYPE_CUDA_MANAGED = UCS_BIT(1) ++} ucm_mem_type_t; ++ ++ ++/** ++ * @brief MMAP hook modes ++ */ ++typedef enum ucm_mmap_hook_mode { ++ UCM_MMAP_HOOK_NONE, ++ UCM_MMAP_HOOK_RELOC, ++ UCM_MMAP_HOOK_BISTRO, ++ UCM_MMAP_HOOK_LAST ++} ucm_mmap_hook_mode_t; + + /** + * @brief Memory event parameters and result. +@@ -113,6 +137,17 @@ typedef union ucm_event { + intptr_t increment; + } sbrk; + ++ /* ++ * UCM_EVENT_MADVISE ++ * madvise() is called. ++ */ ++ struct { ++ int result; ++ void *addr; ++ size_t length; ++ int advice; ++ } madvise; ++ + /* + * UCM_EVENT_VM_MAPPED, UCM_EVENT_VM_UNMAPPED + * +@@ -128,9 +163,39 @@ typedef union ucm_event { + size_t size; + } vm_mapped, vm_unmapped; + ++ /* ++ * memory type allocation and deallocation event ++ */ ++ struct { ++ void *address; ++ size_t size; ++ ucm_mem_type_t mem_type; ++ } mem_type; ++ + } ucm_event_t; + + ++/** ++ * @brief Global UCM configuration. ++ * ++ * Can be safely modified before using UCM functions. ++ */ ++typedef struct ucm_global_config { ++ ucs_log_level_t log_level; /* Logging level */ ++ int enable_events; /* Enable memory events */ ++ ucm_mmap_hook_mode_t mmap_hook_mode; /* MMAP hook mode */ ++ int enable_malloc_hooks; /* Enable installing malloc hooks */ ++ int enable_malloc_reloc; /* Enable installing malloc relocations */ ++ int enable_cuda_reloc; /* Enable installing CUDA relocations */ ++ int enable_dynamic_mmap_thresh; /* Enable adaptive mmap threshold */ ++ size_t alloc_alignment; /* Alignment for memory allocations */ ++} ucm_global_config_t; ++ ++ ++/* Global UCM configuration */ ++extern ucm_global_config_t ucm_global_opts; ++ ++ + /** + * @brief Memory event callback. + * +@@ -169,27 +234,6 @@ typedef void (*ucm_event_callback_t)(ucm_event_type_t event_type, + ucm_event_t *event, void *arg); + + +- +-/** +- * @brief Print UCM global configuration to a stream. +- * +- * @param [in] stream Output stream to print to. +- * @param [in] print_flags Controls how the configuration is printed. +- */ +-void ucm_config_print(FILE *stream, ucs_config_print_flags_t print_flags); +- +- +-/** +- * @brief Modify UCM global configuration. +- * +- * @param [in] name Configuration variable name. +- * @param [in] value Value to set. +- * +- * @return Error code. +- */ +-ucs_status_t ucm_config_modify(const char *name, const char *value); +- +- + /** + * @brief Install a handler for memory events. + * +@@ -297,6 +341,18 @@ int ucm_orig_shmdt(const void *shmaddr); + void *ucm_orig_sbrk(intptr_t increment); + + ++/** ++ * @brief Call the original implementation of @ref brk without triggering events. ++ */ ++int ucm_orig_brk(void *addr); ++ ++ ++/** ++ * @brief Call the original implementation of @ref madvise without triggering events. ++ */ ++int ucm_orig_madvise(void *addr, size_t length, int advice); ++ ++ + /** + * @brief Call the original implementation of @ref mmap and all handlers + * associated with it. +@@ -352,6 +408,20 @@ int ucm_shmdt(const void *shmaddr); + void *ucm_sbrk(intptr_t increment); + + ++/** ++ * @brief Call the original implementation of @ref brk and all handlers ++ * associated with it. ++ */ ++int ucm_brk(void *addr); ++ ++ ++/** ++ * @brief Call the original implementation of @ref ucm_madvise and all handlers ++ * associated with it. ++ */ ++int ucm_madvise(void *addr, size_t length, int advice); ++ ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.c +new file mode 100644 +index 000000000..79bdbecb7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.c +@@ -0,0 +1,106 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#include ++#include ++ ++#include ++#include ++ ++ucs_status_t ucm_bistro_remove_restore_point(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_assert(rp != NULL); ++ free(rp); ++ return UCS_OK; ++} ++ ++static void *ucm_bistro_page_align_ptr(void *ptr) ++{ ++ return (void*)ucs_align_down((uintptr_t)ptr, ucm_get_page_size()); ++} ++ ++static ucs_status_t ucm_bistro_protect(void *addr, size_t len, int prot) ++{ ++ void *aligned = ucm_bistro_page_align_ptr(addr); ++ size_t size = addr - aligned + len; ++ int res; ++ ++ res = mprotect(aligned, size, prot) ? UCS_ERR_INVALID_PARAM : UCS_OK; ++ if (res) { ++ ucm_error("Failed to change page protection: %m"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ return UCS_OK; ++} ++ ++ucs_status_t ucm_bistro_apply_patch(void *dst, void *patch, size_t len) ++{ ++ ucs_status_t status; ++ ++ status = ucm_bistro_protect(dst, len, UCM_PROT_READ_WRITE_EXEC); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ memcpy(dst, patch, len); ++ ++ status = ucm_bistro_protect(dst, len, UCM_PROT_READ_EXEC); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ ucs_clear_cache(dst, dst + len); ++ } ++ return status; ++} ++ ++#if defined(__x86_64__) || defined (__aarch64__) ++struct ucm_bistro_restore_point { ++ void *addr; /* address of function to restore */ ++ ucm_bistro_patch_t patch; /* original function body */ ++}; ++ ++ucs_status_t ucm_bistro_create_restore_point(void *addr, ucm_bistro_restore_point_t **rp) ++{ ++ ucm_bistro_restore_point_t *point; ++ ++ if (rp == NULL) { ++ /* restore point is not required */ ++ return UCS_OK; ++ } ++ ++ point = malloc(sizeof(*point)); ++ if (!point) { ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ point->addr = addr; ++ point->patch = *(ucm_bistro_patch_t*)addr; ++ *rp = point; ++ return UCS_OK; ++} ++ ++ucs_status_t ucm_bistro_restore(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_status_t status; ++ ++ status = ucm_bistro_apply_patch(rp->addr, &rp->patch, sizeof(rp->patch)); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ ucm_bistro_remove_restore_point(rp); ++ } ++ ++ return status; ++} ++ ++void *ucm_bistro_restore_addr(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_assert(rp != NULL); ++ return rp->addr; ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.h +new file mode 100644 +index 000000000..16e988700 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro.h +@@ -0,0 +1,58 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++ ++#ifndef UCM_BISTRO_BISTRO_H_ ++#define UCM_BISTRO_BISTRO_H_ ++ ++#include ++ ++#include ++ ++typedef struct ucm_bistro_restore_point ucm_bistro_restore_point_t; ++ ++#if defined(__powerpc64__) ++# include "bistro_ppc64.h" ++#elif defined(__aarch64__) ++# include "bistro_aarch64.h" ++#elif defined(__x86_64__) ++# include "bistro_x86_64.h" ++#else ++# error "Unsupported architecture" ++#endif ++ ++ ++/** ++ * Restore original function body using restore point created ++ * by @ref ucm_bistro_patch ++ * ++ * @param rp restore point, is removed after success operation ++ * completed ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucm_bistro_restore(ucm_bistro_restore_point_t *rp); ++ ++/** ++ * Remove resore point created by @ref ucm_bistro_patch witout ++ * restore original function body ++ * ++ * @param rp restore point ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucm_bistro_remove_restore_point(ucm_bistro_restore_point_t *rp); ++ ++/** ++ * Get patch address for restore point ++ * ++ * @param rp restore point ++ * ++ * @return Address of patched function body ++ */ ++void *ucm_bistro_restore_addr(ucm_bistro_restore_point_t *rp); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.c +new file mode 100644 +index 000000000..2cf09272f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.c +@@ -0,0 +1,86 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++/* ******************************************************* ++ * ARM processors family * ++ * ***************************************************** */ ++#if defined(__aarch64__) ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++/* Register number used to store indirect jump address. ++ * r15 is the highest numbered temporary register, assuming this one is safe ++ * to use. */ ++#define R15 15 ++ ++#define _MOV(_reg, _shift, _val, _opcode) \ ++ (((_opcode) << 23) + ((uint32_t)(_shift) << 21) + ((uint32_t)((_val) & 0xffff) << 5) + (_reg)) ++ ++/** ++ * @brief Generate a mov immediate instruction ++ * ++ * @param[in] _reg register number (0-31) ++ * @param[in] _shift shift amount (0-3) * 16-bits ++ * @param[in] _value immediate value ++ */ ++#define MOVZ(_reg, _shift, _val) _MOV(_reg, _shift, _val, 0x1a5) ++ ++/** ++ * @brief Generate a mov immediate with keep instruction ++ * ++ * @param[in] _reg register number (0-31) ++ * @param[in] _shift shift amount (0-3) * 16-bits ++ * @param[in] _value immediate value ++ */ ++#define MOVK(_reg, _shift, _val) _MOV(_reg, _shift, _val, 0x1e5) ++ ++/** ++ * @brief Branch to address stored in register ++ * ++ * @param[in] _reg register number (0-31) ++ */ ++#define BR(_reg) ((0xd61f << 16) + ((_reg) << 5)) ++ ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp) ++{ ++ void *func; ++ ucs_status_t status; ++ ++ ucm_bistro_patch_t patch = { ++ .reg3 = MOVZ(R15, 3, (uintptr_t)hook >> 48), ++ .reg2 = MOVK(R15, 2, (uintptr_t)hook >> 32), ++ .reg1 = MOVK(R15, 1, (uintptr_t)hook >> 16), ++ .reg0 = MOVK(R15, 0, (uintptr_t)hook), ++ .br = BR(R15) ++ }; ++ ++ UCM_LOOKUP_SYMBOL(func, symbol); ++ ++ status = ucm_bistro_create_restore_point(func, rp); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ return ucm_bistro_apply_patch(func, &patch, sizeof(patch)); ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.h +new file mode 100644 +index 000000000..487aa923d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_aarch64.h +@@ -0,0 +1,41 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++ ++#ifndef UCM_BISTRO_BISTRO_AARCH64_H_ ++#define UCM_BISTRO_BISTRO_AARCH64_H_ ++ ++#include ++ ++#include ++#include ++ ++#define UCM_BISTRO_PROLOGUE ++#define UCM_BISTRO_EPILOGUE ++ ++typedef struct ucm_bistro_patch { ++ uint32_t reg3; /* movz x15, addr, lsl #48 */ ++ uint32_t reg2; /* movk x15, addr, lsl #32 */ ++ uint32_t reg1; /* movk x15, addr, lsl #16 */ ++ uint32_t reg0; /* movk x15, addr */ ++ uint32_t br; /* br x15 */ ++} UCS_S_PACKED ucm_bistro_patch_t; ++ ++/** ++ * Set library function call hook using Binary Instrumentation ++ * method (BISTRO): replace function body by user defined call ++ * ++ * @param symbol function name to replace ++ * @param hook user-defined function-replacer ++ * @param rp restore point used to restore original function, ++ * optional, may be NULL ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_int.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_int.h +new file mode 100644 +index 000000000..40c80d56b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_int.h +@@ -0,0 +1,48 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCM_BISTRO_BISTRO_INT_H_ ++#define UCM_BISTRO_BISTRO_INT_H_ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define UCM_PROT_READ_WRITE_EXEC (PROT_READ | PROT_WRITE | PROT_EXEC) ++#define UCM_PROT_READ_EXEC (PROT_READ | PROT_EXEC) ++ ++#define UCM_LOOKUP_SYMBOL(_func, _symbol) \ ++ _func = ucm_bistro_lookup(_symbol); \ ++ if (!_func) { \ ++ return UCS_ERR_NO_ELEM; \ ++ } ++ ++ucs_status_t ucm_bistro_apply_patch(void *dst, void *patch, size_t len); ++ ++ucs_status_t ucm_bistro_create_restore_point(void *addr, ucm_bistro_restore_point_t **rp); ++ ++static inline void *ucm_bistro_lookup(const char *symbol) ++{ ++ void *addr; ++ ++ ucs_assert(symbol != NULL); ++ ++ addr = dlsym(RTLD_NEXT, symbol); ++ if (!addr) { ++ addr = dlsym(RTLD_DEFAULT, symbol); ++ } ++ return addr; ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.c +new file mode 100644 +index 000000000..4b14250cd +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.c +@@ -0,0 +1,209 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++/* ******************************************************* ++ * POWER-PC processors family * ++ * ***************************************************** */ ++#if defined (__powerpc64__) ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* PowerPC instructions used in patching */ ++/* Reference: "PowerPC User Instruction Set Architecture" */ ++ ++/* Use r11 register for jump address */ ++#define R11 11 ++ ++#define OPCODE(_rt, _rs, _op) \ ++ (((_op) << 26) + ((_rt) << 21) + ((_rs) << 16)) ++ ++#define OP0(_rt, _rs, _ui, _op) \ ++ (OPCODE(_rt, _rs, _op) + ((_ui) & 0xffff)) ++ ++#define MTSPR(_spr, _rs) \ ++ (OPCODE(_rs, (_spr) & 0x1f, 31) + (((_spr) & ~UCS_MASK(5)) << 6) + (467 << 1)) ++ ++#define BCCTR(_bo, _bi, _bh) \ ++ (OPCODE(_bo, _bi, 19) + ((_bh) << 11) + (528<<1)) ++ ++#define RLDICR(_rt, _rs, _sh, _mb) \ ++ (OPCODE(_rs, _rt, 30) + (((_sh) & UCS_MASK(5)) << 11) + ((_sh & ~UCS_MASK(5)) >> 4) + \ ++ (((_mb) & UCS_MASK(5)) << 6) + ((_mb) && ~UCS_MASK(5)) + UCS_BIT(2)) ++ ++#define ADDIS(_rt, _rs, _ui) OP0(_rt, _rs, _ui, 15) ++#define ORI(_rt, _rs, _ui) OP0(_rs, _rt, _ui, 24) ++#define ORIS(_rt, _rs, _ui) OP0(_rs, _rt, _ui, 25) ++ ++typedef struct ucm_bistro_base_patch { ++ uint32_t addis; /* lis r11,(addr >> 48) */ ++ uint32_t ori1; /* ori r11,r11,(addr >> 32) */ ++ uint32_t rldicr; /* rldicr r11,r11,32,31 */ ++ uint32_t oris; /* oris r11,r11,(addr >> 16) */ ++ uint32_t ori2; /* ori r11,r11,addr */ ++} UCS_S_PACKED ucm_bistro_base_patch_t; ++ ++typedef struct ucm_bistro_patch { ++ ucm_bistro_base_patch_t super; ++ uint32_t mtspr; /* mtspr r11 */ ++ uint32_t bcctr; /* bcctr */ ++} UCS_S_PACKED ucm_bistro_patch_t; ++ ++struct ucm_bistro_restore_point { ++ void *entry; ++ void *hook; ++ ucm_bistro_base_patch_t hook_patch; ++ void *func; ++ ucm_bistro_patch_t func_patch; ++}; ++ ++static void ucm_bistro_fill_base_patch(ucm_bistro_base_patch_t *patch, ++ uint32_t reg, uintptr_t value) ++{ ++ ucs_assert(patch != NULL); ++ ++ patch->addis = ADDIS ( reg, 0, (value >> 48)); ++ patch->ori1 = ORI ( reg, reg, (value >> 32)); ++ patch->rldicr = RLDICR( reg, reg, 32, 31); ++ patch->oris = ORIS ( reg, reg, (value >> 16)); ++ patch->ori2 = ORI ( reg, reg, (value >> 0)); ++} ++ ++static void ucm_bistro_fill_patch(ucm_bistro_patch_t *patch, ++ uint32_t reg, uintptr_t value) ++{ ++ ucs_assert(patch != NULL); ++ ++ ucm_bistro_fill_base_patch(&patch->super, reg, value); ++ ++ patch->mtspr = MTSPR(9, reg); /* 9 = CTR */ ++ patch->bcctr = BCCTR(20, 0, 0); /* 20 = always */ ++} ++ ++static ucs_status_t ucm_bistro_patch_hook(void *hook, ucm_bistro_restore_point_t *rp, ++ uint64_t toc) ++{ ++ const uint32_t nop = 0x60000000; ++ uint32_t *toc_ptr; ++ ucm_bistro_base_patch_t *toc_patch; ++ ucm_bistro_base_patch_t patch; ++ ++ /* locate reserved code space in hook function */ ++ for (toc_ptr = hook;; toc_ptr++) { ++ toc_patch = (ucm_bistro_base_patch_t*)toc_ptr; ++ if ((toc_patch->addis == nop) && ++ (toc_patch->ori1 == nop) && ++ (toc_patch->rldicr == nop) && ++ (toc_patch->oris == nop) && ++ (toc_patch->ori2 == nop)) { ++ break; ++ } ++ } ++ ++ if (rp) { ++ rp->hook = toc_ptr; ++ rp->hook_patch = *toc_patch; ++ } ++ ++ ucm_bistro_fill_base_patch(&patch, 2, toc); ++ return ucm_bistro_apply_patch(toc_ptr, &patch, sizeof(patch)); ++} ++ ++static void *ucm_bistro_get_text_addr(void *addr) ++{ ++#if !defined (_CALL_ELF) || (_CALL_ELF != 2) ++ return addr ? *(void**)addr : 0; ++#else ++ return addr; ++#endif ++} ++ ++ucs_status_t ucm_bistro_patch_toc(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp, ++ uint64_t toc) ++{ ++ ucs_status_t status; ++ void *func; ++ ucm_bistro_restore_point_t restore; ++ ucm_bistro_patch_t patch; ++ ++ UCM_LOOKUP_SYMBOL(func, symbol); ++ ++ restore.entry = func; ++ ++ func = ucm_bistro_get_text_addr(func); ++ hook = ucm_bistro_get_text_addr(hook); ++ ++ status = ucm_bistro_patch_hook(hook, &restore, toc); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++#if defined(_CALL_ELF) && (_CALL_ELF == 2) ++ func += 8; ++ hook += 8; ++#endif ++ ++ ucm_bistro_fill_patch(&patch, R11, (uintptr_t)hook); ++ ++ restore.func = func; ++ restore.func_patch = *(ucm_bistro_patch_t*)func; ++ ++ status = ucm_bistro_apply_patch(func, &patch, sizeof(patch)); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ if (rp) { ++ *rp = malloc(sizeof(restore)); ++ if (!(*rp)) { ++ return UCS_ERR_NO_MEMORY; ++ } ++ **rp = restore; ++ } ++ ++ return UCS_OK; ++} ++ ++ucs_status_t ucm_bistro_restore(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_status_t status; ++ ++ ucs_assert(rp != NULL); ++ ++ status = ucm_bistro_apply_patch(rp->func, &rp->func_patch, sizeof(rp->func_patch)); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ status = ucm_bistro_apply_patch(rp->hook, &rp->hook_patch, sizeof(rp->hook_patch)); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ ucm_bistro_remove_restore_point(rp); ++ } ++ ++ return status; ++} ++ ++void *ucm_bistro_restore_addr(ucm_bistro_restore_point_t *rp) ++{ ++ ucs_assert(rp != NULL); ++ return rp->entry; ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.h +new file mode 100644 +index 000000000..7b5c3b46e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_ppc64.h +@@ -0,0 +1,51 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++ ++#ifndef UCM_BISTRO_BISTRO_PPC64_H_ ++#define UCM_BISTRO_BISTRO_PPC64_H_ ++ ++#include ++ ++#include ++ ++/* special processing for ppc64 to save and restore TOC (r2) ++ * Reference: "64-bit PowerPC ELF Application Binary Interface Supplement 1.9" */ ++#define UCM_BISTRO_PROLOGUE \ ++ uint64_t toc_save; \ ++ asm volatile ("std 2, %0" : "=m" (toc_save)); \ ++ asm volatile ("nop; nop; nop; nop; nop"); ++#define UCM_BISTRO_EPILOGUE \ ++ asm volatile ("ld 2, %0" : : "m" (toc_save)); ++ ++ ++/** ++ * Set library function call hook using Binary Instrumentation ++ * method (BISTRO): replace function body by user defined call ++ * ++ * @param symbol function name to replace ++ * @param hook user-defined function-replacer ++ * @param rp restore point used to restore original function, ++ * optional, may be NULL ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++/* we have to use inline proxy call to save TOC register ++ * value - PPC is very sensible to this register value */ ++ucs_status_t ucm_bistro_patch_toc(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp, ++ uint64_t toc); ++ ++static inline ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp) ++{ ++ uint64_t toc; ++ asm volatile ("std 2, %0" : "=m" (toc)); ++ return ucm_bistro_patch_toc(symbol, hook, rp, toc); ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.c +new file mode 100644 +index 000000000..b2e57b07a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.c +@@ -0,0 +1,51 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++/* ******************************************************* ++ * x86 processors family * ++ * ***************************************************** */ ++#if defined(__x86_64__) ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static const ucm_bistro_patch_t patch_tmpl = { ++ .mov_r11 = {0x49, 0xbb}, ++ .jmp_r11 = {0x41, 0xff, 0xe3} ++}; ++ ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp) ++{ ++ ucm_bistro_patch_t patch = patch_tmpl; ++ ucs_status_t status; ++ void *func; ++ ++ UCM_LOOKUP_SYMBOL(func, symbol); ++ ++ patch.ptr = hook; ++ ++ status = ucm_bistro_create_restore_point(func, rp); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ return ucm_bistro_apply_patch(func, &patch, sizeof(patch)); ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.h +new file mode 100644 +index 000000000..bf8d5e9d8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/bistro/bistro_x86_64.h +@@ -0,0 +1,39 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++ ++#ifndef UCM_BISTRO_BISTRO_X86_64_H_ ++#define UCM_BISTRO_BISTRO_X86_64_H_ ++ ++#include ++ ++#include ++#include ++ ++#define UCM_BISTRO_PROLOGUE ++#define UCM_BISTRO_EPILOGUE ++ ++typedef struct ucm_bistro_patch { ++ uint8_t mov_r11[2]; /* mov %r11, addr */ ++ void *ptr; ++ uint8_t jmp_r11[3]; /* jmp r11 */ ++} UCS_S_PACKED ucm_bistro_patch_t; ++ ++/** ++ * Set library function call hook using Binary Instrumentation ++ * method (BISTRO): replace function body by user defined call ++ * ++ * @param symbol function name to replace ++ * @param hook user-defined function-replacer ++ * @param rp restore point used to restore original function, ++ * optional, may be NULL ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucm_bistro_patch(const char *symbol, void *hook, ++ ucm_bistro_restore_point_t **rp); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/cudamem.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/cudamem.h +index 76ae80eab..ec9f64828 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/cudamem.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/cudamem.h +@@ -13,8 +13,89 @@ + + ucs_status_t ucm_cudamem_install(); + +-cudaError_t ucm_override_cudaFree(void *addr); +-cudaError_t ucm_orig_cudaFree(void *address); +-cudaError_t ucm_cudaFree(void *address); ++/*cuMemFree */ ++CUresult ucm_override_cuMemFree(CUdeviceptr dptr); ++CUresult ucm_orig_cuMemFree(CUdeviceptr dptr); ++CUresult ucm_cuMemFree(CUdeviceptr dptr); + ++/*cuMemFreeHost */ ++CUresult ucm_override_cuMemFreeHost(void *p); ++CUresult ucm_orig_cuMemFreeHost(void *p); ++CUresult ucm_cuMemFreeHost(void *p); ++ ++/*cuMemAlloc*/ ++CUresult ucm_override_cuMemAlloc(CUdeviceptr *dptr, size_t size); ++CUresult ucm_orig_cuMemAlloc(CUdeviceptr *dptr, size_t size); ++CUresult ucm_cuMemAlloc(CUdeviceptr *dptr, size_t size); ++ ++/*cuMemAllocManaged*/ ++CUresult ucm_override_cuMemAllocManaged(CUdeviceptr *dptr, size_t size, ++ unsigned int flags); ++CUresult ucm_orig_cuMemAllocManaged(CUdeviceptr *dptr, size_t size, unsigned int flags); ++CUresult ucm_cuMemAllocManaged(CUdeviceptr *dptr, size_t size, unsigned int flags); ++ ++/*cuMemAllocPitch*/ ++CUresult ucm_override_cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, ++ size_t WidthInBytes, size_t Height, ++ unsigned int ElementSizeBytes); ++CUresult ucm_orig_cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, ++ size_t WidthInBytes, size_t Height, ++ unsigned int ElementSizeBytes); ++CUresult ucm_cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, ++ size_t WidthInBytes, size_t Height, ++ unsigned int ElementSizeBytes); ++ ++/*cuMemHostGetDevicePointer*/ ++CUresult ucm_override_cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, ++ unsigned int Flags); ++CUresult ucm_orig_cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, ++ unsigned int Flags); ++CUresult ucm_cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, unsigned int Flags); ++ ++/*cuMemHostUnregister */ ++CUresult ucm_override_cuMemHostUnregister(void *p); ++CUresult ucm_orig_cuMemHostUnregister(void *p); ++CUresult ucm_cuMemHostUnregister(void *p); ++ ++/*cudaFree*/ ++cudaError_t ucm_override_cudaFree(void *devPtr); ++cudaError_t ucm_orig_cudaFree(void *devPtr); ++cudaError_t ucm_cudaFree(void *devPtr); ++ ++/*cudaFreeHost*/ ++cudaError_t ucm_override_cudaFreeHost(void *ptr); ++cudaError_t ucm_orig_cudaFreeHost(void *ptr); ++cudaError_t ucm_cudaFreeHost(void *ptr); ++ ++/*cudaMalloc*/ ++cudaError_t ucm_override_cudaMalloc(void **devPtr, size_t size); ++cudaError_t ucm_orig_cudaMalloc(void **devPtr, size_t size); ++cudaError_t ucm_cudaMalloc(void **devPtr, size_t size); ++ ++/*cudaMallocManaged*/ ++cudaError_t ucm_override_cudaMallocManaged(void **devPtr, size_t size, ++ unsigned int flags); ++cudaError_t ucm_orig_cudaMallocManaged(void **devPtr, size_t size, unsigned int flags); ++cudaError_t ucm_cudaMallocManaged(void **devPtr, size_t size, unsigned int flags); ++ ++/*cudaMallocPitch*/ ++cudaError_t ucm_override_cudaMallocPitch(void **devPtr, size_t *pitch, ++ size_t width, size_t height); ++cudaError_t ucm_orig_cudaMallocPitch(void **devPtr, size_t *pitch, ++ size_t width, size_t height); ++cudaError_t ucm_cudaMallocPitch(void **devPtr, size_t *pitch, ++ size_t width, size_t height); ++ ++/*cudaHostGetDevicePointer*/ ++cudaError_t ucm_override_cudaHostGetDevicePointer(void **pDevice, void *pHost, ++ unsigned int flags); ++cudaError_t ucm_orig_cudaHostGetDevicePointer(void **pDevice, void *pHost, ++ unsigned int flags); ++cudaError_t ucm_cudaHostGetDevicePointer(void **pDevice, void *pHost, unsigned int flags); ++ ++ ++/*cudaHostUnregister*/ ++cudaError_t ucm_override_cudaHostUnregister(void *ptr); ++cudaError_t ucm_orig_cudaHostUnregister(void *ptr); ++cudaError_t ucm_cudaHostUnregister(void *ptr); + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/install.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/install.c +index 092bde49f..2377aeddf 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/install.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/cuda/install.c +@@ -14,22 +14,40 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include + #include + #include + +-static ucm_reloc_patch_t patch = {"cudaFree", ucm_override_cudaFree}; ++static ucm_reloc_patch_t patches[] = { ++ {UCS_PP_MAKE_STRING(cuMemFree), ucm_override_cuMemFree}, ++ {UCS_PP_MAKE_STRING(cuMemFreeHost), ucm_override_cuMemFreeHost}, ++ {UCS_PP_MAKE_STRING(cuMemAlloc), ucm_override_cuMemAlloc}, ++ {UCS_PP_MAKE_STRING(cuMemAllocManaged), ucm_override_cuMemAllocManaged}, ++ {UCS_PP_MAKE_STRING(cuMemAllocPitch), ucm_override_cuMemAllocPitch}, ++ {UCS_PP_MAKE_STRING(cuMemHostGetDevicePointer), ucm_override_cuMemHostGetDevicePointer}, ++ {UCS_PP_MAKE_STRING(cuMemHostUnregister), ucm_override_cuMemHostUnregister}, ++ {UCS_PP_MAKE_STRING(cudaFree), ucm_override_cudaFree}, ++ {UCS_PP_MAKE_STRING(cudaFreeHost), ucm_override_cudaFreeHost}, ++ {UCS_PP_MAKE_STRING(cudaMalloc), ucm_override_cudaMalloc}, ++ {UCS_PP_MAKE_STRING(cudaMallocManaged), ucm_override_cudaMallocManaged}, ++ {UCS_PP_MAKE_STRING(cudaMallocPitch), ucm_override_cudaMallocPitch}, ++ {UCS_PP_MAKE_STRING(cudaHostGetDevicePointer), ucm_override_cudaHostGetDevicePointer}, ++ {UCS_PP_MAKE_STRING(cudaHostUnregister), ucm_override_cudaHostUnregister}, ++ {NULL, NULL} ++}; ++ + ucs_status_t ucm_cudamem_install() + { + static int ucm_cudamem_installed = 0; + static pthread_mutex_t install_mutex = PTHREAD_MUTEX_INITIALIZER; ++ ucm_reloc_patch_t *patch; + ucs_status_t status; + +- if (!ucm_global_config.enable_cuda_hooks) { ++ if (!ucm_global_opts.enable_cuda_reloc) { + ucm_debug("installing cudamem relocations is disabled by configuration"); + return UCS_ERR_UNSUPPORTED; + } +@@ -39,10 +57,12 @@ ucs_status_t ucm_cudamem_install() + + pthread_mutex_lock(&install_mutex); + +- status = ucm_reloc_modify(&patch); +- if (status != UCS_OK) { +- ucm_warn("failed to install relocation table entry for '%s'", patch.symbol); +- goto out_unlock; ++ for (patch = patches; patch->symbol != NULL; ++patch) { ++ status = ucm_reloc_modify(patch); ++ if (status != UCS_OK) { ++ ucm_warn("failed to install relocation table entry for '%s'", patch->symbol); ++ goto out_unlock; ++ } + } + + ucm_cudamem_installed = 1; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/event/event.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/event/event.c +index e9383e4f7..fdcd160c3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/event/event.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/event/event.c +@@ -16,10 +16,11 @@ + #if HAVE_CUDA + #include + #endif +-#include + #include + #include + #include ++#include ++#include + + #include + #include +@@ -30,9 +31,14 @@ + #include + + ++static pthread_spinlock_t ucm_kh_lock; ++#define ucm_ptr_hash(_ptr) kh_int64_hash_func((uintptr_t)(_ptr)) ++KHASH_INIT(ucm_ptr_size, const void*, size_t, 1, ucm_ptr_hash, kh_int64_hash_equal) ++ + static pthread_rwlock_t ucm_event_lock = PTHREAD_RWLOCK_INITIALIZER; + static ucs_list_link_t ucm_event_handlers; + static int ucm_external_events = 0; ++static khash_t(ucm_ptr_size) ucm_shmat_ptrs; + + static size_t ucm_shm_size(int shmid) + { +@@ -92,6 +98,13 @@ static void ucm_event_call_orig(ucm_event_type_t event_type, ucm_event_t *event, + event->sbrk.result = ucm_orig_sbrk(event->sbrk.increment); + } + break; ++ case UCM_EVENT_MADVISE: ++ if (event->madvise.result == -1) { ++ event->madvise.result = ucm_orig_madvise(event->madvise.addr, ++ event->madvise.length, ++ event->madvise.advice); ++ } ++ break; + default: + ucm_warn("Got unknown event %d", event_type); + break; +@@ -105,7 +118,8 @@ static void ucm_event_call_orig(ucm_event_type_t event_type, ucm_event_t *event, + static ucm_event_handler_t ucm_event_orig_handler = { + .list = UCS_LIST_INITIALIZER(&ucm_event_handlers, &ucm_event_handlers), + .events = UCM_EVENT_MMAP | UCM_EVENT_MUNMAP | UCM_EVENT_MREMAP | +- UCM_EVENT_SHMAT | UCM_EVENT_SHMDT | UCM_EVENT_SBRK, /* All events */ ++ UCM_EVENT_SHMAT | UCM_EVENT_SHMDT | UCM_EVENT_SBRK | ++ UCM_EVENT_MADVISE, /* All events */ + .priority = 0, /* Between negative and positive handlers */ + .cb = ucm_event_call_orig + }; +@@ -156,6 +170,8 @@ ucm_dispatch_vm_mmap(void *addr, size_t length) + { + ucm_event_t event; + ++ ucm_trace("vm_map addr=%p length=%zu", addr, length); ++ + event.vm_mapped.address = addr; + event.vm_mapped.size = length; + ucm_event_dispatch(UCM_EVENT_VM_MAPPED, &event); +@@ -166,6 +182,8 @@ ucm_dispatch_vm_munmap(void *addr, size_t length) + { + ucm_event_t event; + ++ ucm_trace("vm_unmap addr=%p length=%zu", addr, length); ++ + event.vm_unmapped.address = addr; + event.vm_unmapped.size = length; + ucm_event_dispatch(UCM_EVENT_VM_UNMAPPED, &event); +@@ -180,6 +198,10 @@ void *ucm_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t off + + ucm_event_enter(); + ++ if ((flags & MAP_FIXED) && (addr != NULL)) { ++ ucm_dispatch_vm_munmap(addr, length); ++ } ++ + event.mmap.result = MAP_FAILED; + event.mmap.address = addr; + event.mmap.size = length; +@@ -269,8 +291,11 @@ void *ucm_mremap(void *old_address, size_t old_size, size_t new_size, int flags) + + void *ucm_shmat(int shmid, const void *shmaddr, int shmflg) + { ++ uintptr_t attach_addr; + ucm_event_t event; ++ khiter_t iter; + size_t size; ++ int result; + + ucm_event_enter(); + +@@ -278,14 +303,31 @@ void *ucm_shmat(int shmid, const void *shmaddr, int shmflg) + shmid, shmaddr, shmflg); + + size = ucm_shm_size(shmid); ++ ++ if ((shmflg & SHM_REMAP) && (shmaddr != NULL)) { ++ attach_addr = (uintptr_t)shmaddr; ++ if (shmflg & SHM_RND) { ++ attach_addr -= attach_addr % SHMLBA; ++ } ++ ucm_dispatch_vm_munmap((void*)shmaddr, size); ++ } ++ + event.shmat.result = MAP_FAILED; + event.shmat.shmid = shmid; + event.shmat.shmaddr = shmaddr; + event.shmat.shmflg = shmflg; + ucm_event_dispatch(UCM_EVENT_SHMAT, &event); + ++ pthread_spin_lock(&ucm_kh_lock); + if (event.shmat.result != MAP_FAILED) { ++ iter = kh_put(ucm_ptr_size, &ucm_shmat_ptrs, event.mmap.result, &result); ++ if (result != -1) { ++ kh_value(&ucm_shmat_ptrs, iter) = size; ++ } ++ pthread_spin_unlock(&ucm_kh_lock); + ucm_dispatch_vm_mmap(event.shmat.result, size); ++ } else { ++ pthread_spin_unlock(&ucm_kh_lock); + } + + ucm_event_leave(); +@@ -296,12 +338,24 @@ void *ucm_shmat(int shmid, const void *shmaddr, int shmflg) + int ucm_shmdt(const void *shmaddr) + { + ucm_event_t event; ++ khiter_t iter; ++ size_t size; + + ucm_event_enter(); + + ucm_debug("ucm_shmdt(shmaddr=%p)", shmaddr); + +- ucm_dispatch_vm_munmap((void*)shmaddr, ucm_get_shm_seg_size(shmaddr)); ++ pthread_spin_lock(&ucm_kh_lock); ++ iter = kh_get(ucm_ptr_size, &ucm_shmat_ptrs, shmaddr); ++ if (iter != kh_end(&ucm_shmat_ptrs)) { ++ size = kh_value(&ucm_shmat_ptrs, iter); ++ kh_del(ucm_ptr_size, &ucm_shmat_ptrs, iter); ++ } else { ++ size = ucm_get_shm_seg_size(shmaddr); ++ } ++ pthread_spin_unlock(&ucm_kh_lock); ++ ++ ucm_dispatch_vm_munmap((void*)shmaddr, size); + + event.shmdt.result = -1; + event.shmdt.shmaddr = shmaddr; +@@ -337,22 +391,347 @@ void *ucm_sbrk(intptr_t increment) + return event.sbrk.result; + } + ++int ucm_brk(void *addr) ++{ ++#if UCM_BISTRO_HOOKS ++ void *old_addr; ++ intptr_t increment; ++ ucm_event_t event; ++ ++ old_addr = ucm_brk_syscall(0); ++ /* in case if addr == NULL - it just returns current pointer */ ++ increment = addr ? ((intptr_t)addr - (intptr_t)old_addr) : 0; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_brk(addr=%p)", addr); ++ ++ if (increment < 0) { ++ ucm_dispatch_vm_munmap(old_addr + increment, -increment); ++ } ++ ++ event.sbrk.result = (void*)-1; ++ event.sbrk.increment = increment; ++ ucm_event_dispatch(UCM_EVENT_SBRK, &event); ++ ++ if ((increment > 0) && (event.sbrk.result != MAP_FAILED)) { ++ ucm_dispatch_vm_mmap(old_addr, increment); ++ } ++ ++ ucm_event_leave(); ++ ++ return event.sbrk.result == MAP_FAILED ? -1 : 0; ++#else ++ return -1; ++#endif ++} ++ ++int ucm_madvise(void *addr, size_t length, int advice) ++{ ++ ucm_event_t event; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_madvise(addr=%p length=%zu advice=%d)", addr, length, advice); ++ ++ /* madvise(MADV_DONTNEED) and madvise(MADV_FREE) are releasing pages */ ++ if ((advice == MADV_DONTNEED) ++#if HAVE_DECL_MADV_REMOVE ++ || (advice == MADV_REMOVE) ++#endif ++#if HAVE_DECL_POSIX_MADV_DONTNEED ++ || (advice == POSIX_MADV_DONTNEED) ++#endif ++#if HAVE_DECL_MADV_FREE ++ || (advice == MADV_FREE) ++#endif ++ ) { ++ ucm_dispatch_vm_munmap(addr, length); ++ } ++ ++ event.madvise.result = -1; ++ event.madvise.addr = addr; ++ event.madvise.length = length; ++ event.madvise.advice = advice; ++ ucm_event_dispatch(UCM_EVENT_MADVISE, &event); ++ ++ ucm_event_leave(); ++ ++ return event.madvise.result; ++} ++ ++ + #if HAVE_CUDA +-cudaError_t ucm_cudaFree(void *addr) ++static UCS_F_ALWAYS_INLINE void ++ucm_dispatch_mem_type_alloc(void *addr, size_t length, ucm_mem_type_t mem_type) ++{ ++ ucm_event_t event; ++ ++ event.mem_type.address = addr; ++ event.mem_type.size = length; ++ event.mem_type.mem_type = mem_type; ++ ucm_event_dispatch(UCM_EVENT_MEM_TYPE_ALLOC, &event); ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucm_dispatch_mem_type_free(void *addr, size_t length, ucm_mem_type_t mem_type) ++{ ++ ucm_event_t event; ++ ++ event.mem_type.address = addr; ++ event.mem_type.size = length; ++ event.mem_type.mem_type = mem_type; ++ ucm_event_dispatch(UCM_EVENT_MEM_TYPE_FREE, &event); ++} ++ ++static void ucm_cudafree_dispatch_events(void *dptr) ++{ ++ CUresult ret; ++ CUdeviceptr pbase; ++ size_t psize; ++ ++ if (dptr == NULL) { ++ return; ++ } ++ ++ ret = cuMemGetAddressRange(&pbase, &psize, (CUdeviceptr) dptr); ++ if (ret != CUDA_SUCCESS) { ++ ucm_warn("cuMemGetAddressRange(devPtr=%p) failed", (void *)dptr); ++ psize = 1; /* set minimum length */ ++ } ++ ucs_assert(dptr == (void *)pbase); ++ ++ ucm_dispatch_mem_type_free((void *)dptr, psize, UCM_MEM_TYPE_CUDA); ++} ++ ++CUresult ucm_cuMemFree(CUdeviceptr dptr) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cuMemFree(dptr=%p)",(void *)dptr); ++ ++ ucm_cudafree_dispatch_events((void *)dptr); ++ ++ ret = ucm_orig_cuMemFree(dptr); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemFreeHost(void *p) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cuMemFreeHost(ptr=%p)", p); ++ ++ ucm_dispatch_vm_munmap(p, 0); ++ ++ ret = ucm_orig_cuMemFreeHost(p); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemAlloc(CUdeviceptr *dptr, size_t size) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cuMemAlloc(dptr, size); ++ if (ret == CUDA_SUCCESS) { ++ ucm_trace("ucm_cuMemAlloc(dptr=%p size:%lu)",(void *)*dptr, size); ++ ucm_dispatch_mem_type_alloc((void *)*dptr, size, UCM_MEM_TYPE_CUDA); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemAllocManaged(CUdeviceptr *dptr, size_t size, unsigned int flags) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cuMemAllocManaged(dptr, size, flags); ++ if (ret == CUDA_SUCCESS) { ++ ucm_trace("ucm_cuMemAllocManaged(dptr=%p size:%lu, flags:%d)", ++ (void *)*dptr, size, flags); ++ ucm_dispatch_mem_type_alloc((void *)*dptr, size, UCM_MEM_TYPE_CUDA_MANAGED); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, ++ size_t WidthInBytes, size_t Height, ++ unsigned int ElementSizeBytes) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cuMemAllocPitch(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes); ++ if (ret == CUDA_SUCCESS) { ++ ucm_trace("ucm_cuMemAllocPitch(dptr=%p size:%lu)",(void *)*dptr, ++ (WidthInBytes * Height)); ++ ucm_dispatch_mem_type_alloc((void *)*dptr, WidthInBytes * Height, ++ UCM_MEM_TYPE_CUDA); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, unsigned int Flags) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cuMemHostGetDevicePointer(pdptr, p, Flags); ++ if (ret == CUDA_SUCCESS) { ++ ucm_trace("ucm_cuMemHostGetDevicePointer(pdptr=%p p=%p)",(void *)*pdptr, p); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++CUresult ucm_cuMemHostUnregister(void *p) ++{ ++ CUresult ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cuMemHostUnregister(ptr=%p)", p); ++ ++ ret = ucm_orig_cuMemHostUnregister(p); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++cudaError_t ucm_cudaFree(void *devPtr) + { + cudaError_t ret; + + ucm_event_enter(); + +- ucm_trace("ucm_cudaFree(addr=%p )", addr); ++ ucm_trace("ucm_cudaFree(devPtr=%p)", devPtr); ++ ++ ucm_cudafree_dispatch_events((void *)devPtr); + +- ucm_dispatch_vm_munmap(addr, 0); +- ret = ucm_orig_cudaFree(addr); ++ ret = ucm_orig_cudaFree(devPtr); + + ucm_event_leave(); + + return ret; + } ++ ++cudaError_t ucm_cudaFreeHost(void *ptr) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cudaFreeHost(ptr=%p)", ptr); ++ ++ ucm_dispatch_vm_munmap(ptr, 0); ++ ++ ret = ucm_orig_cudaFreeHost(ptr); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++cudaError_t ucm_cudaMalloc(void **devPtr, size_t size) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cudaMalloc(devPtr, size); ++ if (ret == cudaSuccess) { ++ ucm_trace("ucm_cudaMalloc(devPtr=%p size:%lu)", *devPtr, size); ++ ucm_dispatch_mem_type_alloc(*devPtr, size, UCM_MEM_TYPE_CUDA); ++ } ++ ++ ucm_event_leave(); ++ ++ return ret; ++} ++ ++cudaError_t ucm_cudaMallocManaged(void **devPtr, size_t size, unsigned int flags) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cudaMallocManaged(devPtr, size, flags); ++ if (ret == cudaSuccess) { ++ ucm_trace("ucm_cudaMallocManaged(devPtr=%p size:%lu flags:%d)", ++ *devPtr, size, flags); ++ ucm_dispatch_mem_type_alloc(*devPtr, size, UCM_MEM_TYPE_CUDA_MANAGED); ++ } ++ ++ ucm_event_leave(); ++ ++ return ret; ++} ++ ++cudaError_t ucm_cudaMallocPitch(void **devPtr, size_t *pitch, ++ size_t width, size_t height) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cudaMallocPitch(devPtr, pitch, width, height); ++ if (ret == cudaSuccess) { ++ ucm_trace("ucm_cudaMallocPitch(devPtr=%p size:%lu)",*devPtr, (width * height)); ++ ucm_dispatch_mem_type_alloc(*devPtr, (width * height), UCM_MEM_TYPE_CUDA); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++cudaError_t ucm_cudaHostGetDevicePointer(void **pDevice, void *pHost, unsigned int flags) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ret = ucm_orig_cudaHostGetDevicePointer(pDevice, pHost, flags); ++ if (ret == cudaSuccess) { ++ ucm_trace("ucm_cuMemHostGetDevicePointer(pDevice=%p pHost=%p)", pDevice, pHost); ++ } ++ ++ ucm_event_leave(); ++ return ret; ++} ++ ++cudaError_t ucm_cudaHostUnregister(void *ptr) ++{ ++ cudaError_t ret; ++ ++ ucm_event_enter(); ++ ++ ucm_trace("ucm_cudaHostUnregister(ptr=%p)", ptr); ++ ++ ret = ucm_orig_cudaHostUnregister(ptr); ++ ++ ucm_event_leave(); ++ return ret; ++} ++ + #endif + + void ucm_event_handler_add(ucm_event_handler_t *handler) +@@ -381,18 +760,20 @@ void ucm_event_handler_remove(ucm_event_handler_t *handler) + + static ucs_status_t ucm_event_install(int events) + { ++ int native_events, malloc_events; + ucs_status_t status; +- int native_events; + + /* Replace aggregate events with the native events which make them */ +- native_events = events & ~(UCM_EVENT_VM_MAPPED | UCM_EVENT_VM_UNMAPPED); ++ native_events = events & ~(UCM_EVENT_VM_MAPPED | UCM_EVENT_VM_UNMAPPED | ++ UCM_EVENT_MEM_TYPE_ALLOC | UCM_EVENT_MEM_TYPE_FREE); + if (events & UCM_EVENT_VM_MAPPED) { + native_events |= UCM_EVENT_MMAP | UCM_EVENT_MREMAP | + UCM_EVENT_SHMAT | UCM_EVENT_SBRK; + } + if (events & UCM_EVENT_VM_UNMAPPED) { +- native_events |= UCM_EVENT_MUNMAP | UCM_EVENT_MREMAP | +- UCM_EVENT_SHMDT | UCM_EVENT_SBRK; ++ native_events |= UCM_EVENT_MMAP | UCM_EVENT_MUNMAP | UCM_EVENT_MREMAP | ++ UCM_EVENT_SHMDT | UCM_EVENT_SHMAT | ++ UCM_EVENT_SBRK | UCM_EVENT_MADVISE; + } + + /* TODO lock */ +@@ -404,7 +785,9 @@ static ucs_status_t ucm_event_install(int events) + + ucm_debug("mmap hooks are ready"); + +- status = ucm_malloc_install(native_events); ++ malloc_events = events & ~(UCM_EVENT_MEM_TYPE_ALLOC | ++ UCM_EVENT_MEM_TYPE_FREE); ++ status = ucm_malloc_install(malloc_events); + if (status != UCS_OK) { + ucm_debug("failed to install malloc events"); + goto out_unlock; +@@ -413,12 +796,14 @@ static ucs_status_t ucm_event_install(int events) + ucm_debug("malloc hooks are ready"); + + #if HAVE_CUDA +- status = ucm_cudamem_install(); +- if (status != UCS_OK) { +- ucm_debug("failed to install cudamem events"); +- goto out_unlock; ++ if (events & (UCM_EVENT_MEM_TYPE_ALLOC | UCM_EVENT_MEM_TYPE_FREE)) { ++ status = ucm_cudamem_install(); ++ if (status != UCS_OK) { ++ ucm_debug("failed to install cudamem events"); ++ goto out_unlock; ++ } ++ ucm_debug("cudaFree hooks are ready"); + } +- ucm_debug("cudaFree hooks are ready"); + #endif + + status = UCS_OK; +@@ -434,12 +819,12 @@ ucs_status_t ucm_set_event_handler(int events, int priority, + ucm_event_handler_t *handler; + ucs_status_t status; + +- if (!ucm_global_config.enable_events) { ++ if (!ucm_global_opts.enable_events) { + return UCS_ERR_UNSUPPORTED; + } + +- if (!(events & (UCM_EVENT_FLAG_NO_INSTALL | ucm_external_events))) { +- status = ucm_event_install(events); ++ if (!(events & UCM_EVENT_FLAG_NO_INSTALL) && (events & ~ucm_external_events)) { ++ status = ucm_event_install(events & ~ucm_external_events); + if (status != UCS_OK) { + return status; + } +@@ -500,3 +885,12 @@ void ucm_unset_event_handler(int events, ucm_event_callback_t cb, void *arg) + } + } + ++UCS_STATIC_INIT { ++ pthread_spin_init(&ucm_kh_lock, PTHREAD_PROCESS_PRIVATE); ++ kh_init_inplace(ucm_ptr_size, &ucm_shmat_ptrs); ++} ++ ++UCS_STATIC_CLEANUP { ++ kh_destroy_inplace(ucm_ptr_size, &ucm_shmat_ptrs); ++ pthread_spin_destroy(&ucm_kh_lock); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/malloc/malloc_hook.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/malloc/malloc_hook.c +index d558b6ae6..eee3f9416 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/malloc/malloc_hook.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/malloc/malloc_hook.c +@@ -21,10 +21,8 @@ + #include + #include + #include +-#include + #include + #include +-#include + #include + #include + #include +@@ -90,7 +88,7 @@ typedef struct ucm_malloc_hook_state { + /* + * Track record of which pointers are ours + */ +- ucs_spinlock_t lock; /* Protect heap counters. ++ pthread_spinlock_t lock; /* Protect heap counters. + Note: Cannot modify events when this lock + is held - may deadlock */ + /* Our heap address range. Used to identify whether a released pointer is ours, +@@ -137,14 +135,14 @@ static void ucm_malloc_mmaped_ptr_add(void *ptr) + int hash_extra_status; + khiter_t hash_it; + +- ucs_spin_lock(&ucm_malloc_hook_state.lock); ++ pthread_spin_lock(&ucm_malloc_hook_state.lock); + + hash_it = kh_put(mmap_ptrs, &ucm_malloc_hook_state.ptrs, ptr, + &hash_extra_status); + ucs_assert_always(hash_extra_status >= 0); + ucs_assert_always(hash_it != kh_end(&ucm_malloc_hook_state.ptrs)); + +- ucs_spin_unlock(&ucm_malloc_hook_state.lock); ++ pthread_spin_unlock(&ucm_malloc_hook_state.lock); + } + + static int ucm_malloc_mmaped_ptr_remove_if_exists(void *ptr) +@@ -152,7 +150,7 @@ static int ucm_malloc_mmaped_ptr_remove_if_exists(void *ptr) + khiter_t hash_it; + int found; + +- ucs_spin_lock(&ucm_malloc_hook_state.lock); ++ pthread_spin_lock(&ucm_malloc_hook_state.lock); + + hash_it = kh_get(mmap_ptrs, &ucm_malloc_hook_state.ptrs, ptr); + if (hash_it == kh_end(&ucm_malloc_hook_state.ptrs)) { +@@ -162,7 +160,7 @@ static int ucm_malloc_mmaped_ptr_remove_if_exists(void *ptr) + kh_del(mmap_ptrs, &ucm_malloc_hook_state.ptrs, hash_it); + } + +- ucs_spin_unlock(&ucm_malloc_hook_state.lock); ++ pthread_spin_unlock(&ucm_malloc_hook_state.lock); + return found; + } + +@@ -170,10 +168,10 @@ static int ucm_malloc_is_address_in_heap(void *ptr) + { + int in_heap; + +- ucs_spin_lock(&ucm_malloc_hook_state.lock); ++ pthread_spin_lock(&ucm_malloc_hook_state.lock); + in_heap = (ptr >= ucm_malloc_hook_state.heap_start) && + (ptr < ucm_malloc_hook_state.heap_end); +- ucs_spin_unlock(&ucm_malloc_hook_state.lock); ++ pthread_spin_unlock(&ucm_malloc_hook_state.lock); + return in_heap; + } + +@@ -226,8 +224,8 @@ static void *ucm_malloc_impl(size_t size, const char *debug_name) + void *ptr; + + ucm_malloc_hook_state.hook_called = 1; +- if (ucm_global_config.alloc_alignment > 1) { +- ptr = ucm_dlmemalign(ucm_global_config.alloc_alignment, size); ++ if (ucm_global_opts.alloc_alignment > 1) { ++ ptr = ucm_dlmemalign(ucm_global_opts.alloc_alignment, size); + } else { + ptr = ucm_dlmalloc(size); + } +@@ -240,7 +238,11 @@ static void ucm_malloc_adjust_thresholds(size_t size) + int mmap_thresh; + + if (size > ucm_malloc_hook_state.max_freed_size) { +- if (ucm_global_config.enable_dynamic_mmap_thresh && ++ /* Valgrind limits the size of brk() segments to 8mb, so must use mmap ++ * for large allocations. ++ */ ++ if (!RUNNING_ON_VALGRIND && ++ ucm_global_opts.enable_dynamic_mmap_thresh && + !ucm_malloc_hook_state.trim_thresh_set && + !ucm_malloc_hook_state.mmap_thresh_set) { + /* new mmap threshold is increased to the size of released block, +@@ -287,7 +289,7 @@ static void *ucm_memalign_impl(size_t alignment, size_t size, const char *debug_ + void *ptr; + + ucm_malloc_hook_state.hook_called = 1; +- ptr = ucm_dlmemalign(ucs_max(alignment, ucm_global_config.alloc_alignment), size); ++ ptr = ucm_dlmemalign(ucs_max(alignment, ucm_global_opts.alloc_alignment), size); + ucm_malloc_allocated(ptr, size, debug_name); + return ptr; + } +@@ -493,7 +495,7 @@ out: + static void ucm_malloc_sbrk(ucm_event_type_t event_type, + ucm_event_t *event, void *arg) + { +- ucs_spin_lock(&ucm_malloc_hook_state.lock); ++ pthread_spin_lock(&ucm_malloc_hook_state.lock); + + /* Copy return value from call. We assume the event handler uses a lock. */ + if (ucm_malloc_hook_state.heap_start == (void*)-1) { +@@ -505,7 +507,7 @@ static void ucm_malloc_sbrk(ucm_event_type_t event_type, + event->sbrk.increment, event->sbrk.result, + ucm_malloc_hook_state.heap_start, ucm_malloc_hook_state.heap_end); + +- ucs_spin_unlock(&ucm_malloc_hook_state.lock); ++ pthread_spin_unlock(&ucm_malloc_hook_state.lock); + } + + static int ucs_malloc_is_ready(int events) +@@ -521,11 +523,13 @@ static int ucs_malloc_is_ready(int events) + ucs_test_all_flags(ucm_malloc_hook_state.installed_events, events); + } + +-static ucm_event_handler_t ucm_malloc_sbrk_handler = { +- .events = UCM_EVENT_SBRK, +- .priority = 1000, +- .cb = ucm_malloc_sbrk +-}; ++static void ucm_malloc_event_test_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, void *arg) ++{ ++ int *out_events = arg; ++ ++ *out_events |= event_type; ++} + + /* Has to be called with install_mutex held */ + static void ucm_malloc_test(int events) +@@ -545,33 +549,40 @@ static void ucm_malloc_test(int events) + */ + handler.events = events; + handler.priority = -1; +- handler.cb = ucm_mmap_event_test_callback; ++ handler.cb = ucm_malloc_event_test_callback; + handler.arg = &out_events; + out_events = 0; + + ucm_event_handler_add(&handler); + +- /* Trigger both small and large allocations +- * TODO check address / stop all threads */ +- for (i = 0; i < small_alloc_count; ++i) { +- p[i] = malloc(small_alloc_size); +- } +- for (i = 0; i < small_alloc_count; ++i) { +- free(p[i]); +- } +- p[0] = malloc(large_alloc_size); +- p[0] = realloc(p[0], large_alloc_size * 2); +- free(p[0]); ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ /* Trigger both small and large allocations ++ * TODO check address / stop all threads */ ++ for (i = 0; i < small_alloc_count; ++i) { ++ p[i] = malloc(small_alloc_size); ++ } ++ for (i = 0; i < small_alloc_count; ++i) { ++ free(p[i]); ++ } + +- if (ucm_malloc_hook_state.hook_called) { +- ucm_dlmalloc_trim(0); ++ p[0] = malloc(large_alloc_size); ++ p[0] = realloc(p[0], large_alloc_size * 2); ++ free(p[0]); ++ ++ if (ucm_malloc_hook_state.hook_called) { ++ ucm_dlmalloc_trim(0); ++ } ++ } else { ++ /* in bistro mode we can't guarantee event fire on malloc calls, ++ * let's just try to call sbrk directly & catch it */ ++ ucm_fire_mmap_events(events); + } + + ucm_event_handler_remove(&handler); + + ucm_malloc_hook_state.installed_events |= out_events; + +- ucm_debug("malloc test: have 0x%x out of 0x%x, hooks were%s called", ++ ucm_debug("malloc test: have 0x%x out of 0x%x, malloc/free hooks were%s called", + ucm_malloc_hook_state.installed_events, events, + ucm_malloc_hook_state.hook_called ? "" : " not"); + } +@@ -615,20 +626,25 @@ static int ucm_malloc_mallopt(int param_number, int value) + return success; + } + ++static char *ucm_malloc_blacklist[] = { ++ "libnvidia-fatbinaryloader.so", ++ NULL ++}; ++ + static ucm_reloc_patch_t ucm_malloc_symbol_patches[] = { +- { "free", ucm_free }, +- { "realloc", ucm_realloc }, +- { "malloc", ucm_malloc }, +- { "memalign", ucm_memalign }, +- { "calloc", ucm_calloc }, +- { "valloc", ucm_valloc }, +- { "posix_memalign", ucm_posix_memalign }, +- { "setenv", ucm_setenv }, +- { UCM_OPERATOR_NEW_SYMBOL, ucm_operator_new }, +- { UCM_OPERATOR_DELETE_SYMBOL, ucm_operator_delete }, +- { UCM_OPERATOR_VEC_NEW_SYMBOL, ucm_operator_vec_new }, +- { UCM_OPERATOR_VEC_DELETE_SYMBOL, ucm_operator_vec_delete }, +- { NULL, NULL } ++ { .symbol = "free", .value = ucm_free, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "realloc", .value = ucm_realloc, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "malloc", .value = ucm_malloc, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "memalign", .value = ucm_memalign, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "calloc", .value = ucm_calloc, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "valloc", .value = ucm_valloc, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "posix_memalign", .value = ucm_posix_memalign, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = "setenv", .value = ucm_setenv, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = UCM_OPERATOR_NEW_SYMBOL, .value = ucm_operator_new, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = UCM_OPERATOR_DELETE_SYMBOL, .value = ucm_operator_delete, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = UCM_OPERATOR_VEC_NEW_SYMBOL, .value = ucm_operator_vec_new, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = UCM_OPERATOR_VEC_DELETE_SYMBOL, .value = ucm_operator_vec_delete, .blacklist = ucm_malloc_blacklist }, ++ { .symbol = NULL, .value = NULL } + }; + + static ucm_reloc_patch_t ucm_malloc_optional_symbol_patches[] = { +@@ -670,12 +686,15 @@ static void ucm_malloc_set_env_mallopt() + + ucs_status_t ucm_malloc_install(int events) + { ++ static ucm_event_handler_t sbrk_handler = { ++ .events = UCM_EVENT_SBRK, ++ .priority = 1000, ++ .cb = ucm_malloc_sbrk ++ }; + ucs_status_t status; + + pthread_mutex_lock(&ucm_malloc_hook_state.install_mutex); + +- events &= UCM_EVENT_MMAP | UCM_EVENT_MUNMAP | UCM_EVENT_MREMAP | UCM_EVENT_SBRK; +- + if (ucs_malloc_is_ready(events)) { + goto out_succ; + } +@@ -692,7 +711,7 @@ ucs_status_t ucm_malloc_install(int events) + + if (!(ucm_malloc_hook_state.install_state & UCM_MALLOC_INSTALLED_SBRK_EVH)) { + ucm_debug("installing malloc-sbrk event handler"); +- ucm_event_handler_add(&ucm_malloc_sbrk_handler); ++ ucm_event_handler_add(&sbrk_handler); + ucm_malloc_hook_state.install_state |= UCM_MALLOC_INSTALLED_SBRK_EVH; + } + +@@ -702,7 +721,7 @@ ucs_status_t ucm_malloc_install(int events) + * valgrind anyway. + */ + #if HAVE_MALLOC_HOOK +- if (ucm_global_config.enable_malloc_hooks) { ++ if (ucm_global_opts.enable_malloc_hooks) { + /* Install using malloc hooks. + * TODO detect glibc support in configure-time. + */ +@@ -727,7 +746,7 @@ ucs_status_t ucm_malloc_install(int events) + } + + /* Install using malloc symbols */ +- if (ucm_global_config.enable_malloc_reloc) { ++ if (ucm_global_opts.enable_malloc_reloc) { + if (!(ucm_malloc_hook_state.install_state & UCM_MALLOC_INSTALLED_MALL_SYMS)) { + ucm_debug("installing malloc relocations"); + ucm_malloc_populate_glibc_cache(); +@@ -768,7 +787,7 @@ void ucm_malloc_state_reset(int default_mmap_thresh, int default_trim_thresh) + } + + UCS_STATIC_INIT { +- ucs_spinlock_init(&ucm_malloc_hook_state.lock); ++ pthread_spin_init(&ucm_malloc_hook_state.lock, 0); + kh_init_inplace(mmap_ptrs, &ucm_malloc_hook_state.ptrs); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/install.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/install.c +index 9e903bb4a..ebf22aaa0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/install.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/install.c +@@ -15,44 +15,99 @@ + #include + #include + #include +-#include ++#include ++#include + #include ++#include ++#include + + #include + #include + #include + #include + ++#define UCM_IS_HOOK_ENABLED(_entry) \ ++ ((_entry)->hook_type & UCS_BIT(ucm_mmap_hook_mode())) ++ ++#define UCM_HOOK_STR \ ++ ((ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) ? "reloc" : "bistro") ++ ++extern const char *ucm_mmap_hook_modes[]; ++ ++typedef enum ucm_mmap_hook_type { ++ UCM_HOOK_RELOC = UCS_BIT(UCM_MMAP_HOOK_RELOC), ++ UCM_HOOK_BISTRO = UCS_BIT(UCM_MMAP_HOOK_BISTRO), ++ UCM_HOOK_BOTH = UCM_HOOK_RELOC | UCM_HOOK_BISTRO ++} ucm_mmap_hook_type_t; + + typedef struct ucm_mmap_func { +- ucm_reloc_patch_t patch; +- ucm_event_type_t event_type; ++ ucm_reloc_patch_t patch; ++ ucm_event_type_t event_type; ++ ucm_event_type_t deps; ++ ucm_mmap_hook_type_t hook_type; + } ucm_mmap_func_t; + + static ucm_mmap_func_t ucm_mmap_funcs[] = { +- { {"mmap", ucm_override_mmap}, UCM_EVENT_MMAP}, +- { {"munmap", ucm_override_munmap}, UCM_EVENT_MUNMAP}, +- { {"mremap", ucm_override_mremap}, UCM_EVENT_MREMAP}, +- { {"shmat", ucm_override_shmat}, UCM_EVENT_SHMAT}, +- { {"shmdt", ucm_override_shmdt}, UCM_EVENT_SHMDT}, +- { {"sbrk", ucm_override_sbrk}, UCM_EVENT_SBRK}, ++ { {"mmap", ucm_override_mmap}, UCM_EVENT_MMAP, 0, UCM_HOOK_BOTH}, ++ { {"munmap", ucm_override_munmap}, UCM_EVENT_MUNMAP, 0, UCM_HOOK_BOTH}, ++ { {"mremap", ucm_override_mremap}, UCM_EVENT_MREMAP, 0, UCM_HOOK_BOTH}, ++ { {"shmat", ucm_override_shmat}, UCM_EVENT_SHMAT, 0, UCM_HOOK_BOTH}, ++ { {"shmdt", ucm_override_shmdt}, UCM_EVENT_SHMDT, UCM_EVENT_SHMAT, UCM_HOOK_BOTH}, ++ { {"sbrk", ucm_override_sbrk}, UCM_EVENT_SBRK, 0, UCM_HOOK_RELOC}, ++#if UCM_BISTRO_HOOKS ++ { {"brk", ucm_override_brk}, UCM_EVENT_SBRK, 0, UCM_HOOK_BISTRO}, ++#endif ++ { {"madvise", ucm_override_madvise}, UCM_EVENT_MADVISE, 0, UCM_HOOK_BOTH}, + { {NULL, NULL}, 0} + }; + +-void ucm_mmap_event_test_callback(ucm_event_type_t event_type, +- ucm_event_t *event, void *arg) ++static void ucm_mmap_event_test_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, void *arg) + { + int *out_events = arg; ++ + *out_events |= event_type; + } + ++void ucm_fire_mmap_events(int events) ++{ ++ void *p; ++ ++ if (events & (UCM_EVENT_MMAP|UCM_EVENT_MUNMAP|UCM_EVENT_MREMAP| ++ UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED)) { ++ p = mmap(NULL, 0, 0, 0, -1 ,0); ++ p = mremap(p, 0, 0, 0); ++ munmap(p, 0); ++ } ++ ++ if (events & (UCM_EVENT_SHMAT|UCM_EVENT_SHMDT|UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED)) { ++ p = shmat(0, NULL, 0); ++ shmdt(p); ++ } ++ ++ if (events & (UCM_EVENT_SBRK|UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED)) { ++ (void)sbrk(ucm_get_page_size()); ++ (void)sbrk(-ucm_get_page_size()); ++ } ++ ++ if (events & UCM_EVENT_MADVISE) { ++ p = mmap(NULL, ucm_get_page_size(), PROT_READ|PROT_WRITE, ++ MAP_PRIVATE|MAP_ANON, -1, 0); ++ if (p != MAP_FAILED) { ++ madvise(p, ucm_get_page_size(), MADV_NORMAL); ++ munmap(p, ucm_get_page_size()); ++ } else { ++ ucm_debug("mmap failed: %m"); ++ } ++ } ++} ++ + /* Called with lock held */ + static ucs_status_t ucm_mmap_test(int events) + { + static int installed_events = 0; + ucm_event_handler_t handler; + int out_events; +- void *p; + + if (ucs_test_all_flags(installed_events, events)) { + /* All requested events are already installed */ +@@ -70,20 +125,7 @@ static ucs_status_t ucm_mmap_test(int events) + + ucm_event_handler_add(&handler); + +- if (events & (UCM_EVENT_MMAP|UCM_EVENT_MUNMAP|UCM_EVENT_MREMAP)) { +- p = mmap(NULL, 0, 0, 0, -1 ,0); +- p = mremap(p, 0, 0, 0); +- munmap(p, 0); +- } +- +- if (events & (UCM_EVENT_SHMAT|UCM_EVENT_SHMDT)) { +- p = shmat(0, NULL, 0); +- shmdt(p); +- } +- +- if (events & UCM_EVENT_SBRK) { +- (void)sbrk(0); +- } ++ ucm_fire_mmap_events(events); + + ucm_event_handler_remove(&handler); + +@@ -107,13 +149,13 @@ static ucs_status_t ucs_mmap_install_reloc(int events) + ucm_mmap_func_t *entry; + ucs_status_t status; + +- if (!ucm_global_config.enable_mmap_reloc) { +- ucm_debug("installing mmap relocations is disabled by configuration"); ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_NONE) { ++ ucm_debug("installing mmap hooks is disabled by configuration"); + return UCS_ERR_UNSUPPORTED; + } + + for (entry = ucm_mmap_funcs; entry->patch.symbol != NULL; ++entry) { +- if (!(entry->event_type & events)) { ++ if (!((entry->event_type|entry->deps) & events)) { + /* Not required */ + continue; + } +@@ -123,17 +165,24 @@ static ucs_status_t ucs_mmap_install_reloc(int events) + continue; + } + +- ucm_debug("mmap: installing relocation table entry for %s = %p for event 0x%x", +- entry->patch.symbol, entry->patch.value, entry->event_type); +- +- status = ucm_reloc_modify(&entry->patch); +- if (status != UCS_OK) { +- ucm_warn("failed to install relocation table entry for '%s'", +- entry->patch.symbol); +- return status; ++ if (UCM_IS_HOOK_ENABLED(entry)) { ++ ucm_debug("mmap: installing %s hook for %s = %p for event 0x%x", UCM_HOOK_STR, ++ entry->patch.symbol, entry->patch.value, entry->event_type); ++ ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ status = ucm_reloc_modify(&entry->patch); ++ } else { ++ ucs_assert(ucm_mmap_hook_mode() == UCM_MMAP_HOOK_BISTRO); ++ status = ucm_bistro_patch(entry->patch.symbol, entry->patch.value, NULL); ++ } ++ if (status != UCS_OK) { ++ ucm_warn("failed to install %s hook for '%s'", ++ UCM_HOOK_STR, entry->patch.symbol); ++ return status; ++ } ++ ++ installed_events |= entry->event_type; + } +- +- installed_events |= entry->event_type; + } + + return UCS_OK; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/mmap.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/mmap.h +index d57b85a88..35ac47f0e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/mmap.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/mmap/mmap.h +@@ -8,12 +8,20 @@ + #define UCM_MMAP_H_ + + #include ++#include + +-ucs_status_t ucm_mmap_install(int events); ++#define UCM_MMAP_HOOK_RELOC_STR "reloc" ++#define UCM_MMAP_HOOK_BISTRO_STR "bistro" + +-void ucm_mmap_event_test_callback(ucm_event_type_t event_type, +- ucm_event_t *event, void *arg); ++#if UCM_BISTRO_HOOKS ++# define UCM_DEFAULT_HOOK_MODE UCM_MMAP_HOOK_BISTRO ++# define UCM_DEFAULT_HOOK_MODE_STR UCM_MMAP_HOOK_BISTRO_STR ++#else ++# define UCM_DEFAULT_HOOK_MODE UCM_MMAP_HOOK_RELOC ++# define UCM_DEFAULT_HOOK_MODE_STR UCM_MMAP_HOOK_RELOC_STR ++#endif + ++ucs_status_t ucm_mmap_install(int events); + + void *ucm_override_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); + int ucm_override_munmap(void *addr, size_t length); +@@ -21,5 +29,19 @@ void *ucm_override_mremap(void *old_address, size_t old_size, size_t new_size, i + void *ucm_override_shmat(int shmid, const void *shmaddr, int shmflg); + int ucm_override_shmdt(const void *shmaddr); + void *ucm_override_sbrk(intptr_t increment); ++void *ucm_sbrk_select(intptr_t increment); ++int ucm_override_brk(void *addr); ++void *ucm_brk_syscall(void *addr); ++int ucm_override_madvise(void *addr, size_t length, int advice); ++void ucm_fire_mmap_events(int events); ++ ++static UCS_F_ALWAYS_INLINE ucm_mmap_hook_mode_t ucm_mmap_hook_mode(void) ++{ ++ if (RUNNING_ON_VALGRIND && (ucm_global_opts.mmap_hook_mode == UCM_MMAP_HOOK_BISTRO)) { ++ return UCM_MMAP_HOOK_RELOC; ++ } ++ ++ return ucm_global_opts.mmap_hook_mode; ++} + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.c +index 9a9a487a4..0ce92c9bf 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.c +@@ -5,12 +5,14 @@ + */ + + #include "log.h" ++#include "sys.h" + + #include + #include + #include + #include + #include ++#include + #include + #include + #include +@@ -110,7 +112,7 @@ out: + static void ucm_log_vsnprintf(char *buf, size_t max, const char *fmt, va_list ap) + { + const char *pf; +- char *pb, *endb, *ps; ++ char *pb, *endb; + union { + char *s; + long d; +@@ -147,16 +149,16 @@ static void ucm_log_vsnprintf(char *buf, size_t max, const char *fmt, va_list ap + + /* Error message */ + case 'm': +- ps = strerror_r(eno, pb, endb - pb); +- if (ps != pb) { +- strncpy(pb, ps, endb - pb); +- } ++ ucm_strerror(eno, pb, endb - pb); + pb += strlen(pb); + goto done; + + /* String */ + case 's': + value.s = va_arg(ap, char *); ++ if (!value.s) { ++ value.s = "(null)"; ++ } + pad -= strlen(value.s); + if (!(flags & UCM_LOG_LTOA_PAD_LEFT)) { + pb = ucm_log_add_padding(pb, endb, pad, ' '); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.h +index 3c186dc7d..c69782341 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/log.h +@@ -11,13 +11,12 @@ + # include "config.h" + #endif + ++#include + #include + +-#include "ucm_config.h" +- + + #define ucm_log(_level, _message, ...) \ +- if (((_level) <= UCS_MAX_LOG_LEVEL) && ((_level) <= ucm_global_config.log_level)) { \ ++ if (((_level) <= UCS_MAX_LOG_LEVEL) && ((_level) <= ucm_global_opts.log_level)) { \ + __ucm_log(__FILE__, __LINE__, __FUNCTION__, (_level), _message, \ + ## __VA_ARGS__); \ + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.c +index cce6493fa..e27b9d57c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.c +@@ -19,7 +19,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +@@ -39,6 +39,7 @@ typedef struct ucm_auxv { + + + typedef struct ucm_reloc_dl_iter_context { ++ Dl_info def_dlinfo; + ucm_reloc_patch_t *patch; + ucs_status_t status; + } ucm_reloc_dl_iter_context_t; +@@ -143,7 +144,8 @@ static int ucm_reloc_get_aux_phsize() + + static ucs_status_t + ucm_reloc_modify_got(ElfW(Addr) base, const ElfW(Phdr) *phdr, const char *phname, +- int phnum, int phsize, ucm_reloc_patch_t *patch) ++ int phnum, int phsize, ++ const ucm_reloc_dl_iter_context_t *ctx) + { + ElfW(Phdr) *dphdr; + ElfW(Rela) *reloc; +@@ -156,12 +158,10 @@ ucm_reloc_modify_got(ElfW(Addr) base, const ElfW(Phdr) *phdr, const char *phname + void *page; + int ret; + int i; ++ Dl_info entry_dlinfo; ++ int success; + +- page_size = sysconf(_SC_PAGESIZE); +- if (page_size < 0) { +- ucm_error("failed to get page size: %m"); +- return UCS_ERR_IO_ERROR; +- } ++ page_size = ucm_get_page_size(); + + /* find PT_DYNAMIC */ + dphdr = NULL; +@@ -184,10 +184,10 @@ ucm_reloc_modify_got(ElfW(Addr) base, const ElfW(Phdr) *phdr, const char *phname + /* Find matching symbol and replace it */ + for (reloc = jmprel; (void*)reloc < jmprel + pltrelsz; ++reloc) { + elf_sym = (char*)strtab + symtab[ELF64_R_SYM(reloc->r_info)].st_name; +- if (!strcmp(patch->symbol, elf_sym)) { ++ if (!strcmp(ctx->patch->symbol, elf_sym)) { + entry = (void *)(base + reloc->r_offset); + +- ucm_trace("'%s' entry in '%s' is at %p", patch->symbol, ++ ucm_trace("'%s' entry in '%s' is at %p", ctx->patch->symbol, + basename(phname), entry); + + page = (void *)((intptr_t)entry & ~(page_size - 1)); +@@ -196,8 +196,21 @@ ucm_reloc_modify_got(ElfW(Addr) base, const ElfW(Phdr) *phdr, const char *phname + ucm_error("failed to modify GOT page %p to rw: %m", page); + return UCS_ERR_UNSUPPORTED; + } +- patch->prev_value = *entry; +- *entry = patch->value; ++ ++ success = dladdr(*entry, &entry_dlinfo); ++ ucs_assertv_always(success, "can't find shared object with entry %p", ++ *entry); ++ ++ /* store default entry to prev_value to guarantee valid pointers ++ * throughout life time of the process */ ++ if (ctx->def_dlinfo.dli_fbase == entry_dlinfo.dli_fbase) { ++ ctx->patch->prev_value = *entry; ++ ucm_trace("'%s' by address %p in '%s' is stored as original for %p", ++ ctx->patch->symbol, *entry, ++ basename(entry_dlinfo.dli_fname), ctx->patch->value); ++ } ++ ++ *entry = ctx->patch->value; + break; + } + } +@@ -209,6 +222,18 @@ static int ucm_reloc_phdr_iterator(struct dl_phdr_info *info, size_t size, void + { + ucm_reloc_dl_iter_context_t *ctx = data; + int phsize; ++ int i; ++ ++ /* check if module is black-listed for this patch */ ++ if (ctx->patch->blacklist) { ++ for (i = 0; ctx->patch->blacklist[i]; i++) { ++ if (strstr(info->dlpi_name, ctx->patch->blacklist[i])) { ++ /* module is black-listed */ ++ ctx->status = UCS_OK; ++ return 0; ++ } ++ } ++ } + + phsize = ucm_reloc_get_aux_phsize(); + if (phsize <= 0) { +@@ -219,7 +244,7 @@ static int ucm_reloc_phdr_iterator(struct dl_phdr_info *info, size_t size, void + + ctx->status = ucm_reloc_modify_got(info->dlpi_addr, info->dlpi_phdr, + info->dlpi_name, info->dlpi_phnum, +- phsize, ctx->patch); ++ phsize, ctx); + if (ctx->status == UCS_OK) { + return 0; /* continue iteration and patch all objects */ + } else { +@@ -230,10 +255,17 @@ static int ucm_reloc_phdr_iterator(struct dl_phdr_info *info, size_t size, void + /* called with lock held */ + static ucs_status_t ucm_reloc_apply_patch(ucm_reloc_patch_t *patch) + { +- ucm_reloc_dl_iter_context_t ctx = { +- .patch = patch, +- .status = UCS_OK +- }; ++ ucm_reloc_dl_iter_context_t ctx; ++ int success; ++ ++ /* Find default shared object, usually libc */ ++ success = dladdr(getpid, &ctx.def_dlinfo); ++ if (!success) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ ctx.patch = patch; ++ ctx.status = UCS_OK; + + /* Avoid locks here because we don't modify ELF data structures. + * Worst case the same symbol will be written more than once. +@@ -266,8 +298,8 @@ static void *ucm_dlopen(const char *filename, int flag) + */ + pthread_mutex_lock(&ucm_reloc_patch_list_lock); + ucs_list_for_each(patch, &ucm_reloc_patch_list, list) { +- ucm_debug("in dlopen(), re-applying '%s' to %p", patch->symbol, +- patch->value); ++ ucm_debug("in dlopen(%s), re-applying '%s' to %p", filename, ++ patch->symbol, patch->value); + ucm_reloc_apply_patch(patch); + } + pthread_mutex_unlock(&ucm_reloc_patch_list_lock); +@@ -318,6 +350,8 @@ static ucs_status_t ucm_reloc_install_dlopen() + return status; + } + ++ ucs_list_add_tail(&ucm_reloc_patch_list, &ucm_reloc_dlopen_patch.list); ++ + installed = 1; + return UCS_OK; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.h +index 36b1f0c13..430781bdf 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/reloc.h +@@ -22,6 +22,7 @@ typedef struct ucm_reloc_patch { + void *value; + void *prev_value; + ucs_list_link_t list; ++ char **blacklist; + } ucm_reloc_patch_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.c +index cde61b60e..9cce7fe3e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.c +@@ -8,13 +8,19 @@ + # include "config.h" + #endif + ++#include ++#include ++#include ++ + #include + #include + #include + #include ++#include + #include + #include + #include ++#include + + #if HAVE_CUDA + #include "ucm/cuda/cudamem.h" +@@ -26,28 +32,162 @@ + pthread_mutex_t ucm_reloc_get_orig_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; + pthread_t volatile ucm_reloc_get_orig_thread = -1; + +-UCM_DEFINE_REPLACE_FUNC(mmap, void*, MAP_FAILED, void*, size_t, int, int, int, off_t) +-UCM_DEFINE_REPLACE_FUNC(munmap, int, -1, void*, size_t) +-UCM_DEFINE_REPLACE_FUNC(mremap, void*, MAP_FAILED, void*, size_t, size_t, int) +-UCM_DEFINE_REPLACE_FUNC(shmat, void*, MAP_FAILED, int, const void*, int) +-UCM_DEFINE_REPLACE_FUNC(shmdt, int, -1, const void*) +-UCM_DEFINE_REPLACE_FUNC(sbrk, void*, MAP_FAILED, intptr_t) ++UCM_DEFINE_REPLACE_FUNC(mmap, void*, MAP_FAILED, void*, size_t, int, int, int, off_t) ++UCM_DEFINE_REPLACE_FUNC(munmap, int, -1, void*, size_t) ++UCM_DEFINE_REPLACE_FUNC(mremap, void*, MAP_FAILED, void*, size_t, size_t, int) ++UCM_DEFINE_REPLACE_FUNC(shmat, void*, MAP_FAILED, int, const void*, int) ++UCM_DEFINE_REPLACE_FUNC(shmdt, int, -1, const void*) ++UCM_DEFINE_REPLACE_FUNC(sbrk, void*, MAP_FAILED, intptr_t) ++UCM_DEFINE_REPLACE_FUNC(brk, int, -1, void*) ++UCM_DEFINE_REPLACE_FUNC(madvise, int, -1, void*, size_t, int) + +-#if ENABLE_SYMBOL_OVERRIDE +-UCM_OVERRIDE_FUNC(mmap, void) +-UCM_OVERRIDE_FUNC(munmap, void) +-UCM_OVERRIDE_FUNC(mremap, void) +-UCM_OVERRIDE_FUNC(shmat, void) +-UCM_OVERRIDE_FUNC(shmdt, void) +-UCM_OVERRIDE_FUNC(sbrk, void) +-#endif ++UCM_DEFINE_SELECT_FUNC(mmap, void*, MAP_FAILED, SYS_mmap, void*, size_t, int, int, int, off_t) ++UCM_DEFINE_SELECT_FUNC(munmap, int, -1, SYS_munmap, void*, size_t) ++UCM_DEFINE_SELECT_FUNC(mremap, void*, MAP_FAILED, SYS_mremap, void*, size_t, size_t, int) ++UCM_DEFINE_SELECT_FUNC(madvise, int, -1, SYS_madvise, void*, size_t, int) + + #if HAVE_CUDA + +-UCM_DEFINE_REPLACE_FUNC(cudaFree, cudaError_t, -1, void*) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemFree, CUresult,-1, CUdeviceptr) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemFreeHost, CUresult, -1, void *) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemAlloc, CUresult, -1, CUdeviceptr *, size_t) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemAllocManaged, CUresult, -1, CUdeviceptr *, ++ size_t, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemAllocPitch, CUresult, -1, CUdeviceptr *, size_t *, ++ size_t, size_t, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemHostGetDevicePointer, CUresult, -1, CUdeviceptr *, ++ void *, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cuMemHostUnregister, CUresult, -1, void *) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaFree, cudaError_t, -1, void*) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaFreeHost, cudaError_t, -1, void*) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaMalloc, cudaError_t, -1, void**, size_t) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaMallocManaged, cudaError_t, -1, void**, size_t, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaMallocPitch, cudaError_t, -1, void**, size_t *, ++ size_t, size_t) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaHostGetDevicePointer, cudaError_t, -1, void**, ++ void *, unsigned int) ++UCM_DEFINE_REPLACE_DLSYM_FUNC(cudaHostUnregister, cudaError_t, -1, void*) + + #if ENABLE_SYMBOL_OVERRIDE +-UCM_OVERRIDE_FUNC(cudaFree, cudaError_t) ++UCM_OVERRIDE_FUNC(cuMemFree, CUresult) ++UCM_OVERRIDE_FUNC(cuMemFreeHost, CUresult) ++UCM_OVERRIDE_FUNC(cuMemAlloc, CUresult) ++UCM_OVERRIDE_FUNC(cuMemAllocManaged, CUresult) ++UCM_OVERRIDE_FUNC(cuMemAllocPitch, CUresult) ++UCM_OVERRIDE_FUNC(cuMemHostGetDevicePointer, CUresult) ++UCM_OVERRIDE_FUNC(cuMemHostUnregister, CUresult) ++UCM_OVERRIDE_FUNC(cudaFree, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaFreeHost, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaMalloc, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaMallocManaged, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaMallocPitch, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaHostGetDevicePointer, cudaError_t) ++UCM_OVERRIDE_FUNC(cudaHostUnregister, cudaError_t) + #endif + + #endif ++ ++#if UCM_BISTRO_HOOKS ++#if HAVE_DECL_SYS_SHMAT ++ ++UCM_DEFINE_SELECT_FUNC(shmat, void*, MAP_FAILED, SYS_shmat, int, const void*, int) ++ ++#elif HAVE_DECL_SYS_IPC ++# ifndef IPCOP_shmat ++# define IPCOP_shmat 21 ++# endif ++ ++_UCM_DEFINE_DLSYM_FUNC(shmat, ucm_orig_dlsym_shmat, ucm_override_shmat, ++ void*, MAP_FAILED, int, const void*, int) ++ ++void *ucm_orig_shmat(int shmid, const void *shmaddr, int shmflg) ++{ ++ unsigned long res; ++ void *addr; ++ ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ return ucm_orig_dlsym_shmat(shmid, shmaddr, shmflg); ++ } else { ++ /* Using IPC syscall of shmat implementation */ ++ res = syscall(SYS_ipc, IPCOP_shmat, shmid, shmflg, &addr, shmaddr); ++ ++ return res ? MAP_FAILED : addr; ++ } ++} ++ ++#endif ++ ++#if HAVE_DECL_SYS_SHMDT ++ ++UCM_DEFINE_SELECT_FUNC(shmdt, int, -1, SYS_shmdt, const void*) ++ ++#elif HAVE_DECL_SYS_IPC ++# ifndef IPCOP_shmdt ++# define IPCOP_shmdt 22 ++# endif ++ ++_UCM_DEFINE_DLSYM_FUNC(shmdt, ucm_orig_dlsym_shmdt, ucm_override_shmdt, ++ int, -1, const void*) ++ ++int ucm_orig_shmdt(const void *shmaddr) ++{ ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ return ucm_orig_dlsym_shmdt(shmaddr); ++ } else { ++ /* Using IPC syscall of shmdt implementation */ ++ return syscall(SYS_ipc, IPCOP_shmdt, 0, 0, 0, shmaddr); ++ } ++} ++ ++#endif ++ ++#if HAVE___CURBRK ++extern void *__curbrk; ++#endif ++ ++_UCM_DEFINE_DLSYM_FUNC(brk, ucm_orig_dlsym_brk, ucm_override_brk, int, -1, void*) ++ ++void *ucm_brk_syscall(void *addr) ++{ ++ return (void*)syscall(SYS_brk, addr); ++} ++ ++int ucm_orig_brk(void *addr) ++{ ++ void *new_addr; ++ ++#if HAVE___CURBRK ++ __curbrk = ++#endif ++ new_addr = ucm_brk_syscall(addr); ++ ++ if (new_addr < addr) { ++ errno = ENOMEM; ++ return -1; ++ } else { ++ return 0; ++ } ++} ++ ++_UCM_DEFINE_DLSYM_FUNC(sbrk, ucm_orig_dlsym_sbrk, ucm_override_sbrk, ++ void*, MAP_FAILED, intptr_t) ++ ++void *ucm_orig_sbrk(intptr_t increment) ++{ ++ void *prev; ++ ++ if (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_RELOC) { ++ return ucm_orig_dlsym_sbrk(increment); ++ } else { ++ prev = ucm_brk_syscall(0); ++ return ucm_orig_brk(prev + increment) ? (void*)-1 : prev; ++ } ++} ++ ++#else /* UCM_BISTRO_HOOKS */ ++ ++UCM_DEFINE_DLSYM_FUNC(sbrk, void*, MAP_FAILED, intptr_t) ++UCM_DEFINE_DLSYM_FUNC(shmat, void*, MAP_FAILED, int, const void*, int) ++UCM_DEFINE_DLSYM_FUNC(shmdt, int, -1, const void*) ++ ++#endif /* UCM_BISTRO_HOOKS */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.h +index 128e4a1a4..8e2c34bff 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/replace.h +@@ -20,12 +20,41 @@ extern pthread_t volatile ucm_reloc_get_orig_thread; + * the event handler, and if event handler returns error code - calls the original + * function. + */ ++ ++/* Due to CUDA API redifinition we have to create proxy macro to eliminate ++ * redifinition of internal finction names */ + #define UCM_DEFINE_REPLACE_FUNC(_name, _rettype, _fail_val, ...) \ ++ _UCM_DEFINE_REPLACE_FUNC(ucm_override_##_name, ucm_##_name, _rettype, _fail_val, __VA_ARGS__) ++ ++#define _UCM_DEFINE_REPLACE_FUNC(_over_name, _ucm_name, _rettype, _fail_val, ...) \ + \ +- _rettype ucm_override_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)); \ ++ /* Define a symbol which goes to the replacement - in case we are loaded first */ \ ++ _rettype _over_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ ++ { \ ++ _rettype res; \ ++ UCM_BISTRO_PROLOGUE; \ ++ ucm_trace("%s()", __FUNCTION__); \ ++ \ ++ if (ucs_unlikely(ucm_reloc_get_orig_thread == pthread_self())) { \ ++ return _fail_val; \ ++ } \ ++ res = _ucm_name(UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ ++ UCM_BISTRO_EPILOGUE; \ ++ return res; \ ++ } ++ ++#define UCM_OVERRIDE_FUNC(_name, _rettype) \ ++ _rettype _name() __attribute__ ((alias (UCS_PP_QUOTE(ucm_override_##_name)))); \ ++ ++#define UCM_DEFINE_DLSYM_FUNC(_name, _rettype, _fail_val, ...) \ ++ _UCM_DEFINE_DLSYM_FUNC(_name, ucm_orig_##_name, ucm_override_##_name, \ ++ _rettype, _fail_val, __VA_ARGS__) ++ ++#define _UCM_DEFINE_DLSYM_FUNC(_name, _orig_name, _over_name, _rettype, _fail_val, ...) \ ++ _rettype _over_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)); \ + \ + /* Call the original function using dlsym(RTLD_NEXT) */ \ +- _rettype ucm_orig_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ ++ _rettype _orig_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ + { \ + typedef _rettype (*func_ptr_t) (__VA_ARGS__); \ + static func_ptr_t orig_func_ptr = NULL; \ +@@ -36,27 +65,41 @@ extern pthread_t volatile ucm_reloc_get_orig_thread; + pthread_mutex_lock(&ucm_reloc_get_orig_lock); \ + ucm_reloc_get_orig_thread = pthread_self(); \ + orig_func_ptr = ucm_reloc_get_orig(UCS_PP_QUOTE(_name), \ +- ucm_override_##_name); \ ++ _over_name); \ + ucm_reloc_get_orig_thread = -1; \ + pthread_mutex_unlock(&ucm_reloc_get_orig_lock); \ + } \ + return orig_func_ptr(UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ +- } \ +- \ +- /* Define a symbol which goes to the replacement - in case we are loaded first */ \ +- _rettype ucm_override_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ +- { \ +- ucm_trace("%s()", __FUNCTION__); \ +- \ +- if (ucs_unlikely(ucm_reloc_get_orig_thread == pthread_self())) { \ +- return _fail_val; \ +- } \ +- return ucm_##_name(UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ + } + +-#define UCM_OVERRIDE_FUNC(_name, _rettype) \ +- _rettype _name() __attribute__ ((alias ("ucm_override_" UCS_PP_QUOTE(_name)))); \ ++#define UCM_DEFINE_REPLACE_DLSYM_FUNC(_name, _rettype, _fail_val, ...) \ ++ _UCM_DEFINE_DLSYM_FUNC(_name, ucm_orig_##_name, ucm_override_##_name, \ ++ _rettype, _fail_val, __VA_ARGS__) \ ++ _UCM_DEFINE_REPLACE_FUNC(ucm_override_##_name, ucm_##_name, \ ++ _rettype, _fail_val, __VA_ARGS__) + ++#define UCM_DEFINE_SYSCALL_FUNC(_name, _rettype, _syscall_id, ...) \ ++ /* Call syscall */ \ ++ _rettype ucm_orig_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ ++ { \ ++ return (_rettype)syscall(_syscall_id, UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ ++ } ++ ++#if UCM_BISTRO_HOOKS ++# define UCM_DEFINE_SELECT_FUNC(_name, _rettype, _fail_val, _syscall_id, ...) \ ++ _UCM_DEFINE_DLSYM_FUNC(_name, ucm_orig_##_name##_dlsym, ucm_override_##_name, \ ++ _rettype, _fail_val, __VA_ARGS__) \ ++ UCM_DEFINE_SYSCALL_FUNC(_name##_syscall, _rettype, _syscall_id, __VA_ARGS__) \ ++ _rettype ucm_orig_##_name(UCM_FUNC_DEFINE_ARGS(__VA_ARGS__)) \ ++ { \ ++ return (ucm_mmap_hook_mode() == UCM_MMAP_HOOK_BISTRO) ? \ ++ ucm_orig_##_name##_syscall(UCM_FUNC_PASS_ARGS(__VA_ARGS__)) : \ ++ ucm_orig_##_name##_dlsym(UCM_FUNC_PASS_ARGS(__VA_ARGS__)); \ ++ } ++#else ++# define UCM_DEFINE_SELECT_FUNC(_name, _rettype, _fail_val, _syscall_id, ...) \ ++ UCM_DEFINE_DLSYM_FUNC(_name, _rettype, _fail_val, __VA_ARGS__) ++#endif + + /* + * Define argument list with given types. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.c +index bee9b48f2..ea98df966 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.c +@@ -6,8 +6,13 @@ + + #include "sys.h" + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + #include ++#include + #include + #include + #include +@@ -20,8 +25,18 @@ + + #define UCM_PROC_SELF_MAPS "/proc/self/maps" + +- +-static size_t ucm_get_page_size() ++ucm_global_config_t ucm_global_opts = { ++ .log_level = UCS_LOG_LEVEL_WARN, ++ .enable_events = 1, ++ .mmap_hook_mode = UCM_DEFAULT_HOOK_MODE, ++ .enable_malloc_hooks = 1, ++ .enable_malloc_reloc = 0, ++ .enable_cuda_reloc = 1, ++ .enable_dynamic_mmap_thresh = 1, ++ .alloc_alignment = 16 ++}; ++ ++size_t ucm_get_page_size() + { + static long page_size = -1; + long value; +@@ -229,3 +244,15 @@ size_t ucm_get_shm_seg_size(const void *shmaddr) + ucm_parse_proc_self_maps(ucm_get_shm_seg_size_cb, &ctx); + return ctx.seg_size; + } ++ ++void ucm_strerror(int eno, char *buf, size_t max) ++{ ++#if STRERROR_R_CHAR_P ++ char *ret = strerror_r(eno, buf, max); ++ if (ret != buf) { ++ strncpy(buf, ret, max); ++ } ++#else ++ (void)strerror_r(eno, buf, max); ++#endif ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.h +index 3ac09ebcd..9cb7deafb 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/sys.h +@@ -35,6 +35,12 @@ void *ucm_sys_realloc(void *oldptr, size_t newsize); + typedef int (*ucm_proc_maps_cb_t)(void *arg, void *addr, size_t length, int prot); + + ++/** ++ * @return Page size on the system. ++ */ ++size_t ucm_get_page_size(); ++ ++ + /** + * Read and process entries from /proc/self/maps. + * +@@ -54,4 +60,14 @@ void ucm_parse_proc_self_maps(ucm_proc_maps_cb_t cb, void *arg); + size_t ucm_get_shm_seg_size(const void *shmaddr); + + ++/** ++ * @brief Convert a errno number to error string ++ * ++ * @param [in] en errno value ++ * @param [out] buf Buffer to put the error string in ++ * @param [in] max Size of the buffer ++ */ ++void ucm_strerror(int eno, char *buf, size_t max); ++ ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.c +deleted file mode 100644 +index 29657e9d2..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.c ++++ /dev/null +@@ -1,222 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#include "ucm_config.h" +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#define UCM_ENV_PREFIX UCS_CONFIG_PREFIX "MEM_" +- +-#define UCM_LOG_LEVEL_VAR "LOG_LEVEL" +-#define UCM_ALLOC_ALIGN_VAR "ALLOC_ALIGN" +-#define UCM_EN_EVENTS_VAR "EVENTS" +-#define UCM_EN_MMAP_RELOC_VAR "MMAP_RELOC" +-#define UCM_EN_MALLOC_HOOKS_VAR "MALLOC_HOOKS" +-#define UCM_EN_MALLOC_RELOC_VAR "MALLOC_RELOC" +-#define UCM_EN_DYNAMIC_MMAP_VAR "DYNAMIC_MMAP_THRESH" +-#define UCM_EN_CUDA_HOOKS_VAR "CUDA_HOOKS" +- +- +-ucm_config_t ucm_global_config = { +- .log_level = UCS_LOG_LEVEL_WARN, +- .alloc_alignment = 16, +- .enable_events = 1, +- .enable_mmap_reloc = 1, +- .enable_malloc_hooks = 1, +- .enable_malloc_reloc = 0, +- .enable_dynamic_mmap_thresh = 1, +-#if HAVE_CUDA +- .enable_cuda_hooks = 1 +-#endif +-}; +- +-static const char *ucm_config_bool_to_string(int value) +-{ +- return value ? "yes" : "no"; +-} +- +-static void ucm_config_print_doc(FILE *stream, const char *doc, const char *syntax, +- ucs_config_print_flags_t print_flags) +-{ +- if (!(print_flags & UCS_CONFIG_PRINT_DOC)) { +- return; +- } +- +- fprintf(stream, "\n"); +- fprintf(stream, "#\n"); +- fprintf(stream, "# %s\n", doc); +- fprintf(stream, "#\n"); +- fprintf(stream, "# Syntax: %s\n", syntax); +- fprintf(stream, "#\n"); +-} +- +-static void ucm_config_print_bool_doc(FILE *stream, const char *doc, +- ucs_config_print_flags_t print_flags) +-{ +- ucm_config_print_doc(stream, doc, "", print_flags); +-} +- +-void ucm_config_print(FILE *stream, ucs_config_print_flags_t print_flags) +-{ +- if (print_flags & UCS_CONFIG_PRINT_HEADER) { +- fprintf(stream, "#\n"); +- fprintf(stream, "# UCM configuration\n"); +- fprintf(stream, "#\n"); +- } +- +- if (!(print_flags & UCS_CONFIG_PRINT_CONFIG)) { +- return; +- } +- +- ucm_config_print_doc(stream, +- "Logging level", "", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_LOG_LEVEL_VAR, +- ucm_log_level_names[ucm_global_config.log_level]); +- +- ucm_config_print_doc(stream, +- "Minimal alignment of allocated blocks", +- "long integer", print_flags); +- fprintf(stream, "%s%s=%zu\n", UCM_ENV_PREFIX, UCM_ALLOC_ALIGN_VAR, +- ucm_global_config.alloc_alignment); +- +- ucm_config_print_bool_doc(stream, +- "Enable memory events", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_EVENTS_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_events)); +- +- ucm_config_print_bool_doc(stream, +- "Enable installing mmap symbols in the relocation table", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_MMAP_RELOC_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_mmap_reloc)); +- +- ucm_config_print_bool_doc(stream, +- "Enable using glibc malloc hooks", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_MALLOC_HOOKS_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_malloc_hooks)); +- +- ucm_config_print_bool_doc(stream, +- "Enable installing malloc symbols in the relocation table.\n" +- "This is unsafe and off by default, because sometimes glibc\n" +- "calls malloc/free without going through the relocation table,\n" +- "which would use the original implementation and not ours.", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_MALLOC_RELOC_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_malloc_reloc)); +- +- +- ucm_config_print_bool_doc(stream, +- "Enable dynamic mmap threshold: for every released block, the\n" +- "mmap threshold is adjusted upward to the size of the size of\n" +- "the block, and trim threshold is adjust to twice the size of\n" +- "the dynamic mmap threshold.", +- print_flags); +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_DYNAMIC_MMAP_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_dynamic_mmap_thresh)); +- +- +-#if HAVE_CUDA +- fprintf(stream, "%s%s=%s\n", UCM_ENV_PREFIX, UCM_EN_CUDA_HOOKS_VAR, +- ucm_config_bool_to_string(ucm_global_config.enable_cuda_hooks)); +-#endif +-} +- +-static void ucm_config_set_value_table(const char *str_value, const char **table, +- int *value) +-{ +- int i; +- +- for (i = 0; table[i] != NULL; ++i) { +- if (!strcasecmp(table[i], str_value)) { +- ucm_global_config.log_level = i; +- return; +- } +- } +-} +- +-static void ucm_config_set_value_bool(const char *str_value, int *value) +-{ +- if (!strcasecmp(str_value, "1") || !strcasecmp(str_value, "y") || !strcasecmp(str_value, "yes")) { +- *value = 1; +- } else if (!strcasecmp(str_value, "0") || !strcasecmp(str_value, "n") || !strcasecmp(str_value, "no")) { +- *value = 0; +- } +-} +- +-static void ucm_config_set_value_size(const char *str_value, size_t *value) +-{ +- char *endptr; +- size_t n; +- +- n = strtoul(str_value, &endptr, 10); +- if (*endptr == '\0') { +- *value = n; +- } +-} +- +-ucs_status_t ucm_config_modify(const char *name, const char *value) +-{ +- if (!strcmp(name, UCM_LOG_LEVEL_VAR)) { +- ucm_config_set_value_table(value, ucm_log_level_names, +- (int*)&ucm_global_config.log_level); +- } else if (!strcmp(name, UCM_ALLOC_ALIGN_VAR)) { +- ucm_config_set_value_size(value, &ucm_global_config.alloc_alignment); +- } else if (!strcmp(name, UCM_EN_EVENTS_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_events); +- } else if (!strcmp(name, UCM_EN_MMAP_RELOC_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_mmap_reloc); +- } else if (!strcmp(name, UCM_EN_MALLOC_HOOKS_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_malloc_hooks); +- } else if (!strcmp(name, UCM_EN_MALLOC_RELOC_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_malloc_reloc); +- } else if (!strcmp(name, UCM_EN_DYNAMIC_MMAP_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_dynamic_mmap_thresh); +-#if HAVE_CUDA +- } else if (!strcmp(name, UCM_EN_CUDA_HOOKS_VAR)) { +- ucm_config_set_value_bool(value, &ucm_global_config.enable_cuda_hooks); +-#endif +- } else { +- return UCS_ERR_INVALID_PARAM; +- } +- +- return UCS_OK; +-} +- +-static void ucm_config_set(const char *name) +-{ +- char var_name[64]; +- char *str_value; +- +- snprintf(var_name, sizeof(var_name), "%s%s", UCM_ENV_PREFIX, name); +- str_value = getenv(var_name); +- if (str_value != NULL) { +- ucm_config_modify(name, str_value); +- } +-} +- +-UCS_STATIC_INIT { +- if (RUNNING_ON_VALGRIND) { +- /* Valgrind limits the size of brk() segments to 8mb, so must use mmap +- * for large allocations. +- */ +- ucm_global_config.enable_dynamic_mmap_thresh = 0; +- } +- ucm_config_set(UCM_LOG_LEVEL_VAR); +- ucm_config_set(UCM_ALLOC_ALIGN_VAR); +- ucm_config_set(UCM_EN_EVENTS_VAR); +- ucm_config_set(UCM_EN_MMAP_RELOC_VAR); +- ucm_config_set(UCM_EN_MALLOC_HOOKS_VAR); +- ucm_config_set(UCM_EN_MALLOC_RELOC_VAR); +- ucm_config_set(UCM_EN_DYNAMIC_MMAP_VAR); +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.h +deleted file mode 100644 +index c99fcd503..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucm/util/ucm_config.h ++++ /dev/null +@@ -1,31 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#ifndef UCM_UTIL_CONFIG_H_ +-#define UCM_UTIL_CONFIG_H_ +- +-#include +-#include +-#include +- +- +-typedef struct ucm_config { +- ucs_log_level_t log_level; +- int enable_events; +- int enable_mmap_reloc; +- int enable_malloc_hooks; +- int enable_malloc_reloc; +- int enable_dynamic_mmap_thresh; +-#if HAVE_CUDA +- int enable_cuda_hooks; +-#endif +- size_t alloc_alignment; +-} ucm_config_t; +- +- +-extern ucm_config_t ucm_global_config; +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/Makefile.am +index 4c6a63e5b..f690c3c92 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/Makefile.am +@@ -22,7 +22,6 @@ nobase_dist_libucp_la_HEADERS = \ + endif + + noinst_HEADERS = \ +- amo/amo.inl \ + core/ucp_context.h \ + core/ucp_ep.h \ + core/ucp_ep.inl \ +@@ -41,19 +40,20 @@ noinst_HEADERS = \ + dt/dt_generic.h \ + proto/proto.h \ + proto/proto_am.inl \ ++ rma/rma.h \ ++ rma/rma.inl \ + tag/eager.h \ + tag/rndv.h \ + tag/tag_match.h \ + tag/tag_match.inl \ + tag/offload.h \ + wireup/address.h \ ++ wireup/ep_match.h \ + wireup/wireup_ep.h \ + wireup/wireup.h \ + stream/stream.h + + libucp_la_SOURCES = \ +- amo/basic_amo.c \ +- amo/nb_amo.c \ + core/ucp_context.c \ + core/ucp_ep.c \ + core/ucp_listener.c \ +@@ -68,7 +68,12 @@ libucp_la_SOURCES = \ + dt/dt_generic.c \ + dt/dt.c \ + proto/proto_am.c \ +- rma/basic_rma.c \ ++ rma/amo_basic.c \ ++ rma/amo_send.c \ ++ rma/amo_sw.c \ ++ rma/rma_basic.c \ ++ rma/rma_send.c \ ++ rma/rma_sw.c \ + rma/flush.c \ + tag/eager_rcv.c \ + tag/eager_snd.c \ +@@ -79,6 +84,7 @@ libucp_la_SOURCES = \ + tag/tag_send.c \ + tag/offload.c \ + wireup/address.c \ ++ wireup/ep_match.c \ + wireup/select.c \ + wireup/signaling_ep.c \ + wireup/wireup_ep.c \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/amo.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/amo.inl +deleted file mode 100644 +index 75f1ad425..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/amo.inl ++++ /dev/null +@@ -1,270 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +- * Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#ifndef UCP_AMO_INL_ +-#define UCP_AMO_INL_ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-static inline +-ucs_status_t ucp_amo_check_send_status(ucp_request_t *req, ucs_status_t status); +- +-#define UCP_AMO_ONE_PARAM (value) +-#define UCP_AMO_TWO_PARAM (value, *result) +- +-#define _UCP_PROGRESS_AMO_NAME(_function) \ +- UCS_PP_TOKENPASTE(ucp_amo_progress_, _function) +- +-#define UCP_PROGRESS_AMO_DECL(_type, _function, _params) \ +- static ucs_status_t _UCP_PROGRESS_AMO_NAME(_function)(uct_pending_req_t *_self) \ +- { \ +- ucp_request_t *req = ucs_container_of(_self, ucp_request_t, send.uct); \ +- ucp_rkey_h rkey = req->send.amo.rkey; \ +- ucp_ep_t *ep = req->send.ep; \ +- _type value = (_type)req->send.amo.value; \ +- _type *result = (_type *)req->send.amo.result; \ +- uint64_t remote_addr = req->send.amo.remote_addr; \ +- ucs_status_t status; \ +- \ +- status = UCP_RKEY_RESOLVE(rkey, ep, amo); \ +- if (status != UCS_OK) { \ +- return UCS_ERR_UNREACHABLE; \ +- } \ +- \ +- req->send.lane = rkey->cache.amo_lane; \ +- status = _function(ep->uct_eps[req->send.lane], \ +- UCS_PP_TUPLE_BREAK _params, \ +- remote_addr, rkey->cache.amo_rkey, result, \ +- &req->send.state.uct_comp); \ +- return ucp_amo_check_send_status(req, status); \ +- } +- +-UCP_PROGRESS_AMO_DECL(uint32_t, uct_ep_atomic_swap32, UCP_AMO_ONE_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint32_t, uct_ep_atomic_fadd32, UCP_AMO_ONE_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint32_t, uct_ep_atomic_cswap32, UCP_AMO_TWO_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint64_t, uct_ep_atomic_swap64, UCP_AMO_ONE_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint64_t, uct_ep_atomic_fadd64, UCP_AMO_ONE_PARAM) +- +-UCP_PROGRESS_AMO_DECL(uint64_t, uct_ep_atomic_cswap64, UCP_AMO_TWO_PARAM) +- +-#define UCP_POST_AMO_DECL(_type, _function) \ +- static ucs_status_t _UCP_PROGRESS_AMO_NAME(_function)(uct_pending_req_t *_self) \ +- { \ +- ucp_request_t *req = ucs_container_of(_self, ucp_request_t, send.uct); \ +- ucp_rkey_h rkey = req->send.amo.rkey; \ +- ucp_ep_t *ep = req->send.ep; \ +- _type value = (_type)req->send.amo.value; \ +- uint64_t remote_addr = req->send.amo.remote_addr; \ +- ucs_status_t status; \ +- \ +- status = UCP_RKEY_RESOLVE(rkey, ep, amo); \ +- if (status != UCS_OK) { \ +- return UCS_ERR_UNREACHABLE; \ +- } \ +- \ +- req->send.lane = rkey->cache.amo_lane; \ +- status = UCS_PROFILE_CALL(_function, ep->uct_eps[req->send.lane], value, \ +- remote_addr, rkey->cache.amo_rkey); \ +- return ucp_amo_check_send_status(req, status); \ +- } +- +-UCP_POST_AMO_DECL(uint64_t, uct_ep_atomic_add64) +- +-UCP_POST_AMO_DECL(uint32_t, uct_ep_atomic_add32) +- +-#define UCP_AMO_WITHOUT_RESULT(_ep, _param, _remote_addr, _rkey, _uct_func, _size) \ +- { \ +- ucs_status_t status; \ +- \ +- status = ucp_rma_check_atomic(_remote_addr, _size); \ +- if (status != UCS_OK) { \ +- goto out; \ +- } \ +- \ +- UCP_THREAD_CS_ENTER_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- for (;;) { \ +- status = UCP_RKEY_RESOLVE(_rkey, _ep, amo); \ +- if (status != UCS_OK) { \ +- goto out_unlock; \ +- } \ +- \ +- status = UCS_PROFILE_CALL(_uct_func, (_ep)->uct_eps[(_rkey)->cache.amo_lane], \ +- _param, _remote_addr, (_rkey)->cache.amo_rkey); \ +- if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { \ +- UCP_THREAD_CS_EXIT_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- return status; \ +- } \ +- ucp_worker_progress((_ep)->worker); \ +- } \ +- \ +- status = UCS_OK; \ +- out_unlock: \ +- UCP_THREAD_CS_EXIT_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- out: \ +- return status; \ +- } +- +-#define UCP_RMA_CHECK_ATOMIC_PTR(_addr, _op_size) \ +- do { \ +- ucs_status_t status = ucp_rma_check_atomic(_addr, _op_size); \ +- \ +- if (status != UCS_OK) { \ +- return UCS_STATUS_PTR(status); \ +- } \ +- } while(0) +- +-static inline +-ucs_status_t ucp_amo_check_send_status(ucp_request_t *req, ucs_status_t status) +-{ +- if (status == UCS_INPROGRESS) { +- return UCS_OK; +- } +- /* Complete for UCS_OK and unexpected errors */ +- if (status != UCS_ERR_NO_RESOURCE) { +- ucp_request_complete_send(req, status); +- } +- return status; +-} +- +-static void ucp_amo_completed_single(uct_completion_t *self, +- ucs_status_t status) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, +- send.state.uct_comp); +- ucs_trace("Invoking completion on AMO request %p", req); +- ucp_request_complete_send(req, status); +-} +- +-static inline ucs_status_t ucp_rma_check_atomic(uint64_t remote_addr, size_t size) +-{ +- if (ENABLE_PARAMS_CHECK && ((remote_addr % size) != 0)) { +- ucs_debug("Error: Atomic variable must be naturally aligned " +- "(got address 0x%"PRIx64", atomic size %zu)", (remote_addr), +- (size)); +- return UCS_ERR_INVALID_PARAM; +- } +- return UCS_OK; +-} +- +-static inline ucs_status_ptr_t +-ucp_amo_send_request(ucp_request_t *req, ucp_send_callback_t cb) +-{ +- ucs_status_t status = ucp_request_send(req); +- +- if (req->flags & UCP_REQUEST_FLAG_COMPLETED) { +- ucs_trace_req("releasing send request %p, returning status %s", req, +- ucs_status_string(status)); +- ucs_mpool_put(req); +- return UCS_STATUS_PTR(status); +- } +- ucs_trace_req("returning amo request %p, status %s", req, +- ucs_status_string(status)); +- ucp_request_set_callback(req, send.cb, cb); +- return req + 1; +-} +- +-static inline +-uct_pending_callback_t ucp_amo_select_uct_func(ucp_atomic_fetch_op_t opcode, size_t op_size) +-{ +- uct_pending_callback_t progress_func; +- +- if (op_size == sizeof(uint64_t)) { +- switch (opcode) { +- case UCP_ATOMIC_FETCH_OP_CSWAP: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_cswap64); +- break; +- case UCP_ATOMIC_FETCH_OP_SWAP: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_swap64); +- break; +- case UCP_ATOMIC_FETCH_OP_FADD: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_fadd64); +- break; +- default: +- progress_func = NULL; +- } +- } else { +- switch (opcode) { +- case UCP_ATOMIC_FETCH_OP_CSWAP: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_cswap32); +- break; +- case UCP_ATOMIC_FETCH_OP_SWAP: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_swap32); +- break; +- case UCP_ATOMIC_FETCH_OP_FADD: +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_fadd32); +- break; +- default: +- progress_func = NULL; +- } +- } +- return progress_func; +-} +- +-static inline +-uct_pending_callback_t ucp_amo_post_select_uct_func(ucp_atomic_post_op_t opcode, size_t op_size) +-{ +- uct_pending_callback_t progress_func; +- +- if (opcode != UCP_ATOMIC_POST_OP_ADD) { +- return NULL; +- } +- switch (op_size) { +- case sizeof(uint32_t): +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_add32); +- break; +- case sizeof(uint64_t): +- progress_func = _UCP_PROGRESS_AMO_NAME(uct_ep_atomic_add64); +- break; +- default: +- progress_func = NULL; +- } +- +- return progress_func; +-} +- +-static inline void init_amo_common(ucp_request_t *req, ucp_ep_h ep, uint64_t remote_addr, +- ucp_rkey_h rkey, uint64_t value) +-{ +- req->flags = 0; +- req->send.ep = ep; +- req->send.amo.remote_addr = remote_addr; +- req->send.amo.rkey = rkey; +- req->send.amo.value = value; +-#if ENABLE_ASSERT +- req->send.lane = UCP_NULL_LANE; +-#endif +-} +- +-static inline void init_amo_req(ucp_request_t *req, ucp_ep_h ep, void *buffer, +- ucp_atomic_fetch_op_t op, size_t op_size, uint64_t remote_addr, +- ucp_rkey_h rkey, uint64_t value) +-{ +- init_amo_common(req, ep, remote_addr, rkey, value); +- req->send.state.uct_comp.count = 1; +- req->send.state.uct_comp.func = ucp_amo_completed_single; +- req->send.amo.result = buffer; +- req->send.uct.func = ucp_amo_select_uct_func(op, op_size); +-} +- +-static inline void init_amo_post(ucp_request_t *req, ucp_ep_h ep, ucp_atomic_post_op_t op, +- size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey, +- uint64_t value) +-{ +- init_amo_common(req, ep, remote_addr, rkey, value); +- req->send.uct.func = ucp_amo_post_select_uct_func(op, op_size); +-} +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/basic_amo.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/basic_amo.c +deleted file mode 100644 +index cce66acee..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/basic_amo.c ++++ /dev/null +@@ -1,120 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#define UCP_AMO_WITH_RESULT(_ep, _params, _remote_addr, _rkey, _result, _uct_func, _size) \ +- { \ +- uct_completion_t comp; \ +- ucs_status_t status; \ +- \ +- status = ucp_rma_check_atomic(_remote_addr, _size); \ +- if (status != UCS_OK) { \ +- goto out; \ +- } \ +- \ +- UCP_THREAD_CS_ENTER_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- comp.count = 2; \ +- \ +- for (;;) { \ +- status = UCP_RKEY_RESOLVE(_rkey, _ep, amo); \ +- if (status != UCS_OK) { \ +- goto out_unlock; \ +- } \ +- \ +- status = UCS_PROFILE_CALL(_uct_func, (_ep)->uct_eps[(_rkey)->cache.amo_lane], \ +- UCS_PP_TUPLE_BREAK _params, _remote_addr, \ +- (_rkey)->cache.amo_rkey, _result, &comp); \ +- if (ucs_likely(status == UCS_OK)) { \ +- goto out_unlock; \ +- } else if (status == UCS_INPROGRESS) { \ +- goto out_wait; \ +- } else if (status != UCS_ERR_NO_RESOURCE) { \ +- goto out_unlock; \ +- } \ +- ucp_worker_progress((_ep)->worker); \ +- } \ +- out_wait: \ +- do { \ +- ucp_worker_progress((_ep)->worker); \ +- } while (comp.count != 1); \ +- status = UCS_OK; \ +- out_unlock: \ +- UCP_THREAD_CS_EXIT_CONDITIONAL(&(_ep)->worker->mt_lock); \ +- out: \ +- return status; \ +- } +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_add32, (ep, add, remote_addr, rkey), +- ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- UCP_AMO_WITHOUT_RESULT(ep, add, remote_addr, rkey, +- uct_ep_atomic_add32, sizeof(uint32_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_add64, (ep, add, remote_addr, rkey), +- ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- UCP_AMO_WITHOUT_RESULT(ep, add, remote_addr, rkey, +- uct_ep_atomic_add64, sizeof(uint64_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_fadd32, (ep, add, remote_addr, rkey, result), +- ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey, +- uint32_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (add), remote_addr, rkey, result, +- uct_ep_atomic_fadd32, sizeof(uint32_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_fadd64, (ep, add, remote_addr, rkey, result), +- ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey, +- uint64_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (add), remote_addr, rkey, result, +- uct_ep_atomic_fadd64, sizeof(uint64_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_swap32, (ep, swap, remote_addr, rkey, result), +- ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, ucp_rkey_h rkey, +- uint32_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (swap), remote_addr, rkey, result, +- uct_ep_atomic_swap32, sizeof(uint32_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_swap64, (ep, swap, remote_addr, rkey, result), +- ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, ucp_rkey_h rkey, +- uint64_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (swap), remote_addr, rkey, result, +- uct_ep_atomic_swap64, sizeof(uint64_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_cswap32, +- (ep, compare, swap, remote_addr, rkey, result), +- ucp_ep_h ep, uint32_t compare, uint32_t swap, +- uint64_t remote_addr, ucp_rkey_h rkey, uint32_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (compare, swap), remote_addr, rkey, result, +- uct_ep_atomic_cswap32, sizeof(uint32_t)); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_cswap64, +- (ep, compare, swap, remote_addr, rkey, result), +- ucp_ep_h ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, ucp_rkey_h rkey, uint64_t *result) +-{ +- UCP_AMO_WITH_RESULT(ep, (compare, swap), remote_addr, rkey, result, +- uct_ep_atomic_cswap64, sizeof(uint64_t)); +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/nb_amo.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/nb_amo.c +deleted file mode 100644 +index c629d0e07..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/amo/nb_amo.c ++++ /dev/null +@@ -1,81 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +- * Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. +- * +- * See file LICENSE for terms. +- */ +- +-#include "amo.inl" +-#include +-#include +-#include +-#include +-#include +-#include +- +-ucs_status_ptr_t ucp_atomic_fetch_nb(ucp_ep_h ep, ucp_atomic_fetch_op_t opcode, +- uint64_t value, void *result, size_t op_size, +- uint64_t remote_addr, ucp_rkey_h rkey, +- ucp_send_callback_t cb) +-{ +- ucp_request_t *req; +- ucs_status_ptr_t status; +- UCP_RMA_CHECK_ATOMIC_PTR(remote_addr, op_size); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- req = ucp_request_get(ep->worker); +- if (ucs_unlikely(NULL == req)) { +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); +- } +- init_amo_req(req, ep, result, opcode, op_size, remote_addr, rkey, value); +- status = ucp_amo_send_request(req, cb); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t value, +- size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucs_status_ptr_t status_p; +- ucs_status_t status; +- ucp_request_t *req; +- +- if (ucs_unlikely(opcode != UCP_ATOMIC_POST_OP_ADD)) { +- return UCS_ERR_INVALID_PARAM; +- } +- status = ucp_rma_check_atomic(remote_addr, op_size); +- if (status != UCS_OK) { +- return status; +- } +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, amo); +- if (status != UCS_OK) { +- goto out; +- } +- if (op_size == sizeof(uint32_t)) { +- status = UCS_PROFILE_CALL(uct_ep_atomic_add32, ep->uct_eps[rkey->cache.amo_lane], +- (uint32_t)value, remote_addr, rkey->cache.amo_rkey); +- } else if (op_size == sizeof(uint64_t)) { +- status = UCS_PROFILE_CALL(uct_ep_atomic_add64, ep->uct_eps[rkey->cache.amo_lane], +- (uint64_t)value, remote_addr, rkey->cache.amo_rkey); +- } +- if (ucs_unlikely(status == UCS_ERR_NO_RESOURCE)) { +- req = ucp_request_get(ep->worker); +- if (ucs_unlikely(NULL == req)) { +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return UCS_ERR_NO_MEMORY; +- } +- init_amo_post(req, ep, opcode, op_size, remote_addr, rkey, value); +- status_p = ucp_amo_send_request(req, (ucp_send_callback_t)ucs_empty_function); +- if (UCS_PTR_IS_PTR(status_p)) { +- ucp_request_release(status_p); +- status = UCS_INPROGRESS; +- } else { +- status = UCS_PTR_STATUS(status_p); +- } +- } +-out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp.h +index 4fe28ce03..e029d5bbd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp.h +@@ -2,6 +2,7 @@ + * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. + * Copyright (C) UT-Battelle, LLC. 2014-2017. ALL RIGHTS RESERVED. + * Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED. ++* Copyright (C) Los Alamos National Security, LLC. 2018 ALL RIGHTS RESERVED. + * See file LICENSE for terms. + */ + +@@ -172,13 +173,19 @@ enum ucp_worker_params_field { + * are present. It is used for the enablement of backward compatibility support. + */ + enum ucp_listener_params_field { +- UCP_LISTENER_PARAM_FIELD_SOCK_ADDR = UCS_BIT(0), /**< Sock address and +- length */ +- UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER = UCS_BIT(1) /**< User's callback +- and argument +- for handling the +- creation of an +- endpoint */ ++ /** ++ * Sock address and length. ++ */ ++ UCP_LISTENER_PARAM_FIELD_SOCK_ADDR = UCS_BIT(0), ++ ++ /** ++ * User's callback and argument for handling the creation of an endpoint. ++ * */ ++ UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER = UCS_BIT(1), ++ ++ /**< User's callback and argument for handling the incoming connection ++ * request. */ ++ UCP_LISTENER_PARAM_FIELD_CONN_HANDLER = UCS_BIT(2) + }; + + +@@ -198,7 +205,8 @@ enum ucp_ep_params_field { + transport level errors */ + UCP_EP_PARAM_FIELD_USER_DATA = UCS_BIT(3), /**< User data pointer */ + UCP_EP_PARAM_FIELD_SOCK_ADDR = UCS_BIT(4), /**< Socket address field */ +- UCP_EP_PARAM_FIELD_FLAGS = UCS_BIT(5) /**< Endpoint flags */ ++ UCP_EP_PARAM_FIELD_FLAGS = UCS_BIT(5), /**< Endpoint flags */ ++ UCP_EP_PARAM_FIELD_CONN_REQUEST = UCS_BIT(6) /**< Connection request field */ + }; + + +@@ -210,7 +218,7 @@ enum ucp_ep_params_field { + * @ref ucp_ep_create() function. + */ + enum ucp_ep_params_flags_field { +- UCP_EP_PARAMS_FLAGS_CLIENT_SERVER = UCS_BIT(0) /**< Using a client-server ++ UCP_EP_PARAMS_FLAGS_CLIENT_SERVER = UCS_BIT(0), /**< Using a client-server + connection establishment + mechanism. + @ref ucs_sock_addr_t +@@ -218,6 +226,15 @@ enum ucp_ep_params_flags_field { + must be provided and + contain the address + of the remote peer */ ++ UCP_EP_PARAMS_FLAGS_NO_LOOPBACK = UCS_BIT(1) /**< Avoid connecting the ++ endpoint to itself when ++ connecting the endpoint ++ to the same worker it ++ was created on. ++ Affects protocols which ++ send to a particular ++ remote endpoint, for ++ example stream */ + }; + + +@@ -257,14 +274,12 @@ enum ucp_ep_close_mode { + enum ucp_mem_map_params_field { + UCP_MEM_MAP_PARAM_FIELD_ADDRESS = UCS_BIT(0), /**< Address of the memory that + would be used in the +- @ref ucp_mem_map routine, +- see @ref ucp_mem_map_matrix +- for details */ ++ @ref ucp_mem_map routine. */ + UCP_MEM_MAP_PARAM_FIELD_LENGTH = UCS_BIT(1), /**< The size of memory that + would be allocated or + registered in the + @ref ucp_mem_map routine.*/ +- UCP_MEM_MAP_PARAM_FIELD_FLAGS = UCS_BIT(2) /**< Allocation flags */ ++ UCP_MEM_MAP_PARAM_FIELD_FLAGS = UCS_BIT(2) /**< Allocation flags. */ + }; + + /** +@@ -276,7 +291,7 @@ enum ucp_mem_map_params_field { + */ + enum ucp_mem_advise_params_field { + UCP_MEM_ADVISE_PARAM_FIELD_ADDRESS = UCS_BIT(0), /**< Address of the memory */ +- UCP_MEM_ADVISE_PARAM_FIELD_LENGTH = UCS_BIT(1), /**< The size of memory */ ++ UCP_MEM_ADVISE_PARAM_FIELD_LENGTH = UCS_BIT(1), /**< The size of memory */ + UCP_MEM_ADVISE_PARAM_FIELD_ADVICE = UCS_BIT(2) /**< Advice on memory usage */ + }; + +@@ -357,6 +372,9 @@ enum { + */ + typedef enum { + UCP_ATOMIC_POST_OP_ADD, /**< Atomic add */ ++ UCP_ATOMIC_POST_OP_AND, /**< Atomic and */ ++ UCP_ATOMIC_POST_OP_OR, /**< Atomic or */ ++ UCP_ATOMIC_POST_OP_XOR, /**< Atomic xor */ + UCP_ATOMIC_POST_OP_LAST + } ucp_atomic_post_op_t; + +@@ -370,13 +388,32 @@ typedef enum { + * will fetch data from the remote node. + */ + typedef enum { +- UCP_ATOMIC_FETCH_OP_FADD, /**< Atomic Fetch and add */ +- UCP_ATOMIC_FETCH_OP_SWAP, /**< Atomic swap */ ++ UCP_ATOMIC_FETCH_OP_FADD, /**< Atomic Fetch and add */ ++ UCP_ATOMIC_FETCH_OP_SWAP, /**< Atomic swap */ + UCP_ATOMIC_FETCH_OP_CSWAP, /**< Atomic conditional swap */ ++ UCP_ATOMIC_FETCH_OP_FAND, /**< Atomic Fetch and and */ ++ UCP_ATOMIC_FETCH_OP_FOR, /**< Atomic Fetch and or */ ++ UCP_ATOMIC_FETCH_OP_FXOR, /**< Atomic Fetch and xor */ + UCP_ATOMIC_FETCH_OP_LAST + } ucp_atomic_fetch_op_t; + + ++/** ++ * @ingroup UCP_COMM ++ * @brief Flags to define behavior of @ref ucp_stream_recv_nb function ++ * ++ * This enumeration defines behavior of @ref ucp_stream_recv_nb function. ++ */ ++typedef enum { ++ UCP_STREAM_RECV_FLAG_WAITALL = UCS_BIT(0) /**< This flag requests that ++ operation will not be ++ completed untill all amout ++ of requested data is ++ received and placed in the ++ user buffer. */ ++} ucp_stream_recv_flags_t; ++ ++ + /** + * @ingroup UCP_DATATYPE + * @brief Generate an identifier for contiguous data type. +@@ -513,15 +550,15 @@ typedef struct ucp_generic_dt_ops { + * The pointer refers to application defined unpack routine. + * + * @param [in] state State as returned by +- * @ref ucp_generic_dt_ops::start_pack +- * "start_pack()" routine. ++ * @ref ucp_generic_dt_ops::start_unpack ++ * "start_unpack()" routine. + * @param [in] offset Virtual offset in the input stream. + * @param [in] src Source to unpack the data from. + * @param [in] length Length to unpack. + * + * @return UCS_OK or an error if unpacking failed. + */ +- ucs_status_t (*unpack)(void *state, size_t offset, const void *src, size_t count); ++ ucs_status_t (*unpack)(void *state, size_t offset, const void *src, size_t length); + + /** + * @ingroup UCP_DATATYPE +@@ -596,7 +633,7 @@ typedef struct ucp_params { + * Pointer to a routine that is responsible for final cleanup of the memory + * associated with the request. This routine may not be called every time a + * request is released. For some implementations, the cleanup call may be +- * delayed and only invoked at @ref ucp_worker_cleanup. ++ * delayed and only invoked at @ref ucp_worker_destroy. + * + * @e NULL can be used if no such function is required, which is also the + * default if this field is not specified by @ref field_mask. +@@ -620,6 +657,9 @@ typedef struct ucp_params { + * thread safety; if the context is used by worker 1 and worker 2, + * and worker 1 is used by thread 1 and worker 2 is used by thread 2, + * then this context needs thread safety. ++ * Note that actual thread mode may be different from mode passed ++ * to @ref ucp_init. To get actual thread mode use ++ * @ref ucp_context_query. + */ + int mt_workers_shared; + +@@ -706,11 +746,16 @@ typedef struct ucp_worker_params { + uint64_t field_mask; + + /** +- * Thread safety "mode" for the worker object and resources associated with it. +- * This value is optional. +- * If it's not set (along with its corresponding bit in the field_mask - +- * UCP_WORKER_PARAM_FIELD_THREAD_MODE), the UCS_THREAD_MODE_SINGLE mode +- * will be used. ++ * The parameter thread_mode suggests the thread safety mode which worker ++ * and the associated resources should be created with. This is an ++ * optional parameter. The default value is UCS_THREAD_MODE_SINGLE and ++ * it is used when the value of the parameter is not set. When this ++ * parameter along with its corresponding bit in the ++ * field_mask - UCP_WORKER_PARAM_FIELD_THREAD_MODE is set, the ++ * @ref ucp_worker_create attempts to create worker with this thread mode. ++ * The thread mode with which worker is created can differ from the ++ * suggested mode. The actual thread mode of the worker should be obtained ++ * using the query interface @ref ucp_worker_query. + */ + ucs_thread_mode_t thread_mode; + +@@ -745,12 +790,12 @@ typedef struct ucp_worker_params { + * This value is optional. + * If @ref UCP_WORKER_PARAM_FIELD_EVENT_FD is set in the field_mask, events + * on the worker will be reported on the provided event file descriptor. In +- * this case, calling @ref ucp_worker_get_efd() will result in an error. ++ * this case, calling @ref ucp_worker_get_efd will result in an error. + * The provided file descriptor must be capable of aggregating notifications + * for arbitrary events, for example @c epoll(7) on Linux systems. + * @ref user_data will be used as the event user-data on systems which + * support it. For example, on Linux, it will be placed in +- * @ref epoll_data_t::ptr, when returned from @ref epoll_wait(). ++ * @c epoll_data_t::ptr, when returned from @c epoll_wait(2). + * + * Otherwise, events would be reported to the event file descriptor returned + * from @ref ucp_worker_get_efd(). +@@ -774,7 +819,7 @@ typedef struct ucp_listener_params { + * Fields not specified in this mask would be ignored. + * Provides ABI compatibility with respect to adding new fields. + */ +- uint64_t field_mask; ++ uint64_t field_mask; + + /** + * An address in the form of a sockaddr. +@@ -783,7 +828,7 @@ typedef struct ucp_listener_params { + * The @ref ucp_listener_create routine will return with an error if sockaddr + * is not specified. + */ +- ucs_sock_addr_t sockaddr; ++ ucs_sock_addr_t sockaddr; + + /** + * Handler to endpoint creation in a client-server connection flow. +@@ -791,73 +836,16 @@ typedef struct ucp_listener_params { + * UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER needs to be set in the + * field_mask. + */ +- ucp_listener_accept_handler_t accept_handler; +-} ucp_listener_params_t; +- ++ ucp_listener_accept_handler_t accept_handler; + +-/** +- * @ingroup UCP_ENDPOINT +- * @brief Tuning parameters for the UCP endpoint. +- * +- * The structure defines the parameters that are used for the +- * UCP endpoint tuning during the UCP ep @ref ucp_ep_create "creation". +- */ +-typedef struct ucp_ep_params { + /** +- * Mask of valid fields in this structure, using bits from +- * @ref ucp_ep_params_field. +- * Fields not specified in this mask would be ignored. +- * Provides ABI compatibility with respect to adding new fields. +- */ +- uint64_t field_mask; +- +- /** +- * Destination address; if the @ref UCP_EP_PARAMS_FLAGS_CLIENT_SERVER flag +- * is not set, this address is mandatory for filling +- * (along with its corresponding bit in the field_mask - @ref +- * UCP_EP_PARAM_FIELD_REMOTE_ADDRESS) and must be obtained using +- * @ref ucp_worker_get_address. This field cannot be changed by +- * @ref ucp_ep_modify_nb. +- */ +- const ucp_address_t *address; +- +- /** +- * Desired error handling mode, optional parameter. Default value is +- * @ref UCP_ERR_HANDLING_MODE_NONE. This field cannot be changed by +- * @ref ucp_ep_modify_nb. +- */ +- ucp_err_handling_mode_t err_mode; +- +- /** +- * Handler to process transport level failure. +- */ +- ucp_err_handler_t err_handler; +- +- /** +- * User data associated with an endpoint. See @ref ucp_stream_poll_ep_t and +- * @ref ucp_err_handler_t +- */ +- void *user_data; +- +- /** +- * Endpoint flags from @ref ucp_ep_params_flags_field. +- * This value is optional. +- * If it's not set (along with its corresponding bit in the field_mask - +- * @ref UCP_EP_PARAM_FIELD_FLAGS), the @ref ucp_ep_create() routine will +- * consider the flags as set to zero. +- */ +- unsigned flags; +- +- /** +- * Destination address in the form of a sockaddr; +- * if the @ref UCP_EP_PARAMS_FLAGS_CLIENT_SERVER flag is set, this address +- * is mandatory for filling (along with its corresponding bit in the +- * field_mask - @ref UCP_EP_PARAM_FIELD_SOCK_ADDR) and should be obtained +- * from the user. This field cannot be changed by @ref ucp_ep_modify_nb. ++ * Handler of an incoming connection request in a client-server connection ++ * flow. In order for the callback inside this handler to be invoked, the ++ * @ref UCP_LISTENER_PARAM_FIELD_CONN_HANDLER needs to be set in the ++ * field_mask. + */ +- ucs_sock_addr_t sockaddr; +- +-} ucp_ep_params_t; ++ ucp_listener_conn_handler_t conn_handler; ++} ucp_listener_params_t; + + + /** +@@ -962,7 +950,7 @@ struct ucp_tag_recv_info { + * the run-time environment. Then, the fetched descriptor is used for + * UCP library @ref ucp_init "initialization". The Application can print out the + * descriptor using @ref ucp_config_print "print" routine. In addition +- * the application is responsible to @ref ucp_config_free "free" the ++ * the application is responsible to @ref ucp_config_release "release" the + * descriptor back to UCP library. + * + * @param [in] env_prefix If non-NULL, the routine searches for the +@@ -1308,8 +1296,8 @@ unsigned ucp_worker_progress(ucp_worker_h worker); + * @brief Poll for endpoints that are ready to consume streaming data. + * + * This non-blocking routine returns endpoints on a worker which are ready +- * to consume streaming data. The ready endpoints are placed in @poll_eps array, +- * and the function return value indicates how many are there. ++ * to consume streaming data. The ready endpoints are placed in @a poll_eps ++ * array, and the function return value indicates how many are there. + * + * @param [in] worker Worker to poll. + * @param [out] poll_eps Pointer to array of endpoints, should be +@@ -1318,7 +1306,7 @@ unsigned ucp_worker_progress(ucp_worker_h worker); + * in @a poll_eps. + * @param [in] flags Reserved for future use. + * +- * @return Negative value indicates an error according to @ref ucp_status_t. ++ * @return Negative value indicates an error according to @ref ucs_status_t. + * On success, non-negative value (less or equal @a max_eps) indicates + * actual number of endpoints filled in @a poll_eps array. + * +@@ -1412,6 +1400,7 @@ ucs_status_t ucp_worker_wait(ucp_worker_h worker); + * an opportunity for energy savings for architectures that support this + * functionality. + * ++ * @param [in] worker Worker to wait for updates on. + * @param [in] address Local memory address + */ + void ucp_worker_wait_mem(ucp_worker_h worker, void *address); +@@ -1440,26 +1429,31 @@ void ucp_worker_wait_mem(ucp_worker_h worker, void *address); + * + * @code {.c} + * void application_initialization() { ++ * // should be called once in application init flow and before ++ * // process_comminucation() is used + * ... + * status = ucp_worker_get_efd(worker, &fd); + * ... + * } + * + * void process_comminucation() { ++ * // should be called every time need to wait for some condition such as ++ * // ucp request completion in sleep mode. ++ * + * for (;;) { +- * // check for events as long as progress is made ++ * // check for stop condition as long as progress is made + * if (check_for_events()) { +- * break; // got something interesting, exit ++ * break; + * } else if (ucp_worker_progress(worker)) { +- * continue; // got something uninteresting, retry ++ * continue; // some progress happened but condition not met + * } + * + * // arm the worker and clean-up fd + * status = ucp_worker_arm(worker); + * if (UCS_OK == status) { +- * poll(&fds, nfds, timeout); // wait for events ++ * poll(&fds, nfds, timeout); // wait for events (sleep mode) + * } else if (UCS_ERR_BUSY == status) { +- * continue; // poll for more events ++ * continue; // could not arm, need to progress more + * } else { + * abort(); + * } +@@ -1493,6 +1487,11 @@ ucs_status_t ucp_worker_arm(ucp_worker_h worker); + * waiting on a file descriptor from @ref ucp_worker_get_efd to return, even + * if no event from the underlying interfaces has taken place. + * ++ * @note It’s safe to use this routine from any thread, even if UCX is compiled ++ * without multi-threading support and/or initialized with any value of ++ * @ref ucp_params_t::mt_workers_shared and ++ * @ref ucp_worker_params_t::thread_mode parameters ++ * + * @param [in] worker Worker to wait for events on. + * + * @return Error code as defined by @ref ucs_status_t +@@ -1555,42 +1554,23 @@ void ucp_listener_destroy(ucp_listener_h listener); + * @param [out] ep_p A handle to the created endpoint. + * + * @return Error code as defined by @ref ucs_status_t ++ * ++ * @note One of the following fields has to be specified: ++ * - ucp_ep_params_t::address ++ * - ucp_ep_params_t::sockaddr ++ * - ucp_ep_params_t::conn_request ++ ++ * @note By default, ucp_ep_create() will connect an endpoint to itself if ++ * the endpoint is destined to the same @a worker on which it was created, ++ * i.e. @a params.address belongs to @a worker. This behavior can be changed by ++ * passing the @ref UCP_EP_PARAMS_FLAGS_NO_LOOPBACK flag in @a params.flags. ++ * In that case, the endpoint will be connected to the *next* endpoint created ++ * in the same way on the same @a worker. + */ + ucs_status_t ucp_ep_create(ucp_worker_h worker, const ucp_ep_params_t *params, + ucp_ep_h *ep_p); + + +-/** +- * @ingroup UCP_ENDPOINT +- * @brief Modify endpoint parameters. +- * +- * This routine modifies @ref ucp_ep_h "endpoint" created by @ref ucp_ep_create +- * or @ref ucp_listener_accept_callback_t. For example, this API can be used +- * to setup custom parameters like @ref ucp_ep_params_t::user_data or +- * @ref ucp_ep_params_t::err_handler_cb to endpoint created by +- * @ref ucp_listener_accept_callback_t. +- * +- * @param [in] ep A handle to the endpoint. +- * @param [in] params User defined @ref ucp_ep_params_t configurations +- * for the @ref ucp_ep_h "UCP endpoint". +- * +- * @return NULL - The endpoint is modified successfully. +- * @return UCS_PTR_IS_ERR(_ptr) - The reconfiguration failed and an error code +- * indicates the status. However, the @a endpoint +- * is not modified and can be used further. +- * @return otherwise - The reconfiguration process is started, and can be +- * completed at any point in time. A request handle +- * is returned to the application in order to track +- * progress of the endpoint modification. +- * The application is responsible for releasing the +- * handle using the @ref ucp_request_free routine. +- * +- * @note See the documentation of @ref ucp_ep_params_t for details, only some of +- * the parameters can be modified. +- */ +-ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params); +- +- + /** + * @ingroup UCP_ENDPOINT + * +@@ -1614,12 +1594,32 @@ ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params); + * is responsible for releasing the handle using the + * @ref ucp_request_free routine. + * +- * @note @ref ucp_ep_close_nb replaces deprecated @ref ucp_disconnect_nb and ++ * @note @ref ucp_ep_close_nb replaces deprecated @ref ucp_disconnect_nb and + * @ref ucp_ep_destroy + */ + ucs_status_ptr_t ucp_ep_close_nb(ucp_ep_h ep, unsigned mode); + + ++/** ++ * @ingroup UCP_WORKER ++ * ++ * @brief Reject an incoming connection request. ++ * ++ * Reject the incoming connection request and release associated resources. If ++ * the remote initiator endpoint has set an @ref ucp_ep_params_t::err_handler, ++ * it will be invoked with status @ref UCS_ERR_REJECTED. ++ * ++ * @param [in] listener Handle to the listener on which the connection ++ * request was received. ++ * @param [in] conn_request Handle to the connection request to reject. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ * ++ */ ++ucs_status_t ucp_listener_reject(ucp_listener_h listener, ++ ucp_conn_request_h conn_request); ++ ++ + /** + * @ingroup UCP_ENDPOINT + * @brief Print endpoint information. +@@ -1681,7 +1681,7 @@ void ucp_ep_print_info(ucp_ep_h ep, FILE *stream); + * ucp_worker_progress(worker); + * status = ucp_request_check_status(request); + * } while (status == UCS_INPROGRESS); +- * ucp_request_release(request); ++ * ucp_request_free(request); + * return status; + * } + * } +@@ -1723,14 +1723,14 @@ ucs_status_ptr_t ucp_ep_flush_nb(ucp_ep_h ep, unsigned flags, + * management. + * + * +- * ++ * + * + * + * + * + * +- * + *
Matrix of behaviorMatrix of behavior
parameter/flag @ref UCP_MEM_MAP_NONBLOCK "NONBLOCK"@ref UCP_MEM_MAP_ALLOCATE "ALLOCATE"@ref UCP_MEM_MAP_FIXED "FIXED"@ref ucp_mem_map_params.address "address"@b result + *
@b value 0/1 - the value\n only affects the\n register/map\n phase0 0 0 @ref anch_err "error" ++ * 0 0 0 @ref anch_err "error" if length > 0 + *
1 0 0 @ref anch_alloc_reg "alloc+register" + *
0 1 0 @ref anch_err "error"
0 0 defined @ref anch_reg "register" +@@ -1825,7 +1825,7 @@ typedef enum ucp_mem_advice { + UCP_MADV_NORMAL = 0, /**< No special treatment */ + UCP_MADV_WILLNEED /**< can be used on the memory mapped with + @ref UCP_MEM_MAP_NONBLOCK to speed up memory +- mapping and to avoid page faults when ++ mapping and to avoid page faults when + the memory is accessed for the first time. */ + } ucp_mem_advice_t; + +@@ -1835,7 +1835,7 @@ typedef enum ucp_mem_advice { + * @brief Tuning parameters for the UCP memory advice. + * + * This structure defines the parameters that are used for the +- * UCP memory advice tuning during the @ref ucp_mem_advise "ucp_mem_advise" ++ * UCP memory advice tuning during the @ref ucp_mem_advise "ucp_mem_advise" + * routine. + */ + typedef struct ucp_mem_advise_params { +@@ -1847,7 +1847,7 @@ typedef struct ucp_mem_advise_params { + uint64_t field_mask; + + /** +- * Memory base address. ++ * Memory base address. + */ + void *address; + +@@ -1869,20 +1869,20 @@ typedef struct ucp_mem_advise_params { + * + * This routine advises the UCP about how to handle memory range beginning at + * address and size of length bytes. This call does not influence the semantics +- * of the application, but may influence its performance. The UCP may ignore ++ * of the application, but may influence its performance. The UCP may ignore + * the advice. + * + * @param [in] context Application @ref ucp_context_h "context" which was + * used to allocate/map the memory. + * @param [in] memh @ref ucp_mem_h "Handle" to memory region. +- * @param [in] params Memory base address and length. The advice field +- * is used to pass memory use advice as defined in ++ * @param [in] params Memory base address and length. The advice field ++ * is used to pass memory use advice as defined in + * the @ref ucp_mem_advice list + * The memory range must belong to the @a memh + * + * @return Error code as defined by @ref ucs_status_t + */ +-ucs_status_t ucp_mem_advise(ucp_context_h context, ucp_mem_h memh, ++ucs_status_t ucp_mem_advise(ucp_context_h context, ucp_mem_h memh, + ucp_mem_advise_params_t *params); + + +@@ -1970,13 +1970,13 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + * that are reacheble via shared memory. + * + * @param [in] rkey A remote key handle. +- * @param [in] raddr A remote address within the memory area ++ * @param [in] raddr A remote memory address within the memory area + * described by the rkey. + * @param [out] addr_p A pointer that can be used for direct + * access to the remote memory. + * + * @return Error code as defined by @ref ucs_status_t if the remote memory +- * cannot be accessed directly or the remote address is not valid. ++ * cannot be accessed directly or the remote memory address is not valid. + */ + ucs_status_t ucp_rkey_ptr(ucp_rkey_h rkey, uint64_t raddr, void **addr_p); + +@@ -2208,7 +2208,7 @@ ucs_status_ptr_t ucp_tag_send_sync_nb(ucp_ep_h ep, const void *buffer, size_t co + + /** + * @ingroup UCP_COMM +- * @brief Non-blocking stream receive operation of structured data into a ++ * @brief Non-blocking stream receive operation of structured data into a + * user-supplied buffer. + * + * This routine receives data that is described by the local address @a buffer, +@@ -2235,7 +2235,7 @@ ucs_status_ptr_t ucp_tag_send_sync_nb(ucp_ep_h ep, const void *buffer, size_t co + * valid only if return code is UCS_OK. + * @note The amount of data received, in bytes, is always an + * integral multiple of the @a datatype size. +- * @param [in] flags Reserved for future use. ++ * @param [in] flags Flags defined in @ref ucp_stream_recv_flags_t. + * + * @return UCS_OK - The receive operation was completed + * immediately. +@@ -2449,30 +2449,6 @@ ucs_status_ptr_t ucp_tag_msg_recv_nb(ucp_worker_h worker, void *buffer, + ucp_tag_recv_callback_t cb); + + +-/** +- * @ingroup UCP_COMM +- * @brief Blocking remote memory put operation. +- * +- * This routine stores contiguous block of data that is described by the +- * local address @a buffer in the remote contiguous memory region described by +- * @a remote_addr address and the @ref ucp_rkey_h "memory handle" @a rkey. The +- * routine returns when it is safe to reuse the source address @e buffer. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] buffer Pointer to the local source address. +- * @param [in] length Length of the data (in bytes) stored under the +- * source address. +- * @param [in] remote_addr Pointer to the destination remote address +- * to write to. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_put(ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey); +- +- + /** + * @ingroup UCP_COMM + * @brief Non-blocking implicit remote memory put operation. +@@ -2492,41 +2468,62 @@ ucs_status_t ucp_put(ucp_ep_h ep, const void *buffer, size_t length, + * @param [in] buffer Pointer to the local source address. + * @param [in] length Length of the data (in bytes) stored under the + * source address. +- * @param [in] remote_addr Pointer to the destination remote address ++ * @param [in] remote_addr Pointer to the destination remote memory address + * to write to. + * @param [in] rkey Remote memory key associated with the +- * remote address. ++ * remote memory address. + * + * @return Error code as defined by @ref ucs_status_t + */ + ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length, + uint64_t remote_addr, ucp_rkey_h rkey); + +- + /** + * @ingroup UCP_COMM +- * @brief Blocking remote memory get operation. ++ * @brief Non-blocking remote memory put operation. + * +- * This routine loads contiguous block of data that is described by the remote +- * address @a remote_addr and the @ref ucp_rkey_h "memory handle" @a rkey in +- * the local contiguous memory region described by @a buffer address. The +- * routine returns when remote data is loaded and stored under the local address +- * @e buffer. ++ * This routine initiates a storage of contiguous block of data that is ++ * described by the local address @a buffer in the remote contiguous memory ++ * region described by @a remote_addr address and the @ref ucp_rkey_h "memory ++ * handle" @a rkey. The routine returns immediately and @b does @b not ++ * guarantee re-usability of the source address @e buffer. If the operation is ++ * completed immediately the routine return UCS_OK, otherwise UCS_INPROGRESS ++ * or an error is returned to user. If the put operation completes immediately, ++ * the routine returns UCS_OK and the call-back routine @a cb is @b not ++ * invoked. If the operation is @b not completed immediately and no error is ++ * reported, then the UCP library will schedule invocation of the call-back ++ * routine @a cb upon completion of the put operation. In other words, the ++ * completion of a put operation can be signaled by the return code or ++ * execution of the call-back. + * ++ * @note A user can use @ref ucp_worker_flush_nb "ucp_worker_flush_nb()" ++ * in order to guarantee re-usability of the source address @e buffer. + * + * @param [in] ep Remote endpoint handle. + * @param [in] buffer Pointer to the local source address. + * @param [in] length Length of the data (in bytes) stored under the + * source address. +- * @param [in] remote_addr Pointer to the destination remote address ++ * @param [in] remote_addr Pointer to the destination remote memory address + * to write to. + * @param [in] rkey Remote memory key associated with the +- * remote address. ++ * remote memory address. ++ * @param [in] cb Call-back function that is invoked whenever the ++ * put operation is completed and the local buffer ++ * can be modified. Does not guarantee remote ++ * completion. + * +- * @return Error code as defined by @ref ucs_status_t ++ * @return UCS_OK - The operation was completed immediately. ++ * @return UCS_PTR_IS_ERR(_ptr) - The operation failed. ++ * @return otherwise - Operation was scheduled and can be ++ * completed at any point in time. The request handle ++ * is returned to the application in order to track ++ * progress of the operation. The application is ++ * responsible for releasing the handle using ++ * @ref ucp_request_free "ucp_request_free()" routine. + */ +-ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey); ++ucs_status_ptr_t ucp_put_nb(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb); + + + /** +@@ -2534,7 +2531,7 @@ ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, + * @brief Non-blocking implicit remote memory get operation. + * + * This routine initiate a load of contiguous block of data that is described +- * by the remote address @a remote_addr and the @ref ucp_rkey_h "memory handle" ++ * by the remote memory address @a remote_addr and the @ref ucp_rkey_h "memory handle" + * @a rkey in the local contiguous memory region described by @a buffer + * address. The routine returns immediately and @b does @b not guarantee that + * remote data is loaded and stored under the local address @e buffer. +@@ -2547,264 +2544,61 @@ ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, + * @param [in] buffer Pointer to the local source address. + * @param [in] length Length of the data (in bytes) stored under the + * source address. +- * @param [in] remote_addr Pointer to the destination remote address ++ * @param [in] remote_addr Pointer to the destination remote memory address + * to write to. + * @param [in] rkey Remote memory key associated with the +- * remote address. ++ * remote memory address. + * + * @return Error code as defined by @ref ucs_status_t + */ + ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length, + uint64_t remote_addr, ucp_rkey_h rkey); + +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic add operation for 32 bit integers +- * +- * This routine performs an add operation on a 32 bit integer value atomically. +- * The remote integer value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a add value is the value that is used for the add operation. +- * When the operation completes the sum of the original remote value and the +- * operand value (@a add) is stored in remote memory. +- * The call to the routine returns immediately, independent of operation +- * completion. +- * +- * @note The remote address must be aligned to 32 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] add Value to add. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_add32(ucp_ep_h ep, uint32_t add, +- uint64_t remote_addr, ucp_rkey_h rkey); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic add operation for 64 bit integers +- * +- * This routine performs an add operation on a 64 bit integer value atomically. +- * The remote integer value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a add value is the value that is used for the add operation. +- * When the operation completes the sum of the original remote value and the +- * operand value (@a add) is stored in remote memory. +- * The call to the routine returns immediately, independent of operation +- * completion. +- * +- * @note The remote address must be aligned to 64 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] add Value to add. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_add64(ucp_ep_h ep, uint64_t add, +- uint64_t remote_addr, ucp_rkey_h rkey); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic fetch and add operation for 32 bit integers +- * +- * This routine performs an add operation on a 32 bit integer value atomically. +- * The remote integer value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a add value is the value that is used for the add operation. +- * When the operation completes, the original remote value is stored in the +- * local memory @a result, and the sum of the original remote value and the +- * operand value is stored in remote memory. +- * The call to the routine returns when the operation is completed and the +- * @a result value is updated. +- * +- * @note The remote address must be aligned to 32 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] add Value to add. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_fadd32(ucp_ep_h ep, uint32_t add, uint64_t remote_addr, +- ucp_rkey_h rkey, uint32_t *result); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic fetch and add operation for 64 bit integers +- * +- * This routine performs an add operation on a 64 bit integer value atomically. +- * The remote integer value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a add value is the value that is used for the add operation. +- * When the operation completes, the original remote value is stored in the +- * local memory @a result, and the sum of the original remote value and the +- * operand value is stored in remote memory. +- * The call to the routine returns when the operation is completed and the +- * @a result value is updated. +- * +- * @note The remote address must be aligned to 64 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] add Value to add. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_fadd64(ucp_ep_h ep, uint64_t add, uint64_t remote_addr, +- ucp_rkey_h rkey, uint64_t *result); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic swap operation for 32 bit values +- * +- * This routine swaps a 32 bit value between local and remote memory. +- * The remote value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a swap value is the value that is used for the swap operation. +- * When the operation completes, the remote value is stored in the +- * local memory @a result, and the operand value (@a swap) is stored in remote +- * memory. The call to the routine returns when the operation is completed and +- * the @a result value is updated. +- * +- * @note The remote address must be aligned to 32 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] swap Value to swap. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_swap32(ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, +- ucp_rkey_h rkey, uint32_t *result); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic swap operation for 64 bit values +- * +- * This routine swaps a 64 bit value between local and remote memory. +- * The remote value is described by the combination of the remote +- * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" +- * @a rkey. The @a swap value is the value that is used for the swap operation. +- * When the operation completes, the remote value is stored in the +- * local memory @a result, and the operand value (@a swap) is stored in remote +- * memory. The call to the routine returns when the operation is completed and +- * the @a result value is updated. +- * +- * @note The remote address must be aligned to 64 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] swap Value to swap. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_swap64(ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, +- ucp_rkey_h rkey, uint64_t *result); +- +- +-/** +- * @ingroup UCP_COMM +- * @brief Blocking atomic conditional swap (cswap) operation for 32 bit values. +- * +- * This routine conditionally swaps a 32 bit value between local and remote +- * memory. The swap occurs only if the condition value (@a continue) is equal +- * to the remote value, otherwise the remote memory is not modified. The +- * remote value is described by the combination of the remote memory address @p +- * remote_addr and the @ref ucp_rkey_h "remote memory handle" @a rkey. The @p +- * swap value is the value that is used to update the remote memory if the +- * condition is true. The call to the routine returns when the operation is +- * completed and the @a result value is updated. +- * +- * @note The remote address must be aligned to 32 bit. +- * +- * @param [in] ep Remote endpoint handle. +- * @param [in] compare Value to compare to. +- * @param [in] swap Value to swap. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. +- * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr +- * +- * @return Error code as defined by @ref ucs_status_t +- */ +-ucs_status_t ucp_atomic_cswap32(ucp_ep_h ep, uint32_t compare, uint32_t swap, +- uint64_t remote_addr, ucp_rkey_h rkey, +- uint32_t *result); +- +- + /** + * @ingroup UCP_COMM +- * @brief Blocking atomic conditional swap (cswap) operation for 64 bit values. ++ * @brief Non-blocking remote memory get operation. ++ * ++ * This routine initiates a load of a contiguous block of data that is ++ * described by the remote memory address @a remote_addr and the @ref ucp_rkey_h ++ * "memory handle" @a rkey in the local contiguous memory region described ++ * by @a buffer address. The routine returns immediately and @b does @b not ++ * guarantee that remote data is loaded and stored under the local address @e ++ * buffer. If the operation is completed immediately the routine return UCS_OK, ++ * otherwise UCS_INPROGRESS or an error is returned to user. If the get ++ * operation completes immediately, the routine returns UCS_OK and the ++ * call-back routine @a cb is @b not invoked. If the operation is @b not ++ * completed immediately and no error is reported, then the UCP library will ++ * schedule invocation of the call-back routine @a cb upon completion of the ++ * get operation. In other words, the completion of a get operation can be ++ * signaled by the return code or execution of the call-back. + * +- * This routine conditionally swaps a 64 bit value between local and remote +- * memory. The swap occurs only if the condition value (@a continue) is equal +- * to the remote value, otherwise the remote memory is not modified. The +- * remote value is described by the combination of the remote memory address @p +- * remote_addr and the @ref ucp_rkey_h "remote memory handle" @a rkey. The @p +- * swap value is the value that is used to update the remote memory if the +- * condition is true. The call to the routine returns when the operation is +- * completed and the @a result value is updated. +- * +- * @note The remote address must be aligned to 64 bit. ++ * @note A user can use @ref ucp_worker_flush_nb "ucp_worker_flush_nb()" ++ * in order to guarantee re-usability of the source address @e buffer. + * + * @param [in] ep Remote endpoint handle. +- * @param [in] compare Value to compare to. +- * @param [in] swap Value to swap. +- * @param [in] remote_addr Pointer to the destination remote address +- * of the atomic variable. ++ * @param [in] buffer Pointer to the local source address. ++ * @param [in] length Length of the data (in bytes) stored under the ++ * source address. ++ * @param [in] remote_addr Pointer to the destination remote memory address ++ * to write to. + * @param [in] rkey Remote memory key associated with the +- * remote address. +- * @param [out] result Pointer to the address that is used to store +- * the previous value of the atomic variable described +- * by the @a remote_addr ++ * remote memory address. ++ * @param [in] cb Call-back function that is invoked whenever the ++ * get operation is completed and the data is ++ * visible to the local process. + * +- * @return Error code as defined by @ref ucs_status_t ++ * @return UCS_OK - The operation was completed immediately. ++ * @return UCS_PTR_IS_ERR(_ptr) - The operation failed. ++ * @return otherwise - Operation was scheduled and can be ++ * completed at any point in time. The request handle ++ * is returned to the application in order to track ++ * progress of the operation. The application is ++ * responsible for releasing the handle using ++ * @ref ucp_request_free "ucp_request_free()" routine. + */ +-ucs_status_t ucp_atomic_cswap64(ucp_ep_h ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, ucp_rkey_h rkey, +- uint64_t *result); +- ++ucs_status_ptr_t ucp_get_nb(ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb); + + /** + * @ingroup UCP_COMM +@@ -2823,7 +2617,7 @@ ucs_status_t ucp_atomic_cswap64(ucp_ep_h ep, uint64_t compare, uint64_t swap, + * @param [in] value Source operand for the atomic operation. + * @param [in] op_size Size of value in bytes + * @param [in] remote_addr Remote address to operate on. +- * @param [in] rkey Remote key handle for the remote address. ++ * @param [in] rkey Remote key handle for the remote memory address. + * + * @return Error code as defined by @ref ucs_status_t + */ +@@ -2862,7 +2656,7 @@ ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t + * is true. + * @param [in] op_size Size of value in bytes and pointer type for result + * @param [in] remote_addr Remote address to operate on. +- * @param [in] rkey Remote key handle for the remote address. ++ * @param [in] rkey Remote key handle for the remote memory address. + * @param [in] cb Call-back function that is invoked whenever the + * send operation is completed. It is important to note + * that the call-back function is only invoked in a case when +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_compat.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_compat.h +index e8309e497..fdc4e6e0d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_compat.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_compat.h +@@ -14,6 +14,18 @@ + + BEGIN_C_DECLS + ++ ++/** ++ * @ingroup UCP_WORKER ++ * @deprecated Replaced by @ref ucp_listener_conn_handler_t. ++ */ ++typedef struct ucp_listener_accept_handler { ++ ucp_listener_accept_callback_t cb; /**< Endpoint creation callback */ ++ void *arg; /**< User defined argument for the ++ callback */ ++} ucp_listener_accept_handler_t; ++ ++ + /** + * @ingroup UCP_COMM + * @deprecated Replaced by @ref ucp_request_test. +@@ -69,6 +81,28 @@ ucs_status_t ucp_ep_flush(ucp_ep_h ep); + * + * @brief Flush outstanding AMO and RMA operations on the @ref ucp_worker_h + * "worker" ++ * @deprecated Replaced by @ref ucp_worker_flush_nb. The following example ++ * implements the same functionality using @ref ucp_worker_flush_nb : ++ * @code ++ * ucs_status_t worker_flush(ucp_worker_h worker) ++ * { ++ * void *request = ucp_worker_flush_nb(worker); ++ * if (request == NULL) { ++ * return UCS_OK; ++ * } else if (UCS_PTR_IS_ERR(request)) { ++ * return UCS_PTR_STATUS(request); ++ * } else { ++ * ucs_status_t status; ++ * do { ++ * ucp_worker_progress(worker); ++ * status = ucp_request_check_status(request); ++ * } while (status == UCS_INPROGRESS); ++ * ucp_request_release(request); ++ * return status; ++ * } ++ * } ++ * @endcode ++ * + * + * This routine flushes all outstanding AMO and RMA communications on the + * @ref ucp_worker_h "worker". All the AMO and RMA operations issued on the +@@ -85,6 +119,385 @@ ucs_status_t ucp_ep_flush(ucp_ep_h ep); + */ + ucs_status_t ucp_worker_flush(ucp_worker_h worker); + ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking remote memory put operation. ++ * @deprecated Replaced by @ref ucp_put_nb. The following example implements ++ * the same functionality using @ref ucp_put_nb : ++ * @code ++ * void empty_callback(void *request, ucs_status_t status) ++ * { ++ * } ++ * ++ * ucs_status_t put(ucp_ep_h ep, const void *buffer, size_t length, ++ * uint64_t remote_addr, ucp_rkey_h rkey) ++ * { ++ * void *request = ucp_put_nb(ep, buffer, length, remote_addr, rkey, ++ * empty_callback), ++ * if (request == NULL) { ++ * return UCS_OK; ++ * } else if (UCS_PTR_IS_ERR(request)) { ++ * return UCS_PTR_STATUS(request); ++ * } else { ++ * ucs_status_t status; ++ * do { ++ * ucp_worker_progress(worker); ++ * status = ucp_request_check_status(request); ++ * } while (status == UCS_INPROGRESS); ++ * ucp_request_release(request); ++ * return status; ++ * } ++ * } ++ * @endcode ++ * ++ * This routine stores contiguous block of data that is described by the ++ * local address @a buffer in the remote contiguous memory region described by ++ * @a remote_addr address and the @ref ucp_rkey_h "memory handle" @a rkey. The ++ * routine returns when it is safe to reuse the source address @e buffer. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] buffer Pointer to the local source address. ++ * @param [in] length Length of the data (in bytes) stored under the ++ * source address. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * to write to. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_put(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking remote memory get operation. ++ * @deprecated Replaced by @ref ucp_get_nb. @see ucp_put. ++ * ++ * This routine loads contiguous block of data that is described by the remote ++ * address @a remote_addr and the @ref ucp_rkey_h "memory handle" @a rkey in ++ * the local contiguous memory region described by @a buffer address. The ++ * routine returns when remote data is loaded and stored under the local address ++ * @e buffer. ++ * ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] buffer Pointer to the local source address. ++ * @param [in] length Length of the data (in bytes) stored under the ++ * source address. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * to write to. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_get(ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic add operation for 32 bit integers ++ * @deprecated Replaced by @ref ucp_atomic_post with opcode UCP_ATOMIC_POST_OP_ADD. ++ * @see ucp_put. ++ * ++ * This routine performs an add operation on a 32 bit integer value atomically. ++ * The remote integer value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a add value is the value that is used for the add operation. ++ * When the operation completes the sum of the original remote value and the ++ * operand value (@a add) is stored in remote memory. ++ * The call to the routine returns immediately, independent of operation ++ * completion. ++ * ++ * @note The remote address must be aligned to 32 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] add Value to add. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_add32(ucp_ep_h ep, uint32_t add, ++ uint64_t remote_addr, ucp_rkey_h rkey); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic add operation for 64 bit integers ++ * @deprecated Replaced by @ref ucp_atomic_post with opcode UCP_ATOMIC_POST_OP_ADD. ++ * @see ucp_put. ++ * ++ * This routine performs an add operation on a 64 bit integer value atomically. ++ * The remote integer value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a add value is the value that is used for the add operation. ++ * When the operation completes the sum of the original remote value and the ++ * operand value (@a add) is stored in remote memory. ++ * The call to the routine returns immediately, independent of operation ++ * completion. ++ * ++ * @note The remote address must be aligned to 64 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] add Value to add. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_add64(ucp_ep_h ep, uint64_t add, ++ uint64_t remote_addr, ucp_rkey_h rkey); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic fetch and add operation for 32 bit integers ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_FADD. ++ * @see ucp_put. ++ * ++ * This routine performs an add operation on a 32 bit integer value atomically. ++ * The remote integer value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a add value is the value that is used for the add operation. ++ * When the operation completes, the original remote value is stored in the ++ * local memory @a result, and the sum of the original remote value and the ++ * operand value is stored in remote memory. ++ * The call to the routine returns when the operation is completed and the ++ * @a result value is updated. ++ * ++ * @note The remote address must be aligned to 32 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] add Value to add. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_fadd32(ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint32_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic fetch and add operation for 64 bit integers ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_FADD. ++ * @see ucp_put. ++ * ++ * This routine performs an add operation on a 64 bit integer value atomically. ++ * The remote integer value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a add value is the value that is used for the add operation. ++ * When the operation completes, the original remote value is stored in the ++ * local memory @a result, and the sum of the original remote value and the ++ * operand value is stored in remote memory. ++ * The call to the routine returns when the operation is completed and the ++ * @a result value is updated. ++ * ++ * @note The remote address must be aligned to 64 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] add Value to add. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_fadd64(ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint64_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic swap operation for 32 bit values ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_SWAP. ++ * @see ucp_put. ++ * ++ * This routine swaps a 32 bit value between local and remote memory. ++ * The remote value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a swap value is the value that is used for the swap operation. ++ * When the operation completes, the remote value is stored in the ++ * local memory @a result, and the operand value (@a swap) is stored in remote ++ * memory. The call to the routine returns when the operation is completed and ++ * the @a result value is updated. ++ * ++ * @note The remote address must be aligned to 32 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] swap Value to swap. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_swap32(ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint32_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic swap operation for 64 bit values ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_SWAP. ++ * @see ucp_put. ++ * ++ * This routine swaps a 64 bit value between local and remote memory. ++ * The remote value is described by the combination of the remote ++ * memory address @a remote_addr and the @ref ucp_rkey_h "remote memory handle" ++ * @a rkey. The @a swap value is the value that is used for the swap operation. ++ * When the operation completes, the remote value is stored in the ++ * local memory @a result, and the operand value (@a swap) is stored in remote ++ * memory. The call to the routine returns when the operation is completed and ++ * the @a result value is updated. ++ * ++ * @note The remote address must be aligned to 64 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] swap Value to swap. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_swap64(ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint64_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic conditional swap (cswap) operation for 32 bit values. ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_CSWAP. ++ * @see ucp_put. ++ * ++ * This routine conditionally swaps a 32 bit value between local and remote ++ * memory. The swap occurs only if the condition value (@a continue) is equal ++ * to the remote value, otherwise the remote memory is not modified. The ++ * remote value is described by the combination of the remote memory address @p ++ * remote_addr and the @ref ucp_rkey_h "remote memory handle" @a rkey. The @p ++ * swap value is the value that is used to update the remote memory if the ++ * condition is true. The call to the routine returns when the operation is ++ * completed and the @a result value is updated. ++ * ++ * @note The remote address must be aligned to 32 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] compare Value to compare to. ++ * @param [in] swap Value to swap. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_cswap32(ucp_ep_h ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ uint32_t *result); ++ ++ ++/** ++ * @ingroup UCP_COMM ++ * @brief Blocking atomic conditional swap (cswap) operation for 64 bit values. ++ * @deprecated Replaced by @ref ucp_atomic_fetch_nb with opcode UCP_ATOMIC_FETCH_OP_CSWAP. ++ * @see ucp_put. ++ * ++ * This routine conditionally swaps a 64 bit value between local and remote ++ * memory. The swap occurs only if the condition value (@a continue) is equal ++ * to the remote value, otherwise the remote memory is not modified. The ++ * remote value is described by the combination of the remote memory address @p ++ * remote_addr and the @ref ucp_rkey_h "remote memory handle" @a rkey. The @p ++ * swap value is the value that is used to update the remote memory if the ++ * condition is true. The call to the routine returns when the operation is ++ * completed and the @a result value is updated. ++ * ++ * @note The remote address must be aligned to 64 bit. ++ * ++ * @param [in] ep Remote endpoint handle. ++ * @param [in] compare Value to compare to. ++ * @param [in] swap Value to swap. ++ * @param [in] remote_addr Pointer to the destination remote address ++ * of the atomic variable. ++ * @param [in] rkey Remote memory key associated with the ++ * remote address. ++ * @param [out] result Pointer to the address that is used to store ++ * the previous value of the atomic variable described ++ * by the @a remote_addr ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t ucp_atomic_cswap64(ucp_ep_h ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ uint64_t *result); ++ ++ ++/** ++ * @ingroup UCP_ENDPOINT ++ * @brief Modify endpoint parameters. ++ * ++ * @deprecated Use @ref ucp_listener_conn_handler_t instead of @ref ++ * ucp_listener_accept_handler_t, if you have other use case please ++ * submit an issue on https://github.com/openucx/ucx or report to ++ * ucx-group@elist.ornl.gov ++ * ++ * This routine modifies @ref ucp_ep_h "endpoint" created by @ref ucp_ep_create ++ * or @ref ucp_listener_accept_callback_t. For example, this API can be used ++ * to setup custom parameters like @ref ucp_ep_params_t::user_data or ++ * @ref ucp_ep_params_t::err_handler to endpoint created by ++ * @ref ucp_listener_accept_callback_t. ++ * ++ * @param [in] ep A handle to the endpoint. ++ * @param [in] params User defined @ref ucp_ep_params_t configurations ++ * for the @ref ucp_ep_h "UCP endpoint". ++ * ++ * @return NULL - The endpoint is modified successfully. ++ * @return UCS_PTR_IS_ERR(_ptr) - The reconfiguration failed and an error code ++ * indicates the status. However, the @a endpoint ++ * is not modified and can be used further. ++ * @return otherwise - The reconfiguration process is started, and can be ++ * completed at any point in time. A request handle ++ * is returned to the application in order to track ++ * progress of the endpoint modification. ++ * The application is responsible for releasing the ++ * handle using the @ref ucp_request_free routine. ++ * ++ * @note See the documentation of @ref ucp_ep_params_t for details, only some of ++ * the parameters can be modified. ++ */ ++ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params); ++ ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_def.h +index e2318e1a2..8b8cf4e0e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/api/ucp_def.h +@@ -10,6 +10,7 @@ + #define UCP_DEF_H_ + + #include ++#include + #include + #include + +@@ -81,6 +82,16 @@ typedef struct ucp_config ucp_config_t; + typedef struct ucp_ep *ucp_ep_h; + + ++/** ++ * @ingroup UCP_ENDPOINT ++ * @brief UCP connection request ++ * ++ * A server-side handle to incoming connection request. Can be used to create an ++ * endpoint which connects back to the client. ++ */ ++typedef struct ucp_conn_request *ucp_conn_request_h; ++ ++ + /** + * @ingroup UCP_WORKER + * @brief UCP worker address +@@ -94,14 +105,18 @@ typedef struct ucp_address ucp_address_t; + /** + * @ingroup UCP_ENDPOINT + * @brief Error handling mode for the UCP endpoint. +- * ++ * + * Specifies error handling mode for the UCP endpoint. + */ + typedef enum { + UCP_ERR_HANDLING_MODE_NONE, /**< No guarantees about error + * reporting, imposes minimal + * overhead from a performance +- * perspective */ ++ * perspective. @note In this ++ * mode, any error reporting will ++ * not generate calls to @ref ++ * ucp_ep_params_t::err_handler. ++ */ + UCP_ERR_HANDLING_MODE_PEER /**< Guarantees that send requests + * are always completed + * (successfully or error) even in +@@ -307,15 +322,16 @@ typedef void (*ucp_err_handler_cb_t)(void *arg, ucp_ep_h ep, ucs_status_t status + /** + * @ingroup UCP_COMM + * @brief UCP endpoint error handling context. +- * ++ * + * This structure should be initialized in @ref ucp_ep_params_t to handle peer failure + */ + typedef struct ucp_err_handler { +- ucp_err_handler_cb_t cb; /**< Error handler callback */ ++ ucp_err_handler_cb_t cb; /**< Error handler callback, if NULL, will ++ not be called. */ + void *arg; /**< User defined argument associated with + an endpoint, it will be overridden by + @ref ucp_ep_params_t::user_data if both +- are set */ ++ are set. */ + } ucp_err_handler_t; + + +@@ -338,22 +354,42 @@ typedef void (*ucp_listener_accept_callback_t)(ucp_ep_h ep, void *arg); + + /** + * @ingroup UCP_WORKER +- * @brief UCP callback to handle the creation of an endpoint in a client-server ++ * @brief A callback for handling of incoming connection request @a conn_request ++ * from a client. ++ * ++ * This callback routine is invoked on the server side to handle incoming ++ * connections from remote clients. The user can pass an argument to this ++ * callback. The @a conn_request handle has to be released, either by @ref ++ * ucp_ep_create or @ref ucp_listener_reject routine. ++ * ++ * @param [in] conn_request Connection request handle. ++ * @param [in] arg User's argument for the callback. ++ */ ++typedef void ++(*ucp_listener_conn_callback_t)(ucp_conn_request_h conn_request, void *arg); ++ ++ ++/** ++ * @ingroup UCP_WORKER ++ * @brief UCP callback to handle the connection request in a client-server + * connection establishment flow. + * +- * This structure is used for handling the creation of an endpoint +- * to the remote peer after an incoming connection request on the listener. +- * Other than communication progress routines, it is allowed to call other +- * communication routines from the callback in the struct. +- * The callback should be thread safe with respect to the worker it is invoked +- * on. If the callback is called from different threads, this callback needs +- * thread safety support. ++ * This structure is used for handling an incoming connection request on ++ * the listener. Setting this type of handler allows creating an endpoint on ++ * any other worker and not limited to the worker on which the listener was ++ * created. ++ * @note ++ * - Other than communication progress routines, it is allowed to call all ++ * other communication routines from the callback in the struct. ++ * - The callback is thread safe with respect to the worker it is invoked on. ++ * - It is the user's responsibility to avoid potential dead lock accessing ++ * different worker. + */ +-typedef struct ucp_listener_accept_handler { +- ucp_listener_accept_callback_t cb; /**< Endpoint creation callback */ +- void *arg; /**< User defined argument for the +- callback */ +-} ucp_listener_accept_handler_t; ++typedef struct ucp_listener_conn_handler { ++ ucp_listener_conn_callback_t cb; /**< Connection request callback */ ++ void *arg; /**< User defined argument for the ++ callback */ ++} ucp_listener_conn_handler_t; + + + /** +@@ -433,4 +469,77 @@ typedef enum ucp_wakeup_event_types { + ones. */ + } ucp_wakeup_event_t; + ++ ++/** ++ * @ingroup UCP_ENDPOINT ++ * @brief Tuning parameters for the UCP endpoint. ++ * ++ * The structure defines the parameters that are used for the ++ * UCP endpoint tuning during the UCP ep @ref ucp_ep_create "creation". ++ */ ++typedef struct ucp_ep_params { ++ /** ++ * Mask of valid fields in this structure, using bits from ++ * @ref ucp_ep_params_field. ++ * Fields not specified in this mask would be ignored. ++ * Provides ABI compatibility with respect to adding new fields. ++ */ ++ uint64_t field_mask; ++ ++ /** ++ * Destination address; this field should be set along with its ++ * corresponding bit in the field_mask - @ref ++ * UCP_EP_PARAM_FIELD_REMOTE_ADDRESS and must be obtained using @ref ++ * ucp_worker_get_address. ++ */ ++ const ucp_address_t *address; ++ ++ /** ++ * Desired error handling mode, optional parameter. Default value is ++ * @ref UCP_ERR_HANDLING_MODE_NONE. ++ */ ++ ucp_err_handling_mode_t err_mode; ++ ++ /** ++ * Handler to process transport level failure. ++ */ ++ ucp_err_handler_t err_handler; ++ ++ /** ++ * User data associated with an endpoint. See @ref ucp_stream_poll_ep_t and ++ * @ref ucp_err_handler_t ++ */ ++ void *user_data; ++ ++ /** ++ * Endpoint flags from @ref ucp_ep_params_flags_field. ++ * This value is optional. ++ * If it's not set (along with its corresponding bit in the field_mask - ++ * @ref UCP_EP_PARAM_FIELD_FLAGS), the @ref ucp_ep_create() routine will ++ * consider the flags as set to zero. ++ */ ++ unsigned flags; ++ ++ /** ++ * Destination address in the form of a sockaddr; this field should be set ++ * along with its corresponding bit in the field_mask - @ref ++ * UCP_EP_PARAM_FIELD_SOCK_ADDR and must be obtained from the user, it means ++ * that this type of the endpoint creation is possible only on client side ++ * in client-server connection establishment flow. ++ */ ++ ucs_sock_addr_t sockaddr; ++ ++ /** ++ * Connection request from client; this field should be set along with its ++ * corresponding bit in the field_mask - @ref ++ * UCP_EP_PARAM_FIELD_CONN_REQUEST and must be obtained from @ref ++ * ucp_listener_conn_callback_t, it means that this type of the endpoint ++ * creation is possible only on server side in client-server connection ++ * establishment flow. ++ */ ++ ucp_conn_request_h conn_request; ++ ++} ucp_ep_params_t; ++ ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.c +index f7bf5529f..bce7c074f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -45,6 +46,11 @@ static const char * ucp_rndv_modes[] = { + [UCP_RNDV_MODE_LAST] = NULL, + }; + ++uct_memory_type_t ucm_to_uct_mem_type_map[] = { ++ [UCM_MEM_TYPE_CUDA] = UCT_MD_MEM_TYPE_CUDA, ++ [UCM_MEM_TYPE_CUDA_MANAGED] = UCT_MD_MEM_TYPE_CUDA_MANAGED ++}; ++ + static ucs_config_field_t ucp_config_table[] = { + {"NET_DEVICES", UCP_RSC_CONFIG_ALL, + "Specifies which network device(s) to use. The order is not meaningful.\n" +@@ -68,15 +74,16 @@ static ucs_config_field_t ucp_config_table[] = { + + {"TLS", UCP_RSC_CONFIG_ALL, + "Comma-separated list of transports to use. The order is not meaningful.\n" +- "In addition it's possible to use a combination of the following aliases:\n" + " - all : use all the available transports.\n" + " - sm/shm : all shared memory transports.\n" + " - mm : shared memory transports - only memory mappers.\n" + " - ugni : ugni_rdma and ugni_udt.\n" + " - ib : all infiniband transports.\n" +- " - rc : rc and ud.\n" +- " - rc_x : rc with accelerated verbs and ud.\n" ++ " - rc : rc verbs (uses ud for bootstrap).\n" ++ " - rc_x : rc with accelerated verbs (uses ud_x for bootstrap).\n" ++ " - ud : ud verbs.\n" + " - ud_x : ud with accelerated verbs.\n" ++ " - dc : dc verbs.\n" + " - dc_x : dc with accelerated verbs.\n" + " Using a \\ prefix before a transport name treats it as an explicit transport name\n" + " and disables aliasing.\n", +@@ -89,6 +96,15 @@ static ucs_config_field_t ucp_config_table[] = { + "name, or a wildcard - '*' - which expands to all MD components.", + ucs_offsetof(ucp_config_t, alloc_prio), UCS_CONFIG_TYPE_STRING_ARRAY}, + ++ {"SOCKADDR_AUX_TLS", "ud,ud_x", ++ "Transports to use for exchanging additional address information while\n" ++ "establishing client/server connection. ", ++ ucs_offsetof(ucp_config_t, sockaddr_aux_tls), UCS_CONFIG_TYPE_STRING_ARRAY}, ++ ++ {"WARN_INVALID_CONFIG", "y", ++ "Issue a warning in case of invalid device and/or transport configuration.", ++ ucs_offsetof(ucp_config_t, warn_invalid_config), UCS_CONFIG_TYPE_BOOL}, ++ + {"BCOPY_THRESH", "0", + "Threshold for switching from short to bcopy protocol", + ucs_offsetof(ucp_config_t, ctx.bcopy_thresh), UCS_CONFIG_TYPE_MEMUNITS}, +@@ -98,7 +114,8 @@ static ucs_config_field_t ucp_config_table[] = { + ucs_offsetof(ucp_config_t, ctx.rndv_thresh), UCS_CONFIG_TYPE_MEMUNITS}, + + {"RNDV_SEND_NBR_THRESH", "256k", +- "Threshold for switching from eager to rendezvous protocol in ucp_tag_send_nbr()", ++ "Threshold for switching from eager to rendezvous protocol in ucp_tag_send_nbr().\n" ++ "Relevant only if UCX_RNDV_THRESH is set to \"auto\".", + ucs_offsetof(ucp_config_t, ctx.rndv_send_nbr_thresh), UCS_CONFIG_TYPE_MEMUNITS}, + + {"RNDV_THRESH_FALLBACK", "inf", +@@ -111,11 +128,17 @@ static ucs_config_field_t ucp_config_table[] = { + "the eager_zcopy protocol", + ucs_offsetof(ucp_config_t, ctx.rndv_perf_diff), UCS_CONFIG_TYPE_DOUBLE}, + +- {"MAX_EAGER_LANES", "1", ++ {"MAX_EAGER_LANES", NULL, "", ++ ucs_offsetof(ucp_config_t, ctx.max_eager_lanes), UCS_CONFIG_TYPE_UINT}, ++ ++ {"MAX_EAGER_RAILS", "1", + "Maximal number of devices on which an eager operation may be executed in parallel", + ucs_offsetof(ucp_config_t, ctx.max_eager_lanes), UCS_CONFIG_TYPE_UINT}, + +- {"MAX_RNDV_LANES", "1", ++ {"MAX_RNDV_LANES", NULL,"", ++ ucs_offsetof(ucp_config_t, ctx.max_rndv_lanes), UCS_CONFIG_TYPE_UINT}, ++ ++ {"MAX_RNDV_RAILS", "1", + "Maximal number of devices on which a rendezvous operation may be executed in parallel", + ucs_offsetof(ucp_config_t, ctx.max_rndv_lanes), UCS_CONFIG_TYPE_UINT}, + +@@ -146,7 +169,13 @@ static ucs_config_field_t ucp_config_table[] = { + ucs_offsetof(ucp_config_t, ctx.atomic_mode), UCS_CONFIG_TYPE_ENUM(ucp_atomic_modes)}, + + {"MAX_WORKER_NAME", UCS_PP_MAKE_STRING(UCP_WORKER_NAME_MAX), +- "Maximal length of worker name. Affects the size of worker address in debug builds.", ++ "Maximal length of worker name. " ++#if ENABLE_DEBUG_DATA ++ "Sent to remote peer as part of worker address." ++#else ++ "Not sent to remote peer per build configuration." ++#endif ++ , + ucs_offsetof(ucp_config_t, ctx.max_worker_name), UCS_CONFIG_TYPE_UINT}, + + {"USE_MT_MUTEX", "n", "Use mutex for multithreading support in UCP.\n" +@@ -155,7 +184,7 @@ static ucs_config_field_t ucp_config_table[] = { + ucs_offsetof(ucp_config_t, ctx.use_mt_mutex), UCS_CONFIG_TYPE_BOOL}, + + {"ADAPTIVE_PROGRESS", "y", +- "Enable apaptive progress mechanism, which turns on polling only on active\n" ++ "Enable adaptive progress mechanism, which turns on polling only on active\n" + "transport interfaces.", + ucs_offsetof(ucp_config_t, ctx.adaptive_progress), UCS_CONFIG_TYPE_BOOL}, + +@@ -163,19 +192,19 @@ static ucs_config_field_t ucp_config_table[] = { + "Size of a segment in the worker preregistered memory pool.", + ucs_offsetof(ucp_config_t, ctx.seg_size), UCS_CONFIG_TYPE_MEMUNITS}, + +- {"TM_THRESH", "1024", /* TODO: calculate automaticlly */ ++ {"TM_THRESH", "1024", /* TODO: calculate automatically */ + "Threshold for using tag matching offload capabilities.\n" + "Smaller buffers will not be posted to the transport.", + ucs_offsetof(ucp_config_t, ctx.tm_thresh), UCS_CONFIG_TYPE_MEMUNITS}, + +- {"TM_MAX_BCOPY", "1024", /* TODO: calculate automaticlly */ +- "Maximal size for posting \"bounce buffer\" (UCX interal preregistered memory) for\n" ++ {"TM_MAX_BB_SIZE", "1024", /* TODO: calculate automatically */ ++ "Maximal size for posting \"bounce buffer\" (UCX internal preregistered memory) for\n" + "tag offload receives. When message arrives, it is copied into the user buffer (similar\n" + "to eager protocol). The size values has to be equal or less than segment size.\n" + "Also the value has to be bigger than UCX_TM_THRESH to take an effect." , +- ucs_offsetof(ucp_config_t, ctx.tm_max_bcopy), UCS_CONFIG_TYPE_MEMUNITS}, ++ ucs_offsetof(ucp_config_t, ctx.tm_max_bb_size), UCS_CONFIG_TYPE_MEMUNITS}, + +- {"TM_FORCE_THRESH", "8192", /* TODO: calculate automaticlly */ ++ {"TM_FORCE_THRESH", "8192", /* TODO: calculate automatically */ + "Threshold for forcing tag matching offload mode. Every tag receive operation\n" + "with buffer bigger than this threshold would force offloading of all uncompleted\n" + "non-offloaded receive operations to the transport (e. g. operations with\n" +@@ -195,12 +224,24 @@ static ucs_config_field_t ucp_config_table[] = { + "RNDV fragment size \n", + ucs_offsetof(ucp_config_t, ctx.rndv_frag_size), UCS_CONFIG_TYPE_MEMUNITS}, + ++ {"MEMTYPE_CACHE", "y", ++ "Enable memory type(cuda) cache \n", ++ ucs_offsetof(ucp_config_t, ctx.enable_memtype_cache), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"FLUSH_WORKER_EPS", "y", ++ "Enable flushing the worker by flushing its endpoints. Allows completing\n" ++ "the flush operation in a bounded time even if there are new requests on\n" ++ "another thread, or incoming active messages, but consumes more resources.", ++ ucs_offsetof(ucp_config_t, ctx.flush_worker_eps), UCS_CONFIG_TYPE_BOOL}, ++ + {NULL} + }; ++UCS_CONFIG_REGISTER_TABLE(ucp_config_table, "UCP context", NULL, ucp_config_t) ++ + + static ucp_tl_alias_t ucp_tl_aliases[] = { +- { "sm", { "mm", "knem", "cma", NULL } }, +- { "shm", { "mm", "knem", "cma", NULL } }, ++ { "sm", { "mm", "knem", "cma", "rdmacm", NULL } }, ++ { "shm", { "mm", "knem", "cma", "rdmacm", NULL } }, + { "ib", { "rc", "ud", "dc", "rc_mlx5", "ud_mlx5", "dc_mlx5", "rdmacm", NULL } }, + { "ud", { "ud", "rdmacm", NULL } }, + { "ud_x", { "ud_mlx5", "rdmacm", NULL } }, +@@ -317,12 +358,10 @@ static int ucp_tls_array_is_present(const char **tls, unsigned count, + } + } + +-static int ucp_config_is_tl_enabled(const ucp_config_t *config, const char *tl_name, +- int is_alias, uint8_t *rsc_flags, +- uint64_t *tl_cfg_mask) ++static int ucp_config_is_tl_enabled(const char **names, unsigned count, ++ const char *tl_name, int is_alias, ++ uint8_t *rsc_flags, uint64_t *tl_cfg_mask) + { +- const char **names = (const char**)config->tls.names; +- unsigned count = config->tls.count; + char strict_name[UCT_TL_NAME_MAX + 1]; + + snprintf(strict_name, sizeof(strict_name), "\\%s", tl_name); +@@ -368,28 +407,20 @@ static int ucp_is_resource_in_device_list(const uct_tl_resource_desc_t *resource + return !!mask; + } + +-static int ucp_is_resource_enabled(const uct_tl_resource_desc_t *resource, +- const ucp_config_t *config, uint8_t *rsc_flags, +- uint64_t dev_cfg_masks[], uint64_t *tl_cfg_mask) ++static int ucp_is_resource_in_transports_list(const char *tl_name, ++ const char **names, unsigned count, ++ uint8_t *rsc_flags, uint64_t *tl_cfg_mask) + { +- int device_enabled, tl_enabled; ++ uint64_t dummy_mask, tmp_tl_cfg_mask; ++ uint8_t tmp_rsc_flags; + ucp_tl_alias_t *alias; +- uint64_t dummy_mask; +- uint8_t tmp_flags; ++ int tl_enabled; + char info[32]; +- unsigned count; ++ unsigned alias_arr_count; + +- /* Find the enabled devices */ +- device_enabled = (*rsc_flags & UCP_TL_RSC_FLAG_SOCKADDR) || +- ucp_is_resource_in_device_list(resource, config->devices, +- &dev_cfg_masks[resource->dev_type], +- resource->dev_type); +- +- +- /* Find the enabled UCTs */ +- ucs_assert(config->tls.count > 0); +- if (ucp_config_is_tl_enabled(config, resource->tl_name, 0, rsc_flags, +- tl_cfg_mask)) { ++ ucs_assert(count > 0); ++ if (ucp_config_is_tl_enabled(names, count, tl_name, 0, ++ rsc_flags, tl_cfg_mask)) { + tl_enabled = 1; + } else { + tl_enabled = 0; +@@ -399,20 +430,44 @@ static int ucp_is_resource_enabled(const uct_tl_resource_desc_t *resource, + /* If an alias is enabled, and the transport is part of this alias, + * enable the transport. + */ +- count = ucp_tl_alias_count(alias); ++ alias_arr_count = ucp_tl_alias_count(alias); + snprintf(info, sizeof(info), "for alias '%s'", alias->alias); +- tmp_flags = 0; +- if (ucp_config_is_tl_enabled(config, alias->alias, 1, &tmp_flags, +- tl_cfg_mask) && +- ucp_tls_array_is_present(alias->tls, count, resource->tl_name, +- info, &tmp_flags, &dummy_mask)) { +- *rsc_flags |= tmp_flags; ++ tmp_rsc_flags = 0; ++ tmp_tl_cfg_mask = 0; ++ if (ucp_config_is_tl_enabled(names, count, alias->alias, 1, ++ &tmp_rsc_flags, &tmp_tl_cfg_mask) && ++ ucp_tls_array_is_present(alias->tls, alias_arr_count, tl_name, ++ info, &tmp_rsc_flags, &dummy_mask)) { ++ *rsc_flags |= tmp_rsc_flags; ++ *tl_cfg_mask |= tmp_tl_cfg_mask; + tl_enabled = 1; + break; + } + } + } + ++ return tl_enabled; ++} ++ ++static int ucp_is_resource_enabled(const uct_tl_resource_desc_t *resource, ++ const ucp_config_t *config, uint8_t *rsc_flags, ++ uint64_t dev_cfg_masks[], uint64_t *tl_cfg_mask) ++{ ++ int device_enabled, tl_enabled; ++ ++ /* Find the enabled devices */ ++ device_enabled = (*rsc_flags & UCP_TL_RSC_FLAG_SOCKADDR) || ++ ucp_is_resource_in_device_list(resource, config->devices, ++ &dev_cfg_masks[resource->dev_type], ++ resource->dev_type); ++ ++ ++ /* Find the enabled UCTs */ ++ tl_enabled = ucp_is_resource_in_transports_list(resource->tl_name, ++ (const char**)config->tls.names, ++ config->tls.count, rsc_flags, ++ tl_cfg_mask); ++ + ucs_trace(UCT_TL_RESOURCE_DESC_FMT " is %sabled", + UCT_TL_RESOURCE_DESC_ARG(resource), + (device_enabled && tl_enabled) ? "en" : "dis"); +@@ -509,7 +564,7 @@ static ucs_status_t ucp_add_tl_resources(ucp_context_h context, ucp_tl_md_t *md, + dev_cfg_masks, tl_cfg_mask); + } + +- /* add sockaddr dummy resource, if md suports it */ ++ /* add sockaddr dummy resource, if md supports it */ + if (md->attr.cap.flags & UCT_MD_FLAG_SOCKADDR) { + sa_rsc.dev_type = UCT_DEVICE_TYPE_NET; + ucs_snprintf_zero(sa_rsc.tl_name, UCT_TL_NAME_MAX, "%s", md->rsc.md_name); +@@ -571,10 +626,77 @@ static ucs_status_t ucp_check_tl_names(ucp_context_t *context) + return UCS_OK; + } + ++const char* ucp_tl_bitmap_str(ucp_context_h context, uint64_t tl_bitmap, ++ char *str, size_t max_str_len) ++{ ++ ucp_rsc_index_t i; ++ char *p, *endp; ++ ++ p = str; ++ endp = str + max_str_len; ++ ++ ucs_for_each_bit(i, tl_bitmap) { ++ ucs_snprintf_zero(p, endp - p, "%s ", ++ context->tl_rscs[i].tl_rsc.tl_name); ++ p += strlen(p); ++ } ++ ++ return str; ++} ++ ++static const char* ucp_feature_flag_str(unsigned feature_flag) ++{ ++ switch (feature_flag) { ++ case UCP_FEATURE_TAG: ++ return "UCP_FEATURE_TAG"; ++ case UCP_FEATURE_RMA: ++ return "UCP_FEATURE_RMA"; ++ case UCP_FEATURE_AMO32: ++ return "UCP_FEATURE_AMO32"; ++ case UCP_FEATURE_AMO64: ++ return "UCP_FEATURE_AMO64"; ++ case UCP_FEATURE_WAKEUP: ++ return "UCP_FEATURE_WAKEUP"; ++ case UCP_FEATURE_STREAM: ++ return "UCP_FEATURE_STREAM"; ++ default: ++ ucs_fatal("Unknown feature flag value %u", feature_flag); ++ } ++} ++ ++const char* ucp_feature_flags_str(unsigned feature_flags, char *str, ++ size_t max_str_len) ++{ ++ unsigned i, count; ++ char *p, *endp; ++ ++ p = str; ++ endp = str + max_str_len; ++ count = 0; ++ ++ ucs_for_each_bit(i, feature_flags) { ++ ucs_snprintf_zero(p, endp - p, "%s%s", (count == 0) ? "" : "|", ++ ucp_feature_flag_str(UCS_BIT(i))); ++ count++; ++ p += strlen(p); ++ } ++ ++ if (count == 0) { ++ ucs_assert(max_str_len > 0); ++ str[0] = '\0'; /* empty string */ ++ } ++ ++ return str; ++} ++ + static void ucp_free_resources(ucp_context_t *context) + { + ucp_rsc_index_t i; + ++ if (context->memtype_cache != NULL) { ++ ucs_memtype_cache_destroy(context->memtype_cache); ++ } ++ + ucs_free(context->tl_rscs); + for (i = 0; i < context->num_mds; ++i) { + uct_md_close(context->tl_mds[i].md); +@@ -697,6 +819,28 @@ static void ucp_resource_config_str(const ucp_config_t *config, char *buf, + } + } + ++static void ucp_fill_sockaddr_aux_tls_config(ucp_context_h context, ++ const ucp_config_t *config) ++{ ++ const char **tl_names = (const char**)config->sockaddr_aux_tls.aux_tls; ++ unsigned count = config->sockaddr_aux_tls.count; ++ ucp_rsc_index_t tl_id; ++ uint8_t dummy_flags; ++ uint64_t dummy_mask; ++ ++ context->config.sockaddr_aux_rscs_bitmap = 0; ++ ++ /* Check if any of the context's resources are present in the sockaddr ++ * auxiliary transports for the client-server flow */ ++ for (tl_id = 0; tl_id < context->num_tls; ++tl_id) { ++ if (ucp_is_resource_in_transports_list(context->tl_rscs[tl_id].tl_rsc.tl_name, ++ tl_names, count, &dummy_flags, ++ &dummy_mask)) { ++ context->config.sockaddr_aux_rscs_bitmap |= UCS_BIT(tl_id); ++ } ++ } ++} ++ + static ucs_status_t ucp_check_resources(ucp_context_h context, + const ucp_config_t *config) + { +@@ -751,6 +895,7 @@ static ucs_status_t ucp_fill_resources(ucp_context_h context, + context->tl_rscs = NULL; + context->num_tls = 0; + context->num_mem_type_mds = 0; ++ context->memtype_cache = NULL; + + status = ucp_check_resource_config(config); + if (status != UCS_OK) { +@@ -784,7 +929,7 @@ static ucs_status_t ucp_fill_resources(ucp_context_h context, + for (i = 0; i < num_md_resources; ++i) { + status = ucp_fill_tl_md(&md_rscs[i], &context->tl_mds[md_index]); + if (status != UCS_OK) { +- goto err_free_context_resources; ++ continue; + } + + /* Add communication resources of each MD */ +@@ -815,6 +960,14 @@ static ucs_status_t ucp_fill_resources(ucp_context_h context, + } + } + ++ if (context->num_mem_type_mds && context->config.ext.enable_memtype_cache) { ++ status = ucs_memtype_cache_create(&context->memtype_cache); ++ if (status != UCS_OK) { ++ ucs_debug("could not create memtype cache for mem_type allocations"); ++ goto err_free_context_resources; ++ } ++ } ++ + /* Validate context resources */ + status = ucp_check_resources(context, config); + if (status != UCS_OK) { +@@ -823,13 +976,17 @@ static ucs_status_t ucp_fill_resources(ucp_context_h context, + + uct_release_md_resource_list(md_rscs); + +- /* Notify the user if there are devices or transports from the command line +- * that are not available +- */ +- for (i = 0; i < UCT_DEVICE_TYPE_LAST; ++i) { +- ucp_report_unavailable(&config->devices[i], dev_cfg_masks[i], "device"); ++ if (config->warn_invalid_config) { ++ /* Notify the user if there are devices or transports from the command line ++ * that are not available ++ */ ++ for (i = 0; i < UCT_DEVICE_TYPE_LAST; ++i) { ++ ucp_report_unavailable(&config->devices[i], dev_cfg_masks[i], "device"); ++ } ++ ucp_report_unavailable(&config->tls, tl_cfg_mask, "transport"); + } +- ucp_report_unavailable(&config->tls, tl_cfg_mask, "transport"); ++ ++ ucp_fill_sockaddr_aux_tls_config(context, config); + + return UCS_OK; + +@@ -970,20 +1127,20 @@ static ucs_status_t ucp_fill_config(ucp_context_h context, + } + + /* Need to check MAX_BCOPY value if it is enabled only */ +- if (context->config.ext.tm_max_bcopy > context->config.ext.tm_thresh) { +- if (context->config.ext.tm_max_bcopy < sizeof(ucp_request_hdr_t)) { ++ if (context->config.ext.tm_max_bb_size > context->config.ext.tm_thresh) { ++ if (context->config.ext.tm_max_bb_size < sizeof(ucp_request_hdr_t)) { + /* In case of expected SW RNDV message, the header (ucp_request_hdr_t) is + * scattered to UCP user buffer. Make sure that bounce buffer is used for + * messages which can not fit SW RNDV hdr. */ +- context->config.ext.tm_max_bcopy = sizeof(ucp_request_hdr_t); +- ucs_info("UCX_TM_MAX_BCOPY value: %zu, adjusted to: %zu", +- context->config.ext.tm_max_bcopy, sizeof(ucp_request_hdr_t)); ++ context->config.ext.tm_max_bb_size = sizeof(ucp_request_hdr_t); ++ ucs_info("UCX_TM_MAX_BB_SIZE value: %zu, adjusted to: %zu", ++ context->config.ext.tm_max_bb_size, sizeof(ucp_request_hdr_t)); + } + +- if (context->config.ext.tm_max_bcopy > context->config.ext.seg_size) { +- context->config.ext.tm_max_bcopy = context->config.ext.seg_size; +- ucs_info("Wrong UCX_TM_MAX_BCOPY value: %zu, adjusted to: %zu", +- context->config.ext.tm_max_bcopy, ++ if (context->config.ext.tm_max_bb_size > context->config.ext.seg_size) { ++ context->config.ext.tm_max_bb_size = context->config.ext.seg_size; ++ ucs_info("Wrong UCX_TM_MAX_BB_SIZE value: %zu, adjusted to: %zu", ++ context->config.ext.tm_max_bb_size, + context->config.ext.seg_size); + } + } +@@ -1014,24 +1171,35 @@ ucs_status_t ucp_init_version(unsigned api_major_version, unsigned api_minor_ver + ucp_context_h *context_p) + { + unsigned major_version, minor_version, release_number; ++ ucp_config_t *dfl_config = NULL; + ucp_context_t *context; + ucs_status_t status; ++ ucs_debug_address_info_t addr_info; + + ucp_get_version(&major_version, &minor_version, &release_number); + +- if ((api_major_version != major_version) || (api_minor_version != minor_version)) { +- ucs_error("UCP version is incompatible, required: %d.%d, actual: %d.%d (release %d)", ++ if ((api_major_version != major_version) || ++ ((api_major_version == major_version) && (api_minor_version > minor_version))) { ++ status = ucs_debug_lookup_address(ucp_init_version, &addr_info); ++ ucs_warn("UCP version is incompatible, required: %d.%d, actual: %d.%d (release %d %s)", + api_major_version, api_minor_version, +- major_version, minor_version, release_number); +- status = UCS_ERR_NOT_IMPLEMENTED; +- goto err; ++ major_version, minor_version, release_number, ++ status == UCS_OK ? addr_info.file.path : ""); ++ } ++ ++ if (config == NULL) { ++ status = ucp_config_read(NULL, NULL, &dfl_config); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ config = dfl_config; + } + + /* allocate a ucp context */ + context = ucs_calloc(1, sizeof(*context), "ucp context"); + if (context == NULL) { + status = UCS_ERR_NO_MEMORY; +- goto err; ++ goto err_release_config; + } + + status = ucp_fill_config(context, params, config); +@@ -1054,6 +1222,10 @@ ucs_status_t ucp_init_version(unsigned api_major_version, unsigned api_minor_ver + goto err_free_resources; + } + ++ if (dfl_config != NULL) { ++ ucp_config_release(dfl_config); ++ } ++ + ucs_debug("created ucp context %p [%d mds %d tls] features 0x%lx", context, + context->num_mds, context->num_tls, context->config.features); + +@@ -1066,6 +1238,10 @@ err_free_config: + ucp_free_config(context); + err_free_ctx: + ucs_free(context); ++err_release_config: ++ if (dfl_config != NULL) { ++ ucp_config_release(dfl_config); ++ } + err: + return status; + } +@@ -1104,12 +1280,24 @@ void ucp_dump_payload(ucp_context_h context, char *buffer, size_t max, + } + } + +-uint64_t ucp_context_uct_atomic_iface_flags(ucp_context_h context) ++void ucp_context_uct_atomic_iface_flags(ucp_context_h context, ++ ucp_tl_iface_atomic_flags_t *atomic) + { +- return ((context->config.features & UCP_FEATURE_AMO32) ? +- UCP_UCT_IFACE_ATOMIC32_FLAGS : 0) | +- ((context->config.features & UCP_FEATURE_AMO64) ? +- UCP_UCT_IFACE_ATOMIC64_FLAGS : 0); ++ if (context->config.features & UCP_FEATURE_AMO32) { ++ atomic->atomic32.op_flags = UCP_ATOMIC_OP_MASK; ++ atomic->atomic32.fop_flags = UCP_ATOMIC_FOP_MASK; ++ } else { ++ atomic->atomic32.op_flags = 0; ++ atomic->atomic32.fop_flags = 0; ++ } ++ ++ if (context->config.features & UCP_FEATURE_AMO64) { ++ atomic->atomic64.op_flags = UCP_ATOMIC_OP_MASK; ++ atomic->atomic64.fop_flags = UCP_ATOMIC_FOP_MASK; ++ } else { ++ atomic->atomic64.op_flags = 0; ++ atomic->atomic64.fop_flags = 0; ++ } + } + + ucs_status_t ucp_context_query(ucp_context_h context, ucp_context_attr_t *attr) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.h +index beae69c2c..84cc8b3ae 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_context.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -61,7 +62,7 @@ typedef struct ucp_context_config { + size_t tm_force_thresh; + /** Upper bound for posting tm offload receives with internal UCP + * preregistered bounce buffers. */ +- size_t tm_max_bcopy; ++ size_t tm_max_bb_size; + /** Maximal size of worker name for debugging */ + unsigned max_worker_name; + /** Atomic mode */ +@@ -76,6 +77,10 @@ typedef struct ucp_context_config { + unsigned max_rndv_lanes; + /** Estimated number of endpoints */ + size_t estimated_num_eps; ++ /** Memtype cache */ ++ int enable_memtype_cache; ++ /** Enable flushing endpoints while flushing a worker */ ++ int flush_worker_eps; + } ucp_context_config_t; + + +@@ -88,6 +93,10 @@ struct ucp_config { + ucs_config_names_array_t tls; + /** Array of memory allocation methods */ + UCS_CONFIG_STRING_ARRAY_FIELD(methods) alloc_prio; ++ /** Array of transports for partial worker address to pack */ ++ UCS_CONFIG_STRING_ARRAY_FIELD(aux_tls) sockaddr_aux_tls; ++ /** Warn on invalid configuration */ ++ int warn_invalid_config; + /** Configuration saved directly in the context */ + ucp_context_config_t ctx; + }; +@@ -135,6 +144,7 @@ typedef struct ucp_context { + /* List of MDs which detect non host memory type */ + ucp_rsc_index_t mem_type_tl_mds[UCT_MD_MEM_TYPE_LAST]; + ucp_rsc_index_t num_mem_type_mds; /* Number of mem type MDs */ ++ ucs_memtype_cache_t *memtype_cache; /* mem type allocation cache*/ + + ucp_tl_resource_desc_t *tl_rscs; /* Array of communication resources */ + ucp_rsc_index_t num_tls; /* Number of resources in the array*/ +@@ -169,6 +179,9 @@ typedef struct ucp_context { + } *alloc_methods; + unsigned num_alloc_methods; + ++ /* Bitmap of sockaddr auxiliary transports to pack for client/server flow */ ++ uint64_t sockaddr_aux_rscs_bitmap; ++ + /* Configuration supplied by the user */ + ucp_context_config_t ext; + +@@ -188,6 +201,26 @@ typedef struct ucp_am_handler { + uct_am_callback_t proxy_cb; + } ucp_am_handler_t; + ++typedef struct ucp_tl_iface_atomic_flags { ++ struct { ++ uint64_t op_flags; /**< Attributes for atomic-post operations */ ++ uint64_t fop_flags; /**< Attributes for atomic-fetch operations */ ++ } atomic32, atomic64; ++} ucp_tl_iface_atomic_flags_t; ++ ++ ++#define UCP_ATOMIC_OP_MASK (UCS_BIT(UCT_ATOMIC_OP_ADD) | \ ++ UCS_BIT(UCT_ATOMIC_OP_AND) | \ ++ UCS_BIT(UCT_ATOMIC_OP_OR) | \ ++ UCS_BIT(UCT_ATOMIC_OP_XOR)) ++ ++#define UCP_ATOMIC_FOP_MASK (UCS_BIT(UCT_ATOMIC_OP_ADD) | \ ++ UCS_BIT(UCT_ATOMIC_OP_AND) | \ ++ UCS_BIT(UCT_ATOMIC_OP_OR) | \ ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | \ ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | \ ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP)) ++ + + /* + * Define UCP active message handler. +@@ -229,6 +262,24 @@ typedef struct ucp_am_handler { + }; + + ++/** ++ * Check if at least one feature flag from @a _flags is initialized. ++ */ ++#define UCP_CONTEXT_CHECK_FEATURE_FLAGS(_context, _flags, _action) \ ++ do { \ ++ if (ENABLE_PARAMS_CHECK && \ ++ ucs_unlikely(!((_context)->config.features & (_flags)))) { \ ++ size_t feature_list_str_max = 512; \ ++ char *feature_list_str = ucs_alloca(feature_list_str_max); \ ++ ucs_error("feature flags %s were not set for ucp_init()", \ ++ ucp_feature_flags_str((_flags) & \ ++ ~(_context)->config.features, \ ++ feature_list_str, feature_list_str_max)); \ ++ _action; \ ++ } \ ++ } while (0) ++ ++ + #define UCP_PARAM_VALUE(_obj, _params, _name, _flag, _default) \ + (((_params)->field_mask & (UCP_##_obj##_PARAM_FIELD_##_flag)) ? \ + (_params)->_name : (_default)) +@@ -242,22 +293,45 @@ void ucp_dump_payload(ucp_context_h context, char *buffer, size_t max, + + void ucp_context_tag_offload_enable(ucp_context_h context); + +-uint64_t ucp_context_uct_atomic_iface_flags(ucp_context_h context); ++void ucp_context_uct_atomic_iface_flags(ucp_context_h context, ++ ucp_tl_iface_atomic_flags_t *atomic); + + const char * ucp_find_tl_name_by_csum(ucp_context_t *context, uint16_t tl_name_csum); + ++const char* ucp_tl_bitmap_str(ucp_context_h context, uint64_t tl_bitmap, ++ char *str, size_t max_str_len); ++ ++const char* ucp_feature_flags_str(unsigned feature_flags, char *str, ++ size_t max_str_len); ++ + static UCS_F_ALWAYS_INLINE double + ucp_tl_iface_latency(ucp_context_h context, const uct_iface_attr_t *iface_attr) + { + return iface_attr->latency.overhead + + (iface_attr->latency.growth * context->config.est_num_eps); + } ++extern uct_memory_type_t ucm_to_uct_mem_type_map[]; + + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_memory_type_detect_mds(ucp_context_h context, void *addr, size_t length, + uct_memory_type_t *mem_type_p) + { + unsigned i, md_index; ++ ucm_mem_type_t ucm_mem_type; ++ ++ *mem_type_p = UCT_MD_MEM_TYPE_HOST; ++ ++ if (ucs_likely(!context->num_mem_type_mds)) { ++ return UCS_OK; ++ } ++ ++ if (context->memtype_cache != NULL) { ++ if (ucs_memtype_cache_lookup(context->memtype_cache, addr, ++ length, &ucm_mem_type) == UCS_OK) { ++ *mem_type_p = ucm_to_uct_mem_type_map[ucm_mem_type]; ++ } ++ return UCS_OK; ++ } + + for (i = 0; i < context->num_mem_type_mds; ++i) { + md_index = context->mem_type_tl_mds[i]; +@@ -266,7 +340,7 @@ ucp_memory_type_detect_mds(ucp_context_h context, void *addr, size_t length, + return UCS_OK; + } + } +- *mem_type_p = UCT_MD_MEM_TYPE_HOST; ++ + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.c +index 0e1f239cc..3945a80f9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -23,8 +24,6 @@ + + extern const ucp_proto_t ucp_stream_am_proto; + +-static void ucp_ep_cleanup_lanes(ucp_ep_h ep); +- + #if ENABLE_STATS + static ucs_stats_class_t ucp_ep_stats_class = { + .name = "ucp_ep", +@@ -55,41 +54,15 @@ void ucp_ep_config_key_reset(ucp_ep_config_key_t *key) + memset(key->amo_lanes, UCP_NULL_LANE, sizeof(key->amo_lanes)); + } + +-void ucp_ep_add_to_hash(ucp_ep_h ep) +-{ +- ucp_worker_h worker = ep->worker; +- int hash_extra_status = 0; +- khiter_t hash_it; +- +- hash_it = kh_put(ucp_worker_ep_hash, &worker->ep_hash, ep->dest_uuid, +- &hash_extra_status); +- if (ucs_unlikely(hash_it == kh_end(&worker->ep_hash))) { +- ucs_fatal("Hash failed with ep %p to %s 0x%"PRIx64"->0x%"PRIx64 +- "with status %d", ep, ucp_ep_peer_name(ep), worker->uuid, +- ep->dest_uuid, hash_extra_status); +- } +- kh_value(&worker->ep_hash, hash_it) = ep; +-} +- +-void ucp_ep_delete_from_hash(ucp_ep_h ep) +-{ +- khiter_t hash_it; +- +- hash_it = kh_get(ucp_worker_ep_hash, &ep->worker->ep_hash, ep->dest_uuid); +- if (hash_it != kh_end(&ep->worker->ep_hash)) { +- kh_del(ucp_worker_ep_hash, &ep->worker->ep_hash, hash_it); +- } +-} +- +-ucs_status_t ucp_ep_new(ucp_worker_h worker, uint64_t dest_uuid, +- const char *peer_name, const char *message, +- ucp_ep_h *ep_p) ++ucs_status_t ucp_ep_new(ucp_worker_h worker, const char *peer_name, ++ const char *message, ucp_ep_h *ep_p) + { + ucs_status_t status; + ucp_ep_config_key_t key; ++ ucp_lane_index_t lane; + ucp_ep_h ep; + +- ep = ucs_calloc(1, sizeof(*ep), "ucp ep"); ++ ep = ucs_strided_alloc_get(&worker->ep_alloc, "ucp_ep"); + if (ep == NULL) { + ucs_error("Failed to allocate ep"); + status = UCS_ERR_NO_MEMORY; +@@ -97,28 +70,25 @@ ucs_status_t ucp_ep_new(ucp_worker_h worker, uint64_t dest_uuid, + } + + ucp_ep_config_key_reset(&key); +- ep->worker = worker; +- ep->dest_uuid = dest_uuid; +- ep->user_data = NULL; +- ep->cfg_index = ucp_worker_get_ep_config(worker, &key); +- ep->am_lane = UCP_NULL_LANE; +- ep->flags = 0; +- +- if (worker->context->config.features & UCP_FEATURE_STREAM) { +- +- ep->ext.stream = ucs_calloc(1, sizeof(*ep->ext.stream), +- "ucp ep stream extension"); +- if (ep->ext.stream == NULL) { +- ucs_error("Failed to allocate ucp ep stream extension"); +- status = UCS_ERR_NO_MEMORY; +- goto err_free_ep; +- } +- +- ucs_queue_head_init(&ep->ext.stream->match_q); +- ep->ext.stream->ucp_ep = ep; +- ep->ext.stream->flags = UCP_EP_STREAM_FLAG_VALID; +- } else { +- ep->ext.stream = NULL; ++ ep->worker = worker; ++ ep->cfg_index = ucp_worker_get_ep_config(worker, &key); ++ ep->am_lane = UCP_NULL_LANE; ++ ep->flags = 0; ++ ep->conn_sn = -1; ++ ucp_ep_ext_gen(ep)->user_data = NULL; ++ ucp_ep_ext_gen(ep)->dest_ep_ptr = 0; ++ ucp_ep_ext_gen(ep)->err_cb = NULL; ++ UCS_STATIC_ASSERT(sizeof(ucp_ep_ext_gen(ep)->ep_match) >= ++ sizeof(ucp_ep_ext_gen(ep)->listener)); ++ UCS_STATIC_ASSERT(sizeof(ucp_ep_ext_gen(ep)->ep_match) >= ++ sizeof(ucp_ep_ext_gen(ep)->flush_state)); ++ memset(&ucp_ep_ext_gen(ep)->ep_match, 0, ++ sizeof(ucp_ep_ext_gen(ep)->ep_match)); ++ ++ ucp_stream_ep_init(ep); ++ ++ for (lane = 0; lane < UCP_MAX_LANES; ++lane) { ++ ep->uct_eps[lane] = NULL; + } + + #if ENABLE_DEBUG_DATA +@@ -129,106 +99,76 @@ ucs_status_t ucp_ep_new(ucp_worker_h worker, uint64_t dest_uuid, + status = UCS_STATS_NODE_ALLOC(&ep->stats, &ucp_ep_stats_class, + worker->stats, "-%p", ep); + if (status != UCS_OK) { +- goto err_free_ext_ep; ++ goto err_free_ep; + } + +- ucp_ep_add_to_hash(ep); +- ++ ucs_list_add_tail(&worker->all_eps, &ucp_ep_ext_gen(ep)->ep_list); + *ep_p = ep; +- ucs_debug("created ep %p to %s %s", ucp_ep_peer_name(ep), peer_name, message); ++ ucs_debug("created ep %p to %s %s", ep, ucp_ep_peer_name(ep), message); + return UCS_OK; + +-err_free_ext_ep: +- ucs_free(ep->ext.stream); + err_free_ep: + ucs_free(ep); + err: + return status; + } + +-static void ucp_ep_delete(ucp_ep_h ep) ++void ucp_ep_delete(ucp_ep_h ep) + { +- ucp_ep_delete_from_hash(ep); + UCS_STATS_NODE_FREE(ep->stats); +- ucs_free(ep->ext.stream); +- ucs_free(ep); ++ ucs_list_del(&ucp_ep_ext_gen(ep)->ep_list); ++ ucs_strided_alloc_put(&ep->worker->ep_alloc, ep); + } + +-void ucp_ep_config_key_set_params(ucp_ep_config_key_t *key, +- const ucp_ep_params_t *params) +-{ +- key->err_mode = UCP_PARAM_VALUE(EP, params, err_mode, ERR_HANDLING_MODE, +- UCP_ERR_HANDLING_MODE_NONE); +-} +- +-ucs_status_t ucp_ep_create_stub(ucp_worker_h worker, uint64_t dest_uuid, +- const ucp_ep_params_t *params, +- const char *peer_name, const char *message, +- ucp_ep_h *ep_p) ++ucs_status_t ucp_ep_create_sockaddr_aux(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ++ const ucp_unpacked_address_t *remote_address, ++ ucp_ep_h *ep_p) + { ++ ucp_wireup_ep_t *wireup_ep; + ucs_status_t status; +- ucp_ep_config_key_t key; +- ucp_ep_h ep = NULL; ++ ucp_ep_h ep; + +- status = ucp_ep_new(worker, dest_uuid, peer_name, message, &ep); ++ /* allocate endpoint */ ++ status = ucp_ep_new(worker, remote_address->name, "listener", &ep); + if (status != UCS_OK) { + goto err; + } + +- ucp_ep_config_key_reset(&key); +- +- if (params != NULL) { +- ucp_ep_config_key_set_params(&key, params); ++ status = ucp_ep_init_create_wireup(ep, params, &wireup_ep); ++ if (status != UCS_OK) { ++ goto err_delete; + } + +- /* all operations will use the first lane, which is a stub endpoint */ +- key.num_lanes = 1; +- key.lanes[0].rsc_index = UCP_NULL_RESOURCE; +- key.lanes[0].dst_md_index = UCP_NULL_RESOURCE; +- key.am_lane = 0; +- key.wireup_lane = 0; +- key.tag_lane = 0; +- key.am_bw_lanes[0] = 0; +- key.rma_lanes[0] = 0; +- key.rma_bw_lanes[0] = 0; +- key.amo_lanes[0] = 0; +- +- ep->cfg_index = ucp_worker_get_ep_config(worker, &key); +- ep->am_lane = 0; +- +- status = ucp_wireup_ep_create(ep, &ep->uct_eps[0]); ++ status = ucp_wireup_ep_connect_aux(wireup_ep, params, ++ remote_address->address_count, ++ remote_address->address_list); + if (status != UCS_OK) { +- goto err_delete; ++ goto err_destroy_wireup_ep; + } + + *ep_p = ep; +- return UCS_OK; ++ return status; + ++err_destroy_wireup_ep: ++ uct_ep_destroy(ep->uct_eps[0]); + err_delete: + ucp_ep_delete(ep); + err: + return status; + } + +-int ucp_ep_is_stub(ucp_ep_h ep) ++void ucp_ep_config_key_set_params(ucp_ep_config_key_t *key, ++ const ucp_ep_params_t *params) + { +- return ucp_ep_get_rsc_index(ep, 0) == UCP_NULL_RESOURCE; ++ key->err_mode = UCP_PARAM_VALUE(EP, params, err_mode, ERR_HANDLING_MODE, ++ UCP_ERR_HANDLING_MODE_NONE); + } + +-static void +-ucp_ep_setup_err_handler(ucp_ep_h ep, const ucp_err_handler_t *err_handler) ++int ucp_ep_is_sockaddr_stub(ucp_ep_h ep) + { +- khiter_t hash_it; +- int hash_extra_status = 0; +- +- hash_it = kh_put(ucp_ep_errh_hash, &ep->worker->ep_errh_hash, (uintptr_t)ep, +- &hash_extra_status); +- if (ucs_unlikely(hash_it == kh_end(&ep->worker->ep_errh_hash))) { +- ucs_fatal("Hash failed on setup error handler of endpoint %p with status %d ", +- ep, hash_extra_status); +- } +- kh_value(&ep->worker->ep_errh_hash, hash_it) = err_handler->cb; +- ep->user_data = err_handler->arg; ++ /* Only a sockaddr client-side endpoint may be created as a "stub" */ ++ return ucp_ep_get_rsc_index(ep, 0) == UCP_NULL_RESOURCE; + } + + static ucs_status_t +@@ -245,11 +185,14 @@ ucp_ep_adjust_params(ucp_ep_h ep, const ucp_ep_params_t *params) + } + + if (params->field_mask & UCP_EP_PARAM_FIELD_ERR_HANDLER) { +- ucp_ep_setup_err_handler(ep, ¶ms->err_handler); ++ ucp_ep_ext_gen(ep)->user_data = params->err_handler.arg; ++ ucp_ep_ext_gen(ep)->err_cb = params->err_handler.cb; + } + +- ep->user_data = UCP_PARAM_VALUE(EP, params, user_data, USER_DATA, +- ep->user_data); ++ if (params->field_mask & UCP_EP_PARAM_FIELD_USER_DATA) { ++ /* user_data overrides err_handler.arg */ ++ ucp_ep_ext_gen(ep)->user_data = params->user_data; ++ } + + return UCS_OK; + } +@@ -257,9 +200,10 @@ ucp_ep_adjust_params(ucp_ep_h ep, const ucp_ep_params_t *params) + ucs_status_t ucp_worker_create_mem_type_endpoints(ucp_worker_h worker) + { + ucp_context_h context = worker->context; ++ ucp_unpacked_address_t local_address; + unsigned i, mem_type, md_index; + ucs_status_t status; +- void *address; ++ void *address_buffer; + size_t address_length; + ucp_ep_params_t params; + +@@ -271,34 +215,40 @@ ucs_status_t ucp_worker_create_mem_type_endpoints(ucp_worker_h worker) + return UCS_OK; + } + +- params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ params.field_mask = 0; + + for (i = 0; i < context->num_mem_type_mds; ++i) { + md_index = context->mem_type_tl_mds[i]; + mem_type = context->tl_mds[md_index].attr.cap.mem_type; + + status = ucp_address_pack(worker, NULL, context->mem_type_tls[mem_type], NULL, +- &address_length, &address); ++ &address_length, &address_buffer); + if (status != UCS_OK) { + goto err_cleanup_eps; + } + +- /*reset uuid to mem_type id*/ +- *(uint64_t*)address = mem_type; +- +- params.address = (ucp_address_t*)address; ++ status = ucp_address_unpack(address_buffer, &local_address); ++ if (status != UCS_OK) { ++ goto err_free_address_buffer; ++ } + +- status = ucp_ep_create_to_worker_addr(worker, ¶ms, UCP_EP_INIT_FLAG_MEM_TYPE, +- "mem type", &worker->mem_type_ep[mem_type]); ++ status = ucp_ep_create_to_worker_addr(worker, ¶ms, &local_address, ++ UCP_EP_INIT_FLAG_MEM_TYPE, "mem type", ++ &worker->mem_type_ep[mem_type]); + if (status != UCS_OK) { +- goto err_cleanup_eps; ++ goto err_free_address_list; + } + +- ucs_free(address); ++ ucs_free(local_address.address_list); ++ ucs_free(address_buffer); + } + + return UCS_OK; + ++err_free_address_list: ++ ucs_free(local_address.address_list); ++err_free_address_buffer: ++ ucs_free(address_buffer); + err_cleanup_eps: + for (i = 0; i < UCT_MD_MEM_TYPE_LAST; i++) { + if (worker->mem_type_ep[i]) { +@@ -308,70 +258,78 @@ err_cleanup_eps: + return status; + } + +-ucs_status_t ucp_ep_create_to_worker_addr(ucp_worker_h worker, +- const ucp_ep_params_t *params, +- unsigned ep_init_flags, +- const char *message, ucp_ep_h *ep_p) ++ucs_status_t ucp_ep_init_create_wireup(ucp_ep_h ep, ++ const ucp_ep_params_t *params, ++ ucp_wireup_ep_t **wireup_ep) + { +- ucp_address_entry_t *address_list; +- uint8_t addr_indices[UCP_MAX_LANES]; +- char peer_name[UCP_WORKER_NAME_MAX]; +- unsigned address_count; ++ ucp_ep_config_key_t key; + ucs_status_t status; +- uint64_t dest_uuid; +- ucp_ep_h ep; + +- if (!(params->field_mask & UCP_EP_PARAM_FIELD_REMOTE_ADDRESS)) { +- status = UCS_ERR_INVALID_PARAM; +- ucs_error("remote worker address is missing"); +- goto out; +- } ++ ucp_ep_config_key_reset(&key); ++ ucp_ep_config_key_set_params(&key, params); + +- UCP_CHECK_PARAM_NON_NULL(params->address, status, goto out); ++ /* all operations will use the first lane, which is a stub endpoint */ ++ key.num_lanes = 1; ++ key.lanes[0].rsc_index = UCP_NULL_RESOURCE; ++ key.lanes[0].dst_md_index = UCP_NULL_RESOURCE; ++ key.am_lane = 0; ++ key.wireup_lane = 0; ++ key.tag_lane = 0; ++ key.am_bw_lanes[0] = 0; ++ key.rma_lanes[0] = 0; ++ key.rma_bw_lanes[0] = 0; ++ key.amo_lanes[0] = 0; ++ ++ ep->cfg_index = ucp_worker_get_ep_config(ep->worker, &key); ++ ep->am_lane = 0; ++ ep->flags |= UCP_EP_FLAG_CONNECT_REQ_QUEUED; + +- status = ucp_address_unpack(params->address, &dest_uuid, peer_name, +- sizeof(peer_name), &address_count, &address_list); ++ status = ucp_wireup_ep_create(ep, &ep->uct_eps[0]); + if (status != UCS_OK) { +- ucs_error("failed to unpack remote address: %s", ucs_status_string(status)); +- goto out; ++ return status; + } + +- ep = ucp_worker_ep_find(worker, dest_uuid); +- if (ep != NULL) { +- status = ucp_ep_adjust_params(ep, params); +- if ((status == UCS_OK) && (ep->ext.stream != NULL)) { +- ep->ext.stream->flags |= UCP_EP_STREAM_FLAG_VALID; +- } ++ *wireup_ep = ucs_derived_of(ep->uct_eps[0], ucp_wireup_ep_t); ++ return UCS_OK; ++} + +- goto out_free_address; +- } ++ucs_status_t ucp_ep_create_to_worker_addr(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ++ const ucp_unpacked_address_t *remote_address, ++ unsigned ep_init_flags, ++ const char *message, ucp_ep_h *ep_p) ++{ ++ uint8_t addr_indices[UCP_MAX_LANES]; ++ ucs_status_t status; ++ ucp_ep_h ep; + + /* allocate endpoint */ +- status = ucp_ep_new(worker, dest_uuid, peer_name, message, &ep); ++ status = ucp_ep_new(worker, remote_address->name, message, &ep); + if (status != UCS_OK) { +- goto out_free_address; ++ goto err; + } + +- ep->flags |= UCP_EP_FLAG_DEST_UUID_PEER; +- + /* initialize transport endpoints */ +- status = ucp_wireup_init_lanes(ep, params, ep_init_flags, address_count, +- address_list, addr_indices); ++ status = ucp_wireup_init_lanes(ep, params, ep_init_flags, ++ remote_address->address_count, ++ remote_address->address_list, addr_indices); + if (status != UCS_OK) { + goto err_delete; + } + +- status = UCS_OK; +- goto out_free_address; ++ status = ucp_ep_adjust_params(ep, params); ++ if (status != UCS_OK) { ++ goto err_cleanup_lanes; ++ } + ++ *ep_p = ep; ++ return UCS_OK; ++ ++err_cleanup_lanes: ++ ucp_ep_cleanup_lanes(ep); + err_delete: + ucp_ep_delete(ep); +-out_free_address: +- ucs_free(address_list); +- if (status == UCS_OK) { +- *ep_p = ep; +- } +-out: ++err: + return status; + } + +@@ -380,6 +338,7 @@ static ucs_status_t ucp_ep_create_to_sock_addr(ucp_worker_h worker, + ucp_ep_h *ep_p) + { + char peer_name[UCS_SOCKADDR_STRING_LEN]; ++ ucp_wireup_ep_t *wireup_ep; + ucs_status_t status; + ucp_ep_h ep; + +@@ -393,12 +352,22 @@ static ucs_status_t ucp_ep_create_to_sock_addr(ucp_worker_h worker, + + /* allocate endpoint */ + ucs_sockaddr_str(params->sockaddr.addr, peer_name, sizeof(peer_name)); +- status = ucp_ep_create_stub(worker, ucs_generate_uuid(0), params, peer_name, +- "from api call", &ep); ++ ++ status = ucp_ep_new(worker, peer_name, "from api call", &ep); + if (status != UCS_OK) { + goto err; + } + ++ status = ucp_ep_init_create_wireup(ep, params, &wireup_ep); ++ if (status != UCS_OK) { ++ goto err_delete; ++ } ++ ++ status = ucp_ep_adjust_params(ep, params); ++ if (status != UCS_OK) { ++ goto err_cleanup_lanes; ++ } ++ + status = ucp_wireup_ep_connect_to_sockaddr(ep->uct_eps[0], params); + if (status != UCS_OK) { + goto err_cleanup_lanes; +@@ -408,11 +377,204 @@ static ucs_status_t ucp_ep_create_to_sock_addr(ucp_worker_h worker, + return UCS_OK; + + err_cleanup_lanes: +- ucp_ep_destroy_internal(ep); ++ ucp_ep_cleanup_lanes(ep); ++err_delete: ++ ucp_ep_delete(ep); + err: + return status; + } + ++/** ++ * Create an endpoint on the server side connected to the client endpoint. ++ */ ++ucs_status_t ucp_ep_create_accept(ucp_worker_h worker, ++ const ucp_wireup_client_data_t *client_data, ++ ucp_ep_h *ep_p) ++{ ++ ucp_ep_params_t params; ++ ucp_unpacked_address_t remote_address; ++ ucs_status_t status; ++ ++ params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; ++ params.err_mode = client_data->err_mode; ++ ++ status = ucp_address_unpack(client_data + 1, &remote_address); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ if (client_data->is_full_addr) { ++ /* create endpoint to the worker address we got in the private data */ ++ status = ucp_ep_create_to_worker_addr(worker, ¶ms, &remote_address, ++ UCP_EP_CREATE_AM_LANE, "listener", ++ ep_p); ++ if (status == UCS_OK) { ++ ucp_ep_flush_state_reset(*ep_p); ++ } else { ++ goto out_free_address; ++ } ++ } else { ++ status = ucp_ep_create_sockaddr_aux(worker, ¶ms, &remote_address, ++ ep_p); ++ if (status == UCS_OK) { ++ /* the server's ep should be aware of the sent address from the client */ ++ (*ep_p)->flags |= UCP_EP_FLAG_LISTENER; ++ /* NOTE: protect union */ ++ ucs_assert(!((*ep_p)->flags & (UCP_EP_FLAG_ON_MATCH_CTX | ++ UCP_EP_FLAG_FLUSH_STATE_VALID))); ++ } else { ++ goto out_free_address; ++ } ++ } ++ ++ ucp_ep_update_dest_ep_ptr(*ep_p, client_data->ep_ptr); ++ ++out_free_address: ++ ucs_free(remote_address.address_list); ++out: ++ return status; ++} ++ ++static ucs_status_t ++ucp_ep_create_api_conn_request(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ucp_ep_h *ep_p) ++{ ++ ucp_conn_request_h conn_request = params->conn_request; ++ ucp_ep_h ep; ++ ucs_status_t status; ++ ++ /* coverity[overrun-buffer-val] */ ++ status = ucp_ep_create_accept(worker, &conn_request->client_data, &ep); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ status = ucp_ep_adjust_params(ep, params); ++ if (status != UCS_OK) { ++ goto out_ep_destroy; ++ } ++ ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ status = ucp_wireup_send_pre_request(ep); ++ } else { ++ /* send wireup request message, to connect the client to the server's ++ new endpoint */ ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED)); ++ status = ucp_wireup_send_request(ep); ++ } ++ ++ if (status == UCS_OK) { ++ *ep_p = ep; ++ goto out; ++ } ++ ++out_ep_destroy: ++ ucp_ep_destroy_internal(ep); ++out: ++ if (status == UCS_OK) { ++ status = uct_iface_accept(conn_request->listener->wiface.iface, ++ conn_request->uct_req); ++ } else { ++ uct_iface_reject(conn_request->listener->wiface.iface, ++ conn_request->uct_req); ++ } ++ ucs_free(params->conn_request); ++ ++ return status; ++} ++ ++static ucs_status_t ++ucp_ep_create_api_to_worker_addr(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ucp_ep_h *ep_p) ++{ ++ ucp_unpacked_address_t remote_address; ++ ucp_ep_conn_sn_t conn_sn; ++ ucs_status_t status; ++ unsigned flags; ++ ucp_ep_h ep; ++ ++ if (!(params->field_mask & UCP_EP_PARAM_FIELD_REMOTE_ADDRESS)) { ++ status = UCS_ERR_INVALID_PARAM; ++ ucs_error("remote worker address is missing"); ++ goto out; ++ } ++ ++ UCP_CHECK_PARAM_NON_NULL(params->address, status, goto out); ++ ++ status = ucp_address_unpack(params->address, &remote_address); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ /* Check if there is already an unconnected internal endpoint to the same ++ * destination address. ++ * In case of loopback connection, search the hash table for an endpoint with ++ * even/odd matching, so that every 2 endpoints connected to the local worker ++ * with be paired to each other. ++ * Note that if a loopback endpoint had the UCP_EP_PARAMS_FLAGS_NO_LOOPBACK ++ * flag set, it will not be added to ep_match as an unexpected ep. Because ++ * dest_ep_ptr will be initialized, a WIREUP_REQUEST (if sent) will have ++ * dst_ep != 0. So, ucp_wireup_request() will not create an unexpected ep ++ * in ep_match. ++ */ ++ conn_sn = ucp_ep_match_get_next_sn(&worker->ep_match_ctx, remote_address.uuid); ++ ep = ucp_ep_match_retrieve_unexp(&worker->ep_match_ctx, remote_address.uuid, ++ conn_sn ^ (remote_address.uuid == worker->uuid)); ++ if (ep != NULL) { ++ status = ucp_ep_adjust_params(ep, params); ++ if (status != UCS_OK) { ++ ucp_ep_destroy_internal(ep); ++ } ++ ++ ucp_ep_flush_state_reset(ep); ++ ucp_stream_ep_activate(ep); ++ goto out_free_address; ++ } ++ ++ status = ucp_ep_create_to_worker_addr(worker, params, &remote_address, 0, ++ "from api call", &ep); ++ if (status != UCS_OK) { ++ goto out_free_address; ++ } ++ ++ ep->conn_sn = conn_sn; ++ ++ /* ++ * If we are connecting to our own worker, and loopback is allowed, connect ++ * the endpoint to itself by updating dest_ep_ptr. ++ * Otherwise, add the new ep to the matching context as an expected endpoint, ++ * waiting for connection request from the peer endpoint ++ */ ++ flags = UCP_PARAM_VALUE(EP, params, flags, FLAGS, 0); ++ if ((remote_address.uuid == worker->uuid) && ++ !(flags & UCP_EP_PARAMS_FLAGS_NO_LOOPBACK)) { ++ ucp_ep_update_dest_ep_ptr(ep, (uintptr_t)ep); ++ ucp_ep_flush_state_reset(ep); ++ } else { ++ ucp_ep_match_insert_exp(&worker->ep_match_ctx, remote_address.uuid, ep); ++ } ++ ++ /* if needed, send initial wireup message */ ++ if (!(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED)) { ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED)); ++ status = ucp_wireup_send_request(ep); ++ if (status != UCS_OK) { ++ ucp_ep_destroy_internal(ep); ++ goto out_free_address; ++ } ++ } ++ ++ status = UCS_OK; ++ ++out_free_address: ++ ucs_free(remote_address.address_list); ++out: ++ if (status == UCS_OK) { ++ *ep_p = ep; ++ } ++ return status; ++} ++ + ucs_status_t ucp_ep_create(ucp_worker_h worker, const ucp_ep_params_t *params, + ucp_ep_h *ep_p) + { +@@ -420,39 +582,27 @@ ucs_status_t ucp_ep_create(ucp_worker_h worker, const ucp_ep_params_t *params, + unsigned flags; + ucp_ep_h ep = NULL; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + UCS_ASYNC_BLOCK(&worker->async); + + flags = UCP_PARAM_VALUE(EP, params, flags, FLAGS, 0); + if (flags & UCP_EP_PARAMS_FLAGS_CLIENT_SERVER) { + status = ucp_ep_create_to_sock_addr(worker, params, &ep); +- if (status != UCS_OK) { +- goto out; +- } ++ } else if (params->field_mask & UCP_EP_PARAM_FIELD_CONN_REQUEST) { ++ status = ucp_ep_create_api_conn_request(worker, params, &ep); ++ } else if (params->field_mask & UCP_EP_PARAM_FIELD_REMOTE_ADDRESS) { ++ status = ucp_ep_create_api_to_worker_addr(worker, params, &ep); + } else { +- status = ucp_ep_create_to_worker_addr(worker, params, 0, "from api call", +- &ep); +- if (status != UCS_OK) { +- goto out; +- } +- +- if (!(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED)) { +- /* send initial wireup message */ +- status = ucp_wireup_send_request(ep, ep->dest_uuid); +- if (status != UCS_OK) { +- ucp_ep_destroy_internal(ep); +- goto out; +- } +- } ++ status = UCS_ERR_INVALID_PARAM; + } + +- status = ucp_ep_adjust_params(ep, params); +- +- *ep_p = ep; ++ if (status == UCS_OK) { ++ ep->flags |= UCP_EP_FLAG_USED; ++ *ep_p = ep; ++ } + +-out: + UCS_ASYNC_UNBLOCK(&worker->async); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } + +@@ -467,13 +617,13 @@ ucs_status_ptr_t ucp_ep_modify_nb(ucp_ep_h ep, const ucp_ep_params_t *params) + return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM); + } + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + UCS_ASYNC_BLOCK(&worker->async); + + status = ucp_ep_adjust_params(ep, params); + + UCS_ASYNC_UNBLOCK(&worker->async); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return UCS_STATUS_PTR(status); + } +@@ -498,7 +648,7 @@ void ucp_ep_destroy_internal(ucp_ep_h ep) + ucp_ep_delete(ep); + } + +-static void ucp_ep_cleanup_lanes(ucp_ep_h ep) ++void ucp_ep_cleanup_lanes(ucp_ep_h ep) + { + ucp_lane_index_t lane, proxy_lane; + uct_ep_h uct_ep; +@@ -530,31 +680,29 @@ static void ucp_ep_cleanup_lanes(ucp_ep_h ep) + ucs_debug("ep %p: destroy uct_ep[%d]=%p", ep, lane, uct_ep); + uct_ep_destroy(uct_ep); + } ++ ++ for (lane = 0; lane < ucp_ep_num_lanes(ep); ++lane) { ++ ep->uct_eps[lane] = NULL; ++ } + } + +-static void ucp_ep_ext_stream_invalidate(ucp_ep_h ep) ++void ucp_ep_disconnected(ucp_ep_h ep, int force) + { +- ucp_ep_ext_stream_t *ep_stream = ep->ext.stream; +- void *data; +- size_t length; ++ /* remove pending slow-path progress in case it wasn't removed yet */ ++ ucs_callbackq_remove_if(&ep->worker->uct->progress_q, ++ ucp_worker_err_handle_remove_filter, ep); + +- if (ep_stream == NULL) { +- return; +- } ++ /* remove pending slow-path function it wasn't removed yet */ ++ ucs_callbackq_remove_if(&ep->worker->uct->progress_q, ++ ucp_listener_accept_cb_remove_filter, ep); + +- while ((data = ucp_stream_recv_data_nb(ep, &length)) != NULL) { +- ucs_assert_always(!UCS_PTR_IS_ERR(data)); +- ucp_stream_data_release(ep, data); +- } ++ ucp_stream_ep_cleanup(ep); + +- ep->ext.stream->flags &= ~UCP_EP_STREAM_FLAG_VALID; +-} +- +-static void ucp_ep_disconnected(ucp_ep_h ep, int force) +-{ +- ucp_ep_ext_stream_invalidate(ep); ++ ep->flags &= ~UCP_EP_FLAG_USED; ++ ep->flags |= UCP_EP_FLAG_CLOSED; + +- if ((ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED) && !force) { ++ if ((ep->flags & (UCP_EP_FLAG_CONNECT_REQ_QUEUED|UCP_EP_FLAG_REMOTE_CONNECTED)) ++ && !force) { + /* Endpoints which have remote connection are destroyed only when the + * worker is destroyed, to enable remote endpoints keep sending + * TODO negotiate disconnect. +@@ -563,7 +711,7 @@ static void ucp_ep_disconnected(ucp_ep_h ep, int force) + return; + } + +- ucp_ep_delete_from_hash(ep); ++ ucp_ep_match_remove_ep(&ep->worker->ep_match_ctx, ep); + ucp_ep_destroy_internal(ep); + } + +@@ -608,21 +756,22 @@ ucs_status_ptr_t ucp_ep_close_nb(ucp_ep_h ep, unsigned mode) + return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM); + } + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + UCS_ASYNC_BLOCK(&worker->async); ++ + request = ucp_ep_flush_internal(ep, + (mode == UCP_EP_CLOSE_MODE_FLUSH) ? + UCT_FLUSH_FLAG_LOCAL : UCT_FLUSH_FLAG_CANCEL, +- NULL, 0, +- ucp_ep_close_flushed_callback); ++ NULL, 0, NULL, ++ ucp_ep_close_flushed_callback, "close"); + if (!UCS_PTR_IS_PTR(request)) { + ucp_ep_disconnected(ep, mode == UCP_EP_CLOSE_MODE_FORCE); + } + + UCS_ASYNC_UNBLOCK(&worker->async); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return request; + } +@@ -638,7 +787,7 @@ void ucp_ep_destroy(ucp_ep_h ep) + ucs_status_ptr_t *request; + ucs_status_t status; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + request = ucp_disconnect_nb(ep); + if (request == NULL) { + goto out; +@@ -651,11 +800,12 @@ void ucp_ep_destroy(ucp_ep_h ep) + ucp_worker_progress(worker); + status = ucp_request_check_status(request); + } while (status == UCS_INPROGRESS); ++ + ucp_request_release(request); + } + + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return; + } + +@@ -749,76 +899,63 @@ static size_t ucp_ep_config_calc_rndv_thresh(ucp_context_h context, + } + } + +-static void +-ucp_ep_config_set_am_rndv_send_nbr_thresh(ucp_context_h context, +- ucp_ep_config_t *config, +- size_t adjust_min_val) ++static size_t ucp_ep_thresh(size_t thresh_value, size_t min_value, ++ size_t max_value) + { +- size_t rndv_thresh; +- +- if (config->key.err_mode == UCP_ERR_HANDLING_MODE_PEER) { +- rndv_thresh = SIZE_MAX; +- } else { +- rndv_thresh = ucs_min(context->config.ext.rndv_send_nbr_thresh, +- adjust_min_val); +- } ++ size_t thresh; ++ ++ ucs_assert(min_value <= max_value); + +- config->tag.rndv_send_nbr.am_thresh = rndv_thresh; ++ thresh = ucs_max(min_value, thresh_value); ++ thresh = ucs_min(max_value, thresh); ++ ++ return thresh; + } + + static void ucp_ep_config_set_am_rndv_thresh(ucp_context_h context, uct_iface_attr_t *iface_attr, + uct_md_attr_t *md_attr, ucp_ep_config_t *config, +- size_t adjust_min_val) ++ size_t max_rndv_thresh) + { +- size_t rndv_thresh; ++ size_t rndv_thresh, rndv_nbr_thresh; + + ucs_assert(config->key.am_lane != UCP_NULL_LANE); + ucs_assert(config->key.lanes[config->key.am_lane].rsc_index != UCP_NULL_RESOURCE); + + if (config->key.err_mode == UCP_ERR_HANDLING_MODE_PEER) { + /* Disable RNDV */ +- rndv_thresh = SIZE_MAX; ++ rndv_thresh = rndv_nbr_thresh = SIZE_MAX; + } else if (context->config.ext.rndv_thresh == UCS_CONFIG_MEMUNITS_AUTO) { + /* auto - Make UCX calculate the AM rndv threshold on its own.*/ +- rndv_thresh = ucp_ep_config_calc_rndv_thresh(context, iface_attr, md_attr, +- context->config.ext.bcopy_bw, +- 0); +- ucs_trace("Active Message rendezvous threshold is %zu", rndv_thresh); ++ rndv_thresh = ucp_ep_config_calc_rndv_thresh(context, iface_attr, md_attr, ++ context->config.ext.bcopy_bw, ++ 0); ++ rndv_nbr_thresh = context->config.ext.rndv_send_nbr_thresh; + } else { +- rndv_thresh = context->config.ext.rndv_thresh; ++ rndv_thresh = context->config.ext.rndv_thresh; ++ rndv_nbr_thresh = context->config.ext.rndv_thresh; + } + +- ucs_assert(iface_attr->cap.am.min_zcopy <= iface_attr->cap.am.max_zcopy); +- /* use rendezvous only starting from minimal zero-copy am size */ +- rndv_thresh = ucs_max(rndv_thresh, iface_attr->cap.am.min_zcopy); +- config->tag.rndv.am_thresh = ucs_min(rndv_thresh, adjust_min_val); ++ config->tag.rndv.am_thresh = ucp_ep_thresh(rndv_thresh, ++ iface_attr->cap.am.min_zcopy, ++ max_rndv_thresh); + +- ucp_ep_config_set_am_rndv_send_nbr_thresh(context, config, adjust_min_val); +-} ++ config->tag.rndv_send_nbr.am_thresh = ucp_ep_thresh(rndv_nbr_thresh, ++ iface_attr->cap.am.min_zcopy, ++ max_rndv_thresh); + +-static void +-ucp_ep_config_set_rndv_send_nbr_thresh(ucp_context_h context, +- ucp_ep_config_t *config, +- size_t adjust_min_val, +- size_t adjust_max_val) +-{ +- size_t rndv_thresh; +- +- rndv_thresh = context->config.ext.rndv_send_nbr_thresh; +- rndv_thresh = ucs_max(rndv_thresh, adjust_max_val); +- +- config->tag.rndv_send_nbr.rma_thresh = ucs_min(rndv_thresh, adjust_min_val); ++ ucs_trace("Active Message rndv threshold is %zu (send_nbr: %zu)", ++ config->tag.rndv.am_thresh, config->tag.rndv_send_nbr.am_thresh); + } + + static void ucp_ep_config_set_rndv_thresh(ucp_worker_t *worker, + ucp_ep_config_t *config, + ucp_lane_index_t lane, + uint64_t rndv_cap_flag, +- size_t adjust_min_val) ++ size_t max_rndv_thresh) + { + ucp_context_t *context = worker->context; + ucp_rsc_index_t rsc_index; +- size_t rndv_thresh; ++ size_t rndv_thresh, rndv_nbr_thresh; + uct_iface_attr_t *iface_attr; + uct_md_attr_t *md_attr; + +@@ -838,22 +975,26 @@ static void ucp_ep_config_set_rndv_thresh(ucp_worker_t *worker, + + if (context->config.ext.rndv_thresh == UCS_CONFIG_MEMUNITS_AUTO) { + /* auto - Make UCX calculate the RMA (get_zcopy) rndv threshold on its own.*/ +- rndv_thresh = ucp_ep_config_calc_rndv_thresh(context, iface_attr, +- md_attr, SIZE_MAX, 1); ++ rndv_thresh = ucp_ep_config_calc_rndv_thresh(context, iface_attr, ++ md_attr, SIZE_MAX, 1); ++ rndv_nbr_thresh = context->config.ext.rndv_send_nbr_thresh; + } else { +- rndv_thresh = context->config.ext.rndv_thresh; ++ rndv_thresh = context->config.ext.rndv_thresh; ++ rndv_nbr_thresh = context->config.ext.rndv_thresh; + } + +- /* use rendezvous only starting from minimal zero-copy get size */ +- ucs_assert(iface_attr->cap.get.min_zcopy <= iface_attr->cap.get.max_zcopy); +- rndv_thresh = ucs_max(rndv_thresh, iface_attr->cap.get.min_zcopy); +- + config->tag.rndv.max_get_zcopy = iface_attr->cap.get.max_zcopy; + config->tag.rndv.max_put_zcopy = iface_attr->cap.put.max_zcopy; +- config->tag.rndv.rma_thresh = ucs_min(rndv_thresh, adjust_min_val); ++ config->tag.rndv.rma_thresh = ucp_ep_thresh(rndv_thresh, ++ iface_attr->cap.get.min_zcopy, ++ max_rndv_thresh); + +- ucp_ep_config_set_rndv_send_nbr_thresh(context, config, adjust_min_val, +- iface_attr->cap.get.max_zcopy); ++ config->tag.rndv_send_nbr.rma_thresh = ucp_ep_thresh(rndv_nbr_thresh, ++ iface_attr->cap.get.min_zcopy, ++ max_rndv_thresh); ++ ++ ucs_trace("rndv threshold is %zu (send_nbr: %zu)", ++ config->tag.rndv.rma_thresh, config->tag.rndv_send_nbr.rma_thresh); + } + + static void ucp_ep_config_init_attrs(ucp_worker_t *worker, ucp_rsc_index_t rsc_index, +@@ -868,6 +1009,7 @@ static void ucp_ep_config_init_attrs(ucp_worker_t *worker, ucp_rsc_index_t rsc_i + uct_md_attr_t *md_attr = &context->tl_mds[context->tl_rscs[rsc_index].md_index].attr; + size_t it; + size_t zcopy_thresh; ++ int mem_type; + + if (iface_attr->cap.flags & short_flag && !context->num_mem_type_mds) { + config->max_short = max_short - hdr_len; +@@ -902,6 +1044,14 @@ static void ucp_ep_config_init_attrs(ucp_worker_t *worker, ucp_rsc_index_t rsc_i + config->sync_zcopy_thresh[0] = config->zcopy_thresh[0] = + ucs_min(context->config.ext.zcopy_thresh, adjust_min_val); + } ++ ++ for (mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { ++ if (UCP_MEM_IS_HOST(mem_type)) { ++ config->mem_type_zcopy_thresh[mem_type] = config->zcopy_thresh[0]; ++ } else if (md_attr->cap.reg_mem_types & UCS_BIT(mem_type)) { ++ config->mem_type_zcopy_thresh[mem_type] = 1; ++ } ++ } + } + + void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) +@@ -910,6 +1060,7 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + ucp_ep_rma_config_t *rma_config; + uct_iface_attr_t *iface_attr; + uct_md_attr_t *md_attr; ++ uct_memory_type_t mem_type; + ucp_rsc_index_t rsc_index; + ucp_lane_index_t lane; + size_t it; +@@ -923,6 +1074,12 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + config->tag.eager.zcopy_thresh[it] = SIZE_MAX; + config->tag.eager.sync_zcopy_thresh[it] = SIZE_MAX; + } ++ ++ for (mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { ++ config->am.mem_type_zcopy_thresh[mem_type] = SIZE_MAX; ++ config->tag.eager.mem_type_zcopy_thresh[mem_type] = SIZE_MAX; ++ } ++ + config->tag.eager.zcopy_auto_thresh = 0; + config->am.zcopy_auto_thresh = 0; + config->p2p_lanes = 0; +@@ -939,6 +1096,8 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + config->tag.rndv.rkey_size = ucp_rkey_packed_size(context, + config->key.rma_bw_md_map); + config->stream.proto = &ucp_stream_am_proto; ++ config->tag.offload.max_eager_short = -1; ++ config->tag.max_eager_short = -1; + max_rndv_thresh = SIZE_MAX; + max_am_rndv_thresh = SIZE_MAX; + +@@ -970,16 +1129,18 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + UCT_IFACE_FLAG_TAG_EAGER_ZCOPY, 0, + iface_attr->cap.tag.eager.max_bcopy); + +- config->tag.offload.max_rndv_iov = iface_attr->cap.tag.rndv.max_iov; +- config->tag.offload.max_rndv_zcopy = iface_attr->cap.tag.rndv.max_zcopy; +- config->tag.sync_proto = &ucp_tag_offload_sync_proto; +- config->tag.proto = &ucp_tag_offload_proto; +- config->tag.lane = lane; +- max_rndv_thresh = iface_attr->cap.tag.eager.max_zcopy; +- max_am_rndv_thresh = iface_attr->cap.tag.eager.max_bcopy; ++ config->tag.offload.max_rndv_iov = iface_attr->cap.tag.rndv.max_iov; ++ config->tag.offload.max_rndv_zcopy = iface_attr->cap.tag.rndv.max_zcopy; ++ config->tag.offload.max_eager_short = config->tag.eager.max_short; ++ config->tag.sync_proto = &ucp_tag_offload_sync_proto; ++ config->tag.proto = &ucp_tag_offload_proto; ++ config->tag.lane = lane; ++ max_rndv_thresh = iface_attr->cap.tag.eager.max_zcopy; ++ max_am_rndv_thresh = iface_attr->cap.tag.eager.max_bcopy; + + ucs_assert_always(iface_attr->cap.tag.rndv.max_hdr >= + sizeof(ucp_tag_offload_unexp_rndv_hdr_t)); ++ ucs_assert_always(config->tag.offload.max_eager_short >= 0); + + if (config->key.am_lane != UCP_NULL_LANE) { + /* Must have active messages for using rendezvous */ +@@ -1024,8 +1185,9 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + config->key.rma_bw_lanes[0], + UCT_IFACE_FLAG_GET_ZCOPY, + max_rndv_thresh); +- config->tag.eager = config->am; +- config->tag.lane = lane; ++ config->tag.eager = config->am; ++ config->tag.lane = lane; ++ config->tag.max_eager_short = config->tag.eager.max_short; + } + } else { + /* Stub endpoint */ +@@ -1033,18 +1195,22 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + } + } + ++ memset(&config->rma, 0, sizeof(config->rma)); ++ + /* Configuration for remote memory access */ + for (lane = 0; lane < config->key.num_lanes; ++lane) { ++ rma_config = &config->rma[lane]; ++ rma_config->put_zcopy_thresh = SIZE_MAX; ++ rma_config->get_zcopy_thresh = SIZE_MAX; ++ rma_config->max_put_short = -1; ++ rma_config->max_get_short = -1; ++ + if (ucp_ep_config_get_multi_lane_prio(config->key.rma_lanes, lane) == -1) { + continue; + } + +- rma_config = &config->rma[lane]; + rsc_index = config->key.lanes[lane].rsc_index; + +- rma_config->put_zcopy_thresh = SIZE_MAX; +- rma_config->get_zcopy_thresh = SIZE_MAX; +- + if (rsc_index != UCP_NULL_RESOURCE) { + iface_attr = &worker->ifaces[rsc_index].attr; + if (iface_attr->cap.flags & UCT_IFACE_FLAG_PUT_SHORT) { +@@ -1064,6 +1230,9 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + rma_config->put_zcopy_thresh = ucs_max(rma_config->put_zcopy_thresh, + iface_attr->cap.put.min_zcopy); + } ++ if (iface_attr->cap.flags & UCT_IFACE_FLAG_GET_SHORT) { ++ rma_config->max_get_short = iface_attr->cap.get.max_short; ++ } + if (iface_attr->cap.flags & UCT_IFACE_FLAG_GET_BCOPY) { + rma_config->max_get_bcopy = iface_attr->cap.get.max_bcopy; + } +@@ -1071,7 +1240,7 @@ void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config) + /* TODO: formula */ + rma_config->max_get_zcopy = iface_attr->cap.get.max_zcopy; + if (context->config.ext.zcopy_thresh == UCS_CONFIG_MEMUNITS_AUTO) { +- rma_config->get_zcopy_thresh = 16384; ++ rma_config->get_zcopy_thresh = 16384; + } else { + rma_config->get_zcopy_thresh = context->config.ext.zcopy_thresh; + } +@@ -1315,19 +1484,12 @@ void ucp_ep_print_info(ucp_ep_h ep, FILE *stream) + ucp_lane_index_t wireup_lane; + uct_ep_h wireup_ep; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + + fprintf(stream, "#\n"); + fprintf(stream, "# UCP endpoint\n"); + fprintf(stream, "#\n"); +- +- fprintf(stream, "# peer: %s%suuid 0x%"PRIx64"\n", +-#if ENABLE_DEBUG_DATA +- ucp_ep_peer_name(ep), ", ", +-#else +- "", "", +-#endif +- ep->dest_uuid); ++ fprintf(stream, "# peer: %s\n", ucp_ep_peer_name(ep)); + + /* if there is a wireup lane, set aux_rsc_index to the stub ep resource */ + aux_rsc_index = UCP_NULL_RESOURCE; +@@ -1344,7 +1506,7 @@ void ucp_ep_print_info(ucp_ep_h ep, FILE *stream) + + fprintf(stream, "#\n"); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + } + + size_t ucp_ep_config_get_zcopy_auto_thresh(size_t iovcnt, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.h +index ef3f2d9ea..395fa2459 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.h +@@ -9,11 +9,11 @@ + + #include "ucp_types.h" + ++#include + #include + #include +-#include + #include +-#include ++#include + + #define UCP_MAX_IOV 16UL + +@@ -22,21 +22,43 @@ + typedef uint16_t ucp_ep_cfg_index_t; + + ++/* Endpoint flags type */ ++#if ENABLE_DEBUG_DATA || ENABLE_ASSERT ++typedef uint32_t ucp_ep_flags_t; ++#else ++typedef uint16_t ucp_ep_flags_t; ++#endif ++ ++ + /** + * Endpoint flags + */ + enum { +- UCP_EP_FLAG_LOCAL_CONNECTED = UCS_BIT(0), /* All local endpoints are connected */ +- UCP_EP_FLAG_REMOTE_CONNECTED = UCS_BIT(1), /* All remote endpoints are connected */ +- UCP_EP_FLAG_CONNECT_REQ_QUEUED = UCS_BIT(2), /* Connection request was queued */ +- UCP_EP_FLAG_TAG_OFFLOAD_ENABLED = UCS_BIT(3), /* Endpoint uses tl offload for tag matching */ +- UCP_EP_FLAG_FAILED = UCS_BIT(4), /* EP is in failed state */ ++ UCP_EP_FLAG_LOCAL_CONNECTED = UCS_BIT(0), /* All local endpoints are connected */ ++ UCP_EP_FLAG_REMOTE_CONNECTED = UCS_BIT(1), /* All remote endpoints are connected */ ++ UCP_EP_FLAG_CONNECT_REQ_QUEUED = UCS_BIT(2), /* Connection request was queued */ ++ UCP_EP_FLAG_FAILED = UCS_BIT(3), /* EP is in failed state */ ++ UCP_EP_FLAG_USED = UCS_BIT(4), /* EP is in use by the user */ ++ UCP_EP_FLAG_STREAM_HAS_DATA = UCS_BIT(5), /* EP has data in the ext.stream.match_q */ ++ UCP_EP_FLAG_ON_MATCH_CTX = UCS_BIT(6), /* EP is on match queue */ ++ UCP_EP_FLAG_DEST_EP = UCS_BIT(7), /* dest_ep_ptr is valid */ ++ UCP_EP_FLAG_LISTENER = UCS_BIT(8), /* EP holds pointer to a listener ++ (on server side due to receiving partial ++ worker address from the client) */ ++ UCP_EP_FLAG_CONNECT_PRE_REQ_QUEUED = UCS_BIT(9), /* Pre-Connection request was queued */ ++ UCP_EP_FLAG_CLOSED = UCS_BIT(10),/* EP was closed */ + + /* DEBUG bits */ +- UCP_EP_FLAG_CONNECT_REQ_SENT = UCS_BIT(8), /* DEBUG: Connection request was sent */ +- UCP_EP_FLAG_CONNECT_REP_SENT = UCS_BIT(9), /* DEBUG: Connection reply was sent */ +- UCP_EP_FLAG_CONNECT_ACK_SENT = UCS_BIT(10),/* DEBUG: Connection ACK was sent */ +- UCP_EP_FLAG_DEST_UUID_PEER = UCS_BIT(11) /* DEBUG: dest_uuid is of the remote worker */ ++ UCP_EP_FLAG_CONNECT_REQ_SENT = UCS_BIT(16),/* DEBUG: Connection request was sent */ ++ UCP_EP_FLAG_CONNECT_REP_SENT = UCS_BIT(17),/* DEBUG: Connection reply was sent */ ++ UCP_EP_FLAG_CONNECT_ACK_SENT = UCS_BIT(18),/* DEBUG: Connection ACK was sent */ ++ UCP_EP_FLAG_CONNECT_REQ_IGNORED = UCS_BIT(19),/* DEBUG: Connection request was ignored */ ++ UCP_EP_FLAG_CONNECT_PRE_REQ_SENT = UCS_BIT(20),/* DEBUG: Connection pre-request was sent */ ++ UCP_EP_FLAG_SOCKADDR_PARTIAL_ADDR = UCS_BIT(21),/* DEBUG: Partial worker address was sent ++ to the remote peer when starting ++ connection establishment on this EP */ ++ UCP_EP_FLAG_FLUSH_STATE_VALID = UCS_BIT(22) /* DEBUG: flush_state is valid */ ++ + }; + + +@@ -55,7 +77,8 @@ enum { + * Endpoint init flags + */ + enum { +- UCP_EP_INIT_FLAG_MEM_TYPE = UCS_BIT(0) /**< Endpoint for local mem type transfers */ ++ UCP_EP_INIT_FLAG_MEM_TYPE = UCS_BIT(0), /**< Endpoint for local mem type transfers */ ++ UCP_EP_CREATE_AM_LANE = UCS_BIT(1) /**< Endpoint requires an AM lane */ + }; + + +@@ -119,6 +142,7 @@ typedef struct ucp_ep_rma_config { + size_t max_put_short; /* Maximal payload of put short */ + size_t max_put_bcopy; /* Maximal total size of put_bcopy */ + size_t max_put_zcopy; ++ size_t max_get_short; /* Maximal payload of get short */ + size_t max_get_bcopy; /* Maximal total size of get_bcopy */ + size_t max_get_zcopy; + size_t put_zcopy_thresh; +@@ -138,6 +162,9 @@ typedef struct ucp_ep_msg_config { + /* zero-copy threshold for operations which do not have to wait for remote side */ + size_t zcopy_thresh[UCP_MAX_IOV]; + ++ /* zero-copy threshold for mem type buffers */ ++ size_t mem_type_zcopy_thresh[UCT_MD_MEM_TYPE_LAST]; ++ + /* zero-copy threshold for operations which anyways have to wait for remote side */ + size_t sync_zcopy_thresh[UCP_MAX_IOV]; + uint8_t zcopy_auto_thresh; /* if != 0 the zcopy enabled */ +@@ -177,6 +204,8 @@ typedef struct ucp_ep_config { + /* Lane used for tag matching operations. */ + ucp_lane_index_t lane; + ++ ssize_t max_eager_short; ++ + /* Configuration of the lane used for eager protocols + * (can be AM or tag offload). */ + ucp_ep_msg_config_t eager; +@@ -203,6 +232,8 @@ typedef struct ucp_ep_config { + } rndv_send_nbr; + + struct { ++ /* Maximal size for eager short */ ++ ssize_t max_eager_short; + /* Maximal iov count for RNDV offload */ + size_t max_rndv_iov; + /* Maximal total size for RNDV offload */ +@@ -219,59 +250,90 @@ typedef struct ucp_ep_config { + + + /** +- * UCP_FEATURE_STREAM specific extention of the remote protocol layer endpoint +- */ +-typedef struct ucp_ep_ext_stream { +- /* List entry in worker's EP list */ +- ucs_list_link_t list; +- /* Queue of receive data or requests depends on flags field */ +- ucs_queue_head_t match_q; +- /* EP which owns the extension */ +- ucp_ep_h ucp_ep; +- /* Describes the state */ +- uint8_t flags; +-} ucp_ep_ext_stream_t; +- +- +-/** +- * Remote protocol layer endpoint ++ * Protocol layer endpoint, represents a connection to a remote worker + */ + typedef struct ucp_ep { + ucp_worker_h worker; /* Worker this endpoint belongs to */ + + ucp_ep_cfg_index_t cfg_index; /* Configuration index */ ++ ucp_ep_conn_sn_t conn_sn; /* Sequence number for remote connection */ + ucp_lane_index_t am_lane; /* Cached value */ +-#if ENABLE_ASSERT || ENABLE_DEBUG_DATA +- uint16_t flags; /* Endpoint flags */ +-#else +- uint8_t flags; /* Endpoint flags */ +-#endif +- +- uint64_t dest_uuid; /* Destination worker uuid */ +- void *user_data; /* user data associated with +- the endpoint */ ++ ucp_ep_flags_t flags; /* Endpoint flags */ + +- UCS_STATS_NODE_DECLARE(stats); ++ /* TODO allocate ep dynamically according to number of lanes */ ++ uct_ep_h uct_eps[UCP_MAX_LANES]; /* Transports for every lane */ + + #if ENABLE_DEBUG_DATA + char peer_name[UCP_WORKER_NAME_MAX]; + #endif + +- /* TODO allocate ep dynamically according to number of lanes */ +- uct_ep_h uct_eps[UCP_MAX_LANES]; /* Transports for every lane */ ++ UCS_STATS_NODE_DECLARE(stats); + +- /* Feature specific extensions allocated on demand */ +- struct { +- ucp_ep_ext_stream_t *stream; /* UCP_FEATURE_STREAM */ +- } ext; + } ucp_ep_t; + + +-void ucp_ep_config_key_reset(ucp_ep_config_key_t *key); ++/** ++ * Status of protocol-level remote completions ++ */ ++typedef struct { ++ ucs_queue_head_t reqs; /* Queue of flush requests which ++ are waiting for remote completion */ ++ uint32_t send_sn; /* Sequence number of sent operations */ ++ uint32_t cmpl_sn; /* Sequence number of completions */ ++} ucp_ep_flush_state_t; ++ ++ ++/* ++ * Endpoint extension for generic non fast-path data ++ */ ++typedef struct { ++ uintptr_t dest_ep_ptr; /* Remote EP pointer */ ++ void *user_data; /* User data associated with ep */ ++ ucs_list_link_t ep_list; /* List entry in worker's all eps list */ ++ ucp_err_handler_cb_t err_cb; /* Error handler */ ++ ++ /* Endpoint match context and remote completion status are mutually exclusive, ++ * since remote completions are counted only after the endpoint is already ++ * matched to a remote peer. ++ */ ++ union { ++ ucp_ep_match_t ep_match; /* Matching with remote endpoints */ ++ ucp_ep_flush_state_t flush_state; /* Remove completion status */ ++ ucp_listener_h listener; /* Listener that may be associated with ep */ ++ }; ++} ucp_ep_ext_gen_t; ++ ++ ++/* ++ * Endpoint extension for specific protocols ++ */ ++typedef struct { ++ struct { ++ ucs_list_link_t ready_list; /* List entry in worker's EP list */ ++ ucs_queue_head_t match_q; /* Queue of receive data or requests, ++ depends on UCP_EP_FLAG_STREAM_HAS_DATA */ ++ } stream; ++} ucp_ep_ext_proto_t; ++ ++ ++typedef struct ucp_wireup_client_data { ++ uintptr_t ep_ptr; /**< Client-side endpoint pointer */ ++ ucp_err_handling_mode_t err_mode; /**< Error handling mode */ ++ uint8_t is_full_addr; /**< Whether the attached address is ++ full or partial */ ++ /* packed worker address follows */ ++} UCS_S_PACKED ucp_wireup_client_data_t; + +-void ucp_ep_add_to_hash(ucp_ep_h ep); + +-void ucp_ep_delete_from_hash(ucp_ep_h ep); ++typedef struct ucp_conn_request { ++ ucp_listener_h listener; ++ uct_conn_request_h uct_req; ++ ucp_wireup_client_data_t client_data; ++ /* packed worker address follows */ ++} ucp_conn_request_t; ++ ++ ++void ucp_ep_config_key_reset(ucp_ep_config_key_t *key); + + void ucp_ep_config_lane_info_str(ucp_context_h context, + const ucp_ep_config_key_t *key, +@@ -280,33 +342,49 @@ void ucp_ep_config_lane_info_str(ucp_context_h context, + ucp_rsc_index_t aux_rsc_index, + char *buf, size_t max); + +-ucs_status_t ucp_ep_new(ucp_worker_h worker, uint64_t dest_uuid, +- const char *peer_name, const char *message, +- ucp_ep_h *ep_p); ++ucs_status_t ucp_ep_new(ucp_worker_h worker, const char *peer_name, ++ const char *message, ucp_ep_h *ep_p); + +-ucs_status_t ucp_ep_create_stub(ucp_worker_h worker, uint64_t dest_uuid, +- const ucp_ep_params_t *params, +- const char *peer_name, const char *message, +- ucp_ep_h *ep_p); ++void ucp_ep_delete(ucp_ep_h ep); ++ ++ucs_status_t ucp_ep_init_create_wireup(ucp_ep_h ep, ++ const ucp_ep_params_t *params, ++ ucp_wireup_ep_t **wireup_ep); + + ucs_status_t ucp_ep_create_to_worker_addr(ucp_worker_h worker, + const ucp_ep_params_t *params, ++ const ucp_unpacked_address_t *remote_address, + unsigned ep_init_flags, + const char *message, ucp_ep_h *ep_p); + ++ucs_status_t ucp_ep_create_accept(ucp_worker_h worker, ++ const ucp_wireup_client_data_t *client_data, ++ ucp_ep_h *ep_p); ++ + ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags, + ucp_send_callback_t req_cb, + unsigned req_flags, +- ucp_request_callback_t flushed_cb); ++ ucp_request_t *worker_req, ++ ucp_request_callback_t flushed_cb, ++ const char *debug_name); ++ ++ucs_status_t ucp_ep_create_sockaddr_aux(ucp_worker_h worker, ++ const ucp_ep_params_t *params, ++ const ucp_unpacked_address_t *remote_address, ++ ucp_ep_h *ep_p); + + void ucp_ep_config_key_set_params(ucp_ep_config_key_t *key, + const ucp_ep_params_t *params); + + void ucp_ep_err_pending_purge(uct_pending_req_t *self, void *arg); + ++void ucp_ep_disconnected(ucp_ep_h ep, int force); ++ + void ucp_ep_destroy_internal(ucp_ep_h ep); + +-int ucp_ep_is_stub(ucp_ep_h ep); ++void ucp_ep_cleanup_lanes(ucp_ep_h ep); ++ ++int ucp_ep_is_sockaddr_stub(ucp_ep_h ep); + + void ucp_ep_config_init(ucp_worker_h worker, ucp_ep_config_t *config); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.inl +index 69ae9941e..fbce49869 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_ep.inl +@@ -12,6 +12,7 @@ + #include "ucp_worker.h" + #include "ucp_context.h" + ++#include + #include + + +@@ -111,6 +112,72 @@ static inline const uct_md_attr_t* ucp_ep_md_attr(ucp_ep_h ep, ucp_lane_index_t + return &context->tl_mds[ucp_ep_md_index(ep, lane)].attr; + } + ++static UCS_F_ALWAYS_INLINE ucp_ep_ext_gen_t* ucp_ep_ext_gen(ucp_ep_h ep) ++{ ++ return (ucp_ep_ext_gen_t*)ucs_strided_elem_get(ep, 0, 1); ++} ++ ++static UCS_F_ALWAYS_INLINE ucp_ep_ext_proto_t* ucp_ep_ext_proto(ucp_ep_h ep) ++{ ++ return (ucp_ep_ext_proto_t*)ucs_strided_elem_get(ep, 0, 2); ++} ++ ++static UCS_F_ALWAYS_INLINE ucp_ep_h ucp_ep_from_ext_gen(ucp_ep_ext_gen_t *ep_ext) ++{ ++ return (ucp_ep_h)ucs_strided_elem_get(ep_ext, 1, 0); ++} ++ ++static UCS_F_ALWAYS_INLINE ucp_ep_h ucp_ep_from_ext_proto(ucp_ep_ext_proto_t *ep_ext) ++{ ++ return (ucp_ep_h)ucs_strided_elem_get(ep_ext, 2, 0); ++} ++ ++static UCS_F_ALWAYS_INLINE ucp_ep_flush_state_t* ucp_ep_flush_state(ucp_ep_h ep) ++{ ++ ucs_assert(ep->flags & UCP_EP_FLAG_FLUSH_STATE_VALID); ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_ON_MATCH_CTX)); ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_LISTENER)); ++ return &ucp_ep_ext_gen(ep)->flush_state; ++} ++ ++static UCS_F_ALWAYS_INLINE uintptr_t ucp_ep_dest_ep_ptr(ucp_ep_h ep) ++{ ++#if ENABLE_ASSERT ++ if (!(ep->flags & UCP_EP_FLAG_DEST_EP)) { ++ return 0; /* Let remote side assert if it gets NULL pointer */ ++ } ++#endif ++ return ucp_ep_ext_gen(ep)->dest_ep_ptr; ++} ++ ++/* ++ * Make sure we have a valid dest_ep_ptr value, so protocols which require a ++ * reply from remote side could be used. ++ */ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_ep_resolve_dest_ep_ptr(ucp_ep_h ep, ucp_lane_index_t lane) ++{ ++ if (ep->flags & UCP_EP_FLAG_DEST_EP) { ++ return UCS_OK; ++ } ++ ++ return ucp_wireup_connect_remote(ep, lane); ++} ++ ++static inline void ucp_ep_update_dest_ep_ptr(ucp_ep_h ep, uintptr_t ep_ptr) ++{ ++ if (ep->flags & UCP_EP_FLAG_DEST_EP) { ++ ucs_assertv(ep_ptr == ucp_ep_ext_gen(ep)->dest_ep_ptr, ++ "ep=%p ep_ptr=0x%lx ep->dest_ep_ptr=0x%lx", ++ ep, ep_ptr, ucp_ep_ext_gen(ep)->dest_ep_ptr); ++ } ++ ++ ucs_assert(ep_ptr != 0); ++ ucs_trace("ep %p: set dest_ep_ptr to 0x%lx", ep, ep_ptr); ++ ep->flags |= UCP_EP_FLAG_DEST_EP; ++ ucp_ep_ext_gen(ep)->dest_ep_ptr = ep_ptr; ++} ++ + static inline const char* ucp_ep_peer_name(ucp_ep_h ep) + { + #if ENABLE_DEBUG_DATA +@@ -120,4 +187,22 @@ static inline const char* ucp_ep_peer_name(ucp_ep_h ep) + #endif + } + ++static inline void ucp_ep_flush_state_reset(ucp_ep_h ep) ++{ ++ ucp_ep_flush_state_t *flush_state = &ucp_ep_ext_gen(ep)->flush_state; ++ ++ ucs_assert(!(ep->flags & (UCP_EP_FLAG_ON_MATCH_CTX | ++ UCP_EP_FLAG_LISTENER))); ++ if (!(ep->flags & UCP_EP_FLAG_FLUSH_STATE_VALID)) { ++ flush_state->send_sn = 0; ++ flush_state->cmpl_sn = 0; ++ ucs_queue_head_init(&flush_state->reqs); ++ ep->flags |= UCP_EP_FLAG_FLUSH_STATE_VALID; ++ } else { ++ ucs_assert(flush_state->send_sn == 0); ++ ucs_assert(flush_state->cmpl_sn == 0); ++ ucs_assert(ucs_queue_is_empty(&flush_state->reqs)); ++ } ++} ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.c +index 608d610bf..a027eb6f1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.c +@@ -6,90 +6,167 @@ + + #include "ucp_listener.h" + ++#include + #include ++#include ++#include + #include + #include + + +-static unsigned ucp_listener_conn_request_progress(void *arg) ++static unsigned ucp_listener_accept_cb_progress(void *arg) + { +- ucp_listener_accept_t *accept = arg; ++ ucp_ep_h ep = arg; ++ ucp_listener_h listener = ucp_ep_ext_gen(ep)->listener; ++ ++ /* NOTE: protect union */ ++ ucs_assert(!(ep->flags & (UCP_EP_FLAG_ON_MATCH_CTX | ++ UCP_EP_FLAG_FLUSH_STATE_VALID))); ++ ucs_assert(ep->flags & UCP_EP_FLAG_LISTENER); ++ ++ ep->flags &= ~UCP_EP_FLAG_LISTENER; ++ ep->flags |= UCP_EP_FLAG_USED; ++ ucp_stream_ep_activate(ep); ++ ucp_ep_flush_state_reset(ep); ++ ++ /* ++ * listener is NULL if the EP was created with UCP_EP_PARAM_FIELD_EP_ADDR ++ * and we are here because long address requires wireup protocol ++ */ ++ if (listener && listener->accept_cb) { ++ listener->accept_cb(ep, listener->arg); ++ } + +- ucs_trace_func("listener=%p ep=%p", accept->listener, accept->ep); ++ return 1; ++} + +- accept->listener->cb(accept->ep, accept->listener->arg); +- ucs_free(accept); +- return 0; ++int ucp_listener_accept_cb_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg) ++{ ++ ucp_ep_h ep = elem->arg; ++ ++ return (elem->cb == ucp_listener_accept_cb_progress) && (ep == arg); + } + +-static int ucp_listener_remove_filter(const ucs_callbackq_elem_t *elem, +- void *arg) ++void ucp_listener_schedule_accept_cb(ucp_ep_h ep) + { +- ucp_listener_h *listener = elem->arg; ++ uct_worker_cb_id_t prog_id = UCS_CALLBACKQ_ID_NULL; + +- return (elem->cb == ucp_listener_conn_request_progress) && (listener == arg); ++ uct_worker_progress_register_safe(ep->worker->uct, ++ ucp_listener_accept_cb_progress, ++ ep, UCS_CALLBACKQ_FLAG_ONESHOT, ++ &prog_id); + } + +-static ucs_status_t ucp_listener_conn_request_callback(void *arg, +- const void *conn_priv_data, +- size_t length) ++static unsigned ucp_listener_conn_request_progress(void *arg) + { +- const ucp_wireup_sockaddr_priv_t *client_data = conn_priv_data; +- ucp_listener_h listener = arg; +- ucp_listener_accept_t *accept; +- uct_worker_cb_id_t prog_id; +- ucp_ep_params_t params; +- ucs_status_t status; +- ucp_ep_h ep; ++ ucp_conn_request_h conn_request = arg; ++ ucp_listener_h listener = conn_request->listener; ++ const ucp_wireup_client_data_t *client_data = &conn_request->client_data; ++ ucp_worker_h worker; ++ ucp_ep_h ep; ++ ucs_status_t status; ++ ++ ucs_trace_func("listener=%p", listener); ++ ++ if (listener->conn_cb) { ++ listener->conn_cb(conn_request, listener->arg); ++ return 1; ++ } + +- ucs_trace("listener %p: got connection request", listener); ++ worker = listener->wiface.worker; ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); ++ UCS_ASYNC_BLOCK(&worker->async); ++ /* coverity[overrun-buffer-val] */ ++ status = ucp_ep_create_accept(worker, client_data, &ep); + +- params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | +- UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- params.err_mode = client_data->err_mode; +- params.address = (ucp_address_t*)(client_data + 1); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ status = ucp_wireup_send_pre_request(ep); ++ } else { ++ /* send wireup request message, to connect the client to the server's ++ new endpoint */ ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED)); ++ status = ucp_wireup_send_request(ep); ++ } + +- /* create endpoint to the worker address we got in the private data */ +- status = ucp_ep_create_to_worker_addr(listener->wiface.worker, ¶ms, 0, +- "listener", &ep); + if (status != UCS_OK) { +- goto err; ++ goto out; + } + +- /* send wireup request message, to connect the client to the new endpoint */ +- status = ucp_wireup_send_request(ep, client_data->ep_uuid); ++ status = uct_iface_accept(listener->wiface.iface, conn_request->uct_req); + if (status != UCS_OK) { +- goto err_destroy_ep; ++ ucp_ep_destroy_internal(ep); ++ goto out; + } + +- /* if user provided a callback for accepting new connection, launch it on +- * the main thread +- */ +- if (listener->cb != NULL) { +- accept = ucs_malloc(sizeof(*accept), "ucp_listener_accept"); +- if (accept == NULL) { +- ucs_error("failed to allocate listener accept context"); +- status = UCS_ERR_NO_MEMORY; +- goto err_destroy_ep; ++ if (listener->accept_cb != NULL) { ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_USED)); ++ ucp_ep_ext_gen(ep)->listener = listener; ++ } else { ++ ep->flags |= UCP_EP_FLAG_USED; ++ listener->accept_cb(ep, listener->arg); + } ++ } + +- accept->listener = listener; +- accept->ep = ep; ++out: ++ if (status != UCS_OK) { ++ ucs_error("connection request failed on listener %p with status %s", ++ listener, ucs_status_string(status)); ++ uct_iface_reject(listener->wiface.iface, conn_request->uct_req); ++ } ++ ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); ++ ucs_free(conn_request); ++ return 1; ++} + +- /* defer user callback to be invoked from the main thread */ +- prog_id = UCS_CALLBACKQ_ID_NULL; +- uct_worker_progress_register_safe(listener->wiface.worker->uct, +- ucp_listener_conn_request_progress, +- accept, UCS_CALLBACKQ_FLAG_ONESHOT, +- &prog_id); ++static int ucp_listener_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg) ++{ ++ ucp_listener_h *listener = elem->arg; ++ ++ return (elem->cb == ucp_listener_conn_request_progress) && (listener == arg); ++} ++ ++static void ucp_listener_conn_request_callback(uct_iface_h tl_iface, void *arg, ++ uct_conn_request_h uct_req, ++ const void *conn_priv_data, ++ size_t length) ++{ ++ ucp_listener_h listener = arg; ++ uct_worker_cb_id_t prog_id = UCS_CALLBACKQ_ID_NULL; ++ ucp_conn_request_h conn_request; ++ ++ ucs_trace("listener %p: got connection request", listener); ++ ++ /* Defer wireup init and user's callback to be invoked from the main thread */ ++ conn_request = ucs_malloc(ucs_offsetof(ucp_conn_request_t, client_data) + ++ length, "accept connection request"); ++ if (conn_request == NULL) { ++ ucs_error("failed to allocate connect request, rejecting connection request %p on TL iface %p, reason %s", ++ uct_req, tl_iface, ucs_status_string(UCS_ERR_NO_MEMORY)); ++ uct_iface_reject(tl_iface, uct_req); ++ return; + } + +- return UCS_OK; ++ conn_request->listener = listener; ++ conn_request->uct_req = uct_req; ++ memcpy(&conn_request->client_data, conn_priv_data, length); + +-err_destroy_ep: +- ucp_ep_destroy_internal(ep); +-err: +- return status; ++ uct_worker_progress_register_safe(listener->wiface.worker->uct, ++ ucp_listener_conn_request_progress, ++ conn_request, UCS_CALLBACKQ_FLAG_ONESHOT, ++ &prog_id); ++ ++ /* If the worker supports the UCP_FEATURE_WAKEUP feature, signal the user so ++ * that he can wake-up on this event */ ++ ucp_worker_signal_internal(listener->wiface.worker); + } + + ucs_status_t ucp_listener_create(ucp_worker_h worker, +@@ -105,16 +182,22 @@ ucs_status_t ucp_listener_create(ucp_worker_h worker, + ucp_tl_md_t *tl_md; + char saddr_str[UCS_SOCKADDR_STRING_LEN]; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); +- UCS_ASYNC_BLOCK(&worker->async); +- + if (!(params->field_mask & UCP_LISTENER_PARAM_FIELD_SOCK_ADDR)) { + ucs_error("Missing sockaddr for listener"); +- status = UCS_ERR_INVALID_PARAM; +- goto out; ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ UCP_CHECK_PARAM_NON_NULL(params->sockaddr.addr, status, return status); ++ ++ if (ucs_test_all_flags(params->field_mask, ++ UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER | ++ UCP_LISTENER_PARAM_FIELD_CONN_HANDLER)) { ++ ucs_error("Only one accept handler should be provided"); ++ return UCS_ERR_INVALID_PARAM; + } + +- UCP_CHECK_PARAM_NON_NULL(params->sockaddr.addr, status, goto out); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); ++ UCS_ASYNC_BLOCK(&worker->async); + + /* Go through all the available resources and for each one, check if the given + * sockaddr is accessible from its md. Start listening on the first md that +@@ -130,18 +213,22 @@ ucs_status_t ucp_listener_create(ucp_worker_h worker, + continue; + } + +- listener = ucs_malloc(sizeof(*listener), "ucp_listener"); ++ listener = ucs_calloc(1, sizeof(*listener), "ucp_listener"); + if (listener == NULL) { + status = UCS_ERR_NO_MEMORY; + goto out; + } + + if (params->field_mask & UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER) { +- UCP_CHECK_PARAM_NON_NULL(params->accept_handler.cb, status, goto err_free); +- listener->cb = params->accept_handler.cb; +- listener->arg = params->accept_handler.arg; +- } else { +- listener->cb = NULL; ++ UCP_CHECK_PARAM_NON_NULL(params->accept_handler.cb, status, ++ goto err_free); ++ listener->accept_cb = params->accept_handler.cb; ++ listener->arg = params->accept_handler.arg; ++ } else if (params->field_mask & UCP_LISTENER_PARAM_FIELD_CONN_HANDLER) { ++ UCP_CHECK_PARAM_NON_NULL(params->conn_handler.cb, status, ++ goto err_free); ++ listener->conn_cb = params->conn_handler.cb; ++ listener->arg = params->conn_handler.arg; + } + + memset(&iface_params, 0, sizeof(iface_params)); +@@ -157,6 +244,13 @@ ucs_status_t ucp_listener_create(ucp_worker_h worker, + goto err_free; + } + ++ if ((context->config.features & UCP_FEATURE_WAKEUP) && ++ !(listener->wiface.attr.cap.flags & UCT_IFACE_FLAG_CB_ASYNC)) { ++ ucp_worker_iface_cleanup(&listener->wiface); ++ ucs_free(listener); ++ continue; ++ } ++ + ucs_trace("listener %p: accepting connections on %s", listener, + tl_md->rsc.md_name); + +@@ -167,13 +261,14 @@ ucs_status_t ucp_listener_create(ucp_worker_h worker, + + ucs_error("none of the available transports can listen for connections on %s", + ucs_sockaddr_str(params->sockaddr.addr, saddr_str, sizeof(saddr_str))); +- status = UCS_ERR_INVALID_ADDR; ++ status = UCS_ERR_UNREACHABLE; ++ goto out; + + err_free: + ucs_free(listener); + out: + UCS_ASYNC_UNBLOCK(&worker->async); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } + +@@ -187,3 +282,21 @@ void ucp_listener_destroy(ucp_listener_h listener) + ucp_worker_iface_cleanup(&listener->wiface); + ucs_free(listener); + } ++ ++ucs_status_t ucp_listener_reject(ucp_listener_h listener, ++ ucp_conn_request_h conn_request) ++{ ++ ucp_worker_h worker = listener->wiface.worker; ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); ++ UCS_ASYNC_BLOCK(&worker->async); ++ ++ uct_iface_reject(listener->wiface.iface, conn_request->uct_req); ++ ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); ++ ++ ucs_free(conn_request); ++ ++ return UCS_OK; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.h +index 6883f8b6b..8b8f33f38 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_listener.h +@@ -9,28 +9,30 @@ + #define UCP_LISTENER_H_ + + #include "ucp_worker.h" ++#include "wireup/wireup_ep.h" + + + /** + * UCP listener + */ + typedef struct ucp_listener { +- ucp_worker_iface_t wiface; /* UCT iface to listen on */ +- ucp_listener_accept_callback_t cb; /* Listen accept callback */ +- void *arg; /* User's arg for the accept callback */ +- uct_worker_cb_id_t prog_id; /* Slow-path callback */ ++ ucp_worker_iface_t wiface; /* UCT iface to listen on */ ++ ucp_listener_accept_callback_t accept_cb; /* Listen accept callback ++ which creates an endpoint ++ */ ++ ucp_listener_conn_callback_t conn_cb; /* Listen callback which ++ creates a handle to ++ connection request to the ++ remote endpoint */ ++ void *arg; /* User's arg for the accept ++ callback */ ++ uct_worker_cb_id_t prog_id; /* Slow-path callback */ + } ucp_listener_t; + + +-/** +- * Accepted connection on a listener +- */ +-typedef struct ucp_listener_accept { +- ucp_listener_h listener; /* Listener on which the connection +- was accepted */ +- ucp_ep_h ep; /* New endpoint which was created +- for the connection */ +-} ucp_listener_accept_t; ++void ucp_listener_schedule_accept_cb(ucp_ep_h ep); + ++int ucp_listener_accept_cb_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.c +index d2e35b993..3d8ab4172 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.c +@@ -37,12 +37,13 @@ ucs_status_t ucp_mem_rereg_mds(ucp_context_h context, ucp_md_map_t reg_md_map, + unsigned prev_num_memh; + unsigned md_index; + ucs_status_t status; ++ int level; + + if (reg_md_map == *md_map_p) { + return UCS_OK; /* shortcut - no changes required */ + } + +- prev_num_memh = ucs_count_one_bits(*md_map_p); ++ prev_num_memh = ucs_popcount(*md_map_p); + prev_uct_memh = ucs_alloca(prev_num_memh * sizeof(*prev_uct_memh)); + + /* Go over previous handles, save only the ones we will need */ +@@ -77,7 +78,7 @@ ucs_status_t ucp_mem_rereg_mds(ucp_context_h context, ucp_md_map_t reg_md_map, + } + + /* prev_uct_memh should contain the handles which should be reused */ +- ucs_assert(prev_memh_index == ucs_count_one_bits(*md_map_p & reg_md_map)); ++ ucs_assert(prev_memh_index == ucs_popcount(*md_map_p & reg_md_map)); + + /* Go over requested MD map, and use / register new handles */ + new_md_map = 0; +@@ -99,10 +100,12 @@ ucs_status_t ucp_mem_rereg_mds(ucp_context_h context, ucp_md_map_t reg_md_map, + status = uct_md_mem_reg(context->tl_mds[md_index].md, address, + length, uct_flags, &uct_memh[memh_index]); + if (status != UCS_OK) { +- ucs_error("failed to register address %p length %zu on md[%d]=%s: %s", +- address, length, md_index, +- context->tl_mds[md_index].rsc.md_name, +- ucs_status_string(status)); ++ level = (uct_flags & UCT_MD_MEM_FLAG_HIDE_ERRORS) ? ++ UCS_LOG_LEVEL_DEBUG : UCS_LOG_LEVEL_ERROR; ++ ucs_log(level, ++ "failed to register address %p length %zu on md[%d]=%s: %s", ++ address, length, md_index, context->tl_mds[md_index].rsc.md_name, ++ ucs_status_string(status)); + ucp_mem_rereg_mds(context, 0, NULL, 0, 0, alloc_md, mem_type, + alloc_md_memh_p, uct_memh, md_map_p); + return status; +@@ -221,16 +224,16 @@ ucp_mem_map_params2uct_flags(ucp_mem_map_params_t *params) + } + + /* Matrix of behavior +- * |-----------------------------------------------------------------------------| +- * | parameter | value | +- * |-----------|-----------------------------------------------------------------| +- * | ALLOCATE | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | +- * | FIXED | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | +- * | addr | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | +- * |-----------|-----|-----------|-----|-----|-----|-----------|-----|-----------| +- * | result | err | alloc/reg | err | reg | err | alloc/reg | err | alloc/reg | +- * | | | | | | | (hint) | | (fixed) | +- * |-----------------------------------------------------------------------------| ++ * |--------------------------------------------------------------------------------| ++ * | parameter | value | ++ * |-----------|--------------------------------------------------------------------| ++ * | ALLOCATE | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | ++ * | FIXED | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | ++ * | addr | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | ++ * |-----------|--------|-----------|-----|-----|-----|-----------|-----|-----------| ++ * | result | err if | alloc/reg | err | reg | err | alloc/reg | err | alloc/reg | ++ * | | len >0 | | | | | (hint) | | (fixed) | ++ * |--------------------------------------------------------------------------------| + */ + static inline ucs_status_t ucp_mem_map_check_and_adjust_params(ucp_mem_map_params_t *params) + { +@@ -260,8 +263,9 @@ static inline ucs_status_t ucp_mem_map_check_and_adjust_params(ucp_mem_map_param + + /* Now, lets check the rest of erroneous cases from the matrix */ + if (params->address == NULL) { +- if (!(params->flags & UCP_MEM_MAP_ALLOCATE)) { +- ucs_error("Undefined address requires UCP_MEM_MAP_ALLOCATE flag"); ++ if (!(params->flags & UCP_MEM_MAP_ALLOCATE) && (params->length > 0)) { ++ ucs_error("Undefined address with nonzero length requires " ++ "UCP_MEM_MAP_ALLOCATE flag"); + return UCS_ERR_INVALID_PARAM; + } + } else if (!(params->flags & UCP_MEM_MAP_ALLOCATE) && +@@ -417,6 +421,72 @@ out: + return status; + } + ++ucs_status_t ucp_mem_type_reg_buffers(ucp_worker_h worker, void *remote_addr, ++ size_t length, uct_memory_type_t mem_type, ++ unsigned md_index, uct_mem_h *memh, ++ ucp_md_map_t *md_map, ++ uct_rkey_bundle_t *rkey_bundle) ++{ ++ ucp_context_h context = worker->context; ++ uct_md_h md; ++ ucs_status_t status; ++ char *rkey_buffer; ++ ++ md = context->tl_mds[md_index].md; ++ ++ *memh = UCT_MEM_HANDLE_NULL; ++ status = ucp_mem_rereg_mds(context, UCS_BIT(md_index), remote_addr, length, ++ UCT_MD_MEM_ACCESS_ALL, NULL, mem_type, ++ NULL, memh, md_map); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ ++ if (context->tl_mds[md_index].attr.cap.flags & UCT_MD_FLAG_NEED_RKEY) { ++ rkey_buffer = ucs_alloca(context->tl_mds[md_index].attr.rkey_packed_size); ++ ++ status = uct_md_mkey_pack(md, memh[0], rkey_buffer); ++ if (status != UCS_OK) { ++ ucs_error("failed to pack key from md[%d]: %s", ++ md_index, ucs_status_string(status)); ++ goto err_dreg_mem; ++ } ++ ++ status = uct_rkey_unpack(rkey_buffer, rkey_bundle); ++ if (status != UCS_OK) { ++ ucs_error("failed to unpack key from md[%d]: %s", ++ md_index, ucs_status_string(status)); ++ goto err_dreg_mem; ++ } ++ } else { ++ rkey_bundle->handle = NULL; ++ rkey_bundle->rkey = UCT_INVALID_RKEY; ++ rkey_bundle->type = NULL; ++ } ++ ++ return UCS_OK; ++ ++err_dreg_mem: ++ ucp_mem_rereg_mds(context, 0, NULL, 0, 0, NULL, mem_type, NULL, ++ memh, md_map); ++err: ++ return status; ++} ++ ++void ucp_mem_type_unreg_buffers(ucp_worker_h worker, uct_memory_type_t mem_type, ++ uct_mem_h *memh, ucp_md_map_t *md_map, ++ uct_rkey_bundle_t *rkey_bundle) ++{ ++ ucp_context_h context = worker->context; ++ ++ if (rkey_bundle->rkey != UCT_INVALID_RKEY) { ++ uct_rkey_release(rkey_bundle); ++ } ++ ++ ucp_mem_rereg_mds(context, 0, NULL, 0, 0, NULL, mem_type, NULL, ++ memh, md_map); ++} ++ + ucs_status_t ucp_mem_query(const ucp_mem_h memh, ucp_mem_attr_t *attr) + { + if (attr->field_mask & UCP_MEM_ATTR_FIELD_ADDRESS) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.h +index 128c8937b..be2e1d494 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_mm.h +@@ -38,8 +38,11 @@ typedef struct ucp_rkey { + unsigned max_put_short;/* Cached value of max_put_short */ + uct_rkey_t rma_rkey; /* Key to use for RMAs */ + uct_rkey_t amo_rkey; /* Key to use for AMOs */ ++ ucp_amo_proto_t *amo_proto; /* Protocol for AMOs */ ++ ucp_rma_proto_t *rma_proto; /* Protocol for RMAs */ + } cache; + ucp_md_map_t md_map; /* Which *remote* MDs have valid memory handles */ ++ uct_memory_type_t mem_type;/* Memory type of remote key memory */ + uct_rkey_bundle_t uct[0]; /* Remote key for every MD */ + } ucp_rkey_t; + +@@ -73,6 +76,7 @@ typedef struct ucp_mem_desc { + void ucp_rkey_resolve_inner(ucp_rkey_h rkey, ucp_ep_h ep); + + ucp_lane_index_t ucp_rkey_get_rma_bw_lane(ucp_rkey_h rkey, ucp_ep_h ep, ++ uct_memory_type_t mem_type, + uct_rkey_t *uct_rkey_p, + ucp_lane_map_t ignore); + +@@ -119,18 +123,29 @@ ucs_status_t ucp_mem_rereg_mds(ucp_context_h context, ucp_md_map_t reg_md_map, + size_t ucp_rkey_packed_size(ucp_context_h context, ucp_md_map_t md_map); + + void ucp_rkey_packed_copy(ucp_context_h context, ucp_md_map_t md_map, +- void *rkey_buffer, const void* uct_rkeys[]); ++ uct_memory_type_t mem_type, void *rkey_buffer, ++ const void* uct_rkeys[]); + + ssize_t ucp_rkey_pack_uct(ucp_context_h context, ucp_md_map_t md_map, +- const uct_mem_h *memh, void *rkey_buffer); ++ const uct_mem_h *memh, uct_memory_type_t mem_type, ++ void *rkey_buffer); + + void ucp_rkey_dump_packed(const void *rkey_buffer, char *buffer, size_t max); + ++ucs_status_t ucp_mem_type_reg_buffers(ucp_worker_h worker, void *remote_addr, ++ size_t length, uct_memory_type_t mem_type, ++ unsigned md_index, uct_mem_h *memh, ++ ucp_md_map_t *md_map, ++ uct_rkey_bundle_t *rkey_bundle); ++ ++void ucp_mem_type_unreg_buffers(ucp_worker_h worker, uct_memory_type_t mem_type, ++ uct_mem_h *memh, ucp_md_map_t *md_map, ++ uct_rkey_bundle_t *rkey_bundle); + + static UCS_F_ALWAYS_INLINE ucp_md_index_t + ucp_memh_map2idx(ucp_md_map_t md_map, ucp_md_index_t md_idx) + { +- return ucs_count_one_bits(md_map & UCS_MASK(md_idx)); ++ return ucs_popcount(md_map & UCS_MASK(md_idx)); + } + + static UCS_F_ALWAYS_INLINE uct_mem_h +@@ -165,5 +180,6 @@ ucp_memh2uct(ucp_mem_h memh, ucp_md_index_t md_idx) + }) + + #define UCP_MEM_IS_HOST(_mem_type) ((_mem_type) == UCT_MD_MEM_TYPE_HOST) ++#define UCP_MEM_IS_CUDA_MANAGED(_mem_type) ((_mem_type) == UCT_MD_MEM_TYPE_CUDA_MANAGED) + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.c +index 169d655f1..cdb62da94 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.c +@@ -68,22 +68,18 @@ UCP_PROXY_EP_DEFINE_OP(ssize_t, am_bcopy, uint8_t, uct_pack_callback_t, void*, + unsigned) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, am_zcopy, uint8_t, const void*, unsigned, + const uct_iov_t*, size_t, unsigned, uct_completion_t*) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_add64, uint64_t, uint64_t, +- uct_rkey_t) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_fadd64, uint64_t, uint64_t, +- uct_rkey_t, uint64_t*, uct_completion_t*) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_swap64, uint64_t, uint64_t, +- uct_rkey_t, uint64_t*, uct_completion_t*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_cswap64, uint64_t, uint64_t, + uint64_t, uct_rkey_t, uint64_t*, uct_completion_t*) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_add32, uint32_t, uint64_t, +- uct_rkey_t) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_fadd32, uint32_t, uint64_t, +- uct_rkey_t, uint32_t*, uct_completion_t*) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_swap32, uint32_t, uint64_t, +- uct_rkey_t, uint32_t*, uct_completion_t*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic_cswap32, uint32_t, uint32_t, + uint64_t, uct_rkey_t, uint32_t*, uct_completion_t*) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic64_post, uct_atomic_op_t, ++ uint64_t, uint64_t, uct_rkey_t) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic32_post, uct_atomic_op_t, ++ uint32_t, uint64_t, uct_rkey_t) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic64_fetch, uct_atomic_op_t, uint64_t, ++ uint64_t*, uint64_t, uct_rkey_t, uct_completion_t*) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, atomic32_fetch, uct_atomic_op_t, uint32_t, ++ uint32_t*, uint64_t, uct_rkey_t, uct_completion_t*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, tag_eager_short, uct_tag_t, const void*, + size_t) + UCP_PROXY_EP_DEFINE_OP(ssize_t, tag_eager_bcopy, uct_tag_t, uint64_t, +@@ -96,7 +92,7 @@ UCP_PROXY_EP_DEFINE_OP(ucs_status_ptr_t, tag_rndv_zcopy, uct_tag_t, const void*, + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, tag_rndv_cancel, void*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, tag_rndv_request, uct_tag_t, const void*, + unsigned, unsigned) +-UCP_PROXY_EP_DEFINE_OP(ucs_status_t, pending_add, uct_pending_req_t*) ++UCP_PROXY_EP_DEFINE_OP(ucs_status_t, pending_add, uct_pending_req_t*, unsigned) + UCP_PROXY_EP_DEFINE_OP(void, pending_purge, uct_pending_purge_callback_t, void*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, flush, unsigned, uct_completion_t*) + UCP_PROXY_EP_DEFINE_OP(ucs_status_t, fence, unsigned) +@@ -133,14 +129,12 @@ UCS_CLASS_INIT_FUNC(ucp_proxy_ep_t, const uct_iface_ops_t *ops, ucp_ep_h ucp_ep, + UCP_PROXY_EP_SET_OP(ep_am_short); + UCP_PROXY_EP_SET_OP(ep_am_bcopy); + UCP_PROXY_EP_SET_OP(ep_am_zcopy); +- UCP_PROXY_EP_SET_OP(ep_atomic_add64); +- UCP_PROXY_EP_SET_OP(ep_atomic_fadd64); +- UCP_PROXY_EP_SET_OP(ep_atomic_swap64); + UCP_PROXY_EP_SET_OP(ep_atomic_cswap64); +- UCP_PROXY_EP_SET_OP(ep_atomic_add32); +- UCP_PROXY_EP_SET_OP(ep_atomic_fadd32); +- UCP_PROXY_EP_SET_OP(ep_atomic_swap32); + UCP_PROXY_EP_SET_OP(ep_atomic_cswap32); ++ UCP_PROXY_EP_SET_OP(ep_atomic64_post); ++ UCP_PROXY_EP_SET_OP(ep_atomic32_post); ++ UCP_PROXY_EP_SET_OP(ep_atomic64_fetch); ++ UCP_PROXY_EP_SET_OP(ep_atomic32_fetch); + UCP_PROXY_EP_SET_OP(ep_tag_eager_short); + UCP_PROXY_EP_SET_OP(ep_tag_eager_bcopy); + UCP_PROXY_EP_SET_OP(ep_tag_eager_zcopy); +@@ -183,20 +177,59 @@ static UCS_CLASS_CLEANUP_FUNC(ucp_proxy_ep_t) + } + } + ++int ucp_proxy_ep_test(uct_ep_h uct_ep) ++{ ++ return uct_ep->iface->ops.ep_destroy == ucp_proxy_ep_destroy; ++} ++ ++uct_ep_h ucp_proxy_ep_extract(uct_ep_h ep) ++{ ++ ucp_proxy_ep_t *proxy_ep = ucs_derived_of(ep, ucp_proxy_ep_t); ++ uct_ep_h uct_ep; ++ ++ uct_ep = proxy_ep->uct_ep; ++ proxy_ep->uct_ep = NULL; ++ return uct_ep; ++} ++ ++static void ucp_proxy_ep_replace_if_owned(uct_ep_h uct_ep, uct_ep_h owned_ep, ++ uct_ep_h replacement_ep) ++{ ++ ucp_proxy_ep_t *proxy_ep; ++ ++ if (ucp_proxy_ep_test(uct_ep)) { ++ proxy_ep = ucs_derived_of(uct_ep, ucp_proxy_ep_t); ++ if (proxy_ep->uct_ep == owned_ep) { ++ proxy_ep->uct_ep = replacement_ep; ++ } ++ ucs_assert(replacement_ep != NULL); ++ } ++} ++ + void ucp_proxy_ep_replace(ucp_proxy_ep_t *proxy_ep) + { + ucp_ep_h ucp_ep = proxy_ep->ucp_ep; + ucp_lane_index_t lane; ++ uct_ep_h tl_ep = NULL; + + ucs_assert(proxy_ep->uct_ep != NULL); + for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { + if (ucp_ep->uct_eps[lane] == &proxy_ep->super) { ++ ucs_assert(proxy_ep->uct_ep != NULL); /* make sure there is only one match */ + ucp_ep->uct_eps[lane] = proxy_ep->uct_ep; ++ tl_ep = ucp_ep->uct_eps[lane]; + proxy_ep->uct_ep = NULL; +- break; + } + } + ++ /* go through the lanes and check if the proxy ep that is being destroyed, ++ * is pointed to by another proxy ep. if so, redirect that other proxy ep ++ * to point to the underlying uct ep. */ ++ for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { ++ ucp_proxy_ep_replace_if_owned(ucp_ep->uct_eps[lane], &proxy_ep->super, ++ tl_ep); ++ } ++ + uct_ep_destroy(&proxy_ep->super); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.h +index a23b4d820..fe15d32a8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_proxy_ep.h +@@ -42,6 +42,10 @@ UCS_CLASS_DECLARE(ucp_proxy_ep_t, const uct_iface_ops_t *ops, ucp_ep_h ucp_ep, + */ + void ucp_proxy_ep_replace(ucp_proxy_ep_t *proxy_ep); + ++int ucp_proxy_ep_test(uct_ep_h ep); ++ ++uct_ep_h ucp_proxy_ep_extract(uct_ep_h ep); ++ + void ucp_proxy_ep_set_uct_ep(ucp_proxy_ep_t *proxy_ep, uct_ep_h uct_ep, + int is_owner); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.c +index f42deaa53..f6b3b1b88 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.c +@@ -66,7 +66,7 @@ ucp_request_release_common(void *request, uint8_t cb_flag, const char *debug_nam + ucp_worker_t, req_mp); + uint16_t flags; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + flags = req->flags; + ucs_trace_req("%s request %p (%p) "UCP_REQUEST_FLAGS_FMT, debug_name, +@@ -81,7 +81,7 @@ ucp_request_release_common(void *request, uint8_t cb_flag, const char *debug_nam + req->flags = (flags | UCP_REQUEST_FLAG_RELEASED) & ~cb_flag; + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + } + + UCS_PROFILE_FUNC_VOID(ucp_request_release, (request), void *request) +@@ -106,7 +106,7 @@ UCS_PROFILE_FUNC_VOID(ucp_request_cancel, (worker, request), + } + + if (req->flags & UCP_REQUEST_FLAG_EXPECTED) { +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + ucp_tag_exp_remove(&worker->tm, req); + /* If tag posted to the transport need to wait its completion */ +@@ -114,7 +114,7 @@ UCS_PROFILE_FUNC_VOID(ucp_request_cancel, (worker, request), + ucp_request_complete_tag_recv(req, UCS_ERR_CANCELED); + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + } + } + +@@ -163,7 +163,7 @@ int ucp_request_pending_add(ucp_request_t *req, ucs_status_t *req_status) + ucs_debug_get_symbol_name(req->send.uct.func)); + + uct_ep = req->send.ep->uct_eps[req->send.lane]; +- status = uct_ep_pending_add(uct_ep, &req->send.uct); ++ status = uct_ep_pending_add(uct_ep, &req->send.uct, 0); + if (status == UCS_OK) { + ucs_trace_data("ep %p: added pending uct request %p to lane[%d]=%p", + req->send.ep, req, req->send.lane, uct_ep); +@@ -195,26 +195,29 @@ static void ucp_request_dt_dereg(ucp_context_t *context, ucp_dt_reg_t *dt_reg, + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_request_memory_reg, +- (context, md_map, buffer, length, datatype, state, req_dbg), ++ (context, md_map, buffer, length, datatype, state, mem_type, req_dbg, uct_flags), + ucp_context_t *context, ucp_md_map_t md_map, void *buffer, + size_t length, ucp_datatype_t datatype, ucp_dt_state_t *state, +- ucp_request_t *req_dbg) ++ uct_memory_type_t mem_type, ucp_request_t *req_dbg, unsigned uct_flags) + { + size_t iov_it, iovcnt; + const ucp_dt_iov_t *iov; + ucp_dt_reg_t *dt_reg; + ucs_status_t status; ++ int flags; ++ int level; + + ucs_trace_func("context=%p md_map=0x%lx buffer=%p length=%zu datatype=0x%lu " + "state=%p", context, md_map, buffer, length, datatype, state); + + status = UCS_OK; ++ flags = UCT_MD_MEM_ACCESS_RMA | uct_flags; + switch (datatype & UCP_DATATYPE_CLASS_MASK) { + case UCP_DATATYPE_CONTIG: +- ucs_assert(ucs_count_one_bits(md_map) <= UCP_MAX_OP_MDS); +- status = ucp_mem_rereg_mds(context, md_map, buffer, length, +- UCT_MD_MEM_ACCESS_RMA, NULL, UCT_MD_MEM_TYPE_HOST, NULL, +- state->dt.contig.memh, &state->dt.contig.md_map); ++ ucs_assert(ucs_popcount(md_map) <= UCP_MAX_OP_MDS); ++ status = ucp_mem_rereg_mds(context, md_map, buffer, length, flags, ++ NULL, mem_type, NULL, state->dt.contig.memh, ++ &state->dt.contig.md_map); + ucp_trace_req(req_dbg, "mem reg md_map 0x%"PRIx64"/0x%"PRIx64, + state->dt.contig.md_map, md_map); + break; +@@ -230,10 +233,8 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_request_memory_reg, + dt_reg[iov_it].md_map = 0; + if (iov[iov_it].length) { + status = ucp_mem_rereg_mds(context, md_map, iov[iov_it].buffer, +- iov[iov_it].length, +- UCT_MD_MEM_ACCESS_RMA, NULL, +- UCT_MD_MEM_TYPE_HOST, NULL, +- dt_reg[iov_it].memh, ++ iov[iov_it].length, flags, NULL, ++ mem_type, NULL, dt_reg[iov_it].memh, + &dt_reg[iov_it].md_map); + if (status != UCS_OK) { + /* unregister previously registered memory */ +@@ -255,8 +256,11 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_request_memory_reg, + + err: + if (status != UCS_OK) { +- ucs_error("failed to register user buffer datatype 0x%lx address %p len %zu:" +- " %s", datatype, buffer, length, ucs_status_string(status)); ++ level = (flags & UCT_MD_MEM_FLAG_HIDE_ERRORS) ? ++ UCS_LOG_LEVEL_DEBUG : UCS_LOG_LEVEL_ERROR; ++ ucs_log(level, ++ "failed to register user buffer datatype 0x%lx address %p len %zu:" ++ " %s", datatype, buffer, length, ucs_status_string(status)); + } + return status; + } +@@ -302,11 +306,13 @@ ucs_status_t ucp_request_test(void *request, ucp_tag_recv_info_t *info) + + ucs_status_t + ucp_request_send_start(ucp_request_t *req, ssize_t max_short, +- size_t zcopy_thresh, size_t seg_size, +- size_t zcopy_max, const ucp_proto_t *proto) ++ size_t zcopy_thresh, size_t zcopy_max, size_t dt_count, ++ const ucp_ep_msg_config_t* msg_config, ++ const ucp_proto_t *proto) + { + size_t length = req->send.length; + ucs_status_t status; ++ int multi; + + if ((ssize_t)length <= max_short) { + /* short */ +@@ -316,13 +322,13 @@ ucp_request_send_start(ucp_request_t *req, ssize_t max_short, + } else if (length < zcopy_thresh) { + /* bcopy */ + ucp_request_send_state_reset(req, NULL, UCP_REQUEST_SEND_PROTO_BCOPY_AM); +- if (length < seg_size) { ++ if (length <= msg_config->max_bcopy - proto->only_hdr_size) { + req->send.uct.func = proto->bcopy_single; + UCS_PROFILE_REQUEST_EVENT(req, "start_bcopy_single", req->send.length); + } else { + req->send.uct.func = proto->bcopy_multi; + req->send.tag.message_id = req->send.ep->worker->tm.am.message_id++; +- req->send.tag.am_bw_index = 0; ++ req->send.tag.am_bw_index = 1; + req->send.pending_lane = UCP_NULL_LANE; + UCS_PROFILE_REQUEST_EVENT(req, "start_bcopy_multi", req->send.length); + } +@@ -336,15 +342,28 @@ ucp_request_send_start(ucp_request_t *req, ssize_t max_short, + return status; + } + +- if (length < seg_size) { +- req->send.uct.func = proto->zcopy_single; +- UCS_PROFILE_REQUEST_EVENT(req, "start_zcopy_single", req->send.length); ++ if (ucs_unlikely(length > msg_config->max_zcopy - proto->only_hdr_size)) { ++ multi = 1; ++ } else if (ucs_unlikely(UCP_DT_IS_IOV(req->send.datatype))) { ++ if (dt_count <= msg_config->max_iov) { ++ multi = 0; ++ } else { ++ multi = ucp_dt_iov_count_nonempty(req->send.buffer, dt_count) > ++ msg_config->max_iov; ++ } + } else { ++ multi = 0; ++ } ++ ++ if (multi) { + req->send.uct.func = proto->zcopy_multi; + req->send.tag.message_id = req->send.ep->worker->tm.am.message_id++; +- req->send.tag.am_bw_index = 0; ++ req->send.tag.am_bw_index = 1; + req->send.pending_lane = UCP_NULL_LANE; + UCS_PROFILE_REQUEST_EVENT(req, "start_zcopy_multi", req->send.length); ++ } else { ++ req->send.uct.func = proto->zcopy_single; ++ UCS_PROFILE_REQUEST_EVENT(req, "start_zcopy_single", req->send.length); + } + return UCS_OK; + } +@@ -352,3 +371,13 @@ ucp_request_send_start(ucp_request_t *req, ssize_t max_short, + return UCS_ERR_NO_PROGRESS; + } + ++void ucp_request_send_state_ff(ucp_request_t *req, ucs_status_t status) ++{ ++ if (req->send.state.uct_comp.func) { ++ req->send.state.dt.offset = req->send.length; ++ req->send.state.uct_comp.count = 0; ++ req->send.state.uct_comp.func(&req->send.state.uct_comp, status); ++ } else { ++ ucp_request_complete_send(req, status); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.h +index 71be52548..1e0da8ea1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.h +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + + +@@ -38,9 +39,10 @@ enum { + UCP_REQUEST_FLAG_SYNC = UCS_BIT(8), + UCP_REQUEST_FLAG_OFFLOADED = UCS_BIT(10), + UCP_REQUEST_FLAG_BLOCK_OFFLOAD = UCS_BIT(11), +- UCP_REQUEST_FLAG_STREAM_RECV = UCS_BIT(13), ++ UCP_REQUEST_FLAG_STREAM_RECV_WAITALL = UCS_BIT(12), + + #if ENABLE_ASSERT ++ UCP_REQUEST_FLAG_STREAM_RECV = UCS_BIT(14), + UCP_REQUEST_DEBUG_FLAG_EXTERNAL = UCS_BIT(15) + #else + UCP_REQUEST_DEBUG_FLAG_EXTERNAL = 0 +@@ -90,9 +92,12 @@ struct ucp_request { + uint16_t flags; /* Request flags */ + + union { ++ ++ /* "send" part - used for tag_send, stream_send, put, get, and atomic ++ * operations */ + struct { + ucp_ep_h ep; +- const void *buffer; /* Send buffer */ ++ void *buffer; /* Send buffer */ + ucp_datatype_t datatype; /* Send type */ + size_t length; /* Total length, in bytes */ + uct_memory_type_t mem_type; /* Memory type */ +@@ -107,6 +112,8 @@ struct ucp_request { + ucp_tag_t tag; + uint64_t message_id; /* message ID used in AM */ + ucp_lane_index_t am_bw_index; /* AM BW lane index */ ++ uintptr_t rreq_ptr; /* receive request ptr on the ++ recv side (used in AM rndv) */ + } tag; + + struct { +@@ -118,7 +125,6 @@ struct ucp_request { + uintptr_t remote_request; /* pointer to the send request on receiver side */ + uint8_t am_id; + ucs_status_t status; +- uint64_t sender_uuid; /* Sender uuid, which is sent back in sync ack */ + ucp_tag_t sender_tag; /* Sender tag, which is sent back in sync ack */ + ucp_request_callback_t comp_cb; /* Called to complete the request */ + } proto; +@@ -145,10 +151,6 @@ struct ucp_request { + uct_rkey_t uct_rkey; /* UCT remote key */ + } rndv_put; + +- struct { +- uintptr_t rreq_ptr; /* receive request ptr on the recv side */ +- } rndv_data; +- + struct { + uintptr_t remote_request; /* pointer to the send request on receiver side */ + ucp_request_t *rreq; +@@ -156,10 +158,15 @@ struct ucp_request { + + struct { + ucp_request_callback_t flushed_cb;/* Called when flushed */ ++ ucp_request_t *worker_req; ++ ucs_queue_elem_t queue; /* Queue element in proto_status */ ++ unsigned uct_flags; /* Flags to pass to @ref uct_ep_flush */ + uct_worker_cb_id_t prog_id; /* Progress callback ID */ ++ uint32_t cmpl_sn; /* Sequence number of the remote completion ++ this request is waiting for */ ++ uint8_t sw_started; ++ uint8_t sw_done; + ucp_lane_map_t lanes; /* Which lanes need to be flushed */ +- unsigned uct_flags; /* Flags to pass to +- @ref uct_ep_flush */ + } flush; + + struct { +@@ -168,10 +175,9 @@ struct ucp_request { + + struct { + uint64_t remote_addr; /* Remote address */ +- ucp_atomic_fetch_op_t op; /* Requested AMO */ +- ucp_rkey_h rkey; /* Remote memory key */ +- uint64_t value; +- void *result; ++ ucp_rkey_h rkey; /* Remote memory key */ ++ uint64_t value; /* Atomic argument */ ++ uct_atomic_op_t uct_op; /* Requested UCT AMO */ + } amo; + + struct { +@@ -179,7 +185,16 @@ struct ucp_request { + ucp_tag_t ssend_tag; /* Tag in offload sync send */ + void *rndv_op; /* Handler of issued rndv send. Need to cancel + the operation if it is completed by SW. */ +- } tag_offload; ++ } tag_offload; ++ ++ struct { ++ uintptr_t req; /* Remote get request pointer */ ++ } get_reply; ++ ++ struct { ++ uintptr_t req; /* Remote atomic request pointer */ ++ ucp_atomic_reply_t data; /* Atomic reply data */ ++ } atomic_reply; + }; + + /* This structure holds all mutable fields, and everything else +@@ -198,6 +213,7 @@ struct ucp_request { + ucp_mem_desc_t *mdesc; + } send; + ++ /* "receive" part - used for tag_recv and stream_recv operations */ + struct { + ucs_queue_elem_t queue; /* Expected queue element */ + void *buffer; /* Buffer to receive data to */ +@@ -234,13 +250,27 @@ struct ucp_request { + ucp_worker_h worker; /* Worker to flush */ + ucp_send_callback_t cb; /* Completion callback */ + uct_worker_cb_id_t prog_id; /* Progress callback ID */ ++ int comp_count; /* Countdown to request completion */ ++ ucp_ep_ext_gen_t *next_ep; /* Next endpoint to flush */ + } flush_worker; + }; + }; + + + /** +- * Unexpected receive descriptor. ++ * Unexpected receive descriptor. If it is initialized in the headroom of UCT ++ * descriptor, the layout looks like the following: ++ * ++ * ++ * headroom data ++ * |-------------------------------------------|-------------------------| ++ * | unused | ucp_recv_desc | priv_length | | ++ * | | | | | ++ * |-------------------------------------------|-------------------------| ++ * ++ * Some protocols (i. e. tag offload) may need some space right before the ++ * incoming data to add specific headers needed for further message processing. ++ * Note: priv_length value should be in [0, UCP_WORKER_HEADROOM_PRIV_SIZE] range. + */ + struct ucp_recv_desc { + union { +@@ -252,6 +282,11 @@ struct ucp_recv_desc { + uint32_t payload_offset; /* Offset from end of the descriptor + * to AM data */ + uint16_t flags; /* Flags */ ++ int16_t priv_length; /* Number of bytes consumed from ++ headroom private space, except the ++ space needed for ucp_recv_desc itself. ++ It is used for releasing descriptor ++ back to UCT only */ + }; + + +@@ -263,13 +298,19 @@ int ucp_request_pending_add(ucp_request_t *req, ucs_status_t *req_status); + + ucs_status_t ucp_request_memory_reg(ucp_context_t *context, ucp_md_map_t md_map, + void *buffer, size_t length, ucp_datatype_t datatype, +- ucp_dt_state_t *state, ucp_request_t *req_dbg); ++ ucp_dt_state_t *state, uct_memory_type_t mem_type, ++ ucp_request_t *req_dbg, unsigned uct_flags); + + void ucp_request_memory_dereg(ucp_context_t *context, ucp_datatype_t datatype, + ucp_dt_state_t *state, ucp_request_t *req_dbg); + + ucs_status_t ucp_request_send_start(ucp_request_t *req, ssize_t max_short, +- size_t zcopy_thresh, size_t multi_thresh, +- size_t rndv_thresh, const ucp_proto_t *proto); ++ size_t zcopy_thresh, size_t zcopy_max, ++ size_t dt_count, ++ const ucp_ep_msg_config_t* msg_config, ++ const ucp_proto_t *proto); ++ ++/* Fast-forward to data end */ ++void ucp_request_send_state_ff(ucp_request_t *req, ucs_status_t status); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.inl +index 4b58545ae..e73621c0b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_request.inl +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -13,7 +13,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +@@ -110,13 +110,12 @@ ucp_request_complete_tag_recv(ucp_request_t *req, ucs_status_t status) + } + + static UCS_F_ALWAYS_INLINE void +-ucp_request_complete_stream_recv(ucp_request_t *req, +- ucp_ep_ext_stream_t* ep_stream, ++ucp_request_complete_stream_recv(ucp_request_t *req, ucp_ep_ext_proto_t* ep_ext, + ucs_status_t status) + { + /* dequeue request before complete */ + ucp_request_t *check_req UCS_V_UNUSED = +- ucs_queue_pull_elem_non_empty(&ep_stream->match_q, ucp_request_t, ++ ucs_queue_pull_elem_non_empty(&ep_ext->stream.match_q, ucp_request_t, + recv.queue); + ucs_assert(check_req == req); + ucs_assert(req->recv.stream.offset > 0); +@@ -139,6 +138,10 @@ ucp_request_can_complete_stream_recv(ucp_request_t *req) + return 1; + } + ++ if (req->flags & UCP_REQUEST_FLAG_STREAM_RECV_WAITALL) { ++ return 0; ++ } ++ + /* 0-length stream recv is meaningless if this was not requested explicitely */ + if (req->recv.stream.offset == 0) { + return 0; +@@ -334,25 +337,13 @@ ucp_request_send_state_advance(ucp_request_t *req, + (req->send.state.dt.offset <= req->send.length)); + } + +-/* Fast-forward to data end */ +-static UCS_F_ALWAYS_INLINE void +-ucp_request_send_state_ff(ucp_request_t *req, ucs_status_t status) +-{ +- if (req->send.state.uct_comp.func) { +- req->send.state.dt.offset = req->send.length; +- req->send.state.uct_comp.count = 0; +- req->send.state.uct_comp.func(&req->send.state.uct_comp, status); +- } else { +- ucp_request_complete_send(req, status); +- } +-} +- + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_request_send_buffer_reg(ucp_request_t *req, ucp_md_map_t md_map) + { + return ucp_request_memory_reg(req->send.ep->worker->context, md_map, + (void*)req->send.buffer, req->send.length, +- req->send.datatype, &req->send.state.dt, req); ++ req->send.datatype, &req->send.state.dt, ++ req->send.mem_type, req, 0); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +@@ -368,16 +359,18 @@ ucp_send_request_add_reg_lane(ucp_request_t *req, ucp_lane_index_t lane) + /* add new lane to registration map */ + ucp_md_map_t md_map = UCS_BIT(ucp_ep_md_index(req->send.ep, lane)) | + req->send.state.dt.dt.contig.md_map; +- ucs_assert(ucs_count_one_bits(md_map) <= UCP_MAX_OP_MDS); ++ ucs_assert(ucs_popcount(md_map) <= UCP_MAX_OP_MDS); + return ucp_request_send_buffer_reg(req, md_map); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_request_recv_buffer_reg(ucp_request_t *req, ucp_md_map_t md_map) ++ucp_request_recv_buffer_reg(ucp_request_t *req, ucp_md_map_t md_map, ++ size_t length) + { + return ucp_request_memory_reg(req->recv.worker->context, md_map, +- req->recv.buffer, req->recv.length, +- req->recv.datatype, &req->recv.state, req); ++ req->recv.buffer, length, ++ req->recv.datatype, &req->recv.state, ++ req->recv.mem_type, req, 0); + } + + static UCS_F_ALWAYS_INLINE void ucp_request_send_buffer_dereg(ucp_request_t *req) +@@ -435,7 +428,8 @@ ucp_request_recv_data_unpack(ucp_request_t *req, const void *data, + + switch (req->recv.datatype & UCP_DATATYPE_CLASS_MASK) { + case UCP_DATATYPE_CONTIG: +- if (ucs_likely(UCP_MEM_IS_HOST(req->recv.mem_type))) { ++ if ((ucs_likely(UCP_MEM_IS_HOST(req->recv.mem_type))) || ++ (ucs_likely(UCP_MEM_IS_CUDA_MANAGED(req->recv.mem_type)))) { + UCS_PROFILE_NAMED_CALL("memcpy_recv", memcpy, req->recv.buffer + offset, + data, length); + } else { +@@ -477,17 +471,22 @@ ucp_request_recv_data_unpack(ucp_request_t *req, const void *data, + + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_recv_desc_init(ucp_worker_h worker, void *data, size_t length, +- unsigned am_flags, uint16_t hdr_len, uint16_t rdesc_flags, ++ int data_offset, unsigned am_flags, uint16_t hdr_len, ++ uint16_t rdesc_flags, uint16_t priv_length, + ucp_recv_desc_t **rdesc_p) + { + ucp_recv_desc_t *rdesc; ++ void *data_hdr; + ucs_status_t status; + + if (ucs_unlikely(am_flags & UCT_CB_PARAM_FLAG_DESC)) { + /* slowpath */ +- rdesc = (ucp_recv_desc_t *)data - 1; +- rdesc->flags = rdesc_flags | UCP_RECV_DESC_FLAG_UCT_DESC; +- status = UCS_INPROGRESS; ++ ucs_assert(priv_length <= UCP_WORKER_HEADROOM_PRIV_SIZE); ++ data_hdr = UCS_PTR_BYTE_OFFSET(data, -data_offset); ++ rdesc = (ucp_recv_desc_t *)data_hdr - 1; ++ rdesc->flags = rdesc_flags | UCP_RECV_DESC_FLAG_UCT_DESC; ++ rdesc->priv_length = priv_length; ++ status = UCS_INPROGRESS; + } else { + rdesc = (ucp_recv_desc_t*)ucs_mpool_get_inline(&worker->am_mp); + if (rdesc == NULL) { +@@ -495,17 +494,34 @@ ucp_recv_desc_init(ucp_worker_h worker, void *data, size_t length, + return UCS_ERR_NO_MEMORY; + } + ++ /* No need to initialize rdesc->priv_length here, because it is only ++ * needed for releasing UCT descriptor. */ ++ + rdesc->flags = rdesc_flags; +- memcpy(rdesc + 1, data, length); +- status = UCS_OK; ++ status = UCS_OK; ++ memcpy(UCS_PTR_BYTE_OFFSET(rdesc + 1, data_offset), data, length); + } + +- rdesc->length = length; ++ rdesc->length = length + data_offset; + rdesc->payload_offset = hdr_len; + *rdesc_p = rdesc; + return status; + } + ++static UCS_F_ALWAYS_INLINE void ++ucp_recv_desc_release(ucp_recv_desc_t *rdesc) ++{ ++ ucs_trace_req("release receive descriptor %p", rdesc); ++ if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_UCT_DESC)) { ++ /* uct desc is slowpath */ ++ uct_iface_release_desc(UCS_PTR_BYTE_OFFSET(rdesc, ++ -(UCP_WORKER_HEADROOM_PRIV_SIZE - ++ rdesc->priv_length))); ++ } else { ++ ucs_mpool_put_inline(rdesc); ++ } ++} ++ + static UCS_F_ALWAYS_INLINE ucp_lane_index_t + ucp_send_request_get_next_am_bw_lane(ucp_request_t *req) + { +@@ -526,4 +542,13 @@ ucp_send_request_get_next_am_bw_lane(ucp_request_t *req) + } + } + ++static UCS_F_ALWAYS_INLINE uintptr_t ucp_request_get_dest_ep_ptr(ucp_request_t *req) ++{ ++ /* This function may return 0, but in such cases the message should not be ++ * sent at all because the am_lane would point to a wireup (proxy) endpoint. ++ * So only the receiver side has an assertion that ep_ptr != 0. ++ */ ++ return ucp_ep_dest_ep_ptr(req->send.ep); ++} ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_rkey.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_rkey.c +index 126031b21..98caba443 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_rkey.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_rkey.c +@@ -8,16 +8,15 @@ + #include "ucp_request.h" + #include "ucp_ep.inl" + ++#include + #include + #include + + +-static ucp_rkey_t ucp_mem_dummy_rkey = { +- // TODO cache? +- .md_map = 0 +-}; +- +-static ucp_md_map_t ucp_mem_dummy_buffer = 0; ++static struct { ++ ucp_md_map_t md_map; ++ uint8_t mem_type; ++} UCS_S_PACKED ucp_mem_dummy_buffer = {0, UCT_MD_MEM_TYPE_HOST}; + + + size_t ucp_rkey_packed_size(ucp_context_h context, ucp_md_map_t md_map) +@@ -26,6 +25,7 @@ size_t ucp_rkey_packed_size(ucp_context_h context, ucp_md_map_t md_map) + unsigned md_index; + + size = sizeof(ucp_md_map_t); ++ size += sizeof(uint8_t); + ucs_for_each_bit (md_index, md_map) { + md_size = context->tl_mds[md_index].attr.rkey_packed_size; + ucs_assert_always(md_size <= UINT8_MAX); +@@ -35,7 +35,8 @@ size_t ucp_rkey_packed_size(ucp_context_h context, ucp_md_map_t md_map) + } + + void ucp_rkey_packed_copy(ucp_context_h context, ucp_md_map_t md_map, +- void *rkey_buffer, const void* uct_rkeys[]) ++ uct_memory_type_t mem_type, void *rkey_buffer, ++ const void* uct_rkeys[]) + { + void *p = rkey_buffer; + unsigned md_index; +@@ -44,6 +45,8 @@ void ucp_rkey_packed_copy(ucp_context_h context, ucp_md_map_t md_map, + *(ucp_md_map_t*)p = md_map; + p += sizeof(ucp_md_map_t); + ++ *((uint8_t *)p++) = mem_type; ++ + ucs_for_each_bit(md_index, md_map) { + md_size = context->tl_mds[md_index].attr.rkey_packed_size; + ucs_assert_always(md_size <= UINT8_MAX); +@@ -55,7 +58,8 @@ void ucp_rkey_packed_copy(ucp_context_h context, ucp_md_map_t md_map, + } + + ssize_t ucp_rkey_pack_uct(ucp_context_h context, ucp_md_map_t md_map, +- const uct_mem_h *memh, void *rkey_buffer) ++ const uct_mem_h *memh, uct_memory_type_t mem_type, ++ void *rkey_buffer) + { + void *p = rkey_buffer; + ucs_status_t status = UCS_OK; +@@ -70,6 +74,10 @@ ssize_t ucp_rkey_pack_uct(ucp_context_h context, ucp_md_map_t md_map, + *(ucp_md_map_t*)p = md_map; + p += sizeof(ucp_md_map_t); + ++ /* Write memory type */ ++ UCS_STATIC_ASSERT(UCT_MD_MEM_TYPE_LAST <= 255); ++ *((uint8_t*)p++) = mem_type; ++ + /* Write both size and rkey_buffer for each UCT rkey */ + uct_memh_index = 0; + ucs_for_each_bit (md_index, md_map) { +@@ -100,6 +108,9 @@ ucs_status_t ucp_rkey_pack(ucp_context_h context, ucp_mem_h memh, + ssize_t packed_size; + size_t size; + ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(context, UCP_FEATURE_RMA | UCP_FEATURE_AMO, ++ return UCS_ERR_INVALID_PARAM); ++ + /* always acquire context lock */ + UCP_THREAD_CS_ENTER(&context->mt_lock); + +@@ -123,7 +134,8 @@ ucs_status_t ucp_rkey_pack(ucp_context_h context, ucp_mem_h memh, + + p = rkey_buffer; + +- packed_size = ucp_rkey_pack_uct(context, memh->md_map, memh->uct, p); ++ packed_size = ucp_rkey_pack_uct(context, memh->md_map, memh->uct, ++ memh->mem_type, p); + if (packed_size < 0) { + status = (ucs_status_t)packed_size; + goto err_destroy; +@@ -162,6 +174,7 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + unsigned md_count; + ucs_status_t status; + ucp_rkey_h rkey; ++ uct_memory_type_t mem_type; + uint8_t md_size; + const void *p; + +@@ -173,14 +186,8 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + ucs_trace("unpacking rkey with md_map 0x%lx", remote_md_map); + + /* MD map for the unpacked rkey */ +- md_map = remote_md_map & ucp_ep_config(ep)->key.reachable_md_map; +- if (md_map == 0) { +- /* Dummy key return ok */ +- *rkey_p = &ucp_mem_dummy_rkey; +- return UCS_OK; +- } +- +- md_count = ucs_count_one_bits(md_map); ++ md_map = remote_md_map & ucp_ep_config(ep)->key.reachable_md_map; ++ md_count = ucs_popcount(md_map); + p += sizeof(ucp_md_map_t); + + /* Allocate rkey handle which holds UCT rkeys for all remote MDs. Small key +@@ -200,7 +207,11 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + goto err; + } + ++ /* Read memory type */ ++ mem_type = *((uint8_t*)p++); ++ + rkey->md_map = md_map; ++ rkey->mem_type = mem_type; + + /* Unpack rkey of each UCT MD */ + remote_md_index = 0; /* Index of remote MD */ +@@ -221,23 +232,26 @@ ucs_status_t ucp_ep_rkey_unpack(ucp_ep_h ep, const void *rkey_buffer, + ucs_assert(rkey_index < md_count); + + status = uct_rkey_unpack(p, &rkey->uct[rkey_index]); +- if (status != UCS_OK) { ++ ++ if (status == UCS_OK) { ++ ucs_trace("rkey[%d] for remote md %d is 0x%lx", rkey_index, ++ remote_md_index, rkey->uct[rkey_index].rkey); ++ rkey->md_map |= UCS_BIT(remote_md_index); ++ ++rkey_index; ++ } else if (status == UCS_ERR_UNREACHABLE) { ++ rkey->md_map &= ~UCS_BIT(remote_md_index); ++ ucs_trace("rkey[%d] for remote md %d is 0x%lx not reachable", rkey_index, ++ remote_md_index, rkey->uct[rkey_index].rkey); ++ } else { + ucs_error("Failed to unpack remote key from remote md[%d]: %s", + remote_md_index, ucs_status_string(status)); + goto err_destroy; + } +- +- ucs_trace("rkey[%d] for remote md %d is 0x%lx", rkey_index, +- remote_md_index, rkey->uct[rkey_index].rkey); +- rkey->md_map |= UCS_BIT(remote_md_index); +- ++rkey_index; + } + + p += md_size; + } + +- ucs_assert(rkey_index == md_count); +- + ucp_rkey_resolve_inner(rkey, ep); + *rkey_p = rkey; + return UCS_OK; +@@ -263,6 +277,8 @@ void ucp_rkey_dump_packed(const void *rkey_buffer, char *buffer, size_t max) + md_map = *(ucp_md_map_t*)(rkey_buffer); + rkey_buffer += sizeof(ucp_md_map_t); + ++ rkey_buffer += sizeof(uint8_t); ++ + first = 1; + ucs_for_each_bit(md_index, md_map) { + md_size = *((uint8_t*)rkey_buffer); +@@ -293,11 +309,7 @@ ucs_status_t ucp_rkey_ptr(ucp_rkey_h rkey, uint64_t raddr, void **addr_p) + unsigned i; + ucs_status_t status; + +- if (rkey == &ucp_mem_dummy_rkey) { +- return UCS_ERR_UNREACHABLE; +- } +- +- num_rkeys = ucs_count_one_bits(rkey->md_map); ++ num_rkeys = ucs_popcount(rkey->md_map); + + for (i = 0; i < num_rkeys; ++i) { + status = uct_rkey_ptr(&rkey->uct[i], raddr, addr_p); +@@ -316,17 +328,13 @@ void ucp_rkey_destroy(ucp_rkey_h rkey) + unsigned num_rkeys; + unsigned i; + +- if (rkey == &ucp_mem_dummy_rkey) { +- return; +- } +- +- num_rkeys = ucs_count_one_bits(rkey->md_map); ++ num_rkeys = ucs_popcount(rkey->md_map); + + for (i = 0; i < num_rkeys; ++i) { + uct_rkey_release(&rkey->uct[i]); + } + +- if (ucs_count_one_bits(rkey->md_map) <= UCP_RKEY_MPOOL_MAX_MD) { ++ if (ucs_popcount(rkey->md_map) <= UCP_RKEY_MPOOL_MAX_MD) { + context = ucs_container_of(ucs_mpool_obj_owner(rkey), ucp_context_t, + rkey_mp); + UCP_THREAD_CS_ENTER_CONDITIONAL(&context->mt_lock); +@@ -339,6 +347,7 @@ void ucp_rkey_destroy(ucp_rkey_h rkey) + + static ucp_lane_index_t ucp_config_find_rma_lane(ucp_context_h context, + const ucp_ep_config_t *config, ++ uct_memory_type_t mem_type, + const ucp_lane_index_t *lanes, + ucp_rkey_h rkey, + ucp_lane_map_t ignore, +@@ -348,6 +357,7 @@ static ucp_lane_index_t ucp_config_find_rma_lane(ucp_context_h context, + ucp_lane_index_t lane; + ucp_md_map_t dst_md_mask; + ucp_md_index_t md_index; ++ uct_md_attr_t *md_attr; + uint8_t rkey_index; + int prio; + +@@ -360,19 +370,29 @@ static ucp_lane_index_t ucp_config_find_rma_lane(ucp_context_h context, + } + + md_index = config->md_index[lane]; ++ md_attr = &context->tl_mds[md_index].attr; ++ + if ((md_index != UCP_NULL_RESOURCE) && +- (!(context->tl_mds[md_index].attr.cap.flags & UCT_MD_FLAG_NEED_RKEY))) ++ (!(md_attr->cap.flags & UCT_MD_FLAG_NEED_RKEY))) + { + /* Lane does not need rkey, can use the lane with invalid rkey */ +- *uct_rkey_p = UCT_INVALID_RKEY; +- return lane; ++ if (!rkey || ((mem_type == md_attr->cap.mem_type) && ++ (mem_type == rkey->mem_type))) { ++ *uct_rkey_p = UCT_INVALID_RKEY; ++ return lane; ++ } ++ } ++ ++ if ((md_index != UCP_NULL_RESOURCE) && ++ (!(md_attr->cap.reg_mem_types & UCS_BIT(mem_type)))) { ++ continue; + } + + dst_md_index = config->key.lanes[lane].dst_md_index; + dst_md_mask = UCS_BIT(dst_md_index); + if (rkey->md_map & dst_md_mask) { + /* Return first matching lane */ +- rkey_index = ucs_count_one_bits(rkey->md_map & (dst_md_mask - 1)); ++ rkey_index = ucs_popcount(rkey->md_map & (dst_md_mask - 1)); + *uct_rkey_p = rkey->uct[rkey_index].rkey; + return lane; + } +@@ -385,34 +405,75 @@ void ucp_rkey_resolve_inner(ucp_rkey_h rkey, ucp_ep_h ep) + { + ucp_context_h context = ep->worker->context; + ucp_ep_config_t *config = ucp_ep_config(ep); ++ ucs_status_t status; + uct_rkey_t uct_rkey; ++ int rma_sw, amo_sw; + + rkey->cache.rma_lane = ucp_config_find_rma_lane(context, config, ++ UCT_MD_MEM_TYPE_HOST, + config->key.rma_lanes, rkey, + 0, &uct_rkey); +- if (rkey->cache.rma_lane != UCP_NULL_LANE) { ++ rma_sw = (rkey->cache.rma_lane == UCP_NULL_LANE); ++ if (rma_sw) { ++ rkey->cache.rma_proto = &ucp_rma_sw_proto; ++ rkey->cache.rma_rkey = UCT_INVALID_RKEY; ++ rkey->cache.max_put_short = 0; ++ } else { ++ rkey->cache.rma_proto = &ucp_rma_basic_proto; + rkey->cache.rma_rkey = uct_rkey; ++ rkey->cache.rma_proto = &ucp_rma_basic_proto; + rkey->cache.max_put_short = config->rma[rkey->cache.rma_lane].max_put_short; + } + + rkey->cache.amo_lane = ucp_config_find_rma_lane(context, config, ++ UCT_MD_MEM_TYPE_HOST, + config->key.amo_lanes, rkey, + 0, &uct_rkey); +- if (rkey->cache.amo_lane != UCP_NULL_LANE) { ++ amo_sw = (rkey->cache.amo_lane == UCP_NULL_LANE); ++ if (amo_sw) { ++ rkey->cache.amo_proto = &ucp_amo_sw_proto; ++ rkey->cache.amo_rkey = UCT_INVALID_RKEY; ++ } else { ++ rkey->cache.amo_proto = &ucp_amo_basic_proto; + rkey->cache.amo_rkey = uct_rkey; + } + ++ /* If we use sw rma/amo need to resolve destination endpoint in order to ++ * receive responses and completion messages ++ */ ++ if ((amo_sw || rma_sw) && (config->key.am_lane != UCP_NULL_LANE)) { ++ status = ucp_ep_resolve_dest_ep_ptr(ep, config->key.am_lane); ++ if (status != UCS_OK) { ++ ucs_debug("ep %p: failed to resolve destination ep, " ++ "sw rma cannot be used", ep); ++ } else { ++ /* if we can resolve destination ep, save the active message lane ++ * as the rma/amo lane in the rkey cache ++ */ ++ if (amo_sw) { ++ rkey->cache.amo_lane = config->key.am_lane; ++ } ++ if (rma_sw) { ++ rkey->cache.rma_lane = config->key.am_lane; ++ } ++ } ++ } ++ + rkey->cache.ep_cfg_index = ep->cfg_index; +- ucs_trace("rkey %p ep %p @ cfg[%d] rma_lane %d amo_lane %d", rkey, ep, +- ep->cfg_index, rkey->cache.rma_lane, rkey->cache.amo_lane); ++ ++ ucs_trace("rkey %p ep %p @ cfg[%d] %s lane %d %s lane %d", ++ rkey, ep, ep->cfg_index, ++ rkey->cache.rma_proto->name, rkey->cache.rma_lane, ++ rkey->cache.amo_proto->name, rkey->cache.amo_lane); + } + + ucp_lane_index_t ucp_rkey_get_rma_bw_lane(ucp_rkey_h rkey, ucp_ep_h ep, ++ uct_memory_type_t mem_type, + uct_rkey_t *uct_rkey_p, + ucp_lane_map_t ignore) + { + ucp_ep_config_t *config = ucp_ep_config(ep); +- return ucp_config_find_rma_lane(ep->worker->context, config, ++ return ucp_config_find_rma_lane(ep->worker->context, config, mem_type, + config->key.rma_bw_lanes, rkey, + ignore, uct_rkey_p); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_thread.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_thread.h +index 0bc22f11c..e5510bda0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_thread.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_thread.h +@@ -11,6 +11,8 @@ + # include "config.h" + #endif + ++#include ++#include + #include + + +@@ -98,4 +100,14 @@ typedef struct ucp_mt_lock { + } \ + } + ++ ++#ifdef ENABLE_ASSERT ++ ++/* Debug macro */ ++#define UCP_THREAD_CS_IS_RECURSIVELY_LOCKED(_lock_ptr) \ ++ (((_lock_ptr)->mt_type == UCP_MT_TYPE_MUTEX) ? 0 : \ ++ ucs_spin_is_owner(&((_lock_ptr)->lock.mt_spinlock), pthread_self())) ++ ++#endif ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_types.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_types.h +index 853cdf636..ae13821d6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_types.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_types.h +@@ -15,6 +15,7 @@ + + #define UCP_WORKER_NAME_MAX 32 /* Worker name for debugging */ + #define UCP_MIN_BCOPY 64 /* Minimal size for bcopy */ ++#define UCP_FEATURE_AMO (UCP_FEATURE_AMO32|UCP_FEATURE_AMO64) + + /* Resources */ + #define UCP_MAX_RESOURCES UINT8_MAX +@@ -26,24 +27,29 @@ typedef uint8_t ucp_rsc_index_t; + #define UCP_MD_INDEX_BITS 64 /* How many bits are in MD index */ + typedef ucp_rsc_index_t ucp_md_index_t; + #define UCP_MAX_MDS ucs_min(UCP_MD_INDEX_BITS, UCP_MAX_RESOURCES) +-#define UCP_MAX_OP_MDS 3 /* maximal number of MDs per single op */ ++#define UCP_MAX_OP_MDS 4 /* maximal number of MDs per single op */ + UCP_UINT_TYPE(UCP_MD_INDEX_BITS) ucp_md_map_t; + + /* Lanes */ +-#define UCP_MAX_LANES 8 ++#define UCP_MAX_LANES 6 + #define UCP_NULL_LANE ((ucp_lane_index_t)-1) + typedef uint8_t ucp_lane_index_t; +-UCP_UINT_TYPE(UCP_MAX_LANES) ucp_lane_map_t; ++typedef uint8_t ucp_lane_map_t; + ++/* Connection sequence number */ ++typedef uint16_t ucp_ep_conn_sn_t; + + /* Forward declarations */ + typedef struct ucp_request ucp_request_t; + typedef struct ucp_recv_desc ucp_recv_desc_t; + typedef struct ucp_address_iface_attr ucp_address_iface_attr_t; + typedef struct ucp_address_entry ucp_address_entry_t; ++typedef struct ucp_unpacked_address ucp_unpacked_address_t; + typedef struct ucp_wireup_ep ucp_wireup_ep_t; + typedef struct ucp_proto ucp_proto_t; + typedef struct ucp_worker_iface ucp_worker_iface_t; ++typedef struct ucp_rma_proto ucp_rma_proto_t; ++typedef struct ucp_amo_proto ucp_amo_proto_t; + + + /** +@@ -72,6 +78,13 @@ enum { + + UCP_AM_ID_RNDV_ATP = 16, /* Ack-to-put complete after finishing a put_zcopy */ + ++ UCP_AM_ID_PUT = 17, /* Remote memory write */ ++ UCP_AM_ID_GET_REQ = 18, /* Remote memory read request */ ++ UCP_AM_ID_GET_REP = 19, /* Remote memory read reply */ ++ UCP_AM_ID_ATOMIC_REQ = 20, /* Remote memory atomic request */ ++ UCP_AM_ID_ATOMIC_REP = 21, /* Remote memory atomic reply */ ++ UCP_AM_ID_CMPL = 22, /* Remote memory operation completion */ ++ + UCP_AM_ID_LAST + }; + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.c +index 9bdf66fc4..d94ed3bef 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -21,6 +22,11 @@ + #include + #include + ++ ++#define UCP_WORKER_HEADROOM_SIZE \ ++ (sizeof(ucp_recv_desc_t) + UCP_WORKER_HEADROOM_PRIV_SIZE) ++ ++ + #if ENABLE_STATS + static ucs_stats_class_t ucp_worker_stats_class = { + .name = "ucp_worker", +@@ -128,7 +134,7 @@ static void ucp_worker_set_am_handlers(ucp_worker_iface_t *wiface, int is_proxy) + continue; + } + +- if ((ucp_am_handlers[am_id].flags & UCT_CB_FLAG_SYNC) && ++ if (!(ucp_am_handlers[am_id].flags & UCT_CB_FLAG_ASYNC) && + !(wiface->attr.cap.flags & UCT_IFACE_FLAG_CB_SYNC)) + { + /* Do not register a sync callback on interface which does not +@@ -142,7 +148,7 @@ static void ucp_worker_set_am_handlers(ucp_worker_iface_t *wiface, int is_proxy) + /* we care only about sync active messages, and this also makes sure + * the counter is not accessed from another thread. + */ +- ucs_assert(ucp_am_handlers[am_id].flags & UCT_CB_FLAG_SYNC); ++ ucs_assert(!(ucp_am_handlers[am_id].flags & UCT_CB_FLAG_ASYNC)); + status = uct_iface_set_am_handler(wiface->iface, am_id, + ucp_am_handlers[am_id].proxy_cb, + wiface, +@@ -341,41 +347,23 @@ void ucp_worker_signal_internal(ucp_worker_h worker) + } + } + +-static ucs_status_t +-ucp_worker_iface_error_handler(void *arg, uct_ep_h uct_ep, ucs_status_t status) ++static unsigned ucp_worker_iface_err_handle_progress(void *arg) + { +- ucp_worker_h worker = (ucp_worker_h)arg; +- ucp_ep_h ucp_ep = NULL; +- uct_tl_resource_desc_t* tl_rsc; +- uint64_t dest_uuid UCS_V_UNUSED; +- khiter_t ucp_ep_errh_iter; +- ucp_err_handler_cb_t err_cb; +- ucp_lane_index_t lane, failed_lane; +- ucp_rsc_index_t rsc_index; ++ ucp_worker_err_handle_arg_t *err_handle_arg = arg; ++ ucp_worker_h worker = err_handle_arg->worker; ++ ucp_ep_h ucp_ep = err_handle_arg->ucp_ep; ++ uct_ep_h uct_ep = err_handle_arg->uct_ep; ++ ucs_status_t status = err_handle_arg->status; ++ ucp_lane_index_t failed_lane = err_handle_arg->failed_lane; ++ ucp_lane_index_t lane; ++ ucp_ep_config_key_t key; + +- /* TODO: need to optimize uct_ep -> ucp_ep lookup */ +- kh_foreach(&worker->ep_hash, dest_uuid, ucp_ep, { +- for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { +- if ((uct_ep == ucp_ep->uct_eps[lane]) || +- ucp_wireup_ep_is_owner(ucp_ep->uct_eps[lane], uct_ep)) { +- failed_lane = lane; +- goto found_ucp_ep; +- } +- } +- }); ++ UCS_ASYNC_BLOCK(&worker->async); + +- ucs_fatal("no uct_ep_h %p associated with ucp_ep_h on ucp_worker_h %p", +- uct_ep, worker); ++ ucs_debug("ep %p: handle error on lane[%d]=%p: %s", ++ ucp_ep, failed_lane, uct_ep, ucs_status_string(status)); + +-found_ucp_ep: +- if (ucp_ep_config(ucp_ep)->key.err_mode == UCP_ERR_HANDLING_MODE_NONE) { +- /* NOTE: if user has not requested error handling on the endpoint, +- * the failure is considered unhandled */ +- return status; +- } +- +- rsc_index = ucp_ep_get_rsc_index(ucp_ep, lane); +- tl_rsc = &worker->context->tl_rscs[rsc_index].tl_rsc; ++ ucs_assert(ucp_ep->flags & UCP_EP_FLAG_FAILED); + + /* Destroy all lanes except failed one since ucp_ep becomes unusable as well */ + for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { +@@ -398,7 +386,7 @@ found_ucp_ep: + } + + /* Move failed lane to index 0 */ +- if (failed_lane != 0) { ++ if ((failed_lane != 0) && (failed_lane != UCP_NULL_LANE)) { + ucp_ep->uct_eps[0] = ucp_ep->uct_eps[failed_lane]; + ucp_ep->uct_eps[failed_lane] = NULL; + } +@@ -415,7 +403,7 @@ found_ucp_ep: + } + + /* Redirect all lanes to failed one */ +- ucp_ep_config_key_t key = ucp_ep_config(ucp_ep)->key; ++ key = ucp_ep_config(ucp_ep)->key; + key.am_lane = 0; + key.wireup_lane = 0; + key.tag_lane = 0; +@@ -427,23 +415,137 @@ found_ucp_ep: + key.status = status; + + ucp_ep->cfg_index = ucp_worker_get_ep_config(worker, &key); +- ucp_ep->flags |= UCP_EP_FLAG_FAILED; + ucp_ep->am_lane = 0; + +- ucp_ep_errh_iter = kh_get(ucp_ep_errh_hash, &worker->ep_errh_hash, +- (uintptr_t)ucp_ep); +- if (ucp_ep_errh_iter == kh_end(&worker->ep_errh_hash)) { +- ucs_error("Error %s was not handled for ep %p - " +- UCT_TL_RESOURCE_DESC_FMT, +- ucs_status_string(status), ucp_ep, +- UCT_TL_RESOURCE_DESC_ARG(tl_rsc)); +- return status; ++ if (ucp_ep_ext_gen(ucp_ep)->err_cb != NULL) { ++ ucs_assert(ucp_ep->flags & UCP_EP_FLAG_USED); ++ ucs_debug("ep %p: calling user error callback %p with arg %p", ucp_ep, ++ ucp_ep_ext_gen(ucp_ep)->err_cb, ucp_ep_ext_gen(ucp_ep)->user_data); ++ ucp_ep_ext_gen(ucp_ep)->err_cb(ucp_ep_ext_gen(ucp_ep)->user_data, ucp_ep, ++ status); ++ } else if (!(ucp_ep->flags & UCP_EP_FLAG_USED)) { ++ ucs_debug("ep %p: destroy internal endpoint due to peer failure", ucp_ep); ++ ucp_ep_disconnected(ucp_ep, 1); + } + +- err_cb = kh_val(&worker->ep_errh_hash, ucp_ep_errh_iter); +- err_cb(ucp_ep->user_data, ucp_ep, status); ++ ucs_free(err_handle_arg); ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ return 1; ++} ++ ++int ucp_worker_err_handle_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg) ++{ ++ ucp_worker_err_handle_arg_t *err_handle_arg = elem->arg; + +- return UCS_OK; ++ return (elem->cb == ucp_worker_iface_err_handle_progress) && ++ (err_handle_arg->ucp_ep == arg); ++} ++ ++ucs_status_t ucp_worker_set_ep_failed(ucp_worker_h worker, ucp_ep_h ucp_ep, ++ uct_ep_h uct_ep, ucp_lane_index_t lane, ++ ucs_status_t status) ++{ ++ uct_worker_cb_id_t prog_id = UCS_CALLBACKQ_ID_NULL; ++ ucs_status_t ret_status = UCS_OK; ++ ucp_rsc_index_t rsc_index; ++ uct_tl_resource_desc_t *tl_rsc; ++ ucp_worker_err_handle_arg_t *err_handle_arg; ++ ++ if (ucp_ep->flags & UCP_EP_FLAG_FAILED) { ++ goto out_ok; ++ } ++ ++ /* set endpoint to failed to prevent wireup_ep switch */ ++ ucp_ep->flags |= UCP_EP_FLAG_FAILED; ++ ++ if (ucp_ep_config(ucp_ep)->key.err_mode == UCP_ERR_HANDLING_MODE_NONE) { ++ /* NOTE: if user has not requested error handling on the endpoint, ++ * the failure is considered unhandled */ ++ ret_status = status; ++ goto out; ++ } ++ ++ err_handle_arg = ucs_malloc(sizeof(*err_handle_arg), "ucp_worker_err_handle_arg"); ++ if (err_handle_arg == NULL) { ++ ucs_error("failed to allocate ucp_worker_err_handle_arg"); ++ ret_status = UCS_ERR_NO_MEMORY; ++ goto out; ++ } ++ ++ err_handle_arg->worker = worker; ++ err_handle_arg->ucp_ep = ucp_ep; ++ err_handle_arg->uct_ep = uct_ep; ++ err_handle_arg->status = status; ++ err_handle_arg->failed_lane = lane; ++ ++ /* invoke the rest of the error handling flow from the main thread */ ++ uct_worker_progress_register_safe(worker->uct, ++ ucp_worker_iface_err_handle_progress, ++ err_handle_arg, UCS_CALLBACKQ_FLAG_ONESHOT, ++ &prog_id); ++ ++ if ((ucp_ep_ext_gen(ucp_ep)->err_cb == NULL) && ++ (ucp_ep->flags & UCP_EP_FLAG_USED)) { ++ if (lane != UCP_NULL_LANE) { ++ rsc_index = ucp_ep_get_rsc_index(ucp_ep, lane); ++ tl_rsc = &worker->context->tl_rscs[rsc_index].tl_rsc; ++ ucs_error("error '%s' will not be handled for ep %p - " ++ UCT_TL_RESOURCE_DESC_FMT, ucs_status_string(status), ucp_ep, ++ UCT_TL_RESOURCE_DESC_ARG(tl_rsc)); ++ } else { ++ ucs_assert(uct_ep == NULL); ++ ucs_error("error '%s' occurred on wireup will not be handled for ep %p", ++ ucs_status_string(status), ucp_ep); ++ } ++ ret_status = status; ++ goto out; ++ } ++ ++out_ok: ++ ret_status = UCS_OK; ++ ++out: ++ /* If the worker supports the UCP_FEATURE_WAKEUP feature, signal the user so ++ * that he can wake-up on this event */ ++ ucp_worker_signal_internal(worker); ++ ++ return ret_status; ++} ++ ++static ucs_status_t ++ucp_worker_iface_error_handler(void *arg, uct_ep_h uct_ep, ucs_status_t status) ++{ ++ ucp_worker_h worker = (ucp_worker_h)arg; ++ ucp_lane_index_t lane; ++ ucs_status_t ret_status; ++ ucp_ep_ext_gen_t *ep_ext; ++ ucp_ep_h ucp_ep; ++ ++ UCS_ASYNC_BLOCK(&worker->async); ++ ++ ucs_debug("worker %p: error handler called for uct_ep %p: %s", ++ worker, uct_ep, ucs_status_string(status)); ++ ++ /* TODO: need to optimize uct_ep -> ucp_ep lookup */ ++ ucs_list_for_each(ep_ext, &worker->all_eps, ep_list) { ++ ucp_ep = ucp_ep_from_ext_gen(ep_ext); ++ for (lane = 0; lane < ucp_ep_num_lanes(ucp_ep); ++lane) { ++ if ((uct_ep == ucp_ep->uct_eps[lane]) || ++ ucp_wireup_ep_is_owner(ucp_ep->uct_eps[lane], uct_ep)) { ++ ret_status = ucp_worker_set_ep_failed(worker, ucp_ep, uct_ep, ++ lane, status); ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ return ret_status; ++ } ++ } ++ } ++ ++ ucs_error("no uct_ep_h %p associated with ucp_ep_h on ucp_worker_h %p", ++ uct_ep, worker); ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ ++ return UCS_ERR_NO_ELEM; + } + + void ucp_worker_iface_activate(ucp_worker_iface_t *wiface, unsigned uct_flags) +@@ -451,8 +553,8 @@ void ucp_worker_iface_activate(ucp_worker_iface_t *wiface, unsigned uct_flags) + ucp_worker_h worker = wiface->worker; + ucs_status_t status; + +- ucs_trace("activate iface %p acount=%u", wiface->iface, +- wiface->activate_count); ++ ucs_trace("activate iface %p acount=%u aifaces=%u", wiface->iface, ++ wiface->activate_count, worker->num_active_ifaces); + + if (wiface->activate_count++ > 0) { + return; /* was already activated */ +@@ -472,20 +574,24 @@ void ucp_worker_iface_activate(ucp_worker_iface_t *wiface, unsigned uct_flags) + ucs_list_add_tail(&worker->arm_ifaces, &wiface->arm_list); + } + ++ ++worker->num_active_ifaces; ++ + uct_iface_progress_enable(wiface->iface, + UCT_PROGRESS_SEND | UCT_PROGRESS_RECV | uct_flags); + } + + static void ucp_worker_iface_deactivate(ucp_worker_iface_t *wiface, int force) + { +- ucs_trace("deactivate iface %p force=%d acount=%u", wiface->iface, force, +- wiface->activate_count); ++ ucs_trace("deactivate iface %p force=%d acount=%u aifaces=%u", ++ wiface->iface, force, wiface->activate_count, ++ wiface->worker->num_active_ifaces); + + if (!force) { + ucs_assert(wiface->activate_count > 0); + if (--wiface->activate_count > 0) { + return; /* not completely deactivated yet */ + } ++ --wiface->worker->num_active_ifaces; + } + + /* Avoid progress on the interface to reduce overhead */ +@@ -693,11 +799,6 @@ static void ucp_worker_close_ifaces(ucp_worker_h worker) + UCS_ASYNC_UNBLOCK(&worker->async); + } + +-static size_t ucp_worker_rx_headroom(ucp_worker_h worker) +-{ +- return sizeof(ucp_recv_desc_t) + sizeof(ucp_eager_sync_hdr_t); +-} +- + ucs_status_t ucp_worker_iface_init(ucp_worker_h worker, ucp_rsc_index_t tl_id, + uct_iface_params_t *iface_params, + ucp_worker_iface_t *wiface) +@@ -729,15 +830,18 @@ ucs_status_t ucp_worker_iface_init(ucp_worker_h worker, ucp_rsc_index_t tl_id, + return status; + } + ++ UCS_STATIC_ASSERT(UCP_WORKER_HEADROOM_PRIV_SIZE >= sizeof(ucp_eager_sync_hdr_t)); ++ + /* Fill rest of uct_iface params (caller should fill specific mode fields) */ +- iface_params->stats_root = UCS_STATS_RVAL(worker->stats); +- iface_params->rx_headroom = ucp_worker_rx_headroom(worker); +- iface_params->err_handler_arg = worker; +- iface_params->err_handler = ucp_worker_iface_error_handler; +- iface_params->eager_arg = iface_params->rndv_arg = wiface; +- iface_params->eager_cb = ucp_tag_offload_unexp_eager; +- iface_params->rndv_cb = ucp_tag_offload_unexp_rndv; +- iface_params->cpu_mask = worker->cpu_mask; ++ iface_params->stats_root = UCS_STATS_RVAL(worker->stats); ++ iface_params->rx_headroom = UCP_WORKER_HEADROOM_SIZE; ++ iface_params->err_handler_arg = worker; ++ iface_params->err_handler = ucp_worker_iface_error_handler; ++ iface_params->err_handler_flags = UCT_CB_FLAG_ASYNC; ++ iface_params->eager_arg = iface_params->rndv_arg = wiface; ++ iface_params->eager_cb = ucp_tag_offload_unexp_eager; ++ iface_params->rndv_cb = ucp_tag_offload_unexp_rndv; ++ iface_params->cpu_mask = worker->cpu_mask; + + /* Open UCT interface */ + status = uct_iface_open(md, worker->uct, iface_params, iface_config, +@@ -749,8 +853,8 @@ ucs_status_t ucp_worker_iface_init(ucp_worker_h worker, ucp_rsc_index_t tl_id, + } + + ucs_debug("created interface[%d]=%p using "UCT_TL_RESOURCE_DESC_FMT" on worker %p", +- tl_id, wiface->iface, UCT_TL_RESOURCE_DESC_ARG(&resource->tl_rsc), +- worker); ++ tl_id, wiface->iface, UCT_TL_RESOURCE_DESC_ARG(&resource->tl_rsc), ++ worker); + + VALGRIND_MAKE_MEM_UNDEFINED(&wiface->attr, sizeof(wiface->attr)); + status = uct_iface_query(wiface->iface, &wiface->attr); +@@ -842,6 +946,8 @@ static void ucp_worker_init_cpu_atomics(ucp_worker_h worker) + ucp_context_h context = worker->context; + ucp_rsc_index_t rsc_index; + ++ ucs_debug("worker %p: using cpu atomics", worker); ++ + /* Enable all interfaces which have host-based atomics */ + for (rsc_index = 0; rsc_index < context->num_tls; ++rsc_index) { + if (worker->ifaces[rsc_index].attr.cap.flags & UCT_IFACE_FLAG_ATOMIC_CPU) { +@@ -863,9 +969,11 @@ static void ucp_worker_init_device_atomics(ucp_worker_h worker) + uct_md_attr_t *md_attr; + uint64_t supp_tls; + uint8_t priority, best_priority; ++ ucp_tl_iface_atomic_flags_t atomic; ++ ++ ucp_context_uct_atomic_iface_flags(context, &atomic); + +- iface_cap_flags = ucp_context_uct_atomic_iface_flags(context) | +- UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ iface_cap_flags = UCT_IFACE_FLAG_ATOMIC_DEVICE; + + dummy_iface_attr.bandwidth = 1e12; + dummy_iface_attr.cap_flags = -1; +@@ -886,7 +994,11 @@ static void ucp_worker_init_device_atomics(ucp_worker_h worker) + iface_attr = &worker->ifaces[rsc_index].attr; + + if (!(md_attr->cap.flags & UCT_MD_FLAG_REG) || +- !ucs_test_all_flags(iface_attr->cap.flags, iface_cap_flags)) ++ !ucs_test_all_flags(iface_attr->cap.flags, iface_cap_flags) || ++ !ucs_test_all_flags(iface_attr->cap.atomic32.op_flags, atomic.atomic32.op_flags) || ++ !ucs_test_all_flags(iface_attr->cap.atomic32.fop_flags, atomic.atomic32.fop_flags) || ++ !ucs_test_all_flags(iface_attr->cap.atomic64.op_flags, atomic.atomic64.op_flags) || ++ !ucs_test_all_flags(iface_attr->cap.atomic64.fop_flags, atomic.atomic64.fop_flags)) + { + continue; + } +@@ -910,6 +1022,8 @@ static void ucp_worker_init_device_atomics(ucp_worker_h worker) + return; + } + ++ ucs_debug("worker %p: using device atomics", worker); ++ + /* Enable atomics on all resources using same device as the "best" resource */ + for (rsc_index = 0; rsc_index < context->num_tls; ++rsc_index) { + rsc = &context->tl_rscs[rsc_index]; +@@ -946,7 +1060,7 @@ static void ucp_worker_init_atomic_tls(ucp_worker_h worker) + + worker->atomic_tls = 0; + +- if (context->config.features & (UCP_FEATURE_AMO32|UCP_FEATURE_AMO64)) { ++ if (context->config.features & UCP_FEATURE_AMO) { + switch(context->config.ext.atomic_mode) { + case UCP_ATOMIC_MODE_CPU: + ucp_worker_init_cpu_atomics(worker); +@@ -966,7 +1080,6 @@ static void ucp_worker_init_atomic_tls(ucp_worker_h worker) + + static ucs_status_t ucp_worker_init_mpools(ucp_worker_h worker) + { +- size_t rx_headroom = ucp_worker_rx_headroom(worker); + size_t max_mp_entry_size = 0; + ucp_context_t *context = worker->context; + uct_iface_attr_t *if_attr; +@@ -984,7 +1097,7 @@ static ucs_status_t ucp_worker_init_mpools(ucp_worker_h worker) + } + + status = ucs_mpool_init(&worker->am_mp, 0, +- max_mp_entry_size + rx_headroom, ++ max_mp_entry_size + UCP_WORKER_HEADROOM_SIZE, + 0, UCS_SYS_CACHE_LINE_SIZE, 128, UINT_MAX, + &ucp_am_mpool_ops, "ucp_am_bufs"); + if (status != UCS_OK) { +@@ -1000,9 +1113,9 @@ static ucs_status_t ucp_worker_init_mpools(ucp_worker_h worker) + } + + status = ucs_mpool_init(&worker->rndv_frag_mp, 0, +- context->config.ext.rndv_frag_size, +- 0, UCS_SYS_CACHE_LINE_SIZE, 128, UINT_MAX, +- &ucp_frag_mpool_ops, "ucp_rndv_frags"); ++ context->config.ext.rndv_frag_size + sizeof(ucp_mem_desc_t), ++ sizeof(ucp_mem_desc_t), UCS_SYS_CACHE_LINE_SIZE, 128, ++ UINT_MAX, &ucp_frag_mpool_ops, "ucp_rndv_frags"); + if (status != UCS_OK) { + goto err_release_reg_mpool; + } +@@ -1057,11 +1170,12 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + const ucp_worker_params_t *params, + ucp_worker_h *worker_p) + { +- ucp_worker_h worker; +- ucs_status_t status; ++ ucs_thread_mode_t uct_thread_mode; ++ ucs_thread_mode_t thread_mode; + unsigned config_count; + unsigned name_length; +- ucs_thread_mode_t thread_mode; ++ ucp_worker_h worker; ++ ucs_status_t status; + + config_count = ucs_min((context->num_tls + 1) * (context->num_tls + 1) * context->num_tls, + UINT8_MAX); +@@ -1074,7 +1188,14 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + } + + if (params->field_mask & UCP_WORKER_PARAM_FIELD_THREAD_MODE) { ++#if !ENABLE_MT ++ thread_mode = UCS_THREAD_MODE_SINGLE; ++ if (params->thread_mode != UCS_THREAD_MODE_SINGLE) { ++ ucs_debug("forced single thread mode on worker create"); ++ } ++#else + thread_mode = params->thread_mode; ++#endif + } else { + thread_mode = UCS_THREAD_MODE_SINGLE; + } +@@ -1087,17 +1208,35 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + worker->mt_lock.mt_type = UCP_MT_TYPE_SPINLOCK; + } + ++ if (thread_mode == UCS_THREAD_MODE_SINGLE) { ++ uct_thread_mode = UCS_THREAD_MODE_SINGLE; ++ } else { ++ /* UCT is serialized by UCP lock or by UCP user */ ++ uct_thread_mode = UCS_THREAD_MODE_SERIALIZED; ++ } ++ + UCP_THREAD_LOCK_INIT(&worker->mt_lock); + + worker->context = context; + worker->uuid = ucs_generate_uuid((uintptr_t)worker); +- worker->wireup_pend_count = 0; ++ worker->flush_ops_count = 0; + worker->flags = 0; + worker->inprogress = 0; + worker->ep_config_max = config_count; + worker->ep_config_count = 0; ++ worker->num_active_ifaces = 0; + ucs_list_head_init(&worker->arm_ifaces); +- ucs_list_head_init(&worker->stream_eps); ++ ucs_list_head_init(&worker->stream_ready_eps); ++ ucs_list_head_init(&worker->all_eps); ++ ucp_ep_match_init(&worker->ep_match_ctx); ++ ++ UCS_STATIC_ASSERT(sizeof(ucp_ep_ext_gen_t) <= sizeof(ucp_ep_t)); ++ if (context->config.features & UCP_FEATURE_STREAM) { ++ UCS_STATIC_ASSERT(sizeof(ucp_ep_ext_proto_t) <= sizeof(ucp_ep_t)); ++ ucs_strided_alloc_init(&worker->ep_alloc, sizeof(ucp_ep_t), 3); ++ } else { ++ ucs_strided_alloc_init(&worker->ep_alloc, sizeof(ucp_ep_t), 2); ++ } + + if (params->field_mask & UCP_WORKER_PARAM_FIELD_USER_DATA) { + worker->user_data = params->user_data; +@@ -1110,9 +1249,6 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + ucs_snprintf_zero(worker->name, name_length, "%s:%d", ucs_get_host_name(), + getpid()); + +- kh_init_inplace(ucp_worker_ep_hash, &worker->ep_hash); +- kh_init_inplace(ucp_ep_errh_hash, &worker->ep_errh_hash); +- + worker->ifaces = ucs_calloc(context->num_tls, sizeof(ucp_worker_iface_t), + "ucp iface"); + if (worker->ifaces == NULL) { +@@ -1140,7 +1276,7 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + } + + /* Create the underlying UCT worker */ +- status = uct_worker_create(&worker->async, thread_mode, &worker->uct); ++ status = uct_worker_create(&worker->async, uct_thread_mode, &worker->uct); + if (status != UCS_OK) { + goto err_destroy_async; + } +@@ -1193,6 +1329,11 @@ ucs_status_t ucp_worker_create(ucp_context_h context, + /* Select atomic resources */ + ucp_worker_init_atomic_tls(worker); + ++ /* At this point all UCT memory domains and interfaces are already created ++ * so warn about unused environment variables. ++ */ ++ ucs_config_parser_warn_unused_env_vars(); ++ + *worker_p = worker; + return UCS_OK; + +@@ -1214,6 +1355,7 @@ err_free_stats: + err_free_ifaces: + ucs_free(worker->ifaces); + err_free: ++ ucs_strided_alloc_cleanup(&worker->ep_alloc); + UCP_THREAD_LOCK_FINALIZE(&worker->mt_lock); + ucs_free(worker); + return status; +@@ -1221,17 +1363,23 @@ err_free: + + static void ucp_worker_destroy_eps(ucp_worker_h worker) + { +- ucp_ep_h ep; ++ ucp_ep_ext_gen_t *ep_ext, *tmp; + + ucs_debug("worker %p: destroy all endpoints", worker); +- kh_foreach_value(&worker->ep_hash, ep, ucp_ep_destroy_internal(ep)); ++ ucs_list_for_each_safe(ep_ext, tmp, &worker->all_eps, ep_list) { ++ ucp_ep_disconnected(ucp_ep_from_ext_gen(ep_ext), 1); ++ } + } + + void ucp_worker_destroy(ucp_worker_h worker) + { + ucs_trace_func("worker=%p", worker); +- ucp_worker_remove_am_handlers(worker); ++ ++ UCS_ASYNC_BLOCK(&worker->async); + ucp_worker_destroy_eps(worker); ++ ucp_worker_remove_am_handlers(worker); ++ UCS_ASYNC_UNBLOCK(&worker->async); ++ + ucs_mpool_cleanup(&worker->am_mp, 1); + ucs_mpool_cleanup(&worker->reg_mp, 1); + ucs_mpool_cleanup(&worker->rndv_frag_mp, 1); +@@ -1242,8 +1390,8 @@ void ucp_worker_destroy(ucp_worker_h worker) + uct_worker_destroy(worker->uct); + ucs_async_context_cleanup(&worker->async); + ucs_free(worker->ifaces); +- kh_destroy_inplace(ucp_worker_ep_hash, &worker->ep_hash); +- kh_destroy_inplace(ucp_ep_errh_hash, &worker->ep_errh_hash); ++ ucp_ep_match_cleanup(&worker->ep_match_ctx); ++ ucs_strided_alloc_cleanup(&worker->ep_alloc); + UCP_THREAD_LOCK_FINALIZE(&worker->mt_lock); + UCS_STATS_NODE_FREE(worker->tm_offload_stats); + UCS_STATS_NODE_FREE(worker->stats); +@@ -1271,8 +1419,9 @@ unsigned ucp_worker_progress(ucp_worker_h worker) + /* worker->inprogress is used only for assertion check. + * coverity[assert_side_effect] + */ +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + ++ /* check that ucp_worker_progress is not called from within ucp_worker_progress */ + ucs_assert(worker->inprogress++ == 0); + count = uct_worker_progress(worker->uct); + ucs_async_check_miss(&worker->async); +@@ -1280,7 +1429,7 @@ unsigned ucp_worker_progress(ucp_worker_h worker) + /* coverity[assert_side_effect] */ + ucs_assert(--worker->inprogress == 0); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return count; + } +@@ -1289,19 +1438,24 @@ ssize_t ucp_stream_worker_poll(ucp_worker_h worker, + ucp_stream_poll_ep_t *poll_eps, + size_t max_eps, unsigned flags) + { +- ucp_ep_ext_stream_t *ep; +- ssize_t count = 0; ++ ssize_t count = 0; ++ ucp_ep_ext_proto_t *ep_ext; ++ ucp_ep_h ep; ++ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_STREAM, ++ return UCS_ERR_INVALID_PARAM); + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + +- while ((count < max_eps) && !ucs_list_is_empty(&worker->stream_eps)) { +- ep = ucp_stream_worker_dequeue_ep_head(worker); +- poll_eps[count].ep = ep->ucp_ep; +- poll_eps[count].user_data = ep->ucp_ep->user_data; ++ while ((count < max_eps) && !ucs_list_is_empty(&worker->stream_ready_eps)) { ++ ep_ext = ucp_stream_worker_dequeue_ep_head(worker); ++ ep = ucp_ep_from_ext_proto(ep_ext); ++ poll_eps[count].ep = ep; ++ poll_eps[count].user_data = ucp_ep_ext_gen(ep)->user_data; + ++count; + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return count; + } +@@ -1310,14 +1464,17 @@ ucs_status_t ucp_worker_get_efd(ucp_worker_h worker, int *fd) + { + ucs_status_t status; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_WAKEUP, ++ return UCS_ERR_INVALID_PARAM); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + if (worker->flags & UCP_WORKER_FLAG_EXTERNAL_EVENT_FD) { + status = UCS_ERR_UNSUPPORTED; + } else { + *fd = worker->epfd; + status = UCS_OK; + } +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } + +@@ -1330,6 +1487,9 @@ ucs_status_t ucp_worker_arm(ucp_worker_h worker) + + ucs_trace_func("worker=%p", worker); + ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_WAKEUP, ++ return UCS_ERR_INVALID_PARAM); ++ + /* Read from event pipe. If some events are found, return BUSY, + * Otherwise, continue to arm the transport interfaces. + */ +@@ -1351,7 +1511,7 @@ ucs_status_t ucp_worker_arm(ucp_worker_h worker) + } + } while (ret != 0); + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + /* Go over arm_list of active interfaces which support events and arm them */ + ucs_list_for_each(wiface, &worker->arm_ifaces, arm_list) { +@@ -1367,7 +1527,7 @@ ucs_status_t ucp_worker_arm(ucp_worker_h worker) + status = UCS_OK; + + out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + out: + ucs_trace("ucp_worker_arm returning %s", ucs_status_string(status)); + return status; +@@ -1375,7 +1535,7 @@ out: + + void ucp_worker_wait_mem(ucp_worker_h worker, void *address) + { +- ucs_arch_wait_mem(address); ++ ucs_arch_wait_mem(address); + } + + ucs_status_t ucp_worker_wait(ucp_worker_h worker) +@@ -1388,7 +1548,10 @@ ucs_status_t ucp_worker_wait(ucp_worker_h worker) + + ucs_trace_func("worker %p", worker); + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_WAKEUP, ++ return UCS_ERR_INVALID_PARAM); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + status = ucp_worker_arm(worker); + if (status == UCS_ERR_BUSY) { /* if UCS_ERR_BUSY returned - no poll() must called */ +@@ -1429,21 +1592,16 @@ ucs_status_t ucp_worker_wait(ucp_worker_h worker) + } + + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } + + ucs_status_t ucp_worker_signal(ucp_worker_h worker) + { +- ucs_status_t status; +- + ucs_trace_func("worker %p", worker); +- +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); +- status = ucp_worker_wakeup_signal_fd(worker); +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); +- +- return status; ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_WAKEUP, ++ return UCS_ERR_INVALID_PARAM); ++ return ucp_worker_wakeup_signal_fd(worker); + } + + ucs_status_t ucp_worker_get_address(ucp_worker_h worker, ucp_address_t **address_p, +@@ -1451,12 +1609,12 @@ ucs_status_t ucp_worker_get_address(ucp_worker_h worker, ucp_address_t **address + { + ucs_status_t status; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + status = ucp_address_pack(worker, NULL, -1, NULL, address_length_p, + (void**)address_p); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return status; + } +@@ -1466,47 +1624,6 @@ void ucp_worker_release_address(ucp_worker_h worker, ucp_address_t *address) + ucs_free(address); + } + +-ucp_ep_h ucp_worker_get_reply_ep(ucp_worker_h worker, uint64_t dest_uuid) +-{ +- ucs_status_t status; +- ucp_ep_h ep; +- +- UCS_ASYNC_BLOCK(&worker->async); +- +- ep = ucp_worker_ep_find(worker, dest_uuid); +- if (ep == NULL) { +- status = ucp_ep_create_stub(worker, dest_uuid, NULL, "??", +- "for-sending-reply", &ep); +- if (status != UCS_OK) { +- goto err; +- } +- ep->flags |= UCP_EP_FLAG_DEST_UUID_PEER; +- } else { +- ucs_debug("found reply ep %p to uuid %"PRIx64, ep, dest_uuid); +- } +- +- UCS_ASYNC_UNBLOCK(&worker->async); +- return ep; +- +-err: +- UCS_ASYNC_UNBLOCK(&worker->async); +- ucs_fatal("failed to create reply endpoint: %s", ucs_status_string(status)); +-} +- +-ucp_request_t *ucp_worker_allocate_reply(ucp_worker_h worker, uint64_t dest_uuid) +-{ +- ucp_request_t *req; +- +- req = ucp_request_get(worker); +- if (req == NULL) { +- ucs_fatal("could not allocate request"); +- } +- +- req->flags = 0; +- req->send.ep = ucp_worker_get_reply_ep(worker, dest_uuid); +- req->send.mdesc = NULL; +- return req; +-} + + void ucp_worker_print_info(ucp_worker_h worker, FILE *stream) + { +@@ -1517,7 +1634,7 @@ void ucp_worker_print_info(ucp_worker_h worker, FILE *stream) + ucp_rsc_index_t rsc_index; + int first; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + fprintf(stream, "#\n"); + fprintf(stream, "# UCP worker '%s'\n", ucp_worker_get_name(worker)); +@@ -1531,7 +1648,7 @@ void ucp_worker_print_info(ucp_worker_h worker, FILE *stream) + fprintf(stream, "# \n"); + } + +- if (context->config.features & (UCP_FEATURE_AMO32|UCP_FEATURE_AMO64)) { ++ if (context->config.features & UCP_FEATURE_AMO) { + fprintf(stream, "# atomics: "); + first = 1; + for (rsc_index = 0; rsc_index < worker->context->num_tls; ++rsc_index) { +@@ -1549,5 +1666,5 @@ void ucp_worker_print_info(ucp_worker_h worker, FILE *stream) + + fprintf(stream, "#\n"); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.h +index 28c2872f8..5417c0c2a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/core/ucp_worker.h +@@ -11,28 +11,31 @@ + #include "ucp_ep.h" + #include "ucp_thread.h" + ++#include + #include ++#include + #include +-#include + #include +-#include ++#include + +-KHASH_MAP_INIT_INT64(ucp_worker_ep_hash, ucp_ep_t *); +-KHASH_MAP_INIT_INT64(ucp_ep_errh_hash, ucp_err_handler_cb_t); + ++/* The size of the private buffer in UCT descriptor headroom, which UCP may ++ * use for its own needs. This size does not include ucp_recv_desc_t length, ++ * because it is common for all cases and protocols (TAG, STREAM). */ ++#define UCP_WORKER_HEADROOM_PRIV_SIZE 24 + +-enum { +- UCP_UCT_IFACE_ATOMIC32_FLAGS = +- UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32, +- UCP_UCT_IFACE_ATOMIC64_FLAGS = +- UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 +-}; ++ ++#define UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(_worker) \ ++ do { \ ++ ucs_assert(!UCP_THREAD_IS_REQUIRED(&(_worker)->mt_lock) || \ ++ UCP_THREAD_CS_IS_RECURSIVELY_LOCKED(&(_worker)->mt_lock) || \ ++ !UCS_ASYNC_IS_RECURSIVELY_BLOCKED(&(_worker)->async)); \ ++ UCP_THREAD_CS_ENTER_CONDITIONAL(&(_worker)->mt_lock); \ ++ } while (0) ++ ++ ++#define UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(_worker) \ ++ UCP_THREAD_CS_EXIT_CONDITIONAL(&(_worker)->mt_lock) + + + /** +@@ -172,7 +175,7 @@ typedef struct ucp_worker { + int inprogress; + char name[UCP_WORKER_NAME_MAX]; /* Worker name */ + +- unsigned wireup_pend_count;/* Number of pending requests on wireup endpoints*/ ++ unsigned flush_ops_count;/* Number of pending operations */ + + unsigned flags; /* Worker flags */ + int epfd; /* Allocated (on-demand) epoll fd for wakeup */ +@@ -181,10 +184,12 @@ typedef struct ucp_worker { + ucs_list_link_t arm_ifaces; /* List of interfaces to arm */ + + void *user_data; /* User-defined data */ +- ucs_list_link_t stream_eps; /* List of EPs with received stream data */ +- khash_t(ucp_worker_ep_hash) ep_hash; /* Hash table of all endpoints */ +- khash_t(ucp_ep_errh_hash) ep_errh_hash; /* Hash table of error handlers associated with endpoints */ ++ ucs_strided_alloc_t ep_alloc; /* Endpoint allocator */ ++ ucs_list_link_t stream_ready_eps; /* List of EPs with received stream data */ ++ ucs_list_link_t all_eps; /* List of all endpoints */ ++ ucp_ep_match_ctx_t ep_match_ctx; /* Endpoint-to-endpoint matching context */ + ucp_worker_iface_t *ifaces; /* Array of interfaces, one for each resource */ ++ unsigned num_active_ifaces; /* Number of activated ifaces */ + ucs_mpool_t am_mp; /* Memory pool for AM receives */ + ucs_mpool_t reg_mp; /* Registered memory pool */ + ucs_mpool_t rndv_frag_mp; /* Memory pool for RNDV fragments */ +@@ -202,9 +207,17 @@ typedef struct ucp_worker { + } ucp_worker_t; + + +-ucp_ep_h ucp_worker_get_reply_ep(ucp_worker_h worker, uint64_t dest_uuid); ++/** ++ * UCP worker argument for the error handling callback ++ */ ++typedef struct ucp_worker_err_handle_arg { ++ ucp_worker_h worker; ++ ucp_ep_h ucp_ep; ++ uct_ep_h uct_ep; ++ ucp_lane_index_t failed_lane; ++ ucs_status_t status; ++} ucp_worker_err_handle_arg_t; + +-ucp_request_t *ucp_worker_allocate_reply(ucp_worker_h worker, uint64_t dest_uuid); + + unsigned ucp_worker_get_ep_config(ucp_worker_h worker, + const ucp_ep_config_key_t *key); +@@ -223,21 +236,27 @@ void ucp_worker_signal_internal(ucp_worker_h worker); + + void ucp_worker_iface_activate(ucp_worker_iface_t *wiface, unsigned uct_flags); + ++int ucp_worker_err_handle_remove_filter(const ucs_callbackq_elem_t *elem, ++ void *arg); ++ucs_status_t ucp_worker_set_ep_failed(ucp_worker_h worker, ucp_ep_h ucp_ep, ++ uct_ep_h uct_ep, ucp_lane_index_t lane, ++ ucs_status_t status); ++ + static inline const char* ucp_worker_get_name(ucp_worker_h worker) + { + return worker->name; + } + +-static inline ucp_ep_h ucp_worker_ep_find(ucp_worker_h worker, uint64_t dest_uuid) ++/* get ep by pointer received from remote side, do some debug checks */ ++static inline ucp_ep_h ucp_worker_get_ep_by_ptr(ucp_worker_h worker, ++ uintptr_t ep_ptr) + { +- khiter_t hash_it; +- +- hash_it = kh_get(ucp_worker_ep_hash, &worker->ep_hash, dest_uuid); +- if (ucs_unlikely(hash_it == kh_end(&worker->ep_hash))) { +- return NULL; +- } ++ ucp_ep_h ep = (ucp_ep_h)ep_ptr; + +- return kh_value(&worker->ep_hash, hash_it); ++ ucs_assert(ep != NULL); ++ ucs_assertv(ep->worker == worker, "worker=%p ep=%p ep->worker=%p", worker, ++ ep, ep->worker); ++ return ep; + } + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.c +index 9759a0899..1c0fa8484 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.c +@@ -8,13 +8,93 @@ + + #include + #include +-#include ++#include ++#include + +-size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_mem_type_unpack, ++ (worker, buffer, recv_data, recv_length, mem_type), ++ ucp_worker_h worker, void *buffer, const void *recv_data, ++ size_t recv_length, uct_memory_type_t mem_type) ++{ ++ ucp_ep_h ep = worker->mem_type_ep[mem_type]; ++ ucp_md_map_t md_map = 0; ++ ucp_lane_index_t lane; ++ unsigned md_index; ++ uct_mem_h memh[1]; ++ ucs_status_t status; ++ uct_rkey_bundle_t rkey_bundle; ++ ++ if (recv_length == 0) { ++ return UCS_OK; ++ } ++ ++ lane = ucp_ep_config(ep)->key.rma_lanes[0]; ++ md_index = ucp_ep_md_index(ep, lane); ++ ++ status = ucp_mem_type_reg_buffers(worker, buffer, recv_length, ++ mem_type, md_index, memh, &md_map, ++ &rkey_bundle); ++ if (status != UCS_OK) { ++ ucs_error("failed to register buffer with mem type domian"); ++ return status; ++ } ++ ++ status = uct_ep_put_short(ep->uct_eps[lane], recv_data, recv_length, ++ (uint64_t)buffer, rkey_bundle.rkey); ++ if (status != UCS_OK) { ++ ucs_error("uct_ep_put_short() failed %s", ucs_status_string(status)); ++ } ++ ++ ucp_mem_type_unreg_buffers(worker, mem_type, memh, ++ &md_map, &rkey_bundle); ++ return status; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_mem_type_pack, ++ (worker, dest, src, length, mem_type), ++ ucp_worker_h worker, void *dest, const void *src, size_t length, ++ uct_memory_type_t mem_type) ++{ ++ ucp_ep_h ep = worker->mem_type_ep[mem_type]; ++ ucp_md_map_t md_map = 0; ++ ucp_lane_index_t lane; ++ unsigned md_index; ++ ucs_status_t status; ++ uct_mem_h memh[1]; ++ uct_rkey_bundle_t rkey_bundle; ++ ++ if (length == 0) { ++ return UCS_OK; ++ } ++ ++ lane = ucp_ep_config(ep)->key.rma_lanes[0]; ++ md_index = ucp_ep_md_index(ep, lane); ++ ++ status = ucp_mem_type_reg_buffers(worker, (void *)src, length, mem_type, md_index, ++ memh, &md_map, &rkey_bundle); ++ if (status != UCS_OK) { ++ ucs_error("failed to register buffer with mem type domian"); ++ return status; ++ } ++ ++ status = uct_ep_get_short(ep->uct_eps[lane], dest, length, ++ (uint64_t)src, rkey_bundle.rkey); ++ if (status != UCS_OK) { ++ ucs_error("uct_ep_put_short() failed %s", ucs_status_string(status)); ++ } ++ ++ ucp_mem_type_unreg_buffers(worker, mem_type, memh, ++ &md_map, &rkey_bundle); ++ return status; ++} ++ ++size_t ucp_dt_pack(ucp_worker_h worker, ucp_datatype_t datatype, ++ uct_memory_type_t mem_type, void *dest, const void *src, + ucp_dt_state_t *state, size_t length) + { +- ucp_dt_generic_t *dt; + size_t result_len = 0; ++ ucp_dt_generic_t *dt; + + if (!length) { + return length; +@@ -22,7 +102,12 @@ size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, + + switch (datatype & UCP_DATATYPE_CLASS_MASK) { + case UCP_DATATYPE_CONTIG: +- UCS_PROFILE_CALL(memcpy, dest, src + state->offset, length); ++ if ((ucs_likely(UCP_MEM_IS_HOST(mem_type))) || ++ (ucs_likely(UCP_MEM_IS_CUDA_MANAGED(mem_type)))) { ++ UCS_PROFILE_CALL(memcpy, dest, src + state->offset, length); ++ } else { ++ ucp_mem_type_pack(worker, dest, src + state->offset, length, mem_type); ++ } + result_len = length; + break; + +@@ -47,64 +132,3 @@ size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, + state->offset += result_len; + return result_len; + } +- +-UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_mem_type_unpack(ucp_worker_h worker, void *buffer, const void *recv_data, +- size_t recv_length, uct_memory_type_t mem_type) +-{ +- ucp_context_h context = worker->context; +- ucp_ep_h ep = worker->mem_type_ep[mem_type]; +- ucp_md_map_t md_map = 0; +- ucp_lane_index_t lane; +- uct_md_h md; +- unsigned md_index; +- uct_mem_h memh[1]; +- ucs_status_t status; +- char *rkey_buffer; +- uct_rkey_bundle_t rkey_bundle; +- +- if (recv_length == 0) { +- return UCS_OK; +- } +- +- lane = ucp_ep_config(ep)->key.rma_lanes[0]; +- md_index = ucp_ep_md_index(ep, lane); +- md = context->tl_mds[md_index].md; +- +- status = ucp_mem_rereg_mds(context, UCS_BIT(md_index), buffer, +- recv_length, UCT_MD_MEM_ACCESS_ALL, NULL, mem_type, +- NULL, memh, &md_map); +- if (status != UCS_OK) { +- goto err; +- } +- +- rkey_buffer = ucs_alloca(context->tl_mds[md_index].attr.rkey_packed_size); +- +- status = uct_md_mkey_pack(md, memh[0], rkey_buffer); +- if (status != UCS_OK) { +- ucs_error("failed to pack key from md[%d]: %s", +- md_index, ucs_status_string(status)); +- goto err_dreg_mem; +- } +- +- status = uct_rkey_unpack(rkey_buffer, &rkey_bundle); +- if (status != UCS_OK) { +- ucs_error("failed to unpack key from md[%d]: %s", +- md_index, ucs_status_string(status)); +- goto err_dreg_mem; +- } +- +- status = uct_ep_put_short(ep->uct_eps[lane], recv_data, recv_length, +- (uint64_t)buffer, rkey_bundle.rkey); +- if (status != UCS_OK) { +- ucs_error("uct_ep_put_short() failed %s", ucs_status_string(status)); +- goto err_destroy_rkey; +- } +- +-err_destroy_rkey: +- uct_rkey_release(&rkey_bundle); +-err_dreg_mem: +- ucp_mem_rereg_mds(context, 0, NULL, 0, 0, NULL, mem_type, NULL, memh, &md_map); +-err: +- return status; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.h +index 1156e9029..bd034fcfb 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.h +@@ -46,7 +46,8 @@ typedef struct ucp_dt_state { + } ucp_dt_state_t; + + +-size_t ucp_dt_pack(ucp_datatype_t datatype, void *dest, const void *src, ++size_t ucp_dt_pack(ucp_worker_h worker, ucp_datatype_t datatype, ++ uct_memory_type_t mem_type, void *dest, const void *src, + ucp_dt_state_t *state, size_t length); + + ucs_status_t ucp_mem_type_unpack(ucp_worker_h worker, void *buffer, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.inl +index b8d47cb55..99f8f31d2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt.inl +@@ -7,7 +7,7 @@ + #ifndef UCP_DT_INL_ + #define UCP_DT_INL_ + +-#include ++#include + + /** + * Get the total length of the data +@@ -56,7 +56,8 @@ ucp_dt_unpack_only(ucp_worker_h worker, void *buffer, size_t count, + ucs_unlikely(length > (buffer_size = ucp_contig_dt_length(datatype, count)))) { + goto err_truncated; + } +- if (ucs_likely(UCP_MEM_IS_HOST(mem_type))) { ++ if (ucs_likely(UCP_MEM_IS_HOST(mem_type)) || ++ (ucs_likely(UCP_MEM_IS_CUDA_MANAGED(mem_type)))) { + UCS_PROFILE_NAMED_CALL("memcpy_recv", memcpy, buffer, data, length); + } else { + ucp_mem_type_unpack(worker, buffer, data, length, mem_type); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_contig.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_contig.c +index 2c233b9fb..024de95c3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_contig.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_contig.c +@@ -6,7 +6,7 @@ + + #include "dt_contig.h" + +-#include ++#include + #include + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_generic.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_generic.h +index db49261d2..bf0647b8a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_generic.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_generic.h +@@ -5,8 +5,8 @@ + */ + + +-#ifndef UCP_DATATYPE_H_ +-#define UCP_DATATYPE_H_ ++#ifndef UCP_DT_GENERIC_H_ ++#define UCP_DT_GENERIC_H_ + + #include + +@@ -28,4 +28,4 @@ static inline ucp_dt_generic_t* ucp_dt_generic(ucp_datatype_t datatype) + #define UCP_DT_IS_GENERIC(_datatype) \ + (((_datatype) & UCP_DATATYPE_CLASS_MASK) == UCP_DATATYPE_GENERIC) + +-#endif ++#endif /* UCP_DT_GENERIC_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.c +index c072cde9f..2ae6b6049 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.c +@@ -92,3 +92,14 @@ void ucp_dt_iov_seek(ucp_dt_iov_t *iov, size_t iovcnt, ptrdiff_t distance, + + *iov_offset = new_iov_offset; + } ++ ++size_t ucp_dt_iov_count_nonempty(const ucp_dt_iov_t *iov, size_t iovcnt) ++{ ++ size_t iov_it, count; ++ ++ count = 0; ++ for (iov_it = 0; iov_it < iovcnt; ++iov_it) { ++ count += iov[iov_it].length != 0; ++ } ++ return count; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.h +index 43fc81f8e..c19a7bae7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/dt/dt_iov.h +@@ -88,4 +88,14 @@ void ucp_dt_iov_seek(ucp_dt_iov_t *iov, size_t iovcnt, ptrdiff_t distance, + size_t *iov_offset, size_t *iovcnt_offset); + + ++/** ++ * Count non-empty buffers in the iov ++ * ++ * @param [in] iov @ref ucp_dt_iov_t buffer to count ++ * @param [in] iovcnt Number of entries the @a iov buffer ++ * ++ * @return Number of non-empty buffers in the iovec ++ */ ++size_t ucp_dt_iov_count_nonempty(const ucp_dt_iov_t *iov, size_t iovcnt); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto.h +index 5653f37be..290efa735 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto.h +@@ -8,9 +8,6 @@ + #define UCP_PROTO_H_ + + #include +-#include +-#include +-#include + #include + #include + +@@ -19,7 +16,7 @@ + * Header segment for a transaction + */ + typedef struct { +- uint64_t sender_uuid; ++ uintptr_t ep_ptr; + uintptr_t reqptr; + } UCS_S_PACKED ucp_request_hdr_t; + +@@ -55,17 +52,4 @@ void ucp_proto_am_zcopy_completion(uct_completion_t *self, ucs_status_t status); + + void ucp_proto_am_zcopy_req_complete(ucp_request_t *req, ucs_status_t status); + +-/* +- * Make sure the remote worker would be able to send replies to our endpoint. +- * Should be used before sending a message which requires a reply. +- */ +-static inline void ucp_ep_connect_remote(ucp_ep_h ep) +-{ +- if (ucs_unlikely(!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED))) { +- ucs_assert(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER); +- ucp_wireup_send_request(ep, ep->dest_uuid); +- } +-} +- +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.c +index ac9efa583..f5f5de66a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.c +@@ -26,8 +26,8 @@ static size_t ucp_proto_pack(void *dest, void *arg) + return sizeof(*rep_hdr); + case UCP_AM_ID_OFFLOAD_SYNC_ACK: + off_rep_hdr = dest; +- off_rep_hdr->sender_tag = req->send.proto.sender_tag; +- off_rep_hdr->sender_uuid = req->send.proto.sender_uuid; ++ off_rep_hdr->sender_tag = req->send.proto.sender_tag; ++ off_rep_hdr->ep_ptr = ucp_request_get_dest_ep_ptr(req); + return sizeof(*off_rep_hdr); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.inl +index b35b85c81..ab6917262 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/proto/proto_am.inl +@@ -9,7 +9,7 @@ + #include + #include + #include +-#include ++#include + + #define UCP_STATUS_PENDING_SWITCH (UCS_ERR_LAST - 1) + +@@ -36,17 +36,16 @@ ucp_do_am_bcopy_single(uct_pending_req_t *self, uint8_t am_id, + + static UCS_F_ALWAYS_INLINE + ucs_status_t ucp_do_am_bcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, +- uint8_t am_id_middle, uint8_t am_id_last, ++ uint8_t am_id_middle, + size_t hdr_size_middle, + uct_pack_callback_t pack_first, + uct_pack_callback_t pack_middle, +- uct_pack_callback_t pack_last, + int enable_am_bw) + { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_ep_t *ep = req->send.ep; + ucs_status_t status; +- size_t max_middle; ++ size_t UCS_V_UNUSED max_middle; + ssize_t packed_len; + uct_ep_h uct_ep; + size_t offset; +@@ -65,20 +64,21 @@ ucs_status_t ucp_do_am_bcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, + packed_len = uct_ep_am_bcopy(uct_ep, am_id_first, pack_first, req, 0); + UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_bcopy_first", packed_len, + packed_len); +- } else if (offset + max_middle < req->send.length) { +- /* Middle */ ++ ucs_assertv(req->send.state.dt.offset < req->send.length, ++ "offset=%zd", req->send.state.dt.offset); ++ } else { ++ ucs_assert(offset < req->send.length); ++ /* Middle or last */ + packed_len = uct_ep_am_bcopy(uct_ep, am_id_middle, pack_middle, req, 0); + ucs_assertv((packed_len < 0) || (packed_len <= max_middle + hdr_size_middle), + "packed_len=%zd max_middle=%zu hdr_size_middle=%zu", + packed_len, max_middle, hdr_size_middle); + UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_bcopy_middle", + packed_len, packed_len); +- } else { +- /* Last */ +- packed_len = uct_ep_am_bcopy(uct_ep, am_id_last, pack_last, req, 0); +- UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_bcopy_last", packed_len, +- packed_len); +- if (packed_len >= 0) { ++ ucs_assert((packed_len < 0) || ++ (offset + packed_len - hdr_size_middle <= req->send.length)); ++ if ((packed_len > 0) && (offset + packed_len - hdr_size_middle == req->send.length)) { ++ /* Last */ + return UCS_OK; + } + } +@@ -188,7 +188,7 @@ ucs_status_t ucp_do_am_zcopy_single(uct_pending_req_t *self, uint8_t am_id, + + ucp_dt_iov_copy_uct(ep->worker->context,iov, &iovcnt, max_iov, + &state, req->send.buffer, req->send.datatype, +- req->send.length, 0, NULL); ++ req->send.length, ucp_ep_md_index(ep, req->send.lane), NULL); + + status = uct_ep_am_zcopy(ep->uct_eps[req->send.lane], am_id, (void*)hdr, + hdr_size, iov, iovcnt, 0, +@@ -205,7 +205,7 @@ ucs_status_t ucp_do_am_zcopy_single(uct_pending_req_t *self, uint8_t am_id, + + static UCS_F_ALWAYS_INLINE + ucs_status_t ucp_do_am_zcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, +- uint8_t am_id_middle, uint8_t am_id_last, ++ uint8_t am_id_middle, + const void *hdr_first, size_t hdr_size_first, + const void *hdr_middle, size_t hdr_size_middle, + ucp_req_complete_func_t complete, int enable_am_bw) +@@ -219,6 +219,7 @@ ucs_status_t ucp_do_am_zcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, + size_t max_iov; + uct_iov_t *iov; + size_t offset; ++ size_t mid_len; + ucs_status_t status; + uct_ep_h uct_ep; + int pending_adde_res; +@@ -262,6 +263,9 @@ ucs_status_t ucp_do_am_zcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, + req->send.buffer, req->send.datatype, + max_middle - hdr_size_first + hdr_size_middle, + ucp_ep_md_index(ep, req->send.lane), NULL); ++ ucs_assertv(state.offset != 0, "state must be changed on 1st stage"); ++ ucs_assertv(state.offset < req->send.length, "state.offset=%zu", ++ state.offset); + + status = uct_ep_am_zcopy(uct_ep, am_id_first, (void*)hdr_first, + hdr_size_first, iov, iovcnt, 0, +@@ -269,39 +273,45 @@ ucs_status_t ucp_do_am_zcopy_multi(uct_pending_req_t *self, uint8_t am_id_first, + + UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_zcopy_first", + iov[0].length, status); +- } else if ((offset + max_middle < req->send.length) || flag_iov_mid) { +- /* Middle stage */ +- ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iov, +- &state, req->send.buffer, req->send.datatype, +- max_middle, ucp_ep_md_index(ep, req->send.lane), NULL); +- +- status = uct_ep_am_zcopy(uct_ep, am_id_middle, (void*)hdr_middle, +- hdr_size_middle, iov, iovcnt, 0, +- &req->send.state.uct_comp); +- +- UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_zcopy_middle", +- iov[0].length, status); + } else { +- /* Last stage */ ++ /* Middle or last stage */ ++ mid_len = ucs_min(max_middle, req->send.length - offset); ++ ucs_assert(offset + mid_len <= req->send.length); + ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iov, &state, +- req->send.buffer, req->send.datatype, +- req->send.length - offset, ++ req->send.buffer, req->send.datatype, mid_len, + ucp_ep_md_index(ep, req->send.lane), NULL); + +- status = uct_ep_am_zcopy(uct_ep, am_id_last, (void*)hdr_middle, +- hdr_size_middle, iov, iovcnt, 0, +- &req->send.state.uct_comp); +- UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_zcopy_last", +- iov[0].length, status); +- if (status == UCS_OK) { +- complete(req, UCS_OK); ++ if (offset < state.offset) { ++ status = uct_ep_am_zcopy(uct_ep, am_id_middle, (void*)hdr_middle, ++ hdr_size_middle, iov, iovcnt, 0, ++ &req->send.state.uct_comp); ++ } else if (state.offset == req->send.length) { ++ /* Empty IOVs on last stage */ + return UCS_OK; ++ } else { ++ ucs_assert(offset == state.offset); ++ /* Empty IOVs in the middle */ ++ ucp_request_send_state_advance(req, &state, ++ UCP_REQUEST_SEND_PROTO_ZCOPY_AM, ++ UCS_OK); ++ continue; + } +- ucp_request_send_state_advance(req, &state, +- UCP_REQUEST_SEND_PROTO_ZCOPY_AM, +- status); +- if (!UCS_STATUS_IS_ERR(status)) { +- return UCS_OK; ++ ++ UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(req, "am_zcopy_middle", ++ iov[0].length, status); ++ ++ if (!flag_iov_mid && (offset + mid_len == req->send.length)) { ++ /* Last stage */ ++ if (status == UCS_OK) { ++ complete(req, UCS_OK); ++ return UCS_OK; ++ } ++ ucp_request_send_state_advance(req, &state, ++ UCP_REQUEST_SEND_PROTO_ZCOPY_AM, ++ status); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ return UCS_OK; ++ } + } + } + +@@ -340,7 +350,7 @@ ucp_proto_get_zcopy_threshold(const ucp_request_t *req, + } + + if (ucs_unlikely(!UCP_MEM_IS_HOST(req->send.mem_type))) { +- return 1; ++ return ucs_min(max_zcopy, msg_config->mem_type_zcopy_thresh[req->send.mem_type]); + } + + if (ucs_likely(UCP_DT_IS_CONTIG(req->send.datatype))) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_basic.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_basic.c +new file mode 100644 +index 000000000..e48030ca4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_basic.c +@@ -0,0 +1,100 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++ ++ ++static UCS_F_ALWAYS_INLINE ++ucs_status_t ucp_amo_check_send_status(ucp_request_t *req, ucs_status_t status) ++{ ++ if (status == UCS_INPROGRESS) { ++ return UCS_OK; ++ } ++ /* Complete for UCS_OK and unexpected errors */ ++ if (status != UCS_ERR_NO_RESOURCE) { ++ ucp_request_complete_send(req, status); ++ } ++ return status; ++} ++ ++static ucs_status_t ucp_amo_basic_progress_post(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_rkey_h rkey = req->send.amo.rkey; ++ ucp_ep_t *ep = req->send.ep; ++ uint64_t value = req->send.amo.value; ++ uint64_t remote_addr = req->send.amo.remote_addr; ++ uct_atomic_op_t op = req->send.amo.uct_op; ++ ucs_status_t status; ++ ++ req->send.lane = rkey->cache.amo_lane; ++ if (req->send.length == sizeof(uint64_t)) { ++ status = UCS_PROFILE_CALL(uct_ep_atomic64_post, ++ ep->uct_eps[req->send.lane], op, value, ++ remote_addr, rkey->cache.amo_rkey); ++ } else { ++ ucs_assert(req->send.length == sizeof(uint32_t)); ++ status = UCS_PROFILE_CALL(uct_ep_atomic32_post, ++ ep->uct_eps[req->send.lane], op, value, ++ remote_addr, rkey->cache.amo_rkey); ++ } ++ ++ return ucp_amo_check_send_status(req, status); ++} ++ ++static ucs_status_t ucp_amo_basic_progress_fetch(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_rkey_h rkey = req->send.amo.rkey; ++ ucp_ep_t *ep = req->send.ep; ++ uint64_t value = req->send.amo.value; ++ uint64_t *result = req->send.buffer; ++ uint64_t remote_addr = req->send.amo.remote_addr; ++ uct_atomic_op_t op = req->send.amo.uct_op; ++ ucs_status_t status; ++ ++ req->send.lane = rkey->cache.amo_lane; ++ if (req->send.length == sizeof(uint64_t)) { ++ if (op != UCT_ATOMIC_OP_CSWAP) { ++ status = uct_ep_atomic64_fetch(ep->uct_eps[req->send.lane], ++ op, value, result, ++ remote_addr, ++ rkey->cache.amo_rkey, ++ &req->send.state.uct_comp); ++ } else { ++ status = uct_ep_atomic_cswap64(ep->uct_eps[req->send.lane], ++ value, *result, ++ remote_addr, rkey->cache.amo_rkey, result, ++ &req->send.state.uct_comp); ++ } ++ } else { ++ ucs_assert(req->send.length == sizeof(uint32_t)); ++ if (op != UCT_ATOMIC_OP_CSWAP) { ++ status = uct_ep_atomic32_fetch(ep->uct_eps[req->send.lane], ++ op, value, (uint32_t*)result, ++ remote_addr, ++ rkey->cache.amo_rkey, ++ &req->send.state.uct_comp); ++ } else { ++ status = uct_ep_atomic_cswap32(ep->uct_eps[req->send.lane], ++ value, *result, remote_addr, ++ rkey->cache.amo_rkey, (uint32_t*)result, ++ &req->send.state.uct_comp); ++ } ++ } ++ ++ return ucp_amo_check_send_status(req, status); ++} ++ ++ucp_amo_proto_t ucp_amo_basic_proto = { ++ .name = "basic_amo", ++ .progress_fetch = ucp_amo_basic_progress_fetch, ++ .progress_post = ucp_amo_basic_progress_post ++}; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_send.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_send.c +new file mode 100644 +index 000000000..48985f16b +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_send.c +@@ -0,0 +1,278 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* Copyright (C) UT-Battelle, LLC. 2016. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++#define UCP_AMO_CHECK_PARAM(_context, _remote_addr, _size, _opcode, \ ++ _last_opcode, _action) \ ++ { \ ++ if (ENABLE_PARAMS_CHECK && \ ++ ucs_unlikely(((_remote_addr) % (_size)) != 0)) { \ ++ ucs_error("atomic variable must be naturally aligned " \ ++ "(remote address 0x%"PRIx64", size %zu)", (_remote_addr), \ ++ (_size)); \ ++ _action; \ ++ } \ ++ \ ++ if (ENABLE_PARAMS_CHECK && \ ++ ucs_unlikely(((_size) != 4) && (_size != 8))) { \ ++ ucs_error("invalid atomic operation size: %zu", (_size)); \ ++ _action; \ ++ } \ ++ \ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS((_context), ((_size) == 4) ? \ ++ UCP_FEATURE_AMO32 : UCP_FEATURE_AMO64, \ ++ _action); \ ++ \ ++ if (ENABLE_PARAMS_CHECK && \ ++ (ucs_unlikely((_opcode) >= (_last_opcode)))) { \ ++ ucs_error("invalid atomic opcode %d ", _opcode); \ ++ _action; \ ++ } \ ++ } ++ ++ ++static uct_atomic_op_t ucp_uct_op_table[] = { ++ [UCP_ATOMIC_POST_OP_ADD] = UCT_ATOMIC_OP_ADD, ++ [UCP_ATOMIC_POST_OP_AND] = UCT_ATOMIC_OP_AND, ++ [UCP_ATOMIC_POST_OP_OR] = UCT_ATOMIC_OP_OR, ++ [UCP_ATOMIC_POST_OP_XOR] = UCT_ATOMIC_OP_XOR ++}; ++ ++static uct_atomic_op_t ucp_uct_fop_table[] = { ++ [UCP_ATOMIC_FETCH_OP_FADD] = UCT_ATOMIC_OP_ADD, ++ [UCP_ATOMIC_FETCH_OP_FAND] = UCT_ATOMIC_OP_AND, ++ [UCP_ATOMIC_FETCH_OP_FOR] = UCT_ATOMIC_OP_OR, ++ [UCP_ATOMIC_FETCH_OP_FXOR] = UCT_ATOMIC_OP_XOR, ++ [UCP_ATOMIC_FETCH_OP_SWAP] = UCT_ATOMIC_OP_SWAP, ++ [UCP_ATOMIC_FETCH_OP_CSWAP] = UCT_ATOMIC_OP_CSWAP, ++}; ++ ++ ++static void ucp_amo_completed_single(uct_completion_t *self, ++ ucs_status_t status) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, ++ send.state.uct_comp); ++ ucs_trace("invoking completion on AMO request %p", req); ++ ucp_request_complete_send(req, status); ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucp_amo_init_common(ucp_request_t *req, ucp_ep_h ep, uct_atomic_op_t op, ++ uint64_t remote_addr, ucp_rkey_h rkey, uint64_t value, ++ size_t size) ++{ ++ req->flags = 0; ++ req->send.ep = ep; ++ req->send.length = size; ++ req->send.amo.uct_op = op; ++ req->send.amo.remote_addr = remote_addr; ++ req->send.amo.rkey = rkey; ++ req->send.amo.value = value; ++#if ENABLE_ASSERT ++ req->send.lane = UCP_NULL_LANE; ++#endif ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucp_amo_init_fetch(ucp_request_t *req, ucp_ep_h ep, void *buffer, ++ uct_atomic_op_t op, size_t op_size, uint64_t remote_addr, ++ ucp_rkey_h rkey, uint64_t value, const ucp_amo_proto_t *proto) ++{ ++ ucp_amo_init_common(req, ep, op, remote_addr, rkey, value, op_size); ++ req->send.state.uct_comp.count = 1; ++ req->send.state.uct_comp.func = ucp_amo_completed_single; ++ req->send.uct.func = proto->progress_fetch; ++ req->send.buffer = buffer; ++} ++ ++static UCS_F_ALWAYS_INLINE ++void ucp_amo_init_post(ucp_request_t *req, ucp_ep_h ep, uct_atomic_op_t op, ++ size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint64_t value, const ucp_amo_proto_t *proto) ++{ ++ ucp_amo_init_common(req, ep, op, remote_addr, rkey, value, op_size); ++ req->send.uct.func = proto->progress_post; ++} ++ ++ucs_status_ptr_t ucp_atomic_fetch_nb(ucp_ep_h ep, ucp_atomic_fetch_op_t opcode, ++ uint64_t value, void *result, size_t op_size, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb) ++{ ++ ucs_status_ptr_t status_p; ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ UCP_AMO_CHECK_PARAM(ep->worker->context, remote_addr, op_size, opcode, ++ UCP_ATOMIC_FETCH_OP_LAST, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, amo); ++ if (status != UCS_OK) { ++ status_p = UCS_STATUS_PTR(UCS_ERR_UNREACHABLE); ++ goto out; ++ } ++ ++ req = ucp_request_get(ep->worker); ++ if (ucs_unlikely(NULL == req)) { ++ status_p = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); ++ goto out; ++ } ++ ++ ucp_amo_init_fetch(req, ep, result, ucp_uct_fop_table[opcode], op_size, ++ remote_addr, rkey, value, rkey->cache.amo_proto); ++ ++ status_p = ucp_rma_send_request_cb(req, cb); ++ ++out: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status_p; ++} ++ ++ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t value, ++ size_t op_size, uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ ucs_status_ptr_t status_p; ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ UCP_AMO_CHECK_PARAM(ep->worker->context, remote_addr, op_size, opcode, ++ UCP_ATOMIC_POST_OP_LAST, return UCS_ERR_INVALID_PARAM); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, amo); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ req = ucp_request_get(ep->worker); ++ if (ucs_unlikely(NULL == req)) { ++ status = UCS_ERR_NO_MEMORY; ++ goto out; ++ } ++ ++ ucp_amo_init_post(req, ep, ucp_uct_op_table[opcode], op_size, remote_addr, ++ rkey, value, rkey->cache.amo_proto); ++ ++ status_p = ucp_rma_send_request_cb(req, (ucp_send_callback_t)ucs_empty_function); ++ if (UCS_PTR_IS_PTR(status_p)) { ++ ucp_request_release(status_p); ++ status = UCS_OK; ++ } else { ++ status = UCS_PTR_STATUS(status_p); ++ } ++ ++out: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status; ++} ++ ++static inline ucs_status_t ++ucp_atomic_fetch_b(ucp_ep_h ep, ucp_atomic_fetch_op_t opcode, uint64_t value, ++ void *result, size_t size, uint64_t remote_addr, ++ ucp_rkey_h rkey, const char *op_name) ++{ ++ void *request; ++ ++ request = ucp_atomic_fetch_nb(ep, opcode, value, result, size, remote_addr, ++ rkey, (void*)ucs_empty_function); ++ return ucp_rma_wait(ep->worker, request, op_name); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_add32, (ep, add, remote_addr, rkey), ++ ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ return ucp_atomic_post(ep, UCP_ATOMIC_POST_OP_ADD, add, sizeof(add), ++ remote_addr, rkey); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_add64, (ep, add, remote_addr, rkey), ++ ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ return ucp_atomic_post(ep, UCP_ATOMIC_POST_OP_ADD, add, sizeof(add), ++ remote_addr, rkey); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_fadd32, (ep, add, remote_addr, rkey, result), ++ ucp_ep_h ep, uint32_t add, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint32_t *result) ++{ ++ return ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_FADD, add, result, ++ sizeof(add), remote_addr, rkey, "atomic_fadd32"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_fadd64, (ep, add, remote_addr, rkey, result), ++ ucp_ep_h ep, uint64_t add, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint64_t *result) ++{ ++ return ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_FADD, add, result, ++ sizeof(add), remote_addr, rkey, "atomic_fadd64"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_swap32, (ep, swap, remote_addr, rkey, result), ++ ucp_ep_h ep, uint32_t swap, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint32_t *result) ++{ ++ return ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_SWAP, swap, result, ++ sizeof(swap), remote_addr, rkey, "atomic_swap32"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_swap64, (ep, swap, remote_addr, rkey, result), ++ ucp_ep_h ep, uint64_t swap, uint64_t remote_addr, ucp_rkey_h rkey, ++ uint64_t *result) ++{ ++ return ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_SWAP, swap, result, ++ sizeof(swap), remote_addr, rkey, "atomic_swap64"); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_atomic_cswap_b(ucp_ep_h ep, uint64_t compare, uint64_t swap, size_t size, ++ uint64_t remote_addr, ucp_rkey_h rkey, void *result, ++ const char *op_name) ++{ ++ char tmp[sizeof(swap)]; /* sufficient storage for maximal operand size */ ++ ucs_status_t status; ++ ++ memcpy(tmp, &swap, size); ++ status = ucp_atomic_fetch_b(ep, UCP_ATOMIC_FETCH_OP_CSWAP, compare, &tmp, ++ size, remote_addr, rkey, op_name); ++ if (status == UCS_OK) { ++ memcpy(result, tmp, size); ++ } ++ return status; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_cswap32, ++ (ep, compare, swap, remote_addr, rkey, result), ++ ucp_ep_h ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, ucp_rkey_h rkey, uint32_t *result) ++{ ++ return ucp_atomic_cswap_b(ep, compare, swap, sizeof(swap), remote_addr, ++ rkey, result, "atomic_cswap32"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_cswap64, ++ (ep, compare, swap, remote_addr, rkey, result), ++ ucp_ep_h ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, ucp_rkey_h rkey, uint64_t *result) ++{ ++ return ucp_atomic_cswap_b(ep, compare, swap, sizeof(swap), remote_addr, ++ rkey, result, "atomic_cswap64"); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_sw.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_sw.c +new file mode 100644 +index 000000000..f9ec1f434 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/amo_sw.c +@@ -0,0 +1,292 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++#include ++ ++ ++static size_t ucp_amo_sw_pack(void *dest, void *arg, uint8_t fetch) ++{ ++ ucp_request_t *req = arg; ++ ucp_atomic_req_hdr_t *atomich = dest; ++ ucp_ep_t *ep = req->send.ep; ++ size_t size = req->send.length; ++ size_t length; ++ ++ atomich->address = req->send.rma.remote_addr; ++ atomich->req.ep_ptr = ucp_ep_dest_ep_ptr(ep); ++ atomich->req.reqptr = fetch ? (uintptr_t)req : 0; ++ atomich->length = size; ++ atomich->opcode = req->send.amo.uct_op; ++ ++ memcpy(atomich + 1, &req->send.amo.value, size); ++ length = sizeof(*atomich) + size; ++ ++ if (req->send.amo.uct_op == UCT_ATOMIC_OP_CSWAP) { ++ /* compare-swap has two arguments */ ++ memcpy((void*)(atomich + 1) + size, req->send.buffer, size); ++ length += size; ++ } ++ ++ return length; ++} ++ ++static size_t ucp_amo_sw_post_pack_cb(void *dest, void *arg) ++{ ++ return ucp_amo_sw_pack(dest, arg, 0); ++} ++ ++static size_t ucp_amo_sw_fetch_pack_cb(void *dest, void *arg) ++{ ++ return ucp_amo_sw_pack(dest, arg, 1); ++} ++ ++static ucs_status_t ucp_amo_sw_progress(uct_pending_req_t *self, ++ uct_pack_callback_t pack_cb, int fetch) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ucs_status_t status; ++ ssize_t packed_len; ++ ++ req->send.lane = ucp_ep_get_am_lane(ep); ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], ++ UCP_AM_ID_ATOMIC_REQ, pack_cb, req, 0); ++ if (packed_len > 0) { ++ ucp_ep_rma_remote_request_sent(ep); ++ if (!fetch) { ++ ucp_request_complete_send(req, UCS_OK); ++ } ++ return UCS_OK; ++ } else { ++ status = (ucs_status_t)packed_len; ++ if (status != UCS_ERR_NO_RESOURCE) { ++ /* failure */ ++ ucp_request_complete_send(req, status); ++ } ++ return status; ++ } ++} ++ ++static ucs_status_t ucp_amo_sw_progress_post(uct_pending_req_t *self) ++{ ++ return ucp_amo_sw_progress(self, ucp_amo_sw_post_pack_cb, 0); ++} ++ ++static ucs_status_t ucp_amo_sw_progress_fetch(uct_pending_req_t *self) ++{ ++ return ucp_amo_sw_progress(self, ucp_amo_sw_fetch_pack_cb, 1); ++} ++ ++ucp_amo_proto_t ucp_amo_sw_proto = { ++ .name = "sw_amo", ++ .progress_fetch = ucp_amo_sw_progress_fetch, ++ .progress_post = ucp_amo_sw_progress_post ++}; ++ ++static size_t ucp_amo_sw_pack_atomic_reply(void *dest, void *arg) ++{ ++ ucp_rma_rep_hdr_t *hdr = dest; ++ ucp_request_t *req = arg; ++ ++ hdr->req = req->send.get_reply.req; ++ ++ switch (req->send.length) { ++ case sizeof(uint32_t): ++ *(uint32_t*)(hdr + 1) = req->send.atomic_reply.data.reply32; ++ break; ++ case sizeof(uint64_t): ++ *(uint64_t*)(hdr + 1) = req->send.atomic_reply.data.reply64; ++ break; ++ default: ++ ucs_fatal("invalid atomic length: %zu", req->send.length); ++ } ++ ++ return sizeof(*hdr) + req->send.length; ++} ++ ++static ucs_status_t ucp_progress_atomic_reply(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ssize_t packed_len; ++ ++ req->send.lane = ucp_ep_get_am_lane(ep); ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_ATOMIC_REP, ++ ucp_amo_sw_pack_atomic_reply, req, 0); ++ ++ if (packed_len < 0) { ++ return (ucs_status_t)packed_len; ++ } ++ ++ ucs_assert(packed_len == sizeof(ucp_rma_rep_hdr_t) + req->send.length); ++ ucp_request_put(req); ++ return UCS_OK; ++} ++ ++#define DEFINE_AMO_SW_OP(_bits) \ ++ static void ucp_amo_sw_do_op##_bits(const ucp_atomic_req_hdr_t *atomicreqh) \ ++ { \ ++ uint##_bits##_t *ptr = (void*)atomicreqh->address; \ ++ uint##_bits##_t *args = (void*)(atomicreqh + 1); \ ++ \ ++ switch (atomicreqh->opcode) { \ ++ case UCT_ATOMIC_OP_ADD: \ ++ ucs_atomic_add##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_AND: \ ++ ucs_atomic_and##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_OR: \ ++ ucs_atomic_or##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_XOR: \ ++ ucs_atomic_xor##_bits(ptr, args[0]); \ ++ break; \ ++ default: \ ++ ucs_fatal("invalid opcode: %d", atomicreqh->opcode); \ ++ } \ ++ } ++ ++#define DEFINE_AMO_SW_FOP(_bits) \ ++ static void ucp_amo_sw_do_fop##_bits(const ucp_atomic_req_hdr_t *atomicreqh, \ ++ ucp_atomic_reply_t *result) \ ++ { \ ++ uint##_bits##_t *ptr = (void*)atomicreqh->address; \ ++ uint##_bits##_t *args = (void*)(atomicreqh + 1); \ ++ \ ++ switch (atomicreqh->opcode) { \ ++ case UCT_ATOMIC_OP_ADD: \ ++ result->reply##_bits = ucs_atomic_fadd##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_AND: \ ++ result->reply##_bits = ucs_atomic_fand##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_OR: \ ++ result->reply##_bits = ucs_atomic_for##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_XOR: \ ++ result->reply##_bits = ucs_atomic_fxor##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_SWAP: \ ++ result->reply##_bits = ucs_atomic_swap##_bits(ptr, args[0]); \ ++ break; \ ++ case UCT_ATOMIC_OP_CSWAP: \ ++ result->reply##_bits = ucs_atomic_cswap##_bits(ptr, args[0], args[1]); \ ++ break; \ ++ default: \ ++ ucs_fatal("invalid opcode: %d", atomicreqh->opcode); \ ++ } \ ++ } ++ ++DEFINE_AMO_SW_OP(32) ++DEFINE_AMO_SW_OP(64) ++DEFINE_AMO_SW_FOP(32) ++DEFINE_AMO_SW_FOP(64) ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_req_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_atomic_req_hdr_t *atomicreqh = data; ++ ucp_worker_h worker = arg; ++ ucp_ep_h ep = ucp_worker_get_ep_by_ptr(worker, ++ atomicreqh->req.ep_ptr); ++ ucp_request_t *req; ++ ++ if (atomicreqh->req.reqptr == 0) { ++ /* atomic operation without result */ ++ switch (atomicreqh->length) { ++ case sizeof(uint32_t): ++ ucp_amo_sw_do_op32(atomicreqh); ++ break; ++ case sizeof(uint64_t): ++ ucp_amo_sw_do_op64(atomicreqh); ++ break; ++ default: ++ ucs_fatal("invalid atomic length: %u", atomicreqh->length); ++ } ++ ucp_rma_sw_send_cmpl(ep); ++ } else { ++ /* atomic operation with result */ ++ req = ucp_request_get(worker); ++ ucs_assert(req != NULL); ++ ++ switch (atomicreqh->length) { ++ case sizeof(uint32_t): ++ ucp_amo_sw_do_fop32(atomicreqh, &req->send.atomic_reply.data); ++ break; ++ case sizeof(uint64_t): ++ ucp_amo_sw_do_fop64(atomicreqh, &req->send.atomic_reply.data); ++ break; ++ default: ++ ucs_fatal("invalid atomic length: %u", atomicreqh->length); ++ } ++ ++ req->send.ep = ep; ++ req->send.atomic_reply.req = atomicreqh->req.reqptr; ++ req->send.length = atomicreqh->length; ++ req->send.uct.func = ucp_progress_atomic_reply; ++ ucp_request_send(req); ++ } ++ ++ return UCS_OK; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_atomic_rep_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_rma_rep_hdr_t *hdr = data; ++ size_t frag_length = length - sizeof(*hdr); ++ ucp_request_t *req = (ucp_request_t*)hdr->req; ++ ucp_ep_h ep = req->send.ep; ++ ++ memcpy(req->send.buffer, hdr + 1, frag_length); ++ ucp_request_complete_send(req, UCS_OK); ++ ucp_ep_rma_remote_request_completed(ep); ++ return UCS_OK; ++} ++ ++static void ucp_amo_sw_dump_packet(ucp_worker_h worker, uct_am_trace_type_t type, ++ uint8_t id, const void *data, size_t length, ++ char *buffer, size_t max) ++{ ++ const ucp_atomic_req_hdr_t *atomich; ++ const ucp_rma_rep_hdr_t *reph; ++ size_t header_len; ++ char *p; ++ ++ switch (id) { ++ case UCP_AM_ID_ATOMIC_REQ: ++ atomich = data; ++ snprintf(buffer, max, ++ "ATOMIC_REQ [addr 0x%lx len %u reqptr 0x%lx ep 0x%lx op %d]", ++ atomich->address, atomich->length, atomich->req.reqptr, ++ atomich->req.ep_ptr, atomich->opcode); ++ header_len = sizeof(*atomich);; ++ break; ++ case UCP_AM_ID_ATOMIC_REP: ++ reph = data; ++ snprintf(buffer, max, "ATOMIC_REP [reqptr 0x%lx]", reph->req); ++ header_len = sizeof(*reph); ++ break; ++ default: ++ return; ++ } ++ ++ p = buffer + strlen(buffer); ++ ucp_dump_payload(worker->context, p, buffer + max - p, data + header_len, ++ length - header_len); ++} ++ ++UCP_DEFINE_AM(UCP_FEATURE_AMO, UCP_AM_ID_ATOMIC_REQ, ucp_atomic_req_handler, ++ ucp_amo_sw_dump_packet, 0); ++UCP_DEFINE_AM(UCP_FEATURE_AMO, UCP_AM_ID_ATOMIC_REP, ucp_atomic_rep_handler, ++ ucp_amo_sw_dump_packet, 0); ++ ++UCP_DEFINE_AM_PROXY(UCP_AM_ID_ATOMIC_REQ); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/basic_rma.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/basic_rma.c +deleted file mode 100644 +index 68b28cf0c..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/basic_rma.c ++++ /dev/null +@@ -1,425 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* Copyright (c) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include +- +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +- +- +-#define UCP_RMA_CHECK_PARAMS(_buffer, _length) \ +- if ((_length) == 0) { \ +- return UCS_OK; \ +- } \ +- if (ENABLE_PARAMS_CHECK && ((_buffer) == NULL)) { \ +- return UCS_ERR_INVALID_PARAM; \ +- } +- +-/* request can be released if +- * - all fragments were sent (length == 0) (bcopy & zcopy mix) +- * - all zcopy fragments are done (uct_comp.count == 0) +- * - and request was allocated from the mpool +- * (checked in ucp_request_complete_send) +- * +- * Request can be released either immediately or in the completion callback. +- * We must check req length in the completion callback to avoid the following +- * scenario: +- * partial_send;no_resos;progress; +- * send_completed;cb called;req free(ooops); +- * next_partial_send; (oops req already freed) +- */ +-static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_rma_request_advance(ucp_request_t *req, ssize_t frag_length, +- ucs_status_t status) +-{ +- if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { +- if (status != UCS_ERR_NO_RESOURCE) { +- ucp_request_send_buffer_dereg(req); +- ucp_request_complete_send(req, status); +- } +- return status; +- } +- +- req->send.length -= frag_length; +- if (req->send.length == 0) { +- /* bcopy is the fast path */ +- if (ucs_likely(req->send.state.uct_comp.count == 0)) { +- ucp_request_send_buffer_dereg(req); +- ucp_request_complete_send(req, UCS_OK); +- } +- return UCS_OK; +- } +- req->send.buffer += frag_length; +- req->send.rma.remote_addr += frag_length; +- return UCS_INPROGRESS; +-} +- +-static void ucp_rma_request_bcopy_completion(uct_completion_t *self, +- ucs_status_t status) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, +- send.state.uct_comp); +- +- if (ucs_likely(req->send.length == 0)) { +- ucp_request_complete_send(req, UCS_OK); +- } +-} +- +-static void ucp_rma_request_zcopy_completion(uct_completion_t *self, +- ucs_status_t status) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, +- send.state.uct_comp); +- +- if (ucs_likely(req->send.length == 0)) { +- ucp_request_send_buffer_dereg(req); +- ucp_request_complete_send(req, UCS_OK); +- } +-} +- +-static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_rma_request_init(ucp_request_t *req, ucp_ep_h ep, const void *buffer, +- size_t length, uint64_t remote_addr, ucp_rkey_h rkey, +- uct_pending_callback_t cb, size_t zcopy_thresh, int flags) +-{ +- req->flags = flags; /* Implicit release */ +- req->send.ep = ep; +- req->send.buffer = buffer; +- req->send.datatype = ucp_dt_make_contig(1); +- req->send.length = length; +- req->send.rma.remote_addr = remote_addr; +- req->send.rma.rkey = rkey; +- req->send.uct.func = cb; +- req->send.lane = rkey->cache.rma_lane; +- ucp_request_send_state_init(req, ucp_dt_make_contig(1), length); +- ucp_request_send_state_reset(req, +- (length < zcopy_thresh) ? +- ucp_rma_request_bcopy_completion : +- ucp_rma_request_zcopy_completion, +- UCP_REQUEST_SEND_PROTO_RMA); +-#if ENABLE_ASSERT +- req->send.cb = NULL; +-#endif +- if (length < zcopy_thresh) { +- return UCS_OK; +- } +- +- return ucp_request_send_buffer_reg_lane(req, req->send.lane); +-} +- +-static ucs_status_t ucp_progress_put(uct_pending_req_t *self) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); +- ucp_ep_t *ep = req->send.ep; +- ucp_rkey_h rkey = req->send.rma.rkey; +- ucp_lane_index_t lane = req->send.lane; +- ucp_ep_rma_config_t *rma_config = &ucp_ep_config(ep)->rma[lane]; +- ucs_status_t status; +- ssize_t packed_len; +- +- ucs_assert(rkey->cache.ep_cfg_index == ep->cfg_index); +- ucs_assert(rkey->cache.rma_lane == lane); +- +- if (req->send.length <= ucp_ep_config(ep)->bcopy_thresh) { +- packed_len = ucs_min(req->send.length, rma_config->max_put_short); +- status = UCS_PROFILE_CALL(uct_ep_put_short, +- ep->uct_eps[lane], +- req->send.buffer, +- packed_len, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey); +- } else if (ucs_likely(req->send.length < rma_config->put_zcopy_thresh)) { +- ucp_memcpy_pack_context_t pack_ctx; +- pack_ctx.src = req->send.buffer; +- pack_ctx.length = ucs_min(req->send.length, rma_config->max_put_bcopy); +- packed_len = UCS_PROFILE_CALL(uct_ep_put_bcopy, +- ep->uct_eps[lane], +- ucp_memcpy_pack, +- &pack_ctx, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey); +- status = (packed_len > 0) ? UCS_OK : (ucs_status_t)packed_len; +- } else { +- uct_iov_t iov; +- +- /* TODO: leave last fragment for bcopy */ +- packed_len = ucs_min(req->send.length, rma_config->max_put_zcopy); +- /* TODO: use ucp_dt_iov_copy_uct */ +- iov.buffer = (void *)req->send.buffer; +- iov.length = packed_len; +- iov.count = 1; +- iov.memh = req->send.state.dt.dt.contig.memh[0]; +- +- status = UCS_PROFILE_CALL(uct_ep_put_zcopy, +- ep->uct_eps[lane], +- &iov, 1, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey, +- &req->send.state.uct_comp); +- ucp_request_send_state_advance(req, NULL, UCP_REQUEST_SEND_PROTO_RMA, +- status); +- } +- +- return ucp_rma_request_advance(req, packed_len, status); +-} +- +-static ucs_status_t ucp_progress_get(uct_pending_req_t *self) +-{ +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); +- ucp_ep_t *ep = req->send.ep; +- ucp_rkey_h rkey = req->send.rma.rkey; +- ucp_lane_index_t lane = req->send.lane; +- ucp_ep_rma_config_t *rma_config = &ucp_ep_config(ep)->rma[lane]; +- ucs_status_t status; +- size_t frag_length; +- +- ucs_assert(rkey->cache.ep_cfg_index == ep->cfg_index); +- ucs_assert(rkey->cache.rma_lane == lane); +- +- if (ucs_likely(req->send.length < rma_config->get_zcopy_thresh)) { +- frag_length = ucs_min(rma_config->max_get_bcopy, req->send.length); +- status = UCS_PROFILE_CALL(uct_ep_get_bcopy, +- ep->uct_eps[lane], +- (uct_unpack_callback_t)memcpy, +- (void*)req->send.buffer, +- frag_length, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey, +- &req->send.state.uct_comp); +- } else { +- uct_iov_t iov; +- frag_length = ucs_min(req->send.length, rma_config->max_get_zcopy); +- iov.buffer = (void *)req->send.buffer; +- iov.length = frag_length; +- iov.count = 1; +- iov.memh = req->send.state.dt.dt.contig.memh[0]; +- +- status = UCS_PROFILE_CALL(uct_ep_get_zcopy, +- ep->uct_eps[lane], +- &iov, 1, +- req->send.rma.remote_addr, +- rkey->cache.rma_rkey, +- &req->send.state.uct_comp); +- } +- +- if (status == UCS_INPROGRESS) { +- ucp_request_send_state_advance(req, 0, UCP_REQUEST_SEND_PROTO_RMA, +- UCS_INPROGRESS); +- } +- +- return ucp_rma_request_advance(req, frag_length, status); +-} +- +-static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_rma_blocking(ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey, +- uct_pending_callback_t progress_cb, size_t zcopy_thresh) +-{ +- ucs_status_t status; +- ucp_request_t req; +- +- status = ucp_rma_request_init(&req, ep, buffer, length, remote_addr, rkey, +- NULL, zcopy_thresh, 0); +- if (ucs_unlikely(status != UCS_OK)) { +- return status; +- } +- +- /* Loop until all message has been sent. +- * We re-check the configuration on every iteration except for zcopy, +- * because it can be * changed by transport switch. +- */ +- for (;;) { +- /* coverity[callee_ptr_arith] */ +- status = progress_cb(&req.send.uct); +- if (ucs_likely(status == UCS_OK)) { +- break; +- } else if (status == UCS_INPROGRESS) { +- continue; +- } else if (status != UCS_ERR_NO_RESOURCE) { +- break; +- } else { +- ucp_worker_progress(ep->worker); +- } +- } +- +- ucp_request_wait_uct_comp(&req); +- return status; +-} +- +-static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_rma_nonblocking(ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey, +- uct_pending_callback_t progress_cb, size_t zcopy_thresh) +-{ +- ucs_status_t status; +- ucp_request_t *req; +- +- req = ucp_request_get(ep->worker); +- if (req == NULL) { +- return UCS_ERR_NO_MEMORY; +- } +- +- status = ucp_rma_request_init(req, ep, buffer, length, remote_addr, rkey, +- progress_cb, zcopy_thresh, +- UCP_REQUEST_FLAG_RELEASED); +- if (ucs_unlikely(status != UCS_OK)) { +- return status; +- } +- +- return ucp_request_send(req); +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_put, (ep, buffer, length, remote_addr, rkey), +- ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucp_ep_rma_config_t *rma_config; +- ucs_status_t status; +- +- UCP_RMA_CHECK_PARAMS(buffer, length); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- +- if (ucs_likely(length <= rkey->cache.max_put_short)) { +- do { +- /* testing shows that for put message rate it is better to finish +- * put_short here instead of doing it once, getting NO_RESOURCE +- * and continuing to ucp_rma_blocking() +- */ +- status = UCS_PROFILE_CALL(uct_ep_put_short, ep->uct_eps[rkey->cache.rma_lane], +- buffer, length, remote_addr, rkey->cache.rma_rkey); +- if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { +- goto out_unlock; +- } +- +- ucp_worker_progress(ep->worker); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- } while (1); +- } +- +- rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; +- status = ucp_rma_blocking(ep, buffer, length, remote_addr, rkey, +- ucp_progress_put, rma_config->put_zcopy_thresh); +-out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_get, (ep, buffer, length, remote_addr, rkey), +- ucp_ep_h ep, void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucp_ep_rma_config_t *rma_config; +- ucs_status_t status; +- +- UCP_RMA_CHECK_PARAMS(buffer, length); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- +- rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; +- status = ucp_rma_blocking(ep, buffer, length, remote_addr, rkey, +- ucp_progress_get, rma_config->get_zcopy_thresh); +-out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucp_ep_rma_config_t *rma_config; +- ucs_status_t status; +- +- UCP_RMA_CHECK_PARAMS(buffer, length); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- +- /* Fast path for a single short message */ +- if (ucs_likely(length <= rkey->cache.max_put_short)) { +- status = UCS_PROFILE_CALL(uct_ep_put_short, ep->uct_eps[rkey->cache.rma_lane], +- buffer, length, remote_addr, rkey->cache.rma_rkey); +- if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { +- goto out_unlock; +- } +- } +- +- rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; +- status = ucp_rma_nonblocking(ep, buffer, length, remote_addr, rkey, +- ucp_progress_put, rma_config->put_zcopy_thresh); +-out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length, +- uint64_t remote_addr, ucp_rkey_h rkey) +-{ +- ucp_ep_rma_config_t *rma_config; +- ucs_status_t status; +- +- UCP_RMA_CHECK_PARAMS(buffer, length); +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- status = UCP_RKEY_RESOLVE(rkey, ep, rma); +- if (status != UCS_OK) { +- goto out_unlock; +- } +- +- rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; +- status = ucp_rma_nonblocking(ep, buffer, length, remote_addr, rkey, +- ucp_progress_get, rma_config->get_zcopy_thresh); +-out_unlock: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); +- return status; +-} +- +-UCS_PROFILE_FUNC(ucs_status_t, ucp_worker_fence, (worker), ucp_worker_h worker) +-{ +- unsigned rsc_index; +- ucs_status_t status; +- +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); +- +- for (rsc_index = 0; rsc_index < worker->context->num_tls; ++rsc_index) { +- if (worker->ifaces[rsc_index].iface == NULL) { +- continue; +- } +- +- status = uct_iface_fence(worker->ifaces[rsc_index].iface, 0); +- if (status != UCS_OK) { +- goto out; +- } +- } +- status = UCS_OK; +- +-out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); +- return status; +-} +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/flush.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/flush.c +index 71b6b7452..05c8ceabc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/flush.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/flush.c +@@ -8,6 +8,8 @@ + #include + #include + ++#include "rma.inl" ++ + + static void ucp_ep_flush_error(ucp_request_t *req, ucs_status_t status) + { +@@ -19,9 +21,15 @@ static void ucp_ep_flush_error(ucp_request_t *req, ucs_status_t status) + --req->send.state.uct_comp.count; + } + ++static int ucp_ep_flush_is_completed(ucp_request_t *req) ++{ ++ return (req->send.state.uct_comp.count == 0) && req->send.flush.sw_done; ++} ++ + static void ucp_ep_flush_progress(ucp_request_t *req) + { + ucp_ep_h ep = req->send.ep; ++ ucp_ep_flush_state_t *flush_state; + ucp_lane_index_t lane; + ucs_status_t status; + uct_ep_h uct_ep; +@@ -52,6 +60,8 @@ static void ucp_ep_flush_progress(ucp_request_t *req) + if (status == UCS_OK) { + req->send.flush.lanes &= ~UCS_BIT(lane); + --req->send.state.uct_comp.count; ++ ucs_trace("ep %p: flush comp %p count reduced to %d", ep, ++ &req->send.state.uct_comp, req->send.state.uct_comp.count); + } else if (status == UCS_INPROGRESS) { + req->send.flush.lanes &= ~UCS_BIT(lane); + } else if (status == UCS_ERR_NO_RESOURCE) { +@@ -62,7 +72,7 @@ static void ucp_ep_flush_progress(ucp_request_t *req) + break; + } + +- status = uct_ep_pending_add(uct_ep, &req->send.uct); ++ status = uct_ep_pending_add(uct_ep, &req->send.uct, 0); + ucs_trace("adding pending flush on ep %p lane[%d]: %s", ep, lane, + ucs_status_string(status)); + if (status == UCS_OK) { +@@ -77,6 +87,36 @@ static void ucp_ep_flush_progress(ucp_request_t *req) + break; + } + } ++ ++ if (!req->send.flush.sw_started && (req->send.state.uct_comp.count == 0)) { ++ /* Start waiting for remote completions only after all lanes are flushed ++ * on the transport level, so we are sure all pending requests were sent. ++ * We don't need to wait for remote completions in these cases: ++ * - The flush operation is in 'cancel' mode ++ * - The endpoint is either not used or did not resolve the peer endpoint, ++ * which means we didn't have any user operations which require remote ++ * completion. In this case, the flush state may not even be initialized. ++ */ ++ if ((req->send.flush.uct_flags & UCT_FLUSH_FLAG_CANCEL) || ++ !ucs_test_all_flags(ep->flags, UCP_EP_FLAG_USED|UCP_EP_FLAG_DEST_EP)) { ++ ucs_trace_req("flush request %p not waiting for remote completions", ++ req); ++ req->send.flush.sw_done = 1; ++ } else { ++ /* All pending requests were sent, so 'send_sn' value is up-to-date */ ++ flush_state = ucp_ep_flush_state(ep); ++ if (flush_state->send_sn == flush_state->cmpl_sn) { ++ req->send.flush.sw_done = 1; ++ ucs_trace_req("flush request %p remote completions done", req); ++ } else { ++ req->send.flush.cmpl_sn = flush_state->send_sn; ++ ucs_queue_push(&flush_state->reqs, &req->send.flush.queue); ++ ucs_trace_req("added flush request %p to ep remote completion queue" ++ " with sn %d", req, req->send.flush.cmpl_sn); ++ } ++ } ++ req->send.flush.sw_started = 1; ++ } + } + + static void ucp_ep_flush_slow_path_remove(ucp_request_t *req) +@@ -89,10 +129,11 @@ static void ucp_ep_flush_slow_path_remove(ucp_request_t *req) + static int ucp_flush_check_completion(ucp_request_t *req) + { + /* Check if flushed all lanes */ +- if (req->send.state.uct_comp.count != 0) { ++ if (!ucp_ep_flush_is_completed(req)) { + return 0; + } + ++ ucs_trace_req("flush req %p completed", req); + ucp_ep_flush_slow_path_remove(req); + req->send.flush.flushed_cb(req); + return 1; +@@ -141,7 +182,10 @@ static ucs_status_t ucp_ep_flush_progress_pending(uct_pending_req_t *self) + } + + if ((status == UCS_OK) || (status == UCS_INPROGRESS)) { +- req->send.lane = UCP_NULL_LANE; ++ /* flushed callback might release the request */ ++ if (!completed) { ++ req->send.lane = UCP_NULL_LANE; ++ } + return UCS_OK; + } else if (status == UCS_ERR_NO_RESOURCE) { + return UCS_ERR_NO_RESOURCE; +@@ -156,7 +200,7 @@ static void ucp_ep_flush_completion(uct_completion_t *self, ucs_status_t status) + ucp_request_t *req = ucs_container_of(self, ucp_request_t, + send.state.uct_comp); + +- ucs_trace("flush completion req=%p status=%d", req, status); ++ ucs_trace_req("flush completion req=%p status=%d", req, status); + + ucs_assert(!(req->flags & UCP_REQUEST_FLAG_COMPLETED)); + +@@ -165,27 +209,43 @@ static void ucp_ep_flush_completion(uct_completion_t *self, ucs_status_t status) + if (status == UCS_OK) { + ucp_ep_flush_progress(req); + } else { ++ /* force flush completion in case of error */ ++ req->send.flush.sw_done = 1; + req->send.state.uct_comp.count = 0; + } + ++ ++ ucs_trace_req("flush completion req=%p comp_count=%d", req, req->send.state.uct_comp.count); + ucp_flush_check_completion(req); + } + ++void ucp_ep_flush_remote_completed(ucp_request_t *req) ++{ ++ ucs_trace_req("flush remote ops completed req=%p", req); ++ ++ if (!req->send.flush.sw_done) { ++ req->send.flush.sw_done = 1; ++ ucp_flush_check_completion(req); ++ } ++} ++ + ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags, + ucp_send_callback_t req_cb, + unsigned req_flags, +- ucp_request_callback_t flushed_cb) ++ ucp_request_t *worker_req, ++ ucp_request_callback_t flushed_cb, ++ const char *debug_name) + { + ucs_status_t status; + ucp_request_t *req; + +- ucs_debug("disconnect ep %p", ep); ++ ucs_debug("%s ep %p", debug_name, ep); + + if (ep->flags & UCP_EP_FLAG_FAILED) { + return NULL; + } + +- req = ucs_mpool_get(&ep->worker->req_mp); ++ req = ucp_request_get(ep->worker); + if (req == NULL) { + return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + } +@@ -206,6 +266,9 @@ ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags, + req->send.flush.lanes = UCS_MASK(ucp_ep_num_lanes(ep)); + req->send.flush.prog_id = UCS_CALLBACKQ_ID_NULL; + req->send.flush.uct_flags = uct_flags; ++ req->send.flush.worker_req = worker_req; ++ req->send.flush.sw_started = 0; ++ req->send.flush.sw_done = 0; + + req->send.lane = UCP_NULL_LANE; + req->send.uct.func = ucp_ep_flush_progress_pending; +@@ -214,11 +277,11 @@ ucs_status_ptr_t ucp_ep_flush_internal(ucp_ep_h ep, unsigned uct_flags, + + ucp_ep_flush_progress(req); + +- if (req->send.state.uct_comp.count == 0) { ++ if (ucp_ep_flush_is_completed(req)) { + status = req->status; + ucs_trace_req("ep %p: releasing flush request %p, returning status %s", + ep, req, ucs_status_string(status)); +- ucs_mpool_put(req); ++ ucp_request_put(req); + return UCS_STATUS_PTR(status); + } + +@@ -237,13 +300,13 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_ep_flush_nb, (ep, flags, cb), + { + void *request; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + +- request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, +- cb, UCP_REQUEST_FLAG_CALLBACK, +- ucp_ep_flushed_callback); ++ request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, cb, ++ UCP_REQUEST_FLAG_CALLBACK, NULL, ++ ucp_ep_flushed_callback, "flush_nb"); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + + return request; + } +@@ -253,7 +316,7 @@ static ucs_status_t ucp_worker_flush_check(ucp_worker_h worker) + ucs_status_t status; + unsigned rsc_index; + +- if (worker->wireup_pend_count > 0) { ++ if (worker->flush_ops_count) { + return UCS_INPROGRESS; + } + +@@ -264,6 +327,12 @@ static ucs_status_t ucp_worker_flush_check(ucp_worker_h worker) + + status = uct_iface_flush(worker->ifaces[rsc_index].iface, 0, NULL); + if (status != UCS_OK) { ++ if (UCS_STATUS_IS_ERR(status)) { ++ ucs_error("iface[%d] "UCT_TL_RESOURCE_DESC_FMT" flush failed: %s", ++ rsc_index, ++ UCT_TL_RESOURCE_DESC_ARG(&worker->context->tl_rscs[rsc_index].tl_rsc), ++ ucs_status_string(status)); ++ } + return status; + } + } +@@ -271,19 +340,73 @@ static ucs_status_t ucp_worker_flush_check(ucp_worker_h worker) + return UCS_OK; + } + +-static unsigned ucp_worker_flush_progress(void *arg) ++static void ucp_worker_flush_complete_one(ucp_request_t *req, ucs_status_t status, ++ int force_progress_unreg) + { +- ucp_request_t *req = arg; + ucp_worker_h worker = req->flush_worker.worker; ++ int complete; ++ ++ --req->flush_worker.comp_count; ++ complete = (req->flush_worker.comp_count == 0) || (status != UCS_OK); ++ ++ if (complete || force_progress_unreg) { ++ uct_worker_progress_unregister_safe(worker->uct, ++ &req->flush_worker.prog_id); ++ } ++ ++ if (complete) { ++ ucs_assert(status != UCS_INPROGRESS); ++ ucp_request_complete(req, flush_worker.cb, status); ++ } ++} ++ ++static void ucp_worker_flush_ep_flushed_cb(ucp_request_t *req) ++{ ++ ucp_worker_flush_complete_one(req->send.flush.worker_req, UCS_OK, 0); ++ ucp_request_put(req); ++} ++ ++static unsigned ucp_worker_flush_progress(void *arg) ++{ ++ ucp_request_t *req = arg; ++ ucp_worker_h worker = req->flush_worker.worker; ++ ucp_ep_ext_gen_t *next_ep = req->flush_worker.next_ep; ++ void *ep_flush_request; + ucs_status_t status; ++ ucp_ep_h ep; + + status = ucp_worker_flush_check(worker); +- if ((status == UCS_INPROGRESS) || (status == UCS_ERR_NO_RESOURCE)) { +- return 0; ++ if ((status == UCS_OK) || (&next_ep->ep_list == &worker->all_eps)) { ++ /* If all ifaces are flushed, or we finished going over all endpoints, ++ * no need to progress this request actively any more. Just wait until ++ * all associated endpoint flush requests are completed. ++ */ ++ ucp_worker_flush_complete_one(req, UCS_OK, 1); ++ } else if (status != UCS_INPROGRESS) { ++ /* Error returned from uct iface flush */ ++ ucp_worker_flush_complete_one(req, status, 1); ++ } else if (worker->context->config.ext.flush_worker_eps) { ++ /* Some endpoints are not flushed yet. Take next endpoint from the list ++ * and start flush operation on it. ++ */ ++ ep = ucp_ep_from_ext_gen(next_ep); ++ req->flush_worker.next_ep = ucs_list_next(&next_ep->ep_list, ++ ucp_ep_ext_gen_t, ep_list); ++ ++ ep_flush_request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, NULL, ++ UCP_REQUEST_FLAG_RELEASED, req, ++ ucp_worker_flush_ep_flushed_cb, ++ "flush_worker"); ++ if (UCS_PTR_IS_ERR(ep_flush_request)) { ++ /* endpoint flush resulted in an error */ ++ status = UCS_PTR_STATUS(ep_flush_request); ++ ucs_warn("ucp_ep_flush_internal() failed: %s", ucs_status_string(status)); ++ } else if (ep_flush_request != NULL) { ++ /* endpoint flush started, increment refcount */ ++ ++req->flush_worker.comp_count; ++ } + } + +- uct_worker_progress_unregister_safe(worker->uct, &req->flush_worker.prog_id); +- ucp_request_complete(req, flush_worker.cb, status); + return 0; + } + +@@ -299,16 +422,20 @@ static ucs_status_ptr_t ucp_worker_flush_nb_internal(ucp_worker_h worker, + return UCS_STATUS_PTR(status); + } + +- req = ucs_mpool_get(&worker->req_mp); ++ req = ucp_request_get(worker); + if (req == NULL) { + return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + } + +- req->flags = req_flags; +- req->status = UCS_OK; +- req->flush_worker.worker = worker; +- req->flush_worker.cb = cb; +- req->flush_worker.prog_id = UCS_CALLBACKQ_ID_NULL; ++ req->flags = req_flags; ++ req->status = UCS_OK; ++ req->flush_worker.worker = worker; ++ req->flush_worker.cb = cb; ++ req->flush_worker.comp_count = 1; /* counting starts from 1, and decremented ++ when finished going over all endpoints */ ++ req->flush_worker.prog_id = UCS_CALLBACKQ_ID_NULL; ++ req->flush_worker.next_ep = ucs_list_head(&worker->all_eps, ++ ucp_ep_ext_gen_t, ep_list); + + uct_worker_progress_register_safe(worker->uct, ucp_worker_flush_progress, + req, 0, &req->flush_worker.prog_id); +@@ -320,33 +447,19 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_worker_flush_nb, (worker, flags, cb), + { + void *request; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + request = ucp_worker_flush_nb_internal(worker, cb, + UCP_REQUEST_FLAG_CALLBACK); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return request; + } + + static ucs_status_t ucp_flush_wait(ucp_worker_h worker, void *request) + { +- ucs_status_t status; +- +- if (request == NULL) { +- return UCS_OK; +- } else if (UCS_PTR_IS_ERR(request)) { +- ucs_warn("flush failed: %s", ucs_status_string(UCS_PTR_STATUS(request))); +- return UCS_PTR_STATUS(request); +- } else { +- do { +- ucp_worker_progress(worker); +- status = ucp_request_check_status(request); +- } while (status == UCS_INPROGRESS); +- ucp_request_release(request); +- return status; +- } ++ return ucp_rma_wait(worker, request, "flush"); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_worker_flush, (worker), ucp_worker_h worker) +@@ -354,12 +467,12 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_worker_flush, (worker), ucp_worker_h worker) + ucs_status_t status; + void *request; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + request = ucp_worker_flush_nb_internal(worker, NULL, 0); + status = ucp_flush_wait(worker, request); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return status; + } +@@ -369,12 +482,36 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_ep_flush, (ep), ucp_ep_h ep) + ucs_status_t status; + void *request; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + +- request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, NULL, 0, +- ucp_ep_flushed_callback); ++ request = ucp_ep_flush_internal(ep, UCT_FLUSH_FLAG_LOCAL, NULL, 0, NULL, ++ ucp_ep_flushed_callback, "flush"); + status = ucp_flush_wait(ep->worker, request); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_worker_fence, (worker), ucp_worker_h worker) ++{ ++ unsigned rsc_index; ++ ucs_status_t status; ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); ++ ++ for (rsc_index = 0; rsc_index < worker->context->num_tls; ++rsc_index) { ++ if (worker->ifaces[rsc_index].iface == NULL) { ++ continue; ++ } ++ ++ status = uct_iface_fence(worker->ifaces[rsc_index].iface, 0); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ } ++ status = UCS_OK; ++ ++out: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return status; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.h +new file mode 100644 +index 000000000..84b9608b3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.h +@@ -0,0 +1,86 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCP_RMA_H_ ++#define UCP_RMA_H_ ++ ++#include ++ ++ ++/** ++ * Defines functions for RMA protocol ++ */ ++struct ucp_rma_proto { ++ const char *name; ++ uct_pending_callback_t progress_put; ++ uct_pending_callback_t progress_get; ++}; ++ ++ ++/** ++ * Defines functions for AMO protocol ++ */ ++struct ucp_amo_proto { ++ const char *name; ++ uct_pending_callback_t progress_fetch; ++ uct_pending_callback_t progress_post; ++}; ++ ++ ++/** ++ * Atomic reply data ++ */ ++typedef union { ++ uint32_t reply32; /* 32-bit reply */ ++ uint64_t reply64; /* 64-bit reply */ ++} ucp_atomic_reply_t; ++ ++ ++typedef struct { ++ uint64_t address; ++ uintptr_t ep_ptr; ++} UCS_S_PACKED ucp_put_hdr_t; ++ ++ ++typedef struct { ++ uintptr_t ep_ptr; ++} UCS_S_PACKED ucp_cmpl_hdr_t; ++ ++ ++typedef struct { ++ uint64_t address; ++ uint64_t length; ++ ucp_request_hdr_t req; ++} UCS_S_PACKED ucp_get_req_hdr_t; ++ ++ ++typedef struct { ++ uintptr_t req; ++} UCS_S_PACKED ucp_rma_rep_hdr_t; ++ ++ ++typedef struct { ++ uint64_t address; ++ ucp_request_hdr_t req; // NULL if no reply ++ uint8_t length; ++ uint8_t opcode; ++} UCS_S_PACKED ucp_atomic_req_hdr_t; ++ ++ ++extern ucp_rma_proto_t ucp_rma_basic_proto; ++extern ucp_rma_proto_t ucp_rma_sw_proto; ++extern ucp_amo_proto_t ucp_amo_basic_proto; ++extern ucp_amo_proto_t ucp_amo_sw_proto; ++ ++ ++ucs_status_t ucp_rma_request_advance(ucp_request_t *req, ssize_t frag_length, ++ ucs_status_t status); ++ ++void ucp_ep_flush_remote_completed(ucp_request_t *req); ++ ++void ucp_rma_sw_send_cmpl(ucp_ep_h ep); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.inl +new file mode 100644 +index 000000000..d1828dd1f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma.inl +@@ -0,0 +1,80 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCP_RMA_INL_ ++#define UCP_RMA_INL_ ++ ++#include "rma.h" ++ ++#include ++#include ++#include ++ ++ ++static UCS_F_ALWAYS_INLINE ucs_status_ptr_t ++ucp_rma_send_request_cb(ucp_request_t *req, ucp_send_callback_t cb) ++{ ++ ucs_status_t status = ucp_request_send(req); ++ ++ if (req->flags & UCP_REQUEST_FLAG_COMPLETED) { ++ ucs_trace_req("releasing send request %p, returning status %s", req, ++ ucs_status_string(status)); ++ ucs_mpool_put(req); ++ return UCS_STATUS_PTR(status); ++ } ++ ++ ucs_trace_req("returning request %p, status %s", req, ++ ucs_status_string(status)); ++ ucp_request_set_callback(req, send.cb, cb); ++ return req + 1; ++} ++ ++static inline ucs_status_t ucp_rma_wait(ucp_worker_h worker, void *user_req, ++ const char *op_name) ++{ ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ if (ucs_likely(user_req == NULL)) { ++ return UCS_OK; ++ } else if (ucs_unlikely(UCS_PTR_IS_ERR(user_req))) { ++ ucs_warn("%s failed: %s", op_name, ++ ucs_status_string(UCS_PTR_STATUS(user_req))); ++ return UCS_PTR_STATUS(user_req); ++ } else { ++ req = (ucp_request_t*)user_req - 1; ++ do { ++ ucp_worker_progress(worker); ++ status = ucp_request_check_status(user_req); ++ } while (!(req->flags & UCP_REQUEST_FLAG_COMPLETED)); ++ status = req->status; ++ ucp_request_release(user_req); ++ return status; ++ } ++} ++ ++static inline void ucp_ep_rma_remote_request_sent(ucp_ep_t *ep) ++{ ++ ++ucp_ep_flush_state(ep)->send_sn; ++ ++ep->worker->flush_ops_count; ++} ++ ++static inline void ucp_ep_rma_remote_request_completed(ucp_ep_t *ep) ++{ ++ ucp_ep_flush_state_t *flush_state = ucp_ep_flush_state(ep); ++ ucp_request_t *req; ++ ++ --ep->worker->flush_ops_count; ++ ++flush_state->cmpl_sn; ++ ++ ucs_queue_for_each_extract(req, &flush_state->reqs, send.flush.queue, ++ UCS_CIRCULAR_COMPARE32(req->send.flush.cmpl_sn, ++ <= ,flush_state->cmpl_sn)) { ++ ucp_ep_flush_remote_completed(req); ++ } ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_basic.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_basic.c +new file mode 100644 +index 000000000..e101d2322 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_basic.c +@@ -0,0 +1,123 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* Copyright (c) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. ++* Copyright (C) Los Alamos National Security, LLC. 2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "rma.h" ++ ++#include ++ ++ ++static ucs_status_t ucp_rma_basic_progress_put(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ucp_rkey_h rkey = req->send.rma.rkey; ++ ucp_lane_index_t lane = req->send.lane; ++ ucp_ep_rma_config_t *rma_config = &ucp_ep_config(ep)->rma[lane]; ++ ucs_status_t status; ++ ssize_t packed_len; ++ ++ ucs_assert(rkey->cache.ep_cfg_index == ep->cfg_index); ++ ucs_assert(rkey->cache.rma_lane == lane); ++ ++ if ((req->send.length <= rma_config->max_put_short) || ++ (req->send.length <= ucp_ep_config(ep)->bcopy_thresh)) ++ { ++ packed_len = ucs_min(req->send.length, rma_config->max_put_short); ++ status = UCS_PROFILE_CALL(uct_ep_put_short, ++ ep->uct_eps[lane], ++ req->send.buffer, ++ packed_len, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey); ++ } else if (ucs_likely(req->send.length < rma_config->put_zcopy_thresh)) { ++ ucp_memcpy_pack_context_t pack_ctx; ++ pack_ctx.src = req->send.buffer; ++ pack_ctx.length = ucs_min(req->send.length, rma_config->max_put_bcopy); ++ packed_len = UCS_PROFILE_CALL(uct_ep_put_bcopy, ++ ep->uct_eps[lane], ++ ucp_memcpy_pack, ++ &pack_ctx, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey); ++ status = (packed_len > 0) ? UCS_OK : (ucs_status_t)packed_len; ++ } else { ++ uct_iov_t iov; ++ ++ /* TODO: leave last fragment for bcopy */ ++ packed_len = ucs_min(req->send.length, rma_config->max_put_zcopy); ++ /* TODO: use ucp_dt_iov_copy_uct */ ++ iov.buffer = (void *)req->send.buffer; ++ iov.length = packed_len; ++ iov.count = 1; ++ iov.memh = req->send.state.dt.dt.contig.memh[0]; ++ ++ status = UCS_PROFILE_CALL(uct_ep_put_zcopy, ++ ep->uct_eps[lane], ++ &iov, 1, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey, ++ &req->send.state.uct_comp); ++ ucp_request_send_state_advance(req, NULL, UCP_REQUEST_SEND_PROTO_RMA, ++ status); ++ } ++ ++ return ucp_rma_request_advance(req, packed_len, status); ++} ++ ++static ucs_status_t ucp_rma_basic_progress_get(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ucp_rkey_h rkey = req->send.rma.rkey; ++ ucp_lane_index_t lane = req->send.lane; ++ ucp_ep_rma_config_t *rma_config = &ucp_ep_config(ep)->rma[lane]; ++ ucs_status_t status; ++ size_t frag_length; ++ ++ ucs_assert(rkey->cache.ep_cfg_index == ep->cfg_index); ++ ucs_assert(rkey->cache.rma_lane == lane); ++ ++ if (ucs_likely(req->send.length < rma_config->get_zcopy_thresh)) { ++ frag_length = ucs_min(rma_config->max_get_bcopy, req->send.length); ++ status = UCS_PROFILE_CALL(uct_ep_get_bcopy, ++ ep->uct_eps[lane], ++ (uct_unpack_callback_t)memcpy, ++ (void*)req->send.buffer, ++ frag_length, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey, ++ &req->send.state.uct_comp); ++ } else { ++ uct_iov_t iov; ++ frag_length = ucs_min(req->send.length, rma_config->max_get_zcopy); ++ iov.buffer = (void *)req->send.buffer; ++ iov.length = frag_length; ++ iov.count = 1; ++ iov.memh = req->send.state.dt.dt.contig.memh[0]; ++ ++ status = UCS_PROFILE_CALL(uct_ep_get_zcopy, ++ ep->uct_eps[lane], ++ &iov, 1, ++ req->send.rma.remote_addr, ++ rkey->cache.rma_rkey, ++ &req->send.state.uct_comp); ++ } ++ ++ if (status == UCS_INPROGRESS) { ++ ucp_request_send_state_advance(req, 0, UCP_REQUEST_SEND_PROTO_RMA, ++ UCS_INPROGRESS); ++ } ++ ++ return ucp_rma_request_advance(req, frag_length, status); ++} ++ ++ucp_rma_proto_t ucp_rma_basic_proto = { ++ .name = "basic_rma", ++ .progress_put = ucp_rma_basic_progress_put, ++ .progress_get = ucp_rma_basic_progress_get ++}; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_send.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_send.c +new file mode 100644 +index 000000000..aaca06286 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_send.c +@@ -0,0 +1,341 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++ ++#include ++#include ++ ++ ++#define UCP_RMA_CHECK_BUFFER(_buffer, _action) \ ++ do { \ ++ if (ENABLE_PARAMS_CHECK && ucs_unlikely((_buffer) == NULL)) { \ ++ _action; \ ++ } \ ++ } while (0) ++ ++ ++#define UCP_RMA_CHECK_ZERO_LENGTH(_length, _action) \ ++ do { \ ++ if ((_length) == 0) { \ ++ _action; \ ++ } \ ++ } while (0) ++ ++ ++#define UCP_RMA_CHECK(_context, _buffer, _length) \ ++ do { \ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(_context, UCP_FEATURE_RMA, \ ++ return UCS_ERR_INVALID_PARAM); \ ++ UCP_RMA_CHECK_ZERO_LENGTH(_length, return UCS_OK); \ ++ UCP_RMA_CHECK_BUFFER(_buffer, return UCS_ERR_INVALID_PARAM); \ ++ } while (0) ++ ++ ++#define UCP_RMA_CHECK_PTR(_context, _buffer, _length) \ ++ do { \ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(_context, UCP_FEATURE_RMA, \ ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); \ ++ UCP_RMA_CHECK_ZERO_LENGTH(_length, return NULL); \ ++ UCP_RMA_CHECK_BUFFER(_buffer, \ ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); \ ++ } while (0) ++ ++ ++/* request can be released if ++ * - all fragments were sent (length == 0) (bcopy & zcopy mix) ++ * - all zcopy fragments are done (uct_comp.count == 0) ++ * - and request was allocated from the mpool ++ * (checked in ucp_request_complete_send) ++ * ++ * Request can be released either immediately or in the completion callback. ++ * We must check req length in the completion callback to avoid the following ++ * scenario: ++ * partial_send;no_resos;progress; ++ * send_completed;cb called;req free(ooops); ++ * next_partial_send; (oops req already freed) ++ */ ++ucs_status_t ucp_rma_request_advance(ucp_request_t *req, ssize_t frag_length, ++ ucs_status_t status) ++{ ++ ucs_assert(status != UCS_ERR_NOT_IMPLEMENTED); ++ ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ if (status != UCS_ERR_NO_RESOURCE) { ++ ucp_request_send_buffer_dereg(req); ++ ucp_request_complete_send(req, status); ++ } ++ return status; ++ } ++ ++ ucs_assert(frag_length >= 0); ++ ucs_assert(req->send.length >= frag_length); ++ req->send.length -= frag_length; ++ if (req->send.length == 0) { ++ /* bcopy is the fast path */ ++ if (ucs_likely(req->send.state.uct_comp.count == 0)) { ++ ucp_request_send_buffer_dereg(req); ++ ucp_request_complete_send(req, UCS_OK); ++ } ++ return UCS_OK; ++ } ++ req->send.buffer += frag_length; ++ req->send.rma.remote_addr += frag_length; ++ return UCS_INPROGRESS; ++} ++ ++static void ucp_rma_request_bcopy_completion(uct_completion_t *self, ++ ucs_status_t status) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, ++ send.state.uct_comp); ++ ++ if (ucs_likely(req->send.length == req->send.state.dt.offset)) { ++ ucp_request_complete_send(req, status); ++ } ++} ++ ++static void ucp_rma_request_zcopy_completion(uct_completion_t *self, ++ ucs_status_t status) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, ++ send.state.uct_comp); ++ ++ if (ucs_likely(req->send.length == req->send.state.dt.offset)) { ++ ucp_request_send_buffer_dereg(req); ++ ucp_request_complete_send(req, status); ++ } ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_rma_request_init(ucp_request_t *req, ucp_ep_h ep, const void *buffer, ++ size_t length, uint64_t remote_addr, ucp_rkey_h rkey, ++ uct_pending_callback_t cb, size_t zcopy_thresh, int flags) ++{ ++ req->flags = flags; /* Implicit release */ ++ req->send.ep = ep; ++ req->send.buffer = (void*)buffer; ++ req->send.datatype = ucp_dt_make_contig(1); ++ req->send.mem_type = UCT_MD_MEM_TYPE_HOST; ++ req->send.length = length; ++ req->send.rma.remote_addr = remote_addr; ++ req->send.rma.rkey = rkey; ++ req->send.uct.func = cb; ++ req->send.lane = rkey->cache.rma_lane; ++ ucp_request_send_state_init(req, ucp_dt_make_contig(1), length); ++ ucp_request_send_state_reset(req, ++ (length < zcopy_thresh) ? ++ ucp_rma_request_bcopy_completion : ++ ucp_rma_request_zcopy_completion, ++ UCP_REQUEST_SEND_PROTO_RMA); ++#if ENABLE_ASSERT ++ req->send.cb = NULL; ++#endif ++ if (length < zcopy_thresh) { ++ return UCS_OK; ++ } ++ ++ return ucp_request_send_buffer_reg_lane(req, req->send.lane); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_rma_nonblocking(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ uct_pending_callback_t progress_cb, size_t zcopy_thresh) ++{ ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ req = ucp_request_get(ep->worker); ++ if (req == NULL) { ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ status = ucp_rma_request_init(req, ep, buffer, length, remote_addr, rkey, ++ progress_cb, zcopy_thresh, ++ UCP_REQUEST_FLAG_RELEASED); ++ if (ucs_unlikely(status != UCS_OK)) { ++ return status; ++ } ++ ++ return ucp_request_send(req); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_ptr_t ++ucp_rma_nonblocking_cb(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ uct_pending_callback_t progress_cb, size_t zcopy_thresh, ++ ucp_send_callback_t cb) ++{ ++ ucs_status_t status; ++ ucp_request_t *req; ++ ++ req = ucp_request_get(ep->worker); ++ if (req == NULL) { ++ return UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); ++ } ++ ++ status = ucp_rma_request_init(req, ep, buffer, length, remote_addr, rkey, ++ progress_cb, zcopy_thresh, 0); ++ if (ucs_unlikely(status != UCS_OK)) { ++ return UCS_STATUS_PTR(status); ++ } ++ ++ return ucp_rma_send_request_cb(req, cb); ++} ++ ++ucs_status_t ucp_put_nbi(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ ucp_ep_rma_config_t *rma_config; ++ ucs_status_t status; ++ ++ UCP_RMA_CHECK(ep->worker->context, buffer, length); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ ucs_trace_req("put_nbi buffer %p length %zu remote_addr %"PRIx64" rkey %p to %s", ++ buffer, length, remote_addr, rkey, ucp_ep_peer_name(ep)); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, rma); ++ if (status != UCS_OK) { ++ goto out_unlock; ++ } ++ ++ /* Fast path for a single short message */ ++ if (ucs_likely((ssize_t)length <= (int)rkey->cache.max_put_short)) { ++ status = UCS_PROFILE_CALL(uct_ep_put_short, ep->uct_eps[rkey->cache.rma_lane], ++ buffer, length, remote_addr, rkey->cache.rma_rkey); ++ if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { ++ goto out_unlock; ++ } ++ } ++ ++ rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; ++ status = ucp_rma_nonblocking(ep, buffer, length, remote_addr, rkey, ++ rkey->cache.rma_proto->progress_put, ++ rma_config->put_zcopy_thresh); ++out_unlock: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status; ++} ++ ++ucs_status_ptr_t ucp_put_nb(ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb) ++{ ++ ucp_ep_rma_config_t *rma_config; ++ ucs_status_ptr_t ptr_status; ++ ucs_status_t status; ++ ++ UCP_RMA_CHECK_PTR(ep->worker->context, buffer, length); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ ucs_trace_req("put_nb buffer %p length %zu remote_addr %"PRIx64" rkey %p to %s cb %p", ++ buffer, length, remote_addr, rkey, ucp_ep_peer_name(ep), cb); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, rma); ++ if (status != UCS_OK) { ++ ptr_status = UCS_STATUS_PTR(status); ++ goto out_unlock; ++ } ++ ++ /* Fast path for a single short message */ ++ if (ucs_likely((ssize_t)length <= (int)rkey->cache.max_put_short)) { ++ status = UCS_PROFILE_CALL(uct_ep_put_short, ep->uct_eps[rkey->cache.rma_lane], ++ buffer, length, remote_addr, rkey->cache.rma_rkey); ++ if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { ++ ptr_status = UCS_STATUS_PTR(status); ++ goto out_unlock; ++ } ++ } ++ ++ rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; ++ ptr_status = ucp_rma_nonblocking_cb(ep, buffer, length, remote_addr, rkey, ++ rkey->cache.rma_proto->progress_put, ++ rma_config->put_zcopy_thresh, cb); ++out_unlock: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return ptr_status; ++} ++ ++ucs_status_t ucp_get_nbi(ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ ucp_ep_rma_config_t *rma_config; ++ ucs_status_t status; ++ ++ UCP_RMA_CHECK(ep->worker->context, buffer, length); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ ucs_trace_req("get_nbi buffer %p length %zu remote_addr %"PRIx64" rkey %p from %s", ++ buffer, length, remote_addr, rkey, ucp_ep_peer_name(ep)); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, rma); ++ if (status != UCS_OK) { ++ goto out_unlock; ++ } ++ ++ rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; ++ status = ucp_rma_nonblocking(ep, buffer, length, remote_addr, rkey, ++ rkey->cache.rma_proto->progress_get, ++ rma_config->get_zcopy_thresh); ++out_unlock: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return status; ++} ++ ++ucs_status_ptr_t ucp_get_nb(ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey, ++ ucp_send_callback_t cb) ++{ ++ ucp_ep_rma_config_t *rma_config; ++ ucs_status_ptr_t ptr_status; ++ ucs_status_t status; ++ ++ UCP_RMA_CHECK_PTR(ep->worker->context, buffer, length); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ ucs_trace_req("get_nb buffer %p length %zu remote_addr %"PRIx64" rkey %p from %s cb %p", ++ buffer, length, remote_addr, rkey, ucp_ep_peer_name(ep), cb); ++ ++ status = UCP_RKEY_RESOLVE(rkey, ep, rma); ++ if (status != UCS_OK) { ++ ptr_status = UCS_STATUS_PTR(status); ++ goto out_unlock; ++ } ++ ++ rma_config = &ucp_ep_config(ep)->rma[rkey->cache.rma_lane]; ++ ptr_status = ucp_rma_nonblocking_cb(ep, buffer, length, remote_addr, rkey, ++ rkey->cache.rma_proto->progress_get, ++ rma_config->get_zcopy_thresh, cb); ++out_unlock: ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ return ptr_status; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_put, (ep, buffer, length, remote_addr, rkey), ++ ucp_ep_h ep, const void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ return ucp_rma_wait(ep->worker, ++ ucp_put_nb(ep, buffer, length, remote_addr, rkey, ++ (void*)ucs_empty_function), ++ "put"); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_get, (ep, buffer, length, remote_addr, rkey), ++ ucp_ep_h ep, void *buffer, size_t length, ++ uint64_t remote_addr, ucp_rkey_h rkey) ++{ ++ return ucp_rma_wait(ep->worker, ++ ucp_get_nb(ep, buffer, length, remote_addr, rkey, ++ (void*)ucs_empty_function), ++ "get"); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_sw.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_sw.c +new file mode 100644 +index 000000000..bd40e8515 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/rma/rma_sw.c +@@ -0,0 +1,294 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "rma.h" ++#include "rma.inl" ++ ++#include ++#include ++ ++ ++static size_t ucp_rma_sw_put_pack_cb(void *dest, void *arg) ++{ ++ ucp_request_t *req = arg; ++ ucp_ep_t *ep = req->send.ep; ++ ucp_put_hdr_t *puth = dest; ++ size_t length; ++ ++ puth->address = req->send.rma.remote_addr; ++ puth->ep_ptr = ucp_ep_dest_ep_ptr(ep); ++ ++ ucs_assert(puth->ep_ptr != 0); ++ ++ length = ucs_min(req->send.length, ++ ucp_ep_config(ep)->am.max_bcopy - sizeof(*puth)); ++ memcpy(puth + 1, req->send.buffer, length); ++ ++ return sizeof(*puth) + length; ++} ++ ++static ucs_status_t ucp_rma_sw_progress_put(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ssize_t packed_len; ++ ucs_status_t status; ++ ++ ucs_assert(req->send.lane == ucp_ep_get_am_lane(ep)); ++ ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_PUT, ++ ucp_rma_sw_put_pack_cb, req, 0); ++ if (packed_len > 0) { ++ status = UCS_OK; ++ ucp_ep_rma_remote_request_sent(ep); ++ } else { ++ status = (ucs_status_t)packed_len; ++ } ++ ++ return ucp_rma_request_advance(req, packed_len - sizeof(ucp_put_hdr_t), ++ status); ++} ++ ++static size_t ucp_rma_sw_get_req_pack_cb(void *dest, void *arg) ++{ ++ ucp_request_t *req = arg; ++ ucp_get_req_hdr_t *getreqh = dest; ++ ++ getreqh->address = req->send.rma.remote_addr; ++ getreqh->length = req->send.length; ++ getreqh->req.ep_ptr = ucp_ep_dest_ep_ptr(req->send.ep); ++ getreqh->req.reqptr = (uintptr_t)req; ++ ucs_assert(getreqh->req.ep_ptr != 0); ++ ++ return sizeof(*getreqh); ++} ++ ++static ucs_status_t ucp_rma_sw_progress_get(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ucs_status_t status; ++ ssize_t packed_len; ++ ++ ucs_assert(req->send.lane == ucp_ep_get_am_lane(ep)); ++ ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_GET_REQ, ++ ucp_rma_sw_get_req_pack_cb, req, 0); ++ if (packed_len < 0) { ++ status = (ucs_status_t)packed_len; ++ if (status != UCS_ERR_NO_RESOURCE) { ++ ucp_request_complete_send(req, status); ++ } ++ return status; ++ } ++ ++ /* get request packet sent, complete the request object when all data arrives */ ++ ucs_assert(packed_len == sizeof(ucp_get_req_hdr_t)); ++ ucp_ep_rma_remote_request_sent(ep); ++ return UCS_OK; ++} ++ ++ucp_rma_proto_t ucp_rma_sw_proto = { ++ .name = "sw_rma", ++ .progress_put = ucp_rma_sw_progress_put, ++ .progress_get = ucp_rma_sw_progress_get ++}; ++ ++static size_t ucp_rma_sw_pack_rma_ack(void *dest, void *arg) ++{ ++ ucp_cmpl_hdr_t *hdr = dest; ++ ucp_request_t *req = arg; ++ ++ hdr->ep_ptr = ucp_ep_dest_ep_ptr(req->send.ep); ++ return sizeof(*hdr); ++} ++ ++static ucs_status_t ucp_progress_rma_cmpl(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ssize_t packed_len; ++ ++ req->send.lane = ucp_ep_get_am_lane(ep); ++ ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_CMPL, ++ ucp_rma_sw_pack_rma_ack, req, 0); ++ if (packed_len < 0) { ++ return (ucs_status_t)packed_len; ++ } ++ ++ ucs_assert(packed_len == sizeof(ucp_cmpl_hdr_t)); ++ ucp_request_put(req); ++ return UCS_OK; ++} ++ ++void ucp_rma_sw_send_cmpl(ucp_ep_h ep) ++{ ++ ucp_request_t *req; ++ ++ req = ucp_request_get(ep->worker); ++ ucs_assert(req != NULL); ++ ++ req->send.ep = ep; ++ req->send.uct.func = ucp_progress_rma_cmpl; ++ ucp_request_send(req); ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_put_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_put_hdr_t *puth = data; ++ ucp_worker_h worker = arg; ++ ++ memcpy((void*)puth->address, puth + 1, length - sizeof(*puth)); ++ ucp_rma_sw_send_cmpl(ucp_worker_get_ep_by_ptr(worker, puth->ep_ptr)); ++ return UCS_OK; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_rma_cmpl_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_cmpl_hdr_t *putackh = data; ++ ucp_worker_h worker = arg; ++ ucp_ep_h ep = ucp_worker_get_ep_by_ptr(worker, putackh->ep_ptr); ++ ++ ucp_ep_rma_remote_request_completed(ep); ++ return UCS_OK; ++} ++ ++static size_t ucp_rma_sw_pack_get_reply(void *dest, void *arg) ++{ ++ ucp_rma_rep_hdr_t *hdr = dest; ++ ucp_request_t *req = arg; ++ size_t length; ++ ++ length = ucs_min(req->send.length, ++ ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr)); ++ hdr->req = req->send.get_reply.req; ++ memcpy(hdr + 1, req->send.buffer, length); ++ ++ return sizeof(*hdr) + length; ++} ++ ++static ucs_status_t ucp_progress_get_reply(uct_pending_req_t *self) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucp_ep_t *ep = req->send.ep; ++ ssize_t packed_len, payload_len; ++ ++ req->send.lane = ucp_ep_get_am_lane(ep); ++ packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_GET_REP, ++ ucp_rma_sw_pack_get_reply, req, 0); ++ if (packed_len < 0) { ++ return (ucs_status_t)packed_len; ++ } ++ ++ payload_len = packed_len - sizeof(ucp_rma_rep_hdr_t); ++ ucs_assert(payload_len >= 0); ++ ++ req->send.buffer += payload_len; ++ req->send.length -= payload_len; ++ ++ if (req->send.length == 0) { ++ ucp_request_put(req); ++ return UCS_OK; ++ } else { ++ return UCS_INPROGRESS; ++ } ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_get_req_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_get_req_hdr_t *getreqh = data; ++ ucp_worker_h worker = arg; ++ ucp_ep_h ep = ucp_worker_get_ep_by_ptr(worker, ++ getreqh->req.ep_ptr); ++ ucp_request_t *req; ++ ++ req = ucp_request_get(worker); ++ ucs_assert(req != NULL); ++ ++ req->send.ep = ep; ++ req->send.buffer = (void*)getreqh->address; ++ req->send.length = getreqh->length; ++ req->send.get_reply.req = getreqh->req.reqptr; ++ req->send.uct.func = ucp_progress_get_reply; ++ ++ ucp_request_send(req); ++ return UCS_OK; ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucp_get_rep_handler, (arg, data, length, am_flags), ++ void *arg, void *data, size_t length, unsigned am_flags) ++{ ++ ucp_rma_rep_hdr_t *getreph = data; ++ size_t frag_length = length - sizeof(*getreph); ++ ucp_request_t *req = (ucp_request_t*)getreph->req; ++ ucp_ep_h ep = req->send.ep; ++ ++ memcpy(req->send.buffer, getreph + 1, frag_length); ++ ++ /* complete get request on last fragment of the reply */ ++ if (ucp_rma_request_advance(req, frag_length, UCS_OK) == UCS_OK) { ++ ucp_ep_rma_remote_request_completed(ep); ++ } ++ ++ return UCS_OK; ++} ++ ++static void ucp_rma_sw_dump_packet(ucp_worker_h worker, uct_am_trace_type_t type, ++ uint8_t id, const void *data, size_t length, ++ char *buffer, size_t max) ++{ ++ const ucp_get_req_hdr_t *geth; ++ const ucp_rma_rep_hdr_t *reph; ++ const ucp_cmpl_hdr_t *cmplh; ++ const ucp_put_hdr_t *puth; ++ size_t header_len; ++ char *p; ++ ++ switch (id) { ++ case UCP_AM_ID_PUT: ++ puth = data; ++ snprintf(buffer, max, "PUT [addr 0x%lx ep_ptr 0x%lx]", puth->address, ++ puth->ep_ptr); ++ header_len = sizeof(*puth); ++ break; ++ case UCP_AM_ID_GET_REQ: ++ geth = data; ++ snprintf(buffer, max, "GET_REQ [addr 0x%lx len %zu reqptr 0x%lx ep 0x%lx]", ++ geth->address, geth->length, geth->req.reqptr, geth->req.ep_ptr); ++ return; ++ case UCP_AM_ID_GET_REP: ++ reph = data; ++ snprintf(buffer, max, "GET_REP [reqptr 0x%lx]", reph->req); ++ header_len = sizeof(*reph); ++ break; ++ case UCP_AM_ID_CMPL: ++ cmplh = data; ++ snprintf(buffer, max, "CMPL [ep_ptr 0x%lx]", cmplh->ep_ptr); ++ return; ++ default: ++ return; ++ } ++ ++ p = buffer + strlen(buffer); ++ ucp_dump_payload(worker->context, p, buffer + max - p, data + header_len, ++ length - header_len); ++} ++ ++UCP_DEFINE_AM(UCP_FEATURE_RMA, UCP_AM_ID_PUT, ucp_put_handler, ++ ucp_rma_sw_dump_packet, 0); ++UCP_DEFINE_AM(UCP_FEATURE_RMA, UCP_AM_ID_GET_REQ, ucp_get_req_handler, ++ ucp_rma_sw_dump_packet, 0); ++UCP_DEFINE_AM(UCP_FEATURE_RMA, UCP_AM_ID_GET_REP, ucp_get_rep_handler, ++ ucp_rma_sw_dump_packet, 0); ++UCP_DEFINE_AM(UCP_FEATURE_RMA|UCP_FEATURE_AMO, UCP_AM_ID_CMPL, ++ ucp_rma_cmpl_handler, ucp_rma_sw_dump_packet, 0); ++ ++UCP_DEFINE_AM_PROXY(UCP_AM_ID_PUT); ++UCP_DEFINE_AM_PROXY(UCP_AM_ID_GET_REQ); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream.h +index 5e98a0d75..06c5bb238 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream.h +@@ -8,10 +8,12 @@ + #define UCP_STREAM_H_ + + #include ++#include + #include + ++ + typedef struct { +- uint64_t sender_uuid; ++ uintptr_t ep_ptr; + } UCS_S_PACKED ucp_stream_am_hdr_t; + + +@@ -23,51 +25,44 @@ typedef struct { + } UCS_S_PACKED ucp_stream_am_data_t; + + +-/** +- * Stream specific endpoint flags +- */ +-enum { +- UCP_EP_STREAM_FLAG_IS_QUEUED = UCS_BIT(0), /* EP is queued in stream list of +- worker */ +- UCP_EP_STREAM_FLAG_HAS_DATA = UCS_BIT(1), /* EP has data in the match_q */ +- UCP_EP_STREAM_FLAG_VALID = UCS_BIT(2) /* EP is valid. EP can be +- invalidated by ucp_ep_close_cb +- (all incoming data will be +- dropped) then returned back by +- ucp_ep_create if internal +- connection is still alive */ +-}; +- +- +-static UCS_F_ALWAYS_INLINE void +-ucp_stream_ep_enqueue(ucp_ep_ext_stream_t *ep, ucp_worker_h worker) ++void ucp_stream_ep_init(ucp_ep_h ep); ++ ++void ucp_stream_ep_cleanup(ucp_ep_h ep); ++ ++void ucp_stream_ep_activate(ucp_ep_h ep); ++ ++ ++static UCS_F_ALWAYS_INLINE int ucp_stream_ep_is_queued(ucp_ep_ext_proto_t *ep_ext) ++{ ++ return ep_ext->stream.ready_list.next != NULL; ++} ++ ++static UCS_F_ALWAYS_INLINE int ucp_stream_ep_has_data(ucp_ep_ext_proto_t *ep_ext) + { +- ucs_assert(!(ep->flags & UCP_EP_STREAM_FLAG_IS_QUEUED)); +- ucs_list_add_tail(&worker->stream_eps, &ep->list); +- ep->flags |= UCP_EP_STREAM_FLAG_IS_QUEUED; ++ return ucp_ep_from_ext_proto(ep_ext)->flags & UCP_EP_FLAG_STREAM_HAS_DATA; + } + +-static UCS_F_ALWAYS_INLINE int +-ucp_stream_ep_is_queued(ucp_ep_ext_stream_t *ep) ++static UCS_F_ALWAYS_INLINE ++void ucp_stream_ep_enqueue(ucp_ep_ext_proto_t *ep_ext, ucp_worker_h worker) + { +- return ep->flags & UCP_EP_STREAM_FLAG_IS_QUEUED; ++ ucs_assert(!ucp_stream_ep_is_queued(ep_ext)); ++ ucs_list_add_tail(&worker->stream_ready_eps, &ep_ext->stream.ready_list); + } + +-static UCS_F_ALWAYS_INLINE void +-ucp_stream_ep_dequeue(ucp_ep_ext_stream_t *ep) ++static UCS_F_ALWAYS_INLINE void ucp_stream_ep_dequeue(ucp_ep_ext_proto_t *ep_ext) + { +- ucs_assert(ep->flags & UCP_EP_STREAM_FLAG_IS_QUEUED); +- ep->flags &= ~UCP_EP_STREAM_FLAG_IS_QUEUED; +- ucs_list_del(&ep->list); ++ ucs_list_del(&ep_ext->stream.ready_list); ++ ep_ext->stream.ready_list.next = NULL; + } + +-static UCS_F_ALWAYS_INLINE ucp_ep_ext_stream_t * ++static UCS_F_ALWAYS_INLINE ucp_ep_ext_proto_t* + ucp_stream_worker_dequeue_ep_head(ucp_worker_h worker) + { +- ucp_ep_ext_stream_t *ep = ucs_list_head(&worker->stream_eps, +- ucp_ep_ext_stream_t, list); +- ucp_stream_ep_dequeue(ep); +- return ep; ++ ucp_ep_ext_proto_t *ep_ext = ucs_list_head(&worker->stream_ready_eps, ++ ucp_ep_ext_proto_t, ++ stream.ready_list); ++ ucp_stream_ep_dequeue(ep_ext); ++ return ep_ext; + } + + #endif /* UCP_STREAM_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_recv.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_recv.c +index dbbf08288..e2d082843 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_recv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_recv.c +@@ -12,9 +12,7 @@ + #include + + #include +-#include +- +-#include /* TODO: remove ucp_eager_sync_hdr_t usage */ ++#include + + + /* @verbatim +@@ -59,17 +57,16 @@ + + + static UCS_F_ALWAYS_INLINE ucp_recv_desc_t * +-ucp_stream_rdesc_dequeue(ucp_ep_ext_stream_t *ep_stream) ++ucp_stream_rdesc_dequeue(ucp_ep_ext_proto_t *ep_ext) + { +- ucp_recv_desc_t *rdesc = ucs_queue_pull_elem_non_empty(&ep_stream->match_q, ++ ucp_recv_desc_t *rdesc = ucs_queue_pull_elem_non_empty(&ep_ext->stream.match_q, + ucp_recv_desc_t, + stream_queue); +- ucs_assert(ep_stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA); +- +- if (ucs_unlikely(ucs_queue_is_empty(&ep_stream->match_q))) { +- ep_stream->flags &= ~UCP_EP_STREAM_FLAG_HAS_DATA; +- if (ucp_stream_ep_is_queued(ep_stream)) { +- ucp_stream_ep_dequeue(ep_stream); ++ ucs_assert(ucp_stream_ep_has_data(ep_ext)); ++ if (ucs_unlikely(ucs_queue_is_empty(&ep_ext->stream.match_q))) { ++ ucp_ep_from_ext_proto(ep_ext)->flags &= ~UCP_EP_FLAG_STREAM_HAS_DATA; ++ if (ucp_stream_ep_is_queued(ep_ext)) { ++ ucp_stream_ep_dequeue(ep_ext); + } + } + +@@ -77,35 +74,31 @@ ucp_stream_rdesc_dequeue(ucp_ep_ext_stream_t *ep_stream) + } + + static UCS_F_ALWAYS_INLINE ucp_recv_desc_t * +-ucp_stream_rdesc_get(ucp_ep_ext_stream_t *ep_stream) ++ucp_stream_rdesc_get(ucp_ep_ext_proto_t *ep_ext) + { +- ucp_recv_desc_t *rdesc = ucs_queue_head_elem_non_empty(&ep_stream->match_q, ++ ucp_recv_desc_t *rdesc = ucs_queue_head_elem_non_empty(&ep_ext->stream.match_q, + ucp_recv_desc_t, + stream_queue); + +- ucs_assert(ep_stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA); ++ ucs_assert(ucp_stream_ep_has_data(ep_ext)); + ucs_trace_data("ep %p, rdesc %p with %u stream bytes", +- ep_stream->ucp_ep, rdesc, rdesc->length); ++ ucp_ep_from_ext_proto(ep_ext), rdesc, rdesc->length); + + return rdesc; + } + +-UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_data_nb, +- (ep, length), ucp_ep_h ep, size_t *length) ++static UCS_F_ALWAYS_INLINE ucs_status_ptr_t ++ucp_stream_recv_data_nb_nolock(ucp_ep_h ep, size_t *length) + { ++ ucp_ep_ext_proto_t *ep_ext = ucp_ep_ext_proto(ep); + ucp_recv_desc_t *rdesc; + ucp_stream_am_data_t *am_data; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- if (ucs_unlikely(!(ep->ext.stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA))) { +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ if (ucs_unlikely(!ucp_stream_ep_has_data(ep_ext))) { + return UCS_STATUS_PTR(UCS_OK); + } + +- rdesc = ucp_stream_rdesc_dequeue(ep->ext.stream); +- +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ rdesc = ucp_stream_rdesc_dequeue(ep_ext); + + *length = rdesc->length; + am_data = ucp_stream_rdesc_am_data(rdesc); +@@ -113,27 +106,31 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_data_nb, + return am_data + 1; + } + +-static UCS_F_ALWAYS_INLINE void +-ucp_stream_rdesc_release(ucp_recv_desc_t *rdesc) ++UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_data_nb, (ep, length), ++ ucp_ep_h ep, size_t *length) + { +- if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_UCT_DESC)) { +- uct_iface_release_desc(UCS_PTR_BYTE_OFFSET(rdesc, +- -sizeof(ucp_eager_sync_hdr_t))); +- } else { +- ucs_mpool_put_inline(rdesc); +- } ++ ucs_status_ptr_t status_ptr; ++ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_STREAM, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ status_ptr = ucp_stream_recv_data_nb_nolock(ep, length); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); ++ ++ return status_ptr; + } + + static UCS_F_ALWAYS_INLINE void + ucp_stream_rdesc_dequeue_and_release(ucp_recv_desc_t *rdesc, +- ucp_ep_ext_stream_t *ep) ++ ucp_ep_ext_proto_t *ep_ext) + { +- ucs_assert(ep->flags & UCP_EP_STREAM_FLAG_HAS_DATA); +- ucs_assert(rdesc == ucs_queue_head_elem_non_empty(&ep->match_q, ++ ucs_assert(ucp_stream_ep_has_data(ep_ext)); ++ ucs_assert(rdesc == ucs_queue_head_elem_non_empty(&ep_ext->stream.match_q, + ucp_recv_desc_t, + stream_queue)); +- ucp_stream_rdesc_dequeue(ep); +- ucp_stream_rdesc_release(rdesc); ++ ucp_stream_rdesc_dequeue(ep_ext); ++ ucp_recv_desc_release(rdesc); + } + + UCS_PROFILE_FUNC_VOID(ucp_stream_data_release, (ep, data), +@@ -141,23 +138,31 @@ UCS_PROFILE_FUNC_VOID(ucp_stream_data_release, (ep, data), + { + ucp_recv_desc_t *rdesc = ucp_stream_rdesc_from_data(data); + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + +- ucp_stream_rdesc_release(rdesc); ++ ucp_recv_desc_release(rdesc); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + } + + static UCS_F_ALWAYS_INLINE ssize_t + ucp_stream_rdata_unpack(const void *rdata, size_t length, ucp_request_t *dst_req) + { +- /* Truncated error is not actual for stream, need to adjust */ +- size_t valid_len = ucs_min((dst_req->recv.length - +- dst_req->recv.stream.offset), length); ++ size_t valid_len; ++ int last; + ucs_status_t status; + ++ /* Truncated error is not actual for stream, need to adjust */ ++ valid_len = dst_req->recv.length - dst_req->recv.stream.offset; ++ if (valid_len <= length) { ++ last = (valid_len == length); ++ } else { ++ valid_len = length; ++ last = !(dst_req->flags & UCP_REQUEST_FLAG_STREAM_RECV_WAITALL); ++ } ++ + status = ucp_request_recv_data_unpack(dst_req, rdata, valid_len, +- dst_req->recv.stream.offset, 1); ++ dst_req->recv.stream.offset, last); + if (ucs_likely(status == UCS_OK)) { + dst_req->recv.stream.offset += valid_len; + ucs_trace_data("unpacked %zd bytes of stream data %p", +@@ -171,14 +176,14 @@ ucp_stream_rdata_unpack(const void *rdata, size_t length, ucp_request_t *dst_req + + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_stream_rdesc_advance(ucp_recv_desc_t *rdesc, ssize_t offset, +- ucp_ep_ext_stream_t *ep) ++ ucp_ep_ext_proto_t *ep_ext) + { + ucs_assert(offset <= rdesc->length); + + if (ucs_unlikely(offset < 0)) { + return offset; + } else if (ucs_likely(offset == rdesc->length)) { +- ucp_stream_rdesc_dequeue_and_release(rdesc, ep); ++ ucp_stream_rdesc_dequeue_and_release(rdesc, ep_ext); + } else { + rdesc->length -= offset; + rdesc->payload_offset += offset; +@@ -190,22 +195,27 @@ ucp_stream_rdesc_advance(ucp_recv_desc_t *rdesc, ssize_t offset, + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_stream_process_rdesc_inplace(ucp_recv_desc_t *rdesc, ucp_datatype_t dt, + void *buffer, size_t count, size_t length, +- ucp_ep_ext_stream_t *ep_stream) ++ ucp_ep_ext_proto_t *ep_ext) + { + ucs_status_t status; + ssize_t unpacked; ++ uct_memory_type_t mem_type; ++ ++ ++ ucp_memory_type_detect_mds(ucp_ep_from_ext_proto(ep_ext)->worker->context, buffer, ++ length, &mem_type); + +- status = ucp_dt_unpack_only(ep_stream->ucp_ep->worker, buffer, count, dt, +- UCT_MD_MEM_TYPE_HOST, ucp_stream_rdesc_payload(rdesc), +- length, 0); ++ status = ucp_dt_unpack_only(ucp_ep_from_ext_proto(ep_ext)->worker, buffer, ++ count, dt, mem_type, ++ ucp_stream_rdesc_payload(rdesc), length, 0); + + unpacked = ucs_likely(status == UCS_OK) ? length : status; + +- return ucp_stream_rdesc_advance(rdesc, unpacked, ep_stream); ++ return ucp_stream_rdesc_advance(rdesc, unpacked, ep_ext); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_stream_process_rdesc(ucp_recv_desc_t *rdesc, ucp_ep_ext_stream_t *ep_stream, ++ucp_stream_process_rdesc(ucp_recv_desc_t *rdesc, ucp_ep_ext_proto_t *ep_ext, + ucp_request_t *req) + { + ssize_t unpacked; +@@ -214,36 +224,41 @@ ucp_stream_process_rdesc(ucp_recv_desc_t *rdesc, ucp_ep_ext_stream_t *ep_stream, + rdesc->length, req); + ucs_assert(req->recv.stream.offset <= req->recv.length); + +- return ucp_stream_rdesc_advance(rdesc, unpacked, ep_stream); ++ return ucp_stream_rdesc_advance(rdesc, unpacked, ep_ext); + } + + static UCS_F_ALWAYS_INLINE void +-ucp_stream_recv_request_init(ucp_request_t *req, void *buffer, size_t count, +- size_t length, ucp_datatype_t datatype, +- ucp_stream_recv_callback_t cb) ++ucp_stream_recv_request_init(ucp_request_t *req, ucp_ep_h ep, void *buffer, ++ size_t count, size_t length, ++ ucp_datatype_t datatype, ++ ucp_stream_recv_callback_t cb, ++ uint16_t request_flags) + { +- req->flags = UCP_REQUEST_FLAG_CALLBACK | +- UCP_REQUEST_FLAG_STREAM_RECV; ++ req->flags = UCP_REQUEST_FLAG_CALLBACK | request_flags; + #if ENABLE_ASSERT ++ req->flags |= UCP_REQUEST_FLAG_STREAM_RECV; + req->status = UCS_OK; /* for ucp_request_recv_data_unpack() */ + #endif + req->recv.stream.cb = cb; + req->recv.stream.length = 0; + req->recv.stream.offset = 0; + ++ ucp_dt_recv_state_init(&req->recv.state, buffer, datatype, count); ++ ++ req->recv.worker = ep->worker; + req->recv.buffer = buffer; + req->recv.datatype = datatype; +- req->recv.length = length; +- req->recv.mem_type = UCT_MD_MEM_TYPE_HOST; +- +- ucp_dt_recv_state_init(&req->recv.state, buffer, datatype, count); ++ req->recv.length = ucs_likely(!UCP_DT_IS_GENERIC(datatype)) ? length : ++ ucp_dt_length(datatype, count, NULL, &req->recv.state); ++ ucp_memory_type_detect_mds(ep->worker->context, (void *)buffer, ++ req->recv.length, &req->recv.mem_type); + } + + static UCS_F_ALWAYS_INLINE int +-ucp_stream_recv_nb_is_inplace(ucp_ep_ext_stream_t *ep, size_t dt_length) ++ucp_stream_recv_nb_is_inplace(ucp_ep_ext_proto_t *ep_ext, size_t dt_length) + { +- return (ep->flags & UCP_EP_STREAM_FLAG_HAS_DATA) && +- (ucp_stream_rdesc_get(ep)->length >= dt_length); ++ return ucp_stream_ep_has_data(ep_ext) && ++ (ucp_stream_rdesc_get(ep_ext)->length >= dt_length); + } + + UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_nb, +@@ -253,27 +268,26 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_nb, + size_t *length, unsigned flags) + { + ucs_status_t status = UCS_OK; +- ucp_ep_ext_stream_t *ep_stream = ep->ext.stream; ++ ucp_ep_ext_proto_t *ep_ext = ucp_ep_ext_proto(ep); + size_t dt_length; + ucp_request_t *req; +- ucs_status_ptr_t rdesc; +- ucp_dt_state_t dt_state; +- +- if (UCP_DT_IS_GENERIC(datatype)) { +- ucs_error("ucp_stream_recv_nb doesn't support generic datatype"); +- return UCS_STATUS_PTR(UCS_ERR_NOT_IMPLEMENTED); +- } +- +- dt_length = ucp_dt_length(datatype, count, buffer, &dt_state); +- +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); +- +- if (ucs_likely(ucp_stream_recv_nb_is_inplace(ep_stream, dt_length))) { +- status = ucp_stream_process_rdesc_inplace(ucp_stream_rdesc_get(ep_stream), +- datatype, buffer, count, +- dt_length, ep_stream); +- *length = dt_length; +- goto out_status; ++ ucp_recv_desc_t *rdesc; ++ ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_STREAM, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); ++ ++ if (ucs_likely(!UCP_DT_IS_GENERIC(datatype))) { ++ dt_length = ucp_dt_length(datatype, count, buffer, NULL); ++ if (ucs_likely(ucp_stream_recv_nb_is_inplace(ep_ext, dt_length))) { ++ status = ucp_stream_process_rdesc_inplace(ucp_stream_rdesc_get(ep_ext), ++ datatype, buffer, count, ++ dt_length, ep_ext); ++ *length = dt_length; ++ goto out_status; ++ } ++ } else { ++ dt_length = 0; /* Suppress warnings of paranoid compilers */ + } + + req = ucp_request_get(ep->worker); +@@ -282,17 +296,29 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_nb, + goto out_status; + } + +- ucp_stream_recv_request_init(req, buffer, count, dt_length, datatype, cb); ++ ucp_stream_recv_request_init(req, ep, buffer, count, dt_length, datatype, ++ cb, (flags & UCP_STREAM_RECV_FLAG_WAITALL) ? ++ UCP_REQUEST_FLAG_STREAM_RECV_WAITALL : 0); + + /* OK, lets obtain all arrived data which matches the recv size */ + while ((req->recv.stream.offset < req->recv.length) && +- (ep_stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA)) { ++ ucp_stream_ep_has_data(ep_ext)) { + +- rdesc = ucp_stream_rdesc_get(ep_stream); +- status = ucp_stream_process_rdesc(rdesc, ep_stream, req); ++ rdesc = ucp_stream_rdesc_get(ep_ext); ++ status = ucp_stream_process_rdesc(rdesc, ep_ext, req); + if (ucs_unlikely(status != UCS_OK)) { + goto out_put_request; + } ++ ++ /* ++ * NOTE: generic datatype can be completed with any amount of data to ++ * avoid extra logic in ucp_stream_process_rdesc, exception is ++ * WAITALL flag ++ */ ++ if (ucs_unlikely(UCP_DT_IS_GENERIC(req->recv.datatype)) && ++ !(req->flags & UCP_REQUEST_FLAG_STREAM_RECV_WAITALL)) { ++ break; ++ } + } + + ucs_assert(req->recv.stream.offset <= req->recv.length); +@@ -300,8 +326,8 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_recv_nb, + if (ucp_request_can_complete_stream_recv(req)) { + *length = req->recv.stream.offset; + } else { +- ucs_assert(!(ep_stream->flags & UCP_EP_STREAM_FLAG_HAS_DATA)); +- ucs_queue_push(&ep_stream->match_q, &req->recv.queue); ++ ucs_assert(!ucp_stream_ep_has_data(ep_ext)); ++ ucs_queue_push(&ep_ext->stream.match_q, &req->recv.queue); + req += 1; + goto out; + } +@@ -313,12 +339,12 @@ out_status: + req = UCS_STATUS_PTR(status); + + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return req; + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +-ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_stream_t *ep, ++ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_proto_t *ep_ext, + ucp_stream_am_data_t *am_data, size_t length, + unsigned am_flags) + { +@@ -334,10 +360,10 @@ ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_stream_t *ep, + place */ + + /* First, process expected requests */ +- if (!(ep->flags & UCP_EP_STREAM_FLAG_HAS_DATA)) { +- while (!ucs_queue_is_empty(&ep->match_q)) { +- req = ucs_queue_head_elem_non_empty(&ep->match_q, ucp_request_t, +- recv.queue); ++ if (!ucp_stream_ep_has_data(ep_ext)) { ++ while (!ucs_queue_is_empty(&ep_ext->stream.match_q)) { ++ req = ucs_queue_head_elem_non_empty(&ep_ext->stream.match_q, ++ ucp_request_t, recv.queue); + payload = UCS_PTR_BYTE_OFFSET(am_data, rdesc_tmp.payload_offset); + unpacked = ucp_stream_rdata_unpack(payload, rdesc_tmp.length, req); + if (ucs_unlikely(unpacked < 0)) { +@@ -345,14 +371,14 @@ ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_stream_t *ep, + am_data, rdesc_tmp.payload_offset, req); + } else if (unpacked == rdesc_tmp.length) { + if (ucp_request_can_complete_stream_recv(req)) { +- ucp_request_complete_stream_recv(req, ep, UCS_OK); ++ ucp_request_complete_stream_recv(req, ep_ext, UCS_OK); + } + return UCS_OK; + } +- ucp_stream_rdesc_advance(&rdesc_tmp, unpacked, ep); ++ ucp_stream_rdesc_advance(&rdesc_tmp, unpacked, ep_ext); + /* This request is full, try next one */ + ucs_assert(ucp_request_can_complete_stream_recv(req)); +- ucp_request_complete_stream_recv(req, ep, UCS_OK); ++ ucp_request_complete_stream_recv(req, ep_ext, UCS_OK); + } + } + +@@ -375,43 +401,76 @@ ucp_stream_am_data_process(ucp_worker_t *worker, ucp_ep_ext_stream_t *ep, + rdesc = (ucp_recv_desc_t *)am_data - 1; + rdesc->length = rdesc_tmp.length; + rdesc->payload_offset = rdesc_tmp.payload_offset + sizeof(*rdesc); ++ rdesc->priv_length = 0; + rdesc->flags = UCP_RECV_DESC_FLAG_UCT_DESC; + } + +- ep->flags |= UCP_EP_STREAM_FLAG_HAS_DATA; +- ucs_queue_push(&ep->match_q, &rdesc->stream_queue); ++ ucp_ep_from_ext_proto(ep_ext)->flags |= UCP_EP_FLAG_STREAM_HAS_DATA; ++ ucs_queue_push(&ep_ext->stream.match_q, &rdesc->stream_queue); + + return UCS_INPROGRESS; + } + ++void ucp_stream_ep_init(ucp_ep_h ep) ++{ ++ ucp_ep_ext_proto_t *ep_ext = ucp_ep_ext_proto(ep); ++ ++ if (ep->worker->context->config.features & UCP_FEATURE_STREAM) { ++ ep_ext->stream.ready_list.prev = NULL; ++ ep_ext->stream.ready_list.next = NULL; ++ ucs_queue_head_init(&ep_ext->stream.match_q); ++ } ++} ++ ++void ucp_stream_ep_cleanup(ucp_ep_h ep) ++{ ++ size_t length; ++ void *data; ++ ++ if (ep->worker->context->config.features & UCP_FEATURE_STREAM) { ++ while ((data = ucp_stream_recv_data_nb_nolock(ep, &length)) != NULL) { ++ ucs_assert_always(!UCS_PTR_IS_ERR(data)); ++ ucp_stream_data_release(ep, data); ++ } ++ ++ if (ucp_stream_ep_is_queued(ucp_ep_ext_proto(ep))) { ++ ucp_stream_ep_dequeue(ucp_ep_ext_proto(ep)); ++ } ++ } ++} ++ ++void ucp_stream_ep_activate(ucp_ep_h ep) ++{ ++ ucp_ep_ext_proto_t *ep_ext = ucp_ep_ext_proto(ep); ++ ++ if ((ep->worker->context->config.features & UCP_FEATURE_STREAM) && ++ ucp_stream_ep_has_data(ep_ext) && !ucp_stream_ep_is_queued(ep_ext)) { ++ ucp_stream_ep_enqueue(ep_ext, ep->worker); ++ } ++} ++ + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_stream_am_handler(void *am_arg, void *am_data, size_t am_length, + unsigned am_flags) + { + ucp_worker_h worker = am_arg; + ucp_stream_am_data_t *data = am_data; +- ucp_ep_ext_stream_t *ep_stream; + ucp_ep_h ep; ++ ucp_ep_ext_proto_t *ep_ext; + ucs_status_t status; + + ucs_assert(am_length >= sizeof(ucp_stream_am_hdr_t)); + +- ep = ucp_worker_ep_find(worker, data->hdr.sender_uuid); +- if (ucs_unlikely(ep == NULL)) { +- ucs_trace_data("ep not found for uuid %"PRIx64, data->hdr.sender_uuid); +- /* drop the data */ +- return UCS_OK; +- } ++ ep = ucp_worker_get_ep_by_ptr(worker, data->hdr.ep_ptr); ++ ep_ext = ucp_ep_ext_proto(ep); + +- ep_stream = ep->ext.stream; +- if (ucs_unlikely(!(ep_stream->flags & UCP_EP_STREAM_FLAG_VALID))) { +- ucs_trace_data("stream ep with uuid %"PRIx64" is invalid", +- data->hdr.sender_uuid); ++ if (ucs_unlikely(ep->flags & UCP_EP_FLAG_CLOSED)) { ++ ucs_trace_data("ep %p: stream is invalid", ep); + /* drop the data */ + return UCS_OK; + } + +- status = ucp_stream_am_data_process(worker, ep_stream, data, ++ status = ucp_stream_am_data_process(worker, ep_ext, data, + am_length - sizeof(data->hdr), + am_flags); + if (status == UCS_OK) { +@@ -421,8 +480,8 @@ ucp_stream_am_handler(void *am_arg, void *am_data, size_t am_length, + + ucs_assert(status == UCS_INPROGRESS); + +- if (!ucp_stream_ep_is_queued(ep_stream)) { +- ucp_stream_ep_enqueue(ep_stream, worker); ++ if (!ucp_stream_ep_is_queued(ep_ext) && (ep->flags & UCP_EP_FLAG_USED)) { ++ ucp_stream_ep_enqueue(ep_ext, worker); + } + + return (am_flags & UCT_CB_PARAM_FLAG_DESC) ? UCS_INPROGRESS : UCS_OK; +@@ -436,15 +495,15 @@ static void ucp_stream_am_dump(ucp_worker_h worker, uct_am_trace_type_t type, + size_t hdr_len = sizeof(*hdr); + char *p; + +- snprintf(buffer, max, "STREAM ep uuid %"PRIx64, hdr->sender_uuid); ++ snprintf(buffer, max, "STREAM ep_ptr 0x%lx", hdr->ep_ptr); + p = buffer + strlen(buffer); + ++ ucs_assert(hdr->ep_ptr != 0); + ucp_dump_payload(worker->context, p, buffer + max - p, data + hdr_len, + length - hdr_len); + } + +-UCP_DEFINE_AM(UCP_FEATURE_STREAM, UCP_AM_ID_STREAM_DATA, +- ucp_stream_am_handler, ucp_stream_am_dump, +- UCT_CB_FLAG_SYNC); ++UCP_DEFINE_AM(UCP_FEATURE_STREAM, UCP_AM_ID_STREAM_DATA, ucp_stream_am_handler, ++ ucp_stream_am_dump, 0); + + UCP_DEFINE_AM_PROXY(UCP_AM_ID_STREAM_DATA); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_send.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_send.c +index 6be01cd8d..c0779b0e3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_send.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/stream/stream_send.c +@@ -21,7 +21,7 @@ ucp_stream_send_am_short(ucp_ep_t *ep, const void *buffer, size_t length) + UCS_STATIC_ASSERT(sizeof(ep->worker->uuid) == sizeof(uint64_t)); + + return uct_ep_am_short(ucp_ep_get_am_uct_ep(ep), UCP_AM_ID_STREAM_DATA, +- ep->worker->uuid, buffer, length); ++ ucp_ep_dest_ep_ptr(ep), buffer, length); + } + + static void ucp_stream_send_req_init(ucp_request_t* req, ucp_ep_h ep, +@@ -30,14 +30,15 @@ static void ucp_stream_send_req_init(ucp_request_t* req, ucp_ep_h ep, + { + req->flags = flags; + req->send.ep = ep; +- req->send.buffer = buffer; ++ req->send.buffer = (void*)buffer; + req->send.datatype = datatype; +- req->send.mem_type = UCT_MD_MEM_TYPE_HOST; + req->send.lane = ep->am_lane; + ucp_request_send_state_init(req, datatype, count); + req->send.length = ucp_dt_length(req->send.datatype, count, + req->send.buffer, + &req->send.state.dt); ++ ucp_memory_type_detect_mds(ep->worker->context, (void *)buffer, ++ req->send.length, &req->send.mem_type); + VALGRIND_MAKE_MEM_UNDEFINED(&req->send.tag, sizeof(req->send.tag)); + } + +@@ -48,11 +49,11 @@ ucp_stream_send_req(ucp_request_t *req, size_t count, + { + size_t zcopy_thresh = ucp_proto_get_zcopy_threshold(req, msg_config, + count, SIZE_MAX); +- size_t seg_size = msg_config->max_bcopy - proto->only_hdr_size; + ssize_t max_short = ucp_proto_get_short_max(req, msg_config); + + ucs_status_t status = ucp_request_send_start(req, max_short, zcopy_thresh, +- seg_size, SIZE_MAX, proto); ++ SIZE_MAX, count, msg_config, ++ proto); + if (status != UCS_OK) { + return UCS_STATUS_PTR(status); + } +@@ -85,9 +86,11 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_send_nb, + ucs_status_t status; + ucs_status_ptr_t ret; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_STREAM, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + +- ucs_trace_req("send_nb buffer %p count %zu to %s cb %p flags %u", ++ ucs_trace_req("stream_send_nb buffer %p count %zu to %s cb %p flags %u", + buffer, count, ucp_ep_peer_name(ep), cb, flags); + + if (ucs_unlikely(flags != 0)) { +@@ -95,6 +98,12 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_send_nb, + goto out; + } + ++ status = ucp_ep_resolve_dest_ep_ptr(ep, ep->am_lane); ++ if (status != UCS_OK) { ++ ret = UCS_STATUS_PTR(status); ++ goto out; ++ } ++ + if (ucs_likely(UCP_DT_IS_CONTIG(datatype))) { + length = ucp_contig_dt_length(datatype, count); + if (ucs_likely((ssize_t)length <= ucp_ep_config(ep)->am.max_short)) { +@@ -120,7 +129,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_stream_send_nb, + ucp_ep_config(ep)->stream.proto); + + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return ret; + } + +@@ -142,11 +151,12 @@ static size_t ucp_stream_pack_am_single_dt(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- hdr->sender_uuid = req->send.ep->worker->uuid; ++ hdr->ep_ptr = ucp_request_get_dest_ep_ptr(req); + + ucs_assert(req->send.state.dt.offset == 0); + +- length = ucp_dt_pack(req->send.datatype, hdr + 1, req->send.buffer, ++ length = ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, + &req->send.state.dt, req->send.length); + ucs_assert(length == req->send.length); + return sizeof(*hdr) + length; +@@ -172,15 +182,14 @@ static size_t ucp_stream_pack_am_first_dt(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- hdr->sender_uuid = req->send.ep->worker->uuid; +- length = ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr); ++ hdr->ep_ptr = ucp_request_get_dest_ep_ptr(req); ++ length = ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr); + +- ucs_debug("pack stream_am_first paylen %zu", length); + ucs_assert(req->send.state.dt.offset == 0); + ucs_assert(req->send.length > length); +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + static size_t ucp_stream_pack_am_middle_dt(void *dest, void *arg) +@@ -189,44 +198,22 @@ static size_t ucp_stream_pack_am_middle_dt(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- hdr->sender_uuid = req->send.ep->worker->uuid; +- length = ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr); +- ucs_debug("pack stream_am_middle paylen %zu offset %zu", length, +- req->send.state.dt.offset); +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); +-} +- +-static size_t ucp_stream_pack_am_last_dt(void *dest, void *arg) +-{ +- size_t ret_length; +- ucp_stream_am_hdr_t *hdr = dest; +- ucp_request_t *req = arg; +- size_t length = req->send.length - req->send.state.dt.offset; +- +- hdr->sender_uuid = req->send.ep->worker->uuid; +- ret_length = ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); +- +- ucs_debug("pack stream_am_last paylen %zu offset %zu", length, +- req->send.state.dt.offset); +- ucs_assertv(ret_length == length, "length=%zu, max_length=%zu", +- ret_length, length); +- return sizeof(*hdr) + ret_length; ++ hdr->ep_ptr = ucp_request_get_dest_ep_ptr(req); ++ length = ucs_min(ucp_ep_config(req->send.ep)->am.max_bcopy - sizeof(*hdr), ++ req->send.length - req->send.state.dt.offset); ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + static ucs_status_t ucp_stream_bcopy_multi(uct_pending_req_t *self) + { + ucs_status_t status = ucp_do_am_bcopy_multi(self, +- UCP_AM_ID_STREAM_DATA, + UCP_AM_ID_STREAM_DATA, + UCP_AM_ID_STREAM_DATA, + sizeof(ucp_stream_am_hdr_t), + ucp_stream_pack_am_first_dt, +- ucp_stream_pack_am_middle_dt, +- ucp_stream_pack_am_last_dt, 0); ++ ucp_stream_pack_am_middle_dt, 0); + if (status == UCS_OK) { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_request_send_generic_dt_finish(req); +@@ -242,7 +229,7 @@ static ucs_status_t ucp_stream_eager_zcopy_single(uct_pending_req_t *self) + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_stream_am_hdr_t hdr; + +- hdr.sender_uuid = req->send.ep->worker->uuid; ++ hdr.ep_ptr = ucp_request_get_dest_ep_ptr(req); + return ucp_do_am_zcopy_single(self, UCP_AM_ID_STREAM_DATA, &hdr, + sizeof(hdr), ucp_proto_am_zcopy_req_complete); + } +@@ -252,9 +239,8 @@ static ucs_status_t ucp_stream_eager_zcopy_multi(uct_pending_req_t *self) + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_stream_am_hdr_t hdr; + +- hdr.sender_uuid = req->send.ep->worker->uuid; ++ hdr.ep_ptr = ucp_request_get_dest_ep_ptr(req); + return ucp_do_am_zcopy_multi(self, +- UCP_AM_ID_STREAM_DATA, + UCP_AM_ID_STREAM_DATA, + UCP_AM_ID_STREAM_DATA, + &hdr, sizeof(hdr), &hdr, sizeof(hdr), +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager.h +index 636eb16f6..a7656bfd4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager.h +@@ -65,7 +65,7 @@ typedef struct { + extern const ucp_proto_t ucp_tag_eager_proto; + extern const ucp_proto_t ucp_tag_eager_sync_proto; + +-void ucp_tag_eager_sync_send_ack(ucp_worker_h worker, void *hdr, uint16_t flags); ++void ucp_tag_eager_sync_send_ack(ucp_worker_h worker, void *hdr, uint16_t recv_flags); + + void ucp_tag_eager_sync_completion(ucp_request_t *req, uint16_t flag, + ucs_status_t status); +@@ -78,18 +78,4 @@ void ucp_tag_eager_sync_zcopy_req_complete(ucp_request_t *req, ucs_status_t stat + + void ucp_tag_eager_sync_zcopy_completion(uct_completion_t *self, ucs_status_t status); + +-static inline ucs_status_t ucp_tag_send_eager_short(ucp_ep_t *ep, ucp_tag_t tag, +- const void *buffer, size_t length) +-{ +- if (ep->flags & UCP_EP_FLAG_TAG_OFFLOAD_ENABLED) { +- UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(uct_tag_t)); +- return uct_ep_tag_eager_short(ucp_ep_get_tag_uct_ep(ep), tag, buffer, length); +- } else { +- UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(ucp_eager_hdr_t)); +- UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(uint64_t)); +- return uct_ep_am_short(ucp_ep_get_am_uct_ep(ep), UCP_AM_ID_EAGER_ONLY, tag, +- buffer, length); +- } +-} +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_rcv.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_rcv.c +index 9ae1ca325..9e6439906 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_rcv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_rcv.c +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -13,10 +13,63 @@ + #include + #include + ++static UCS_F_ALWAYS_INLINE void ++ucp_eager_expected_handler(ucp_worker_t *worker, ucp_request_t *req, ++ void *data, size_t recv_len, ucp_tag_t recv_tag, ++ uint16_t flags) ++{ ++ ucs_trace_req("found req %p", req); ++ UCS_PROFILE_REQUEST_EVENT(req, "eager_recv", recv_len); ++ ++ /* First fragment fills the receive information */ ++ UCP_WORKER_STAT_EAGER_MSG(worker, flags); ++ UCP_WORKER_STAT_EAGER_CHUNK(worker, EXP); ++ ++ req->recv.tag.info.sender_tag = recv_tag; ++ ++ /* Cancel req in transport if it was offloaded, ++ * because it arrived either: ++ * 1) via SW TM (e. g. peer doesn't support offload) ++ * 2) as unexpected via HW TM */ ++ ucp_tag_offload_try_cancel(worker, req, ++ UCP_TAG_OFFLOAD_CANCEL_FORCE | ++ UCP_TAG_OFFLOAD_CANCEL_DEREG); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++ucp_eager_offload_handler(void *arg, void *data, size_t length, ++ unsigned tl_flags, uint16_t flags, ucp_tag_t recv_tag) ++{ ++ ucp_worker_t *worker = arg; ++ ucp_request_t *req; ++ ucp_recv_desc_t *rdesc; ++ ucp_tag_t *rdesc_hdr; ++ ucs_status_t status; ++ ++ req = ucp_tag_exp_search(&worker->tm, recv_tag); ++ if (req != NULL) { ++ ucp_eager_expected_handler(worker, req, data, length, recv_tag, flags); ++ req->recv.tag.info.length = length; ++ status = ucp_request_recv_data_unpack(req, data, length, 0, 1); ++ ucp_request_complete_tag_recv(req, status); ++ status = UCS_OK; ++ } else { ++ status = ucp_recv_desc_init(worker, data, length, sizeof(ucp_tag_t), ++ tl_flags, sizeof(ucp_tag_t), flags, ++ sizeof(ucp_tag_t), &rdesc); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ rdesc_hdr = (ucp_tag_t*)(rdesc + 1); ++ *rdesc_hdr = recv_tag; ++ ucp_tag_unexp_recv(&worker->tm, rdesc, recv_tag); ++ } ++ } ++ ++ return status; ++} + + static UCS_F_ALWAYS_INLINE ucs_status_t + ucp_eager_tagged_handler(void *arg, void *data, size_t length, unsigned am_flags, +- uint16_t flags, uint16_t hdr_len) ++ uint16_t flags, uint16_t hdr_len, uint16_t priv_length) + { + ucp_worker_h worker = arg; + ucp_eager_hdr_t *eager_hdr = data; +@@ -35,22 +88,7 @@ ucp_eager_tagged_handler(void *arg, void *data, size_t length, unsigned am_flags + + req = ucp_tag_exp_search(&worker->tm, recv_tag); + if (req != NULL) { +- ucs_trace_req("found req %p", req); +- UCS_PROFILE_REQUEST_EVENT(req, "eager_recv", recv_len); +- +- /* First fragment fills the receive information */ +- UCP_WORKER_STAT_EAGER_MSG(worker, flags); +- UCP_WORKER_STAT_EAGER_CHUNK(worker, EXP); +- +- req->recv.tag.info.sender_tag = recv_tag; +- +- /* Cancel req in transport if it was offloaded, +- * because it arrived either: +- * 1) via SW TM (e. g. peer doesn't support offload) +- * 2) as unexpected via HW TM */ +- ucp_tag_offload_try_cancel(worker, req, +- UCP_TAG_OFFLOAD_CANCEL_FORCE | +- UCP_TAG_OFFLOAD_CANCEL_DEREG); ++ ucp_eager_expected_handler(worker, req, data, recv_len, recv_tag, flags); + + if (flags & UCP_RECV_DESC_FLAG_EAGER_SYNC) { + ucp_tag_eager_sync_send_ack(worker, data, flags); +@@ -76,8 +114,8 @@ ucp_eager_tagged_handler(void *arg, void *data, size_t length, unsigned am_flags + + status = UCS_OK; + } else { +- status = ucp_recv_desc_init(worker, data, length, am_flags, hdr_len, +- flags, &rdesc); ++ status = ucp_recv_desc_init(worker, data, length, 0, am_flags, hdr_len, ++ flags, priv_length, &rdesc); + if (!UCS_STATUS_IS_ERR(status)) { + ucp_tag_unexp_recv(&worker->tm, rdesc, recv_tag); + } +@@ -93,7 +131,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_only_handler, + return ucp_eager_tagged_handler(arg, data, length, am_flags, + UCP_RECV_DESC_FLAG_EAGER | + UCP_RECV_DESC_FLAG_EAGER_ONLY, +- sizeof(ucp_eager_hdr_t)); ++ sizeof(ucp_eager_hdr_t), 0); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_first_handler, +@@ -102,7 +140,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_first_handler, + { + return ucp_eager_tagged_handler(arg, data, length, am_flags, + UCP_RECV_DESC_FLAG_EAGER, +- sizeof(ucp_eager_first_hdr_t)); ++ sizeof(ucp_eager_first_hdr_t), 0); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_middle_handler, +@@ -128,8 +166,9 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_middle_handler, + + if (ucp_tag_frag_match_is_unexp(matchq)) { + /* add new received descriptor to the queue */ +- status = ucp_recv_desc_init(worker, data, length, am_flags, sizeof(*hdr), +- UCP_RECV_DESC_FLAG_EAGER, &rdesc); ++ status = ucp_recv_desc_init(worker, data, length, 0, am_flags, ++ sizeof(*hdr), UCP_RECV_DESC_FLAG_EAGER, 0, ++ &rdesc); + if (!UCS_STATUS_IS_ERR(status)) { + ucp_tag_frag_match_add_unexp(matchq, rdesc, hdr->offset); + } +@@ -160,7 +199,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_sync_only_handler, + UCP_RECV_DESC_FLAG_EAGER| + UCP_RECV_DESC_FLAG_EAGER_ONLY| + UCP_RECV_DESC_FLAG_EAGER_SYNC, +- sizeof(ucp_eager_sync_hdr_t)); ++ sizeof(ucp_eager_sync_hdr_t), 0); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_sync_first_handler, +@@ -170,7 +209,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_sync_first_handler, + return ucp_eager_tagged_handler(arg, data, length, am_flags, + UCP_RECV_DESC_FLAG_EAGER| + UCP_RECV_DESC_FLAG_EAGER_SYNC, +- sizeof(ucp_eager_sync_first_hdr_t)); ++ sizeof(ucp_eager_sync_first_hdr_t), 0); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_offload_sync_ack_handler, +@@ -185,15 +224,15 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_eager_offload_sync_ack_handler, + + ucs_queue_for_each_safe(sreq, iter, queue, send.tag_offload.queue) { + if ((sreq->send.tag_offload.ssend_tag == rep_hdr->sender_tag) && +- (worker->uuid == rep_hdr->sender_uuid)) { ++ ((uintptr_t)sreq->send.ep == rep_hdr->ep_ptr)) { + ucp_tag_eager_sync_completion(sreq, UCP_REQUEST_FLAG_REMOTE_COMPLETED, + UCS_OK); + ucs_queue_del_iter(queue, iter); + return UCS_OK; + } + } +- ucs_error("Unexpected sync ack received: tag %"PRIx64" uuid %"PRIx64"", +- rep_hdr->sender_tag, rep_hdr->sender_uuid); ++ ucs_error("unexpected sync ack received: tag %"PRIx64" ep_ptr 0x%lx", ++ rep_hdr->sender_tag, rep_hdr->ep_ptr); + return UCS_OK; + } + +@@ -219,37 +258,36 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_offload_unexp_eager, + uint16_t flags = UCP_RECV_DESC_FLAG_EAGER | + UCP_RECV_DESC_FLAG_EAGER_ONLY | + UCP_RECV_DESC_FLAG_EAGER_OFFLOAD; +- ucp_eager_hdr_t *hdr; +- ucp_eager_sync_hdr_t *sync_hdr; +- unsigned hdr_len; ++ ucp_eager_sync_hdr_t *hdr; ++ int hdr_len; ++ ++ UCP_WORKER_STAT_TAG_OFFLOAD(wiface->worker, RX_UNEXP_EGR); + +- hdr_len = ucs_unlikely(imm) ? sizeof(ucp_eager_sync_hdr_t) : +- sizeof(ucp_eager_hdr_t); ++ ucp_tag_offload_unexp(wiface, stag, length); ++ ++ if (ucs_likely(!imm)) { ++ return ucp_eager_offload_handler(wiface->worker, data, length, tl_flags, ++ flags, stag); ++ } ++ ++ /* It is a sync send, imm data contains sender uuid */ ++ hdr_len = sizeof(ucp_eager_sync_hdr_t); + + if (ucs_unlikely(tl_flags & UCT_CB_PARAM_FLAG_DESC)) { +- hdr = (ucp_eager_hdr_t*)((char*)data - hdr_len); ++ hdr = (ucp_eager_sync_hdr_t*)(UCS_PTR_BYTE_OFFSET(data, -hdr_len)); + } else { + /* Can not shift back, no headroom */ + hdr = ucs_alloca(length + hdr_len); +- memcpy((char*)hdr + hdr_len, data, length); +- } +- +- hdr->super.tag = stag; +- +- if (ucs_unlikely(imm)) { +- /* It is a sync send, imm data contains sender uuid */ +- sync_hdr = ucs_derived_of(hdr, ucp_eager_sync_hdr_t); +- flags |= UCP_RECV_DESC_FLAG_EAGER_SYNC; +- sync_hdr->req.reqptr = 0ul; +- sync_hdr->req.sender_uuid = imm; ++ memcpy(UCS_PTR_BYTE_OFFSET(hdr, hdr_len), data, length); + } + +- UCP_WORKER_STAT_TAG_OFFLOAD(wiface->worker, RX_UNEXP_EGR); +- +- ucp_tag_offload_unexp(wiface, stag); ++ hdr->super.super.tag = stag; ++ hdr->req.reqptr = 0ul; ++ hdr->req.ep_ptr = imm; ++ flags |= UCP_RECV_DESC_FLAG_EAGER_SYNC; + + return ucp_eager_tagged_handler(wiface->worker, hdr, length + hdr_len, +- tl_flags, flags, hdr_len); ++ tl_flags, flags, hdr_len, hdr_len); + } + + static void ucp_eager_dump(ucp_worker_h worker, uct_am_trace_type_t type, +@@ -283,18 +321,19 @@ static void ucp_eager_dump(ucp_worker_h worker, uct_am_trace_type_t type, + header_len = sizeof(*eager_mid_hdr); + break; + case UCP_AM_ID_EAGER_SYNC_ONLY: +- snprintf(buffer, max, "EGRS tag %"PRIx64" uuid %"PRIx64" request 0x%lx", +- eagers_hdr->super.super.tag, eagers_hdr->req.sender_uuid, ++ ucs_assert(eagers_hdr->req.ep_ptr != 0); ++ snprintf(buffer, max, "EGRS tag %"PRIx64" ep_ptr 0x%lx request 0x%lx", ++ eagers_hdr->super.super.tag, eagers_hdr->req.ep_ptr, + eagers_hdr->req.reqptr); + header_len = sizeof(*eagers_hdr); + break; + case UCP_AM_ID_EAGER_SYNC_FIRST: + snprintf(buffer, max, "EGRS_F tag %"PRIx64" msgid %"PRIx64" len %zu " +- "uuid %"PRIx64" request 0x%lx", ++ "ep_ptr 0x%lx request 0x%lx", + eagers_first_hdr->super.super.super.tag, + eagers_first_hdr->super.msg_id, + eagers_first_hdr->super.total_len, +- eagers_first_hdr->req.sender_uuid, ++ eagers_first_hdr->req.ep_ptr, + eagers_first_hdr->req.reqptr); + header_len = sizeof(*eagers_first_hdr); + break; +@@ -304,8 +343,8 @@ static void ucp_eager_dump(ucp_worker_h worker, uct_am_trace_type_t type, + header_len = sizeof(*rep_hdr); + break; + case UCP_AM_ID_OFFLOAD_SYNC_ACK: +- snprintf(buffer, max, "EGRS_A_O tag %"PRIx64" uuid %"PRIx64"", +- off_rep_hdr->sender_tag, off_rep_hdr->sender_uuid); ++ snprintf(buffer, max, "EGRS_A_O tag %"PRIx64" ep_ptr 0x%lx", ++ off_rep_hdr->sender_tag, off_rep_hdr->ep_ptr); + header_len = sizeof(*rep_hdr); + break; + default: +@@ -318,19 +357,19 @@ static void ucp_eager_dump(ucp_worker_h worker, uct_am_trace_type_t type, + } + + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_ONLY, ucp_eager_only_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); ++ ucp_eager_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_FIRST, ucp_eager_first_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); ++ ucp_eager_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_MIDDLE, ucp_eager_middle_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); +-UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_ONLY, ucp_eager_sync_only_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); +-UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_FIRST, ucp_eager_sync_first_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); +-UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_ACK, ucp_eager_sync_ack_handler, +- ucp_eager_dump, UCT_CB_FLAG_SYNC); ++ ucp_eager_dump, 0); ++UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_ONLY, ++ ucp_eager_sync_only_handler, ucp_eager_dump, 0); ++UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_FIRST, ++ ucp_eager_sync_first_handler, ucp_eager_dump, 0); ++UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_EAGER_SYNC_ACK, ++ ucp_eager_sync_ack_handler, ucp_eager_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_OFFLOAD_SYNC_ACK, +- ucp_eager_offload_sync_ack_handler, ucp_eager_dump, UCT_CB_FLAG_SYNC); ++ ucp_eager_offload_sync_ack_handler, ucp_eager_dump, 0); + + UCP_DEFINE_AM_PROXY(UCP_AM_ID_EAGER_ONLY); + UCP_DEFINE_AM_PROXY(UCP_AM_ID_EAGER_FIRST); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_snd.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_snd.c +index 14469c9f2..8cbab1b8b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_snd.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/eager_snd.c +@@ -23,7 +23,8 @@ static size_t ucp_tag_pack_eager_only_dt(void *dest, void *arg) + hdr->super.tag = req->send.tag.tag; + + ucs_assert(req->send.state.dt.offset == 0); +- length = ucp_dt_pack(req->send.datatype, hdr + 1, req->send.buffer, ++ length = ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, + &req->send.state.dt, req->send.length); + ucs_assert(length == req->send.length); + return sizeof(*hdr) + length; +@@ -36,11 +37,12 @@ static size_t ucp_tag_pack_eager_sync_only_dt(void *dest, void *arg) + size_t length; + + hdr->super.super.tag = req->send.tag.tag; +- hdr->req.sender_uuid = req->send.ep->worker->uuid; ++ hdr->req.ep_ptr = ucp_request_get_dest_ep_ptr(req); + hdr->req.reqptr = (uintptr_t)req; + + ucs_assert(req->send.state.dt.offset == 0); +- length = ucp_dt_pack(req->send.datatype, hdr + 1, req->send.buffer, ++ length = ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, + &req->send.state.dt, req->send.length); + ucs_assert(length == req->send.length); + return sizeof(*hdr) + length; +@@ -62,9 +64,9 @@ static size_t ucp_tag_pack_eager_first_dt(void *dest, void *arg) + + ucs_assert(req->send.state.dt.offset == 0); + ucs_assert(req->send.length > length); +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + static size_t ucp_tag_pack_eager_sync_first_dt(void *dest, void *arg) +@@ -79,15 +81,15 @@ static size_t ucp_tag_pack_eager_sync_first_dt(void *dest, void *arg) + sizeof(*hdr); + hdr->super.super.super.tag = req->send.tag.tag; + hdr->super.total_len = req->send.length; +- hdr->req.sender_uuid = req->send.ep->worker->uuid; ++ hdr->req.ep_ptr = ucp_request_get_dest_ep_ptr(req); + hdr->super.msg_id = req->send.tag.message_id; + hdr->req.reqptr = (uintptr_t)req; + + ucs_assert(req->send.state.dt.offset == 0); + ucs_assert(req->send.length > length); +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + static size_t ucp_tag_pack_eager_middle_dt(void *dest, void *arg) +@@ -96,29 +98,14 @@ static size_t ucp_tag_pack_eager_middle_dt(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- length = ucp_ep_get_max_bcopy(req->send.ep, req->send.lane) - +- sizeof(*hdr); ++ length = ucs_min(ucp_ep_get_max_bcopy(req->send.ep, req->send.lane) - ++ sizeof(*hdr), ++ req->send.length - req->send.state.dt.offset); + hdr->msg_id = req->send.tag.message_id; + hdr->offset = req->send.state.dt.offset; +- return sizeof(*hdr) + ucp_dt_pack(req->send.datatype, hdr + 1, +- req->send.buffer, &req->send.state.dt, +- length); +-} +- +-static size_t ucp_tag_pack_eager_last_dt(void *dest, void *arg) +-{ +- ucp_eager_middle_hdr_t *hdr = dest; +- ucp_request_t *req = arg; +- size_t length, ret_length; +- +- length = req->send.length - req->send.state.dt.offset; +- hdr->msg_id = req->send.tag.message_id; +- hdr->offset = req->send.state.dt.offset; +- ret_length = ucp_dt_pack(req->send.datatype, hdr + 1, req->send.buffer, +- &req->send.state.dt, length); +- ucs_assertv(ret_length == length, "length=%zu, max_length=%zu", +- ret_length, length); +- return sizeof(*hdr) + ret_length; ++ return sizeof(*hdr) + ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, hdr + 1, req->send.buffer, ++ &req->send.state.dt, length); + } + + /* eager */ +@@ -157,11 +144,9 @@ static ucs_status_t ucp_tag_eager_bcopy_multi(uct_pending_req_t *self) + ucs_status_t status = ucp_do_am_bcopy_multi(self, + UCP_AM_ID_EAGER_FIRST, + UCP_AM_ID_EAGER_MIDDLE, +- UCP_AM_ID_EAGER_MIDDLE, + sizeof(ucp_eager_middle_hdr_t), + ucp_tag_pack_eager_first_dt, +- ucp_tag_pack_eager_middle_dt, +- ucp_tag_pack_eager_last_dt, 1); ++ ucp_tag_pack_eager_middle_dt, 1); + if (status == UCS_OK) { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_request_send_generic_dt_finish(req); +@@ -197,7 +182,6 @@ static ucs_status_t ucp_tag_eager_zcopy_multi(uct_pending_req_t *self) + return ucp_do_am_zcopy_multi(self, + UCP_AM_ID_EAGER_FIRST, + UCP_AM_ID_EAGER_MIDDLE, +- UCP_AM_ID_EAGER_MIDDLE, + &first_hdr, sizeof(first_hdr), + &middle_hdr, sizeof(middle_hdr), + ucp_proto_am_zcopy_req_complete, 1); +@@ -252,11 +236,9 @@ static ucs_status_t ucp_tag_eager_sync_bcopy_multi(uct_pending_req_t *self) + ucs_status_t status = ucp_do_am_bcopy_multi(self, + UCP_AM_ID_EAGER_SYNC_FIRST, + UCP_AM_ID_EAGER_MIDDLE, +- UCP_AM_ID_EAGER_MIDDLE, + sizeof(ucp_eager_middle_hdr_t), + ucp_tag_pack_eager_sync_first_dt, +- ucp_tag_pack_eager_middle_dt, +- ucp_tag_pack_eager_last_dt, 1); ++ ucp_tag_pack_eager_middle_dt, 1); + if (status == UCS_OK) { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_request_send_generic_dt_finish(req); +@@ -286,7 +268,7 @@ static ucs_status_t ucp_tag_eager_sync_zcopy_single(uct_pending_req_t *self) + ucp_eager_sync_hdr_t hdr; + + hdr.super.super.tag = req->send.tag.tag; +- hdr.req.sender_uuid = req->send.ep->worker->uuid; ++ hdr.req.ep_ptr = ucp_request_get_dest_ep_ptr(req); + hdr.req.reqptr = (uintptr_t)req; + + return ucp_do_am_zcopy_single(self, UCP_AM_ID_EAGER_SYNC_ONLY, &hdr, sizeof(hdr), +@@ -301,7 +283,7 @@ static ucs_status_t ucp_tag_eager_sync_zcopy_multi(uct_pending_req_t *self) + + first_hdr.super.super.super.tag = req->send.tag.tag; + first_hdr.super.total_len = req->send.length; +- first_hdr.req.sender_uuid = req->send.ep->worker->uuid; ++ first_hdr.req.ep_ptr = ucp_request_get_dest_ep_ptr(req); + first_hdr.req.reqptr = (uintptr_t)req; + first_hdr.super.msg_id = req->send.tag.message_id; + middle_hdr.msg_id = req->send.tag.message_id; +@@ -310,7 +292,6 @@ static ucs_status_t ucp_tag_eager_sync_zcopy_multi(uct_pending_req_t *self) + return ucp_do_am_zcopy_multi(self, + UCP_AM_ID_EAGER_SYNC_FIRST, + UCP_AM_ID_EAGER_MIDDLE, +- UCP_AM_ID_EAGER_MIDDLE, + &first_hdr, sizeof(first_hdr), + &middle_hdr, sizeof(middle_hdr), + ucp_tag_eager_sync_zcopy_req_complete, 1); +@@ -336,38 +317,41 @@ const ucp_proto_t ucp_tag_eager_sync_proto = { + .mid_hdr_size = sizeof(ucp_eager_hdr_t) + }; + +-void ucp_tag_eager_sync_send_ack(ucp_worker_h worker, void *hdr, uint16_t flags) ++void ucp_tag_eager_sync_send_ack(ucp_worker_h worker, void *hdr, uint16_t recv_flags) + { +- ucp_eager_sync_hdr_t *eagers_hdr; + ucp_request_hdr_t *reqhdr; + ucp_request_t *req; + +- ucs_assert(flags & UCP_RECV_DESC_FLAG_EAGER_SYNC); ++ ucs_assert(recv_flags & UCP_RECV_DESC_FLAG_EAGER_SYNC); + +- if (flags & UCP_RECV_DESC_FLAG_EAGER_OFFLOAD) { +- eagers_hdr = hdr; +- ucp_tag_offload_eager_sync_send_ack(worker, +- eagers_hdr->req.sender_uuid, +- eagers_hdr->super.super.tag); +- return; ++ if (recv_flags & UCP_RECV_DESC_FLAG_EAGER_ONLY) { ++ reqhdr = &((ucp_eager_sync_hdr_t*)hdr)->req; /* only */ ++ } else { ++ reqhdr = &((ucp_eager_sync_first_hdr_t*)hdr)->req; /* first */ + } + +- if (flags & UCP_RECV_DESC_FLAG_EAGER_ONLY) { +- reqhdr = &((ucp_eager_sync_hdr_t*)hdr)->req; +- } else /* first */ { +- reqhdr = &((ucp_eager_sync_first_hdr_t*)hdr)->req; ++ req = ucp_request_get(worker); ++ if (req == NULL) { ++ ucs_fatal("could not allocate request"); + } + +- ucs_assert(reqhdr->reqptr != 0); +- ucs_trace_req("send_sync_ack sender_uuid %"PRIx64" remote_request 0x%lx", +- reqhdr->sender_uuid, reqhdr->reqptr); +- +- req = ucp_worker_allocate_reply(worker, reqhdr->sender_uuid); +- req->send.uct.func = ucp_proto_progress_am_bcopy_single; +- req->send.proto.am_id = UCP_AM_ID_EAGER_SYNC_ACK; +- req->send.proto.remote_request = reqhdr->reqptr; +- req->send.proto.status = UCS_OK; +- req->send.proto.comp_cb = ucp_request_put; ++ req->flags = 0; ++ req->send.ep = ucp_worker_get_ep_by_ptr(worker, reqhdr->ep_ptr); ++ req->send.uct.func = ucp_proto_progress_am_bcopy_single; ++ req->send.proto.comp_cb = ucp_request_put; ++ req->send.proto.status = UCS_OK; ++ ++ ucs_trace_req("send_sync_ack req %p ep %p", req, req->send.ep); ++ ++ if (recv_flags & UCP_RECV_DESC_FLAG_EAGER_OFFLOAD) { ++ ucs_assert(recv_flags & UCP_RECV_DESC_FLAG_EAGER_ONLY); ++ req->send.proto.am_id = UCP_AM_ID_OFFLOAD_SYNC_ACK; ++ req->send.proto.sender_tag = ((ucp_eager_sync_hdr_t*)hdr)->super.super.tag; ++ } else { ++ ucs_assert(reqhdr->reqptr != 0); ++ req->send.proto.am_id = UCP_AM_ID_EAGER_SYNC_ACK; ++ req->send.proto.remote_request = reqhdr->reqptr; ++ } + + ucp_request_send(req); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.c +index d0bf5123a..3fe7fe7f9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.c +@@ -21,28 +21,27 @@ int ucp_tag_offload_iface_activate(ucp_worker_iface_t *iface) + ucp_worker_t *worker = iface->worker; + ucp_context_t *context = worker->context; + +- if (!worker->tm.offload.num_ifaces) { ++ if (worker->tm.offload.iface == NULL) { + ucs_assert(worker->tm.offload.thresh == SIZE_MAX); + ucs_assert(worker->tm.offload.zcopy_thresh == SIZE_MAX); + ucs_assert(worker->tm.offload.iface == NULL); + + worker->tm.offload.thresh = context->config.ext.tm_thresh; +- worker->tm.offload.zcopy_thresh = context->config.ext.tm_max_bcopy; ++ worker->tm.offload.zcopy_thresh = context->config.ext.tm_max_bb_size; + +- /* Cache active offload iface, in most cases only one iface should be +- * used for offload. If more ifaces will be activated, they will be +- * added to offload hash table. */ ++ /* Cache active offload iface. Can use it if this will be the only ++ * active iface on the worker. Otherwise would need to retrieve ++ * offload-capable iface from the offload hash table. */ + worker->tm.offload.iface = iface; + + ucs_debug("Enable TM offload: thresh %zu, zcopy_thresh %zu", + worker->tm.offload.thresh, worker->tm.offload.zcopy_thresh); + } + +- ++worker->tm.offload.num_ifaces; + iface->flags |= UCP_WORKER_IFACE_FLAG_OFFLOAD_ACTIVATED; + +- ucs_debug("Activate tag offload iface %p, num of offload ifaces %d", +- iface, worker->tm.offload.num_ifaces); ++ ucs_debug("Activate tag offload iface %p", iface); ++ + return 1; + } + +@@ -52,7 +51,7 @@ ucp_tag_offload_iface(ucp_worker_t *worker, ucp_tag_t tag) + khiter_t hash_it; + ucp_tag_t key_tag; + +- if (ucs_likely(worker->tm.offload.num_ifaces == 1)) { ++ if (worker->num_active_ifaces == 1) { + ucs_assert(worker->tm.offload.iface != NULL); + return worker->tm.offload.iface; + } +@@ -76,7 +75,8 @@ ucp_tag_offload_release_buf(ucp_request_t *req, int dereg) + } + + /* Tag consumed by the transport - need to remove it from expected queue */ +-void ucp_tag_offload_tag_consumed(uct_tag_context_t *self) ++UCS_PROFILE_FUNC_VOID(ucp_tag_offload_tag_consumed, (self), ++ uct_tag_context_t *self) + { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, recv.uct_ctx); + ucs_queue_head_t *queue; +@@ -86,10 +86,13 @@ void ucp_tag_offload_tag_consumed(uct_tag_context_t *self) + } + + /* Message is scattered to user buffer by the transport, complete the request */ +-void ucp_tag_offload_completed(uct_tag_context_t *self, uct_tag_t stag, +- uint64_t imm, size_t length, ucs_status_t status) ++UCS_PROFILE_FUNC_VOID(ucp_tag_offload_completed, ++ (self, stag, imm, length, status), ++ uct_tag_context_t *self, uct_tag_t stag, ++ uint64_t imm, size_t length, ucs_status_t status) + { +- ucp_request_t *req = ucs_container_of(self, ucp_request_t, recv.uct_ctx); ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, recv.uct_ctx); ++ ucp_eager_sync_hdr_t hdr; + + req->recv.tag.info.sender_tag = stag; + req->recv.tag.info.length = length; +@@ -100,8 +103,15 @@ void ucp_tag_offload_completed(uct_tag_context_t *self, uct_tag_t stag, + } + + if (ucs_unlikely(imm)) { ++ hdr.req.ep_ptr = imm; ++ hdr.req.reqptr = 0; /* unused */ ++ hdr.super.super.tag = stag; ++ + /* Sync send - need to send a reply */ +- ucp_tag_offload_eager_sync_send_ack(req->recv.worker, imm, stag); ++ ucp_tag_eager_sync_send_ack(req->recv.worker, &hdr, ++ UCP_RECV_DESC_FLAG_EAGER_ONLY | ++ UCP_RECV_DESC_FLAG_EAGER_SYNC | ++ UCP_RECV_DESC_FLAG_EAGER_OFFLOAD); + } + + if (req->recv.tag.rdesc != NULL) { +@@ -119,9 +129,11 @@ out: + } + + /* RNDV request matched by the transport. Need to proceed with SW based RNDV */ +-void ucp_tag_offload_rndv_cb(uct_tag_context_t *self, uct_tag_t stag, +- const void *header, unsigned header_length, +- ucs_status_t status) ++UCS_PROFILE_FUNC_VOID(ucp_tag_offload_rndv_cb, ++ (self, stag, header, header_length, status), ++ uct_tag_context_t *self, uct_tag_t stag, ++ const void *header, unsigned header_length, ++ ucs_status_t status) + { + ucp_request_t *req = ucs_container_of(self, ucp_request_t, recv.uct_ctx); + +@@ -169,13 +181,13 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_offload_unexp_rndv, + */ + dummy_rts = ucs_alloca(dummy_rts_size); + dummy_rts->super.tag = stag; +- dummy_rts->sreq.sender_uuid = rndv_hdr->sender_uuid; ++ dummy_rts->sreq.ep_ptr = rndv_hdr->ep_ptr; + dummy_rts->sreq.reqptr = rndv_hdr->reqptr; + dummy_rts->address = remote_addr; + dummy_rts->size = length; + +- ucp_rkey_packed_copy(worker->context, UCS_BIT(md_index), dummy_rts + 1, +- uct_rkeys); ++ ucp_rkey_packed_copy(worker->context, UCS_BIT(md_index), ++ UCT_MD_MEM_TYPE_HOST, dummy_rts + 1, uct_rkeys); + + UCP_WORKER_STAT_TAG_OFFLOAD(worker, RX_UNEXP_RNDV); + ucp_rndv_process_rts(worker, dummy_rts, dummy_rts_size, 0); +@@ -190,12 +202,16 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_offload_unexp_rndv, + ucp_rndv_process_rts(worker, (void*)hdr, hdr_length, 0); + } + +- ucp_tag_offload_unexp(iface, stag); ++ /* Unexpected RNDV (both SW and HW) need to enable offload capabilities. ++ * Pass TM_THRESH value as a length to make sure tag is added to the ++ * hash table if there is a need (i.e. we have several active ifaces). */ ++ ucp_tag_offload_unexp(iface, stag, worker->tm.offload.thresh); + + return UCS_OK; + } + +-void ucp_tag_offload_cancel(ucp_worker_t *worker, ucp_request_t *req, unsigned mode) ++UCS_PROFILE_FUNC_VOID(ucp_tag_offload_cancel, (worker, req, mode), ++ ucp_worker_t *worker, ucp_request_t *req, unsigned mode) + { + + ucp_worker_iface_t *wiface = req->recv.tag.wiface; +@@ -219,7 +235,7 @@ void ucp_tag_offload_cancel(ucp_worker_t *worker, ucp_request_t *req, unsigned m + } + + static UCS_F_ALWAYS_INLINE int +-ucp_tag_offload_do_post(ucp_request_t *req, ucp_request_queue_t *req_queue) ++ucp_tag_offload_do_post(ucp_request_t *req) + { + ucp_worker_t *worker = req->recv.worker; + ucp_context_t *context = worker->context; +@@ -252,7 +268,8 @@ ucp_tag_offload_do_post(ucp_request_t *req, ucp_request_queue_t *req_queue) + /* register the whole buffer to support SW RNDV fallback */ + status = ucp_request_memory_reg(context, UCS_BIT(mdi), req->recv.buffer, + req->recv.length, req->recv.datatype, +- &req->recv.state, req); ++ &req->recv.state, req->recv.mem_type, ++ req, UCT_MD_MEM_FLAG_HIDE_ERRORS); + if (status != UCS_OK) { + return status; + } +@@ -319,7 +336,6 @@ static UCS_F_ALWAYS_INLINE int + ucp_tag_offload_post_sw_reqs(ucp_request_t *req, ucp_request_queue_t *req_queue) + { + ucp_worker_t *worker = req->recv.worker; +- ucs_queue_iter_t iter; + ucs_status_t status; + ucp_request_t *req_exp; + ucp_worker_iface_t *wiface; +@@ -350,12 +366,12 @@ ucp_tag_offload_post_sw_reqs(ucp_request_t *req, ucp_request_queue_t *req_queue) + return 0; + } + +- ucs_queue_for_each_safe(req_exp, iter, &req_queue->queue, recv.queue) { ++ ucs_queue_for_each(req_exp, &req_queue->queue, recv.queue) { + if (req_exp->flags & UCP_REQUEST_FLAG_OFFLOADED) { + continue; + } + ucs_assert(req_exp != req); +- status = ucp_tag_offload_do_post(req_exp, req_queue); ++ status = ucp_tag_offload_do_post(req_exp); + if (status != UCS_OK) { + return 0; + } +@@ -366,7 +382,8 @@ ucp_tag_offload_post_sw_reqs(ucp_request_t *req, ucp_request_queue_t *req_queue) + return 1; + } + +-int ucp_tag_offload_post(ucp_request_t *req, ucp_request_queue_t *req_queue) ++UCS_PROFILE_FUNC(int, ucp_tag_offload_post, (req, req_queue), ++ ucp_request_t *req, ucp_request_queue_t *req_queue) + { + ucp_worker_t *worker = req->recv.worker; + ucp_context_t *context = worker->context; +@@ -395,7 +412,7 @@ int ucp_tag_offload_post(ucp_request_t *req, ucp_request_queue_t *req_queue) + return 0; + } + +- if (ucp_tag_offload_do_post(req, req_queue) != UCS_OK) { ++ if (ucp_tag_offload_do_post(req) != UCS_OK) { + return 0; + } + +@@ -407,7 +424,8 @@ static size_t ucp_tag_offload_pack_eager(void *dest, void *arg) + ucp_request_t *req = arg; + size_t length; + +- length = ucp_dt_pack(req->send.datatype, dest, req->send.buffer, ++ length = ucp_dt_pack(req->send.ep->worker, req->send.datatype, ++ req->send.mem_type, dest, req->send.buffer, + &req->send.state.dt, req->send.length); + ucs_assert(length == req->send.length); + return length; +@@ -462,7 +480,8 @@ ucp_do_tag_offload_zcopy(uct_pending_req_t *self, uint64_t imm_data, + req->send.lane = ucp_ep_get_tag_lane(ep); + + ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iov, &dt_state, +- req->send.buffer, req->send.datatype, req->send.length, 0, NULL); ++ req->send.buffer, req->send.datatype, req->send.length, ++ ucp_ep_md_index(ep, req->send.lane), NULL); + + status = uct_ep_tag_eager_zcopy(ep->uct_eps[req->send.lane], req->send.tag.tag, + imm_data, iov, iovcnt, 0, +@@ -539,7 +558,7 @@ ucs_status_t ucp_tag_offload_rndv_zcopy(uct_pending_req_t *self) + md_index = ucp_ep_md_index(ep, req->send.lane); + + ucp_tag_offload_unexp_rndv_hdr_t rndv_hdr = { +- .sender_uuid = ep->worker->uuid, ++ .ep_ptr = ucp_request_get_dest_ep_ptr(req), + .reqptr = (uintptr_t)req, + .md_index = md_index + }; +@@ -550,7 +569,8 @@ ucs_status_t ucp_tag_offload_rndv_zcopy(uct_pending_req_t *self) + ucs_assert_always(UCP_DT_IS_CONTIG(req->send.datatype)); + + ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iov, &dt_state, +- req->send.buffer, req->send.datatype, req->send.length, 0, NULL); ++ req->send.buffer, req->send.datatype, req->send.length, ++ ucp_ep_md_index(ep, req->send.lane), NULL); + + rndv_op = uct_ep_tag_rndv_zcopy(ep->uct_eps[req->send.lane], req->send.tag.tag, + &rndv_hdr, sizeof(rndv_hdr), iov, iovcnt, 0, +@@ -637,7 +657,7 @@ static ucs_status_t ucp_tag_offload_eager_sync_bcopy(uct_pending_req_t *self) + ucp_worker_t *worker = req->send.ep->worker; + ucs_status_t status; + +- status = ucp_do_tag_offload_bcopy(self, worker->uuid, ++ status = ucp_do_tag_offload_bcopy(self, ucp_request_get_dest_ep_ptr(req), + ucp_tag_offload_pack_eager); + if (status == UCS_OK) { + ucp_tag_offload_sync_posted(worker, req); +@@ -654,7 +674,7 @@ static ucs_status_t ucp_tag_offload_eager_sync_zcopy(uct_pending_req_t *self) + ucp_worker_t *worker = req->send.ep->worker; + ucs_status_t status; + +- status = ucp_do_tag_offload_zcopy(self, worker->uuid, ++ status = ucp_do_tag_offload_zcopy(self, ucp_request_get_dest_ep_ptr(req), + ucp_tag_eager_sync_zcopy_req_complete); + if (status == UCS_OK) { + ucp_tag_offload_sync_posted(worker, req); +@@ -662,24 +682,6 @@ static ucs_status_t ucp_tag_offload_eager_sync_zcopy(uct_pending_req_t *self) + return status; + } + +-void ucp_tag_offload_eager_sync_send_ack(ucp_worker_h worker, +- uint64_t sender_uuid, +- ucp_tag_t sender_tag) +-{ +- ucp_request_t *req; +- +- ucs_trace_req("offload_send_sync_ack sender_uuid %"PRIx64" sender_tag %"PRIx64"", +- sender_uuid, sender_tag); +- +- req = ucp_worker_allocate_reply(worker, sender_uuid); +- req->send.uct.func = ucp_proto_progress_am_bcopy_single; +- req->send.proto.am_id = UCP_AM_ID_OFFLOAD_SYNC_ACK; +- req->send.proto.sender_uuid = sender_uuid; +- req->send.proto.sender_tag = sender_tag; +- req->send.proto.comp_cb = ucp_request_put; +- ucp_request_send(req); +-} +- + const ucp_proto_t ucp_tag_offload_sync_proto = { + .contig_short = NULL, + .bcopy_single = ucp_tag_offload_eager_sync_bcopy, +@@ -691,5 +693,3 @@ const ucp_proto_t ucp_tag_offload_sync_proto = { + .first_hdr_size = 0, + .mid_hdr_size = 0 + }; +- +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.h +index 29e921d25..fbdc4be75 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/offload.h +@@ -22,7 +22,7 @@ enum { + * Header for unexpected rendezvous + */ + typedef struct { +- uint64_t sender_uuid; /* Sender worker uuid */ ++ uintptr_t ep_ptr; + uintptr_t reqptr; /* Request pointer */ + uint8_t md_index; /* md index */ + } UCS_S_PACKED ucp_tag_offload_unexp_rndv_hdr_t; +@@ -32,7 +32,7 @@ typedef struct { + * Header for sync send acknowledgment + */ + typedef struct { +- uint64_t sender_uuid; ++ uintptr_t ep_ptr; + ucp_tag_t sender_tag; + } UCS_S_PACKED ucp_offload_ssend_hdr_t; + +@@ -49,10 +49,6 @@ void ucp_tag_offload_cancel_rndv(ucp_request_t *req); + + ucs_status_t ucp_tag_offload_start_rndv(ucp_request_t *sreq); + +-void ucp_tag_offload_eager_sync_send_ack(ucp_worker_h worker, +- uint64_t sender_uuid, +- ucp_tag_t sender_tag); +- + ucs_status_t ucp_tag_offload_unexp_eager(void *arg, void *data, size_t length, + unsigned flags, uct_tag_t stag, uint64_t imm); + +@@ -106,18 +102,21 @@ ucp_tag_offload_try_cancel(ucp_worker_t *worker, ucp_request_t *req, unsigned mo + * message received on this interface. Also it maintains hash of tags, if + * more than one interface is active. Then, when expected receive request needs + * to be offloaded, the corresponding offload-capable interface is retrieved +- * from the hash. Having just one offload-capable interface is supposed to be +- * a fast path, because it matches homogeneous cluster configurations. So, no +- * hashing is done, while only one offload-capable interface is active. ++ * from the hash. + * + * @note Hash key is a tag masked with 'tag_sender_mask', because it needs to + * identify a particular sender, rather than every single tag. + * ++ * @note Tag is added to the hash table for messages bigger than TM_THRESH. ++ * Smaller messages are not supposed to be matched in HW, thus no need ++ * to waste time on hashing for them. ++ * ++ * + * @param [in] wiface UCP worker interface. + * @param [in] tag Tag of the arrived unexpected message. + */ + static UCS_F_ALWAYS_INLINE void +-ucp_tag_offload_unexp(ucp_worker_iface_t *wiface, ucp_tag_t tag) ++ucp_tag_offload_unexp(ucp_worker_iface_t *wiface, ucp_tag_t tag, size_t length) + { + ucp_worker_t *worker = wiface->worker; + ucp_tag_t tag_key; +@@ -132,7 +131,8 @@ ucp_tag_offload_unexp(ucp_worker_iface_t *wiface, ucp_tag_t tag) + } + } + +- if (ucs_unlikely(worker->tm.offload.num_ifaces > 1)) { ++ if (ucs_unlikely((length >= worker->tm.offload.thresh) && ++ (worker->num_active_ifaces > 1))) { + tag_key = worker->context->config.tag_sender_mask & tag; + hash_it = kh_put(ucp_tag_offload_hash, &worker->tm.offload.tag_hash, + tag_key, &ret); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/probe.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/probe.c +index a097b8f76..ec80139fa 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/probe.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/probe.c +@@ -21,7 +21,9 @@ ucp_tag_message_h ucp_tag_probe_nb(ucp_worker_h worker, ucp_tag_t tag, + ucp_recv_desc_t *rdesc; + uint16_t flags; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_TAG, ++ return NULL); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + ucs_trace_req("probe_nb tag %"PRIx64"/%"PRIx64" remove=%d", tag, tag_mask, + remove); +@@ -41,7 +43,7 @@ ucp_tag_message_h ucp_tag_probe_nb(ucp_worker_h worker, ucp_tag_t tag, + } + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + + return rdesc; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/rndv.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/rndv.c +index 41c194060..64ee63431 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/rndv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/rndv.c +@@ -19,6 +19,26 @@ static int ucp_rndv_is_get_zcopy(ucp_request_t *sreq, ucp_rndv_mode_t rndv_mode) + UCP_MEM_IS_HOST(sreq->send.mem_type))); + } + ++static int ucp_rndv_is_pipeline_needed(ucp_request_t *sreq) { ++ uct_md_attr_t *md_attr; ++ unsigned md_index; ++ ++ if (UCP_MEM_IS_HOST(sreq->send.mem_type)) { ++ return 0; ++ } ++ ++ if (sreq->send.ep->worker->context->config.ext.rndv_mode == ++ UCP_RNDV_MODE_PUT_ZCOPY) { ++ return 0; ++ } ++ ++ md_index = ucp_ep_md_index(sreq->send.ep, sreq->send.lane); ++ md_attr = &sreq->send.ep->worker->context->tl_mds[md_index].attr; ++ ++ /* check if lane support only mem type */ ++ return md_attr->cap.reg_mem_types & UCS_BIT(UCT_MD_MEM_TYPE_HOST); ++} ++ + size_t ucp_tag_rndv_rts_pack(void *dest, void *arg) + { + ucp_request_t *sreq = arg; /* send request */ +@@ -28,7 +48,7 @@ size_t ucp_tag_rndv_rts_pack(void *dest, void *arg) + + rndv_rts_hdr->super.tag = sreq->send.tag.tag; + rndv_rts_hdr->sreq.reqptr = (uintptr_t)sreq; +- rndv_rts_hdr->sreq.sender_uuid = worker->uuid; ++ rndv_rts_hdr->sreq.ep_ptr = ucp_request_get_dest_ep_ptr(sreq); + rndv_rts_hdr->size = sreq->send.length; + + /* Pack remote keys (which can be empty list) */ +@@ -39,6 +59,7 @@ size_t ucp_tag_rndv_rts_pack(void *dest, void *arg) + packed_rkey_size = ucp_rkey_pack_uct(worker->context, + sreq->send.state.dt.dt.contig.md_map, + sreq->send.state.dt.dt.contig.memh, ++ sreq->send.mem_type, + rndv_rts_hdr + 1); + if (packed_rkey_size < 0) { + ucs_fatal("failed to pack rendezvous remote key: %s", +@@ -75,6 +96,7 @@ static size_t ucp_tag_rndv_rtr_pack(void *dest, void *arg) + packed_rkey_size = ucp_rkey_pack_uct(rndv_req->send.ep->worker->context, + rreq->recv.state.dt.contig.md_map, + rreq->recv.state.dt.contig.memh, ++ rreq->recv.mem_type, + rndv_rtr_hdr + 1); + if (packed_rkey_size < 0) { + return packed_rkey_size; +@@ -113,7 +135,12 @@ ucs_status_t ucp_tag_send_start_rndv(ucp_request_t *sreq) + sreq->send.length); + UCS_PROFILE_REQUEST_EVENT(sreq, "start_rndv", sreq->send.length); + +- if (ep->flags & UCP_EP_FLAG_TAG_OFFLOAD_ENABLED) { ++ status = ucp_ep_resolve_dest_ep_ptr(ep, sreq->send.lane); ++ if (status != UCS_OK) { ++ return status; ++ } ++ ++ if (ucp_ep_is_tag_offload_enabled(ucp_ep_config(ep))) { + status = ucp_tag_offload_start_rndv(sreq); + if (status != UCS_OK) { + return status; +@@ -133,7 +160,6 @@ ucs_status_t ucp_tag_send_start_rndv(ucp_request_t *sreq) + sreq->send.uct.func = ucp_proto_progress_rndv_rts; + } + +- ucp_ep_connect_remote(ep); + return UCS_OK; + } + +@@ -166,7 +192,6 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_complete_rma_put_zcopy, (sreq), + ucp_trace_req(sreq, "rndv_put completed"); + UCS_PROFILE_REQUEST_EVENT(sreq, "complete_rndv_put", 0); + +- ucp_rkey_destroy(sreq->send.rndv_put.rkey); + ucp_request_send_buffer_dereg(sreq); + ucp_request_complete_send(sreq, UCS_OK); + } +@@ -180,6 +205,9 @@ static void ucp_rndv_send_atp(ucp_request_t *sreq, uintptr_t remote_request) + ucp_trace_req(sreq, "send atp remote_request 0x%lx", remote_request); + UCS_PROFILE_REQUEST_EVENT(sreq, "send_atp", 0); + ++ /* destroy rkey before it gets overridden by ATP protocol data */ ++ ucp_rkey_destroy(sreq->send.rndv_put.rkey); ++ + sreq->send.lane = ucp_ep_get_am_lane(sreq->send.ep); + sreq->send.uct.func = ucp_proto_progress_am_bcopy_single; + sreq->send.proto.am_id = UCP_AM_ID_RNDV_ATP; +@@ -245,7 +273,7 @@ static void ucp_rndv_get_lanes_count(ucp_request_t *req) + return; /* already resolved */ + } + +- while ((lane = ucp_rkey_get_rma_bw_lane(req->send.rndv_get.rkey, ep, ++ while ((lane = ucp_rkey_get_rma_bw_lane(req->send.rndv_get.rkey, ep, req->send.mem_type, + &uct_rkey, map)) != UCP_NULL_LANE) { + req->send.rndv_get.lane_count++; + map |= UCS_BIT(lane); +@@ -265,7 +293,7 @@ static ucp_lane_index_t ucp_rndv_get_next_lane(ucp_request_t *rndv_req, uct_rkey + ucp_ep_h ep = rndv_req->send.ep; + ucp_lane_index_t lane; + +- lane = ucp_rkey_get_rma_bw_lane(rndv_req->send.rndv_get.rkey, ep, ++ lane = ucp_rkey_get_rma_bw_lane(rndv_req->send.rndv_get.rkey, ep, rndv_req->send.mem_type, + uct_rkey, rndv_req->send.rndv_get.lanes_map); + + if ((lane == UCP_NULL_LANE) && (rndv_req->send.rndv_get.lanes_map != 0)) { +@@ -273,7 +301,7 @@ static ucp_lane_index_t ucp_rndv_get_next_lane(ucp_request_t *rndv_req, uct_rkey + * is not NULL - we found at least one lane on previous iteration). + * reset used lanes map to NULL and iterate it again */ + rndv_req->send.rndv_get.lanes_map = 0; +- lane = ucp_rkey_get_rma_bw_lane(rndv_req->send.rndv_get.rkey, ep, ++ lane = ucp_rkey_get_rma_bw_lane(rndv_req->send.rndv_get.rkey, ep, rndv_req->send.mem_type, + uct_rkey, rndv_req->send.rndv_get.lanes_map); + } + +@@ -285,7 +313,7 @@ static ucp_lane_index_t ucp_rndv_get_next_lane(ucp_request_t *rndv_req, uct_rkey + rndv_req->send.rndv_get.lanes_map |= UCS_BIT(lane); + /* in case if masked too much lanes - reset mask to zero + * to select first lane next time */ +- if (ucs_count_one_bits(rndv_req->send.rndv_get.lanes_map) >= ++ if (ucs_popcount(rndv_req->send.rndv_get.lanes_map) >= + ep->worker->context->config.ext.max_rndv_lanes) { + rndv_req->send.rndv_get.lanes_map = 0; + } +@@ -309,11 +337,6 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_rma_get_zcopy, (self), + size_t max_zcopy; + size_t tail; + +- if (ucp_ep_is_stub(ep)) { +- rndv_req->send.lane = 0; +- return UCS_ERR_NO_RESOURCE; +- } +- + ucp_rndv_get_lanes_count(rndv_req); + + /* Figure out which lane to use for get operation */ +@@ -455,6 +478,7 @@ static void ucp_rndv_req_send_rma_get(ucp_request_t *rndv_req, ucp_request_t *rr + + rndv_req->send.uct.func = ucp_rndv_progress_rma_get_zcopy; + rndv_req->send.buffer = rreq->recv.buffer; ++ rndv_req->send.mem_type = rreq->recv.mem_type; + rndv_req->send.datatype = ucp_dt_make_contig(1); + rndv_req->send.length = rndv_rts_hdr->size; + rndv_req->send.rndv_get.remote_request = rndv_rts_hdr->sreq.reqptr; +@@ -496,7 +520,17 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_matched, (worker, rreq, rndv_rts_hdr), + + /* the internal send request allocated on receiver side (to perform a "get" + * operation, send "ATS" and "RTR") */ +- rndv_req = ucp_worker_allocate_reply(worker, rndv_rts_hdr->sreq.sender_uuid); ++ rndv_req = ucp_request_get(worker); ++ if (rndv_req == NULL) { ++ ucs_error("failed to allocate rendezvous reply"); ++ goto out; ++ } ++ ++ rndv_req->send.ep = ucp_worker_get_ep_by_ptr(worker, ++ rndv_rts_hdr->sreq.ep_ptr); ++ rndv_req->flags = 0; ++ rndv_req->send.mdesc = NULL; ++ rndv_req->send.pending_lane = UCP_NULL_LANE; + + ucp_trace_req(rreq, + "rndv matched remote {address 0x%"PRIx64" size %zu sreq 0x%lx}" +@@ -513,14 +547,9 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_matched, (worker, rreq, rndv_rts_hdr), + goto out; + } + +- rndv_req->send.pending_lane = UCP_NULL_LANE; + + /* if the receive side is not connected yet then the RTS was received on a stub ep */ + ep = rndv_req->send.ep; +- if (ucp_ep_is_stub(ep)) { +- ucs_debug("received rts on a stub ep, ep %p am_lane %d", ep, +- ucp_ep_get_am_lane(ep)); +- } + + rndv_mode = worker->context->config.ext.rndv_mode; + if (UCP_DT_IS_CONTIG(rreq->recv.datatype)) { +@@ -530,7 +559,8 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_matched, (worker, rreq, rndv_rts_hdr), + goto out; + } else if (rndv_mode != UCP_RNDV_MODE_GET_ZCOPY) { + /* put protocol is allowed - register receive buffer memory for rma */ +- ucp_request_recv_buffer_reg(rreq, ucp_ep_config(ep)->key.rma_bw_md_map); ++ ucp_request_recv_buffer_reg(rreq, ucp_ep_config(ep)->key.rma_bw_md_map, ++ ucs_min(rreq->recv.length, rndv_rts_hdr->size)); + } + } + +@@ -564,9 +594,9 @@ ucs_status_t ucp_rndv_process_rts(void *arg, void *data, size_t length, + UCP_WORKER_STAT_RNDV(worker, EXP); + status = UCS_OK; + } else { +- status = ucp_recv_desc_init(worker, data, length, tl_flags, ++ status = ucp_recv_desc_init(worker, data, length, 0, tl_flags, + sizeof(*rndv_rts_hdr), +- UCP_RECV_DESC_FLAG_RNDV, &rdesc); ++ UCP_RECV_DESC_FLAG_RNDV, 0, &rdesc); + if (!UCS_STATUS_IS_ERR(status)) { + ucp_tag_unexp_recv(&worker->tm, rdesc, rndv_rts_hdr->super.tag); + } +@@ -612,34 +642,20 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_atp_handler, + } + + static size_t ucp_rndv_pack_data(void *dest, void *arg) +-{ +- ucp_rndv_data_hdr_t *hdr = dest; +- ucp_request_t *sreq = arg; +- size_t length; +- +- hdr->rreq_ptr = sreq->send.rndv_data.rreq_ptr; +- hdr->offset = sreq->send.state.dt.offset; +- length = ucp_ep_get_max_bcopy(sreq->send.ep, sreq->send.lane) - sizeof(*hdr); +- +- return sizeof(*hdr) + ucp_dt_pack(sreq->send.datatype, hdr + 1, +- sreq->send.buffer, &sreq->send.state.dt, +- length); +-} +- +-static size_t ucp_rndv_pack_data_last(void *dest, void *arg) + { + ucp_rndv_data_hdr_t *hdr = dest; + ucp_request_t *sreq = arg; + size_t length, offset; + + offset = sreq->send.state.dt.offset; +- hdr->rreq_ptr = sreq->send.rndv_data.rreq_ptr; +- length = sreq->send.length - offset; ++ hdr->rreq_ptr = sreq->send.tag.rreq_ptr; + hdr->offset = offset; ++ length = ucs_min(sreq->send.length - offset, ++ ucp_ep_get_max_bcopy(sreq->send.ep, sreq->send.lane) - sizeof(*hdr)); + +- return sizeof(*hdr) + ucp_dt_pack(sreq->send.datatype, hdr + 1, +- sreq->send.buffer, &sreq->send.state.dt, +- length); ++ return sizeof(*hdr) + ucp_dt_pack(sreq->send.ep->worker, sreq->send.datatype, ++ sreq->send.mem_type, hdr + 1, sreq->send.buffer, ++ &sreq->send.state.dt, length); + } + + UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_am_bcopy, (self), +@@ -654,16 +670,13 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_am_bcopy, (self), + if (sreq->send.length <= ucp_ep_config(ep)->am.max_bcopy - sizeof(ucp_rndv_data_hdr_t)) { + /* send a single bcopy message */ + status = ucp_do_am_bcopy_single(self, UCP_AM_ID_RNDV_DATA, +- ucp_rndv_pack_data_last); ++ ucp_rndv_pack_data); + } else { +- /* send multiple bcopy messages (fragments of the original send message) */ + status = ucp_do_am_bcopy_multi(self, UCP_AM_ID_RNDV_DATA, +- UCP_AM_ID_RNDV_DATA, + UCP_AM_ID_RNDV_DATA, + sizeof(ucp_rndv_data_hdr_t), + ucp_rndv_pack_data, +- ucp_rndv_pack_data, +- ucp_rndv_pack_data_last, 1); ++ ucp_rndv_pack_data, 1); + } + if (status == UCS_OK) { + ucp_rndv_complete_send(sreq); +@@ -712,8 +725,8 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_rma_put_zcopy, (self), + + state = sreq->send.state.dt; + ucp_dt_iov_copy_uct(ep->worker->context, iov, &iovcnt, max_iovcnt, &state, +- sreq->send.buffer, ucp_dt_make_contig(1), length, 0, +- sreq->send.mdesc); ++ sreq->send.buffer, ucp_dt_make_contig(1), length, ++ ucp_ep_md_index(ep, sreq->send.lane), sreq->send.mdesc); + status = uct_ep_put_zcopy(ep->uct_eps[sreq->send.lane], + iov, iovcnt, + sreq->send.rndv_put.remote_address + offset, +@@ -724,7 +737,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_progress_rma_put_zcopy, (self), + status); + if (sreq->send.state.dt.offset == sreq->send.length) { + if (sreq->send.state.uct_comp.count == 0) { +- ucp_rndv_send_atp(sreq, sreq->send.rndv_put.remote_request); ++ sreq->send.state.uct_comp.func(&sreq->send.state.uct_comp, status); + } + return UCS_OK; + } else if (!UCS_STATUS_IS_ERR(status)) { +@@ -758,7 +771,7 @@ static ucs_status_t ucp_rndv_progress_am_zcopy_single(uct_pending_req_t *self) + ucp_request_t *sreq = ucs_container_of(self, ucp_request_t, send.uct); + ucp_rndv_data_hdr_t hdr; + +- hdr.rreq_ptr = sreq->send.rndv_data.rreq_ptr; ++ hdr.rreq_ptr = sreq->send.tag.rreq_ptr; + hdr.offset = 0; + return ucp_do_am_zcopy_single(self, UCP_AM_ID_RNDV_DATA, &hdr, sizeof(hdr), + ucp_rndv_am_zcopy_send_req_complete); +@@ -769,10 +782,9 @@ static ucs_status_t ucp_rndv_progress_am_zcopy_multi(uct_pending_req_t *self) + ucp_request_t *sreq = ucs_container_of(self, ucp_request_t, send.uct); + ucp_rndv_data_hdr_t hdr; + +- hdr.rreq_ptr = sreq->send.rndv_data.rreq_ptr; ++ hdr.rreq_ptr = sreq->send.tag.rreq_ptr; + hdr.offset = sreq->send.state.dt.offset; + return ucp_do_am_zcopy_multi(self, +- UCP_AM_ID_RNDV_DATA, + UCP_AM_ID_RNDV_DATA, + UCP_AM_ID_RNDV_DATA, + &hdr, sizeof(hdr), +@@ -787,6 +799,7 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_frag_put_completion, (self, status), + ucp_request_t *sreq = frag_req->send.rndv_put.sreq; + + ucs_mpool_put_inline((void *)frag_req->send.mdesc); ++ sreq->send.state.dt.offset += frag_req->send.length; + sreq->send.state.uct_comp.count--; + if (0 == sreq->send.state.uct_comp.count) { + ucp_rndv_send_atp(sreq, sreq->send.rndv_put.remote_request); +@@ -813,7 +826,6 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_frag_get_completion, (self, status), + frag_req->send.state.dt.dt.contig.md_map = 0; + + ucp_request_send(frag_req); +- sreq->send.state.dt.offset += frag_req->send.length; + } + + static ucs_status_t ucp_rndv_pipeline(ucp_request_t *sreq, ucp_rndv_rtr_hdr_t *rndv_rtr_hdr) +@@ -860,10 +872,12 @@ static ucs_status_t ucp_rndv_pipeline(ucp_request_t *sreq, ucp_rndv_rtr_hdr_t *r + frag_req->send.ep = pipeline_ep; + frag_req->send.buffer = mdesc + 1; + frag_req->send.datatype = ucp_dt_make_contig(1); ++ frag_req->send.mem_type = sreq->send.mem_type; + frag_req->send.state.dt.dt.contig.memh[0]= ucp_memh2uct(mdesc->memh, md_index); + frag_req->send.state.dt.dt.contig.md_map = UCS_BIT(md_index); + frag_req->send.length = length; + frag_req->send.uct.func = ucp_rndv_progress_rma_get_zcopy; ++ frag_req->send.rndv_get.rkey = NULL; + frag_req->send.rndv_get.remote_address = (uint64_t)(sreq->send.buffer + offset); + frag_req->send.rndv_get.lanes_map = 0; + frag_req->send.rndv_get.lane_count = 0; +@@ -885,7 +899,6 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_rtr_handler, + ucp_rndv_rtr_hdr_t *rndv_rtr_hdr = data; + ucp_request_t *sreq = (ucp_request_t*)rndv_rtr_hdr->sreq_ptr; + ucp_ep_h ep = sreq->send.ep; +- ucp_rndv_mode_t rndv_mode = ep->worker->context->config.ext.rndv_mode; + ucs_status_t status; + + ucp_trace_req(sreq, "received rtr address 0x%lx remote rreq 0x%lx", +@@ -907,11 +920,10 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_rtr_handler, + } + + sreq->send.lane = ucp_rkey_get_rma_bw_lane(sreq->send.rndv_put.rkey, ep, ++ sreq->send.mem_type, + &sreq->send.rndv_put.uct_rkey, 0); + if (sreq->send.lane != UCP_NULL_LANE) { +- if ((rndv_mode == UCP_RNDV_MODE_PUT_ZCOPY) || +- ((rndv_mode == UCP_RNDV_MODE_AUTO) && +- UCP_MEM_IS_HOST(sreq->send.mem_type))) { ++ if (!ucp_rndv_is_pipeline_needed(sreq)) { + ucp_request_send_state_reset(sreq, ucp_rndv_put_completion, + UCP_REQUEST_SEND_PROTO_RNDV_PUT); + sreq->send.uct.func = ucp_rndv_progress_rma_put_zcopy; +@@ -928,10 +940,11 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_rtr_handler, + } + + /* switch to AM */ +- sreq->send.rndv_data.rreq_ptr = rndv_rtr_hdr->rreq_ptr; ++ sreq->send.tag.rreq_ptr = rndv_rtr_hdr->rreq_ptr; + + if (UCP_DT_IS_CONTIG(sreq->send.datatype) && +- (sreq->send.length >= ucp_ep_config(ep)->am.zcopy_thresh[0])) ++ (sreq->send.length >= ++ ucp_ep_config(ep)->am.mem_type_zcopy_thresh[sreq->send.mem_type])) + { + status = ucp_request_send_buffer_reg_lane(sreq, ucp_ep_get_am_lane(ep)); + ucs_assert_always(status == UCS_OK); +@@ -944,12 +957,12 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_rndv_rtr_handler, + sreq->send.uct.func = ucp_rndv_progress_am_zcopy_single; + } else { + sreq->send.uct.func = ucp_rndv_progress_am_zcopy_multi; +- sreq->send.tag.am_bw_index = 0; ++ sreq->send.tag.am_bw_index = 1; + } + } else { + ucp_request_send_state_reset(sreq, NULL, UCP_REQUEST_SEND_PROTO_BCOPY_AM); + sreq->send.uct.func = ucp_rndv_progress_am_bcopy; +- sreq->send.tag.am_bw_index = 0; ++ sreq->send.tag.am_bw_index = 1; + } + + out_send: +@@ -996,9 +1009,10 @@ static void ucp_rndv_dump(ucp_worker_h worker, uct_am_trace_type_t type, + + switch (id) { + case UCP_AM_ID_RNDV_RTS: +- snprintf(buffer, max, "RNDV_RTS tag %"PRIx64" uuid %"PRIx64" sreq 0x%lx " ++ ucs_assert(rndv_rts_hdr->sreq.ep_ptr != 0); ++ snprintf(buffer, max, "RNDV_RTS tag %"PRIx64" ep_ptr %lx sreq 0x%lx " + "address 0x%"PRIx64" size %zu", rndv_rts_hdr->super.tag, +- rndv_rts_hdr->sreq.sender_uuid, rndv_rts_hdr->sreq.reqptr, ++ rndv_rts_hdr->sreq.ep_ptr, rndv_rts_hdr->sreq.reqptr, + rndv_rts_hdr->address, rndv_rts_hdr->size); + if (rndv_rts_hdr->address) { + ucp_rndv_dump_rkey(rndv_rts_hdr + 1, buffer + strlen(buffer), +@@ -1032,15 +1046,15 @@ static void ucp_rndv_dump(ucp_worker_h worker, uct_am_trace_type_t type, + } + + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_RTS, ucp_rndv_rts_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_ATS, ucp_rndv_ats_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_ATP, ucp_rndv_atp_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_RTR, ucp_rndv_rtr_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + UCP_DEFINE_AM(UCP_FEATURE_TAG, UCP_AM_ID_RNDV_DATA, ucp_rndv_data_handler, +- ucp_rndv_dump, UCT_CB_FLAG_SYNC); ++ ucp_rndv_dump, 0); + + UCP_DEFINE_AM_PROXY(UCP_AM_ID_RNDV_RTS); + UCP_DEFINE_AM_PROXY(UCP_AM_ID_RNDV_ATS); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.c +index 1cd17fcf9..e8bc72f06 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.c +@@ -45,7 +45,6 @@ ucs_status_t ucp_tag_match_init(ucp_tag_match_t *tm) + tm->offload.thresh = SIZE_MAX; + tm->offload.zcopy_thresh = SIZE_MAX; + tm->offload.iface = NULL; +- tm->offload.num_ifaces = 0; + tm->am.message_id = ucs_generate_uuid(0); + return UCS_OK; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.h +index ac1759391..9aa2c033c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.h +@@ -82,8 +82,9 @@ typedef struct ucp_tag_match { + struct { + ucs_queue_head_t sync_reqs; /* Outgoing sync send requests */ + khash_t(ucp_tag_offload_hash) tag_hash; /* Hash table of offload ifaces */ +- ucp_worker_iface_t *iface; /* Active offload iface (relevant if num_ifaces +- is 1, otherwise hash should be used) */ ++ ucp_worker_iface_t *iface; /* Active offload iface (relevant if just ++ one iface is activated on the worker, ++ otherwise hash should be used) */ + size_t thresh; /* Minimal receive buffer size to be + used with tag-matching offload. */ + size_t zcopy_thresh; /* Minimal size of user-provided +@@ -95,8 +96,6 @@ typedef struct ucp_tag_match { + or not be used with tag-matching + offload at all, according to + 'thresh' configuration. */ +- unsigned num_ifaces; /* Number of active offload +- capable interfaces */ + } offload; + + struct { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.inl b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.inl +index 2accff867..94ba43525 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_match.inl +@@ -212,27 +212,6 @@ ucp_tag_unexp_search(ucp_tag_match_t *tm, ucp_tag_t tag, uint64_t tag_mask, + return NULL; + } + +-static UCS_F_ALWAYS_INLINE void +-ucp_tag_unexp_desc_release(ucp_recv_desc_t *rdesc) +-{ +- ucs_trace_req("release receive descriptor %p", rdesc); +- if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_UCT_DESC)) { +- /* uct desc is slowpath */ +- if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_EAGER_OFFLOAD)) { +- if (rdesc->flags & UCP_RECV_DESC_FLAG_EAGER_SYNC) { +- uct_iface_release_desc(rdesc); +- } else { +- uct_iface_release_desc( (char*)rdesc - +- (sizeof(ucp_eager_sync_hdr_t) - sizeof(ucp_eager_hdr_t)) ); +- } +- } else { +- uct_iface_release_desc((char*)rdesc - sizeof(ucp_eager_sync_hdr_t)); +- } +- } else { +- ucs_mpool_put_inline(rdesc); +- } +-} +- + /* + * process data, complete receive if done + * @return UCS_OK/ERR - completed, UCS_INPROGRESS - not completed +@@ -280,7 +259,7 @@ ucp_tag_recv_request_process_rdesc(ucp_request_t *req, ucp_recv_desc_t *rdesc, + recv_len = rdesc->length - hdr_len; + status = ucp_tag_request_process_recv_data(req, (void*)(rdesc + 1) + hdr_len, + recv_len, offset, 0); +- ucp_tag_unexp_desc_release(rdesc); ++ ucp_recv_desc_release(rdesc); + return status; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_recv.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_recv.c +index e96fb29e7..d8a3ea20e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_recv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_recv.c +@@ -69,7 +69,7 @@ ucp_tag_recv_common(ucp_worker_h worker, void *buffer, size_t count, + + status = ucp_dt_unpack_only(worker, buffer, count, datatype, mem_type, + (void*)(rdesc + 1) + hdr_len, recv_len, 1); +- ucp_tag_unexp_desc_release(rdesc); ++ ucp_recv_desc_release(rdesc); + + if (req_flags & UCP_REQUEST_FLAG_CALLBACK) { + cb(req + 1, status, &req->recv.tag.info); +@@ -125,7 +125,7 @@ ucp_tag_recv_common(ucp_worker_h worker, void *buffer, size_t count, + if (ucs_unlikely(rdesc->flags & UCP_RECV_DESC_FLAG_RNDV)) { + ucp_rndv_matched(worker, req, (void*)(rdesc + 1)); + UCP_WORKER_STAT_RNDV(worker, UNEXP); +- ucp_tag_unexp_desc_release(rdesc); ++ ucp_recv_desc_release(rdesc); + return; + } + +@@ -160,14 +160,16 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_recv_nbr, + ucp_request_t *req = (ucp_request_t *)request - 1; + ucp_recv_desc_t *rdesc; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_TAG, ++ return UCS_ERR_INVALID_PARAM); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + rdesc = ucp_tag_unexp_search(&worker->tm, tag, tag_mask, 1, "recv_nbr"); + ucp_tag_recv_common(worker, buffer, count, datatype, tag, tag_mask, + req, UCP_REQUEST_DEBUG_FLAG_EXTERNAL, NULL, rdesc, + "recv_nbr"); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return UCS_OK; + } + +@@ -181,7 +183,9 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_recv_nb, + ucs_status_ptr_t ret; + ucp_request_t *req; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_TAG, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + req = ucp_request_get(worker); + if (ucs_likely(req != NULL)) { +@@ -193,7 +197,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_recv_nb, + ret = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return ret; + } + +@@ -207,7 +211,9 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_msg_recv_nb, + ucs_status_ptr_t ret; + ucp_request_t *req; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(worker->context, UCP_FEATURE_TAG, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker); + + req = ucp_request_get(worker); + if (ucs_likely(req != NULL)) { +@@ -219,6 +225,6 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_msg_recv_nb, + ret = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + } + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(worker); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_send.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_send.c +index 04357b8db..429450599 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_send.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/tag/tag_send.c +@@ -19,46 +19,45 @@ + static UCS_F_ALWAYS_INLINE size_t + ucp_tag_get_rndv_threshold(const ucp_request_t *req, size_t count, + size_t max_iov, size_t rndv_rma_thresh, +- size_t rndv_am_thresh, size_t seg_size) ++ size_t rndv_am_thresh) + { + switch (req->send.datatype & UCP_DATATYPE_CLASS_MASK) { +- case UCP_DATATYPE_IOV: ++ case UCP_DATATYPE_IOV: + if ((count > max_iov) && + ucp_ep_is_tag_offload_enabled(ucp_ep_config(req->send.ep))) { + /* Make sure SW RNDV will be used, because tag offload does + * not support multi-packet eager protocols. */ +- return seg_size; ++ return 1; + } + /* Fall through */ +- case UCP_DATATYPE_CONTIG: ++ case UCP_DATATYPE_CONTIG: + return ucs_min(rndv_rma_thresh, rndv_am_thresh); + case UCP_DATATYPE_GENERIC: + return rndv_am_thresh; + default: + ucs_error("Invalid data type %lx", req->send.datatype); + } +- ++ + return SIZE_MAX; + } + + static UCS_F_ALWAYS_INLINE ucs_status_ptr_t +-ucp_tag_send_req(ucp_request_t *req, size_t count, ++ucp_tag_send_req(ucp_request_t *req, size_t dt_count, + const ucp_ep_msg_config_t* msg_config, + size_t rndv_rma_thresh, size_t rndv_am_thresh, + ucp_send_callback_t cb, const ucp_proto_t *proto, + int enable_zcopy) + { +- size_t seg_size = (msg_config->max_bcopy - proto->only_hdr_size); +- size_t rndv_thresh = ucp_tag_get_rndv_threshold(req, count, ++ size_t rndv_thresh = ucp_tag_get_rndv_threshold(req, dt_count, + msg_config->max_iov, + rndv_rma_thresh, +- rndv_am_thresh, seg_size); ++ rndv_am_thresh); + ssize_t max_short = ucp_proto_get_short_max(req, msg_config); + ucs_status_t status; + size_t zcopy_thresh; + + if (enable_zcopy || ucs_unlikely(!UCP_MEM_IS_HOST(req->send.mem_type))) { +- zcopy_thresh = ucp_proto_get_zcopy_threshold(req, msg_config, count, ++ zcopy_thresh = ucp_proto_get_zcopy_threshold(req, msg_config, dt_count, + rndv_thresh); + } else { + zcopy_thresh = rndv_thresh; +@@ -70,8 +69,8 @@ ucp_tag_send_req(ucp_request_t *req, size_t count, + req, req->send.datatype, req->send.buffer, req->send.length, + max_short, rndv_thresh, zcopy_thresh, enable_zcopy); + +- status = ucp_request_send_start(req, max_short, zcopy_thresh, seg_size, +- rndv_thresh, proto); ++ status = ucp_request_send_start(req, max_short, zcopy_thresh, rndv_thresh, ++ dt_count, msg_config, proto); + if (ucs_unlikely(status != UCS_OK)) { + if (status == UCS_ERR_NO_PROGRESS) { + /* RMA/AM rendezvous */ +@@ -123,7 +122,7 @@ ucp_tag_send_req_init(ucp_request_t* req, ucp_ep_h ep, const void* buffer, + { + req->flags = flags; + req->send.ep = ep; +- req->send.buffer = buffer; ++ req->send.buffer = (void*)buffer; + req->send.datatype = datatype; + req->send.tag.tag = tag; + ucp_request_send_state_init(req, datatype, count); +@@ -148,14 +147,24 @@ ucp_tag_send_inline(ucp_ep_h ep, const void *buffer, size_t count, + } + + length = ucp_contig_dt_length(datatype, count); +- if (ucs_unlikely((ssize_t)length > ucp_ep_config(ep)->tag.eager.max_short)) { ++ ++ if ((ssize_t)length <= ucp_ep_config(ep)->tag.max_eager_short) { ++ UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(ucp_eager_hdr_t)); ++ UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(uint64_t)); ++ status = uct_ep_am_short(ucp_ep_get_am_uct_ep(ep), UCP_AM_ID_EAGER_ONLY, ++ tag, buffer, length); ++ } else if ((ssize_t)length <= ucp_ep_config(ep)->tag.offload.max_eager_short) { ++ UCS_STATIC_ASSERT(sizeof(ucp_tag_t) == sizeof(uct_tag_t)); ++ status = uct_ep_tag_eager_short(ucp_ep_get_tag_uct_ep(ep), tag, buffer, ++ length); ++ } else { + return UCS_ERR_NO_RESOURCE; + } + +- status = UCS_PROFILE_CALL(ucp_tag_send_eager_short, ep, tag, buffer, length); + if (status != UCS_ERR_NO_RESOURCE) { + UCP_EP_STAT_TAG_OP(ep, EAGER); + } ++ + return status; + } + +@@ -169,12 +178,15 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_nb, + ucp_request_t *req; + ucs_status_ptr_t ret; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_TAG, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + + ucs_trace_req("send_nb buffer %p count %zu tag %"PRIx64" to %s cb %p", + buffer, count, tag, ucp_ep_peer_name(ep), cb); + +- status = ucp_tag_send_inline(ep, buffer, count, datatype, tag); ++ status = UCS_PROFILE_CALL(ucp_tag_send_inline, ep, buffer, count, ++ datatype, tag); + if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { + ret = UCS_STATUS_PTR(status); /* UCS_OK also goes here */ + goto out; +@@ -193,7 +205,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_nb, + ucp_ep_config(ep)->tag.rndv.am_thresh, + cb, ucp_ep_config(ep)->tag.proto, 1); + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return ret; + } + +@@ -206,14 +218,17 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_send_nbr, + ucs_status_t status; + ucs_status_ptr_t ret; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_TAG, ++ return UCS_ERR_INVALID_PARAM); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + + ucs_trace_req("send_nbr buffer %p count %zu tag %"PRIx64" to %s req %p", + buffer, count, tag, ucp_ep_peer_name(ep), request); + +- status = ucp_tag_send_inline(ep, buffer, count, datatype, tag); ++ status = UCS_PROFILE_CALL(ucp_tag_send_inline, ep, buffer, count, ++ datatype, tag); + if (ucs_likely(status != UCS_ERR_NO_RESOURCE)) { +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return status; + } + +@@ -224,7 +239,7 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_tag_send_nbr, + ucp_ep_config(ep)->tag.rndv_send_nbr.am_thresh, + NULL, ucp_ep_config(ep)->tag.proto, 0); + +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + + if (ucs_unlikely(UCS_PTR_IS_ERR(ret))) { + return UCS_PTR_STATUS(ret); +@@ -239,8 +254,11 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_sync_nb, + { + ucp_request_t *req; + ucs_status_ptr_t ret; ++ ucs_status_t status; + +- UCP_THREAD_CS_ENTER_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_CONTEXT_CHECK_FEATURE_FLAGS(ep->worker->context, UCP_FEATURE_TAG, ++ return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM)); ++ UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(ep->worker); + + ucs_trace_req("send_sync_nb buffer %p count %zu tag %"PRIx64" to %s cb %p", + buffer, count, tag, ucp_ep_peer_name(ep), cb); +@@ -250,15 +268,18 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_sync_nb, + goto out; + } + ++ status = ucp_ep_resolve_dest_ep_ptr(ep, ucp_ep_config(ep)->tag.lane); ++ if (status != UCS_OK) { ++ ret = UCS_STATUS_PTR(status); ++ goto out; ++ } ++ + req = ucp_request_get(ep->worker); + if (req == NULL) { + ret = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); + goto out; + } + +- /* Remote side needs to send reply, so have it connect to us */ +- ucp_ep_connect_remote(ep); +- + ucp_tag_send_req_init(req, ep, buffer, datatype, count, tag, + UCP_REQUEST_FLAG_SYNC); + +@@ -267,6 +288,6 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_tag_send_sync_nb, + ucp_ep_config(ep)->tag.rndv.am_thresh, + cb, ucp_ep_config(ep)->tag.sync_proto, 1); + out: +- UCP_THREAD_CS_EXIT_CONDITIONAL(&ep->worker->mt_lock); ++ UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker); + return ret; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.c +index 3e92f45e8..e2cbe599b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.c +@@ -48,9 +48,11 @@ typedef struct { + float overhead; + float bandwidth; + float lat_ovh; +- uint32_t prio_cap_flags; /* 8 lsb: prio, 24 msb - cap flags */ ++ uint32_t prio_cap_flags; /* 8 lsb: prio, 22 msb: cap flags, 2 hsb: amo */ + } ucp_address_packed_iface_attr_t; + ++#define UCT_ADDRESS_FLAG_ATOMIC32 UCS_BIT(30) /* 32bit atomic operations */ ++#define UCT_ADDRESS_FLAG_ATOMIC64 UCS_BIT(31) /* 64bit atomic operations */ + + #define UCP_ADDRESS_FLAG_LAST 0x80 /* Last address in the list */ + #define UCP_ADDRESS_FLAG_EP_ADDR 0x40 /* Indicates that ep addr is packed +@@ -168,6 +170,15 @@ ucp_address_gather_devices(ucp_worker_h worker, uint64_t tl_bitmap, int has_ep, + return UCS_OK; + } + ++static const char *ucp_address_get_worker_name(ucp_worker_h worker) ++{ ++ #if ENABLE_DEBUG_DATA ++ return ucp_worker_get_name(worker); ++ #else ++ return ""; ++ #endif ++} ++ + static size_t ucp_address_packed_size(ucp_worker_h worker, + const ucp_address_packed_device_t *devices, + ucp_rsc_index_t num_devices) +@@ -176,7 +187,7 @@ static size_t ucp_address_packed_size(ucp_worker_h worker, + size_t size; + + size = sizeof(uint64_t) + +- ucp_address_string_packed_size(ucp_worker_get_name(worker)); ++ ucp_address_string_packed_size(ucp_address_get_worker_name(worker)); + + if (num_devices == 0) { + size += 1; /* NULL md_index */ +@@ -234,9 +245,6 @@ static void ucp_address_pack_iface_attr(ucp_address_packed_iface_attr_t *packed, + uint64_t bit; + + cap_flags = iface_attr->cap.flags; +- if (!enable_atomics) { +- cap_flags &= ~(UCP_UCT_IFACE_ATOMIC32_FLAGS | UCP_UCT_IFACE_ATOMIC64_FLAGS); +- } + + packed->prio_cap_flags = ((uint8_t)iface_attr->priority); + packed->overhead = iface_attr->overhead; +@@ -255,6 +263,18 @@ static void ucp_address_pack_iface_attr(ucp_address_packed_iface_attr_t *packed, + } + bit <<= 1; + } ++ ++ if (enable_atomics) { ++ if (ucs_test_all_flags(iface_attr->cap.atomic32.op_flags, UCP_ATOMIC_OP_MASK) && ++ ucs_test_all_flags(iface_attr->cap.atomic32.fop_flags, UCP_ATOMIC_FOP_MASK)) { ++ packed->prio_cap_flags |= UCT_ADDRESS_FLAG_ATOMIC32; ++ } ++ if (ucs_test_all_flags(iface_attr->cap.atomic64.op_flags, UCP_ATOMIC_OP_MASK) && ++ ucs_test_all_flags(iface_attr->cap.atomic64.fop_flags, UCP_ATOMIC_FOP_MASK)) { ++ packed->prio_cap_flags |= UCT_ADDRESS_FLAG_ATOMIC64; ++ } ++ } ++ + } + + static void +@@ -281,6 +301,15 @@ ucp_address_unpack_iface_attr(ucp_address_iface_attr_t *iface_attr, + } + bit <<= 1; + } ++ ++ if (packed->prio_cap_flags & UCT_ADDRESS_FLAG_ATOMIC32) { ++ iface_attr->atomic.atomic32.op_flags |= UCP_ATOMIC_OP_MASK; ++ iface_attr->atomic.atomic32.fop_flags |= UCP_ATOMIC_FOP_MASK; ++ } ++ if (packed->prio_cap_flags & UCT_ADDRESS_FLAG_ATOMIC64) { ++ iface_attr->atomic.atomic64.op_flags |= UCP_ATOMIC_OP_MASK; ++ iface_attr->atomic.atomic64.fop_flags |= UCP_ATOMIC_FOP_MASK; ++ } + } + + static ucs_status_t ucp_address_do_pack(ucp_worker_h worker, ucp_ep_h ep, +@@ -307,7 +336,7 @@ static ucs_status_t ucp_address_do_pack(ucp_worker_h worker, ucp_ep_h ep, + + *(uint64_t*)ptr = worker->uuid; + ptr += sizeof(uint64_t); +- ptr = ucp_address_pack_string(ucp_worker_get_name(worker), ptr); ++ ptr = ucp_address_pack_string(ucp_address_get_worker_name(worker), ptr); + + if (num_devices == 0) { + *((uint8_t*)ptr) = UCP_NULL_RESOURCE; +@@ -405,7 +434,7 @@ static ucs_status_t ucp_address_do_pack(ucp_worker_h worker, ucp_ep_h ep, + + /* Save the address index of this transport */ + if (order != NULL) { +- order[ucs_count_one_bits(tl_bitmap & UCS_MASK(i))] = index; ++ order[ucs_popcount(tl_bitmap & UCS_MASK(i))] = index; + } + + ucs_trace("pack addr[%d] : "UCT_TL_RESOURCE_DESC_FMT +@@ -476,10 +505,8 @@ out: + return status; + } + +-ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, +- char *remote_name, size_t max, +- unsigned *address_count_p, +- ucp_address_entry_t **address_list_p) ++ucs_status_t ucp_address_unpack(const void *buffer, ++ ucp_unpacked_address_t *unpacked_address) + { + ucp_address_entry_t *address_list, *address; + const uct_device_addr_t *dev_addr; +@@ -497,10 +524,11 @@ ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, + const void *aptr; + + ptr = buffer; +- *remote_uuid_p = *(uint64_t*)ptr; ++ unpacked_address->uuid = *(uint64_t*)ptr; + ptr += sizeof(uint64_t); + +- aptr = ucp_address_unpack_string(ptr, remote_name, max); ++ aptr = ucp_address_unpack_string(ptr, unpacked_address->name, ++ sizeof(unpacked_address->name)); + + address_count = 0; + +@@ -549,6 +577,7 @@ ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, + address_list = ucs_calloc(address_count, sizeof(*address_list), + "ucp_address_list"); + if (address_list == NULL) { ++ ucs_error("failed to allocate address list"); + return UCS_ERR_NO_MEMORY; + } + +@@ -622,8 +651,8 @@ ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, + ++dev_index; + } while (!last_dev); + +- *address_count_p = address_count; +- *address_list_p = address_list; ++ unpacked_address->address_count = address_count; ++ unpacked_address->address_list = address_list; + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.h +index 675ebe0c6..24529c545 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/address.h +@@ -23,12 +23,11 @@ enum { + UCT_IFACE_FLAG_PUT_SHORT | + UCT_IFACE_FLAG_PUT_BCOPY | + UCT_IFACE_FLAG_PUT_ZCOPY | ++ UCT_IFACE_FLAG_GET_SHORT | + UCT_IFACE_FLAG_GET_BCOPY | + UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_TAG_EAGER_BCOPY | + UCT_IFACE_FLAG_TAG_RNDV_ZCOPY | +- UCP_UCT_IFACE_ATOMIC32_FLAGS | +- UCP_UCT_IFACE_ATOMIC64_FLAGS | + UCT_IFACE_FLAG_EVENT_RECV | + UCT_IFACE_FLAG_EVENT_RECV_SIG | + UCT_IFACE_FLAG_PENDING +@@ -39,11 +38,12 @@ enum { + * Remote interface attributes. + */ + struct ucp_address_iface_attr { +- uint64_t cap_flags; /* Interface capability flags */ +- double overhead; /* Interface performance - overhead */ +- double bandwidth; /* Interface performance - bandwidth */ +- int priority; /* Priority of device */ +- double lat_ovh; /* latency overhead */ ++ uint64_t cap_flags; /* Interface capability flags */ ++ double overhead; /* Interface performance - overhead */ ++ double bandwidth; /* Interface performance - bandwidth */ ++ int priority; /* Priority of device */ ++ double lat_ovh; /* Latency overhead */ ++ ucp_tl_iface_atomic_flags_t atomic; /* Atomic operations */ + }; + + +@@ -62,6 +62,17 @@ struct ucp_address_entry { + }; + + ++/** ++ * Unpacked remote address ++ */ ++struct ucp_unpacked_address { ++ uint64_t uuid; /* Remote worker UUID */ ++ char name[UCP_WORKER_NAME_MAX]; /* Remote worker name */ ++ unsigned address_count; /* Length of address list */ ++ ucp_address_entry_t *address_list; /* Pointer to address list */ ++}; ++ ++ + /** + * Pack multiple addresses into a buffer, of resources specified in rsc_bitmap. + * For every resource in rcs_bitmap: +@@ -91,22 +102,16 @@ ucs_status_t ucp_address_pack(ucp_worker_h worker, ucp_ep_h ep, uint64_t tl_bitm + * Unpack a list of addresses. + * + * @param [in] buffer Buffer with data to unpack. +- * @param [out] remote_uuid_p Filled with remote worker uuid. +- * @param [out] remote_name Filled with remote worker name. +- * @param [in] max Maximal length on @a remote_name. +- * @param [out] address_count_p Filled with amount of addresses in the list. +- * @param [out] address_list_p Filled with pointer to unpacked address list. +- * It should be released by ucs_free(). ++ * @param [out] unpacked_address Filled with remote address data. + * + * @note Entries in the address list could point into the data buffer, so it +- * should not be released as long as the list is used. ++ * should not be released as long as the remote address is used. + * +- * @note The address list should be released by ucs_free(). ++ * @note The address list inside @ref ucp_remote_address_t should be released ++ * by ucs_free(). + */ +-ucs_status_t ucp_address_unpack(const void *buffer, uint64_t *remote_uuid_p, +- char *remote_name, size_t max, +- unsigned *address_count_p, +- ucp_address_entry_t **address_list_p); ++ucs_status_t ucp_address_unpack(const void *buffer, ++ ucp_unpacked_address_t *unpacked_address); + + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.c +new file mode 100644 +index 000000000..b08d160dc +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.c +@@ -0,0 +1,209 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++ ++__KHASH_IMPL(ucp_ep_match, static UCS_F_MAYBE_UNUSED inline, uint64_t, ++ ucp_ep_match_entry_t, 1, kh_int64_hash_func, kh_int64_hash_equal); ++ ++ ++#define ucp_ep_match_list_for_each(_elem, _head, _member) \ ++ for (_elem = ucs_container_of((_head)->next, typeof(*_elem), _member); \ ++ (_elem) != ucs_container_of(NULL, typeof(*_elem), _member); \ ++ _elem = ucs_container_of((_elem)->_member.next, typeof(*_elem), _member)) ++ ++static inline void ucp_ep_match_list_add_tail(ucs_list_link_t *head, ++ ucs_list_link_t *elem) ++{ ++ ucs_list_link_t *last; ++ ++ last = head->prev; ++ elem->next = NULL; ++ head->prev = elem; ++ ++ if (last == NULL) { ++ elem->prev = NULL; ++ head->next = elem; ++ } else { ++ elem->prev = last; ++ last->next = elem; ++ } ++} ++ ++static inline void ucp_ep_match_list_del(ucs_list_link_t *head, ++ ucs_list_link_t *elem) ++{ ++ (elem->prev ? elem->prev : head)->next = elem->next; ++ (elem->next ? elem->next : head)->prev = elem->prev; ++} ++ ++void ucp_ep_match_init(ucp_ep_match_ctx_t *match_ctx) ++{ ++ kh_init_inplace(ucp_ep_match, &match_ctx->hash); ++} ++ ++void ucp_ep_match_cleanup(ucp_ep_match_ctx_t *match_ctx) ++{ ++ ucp_ep_match_entry_t entry; ++ uint64_t dest_uuid; ++ ++ kh_foreach(&match_ctx->hash, dest_uuid, entry, { ++ if (entry.exp_ep_q.next != NULL) { ++ ucs_warn("match_ctx %p: uuid 0x%"PRIx64" expected queue is not empty", ++ match_ctx, dest_uuid); ++ } ++ if (entry.unexp_ep_q.next != NULL) { ++ ucs_warn("match_ctx %p: uuid 0x%"PRIx64" unexpected queue is not empty", ++ match_ctx, dest_uuid); ++ } ++ }) ++ kh_destroy_inplace(ucp_ep_match, &match_ctx->hash); ++} ++ ++static ucp_ep_match_entry_t* ++ucp_ep_match_entry_get(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid) ++{ ++ ucp_ep_match_entry_t *entry; ++ khiter_t iter; ++ int ret; ++ ++ iter = kh_put(ucp_ep_match, &match_ctx->hash, dest_uuid, &ret); ++ entry = &kh_value(&match_ctx->hash, iter); ++ ++ if (ret != 0) { ++ /* initialize match list on first use */ ++ entry->next_conn_sn = 0; ++ entry->exp_ep_q.next = NULL; ++ entry->exp_ep_q.prev = NULL; ++ entry->unexp_ep_q.next = NULL; ++ entry->unexp_ep_q.prev = NULL; ++ } ++ ++ return entry; ++} ++ ++ucp_ep_conn_sn_t ucp_ep_match_get_next_sn(ucp_ep_match_ctx_t *match_ctx, ++ uint64_t dest_uuid) ++{ ++ ucp_ep_match_entry_t *entry = ucp_ep_match_entry_get(match_ctx, dest_uuid); ++ return entry->next_conn_sn++; ++} ++ ++static void ucp_ep_match_insert_common(ucp_ep_match_ctx_t *match_ctx, ++ ucs_list_link_t *list, ucp_ep_h ep, ++ uint64_t dest_uuid, const char *title) ++{ ++ /* NOTE: protect union */ ++ ucs_assert(!(ep->flags & (UCP_EP_FLAG_ON_MATCH_CTX | ++ UCP_EP_FLAG_FLUSH_STATE_VALID | ++ UCP_EP_FLAG_LISTENER))); ++ ++ ucp_ep_match_list_add_tail(list, &ucp_ep_ext_gen(ep)->ep_match.list); ++ ep->flags |= UCP_EP_FLAG_ON_MATCH_CTX; ++ ucp_ep_ext_gen(ep)->ep_match.dest_uuid = dest_uuid; ++ ucs_trace("match_ctx %p: ep %p added as %s uuid 0x%"PRIx64" conn_sn %d", ++ match_ctx, ep, title, dest_uuid, ep->conn_sn); ++} ++ ++void ucp_ep_match_insert_exp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_h ep) ++{ ++ ucp_ep_match_entry_t *entry = ucp_ep_match_entry_get(match_ctx, dest_uuid); ++ ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_DEST_EP)); ++ ucp_ep_match_insert_common(match_ctx, &entry->exp_ep_q, ep, dest_uuid, ++ "expected"); ++} ++ ++void ucp_ep_match_insert_unexp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_h ep) ++{ ++ ucp_ep_match_entry_t *entry = ucp_ep_match_entry_get(match_ctx, dest_uuid); ++ ++ ucp_ep_match_insert_common(match_ctx, &entry->unexp_ep_q, ep, dest_uuid, ++ "unexpected"); ++} ++ ++static ucp_ep_h ++ucp_ep_match_retrieve_common(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn, int is_exp, ++ ucp_ep_flags_t exp_ep_flags, const char *title) ++{ ++ ucp_ep_match_entry_t *entry; ++ ucs_list_link_t *list; ++ ucp_ep_ext_gen_t *ep_ext; ++ khiter_t iter; ++ ucp_ep_h ep; ++ ++ iter = kh_get(ucp_ep_match, &match_ctx->hash, dest_uuid); ++ if (iter == kh_end(&match_ctx->hash)) { ++ goto notfound; /* no hash entry */ ++ } ++ ++ entry = &kh_value(&match_ctx->hash, iter); ++ list = is_exp ? &entry->exp_ep_q : &entry->unexp_ep_q; ++ ucp_ep_match_list_for_each(ep_ext, list, ep_match.list) { ++ ep = ucp_ep_from_ext_gen(ep_ext); ++ if (ep->conn_sn == conn_sn) { ++ ucp_ep_match_list_del(list, &ep_ext->ep_match.list); ++ ucs_trace("match_ctx %p: matched %s ep %p by uuid 0x%"PRIx64" conn_sn %d", ++ match_ctx, title, ep, dest_uuid, conn_sn); ++ ucs_assertv(ucs_test_all_flags(ep->flags, ++ exp_ep_flags | UCP_EP_FLAG_ON_MATCH_CTX), ++ "ep=%p flags=0x%x exp_flags=0x%x", ep, ep->flags, ++ exp_ep_flags); ++ ep->flags &= ~UCP_EP_FLAG_ON_MATCH_CTX; ++ return ep; ++ } ++ } ++ ++notfound: ++ ucs_trace("match_ctx %p: %s uuid 0x%"PRIx64" conn_sn %d not found", ++ match_ctx, title, dest_uuid, conn_sn); ++ return NULL; ++} ++ ++ucp_ep_h ucp_ep_match_retrieve_exp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn) ++{ ++ return ucp_ep_match_retrieve_common(match_ctx, dest_uuid, conn_sn, 1, 0, ++ "expected"); ++} ++ ++ucp_ep_h ucp_ep_match_retrieve_unexp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn) ++{ ++ return ucp_ep_match_retrieve_common(match_ctx, dest_uuid, conn_sn, 0, ++ UCP_EP_FLAG_DEST_EP, "unexpected"); ++} ++ ++void ucp_ep_match_remove_ep(ucp_ep_match_ctx_t *match_ctx, ucp_ep_h ep) ++{ ++ ucp_ep_ext_gen_t *ep_ext = ucp_ep_ext_gen(ep); ++ ucp_ep_match_entry_t *entry; ++ khiter_t iter; ++ ++ if (!(ep->flags & UCP_EP_FLAG_ON_MATCH_CTX)) { ++ return; ++ } ++ ++ iter = kh_get(ucp_ep_match, &match_ctx->hash, ep_ext->ep_match.dest_uuid); ++ ucs_assertv(iter != kh_end(&match_ctx->hash), "ep %p not found in hash", ep); ++ entry = &kh_value(&match_ctx->hash, iter); ++ ++ if (ep->flags & UCP_EP_FLAG_DEST_EP) { ++ ucs_trace("match_ctx %p: remove unexpected ep %p", match_ctx, ep); ++ ucp_ep_match_list_del(&entry->unexp_ep_q, &ep_ext->ep_match.list); ++ } else { ++ ucs_trace("match_ctx %p: remove expected ep %p", match_ctx, ep); ++ ucp_ep_match_list_del(&entry->exp_ep_q, &ep_ext->ep_match.list); ++ } ++ ep->flags &= ~UCP_EP_FLAG_ON_MATCH_CTX; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.h +new file mode 100644 +index 000000000..6b424d395 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/ep_match.h +@@ -0,0 +1,74 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCP_EP_MATCH_H_ ++#define UCP_EP_MATCH_H_ ++ ++#include ++#include ++#include ++ ++ ++/* ++ * Structure to embed in a UCP endpoint to support matching with remote endpoints ++ */ ++typedef struct { ++ uint64_t dest_uuid; /* Destination worker UUID */ ++ ucs_list_link_t list; /* List entry into endpoint ++ matching structure */ ++} ucp_ep_match_t; ++ ++ ++/** ++ * Endpoint-to-endpoint matching entry - allows *ordered* matching of endpoints ++ * between a pair of workers. ++ * The expected/unexpected lists are *not* circular ++ */ ++typedef struct ucp_ep_match_entry { ++ ucs_list_link_t exp_ep_q; /* Endpoints created by API and not ++ connected to remote endpoint */ ++ ucs_list_link_t unexp_ep_q; /* Endpoints created internally as ++ connected a to remote endpoints, ++ but not provided to user yet */ ++ ucp_ep_conn_sn_t next_conn_sn; /* Sequence number of matching ++ endpoints, since UCT may provide ++ wireup messages which were sent ++ on different endpoint out-of-order */ ++} ucp_ep_match_entry_t; ++ ++ ++__KHASH_TYPE(ucp_ep_match, uint64_t, ucp_ep_match_entry_t) ++ ++ ++/* Context for matching endpoints */ ++typedef struct { ++ khash_t(ucp_ep_match) hash; ++} ucp_ep_match_ctx_t; ++ ++ ++void ucp_ep_match_init(ucp_ep_match_ctx_t *match_ctx); ++ ++void ucp_ep_match_cleanup(ucp_ep_match_ctx_t *match_ctx); ++ ++ucp_ep_conn_sn_t ucp_ep_match_get_next_sn(ucp_ep_match_ctx_t *match_ctx, ++ uint64_t dest_uuid); ++ ++void ucp_ep_match_insert_exp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_h ep); ++ ++void ucp_ep_match_insert_unexp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_h ep); ++ ++ucp_ep_h ucp_ep_match_retrieve_exp(ucp_ep_match_ctx_t *match_ctx, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn); ++ ++ucp_ep_h ucp_ep_match_retrieve_unexp(ucp_ep_match_ctx_t *ep_conn, uint64_t dest_uuid, ++ ucp_ep_conn_sn_t conn_sn); ++ ++void ucp_ep_match_remove_ep(ucp_ep_match_ctx_t *ep_conn, ucp_ep_h ep); ++ ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/select.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/select.c +index bc1635a27..8bb5db3e4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/select.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/select.c +@@ -16,6 +16,25 @@ + + #define UCP_WIREUP_RMA_BW_TEST_MSG_SIZE 262144 + ++#define UCP_WIREUP_CHECK_AMO_FLAGS(_ae, _criteria, _context, _addr_index, _op, _size) \ ++ if (!ucs_test_all_flags((_ae)->iface_attr.atomic.atomic##_size._op##_flags, \ ++ (_criteria)->remote_atomic_flags.atomic##_size._op##_flags)) { \ ++ char desc[256]; \ ++ ucs_trace("addr[%d] %s: no %s", (_addr_index), \ ++ ucp_find_tl_name_by_csum((_context), (_ae)->tl_name_csum), \ ++ ucp_wireup_get_missing_amo_flag_desc_##_op( \ ++ (_ae)->iface_attr.atomic.atomic##_size._op##_flags, \ ++ (_criteria)->remote_atomic_flags.atomic##_size._op##_flags, \ ++ (_size), desc, sizeof(desc))); \ ++ continue; \ ++ } ++ ++typedef struct ucp_wireup_atomic_flag { ++ const char *name; ++ const char *fetch; ++} ucp_wireup_atomic_flag_t; ++ ++ + enum { + UCP_WIREUP_LANE_USAGE_AM = UCS_BIT(0), /* Active messages */ + UCP_WIREUP_LANE_USAGE_AM_BW = UCS_BIT(1), /* High-BW active messages */ +@@ -64,14 +83,6 @@ static const char *ucp_wireup_iface_flags[] = { + [ucs_ilog2(UCT_IFACE_FLAG_GET_SHORT)] = "get short", + [ucs_ilog2(UCT_IFACE_FLAG_GET_BCOPY)] = "get bcopy", + [ucs_ilog2(UCT_IFACE_FLAG_GET_ZCOPY)] = "get zcopy", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_ADD32)] = "32-bit atomic add", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_ADD64)] = "64-bit atomic add", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_FADD32)] = "32-bit atomic fetch-add", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_FADD64)] = "64-bit atomic fetch-add", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_SWAP32)] = "32-bit atomic swap", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_SWAP64)] = "64-bit atomic swap", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_CSWAP32)] = "32-bit atomic compare-swap", +- [ucs_ilog2(UCT_IFACE_FLAG_ATOMIC_CSWAP64)] = "64-bit atomic compare-swap", + [ucs_ilog2(UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE)] = "peer failure handler", + [ucs_ilog2(UCT_IFACE_FLAG_CONNECT_TO_IFACE)] = "connect to iface", + [ucs_ilog2(UCT_IFACE_FLAG_CONNECT_TO_EP)] = "connect to ep", +@@ -88,6 +99,16 @@ static const char *ucp_wireup_iface_flags[] = { + [ucs_ilog2(UCT_IFACE_FLAG_TAG_RNDV_ZCOPY)] = "tag rndv zcopy" + }; + ++static ucp_wireup_atomic_flag_t ucp_wireup_atomic_desc[] = { ++ [UCT_ATOMIC_OP_ADD] = {.name = "add", .fetch = "fetch-"}, ++ [UCT_ATOMIC_OP_AND] = {.name = "and", .fetch = "fetch-"}, ++ [UCT_ATOMIC_OP_OR] = {.name = "or", .fetch = "fetch-"}, ++ [UCT_ATOMIC_OP_XOR] = {.name = "xor", .fetch = "fetch-"}, ++ [UCT_ATOMIC_OP_SWAP] = {.name = "swap", .fetch = ""}, ++ [UCT_ATOMIC_OP_CSWAP] = {.name = "cscap", .fetch = ""} ++}; ++ ++ + static double ucp_wireup_aux_score_func(ucp_context_h context, + const uct_md_attr_t *md_attr, + const uct_iface_attr_t *iface_attr, +@@ -101,6 +122,37 @@ ucp_wireup_get_missing_flag_desc(uint64_t flags, uint64_t required_flags, + return flag_descs[ucs_ffs64(required_flags & (~flags))]; + } + ++static const char * ++ucp_wireup_get_missing_amo_flag_desc(uint64_t flags, uint64_t required_flags, ++ int op_size, int fetch, char *buf, size_t len) ++{ ++ int idx; ++ ++ ucs_assert((required_flags & (~flags)) != 0); ++ ++ idx = ucs_ffs64(required_flags & (~flags)); ++ ++ snprintf(buf, len, "%d-bit atomic %s%s", op_size, ++ fetch ? ucp_wireup_atomic_desc[idx].fetch : "", ++ ucp_wireup_atomic_desc[idx].name); ++ ++ return buf; ++} ++ ++static const char * ++ucp_wireup_get_missing_amo_flag_desc_op(uint64_t flags, uint64_t required_flags, ++ int op_size, char *buf, size_t len) ++{ ++ return ucp_wireup_get_missing_amo_flag_desc(flags, required_flags, op_size, 0, buf, len); ++} ++ ++static const char * ++ucp_wireup_get_missing_amo_flag_desc_fop(uint64_t flags, uint64_t required_flags, ++ int op_size, char *buf, size_t len) ++{ ++ return ucp_wireup_get_missing_amo_flag_desc(flags, required_flags, op_size, 1, buf, len); ++} ++ + static int ucp_wireup_check_flags(const uct_tl_resource_desc_t *resource, + uint64_t flags, uint64_t required_flags, + const char *title, const char ** flag_descs, +@@ -124,6 +176,30 @@ static int ucp_wireup_check_flags(const uct_tl_resource_desc_t *resource, + return 0; + } + ++static int ucp_wireup_check_amo_flags(const uct_tl_resource_desc_t *resource, ++ uint64_t flags, uint64_t required_flags, ++ int op_size, int fetch, ++ const char *title, char *reason, size_t max) ++{ ++ char missing_flag_desc[256]; ++ ++ if (ucs_test_all_flags(flags, required_flags)) { ++ return 1; ++ } ++ ++ if (required_flags) { ++ ucp_wireup_get_missing_amo_flag_desc(flags, required_flags, ++ op_size, fetch, missing_flag_desc, ++ sizeof(missing_flag_desc)); ++ ucs_trace(UCT_TL_RESOURCE_DESC_FMT " : not suitable for %s, no %s", ++ UCT_TL_RESOURCE_DESC_ARG(resource), title, ++ missing_flag_desc); ++ snprintf(reason, max, UCT_TL_RESOURCE_DESC_FMT" - no %s", ++ UCT_TL_RESOURCE_DESC_ARG(resource), missing_flag_desc); ++ } ++ return 0; ++} ++ + static int ucp_wireup_is_reachable(ucp_worker_h worker, ucp_rsc_index_t rsc_index, + const ucp_address_entry_t *ae) + { +@@ -191,7 +267,8 @@ ucp_wireup_select_transport(ucp_ep_h ep, const ucp_address_entry_t *address_list + + /* Make sure we are indeed passing all flags required by the criteria in + * ucp packed address */ +- ucs_assert(ucs_test_all_flags(UCP_ADDRESS_IFACE_FLAGS, criteria->remote_iface_flags)); ++ ucs_assert(ucs_test_all_flags(UCP_ADDRESS_IFACE_FLAGS, ++ criteria->remote_iface_flags)); + + if (!ucs_test_all_flags(ae->iface_attr.cap_flags, criteria->remote_iface_flags)) { + ucs_trace("addr[%d] %s: no %s", addr_index, +@@ -202,6 +279,11 @@ ucp_wireup_select_transport(ucp_ep_h ep, const ucp_address_entry_t *address_list + continue; + } + ++ UCP_WIREUP_CHECK_AMO_FLAGS(ae, criteria, context, addr_index, op, 32); ++ UCP_WIREUP_CHECK_AMO_FLAGS(ae, criteria, context, addr_index, op, 64); ++ UCP_WIREUP_CHECK_AMO_FLAGS(ae, criteria, context, addr_index, fop, 32); ++ UCP_WIREUP_CHECK_AMO_FLAGS(ae, criteria, context, addr_index, fop, 64); ++ + addr_index_map |= UCS_BIT(addr_index); + } + +@@ -230,7 +312,19 @@ ucp_wireup_select_transport(ucp_ep_h ep, const ucp_address_entry_t *address_list + ucp_wireup_md_flags, p, endp - p) || + !ucp_wireup_check_flags(resource, iface_attr->cap.flags, + criteria->local_iface_flags, criteria->title, +- ucp_wireup_iface_flags, p, endp - p)) ++ ucp_wireup_iface_flags, p, endp - p) || ++ !ucp_wireup_check_amo_flags(resource, iface_attr->cap.atomic32.op_flags, ++ criteria->local_atomic_flags.atomic32.op_flags, ++ 32, 0, criteria->title, p, endp - p) || ++ !ucp_wireup_check_amo_flags(resource, iface_attr->cap.atomic64.op_flags, ++ criteria->local_atomic_flags.atomic64.op_flags, ++ 64, 0, criteria->title, p, endp - p) || ++ !ucp_wireup_check_amo_flags(resource, iface_attr->cap.atomic32.fop_flags, ++ criteria->local_atomic_flags.atomic32.fop_flags, ++ 32, 1, criteria->title, p, endp - p) || ++ !ucp_wireup_check_amo_flags(resource, iface_attr->cap.atomic64.fop_flags, ++ criteria->local_atomic_flags.atomic64.fop_flags, ++ 64, 1, criteria->title, p, endp - p)) + { + p += strlen(p); + snprintf(p, endp - p, ", "); +@@ -469,7 +563,7 @@ ucp_wireup_add_memaccess_lanes(ucp_ep_h ep, unsigned address_count, + ucp_lane_index_t *num_lanes_p, + const ucp_wireup_criteria_t *criteria, + uint64_t tl_bitmap, uint32_t usage, +- int select_best) ++ int select_best, int show_error) + { + ucp_wireup_criteria_t mem_criteria = *criteria; + ucp_address_entry_t *address_list_copy; +@@ -499,7 +593,7 @@ ucp_wireup_add_memaccess_lanes(ucp_ep_h ep, unsigned address_count, + mem_criteria.remote_md_flags = UCT_MD_FLAG_REG | criteria->remote_md_flags; + status = ucp_wireup_select_transport(ep, address_list_copy, address_count, + &mem_criteria, tl_bitmap, remote_md_map, +- -1, -1, select_best, ++ -1, -1, show_error, + &rsc_index, &addr_index, &score); + if (status != UCS_OK) { + goto out_free_address_list; +@@ -573,11 +667,16 @@ static double ucp_wireup_rma_score_func(ucp_context_h context, + (4096.0 / ucs_min(iface_attr->bandwidth, remote_iface_attr->bandwidth))); + } + ++static int ucp_wireup_ep_params_is_err_mode_peer(const ucp_ep_params_t *params) ++{ ++ return (params->field_mask & UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE) && ++ (params->err_mode == UCP_ERR_HANDLING_MODE_PEER); ++} ++ + static void ucp_wireup_fill_ep_params_criteria(ucp_wireup_criteria_t *criteria, + const ucp_ep_params_t *params) + { +- if ((params->field_mask & UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE) && +- (params->err_mode == UCP_ERR_HANDLING_MODE_PEER)) { ++ if (ucp_wireup_ep_params_is_err_mode_peer(params)) { + criteria->local_iface_flags |= UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE; + } + } +@@ -600,22 +699,39 @@ static void ucp_wireup_fill_aux_criteria(ucp_wireup_criteria_t *criteria, + ucp_wireup_fill_ep_params_criteria(criteria, params); + } + ++static void ucp_wireup_clean_amo_criteria(ucp_wireup_criteria_t *criteria) ++{ ++ memset(&criteria->remote_atomic_flags, 0, ++ sizeof(criteria->remote_atomic_flags)); ++ memset(&criteria->local_atomic_flags, 0, ++ sizeof(criteria->local_atomic_flags)); ++} ++ ++static int ucp_wireup_allow_am_emulation_layer(const ucp_ep_params_t *params, ++ unsigned ep_init_flags) ++{ ++ return !(ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE) && ++ /* disable emulation layer if err handling is required due to lack of ++ * keep alive protocol */ ++ !ucp_wireup_ep_params_is_err_mode_peer(params); ++} ++ + static ucs_status_t ucp_wireup_add_rma_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + unsigned ep_init_flags, unsigned address_count, + const ucp_address_entry_t *address_list, + ucp_wireup_lane_desc_t *lane_descs, +- ucp_lane_index_t *num_lanes_p) ++ ucp_lane_index_t *num_lanes_p, ++ int *need_am) + { +- ucp_wireup_criteria_t criteria; ++ ucp_wireup_criteria_t criteria = {0}; ++ ucs_status_t status; ++ int allow_am; + + if (!(ucp_ep_get_context_features(ep) & UCP_FEATURE_RMA) && +- (!(ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE))) { ++ !(ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE)) { + return UCS_OK; + } + +- criteria.local_md_flags = 0; +- criteria.remote_md_flags = 0; +- + if (ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE) { + criteria.title = "copy across memory types"; + criteria.remote_iface_flags = UCT_IFACE_FLAG_PUT_SHORT; +@@ -632,9 +748,19 @@ static ucs_status_t ucp_wireup_add_rma_lanes(ucp_ep_h ep, const ucp_ep_params_t + criteria.tl_rsc_flags = 0; + ucp_wireup_fill_ep_params_criteria(&criteria, params); + +- return ucp_wireup_add_memaccess_lanes(ep, address_count, address_list, +- lane_descs, num_lanes_p, &criteria, +- -1, UCP_WIREUP_LANE_USAGE_RMA, 1); ++ allow_am = ucp_wireup_allow_am_emulation_layer(params, ep_init_flags); ++ status = ucp_wireup_add_memaccess_lanes(ep, address_count, address_list, ++ lane_descs, num_lanes_p, &criteria, ++ -1, UCP_WIREUP_LANE_USAGE_RMA, 1, ++ !allow_am); ++ if (status == UCS_OK) { ++ return status; /* using transport RMA operations */ ++ } else if (allow_am) { ++ *need_am = 1; /* using emulation over active messages */ ++ return UCS_OK; ++ } else { ++ return status; ++ } + } + + double ucp_wireup_amo_score_func(ucp_context_h context, +@@ -652,27 +778,29 @@ static ucs_status_t ucp_wireup_add_amo_lanes(ucp_ep_h ep, const ucp_ep_params_t + unsigned address_count, + const ucp_address_entry_t *address_list, + ucp_wireup_lane_desc_t *lane_descs, +- ucp_lane_index_t *num_lanes_p) ++ ucp_lane_index_t *num_lanes_p, ++ int *need_am) + { +- ucp_worker_h worker = ep->worker; +- ucp_context_h context = worker->context; +- ucp_wireup_criteria_t criteria; ++ ucp_worker_h worker = ep->worker; ++ ucp_context_h context = worker->context; ++ ucp_wireup_criteria_t criteria = {0}; + ucp_rsc_index_t rsc_index; ++ ucs_status_t status; + uint64_t tl_bitmap; ++ int allow_am; + +- criteria.remote_iface_flags = ucp_context_uct_atomic_iface_flags(context); +- if ((criteria.remote_iface_flags == 0) || ++ if (!ucs_test_flags(context->config.features, UCP_FEATURE_AMO32, UCP_FEATURE_AMO64) || + (ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE)) { + return UCS_OK; + } + ++ ucp_context_uct_atomic_iface_flags(context, &criteria.remote_atomic_flags); ++ + criteria.title = "atomic operations on %s memory"; +- criteria.local_md_flags = 0; +- criteria.remote_md_flags = 0; + criteria.local_iface_flags = criteria.remote_iface_flags | + UCT_IFACE_FLAG_PENDING; ++ criteria.local_atomic_flags = criteria.remote_atomic_flags; + criteria.calc_score = ucp_wireup_amo_score_func; +- criteria.tl_rsc_flags = 0; + ucp_wireup_fill_ep_params_criteria(&criteria, params); + + /* We can use only non-p2p resources or resources which are explicitly +@@ -686,9 +814,19 @@ static ucs_status_t ucp_wireup_add_amo_lanes(ucp_ep_h ep, const ucp_ep_params_t + } + } + +- return ucp_wireup_add_memaccess_lanes(ep, address_count, address_list, +- lane_descs, num_lanes_p, &criteria, +- tl_bitmap, UCP_WIREUP_LANE_USAGE_AMO, 1); ++ allow_am = ucp_wireup_allow_am_emulation_layer(params, ep_init_flags); ++ status = ucp_wireup_add_memaccess_lanes(ep, address_count, address_list, ++ lane_descs, num_lanes_p, &criteria, ++ tl_bitmap, UCP_WIREUP_LANE_USAGE_AMO, ++ 1, !allow_am); ++ if (status == UCS_OK) { ++ return status; /* using transport AMO operations */ ++ } else if (allow_am) { ++ *need_am = 1; /* using emulation over active messages */ ++ return UCS_OK; ++ } else { ++ return status; ++ } + } + + static double ucp_wireup_am_score_func(ucp_context_h context, +@@ -724,44 +862,61 @@ static int ucp_wireup_is_lane_proxy(ucp_ep_h ep, ucp_rsc_index_t rsc_index, + UCT_IFACE_FLAG_EVENT_RECV_SIG); + } + ++static inline int ucp_wireup_is_am_required(ucp_ep_h ep, ++ const ucp_ep_params_t *params, ++ unsigned ep_init_flags, ++ ucp_wireup_lane_desc_t *lane_descs, ++ int num_lanes_p) ++{ ++ ucp_lane_index_t lane; ++ ++ /* Check if we need active messages from the configurations, for wireup. ++ * If not, check if am is required due to p2p transports */ ++ ++ if ((ep_init_flags & UCP_EP_CREATE_AM_LANE) || ++ (params->field_mask & UCP_EP_PARAM_FIELD_SOCK_ADDR)) { ++ return 1; ++ } ++ ++ if (!(ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE) && ++ (ucp_ep_get_context_features(ep) & (UCP_FEATURE_TAG | UCP_FEATURE_STREAM))) { ++ return 1; ++ } ++ ++ for (lane = 0; lane < num_lanes_p; ++lane) { ++ if (ucp_worker_is_tl_p2p(ep->worker, lane_descs[lane].rsc_index)) { ++ return 1; ++ } ++ } ++ ++ return 0; ++} ++ + static ucs_status_t ucp_wireup_add_am_lane(ucp_ep_h ep, const ucp_ep_params_t *params, + unsigned ep_init_flags, unsigned address_count, + const ucp_address_entry_t *address_list, + ucp_wireup_lane_desc_t *lane_descs, + ucp_lane_index_t *num_lanes_p, ++ double *am_score, + ucp_err_handling_mode_t err_mode) + { +- ucp_wireup_criteria_t criteria; ++ ucp_wireup_criteria_t criteria = {0}; + ucp_rsc_index_t rsc_index; +- ucp_lane_index_t lane; + ucs_status_t status; + unsigned addr_index; + int is_proxy; +- double score; +- int need_am; + +- /* Check if we need active messages, for wireup */ +- if (!(ucp_ep_get_context_features(ep) & (UCP_FEATURE_TAG | UCP_FEATURE_STREAM)) || +- (ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE)) { +- need_am = 0; +- for (lane = 0; lane < *num_lanes_p; ++lane) { +- need_am = need_am || ucp_worker_is_tl_p2p(ep->worker, +- lane_descs[lane].rsc_index); +- } +- if (!need_am) { +- return UCS_OK; +- } ++ if (!ucp_wireup_is_am_required(ep, params, ep_init_flags, lane_descs, ++ *num_lanes_p)) { ++ return UCS_OK; + } + + /* Select one lane for active messages */ + criteria.title = "active messages"; +- criteria.local_md_flags = 0; +- criteria.remote_md_flags = 0; + criteria.remote_iface_flags = UCT_IFACE_FLAG_AM_BCOPY | + UCT_IFACE_FLAG_CB_SYNC; + criteria.local_iface_flags = UCT_IFACE_FLAG_AM_BCOPY; + criteria.calc_score = ucp_wireup_am_score_func; +- criteria.tl_rsc_flags = 0; + ucp_wireup_fill_ep_params_criteria(&criteria, params); + + if (ucs_test_all_flags(ucp_ep_get_context_features(ep), UCP_FEATURE_TAG | +@@ -770,7 +925,8 @@ static ucs_status_t ucp_wireup_add_am_lane(ucp_ep_h ep, const ucp_ep_params_t *p + } + + status = ucp_wireup_select_transport(ep, address_list, address_count, &criteria, +- -1, -1, -1, -1, 1, &rsc_index, &addr_index, &score); ++ -1, -1, -1, -1, 1, &rsc_index, &addr_index, ++ am_score); + if (status != UCS_OK) { + return status; + } +@@ -784,7 +940,7 @@ static ucs_status_t ucp_wireup_add_am_lane(ucp_ep_h ep, const ucp_ep_params_t *p + address_list[addr_index].iface_attr.cap_flags); + + ucp_wireup_add_lane_desc(lane_descs, num_lanes_p, rsc_index, addr_index, +- address_list[addr_index].md_index, score, ++ address_list[addr_index].md_index, *am_score, + UCP_WIREUP_LANE_USAGE_AM, is_proxy); + + return UCS_OK; +@@ -797,22 +953,25 @@ static double ucp_wireup_am_bw_score_func(ucp_context_h context, + { + /* best single MTU bandwidth */ + double size = iface_attr->cap.am.max_bcopy; +- double time = (size / iface_attr->bandwidth) + iface_attr->overhead + +- remote_iface_attr->overhead; ++ double time = (size / ucs_min(iface_attr->bandwidth, ++ remote_iface_attr->bandwidth)) + ++ iface_attr->overhead + remote_iface_attr->overhead + ++ ucp_wireup_tl_iface_latency(context, iface_attr, remote_iface_attr); ++ + return size / time * 1e-5; + } + +-static int ucp_wireup_is_ud_lane(ucp_context_h context, ucp_rsc_index_t rsc_index) ++static int ucp_wireup_is_ep_single_lane(ucp_ep_h ep, ucp_rsc_index_t rsc_index) + { +- return !strcmp(context->tl_rscs[rsc_index].tl_rsc.tl_name, "ud") || +- !strcmp(context->tl_rscs[rsc_index].tl_rsc.tl_name, "ud_mlx5"); ++ return (ep->worker->context->tl_rscs[rsc_index].tl_rsc.dev_type == UCT_DEVICE_TYPE_SHM) || ++ (ep->worker->context->tl_rscs[rsc_index].tl_rsc.dev_type == UCT_DEVICE_TYPE_SELF); + } + + static ucs_status_t ucp_wireup_add_bw_lanes(ucp_ep_h ep, + unsigned address_count, + const ucp_address_entry_t *address_list, + const ucp_wireup_select_bw_info_t *bw_info, +- int allow_proxy, ++ int allow_proxy, uint64_t tl_bitmap, + ucp_wireup_lane_desc_t *lane_descs, + ucp_lane_index_t *num_lanes_p) + { +@@ -837,9 +996,9 @@ static ucs_status_t ucp_wireup_add_bw_lanes(ucp_ep_h ep, + * (we have to limit MD's number to avoid malloc in + * memory registration) */ + while ((num_lanes < bw_info->max_lanes) && +- (ucs_count_one_bits(md_map) < UCP_MAX_OP_MDS)) { ++ (ucs_popcount(md_map) < UCP_MAX_OP_MDS)) { + status = ucp_wireup_select_transport(ep, address_list, address_count, +- &bw_info->criteria, -1, -1, ++ &bw_info->criteria, tl_bitmap, -1, + local_dev_bitmap, remote_dev_bitmap, + 0, &rsc_index, &addr_index, &score); + if (status != UCS_OK) { +@@ -850,19 +1009,16 @@ static ucs_status_t ucp_wireup_add_bw_lanes(ucp_ep_h ep, + ucp_wireup_is_lane_proxy(ep, rsc_index, + address_list[addr_index].iface_attr.cap_flags); + +- /* FIXME a temporary workaround to prevent the UD uct from using multilane. */ +- if (!ucp_wireup_is_ud_lane(context, rsc_index)) { +- ucp_wireup_add_lane_desc(lane_descs, num_lanes_p, rsc_index, addr_index, +- address_list[addr_index].md_index, score, +- bw_info->usage, is_proxy); +- md_map |= UCS_BIT(context->tl_rscs[rsc_index].md_index); +- num_lanes++; +- } ++ ucp_wireup_add_lane_desc(lane_descs, num_lanes_p, rsc_index, addr_index, ++ address_list[addr_index].md_index, score, ++ bw_info->usage, is_proxy); ++ md_map |= UCS_BIT(context->tl_rscs[rsc_index].md_index); ++ num_lanes++; + + local_dev_bitmap &= ~UCS_BIT(context->tl_rscs[rsc_index].dev_index); + remote_dev_bitmap &= ~UCS_BIT(address_list[addr_index].dev_index); + +- if (ep->worker->context->tl_rscs[rsc_index].tl_rsc.dev_type == UCT_DEVICE_TYPE_SHM) { ++ if (ucp_wireup_is_ep_single_lane(ep, rsc_index)) { + /* special case for SHM: do not try to lookup additional lanes when + * SHM transport detected (another transport will be significantly + * slower) */ +@@ -872,6 +1028,7 @@ static ucs_status_t ucp_wireup_add_bw_lanes(ucp_ep_h ep, + + return UCS_OK; + } ++ + static ucs_status_t ucp_wireup_add_am_bw_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + unsigned ep_init_flags, unsigned address_count, + const ucp_address_entry_t *address_list, +@@ -900,6 +1057,7 @@ static ucs_status_t ucp_wireup_add_am_bw_lanes(ucp_ep_h ep, const ucp_ep_params_ + bw_info.criteria.local_iface_flags = UCT_IFACE_FLAG_AM_BCOPY; + bw_info.criteria.calc_score = ucp_wireup_am_bw_score_func; + bw_info.criteria.tl_rsc_flags = 0; ++ ucp_wireup_clean_amo_criteria(&bw_info.criteria); + ucp_wireup_fill_ep_params_criteria(&bw_info.criteria, params); + + if (ucs_test_all_flags(ucp_ep_get_context_features(ep), UCP_FEATURE_TAG | +@@ -918,20 +1076,21 @@ static ucs_status_t ucp_wireup_add_am_bw_lanes(ucp_ep_h ep, const ucp_ep_params_ + if (lane_descs[lane_desc_idx].usage & UCP_WIREUP_LANE_USAGE_AM) { + addr_index = lane_descs[lane_desc_idx].addr_index; + rsc_index = lane_descs[lane_desc_idx].rsc_index; +- /* FIXME a temporary workaround to prevent the UD uct from using multilane. */ +- if (ucp_wireup_is_ud_lane(context, rsc_index)) { +- return UCS_OK; +- } + bw_info.md_map |= UCS_BIT(context->tl_rscs[rsc_index].md_index); + bw_info.local_dev_bitmap &= ~UCS_BIT(context->tl_rscs[rsc_index].dev_index); + bw_info.remote_dev_bitmap &= ~UCS_BIT(address_list[addr_index].dev_index); +- break; /* do not continue searching due to we found +- AM lane (and there is only one lane) */ ++ if (ucp_wireup_is_ep_single_lane(ep, rsc_index)) { ++ /* if AM lane is SELF or SHMEM - then do not use more lanes */ ++ return UCS_OK; ++ } else { ++ break; /* do not continue searching due to we found ++ AM lane (and there is only one lane) */ ++ } + } + } + + return ucp_wireup_add_bw_lanes(ep, address_count, address_list, &bw_info, 1, +- lane_descs, num_lanes_p); ++ -1, lane_descs, num_lanes_p); + } + + static ucs_status_t ucp_wireup_add_rma_bw_lanes(ucp_ep_h ep, +@@ -942,6 +1101,7 @@ static ucs_status_t ucp_wireup_add_rma_bw_lanes(ucp_ep_h ep, + ucp_lane_index_t *num_lanes_p) + { + ucp_wireup_select_bw_info_t bw_info; ++ uct_memory_type_t mem_type; + + if ((ucp_ep_get_context_features(ep) & UCP_FEATURE_RMA) || + (ep_init_flags & UCP_EP_INIT_FLAG_MEM_TYPE)) { +@@ -955,13 +1115,14 @@ static ucs_status_t ucp_wireup_add_rma_bw_lanes(ucp_ep_h ep, + bw_info.criteria.remote_md_flags = bw_info.criteria.local_md_flags = UCT_MD_FLAG_REG; + } + +- bw_info.criteria.title = "high-bw remote %s memory access"; ++ bw_info.criteria.title = "high-bw remote memory access"; + bw_info.criteria.remote_iface_flags = UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_PUT_ZCOPY; + bw_info.criteria.local_iface_flags = bw_info.criteria.remote_iface_flags | + UCT_IFACE_FLAG_PENDING; + bw_info.criteria.calc_score = ucp_wireup_rma_bw_score_func; + bw_info.criteria.tl_rsc_flags = 0; ++ ucp_wireup_clean_amo_criteria(&bw_info.criteria); + ucp_wireup_fill_ep_params_criteria(&bw_info.criteria, params); + + if (ucs_test_all_flags(ucp_ep_get_context_features(ep), +@@ -975,8 +1136,17 @@ static ucs_status_t ucp_wireup_add_rma_bw_lanes(ucp_ep_h ep, + bw_info.max_lanes = ep->worker->context->config.ext.max_rndv_lanes; + bw_info.usage = UCP_WIREUP_LANE_USAGE_RMA_BW; + +- return ucp_wireup_add_bw_lanes(ep, address_count, address_list, &bw_info, 0, +- lane_descs, num_lanes_p); ++ for (mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { ++ if (!ep->worker->context->mem_type_tls[mem_type]) { ++ continue; ++ } ++ ++ ucp_wireup_add_bw_lanes(ep, address_count, address_list, &bw_info, 0, ++ ep->worker->context->mem_type_tls[mem_type], ++ lane_descs, num_lanes_p); ++ } ++ ++ return UCS_OK; + } + + /* Lane for transport offloaded tag interface */ +@@ -984,9 +1154,10 @@ static ucs_status_t ucp_wireup_add_tag_lane(ucp_ep_h ep, unsigned address_count, + const ucp_address_entry_t *address_list, + ucp_wireup_lane_desc_t *lane_descs, + ucp_lane_index_t *num_lanes_p, ++ double am_score, + ucp_err_handling_mode_t err_mode) + { +- ucp_wireup_criteria_t criteria; ++ ucp_wireup_criteria_t criteria = {0}; + ucp_rsc_index_t rsc_index; + ucs_status_t status; + unsigned addr_index; +@@ -1010,16 +1181,17 @@ static ucs_status_t ucp_wireup_add_tag_lane(ucp_ep_h ep, unsigned address_count, + UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_PENDING; + criteria.calc_score = ucp_wireup_am_score_func; +- criteria.tl_rsc_flags = 0; + + if (ucs_test_all_flags(ucp_ep_get_context_features(ep), UCP_FEATURE_WAKEUP)) { + criteria.local_iface_flags |= UCP_WORKER_UCT_UNSIG_EVENT_CAP_FLAGS; + } + ++ /* Do not add tag offload lane, if selected tag lane score is lower ++ * than AM score. In this case AM will be used for tag macthing. */ + status = ucp_wireup_select_transport(ep, address_list, address_count, &criteria, + -1, -1, -1, -1, 0, &rsc_index, &addr_index, + &score); +- if (status != UCS_OK) { ++ if ((status != UCS_OK) || (am_score > score)) { + goto out; + } + +@@ -1046,10 +1218,10 @@ ucp_wireup_select_wireup_msg_lane(ucp_worker_h worker, + const ucp_wireup_lane_desc_t *lane_descs, + ucp_lane_index_t num_lanes) + { +- ucp_context_h context = worker->context; +- ucp_lane_index_t p2p_lane = UCP_NULL_LANE; ++ ucp_context_h context = worker->context; ++ ucp_lane_index_t p2p_lane = UCP_NULL_LANE; ++ ucp_wireup_criteria_t criteria = {0}; + uct_tl_resource_desc_t *resource; +- ucp_wireup_criteria_t criteria; + ucp_rsc_index_t rsc_index; + ucp_lane_index_t lane; + unsigned addr_index; +@@ -1108,32 +1280,40 @@ ucs_status_t ucp_wireup_select_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + { + ucp_worker_h worker = ep->worker; + ucp_context_h context = worker->context; ++ double am_score = 0.0; + ucp_wireup_lane_desc_t lane_descs[UCP_MAX_LANES]; + ucp_rsc_index_t rsc_index; + ucp_md_index_t md_index; + ucp_lane_index_t lane; + ucp_lane_index_t i; + ucs_status_t status; ++ int need_am = 0; + + memset(lane_descs, 0, sizeof(lane_descs)); + ucp_ep_config_key_reset(key); + ucp_ep_config_key_set_params(key, params); + + status = ucp_wireup_add_rma_lanes(ep, params, ep_init_flags, address_count, +- address_list, lane_descs, &key->num_lanes); ++ address_list, lane_descs, &key->num_lanes, ++ &need_am); + if (status != UCS_OK) { + return status; + } + + status = ucp_wireup_add_amo_lanes(ep, params, ep_init_flags, address_count, +- address_list, lane_descs, &key->num_lanes); ++ address_list, lane_descs, &key->num_lanes, ++ &need_am); + if (status != UCS_OK) { + return status; + } + ++ if (need_am) { ++ ep_init_flags |= UCP_EP_CREATE_AM_LANE; ++ } ++ + status = ucp_wireup_add_am_lane(ep, params, ep_init_flags, address_count, + address_list, lane_descs, &key->num_lanes, +- key->err_mode); ++ &am_score, key->err_mode); + if (status != UCS_OK) { + return status; + } +@@ -1145,7 +1325,7 @@ ucs_status_t ucp_wireup_select_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + } + + status = ucp_wireup_add_tag_lane(ep, address_count, address_list, +- lane_descs, &key->num_lanes, ++ lane_descs, &key->num_lanes, am_score, + key->err_mode); + if (status != UCS_OK) { + return status; +@@ -1224,7 +1404,7 @@ ucs_status_t ucp_wireup_select_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + /* add to map first UCP_MAX_OP_MDS fastest MD's */ + for (i = 0; + (key->rma_bw_lanes[i] != UCP_NULL_LANE) && +- (ucs_count_one_bits(key->rma_bw_md_map) < UCP_MAX_OP_MDS); i++) { ++ (ucs_popcount(key->rma_bw_md_map) < UCP_MAX_OP_MDS); i++) { + lane = key->rma_bw_lanes[i]; + rsc_index = lane_descs[lane].rsc_index; + md_index = worker->context->tl_rscs[rsc_index].md_index; +@@ -1261,7 +1441,7 @@ ucs_status_t ucp_wireup_select_aux_transport(ucp_ep_h ep, + ucp_rsc_index_t *rsc_index_p, + unsigned *addr_index_p) + { +- ucp_wireup_criteria_t criteria; ++ ucp_wireup_criteria_t criteria = {0}; + double score; + + ucp_wireup_fill_aux_criteria(&criteria, params); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.c +index 53b3f0fb5..a7d75e65d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -35,6 +36,7 @@ ucs_status_t ucp_wireup_msg_progress(uct_pending_req_t *self) + ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); + ucp_ep_h ep = req->send.ep; + ssize_t packed_len; ++ unsigned am_flags; + + if (req->send.wireup.type == UCP_WIREUP_MSG_REQUEST) { + if (ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED) { +@@ -42,6 +44,8 @@ ucs_status_t ucp_wireup_msg_progress(uct_pending_req_t *self) + ep); + goto out; + } ++ } else if (req->send.wireup.type == UCP_WIREUP_MSG_PRE_REQUEST) { ++ ucs_assert (!(ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED)); + } + + /* send the active message */ +@@ -50,8 +54,18 @@ ucs_status_t ucp_wireup_msg_progress(uct_pending_req_t *self) + } else { + req->send.lane = ucp_ep_get_wireup_msg_lane(ep); + } ++ ++ am_flags = 0; ++ if ((req->send.wireup.type == UCP_WIREUP_MSG_REQUEST) || ++ (req->send.wireup.type == UCP_WIREUP_MSG_PRE_REQUEST)) { ++ am_flags |= UCT_SEND_FLAG_SIGNALED; ++ } ++ ++ VALGRIND_CHECK_MEM_IS_DEFINED(&req->send.wireup, sizeof(req->send.wireup)); ++ VALGRIND_CHECK_MEM_IS_DEFINED(req->send.buffer, req->send.length); ++ + packed_len = uct_ep_am_bcopy(ep->uct_eps[req->send.lane], UCP_AM_ID_WIREUP, +- ucp_wireup_msg_pack, req, 0); ++ ucp_wireup_msg_pack, req, am_flags); + if (packed_len < 0) { + if (packed_len != UCS_ERR_NO_RESOURCE) { + ucs_error("failed to send wireup: %s", ucs_status_string(packed_len)); +@@ -60,6 +74,9 @@ ucs_status_t ucp_wireup_msg_progress(uct_pending_req_t *self) + } + + switch (req->send.wireup.type) { ++ case UCP_WIREUP_MSG_PRE_REQUEST: ++ ep->flags |= UCP_EP_FLAG_CONNECT_PRE_REQ_SENT; ++ break; + case UCP_WIREUP_MSG_REQUEST: + ep->flags |= UCP_EP_FLAG_CONNECT_REQ_SENT; + break; +@@ -81,22 +98,27 @@ static unsigned ucp_wireup_address_index(const unsigned *order, + uint64_t tl_bitmap, + ucp_rsc_index_t tl_index) + { +- return order[ucs_count_one_bits(tl_bitmap & UCS_MASK(tl_index))]; ++ return order[ucs_popcount(tl_bitmap & UCS_MASK(tl_index))]; ++} ++ ++static inline int ucp_wireup_is_ep_needed(ucp_ep_h ep) ++{ ++ return (ep != NULL) && !(ep->flags & UCP_EP_FLAG_LISTENER); + } + + /* + * @param [in] rsc_tli Resource index for every lane. + */ + static ucs_status_t ucp_wireup_msg_send(ucp_ep_h ep, uint8_t type, +- uint64_t ep_uuid, uint64_t tl_bitmap, ++ uint64_t tl_bitmap, + const ucp_rsc_index_t *rsc_tli) + { + ucp_rsc_index_t rsc_index; + ucp_lane_index_t lane; +- unsigned order[UCP_MAX_LANES + 1]; + ucp_request_t* req; + ucs_status_t status; + void *address; ++ unsigned *order = ucs_alloca(ep->worker->context->num_tls * sizeof(*order)); + + ucs_assert(ep->cfg_index != (uint8_t)-1); + +@@ -112,14 +134,21 @@ static ucs_status_t ucp_wireup_msg_send(ucp_ep_h ep, uint8_t type, + req->send.ep = ep; + req->send.wireup.type = type; + req->send.wireup.err_mode = ucp_ep_config(ep)->key.err_mode; +- req->send.wireup.ep_uuid = ep_uuid; ++ req->send.wireup.conn_sn = ep->conn_sn; ++ req->send.wireup.src_ep_ptr = (uintptr_t)ep; ++ if (ep->flags & UCP_EP_FLAG_DEST_EP) { ++ req->send.wireup.dest_ep_ptr = ucp_ep_dest_ep_ptr(ep); ++ } else { ++ req->send.wireup.dest_ep_ptr = 0; ++ } ++ + req->send.uct.func = ucp_wireup_msg_progress; + req->send.datatype = ucp_dt_make_contig(1); + ucp_request_send_state_init(req, ucp_dt_make_contig(1), 0); + + /* pack all addresses */ +- status = ucp_address_pack(ep->worker, ep, tl_bitmap, order, +- &req->send.length, &address); ++ status = ucp_address_pack(ep->worker, ucp_wireup_is_ep_needed(ep) ? ep : NULL, ++ tl_bitmap, order, &req->send.length, &address); + if (status != UCS_OK) { + ucs_free(req); + ucs_error("failed to pack address: %s", ucs_status_string(status)); +@@ -175,80 +204,204 @@ static void ucp_wireup_remote_connected(ucp_ep_h ep) + { + ucp_lane_index_t lane; + ++ if (ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED) { ++ return; ++ } ++ + ucs_trace("ep %p: remote connected", ep); ++ ep->flags |= UCP_EP_FLAG_REMOTE_CONNECTED; ++ + for (lane = 0; lane < ucp_ep_num_lanes(ep); ++lane) { + if (ucp_ep_is_lane_p2p(ep, lane)) { ++ ucs_assert(ucp_wireup_ep_test(ep->uct_eps[lane])); ++ } ++ if (ucp_wireup_ep_test(ep->uct_eps[lane])) { + ucp_wireup_ep_remote_connected(ep->uct_eps[lane]); + } + } ++ ++ ucs_assert(ep->flags & UCP_EP_FLAG_DEST_EP); + } + +-static void ucp_wireup_process_request(ucp_worker_h worker, const ucp_wireup_msg_t *msg, +- uint64_t uuid, const char *peer_name, +- unsigned address_count, +- const ucp_address_entry_t *address_list) ++ ++static ucs_status_t ++ucp_wireup_init_lanes_by_request(ucp_worker_h worker, ucp_ep_h ep, ++ const ucp_ep_params_t *params, ++ unsigned ep_init_flags, unsigned address_count, ++ const ucp_address_entry_t *address_list, ++ uint8_t *addr_indices) + { ++ ucs_status_t status = ucp_wireup_init_lanes(ep, params, ep_init_flags, ++ address_count, address_list, ++ addr_indices); ++ if (status == UCS_OK) { ++ return UCS_OK; ++ } ++ ++ ucp_worker_set_ep_failed(worker, ep, NULL, UCP_NULL_LANE, status); ++ return status; ++} ++ ++ ++static UCS_F_NOINLINE void ++ucp_wireup_process_pre_request(ucp_worker_h worker, const ucp_wireup_msg_t *msg, ++ const ucp_unpacked_address_t *remote_address) ++{ ++ uint8_t addr_indices[UCP_MAX_LANES]; ++ ucp_ep_params_t params; ++ ucs_status_t status; ++ ucp_ep_h ep; ++ ++ ucs_assert(msg->type == UCP_WIREUP_MSG_PRE_REQUEST); ++ ucs_assert(msg->dest_ep_ptr != 0); ++ ucs_trace("got wireup pre_request from 0x%"PRIx64" src_ep 0x%lx dst_ep 0x%lx conn_sn %d", ++ remote_address->uuid, msg->src_ep_ptr, msg->dest_ep_ptr, msg->conn_sn); ++ ++ /* wireup pre_request for a specific ep */ ++ ep = ucp_worker_get_ep_by_ptr(worker, msg->dest_ep_ptr); ++ ucs_assert(ep->flags & UCP_EP_FLAG_SOCKADDR_PARTIAL_ADDR); ++ ++ ucp_ep_update_dest_ep_ptr(ep, msg->src_ep_ptr); ++ ucp_ep_flush_state_reset(ep); ++ ++ params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; ++ params.err_mode = ucp_ep_config(ep)->key.err_mode; ++ ++ /* initialize transport endpoints */ ++ status = ucp_wireup_init_lanes_by_request(worker, ep, ¶ms, ++ UCP_EP_CREATE_AM_LANE, ++ remote_address->address_count, ++ remote_address->address_list, ++ addr_indices); ++ if (status != UCS_OK) { ++ return; ++ } ++ ++ status = ucp_wireup_send_request(ep); ++ if (status != UCS_OK) { ++ ucp_ep_cleanup_lanes(ep); ++ } ++} ++ ++static UCS_F_NOINLINE void ++ucp_wireup_process_request(ucp_worker_h worker, const ucp_wireup_msg_t *msg, ++ const ucp_unpacked_address_t *remote_address) ++{ ++ uint64_t remote_uuid = remote_address->uuid; ++ uint64_t tl_bitmap = 0; ++ int send_reply = 0; ++ unsigned ep_init_flags = 0; + ucp_rsc_index_t rsc_tli[UCP_MAX_LANES]; + uint8_t addr_indices[UCP_MAX_LANES]; + ucp_lane_index_t lane, remote_lane; + ucp_rsc_index_t rsc_index; + ucp_ep_params_t params; + ucs_status_t status; +- uint64_t tl_bitmap = 0; ++ ucp_ep_flags_t listener_flag; + ucp_ep_h ep; + +- ucs_trace("got wireup request from 0x%"PRIx64, uuid); +- +- if (msg->ep_uuid == worker->uuid) { +- /* Request for a new connection to the worker */ +- ep = ucp_worker_ep_find(worker, uuid); ++ ucs_assert(msg->type == UCP_WIREUP_MSG_REQUEST); ++ ucs_trace("got wireup request from 0x%"PRIx64" src_ep 0x%lx dst_ep 0x%lx conn_sn %d", ++ remote_address->uuid, msg->src_ep_ptr, msg->dest_ep_ptr, msg->conn_sn); ++ ++ if (msg->dest_ep_ptr != 0) { ++ /* wireup request for a specific ep */ ++ ep = ucp_worker_get_ep_by_ptr(worker, msg->dest_ep_ptr); ++ ucp_ep_update_dest_ep_ptr(ep, msg->src_ep_ptr); ++ if (!(ep->flags & UCP_EP_FLAG_LISTENER)) { ++ /* Reset flush state only if it's not a client-server wireup on ++ * server side with long address exchange when listener (united with ++ * flush state) should be valid until user's callback invoking */ ++ ucp_ep_flush_state_reset(ep); ++ } ++ ep_init_flags |= UCP_EP_CREATE_AM_LANE; ++ } else { ++ ep = ucp_ep_match_retrieve_exp(&worker->ep_match_ctx, remote_uuid, ++ msg->conn_sn ^ (remote_uuid == worker->uuid)); + if (ep == NULL) { + /* Create a new endpoint if does not exist */ +- status = ucp_ep_new(worker, uuid, peer_name, "remote-request", &ep); ++ status = ucp_ep_new(worker, remote_address->name, "remote-request", ++ &ep); + if (status != UCS_OK) { + return; + } +- ep->flags |= UCP_EP_FLAG_DEST_UUID_PEER; ++ ++ /* add internal endpoint to hash */ ++ ep->conn_sn = msg->conn_sn; ++ ucp_ep_match_insert_unexp(&worker->ep_match_ctx, remote_uuid, ep); + } else { +- ucs_assert(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER); ++ ucp_ep_flush_state_reset(ep); + } +- } else { +- /* Reply for a client-server connection (client side) */ +- ep = ucp_worker_ep_find(worker, msg->ep_uuid); +- if (ep == NULL) { +- ucs_trace("got connection request with invalid ep_uuid 0x%"PRIx64, +- msg->ep_uuid); ++ ++ ucp_ep_update_dest_ep_ptr(ep, msg->src_ep_ptr); ++ ++ /* ++ * If the current endpoint already sent a connection request, we have a ++ * "simultaneous connect" situation. In this case, only one of the endpoints ++ * (instead of both) should respect the connect request, otherwise they ++ * will end up being connected to "internal" endpoints on the remote side ++ * instead of each other. We use the uniqueness of worker uuid to decide ++ * which connect request should be ignored. ++ */ ++ if ((ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED) && (remote_uuid > worker->uuid)) { ++ ucs_trace("ep %p: ignoring simultaneous connect request", ep); ++ ep->flags |= UCP_EP_FLAG_CONNECT_REQ_IGNORED; + return; + } +- +- /* Reinsert to hash table with destination worker uuid */ +- ucs_assert(!(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER)); +- ucp_ep_delete_from_hash(ep); +- ep->dest_uuid = uuid; +- ep->flags |= UCP_EP_FLAG_DEST_UUID_PEER; +- ucp_ep_add_to_hash(ep); + } + + params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; + params.err_mode = msg->err_mode; + ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ /* If this is an ep on a listener (server) that received a partial ++ * worker address from the client, then the following lanes initialization ++ * will be done after an aux lane was already created on this ep. ++ * Therefore, remove the existing aux endpoint since will need to create ++ * new lanes now */ ++ ucp_ep_cleanup_lanes(ep); ++ } ++ + /* Initialize lanes (possible destroy existing lanes) */ +- status = ucp_wireup_init_lanes(ep, ¶ms, 0, address_count, address_list, +- addr_indices); ++ status = ucp_wireup_init_lanes_by_request(worker, ep, ¶ms, ep_init_flags, ++ remote_address->address_count, ++ remote_address->address_list, ++ addr_indices); + if (status != UCS_OK) { + return; + } + ++ /* Send a reply if remote side does not have ep_ptr (active-active flow) or ++ * there are p2p lanes (client-server flow) ++ */ ++ send_reply = (msg->dest_ep_ptr == 0) || ucp_ep_config(ep)->p2p_lanes; ++ + /* Connect p2p addresses to remote endpoint */ + if (!(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED)) { +- status = ucp_wireup_connect_local(ep, addr_indices, address_count, +- address_list); ++ status = ucp_wireup_connect_local(ep, addr_indices, ++ remote_address->address_count, ++ remote_address->address_list); + if (status != UCS_OK) { + return; + } + + ep->flags |= UCP_EP_FLAG_LOCAL_CONNECTED; + ++ ucs_assert(send_reply); ++ } ++ ++ /* mark the endpoint as connected to remote */ ++ if (!ucp_ep_config(ep)->p2p_lanes) { ++ ucp_wireup_remote_connected(ep); ++ } ++ ++ if (send_reply) { ++ ++ listener_flag = ep->flags & UCP_EP_FLAG_LISTENER; ++ /* Remove this flag at this point if it's set ++ * (so that address packing would be correct) */ ++ ep->flags &= ~UCP_EP_FLAG_LISTENER; ++ + /* Construct the list that tells the remote side with which address we + * have connected to each of its lanes. + */ +@@ -266,35 +419,48 @@ static void ucp_wireup_process_request(ucp_worker_h worker, const ucp_wireup_msg + } + + ucs_trace("ep %p: sending wireup reply", ep); +- status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_REPLY, ep->dest_uuid, +- tl_bitmap, rsc_tli); ++ status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_REPLY, tl_bitmap, rsc_tli); + if (status != UCS_OK) { + return; + } ++ ++ /* Restore saved flag value */ ++ ep->flags |= listener_flag; ++ } else { ++ /* if in client-server flow, schedule invoking the user's callback ++ * (if server is connected) from the main thread */ ++ if (ucs_test_all_flags(ep->flags, ++ (UCP_EP_FLAG_LISTENER | UCP_EP_FLAG_LOCAL_CONNECTED))) { ++ ucp_listener_schedule_accept_cb(ep); ++ } + } + } + +-static void ucp_wireup_process_reply(ucp_worker_h worker, ucp_wireup_msg_t *msg, +- uint64_t uuid, unsigned address_count, +- const ucp_address_entry_t *address_list) ++static UCS_F_NOINLINE void ++ucp_wireup_process_reply(ucp_worker_h worker, const ucp_wireup_msg_t *msg, ++ const ucp_unpacked_address_t *remote_address) + { +- ucp_ep_h ep = ucp_worker_ep_find(worker, uuid); + ucp_rsc_index_t rsc_tli[UCP_MAX_LANES]; + ucs_status_t status; ++ ucp_ep_h ep; + int ack; + +- if (ep == NULL) { +- ucs_debug("ignoring connection reply - not exists"); +- return; +- } ++ ep = ucp_worker_get_ep_by_ptr(worker, msg->dest_ep_ptr); + +- ucs_trace("ep %p: got wireup reply", ep); ++ ucs_assert(msg->type == UCP_WIREUP_MSG_REPLY); ++ ucs_assert((!(ep->flags & UCP_EP_FLAG_LISTENER))); ++ ucs_trace("ep %p: got wireup reply src_ep 0x%lx dst_ep 0x%lx sn %d", ep, ++ msg->src_ep_ptr, msg->dest_ep_ptr, msg->conn_sn); + +- ucs_assert(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER); ++ ucp_ep_match_remove_ep(&worker->ep_match_ctx, ep); ++ ucp_ep_update_dest_ep_ptr(ep, msg->src_ep_ptr); ++ ucp_ep_flush_state_reset(ep); + + /* Connect p2p addresses to remote endpoint */ + if (!(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED)) { +- status = ucp_wireup_connect_local(ep, msg->tli, address_count, address_list); ++ status = ucp_wireup_connect_local(ep, msg->tli, ++ remote_address->address_count, ++ remote_address->address_list); + if (status != UCS_OK) { + return; + } +@@ -305,40 +471,41 @@ static void ucp_wireup_process_reply(ucp_worker_h worker, ucp_wireup_msg_t *msg, + ack = 0; + } + +- if (!(ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED)) { +- ucp_wireup_remote_connected(ep); +- ep->flags |= UCP_EP_FLAG_REMOTE_CONNECTED; +- } ++ ucp_wireup_remote_connected(ep); + + if (ack) { + /* Send ACK without any address, we've already sent it as part of the request */ + ucs_trace("ep %p: sending wireup ack", ep); + memset(rsc_tli, -1, sizeof(rsc_tli)); +- status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_ACK, ep->dest_uuid, 0, +- rsc_tli); ++ status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_ACK, 0, rsc_tli); + if (status != UCS_OK) { + return; + } + } + } + +-static void ucp_wireup_process_ack(ucp_worker_h worker, uint64_t uuid) ++static UCS_F_NOINLINE ++void ucp_wireup_process_ack(ucp_worker_h worker, const ucp_wireup_msg_t *msg) + { +- ucp_ep_h ep = ucp_worker_ep_find(worker, uuid); ++ ucp_ep_h ep; + +- if (ep == NULL) { +- ucs_debug("ignoring connection ack - ep not exists"); +- return; +- } ++ ep = ucp_worker_get_ep_by_ptr(worker, msg->dest_ep_ptr); + ++ ucs_assert(msg->type == UCP_WIREUP_MSG_ACK); + ucs_trace("ep %p: got wireup ack", ep); + +- ucs_assert(ep->flags & UCP_EP_FLAG_DEST_UUID_PEER); ++ ucs_assert(ep->flags & UCP_EP_FLAG_DEST_EP); + ucs_assert(ep->flags & UCP_EP_FLAG_CONNECT_REP_SENT); + ucs_assert(ep->flags & UCP_EP_FLAG_LOCAL_CONNECTED); + +- ep->flags |= UCP_EP_FLAG_REMOTE_CONNECTED; + ucp_wireup_remote_connected(ep); ++ ++ /* if this ack is received as part of the client-server flow, when handling ++ * a large worker address from the client, invoke the cached user callback ++ * from the main thread */ ++ if (ep->flags & UCP_EP_FLAG_LISTENER) { ++ ucp_listener_schedule_accept_cb(ep); ++ } + } + + static ucs_status_t ucp_wireup_msg_handler(void *arg, void *data, +@@ -346,34 +513,31 @@ static ucs_status_t ucp_wireup_msg_handler(void *arg, void *data, + { + ucp_worker_h worker = arg; + ucp_wireup_msg_t *msg = data; +- char peer_name[UCP_WORKER_NAME_MAX]; +- ucp_address_entry_t *address_list; +- unsigned address_count; ++ ucp_unpacked_address_t remote_address; + ucs_status_t status; +- uint64_t uuid; + + UCS_ASYNC_BLOCK(&worker->async); + +- status = ucp_address_unpack(msg + 1, &uuid, peer_name, UCP_WORKER_NAME_MAX, +- &address_count, &address_list); ++ status = ucp_address_unpack(msg + 1, &remote_address); + if (status != UCS_OK) { + ucs_error("failed to unpack address: %s", ucs_status_string(status)); + goto out; + } + + if (msg->type == UCP_WIREUP_MSG_ACK) { +- ucs_assert(address_count == 0); +- ucp_wireup_process_ack(worker, uuid); ++ ucs_assert(remote_address.address_count == 0); ++ ucp_wireup_process_ack(worker, msg); ++ } else if (msg->type == UCP_WIREUP_MSG_PRE_REQUEST) { ++ ucp_wireup_process_pre_request(worker, msg, &remote_address); + } else if (msg->type == UCP_WIREUP_MSG_REQUEST) { +- ucp_wireup_process_request(worker, msg, uuid, peer_name, address_count, +- address_list); ++ ucp_wireup_process_request(worker, msg, &remote_address); + } else if (msg->type == UCP_WIREUP_MSG_REPLY) { +- ucp_wireup_process_reply(worker, msg, uuid, address_count, address_list); ++ ucp_wireup_process_reply(worker, msg, &remote_address); + } else { + ucs_bug("invalid wireup message"); + } + +- ucs_free(address_list); ++ ucs_free(remote_address.address_list); + + out: + UCS_ASYNC_UNBLOCK(&worker->async); +@@ -590,7 +754,7 @@ ucs_status_t ucp_wireup_init_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + status = ucp_wireup_select_lanes(ep, params, ep_init_flags, address_count, + address_list, addr_indices, &key); + if (status != UCS_OK) { +- goto err; ++ return status; + } + + key.reachable_md_map |= ucp_ep_config(ep)->key.reachable_md_map; +@@ -600,7 +764,7 @@ ucs_status_t ucp_wireup_init_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + return UCS_OK; /* No change */ + } + +- if ((ep->cfg_index != 0) && !ucp_ep_is_stub(ep)) { ++ if ((ep->cfg_index != 0) && !ucp_ep_is_sockaddr_stub(ep)) { + /* + * TODO handle a case where we have to change lanes and reconfigure the ep: + * +@@ -631,13 +795,13 @@ ucs_status_t ucp_wireup_init_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + status = ucp_wireup_connect_lane(ep, params, lane, address_count, + address_list, addr_indices[lane]); + if (status != UCS_OK) { +- goto err; ++ return status; + } + } + + status = ucp_wireup_resolve_proxy_lanes(ep); + if (status != UCS_OK) { +- goto err; ++ return status; + } + + /* If we don't have a p2p transport, we're connected */ +@@ -645,24 +809,10 @@ ucs_status_t ucp_wireup_init_lanes(ucp_ep_h ep, const ucp_ep_params_t *params, + ep->flags |= UCP_EP_FLAG_LOCAL_CONNECTED; + } + +- /* Cache tag offload state in the flags for fast-path */ +- if (ucp_ep_is_tag_offload_enabled(ucp_ep_config(ep))) { +- ep->flags |= UCP_EP_FLAG_TAG_OFFLOAD_ENABLED; +- } +- + return UCS_OK; +- +-err: +- for (lane = 0; lane < ucp_ep_num_lanes(ep); ++lane) { +- if (ep->uct_eps[lane] != NULL) { +- uct_ep_destroy(ep->uct_eps[lane]); +- ep->uct_eps[lane] = NULL; +- } +- } +- return status; + } + +-ucs_status_t ucp_wireup_send_request(ucp_ep_h ep, uint64_t ep_uuid) ++ucs_status_t ucp_wireup_send_request(ucp_ep_h ep) + { + ucp_worker_h worker = ep->worker; + ucp_rsc_index_t rsc_tli[UCP_MAX_LANES]; +@@ -671,12 +821,6 @@ ucs_status_t ucp_wireup_send_request(ucp_ep_h ep, uint64_t ep_uuid) + ucp_lane_index_t lane; + ucs_status_t status; + +- if (ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED) { +- return UCS_OK; +- } +- +- ucs_assert_always(!ucp_ep_is_stub(ep)); +- + for (lane = 0; lane < UCP_MAX_LANES; ++lane) { + if (lane < ucp_ep_num_lanes(ep)) { + rsc_index = ucp_ep_get_rsc_index(ep, lane); +@@ -696,9 +840,112 @@ ucs_status_t ucp_wireup_send_request(ucp_ep_h ep, uint64_t ep_uuid) + } + + ucs_debug("ep %p: send wireup request (flags=0x%x)", ep, ep->flags); +- status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_REQUEST, ep_uuid, tl_bitmap, +- rsc_tli); ++ status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_REQUEST, tl_bitmap, rsc_tli); ++ + ep->flags |= UCP_EP_FLAG_CONNECT_REQ_QUEUED; ++ ++ return status; ++} ++ ++static void ucp_wireup_connect_remote_purge_cb(uct_pending_req_t *self, void *arg) ++{ ++ ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); ++ ucs_queue_head_t *queue = arg; ++ ++ ucs_trace_req("ep %p: extracted request %p from pending queue", req->send.ep, ++ req); ++ ucs_queue_push(queue, (ucs_queue_elem_t*)&req->send.uct.priv); ++} ++ ++ucs_status_t ucp_wireup_send_pre_request(ucp_ep_h ep) ++{ ++ ucp_rsc_index_t rsc_tli[UCP_MAX_LANES]; ++ uint64_t tl_bitmap = -1; /* pack full worker address */ ++ ucs_status_t status; ++ ++ ucs_assert(ep->flags & UCP_EP_FLAG_LISTENER); ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_CONNECT_PRE_REQ_QUEUED)); ++ memset(rsc_tli, UCP_NULL_RESOURCE, sizeof(rsc_tli)); ++ ++ ucs_debug("ep %p: send wireup pre-request (flags=0x%x)", ep, ep->flags); ++ status = ucp_wireup_msg_send(ep, UCP_WIREUP_MSG_PRE_REQUEST, tl_bitmap, rsc_tli); ++ ++ ep->flags |= UCP_EP_FLAG_CONNECT_PRE_REQ_QUEUED; ++ return status; ++} ++ ++ucs_status_t ucp_wireup_connect_remote(ucp_ep_h ep, ucp_lane_index_t lane) ++{ ++ ucs_queue_head_t tmp_q; ++ ucs_status_t status; ++ ucp_request_t *req; ++ uct_ep_h uct_ep; ++ ++ ucs_trace("ep %p: connect lane %d to remote peer", ep, lane); ++ ++ UCS_ASYNC_BLOCK(&ep->worker->async); ++ ++ /* checking again, with lock held, if already connected or connection is ++ * in progress */ ++ if ((ep->flags & UCP_EP_FLAG_DEST_EP) || ++ ucp_wireup_ep_test(ep->uct_eps[lane])) { ++ status = UCS_OK; ++ goto out_unlock; ++ } ++ ++ if (ucp_proxy_ep_test(ep->uct_eps[lane])) { ++ /* signaling ep is not needed now since we will send wireup request ++ * with signaling flag ++ */ ++ uct_ep = ucp_proxy_ep_extract(ep->uct_eps[lane]); ++ uct_ep_destroy(ep->uct_eps[lane]); ++ } else { ++ uct_ep = ep->uct_eps[lane]; ++ } ++ ++ ucs_assert(!(ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED)); ++ ++ ucs_trace("ep %p: connect lane %d to remote peer with wireup ep", ep, lane); ++ ++ /* make ep->uct_eps[lane] a stub */ ++ status = ucp_wireup_ep_create(ep, &ep->uct_eps[lane]); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ ++ /* Extract all pending requests from the transport endpoint, otherwise they ++ * will prevent the wireup message from being sent (because those requests ++ * could not be progressed any more after switching to wireup proxy). ++ */ ++ ucs_queue_head_init(&tmp_q); ++ uct_ep_pending_purge(uct_ep, ucp_wireup_connect_remote_purge_cb, &tmp_q); ++ ++ /* the wireup ep should use the existing [am_lane] as next_ep */ ++ ucp_wireup_ep_set_next_ep(ep->uct_eps[lane], uct_ep); ++ ++ if (!(ep->flags & UCP_EP_FLAG_CONNECT_REQ_QUEUED)) { ++ status = ucp_wireup_send_request(ep); ++ if (status != UCS_OK) { ++ goto err_destroy_wireup_ep; ++ } ++ } ++ ++ ucs_queue_for_each_extract(req, &tmp_q, send.uct.priv, 1) { ++ ucs_trace_req("ep %p: requeue request %p after wireup request", ++ req->send.ep, req); ++ status = uct_ep_pending_add(ep->uct_eps[lane], &req->send.uct, 0); ++ ucs_assert(status == UCS_OK); /* because it's a wireup proxy */ ++ } ++ ++ status = UCS_OK; ++ goto out_unlock; ++ ++err_destroy_wireup_ep: ++ uct_ep_destroy(ep->uct_eps[lane]); ++err: ++ ep->uct_eps[lane] = uct_ep; /* restore am lane */ ++out_unlock: ++ UCS_ASYNC_UNBLOCK(&ep->worker->async); + return status; + } + +@@ -708,27 +955,37 @@ static void ucp_wireup_msg_dump(ucp_worker_h worker, uct_am_trace_type_t type, + { + ucp_context_h context = worker->context; + const ucp_wireup_msg_t *msg = data; +- char peer_name[UCP_WORKER_NAME_MAX + 1]; +- ucp_address_entry_t *address_list, *ae; ++ ucp_unpacked_address_t unpacked_address; ++ const ucp_address_entry_t *ae; + ucp_tl_resource_desc_t *rsc; +- unsigned address_count; + ucp_lane_index_t lane; +- uint64_t uuid; ++ unsigned addr_index; ++ ucs_status_t status; + char *p, *end; + +- ucp_address_unpack(msg + 1, &uuid, peer_name, sizeof(peer_name), +- &address_count, &address_list); ++ status = ucp_address_unpack(msg + 1, &unpacked_address); ++ if (status != UCS_OK) { ++ strncpy(unpacked_address.name, "", UCP_WORKER_NAME_MAX); ++ unpacked_address.uuid = 0; ++ unpacked_address.address_count = 0; ++ unpacked_address.address_list = NULL; ++ } + + p = buffer; + end = buffer + max; +- snprintf(p, end - p, "WIREUP %s [%s uuid 0x%"PRIx64" ep_uuid 0x%"PRIx64"]", +- (msg->type == UCP_WIREUP_MSG_REQUEST ) ? "REQ" : +- (msg->type == UCP_WIREUP_MSG_REPLY ) ? "REP" : +- (msg->type == UCP_WIREUP_MSG_ACK ) ? "ACK" : "", +- peer_name, uuid, msg->ep_uuid); + ++ snprintf(p, end - p, ++ "WIREUP %s [%s uuid 0x%"PRIx64" src_ep 0x%lx dst_ep 0x%lx conn_sn %d]", ++ (msg->type == UCP_WIREUP_MSG_PRE_REQUEST ) ? "PRE_REQ" : ++ (msg->type == UCP_WIREUP_MSG_REQUEST ) ? "REQ" : ++ (msg->type == UCP_WIREUP_MSG_REPLY ) ? "REP" : ++ (msg->type == UCP_WIREUP_MSG_ACK ) ? "ACK" : "", ++ unpacked_address.name, unpacked_address.uuid, msg->src_ep_ptr, ++ msg->dest_ep_ptr, msg->conn_sn); + p += strlen(p); +- for (ae = address_list; ae < address_list + address_count; ++ae) { ++ ++ for (addr_index = 0; addr_index < unpacked_address.address_count; ++addr_index) { ++ ae = &unpacked_address.address_list[addr_index]; + for (rsc = context->tl_rscs; rsc < context->tl_rscs + context->num_tls; ++rsc) { + if (ae->tl_name_csum == rsc->tl_name_csum) { + snprintf(p, end - p, " "UCT_TL_RESOURCE_DESC_FMT, +@@ -741,14 +998,14 @@ static void ucp_wireup_msg_dump(ucp_worker_h worker, uct_am_trace_type_t type, + p += strlen(p); + + for (lane = 0; lane < UCP_MAX_LANES; ++lane) { +- if (msg->tli[lane] == (ae - address_list)) { ++ if (msg->tli[lane] == addr_index) { + snprintf(p, end - p, "/lane[%d]", lane); + p += strlen(p); + } + } + } + +- ucs_free(address_list); ++ ucs_free(unpacked_address.address_list); + } + + UCP_DEFINE_AM(-1, UCP_AM_ID_WIREUP, ucp_wireup_msg_handler, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.h +index ae58ef10b..21bc6b490 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup.h +@@ -18,6 +18,7 @@ + * Wireup message types + */ + enum { ++ UCP_WIREUP_MSG_PRE_REQUEST, + UCP_WIREUP_MSG_REQUEST, + UCP_WIREUP_MSG_REPLY, + UCP_WIREUP_MSG_ACK, +@@ -51,6 +52,8 @@ typedef struct { + const ucp_address_iface_attr_t *remote_iface_attr); + uint8_t tl_rsc_flags; /* Flags that describe TL specifics */ + ++ ucp_tl_iface_atomic_flags_t local_atomic_flags; ++ ucp_tl_iface_atomic_flags_t remote_atomic_flags; + } ucp_wireup_criteria_t; + + +@@ -60,7 +63,9 @@ typedef struct { + typedef struct ucp_wireup_msg { + uint8_t type; /* Message type */ + ucp_err_handling_mode_t err_mode; /* Peer error handling mode */ +- uint64_t ep_uuid; /* Peer endpoint dest_uuid */ ++ ucp_ep_conn_sn_t conn_sn; /* Connection sequence number */ ++ uintptr_t src_ep_ptr; /* Endpoint of source */ ++ uintptr_t dest_ep_ptr; /* Endpoint of destination (0 - invalid) */ + + /* REQUEST - which p2p lanes must be connected + * REPLY - which p2p lanes have been connected +@@ -71,7 +76,11 @@ typedef struct ucp_wireup_msg { + } UCS_S_PACKED ucp_wireup_msg_t; + + +-ucs_status_t ucp_wireup_send_request(ucp_ep_h ep, uint64_t ep_uuid); ++ucs_status_t ucp_wireup_send_request(ucp_ep_h ep); ++ ++ucs_status_t ucp_wireup_send_pre_request(ucp_ep_h ep); ++ ++ucs_status_t ucp_wireup_connect_remote(ucp_ep_h ep, ucp_lane_index_t lane); + + ucs_status_t ucp_wireup_select_aux_transport(ucp_ep_h ep, + const ucp_ep_params_t *params, +@@ -113,5 +122,4 @@ static inline int ucp_worker_is_tl_p2p(ucp_worker_h worker, ucp_rsc_index_t rsc_ + !(flags & UCT_IFACE_FLAG_CONNECT_TO_IFACE); + } + +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.c +index 9f2c3a075..3143edc43 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.c +@@ -56,7 +56,17 @@ static unsigned ucp_wireup_ep_progress(void *arg) + + /* If we still have pending wireup messages, send them out first */ + if (wireup_ep->pending_count != 0) { +- goto out; ++ goto out_unblock; ++ } ++ ++ /* If an error happened on the endpoint (but perhaps the deferred error handler, ++ * ucp_worker_iface_err_handle_progress(), was not called yet, avoid changing ++ * ep state, and let the error handler take care of cleanup. ++ */ ++ if (ucp_ep->flags & UCP_EP_FLAG_FAILED) { ++ ucs_trace("ep %p: not switching wireup_ep %p to ready state because of error", ++ ucp_ep, wireup_ep); ++ goto out_unblock; + } + + ucs_trace("ep %p: switching wireup_ep %p to ready state", ucp_ep, wireup_ep); +@@ -73,15 +83,19 @@ static unsigned ucp_wireup_ep_progress(void *arg) + ucp_proxy_ep_replace(&wireup_ep->super); + wireup_ep = NULL; + ++ UCS_ASYNC_UNBLOCK(&ucp_ep->worker->async); ++ + /* Replay pending requests */ + ucs_queue_for_each_extract(uct_req, &tmp_pending_queue, priv, 1) { + req = ucs_container_of(uct_req, ucp_request_t, send.uct); + ucs_assert(req->send.ep == ucp_ep); + ucp_request_send(req); +- --ucp_ep->worker->wireup_pend_count; ++ --ucp_ep->worker->flush_ops_count; + } + +-out: ++ return 0; ++ ++out_unblock: + UCS_ASYNC_UNBLOCK(&ucp_ep->worker->async); + return 0; + } +@@ -95,7 +109,7 @@ static uct_ep_h ucp_wireup_ep_get_msg_ep(ucp_wireup_ep_t *wireup_ep) + { + uct_ep_h wireup_msg_ep; + +- if (wireup_ep->flags & UCP_WIREUP_EP_FLAG_READY) { ++ if ((wireup_ep->flags & UCP_WIREUP_EP_FLAG_READY) || (wireup_ep->aux_ep == NULL)) { + wireup_msg_ep = wireup_ep->super.uct_ep; + } else { + wireup_msg_ep = wireup_ep->aux_ep; +@@ -119,7 +133,7 @@ static ucs_status_t ucp_wireup_ep_progress_pending(uct_pending_req_t *self) + status = req->func(req); + if (status == UCS_OK) { + ucs_atomic_add32(&wireup_ep->pending_count, -1); +- ucp_request_put(proxy_req); ++ ucs_free(proxy_req); + } + return status; + } +@@ -141,11 +155,12 @@ ucp_wireup_ep_pending_req_release(uct_pending_req_t *self, void *arg) + ucs_free(req); + } + +- ucp_request_put(proxy_req); ++ ucs_free(proxy_req); + } + + static ucs_status_t ucp_wireup_ep_pending_add(uct_ep_h uct_ep, +- uct_pending_req_t *req) ++ uct_pending_req_t *req, ++ unsigned flags) + { + ucp_wireup_ep_t *wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); + ucp_ep_h ucp_ep = wireup_ep->super.ucp_ep; +@@ -156,7 +171,7 @@ static ucs_status_t ucp_wireup_ep_pending_add(uct_ep_h uct_ep, + + UCS_ASYNC_BLOCK(&worker->async); + if (req->func == ucp_wireup_msg_progress) { +- proxy_req = ucs_mpool_get(&worker->req_mp); ++ proxy_req = ucs_malloc(sizeof(*proxy_req), "ucp_wireup_proxy_req"); + if (proxy_req == NULL) { + status = UCS_ERR_NO_MEMORY; + goto out; +@@ -169,15 +184,15 @@ static ucs_status_t ucp_wireup_ep_pending_add(uct_ep_h uct_ep, + proxy_req->send.proxy.wireup_ep = wireup_ep; + proxy_req->send.state.uct_comp.func = NULL; + +- status = uct_ep_pending_add(wireup_msg_ep, &proxy_req->send.uct); ++ status = uct_ep_pending_add(wireup_msg_ep, &proxy_req->send.uct, 0); + if (status == UCS_OK) { + ucs_atomic_add32(&wireup_ep->pending_count, +1); + } else { +- ucp_request_put(proxy_req); ++ ucs_free(proxy_req); + } + } else { + ucs_queue_push(&wireup_ep->pending_q, ucp_wireup_ep_req_priv(req)); +- ++ucp_ep->worker->wireup_pend_count; ++ ++ucp_ep->worker->flush_ops_count; + status = UCS_OK; + } + out: +@@ -189,19 +204,27 @@ static void + ucp_wireup_ep_pending_purge(uct_ep_h uct_ep, uct_pending_purge_callback_t cb, + void *arg) + { +- ucp_wireup_ep_t *wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); ++ ucp_wireup_ep_t *wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); ++ ucp_worker_h worker; + uct_pending_req_t *req; +- ucp_request_t *ucp_req; ++ ucp_request_t *ucp_req; ++ ++ worker = wireup_ep->super.ucp_ep->worker; + + ucs_queue_for_each_extract(req, &wireup_ep->pending_q, priv, 1) { + ucp_req = ucs_container_of(req, ucp_request_t, send.uct); ++ UCS_ASYNC_BLOCK(&worker->async); ++ --worker->flush_ops_count; ++ UCS_ASYNC_UNBLOCK(&worker->async); + cb(&ucp_req->send.uct, arg); + } + +- if (wireup_ep->aux_ep != NULL) { +- uct_ep_pending_purge(wireup_ep->aux_ep, ucp_wireup_ep_pending_req_release, +- arg); ++ if (wireup_ep->pending_count > 0) { ++ uct_ep_pending_purge(ucp_wireup_ep_get_msg_ep(wireup_ep), ++ ucp_wireup_ep_pending_req_release, arg); + } ++ ++ ucs_assert(wireup_ep->pending_count == 0); + } + + static ssize_t ucp_wireup_ep_am_bcopy(uct_ep_h uct_ep, uint8_t id, +@@ -222,7 +245,7 @@ static ssize_t ucp_wireup_ep_am_bcopy(uct_ep_h uct_ep, uint8_t id, + UCS_CLASS_DEFINE_NAMED_NEW_FUNC(ucp_wireup_ep_create, ucp_wireup_ep_t, uct_ep_t, + ucp_ep_h); + +-static ucs_status_t ++ucs_status_t + ucp_wireup_ep_connect_aux(ucp_wireup_ep_t *wireup_ep, + const ucp_ep_params_t *params, unsigned address_count, + const ucp_address_entry_t *address_list) +@@ -290,6 +313,7 @@ UCS_CLASS_INIT_FUNC(ucp_wireup_ep_t, ucp_ep_h ucp_ep) + .ep_put_short = (void*)ucs_empty_function_return_no_resource, + .ep_put_bcopy = (void*)ucp_wireup_ep_bcopy_send_func, + .ep_put_zcopy = (void*)ucs_empty_function_return_no_resource, ++ .ep_get_short = (void*)ucs_empty_function_return_no_resource, + .ep_get_bcopy = (void*)ucs_empty_function_return_no_resource, + .ep_get_zcopy = (void*)ucs_empty_function_return_no_resource, + .ep_am_short = (void*)ucs_empty_function_return_no_resource, +@@ -300,26 +324,29 @@ UCS_CLASS_INIT_FUNC(ucp_wireup_ep_t, ucp_ep_h ucp_ep) + .ep_tag_eager_zcopy = (void*)ucs_empty_function_return_no_resource, + .ep_tag_rndv_zcopy = (void*)ucs_empty_function_return_ptr_no_resource, + .ep_tag_rndv_request = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_add64 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_fadd64 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_swap64 = (void*)ucs_empty_function_return_no_resource, ++ .ep_atomic64_post = (void*)ucs_empty_function_return_no_resource, ++ .ep_atomic64_fetch = (void*)ucs_empty_function_return_no_resource, + .ep_atomic_cswap64 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_add32 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_fadd32 = (void*)ucs_empty_function_return_no_resource, +- .ep_atomic_swap32 = (void*)ucs_empty_function_return_no_resource, ++ .ep_atomic32_post = (void*)ucs_empty_function_return_no_resource, ++ .ep_atomic32_fetch = (void*)ucs_empty_function_return_no_resource, + .ep_atomic_cswap32 = (void*)ucs_empty_function_return_no_resource + }; + + UCS_CLASS_CALL_SUPER_INIT(ucp_proxy_ep_t, &ops, ucp_ep, NULL, 0); + +- self->aux_ep = NULL; +- self->sockaddr_ep = NULL; +- self->aux_rsc_index = UCP_NULL_RESOURCE; +- self->pending_count = 0; +- self->flags = 0; +- self->progress_id = UCS_CALLBACKQ_ID_NULL; ++ self->aux_ep = NULL; ++ self->sockaddr_ep = NULL; ++ self->aux_rsc_index = UCP_NULL_RESOURCE; ++ self->sockaddr_rsc_index = UCP_NULL_RESOURCE; ++ self->pending_count = 0; ++ self->flags = 0; ++ self->progress_id = UCS_CALLBACKQ_ID_NULL; + ucs_queue_head_init(&self->pending_q); + ++ UCS_ASYNC_BLOCK(&ucp_ep->worker->async); ++ ++ucp_ep->worker->flush_ops_count; ++ UCS_ASYNC_UNBLOCK(&ucp_ep->worker->async); ++ + ucs_trace("ep %p: created wireup ep %p to %s ", ucp_ep, self, + ucp_ep_peer_name(ucp_ep)); + return UCS_OK; +@@ -343,6 +370,10 @@ static UCS_CLASS_CLEANUP_FUNC(ucp_wireup_ep_t) + if (self->sockaddr_ep != NULL) { + uct_ep_destroy(self->sockaddr_ep); + } ++ ++ UCS_ASYNC_BLOCK(&worker->async); ++ --worker->flush_ops_count; ++ UCS_ASYNC_UNBLOCK(&worker->async); + } + + UCS_CLASS_DEFINE(ucp_wireup_ep_t, ucp_proxy_ep_t); +@@ -355,7 +386,10 @@ ucp_rsc_index_t ucp_wireup_ep_get_aux_rsc_index(uct_ep_h uct_ep) + return UCP_NULL_RESOURCE; + } + +- ucs_assert(wireup_ep->aux_ep != NULL); ++ if (wireup_ep->aux_ep == NULL) { ++ return UCP_NULL_RESOURCE; ++ } ++ + return wireup_ep->aux_rsc_index; + } + +@@ -401,17 +435,137 @@ err: + return status; + } + ++static ucs_status_t ucp_wireup_ep_pack_sockaddr_aux_tls(ucp_worker_h worker, ++ const char *dev_name, ++ uint64_t *tl_bitmap_p, ++ ucp_address_t **address_p, ++ size_t *address_length_p) ++{ ++ ucp_context_h context = worker->context; ++ int tl_id, found_supported_tl = 0; ++ ucs_status_t status; ++ uint64_t tl_bitmap = 0; ++ ++ /* Find a transport which matches the given dev_name and the user's configuration. ++ * It also has to be a UCT_IFACE_FLAG_CONNECT_TO_IFACE transport and support ++ * active messaging for sending a wireup message */ ++ ucs_for_each_bit(tl_id, context->config.sockaddr_aux_rscs_bitmap) { ++ if ((!strncmp(context->tl_rscs[tl_id].tl_rsc.dev_name, dev_name, ++ UCT_DEVICE_NAME_MAX)) && ++ (ucs_test_all_flags(worker->ifaces[tl_id].attr.cap.flags, ++ UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_AM_BCOPY))) { ++ found_supported_tl = 1; ++ tl_bitmap |= UCS_BIT(tl_id); ++ } ++ } ++ ++ if (found_supported_tl) { ++ status = ucp_address_pack(worker, NULL, tl_bitmap, NULL, ++ address_length_p, (void**)address_p); ++ } else { ++ ucs_error("no supported sockaddr auxiliary transports found for %s", dev_name); ++ status = UCS_ERR_UNREACHABLE; ++ } ++ ++ *tl_bitmap_p = tl_bitmap; ++ return status; ++} ++ ++ssize_t ucp_wireup_ep_sockaddr_fill_private_data(void *arg, const char *dev_name, ++ void *priv_data) ++{ ++ ucp_wireup_client_data_t *client_data = priv_data; ++ ucp_wireup_ep_t *wireup_ep = arg; ++ ucp_ep_h ucp_ep = wireup_ep->super.ucp_ep; ++ ucp_rsc_index_t sockaddr_rsc = wireup_ep->sockaddr_rsc_index; ++ ucp_worker_h worker = ucp_ep->worker; ++ ucp_context_h context = worker->context; ++ size_t address_length, conn_priv_len; ++ ucp_address_t *worker_address, *rsc_address; ++ ucp_worker_iface_t *wiface; ++ ucs_status_t status; ++ uint64_t tl_bitmap; ++ char aux_tls_str[64]; ++ ++ status = ucp_address_pack(worker, NULL, -1, NULL, &address_length, ++ (void**)&worker_address); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ ++ conn_priv_len = sizeof(*client_data) + address_length; ++ ++ /* pack client data */ ++ client_data->err_mode = ucp_ep_config(ucp_ep)->key.err_mode; ++ client_data->ep_ptr = (uintptr_t)ucp_ep; ++ ++ wiface = &worker->ifaces[sockaddr_rsc]; ++ ++ /* check private data length limitation */ ++ if (conn_priv_len > wiface->attr.max_conn_priv) { ++ ++ /* since the full worker address is too large to fit into the trasnport's ++ * private data, try to pack sockaddr aux tls to pass in the address */ ++ status = ucp_wireup_ep_pack_sockaddr_aux_tls(worker, dev_name, &tl_bitmap, ++ &rsc_address, &address_length); ++ if (status != UCS_OK) { ++ goto err_free_address; ++ } ++ ++ conn_priv_len = sizeof(*client_data) + address_length; ++ ++ /* check the private data length limitation again, now with partial ++ * resources packed (and not the entire worker address) */ ++ if (conn_priv_len > wiface->attr.max_conn_priv) { ++ ucs_error("sockaddr aux resources addresses (%s transports)" ++ " information (%zu) exceeds max_priv on " ++ UCT_TL_RESOURCE_DESC_FMT" (%zu)", ++ ucp_tl_bitmap_str(context, tl_bitmap, aux_tls_str, ++ sizeof(aux_tls_str)), ++ conn_priv_len, ++ UCT_TL_RESOURCE_DESC_ARG(&context->tl_rscs[sockaddr_rsc].tl_rsc), ++ wiface->attr.max_conn_priv); ++ status = UCS_ERR_UNREACHABLE; ++ ucs_free(rsc_address); ++ goto err_free_address; ++ } ++ ++ client_data->is_full_addr = 0; ++ memcpy(client_data + 1, rsc_address, address_length); ++ ucp_ep->flags |= UCP_EP_FLAG_SOCKADDR_PARTIAL_ADDR; ++ ++ ucs_free(rsc_address); ++ ++ ucs_trace("sockaddr tl ("UCT_TL_RESOURCE_DESC_FMT") sending partial address: " ++ "(%s transports) (len=%zu) to server. " ++ "total client priv data len: %zu", ++ context->tl_rscs[sockaddr_rsc].tl_rsc.tl_name, dev_name, ++ ucp_tl_bitmap_str(context, tl_bitmap, aux_tls_str, ++ sizeof(aux_tls_str)), ++ address_length, conn_priv_len); ++ ++ } else { ++ client_data->is_full_addr = 1; ++ memcpy(client_data + 1, worker_address, address_length); ++ } ++ ++ ucp_worker_release_address(worker, worker_address); ++ return conn_priv_len; ++ ++err_free_address: ++ ucp_worker_release_address(worker, worker_address); ++err: ++ return status; ++} ++ + ucs_status_t ucp_wireup_ep_connect_to_sockaddr(uct_ep_h uct_ep, + const ucp_ep_params_t *params) + { + ucp_wireup_ep_t *wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); + ucp_ep_h ucp_ep = wireup_ep->super.ucp_ep; + ucp_worker_h worker = ucp_ep->worker; +- ucp_context_h context = worker->context; + char saddr_str[UCS_SOCKADDR_STRING_LEN]; +- ucp_wireup_sockaddr_priv_t *conn_priv; +- size_t address_length, conn_priv_len; +- ucp_address_t *worker_address; + ucp_rsc_index_t sockaddr_rsc; + ucp_worker_iface_t *wiface; + ucs_status_t status; +@@ -419,56 +573,27 @@ ucs_status_t ucp_wireup_ep_connect_to_sockaddr(uct_ep_h uct_ep, + ucs_assert(ucp_wireup_ep_test(uct_ep)); + + status = ucp_wireup_select_sockaddr_transport(ucp_ep, params, &sockaddr_rsc); +- if (status != UCS_OK) { +- goto out; +- } +- +- status = ucp_worker_get_address(worker, &worker_address, &address_length); + if (status != UCS_OK) { + goto out; + } + +- conn_priv_len = sizeof(*conn_priv) + address_length; +- +- /* check private data limitation */ + wiface = &worker->ifaces[sockaddr_rsc]; +- if (conn_priv_len > wiface->attr.max_conn_priv) { +- ucs_error("sockaddr connection priv data (%zu) exceeds max_priv on " +- UCT_TL_RESOURCE_DESC_FMT" (%zu)", conn_priv_len, +- UCT_TL_RESOURCE_DESC_ARG(&context->tl_rscs[sockaddr_rsc].tl_rsc), +- wiface->attr.max_conn_priv); +- status = UCS_ERR_UNREACHABLE; +- goto out_free_address; +- } + +- conn_priv = ucs_malloc(conn_priv_len ,"ucp_sockaddr_conn_priv"); +- if (conn_priv == NULL) { +- ucs_error("failed to allocate buffer for sockaddr conn priv"); +- status = UCS_ERR_NO_MEMORY; +- goto out_free_address; +- } +- +- /* pack private data */ +- conn_priv->err_mode = UCP_PARAM_VALUE(EP, params, err_mode, ERR_HANDLING_MODE, +- UCP_ERR_HANDLING_MODE_NONE); +- conn_priv->ep_uuid = ucp_ep->dest_uuid; +- memcpy(conn_priv + 1, worker_address, address_length); ++ wireup_ep->sockaddr_rsc_index = sockaddr_rsc; + + /* send connection request using the transport */ +- status = uct_ep_create_sockaddr(wiface->iface, ¶ms->sockaddr, conn_priv, +- conn_priv_len, &wireup_ep->sockaddr_ep); ++ status = uct_ep_create_sockaddr(wiface->iface, ¶ms->sockaddr, ++ ucp_wireup_ep_sockaddr_fill_private_data, ++ wireup_ep, UCT_CB_FLAG_ASYNC, ++ &wireup_ep->sockaddr_ep); + if (status != UCS_OK) { +- goto out_free_priv; ++ goto out; + } + + ucs_debug("ep %p connecting to %s", ucp_ep, + ucs_sockaddr_str(params->sockaddr.addr, saddr_str, sizeof(saddr_str))); + status = UCS_OK; + +-out_free_priv: +- ucs_free(conn_priv); +-out_free_address: +- ucp_worker_release_address(worker, worker_address); + out: + return status; + } +@@ -526,8 +651,9 @@ int ucp_wireup_ep_is_owner(uct_ep_h uct_ep, uct_ep_h owned_ep) + } + + wireup_ep = ucs_derived_of(uct_ep, ucp_wireup_ep_t); +- return (wireup_ep->aux_ep == owned_ep) || (wireup_ep->sockaddr_ep == owned_ep); +- ++ return (wireup_ep->aux_ep == owned_ep) || ++ (wireup_ep->sockaddr_ep == owned_ep) || ++ (wireup_ep->super.uct_ep == owned_ep); + } + + void ucp_wireup_ep_disown(uct_ep_h uct_ep, uct_ep_h owned_ep) +@@ -539,5 +665,7 @@ void ucp_wireup_ep_disown(uct_ep_h uct_ep, uct_ep_h owned_ep) + wireup_ep->aux_ep = NULL; + } else if (wireup_ep->sockaddr_ep == owned_ep) { + wireup_ep->sockaddr_ep = NULL; ++ } else if (wireup_ep->super.uct_ep == owned_ep) { ++ ucp_proxy_ep_extract(uct_ep); + } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.h +index 2940505a3..e1a6a778e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucp/wireup/wireup_ep.h +@@ -35,16 +35,12 @@ struct ucp_wireup_ep { + uct_ep_h aux_ep; /**< Used to wireup the "real" endpoint */ + uct_ep_h sockaddr_ep; /**< Used for client-server wireup */ + ucp_rsc_index_t aux_rsc_index; /**< Index of auxiliary transport */ ++ ucp_rsc_index_t sockaddr_rsc_index; /**< Index of sockaddr transport */ + volatile uint32_t pending_count; /**< Number of pending wireup operations */ + volatile uint32_t flags; /**< Connection state flags */ + uct_worker_cb_id_t progress_id; /**< ID of progress function */ + }; + +-typedef struct ucp_wireup_client_data { +- ucp_err_handling_mode_t err_mode; +- uint64_t ep_uuid; +- /* packed worker address follows */ +-} UCS_S_PACKED ucp_wireup_sockaddr_priv_t; + + /** + * Create a proxy endpoint for wireup. +@@ -77,6 +73,11 @@ ucs_status_t ucp_wireup_ep_connect(uct_ep_h uct_ep, const ucp_ep_params_t *param + ucs_status_t ucp_wireup_ep_connect_to_sockaddr(uct_ep_h uct_ep, + const ucp_ep_params_t *params); + ++ucs_status_t ucp_wireup_ep_connect_aux(ucp_wireup_ep_t *wireup_ep, ++ const ucp_ep_params_t *params, ++ unsigned address_count, ++ const ucp_address_entry_t *address_list); ++ + void ucp_wireup_ep_set_next_ep(uct_ep_h uct_ep, uct_ep_h next_ep); + + uct_ep_h ucp_wireup_ep_extract_next_ep(uct_ep_h uct_ep); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/Makefile.am +index fc50d206b..0075285db 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/Makefile.am +@@ -25,19 +25,23 @@ nobase_dist_libucs_la_HEADERS = \ + config/global_opts.h \ + config/parser.h \ + config/types.h \ +- datastruct/arbiter.h \ + datastruct/callbackq.h \ + datastruct/list_types.h \ + datastruct/list.h \ + datastruct/mpool.h \ + datastruct/pgtable.h \ + datastruct/queue_types.h \ ++ datastruct/strided_alloc.h \ ++ profile/profile_defs.h \ ++ profile/profile_off.h \ ++ profile/profile_on.h \ + stats/stats_fwd.h \ + stats/libstats.h \ + sys/compiler_def.h\ + sys/math.h \ + sys/preprocessor.h \ + sys/rcache.h \ ++ sys/memtype_cache.h \ + sys/string.h \ + time/time_def.h \ + type/class.h \ +@@ -61,6 +65,7 @@ noinst_HEADERS = \ + arch/atomic.h \ + arch/bitops.h \ + arch/cpu.h \ ++ datastruct/arbiter.h \ + datastruct/frag_list.h \ + datastruct/mpmc.h \ + datastruct/mpool.inl \ +@@ -73,11 +78,12 @@ noinst_HEADERS = \ + debug/debug.h \ + debug/log.h \ + debug/memtrack.h \ +- debug/profile.h \ ++ profile/profile.h \ + stats/stats.h \ + sys/checker.h \ + sys/compiler.h \ + sys/numa.h \ ++ sys/rcache_int.h \ + sys/sys.h \ + time/time.h \ + time/timerq.h \ +@@ -91,6 +97,7 @@ noinst_HEADERS = \ + libucs_la_SOURCES = \ + algorithm/crc.c \ + algorithm/qsort_r.c \ ++ arch/aarch64/cpu.c \ + arch/ppc64/timebase.c \ + arch/x86_64/cpu.c \ + async/async.c \ +@@ -98,6 +105,7 @@ libucs_la_SOURCES = \ + async/pipe.c \ + async/thread.c \ + config/global_opts.c \ ++ config/ucm_opts.c \ + config/parser.c \ + datastruct/arbiter.c \ + datastruct/callbackq.c \ +@@ -106,16 +114,18 @@ libucs_la_SOURCES = \ + datastruct/mpool.c \ + datastruct/pgtable.c \ + datastruct/ptr_array.c \ ++ datastruct/strided_alloc.c \ + debug/assert.c \ + debug/debug.c \ + debug/log.c \ + debug/memtrack.c \ +- debug/profile.c \ ++ profile/profile.c \ + stats/stats.c \ + sys/init.c \ + sys/math.c \ + sys/numa.c \ + sys/rcache.c \ ++ sys/memtype_cache.c \ + sys/string.c \ + sys/sys.c \ + time/time.c \ +@@ -123,6 +133,7 @@ libucs_la_SOURCES = \ + time/timerq.c \ + type/class.c \ + type/component.c \ ++ type/spinlock.c \ + type/status.c + + if HAVE_STATS +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.c +new file mode 100644 +index 000000000..4d8c83088 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.c +@@ -0,0 +1,67 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#if defined(__aarch64__) ++ ++#include ++#include ++ ++ ++static void ucs_aarch64_cpuid_from_proc(ucs_aarch64_cpuid_t *cpuid) ++{ ++ char buf[256]; ++ int value; ++ FILE* f; ++ ++ cpuid->implementer = -1; ++ cpuid->architecture = -1; ++ cpuid->variant = -1; ++ cpuid->part = -1; ++ cpuid->revision = -1; ++ ++ f = fopen("/proc/cpuinfo","r"); ++ if (!f) { ++ return; ++ } ++ ++ while (fgets(buf, sizeof(buf), f)) { ++ if (sscanf(buf, "CPU implementer : 0x%x", &value) == 1) { ++ cpuid->implementer = value; ++ } else if (sscanf(buf, "CPU architecture : %d", &value) == 1) { ++ cpuid->architecture = value; ++ } else if (sscanf(buf, "CPU variant : 0x%x", &value) == 1) { ++ cpuid->variant = value; ++ } else if (sscanf(buf, "CPU part : 0x%x", &value) == 1) { ++ cpuid->part = value; ++ } else if (sscanf(buf, "CPU revision : %d", &value) == 1) { ++ cpuid->revision = value; ++ } ++ ++ if ((cpuid->implementer != -1) && (cpuid->architecture != -1) && ++ (cpuid->variant != -1) && (cpuid->part != -1) && (cpuid->revision != -1)) { ++ break; ++ } ++ } ++ ++ fclose(f); ++} ++ ++void ucs_aarch64_cpuid(ucs_aarch64_cpuid_t *cpuid) ++{ ++ static ucs_aarch64_cpuid_t cached_cpuid; ++ static int initialized = 0; ++ ++ if (!initialized) { ++ ucs_aarch64_cpuid_from_proc(&cached_cpuid); ++ ucs_memory_cpu_store_fence(); ++ initialized = 1; ++ } ++ ++ ucs_memory_cpu_load_fence(); ++ *cpuid = cached_cpuid; ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.h +index 431c02519..5f42b128d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/aarch64/cpu.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #if __ARM_NEON + #include + #endif +@@ -28,10 +29,30 @@ BEGIN_C_DECLS + #define ucs_memory_bus_fence() asm volatile ("dsb sy" ::: "memory"); + #define ucs_memory_bus_store_fence() asm volatile ("dsb st" ::: "memory"); + #define ucs_memory_bus_load_fence() asm volatile ("dsb ld" ::: "memory"); +- ++#define ucs_memory_bus_wc_flush() + #define ucs_memory_cpu_fence() asm volatile ("dmb ish" ::: "memory"); + #define ucs_memory_cpu_store_fence() asm volatile ("dmb ishst" ::: "memory"); + #define ucs_memory_cpu_load_fence() asm volatile ("dmb ishld" ::: "memory"); ++#define ucs_memory_cpu_wc_fence() asm volatile ("dmb st" ::: "memory"); ++ ++ ++/* ++ * ARM processor ID (ARM ISA - Main ID Register, EL1) ++ */ ++typedef struct ucs_aarch64_cpuid { ++ int implementer; ++ int architecture; ++ int variant; ++ int part; ++ int revision; ++} ucs_aarch64_cpuid_t; ++ ++ ++/** ++ * Get ARM CPU identifier and version ++ */ ++void ucs_aarch64_cpuid(ucs_aarch64_cpuid_t *cpuid); ++ + + #if HAVE_HW_TIMER + static inline uint64_t ucs_arch_read_hres_clock(void) +@@ -69,13 +90,74 @@ static inline int ucs_arch_get_cpu_flag() + static inline void ucs_arch_wait_mem(void *address) + { + unsigned long tmp; +- __asm__ __volatile__ ("ldxr %0, [%1] \n" +- "wfe \n" +- : "=&r"(tmp) +- : "r"(address)); ++ asm volatile ("ldxrb %w0, %1 \n" ++ "wfe \n" ++ : "=&r"(tmp) ++ : "Q"(address)); + } + +-END_C_DECLS ++#if !HAVE___CLEAR_CACHE ++static inline void ucs_arch_clear_cache(void *start, void *end) ++{ ++#if HAVE___AARCH64_SYNC_CACHE_RANGE ++ /* do not allow global declaration of compiler intrinsic */ ++ void __aarch64_sync_cache_range(void* beg, void* end); + ++ __aarch64_sync_cache_range(start, end); ++#else ++ uintptr_t ptr; ++ unsigned icache; ++ unsigned dcache; ++ unsigned ctr_el0; ++ ++ /* Get cache line size, using ctr_el0 register ++ * ++ * Bits Name Function ++ * ***************************** ++ * [31] - Reserved, res1. ++ * [30:28] - Reserved, res0. ++ * [27:24] CWG Cache Write-Back granule. Log2 of the number of words of the ++ * maximum size of memory that can be overwritten as a result of ++ * the eviction of a cache entry that has had a memory location ++ * in it modified: ++ * 0x4 ++ * Cache Write-Back granule size is 16 words. ++ * [23:20] ERG Exclusives Reservation Granule. Log2 of the number of words of ++ * the maximum size of the reservation granule that has been ++ * implemented for the Load-Exclusive and Store-Exclusive instructions: ++ * 0x4 ++ * Exclusive reservation granule size is 16 words. ++ * [19:16] DminLine Log2 of the number of words in the smallest cache line of all the ++ * data and unified caches that the processor controls: ++ * 0x4 ++ * Smallest data cache line size is 16 words. ++ * [15:14] L1lp L1 Instruction cache policy. Indicates the indexing and tagging ++ * policy for the L1 Instruction cache: ++ * 0b10 ++ * Virtually Indexed Physically Tagged (VIPT). ++ * [13:4] - Reserved, res0. ++ * [3:0] IminLine Log2 of the number of words in the smallest cache line of all ++ * the instruction caches that the processor controls. ++ * 0x4 ++ * Smallest instruction cache line size is 16 words. ++ */ ++ asm volatile ("mrs\t%0, ctr_el0":"=r" (ctr_el0)); ++ icache = sizeof(int) << (ctr_el0 & 0xf); ++ dcache = sizeof(int) << ((ctr_el0 >> 16) & 0xf); ++ ++ for (ptr = ucs_align_down((uintptr_t)start, dcache); ptr < (uintptr_t)end; ptr += dcache) { ++ asm volatile ("dc cvau, %0" :: "r" (ptr) : "memory"); ++ } ++ asm volatile ("dsb ish" ::: "memory"); ++ ++ for (ptr = ucs_align_down((uintptr_t)start, icache); ptr < (uintptr_t)end; ptr += icache) { ++ asm volatile ("ic ivau, %0" :: "r" (ptr) : "memory"); ++ } ++ asm volatile ("dsb ish; isb" ::: "memory"); ++#endif ++} + #endif + ++END_C_DECLS ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/atomic.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/atomic.h +index 7649971b4..0caea9b1f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/atomic.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/atomic.h +@@ -19,6 +19,42 @@ + # error "Unsupported architecture" + #endif + ++#define UCS_DEFINE_ATOMIC_AND(_wordsize, _suffix) \ ++ static inline void ucs_atomic_and##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ __sync_and_and_fetch(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_FAND(_wordsize, _suffix) \ ++ static inline uint##_wordsize##_t ucs_atomic_fand##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ return __sync_fetch_and_and(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_XOR(_wordsize, _suffix) \ ++ static inline void ucs_atomic_xor##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ __sync_xor_and_fetch(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_FXOR(_wordsize, _suffix) \ ++ static inline uint##_wordsize##_t ucs_atomic_fxor##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ return __sync_fetch_and_xor(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_OR(_wordsize, _suffix) \ ++ static inline void ucs_atomic_or##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ __sync_or_and_fetch(ptr, value); \ ++ } ++ ++#define UCS_DEFINE_ATOMIC_FOR(_wordsize, _suffix) \ ++ static inline uint##_wordsize##_t ucs_atomic_for##_wordsize(volatile uint##_wordsize##_t *ptr, \ ++ uint##_wordsize##_t value) { \ ++ return __sync_fetch_and_or(ptr, value); \ ++ } ++ + /* + * Define atomic functions + */ +@@ -32,6 +68,36 @@ UCS_DEFINE_ATOMIC_FADD(16, w); + UCS_DEFINE_ATOMIC_FADD(32, l); + UCS_DEFINE_ATOMIC_FADD(64, q); + ++UCS_DEFINE_ATOMIC_AND(8, b); ++UCS_DEFINE_ATOMIC_AND(16, w); ++UCS_DEFINE_ATOMIC_AND(32, l); ++UCS_DEFINE_ATOMIC_AND(64, q); ++ ++UCS_DEFINE_ATOMIC_FAND(8, b); ++UCS_DEFINE_ATOMIC_FAND(16, w); ++UCS_DEFINE_ATOMIC_FAND(32, l); ++UCS_DEFINE_ATOMIC_FAND(64, q); ++ ++UCS_DEFINE_ATOMIC_OR(8, b); ++UCS_DEFINE_ATOMIC_OR(16, w); ++UCS_DEFINE_ATOMIC_OR(32, l); ++UCS_DEFINE_ATOMIC_OR(64, q); ++ ++UCS_DEFINE_ATOMIC_FOR(8, b); ++UCS_DEFINE_ATOMIC_FOR(16, w); ++UCS_DEFINE_ATOMIC_FOR(32, l); ++UCS_DEFINE_ATOMIC_FOR(64, q); ++ ++UCS_DEFINE_ATOMIC_XOR(8, b); ++UCS_DEFINE_ATOMIC_XOR(16, w); ++UCS_DEFINE_ATOMIC_XOR(32, l); ++UCS_DEFINE_ATOMIC_XOR(64, q); ++ ++UCS_DEFINE_ATOMIC_FXOR(8, b); ++UCS_DEFINE_ATOMIC_FXOR(16, w); ++UCS_DEFINE_ATOMIC_FXOR(32, l); ++UCS_DEFINE_ATOMIC_FXOR(64, q); ++ + UCS_DEFINE_ATOMIC_SWAP(8, b); + UCS_DEFINE_ATOMIC_SWAP(16, w); + UCS_DEFINE_ATOMIC_SWAP(32, l); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/bitops.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/bitops.h +index f4dd3ab45..2049b7c71 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/bitops.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/bitops.h +@@ -18,87 +18,89 @@ + # error "Unsupported architecture" + #endif + +-#define ucs_ilog2(n) \ +-( \ +- __builtin_constant_p(n) ? ( \ +- (n) < 1 ? 0 : \ +- (n) & (1ULL << 63) ? 63 : \ +- (n) & (1ULL << 62) ? 62 : \ +- (n) & (1ULL << 61) ? 61 : \ +- (n) & (1ULL << 60) ? 60 : \ +- (n) & (1ULL << 59) ? 59 : \ +- (n) & (1ULL << 58) ? 58 : \ +- (n) & (1ULL << 57) ? 57 : \ +- (n) & (1ULL << 56) ? 56 : \ +- (n) & (1ULL << 55) ? 55 : \ +- (n) & (1ULL << 54) ? 54 : \ +- (n) & (1ULL << 53) ? 53 : \ +- (n) & (1ULL << 52) ? 52 : \ +- (n) & (1ULL << 51) ? 51 : \ +- (n) & (1ULL << 50) ? 50 : \ +- (n) & (1ULL << 49) ? 49 : \ +- (n) & (1ULL << 48) ? 48 : \ +- (n) & (1ULL << 47) ? 47 : \ +- (n) & (1ULL << 46) ? 46 : \ +- (n) & (1ULL << 45) ? 45 : \ +- (n) & (1ULL << 44) ? 44 : \ +- (n) & (1ULL << 43) ? 43 : \ +- (n) & (1ULL << 42) ? 42 : \ +- (n) & (1ULL << 41) ? 41 : \ +- (n) & (1ULL << 40) ? 40 : \ +- (n) & (1ULL << 39) ? 39 : \ +- (n) & (1ULL << 38) ? 38 : \ +- (n) & (1ULL << 37) ? 37 : \ +- (n) & (1ULL << 36) ? 36 : \ +- (n) & (1ULL << 35) ? 35 : \ +- (n) & (1ULL << 34) ? 34 : \ +- (n) & (1ULL << 33) ? 33 : \ +- (n) & (1ULL << 32) ? 32 : \ +- (n) & (1ULL << 31) ? 31 : \ +- (n) & (1ULL << 30) ? 30 : \ +- (n) & (1ULL << 29) ? 29 : \ +- (n) & (1ULL << 28) ? 28 : \ +- (n) & (1ULL << 27) ? 27 : \ +- (n) & (1ULL << 26) ? 26 : \ +- (n) & (1ULL << 25) ? 25 : \ +- (n) & (1ULL << 24) ? 24 : \ +- (n) & (1ULL << 23) ? 23 : \ +- (n) & (1ULL << 22) ? 22 : \ +- (n) & (1ULL << 21) ? 21 : \ +- (n) & (1ULL << 20) ? 20 : \ +- (n) & (1ULL << 19) ? 19 : \ +- (n) & (1ULL << 18) ? 18 : \ +- (n) & (1ULL << 17) ? 17 : \ +- (n) & (1ULL << 16) ? 16 : \ +- (n) & (1ULL << 15) ? 15 : \ +- (n) & (1ULL << 14) ? 14 : \ +- (n) & (1ULL << 13) ? 13 : \ +- (n) & (1ULL << 12) ? 12 : \ +- (n) & (1ULL << 11) ? 11 : \ +- (n) & (1ULL << 10) ? 10 : \ +- (n) & (1ULL << 9) ? 9 : \ +- (n) & (1ULL << 8) ? 8 : \ +- (n) & (1ULL << 7) ? 7 : \ +- (n) & (1ULL << 6) ? 6 : \ +- (n) & (1ULL << 5) ? 5 : \ +- (n) & (1ULL << 4) ? 4 : \ +- (n) & (1ULL << 3) ? 3 : \ +- (n) & (1ULL << 2) ? 2 : \ +- (n) & (1ULL << 1) ? 1 : \ +- (n) & (1ULL << 0) ? 0 : \ +- 0 \ +- ) : \ +- (sizeof(n) <= 4) ? \ +- __ucs_ilog2_u32((uint32_t)(n)) : \ +- __ucs_ilog2_u64((uint64_t)(n)) \ ++#define ucs_ilog2(_n) \ ++( \ ++ __builtin_constant_p(_n) ? ( \ ++ (_n) < 1 ? 0 : \ ++ (_n) & (1ULL << 63) ? 63 : \ ++ (_n) & (1ULL << 62) ? 62 : \ ++ (_n) & (1ULL << 61) ? 61 : \ ++ (_n) & (1ULL << 60) ? 60 : \ ++ (_n) & (1ULL << 59) ? 59 : \ ++ (_n) & (1ULL << 58) ? 58 : \ ++ (_n) & (1ULL << 57) ? 57 : \ ++ (_n) & (1ULL << 56) ? 56 : \ ++ (_n) & (1ULL << 55) ? 55 : \ ++ (_n) & (1ULL << 54) ? 54 : \ ++ (_n) & (1ULL << 53) ? 53 : \ ++ (_n) & (1ULL << 52) ? 52 : \ ++ (_n) & (1ULL << 51) ? 51 : \ ++ (_n) & (1ULL << 50) ? 50 : \ ++ (_n) & (1ULL << 49) ? 49 : \ ++ (_n) & (1ULL << 48) ? 48 : \ ++ (_n) & (1ULL << 47) ? 47 : \ ++ (_n) & (1ULL << 46) ? 46 : \ ++ (_n) & (1ULL << 45) ? 45 : \ ++ (_n) & (1ULL << 44) ? 44 : \ ++ (_n) & (1ULL << 43) ? 43 : \ ++ (_n) & (1ULL << 42) ? 42 : \ ++ (_n) & (1ULL << 41) ? 41 : \ ++ (_n) & (1ULL << 40) ? 40 : \ ++ (_n) & (1ULL << 39) ? 39 : \ ++ (_n) & (1ULL << 38) ? 38 : \ ++ (_n) & (1ULL << 37) ? 37 : \ ++ (_n) & (1ULL << 36) ? 36 : \ ++ (_n) & (1ULL << 35) ? 35 : \ ++ (_n) & (1ULL << 34) ? 34 : \ ++ (_n) & (1ULL << 33) ? 33 : \ ++ (_n) & (1ULL << 32) ? 32 : \ ++ (_n) & (1ULL << 31) ? 31 : \ ++ (_n) & (1ULL << 30) ? 30 : \ ++ (_n) & (1ULL << 29) ? 29 : \ ++ (_n) & (1ULL << 28) ? 28 : \ ++ (_n) & (1ULL << 27) ? 27 : \ ++ (_n) & (1ULL << 26) ? 26 : \ ++ (_n) & (1ULL << 25) ? 25 : \ ++ (_n) & (1ULL << 24) ? 24 : \ ++ (_n) & (1ULL << 23) ? 23 : \ ++ (_n) & (1ULL << 22) ? 22 : \ ++ (_n) & (1ULL << 21) ? 21 : \ ++ (_n) & (1ULL << 20) ? 20 : \ ++ (_n) & (1ULL << 19) ? 19 : \ ++ (_n) & (1ULL << 18) ? 18 : \ ++ (_n) & (1ULL << 17) ? 17 : \ ++ (_n) & (1ULL << 16) ? 16 : \ ++ (_n) & (1ULL << 15) ? 15 : \ ++ (_n) & (1ULL << 14) ? 14 : \ ++ (_n) & (1ULL << 13) ? 13 : \ ++ (_n) & (1ULL << 12) ? 12 : \ ++ (_n) & (1ULL << 11) ? 11 : \ ++ (_n) & (1ULL << 10) ? 10 : \ ++ (_n) & (1ULL << 9) ? 9 : \ ++ (_n) & (1ULL << 8) ? 8 : \ ++ (_n) & (1ULL << 7) ? 7 : \ ++ (_n) & (1ULL << 6) ? 6 : \ ++ (_n) & (1ULL << 5) ? 5 : \ ++ (_n) & (1ULL << 4) ? 4 : \ ++ (_n) & (1ULL << 3) ? 3 : \ ++ (_n) & (1ULL << 2) ? 2 : \ ++ (_n) & (1ULL << 1) ? 1 : \ ++ (_n) & (1ULL << 0) ? 0 : \ ++ 0 \ ++ ) : \ ++ (sizeof(_n) <= 4) ? \ ++ __ucs_ilog2_u32((uint32_t)(_n)) : \ ++ __ucs_ilog2_u64((uint64_t)(_n)) \ + ) + + /* Returns the number of 1-bits in x */ +-#define ucs_count_one_bits(x) __builtin_popcount(x) ++#define ucs_popcount(_n) \ ++ ((sizeof(_n) <= 4) ? __builtin_popcount((uint32_t)(_n)) : __builtin_popcountl(_n)) + + /* Returns the number of trailing 0-bits in x, starting at the least + * significant bit position. If x is 0, the result is undefined. + */ +-#define ucs_count_zero_bits(x) __builtin_ctz(x) ++#define ucs_count_trailing_zero_bits(_n) \ ++ ((sizeof(_n) <= 4) ? __builtin_ctz((uint32_t)(_n)) : __builtin_ctzl(_n)) + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/cpu.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/cpu.h +index 1c362bc92..58a83825e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/cpu.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/cpu.h +@@ -22,6 +22,9 @@ typedef enum ucs_cpu_model { + UCS_CPU_MODEL_INTEL_SANDYBRIDGE, + UCS_CPU_MODEL_INTEL_NEHALEM, + UCS_CPU_MODEL_INTEL_WESTMERE, ++ UCS_CPU_MODEL_INTEL_HASWELL, ++ UCS_CPU_MODEL_INTEL_BROADWELL, ++ UCS_CPU_MODEL_INTEL_SKYLAKE, + UCS_CPU_MODEL_ARM_AARCH64, + UCS_CPU_MODEL_LAST + } ucs_cpu_model_t; +@@ -66,4 +69,22 @@ typedef enum ucs_cpu_flag { + #define UCS_SYS_CACHE_LINE_SIZE UCS_ARCH_CACHE_LINE_SIZE + #endif + ++/** ++ * Clear processor data and instruction caches, intended for ++ * self-modifying code. ++ * ++ * @start start of region to clear cache, including address ++ * @end end of region to clear cache, excluding address ++ */ ++static inline void ucs_clear_cache(void *start, void *end) ++{ ++#if HAVE___CLEAR_CACHE ++ /* do not allow global declaration of compiler intrinsic */ ++ void __clear_cache(void* beg, void* end); ++ ++ __clear_cache(start, end); ++#else ++ ucs_arch_clear_cache(start, end); ++#endif ++} + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/ppc64/cpu.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/ppc64/cpu.h +index ae067c576..10cdc626c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/ppc64/cpu.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/ppc64/cpu.h +@@ -25,9 +25,14 @@ BEGIN_C_DECLS + #define ucs_memory_bus_fence() asm volatile ("sync"::: "memory") + #define ucs_memory_bus_store_fence() ucs_memory_bus_fence() + #define ucs_memory_bus_load_fence() ucs_memory_bus_fence() ++#define ucs_memory_bus_wc_flush() + #define ucs_memory_cpu_fence() ucs_memory_bus_fence() +-#define ucs_memory_cpu_store_fence() ucs_memory_bus_fence() +-#define ucs_memory_cpu_load_fence() ucs_memory_bus_fence() ++#define ucs_memory_cpu_store_fence() asm volatile ("lwsync \n" \ ++ ::: "memory") ++#define ucs_memory_cpu_load_fence() asm volatile ("lwsync \n" \ ++ "isync \n" \ ++ ::: "memory") ++#define ucs_memory_cpu_wc_fence() ucs_memory_bus_fence() + + + static inline uint64_t ucs_arch_read_hres_clock() +@@ -55,6 +60,13 @@ double ucs_arch_get_clocks_per_sec(); + + #define ucs_arch_wait_mem ucs_arch_generic_wait_mem + ++#if !HAVE___CLEAR_CACHE ++static inline void ucs_arch_clear_cache(void *start, void *end) ++{ ++ ucs_memory_cpu_fence(); ++} ++#endif ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.c +index 7abe2423b..cec9c5c00 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.c +@@ -1,5 +1,5 @@ + /** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2013. ALL RIGHTS RESERVED. ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -49,7 +49,9 @@ static void ucs_x86_check_invariant_tsc() + + return; + warn: +- ucs_warn("CPU does not support invariant TSC, time may be unstable"); ++ if (ucs_global_opts.warn_inv_tsc) { ++ ucs_warn("CPU does not support invariant TSC, time may be unstable"); ++ } + } + + static double ucs_x86_tsc_freq_from_cpu_model() +@@ -156,6 +158,20 @@ ucs_cpu_model_t ucs_arch_get_cpu_model() + case 0x2c: + case 0x2f: + return UCS_CPU_MODEL_INTEL_WESTMERE; ++ case 0x3c: ++ case 0x3f: ++ case 0x45: ++ case 0x46: ++ return UCS_CPU_MODEL_INTEL_HASWELL; ++ case 0x3d: ++ case 0x47: ++ case 0x4f: ++ case 0x56: ++ return UCS_CPU_MODEL_INTEL_BROADWELL; ++ case 0x5e: ++ case 0x4e: ++ case 0x55: ++ return UCS_CPU_MODEL_INTEL_SKYLAKE; + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.h +index 583b06ad8..7b9b8f19d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/arch/x86_64/cpu.h +@@ -31,9 +31,11 @@ BEGIN_C_DECLS + #define ucs_memory_bus_fence() asm volatile ("mfence"::: "memory") + #define ucs_memory_bus_store_fence() asm volatile ("sfence" ::: "memory") + #define ucs_memory_bus_load_fence() asm volatile ("lfence" ::: "memory") ++#define ucs_memory_bus_wc_flush() + #define ucs_memory_cpu_fence() ucs_compiler_fence() + #define ucs_memory_cpu_store_fence() ucs_compiler_fence() + #define ucs_memory_cpu_load_fence() ucs_compiler_fence() ++#define ucs_memory_cpu_wc_fence() asm volatile ("sfence" ::: "memory") + + + static inline uint64_t ucs_arch_read_hres_clock() +@@ -50,6 +52,17 @@ ucs_cpu_flag_t ucs_arch_get_cpu_flag() UCS_F_NOOPTIMIZE; + + #define ucs_arch_wait_mem ucs_arch_generic_wait_mem + ++#if !HAVE___CLEAR_CACHE ++static inline void ucs_arch_clear_cache(void *start, void *end) ++{ ++ char *ptr; ++ ++ for (ptr = (char*)start; ptr < (char*)end; ptr++) { ++ asm volatile("mfence; clflush %0; mfence" :: "m" (*ptr)); ++ } ++} ++#endif ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.c +index 5c756cdb1..bb5aa5d08 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.c +@@ -25,13 +25,13 @@ KHASH_MAP_INIT_INT(ucs_async_handler, ucs_async_handler_t *); + typedef struct ucs_async_global_context { + khash_t(ucs_async_handler) handlers; + pthread_rwlock_t handlers_lock; +- volatile uint32_t timer_id; ++ volatile uint32_t handler_id; + } ucs_async_global_context_t; + + + static ucs_async_global_context_t ucs_async_global_context = { + .handlers_lock = PTHREAD_RWLOCK_INITIALIZER, +- .timer_id = UCS_ASYNC_TIMER_ID_MIN ++ .handler_id = UCS_ASYNC_TIMER_ID_MIN + }; + + +@@ -65,6 +65,7 @@ static ucs_async_ops_t ucs_async_poll_ops = { + .block = ucs_empty_function, + .unblock = ucs_empty_function, + .context_init = ucs_async_poll_init, ++ .context_cleanup = ucs_empty_function, + .context_try_block = ucs_async_poll_tryblock, + .context_unblock = ucs_empty_function, + .add_event_fd = ucs_empty_function_return_success, +@@ -147,26 +148,43 @@ static void ucs_async_handler_put(ucs_async_handler_t *handler) + } + + /* add new handler to the table */ +-static ucs_status_t ucs_async_handler_add(ucs_async_handler_t *handler) ++static ucs_status_t ucs_async_handler_add(int min_id, int max_id, ++ ucs_async_handler_t *handler) + { + int hash_extra_status; + ucs_status_t status; + khiter_t hash_it; ++ int i, id; + + pthread_rwlock_wrlock(&ucs_async_global_context.handlers_lock); + ++ handler->id = -1; + ucs_assert_always(handler->refcount == 1); +- hash_it = kh_put(ucs_async_handler, &ucs_async_global_context.handlers, +- handler->id, &hash_extra_status); +- if (hash_extra_status == -1) { +- ucs_error("Failed to add async handler " UCS_ASYNC_HANDLER_FMT " to hash", +- UCS_ASYNC_HANDLER_ARG(handler)); +- status = UCS_ERR_NO_MEMORY; +- goto out_unlock; +- } else if (hash_extra_status == 0) { +- ucs_error("Async handler " UCS_ASYNC_HANDLER_FMT " exists - cannot add %s()", +- UCS_ASYNC_HANDLER_ARG(kh_value(&ucs_async_global_context.handlers, hash_it)), +- ucs_debug_get_symbol_name(handler->cb)); ++ ++ /* ++ * Search for an empty key in the range [min_id, max_id) ++ * ucs_async_global_context.handler_id is used to generate "unique" keys. ++ */ ++ for (i = min_id; i < max_id; ++i) { ++ id = min_id + (ucs_atomic_fadd32(&ucs_async_global_context.handler_id, 1) % ++ (max_id - min_id)); ++ hash_it = kh_put(ucs_async_handler, &ucs_async_global_context.handlers, ++ id, &hash_extra_status); ++ if (hash_extra_status == -1) { ++ ucs_error("Failed to add async handler " UCS_ASYNC_HANDLER_FMT ++ " to hash", UCS_ASYNC_HANDLER_ARG(handler)); ++ status = UCS_ERR_NO_MEMORY; ++ goto out_unlock; ++ } else if (hash_extra_status != 0) { ++ handler->id = id; ++ ucs_assert(id != -1); ++ break; ++ } ++ } ++ ++ if (handler->id == -1) { ++ ucs_error("Cannot add async handler %s() - id range [%d..%d) is full", ++ ucs_debug_get_symbol_name(handler->cb), min_id, max_id); + status = UCS_ERR_ALREADY_EXISTS; + goto out_unlock; + } +@@ -330,6 +348,8 @@ void ucs_async_context_cleanup(ucs_async_context_t *async) + ucs_warn("releasing async context with %d handlers", async->num_handlers); + pthread_rwlock_unlock(&ucs_async_global_context.handlers_lock); + } ++ ++ ucs_async_method_call(async->mode, context_cleanup, async); + ucs_mpmc_queue_cleanup(&async->missed); + } + +@@ -340,17 +360,18 @@ void ucs_async_context_destroy(ucs_async_context_t *async) + } + + static ucs_status_t +-ucs_async_alloc_handler(int id, ucs_async_mode_t mode, int events, +- ucs_async_event_cb_t cb, void *arg, +- ucs_async_context_t *async) ++ucs_async_alloc_handler(int min_id, int max_id, ucs_async_mode_t mode, ++ int events, ucs_async_event_cb_t cb, void *arg, ++ ucs_async_context_t *async, int *id_p) + { + ucs_async_handler_t *handler; + ucs_status_t status; + + /* If async context is given, it should have same mode */ + if ((async != NULL) && (async->mode != mode)) { +- ucs_error("Async mode mismatch for handler [id=%d], " +- "mode: %d async context mode: %d", id, mode, async->mode); ++ ucs_error("Async mode mismatch for handler %s(), " ++ "mode: %d async context mode: %d", ++ ucs_debug_get_symbol_name(cb), mode, async->mode); + status = UCS_ERR_INVALID_PARAM; + goto err; + } +@@ -369,7 +390,6 @@ ucs_async_alloc_handler(int id, ucs_async_mode_t mode, int events, + goto err_dec_num_handlers; + } + +- handler->id = id; + handler->mode = mode; + handler->events = events; + handler->cb = cb; +@@ -378,12 +398,14 @@ ucs_async_alloc_handler(int id, ucs_async_mode_t mode, int events, + handler->missed = 0; + handler->refcount = 1; + ucs_async_method_call(mode, block); +- status = ucs_async_handler_add(handler); ++ status = ucs_async_handler_add(min_id, max_id, handler); + ucs_async_method_call(mode, unblock); + if (status != UCS_OK) { + goto err_free; + } + ++ ucs_assert((handler->id >= min_id) && (handler->id < max_id)); ++ *id_p = handler->id; + return UCS_OK; + + err_free: +@@ -401,6 +423,7 @@ ucs_status_t ucs_async_set_event_handler(ucs_async_mode_t mode, int event_fd, + void *arg, ucs_async_context_t *async) + { + ucs_status_t status; ++ int event_id; + + if (event_fd >= UCS_ASYNC_TIMER_ID_MIN) { + /* File descriptor too large */ +@@ -408,10 +431,12 @@ ucs_status_t ucs_async_set_event_handler(ucs_async_mode_t mode, int event_fd, + goto err; + } + +- status = ucs_async_alloc_handler(event_fd, mode, events, cb, arg, async); ++ status = ucs_async_alloc_handler(event_fd, event_fd + 1, mode, events, cb, ++ arg, async, &event_id); + if (status != UCS_OK) { + goto err; + } ++ ucs_assert(event_id == event_fd); + + status = ucs_async_method_call(mode, add_event_fd, async, event_fd, events); + if (status != UCS_OK) { +@@ -435,15 +460,8 @@ ucs_status_t ucs_async_add_timer(ucs_async_mode_t mode, ucs_time_t interval, + ucs_status_t status; + int timer_id; + +- /* Search for unused timer ID */ +- do { +- timer_id = ucs_atomic_fadd32(&ucs_async_global_context.timer_id, 1); +- if (timer_id >= UCS_ASYNC_TIMER_ID_MAX) { +- timer_id = UCS_ASYNC_TIMER_ID_MIN; +- } +- +- status = ucs_async_alloc_handler(timer_id, mode, 1, cb, arg, async); +- } while (status == UCS_ERR_ALREADY_EXISTS); ++ status = ucs_async_alloc_handler(UCS_ASYNC_TIMER_ID_MIN, UCS_ASYNC_TIMER_ID_MAX, ++ mode, 1, cb, arg, async, &timer_id); + if (status != UCS_OK) { + goto err; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.h +index 3866dbe2e..406b1f3f3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async.h +@@ -121,6 +121,25 @@ static inline int ucs_async_check_miss(ucs_async_context_t *async) + } while (0) + + ++/** ++ * Check if asynchronous event delivery is blocked by the current thread. ++ * ++ * @param _async Event context to check status for. ++ */ ++#define UCS_ASYNC_IS_RECURSIVELY_BLOCKED(_async) \ ++ ({ \ ++ int _ret; \ ++ if ((_async)->mode == UCS_ASYNC_MODE_THREAD) { \ ++ _ret = UCS_ASYNC_THREAD_IS_RECURSIVELY_BLOCKED(_async); \ ++ } else if ((_async)->mode == UCS_ASYNC_MODE_SIGNAL) { \ ++ _ret = UCS_ASYNC_SIGNAL_IS_RECURSIVELY_BLOCKED(_async); \ ++ } else { \ ++ _ret = (_async)->poll_block; \ ++ } \ ++ _ret; \ ++ }) ++ ++ + END_C_DECLS + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async_int.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async_int.h +index e11f63eeb..88356421d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async_int.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/async_int.h +@@ -57,6 +57,7 @@ typedef struct ucs_async_ops { + void (*unblock)(); + + ucs_status_t (*context_init)(ucs_async_context_t *async); ++ void (*context_cleanup)(ucs_async_context_t *async); + int (*context_try_block)(ucs_async_context_t *async); + void (*context_unblock)(ucs_async_context_t *async); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.c +index c610be186..7784fd4fb 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.c +@@ -298,6 +298,14 @@ static ucs_status_t ucs_async_signal_init(ucs_async_context_t *async) + return UCS_OK; + } + ++static void ucs_async_signal_cleanup(ucs_async_context_t *async) ++{ ++ if (async->signal.block_count > 0) { ++ ucs_warn("destroying async signal context with block_count %d", ++ async->signal.block_count); ++ } ++} ++ + static ucs_status_t ucs_async_signal_modify_event_fd(ucs_async_context_t *async, + int event_fd, int events) + { +@@ -580,6 +588,7 @@ ucs_async_ops_t ucs_async_signal_ops = { + .block = ucs_async_signal_block_all, + .unblock = ucs_async_signal_unblock_all, + .context_init = ucs_async_signal_init, ++ .context_cleanup = ucs_async_signal_cleanup, + .context_try_block = ucs_async_signal_try_block, + .context_unblock = ucs_async_signal_unblock, + .add_event_fd = ucs_async_signal_add_event_fd, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.h +index 51ed37cf3..72e78f3fe 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/signal.h +@@ -29,10 +29,17 @@ typedef struct ucs_async_signal_context { + ucs_memory_cpu_fence(); \ + } + ++ + #define UCS_ASYNC_SIGNAL_UNBLOCK(_async) \ + { \ + ucs_memory_cpu_fence(); \ + --(_async)->signal.block_count; \ + } + ++ ++#define UCS_ASYNC_SIGNAL_IS_RECURSIVELY_BLOCKED(_async) \ ++ (((_async)->signal.block_count > 0) && \ ++ ((_async)->signal.tid == ucs_get_tid())) ++ ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.c +index 03f16f3ae..f44da04ac 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.c +@@ -257,7 +257,7 @@ static ucs_status_t ucs_async_thread_init(ucs_async_context_t *async) + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + ret = pthread_mutex_init(&async->thread.mutex, &attr); + if (ret != 0) { +- ucs_error("Failed to initialize lock: %s", strerror(ret)); ++ ucs_error("failed to initialize async lock: %s", strerror(ret)); + return UCS_ERR_INVALID_PARAM; + } + +@@ -267,6 +267,21 @@ static ucs_status_t ucs_async_thread_init(ucs_async_context_t *async) + return ucs_spinlock_init(&async->thread.spinlock); + } + ++static void ucs_async_thread_cleanup(ucs_async_context_t *async) ++{ ++#if !(NVALGRIND) ++ int ret; ++ ++ if (RUNNING_ON_VALGRIND) { ++ ret = pthread_mutex_destroy(&async->thread.mutex); ++ if (ret != 0) { ++ ucs_warn("failed to destroy async lock: %s", strerror(ret)); ++ } ++ } else ++#endif ++ ucs_spinlock_destroy(&async->thread.spinlock); ++} ++ + static ucs_status_t ucs_async_thread_add_event_fd(ucs_async_context_t *async, + int event_fd, int events) + { +@@ -407,6 +422,7 @@ ucs_async_ops_t ucs_async_thread_ops = { + .block = ucs_empty_function, + .unblock = ucs_empty_function, + .context_init = ucs_async_thread_init, ++ .context_cleanup = ucs_async_thread_cleanup, + .context_try_block = ucs_async_thread_try_block, + .context_unblock = ucs_async_thread_unblock, + .add_event_fd = ucs_async_thread_add_event_fd, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.h +index 5a2726f90..074f5a92a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/async/thread.h +@@ -29,6 +29,8 @@ typedef struct ucs_async_thread_context { + #define UCS_ASYNC_THREAD_UNBLOCK(_async) \ + ucs_spin_unlock(&(_async)->thread.spinlock) + ++#define UCS_ASYNC_THREAD_IS_RECURSIVELY_BLOCKED(...) 0 ++ + #else + + #define UCS_ASYNC_THREAD_BLOCK(_async) \ +@@ -45,6 +47,14 @@ typedef struct ucs_async_thread_context { + ucs_spin_unlock(&(_async)->thread.spinlock); \ + } + ++#ifdef ENABLE_ASSERT ++ ++#define UCS_ASYNC_THREAD_IS_RECURSIVELY_BLOCKED(_async) \ ++ ((RUNNING_ON_VALGRIND) ? 0 : \ ++ ucs_spin_is_owner(&(_async)->thread.spinlock, pthread_self())) ++ ++#endif /* ENABLE_ASSERT */ ++ + #endif /* NVALGRIND */ + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.c +index 0fb6cd7b8..b1f37e2d5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.c +@@ -7,7 +7,7 @@ + #include "global_opts.h" + + #include +-#include ++#include + #include + #include + #include +@@ -27,6 +27,8 @@ ucs_global_opts_t ucs_global_opts = { + .error_mail_footer = "", + .gdb_command = "gdb", + .debug_signo = SIGHUP, ++ .log_level_trigger = UCS_LOG_LEVEL_FATAL, ++ .warn_unused_env_vars = 1, + .async_max_events = 64, + .async_signo = SIGALRM, + .stats_dest = "", +@@ -37,6 +39,8 @@ ucs_global_opts_t ucs_global_opts = { + .profile_file = "", + .stats_filter = { NULL, 0 }, + .stats_format = UCS_STATS_FULL, ++ .rcache_check_pfn = 0, ++ .warn_inv_tsc = 1 + }; + + static const char *ucs_handle_error_modes[] = { +@@ -120,6 +124,11 @@ static ucs_config_field_t ucs_global_opts_table[] = { + "Log level to trigger error handling.", + ucs_offsetof(ucs_global_opts_t, log_level_trigger), UCS_CONFIG_TYPE_ENUM(ucs_log_level_names)}, + ++ {UCS_GLOBAL_OPTS_WARN_UNUSED_CONFIG, "yes", ++ "Issue warning about UCX_ environment variables which were not used by the\n" ++ "configuration parser.", ++ ucs_offsetof(ucs_global_opts_t, warn_unused_env_vars), UCS_CONFIG_TYPE_BOOL}, ++ + {"ASYNC_MAX_EVENTS", "1024", /* TODO remove this; resize mpmc */ + "Maximal number of events which can be handled from one context", + ucs_offsetof(ucs_global_opts_t, async_max_events), UCS_CONFIG_TYPE_UINT}, +@@ -176,7 +185,6 @@ static ucs_config_field_t ucs_global_opts_table[] = { + ucs_offsetof(ucs_global_opts_t, memtrack_dest), UCS_CONFIG_TYPE_STRING}, + #endif + +-#if HAVE_PROFILING + {"PROFILE_MODE", "", + "Profile collection modes. If none is specified, profiling is disabled.\n" + " - log - Record all timestamps.\n" +@@ -192,10 +200,21 @@ static ucs_config_field_t ucs_global_opts_table[] = { + {"PROFILE_LOG_SIZE", "4m", + "Maximal size of profiling log. New records will replace old records.", + ucs_offsetof(ucs_global_opts_t, profile_log_size), UCS_CONFIG_TYPE_MEMUNITS}, +-#endif ++ ++ {"RCACHE_CHECK_PFN", "n", ++ "Registration cache to check that the physical page frame number of a found\n" ++ "memory region was not changed since the time the region was registered.\n", ++ ucs_offsetof(ucs_global_opts_t, rcache_check_pfn), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"WARN_INVARIANT_TSC", "y", ++ "Issue a warning in case of invariant TSC.\n", ++ ucs_offsetof(ucs_global_opts_t, warn_inv_tsc), UCS_CONFIG_TYPE_BOOL}, + + {NULL} + }; ++UCS_CONFIG_REGISTER_TABLE(ucs_global_opts_table, "UCS global", NULL, ++ ucs_global_opts_t) ++ + + void ucs_global_opts_init() + { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.h +index b45129612..35a3f3849 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/global_opts.h +@@ -17,6 +17,7 @@ + + BEGIN_C_DECLS + ++#define UCS_GLOBAL_OPTS_WARN_UNUSED_CONFIG "WARN_UNUSED_ENV_VARS" + + /** + * UCS global options. +@@ -63,6 +64,9 @@ typedef struct { + /* Log level to trigger error handling */ + ucs_log_level_t log_level_trigger; + ++ /* Issue warning about UCX_ env vars which were not used by config parser */ ++ int warn_unused_env_vars; ++ + /* Max. events per context, will be removed in the future */ + unsigned async_max_events; + +@@ -94,7 +98,7 @@ typedef struct { + char *profile_file; + + /* Limit for profiling log size */ +- size_t profile_log_size; ++ size_t profile_log_size; + + /* Counters to be included in statistics summary */ + ucs_config_names_array_t stats_filter; +@@ -102,6 +106,11 @@ typedef struct { + /* statistics format options */ + ucs_stats_formats_t stats_format; + ++ /* registration cache checks if physical page is not moved */ ++ int rcache_check_pfn; ++ ++ /* Prompt/suppress invariant TSC warning (used in gtest) */ ++ int warn_inv_tsc; + } ucs_global_opts_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.c +index 8e5384931..4bf4205db 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.c +@@ -9,8 +9,11 @@ + #endif + #include "parser.h" + ++#include + #include + #include ++#include ++#include + #include + #include + #include +@@ -18,13 +21,36 @@ + #include + + ++/* configuration value which specifies "infinity" for a numeric variable */ ++#define UCS_CONFIG_PARSER_NUMERIC_INF_STR "inf" ++ ++/* width of titles in docstring */ ++#define UCP_CONFIG_PARSER_DOCSTR_WIDTH 10 ++ ++ ++/* list of prefixes for a configuration variable, used to dump all possible ++ * aliases. ++ */ ++typedef struct ucs_config_parser_prefix_list { ++ const char *prefix; ++ ucs_list_link_t list; ++} ucs_config_parser_prefix_t; ++ ++ + typedef UCS_CONFIG_ARRAY_FIELD(void, data) ucs_config_array_field_t; + ++KHASH_SET_INIT_STR(ucs_config_env_vars) ++ + + /* Process environment variables */ + extern char **environ; + + ++UCS_LIST_HEAD(ucs_config_global_list); ++static khash_t(ucs_config_env_vars) ucs_config_parser_env_vars = {0}; ++static pthread_mutex_t ucs_config_parser_env_vars_hash_lock = PTHREAD_MUTEX_INITIALIZER; ++ ++ + const char *ucs_async_mode_names[] = { + [UCS_ASYNC_MODE_SIGNAL] = "signal", + [UCS_ASYNC_MODE_THREAD] = "thread", +@@ -99,7 +125,12 @@ int ucs_config_sprintf_int(char *buf, size_t max, void *src, const void *arg) + + int ucs_config_sscanf_uint(const char *buf, void *dest, const void *arg) + { +- return sscanf(buf, "%u", (unsigned*)dest); ++ if (!strcasecmp(buf, UCS_CONFIG_PARSER_NUMERIC_INF_STR)) { ++ *(unsigned*)dest = UINT_MAX; ++ return 1; ++ } else { ++ return sscanf(buf, "%u", (unsigned*)dest); ++ } + } + + ucs_status_t ucs_config_clone_uint(void *src, void *dest, const void *arg) +@@ -110,7 +141,13 @@ ucs_status_t ucs_config_clone_uint(void *src, void *dest, const void *arg) + + int ucs_config_sprintf_uint(char *buf, size_t max, void *src, const void *arg) + { +- return snprintf(buf, max, "%u", *(unsigned*)src); ++ unsigned value = *(unsigned*)src; ++ if (value == UINT_MAX) { ++ snprintf(buf, max, UCS_CONFIG_PARSER_NUMERIC_INF_STR); ++ return 1; ++ } else { ++ return snprintf(buf, max, "%u", value); ++ } + } + + int ucs_config_sscanf_ulong(const char *buf, void *dest, const void *arg) +@@ -372,7 +409,7 @@ int ucs_config_sscanf_memunits(const char *buf, void *dest, const void *arg) + size_t bytes; + + /* Special value: infinity */ +- if (!strcasecmp(buf, "inf")) { ++ if (!strcasecmp(buf, UCS_CONFIG_PARSER_NUMERIC_INF_STR)) { + *(size_t*)dest = UCS_CONFIG_MEMUNITS_INF; + return 1; + } +@@ -414,7 +451,7 @@ int ucs_config_sprintf_memunits(char *buf, size_t max, void *src, const void *ar + size_t sz = *(size_t*)src; + + if (sz == UCS_CONFIG_MEMUNITS_INF) { +- snprintf(buf, max, "inf"); ++ snprintf(buf, max, UCS_CONFIG_PARSER_NUMERIC_INF_STR); + } else if (sz == UCS_CONFIG_MEMUNITS_AUTO) { + snprintf(buf, max, "auto"); + } else { +@@ -843,6 +880,34 @@ ucs_config_parser_set_value_internal(void *opts, ucs_config_field_t *fields, + return (count == 0) ? UCS_ERR_NO_ELEM : UCS_OK; + } + ++static void ucs_config_parser_mark_env_var_used(const char *name) ++{ ++ khiter_t iter; ++ char *key; ++ int ret; ++ ++ if (!ucs_global_opts.warn_unused_env_vars) { ++ return; ++ } ++ ++ pthread_mutex_lock(&ucs_config_parser_env_vars_hash_lock); ++ ++ iter = kh_get(ucs_config_env_vars, &ucs_config_parser_env_vars, name); ++ if (iter != kh_end(&ucs_config_parser_env_vars)) { ++ goto out; /* already exists */ ++ } ++ ++ key = ucs_strdup(name, "config_parser_env_var"); ++ if (key == NULL) { ++ ucs_error("strdup(%s) failed", name); ++ goto out; ++ } ++ ++ kh_put(ucs_config_env_vars, &ucs_config_parser_env_vars, key, &ret); ++out: ++ pthread_mutex_unlock(&ucs_config_parser_env_vars_hash_lock); ++} ++ + static ucs_status_t ucs_config_apply_env_vars(void *opts, ucs_config_field_t *fields, + const char *prefix, const char *table_prefix, + int recurse, int ignore_errors) +@@ -889,6 +954,7 @@ static ucs_status_t ucs_config_apply_env_vars(void *opts, ucs_config_field_t *fi + env_value = getenv(buf); + if (env_value != NULL) { + ucs_config_parser_release_field(field, var); ++ ucs_config_parser_mark_env_var_used(buf); + status = ucs_config_parser_parse_field(field, env_value, var); + if (status != UCS_OK) { + /* If set to ignore errors, restore the default value */ +@@ -1075,14 +1141,18 @@ static void __print_stream_cb(int num, const char *line, void *arg) + + static void + ucs_config_parser_print_field(FILE *stream, const void *opts, const char *env_prefix, +- const char *prefix, const char *name, +- const ucs_config_field_t *field, +- unsigned long flags, const char *docstr, ...) ++ ucs_list_link_t *prefix_list, const char *name, ++ const ucs_config_field_t *field, unsigned long flags, ++ const char *docstr, ...) + { +- char value_buf[128] = {0}; ++ ucs_config_parser_prefix_t *prefix, *head; ++ char value_buf[128] = {0}; + char syntax_buf[256] = {0}; + va_list ap; + ++ ucs_assert(!ucs_list_is_empty(prefix_list)); ++ head = ucs_list_head(prefix_list, ucs_config_parser_prefix_t, list); ++ + field->parser.write(value_buf, sizeof(value_buf) - 1, (char*)opts + field->offset, + field->parser.arg); + field->parser.help(syntax_buf, sizeof(syntax_buf) - 1, field->parser.arg); +@@ -1091,8 +1161,8 @@ ucs_config_parser_print_field(FILE *stream, const void *opts, const char *env_pr + fprintf(stream, "#\n"); + ucs_config_print_doc_line_by_line(field, __print_stream_cb, stream); + fprintf(stream, "#\n"); +- fprintf(stream, "# Syntax: %s\n", syntax_buf); +- fprintf(stream, "#\n"); ++ fprintf(stream, "# %-*s %s\n", UCP_CONFIG_PARSER_DOCSTR_WIDTH, "syntax:", ++ syntax_buf); + + /* Extra docstring */ + if (docstr != NULL) { +@@ -1102,9 +1172,27 @@ ucs_config_parser_print_field(FILE *stream, const void *opts, const char *env_pr + va_end(ap); + fprintf(stream, "\n"); + } +- } + +- fprintf(stream, "%s%s%s=%s\n", env_prefix, prefix, name, value_buf); ++ /* Parents in configuration hierarchy */ ++ if (prefix_list->next != prefix_list->prev) { ++ fprintf(stream, "# %-*s", UCP_CONFIG_PARSER_DOCSTR_WIDTH, "inherits:"); ++ ucs_list_for_each(prefix, prefix_list, list) { ++ if (prefix == head) { ++ continue; ++ } ++ ++ fprintf(stream, " %s%s%s", env_prefix, prefix->prefix, name); ++ if (prefix != ucs_list_tail(prefix_list, ucs_config_parser_prefix_t, list)) { ++ fprintf(stream, ","); ++ } ++ } ++ fprintf(stream, "\n"); ++ } ++ ++ fprintf(stream, "#\n"); ++ } ++ ++ fprintf(stream, "%s%s%s=%s\n", env_prefix, head->prefix, name, value_buf); + + if (flags & UCS_CONFIG_PRINT_DOC) { + fprintf(stream, "\n"); +@@ -1115,26 +1203,23 @@ static void + ucs_config_parser_print_opts_recurs(FILE *stream, const void *opts, + const ucs_config_field_t *fields, + unsigned flags, const char *env_prefix, +- const char *table_prefix) ++ ucs_list_link_t *prefix_list) + { + const ucs_config_field_t *field, *aliased_field; ++ ucs_config_parser_prefix_t inner_prefix; + size_t alias_table_offset; +- const char *prefix; +- +- prefix = table_prefix == NULL ? "" : table_prefix; + + for (field = fields; field->name; ++field) { + if (ucs_config_is_table_field(field)) { +- /* Parse with sub-table prefix */ +- if (table_prefix == NULL) { +- ucs_config_parser_print_opts_recurs(stream, opts + field->offset, +- field->parser.arg, flags, +- env_prefix, field->name); +- } else { +- ucs_config_parser_print_opts_recurs(stream, opts + field->offset, +- field->parser.arg, flags, +- env_prefix, table_prefix); +- } ++ /* Parse with sub-table prefix. ++ * We start the leaf prefix and continue up the hierarchy. ++ */ ++ inner_prefix.prefix = field->name; ++ ucs_list_add_tail(prefix_list, &inner_prefix.list); ++ ucs_config_parser_print_opts_recurs(stream, opts + field->offset, ++ field->parser.arg, flags, ++ env_prefix, prefix_list); ++ ucs_list_del(&inner_prefix.list); + } else if (ucs_config_is_alias_field(field)) { + if (flags & UCS_CONFIG_PRINT_HIDDEN) { + aliased_field = ucs_config_find_aliased_field(fields, field, +@@ -1144,14 +1229,15 @@ ucs_config_parser_print_opts_recurs(FILE *stream, const void *opts, + } + ucs_config_parser_print_field(stream, + opts + alias_table_offset, +- env_prefix, table_prefix, ++ env_prefix, prefix_list, + field->name, aliased_field, +- flags, "(alias of %s%s%s)", +- env_prefix, table_prefix, ++ flags, "%-*s %s%s%s", "alias of:", ++ UCP_CONFIG_PARSER_DOCSTR_WIDTH, ++ env_prefix, prefix_list, + aliased_field->name); + } + } else { +- ucs_config_parser_print_field(stream, opts, env_prefix, prefix, ++ ucs_config_parser_print_field(stream, opts, env_prefix, prefix_list, + field->name, field, flags, NULL); + } + } +@@ -1162,6 +1248,9 @@ void ucs_config_parser_print_opts(FILE *stream, const char *title, const void *o + ucs_config_field_t *fields, const char *table_prefix, + ucs_config_print_flags_t flags) + { ++ ucs_config_parser_prefix_t table_prefix_elem; ++ UCS_LIST_HEAD(prefix_list); ++ + if (flags & UCS_CONFIG_PRINT_HEADER) { + fprintf(stream, "\n"); + fprintf(stream, "#\n"); +@@ -1171,8 +1260,10 @@ void ucs_config_parser_print_opts(FILE *stream, const char *title, const void *o + } + + if (flags & UCS_CONFIG_PRINT_CONFIG) { ++ table_prefix_elem.prefix = table_prefix ? table_prefix : ""; ++ ucs_list_add_tail(&prefix_list, &table_prefix_elem.list); + ucs_config_parser_print_opts_recurs(stream, opts, fields, flags, +- UCS_CONFIG_PREFIX, table_prefix); ++ UCS_CONFIG_PREFIX, &prefix_list); + } + + if (flags & UCS_CONFIG_PRINT_HEADER) { +@@ -1180,6 +1271,107 @@ void ucs_config_parser_print_opts(FILE *stream, const char *title, const void *o + } + } + ++void ucs_config_parser_print_all_opts(FILE *stream, ucs_config_print_flags_t flags) ++{ ++ const ucs_config_global_list_entry_t *entry; ++ ucs_status_t status; ++ char title[64]; ++ void *opts; ++ ++ ucs_list_for_each(entry, &ucs_config_global_list, list) { ++ opts = ucs_malloc(entry->size, "tmp_opts"); ++ if (opts == NULL) { ++ ucs_error("could not allocate configuration of size %zu", entry->size); ++ continue; ++ } ++ ++ status = ucs_config_parser_fill_opts(opts, entry->fields, NULL, ++ entry->prefix, 0); ++ if (status != UCS_OK) { ++ ucs_free(opts); ++ continue; ++ } ++ ++ snprintf(title, sizeof(title), "%s configuration", entry->name); ++ ucs_config_parser_print_opts(stream, title, opts, entry->fields, ++ entry->prefix, flags); ++ ++ ucs_config_parser_release_opts(opts, entry->fields); ++ ucs_free(opts); ++ } ++} ++ ++void ucs_config_parser_warn_unused_env_vars() ++{ ++ static uint32_t warn_once = 1; ++ char unused_env_vars_names[40]; ++ int num_unused_vars; ++ char **envp, *envstr; ++ size_t prefix_len; ++ char *var_name; ++ char *p, *endp; ++ khiter_t iter; ++ char *saveptr; ++ int truncated; ++ int ret; ++ ++ if (!ucs_global_opts.warn_unused_env_vars) { ++ return; ++ } ++ ++ if (!ucs_atomic_cswap32(&warn_once, 1, 0)) { ++ return; ++ } ++ ++ pthread_mutex_lock(&ucs_config_parser_env_vars_hash_lock); ++ ++ prefix_len = strlen(UCS_CONFIG_PREFIX); ++ p = unused_env_vars_names; ++ endp = p + sizeof(unused_env_vars_names) - 1; ++ *endp = '\0'; ++ truncated = 0; ++ num_unused_vars = 0; ++ ++ for (envp = environ; !truncated && (*envp != NULL); ++envp) { ++ envstr = ucs_strdup(*envp, "env_str"); ++ if (envstr == NULL) { ++ continue; ++ } ++ ++ var_name = strtok_r(envstr, "=", &saveptr); ++ if (!var_name || strncmp(var_name, UCS_CONFIG_PREFIX, prefix_len)) { ++ ucs_free(envstr); ++ continue; /* Not UCX */ ++ } ++ ++ iter = kh_get(ucs_config_env_vars, &ucs_config_parser_env_vars, var_name); ++ if (iter == kh_end(&ucs_config_parser_env_vars)) { ++ ret = snprintf(p, endp - p, " %s,", var_name); ++ if (ret > endp - p) { ++ truncated = 1; ++ *p = '\0'; ++ } else { ++ p += strlen(p); ++ ++num_unused_vars; ++ } ++ } ++ ++ ucs_free(envstr); ++ } ++ ++ if (num_unused_vars > 0) { ++ if (!truncated) { ++ p[-1] = '\0'; /* remove trailing comma */ ++ } ++ ucs_warn("unused env variable%s:%s%s (set %s%s=n to suppress this warning)", ++ num_unused_vars > 1 ? "s" : "", unused_env_vars_names, ++ truncated ? "..." : "", UCS_CONFIG_PREFIX, ++ UCS_GLOBAL_OPTS_WARN_UNUSED_CONFIG); ++ } ++ ++ pthread_mutex_unlock(&ucs_config_parser_env_vars_hash_lock); ++} ++ + size_t ucs_config_memunits_get(size_t config_size, size_t auto_size, + size_t max_size) + { +@@ -1204,3 +1396,11 @@ int ucs_config_names_search(ucs_config_names_array_t config_names, + return -1; + } + ++UCS_STATIC_CLEANUP { ++ const char *key; ++ ++ kh_foreach_key(&ucs_config_parser_env_vars, key, { ++ ucs_free((void*)key); ++ }) ++ kh_destroy_inplace(ucs_config_env_vars, &ucs_config_parser_env_vars); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.h +index b85cf7c59..87c6142c9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/parser.h +@@ -9,6 +9,8 @@ + + #include "types.h" + ++#include ++#include + #include + #include + #include +@@ -34,27 +36,27 @@ BEGIN_C_DECLS + */ + + typedef struct ucs_config_parser { +- int (*read) (const char *buf, void *dest, const void *arg); +- int (*write)(char *buf, size_t max, void *src, const void *arg); +- ucs_status_t (*clone)(void *src, void *dest, const void *arg); +- void (*release)(void *ptr, const void *arg); +- void (*help)(char *buf, size_t max, const void *arg); +- const void *arg; ++ int (*read) (const char *buf, void *dest, const void *arg); ++ int (*write)(char *buf, size_t max, void *src, const void *arg); ++ ucs_status_t (*clone)(void *src, void *dest, const void *arg); ++ void (*release)(void *ptr, const void *arg); ++ void (*help)(char *buf, size_t max, const void *arg); ++ const void *arg; + } ucs_config_parser_t; + + + typedef struct ucs_config_array { +- size_t elem_size; +- ucs_config_parser_t parser; ++ size_t elem_size; ++ ucs_config_parser_t parser; + } ucs_config_array_t; + + + typedef struct ucs_config_field { +- const char *name; +- const char *dfl_value; +- const char *doc; +- size_t offset; +- ucs_config_parser_t parser; ++ const char *name; ++ const char *dfl_value; ++ const char *doc; ++ size_t offset; ++ ucs_config_parser_t parser; + } ucs_config_field_t; + + +@@ -65,11 +67,32 @@ typedef struct ucs_ib_port_spec { + + + typedef struct ucs_range_spec { +- unsigned first; /* the first value in the range */ +- unsigned last; /* the last value in the range */ ++ unsigned first; /* the first value in the range */ ++ unsigned last; /* the last value in the range */ + } ucs_range_spec_t; + + ++typedef struct ucs_config_global_list_entry { ++ ucs_list_link_t list; ++ const char *name; ++ const char *prefix; ++ ucs_config_field_t *fields; ++ size_t size; ++} ucs_config_global_list_entry_t; ++ ++ ++#define UCS_CONFIG_REGISTER_TABLE(_fields, _name, _prefix, _type) \ ++ UCS_STATIC_INIT { \ ++ extern ucs_list_link_t ucs_config_global_list; \ ++ static ucs_config_global_list_entry_t entry; \ ++ entry.fields = _fields; \ ++ entry.name = _name; \ ++ entry.prefix = _prefix; \ ++ entry.size = sizeof(_type); \ ++ ucs_list_add_tail(&ucs_config_global_list, &entry.list); \ ++ } ++ ++ + /* + * Parsing and printing different data types + */ +@@ -293,6 +316,14 @@ void ucs_config_parser_print_opts(FILE *stream, const char *title, const void *o + ucs_config_field_t *fields, const char *table_prefix, + ucs_config_print_flags_t flags); + ++/** ++ * Print all options defined in the library - names, values, documentation. ++ * ++ * @param stream Output stream to print to. ++ * @param flags Flags which control the output. ++ */ ++void ucs_config_parser_print_all_opts(FILE *stream, ucs_config_print_flags_t flags); ++ + /** + * Read a value from options structure. + * +@@ -316,6 +347,13 @@ ucs_status_t ucs_config_parser_get_value(void *opts, ucs_config_field_t *fields, + ucs_status_t ucs_config_parser_set_value(void *opts, ucs_config_field_t *fields, + const char *name, const char *value); + ++/** ++ * Check all UCX_ environment variables have been used so far by the ++ * configuration parser, issue a warning if not. Called just before program exit. ++ */ ++void ucs_config_parser_warn_unused_env_vars(); ++ ++ + /** + * Translate configuration value of "MEMUNITS" type to actual value. + * +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/types.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/types.h +index 0578740e4..f1e168e4f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/types.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/types.h +@@ -95,13 +95,16 @@ typedef enum { + unsigned pad; \ + } + ++ + /* Specific structure for an array of strings */ + #define UCS_CONFIG_STRING_ARRAY_FIELD(_array_name) \ + UCS_CONFIG_ARRAY_FIELD(char*, _array_name) + ++ + typedef UCS_CONFIG_STRING_ARRAY_FIELD(names) ucs_config_names_array_t; + + /** ++ * @ingroup UCS_RESOURCE + * BSD socket address specification. + */ + typedef struct ucs_sock_addr { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/ucm_opts.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/ucm_opts.c +new file mode 100644 +index 000000000..97d48ace8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/config/ucm_opts.c +@@ -0,0 +1,82 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "parser.h" ++ ++#include ++#include ++#include ++ ++ ++#define UCM_CONFIG_PREFIX "MEM_" ++ ++static const char *ucm_mmap_hook_modes[] = { ++ [UCM_MMAP_HOOK_NONE] = "none", ++ [UCM_MMAP_HOOK_RELOC] = UCM_MMAP_HOOK_RELOC_STR, ++#if UCM_BISTRO_HOOKS ++ [UCM_MMAP_HOOK_BISTRO] = UCM_MMAP_HOOK_BISTRO_STR, ++#endif ++ [UCM_MMAP_HOOK_LAST] = NULL ++}; ++ ++static ucs_config_field_t ucm_global_config_table[] = { ++ {"LOG_LEVEL", "warn", ++ "Logging level for memory events", ucs_offsetof(ucm_global_config_t, log_level), ++ UCS_CONFIG_TYPE_ENUM(ucm_log_level_names)}, ++ ++ {"ALLOC_ALIGN", "16", ++ "Minimal alignment of allocated blocks", ++ ucs_offsetof(ucm_global_config_t, alloc_alignment), UCS_CONFIG_TYPE_MEMUNITS}, ++ ++ {"EVENTS", "yes", ++ "Enable memory events", ++ ucs_offsetof(ucm_global_config_t, enable_events), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"MMAP_HOOK_MODE", UCM_DEFAULT_HOOK_MODE_STR, ++ "MMAP hook mode\n" ++ " none - don't set mmap hooks.\n" ++ " reloc - use ELF relocation table to set hooks.\n" ++#if UCM_BISTRO_HOOKS ++ " bistro - use binary instrumentation to set hooks.\n" ++#endif ++ ,ucs_offsetof(ucm_global_config_t, mmap_hook_mode), UCS_CONFIG_TYPE_ENUM(ucm_mmap_hook_modes)}, ++ ++ {"MALLOC_HOOKS", "yes", ++ "Enable using glibc malloc hooks", ++ ucs_offsetof(ucm_global_config_t, enable_malloc_hooks), ++ UCS_CONFIG_TYPE_BOOL}, ++ ++ {"MALLOC_RELOC", "yes", ++ "Enable installing malloc symbols in the relocation table.\n" ++ "This is unsafe and off by default, because sometimes glibc\n" ++ "calls malloc/free without going through the relocation table,\n" ++ "which would use the original implementation and not ours.", ++ ucs_offsetof(ucm_global_config_t, enable_malloc_reloc), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"CUDA_RELOC", "yes", ++ "Enable installing CUDA symbols in the relocation table", ++ ucs_offsetof(ucm_global_config_t, enable_cuda_reloc), ++ UCS_CONFIG_TYPE_BOOL}, ++ ++ {"DYNAMIC_MMAP_THRESH", "yes", ++ "Enable dynamic mmap threshold: for every released block, the\n" ++ "mmap threshold is adjusted upward to the size of the size of\n" ++ "the block, and trim threshold is adjust to twice the size of\n" ++ "the dynamic mmap threshold.\n" ++ "Note: dynamic mmap threshold is disabled when running on valgrind.", ++ ucs_offsetof(ucm_global_config_t, enable_dynamic_mmap_thresh), ++ UCS_CONFIG_TYPE_BOOL}, ++ ++ {NULL} ++}; ++ ++UCS_CONFIG_REGISTER_TABLE(ucm_global_config_table, "UCM", UCM_CONFIG_PREFIX, ++ ucm_global_config_t) ++ ++UCS_STATIC_INIT { ++ (void)ucs_config_parser_fill_opts(&ucm_global_opts, ucm_global_config_table, ++ NULL, UCM_CONFIG_PREFIX, 0); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.c +index 092af593c..88651a321 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.c +@@ -15,6 +15,7 @@ + void ucs_arbiter_init(ucs_arbiter_t *arbiter) + { + arbiter->current = NULL; ++ UCS_ARBITER_GUARD_INIT(arbiter); + } + + void ucs_arbiter_group_init(ucs_arbiter_group_t *group) +@@ -96,6 +97,8 @@ void ucs_arbiter_group_schedule_nonempty(ucs_arbiter_t *arbiter, + ucs_arbiter_elem_t *tail = group->tail; + ucs_arbiter_elem_t *current, *head; + ++ UCS_ARBITER_GUARD_CHECK(arbiter); ++ + ucs_assert(tail != NULL); + head = tail->next; + +@@ -164,7 +167,9 @@ void ucs_arbiter_dispatch_nonempty(ucs_arbiter_t *arbiter, unsigned per_group, + + ucs_assert(elem->group == group); + ucs_trace_poll("dispatching arbiter element %p", elem); ++ UCS_ARBITER_GUARD_ENTER(arbiter); + result = cb(arbiter, elem, cb_arg); ++ UCS_ARBITER_GUARD_EXIT(arbiter); + ucs_trace_poll("dispatch result %d", result); + ++group_dispatch_count; + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.h +index bdcc8d5c6..1c9a23bd3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/arbiter.h +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + /* + * A mechanism to arbitrate among groups of queued work elements, which attempts +@@ -92,6 +93,22 @@ typedef enum { + will start from the group that returned STOP */ + } ucs_arbiter_cb_result_t; + ++#if ENABLE_ASSERT ++#define UCS_ARBITER_GUARD int guard ++#define UCS_ARBITER_GUARD_INIT(_arbiter) (_arbiter)->guard = 0 ++#define UCS_ARBITER_GUARD_ENTER(_arbiter) (_arbiter)->guard++ ++#define UCS_ARBITER_GUARD_EXIT(_arbiter) (_arbiter)->guard-- ++#define UCS_ARBITER_GUARD_CHECK(_arbiter) \ ++ ucs_assertv((_arbiter)->guard == 0, \ ++ "scheduling group from the arbiter callback") ++#else ++#define UCS_ARBITER_GUARD ++#define UCS_ARBITER_GUARD_INIT(_arbiter) ++#define UCS_ARBITER_GUARD_ENTER(_arbiter) ++#define UCS_ARBITER_GUARD_EXIT(_arbiter) ++#define UCS_ARBITER_GUARD_CHECK(_arbiter) ++#endif ++ + + /** + * Arbiter callback function. +@@ -112,6 +129,7 @@ typedef ucs_arbiter_cb_result_t (*ucs_arbiter_callback_t)(ucs_arbiter_t *arbiter + */ + struct ucs_arbiter { + ucs_arbiter_elem_t *current; ++ UCS_ARBITER_GUARD; + }; + + +@@ -317,4 +335,13 @@ ucs_arbiter_elem_is_last(ucs_arbiter_group_t *group, ucs_arbiter_elem_t *elem) + return group->tail == elem; + } + ++/** ++ * @return true if element is the only one in the group ++ */ ++static inline int ++ucs_arbiter_elem_is_only(ucs_arbiter_group_t *group, ucs_arbiter_elem_t *elem) ++{ ++ return ucs_arbiter_elem_is_last(group, elem) && (elem->next == elem); ++} ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/callbackq.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/callbackq.h +index 1085dc46f..472e4d2cc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/callbackq.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/callbackq.h +@@ -59,6 +59,7 @@ typedef int (*ucs_callbackq_predicate_t)(const ucs_callbackq_elem_t *elem, + + + /** ++ * @ingroup UCS_RESOURCE + * Callback flags + */ + enum ucs_callbackq_flags { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/khash.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/khash.h +index dcc923770..a9d7dc6fc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/khash.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/khash.h +@@ -379,6 +379,12 @@ static const double __ac_HASH_UPPER = 0.77; + #define KHASH_INIT(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ + KHASH_INIT2(name, static kh_inline klib_unused, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) + ++#define KHASH_TYPE(name, khkey_t, khval_t) \ ++ __KHASH_TYPE(name, khkey_t, khval_t) ++ ++#define KHASH_IMPL(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ ++ __KHASH_IMPL(name, static kh_inline klib_unused, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) ++ + /* --- BEGIN OF HASH FUNCTIONS --- */ + + /*! @function +@@ -591,6 +597,19 @@ static kh_inline khint_t __ac_Wang_hash(khint_t key) + code; \ + } } + ++/*! @function ++ @abstract Iterate over the keys in the hash table ++ @param h Pointer to the hash table [khash_t(name)*] ++ @param kvar Variable to which key will be assigned ++ @param code Block of code to execute ++ */ ++#define kh_foreach_key(h, kvar, code) { khint_t __i; \ ++ for (__i = kh_begin(h); __i != kh_end(h); ++__i) { \ ++ if (!kh_exist(h,__i)) continue; \ ++ (kvar) = kh_key(h,__i); \ ++ code; \ ++ } } ++ + /*! @function + @abstract Iterate over the values in the hash table + @param h Pointer to the hash table [khash_t(name)*] +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/mpool.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/mpool.c +index fcb06168b..21b72b99f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/mpool.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/mpool.c +@@ -172,8 +172,8 @@ void ucs_mpool_grow(ucs_mpool_t *mp, unsigned num_elems) + (num_elems * ucs_mpool_elem_total_size(data)); + status = data->ops->chunk_alloc(mp, &chunk_size, &ptr); + if (status != UCS_OK) { +- ucs_error("Failed to allocate memory pool chunk: %s", +- ucs_status_string(status)); ++ ucs_error("Failed to allocate memory pool (name=%s) chunk: %s", ++ ucs_mpool_name(mp), ucs_status_string(status)); + return; + } + +@@ -182,8 +182,8 @@ void ucs_mpool_grow(ucs_mpool_t *mp, unsigned num_elems) + chunk_padding = ucs_padding((uintptr_t)(chunk + 1) + data->align_offset, + data->alignment); + chunk->elems = (void*)(chunk + 1) + chunk_padding; +- chunk->num_elems = (chunk_size - chunk_padding - sizeof(*chunk)) / +- ucs_mpool_elem_total_size(data); ++ chunk->num_elems = ucs_min(data->quota, (chunk_size - chunk_padding - sizeof(*chunk)) / ++ ucs_mpool_elem_total_size(data)); + + ucs_debug("mpool %s: allocated chunk %p of %lu bytes with %u elements", + ucs_mpool_name(mp), chunk, chunk_size, chunk->num_elems); +@@ -285,7 +285,7 @@ ucs_status_t ucs_mpool_hugetlb_malloc(ucs_mpool_t *mp, size_t *size_p, void **ch + /* First, try hugetlb */ + real_size = *size_p; + status = ucs_sysv_alloc(&real_size, real_size * 2, (void**)&ptr, SHM_HUGETLB, +- &shmid UCS_MEMTRACK_NAME(ucs_mpool_name(mp))); ++ ucs_mpool_name(mp), &shmid); + if (status == UCS_OK) { + chunk = ptr; + chunk->hugetlb = 1; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/pgtable.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/pgtable.c +index a71dbfdb2..1ee0d48c2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/pgtable.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/pgtable.c +@@ -287,7 +287,10 @@ ucs_pgtable_insert_page(ucs_pgtable_t *pgtable, ucs_pgt_addr_t address, + ++pgd->count; + break; + } else { +- ucs_assert(!ucs_pgt_entry_test(pte, UCS_PGT_ENTRY_FLAG_REGION)); ++ if (ucs_pgt_entry_test(pte, UCS_PGT_ENTRY_FLAG_REGION)) { ++ goto err; ++ } ++ + ucs_assertv(shift >= UCS_PGT_ENTRY_SHIFT + order, + "shift=%u order=%u", shift, order); /* sub PTE should be able to hold it */ + +@@ -549,6 +552,15 @@ void ucs_pgtable_search_range(const ucs_pgtable_t *pgtable, + ucs_pgt_region_t *last; + unsigned order = 0; + ++ /* if the page table is covering only part of the address space, intersect ++ * the range with page table address span */ ++ if (pgtable->shift < (sizeof(uint64_t) * 8)) { ++ address = ucs_max(address, pgtable->base); ++ end = ucs_min(end, pgtable->base + UCS_BIT(pgtable->shift)); ++ } else { ++ ucs_assert(pgtable->base == 0); ++ } ++ + last = NULL; + while ((address <= to) && (order != UCS_PGT_ADDR_ORDER)) { + order = ucs_pgtable_get_next_page_order(address, end); +@@ -575,6 +587,7 @@ void ucs_pgtable_purge(ucs_pgtable_t *pgtable, ucs_pgt_search_callback_t cb, + unsigned num_regions = pgtable->num_regions; + ucs_pgt_region_t **all_regions, **next_region, *region; + ucs_pgt_addr_t from, to; ++ ucs_status_t status; + unsigned i; + + all_regions = ucs_calloc(num_regions, sizeof(*all_regions), +@@ -595,7 +608,11 @@ void ucs_pgtable_purge(ucs_pgtable_t *pgtable, ucs_pgt_search_callback_t cb, + + for (i = 0; i < num_regions; ++i) { + region = all_regions[i]; +- ucs_pgtable_remove(pgtable, region); ++ status = ucs_pgtable_remove(pgtable, region); ++ if (status != UCS_OK) { ++ ucs_warn("failed to remove pgtable region" UCS_PGT_REGION_FMT, ++ UCS_PGT_REGION_ARG(region)); ++ } + cb(pgtable, region, arg); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/queue.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/queue.h +index 7a9402f36..5c1860d70 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/queue.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/queue.h +@@ -196,7 +196,7 @@ static inline void ucs_queue_splice(ucs_queue_head_t *queue, + #define ucs_queue_for_each(elem, queue, member) \ + for (*(queue)->ptail = NULL, \ + elem = ucs_container_of((queue)->head, typeof(*elem), member); \ +- &elem->member != NULL; \ ++ (elem) != ucs_container_of(NULL, typeof(*elem), member); \ + elem = ucs_container_of(elem->member.next, typeof(*elem), member)) + + /** +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.c +new file mode 100644 +index 000000000..b8cb08cba +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.c +@@ -0,0 +1,180 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#include "strided_alloc.h" ++#include "queue.h" ++ ++#include ++#include ++#include ++#include ++ ++ ++#define ucs_strided_alloc_chunk_to_mem(_chunk) \ ++ UCS_PTR_BYTE_OFFSET(_chunk, + sizeof(ucs_strided_alloc_chunk_t) \ ++ - UCS_STRIDED_ALLOC_STRIDE) ++ ++#define ucs_strided_alloc_mem_to_chunk(_mem) \ ++ UCS_PTR_BYTE_OFFSET(_mem, - sizeof(ucs_strided_alloc_chunk_t) \ ++ + UCS_STRIDED_ALLOC_STRIDE) ++ ++typedef struct ucs_splitalloc_chunk { ++ ucs_queue_elem_t queue; ++} ucs_strided_alloc_chunk_t; ++ ++struct ucs_strided_alloc_elem { ++ ucs_strided_alloc_elem_t *next; ++}; ++ ++static ucs_strided_alloc_chunk_t * ++ucs_strided_alloc_chunk_alloc(ucs_strided_alloc_t *sa, size_t chunk_size ++ UCS_MEMTRACK_ARG) ++{ ++ ucs_status_t status; ++ size_t size; ++ void *ptr; ++ ++ size = chunk_size; ++ ptr = NULL; ++ status = ucs_mmap_alloc(&size, &ptr, 0 UCS_MEMTRACK_VAL); ++ if (status != UCS_OK) { ++ ucs_error("failed to allocate a chunk of %zu bytes", chunk_size); ++ return NULL; ++ } ++ ++ return ucs_strided_alloc_mem_to_chunk(ptr); ++} ++ ++static void ucs_strided_alloc_chunk_free(ucs_strided_alloc_t *sa, ++ ucs_strided_alloc_chunk_t *chunk, ++ size_t chunk_size) ++{ ++ /* coverity[offset_free] */ ++ ucs_mmap_free(ucs_strided_alloc_chunk_to_mem(chunk), chunk_size); ++} ++ ++static void ucs_strided_alloc_push_to_freelist(ucs_strided_alloc_t *sa, ++ ucs_strided_alloc_elem_t *elem) ++{ ++ elem->next = sa->freelist; ++ sa->freelist = elem; ++} ++ ++static void ucs_strided_alloc_calc(ucs_strided_alloc_t *sa, size_t *chunk_size, ++ size_t *elems_per_chunk) ++{ ++ *chunk_size = ucs_align_up_pow2(UCS_STRIDED_ALLOC_STRIDE * sa->stride_count, ++ ucs_get_page_size()); ++ *elems_per_chunk = (UCS_STRIDED_ALLOC_STRIDE - ++ sizeof(ucs_strided_alloc_chunk_t)) / sa->elem_size; ++} ++ ++static void ucs_strided_alloc_grow(ucs_strided_alloc_t *sa UCS_MEMTRACK_ARG) ++{ ++ size_t chunk_size, elems_per_chunk; ++ ucs_strided_alloc_chunk_t *chunk; ++ ucs_strided_alloc_elem_t *elem; ++ void *chunk_mem; ++ ssize_t i; ++ ++ ucs_strided_alloc_calc(sa, &chunk_size, &elems_per_chunk); ++ ++ chunk = ucs_strided_alloc_chunk_alloc(sa, chunk_size UCS_MEMTRACK_VAL); ++ if (chunk == NULL) { ++ return; ++ } ++ ++ chunk_mem = ucs_strided_alloc_chunk_to_mem(chunk); ++ for (i = elems_per_chunk - 1; i >= 0; --i) { ++ elem = chunk_mem + (i * sa->elem_size); ++ ucs_strided_alloc_push_to_freelist(sa, elem); ++ } ++ ++ ucs_queue_push(&sa->chunks, &chunk->queue); ++ ++ VALGRIND_MAKE_MEM_NOACCESS(chunk_mem, chunk_size); ++} ++ ++void ucs_strided_alloc_init(ucs_strided_alloc_t *sa, size_t elem_size, ++ unsigned stride_count) ++{ ++ ucs_assert(elem_size >= sizeof(ucs_strided_alloc_elem_t)); ++ ucs_assert(elem_size <= (UCS_STRIDED_ALLOC_STRIDE - ++ sizeof(ucs_strided_alloc_chunk_t))); ++ ucs_assert(stride_count >= 1); ++ ++ ucs_queue_head_init(&sa->chunks); ++ ++ sa->freelist = NULL; ++ sa->elem_size = elem_size; ++ sa->stride_count = stride_count; ++ sa->inuse_count = 0; ++ VALGRIND_CREATE_MEMPOOL(sa, 0, 0); ++} ++ ++void ucs_strided_alloc_cleanup(ucs_strided_alloc_t *sa) ++{ ++ size_t chunk_size, elems_per_chunk; ++ ucs_strided_alloc_chunk_t *chunk; ++ ++ VALGRIND_DESTROY_MEMPOOL(sa); ++ ++ ucs_strided_alloc_calc(sa, &chunk_size, &elems_per_chunk); ++ ++ while (!ucs_queue_is_empty(&sa->chunks)) { ++ chunk = ucs_queue_head_elem_non_empty(&sa->chunks, ucs_strided_alloc_chunk_t, ++ queue); ++ VALGRIND_MAKE_MEM_DEFINED(chunk, sizeof(*chunk)); ++ ucs_queue_pull_non_empty(&sa->chunks); ++ ucs_strided_alloc_chunk_free(sa, chunk, chunk_size); ++ } ++} ++ ++void* ucs_strided_alloc_get(ucs_strided_alloc_t *sa, const char *alloc_name) ++{ ++ ucs_strided_alloc_elem_t *elem; ++ unsigned i; ++ ++ if (sa->freelist == NULL) { ++ ucs_strided_alloc_grow(sa UCS_MEMTRACK_VAL); ++ } ++ ++ ucs_assert(sa->freelist != NULL); ++ ++ elem = sa->freelist; ++ VALGRIND_MAKE_MEM_DEFINED(elem, sizeof(*elem)); ++ sa->freelist = elem->next; ++ VALGRIND_MAKE_MEM_NOACCESS(elem, sizeof(*elem)); ++ ++ for (i = 0; i < sa->stride_count; ++i) { ++ VALGRIND_MEMPOOL_ALLOC(sa, ucs_strided_elem_get(elem, 0, i), ++ sa->elem_size); ++ } ++ ++ ++sa->inuse_count; ++ ++ return elem; ++} ++ ++void ucs_strided_alloc_put(ucs_strided_alloc_t *sa, void *base) ++{ ++ ucs_strided_alloc_elem_t *elem = base; ++ unsigned i; ++ ++ ucs_assert(sa->inuse_count > 0); ++ ++ ucs_strided_alloc_push_to_freelist(sa, elem); ++ ++ for (i = 0; i < sa->stride_count; ++i) { ++ VALGRIND_MEMPOOL_FREE(sa, ucs_strided_elem_get(elem, 0, i)); ++ } ++ ++ --sa->inuse_count; ++} ++ ++unsigned ucs_strided_alloc_inuse_count(ucs_strided_alloc_t *sa) ++{ ++ return sa->inuse_count; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.h +new file mode 100644 +index 000000000..2598ba86a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/datastruct/strided_alloc.h +@@ -0,0 +1,134 @@ ++/* ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCS_STRIDED_ALLOC_H_ ++#define UCS_STRIDED_ALLOC_H_ ++ ++#include "queue_types.h" ++ ++#include ++#include ++#include ++#include ++ ++ ++BEGIN_C_DECLS ++ ++ ++/* the distance between allocated elements */ ++#define UCS_STRIDED_ALLOC_STRIDE (128 * UCS_KBYTE) ++ ++ ++/** ++ * Get a pointer to another element in the strided object ++ * ++ * Example with stride_count=3: ++ * ++ * chunk ++ * start -+ ++ * | ++ * | ++ * | <-- 128 kB --> . <-- 128 kB --> . ++ * | . . ++ * \/ . . ++ * +--------+-- ... --+--------+-- ... --+--------+ ++ * | stride | | stride | | stride | ++ * obj0: | elem 0 | | elem 1 | | elem 2 | ++ * | (base) | | | | | ++ * +--------+-- ... --+--------+-- ... --+--------+ ++ * +--------+-- ... --+--------+-- ... --+--------+ ++ * | stride | | stride | | stride | ++ * obj1: | elem 0 | | elem 1 | | elem 2 | ++ * | (base) | | | | | ++ * +--------+-- ... -+--------+-- ... --+--------+ ++ * +--------+-- ... --+--------+-- ... --+--------+ ++ * | stride | | stride | | stride | ++ * obj2: | elem 0 | | elem 1 | | elem 2 | ++ * | (base) | | | | | ++ * +--------+-- ... -+--------+-- ... --+--------+ ++ * ++ * ... ++ * ++ * @param _elem Pointer to the current element ++ * @param _stride_idx Stride index of the current element ++ * @param _wanted_idx Stride index of the desired element ++ * ++ * @return Pointer to the desired element ++ */ ++#define ucs_strided_elem_get(_elem, _stride_idx, _wanted_idx) \ ++ UCS_PTR_BYTE_OFFSET(_elem, UCS_STRIDED_ALLOC_STRIDE * \ ++ ((ptrdiff_t)(_wanted_idx) - (ptrdiff_t)(_stride_idx))) ++ ++ ++/* Forward declaration, used internally */ ++typedef struct ucs_strided_alloc_elem ucs_strided_alloc_elem_t; ++ ++ ++/** ++ * Strided allocator - allows allocating objects which are split to several ++ * memory areas with a constant stride (gap) in-between. ++ * This improves the cache locality when the first memory area is used mostly. ++ */ ++typedef struct ucs_strided_alloc { ++ ucs_strided_alloc_elem_t *freelist; /* LIFO of free elements */ ++ ucs_queue_head_t chunks; /* Queue of allocated chunks */ ++ size_t elem_size; /* Size of a single memory area */ ++ unsigned stride_count; /* Number of strides */ ++ unsigned inuse_count; /* Number of allocated elements */ ++} ucs_strided_alloc_t; ++ ++ ++/** ++ * Initialize the split allocator context ++ * ++ * @param [in] sa Strided allocator structure to initialize ++ * @param [in] elem_size Size of a single stride element ++ * @param [in] stride_count How many memory strides per object ++ */ ++void ucs_strided_alloc_init(ucs_strided_alloc_t *sa, size_t elem_size, ++ unsigned stride_count); ++ ++ ++/** ++ * Cleanup the split allocator context ++ * ++ * @param [in] sa Strided allocator structure to cleanup ++ */ ++void ucs_strided_alloc_cleanup(ucs_strided_alloc_t *sa); ++ ++ ++/** ++ * Allocate an object ++ * ++ * @param [in] sa Strided allocator to allocate on ++ * @param [in] alloc_name Debug name of the allocation ++ * ++ * @return Pointer to the first stride of the allocated object. ++ */ ++void* ucs_strided_alloc_get(ucs_strided_alloc_t *sa, const char *alloc_name); ++ ++ ++/** ++ * Release an object ++ * ++ * @param [in] sa Strided allocator to release the object to ++ * @param [in] base Pointer to the first stride of the object to release ++ */ ++void ucs_strided_alloc_put(ucs_strided_alloc_t *sa, void *base); ++ ++ ++/** ++ * Get the number of currently allocated objects ++ * ++ * @param [in] sa Strided allocator to get the information for ++* ++ * @return Number of currently allocated objects ++ */ ++unsigned ucs_strided_alloc_inuse_count(ucs_strided_alloc_t *sa); ++ ++ ++END_C_DECLS ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/assert.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/assert.c +index 43a1f335a..fbc0f8289 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/assert.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/assert.c +@@ -28,12 +28,9 @@ void ucs_fatal_error(const char *error_type, const char *file, unsigned line, + vsnprintf(buffer, buffer_size, format, ap); + va_end(ap); + +- ucs_debug_cleanup(); +- ucs_log_flush(); +- + short_file = strrchr(file, '/'); + short_file = (short_file == NULL) ? file : short_file + 1; +- ucs_handle_error(error_type, "%13s:%-4u %s", short_file, line, buffer); ++ ucs_handle_error(error_type, "%13s:%-4u UCX %s", short_file, line, buffer); + + abort(); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/debug.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/debug.c +index 421672d56..e45811306 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/debug.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/debug.c +@@ -10,11 +10,12 @@ + + #include "debug.h" + #include "log.h" +-#include "profile.h" + + #include ++#include + #include + #include ++#include + #include + #include + #include +@@ -891,6 +892,7 @@ static const char *ucs_signal_cause_segv(int si_code) + static const char *ucs_signal_cause_bus(int si_code) + { + switch (si_code) { ++ case BUS_ADRALN : return "invalid address alignment"; + case BUS_ADRERR : return "nonexistent physical address"; + case BUS_OBJERR : return "object-specific hardware error"; + default : return ucs_signal_cause_common(si_code); +@@ -975,6 +977,9 @@ void ucs_handle_error(const char *error_type, const char *message, ...) + char *buffer; + va_list ap; + ++ ucs_debug_cleanup(); ++ ucs_log_flush(); ++ + buffer = ucs_alloca(buffer_size + 1); + va_start(ap, message); + vsnprintf(buffer, buffer_size, message, ap); +@@ -1134,6 +1139,7 @@ static int ucs_debug_backtrace_is_excluded(void *address, const char *symbol) + !strcmp(symbol, "ucs_debug_show_innermost_source_file") || + !strcmp(symbol, "ucs_log_default_handler") || + !strcmp(symbol, "__ucs_abort") || ++ !strcmp(symbol, "ucs_log_dispatch") || + !strcmp(symbol, "__ucs_log") || + !strcmp(symbol, "ucs_debug_send_mail") || + (strstr(symbol, "_L_unlock_") == symbol) || +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.c +index d4a39f66c..2bb00ea0f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.c +@@ -32,7 +32,7 @@ const char *ucs_log_level_names[] = { + [UCS_LOG_LEVEL_PRINT] = "PRINT" + }; + +-static unsigned ucs_log_num_handlers = 0; ++static unsigned ucs_log_handlers_count = 0; + static ucs_log_func_t ucs_log_handlers[UCS_MAX_LOG_HANDLERS]; + static int ucs_log_initialized = 0; + static char ucs_log_hostname[256] = {0}; +@@ -100,7 +100,7 @@ ucs_log_default_handler(const char *file, unsigned line, const char *function, + return UCS_LOG_FUNC_RC_CONTINUE; + } + +- buf = ucs_alloca(buffer_size + 1); ++ buf = ucs_alloca(buffer_size + 1); + buf[buffer_size] = 0; + + vsnprintf(buf, buffer_size, format, ap); +@@ -141,18 +141,23 @@ ucs_log_default_handler(const char *file, unsigned line, const char *function, + + void ucs_log_push_handler(ucs_log_func_t handler) + { +- if (ucs_log_num_handlers < UCS_MAX_LOG_HANDLERS) { +- ucs_log_handlers[ucs_log_num_handlers++] = handler; ++ if (ucs_log_handlers_count < UCS_MAX_LOG_HANDLERS) { ++ ucs_log_handlers[ucs_log_handlers_count++] = handler; + } + } + + void ucs_log_pop_handler() + { +- if (ucs_log_num_handlers > 0) { +- --ucs_log_num_handlers; ++ if (ucs_log_handlers_count > 0) { ++ --ucs_log_handlers_count; + } + } + ++unsigned ucs_log_num_handlers() ++{ ++ return ucs_log_handlers_count; ++} ++ + void ucs_log_dispatch(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *format, ...) + { +@@ -162,7 +167,7 @@ void ucs_log_dispatch(const char *file, unsigned line, const char *function, + + /* Call handlers in reverse order */ + rc = UCS_LOG_FUNC_RC_CONTINUE; +- index = ucs_log_num_handlers; ++ index = ucs_log_handlers_count; + while ((index > 0) && (rc == UCS_LOG_FUNC_RC_CONTINUE)) { + --index; + va_start(ap, format); +@@ -331,7 +336,7 @@ void ucs_log_cleanup() + if (ucs_log_file_close) { + fclose(ucs_log_file); + } +- ucs_log_file = NULL; +- ucs_log_initialized = 0; +- ucs_log_num_handlers = 0; ++ ucs_log_file = NULL; ++ ucs_log_initialized = 0; ++ ucs_log_handlers_count = 0; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.h +index 4c6e724ff..ba5be3ac5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/log.h +@@ -148,6 +148,7 @@ const char *ucs_log_dump_hex(const void* data, size_t length, char *buf, + */ + void ucs_log_push_handler(ucs_log_func_t handler); + void ucs_log_pop_handler(); ++unsigned ucs_log_num_handlers(); + + END_C_DECLS + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.c +index c947a94dc..0fb469930 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.c +@@ -6,42 +6,34 @@ + + #include "memtrack.h" + +-#include +-#include +-#include +- ++#include + #include + #include +-#include +-#include +-#include +-#include +-#include +-#include +-#include + #include ++#include ++#include ++#include + + + #if ENABLE_MEMTRACK + +-#define UCS_MEMTRACK_MAGIC 0x1ee7beefa880feedULL +-#define UCS_MEMTRACK_FORMAT_STRING ("%22s: size: %9lu / %9lu\tcount: %9lu / %9lu\n") +-#define UCS_MEMTRACK_ENTRY_HASH_SIZE 127 ++#define UCS_MEMTRACK_FORMAT_STRING ("%22s: size: %9lu / %9lu\tcount: %9u / %9u\n") + + +-typedef struct ucs_memtrack_buffer { +- uint64_t magic; /* Make sure this buffer is "memtracked" */ +- size_t size; /* length of user-requested buffer */ +- off_t offset; /* Offset between result of memory allocation and the +- location of this buffer struct (mainly for ucs_memalign) */ +- ucs_memtrack_entry_t *entry; /* Entry which tracks this allocation */ +-} ucs_memtrack_buffer_t; ++typedef struct ucs_memtrack_ptr { ++ size_t size; /* Length of allocated buffer */ ++ ucs_memtrack_entry_t *entry; /* Entry which tracks this allocation */ ++} ucs_memtrack_ptr_t; + ++KHASH_MAP_INIT_INT64(ucs_memtrack_ptr_hash, ucs_memtrack_ptr_t) ++KHASH_MAP_INIT_STR(ucs_memtrack_entry_hash, ucs_memtrack_entry_t*); + + typedef struct ucs_memtrack_context { +- int enabled; +- pthread_mutex_t lock; +- ucs_memtrack_entry_t *entries[UCS_MEMTRACK_ENTRY_HASH_SIZE]; ++ int enabled; ++ pthread_mutex_t lock; ++ ucs_memtrack_entry_t total; ++ khash_t(ucs_memtrack_ptr_hash) ptrs; ++ khash_t(ucs_memtrack_entry_hash) entries; + UCS_STATS_NODE_DECLARE(stats); + } ucs_memtrack_context_t; + +@@ -49,14 +41,10 @@ typedef struct ucs_memtrack_context { + /* Global context for tracking allocated memory */ + static ucs_memtrack_context_t ucs_memtrack_context = { + .enabled = 0, +- .lock = PTHREAD_MUTEX_INITIALIZER ++ .lock = PTHREAD_MUTEX_INITIALIZER, ++ .total = {0} + }; + +-SGLIB_DEFINE_LIST_PROTOTYPES(ucs_memtrack_entry_t, ucs_memtrack_entry_compare, next) +-SGLIB_DEFINE_HASHED_CONTAINER_PROTOTYPES(ucs_memtrack_entry_t, +- UCS_MEMTRACK_ENTRY_HASH_SIZE, +- ucs_memtrack_entry_hash) +- + #if ENABLE_STATS + static ucs_stats_class_t ucs_memtrack_stats_class = { + .name = "memtrack", +@@ -68,299 +56,177 @@ static ucs_stats_class_t ucs_memtrack_stats_class = { + }; + #endif + ++static void ucs_memtrack_entry_reset(ucs_memtrack_entry_t *entry) ++{ ++ entry->size = 0; ++ entry->peak_size = 0; ++ entry->count = 0; ++ entry->peak_count = 0; ++} + +-static inline ucs_memtrack_entry_t* ucs_memtrack_entry_new(const char* name) ++static ucs_memtrack_entry_t* ucs_memtrack_entry_get(const char* name) + { + ucs_memtrack_entry_t *entry; ++ khiter_t iter; ++ int ret; + +- entry = malloc(sizeof(*entry)); ++ iter = kh_get(ucs_memtrack_entry_hash, &ucs_memtrack_context.entries, name); ++ if (iter != kh_end(&ucs_memtrack_context.entries)) { ++ return kh_val(&ucs_memtrack_context.entries, iter); ++ } ++ ++ entry = malloc(sizeof(*entry) + strlen(name) + 1); + if (entry == NULL) { + return NULL; + } + +- entry->size = 0; +- entry->peak_size = 0; +- entry->count = 0; +- entry->peak_count = 0; +- ucs_snprintf_zero(entry->name, UCS_MEMTRACK_NAME_MAX, "%s", name); +- sglib_hashed_ucs_memtrack_entry_t_add(ucs_memtrack_context.entries, entry); ++ ucs_memtrack_entry_reset(entry); ++ strcpy(entry->name, name); ++ ++ iter = kh_put(ucs_memtrack_entry_hash, &ucs_memtrack_context.entries, ++ entry->name, &ret); ++ ucs_assertv(ret == 1 || ret == 2, "ret=%d", ret); ++ kh_val(&ucs_memtrack_context.entries, iter) = entry; ++ + return entry; + } + +-static void ucs_memtrack_record_alloc(ucs_memtrack_buffer_t* buffer, size_t size, +- off_t offset, const char *name) ++static void ucs_memtrack_entry_update(ucs_memtrack_entry_t *entry, ssize_t size) + { +- ucs_memtrack_entry_t *entry, search; +- if (!ucs_memtrack_is_enabled()) { +- goto out; +- } ++ int count = (size < 0) ? -1 : 1; ++ ++ ucs_assert((int)entry->count >= -count); ++ ucs_assert((ssize_t)entry->size >= -size); ++ entry->count += count; ++ entry->size += size; ++ entry->peak_count = ucs_max(entry->peak_count, entry->count); ++ entry->peak_size = ucs_max(entry->peak_size, entry->size); ++} + +- if (strlen(name) >= UCS_MEMTRACK_NAME_MAX - 1) { +- ucs_fatal("memory allocation name too long: '%s' (len: %ld, max: %d)", +- name, strlen(name), UCS_MEMTRACK_NAME_MAX - 1); ++void ucs_memtrack_allocated(void *ptr, size_t size, const char *name) ++{ ++ ucs_memtrack_entry_t *entry; ++ khiter_t iter; ++ int ret; ++ ++ if ((ptr == NULL) || !ucs_memtrack_is_enabled()) { ++ return; + } + +- ucs_assert(buffer != NULL); +- ucs_assert(ucs_memtrack_context.entries != NULL); // context initialized + pthread_mutex_lock(&ucs_memtrack_context.lock); + +- ucs_snprintf_zero(search.name, UCS_MEMTRACK_NAME_MAX, "%s", name); +- entry = sglib_hashed_ucs_memtrack_entry_t_find_member(ucs_memtrack_context.entries, +- &search); ++ entry = ucs_memtrack_entry_get(name); + if (entry == NULL) { +- entry = ucs_memtrack_entry_new(name); +- if (entry == NULL) { +- goto out_unlock; +- } ++ goto out_unlock; + } + +- ucs_assert(!strcmp(name, entry->name)); +- buffer->magic = UCS_MEMTRACK_MAGIC; +- buffer->size = size; +- buffer->offset = offset; +- buffer->entry = entry; +- VALGRIND_MAKE_MEM_NOACCESS(buffer, sizeof(*buffer)); ++ /* Add pointer to hash */ ++ iter = kh_put(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs, ++ (uintptr_t)ptr, &ret); ++ ucs_assertv(ret == 1 || ret == 2, "ret=%d", ret); ++ kh_value(&ucs_memtrack_context.ptrs, iter).entry = entry; ++ kh_value(&ucs_memtrack_context.ptrs, iter).size = size; + +- /* Update total count */ +- entry->count++; +- UCS_STATS_UPDATE_COUNTER(ucs_memtrack_context.stats, UCS_MEMTRACK_STAT_ALLOCATION_COUNT, 1); +- entry->peak_count = ucs_max(entry->peak_count, entry->count); ++ /* update specific and global entries */ ++ ucs_memtrack_entry_update(entry, size); ++ ucs_memtrack_entry_update(&ucs_memtrack_context.total, size); + +- /* Update total size */ +- entry->size += size; ++ UCS_STATS_UPDATE_COUNTER(ucs_memtrack_context.stats, UCS_MEMTRACK_STAT_ALLOCATION_COUNT, 1); + UCS_STATS_UPDATE_COUNTER(ucs_memtrack_context.stats, UCS_MEMTRACK_STAT_ALLOCATION_SIZE, size); +- entry->peak_size = ucs_max(entry->peak_size, entry->size); + + out_unlock: + pthread_mutex_unlock(&ucs_memtrack_context.lock); +-out: +- UCS_EMPTY_STATEMENT; + } + +-static ucs_memtrack_entry_t* +-ucs_memtrack_record_release(ucs_memtrack_buffer_t *buffer, size_t size) ++void ucs_memtrack_releasing(void* ptr) + { + ucs_memtrack_entry_t *entry; ++ khiter_t iter; ++ size_t size; + +- if (!ucs_memtrack_is_enabled()) { +- return NULL; ++ if ((ptr == NULL) || !ucs_memtrack_is_enabled()) { ++ return; + } + + pthread_mutex_lock(&ucs_memtrack_context.lock); +- VALGRIND_MAKE_MEM_DEFINED(buffer, sizeof(*buffer)); + +- ucs_assert_always(buffer->magic == UCS_MEMTRACK_MAGIC); +- buffer->magic = UCS_MEMTRACK_MAGIC + 1; /* protect from double free */ +- if (size != 0) { +- ucs_assert(buffer->size == size); ++ iter = kh_get(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs, (uintptr_t)ptr); ++ if (iter == kh_end(&ucs_memtrack_context.ptrs)) { ++ ucs_debug("address %p not found in memtrack ptr hash", ptr); ++ goto out_unlock; + } + +- entry = buffer->entry; +- +- /* Update total count */ +- ucs_assert(entry->count >= 1); +- --entry->count; ++ /* remote pointer from hash */ ++ entry = kh_val(&ucs_memtrack_context.ptrs, iter).entry; ++ size = kh_val(&ucs_memtrack_context.ptrs, iter).size; ++ kh_del(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs, iter); + +- /* Update total size */ +- ucs_assert(entry->size >= buffer->size); +- entry->size -= buffer->size; ++ /* update counts */ ++ ucs_memtrack_entry_update(entry, -size); ++ ucs_memtrack_entry_update(&ucs_memtrack_context.total, -size); + ++out_unlock: + pthread_mutex_unlock(&ucs_memtrack_context.lock); +- return entry; + } + + void *ucs_malloc(size_t size, const char *name) + { +- ucs_memtrack_buffer_t *buffer; +- +- buffer = malloc(size + (ucs_memtrack_is_enabled() ? sizeof(*buffer) : 0)); +- if ((buffer == NULL) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- ucs_memtrack_record_alloc(buffer, size, 0, name); +- return buffer + 1; ++ void *ptr = malloc(size); ++ ucs_memtrack_allocated(ptr, size, name); ++ return ptr; + } + + void *ucs_calloc(size_t nmemb, size_t size, const char *name) + { +- ucs_memtrack_buffer_t *buffer; +- +- buffer = calloc(1, nmemb * size + (ucs_memtrack_is_enabled() ? sizeof(*buffer) : 0)); +- if ((buffer == NULL) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- ucs_memtrack_record_alloc(buffer, nmemb * size, 0, name); +- return buffer + 1; ++ void *ptr = calloc(nmemb, size); ++ ucs_memtrack_allocated(ptr, nmemb * size, name); ++ return ptr; + } + + void *ucs_realloc(void *ptr, size_t size, const char *name) + { +- ucs_memtrack_buffer_t *buffer = (ucs_memtrack_buffer_t*)ptr - 1; +- ucs_memtrack_entry_t *entry; +- +- if (!ucs_memtrack_is_enabled()) { +- return realloc(ptr, size); +- } +- +- if (ptr == NULL) { +- return ucs_malloc(size, name); +- } +- +- entry = ucs_memtrack_record_release(buffer, 0); +- +- buffer = realloc((void*)buffer - buffer->offset, size + sizeof(*buffer)); +- if (buffer == NULL) { +- return NULL; +- } +- +- ucs_memtrack_record_alloc(buffer, size, 0, entry->name); +- return buffer + 1; ++ ucs_memtrack_releasing(ptr); ++ ptr = realloc(ptr, size); ++ ucs_memtrack_allocated(ptr, size, name); ++ return ptr; + } + + void *ucs_memalign(size_t boundary, size_t size, const char *name) + { +- ucs_memtrack_buffer_t *buffer; +- off_t offset; +- +- if (!ucs_memtrack_is_enabled()) { +- return memalign(boundary, size); +- } +- +- if (boundary > sizeof(*buffer)) { +- buffer = memalign(boundary, size + boundary); +- offset = boundary - sizeof(*buffer); +- } else { +- if (sizeof(*buffer) % boundary != 0) { +- offset = boundary - (sizeof(*buffer) % boundary); +- } else { +- offset = 0; +- } +- buffer = memalign(boundary, size + sizeof(*buffer) + offset); +- } +- if ((buffer == NULL) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- buffer = (void*)buffer + offset; +- ucs_memtrack_record_alloc(buffer, size, offset, name); +- return buffer + 1; ++ void *ptr = memalign(boundary, size); ++ ucs_memtrack_allocated(ptr, size, name); ++ return ptr; + } + + void ucs_free(void *ptr) + { +- ucs_memtrack_buffer_t *buffer; +- +- if ((ptr == NULL) || !ucs_memtrack_is_enabled()) { +- free(ptr); +- return; +- } +- +- buffer = (ucs_memtrack_buffer_t*)ptr - 1; +- ucs_memtrack_record_release(buffer, 0); +- free((void*)buffer - buffer->offset); ++ ucs_memtrack_releasing(ptr); ++ free(ptr); + } + + void *ucs_mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset, const char *name) + { +- ucs_memtrack_buffer_t *buffer; +- +- if (ucs_memtrack_is_enabled() && +- ((flags & MAP_FIXED) || !(prot & PROT_WRITE))) { +- return MAP_FAILED; ++ void *ptr = mmap(addr, length, prot, flags, fd, offset); ++ if (ptr != MAP_FAILED) { ++ ucs_memtrack_allocated(ptr, length, name); + } +- +- buffer = mmap(addr, length + (ucs_memtrack_is_enabled() ? sizeof(*buffer) : 0), +- prot, flags, fd, offset); +- if ((buffer == MAP_FAILED) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- if (fd > 0) { +- memmove(buffer + 1, buffer, length); +- } +- +- ucs_memtrack_record_alloc(buffer, length, 0, name); +- return buffer + 1; +-} +- +-#ifdef __USE_LARGEFILE64 +-void *ucs_mmap64(void *addr, size_t size, int prot, int flags, int fd, +- off64_t offset, const char *name) +-{ +- ucs_memtrack_buffer_t *buffer; +- +- if ((flags & MAP_FIXED) || !(prot & PROT_WRITE)) { +- return NULL; +- } +- +- buffer = mmap64(addr, size + (ucs_memtrack_is_enabled() ? sizeof(*buffer) : 0), +- prot, flags, fd, offset); +- if ((buffer == MAP_FAILED) || (!ucs_memtrack_is_enabled())) { +- return buffer; +- } +- +- if (fd > 0) { +- memmove(buffer + 1, buffer, size); +- } +- +- ucs_memtrack_record_alloc(buffer, size, 0, name); +- return buffer + 1; ++ return ptr; + } +-#endif + + int ucs_munmap(void *addr, size_t length) + { +- ucs_memtrack_buffer_t *buffer; +- +- if (!ucs_memtrack_is_enabled()) { +- return munmap(addr, length); +- } +- +- buffer = (ucs_memtrack_buffer_t*)addr - 1; +- ucs_memtrack_record_release(buffer, length); +- return munmap((void*)buffer - buffer->offset, +- length + sizeof(*buffer) + buffer->offset); ++ ucs_memtrack_releasing(addr); ++ return munmap(addr, length); + } + + char *ucs_strdup(const char *src, const char *name) + { +- char *str; +- size_t len = strlen(src); +- +- str = ucs_malloc(len + 1, name); +- if (str) { +- memcpy(str, src, len + 1); +- } +- ++ char *str = strdup(src); ++ ucs_memtrack_allocated(str, strlen(str) + 1, name); + return str; + } + +-static unsigned ucs_memtrack_total_internal(ucs_memtrack_entry_t* total) +-{ +- struct sglib_hashed_ucs_memtrack_entry_t_iterator entry_it; +- ucs_memtrack_entry_t *entry; +- unsigned num_entries; +- +- ucs_memtrack_total_reset(total); +- +- num_entries = 0; +- for (entry = sglib_hashed_ucs_memtrack_entry_t_it_init(&entry_it, +- ucs_memtrack_context.entries); +- entry != NULL; +- entry = sglib_hashed_ucs_memtrack_entry_t_it_next(&entry_it)) +- { +- total->size += entry->size; +- total->peak_size += entry->peak_size; +- total->count += entry->count; +- total->peak_count += entry->peak_count; +- ++num_entries; +- } +- return num_entries; +-} +- + void ucs_memtrack_total(ucs_memtrack_entry_t* total) + { + if (!ucs_memtrack_is_enabled()) { +@@ -368,58 +234,51 @@ void ucs_memtrack_total(ucs_memtrack_entry_t* total) + } + + pthread_mutex_lock(&ucs_memtrack_context.lock); +- ucs_memtrack_total_internal(total); ++ *total = ucs_memtrack_context.total; + pthread_mutex_unlock(&ucs_memtrack_context.lock); + } + + static int ucs_memtrack_cmp_entries(const void *ptr1, const void *ptr2) + { +- const ucs_memtrack_entry_t *e1 = ptr1; +- const ucs_memtrack_entry_t *e2 = ptr2; ++ ucs_memtrack_entry_t * const *e1 = ptr1; ++ ucs_memtrack_entry_t * const *e2 = ptr2; + +- return (int)((ssize_t)e2->peak_size - (ssize_t)e1->peak_size); ++ return (int)((ssize_t)(*e2)->peak_size - (ssize_t)(*e1)->peak_size); + } + + static void ucs_memtrack_dump_internal(FILE* output_stream) + { +- struct sglib_hashed_ucs_memtrack_entry_t_iterator entry_it; +- ucs_memtrack_entry_t *entry, *all_entries; +- ucs_memtrack_entry_t total = {"", 0}; ++ ucs_memtrack_entry_t *entry, **all_entries; + unsigned num_entries, i; + + if (!ucs_memtrack_is_enabled()) { + return; + } + +- num_entries = ucs_memtrack_total_internal(&total); ++ /* collect all entries to one array */ ++ all_entries = ucs_alloca(sizeof(*all_entries) * ++ kh_size(&ucs_memtrack_context.entries)); ++ num_entries = 0; ++ kh_foreach_value(&ucs_memtrack_context.entries, entry, { ++ all_entries[num_entries++] = entry; ++ }); ++ ucs_assert(num_entries <= kh_size(&ucs_memtrack_context.entries)); ++ ++ /* sort entries according to peak size */ ++ qsort(all_entries, num_entries, sizeof(*all_entries), ucs_memtrack_cmp_entries); + ++ /* print title */ + fprintf(output_stream, "%31s current / peak %16s current / peak\n", "", ""); + fprintf(output_stream, UCS_MEMTRACK_FORMAT_STRING, "TOTAL", +- total.size, total.peak_size, +- total.count, total.peak_count); +- +- all_entries = malloc(sizeof(ucs_memtrack_entry_t) * num_entries); +- +- /* Copy all entries to one array */ +- i = 0; +- for (entry = sglib_hashed_ucs_memtrack_entry_t_it_init(&entry_it, +- ucs_memtrack_context.entries); +- entry != NULL; +- entry = sglib_hashed_ucs_memtrack_entry_t_it_next(&entry_it)) +- { +- all_entries[i++] = *entry; +- } +- ucs_assert(i == num_entries); ++ ucs_memtrack_context.total.size, ucs_memtrack_context.total.peak_size, ++ ucs_memtrack_context.total.count, ucs_memtrack_context.total.peak_count); + +- /* Sort the entries from large to small */ +- qsort(all_entries, num_entries, sizeof(ucs_memtrack_entry_t), ucs_memtrack_cmp_entries); ++ /* print sorted entries */ + for (i = 0; i < num_entries; ++i) { +- entry = &all_entries[i]; ++ entry = all_entries[i]; + fprintf(output_stream, UCS_MEMTRACK_FORMAT_STRING, entry->name, + entry->size, entry->peak_size, entry->count, entry->peak_count); + } +- +- free(all_entries); + } + + void ucs_memtrack_dump(FILE* output_stream) +@@ -461,7 +320,11 @@ void ucs_memtrack_init() + return; + } + +- sglib_hashed_ucs_memtrack_entry_t_init(ucs_memtrack_context.entries); ++ // TODO use ucs_memtrack_entry_reset ++ ucs_memtrack_entry_reset(&ucs_memtrack_context.total); ++ kh_init_inplace(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs); ++ kh_init_inplace(ucs_memtrack_entry_hash, &ucs_memtrack_context.entries); ++ + status = UCS_STATS_NODE_ALLOC(&ucs_memtrack_context.stats, + &ucs_memtrack_stats_class, + ucs_stats_get_root()); +@@ -475,7 +338,6 @@ void ucs_memtrack_init() + + void ucs_memtrack_cleanup() + { +- struct sglib_hashed_ucs_memtrack_entry_t_iterator entry_it; + ucs_memtrack_entry_t *entry; + + if (!ucs_memtrack_context.enabled) { +@@ -489,82 +351,22 @@ void ucs_memtrack_cleanup() + /* disable before releasing the stats node */ + ucs_memtrack_context.enabled = 0; + UCS_STATS_NODE_FREE(ucs_memtrack_context.stats); +- for (entry = sglib_hashed_ucs_memtrack_entry_t_it_init(&entry_it, +- ucs_memtrack_context.entries); +- entry != NULL; +- entry = sglib_hashed_ucs_memtrack_entry_t_it_next(&entry_it)) +- { +- sglib_hashed_ucs_memtrack_entry_t_delete(ucs_memtrack_context.entries, entry); +- free(entry); +- } +- pthread_mutex_unlock(&ucs_memtrack_context.lock); +-} + +-int ucs_memtrack_is_enabled() +-{ +- return ucs_memtrack_context.enabled; +-} +- +-size_t ucs_memtrack_adjust_alloc_size(size_t size) +-{ +- return size + sizeof(ucs_memtrack_buffer_t); +-} +- +-void ucs_memtrack_allocated(void **ptr_p, size_t *size_p, const char *name) +-{ +- ucs_memtrack_buffer_t *buffer; +- +- if (!ucs_memtrack_is_enabled()) { +- return; +- } +- +- buffer = *ptr_p; +- *ptr_p = buffer + 1; +- *size_p -= sizeof(*buffer); +- ucs_memtrack_record_alloc(buffer, *size_p, 0, name); +-} +- +-void ucs_memtrack_releasing(void **ptr_p) +-{ +- ucs_memtrack_buffer_t *buffer; ++ /* cleanup entries */ ++ kh_foreach_value(&ucs_memtrack_context.entries, entry, { ++ free(entry); ++ }); + +- if (!ucs_memtrack_is_enabled()) { +- return; +- } +- +- buffer = *ptr_p -= sizeof(*buffer); +- ucs_memtrack_record_release(buffer, 0); +-} ++ /* destroy hash tables */ ++ kh_destroy_inplace(ucs_memtrack_entry_hash, &ucs_memtrack_context.entries); ++ kh_destroy_inplace(ucs_memtrack_ptr_hash, &ucs_memtrack_context.ptrs); + +-void ucs_memtrack_releasing_adjusted(void *ptr) +-{ +- ucs_memtrack_record_release(ptr, 0); +-} +- +-static uint64_t ucs_memtrack_entry_hash(ucs_memtrack_entry_t *entry) +-{ +- return ucs_string_to_id(entry->name); ++ pthread_mutex_unlock(&ucs_memtrack_context.lock); + } + +-static int ucs_memtrack_entry_compare(ucs_memtrack_entry_t *entry1, +- ucs_memtrack_entry_t *entry2) ++int ucs_memtrack_is_enabled() + { +- return strcmp(entry1->name, entry2->name); ++ return ucs_memtrack_context.enabled; + } + +-SGLIB_DEFINE_LIST_FUNCTIONS(ucs_memtrack_entry_t, ucs_memtrack_entry_compare, next) +-SGLIB_DEFINE_HASHED_CONTAINER_FUNCTIONS(ucs_memtrack_entry_t, +- UCS_MEMTRACK_ENTRY_HASH_SIZE, +- ucs_memtrack_entry_hash) +- + #endif +- +- +-void ucs_memtrack_total_reset(ucs_memtrack_entry_t* total) +-{ +- ucs_snprintf_zero(total->name, UCS_MEMTRACK_NAME_MAX, "total"); +- total->size = 0; +- total->peak_size = 0; +- total->count = 0; +- total->peak_count = 0; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.h +index 695620ecb..b02cd10c5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/memtrack.h +@@ -12,12 +12,11 @@ + #endif + + #include +- +-#include +-#include + #include ++#include + #include + ++ + BEGIN_C_DECLS + + enum { +@@ -26,27 +25,19 @@ enum { + UCS_MEMTRACK_STAT_LAST + }; + +-#define UCS_MEMTRACK_NAME_MAX 31 + + /** +- * Allocation site entry. ++ * Allocation site entry + */ +-typedef struct ucs_memtrack_entry ucs_memtrack_entry_t; +-struct ucs_memtrack_entry { +- char name[UCS_MEMTRACK_NAME_MAX]; +- size_t size; +- size_t peak_size; +- size_t count; +- size_t peak_count; +- ucs_memtrack_entry_t *next; +-}; ++typedef struct ucs_memtrack_entry { ++ size_t size; /* currently allocated total size */ ++ size_t peak_size; /* peak allocated total size */ ++ unsigned count; /* number of currently allocated blocks */ ++ unsigned peak_count; /* peak number of allocated blocks */ ++ char name[0]; /* allocation name */ ++} ucs_memtrack_entry_t; + + +-/** +- * Initialize the total allocations structure. +- */ +-void ucs_memtrack_total_reset(ucs_memtrack_entry_t* total); +- + + #if ENABLE_MEMTRACK + +@@ -61,16 +52,19 @@ void ucs_memtrack_total_reset(ucs_memtrack_entry_t* total); + */ + void ucs_memtrack_init(); + ++ + /** + * Stop trakcing memory (or decrement reference count). + */ + void ucs_memtrack_cleanup(); + ++ + /* + * Check if memtrack is enabled at the moment. + */ + int ucs_memtrack_is_enabled(); + ++ + /** + * Print a summary of memory tracked so far. + * +@@ -78,6 +72,7 @@ int ucs_memtrack_is_enabled(); + */ + void ucs_memtrack_dump(FILE* output); + ++ + /** + * Calculates the total of buffers currently tracked. + * +@@ -85,32 +80,18 @@ void ucs_memtrack_dump(FILE* output); + */ + void ucs_memtrack_total(ucs_memtrack_entry_t* total); + +-/** +- * Adjust size before doing custom allocation. Need to be called in order to +- * obtain the size of a custom allocation to have room for memtrack descriptor. +- */ +-size_t ucs_memtrack_adjust_alloc_size(size_t size); +- +-/** +- * Track custom allocation. Need to be called after custom allocation returns, +- * it will adjust the pointer and size to user buffer instead of the memtrack +- * descriptor. +- */ +-void ucs_memtrack_allocated(void **ptr_p, size_t *size_p, const char *name); + + /** +- * Track release of custom allocation. Need to be called before actually +- * releasing the memory. ++ * Track custom allocation. Need to be called after custom allocation returns. + */ +-void ucs_memtrack_releasing(void **ptr_p); ++void ucs_memtrack_allocated(void *ptr, size_t size, const char *name); + + + /** + * Track release of custom allocation. Need to be called before actually +- * releasing the memory. Unlike @ref ucs_memtrack_releasing(), the pointer passed +- * to this function is the actual memory block including memtrack header. ++ * releasing the memory. + */ +-void ucs_memtrack_releasing_adjusted(void *ptr); ++void ucs_memtrack_releasing(void *ptr); + + + /* +@@ -124,10 +105,6 @@ void *ucs_memalign(size_t boundary, size_t size, const char *name); + void ucs_free(void *ptr); + void *ucs_mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset, const char *name); +-#ifdef __USE_LARGEFILE64 +-void *ucs_mmap64(void *addr, size_t size, int prot, int flags, int fd, +- off64_t offset, const char *name); +-#endif + int ucs_munmap(void *addr, size_t length); + char *ucs_strdup(const char *src, const char *name); + +@@ -144,10 +121,8 @@ char *ucs_strdup(const char *src, const char *name); + #define ucs_memtrack_dump(_output) UCS_EMPTY_STATEMENT + #define ucs_memtrack_total(_total) ucs_memtrack_total_init(_total) + +-#define ucs_memtrack_adjust_alloc_size(_size) (_size) +-#define ucs_memtrack_allocated(_ptr_p, _sz_p, ...) UCS_EMPTY_STATEMENT ++#define ucs_memtrack_allocated(_ptr, _sz, ...) UCS_EMPTY_STATEMENT + #define ucs_memtrack_releasing(_ptr) UCS_EMPTY_STATEMENT +-#define ucs_memtrack_releasing_adjusted(_ptr) UCS_EMPTY_STATEMENT + + #define ucs_malloc(_s, ...) malloc(_s) + #define ucs_calloc(_n, _s, ...) calloc(_n, _s) +@@ -155,7 +130,6 @@ char *ucs_strdup(const char *src, const char *name); + #define ucs_memalign(_b, _s, ...) memalign(_b, _s) + #define ucs_free(_p) free(_p) + #define ucs_mmap(_a, _l, _p, _fl, _fd, _o, ...) mmap(_a, _l, _p, _fl, _fd, _o) +-#define ucs_mmap64(_a, _l, _p, _fl, _fd, _o, ...) mmap64(_a, _l, _p, _fl, _fd, _o) + #define ucs_munmap(_a, _l) munmap(_a, _l) + #define ucs_strdup(_src, ...) strdup(_src) + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.h +deleted file mode 100644 +index 51d2b7e2f..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.h ++++ /dev/null +@@ -1,473 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#ifndef UCS_PROFILE_H_ +-#define UCS_PROFILE_H_ +- +-#ifdef HAVE_CONFIG_H +-# include "config.h" +-#endif +- +-#include +-#include +-#include +-#include +-#include +- +- +-#define UCS_PROFILE_STACK_MAX 64 +- +- +-/** +- * Profiling modes +- */ +-enum { +- UCS_PROFILE_MODE_ACCUM, /**< Accumulate elapsed time per location */ +- UCS_PROFILE_MODE_LOG, /**< Record all events */ +- UCS_PROFILE_MODE_LAST +-}; +- +- +-/** +- * Profiling location type +- */ +-typedef enum { +- UCS_PROFILE_TYPE_SAMPLE, /**< Sample only */ +- UCS_PROFILE_TYPE_SCOPE_BEGIN, /**< Begin a scope */ +- UCS_PROFILE_TYPE_SCOPE_END, /**< End a scope */ +- UCS_PROFILE_TYPE_REQUEST_NEW, /**< New asynchronous request */ +- UCS_PROFILE_TYPE_REQUEST_EVENT, /**< Some progress is made on a request */ +- UCS_PROFILE_TYPE_REQUEST_FREE, /**< Asynchronous request released */ +- UCS_PROFILE_TYPE_LAST +-} ucs_profile_type_t; +- +- +-/** +- * Profile output file header +- */ +-typedef struct ucs_profile_header { +- char cmdline[1024]; /**< Command line */ +- char hostname[40]; /**< Host name */ +- uint32_t pid; /**< Process ID */ +- uint32_t mode; /**< Profiling mode */ +- uint32_t num_locations; /**< Number of locations in the file */ +- uint64_t num_records; /**< Number of records in the file */ +- uint64_t one_second; /**< How much time is one second on the sampled machine */ +-} UCS_S_PACKED ucs_profile_header_t; +- +- +-/** +- * Profile output file sample record +- */ +-typedef struct ucs_profile_record { +- uint64_t timestamp; /**< Record timestamp */ +- uint64_t param64; /**< Custom 64-bit parameter */ +- uint32_t param32; /**< Custom 32-bit parameter */ +- uint32_t location; /**< Location identifier */ +-} UCS_S_PACKED ucs_profile_record_t; +- +- +-/** +- * Profile location record +- */ +-typedef struct ucs_profile_location { +- char file[64]; /**< Source file name */ +- char function[64]; /**< Function name */ +- char name[32]; /**< User-provided name */ +- int *loc_id_p; /**< Back-pointer for location ID */ +- int line; /**< Source line number */ +- uint8_t type; /**< From ucs_profile_type_t */ +- uint64_t total_time; /**< Total interval from previous location */ +- size_t count; /**< Number of times we've hit this location */ +-} UCS_S_PACKED ucs_profile_location_t; +- +- +-/** +- * Profiling global context +- */ +-typedef struct ucs_profile_global_context { +- +- ucs_profile_location_t *locations; /**< Array of all locations */ +- unsigned num_locations; /**< Number of valid locations */ +- unsigned max_locations; /**< Size of locations array */ +- +- struct { +- ucs_profile_record_t *start, *end; /**< Circular log buffer */ +- ucs_profile_record_t *current; /**< Current log pointer */ +- int wraparound; /**< Whether log was rotated */ +- } log; +- +- struct { +- int stack_top; /**< Index of stack top */ +- ucs_time_t stack[UCS_PROFILE_STACK_MAX]; /**< Timestamps for each nested scope */ +- } accum; +- +-} ucs_profile_global_context_t; +- +- +-/** +- * Initialize profiling system. +- */ +-void ucs_profile_global_init(); +- +- +-/** +- * Save and cleanup profiling. +- */ +-void ucs_profile_global_cleanup(); +- +- +-/** +- * Save and reset profiling. +- */ +-void ucs_profile_dump(); +- +- +-#if HAVE_PROFILING +- +-extern const char *ucs_profile_mode_names[]; +- +-/* +- * Register a profiling location - should be called once per location in the +- * code, before the first record of each such location is made. +- * Should not be used directly - use UCS_PROFILE macros instead. +- * +- * @param [in] type Location type. +- * @param [in] file Source file name. +- * @param [in] line Source line number. +- * @param [in] function Calling function name. +- * @param [in] name Location name. +- * @param [out] loc_id_p Filled with location ID: +- * 0 - profiling is disabled +- * >0 - location index + 1 +- */ +-void ucs_profile_get_location(ucs_profile_type_t type, const char *name, +- const char *file, int line, const char *function, +- int *loc_id_p); +- +- +-/* +- * Store a new record with the given data. +- * Should not be used directly - use UCS_PROFILE macros instead. +- * +- * @param [in] type Location type. +- * @param [in] name Location name. +- * @param [in] param32 custom 32-bit parameter. +- * @param [in] param64 custom 64-bit parameter. +- * @param [in] file Source file name. +- * @param [in] line Source line number. +- * @param [in] function Calling function name. +- * @param [in,out] loc_id_p Variable used to maintain the location ID. +- */ +-static inline void ucs_profile_record(ucs_profile_type_t type, const char *name, +- uint32_t param32, uint64_t param64, +- const char *file, int line, +- const char *function, int *loc_id_p) +-{ +- extern ucs_profile_global_context_t ucs_profile_ctx; +- ucs_profile_global_context_t *ctx = &ucs_profile_ctx; +- ucs_profile_record_t *rec; +- ucs_profile_location_t *loc; +- ucs_time_t current_time; +- int loc_id; +- +-retry: +- loc_id = *loc_id_p; +- if (ucs_likely(loc_id == 0)) { +- return; +- } +- +- if (ucs_unlikely(loc_id == -1)) { +- ucs_profile_get_location(type, name, file, line, function, loc_id_p); +- goto retry; +- } +- +- current_time = ucs_get_time(); +- if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_ACCUM)) { +- loc = &ctx->locations[loc_id - 1]; +- switch (type) { +- case UCS_PROFILE_TYPE_SCOPE_BEGIN: +- ctx->accum.stack[++ctx->accum.stack_top] = current_time; +- ucs_assert(ctx->accum.stack_top < UCS_PROFILE_STACK_MAX); +- break; +- case UCS_PROFILE_TYPE_SCOPE_END: +- ucs_assert(ctx->accum.stack_top >= 0); +- loc->total_time += current_time - ctx->accum.stack[ctx->accum.stack_top]; +- --ctx->accum.stack_top; +- break; +- default: +- break; +- } +- ++loc->count; +- } +- if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_LOG)) { +- rec = ctx->log.current; +- rec->timestamp = current_time; +- rec->param64 = param64; +- rec->param32 = param32; +- rec->location = loc_id - 1; +- if (++ctx->log.current >= ctx->log.end) { +- ctx->log.current = ctx->log.start; +- ctx->log.wraparound = 1; +- } +- } +-} +- +-/* Helper macro */ +-#define _UCS_PROFILE_RECORD(_type, _name, _param64, _param32, _loc_id_p) \ +- ucs_profile_record((_type), (_name), (_param64), (_param32), __FILE__, \ +- __LINE__, __FUNCTION__, (_loc_id_p)) +- +- +-/* Helper macro */ +-#define __UCS_PROFILE_CODE(_name, _loop_var) \ +- int _loop_var ; \ +- for (({ UCS_PROFILE_SCOPE_BEGIN(); _loop_var = 1;}); \ +- _loop_var; \ +- ({ UCS_PROFILE_SCOPE_END(_name); _loop_var = 0;})) +- +- +-/* Helper macro */ +-#define _UCS_PROFILE_CODE(_name, _var_suffix) \ +- __UCS_PROFILE_CODE(_name, UCS_PP_TOKENPASTE(loop, _var_suffix)) +- +- +-/** +- * Record a profiling event. +- * +- * @param _type Event type. +- * @param _name Event name. +- * @param _param32 Custom 32-bit parameter. +- * @param _param64 Custom 64-bit parameter. +- */ +-#define UCS_PROFILE(_type, _name, _param32, _param64) \ +- { \ +- static int loc_id = -1; \ +- _UCS_PROFILE_RECORD((_type), (_name), (_param32), (_param64), &loc_id); \ +- } +- +- +-/** +- * Record a profiling sample event. +- * +- * @param _name Event name. +- */ +-#define UCS_PROFILE_SAMPLE(_name) \ +- UCS_PROFILE(UCS_PROFILE_TYPE_SAMPLE, (_name), 0, 0) +- +- +-/** +- * Record a scope-begin profiling event. +- */ +-#define UCS_PROFILE_SCOPE_BEGIN() \ +- { \ +- UCS_PROFILE(UCS_PROFILE_TYPE_SCOPE_BEGIN, "", 0, 0); \ +- ucs_compiler_fence(); \ +- } +- +- +-/** +- * Record a scope-end profiling event. +- * +- * @param _name Scope name. +- */ +-#define UCS_PROFILE_SCOPE_END(_name) \ +- { \ +- ucs_compiler_fence(); \ +- UCS_PROFILE(UCS_PROFILE_TYPE_SCOPE_END, _name, 0, 0); \ +- } +- +- +-/** +- * Declare a profiled scope of code. +- * +- * Usage: +- * UCS_PROFILE_CODE() { +- * +- * } +- * +- * @param _name Scope name. +- */ +-#define UCS_PROFILE_CODE(_name) \ +- _UCS_PROFILE_CODE(_name, UCS_PP_UNIQUE_ID) +- +- +-/** +- * Create a profiled function. +- * +- * Usage: +- * UCS_PROFILE_FUNC(, , (a, b), int a, char b) +- * +- * @param _ret_type Function return type. +- * @param _name Function name. +- * @param _arglist List of argument *names* only. +- * @param ... Argument declarations (with types). +- */ +-#define UCS_PROFILE_FUNC(_ret_type, _name, _arglist, ...) \ +- static UCS_F_ALWAYS_INLINE _ret_type _name##_inner(__VA_ARGS__); \ +- \ +- _ret_type _name(__VA_ARGS__) { \ +- UCS_PROFILE_SCOPE_BEGIN(); \ +- _ret_type _ret = _name##_inner _arglist; \ +- UCS_PROFILE_SCOPE_END(#_name); \ +- return _ret; \ +- } \ +- static UCS_F_ALWAYS_INLINE _ret_type _name##_inner(__VA_ARGS__) +- +- +-/** +- * Create a profiled function whose return type is void. +- * +- * Usage: +- * UCS_PROFILE_FUNC_VOID(, (a, b), int a, char b) +- * +- * @param _name Function name. +- * @param _arglist List of argument *names* only. +- * @param ... Argument declarations (with types). +- */ +-#define UCS_PROFILE_FUNC_VOID(_name, _arglist, ...) \ +- static UCS_F_ALWAYS_INLINE void _name##_inner(__VA_ARGS__); \ +- \ +- void _name(__VA_ARGS__) { \ +- UCS_PROFILE_SCOPE_BEGIN(); \ +- _name##_inner _arglist; \ +- UCS_PROFILE_SCOPE_END(#_name); \ +- } \ +- static UCS_F_ALWAYS_INLINE void _name##_inner(__VA_ARGS__) +- +- +-/* +- * Profile a function call, and specify explicit name string for the profile. +- * Useful when calling a function by a pointer. +- * +- * Usage: +- * UCS_PROFILE_NAMED_CALL("name", function, arg1, arg2) +- * +- * @param _name Name string for the profile. +- * @param _func Function name. +- * @param ... Function call arguments. +- */ +-#define UCS_PROFILE_NAMED_CALL(_name, _func, ...) \ +- ({ \ +- typeof(_func(__VA_ARGS__)) retval; \ +- UCS_PROFILE_SCOPE_BEGIN(); \ +- retval = _func(__VA_ARGS__); \ +- UCS_PROFILE_SCOPE_END(_name); \ +- retval; \ +- }) +- +- +-/* +- * Profile a function call. +- * +- * Usage: +- * UCS_PROFILE_CALL(function, arg1, arg2) +- * +- * @param _func Function name. +- * @param ... Function call arguments. +- */ +-#define UCS_PROFILE_CALL(_func, ...) \ +- UCS_PROFILE_NAMED_CALL(#_func, _func, ## __VA_ARGS__) +- +- +-/* +- * Profile a function call which does not return a value, and specify explicit +- * name string for the profile. Useful when calling a function by a pointer. +- * +- * Usage: +- * UCS_PROFILE_NAMED_CALL_VOID("name", function, arg1, arg2) +- * +- * @param _name Name string for the profile. +- * @param _func Function name. +- * @param ... Function call arguments. +- */ +-#define UCS_PROFILE_NAMED_CALL_VOID(_name, _func, ...) \ +- { \ +- UCS_PROFILE_SCOPE_BEGIN(); \ +- _func(__VA_ARGS__); \ +- UCS_PROFILE_SCOPE_END(_name); \ +- } +- +- +-/* +- * Profile a function call which does not return a value. +- * +- * Usage: +- * UCS_PROFILE_CALL_VOID(function, arg1, arg2) +- * +- * @param _func Function name. +- * @param ... Function call arguments. +- */ +-#define UCS_PROFILE_CALL_VOID(_func, ...) \ +- UCS_PROFILE_NAMED_CALL_VOID(#_func, _func, ## __VA_ARGS__) +- +- +-/* +- * Profile a new request allocation. +- * +- * @param _req Request pointer. +- * @param _name Allocation site name. +- * @param _param32 Custom 32-bit parameter. +- */ +-#define UCS_PROFILE_REQUEST_NEW(_req, _name, _param32) \ +- UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_NEW, (_name), (_param32), (uintptr_t)(_req)); +- +- +-/* +- * Profile a request progress event. +- * +- * @param _req Request pointer. +- * @param _name Event name. +- * @param _param32 Custom 32-bit parameter. +- */ +-#define UCS_PROFILE_REQUEST_EVENT(_req, _name, _param32) \ +- UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_EVENT, (_name), (_param32), (uintptr_t)(_req)); +- +- +-/* +- * Profile a request progress event with status check. +- * +- * @param _req Request pointer. +- * @param _name Event name. +- * @param _param32 Custom 32-bit parameter. +- * @param _status Status of the last progress event. +- */ +-#define UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(_req, _name, _param32, _status) \ +- if (!UCS_STATUS_IS_ERR(_status)) { \ +- UCS_PROFILE_REQUEST_EVENT((_req), (_name), (_param32)); \ +- } +- +- +-/* +- * Profile a request release. +- * +- * @param _req Request pointer. +- */ +-#define UCS_PROFILE_REQUEST_FREE(_req) \ +- UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_FREE, "", 0, (uintptr_t)(_req)); +- +- +-#else +- +-#define UCS_PROFILE(...) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_SAMPLE(_name) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_SCOPE_BEGIN() UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_SCOPE_END(_name) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_CODE(_name) +-#define UCS_PROFILE_FUNC(_ret_type, _name, _arglist, ...) _ret_type _name(__VA_ARGS__) +-#define UCS_PROFILE_FUNC_VOID(_name, _arglist, ...) void _name(__VA_ARGS__) +-#define UCS_PROFILE_NAMED_CALL(_name, _func, ...) _func(__VA_ARGS__) +-#define UCS_PROFILE_CALL(_func, ...) _func(__VA_ARGS__) +-#define UCS_PROFILE_NAMED_CALL_VOID(_name, _func, ...) _func(__VA_ARGS__) +-#define UCS_PROFILE_CALL_VOID(_func, ...) _func(__VA_ARGS__) +-#define UCS_PROFILE_REQUEST_NEW(...) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_REQUEST_EVENT(...) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(...) UCS_EMPTY_STATEMENT +-#define UCS_PROFILE_REQUEST_FREE(...) UCS_EMPTY_STATEMENT +- +-#endif +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.c +similarity index 60% +rename from src/ucs/debug/profile.c +rename to src/ucs/profile/profile.c +index 1bb9eb91f..8f7c1c010 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/debug/profile.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.c +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -9,8 +9,33 @@ + #include + #include + #include ++#include ++#include ++ ++ ++/** ++ * Profiling global context ++ */ ++typedef struct ucs_profile_global_context { ++ ++ ucs_profile_location_t *locations; /**< Array of all locations */ ++ unsigned num_locations; /**< Number of valid locations */ ++ unsigned max_locations; /**< Size of locations array */ ++ pthread_mutex_t mutex; /**< Protects updating the locations array */ ++ ++ struct { ++ ucs_profile_record_t *start, *end; /**< Circular log buffer */ ++ ucs_profile_record_t *current; /**< Current log pointer */ ++ int wraparound; /**< Whether log was rotated */ ++ } log; ++ ++ struct { ++ int stack_top; /**< Index of stack top */ ++ ucs_time_t stack[UCS_PROFILE_STACK_MAX]; /**< Timestamps for each nested scope */ ++ } accum; ++ ++} ucs_profile_global_context_t; + +-#if HAVE_PROFILING + + const char *ucs_profile_mode_names[] = { + [UCS_PROFILE_MODE_ACCUM] = "accum", +@@ -27,6 +52,7 @@ ucs_profile_global_context_t ucs_profile_ctx = { + .accum.stack_top = -1, + .num_locations = 0, + .max_locations = 0, ++ .mutex = PTHREAD_MUTEX_INITIALIZER + }; + + static void ucs_profile_file_write_data(int fd, void *data, size_t size) +@@ -96,22 +122,58 @@ static void ucs_profile_write() + close(fd); + } + +-void ucs_profile_get_location(ucs_profile_type_t type, const char *name, +- const char *file, int line, const char *function, +- int *loc_id_p) ++/* ++ * Register a profiling location - should be called once per location in the ++ * code, before the first record of each such location is made. ++ * SHOULD NOT be used directly - use UCS_PROFILE macros instead. ++ * ++ * @param [in] type Location type. ++ * @param [in] file Source file name. ++ * @param [in] line Source line number. ++ * @param [in] function Calling function name. ++ * @param [in] name Location name. ++ * @param [out] loc_id_p Filled with location ID: ++ * 0 - profiling is disabled ++ * >0 - location index + 1 ++ */ ++static void ucs_profile_get_location(ucs_profile_type_t type, const char *name, ++ const char *file, int line, ++ const char *function, volatile int *loc_id_p) + { ++ ucs_profile_global_context_t *ctx = &ucs_profile_ctx; + ucs_profile_location_t *loc; + int location; ++ int i; ++ ++ pthread_mutex_lock(&ucs_profile_ctx.mutex); ++ ++ if (*loc_id_p == 0) { ++ goto out_unlock; ++ } + + /* Check if profiling is disabled */ + if (!ucs_global_opts.profile_mode) { + *loc_id_p = 0; +- return; ++ goto out_unlock; + } + + /* Location ID must be uninitialized */ + ucs_assert(*loc_id_p == -1); + ++ for (i = 0; i < ctx->num_locations; ++i) { ++ loc = &ctx->locations[i]; ++ ++ if ((type == loc->type) && ++ (line == loc->line) && ++ !strcmp(loc->name, name) && ++ !strcmp(loc->file, basename(file)) && ++ !strcmp(loc->function, function)) { ++ ++ *loc_id_p = i + 1; ++ goto out_unlock; ++ } ++ } ++ + location = ucs_profile_ctx.num_locations++; + + /* Reallocate array if needed */ +@@ -124,7 +186,7 @@ void ucs_profile_get_location(ucs_profile_type_t type, const char *name, + if (ucs_profile_ctx.locations == NULL) { + ucs_warn("failed to expand locations array"); + *loc_id_p = 0; +- return; ++ goto out_unlock; + } + } + +@@ -138,9 +200,68 @@ void ucs_profile_get_location(ucs_profile_type_t type, const char *name, + loc->total_time = 0; + loc->count = 0; + loc->loc_id_p = loc_id_p; ++ ++ ucs_memory_cpu_store_fence(); + *loc_id_p = location + 1; ++ ++out_unlock: ++ pthread_mutex_unlock(&ucs_profile_ctx.mutex); ++} ++ ++void ucs_profile_record(ucs_profile_type_t type, const char *name, ++ uint32_t param32, uint64_t param64, const char *file, ++ int line, const char *function, volatile int *loc_id_p) ++{ ++ extern ucs_profile_global_context_t ucs_profile_ctx; ++ ucs_profile_global_context_t *ctx = &ucs_profile_ctx; ++ ucs_profile_record_t *rec; ++ ucs_profile_location_t *loc; ++ ucs_time_t current_time; ++ int loc_id; ++ ++ /* If the location id is -1 or 0, need to re-read it with lock held */ ++ if (ucs_unlikely((loc_id = *loc_id_p) <= 0)) { ++ ucs_profile_get_location(type, name, file, line, function, loc_id_p); ++ if ((loc_id = *loc_id_p) == 0) { ++ return; ++ } ++ } ++ ++ ucs_memory_cpu_load_fence(); ++ ucs_assert(*loc_id_p != 0); ++ ucs_assert(ucs_global_opts.profile_mode != 0); ++ ++ current_time = ucs_get_time(); ++ if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_ACCUM)) { ++ loc = &ctx->locations[loc_id - 1]; ++ switch (type) { ++ case UCS_PROFILE_TYPE_SCOPE_BEGIN: ++ ctx->accum.stack[++ctx->accum.stack_top] = current_time; ++ break; ++ case UCS_PROFILE_TYPE_SCOPE_END: ++ loc->total_time += current_time - ctx->accum.stack[ctx->accum.stack_top]; ++ --ctx->accum.stack_top; ++ break; ++ default: ++ break; ++ } ++ ++loc->count; ++ } ++ ++ if (ucs_global_opts.profile_mode & UCS_BIT(UCS_PROFILE_MODE_LOG)) { ++ rec = ctx->log.current; ++ rec->timestamp = current_time; ++ rec->param64 = param64; ++ rec->param32 = param32; ++ rec->location = loc_id - 1; ++ if (++ctx->log.current >= ctx->log.end) { ++ ctx->log.current = ctx->log.start; ++ ctx->log.wraparound = 1; ++ } ++ } + } + ++ + void ucs_profile_global_init() + { + size_t num_records; +@@ -185,6 +306,7 @@ static void ucs_profile_reset_locations() + { + ucs_profile_location_t *loc; + ++ pthread_mutex_lock(&ucs_profile_ctx.mutex); + for (loc = ucs_profile_ctx.locations; + loc < ucs_profile_ctx.locations + ucs_profile_ctx.num_locations; + ++loc) +@@ -196,6 +318,7 @@ static void ucs_profile_reset_locations() + ucs_profile_ctx.max_locations = 0; + ucs_free(ucs_profile_ctx.locations); + ucs_profile_ctx.locations = NULL; ++ pthread_mutex_unlock(&ucs_profile_ctx.mutex); + } + + void ucs_profile_global_cleanup() +@@ -228,19 +351,3 @@ void ucs_profile_dump() + ucs_profile_ctx.log.current = ucs_profile_ctx.log.start; + } + } +- +-#else +- +-void ucs_profile_global_init() +-{ +-} +- +-void ucs_profile_global_cleanup() +-{ +-} +- +-void ucs_profile_dump() +-{ +-} +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.h +new file mode 100644 +index 000000000..e8e7fe857 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile.h +@@ -0,0 +1,20 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCS_PROFILE_H_ ++#define UCS_PROFILE_H_ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#if HAVE_PROFILING ++# include "profile_on.h" ++#else ++# include "profile_off.h" ++#endif ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_defs.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_defs.h +new file mode 100644 +index 000000000..930ed6bbf +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_defs.h +@@ -0,0 +1,106 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCS_PROFILE_DEFS_H_ ++#define UCS_PROFILE_DEFS_H_ ++ ++#include ++#include ++#include ++ ++ ++BEGIN_C_DECLS ++ ++#define UCS_PROFILE_STACK_MAX 64 ++ ++ ++/** ++ * Profiling modes ++ */ ++enum { ++ UCS_PROFILE_MODE_ACCUM, /**< Accumulate elapsed time per location */ ++ UCS_PROFILE_MODE_LOG, /**< Record all events */ ++ UCS_PROFILE_MODE_LAST ++}; ++ ++ ++/** ++ * Profiling location type ++ */ ++typedef enum { ++ UCS_PROFILE_TYPE_SAMPLE, /**< Sample only */ ++ UCS_PROFILE_TYPE_SCOPE_BEGIN, /**< Begin a scope */ ++ UCS_PROFILE_TYPE_SCOPE_END, /**< End a scope */ ++ UCS_PROFILE_TYPE_REQUEST_NEW, /**< New asynchronous request */ ++ UCS_PROFILE_TYPE_REQUEST_EVENT, /**< Some progress is made on a request */ ++ UCS_PROFILE_TYPE_REQUEST_FREE, /**< Asynchronous request released */ ++ UCS_PROFILE_TYPE_LAST ++} ucs_profile_type_t; ++ ++ ++/** ++ * Profile output file header ++ */ ++typedef struct ucs_profile_header { ++ char cmdline[1024]; /**< Command line */ ++ char hostname[40]; /**< Host name */ ++ uint32_t pid; /**< Process ID */ ++ uint32_t mode; /**< Profiling mode */ ++ uint32_t num_locations; /**< Number of locations in the file */ ++ uint64_t num_records; /**< Number of records in the file */ ++ uint64_t one_second; /**< How much time is one second on the sampled machine */ ++} UCS_S_PACKED ucs_profile_header_t; ++ ++ ++/** ++ * Profile output file sample record ++ */ ++typedef struct ucs_profile_record { ++ uint64_t timestamp; /**< Record timestamp */ ++ uint64_t param64; /**< Custom 64-bit parameter */ ++ uint32_t param32; /**< Custom 32-bit parameter */ ++ uint32_t location; /**< Location identifier */ ++} UCS_S_PACKED ucs_profile_record_t; ++ ++ ++/** ++ * Profile location record ++ */ ++typedef struct ucs_profile_location { ++ char file[64]; /**< Source file name */ ++ char function[64]; /**< Function name */ ++ char name[32]; /**< User-provided name */ ++ volatile int *loc_id_p; /**< Back-pointer for location ID */ ++ int line; /**< Source line number */ ++ uint8_t type; /**< From ucs_profile_type_t */ ++ uint64_t total_time; /**< Total interval from previous location */ ++ size_t count; /**< Number of times we've hit this location */ ++} UCS_S_PACKED ucs_profile_location_t; ++ ++ ++extern const char *ucs_profile_mode_names[]; ++ ++ ++/** ++ * Initialize profiling system. ++ */ ++void ucs_profile_global_init(); ++ ++ ++/** ++ * Save and cleanup profiling. ++ */ ++void ucs_profile_global_cleanup(); ++ ++ ++/** ++ * Save and reset profiling. ++ */ ++void ucs_profile_dump(); ++ ++END_C_DECLS ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_off.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_off.h +new file mode 100644 +index 000000000..06df5a137 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_off.h +@@ -0,0 +1,31 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCS_PROFILE_OFF_H_ ++#define UCS_PROFILE_OFF_H_ ++ ++#include "profile_defs.h" ++ ++#include ++ ++ ++#define UCS_PROFILE(...) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_SAMPLE(_name) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_SCOPE_BEGIN() UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_SCOPE_END(_name) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_CODE(_name) ++#define UCS_PROFILE_FUNC(_ret_type, _name, _arglist, ...) _ret_type _name(__VA_ARGS__) ++#define UCS_PROFILE_FUNC_VOID(_name, _arglist, ...) void _name(__VA_ARGS__) ++#define UCS_PROFILE_NAMED_CALL(_name, _func, ...) _func(__VA_ARGS__) ++#define UCS_PROFILE_CALL(_func, ...) _func(__VA_ARGS__) ++#define UCS_PROFILE_NAMED_CALL_VOID(_name, _func, ...) _func(__VA_ARGS__) ++#define UCS_PROFILE_CALL_VOID(_func, ...) _func(__VA_ARGS__) ++#define UCS_PROFILE_REQUEST_NEW(...) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_REQUEST_EVENT(...) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(...) UCS_EMPTY_STATEMENT ++#define UCS_PROFILE_REQUEST_FREE(...) UCS_EMPTY_STATEMENT ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_on.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_on.h +new file mode 100644 +index 000000000..49eaa153a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/profile/profile_on.h +@@ -0,0 +1,276 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCS_PROFILE_ON_H_ ++#define UCS_PROFILE_ON_H_ ++ ++#include "profile_defs.h" ++ ++#include ++#include ++#include ++ ++ ++BEGIN_C_DECLS ++ ++/* Helper macro */ ++#define _UCS_PROFILE_RECORD(_type, _name, _param64, _param32, _loc_id_p) \ ++ { \ ++ if (*(_loc_id_p) != 0) { \ ++ ucs_profile_record((_type), (_name), (_param64), (_param32), \ ++ __FILE__, __LINE__, __FUNCTION__, (_loc_id_p)); \ ++ } \ ++ } ++ ++ ++/* Helper macro */ ++#define __UCS_PROFILE_CODE(_name, _loop_var) \ ++ int _loop_var ; \ ++ for (({ UCS_PROFILE_SCOPE_BEGIN(); _loop_var = 1;}); \ ++ _loop_var; \ ++ ({ UCS_PROFILE_SCOPE_END(_name); _loop_var = 0;})) ++ ++ ++/* Helper macro */ ++#define _UCS_PROFILE_CODE(_name, _var_suffix) \ ++ __UCS_PROFILE_CODE(_name, UCS_PP_TOKENPASTE(loop, _var_suffix)) ++ ++ ++/** ++ * Record a profiling event. ++ * ++ * @param _type Event type. ++ * @param _name Event name. ++ * @param _param32 Custom 32-bit parameter. ++ * @param _param64 Custom 64-bit parameter. ++ */ ++#define UCS_PROFILE(_type, _name, _param32, _param64) \ ++ { \ ++ static int loc_id = -1; \ ++ _UCS_PROFILE_RECORD((_type), (_name), (_param32), (_param64), &loc_id); \ ++ } ++ ++ ++/** ++ * Record a profiling sample event. ++ * ++ * @param _name Event name. ++ */ ++#define UCS_PROFILE_SAMPLE(_name) \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_SAMPLE, (_name), 0, 0) ++ ++ ++/** ++ * Record a scope-begin profiling event. ++ */ ++#define UCS_PROFILE_SCOPE_BEGIN() \ ++ { \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_SCOPE_BEGIN, "", 0, 0); \ ++ ucs_compiler_fence(); \ ++ } ++ ++ ++/** ++ * Record a scope-end profiling event. ++ * ++ * @param _name Scope name. ++ */ ++#define UCS_PROFILE_SCOPE_END(_name) \ ++ { \ ++ ucs_compiler_fence(); \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_SCOPE_END, _name, 0, 0); \ ++ } ++ ++ ++/** ++ * Declare a profiled scope of code. ++ * ++ * Usage: ++ * UCS_PROFILE_CODE() { ++ * ++ * } ++ * ++ * @param _name Scope name. ++ */ ++#define UCS_PROFILE_CODE(_name) \ ++ _UCS_PROFILE_CODE(_name, UCS_PP_UNIQUE_ID) ++ ++ ++/** ++ * Create a profiled function. ++ * ++ * Usage: ++ * UCS_PROFILE_FUNC(, , (a, b), int a, char b) ++ * ++ * @param _ret_type Function return type. ++ * @param _name Function name. ++ * @param _arglist List of argument *names* only. ++ * @param ... Argument declarations (with types). ++ */ ++#define UCS_PROFILE_FUNC(_ret_type, _name, _arglist, ...) \ ++ static UCS_F_ALWAYS_INLINE _ret_type _name##_inner(__VA_ARGS__); \ ++ \ ++ _ret_type _name(__VA_ARGS__) { \ ++ UCS_PROFILE_SCOPE_BEGIN(); \ ++ _ret_type _ret = _name##_inner _arglist; \ ++ UCS_PROFILE_SCOPE_END(#_name); \ ++ return _ret; \ ++ } \ ++ static UCS_F_ALWAYS_INLINE _ret_type _name##_inner(__VA_ARGS__) ++ ++ ++/** ++ * Create a profiled function whose return type is void. ++ * ++ * Usage: ++ * UCS_PROFILE_FUNC_VOID(, (a, b), int a, char b) ++ * ++ * @param _name Function name. ++ * @param _arglist List of argument *names* only. ++ * @param ... Argument declarations (with types). ++ */ ++#define UCS_PROFILE_FUNC_VOID(_name, _arglist, ...) \ ++ static UCS_F_ALWAYS_INLINE void _name##_inner(__VA_ARGS__); \ ++ \ ++ void _name(__VA_ARGS__) { \ ++ UCS_PROFILE_SCOPE_BEGIN(); \ ++ _name##_inner _arglist; \ ++ UCS_PROFILE_SCOPE_END(#_name); \ ++ } \ ++ static UCS_F_ALWAYS_INLINE void _name##_inner(__VA_ARGS__) ++ ++ ++/* ++ * Profile a function call, and specify explicit name string for the profile. ++ * Useful when calling a function by a pointer. ++ * ++ * Usage: ++ * UCS_PROFILE_NAMED_CALL("name", function, arg1, arg2) ++ * ++ * @param _name Name string for the profile. ++ * @param _func Function name. ++ * @param ... Function call arguments. ++ */ ++#define UCS_PROFILE_NAMED_CALL(_name, _func, ...) \ ++ ({ \ ++ typeof(_func(__VA_ARGS__)) retval; \ ++ UCS_PROFILE_SCOPE_BEGIN(); \ ++ retval = _func(__VA_ARGS__); \ ++ UCS_PROFILE_SCOPE_END(_name); \ ++ retval; \ ++ }) ++ ++ ++/* ++ * Profile a function call. ++ * ++ * Usage: ++ * UCS_PROFILE_CALL(function, arg1, arg2) ++ * ++ * @param _func Function name. ++ * @param ... Function call arguments. ++ */ ++#define UCS_PROFILE_CALL(_func, ...) \ ++ UCS_PROFILE_NAMED_CALL(#_func, _func, ## __VA_ARGS__) ++ ++ ++/* ++ * Profile a function call which does not return a value, and specify explicit ++ * name string for the profile. Useful when calling a function by a pointer. ++ * ++ * Usage: ++ * UCS_PROFILE_NAMED_CALL_VOID("name", function, arg1, arg2) ++ * ++ * @param _name Name string for the profile. ++ * @param _func Function name. ++ * @param ... Function call arguments. ++ */ ++#define UCS_PROFILE_NAMED_CALL_VOID(_name, _func, ...) \ ++ { \ ++ UCS_PROFILE_SCOPE_BEGIN(); \ ++ _func(__VA_ARGS__); \ ++ UCS_PROFILE_SCOPE_END(_name); \ ++ } ++ ++ ++/* ++ * Profile a function call which does not return a value. ++ * ++ * Usage: ++ * UCS_PROFILE_CALL_VOID(function, arg1, arg2) ++ * ++ * @param _func Function name. ++ * @param ... Function call arguments. ++ */ ++#define UCS_PROFILE_CALL_VOID(_func, ...) \ ++ UCS_PROFILE_NAMED_CALL_VOID(#_func, _func, ## __VA_ARGS__) ++ ++ ++/* ++ * Profile a new request allocation. ++ * ++ * @param _req Request pointer. ++ * @param _name Allocation site name. ++ * @param _param32 Custom 32-bit parameter. ++ */ ++#define UCS_PROFILE_REQUEST_NEW(_req, _name, _param32) \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_NEW, (_name), (_param32), (uintptr_t)(_req)); ++ ++ ++/* ++ * Profile a request progress event. ++ * ++ * @param _req Request pointer. ++ * @param _name Event name. ++ * @param _param32 Custom 32-bit parameter. ++ */ ++#define UCS_PROFILE_REQUEST_EVENT(_req, _name, _param32) \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_EVENT, (_name), (_param32), (uintptr_t)(_req)); ++ ++ ++/* ++ * Profile a request progress event with status check. ++ * ++ * @param _req Request pointer. ++ * @param _name Event name. ++ * @param _param32 Custom 32-bit parameter. ++ * @param _status Status of the last progress event. ++ */ ++#define UCS_PROFILE_REQUEST_EVENT_CHECK_STATUS(_req, _name, _param32, _status) \ ++ if (!UCS_STATUS_IS_ERR(_status)) { \ ++ UCS_PROFILE_REQUEST_EVENT((_req), (_name), (_param32)); \ ++ } ++ ++ ++/* ++ * Profile a request release. ++ * ++ * @param _req Request pointer. ++ */ ++#define UCS_PROFILE_REQUEST_FREE(_req) \ ++ UCS_PROFILE(UCS_PROFILE_TYPE_REQUEST_FREE, "", 0, (uintptr_t)(_req)); ++ ++ ++/* ++ * Store a new record with the given data. ++ * SHOULD NOT be used directly - use UCS_PROFILE macros instead. ++ * ++ * @param [in] type Location type. ++ * @param [in] name Location name. ++ * @param [in] param32 custom 32-bit parameter. ++ * @param [in] param64 custom 64-bit parameter. ++ * @param [in] file Source file name. ++ * @param [in] line Source line number. ++ * @param [in] function Calling function name. ++ * @param [in,out] loc_id_p Variable used to maintain the location ID. ++ */ ++void ucs_profile_record(ucs_profile_type_t type, const char *name, ++ uint32_t param32, uint64_t param64, const char *file, ++ int line, const char *function, volatile int *loc_id_p); ++ ++END_C_DECLS ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/libstats.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/libstats.h +index 425aab6a4..64abd50fc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/libstats.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/libstats.h +@@ -28,7 +28,7 @@ enum { + #define UCS_STATS_DEFAULT_UDP_PORT 37873 + + +-#define UCS_STAT_NAME_MAX 31 ++#define UCS_STAT_NAME_MAX 39 + + #define UCS_STATS_NODE_FMT \ + "%s%s" +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/stats_fwd.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/stats_fwd.h +index 69a0d7220..7fc0db647 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/stats_fwd.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/stats/stats_fwd.h +@@ -26,7 +26,7 @@ typedef enum { + } ucs_stats_formats_t; + + extern const char *ucs_stats_formats_names[]; +-ucs_stats_node_t * ucs_stats_get_root(); ++ucs_stats_node_t * ucs_stats_get_root(void); + + END_C_DECLS + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler.h +index 8f56c470b..24e838dee 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler.h +@@ -36,23 +36,21 @@ + #endif + + +-/* Helper macro for address arithmetic in bytes */ +-#define UCS_PTR_BYTE_OFFSET(_ptr, _offset) \ +- ((void *)((uintptr_t)(_ptr) + (_offset))) +- + /** + * Copy words from _src to _dst. + * ++ * @param _dst_type Type to use for destination buffer. + * @param _dst Destination buffer. ++ * @param _src_type Type to use for source buffer. + * @param _src Source buffer. +- * @param _word_type Type to use for copying. + * @param _size Number of bytes to copy. + */ +-#define UCS_WORD_COPY(_dst, _src, _word_type, _size) \ ++#define UCS_WORD_COPY(_dst_type, _dst, _src_type, _src, _size) \ + { \ + unsigned i; \ +- for (i = 0; i < (_size) / sizeof(_word_type); ++i) { \ +- *((_word_type*)(_dst) + i) = *((_word_type*)(_src) + i); \ ++ UCS_STATIC_ASSERT(sizeof(_src_type) == sizeof(_dst_type)); \ ++ for (i = 0; i < (_size) / sizeof(_src_type); ++i) { \ ++ *((_dst_type*)(_dst) + i) = *((_src_type*)(_src) + i); \ + } \ + } + +@@ -67,6 +65,11 @@ + alloca(_size); \ + }) + ++/** ++ * suppress unaligned pointer warning (actual on armclang5 platform) ++ */ ++#define ucs_unaligned_ptr(_ptr) ((void*)(_ptr)) ++ + + /** + * Define cache-line padding variable inside a structure +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler_def.h +index c337e9d60..011cb8195 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/compiler_def.h +@@ -87,6 +87,10 @@ + /* Used for labels */ + #define UCS_EMPTY_STATEMENT {} + ++/* Helper macro for address arithmetic in bytes */ ++#define UCS_PTR_BYTE_OFFSET(_ptr, _offset) \ ++ ((void *)((uintptr_t)(_ptr) + (_offset))) ++ + /** + * Size of statically-declared array + */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/init.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/init.c +index f3bdecd5d..2c2a51cad 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/init.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/init.c +@@ -6,10 +6,11 @@ + + #include + #include ++#include + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -86,6 +87,7 @@ static void UCS_F_CTOR ucs_init() + ucs_async_global_init(); + ucs_debug("%s loaded at 0x%lx", ucs_debug_get_lib_path(), + ucs_debug_get_lib_base_addr()); ++ ucs_debug("cmd line: %s", ucs_get_process_cmdline()); + } + + static void UCS_F_DTOR ucs_cleanup(void) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.c +new file mode 100644 +index 000000000..de783811f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.c +@@ -0,0 +1,214 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "memtype_cache.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++static ucs_pgt_dir_t *ucs_memtype_cache_pgt_dir_alloc(const ucs_pgtable_t *pgtable) ++{ ++ return ucs_memalign(UCS_PGT_ENTRY_MIN_ALIGN, sizeof(ucs_pgt_dir_t), ++ "memtype_cache_pgdir"); ++} ++ ++static void ucs_memtype_cache_pgt_dir_release(const ucs_pgtable_t *pgtable, ++ ucs_pgt_dir_t *dir) ++{ ++ ucs_free(dir); ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucs_memtype_cache_insert(ucs_memtype_cache_t *memtype_cache, void *address, ++ size_t size, ucm_mem_type_t mem_type) ++{ ++ ucs_memtype_cache_region_t *region; ++ ucs_pgt_addr_t start, end; ++ ucs_status_t status; ++ ++ ucs_trace("memtype_cache:insert address:%p length:%zu mem_type:%d", ++ address, size, mem_type); ++ ++ pthread_rwlock_wrlock(&memtype_cache->lock); ++ ++ /* Align to page size */ ++ start = ucs_align_down_pow2((uintptr_t)address, UCS_PGT_ADDR_ALIGN); ++ end = ucs_align_up_pow2 ((uintptr_t)address + size, UCS_PGT_ADDR_ALIGN); ++ region = NULL; ++ ++ /* Allocate structure for new region */ ++ region = ucs_memalign(UCS_PGT_ENTRY_MIN_ALIGN, sizeof(ucs_memtype_cache_region_t), ++ "memtype_cache_region"); ++ if (region == NULL) { ++ ucs_warn("failed to allocate memtype_cache region"); ++ goto out_unlock; ++ } ++ ++ region->super.start = start; ++ region->super.end = end; ++ region->mem_type = mem_type; ++ status = UCS_PROFILE_CALL(ucs_pgtable_insert, &memtype_cache->pgtable, ++ ®ion->super); ++ if (status != UCS_OK) { ++ ucs_error("failed to insert region " UCS_PGT_REGION_FMT ": %s", ++ UCS_PGT_REGION_ARG(®ion->super), ucs_status_string(status)); ++ ucs_free(region); ++ goto out_unlock; ++ } ++ ++out_unlock: ++ pthread_rwlock_unlock(&memtype_cache->lock); ++} ++ ++static UCS_F_ALWAYS_INLINE void ++ucs_memtype_cache_delete(ucs_memtype_cache_t *memtype_cache, void *address, ++ size_t size, ucm_mem_type_t mem_type) ++{ ++ ucs_pgt_addr_t start = (uintptr_t)address; ++ ucs_pgt_region_t *pgt_region; ++ ucs_memtype_cache_region_t *region; ++ ucs_status_t status; ++ ++ ucs_trace("memtype_cache:delete address:%p length:%zu mem_type:%d", ++ address, size, mem_type); ++ ++ pthread_rwlock_rdlock(&memtype_cache->lock); ++ ++ pgt_region = UCS_PROFILE_CALL(ucs_pgtable_lookup, &memtype_cache->pgtable, start); ++ assert(pgt_region != NULL); ++ ++ region = ucs_derived_of(pgt_region, ucs_memtype_cache_region_t); ++ ++ status = ucs_pgtable_remove(&memtype_cache->pgtable, ®ion->super); ++ if (status != UCS_OK) { ++ ucs_warn("failed to remove address:%p from memtype_cache", address); ++ } ++ ucs_free(region); ++ pthread_rwlock_unlock(&memtype_cache->lock); ++} ++ ++static void ucs_memtype_cache_event_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, void *arg) ++{ ++ ucs_memtype_cache_t *memtype_cache = arg; ++ ++ if (event_type & UCM_EVENT_MEM_TYPE_ALLOC) { ++ ucs_memtype_cache_insert(memtype_cache, event->mem_type.address, ++ event->mem_type.size, event->mem_type.mem_type); ++ } else if (event_type & UCM_EVENT_MEM_TYPE_FREE) { ++ ucs_memtype_cache_delete(memtype_cache, event->mem_type.address, ++ event->mem_type.size, event->mem_type.mem_type); ++ } ++} ++ ++static void ucs_memtype_cache_region_collect_callback(const ucs_pgtable_t *pgtable, ++ ucs_pgt_region_t *pgt_region, ++ void *arg) ++{ ++ ucs_memtype_cache_region_t *region = ucs_derived_of(pgt_region, ++ ucs_memtype_cache_region_t); ++ ucs_list_link_t *list = arg; ++ ucs_list_add_tail(list, ®ion->list); ++} ++ ++static void ucs_memtype_cache_purge(ucs_memtype_cache_t *memtype_cache) ++{ ++ ucs_memtype_cache_region_t *region, *tmp; ++ ucs_list_link_t region_list; ++ ++ ucs_trace_func("memtype_cache purge"); ++ ++ ucs_list_head_init(®ion_list); ++ ucs_pgtable_purge(&memtype_cache->pgtable, ucs_memtype_cache_region_collect_callback, ++ ®ion_list); ++ ucs_list_for_each_safe(region, tmp, ®ion_list, list) { ++ ucs_warn("destroying inuse address:%p ", (void *)region->super.start); ++ ucs_free(region); ++ } ++} ++ ++UCS_PROFILE_FUNC(ucs_status_t, ucs_memtype_cache_lookup, ++ (memtype_cache, address, length, ucm_mem_type), ++ ucs_memtype_cache_t *memtype_cache, void *address, ++ size_t length, ucm_mem_type_t *ucm_mem_type) ++{ ++ ucs_pgt_addr_t start = (uintptr_t)address; ++ ucs_pgt_region_t *pgt_region; ++ ucs_memtype_cache_region_t *region; ++ ucs_status_t status; ++ ++ pthread_rwlock_rdlock(&memtype_cache->lock); ++ ++ pgt_region = UCS_PROFILE_CALL(ucs_pgtable_lookup, &memtype_cache->pgtable, start); ++ if (pgt_region && pgt_region->end >= (start + length)) { ++ region = ucs_derived_of(pgt_region, ucs_memtype_cache_region_t); ++ *ucm_mem_type = region->mem_type; ++ status = UCS_OK; ++ goto out_unlock; ++ } ++ status = UCS_ERR_NO_ELEM; ++out_unlock: ++ pthread_rwlock_unlock(&memtype_cache->lock); ++ return status; ++} ++ ++static UCS_CLASS_INIT_FUNC(ucs_memtype_cache_t) ++{ ++ ucs_status_t status; ++ int ret; ++ ++ ret = pthread_rwlock_init(&self->lock, NULL); ++ if (ret) { ++ ucs_error("pthread_rwlock_init() failed: %m"); ++ status = UCS_ERR_INVALID_PARAM; ++ goto err; ++ } ++ ++ status = ucs_pgtable_init(&self->pgtable, ucs_memtype_cache_pgt_dir_alloc, ++ ucs_memtype_cache_pgt_dir_release); ++ if (status != UCS_OK) { ++ goto err_destroy_rwlock; ++ } ++ ++ status = ucm_set_event_handler((UCM_EVENT_MEM_TYPE_ALLOC | UCM_EVENT_MEM_TYPE_FREE), ++ 1000, ucs_memtype_cache_event_callback, self); ++ if (status != UCS_OK) { ++ goto err_cleanup_pgtable; ++ } ++ ++ return UCS_OK; ++ ++err_cleanup_pgtable: ++ ucs_pgtable_cleanup(&self->pgtable); ++err_destroy_rwlock: ++ pthread_rwlock_destroy(&self->lock); ++err: ++ return status; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(ucs_memtype_cache_t) ++{ ++ ucm_unset_event_handler((UCM_EVENT_MEM_TYPE_ALLOC | UCM_EVENT_MEM_TYPE_FREE), ++ ucs_memtype_cache_event_callback, self); ++ ucs_memtype_cache_purge(self); ++ ucs_pgtable_cleanup(&self->pgtable); ++ pthread_rwlock_destroy(&self->lock); ++} ++ ++UCS_CLASS_DEFINE(ucs_memtype_cache_t, void); ++UCS_CLASS_DEFINE_NAMED_NEW_FUNC(ucs_memtype_cache_create, ucs_memtype_cache_t, ++ ucs_memtype_cache_t) ++UCS_CLASS_DEFINE_NAMED_DELETE_FUNC(ucs_memtype_cache_destroy, ucs_memtype_cache_t, ++ ucs_memtype_cache_t) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.h +new file mode 100644 +index 000000000..209be0500 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/memtype_cache.h +@@ -0,0 +1,61 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCS_MEMTYPE_CACHE_H_ ++#define UCS_MEMTYPE_CACHE_H_ ++ ++#include ++#include ++#include ++#include ++ ++typedef struct ucs_memtype_cache ucs_memtype_cache_t; ++typedef struct ucs_memtype_cache_region ucs_memtype_cache_region_t; ++ ++ ++struct ucs_memtype_cache_region { ++ ucs_pgt_region_t super; /**< Base class - page table region */ ++ ucs_list_link_t list; /**< List element */ ++ ucm_mem_type_t mem_type; /**< Memory type the address belongs to */ ++}; ++ ++ ++struct ucs_memtype_cache { ++ pthread_rwlock_t lock; /**< protests the page table */ ++ ucs_pgtable_t pgtable; /**< Page table to hold the regions */ ++}; ++ ++ ++/** ++ * Create a memtype cache. ++ * ++ * @param [out] memtype_cache_p Filled with a pointer to the memtype cache. ++ */ ++ucs_status_t ucs_memtype_cache_create(ucs_memtype_cache_t **memtype_cache_p); ++ ++ ++/** ++ * Destroy a memtype cache. ++ * ++ * @param [in] memtype_cache Memtype cache to destroy. ++ */ ++void ucs_memtype_cache_destroy(ucs_memtype_cache_t *memtype_cache); ++ ++ ++/** Find if address range is in memtype cache. ++ * ++ * @param [in] memtype_cache Memtype cache to search ++ * @param [in] address Address to lookup ++ * @param [in] length Length of the memory ++ * @param [out] ucm_mem_type Memory type of the address ++ * ++ * @return Error code. ++ */ ++ucs_status_t ucs_memtype_cache_lookup(ucs_memtype_cache_t *memtype_cache, void *address, ++ size_t length, ucm_mem_type_t *ucm_mem_type); ++ ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.c +index 39ac9d21b..0594be3b2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.c +@@ -1,21 +1,23 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ + +-#include "rcache.h" + + #include + #include + #include + #include +-#include ++#include + #include + #include ++#include + #include + #include + ++#include "rcache.h" ++#include "rcache_int.h" + + #define ucs_rcache_region_log(_level, _message, ...) \ + do { \ +@@ -34,6 +36,9 @@ + #define ucs_rcache_region_trace(_message, ...) \ + ucs_rcache_region_log(UCS_LOG_LEVEL_TRACE, _message, ## __VA_ARGS__) + ++#define ucs_rcache_region_pfn(_region) \ ++ ((_region)->priv) ++ + + typedef struct ucs_rcache_inv_entry { + ucs_queue_elem_t queue; +@@ -42,6 +47,26 @@ typedef struct ucs_rcache_inv_entry { + } ucs_rcache_inv_entry_t; + + ++#if ENABLE_STATS ++static ucs_stats_class_t ucs_rcache_stats_class = { ++ .name = "rcache", ++ .num_counters = UCS_RCACHE_STAT_LAST, ++ .counter_names = { ++ [UCS_RCACHE_GETS] = "gets", ++ [UCS_RCACHE_HITS_FAST] = "hits_fast", ++ [UCS_RCACHE_HITS_SLOW] = "hits_slow", ++ [UCS_RCACHE_MISSES] = "misses", ++ [UCS_RCACHE_MERGES] = "regions_merged", ++ [UCS_RCACHE_UNMAPS] = "unmap_events", ++ [UCS_RCACHE_UNMAP_INVALIDATES] = "regions_inv_unmap", ++ [UCS_RCACHE_PUTS] = "puts", ++ [UCS_RCACHE_REGS] = "mem_regs", ++ [UCS_RCACHE_DEREGS] = "mem_deregs", ++ } ++}; ++#endif ++ ++ + static void __ucs_rcache_region_log(const char *file, int line, const char *function, + ucs_log_level_t level, ucs_rcache_t *rcache, + ucs_rcache_region_t *region, const char *fmt, +@@ -127,6 +152,26 @@ static ucs_mpool_ops_t ucs_rcache_mp_ops = { + .obj_cleanup = NULL + }; + ++/* Lock must be held for read */ ++static void ucs_rcache_region_validate_pfn(ucs_rcache_t *rcache, ++ ucs_rcache_region_t *region) ++{ ++ unsigned long region_pfn, actual_pfn; ++ ++ if (!ucs_unlikely(ucs_global_opts.rcache_check_pfn)) { ++ return; ++ } ++ ++ region_pfn = ucs_rcache_region_pfn(region); ++ actual_pfn = ucs_sys_get_pfn(region->super.start); ++ if (region_pfn != actual_pfn) { ++ ucs_rcache_region_error(rcache, region, "pfn check failed"); ++ ucs_fatal("%s: page at virtual address 0x%lx moved from pfn 0x%lx to pfn 0x%lx", ++ rcache->name, region->super.start, region_pfn, actual_pfn); ++ } else { ++ ucs_rcache_region_trace(rcache, region, "pfn ok"); ++ } ++} + + /* Lock must be held */ + static void ucs_rcache_region_collect_callback(const ucs_pgtable_t *pgtable, +@@ -156,6 +201,7 @@ static void ucs_mem_region_destroy_internal(ucs_rcache_t *rcache, + ucs_assert(!(region->flags & UCS_RCACHE_REGION_FLAG_PGTABLE)); + + if (region->flags & UCS_RCACHE_REGION_FLAG_REGISTERED) { ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_DEREGS, 1); + UCS_PROFILE_CODE("mem_dereg") { + rcache->params.ops->mem_dereg(rcache->params.context, rcache, region); + } +@@ -223,6 +269,7 @@ static void ucs_rcache_invalidate_range(ucs_rcache_t *rcache, ucs_pgt_addr_t sta + ucs_list_for_each_safe(region, tmp, ®ion_list, list) { + /* all regions on the list are in the page table */ + ucs_rcache_region_invalidate(rcache, region, 1, 0); ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_UNMAP_INVALIDATES, 1); + } + } + +@@ -260,10 +307,20 @@ static void ucs_rcache_unmapped_callback(ucm_event_type_t event_type, + ucs_rcache_inv_entry_t *entry; + ucs_pgt_addr_t start, end; + +- ucs_assert(event_type == UCM_EVENT_VM_UNMAPPED); ++ ucs_assert(event_type == UCM_EVENT_VM_UNMAPPED || ++ event_type == UCM_EVENT_MEM_TYPE_FREE); ++ ++ if (event_type == UCM_EVENT_VM_UNMAPPED) { ++ start = (uintptr_t)event->vm_unmapped.address; ++ end = (uintptr_t)event->vm_unmapped.address + event->vm_unmapped.size; ++ } else if(event_type == UCM_EVENT_MEM_TYPE_FREE) { ++ start = (uintptr_t)event->mem_type.address; ++ end = (uintptr_t)event->mem_type.address + event->mem_type.size; ++ } else { ++ ucs_warn("%s: unknown event type: %x", rcache->name, event_type); ++ return; ++ } + +- start = (uintptr_t)event->vm_unmapped.address; +- end = (uintptr_t)event->vm_unmapped.address + event->vm_unmapped.size; + ucs_trace_func("%s: event vm_unmapped 0x%lx..0x%lx", rcache->name, start, end); + + pthread_spin_lock(&rcache->inv_lock); +@@ -273,6 +330,7 @@ static void ucs_rcache_unmapped_callback(ucm_event_type_t event_type, + entry->start = start; + entry->end = end; + ucs_queue_push(&rcache->inv_q, &entry->queue); ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_UNMAPS, 1); + } else { + ucs_error("Failed to allocate invalidation entry for 0x%lx..0x%lx, " + "data corruption may occur", start, end); +@@ -341,6 +399,7 @@ ucs_rcache_check_overlap(ucs_rcache_t *rcache, ucs_pgt_addr_t *start, + return UCS_ERR_ALREADY_EXISTS; + } + ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_MERGES, 1); + /* + * If we don't provide some of the permissions the other region had, + * we might want to expand our permissions to support them. We can +@@ -426,7 +485,9 @@ retry: + /* Found a matching region (it could have been added after we released + * the lock) + */ ++ ucs_rcache_region_validate_pfn(rcache, region); + status = region->status; ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_HITS_SLOW, 1); + goto out_set_region; + } else if (status != UCS_OK) { + /* Could not create a region because there are overlapping regions which +@@ -458,12 +519,15 @@ retry: + /* If memory registration failed, keep the region and mark it as invalid, + * to avoid numerous retries of registering the region. + */ ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_REGS, 1); ++ + region->prot = prot; + region->flags = UCS_RCACHE_REGION_FLAG_PGTABLE; + region->refcount = 1; + region->status = status = + UCS_PROFILE_NAMED_CALL("mem_reg", rcache->params.ops->mem_reg, +- rcache->params.context, rcache, arg, region); ++ rcache->params.context, rcache, arg, region, ++ merged ? UCS_RCACHE_MEM_REG_HIDE_ERRORS : 0); + if (status != UCS_OK) { + if (merged) { + /* failure may be due to merge, because memory of the merged +@@ -477,8 +541,8 @@ retry: + ucs_rcache_region_invalidate(rcache, region, 1, 1); + goto retry; + } else { +- ucs_warn("failed to register region " UCS_PGT_REGION_FMT ": %s", +- UCS_PGT_REGION_ARG(®ion->super), ucs_status_string(status)); ++ ucs_debug("failed to register region " UCS_PGT_REGION_FMT ": %s", ++ UCS_PGT_REGION_ARG(®ion->super), ucs_status_string(status)); + goto out_unlock; + } + } +@@ -486,6 +550,14 @@ retry: + region->flags |= UCS_RCACHE_REGION_FLAG_REGISTERED; + region->refcount = 2; /* Page-table + user */ + ++ if (ucs_global_opts.rcache_check_pfn) { ++ ucs_rcache_region_pfn(region) = ucs_sys_get_pfn(region->super.start); ++ } else { ++ ucs_rcache_region_pfn(region) = 0; ++ } ++ ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_MISSES, 1); ++ + ucs_rcache_region_trace(rcache, region, "created"); + + out_set_region: +@@ -512,6 +584,7 @@ ucs_status_t ucs_rcache_get(ucs_rcache_t *rcache, void *address, size_t length, + length); + + pthread_rwlock_rdlock(&rcache->lock); ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_GETS, 1); + if (ucs_queue_is_empty(&rcache->inv_q)) { + pgt_region = UCS_PROFILE_CALL(ucs_pgtable_lookup, &rcache->pgtable, + start); +@@ -521,7 +594,9 @@ ucs_status_t ucs_rcache_get(ucs_rcache_t *rcache, void *address, size_t length, + ucs_rcache_region_test(region, prot)) + { + ucs_rcache_region_hold(rcache, region); ++ ucs_rcache_region_validate_pfn(rcache, region); + *region_p = region; ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_HITS_FAST, 1); + pthread_rwlock_unlock(&rcache->lock); + return UCS_OK; + } +@@ -541,6 +616,7 @@ ucs_status_t ucs_rcache_get(ucs_rcache_t *rcache, void *address, size_t length, + void ucs_rcache_region_put(ucs_rcache_t *rcache, ucs_rcache_region_t *region) + { + ucs_rcache_region_put_internal(rcache, region, 1, 0); ++ UCS_STATS_UPDATE_COUNTER(rcache->stats, UCS_RCACHE_PUTS, 1); + } + + static UCS_CLASS_INIT_FUNC(ucs_rcache_t, const ucs_rcache_params_t *params, +@@ -565,12 +641,18 @@ static UCS_CLASS_INIT_FUNC(ucs_rcache_t, const ucs_rcache_params_t *params, + goto err; + } + ++ status = UCS_STATS_NODE_ALLOC(&self->stats, &ucs_rcache_stats_class, ++ stats_parent); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ + self->params = *params; + + self->name = strdup(name); + if (self->name == NULL) { + status = UCS_ERR_NO_MEMORY; +- goto err; ++ goto err_destroy_stats; + } + + ret = pthread_rwlock_init(&self->lock, NULL); +@@ -599,13 +681,14 @@ static UCS_CLASS_INIT_FUNC(ucs_rcache_t, const ucs_rcache_params_t *params, + goto err_cleanup_pgtable; + } + +- status = ucm_set_event_handler(UCM_EVENT_VM_UNMAPPED, params->ucm_event_priority, ++ ucs_queue_head_init(&self->inv_q); ++ ++ status = ucm_set_event_handler(params->ucm_events, params->ucm_event_priority, + ucs_rcache_unmapped_callback, self); + if (status != UCS_OK) { + goto err_destroy_mp; + } + +- ucs_queue_head_init(&self->inv_q); + return UCS_OK; + + err_destroy_mp: +@@ -618,13 +701,15 @@ err_destroy_rwlock: + pthread_rwlock_destroy(&self->lock); + err_free_name: + free(self->name); ++err_destroy_stats: ++ UCS_STATS_NODE_FREE(self->stats); + err: + return status; + } + + static UCS_CLASS_CLEANUP_FUNC(ucs_rcache_t) + { +- ucm_unset_event_handler(UCM_EVENT_VM_UNMAPPED, ucs_rcache_unmapped_callback, ++ ucm_unset_event_handler(self->params.ucm_events, ucs_rcache_unmapped_callback, + self); + ucs_rcache_check_inv_queue(self); + ucs_rcache_purge(self); +@@ -633,6 +718,7 @@ static UCS_CLASS_CLEANUP_FUNC(ucs_rcache_t) + ucs_pgtable_cleanup(&self->pgtable); + pthread_spin_destroy(&self->inv_lock); + pthread_rwlock_destroy(&self->lock); ++ UCS_STATS_NODE_FREE(self->stats); + free(self->name); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.h +index 47c8c428e..d9db909b2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache.h +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -39,6 +39,12 @@ enum { + UCS_RCACHE_REGION_FLAG_PGTABLE = UCS_BIT(1) /**< In the page table */ + }; + ++/* ++ * Memory registration flags. ++ */ ++enum { ++ UCS_RCACHE_MEM_REG_HIDE_ERRORS = UCS_BIT(0) /**< Hide errors on memory registration */ ++}; + + /* + * Registration cache operations. +@@ -55,6 +61,7 @@ struct ucs_rcache_ops { + * `region_struct_size' in @ref ucs_rcache_params. + * This function may store relevant information (such + * as memory keys) inside the larger structure. ++ * @param [in] flags Memory registration flags. + * + * @return UCS_OK if registration is successful, error otherwise. + * +@@ -63,7 +70,8 @@ struct ucs_rcache_ops { + * such as error messages or fatal failure. + */ + ucs_status_t (*mem_reg)(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *region); ++ void *arg, ucs_rcache_region_t *region, ++ uint16_t flags); + /** + * Deregister a memory region. + * +@@ -98,6 +106,9 @@ struct ucs_rcache_params { + Must be smaller or equal to + system page size. */ + size_t max_alignment; /**< Maximum alignment */ ++ int ucm_events; /**< UCM events to register. Currently ++ UCM_EVENT_VM_UNMAPPED and ++ UCM_EVENT_MEM_TYPE_FREE are supported */ + int ucm_event_priority; /**< Priority of memory events */ + const ucs_rcache_ops_t *ops; /**< Memory operations functions */ + void *context; /**< User-defined context that will +@@ -113,26 +124,7 @@ struct ucs_rcache_region { + ucs_status_t status; /**< Current status code */ + uint8_t prot; /**< Protection bits */ + uint16_t flags; /**< Status flags. Protected by page table lock. */ +-}; +- +- +-struct ucs_rcache { +- ucs_rcache_params_t params; /**< rcache parameters (immutable) */ +- pthread_rwlock_t lock; /**< Protects the page table and all regions +- whose refcount is 0 */ +- ucs_pgtable_t pgtable; /**< page table to hold the regions */ +- +- pthread_spinlock_t inv_lock; /**< Lock for inv_q and inv_mp. This is a +- separate lock because we may want to put +- regions on inv_q while the page table +- lock is held by the calling context */ +- ucs_queue_head_t inv_q; /**< Regions which were invalidated during +- memory events */ +- ucs_mpool_t inv_mp; /**< Memory pool to allocate entries for inv_q, +- since we cannot use regulat malloc(). +- The backing storage is original mmap() +- which does not generate memory events */ +- char *name; ++ uint64_t priv; /**< Used internally */ + }; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache_int.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache_int.h +new file mode 100644 +index 000000000..2d8d53294 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/rcache_int.h +@@ -0,0 +1,47 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCS_REG_CACHE_INT_H_ ++#define UCS_REG_CACHE_INT_H_ ++ ++/* Names of rcache stats counters */ ++enum { ++ UCS_RCACHE_GETS, /* number of get operations */ ++ UCS_RCACHE_HITS_FAST, /* number of fast path hits */ ++ UCS_RCACHE_HITS_SLOW, /* number of slow path hits */ ++ UCS_RCACHE_MISSES, /* number of misses */ ++ UCS_RCACHE_MERGES, /* number of region merges */ ++ UCS_RCACHE_UNMAPS, /* number of memory unmap events */ ++ UCS_RCACHE_UNMAP_INVALIDATES, /* number of regions invalidated because ++ of unmap events */ ++ UCS_RCACHE_PUTS, /* number of put operations */ ++ UCS_RCACHE_REGS, /* number of memory registrations */ ++ UCS_RCACHE_DEREGS, /* number of memory deregistrations */ ++ UCS_RCACHE_STAT_LAST ++}; ++ ++ ++struct ucs_rcache { ++ ucs_rcache_params_t params; /**< rcache parameters (immutable) */ ++ pthread_rwlock_t lock; /**< Protects the page table and all regions ++ whose refcount is 0 */ ++ ucs_pgtable_t pgtable; /**< page table to hold the regions */ ++ ++ pthread_spinlock_t inv_lock; /**< Lock for inv_q and inv_mp. This is a ++ separate lock because we may want to put ++ regions on inv_q while the page table ++ lock is held by the calling context */ ++ ucs_queue_head_t inv_q; /**< Regions which were invalidated during ++ memory events */ ++ ucs_mpool_t inv_mp; /**< Memory pool to allocate entries for inv_q, ++ since we cannot use regulat malloc(). ++ The backing storage is original mmap() ++ which does not generate memory events */ ++ char *name; ++ UCS_STATS_NODE_DECLARE(stats); ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/string.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/string.c +index d2407e037..5ce1734dc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/string.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/string.c +@@ -162,3 +162,5 @@ char* ucs_strncpy_safe(char *dst, const char *src, size_t len) + dst[length - 1] = '\0'; + return dst; + } ++ ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.c +index 498021e03..fd72d4962 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.c +@@ -27,9 +27,11 @@ + #include + #include + ++#if HAVE_SYS_CAPABILITY_H ++# include ++#endif + + /* Default huge page size is 2 MBytes */ +-#define UCS_DEFAULT_HUGEPAGE_SIZE (2 * UCS_MBYTE) + #define UCS_DEFAULT_MEM_FREE 640000 + #define UCS_PROCESS_MAPS_FILE "/proc/self/maps" + +@@ -403,12 +405,12 @@ size_t ucs_get_page_size() + return page_size; + } + +-size_t ucs_get_meminfo_entry(const char* pattern) ++static ssize_t ucs_get_meminfo_entry(const char* pattern) + { + char buf[256]; + char final_pattern[80]; + int val = 0; +- size_t val_b = 0; ++ ssize_t val_b = -1; + FILE *f; + + f = fopen("/proc/meminfo", "r"); +@@ -432,7 +434,7 @@ size_t ucs_get_memfree_size() + size_t mem_free; + + mem_free = ucs_get_meminfo_entry("MemFree"); +- if (mem_free == 0) { ++ if (mem_free == -1) { + mem_free = UCS_DEFAULT_MEM_FREE; + ucs_info("cannot determine free mem size, using default: %zu", + mem_free); +@@ -441,17 +443,15 @@ size_t ucs_get_memfree_size() + return mem_free; + } + +-size_t ucs_get_huge_page_size() ++ssize_t ucs_get_huge_page_size() + { +- static size_t huge_page_size = 0; ++ static ssize_t huge_page_size = 0; + + /* Cache the huge page size value */ + if (huge_page_size == 0) { + huge_page_size = ucs_get_meminfo_entry("Hugepagesize"); +- if (huge_page_size == 0) { +- huge_page_size = UCS_DEFAULT_HUGEPAGE_SIZE; +- ucs_warn("cannot determine huge page size, using default: %zu", +- huge_page_size); ++ if (huge_page_size == -1) { ++ ucs_debug("huge pages are not supported on the system"); + } else { + ucs_trace("detected huge page size: %zu", huge_page_size); + } +@@ -509,20 +509,137 @@ size_t ucs_get_shmmax() + return size; + } + ++static void ucs_sysv_shmget_error_check_ENOSPC(size_t alloc_size, ++ const struct shminfo *ipc_info, ++ char *buf, size_t max) ++{ ++ unsigned long new_used_ids; ++ unsigned long new_shm_tot; ++ struct shm_info shm_info; ++ char *p, *endp; ++ int ret; ++ ++ p = buf; ++ endp = p + max; ++ ++ ret = shmctl(0, SHM_INFO, (struct shmid_ds *)&shm_info); ++ if (ret >= 0) { ++ return; ++ } ++ ++ new_used_ids = shm_info.used_ids; ++ if (new_used_ids > ipc_info->shmmni) { ++ snprintf(p, endp - p, ++ ", total number of segments in the system (%lu) would exceed the" ++ " limit in /proc/sys/kernel/shmmni (=%lu)", ++ new_used_ids, ipc_info->shmmni); ++ p += strlen(p); ++ } ++ ++ new_shm_tot = shm_info.shm_tot + ++ (alloc_size + ucs_get_page_size() - 1) / ucs_get_page_size(); ++ if (new_shm_tot > ipc_info->shmall) { ++ snprintf(p, endp - p, ++ ", total shared memory pages in the system (%lu) would exceed the" ++ " limit in /proc/sys/kernel/shmall (=%lu)", ++ new_shm_tot, ipc_info->shmall); ++ p += strlen(p); ++ } ++} ++ ++static void ucs_sysv_shmget_error_check_EPERM(int flags, char *buf, size_t max) ++{ ++#if HAVE_SYS_CAPABILITY_H ++ cap_user_header_t hdr = ucs_alloca(sizeof(*hdr)); ++ cap_user_data_t data = ucs_alloca(sizeof(*data) * _LINUX_CAPABILITY_U32S_3); ++ int ret; ++ ++ hdr->pid = 0; /* current thread */ ++ hdr->version = _LINUX_CAPABILITY_VERSION_3; ++ ret = capget(hdr, data); ++ if (ret == 0) { ++ UCS_STATIC_ASSERT(CAP_IPC_LOCK < 32); /* we check this bit in data[0] */ ++ if (!(data->effective & UCS_BIT(CAP_IPC_LOCK))) { ++ /* detected missing CAP_IPC_LOCK */ ++ snprintf(buf, max, ", CAP_IPC_LOCK privilege is needed for SHM_HUGETLB"); ++ } ++ return; ++ } ++ ++ /* log error and fallback to speculative error message */ ++ ucs_debug("capget(pid=%d version=0x%x) failed: %m", hdr->pid, hdr->version); ++#endif ++ ++ snprintf(buf, max, ++ ", please check for CAP_IPC_LOCK privilege for using SHM_HUGETLB"); ++} ++ ++static void ucs_sysv_shmget_format_error(size_t alloc_size, int flags, ++ const char *alloc_name, int sys_errno, ++ char *buf, size_t max) ++{ ++ struct shminfo ipc_info; ++ char *p, *endp, *errp; ++ int ret; ++ ++ buf[0] = '\0'; ++ p = buf; ++ endp = p + max; ++ ++ snprintf(p, endp - p, "shmget(size=%zu flags=0x%x) for %s failed: %s", ++ alloc_size, flags, alloc_name, strerror(sys_errno)); ++ p += strlen(p); ++ errp = p; /* save current string pointer to detect if anything was added */ ++ ++ ret = shmctl(0, IPC_INFO, (struct shmid_ds *)&ipc_info); ++ if (ret >= 0) { ++ if ((sys_errno == EINVAL) && (alloc_size > ipc_info.shmmax)) { ++ snprintf(p, endp - p, ++ ", allocation size exceeds /proc/sys/kernel/shmmax (=%zu)", ++ ipc_info.shmmax); ++ p += strlen(p); ++ } ++ ++ if (sys_errno == ENOSPC) { ++ ucs_sysv_shmget_error_check_ENOSPC(alloc_size, &ipc_info, p, endp - p); ++ p += strlen(p); ++ } ++ } ++ ++ if (sys_errno == EPERM) { ++ ucs_sysv_shmget_error_check_EPERM(flags, p, endp - p); ++ p += strlen(p); ++ } ++ ++ /* default error message if no useful information was added to the string */ ++ if (p == errp) { ++ snprintf(p, endp - p, ", please check shared memory limits by 'ipcs -l'"); ++ p += strlen(p); ++ } ++} ++ + ucs_status_t ucs_sysv_alloc(size_t *size, size_t max_size, void **address_p, +- int flags, int *shmid UCS_MEMTRACK_ARG) ++ int flags, const char *alloc_name, int *shmid) + { +- struct shminfo shminfo, *shminfo_ptr; ++ char error_string[256]; ++ ssize_t huge_page_size; + size_t alloc_size; ++ int sys_errno; + void *ptr; +- int ret, err; ++ int ret; + +- alloc_size = ucs_memtrack_adjust_alloc_size(*size); ++ if (flags & SHM_HUGETLB) { ++ huge_page_size = ucs_get_huge_page_size(); ++ if (huge_page_size <= 0) { ++ ucs_debug("huge pages are not supported on the system"); ++ return UCS_ERR_NO_MEMORY; /* Huge pages not supported */ ++ } ++ } + +- if (flags & SHM_HUGETLB){ +- alloc_size = ucs_align_up(alloc_size, ucs_get_huge_page_size()); ++ if (flags & SHM_HUGETLB) { ++ alloc_size = ucs_align_up(*size, huge_page_size); + } else { +- alloc_size = ucs_align_up(alloc_size, ucs_get_page_size()); ++ alloc_size = ucs_align_up(*size, ucs_get_page_size()); + } + + if (alloc_size >= max_size) { +@@ -532,32 +649,22 @@ ucs_status_t ucs_sysv_alloc(size_t *size, size_t max_size, void **address_p, + flags |= IPC_CREAT | SHM_R | SHM_W; + *shmid = shmget(IPC_PRIVATE, alloc_size, flags); + if (*shmid < 0) { +- switch (errno) { +- case ENFILE: ++ sys_errno = errno; ++ ucs_sysv_shmget_format_error(alloc_size, flags, alloc_name, sys_errno, ++ error_string, sizeof(error_string)); ++ switch (sys_errno) { + case ENOMEM: +- case ENOSPC: + case EPERM: + if (!(flags & SHM_HUGETLB)) { +- err = errno; +- shminfo_ptr = &shminfo; +- if ((shmctl(0, IPC_INFO, (struct shmid_ds *) shminfo_ptr)) > -1) { +- ucs_error("shmget failed: %s. (size=%zu). The max number of shared memory segments in the system is = %ld. " +- "Please try to increase this value through /proc/sys/kernel/shmmni", +- strerror(err), alloc_size, shminfo.shmmni); +- } ++ ucs_error("%s", error_string); + } +- + return UCS_ERR_NO_MEMORY; ++ case ENOSPC: + case EINVAL: +- ucs_error("A new segment was to be created and size < SHMMIN or size > SHMMAX, " +- "or no new segment was to be created. A segment with given key existed, " +- "but size is greater than the size of that segment. " +- "Please check shared memory limits by 'ipcs -l'."); ++ ucs_error("%s", error_string); + return UCS_ERR_NO_MEMORY; + default: +- ucs_error("shmget(size=%zu, flags=0x%x) returned unexpected error: %m. " +- "Please check shared memory limits by 'ipcs -l'.", +- alloc_size, flags); ++ ucs_error("%s", error_string); + return UCS_ERR_SHMEM_SEGMENT; + } + } +@@ -589,10 +696,9 @@ ucs_status_t ucs_sysv_alloc(size_t *size, size_t max_size, void **address_p, + } + } + ++ ucs_memtrack_allocated(ptr, alloc_size UCS_MEMTRACK_VAL); + *address_p = ptr; + *size = alloc_size; +- +- ucs_memtrack_allocated(address_p, size UCS_MEMTRACK_VAL); + return UCS_OK; + } + +@@ -600,7 +706,7 @@ ucs_status_t ucs_sysv_free(void *address) + { + int ret; + +- ucs_memtrack_releasing(&address); ++ ucs_memtrack_releasing(address); + ret = shmdt(address); + if (ret) { + ucs_warn("Unable to detach shared memory segment at %p: %m", address); +@@ -767,6 +873,43 @@ const char* ucs_get_process_cmdline() + return cmdline; + } + ++unsigned long ucs_sys_get_pfn(uintptr_t address) ++{ ++ static const char *pagemap_file = "/proc/self/pagemap"; ++ static int initialized = 0; ++ static int pagemap_fd; ++ uint64_t data; ++ off_t offset; ++ ssize_t ret; ++ ++ if (!initialized) { ++ pagemap_fd = open(pagemap_file, O_RDONLY); ++ if (pagemap_fd < 0) { ++ ucs_warn("failed to open %s: %m", pagemap_file); ++ } ++ initialized = 1; ++ } ++ ++ if (pagemap_fd < 0) { ++ return 0; /* could not open file */ ++ } ++ ++ offset = (address / ucs_get_page_size()) * sizeof(data); ++ data = 0; ++ ret = pread(pagemap_fd, &data, sizeof(data), offset); ++ if (ret < 0) { ++ ucs_warn("pread(file=%s offset=%zu) failed: %m", pagemap_file, offset); ++ return 0; ++ } ++ ++ if (!(data & UCS_BIT(63))) { ++ ucs_trace("address 0x%lx not present", address); ++ return 0; ++ } ++ ++ return data & UCS_MASK(55); ++} ++ + ucs_status_t ucs_sys_fcntl_modfl(int fd, int add, int remove) + { + int oldfl, ret; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.h +index 0bdd3dd6f..43b8ba95e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/sys/sys.h +@@ -164,9 +164,9 @@ size_t ucs_get_page_size(); + + + /** +- * @return Huge page size on the system. ++ * @return Huge page size on the system, or -1 if unsupported. + */ +-size_t ucs_get_huge_page_size(); ++ssize_t ucs_get_huge_page_size(); + + + /** +@@ -184,17 +184,18 @@ size_t ucs_get_phys_mem_size(); + /** + * Allocate shared memory using SystemV API. + * +- * @param size Pointer to memory size to allocate, updated with actual size +- * (rounded up to huge page size or to regular page size). +- * @param max_size maximal size to allocate. If need to allocate more than this, +- * the function fails and returns UCS_ERR_EXCEEDS_LIMIT. +- * @param address_p Filled with allocated memory address. +- * @param flags Flags to indicate the permissions for the allocate memory. +- * (also, whether or not to allocate memory with huge pages). +- * @param shmid Filled with the shmid from the shmget call in the function. ++ * @param size Pointer to memory size to allocate, updated with actual size ++ * (rounded up to huge page size or to regular page size). ++ * @param max_size maximal size to allocate. If need to allocate more than this, ++ * the function fails and returns UCS_ERR_EXCEEDS_LIMIT. ++ * @param address_p Filled with allocated memory address. ++ * @param flags Flags to indicate the permissions for the allocate memory. ++ * (also, whether or not to allocate memory with huge pages). ++ * @param alloc_name Name of memory allocation, for debug/error reporting purposes. ++ * @param shmid Filled with the shmid from the shmget call in the function. + */ + ucs_status_t ucs_sysv_alloc(size_t *size, size_t max_size, void **address_p, +- int flags, int *shimd UCS_MEMTRACK_ARG); ++ int flags, const char *alloc_name, int *shimd); + + + /** +@@ -237,6 +238,17 @@ ucs_status_t ucs_mmap_free(void *address, size_t length); + int ucs_get_mem_prot(unsigned long start, unsigned long end); + + ++/** ++ * Returns the physical page frame number of a given virtual page address. ++ * If the page map file is non-readable (for example, due to permissions), or ++ * the page is not present, this function returns 0. ++ * ++ * @param address Virtual address to get the PFN for ++ * @return PFN number, or 0 if failed. ++ */ ++unsigned long ucs_sys_get_pfn(uintptr_t address); ++ ++ + /** + * Modify file descriptor flags via fcntl(). + * +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/time/timerq.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/time/timerq.c +index 3fe810cdd..311761e0f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/time/timerq.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/time/timerq.c +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + + ucs_status_t ucs_timerq_init(ucs_timer_queue_t *timerq) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/class.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/class.h +index c5352bf61..97010ccb4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/class.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/class.h +@@ -184,8 +184,6 @@ struct ucs_class { + */ + #define UCS_CLASS_CALL_SUPER_INIT(_superclass, ...) \ + { \ +- ucs_assert(*_init_count >= 1); \ +- ucs_assert(&_UCS_CLASS_DECL_NAME(_superclass) == _myclass->superclass); \ + { \ + ucs_status_t status = _UCS_CLASS_INIT_NAME(_superclass)\ + (&self->super, _myclass->superclass, _init_count, ## __VA_ARGS__); \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/component.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/component.h +index e0122bb62..29cef0b46 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/component.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/component.h +@@ -45,6 +45,13 @@ typedef struct ucs_component { + static void UCS_F_CTOR UCS_PP_APPEND_UNIQUE_ID(ucs_initializer)() + + ++/* ++ * Define code which runs at global destructor phase ++ */ ++#define UCS_STATIC_CLEANUP \ ++ static void UCS_F_DTOR UCS_PP_APPEND_UNIQUE_ID(ucs_initializer)() ++ ++ + /** + * Define a list of components for specific base type. + * +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.c +new file mode 100644 +index 000000000..da17059a2 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.c +@@ -0,0 +1,40 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "spinlock.h" ++ ++#include ++#include ++ ++ ++ucs_status_t ucs_spinlock_init(ucs_spinlock_t *lock) ++{ ++ int ret; ++ ++ ret = pthread_spin_init(&lock->lock, 0); ++ if (ret != 0) { ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ lock->count = 0; ++ lock->owner = 0xfffffffful; ++ return UCS_OK; ++} ++ ++void ucs_spinlock_destroy(ucs_spinlock_t *lock) ++{ ++ int ret; ++ ++ if (lock->count != 0) { ++ ucs_warn("destroying spinlock %p with use count %d (owner: 0x%lx)", ++ lock, lock->count, lock->owner); ++ } ++ ++ ret = pthread_spin_destroy(&lock->lock); ++ if (ret != 0) { ++ ucs_warn("failed to destroy spinlock %p: %s", lock, strerror(ret)); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.h +index 2a7d77b55..45ee8d705 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/spinlock.h +@@ -22,31 +22,9 @@ typedef struct ucs_spinlock { + } ucs_spinlock_t; + + +-static inline ucs_status_t ucs_spinlock_init(ucs_spinlock_t *lock) +-{ +- int ret; +- +- ret = pthread_spin_init(&lock->lock, 0); +- if (ret != 0) { +- return UCS_ERR_IO_ERROR; +- } +- +- lock->count = 0; +- lock->owner = 0xfffffffful; +- return UCS_OK; +-} ++ucs_status_t ucs_spinlock_init(ucs_spinlock_t *lock); + +-static inline ucs_status_t ucs_spinlock_destroy(ucs_spinlock_t *lock) +-{ +- int ret; +- +- ret = pthread_spin_destroy(&lock->lock); +- if (ret != 0) { +- return UCS_ERR_IO_ERROR; +- } +- +- return UCS_OK; +-} ++void ucs_spinlock_destroy(ucs_spinlock_t *lock); + + static inline int ucs_spin_is_owner(ucs_spinlock_t *lock, pthread_t self) + { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.c b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.c +index 79b974265..09867872e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.c +@@ -62,6 +62,8 @@ const char *ucs_status_string(ucs_status_t status) + return "User-defined limit was reached"; + case UCS_ERR_UNSUPPORTED: + return "Unsupported operation"; ++ case UCS_ERR_REJECTED: ++ return "Operation rejected by remote peer"; + case UCS_ERR_ENDPOINT_TIMEOUT: + return "Endpoint timeout"; + default: +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.h b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.h +index 2ab165297..e414fe556 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/ucs/type/status.h +@@ -70,6 +70,7 @@ typedef enum { + UCS_ERR_TIMED_OUT = -20, + UCS_ERR_EXCEEDS_LIMIT = -21, + UCS_ERR_UNSUPPORTED = -22, ++ UCS_ERR_REJECTED = -23, + + UCS_ERR_FIRST_LINK_FAILURE = -40, + UCS_ERR_LAST_LINK_FAILURE = -59, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/src/uct/Makefile.am +index 7ef685711..1ca5befc0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/Makefile.am +@@ -29,9 +29,7 @@ noinst_HEADERS = \ + base/uct_iface.h \ + base/uct_log.h \ + base/uct_worker.h \ +- sm/self/self_md.h \ +- sm/self/self_iface.h \ +- sm/self/self_ep.h \ ++ sm/self/self.h \ + tcp/tcp.h + + libuct_la_SOURCES = \ +@@ -39,9 +37,7 @@ libuct_la_SOURCES = \ + base/uct_mem.c \ + base/uct_iface.c \ + base/uct_worker.c \ +- sm/self/self_md.c \ +- sm/self/self_iface.c \ +- sm/self/self_ep.c \ ++ sm/self/self.c \ + tcp/tcp_ep.c \ + tcp/tcp_iface.c \ + tcp/tcp_md.c \ +@@ -69,14 +65,21 @@ libuct_la_CPPFLAGS += \ + + libuct_la_SOURCES += \ + ib/mlx5/ib_mlx5_log.c \ +- ib/mlx5/ib_mlx5.c ++ ib/mlx5/ib_mlx5.c \ ++ ib/mlx5/ib_mlx5_dv.c \ ++ ib/mlx5/ib_mlx5_hw.c + + noinst_HEADERS += \ + ib/mlx5/ib_mlx5_log.h \ + ib/mlx5/ib_mlx5.h \ +- ib/mlx5/ib_mlx5.inl +-endif ++ ib/mlx5/ib_mlx5.inl \ ++ ib/mlx5/ib_mlx5_dv.h \ ++ ib/mlx5/ib_mlx5_hw.h + ++if HAVE_MLX5_DV ++libuct_la_LDFLAGS += $(LIB_MLX5) ++endif ++endif + + if HAVE_TL_RC + noinst_HEADERS += \ +@@ -108,15 +111,21 @@ endif + if HAVE_TL_DC + noinst_HEADERS += \ + ib/dc/base/dc_iface.h \ +- ib/dc/base/dc_ep.h \ +- ib/dc/verbs/dc_verbs.h ++ ib/dc/base/dc_ep.h + + libuct_la_SOURCES += \ + ib/dc/base/dc_iface.c \ +- ib/dc/base/dc_ep.c \ ++ ib/dc/base/dc_ep.c ++ ++if HAVE_DC_EXP ++noinst_HEADERS += \ ++ ib/dc/verbs/dc_verbs.h ++ ++libuct_la_SOURCES += \ + ib/dc/verbs/dc_verbs.c ++endif + +-if HAVE_MLX5_HW ++if HAVE_MLX5_HW_DC + noinst_HEADERS += \ + ib/dc/accel/dc_mlx5.h + +@@ -141,7 +150,7 @@ noinst_HEADERS += \ + ib/ud/base/ud_inl.h \ + ib/ud/verbs/ud_verbs.h + +-if HAVE_MLX5_HW ++if HAVE_MLX5_HW_UD + noinst_HEADERS += \ + ib/ud/accel/ud_mlx5_common.h \ + ib/ud/accel/ud_mlx5.h +@@ -225,18 +234,36 @@ libuct_la_SOURCES += \ + cuda/gdr_copy/gdr_copy_ep.c + endif + noinst_HEADERS += \ ++ cuda/base/cuda_md.h \ ++ cuda/base/cuda_iface.h \ + cuda/cuda_copy/cuda_copy_md.h \ + cuda/cuda_copy/cuda_copy_iface.h \ + cuda/cuda_copy/cuda_copy_ep.h + + libuct_la_SOURCES += \ ++ cuda/base/cuda_md.c \ + cuda/cuda_copy/cuda_copy_md.c \ + cuda/cuda_copy/cuda_copy_iface.c \ + cuda/cuda_copy/cuda_copy_ep.c + ++noinst_HEADERS += \ ++ cuda/cuda_ipc/cuda_ipc_md.h \ ++ cuda/cuda_ipc/cuda_ipc_iface.h \ ++ cuda/cuda_ipc/cuda_ipc_ep.h \ ++ cuda/cuda_ipc/cuda_ipc_cache.h ++ ++libuct_la_SOURCES += \ ++ cuda/cuda_ipc/cuda_ipc_md.c \ ++ cuda/cuda_ipc/cuda_ipc_iface.c \ ++ cuda/cuda_ipc/cuda_ipc_ep.c \ ++ cuda/cuda_ipc/cuda_ipc_cache.c ++ + endif + + if HAVE_ROCM ++libuct_la_CPPFLAGS += $(ROCM_CPPFLAGS) ++libuct_la_LDFLAGS += $(ROCM_LDFLAGS) $(ROCM_LIBS) ++ + noinst_HEADERS += \ + rocm/rocm_cma_md.h \ + rocm/rocm_cma_iface.h \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/tl.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/tl.h +index c6d078ced..2f51e3aee 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/tl.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/tl.h +@@ -42,6 +42,9 @@ typedef struct uct_iface_ops { + + /* endpoint - get */ + ++ ucs_status_t (*ep_get_short)(uct_ep_h ep, void *buffer, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ + ucs_status_t (*ep_get_bcopy)(uct_ep_h ep, uct_unpack_callback_t unpack_cb, + void *arg, size_t length, + uint64_t remote_addr, uct_rkey_t rkey, +@@ -67,36 +70,28 @@ typedef struct uct_iface_ops { + + /* endpoint - atomics */ + +- ucs_status_t (*ep_atomic_add64)(uct_ep_h ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +- +- ucs_status_t (*ep_atomic_fadd64)(uct_ep_h ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- +- ucs_status_t (*ep_atomic_swap64)(uct_ep_h ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- + ucs_status_t (*ep_atomic_cswap64)(uct_ep_h ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp); + +- ucs_status_t (*ep_atomic_add32)(uct_ep_h ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +- +- ucs_status_t (*ep_atomic_fadd32)(uct_ep_h ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); +- +- ucs_status_t (*ep_atomic_swap32)(uct_ep_h ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); +- + ucs_status_t (*ep_atomic_cswap32)(uct_ep_h ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp); + ++ ucs_status_t (*ep_atomic32_post)(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ ++ ucs_status_t (*ep_atomic64_post)(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ ++ ucs_status_t (*ep_atomic32_fetch)(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint32_t *result, uint64_t remote_addr, ++ uct_rkey_t rkey, uct_completion_t *comp); ++ ++ ucs_status_t (*ep_atomic64_fetch)(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t *result, uint64_t remote_addr, ++ uct_rkey_t rkey, uct_completion_t *comp); ++ + /* endpoint - tagged operations */ + + ucs_status_t (*ep_tag_eager_short)(uct_ep_h ep, uct_tag_t tag, +@@ -137,7 +132,8 @@ typedef struct uct_iface_ops { + + /* endpoint - pending queue */ + +- ucs_status_t (*ep_pending_add)(uct_ep_h ep, uct_pending_req_t *n); ++ ucs_status_t (*ep_pending_add)(uct_ep_h ep, uct_pending_req_t *n, ++ unsigned flags); + + void (*ep_pending_purge)(uct_ep_h ep, uct_pending_purge_callback_t cb, + void *arg); +@@ -162,8 +158,8 @@ typedef struct uct_iface_ops { + + ucs_status_t (*ep_create_sockaddr)(uct_iface_h iface, + const ucs_sock_addr_t *sockaddr, +- const void *priv_data, size_t length, +- uct_ep_h *ep_p); ++ uct_sockaddr_priv_pack_callback_t pack_cb, ++ void *arg, uint32_t cb_flags, uct_ep_h *ep_p); + + void (*ep_destroy)(uct_ep_h ep); + +@@ -173,6 +169,12 @@ typedef struct uct_iface_ops { + const uct_device_addr_t *dev_addr, + const uct_ep_addr_t *ep_addr); + ++ ucs_status_t (*iface_accept)(uct_iface_h iface, ++ uct_conn_request_h conn_request); ++ ++ ucs_status_t (*iface_reject)(uct_iface_h iface, ++ uct_conn_request_h conn_request); ++ + /* interface - synchronization */ + + ucs_status_t (*iface_flush)(uct_iface_h iface, unsigned flags, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct.h +index 9993cad6f..12cbfc73f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct.h +@@ -149,6 +149,24 @@ typedef struct uct_tl_resource_desc { + #define UCT_TL_RESOURCE_DESC_ARG(_resource) (_resource)->tl_name, (_resource)->dev_name + + ++/** ++ * @brief Atomic operation requested for uct_ep_atomic32_post, uct_ep_atomic64_post, ++ * uct_ep_atomic32_fetch and uct_ep_atomic64_fetch. ++ * ++ * This enumeration defines which atomic memory operation should be ++ * performed by the uct_ep_atomic family of fuctions. ++ */ ++typedef enum uct_atomic_op { ++ UCT_ATOMIC_OP_ADD, /**< Atomic add */ ++ UCT_ATOMIC_OP_AND, /**< Atomic and */ ++ UCT_ATOMIC_OP_OR, /**< Atomic or */ ++ UCT_ATOMIC_OP_XOR, /**< Atomic xor */ ++ UCT_ATOMIC_OP_SWAP, /**< Atomic swap */ ++ UCT_ATOMIC_OP_CSWAP, /**< Atomic compare-and-swap */ ++ UCT_ATOMIC_OP_LAST ++} uct_atomic_op_t; ++ ++ + /** + * @defgroup UCT_RESOURCE_IFACE_CAP UCT interface operations and capabilities + * @ingroup UCT_RESOURCE +@@ -176,16 +194,6 @@ typedef struct uct_tl_resource_desc { + #define UCT_IFACE_FLAG_GET_BCOPY UCS_BIT(9) /**< Buffered get */ + #define UCT_IFACE_FLAG_GET_ZCOPY UCS_BIT(10) /**< Zero-copy get */ + +- /* Atomic operations capabilities */ +-#define UCT_IFACE_FLAG_ATOMIC_ADD32 UCS_BIT(16) /**< 32bit atomic add */ +-#define UCT_IFACE_FLAG_ATOMIC_ADD64 UCS_BIT(17) /**< 64bit atomic add */ +-#define UCT_IFACE_FLAG_ATOMIC_FADD32 UCS_BIT(18) /**< 32bit atomic fetch-and-add */ +-#define UCT_IFACE_FLAG_ATOMIC_FADD64 UCS_BIT(19) /**< 64bit atomic fetch-and-add */ +-#define UCT_IFACE_FLAG_ATOMIC_SWAP32 UCS_BIT(20) /**< 32bit atomic swap */ +-#define UCT_IFACE_FLAG_ATOMIC_SWAP64 UCS_BIT(21) /**< 64bit atomic swap */ +-#define UCT_IFACE_FLAG_ATOMIC_CSWAP32 UCS_BIT(22) /**< 32bit atomic compare-and-swap */ +-#define UCT_IFACE_FLAG_ATOMIC_CSWAP64 UCS_BIT(23) /**< 64bit atomic compare-and-swap */ +- + /* Atomic operations domain */ + #define UCT_IFACE_FLAG_ATOMIC_CPU UCS_BIT(30) /**< Atomic communications are consistent + with respect to CPU operations. */ +@@ -330,22 +338,23 @@ enum uct_msg_flags { + * @brief Callback flags. + * + * List of flags for a callback. +- * A callback must have either the SYNC or ASYNC flag set. + */ + enum uct_cb_flags { +- UCT_CB_FLAG_SYNC = UCS_BIT(1), /**< Callback is always invoked from the context (thread, process) +- that called uct_iface_progress(). An interface must +- have the @ref UCT_IFACE_FLAG_CB_SYNC flag set to support sync +- callback invocation. */ +- +- UCT_CB_FLAG_ASYNC = UCS_BIT(2) /**< Callback may be invoked from any context. For example, +- it may be called from a transport async progress thread. To guarantee +- async invocation, the interface must have the @ref UCT_IFACE_FLAG_CB_ASYNC +- flag set. +- If async callback is requested on an interface +- which only supports sync callback +- (i.e., only the @ref UCT_IFACE_FLAG_CB_SYNC flag is set), +- it will behave exactly like a sync callback. */ ++ UCT_CB_FLAG_RESERVED = UCS_BIT(1), /**< Reserved for future use. */ ++ UCT_CB_FLAG_ASYNC = UCS_BIT(2) /**< Callback may be invoked from any ++ context (thread, process). For ++ example, it may be called from a ++ transport async progress thread. To ++ guarantee async invocation, the ++ interface must have the @ref ++ UCT_IFACE_FLAG_CB_ASYNC flag set. If ++ async callback is requested on an ++ interface which only supports sync ++ callback (i.e., only the @ref ++ UCT_IFACE_FLAG_CB_SYNC flag is set), ++ the callback may be invoked only ++ from the context that called @ref ++ uct_iface_progress). */ + }; + + +@@ -406,6 +415,7 @@ enum { + typedef enum { + UCT_MD_MEM_TYPE_HOST = 0, /**< Default system memory */ + UCT_MD_MEM_TYPE_CUDA, /**< NVIDIA CUDA memory */ ++ UCT_MD_MEM_TYPE_CUDA_MANAGED, /**< NVIDIA CUDA managed (or unified) memory*/ + UCT_MD_MEM_TYPE_LAST + } uct_memory_type_t; + +@@ -415,17 +425,21 @@ typedef enum { + * @brief Memory allocation/registration flags. + */ + enum uct_md_mem_flags { +- UCT_MD_MEM_FLAG_NONBLOCK = UCS_BIT(0), /**< Hint to perform non-blocking +- allocation/registration: page +- mapping may be deferred until +- it is accessed by the CPU or a +- transport. */ +- UCT_MD_MEM_FLAG_FIXED = UCS_BIT(1), /**< Place the mapping at exactly +- defined address */ +- UCT_MD_MEM_FLAG_LOCK = UCS_BIT(2), /**< Registered memory should be +- locked. May incur extra cost for +- registration, but memory access +- is usually faster. */ ++ UCT_MD_MEM_FLAG_NONBLOCK = UCS_BIT(0), /**< Hint to perform non-blocking ++ allocation/registration: page ++ mapping may be deferred until ++ it is accessed by the CPU or a ++ transport. */ ++ UCT_MD_MEM_FLAG_FIXED = UCS_BIT(1), /**< Place the mapping at exactly ++ defined address */ ++ UCT_MD_MEM_FLAG_LOCK = UCS_BIT(2), /**< Registered memory should be ++ locked. May incur extra cost for ++ registration, but memory access ++ is usually faster. */ ++ UCT_MD_MEM_FLAG_HIDE_ERRORS = UCS_BIT(3), /**< Hide errors on memory registration. ++ In some cases registration failure ++ is not an error (e. g. for merged ++ memory regions). */ + + /* memory access flags */ + UCT_MD_MEM_ACCESS_REMOTE_PUT = UCS_BIT(5), /**< enable remote put access */ +@@ -494,6 +508,7 @@ struct uct_iface_attr { + } put; /**< Attributes for PUT operations */ + + struct { ++ size_t max_short; /**< Maximal size for get_short */ + size_t max_bcopy; /**< Maximal size for get_bcopy */ + size_t min_zcopy; /**< Minimal size for get_zcopy (total + of @ref uct_iov_t::length of the +@@ -561,6 +576,11 @@ struct uct_iface_attr { + } rndv; /**< Attributes related to rendezvous protocol */ + } tag; /**< Attributes for TAG operations */ + ++ struct { ++ uint64_t op_flags; /**< Attributes for atomic-post operations */ ++ uint64_t fop_flags; /**< Attributes for atomic-fetch operations */ ++ } atomic32, atomic64; /**< Attributes for atomic operations */ ++ + uint64_t flags; /**< Flags from @ref UCT_RESOURCE_IFACE_CAP */ + } cap; /**< Interface capabilities */ + +@@ -633,6 +653,9 @@ struct uct_iface_params { + void *err_handler_arg; + /** The callback to handle transport level error.*/ + uct_error_handler_t err_handler; ++ /** Callback flags to indicate where the @a err_handler callback can be ++ * invoked from. @ref uct_cb_flags */ ++ uint32_t err_handler_flags; + + /** These callbacks are only relevant for HW Tag Matching */ + void *eager_arg; +@@ -889,9 +912,7 @@ void uct_release_tl_resource_list(uct_tl_resource_desc_t *resources); + * Transports can allocate separate communication resources for every worker, + * so that every worker can be progressed independently of others. + * +- * @param [in] async Context for async event handlers. +- * Can be NULL, which means that event handlers will +- * not have particular context. ++ * @param [in] async Context for async event handlers. Must not be NULL. + * @param [in] thread_mode Thread access mode to the worker and all interfaces + * and endpoints associated with it. + * @param [out] worker_p Filled with a pointer to the worker object. +@@ -1004,19 +1025,6 @@ ucs_status_t uct_md_iface_config_read(uct_md_h md, const char *tl_name, + void uct_config_release(void *config); + + +-/** +- * @ingroup UCT_RESOURCE +- * @brief Print interface/MD configuration to a stream. +- * +- * @param [in] config Configuration to print. +- * @param [in] stream Output stream to print to. +- * @param [in] title Title to the output. +- * @param [in] print_flags Controls how the configuration is printed. +- */ +-void uct_config_print(const void *config, FILE *stream, const char *title, +- ucs_config_print_flags_t print_flags); +- +- + /** + * @ingroup UCT_CONTEXT + * @brief Get value by name from interface/MD configuration. +@@ -1161,8 +1169,8 @@ ucs_status_t uct_ep_check(const uct_ep_h ep, unsigned flags, + * @ingroup UCT_RESOURCE + * @brief Obtain a notification file descriptor for polling. + * +- * Only interfaces supporting the @ref UCT_IFACE_FLAG_EVENT_FD implement this +- * function. ++ * Only interfaces that support at least one of the UCT_IFACE_FLAG_EVENT* flags ++ * will implement this function. + * + * @param [in] iface Interface to get the notification descriptor. + * @param [out] fd_p Location to write the notification file descriptor. +@@ -1260,6 +1268,37 @@ ucs_status_t uct_iface_set_am_tracer(uct_iface_h iface, uct_am_tracer_t tracer, + void *arg); + + ++/** ++ * @ingroup UCT_RESOURCE ++ * @brief Accept connection request. ++ * ++ * @param [in] iface Transport interface which generated connection ++ * request @a conn_request. ++ * @param [in] conn_request Connection establishment request passed as parameter ++ * of @ref uct_sockaddr_conn_request_callback_t. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t uct_iface_accept(uct_iface_h iface, ++ uct_conn_request_h conn_request); ++ ++ ++/** ++ * @ingroup UCT_RESOURCE ++ * @brief Reject connection request. Will invoke an error handler @ref ++ * uct_error_handler_t on the remote transport interface, if set. ++ * ++ * @param [in] iface Interface which generated connection establishment ++ * request @a conn_request. ++ * @param [in] conn_request Connection establishment request passed as parameter ++ * of @ref uct_sockaddr_conn_request_callback_t. ++ * ++ * @return Error code as defined by @ref ucs_status_t ++ */ ++ucs_status_t uct_iface_reject(uct_iface_h iface, ++ uct_conn_request_h conn_request); ++ ++ + /** + * @ingroup UCT_RESOURCE + * @brief Create new endpoint. +@@ -1327,32 +1366,39 @@ ucs_status_t uct_ep_connect_to_ep(uct_ep_h ep, const uct_device_addr_t *dev_addr + * + * This routine will create an endpoint for a connection to the remote peer, + * specified by its socket address. +- * The user may provide private data to be sent on a connection request to the +- * remote peer. ++ * The user may provide a callback function which will be used to fill the ++ * private data that will be sent on a connection request to the remote peer. ++ * ++ * @note It is never guaranteed that the callaback will be called. ++ * If, for example, the endpoint goes into error state before issuing the ++ * connection request, the callback will not be invoked. + * + * @note The interface in this routine requires the + * @ref UCT_IFACE_FLAG_CONNECT_TO_SOCKADDR capability. + * +- * @param [in] iface Interface to create the endpoint on. +- * @param [in] sockaddr The sockaddr to connect to on the remote peer. +- * @param [in] priv_data User's private data for connecting to the +- * remote peer. +- * @param [in] length Length of the private data. +- * @param [out] ep_p Handle to the created endpoint. +- * +- * @return UCS_OK - Connection request was sent to the server. +- * This does not guarantee that the server has +- * received the message; in case of failure, the +- * error will be reported to the interface error +- * handler callback provided to @ref uct_iface_open +- * via @ref uct_iface_params_t.err_handler. +- * +- * @return error code - In case of an error. (@ref ucs_status_t) ++ * @param [in] iface Interface to create the endpoint on. ++ * @param [in] sockaddr The sockaddr to connect to on the remote peer. ++ * @param [in] pack_cb Callback for filling the user's private data. ++ * @param [in] arg User defined argument for the callback. ++ * @param [in] cb_flags Required @ref uct_cb_flags "callback flags" to ++ * indicate where the ++ * @ref uct_sockaddr_priv_pack_callback_t ++ * callback can be invoked from. ++ * @param [out] ep_p Handle to the created endpoint. ++ * ++ * @return UCS_OK Connection request was sent to the server. ++ * This does not guarantee that the server has ++ * received the message; in case of failure, the ++ * error will be reported to the interface error ++ * handler callback provided to @ref uct_iface_open ++ * via @ref uct_iface_params_t.err_handler. ++ * ++ * @return error code In case of an error. (@ref ucs_status_t) + */ + ucs_status_t uct_ep_create_sockaddr(uct_iface_h iface, + const ucs_sock_addr_t *sockaddr, +- const void *priv_data, size_t length, +- uct_ep_h *ep_p); ++ uct_sockaddr_priv_pack_callback_t pack_cb, ++ void *arg, uint32_t cb_flags, uct_ep_h *ep_p); + + + /** +@@ -1452,7 +1498,7 @@ ucs_status_t uct_md_mem_dereg(uct_md_h md, uct_mem_h memh); + * @return Nonzero if memory is owned, 0 if not owned + * + * @param [in] md Memory domain to detect if memory belongs to. +- * @param [in] address Memory address to detect. ++ * @param [in] addr Memory address to detect. + * @param [in] length Size of memory + */ + int uct_md_is_mem_type_owned(uct_md_h md, void *addr, size_t length); +@@ -1463,7 +1509,7 @@ int uct_md_is_mem_type_owned(uct_md_h md, void *addr, size_t length); + * + * Allocate potentially registered memory. Every one of the provided allocation + * methods will be used, in turn, to perform the allocation, until one succeeds. +- * Whenever the MD method is encountered, every one of the provided MDs will be ++ * Whenever the MD method is encountered, every one of the provided MDs will be + * used, in turn, to allocate the memory, until one succeeds, or they are + * exhausted. In this case the next allocation method from the initial list will + * be attempted. +@@ -1761,6 +1807,17 @@ UCT_INLINE_API ucs_status_t uct_ep_put_zcopy(uct_ep_h ep, + } + + ++/** ++ * @ingroup UCT_RMA ++ * @brief ++ */ ++UCT_INLINE_API ucs_status_t uct_ep_get_short(uct_ep_h ep, void *buffer, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey) ++{ ++ return ep->iface->ops.ep_get_short(ep, buffer, length, remote_addr, rkey); ++} ++ ++ + /** + * @ingroup UCT_RMA + * @brief +@@ -1882,34 +1939,11 @@ UCT_INLINE_API ucs_status_t uct_ep_am_zcopy(uct_ep_h ep, uint8_t id, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_add64(uct_ep_h ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) +-{ +- return ep->iface->ops.ep_atomic_add64(ep, add, remote_addr, rkey); +-} +- +- +-/** +- * @ingroup UCT_AMO +- * @brief +- */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_fadd64(uct_ep_h ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return ep->iface->ops.ep_atomic_fadd64(ep, add, remote_addr, rkey, result, comp); +-} +- +- +-/** +- * @ingroup UCT_AMO +- * @brief +- */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_swap64(uct_ep_h ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap64(uct_ep_h ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp) + { +- return ep->iface->ops.ep_atomic_swap64(ep, swap, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic_cswap64(ep, compare, swap, remote_addr, rkey, result, comp); + } + + +@@ -1917,11 +1951,11 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_swap64(uct_ep_h ep, uint64_t swap, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap64(uct_ep_h ep, uint64_t compare, uint64_t swap, ++UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap32(uct_ep_h ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ uint32_t *result, uct_completion_t *comp) + { +- return ep->iface->ops.ep_atomic_cswap64(ep, compare, swap, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic_cswap32(ep, compare, swap, remote_addr, rkey, result, comp); + } + + +@@ -1929,10 +1963,11 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap64(uct_ep_h ep, uint64_t compare, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_add32(uct_ep_h ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++UCT_INLINE_API ucs_status_t uct_ep_atomic32_post(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint64_t remote_addr, ++ uct_rkey_t rkey) + { +- return ep->iface->ops.ep_atomic_add32(ep, add, remote_addr, rkey); ++ return ep->iface->ops.ep_atomic32_post(ep, opcode, value, remote_addr, rkey); + } + + +@@ -1940,11 +1975,11 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_add32(uct_ep_h ep, uint32_t add, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_fadd32(uct_ep_h ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++UCT_INLINE_API ucs_status_t uct_ep_atomic64_post(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t remote_addr, ++ uct_rkey_t rkey) + { +- return ep->iface->ops.ep_atomic_fadd32(ep, add, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic64_post(ep, opcode, value, remote_addr, rkey); + } + + +@@ -1952,11 +1987,13 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_fadd32(uct_ep_h ep, uint32_t add, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_swap32(uct_ep_h ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++UCT_INLINE_API ucs_status_t uct_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return ep->iface->ops.ep_atomic_swap32(ep, swap, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic32_fetch(ep, opcode, value, result, ++ remote_addr, rkey, comp); + } + + +@@ -1964,11 +2001,13 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_swap32(uct_ep_h ep, uint32_t swap, + * @ingroup UCT_AMO + * @brief + */ +-UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap32(uct_ep_h ep, uint32_t compare, uint32_t swap, ++UCT_INLINE_API ucs_status_t uct_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ uct_completion_t *comp) + { +- return ep->iface->ops.ep_atomic_cswap32(ep, compare, swap, remote_addr, rkey, result, comp); ++ return ep->iface->ops.ep_atomic64_fetch(ep, opcode, value, result, ++ remote_addr, rkey, comp); + } + + +@@ -1985,15 +2024,18 @@ UCT_INLINE_API ucs_status_t uct_ep_atomic_cswap32(uct_ep_h ep, uint32_t compare, + * the "func" field. + * After passed to the function, the request is owned by UCT, + * until the callback is called and returns UCS_OK. ++ * @param [in] flags Reserved for future use. + * + * @return UCS_OK - request added to pending queue + * UCS_ERR_BUSY - request was not added to pending queue, because send + * resources are available now. The user is advised to + * retry. + */ +-UCT_INLINE_API ucs_status_t uct_ep_pending_add(uct_ep_h ep, uct_pending_req_t *req) ++UCT_INLINE_API ucs_status_t uct_ep_pending_add(uct_ep_h ep, ++ uct_pending_req_t *req, ++ unsigned flags) + { +- return ep->iface->ops.ep_pending_add(ep, req); ++ return ep->iface->ops.ep_pending_add(ep, req, flags); + } + + +@@ -2402,7 +2444,8 @@ UCT_INLINE_API void uct_iface_progress_disable(uct_iface_h iface, unsigned flags + + + /** +- * Perform a progress on an interface. ++ * @ingroup UCT_RESOURCE ++ * @brief Perform a progress on an interface. + */ + UCT_INLINE_API unsigned uct_iface_progress(uct_iface_h iface) + { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct_def.h +index 241618b9c..bf1f7f3b9 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/api/uct_def.h +@@ -18,7 +18,7 @@ + #define UCT_MD_COMPONENT_NAME_MAX 8 + #define UCT_MD_NAME_MAX 16 + #define UCT_DEVICE_NAME_MAX 32 +-#define UCT_PENDING_REQ_PRIV_LEN 32 ++#define UCT_PENDING_REQ_PRIV_LEN 40 + #define UCT_TAG_PRIV_LEN 32 + #define UCT_AM_ID_BITS 5 + #define UCT_AM_ID_MAX UCS_BIT(UCT_AM_ID_BITS) +@@ -91,6 +91,7 @@ typedef struct uct_ep_addr uct_ep_addr_t; + typedef struct uct_tag_context uct_tag_context_t; + typedef uint64_t uct_tag_t; /* tag type - 64 bit */ + typedef int uct_worker_cb_id_t; ++typedef void* uct_conn_request_h; + /** + * @} + */ +@@ -139,7 +140,7 @@ typedef struct uct_iov { + * @brief Callback to process incoming active message + * + * When the callback is called, @a flags indicates how @a data should be handled. +- * If @a flags contain @ref UCT_CB_FLAG_DESC value, it means @a data is part of ++ * If @a flags contain @ref UCT_CB_PARAM_FLAG_DESC value, it means @a data is part of + * a descriptor which must be released later by @ref uct_iface_release_desc by + * the user if the callback returns @ref UCS_INPROGRESS. + * +@@ -156,7 +157,7 @@ typedef struct uct_iov { + * by the caller. + * @retval UCS_INPROGRESS - descriptor is owned by the callee, and would be + * released later. Supported only if @a flags contain +- * @ref UCT_CB_FLAG_DESC value. Otherwise, this is ++ * @ref UCT_CB_PARAM_FLAG_DESC value. Otherwise, this is + * an error. + * + */ +@@ -280,23 +281,56 @@ typedef void (*uct_unpack_callback_t)(void *arg, const void *data, size_t length + * Other than communication progress routines, it is allowed to call other UCT + * communication routines from this callback. + * ++ * @param [in] iface Transport interface. + * @param [in] arg User defined argument for this callback. ++ * @param [in] conn_request Transport level connection request. The user ++ * should accept or reject the request by calling ++ * @ref uct_iface_accept or @ref uct_iface_reject ++ * routines respectively. + * @param [in] conn_priv_data Points to the received data. + * This is the private data that was passed to the + * @ref uct_ep_create_sockaddr function on the + * client side. + * @param [in] length Length of the received data. + * +- * @retval UCS_OK - the server will accept the connection request from +- * the client. +- * @retval Otherwise - the server will reject the connection request from +- * the client which will invoke the error handling flow +- * on the client side. +- * + */ +-typedef ucs_status_t (*uct_sockaddr_conn_request_callback_t)(void *arg, +- const void *conn_priv_data, +- size_t length); ++typedef void ++(*uct_sockaddr_conn_request_callback_t)(uct_iface_h iface, void *arg, ++ uct_conn_request_h conn_request, ++ const void *conn_priv_data, ++ size_t length); ++ ++ ++/** ++ * @ingroup UCT_RESOURCE ++ * @brief Callback to fill the user's private data on the client side. ++ * ++ * This callback routine will be invoked on the client side before sending the ++ * transport's connection request to the server. ++ * The callback routine must be set by the client when creating an endpoint. ++ * The user's private data should be placed inside the priv_data buffer to be ++ * sent to the server side. ++ * The maximal allowed length of the private data is indicated by the field ++ * max_conn_priv inside @ref uct_iface_attr. ++ * Communication progress routines should not be called from this callback. ++ * It is allowed to call other UCT communication routines from this callback. ++ * ++ * @param [in] arg User defined argument for this callback. ++ * @param [in] dev_name Device name. This routine may fill the user's private ++ * data according to the given device name. ++ * The device name that is passed to this routine, ++ * corresponds to the dev_name field inside ++ * @ref uct_tl_resource_desc_t as returned from ++ * @ref uct_md_query_tl_resources. ++ * @param [out] priv_data User's private data to be passed to the server side. ++ * ++ * @return Negative value indicates an error according to @ref ucs_status_t. ++ * On success, non-negative value indicates actual number of ++ * bytes written to the @a priv_data buffer. ++ */ ++typedef ssize_t (*uct_sockaddr_priv_pack_callback_t)(void *arg, ++ const char *dev_name, ++ void *priv_data); + + + /** +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.c +index c62310356..e777e78bb 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.c +@@ -22,6 +22,9 @@ static ucs_stats_class_t uct_ep_stats_class = { + [UCT_EP_STAT_PUT] = "put", + [UCT_EP_STAT_GET] = "get", + [UCT_EP_STAT_ATOMIC] = "atomic", ++#if IBV_EXP_HW_TM ++ [UCT_EP_STAT_TAG] = "tag", ++#endif + [UCT_EP_STAT_BYTES_SHORT] = "bytes_short", + [UCT_EP_STAT_BYTES_BCOPY] = "bytes_bcopy", + [UCT_EP_STAT_BYTES_ZCOPY] = "bytes_zcopy", +@@ -81,20 +84,17 @@ ucs_status_t uct_iface_set_am_handler(uct_iface_h tl_iface, uint8_t id, + return UCS_OK; + } + +- if (!(flags & (UCT_CB_FLAG_SYNC|UCT_CB_FLAG_ASYNC))) { +- ucs_error("invalid active message flags 0x%x", flags); +- return UCS_ERR_INVALID_PARAM; +- } +- + status = uct_iface_query(tl_iface, &attr); + if (status != UCS_OK) { + return status; + } + ++ UCT_CB_FLAGS_CHECK(flags); ++ + /* If user wants a synchronous callback, it must be supported, or the + * callback could be called from another thread. + */ +- if ((flags & UCT_CB_FLAG_SYNC) && !(attr.cap.flags & UCT_IFACE_FLAG_CB_SYNC)) { ++ if (!(flags & UCT_CB_FLAG_ASYNC) && !(attr.cap.flags & UCT_IFACE_FLAG_CB_SYNC)) { + ucs_error("Synchronous callback requested, but not supported"); + return UCS_ERR_INVALID_PARAM; + } +@@ -329,19 +329,18 @@ ucs_status_t uct_set_ep_failed(ucs_class_t *cls, uct_ep_h tl_ep, + ops->ep_put_short = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_put_bcopy = (void*)ucs_empty_function_return_bc_ep_timeout; + ops->ep_put_zcopy = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_get_short = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_get_bcopy = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_get_zcopy = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_am_short = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_am_bcopy = (void*)ucs_empty_function_return_bc_ep_timeout; + ops->ep_am_zcopy = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_add64 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_fadd64 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_swap64 = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_atomic_cswap64 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_add32 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_fadd32 = (void*)ucs_empty_function_return_ep_timeout; +- ops->ep_atomic_swap32 = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_atomic_cswap32 = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_atomic64_post = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_atomic32_post = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_atomic64_fetch = (void*)ucs_empty_function_return_ep_timeout; ++ ops->ep_atomic32_fetch = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_tag_eager_short = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_tag_eager_bcopy = (void*)ucs_empty_function_return_ep_timeout; + ops->ep_tag_eager_zcopy = (void*)ucs_empty_function_return_ep_timeout; +@@ -410,13 +409,16 @@ UCS_CLASS_INIT_FUNC(uct_base_iface_t, uct_iface_ops_t *ops, uct_md_h md, + + UCS_CLASS_CALL_SUPER_INIT(uct_iface_t, ops); + +- self->md = md; +- self->worker = ucs_derived_of(worker, uct_priv_worker_t); +- self->am_tracer = NULL; +- self->am_tracer_arg = NULL; +- self->err_handler = params->err_handler; +- self->err_handler_arg = params->err_handler_arg; +- self->progress_flags = 0; ++ UCT_CB_FLAGS_CHECK(params->err_handler_flags); ++ ++ self->md = md; ++ self->worker = ucs_derived_of(worker, uct_priv_worker_t); ++ self->am_tracer = NULL; ++ self->am_tracer_arg = NULL; ++ self->err_handler = params->err_handler; ++ self->err_handler_flags = params->err_handler_flags; ++ self->err_handler_arg = params->err_handler_arg; ++ self->progress_flags = 0; + uct_worker_progress_init(&self->prog); + + for (id = 0; id < UCT_AM_ID_MAX; ++id) { +@@ -452,6 +454,20 @@ static UCS_CLASS_CLEANUP_FUNC(uct_base_iface_t) + UCS_CLASS_DEFINE(uct_base_iface_t, uct_iface_t); + + ++ucs_status_t uct_iface_accept(uct_iface_h iface, ++ uct_conn_request_h conn_request) ++{ ++ return iface->ops.iface_accept(iface, conn_request); ++} ++ ++ ++ucs_status_t uct_iface_reject(uct_iface_h iface, ++ uct_conn_request_h conn_request) ++{ ++ return iface->ops.iface_reject(iface, conn_request); ++} ++ ++ + ucs_status_t uct_ep_create(uct_iface_h iface, uct_ep_h *ep_p) + { + return iface->ops.ep_create(iface, ep_p); +@@ -466,9 +482,11 @@ uct_ep_create_connected(uct_iface_h iface, const uct_device_addr_t *dev_addr, + + ucs_status_t + uct_ep_create_sockaddr(uct_iface_h iface, const ucs_sock_addr_t *sockaddr, +- const void *priv_data, size_t length, uct_ep_h *ep_p) ++ uct_sockaddr_priv_pack_callback_t pack_cb, ++ void *arg, uint32_t cb_flags, uct_ep_h *ep_p) + { +- return iface->ops.ep_create_sockaddr(iface, sockaddr, priv_data, length, ep_p); ++ return iface->ops.ep_create_sockaddr(iface, sockaddr, pack_cb, arg, ++ cb_flags, ep_p); + } + + void uct_ep_destroy(uct_ep_h ep) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.h +index 3be8800bb..ebbf781ff 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_iface.h +@@ -26,6 +26,9 @@ enum { + UCT_EP_STAT_PUT, + UCT_EP_STAT_GET, + UCT_EP_STAT_ATOMIC, ++#if IBV_EXP_HW_TM ++ UCT_EP_STAT_TAG, ++#endif + UCT_EP_STAT_BYTES_SHORT, + UCT_EP_STAT_BYTES_BCOPY, + UCT_EP_STAT_BYTES_ZCOPY, +@@ -76,6 +79,15 @@ enum { + UCS_STATS_UPDATE_COUNTER((_iface)->stats, UCT_IFACE_STAT_TX_NO_DESC, 1); + + ++#define UCT_CB_FLAGS_CHECK(_flags) \ ++ do { \ ++ if ((_flags) & UCT_CB_FLAG_RESERVED) { \ ++ ucs_error("Unsupported callback flag 0x%x", UCT_CB_FLAG_RESERVED); \ ++ return UCS_ERR_INVALID_PARAM; \ ++ } \ ++ } while (0) ++ ++ + /** + * In release mode - do nothing. + * +@@ -175,6 +187,7 @@ typedef struct uct_base_iface { + void *am_tracer_arg; /* Tracer argument */ + uct_error_handler_t err_handler; /* Error handler */ + void *err_handler_arg; /* Error handler argument */ ++ uint32_t err_handler_flags; /* Error handler callback flags */ + uct_worker_progress_t prog; /* Will be removed once all transports + support progress control */ + unsigned progress_flags; /* Which progress is currently enabled */ +@@ -245,7 +258,9 @@ typedef struct uct_tl_component { + .cfg_prefix = _cfg_prefix, \ + .iface_config_table = _cfg_table, \ + .iface_config_size = sizeof(_cfg_struct) \ +- }; ++ }; \ ++ UCS_CONFIG_REGISTER_TABLE(_cfg_table, _name" transport", _cfg_prefix, \ ++ _cfg_struct) + + + /** +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.c +index 8983a2c74..4c9712215 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.c +@@ -401,14 +401,6 @@ void uct_config_release(void *config) + ucs_free(bundle); + } + +-void uct_config_print(const void *config, FILE *stream, const char *title, +- ucs_config_print_flags_t print_flags) +-{ +- uct_config_bundle_t *bundle = (uct_config_bundle_t *)config - 1; +- ucs_config_parser_print_opts(stream, title, bundle->data, bundle->table, +- bundle->table_prefix, print_flags); +-} +- + ucs_status_t uct_config_get(void *config, const char *name, char *value, + size_t max) + { +@@ -423,28 +415,6 @@ ucs_status_t uct_config_modify(void *config, const char *name, const char *value + return ucs_config_parser_set_value(bundle->data, bundle->table, name, value); + } + +-void uct_md_component_config_print(ucs_config_print_flags_t print_flags) +-{ +- uct_md_component_t *mdc; +- uct_md_config_t *md_config; +- char cfg_title[UCT_TL_NAME_MAX + 128]; +- ucs_status_t status; +- +- /* go over the list of md components and print the config table per each */ +- ucs_list_for_each(mdc, &uct_md_components_list, list) +- { +- snprintf(cfg_title, sizeof(cfg_title), "%s MD component configuration", +- mdc->name); +- status = uct_md_config_read(mdc->name, NULL, NULL, &md_config); +- if (status != UCS_OK) { +- ucs_error("Failed to read md_config for MD component %s", mdc->name); +- continue; +- } +- uct_config_print(md_config, stdout, cfg_title, print_flags); +- uct_config_release(md_config); +- } +-} +- + ucs_status_t uct_md_mkey_pack(uct_md_h md, uct_mem_h memh, void *rkey_buffer) + { + void *rbuf = uct_md_fill_md_name(md, rkey_buffer); +@@ -522,7 +492,7 @@ ucs_status_t uct_md_mem_alloc(uct_md_h md, size_t *length_p, void **address_p, + return status; + } + +- return md->ops->mem_alloc(md, length_p, address_p, flags, memh_p UCS_MEMTRACK_VAL); ++ return md->ops->mem_alloc(md, length_p, address_p, flags, alloc_name, memh_p); + } + + ucs_status_t uct_md_mem_free(uct_md_h md, uct_mem_h memh) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.h +index e1276880b..091e99fbf 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_md.h +@@ -54,9 +54,8 @@ extern ucs_config_field_t uct_md_config_rcache_table[]; + * Specific MDs extend this structure. + */ + struct uct_md_config { +-#ifdef __cplusplus +- char __dummy; +-#endif ++ /* C standard prohibits empty structures */ ++ char __dummy; + }; + + +@@ -102,7 +101,9 @@ typedef struct uct_md_registered_tl { + }; \ + UCS_STATIC_INIT { \ + ucs_list_add_tail(&uct_md_components_list, &_mdc.list); \ +- } ++ } \ ++ UCS_CONFIG_REGISTER_TABLE(_cfg_table, _name" memory domain", _cfg_prefix, \ ++ _cfg_struct) + + + /** +@@ -129,7 +130,8 @@ struct uct_md_ops { + ucs_status_t (*query)(uct_md_h md, uct_md_attr_t *md_attr); + + ucs_status_t (*mem_alloc)(uct_md_h md, size_t *length_p, void **address_p, +- unsigned flags, uct_mem_h *memh_p UCS_MEMTRACK_ARG); ++ unsigned flags, const char *alloc_name, ++ uct_mem_h *memh_p); + + ucs_status_t (*mem_free)(uct_md_h md, uct_mem_h memh); + ucs_status_t (*mem_advise)(uct_md_h md, uct_mem_h memh, void *addr, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_mem.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_mem.c +index 4cb55cea3..cf8450402 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_mem.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_mem.c +@@ -8,7 +8,8 @@ + #include "uct_md.h" + + #include +-#include ++#include ++#include + + + typedef struct { +@@ -64,6 +65,7 @@ ucs_status_t uct_mem_alloc(void *addr, size_t min_length, unsigned flags, + void *address; + int shmid; + #ifdef MADV_HUGEPAGE ++ ssize_t huge_page_size; + int ret; + #endif + +@@ -119,9 +121,9 @@ ucs_status_t uct_mem_alloc(void *addr, size_t min_length, unsigned flags, + status = uct_md_mem_alloc(md, &alloc_length, &address, flags, + alloc_name, &memh); + if (status != UCS_OK) { +- ucs_error("failed to allocate %zu bytes using md %s: %s", ++ ucs_error("failed to allocate %zu bytes using md %s for %s: %s", + alloc_length, md->component->name, +- ucs_status_string(status)); ++ alloc_name, ucs_status_string(status)); + return status; + } + +@@ -136,22 +138,26 @@ ucs_status_t uct_mem_alloc(void *addr, size_t min_length, unsigned flags, + + case UCT_ALLOC_METHOD_THP: + #ifdef MADV_HUGEPAGE ++ /* Fixed option is not supported for thp allocation*/ ++ if (flags & UCT_MD_MEM_FLAG_FIXED) { ++ break; ++ } ++ + if (!ucs_is_thp_enabled()) { + break; + } + +- /* Fixed option is not supported for thp allocation*/ +- if (flags & UCT_MD_MEM_FLAG_FIXED) { ++ huge_page_size = ucs_get_huge_page_size(); ++ if (huge_page_size <= 0) { + break; + } + +- alloc_length = ucs_align_up(min_length, ucs_get_huge_page_size()); ++ alloc_length = ucs_align_up(min_length, huge_page_size); + if (alloc_length >= 2 * min_length) { + break; + } + +- address = ucs_memalign(ucs_get_huge_page_size(), alloc_length +- UCS_MEMTRACK_VAL); ++ address = ucs_memalign(huge_page_size, alloc_length UCS_MEMTRACK_VAL); + if (address == NULL) { + ucs_trace("failed to allocate %zu bytes using THP: %m", alloc_length); + } else { +@@ -206,7 +212,7 @@ ucs_status_t uct_mem_alloc(void *addr, size_t min_length, unsigned flags, + alloc_length = min_length; + address = (flags & UCT_MD_MEM_FLAG_FIXED) ? addr : NULL; + status = ucs_sysv_alloc(&alloc_length, min_length * 2, &address, +- SHM_HUGETLB, &shmid UCS_MEMTRACK_VAL); ++ SHM_HUGETLB, alloc_name, &shmid); + if (status == UCS_OK) { + goto allocated_without_md; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.c +index a2c75b99f..e9da0de50 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.c +@@ -31,6 +31,10 @@ static UCS_CLASS_INIT_FUNC(uct_priv_worker_t, ucs_async_context_t *async, + { + UCS_CLASS_CALL_SUPER_INIT(uct_worker_t); + ++ if (async == NULL) { ++ return UCS_ERR_INVALID_PARAM; ++ } ++ + self->async = async; + self->thread_mode = thread_mode; + ucs_list_head_init(&self->tl_data); +@@ -101,8 +105,8 @@ void uct_worker_progress_register_safe(uct_worker_h tl_worker, ucs_callback_t fu + if (*id_p == UCS_CALLBACKQ_ID_NULL) { + UCS_ASYNC_BLOCK(worker->async); + *id_p = ucs_callbackq_add_safe(&worker->super.progress_q, func, arg, flags); +- UCS_ASYNC_UNBLOCK(worker->async); + ucs_assert(*id_p != UCS_CALLBACKQ_ID_NULL); ++ UCS_ASYNC_UNBLOCK(worker->async); + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.h +index 9342b1756..78abfb1a1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/base/uct_worker.h +@@ -19,7 +19,6 @@ typedef struct uct_worker_tl_data { + ucs_list_link_t list; + uint32_t refcount; + uint32_t key; +- void *ptr; + } uct_worker_tl_data_t; + + +@@ -40,6 +39,8 @@ typedef struct uct_worker_progress { + #define uct_worker_tl_data_get(_worker, _key, _type, _cmp_fn, _init_fn, ...) \ + ({ \ + uct_worker_tl_data_t *data; \ ++ _type *result; \ ++ ucs_status_t status; \ + \ + ucs_list_for_each(data, &(_worker)->tl_data, list) { \ + if ((data->key == (_key)) && _cmp_fn(ucs_derived_of(data, _type), \ +@@ -50,16 +51,26 @@ typedef struct uct_worker_progress { + } \ + } \ + \ +- if (&data->list == &(_worker)->tl_data) { \ ++ if (&data->list == &(_worker)->tl_data) { /* not found */ \ + data = ucs_malloc(sizeof(_type), UCS_PP_QUOTE(_type)); \ +- if (data != NULL) { \ ++ if (data == NULL) { \ ++ result = UCS_STATUS_PTR(UCS_ERR_NO_MEMORY); \ ++ } else { \ + data->key = (_key); \ + data->refcount = 1; \ +- _init_fn(ucs_derived_of(data, _type), ## __VA_ARGS__); \ +- ucs_list_add_tail(&(_worker)->tl_data, &data->list); \ ++ status = _init_fn(ucs_derived_of(data, _type), ## __VA_ARGS__); \ ++ if (status != UCS_OK) { \ ++ ucs_free(data); \ ++ result = UCS_STATUS_PTR(status); \ ++ } else { \ ++ ucs_list_add_tail(&(_worker)->tl_data, &data->list); \ ++ result = ucs_derived_of(data, _type); \ ++ } \ + } \ ++ } else { \ ++ result = ucs_derived_of(data, _type); \ + } \ +- ucs_derived_of(data, _type); \ ++ result; \ + }) + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_iface.h +new file mode 100644 +index 000000000..4891182a4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_iface.h +@@ -0,0 +1,47 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_IFACE_H ++#define UCT_CUDA_IFACE_H ++ ++#include ++#include ++#include ++ ++#define UCT_CUDA_FUNC(_func) \ ++ ({ \ ++ ucs_status_t _status = UCS_OK; \ ++ do { \ ++ cudaError_t _result = (_func); \ ++ if (cudaSuccess != _result) { \ ++ ucs_error("%s is failed. ret:%s", \ ++ UCS_PP_MAKE_STRING(_func), \ ++ cudaGetErrorString(_result)); \ ++ _status = UCS_ERR_IO_ERROR; \ ++ } \ ++ } while (0); \ ++ _status; \ ++ }) ++ ++ ++#define UCT_CUDADRV_FUNC(_func) \ ++ ({ \ ++ ucs_status_t _status = UCS_OK; \ ++ do { \ ++ CUresult _result = (_func); \ ++ const char *cu_err_str; \ ++ if (CUDA_ERROR_NOT_READY == _result) { \ ++ _status = UCS_INPROGRESS; \ ++ } else if (CUDA_SUCCESS != _result) { \ ++ cuGetErrorString(_result, &cu_err_str); \ ++ ucs_error("%s is failed. ret:%s", \ ++ UCS_PP_MAKE_STRING(_func),cu_err_str);\ ++ _status = UCS_ERR_IO_ERROR; \ ++ } \ ++ } while (0); \ ++ _status; \ ++ }) ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.c +new file mode 100644 +index 000000000..d9cf0f9ce +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.c +@@ -0,0 +1,26 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#include ++ ++#include ++#include ++ ++int uct_cuda_is_mem_type_owned(uct_md_h md, void *addr, size_t length) ++{ ++ CUmemorytype memType = 0; ++ uint32_t isManaged = 0; ++ void *attrdata[] = {(void *)&memType, (void *)&isManaged}; ++ CUpointer_attribute attributes[2] = {CU_POINTER_ATTRIBUTE_MEMORY_TYPE, ++ CU_POINTER_ATTRIBUTE_IS_MANAGED}; ++ CUresult cu_err; ++ ++ if (addr == NULL) { ++ return 0; ++ } ++ ++ cu_err = cuPointerGetAttributes(2, attributes, attrdata, (CUdeviceptr)addr); ++ return ((cu_err == CUDA_SUCCESS) && (!isManaged && (memType == CU_MEMORYTYPE_DEVICE))); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.h +new file mode 100644 +index 000000000..050848a17 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/base/cuda_md.h +@@ -0,0 +1,13 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_MD_H ++#define UCT_CUDA_MD_H ++ ++#include ++ ++int uct_cuda_is_mem_type_owned(uct_md_h md, void *addr, size_t length); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.c +index 46cab05d8..a323e9ee6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.c +@@ -127,3 +127,35 @@ ucs_status_t uct_cuda_copy_ep_put_zcopy(uct_ep_h tl_ep, const uct_iov_t *iov, si + return status; + + } ++ ++ ++ucs_status_t uct_cuda_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) ++{ ++ ucs_status_t status; ++ ++ status = UCT_CUDA_FUNC(cudaMemcpy((void *)remote_addr, buffer, ++ length, cudaMemcpyHostToDevice)); ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), PUT, SHORT, length); ++ ucs_trace_data("PUT_SHORT size %d from %p to %p", ++ length, buffer, (void *)remote_addr); ++ return status; ++} ++ ++ucs_status_t uct_cuda_copy_ep_get_short(uct_ep_h tl_ep, void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) ++{ ++ ucs_status_t status; ++ ++ status = UCT_CUDA_FUNC(cudaMemcpy(buffer, (void *)remote_addr, ++ length, cudaMemcpyDeviceToHost)); ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), GET, SHORT, length); ++ ucs_trace_data("GET_SHORT size %d from %p to %p", ++ length, (void *)remote_addr, buffer); ++ return status; ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.h +index e029a3929..ed0e88b3b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_ep.h +@@ -33,4 +33,13 @@ ucs_status_t uct_cuda_copy_ep_put_zcopy(uct_ep_h tl_ep, + const uct_iov_t *iov, size_t iovcnt, + uint64_t remote_addr, uct_rkey_t rkey, + uct_completion_t *comp); ++ ++ucs_status_t uct_cuda_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey); ++ ++ucs_status_t uct_cuda_copy_ep_get_short(uct_ep_h tl_ep, void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.c +index f5e393b58..7b877b7b1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.c +@@ -9,6 +9,7 @@ + + #include + #include ++#include + + + static ucs_config_field_t uct_cuda_copy_iface_config_table[] = { +@@ -19,7 +20,11 @@ static ucs_config_field_t uct_cuda_copy_iface_config_table[] = { + + {"MAX_POLL", "16", + "Max number of event completions to pick during cuda events polling", +- ucs_offsetof(uct_cuda_copy_iface_config_t, max_poll), UCS_CONFIG_TYPE_UINT}, ++ ucs_offsetof(uct_cuda_copy_iface_config_t, max_poll), UCS_CONFIG_TYPE_UINT}, ++ ++ {"MAX_EVENTS", "1024", ++ "Max number of cuda events. -1 is infinite", ++ ucs_offsetof(uct_cuda_copy_iface_config_t, max_cuda_events), UCS_CONFIG_TYPE_UINT}, + + {NULL} + }; +@@ -32,17 +37,20 @@ static void UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_copy_iface_t)(uct_iface_t*); + static ucs_status_t uct_cuda_copy_iface_get_address(uct_iface_h tl_iface, + uct_iface_addr_t *iface_addr) + { +- int *cuda_copy_addr = (int*)iface_addr; ++ uct_cuda_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_copy_iface_t); + +- *cuda_copy_addr = 0; ++ *(uct_cuda_copy_iface_addr_t*)iface_addr = iface->id; + return UCS_OK; + } + +-static int uct_cuda_copy_iface_is_reachable(const uct_iface_h iface, ++static int uct_cuda_copy_iface_is_reachable(const uct_iface_h tl_iface, + const uct_device_addr_t *dev_addr, + const uct_iface_addr_t *iface_addr) + { +- return 1; ++ uct_cuda_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_copy_iface_t); ++ uct_cuda_copy_iface_addr_t *addr = (uct_cuda_copy_iface_addr_t*)iface_addr; ++ ++ return (addr != NULL) && (iface->id == *addr); + } + + static ucs_status_t uct_cuda_copy_iface_query(uct_iface_h iface, +@@ -50,15 +58,17 @@ static ucs_status_t uct_cuda_copy_iface_query(uct_iface_h iface, + { + memset(iface_attr, 0, sizeof(uct_iface_attr_t)); + +- iface_attr->iface_addr_len = sizeof(int); ++ iface_attr->iface_addr_len = sizeof(uct_cuda_copy_iface_addr_t); + iface_attr->device_addr_len = 0; + iface_attr->ep_addr_len = 0; + iface_attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_GET_SHORT | ++ UCT_IFACE_FLAG_PUT_SHORT | + UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_PUT_ZCOPY | + UCT_IFACE_FLAG_PENDING; + +- iface_attr->cap.put.max_short = 0; ++ iface_attr->cap.put.max_short = UINT_MAX; + iface_attr->cap.put.max_bcopy = 0; + iface_attr->cap.put.min_zcopy = 0; + iface_attr->cap.put.max_zcopy = SIZE_MAX; +@@ -66,6 +76,7 @@ static ucs_status_t uct_cuda_copy_iface_query(uct_iface_h iface, + iface_attr->cap.put.align_mtu = iface_attr->cap.put.opt_zcopy_align; + iface_attr->cap.put.max_iov = 1; + ++ iface_attr->cap.get.max_short = UINT_MAX; + iface_attr->cap.get.max_bcopy = 0; + iface_attr->cap.get.min_zcopy = 0; + iface_attr->cap.get.max_zcopy = SIZE_MAX; +@@ -151,6 +162,8 @@ static unsigned uct_cuda_copy_iface_progress(uct_iface_h tl_iface) + } + + static uct_iface_ops_t uct_cuda_copy_iface_ops = { ++ .ep_get_short = uct_cuda_copy_ep_get_short, ++ .ep_put_short = uct_cuda_copy_ep_put_short, + .ep_get_zcopy = uct_cuda_copy_ep_get_zcopy, + .ep_put_zcopy = uct_cuda_copy_ep_put_zcopy, + .ep_pending_add = ucs_empty_function_return_busy, +@@ -220,7 +233,9 @@ static UCS_CLASS_INIT_FUNC(uct_cuda_copy_iface_t, uct_md_h md, uct_worker_h work + return UCS_ERR_NO_DEVICE; + } + +- self->config.max_poll = config->max_poll; ++ self->id = ucs_generate_uuid((uintptr_t)self); ++ self->config.max_poll = config->max_poll; ++ self->config.max_cuda_events = config->max_cuda_events; + + status = ucs_mpool_init(&self->cuda_event_desc, + 0, +@@ -228,7 +243,7 @@ static UCS_CLASS_INIT_FUNC(uct_cuda_copy_iface_t, uct_md_h md, uct_worker_h work + 0, + UCS_SYS_CACHE_LINE_SIZE, + 128, +- 1024, ++ self->config.max_cuda_events, + &uct_cuda_copy_event_desc_mpool_ops, + "CUDA EVENT objects"); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.h +index 47ce350c8..7c8c5de80 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_iface.h +@@ -7,37 +7,27 @@ + #define UCT_CUDA_COPY_IFACE_H + + #include +-#include +-#include +-#include +-#include ++#include + + + #define UCT_CUDA_COPY_TL_NAME "cuda_copy" +-#define UCT_CUDA_DEV_NAME "cudacopy0" +- +-#define UCT_CUDA_FUNC(_func) ({ \ +-ucs_status_t _status = UCS_OK; \ +-do { \ +- cudaError_t _result = (_func); \ +- if (cudaSuccess != _result) { \ +- ucs_error("%s failed with %d \n", \ +- UCS_PP_MAKE_STRING(_func), _result); \ +- _status = UCS_ERR_IO_ERROR; \ +- } \ +-} while (0); \ +-_status; \ +-}) ++#define UCT_CUDA_DEV_NAME "cudacopy0" ++ ++ ++typedef uint64_t uct_cuda_copy_iface_addr_t; ++ + + typedef struct uct_cuda_copy_iface { +- uct_base_iface_t super; +- ucs_mpool_t cuda_event_desc; +- ucs_queue_head_t outstanding_d2h_cuda_event_q; +- ucs_queue_head_t outstanding_h2d_cuda_event_q; +- cudaStream_t stream_d2h; +- cudaStream_t stream_h2d; ++ uct_base_iface_t super; ++ uct_cuda_copy_iface_addr_t id; ++ ucs_mpool_t cuda_event_desc; ++ ucs_queue_head_t outstanding_d2h_cuda_event_q; ++ ucs_queue_head_t outstanding_h2d_cuda_event_q; ++ cudaStream_t stream_d2h; ++ cudaStream_t stream_h2d; + struct { +- unsigned max_poll; ++ unsigned max_poll; ++ unsigned max_cuda_events; + } config; + } uct_cuda_copy_iface_t; + +@@ -45,8 +35,10 @@ typedef struct uct_cuda_copy_iface { + typedef struct uct_cuda_copy_iface_config { + uct_iface_config_t super; + unsigned max_poll; ++ unsigned max_cuda_events; + } uct_cuda_copy_iface_config_t; + ++ + typedef struct uct_cuda_copy_event_desc { + cudaEvent_t event; + uct_completion_t *comp; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.c +index b255f84f0..af6e17b6d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.c +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2017. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2017-2018. ALL RIGHTS RESERVED. + * See file LICENSE for terms. + */ + +@@ -92,33 +92,6 @@ static ucs_status_t uct_cuda_copy_mem_dereg(uct_md_h md, uct_mem_h memh) + return UCS_OK; + } + +-static int uct_is_cuda_copy_mem_type_owned(uct_md_h md, void *addr, size_t length) +-{ +- int memory_type; +- struct cudaPointerAttributes attributes; +- cudaError_t cuda_err; +- CUresult cu_err; +- +- if (addr == NULL) { +- return 0; +- } +- +- cu_err = cuPointerGetAttribute(&memory_type, +- CU_POINTER_ATTRIBUTE_MEMORY_TYPE, +- (CUdeviceptr)addr); +- if (cu_err != CUDA_SUCCESS) { +- cuda_err = cudaPointerGetAttributes (&attributes, addr); +- if (cuda_err == cudaSuccess) { +- if (attributes.memoryType == cudaMemoryTypeDevice) { +- return 1; +- } +- } +- } else if (memory_type == CU_MEMORYTYPE_DEVICE) { +- return 1; +- } +- return 0; +-} +- + static ucs_status_t uct_cuda_copy_query_md_resources(uct_md_resource_desc_t **resources_p, + unsigned *num_resources_p) + { +@@ -148,7 +121,7 @@ static uct_md_ops_t md_ops = { + .mkey_pack = uct_cuda_copy_mkey_pack, + .mem_reg = uct_cuda_copy_mem_reg, + .mem_dereg = uct_cuda_copy_mem_dereg, +- .is_mem_type_owned = uct_is_cuda_copy_mem_type_owned, ++ .is_mem_type_owned = uct_cuda_is_mem_type_owned, + }; + + static ucs_status_t uct_cuda_copy_md_open(const char *md_name, const uct_md_config_t *md_config, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.h +index 4af286317..bd50206e1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_copy/cuda_copy_md.h +@@ -7,6 +7,7 @@ + #define UCT_CUDA_COPY_MD_H + + #include ++#include + + #define UCT_CUDA_COPY_MD_NAME "cuda_cpy" + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.c +new file mode 100644 +index 000000000..becb90a89 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.c +@@ -0,0 +1,263 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "cuda_ipc_cache.h" ++#include ++#include ++#include ++#include ++#include ++ ++static ucs_pgt_dir_t *uct_cuda_ipc_cache_pgt_dir_alloc(const ucs_pgtable_t *pgtable) ++{ ++ return ucs_memalign(UCS_PGT_ENTRY_MIN_ALIGN, sizeof(ucs_pgt_dir_t), ++ "cuda_ipc_cache_pgdir"); ++} ++ ++static void uct_cuda_ipc_cache_pgt_dir_release(const ucs_pgtable_t *pgtable, ++ ucs_pgt_dir_t *dir) ++{ ++ ucs_free(dir); ++} ++ ++static void ++uct_cuda_ipc_cache_region_collect_callback(const ucs_pgtable_t *pgtable, ++ ucs_pgt_region_t *pgt_region, ++ void *arg) ++{ ++ ucs_list_link_t *list = arg; ++ uct_cuda_ipc_cache_region_t *region; ++ ++ region = ucs_derived_of(pgt_region, uct_cuda_ipc_cache_region_t); ++ ucs_list_add_tail(list, ®ion->list); ++} ++ ++static void uct_cuda_ipc_cache_purge(uct_cuda_ipc_cache_t *cache) ++{ ++ uct_cuda_ipc_cache_region_t *region, *tmp; ++ ucs_list_link_t region_list; ++ ++ ucs_list_head_init(®ion_list); ++ ucs_pgtable_purge(&cache->pgtable, uct_cuda_ipc_cache_region_collect_callback, ++ ®ion_list); ++ ucs_list_for_each_safe(region, tmp, ®ion_list, list) { ++ UCT_CUDADRV_FUNC(cuIpcCloseMemHandle((CUdeviceptr)region->mapped_addr)); ++ ucs_free(region); ++ } ++ ucs_trace("%s: cuda ipc cache purged", cache->name); ++} ++ ++static ucs_status_t uct_cuda_ipc_open_memhandle(CUipcMemHandle memh, ++ CUdeviceptr *mapped_addr) ++{ ++ CUresult cuerr; ++ ++ cuerr = cuIpcOpenMemHandle(mapped_addr, memh, ++ CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS); ++ if (cuerr != CUDA_SUCCESS) { ++ if (cuerr == CUDA_ERROR_ALREADY_MAPPED) { ++ return UCS_ERR_ALREADY_EXISTS; ++ } ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ return UCS_OK; ++} ++ ++static void uct_cuda_ipc_cache_invalidate_regions(uct_cuda_ipc_cache_t *cache, ++ void *from, void *to) ++{ ++ ucs_list_link_t region_list; ++ ucs_status_t status; ++ uct_cuda_ipc_cache_region_t *region, *tmp; ++ ++ ucs_list_head_init(®ion_list); ++ ucs_pgtable_search_range(&cache->pgtable, (ucs_pgt_addr_t)from, ++ (ucs_pgt_addr_t)to, ++ uct_cuda_ipc_cache_region_collect_callback, ++ ®ion_list); ++ ucs_list_for_each_safe(region, tmp, ®ion_list, list) { ++ status = ucs_pgtable_remove(&cache->pgtable, ®ion->super); ++ if (status != UCS_OK) { ++ ucs_error("failed to remove address:%p from cache (%s)", ++ (void *)region->key.d_bptr, ucs_status_string(status)); ++ } ++ UCT_CUDADRV_FUNC(cuIpcCloseMemHandle((CUdeviceptr)region->mapped_addr)); ++ ucs_free(region); ++ } ++ ucs_trace("%s: closed memhandles in the range [%p..%p]", ++ cache->name, from, to); ++} ++ ++ucs_status_t uct_cuda_ipc_cache_map_memhandle(void *arg, uct_cuda_ipc_key_t *key, ++ void **mapped_addr) ++{ ++ uct_cuda_ipc_cache_t *cache = (uct_cuda_ipc_cache_t *)arg; ++ ucs_status_t status; ++ ucs_pgt_region_t *pgt_region; ++ uct_cuda_ipc_cache_region_t *region; ++ ++ pthread_rwlock_rdlock(&cache->lock); ++ pgt_region = UCS_PROFILE_CALL(ucs_pgtable_lookup, ++ &cache->pgtable, key->d_bptr); ++ if (ucs_likely(pgt_region != NULL)) { ++ region = ucs_derived_of(pgt_region, uct_cuda_ipc_cache_region_t); ++ if (memcmp((const void *)&key->ph, (const void *)®ion->key.ph, ++ sizeof(key->ph)) == 0) { ++ /*cache hit */ ++ ucs_trace("%s: cuda_ipc cache hit addr:%p size:%lu region:" ++ UCS_PGT_REGION_FMT, cache->name, (void *)key->d_bptr, ++ key->b_len, UCS_PGT_REGION_ARG(®ion->super)); ++ ++ *mapped_addr = region->mapped_addr; ++ pthread_rwlock_unlock(&cache->lock); ++ return UCS_OK; ++ } else { ++ ucs_trace("%s: cuda_ipc cache remove stale region:" ++ UCS_PGT_REGION_FMT " new_addr:%p new_size:%lu", ++ cache->name, UCS_PGT_REGION_ARG(®ion->super), ++ (void *)key->d_bptr, key->b_len); ++ ++ status = ucs_pgtable_remove(&cache->pgtable, ®ion->super); ++ if (status != UCS_OK) { ++ ucs_error("%s: failed to remove address:%p from cache", ++ cache->name, (void *)key->d_bptr); ++ goto err; ++ } ++ ++ /* close memhandle */ ++ UCT_CUDADRV_FUNC(cuIpcCloseMemHandle((CUdeviceptr) ++ region->mapped_addr)); ++ ucs_free(region); ++ } ++ } ++ ++ status = uct_cuda_ipc_open_memhandle(key->ph, (CUdeviceptr *)mapped_addr); ++ if (ucs_unlikely(status != UCS_OK)) { ++ if (ucs_likely(status == UCS_ERR_ALREADY_EXISTS)) { ++ /* unmap all overlapping regions and retry*/ ++ uct_cuda_ipc_cache_invalidate_regions(cache, (void *)key->d_bptr, ++ (void *)key->d_bptr + key->b_len); ++ status = uct_cuda_ipc_open_memhandle(key->ph, (CUdeviceptr *)mapped_addr); ++ if (ucs_unlikely(status != UCS_OK)) { ++ if (ucs_likely(status == UCS_ERR_ALREADY_EXISTS)) { ++ /* unmap all cache entries and retry */ ++ uct_cuda_ipc_cache_purge(cache); ++ status = uct_cuda_ipc_open_memhandle(key->ph, (CUdeviceptr *)mapped_addr); ++ if (status != UCS_OK) { ++ ucs_fatal("%s: failed to open ipc mem handle. addr:%p " ++ "len:%lu (%s)", cache->name, ++ (void *)key->d_bptr, key->b_len, ++ ucs_status_string(status)); ++ } ++ } else { ++ ucs_fatal("%s: failed to open ipc mem handle. addr:%p len:%lu", ++ cache->name, (void *)key->d_bptr, key->b_len); ++ } ++ } ++ } else { ++ ucs_fatal("%s: failed to open ipc mem handle. addr:%p len:%lu", ++ cache->name, (void *)key->d_bptr, key->b_len); ++ } ++ } ++ ++ /*create new cache entry */ ++ region = ucs_memalign(UCS_PGT_ENTRY_MIN_ALIGN, ++ sizeof(uct_cuda_ipc_cache_region_t), ++ "uct_cuda_ipc_cache_region"); ++ if (region == NULL) { ++ ucs_warn("failed to allocate uct_cuda_ipc_cache region"); ++ status = UCS_ERR_NO_MEMORY; ++ goto err; ++ } ++ ++ region->super.start = ucs_align_down_pow2((uintptr_t)key->d_bptr, ++ UCS_PGT_ADDR_ALIGN); ++ region->super.end = ucs_align_up_pow2 ((uintptr_t)key->d_bptr + key->b_len, ++ UCS_PGT_ADDR_ALIGN); ++ region->key = *key; ++ region->mapped_addr = *mapped_addr; ++ ++ status = UCS_PROFILE_CALL(ucs_pgtable_insert, ++ &cache->pgtable, ®ion->super); ++ if (status == UCS_ERR_ALREADY_EXISTS) { ++ /* overlapped region means memory freed at source. remove and try insert */ ++ uct_cuda_ipc_cache_invalidate_regions(cache, ++ (void *)region->super.start, ++ (void *)region->super.end); ++ status = UCS_PROFILE_CALL(ucs_pgtable_insert, ++ &cache->pgtable, ®ion->super); ++ } ++ if (status != UCS_OK) { ++ ++ ucs_error("%s: failed to insert region:"UCS_PGT_REGION_FMT" size:%lu :%s", ++ cache->name, UCS_PGT_REGION_ARG(®ion->super), key->b_len, ++ ucs_status_string(status)); ++ ucs_free(region); ++ goto err; ++ } ++ ++ ucs_trace("%s: cuda_ipc cache new region:"UCS_PGT_REGION_FMT" size:%lu", ++ cache->name, UCS_PGT_REGION_ARG(®ion->super), key->b_len); ++ ++ pthread_rwlock_unlock(&cache->lock); ++ return UCS_OK; ++err: ++ pthread_rwlock_unlock(&cache->lock); ++ return status; ++} ++ ++ucs_status_t uct_cuda_ipc_create_cache(uct_cuda_ipc_cache_t **cache, ++ const char *name) ++{ ++ ucs_status_t status; ++ uct_cuda_ipc_cache_t *cache_desc; ++ int ret; ++ ++ cache_desc = ucs_malloc(sizeof(uct_cuda_ipc_cache_t), "uct_cuda_ipc_cache_t"); ++ if (cache_desc == NULL) { ++ ucs_error("failed to allocate memory for cuda_ipc cache"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ ret = pthread_rwlock_init(&cache_desc->lock, NULL); ++ if (ret) { ++ ucs_error("pthread_rwlock_init() failed: %m"); ++ status = UCS_ERR_INVALID_PARAM; ++ goto err; ++ } ++ ++ status = ucs_pgtable_init(&cache_desc->pgtable, ++ uct_cuda_ipc_cache_pgt_dir_alloc, ++ uct_cuda_ipc_cache_pgt_dir_release); ++ if (status != UCS_OK) { ++ goto err_destroy_rwlock; ++ } ++ ++ cache_desc->name = strdup(name); ++ if (cache_desc->name == NULL) { ++ status = UCS_ERR_NO_MEMORY; ++ goto err_destroy_rwlock; ++ } ++ ++ *cache = cache_desc; ++ return UCS_OK; ++ ++err_destroy_rwlock: ++ pthread_rwlock_destroy(&cache_desc->lock); ++err: ++ free(cache_desc); ++ return status; ++} ++ ++void uct_cuda_ipc_destroy_cache(uct_cuda_ipc_cache_t *cache) ++{ ++ uct_cuda_ipc_cache_purge(cache); ++ ucs_pgtable_cleanup(&cache->pgtable); ++ pthread_rwlock_destroy(&cache->lock); ++ free(cache->name); ++ ucs_free(cache); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.h +new file mode 100644 +index 000000000..fa5f86777 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_cache.h +@@ -0,0 +1,48 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_IPC_CACHE_H_ ++#define UCT_CUDA_IPC_CACHE_H_ ++ ++#include ++#include ++#include "cuda_ipc_md.h" ++#include ++#include ++ ++ ++typedef struct uct_cuda_ipc_cache uct_cuda_ipc_cache_t; ++typedef struct uct_cuda_ipc_cache_region uct_cuda_ipc_cache_region_t; ++ ++ ++typedef struct uct_cuda_ipc_rem_memh uct_cuda_ipc_rem_memh_t; ++ ++ ++struct uct_cuda_ipc_cache_region { ++ ucs_pgt_region_t super; /**< Base class - page table region */ ++ ucs_list_link_t list; /**< List element */ ++ uct_cuda_ipc_key_t key; /**< Remote memory key */ ++ void *mapped_addr; /**< Local mapped address */ ++}; ++ ++ ++struct uct_cuda_ipc_cache { ++ pthread_rwlock_t lock; /**< protests the page table */ ++ ucs_pgtable_t pgtable; /**< Page table to hold the regions */ ++ char *name; /**< Name */ ++}; ++ ++ ++ucs_status_t uct_cuda_ipc_create_cache(uct_cuda_ipc_cache_t **cache, ++ const char *name); ++ ++ ++void uct_cuda_ipc_destroy_cache(uct_cuda_ipc_cache_t *cache); ++ ++ ++ucs_status_t uct_cuda_ipc_cache_map_memhandle(void *arg, uct_cuda_ipc_key_t *key, ++ void **mapped_addr); ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.c +new file mode 100644 +index 000000000..f3cf0b0c1 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.c +@@ -0,0 +1,168 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#include "cuda_ipc_ep.h" ++#include "cuda_ipc_iface.h" ++#include "cuda_ipc_md.h" ++ ++#include ++#include ++#include ++ ++#define UCT_CUDA_IPC_PUT 0 ++#define UCT_CUDA_IPC_GET 1 ++ ++static UCS_CLASS_INIT_FUNC(uct_cuda_ipc_ep_t, uct_iface_t *tl_iface, ++ const uct_device_addr_t *dev_addr, ++ const uct_iface_addr_t *iface_addr) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_ipc_iface_t); ++ ucs_status_t status; ++ char target_name[64]; ++ ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &iface->super); ++ self->remote_memh_cache = NULL; ++ ++ if (iface->config.enable_cache) { ++ snprintf(target_name, sizeof(target_name), "dest:%d", *(pid_t*)iface_addr); ++ status = uct_cuda_ipc_create_cache(&self->remote_memh_cache, target_name); ++ if (status != UCS_OK) { ++ ucs_error("could not create create cuda ipc cache: %s", ++ ucs_status_string(status)); ++ return status; ++ } ++ } ++ ++ return UCS_OK; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(uct_cuda_ipc_ep_t) ++{ ++ if (self->remote_memh_cache) { ++ uct_cuda_ipc_destroy_cache(self->remote_memh_cache); ++ } ++} ++ ++UCS_CLASS_DEFINE(uct_cuda_ipc_ep_t, uct_base_ep_t) ++UCS_CLASS_DEFINE_NEW_FUNC(uct_cuda_ipc_ep_t, uct_ep_t, uct_iface_t*, ++ const uct_device_addr_t *, const uct_iface_addr_t *); ++UCS_CLASS_DEFINE_DELETE_FUNC(uct_cuda_ipc_ep_t, uct_ep_t); ++ ++#define uct_cuda_ipc_trace_data(_addr, _rkey, _fmt, ...) \ ++ ucs_trace_data(_fmt " to %"PRIx64"(%+ld)", ## __VA_ARGS__, (_addr), (_rkey)) ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++uct_cuda_ipc_post_cuda_async_copy(uct_ep_h tl_ep, uint64_t remote_addr, ++ const uct_iov_t *iov, uct_rkey_t rkey, ++ uct_completion_t *comp, int direction) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_cuda_ipc_iface_t); ++ uct_cuda_ipc_ep_t *ep = ucs_derived_of(tl_ep, uct_cuda_ipc_ep_t); ++ uct_cuda_ipc_key_t *key = (uct_cuda_ipc_key_t *) rkey; ++ void *mapped_rem_addr; ++ void *mapped_addr; ++ uct_cuda_ipc_event_desc_t *cuda_ipc_event; ++ ucs_queue_head_t *outstanding_queue; ++ ucs_status_t status; ++ CUdeviceptr dst, src; ++ CUdevice cu_device; ++ CUstream stream; ++ size_t offset; ++ ++ if (0 == iov[0].length) { ++ ucs_trace_data("Zero length request: skip it"); ++ return UCS_OK; ++ } ++ ++ UCT_CUDA_IPC_GET_DEVICE(cu_device); ++ ++ status = iface->map_memhandle((void *)ep->remote_memh_cache, key, &mapped_addr); ++ if (status != UCS_OK) { ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ offset = (uintptr_t)remote_addr - (uintptr_t)key->d_bptr; ++ mapped_rem_addr = (void *) ((uintptr_t) mapped_addr + offset); ++ ucs_assert(offset <= key->b_len); ++ ++ if (!iface->streams_initialized) { ++ status = uct_cuda_ipc_iface_init_streams(iface); ++ if (UCS_OK != status) { ++ return status; ++ } ++ } ++ ++ stream = iface->stream_d2d[key->dev_num]; ++ outstanding_queue = &iface->outstanding_d2d_event_q; ++ cuda_ipc_event = ucs_mpool_get(&iface->event_desc); ++ ++ if (ucs_unlikely(cuda_ipc_event == NULL)) { ++ ucs_error("Failed to allocate cuda_ipc event object"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ dst = (CUdeviceptr) ++ ((direction == UCT_CUDA_IPC_PUT) ? mapped_rem_addr : iov[0].buffer); ++ src = (CUdeviceptr) ++ ((direction == UCT_CUDA_IPC_PUT) ? iov[0].buffer : mapped_rem_addr); ++ ++ status = UCT_CUDADRV_FUNC(cuMemcpyDtoDAsync(dst, src, iov[0].length, stream)); ++ if (UCS_OK != status) { ++ ucs_mpool_put(cuda_ipc_event); ++ return status; ++ } ++ ++ status = UCT_CUDADRV_FUNC(cuEventRecord(cuda_ipc_event->event, stream)); ++ if (UCS_OK != status) { ++ ucs_mpool_put(cuda_ipc_event); ++ return status; ++ } ++ ++ ucs_queue_push(outstanding_queue, &cuda_ipc_event->queue); ++ cuda_ipc_event->comp = comp; ++ cuda_ipc_event->mapped_addr = mapped_addr; ++ ucs_trace("cuMemcpyDtoDAsync issued :%p dst:%p, src:%p len:%ld", ++ cuda_ipc_event, (void *) dst, (void *) src, iov[0].length); ++ return UCS_INPROGRESS; ++} ++ ++ucs_status_t uct_cuda_ipc_ep_get_zcopy(uct_ep_h tl_ep, const uct_iov_t *iov, size_t iovcnt, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) ++{ ++ ucs_status_t status; ++ ++ status = uct_cuda_ipc_post_cuda_async_copy(tl_ep, remote_addr, iov, ++ rkey, comp, UCT_CUDA_IPC_GET); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), GET, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ uct_cuda_ipc_trace_data(remote_addr, rkey, "GET_ZCOPY [length %zu]", ++ uct_iov_total_length(iov, iovcnt)); ++ return status; ++} ++ ++ucs_status_t uct_cuda_ipc_ep_put_zcopy(uct_ep_h tl_ep, const uct_iov_t *iov, size_t iovcnt, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) ++{ ++ ucs_status_t status; ++ ++ status = uct_cuda_ipc_post_cuda_async_copy(tl_ep, remote_addr, iov, ++ rkey, comp, UCT_CUDA_IPC_PUT); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), PUT, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ uct_cuda_ipc_trace_data(remote_addr, rkey, "PUT_ZCOPY [length %zu]", ++ uct_iov_total_length(iov, iovcnt)); ++ return status; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.h +new file mode 100644 +index 000000000..464380686 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_ep.h +@@ -0,0 +1,37 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCT_CUDA_IPC_EP_H ++#define UCT_CUDA_IPC_EP_H ++ ++#include ++#include ++#include ++#include "cuda_ipc_md.h" ++#include "cuda_ipc_cache.h" ++ ++typedef struct uct_cuda_ipc_ep_addr { ++ int ep_id; ++} uct_cuda_ipc_ep_addr_t; ++ ++typedef struct uct_cuda_ipc_ep { ++ uct_base_ep_t super; ++ uct_cuda_ipc_cache_t *remote_memh_cache; ++} uct_cuda_ipc_ep_t; ++ ++UCS_CLASS_DECLARE_NEW_FUNC(uct_cuda_ipc_ep_t, uct_ep_t, uct_iface_t*, ++ const uct_device_addr_t *, const uct_iface_addr_t *); ++UCS_CLASS_DECLARE_DELETE_FUNC(uct_cuda_ipc_ep_t, uct_ep_t); ++ ++ucs_status_t uct_cuda_ipc_ep_get_zcopy(uct_ep_h tl_ep, ++ const uct_iov_t *iov, size_t iovcnt, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); ++ ++ucs_status_t uct_cuda_ipc_ep_put_zcopy(uct_ep_h tl_ep, ++ const uct_iov_t *iov, size_t iovcnt, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c +new file mode 100644 +index 000000000..785bdc088 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.c +@@ -0,0 +1,358 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#include "cuda_ipc_iface.h" ++#include "cuda_ipc_md.h" ++#include "cuda_ipc_ep.h" ++ ++#include ++#include ++ ++ ++static ucs_config_field_t uct_cuda_ipc_iface_config_table[] = { ++ ++ {"", "", NULL, ++ ucs_offsetof(uct_cuda_ipc_iface_config_t, super), ++ UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, ++ ++ {"MAX_POLL", "16", ++ "Max number of event completions to pick during cuda events polling", ++ ucs_offsetof(uct_cuda_ipc_iface_config_t, max_poll), UCS_CONFIG_TYPE_UINT}, ++ ++ {"CACHE", "y", ++ "Enable remote endpoint IPC memhandle mapping cache", ++ ucs_offsetof(uct_cuda_ipc_iface_config_t, enable_cache), ++ UCS_CONFIG_TYPE_BOOL}, ++ ++ {NULL} ++}; ++ ++ ++/* Forward declaration for the delete function */ ++static void UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_ipc_iface_t)(uct_iface_t*); ++ ++ ++static uint64_t uct_cuda_ipc_iface_node_guid(uct_base_iface_t *iface) ++{ ++ return ucs_machine_guid() * ++ ucs_string_to_id(iface->md->component->name); ++} ++ ++ucs_status_t uct_cuda_ipc_iface_get_device_address(uct_iface_t *tl_iface, ++ uct_device_addr_t *addr) ++{ ++ uct_base_iface_t *iface = ucs_derived_of(tl_iface, uct_base_iface_t); ++ ++ *(uint64_t*)addr = uct_cuda_ipc_iface_node_guid(iface); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_iface_get_address(uct_iface_h tl_iface, ++ uct_iface_addr_t *iface_addr) ++{ ++ *(pid_t*)iface_addr = getpid(); ++ return UCS_OK; ++} ++ ++static int uct_cuda_ipc_iface_is_reachable(const uct_iface_h tl_iface, ++ const uct_device_addr_t *dev_addr, ++ const uct_iface_addr_t *iface_addr) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_ipc_iface_t); ++ ++ return ((uct_cuda_ipc_iface_node_guid(&iface->super) == ++ *((const uint64_t *)dev_addr)) && ((getpid() != *(pid_t *)iface_addr))); ++} ++ ++static ucs_status_t uct_cuda_ipc_iface_query(uct_iface_h iface, ++ uct_iface_attr_t *iface_attr) ++{ ++ memset(iface_attr, 0, sizeof(uct_iface_attr_t)); ++ iface_attr->iface_addr_len = sizeof(pid_t); ++ iface_attr->device_addr_len = sizeof(uint64_t); ++ iface_attr->ep_addr_len = 0; ++ iface_attr->max_conn_priv = 0; ++ iface_attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_PENDING | ++ UCT_IFACE_FLAG_GET_ZCOPY | ++ UCT_IFACE_FLAG_PUT_ZCOPY; ++ ++ iface_attr->cap.put.max_short = 0; ++ iface_attr->cap.put.max_bcopy = 0; ++ iface_attr->cap.put.min_zcopy = 0; ++ iface_attr->cap.put.max_zcopy = UCT_CUDA_IPC_MAX_ALLOC_SZ; ++ iface_attr->cap.put.opt_zcopy_align = 1; ++ iface_attr->cap.put.align_mtu = iface_attr->cap.put.opt_zcopy_align; ++ iface_attr->cap.put.max_iov = 1; ++ ++ iface_attr->cap.get.max_bcopy = 0; ++ iface_attr->cap.get.min_zcopy = 0; ++ iface_attr->cap.get.max_zcopy = UCT_CUDA_IPC_MAX_ALLOC_SZ; ++ iface_attr->cap.get.opt_zcopy_align = 1; ++ iface_attr->cap.get.align_mtu = iface_attr->cap.get.opt_zcopy_align; ++ iface_attr->cap.get.max_iov = 1; ++ ++ iface_attr->latency.overhead = 1e-9; ++ iface_attr->latency.growth = 0; ++ iface_attr->bandwidth = 6911 * 1024.0 * 1024.0; ++ iface_attr->overhead = 0; ++ iface_attr->priority = 0; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t ++uct_cuda_ipc_iface_flush(uct_iface_h tl_iface, unsigned flags, ++ uct_completion_t *comp) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_ipc_iface_t); ++ ++ if (comp != NULL) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ if (ucs_queue_is_empty(&iface->outstanding_d2d_event_q)) { ++ UCT_TL_IFACE_STAT_FLUSH(ucs_derived_of(tl_iface, uct_base_iface_t)); ++ return UCS_OK; ++ } ++ ++ UCT_TL_IFACE_STAT_FLUSH_WAIT(ucs_derived_of(tl_iface, uct_base_iface_t)); ++ return UCS_INPROGRESS; ++} ++ ++static UCS_F_ALWAYS_INLINE unsigned ++uct_cuda_ipc_progress_event_q(uct_cuda_ipc_iface_t *iface, ++ ucs_queue_head_t *event_q, unsigned max_events) ++{ ++ unsigned count = 0; ++ uct_cuda_ipc_event_desc_t *cuda_ipc_event; ++ ucs_queue_iter_t iter; ++ ucs_status_t status; ++ ++ ucs_queue_for_each_safe(cuda_ipc_event, iter, event_q, queue) { ++ status = UCT_CUDADRV_FUNC(cuEventQuery(cuda_ipc_event->event)); ++ if (UCS_INPROGRESS == status) { ++ continue; ++ } else if (UCS_OK != status) { ++ return status; ++ } ++ ++ ucs_queue_del_iter(event_q, iter); ++ if (cuda_ipc_event->comp != NULL) { ++ uct_invoke_completion(cuda_ipc_event->comp, UCS_OK); ++ } ++ ++ status = iface->unmap_memhandle(cuda_ipc_event->mapped_addr); ++ if (status != UCS_OK) { ++ ucs_fatal("failed to unmap addr:%p", cuda_ipc_event->mapped_addr); ++ } ++ ++ ucs_trace_poll("CUDA_IPC Event Done :%p", cuda_ipc_event); ++ ucs_mpool_put(cuda_ipc_event); ++ count++; ++ ++ if (count >= max_events) { ++ break; ++ } ++ } ++ ++ return count; ++} ++ ++static unsigned uct_cuda_ipc_iface_progress(uct_iface_h tl_iface) ++{ ++ uct_cuda_ipc_iface_t *iface = ucs_derived_of(tl_iface, uct_cuda_ipc_iface_t); ++ unsigned max_events = iface->config.max_poll; ++ ++ return uct_cuda_ipc_progress_event_q(iface, &iface->outstanding_d2d_event_q, ++ max_events); ++} ++ ++static uct_iface_ops_t uct_cuda_ipc_iface_ops = { ++ .ep_get_zcopy = uct_cuda_ipc_ep_get_zcopy, ++ .ep_put_zcopy = uct_cuda_ipc_ep_put_zcopy, ++ .ep_pending_add = ucs_empty_function_return_busy, ++ .ep_pending_purge = ucs_empty_function, ++ .ep_flush = uct_base_ep_flush, ++ .ep_fence = uct_base_ep_fence, ++ .ep_create_connected = UCS_CLASS_NEW_FUNC_NAME(uct_cuda_ipc_ep_t), ++ .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_ipc_ep_t), ++ .iface_flush = uct_cuda_ipc_iface_flush, ++ .iface_fence = uct_base_iface_fence, ++ .iface_progress_enable = uct_base_iface_progress_enable, ++ .iface_progress_disable = uct_base_iface_progress_disable, ++ .iface_progress = uct_cuda_ipc_iface_progress, ++ .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_cuda_ipc_iface_t), ++ .iface_query = uct_cuda_ipc_iface_query, ++ .iface_get_device_address = uct_cuda_ipc_iface_get_device_address, ++ .iface_get_address = uct_cuda_ipc_iface_get_address, ++ .iface_is_reachable = uct_cuda_ipc_iface_is_reachable, ++}; ++ ++static void uct_cuda_ipc_event_desc_init(ucs_mpool_t *mp, void *obj, void *chunk) ++{ ++ uct_cuda_ipc_event_desc_t *base = (uct_cuda_ipc_event_desc_t *) obj; ++ ++ memset(base, 0, sizeof(*base)); ++ UCT_CUDADRV_FUNC(cuEventCreate(&base->event, CU_EVENT_DISABLE_TIMING)); ++} ++ ++static void uct_cuda_ipc_event_desc_cleanup(ucs_mpool_t *mp, void *obj) ++{ ++ uct_cuda_ipc_event_desc_t *base = (uct_cuda_ipc_event_desc_t *) obj; ++ ++ UCT_CUDADRV_FUNC(cuEventDestroy(base->event)); ++} ++ ++ucs_status_t uct_cuda_ipc_iface_init_streams(uct_cuda_ipc_iface_t *iface) ++{ ++ ucs_status_t status; ++ int i; ++ ++ for (i = 0; i < iface->device_count; i++) { ++ status = UCT_CUDADRV_FUNC(cuStreamCreate(&iface->stream_d2d[i], ++ CU_STREAM_NON_BLOCKING)); ++ if (UCS_OK != status) { ++ return status; ++ } ++ } ++ ++ iface->streams_initialized = 1; ++ ++ return UCS_OK; ++} ++ ++static ucs_mpool_ops_t uct_cuda_ipc_event_desc_mpool_ops = { ++ .chunk_alloc = ucs_mpool_chunk_malloc, ++ .chunk_release = ucs_mpool_chunk_free, ++ .obj_init = uct_cuda_ipc_event_desc_init, ++ .obj_cleanup = uct_cuda_ipc_event_desc_cleanup, ++}; ++ ++ucs_status_t uct_cuda_ipc_map_memhandle(void *arg, uct_cuda_ipc_key_t *key, ++ void **mapped_addr) ++{ ++ return UCT_CUDADRV_FUNC(cuIpcOpenMemHandle((CUdeviceptr *)mapped_addr, ++ key->ph, CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS)); ++} ++ ++ucs_status_t uct_cuda_ipc_unmap_memhandle(void *mapped_addr) ++{ ++ return UCT_CUDADRV_FUNC(cuIpcCloseMemHandle((CUdeviceptr)mapped_addr)); ++} ++ ++static UCS_CLASS_INIT_FUNC(uct_cuda_ipc_iface_t, uct_md_h md, uct_worker_h worker, ++ const uct_iface_params_t *params, ++ const uct_iface_config_t *tl_config) ++{ ++ uct_cuda_ipc_iface_config_t *config = NULL; ++ ucs_status_t status; ++ int dev_count; ++ ++ config = ucs_derived_of(tl_config, uct_cuda_ipc_iface_config_t); ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &uct_cuda_ipc_iface_ops, md, worker, ++ params, tl_config UCS_STATS_ARG(params->stats_root) ++ UCS_STATS_ARG(UCT_CUDA_IPC_TL_NAME)); ++ ++ if (strncmp(params->mode.device.dev_name, ++ UCT_CUDA_IPC_DEV_NAME, strlen(UCT_CUDA_IPC_DEV_NAME)) != 0) { ++ ucs_error("No device was found: %s", params->mode.device.dev_name); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ status = UCT_CUDADRV_FUNC(cuDeviceGetCount(&dev_count)); ++ if (UCS_OK != status) { ++ return status; ++ } ++ ucs_assert(dev_count <= UCT_CUDA_IPC_MAX_PEERS); ++ ++ self->device_count = dev_count; ++ self->config.max_poll = config->max_poll; ++ self->config.enable_cache = config->enable_cache; ++ ++ if (self->config.enable_cache) { ++ self->map_memhandle = uct_cuda_ipc_cache_map_memhandle; ++ self->unmap_memhandle = ucs_empty_function_return_success; ++ } else { ++ self->map_memhandle = uct_cuda_ipc_map_memhandle; ++ self->unmap_memhandle = uct_cuda_ipc_unmap_memhandle; ++ } ++ ++ status = ucs_mpool_init(&self->event_desc, ++ 0, ++ sizeof(uct_cuda_ipc_event_desc_t), ++ 0, ++ UCS_SYS_CACHE_LINE_SIZE, ++ 128, ++ 1024, ++ &uct_cuda_ipc_event_desc_mpool_ops, ++ "CUDA_IPC EVENT objects"); ++ if (UCS_OK != status) { ++ ucs_error("mpool creation failed"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ self->streams_initialized = 0; ++ ucs_queue_head_init(&self->outstanding_d2d_event_q); ++ return UCS_OK; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(uct_cuda_ipc_iface_t) ++{ ++ ucs_status_t status; ++ int i; ++ ++ if (self->streams_initialized) { ++ for (i = 0; i < self->device_count; i++) { ++ status = UCT_CUDADRV_FUNC(cuStreamDestroy(self->stream_d2d[i])); ++ if (UCS_OK != status) { ++ continue; ++ } ++ } ++ self->streams_initialized = 0; ++ } ++ ++ uct_base_iface_progress_disable(&self->super.super, ++ UCT_PROGRESS_SEND | UCT_PROGRESS_RECV); ++ ucs_mpool_cleanup(&self->event_desc, 1); ++} ++ ++UCS_CLASS_DEFINE(uct_cuda_ipc_iface_t, uct_base_iface_t); ++UCS_CLASS_DEFINE_NEW_FUNC(uct_cuda_ipc_iface_t, uct_iface_t, uct_md_h, uct_worker_h, ++ const uct_iface_params_t*, const uct_iface_config_t*); ++static UCS_CLASS_DEFINE_DELETE_FUNC(uct_cuda_ipc_iface_t, uct_iface_t); ++ ++static ucs_status_t uct_cuda_ipc_query_tl_resources(uct_md_h md, ++ uct_tl_resource_desc_t **resource_p, ++ unsigned *num_resources_p) ++{ ++ uct_tl_resource_desc_t *resource; ++ ++ resource = ucs_calloc(1, sizeof(uct_tl_resource_desc_t), "resource desc"); ++ if (NULL == resource) { ++ ucs_error("Failed to allocate memory"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ ucs_snprintf_zero(resource->tl_name, sizeof(resource->tl_name), "%s", ++ UCT_CUDA_IPC_TL_NAME); ++ ucs_snprintf_zero(resource->dev_name, sizeof(resource->dev_name), "%s", ++ UCT_CUDA_IPC_DEV_NAME); ++ resource->dev_type = UCT_DEVICE_TYPE_ACC; ++ ++ *num_resources_p = 1; ++ *resource_p = resource; ++ return UCS_OK; ++} ++ ++UCT_TL_COMPONENT_DEFINE(uct_cuda_ipc_tl, ++ uct_cuda_ipc_query_tl_resources, ++ uct_cuda_ipc_iface_t, ++ UCT_CUDA_IPC_TL_NAME, ++ "CUDA_IPC_", ++ uct_cuda_ipc_iface_config_table, ++ uct_cuda_ipc_iface_config_t); ++UCT_MD_REGISTER_TL(&uct_cuda_ipc_md_component, &uct_cuda_ipc_tl); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.h +new file mode 100644 +index 000000000..a1e3060ca +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_iface.h +@@ -0,0 +1,57 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_IPC_IFACE_H ++#define UCT_CUDA_IPC_IFACE_H ++ ++#include ++#include ++#include ++#include ++ ++#include "cuda_ipc_md.h" ++ ++ ++#define UCT_CUDA_IPC_TL_NAME "cuda_ipc" ++#define UCT_CUDA_IPC_DEV_NAME "cudaipc0" ++#define UCT_CUDA_IPC_MAX_PEERS 16 ++ ++ ++typedef struct uct_cuda_ipc_iface { ++ uct_base_iface_t super; ++ ucs_mpool_t event_desc; /* cuda event desc */ ++ ucs_queue_head_t outstanding_d2d_event_q; /* stream for outstanding d2d */ ++ int device_count; ++ int streams_initialized; /* indicates if stream created */ ++ CUstream stream_d2d[UCT_CUDA_IPC_MAX_PEERS]; ++ /* per-peer stream */ ++ struct { ++ unsigned max_poll; /* query attempts w.o success */ ++ int enable_cache; /* enable/disable ipc handle cache */ ++ } config; ++ ucs_status_t (*map_memhandle)(void *context, uct_cuda_ipc_key_t *key, ++ void **map_addr); ++ ucs_status_t (*unmap_memhandle)(void *map_addr); ++} uct_cuda_ipc_iface_t; ++ ++ ++typedef struct uct_cuda_ipc_iface_config { ++ uct_iface_config_t super; ++ unsigned max_poll; ++ int enable_cache; ++} uct_cuda_ipc_iface_config_t; ++ ++ ++typedef struct uct_cuda_ipc_event_desc { ++ CUevent event; ++ void *mapped_addr; ++ uct_completion_t *comp; ++ ucs_queue_elem_t queue; ++} uct_cuda_ipc_event_desc_t; ++ ++ ++ucs_status_t uct_cuda_ipc_iface_init_streams(uct_cuda_ipc_iface_t *iface); ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.c +new file mode 100644 +index 000000000..23212640c +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.c +@@ -0,0 +1,184 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#include "cuda_ipc_md.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++static ucs_config_field_t uct_cuda_ipc_md_config_table[] = { ++ {"", "", NULL, ++ ucs_offsetof(uct_cuda_ipc_md_config_t, super), UCS_CONFIG_TYPE_TABLE(uct_md_config_table)}, ++ ++ {NULL} ++}; ++ ++static ucs_status_t uct_cuda_ipc_md_query(uct_md_h md, uct_md_attr_t *md_attr) ++{ ++ md_attr->cap.flags = UCT_MD_FLAG_REG | ++ UCT_MD_FLAG_NEED_RKEY; ++ md_attr->cap.reg_mem_types = UCS_BIT(UCT_MD_MEM_TYPE_CUDA); ++ md_attr->cap.mem_type = UCT_MD_MEM_TYPE_CUDA; ++ md_attr->cap.max_alloc = 0; ++ md_attr->cap.max_reg = UCT_CUDA_IPC_MAX_ALLOC_SZ; ++ md_attr->rkey_packed_size = sizeof(uct_cuda_ipc_key_t); ++ md_attr->reg_cost.overhead = 0; ++ md_attr->reg_cost.growth = 0; ++ memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus)); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_mkey_pack(uct_md_h md, uct_mem_h memh, ++ void *rkey_buffer) ++{ ++ uct_cuda_ipc_key_t *packed = (uct_cuda_ipc_key_t *) rkey_buffer; ++ uct_cuda_ipc_key_t *mem_hndl = (uct_cuda_ipc_key_t *) memh; ++ ++ *packed = *mem_hndl; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_rkey_unpack(uct_md_component_t *mdc, ++ const void *rkey_buffer, uct_rkey_t *rkey_p, ++ void **handle_p) ++{ ++ uct_cuda_ipc_key_t *packed = (uct_cuda_ipc_key_t *) rkey_buffer; ++ uct_cuda_ipc_key_t *key; ++ ucs_status_t status; ++ CUdevice cu_device; ++ int peer_accessble; ++ ++ UCT_CUDA_IPC_GET_DEVICE(cu_device); ++ ++ status = UCT_CUDADRV_FUNC(cuDeviceCanAccessPeer(&peer_accessble, ++ cu_device, packed->dev_num)); ++ if ((status != UCS_OK) || (peer_accessble == 0)) { ++ return UCS_ERR_UNREACHABLE; ++ } ++ ++ key = ucs_malloc(sizeof(uct_cuda_ipc_key_t), "uct_cuda_ipc_key_t"); ++ if (NULL == key) { ++ ucs_error("failed to allocate memory for uct_cuda_ipc_key_t"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ *key = *packed; ++ *handle_p = NULL; ++ *rkey_p = (uintptr_t) key; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_rkey_release(uct_md_component_t *mdc, uct_rkey_t rkey, ++ void *handle) ++{ ++ ucs_assert(NULL == handle); ++ ucs_free((void *)rkey); ++ return UCS_OK; ++} ++ ++static ucs_status_t ++uct_cuda_ipc_mem_reg_internal(uct_md_h uct_md, void *addr, size_t length, ++ unsigned flags, uct_cuda_ipc_key_t *key) ++{ ++ CUdevice cu_device; ++ ucs_status_t status; ++ ++ if (!length) { ++ return UCS_OK; ++ } ++ ++ status = UCT_CUDADRV_FUNC(cuIpcGetMemHandle(&(key->ph), (CUdeviceptr) addr)); ++ if (UCS_OK != status) { ++ return status; ++ } ++ ++ UCT_CUDA_IPC_GET_DEVICE(cu_device); ++ ++ UCT_CUDADRV_FUNC(cuMemGetAddressRange(&(key->d_bptr), ++ &(key->b_len), ++ (CUdeviceptr) addr)); ++ key->dev_num = (int) cu_device; ++ ucs_trace("registered memory:%p..%p length:%lu dev_num:%d", ++ addr, addr + length, length, (int) cu_device); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_mem_reg(uct_md_h md, void *address, size_t length, ++ unsigned flags, uct_mem_h *memh_p) ++{ ++ uct_cuda_ipc_key_t *key; ++ ++ key = ucs_malloc(sizeof(uct_cuda_ipc_key_t), "uct_cuda_ipc_key_t"); ++ if (NULL == key) { ++ ucs_error("failed to allocate memory for uct_cuda_ipc_key_t"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ if (UCS_OK != uct_cuda_ipc_mem_reg_internal(md, address, length, 0, key)) { ++ ucs_free(key); ++ return UCS_ERR_IO_ERROR; ++ } ++ *memh_p = key; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_mem_dereg(uct_md_h md, uct_mem_h memh) ++{ ++ ucs_free(memh); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_cuda_ipc_query_md_resources(uct_md_resource_desc_t **resources_p, ++ unsigned *num_resources_p) ++{ ++ int num_gpus; ++ cudaError_t cudaErr; ++ ++ cudaErr = cudaGetDeviceCount(&num_gpus); ++ if ((cudaErr!= cudaSuccess) || (num_gpus == 0)) { ++ ucs_debug("Not found cuda devices"); ++ *resources_p = NULL; ++ *num_resources_p = 0; ++ return UCS_OK; ++ } ++ ++ return uct_single_md_resource(&uct_cuda_ipc_md_component, resources_p, num_resources_p); ++} ++ ++static ucs_status_t uct_cuda_ipc_md_open(const char *md_name, const uct_md_config_t *md_config, ++ uct_md_h *md_p) ++{ ++ static uct_md_ops_t md_ops = { ++ .close = (void*)ucs_empty_function, ++ .query = uct_cuda_ipc_md_query, ++ .mkey_pack = uct_cuda_ipc_mkey_pack, ++ .mem_reg = uct_cuda_ipc_mem_reg, ++ .mem_dereg = uct_cuda_ipc_mem_dereg, ++ .is_mem_type_owned = uct_cuda_is_mem_type_owned, ++ }; ++ static uct_md_t md = { ++ .ops = &md_ops, ++ .component = &uct_cuda_ipc_md_component ++ }; ++ ++ *md_p = &md; ++ return UCS_OK; ++} ++ ++UCT_MD_COMPONENT_DEFINE(uct_cuda_ipc_md_component, UCT_CUDA_IPC_MD_NAME, ++ uct_cuda_ipc_query_md_resources, uct_cuda_ipc_md_open, NULL, ++ uct_cuda_ipc_rkey_unpack, uct_cuda_ipc_rkey_release, "CUDA_IPC_", ++ uct_cuda_ipc_md_config_table, uct_cuda_ipc_md_config_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.h +new file mode 100644 +index 000000000..b36fa4e36 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/cuda_ipc/cuda_ipc_md.h +@@ -0,0 +1,56 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_CUDA_IPC_MD_H ++#define UCT_CUDA_IPC_MD_H ++ ++#include ++#include ++#include ++ ++ ++#define UCT_CUDA_IPC_MD_NAME "cuda_ipc" ++#define UCT_CUDA_IPC_MAX_ALLOC_SZ (1 << 30) ++ ++ ++extern uct_md_component_t uct_cuda_ipc_md_component; ++ ++ ++/** ++ * @brief cuda ipc MD descriptor ++ */ ++typedef struct uct_cuda_ipc_md { ++ struct uct_md super; /**< Domain info */ ++} uct_cuda_ipc_md_t; ++ ++ ++/** ++ * @brief cuda ipc domain configuration. ++ */ ++typedef struct uct_cuda_ipc_md_config { ++ uct_md_config_t super; ++} uct_cuda_ipc_md_config_t; ++ ++ ++/** ++ * @brief cuda_ipc packed and remote key for put/get ++ */ ++typedef struct uct_cuda_ipc_key { ++ CUipcMemHandle ph; /* Memory handle of GPU memory */ ++ CUdeviceptr d_bptr; /* Allocation base address */ ++ size_t b_len; /* Allocation size */ ++ int dev_num; /* GPU Device number */ ++} uct_cuda_ipc_key_t; ++ ++ ++#define UCT_CUDA_IPC_GET_DEVICE(_cu_device) \ ++ do { \ ++ if (UCS_OK != UCT_CUDADRV_FUNC(cuCtxGetDevice(&_cu_device))) { \ ++ return UCS_ERR_IO_ERROR; \ ++ } \ ++ } while(0); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.c +index 8cc1da497..3cd339ed7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.c +@@ -42,7 +42,7 @@ ucs_status_t uct_gdr_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, + + if (ucs_likely(length)) { + bar_offset = remote_addr - gdr_copy_key->vaddr; +- ret = gdr_copy_to_bar((gdr_copy_key->bar_ptr + bar_offset), buffer, length); ++ ret = gdr_copy_to_bar(gdr_copy_key->bar_ptr + bar_offset, buffer, length); + if (ret) { + ucs_error("gdr_copy_to_bar failed. ret:%d", ret); + return UCS_ERR_IO_ERROR; +@@ -54,3 +54,26 @@ ucs_status_t uct_gdr_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, + length, buffer, (void *)remote_addr); + return UCS_OK; + } ++ ++ucs_status_t uct_gdr_copy_ep_get_short(uct_ep_h tl_ep, void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) ++{ ++ uct_gdr_copy_key_t *gdr_copy_key = (uct_gdr_copy_key_t *) rkey; ++ size_t bar_offset; ++ int ret; ++ ++ if (ucs_likely(length)) { ++ bar_offset = remote_addr - gdr_copy_key->vaddr; ++ ret = gdr_copy_from_bar(buffer, gdr_copy_key->bar_ptr + bar_offset, length); ++ if (ret) { ++ ucs_error("gdr_copy_from_bar failed. ret:%d", ret); ++ return UCS_ERR_IO_ERROR; ++ } ++ } ++ ++ UCT_TL_EP_STAT_OP(ucs_derived_of(tl_ep, uct_base_ep_t), GET, SHORT, length); ++ ucs_trace_data("GET_SHORT size %d from %p to %p", ++ length, (void *)remote_addr, buffer); ++ return UCS_OK; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.h +index 3ce697cbb..2a09cdfbd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_ep.h +@@ -31,4 +31,8 @@ ucs_status_t uct_gdr_copy_ep_put_short(uct_ep_h tl_ep, const void *buffer, + unsigned length, uint64_t remote_addr, + uct_rkey_t rkey); + ++ucs_status_t uct_gdr_copy_ep_get_short(uct_ep_h tl_ep, void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.c +index 746b985f5..eae362cf1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.c +@@ -26,17 +26,20 @@ static void UCS_CLASS_DELETE_FUNC_NAME(uct_gdr_copy_iface_t)(uct_iface_t*); + static ucs_status_t uct_gdr_copy_iface_get_address(uct_iface_h tl_iface, + uct_iface_addr_t *iface_addr) + { +- int *gdr_copy_addr = (int*)iface_addr; ++ uct_gdr_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_gdr_copy_iface_t); + +- *gdr_copy_addr = 0; ++ *(uct_gdr_copy_iface_addr_t*)iface_addr = iface->id; + return UCS_OK; + } + +-static int uct_gdr_copy_iface_is_reachable(const uct_iface_h iface, ++static int uct_gdr_copy_iface_is_reachable(const uct_iface_h tl_iface, + const uct_device_addr_t *dev_addr, + const uct_iface_addr_t *iface_addr) + { +- return 1; ++ uct_gdr_copy_iface_t *iface = ucs_derived_of(tl_iface, uct_gdr_copy_iface_t); ++ uct_gdr_copy_iface_addr_t *addr = (uct_gdr_copy_iface_addr_t*)iface_addr; ++ ++ return (addr != NULL) && (iface->id == *addr); + } + + static ucs_status_t uct_gdr_copy_iface_query(uct_iface_h iface, +@@ -44,11 +47,12 @@ static ucs_status_t uct_gdr_copy_iface_query(uct_iface_h iface, + { + memset(iface_attr, 0, sizeof(uct_iface_attr_t)); + +- iface_attr->iface_addr_len = sizeof(int); ++ iface_attr->iface_addr_len = sizeof(uct_gdr_copy_iface_addr_t); + iface_attr->device_addr_len = 0; + iface_attr->ep_addr_len = 0; + iface_attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | +- UCT_IFACE_FLAG_PUT_SHORT; ++ UCT_IFACE_FLAG_PUT_SHORT | ++ UCT_IFACE_FLAG_GET_SHORT; + + iface_attr->cap.put.max_short = UINT_MAX; + iface_attr->cap.put.max_bcopy = 0; +@@ -58,6 +62,7 @@ static ucs_status_t uct_gdr_copy_iface_query(uct_iface_h iface, + iface_attr->cap.put.align_mtu = iface_attr->cap.put.opt_zcopy_align; + iface_attr->cap.put.max_iov = 1; + ++ iface_attr->cap.get.max_short = UINT_MAX; + iface_attr->cap.get.max_bcopy = 0; + iface_attr->cap.get.min_zcopy = 0; + iface_attr->cap.get.max_zcopy = 0; +@@ -85,6 +90,7 @@ static ucs_status_t uct_gdr_copy_iface_query(uct_iface_h iface, + + static uct_iface_ops_t uct_gdr_copy_iface_ops = { + .ep_put_short = uct_gdr_copy_ep_put_short, ++ .ep_get_short = uct_gdr_copy_ep_get_short, + .ep_pending_add = ucs_empty_function_return_busy, + .ep_pending_purge = ucs_empty_function, + .ep_flush = uct_base_ep_flush, +@@ -117,6 +123,8 @@ static UCS_CLASS_INIT_FUNC(uct_gdr_copy_iface_t, uct_md_h md, uct_worker_h worke + return UCS_ERR_NO_DEVICE; + } + ++ self->id = ucs_generate_uuid((uintptr_t)self); ++ + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.h +index 3ecb41a14..882ec9c99 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_iface.h +@@ -10,11 +10,15 @@ + + + #define UCT_GDR_COPY_TL_NAME "gdr_copy" +-#define UCT_CUDA_DEV_NAME "gdrcopy0" ++#define UCT_CUDA_DEV_NAME "gdrcopy0" ++ ++ ++typedef uint64_t uct_gdr_copy_iface_addr_t; + + + typedef struct uct_gdr_copy_iface { +- uct_base_iface_t super; ++ uct_base_iface_t super; ++ uct_gdr_copy_iface_addr_t id; + } uct_gdr_copy_iface_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.c +index 70a7f36c1..10aea7d28 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.c +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2017. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2017-2018. ALL RIGHTS RESERVED. + * See file LICENSE for terms. + */ + +@@ -9,10 +9,11 @@ + #include + #include + #include ++#include + #include + #include +-#include +-#include ++#include ++#include + + #define UCT_GDR_COPY_MD_RCACHE_DEFAULT_ALIGN 65536 + +@@ -178,8 +179,7 @@ static ucs_status_t uct_gdr_copy_mem_reg(uct_md_h uct_md, void *address, size_t + unsigned flags, uct_mem_h *memh_p) + { + uct_gdr_copy_mem_t *mem_hndl = NULL; +- size_t reg_size; +- void *ptr; ++ void *start, *end; + ucs_status_t status; + + mem_hndl = ucs_malloc(sizeof(uct_gdr_copy_mem_t), "gdr_copy handle"); +@@ -188,10 +188,11 @@ static ucs_status_t uct_gdr_copy_mem_reg(uct_md_h uct_md, void *address, size_t + return UCS_ERR_NO_MEMORY; + } + +- reg_size = (length + GPU_PAGE_SIZE - 1) & GPU_PAGE_MASK; +- ptr = (void *) ((uintptr_t)address & GPU_PAGE_MASK); ++ start = ucs_align_down_pow2_ptr(address, GPU_PAGE_SIZE); ++ end = ucs_align_up_pow2_ptr(address + length, GPU_PAGE_SIZE); ++ ucs_assert_always(start <= end); + +- status = uct_gdr_copy_mem_reg_internal(uct_md, ptr, reg_size, 0, mem_hndl); ++ status = uct_gdr_copy_mem_reg_internal(uct_md, start, end - start, 0, mem_hndl); + if (status != UCS_OK) { + ucs_free(mem_hndl); + return status; +@@ -215,33 +216,6 @@ static ucs_status_t uct_gdr_copy_mem_dereg(uct_md_h uct_md, uct_mem_h memh) + return status; + } + +-static int uct_is_gdr_copy_mem_type_owned(uct_md_h md, void *addr, size_t length) +-{ +- int memory_type; +- struct cudaPointerAttributes attributes; +- cudaError_t cuda_err; +- CUresult cu_err; +- +- if (addr == NULL) { +- return 0; +- } +- +- cu_err = cuPointerGetAttribute(&memory_type, +- CU_POINTER_ATTRIBUTE_MEMORY_TYPE, +- (CUdeviceptr)addr); +- if (cu_err != CUDA_SUCCESS) { +- cuda_err = cudaPointerGetAttributes (&attributes, addr); +- if (cuda_err == cudaSuccess) { +- if (attributes.memoryType == cudaMemoryTypeDevice) { +- return 1; +- } +- } +- } else if (memory_type == CU_MEMORYTYPE_DEVICE) { +- return 1; +- } +- return 0; +-} +- + static ucs_status_t uct_gdr_copy_query_md_resources(uct_md_resource_desc_t **resources_p, + unsigned *num_resources_p) + { +@@ -293,7 +267,7 @@ static uct_md_ops_t md_ops = { + .mkey_pack = uct_gdr_copy_mkey_pack, + .mem_reg = uct_gdr_copy_mem_reg, + .mem_dereg = uct_gdr_copy_mem_dereg, +- .is_mem_type_owned = uct_is_gdr_copy_mem_type_owned, ++ .is_mem_type_owned = uct_cuda_is_mem_type_owned, + }; + + static inline uct_gdr_copy_rcache_region_t* +@@ -311,7 +285,7 @@ uct_gdr_copy_mem_rcache_reg(uct_md_h uct_md, void *address, size_t length, + ucs_status_t status; + uct_gdr_copy_mem_t *memh; + +- status = ucs_rcache_get(md->rcache, address, length, PROT_READ|PROT_WRITE, ++ status = ucs_rcache_get(md->rcache, (void *)address, length, PROT_READ|PROT_WRITE, + &flags, &rregion); + if (status != UCS_OK) { + return status; +@@ -338,12 +312,13 @@ static uct_md_ops_t md_rcache_ops = { + .mkey_pack = uct_gdr_copy_mkey_pack, + .mem_reg = uct_gdr_copy_mem_rcache_reg, + .mem_dereg = uct_gdr_copy_mem_rcache_dereg, +- .is_mem_type_owned = uct_is_gdr_copy_mem_type_owned, ++ .is_mem_type_owned = uct_cuda_is_mem_type_owned, + }; + + static ucs_status_t + uct_gdr_copy_rcache_mem_reg_cb(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *rregion) ++ void *arg, ucs_rcache_region_t *rregion, ++ uint16_t rcache_mem_reg_flags) + { + uct_gdr_copy_md_t *md = context; + int *flags = arg; +@@ -415,6 +390,7 @@ static ucs_status_t uct_gdr_copy_md_open(const char *md_name, + rcache_params.region_struct_size = sizeof(uct_gdr_copy_rcache_region_t); + rcache_params.alignment = md_config->rcache.alignment; + rcache_params.max_alignment = UCT_GDR_COPY_MD_RCACHE_DEFAULT_ALIGN; ++ rcache_params.ucm_events = UCM_EVENT_MEM_TYPE_FREE; + rcache_params.ucm_event_priority = md_config->rcache.event_prio; + rcache_params.context = md; + rcache_params.ops = &uct_gdr_copy_rcache_ops; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.h +index f6fc5051f..f9417854a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/cuda/gdr_copy/gdr_copy_md.h +@@ -7,6 +7,7 @@ + #define UCT_GDR_COPY_MD_H + + #include ++#include + #include + #include "gdrapi.h" + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.c +index 4d71c33b0..a93465548 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.c +@@ -18,6 +18,25 @@ + #include + + ++/* use both gid + lid data for key generarion (lid - ib based, gid - RoCE) */ ++static UCS_F_ALWAYS_INLINE ++khint32_t uct_ib_kh_ah_hash_func(struct ibv_ah_attr attr) ++{ ++ return kh_int64_hash_func(attr.grh.dgid.global.subnet_prefix ^ ++ attr.grh.dgid.global.interface_id ^ ++ attr.dlid); ++} ++ ++static UCS_F_ALWAYS_INLINE ++int uct_ib_kh_ah_hash_equal(struct ibv_ah_attr a, struct ibv_ah_attr b) ++{ ++ return !memcmp(&a, &b, sizeof(a)); ++} ++ ++KHASH_IMPL(uct_ib_ah, struct ibv_ah_attr, struct ibv_ah*, 1, ++ uct_ib_kh_ah_hash_func, uct_ib_kh_ah_hash_equal) ++ ++ + #if ENABLE_STATS + static ucs_stats_class_t uct_ib_device_stats_class = { + .name = "", +@@ -57,9 +76,27 @@ static uct_ib_device_spec_t uct_ib_builtin_device_specs[] = { + {0x02c9, 41682, "ConnectX-5", + UCT_IB_DEVICE_FLAG_MELLANOX | UCT_IB_DEVICE_FLAG_MLX5_PRM | + UCT_IB_DEVICE_FLAG_DC_V2, 37}, ++ {0x02c9, 4122, "ConnectX-5", ++ UCT_IB_DEVICE_FLAG_MELLANOX | UCT_IB_DEVICE_FLAG_MLX5_PRM | ++ UCT_IB_DEVICE_FLAG_DC_V2, 36}, ++ {0x02c9, 4123, "ConnectX-6", ++ UCT_IB_DEVICE_FLAG_MELLANOX | UCT_IB_DEVICE_FLAG_MLX5_PRM | ++ UCT_IB_DEVICE_FLAG_DC_V2, 50}, + {0, 0, "Generic HCA", 0, 0} + }; + ++UCS_LIST_HEAD(uct_ib_device_init_list); ++ ++#if HAVE_DECL_IBV_EXP_QUERY_GID_ATTR ++/* This struct defines the RoCE versions priorities */ ++static uct_ib_roce_version_desc_t roce_versions_priorities[] = { ++ {IBV_EXP_ROCE_V2_GID_TYPE, AF_INET, 1}, ++ {IBV_EXP_ROCE_V2_GID_TYPE, AF_INET6, 2}, ++ {IBV_EXP_IB_ROCE_V1_GID_TYPE, AF_INET, 3}, ++ {IBV_EXP_IB_ROCE_V1_GID_TYPE, AF_INET6, 4} ++}; ++#endif ++ + static void uct_ib_device_get_locailty(const char *dev_name, cpu_set_t *cpu_mask, + int *numa_node) + { +@@ -212,6 +249,7 @@ ucs_status_t uct_ib_device_init(uct_ib_device_t *dev, + struct ibv_device *ibv_device, int async_events + UCS_STATS_ARG(ucs_stats_node_t *stats_parent)) + { ++ uct_ib_device_init_entry_t *init_entry; + ucs_status_t status; + uint8_t i; + int ret; +@@ -221,7 +259,7 @@ ucs_status_t uct_ib_device_init(uct_ib_device_t *dev, + /* Open verbs context */ + dev->ibv_context = ibv_open_device(ibv_device); + if (dev->ibv_context == NULL) { +- ucs_error("Failed to open %s: %m", ibv_get_device_name(ibv_device)); ++ ucs_error("ibv_open_device(%s) failed: %m", ibv_get_device_name(ibv_device)); + status = UCS_ERR_IO_ERROR; + goto err; + } +@@ -249,6 +287,13 @@ ucs_status_t uct_ib_device_init(uct_ib_device_t *dev, + break; + } + ++ ucs_list_for_each(init_entry, &uct_ib_device_init_list, list) { ++ status = init_entry->init(dev); ++ if (status != UCS_OK) { ++ goto err_free_context; ++ } ++ } ++ + if (dev->num_ports > UCT_IB_DEV_MAX_PORTS) { + ucs_error("%s has %d ports, but only up to %d are supported", + ibv_get_device_name(ibv_device), dev->num_ports, +@@ -294,6 +339,9 @@ ucs_status_t uct_ib_device_init(uct_ib_device_t *dev, + } + } + ++ kh_init_inplace(uct_ib_ah, &dev->ah_hash); ++ ucs_spinlock_init(&dev->ah_lock); ++ + ucs_debug("initialized device '%s' (%s) with %d ports", uct_ib_device_name(dev), + ibv_node_type_str(ibv_device->node_type), + dev->num_ports); +@@ -307,10 +355,20 @@ err: + return status; + } + ++void uct_ib_device_cleanup_ah_cached(uct_ib_device_t *dev) ++{ ++ struct ibv_ah *ah; ++ ++ kh_foreach_value(&dev->ah_hash, ah, ibv_destroy_ah(ah)); ++} ++ + void uct_ib_device_cleanup(uct_ib_device_t *dev) + { + ucs_debug("destroying ib device %s", uct_ib_device_name(dev)); + ++ kh_destroy_inplace(uct_ib_ah, &dev->ah_hash); ++ ucs_spinlock_destroy(&dev->ah_lock); ++ + if (dev->async_events) { + ucs_async_remove_handler(dev->ibv_context->async_fd, 1); + } +@@ -347,11 +405,23 @@ const uct_ib_device_spec_t* uct_ib_device_spec(uct_ib_device_t *dev) + default settings for unknown devices */ + } + ++static size_t uct_ib_device_get_ib_gid_index(uct_ib_md_t *md) ++{ ++ if (md->config.gid_index == UCS_CONFIG_ULUNITS_AUTO) { ++ return UCT_IB_MD_DEFAULT_GID_INDEX; ++ } else { ++ return md->config.gid_index; ++ } ++} ++ + ucs_status_t uct_ib_device_port_check(uct_ib_device_t *dev, uint8_t port_num, + unsigned flags) + { ++ uct_ib_md_t *md = ucs_container_of(dev, uct_ib_md_t, dev); + const uct_ib_device_spec_t *dev_info; + uint8_t required_dev_flags; ++ ucs_status_t status; ++ union ibv_gid gid; + + if (port_num < dev->first_port || port_num >= dev->first_port + dev->num_ports) { + return UCS_ERR_NO_DEVICE; +@@ -370,7 +440,7 @@ ucs_status_t uct_ib_device_port_check(uct_ib_device_t *dev, uint8_t port_num, + } + + if (flags & UCT_IB_DEVICE_FLAG_DC) { +- if (!IBV_DEVICE_HAS_DC(&dev->dev_attr)) { ++ if (!IBV_DEVICE_HAS_DC(dev)) { + ucs_trace("%s:%d does not support DC", uct_ib_device_name(dev), port_num); + return UCS_ERR_UNSUPPORTED; + } +@@ -386,9 +456,131 @@ ucs_status_t uct_ib_device_port_check(uct_ib_device_t *dev, uint8_t port_num, + return UCS_ERR_UNSUPPORTED; + } + ++ if (md->check_subnet_filter && uct_ib_device_is_port_ib(dev, port_num)) { ++ status = uct_ib_device_query_gid(dev, port_num, ++ uct_ib_device_get_ib_gid_index(md), &gid); ++ if (status) { ++ return status; ++ } ++ ++ if (md->subnet_filter != gid.global.subnet_prefix) { ++ ucs_trace("%s:%d subnet_prefix does not match", ++ uct_ib_device_name(dev), port_num); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ } ++ + return UCS_OK; + } + ++static int uct_ib_device_is_addr_ipv4_mcast(const struct in6_addr *raw, ++ const uint32_t addr_last_bits) ++{ ++ /* IPv4 encoded multicast addresses */ ++ return (raw->s6_addr32[0] == htonl(0xff0e0000)) && ++ !(raw->s6_addr32[1] | addr_last_bits); ++} ++ ++static int uct_ib_device_get_addr_family(union ibv_gid *gid, int gid_index) ++{ ++ const struct in6_addr *raw = (struct in6_addr *)gid->raw; ++ const uint32_t addr_last_bits = raw->s6_addr32[2] ^ htonl(0x0000ffff); ++ char p[128]; ++ ++ ucs_debug("testing addr_family on gid index %d: %s", ++ gid_index, inet_ntop(AF_INET6, gid, p, sizeof(p))); ++ ++ if (!((raw->s6_addr32[0] | raw->s6_addr32[1]) | addr_last_bits) || ++ uct_ib_device_is_addr_ipv4_mcast(raw, addr_last_bits)) { ++ return AF_INET; ++ } else { ++ return AF_INET6; ++ } ++} ++ ++static ucs_status_t uct_ib_device_set_roce_gid_index(uct_ib_device_t *dev, ++ uint8_t port_num, ++ uint8_t *gid_index) ++{ ++ int i, gid_tbl_len = uct_ib_device_port_attr(dev, port_num)->gid_tbl_len; ++ ucs_status_t status = UCS_OK; ++#if HAVE_DECL_IBV_EXP_QUERY_GID_ATTR ++ int priorities_arr_len = ucs_static_array_size(roce_versions_priorities); ++ struct ibv_exp_gid_attr attr; ++ int prio_idx; ++#else ++ union ibv_gid gid; ++#endif ++ ++#if HAVE_DECL_IBV_EXP_QUERY_GID_ATTR ++ for (prio_idx = 0; prio_idx < priorities_arr_len; prio_idx++) { ++ for (i = 0; i < gid_tbl_len; i++) { ++ attr.comp_mask = IBV_EXP_QUERY_GID_ATTR_TYPE | IBV_EXP_QUERY_GID_ATTR_GID; ++ if (ibv_exp_query_gid_attr(dev->ibv_context, port_num, i, &attr)) { ++ ucs_error("failed to query gid attributes " ++ "(%s:%d gid_idx %d). %m", uct_ib_device_name(dev), port_num, i); ++ status = UCS_ERR_INVALID_PARAM; ++ goto out; ++ } ++ ++ if ((roce_versions_priorities[prio_idx].type == attr.type) && ++ (roce_versions_priorities[prio_idx].address_family == ++ uct_ib_device_get_addr_family(&attr.gid, i))) { ++ *gid_index = i; ++ goto out_print; ++ } ++ } ++ } ++ ++ ucs_error("failed to find a gid index that matches one of the RoCE priorities"); ++ status = UCS_ERR_INVALID_PARAM; ++ goto out; ++ ++#else ++ for (i = 0; i < gid_tbl_len; i++) { ++ status = uct_ib_device_query_gid(dev, port_num, i, &gid); ++ if (status != UCS_OK) { ++ goto out; ++ } ++ ++ /* assume RoCE v1 */ ++ if (uct_ib_device_get_addr_family(&gid, i) == AF_INET) { ++ /* take the first gid that has IPv4 */ ++ *gid_index = i; ++ goto out_print; ++ } ++ } ++ ++ *gid_index = UCT_IB_MD_DEFAULT_GID_INDEX; ++#endif ++ ++out_print: ++ ucs_debug("%s:%d set gid_index %d", ++ uct_ib_device_name(dev), port_num, *gid_index); ++out: ++ return status; ++} ++ ++ucs_status_t uct_ib_device_select_gid_index(uct_ib_device_t *dev, ++ uint8_t port_num, ++ size_t md_config_index, ++ uint8_t *ib_gid_index) ++{ ++ ucs_status_t status = UCS_OK; ++ ++ if (md_config_index == UCS_CONFIG_ULUNITS_AUTO) { ++ if (uct_ib_device_is_port_ib(dev, port_num)) { ++ *ib_gid_index = UCT_IB_MD_DEFAULT_GID_INDEX; ++ } else { ++ status = uct_ib_device_set_roce_gid_index(dev, port_num, ib_gid_index); ++ } ++ } else { ++ *ib_gid_index = md_config_index; ++ } ++ ++ return status; ++} ++ + const char *uct_ib_device_name(uct_ib_device_t *dev) + { + return ibv_get_device_name(dev->ibv_context->device); +@@ -445,150 +637,21 @@ uint8_t uct_ib_to_fabric_time(double time) + } + } + +-uct_ib_address_type_t uct_ib_address_scope(uint64_t subnet_prefix) +-{ +- if (subnet_prefix == UCT_IB_LINK_LOCAL_PREFIX) { +- return UCT_IB_ADDRESS_TYPE_LINK_LOCAL; +- } else if ((subnet_prefix & UCT_IB_SITE_LOCAL_MASK) == UCT_IB_SITE_LOCAL_PREFIX) { +- return UCT_IB_ADDRESS_TYPE_SITE_LOCAL; +- } else { +- return UCT_IB_ADDRESS_TYPE_GLOBAL; +- } +-} +- +-size_t uct_ib_address_size(uct_ib_address_type_t type) +-{ +- switch (type) { +- case UCT_IB_ADDRESS_TYPE_LINK_LOCAL: +- return sizeof(uct_ib_address_t) + +- sizeof(uint16_t); /* lid */ +- case UCT_IB_ADDRESS_TYPE_SITE_LOCAL: +- return sizeof(uct_ib_address_t) + +- sizeof(uint16_t) + /* lid */ +- sizeof(uint64_t) + /* if_id */ +- sizeof(uint16_t); /* subnet16 */ +- case UCT_IB_ADDRESS_TYPE_GLOBAL: +- return sizeof(uct_ib_address_t) + +- sizeof(uint16_t) + /* lid */ +- sizeof(uint64_t) + /* if_id */ +- sizeof(uint64_t); /* subnet64 */ +- case UCT_IB_ADDRESS_TYPE_ETH: +- return sizeof(uct_ib_address_t) + +- sizeof(union ibv_gid); /* raw gid */ +- default: +- ucs_fatal("Invalid IB address type: %d", type); +- } +-} +- +-void uct_ib_address_pack(uct_ib_device_t *dev, uct_ib_address_type_t type, +- const union ibv_gid *gid, uint16_t lid, +- uct_ib_address_t *ib_addr) +-{ +- void *ptr = ib_addr + 1; +- +- ib_addr->flags = 0; +- +- if (type != UCT_IB_ADDRESS_TYPE_ETH) { +- /* IB */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_LINK_LAYER_IB; +- +- /* LID */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_LID; +- *(uint16_t*) ptr = lid; +- ptr += sizeof(uint16_t); +- +- if (type >= UCT_IB_ADDRESS_TYPE_SITE_LOCAL) { +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_IF_ID; +- *(uint64_t*) ptr = gid->global.interface_id; +- ptr += sizeof(uint64_t); +- +- if (type >= UCT_IB_ADDRESS_TYPE_GLOBAL) { +- /* Global */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_SUBNET64; +- *(uint64_t*) ptr = gid->global.subnet_prefix; +- } else { +- /* Site-local */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_SUBNET16; +- *(uint16_t*) ptr = gid->global.subnet_prefix >> 48; +- } +- } +- } else { +- /* RoCE */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_LINK_LAYER_ETH; +- /* in this case we don't use the lid and set the GID flag */ +- ib_addr->flags |= UCT_IB_ADDRESS_FLAG_GID; +- /* uint8_t raw[16]; */ +- memcpy(ptr, gid->raw, sizeof(gid->raw) * sizeof(uint8_t)); +- } +- +-} +- +-void uct_ib_address_unpack(const uct_ib_address_t *ib_addr, uint16_t *lid, +- uint8_t *is_global, union ibv_gid *gid) +-{ +- const void *ptr = ib_addr + 1; +- +- +- gid->global.subnet_prefix = UCT_IB_LINK_LOCAL_PREFIX; /* Default prefix */ +- gid->global.interface_id = 0; +- *lid = 0; +- *is_global = 0; +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_GID) { +- memcpy(gid->raw, ptr, sizeof(gid->raw) * sizeof(uint8_t)); /* uint8_t raw[16]; */ +- *is_global = 1; +- } +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LID) { +- *lid = *(uint16_t*)ptr; +- ptr += sizeof(uint16_t); +- } +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_IF_ID) { +- gid->global.interface_id = *(uint64_t*)ptr; +- ptr += sizeof(uint64_t); +- } +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_SUBNET16) { +- gid->global.subnet_prefix = UCT_IB_SITE_LOCAL_PREFIX | +- ((uint64_t) *(uint16_t*) ptr << 48); +- *is_global = 1; +- ptr += sizeof(uint16_t); +- } +- +- if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_SUBNET64) { +- gid->global.subnet_prefix = *(uint64_t*) ptr; +- *is_global = 1; +- ptr += sizeof(uint64_t); +- } +-} +- +-const char *uct_ib_address_str(const uct_ib_address_t *ib_addr, char *buf, +- size_t max) ++ucs_status_t uct_ib_modify_qp(struct ibv_qp *qp, enum ibv_qp_state state) + { +- union ibv_gid gid; +- uint8_t is_global; +- uint16_t lid; +- char *p, *endp; ++ struct ibv_qp_attr qp_attr; + +- uct_ib_address_unpack(ib_addr, &lid, &is_global, &gid); +- +- if (is_global) { +- p = buf; +- endp = buf + max; +- if (lid != 0) { +- snprintf(p, endp - p, "lid %d ", lid); +- p += strlen(p); +- } +- inet_ntop(AF_INET6, &gid, p, endp - p); +- } else { +- snprintf(buf, max, "lid %d", lid); ++ ucs_debug("modify QP 0x%x to state %d", qp->qp_num, state); ++ memset(&qp_attr, 0, sizeof(qp_attr)); ++ qp_attr.qp_state = state; ++ if (ibv_modify_qp(qp, &qp_attr, IBV_QP_STATE)) { ++ ucs_warn("modify qp 0x%x to state %d failed: %m", qp->qp_num, state); ++ return UCS_ERR_IO_ERROR; + } + +- return buf; ++ return UCS_OK; + } + +- + ucs_status_t uct_ib_device_query_tl_resources(uct_ib_device_t *dev, + const char *tl_name, unsigned flags, + uct_tl_resource_desc_t **resources_p, +@@ -802,7 +865,7 @@ size_t uct_ib_device_odp_max_size(uct_ib_device_t *dev) + return 0; + } + +- if (IBV_DEVICE_HAS_DC(dev_attr) ++ if (IBV_DEVICE_HAS_DC(dev) + # if HAVE_STRUCT_IBV_EXP_DEVICE_ATTR_ODP_CAPS_PER_TRANSPORT_CAPS_DC_ODP_CAPS + && !ucs_test_all_flags(IBV_EXP_ODP_CAPS(dev_attr, dc), required_rc_odp_caps) + # endif +@@ -873,3 +936,84 @@ int uct_ib_device_odp_has_global_mr(uct_ib_device_t *dev) + + return 1; + } ++ ++const char *uct_ib_wc_status_str(enum ibv_wc_status wc_status) ++{ ++ return ibv_wc_status_str(wc_status); ++} ++ ++static ucs_status_t uct_ib_device_create_ah(uct_ib_device_t *dev, ++ struct ibv_ah_attr *ah_attr, ++ struct ibv_pd *pd, ++ struct ibv_ah **ah_p) ++{ ++ char buf[128]; ++ char *p, *endp; ++ struct ibv_ah *ah; ++ ++ ah = ibv_create_ah(pd, ah_attr); ++ if (ah == NULL) { ++ p = buf; ++ endp = buf + sizeof(buf); ++ snprintf(p, endp - p, "dlid=%d sl=%d port=%d src_path_bits=%d", ++ ah_attr->dlid, ah_attr->sl, ++ ah_attr->port_num, ah_attr->src_path_bits); ++ p += strlen(p); ++ ++ if (ah_attr->is_global) { ++ snprintf(p, endp - p, " dgid="); ++ p += strlen(p); ++ inet_ntop(AF_INET6, &ah_attr->grh.dgid, p, endp - p); ++ p += strlen(p); ++ snprintf(p, endp - p, " sgid_index=%d traffic_class=%d", ++ ah_attr->grh.sgid_index, ah_attr->grh.traffic_class); ++ } ++ ++ ucs_error("ibv_create_ah(%s) failed: %m", buf); ++ return UCS_ERR_INVALID_ADDR; ++ } ++ ++ *ah_p = ah; ++ return UCS_OK; ++} ++ ++ucs_status_t uct_ib_device_create_ah_cached(uct_ib_device_t *dev, ++ struct ibv_ah_attr *ah_attr, ++ struct ibv_pd *pd, ++ struct ibv_ah **ah_p) ++{ ++ ucs_status_t status = UCS_OK; ++ khiter_t iter; ++ int ret; ++ ++ ucs_spin_lock(&dev->ah_lock); ++ ++ /* looking for existing AH with same attributes */ ++ iter = kh_get(uct_ib_ah, &dev->ah_hash, *ah_attr); ++ if (iter == kh_end(&dev->ah_hash)) { ++ /* new AH */ ++ status = uct_ib_device_create_ah(dev, ah_attr, pd, ah_p); ++ if (status != UCS_OK) { ++ goto unlock; ++ } ++ ++ /* store AH in hash */ ++ iter = kh_put(uct_ib_ah, &dev->ah_hash, *ah_attr, &ret); ++ ++ /* failed to store - rollback */ ++ if (iter == kh_end(&dev->ah_hash)) { ++ ibv_destroy_ah(*ah_p); ++ status = UCS_ERR_NO_MEMORY; ++ goto unlock; ++ } ++ ++ kh_value(&dev->ah_hash, iter) = *ah_p; ++ } else { ++ /* found existing AH */ ++ *ah_p = kh_value(&dev->ah_hash, iter); ++ } ++ ++unlock: ++ ucs_spin_unlock(&dev->ah_lock); ++ return status; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.h +index 5e6395796..73fd9f18d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_device.h +@@ -12,6 +12,8 @@ + #include + #include + #include ++#include ++#include + + #include + +@@ -61,15 +63,6 @@ enum { + }; + + +-typedef enum { +- UCT_IB_ADDRESS_TYPE_LINK_LOCAL, /* Subnet-local address */ +- UCT_IB_ADDRESS_TYPE_SITE_LOCAL, /* Site local, 16-bit subnet prefix */ +- UCT_IB_ADDRESS_TYPE_GLOBAL, /* Global, 64-bit subnet prefix */ +- UCT_IB_ADDRESS_TYPE_ETH, /* RoCE address */ +- UCT_IB_ADDRESS_TYPE_LAST +-} uct_ib_address_type_t; +- +- + /** + * Flags which specify which address fields are present + */ +@@ -113,6 +106,8 @@ typedef struct uct_ib_device_spec { + } uct_ib_device_spec_t; + + ++KHASH_TYPE(uct_ib_ah, struct ibv_ah_attr, struct ibv_ah*); ++ + /** + * IB device (corresponds to HCA) + */ +@@ -124,11 +119,46 @@ typedef struct uct_ib_device { + cpu_set_t local_cpus; /* CPUs local to device */ + int numa_node; /* NUMA node of the device */ + int async_events; /* Whether async events are handled */ ++ int max_zcopy_log_sge; /* Maximum sges log for zcopy am */ + UCS_STATS_NODE_DECLARE(stats); + struct ibv_exp_port_attr port_attr[UCT_IB_DEV_MAX_PORTS]; /* Cached port attributes */ ++ unsigned flags; ++ /* AH hash */ ++ khash_t(uct_ib_ah) ah_hash; ++ ucs_spinlock_t ah_lock; + } uct_ib_device_t; + + ++/** ++ * IB device private initializer. ++ */ ++typedef struct uct_ib_device_init_entry { ++ ucs_list_link_t list; ++ ucs_status_t (*init)(uct_ib_device_t *dev); ++} uct_ib_device_init_entry_t; ++ ++#define UCT_IB_DEVICE_INIT(_init_fn) \ ++ UCS_STATIC_INIT { \ ++ extern ucs_list_link_t uct_ib_device_init_list; \ ++ static uct_ib_device_init_entry_t init_entry = { \ ++ .init = _init_fn, \ ++ }; \ ++ ucs_list_add_tail(&uct_ib_device_init_list, &init_entry.list); \ ++ } ++ ++ ++#if HAVE_DECL_IBV_EXP_QUERY_GID_ATTR ++/** ++ * RoCE version description ++ */ ++typedef struct uct_ib_roce_version_desc { ++ enum ibv_exp_roce_gid_type type; ++ int address_family; ++ int priority; ++} uct_ib_roce_version_desc_t; ++#endif ++ ++ + /** + * Check if a port on a device is active and supports the given flags. + */ +@@ -164,6 +194,20 @@ void uct_ib_device_cleanup(uct_ib_device_t *dev); + const uct_ib_device_spec_t* uct_ib_device_spec(uct_ib_device_t *dev); + + ++/** ++ * Select the IB gid index to use. ++ * ++ * @param dev IB device. ++ * @param port_num Port number. ++ * @param md_config_index Gid index from the md configuration. ++ * @param ib_gid_index Filled with the selected gid index. ++ */ ++ucs_status_t uct_ib_device_select_gid_index(uct_ib_device_t *dev, ++ uint8_t port_num, ++ size_t md_config_index, ++ uint8_t *ib_gid_index); ++ ++ + /** + * @return device name. + */ +@@ -195,49 +239,9 @@ size_t uct_ib_mtu_value(enum ibv_mtu mtu); + + + /** +- * @return IB address scope of a given subnet prefix (according to IBTA 4.1.1 12). +- */ +-uct_ib_address_type_t uct_ib_address_scope(uint64_t subnet_prefix); +- +- +-/** +- * @return IB address size of the given link scope. +- */ +-size_t uct_ib_address_size(uct_ib_address_type_t type); +- +- +-/** +- * Pack IB address. +- * +- * @param [in] dev IB device. TODO remove this. +- * @param [in] scope Address scope. +- * @param [in] gid GID address to pack. +- * @param [in] lid LID address to pack. +- * @param [out] ib_addr Filled with packed ib address. Size of the structure +- * must be at least what @ref uct_ib_address_size() returns +- * for the given scope. +- */ +-void uct_ib_address_pack(uct_ib_device_t *dev, uct_ib_address_type_t scope, +- const union ibv_gid *gid, uint16_t lid, +- uct_ib_address_t *ib_addr); +- +- +-/** +- * Unpack IB address. +- * +- * @param [in] ib_addr IB address to unpack. +- * @param [out] lid Filled with address LID, or 0 if not present. +- * @param [out] is_global Filled with 0, or 1 if the address is IB global +- */ +-void uct_ib_address_unpack(const uct_ib_address_t *ib_addr, uint16_t *lid, +- uint8_t *is_global, union ibv_gid *gid); +- +- +-/** +- * Convert IB address to a human-readable string. ++ * Modify QP to a given state and check for error + */ +-const char *uct_ib_address_str(const uct_ib_address_t *ib_addr, char *buf, +- size_t max); ++ucs_status_t uct_ib_modify_qp(struct ibv_qp *qp, enum ibv_qp_state state); + + + /** +@@ -258,6 +262,15 @@ size_t uct_ib_device_odp_max_size(uct_ib_device_t *dev); + + int uct_ib_device_odp_has_global_mr(uct_ib_device_t *dev); + ++const char *uct_ib_wc_status_str(enum ibv_wc_status wc_status); ++ ++ucs_status_t uct_ib_device_create_ah_cached(uct_ib_device_t *dev, ++ struct ibv_ah_attr *ah_attr, ++ struct ibv_pd *pd, ++ struct ibv_ah **ah_p); ++ ++void uct_ib_device_cleanup_ah_cached(uct_ib_device_t *dev); ++ + static inline struct ibv_exp_port_attr* + uct_ib_device_port_attr(uct_ib_device_t *dev, uint8_t port_num) + { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.c +index a4a6ac274..0a81b1449 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.c +@@ -18,7 +18,13 @@ + #include + #include + #include ++#if HAVE_CUDA ++#include ++#include ++#endif ++#include + ++#define MAXPATHSIZE 1024 + + static UCS_CONFIG_DEFINE_ARRAY(path_bits_spec, + sizeof(ucs_range_spec_t), +@@ -34,6 +40,11 @@ const char *uct_ib_mtu_values[] = { + }; + + enum { ++ UCT_IB_ADDRESS_TYPE_LINK_LOCAL, ++ UCT_IB_ADDRESS_TYPE_SITE_LOCAL, ++ UCT_IB_ADDRESS_TYPE_GLOBAL, ++ UCT_IB_ADDRESS_TYPE_ETH, ++ UCT_IB_ADDRESS_TYPE_LAST, + UCT_IB_IFACE_ADDRESS_TYPE_AUTO = UCT_IB_ADDRESS_TYPE_LAST, + UCT_IB_IFACE_ADDRESS_TYPE_LAST + }; +@@ -80,7 +91,7 @@ ucs_config_field_t uct_ib_iface_config_table[] = { + ucs_offsetof(uct_ib_iface_config_t, tx.min_sge), UCS_CONFIG_TYPE_UINT}, + + {"TX_CQ_MODERATION", "64", +- "Number of send WQEs for which completion is requested.", ++ "Maximum number of send WQEs which can be posted without requesting a completion.", + ucs_offsetof(uct_ib_iface_config_t, tx.cq_moderation), UCS_CONFIG_TYPE_UINT}, + + #if HAVE_DECL_IBV_EXP_CQ_MODERATION +@@ -129,24 +140,29 @@ ucs_config_field_t uct_ib_iface_config_table[] = { + + {"ADDR_TYPE", "auto", + "Set the interface address type. \"auto\" mode detects the type according to\n" +- "link layer type and IB subnet prefix.", ++ "link layer type and IB subnet prefix.\n" ++ "Deprecated. To force use of global routing use IS_GLOBAL.", + ucs_offsetof(uct_ib_iface_config_t, addr_type), + UCS_CONFIG_TYPE_ENUM(uct_ib_iface_addr_types)}, + +- {"GID_INDEX", "0", +- "Port GID index to use.", +- ucs_offsetof(uct_ib_iface_config_t, gid_index), UCS_CONFIG_TYPE_UINT}, ++ {"IS_GLOBAL", "n", ++ "Force interface to use global routing.", ++ ucs_offsetof(uct_ib_iface_config_t, is_global), UCS_CONFIG_TYPE_BOOL}, + + {"SL", "0", +- "Which IB service level to use.\n", ++ "IB Service Level / RoCEv2 Ethernet Priority.\n", + ucs_offsetof(uct_ib_iface_config_t, sl), UCS_CONFIG_TYPE_UINT}, + + {"TRAFFIC_CLASS", "0", +- "Which IB traffic class to use.\n", ++ "IB Traffic Class / RoCEv2 Differentiated Services Code Point (DSCP)\n", + ucs_offsetof(uct_ib_iface_config_t, traffic_class), UCS_CONFIG_TYPE_UINT}, + ++ {"HOP_LIMIT", "255", ++ "IB Hop limit / RoCEv2 Time to Live. Should be between 0 and 255.\n", ++ ucs_offsetof(uct_ib_iface_config_t, hop_limit), UCS_CONFIG_TYPE_UINT}, ++ + {"LID_PATH_BITS", "0-17", +- "list of IB Path bits separated by comma (a,b,c) " ++ "List of IB Path bits separated by comma (a,b,c) " + "which will be the low portion of the LID, according to the LMC in the fabric.", + ucs_offsetof(uct_ib_iface_config_t, lid_path_bits), UCS_CONFIG_TYPE_ARRAY(path_bits_spec)}, + +@@ -154,6 +170,12 @@ ucs_config_field_t uct_ib_iface_config_table[] = { + "Which pkey value to use. Should be between 0 and 0x7fff.", + ucs_offsetof(uct_ib_iface_config_t, pkey_value), UCS_CONFIG_TYPE_HEX}, + ++#if HAVE_IBV_EXP_RES_DOMAIN ++ {"RESOURCE_DOMAIN", "y", ++ "Enable multiple resource domains (experimental).", ++ ucs_offsetof(uct_ib_iface_config_t, enable_res_domain), UCS_CONFIG_TYPE_BOOL}, ++#endif ++ + + {NULL} + }; +@@ -198,12 +220,130 @@ void uct_ib_iface_release_desc(uct_recv_desc_t *self, void *desc) + ucs_mpool_put_inline(ib_desc); + } + ++size_t uct_ib_address_size(uct_ib_iface_t *iface) ++{ ++ if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface))) { ++ return sizeof(uct_ib_address_t) + ++ sizeof(union ibv_gid); /* raw gid */ ++ } else if ((iface->gid.global.subnet_prefix == UCT_IB_LINK_LOCAL_PREFIX) && ++ !iface->is_global_addr) { ++ return sizeof(uct_ib_address_t) + ++ sizeof(uint16_t); /* lid */ ++ } else if (((iface->gid.global.subnet_prefix & UCT_IB_SITE_LOCAL_MASK) == ++ UCT_IB_SITE_LOCAL_PREFIX) && ++ !iface->is_global_addr) { ++ return sizeof(uct_ib_address_t) + ++ sizeof(uint16_t) + /* lid */ ++ sizeof(uint64_t) + /* if_id */ ++ sizeof(uint16_t); /* subnet16 */ ++ } else { ++ return sizeof(uct_ib_address_t) + ++ sizeof(uint16_t) + /* lid */ ++ sizeof(uint64_t) + /* if_id */ ++ sizeof(uint64_t); /* subnet64 */ ++ } ++} ++ ++void uct_ib_address_pack(uct_ib_iface_t *iface, ++ const union ibv_gid *gid, uint16_t lid, ++ uct_ib_address_t *ib_addr) ++{ ++ void *ptr = ib_addr + 1; ++ ++ if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface))) { ++ /* RoCE, in this case we don't use the lid and set the GID flag */ ++ ib_addr->flags = UCT_IB_ADDRESS_FLAG_LINK_LAYER_ETH | ++ UCT_IB_ADDRESS_FLAG_GID; ++ /* uint8_t raw[16]; */ ++ memcpy(ptr, gid->raw, sizeof(gid->raw) * sizeof(uint8_t)); ++ } else { ++ /* IB, LID */ ++ ib_addr->flags = UCT_IB_ADDRESS_FLAG_LINK_LAYER_IB | ++ UCT_IB_ADDRESS_FLAG_LID; ++ *(uint16_t*) ptr = lid; ++ ptr += sizeof(uint16_t); ++ ++ if ((gid->global.subnet_prefix != UCT_IB_LINK_LOCAL_PREFIX) || ++ iface->is_global_addr) { ++ ib_addr->flags |= UCT_IB_ADDRESS_FLAG_IF_ID; ++ *(uint64_t*) ptr = gid->global.interface_id; ++ ptr += sizeof(uint64_t); ++ ++ if (((gid->global.subnet_prefix & UCT_IB_SITE_LOCAL_MASK) == ++ UCT_IB_SITE_LOCAL_PREFIX) && ++ !iface->is_global_addr) { ++ /* Site-local */ ++ ib_addr->flags |= UCT_IB_ADDRESS_FLAG_SUBNET16; ++ *(uint16_t*) ptr = gid->global.subnet_prefix >> 48; ++ } else { ++ /* Global */ ++ ib_addr->flags |= UCT_IB_ADDRESS_FLAG_SUBNET64; ++ *(uint64_t*) ptr = gid->global.subnet_prefix; ++ } ++ } ++ } ++} ++ ++void uct_ib_address_unpack(const uct_ib_address_t *ib_addr, uint16_t *lid, ++ union ibv_gid *gid) ++{ ++ const void *ptr = ib_addr + 1; ++ ++ gid->global.subnet_prefix = UCT_IB_LINK_LOCAL_PREFIX; /* Default prefix */ ++ gid->global.interface_id = 0; ++ *lid = 0; ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_GID) { ++ memcpy(gid->raw, ptr, sizeof(gid->raw) * sizeof(uint8_t)); /* uint8_t raw[16]; */ ++ } ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LID) { ++ *lid = *(uint16_t*)ptr; ++ ptr += sizeof(uint16_t); ++ } ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_IF_ID) { ++ gid->global.interface_id = *(uint64_t*)ptr; ++ ptr += sizeof(uint64_t); ++ } ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_SUBNET16) { ++ gid->global.subnet_prefix = UCT_IB_SITE_LOCAL_PREFIX | ++ ((uint64_t) *(uint16_t*) ptr << 48); ++ ptr += sizeof(uint16_t); ++ } ++ ++ if (ib_addr->flags & UCT_IB_ADDRESS_FLAG_SUBNET64) { ++ gid->global.subnet_prefix = *(uint64_t*) ptr; ++ ptr += sizeof(uint64_t); ++ } ++} ++ ++const char *uct_ib_address_str(const uct_ib_address_t *ib_addr, char *buf, ++ size_t max) ++{ ++ union ibv_gid gid; ++ uint16_t lid; ++ char *p, *endp; ++ ++ uct_ib_address_unpack(ib_addr, &lid, &gid); ++ ++ p = buf; ++ endp = buf + max; ++ if (lid != 0) { ++ snprintf(p, endp - p, "lid %d ", lid); ++ p += strlen(p); ++ } ++ inet_ntop(AF_INET6, &gid, p, endp - p); ++ ++ return buf; ++} ++ + ucs_status_t uct_ib_iface_get_device_address(uct_iface_h tl_iface, + uct_device_addr_t *dev_addr) + { + uct_ib_iface_t *iface = ucs_derived_of(tl_iface, uct_ib_iface_t); +- uct_ib_address_pack(uct_ib_iface_device(iface), iface->addr_type, +- &iface->gid, uct_ib_iface_port_attr(iface)->lid, ++ uct_ib_address_pack(iface, &iface->gid, uct_ib_iface_port_attr(iface)->lid, + (void*)dev_addr); + return UCS_OK; + } +@@ -212,33 +352,17 @@ int uct_ib_iface_is_reachable(const uct_iface_h tl_iface, const uct_device_addr_ + const uct_iface_addr_t *iface_addr) + { + uct_ib_iface_t *iface = ucs_derived_of(tl_iface, uct_ib_iface_t); ++ int is_local_eth = IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface)); + const uct_ib_address_t *ib_addr = (const void*)dev_addr; + union ibv_gid gid; +- uint8_t is_global; + uint16_t lid; +- int is_local_ib; +- +- uct_ib_address_unpack(ib_addr, &lid, &is_global, &gid); +- +- ucs_assert(iface->addr_type < UCT_IB_ADDRESS_TYPE_LAST); +- switch (iface->addr_type) { +- case UCT_IB_ADDRESS_TYPE_LINK_LOCAL: +- case UCT_IB_ADDRESS_TYPE_SITE_LOCAL: +- case UCT_IB_ADDRESS_TYPE_GLOBAL: +- is_local_ib = 1; +- break; +- case UCT_IB_ADDRESS_TYPE_ETH: +- is_local_ib = 0; +- break; +- default: +- ucs_fatal("Unknown address type %d", iface->addr_type); +- break; +- } + +- if (is_local_ib && (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LINK_LAYER_IB)) { ++ uct_ib_address_unpack(ib_addr, &lid, &gid); ++ ++ if (!is_local_eth && (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LINK_LAYER_IB)) { + /* same subnet prefix */ + return gid.global.subnet_prefix == iface->gid.global.subnet_prefix; +- } else if (!is_local_ib && (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LINK_LAYER_ETH)) { ++ } else if (is_local_eth && (ib_addr->flags & UCT_IB_ADDRESS_FLAG_LINK_LAYER_ETH)) { + /* there shouldn't be a lid and the gid flag should be on */ + ucs_assert(ib_addr->flags & UCT_IB_ADDRESS_FLAG_GID); + ucs_assert(!(ib_addr->flags & UCT_IB_ADDRESS_FLAG_LID)); +@@ -253,36 +377,8 @@ ucs_status_t uct_ib_iface_create_ah(uct_ib_iface_t *iface, + struct ibv_ah_attr *ah_attr, + struct ibv_ah **ah_p) + { +- struct ibv_ah *ah; +- char buf[128]; +- char *p, *endp; +- +- ah = ibv_create_ah(uct_ib_iface_md(iface)->pd, ah_attr); +- +- if (ah == NULL) { +- p = buf; +- endp = buf + sizeof(buf); +- snprintf(p, endp - p, "dlid=%d sl=%d port=%d src_path_bits=%d", +- ah_attr->dlid, ah_attr->sl, +- ah_attr->port_num, ah_attr->src_path_bits); +- p += strlen(p); +- +- if (ah_attr->is_global) { +- snprintf(p, endp - p, " dgid="); +- p += strlen(p); +- inet_ntop(AF_INET6, &ah_attr->grh.dgid, p, endp - p); +- p += strlen(p); +- snprintf(p, endp - p, " sgid_index=%d traffic_class=%d", +- ah_attr->grh.sgid_index, ah_attr->grh.traffic_class); +- } +- +- ucs_error("ibv_create_ah(%s) on "UCT_IB_IFACE_FMT" failed: %m", buf, +- UCT_IB_IFACE_ARG(iface)); +- return UCS_ERR_INVALID_ADDR; +- } +- +- *ah_p = ah; +- return UCS_OK; ++ return uct_ib_device_create_ah_cached(uct_ib_iface_device(iface), ah_attr, ++ uct_ib_iface_md(iface)->pd, ah_p); + } + + static ucs_status_t uct_ib_iface_init_pkey(uct_ib_iface_t *iface, +@@ -393,17 +489,174 @@ static ucs_status_t uct_ib_iface_init_lmc(uct_ib_iface_t *iface, + return UCS_OK; + } + ++static const char *uct_ib_qp_type_str(int qp_type) ++{ ++ switch (qp_type) { ++ case IBV_QPT_RC: ++ return "rc"; ++ case IBV_QPT_UD: ++ return "ud"; ++#if HAVE_TL_DC ++ case UCT_IB_QPT_DCI: ++ return "dci"; ++#endif ++ default: ++ ucs_bug("invalid qp type: %d", qp_type); ++ return "unknown"; ++ } ++} ++ ++void uct_ib_iface_fill_attr(uct_ib_iface_t *iface, uct_ib_qp_attr_t *attr) ++{ ++ attr->ibv.send_cq = iface->cq[UCT_IB_DIR_TX]; ++ attr->ibv.recv_cq = iface->cq[UCT_IB_DIR_RX]; ++ ++ attr->ibv.srq = attr->srq; ++ attr->ibv.cap = attr->cap; ++ attr->ibv.qp_type = attr->qp_type; ++ attr->ibv.sq_sig_all = attr->sq_sig_all; ++ ++#if HAVE_DECL_IBV_EXP_CREATE_QP ++ attr->ibv.comp_mask = IBV_EXP_QP_INIT_ATTR_PD; ++ attr->ibv.pd = uct_ib_iface_qp_pd(iface); ++#elif HAVE_DECL_IBV_CREATE_QP_EX ++ attr->ibv.comp_mask = IBV_QP_INIT_ATTR_PD; ++ attr->ibv.pd = uct_ib_iface_qp_pd(iface); ++#endif ++ ++#if HAVE_IBV_EXP_RES_DOMAIN ++ if (iface->res_domain != NULL) { ++ attr->ibv.comp_mask |= IBV_EXP_QP_INIT_ATTR_RES_DOMAIN; ++ attr->ibv.res_domain = iface->res_domain->ibv_domain; ++ } ++#endif ++ ++ if (attr->qp_type == IBV_QPT_UD) { ++ return; ++ } ++ ++#if HAVE_IB_EXT_ATOMICS ++ attr->ibv.comp_mask |= IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG; ++ attr->ibv.max_atomic_arg = UCT_IB_MAX_ATOMIC_SIZE; ++#endif ++ ++#if HAVE_DECL_IBV_EXP_ATOMIC_HCA_REPLY_BE ++ if (uct_ib_iface_device(iface)->dev_attr.exp_atomic_cap == ++ IBV_EXP_ATOMIC_HCA_REPLY_BE) { ++ attr->ibv.comp_mask |= IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS; ++ attr->ibv.exp_create_flags = IBV_EXP_QP_CREATE_ATOMIC_BE_REPLY; ++ } ++#endif ++ ++#if HAVE_STRUCT_IBV_EXP_QP_INIT_ATTR_MAX_INL_RECV ++ attr->ibv.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; ++ attr->ibv.max_inl_recv = attr->max_inl_recv; ++#endif ++} ++ ++ucs_status_t uct_ib_iface_create_qp(uct_ib_iface_t *iface, ++ uct_ib_qp_attr_t *attr, ++ struct ibv_qp **qp_p) ++{ ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ struct ibv_qp *qp; ++ ++ uct_ib_iface_fill_attr(iface, attr); ++ ++#if HAVE_DECL_IBV_EXP_CREATE_QP ++ qp = ibv_exp_create_qp(dev->ibv_context, &attr->ibv); ++#elif HAVE_DECL_IBV_CREATE_QP_EX ++ qp = ibv_create_qp_ex(dev->ibv_context, &attr->ibv); ++#else ++ qp = ibv_create_qp(uct_ib_iface_qp_pd(iface), &attr->ibv); ++#endif ++ if (qp == NULL) { ++ ucs_error("iface=%p: failed to create %s QP TX wr:%d sge:%d inl:%d RX wr:%d sge:%d inl %d: %m", ++ iface, uct_ib_qp_type_str(attr->qp_type), ++ attr->cap.max_send_wr, attr->cap.max_send_sge, attr->cap.max_inline_data, ++ attr->cap.max_recv_wr, attr->cap.max_recv_sge, attr->max_inl_recv); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ attr->cap = attr->ibv.cap; ++ *qp_p = qp; ++ ++ ucs_debug("iface=%p: created %s QP 0x%x on %s:%d TX wr:%d sge:%d inl:%d RX wr:%d sge:%d inl %d", ++ iface, uct_ib_qp_type_str(attr->qp_type), qp->qp_num, ++ uct_ib_device_name(dev), iface->config.port_num, ++ attr->cap.max_send_wr, attr->cap.max_send_sge, attr->cap.max_inline_data, ++ attr->cap.max_recv_wr, attr->cap.max_recv_sge, attr->max_inl_recv); ++ ++ return UCS_OK; ++} ++ ++#if HAVE_DECL_IBV_EXP_SETENV ++static int uct_ib_max_cqe_size() ++{ ++ static int max_cqe_size = -1; ++ ++ if (max_cqe_size == -1) { ++#ifdef __aarch64__ ++ char arm_board_vendor[128]; ++ ucs_aarch64_cpuid_t cpuid; ++ ucs_aarch64_cpuid(&cpuid); ++ ++ arm_board_vendor[0] = '\0'; ++ ucs_read_file(arm_board_vendor, sizeof(arm_board_vendor), 1, ++ "/sys/devices/virtual/dmi/id/board_vendor"); ++ ucs_debug("arm_board_vendor is '%s'", arm_board_vendor); ++ ++ max_cqe_size = ((strcasestr(arm_board_vendor, "Huawei")) && ++ (cpuid.implementer == 0x41) && (cpuid.architecture == 8) && ++ (cpuid.variant == 0) && (cpuid.part == 0xd08) && ++ (cpuid.revision == 2)) ++ ? 64 : 128; ++#else ++ max_cqe_size = 128; ++#endif ++ ucs_debug("max IB CQE size is %d", max_cqe_size); ++ } ++ ++ return max_cqe_size; ++} ++#endif ++ ++struct ibv_cq *uct_ib_create_cq(struct ibv_context *context, int cqe, ++ struct ibv_comp_channel *channel, ++ int comp_vector, int ignore_overrun) ++{ ++ struct ibv_cq *cq; ++#if HAVE_DECL_IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN ++ struct ibv_cq_init_attr_ex cq_attr = {}; ++ ++ cq_attr.cqe = cqe; ++ cq_attr.channel = channel; ++ cq_attr.comp_vector = comp_vector; ++ if (ignore_overrun) { ++ cq_attr.comp_mask = IBV_CQ_INIT_ATTR_MASK_FLAGS; ++ cq_attr.flags = IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN; ++ } ++ ++ cq = ibv_cq_ex_to_cq(ibv_create_cq_ex(context, &cq_attr)); ++#else ++ cq = ibv_create_cq(context, cqe, NULL, channel, comp_vector); ++#endif ++ return cq; ++} ++ + static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + size_t *inl, int preferred_cpu, +- struct ibv_cq **cq_p) ++ int flags, struct ibv_cq **cq_p) + { +- static const char *cqe_size_env_var = "MLX5_CQE_SIZE"; + uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ struct ibv_cq *cq; ++ size_t cqe_size = 64; ++ ucs_status_t status; ++#if HAVE_DECL_IBV_EXP_SETENV ++ static const char *cqe_size_env_var = "MLX5_CQE_SIZE"; + const char *cqe_size_env_value; +- size_t cqe_size_min, cqe_size; ++ size_t cqe_size_min; + char cqe_size_buf[32]; +- ucs_status_t status; +- struct ibv_cq *cq; + int env_var_added = 0; + int ret; + +@@ -415,8 +668,7 @@ static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + if (cqe_size < cqe_size_min) { + ucs_error("%s is set to %zu, but at least %zu is required (inl: %zu)", + cqe_size_env_var, cqe_size, cqe_size_min, *inl); +- status = UCS_ERR_INVALID_PARAM; +- goto out; ++ return UCS_ERR_INVALID_PARAM; + } + } else { + /* CQE size is not defined by the environment, set it according to inline +@@ -424,7 +676,7 @@ static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + */ + cqe_size = ucs_max(cqe_size_min, UCS_SYS_CACHE_LINE_SIZE); + cqe_size = ucs_max(cqe_size, 64); /* at least 64 */ +- cqe_size = ucs_min(cqe_size, 128); /* at most 128 */ ++ cqe_size = ucs_min(cqe_size, uct_ib_max_cqe_size()); + snprintf(cqe_size_buf, sizeof(cqe_size_buf),"%zu", cqe_size); + ucs_debug("%s: setting %s=%s", uct_ib_device_name(dev), cqe_size_env_var, + cqe_size_buf); +@@ -432,15 +684,14 @@ static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + if (ret) { + ucs_error("ibv_exp_setenv(%s=%s) failed: %m", cqe_size_env_var, + cqe_size_buf); +- status = UCS_ERR_INVALID_PARAM; +- goto out; ++ return UCS_ERR_INVALID_PARAM; + } + + env_var_added = 1; + } +- +- cq = ibv_create_cq(dev->ibv_context, cq_length, NULL, iface->comp_channel, +- preferred_cpu); ++#endif ++ cq = uct_ib_create_cq(dev->ibv_context, cq_length, iface->comp_channel, ++ preferred_cpu, flags & UCT_IB_CQ_IGNORE_OVERRUN); + if (cq == NULL) { + ucs_error("ibv_create_cq(cqe=%d) failed: %m", cq_length); + status = UCS_ERR_IO_ERROR; +@@ -452,6 +703,7 @@ static ucs_status_t uct_ib_iface_create_cq(uct_ib_iface_t *iface, int cq_length, + status = UCS_OK; + + out_unsetenv: ++#if HAVE_DECL_IBV_EXP_SETENV + if (env_var_added) { + /* if we created a new environment variable, remove it */ + ret = ibv_exp_unsetenv(dev->ibv_context, cqe_size_env_var); +@@ -459,7 +711,7 @@ out_unsetenv: + ucs_warn("unsetenv(%s) failed: %m", cqe_size_env_var); + } + } +-out: ++#endif + return status; + } + +@@ -505,19 +757,125 @@ static ucs_status_t uct_ib_iface_set_moderation(struct ibv_cq *cq, + return UCS_OK; + } + +-/** +- * @param rx_headroom Headroom requested by the user. +- * @param rx_priv_len Length of transport private data to reserve (0 if unused) +- * @param rx_hdr_len Length of transport network header. +- * @param mss Maximal segment size (transport limit). +- */ ++static int uct_ib_iface_res_domain_cmp(uct_ib_iface_res_domain_t *res_domain, ++ uct_ib_iface_t *iface) ++{ ++#if HAVE_IBV_EXP_RES_DOMAIN ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ ++ return res_domain->ibv_domain->context == dev->ibv_context; ++#elif HAVE_DECL_IBV_ALLOC_TD ++ uct_ib_md_t *md = uct_ib_iface_md(iface); ++ ++ return res_domain->pd == md->pd; ++#else ++ return 1; ++#endif ++} ++ ++static ucs_status_t ++uct_ib_iface_res_domain_init(uct_ib_iface_res_domain_t *res_domain, ++ uct_ib_iface_t *iface) ++{ ++#if HAVE_IBV_EXP_RES_DOMAIN ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ struct ibv_exp_res_domain_init_attr attr; ++ ++ attr.comp_mask = IBV_EXP_RES_DOMAIN_THREAD_MODEL | ++ IBV_EXP_RES_DOMAIN_MSG_MODEL; ++ attr.msg_model = IBV_EXP_MSG_LOW_LATENCY; ++ ++ switch (iface->super.worker->thread_mode) { ++ case UCS_THREAD_MODE_SINGLE: ++ attr.thread_model = IBV_EXP_THREAD_SINGLE; ++ break; ++ case UCS_THREAD_MODE_SERIALIZED: ++ attr.thread_model = IBV_EXP_THREAD_UNSAFE; ++ break; ++ default: ++ attr.thread_model = IBV_EXP_THREAD_SAFE; ++ break; ++ } ++ ++ res_domain->ibv_domain = ibv_exp_create_res_domain(dev->ibv_context, &attr); ++ if (res_domain->ibv_domain == NULL) { ++ ucs_error("ibv_exp_create_res_domain() on %s failed: %m", ++ uct_ib_device_name(dev)); ++ return UCS_ERR_IO_ERROR; ++ } ++#elif HAVE_DECL_IBV_ALLOC_TD ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ uct_ib_md_t *md = uct_ib_iface_md(iface); ++ struct ibv_parent_domain_init_attr attr; ++ struct ibv_td_init_attr td_attr; ++ ++ if (iface->super.worker->thread_mode == UCS_THREAD_MODE_MULTI) { ++ td_attr.comp_mask = 0; ++ res_domain->td = ibv_alloc_td(dev->ibv_context, &td_attr); ++ if (res_domain->td == NULL) { ++ ucs_error("ibv_alloc_td() on %s failed: %m", ++ uct_ib_device_name(dev)); ++ return UCS_ERR_IO_ERROR; ++ } ++ } else { ++ res_domain->td = NULL; ++ res_domain->ibv_domain = NULL; ++ res_domain->pd = md->pd; ++ return UCS_OK; ++ } ++ ++ attr.td = res_domain->td; ++ attr.pd = md->pd; ++ attr.comp_mask = 0; ++ res_domain->ibv_domain = ibv_alloc_parent_domain(dev->ibv_context, &attr); ++ if (res_domain->ibv_domain == NULL) { ++ ucs_error("ibv_alloc_parent_domain() on %s failed: %m", ++ uct_ib_device_name(dev)); ++ ibv_dealloc_td(res_domain->td); ++ return UCS_ERR_IO_ERROR; ++ } ++ res_domain->pd = md->pd; ++#endif ++ return UCS_OK; ++} ++ ++static void uct_ib_iface_res_domain_cleanup(uct_ib_iface_res_domain_t *res_domain) ++{ ++#if HAVE_IBV_EXP_RES_DOMAIN ++ struct ibv_exp_destroy_res_domain_attr attr; ++ int ret; ++ ++ attr.comp_mask = 0; ++ ret = ibv_exp_destroy_res_domain(res_domain->ibv_domain->context, ++ res_domain->ibv_domain, &attr); ++ if (ret != 0) { ++ ucs_warn("ibv_exp_destroy_res_domain() failed: %m"); ++ } ++#elif HAVE_DECL_IBV_ALLOC_TD ++ int ret; ++ ++ if (res_domain->ibv_domain != NULL) { ++ ret = ibv_dealloc_pd(res_domain->ibv_domain); ++ if (ret != 0) { ++ ucs_warn("ibv_dealloc_pd() failed: %m"); ++ return; ++ } ++ ++ ret = ibv_dealloc_td(res_domain->td); ++ if (ret != 0) { ++ ucs_warn("ibv_dealloc_td() failed: %m"); ++ } ++ } ++#endif ++} ++ + UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + uct_worker_h worker, const uct_iface_params_t *params, +- unsigned rx_priv_len, unsigned rx_hdr_len, +- unsigned tx_cq_len, unsigned rx_cq_len, size_t mss, +- const uct_ib_iface_config_t *config) ++ const uct_ib_iface_config_t *config, ++ const uct_ib_iface_init_attr_t *init_attr) + { +- uct_ib_device_t *dev = &ucs_derived_of(md, uct_ib_md_t)->dev; ++ uct_ib_md_t *ib_md = ucs_derived_of(md, uct_ib_md_t); ++ uct_ib_device_t *dev = &ib_md->dev; + int preferred_cpu = ucs_cpu_set_find_lcs(¶ms->cpu_mask); + ucs_status_t status; + uint8_t port_num; +@@ -525,48 +883,58 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + + ucs_assert(params->open_mode & UCT_IFACE_OPEN_MODE_DEVICE); + +- if (params->stats_root == NULL) { +- UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &ops->super, md, worker, +- params, &config->super +- UCS_STATS_ARG(dev->stats) +- UCS_STATS_ARG(params->mode.device.dev_name)); +- } else { +- UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &ops->super, md, worker, +- params, &config->super +- UCS_STATS_ARG(params->stats_root) +- UCS_STATS_ARG(params->mode.device.dev_name)); +- } ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &ops->super, md, worker, ++ params, &config->super ++ UCS_STATS_ARG((params->stats_root == NULL) ? ++ dev->stats : params->stats_root) ++ UCS_STATS_ARG(params->mode.device.dev_name)); + + status = uct_ib_device_find_port(dev, params->mode.device.dev_name, &port_num); + if (status != UCS_OK) { + goto err; + } + +- self->ops = ops; +- +- self->config.rx_payload_offset = sizeof(uct_ib_iface_recv_desc_t) + +- ucs_max(sizeof(uct_recv_desc_t) + +- params->rx_headroom, +- rx_priv_len + rx_hdr_len); +- self->config.rx_hdr_offset = self->config.rx_payload_offset - rx_hdr_len; +- self->config.rx_headroom_offset= self->config.rx_payload_offset - +- params->rx_headroom; +- self->config.seg_size = ucs_min(mss, config->super.max_bcopy); +- self->config.tx_max_poll = config->tx.max_poll; +- self->config.rx_max_poll = config->rx.max_poll; +- self->config.rx_max_batch = ucs_min(config->rx.max_batch, +- config->rx.queue_len / 4); +- self->config.port_num = port_num; +- self->config.sl = config->sl; +- self->config.traffic_class = config->traffic_class; +- self->config.gid_index = config->gid_index; +- self->release_desc.cb = uct_ib_iface_release_desc; ++ self->ops = ops; ++ ++ self->config.rx_payload_offset = sizeof(uct_ib_iface_recv_desc_t) + ++ ucs_max(sizeof(uct_recv_desc_t) + ++ params->rx_headroom, ++ init_attr->rx_priv_len + ++ init_attr->rx_hdr_len); ++ self->config.rx_hdr_offset = self->config.rx_payload_offset - ++ init_attr->rx_hdr_len; ++ self->config.rx_headroom_offset = self->config.rx_payload_offset - ++ params->rx_headroom; ++ self->config.seg_size = init_attr->seg_size; ++ self->config.tx_max_poll = config->tx.max_poll; ++ self->config.rx_max_poll = config->rx.max_poll; ++ self->config.rx_max_batch = ucs_min(config->rx.max_batch, ++ config->rx.queue_len / 4); ++ self->config.port_num = port_num; ++ self->config.sl = config->sl; ++ self->config.traffic_class = config->traffic_class; ++ self->config.hop_limit = config->hop_limit; ++ self->release_desc.cb = uct_ib_iface_release_desc; ++ ++ self->config.enable_res_domain = config->enable_res_domain; ++ ++ if (ucs_derived_of(worker, uct_priv_worker_t)->thread_mode == UCS_THREAD_MODE_MULTI) { ++ ucs_error("IB transports do not support multi-threaded worker"); ++ return UCS_ERR_INVALID_PARAM; ++ } + + status = uct_ib_iface_init_pkey(self, config); + if (status != UCS_OK) { + goto err; + } + ++ status = uct_ib_device_select_gid_index(dev, self->config.port_num, ++ ib_md->config.gid_index, ++ &self->config.gid_index); ++ if (status != UCS_OK) { ++ goto err; ++ } ++ + status = uct_ib_device_query_gid(dev, self->config.port_num, + self->config.gid_index, &self->gid); + if (status != UCS_OK) { +@@ -578,11 +946,27 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + goto err; + } + ++ if ((init_attr->res_domain_key == UCT_IB_IFACE_NULL_RES_DOMAIN_KEY) || ++ !self->config.enable_res_domain) { ++ self->res_domain = NULL; ++ } else { ++ self->res_domain = uct_worker_tl_data_get(self->super.worker, ++ init_attr->res_domain_key, ++ uct_ib_iface_res_domain_t, ++ uct_ib_iface_res_domain_cmp, ++ uct_ib_iface_res_domain_init, ++ self); ++ if (UCS_PTR_IS_ERR(self->res_domain)) { ++ status = UCS_PTR_STATUS(self->res_domain); ++ goto err_free_path_bits; ++ } ++ } ++ + self->comp_channel = ibv_create_comp_channel(dev->ibv_context); + if (self->comp_channel == NULL) { + ucs_error("ibv_create_comp_channel() failed: %m"); + status = UCS_ERR_IO_ERROR; +- goto err_free_path_bits; ++ goto err_put_res_domain; + } + + status = ucs_sys_fcntl_modfl(self->comp_channel->fd, O_NONBLOCK, 0); +@@ -591,15 +975,16 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + } + + inl = config->rx.inl; +- status = uct_ib_iface_create_cq(self, tx_cq_len, &inl, preferred_cpu, +- &self->send_cq); ++ status = uct_ib_iface_create_cq(self, init_attr->tx_cq_len, &inl, ++ preferred_cpu, init_attr->flags, ++ &self->cq[UCT_IB_DIR_TX]); + if (status != UCS_OK) { + goto err_destroy_comp_channel; + } + ucs_assert_always(inl <= UINT8_MAX); + self->config.max_inl_resp = inl; + +- status = uct_ib_iface_set_moderation(self->send_cq, ++ status = uct_ib_iface_set_moderation(self->cq[UCT_IB_DIR_TX], + config->tx.cq_moderation_count, + config->tx.cq_moderation_period); + if (status != UCS_OK) { +@@ -607,13 +992,14 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + } + + inl = config->rx.inl; +- status = uct_ib_iface_create_cq(self, rx_cq_len, &inl, +- preferred_cpu, &self->recv_cq); ++ status = uct_ib_iface_create_cq(self, init_attr->rx_cq_len, &inl, ++ preferred_cpu, init_attr->flags, ++ &self->cq[UCT_IB_DIR_RX]); + if (status != UCS_OK) { + goto err_destroy_send_cq; + } + +- status = uct_ib_iface_set_moderation(self->recv_cq, ++ status = uct_ib_iface_set_moderation(self->cq[UCT_IB_DIR_RX], + config->rx.cq_moderation_count, + config->rx.cq_moderation_period); + if (status != UCS_OK) { +@@ -621,18 +1007,17 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + } + + /* Address scope and size */ +- if (config->addr_type == UCT_IB_IFACE_ADDRESS_TYPE_AUTO) { +- if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(self))) { +- self->addr_type = UCT_IB_ADDRESS_TYPE_ETH; +- } else { +- self->addr_type = uct_ib_address_scope(self->gid.global.subnet_prefix); +- } ++ if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(self)) || ++ config->is_global || ++ /* check ADDR_TYPE for backward compatibility */ ++ (config->addr_type == UCT_IB_ADDRESS_TYPE_SITE_LOCAL) || ++ (config->addr_type == UCT_IB_ADDRESS_TYPE_GLOBAL)) { ++ self->is_global_addr = 1; + } else { +- ucs_assert(config->addr_type < UCT_IB_ADDRESS_TYPE_LAST); +- self->addr_type = config->addr_type; ++ self->is_global_addr = 0; + } + +- self->addr_size = uct_ib_address_size(self->addr_type); ++ self->addr_size = uct_ib_address_size(self); + + ucs_debug("created uct_ib_iface_t headroom_ofs %d payload_ofs %d hdr_ofs %d data_sz %d", + self->config.rx_headroom_offset, self->config.rx_payload_offset, +@@ -641,11 +1026,15 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, + return UCS_OK; + + err_destroy_recv_cq: +- ibv_destroy_cq(self->recv_cq); ++ ibv_destroy_cq(self->cq[UCT_IB_DIR_RX]); + err_destroy_send_cq: +- ibv_destroy_cq(self->send_cq); ++ ibv_destroy_cq(self->cq[UCT_IB_DIR_TX]); + err_destroy_comp_channel: + ibv_destroy_comp_channel(self->comp_channel); ++err_put_res_domain: ++ if (self->res_domain != NULL) { ++ uct_worker_tl_data_put(self->res_domain, uct_ib_iface_res_domain_cleanup); ++ } + err_free_path_bits: + ucs_free(self->path_bits); + err: +@@ -656,12 +1045,12 @@ static UCS_CLASS_CLEANUP_FUNC(uct_ib_iface_t) + { + int ret; + +- ret = ibv_destroy_cq(self->recv_cq); ++ ret = ibv_destroy_cq(self->cq[UCT_IB_DIR_RX]); + if (ret != 0) { + ucs_warn("ibv_destroy_cq(recv_cq) returned %d: %m", ret); + } + +- ret = ibv_destroy_cq(self->send_cq); ++ ret = ibv_destroy_cq(self->cq[UCT_IB_DIR_TX]); + if (ret != 0) { + ucs_warn("ibv_destroy_cq(send_cq) returned %d: %m", ret); + } +@@ -671,6 +1060,9 @@ static UCS_CLASS_CLEANUP_FUNC(uct_ib_iface_t) + ucs_warn("ibv_destroy_comp_channel(comp_channel) returned %d: %m", ret); + } + ++ if (self->res_domain != NULL) { ++ uct_worker_tl_data_put(self->res_domain, uct_ib_iface_res_domain_cleanup); ++ } + ucs_free(self->path_bits); + } + +@@ -758,6 +1150,140 @@ static ucs_status_t uct_ib_iface_get_numa_latency(uct_ib_iface_t *iface, + return UCS_OK; + } + ++#if HAVE_CUDA ++static int uct_ib_iface_cuda_sysfs_path(int cuda_dev, char** path) ++{ ++ char* cuda_rpath = NULL; ++ char bus_path[] = "/sys/class/pci_bus/0000:00/device"; ++ char bus_id[16]; ++ char pathname[MAXPATHSIZE]; ++ int i; ++ CUresult cu_err; ++ ++ /* Initialize bus_id array to avoid valgrind complaints */ ++ for (i = 0; i < 16; i++) { ++ bus_id[i] = 0; ++ } ++ ++ cu_err = cuDeviceGetPCIBusId(bus_id, 16, cuda_dev); ++ if (CUDA_SUCCESS != cu_err) { ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ for (i = 0; i < 16; i++) { ++ bus_id[i] = tolower(bus_id[i]); ++ } ++ ++ memcpy(bus_path + sizeof("/sys/class/pci_bus/") - 1, bus_id, ++ sizeof("0000:00") - 1); ++ cuda_rpath = realpath(bus_path, NULL); ++ snprintf(pathname, MAXPATHSIZE, "%s/%s", cuda_rpath, bus_id); ++ ++ *path = realpath(pathname, NULL); ++ if (*path == NULL) { ++ ucs_error("Could not find real path of %s", pathname); ++ free(cuda_rpath); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ free(cuda_rpath); ++ ++ return UCS_OK; ++} ++ ++static int uct_ib_iface_ibdev_sysfs_path(const char* ib_name, char** path) ++{ ++ char device_path[MAXPATHSIZE]; ++ ++ snprintf(device_path, MAXPATHSIZE, "/sys/class/infiniband/%s/device", ++ ib_name); ++ ++ *path = realpath(device_path, NULL); ++ if (*path == NULL) { ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ return UCS_OK; ++} ++ ++static int uct_ib_iface_pci_distance(char* cuda_path, char* ibdev_path) ++{ ++ int score = 0; ++ int depth = 0; ++ int same = 1; ++ int i; ++ ++ /* Compare cuda and ibdev paths to determine distance between them ++ Example for UCT_IB_PATH_PIX: ++ ++ ibdev_path: ++ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/0000:04:04.0/0000:05:00.0 ++ cuda path: ++ /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/0000:04:08.0 ++ */ ++ for (i = 0; i < strlen(cuda_path); i++) { ++ if (cuda_path[i] != ibdev_path[i]) same = 0; ++ if (cuda_path[i] == '/') { ++ depth++; ++ if (same) { ++ score++; ++ } ++ } ++ } ++ ++ if (3 == score) { ++ return UCT_IB_PATH_SOC; ++ } ++ ++ if (4 == score) { ++ return UCT_IB_PATH_PHB; ++ } ++ ++ if ((depth - 1) == score) { ++ return UCT_IB_PATH_PIX; ++ } ++ ++ return UCT_IB_PATH_PXB; ++} ++ ++static ucs_status_t uct_ib_iface_get_cuda_latency(uct_ib_iface_t *iface, ++ double *latency) ++{ ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ int pci_distance; ++ CUdevice cuda_device; ++ CUresult cu_err; ++ char *cuda_dev_path; ++ char *ibdev_path; ++ ++ /* Find cuda dev that the current ctx is using and find it's path*/ ++ cu_err = cuCtxGetDevice(&cuda_device); ++ if (CUDA_SUCCESS != cu_err) { ++ *latency = 0.0; ++ return UCS_OK; ++ } ++ uct_ib_iface_cuda_sysfs_path(cuda_device, &cuda_dev_path); ++ ++ /* Find ibdev path for given iface */ ++ uct_ib_iface_ibdev_sysfs_path(uct_ib_device_name(dev), &ibdev_path); ++ ++ /* Obtain pci_distance from the cuda device and ibdev device pair */ ++ pci_distance = uct_ib_iface_pci_distance(cuda_dev_path, ibdev_path); ++ ucs_debug("device = %d ib = %s pci_distance = %d\n", ++ (int) cuda_device, uct_ib_device_name(dev), pci_distance); ++ ++ /* Assign latency as a factor of pci_distance */ ++ ++ *latency = 200e-9 * pci_distance; ++ ++ /* release realpath resources */ ++ free(cuda_dev_path); ++ free(ibdev_path); ++ ++ return UCS_OK; ++} ++#endif ++ + ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + uct_iface_attr_t *iface_attr) + { +@@ -766,13 +1292,17 @@ ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + [0] = 1, + [1] = 4, + [2] = 8, +- [3] = 12 ++ [3] = 12, ++ [4] = 16 + }; + uint8_t active_width, active_speed, active_mtu; + double encoding, signal_rate, wire_speed; + size_t mtu, width, extra_pkt_len; + ucs_status_t status; + double numa_latency; ++#if HAVE_CUDA ++ double cuda_latency; ++#endif + + active_width = uct_ib_iface_port_attr(iface)->active_width; + active_speed = uct_ib_iface_port_attr(iface)->active_speed; +@@ -780,7 +1310,7 @@ ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + + /* Get active width */ + if (!ucs_is_pow2(active_width) || +- (active_width < 1) || (ucs_ilog2(active_width) > 3)) ++ (active_width < 1) || (ucs_ilog2(active_width) > 4)) + { + ucs_error("Invalid active_width on %s:%d: %d", + UCT_IB_IFACE_ARG(iface), active_width); +@@ -845,6 +1375,14 @@ ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + return status; + } + ++#if HAVE_CUDA ++ status = uct_ib_iface_get_cuda_latency(iface, &cuda_latency); ++ if (status != UCS_OK) { ++ return status; ++ } ++ iface_attr->latency.overhead += cuda_latency; ++#endif ++ + iface_attr->latency.overhead += numa_latency; + iface_attr->latency.growth = 0; + +@@ -860,6 +1398,7 @@ ucs_status_t uct_ib_iface_query(uct_ib_iface_t *iface, size_t xport_hdr_len, + + if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface))) { + extra_pkt_len += UCT_IB_GRH_LEN + UCT_IB_ROCE_LEN; ++ iface_attr->latency.overhead += 200e-9; + } else { + /* TODO check if UCT_IB_DELIM_LEN is present in RoCE as well */ + extra_pkt_len += UCT_IB_LRH_LEN; +@@ -889,10 +1428,12 @@ ucs_status_t uct_ib_iface_pre_arm(uct_ib_iface_t *iface) + do { + res = ibv_get_cq_event(iface->comp_channel, &cq, &cq_context); + if (0 == res) { +- if (iface->send_cq == cq) { ++ if (iface->cq[UCT_IB_DIR_TX] == cq) { ++ iface->ops->event_cq(iface, UCT_IB_DIR_TX); + ++send_cq_count; + } +- if (iface->recv_cq == cq) { ++ if (iface->cq[UCT_IB_DIR_RX] == cq) { ++ iface->ops->event_cq(iface, UCT_IB_DIR_RX); + ++recv_cq_count; + } + } +@@ -903,11 +1444,11 @@ ucs_status_t uct_ib_iface_pre_arm(uct_ib_iface_t *iface) + } + + if (send_cq_count > 0) { +- ibv_ack_cq_events(iface->send_cq, send_cq_count); ++ ibv_ack_cq_events(iface->cq[UCT_IB_DIR_TX], send_cq_count); + } + + if (recv_cq_count > 0) { +- ibv_ack_cq_events(iface->recv_cq, recv_cq_count); ++ ibv_ack_cq_events(iface->cq[UCT_IB_DIR_RX], recv_cq_count); + } + + /* avoid re-arming the interface if any events exists */ +@@ -920,26 +1461,18 @@ ucs_status_t uct_ib_iface_pre_arm(uct_ib_iface_t *iface) + return UCS_OK; + } + +-static ucs_status_t uct_ib_iface_arm_cq(uct_ib_iface_t *iface, struct ibv_cq *cq, +- int solicited_only) ++ucs_status_t uct_ib_iface_arm_cq(uct_ib_iface_t *iface, ++ uct_ib_dir_t dir, ++ int solicited_only) + { + int ret; + +- ret = ibv_req_notify_cq(cq, solicited_only); ++ ret = ibv_req_notify_cq(iface->cq[dir], solicited_only); + if (ret != 0) { +- ucs_error("ibv_req_notify_cq("UCT_IB_IFACE_FMT", cq, sol=%d) failed: %m", +- UCT_IB_IFACE_ARG(iface), solicited_only); ++ ucs_error("ibv_req_notify_cq("UCT_IB_IFACE_FMT", %d, sol=%d) failed: %m", ++ UCT_IB_IFACE_ARG(iface), dir, solicited_only); + return UCS_ERR_IO_ERROR; + } + return UCS_OK; + } + +-ucs_status_t uct_ib_iface_arm_tx_cq(uct_ib_iface_t *iface) +-{ +- return uct_ib_iface_arm_cq(iface, iface->send_cq, 0); +-} +- +-ucs_status_t uct_ib_iface_arm_rx_cq(uct_ib_iface_t *iface, int solicited_only) +-{ +- return uct_ib_iface_arm_cq(iface, iface->recv_cq, solicited_only); +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.h +index e929e7a5d..c90c435a2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_iface.h +@@ -16,12 +16,15 @@ + #include + #include + +-#define UCT_IB_MAX_IOV 8UL ++#define UCT_IB_MAX_IOV 8UL ++#define UCT_IB_IFACE_NULL_RES_DOMAIN_KEY 0u ++#define UCT_IB_MAX_ATOMIC_SIZE sizeof(uint64_t) ++ + + /* Forward declarations */ + typedef struct uct_ib_iface_config uct_ib_iface_config_t; + typedef struct uct_ib_iface_ops uct_ib_iface_ops_t; +-typedef struct uct_ib_iface uct_ib_iface_t; ++typedef struct uct_ib_iface uct_ib_iface_t; + + + /** +@@ -37,6 +40,39 @@ typedef enum uct_ib_mtu { + } uct_ib_mtu_t; + + ++/** ++ * Traffic direction. ++ */ ++typedef enum { ++ UCT_IB_DIR_RX, ++ UCT_IB_DIR_TX, ++ UCT_IB_DIR_NUM ++} uct_ib_dir_t; ++ ++enum { ++ UCT_IB_QPT_UNKNOWN, ++#if HAVE_DC_EXP ++ UCT_IB_QPT_DCI = IBV_EXP_QPT_DC_INI, ++#elif HAVE_DC_DV ++ UCT_IB_QPT_DCI = IBV_QPT_DRIVER, ++#endif ++}; ++ ++#if HAVE_CUDA ++enum { ++ /* ++ PHB = Connection traversing PCIe as well as a PCIe Host Bridge ++ PXB = Connection traversing multiple PCIe switches ++ PIX = Connection traversing a single PCIe switch ++ */ ++ ++ UCT_IB_PATH_PIX = 0, ++ UCT_IB_PATH_PXB = 1, ++ UCT_IB_PATH_PHB = 2, ++ UCT_IB_PATH_SOC = 3 ++}; ++#endif ++ + struct uct_ib_iface_config { + uct_iface_config_t super; + +@@ -70,8 +106,8 @@ struct uct_ib_iface_config { + /* Change the address type */ + int addr_type; + +- /* IB GID index to use */ +- unsigned gid_index; ++ /* Forice global routing */ ++ int is_global; + + /* IB SL to use */ + unsigned sl; +@@ -79,30 +115,68 @@ struct uct_ib_iface_config { + /* IB Traffic Class to use */ + unsigned traffic_class; + ++ /* IB hop limit / TTL */ ++ unsigned hop_limit; ++ + /* Ranges of path bits */ + UCS_CONFIG_ARRAY_FIELD(ucs_range_spec_t, ranges) lid_path_bits; + + /* IB PKEY to use */ + unsigned pkey_value; ++ ++ /* Multiple resource domains */ ++ int enable_res_domain; + }; + + ++typedef struct uct_ib_qp_attr { ++ int qp_type; ++ struct ibv_qp_cap cap; ++ struct ibv_srq *srq; ++ unsigned sq_sig_all; ++ unsigned max_inl_recv; ++#if HAVE_DECL_IBV_EXP_CREATE_QP ++ struct ibv_exp_qp_init_attr ibv; ++#elif HAVE_DECL_IBV_CREATE_QP_EX ++ struct ibv_qp_init_attr_ex ibv; ++#else ++ struct ibv_qp_init_attr ibv; ++#endif ++} uct_ib_qp_attr_t; ++ ++ + struct uct_ib_iface_ops { + uct_iface_ops_t super; +- ucs_status_t (*arm_tx_cq)(uct_ib_iface_t *iface); +- ucs_status_t (*arm_rx_cq)(uct_ib_iface_t *iface, int solicited_only); ++ ucs_status_t (*arm_cq)(uct_ib_iface_t *iface, ++ uct_ib_dir_t dir, ++ int solicited_only); ++ void (*event_cq)(uct_ib_iface_t *iface, ++ uct_ib_dir_t dir); + void (*handle_failure)(uct_ib_iface_t *iface, void *arg, + ucs_status_t status); + ucs_status_t (*set_ep_failed)(uct_ib_iface_t *iface, uct_ep_h ep, + ucs_status_t status); ++ ucs_status_t (*create_qp)(uct_ib_iface_t *iface, uct_ib_qp_attr_t *attr, ++ struct ibv_qp **qp_p); + }; + + ++typedef struct uct_ib_iface_res_domain { ++ uct_worker_tl_data_t super; ++#if HAVE_IBV_EXP_RES_DOMAIN ++ struct ibv_exp_res_domain *ibv_domain; ++#elif HAVE_DECL_IBV_ALLOC_TD ++ struct ibv_td *td; ++ struct ibv_pd *pd; ++ struct ibv_pd *ibv_domain; ++#endif ++} uct_ib_iface_res_domain_t; ++ ++ + struct uct_ib_iface { + uct_base_iface_t super; + +- struct ibv_cq *send_cq; +- struct ibv_cq *recv_cq; ++ struct ibv_cq *cq[UCT_IB_DIR_NUM]; + struct ibv_comp_channel *comp_channel; + uct_recv_desc_t release_desc; + +@@ -110,9 +184,10 @@ struct uct_ib_iface { + unsigned path_bits_count; + uint16_t pkey_index; + uint16_t pkey_value; +- uct_ib_address_type_t addr_type; ++ uint8_t is_global_addr; + uint8_t addr_size; + union ibv_gid gid; ++ uct_ib_iface_res_domain_t *res_domain; + + struct { + unsigned rx_payload_offset; /* offset from desc to payload */ +@@ -126,17 +201,35 @@ struct uct_ib_iface { + uint8_t port_num; + uint8_t sl; + uint8_t traffic_class; +- uint8_t gid_index; ++ uint8_t hop_limit; ++ uint8_t gid_index; /* IB GID index to use */ ++ int enable_res_domain; /* Disable multiple resource domains */ + size_t max_iov; /* Maximum buffers in IOV array */ + } config; + + uct_ib_iface_ops_t *ops; ++}; + ++enum { ++ UCT_IB_CQ_IGNORE_OVERRUN = UCS_BIT(0), + }; +-UCS_CLASS_DECLARE(uct_ib_iface_t, uct_ib_iface_ops_t*, uct_md_h, uct_worker_h, +- const uct_iface_params_t*, unsigned, unsigned, unsigned, +- unsigned, size_t, const uct_ib_iface_config_t*) + ++typedef struct uct_ib_iface_init_attr { ++ ++ unsigned rx_priv_len; /* Length of transport private data to reserve */ ++ unsigned rx_hdr_len; /* Length of transport network header */ ++ unsigned tx_cq_len; /* Send CQ length */ ++ unsigned rx_cq_len; /* Receive CQ length */ ++ size_t seg_size; /* Transport segment size */ ++ uint32_t res_domain_key; /* Resource domain key */ ++ int tm_cap_bit; /* Required HW tag-matching capabilities */ ++ unsigned fc_req_size; /* Flow control request size */ ++ int flags; /* Various flags (see enum) */ ++} uct_ib_iface_init_attr_t; ++ ++UCS_CLASS_DECLARE(uct_ib_iface_t, uct_ib_iface_ops_t*, uct_md_h, uct_worker_h, ++ const uct_iface_params_t*, const uct_ib_iface_config_t*, ++ const uct_ib_iface_init_attr_t*); + + /* + * The offset to the payload is the maximum between user-requested headroom +@@ -213,6 +306,44 @@ uct_ib_iface_invoke_am_desc(uct_ib_iface_t *iface, uint8_t am_id, void *data, + } + } + ++ ++/** ++ * @return IB address size of the given link scope. ++ */ ++size_t uct_ib_address_size(uct_ib_iface_t *iface); ++ ++ ++/** ++ * Pack IB address. ++ * ++ * @param [in] dev IB device. TODO remove this. ++ * @param [in] gid GID address to pack. ++ * @param [in] lid LID address to pack. ++ * @param [out] ib_addr Filled with packed ib address. Size of the structure ++ * must be at least what @ref uct_ib_address_size() returns ++ * for the given scope. ++ */ ++void uct_ib_address_pack(uct_ib_iface_t *iface, ++ const union ibv_gid *gid, uint16_t lid, ++ uct_ib_address_t *ib_addr); ++ ++ ++/** ++ * Unpack IB address. ++ * ++ * @param [in] ib_addr IB address to unpack. ++ * @param [out] lid Filled with address LID, or 0 if not present. ++ */ ++void uct_ib_address_unpack(const uct_ib_address_t *ib_addr, uint16_t *lid, ++ union ibv_gid *gid); ++ ++ ++/** ++ * Convert IB address to a human-readable string. ++ */ ++const char *uct_ib_address_str(const uct_ib_address_t *ib_addr, char *buf, ++ size_t max); ++ + ucs_status_t uct_ib_iface_get_device_address(uct_iface_h tl_iface, + uct_device_addr_t *dev_addr); + +@@ -260,9 +391,6 @@ typedef struct uct_ib_recv_wr { + int uct_ib_iface_prepare_rx_wrs(uct_ib_iface_t *iface, ucs_mpool_t *mp, + uct_ib_recv_wr_t *wrs, unsigned n); + +-void uct_ib_iface_fill_ah_attr(uct_ib_iface_t *iface, const uct_ib_address_t *ib_addr, +- uint8_t src_path_bits, struct ibv_ah_attr *ah_attr); +- + ucs_status_t uct_ib_iface_create_ah(uct_ib_iface_t *iface, + struct ibv_ah_attr *ah_attr, + struct ibv_ah **ah_p); +@@ -271,16 +399,22 @@ ucs_status_t uct_ib_iface_pre_arm(uct_ib_iface_t *iface); + + ucs_status_t uct_ib_iface_event_fd_get(uct_iface_h iface, int *fd_p); + +-ucs_status_t uct_ib_iface_arm_tx_cq(uct_ib_iface_t *iface); +- +-ucs_status_t uct_ib_iface_arm_rx_cq(uct_ib_iface_t *iface, int solicited_only); +- ++ucs_status_t uct_ib_iface_arm_cq(uct_ib_iface_t *iface, ++ uct_ib_dir_t dir, ++ int solicited_only); + + static inline uint8_t uct_ib_iface_get_atomic_mr_id(uct_ib_iface_t *iface) + { + return uct_ib_md_get_atomic_mr_id(ucs_derived_of(iface->super.md, uct_ib_md_t)); + } + ++ucs_status_t uct_ib_iface_create_qp(uct_ib_iface_t *iface, ++ uct_ib_qp_attr_t *attr, ++ struct ibv_qp **qp_p); ++ ++void uct_ib_iface_fill_attr(uct_ib_iface_t *iface, ++ uct_ib_qp_attr_t *attr); ++ + + #define UCT_IB_IFACE_FMT \ + "%s:%d" +@@ -291,7 +425,7 @@ static inline uint8_t uct_ib_iface_get_atomic_mr_id(uct_ib_iface_t *iface) + #define UCT_IB_IFACE_VERBS_COMPLETION_ERR(_type, _iface, _i, _wc) \ + ucs_fatal("%s completion[%d] with error on %s/%p: %s, vendor_err 0x%x wr_id 0x%lx", \ + _type, _i, uct_ib_device_name(uct_ib_iface_device(_iface)), _iface, \ +- ibv_wc_status_str(_wc[i].status), _wc[i].vendor_err, \ ++ uct_ib_wc_status_str(_wc[i].status), _wc[i].vendor_err, \ + _wc[i].wr_id); + + #define UCT_IB_IFACE_VERBS_FOREACH_RXWQE(_iface, _i, _hdr, _wc, _wc_count) \ +@@ -304,6 +438,9 @@ static inline uint8_t uct_ib_iface_get_atomic_mr_id(uct_ib_iface_t *iface) + VALGRIND_MAKE_MEM_DEFINED(_hdr, _wc[i].byte_len); \ + 1; }); ++_i) + ++#define UCT_IB_MAX_ZCOPY_LOG_SGE(_iface) \ ++ (uct_ib_iface_device(_iface)->max_zcopy_log_sge) ++ + /** + * Fill ibv_sge data structure by data provided in uct_iov_t + * The function avoids copying IOVs with zero length +@@ -369,15 +506,15 @@ void uct_ib_iface_fill_ah_attr_from_gid_lid(uct_ib_iface_t *iface, uint16_t lid, + ah_attr->port_num = iface->config.port_num; + ah_attr->grh.traffic_class = iface->config.traffic_class; + +- if ((gid != NULL) && +- ((iface->addr_type == UCT_IB_ADDRESS_TYPE_ETH) || +- (iface->addr_type == UCT_IB_ADDRESS_TYPE_GLOBAL) || +- (iface->gid.global.subnet_prefix != gid->global.subnet_prefix))) { +- ah_attr->is_global = 1; ++ if (iface->is_global_addr || ++ (iface->gid.global.subnet_prefix != gid->global.subnet_prefix)) { ++ ucs_assert_always(gid->global.interface_id != 0); ++ ah_attr->is_global = 1; ++ ah_attr->grh.dgid = *gid; + ah_attr->grh.sgid_index = iface->config.gid_index; +- ah_attr->grh.dgid = *gid; ++ ah_attr->grh.hop_limit = iface->config.hop_limit; + } else { +- ah_attr->is_global = 0; ++ ah_attr->is_global = 0; + } + } + +@@ -387,18 +524,26 @@ void uct_ib_iface_fill_ah_attr_from_addr(uct_ib_iface_t *iface, + uint8_t path_bits, + struct ibv_ah_attr *ah_attr) + { +- union ibv_gid *gid_p = NULL; + union ibv_gid gid; +- uint8_t is_global; + uint16_t lid; + +- uct_ib_address_unpack(ib_addr, &lid, &is_global, &gid); ++ uct_ib_address_unpack(ib_addr, &lid, &gid); + +- if (is_global) { +- gid_p = &gid; +- } ++ uct_ib_iface_fill_ah_attr_from_gid_lid(iface, lid, &gid, path_bits, ah_attr); ++} ++ ++static UCS_F_ALWAYS_INLINE ++struct ibv_pd *uct_ib_iface_qp_pd(uct_ib_iface_t *iface) ++{ ++ struct ibv_pd *pd; + +- uct_ib_iface_fill_ah_attr_from_gid_lid(iface, lid, gid_p, path_bits, ah_attr); ++ pd = uct_ib_iface_md(iface)->pd; ++#if HAVE_DECL_IBV_ALLOC_TD ++ if (iface->res_domain && iface->res_domain->ibv_domain) { ++ pd = iface->res_domain->ibv_domain; ++ } ++#endif ++ return pd; + } + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.c +index 9bafb933c..6230e5e39 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.c +@@ -9,10 +9,10 @@ + #include + + +-void uct_ib_log_dump_opcode(uint32_t qp_num, uct_ib_opcode_t *op, int signal, +- int fence, int se, char *buf, size_t max) ++void uct_ib_log_dump_opcode(uint32_t qp_num, unsigned idx, uct_ib_opcode_t *op, ++ int signal, int fence, int se, char *buf, size_t max) + { +- snprintf(buf, max, "%s qp 0x%x %c%c%c", op->name, qp_num, ++ snprintf(buf, max, "%s qp 0x%x %03d %c%c%c", op->name, qp_num, idx, + signal ? 's' : '-', fence ? 'f' : '-', se ? 'e' : '-'); + } + +@@ -39,16 +39,19 @@ void uct_ib_log_dump_sg_list(uct_ib_iface_t *iface, uct_am_trace_type_t type, + sg_list[i].addr, sg_list[i].length, sg_list[i].lkey); + } + +- len = ucs_min(sg_list[i].length, (void*)data + sizeof(data) - md); +- memcpy(md, (void*)sg_list[i].addr, len); +- + s += strlen(s); +- md += len; +- total_len += len; +- total_valid_len += sg_list[i].length; ++ ++ if (data_dump) { ++ len = ucs_min(sg_list[i].length, (void*)data + sizeof(data) - md); ++ memcpy(md, (void*)sg_list[i].addr, len); ++ ++ md += len; ++ total_len += len; ++ total_valid_len += sg_list[i].length; ++ } + } + +- if (data_dump != NULL) { ++ if (data_dump) { + data_dump(&iface->super, type, data, total_len, total_valid_len, s, ends - s); + } + } +@@ -83,7 +86,7 @@ void uct_ib_log_dump_atomic_masked_cswap(int argsize, uint64_t compare, uint64_t + argsize * 8, compare, compare_mask, swap, swap_mask); + } + +-void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, int qp_type, + uint32_t local_qp, uint32_t sender_qp, + uint16_t sender_lid, void *data, size_t length, + uct_log_data_dump_func_t data_dump, +@@ -109,10 +112,11 @@ void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, enum ibv_qp_type qp_ + } + } + +-static void uct_ib_dump_wr_opcode(struct ibv_qp *qp, uct_ib_opcode_t *op, +- int send_flags, char *buf, size_t max) ++static void uct_ib_dump_wr_opcode(struct ibv_qp *qp, uint64_t wr_id, ++ uct_ib_opcode_t *op, int send_flags, ++ char *buf, size_t max) + { +- uct_ib_log_dump_opcode(qp->qp_num, op, ++ uct_ib_log_dump_opcode(qp->qp_num, wr_id, op, + send_flags & IBV_SEND_SIGNALED, + send_flags & IBV_SEND_FENCE, + send_flags & IBV_SEND_SOLICITED, +@@ -153,7 +157,7 @@ static void uct_ib_dump_wr(struct ibv_qp *qp, uct_ib_opcode_t *op, + } + + static void uct_ib_dump_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_send_wr *wr, ++ struct ibv_send_wr *wr, int max_sge, + uct_log_data_dump_func_t data_dump, + char *buf, size_t max) + { +@@ -161,40 +165,42 @@ static void uct_ib_dump_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, + [IBV_WR_RDMA_WRITE] = { "RDMA_WRITE", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [IBV_WR_RDMA_READ] = { "RDMA_READ", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [IBV_WR_SEND] = { "SEND", 0 }, +- [IBV_WR_ATOMIC_CMP_AND_SWP] = { "CS", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, +- [IBV_WR_ATOMIC_FETCH_AND_ADD] = { "FA", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [IBV_WR_SEND_WITH_IMM] = { "SEND_IMM", 0 }, ++ [IBV_WR_ATOMIC_CMP_AND_SWP] = { "CSWAP", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [IBV_WR_ATOMIC_FETCH_AND_ADD] = { "FETCH_ADD", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, + }; + + char *s = buf; + char *ends = buf + max; + uct_ib_opcode_t *op = &opcodes[wr->opcode]; + +- uct_ib_dump_wr_opcode(qp, op, wr->send_flags, s, ends - s); ++ uct_ib_dump_wr_opcode(qp, wr->wr_id, op, wr->send_flags, s, ends - s); + s += strlen(s); + + uct_ib_dump_wr(qp, op, wr, s, ends - s); + s += strlen(s); + +- uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, wr->sg_list, wr->num_sge, ++ uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, wr->sg_list, ++ ucs_min(wr->num_sge, max_sge), + (wr->send_flags & IBV_SEND_INLINE) ? -1 : 0, + data_dump, s, ends - s); + } + + void __uct_ib_log_post_send(const char *file, int line, const char *function, + uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_send_wr *wr, ++ struct ibv_send_wr *wr, int max_sge, + uct_log_data_dump_func_t data_dump_cb) + { + char buf[256] = {0}; + while (wr != NULL) { +- uct_ib_dump_send_wr(iface, qp, wr, data_dump_cb, buf, sizeof(buf) - 1); ++ uct_ib_dump_send_wr(iface, qp, wr, max_sge, data_dump_cb, buf, sizeof(buf) - 1); + uct_log_data(file, line, function, buf); + wr = wr->next; + } + } + + void __uct_ib_log_recv_completion(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++ uct_ib_iface_t *iface, int qp_type, + uint32_t l_qp, uint32_t r_qp, uint16_t slid, + void *data, size_t length, + uct_log_data_dump_func_t packet_dump_cb) +@@ -214,7 +220,7 @@ void __uct_ib_log_recv_completion(const char *file, int line, const char *functi + + #if HAVE_DECL_IBV_EXP_POST_SEND + static void uct_ib_dump_exp_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_exp_send_wr *wr, ++ struct ibv_exp_send_wr *wr, int max_sge, + uct_log_data_dump_func_t data_dump_cb, + char *buf, size_t max) + { +@@ -225,13 +231,16 @@ static void uct_ib_dump_exp_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, + [IBV_EXP_WR_RDMA_WRITE] = { "RDMA_WRITE", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [IBV_EXP_WR_RDMA_READ] = { "RDMA_READ", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [IBV_EXP_WR_SEND] = { "SEND", 0 }, +- [IBV_EXP_WR_ATOMIC_CMP_AND_SWP] = { "CS", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, +- [IBV_EXP_WR_ATOMIC_FETCH_AND_ADD] = { "FA", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [IBV_EXP_WR_SEND_WITH_IMM] = { "SEND_IMM", 0 }, ++ [IBV_EXP_WR_ATOMIC_CMP_AND_SWP] = { "CSWAP", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [IBV_EXP_WR_ATOMIC_FETCH_AND_ADD] = { "FETCH_ADD", UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, + #if HAVE_DECL_IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP +- [IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP] = { "MASKED_CS", UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, ++ [IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP] = { "MASKED_CSWAP", ++ UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, + #endif + #if HAVE_DECL_IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD +- [IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD] = { "MASKED_FA", UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, ++ [IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD] = { "MASKED_FETCH_ADD", ++ UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, + #endif + }; + +@@ -243,7 +252,7 @@ static void uct_ib_dump_exp_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, + UCS_STATIC_ASSERT((int)IBV_SEND_SIGNALED == (int)IBV_EXP_SEND_SIGNALED); + UCS_STATIC_ASSERT((int)IBV_SEND_FENCE == (int)IBV_EXP_SEND_FENCE); + UCS_STATIC_ASSERT((int)IBV_SEND_SOLICITED == (int)IBV_EXP_SEND_SOLICITED); +- uct_ib_dump_wr_opcode(qp, op, wr->exp_send_flags, s, ends - s); ++ uct_ib_dump_wr_opcode(qp, wr->wr_id, op, wr->exp_send_flags, s, ends - s); + s += strlen(s); + + /* TODO DC address handle */ +@@ -283,19 +292,21 @@ static void uct_ib_dump_exp_send_wr(uct_ib_iface_t *iface, struct ibv_qp *qp, + } + #endif + +- uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, wr->sg_list, wr->num_sge, ++ uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, wr->sg_list, ++ ucs_min(wr->num_sge, max_sge), + (wr->exp_send_flags & IBV_EXP_SEND_INLINE) ? -1 : 0, + data_dump_cb, s, ends - s); + } + + void __uct_ib_log_exp_post_send(const char *file, int line, const char *function, + uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_exp_send_wr *wr, ++ struct ibv_exp_send_wr *wr, int max_sge, + uct_log_data_dump_func_t packet_dump_cb) + { + char buf[256] = {0}; + while (wr != NULL) { +- uct_ib_dump_exp_send_wr(iface, qp, wr, packet_dump_cb, buf, sizeof(buf) - 1); ++ uct_ib_dump_exp_send_wr(iface, qp, wr, max_sge, packet_dump_cb, ++ buf, sizeof(buf) - 1); + uct_log_data(file, line, function, buf); + wr = wr->next; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.h +index 3f608fbc3..fc7d75630 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_log.h +@@ -28,8 +28,8 @@ typedef struct uct_ib_opcode { + } uct_ib_opcode_t; + + +-void uct_ib_log_dump_opcode(uint32_t qp_num, uct_ib_opcode_t *op, int signal, +- int fence, int se, char *buf, size_t max); ++void uct_ib_log_dump_opcode(uint32_t qp_num, unsigned idx, uct_ib_opcode_t *op, ++ int signal, int fence, int se, char *buf, size_t max); + + void uct_ib_log_dump_sg_list(uct_ib_iface_t *iface, uct_am_trace_type_t type, + struct ibv_sge *sg_list, int num_sge, +@@ -51,7 +51,7 @@ void uct_ib_log_dump_atomic_masked_cswap(int argsize, uint64_t compare, uint64_t + uint64_t swap, uint64_t swap_mask, + char *buf, size_t max); + +-void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, int qp_type, + uint32_t local_qp, uint32_t sender_qp, + uint16_t sender_lid, void *data, size_t length, + uct_log_data_dump_func_t data_dump, +@@ -59,25 +59,26 @@ void uct_ib_log_dump_recv_completion(uct_ib_iface_t *iface, enum ibv_qp_type qp_ + + void __uct_ib_log_post_send(const char *file, int line, const char *function, + uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_send_wr *wr, ++ struct ibv_send_wr *wr, int max_sge, + uct_log_data_dump_func_t packet_dump_cb); + + void __uct_ib_log_recv_completion(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++ uct_ib_iface_t *iface, int qp_type, + uint32_t l_qp, uint32_t r_qp, uint16_t slid, void *data, + size_t length, uct_log_data_dump_func_t packet_dump_cb); + + #if HAVE_DECL_IBV_EXP_POST_SEND + void __uct_ib_log_exp_post_send(const char *file, int line, const char *function, + uct_ib_iface_t *iface, struct ibv_qp *qp, +- struct ibv_exp_send_wr *wr, ++ struct ibv_exp_send_wr *wr, int max_sge, + uct_log_data_dump_func_t packet_dump_cb); + #endif + + +-#define uct_ib_log_post_send(_iface, _qp, _wr, _dump_cb) \ ++#define uct_ib_log_post_send(_iface, _qp, _wr, _max_sge, _dump_cb) \ + if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { \ +- __uct_ib_log_post_send(__FILE__, __LINE__, __FUNCTION__, _iface, _qp, _wr, _dump_cb); \ ++ __uct_ib_log_post_send(__FILE__, __LINE__, __FUNCTION__, \ ++ _iface, _qp, _wr, _max_sge, _dump_cb); \ + } + + /* Suitable for both: regular and exp wcs */ +@@ -88,9 +89,10 @@ void __uct_ib_log_exp_post_send(const char *file, int line, const char *function + _data, _length, _dump_cb, ## __VA_ARGS__); \ + } + +-#define uct_ib_log_exp_post_send(_iface, _qp, _wr, _dump_cb) \ ++#define uct_ib_log_exp_post_send(_iface, _qp, _wr, _max_sge,_dump_cb) \ + if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { \ +- __uct_ib_log_exp_post_send(__FILE__, __LINE__, __FUNCTION__, _iface, _qp, _wr, _dump_cb); \ ++ __uct_ib_log_exp_post_send(__FILE__, __LINE__, __FUNCTION__, \ ++ _iface, _qp, _wr, _max_sge, _dump_cb); \ + } + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.c +index 791933e12..9df15e08f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.c +@@ -10,8 +10,12 @@ + #include "ib_device.h" + + #include +-#include ++#include ++#include ++#include ++#include + #include ++#include + + + #define UCT_IB_MD_PREFIX "ib" +@@ -98,6 +102,31 @@ static ucs_config_field_t uct_ib_md_config_table[] = { + "cause stack smashing.\n", + ucs_offsetof(uct_ib_md_config_t, ext.enable_contig_pages), UCS_CONFIG_TYPE_BOOL}, + ++ {"INDIRECT_ATOMIC", "y", ++ "Use indirect atomic\n", ++ ucs_offsetof(uct_ib_md_config_t, ext.enable_indirect_atomic), UCS_CONFIG_TYPE_BOOL}, ++ ++ {"GID_INDEX", "auto", ++ "Port GID index to use.", ++ ucs_offsetof(uct_ib_md_config_t, ext.gid_index), UCS_CONFIG_TYPE_ULUNITS}, ++ ++ {"SUBNET_PREFIX", "", ++ "Infiniband subnet prefix to filter ports by, empty means no filter. " ++ "Relevant for IB link layer only\n" ++ "For example a filter for the default subnet prefix can be specified as: fe80:0:0:0", ++ ucs_offsetof(uct_ib_md_config_t, subnet_prefix), UCS_CONFIG_TYPE_STRING}, ++ ++ {"GPU_DIRECT_RDMA", "try", ++ "Use GPU Direct RDMA for HCA to access GPU pages directly\n", ++ ucs_offsetof(uct_ib_md_config_t, ext.enable_gpudirect_rdma), UCS_CONFIG_TYPE_TERNARY}, ++ ++#if HAVE_EXP_UMR ++ {"MAX_INLINE_KLM_LIST", "inf", ++ "When posting a UMR, KLM lists shorter or equal to this value will be posted as inline.\n" ++ "The actual maximal length is also limited by device capabilities.", ++ ucs_offsetof(uct_ib_md_config_t, ext.max_inline_klm_list), UCS_CONFIG_TYPE_UINT}, ++#endif ++ + {NULL} + }; + +@@ -125,9 +154,18 @@ static ucs_status_t uct_ib_md_query(uct_md_h uct_md, uct_md_attr_t *md_attr) + md_attr->cap.reg_mem_types = UCS_BIT(UCT_MD_MEM_TYPE_HOST); + + #if HAVE_CUDA +- /* check if GDR driver is loaded */ +- if (!access("/sys/kernel/mm/memory_peers/nv_mem/version", F_OK)) { +- md_attr->cap.reg_mem_types |= UCS_BIT(UCT_MD_MEM_TYPE_CUDA); ++ if (md->config.enable_gpudirect_rdma != UCS_NO) { ++ /* check if GDR driver is loaded */ ++ if (!access("/sys/kernel/mm/memory_peers/nv_mem/version", F_OK)) { ++ md_attr->cap.reg_mem_types |= UCS_BIT(UCT_MD_MEM_TYPE_CUDA); ++ ucs_debug("%s: GPUDirect RDMA is enabled", uct_ib_device_name(&md->dev)); ++ } else if (md->config.enable_gpudirect_rdma == UCS_YES) { ++ ucs_error("%s: Couldn't enable GPUDirect RDMA. Please make sure nv_peer_mem" ++ " plugin installed correctly.", uct_ib_device_name(&md->dev)); ++ return UCS_ERR_UNSUPPORTED; ++ } else { ++ ucs_debug("%s: GPUDirect RDMA is disabled", uct_ib_device_name(&md->dev)); ++ } + } + #endif + +@@ -157,7 +195,8 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + + ibdev = &md->dev; + +- if (!(ibdev->dev_attr.exp_device_cap_flags & IBV_EXP_DEVICE_UMR)) { ++ if (!(ibdev->dev_attr.exp_device_cap_flags & IBV_EXP_DEVICE_UMR) || ++ !md->config.enable_indirect_atomic) { + return UCS_ERR_UNSUPPORTED; + } + +@@ -173,6 +212,9 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + goto err; + } + ++ md->config.max_inline_klm_list = ucs_min(md->config.max_inline_klm_list, ++ ibdev->dev_attr.umr_caps.max_send_wqe_inline_klms); ++ + qp_init_attr.qp_type = IBV_QPT_RC; + qp_init_attr.send_cq = md->umr_cq; + qp_init_attr.recv_cq = md->umr_cq; +@@ -185,11 +227,7 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + qp_init_attr.pd = md->pd; + qp_init_attr.comp_mask = IBV_EXP_QP_INIT_ATTR_PD|IBV_EXP_QP_INIT_ATTR_MAX_INL_KLMS; + qp_init_attr.max_inl_recv = 0; +-#if (HAVE_IBV_EXP_QP_CREATE_UMR_CAPS || HAVE_EXP_UMR_NEW_API) +- qp_init_attr.max_inl_send_klms = ibdev->dev_attr.umr_caps.max_send_wqe_inline_klms; +-#else +- qp_init_attr.max_inl_send_klms = ibdev->dev_attr.max_send_wqe_inline_klms; +-#endif ++ qp_init_attr.max_inl_send_klms = md->config.max_inline_klm_list; + + #if HAVE_IBV_EXP_QP_CREATE_UMR + qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS; +@@ -224,7 +262,8 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + qp_attr.ah_attr.port_num = port_num; + qp_attr.ah_attr.dlid = port_attr->lid; + qp_attr.ah_attr.is_global = 1; +- if (uct_ib_device_query_gid(ibdev, port_num, 0, &qp_attr.ah_attr.grh.dgid) != UCS_OK) { ++ if (uct_ib_device_query_gid(ibdev, port_num, UCT_IB_MD_DEFAULT_GID_INDEX, ++ &qp_attr.ah_attr.grh.dgid) != UCS_OK) { + goto err_destroy_qp; + } + qp_attr.rq_psn = 0; +@@ -254,6 +293,9 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md) + ucs_error("Failed to modify UMR QP to RTS: %m"); + goto err_destroy_qp; + } ++ ++ ucs_debug("initialized UMR QP 0x%x, max_inline_klm_list %u", ++ md->umr_qp->qp_num, md->config.max_inline_klm_list); + return UCS_OK; + + err_destroy_qp: +@@ -297,6 +339,29 @@ uint8_t uct_ib_md_get_atomic_mr_id(uct_ib_md_t *md) + #endif + } + ++static void uct_ib_md_print_mem_reg_err_msg(ucs_log_level_t level, void *address, ++ size_t length, uint64_t exp_access, ++ const char *exp_prefix) ++{ ++ char msg[200] = {0}; ++ struct rlimit limit_info; ++ ++ ucs_snprintf_zero(msg, sizeof(msg), ++ "ibv_%sreg_mr(address=%p, length=%zu, %saccess=0x%lx) failed: %m", ++ exp_prefix, address, length, exp_prefix, exp_access); ++ ++ /* Check the value of the max locked memory which is set on the system ++ * (ulimit -l) */ ++ if (!getrlimit(RLIMIT_MEMLOCK, &limit_info) && ++ (limit_info.rlim_cur != RLIM_INFINITY)) { ++ ucs_snprintf_zero(msg + strlen(msg), sizeof(msg) - strlen(msg), ++ ". Please set max locked memory (ulimit -l) to 'unlimited' " ++ "(current: %llu kbytes)", limit_info.rlim_cur / UCS_KBYTE); ++ } ++ ++ ucs_log(level, "%s", msg); ++} ++ + static ucs_status_t uct_ib_md_reg_mr(uct_ib_md_t *md, void *address, + size_t length, uint64_t exp_access, + int silent, struct ibv_mr **mr_p) +@@ -316,8 +381,8 @@ static ucs_status_t uct_ib_md_reg_mr(uct_ib_md_t *md, void *address, + + mr = UCS_PROFILE_CALL(ibv_exp_reg_mr, &in); + if (mr == NULL) { +- ucs_log(level, "ibv_exp_reg_mr(address=%p, length=%zu, exp_access=0x%lx) failed: %m", +- in.addr, in.length, in.exp_access); ++ uct_ib_md_print_mem_reg_err_msg(level, in.addr, in.length, ++ in.exp_access, "exp_"); + return UCS_ERR_IO_ERROR; + } + #else +@@ -327,8 +392,8 @@ static ucs_status_t uct_ib_md_reg_mr(uct_ib_md_t *md, void *address, + mr = UCS_PROFILE_CALL(ibv_reg_mr, md->pd, address, length, + UCT_IB_MEM_ACCESS_FLAGS); + if (mr == NULL) { +- ucs_log(level, "ibv_reg_mr(address=%p, length=%zu, access=0x%x) failed: %m", +- address, length, UCT_IB_MEM_ACCESS_FLAGS); ++ uct_ib_md_print_mem_reg_err_msg(level, address, length, ++ UCT_IB_MEM_ACCESS_FLAGS, ""); + return UCS_ERR_IO_ERROR; + } + } +@@ -341,12 +406,14 @@ static ucs_status_t uct_ib_md_post_umr(uct_ib_md_t *md, struct ibv_mr *mr, + off_t offset, struct ibv_mr **umr_p) + { + #if HAVE_EXP_UMR +- struct ibv_exp_mem_region mem_reg; ++ struct ibv_exp_mem_region *mem_reg = NULL; + struct ibv_exp_send_wr wr, *bad_wr; + struct ibv_exp_create_mr_in mrin; + ucs_status_t status; + struct ibv_mr *umr; + struct ibv_wc wc; ++ int i, list_size; ++ size_t reg_length; + int ret; + + if (md->umr_qp == NULL) { +@@ -354,20 +421,56 @@ static ucs_status_t uct_ib_md_post_umr(uct_ib_md_t *md, struct ibv_mr *mr, + goto err; + } + +- /* Create memory key */ ++ /* Create and fill memory key */ + memset(&mrin, 0, sizeof(mrin)); +- mrin.pd = md->pd; ++ memset(&wr, 0, sizeof(wr)); + +-#ifdef HAVE_EXP_UMR_NEW_API +- mrin.attr.create_flags = IBV_EXP_MR_INDIRECT_KLMS; +- mrin.attr.exp_access_flags = UCT_IB_MEM_ACCESS_FLAGS; +- mrin.attr.max_klm_list_size = 1; ++ mrin.pd = md->pd; ++ wr.exp_opcode = IBV_EXP_WR_UMR_FILL; ++ wr.exp_send_flags = IBV_EXP_SEND_SIGNALED; ++ wr.ext_op.umr.exp_access = UCT_IB_MEM_ACCESS_FLAGS; ++ ++ reg_length = UCT_IB_MD_MAX_MR_SIZE; ++#ifdef HAVE_EXP_UMR_KSM ++ if ((md->dev.dev_attr.comp_mask & IBV_EXP_DEVICE_ATTR_COMP_MASK_2) && ++ (md->dev.dev_attr.comp_mask_2 & IBV_EXP_DEVICE_ATTR_UMR_FIXED_SIZE_CAPS) && ++ (md->dev.dev_attr.exp_device_cap_flags & IBV_EXP_DEVICE_UMR_FIXED_SIZE)) ++ { ++ reg_length = md->dev.dev_attr.umr_fixed_size_caps.max_entity_size; ++ list_size = ucs_div_round_up(mr->length, reg_length); ++ } else if (mr->length < reg_length) { ++ list_size = 1; ++ } else { ++ status = UCS_ERR_UNSUPPORTED; ++ goto err; ++ } ++ ++ if (list_size > 1) { ++ mrin.attr.create_flags = IBV_EXP_MR_FIXED_BUFFER_SIZE; ++ wr.ext_op.umr.umr_type = IBV_EXP_UMR_MR_LIST_FIXED_SIZE; ++ } else { ++ mrin.attr.create_flags = IBV_EXP_MR_INDIRECT_KLMS; ++ wr.ext_op.umr.umr_type = IBV_EXP_UMR_MR_LIST; ++ } + #else +- mrin.attr.create_flags = IBV_MR_NONCONTIG_MEM; +- mrin.attr.access_flags = UCT_IB_MEM_ACCESS_FLAGS; +- mrin.attr.max_reg_descriptors = 1; ++ if (mr->length >= reg_length) { ++ status = UCS_ERR_UNSUPPORTED; ++ goto err; ++ } ++ ++ list_size = 1; ++ mrin.attr.create_flags = IBV_EXP_MR_INDIRECT_KLMS; ++ wr.ext_op.umr.umr_type = IBV_EXP_UMR_MR_LIST; + #endif + ++ mrin.attr.exp_access_flags = UCT_IB_MEM_ACCESS_FLAGS; ++ mrin.attr.max_klm_list_size = list_size; ++ mem_reg = ucs_calloc(list_size, sizeof(mem_reg[0]), "mem_reg"); ++ if (!mem_reg) { ++ status = UCS_ERR_NO_MEMORY; ++ goto err; ++ } ++ + umr = ibv_exp_create_mr(&mrin); + if (!umr) { + ucs_error("Failed to create modified_mr: %m"); +@@ -375,44 +478,50 @@ static ucs_status_t uct_ib_md_post_umr(uct_ib_md_t *md, struct ibv_mr *mr, + goto err; + } + +- /* Fill memory list and UMR */ +- memset(&wr, 0, sizeof(wr)); +- memset(&mem_reg, 0, sizeof(mem_reg)); +- +- mem_reg.base_addr = (uintptr_t) mr->addr; +- mem_reg.length = mr->length; +- +-#ifdef HAVE_EXP_UMR_NEW_API +- mem_reg.mr = mr; +- wr.ext_op.umr.umr_type = IBV_EXP_UMR_MR_LIST; +- wr.ext_op.umr.mem_list.mem_reg_list = &mem_reg; +- wr.ext_op.umr.exp_access = UCT_IB_MEM_ACCESS_FLAGS; +- wr.ext_op.umr.modified_mr = umr; +- wr.ext_op.umr.base_addr = (uint64_t) (uintptr_t) mr->addr + offset; +- wr.ext_op.umr.num_mrs = 1; +- ucs_trace_data("UMR_FILL qp 0x%x lkey 0x%x base 0x%lx [addr %lx len %zu lkey 0x%x]", +- md->umr_qp->qp_num, wr.ext_op.umr.modified_mr->lkey, +- wr.ext_op.umr.base_addr, mem_reg.base_addr, mem_reg.length, +- mem_reg.mr->lkey); +-#else +- mem_reg.m_key = mr; +- wr.ext_op.umr.memory_key.mkey_type = IBV_EXP_UMR_MEM_LAYOUT_NONCONTIG; +- wr.ext_op.umr.memory_key.mem_list.mem_reg_list = &mem_reg; +- wr.ext_op.umr.memory_key.access = UCT_IB_MEM_ACCESS_FLAGS; +- wr.ext_op.umr.memory_key.modified_mr = umr; +- wr.ext_op.umr.memory_key.region_base_addr = mr->addr + offset; +- wr.num_sge = 1; +-#endif ++ for (i = 0; i < list_size; i++) { ++ mem_reg[i].base_addr = (uintptr_t) mr->addr + i * reg_length; ++ mem_reg[i].length = reg_length; ++ mem_reg[i].mr = mr; ++ } ++ ++ ucs_assert(list_size >= 1); ++ mem_reg[list_size - 1].length = mr->length % reg_length; ++ wr.ext_op.umr.mem_list.mem_reg_list = mem_reg; ++ wr.ext_op.umr.base_addr = (uint64_t) (uintptr_t) mr->addr + offset; ++ wr.ext_op.umr.num_mrs = list_size; ++ wr.ext_op.umr.modified_mr = umr; ++ ++ /* If the list exceeds max inline size, allocate a container object */ ++ if (list_size > md->config.max_inline_klm_list) { ++ struct ibv_exp_mkey_list_container_attr in = { ++ .pd = md->pd, ++ .mkey_list_type = IBV_EXP_MKEY_LIST_TYPE_INDIRECT_MR, ++ .max_klm_list_size = list_size ++ }; ++ ++ wr.ext_op.umr.memory_objects = ibv_exp_alloc_mkey_list_memory(&in); ++ if (wr.ext_op.umr.memory_objects == NULL) { ++ ucs_error("ibv_exp_alloc_mkey_list_memory(list_size=%d) failed: %m", ++ list_size); ++ status = UCS_ERR_IO_ERROR; ++ goto err_free_umr; ++ } ++ } else { ++ wr.ext_op.umr.memory_objects = NULL; ++ wr.exp_send_flags |= IBV_EXP_SEND_INLINE; ++ } + +- wr.exp_opcode = IBV_EXP_WR_UMR_FILL; +- wr.exp_send_flags = IBV_EXP_SEND_INLINE | IBV_EXP_SEND_SIGNALED; ++ ucs_trace_data("UMR_FILL qp 0x%x lkey 0x%x base 0x%lx [addr %lx len %zu lkey 0x%x] list_size %d", ++ md->umr_qp->qp_num, wr.ext_op.umr.modified_mr->lkey, ++ wr.ext_op.umr.base_addr, mem_reg[0].base_addr, ++ mem_reg[0].length, mem_reg[0].mr->lkey, list_size); + + /* Post UMR */ + ret = ibv_exp_post_send(md->umr_qp, &wr, &bad_wr); + if (ret) { + ucs_error("ibv_exp_post_send(UMR_FILL) failed: %m"); + status = UCS_ERR_IO_ERROR; +- goto err_free_umr; ++ goto err_free_klm_container; + } + + /* Wait for send UMR completion */ +@@ -421,29 +530,39 @@ static ucs_status_t uct_ib_md_post_umr(uct_ib_md_t *md, struct ibv_mr *mr, + if (ret < 0) { + ucs_error("ibv_exp_poll_cq(umr_cq) failed: %m"); + status = UCS_ERR_IO_ERROR; +- goto err_free_umr; ++ goto err_free_klm_container; + } + if (ret == 1) { + if (wc.status != IBV_WC_SUCCESS) { + ucs_error("UMR_FILL completed with error: %s vendor_err %d", + ibv_wc_status_str(wc.status), wc.vendor_err); + status = UCS_ERR_IO_ERROR; +- goto err_free_umr; ++ goto err_free_klm_container; + } + break; + } + } + +- ucs_trace("UMR registered memory %p..%p offset 0x%lx on %s lkey 0x%x rkey 0x%x", ++ if (wr.ext_op.umr.memory_objects != NULL) { ++ ibv_exp_dealloc_mkey_list_memory(wr.ext_op.umr.memory_objects); ++ } ++ ++ ucs_debug("UMR registered memory %p..%p offset 0x%lx on %s lkey 0x%x rkey 0x%x", + mr->addr, mr->addr + mr->length, offset, uct_ib_device_name(&md->dev), + umr->lkey, umr->rkey); + *umr_p = umr; + ++ ucs_free(mem_reg); + return UCS_OK; + ++err_free_klm_container: ++ if (wr.ext_op.umr.memory_objects != NULL) { ++ ibv_exp_dealloc_mkey_list_memory(wr.ext_op.umr.memory_objects); ++ } + err_free_umr: + UCS_PROFILE_CALL(ibv_dereg_mr, umr); + err: ++ ucs_free(mem_reg); + return status; + #else + return UCS_ERR_UNSUPPORTED; +@@ -639,7 +758,7 @@ static void uct_ib_mem_init(uct_ib_mem_t *memh, unsigned uct_flags, + + static ucs_status_t uct_ib_mem_alloc(uct_md_h uct_md, size_t *length_p, + void **address_p, unsigned flags, +- uct_mem_h *memh_p UCS_MEMTRACK_ARG) ++ const char *alloc_name, uct_mem_h *memh_p) + { + #if HAVE_DECL_IBV_EXP_ACCESS_ALLOCATE_MR + uct_ib_md_t *md = ucs_derived_of(uct_md, uct_ib_md_t); +@@ -658,7 +777,7 @@ static ucs_status_t uct_ib_mem_alloc(uct_md_h uct_md, size_t *length_p, + goto err; + } + +- length = ucs_memtrack_adjust_alloc_size(*length_p); ++ length = *length_p; + exp_access = uct_ib_md_access_flags(md, flags, length) | + IBV_EXP_ACCESS_ALLOCATE_MR; + status = uct_ib_md_reg_mr(md, NULL, length, exp_access, 0, &memh->mr); +@@ -678,10 +797,11 @@ static ucs_status_t uct_ib_mem_alloc(uct_md_h uct_md, size_t *length_p, + } + + UCS_STATS_UPDATE_COUNTER(md->stats, UCT_IB_MD_STAT_MEM_ALLOC, +1); ++ ucs_memtrack_allocated(memh->mr->addr, memh->mr->length UCS_MEMTRACK_VAL); ++ + *address_p = memh->mr->addr; + *length_p = memh->mr->length; + *memh_p = memh; +- ucs_memtrack_allocated(address_p, length_p UCS_MEMTRACK_VAL); + return UCS_OK; + + err_free_memh: +@@ -698,7 +818,7 @@ static ucs_status_t uct_ib_mem_free(uct_md_h md, uct_mem_h memh) + uct_ib_mem_t *ib_memh = memh; + ucs_status_t status; + +- ucs_memtrack_releasing_adjusted(ib_memh->mr->addr); ++ ucs_memtrack_releasing(ib_memh->mr->addr); + + status = UCS_PROFILE_CALL(uct_ib_memh_dereg, memh); + if (status != UCS_OK) { +@@ -841,8 +961,6 @@ static ucs_status_t uct_ib_rkey_unpack(uct_md_component_t *mdc, + return UCS_OK; + } + +-static void uct_ib_md_close(uct_md_h md); +- + static uct_md_ops_t uct_ib_md_ops = { + .close = uct_ib_md_close, + .query = uct_ib_md_query, +@@ -910,16 +1028,19 @@ static uct_md_ops_t uct_ib_md_rcache_ops = { + }; + + static ucs_status_t uct_ib_rcache_mem_reg_cb(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *rregion) ++ void *arg, ucs_rcache_region_t *rregion, ++ uint16_t rcache_mem_reg_flags) + { + uct_ib_rcache_region_t *region = ucs_derived_of(rregion, uct_ib_rcache_region_t); + uct_ib_md_t *md = context; +- int *flags = arg; ++ int *flags = arg; ++ int silent = (rcache_mem_reg_flags & UCS_RCACHE_MEM_REG_HIDE_ERRORS) || ++ (*flags & UCT_MD_MEM_FLAG_HIDE_ERRORS); + ucs_status_t status; + + status = uct_ib_mem_reg_internal(&md->super, (void*)region->super.super.start, + region->super.super.end - region->super.super.start, +- *flags, 1, ®ion->memh); ++ *flags, silent, ®ion->memh); + if (status != UCS_OK) { + return status; + } +@@ -1012,10 +1133,10 @@ static uct_md_ops_t UCS_V_UNUSED uct_ib_md_global_odp_ops = { + .is_mem_type_owned = (void*)ucs_empty_function_return_zero, + }; + +-static void uct_ib_make_md_name(char md_name[UCT_MD_NAME_MAX], struct ibv_device *device) ++void uct_ib_make_md_name(char md_name[UCT_MD_NAME_MAX], struct ibv_device *device) + { +- snprintf(md_name, UCT_MD_NAME_MAX, "%s/", UCT_IB_MD_PREFIX); +- strncat(md_name, device->name, UCT_MD_NAME_MAX - strlen(device->name) - 1); ++ snprintf(md_name, UCT_MD_NAME_MAX, "%s/%s", UCT_IB_MD_PREFIX, ++ ibv_get_device_name(device)); + } + + static ucs_status_t uct_ib_query_md_resources(uct_md_resource_desc_t **resources_p, +@@ -1086,7 +1207,8 @@ static void uct_ib_md_release_device_config(uct_ib_md_t *md) + } + + static ucs_status_t +-uct_ib_md_parse_reg_methods(uct_ib_md_t *md, const uct_ib_md_config_t *md_config) ++uct_ib_md_parse_reg_methods(uct_ib_md_t *md, uct_md_attr_t *md_attr, ++ const uct_ib_md_config_t *md_config) + { + ucs_rcache_params_t rcache_params; + ucs_status_t status; +@@ -1097,6 +1219,10 @@ uct_ib_md_parse_reg_methods(uct_ib_md_t *md, const uct_ib_md_config_t *md_config + rcache_params.region_struct_size = sizeof(uct_ib_rcache_region_t); + rcache_params.alignment = md_config->rcache.alignment; + rcache_params.max_alignment = ucs_get_page_size(); ++ rcache_params.ucm_events = UCM_EVENT_VM_UNMAPPED; ++ if (md_attr->cap.reg_mem_types & ~UCS_BIT(UCT_MD_MEM_TYPE_HOST)) { ++ rcache_params.ucm_events |= UCM_EVENT_MEM_TYPE_FREE; ++ } + rcache_params.ucm_event_priority = md_config->rcache.event_prio; + rcache_params.context = md; + rcache_params.ops = &uct_ib_rcache_ops; +@@ -1234,6 +1360,29 @@ static void uct_ib_md_release_reg_method(uct_ib_md_t *md) + } + + static ucs_status_t ++uct_ib_md_parse_subnet_prefix(const char *subnet_prefix_str, ++ uint64_t *subnet_prefix) ++{ ++ uint16_t pfx[4] = {0}; ++ uint64_t pfx64 = 0; ++ int res, i; ++ ++ res = sscanf(subnet_prefix_str, "%hx:%hx:%hx:%hx", ++ &pfx[0], &pfx[1], &pfx[2], &pfx[3]); ++ if (res != 4) { ++ ucs_error("subnet filter '%s' is invalid", subnet_prefix_str); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ for (i = 0; i < 4; i++) { ++ pfx64 = pfx[i] + (pfx64 << 16); ++ } ++ ++ *subnet_prefix = htobe64(pfx64); ++ return UCS_OK; ++} ++ ++ucs_status_t + uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md_h *md_p) + { + const uct_ib_md_config_t *md_config = ucs_derived_of(uct_md_config, uct_ib_md_config_t); +@@ -1242,6 +1391,9 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + ucs_status_t status; + int i, num_devices, ret; + uct_ib_md_t *md; ++ uct_md_attr_t md_attr; ++ ++ ucs_trace("opening IB device %s", md_name); + + /* Get device list from driver */ + ib_device_list = ibv_get_device_list(&num_devices); +@@ -1260,6 +1412,7 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + } + } + if (ib_device == NULL) { ++ ucs_debug("IB device %s not found", md_name); + status = UCS_ERR_NO_DEVICE; + goto out_free_dev_list; + } +@@ -1270,6 +1423,7 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + goto out_free_dev_list; + } + ++ md->super.ops = &uct_ib_md_ops; + md->super.component = &uct_ib_mdc; + md->config = md_config->ext; + +@@ -1313,6 +1467,17 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + md->config.odp.max_size = uct_ib_device_odp_max_size(&md->dev); + } + ++ if (strlen(md_config->subnet_prefix) > 0) { ++ status = uct_ib_md_parse_subnet_prefix(md_config->subnet_prefix, ++ &md->subnet_filter); ++ ++ if (status != UCS_OK) { ++ goto err_cleanup_device; ++ } ++ ++ md->check_subnet_filter = 1; ++ } ++ + /* Allocate memory domain */ + md->pd = ibv_alloc_pd(md->dev.ibv_context); + if (md->pd == NULL) { +@@ -1329,7 +1494,12 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + goto err_dealloc_pd; + } + +- status = uct_ib_md_parse_reg_methods(md, md_config); ++ status = uct_md_query(&md->super, &md_attr); ++ if (status != UCS_OK) { ++ goto err_destroy_umr_qp; ++ } ++ ++ status = uct_ib_md_parse_reg_methods(md, &md_attr, md_config); + if (status != UCS_OK) { + goto err_destroy_umr_qp; + } +@@ -1339,6 +1509,11 @@ uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md + goto err_release_reg_method; + } + ++ md->dev.max_zcopy_log_sge = INT_MAX; ++ if (md_attr.cap.reg_mem_types & ~UCS_BIT(UCT_MD_MEM_TYPE_HOST)) { ++ md->dev.max_zcopy_log_sge = 1; ++ } ++ + *md_p = &md->super; + status = UCS_OK; + +@@ -1362,13 +1537,14 @@ err_free_md: + goto out_free_dev_list; + } + +-static void uct_ib_md_close(uct_md_h uct_md) ++void uct_ib_md_close(uct_md_h uct_md) + { + uct_ib_md_t *md = ucs_derived_of(uct_md, uct_ib_md_t); + + uct_ib_md_release_device_config(md); + uct_ib_md_release_reg_method(md); + uct_ib_md_umr_qp_destroy(md); ++ uct_ib_device_cleanup_ah_cached(&md->dev); + ibv_dealloc_pd(md->pd); + uct_ib_device_cleanup(&md->dev); + UCS_STATS_NODE_FREE(md->stats); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.h +index 2e3148b60..bc23f30d5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_md.h +@@ -16,9 +16,10 @@ + #include + #include + +- ++#define UCT_IB_MD_MAX_MR_SIZE 0x80000000UL + #define UCT_IB_MD_PACKED_RKEY_SIZE sizeof(uint64_t) + ++#define UCT_IB_MD_DEFAULT_GID_INDEX 0 /**< The gid index used by default for an IB/RoCE port */ + + /** + * IB MD statistics counters +@@ -47,6 +48,11 @@ typedef struct uct_ib_md_ext_config { + int prefer_nearest_device; /**< Give priority for near + device */ + int enable_contig_pages; /** Enable contiguous pages */ ++ int enable_indirect_atomic; /** Enable indirect atomic */ ++ int enable_gpudirect_rdma; /** Enable GPUDirect RDMA */ ++#if HAVE_EXP_UMR ++ unsigned max_inline_klm_list; /* Maximal length of inline KLM list */ ++#endif + + struct { + ucs_numa_policy_t numa_policy; /**< NUMA policy flags for ODP */ +@@ -55,6 +61,7 @@ typedef struct uct_ib_md_ext_config { + size_t max_size; /**< Maximal memory region size for ODP */ + } odp; + ++ size_t gid_index; /**< IB GID index to use */ + } uct_ib_md_ext_config_t; + + +@@ -84,6 +91,8 @@ typedef struct uct_ib_md { + uct_ib_device_spec_t *specs; /* Custom device specifications */ + unsigned count; /* Number of custom devices */ + } custom_devices; ++ int check_subnet_filter; ++ uint64_t subnet_filter; + } uct_ib_md_t; + + +@@ -106,6 +115,7 @@ typedef struct uct_ib_md_config { + + UCS_CONFIG_STRING_ARRAY_FIELD(spec) custom_devices; /**< Custom device specifications */ + ++ char *subnet_prefix; /**< Filter of subnet_prefix for IB ports */ + } uct_ib_md_config_t; + + +@@ -172,4 +182,12 @@ static inline uint16_t uct_ib_md_atomic_offset(uint8_t atomic_mr_id) + return 8 * atomic_mr_id; + } + ++ ++void uct_ib_make_md_name(char md_name[UCT_MD_NAME_MAX], struct ibv_device *device); ++ ++ucs_status_t ++uct_ib_md_open(const char *md_name, const uct_md_config_t *uct_md_config, uct_md_h *md_p); ++ ++void uct_ib_md_close(uct_md_h uct_md); ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_verbs.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_verbs.h +index 449f3db71..b56d18033 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_verbs.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/base/ib_verbs.h +@@ -60,7 +60,14 @@ + + #else + # define IBV_SHARED_MR_ACCESS_FLAGS(_shared_mr) ((_shared_mr)->access) ++#if HAVE_DECL_IBV_EXP_DEVICE_ATTR_RESERVED_2 ++# define IBV_EXP_DEVICE_ATTR_SET_COMP_MASK(_attr) do { \ ++ (_attr)->comp_mask = 0xffffffff; \ ++ (_attr)->comp_mask_2 = (IBV_EXP_DEVICE_ATTR_RESERVED_2 - 1); \ ++ } while (0) ++#else + # define IBV_EXP_DEVICE_ATTR_SET_COMP_MASK(_attr) (_attr)->comp_mask = (IBV_EXP_DEVICE_ATTR_RESERVED - 1) ++#endif /* HAVE_DECL_IBV_EXP_DEVICE_ATTR_RESERVED_2 */ + # define IBV_EXP_PORT_ATTR_SET_COMP_MASK(_attr) (_attr)->comp_mask = 0 + #endif /* HAVE_VERBS_EXP_H */ + +@@ -97,12 +104,7 @@ + /* + * DC support + */ +-#if HAVE_DECL_IBV_EXP_DEVICE_DC_TRANSPORT && HAVE_STRUCT_IBV_EXP_DEVICE_ATTR_EXP_DEVICE_CAP_FLAGS +-# define IBV_DEVICE_HAS_DC(_attr) ((_attr)->exp_device_cap_flags & IBV_EXP_DEVICE_DC_TRANSPORT) +-#else +-# define IBV_DEVICE_HAS_DC(_attr) 0 +-#endif /* HAVE_DECL_IBV_EXP_DEVICE_DC_TRANSPORT */ +- ++#define IBV_DEVICE_HAS_DC(dev) (dev->flags & UCT_IB_DEVICE_FLAG_DC) + + /* + * NOP support +@@ -142,11 +144,13 @@ + #if HAVE_DECL_IBV_EXP_CQ_IGNORE_OVERRUN + static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) + { +- struct ibv_exp_cq_attr cq_attr = {0}; ++ struct ibv_exp_cq_attr cq_attr = {}; + cq_attr.comp_mask = IBV_EXP_CQ_ATTR_CQ_CAP_FLAGS; + cq_attr.cq_cap_flags = IBV_EXP_CQ_IGNORE_OVERRUN; + return ibv_exp_modify_cq(cq, &cq_attr, IBV_EXP_CQ_CAP_FLAGS); + } ++#elif HAVE_DECL_IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN ++static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) { return 0; } + #else + static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) + { +@@ -204,8 +208,6 @@ static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) + # define ibv_exp_create_srq_attr ibv_srq_init_attr + #endif + +- +- + typedef uint8_t uct_ib_uint24_t[3]; + + static inline void uct_ib_pack_uint24(uct_ib_uint24_t buf, const uint32_t qp_num) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm.h +index bfd88555a..6783ac60b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm.h +@@ -50,6 +50,7 @@ typedef struct uct_cm_iface { + struct ib_cm_id *listen_id; /* Listening "socket" */ + ucs_queue_head_t notify_q; /* Notification queue */ + uint32_t num_outstanding; /* Number of outstanding sends */ ++ uint32_t num_completions; /* Number of completed sends */ + ucs_queue_head_t outstanding_q; /* Outstanding operations queue */ + uct_worker_cb_id_t slow_prog_id; /* Callback id for slowpath progress */ + +@@ -67,7 +68,6 @@ typedef struct uct_cm_iface { + typedef struct uct_cm_ep { + uct_base_ep_t super; + uint16_t dlid; +- uint8_t is_global; + uint32_t dest_service_id; + union ibv_gid dgid; + } uct_cm_ep_t; +@@ -104,7 +104,8 @@ ucs_status_t uct_cm_iface_flush_do(uct_cm_iface_t *iface, uct_completion_t *comp + ssize_t uct_cm_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, uct_pack_callback_t pack_cb, + void *arg, unsigned flags); + +-ucs_status_t uct_cm_ep_pending_add(uct_ep_h ep, uct_pending_req_t *req); ++ucs_status_t uct_cm_ep_pending_add(uct_ep_h ep, uct_pending_req_t *req, ++ unsigned flags); + void uct_cm_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, + void *arg); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_ep.c +index 16a389fbf..63fb7c577 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_ep.c +@@ -30,7 +30,7 @@ static UCS_CLASS_INIT_FUNC(uct_cm_ep_t, uct_iface_t *tl_iface, + UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &iface->super.super); + + uct_ib_address_unpack((const uct_ib_address_t*)dev_addr, &self->dlid, +- &self->is_global, &self->dgid); ++ &self->dgid); + self->dest_service_id = *(const uint32_t*)iface_addr; + return UCS_OK; + } +@@ -54,9 +54,10 @@ static ucs_status_t uct_cm_ep_fill_path_rec(uct_cm_ep_t *ep, + path->sgid = iface->super.gid; + path->dlid = htons(ep->dlid); + path->slid = htons(uct_ib_iface_port_attr(&iface->super)->lid); +- if (ep->is_global) { ++ if (iface->super.is_global_addr) { ++ ucs_assert_always(ep->dgid.global.interface_id != 0); + path->dgid = ep->dgid; +- path->hop_limit = 64; ++ path->hop_limit = iface->super.config.hop_limit; + } else { + memset(&path->dgid, 0, sizeof(path->dgid)); + path->hop_limit = 0; +@@ -198,7 +199,8 @@ err: + return status; + } + +-ucs_status_t uct_cm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req) ++ucs_status_t uct_cm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req, ++ unsigned flags) + { + uct_cm_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_cm_iface_t); + uct_cm_ep_t *ep = ucs_derived_of(tl_ep, uct_cm_ep_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_iface.c +index ad2a914a7..3d1b81c91 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/cm/cm_iface.c +@@ -56,6 +56,10 @@ static unsigned uct_cm_iface_progress(void *arg) + ++count; + } + ++ /* we are in the progress() context. Now it is safe to release resources. */ ++ iface->num_outstanding -= iface->num_completions; ++ iface->num_completions = 0; ++ + /* Dispatch pending operations */ + uct_pending_queue_dispatch(priv, &iface->notify_q, + iface->num_outstanding < iface->config.max_outstanding); +@@ -154,7 +158,19 @@ static void uct_cm_iface_outstanding_remove(uct_cm_iface_t* iface, + ucs_queue_for_each_safe(op, iter, &iface->outstanding_q, queue) { + if (op->is_id && (op->id == id)) { + ucs_queue_del_iter(&iface->outstanding_q, iter); +- --iface->num_outstanding; ++ /* Must not release resources from the async context ++ * because it will break pending op ordering. ++ * For example bcopy() may succeed while there are queued ++ * pending ops: ++ * bcopy() -> no resources ++ * pending_add() -> ok ++ * <-- async event: resources available ++ * bcopy() --> ok. oops this is out of order send ++ * ++ * save the number and do actual release in the ++ * progress() context. ++ */ ++ ++iface->num_completions; + ucs_free(op); + return; + } +@@ -255,17 +271,20 @@ static UCS_CLASS_INIT_FUNC(uct_cm_iface_t, uct_md_h md, uct_worker_h worker, + const uct_iface_config_t *tl_config) + { + uct_cm_iface_config_t *config = ucs_derived_of(tl_config, uct_cm_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + int ret; + + ucs_trace_func(""); + ++ init_attr.tx_cq_len = 1; ++ init_attr.rx_cq_len = config->super.rx.queue_len; ++ init_attr.seg_size = ucs_min(IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE, ++ config->super.super.max_bcopy); ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_ib_iface_t, &uct_cm_iface_ops, md, worker, +- params, 0 /* rx_priv_len */, 0 /* rx_hdr_len */, +- 1 /* tx_cq_len */, +- config->super.rx.queue_len /* rx_cq_len */, +- IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE, /* mss */ +- &config->super); ++ params, &config->super, &init_attr); + + if (self->super.super.worker->async == NULL) { + ucs_error("cm must have async!=NULL"); +@@ -273,6 +292,7 @@ static UCS_CLASS_INIT_FUNC(uct_cm_iface_t, uct_md_h md, uct_worker_h worker, + } + + self->num_outstanding = 0; ++ self->num_completions = 0; + self->service_id = 0; + self->config.timeout_ms = (int)(config->timeout * 1e3 + 0.5); + self->config.max_outstanding = config->max_outstanding; +@@ -432,8 +452,7 @@ static uct_ib_iface_ops_t uct_cm_iface_ops = { + .iface_get_address = uct_cm_iface_get_address, + .iface_is_reachable = uct_ib_iface_is_reachable + }, +- .arm_tx_cq = (void*)ucs_empty_function_return_success, +- .arm_rx_cq = (void*)ucs_empty_function_return_success ++ .arm_cq = (void*)ucs_empty_function_return_success, + }; + + static ucs_status_t uct_cm_query_resources(uct_md_h md, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.c +index 0b25d4feb..d763b9730 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.c +@@ -26,6 +26,10 @@ static ucs_config_field_t uct_dc_mlx5_iface_config_table[] = { + ucs_offsetof(uct_dc_mlx5_iface_config_t, ud_common), + UCS_CONFIG_TYPE_TABLE(uct_ud_mlx5_iface_common_config_table)}, + ++ {"", "", NULL, ++ ucs_offsetof(uct_dc_mlx5_iface_config_t, mlx5_common), ++ UCS_CONFIG_TYPE_TABLE(uct_ib_mlx5_iface_config_table)}, ++ + {NULL} + }; + +@@ -35,16 +39,30 @@ static UCS_CLASS_CLEANUP_FUNC(uct_dc_mlx5_ep_t) + ucs_trace_func(""); + } + ++static void uct_dc_mlx5_iface_set_av_sport(uct_dc_mlx5_iface_t *iface, ++ uct_ib_mlx5_base_av_t *av, ++ uint32_t remote_dctn) ++{ ++ uct_ib_mlx5_iface_set_av_sport(&iface->super.super.super, av, ++ remote_dctn ^ uct_dc_get_dct_num(&iface->super)); ++} ++ + static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_ep_t, uct_dc_mlx5_iface_t *dc_iface, + const uct_dc_iface_addr_t *if_addr, + const uct_ib_mlx5_base_av_t *av) + { ++ uint32_t remote_dctn; ++ + ucs_trace_func(""); + + UCS_CLASS_CALL_SUPER_INIT(uct_dc_ep_t, &dc_iface->super, if_addr); + ++ remote_dctn = uct_ib_unpack_uint24(if_addr->qp_num); ++ + memcpy(&self->av, av, sizeof(*av)); +- self->av.dqp_dct |= htonl(uct_ib_unpack_uint24(if_addr->qp_num)); ++ self->av.dqp_dct |= htonl(remote_dctn); ++ uct_dc_mlx5_iface_set_av_sport(dc_iface, &self->av, remote_dctn); ++ + return UCS_OK; + } + +@@ -116,18 +134,30 @@ static void uct_dc_mlx5_ep_destroy(uct_ep_h tl_ep) + static ucs_status_t uct_dc_mlx5_iface_query(uct_iface_h tl_iface, uct_iface_attr_t *iface_attr) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_iface, uct_dc_mlx5_iface_t); ++ size_t max_am_inline = UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE); ++ size_t max_put_inline = UCT_IB_MLX5_PUT_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE); + ucs_status_t status; + ++#if HAVE_IBV_EXP_DM ++ if (iface->mlx5_common.dm.dm != NULL) { ++ max_am_inline = ucs_max(iface->mlx5_common.dm.dm->seg_len, ++ UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)); ++ max_put_inline = ucs_max(iface->mlx5_common.dm.dm->seg_len, ++ UCT_IB_MLX5_PUT_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)); ++ } ++#endif ++ + status = uct_dc_iface_query(&iface->super, iface_attr, +- UCT_IB_MLX5_PUT_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE), +- UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE), ++ max_put_inline, ++ max_am_inline, + UCT_IB_MLX5_AM_ZCOPY_MAX_HDR(UCT_IB_MLX5_AV_FULL_SIZE), +- UCT_IB_MLX5_AM_ZCOPY_MAX_IOV); ++ UCT_IB_MLX5_AM_ZCOPY_MAX_IOV, ++ UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(UCT_IB_MLX5_AV_FULL_SIZE)); + if (status != UCS_OK) { + return status; + } + +- uct_rc_mlx5_iface_common_query(iface_attr); ++ uct_rc_mlx5_iface_common_query(&iface->super.super.super, iface_attr); + return UCS_OK; + } + +@@ -148,19 +178,21 @@ uct_dc_mlx5_iface_bcopy_post(uct_dc_mlx5_iface_t *iface, uct_dc_mlx5_ep_t *ep, + unsigned opcode, unsigned length, + /* RDMA */ uint64_t rdma_raddr, uct_rkey_t rdma_rkey, + uct_rc_iface_send_desc_t *desc, uint8_t send_flags, +- uint32_t imm_val_be) ++ uint32_t imm_val_be, const void *buffer, ++ uct_ib_log_sge_t *log_sge) + { + UCT_DC_MLX5_TXQP_DECL(txqp, txwq); + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + desc->super.sn = txwq->sw_pi; +- uct_rc_mlx5_txqp_dptr_post(&iface->super.super, IBV_EXP_QPT_DC_INI, txqp, txwq, +- opcode, desc + 1, length, &desc->lkey, ++ uct_rc_mlx5_txqp_dptr_post(&iface->super.super, UCT_IB_QPT_DCI, txqp, txwq, ++ opcode, buffer, length, &desc->lkey, + rdma_raddr, uct_ib_md_direct_rkey(rdma_rkey), +- 0, 0, 0, ++ 0, 0, 0, 0, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), +- MLX5_WQE_CTRL_CQ_UPDATE | send_flags, imm_val_be); ++ MLX5_WQE_CTRL_CQ_UPDATE | send_flags, imm_val_be, INT_MAX, ++ log_sge); + uct_rc_txqp_add_send_op(txqp, &desc->super); + } + +@@ -179,14 +211,15 @@ uct_dc_mlx5_iface_zcopy_post(uct_dc_mlx5_iface_t *iface, uct_dc_mlx5_ep_t *ep, + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + + sn = txwq->sw_pi; +- uct_rc_mlx5_txqp_dptr_post_iov(&iface->super.super, IBV_EXP_QPT_DC_INI, txqp, ++ uct_rc_mlx5_txqp_dptr_post_iov(&iface->super.super, UCT_IB_QPT_DCI, txqp, + txwq, opcode, iov, iovcnt, + am_id, am_hdr, am_hdr_len, + rdma_raddr, uct_ib_md_direct_rkey(rdma_rkey), + tag, app_ctx, ib_imm_be, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), +- MLX5_WQE_CTRL_CQ_UPDATE | send_flags); ++ MLX5_WQE_CTRL_CQ_UPDATE | send_flags, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + + uct_rc_txqp_add_send_comp(&iface->super.super, txqp, comp, sn); + } +@@ -195,7 +228,8 @@ static UCS_F_ALWAYS_INLINE void + uct_dc_mlx5_iface_atomic_post(uct_dc_mlx5_iface_t *iface, uct_dc_mlx5_ep_t *ep, + unsigned opcode, uct_rc_iface_send_desc_t *desc, unsigned length, + uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t compare_mask, uint64_t compare, uint64_t swap_add) ++ uint64_t compare_mask, uint64_t compare, ++ uint64_t swap_mask, uint64_t swap_add) + { + uint32_t ib_rkey = uct_ib_resolve_atomic_rkey(rkey, ep->super.atomic_mr_offset, + &remote_addr); +@@ -204,138 +238,147 @@ uct_dc_mlx5_iface_atomic_post(uct_dc_mlx5_iface_t *iface, uct_dc_mlx5_ep_t *ep, + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + + desc->super.sn = txwq->sw_pi; +- uct_rc_mlx5_txqp_dptr_post(&iface->super.super, IBV_EXP_QPT_DC_INI, txqp, txwq, ++ uct_rc_mlx5_txqp_dptr_post(&iface->super.super, UCT_IB_QPT_DCI, txqp, txwq, + opcode, desc + 1, length, &desc->lkey, + remote_addr, ib_rkey, +- compare_mask, compare, swap_add, ++ compare_mask, compare, swap_mask, swap_add, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), +- MLX5_WQE_CTRL_CQ_UPDATE, 0); ++ MLX5_WQE_CTRL_CQ_UPDATE, 0, INT_MAX, NULL); + + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); + uct_rc_txqp_add_send_op(txqp, &desc->super); + } + +-static inline void uct_dc_mlx5_iface_add_send_comp(uct_dc_mlx5_iface_t *iface, +- uct_dc_mlx5_ep_t *ep, +- uct_completion_t *comp) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_atomic_op_post(uct_ep_h tl_ep, unsigned opcode, unsigned size, ++ uint64_t value, uint64_t remote_addr, uct_rkey_t rkey) + { +- UCT_DC_MLX5_TXQP_DECL(txqp, txwq); +- +- UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); +- uct_rc_txqp_add_send_comp(&iface->super.super, txqp, comp, txwq->sig_pi); +-} +- +-ucs_status_t uct_dc_mlx5_ep_atomic_add(uct_ep_h tl_ep, +- int opcode, unsigned length, +- uint64_t add, uint64_t remote_addr, uct_rkey_t rkey) +-{ +- + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); +- uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); + uct_rc_iface_send_desc_t *desc; ++ int op; ++ uint64_t compare_mask; ++ uint64_t compare; ++ uint64_t swap_mask; ++ uint64_t swap; ++ int ext; /* not used here */ ++ ucs_status_t status; + + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super.super, &iface->mlx5_common.tx.atomic_desc_mp, desc); +- uct_dc_mlx5_iface_atomic_post(iface, ep, opcode, desc, length, +- remote_addr, rkey, 0, 0, add); ++ UCT_RC_MLX5_CHECK_ATOMIC_OPS(opcode, size, UCT_RC_MLX5_ATOMIC_OPS); ++ ++ status = uct_rc_mlx5_iface_common_atomic_data(opcode, size, value, &op, &compare_mask, ++ &compare, &swap_mask, &swap, &ext); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->mlx5_common.tx.atomic_desc_mp, desc); ++ uct_dc_mlx5_iface_atomic_post(iface, ep, op, desc, size, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap); + return UCS_OK; + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +-uct_dc_mlx5_ep_atomic(uct_dc_mlx5_ep_t *ep, int opcode, void *result, int ext, +- unsigned length, uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t compare_mask, uint64_t compare, +- uint64_t swap_add, uct_completion_t *comp) ++uct_dc_mlx5_ep_atomic_fop(uct_dc_mlx5_ep_t *ep, int opcode, void *result, int ext, ++ unsigned length, uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t compare_mask, uint64_t compare, ++ uint64_t swap_mask, uint64_t swap_add, uct_completion_t *comp) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, uct_dc_mlx5_iface_t); + uct_rc_iface_send_desc_t *desc; + + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->mlx5_common.tx.atomic_desc_mp, desc, +- uct_rc_iface_atomic_handler(&iface->super.super, ext, length), +- result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super.super, &iface->mlx5_common.tx.atomic_desc_mp, ++ desc, uct_rc_iface_atomic_handler(&iface->super.super, ++ ext, length), ++ result, comp); + uct_dc_mlx5_iface_atomic_post(iface, ep, opcode, desc, length, remote_addr, rkey, +- compare_mask, compare, swap_add); ++ compare_mask, compare, swap_mask, swap_add); + return UCS_INPROGRESS; + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_atomic_fop_post(uct_ep_h tl_ep, unsigned opcode, unsigned size, ++ uint64_t value, void *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_dc_mlx5_ep_atomic_add(tl_ep, MLX5_OPCODE_ATOMIC_FA, sizeof(uint64_t), +- htobe64(add), remote_addr, rkey); +-} ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ int op; ++ uint64_t compare_mask; ++ uint64_t compare; ++ uint64_t swap_mask; ++ uint64_t swap; ++ int ext; ++ ucs_status_t status; + +-ucs_status_t uct_dc_mlx5_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_FA, result, 0, sizeof(uint64_t), +- remote_addr, rkey, 0, 0, htobe64(add), comp); +-} ++ UCT_RC_MLX5_CHECK_ATOMIC_OPS(opcode, size, UCT_RC_MLX5_ATOMIC_FOPS); + +-ucs_status_t uct_dc_mlx5_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint64_t), remote_addr, rkey, 0, 0, +- htobe64(swap), comp); ++ status = uct_rc_mlx5_iface_common_atomic_data(opcode, size, value, &op, &compare_mask, ++ &compare, &swap_mask, &swap, &ext); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ return uct_dc_mlx5_ep_atomic_fop(ep, op, result, ext, size, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap, comp); + } + + ucs_status_t uct_dc_mlx5_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp) + { +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_CS, result, 0, sizeof(uint64_t), +- remote_addr, rkey, 0, htobe64(compare), htobe64(swap), +- comp); ++ return uct_dc_mlx5_ep_atomic_fop(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), ++ MLX5_OPCODE_ATOMIC_CS, result, 0, sizeof(uint64_t), ++ remote_addr, rkey, 0, htobe64(compare), -1, ++ htobe64(swap), comp); ++} ++ ++ucs_status_t uct_dc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp) ++{ ++ return uct_dc_mlx5_ep_atomic_fop(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), ++ MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, ++ sizeof(uint32_t), remote_addr, rkey, UCS_MASK(32), ++ htonl(compare), -1, htonl(swap), comp); + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_dc_mlx5_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_dc_mlx5_ep_atomic_add(tl_ep, MLX5_OPCODE_ATOMIC_MASKED_FA, +- sizeof(uint32_t), htonl(add), remote_addr, +- rkey); ++ return uct_dc_mlx5_ep_atomic_op_post(ep, opcode, sizeof(value), value, remote_addr, rkey); + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_dc_mlx5_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_FA, result, 1, +- sizeof(uint32_t), remote_addr, rkey, 0, 0, +- htonl(add), comp); ++ return uct_dc_mlx5_ep_atomic_op_post(ep, opcode, sizeof(value), value, remote_addr, rkey); + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_dc_mlx5_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint32_t), remote_addr, rkey, 0, 0, +- htonl(swap), comp); ++ return uct_dc_mlx5_ep_atomic_fop_post(ep, opcode, sizeof(value), value, result, ++ remote_addr, rkey, comp); + } + +-ucs_status_t uct_dc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ucs_status_t uct_dc_mlx5_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ uct_completion_t *comp) + { +- return uct_dc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint32_t), remote_addr, rkey, UCS_MASK(32), +- htonl(compare), htonl(swap), comp); ++ return uct_dc_mlx5_ep_atomic_fop_post(ep, opcode, sizeof(value), value, result, ++ remote_addr, rkey, comp); + } + +-ucs_status_t uct_dc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, +- const void *buffer, unsigned length) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_am_short_inline(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *buffer, unsigned length) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); + uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); +@@ -346,20 +389,86 @@ ucs_status_t uct_dc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + +- uct_rc_mlx5_txqp_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, + MLX5_OPCODE_SEND, + buffer, length, id, hdr, 0, + 0, 0, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), +- MLX5_WQE_CTRL_SOLICITED); ++ MLX5_WQE_CTRL_SOLICITED, INT_MAX); + + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); + return UCS_OK; + } + ++#if HAVE_IBV_EXP_DM ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_short_dm(uct_dc_mlx5_ep_t *ep, uct_rc_mlx5_dm_copy_data_t *cache, ++ size_t hdr_len, const void *payload, unsigned length, ++ unsigned opcode, uint8_t fm_ce_se, ++ uint64_t rdma_raddr, uct_rkey_t rdma_rkey) ++{ ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, uct_dc_mlx5_iface_t); ++ uct_rc_iface_send_desc_t *desc; ++ void *buffer; ++ ucs_status_t status; ++ uct_ib_log_sge_t log_sge; ++ ++ status = uct_rc_mlx5_common_dm_make_data(&iface->mlx5_common, &iface->super.super, ++ cache, hdr_len, payload, length, &desc, ++ &buffer, &log_sge); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ uct_dc_mlx5_iface_bcopy_post(iface, ep, opcode, ++ hdr_len + length, ++ rdma_raddr, rdma_rkey, ++ desc, fm_ce_se, 0, buffer, ++ log_sge.num_sge ? &log_sge : NULL); ++ return UCS_OK; ++} ++#endif ++ ++ucs_status_t uct_dc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *buffer, unsigned length) ++{ ++#if HAVE_IBV_EXP_DM ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ ucs_status_t status; ++ uct_rc_mlx5_dm_copy_data_t cache; ++ ++ if (ucs_likely((sizeof(uct_rc_am_short_hdr_t) + length <= ++ UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_dc_mlx5_ep_am_short_inline(tl_ep, id, hdr, buffer, length); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length + sizeof(uct_rc_am_short_hdr_t), 0, ++ iface->mlx5_common.dm.seg_len, "am_short"); ++ UCT_DC_CHECK_RES_AND_FC(&iface->super, &ep->super); ++ ++ uct_rc_am_hdr_fill(&cache.am_hdr.rc_hdr, id); ++ cache.am_hdr.am_hdr = hdr; ++ ++ status = uct_dc_mlx5_ep_short_dm(ep, &cache, sizeof(cache.am_hdr), buffer, length, ++ MLX5_OPCODE_SEND, ++ MLX5_WQE_CTRL_SOLICITED | MLX5_WQE_CTRL_CQ_UPDATE, ++ 0, 0); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(cache.am_hdr) + length); ++ UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); ++ return UCS_OK; ++#endif ++} ++ + ssize_t uct_dc_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + uct_pack_callback_t pack_cb, void *arg, + unsigned flags) +@@ -375,7 +484,7 @@ ssize_t uct_dc_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + + uct_dc_mlx5_iface_bcopy_post(iface, ep, MLX5_OPCODE_SEND, + sizeof(uct_rc_hdr_t) + length, 0, 0, desc, +- MLX5_WQE_CTRL_SOLICITED, 0); ++ MLX5_WQE_CTRL_SOLICITED, 0, desc + 1, NULL); + + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); +@@ -410,9 +519,10 @@ ucs_status_t uct_dc_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *hea + } + + +-ucs_status_t uct_dc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, +- unsigned length, uint64_t remote_addr, +- uct_rkey_t rkey) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_put_short_inline(uct_ep_h tl_ep, const void *buffer, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); + uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); +@@ -422,19 +532,49 @@ ucs_status_t uct_dc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, + UCT_DC_CHECK_RES(&iface->super, &ep->super); + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); +- uct_rc_mlx5_txqp_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, + MLX5_OPCODE_RDMA_WRITE, + buffer, length, 0, 0, 0, + remote_addr, uct_ib_md_direct_rkey(rkey), + &ep->av, uct_dc_mlx5_ep_get_grh(ep), +- uct_ib_mlx5_wqe_av_size(&ep->av), 0); ++ uct_ib_mlx5_wqe_av_size(&ep->av), 0, INT_MAX); + + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); + + return UCS_OK; + } + ++ucs_status_t uct_dc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *payload, ++ unsigned length, uint64_t remote_addr, ++ uct_rkey_t rkey) ++{ ++#if HAVE_IBV_EXP_DM ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ ucs_status_t status; ++ ++ if (ucs_likely((length <= UCT_IB_MLX5_PUT_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_dc_mlx5_ep_put_short_inline(tl_ep, payload, length, remote_addr, rkey); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length, 0, iface->mlx5_common.dm.seg_len, "put_short"); ++ UCT_DC_CHECK_RES(&iface->super, &ep->super); ++ status = uct_dc_mlx5_ep_short_dm(ep, NULL, 0, payload, length, ++ MLX5_OPCODE_RDMA_WRITE, ++ MLX5_WQE_CTRL_CQ_UPDATE, ++ remote_addr, rkey); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); ++ return UCS_OK; ++#endif ++} ++ + ssize_t uct_dc_mlx5_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + void *arg, uint64_t remote_addr, uct_rkey_t rkey) + { +@@ -447,7 +587,7 @@ ssize_t uct_dc_mlx5_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + UCT_RC_IFACE_GET_TX_PUT_BCOPY_DESC(&iface->super.super, &iface->super.super.tx.mp, + desc, pack_cb, arg, length); + uct_dc_mlx5_iface_bcopy_post(iface, ep, MLX5_OPCODE_RDMA_WRITE, length, +- remote_addr, rkey, desc, 0, 0); ++ remote_addr, rkey, desc, 0, 0, desc + 1, NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, BCOPY, length); + return length; + } +@@ -489,7 +629,7 @@ ucs_status_t uct_dc_mlx5_ep_get_bcopy(uct_ep_h tl_ep, + UCT_RC_IFACE_GET_TX_GET_BCOPY_DESC(&iface->super.super, &iface->super.super.tx.mp, + desc, unpack_cb, comp, arg, length); + uct_dc_mlx5_iface_bcopy_post(iface, ep, MLX5_OPCODE_RDMA_READ, length, +- remote_addr, rkey, desc, 0, 0); ++ remote_addr, rkey, desc, 0, 0, desc + 1, NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, GET, BCOPY, length); + return UCS_INPROGRESS; + } +@@ -521,8 +661,9 @@ ucs_status_t uct_dc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, + uct_dc_mlx5_iface_t); +- uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ uct_dc_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_ep_t); + ucs_status_t status; ++ UCT_DC_MLX5_TXQP_DECL(txqp, txwq); + + status = uct_dc_ep_flush(tl_ep, flags, comp); + if (status == UCS_OK) { +@@ -530,8 +671,10 @@ ucs_status_t uct_dc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion + } + + if (status == UCS_INPROGRESS) { +- ucs_assert(ep->super.dci != UCT_DC_EP_NO_DCI); +- uct_dc_mlx5_iface_add_send_comp(iface, ep, comp); ++ ucs_assert(ep->dci != UCT_DC_EP_NO_DCI); ++ UCT_DC_MLX5_IFACE_TXQP_GET(iface, ep, txqp, txwq); ++ status = uct_rc_txqp_add_flush_comp(&iface->super.super, txqp, comp, ++ txwq->sig_pi); + } + return status; + } +@@ -542,10 +685,11 @@ uct_dc_mlx5_poll_tx(uct_dc_mlx5_iface_t *iface) + uint8_t dci; + struct mlx5_cqe64 *cqe; + uint32_t qp_num; +- uint16_t hw_ci, bb_num; ++ uint16_t hw_ci; + UCT_DC_MLX5_TXQP_DECL(txqp, txwq); + +- cqe = uct_ib_mlx5_poll_cq(&iface->super.super.super, &iface->mlx5_common.tx.cq); ++ cqe = uct_ib_mlx5_poll_cq(&iface->super.super.super, ++ &iface->mlx5_common.cq[UCT_IB_DIR_TX]); + if (cqe == NULL) { + return 0; + } +@@ -562,10 +706,7 @@ uct_dc_mlx5_poll_tx(uct_dc_mlx5_iface_t *iface) + ucs_trace_poll("dc_mlx5 iface %p tx_cqe: dci[%d] qpn 0x%x txqp %p hw_ci %d", + iface, dci, qp_num, txqp, hw_ci); + +- bb_num = uct_ib_mlx5_txwq_update_bb(txwq, hw_ci) - uct_rc_txqp_available(txqp); +- uct_rc_txqp_available_add(txqp, bb_num); +- iface->super.super.tx.cq_available += bb_num; +- ++ uct_rc_mlx5_common_update_tx_res(&iface->super.super, txwq, txqp, hw_ci); + uct_dc_iface_dci_put(&iface->super, dci); + uct_rc_mlx5_txqp_process_tx_cqe(txqp, cqe, hw_ci); + +@@ -588,8 +729,9 @@ static unsigned uct_dc_mlx5_iface_progress(void *arg) + + + #if IBV_EXP_HW_TM_DC +-ucs_status_t uct_dc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, +- const void *data, size_t length) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_dc_mlx5_ep_tag_eager_short_inline(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length) + { + uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); + uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); +@@ -602,16 +744,53 @@ ucs_status_t uct_dc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + +- uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND, data, length, + NULL, tag, 0, IBV_EXP_TMH_EAGER, 0, + &ep->av, uct_dc_mlx5_ep_get_grh(ep), + uct_ib_mlx5_wqe_av_size(&ep->av), NULL, 0, + MLX5_WQE_CTRL_SOLICITED); + ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ + return UCS_OK; + } + ++ucs_status_t uct_dc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length) ++{ ++#if HAVE_IBV_EXP_DM ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_mlx5_iface_t); ++ uct_dc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); ++ uct_rc_mlx5_dm_copy_data_t cache; ++ ucs_status_t status; ++ ++ if (ucs_likely((sizeof(struct ibv_exp_tmh) + length <= ++ UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_dc_mlx5_ep_tag_eager_short_inline(tl_ep, tag, data, length); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length + sizeof(struct ibv_exp_tmh), 0, ++ iface->mlx5_common.dm.seg_len, "tag_short"); ++ UCT_DC_CHECK_RES(&iface->super, &ep->super); ++ ++ uct_rc_mlx5_fill_tmh(ucs_unaligned_ptr(&cache.tm_hdr), tag, 0, IBV_EXP_TMH_EAGER); ++ ++ status = uct_dc_mlx5_ep_short_dm(ep, &cache, sizeof(cache.tm_hdr), data, ++ length, MLX5_OPCODE_SEND, ++ MLX5_WQE_CTRL_SOLICITED | MLX5_WQE_CTRL_CQ_UPDATE, ++ 0, 0); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ } ++ ++ return status; ++#endif ++} ++ + ssize_t uct_dc_mlx5_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + uint64_t imm, + uct_pack_callback_t pack_cb, +@@ -628,12 +807,15 @@ ssize_t uct_dc_mlx5_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + + UCT_RC_IFACE_FILL_TM_IMM(imm, app_ctx, ib_imm, opcode, MLX5_OPCODE_SEND, _IMM); + +- UCT_RC_IFACE_GET_TM_BCOPY_DESC(&iface->super.super, &iface->super.super.tx.mp, +- desc, tag, app_ctx, pack_cb, arg, length); ++ UCT_RC_MLX5_IFACE_GET_TM_BCOPY_DESC(&iface->super.super, ++ &iface->super.super.tx.mp, desc, tag, ++ app_ctx, pack_cb, arg, length); + + uct_dc_mlx5_iface_bcopy_post(iface, ep, opcode, + sizeof(struct ibv_exp_tmh) + length, +- 0, 0, desc, MLX5_WQE_CTRL_SOLICITED, ib_imm); ++ 0, 0, desc, MLX5_WQE_CTRL_SOLICITED, ib_imm, desc + 1, NULL); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, BCOPY, length); + + return length; + } +@@ -648,7 +830,8 @@ ucs_status_t uct_dc_mlx5_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + uint32_t app_ctx, ib_imm; + int opcode; + +- UCT_CHECK_IOV_SIZE(iovcnt, 1ul, "uct_dc_mlx5_ep_tag_eager_zcopy"); ++ UCT_CHECK_IOV_SIZE(iovcnt, UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(UCT_IB_MLX5_AV_FULL_SIZE), ++ "uct_dc_mlx5_ep_tag_eager_zcopy"); + UCT_RC_CHECK_ZCOPY_DATA(sizeof(struct ibv_exp_tmh), + uct_iov_total_length(iov, iovcnt), + iface->super.super.super.config.seg_size); +@@ -660,6 +843,9 @@ ucs_status_t uct_dc_mlx5_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + iov, iovcnt, 0, "", 0, 0, 0, tag, app_ctx, + ib_imm, comp, MLX5_WQE_CTRL_SOLICITED); + ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ + return UCS_INPROGRESS; + } + +@@ -687,11 +873,11 @@ ucs_status_ptr_t uct_dc_mlx5_ep_tag_rndv_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + + op_index = uct_rc_iface_tag_get_op_id(&iface->super.super, comp); + +- uct_dc_iface_fill_ravh(&ravh, iface->super.rx.dct->dct_num); ++ uct_dc_iface_fill_ravh(&ravh, uct_dc_get_dct_num(&iface->super)); + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + +- uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND, header, + header_length, iov, tag, op_index, + IBV_EXP_TMH_RNDV, 0, &ep->av, +@@ -718,7 +904,7 @@ ucs_status_t uct_dc_mlx5_ep_tag_rndv_request(uct_ep_h tl_ep, uct_tag_t tag, + + UCT_DC_MLX5_IFACE_TXQP_GET(iface, &ep->super, txqp, txwq); + +- uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_tag_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND_IMM, header, + header_length, NULL, tag, 0, + IBV_EXP_TMH_EAGER, 0, &ep->av, +@@ -766,6 +952,13 @@ static unsigned uct_dc_mlx5_iface_progress_tm(void *arg) + } + #endif + ++static void uct_dc_mlx5_iface_progress_enable(uct_iface_h tl_iface, unsigned flags) ++{ ++ uct_rc_iface_t *iface = ucs_derived_of(tl_iface, uct_rc_iface_t); ++ ++ uct_base_iface_progress_enable_cb(&iface->super.super, iface->progress, flags); ++} ++ + static void uct_dc_mlx5_iface_handle_failure(uct_ib_iface_t *ib_iface, + void *arg, ucs_status_t status) + { +@@ -778,7 +971,7 @@ static void uct_dc_mlx5_iface_handle_failure(uct_ib_iface_t *ib_iface, + log_lvl = ib_iface->super.config.failure_level; + } + +- uct_ib_mlx5_completion_with_err(arg, log_lvl); ++ uct_ib_mlx5_completion_with_err(ib_iface, arg, log_lvl); + } + + static ucs_status_t uct_dc_mlx5_ep_set_failed(uct_ib_iface_t *ib_iface, +@@ -823,7 +1016,7 @@ ucs_status_t uct_dc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + /* TODO: look at common code with uct_ud_mlx5_iface_get_av */ + if (dc_req->sender.global.is_global) { + uct_ib_iface_fill_ah_attr_from_gid_lid(ib_iface, dc_req->lid, +- (void*)&dc_req->sender.global.gid, ++ ucs_unaligned_ptr(&dc_req->sender.global.gid), + ib_iface->path_bits[0], &ah_attr); + + status = uct_ib_iface_create_ah(ib_iface, &ah_attr, &ah); +@@ -832,8 +1025,6 @@ ucs_status_t uct_dc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + } + + uct_ib_mlx5_get_av(ah, &mlx5_av); +- +- ibv_destroy_ah(ah); + } + + /* Note av initialization is copied from exp verbs */ +@@ -841,19 +1032,21 @@ ucs_status_t uct_dc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + av.fl_mlid = ib_iface->path_bits[0] & 0x7f; + + /* lid in dc_req is in BE already */ +- av.rlid = dc_req->lid | htons(ib_iface->path_bits[0]); ++ av.rlid = IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(ib_iface)) ? ++ 0 : (dc_req->lid | htons(ib_iface->path_bits[0])); + av.dqp_dct = htonl(dc_req->dct_num); ++ uct_dc_mlx5_iface_set_av_sport(iface, &av, dc_req->dct_num); + + if (!iface->ud_common.config.compact_av || ah_attr.is_global) { + av.dqp_dct |= UCT_IB_MLX5_EXTENDED_UD_AV; + } + +- uct_rc_mlx5_txqp_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND, + &av /*dummy*/, 0, op, sender_ep, 0, + 0, 0, + &av, ah_attr.is_global ? mlx5_av_grh(&mlx5_av) : NULL, +- uct_ib_mlx5_wqe_av_size(&av), 0); ++ uct_ib_mlx5_wqe_av_size(&av), 0, INT_MAX); + } else { + ucs_assert(op == UCT_RC_EP_FC_FLAG_HARD_REQ); + dc_mlx5_ep = ucs_derived_of(tl_ep, uct_dc_mlx5_ep_t); +@@ -864,21 +1057,20 @@ ucs_status_t uct_dc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + UCS_STATS_UPDATE_COUNTER(dc_ep->fc.stats, + UCT_RC_FC_STAT_TX_HARD_REQ, 1); + +- uct_rc_mlx5_txqp_inline_post(&iface->super.super, IBV_EXP_QPT_DC_INI, ++ uct_rc_mlx5_txqp_inline_post(&iface->super.super, UCT_IB_QPT_DCI, + txqp, txwq, MLX5_OPCODE_SEND_IMM, + &sender.global, sizeof(sender.global), op, sender.ep, +- iface->super.rx.dct->dct_num, ++ uct_dc_get_dct_num(&iface->super), + 0, 0, + &dc_mlx5_ep->av, + uct_dc_mlx5_ep_get_grh(dc_mlx5_ep), + uct_ib_mlx5_wqe_av_size(&dc_mlx5_ep->av), +- MLX5_WQE_CTRL_SOLICITED); ++ MLX5_WQE_CTRL_SOLICITED, INT_MAX); + } + + return UCS_OK; + } + +- + static void UCS_CLASS_DELETE_FUNC_NAME(uct_dc_mlx5_iface_t)(uct_iface_t*); + + static ucs_status_t uct_dc_mlx5_iface_reset_dci(uct_dc_iface_t *dc_iface, int dci) +@@ -893,16 +1085,199 @@ static ucs_status_t uct_dc_mlx5_iface_reset_dci(uct_dc_iface_t *dc_iface, int dc + */ + uct_rc_mlx5_iface_common_update_cqs_ci(&iface->mlx5_common, + &iface->super.super.super); +- status = uct_rc_modify_qp(&iface->super.tx.dcis[dci].txqp, IBV_QPS_RESET); ++ status = uct_ib_modify_qp(iface->super.tx.dcis[dci].txqp.qp, IBV_QPS_RESET); + uct_rc_mlx5_iface_common_sync_cqs_ci(&iface->mlx5_common, + &iface->super.super.super); + ++ uct_rc_mlx5_iface_commom_clean(&iface->mlx5_common.cq[UCT_IB_DIR_TX], NULL, ++ iface->super.tx.dcis[dci].txqp.qp->qp_num); ++ + /* Resume posting from to the beginning of the QP */ + uct_ib_mlx5_txwq_reset(&iface->dci_wqs[dci]); + + return status; + } + ++static void uct_dc_mlx5_iface_event_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir) ++{ ++ uct_dc_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_dc_mlx5_iface_t); ++ ++ iface->mlx5_common.cq[dir].cq_sn++; ++} ++ ++#if HAVE_DC_DV ++static ucs_status_t uct_dc_mlx5_iface_create_qp(uct_ib_iface_t *iface, ++ uct_ib_qp_attr_t *attr, ++ struct ibv_qp **qp_p) ++{ ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ struct mlx5dv_qp_init_attr dv_attr = {}; ++ struct ibv_qp *qp; ++ ++ uct_ib_iface_fill_attr(iface, attr); ++ attr->ibv.cap.max_recv_sge = 0; ++ ++ dv_attr.comp_mask = MLX5DV_QP_INIT_ATTR_MASK_DC; ++ dv_attr.dc_init_attr.dc_type = MLX5DV_DCTYPE_DCI; ++ dv_attr.dc_init_attr.dct_access_key = UCT_IB_KEY; ++ qp = mlx5dv_create_qp(dev->ibv_context, &attr->ibv, &dv_attr); ++ if (qp == NULL) { ++ ucs_error("iface=%p: failed to create DCI: %m", iface); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ attr->cap = attr->ibv.cap; ++ *qp_p = qp; ++ ++ return UCS_OK; ++} ++ ++ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, ++ uct_rc_txqp_t *dci) ++{ ++ struct ibv_qp_attr attr; ++ long attr_mask; ++ ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_INIT; ++ attr.pkey_index = 0; ++ attr.qp_access_flags = 0; ++ attr.port_num = iface->super.super.config.port_num; ++ ++ if (ibv_modify_qp(dci->qp, &attr, ++ IBV_QP_STATE | ++ IBV_QP_PKEY_INDEX | ++ IBV_QP_PORT)) { ++ ucs_error("error modifying QP to INIT : %m"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ /* Move QP to the RTR state */ ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_RTR; ++ attr.path_mtu = iface->super.config.path_mtu; ++ attr.min_rnr_timer = iface->super.config.min_rnr_timer; ++ attr.max_dest_rd_atomic = 1; ++ attr.ah_attr.is_global = iface->super.super.is_global_addr; ++ attr.ah_attr.sl = iface->super.super.config.sl; ++ attr_mask = IBV_QP_STATE | ++ IBV_QP_PATH_MTU; ++ ++ if (ibv_modify_qp(dci->qp, &attr, attr_mask)) { ++ ucs_error("error modifying DCI QP to RTR: %m"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ /* Move QP to the RTS state */ ++ memset(&attr, 0, sizeof(attr)); ++ attr.qp_state = IBV_QPS_RTS; ++ attr.timeout = iface->super.config.timeout; ++ attr.rnr_retry = iface->super.config.rnr_retry; ++ attr.retry_cnt = iface->super.config.retry_cnt; ++ attr.max_rd_atomic = iface->super.config.max_rd_atomic; ++ attr_mask = IBV_QP_STATE | ++ IBV_QP_SQ_PSN | ++ IBV_QP_TIMEOUT | ++ IBV_QP_RETRY_CNT | ++ IBV_QP_RNR_RETRY | ++ IBV_QP_MAX_QP_RD_ATOMIC; ++ ++ if (ibv_modify_qp(dci->qp, &attr, attr_mask)) { ++ ucs_error("error modifying DCI QP to RTS: %m"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ return UCS_OK; ++} ++ ++ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) ++{ ++ uct_dc_mlx5_iface_t *mlx5 = ucs_derived_of(iface, uct_dc_mlx5_iface_t); ++ uct_ib_device_t *dev = uct_ib_iface_device(&iface->super.super); ++ struct mlx5dv_qp_init_attr dv_init_attr = {}; ++ struct ibv_qp_init_attr_ex init_attr = {}; ++ struct ibv_qp_attr attr = {}; ++ int ret; ++ ++ init_attr.comp_mask = IBV_QP_INIT_ATTR_PD; ++ init_attr.pd = uct_ib_iface_md(&iface->super.super)->pd; ++ init_attr.recv_cq = iface->super.super.cq[UCT_IB_DIR_RX]; ++ /* DCT can't send, but send_cq have to point to valid CQ */ ++ init_attr.send_cq = iface->super.super.cq[UCT_IB_DIR_RX]; ++ init_attr.srq = iface->super.rx.srq.srq; ++ init_attr.qp_type = IBV_QPT_DRIVER; ++ init_attr.cap.max_inline_data = iface->super.config.rx_inline; ++ ++ dv_init_attr.comp_mask = MLX5DV_QP_INIT_ATTR_MASK_DC; ++ dv_init_attr.dc_init_attr.dc_type = MLX5DV_DCTYPE_DCT; ++ dv_init_attr.dc_init_attr.dct_access_key = UCT_IB_KEY; ++ ++ mlx5->rx_dct = mlx5dv_create_qp(dev->ibv_context, ++ &init_attr, &dv_init_attr); ++ if (mlx5->rx_dct == NULL) { ++ ucs_error("Failed to created DC target %m"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ attr.qp_state = IBV_QPS_INIT; ++ attr.port_num = iface->super.super.config.port_num; ++ attr.qp_access_flags = IBV_ACCESS_REMOTE_WRITE | ++ IBV_ACCESS_REMOTE_READ | ++ IBV_ACCESS_REMOTE_ATOMIC; ++ ++ ret = ibv_modify_qp(mlx5->rx_dct, &attr, IBV_QP_STATE | ++ IBV_QP_PKEY_INDEX | ++ IBV_QP_PORT | ++ IBV_QP_ACCESS_FLAGS); ++ ++ if (ret) { ++ ucs_error("error modifying DCT to INIT: %m"); ++ goto err; ++ } ++ ++ attr.qp_state = IBV_QPS_RTR; ++ attr.path_mtu = iface->super.config.path_mtu; ++ attr.min_rnr_timer = iface->super.config.min_rnr_timer; ++ attr.ah_attr.grh.hop_limit = iface->super.super.config.hop_limit; ++ attr.ah_attr.grh.traffic_class = iface->super.super.config.traffic_class; ++ attr.ah_attr.grh.sgid_index = uct_ib_iface_md(&iface->super.super)->config.gid_index; ++ attr.ah_attr.port_num = iface->super.super.config.port_num; ++ ++ ret = ibv_modify_qp(mlx5->rx_dct, &attr, IBV_QP_STATE | ++ IBV_QP_MIN_RNR_TIMER | ++ IBV_QP_AV | ++ IBV_QP_PATH_MTU); ++ if (ret) { ++ ucs_error("error modifying DCT to RTR: %m"); ++ goto err; ++ } ++ ++ return UCS_OK; ++ ++err: ++ ibv_destroy_qp(mlx5->rx_dct); ++ return UCS_ERR_IO_ERROR; ++} ++ ++int uct_dc_get_dct_num(uct_dc_iface_t *iface) ++{ ++ uct_dc_mlx5_iface_t *mlx5 = ucs_derived_of(iface, uct_dc_mlx5_iface_t); ++ ++ return mlx5->rx_dct->qp_num; ++} ++ ++void uct_dc_destroy_dct(uct_dc_iface_t *iface) ++{ ++ uct_dc_mlx5_iface_t *mlx5 = ucs_derived_of(iface, uct_dc_mlx5_iface_t); ++ ++ if (mlx5->rx_dct != NULL) { ++ ibv_destroy_qp(mlx5->rx_dct); ++ } ++ mlx5->rx_dct = NULL; ++} ++#endif ++ + static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + { + { +@@ -915,14 +1290,12 @@ static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + .ep_am_short = uct_dc_mlx5_ep_am_short, + .ep_am_bcopy = uct_dc_mlx5_ep_am_bcopy, + .ep_am_zcopy = uct_dc_mlx5_ep_am_zcopy, +- .ep_atomic_add64 = uct_dc_mlx5_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_dc_mlx5_ep_atomic_fadd64, +- .ep_atomic_swap64 = uct_dc_mlx5_ep_atomic_swap64, + .ep_atomic_cswap64 = uct_dc_mlx5_ep_atomic_cswap64, +- .ep_atomic_add32 = uct_dc_mlx5_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_dc_mlx5_ep_atomic_fadd32, +- .ep_atomic_swap32 = uct_dc_mlx5_ep_atomic_swap32, + .ep_atomic_cswap32 = uct_dc_mlx5_ep_atomic_cswap32, ++ .ep_atomic64_post = uct_dc_mlx5_ep_atomic64_post, ++ .ep_atomic32_post = uct_dc_mlx5_ep_atomic32_post, ++ .ep_atomic64_fetch = uct_dc_mlx5_ep_atomic64_fetch, ++ .ep_atomic32_fetch = uct_dc_mlx5_ep_atomic32_fetch, + .ep_pending_add = uct_dc_ep_pending_add, + .ep_pending_purge = uct_dc_ep_pending_purge, + .ep_flush = uct_dc_mlx5_ep_flush, +@@ -939,7 +1312,7 @@ static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + #endif + .iface_flush = uct_dc_iface_flush, + .iface_fence = uct_base_iface_fence, +- .iface_progress_enable = uct_base_iface_progress_enable, ++ .iface_progress_enable = uct_dc_mlx5_iface_progress_enable, + .iface_progress_disable = uct_base_iface_progress_disable, + .iface_progress = uct_rc_iface_do_progress, + .iface_event_fd_get = uct_ib_iface_event_fd_get, +@@ -952,10 +1325,15 @@ static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + .iface_is_reachable = uct_dc_iface_is_reachable, + .iface_get_address = uct_dc_iface_get_address, + }, +- .arm_tx_cq = uct_ib_iface_arm_tx_cq, +- .arm_rx_cq = uct_ib_iface_arm_rx_cq, ++ .arm_cq = uct_ib_iface_arm_cq, ++ .event_cq = uct_dc_mlx5_iface_event_cq, + .handle_failure = uct_dc_mlx5_iface_handle_failure, +- .set_ep_failed = uct_dc_mlx5_ep_set_failed ++ .set_ep_failed = uct_dc_mlx5_ep_set_failed, ++#if HAVE_DC_DV ++ .create_qp = uct_dc_mlx5_iface_create_qp ++#else ++ .create_qp = uct_ib_iface_create_qp ++#endif + }, + .fc_ctrl = uct_dc_mlx5_ep_fc_ctrl, + .fc_handler = uct_dc_iface_fc_handler, +@@ -964,7 +1342,8 @@ static uct_dc_iface_ops_t uct_dc_mlx5_iface_ops = { + }; + + +-static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface) ++static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface, ++ uct_ib_mlx5_mmio_mode_t mmio_mode) + { + ucs_status_t status; + uint16_t bb_max; +@@ -973,7 +1352,7 @@ static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface) + bb_max = 0; + for (i = 0; i < iface->super.tx.ndci; i++) { + status = uct_ib_mlx5_txwq_init(iface->super.super.super.super.worker, +- &iface->dci_wqs[i], ++ mmio_mode, &iface->dci_wqs[i], + iface->super.tx.dcis[i].txqp.qp); + if (status != UCS_OK) { + return status; +@@ -988,8 +1367,17 @@ static ucs_status_t uct_dc_mlx5_iface_init_dcis(uct_dc_mlx5_iface_t *iface) + return UCS_OK; + } + ++static void uct_dc_mlx5_iface_cleanup_dcis(uct_dc_mlx5_iface_t *iface) ++{ ++ int i; ++ ++ for (i = 0; i < iface->super.tx.ndci; i++) { ++ uct_ib_mlx5_txwq_cleanup(&iface->dci_wqs[i]); ++ } ++} ++ + static ucs_status_t uct_dc_mlx5_iface_tag_init(uct_dc_mlx5_iface_t *iface, +- uct_rc_iface_config_t *rc_config) ++ uct_dc_mlx5_iface_config_t *config) + { + #if IBV_EXP_HW_TM_DC + if (UCT_RC_IFACE_TM_ENABLED(&iface->super.super)) { +@@ -1000,7 +1388,9 @@ static ucs_status_t uct_dc_mlx5_iface_tag_init(uct_dc_mlx5_iface_t *iface, + uct_dc_iface_fill_xrq_init_attrs(&iface->super.super, &srq_init_attr, &dc_op); + + status = uct_rc_mlx5_iface_common_tag_init(&iface->mlx5_common, +- &iface->super.super, rc_config, ++ &iface->super.super, ++ &config->super.super, ++ &config->mlx5_common, + &srq_init_attr, + sizeof(struct ibv_exp_tmh_rvh) + + sizeof(struct ibv_exp_tmh_ravh)); +@@ -1027,8 +1417,7 @@ static ucs_status_t uct_dc_mlx5_iface_tag_init(uct_dc_mlx5_iface_t *iface, + static void uct_dc_mlx5_iface_tag_cleanup(uct_dc_mlx5_iface_t *iface) + { + if (UCT_RC_IFACE_TM_ENABLED(&iface->super.super)) { +- ibv_exp_destroy_dct(iface->super.rx.dct); +- iface->super.rx.dct = NULL; ++ uct_dc_destroy_dct(&iface->super); + } + + uct_rc_mlx5_iface_common_tag_cleanup(&iface->mlx5_common, &iface->super.super); +@@ -1040,20 +1429,25 @@ static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + { + uct_dc_mlx5_iface_config_t *config = ucs_derived_of(tl_config, + uct_dc_mlx5_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + + ucs_trace_func(""); ++ ++ init_attr.res_domain_key = UCT_IB_MLX5_RES_DOMAIN_KEY; ++ init_attr.tm_cap_bit = IBV_EXP_TM_CAP_DC; ++ init_attr.flags = UCT_IB_CQ_IGNORE_OVERRUN; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_dc_iface_t, &uct_dc_mlx5_iface_ops, md, +- worker, params, 0, &config->super, +- IBV_EXP_TM_CAP_DC); ++ worker, params, &config->super, &init_attr); + +- status = uct_dc_mlx5_iface_tag_init(self, &config->super.super); ++ status = uct_dc_mlx5_iface_tag_init(self, config); + if (status != UCS_OK) { + goto err; + } + + status = uct_rc_mlx5_iface_common_init(&self->mlx5_common, &self->super.super, +- &config->super.super); ++ &config->super.super, &config->mlx5_common); + if (status != UCS_OK) { + goto err_rc_mlx5_tag_cleanup; + } +@@ -1064,7 +1458,7 @@ static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + goto err_rc_mlx5_common_cleanup; + } + +- status = uct_dc_mlx5_iface_init_dcis(self); ++ status = uct_dc_mlx5_iface_init_dcis(self, config->mlx5_common.mmio_mode); + if (status != UCS_OK) { + goto err_rc_mlx5_common_cleanup; + } +@@ -1072,7 +1466,7 @@ static UCS_CLASS_INIT_FUNC(uct_dc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + uct_dc_iface_set_quota(&self->super, &config->super); + /* Set max_iov for put_zcopy and get_zcopy */ + uct_ib_iface_set_max_iov(&self->super.super.super, +- ((UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB) - ++ (UCT_IB_MLX5_MAX_SEND_WQE_SIZE - + sizeof(struct mlx5_wqe_raddr_seg) - + sizeof(struct mlx5_wqe_ctrl_seg) - + UCT_IB_MLX5_AV_FULL_SIZE) / +@@ -1097,6 +1491,7 @@ static UCS_CLASS_CLEANUP_FUNC(uct_dc_mlx5_iface_t) + ucs_trace_func(""); + uct_base_iface_progress_disable(&self->super.super.super.super.super, + UCT_PROGRESS_SEND | UCT_PROGRESS_RECV); ++ uct_dc_mlx5_iface_cleanup_dcis(self); + uct_rc_mlx5_iface_common_cleanup(&self->mlx5_common); + uct_dc_mlx5_iface_tag_cleanup(self); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.h +index a82474a7d..1e89c0a86 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/accel/dc_mlx5.h +@@ -16,6 +16,7 @@ + typedef struct uct_dc_mlx5_iface_config { + uct_dc_iface_config_t super; + uct_ud_mlx5_iface_common_config_t ud_common; ++ uct_ib_mlx5_iface_config_t mlx5_common; + } uct_dc_mlx5_iface_config_t; + + +@@ -24,6 +25,7 @@ typedef struct uct_dc_mlx5_iface { + uct_rc_mlx5_iface_common_t mlx5_common; + uct_ud_mlx5_iface_common_t ud_common; + uct_ib_mlx5_txwq_t dci_wqs[UCT_DC_IFACE_MAX_DCIS]; ++ struct ibv_qp *rx_dct; + } uct_dc_mlx5_iface_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.c +index 8b1175dcf..9967df82a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.c +@@ -77,7 +77,8 @@ void uct_dc_ep_release(uct_dc_ep_t *ep) + currently pending code supports only dcs policy + support hash/random policies + */ +-ucs_status_t uct_dc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *r) ++ucs_status_t uct_dc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *r, ++ unsigned flags) + { + uct_dc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_iface_t); + uct_dc_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_ep_t); +@@ -129,11 +130,9 @@ uct_dc_iface_dci_do_pending_wait(ucs_arbiter_t *arbiter, + uct_dc_ep_t *ep = ucs_container_of(ucs_arbiter_elem_group(elem), uct_dc_ep_t, arb_group); + uct_dc_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_dc_iface_t); + +- /** +- * stop if dci can not be allocated +- * else move group to the dci arbiter +- */ +- ucs_assert_always(ep->dci == UCT_DC_EP_NO_DCI); ++ if (ep->dci != UCT_DC_EP_NO_DCI) { ++ return UCS_ARBITER_CB_RESULT_DESCHED_GROUP; ++ } + + if (!uct_dc_iface_dci_can_alloc(iface)) { + return UCS_ARBITER_CB_RESULT_STOP; +@@ -254,10 +253,6 @@ ucs_status_t uct_dc_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion_t *c + return UCS_OK; + } + +- /* If waiting for FC grant, return NO_RESOURCE to prevent ep destruction. +- * Otherwise grant for destroyed ep will arrive and there will be a +- * segfault when we will try to access the ep by address from the grant +- * message. */ + if (!uct_rc_iface_has_tx_resources(&iface->super)) { + return UCS_ERR_NO_RESOURCE; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.h +index 79ff47e07..ce68e7a53 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_ep.h +@@ -53,7 +53,8 @@ uct_dc_iface_dci_do_pending_tx(ucs_arbiter_t *arbiter, + ucs_arbiter_elem_t *elem, + void *arg); + +-ucs_status_t uct_dc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *r); ++ucs_status_t uct_dc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *r, ++ unsigned flags); + void uct_dc_ep_pending_purge(uct_ep_h tl_ep, uct_pending_purge_callback_t cb, void *arg); + + void uct_dc_ep_cleanup(uct_ep_h tl_ep, ucs_class_t *cls); +@@ -105,7 +106,7 @@ enum uct_dc_ep_flags { + UCT_DC_EP_FLAG_TX_WAIT = UCS_BIT(0), /* ep is in the tx_wait state. See + description of the dcs+quota dci + selection policy above */ +- UCT_DC_EP_FLAG_GRH = UCS_BIT(1), /* ep has GRH address. Used by ++ UCT_DC_EP_FLAG_GRH = UCS_BIT(1), /* ep has GRH address. Used by + dc_mlx5 endpoint */ + UCT_DC_EP_FLAG_VALID = UCS_BIT(2) /* ep is a valid endpoint */ + }; +@@ -212,6 +213,9 @@ static inline void uct_dc_iface_dci_put_dcs(uct_dc_iface_t *iface, uint8_t dci) + } + iface->tx.stack_top--; + iface->tx.dcis_stack[iface->tx.stack_top] = dci; ++#if ENABLE_ASSERT ++ iface->tx.dcis[dci].flags = 0; ++#endif + + if (ucs_unlikely(ep == NULL)) { + return; +@@ -221,9 +225,7 @@ static inline void uct_dc_iface_dci_put_dcs(uct_dc_iface_t *iface, uint8_t dci) + ep->dci = UCT_DC_EP_NO_DCI; + ep->flags &= ~UCT_DC_EP_FLAG_TX_WAIT; + iface->tx.dcis[dci].ep = NULL; +-#if ENABLE_ASSERT +- iface->tx.dcis[dci].flags = 0; +-#endif ++ + /* it is possible that dci is released while ep still has scheduled pending ops. + * move the group to the 'wait for dci alloc' state + */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.c +index 50bd0c0b1..296256003 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.c +@@ -10,7 +10,6 @@ + #include + #include + +- + const static char *uct_dc_tx_policy_names[] = { + [UCT_DC_TX_POLICY_DCS] = "dcs", + [UCT_DC_TX_POLICY_DCS_QUOTA] = "dcs_quota", +@@ -52,6 +51,7 @@ ucs_config_field_t uct_dc_iface_config_table[] = { + {NULL} + }; + ++#if HAVE_DC_EXP + ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) + { + struct ibv_exp_dct_init_attr init_attr; +@@ -59,7 +59,7 @@ ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) + memset(&init_attr, 0, sizeof(init_attr)); + + init_attr.pd = uct_ib_iface_md(&iface->super.super)->pd; +- init_attr.cq = iface->super.super.recv_cq; ++ init_attr.cq = iface->super.super.cq[UCT_IB_DIR_RX]; + init_attr.srq = iface->super.rx.srq.srq; + init_attr.dc_key = UCT_IB_KEY; + init_attr.port = iface->super.super.config.port_num; +@@ -68,7 +68,9 @@ ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) + IBV_EXP_ACCESS_REMOTE_READ | + IBV_EXP_ACCESS_REMOTE_ATOMIC; + init_attr.min_rnr_timer = iface->super.config.min_rnr_timer; +- init_attr.hop_limit = 1; ++ init_attr.tclass = iface->super.super.config.traffic_class; ++ init_attr.hop_limit = iface->super.super.config.hop_limit; ++ init_attr.gid_index = iface->super.super.config.gid_index; + init_attr.inline_size = iface->super.config.rx_inline; + + #if HAVE_DECL_IBV_EXP_DCT_OOO_RW_DATA_PLACEMENT +@@ -81,19 +83,18 @@ ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface) + } + #endif + +- iface->rx.dct = ibv_exp_create_dct(uct_ib_iface_device(&iface->super.super)->ibv_context, ++ iface->rx_dct = ibv_exp_create_dct(uct_ib_iface_device(&iface->super.super)->ibv_context, + &init_attr); +- if (iface->rx.dct == NULL) { ++ if (iface->rx_dct == NULL) { + ucs_error("Failed to created DC target %m"); + return UCS_ERR_INVALID_PARAM; + } +- + return UCS_OK; + } + + /* take dc qp to rts state */ +-static ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, +- uct_rc_txqp_t *dci) ++ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, ++ uct_rc_txqp_t *dci) + { + struct ibv_exp_qp_attr attr; + long attr_mask; +@@ -121,11 +122,7 @@ static ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, + attr.path_mtu = iface->super.config.path_mtu; + attr.min_rnr_timer = 0; + attr.max_dest_rd_atomic = 1; +- if ((iface->super.super.addr_type == UCT_IB_ADDRESS_TYPE_ETH) || +- (iface->super.super.addr_type == UCT_IB_ADDRESS_TYPE_GLOBAL)) +- { +- attr.ah_attr.is_global = 1; +- } ++ attr.ah_attr.is_global = iface->super.super.is_global_addr; + attr.ah_attr.sl = iface->super.super.config.sl; + attr_mask = IBV_EXP_QP_STATE | + IBV_EXP_QP_PATH_MTU | +@@ -167,6 +164,33 @@ static ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, + return UCS_OK; + } + ++int uct_dc_get_dct_num(uct_dc_iface_t *iface) ++{ ++ return iface->rx_dct->dct_num; ++} ++ ++void uct_dc_destroy_dct(uct_dc_iface_t *iface) ++{ ++ if (iface->rx_dct != NULL) { ++ ibv_exp_destroy_dct(iface->rx_dct); ++ } ++ iface->rx_dct = NULL; ++} ++ ++static ucs_status_t uct_dc_device_init(uct_ib_device_t *dev) ++{ ++#if HAVE_DECL_IBV_EXP_DEVICE_DC_TRANSPORT && HAVE_STRUCT_IBV_EXP_DEVICE_ATTR_EXP_DEVICE_CAP_FLAGS ++ if (dev->dev_attr.exp_device_cap_flags & IBV_EXP_DEVICE_DC_TRANSPORT) { ++ dev->flags |= UCT_IB_DEVICE_FLAG_DC; ++ } ++#endif ++ return UCS_OK; ++} ++ ++UCT_IB_DEVICE_INIT(uct_dc_device_init); ++ ++#endif ++ + static void uct_dc_iface_dcis_destroy(uct_dc_iface_t *iface, int max) + { + int i; +@@ -187,7 +211,7 @@ static ucs_status_t uct_dc_iface_create_dcis(uct_dc_iface_t *iface, + iface->tx.stack_top = 0; + for (i = 0; i < iface->tx.ndci; i++) { + status = uct_rc_txqp_init(&iface->tx.dcis[i].txqp, &iface->super, +- IBV_EXP_QPT_DC_INI, &cap ++ UCT_IB_QPT_DCI, &cap + UCS_STATS_ARG(iface->super.stats)); + if (status != UCS_OK) { + goto err; +@@ -241,15 +265,16 @@ static void uct_dc_iface_init_version(uct_dc_iface_t *iface, uct_md_h md) + + UCS_CLASS_INIT_FUNC(uct_dc_iface_t, uct_dc_iface_ops_t *ops, uct_md_h md, + uct_worker_h worker, const uct_iface_params_t *params, +- unsigned rx_priv_len, uct_dc_iface_config_t *config, +- int tm_cap_bit) ++ uct_dc_iface_config_t *config, ++ uct_ib_iface_init_attr_t *init_attr) + { + ucs_status_t status; + ucs_trace_func(""); + ++ init_attr->fc_req_size = sizeof(uct_dc_fc_request_t); ++ + UCS_CLASS_CALL_SUPER_INIT(uct_rc_iface_t, &ops->super, md, worker, params, +- &config->super, rx_priv_len, +- sizeof(uct_dc_fc_request_t), tm_cap_bit); ++ &config->super, init_attr); + if (config->ndci < 1) { + ucs_error("dc interface must have at least 1 dci (requested: %d)", + config->ndci); +@@ -287,7 +312,7 @@ UCS_CLASS_INIT_FUNC(uct_dc_iface_t, uct_dc_iface_ops_t *ops, uct_md_h md, + ucs_debug("dc iface %p: using '%s' policy with %d dcis, dct 0x%x", self, + uct_dc_tx_policy_names[self->tx.policy], self->tx.ndci, + UCT_RC_IFACE_TM_ENABLED(&self->super) ? +- 0 : self->rx.dct->dct_num); ++ 0 : uct_dc_get_dct_num(self)); + + /* Create fake endpoint which will be used for sending FC grants */ + uct_dc_iface_init_fc_ep(self); +@@ -297,7 +322,7 @@ UCS_CLASS_INIT_FUNC(uct_dc_iface_t, uct_dc_iface_ops_t *ops, uct_md_h md, + + err_destroy_dct: + if (!UCT_RC_IFACE_TM_ENABLED(&self->super)) { +- ibv_exp_destroy_dct(self->rx.dct); ++ uct_dc_destroy_dct(self); + } + err: + return status; +@@ -308,15 +333,13 @@ static UCS_CLASS_CLEANUP_FUNC(uct_dc_iface_t) + uct_dc_ep_t *ep, *tmp; + + ucs_trace_func(""); +- if (self->rx.dct != NULL) { +- ibv_exp_destroy_dct(self->rx.dct); +- } ++ uct_dc_destroy_dct(self); + ucs_list_for_each_safe(ep, tmp, &self->tx.gc_list, list) { + uct_dc_ep_release(ep); + } + uct_dc_iface_dcis_destroy(self, self->tx.ndci); +- ucs_arbiter_cleanup(&self->tx.dci_arbiter); + uct_dc_iface_cleanup_fc_ep(self); ++ ucs_arbiter_cleanup(&self->tx.dci_arbiter); + } + + UCS_CLASS_DEFINE(uct_dc_iface_t, uct_rc_iface_t); +@@ -324,12 +347,13 @@ UCS_CLASS_DEFINE(uct_dc_iface_t, uct_rc_iface_t); + ucs_status_t uct_dc_iface_query(uct_dc_iface_t *iface, + uct_iface_attr_t *iface_attr, + size_t put_max_short, size_t max_inline, +- size_t am_max_hdr, size_t am_max_iov) ++ size_t am_max_hdr, size_t am_max_iov, ++ size_t tag_max_iov) + { + ucs_status_t status; + + status = uct_rc_iface_query(&iface->super, iface_attr, put_max_short, +- max_inline, am_max_hdr, am_max_iov); ++ max_inline, am_max_hdr, am_max_iov, tag_max_iov); + if (status != UCS_OK) { + return status; + } +@@ -367,7 +391,7 @@ uct_dc_iface_get_address(uct_iface_h tl_iface, uct_iface_addr_t *iface_addr) + uct_dc_iface_t *iface = ucs_derived_of(tl_iface, uct_dc_iface_t); + uct_dc_iface_addr_t *addr = (uct_dc_iface_addr_t *)iface_addr; + +- uct_ib_pack_uint24(addr->qp_num, iface->rx.dct->dct_num); ++ uct_ib_pack_uint24(addr->qp_num, uct_dc_get_dct_num(iface)); + addr->atomic_mr_id = uct_ib_iface_get_atomic_mr_id(&iface->super.super); + addr->flags = iface->version_flag; + if (UCT_RC_IFACE_TM_ENABLED(&iface->super)) { +@@ -395,7 +419,7 @@ static inline ucs_status_t uct_dc_iface_flush_dcis(uct_dc_iface_t *iface) + for (i = 0; i < iface->tx.ndci; i++) { + if ((iface->tx.dcis[i].ep != NULL) && + uct_dc_ep_fc_wait_for_grant(iface->tx.dcis[i].ep)) { +- return UCS_ERR_NO_RESOURCE; ++ return UCS_INPROGRESS; + } + if (uct_dc_iface_flush_dci(iface, i) != UCS_OK) { + is_flush_done = 0; +@@ -517,7 +541,8 @@ ucs_status_t uct_dc_iface_fc_handler(uct_rc_iface_t *rc_iface, unsigned qp_num, + + status = uct_dc_iface_fc_grant(&dc_req->super.super); + if (status == UCS_ERR_NO_RESOURCE){ +- status = uct_ep_pending_add(&ep->super.super, &dc_req->super.super); ++ status = uct_ep_pending_add(&ep->super.super, &dc_req->super.super, ++ 0); + } + ucs_assertv_always(status == UCS_OK, "Failed to send FC grant msg: %s", + ucs_status_string(status)); +@@ -590,8 +615,18 @@ ucs_status_t uct_dc_handle_failure(uct_ib_iface_t *ib_iface, uint32_t qp_num, + uct_dc_iface_dci_put(iface, dci); + ucs_assert_always(ep->dci == UCT_DC_EP_NO_DCI); + +- ep_status = iface->super.super.ops->set_ep_failed(ib_iface, +- &ep->super.super, status); ++ if (ep == iface->tx.fc_ep) { ++ /* Cannot handle errors on flow-control endpoint, so ignore them */ ++ ucs_error("got error on DC flow-control endpoint, iface %p: %s", iface, ++ ucs_status_string(status)); ++ ep_status = UCS_OK; ++ } else { ++ ep_status = iface->super.super.ops->set_ep_failed(ib_iface, ++ &ep->super.super, status); ++ if (ep_status != UCS_OK) { ++ return ep_status; ++ } ++ } + + status = dc_ops->reset_dci(iface, dci); + if (status != UCS_OK) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.h +index 4959449ca..6f494bb91 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/base/dc_iface.h +@@ -118,17 +118,17 @@ struct uct_dc_iface { + ucs_list_link_t gc_list; + } tx; + +- struct { +- struct ibv_exp_dct *dct; +- } rx; ++#if HAVE_DC_EXP ++ struct ibv_exp_dct *rx_dct; ++#endif + + uint8_t version_flag; + }; + + + UCS_CLASS_DECLARE(uct_dc_iface_t, uct_dc_iface_ops_t*, uct_md_h, +- uct_worker_h, const uct_iface_params_t*, unsigned, +- uct_dc_iface_config_t*, int) ++ uct_worker_h, const uct_iface_params_t*, ++ uct_dc_iface_config_t*, uct_ib_iface_init_attr_t*) + + extern ucs_config_field_t uct_dc_iface_config_table[]; + +@@ -136,7 +136,8 @@ ucs_status_t uct_dc_iface_create_dct(uct_dc_iface_t *iface); + + ucs_status_t uct_dc_iface_query(uct_dc_iface_t *iface, uct_iface_attr_t *iface_attr, + size_t put_max_short, size_t max_inline, +- size_t am_max_hdr, size_t am_max_iov); ++ size_t am_max_hdr, size_t am_max_iov, ++ size_t tag_max_iov); + + int uct_dc_iface_is_reachable(const uct_iface_h tl_iface, + const uct_device_addr_t *dev_addr, +@@ -155,6 +156,8 @@ void uct_dc_iface_set_quota(uct_dc_iface_t *iface, uct_dc_iface_config_t *config + + ucs_status_t uct_dc_iface_init_fc_ep(uct_dc_iface_t *iface); + ++ucs_status_t uct_dc_iface_dci_connect(uct_dc_iface_t *iface, uct_rc_txqp_t *dci); ++ + void uct_dc_iface_cleanup_fc_ep(uct_dc_iface_t *iface); + + ucs_status_t uct_dc_iface_fc_grant(uct_pending_req_t *self); +@@ -166,6 +169,10 @@ ucs_status_t uct_dc_iface_fc_handler(uct_rc_iface_t *rc_iface, unsigned qp_num, + ucs_status_t uct_dc_handle_failure(uct_ib_iface_t *ib_iface, uint32_t qp_num, + ucs_status_t status); + ++int uct_dc_get_dct_num(uct_dc_iface_t *iface); ++ ++void uct_dc_destroy_dct(uct_dc_iface_t *iface); ++ + #if IBV_EXP_HW_TM_DC + void uct_dc_iface_fill_xrq_init_attrs(uct_rc_iface_t *rc_iface, + struct ibv_exp_create_srq_attr *srq_attr, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/verbs/dc_verbs.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/verbs/dc_verbs.c +index 139278736..dfac71622 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/verbs/dc_verbs.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/dc/verbs/dc_verbs.c +@@ -56,7 +56,6 @@ static UCS_CLASS_INIT_FUNC(uct_dc_verbs_ep_t, + static UCS_CLASS_CLEANUP_FUNC(uct_dc_verbs_ep_t) + { + ucs_trace_func(""); +- ibv_destroy_ah(self->ah); + } + + UCS_CLASS_DEFINE(uct_dc_verbs_ep_t, uct_dc_ep_t); +@@ -78,6 +77,7 @@ static ucs_status_t uct_dc_verbs_iface_query(uct_iface_h tl_iface, uct_iface_att + verbs_common->config.max_inline, + verbs_common->config.max_inline, + verbs_common->config.short_desc_size, ++ uct_ib_iface_get_max_iov(&iface->super.super.super) - 1, + uct_ib_iface_get_max_iov(&iface->super.super.super) - 1); + if (status != UCS_OK) { + return status; +@@ -93,7 +93,8 @@ static UCS_F_ALWAYS_INLINE void + uct_dc_verbs_iface_post_send_to_dci(uct_dc_verbs_iface_t* iface, + struct ibv_exp_send_wr *wr, + uint8_t dci, struct ibv_ah *ah, +- uint32_t dct_num, uint64_t send_flags) ++ uint32_t dct_num, uint64_t send_flags, ++ int max_log_sge) + { + struct ibv_exp_send_wr *bad_wr; + int ret; +@@ -109,9 +110,10 @@ uct_dc_verbs_iface_post_send_to_dci(uct_dc_verbs_iface_t* iface, + wr->dc.dct_number = dct_num; + wr->dc.dct_access_key = UCT_IB_KEY; + +- uct_ib_log_exp_post_send(&iface->super.super.super, txqp->qp, wr, +- (wr->exp_opcode == IBV_EXP_WR_SEND) ? +- uct_rc_ep_am_packet_dump : NULL); ++ uct_ib_log_exp_post_send(&iface->super.super.super, txqp->qp, wr, max_log_sge, ++ ((wr->exp_opcode == IBV_EXP_WR_SEND) || ++ (wr->exp_opcode == IBV_EXP_WR_SEND_WITH_IMM)) ? ++ uct_rc_verbs_common_packet_dump : NULL); + + ret = ibv_exp_post_send(txqp->qp, wr, &bad_wr); + if (ret != 0) { +@@ -124,20 +126,22 @@ uct_dc_verbs_iface_post_send_to_dci(uct_dc_verbs_iface_t* iface, + + static UCS_F_ALWAYS_INLINE void + uct_dc_verbs_iface_post_send(uct_dc_verbs_iface_t* iface, uct_dc_verbs_ep_t *ep, +- struct ibv_exp_send_wr *wr, uint64_t send_flags) ++ struct ibv_exp_send_wr *wr, uint64_t send_flags, ++ int max_log_sge) + { + uct_dc_verbs_iface_post_send_to_dci(iface, wr, ep->super.dci, ep->ah, +- ep->dest_qpn, send_flags); ++ ep->dest_qpn, send_flags, max_log_sge); + } + + static UCS_F_ALWAYS_INLINE void + uct_dc_verbs_iface_post_send_desc(uct_dc_verbs_iface_t *iface, + uct_dc_verbs_ep_t *ep, + struct ibv_exp_send_wr *wr, +- uct_rc_iface_send_desc_t *desc, uint64_t send_flags) ++ uct_rc_iface_send_desc_t *desc, ++ uint64_t send_flags, int max_log_sge) + { + UCT_RC_VERBS_FILL_DESC_WR(wr, desc); +- uct_dc_verbs_iface_post_send(iface, ep, wr, send_flags); ++ uct_dc_verbs_iface_post_send(iface, ep, wr, send_flags, max_log_sge); + uct_rc_txqp_add_send_op_sn(&iface->super.tx.dcis[ep->super.dci].txqp, &desc->super, + iface->dcis_txcnt[ep->super.dci].pi); + } +@@ -170,7 +174,8 @@ uct_dc_verbs_ep_rdma_zcopy(uct_dc_verbs_ep_t *ep, const uct_iov_t *iov, + remote_addr, rkey); + wr.next = NULL; + +- uct_dc_verbs_iface_post_send(iface, ep, &wr, IBV_SEND_SIGNALED); ++ uct_dc_verbs_iface_post_send(iface, ep, &wr, IBV_SEND_SIGNALED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + uct_dc_verbs_iface_add_send_comp(iface, ep, comp); + return UCS_INPROGRESS; + } +@@ -195,7 +200,7 @@ ucs_status_t uct_dc_verbs_ep_get_bcopy(uct_ep_h tl_ep, + UCT_RC_VERBS_FILL_RDMA_WR(wr, wr.exp_opcode, IBV_EXP_WR_RDMA_READ, sge, + length, remote_addr, rkey); + UCT_TL_EP_STAT_OP(&ep->super.super, GET, BCOPY, length); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SIGNALED); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SIGNALED, INT_MAX); + + return UCS_INPROGRESS; + } +@@ -236,7 +241,7 @@ ucs_status_t uct_dc_verbs_ep_put_short(uct_ep_h tl_ep, const void *buffer, + UCT_RC_VERBS_FILL_INL_PUT_WR(iface, remote_addr, rkey, buffer, length); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); + uct_dc_verbs_iface_post_send(iface, ep, &iface->inl_rwrite_wr, +- IBV_SEND_INLINE|IBV_SEND_SIGNALED); ++ IBV_SEND_INLINE|IBV_SEND_SIGNALED, INT_MAX); + + return UCS_OK; + } +@@ -257,7 +262,7 @@ ssize_t uct_dc_verbs_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + UCT_RC_VERBS_FILL_RDMA_WR(wr, wr.exp_opcode, IBV_EXP_WR_RDMA_WRITE, sge, + length, remote_addr, rkey); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, BCOPY, length); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SIGNALED); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SIGNALED, INT_MAX); + + return length; + } +@@ -295,7 +300,7 @@ ucs_status_t uct_dc_verbs_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + uct_rc_verbs_iface_fill_inl_am_sge(verbs_common, id, hdr, buffer, length); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); + uct_dc_verbs_iface_post_send(iface, ep, &iface->inl_am_wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ IBV_SEND_INLINE | IBV_SEND_SOLICITED, INT_MAX); + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + + return UCS_OK; +@@ -321,7 +326,7 @@ ssize_t uct_dc_verbs_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + UCT_RC_VERBS_FILL_AM_BCOPY_WR(wr, sge, length + sizeof(uct_rc_hdr_t), + wr.exp_opcode); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SOLICITED); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SOLICITED, INT_MAX); + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + + return length; +@@ -360,7 +365,8 @@ ucs_status_t uct_dc_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *he + UCT_TL_EP_STAT_OP(&ep->super.super, AM, ZCOPY, + header_length + uct_iov_total_length(iov, iovcnt)); + uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, +- send_flags | IBV_SEND_SOLICITED); ++ send_flags | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + UCT_RC_UPDATE_FC_WND(&iface->super.super, &ep->super.fc); + + return UCS_INPROGRESS; +@@ -381,7 +387,7 @@ uct_dc_verbs_iface_atomic_post(uct_dc_verbs_iface_t *iface, uct_dc_verbs_ep_t *e + UCT_RC_VERBS_FILL_ATOMIC_WR(wr, wr.exp_opcode, sge, opcode, compare_add, + swap, remote_addr, ib_rkey); + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, force_sig); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, force_sig, INT_MAX); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +@@ -394,9 +400,9 @@ uct_dc_verbs_ep_atomic(uct_dc_verbs_ep_t *ep, int opcode, void *result, + uct_rc_iface_send_desc_t *desc; + + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc, +- iface->super.super.config.atomic64_handler, +- result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, ++ desc, iface->super.super.config.atomic64_handler, ++ result, comp); + uct_dc_verbs_iface_atomic_post(iface, ep, opcode, compare_add, swap, remote_addr, + rkey, desc, IBV_SEND_SIGNALED); + return UCS_INPROGRESS; +@@ -415,7 +421,8 @@ uct_dc_verbs_iface_ext_atomic_post(uct_dc_verbs_iface_t *iface, uct_dc_verbs_ep_ + uct_rc_verbs_fill_ext_atomic_wr(&wr, &sge, opcode, length, compare_mask, + compare_add, swap, remote_addr, rkey, ep->super.atomic_mr_offset); + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, force_sig|IBV_EXP_SEND_EXT_ATOMIC_INLINE); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, ++ force_sig|IBV_EXP_SEND_EXT_ATOMIC_INLINE, INT_MAX); + } + + +@@ -431,8 +438,8 @@ uct_dc_verbs_ep_ext_atomic(uct_dc_verbs_ep_t *ep, int opcode, void *result, + uct_rc_send_handler_t handler = uct_rc_iface_atomic_handler(&iface->super.super, 1, length); + + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc, +- handler, result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, ++ desc, handler, result, comp); + uct_dc_verbs_iface_ext_atomic_post(iface, ep, opcode, length, compare_mask, + compare_add, swap, remote_addr, + rkey, desc, IBV_SEND_SIGNALED); +@@ -440,74 +447,44 @@ uct_dc_verbs_ep_ext_atomic(uct_dc_verbs_ep_t *ep, int opcode, void *result, + } + #endif + +-ucs_status_t uct_dc_verbs_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_dc_verbs_ep_atomic64_post(uct_ep_h tl_ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- + uct_dc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_verbs_iface_t); +- uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); ++ uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); + uct_rc_iface_send_desc_t *desc; + +- /* TODO don't allocate descriptor - have dummy buffer */ ++ if (opcode != UCT_ATOMIC_OP_ADD) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc); ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc); + + uct_dc_verbs_iface_atomic_post(iface, ep, +- IBV_WR_ATOMIC_FETCH_AND_ADD, add, 0, ++ IBV_WR_ATOMIC_FETCH_AND_ADD, value, 0, + remote_addr, rkey, desc, + IBV_SEND_SIGNALED); + return UCS_OK; + } + +-ucs_status_t uct_dc_verbs_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- +- return uct_dc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_WR_ATOMIC_FETCH_AND_ADD, result, add, 0, +- remote_addr, rkey, comp); +-} +- +- +-ucs_status_t uct_dc_verbs_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +-#if HAVE_IB_EXT_ATOMICS +- return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, +- result, sizeof(uint64_t), 0, 0, swap, remote_addr, +- rkey, comp); +-#else +- return UCS_ERR_UNSUPPORTED; +-#endif +-} +- +-ucs_status_t uct_dc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_dc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_WR_ATOMIC_CMP_AND_SWP, result, compare, swap, +- remote_addr, rkey, comp); +-} +- +- +-ucs_status_t uct_dc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_dc_verbs_ep_atomic32_post(uct_ep_h tl_ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { + #if HAVE_IB_EXT_ATOMICS + uct_dc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_dc_verbs_iface_t); +- uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); ++ uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); + uct_rc_iface_send_desc_t *desc; + ++ if (opcode != UCT_ATOMIC_OP_ADD) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ + UCT_DC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc); ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super.super, &iface->verbs_common.short_desc_mp, desc); + +- /* TODO don't allocate descriptor - have dummy buffer */ + uct_dc_verbs_iface_ext_atomic_post(iface, ep, IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD, +- sizeof(uint32_t), 0, add, 0, remote_addr, ++ sizeof(uint32_t), 0, value, 0, remote_addr, + rkey, desc, IBV_EXP_SEND_SIGNALED); + return UCS_OK; + #else +@@ -515,34 +492,61 @@ ucs_status_t uct_dc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, + #endif + } + +-ucs_status_t uct_dc_verbs_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_dc_verbs_ep_atomic64_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +-#if HAVE_IB_EXT_ATOMICS +- return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD, +- result, sizeof(uint32_t), 0, add, 0, ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_dc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), ++ IBV_WR_ATOMIC_FETCH_AND_ADD, result, value, 0, + remote_addr, rkey, comp); +-#else +- return UCS_ERR_UNSUPPORTED; ++#if HAVE_IB_EXT_ATOMICS ++ case UCT_ATOMIC_OP_SWAP: ++ return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), ++ IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, ++ result, sizeof(uint64_t), 0, 0, value, remote_addr, ++ rkey, comp); + #endif ++ default: ++ return UCS_ERR_UNSUPPORTED; ++ } + } + +-ucs_status_t uct_dc_verbs_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_dc_verbs_ep_atomic32_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { + #if HAVE_IB_EXT_ATOMICS +- return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, +- result, sizeof(uint32_t), 0, 0, swap, +- remote_addr, rkey, comp); ++ int op; ++ uint32_t add; ++ uint32_t swap; ++ ucs_status_t status; ++ ++ status = uct_rc_verbs_ep_atomic32_data(opcode, value, &op, &add, &swap); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ return uct_dc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), op, ++ result, sizeof(uint32_t), 0, add, swap, ++ remote_addr, rkey, comp); + #else + return UCS_ERR_UNSUPPORTED; + #endif + } + ++ucs_status_t uct_dc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp) ++{ ++ return uct_dc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_dc_verbs_ep_t), ++ IBV_WR_ATOMIC_CMP_AND_SWP, result, compare, swap, ++ remote_addr, rkey, comp); ++} ++ + ucs_status_t uct_dc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp) +@@ -557,13 +561,13 @@ ucs_status_t uct_dc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, ui + #endif + } + +- + ucs_status_t uct_dc_verbs_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion_t *comp) + { + uct_dc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, + uct_dc_verbs_iface_t); + uct_dc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_dc_verbs_ep_t); + ucs_status_t status; ++ uint8_t dci; + + status = uct_dc_ep_flush(tl_ep, flags, comp); + if (status == UCS_OK) { +@@ -571,9 +575,13 @@ ucs_status_t uct_dc_verbs_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completio + } + + if (status == UCS_INPROGRESS) { +- ucs_assert(ep->super.dci != UCT_DC_EP_NO_DCI); +- uct_dc_verbs_iface_add_send_comp(iface, ep, comp); ++ dci = ep->super.dci; ++ ucs_assert(dci != UCT_DC_EP_NO_DCI); ++ status = uct_rc_txqp_add_flush_comp(&iface->super.super, ++ &iface->super.tx.dcis[dci].txqp, ++ comp, iface->dcis_txcnt[dci].pi); + } ++ + return status; + } + +@@ -624,7 +632,7 @@ static ucs_status_t uct_dc_verbs_reset_dci(uct_dc_iface_t *dc_iface, int dci) + iface->dcis_txcnt[dci].ci, new_ci); + iface->dcis_txcnt[dci].ci = new_ci; + +- return uct_rc_modify_qp(&dc_iface->tx.dcis[dci].txqp, IBV_QPS_RESET); ++ return uct_ib_modify_qp(dc_iface->tx.dcis[dci].txqp.qp, IBV_QPS_RESET); + } + + /* Send either request for grants or grant message. Request includes ep +@@ -647,7 +655,7 @@ ucs_status_t uct_dc_verbs_ep_fc_ctrl(uct_ep_h tl_ep, unsigned op, + uct_dc_fc_sender_data_t sender = { + .ep = (uintptr_t)dc_ep, + .global.gid = ib_iface->gid, +- .global.is_global = ib_iface->addr_type != UCT_IB_ADDRESS_TYPE_LINK_LOCAL}; ++ .global.is_global = ib_iface->is_global_addr}; + + ucs_assert(sizeof(*hdr) + sizeof(sender) <= + iface->verbs_common.config.max_inline); +@@ -670,7 +678,7 @@ ucs_status_t uct_dc_verbs_ep_fc_ctrl(uct_ep_h tl_ep, unsigned op, + + status = uct_dc_verbs_iface_create_ah( + &iface->super, dc_req->lid, +- dc_req->sender.global.is_global ? (void*)&dc_req->sender.global.gid : NULL, ++ ucs_unaligned_ptr(&dc_req->sender.global.gid), + &ah); + if (status != UCS_OK) { + return status; +@@ -680,8 +688,7 @@ ucs_status_t uct_dc_verbs_ep_fc_ctrl(uct_ep_h tl_ep, unsigned op, + iface->verbs_common.inl_sge[1].length = sizeof(dc_req->sender.ep); + uct_dc_verbs_iface_post_send_to_dci(iface, &wr, dc_ep->dci, ah, + dc_req->dct_num, +- IBV_SEND_INLINE | IBV_SEND_SIGNALED); +- ibv_destroy_ah(ah); ++ IBV_SEND_INLINE | IBV_SEND_SIGNALED, INT_MAX); + } else { + ucs_assert(op == UCT_RC_EP_FC_FLAG_HARD_REQ); + wr.exp_opcode = IBV_EXP_WR_SEND_WITH_IMM; +@@ -690,12 +697,12 @@ ucs_status_t uct_dc_verbs_ep_fc_ctrl(uct_ep_h tl_ep, unsigned op, + + /* Send out DCT number to the peer, so it will be able + * to send grants back */ +- wr.ex.imm_data = iface->super.rx.dct->dct_num; ++ wr.ex.imm_data = iface->super.rx_dct->dct_num; + + dc_verbs_ep = ucs_derived_of(dc_ep, uct_dc_verbs_ep_t); + uct_dc_verbs_iface_post_send(iface, dc_verbs_ep, &wr, + IBV_SEND_INLINE | IBV_SEND_SIGNALED | +- IBV_SEND_SOLICITED) ; ++ IBV_SEND_SOLICITED, INT_MAX) ; + UCS_STATS_UPDATE_COUNTER(dc_ep->fc.stats, + UCT_RC_FC_STAT_TX_HARD_REQ, 1); + } +@@ -765,7 +772,9 @@ ucs_status_t uct_dc_verbs_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, + uct_rc_verbs_iface_fill_inl_sge(&iface->verbs_common, &tmh, sizeof(tmh), + data, length); + uct_dc_verbs_iface_post_send(iface, ep, &iface->inl_am_wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ IBV_SEND_INLINE | IBV_SEND_SOLICITED, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); + + return UCS_OK; + } +@@ -792,7 +801,9 @@ ssize_t uct_dc_verbs_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + &iface->super.super.tx.mp, desc, + tag, app_ctx, pack_cb, arg, length); + UCT_RC_VERBS_FILL_SGE(wr, sge, length + sizeof(struct ibv_exp_tmh)); +- uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SOLICITED); ++ uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, IBV_SEND_SOLICITED, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, BCOPY, length); + + return length; + } +@@ -812,7 +823,9 @@ ucs_status_t uct_dc_verbs_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + size_t sge_cnt; + uint32_t app_ctx; + +- UCT_CHECK_IOV_SIZE(iovcnt, 1ul, "uct_dc_verbs_ep_tag_eager_zcopy"); ++ UCT_CHECK_IOV_SIZE(iovcnt, ++ uct_ib_iface_get_max_iov(&iface->super.super.super) - 1, ++ "uct_dc_verbs_ep_tag_eager_zcopy"); + UCT_RC_CHECK_ZCOPY_DATA(sizeof(struct ibv_exp_tmh), + uct_iov_total_length(iov, iovcnt), + iface->super.super.super.config.seg_size); +@@ -829,7 +842,11 @@ ucs_status_t uct_dc_verbs_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + wr.num_sge = sge_cnt + 1; + wr.sg_list = sge; + uct_dc_verbs_iface_post_send_desc(iface, ep, &wr, desc, +- send_flags | IBV_SEND_SOLICITED); ++ send_flags | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); + + return UCS_INPROGRESS; + } +@@ -864,10 +881,11 @@ ucs_status_ptr_t uct_dc_verbs_ep_tag_rndv_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + tmh_len, tag, iov, comp); + + uct_dc_iface_fill_ravh(rvh + sizeof(struct ibv_exp_tmh_rvh), +- iface->super.rx.dct->dct_num); ++ iface->super.rx_dct->dct_num); + + uct_dc_verbs_iface_post_send(iface, ep, &iface->inl_am_wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ IBV_SEND_INLINE | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + return (ucs_status_ptr_t)((uint64_t)rndv_idx); + } + +@@ -898,8 +916,8 @@ ucs_status_t uct_dc_verbs_ep_tag_rndv_request(uct_ep_h tl_ep, uct_tag_t tag, + uct_rc_iface_fill_tmh(&tmh, tag, app_ctx, IBV_EXP_TMH_EAGER); + uct_rc_verbs_iface_fill_inl_sge(&iface->verbs_common, &tmh, sizeof(tmh), + header, header_length); +- uct_dc_verbs_iface_post_send(iface, ep, &wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ uct_dc_verbs_iface_post_send(iface, ep, &wr, IBV_SEND_INLINE | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super.super)); + + return UCS_OK; + } +@@ -990,8 +1008,8 @@ uct_dc_verbs_iface_tag_init(uct_dc_verbs_iface_t *iface, + static void uct_dc_verbs_iface_tag_cleanup(uct_dc_verbs_iface_t *iface) + { + if (UCT_RC_IFACE_TM_ENABLED(&iface->super.super)) { +- ibv_exp_destroy_dct(iface->super.rx.dct); +- iface->super.rx.dct = NULL; ++ ibv_exp_destroy_dct(iface->super.rx_dct); ++ iface->super.rx_dct = NULL; + } + + uct_rc_iface_tag_cleanup(&iface->super.super); +@@ -1021,14 +1039,12 @@ static uct_dc_iface_ops_t uct_dc_verbs_iface_ops = { + .ep_am_short = uct_dc_verbs_ep_am_short, + .ep_am_bcopy = uct_dc_verbs_ep_am_bcopy, + .ep_am_zcopy = uct_dc_verbs_ep_am_zcopy, +- .ep_atomic_add64 = uct_dc_verbs_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_dc_verbs_ep_atomic_fadd64, +- .ep_atomic_swap64 = uct_dc_verbs_ep_atomic_swap64, + .ep_atomic_cswap64 = uct_dc_verbs_ep_atomic_cswap64, +- .ep_atomic_add32 = uct_dc_verbs_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_dc_verbs_ep_atomic_fadd32, +- .ep_atomic_swap32 = uct_dc_verbs_ep_atomic_swap32, ++ .ep_atomic64_post = uct_dc_verbs_ep_atomic64_post, ++ .ep_atomic64_fetch = uct_dc_verbs_ep_atomic64_fetch, + .ep_atomic_cswap32 = uct_dc_verbs_ep_atomic_cswap32, ++ .ep_atomic32_post = uct_dc_verbs_ep_atomic32_post, ++ .ep_atomic32_fetch = uct_dc_verbs_ep_atomic32_fetch, + .ep_pending_add = uct_dc_ep_pending_add, + .ep_pending_purge = uct_dc_ep_pending_purge, + .ep_flush = uct_dc_verbs_ep_flush, +@@ -1058,10 +1074,11 @@ static uct_dc_iface_ops_t uct_dc_verbs_iface_ops = { + .iface_is_reachable = uct_dc_iface_is_reachable, + .iface_get_address = uct_dc_iface_get_address + }, +- .arm_tx_cq = uct_ib_iface_arm_tx_cq, +- .arm_rx_cq = uct_ib_iface_arm_rx_cq, ++ .arm_cq = uct_ib_iface_arm_cq, ++ .event_cq = (void*)ucs_empty_function, + .handle_failure = uct_dc_verbs_handle_failure, +- .set_ep_failed = uct_dc_verbs_ep_set_failed ++ .set_ep_failed = uct_dc_verbs_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .fc_ctrl = uct_dc_verbs_ep_fc_ctrl, + .fc_handler = uct_dc_iface_fc_handler, +@@ -1094,6 +1111,7 @@ static UCS_CLASS_INIT_FUNC(uct_dc_verbs_iface_t, uct_md_h md, uct_worker_h worke + { + uct_dc_verbs_iface_config_t *config = ucs_derived_of(tl_config, + uct_dc_verbs_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + struct ibv_qp_init_attr dci_init_attr; + struct ibv_qp_attr dci_attr; + ucs_status_t status; +@@ -1102,9 +1120,11 @@ static UCS_CLASS_INIT_FUNC(uct_dc_verbs_iface_t, uct_md_h md, uct_worker_h worke + + ucs_trace_func(""); + ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ init_attr.tm_cap_bit = IBV_EXP_TM_CAP_DC; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_dc_iface_t, &uct_dc_verbs_iface_ops, md, +- worker, params, 0, &config->super, +- IBV_EXP_TM_CAP_DC); ++ worker, params, &config->super, &init_attr); + + uct_dc_verbs_iface_init_wrs(self); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.c +index ceed2f8e4..6e65f55db 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.c +@@ -17,166 +17,67 @@ + #include + + +-typedef struct uct_ib_mlx5_qp_info { +- uint32_t qpn; /* QP number */ +- volatile uint32_t *dbrec; /* QP doorbell record in RAM */ +- +- struct { +- void *buf; /* Work queue buffer */ +- unsigned wqe_cnt; /* Number of WQEs in the work queue */ +- unsigned stride; /* Size of each WQE */ +- } sq, rq; +- +- struct { +- void *reg; /* BlueFlame register */ +- unsigned size; /* BlueFlame register size (0 - unsupported) */ +- } bf; +-} uct_ib_mlx5_qp_info_t; +- +- +-typedef struct uct_ib_mlx5_srq_info { +- void *buf; /* SRQ queue buffer */ +- volatile uint32_t *dbrec; /* SRQ doorbell record in RAM */ +- unsigned stride; /* Size of each WQE */ +- unsigned head; +- unsigned tail; +-} uct_ib_mlx5_srq_info_t; +- +-static void UCS_F_MAYBE_UNUSED uct_ib_mlx5_obj_error(const char *obj_name) +-{ +- ucs_error("Failed to get mlx5 %s information. Please make sure the installed " +- "libmlx5 version matches the one UCX was compiled with (%s)", +- obj_name, LIB_MLX5_VER); +-} +- +-static ucs_status_t uct_ib_mlx5_get_qp_info(struct ibv_qp *qp, uct_ib_mlx5_qp_info_t *qp_info) +-{ +-#if HAVE_DECL_IBV_MLX5_EXP_GET_QP_INFO +- struct ibv_mlx5_qp_info ibv_qp_info; +- int ret; +- +- ret = ibv_mlx5_exp_get_qp_info(qp, &ibv_qp_info); +- if (ret != 0) { +- uct_ib_mlx5_obj_error("qp"); +- return UCS_ERR_NO_DEVICE; +- } +- +- qp_info->qpn = ibv_qp_info.qpn; +- qp_info->dbrec = ibv_qp_info.dbrec; +- qp_info->sq.buf = ibv_qp_info.sq.buf; +- qp_info->sq.wqe_cnt = ibv_qp_info.sq.wqe_cnt; +- qp_info->sq.stride = ibv_qp_info.sq.stride; +- qp_info->rq.buf = ibv_qp_info.rq.buf; +- qp_info->rq.wqe_cnt = ibv_qp_info.rq.wqe_cnt; +- qp_info->rq.stride = ibv_qp_info.rq.stride; +- qp_info->bf.reg = ibv_qp_info.bf.reg; +- qp_info->bf.size = ibv_qp_info.bf.size; +-#else +- struct mlx5_qp *mqp = ucs_container_of(qp, struct mlx5_qp, verbs_qp.qp); +- +- if ((mqp->sq.cur_post != 0) || (mqp->rq.head != 0)) { +- ucs_warn("cur_post=%d head=%d need_lock=%d", mqp->sq.cur_post, +- mqp->rq.head, mqp->bf->need_lock); +- return UCS_ERR_NO_DEVICE; +- } +- +- qp_info->qpn = qp->qp_num; +- qp_info->dbrec = mqp->db; +- qp_info->sq.buf = mqp->buf.buf + mqp->sq.offset; +- qp_info->sq.wqe_cnt = mqp->sq.wqe_cnt; +- qp_info->sq.stride = 1 << mqp->sq.wqe_shift; +- qp_info->rq.buf = mqp->buf.buf + mqp->rq.offset; +- qp_info->rq.wqe_cnt = mqp->rq.wqe_cnt; +- qp_info->rq.stride = 1 << mqp->rq.wqe_shift; +- qp_info->bf.reg = mqp->bf->reg; +- +- if (mqp->bf->uuarn > 0) { +- qp_info->bf.size = mqp->bf->buf_size; +- } else { +- qp_info->bf.size = 0; /* No BF */ +- } ++static const char *uct_ib_mlx5_mmio_modes[] = { ++ [UCT_IB_MLX5_MMIO_MODE_BF_POST] = "bf_post", ++ [UCT_IB_MLX5_MMIO_MODE_BF_POST_MT] = "bf_post_mt", ++ [UCT_IB_MLX5_MMIO_MODE_DB] = "db", ++ [UCT_IB_MLX5_MMIO_MODE_AUTO] = "auto", ++ [UCT_IB_MLX5_MMIO_MODE_LAST] = NULL ++}; ++ ++ucs_config_field_t uct_ib_mlx5_iface_config_table[] = { ++#if HAVE_IBV_EXP_DM ++ {"DM_SIZE", "2k", ++ "Device Memory segment size (0 - disabled)", ++ ucs_offsetof(uct_ib_mlx5_iface_config_t, dm.seg_len), UCS_CONFIG_TYPE_MEMUNITS}, ++ {"DM_COUNT", "1", ++ "Device Memory segments count (0 - disabled)", ++ ucs_offsetof(uct_ib_mlx5_iface_config_t, dm.count), UCS_CONFIG_TYPE_UINT}, + #endif +- return UCS_OK; +-} + +-static ucs_status_t uct_ib_mlx5_get_srq_info(struct ibv_srq *srq, +- uct_ib_mlx5_srq_info_t *srq_info) +-{ +-#if HAVE_DECL_IBV_MLX5_EXP_GET_SRQ_INFO +- struct ibv_mlx5_srq_info ibv_srq_info; +- int ret; ++ {"MMIO_MODE", "auto", ++ "How to write to MMIO register when posting sends on a QP. One of the following:\n" ++ " bf_post - BlueFlame post, write the WQE fully to MMIO register.\n" ++ " bf_post_mt - Thread-safe BlueFlame, same as bf_post but same MMIO register can be used\n" ++ " by multiple threads.\n" ++ " db - Doorbell mode, write only 8 bytes to MMIO register, followed by a memory\n" ++ " store fence, which makes sure the doorbell goes out on the bus.\n" ++ " auto - Select best according to worker thread mode.", ++ ucs_offsetof(uct_ib_mlx5_iface_config_t, mmio_mode), ++ UCS_CONFIG_TYPE_ENUM(uct_ib_mlx5_mmio_modes)}, + +- ret = ibv_mlx5_exp_get_srq_info(srq, &ibv_srq_info); +- if (ret != 0) { +- uct_ib_mlx5_obj_error("srq"); +- return UCS_ERR_NO_DEVICE; +- } +- +- srq_info->buf = ibv_srq_info.buf; +- srq_info->dbrec = ibv_srq_info.dbrec; +- srq_info->stride = ibv_srq_info.stride; +- srq_info->head = ibv_srq_info.head; +- srq_info->tail = ibv_srq_info.tail; +-#else +- struct mlx5_srq *msrq; +- +- if (srq->handle == LEGACY_XRC_SRQ_HANDLE) { +- srq = (struct ibv_srq *)(((struct ibv_srq_legacy *)srq)->ibv_srq); +- } +- +- msrq = ucs_container_of(srq, struct mlx5_srq, vsrq.srq); +- +- if (msrq->counter != 0) { +- ucs_error("SRQ counter is not 0 (%d)", msrq->counter); +- return UCS_ERR_NO_DEVICE; +- } +- +- srq_info->buf = msrq->buf.buf; +- srq_info->dbrec = msrq->db; +- srq_info->stride = 1 << msrq->wqe_shift; +- srq_info->head = msrq->head; +- srq_info->tail = msrq->tail; +-#endif +- return UCS_OK; +-} ++ {NULL} ++}; + + ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5_cq_t *mlx5_cq) + { ++ uct_ib_mlx5dv_cq_t dcq = {}; ++ uct_ib_mlx5dv_t obj = {}; ++ struct mlx5_cqe64 *cqe; + unsigned cqe_size; +-#if HAVE_DECL_IBV_MLX5_EXP_GET_CQ_INFO +- struct ibv_mlx5_cq_info ibv_cq_info; +- int ret; ++ ucs_status_t status; ++ int ret, i; + +- ret = ibv_mlx5_exp_get_cq_info(cq, &ibv_cq_info); +- if (ret != 0) { +- uct_ib_mlx5_obj_error("cq"); +- return UCS_ERR_NO_DEVICE; ++ obj.dv.cq.in = cq; ++ obj.dv.cq.out = &dcq.dv; ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_CQ); ++ if (status != UCS_OK) { ++ return UCS_ERR_IO_ERROR; + } + +- mlx5_cq->cq_buf = ibv_cq_info.buf; ++ mlx5_cq->cq_buf = dcq.dv.buf; + mlx5_cq->cq_ci = 0; +- mlx5_cq->cq_length = ibv_cq_info.cqe_cnt; +-#if ENABLE_DEBUG_DATA +- mlx5_cq->cq_num = ibv_cq_info.cqn; +-#endif +- cqe_size = ibv_cq_info.cqe_size; ++ mlx5_cq->cq_sn = 0; ++ mlx5_cq->cq_length = dcq.dv.cqe_cnt; ++ mlx5_cq->cq_num = dcq.dv.cqn; ++#if HAVE_STRUCT_MLX5DV_CQ_CQ_UAR ++ mlx5_cq->uar = dcq.dv.cq_uar; + #else +- struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); +- int ret; +- +- if (mcq->cons_index != 0) { +- ucs_error("CQ consumer index is not 0 (%d)", mcq->cons_index); +- return UCS_ERR_NO_DEVICE; +- } +- +- mlx5_cq->cq_buf = mcq->active_buf->buf; +- mlx5_cq->cq_ci = 0; +- mlx5_cq->cq_length = mcq->ibv_cq.cqe + 1; +-#if ENABLE_DEBUG_DATA +- mlx5_cq->cq_num = mcq->cqn; +-#endif +- cqe_size = mcq->cqe_sz; ++ /* coverity[var_deref_model] */ ++ mlx5_cq->uar = uct_dv_get_info_uar0(dcq.dv.uar); + #endif ++ mlx5_cq->dbrec = dcq.dv.dbrec; ++ cqe_size = dcq.dv.cqe_size; + + /* Move buffer forward for 128b CQE, so we would get pointer to the 2nd + * 64b when polling. +@@ -191,28 +92,18 @@ ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5_cq_t *mlx5_cq) + + mlx5_cq->cqe_size_log = ucs_ilog2(cqe_size); + ucs_assert_always((1<cqe_size_log) == cqe_size); +- return UCS_OK; +-} + +-void uct_ib_mlx5_update_cq_ci(struct ibv_cq *cq, unsigned cq_ci) +-{ +-#if HAVE_DECL_IBV_MLX5_EXP_UPDATE_CQ_CI +- ibv_mlx5_exp_update_cq_ci(cq, cq_ci); +-#else +- struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); +- mcq->cons_index = cq_ci; +-#endif +-} ++ /* Set owner bit for all CQEs, so that CQE would look like it is in HW ++ * ownership. In this case CQ polling functions will return immediately if ++ * no any CQE ready, there is no need to check opcode for ++ * MLX5_CQE_INVALID value anymore. */ ++ for (i = 0; i < mlx5_cq->cq_length; ++i) { ++ cqe = uct_ib_mlx5_get_cqe(mlx5_cq, i); ++ cqe->op_own |= MLX5_CQE_OWNER_MASK; ++ } + +-unsigned uct_ib_mlx5_get_cq_ci(struct ibv_cq *cq) +-{ +- struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); +- return mcq->cons_index; +-} + +-void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av) +-{ +- memcpy(av, &ucs_container_of(ah, struct mlx5_ah, ibv_ah)->av, sizeof(*av)); ++ return UCS_OK; + } + + ucs_status_t uct_ib_mlx5_get_compact_av(uct_ib_iface_t *iface, int *compact_av) +@@ -233,13 +124,13 @@ ucs_status_t uct_ib_mlx5_get_compact_av(uct_ib_iface_t *iface, int *compact_av) + } + + uct_ib_iface_fill_ah_attr_from_addr(iface, ib_addr, iface->path_bits[0], &ah_attr); ++ ah_attr.is_global = iface->is_global_addr; + status = uct_ib_iface_create_ah(iface, &ah_attr, &ah); + if (status != UCS_OK) { + return status; + } + + uct_ib_mlx5_get_av(ah, &mlx5_av); +- ibv_destroy_ah(ah); + + /* copy MLX5_EXTENDED_UD_AV from the driver, if the flag is not present then + * the device supports compact address vector. */ +@@ -247,7 +138,6 @@ ucs_status_t uct_ib_mlx5_get_compact_av(uct_ib_iface_t *iface, int *compact_av) + return UCS_OK; + } + +- + void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, + struct mlx5_cqe64 *cqe) + { +@@ -258,14 +148,15 @@ void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, + /* update ci before invoking error callback, since it can poll on cq */ + UCS_STATIC_ASSERT(MLX5_CQE_REQ_ERR & (UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK >> 4)); + ++cq->cq_ci; +- status = uct_ib_mlx5_completion_with_err((void*)cqe, UCS_LOG_LEVEL_DEBUG); ++ status = uct_ib_mlx5_completion_with_err(iface, (void*)cqe, ++ UCS_LOG_LEVEL_DEBUG); + iface->ops->handle_failure(iface, cqe, status); + return; + case MLX5_CQE_RESP_ERR: + /* Local side failure - treat as fatal */ + UCS_STATIC_ASSERT(MLX5_CQE_RESP_ERR & (UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK >> 4)); + ++cq->cq_ci; +- uct_ib_mlx5_completion_with_err((void*)cqe, UCS_LOG_LEVEL_FATAL); ++ uct_ib_mlx5_completion_with_err(iface, (void*)cqe, UCS_LOG_LEVEL_FATAL); + return; + default: + /* CQE might have been updated by HW. Skip it now, and it would be handled +@@ -274,74 +165,106 @@ void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, + } + } + +-static int uct_ib_mlx5_bf_cmp(uct_ib_mlx5_bf_t *bf, uintptr_t addr, unsigned bf_size) ++static int uct_ib_mlx5_mmio_cmp(uct_ib_mlx5_mmio_reg_t *reg, uintptr_t addr, ++ unsigned bf_size) + { +- return ((bf->reg.addr & ~UCT_IB_MLX5_BF_REG_SIZE) == (addr & ~UCT_IB_MLX5_BF_REG_SIZE)); ++ return (reg->addr.uint & ~UCT_IB_MLX5_BF_REG_SIZE) == ++ (addr & ~UCT_IB_MLX5_BF_REG_SIZE); + } + +-static void uct_ib_mlx5_bf_init(uct_ib_mlx5_bf_t *bf, uintptr_t addr, unsigned bf_size) ++static ucs_status_t uct_ib_mlx5_mmio_init(uct_ib_mlx5_mmio_reg_t *reg, ++ uintptr_t addr, ++ uct_ib_mlx5_mmio_mode_t mmio_mode) + { +- bf->reg.addr = addr; +- bf->enable_bf = bf_size; ++ reg->addr.uint = addr; ++ reg->mode = mmio_mode; ++ return UCS_OK; + } + +-static void uct_ib_mlx5_bf_cleanup(uct_ib_mlx5_bf_t *bf) ++static void uct_ib_mlx5_mmio_cleanup(uct_ib_mlx5_mmio_reg_t *reg) + { + } + + void uct_ib_mlx5_txwq_reset(uct_ib_mlx5_txwq_t *txwq) + { +- txwq->curr = txwq->qstart; +- txwq->sw_pi = txwq->prev_sw_pi = 0; ++ txwq->curr = txwq->qstart; ++ txwq->sw_pi = 0; ++ txwq->prev_sw_pi = -1; + #if ENABLE_ASSERT +- txwq->hw_ci = 0xFFFF; ++ txwq->hw_ci = 0xFFFF; + #endif + memset(txwq->qstart, 0, txwq->qend - txwq->qstart); + } + + ucs_status_t uct_ib_mlx5_txwq_init(uct_priv_worker_t *worker, ++ uct_ib_mlx5_mmio_mode_t cfg_mmio_mode, + uct_ib_mlx5_txwq_t *txwq, + struct ibv_qp *verbs_qp) + { +- uct_ib_mlx5_qp_info_t qp_info; ++ uct_ib_mlx5_mmio_mode_t mmio_mode; ++ uct_ib_mlx5dv_qp_t qp_info = {}; ++ uct_ib_mlx5dv_t obj = {}; + ucs_status_t status; + +- status = uct_ib_mlx5_get_qp_info(verbs_qp, &qp_info); ++ obj.dv.qp.in = verbs_qp; ++ obj.dv.qp.out = &qp_info.dv; ++ ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_QP); + if (status != UCS_OK) { + return UCS_ERR_IO_ERROR; + } + +- if ((qp_info.sq.stride != MLX5_SEND_WQE_BB) || !ucs_is_pow2(qp_info.sq.wqe_cnt) || +- ((qp_info.bf.size != 0) && (qp_info.bf.size != UCT_IB_MLX5_BF_REG_SIZE))) ++ if ((qp_info.dv.sq.stride != MLX5_SEND_WQE_BB) || !ucs_is_pow2(qp_info.dv.sq.wqe_cnt) || ++ ((qp_info.dv.bf.size != 0) && (qp_info.dv.bf.size != UCT_IB_MLX5_BF_REG_SIZE))) + { + ucs_error("mlx5 device parameters not suitable for transport " + "bf.size(%d) %d, sq.stride(%d) %d, wqe_cnt %d", +- UCT_IB_MLX5_BF_REG_SIZE, qp_info.bf.size, +- MLX5_SEND_WQE_BB, qp_info.sq.stride, qp_info.sq.wqe_cnt); ++ UCT_IB_MLX5_BF_REG_SIZE, qp_info.dv.bf.size, ++ MLX5_SEND_WQE_BB, qp_info.dv.sq.stride, qp_info.dv.sq.wqe_cnt); + return UCS_ERR_IO_ERROR; + } + +- ucs_debug("tx wq %d bytes [bb=%d, nwqe=%d]", +- qp_info.sq.stride * qp_info.sq.wqe_cnt, +- qp_info.sq.stride, qp_info.sq.wqe_cnt); ++ if (cfg_mmio_mode != UCT_IB_MLX5_MMIO_MODE_AUTO) { ++ mmio_mode = cfg_mmio_mode; ++ } else if (qp_info.dv.bf.size > 0) { ++ if (worker->thread_mode == UCS_THREAD_MODE_SINGLE) { ++ mmio_mode = UCT_IB_MLX5_MMIO_MODE_BF_POST; ++ } else if (worker->thread_mode == UCS_THREAD_MODE_SERIALIZED) { ++ mmio_mode = UCT_IB_MLX5_MMIO_MODE_BF_POST_MT; ++ } else { ++ ucs_error("unsupported thread mode for mlx5: %d", worker->thread_mode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ } else { ++ mmio_mode = UCT_IB_MLX5_MMIO_MODE_DB; ++ } + +- txwq->qstart = qp_info.sq.buf; +- txwq->qend = qp_info.sq.buf + (qp_info.sq.stride * qp_info.sq.wqe_cnt); +- txwq->bf = uct_worker_tl_data_get(worker, ++ ucs_debug("tx wq %d bytes [bb=%d, nwqe=%d] mmio_mode %s", ++ qp_info.dv.sq.stride * qp_info.dv.sq.wqe_cnt, ++ qp_info.dv.sq.stride, qp_info.dv.sq.wqe_cnt, ++ uct_ib_mlx5_mmio_modes[mmio_mode]); ++ ++ txwq->qstart = qp_info.dv.sq.buf; ++ txwq->qend = qp_info.dv.sq.buf + (qp_info.dv.sq.stride * qp_info.dv.sq.wqe_cnt); ++ txwq->reg = uct_worker_tl_data_get(worker, + UCT_IB_MLX5_WORKER_BF_KEY, +- uct_ib_mlx5_bf_t, +- uct_ib_mlx5_bf_cmp, +- uct_ib_mlx5_bf_init, +- (uintptr_t)qp_info.bf.reg, +- qp_info.bf.size); +- txwq->dbrec = &qp_info.dbrec[MLX5_SND_DBR]; ++ uct_ib_mlx5_mmio_reg_t, ++ uct_ib_mlx5_mmio_cmp, ++ uct_ib_mlx5_mmio_init, ++ (uintptr_t)qp_info.dv.bf.reg, ++ mmio_mode); ++ if (UCS_PTR_IS_ERR(txwq->reg)) { ++ return UCS_PTR_STATUS(txwq->reg); ++ } ++ ++ txwq->dbrec = &qp_info.dv.dbrec[MLX5_SND_DBR]; + /* need to reserve 2x because: + * - on completion we only get the index of last wqe and we do not + * really know how many bb is there (but no more than max bb + * - on send we check that there is at least one bb. We know + * exact number of bbs once we actually are sending. + */ +- txwq->bb_max = qp_info.sq.wqe_cnt - 2 * UCT_IB_MLX5_MAX_BB; ++ txwq->bb_max = qp_info.dv.sq.wqe_cnt - 2 * UCT_IB_MLX5_MAX_BB; + ucs_assert_always(txwq->bb_max > 0); + + uct_ib_mlx5_txwq_reset(txwq); +@@ -350,32 +273,36 @@ ucs_status_t uct_ib_mlx5_txwq_init(uct_priv_worker_t *worker, + + void uct_ib_mlx5_txwq_cleanup(uct_ib_mlx5_txwq_t* txwq) + { +- uct_worker_tl_data_put(txwq->bf, uct_ib_mlx5_bf_cleanup); ++ uct_worker_tl_data_put(txwq->reg, uct_ib_mlx5_mmio_cleanup); + } + + ucs_status_t uct_ib_mlx5_get_rxwq(struct ibv_qp *verbs_qp, uct_ib_mlx5_rxwq_t *rxwq) + { +- uct_ib_mlx5_qp_info_t qp_info; ++ uct_ib_mlx5dv_qp_t qp_info = {}; ++ uct_ib_mlx5dv_t obj = {}; + ucs_status_t status; + +- status = uct_ib_mlx5_get_qp_info(verbs_qp, &qp_info); ++ obj.dv.qp.in = verbs_qp; ++ obj.dv.qp.out = &qp_info.dv; ++ ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_QP); + if (status != UCS_OK) { + return UCS_ERR_IO_ERROR; + } + +- if (!ucs_is_pow2(qp_info.rq.wqe_cnt) || +- qp_info.rq.stride != sizeof(struct mlx5_wqe_data_seg)) { ++ if (!ucs_is_pow2(qp_info.dv.rq.wqe_cnt) || ++ qp_info.dv.rq.stride != sizeof(struct mlx5_wqe_data_seg)) { + ucs_error("mlx5 rx wq [count=%d stride=%d] has invalid parameters", +- qp_info.rq.wqe_cnt, +- qp_info.rq.stride); ++ qp_info.dv.rq.wqe_cnt, ++ qp_info.dv.rq.stride); + return UCS_ERR_IO_ERROR; + } +- rxwq->wqes = qp_info.rq.buf; ++ rxwq->wqes = qp_info.dv.rq.buf; + rxwq->rq_wqe_counter = 0; + rxwq->cq_wqe_counter = 0; +- rxwq->mask = qp_info.rq.wqe_cnt - 1; +- rxwq->dbrec = &qp_info.dbrec[MLX5_RCV_DBR]; +- memset(rxwq->wqes, 0, qp_info.rq.wqe_cnt * sizeof(struct mlx5_wqe_data_seg)); ++ rxwq->mask = qp_info.dv.rq.wqe_cnt - 1; ++ rxwq->dbrec = &qp_info.dv.dbrec[MLX5_RCV_DBR]; ++ memset(rxwq->wqes, 0, qp_info.dv.rq.wqe_cnt * sizeof(struct mlx5_wqe_data_seg)); + + return UCS_OK; + } +@@ -383,41 +310,45 @@ ucs_status_t uct_ib_mlx5_get_rxwq(struct ibv_qp *verbs_qp, uct_ib_mlx5_rxwq_t *r + ucs_status_t uct_ib_mlx5_srq_init(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_srq, + size_t sg_byte_count) + { +- uct_ib_mlx5_srq_info_t srq_info; ++ uct_ib_mlx5dv_srq_t srq_info = {}; + uct_ib_mlx5_srq_seg_t *seg; ++ uct_ib_mlx5dv_t obj = {}; + ucs_status_t status; + unsigned i; + +- status = uct_ib_mlx5_get_srq_info(verbs_srq, &srq_info); ++ obj.dv.srq.in = verbs_srq; ++ obj.dv.srq.out = &srq_info.dv; ++ ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_SRQ); + if (status != UCS_OK) { + return status; + } + +- if (srq_info.head != 0) { +- ucs_error("SRQ head is not 0 (%d)", srq_info.head); ++ if (srq_info.dv.head != 0) { ++ ucs_error("SRQ head is not 0 (%d)", srq_info.dv.head); + return UCS_ERR_NO_DEVICE; + } + +- if (srq_info.stride != UCT_IB_MLX5_SRQ_STRIDE) { ++ if (srq_info.dv.stride != UCT_IB_MLX5_SRQ_STRIDE) { + ucs_error("SRQ stride is not %lu (%d)", UCT_IB_MLX5_SRQ_STRIDE, +- srq_info.stride); ++ srq_info.dv.stride); + return UCS_ERR_NO_DEVICE; + } + +- if (!ucs_is_pow2(srq_info.tail + 1)) { +- ucs_error("SRQ length is not power of 2 (%d)", srq_info.tail + 1); ++ if (!ucs_is_pow2(srq_info.dv.tail + 1)) { ++ ucs_error("SRQ length is not power of 2 (%d)", srq_info.dv.tail + 1); + return UCS_ERR_NO_DEVICE; + } + +- srq->buf = srq_info.buf; +- srq->db = srq_info.dbrec; +- srq->free_idx = srq_info.tail; ++ srq->buf = srq_info.dv.buf; ++ srq->db = srq_info.dv.dbrec; ++ srq->free_idx = srq_info.dv.tail; + srq->ready_idx = -1; + srq->sw_pi = -1; +- srq->mask = srq_info.tail; +- srq->tail = srq_info.tail; ++ srq->mask = srq_info.dv.tail; ++ srq->tail = srq_info.dv.tail; + +- for (i = srq_info.head; i <= srq_info.tail; ++i) { ++ for (i = srq_info.dv.head; i <= srq_info.dv.tail; ++i) { + seg = uct_ib_mlx5_srq_get_wqe(srq, i); + seg->srq.free = 0; + seg->srq.desc = NULL; +@@ -429,11 +360,15 @@ ucs_status_t uct_ib_mlx5_srq_init(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_ + + void uct_ib_mlx5_srq_cleanup(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_srq) + { +- uct_ib_mlx5_srq_info_t srq_info; ++ uct_ib_mlx5dv_srq_t srq_info = {}; ++ uct_ib_mlx5dv_t obj = {}; + ucs_status_t status; + +- status = uct_ib_mlx5_get_srq_info(verbs_srq, &srq_info); ++ obj.dv.srq.in = verbs_srq; ++ obj.dv.srq.out = &srq_info.dv; ++ ++ status = uct_ib_mlx5dv_init_obj(&obj, MLX5DV_OBJ_SRQ); + ucs_assert_always(status == UCS_OK); +- ucs_assertv_always(srq->tail == srq_info.tail, "srq->tail=%d srq_info.tail=%d", +- srq->tail, srq_info.tail); ++ ucs_assertv_always(srq->tail == srq_info.dv.tail, "srq->tail=%d srq_info.tail=%d", ++ srq->tail, srq_info.dv.tail); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.h +index 372fc68fc..10c76720f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.h +@@ -16,7 +16,30 @@ + #include + #include + +-#include ++/** ++ * When using a clang version that is higher than 3.0, the GNUC_MINOR is set ++ * to 2, which affects the offset of several fields that are used by UCX from ++ * the liblmlx5 library (from the mlx5_qp struct). ++ * According to libmlx5, resetting the GNUC_MINOR version to 3, will make the ++ * offset of these fields inside libmlx5 (when compiled with GCC) the same as ++ * the one used by UCX (when compiled with clang). ++ */ ++#ifdef __clang__ ++# define CLANG_VERSION ( __clang_major__ * 100 + __clang_minor__) ++# if CLANG_VERSION >= 300 ++# undef __GNUC_MINOR__ ++# define __GNUC_MINOR__ 3 ++# endif ++#endif ++ ++#if HAVE_INFINIBAND_MLX5DV_H ++# include ++#else ++# include ++# include "ib_mlx5_hw.h" ++#endif ++#include "ib_mlx5_dv.h" ++ + #include + #include + #include +@@ -29,10 +52,17 @@ + #define UCT_IB_MLX5_CQE128_SIZE_LOG 7 + #define UCT_IB_MLX5_MAX_BB 4 + #define UCT_IB_MLX5_WORKER_BF_KEY 0x00c1b7e8u ++#define UCT_IB_MLX5_RES_DOMAIN_KEY 0x1b1bda7aU ++#define UCT_IB_MLX5_WORKER_DM_KEY 0xacdf1245u + #define UCT_IB_MLX5_EXTENDED_UD_AV 0x80 /* htonl(0x80000000) */ ++#define UCT_IB_MLX5_AV_GRH_PRESENT 0x40 /* htonl(UCS_BIT(30)) */ + #define UCT_IB_MLX5_BF_REG_SIZE 256 + #define UCT_IB_MLX5_CQE_VENDOR_SYND_ODP 0x93 + #define UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK 0x80 ++#define UCT_IB_MLX5_MAX_SEND_WQE_SIZE (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB) ++#define UCT_IB_MLX5_CQ_SET_CI 0 ++#define UCT_IB_MLX5_CQ_ARM_DB 1 ++#define UCT_IB_MLX5_ROCE_SRC_PORT_MIN 0xC000 + + + #define UCT_IB_MLX5_OPMOD_EXT_ATOMIC(_log_arg_size) \ +@@ -51,9 +81,11 @@ + /* do not use direct cast from address of reserved0 to avoid compilation warnings */ + # define mlx5_av_grh(_av) ((struct mlx5_grh_av *)(((char*)(_av)) + \ + ucs_offsetof(struct mlx5_wqe_av, reserved0[0]))) +-# define UCT_IB_MLX5_AV_BASE_SIZE sizeof(struct mlx5_wqe_av) ++# define UCT_IB_MLX5_AV_BASE_SIZE ucs_offsetof(struct mlx5_wqe_av, reserved0[0]) + # define UCT_IB_MLX5_AV_FULL_SIZE sizeof(struct mlx5_wqe_av) + ++# define mlx5_base_av mlx5_wqe_av ++ + struct mlx5_grh_av { + uint8_t reserved0[4]; + uint8_t rmac[6]; +@@ -72,7 +104,7 @@ struct mlx5_grh_av { + #define UCT_IB_MLX5_AM_ZCOPY_MAX_IOV 3UL + + #define UCT_IB_MLX5_AM_MAX_SHORT(_av_size) \ +- (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB - \ ++ (UCT_IB_MLX5_MAX_SEND_WQE_SIZE - \ + (sizeof(struct mlx5_wqe_ctrl_seg) + \ + (_av_size) + \ + sizeof(struct mlx5_wqe_inl_data_seg))) +@@ -87,6 +119,28 @@ struct mlx5_grh_av { + #define UCT_IB_MLX5_SRQ_STRIDE (sizeof(struct mlx5_wqe_srq_next_seg) + \ + sizeof(struct mlx5_wqe_data_seg)) + ++typedef enum { ++ UCT_IB_MLX5_MMIO_MODE_BF_POST, /* BF without flush, can be used only from ++ one thread */ ++ UCT_IB_MLX5_MMIO_MODE_BF_POST_MT, /* BF with order, can be used by multiple ++ serialized threads */ ++ UCT_IB_MLX5_MMIO_MODE_DB, /* 8-byte doorbell (with the mandatory flush) */ ++ UCT_IB_MLX5_MMIO_MODE_AUTO, /* Auto-select according to driver/HW capabilities ++ and multi-thread support level */ ++ UCT_IB_MLX5_MMIO_MODE_LAST ++} uct_ib_mlx5_mmio_mode_t; ++ ++ ++typedef struct uct_ib_mlx5_iface_config { ++#if HAVE_IBV_EXP_DM ++ struct { ++ size_t seg_len; ++ unsigned count; ++ } dm; ++#endif ++ uct_ib_mlx5_mmio_mode_t mmio_mode; ++} uct_ib_mlx5_iface_config_t; ++ + + /* Shared receive queue */ + typedef struct uct_ib_mlx5_srq { +@@ -104,30 +158,31 @@ typedef struct uct_ib_mlx5_srq { + typedef struct uct_ib_mlx5_cq { + void *cq_buf; + unsigned cq_ci; ++ unsigned cq_sn; + unsigned cq_length; + unsigned cqe_size_log; +-#if ENABLE_DEBUG_DATA + unsigned cq_num; +-#endif ++ void *uar; ++ volatile uint32_t *dbrec; + } uct_ib_mlx5_cq_t; + + + /* Blue flame register */ +-typedef struct uct_ib_mlx5_bf { ++typedef struct uct_ib_mlx5_mmio_reg { + uct_worker_tl_data_t super; + union { + void *ptr; +- uintptr_t addr; +- } reg; +- unsigned enable_bf; /* BF/DB method selector. DB used if zero */ +-} uct_ib_mlx5_bf_t; ++ uintptr_t uint; ++ } addr; ++ uct_ib_mlx5_mmio_mode_t mode; ++} uct_ib_mlx5_mmio_reg_t; + + + /* Send work-queue */ + typedef struct uct_ib_mlx5_txwq { + uint16_t sw_pi; /* PI for next WQE */ + uint16_t prev_sw_pi; /* PI where last WQE *started* */ +- uct_ib_mlx5_bf_t *bf; ++ uct_ib_mlx5_mmio_reg_t *reg; + void *curr; + volatile uint32_t *dbrec; + void *qstart; +@@ -163,6 +218,21 @@ typedef struct uct_ib_mlx5_base_av { + } UCS_S_PACKED uct_ib_mlx5_base_av_t; + + ++typedef struct uct_ib_mlx5_err_cqe { ++ uint8_t rsvd0[32]; ++ uint32_t srqn; ++ uint8_t rsvd1[16]; ++ uint8_t hw_err_synd; ++ uint8_t hw_synd_type; ++ uint8_t vendor_err_synd; ++ uint8_t syndrome; ++ uint32_t s_wqe_opcode_qpn; ++ uint16_t wqe_counter; ++ uint8_t signature; ++ uint8_t op_own; ++} UCS_S_PACKED uct_ib_mlx5_err_cqe_t; ++ ++ + /** + * SRQ segment + * +@@ -208,31 +278,29 @@ struct uct_ib_mlx5_atomic_masked_cswap64_seg { + } UCS_S_PACKED; + + +-/** +- * Get internal CQ information. +- */ +-ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5_cq_t *mlx5_cq); ++struct uct_ib_mlx5_atomic_masked_fadd64_seg { ++ uint64_t add; ++ uint64_t filed_boundary; ++} UCS_S_PACKED; + +-/** +- * Update CI to support req_notify_cq +- */ +-void uct_ib_mlx5_update_cq_ci(struct ibv_cq *cq, unsigned cq_ci); + +-/** +- * Retrieve CI from the driver +- */ +-unsigned uct_ib_mlx5_get_cq_ci(struct ibv_cq *cq); ++extern ucs_config_field_t uct_ib_mlx5_iface_config_table[]; + + /** +- * Get internal AV information. ++ * Get internal CQ information. + */ +-void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av); ++ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5_cq_t *mlx5_cq); + + /** + * Get flag indicating compact AV support. + */ + ucs_status_t uct_ib_mlx5_get_compact_av(uct_ib_iface_t *iface, int *compact_av); + ++/** ++ * Requests completion notification. ++ */ ++int uct_ib_mlx5dv_arm_cq(uct_ib_mlx5_cq_t *cq, int solicited); ++ + /** + * Check for completion with error. + */ +@@ -242,8 +310,9 @@ void uct_ib_mlx5_check_completion(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq, + /** + * Initialize txwq structure. + */ +-ucs_status_t uct_ib_mlx5_txwq_init(uct_priv_worker_t *worker, uct_ib_mlx5_txwq_t *txwq, +- struct ibv_qp *verbs_qp); ++ucs_status_t uct_ib_mlx5_txwq_init(uct_priv_worker_t *worker, ++ uct_ib_mlx5_mmio_mode_t cfg_mmio_mode, ++ uct_ib_mlx5_txwq_t *txwq, struct ibv_qp *verbs_qp); + void uct_ib_mlx5_txwq_cleanup(uct_ib_mlx5_txwq_t* txwq); + + /** +@@ -263,5 +332,4 @@ ucs_status_t uct_ib_mlx5_srq_init(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_ + size_t sg_byte_count); + void uct_ib_mlx5_srq_cleanup(uct_ib_mlx5_srq_t *srq, struct ibv_srq *verbs_srq); + +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.inl b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.inl +index ab802015a..3efe75930 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.inl ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5.inl +@@ -13,6 +13,12 @@ uct_ib_mlx5_get_cqe(uct_ib_mlx5_cq_t *cq, unsigned index) + return cq->cq_buf + ((index & (cq->cq_length - 1)) << cq->cqe_size_log); + } + ++static UCS_F_ALWAYS_INLINE int ++uct_ib_mlx5_cqe_is_hw_owned(uint8_t op_own, unsigned index, unsigned mask) ++{ ++ return (op_own & MLX5_CQE_OWNER_MASK) == !(index & mask); ++} ++ + static UCS_F_ALWAYS_INLINE struct mlx5_cqe64* + uct_ib_mlx5_poll_cq(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq) + { +@@ -24,13 +30,12 @@ uct_ib_mlx5_poll_cq(uct_ib_iface_t *iface, uct_ib_mlx5_cq_t *cq) + cqe = uct_ib_mlx5_get_cqe(cq, index); + op_own = cqe->op_own; + +- if (ucs_unlikely((op_own & MLX5_CQE_OWNER_MASK) == !(index & cq->cq_length))) { ++ if (ucs_unlikely(uct_ib_mlx5_cqe_is_hw_owned(op_own, index, cq->cq_length))) { + return NULL; +- } else if (ucs_unlikely(op_own & 0x80)) { ++ } else if (ucs_unlikely(op_own & UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK)) { + UCS_STATIC_ASSERT(MLX5_CQE_INVALID & (UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK >> 4)); +- if (ucs_unlikely((op_own >> 4) != MLX5_CQE_INVALID)) { +- uct_ib_mlx5_check_completion(iface, cq, cqe); +- } ++ ucs_assert((op_own >> 4) != MLX5_CQE_INVALID); ++ uct_ib_mlx5_check_completion(iface, cq, cqe); + return NULL; /* No CQE */ + } + +@@ -196,12 +201,14 @@ uct_ib_mlx5_ep_set_rdma_seg(struct mlx5_wqe_raddr_seg *raddr, uint64_t rdma_radd + static UCS_F_ALWAYS_INLINE void + uct_ib_mlx5_set_dgram_seg(struct mlx5_wqe_datagram_seg *seg, + uct_ib_mlx5_base_av_t *av, struct mlx5_grh_av *grh_av, +- enum ibv_qp_type qp_type) ++ int qp_type) + { + if (qp_type == IBV_QPT_UD) { + mlx5_av_base(&seg->av)->key.qkey.qkey = htonl(UCT_IB_KEY); +- } else if (qp_type == IBV_EXP_QPT_DC_INI) { ++#if HAVE_TL_DC ++ } else if (qp_type == UCT_IB_QPT_DCI) { + mlx5_av_base(&seg->av)->key.dc_key = htobe64(UCT_IB_KEY); ++#endif + } + mlx5_av_base(&seg->av)->dqp_dct = av->dqp_dct; + mlx5_av_base(&seg->av)->stat_rate_sl = av->stat_rate_sl; +@@ -355,20 +362,36 @@ static UCS_F_ALWAYS_INLINE void uct_ib_mlx5_bf_copy_bb(void * restrict dst, + void * restrict src) + { + #if defined( __SSE4_2__) +- UCS_WORD_COPY(dst, src, __m128i, MLX5_SEND_WQE_BB); ++ UCS_WORD_COPY(__m128i, dst, __m128i, src, MLX5_SEND_WQE_BB); + #elif defined(__ARM_NEON) +- UCS_WORD_COPY(dst, src, int16x8_t, MLX5_SEND_WQE_BB); ++ UCS_WORD_COPY(int16x8_t, dst, int16x8_t, src, MLX5_SEND_WQE_BB); + #else /* NO SIMD support */ +- UCS_WORD_COPY(dst, src, uint64_t, MLX5_SEND_WQE_BB); ++ UCS_WORD_COPY(uint64_t, dst, uint64_t, src, MLX5_SEND_WQE_BB); + #endif + } + ++static UCS_F_ALWAYS_INLINE ++void *uct_ib_mlx5_bf_copy(void *dst, void *src, uint16_t num_bb, ++ const uct_ib_mlx5_txwq_t *wq) ++{ ++ uint16_t n; ++ ++ for (n = 0; n < num_bb; ++n) { ++ uct_ib_mlx5_bf_copy_bb(dst, src); ++ dst += MLX5_SEND_WQE_BB; ++ src += MLX5_SEND_WQE_BB; ++ if (ucs_unlikely(src == wq->qend)) { ++ src = wq->qstart; ++ } ++ } ++ return src; ++} + + static UCS_F_ALWAYS_INLINE uint16_t + uct_ib_mlx5_post_send(uct_ib_mlx5_txwq_t *wq, + struct mlx5_wqe_ctrl_seg *ctrl, unsigned wqe_size) + { +- uint16_t n, sw_pi, num_bb; ++ uint16_t sw_pi, num_bb, res_count; + void *src, *dst; + + ucs_assert(((unsigned long)ctrl % UCT_IB_MLX5_WQE_SEG_SIZE) == 0); +@@ -386,24 +409,23 @@ uct_ib_mlx5_post_send(uct_ib_mlx5_txwq_t *wq, + ucs_memory_bus_store_fence(); + + /* Set up copy pointers */ +- dst = wq->bf->reg.ptr; ++ dst = wq->reg->addr.ptr; + src = ctrl; + + ucs_assert(wqe_size <= UCT_IB_MLX5_BF_REG_SIZE); + ucs_assert(num_bb <= UCT_IB_MLX5_MAX_BB); +- if (ucs_likely(wq->bf->enable_bf)) { +- /* BF copy */ +- for (n = 0; n < num_bb; ++n) { +- uct_ib_mlx5_bf_copy_bb(dst, src); +- dst += MLX5_SEND_WQE_BB; +- src += MLX5_SEND_WQE_BB; +- if (ucs_unlikely(src == wq->qend)) { +- src = wq->qstart; +- } +- } ++ if (ucs_likely(wq->reg->mode == UCT_IB_MLX5_MMIO_MODE_BF_POST)) { ++ src = uct_ib_mlx5_bf_copy(dst, src, num_bb, wq); ++ ucs_memory_bus_wc_flush(); ++ } else if (wq->reg->mode == UCT_IB_MLX5_MMIO_MODE_BF_POST_MT) { ++ src = uct_ib_mlx5_bf_copy(dst, src, num_bb, wq); ++ /* Make sure that HW observes WC writes in order, in case of multiple ++ * threads which use the same BF register in a serialized way ++ */ ++ ucs_memory_cpu_wc_fence(); + } else { +- /* DB copy */ +- *(volatile uint64_t *)dst = *(volatile uint64_t *)src; ++ ucs_assert(wq->reg->mode == UCT_IB_MLX5_MMIO_MODE_DB); ++ *(volatile uint64_t*)dst = *(volatile uint64_t*)src; + ucs_memory_bus_store_fence(); + src = uct_ib_mlx5_txwq_wrap_any(wq, src + (num_bb * MLX5_SEND_WQE_BB)); + } +@@ -411,15 +433,22 @@ uct_ib_mlx5_post_send(uct_ib_mlx5_txwq_t *wq, + /* We don't want the compiler to reorder instructions and hurt latency */ + ucs_compiler_fence(); + +- /* Advance queue pointer */ ++ /* ++ * Advance queue pointer. ++ * We return the number of BBs the *previous* WQE has consumed, since CQEs ++ * are reporting the index of the first BB rather than the last. We have ++ * reserved QP space for at least UCT_IB_MLX5_MAX_BB to accommodate. ++ * */ + ucs_assert(ctrl == wq->curr); +- wq->curr = src; +- wq->prev_sw_pi = wq->sw_pi; +- wq->sw_pi = sw_pi; ++ res_count = wq->sw_pi - wq->prev_sw_pi; ++ wq->curr = src; ++ wq->prev_sw_pi += res_count; ++ ucs_assert(wq->prev_sw_pi == wq->sw_pi); ++ wq->sw_pi = sw_pi; + + /* Flip BF register */ +- wq->bf->reg.addr ^= UCT_IB_MLX5_BF_REG_SIZE; +- return num_bb; ++ wq->reg->addr.uint ^= UCT_IB_MLX5_BF_REG_SIZE; ++ return res_count; + } + + +@@ -429,3 +458,18 @@ uct_ib_mlx5_srq_get_wqe(uct_ib_mlx5_srq_t *srq, uint16_t index) + ucs_assert(index <= srq->mask); + return srq->buf + index * UCT_IB_MLX5_SRQ_STRIDE; + } ++ ++static inline void uct_ib_mlx5_iface_set_av_sport(uct_ib_iface_t *iface, ++ uct_ib_mlx5_base_av_t *av, ++ uint32_t flow_id) ++{ ++ uint16_t sport; ++ ++ if (!IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface)) || ++ (ntohs(av->rlid) >= UCT_IB_MLX5_ROCE_SRC_PORT_MIN)) { ++ return; ++ } ++ ++ sport = flow_id ^ (flow_id >> 16); ++ av->rlid = htons(UCT_IB_MLX5_ROCE_SRC_PORT_MIN | sport); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.c +new file mode 100644 +index 000000000..cd1652c15 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.c +@@ -0,0 +1,123 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "ib_mlx5.h" ++#include "ib_mlx5_log.h" ++ ++#if HAVE_DECL_MLX5DV_INIT_OBJ ++ucs_status_t uct_ib_mlx5dv_init_obj(uct_ib_mlx5dv_t *obj, uint64_t type) ++{ ++ int ret; ++ ++ ret = mlx5dv_init_obj(&obj->dv, type); ++ if (ret != 0) { ++ ucs_error("DV failed to get mlx5 information. Type %lx.", type); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ return UCS_OK; ++} ++#endif ++ ++#if HAVE_DC_DV ++static ucs_status_t uct_ib_mlx5_device_init(uct_ib_device_t *dev) ++{ ++ struct ibv_context *ctx = dev->ibv_context; ++ struct ibv_qp_init_attr_ex qp_attr = {}; ++ struct mlx5dv_qp_init_attr dv_attr = {}; ++ ucs_status_t status = UCS_OK; ++ struct ibv_pd *pd; ++ struct ibv_cq *cq; ++ struct ibv_qp *qp; ++ ++ if (!(uct_ib_device_spec(dev)->flags & UCT_IB_DEVICE_FLAG_MLX5_PRM)) { ++ return UCS_OK; ++ } ++ ++ pd = ibv_alloc_pd(ctx); ++ if (pd == NULL) { ++ ucs_error("ibv_alloc_pd() failed: %m"); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ cq = ibv_create_cq(ctx, 1, NULL, NULL, 0); ++ if (cq == NULL) { ++ ucs_error("ibv_create_cq() failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto err_cq; ++ } ++ ++ qp_attr.send_cq = cq; ++ qp_attr.recv_cq = cq; ++ qp_attr.cap.max_send_wr = 1; ++ qp_attr.cap.max_send_sge = 1; ++ qp_attr.qp_type = IBV_QPT_DRIVER; ++ qp_attr.comp_mask = IBV_QP_INIT_ATTR_PD; ++ qp_attr.pd = pd; ++ ++ dv_attr.comp_mask = MLX5DV_QP_INIT_ATTR_MASK_DC; ++ dv_attr.dc_init_attr.dc_type = MLX5DV_DCTYPE_DCI; ++ ++ /* create DCI qp successful means DC is supported */ ++ qp = mlx5dv_create_qp(ctx, &qp_attr, &dv_attr); ++ if (qp) { ++ ibv_destroy_qp(qp); ++ dev->flags |= UCT_IB_DEVICE_FLAG_DC; ++ } ++ ++ ibv_destroy_cq(cq); ++err_cq: ++ ibv_dealloc_pd(pd); ++ return status; ++} ++ ++UCT_IB_DEVICE_INIT(uct_ib_mlx5_device_init); ++ ++#endif ++ ++int uct_ib_mlx5dv_arm_cq(uct_ib_mlx5_cq_t *cq, int solicited) ++{ ++ uint64_t doorbell, sn_ci_cmd; ++ uint32_t sn, ci, cmd; ++ ++ sn = cq->cq_sn & 3; ++ ci = cq->cq_ci & 0xffffff; ++ cmd = solicited ? MLX5_CQ_DB_REQ_NOT_SOL : MLX5_CQ_DB_REQ_NOT; ++ sn_ci_cmd = (sn << 28) | cmd | ci; ++ ++ cq->dbrec[UCT_IB_MLX5_CQ_ARM_DB] = htobe32(sn_ci_cmd); ++ ++ ucs_memory_cpu_fence(); ++ ++ doorbell = (sn_ci_cmd << 32) | cq->cq_num; ++ ++ *(uint64_t *)((uint8_t *)cq->uar + MLX5_CQ_DOORBELL) = htobe64(doorbell); ++ ++ ucs_memory_bus_store_fence(); ++ ++ return 0; ++} ++ ++#if HAVE_DECL_MLX5DV_OBJ_AH ++void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av) ++{ ++ struct mlx5dv_obj dv; ++ struct mlx5dv_ah dah; ++ ++ dv.ah.in = ah; ++ dv.ah.out = &dah; ++ mlx5dv_init_obj(&dv, MLX5DV_OBJ_AH); ++ ++ *av = *(dah.av); ++ av->dqp_dct |= UCT_IB_MLX5_EXTENDED_UD_AV; ++} ++#elif !HAVE_INFINIBAND_MLX5_HW_H ++void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av) ++{ ++ ucs_bug("MLX5DV_OBJ_AH not supported"); ++} ++#endif ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.h +new file mode 100644 +index 000000000..67fbb0f2f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_dv.h +@@ -0,0 +1,61 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCT_IB_MLX5_DV_H_ ++#define UCT_IB_MLX5_DV_H_ ++ ++#ifndef UCT_IB_MLX5_H_ ++# error "Never include directly; use instead." ++#endif ++ ++#include ++#include ++ ++typedef struct { ++ struct mlx5dv_obj dv; ++} uct_ib_mlx5dv_t; ++ ++typedef struct { ++ struct mlx5dv_qp dv; ++} uct_ib_mlx5dv_qp_t; ++ ++typedef struct { ++ struct mlx5dv_srq dv; ++} uct_ib_mlx5dv_srq_t; ++ ++/* Completion queue */ ++typedef struct { ++ struct mlx5dv_cq dv; ++} uct_ib_mlx5dv_cq_t; ++ ++/** ++ * Get internal verbs information. ++ */ ++ucs_status_t uct_ib_mlx5dv_init_obj(uct_ib_mlx5dv_t *obj, uint64_t type); ++ ++/** ++ * Update CI to support req_notify_cq ++ */ ++void uct_ib_mlx5_update_cq_ci(struct ibv_cq *cq, unsigned cq_ci); ++ ++/** ++ * Retrieve CI from the driver ++ */ ++unsigned uct_ib_mlx5_get_cq_ci(struct ibv_cq *cq); ++ ++/** ++ * Get internal AV information. ++ */ ++void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av); ++ ++/** ++ * Backports for legacy bare-metal support ++ */ ++struct ibv_qp *uct_dv_get_cmd_qp(struct ibv_srq *srq); ++ ++void *uct_dv_get_info_uar0(void *uar); ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.c +new file mode 100644 +index 000000000..bde4ce007 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.c +@@ -0,0 +1,239 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#if HAVE_INFINIBAND_MLX5_HW_H ++ ++#include "ib_mlx5_hw.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Since this file intended to emulate DV using legacy mlx5_hw.h definitions ++ * we include DV declarations. */ ++#define UCT_IB_MLX5_H_ ++#include "ib_mlx5_dv.h" ++ ++static void UCS_F_MAYBE_UNUSED uct_ib_mlx5_obj_error(const char *obj_name) ++{ ++ ucs_error("Failed to get mlx5 %s information. Please make sure the installed " ++ "libmlx5 version matches the one UCX was compiled with (%s)", ++ obj_name, LIB_MLX5_VER); ++} ++ ++#if !HAVE_DECL_MLX5DV_INIT_OBJ ++ucs_status_t uct_ib_mlx5_get_qp_info(struct ibv_qp *qp, uct_ib_mlx5dv_qp_t *qp_info) ++{ ++#if HAVE_DECL_IBV_MLX5_EXP_GET_QP_INFO ++ struct ibv_mlx5_qp_info ibv_qp_info; ++ int ret; ++ ++ ret = ibv_mlx5_exp_get_qp_info(qp, &ibv_qp_info); ++ if (ret != 0) { ++ uct_ib_mlx5_obj_error("qp"); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ qp_info->dv.dbrec = ibv_qp_info.dbrec; ++ qp_info->dv.sq.buf = ibv_qp_info.sq.buf; ++ qp_info->dv.sq.wqe_cnt = ibv_qp_info.sq.wqe_cnt; ++ qp_info->dv.sq.stride = ibv_qp_info.sq.stride; ++ qp_info->dv.rq.buf = ibv_qp_info.rq.buf; ++ qp_info->dv.rq.wqe_cnt = ibv_qp_info.rq.wqe_cnt; ++ qp_info->dv.rq.stride = ibv_qp_info.rq.stride; ++ qp_info->dv.bf.reg = ibv_qp_info.bf.reg; ++ qp_info->dv.bf.size = ibv_qp_info.bf.size; ++#else ++ struct mlx5_qp *mqp = ucs_container_of(qp, struct mlx5_qp, verbs_qp.qp); ++ ++ if ((mqp->sq.cur_post != 0) || (mqp->rq.head != 0)) { ++ ucs_warn("cur_post=%d head=%d need_lock=%d", mqp->sq.cur_post, ++ mqp->rq.head, mqp->bf->need_lock); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ qp_info->dv.qpn = qp->qp_num; ++ qp_info->dv.dbrec = mqp->db; ++ qp_info->dv.sq.buf = mqp->buf.buf + mqp->sq.offset; ++ qp_info->dv.sq.wqe_cnt = mqp->sq.wqe_cnt; ++ qp_info->dv.sq.stride = 1 << mqp->sq.wqe_shift; ++ qp_info->dv.rq.buf = mqp->buf.buf + mqp->rq.offset; ++ qp_info->dv.rq.wqe_cnt = mqp->rq.wqe_cnt; ++ qp_info->dv.rq.stride = 1 << mqp->rq.wqe_shift; ++ qp_info->dv.bf.reg = mqp->bf->reg; ++ ++ if (mqp->bf->uuarn > 0) { ++ qp_info->dv.bf.size = mqp->bf->buf_size; ++ } else { ++ qp_info->dv.bf.size = 0; /* No BF */ ++ } ++#endif ++ return UCS_OK; ++} ++ ++ucs_status_t uct_ib_mlx5_get_srq_info(struct ibv_srq *srq, ++ uct_ib_mlx5dv_srq_t *srq_info) ++{ ++#if HAVE_DECL_IBV_MLX5_EXP_GET_SRQ_INFO ++ struct ibv_mlx5_srq_info ibv_srq_info; ++ int ret; ++ ++ ret = ibv_mlx5_exp_get_srq_info(srq, &ibv_srq_info); ++ if (ret != 0) { ++ uct_ib_mlx5_obj_error("srq"); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ srq_info->dv.buf = ibv_srq_info.buf; ++ srq_info->dv.dbrec = ibv_srq_info.dbrec; ++ srq_info->dv.stride = ibv_srq_info.stride; ++ srq_info->dv.head = ibv_srq_info.head; ++ srq_info->dv.tail = ibv_srq_info.tail; ++#else ++ struct mlx5_srq *msrq; ++ ++ if (srq->handle == LEGACY_XRC_SRQ_HANDLE) { ++ srq = (struct ibv_srq *)(((struct ibv_srq_legacy *)srq)->ibv_srq); ++ } ++ ++ msrq = ucs_container_of(srq, struct mlx5_srq, vsrq.srq); ++ ++ if (msrq->counter != 0) { ++ ucs_error("SRQ counter is not 0 (%d)", msrq->counter); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ srq_info->dv.buf = msrq->buf.buf; ++ srq_info->dv.dbrec = msrq->db; ++ srq_info->dv.stride = 1 << msrq->wqe_shift; ++ srq_info->dv.head = msrq->head; ++ srq_info->dv.tail = msrq->tail; ++#endif ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_ib_mlx5_get_cq(struct ibv_cq *cq, uct_ib_mlx5dv_cq_t *mlx5_cq) ++{ ++#if HAVE_DECL_IBV_MLX5_EXP_GET_CQ_INFO ++ struct ibv_mlx5_cq_info ibv_cq_info; ++ int ret; ++ ++ ret = ibv_mlx5_exp_get_cq_info(cq, &ibv_cq_info); ++ if (ret != 0) { ++ uct_ib_mlx5_obj_error("cq"); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ mlx5_cq->dv.buf = ibv_cq_info.buf; ++ mlx5_cq->dv.cqe_cnt = ibv_cq_info.cqe_cnt; ++ mlx5_cq->dv.cqn = ibv_cq_info.cqn; ++ mlx5_cq->dv.cqe_size = ibv_cq_info.cqe_size; ++#else ++ struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); ++ int ret; ++ ++ if (mcq->cons_index != 0) { ++ ucs_error("CQ consumer index is not 0 (%d)", mcq->cons_index); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ mlx5_cq->dv.buf = mcq->active_buf->buf; ++ mlx5_cq->dv.cqe_cnt = mcq->ibv_cq.cqe + 1; ++ mlx5_cq->dv.cqn = mcq->cqn; ++ mlx5_cq->dv.cqe_size = mcq->cqe_sz; ++#endif ++ return UCS_OK; ++} ++ ++ucs_status_t uct_ib_mlx5dv_init_obj(uct_ib_mlx5dv_t *obj, uint64_t obj_type) ++{ ++ ucs_status_t ret = UCS_OK; ++ ++ if (obj_type & MLX5DV_OBJ_QP) { ++ ret = uct_ib_mlx5_get_qp_info(obj->dv.qp.in, ++ ucs_container_of(obj->dv.qp.out, uct_ib_mlx5dv_qp_t, dv)); ++ } ++ ++ if (!ret && (obj_type & MLX5DV_OBJ_CQ)) { ++ ret = uct_ib_mlx5_get_cq(obj->dv.cq.in, ++ ucs_container_of(obj->dv.cq.out, uct_ib_mlx5dv_cq_t, dv)); ++ } ++ ++ if (!ret && (obj_type & MLX5DV_OBJ_SRQ)) { ++ ret = uct_ib_mlx5_get_srq_info(obj->dv.srq.in, ++ ucs_container_of(obj->dv.srq.out, uct_ib_mlx5dv_srq_t, dv)); ++ } ++ ++ return ret; ++} ++#endif ++ ++void uct_ib_mlx5_update_cq_ci(struct ibv_cq *cq, unsigned cq_ci) ++{ ++#if HAVE_DECL_IBV_MLX5_EXP_UPDATE_CQ_CI ++ ibv_mlx5_exp_update_cq_ci(cq, cq_ci); ++#else ++ struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); ++ mcq->cons_index = cq_ci; ++#endif ++} ++ ++unsigned uct_ib_mlx5_get_cq_ci(struct ibv_cq *cq) ++{ ++ struct mlx5_cq *mcq = ucs_container_of(cq, struct mlx5_cq, ibv_cq); ++ return mcq->cons_index; ++} ++ ++#if !HAVE_DECL_MLX5DV_OBJ_AH ++void uct_ib_mlx5_get_av(struct ibv_ah *ah, struct mlx5_wqe_av *av) ++{ ++ memcpy(av, &ucs_container_of(ah, struct mlx5_ah, ibv_ah)->av, sizeof(*av)); ++} ++#endif ++ ++struct ibv_qp *uct_dv_get_cmd_qp(struct ibv_srq *srq) ++{ ++#if HAVE_STRUCT_MLX5_SRQ_CMD_QP ++ struct mlx5_srq *msrq; ++ ++ if (srq->handle == LEGACY_XRC_SRQ_HANDLE) { ++ srq = (struct ibv_srq *)(((struct ibv_srq_legacy *)srq)->ibv_srq); ++ } ++ ++ msrq = ucs_container_of(srq, struct mlx5_srq, vsrq.srq); ++ if (msrq->counter != 0) { ++ ucs_error("SRQ counter is not 0 (%d)", msrq->counter); ++ return NULL; ++ } ++ ++ return &msrq->cmd_qp->verbs_qp.qp; ++#else ++ return NULL; ++#endif ++} ++ ++struct mlx5_uar_data { ++ enum { __DUMMY } map_type; ++ void *regs; ++}; ++ ++void *uct_dv_get_info_uar0(void *uar) ++{ ++#if HAVE_DECL_MLX5DV_INIT_OBJ ++ struct mlx5_uar_data *muar = uar; ++ return muar[0].regs; ++#else ++ return NULL; ++#endif ++} ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.h +new file mode 100644 +index 000000000..320e46a05 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_hw.h +@@ -0,0 +1,79 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#ifndef UCT_IB_MLX5_HW_H_ ++#define UCT_IB_MLX5_HW_H_ ++ ++#include ++ ++struct mlx5dv_qp { ++ volatile uint32_t *dbrec; ++ struct { ++ void *buf; ++ uint32_t wqe_cnt; ++ uint32_t stride; ++ } sq; ++ struct { ++ void *buf; ++ uint32_t wqe_cnt; ++ uint32_t stride; ++ } rq; ++ struct { ++ void *reg; ++ uint32_t size; ++ } bf; ++ uint64_t comp_mask; ++}; ++ ++struct mlx5dv_cq { ++ void *buf; ++ volatile uint32_t *dbrec; ++ uint32_t cqe_cnt; ++ uint32_t cqe_size; ++ void *cq_uar; ++/* DV backport will behave as DV with fixed CQ UAR */ ++#undef HAVE_STRUCT_MLX5DV_CQ_CQ_UAR ++#define HAVE_STRUCT_MLX5DV_CQ_CQ_UAR 1 ++ uint32_t cqn; ++ uint64_t comp_mask; ++}; ++ ++struct mlx5dv_srq { ++ void *buf; ++ volatile uint32_t *dbrec; ++ uint32_t stride; ++ uint32_t head; ++ uint32_t tail; ++ uint64_t comp_mask; ++}; ++ ++struct mlx5dv_obj { ++ struct { ++ struct ibv_qp *in; ++ struct mlx5dv_qp *out; ++ } qp; ++ struct { ++ struct ibv_cq *in; ++ struct mlx5dv_cq *out; ++ } cq; ++ struct { ++ struct ibv_srq *in; ++ struct mlx5dv_srq *out; ++ } srq; ++ struct { ++ struct ibv_exp_wq *in; ++ struct mlx5dv_rwq *out; ++ } rwq; ++}; ++ ++enum mlx5dv_obj_type { ++ MLX5DV_OBJ_QP = 1 << 0, ++ MLX5DV_OBJ_CQ = 1 << 1, ++ MLX5DV_OBJ_SRQ = 1 << 2, ++ MLX5DV_OBJ_RWQ = 1 << 3, ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.c +index 02eff31f3..3bb6ebd4a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.c +@@ -10,7 +10,7 @@ + #include + + +-static const char *uct_ib_mlx5_cqe_err_opcode(struct mlx5_err_cqe *ecqe) ++static const char *uct_ib_mlx5_cqe_err_opcode(uct_ib_mlx5_err_cqe_t *ecqe) + { + uint8_t wqe_err_opcode = ntohl(ecqe->s_wqe_opcode_qpn) >> 24; + +@@ -27,11 +27,11 @@ static const char *uct_ib_mlx5_cqe_err_opcode(struct mlx5_err_cqe *ecqe) + case MLX5_OPCODE_RDMA_READ: + return "RDMA_READ"; + case MLX5_OPCODE_ATOMIC_CS: +- return "COMPARE_SWAP"; ++ return "CSWAP"; + case MLX5_OPCODE_ATOMIC_FA: + return "FETCH_ADD"; + case MLX5_OPCODE_ATOMIC_MASKED_CS: +- return "MASKED_COMPARE_SWAP"; ++ return "MASKED_CSWAP"; + case MLX5_OPCODE_ATOMIC_MASKED_FA: + return "MASKED_FETCH_ADD"; + default: +@@ -44,7 +44,8 @@ static const char *uct_ib_mlx5_cqe_err_opcode(struct mlx5_err_cqe *ecqe) + } + } + +-ucs_status_t uct_ib_mlx5_completion_with_err(struct mlx5_err_cqe *ecqe, ++ucs_status_t uct_ib_mlx5_completion_with_err(uct_ib_iface_t *iface, ++ uct_ib_mlx5_err_cqe_t *ecqe, + ucs_log_level_t log_level) + { + uint16_t wqe_counter; +@@ -108,8 +109,10 @@ ucs_status_t uct_ib_mlx5_completion_with_err(struct mlx5_err_cqe *ecqe, + break; + } + +- ucs_log(log_level, "Error on QP 0x%x wqe[%d]: %s (synd 0x%x vend 0x%x) opcode %s", +- qp_num, wqe_counter, info, ecqe->syndrome, ecqe->vendor_err_synd, ++ ucs_log(log_level, "Error on "UCT_IB_IFACE_FMT" QP 0x%x wqe[%03d]: " ++ "%s (synd 0x%x vend 0x%x hw_synd %d/%d) opcode %s", ++ UCT_IB_IFACE_ARG(iface), qp_num, wqe_counter, info, ecqe->syndrome, ++ ecqe->vendor_err_synd, ecqe->hw_synd_type >> 4, ecqe->hw_err_synd, + uct_ib_mlx5_cqe_err_opcode(ecqe)); + return status; + } +@@ -174,25 +177,67 @@ static uint64_t network_to_host(void *ptr, int size) + return *(uint64_t*)ptr; + } + } +-static size_t uct_ib_mlx5_dump_dgram(char *buf, size_t max, void *seg) ++static size_t uct_ib_mlx5_dump_dgram(char *buf, size_t max, void *seg, int is_eth) + { + struct mlx5_wqe_datagram_seg *dgseg = seg; +- +- snprintf(buf, max-1, " [dlid %d rqpn 0x%x]", +- ntohs(mlx5_av_base(&dgseg->av)->rlid), +- ntohl(mlx5_av_base(&dgseg->av)->dqp_dct & ~UCT_IB_MLX5_EXTENDED_UD_AV)); ++ struct mlx5_base_av *base_av; ++ struct mlx5_grh_av *grh_av; ++ char gid_buf[32]; ++ int sgid_index; ++ char *p, *endp; ++ ++ p = buf; ++ endp = buf + max - 1; ++ base_av = mlx5_av_base(&dgseg->av); ++ ++ snprintf(p, endp - p, " [rqpn 0x%x", ++ ntohl(base_av->dqp_dct & ~UCT_IB_MLX5_EXTENDED_UD_AV)); ++ p += strlen(p); ++ ++ if (!is_eth) { ++ snprintf(p, endp - p, " rlid %d", ntohs(base_av->rlid)); ++ p += strlen(p); ++ } + + if (mlx5_av_base(&dgseg->av)->dqp_dct & UCT_IB_MLX5_EXTENDED_UD_AV) { ++ grh_av = mlx5_av_grh(&dgseg->av); ++ if (is_eth || (grh_av->grh_gid_fl & UCT_IB_MLX5_AV_GRH_PRESENT)) { ++ if (is_eth) { ++ snprintf(p, endp - p, " rmac %02x:%02x:%02x:%02x:%02x:%02x", ++ grh_av->rmac[0], grh_av->rmac[1], grh_av->rmac[2], ++ grh_av->rmac[3], grh_av->rmac[4], grh_av->rmac[5]); ++ p += strlen(p); ++ } ++ ++ sgid_index = (htonl(grh_av->grh_gid_fl) >> 20) & UCS_MASK(8); ++ snprintf(p, endp - p, " sgix %d dgid %s tc %d]", sgid_index, ++ inet_ntop(AF_INET6, grh_av->rgid, gid_buf, sizeof(gid_buf)), ++ grh_av->tclass); ++ } + return UCT_IB_MLX5_AV_FULL_SIZE; + } else { ++ snprintf(p, endp - p, "]"); + return UCT_IB_MLX5_AV_BASE_SIZE; + } + } + +-static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type, +- void *wqe, void *qstart, void *qend, ++static int uct_ib_mlx5_is_qp_require_av_seg(int qp_type) ++{ ++ if (qp_type == IBV_QPT_UD) { ++ return 1; ++ } ++#if HAVE_TL_DC ++ if (qp_type == UCT_IB_QPT_DCI) { ++ return 1; ++ } ++#endif ++ return 0; ++} ++ ++static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, int qp_type, ++ void *wqe, void *qstart, void *qend, int max_sge, + uct_log_data_dump_func_t packet_dump_cb, +- char *buffer, size_t max) ++ char *buffer, size_t max, uct_ib_log_sge_t *log_sge) + { + static uct_ib_opcode_t opcodes[] = { + [MLX5_OPCODE_NOP] = { "NOP", 0 }, +@@ -200,10 +245,12 @@ static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type + [MLX5_OPCODE_RDMA_READ] = { "RDMA_READ", UCT_IB_OPCODE_FLAG_HAS_RADDR }, + [MLX5_OPCODE_SEND] = { "SEND", 0 }, + [MLX5_OPCODE_SEND_IMM] = { "SEND_IMM", 0 }, +- [MLX5_OPCODE_ATOMIC_CS] = { "CS", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, +- [MLX5_OPCODE_ATOMIC_FA] = { "FA", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, +- [MLX5_OPCODE_ATOMIC_MASKED_CS] = { "MASKED_CS", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, +- [MLX5_OPCODE_ATOMIC_MASKED_FA] = { "MASKED_FA", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, ++ [MLX5_OPCODE_ATOMIC_CS] = { "CSWAP", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [MLX5_OPCODE_ATOMIC_FA] = { "FETCH_ADD", UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_ATOMIC }, ++ [MLX5_OPCODE_ATOMIC_MASKED_CS] = { "MASKED_CSWAP", ++ UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, ++ [MLX5_OPCODE_ATOMIC_MASKED_FA] = { "MASKED_FETCH_ADD", ++ UCT_IB_OPCODE_FLAG_HAS_RADDR|UCT_IB_OPCODE_FLAG_HAS_EXT_ATOMIC }, + }; + + struct mlx5_wqe_ctrl_seg *ctrl = wqe; +@@ -216,11 +263,12 @@ static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type + char *ends = buffer + max; + struct ibv_sge sg_list[16]; + uint64_t inline_bitmap; +- int i, is_inline; ++ int i, is_inline, is_eth; ++ size_t dg_size; + void *seg; + + /* QP number and opcode name */ +- uct_ib_log_dump_opcode(qp_num, op, ++ uct_ib_log_dump_opcode(qp_num, (wqe - qstart) / MLX5_SEND_WQE_BB, op, + ctrl->fm_ce_se & MLX5_WQE_CTRL_CQ_UPDATE, + ctrl->fm_ce_se & MLX5_WQE_CTRL_FENCE, + ctrl->fm_ce_se & (1 << 1), +@@ -234,8 +282,9 @@ static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type + seg = qstart; + } + +- if ((qp_type == IBV_QPT_UD) || (qp_type == IBV_EXP_QPT_DC_INI)) { +- size_t dg_size = uct_ib_mlx5_dump_dgram(s, ends - s, seg); ++ if (uct_ib_mlx5_is_qp_require_av_seg(qp_type)) { ++ is_eth = IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface)); ++ dg_size = uct_ib_mlx5_dump_dgram(s, ends - s, seg, is_eth); + s += strlen(s); + + seg = (char *)seg + dg_size; +@@ -314,29 +363,35 @@ static void uct_ib_mlx5_wqe_dump(uct_ib_iface_t *iface, enum ibv_qp_type qp_type + } + + /* Data segments*/ +- i = 0; +- inline_bitmap = 0; +- +- while ((ds > 0) && (i < sizeof(sg_list) / sizeof(sg_list[0]))) { +- ds -= uct_ib_mlx5_parse_dseg(&seg, qstart, qend, sg_list, &i, &is_inline); +- if (is_inline) { +- inline_bitmap |= UCS_BIT(i-1); ++ if (log_sge == NULL) { ++ i = 0; ++ inline_bitmap = 0; ++ ++ while ((ds > 0) && (i < sizeof(sg_list) / sizeof(sg_list[0]))) { ++ ds -= uct_ib_mlx5_parse_dseg(&seg, qstart, qend, sg_list, &i, &is_inline); ++ if (is_inline) { ++ inline_bitmap |= UCS_BIT(i-1); ++ } ++ s += strlen(s); + } +- s += strlen(s); + } + +- uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, sg_list, i, +- inline_bitmap, packet_dump_cb, s, ends - s); ++ uct_ib_log_dump_sg_list(iface, UCT_AM_TRACE_TYPE_SEND, ++ log_sge ? log_sge->sg_list : sg_list, ++ log_sge ? log_sge->num_sge : ucs_min(i, max_sge), ++ log_sge ? log_sge->inline_bitmap : inline_bitmap, ++ packet_dump_cb, s, ends - s); + } + + void __uct_ib_mlx5_log_tx(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, +- void *wqe, void *qstart, void *qend, ++ uct_ib_iface_t *iface, int qp_type, ++ void *wqe, void *qstart, void *qend, int max_sge, ++ uct_ib_log_sge_t *log_sge, + uct_log_data_dump_func_t packet_dump_cb) + { + char buf[256] = {0}; +- uct_ib_mlx5_wqe_dump(iface, qp_type, wqe, qstart, qend, packet_dump_cb, +- buf, sizeof(buf) - 1); ++ uct_ib_mlx5_wqe_dump(iface, qp_type, wqe, qstart, qend, max_sge, packet_dump_cb, ++ buf, sizeof(buf) - 1, log_sge); + uct_log_data(file, line, function, buf); + } + +@@ -357,7 +412,7 @@ void uct_ib_mlx5_cqe_dump(const char *file, int line, const char *function, stru + } + + void __uct_ib_mlx5_log_rx(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++ uct_ib_iface_t *iface, int qp_type, + struct mlx5_cqe64 *cqe, void *data, + uct_log_data_dump_func_t packet_dump_cb) + { +@@ -365,7 +420,7 @@ void __uct_ib_mlx5_log_rx(const char *file, int line, const char *function, + size_t length; + + length = ntohl(cqe->byte_cnt); +- if ((qp_type == IBV_QPT_UD) || (qp_type == IBV_EXP_QPT_DC_INI)) { ++ if (uct_ib_mlx5_is_qp_require_av_seg(qp_type)) { + length -= UCT_IB_GRH_LEN; + data += UCT_IB_GRH_LEN; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.h +index 7ed8e5d59..ebdf2d40b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/mlx5/ib_mlx5_log.h +@@ -12,27 +12,35 @@ + #include + + +-ucs_status_t uct_ib_mlx5_completion_with_err(struct mlx5_err_cqe *ecqe, ++typedef struct uct_ib_log_sge { ++ int num_sge; ++ uint64_t inline_bitmap; ++ struct ibv_sge sg_list[2]; ++} uct_ib_log_sge_t; ++ ++ucs_status_t uct_ib_mlx5_completion_with_err(uct_ib_iface_t *iface, ++ uct_ib_mlx5_err_cqe_t *ecqe, + ucs_log_level_t log_level); + + + void __uct_ib_mlx5_log_tx(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, +- void *wqe, void *qstart, void *qend, ++ uct_ib_iface_t *iface, int qp_type, ++ void *wqe, void *qstart, void *qend, int max_log_sge, ++ uct_ib_log_sge_t *log_sge, + uct_log_data_dump_func_t packet_dump_cb); + + void __uct_ib_mlx5_log_rx(const char *file, int line, const char *function, +- uct_ib_iface_t *iface, enum ibv_qp_type qp_type, ++ uct_ib_iface_t *iface, int qp_type, + struct mlx5_cqe64 *cqe, void *data, + uct_log_data_dump_func_t packet_dump_cb); + + void uct_ib_mlx5_cqe_dump(const char *file, int line, const char *function, + struct mlx5_cqe64 *cqe); + +-#define uct_ib_mlx5_log_tx(_iface, _qpt, _wqe, _qstart, _qend, _dump_cb) \ ++#define uct_ib_mlx5_log_tx(_iface, _qpt, _wqe, _qstart, _qend, _max_sge, _log_sge, _dump_cb) \ + if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { \ + __uct_ib_mlx5_log_tx(__FILE__, __LINE__, __FUNCTION__, \ +- _iface, _qpt, _wqe, _qstart, _qend, _dump_cb); \ ++ _iface, _qpt, _wqe, _qstart, _qend, _max_sge, _log_sge, _dump_cb); \ + } + + #define uct_ib_mlx5_log_rx(_iface, _qpt, _cqe, _data, _dump_cb) \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5.h +index a057456ae..4e3c87c14 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5.h +@@ -19,9 +19,10 @@ + * RC mlx5 interface configuration + */ + typedef struct uct_rc_mlx5_iface_config { +- uct_rc_iface_config_t super; +- uct_rc_fc_config_t fc; +- unsigned tx_max_bb; ++ uct_rc_iface_config_t super; ++ uct_rc_fc_config_t fc; ++ uct_ib_mlx5_iface_config_t mlx5_common; ++ unsigned tx_max_bb; + /* TODO wc_mode, UAR mode SnB W/A... */ + } uct_rc_mlx5_iface_config_t; + +@@ -47,7 +48,8 @@ typedef struct { + uct_rc_iface_t super; + uct_rc_mlx5_iface_common_t mlx5_common; + struct { +- uint16_t bb_max; /* limit number of outstanding WQE BBs */ ++ uct_ib_mlx5_mmio_mode_t mmio_mode; ++ uint16_t bb_max; /* limit number of outstanding WQE BBs */ + } tx; + } uct_rc_mlx5_iface_t; + +@@ -88,35 +90,29 @@ ucs_status_t uct_rc_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *hea + size_t iovcnt, unsigned flags, + uct_completion_t *comp); + +-ucs_status_t uct_rc_mlx5_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +- +-ucs_status_t uct_rc_mlx5_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- +-ucs_status_t uct_rc_mlx5_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- + ucs_status_t uct_rc_mlx5_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp); + +-ucs_status_t uct_rc_mlx5_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_rc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp); ++ ++ucs_status_t uct_rc_mlx5_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); + +-ucs_status_t uct_rc_mlx5_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_rc_mlx5_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); + +-ucs_status_t uct_rc_mlx5_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_rc_mlx5_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); + +-ucs_status_t uct_rc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ucs_status_t uct_rc_mlx5_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ uct_completion_t *comp); + + ucs_status_t uct_rc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, uct_completion_t *comp); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.c +index adfb20d25..112fb6f2d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.c +@@ -22,6 +22,24 @@ ucs_stats_class_t uct_rc_mlx5_iface_stats_class = { + }; + #endif + ++ ++#if HAVE_IBV_EXP_DM ++/* uct_mlx5_dm_va is used to get pointer to DM mapped into process address space */ ++typedef struct uct_mlx5_dm_va { ++ struct ibv_exp_dm ibv_dm; ++ size_t length; ++ uint64_t *start_va; ++} uct_mlx5_dm_va_t; ++#endif ++ ++ ++void uct_rc_mlx5_common_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max) ++{ ++ uct_rc_ep_packet_dump(iface, type, data, length, valid_length, buffer, max, 0); ++} ++ + unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_iface_t *iface, uct_ib_mlx5_srq_t *srq) + { + uct_ib_mlx5_srq_seg_t *seg; +@@ -67,6 +85,8 @@ unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_iface_t *iface, uct_ib_mlx5_srq_ + } + + count = index - srq->sw_pi; ++ ucs_assert(iface->rx.srq.available >= count); ++ + if (count > 0) { + srq->ready_idx = index; + srq->sw_pi = index; +@@ -115,13 +135,13 @@ ucs_status_t + uct_rc_mlx5_iface_common_tag_init(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface, + uct_rc_iface_config_t *rc_config, ++ const uct_ib_mlx5_iface_config_t *mlx5_config, + struct ibv_exp_create_srq_attr *srq_init_attr, + unsigned rndv_hdr_len) + { + ucs_status_t status = UCS_OK; + #if IBV_EXP_HW_TM +- struct ibv_srq *srq; +- struct mlx5_srq *msrq; ++ struct ibv_qp *cmd_qp; + int i; + + if (!UCT_RC_IFACE_TM_ENABLED(rc_iface)) { +@@ -134,26 +154,20 @@ uct_rc_mlx5_iface_common_tag_init(uct_rc_mlx5_iface_common_t *iface, + goto err; + } + +- srq = rc_iface->rx.srq.srq; +- if (srq->handle == LEGACY_XRC_SRQ_HANDLE) { +- srq = (struct ibv_srq *)(((struct ibv_srq_legacy *)srq)->ibv_srq); +- } +- +- msrq = ucs_container_of(srq, struct mlx5_srq, vsrq.srq); +- if (msrq->counter != 0) { +- ucs_error("SRQ counter is not 0 (%d)", msrq->counter); ++ cmd_qp = uct_dv_get_cmd_qp(rc_iface->rx.srq.srq); ++ if (!cmd_qp) { + status = UCS_ERR_NO_DEVICE; + goto err_tag_cleanup; + } + + status = uct_ib_mlx5_txwq_init(rc_iface->super.super.worker, +- &iface->tm.cmd_wq.super, +- &msrq->cmd_qp->verbs_qp.qp); ++ mlx5_config->mmio_mode, ++ &iface->tm.cmd_wq.super, cmd_qp); + if (status != UCS_OK) { + goto err_tag_cleanup; + } + +- iface->tm.cmd_wq.qp_num = msrq->cmd_qp->verbs_qp.qp.qp_num; ++ iface->tm.cmd_wq.qp_num = cmd_qp->qp_num; + iface->tm.cmd_wq.ops_mask = rc_iface->tm.cmd_qp_len - 1; + iface->tm.cmd_wq.ops_head = iface->tm.cmd_wq.ops_tail = 0; + iface->tm.cmd_wq.ops = ucs_calloc(rc_iface->tm.cmd_qp_len, +@@ -205,18 +219,176 @@ void uct_rc_mlx5_iface_common_tag_cleanup(uct_rc_mlx5_iface_common_t *iface, + #endif + } + ++ ++#if HAVE_IBV_EXP_DM ++static ucs_status_t ++uct_rc_mlx5_iface_common_dm_mpool_chunk_malloc(ucs_mpool_t *mp, size_t *size_p, void **chunk_p) ++{ ++ ucs_status_t status; ++ ++ status = ucs_mpool_chunk_malloc(mp, size_p, chunk_p); ++ if (status == UCS_OK) { ++ memset(*chunk_p, 0, *size_p); ++ } ++ ++ return status; ++} ++ ++static void uct_rc_mlx5_iface_common_dm_mp_obj_init(ucs_mpool_t *mp, void *obj, void *chunk) ++{ ++ uct_mlx5_dm_data_t *dm = ucs_container_of(mp, uct_mlx5_dm_data_t, mp); ++ uct_rc_iface_send_desc_t* desc = (uct_rc_iface_send_desc_t*)obj; ++ ++ ucs_assert(desc->super.buffer == NULL); ++ ucs_assert(dm->seg_attached < dm->seg_count); ++ ++ desc->lkey = dm->mr->lkey; ++ desc->super.buffer = UCS_PTR_BYTE_OFFSET(dm->start_va, dm->seg_attached * dm->seg_len); ++ desc->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; ++ dm->seg_attached++; ++} ++ ++static ucs_mpool_ops_t uct_dm_iface_mpool_ops = { ++ .chunk_alloc = uct_rc_mlx5_iface_common_dm_mpool_chunk_malloc, ++ .chunk_release = ucs_mpool_chunk_free, ++ .obj_init = uct_rc_mlx5_iface_common_dm_mp_obj_init, ++ .obj_cleanup = NULL ++}; ++ ++ ++static int uct_rc_mlx5_iface_common_dm_device_cmp(uct_mlx5_dm_data_t *dm_data, ++ uct_rc_iface_t *iface, ++ const uct_ib_mlx5_iface_config_t *config) ++{ ++ uct_ib_device_t *dev = uct_ib_iface_device(&iface->super); ++ ++ return dm_data->device->ibv_context == dev->ibv_context; ++} ++ ++static ucs_status_t ++uct_rc_mlx5_iface_common_dm_tl_init(uct_mlx5_dm_data_t *data, ++ uct_rc_iface_t *iface, ++ const uct_ib_mlx5_iface_config_t *config) ++{ ++ ucs_status_t status; ++ struct ibv_exp_alloc_dm_attr dm_attr; ++ struct ibv_exp_reg_mr_in mr_in; ++ ++ data->seg_len = ucs_min(ucs_align_up(config->dm.seg_len, ++ sizeof(uct_rc_mlx5_dm_copy_data_t)), ++ iface->super.config.seg_size); ++ data->seg_count = config->dm.count; ++ data->seg_attached = 0; ++ data->device = uct_ib_iface_device(&iface->super); ++ ++ dm_attr.length = data->seg_len * data->seg_count; ++ dm_attr.comp_mask = 0; ++ data->dm = ibv_exp_alloc_dm(data->device->ibv_context, &dm_attr); ++ ++ if (data->dm == NULL) { ++ /* TODO: prompt warning? */ ++ ucs_debug("ibv_exp_alloc_dm(dev=%s length=%zu) failed: %m", ++ uct_ib_device_name(data->device), dm_attr.length); ++ return UCS_ERR_NO_RESOURCE; ++ } ++ ++ memset(&mr_in, 0, sizeof(mr_in)); ++ mr_in.pd = uct_ib_iface_md(&iface->super)->pd; ++ mr_in.comp_mask = IBV_EXP_REG_MR_DM; ++ mr_in.dm = data->dm; ++ mr_in.length = dm_attr.length; ++ data->mr = ibv_exp_reg_mr(&mr_in); ++ if (data->mr == NULL) { ++ ucs_warn("ibv_exp_reg_mr() error - On Device Memory registration failed, %d %m", errno); ++ status = UCS_ERR_NO_RESOURCE; ++ goto failed_mr; ++ } ++ ++ data->start_va = ((uct_mlx5_dm_va_t*)data->dm)->start_va; ++ ++ status = ucs_mpool_init(&data->mp, 0, ++ sizeof(uct_rc_iface_send_desc_t), 0, UCS_SYS_CACHE_LINE_SIZE, ++ data->seg_count, data->seg_count, ++ &uct_dm_iface_mpool_ops, "mlx5_dm_desc"); ++ if (status != UCS_OK) { ++ goto failed_mpool; ++ } ++ ++ /* DM initialization may fail due to any reason, just ++ * free resources & continue without DM */ ++ return UCS_OK; ++ ++failed_mpool: ++ ibv_dereg_mr(data->mr); ++failed_mr: ++ ibv_exp_free_dm(data->dm); ++ data->dm = NULL; ++ return status; ++} ++ ++static void uct_rc_mlx5_iface_common_dm_tl_cleanup(uct_mlx5_dm_data_t *data) ++{ ++ ucs_assert(data->dm != NULL); ++ ucs_assert(data->mr != NULL); ++ ++ ucs_mpool_cleanup(&data->mp, 1); ++ ibv_dereg_mr(data->mr); ++ ibv_exp_free_dm(data->dm); ++} ++#endif ++ ++static ucs_status_t ++uct_rc_mlx5_iface_common_dm_init(uct_rc_mlx5_iface_common_t *iface, ++ uct_rc_iface_t *rc_iface, ++ const uct_ib_mlx5_iface_config_t *mlx5_config) ++{ ++#if HAVE_IBV_EXP_DM ++ if ((mlx5_config->dm.seg_len * mlx5_config->dm.count) == 0) { ++ goto fallback; ++ } ++ ++ iface->dm.dm = uct_worker_tl_data_get(rc_iface->super.super.worker, ++ UCT_IB_MLX5_WORKER_DM_KEY, ++ uct_mlx5_dm_data_t, ++ uct_rc_mlx5_iface_common_dm_device_cmp, ++ uct_rc_mlx5_iface_common_dm_tl_init, ++ rc_iface, mlx5_config); ++ if (UCS_PTR_IS_ERR(iface->dm.dm)) { ++ goto fallback; ++ } ++ ++ ucs_assert(iface->dm.dm->dm != NULL); ++ iface->dm.seg_len = iface->dm.dm->seg_len; ++ return UCS_OK; ++ ++fallback: ++ iface->dm.dm = NULL; ++#endif ++ return UCS_OK; ++} ++ ++static void uct_rc_mlx5_iface_common_dm_cleanup(uct_rc_mlx5_iface_common_t *iface) ++{ ++#if HAVE_IBV_EXP_DM ++ if (iface->dm.dm) { ++ uct_worker_tl_data_put(iface->dm.dm, uct_rc_mlx5_iface_common_dm_tl_cleanup); ++ } ++#endif ++} ++ + ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface, +- uct_rc_iface_config_t *config) ++ const uct_rc_iface_config_t *config, ++ const uct_ib_mlx5_iface_config_t *mlx5_config) + { + ucs_status_t status; + +- status = uct_ib_mlx5_get_cq(rc_iface->super.send_cq, &iface->tx.cq); ++ status = uct_ib_mlx5_get_cq(rc_iface->super.cq[UCT_IB_DIR_TX], &iface->cq[UCT_IB_DIR_TX]); + if (status != UCS_OK) { + return status; + } + +- status = uct_ib_mlx5_get_cq(rc_iface->super.recv_cq, &iface->rx.cq); ++ status = uct_ib_mlx5_get_cq(rc_iface->super.cq[UCT_IB_DIR_RX], &iface->cq[UCT_IB_DIR_RX]); + if (status != UCS_OK) { + return status; + } +@@ -227,6 +399,11 @@ ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + return status; + } + ++ status = uct_rc_mlx5_iface_common_dm_init(iface, rc_iface, mlx5_config); ++ if (status != UCS_OK) { ++ return status; ++ } ++ + rc_iface->rx.srq.quota = iface->rx.srq.mask + 1; + + /* By default set to something that is always in cache */ +@@ -235,13 +412,13 @@ ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + status = UCS_STATS_NODE_ALLOC(&iface->stats, &uct_rc_mlx5_iface_stats_class, + rc_iface->stats); + if (status != UCS_OK) { +- return status; ++ goto cleanup_dm; + } + + status = uct_iface_mpool_init(&rc_iface->super.super, + &iface->tx.atomic_desc_mp, +- sizeof(uct_rc_iface_send_desc_t) + UCT_RC_MAX_ATOMIC_SIZE, +- sizeof(uct_rc_iface_send_desc_t) + UCT_RC_MAX_ATOMIC_SIZE, ++ sizeof(uct_rc_iface_send_desc_t) + UCT_IB_MAX_ATOMIC_SIZE, ++ sizeof(uct_rc_iface_send_desc_t) + UCT_IB_MAX_ATOMIC_SIZE, + UCS_SYS_CACHE_LINE_SIZE, + &config->super.tx.mp, + rc_iface->config.tx_qp_len, +@@ -249,6 +426,7 @@ ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + "rc_mlx5_atomic_desc"); + if (status != UCS_OK) { + UCS_STATS_NODE_FREE(iface->stats); ++ goto cleanup_dm; + } + + /* For little-endian atomic reply, override the default functions, to still +@@ -264,6 +442,10 @@ ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + rc_iface->config.atomic64_ext_handler = uct_rc_mlx5_common_atomic64_le_handler; + } + ++ return UCS_OK; ++ ++cleanup_dm: ++ uct_rc_mlx5_iface_common_dm_cleanup(iface); + return status; + } + +@@ -271,14 +453,50 @@ void uct_rc_mlx5_iface_common_cleanup(uct_rc_mlx5_iface_common_t *iface) + { + UCS_STATS_NODE_FREE(iface->stats); + ucs_mpool_cleanup(&iface->tx.atomic_desc_mp, 1); ++ uct_rc_mlx5_iface_common_dm_cleanup(iface); + } + +-void uct_rc_mlx5_iface_common_query(uct_iface_attr_t *iface_attr) ++void uct_rc_mlx5_iface_common_query(uct_ib_iface_t *iface, uct_iface_attr_t *iface_attr) + { ++ uct_ib_device_t *dev = uct_ib_iface_device(iface); ++ + /* Atomics */ + iface_attr->cap.flags |= UCT_IFACE_FLAG_ERRHANDLE_ZCOPY_BUF | + UCT_IFACE_FLAG_ERRHANDLE_REMOTE_MEM; + ++ if (uct_ib_atomic_is_supported(dev, 0, sizeof(uint64_t))) { ++ iface_attr->cap.atomic64.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD); ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ } ++ ++ if (uct_ib_atomic_is_supported(dev, 1, sizeof(uint64_t))) { ++ iface_attr->cap.atomic64.op_flags |= UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP); ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ } ++ ++ if (uct_ib_atomic_is_supported(dev, 1, sizeof(uint32_t))) { ++ iface_attr->cap.atomic32.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ iface_attr->cap.atomic32.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ } ++ + /* Software overhead */ + iface_attr->overhead = 40e-9; + +@@ -287,61 +505,72 @@ void uct_rc_mlx5_iface_common_query(uct_iface_attr_t *iface_attr) + void uct_rc_mlx5_iface_common_update_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + uct_ib_iface_t *ib_iface) + { +- uct_ib_mlx5_update_cq_ci(ib_iface->send_cq, iface->tx.cq.cq_ci); +- uct_ib_mlx5_update_cq_ci(ib_iface->recv_cq, iface->rx.cq.cq_ci); ++#if !HAVE_DECL_MLX5DV_INIT_OBJ ++ uct_ib_mlx5_update_cq_ci(ib_iface->cq[UCT_IB_DIR_TX], iface->cq[UCT_IB_DIR_TX].cq_ci); ++ uct_ib_mlx5_update_cq_ci(ib_iface->cq[UCT_IB_DIR_RX], iface->cq[UCT_IB_DIR_RX].cq_ci); ++#endif + } + + void uct_rc_mlx5_iface_common_sync_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + uct_ib_iface_t *ib_iface) + { +- iface->tx.cq.cq_ci = uct_ib_mlx5_get_cq_ci(ib_iface->send_cq); +- iface->rx.cq.cq_ci = uct_ib_mlx5_get_cq_ci(ib_iface->recv_cq); ++#if !HAVE_DECL_MLX5DV_INIT_OBJ ++ iface->cq[UCT_IB_DIR_TX].cq_ci = uct_ib_mlx5_get_cq_ci(ib_iface->cq[UCT_IB_DIR_TX]); ++ iface->cq[UCT_IB_DIR_RX].cq_ci = uct_ib_mlx5_get_cq_ci(ib_iface->cq[UCT_IB_DIR_RX]); ++#endif + } + +-void uct_rc_mlx5_iface_commom_clean_srq(uct_rc_mlx5_iface_common_t *mlx5_common_iface, +- uct_rc_iface_t *rc_iface, uint32_t qpn) ++int uct_rc_mlx5_iface_commom_clean(uct_ib_mlx5_cq_t *mlx5_cq, ++ uct_ib_mlx5_srq_t *srq, uint32_t qpn) + { +- uct_ib_mlx5_cq_t *mlx5_cq = &mlx5_common_iface->rx.cq; + const size_t cqe_sz = 1ul << mlx5_cq->cqe_size_log; + struct mlx5_cqe64 *cqe, *dest; + uct_ib_mlx5_srq_seg_t *seg; +- unsigned ci, pi, idx; ++ unsigned pi, idx; + uint8_t owner_bit; + int nfreed; + +- pi = ci = mlx5_cq->cq_ci; +- while (uct_ib_mlx5_poll_cq(&rc_iface->super, mlx5_cq)) { +- if (pi == ci + mlx5_cq->cq_length - 1) { ++ pi = mlx5_cq->cq_ci; ++ for (;;) { ++ cqe = uct_ib_mlx5_get_cqe(mlx5_cq, pi); ++ if (uct_ib_mlx5_cqe_is_hw_owned(cqe->op_own, pi, mlx5_cq->cq_length)) { + break; + } ++ ++ ucs_assert((cqe->op_own >> 4) != MLX5_CQE_INVALID); ++ + ++pi; ++ if (pi == (mlx5_cq->cq_ci + mlx5_cq->cq_length - 1)) { ++ break; ++ } + } +- ucs_assert(pi == mlx5_cq->cq_ci); + + ucs_memory_cpu_load_fence(); + +- /* Remove CQEs of the destroyed QP, so the drive would not see them and try ++ /* Remove CQEs of the destroyed QP, so the driver would not see them and try + * to remove them itself, creating a mess with the free-list. + */ + nfreed = 0; +- while ((int)--pi - (int)ci >= 0) { ++ while ((int)--pi - (int)mlx5_cq->cq_ci >= 0) { + cqe = uct_ib_mlx5_get_cqe(mlx5_cq, pi); + if ((ntohl(cqe->sop_drop_qpn) & UCS_MASK(UCT_IB_QPN_ORDER)) == qpn) { + idx = ntohs(cqe->wqe_counter); +- seg = uct_ib_mlx5_srq_get_wqe(&mlx5_common_iface->rx.srq, idx); +- seg->srq.free = 1; +- ucs_trace("iface %p: freed srq seg[%d] of qpn 0x%x", +- mlx5_common_iface, idx, qpn); ++ if (srq) { ++ seg = uct_ib_mlx5_srq_get_wqe(srq, idx); ++ seg->srq.free = 1; ++ ucs_trace("cq %p: freed srq seg[%d] of qpn 0x%x", ++ mlx5_cq, idx, qpn); ++ } + ++nfreed; + } else if (nfreed) { +- /* push the CQEs we want to keep to cq_ci, and move cq_ci backwards */ +- dest = uct_ib_mlx5_get_cqe(mlx5_cq, mlx5_cq->cq_ci); ++ dest = uct_ib_mlx5_get_cqe(mlx5_cq, pi + nfreed); + owner_bit = dest->op_own & MLX5_CQE_OWNER_MASK; + memcpy((void*)(dest + 1) - cqe_sz, (void*)(cqe + 1) - cqe_sz, cqe_sz); + dest->op_own = (dest->op_own & ~MLX5_CQE_OWNER_MASK) | owner_bit; +- --mlx5_cq->cq_ci; + } + } + +- rc_iface->rx.srq.available += nfreed; ++ mlx5_cq->cq_ci += nfreed; ++ ++ return nfreed; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.h +index 55f28796a..cca23e2f2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_common.h +@@ -7,6 +7,7 @@ + #ifndef UCT_RC_MLX5_COMMON_H + #define UCT_RC_MLX5_COMMON_H + ++#include + #include + #include + #include +@@ -32,6 +33,23 @@ + #define UCT_RC_MLX5_CHECK_PUT_SHORT(_length, _av_size) \ + UCT_CHECK_LENGTH(_length, 0, UCT_IB_MLX5_PUT_MAX_SHORT(_av_size), "put_short") + ++#define UCT_RC_MLX5_ATOMIC_OPS (UCS_BIT(UCT_ATOMIC_OP_ADD) | \ ++ UCS_BIT(UCT_ATOMIC_OP_AND) | \ ++ UCS_BIT(UCT_ATOMIC_OP_OR) | \ ++ UCS_BIT(UCT_ATOMIC_OP_XOR)) ++ ++#define UCT_RC_MLX5_ATOMIC_FOPS (UCT_RC_MLX5_ATOMIC_OPS | UCS_BIT(UCT_ATOMIC_OP_SWAP)) ++ ++#define UCT_RC_MLX5_CHECK_ATOMIC_OPS(_op, _size, _flags) \ ++ if (ucs_unlikely(!(UCS_BIT(_op) & (_flags)))) { \ ++ ucs_assertv(0, "incorrect opcode for atomic: %d", _op); \ ++ return UCS_ERR_UNSUPPORTED; \ ++ } else { \ ++ ucs_assert((_size == sizeof(uint64_t)) || (_size == sizeof(uint32_t))); \ ++ } ++ ++#define UCT_RC_MLX5_TO_BE(_val, _size) \ ++ ((_size) == sizeof(uint64_t) ? htobe64(_val) : htobe32(_val)) + + enum { + UCT_RC_MLX5_IFACE_STAT_RX_INL_32, +@@ -66,9 +84,15 @@ enum { + UCT_RC_MLX5_CQE_APP_OP_TM_CONSUMED_MSG = 0xA + }; + ++# define UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(_av_size) \ ++ (UCT_IB_MLX5_AM_MAX_SHORT(_av_size + sizeof(struct ibv_exp_tmh))/ \ ++ sizeof(struct mlx5_wqe_data_seg)) ++ ++# define UCT_RC_MLX5_TM_CQE_WITH_IMM(_cqe64) \ ++ (((_cqe64)->op_own >> 4) == MLX5_CQE_RESP_SEND_IMM) ++ + # define UCT_RC_MLX5_TM_IS_SW_RNDV(_cqe64, _imm_data) \ +- (ucs_unlikely((((_cqe64)->op_own >> 4) == MLX5_CQE_RESP_SEND_IMM) && \ +- !(_imm_data))) ++ (ucs_unlikely(UCT_RC_MLX5_TM_CQE_WITH_IMM(_cqe64) && !(_imm_data))) + + # define UCT_RC_MLX5_CHECK_TAG(_mlx5_common_iface) \ + if (ucs_unlikely((_mlx5_common_iface)->tm.head->next == NULL)) { \ +@@ -114,18 +138,63 @@ typedef struct uct_rc_mlx5_cmd_wq { + ops array size */ + } uct_rc_mlx5_cmd_wq_t; + ++static UCS_F_ALWAYS_INLINE void ++uct_rc_mlx5_fill_tmh(struct ibv_exp_tmh *tmh, uct_tag_t tag, ++ uint32_t app_ctx, unsigned op) ++{ ++ tmh->opcode = op; ++ tmh->app_ctx = app_ctx; ++ tmh->tag = tag; ++} ++ ++# define UCT_RC_MLX5_IFACE_GET_TM_BCOPY_DESC(_iface, _mp, _desc, _tag, _app_ctx, \ ++ _pack_cb, _arg, _length) \ ++ { \ ++ void *hdr; \ ++ UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ ++ (_desc)->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; \ ++ hdr = (_desc) + 1; \ ++ uct_rc_mlx5_fill_tmh(hdr, _tag, _app_ctx, IBV_EXP_TMH_EAGER); \ ++ hdr += sizeof(struct ibv_exp_tmh); \ ++ _length = _pack_cb(hdr, _arg); \ ++ } ++# else ++ ++# define UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(_av_size) 0 ++ + #endif /* IBV_EXP_HW_TM */ + ++#if HAVE_IBV_EXP_DM ++typedef struct uct_mlx5_dm_data { ++ uct_worker_tl_data_t super; ++ ucs_mpool_t mp; ++ struct ibv_mr *mr; ++ struct ibv_exp_dm *dm; ++ void *start_va; ++ size_t seg_len; ++ unsigned seg_count; ++ unsigned seg_attached; ++ uct_ib_device_t *device; ++} uct_mlx5_dm_data_t; ++ ++typedef union uct_rc_mlx5_dm_copy_data { ++ uct_rc_am_short_hdr_t am_hdr; ++#if IBV_EXP_HW_TM ++ struct ibv_exp_tmh tm_hdr; ++#endif ++ char bytes[sizeof(uint64_t) * 2]; ++} UCS_S_PACKED uct_rc_mlx5_dm_copy_data_t; ++#endif ++ + typedef struct uct_rc_mlx5_iface_common { + struct { +- uct_ib_mlx5_cq_t cq; + ucs_mpool_t atomic_desc_mp; + } tx; + struct { +- uct_ib_mlx5_cq_t cq; + uct_ib_mlx5_srq_t srq; + void *pref_ptr; + } rx; ++ uct_ib_mlx5_cq_t cq[UCT_IB_DIR_NUM]; + #if IBV_EXP_HW_TM + struct { + uct_rc_mlx5_cmd_wq_t cmd_wq; +@@ -133,11 +202,25 @@ typedef struct uct_rc_mlx5_iface_common { + uct_rc_mlx5_tag_entry_t *tail; + uct_rc_mlx5_tag_entry_t *list; + } tm; ++#endif ++#if HAVE_IBV_EXP_DM ++ struct { ++ uct_mlx5_dm_data_t *dm; ++ size_t seg_len; /* cached value to avoid double-pointer access */ ++ ucs_status_t (*am_short)(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *payload, unsigned length); ++#if IBV_EXP_HW_TM ++ ucs_status_t (*tag_short)(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length); ++#endif ++ } dm; + #endif + UCS_STATS_NODE_DECLARE(stats); + } uct_rc_mlx5_iface_common_t; + + ++extern ucs_config_field_t uct_ib_mlx5_iface_config_table[]; ++ + unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_iface_t *iface, uct_ib_mlx5_srq_t *srq); + + void uct_rc_mlx5_iface_common_prepost_recvs(uct_rc_iface_t *iface, +@@ -145,11 +228,12 @@ void uct_rc_mlx5_iface_common_prepost_recvs(uct_rc_iface_t *iface, + + ucs_status_t uct_rc_mlx5_iface_common_init(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface, +- uct_rc_iface_config_t *config); ++ const uct_rc_iface_config_t *config, ++ const uct_ib_mlx5_iface_config_t *mlx5_config); + + void uct_rc_mlx5_iface_common_cleanup(uct_rc_mlx5_iface_common_t *iface); + +-void uct_rc_mlx5_iface_common_query(uct_iface_attr_t *iface_attr); ++void uct_rc_mlx5_iface_common_query(uct_ib_iface_t *ib_iface, uct_iface_attr_t *iface_attr); + + void uct_rc_mlx5_iface_common_update_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + uct_ib_iface_t *ib_iface); +@@ -157,19 +241,49 @@ void uct_rc_mlx5_iface_common_update_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + void uct_rc_mlx5_iface_common_sync_cqs_ci(uct_rc_mlx5_iface_common_t *iface, + uct_ib_iface_t *ib_iface); + +-void uct_rc_mlx5_iface_commom_clean_srq(uct_rc_mlx5_iface_common_t *mlx5_common_iface, +- uct_rc_iface_t *rc_iface, uint32_t qpn); ++int uct_rc_mlx5_iface_commom_clean(uct_ib_mlx5_cq_t *mlx5_cq, ++ uct_ib_mlx5_srq_t *srq, uint32_t qpn); + + ucs_status_t + uct_rc_mlx5_iface_common_tag_init(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface, + uct_rc_iface_config_t *rc_config, ++ const uct_ib_mlx5_iface_config_t *mlx5_config, + struct ibv_exp_create_srq_attr *srq_init_attr, + unsigned rndv_hdr_len); + + void uct_rc_mlx5_iface_common_tag_cleanup(uct_rc_mlx5_iface_common_t *iface, + uct_rc_iface_t *rc_iface); + ++void uct_rc_mlx5_common_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max); ++ ++static UCS_F_ALWAYS_INLINE void ++uct_rc_mlx5_common_update_tx_res(uct_rc_iface_t *rc_iface, uct_ib_mlx5_txwq_t *txwq, ++ uct_rc_txqp_t *txqp, uint16_t hw_ci) ++{ ++ uint16_t bb_num; ++ ++ bb_num = uct_ib_mlx5_txwq_update_bb(txwq, hw_ci) - uct_rc_txqp_available(txqp); ++ ++ /* Must always have positive number of released resources. The first completion ++ * will report bb_num=1 (because prev_sw_pi is initialized to -1) and all the rest ++ * report the amount of BBs the previous WQE has consumed. ++ */ ++ ucs_assertv(bb_num > 0, "hw_ci=%d prev_sw_pi=%d available=%d bb_num=%d", ++ hw_ci, txwq->prev_sw_pi, txqp->available, bb_num); ++ ++ uct_rc_txqp_available_add(txqp, bb_num); ++ ucs_assert(uct_rc_txqp_available(txqp) <= txwq->bb_max); ++ ++ rc_iface->tx.cq_available += bb_num; ++ ucs_assertv(rc_iface->tx.cq_available <= rc_iface->config.tx_cq_len, ++ "cq_available=%d tx_cq_len=%d bb_num=%d txwq=%p txqp=%p", ++ rc_iface->tx.cq_available, rc_iface->config.tx_cq_len, bb_num, ++ txwq, txqp); ++} ++ + static UCS_F_ALWAYS_INLINE void + uct_rc_mlx5_txqp_process_tx_cqe(uct_rc_txqp_t *txqp, struct mlx5_cqe64 *cqe, + uint16_t hw_ci) +@@ -249,7 +363,7 @@ uct_rc_mlx5_iface_check_rx_completion(uct_rc_mlx5_iface_common_t *mlx5_common_if + uct_rc_iface_t *rc_iface, + struct mlx5_cqe64 *cqe) + { +- uct_ib_mlx5_cq_t *cq = &mlx5_common_iface->rx.cq; ++ uct_ib_mlx5_cq_t *cq = &mlx5_common_iface->cq[UCT_IB_DIR_RX]; + struct mlx5_err_cqe *ecqe = (void*)cqe; + uct_ib_mlx5_srq_seg_t *seg; + uint16_t wqe_ctr; +@@ -268,7 +382,8 @@ uct_rc_mlx5_iface_check_rx_completion(uct_rc_mlx5_iface_common_t *mlx5_common_if + wqe_ctr, UCS_OK, + rc_iface->super.config.rx_headroom_offset, + &rc_iface->super.release_desc); +- } else if ((ecqe->op_own >> 4) != MLX5_CQE_INVALID) { ++ } else { ++ ucs_assert((ecqe->op_own >> 4) != MLX5_CQE_INVALID); + uct_ib_mlx5_check_completion(&rc_iface->super, cq, cqe); + } + } +@@ -277,7 +392,7 @@ static UCS_F_ALWAYS_INLINE struct mlx5_cqe64* + uct_rc_mlx5_iface_poll_rx_cq(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + uct_rc_iface_t *rc_iface) + { +- uct_ib_mlx5_cq_t *cq = &mlx5_common_iface->rx.cq; ++ uct_ib_mlx5_cq_t *cq = &mlx5_common_iface->cq[UCT_IB_DIR_RX]; + struct mlx5_cqe64 *cqe; + unsigned index; + uint8_t op_own; +@@ -289,7 +404,7 @@ uct_rc_mlx5_iface_poll_rx_cq(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + cqe = uct_ib_mlx5_get_cqe(cq, index); + op_own = cqe->op_own; + +- if (ucs_unlikely((op_own & MLX5_CQE_OWNER_MASK) == !(index & cq->cq_length))) { ++ if (ucs_unlikely(uct_ib_mlx5_cqe_is_hw_owned(op_own, index, cq->cq_length))) { + return NULL; + } else if (ucs_unlikely(op_own & UCT_IB_MLX5_CQE_OP_OWN_ERR_MASK)) { + uct_rc_mlx5_iface_check_rx_completion(mlx5_common_iface, rc_iface, cqe); +@@ -356,7 +471,7 @@ uct_rc_mlx5_iface_common_am_handler(uct_rc_mlx5_iface_common_t *mlx5_iface, + seg = uct_ib_mlx5_srq_get_wqe(&mlx5_iface->rx.srq, wqe_ctr); + + uct_ib_mlx5_log_rx(&rc_iface->super, IBV_QPT_RC, cqe, hdr, +- uct_rc_ep_am_packet_dump); ++ uct_rc_mlx5_common_packet_dump); + + if (ucs_unlikely(hdr->am_id & UCT_RC_EP_FC_MASK)) { + qp_num = ntohl(cqe->sop_drop_qpn) & UCS_MASK(UCT_IB_QPN_ORDER); +@@ -376,14 +491,15 @@ uct_rc_mlx5_iface_common_am_handler(uct_rc_mlx5_iface_common_t *mlx5_iface, + } + + static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_common_post_send(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++uct_rc_mlx5_common_post_send(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + uint8_t opcode, uint8_t opmod, uint8_t fm_ce_se, + size_t wqe_size, uct_ib_mlx5_base_av_t *av, +- struct mlx5_grh_av *grh_av, uint32_t imm) ++ struct mlx5_grh_av *grh_av, uint32_t imm, int max_log_sge, ++ uct_ib_log_sge_t *log_sge) + { + struct mlx5_wqe_ctrl_seg *ctrl; +- uint16_t posted; ++ uint16_t res_count; + + ctrl = txwq->curr; + +@@ -396,20 +512,22 @@ uct_rc_mlx5_common_post_send(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + txqp->qp->qp_num, fm_ce_se, wqe_size); + } + +- if (qp_type == IBV_EXP_QPT_DC_INI) { ++#if HAVE_TL_DC ++ if (qp_type == UCT_IB_QPT_DCI) { + uct_ib_mlx5_set_dgram_seg((void*)(ctrl + 1), av, grh_av, qp_type); + } ++#endif + +- uct_ib_mlx5_log_tx(&iface->super, qp_type, ctrl, txwq->qstart, txwq->qend, ++ uct_ib_mlx5_log_tx(&iface->super, qp_type, ctrl, txwq->qstart, ++ txwq->qend, max_log_sge, log_sge, + ((opcode == MLX5_OPCODE_SEND) || (opcode == MLX5_OPCODE_SEND_IMM)) ? +- uct_rc_ep_am_packet_dump : NULL); ++ uct_rc_mlx5_common_packet_dump : NULL); + +- posted = uct_ib_mlx5_post_send(txwq, ctrl, wqe_size); ++ res_count = uct_ib_mlx5_post_send(txwq, ctrl, wqe_size); + if (fm_ce_se & MLX5_WQE_CTRL_CQ_UPDATE) { +- txwq->sig_pi = txwq->sw_pi - posted; ++ txwq->sig_pi = txwq->prev_sw_pi; + } +- +- uct_rc_txqp_posted(txqp, iface, posted, fm_ce_se & MLX5_WQE_CTRL_CQ_UPDATE); ++ uct_rc_txqp_posted(txqp, iface, res_count, fm_ce_se & MLX5_WQE_CTRL_CQ_UPDATE); + } + + +@@ -430,13 +548,13 @@ uct_rc_mlx5_common_post_send(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + * is a compile time constant + */ + static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + unsigned opcode, const void *buffer, unsigned length, + /* SEND */ uint8_t am_id, uint64_t am_hdr, uint32_t imm_val_be, + /* RDMA */ uint64_t rdma_raddr, uct_rkey_t rdma_rkey, + /* AV */ uct_ib_mlx5_base_av_t *av, struct mlx5_grh_av *grh_av, +- size_t av_size, unsigned fm_ce_se) ++ size_t av_size, unsigned fm_ce_se, int max_log_sge) + { + struct mlx5_wqe_ctrl_seg *ctrl; + struct mlx5_wqe_raddr_seg *raddr; +@@ -487,7 +605,7 @@ uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + inl = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); + inl->byte_count = htonl(length | MLX5_INLINE_SEG); + uct_ib_mlx5_inline_copy(inl + 1, buffer, length, txwq); +- fm_ce_se |= MLX5_WQE_CTRL_CQ_UPDATE; ++ fm_ce_se |= uct_rc_iface_tx_moderation(iface, txqp, MLX5_WQE_CTRL_CQ_UPDATE); + break; + + case MLX5_OPCODE_NOP: +@@ -503,7 +621,7 @@ uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + } + + uct_rc_mlx5_common_post_send(iface, qp_type, txqp, txwq, opcode, 0, fm_ce_se, +- wqe_size, av, grh_av, imm_val_be); ++ wqe_size, av, grh_av, imm_val_be, max_log_sge, NULL); + } + + /* +@@ -525,14 +643,16 @@ uct_rc_mlx5_txqp_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + * is a compile time constant + */ + static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + unsigned opcode_flags, const void *buffer, + unsigned length, uint32_t *lkey_p, + /* RDMA/ATOMIC */ uint64_t remote_addr, uct_rkey_t rkey, +- /* ATOMIC */ uint64_t compare_mask, uint64_t compare, uint64_t swap_add, ++ /* ATOMIC */ uint64_t compare_mask, uint64_t compare, ++ /* ATOMIC */ uint64_t swap_mask, uint64_t swap_add, + /* AV */ uct_ib_mlx5_base_av_t *av, struct mlx5_grh_av *grh_av, +- size_t av_size, uint8_t fm_ce_se, uint32_t imm_val_be) ++ size_t av_size, uint8_t fm_ce_se, uint32_t imm_val_be, ++ int max_log_sge, uct_ib_log_sge_t *log_sge) + { + struct mlx5_wqe_ctrl_seg *ctrl; + struct mlx5_wqe_raddr_seg *raddr; +@@ -541,6 +661,7 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + struct uct_ib_mlx5_atomic_masked_cswap32_seg *masked_cswap32; + struct uct_ib_mlx5_atomic_masked_fadd32_seg *masked_fadd32; + struct uct_ib_mlx5_atomic_masked_cswap64_seg *masked_cswap64; ++ struct uct_ib_mlx5_atomic_masked_fadd64_seg *masked_fadd64; + size_t wqe_size, ctrl_av_size; + uint8_t opmod; + void *next_seg; +@@ -613,7 +734,7 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + masked_cswap32 = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); + masked_cswap32->swap = swap_add; + masked_cswap32->compare = compare; +- masked_cswap32->swap_mask = (uint32_t)-1; ++ masked_cswap32->swap_mask = swap_mask; + masked_cswap32->compare_mask = compare_mask; + dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_cswap32 + 1); + wqe_size = ctrl_av_size + sizeof(*raddr) + +@@ -627,7 +748,7 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + + /* 2nd half of masked_cswap64 can wrap */ + masked_cswap64 = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_cswap64 + 1); +- masked_cswap64->swap = (uint64_t)-1; ++ masked_cswap64->swap = swap_mask; + masked_cswap64->compare = compare_mask; + + dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_cswap64 + 1); +@@ -641,18 +762,33 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + break; + + case MLX5_OPCODE_ATOMIC_MASKED_FA: +- ucs_assert(length == sizeof(uint32_t)); +- raddr = uct_ib_mlx5_txwq_wrap_exact(txwq, (void*)ctrl + ctrl_av_size); ++ raddr = next_seg; + uct_ib_mlx5_ep_set_rdma_seg(raddr, remote_addr, rkey); + +- opmod = UCT_IB_MLX5_OPMOD_EXT_ATOMIC(2); +- masked_fadd32 = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); +- masked_fadd32->add = swap_add; +- masked_fadd32->filed_boundary = 0; +- +- dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_fadd32 + 1); +- wqe_size = ctrl_av_size + sizeof(*raddr) + +- sizeof(*masked_fadd32) + sizeof(*dptr); ++ switch (length) { ++ case sizeof(uint32_t): ++ opmod = UCT_IB_MLX5_OPMOD_EXT_ATOMIC(2); ++ masked_fadd32 = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); ++ masked_fadd32->add = swap_add; ++ masked_fadd32->filed_boundary = compare; ++ ++ dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_fadd32 + 1); ++ wqe_size = ctrl_av_size + sizeof(*raddr) + ++ sizeof(*masked_fadd32) + sizeof(*dptr); ++ break; ++ case sizeof(uint64_t): ++ opmod = UCT_IB_MLX5_OPMOD_EXT_ATOMIC(3); /* Ext. atomic, size 2**3 */ ++ masked_fadd64 = uct_ib_mlx5_txwq_wrap_none(txwq, raddr + 1); ++ masked_fadd64->add = swap_add; ++ masked_fadd64->filed_boundary = compare; ++ ++ dptr = uct_ib_mlx5_txwq_wrap_exact(txwq, masked_fadd64 + 1); ++ wqe_size = ctrl_av_size + sizeof(*raddr) + ++ sizeof(*masked_fadd64) + sizeof(*dptr); ++ break; ++ default: ++ ucs_fatal("invalid atomic type length %d", length); ++ } + uct_ib_mlx5_set_data_seg(dptr, buffer, length, *lkey_p); + break; + +@@ -661,12 +797,13 @@ uct_rc_mlx5_txqp_dptr_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, + } + + uct_rc_mlx5_common_post_send(iface, qp_type, txqp, txwq, +- (opcode_flags & UCT_RC_MLX5_OPCODE_MASK), +- opmod, fm_ce_se, wqe_size, av, grh_av, imm_val_be); ++ (opcode_flags & UCT_RC_MLX5_OPCODE_MASK), opmod, ++ fm_ce_se, wqe_size, av, grh_av, imm_val_be, ++ max_log_sge, log_sge); + } + + static UCS_F_ALWAYS_INLINE +-void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + unsigned opcode_flags, + /* IOV */ const uct_iov_t *iov, size_t iovcnt, +@@ -674,7 +811,7 @@ void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_t + /* RDMA */ uint64_t remote_addr, uct_rkey_t rkey, + /* TAG */ uct_tag_t tag, uint32_t app_ctx, uint32_t ib_imm_be, + /* AV */ uct_ib_mlx5_base_av_t *av, struct mlx5_grh_av *grh_av, +- size_t av_size, uint8_t fm_ce_se) ++ size_t av_size, uint8_t fm_ce_se, int max_log_sge) + { + struct mlx5_wqe_ctrl_seg *ctrl; + struct mlx5_wqe_raddr_seg *raddr; +@@ -713,7 +850,7 @@ void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_t + wqe_size = ctrl_av_size + inl_seg_size + + uct_ib_mlx5_set_data_seg_iov(txwq, dptr, iov, iovcnt); + +- ucs_assert(wqe_size <= (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB)); ++ ucs_assert(wqe_size <= UCT_IB_MLX5_MAX_SEND_WQE_SIZE); + break; + + #if IBV_EXP_HW_TM +@@ -727,9 +864,9 @@ void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_t + wqe_size = ctrl_av_size + inl_seg_size + + uct_ib_mlx5_set_data_seg_iov(txwq, dptr, iov, iovcnt); + +- uct_rc_iface_fill_tmh((struct ibv_exp_tmh*)(inl + 1), tag, app_ctx, +- IBV_EXP_TMH_EAGER); +- ucs_assert(wqe_size <= (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB)); ++ uct_rc_mlx5_fill_tmh((struct ibv_exp_tmh*)(inl + 1), tag, app_ctx, ++ IBV_EXP_TMH_EAGER); ++ ucs_assert(wqe_size <= UCT_IB_MLX5_MAX_SEND_WQE_SIZE); + break; + #endif + +@@ -753,7 +890,8 @@ void uct_rc_mlx5_txqp_dptr_post_iov(uct_rc_iface_t *iface, enum ibv_qp_type qp_t + + uct_rc_mlx5_common_post_send(iface, qp_type, txqp, txwq, + opcode_flags & UCT_RC_MLX5_OPCODE_MASK, +- 0, fm_ce_se, wqe_size, av, grh_av, ib_imm_be); ++ 0, fm_ce_se, wqe_size, av, grh_av, ib_imm_be, ++ max_log_sge, NULL); + } + + #if IBV_EXP_HW_TM +@@ -778,8 +916,8 @@ uct_rc_mlx5_set_tm_seg(uct_ib_mlx5_txwq_t *txwq, + return; + } + +- tmseg->append_tag = htobe64(tag); +- tmseg->append_mask = htobe64(mask); ++ tmseg->append_tag = tag; ++ tmseg->append_mask = mask; + } + + static UCS_F_ALWAYS_INLINE void +@@ -805,7 +943,7 @@ uct_rc_mlx5_add_cmd_qp_op(uct_rc_mlx5_iface_common_t *iface, + } + + static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_txqp_tag_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type, ++uct_rc_mlx5_txqp_tag_inline_post(uct_rc_iface_t *iface, int qp_type, + uct_rc_txqp_t *txqp, uct_ib_mlx5_txwq_t *txwq, + unsigned opcode, const void *buffer, unsigned length, + const uct_iov_t *iov, /* relevant for RNDV */ +@@ -845,7 +983,7 @@ uct_rc_mlx5_txqp_tag_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type + ((uct_ib_mem_t*)iov->memh)->mr->rkey, iov->length); + uct_ib_mlx5_inline_copy(tmh + 1, &rvh, sizeof(rvh), txwq); + +- if (qp_type == IBV_EXP_QPT_DC_INI) { ++ if (qp_type == UCT_IB_QPT_DCI) { + /* RAVH can be wrapped as well */ + ravh_ptr = uct_ib_mlx5_txwq_wrap_data(txwq, (char*)tmh + + sizeof(*tmh) + sizeof(rvh)); +@@ -870,16 +1008,16 @@ uct_rc_mlx5_txqp_tag_inline_post(uct_rc_iface_t *iface, enum ibv_qp_type qp_type + break; + } + +- ucs_assert(wqe_size <= (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB)); ++ ucs_assert(wqe_size <= UCT_IB_MLX5_MAX_SEND_WQE_SIZE); + +- uct_rc_iface_fill_tmh(tmh, tag, app_ctx, tm_op); ++ uct_rc_mlx5_fill_tmh(tmh, tag, app_ctx, tm_op); + + /* In case of RNDV first bytes of data could be stored in TMH */ + uct_ib_mlx5_inline_copy(data, (char*)buffer + tmh_data_len, length, txwq); + fm_ce_se |= uct_rc_iface_tx_moderation(iface, txqp, MLX5_WQE_CTRL_CQ_UPDATE); + + uct_rc_mlx5_common_post_send(iface, qp_type, txqp, txwq, opcode, 0, fm_ce_se, +- wqe_size, av, grh_av, imm_val_be); ++ wqe_size, av, grh_av, imm_val_be, INT_MAX, NULL); + } + + static UCS_F_ALWAYS_INLINE void +@@ -951,6 +1089,9 @@ uct_rc_mlx5_iface_common_tag_recv(uct_rc_mlx5_iface_common_t *iface, + tag_mask, + UCT_RC_MLX5_SRQ_FLAG_TM_CQE_REQ | + UCT_RC_MLX5_SRQ_FLAG_TM_SW_CNT); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_ADD); ++ + return UCS_OK; + } + +@@ -978,6 +1119,9 @@ uct_rc_mlx5_iface_common_tag_recv_cancel(uct_rc_mlx5_iface_common_t *iface, + UCT_RC_MLX5_TM_OPCODE_REMOVE, index, + rc_iface->tm.unexpected_cnt, 0ul, 0ul, + flags); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_DEL); ++ + return UCS_OK; + } + +@@ -1018,8 +1162,8 @@ uct_rc_mlx5_iface_tag_consumed(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + /* Need to save TMH info, which will be used when + * UCT_RC_MLX5_CQE_APP_OP_TM_EXPECTED CQE is received */ + priv = uct_rc_iface_ctx_priv(ctx); +- priv->tag = be64toh(tmh->tag); +- priv->app_ctx = ntohl(tmh->app_ctx); ++ priv->tag = tmh->tag; ++ priv->app_ctx = tmh->app_ctx; + } + } + +@@ -1052,8 +1196,10 @@ uct_rc_mlx5_iface_handle_expected(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + + if (UCT_RC_MLX5_TM_IS_SW_RNDV(cqe, imm_data)) { + ctx->rndv_cb(ctx, tag, priv->buffer, byte_len, UCS_OK); ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_REQ_EXP); + } else { + ctx->completed_cb(ctx, tag, imm_data, byte_len, UCS_OK); ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_EXP); + } + } + +@@ -1075,6 +1221,8 @@ uct_rc_mlx5_iface_unexp_consumed(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + UCT_RC_MLX5_TM_OPCODE_NOP, 0, + rc_iface->tm.unexpected_cnt, 0ul, 0ul, + UCT_RC_MLX5_SRQ_FLAG_TM_SW_CNT); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_SYNC); + } + } + +@@ -1091,41 +1239,51 @@ uct_rc_mlx5_iface_tag_handle_unexp(uct_rc_mlx5_iface_common_t *mlx5_common_iface + tmh = uct_rc_mlx5_iface_common_data(mlx5_common_iface, rc_iface, cqe, + byte_len, &flags); + +- switch (tmh->opcode) { +- case IBV_EXP_TMH_EAGER: ++ if (ucs_likely((tmh->opcode == IBV_EXP_TMH_EAGER) && ++ !UCT_RC_MLX5_TM_CQE_WITH_IMM(cqe))) { ++ status = rc_iface->tm.eager_unexp.cb(rc_iface->tm.eager_unexp.arg, ++ tmh + 1, byte_len - sizeof(*tmh), ++ flags, tmh->tag, 0); ++ ++ uct_rc_mlx5_iface_unexp_consumed(mlx5_common_iface, rc_iface, ++ &rc_iface->tm.eager_desc, status, ++ ntohs(cqe->wqe_counter)); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_EAGER_UNEXP); ++ ++ } else if (tmh->opcode == IBV_EXP_TMH_EAGER) { + imm_data = uct_rc_iface_tag_imm_data_unpack(cqe->imm_inval_pkey, +- ntohl(tmh->app_ctx), +- (cqe->op_own >> 4) == +- MLX5_CQE_RESP_SEND_IMM); ++ tmh->app_ctx, 1); + +- if (UCT_RC_MLX5_TM_IS_SW_RNDV(cqe, cqe->imm_inval_pkey)) { ++ if (ucs_unlikely(!imm_data)) { ++ /* Opcode is WITH_IMM, but imm_data is 0 - this must be SW RNDV */ + status = rc_iface->tm.rndv_unexp.cb(rc_iface->tm.rndv_unexp.arg, +- flags, be64toh(tmh->tag), tmh + 1, ++ flags, tmh->tag, tmh + 1, + byte_len - sizeof(*tmh), + 0ul, 0, NULL); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_REQ_UNEXP); + } else { + status = rc_iface->tm.eager_unexp.cb(rc_iface->tm.eager_unexp.arg, + tmh + 1, byte_len - sizeof(*tmh), +- flags, be64toh(tmh->tag), +- imm_data); ++ flags, tmh->tag, imm_data); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_EAGER_UNEXP); + } + + uct_rc_mlx5_iface_unexp_consumed(mlx5_common_iface, rc_iface, + &rc_iface->tm.eager_desc, status, + ntohs(cqe->wqe_counter)); +- break; +- +- case IBV_EXP_TMH_RNDV: +- status = uct_rc_iface_handle_rndv(rc_iface, tmh, byte_len); ++ } else { ++ ucs_assertv_always(tmh->opcode == IBV_EXP_TMH_RNDV, ++ "Unsupported packet arrived %d", tmh->opcode); ++ status = uct_rc_iface_handle_rndv(rc_iface, tmh, tmh->tag, byte_len); + + uct_rc_mlx5_iface_unexp_consumed(mlx5_common_iface, rc_iface, + &rc_iface->tm.rndv_desc, status, + ntohs(cqe->wqe_counter)); +- break; + +- default: +- ucs_fatal("Unsupported packet arrived %d", tmh->opcode); +- break; ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_UNEXP); + } + } + +@@ -1176,6 +1334,14 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + #if IBV_EXP_HW_TM + ucs_assert(cqe->app == UCT_RC_MLX5_CQE_APP_TAG_MATCHING); + ++ /* Should be a fast path, because small (latency-critical) messages ++ * are not supposed to be offloaded to the HW. */ ++ if (ucs_likely(cqe->app_op == UCT_RC_MLX5_CQE_APP_OP_TM_UNEXPECTED)) { ++ uct_rc_mlx5_iface_tag_handle_unexp(mlx5_common_iface, rc_iface, cqe, ++ byte_len); ++ goto done; ++ } ++ + switch (cqe->app_op) { + case UCT_RC_MLX5_CQE_APP_OP_TM_APPEND: + uct_rc_mlx5_iface_handle_tm_list_op(mlx5_common_iface, +@@ -1196,19 +1362,16 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + byte_len); + } else { + ucs_assert(tmh->opcode == IBV_EXP_TMH_FIN); +- uct_rc_iface_handle_rndv_fin(rc_iface, tmh); ++ uct_rc_iface_handle_rndv_fin(rc_iface, tmh->app_ctx); + seg = uct_ib_mlx5_srq_get_wqe(&mlx5_common_iface->rx.srq, + ntohs(cqe->wqe_counter)); + + uct_rc_mlx5_iface_release_srq_seg(mlx5_common_iface, rc_iface, seg, + ntohs(cqe->wqe_counter), UCS_OK, 0, + NULL); +- } +- break; + +- case UCT_RC_MLX5_CQE_APP_OP_TM_UNEXPECTED: +- uct_rc_mlx5_iface_tag_handle_unexp(mlx5_common_iface, rc_iface, cqe, +- byte_len); ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_FIN); ++ } + break; + + case UCT_RC_MLX5_CQE_APP_OP_TM_CONSUMED: +@@ -1223,8 +1386,7 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, + UCT_RC_MLX5_CQE_APP_OP_TM_CONSUMED_MSG); + + uct_rc_mlx5_iface_handle_expected(mlx5_common_iface, rc_iface, cqe, +- byte_len, be64toh(tmh->tag), +- ntohl(tmh->app_ctx)); ++ byte_len, tmh->tag, tmh->app_ctx); + break; + + case UCT_RC_MLX5_CQE_APP_OP_TM_EXPECTED: +@@ -1249,4 +1411,179 @@ done: + return count; + } + ++#if HAVE_IBV_EXP_DM ++/* DM memory should be written by 8 bytes to eliminate ++ * processor cache issues. To make this used uct_rc_mlx5_dm_copy_data_t ++ * datatype where first hdr_len bytes are filled by message header ++ * and tail is filled by head of message. */ ++static void UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_iface_common_copy_to_dm(uct_rc_mlx5_dm_copy_data_t *cache, size_t hdr_len, ++ const void *payload, size_t length, void *dm, ++ uct_ib_log_sge_t *log_sge) ++{ ++ typedef uint64_t misaligned_t UCS_V_ALIGNED(1); ++ ++ uint64_t padding = 0; /* init by 0 to suppress valgrind error */ ++ size_t head = (cache && hdr_len) ? ucs_min(length, sizeof(*cache) - hdr_len) : 0; ++ size_t body = ucs_align_down(length - head, sizeof(padding)); ++ size_t tail = length - (head + body); ++ char *dst = dm; ++ int i = 0; ++ ++ ucs_assert(sizeof(*cache) >= hdr_len); ++ ucs_assert(head + body + tail == length); ++ ucs_assert(tail < sizeof(padding)); ++ ++ /* copy head of payload to tail of cache */ ++ memcpy(cache->bytes + hdr_len, payload, head); ++ ++ UCS_STATIC_ASSERT(sizeof(*cache) == sizeof(cache->bytes)); ++ UCS_STATIC_ASSERT(sizeof(log_sge->sg_list) / sizeof(log_sge->sg_list[0]) >= 2); ++ ++ /* condition is static-evaluated */ ++ if (cache && hdr_len) { ++ /* atomically by 8 bytes copy data to DM */ ++ /* cache buffer must be aligned, so, source data type is aligned */ ++ UCS_WORD_COPY(volatile uint64_t, dst, uint64_t, cache->bytes, sizeof(cache->bytes)); ++ dst += sizeof(cache->bytes); ++ if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { ++ log_sge->sg_list[0].addr = (uint64_t)cache; ++ log_sge->sg_list[0].length = (uint32_t)hdr_len; ++ i++; ++ } ++ } ++ if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { ++ log_sge->sg_list[i].addr = (uint64_t)payload; ++ log_sge->sg_list[i].length = (uint32_t)length; ++ i++; ++ } ++ log_sge->num_sge = i; ++ ++ /* copy payload to DM */ ++ UCS_WORD_COPY(volatile uint64_t, dst, misaligned_t, payload + head, body); ++ if (tail) { ++ dst += body; ++ memcpy(&padding, payload + head + body, tail); ++ /* use uint64_t for source datatype because it is aligned buffer on stack */ ++ UCS_WORD_COPY(volatile uint64_t, dst, uint64_t, &padding, sizeof(padding)); ++ } ++} ++ ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_common_dm_make_data(uct_rc_mlx5_iface_common_t *iface, ++ uct_rc_iface_t *rc_iface, ++ uct_rc_mlx5_dm_copy_data_t *cache, ++ size_t hdr_len, const void *payload, ++ unsigned length, ++ uct_rc_iface_send_desc_t **desc_p, ++ void **buffer_p, uct_ib_log_sge_t *log_sge) ++{ ++ uct_rc_iface_send_desc_t *desc; ++ void *buffer; ++ ++ ucs_assert(iface->dm.dm != NULL); ++ ucs_assert(log_sge != NULL); ++ ++ desc = ucs_mpool_get_inline(&iface->dm.dm->mp); ++ if (ucs_unlikely(desc == NULL)) { ++ /* in case if no resources available - fallback to bcopy */ ++ UCT_RC_IFACE_GET_TX_DESC(rc_iface, &rc_iface->tx.mp, desc); ++ desc->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; ++ buffer = desc + 1; ++ ++ /* condition is static-evaluated, no performance penalty */ ++ if (cache && hdr_len) { ++ memcpy(buffer, cache->bytes, hdr_len); ++ } ++ memcpy(UCS_PTR_BYTE_OFFSET(buffer, hdr_len), payload, length); ++ log_sge->num_sge = 0; ++ } else { ++ /* desc must be partially initialized by mpool. ++ * hint to valgrind to make it defined */ ++ VALGRIND_MAKE_MEM_DEFINED(desc, sizeof(*desc)); ++ ucs_assert(desc->super.buffer != NULL); ++ buffer = (void*)(desc->super.buffer - iface->dm.dm->start_va); ++ ++ uct_rc_mlx5_iface_common_copy_to_dm(cache, hdr_len, payload, ++ length, desc->super.buffer, log_sge); ++ if (ucs_log_is_enabled(UCS_LOG_LEVEL_TRACE_DATA)) { ++ log_sge->sg_list[0].lkey = log_sge->sg_list[1].lkey = desc->lkey; ++ log_sge->inline_bitmap = 0; ++ } ++ } ++ ++ *desc_p = desc; ++ *buffer_p = buffer; ++ return UCS_OK; ++} ++#endif ++ ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_iface_common_atomic_data(unsigned opcode, unsigned size, uint64_t value, ++ int *op, uint64_t *compare_mask, uint64_t *compare, ++ uint64_t *swap_mask, uint64_t *swap, int *ext) ++{ ++ ucs_assert((size == sizeof(uint64_t)) || (size == sizeof(uint32_t))); ++ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ switch (size) { ++ case sizeof(uint64_t): ++ *op = MLX5_OPCODE_ATOMIC_FA; ++ *ext = 0; ++ break; ++ case sizeof(uint32_t): ++ *op = MLX5_OPCODE_ATOMIC_MASKED_FA; ++ *ext = 1; ++ break; ++ default: ++ ucs_assertv(0, "incorrect atomic size: %d", size); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ *compare_mask = 0; ++ *compare = 0; ++ *swap_mask = 0; ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ *op = MLX5_OPCODE_ATOMIC_MASKED_CS; ++ *compare_mask = 0; ++ *compare = 0; ++ *swap_mask = UCT_RC_MLX5_TO_BE(~value, size); ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ *ext = 1; ++ break; ++ case UCT_ATOMIC_OP_OR: ++ *op = MLX5_OPCODE_ATOMIC_MASKED_CS; ++ *compare_mask = 0; ++ *compare = 0; ++ *swap_mask = UCT_RC_MLX5_TO_BE(value, size); ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ *ext = 1; ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ *op = MLX5_OPCODE_ATOMIC_MASKED_FA; ++ *compare_mask = 0; ++ *compare = -1; ++ *swap_mask = 0; ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ *ext = 1; ++ break; ++ case UCT_ATOMIC_OP_SWAP: ++ *op = MLX5_OPCODE_ATOMIC_MASKED_CS; ++ *compare_mask = 0; ++ *compare = 0; ++ *swap_mask = -1; ++ *swap = UCT_RC_MLX5_TO_BE(value, size); ++ *ext = 1; ++ break; ++ default: ++ ucs_assertv(0, "incorrect atomic opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ return UCS_OK; ++} ++ ++ ++ + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_ep.c +index e839b058c..5c6599cb4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_ep.c +@@ -24,14 +24,15 @@ uct_rc_mlx5_txqp_bcopy_post(uct_rc_iface_t *iface, uct_rc_txqp_t *txqp, uct_ib_m + unsigned opcode, unsigned length, + /* RDMA */ uint64_t rdma_raddr, uct_rkey_t rdma_rkey, + uint8_t fm_ce_se, uint32_t imm_val_be, +- uct_rc_iface_send_desc_t *desc) ++ uct_rc_iface_send_desc_t *desc, const void *buffer, ++ uct_ib_log_sge_t *log_sge) + { + desc->super.sn = txwq->sw_pi; + uct_rc_mlx5_txqp_dptr_post(iface, IBV_QPT_RC, txqp, txwq, +- opcode, desc + 1, length, &desc->lkey, ++ opcode, buffer, length, &desc->lkey, + rdma_raddr, uct_ib_md_direct_rkey(rdma_rkey), +- 0, 0, 0, +- NULL, NULL, 0, fm_ce_se, imm_val_be); ++ 0, 0, 0, 0, ++ NULL, NULL, 0, fm_ce_se, imm_val_be, INT_MAX, log_sge); + uct_rc_txqp_add_send_op(txqp, &desc->super); + } + +@@ -61,89 +62,119 @@ uct_rc_mlx5_ep_zcopy_post(uct_rc_mlx5_ep_t *ep, + rdma_raddr, uct_ib_md_direct_rkey(rdma_rkey), + tag, app_ctx, ib_imm_be, + NULL, NULL, 0, +- (comp == NULL) ? force_sig : MLX5_WQE_CTRL_CQ_UPDATE); ++ (comp == NULL) ? force_sig : MLX5_WQE_CTRL_CQ_UPDATE, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super)); + + uct_rc_txqp_add_send_comp(iface, &ep->super.txqp, comp, sn); + return UCS_INPROGRESS; + } + +-static UCS_F_ALWAYS_INLINE void +-uct_rc_mlx5_ep_atomic_post(uct_rc_mlx5_ep_t *ep, unsigned opcode, +- uct_rc_iface_send_desc_t *desc, unsigned length, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t compare_mask, uint64_t compare, +- uint64_t swap_add, int signal) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_put_short_inline(uct_ep_h tl_ep, const void *buffer, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- uct_rc_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, +- uct_rc_iface_t); +- uint32_t ib_rkey = uct_ib_resolve_atomic_rkey(rkey, ep->super.atomic_mr_offset, +- &remote_addr); ++ uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); + +- desc->super.sn = ep->tx.wq.sw_pi; +- uct_rc_mlx5_txqp_dptr_post(iface, IBV_QPT_RC, +- &ep->super.txqp, &ep->tx.wq, +- opcode, desc + 1, length, &desc->lkey, +- remote_addr, ib_rkey, +- compare_mask, compare, swap_add, +- NULL, NULL, 0, signal, 0); ++ UCT_RC_MLX5_CHECK_PUT_SHORT(length, 0); ++ UCT_RC_CHECK_RES(iface, &ep->super); + +- UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_rc_txqp_add_send_op(&ep->super.txqp, &desc->super); ++ uct_rc_mlx5_txqp_inline_post(iface, IBV_QPT_RC, ++ &ep->super.txqp, &ep->tx.wq, ++ MLX5_OPCODE_RDMA_WRITE, ++ buffer, length, 0, 0, 0, ++ remote_addr, uct_ib_md_direct_rkey(rkey), ++ NULL, NULL, 0, 0, INT_MAX); ++ UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); ++ return UCS_OK; + } + +-static UCS_F_ALWAYS_INLINE ucs_status_t +-uct_rc_mlx5_ep_atomic(uct_rc_mlx5_ep_t *ep, int opcode, void *result, int ext, +- unsigned length, uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t compare_mask, uint64_t compare, +- uint64_t swap_add, uct_completion_t *comp) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_am_short_inline(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *payload, unsigned length) + { +- uct_rc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, +- uct_rc_mlx5_iface_t); +- uct_rc_iface_send_desc_t *desc; ++ uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); + +- UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->mlx5_common.tx.atomic_desc_mp, desc, +- uct_rc_iface_atomic_handler(&iface->super, ext, length), +- result, comp); +- uct_rc_mlx5_ep_atomic_post(ep, opcode, desc, length, remote_addr, rkey, +- compare_mask, compare, swap_add, +- MLX5_WQE_CTRL_CQ_UPDATE); +- return UCS_INPROGRESS; ++ UCT_RC_MLX5_CHECK_AM_SHORT(id, length, 0); ++ ++ UCT_RC_CHECK_RES(iface, &ep->super); ++ UCT_RC_CHECK_FC(iface, &ep->super, id); ++ ++ uct_rc_mlx5_txqp_inline_post(iface, IBV_QPT_RC, ++ &ep->super.txqp, &ep->tx.wq, ++ MLX5_OPCODE_SEND, ++ payload, length, ++ id, hdr, 0, ++ 0, 0, ++ NULL, NULL, 0, ++ MLX5_WQE_CTRL_SOLICITED, ++ INT_MAX); ++ UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); ++ UCT_RC_UPDATE_FC(iface, &ep->super, id); ++ return UCS_OK; + } + +-static UCS_F_ALWAYS_INLINE ucs_status_t +-uct_rc_mlx5_ep_atomic_add(uct_ep_h tl_ep, int opcode, unsigned length, +- uint64_t add, uint64_t remote_addr, uct_rkey_t rkey) ++#if HAVE_IBV_EXP_DM ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_short_dm(uct_rc_mlx5_ep_t *ep, uct_rc_mlx5_dm_copy_data_t *cache, ++ size_t hdr_len, const void *payload, unsigned length, ++ unsigned opcode, uint8_t fm_ce_se, ++ uint64_t rdma_raddr, uct_rkey_t rdma_rkey) + { +- uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); +- uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; + uct_rc_iface_send_desc_t *desc; ++ void *buffer; ++ ucs_status_t status; ++ uct_ib_log_sge_t log_sge; + +- UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super, &iface->mlx5_common.tx.atomic_desc_mp, desc); ++ status = uct_rc_mlx5_common_dm_make_data(&iface->mlx5_common, &iface->super, ++ cache, hdr_len, payload, length, &desc, ++ &buffer, &log_sge); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } + +- uct_rc_mlx5_ep_atomic_post(ep, opcode, desc, length, remote_addr, rkey, 0, +- 0, add, 0); ++ uct_rc_mlx5_txqp_bcopy_post(rc_iface, &ep->super.txqp, &ep->tx.wq, ++ opcode, hdr_len + length, ++ rdma_raddr, rdma_rkey, fm_ce_se, ++ 0, desc, buffer, ++ log_sge.num_sge ? &log_sge : NULL); + return UCS_OK; + } ++#endif + +-ucs_status_t uct_rc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, unsigned length, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t ++uct_rc_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); +- uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++#if HAVE_IBV_EXP_DM ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ ucs_status_t status; + +- UCT_RC_MLX5_CHECK_PUT_SHORT(length, 0); +- UCT_RC_CHECK_RES(iface, &ep->super); ++ if (ucs_likely((length <= UCT_IB_MLX5_PUT_MAX_SHORT(0)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_rc_mlx5_ep_put_short_inline(tl_ep, buffer, length, remote_addr, rkey); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length, 0, iface->mlx5_common.dm.seg_len, "put_short"); ++ UCT_RC_CHECK_RES(rc_iface, &ep->super); ++ status = uct_rc_mlx5_ep_short_dm(ep, NULL, 0, buffer, length, ++ MLX5_OPCODE_RDMA_WRITE, ++ MLX5_WQE_CTRL_CQ_UPDATE, ++ remote_addr, rkey); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } + +- uct_rc_mlx5_txqp_inline_post(iface, IBV_QPT_RC, +- &ep->super.txqp, &ep->tx.wq, +- MLX5_OPCODE_RDMA_WRITE, +- buffer, length, 0, 0, 0, +- remote_addr, uct_ib_md_direct_rkey(rkey), +- NULL, NULL, 0, 0); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); + return UCS_OK; ++#endif + } + + ssize_t uct_rc_mlx5_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, +@@ -160,7 +191,8 @@ ssize_t uct_rc_mlx5_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + + uct_rc_mlx5_txqp_bcopy_post(iface, &ep->super.txqp, &ep->tx.wq, + MLX5_OPCODE_RDMA_WRITE, length, remote_addr, +- rkey, MLX5_WQE_CTRL_CQ_UPDATE, 0, desc); ++ rkey, MLX5_WQE_CTRL_CQ_UPDATE, 0, desc, desc + 1, ++ NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, BCOPY, length); + return length; + } +@@ -203,7 +235,8 @@ ucs_status_t uct_rc_mlx5_ep_get_bcopy(uct_ep_h tl_ep, + + uct_rc_mlx5_txqp_bcopy_post(iface, &ep->super.txqp, &ep->tx.wq, + MLX5_OPCODE_RDMA_READ, length, remote_addr, +- rkey, MLX5_WQE_CTRL_CQ_UPDATE, 0, desc); ++ rkey, MLX5_WQE_CTRL_CQ_UPDATE, 0, desc, desc + 1, ++ NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, GET, BCOPY, length); + return UCS_INPROGRESS; + } +@@ -230,28 +263,45 @@ ucs_status_t uct_rc_mlx5_ep_get_zcopy(uct_ep_h tl_ep, const uct_iov_t *iov, size + return status; + } + +-ucs_status_t uct_rc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, +- const void *payload, unsigned length) ++ucs_status_t ++uct_rc_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, ++ const void *payload, unsigned length) + { +- uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); +- uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++#if HAVE_IBV_EXP_DM ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ ucs_status_t status; ++ uct_rc_mlx5_dm_copy_data_t cache; + +- UCT_RC_MLX5_CHECK_AM_SHORT(id, length, 0); ++ if (ucs_likely((sizeof(uct_rc_am_short_hdr_t) + length <= UCT_IB_MLX5_AM_MAX_SHORT(0)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_rc_mlx5_ep_am_short_inline(tl_ep, id, hdr, payload, length); ++#if HAVE_IBV_EXP_DM ++ } + +- UCT_RC_CHECK_RES(iface, &ep->super); +- UCT_RC_CHECK_FC(iface, &ep->super, id); ++ UCT_CHECK_LENGTH(length + sizeof(uct_rc_am_short_hdr_t), 0, ++ iface->mlx5_common.dm.seg_len, "am_short"); ++ UCT_CHECK_AM_ID(id); ++ UCT_RC_CHECK_RES(rc_iface, &ep->super); ++ UCT_RC_CHECK_FC(rc_iface, &ep->super, id); + +- uct_rc_mlx5_txqp_inline_post(iface, IBV_QPT_RC, +- &ep->super.txqp, &ep->tx.wq, +- MLX5_OPCODE_SEND, +- payload, length, +- id, hdr, 0, +- 0, 0, +- NULL, NULL, 0, +- MLX5_WQE_CTRL_SOLICITED); +- UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); +- UCT_RC_UPDATE_FC(iface, &ep->super, id); ++ uct_rc_am_hdr_fill(&cache.am_hdr.rc_hdr, id); ++ cache.am_hdr.am_hdr = hdr; ++ ++ status = uct_rc_mlx5_ep_short_dm(ep, &cache, sizeof(cache.am_hdr), payload, length, ++ MLX5_OPCODE_SEND, ++ MLX5_WQE_CTRL_SOLICITED | MLX5_WQE_CTRL_CQ_UPDATE, ++ 0, 0); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(cache.am_hdr) + length); ++ UCT_RC_UPDATE_FC(rc_iface, &ep->super, id); + return UCS_OK; ++#endif + } + + ssize_t uct_rc_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, +@@ -271,7 +321,8 @@ ssize_t uct_rc_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + + uct_rc_mlx5_txqp_bcopy_post(iface, &ep->super.txqp, &ep->tx.wq, + MLX5_OPCODE_SEND, sizeof(uct_rc_hdr_t) + length, +- 0, 0, MLX5_WQE_CTRL_SOLICITED, 0, desc); ++ 0, 0, MLX5_WQE_CTRL_SOLICITED, 0, desc, desc + 1, ++ NULL); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); + UCT_RC_UPDATE_FC(iface, &ep->super, id); + return length; +@@ -303,78 +354,157 @@ ucs_status_t uct_rc_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *hea + return status; + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++static UCS_F_ALWAYS_INLINE void ++uct_rc_mlx5_ep_atomic_post(uct_rc_mlx5_ep_t *ep, unsigned opcode, ++ uct_rc_iface_send_desc_t *desc, unsigned length, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t compare_mask, uint64_t compare, ++ uint64_t swap_mask, uint64_t swap_add, int signal) ++{ ++ uct_rc_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, ++ uct_rc_iface_t); ++ uint32_t ib_rkey = uct_ib_resolve_atomic_rkey(rkey, ep->super.atomic_mr_offset, ++ &remote_addr); ++ ++ desc->super.sn = ep->tx.wq.sw_pi; ++ uct_rc_mlx5_txqp_dptr_post(iface, IBV_QPT_RC, ++ &ep->super.txqp, &ep->tx.wq, ++ opcode, desc + 1, length, &desc->lkey, ++ remote_addr, ib_rkey, ++ compare_mask, compare, swap_mask, swap_add, ++ NULL, NULL, 0, signal, 0, INT_MAX, NULL); ++ ++ UCT_TL_EP_STAT_ATOMIC(&ep->super.super); ++ uct_rc_txqp_add_send_op(&ep->super.txqp, &desc->super); ++} ++ ++static UCS_F_ALWAYS_INLINE ucs_status_t ++uct_rc_mlx5_ep_atomic_fop(uct_rc_mlx5_ep_t *ep, int opcode, void *result, int ext, ++ unsigned length, uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t compare_mask, uint64_t compare, ++ uint64_t swap_mask, uint64_t swap_add, uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic_add(tl_ep, MLX5_OPCODE_ATOMIC_FA, sizeof(uint64_t), +- htobe64(add), remote_addr, rkey); ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, ++ uct_rc_mlx5_iface_t); ++ uct_rc_iface_send_desc_t *desc; ++ ++ UCT_RC_CHECK_RES(&iface->super, &ep->super); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super, &iface->mlx5_common.tx.atomic_desc_mp, ++ desc, uct_rc_iface_atomic_handler(&iface->super, ext, ++ length), ++ result, comp); ++ uct_rc_mlx5_ep_atomic_post(ep, opcode, desc, length, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap_add, ++ MLX5_WQE_CTRL_CQ_UPDATE); ++ return UCS_INPROGRESS; + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_atomic_op_post(uct_ep_h tl_ep, unsigned opcode, unsigned size, ++ uint64_t value, uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_FA, result, 0, sizeof(uint64_t), +- remote_addr, rkey, 0, 0, htobe64(add), comp); ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ uct_rc_iface_send_desc_t *desc; ++ int op; ++ uint64_t compare_mask; ++ uint64_t compare; ++ uint64_t swap_mask; ++ uint64_t swap; ++ int ext; /* not used here */ ++ ucs_status_t status; ++ ++ UCT_RC_CHECK_RES(&iface->super, &ep->super); ++ UCT_RC_MLX5_CHECK_ATOMIC_OPS(opcode, size, UCT_RC_MLX5_ATOMIC_OPS); ++ ++ status = uct_rc_mlx5_iface_common_atomic_data(opcode, size, value, &op, &compare_mask, ++ &compare, &swap_mask, &swap, &ext); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->mlx5_common.tx.atomic_desc_mp, desc); ++ ++ uct_rc_mlx5_ep_atomic_post(ep, op, desc, size, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap, 0); ++ return UCS_OK; + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_atomic_fop_post(uct_ep_h tl_ep, unsigned opcode, unsigned size, ++ uint64_t value, void *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint64_t), remote_addr, rkey, 0, 0, +- htobe64(swap), comp); ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ int op; ++ uint64_t compare_mask; ++ uint64_t compare; ++ uint64_t swap_mask; ++ uint64_t swap; ++ int ext; ++ ucs_status_t status; ++ ++ UCT_RC_MLX5_CHECK_ATOMIC_OPS(opcode, size, UCT_RC_MLX5_ATOMIC_FOPS); ++ ++ status = uct_rc_mlx5_iface_common_atomic_data(opcode, size, value, &op, &compare_mask, ++ &compare, &swap_mask, &swap, &ext); ++ if (ucs_unlikely(UCS_STATUS_IS_ERR(status))) { ++ return status; ++ } ++ ++ return uct_rc_mlx5_ep_atomic_fop(ep, op, result, ext, size, remote_addr, rkey, ++ compare_mask, compare, swap_mask, swap, comp); + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_mlx5_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_CS, result, 0, sizeof(uint64_t), +- remote_addr, rkey, 0, htobe64(compare), htobe64(swap), +- comp); ++ return uct_rc_mlx5_ep_atomic_op_post(ep, opcode, sizeof(value), value, remote_addr, rkey); + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_rc_mlx5_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- return uct_rc_mlx5_ep_atomic_add(tl_ep, MLX5_OPCODE_ATOMIC_MASKED_FA, +- sizeof(uint32_t), htonl(add), remote_addr, +- rkey); ++ return uct_rc_mlx5_ep_atomic_op_post(ep, opcode, sizeof(value), value, remote_addr, rkey); + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_mlx5_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_FA, result, 1, +- sizeof(uint32_t), remote_addr, rkey, 0, 0, +- htonl(add), comp); ++ return uct_rc_mlx5_ep_atomic_fop_post(ep, opcode, sizeof(value), value, result, ++ remote_addr, rkey, comp); + } + +-ucs_status_t uct_rc_mlx5_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_mlx5_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint32_t), remote_addr, rkey, 0, 0, +- htonl(swap), comp); ++ return uct_rc_mlx5_ep_atomic_fop_post(ep, opcode, sizeof(value), value, result, ++ remote_addr, rkey, comp); ++} ++ ++ucs_status_t uct_rc_mlx5_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp) ++{ ++ return uct_rc_mlx5_ep_atomic_fop(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), ++ MLX5_OPCODE_ATOMIC_CS, result, 0, sizeof(uint64_t), ++ remote_addr, rkey, 0, htobe64(compare), -1, htobe64(swap), ++ comp); + } + + ucs_status_t uct_rc_mlx5_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp) + { +- return uct_rc_mlx5_ep_atomic(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), +- MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, +- sizeof(uint32_t), remote_addr, rkey, UCS_MASK(32), +- htonl(compare), htonl(swap), comp); ++ return uct_rc_mlx5_ep_atomic_fop(ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t), ++ MLX5_OPCODE_ATOMIC_MASKED_CS, result, 1, ++ sizeof(uint32_t), remote_addr, rkey, UCS_MASK(32), ++ htonl(compare), -1, htonl(swap), comp); + } + + ucs_status_t uct_rc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, +@@ -398,14 +528,18 @@ ucs_status_t uct_rc_mlx5_ep_flush(uct_ep_h tl_ep, unsigned flags, + MLX5_OPCODE_NOP, NULL, 0, + 0, 0, 0, + 0, 0, +- NULL, NULL, 0, 0); ++ NULL, NULL, 0, 0, ++ INT_MAX); + } else { + sn = ep->tx.wq.sig_pi; + } + +- uct_rc_txqp_add_send_comp(&iface->super, &ep->super.txqp, comp, sn); +- UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super.super); +- return UCS_INPROGRESS; ++ status = uct_rc_txqp_add_flush_comp(&iface->super, &ep->super.txqp, comp, sn); ++ if (status == UCS_INPROGRESS) { ++ UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super.super); ++ } ++ ++ return status; + } + + ucs_status_t uct_rc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, +@@ -425,13 +559,16 @@ ucs_status_t uct_rc_mlx5_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + NULL, 0, + UCT_RC_EP_FC_PURE_GRANT, 0, 0, + 0, 0, +- NULL, NULL, 0, 0); ++ NULL, NULL, 0, 0, ++ INT_MAX); + return UCS_OK; + } + + #if IBV_EXP_HW_TM +-ucs_status_t uct_rc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, +- const void *data, size_t length) ++ ++static ucs_status_t UCS_F_ALWAYS_INLINE ++uct_rc_mlx5_ep_tag_eager_short_inline(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length) + { + uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); + uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); +@@ -444,9 +581,47 @@ ucs_status_t uct_rc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, + &ep->tx.wq, MLX5_OPCODE_SEND, data, length, + NULL, tag, 0, IBV_EXP_TMH_EAGER, 0, NULL, + NULL, 0, NULL, 0, MLX5_WQE_CTRL_SOLICITED); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ + return UCS_OK; + } + ++ucs_status_t uct_rc_mlx5_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, ++ const void *data, size_t length) ++{ ++#if HAVE_IBV_EXP_DM ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; ++ uct_rc_mlx5_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_mlx5_ep_t); ++ uct_rc_mlx5_dm_copy_data_t cache; ++ ucs_status_t status; ++ ++ if (ucs_likely((sizeof(struct ibv_exp_tmh) + length <= UCT_IB_MLX5_AM_MAX_SHORT(0)) || ++ !iface->mlx5_common.dm.dm)) { ++#endif ++ return uct_rc_mlx5_ep_tag_eager_short_inline(tl_ep, tag, data, length); ++#if HAVE_IBV_EXP_DM ++ } ++ ++ UCT_CHECK_LENGTH(length + sizeof(struct ibv_exp_tmh), 0, ++ iface->mlx5_common.dm.seg_len, "tag_short"); ++ UCT_RC_CHECK_RES(rc_iface, &ep->super); ++ ++ uct_rc_mlx5_fill_tmh(ucs_unaligned_ptr(&cache.tm_hdr), tag, 0, IBV_EXP_TMH_EAGER); ++ ++ status = uct_rc_mlx5_ep_short_dm(ep, &cache, sizeof(cache.tm_hdr), data, length, ++ MLX5_OPCODE_SEND, ++ MLX5_WQE_CTRL_SOLICITED | MLX5_WQE_CTRL_CQ_UPDATE, ++ 0, 0); ++ if (!UCS_STATUS_IS_ERR(status)) { ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ } ++ ++ return status; ++#endif ++} ++ + ssize_t uct_rc_mlx5_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + uint64_t imm, + uct_pack_callback_t pack_cb, +@@ -464,12 +639,16 @@ ssize_t uct_rc_mlx5_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + UCT_RC_IFACE_FILL_TM_IMM(imm, app_ctx, ib_imm, opcode, MLX5_OPCODE_SEND, + _IMM); + +- UCT_RC_IFACE_GET_TM_BCOPY_DESC(iface, &iface->tx.mp, desc, +- tag, app_ctx, pack_cb, arg, length); ++ UCT_RC_MLX5_IFACE_GET_TM_BCOPY_DESC(iface, &iface->tx.mp, desc, tag, ++ app_ctx, pack_cb, arg, length); + + uct_rc_mlx5_txqp_bcopy_post(iface, &ep->super.txqp, &ep->tx.wq, + opcode, sizeof(struct ibv_exp_tmh) + length, +- 0, 0, MLX5_WQE_CTRL_SOLICITED, ib_imm, desc); ++ 0, 0, MLX5_WQE_CTRL_SOLICITED, ib_imm, ++ desc, desc + 1, NULL); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, BCOPY, length); ++ + return length; + } + +@@ -483,7 +662,8 @@ ucs_status_t uct_rc_mlx5_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + uint32_t app_ctx, ib_imm; + int opcode; + +- UCT_CHECK_IOV_SIZE(iovcnt, 1ul, "uct_rc_mlx5_ep_tag_eager_zcopy"); ++ UCT_CHECK_IOV_SIZE(iovcnt, UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(0), ++ "uct_rc_mlx5_ep_tag_eager_zcopy"); + UCT_RC_CHECK_ZCOPY_DATA(sizeof(struct ibv_exp_tmh), + uct_iov_total_length(iov, iovcnt), + iface->super.config.seg_size); +@@ -491,6 +671,9 @@ ucs_status_t uct_rc_mlx5_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + UCT_RC_IFACE_FILL_TM_IMM(imm, app_ctx, ib_imm, opcode, MLX5_OPCODE_SEND, + _IMM); + ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ + return uct_rc_mlx5_ep_zcopy_post(ep, opcode|UCT_RC_MLX5_OPCODE_FLAG_TM, + iov, iovcnt, 0, "", 0, 0, 0, + tag, app_ctx, ib_imm, +@@ -557,7 +740,8 @@ UCS_CLASS_INIT_FUNC(uct_rc_mlx5_ep_t, uct_iface_h tl_iface) + + UCS_CLASS_CALL_SUPER_INIT(uct_rc_ep_t, &iface->super); + +- status = uct_ib_mlx5_txwq_init(iface->super.super.super.worker, &self->tx.wq, ++ status = uct_ib_mlx5_txwq_init(iface->super.super.super.worker, ++ iface->tx.mmio_mode, &self->tx.wq, + self->super.txqp.qp); + if (status != UCS_OK) { + ucs_error("Failed to get mlx5 QP information"); +@@ -570,9 +754,10 @@ UCS_CLASS_INIT_FUNC(uct_rc_mlx5_ep_t, uct_iface_h tl_iface) + return UCS_OK; + } + +-static void uct_rc_mlx5_ep_reset_qp(uct_rc_mlx5_ep_t *ep) ++static void uct_rc_mlx5_ep_clean_qp(uct_rc_mlx5_ep_t *ep, struct ibv_qp *qp) + { +- uct_rc_txqp_t *txqp = &ep->super.txqp; ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, ++ uct_rc_mlx5_iface_t); + + /* Make the HW generate CQEs for all in-progress SRQ receives from the QP, + * so we clean them all before ibv_modify_qp() can see them. +@@ -587,13 +772,24 @@ static void uct_rc_mlx5_ep_reset_qp(uct_rc_mlx5_ep_t *ep) + */ + memset(&qp_attr, 0, sizeof(qp_attr)); + qp_attr.qp_state = IBV_QPS_RESET; +- ret = ibv_cmd_modify_qp(txqp->qp, &qp_attr, IBV_QP_STATE, &cmd, sizeof(cmd)); ++ ret = ibv_cmd_modify_qp(qp, &qp_attr, IBV_QP_STATE, &cmd, sizeof(cmd)); + if (ret) { +- ucs_warn("modify qp 0x%x to RESET failed: %m", txqp->qp->qp_num); ++ ucs_warn("modify qp 0x%x to RESET failed: %m", qp->qp_num); + } + #else +- (void)uct_rc_modify_qp(txqp, IBV_QPS_ERR); ++ (void)uct_ib_modify_qp(qp, IBV_QPS_ERR); + #endif ++ ++ iface->super.rx.srq.available += uct_rc_mlx5_iface_commom_clean( ++ &iface->mlx5_common.cq[UCT_IB_DIR_RX], ++ &iface->mlx5_common.rx.srq, qp->qp_num); ++ ++ /* Synchronize CQ index with the driver, since it would remove pending ++ * completions for this QP (both send and receive) during ibv_destroy_qp(). ++ */ ++ uct_rc_mlx5_iface_common_update_cqs_ci(&iface->mlx5_common, &iface->super.super); ++ (void)uct_ib_modify_qp(qp, IBV_QPS_RESET); ++ uct_rc_mlx5_iface_common_sync_cqs_ci(&iface->mlx5_common, &iface->super.super); + } + + static UCS_CLASS_CLEANUP_FUNC(uct_rc_mlx5_ep_t) +@@ -602,17 +798,12 @@ static UCS_CLASS_CLEANUP_FUNC(uct_rc_mlx5_ep_t) + uct_rc_mlx5_iface_t); + + uct_ib_mlx5_txwq_cleanup(&self->tx.wq); +- +- uct_rc_mlx5_ep_reset_qp(self); +- uct_rc_mlx5_iface_commom_clean_srq(&iface->mlx5_common, &iface->super, +- self->qp_num); +- +- /* Synchronize CQ index with the driver, since it would remove pending +- * completions for this QP (both send and receive) during ibv_destroy_qp(). +- */ +- uct_rc_mlx5_iface_common_update_cqs_ci(&iface->mlx5_common, &iface->super.super); +- (void)uct_rc_modify_qp(&self->super.txqp, IBV_QPS_RESET); +- uct_rc_mlx5_iface_common_sync_cqs_ci(&iface->mlx5_common, &iface->super.super); ++ uct_rc_mlx5_ep_clean_qp(self, self->super.txqp.qp); ++#if IBV_EXP_HW_TM ++ if (UCT_RC_IFACE_TM_ENABLED(&iface->super)) { ++ uct_rc_mlx5_ep_clean_qp(self, self->super.tm_qp); ++ } ++#endif + + /* Return all credits if user do flush(UCT_FLUSH_FLAG_CANCEL) before + * ep_destroy. +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_iface.c +index fce6f8d48..1d4eaa24c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/accel/rc_mlx5_iface.c +@@ -7,6 +7,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -23,6 +24,10 @@ ucs_config_field_t uct_rc_mlx5_iface_config_table[] = { + ucs_offsetof(uct_rc_mlx5_iface_config_t, fc), + UCS_CONFIG_TYPE_TABLE(uct_rc_fc_config_table)}, + ++ {"", "", NULL, ++ ucs_offsetof(uct_rc_mlx5_iface_config_t, mlx5_common), ++ UCS_CONFIG_TYPE_TABLE(uct_ib_mlx5_iface_config_table)}, ++ + {"TX_MAX_BB", "-1", + "Limits the number of outstanding WQE building blocks. The actual limit is\n" + "a minimum between this value and the number of building blocks in the TX QP.\n" +@@ -40,9 +45,9 @@ uct_rc_mlx5_iface_poll_tx(uct_rc_mlx5_iface_t *iface) + struct mlx5_cqe64 *cqe; + uct_rc_mlx5_ep_t *ep; + unsigned qp_num; +- uint16_t hw_ci, bb_num; ++ uint16_t hw_ci; + +- cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->mlx5_common.tx.cq); ++ cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->mlx5_common.cq[UCT_IB_DIR_TX]); + if (cqe == NULL) { + return 0; + } +@@ -58,11 +63,8 @@ uct_rc_mlx5_iface_poll_tx(uct_rc_mlx5_iface_t *iface) + ucs_trace_poll("rc_mlx5 iface %p tx_cqe: ep %p qpn 0x%x hw_ci %d", iface, ep, + qp_num, hw_ci); + +- bb_num = uct_ib_mlx5_txwq_update_bb(&ep->tx.wq, hw_ci) - +- uct_rc_txqp_available(&ep->super.txqp); +- uct_rc_txqp_available_add(&ep->super.txqp, bb_num); +- iface->super.tx.cq_available += bb_num; +- ++ uct_rc_mlx5_common_update_tx_res(&iface->super, &ep->tx.wq, &ep->super.txqp, ++ hw_ci); + uct_rc_mlx5_txqp_process_tx_cqe(&ep->super.txqp, cqe, hw_ci); + + ucs_arbiter_group_schedule(&iface->super.tx.arbiter, &ep->super.arb_group); +@@ -86,36 +88,46 @@ unsigned uct_rc_mlx5_iface_progress(void *arg) + + static ucs_status_t uct_rc_mlx5_iface_query(uct_iface_h tl_iface, uct_iface_attr_t *iface_attr) + { +- uct_rc_iface_t *iface = ucs_derived_of(tl_iface, uct_rc_iface_t); ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(tl_iface, uct_rc_mlx5_iface_t); ++ uct_rc_iface_t *rc_iface = &iface->super; ++ size_t max_am_inline = UCT_IB_MLX5_AM_MAX_SHORT(0); ++ size_t max_put_inline = UCT_IB_MLX5_PUT_MAX_SHORT(0); + ucs_status_t status; + +- status = uct_rc_iface_query(iface, iface_attr, +- UCT_IB_MLX5_PUT_MAX_SHORT(0), +- UCT_IB_MLX5_AM_MAX_SHORT(0), ++#if HAVE_IBV_EXP_DM ++ if (iface->mlx5_common.dm.dm != NULL) { ++ max_am_inline = ucs_max(iface->mlx5_common.dm.dm->seg_len, UCT_IB_MLX5_AM_MAX_SHORT(0)); ++ max_put_inline = ucs_max(iface->mlx5_common.dm.dm->seg_len, UCT_IB_MLX5_PUT_MAX_SHORT(0)); ++ } ++#endif ++ ++ status = uct_rc_iface_query(rc_iface, iface_attr, ++ max_put_inline, ++ max_am_inline, + UCT_IB_MLX5_AM_ZCOPY_MAX_HDR(0), +- UCT_IB_MLX5_AM_ZCOPY_MAX_IOV); ++ UCT_IB_MLX5_AM_ZCOPY_MAX_IOV, ++ UCT_RC_MLX5_TM_EAGER_ZCOPY_MAX_IOV(0)); + if (status != UCS_OK) { + return status; + } + +- uct_rc_mlx5_iface_common_query(iface_attr); ++ uct_rc_mlx5_iface_common_query(&rc_iface->super, iface_attr); + iface_attr->latency.growth += 1e-9; /* 1 ns per each extra QP */ + return UCS_OK; + } + +-static ucs_status_t uct_rc_mlx5_iface_arm_tx_cq(uct_ib_iface_t *ib_iface) +-{ +- uct_rc_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_rc_mlx5_iface_t); +- uct_ib_mlx5_update_cq_ci(iface->super.super.send_cq, iface->mlx5_common.tx.cq.cq_ci); +- return uct_ib_iface_arm_tx_cq(ib_iface); +-} +- +-static ucs_status_t uct_rc_mlx5_iface_arm_rx_cq(uct_ib_iface_t *ib_iface, +- int solicited_only) ++static ucs_status_t uct_rc_mlx5_iface_arm_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir, ++ int solicited_only) + { + uct_rc_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_rc_mlx5_iface_t); +- uct_ib_mlx5_update_cq_ci(iface->super.super.recv_cq, iface->mlx5_common.rx.cq.cq_ci); +- return uct_ib_iface_arm_rx_cq(ib_iface, solicited_only); ++#if HAVE_DECL_MLX5DV_INIT_OBJ ++ return uct_ib_mlx5dv_arm_cq(&iface->mlx5_common.cq[dir], solicited_only); ++#else ++ uct_ib_mlx5_update_cq_ci(iface->super.super.cq[dir], ++ iface->mlx5_common.cq[dir].cq_ci); ++ return uct_ib_iface_arm_cq(ib_iface, dir, solicited_only); ++#endif + } + + static void +@@ -145,7 +157,7 @@ uct_rc_mlx5_iface_handle_failure(uct_ib_iface_t *ib_iface, void *arg, + log_lvl = ib_iface->super.config.failure_level; + } + +- uct_ib_mlx5_completion_with_err(arg, log_lvl); ++ uct_ib_mlx5_completion_with_err(ib_iface, arg, log_lvl); + } + + static ucs_status_t uct_rc_mlx5_ep_set_failed(uct_ib_iface_t *iface, +@@ -207,7 +219,7 @@ static ucs_status_t uct_rc_mlx5_iface_tag_recv_cancel(uct_iface_h tl_iface, + + static ucs_status_t + uct_rc_mlx5_iface_tag_init(uct_rc_mlx5_iface_t *iface, +- uct_rc_iface_config_t *rc_config) ++ uct_rc_mlx5_iface_config_t *config) + { + #if IBV_EXP_HW_TM + if (UCT_RC_IFACE_TM_ENABLED(&iface->super)) { +@@ -216,7 +228,8 @@ uct_rc_mlx5_iface_tag_init(uct_rc_mlx5_iface_t *iface, + iface->super.progress = uct_rc_mlx5_iface_progress_tm; + + return uct_rc_mlx5_iface_common_tag_init(&iface->mlx5_common, +- &iface->super, rc_config, ++ &iface->super, &config->super, ++ &config->mlx5_common, + &srq_init_attr, + sizeof(struct ibv_exp_tmh_rvh)); + } +@@ -225,6 +238,14 @@ uct_rc_mlx5_iface_tag_init(uct_rc_mlx5_iface_t *iface, + return UCS_OK; + } + ++static void uct_rc_mlx5_iface_event_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir) ++{ ++ uct_rc_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_rc_mlx5_iface_t); ++ ++ iface->mlx5_common.cq[dir].cq_sn++; ++} ++ + + static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_t, uct_md_h md, uct_worker_h worker, + const uct_iface_params_t *params, +@@ -232,13 +253,19 @@ static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + { + uct_rc_mlx5_iface_config_t *config = ucs_derived_of(tl_config, + uct_rc_mlx5_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + ++ init_attr.res_domain_key = UCT_IB_MLX5_RES_DOMAIN_KEY; ++ init_attr.tm_cap_bit = IBV_EXP_TM_CAP_RC; ++ init_attr.fc_req_size = sizeof(uct_rc_fc_request_t); ++ init_attr.flags = UCT_IB_CQ_IGNORE_OVERRUN; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_rc_iface_t, &uct_rc_mlx5_iface_ops, md, worker, +- params, &config->super, 0, +- sizeof(uct_rc_fc_request_t), IBV_EXP_TM_CAP_RC); ++ params, &config->super, &init_attr); + + ++ self->tx.mmio_mode = config->mlx5_common.mmio_mode; + self->tx.bb_max = ucs_min(config->tx_max_bb, UINT16_MAX); + self->super.config.tx_moderation = ucs_min(self->super.config.tx_moderation, + self->tx.bb_max / 4); +@@ -248,12 +275,13 @@ static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + return status; + } + +- status = uct_rc_mlx5_iface_tag_init(self, &config->super); ++ status = uct_rc_mlx5_iface_tag_init(self, config); + if (status != UCS_OK) { + return status; + } + +- status = uct_rc_mlx5_iface_common_init(&self->mlx5_common, &self->super, &config->super); ++ status = uct_rc_mlx5_iface_common_init(&self->mlx5_common, &self->super, ++ &config->super, &config->mlx5_common); + if (status != UCS_OK) { + uct_rc_mlx5_iface_common_tag_cleanup(&self->mlx5_common, &self->super); + return status; +@@ -261,7 +289,7 @@ static UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_t, uct_md_h md, uct_worker_h worker + + /* Set max_iov for put_zcopy and get_zcopy */ + uct_ib_iface_set_max_iov(&self->super.super, +- ((UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB) - ++ (UCT_IB_MLX5_MAX_SEND_WQE_SIZE - + sizeof(struct mlx5_wqe_raddr_seg) - + sizeof(struct mlx5_wqe_ctrl_seg)) / + sizeof(struct mlx5_wqe_data_seg)); +@@ -296,14 +324,12 @@ static uct_rc_iface_ops_t uct_rc_mlx5_iface_ops = { + .ep_am_short = uct_rc_mlx5_ep_am_short, + .ep_am_bcopy = uct_rc_mlx5_ep_am_bcopy, + .ep_am_zcopy = uct_rc_mlx5_ep_am_zcopy, +- .ep_atomic_add64 = uct_rc_mlx5_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_rc_mlx5_ep_atomic_fadd64, +- .ep_atomic_swap64 = uct_rc_mlx5_ep_atomic_swap64, + .ep_atomic_cswap64 = uct_rc_mlx5_ep_atomic_cswap64, +- .ep_atomic_add32 = uct_rc_mlx5_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_rc_mlx5_ep_atomic_fadd32, +- .ep_atomic_swap32 = uct_rc_mlx5_ep_atomic_swap32, + .ep_atomic_cswap32 = uct_rc_mlx5_ep_atomic_cswap32, ++ .ep_atomic64_post = uct_rc_mlx5_ep_atomic64_post, ++ .ep_atomic32_post = uct_rc_mlx5_ep_atomic32_post, ++ .ep_atomic64_fetch = uct_rc_mlx5_ep_atomic64_fetch, ++ .ep_atomic32_fetch = uct_rc_mlx5_ep_atomic32_fetch, + .ep_pending_add = uct_rc_ep_pending_add, + .ep_pending_purge = uct_rc_ep_pending_purge, + .ep_flush = uct_rc_mlx5_ep_flush, +@@ -335,10 +361,11 @@ static uct_rc_iface_ops_t uct_rc_mlx5_iface_ops = { + .iface_get_device_address = uct_ib_iface_get_device_address, + .iface_is_reachable = uct_rc_iface_is_reachable + }, +- .arm_tx_cq = uct_rc_mlx5_iface_arm_tx_cq, +- .arm_rx_cq = uct_rc_mlx5_iface_arm_rx_cq, ++ .arm_cq = uct_rc_mlx5_iface_arm_cq, ++ .event_cq = uct_rc_mlx5_iface_event_cq, + .handle_failure = uct_rc_mlx5_iface_handle_failure, +- .set_ep_failed = uct_rc_mlx5_ep_set_failed ++ .set_ep_failed = uct_rc_mlx5_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .fc_ctrl = uct_rc_mlx5_ep_fc_ctrl, + .fc_handler = uct_rc_iface_fc_handler +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.c +index 72c34aa1a..71f09e02e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.c +@@ -125,8 +125,7 @@ static void uct_rc_ep_tag_qp_destroy(uct_rc_ep_t *ep) + #endif + } + +-static ucs_status_t uct_rc_ep_tag_qp_create(uct_rc_iface_t *iface, +- uct_rc_ep_t *ep) ++static ucs_status_t uct_rc_ep_tag_qp_create(uct_rc_iface_t *iface, uct_rc_ep_t *ep) + { + #if IBV_EXP_HW_TM + struct ibv_qp_cap cap; +@@ -283,46 +282,54 @@ ucs_status_t uct_rc_ep_connect_to_ep(uct_ep_h tl_ep, const uct_device_addr_t *de + return UCS_OK; + } + +-ucs_status_t uct_rc_modify_qp(uct_rc_txqp_t *txqp, enum ibv_qp_state state) +-{ +- struct ibv_qp_attr qp_attr; +- +- ucs_debug("modify QP 0x%x to state %d", txqp->qp->qp_num, state); +- memset(&qp_attr, 0, sizeof(qp_attr)); +- qp_attr.qp_state = state; +- if (ibv_modify_qp(txqp->qp, &qp_attr, IBV_QP_STATE)) { +- ucs_warn("modify qp 0x%x to state %d failed: %m", state, +- txqp->qp->qp_num); +- return UCS_ERR_IO_ERROR; +- } +- +- return UCS_OK; +-} +- +-void uct_rc_ep_am_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, +- void *data, size_t length, size_t valid_length, +- char *buffer, size_t max) ++void uct_rc_ep_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max, int is_tmh_be) + { + uct_rc_hdr_t *rch = data; + uint8_t fc_hdr = uct_rc_fc_get_fc_hdr(rch->am_id); + uint8_t am_wo_fc; + ++#if IBV_EXP_HW_TM ++ if (rch->tmh_opcode != IBV_EXP_TMH_NO_TAG) { ++ struct ibv_exp_tmh *tmh = (void*)rch; ++ struct ibv_exp_tmh_rvh *rvh = (void*)(tmh + 1); ++ uct_tag_t tag; ++ uint32_t app_ctx; ++ ++ if (is_tmh_be) { ++ tag = be64toh(tmh->tag); ++ app_ctx = ntohl(tmh->app_ctx); ++ } else { ++ tag = tmh->tag; ++ app_ctx = tmh->app_ctx; ++ } ++ ++ switch (rch->tmh_opcode) { ++ case IBV_EXP_TMH_EAGER: ++ snprintf(buffer, max, " EAGER tag %lx app_ctx %d", tag, app_ctx); ++ return; ++ case IBV_EXP_TMH_RNDV: ++ snprintf(buffer, max, " RNDV tag %lx app_ctx %d va 0x%lx len %d rkey %x", ++ tag, app_ctx, be64toh(rvh->va), ntohl(rvh->len), ntohl(rvh->rkey)); ++ return; ++ case IBV_EXP_TMH_FIN: ++ snprintf(buffer, max, " FIN tag %lx app_ctx %d", tag, app_ctx); ++ return; ++ default: ++ break; ++ } ++ } ++#endif ++ + /* Do not invoke AM tracer for auxiliary pure FC_GRANT message */ + if (fc_hdr != UCT_RC_EP_FC_PURE_GRANT) { + am_wo_fc = rch->am_id & ~UCT_RC_EP_FC_MASK; /* mask out FC bits*/ +- snprintf(buffer, max, " %c%c am %d " +-#if IBV_EXP_HW_TM +- "tm_op %d " +-#endif +- , ++ snprintf(buffer, max, " %c%c am %d ", + fc_hdr & UCT_RC_EP_FC_FLAG_SOFT_REQ ? 's' : + fc_hdr & UCT_RC_EP_FC_FLAG_HARD_REQ ? 'h' : '-', + fc_hdr & UCT_RC_EP_FC_FLAG_GRANT ? 'g' : '-', +- am_wo_fc +-#if IBV_EXP_HW_TM +- , rch->tmh_opcode +-#endif +- ); ++ am_wo_fc); + uct_iface_dump_am(iface, type, am_wo_fc, rch + 1, length - sizeof(*rch), + buffer + strlen(buffer), max - strlen(buffer)); + } else { +@@ -362,7 +369,15 @@ void uct_rc_ep_send_op_completion_handler(uct_rc_iface_send_op_t *op, + uct_rc_iface_put_send_op(op); + } + +-ucs_status_t uct_rc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n) ++void uct_rc_ep_flush_op_completion_handler(uct_rc_iface_send_op_t *op, ++ const void *resp) ++{ ++ uct_invoke_completion(op->user_comp, UCS_OK); ++ ucs_mpool_put(op); ++} ++ ++ucs_status_t uct_rc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags) + { + uct_rc_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_iface_t); + uct_rc_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_ep_t); +@@ -493,6 +508,8 @@ void uct_rc_txqp_purge_outstanding(uct_rc_txqp_t *txqp, ucs_status_t status, + op->flags &= ~UCT_RC_IFACE_SEND_OP_FLAG_INUSE; + if (op->handler == uct_rc_ep_send_op_completion_handler) { + uct_rc_iface_put_send_op(op); ++ } else if (op->handler == uct_rc_ep_flush_op_completion_handler) { ++ ucs_mpool_put(op); + } else { + desc = ucs_derived_of(op, uct_rc_iface_send_desc_t); + ucs_mpool_put(desc); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.h +index a8dff96a9..2e303ddb4 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_ep.h +@@ -230,11 +230,9 @@ ucs_status_t uct_rc_ep_get_address(uct_ep_h tl_ep, uct_ep_addr_t *addr); + ucs_status_t uct_rc_ep_connect_to_ep(uct_ep_h tl_ep, const uct_device_addr_t *dev_addr, + const uct_ep_addr_t *ep_addr); + +-ucs_status_t uct_rc_modify_qp(uct_rc_txqp_t *txqp, enum ibv_qp_state state); +- +-void uct_rc_ep_am_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, +- void *data, size_t length, size_t valid_length, +- char *buffer, size_t max); ++void uct_rc_ep_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max, int is_tmh_be); + + void uct_rc_ep_get_bcopy_handler(uct_rc_iface_send_op_t *op, const void *resp); + +@@ -244,7 +242,11 @@ void uct_rc_ep_get_bcopy_handler_no_completion(uct_rc_iface_send_op_t *op, + void uct_rc_ep_send_op_completion_handler(uct_rc_iface_send_op_t *op, + const void *resp); + +-ucs_status_t uct_rc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n); ++void uct_rc_ep_flush_op_completion_handler(uct_rc_iface_send_op_t *op, ++ const void *resp); ++ ++ucs_status_t uct_rc_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags); + + void uct_rc_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, + void*arg); +@@ -358,6 +360,28 @@ uct_rc_txqp_add_send_comp(uct_rc_iface_t *iface, uct_rc_txqp_t *txqp, + uct_rc_txqp_add_send_op_sn(txqp, op, sn); + } + ++static UCS_F_ALWAYS_INLINE ucs_status_t ++uct_rc_txqp_add_flush_comp(uct_rc_iface_t *iface, uct_rc_txqp_t *txqp, ++ uct_completion_t *comp, uint16_t sn) ++{ ++ uct_rc_iface_send_op_t *op; ++ ++ if (comp != NULL) { ++ op = (uct_rc_iface_send_op_t*)ucs_mpool_get(&iface->tx.flush_mp); ++ if (ucs_unlikely(op == NULL)) { ++ ucs_error("Failed to allocate flush completion"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ op->flags = 0; ++ op->user_comp = comp; ++ uct_rc_txqp_add_send_op_sn(txqp, op, sn); ++ VALGRIND_MAKE_MEM_DEFINED(op, sizeof(*op)); /* handler set by mpool init */ ++ } ++ ++ return UCS_INPROGRESS; ++} ++ + static UCS_F_ALWAYS_INLINE void + uct_rc_txqp_completion_op(uct_rc_iface_send_op_t *op, const void *resp) + { +@@ -399,7 +423,8 @@ uct_rc_iface_tx_moderation(uct_rc_iface_t *iface, uct_rc_txqp_t *txqp, uint8_t f + } + + static UCS_F_ALWAYS_INLINE void +-uct_rc_txqp_posted(uct_rc_txqp_t *txqp, uct_rc_iface_t *iface, uint16_t res_count, int signaled) ++uct_rc_txqp_posted(uct_rc_txqp_t *txqp, uct_rc_iface_t *iface, uint16_t res_count, ++ int signaled) + { + if (signaled) { + ucs_assert(uct_rc_iface_have_tx_cqe_avail(iface)); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.c +index 270be52f0..bc2f44930 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.c +@@ -76,6 +76,10 @@ ucs_config_field_t uct_rc_iface_config_table[] = { + "is a minimum between this value and the maximum value supported by the HW. \n" + "-1 means no limit.", + ucs_offsetof(uct_rc_iface_config_t, tm.list_size), UCS_CONFIG_TYPE_UINT}, ++ ++ {"TM_MAX_BCOPY", "48k", ++ "Maximal size of copy-out sends when tag-matching offload is enabled", ++ ucs_offsetof(uct_rc_iface_config_t, tm.max_bcopy), UCS_CONFIG_TYPE_MEMUNITS}, + #endif + + {NULL} +@@ -99,11 +103,30 @@ static ucs_stats_class_t uct_rc_iface_stats_class = { + .counter_names = { + [UCT_RC_IFACE_STAT_RX_COMPLETION] = "rx_completion", + [UCT_RC_IFACE_STAT_TX_COMPLETION] = "tx_completion", +- [UCT_RC_IFACE_STAT_NO_CQE] = "no_cqe", ++ [UCT_RC_IFACE_STAT_NO_CQE] = "no_cqe" ++ } ++}; ++ ++#if IBV_EXP_HW_TM ++static ucs_stats_class_t uct_rc_iface_tag_stats_class = { ++ .name = "tag", ++ .num_counters = UCT_RC_IFACE_STAT_TAG_LAST, ++ .counter_names = { ++ [UCT_RC_IFACE_STAT_TAG_RX_EXP] = "rx_exp", ++ [UCT_RC_IFACE_STAT_TAG_RX_EAGER_UNEXP] = "rx_unexp_eager", ++ [UCT_RC_IFACE_STAT_TAG_RX_RNDV_UNEXP] = "rx_unexp_rndv", ++ [UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_EXP] = "rx_exp_rndv_req", ++ [UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_UNEXP] = "rx_unexp_rndv_req", ++ [UCT_RC_IFACE_STAT_TAG_RX_RNDV_FIN] = "rx_rndv_fin", ++ [UCT_RC_IFACE_STAT_TAG_LIST_ADD] = "tx_add_op", ++ [UCT_RC_IFACE_STAT_TAG_LIST_DEL] = "tx_del_op", ++ [UCT_RC_IFACE_STAT_TAG_LIST_SYNC] = "tx_sync_op" + } + }; + #endif + ++#endif /* ENABLE_STATS */ ++ + + static ucs_mpool_ops_t uct_rc_fc_pending_mpool_ops = { + .chunk_alloc = ucs_mpool_chunk_malloc, +@@ -112,9 +135,27 @@ static ucs_mpool_ops_t uct_rc_fc_pending_mpool_ops = { + .obj_cleanup = NULL + }; + ++static void ++uct_rc_iface_flush_comp_init(ucs_mpool_t *mp, void *obj, void *chunk) ++{ ++ uct_rc_iface_t *iface = ucs_container_of(mp, uct_rc_iface_t, tx.flush_mp); ++ uct_rc_iface_send_op_t *op = obj; ++ ++ op->handler = uct_rc_ep_flush_op_completion_handler; ++ op->flags = 0; ++ op->iface = iface; ++} ++ ++static ucs_mpool_ops_t uct_rc_flush_comp_mpool_ops = { ++ .chunk_alloc = ucs_mpool_chunk_malloc, ++ .chunk_release = ucs_mpool_chunk_free, ++ .obj_init = uct_rc_iface_flush_comp_init, ++ .obj_cleanup = NULL ++}; ++ + static void uct_rc_iface_tag_query(uct_rc_iface_t *iface, + uct_iface_attr_t *iface_attr, +- size_t max_inline) ++ size_t max_inline, size_t max_iov) + { + #if IBV_EXP_HW_TM + unsigned eager_hdr_size = sizeof(struct ibv_exp_tmh); +@@ -137,13 +178,14 @@ static void uct_rc_iface_tag_query(uct_rc_iface_t *iface, + eager_hdr_size; + iface_attr->cap.tag.eager.max_zcopy = iface->super.config.seg_size - + eager_hdr_size; +- iface_attr->cap.tag.eager.max_iov = 1; ++ iface_attr->cap.tag.eager.max_iov = max_iov; + + port_attr = uct_ib_iface_port_attr(&iface->super); + iface_attr->cap.tag.rndv.max_zcopy = port_attr->max_msg_sz; + + /* TMH can carry 2 additional bytes of private data */ +- iface_attr->cap.tag.rndv.max_hdr = iface->tm.max_rndv_data + 2; ++ iface_attr->cap.tag.rndv.max_hdr = iface->tm.max_rndv_data + ++ UCT_RC_IFACE_TMH_PRIV_LEN; + iface_attr->cap.tag.rndv.max_iov = 1; + + iface_attr->cap.tag.recv.max_zcopy = port_attr->max_msg_sz; +@@ -156,7 +198,8 @@ static void uct_rc_iface_tag_query(uct_rc_iface_t *iface, + ucs_status_t uct_rc_iface_query(uct_rc_iface_t *iface, + uct_iface_attr_t *iface_attr, + size_t put_max_short, size_t max_inline, +- size_t am_max_hdr, size_t am_max_iov) ++ size_t am_max_hdr, size_t am_max_iov, ++ size_t tag_max_iov) + { + uct_ib_device_t *dev = uct_ib_iface_device(&iface->super); + ucs_status_t status; +@@ -186,24 +229,32 @@ ucs_status_t uct_rc_iface_query(uct_rc_iface_t *iface, + UCT_IFACE_FLAG_EVENT_RECV; + + if (uct_ib_atomic_is_supported(dev, 0, sizeof(uint64_t))) { +- iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 | +- UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ /* TODO: remove deprecated flags */ ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ ++ iface_attr->cap.atomic64.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD); ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); + } + ++#if HAVE_IB_EXT_ATOMICS + if (uct_ib_atomic_is_supported(dev, 1, sizeof(uint64_t))) { +- iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ /* TODO: remove deprecated flags */ ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_SWAP); + } + + if (uct_ib_atomic_is_supported(dev, 1, sizeof(uint32_t))) { +- iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32 | +- UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ /* TODO: remove deprecated flags */ ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_ATOMIC_DEVICE; ++ ++ iface_attr->cap.atomic32.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD); ++ iface_attr->cap.atomic32.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); + } ++#endif + + iface_attr->cap.put.opt_zcopy_align = UCS_SYS_PCI_MAX_PAYLOAD; + iface_attr->cap.get.opt_zcopy_align = UCS_SYS_PCI_MAX_PAYLOAD; +@@ -238,7 +289,7 @@ ucs_status_t uct_rc_iface_query(uct_rc_iface_t *iface, + iface_attr->cap.flags |= UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE; + + /* Tag Offload */ +- uct_rc_iface_tag_query(iface, iface_attr, max_inline); ++ uct_rc_iface_tag_query(iface, iface_attr, max_inline, tag_max_iov); + + return UCS_OK; + } +@@ -440,7 +491,7 @@ ucs_status_t uct_rc_iface_fc_handler(uct_rc_iface_t *iface, unsigned qp_num, + status = uct_rc_ep_fc_grant(&fc_req->super); + + if (status == UCS_ERR_NO_RESOURCE){ +- status = uct_ep_pending_add(&ep->super.super, &fc_req->super); ++ status = uct_ep_pending_add(&ep->super.super, &fc_req->super, 0); + } + ucs_assertv_always(status == UCS_OK, "Failed to send FC grant msg: %s", + ucs_status_string(status)); +@@ -455,6 +506,7 @@ static ucs_status_t uct_rc_iface_tx_ops_init(uct_rc_iface_t *iface) + { + const unsigned count = iface->config.tx_ops_count; + uct_rc_iface_send_op_t *op; ++ ucs_status_t status; + + iface->tx.ops_buffer = ucs_calloc(count, sizeof(*iface->tx.ops_buffer), + "rc_tx_ops"); +@@ -463,14 +515,22 @@ static ucs_status_t uct_rc_iface_tx_ops_init(uct_rc_iface_t *iface) + } + + iface->tx.free_ops = &iface->tx.ops_buffer[0]; +- for (op = iface->tx.ops_buffer; op < iface->tx.ops_buffer + count - 1; ++op) { ++ for (op = iface->tx.ops_buffer; op < iface->tx.ops_buffer + count; ++op) { + op->handler = uct_rc_ep_send_op_completion_handler; + op->flags = UCT_RC_IFACE_SEND_OP_FLAG_IFACE; + op->iface = iface; +- op->next = op + 1; ++ op->next = (op == (iface->tx.ops_buffer + count - 1)) ? NULL : (op + 1); + } +- iface->tx.ops_buffer[count - 1].next = NULL; +- return UCS_OK; ++ ++ /* Create memory pool for flush completions. Can't just alloc a certain ++ * size buffer, because number of simultaneous flushes is not limited by ++ * CQ or QP resources. */ ++ status = ucs_mpool_init(&iface->tx.flush_mp, 0, sizeof(*op), 0, ++ UCS_SYS_CACHE_LINE_SIZE, 256, ++ UINT_MAX, &uct_rc_flush_comp_mpool_ops, ++ "flush-comps-only"); ++ ++ return status; + } + + static void uct_rc_iface_tx_ops_cleanup(uct_rc_iface_t *iface) +@@ -489,6 +549,8 @@ static void uct_rc_iface_tx_ops_cleanup(uct_rc_iface_t *iface) + total_count- free_count, total_count); + } + ucs_free(iface->tx.ops_buffer); ++ ++ ucs_mpool_cleanup(&iface->tx.flush_mp, 1); + } + + #if IBV_EXP_HW_TM +@@ -500,8 +562,10 @@ static void uct_rc_iface_release_desc(uct_recv_desc_t *self, void *desc) + ucs_mpool_put_inline(ib_desc); + } + ++/* tag is passed as parameter, because some (but not all!) transports may need ++ * to translate TMH to LE */ + ucs_status_t uct_rc_iface_handle_rndv(uct_rc_iface_t *iface, +- struct ibv_exp_tmh *tmh, ++ struct ibv_exp_tmh *tmh, uct_tag_t tag, + unsigned byte_len) + { + uct_rc_iface_tmh_priv_data_t *priv = (uct_rc_iface_tmh_priv_data_t*)tmh->reserved; +@@ -537,8 +601,7 @@ ucs_status_t uct_rc_iface_handle_rndv(uct_rc_iface_t *iface, + uct_ib_md_pack_rkey(ntohl(rvh->rkey), UCT_IB_INVALID_RKEY, rb); + + /* Do not pass flags to cb, because rkey is allocated on stack */ +- return iface->tm.rndv_unexp.cb(iface->tm.rndv_unexp.arg, 0, +- be64toh(tmh->tag), ++ return iface->tm.rndv_unexp.cb(iface->tm.rndv_unexp.arg, 0, tag, + (char *)rndv_usr_hdr - priv->length, + rndv_usr_hdr_len + priv->length, + be64toh(rvh->va), rndv_data_len, +@@ -549,14 +612,15 @@ ucs_status_t uct_rc_iface_handle_rndv(uct_rc_iface_t *iface, + static void uct_rc_iface_preinit(uct_rc_iface_t *iface, uct_md_h md, + const uct_rc_iface_config_t *config, + const uct_iface_params_t *params, +- int tm_cap_flag, unsigned *rx_cq_len) ++ uct_ib_iface_init_attr_t *init_attr) + { + #if IBV_EXP_HW_TM +- struct ibv_exp_tmh tmh; + uct_ib_device_t *dev = &ucs_derived_of(md, uct_ib_md_t)->dev; + uint32_t cap_flags = IBV_DEVICE_TM_CAPS(dev, capability_flags); ++ struct ibv_exp_tmh tmh; + +- iface->tm.enabled = (config->tm.enable && (cap_flags & tm_cap_flag)); ++ iface->tm.enabled = config->tm.enable && ++ (cap_flags & init_attr->tm_cap_bit); + + if (!iface->tm.enabled) { + goto out_tm_disabled; +@@ -585,13 +649,17 @@ static void uct_rc_iface_preinit(uct_rc_iface_t *iface, uct_md_h md, + * - up to 3 CQEs for every posted tag: ADD, TM_CONSUMED and MSG_ARRIVED + * - one SYNC CQE per every IBV_DEVICE_MAX_UNEXP_COUNT unexpected receives */ + UCS_STATIC_ASSERT(IBV_DEVICE_MAX_UNEXP_COUNT); +- *rx_cq_len = config->super.rx.queue_len + iface->tm.num_tags * 3 + +- config->super.rx.queue_len / IBV_DEVICE_MAX_UNEXP_COUNT; ++ init_attr->rx_cq_len = config->super.rx.queue_len + iface->tm.num_tags * 3 + ++ config->super.rx.queue_len / ++ IBV_DEVICE_MAX_UNEXP_COUNT; ++ init_attr->seg_size = ucs_max(config->tm.max_bcopy, ++ config->super.super.max_bcopy); + return; + + out_tm_disabled: + #endif +- *rx_cq_len = config->super.rx.queue_len; ++ init_attr->rx_cq_len = config->super.rx.queue_len; ++ init_attr->seg_size = config->super.super.max_bcopy; + } + + ucs_status_t uct_rc_iface_tag_init(uct_rc_iface_t *iface, +@@ -604,6 +672,7 @@ ucs_status_t uct_rc_iface_tag_init(uct_rc_iface_t *iface, + #if IBV_EXP_HW_TM + uct_ib_md_t *md = uct_ib_iface_md(&iface->super); + unsigned tmh_hdrs_len = sizeof(struct ibv_exp_tmh) + rndv_hdr_len; ++ ucs_status_t status; + + if (!UCT_RC_IFACE_TM_ENABLED(iface)) { + goto out_tm_disabled; +@@ -634,7 +703,7 @@ ucs_status_t uct_rc_iface_tag_init(uct_rc_iface_t *iface, + srq_init_attr->base.srq_context = iface; + srq_init_attr->srq_type = IBV_EXP_SRQT_TAG_MATCHING; + srq_init_attr->pd = md->pd; +- srq_init_attr->cq = iface->super.recv_cq; ++ srq_init_attr->cq = iface->super.cq[UCT_IB_DIR_RX]; + srq_init_attr->tm_cap.max_num_tags = iface->tm.num_tags; + + /* 2 ops for each tag (ADD + DEL) and extra ops for SYNC. +@@ -648,11 +717,18 @@ ucs_status_t uct_rc_iface_tag_init(uct_rc_iface_t *iface, + + iface->rx.srq.srq = ibv_exp_create_srq(md->dev.ibv_context, srq_init_attr); + if (iface->rx.srq.srq == NULL) { +- ucs_error("Failed to create TM XRQ: %m"); ++ ucs_error("ibv_exp_create_srq(device=%s) failed: %m", ++ uct_ib_device_name(&md->dev)); + return UCS_ERR_IO_ERROR; + } + +- iface->rx.srq.available = srq_init_attr->base.attr.max_wr; ++ iface->rx.srq.quota = srq_init_attr->base.attr.max_wr; ++ ++ status = UCS_STATS_NODE_ALLOC(&iface->tm.stats, &uct_rc_iface_tag_stats_class, ++ iface->stats); ++ if (status != UCS_OK) { ++ ucs_bug("Failed to allocate tag stats: %s", ucs_status_string(status)); ++ } + + ucs_debug("Tag Matching enabled: tag list size %d", iface->tm.num_tags); + +@@ -667,6 +743,7 @@ void uct_rc_iface_tag_cleanup(uct_rc_iface_t *iface) + #if IBV_EXP_HW_TM + if (UCT_RC_IFACE_TM_ENABLED(iface)) { + ucs_ptr_array_cleanup(&iface->tm.rndv_comps); ++ UCS_STATS_NODE_FREE(iface->tm.stats); + } + #endif + } +@@ -679,22 +756,21 @@ unsigned uct_rc_iface_do_progress(uct_iface_h tl_iface) + + UCS_CLASS_INIT_FUNC(uct_rc_iface_t, uct_rc_iface_ops_t *ops, uct_md_h md, + uct_worker_h worker, const uct_iface_params_t *params, +- const uct_rc_iface_config_t *config, unsigned rx_priv_len, +- unsigned fc_req_size, int tm_cap_flag) ++ const uct_rc_iface_config_t *config, ++ uct_ib_iface_init_attr_t *init_attr) + { + uct_ib_device_t *dev = &ucs_derived_of(md, uct_ib_md_t)->dev; +- unsigned tx_cq_len = config->tx.cq_len; + struct ibv_srq_init_attr srq_init_attr; + ucs_status_t status; +- unsigned rx_cq_len; + +- uct_rc_iface_preinit(self, md, config, params, tm_cap_flag, &rx_cq_len); ++ uct_rc_iface_preinit(self, md, config, params, init_attr); ++ init_attr->rx_hdr_len = sizeof(uct_rc_hdr_t); ++ init_attr->tx_cq_len = config->tx.cq_len; + + UCS_CLASS_CALL_SUPER_INIT(uct_ib_iface_t, &ops->super, md, worker, params, +- rx_priv_len, sizeof(uct_rc_hdr_t), tx_cq_len, +- rx_cq_len, SIZE_MAX, &config->super); ++ &config->super, init_attr); + +- self->tx.cq_available = tx_cq_len - 1; ++ self->tx.cq_available = init_attr->tx_cq_len - 1; + self->rx.srq.available = 0; + self->rx.srq.quota = 0; + self->config.tx_qp_len = config->super.tx.queue_len; +@@ -702,7 +778,7 @@ UCS_CLASS_INIT_FUNC(uct_rc_iface_t, uct_rc_iface_ops_t *ops, uct_md_h md, + self->config.tx_min_inline = config->super.tx.min_inline; + self->config.tx_moderation = ucs_min(config->super.tx.cq_moderation, + config->super.tx.queue_len / 4); +- self->config.tx_ops_count = tx_cq_len; ++ self->config.tx_ops_count = init_attr->tx_cq_len; + self->config.rx_inline = config->super.rx.inl; + self->config.min_rnr_timer = uct_ib_to_fabric_time(config->tx.rnr_timeout); + self->config.timeout = uct_ib_to_fabric_time(config->tx.timeout); +@@ -712,6 +788,9 @@ UCS_CLASS_INIT_FUNC(uct_rc_iface_t, uct_rc_iface_ops_t *ops, uct_md_h md, + UCR_RC_QP_MAX_RETRY_COUNT); + self->config.max_rd_atomic = config->max_rd_atomic; + self->config.ooo_rw = config->ooo_rw; ++#if ENABLE_ASSERT ++ self->config.tx_cq_len = init_attr->tx_cq_len; ++#endif + + uct_rc_iface_set_path_mtu(self, config); + memset(self->eps, 0, sizeof(self->eps)); +@@ -802,7 +881,7 @@ UCS_CLASS_INIT_FUNC(uct_rc_iface_t, uct_rc_iface_ops_t *ops, uct_md_h md, + /* Create mempool for pending requests for FC grant */ + status = ucs_mpool_init(&self->tx.fc_mp, + 0, +- fc_req_size, ++ init_attr->fc_req_size, + 0, + 1, + 128, +@@ -875,27 +954,9 @@ ucs_status_t uct_rc_iface_qp_create(uct_rc_iface_t *iface, int qp_type, + struct ibv_qp **qp_p, struct ibv_qp_cap *cap, + unsigned max_send_wr) + { +- uct_ib_device_t *dev UCS_V_UNUSED = uct_ib_iface_device(&iface->super); +- struct ibv_exp_qp_init_attr qp_init_attr; +- const char *qp_type_str; +- struct ibv_qp *qp; +- int inline_recv = 0; ++ uct_ib_qp_attr_t qp_init_attr = {}; ++ static ucs_status_t status; + +- /* Check QP type */ +- if (qp_type == IBV_QPT_RC) { +- qp_type_str = "rc"; +-#if HAVE_DECL_IBV_EXP_QPT_DC_INI +- } else if (qp_type == IBV_EXP_QPT_DC_INI) { +- qp_type_str = "dci"; +-#endif +- } else { +- ucs_bug("invalid qp type: %d", qp_type); +- } +- +- memset(&qp_init_attr, 0, sizeof(qp_init_attr)); +- qp_init_attr.qp_context = NULL; +- qp_init_attr.send_cq = iface->super.send_cq; +- qp_init_attr.recv_cq = iface->super.recv_cq; + if (qp_type == IBV_QPT_RC) { + qp_init_attr.srq = iface->rx.srq.srq; + } +@@ -906,50 +967,14 @@ ucs_status_t uct_rc_iface_qp_create(uct_rc_iface_t *iface, int qp_type, + qp_init_attr.cap.max_inline_data = iface->config.tx_min_inline; + qp_init_attr.qp_type = qp_type; + qp_init_attr.sq_sig_all = !iface->config.tx_moderation; ++ qp_init_attr.max_inl_recv = iface->config.rx_inline; + +-#if HAVE_DECL_IBV_EXP_CREATE_QP +- qp_init_attr.comp_mask = IBV_EXP_QP_INIT_ATTR_PD; +- qp_init_attr.pd = uct_ib_iface_md(&iface->super)->pd; +- +-# if HAVE_IB_EXT_ATOMICS +- qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG; +- qp_init_attr.max_atomic_arg = UCT_RC_MAX_ATOMIC_SIZE; +-# endif +- +-# if HAVE_DECL_IBV_EXP_ATOMIC_HCA_REPLY_BE +- if (dev->dev_attr.exp_atomic_cap == IBV_EXP_ATOMIC_HCA_REPLY_BE) { +- qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS; +- qp_init_attr.exp_create_flags = IBV_EXP_QP_CREATE_ATOMIC_BE_REPLY; +- } +-# endif +- +-# if HAVE_STRUCT_IBV_EXP_QP_INIT_ATTR_MAX_INL_RECV +- qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; +- qp_init_attr.max_inl_recv = iface->config.rx_inline; +-# endif +- +- qp = ibv_exp_create_qp(dev->ibv_context, &qp_init_attr); +-#else +- qp = ibv_create_qp(uct_ib_iface_md(&iface->super)->pd, &qp_init_attr); +-#endif +- if (qp == NULL) { +- ucs_error("failed to create qp: %m"); +- return UCS_ERR_IO_ERROR; ++ status = iface->super.ops->create_qp(&iface->super, &qp_init_attr, qp_p); ++ if (status == UCS_OK) { ++ *cap = qp_init_attr.cap; + } + +-#if HAVE_STRUCT_IBV_EXP_QP_INIT_ATTR_MAX_INL_RECV +- qp_init_attr.max_inl_recv = qp_init_attr.max_inl_recv / 2; /* Driver bug W/A */ +- inline_recv = qp_init_attr.max_inl_recv; +-#endif +- +- ucs_debug("created %s qp 0x%x tx %d rx %d tx_inline %d rx_inline %d", +- qp_type_str, qp->qp_num, qp_init_attr.cap.max_send_wr, +- qp_init_attr.cap.max_recv_wr, qp_init_attr.cap.max_inline_data, +- inline_recv); +- +- *qp_p = qp; +- *cap = qp_init_attr.cap; +- return UCS_OK; ++ return status; + } + + ucs_status_t uct_rc_iface_qp_init(uct_rc_iface_t *iface, struct ibv_qp *qp) +@@ -1072,7 +1097,7 @@ ucs_status_t uct_rc_iface_common_event_arm(uct_iface_h tl_iface, + } + + if (events & UCT_EVENT_SEND_COMP) { +- status = iface->super.ops->arm_tx_cq(&iface->super); ++ status = iface->super.ops->arm_cq(&iface->super, UCT_IB_DIR_TX, 0); + if (status != UCS_OK) { + return status; + } +@@ -1089,8 +1114,8 @@ ucs_status_t uct_rc_iface_common_event_arm(uct_iface_h tl_iface, + } + + if (arm_rx_solicited || arm_rx_all) { +- status = iface->super.ops->arm_rx_cq(&iface->super, +- arm_rx_solicited && !arm_rx_all); ++ status = iface->super.ops->arm_cq(&iface->super, UCT_IB_DIR_RX, ++ arm_rx_solicited && !arm_rx_all); + if (status != UCS_OK) { + return status; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.h +index 859248f3f..cd8dbc9c5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/base/rc_iface.h +@@ -21,7 +21,6 @@ + #define UCT_RC_QP_TABLE_ORDER 12 + #define UCT_RC_QP_TABLE_SIZE UCS_BIT(UCT_RC_QP_TABLE_ORDER) + #define UCT_RC_QP_TABLE_MEMB_ORDER (UCT_IB_QPN_ORDER - UCT_RC_QP_TABLE_ORDER) +-#define UCT_RC_MAX_ATOMIC_SIZE sizeof(uint64_t) + #define UCR_RC_QP_MAX_RETRY_COUNT 7 + + #define UCT_RC_CHECK_AM_SHORT(_am_id, _length, _max_inline) \ +@@ -55,8 +54,8 @@ + + #define UCT_RC_IFACE_GET_TX_PUT_BCOPY_DESC(_iface, _mp, _desc, _pack_cb, _arg, _length) \ + UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ +- desc->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; \ +- _length = pack_cb(_desc + 1, _arg); \ ++ (_desc)->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; \ ++ _length = _pack_cb(_desc + 1, _arg); \ + UCT_SKIP_ZERO_LENGTH(_length, _desc); + + #define UCT_RC_IFACE_GET_TX_GET_BCOPY_DESC(_iface, _mp, _desc, _unpack_cb, _comp, _arg, _length) \ +@@ -71,11 +70,11 @@ + _desc->unpack_cb = _unpack_cb; + + +-#define UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(_iface, _mp, _desc) \ ++#define UCT_RC_IFACE_GET_TX_ATOMIC_DESC(_iface, _mp, _desc) \ + UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ + _desc->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; + +-#define UCT_RC_IFACE_GET_TX_ATOMIC_DESC(_iface, _mp, _desc, _handler, _result, _comp) \ ++#define UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(_iface, _mp, _desc, _handler, _result, _comp) \ + UCT_CHECK_PARAM(_comp != NULL, "completion must be non-NULL"); \ + UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ + _desc->super.handler = _handler; \ +@@ -162,6 +161,7 @@ struct uct_rc_iface_config { + struct { + int enable; + unsigned list_size; ++ size_t max_bcopy; + } tm; + #endif + +@@ -188,6 +188,19 @@ typedef struct uct_rc_srq { + + #if IBV_EXP_HW_TM + ++enum { ++ UCT_RC_IFACE_STAT_TAG_RX_EXP, ++ UCT_RC_IFACE_STAT_TAG_RX_EAGER_UNEXP, ++ UCT_RC_IFACE_STAT_TAG_RX_RNDV_UNEXP, ++ UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_EXP, ++ UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_UNEXP, ++ UCT_RC_IFACE_STAT_TAG_RX_RNDV_FIN, ++ UCT_RC_IFACE_STAT_TAG_LIST_ADD, ++ UCT_RC_IFACE_STAT_TAG_LIST_DEL, ++ UCT_RC_IFACE_STAT_TAG_LIST_SYNC, ++ UCT_RC_IFACE_STAT_TAG_LAST ++}; ++ + typedef struct uct_rc_iface_tmh_priv_data { + uint8_t length; + uint16_t data; +@@ -215,8 +228,9 @@ struct uct_rc_iface { + uct_ib_iface_t super; + + struct { +- ucs_mpool_t mp; /* pool for send descriptors */ +- ucs_mpool_t fc_mp; /* pool for FC grant pending requests */ ++ ucs_mpool_t mp; /* pool for send descriptors */ ++ ucs_mpool_t fc_mp; /* pool for FC grant pending requests */ ++ ucs_mpool_t flush_mp; /* pool for flush completions */ + /* Credits for completions. + * May be negative in case mlx5 because we take "num_bb" credits per + * post to be able to calculate credits of outstanding ops on failure. +@@ -253,7 +267,7 @@ struct uct_rc_iface { + } rndv_unexp; + uct_rc_iface_release_desc_t eager_desc; + uct_rc_iface_release_desc_t rndv_desc; +- ++ UCS_STATS_NODE_DECLARE(stats); + } tm; + #endif + +@@ -284,6 +298,9 @@ struct uct_rc_iface { + enum ibv_mtu path_mtu; + /* Enable out-of-order RDMA data placement */ + uint8_t ooo_rw; ++#if ENABLE_ASSERT ++ int tx_cq_len; ++#endif + + /* Atomic callbacks */ + uct_rc_send_handler_t atomic64_handler; /* 64bit ib-spec */ +@@ -299,9 +316,9 @@ struct uct_rc_iface { + /* Progress function (either regular or TM aware) */ + ucs_callback_t progress; + }; +-UCS_CLASS_DECLARE(uct_rc_iface_t, uct_rc_iface_ops_t*, uct_md_h, +- uct_worker_h, const uct_iface_params_t*, +- const uct_rc_iface_config_t*, unsigned, unsigned, int) ++UCS_CLASS_DECLARE(uct_rc_iface_t, uct_rc_iface_ops_t*, uct_md_h, uct_worker_h, ++ const uct_iface_params_t*, const uct_rc_iface_config_t*, ++ uct_ib_iface_init_attr_t*); + + + struct uct_rc_iface_send_op { +@@ -340,8 +357,13 @@ typedef struct uct_rc_am_short_hdr { + + #if IBV_EXP_HW_TM + ++# define UCT_RC_IFACE_TM_STAT(_iface, _op) \ ++ UCS_STATS_UPDATE_COUNTER((_iface)->tm.stats, UCT_RC_IFACE_STAT_TAG_##_op, 1) ++ + # define UCT_RC_IFACE_TM_ENABLED(_iface) (_iface)->tm.enabled + ++ ++ + /* TMH can carry 2 bytes of data in its reserved filed */ + # define UCT_RC_IFACE_TMH_PRIV_LEN ucs_field_sizeof(uct_rc_iface_tmh_priv_data_t, \ + data) +@@ -377,22 +399,22 @@ typedef struct uct_rc_am_short_hdr { + # define UCT_RC_IFACE_GET_TX_TM_DESC(_iface, _mp, _desc, _tag, _app_ctx, _hdr) \ + { \ + UCT_RC_IFACE_GET_TX_DESC(_iface, _mp, _desc) \ +- hdr = _desc + 1; \ ++ _hdr = _desc + 1; \ + uct_rc_iface_fill_tmh(_hdr, _tag, _app_ctx, IBV_EXP_TMH_EAGER); \ +- hdr += sizeof(struct ibv_exp_tmh); \ ++ _hdr += sizeof(struct ibv_exp_tmh); \ + } + + # define UCT_RC_IFACE_GET_TM_BCOPY_DESC(_iface, _mp, _desc, _tag, _app_ctx, \ +- _pack_cb, _arg, _length) \ ++ _pack_cb, _arg, _length) \ + { \ + void *hdr; \ + UCT_RC_IFACE_GET_TX_TM_DESC(_iface, _mp, _desc, _tag, _app_ctx, hdr) \ + (_desc)->super.handler = (uct_rc_send_handler_t)ucs_mpool_put; \ +- _length = pack_cb(hdr, arg); \ ++ _length = _pack_cb(hdr, _arg); \ + } + + ucs_status_t uct_rc_iface_handle_rndv(uct_rc_iface_t *iface, +- struct ibv_exp_tmh *tmh, ++ struct ibv_exp_tmh *tmh, uct_tag_t tag, + unsigned byte_len); + + +@@ -462,18 +484,15 @@ uct_rc_iface_ctx_priv(uct_tag_context_t *ctx) + } + + static UCS_F_ALWAYS_INLINE void +-uct_rc_iface_handle_rndv_fin(uct_rc_iface_t *iface, struct ibv_exp_tmh *tmh) ++uct_rc_iface_handle_rndv_fin(uct_rc_iface_t *iface, uint32_t app_ctx) + { + int found; + void *rndv_comp; + +- ucs_assert(tmh->opcode == IBV_EXP_TMH_FIN); +- +- found = ucs_ptr_array_lookup(&iface->tm.rndv_comps, ntohl(tmh->app_ctx), +- rndv_comp); ++ found = ucs_ptr_array_lookup(&iface->tm.rndv_comps, app_ctx, rndv_comp); + ucs_assert_always(found > 0); + uct_invoke_completion((uct_completion_t*)rndv_comp, UCS_OK); +- ucs_ptr_array_remove(&iface->tm.rndv_comps, ntohl(tmh->app_ctx), 0); ++ ucs_ptr_array_remove(&iface->tm.rndv_comps, app_ctx, 0); + } + + #else +@@ -491,7 +510,8 @@ unsigned uct_rc_iface_do_progress(uct_iface_h tl_iface); + ucs_status_t uct_rc_iface_query(uct_rc_iface_t *iface, + uct_iface_attr_t *iface_attr, + size_t put_max_short, size_t max_inline, +- size_t am_max_hdr, size_t am_max_iov); ++ size_t am_max_hdr, size_t am_max_iov, ++ size_t tag_max_iov); + + ucs_status_t uct_rc_iface_get_address(uct_iface_h tl_iface, + uct_iface_addr_t *addr); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs.h +index a13e0671b..8fd83db20 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs.h +@@ -117,35 +117,29 @@ ucs_status_t uct_rc_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *he + size_t iovcnt, unsigned flags, + uct_completion_t *comp); + +-ucs_status_t uct_rc_verbs_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +- +-ucs_status_t uct_rc_verbs_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- +-ucs_status_t uct_rc_verbs_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +- + ucs_status_t uct_rc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp); + +-ucs_status_t uct_rc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_rc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp); ++ ++ucs_status_t uct_rc_verbs_ep_atomic64_post(uct_ep_h tl_ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); + +-ucs_status_t uct_rc_verbs_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_rc_verbs_ep_atomic32_post(uct_ep_h tl_ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); + +-ucs_status_t uct_rc_verbs_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_rc_verbs_ep_atomic64_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); + +-ucs_status_t uct_rc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ucs_status_t uct_rc_verbs_ep_atomic32_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); ++ uct_completion_t *comp); + + ucs_status_t uct_rc_verbs_ep_flush(uct_ep_h tl_ep, unsigned flags, + uct_completion_t *comp); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.c +index 7a39ad959..4e32a80ff 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.c +@@ -142,7 +142,7 @@ ucs_status_t uct_rc_verbs_iface_common_init(uct_rc_verbs_iface_common_t *iface, + /* Configuration */ + iface->config.short_desc_size = ucs_max(sizeof(uct_rc_hdr_t), + config->max_am_hdr); +- iface->config.short_desc_size = ucs_max(UCT_RC_MAX_ATOMIC_SIZE, ++ iface->config.short_desc_size = ucs_max(UCT_IB_MAX_ATOMIC_SIZE, + iface->config.short_desc_size); + + /* Create AM headers and Atomic mempool */ +@@ -189,3 +189,11 @@ ucs_status_t uct_rc_verbs_wc_to_ucs_status(enum ibv_wc_status status) + return UCS_ERR_IO_ERROR; + } + } ++ ++void uct_rc_verbs_common_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max) ++{ ++ uct_rc_ep_packet_dump(iface, type, data, length, valid_length, buffer, max, 1); ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.h +index 7461374ef..221947c6d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_common.h +@@ -17,7 +17,7 @@ + + + #define UCT_RC_VERBS_IFACE_FOREACH_TXWQE(_iface, _i, _wc, _num_wcs) \ +- status = uct_ib_poll_cq((_iface)->super.send_cq, &_num_wcs, _wc); \ ++ status = uct_ib_poll_cq((_iface)->super.cq[UCT_IB_DIR_TX], &_num_wcs, _wc); \ + if (status != UCS_OK) { \ + return 0; \ + } \ +@@ -69,6 +69,10 @@ void uct_rc_verbs_txcnt_init(uct_rc_verbs_txcnt_t *txcnt); + + ucs_status_t uct_rc_verbs_wc_to_ucs_status(enum ibv_wc_status status); + ++void uct_rc_verbs_common_packet_dump(uct_base_iface_t *iface, uct_am_trace_type_t type, ++ void *data, size_t length, size_t valid_length, ++ char *buffer, size_t max); ++ + static inline void + uct_rc_verbs_txqp_posted(uct_rc_txqp_t *txqp, uct_rc_verbs_txcnt_t *txcnt, + uct_rc_iface_t *iface, int signaled) +@@ -175,7 +179,7 @@ uct_rc_verbs_iface_poll_rx_common(uct_rc_iface_t *iface) + unsigned num_wcs = iface->super.config.rx_max_poll; + struct ibv_wc wc[num_wcs]; + +- status = uct_ib_poll_cq(iface->super.recv_cq, &num_wcs, wc); ++ status = uct_ib_poll_cq(iface->super.cq[UCT_IB_DIR_RX], &num_wcs, wc); + if (status != UCS_OK) { + num_wcs = 0; + goto out; +@@ -183,7 +187,7 @@ uct_rc_verbs_iface_poll_rx_common(uct_rc_iface_t *iface) + + UCT_IB_IFACE_VERBS_FOREACH_RXWQE(&iface->super, i, hdr, wc, num_wcs) { + uct_ib_log_recv_completion(&iface->super, IBV_QPT_RC, &wc[i], hdr, +- wc[i].byte_len, uct_rc_ep_am_packet_dump); ++ wc[i].byte_len, uct_rc_verbs_common_packet_dump); + uct_rc_verbs_iface_handle_am(iface, hdr, wc[i].wr_id, wc[i].qp_num, + wc[i].byte_len, wc[i].imm_data, wc[i].slid); + } +@@ -331,6 +335,9 @@ uct_rc_verbs_iface_common_tag_recv(uct_rc_verbs_iface_common_t *iface, + priv->tag = tag; + priv->buffer = iov->buffer; /* Only one iov is supported so far */ + priv->length = uct_iov_total_length(iov, iovcnt); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_ADD); ++ + return UCS_OK; + } + +@@ -367,6 +374,8 @@ uct_rc_verbs_iface_common_tag_recv_cancel(uct_rc_verbs_iface_common_t *iface, + } + } + ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_DEL); ++ + return UCS_OK; + } + +@@ -404,7 +413,7 @@ uct_rc_verbs_iface_wc_error(enum ibv_wc_status status) + { + /* TODO: handle MSG TRUNCATED error */ + ucs_fatal("Receive completion with error on XRQ: %s", +- ibv_wc_status_str(status)); ++ uct_ib_wc_status_str(status)); + } + + static UCS_F_ALWAYS_INLINE void +@@ -429,8 +438,10 @@ uct_rc_verbs_iface_tag_handle_exp(uct_rc_iface_t *iface, struct ibv_exp_wc *wc) + VALGRIND_MAKE_MEM_DEFINED(priv->buffer, wc->byte_len); + if (UCT_RC_VERBS_TM_IS_SW_RNDV(wc->exp_wc_flags, imm_data)) { + ctx->rndv_cb(ctx, priv->tag, priv->buffer, wc->byte_len, UCS_OK); ++ UCT_RC_IFACE_TM_STAT(iface, RX_RNDV_REQ_EXP); + } else { + ctx->completed_cb(ctx, priv->tag, imm_data, wc->byte_len, UCS_OK); ++ UCT_RC_IFACE_TM_STAT(iface, RX_EXP); + } + ++iface->tm.num_tags; + } +@@ -456,6 +467,7 @@ uct_rc_verbs_iface_unexp_consumed(uct_rc_verbs_iface_common_t *iface, + if (ucs_unlikely(!(++rc_iface->tm.unexpected_cnt % IBV_DEVICE_MAX_UNEXP_COUNT))) { + uct_rc_verbs_iface_post_signaled_op(iface, rc_iface, &wr, + IBV_EXP_WR_TAG_SYNC); ++ UCT_RC_IFACE_TM_STAT(rc_iface, LIST_SYNC); + } + } + +@@ -486,11 +498,15 @@ uct_rc_verbs_iface_tag_handle_unexp(uct_rc_verbs_iface_common_t *iface, + be64toh(tmh->tag), tmh + 1, + wc->byte_len - sizeof(*tmh), + 0ul, 0, NULL); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_REQ_UNEXP); + } else { + status = rc_iface->tm.eager_unexp.cb(rc_iface->tm.eager_unexp.arg, + tmh + 1, wc->byte_len - sizeof(*tmh), + UCT_CB_PARAM_FLAG_DESC, + be64toh(tmh->tag), imm_data); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_EAGER_UNEXP); + } + uct_rc_verbs_iface_unexp_consumed(iface, rc_iface, ib_desc, + &rc_iface->tm.eager_desc, status); +@@ -499,21 +515,25 @@ uct_rc_verbs_iface_tag_handle_unexp(uct_rc_verbs_iface_common_t *iface, + case IBV_EXP_TMH_NO_TAG: + rc_hdr = (uct_rc_hdr_t*)tmh; + uct_ib_log_recv_completion(&rc_iface->super, IBV_QPT_RC, wc, rc_hdr, +- wc->byte_len, uct_rc_ep_am_packet_dump); ++ wc->byte_len, uct_rc_verbs_common_packet_dump); + uct_rc_verbs_iface_handle_am(rc_iface, rc_hdr, wc->wr_id, wc->qp_num, + wc->byte_len, wc->imm_data, wc->slid); + break; + + case IBV_EXP_TMH_RNDV: +- status = uct_rc_iface_handle_rndv(rc_iface, tmh, wc->byte_len); ++ status = uct_rc_iface_handle_rndv(rc_iface, tmh, be64toh(tmh->tag), ++ wc->byte_len); + + uct_rc_verbs_iface_unexp_consumed(iface, rc_iface, ib_desc, + &rc_iface->tm.rndv_desc, status); ++ ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_UNEXP); + break; + + case IBV_EXP_TMH_FIN: +- uct_rc_iface_handle_rndv_fin(rc_iface, tmh); ++ uct_rc_iface_handle_rndv_fin(rc_iface, ntohl(tmh->app_ctx)); + ucs_mpool_put_inline(ib_desc); ++ UCT_RC_IFACE_TM_STAT(rc_iface, RX_RNDV_FIN); + break; + + default: +@@ -534,7 +554,7 @@ uct_rc_verbs_iface_poll_rx_tm(uct_rc_verbs_iface_common_t *iface, + uct_rc_iface_ctx_priv_t *priv; + int num_wcs, i; + +- num_wcs = ibv_exp_poll_cq(rc_iface->super.recv_cq, max_wcs, wc, ++ num_wcs = ibv_exp_poll_cq(rc_iface->super.cq[UCT_IB_DIR_RX], max_wcs, wc, + sizeof(wc[0])); + if (num_wcs <= 0) { + if (ucs_unlikely(num_wcs < 0)) { +@@ -684,6 +704,26 @@ uct_rc_verbs_fill_ext_atomic_wr(struct ibv_exp_send_wr *wr, struct ibv_sge *sge, + break; + } + } ++ ++static UCS_F_ALWAYS_INLINE ++ucs_status_t uct_rc_verbs_ep_atomic32_data(uct_atomic_op_t opcode, uint32_t value, ++ int *op, uint32_t *add, uint32_t *swap) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ *op = IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD; ++ *add = value; ++ *swap = 0; ++ return UCS_OK; ++ case UCT_ATOMIC_OP_SWAP: ++ *op = IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP; ++ *add = 0; ++ *swap = value; ++ return UCS_OK; ++ default: ++ return UCS_ERR_UNSUPPORTED; ++ } ++} + #endif + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_ep.c +index 1cc8743fa..d8abee6fe 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_ep.c +@@ -12,7 +12,7 @@ + + static UCS_F_ALWAYS_INLINE void + uct_rc_verbs_ep_post_send(uct_rc_verbs_iface_t* iface, uct_rc_verbs_ep_t* ep, +- struct ibv_send_wr *wr, int send_flags) ++ struct ibv_send_wr *wr, int send_flags, int max_log_sge) + { + struct ibv_send_wr *bad_wr; + int ret; +@@ -26,8 +26,8 @@ uct_rc_verbs_ep_post_send(uct_rc_verbs_iface_t* iface, uct_rc_verbs_ep_t* ep, + wr->send_flags = send_flags; + wr->wr_id = uct_rc_txqp_unsignaled(&ep->super.txqp); + +- uct_ib_log_post_send(&iface->super.super, ep->super.txqp.qp, wr, +- (wr->opcode == IBV_WR_SEND) ? uct_rc_ep_am_packet_dump : NULL); ++ uct_ib_log_post_send(&iface->super.super, ep->super.txqp.qp, wr, max_log_sge, ++ (wr->opcode == IBV_WR_SEND) ? uct_rc_verbs_common_packet_dump : NULL); + + ret = ibv_post_send(ep->super.txqp.qp, wr, &bad_wr); + if (ret != 0) { +@@ -40,7 +40,7 @@ uct_rc_verbs_ep_post_send(uct_rc_verbs_iface_t* iface, uct_rc_verbs_ep_t* ep, + #if HAVE_DECL_IBV_EXP_POST_SEND && (HAVE_DECL_IBV_EXP_WR_NOP || HAVE_IB_EXT_ATOMICS) + static UCS_F_ALWAYS_INLINE void + uct_rc_verbs_exp_post_send(uct_rc_verbs_ep_t *ep, struct ibv_exp_send_wr *wr, +- uint64_t signal) ++ uint64_t signal, int max_log_sge) + { + uct_rc_verbs_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, + uct_rc_verbs_iface_t); +@@ -54,9 +54,9 @@ uct_rc_verbs_exp_post_send(uct_rc_verbs_ep_t *ep, struct ibv_exp_send_wr *wr, + wr->exp_send_flags = signal; + wr->wr_id = uct_rc_txqp_unsignaled(&ep->super.txqp); + +- uct_ib_log_exp_post_send(&iface->super.super, ep->super.txqp.qp, wr, ++ uct_ib_log_exp_post_send(&iface->super.super, ep->super.txqp.qp, wr, max_log_sge, + (wr->exp_opcode == IBV_EXP_WR_SEND) ? +- uct_rc_ep_am_packet_dump : NULL); ++ uct_rc_verbs_common_packet_dump : NULL); + + ret = ibv_exp_post_send(ep->super.txqp.qp, wr, &bad_wr); + if (ret != 0) { +@@ -74,12 +74,13 @@ uct_rc_verbs_exp_post_send(uct_rc_verbs_ep_t *ep, struct ibv_exp_send_wr *wr, + */ + static UCS_F_ALWAYS_INLINE void + uct_rc_verbs_ep_post_send_desc(uct_rc_verbs_ep_t* ep, struct ibv_send_wr *wr, +- uct_rc_iface_send_desc_t *desc, int send_flags) ++ uct_rc_iface_send_desc_t *desc, int send_flags, ++ int max_log_sge) + { + uct_rc_verbs_iface_t *iface = ucs_derived_of(ep->super.super.super.iface, + uct_rc_verbs_iface_t); + UCT_RC_VERBS_FILL_DESC_WR(wr, desc); +- uct_rc_verbs_ep_post_send(iface, ep, wr, send_flags); ++ uct_rc_verbs_ep_post_send(iface, ep, wr, send_flags, max_log_sge); + uct_rc_txqp_add_send_op_sn(&ep->super.txqp, &desc->super, ep->txcnt.pi); + } + +@@ -100,7 +101,7 @@ uct_rc_verbs_ep_rdma_zcopy(uct_rc_verbs_ep_t *ep, const uct_iov_t *iov, + UCT_RC_VERBS_FILL_RDMA_WR_IOV(wr, wr.opcode, opcode, sge, sge_cnt, remote_addr, rkey); + wr.next = NULL; + +- uct_rc_verbs_ep_post_send(iface, ep, &wr, IBV_SEND_SIGNALED); ++ uct_rc_verbs_ep_post_send(iface, ep, &wr, IBV_SEND_SIGNALED, INT_MAX); + uct_rc_txqp_add_send_comp(&iface->super, &ep->super.txqp, comp, ep->txcnt.pi); + return UCS_INPROGRESS; + } +@@ -118,7 +119,7 @@ uct_rc_verbs_ep_atomic_post(uct_rc_verbs_ep_t *ep, int opcode, uint64_t compare_ + UCT_RC_VERBS_FILL_ATOMIC_WR(wr, wr.opcode, sge, opcode, compare_add, swap, + remote_addr, ib_rkey); + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, force_sig); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, force_sig, INT_MAX); + } + + static UCS_F_ALWAYS_INLINE ucs_status_t +@@ -131,9 +132,9 @@ uct_rc_verbs_ep_atomic(uct_rc_verbs_ep_t *ep, int opcode, void *result, + uct_rc_iface_send_desc_t *desc; + + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc, +- iface->super.config.atomic64_handler, +- result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super, &iface->verbs_common.short_desc_mp, ++ desc, iface->super.config.atomic64_handler, ++ result, comp); + uct_rc_verbs_ep_atomic_post(ep, opcode, compare_add, swap, remote_addr, + rkey, desc, IBV_SEND_SIGNALED); + return UCS_INPROGRESS; +@@ -153,7 +154,7 @@ uct_rc_verbs_ep_ext_atomic_post(uct_rc_verbs_ep_t *ep, int opcode, uint32_t leng + compare_add, swap, remote_addr, rkey, ep->super.atomic_mr_offset); + UCT_RC_VERBS_FILL_DESC_WR(&wr, desc); + UCT_TL_EP_STAT_ATOMIC(&ep->super.super); +- uct_rc_verbs_exp_post_send(ep, &wr, force_sig|IBV_EXP_SEND_EXT_ATOMIC_INLINE); ++ uct_rc_verbs_exp_post_send(ep, &wr, force_sig|IBV_EXP_SEND_EXT_ATOMIC_INLINE, INT_MAX); + uct_rc_txqp_add_send_op_sn(&ep->super.txqp, &desc->super, ep->txcnt.pi); + } + +@@ -170,8 +171,8 @@ uct_rc_verbs_ep_ext_atomic(uct_rc_verbs_ep_t *ep, int opcode, void *result, + uct_rc_iface_send_desc_t *desc; + + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc, +- handler, result, comp); ++ UCT_RC_IFACE_GET_TX_ATOMIC_FETCH_DESC(&iface->super, &iface->verbs_common.short_desc_mp, ++ desc, handler, result, comp); + uct_rc_verbs_ep_ext_atomic_post(ep, opcode, length, compare_mask, compare_add, + swap, remote_addr, rkey, desc, + IBV_EXP_SEND_SIGNALED); +@@ -192,7 +193,7 @@ ucs_status_t uct_rc_verbs_ep_put_short(uct_ep_h tl_ep, const void *buffer, + UCT_RC_VERBS_FILL_INL_PUT_WR(iface, remote_addr, rkey, buffer, length); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, SHORT, length); + uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_rwrite_wr, +- IBV_SEND_INLINE | IBV_SEND_SIGNALED); ++ IBV_SEND_INLINE | IBV_SEND_SIGNALED, INT_MAX); + return UCS_OK; + } + +@@ -212,7 +213,7 @@ ssize_t uct_rc_verbs_ep_put_bcopy(uct_ep_h tl_ep, uct_pack_callback_t pack_cb, + UCT_RC_VERBS_FILL_RDMA_WR(wr, wr.opcode, IBV_WR_RDMA_WRITE, sge, + length, remote_addr, rkey); + UCT_TL_EP_STAT_OP(&ep->super.super, PUT, BCOPY, length); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SIGNALED); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SIGNALED, INT_MAX); + return length; + } + +@@ -254,7 +255,7 @@ ucs_status_t uct_rc_verbs_ep_get_bcopy(uct_ep_h tl_ep, + rkey); + + UCT_TL_EP_STAT_OP(&ep->super.super, GET, BCOPY, length); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SIGNALED); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SIGNALED, INT_MAX); + return UCS_INPROGRESS; + } + +@@ -290,7 +291,7 @@ ucs_status_t uct_rc_verbs_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + uct_rc_verbs_iface_fill_inl_am_sge(verbs_common, id, hdr, buffer, length); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, SHORT, sizeof(hdr) + length); + uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, +- IBV_SEND_INLINE | IBV_SEND_SOLICITED); ++ IBV_SEND_INLINE | IBV_SEND_SOLICITED, INT_MAX); + UCT_RC_UPDATE_FC(&iface->super, &ep->super, id); + + return UCS_OK; +@@ -316,7 +317,7 @@ ssize_t uct_rc_verbs_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + UCT_RC_VERBS_FILL_AM_BCOPY_WR(wr, sge, length + sizeof(uct_rc_hdr_t), + wr.opcode); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SOLICITED); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, IBV_SEND_SOLICITED, INT_MAX); + UCT_RC_UPDATE_FC(&iface->super, &ep->super, id); + + return length; +@@ -353,76 +354,52 @@ ucs_status_t uct_rc_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *he + UCT_TL_EP_STAT_OP(&ep->super.super, AM, ZCOPY, + (header_length + uct_iov_total_length(iov, iovcnt))); + +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, send_flags | IBV_SEND_SOLICITED); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, send_flags | IBV_SEND_SOLICITED, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super)); + UCT_RC_UPDATE_FC(&iface->super, &ep->super, id); + + return UCS_INPROGRESS; + } + +-ucs_status_t uct_rc_verbs_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_rc_verbs_ep_atomic64_post(uct_ep_h tl_ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { + uct_rc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_verbs_iface_t); +- uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); ++ uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); + uct_rc_iface_send_desc_t *desc; + ++ if (opcode != UCT_ATOMIC_OP_ADD) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ + /* TODO don't allocate descriptor - have dummy buffer */ + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc); ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc); + + uct_rc_verbs_ep_atomic_post(ep, +- IBV_WR_ATOMIC_FETCH_AND_ADD, add, 0, ++ IBV_WR_ATOMIC_FETCH_AND_ADD, value, 0, + remote_addr, rkey, desc, + IBV_SEND_SIGNALED); + return UCS_OK; + } + +-ucs_status_t uct_rc_verbs_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_rc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_WR_ATOMIC_FETCH_AND_ADD, result, add, 0, +- remote_addr, rkey, comp); +-} +- +-ucs_status_t uct_rc_verbs_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +-#if HAVE_IB_EXT_ATOMICS +- return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, +- result, sizeof(uint64_t), 0, 0, swap, remote_addr, +- rkey, comp); +-#else +- return UCS_ERR_UNSUPPORTED; +-#endif +-} +- +-ucs_status_t uct_rc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- return uct_rc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_WR_ATOMIC_CMP_AND_SWP, result, compare, swap, +- remote_addr, rkey, comp); +-} +- +-ucs_status_t uct_rc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_rc_verbs_ep_atomic32_post(uct_ep_h tl_ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { + #if HAVE_IB_EXT_ATOMICS + uct_rc_verbs_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_rc_verbs_iface_t); +- uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); ++ uct_rc_verbs_ep_t *ep = ucs_derived_of(tl_ep, uct_rc_verbs_ep_t); + uct_rc_iface_send_desc_t *desc; + ++ if (opcode != UCT_ATOMIC_OP_ADD) { ++ return UCS_ERR_UNSUPPORTED; ++ } ++ + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- UCT_RC_IFACE_GET_TX_ATOMIC_ADD_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc); ++ UCT_RC_IFACE_GET_TX_ATOMIC_DESC(&iface->super, &iface->verbs_common.short_desc_mp, desc); + +- /* TODO don't allocate descriptor - have dummy buffer */ + uct_rc_verbs_ep_ext_atomic_post(ep, IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD, +- sizeof(uint32_t), 0, add, 0, remote_addr, ++ sizeof(uint32_t), 0, value, 0, remote_addr, + rkey, desc, IBV_EXP_SEND_SIGNALED); + return UCS_OK; + #else +@@ -430,34 +407,63 @@ ucs_status_t uct_rc_verbs_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, + #endif + } + +-ucs_status_t uct_rc_verbs_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_verbs_ep_atomic64_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { +-#if HAVE_IB_EXT_ATOMICS +- return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_FETCH_AND_ADD, +- result, sizeof(uint32_t), 0, add, 0, ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_rc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), ++ IBV_WR_ATOMIC_FETCH_AND_ADD, result, value, 0, + remote_addr, rkey, comp); +-#else +- return UCS_ERR_UNSUPPORTED; ++#if HAVE_IB_EXT_ATOMICS ++ case UCT_ATOMIC_OP_SWAP: ++ return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), ++ IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, ++ result, sizeof(uint64_t), 0, 0, value, remote_addr, ++ rkey, comp); + #endif ++ default: ++ break; ++ } ++ ++ return UCS_ERR_UNSUPPORTED; + } + +-ucs_status_t uct_rc_verbs_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_rc_verbs_ep_atomic32_fetch(uct_ep_h tl_ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { + #if HAVE_IB_EXT_ATOMICS +- return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), +- IBV_EXP_WR_EXT_MASKED_ATOMIC_CMP_AND_SWP, +- result, sizeof(uint32_t), 0, 0, swap, +- remote_addr, rkey, comp); ++ int op; ++ uint32_t add; ++ uint32_t swap; ++ ucs_status_t status; ++ ++ status = uct_rc_verbs_ep_atomic32_data(opcode, value, &op, &add, &swap); ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ return uct_rc_verbs_ep_ext_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), op, ++ result, sizeof(uint32_t), 0, add, swap, ++ remote_addr, rkey, comp); + #else + return UCS_ERR_UNSUPPORTED; + #endif + } + ++ucs_status_t uct_rc_verbs_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp) ++{ ++ return uct_rc_verbs_ep_atomic(ucs_derived_of(tl_ep, uct_rc_verbs_ep_t), ++ IBV_WR_ATOMIC_CMP_AND_SWP, result, compare, swap, ++ remote_addr, rkey, comp); ++} ++ + ucs_status_t uct_rc_verbs_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp) +@@ -485,7 +491,7 @@ static ucs_status_t uct_rc_verbs_ep_nop(uct_rc_verbs_ep_t *ep) + wr.exp_send_flags = IBV_EXP_SEND_FENCE; + wr.comp_mask = 0; + UCT_RC_CHECK_RES(&iface->super, &ep->super); +- uct_rc_verbs_exp_post_send(ep, &wr, IBV_EXP_SEND_SIGNALED); ++ uct_rc_verbs_exp_post_send(ep, &wr, IBV_EXP_SEND_SIGNALED, INT_MAX); + return UCS_OK; + #else + return UCS_ERR_UNSUPPORTED; +@@ -515,9 +521,13 @@ ucs_status_t uct_rc_verbs_ep_flush(uct_ep_h tl_ep, unsigned flags, + } + } + +- uct_rc_txqp_add_send_comp(&iface->super, &ep->super.txqp, comp, ep->txcnt.pi); +- UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super.super); +- return UCS_INPROGRESS; ++ status = uct_rc_txqp_add_flush_comp(&iface->super, &ep->super.txqp, comp, ++ ep->txcnt.pi); ++ if (status == UCS_INPROGRESS) { ++ UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super.super); ++ } ++ ++ return status; + } + + ucs_status_t uct_rc_verbs_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, +@@ -547,7 +557,7 @@ ucs_status_t uct_rc_verbs_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op, + iface->verbs_common.inl_sge[0].addr = (uintptr_t)hdr; + iface->verbs_common.inl_sge[0].length = sizeof(*hdr); + +- uct_rc_verbs_ep_post_send(iface, ep, &fc_wr, IBV_SEND_INLINE); ++ uct_rc_verbs_ep_post_send(iface, ep, &fc_wr, IBV_SEND_INLINE, INT_MAX); + return UCS_OK; + } + +@@ -567,7 +577,10 @@ ucs_status_t uct_rc_verbs_ep_tag_eager_short(uct_ep_h tl_ep, uct_tag_t tag, + uct_rc_iface_fill_tmh(&tmh, tag, 0, IBV_EXP_TMH_EAGER); + uct_rc_verbs_iface_fill_inl_sge(&iface->verbs_common, &tmh, sizeof(tmh), data, length); + +- uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE); ++ uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, SHORT, length); ++ + return UCS_OK; + } + +@@ -591,7 +604,10 @@ ssize_t uct_rc_verbs_ep_tag_eager_bcopy(uct_ep_h tl_ep, uct_tag_t tag, + UCT_RC_IFACE_GET_TM_BCOPY_DESC(iface, &iface->tx.mp, desc, tag, app_ctx, + pack_cb, arg, length); + UCT_RC_VERBS_FILL_SGE(wr, sge, length + sizeof(struct ibv_exp_tmh)); +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, 0); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, 0, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, BCOPY, length); ++ + return length; + } + +@@ -609,7 +625,8 @@ ucs_status_t uct_rc_verbs_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + size_t sge_cnt; + uint32_t app_ctx; + +- UCT_CHECK_IOV_SIZE(iovcnt, 1ul, "uct_rc_verbs_ep_tag_eager_zcopy"); ++ UCT_CHECK_IOV_SIZE(iovcnt, uct_ib_iface_get_max_iov(&iface->super.super) - 1, ++ "uct_rc_verbs_ep_tag_eager_zcopy"); + UCT_RC_CHECK_ZCOPY_DATA(sizeof(struct ibv_exp_tmh), + uct_iov_total_length(iov, iovcnt), + iface->super.super.config.seg_size); +@@ -626,7 +643,11 @@ ucs_status_t uct_rc_verbs_ep_tag_eager_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + wr.num_sge = sge_cnt + 1; + wr.sg_list = sge; + +- uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, send_flags); ++ uct_rc_verbs_ep_post_send_desc(ep, &wr, desc, send_flags, INT_MAX); ++ ++ UCT_TL_EP_STAT_OP(&ep->super.super, TAG, ZCOPY, ++ uct_iov_total_length(iov, iovcnt)); ++ + return UCS_INPROGRESS; + } + +@@ -657,7 +678,7 @@ ucs_status_ptr_t uct_rc_verbs_ep_tag_rndv_zcopy(uct_ep_h tl_ep, uct_tag_t tag, + iface->super.tm.max_rndv_data, + tmh_len, tag, iov, comp); + +- uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE); ++ uct_rc_verbs_ep_post_send(iface, ep, &iface->inl_am_wr, IBV_SEND_INLINE, INT_MAX); + return (ucs_status_ptr_t)((uint64_t)rndv_idx); + } + +@@ -688,7 +709,7 @@ ucs_status_t uct_rc_verbs_ep_tag_rndv_request(uct_ep_h tl_ep, uct_tag_t tag, + uct_rc_iface_fill_tmh(&tmh, tag, app_ctx, IBV_EXP_TMH_EAGER); + uct_rc_verbs_iface_fill_inl_sge(&iface->verbs_common, &tmh, sizeof(tmh), + header, header_length); +- uct_rc_verbs_ep_post_send(iface, ep, &wr, IBV_SEND_INLINE); ++ uct_rc_verbs_ep_post_send(iface, ep, &wr, IBV_SEND_INLINE, INT_MAX); + return UCS_OK; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_iface.c +index 98a395de5..7182b6353 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rc/verbs/rc_verbs_iface.c +@@ -202,6 +202,7 @@ static ucs_status_t uct_rc_verbs_iface_query(uct_iface_h tl_iface, uct_iface_att + verbs_common->config.max_inline, + verbs_common->config.max_inline, + verbs_common->config.short_desc_size, ++ uct_ib_iface_get_max_iov(&iface->super.super) - 1, + uct_ib_iface_get_max_iov(&iface->super.super) - 1); + if (status != UCS_OK) { + return status; +@@ -221,12 +222,16 @@ static UCS_CLASS_INIT_FUNC(uct_rc_verbs_iface_t, uct_md_h md, uct_worker_h worke + uct_rc_verbs_iface_config_t *config = + ucs_derived_of(tl_config, uct_rc_verbs_iface_config_t); + ucs_status_t status; ++ uct_ib_iface_init_attr_t init_attr = {}; + struct ibv_qp_cap cap; + struct ibv_qp *qp; + ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ init_attr.tm_cap_bit = IBV_EXP_TM_CAP_RC; ++ init_attr.fc_req_size = sizeof(uct_rc_fc_request_t); ++ + UCS_CLASS_CALL_SUPER_INIT(uct_rc_iface_t, &uct_rc_verbs_iface_ops, md, +- worker, params, &config->super, 0, +- sizeof(uct_rc_fc_request_t), IBV_EXP_TM_CAP_RC); ++ worker, params, &config->super, &init_attr); + + self->config.tx_max_wr = ucs_min(config->verbs_common.tx_max_wr, + self->super.config.tx_qp_len); +@@ -301,14 +306,12 @@ static uct_rc_iface_ops_t uct_rc_verbs_iface_ops = { + .ep_put_zcopy = uct_rc_verbs_ep_put_zcopy, + .ep_get_bcopy = uct_rc_verbs_ep_get_bcopy, + .ep_get_zcopy = uct_rc_verbs_ep_get_zcopy, +- .ep_atomic_add64 = uct_rc_verbs_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_rc_verbs_ep_atomic_fadd64, +- .ep_atomic_swap64 = uct_rc_verbs_ep_atomic_swap64, + .ep_atomic_cswap64 = uct_rc_verbs_ep_atomic_cswap64, +- .ep_atomic_add32 = uct_rc_verbs_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_rc_verbs_ep_atomic_fadd32, +- .ep_atomic_swap32 = uct_rc_verbs_ep_atomic_swap32, ++ .ep_atomic64_post = uct_rc_verbs_ep_atomic64_post, ++ .ep_atomic64_fetch = uct_rc_verbs_ep_atomic64_fetch, + .ep_atomic_cswap32 = uct_rc_verbs_ep_atomic_cswap32, ++ .ep_atomic32_post = uct_rc_verbs_ep_atomic32_post, ++ .ep_atomic32_fetch = uct_rc_verbs_ep_atomic32_fetch, + .ep_pending_add = uct_rc_ep_pending_add, + .ep_pending_purge = uct_rc_ep_pending_purge, + .ep_flush = uct_rc_verbs_ep_flush, +@@ -340,10 +343,11 @@ static uct_rc_iface_ops_t uct_rc_verbs_iface_ops = { + .iface_get_device_address = uct_ib_iface_get_device_address, + .iface_is_reachable = uct_rc_iface_is_reachable, + }, +- .arm_tx_cq = uct_ib_iface_arm_tx_cq, +- .arm_rx_cq = uct_ib_iface_arm_rx_cq, ++ .arm_cq = uct_ib_iface_arm_cq, ++ .event_cq = (void*)ucs_empty_function, + .handle_failure = uct_rc_verbs_handle_failure, +- .set_ep_failed = uct_rc_verbs_ep_set_failed ++ .set_ep_failed = uct_rc_verbs_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .fc_ctrl = uct_rc_verbs_ep_fc_ctrl, + .fc_handler = uct_rc_iface_fc_handler +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_def.h +index c1cddcc6a..fe4a24536 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_def.h +@@ -25,6 +25,7 @@ typedef struct uct_rdmacm_ep uct_rdmacm_ep_t; + + typedef struct uct_rdmacm_priv_data_hdr { + uint8_t length; /* length of the private data */ ++ int8_t status; + } uct_rdmacm_priv_data_hdr_t; + + typedef struct uct_rdmacm_ctx { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.c +index 63331cfe2..5679a133f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.c +@@ -5,6 +5,16 @@ + + #include "rdmacm_ep.h" + ++ ++#define UCT_RDMACM_CB_FLAGS_CHECK(_flags) \ ++ do { \ ++ UCT_CB_FLAGS_CHECK(_flags); \ ++ if (!((_flags) & UCT_CB_FLAG_ASYNC)) { \ ++ return UCS_ERR_UNSUPPORTED; \ ++ } \ ++ } while (0) ++ ++ + ucs_status_t uct_rdmacm_ep_resolve_addr(uct_rdmacm_ep_t *ep) + { + uct_rdmacm_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_rdmacm_iface_t); +@@ -74,11 +84,11 @@ static inline void uct_rdmacm_ep_add_to_pending(uct_rdmacm_iface_t *iface, uct_r + + static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + const ucs_sock_addr_t *sockaddr, +- const void *priv_data, size_t length) ++ uct_sockaddr_priv_pack_callback_t pack_cb, ++ void *arg, uint32_t cb_flags) + { + uct_rdmacm_iface_t *iface = ucs_derived_of(tl_iface, uct_rdmacm_iface_t); + char ip_port_str[UCS_SOCKADDR_STRING_LEN]; +- uct_rdmacm_priv_data_hdr_t hdr; + ucs_status_t status; + + UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &iface->super); +@@ -88,18 +98,16 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + return UCS_ERR_UNSUPPORTED; + } + ++ UCT_RDMACM_CB_FLAGS_CHECK(cb_flags); ++ + /* Initialize these fields before calling rdma_resolve_addr to avoid a race + * where they are used before being initialized (from the async thread + * - after an RDMA_CM_EVENT_ROUTE_RESOLVED event) */ +- hdr.length = length; +- self->priv_data = ucs_malloc(sizeof(hdr) + length, "client private data"); +- if (self->priv_data == NULL) { +- status = UCS_ERR_NO_MEMORY; +- goto err; +- } +- +- memcpy(self->priv_data, &hdr, sizeof(hdr)); +- memcpy(self->priv_data + sizeof(hdr), priv_data, length); ++ self->pack_cb = pack_cb; ++ self->pack_cb_arg = arg; ++ self->pack_cb_flags = cb_flags; ++ pthread_mutex_init(&self->ops_mutex, NULL); ++ ucs_queue_head_init(&self->ops); + + /* Save the remote address */ + if (sockaddr->addr->sa_family == AF_INET) { +@@ -109,7 +117,7 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + } else { + ucs_error("rdmacm ep: unknown remote sa_family=%d", sockaddr->addr->sa_family); + status = UCS_ERR_IO_ERROR; +- goto err_free_priv_data; ++ goto err; + } + + self->slow_prog_id = UCS_CALLBACKQ_ID_NULL; +@@ -118,7 +126,7 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + if (status == UCS_ERR_NO_RESOURCE) { + goto add_to_pending; + } else if (status != UCS_OK) { +- goto err_free_priv_data; ++ goto err; + } + + self->is_on_pending = 0; +@@ -130,7 +138,7 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_ep_t, uct_iface_t *tl_iface, + * All endpoints share the interface's event_channel. */ + status = uct_rdmacm_ep_resolve_addr(self); + if (status != UCS_OK) { +- goto err_free_priv_data; ++ goto err; + } + + goto out; +@@ -145,11 +153,12 @@ out: + iface, iface->event_ch, iface->cm_id, + ucs_sockaddr_str((struct sockaddr *)sockaddr->addr, + ip_port_str, UCS_SOCKADDR_STRING_LEN)); ++ self->status = UCS_INPROGRESS; + return UCS_OK; + +-err_free_priv_data: +- ucs_free(self->priv_data); + err: ++ pthread_mutex_destroy(&self->ops_mutex); ++ + return status; + } + +@@ -171,6 +180,11 @@ static UCS_CLASS_CLEANUP_FUNC(uct_rdmacm_ep_t) + uct_worker_progress_unregister_safe(&iface->super.worker->super, + &self->slow_prog_id); + ++ pthread_mutex_destroy(&self->ops_mutex); ++ if (!ucs_queue_is_empty(&self->ops)) { ++ ucs_warn("destroying endpoint %p with not completed operations", self); ++ } ++ + /* mark this ep as destroyed so that arriving events on it won't try to + * use it */ + if (self->cm_id_ctx != NULL) { +@@ -179,35 +193,63 @@ static UCS_CLASS_CLEANUP_FUNC(uct_rdmacm_ep_t) + ucs_debug("ep destroy: cm_id %p", cm_id_ctx->cm_id); + } + UCS_ASYNC_UNBLOCK(iface->super.worker->async); +- +- ucs_free(self->priv_data); + } + + UCS_CLASS_DEFINE(uct_rdmacm_ep_t, uct_base_ep_t) + UCS_CLASS_DEFINE_NEW_FUNC(uct_rdmacm_ep_t, uct_ep_t, uct_iface_t*, + const ucs_sock_addr_t *, +- const void *, size_t); ++ uct_sockaddr_priv_pack_callback_t, void *, ++ uint32_t); + UCS_CLASS_DEFINE_DELETE_FUNC(uct_rdmacm_ep_t, uct_ep_t); + + static unsigned uct_rdmacm_client_err_handle_progress(void *arg) + { +- uct_rdmacm_ep_t *ep = arg; +- ucs_trace_func("err_handle ep=%p",ep); ++ uct_rdmacm_ep_t *rdmacm_ep = arg; ++ uct_rdmacm_iface_t *iface = ucs_derived_of(rdmacm_ep->super.super.iface, ++ uct_rdmacm_iface_t); + +- ep->slow_prog_id = UCS_CALLBACKQ_ID_NULL; +- uct_set_ep_failed(&UCS_CLASS_NAME(uct_rdmacm_ep_t), &ep->super.super, +- ep->super.super.iface, UCS_ERR_IO_ERROR); ++ ucs_trace_func("err_handle ep=%p", rdmacm_ep); ++ UCS_ASYNC_BLOCK(iface->super.worker->async); ++ ++ rdmacm_ep->slow_prog_id = UCS_CALLBACKQ_ID_NULL; ++ uct_set_ep_failed(&UCS_CLASS_NAME(uct_rdmacm_ep_t), &rdmacm_ep->super.super, ++ rdmacm_ep->super.super.iface, rdmacm_ep->status); ++ ++ UCS_ASYNC_UNBLOCK(iface->super.worker->async); + return 0; + } + +-void uct_rdmacm_ep_set_failed(uct_iface_t *iface, uct_ep_h ep) ++void uct_rdmacm_ep_set_failed(uct_iface_t *iface, uct_ep_h ep, ucs_status_t status) + { + uct_rdmacm_iface_t *rdmacm_iface = ucs_derived_of(iface, uct_rdmacm_iface_t); +- uct_rdmacm_ep_t *rdmacm_ep = ucs_derived_of(ep, uct_rdmacm_ep_t); ++ uct_rdmacm_ep_t *rdmacm_ep = ucs_derived_of(ep, uct_rdmacm_ep_t); ++ ++ if (rdmacm_iface->super.err_handler_flags & UCT_CB_FLAG_ASYNC) { ++ uct_set_ep_failed(&UCS_CLASS_NAME(uct_rdmacm_ep_t), &rdmacm_ep->super.super, ++ &rdmacm_iface->super.super, status); ++ } else { ++ /* invoke the error handling flow from the main thread */ ++ rdmacm_ep->status = status; ++ uct_worker_progress_register_safe(&rdmacm_iface->super.worker->super, ++ uct_rdmacm_client_err_handle_progress, ++ rdmacm_ep, UCS_CALLBACKQ_FLAG_ONESHOT, ++ &rdmacm_ep->slow_prog_id); ++ } ++} + +- /* invoke the error handling flow from the main thread */ +- uct_worker_progress_register_safe(&rdmacm_iface->super.worker->super, +- uct_rdmacm_client_err_handle_progress, +- rdmacm_ep, UCS_CALLBACKQ_FLAG_ONESHOT, +- &rdmacm_ep->slow_prog_id); ++/** ++ * Caller must lock ep->ops_mutex ++ */ ++void uct_rdmacm_ep_invoke_completions(uct_rdmacm_ep_t *ep, ucs_status_t status) ++{ ++ uct_rdmacm_ep_op_t *op; ++ ++ ucs_assert(pthread_mutex_trylock(&ep->ops_mutex) == EBUSY); ++ ++ ucs_queue_for_each_extract(op, &ep->ops, queue_elem, 1) { ++ pthread_mutex_unlock(&ep->ops_mutex); ++ uct_invoke_completion(op->user_comp, status); ++ ucs_free(op); ++ pthread_mutex_lock(&ep->ops_mutex); ++ } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.h +index 436670d29..232f00d0a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_ep.h +@@ -8,21 +8,40 @@ + + #include "rdmacm_iface.h" + ++ ++typedef struct uct_rdmacm_ep_op uct_rdmacm_ep_op_t; ++ ++struct uct_rdmacm_ep_op { ++ ucs_queue_elem_t queue_elem; ++ uct_completion_t *user_comp; ++}; ++ ++ + struct uct_rdmacm_ep { + uct_base_ep_t super; +- void *priv_data; +- ucs_list_link_t list_elem; /* for the pending_eps_list*/ +- struct sockaddr_storage remote_addr; ++ uct_sockaddr_priv_pack_callback_t pack_cb; ++ void *pack_cb_arg; ++ uint32_t pack_cb_flags; + int is_on_pending; ++ ++ pthread_mutex_t ops_mutex; /* guards ops and status */ ++ ucs_queue_head_t ops; ++ ucs_status_t status; /* client EP status */ ++ ++ ucs_list_link_t list_elem; /* for the pending_eps_list */ ++ struct sockaddr_storage remote_addr; + uct_worker_cb_id_t slow_prog_id; + uct_rdmacm_ctx_t *cm_id_ctx; + }; + + UCS_CLASS_DECLARE_NEW_FUNC(uct_rdmacm_ep_t, uct_ep_t, uct_iface_t*, + const ucs_sock_addr_t *, +- const void *, size_t); ++ uct_sockaddr_priv_pack_callback_t, void *, ++ uint32_t); + UCS_CLASS_DECLARE_DELETE_FUNC(uct_rdmacm_ep_t, uct_ep_t); + +-void uct_rdmacm_ep_set_failed(uct_iface_t *iface, uct_ep_h ep); ++void uct_rdmacm_ep_set_failed(uct_iface_t *iface, uct_ep_h ep, ucs_status_t status); ++ ++void uct_rdmacm_ep_invoke_completions(uct_rdmacm_ep_t *ep, ucs_status_t status); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_iface.c +index 5e7337b1d..accf09aab 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_iface.c +@@ -8,6 +8,12 @@ + #include + #include + ++ ++enum uct_rdmacm_process_event_flags { ++ UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG = UCS_BIT(0), ++ UCT_RDMACM_PROCESS_EVENT_ACK_EVENT_FLAG = UCS_BIT(1) ++}; ++ + static ucs_config_field_t uct_rdmacm_iface_config_table[] = { + {"BACKLOG", "1024", + "Maximum number of pending connections for an rdma_cm_id.", +@@ -56,12 +62,87 @@ static ucs_status_t uct_rdmacm_iface_get_address(uct_iface_h tl_iface, uct_iface + return UCS_OK; + } + ++static ucs_status_t uct_rdmacm_accept(struct rdma_cm_id *id) ++{ ++ /* The server will not send any reply data back to the client */ ++ struct rdma_conn_param conn_param = {0}; ++ ++ /* Accepting the connection will generate the RDMA_CM_EVENT_ESTABLISHED ++ * event on the client side. */ ++ if (rdma_accept(id, &conn_param)) { ++ ucs_error("rdma_accept(to id=%p) failed: %m", id); ++ return UCS_ERR_IO_ERROR; ++ } ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_rdmacm_iface_accept(uct_iface_h tl_iface, ++ uct_conn_request_h conn_request) ++{ ++ struct rdma_cm_event *event = conn_request; ++ ucs_status_t status; ++ ++ ucs_trace("accepting event %p with id %p", event, event->id); ++ status = uct_rdmacm_accept(event->id); ++ rdma_destroy_id(event->id); ++ rdma_ack_cm_event(event); ++ ++ return status; ++} ++ ++static ucs_status_t uct_rdmacm_iface_reject(uct_iface_h tl_iface, ++ uct_conn_request_h conn_request) ++{ ++ struct rdma_cm_event *event = conn_request; ++ ucs_status_t status = UCS_OK; ++ uct_rdmacm_priv_data_hdr_t hdr = { ++ .length = 0, ++ .status = UCS_ERR_REJECTED ++ }; ++ ++ ucs_trace("rejecting event %p with id %p", event, event->id); ++ if (rdma_reject(event->id, &hdr, sizeof(hdr))) { ++ ucs_warn("rdma_reject(id=%p) failed: %m", event->id); ++ status = UCS_ERR_IO_ERROR; ++ } ++ ++ rdma_destroy_id(event->id); ++ rdma_ack_cm_event(event); ++ return status; ++} ++ ++static ucs_status_t uct_rdmacm_ep_flush(uct_ep_h tl_ep, unsigned flags, ++ uct_completion_t *comp) ++{ ++ uct_rdmacm_ep_t *ep = ucs_derived_of(tl_ep, uct_rdmacm_ep_t); ++ ucs_status_t status; ++ uct_rdmacm_ep_op_t *op; ++ ++ pthread_mutex_lock(&ep->ops_mutex); ++ status = ep->status; ++ if ((status == UCS_INPROGRESS) && (comp != NULL)) { ++ op = ucs_malloc(sizeof(*op), "uct_rdmacm_ep_flush op"); ++ if (op != NULL) { ++ op->user_comp = comp; ++ ucs_queue_push(&ep->ops, &op->queue_elem); ++ } else { ++ status = UCS_ERR_NO_MEMORY; ++ } ++ } ++ pthread_mutex_unlock(&ep->ops_mutex); ++ ++ return status; ++} ++ + static uct_iface_ops_t uct_rdmacm_iface_ops = { + .ep_create_sockaddr = UCS_CLASS_NEW_FUNC_NAME(uct_rdmacm_ep_t), + .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_rdmacm_ep_t), +- .ep_flush = uct_base_ep_flush, ++ .ep_flush = uct_rdmacm_ep_flush, + .ep_fence = uct_base_ep_fence, + .ep_pending_purge = ucs_empty_function, ++ .iface_accept = uct_rdmacm_iface_accept, ++ .iface_reject = uct_rdmacm_iface_reject, + .iface_progress_enable = (void*)ucs_empty_function_return_success, + .iface_progress_disable = (void*)ucs_empty_function_return_success, + .iface_progress = ucs_empty_function_return_zero, +@@ -110,18 +191,22 @@ void uct_rdmacm_iface_client_start_next_ep(uct_rdmacm_iface_t *iface) + break; + } + +- uct_rdmacm_ep_set_failed(&iface->super.super, &ep->super.super); ++ uct_rdmacm_ep_set_failed(&iface->super.super, &ep->super.super, status); + } + + UCS_ASYNC_UNBLOCK(iface->super.worker->async); + } + + static void uct_rdmacm_client_handle_failure(uct_rdmacm_iface_t *iface, +- uct_rdmacm_ep_t *ep) ++ uct_rdmacm_ep_t *ep, ++ ucs_status_t status) + { + ucs_assert(!iface->is_server); + if (ep != NULL) { +- uct_rdmacm_ep_set_failed(&iface->super.super, &ep->super.super); ++ pthread_mutex_lock(&ep->ops_mutex); ++ uct_rdmacm_ep_set_failed(&iface->super.super, &ep->super.super, status); ++ uct_rdmacm_ep_invoke_completions(ep, status); ++ pthread_mutex_unlock(&ep->ops_mutex); + } + } + +@@ -130,40 +215,20 @@ static void uct_rdmacm_iface_process_conn_req(uct_rdmacm_iface_t *iface, + struct sockaddr *remote_addr) + { + uct_rdmacm_priv_data_hdr_t *hdr; +- struct rdma_conn_param conn_param; +- char ip_port_str[UCS_SOCKADDR_STRING_LEN]; +- ucs_status_t status; + + hdr = (uct_rdmacm_priv_data_hdr_t*) event->param.ud.private_data; +- ++ ucs_assert(hdr->status == UCS_OK); + + /* TODO check the iface's cb_flags to determine when to invoke this callback. + * currently only UCT_CB_FLAG_ASYNC is supported so the cb is invoked from here */ +- status = iface->conn_request_cb(iface->conn_request_arg, +- event->param.ud.private_data + +- /* private data */ +- sizeof(uct_rdmacm_priv_data_hdr_t), +- /* length */ +- hdr->length); +- if (status != UCS_OK) { +- rdma_reject(event->id, NULL, 0); +- return; +- } +- +- /* The server will not send any reply data back to the client */ +- memset(&conn_param, 0, sizeof(conn_param)); +- /* Accepting the connection will generate the RDMA_CM_EVENT_ESTABLISHED +- * event on the client side. */ +- if (rdma_accept(event->id, &conn_param)) { +- ucs_error("rdma_accept(to addr=%s) failed: %m.", +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); +- rdma_reject(event->id, NULL, 0); +- return; +- } +- +- /* Destroy the new rdma_cm_id which was created when receiving the +- * RDMA_CM_EVENT_CONNECT_REQUEST event. (this is not the listening rdma_cm_id)*/ +- rdma_destroy_id(event->id); ++ iface->conn_request_cb(&iface->super.super, iface->conn_request_arg, ++ /* connection request*/ ++ event, ++ /* private data */ ++ UCS_PTR_BYTE_OFFSET(event->param.ud.private_data, ++ sizeof(uct_rdmacm_priv_data_hdr_t)), ++ /* length */ ++ hdr->length); + } + + /** +@@ -173,7 +238,7 @@ static void uct_rdmacm_iface_process_conn_req(uct_rdmacm_iface_t *iface, + static void uct_rdmacm_iface_release_cm_id(uct_rdmacm_iface_t *iface, + uct_rdmacm_ctx_t *cm_id_ctx) + { +- ucs_debug("destroying cm_id %p", cm_id_ctx->cm_id); ++ ucs_trace("destroying cm_id %p", cm_id_ctx->cm_id); + + ucs_list_del(&cm_id_ctx->list); + if (cm_id_ctx->ep != NULL) { +@@ -184,17 +249,28 @@ static void uct_rdmacm_iface_release_cm_id(uct_rdmacm_iface_t *iface, + iface->cm_id_quota++; + } + +-static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma_cm_event *event) ++static void uct_rdmacm_iface_cm_id_to_dev_name(struct rdma_cm_id *cm_id, ++ char *dev_name) ++{ ++ ucs_snprintf_zero(dev_name, UCT_DEVICE_NAME_MAX, "%s:%d", ++ ibv_get_device_name(cm_id->verbs->device), cm_id->port_num); ++} ++ ++static unsigned ++uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, ++ struct rdma_cm_event *event) + { + struct sockaddr *remote_addr = rdma_get_peer_addr(event->id); + uct_rdmacm_md_t *rdmacm_md = (uct_rdmacm_md_t *)iface->super.md; ++ unsigned ret_flags = UCT_RDMACM_PROCESS_EVENT_ACK_EVENT_FLAG; ++ uct_rdmacm_ep_t *ep = NULL; + char ip_port_str[UCS_SOCKADDR_STRING_LEN]; +- uct_rdmacm_priv_data_hdr_t *hdr; ++ char dev_name[UCT_DEVICE_NAME_MAX]; ++ uct_rdmacm_priv_data_hdr_t hdr; + struct rdma_conn_param conn_param; + uct_rdmacm_ctx_t *cm_id_ctx; +- uct_rdmacm_ep_t *ep = NULL; +- int destroy_cm_id = 0; +- ++ ssize_t priv_data_ret; ++ ucs_status_t status; + + if (iface->is_server) { + ucs_assert((iface->cm_id == event->id) || +@@ -205,23 +281,26 @@ static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma + ep = cm_id_ctx->ep; + } + +- ucs_debug("rdmacm event (fd=%d cm_id %p) on %s (ep=%p): %s. Peer: %s.", ++ ucs_trace("rdmacm event (fd=%d cm_id %p) on %s (ep=%p): %s. Peer: %s.", + iface->event_ch->fd, event->id, (iface->is_server ? "server" : "client"), + ep, rdma_event_str(event->event), + ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); + ++ status = UCS_ERR_UNREACHABLE; + /* The following applies for rdma_cm_id of type RDMA_PS_UDP only */ + switch (event->event) { + case RDMA_CM_EVENT_ADDR_RESOLVED: + /* Client - resolve the route to the server */ + if (ep == NULL) { + /* received an event on an non-existing ep - an already destroyed ep */ +- destroy_cm_id = 1; +- } else if (rdma_resolve_route(event->id, UCS_MSEC_PER_SEC * rdmacm_md->addr_resolve_timeout)) { ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ } else if (rdma_resolve_route(event->id, UCS_MSEC_PER_SEC * ++ rdmacm_md->addr_resolve_timeout)) { + ucs_error("rdma_resolve_route(to addr=%s) failed: %m", +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); +- destroy_cm_id = 1; +- uct_rdmacm_client_handle_failure(iface, ep); ++ ucs_sockaddr_str(remote_addr, ip_port_str, ++ UCS_SOCKADDR_STRING_LEN)); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, UCS_ERR_INVALID_ADDR); + } + break; + +@@ -229,20 +308,44 @@ static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma + /* Client - send a connection request to the server */ + if (ep == NULL) { + /* received an event on an non-existing ep - an already destroyed ep */ +- destroy_cm_id = 1; ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; + } else { +- hdr = (uct_rdmacm_priv_data_hdr_t*)ep->priv_data; +- + memset(&conn_param, 0, sizeof(conn_param)); +- conn_param.private_data = ep->priv_data; ++ conn_param.private_data = ucs_alloca(UCT_RDMACM_MAX_CONN_PRIV + ++ sizeof(uct_rdmacm_priv_data_hdr_t)); ++ ++ uct_rdmacm_iface_cm_id_to_dev_name(ep->cm_id_ctx->cm_id, dev_name); ++ /* TODO check the ep's cb_flags to determine when to invoke this callback. ++ * currently only UCT_CB_FLAG_ASYNC is supported so the cb is invoked from here */ ++ priv_data_ret = ep->pack_cb(ep->pack_cb_arg, dev_name, ++ (void*)(conn_param.private_data + ++ sizeof(uct_rdmacm_priv_data_hdr_t))); ++ if (priv_data_ret < 0) { ++ ucs_trace("rdmacm client (iface=%p cm_id=%p fd=%d) failed to fill " ++ "private data. status: %s", ++ iface, event->id, iface->event_ch->fd, ++ ucs_status_string(priv_data_ret)); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, priv_data_ret); ++ break; ++ } ++ ++ hdr.length = (uint8_t)priv_data_ret; ++ hdr.status = UCS_OK; ++ UCS_STATIC_ASSERT(sizeof(hdr) == sizeof(uct_rdmacm_priv_data_hdr_t)); ++ /* The private_data starts with the header of the user's private data ++ * and then the private data itself */ ++ memcpy((void*)conn_param.private_data, &hdr, sizeof(uct_rdmacm_priv_data_hdr_t)); + conn_param.private_data_len = sizeof(uct_rdmacm_priv_data_hdr_t) + +- hdr->length; ++ hdr.length; + + if (rdma_connect(event->id, &conn_param)) { + ucs_error("rdma_connect(to addr=%s) failed: %m", +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); +- destroy_cm_id = 1; +- uct_rdmacm_client_handle_failure(iface, ep); ++ ucs_sockaddr_str(remote_addr, ip_port_str, ++ UCS_SOCKADDR_STRING_LEN)); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, ++ UCS_ERR_SOME_CONNECTS_FAILED); + } + } + break; +@@ -251,39 +354,58 @@ static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma + /* Server - handle a connection request from the client */ + ucs_assert(iface->is_server); + uct_rdmacm_iface_process_conn_req(iface, event, remote_addr); ++ ret_flags &= ~UCT_RDMACM_PROCESS_EVENT_ACK_EVENT_FLAG; + break; + + case RDMA_CM_EVENT_REJECTED: + /* Client - server rejected the connection request */ +- ucs_warn("rdmacm connection request to %s rejected", +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); ++ ucs_warn("rdmacm connection request to %s rejected, id %p", ++ ucs_sockaddr_str(remote_addr, ip_port_str, ++ UCS_SOCKADDR_STRING_LEN), event->id); + +- destroy_cm_id = 1; +- uct_rdmacm_client_handle_failure(iface, ep); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, UCS_ERR_REJECTED); + break; + + case RDMA_CM_EVENT_ESTABLISHED: + /* Client - connection is ready */ +- destroy_cm_id = 1; ++ ucs_assert(!iface->is_server); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ if (ep != NULL) { ++ pthread_mutex_lock(&ep->ops_mutex); ++ ep->status = UCS_OK; ++ uct_rdmacm_ep_invoke_completions(ep, UCS_OK); ++ pthread_mutex_unlock(&ep->ops_mutex); ++ } + break; + + /* client error events */ ++ case RDMA_CM_EVENT_UNREACHABLE: ++ hdr = *(uct_rdmacm_priv_data_hdr_t *)event->param.conn.private_data; ++ if ((event->param.conn.private_data_len > 0) && ++ (hdr.status == UCS_ERR_REJECTED)) { ++ ucs_assert(hdr.length == 0); ++ ucs_assert(event->param.conn.private_data_len >= sizeof(hdr)); ++ ucs_assert(!iface->is_server); ++ status = UCS_ERR_REJECTED; ++ } ++ /* Fall through */ + case RDMA_CM_EVENT_ADDR_ERROR: + case RDMA_CM_EVENT_ROUTE_ERROR: + case RDMA_CM_EVENT_CONNECT_RESPONSE: +- case RDMA_CM_EVENT_UNREACHABLE: +- + /* client and server error events */ + case RDMA_CM_EVENT_CONNECT_ERROR: + case RDMA_CM_EVENT_DISCONNECTED: + /* Server/Client - connection was disconnected */ +- ucs_error("received event %s. status = %d. Peer: %s.", +- rdma_event_str(event->event), event->status, +- ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); ++ if (status != UCS_ERR_REJECTED) { ++ ucs_error("received event %s. status = %d. Peer: %s.", ++ rdma_event_str(event->event), event->status, ++ ucs_sockaddr_str(remote_addr, ip_port_str, UCS_SOCKADDR_STRING_LEN)); ++ } + + if (!iface->is_server) { +- destroy_cm_id = 1; +- uct_rdmacm_client_handle_failure(iface, ep); ++ ret_flags |= UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG; ++ uct_rdmacm_client_handle_failure(iface, ep, status); + } + break; + +@@ -292,15 +414,16 @@ static int uct_rdmacm_iface_process_event(uct_rdmacm_iface_t *iface, struct rdma + break; + } + +- return destroy_cm_id; ++ return ret_flags; + } + + static void uct_rdmacm_iface_event_handler(int fd, void *arg) + { +- uct_rdmacm_iface_t *iface = arg; +- struct rdma_cm_event *event; +- int ret, destroy_cm_id; +- uct_rdmacm_ctx_t *cm_id_ctx = NULL; ++ uct_rdmacm_iface_t *iface = arg; ++ uct_rdmacm_ctx_t *cm_id_ctx = NULL; ++ struct rdma_cm_event *event; ++ unsigned proc_event_flags; ++ int ret; + + for (;;) { + /* Fetch an event */ +@@ -314,17 +437,20 @@ static void uct_rdmacm_iface_event_handler(int fd, void *arg) + return; + } + +- destroy_cm_id = uct_rdmacm_iface_process_event(iface, event); ++ proc_event_flags = uct_rdmacm_iface_process_event(iface, event); + if (!iface->is_server) { + cm_id_ctx = (uct_rdmacm_ctx_t *)event->id->context; + } + +- ret = rdma_ack_cm_event(event); +- if (ret) { +- ucs_warn("rdma_ack_cm_event() failed: %m"); ++ if (proc_event_flags & UCT_RDMACM_PROCESS_EVENT_ACK_EVENT_FLAG) { ++ ret = rdma_ack_cm_event(event); ++ if (ret) { ++ ucs_warn("rdma_ack_cm_event() failed: %m"); ++ } + } + +- if (destroy_cm_id && (cm_id_ctx != NULL)) { ++ if ((proc_event_flags & UCT_RDMACM_PROCESS_EVENT_DESTROY_CM_ID_FLAG) && ++ (cm_id_ctx != NULL)) { + uct_rdmacm_iface_release_cm_id(iface, cm_id_ctx); + uct_rdmacm_iface_client_start_next_ep(iface); + } +@@ -407,8 +533,8 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_iface_t, uct_md_h md, uct_worker_h worker, + ip_port_str, UCS_SOCKADDR_STRING_LEN), + ntohs(rdma_get_src_port(self->cm_id))); + +- if (params->mode.sockaddr.cb_flags != UCT_CB_FLAG_ASYNC) { +- ucs_fatal("UCT_CB_FLAG_SYNC is not supported"); ++ if (!(params->mode.sockaddr.cb_flags & UCT_CB_FLAG_ASYNC)) { ++ ucs_fatal("Synchronous callback is not supported"); + } + + self->cb_flags = params->mode.sockaddr.cb_flags; +@@ -416,7 +542,8 @@ static UCS_CLASS_INIT_FUNC(uct_rdmacm_iface_t, uct_md_h md, uct_worker_h worker, + self->conn_request_arg = params->mode.sockaddr.conn_request_arg; + self->is_server = 1; + } else { +- self->is_server = 0; ++ self->cm_id = NULL; ++ self->is_server = 0; + } + + self->cm_id_quota = config->cm_id_quota; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_md.c +index b28bea1b4..98d6a118f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/rdmacm/rdmacm_md.c +@@ -106,6 +106,25 @@ static int uct_rdmacm_is_addr_route_resolved(struct rdma_cm_id *cm_id, + return 1; + } + ++static int uct_rdmacm_is_sockaddr_inaddr_any(struct sockaddr *addr) ++{ ++ struct sockaddr_in6 *addr_in6; ++ struct sockaddr_in *addr_in; ++ ++ switch (addr->sa_family) { ++ case AF_INET: ++ addr_in = (struct sockaddr_in *)addr; ++ return addr_in->sin_addr.s_addr == INADDR_ANY; ++ case AF_INET6: ++ addr_in6 = (struct sockaddr_in6 *)addr; ++ return !memcmp(&addr_in6->sin6_addr, &in6addr_any, sizeof(addr_in6->sin6_addr)); ++ default: ++ ucs_debug("Invalid address family: %d", addr->sa_family); ++ } ++ ++ return 0; ++} ++ + int uct_rdmacm_is_sockaddr_accessible(uct_md_h md, const ucs_sock_addr_t *sockaddr, + uct_sockaddr_accessibility_t mode) + { +@@ -139,6 +158,11 @@ int uct_rdmacm_is_sockaddr_accessible(uct_md_h md, const ucs_sock_addr_t *sockad + ip_port_str, UCS_SOCKADDR_STRING_LEN)); + goto out_destroy_id; + } ++ ++ if (uct_rdmacm_is_sockaddr_inaddr_any((struct sockaddr *)sockaddr->addr)) { ++ is_accessible = 1; ++ goto out_print; ++ } + } + + /* Client and server sides check if can access the given sockaddr. +@@ -150,6 +174,7 @@ int uct_rdmacm_is_sockaddr_accessible(uct_md_h md, const ucs_sock_addr_t *sockad + goto out_destroy_id; + } + ++out_print: + ucs_debug("address %s (port %d) is accessible from rdmacm_md %p with mode: %d", + ucs_sockaddr_str((struct sockaddr *)sockaddr->addr, ip_port_str, + UCS_SOCKADDR_STRING_LEN), +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.c +index 1d11f3928..185470434 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.c +@@ -19,6 +19,7 @@ + + #include + #include ++#include + + #include + #include +@@ -33,6 +34,10 @@ static ucs_config_field_t uct_ud_mlx5_iface_config_table[] = { + + {"", "", NULL, + ucs_offsetof(uct_ud_mlx5_iface_config_t, mlx5_common), ++ UCS_CONFIG_TYPE_TABLE(uct_ib_mlx5_iface_config_table)}, ++ ++ {"", "", NULL, ++ ucs_offsetof(uct_ud_mlx5_iface_config_t, ud_mlx5_common), + UCS_CONFIG_TYPE_TABLE(uct_ud_mlx5_iface_common_config_table)}, + + {NULL} +@@ -46,7 +51,8 @@ uct_ud_mlx5_ep_ctrl_av_size(uct_ud_mlx5_ep_t *ep) + + static UCS_F_ALWAYS_INLINE void + uct_ud_mlx5_post_send(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, +- uint8_t se, struct mlx5_wqe_ctrl_seg *ctrl, size_t wqe_size) ++ uint8_t se, struct mlx5_wqe_ctrl_seg *ctrl, size_t wqe_size, ++ int max_log_sge) + { + struct mlx5_wqe_datagram_seg *dgram = (void*)(ctrl + 1); + +@@ -58,7 +64,7 @@ uct_ud_mlx5_post_send(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + + uct_ib_mlx5_log_tx(&iface->super.super, IBV_QPT_UD, ctrl, + iface->tx.wq.qstart, iface->tx.wq.qend, +- uct_ud_dump_packet); ++ max_log_sge, NULL, uct_ud_dump_packet); + iface->super.tx.available -= uct_ib_mlx5_post_send(&iface->tx.wq, ctrl, + wqe_size); + ucs_assert((int16_t)iface->tx.wq.bb_max >= iface->super.tx.available); +@@ -66,7 +72,7 @@ uct_ud_mlx5_post_send(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + + static UCS_F_ALWAYS_INLINE void + uct_ud_mlx5_ep_tx_skb(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, +- uct_ud_send_skb_t *skb, uint8_t se) ++ uct_ud_send_skb_t *skb, uint8_t se, int max_log_sge) + { + size_t ctrl_av_size = uct_ud_mlx5_ep_ctrl_av_size(ep); + struct mlx5_wqe_ctrl_seg *ctrl; +@@ -76,7 +82,7 @@ uct_ud_mlx5_ep_tx_skb(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + dptr = uct_ib_mlx5_txwq_wrap_exact(&iface->tx.wq, (void*)ctrl + ctrl_av_size); + uct_ib_mlx5_set_data_seg(dptr, skb->neth, skb->len, skb->lkey); + UCT_UD_EP_HOOK_CALL_TX(&ep->super, skb->neth); +- uct_ud_mlx5_post_send(iface, ep, se, ctrl, ctrl_av_size + sizeof(*dptr)); ++ uct_ud_mlx5_post_send(iface, ep, se, ctrl, ctrl_av_size + sizeof(*dptr), max_log_sge); + } + + static inline void +@@ -93,7 +99,7 @@ uct_ud_mlx5_ep_tx_inl(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + uct_ib_mlx5_inline_copy(inl + 1, buf, length, &iface->tx.wq); + UCT_UD_EP_HOOK_CALL_TX(&ep->super, (uct_ud_neth_t *)buf); + uct_ud_mlx5_post_send(iface, ep, se, ctrl, +- ctrl_av_size + sizeof(*inl) + length); ++ ctrl_av_size + sizeof(*inl) + length, INT_MAX); + } + + +@@ -107,7 +113,7 @@ static void uct_ud_mlx5_ep_tx_ctl_skb(uct_ud_ep_t *ud_ep, uct_ud_send_skb_t *skb + + se = solicited ? MLX5_WQE_CTRL_SOLICITED : 0; + if (skb->len >= iface->super.config.max_inline) { +- uct_ud_mlx5_ep_tx_skb(iface, ep, skb, se); ++ uct_ud_mlx5_ep_tx_skb(iface, ep, skb, se, INT_MAX); + } else { + uct_ud_mlx5_ep_tx_inl(iface, ep, skb->neth, skb->len, se); + } +@@ -185,7 +191,7 @@ uct_ud_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + 0, iface->super.config.max_inline, "am_short"); + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + skb = uct_ud_ep_get_tx_skb(&iface->super, &ep->super); + if (!skb) { + uct_ud_leave(&iface->super); +@@ -208,10 +214,9 @@ uct_ud_mlx5_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + uct_ib_mlx5_inline_copy(am + 1, buffer, length, &iface->tx.wq); + + wqe_size += ctrl_av_size + sizeof(*inl); +- UCT_CHECK_LENGTH(wqe_size, 0, UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB, +- "am_short"); ++ UCT_CHECK_LENGTH(wqe_size, 0, UCT_IB_MLX5_MAX_SEND_WQE_SIZE, "am_short"); + UCT_UD_EP_HOOK_CALL_TX(&ep->super, neth); +- uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size); ++ uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size, INT_MAX); + + skb->len = sizeof(*neth) + sizeof(*am); + memcpy(skb->neth, neth, skb->len); +@@ -234,7 +239,7 @@ static ssize_t uct_ud_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + size_t length; + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + status = uct_ud_am_common(&iface->super, &ep->super, id, &skb); + if (status != UCS_OK) { + uct_ud_leave(&iface->super); +@@ -244,7 +249,7 @@ static ssize_t uct_ud_mlx5_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + length = uct_ud_skb_bcopy(skb, pack_cb, arg); + UCT_UD_CHECK_BCOPY_LENGTH(&iface->super, length); + +- uct_ud_mlx5_ep_tx_skb(iface, ep, skb, 0); ++ uct_ud_mlx5_ep_tx_skb(iface, ep, skb, 0, INT_MAX); + uct_ud_iface_complete_tx_skb(&iface->super, &ep->super, skb); + UCT_TL_EP_STAT_OP(&ep->super.super, AM, BCOPY, length); + uct_ud_leave(&iface->super); +@@ -275,7 +280,6 @@ uct_ud_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *header, + uct_iov_total_length(iov, iovcnt)); + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); + + skb = uct_ud_ep_get_tx_skb(&iface->super, &ep->super); + if (!skb) { +@@ -299,10 +303,11 @@ uct_ud_mlx5_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *header, + UCT_IB_MLX5_WQE_SEG_SIZE); + wqe_size += uct_ib_mlx5_set_data_seg_iov(&iface->tx.wq, (void *)ctrl + wqe_size, + iov, iovcnt); +- ucs_assert(wqe_size <= (UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB)); ++ ucs_assert(wqe_size <= UCT_IB_MLX5_MAX_SEND_WQE_SIZE); + + UCT_UD_EP_HOOK_CALL_TX(&ep->super, neth); +- uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size); ++ uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size, ++ UCT_IB_MAX_ZCOPY_LOG_SGE(&iface->super.super)); + + skb->len = sizeof(*neth) + header_length; + memcpy(skb->neth, neth, sizeof(*neth)); +@@ -332,7 +337,7 @@ uct_ud_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, unsigned length, + size_t wqe_size; + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + skb = uct_ud_ep_get_tx_skb(&iface->super, &ep->super); + if (!skb) { + uct_ud_leave(&iface->super); +@@ -358,10 +363,9 @@ uct_ud_mlx5_ep_put_short(uct_ep_h tl_ep, const void *buffer, unsigned length, + uct_ib_mlx5_inline_copy(put_hdr + 1, buffer, length, &iface->tx.wq); + + wqe_size += ctrl_av_size + sizeof(*inl); +- UCT_CHECK_LENGTH(wqe_size, 0, UCT_IB_MLX5_MAX_BB * MLX5_SEND_WQE_BB, +- "put_short"); ++ UCT_CHECK_LENGTH(wqe_size, 0, UCT_IB_MLX5_MAX_SEND_WQE_SIZE, "put_short"); + UCT_UD_EP_HOOK_CALL_TX(&ep->super, neth); +- uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size); ++ uct_ud_mlx5_post_send(iface, ep, 0, ctrl, wqe_size, INT_MAX); + + skb->len = sizeof(*neth) + sizeof(*put_hdr); + memcpy(skb->neth, neth, skb->len); +@@ -387,7 +391,7 @@ uct_ud_mlx5_iface_poll_rx(uct_ud_mlx5_iface_t *iface, int is_async) + ucs_prefetch(packet + UCT_IB_GRH_LEN); + desc = (uct_ib_iface_recv_desc_t *)(packet - iface->super.super.config.rx_hdr_offset); + +- cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->rx.cq); ++ cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->cq[UCT_IB_DIR_RX]); + if (cqe == NULL) { + count = 0; + goto out; +@@ -428,18 +432,22 @@ out: + return count; + } + +-static UCS_F_ALWAYS_INLINE void ++static UCS_F_ALWAYS_INLINE unsigned + uct_ud_mlx5_iface_poll_tx(uct_ud_mlx5_iface_t *iface) + { + struct mlx5_cqe64 *cqe; + +- cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->tx.cq); ++ cqe = uct_ib_mlx5_poll_cq(&iface->super.super, &iface->cq[UCT_IB_DIR_TX]); + if (cqe == NULL) { +- return; ++ return 0; + } ++ + ucs_memory_cpu_load_fence(); ++ + uct_ib_mlx5_log_cqe(cqe); +- iface->super.tx.available = uct_ib_mlx5_txwq_update_bb(&iface->tx.wq, ntohs(cqe->wqe_counter)); ++ iface->super.tx.available = uct_ib_mlx5_txwq_update_bb(&iface->tx.wq, ++ ntohs(cqe->wqe_counter)); ++ return 1; + } + + static unsigned uct_ud_mlx5_iface_progress(uct_iface_h tl_iface) +@@ -450,6 +458,7 @@ static unsigned uct_ud_mlx5_iface_progress(uct_iface_h tl_iface) + + uct_ud_enter(&iface->super); + uct_ud_iface_dispatch_zcopy_comps(&iface->super); ++ + status = uct_ud_iface_dispatch_pending_rx(&iface->super); + if (ucs_likely(status == UCS_OK)) { + do { +@@ -457,22 +466,29 @@ static unsigned uct_ud_mlx5_iface_progress(uct_iface_h tl_iface) + count += n; + } while ((n > 0) && (count < iface->super.super.config.rx_max_poll)); + } +- uct_ud_mlx5_iface_poll_tx(iface); ++ ++ count += uct_ud_mlx5_iface_poll_tx(iface); + uct_ud_iface_progress_pending(&iface->super, 0); + uct_ud_leave(&iface->super); + return count; + } + +-static void uct_ud_mlx5_iface_async_progress(uct_ud_iface_t *ud_iface) ++static unsigned uct_ud_mlx5_iface_async_progress(uct_ud_iface_t *ud_iface) + { + uct_ud_mlx5_iface_t *iface = ucs_derived_of(ud_iface, uct_ud_mlx5_iface_t); +- unsigned count; ++ unsigned n, count; + ++ count = 0; + do { +- count = uct_ud_mlx5_iface_poll_rx(iface, 1); +- } while (count > 0); +- uct_ud_mlx5_iface_poll_tx(iface); ++ n = uct_ud_mlx5_iface_poll_rx(iface, 1); ++ count += n; ++ } while (n > 0); ++ ++ count += uct_ud_mlx5_iface_poll_tx(iface); ++ + uct_ud_iface_progress_pending(&iface->super, 1); ++ ++ return count; + } + + static ucs_status_t +@@ -502,17 +518,21 @@ uct_ud_mlx5_ep_create_ah(uct_ud_mlx5_iface_t *iface, uct_ud_mlx5_ep_t *ep, + const uct_ud_iface_addr_t *if_addr) + { + ucs_status_t status; ++ uint32_t remote_qpn; + int is_global; + +- status = uct_ud_mlx5_iface_get_av(&iface->super.super, &iface->mlx5_common, ++ status = uct_ud_mlx5_iface_get_av(&iface->super.super, &iface->ud_mlx5_common, + ib_addr, ep->super.path_bits, &ep->av, + &ep->grh_av, &is_global); + if (status != UCS_OK) { + return status; + } + ++ remote_qpn = uct_ib_unpack_uint24(if_addr->qp_num); + ep->is_global = is_global; +- ep->av.dqp_dct |= htonl(uct_ib_unpack_uint24(if_addr->qp_num)); ++ ep->av.dqp_dct |= htonl(remote_qpn); ++ uct_ib_mlx5_iface_set_av_sport(&iface->super.super, &ep->av, ++ remote_qpn ^ iface->super.qp->qp_num); + return UCS_OK; + } + +@@ -591,19 +611,18 @@ uct_ud_mlx5_ep_connect_to_ep(uct_ep_h tl_ep, + return UCS_OK; + } + +-static ucs_status_t uct_ud_mlx5_iface_arm_tx_cq(uct_ib_iface_t *ib_iface) +-{ +- uct_ud_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_ud_mlx5_iface_t); +- uct_ib_mlx5_update_cq_ci(iface->super.super.send_cq, iface->tx.cq.cq_ci); +- return uct_ib_iface_arm_tx_cq(ib_iface); +-} +- +-static ucs_status_t uct_ud_mlx5_iface_arm_rx_cq(uct_ib_iface_t *ib_iface, +- int solicited) ++static ucs_status_t uct_ud_mlx5_iface_arm_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir, ++ int solicited) + { + uct_ud_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_ud_mlx5_iface_t); +- uct_ib_mlx5_update_cq_ci(iface->super.super.recv_cq, iface->rx.cq.cq_ci); +- return uct_ib_iface_arm_rx_cq(ib_iface, solicited); ++#if HAVE_DECL_MLX5DV_INIT_OBJ ++ return uct_ib_mlx5dv_arm_cq(&iface->cq[dir], solicited); ++#else ++ uct_ib_mlx5_update_cq_ci(iface->super.super.cq[dir], ++ iface->cq[dir].cq_ci); ++ return uct_ib_iface_arm_cq(ib_iface, dir, solicited); ++#endif + } + + static ucs_status_t uct_ud_mlx5_ep_set_failed(uct_ib_iface_t *iface, +@@ -613,8 +632,27 @@ static ucs_status_t uct_ud_mlx5_ep_set_failed(uct_ib_iface_t *iface, + &iface->super.super, status); + } + ++static void uct_ud_mlx5_iface_event_cq(uct_ib_iface_t *ib_iface, ++ uct_ib_dir_t dir) ++{ ++ uct_ud_mlx5_iface_t *iface = ucs_derived_of(ib_iface, uct_ud_mlx5_iface_t); ++ ++ iface->cq[dir].cq_sn++; ++} ++ + static void UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_iface_t)(uct_iface_t*); + ++static void uct_ud_mlx5_iface_handle_failure(uct_ib_iface_t *iface, void *arg, ++ ucs_status_t status) ++{ ++ if (status == UCS_ERR_ENDPOINT_TIMEOUT) { ++ uct_ud_iface_handle_failure(iface, arg, status); ++ } else { ++ /* Local side failure - treat as fatal */ ++ uct_ib_mlx5_completion_with_err(iface, arg, UCS_LOG_LEVEL_FATAL); ++ } ++} ++ + static uct_ud_iface_ops_t uct_ud_mlx5_iface_ops = { + { + { +@@ -644,13 +682,15 @@ static uct_ud_iface_ops_t uct_ud_mlx5_iface_ops = { + .iface_get_address = uct_ud_iface_get_address, + .iface_is_reachable = uct_ib_iface_is_reachable + }, +- .arm_tx_cq = uct_ud_mlx5_iface_arm_tx_cq, +- .arm_rx_cq = uct_ud_mlx5_iface_arm_rx_cq, +- .handle_failure = uct_ud_iface_handle_failure, +- .set_ep_failed = uct_ud_mlx5_ep_set_failed ++ .arm_cq = uct_ud_mlx5_iface_arm_cq, ++ .event_cq = uct_ud_mlx5_iface_event_cq, ++ .handle_failure = uct_ud_mlx5_iface_handle_failure, ++ .set_ep_failed = uct_ud_mlx5_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .async_progress = uct_ud_mlx5_iface_async_progress, + .tx_skb = uct_ud_mlx5_ep_tx_ctl_skb, ++ .ep_free = UCS_CLASS_DELETE_FUNC_NAME(uct_ud_mlx5_ep_t) + }; + + static UCS_CLASS_INIT_FUNC(uct_ud_mlx5_iface_t, +@@ -660,28 +700,33 @@ static UCS_CLASS_INIT_FUNC(uct_ud_mlx5_iface_t, + { + uct_ud_mlx5_iface_config_t *config = ucs_derived_of(tl_config, + uct_ud_mlx5_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + int i; + + ucs_trace_func(""); + ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ init_attr.flags = UCT_IB_CQ_IGNORE_OVERRUN; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_ud_iface_t, &uct_ud_mlx5_iface_ops, +- md, worker, params, 0, &config->super); ++ md, worker, params, &config->super, &init_attr); + + uct_ib_iface_set_max_iov(&self->super.super, UCT_IB_MLX5_AM_ZCOPY_MAX_IOV); + self->super.config.max_inline = UCT_IB_MLX5_AM_MAX_SHORT(UCT_IB_MLX5_AV_FULL_SIZE); + +- status = uct_ib_mlx5_get_cq(self->super.super.send_cq, &self->tx.cq); ++ status = uct_ib_mlx5_get_cq(self->super.super.cq[UCT_IB_DIR_TX], &self->cq[UCT_IB_DIR_TX]); + if (status != UCS_OK) { + return status; + } + +- status = uct_ib_mlx5_get_cq(self->super.super.recv_cq, &self->rx.cq); ++ status = uct_ib_mlx5_get_cq(self->super.super.cq[UCT_IB_DIR_RX], &self->cq[UCT_IB_DIR_RX]); + if (status != UCS_OK) { + return status; + } + +- status = uct_ib_mlx5_txwq_init(self->super.super.super.worker, &self->tx.wq, ++ status = uct_ib_mlx5_txwq_init(self->super.super.super.worker, ++ config->mlx5_common.mmio_mode, &self->tx.wq, + self->super.qp); + if (status != UCS_OK) { + return status; +@@ -694,7 +739,8 @@ static UCS_CLASS_INIT_FUNC(uct_ud_mlx5_iface_t, + } + + status = uct_ud_mlx5_iface_common_init(&self->super.super, +- &self->mlx5_common, &config->mlx5_common); ++ &self->ud_mlx5_common, ++ &config->ud_mlx5_common); + if (status != UCS_OK) { + return status; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.h +index e7c193783..3cd43f1e5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5.h +@@ -22,7 +22,8 @@ typedef struct { + + typedef struct { + uct_ud_iface_config_t super; +- uct_ud_mlx5_iface_common_config_t mlx5_common; ++ uct_ib_mlx5_iface_config_t mlx5_common; ++ uct_ud_mlx5_iface_common_config_t ud_mlx5_common; + } uct_ud_mlx5_iface_config_t; + + +@@ -30,13 +31,12 @@ typedef struct { + uct_ud_iface_t super; + struct { + uct_ib_mlx5_txwq_t wq; +- uct_ib_mlx5_cq_t cq; + } tx; + struct { + uct_ib_mlx5_rxwq_t wq; +- uct_ib_mlx5_cq_t cq; + } rx; +- uct_ud_mlx5_iface_common_t mlx5_common; ++ uct_ib_mlx5_cq_t cq[UCT_IB_DIR_NUM]; ++ uct_ud_mlx5_iface_common_t ud_mlx5_common; + } uct_ud_mlx5_iface_t; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5_common.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5_common.c +index 466a1e513..23b56dc6f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5_common.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/accel/ud_mlx5_common.c +@@ -49,14 +49,15 @@ ucs_status_t uct_ud_mlx5_iface_get_av(uct_ib_iface_t *iface, + *is_global = ah_attr.is_global; + + uct_ib_mlx5_get_av(ah, &mlx5_av); +- ibv_destroy_ah(ah); + + base_av->stat_rate_sl = mlx5_av_base(&mlx5_av)->stat_rate_sl; + base_av->fl_mlid = mlx5_av_base(&mlx5_av)->fl_mlid; + base_av->rlid = mlx5_av_base(&mlx5_av)->rlid; ++ base_av->dqp_dct = 0; + +- base_av->dqp_dct = (ud_common_iface->config.compact_av) ? 0 : +- UCT_IB_MLX5_EXTENDED_UD_AV; ++ if (!ud_common_iface->config.compact_av || ah_attr.is_global) { ++ base_av->dqp_dct |= UCT_IB_MLX5_EXTENDED_UD_AV; ++ } + + ucs_assertv_always((UCT_IB_MLX5_AV_FULL_SIZE > UCT_IB_MLX5_AV_BASE_SIZE) || + (base_av->dqp_dct & UCT_IB_MLX5_EXTENDED_UD_AV), +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.c +index cc5f13e60..40f92dc5d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.c +@@ -12,6 +12,15 @@ + #include + #include + #include ++#include ++ ++ ++/* Must be less then peer_timeout to avoid false positive errors taking into ++ * account timer resolution and not too small to avoid performance degradation ++ */ ++#define UCT_UD_SLOW_TIMER_MAX_TICK(_iface) ((_iface)->config.peer_timeout / 3) ++ ++static void uct_ud_ep_do_pending_ctl(uct_ud_ep_t *ep, uct_ud_iface_t *iface); + + static void uct_ud_peer_name(uct_ud_peer_name_t *peer) + { +@@ -99,29 +108,57 @@ static void uct_ud_ep_reset(uct_ud_ep_t *ep) + ep->resend.pos = ucs_queue_iter_begin(&ep->tx.window); + ep->resend.psn = ep->tx.psn; + ep->resend.max_psn = ep->tx.acked_psn; ++ ep->rx_creq_count = 0; + + ep->rx.acked_psn = UCT_UD_INITIAL_PSN - 1; + ucs_frag_list_init(ep->tx.psn-1, &ep->rx.ooo_pkts, 0 /*TODO: ooo support */ + UCS_STATS_ARG(ep->super.stats)); + } + ++static ucs_status_t uct_ud_ep_free_by_timeout(uct_ud_ep_t *ep, ++ uct_ud_iface_t *iface) ++{ ++ uct_ud_iface_ops_t *ops; ++ ucs_time_t diff; ++ ++ diff = ucs_twheel_get_time(&iface->async.slow_timer) - ep->close_time; ++ if (diff > iface->config.peer_timeout) { ++ ucs_debug("ud_ep %p is destroyed after %fs with timeout %fs\n", ++ ep, ucs_time_to_sec(diff), ++ ucs_time_to_sec(iface->config.peer_timeout)); ++ ops = ucs_derived_of(iface->super.ops, uct_ud_iface_ops_t); ++ ops->ep_free(&ep->super.super); ++ return UCS_OK; ++ } ++ return UCS_INPROGRESS; ++} ++ + static void uct_ud_ep_slow_timer(ucs_wtimer_t *self) + { +- uct_ud_ep_t *ep = ucs_container_of(self, uct_ud_ep_t, slow_timer); +- uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, +- uct_ud_iface_t); +- ucs_time_t now; +- ucs_time_t diff; ++ uct_ud_ep_t *ep = ucs_container_of(self, uct_ud_ep_t, slow_timer); ++ uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, ++ uct_ud_iface_t); ++ ucs_time_t now; ++ ucs_time_t diff; ++ ucs_status_t status; + + UCT_UD_EP_HOOK_CALL_TIMER(ep); +- now = ucs_twheel_get_time(&iface->async.slow_timer); +- diff = now - ep->tx.send_time; + + if (ucs_queue_is_empty(&ep->tx.window)) { ++ /* Do not free the EP until all scheduled communications are done. */ ++ if (ep->flags & UCT_UD_EP_FLAG_DISCONNECTED) { ++ status = uct_ud_ep_free_by_timeout(ep, iface); ++ if (status == UCS_INPROGRESS) { ++ goto again; ++ } ++ } + return; + } + ++ now = ucs_twheel_get_time(&iface->async.slow_timer); ++ diff = now - ep->tx.send_time; + if (diff > iface->config.peer_timeout) { ++ ucs_debug("ep %p: timeout of %.2f sec", ep, ucs_time_to_sec(diff)); + iface->super.ops->handle_failure(&iface->super, ep, + UCS_ERR_ENDPOINT_TIMEOUT); + return; +@@ -140,9 +177,11 @@ static void uct_ud_ep_slow_timer(ucs_wtimer_t *self) + uct_ud_ep_ctl_op_add(iface, ep, UCT_UD_EP_OP_ACK_REQ); + } + ++again: + /* Cool down the timer on rescheduling/resending */ + ep->tx.slow_tick *= iface->config.slow_timer_backoff; +- ep->tx.slow_tick = ucs_min(ep->tx.slow_tick, iface->config.peer_timeout/3); ++ ep->tx.slow_tick = ucs_min(ep->tx.slow_tick, ++ UCT_UD_SLOW_TIMER_MAX_TICK(iface)); + ucs_wtimer_add(&iface->async.slow_timer, &ep->slow_timer, ep->tx.slow_tick); + } + +@@ -176,7 +215,6 @@ uct_ud_ep_pending_cancel_cb(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + { + uct_ud_ep_t *ep = ucs_container_of(ucs_arbiter_elem_group(elem), + uct_ud_ep_t, tx.pending.group); +- uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_ud_iface_t); + uct_pending_req_t *req; + + /* we may have pending op on ep */ +@@ -188,7 +226,6 @@ uct_ud_ep_pending_cancel_cb(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + /* uct user should not have anything pending */ + req = ucs_container_of(elem, uct_pending_req_t, priv); + ucs_warn("ep=%p removing user pending req=%p", ep, req); +- iface->tx.pending_q_len--; + + /* return ignored by arbiter */ + return UCS_ARBITER_CB_RESULT_REMOVE_ELEM; +@@ -283,6 +320,7 @@ ucs_status_t uct_ud_ep_create_connected_common(uct_ud_iface_t *iface, + ep = uct_ud_iface_cep_lookup(iface, ib_addr, if_addr, UCT_UD_EP_CONN_ID_MAX); + if (ep) { + uct_ud_ep_set_state(ep, UCT_UD_EP_FLAG_CREQ_NOTSENT); ++ ep->flags &= ~UCT_UD_EP_FLAG_PRIVATE; + *new_ep_p = ep; + *skb_p = NULL; + return UCS_ERR_ALREADY_EXISTS; +@@ -475,7 +513,7 @@ static void uct_ud_ep_rx_creq(uct_ud_iface_t *iface, uct_ud_neth_t *neth) + /* simultanuous CREQ */ + ep->dest_ep_id = uct_ib_unpack_uint24(ctl->conn_req.ep_addr.ep_id); + ep->rx.ooo_pkts.head_sn = neth->psn; +- uct_ud_peer_copy(&ep->peer, (void*)&ctl->peer); ++ uct_ud_peer_copy(&ep->peer, ucs_unaligned_ptr(&ctl->peer)); + ucs_debug("simultanuous CREQ ep=%p" + "(iface=%p conn_id=%d ep_id=%d, dest_ep_id=%d rx_psn=%u)", + ep, iface, ep->conn_id, ep->ep_id, +@@ -490,10 +528,17 @@ static void uct_ud_ep_rx_creq(uct_ud_iface_t *iface, uct_ud_neth_t *neth) + } + } + ++ ++ep->rx_creq_count; ++ + ucs_assert_always(ctl->conn_req.conn_id == ep->conn_id); + ucs_assert_always(uct_ib_unpack_uint24(ctl->conn_req.ep_addr.ep_id) == ep->dest_ep_id); + /* creq must always have same psn */ +- ucs_assert_always(ep->rx.ooo_pkts.head_sn == neth->psn); ++ ucs_assertv_always(ep->rx.ooo_pkts.head_sn == neth->psn, ++ "iface=%p ep=%p conn_id=%d ep_id=%d, dest_ep_id=%d rx_psn=%u " ++ "neth_psn=%u ep_flags=0x%x ctl_ops=0x%x rx_creq_count=%d", ++ iface, ep, ep->conn_id, ep->ep_id, ep->dest_ep_id, ++ ep->rx.ooo_pkts.head_sn, neth->psn, ep->flags, ++ ep->tx.pending.ops, ep->rx_creq_count); + /* scedule connection reply op */ + UCT_UD_EP_HOOK_CALL_RX(ep, neth, sizeof(*neth) + sizeof(*ctl)); + if (uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_CREQ)) { +@@ -521,7 +566,7 @@ static void uct_ud_ep_rx_ctl(uct_ud_iface_t *iface, uct_ud_ep_t *ep, + ep->rx.ooo_pkts.head_sn = neth->psn; + ep->dest_ep_id = ctl->conn_rep.src_ep_id; + ucs_arbiter_group_schedule(&iface->tx.pending_q, &ep->tx.pending.group); +- uct_ud_peer_copy(&ep->peer, (void*)&ctl->peer); ++ uct_ud_peer_copy(&ep->peer, ucs_unaligned_ptr(&ctl->peer)); + uct_ud_ep_set_state(ep, UCT_UD_EP_FLAG_CREP_RCVD); + } + +@@ -536,6 +581,15 @@ uct_ud_send_skb_t *uct_ud_ep_prepare_creq(uct_ud_ep_t *ep) + ucs_assert_always(ep->dest_ep_id == UCT_UD_EP_NULL_ID); + ucs_assert_always(ep->ep_id != UCT_UD_EP_NULL_ID); + ++ /* CREQ should not be sent if CREP for the counter CREQ is scheduled ++ * (or sent already) */ ++ ucs_assertv_always(!uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_CREP) && ++ !(ep->flags & UCT_UD_EP_FLAG_CREP_SENT), ++ "iface=%p ep=%p conn_id=%d rx_psn=%u ep_flags=0x%x " ++ "ctl_ops=0x%x rx_creq_count=%d", ++ iface, ep, ep->conn_id, ep->rx.ooo_pkts.head_sn, ++ ep->flags, ep->tx.pending.ops, ep->rx_creq_count); ++ + skb = uct_ud_iface_get_tx_skb(iface, ep); + if (!skb) { + return NULL; +@@ -564,7 +618,7 @@ uct_ud_send_skb_t *uct_ud_ep_prepare_creq(uct_ud_ep_t *ep) + return NULL; + } + +- uct_ud_peer_name((void*)&creq->peer); ++ uct_ud_peer_name(ucs_unaligned_ptr(&creq->peer)); + + skb->len = sizeof(*neth) + sizeof(*creq) + iface->super.addr_size; + return skb; +@@ -639,10 +693,16 @@ void uct_ud_ep_process_rx(uct_ud_iface_t *iface, uct_ud_neth_t *neth, unsigned b + } + + if (ucs_unlikely(is_async && +- (iface->super.super.am[am_id].flags & UCT_CB_FLAG_SYNC))) { ++ !(iface->super.super.am[am_id].flags & UCT_CB_FLAG_ASYNC))) { + skb->u.am.len = byte_len - sizeof(*neth); + ucs_queue_push(&iface->rx.pending_q, &skb->u.am.queue); + } else { ++ /* Avoid reordering with respect to pending operations, if user AM handler ++ * initiates sends from any endpoint created on the iface. ++ * This flag would be cleared after all incoming messages ++ * are processed. */ ++ uct_ud_iface_raise_pending_async_ev(iface); ++ + uct_ib_iface_invoke_am_desc(&iface->super, am_id, neth + 1, + byte_len - sizeof(*neth), &skb->super); + } +@@ -709,11 +769,24 @@ ucs_status_t uct_ud_ep_flush_nolock(uct_ud_iface_t *iface, uct_ud_ep_t *ep, + skb = ucs_queue_tail_elem_non_empty(&ep->tx.window, uct_ud_send_skb_t, queue); + psn = skb->neth->psn; + if (!(skb->flags & UCT_UD_SEND_SKB_FLAG_ACK_REQ)) { +- /* If we didn't ask for ACK on last skb, schedule an ACK message. ++ /* If we didn't ask for ACK on last skb, send an ACK_REQ message. ++ * It will speed up the flush because we will not have to wait untill ++ * retransmit is triggered. + * Also, prevent from sending more control messages like this after + * first time by turning on the flag on the last skb. + */ +- uct_ud_ep_ctl_op_add_safe(iface, ep, UCT_UD_SEND_SKB_FLAG_ACK_REQ); ++ ++ /* Since the function can be called from the arbiter context it is ++ * impossible to schedule a control operation. So just raise a ++ * flag and if there is no other control send ACK_REQ directly. ++ * ++ * If there is other control arbiter will take care of it. ++ */ ++ ep->tx.pending.ops |= UCT_UD_EP_OP_ACK_REQ; ++ if (uct_ud_ep_ctl_op_check_ex(ep, UCT_UD_EP_OP_ACK_REQ)) { ++ uct_ud_ep_do_pending_ctl(ep, iface); ++ } ++ + skb->flags |= UCT_UD_SEND_SKB_FLAG_ACK_REQ; + } + +@@ -774,18 +847,23 @@ ucs_status_t uct_ud_ep_flush(uct_ep_h ep_h, unsigned flags, + uct_ep_pending_purge(ep_h, NULL, 0); + /* Open window after cancellation for next sending */ + uct_ud_ep_ca_ack(ep); ++ status = UCS_OK; ++ goto out; ++ } + +- uct_ud_leave(iface); +- return UCS_OK; ++ if (ucs_unlikely(uct_ud_iface_has_pending_async_ev(iface))) { ++ status = UCS_ERR_NO_RESOURCE; ++ goto out; + } + +- uct_ud_iface_progress_pending_tx(iface); + status = uct_ud_ep_flush_nolock(iface, ep, comp); + if (status == UCS_OK) { + UCT_TL_EP_STAT_FLUSH(&ep->super); + } else if (status == UCS_INPROGRESS) { + UCT_TL_EP_STAT_FLUSH_WAIT(&ep->super); + } ++ ++out: + uct_ud_leave(iface); + return status; + } +@@ -800,6 +878,15 @@ static uct_ud_send_skb_t *uct_ud_ep_prepare_crep(uct_ud_ep_t *ep) + ucs_assert_always(ep->dest_ep_id != UCT_UD_EP_NULL_ID); + ucs_assert_always(ep->ep_id != UCT_UD_EP_NULL_ID); + ++ /* Check that CREQ is neither sheduled nor waiting for CREP ack */ ++ ucs_assertv_always(!uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_CREQ) && ++ ucs_queue_is_empty(&ep->tx.window), ++ "iface=%p ep=%p conn_id=%d ep_id=%d, dest_ep_id=%d rx_psn=%u " ++ "ep_flags=0x%x ctl_ops=0x%x rx_creq_count=%d", ++ iface, ep, ep->conn_id, ep->ep_id, ep->dest_ep_id, ++ ep->rx.ooo_pkts.head_sn, ep->flags, ep->tx.pending.ops, ++ ep->rx_creq_count); ++ + skb = uct_ud_iface_get_tx_skb(iface, ep); + if (!skb) { + return NULL; +@@ -816,7 +903,7 @@ static uct_ud_send_skb_t *uct_ud_ep_prepare_crep(uct_ud_ep_t *ep) + crep->type = UCT_UD_PACKET_CREP; + crep->conn_rep.src_ep_id = ep->ep_id; + +- uct_ud_peer_name((void*)&crep->peer); ++ uct_ud_peer_name(ucs_unaligned_ptr(&crep->peer)); + + skb->len = sizeof(*neth) + sizeof(*crep); + uct_ud_ep_ctl_op_del(ep, UCT_UD_EP_OP_CREP); +@@ -916,7 +1003,7 @@ static void uct_ud_ep_do_pending_ctl(uct_ud_ep_t *ep, uct_ud_iface_t *iface) + skb = uct_ud_ep_resend(ep); + } else if (uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_ACK)) { + if (uct_ud_ep_is_connected(ep)) { +- skb = (void*)&iface->tx.skb_inl.super; ++ skb = ucs_unaligned_ptr(&iface->tx.skb_inl.super); + uct_ud_neth_ctl_ack(ep, skb->neth); + } else { + /* Do not send ACKs if not connected yet. It may happen if +@@ -926,7 +1013,7 @@ static void uct_ud_ep_do_pending_ctl(uct_ud_ep_t *ep, uct_ud_iface_t *iface) + } + uct_ud_ep_ctl_op_del(ep, UCT_UD_EP_OP_ACK); + } else if (uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_ACK_REQ)) { +- skb = (void*)&iface->tx.skb_inl.super; ++ skb = ucs_unaligned_ptr(&iface->tx.skb_inl.super); + uct_ud_neth_ctl_ack_req(ep, skb->neth); + uct_ud_ep_ctl_op_del(ep, UCT_UD_EP_OP_ACK_REQ); + } else if (uct_ud_ep_ctl_op_isany(ep)) { +@@ -1032,16 +1119,18 @@ uct_ud_ep_do_pending(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + + /* user pending can be send iff + * - not in async progress +- * - there are only low priority ctl pending or not ctl at all ++ * - there are no high priority pending control messages + */ +- if (!in_async_progress && +- (uct_ud_ep_ctl_op_check_ex(ep, UCT_UD_EP_OP_CTL_LOW_PRIO) || +- !uct_ud_ep_ctl_op_isany(ep))) { ++ if (!in_async_progress && !uct_ud_ep_ctl_op_check(ep, UCT_UD_EP_OP_CTL_HI_PRIO)) { + uct_pending_req_t *req; + ucs_status_t status; + + req = ucs_container_of(elem, uct_pending_req_t, priv); ++ ++ ucs_assert(!(ep->flags & UCT_UD_EP_FLAG_IN_PENDING)); ++ ep->flags |= UCT_UD_EP_FLAG_IN_PENDING; + status = req->func(req); ++ ep->flags &= ~UCT_UD_EP_FLAG_IN_PENDING; + + if (status == UCS_INPROGRESS) { + return UCS_ARBITER_CB_RESULT_NEXT_GROUP; +@@ -1053,15 +1142,25 @@ uct_ud_ep_do_pending(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + uct_ud_ep_do_pending_ctl(ep, iface); + return uct_ud_ep_ctl_op_next(ep); + } +- iface->tx.pending_q_len--; + return UCS_ARBITER_CB_RESULT_REMOVE_ELEM; + } ++ + /* try to send ctl messages */ + uct_ud_ep_do_pending_ctl(ep, iface); +- return uct_ud_ep_ctl_op_next(ep); ++ if (in_async_progress) { ++ return uct_ud_ep_ctl_op_next(ep); ++ } else { ++ /* we still didn't process the current pending request because of hi-prio ++ * control messages, so cannot stop sending yet. If we stop, not all ++ * resources will be exhausted and out-of-order with pending can occur. ++ * (pending control ops may be cleared by uct_ud_ep_do_pending_ctl) ++ */ ++ return UCS_ARBITER_CB_RESULT_NEXT_GROUP; ++ } + } + +-ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep_h, uct_pending_req_t *req) ++ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep_h, uct_pending_req_t *req, ++ unsigned flags) + { + uct_ud_ep_t *ep = ucs_derived_of(ep_h, uct_ud_ep_t); + uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, +@@ -1069,8 +1168,15 @@ ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep_h, uct_pending_req_t *req) + + uct_ud_enter(iface); + +- /* try to flush pending queue first */ +- uct_ud_iface_progress_pending(iface, 0); ++ /* if there was an async progress all 'send' ops return ++ * UCS_ERR_NO_RESOURCE. If we return UCS_ERR_BUSY there will ++ * be a deadlock. ++ * So we must skip a resource check and add a pending op in order to ++ * avoid a deadlock. ++ */ ++ if (ucs_unlikely(uct_ud_iface_has_pending_async_ev(iface))) { ++ goto add_req; ++ } + + if (uct_ud_iface_can_tx(iface) && + uct_ud_iface_has_skbs(iface) && +@@ -1081,12 +1187,14 @@ ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep_h, uct_pending_req_t *req) + return UCS_ERR_BUSY; + } + ++add_req: + ucs_arbiter_elem_init((ucs_arbiter_elem_t *)req->priv); + ucs_arbiter_group_push_elem(&ep->tx.pending.group, + (ucs_arbiter_elem_t *)req->priv); + ucs_arbiter_group_schedule(&iface->tx.pending_q, &ep->tx.pending.group); ++ ucs_trace_data("ud ep %p: added pending req %p tx_psn %d acked_psn %d cwnd %d", ++ ep, req, ep->tx.psn, ep->tx.acked_psn, ep->ca.cwnd); + +- iface->tx.pending_q_len++; + uct_ud_leave(iface); + return UCS_OK; + } +@@ -1097,10 +1205,9 @@ uct_ud_ep_pending_purge_cb(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + { + uct_ud_ep_t *ep = ucs_container_of(ucs_arbiter_elem_group(elem), + uct_ud_ep_t, tx.pending.group); +- uct_pending_req_t *req; +- uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_ud_iface_t); + uct_purge_cb_args_t *cb_args = arg; + uct_pending_purge_callback_t cb = cb_args->cb; ++ uct_pending_req_t *req; + + if (&ep->tx.pending.elem == elem) { + /* return ignored by arbiter */ +@@ -1112,7 +1219,6 @@ uct_ud_ep_pending_purge_cb(ucs_arbiter_t *arbiter, ucs_arbiter_elem_t *elem, + } else { + ucs_debug("ep=%p cancelling user pending request %p", ep, req); + } +- iface->tx.pending_q_len--; + + /* return ignored by arbiter */ + return UCS_ARBITER_CB_RESULT_REMOVE_ELEM; +@@ -1140,24 +1246,22 @@ void uct_ud_ep_pending_purge(uct_ep_h ep_h, uct_pending_purge_callback_t cb, + + void uct_ud_ep_disconnect(uct_ep_h tl_ep) + { +- uct_ud_ep_t *ep = ucs_derived_of(tl_ep, uct_ud_ep_t); +- /* +- * At the moment scedule flush and keep ep +- * until interface is destroyed. User should not send any +- * new data +- * In the future consider doin full fledged disconnect +- * protocol. Kind of TCP (FIN/ACK). Doing this will save memory +- * on the other hand active ep will need more memory to keep its state +- * and such protocol will add extra complexity +- */ ++ uct_ud_ep_t *ep = ucs_derived_of(tl_ep, uct_ud_ep_t); ++ uct_ud_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ud_iface_t); ++ ++ ucs_debug("ep %p: disconnect", ep); + +- ucs_trace_func(""); + /* cancel user pending */ + uct_ud_ep_pending_purge(tl_ep, NULL, NULL); + + /* schedule flush */ + uct_ud_ep_flush(tl_ep, 0, NULL); + ++ /* the EP will be destroyed by interface destroy or timeout in ++ * uct_ud_ep_slow_timer ++ */ ++ ep->close_time = ucs_twheel_get_time(&iface->async.slow_timer); + ep->flags |= UCT_UD_EP_FLAG_DISCONNECTED; +- /* TODO: at least in debug mode keep and check tl_ep state */ ++ ucs_wtimer_add(&iface->async.slow_timer, &ep->slow_timer, ++ UCT_UD_SLOW_TIMER_MAX_TICK(iface)); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.h +index dd93e28da..95fe92fad 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_ep.h +@@ -188,16 +188,23 @@ enum { + UCT_UD_EP_FLAG_ASYNC_COMPS = UCS_BIT(0), /* set if there are completions that + * were picked by async thread and queued */ + UCT_UD_EP_FLAG_DISCONNECTED = UCS_BIT(1), /* set if the endpoint was disconnected */ ++ UCT_UD_EP_FLAG_PRIVATE = UCS_BIT(2), /* EP is was created as internal */ + + /* debug flags */ +- UCT_UD_EP_FLAG_PRIVATE = UCS_BIT(2), /* EP is was created as internal */ + UCT_UD_EP_FLAG_CREQ_RCVD = UCS_BIT(3), /* CREQ message was received */ + UCT_UD_EP_FLAG_CREP_RCVD = UCS_BIT(4), /* CREP message was received */ + UCT_UD_EP_FLAG_CREQ_SENT = UCS_BIT(5), /* CREQ message was sent */ + UCT_UD_EP_FLAG_CREP_SENT = UCS_BIT(6), /* CREP message was sent */ +- UCT_UD_EP_FLAG_CREQ_NOTSENT = UCS_BIT(7) /* CREQ message is NOT sent, because ++ UCT_UD_EP_FLAG_CREQ_NOTSENT = UCS_BIT(7), /* CREQ message is NOT sent, because + connection establishment process + is driven by remote side. */ ++ ++ /* Endpoint is currently executing the pending queue */ ++#if ENABLE_ASSERT ++ UCT_UD_EP_FLAG_IN_PENDING = UCS_BIT(8) ++#else ++ UCT_UD_EP_FLAG_IN_PENDING = 0 ++#endif + }; + + typedef struct uct_ud_peer_name { +@@ -221,15 +228,6 @@ struct uct_ud_ep { + UCS_STATS_NODE_DECLARE(stats); + UCT_UD_EP_HOOK_DECLARE(tx_hook); + } tx; +- struct { +- uct_ud_psn_t psn; /* last psn that was retransmitted */ +- uct_ud_psn_t max_psn; /* max psn that should be retransmitted */ +- ucs_queue_iter_t pos; /* points to the part of tx window that needs to be resent */ +- } resend; +- struct { +- uct_ud_psn_t wmax; +- uct_ud_psn_t cwnd; +- } ca; + struct { + uct_ud_psn_t acked_psn; /* Last psn we acked */ + ucs_frag_list_t ooo_pkts; /* Out of order packets that can not be processed yet, +@@ -237,11 +235,22 @@ struct uct_ud_ep { + UCS_STATS_NODE_DECLARE(stats); + UCT_UD_EP_HOOK_DECLARE(rx_hook); + } rx; ++ struct { ++ uct_ud_psn_t wmax; ++ uct_ud_psn_t cwnd; ++ } ca; ++ struct UCS_S_PACKED { ++ uct_ud_psn_t psn; /* last psn that was retransmitted */ ++ uct_ud_psn_t max_psn; /* max psn that should be retransmitted */ ++ ucs_queue_iter_t pos; /* points to the part of tx window that needs to be resent */ ++ } resend; + ucs_list_link_t cep_list; + uint32_t conn_id; /* connection id. assigned in connect_to_iface() */ +- ucs_wtimer_t slow_timer; +- uint8_t flags; ++ uint16_t flags; + uint8_t path_bits; ++ uint8_t rx_creq_count; /* TODO: remove when reason for DUP/OOO CREQ is found */ ++ ucs_wtimer_t slow_timer; ++ ucs_time_t close_time; /* timestamp of closure */ + UCS_STATS_NODE_DECLARE(stats); + UCT_UD_EP_HOOK_DECLARE(timer_hook); + #if ENABLE_DEBUG_DATA +@@ -266,7 +275,8 @@ ucs_status_t uct_ud_ep_connect_to_ep(uct_ud_ep_t *ep, + const uct_ib_address_t *ib_addr, + const uct_ud_ep_addr_t *ep_addr); + +-ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep, uct_pending_req_t *n); ++ucs_status_t uct_ud_ep_pending_add(uct_ep_h ep, uct_pending_req_t *n, ++ unsigned flags); + + void uct_ud_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, + void *arg); +@@ -372,7 +382,10 @@ uct_ud_ep_ctl_op_isany(uct_ud_ep_t *ep) + static UCS_F_ALWAYS_INLINE int + uct_ud_ep_ctl_op_check_ex(uct_ud_ep_t *ep, uint32_t ops) + { +- return ep->tx.pending.ops == ops; ++ /* check that at least one the given ops is set and ++ * all ops not given are not set */ ++ return (ep->tx.pending.ops & ops) && ++ ((ep->tx.pending.ops & ~ops) == 0); + } + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.c +index 05d653816..db2f1331a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.c +@@ -99,10 +99,9 @@ uct_ud_iface_cep_lookup_peer(uct_ud_iface_t *iface, + { + uint32_t dest_qpn = uct_ib_unpack_uint24(src_if_addr->qp_num); + union ibv_gid dgid; +- uint8_t is_global; + uint16_t dlid; + +- uct_ib_address_unpack(src_ib_addr, &dlid, &is_global, &dgid); ++ uct_ib_address_unpack(src_ib_addr, &dlid, &dgid); + return uct_ud_iface_cep_lookup_addr(iface, dlid, &dgid, dest_qpn); + } + +@@ -150,11 +149,10 @@ ucs_status_t uct_ud_iface_cep_insert(uct_ud_iface_t *iface, + uint32_t dest_qpn = uct_ib_unpack_uint24(src_if_addr->qp_num); + uct_ud_iface_peer_t *peer; + union ibv_gid dgid; +- uint8_t is_global; + uct_ud_ep_t *cep; + uint16_t dlid; + +- uct_ib_address_unpack(src_ib_addr, &dlid, &is_global, &dgid); ++ uct_ib_address_unpack(src_ib_addr, &dlid, &dgid); + peer = uct_ud_iface_cep_lookup_addr(iface, dlid, &dgid, dest_qpn); + if (peer == NULL) { + peer = malloc(sizeof *peer); +@@ -250,21 +248,13 @@ static void uct_ud_iface_send_skb_init(uct_iface_h tl_iface, void *obj, + static ucs_status_t + uct_ud_iface_create_qp(uct_ud_iface_t *self, const uct_ud_iface_config_t *config) + { +- /* TODO: exp attrs autoconf */ +- struct ibv_exp_qp_init_attr qp_init_attr; ++ uct_ib_qp_attr_t qp_init_attr = {}; + struct ibv_qp_attr qp_attr; ++ static ucs_status_t status; + int ret; + +- /* Create QP */ +- memset(&qp_init_attr, 0, sizeof(qp_init_attr)); +- qp_init_attr.qp_context = NULL; +- qp_init_attr.send_cq = self->super.send_cq; +- qp_init_attr.recv_cq = self->super.recv_cq; +- qp_init_attr.srq = NULL; /* TODO */ + qp_init_attr.qp_type = IBV_QPT_UD; + qp_init_attr.sq_sig_all = 0; +- +- /* TODO: cap setting */ + qp_init_attr.cap.max_send_wr = config->super.tx.queue_len; + qp_init_attr.cap.max_recv_wr = config->super.rx.queue_len; + qp_init_attr.cap.max_send_sge = 2; +@@ -272,28 +262,9 @@ uct_ud_iface_create_qp(uct_ud_iface_t *self, const uct_ud_iface_config_t *config + qp_init_attr.cap.max_inline_data = ucs_max(config->super.tx.min_inline, + UCT_UD_MIN_INLINE); + +-#if HAVE_VERBS_EXP_H +- qp_init_attr.pd = uct_ib_iface_md(&self->super)->pd; +- qp_init_attr.comp_mask = IBV_QP_INIT_ATTR_PD; +- /* TODO: inline rcv */ +-#if 0 +- if (mxm_ud_ep_opts(ep)->ud.ib.rx.max_inline > 0) { +- qp_init_attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; +- qp_init_attr.max_inl_recv = mxm_ud_ep_opts(ep)->ud.ib.rx.max_inline; +- } +-#endif +- self->qp = ibv_exp_create_qp(uct_ib_iface_device(&self->super)->ibv_context, +- &qp_init_attr); +-#else +- self->qp = ibv_exp_create_qp(uct_ib_iface_md(&self->super)->pd, &qp_init_attr); +-#endif +- if (self->qp == NULL) { +- ucs_error("Failed to create qp: %s [inline: %u rsge: %u ssge: %u rwr: %u swr: %u]", +- strerror(errno), +- qp_init_attr.cap.max_inline_data, qp_init_attr.cap.max_recv_sge, +- qp_init_attr.cap.max_send_sge, qp_init_attr.cap.max_recv_wr, +- qp_init_attr.cap.max_send_wr); +- goto err; ++ status = self->super.ops->create_qp(&self->super, &qp_init_attr, &self->qp); ++ if (status != UCS_OK) { ++ return status; + } + + self->config.max_inline = qp_init_attr.cap.max_inline_data; +@@ -330,16 +301,9 @@ uct_ud_iface_create_qp(uct_ud_iface_t *self, const uct_ud_iface_config_t *config + goto err_destroy_qp; + } + +- ucs_debug("iface=%p: created qp 0x%x max_send_wr %u max_recv_wr %u max_inline %u", +- self, self->qp->qp_num, +- qp_init_attr.cap.max_send_wr, +- qp_init_attr.cap.max_recv_wr, +- qp_init_attr.cap.max_inline_data); +- + return UCS_OK; + err_destroy_qp: + ibv_destroy_qp(self->qp); +-err: + return UCS_ERR_INVALID_PARAM; + } + +@@ -417,17 +381,16 @@ static void uct_ud_iface_calc_gid_len(uct_ud_iface_t *iface) + + UCS_CLASS_INIT_FUNC(uct_ud_iface_t, uct_ud_iface_ops_t *ops, uct_md_h md, + uct_worker_h worker, const uct_iface_params_t *params, +- unsigned ud_rx_priv_len, +- const uct_ud_iface_config_t *config) ++ const uct_ud_iface_config_t *config, ++ uct_ib_iface_init_attr_t *init_attr) + { +- unsigned rx_priv_len, rx_hdr_len; + ucs_status_t status; + size_t data_size; + int mtu; + +- ucs_trace_func("%s: iface=%p ops=%p worker=%p rx_headroom=%zu ud_rx_priv_len=%u", ++ ucs_trace_func("%s: iface=%p ops=%p worker=%p rx_headroom=%zu", + params->mode.device.dev_name, self, ops, worker, +- params->rx_headroom, ud_rx_priv_len); ++ params->rx_headroom); + + if (config->super.tx.queue_len <= UCT_UD_TX_MODERATION) { + ucs_error("%s ud iface tx queue is too short (%d <= %d)", +@@ -441,15 +404,15 @@ UCS_CLASS_INIT_FUNC(uct_ud_iface_t, uct_ud_iface_ops_t *ops, uct_md_h md, + return status; + } + +- rx_priv_len = ud_rx_priv_len + +- sizeof(uct_ud_recv_skb_t) - sizeof(uct_ib_iface_recv_desc_t); +- rx_hdr_len = UCT_IB_GRH_LEN + sizeof(uct_ud_neth_t); ++ init_attr->rx_priv_len = sizeof(uct_ud_recv_skb_t) - ++ sizeof(uct_ib_iface_recv_desc_t); ++ init_attr->rx_hdr_len = UCT_IB_GRH_LEN + sizeof(uct_ud_neth_t); ++ init_attr->tx_cq_len = config->super.tx.queue_len; ++ init_attr->rx_cq_len = config->super.rx.queue_len; ++ init_attr->seg_size = ucs_min(mtu, config->super.super.max_bcopy); + + UCS_CLASS_CALL_SUPER_INIT(uct_ib_iface_t, &ops->super, md, worker, +- params, rx_priv_len, rx_hdr_len, +- config->super.tx.queue_len, +- config->super.rx.queue_len, +- mtu, &config->super); ++ params, &config->super, init_attr); + + if (self->super.super.worker->async == NULL) { + ucs_error("%s ud iface must have valid async context", params->mode.device.dev_name); +@@ -464,7 +427,7 @@ UCS_CLASS_INIT_FUNC(uct_ud_iface_t, uct_ud_iface_ops_t *ops, uct_md_h md, + self->config.tx_qp_len = config->super.tx.queue_len; + self->config.peer_timeout = ucs_time_from_sec(config->peer_timeout); + self->config.check_grh_dgid = (config->dgid_check && +- (self->super.addr_type == UCT_IB_ADDRESS_TYPE_ETH)); ++ IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(&self->super))); + + if (config->slow_timer_backoff <= 0.) { + ucs_error("The slow timer back off should be > 0 (%lf)", +@@ -518,13 +481,13 @@ UCS_CLASS_INIT_FUNC(uct_ud_iface_t, uct_ud_iface_ops_t *ops, uct_md_h md, + self->tx.resend_skbs_quota = 0; + + ucs_arbiter_init(&self->tx.pending_q); +- self->tx.pending_q_len = 0; + + ucs_queue_head_init(&self->tx.async_comp_q); +- self->tx.in_pending = 0; + + ucs_queue_head_init(&self->rx.pending_q); + ++ self->tx.async_before_pending = 0; ++ + uct_ud_iface_calc_gid_len(self); + + status = UCS_STATS_NODE_ALLOC(&self->stats, &uct_ud_iface_stats_class, +@@ -563,7 +526,6 @@ static UCS_CLASS_CLEANUP_FUNC(uct_ud_iface_t) + ucs_debug("iface(%p): ptr_array cleanup", self); + ucs_ptr_array_cleanup(&self->eps); + ucs_arbiter_cleanup(&self->tx.pending_q); +- ucs_assert(self->tx.pending_q_len == 0); + UCS_STATS_NODE_FREE(self->stats); + uct_ud_leave(self); + } +@@ -664,7 +626,11 @@ ucs_status_t uct_ud_iface_flush(uct_iface_h tl_iface, unsigned flags, + + uct_ud_enter(iface); + +- uct_ud_iface_progress_pending_tx(iface); ++ if (ucs_unlikely(uct_ud_iface_has_pending_async_ev(iface))) { ++ UCT_TL_IFACE_STAT_FLUSH_WAIT(&iface->super.super); ++ uct_ud_leave(iface); ++ return UCS_INPROGRESS; ++ } + + count = 0; + ucs_ptr_array_for_each(ep, i, &iface->eps) { +@@ -680,6 +646,7 @@ ucs_status_t uct_ud_iface_flush(uct_iface_h tl_iface, unsigned flags, + UCT_TL_IFACE_STAT_FLUSH_WAIT(&iface->super.super); + return UCS_INPROGRESS; + } ++ + UCT_TL_IFACE_STAT_FLUSH(&iface->super.super); + return UCS_OK; + } +@@ -742,11 +709,34 @@ static void uct_ud_iface_free_resend_skbs(uct_ud_iface_t *iface) + } + } + ++static void uct_ud_ep_dispatch_err_comp(uct_ud_ep_t *ep, uct_ud_send_skb_t *skb) ++{ ++ uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, uct_ud_iface_t); ++ ucs_status_t status; ++ ++ ucs_assert(ep->tx.err_skb_count > 0); ++ --ep->tx.err_skb_count; ++ ++ if ((ep->tx.err_skb_count > 0) || (ep->flags & UCT_UD_EP_FLAG_DISCONNECTED)) { ++ return; ++ } ++ ++ if (ep->flags & UCT_UD_EP_FLAG_PRIVATE) { ++ uct_ep_destroy(&ep->super.super); ++ return; ++ } ++ ++ status = iface->super.ops->set_ep_failed(&iface->super, &ep->super.super, ++ skb->status); ++ if (status != UCS_OK) { ++ ucs_fatal("transport error: %s", ucs_status_string(status)); ++ } ++} ++ + void uct_ud_iface_dispatch_async_comps_do(uct_ud_iface_t *iface) + { + uct_ud_comp_desc_t *cdesc; + uct_ud_send_skb_t *skb; +- ucs_status_t status; + uct_ud_ep_t *ep; + + do { +@@ -761,17 +751,7 @@ void uct_ud_iface_dispatch_async_comps_do(uct_ud_iface_t *iface) + } + + if (ucs_unlikely(skb->flags & UCT_UD_SEND_SKB_FLAG_ERR)) { +- ucs_assert(ep->tx.err_skb_count > 0); +- --ep->tx.err_skb_count; +- if ((ep->tx.err_skb_count == 0) && +- !(ep->flags & UCT_UD_EP_FLAG_DISCONNECTED)) { +- status = iface->super.ops->set_ep_failed(&iface->super, +- &ep->super.super, +- skb->status); +- if (status != UCS_OK) { +- ucs_fatal("transport error: %s", ucs_status_string(status)); +- } +- } ++ uct_ud_ep_dispatch_err_comp(ep, skb); + } + + ep->flags &= ~UCT_UD_EP_FLAG_ASYNC_COMPS; +@@ -830,7 +810,14 @@ static void uct_ud_iface_free_pending_rx(uct_ud_iface_t *iface) + + static inline void uct_ud_iface_async_progress(uct_ud_iface_t *iface) + { +- ucs_derived_of(iface->super.ops, uct_ud_iface_ops_t)->async_progress(iface); ++ unsigned ev_count; ++ uct_ud_iface_ops_t *ops; ++ ++ ops = ucs_derived_of(iface->super.ops, uct_ud_iface_ops_t); ++ ev_count = ops->async_progress(iface); ++ if (ev_count > 0) { ++ uct_ud_iface_raise_pending_async_ev(iface); ++ } + } + + static void uct_ud_iface_timer(int timer_id, void *arg) +@@ -892,7 +879,7 @@ ucs_status_t uct_ud_iface_event_arm(uct_iface_h tl_iface, unsigned events) + } + + if (events & UCT_EVENT_SEND_COMP) { +- status = iface->super.ops->arm_tx_cq(&iface->super); ++ status = iface->super.ops->arm_cq(&iface->super, UCT_IB_DIR_TX, 0); + if (status != UCS_OK) { + goto out; + } +@@ -900,7 +887,7 @@ ucs_status_t uct_ud_iface_event_arm(uct_iface_h tl_iface, unsigned events) + + if (events & (UCT_EVENT_SEND_COMP | UCT_EVENT_RECV)) { + /* we may get send completion through ACKs as well */ +- status = iface->super.ops->arm_rx_cq(&iface->super, 0); ++ status = iface->super.ops->arm_cq(&iface->super, UCT_IB_DIR_RX, 0); + if (status != UCS_OK) { + goto out; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.h +index e4c6db537..ab36374bc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_iface.h +@@ -103,9 +103,10 @@ static inline ucs_status_t uct_ud_iface_null_hook(uct_ud_iface_t *iface, + + typedef struct uct_ud_iface_ops { + uct_ib_iface_ops_t super; +- void (*async_progress)(uct_ud_iface_t *iface); ++ unsigned (*async_progress)(uct_ud_iface_t *iface); + void (*tx_skb)(uct_ud_ep_t *ep, uct_ud_send_skb_t *skb, + int solicited); ++ void (*ep_free)(uct_ep_h ep); + } uct_ud_iface_ops_t; + + struct uct_ud_iface { +@@ -122,14 +123,14 @@ struct uct_ud_iface { + uct_ud_send_skb_t *skb; /* ready to use skb */ + uct_ud_send_skb_inl_t skb_inl; + ucs_mpool_t mp; ++ /* got async events but pending queue was not dispatched */ ++ uint8_t async_before_pending; + int16_t available; + unsigned unsignaled; + /* pool of skbs that are reserved for retransmissions */ + ucs_queue_head_t resend_skbs; + unsigned resend_skbs_quota; + ucs_arbiter_t pending_q; +- int pending_q_len; +- int in_pending; + ucs_queue_head_t async_comp_q; + } tx; + struct { +@@ -154,7 +155,8 @@ struct uct_ud_iface { + + UCS_CLASS_DECLARE(uct_ud_iface_t, uct_ud_iface_ops_t*, uct_md_h, + uct_worker_h, const uct_iface_params_t*, +- unsigned, const uct_ud_iface_config_t*) ++ const uct_ud_iface_config_t*, ++ uct_ib_iface_init_attr_t*) + + struct uct_ud_ctl_hdr { + uint8_t type; +@@ -213,7 +215,7 @@ uct_ud_send_skb_t *uct_ud_iface_resend_skb_get(uct_ud_iface_t *iface); + static inline void + uct_ud_iface_resend_skb_put(uct_ud_iface_t *iface, uct_ud_send_skb_t *skb) + { +- if (skb != (void*)&iface->tx.skb_inl.super) { ++ if (skb != ucs_unaligned_ptr(&iface->tx.skb_inl.super)) { + ucs_queue_push(&iface->tx.resend_skbs, &skb->queue); + } + } +@@ -376,26 +378,29 @@ uct_ud_iface_get_async_time(uct_ud_iface_t *iface) + static UCS_F_ALWAYS_INLINE void + uct_ud_iface_progress_pending(uct_ud_iface_t *iface, const uintptr_t is_async) + { ++ if (!is_async) { ++ iface->tx.async_before_pending = 0; ++ } + + if (!uct_ud_iface_can_tx(iface)) { + return; + } + +- iface->tx.in_pending = 1; +- ucs_arbiter_dispatch(&iface->tx.pending_q, 1, +- uct_ud_ep_do_pending, (void *)is_async); +- iface->tx.in_pending = 0; ++ ucs_arbiter_dispatch(&iface->tx.pending_q, 1, uct_ud_ep_do_pending, ++ (void *)is_async); ++} ++ ++static UCS_F_ALWAYS_INLINE int ++uct_ud_iface_has_pending_async_ev(uct_ud_iface_t *iface) ++{ ++ return iface->tx.async_before_pending; + } + + static UCS_F_ALWAYS_INLINE void +-uct_ud_iface_progress_pending_tx(uct_ud_iface_t *iface) ++uct_ud_iface_raise_pending_async_ev(uct_ud_iface_t *iface) + { +- if (ucs_unlikely(iface->tx.pending_q_len > 0 && +- iface->tx.in_pending == 0)) { +- iface->tx.in_pending = 1; +- ucs_arbiter_dispatch(&iface->tx.pending_q, 1, +- uct_ud_ep_do_pending, (void *)0); +- iface->tx.in_pending = 0; ++ if (!ucs_arbiter_is_empty(&iface->tx.pending_q)) { ++ iface->tx.async_before_pending = 1; + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_inl.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_inl.h +index 55e481613..b7f6b4439 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_inl.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/base/ud_inl.h +@@ -7,7 +7,6 @@ + static UCS_F_ALWAYS_INLINE void + uct_ud_ep_ctl_op_schedule(uct_ud_iface_t *iface, uct_ud_ep_t *ep) + { +- ucs_assert(!iface->tx.in_pending); + ucs_arbiter_group_push_elem(&ep->tx.pending.group, + &ep->tx.pending.elem); + ucs_arbiter_group_schedule(&iface->tx.pending_q, &ep->tx.pending.group); +@@ -23,15 +22,6 @@ uct_ud_ep_ctl_op_add(uct_ud_iface_t *iface, uct_ud_ep_t *ep, int op) + uct_ud_ep_ctl_op_schedule(iface, ep); + } + +-static UCS_F_ALWAYS_INLINE void +-uct_ud_ep_ctl_op_add_safe(uct_ud_iface_t *iface, uct_ud_ep_t *ep, int op) +-{ +- ep->tx.pending.ops |= op; +- if (!iface->tx.in_pending) { +- uct_ud_ep_ctl_op_schedule(iface, ep); +- } +-} +- + static UCS_F_ALWAYS_INLINE void + uct_ud_ep_tx_stop(uct_ud_ep_t *ep) + { +@@ -81,8 +71,9 @@ static UCS_F_ALWAYS_INLINE uct_ud_send_skb_t * + uct_ud_ep_get_tx_skb(uct_ud_iface_t *iface, uct_ud_ep_t *ep) + { + if (ucs_unlikely(!uct_ud_ep_is_connected(ep) || +- uct_ud_ep_no_window(ep))) { +- ucs_trace_data("iface=%p ep=%p (%d->%d) no ep resources (psn=%u max_psn=%u)", ++ uct_ud_ep_no_window(ep) || ++ uct_ud_iface_has_pending_async_ev(iface))) { ++ ucs_trace_poll("iface=%p ep=%p (%d->%d) no ep resources (psn=%u max_psn=%u)", + iface, ep, ep->ep_id, ep->dest_ep_id, + (unsigned)ep->tx.psn, + (unsigned)ep->tx.max_psn); +@@ -170,6 +161,17 @@ uct_ud_am_common(uct_ud_iface_t *iface, uct_ud_ep_t *ep, uint8_t id, + return UCS_ERR_NO_RESOURCE; + } + ++ /* either we are executing pending operations, or there are no any pending ++ * elements, or the only pending element is for sending control messages ++ * (we don't care about reordering with respect to control messages) ++ */ ++ ucs_assertv((ep->flags & UCT_UD_EP_FLAG_IN_PENDING) || ++ ucs_arbiter_group_is_empty(&ep->tx.pending.group) || ++ ucs_arbiter_elem_is_only(&ep->tx.pending.group, &ep->tx.pending.elem), ++ "out-of-order send detected for ep %p am %d ep_pending %d arbtail %p arbelem %p", ++ ep, id, (ep->flags & UCT_UD_EP_FLAG_IN_PENDING), ++ ep->tx.pending.group.tail, ++ &ep->tx.pending.elem); + uct_ud_am_set_neth(skb->neth, ep, id); + + *skb_p = skb; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/verbs/ud_verbs.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/verbs/ud_verbs.c +index 1209ca133..3d3bd5040 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/verbs/ud_verbs.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ib/ud/verbs/ud_verbs.c +@@ -50,10 +50,6 @@ UCS_CLASS_INIT_FUNC(uct_ud_verbs_ep_t, uct_iface_h tl_iface) + static UCS_CLASS_CLEANUP_FUNC(uct_ud_verbs_ep_t) + { + ucs_trace_func(""); +- if (self->ah) { +- ibv_destroy_ah(self->ah); +- self->ah = NULL; +- } + } + + UCS_CLASS_DEFINE(uct_ud_verbs_ep_t, uct_ud_ep_t); +@@ -90,7 +86,7 @@ uct_ud_verbs_ep_tx_inlv(uct_ud_verbs_iface_t *iface, uct_ud_verbs_ep_t *ep, + ret = ibv_post_send(iface->super.qp, &iface->tx.wr_inl, &bad_wr); + ucs_assertv(ret == 0, "ibv_post_send() returned %d (%m)", ret); + uct_ib_log_post_send(&iface->super.super, iface->super.qp, &iface->tx.wr_inl, +- uct_ud_dump_packet); ++ INT_MAX, uct_ud_dump_packet); + --iface->super.tx.available; + } + +@@ -109,7 +105,7 @@ uct_ud_verbs_ep_tx_skb(uct_ud_verbs_iface_t *iface, + ret = ibv_post_send(iface->super.qp, &iface->tx.wr_skb, &bad_wr); + ucs_assertv(ret == 0, "ibv_post_send() returned %d (%m)", ret); + uct_ib_log_post_send(&iface->super.super, iface->super.qp, &iface->tx.wr_skb, +- uct_ud_dump_packet); ++ INT_MAX, uct_ud_dump_packet); + --iface->super.tx.available; + } + +@@ -145,7 +141,7 @@ ucs_status_t uct_ud_verbs_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t hdr, + 0, iface->super.config.max_inline, "am_short"); + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + status = uct_ud_am_common(&iface->super, &ep->super, id, &skb); + if (status != UCS_OK) { + uct_ud_leave(&iface->super); +@@ -180,7 +176,7 @@ static ssize_t uct_ud_verbs_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + size_t length; + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + status = uct_ud_am_common(&iface->super, &ep->super, id, &skb); + if (status != UCS_OK) { + uct_ud_leave(&iface->super); +@@ -217,7 +213,7 @@ uct_ud_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *header, + uct_iov_total_length(iov, iovcnt)); + + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + status = uct_ud_am_common(&iface->super, &ep->super, id, &skb); + if (status != UCS_OK) { + uct_ud_leave(&iface->super); +@@ -256,7 +252,7 @@ ucs_status_t uct_ud_verbs_ep_put_short(uct_ep_h tl_ep, + + /* TODO: UCT_CHECK_LENGTH(length <= iface->config.max_inline, "put_short"); */ + uct_ud_enter(&iface->super); +- uct_ud_iface_progress_pending_tx(&iface->super); ++ + skb = uct_ud_ep_get_tx_skb(&iface->super, &ep->super); + if (!skb) { + uct_ud_leave(&iface->super); +@@ -290,7 +286,7 @@ uct_ud_verbs_iface_poll_tx(uct_ud_verbs_iface_t *iface) + struct ibv_wc wc; + int ret; + +- ret = ibv_poll_cq(iface->super.super.send_cq, 1, &wc); ++ ret = ibv_poll_cq(iface->super.super.cq[UCT_IB_DIR_TX], 1, &wc); + if (ucs_unlikely(ret < 0)) { + ucs_fatal("Failed to poll send CQ"); + return 0; +@@ -319,7 +315,7 @@ uct_ud_verbs_iface_poll_rx(uct_ud_verbs_iface_t *iface, int is_async) + void *packet; + int i; + +- status = uct_ib_poll_cq(iface->super.super.recv_cq, &num_wcs, wc); ++ status = uct_ib_poll_cq(iface->super.super.cq[UCT_IB_DIR_RX], &num_wcs, wc); + if (status != UCS_OK) { + num_wcs = 0; + goto out; +@@ -353,16 +349,21 @@ static ucs_status_t uct_ud_verbs_ep_set_failed(uct_ib_iface_t *iface, + &iface->super.super, status); + } + +-static void uct_ud_verbs_iface_async_progress(uct_ud_iface_t *ud_iface) ++static unsigned uct_ud_verbs_iface_async_progress(uct_ud_iface_t *ud_iface) + { + uct_ud_verbs_iface_t *iface = ucs_derived_of(ud_iface, uct_ud_verbs_iface_t); +- unsigned count; ++ unsigned count, n; + ++ count = 0; + do { +- count = uct_ud_verbs_iface_poll_rx(iface, 1); +- } while (count > 0); +- uct_ud_verbs_iface_poll_tx(iface); ++ n = uct_ud_verbs_iface_poll_rx(iface, 1); ++ count += n; ++ } while (n > 0); ++ ++ count += uct_ud_verbs_iface_poll_tx(iface); ++ + uct_ud_iface_progress_pending(&iface->super, 1); ++ return count; + } + + static unsigned uct_ud_verbs_iface_progress(uct_iface_h tl_iface) +@@ -382,8 +383,10 @@ static unsigned uct_ud_verbs_iface_progress(uct_iface_h tl_iface) + } else { + count = 0; + } ++ + uct_ud_iface_progress_pending(&iface->super, 0); + uct_ud_leave(&iface->super); ++ + return count; + } + +@@ -513,13 +516,15 @@ static uct_ud_iface_ops_t uct_ud_verbs_iface_ops = { + .iface_get_address = uct_ud_iface_get_address, + .iface_is_reachable = uct_ib_iface_is_reachable + }, +- .arm_tx_cq = uct_ib_iface_arm_tx_cq, +- .arm_rx_cq = uct_ib_iface_arm_rx_cq, ++ .arm_cq = uct_ib_iface_arm_cq, ++ .event_cq = (void*)ucs_empty_function, + .handle_failure = uct_ud_iface_handle_failure, +- .set_ep_failed = uct_ud_verbs_ep_set_failed ++ .set_ep_failed = uct_ud_verbs_ep_set_failed, ++ .create_qp = uct_ib_iface_create_qp + }, + .async_progress = uct_ud_verbs_iface_async_progress, +- .tx_skb = uct_ud_verbs_ep_tx_ctl_skb ++ .tx_skb = uct_ud_verbs_ep_tx_ctl_skb, ++ .ep_free = UCS_CLASS_DELETE_FUNC_NAME(uct_ud_verbs_ep_t) + }; + + static UCS_F_NOINLINE void +@@ -562,12 +567,15 @@ static UCS_CLASS_INIT_FUNC(uct_ud_verbs_iface_t, uct_md_h md, uct_worker_h worke + { + uct_ud_iface_config_t *config = ucs_derived_of(tl_config, + uct_ud_iface_config_t); ++ uct_ib_iface_init_attr_t init_attr = {}; + ucs_status_t status; + + ucs_trace_func(""); + ++ init_attr.res_domain_key = UCT_IB_IFACE_NULL_RES_DOMAIN_KEY; ++ + UCS_CLASS_CALL_SUPER_INIT(uct_ud_iface_t, &uct_ud_verbs_iface_ops, md, +- worker, params, 0, config); ++ worker, params, config, &init_attr); + + memset(&self->tx.wr_inl, 0, sizeof(self->tx.wr_inl)); + self->tx.wr_inl.opcode = IBV_WR_SEND; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_ep.c +index b61d8a503..29ef06b5a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_ep.c +@@ -46,42 +46,6 @@ UCS_CLASS_DEFINE_DELETE_FUNC(uct_rocm_cma_ep_t, uct_ep_t); + (_rkey)) + + +-/** Convert pointer to pointer which could be used for +- * GPU access. +-*/ +-static ucs_status_t uct_rocm_cma_ptr_to_gpu_ptr(void *ptr, void **gpu_address, +- size_t size, int any_memory, +- int *locked) +-{ +- /* Assume that we do not need to lock memory */ +- *locked = 0; +- +- /* Try to get GPU address if any */ +- if (!uct_rocm_is_ptr_gpu_accessible(ptr, gpu_address)) { +- /* We do not have GPU address. Check what to do. */ +- if (!any_memory) { +- /* We do not want to deal with memory about which +- * ROCm stack is not aware */ +- ucs_warn("Address %p is not GPU registered", ptr); +- return UCS_ERR_INVALID_ADDR; +- } else { +- /* Register / lock this memory for GPU access */ +- hsa_status_t status = uct_rocm_memory_lock(ptr, size, gpu_address); +- +- if (status != HSA_STATUS_SUCCESS) { +- ucs_error("Could not lock %p. Status %d", ptr, status); +- return UCS_ERR_INVALID_ADDR; +- } else { +- ucs_trace("Lock address %p as GPU %p", ptr, *gpu_address); +- /* We locked this memory. Set the flag to be aware that +- * we need to unlock it later */ +- *locked = 1; +- } +- } +- } +- +- return UCS_OK; +-} + + /** Release GPU address if it was previously locked */ + static void uct_rocm_cma_unlock_ptrs(void **local_ptr, int *locked, +@@ -131,8 +95,8 @@ ucs_status_t uct_rocm_cma_ep_common_zcopy(uct_ep_h tl_ep, + size_t length = 0; + HsaMemoryRange local_iov[UCT_SM_MAX_IOV]; + HsaMemoryRange remote_iov; +- ucs_status_t ucs_status; + HSAKMT_STATUS hsa_status; ++ hsa_status_t status; + void *local_ptr[UCT_SM_MAX_IOV]; + int local_ptr_locked[UCT_SM_MAX_IOV]; + uint64_t remote_gpu_address; +@@ -212,15 +176,15 @@ ucs_status_t uct_rocm_cma_ep_common_zcopy(uct_ep_h tl_ep, + * If this is memory was not yet registered with ROCm stack and + * flag "any_memory" is set than lock this memory. + */ +- ucs_status = uct_rocm_cma_ptr_to_gpu_ptr(local_ptr[local_iov_it], +- &local_iov[local_iov_it].MemoryAddress, +- local_iov[local_iov_it].SizeInBytes, +- rocm_md->any_memory, +- &local_ptr_locked[local_iov_it]); ++ status = uct_rocm_cma_ptr_to_gpu_ptr(local_ptr[local_iov_it], ++ &local_iov[local_iov_it].MemoryAddress, ++ local_iov[local_iov_it].SizeInBytes, ++ rocm_md->any_memory, ++ &local_ptr_locked[local_iov_it]); + +- if (ucs_status != UCS_OK) { ++ if (status != HSA_STATUS_SUCCESS) { + uct_rocm_cma_unlock_ptrs(local_ptr, local_ptr_locked, local_iov_it); +- return ucs_status; ++ return UCS_ERR_INVALID_ADDR; + } + + ucs_trace("[%d] Local address %p (GPU ptr %p), Local Size 0x%x", +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_md.c +index 9bc7c7638..24821f783 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_cma_md.c +@@ -99,27 +99,14 @@ static ucs_status_t uct_rocm_cma_mem_reg(uct_md_h md, void *address, size_t leng + /* Assume memory is already GPU accessible */ + key->is_locked = 0; + +- /* Check if memory is already GPU accessible. If yes then GPU +- * address will be returned. +- * Note that we could have case of "malloc"-ed memory which +- * was "locked" outside of UCX. In this case CPU address may be +- * not the same as GPU one. +- */ +- if (!uct_rocm_is_ptr_gpu_accessible(address, &gpu_address)) { +- if (!rocm_md->any_memory) { +- ucs_warn("Address %p is not GPU allocated.", address); +- return UCS_ERR_INVALID_ADDR; +- } else { +- status = uct_rocm_memory_lock(address, length, &gpu_address); +- +- if (status != HSA_STATUS_SUCCESS) { +- ucs_error("Could not lock %p. Status %d", address, status); +- return UCS_ERR_INVALID_ADDR; +- } else { +- ucs_trace("Lock address %p as GPU %p", address, gpu_address); +- key->is_locked = 1; /* Set flag that memory was locked by us */ +- } +- } ++ status = uct_rocm_cma_ptr_to_gpu_ptr(address, &gpu_address, ++ length, rocm_md->any_memory, ++ &key->is_locked); ++ if (status != HSA_STATUS_SUCCESS) { ++ ucs_error("Failed to convert cma %p for gpu access", address); ++ *memh_p = NULL; ++ ucs_free(key); ++ return UCS_ERR_INVALID_ADDR; + } + + key->length = length; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.c +index 016c7d843..68f420a2c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.c +@@ -200,12 +200,17 @@ end: + return status; + } + +-int uct_rocm_is_ptr_gpu_accessible(void *ptr, void **gpu_ptr) ++/* Checks if ptr is ROCm allocated, if so then set need_lock to 0 */ ++static hsa_status_t uct_rocm_check_ptr_info(void *ptr, void **gpu_ptr, ++ int *need_lock) + { ++ hsa_status_t status; + hsa_amd_pointer_info_t info; + info.size = sizeof(hsa_amd_pointer_info_t); + +- hsa_status_t status = hsa_amd_pointer_info(ptr, (hsa_amd_pointer_info_t *)&info, ++ *need_lock = 1; ++ *gpu_ptr = 0; ++ status = hsa_amd_pointer_info(ptr, (hsa_amd_pointer_info_t *)&info, + NULL, NULL, NULL); + + if (status == HSA_STATUS_SUCCESS) { +@@ -224,26 +229,27 @@ int uct_rocm_is_ptr_gpu_accessible(void *ptr, void **gpu_ptr) + else if (info.type == HSA_EXT_POINTER_TYPE_HSA) { + /* This is the GPU pointer */ + *gpu_ptr += ptr - info.agentBaseAddress; ++ *need_lock = 0; + } + else { + /* Assume that "ptr" is GPU pointer */ + *gpu_ptr += ptr - info.agentBaseAddress; ++ *need_lock = 0; + } + } +- +- ucs_trace("%p is GPU accessible (agent addr %p, Host Base %p)", ++ ucs_trace("%p info (agent addr %p, Host Base %p)", + ptr, info.agentBaseAddress, info.hostBaseAddress); +- return 1; + } + } + + ucs_trace_func("%p is not GPU accessible", ptr); +- return 0; ++ return status; + } + + + hsa_status_t uct_rocm_memory_lock(void *ptr, size_t size, void **gpu_ptr) + { ++ + /* We need to lock / register memory on all GPUs because we do not know + the location of other memory */ + hsa_status_t status = hsa_amd_memory_lock(ptr, size, +@@ -257,3 +263,41 @@ hsa_status_t uct_rocm_memory_lock(void *ptr, size_t size, void **gpu_ptr) + + return status; + } ++ ++/** Convert pointer to pointer which could be used for GPU access. ++*/ ++hsa_status_t uct_rocm_cma_ptr_to_gpu_ptr(void *ptr, void **gpu_address, ++ size_t size, int any_memory, ++ int *locked) ++{ ++ hsa_status_t status; ++ int need_lock = 0; ++ ++ /* Assume that we do not need to lock memory */ ++ *locked = 0; ++ ++ if (!any_memory) { ++ /* We do not want to deal with memory about which ++ * ROCm stack is not aware */ ++ ucs_warn("Address %p is not GPU registered", ptr); ++ return HSA_STATUS_ERROR; ++ } ++ ++ status = uct_rocm_check_ptr_info(ptr, gpu_address, &need_lock); ++ if (status != HSA_STATUS_SUCCESS || !need_lock) ++ return status; ++ ++ /* Register / lock this memory for GPU access */ ++ status = uct_rocm_memory_lock(ptr, size, gpu_address); ++ if (status != HSA_STATUS_SUCCESS) { ++ ucs_error("Could not lock %p. Status %d", ptr, status); ++ return status; ++ } else { ++ ucs_trace("Lock address %p as GPU %p", ptr, *gpu_address); ++ /* We locked this memory. Set the flag to be aware that ++ * we need to unlock it later */ ++ *locked = 1; ++ } ++ ++ return status; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.h +index 4205d2157..827cee1bd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/rocm/rocm_common.h +@@ -20,16 +20,19 @@ hsa_status_t uct_rocm_init(); + + + /** +- * @brief Check if memory is GPU accessible ++ * @brief Convert pointer to pointer which could be used for GPU access + * + * @param [in] ptr Pointer to memory + * @param [out] gpu_ptr If not NULL return host address to be used for + * GPU access. +- * +- * @return true if GPU accessible false otherwise ++ * @param [out] indicates if memory is locked for GPU access. If locked ++ * then hsa_amd_unlock() should be called ++ * @return HSA status + * + */ +-int uct_rocm_is_ptr_gpu_accessible(void *ptr, void **gpu_ptr); ++hsa_status_t uct_rocm_cma_ptr_to_gpu_ptr(void *ptr, void **gpu_address, ++ size_t size, int any_memory, ++ int *locked); + + + /** +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.c +index cce8dad5e..e6910f3ec 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.c +@@ -54,39 +54,145 @@ ucs_status_t uct_sm_ep_get_bcopy(uct_ep_h tl_ep, uct_unpack_callback_t unpack_cb + return UCS_OK; + } + +-ucs_status_t uct_sm_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_sm_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { +- uint64_t *ptr = (uint64_t *)(rkey + remote_addr); +- ucs_atomic_add64(ptr, add); +- uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_ADD64 [add %"PRIu64"]", add); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); ++ uint32_t *ptr = (uint32_t *)(rkey + remote_addr); ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ ucs_atomic_add32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_ADD32 [value %"PRIu32"]", value); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ ucs_atomic_and32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_AND32 [value %"PRIu32"]", value); ++ break; ++ case UCT_ATOMIC_OP_OR: ++ ucs_atomic_or32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_OR32 [value %"PRIu32"]", value); ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ ucs_atomic_xor32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_XOR32 [value %"PRIu32"]", value); ++ break; ++ default: ++ ucs_assertv(0, "incorrect opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(ep, uct_base_ep_t)); + return UCS_OK; + } + +-ucs_status_t uct_sm_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ucs_status_t uct_sm_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) + { + uint64_t *ptr = (uint64_t *)(rkey + remote_addr); +- *result = ucs_atomic_fadd64(ptr, add); +- uct_sm_ep_trace_data(remote_addr, rkey, +- "ATOMIC_FADD64 [add %"PRIu64" result %"PRIu64"]", +- add, *result); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ ucs_atomic_add64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_ADD64 [value %"PRIu64"]", value); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ ucs_atomic_and64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_AND64 [value %"PRIu64"]", value); ++ break; ++ case UCT_ATOMIC_OP_OR: ++ ucs_atomic_or64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_OR64 [value %"PRIu64"]", value); ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ ucs_atomic_xor64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_XOR64 [value %"PRIu64"]", value); ++ break; ++ default: ++ ucs_assertv(0, "incorrect opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(ep, uct_base_ep_t)); + return UCS_OK; + } + +-ucs_status_t uct_sm_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ucs_status_t uct_sm_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) + { + uint64_t *ptr = (uint64_t *)(rkey + remote_addr); +- *result = ucs_atomic_swap64(ptr, swap); +- uct_sm_ep_trace_data(remote_addr, rkey, +- "ATOMIC_SWAP64 [swap %"PRIu64" result %"PRIu64"]", +- swap, *result); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ *result = ucs_atomic_fadd64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FADD64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ *result = ucs_atomic_fand64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FAND64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_OR: ++ *result = ucs_atomic_for64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FOR64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ *result = ucs_atomic_fxor64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FXOR64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_SWAP: ++ *result = ucs_atomic_swap64(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_SWAP64 [value %"PRIu64 ++ " result %"PRIu64"]", value, *result); ++ break; ++ default: ++ ucs_assertv(0, "incorrect opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(ep, uct_base_ep_t)); ++ return UCS_OK; ++} ++ ++ucs_status_t uct_sm_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) ++{ ++ uint32_t *ptr = (uint32_t *)(rkey + remote_addr); ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ *result = ucs_atomic_fadd32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FADD32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_AND: ++ *result = ucs_atomic_fand32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FAND32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_OR: ++ *result = ucs_atomic_for32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FOR32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_XOR: ++ *result = ucs_atomic_fxor32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FXOR32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ case UCT_ATOMIC_OP_SWAP: ++ *result = ucs_atomic_swap32(ptr, value); ++ uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_SWAP32 [value %"PRIu32 ++ " result %"PRIu32"]", value, *result); ++ break; ++ default: ++ ucs_assertv(0, "incorrect opcode: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++ ++ UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(ep, uct_base_ep_t)); + return UCS_OK; + } + +@@ -104,40 +210,6 @@ ucs_status_t uct_sm_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, + return UCS_OK; + } + +-ucs_status_t uct_sm_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) +-{ +- uint32_t *ptr = (uint32_t *)(rkey + remote_addr); +- ucs_atomic_add32(ptr, add); +- uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_ADD32 [add %"PRIu32"]", add); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return UCS_OK; +-} +- +-ucs_status_t uct_sm_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) +-{ +- uint32_t *ptr = (uint32_t *)(rkey + remote_addr); +- *result = ucs_atomic_fadd32(ptr, add); +- uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_FADD32 [add %"PRIu32 +- " result %"PRIu32"]", add, *result); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return UCS_OK; +-} +- +-ucs_status_t uct_sm_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) +-{ +- uint32_t *ptr = (uint32_t *)(rkey + remote_addr); +- *result = ucs_atomic_swap32(ptr, swap); +- uct_sm_ep_trace_data(remote_addr, rkey, "ATOMIC_SWAP32 [swap %"PRIu32 +- " result %"PRIu32"]", swap, *result); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return UCS_OK; +-} +- + ucs_status_t uct_sm_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, + uint32_t swap, uint64_t remote_addr, + uct_rkey_t rkey, uint32_t *result, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.h +index 9940b3b07..78454fbbe 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/base/sm_ep.h +@@ -20,30 +20,25 @@ ucs_status_t uct_sm_ep_get_bcopy(uct_ep_h ep, uct_unpack_callback_t unpack_cb, + uint64_t remote_addr, uct_rkey_t rkey, + uct_completion_t *comp); + +-ucs_status_t uct_sm_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +-ucs_status_t uct_sm_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); +-ucs_status_t uct_sm_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp); + ucs_status_t uct_sm_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, + uint64_t swap, uint64_t remote_addr, + uct_rkey_t rkey, uint64_t *result, + uct_completion_t *comp); +- +-ucs_status_t uct_sm_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey); +-ucs_status_t uct_sm_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); +-ucs_status_t uct_sm_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp); + ucs_status_t uct_sm_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, + uint32_t swap, uint64_t remote_addr, + uct_rkey_t rkey, uint32_t *result, + uct_completion_t *comp); ++ucs_status_t uct_sm_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_sm_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); ++ucs_status_t uct_sm_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_sm_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); + + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/knem/knem_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/knem/knem_md.c +index 34f42e681..ba2865ccd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/knem/knem_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/knem/knem_md.c +@@ -9,6 +9,7 @@ + #include "knem_io.h" + + #include ++#include + + static ucs_config_field_t uct_knem_md_config_table[] = { + {"", "", NULL, +@@ -278,7 +279,8 @@ static uct_md_ops_t uct_knem_md_rcache_ops = { + + + static ucs_status_t uct_knem_rcache_mem_reg_cb(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *rregion) ++ void *arg, ucs_rcache_region_t *rregion, ++ uint16_t rcache_mem_reg_flags) + { + uct_knem_rcache_region_t *region = ucs_derived_of(rregion, uct_knem_rcache_region_t); + uct_knem_md_t *md = context; +@@ -286,7 +288,9 @@ static ucs_status_t uct_knem_rcache_mem_reg_cb(void *context, ucs_rcache_t *rcac + + return uct_knem_mem_reg_internal(&md->super, (void*)region->super.super.start, + region->super.super.end - region->super.super.start, +- *flags, 1, ®ion->key); ++ *flags, ++ rcache_mem_reg_flags & UCS_RCACHE_MEM_REG_HIDE_ERRORS, ++ ®ion->key); + } + + static void uct_knem_rcache_mem_dereg_cb(void *context, ucs_rcache_t *rcache, +@@ -346,6 +350,7 @@ static ucs_status_t uct_knem_md_open(const char *md_name, + rcache_params.region_struct_size = sizeof(uct_knem_rcache_region_t); + rcache_params.alignment = md_config->rcache.alignment; + rcache_params.max_alignment = ucs_get_page_size(); ++ rcache_params.ucm_events = UCM_EVENT_VM_UNMAPPED; + rcache_params.ucm_event_priority = md_config->rcache.event_prio; + rcache_params.context = knem_md; + rcache_params.ops = &uct_knem_rcache_ops; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.c +index 547ff838e..5d3699348 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.c +@@ -220,6 +220,7 @@ uct_mm_ep_am_common_send(unsigned is_short, uct_mm_ep_t *ep, uct_mm_iface_t *ifa + + UCT_CHECK_AM_ID(am_id); + ++retry: + head = ep->fifo_ctl->head; + /* check if there is room in the remote process's receive FIFO to write */ + if (!UCT_MM_EP_IS_ABLE_TO_SEND(head, ep->cached_tail, iface->config.fifo_size)) { +@@ -240,9 +241,9 @@ uct_mm_ep_am_common_send(unsigned is_short, uct_mm_ep_t *ep, uct_mm_iface_t *ifa + + status = uct_mm_ep_get_remote_elem(ep, head, &elem); + if (status != UCS_OK) { +- ucs_trace_poll("couldn't get an available FIFO element"); +- UCS_STATS_UPDATE_COUNTER(ep->super.stats, UCT_EP_STAT_NO_RES, 1); +- return status; ++ ucs_assert(status == UCS_ERR_NO_RESOURCE); ++ ucs_trace_poll("couldn't get an available FIFO element. retrying"); ++ goto retry; + } + + if (is_short) { +@@ -329,13 +330,15 @@ static inline int uct_mm_ep_has_tx_resources(uct_mm_ep_t *ep) + iface->config.fifo_size); + } + +-ucs_status_t uct_mm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n) ++ucs_status_t uct_mm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags) + { + uct_mm_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_mm_iface_t); + uct_mm_ep_t *ep = ucs_derived_of(tl_ep, uct_mm_ep_t); + + /* check if resources became available */ + if (uct_mm_ep_has_tx_resources(ep)) { ++ ucs_assert(ucs_arbiter_group_is_empty(&ep->arb_group)); + return UCS_ERR_BUSY; + } + +@@ -360,8 +363,7 @@ ucs_arbiter_cb_result_t uct_mm_ep_process_pending(ucs_arbiter_t *arbiter, + + /* update the local tail with its actual value from the remote peer + * making sure that the pending sends would use the real tail value */ +- ucs_memory_cpu_load_fence(); +- ep->cached_tail = ep->fifo_ctl->tail; ++ uct_mm_ep_update_cached_tail(ep); + + if (!uct_mm_ep_has_tx_resources(ep)) { + return UCS_ARBITER_CB_RESULT_RESCHED_GROUP; +@@ -417,10 +419,15 @@ ucs_status_t uct_mm_ep_flush(uct_ep_h tl_ep, unsigned flags, + { + uct_mm_ep_t *ep = ucs_derived_of(tl_ep, uct_mm_ep_t); + +- uct_mm_ep_update_cached_tail(ep); +- + if (!uct_mm_ep_has_tx_resources(ep)) { +- return UCS_ERR_NO_RESOURCE; ++ if (!ucs_arbiter_group_is_empty(&ep->arb_group)) { ++ return UCS_ERR_NO_RESOURCE; ++ } else { ++ uct_mm_ep_update_cached_tail(ep); ++ if (!uct_mm_ep_has_tx_resources(ep)) { ++ return UCS_ERR_NO_RESOURCE; ++ } ++ } + } + + ucs_memory_cpu_store_fence(); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.h +index e6e7d22f0..45b987907 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_ep.h +@@ -52,7 +52,8 @@ ssize_t uct_mm_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, uct_pack_callback_t pack_ + ucs_status_t uct_mm_ep_flush(uct_ep_h tl_ep, unsigned flags, + uct_completion_t *comp); + +-ucs_status_t uct_mm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n); ++ucs_status_t uct_mm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags); + + void uct_mm_ep_pending_purge(uct_ep_h ep, uct_pending_purge_callback_t cb, + void *arg); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_iface.c +index 632972861..09d1a05af 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_iface.c +@@ -117,14 +117,6 @@ static ucs_status_t uct_mm_iface_query(uct_iface_h tl_iface, + iface_attr->max_conn_priv = 0; + iface_attr->cap.flags = UCT_IFACE_FLAG_PUT_SHORT | + UCT_IFACE_FLAG_PUT_BCOPY | +- UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32 | + UCT_IFACE_FLAG_ATOMIC_CPU | + UCT_IFACE_FLAG_GET_BCOPY | + UCT_IFACE_FLAG_AM_SHORT | +@@ -135,6 +127,19 @@ static ucs_status_t uct_mm_iface_query(uct_iface_h tl_iface, + UCT_IFACE_FLAG_EVENT_RECV_SIG | + UCT_IFACE_FLAG_CONNECT_TO_IFACE; + ++ iface_attr->cap.atomic32.op_flags = ++ iface_attr->cap.atomic64.op_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ iface_attr->cap.atomic32.fop_flags = ++ iface_attr->cap.atomic64.fop_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ + iface_attr->latency.overhead = 80e-9; /* 80 ns */ + iface_attr->latency.growth = 0; + iface_attr->bandwidth = 6911 * 1024.0 * 1024.0; +@@ -302,14 +307,12 @@ static uct_iface_ops_t uct_mm_iface_ops = { + .ep_get_bcopy = uct_sm_ep_get_bcopy, + .ep_am_short = uct_mm_ep_am_short, + .ep_am_bcopy = uct_mm_ep_am_bcopy, +- .ep_atomic_add64 = uct_sm_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_sm_ep_atomic_fadd64, + .ep_atomic_cswap64 = uct_sm_ep_atomic_cswap64, +- .ep_atomic_swap64 = uct_sm_ep_atomic_swap64, +- .ep_atomic_add32 = uct_sm_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_sm_ep_atomic_fadd32, ++ .ep_atomic64_post = uct_sm_ep_atomic64_post, ++ .ep_atomic64_fetch = uct_sm_ep_atomic64_fetch, + .ep_atomic_cswap32 = uct_sm_ep_atomic_cswap32, +- .ep_atomic_swap32 = uct_sm_ep_atomic_swap32, ++ .ep_atomic32_post = uct_sm_ep_atomic32_post, ++ .ep_atomic32_fetch = uct_sm_ep_atomic32_fetch, + .ep_pending_add = uct_mm_ep_pending_add, + .ep_pending_purge = uct_mm_ep_pending_purge, + .ep_flush = uct_mm_ep_flush, +@@ -366,8 +369,8 @@ ucs_status_t uct_mm_allocate_fifo_mem(uct_mm_iface_t *iface, + size_to_alloc = UCT_MM_GET_FIFO_SIZE(iface); + + status = uct_mm_md_mapper_ops(md)->alloc(md, &size_to_alloc, config->hugetlb_mode, +- 0, &iface->shared_mem, &iface->fifo_mm_id, +- &iface->path UCS_MEMTRACK_NAME("mm fifo")); ++ 0, "mm fifo", &iface->shared_mem, ++ &iface->fifo_mm_id, &iface->path); + if (status != UCS_OK) { + ucs_error("Failed to allocate memory for the receive FIFO in mm. size: %zu : %m", + size_to_alloc); +@@ -461,6 +464,11 @@ static UCS_CLASS_INIT_FUNC(uct_mm_iface_t, uct_md_h md, uct_worker_h worker, + + ucs_trace_func("Creating an MM iface=%p worker=%p", self, worker); + ++ if (ucs_derived_of(worker, uct_priv_worker_t)->thread_mode == UCS_THREAD_MODE_MULTI) { ++ ucs_error("Shared memory transport does not support multi-threaded worker"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ + /* check that the fifo size, from the user, is a power of two and bigger than 1 */ + if ((mm_config->fifo_size <= 1) || ucs_is_pow2(mm_config->fifo_size) != 1) { + ucs_error("The MM FIFO size must be a power of two and bigger than 1."); +@@ -491,7 +499,7 @@ static UCS_CLASS_INIT_FUNC(uct_mm_iface_t, uct_md_h md, uct_worker_h worker, + (mm_config->fifo_size * mm_config->release_fifo_factor), + 1))); + self->fifo_mask = mm_config->fifo_size - 1; +- self->fifo_shift = ucs_count_zero_bits(mm_config->fifo_size); ++ self->fifo_shift = ucs_count_trailing_zero_bits(mm_config->fifo_size); + self->rx_headroom = params->rx_headroom; + self->release_desc.cb = uct_mm_iface_release_desc; + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.c +index e6942ff64..e46ff50df 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.c +@@ -23,7 +23,8 @@ ucs_config_field_t uct_mm_md_config_table[] = { + }; + + ucs_status_t uct_mm_mem_alloc(uct_md_h md, size_t *length_p, void **address_p, +- unsigned flags, uct_mem_h *memh_p UCS_MEMTRACK_ARG) ++ unsigned flags, const char *alloc_name, ++ uct_mem_h *memh_p) + { + ucs_status_t status; + uct_mm_seg_t *seg; +@@ -36,8 +37,8 @@ ucs_status_t uct_mm_mem_alloc(uct_md_h md, size_t *length_p, void **address_p, + + + status = uct_mm_md_mapper_ops(md)->alloc(md, length_p, UCS_TRY, flags, +- address_p, &seg->mmid, &seg->path +- UCS_MEMTRACK_VAL); ++ alloc_name, address_p, &seg->mmid, ++ &seg->path); + if (status != UCS_OK) { + ucs_free(seg); + return status; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.h +index d3557a15a..02b8b40a0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_md.h +@@ -49,8 +49,8 @@ typedef struct uct_mm_mapper_ops { + ucs_status_t (*dereg)(uct_mm_id_t mm_id); + + ucs_status_t (*alloc)(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, +- unsigned flags, void **address_p, uct_mm_id_t *mmid_p, +- const char **path_p UCS_MEMTRACK_ARG); ++ unsigned flags, const char *alloc_name, void **address_p, ++ uct_mm_id_t *mmid_p, const char **path_p); + + ucs_status_t (*attach)(uct_mm_id_t mmid, size_t length, + void *remote_address, void **address, uint64_t *cookie, +@@ -142,7 +142,8 @@ typedef struct uct_mm_md { + + + ucs_status_t uct_mm_mem_alloc(uct_md_h md, size_t *length_p, void **address_p, +- unsigned flags, uct_mem_h *memh_p UCS_MEMTRACK_ARG); ++ unsigned flags, const char *alloc_name, ++ uct_mem_h *memh_p); + + ucs_status_t uct_mm_mem_free(uct_md_h md, uct_mem_h memh); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_posix.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_posix.c +index 6d5ca90ac..278d397ed 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_posix.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_posix.c +@@ -250,8 +250,8 @@ out: + + static ucs_status_t + uct_posix_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, +- unsigned md_map_flags, void **address_p, uct_mm_id_t *mmid_p, +- const char **path_p UCS_MEMTRACK_ARG) ++ unsigned md_map_flags, const char *alloc_name, void **address_p, ++ uct_mm_id_t *mmid_p, const char **path_p) + { + ucs_status_t status; + int shm_fd = -1; +@@ -370,7 +370,8 @@ uct_posix_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, + goto out_ok; + } + +- ucs_debug("mm failed to allocate %zu bytes without hugetlb %m", *length_p); ++ ucs_debug("mm failed to allocate %zu bytes without hugetlb for %s: %m", ++ *length_p, alloc_name); + } + + err_shm_unlink: +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_sysv.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_sysv.c +index 1cffaf712..4bcb94be7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_sysv.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_sysv.c +@@ -27,8 +27,8 @@ static ucs_config_field_t uct_sysv_md_config_table[] = { + + static ucs_status_t + uct_sysv_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, +- unsigned md_map_flags, void **address_p, uct_mm_id_t *mmid_p, +- const char **path_p UCS_MEMTRACK_ARG) ++ unsigned md_map_flags, const char *alloc_name, void **address_p, ++ uct_mm_id_t *mmid_p, const char **path_p) + { + ucs_status_t status = UCS_ERR_NO_MEMORY; + int flags, shmid = 0; +@@ -47,7 +47,7 @@ uct_sysv_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, + + if (hugetlb != UCS_NO) { + status = ucs_sysv_alloc(length_p, (*length_p) * 2, address_p, +- flags | SHM_HUGETLB, &shmid UCS_MEMTRACK_VAL); ++ flags | SHM_HUGETLB, alloc_name, &shmid); + if (status == UCS_OK) { + goto out_ok; + } +@@ -56,8 +56,8 @@ uct_sysv_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, + } + + if (hugetlb != UCS_YES) { +- status = ucs_sysv_alloc(length_p, SIZE_MAX, address_p, flags , &shmid +- UCS_MEMTRACK_VAL); ++ status = ucs_sysv_alloc(length_p, SIZE_MAX, address_p, flags, alloc_name, ++ &shmid); + if (status == UCS_OK) { + goto out_ok; + } +@@ -66,7 +66,7 @@ uct_sysv_alloc(uct_md_h md, size_t *length_p, ucs_ternary_value_t hugetlb, + } + + err: +- ucs_error("failed to allocate %zu bytes with mm", *length_p); ++ ucs_error("failed to allocate %zu bytes with mm for %s", *length_p, alloc_name); + return status; + + out_ok: +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_xpmem.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_xpmem.c +index 4394d1750..f323a6611 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_xpmem.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/mm/mm_xpmem.c +@@ -147,9 +147,9 @@ static ucs_status_t uct_xpmem_detach(uct_mm_remote_seg_t *mm_desc) + + static ucs_status_t uct_xpmem_alloc(uct_md_h md, size_t *length_p, + ucs_ternary_value_t hugetlb, +- unsigned md_map_flags, void **address_p, +- uct_mm_id_t *mmid_p, const char **path_p +- UCS_MEMTRACK_ARG) ++ unsigned md_map_flags, const char *alloc_name, ++ void **address_p, uct_mm_id_t *mmid_p, ++ const char **path_p) + { + ucs_status_t status; + int mmap_flags; +@@ -170,11 +170,13 @@ static ucs_status_t uct_xpmem_alloc(uct_md_h md, size_t *length_p, + /* TBD: any ideas for better allocation */ + status = ucs_mmap_alloc(length_p, address_p, mmap_flags UCS_MEMTRACK_VAL); + if (status != UCS_OK) { +- ucs_error("Failed to allocate %zu bytes of memory", *length_p); ++ ucs_error("Failed to allocate %zu bytes of memory for %s", *length_p, ++ alloc_name); + goto out; + } + +- ucs_trace("xpmem allocated address %p length %zu", *address_p, *length_p); ++ ucs_trace("xpmem allocated address %p length %zu for %s", *address_p, ++ *length_p, alloc_name); + + status = uct_xmpem_reg(*address_p, *length_p, mmid_p); + if (UCS_OK != status) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.c +new file mode 100644 +index 000000000..889855964 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.c +@@ -0,0 +1,386 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#include "self.h" ++ ++#include ++#include ++#include ++#include ++#include "self.h" ++ ++ ++#define UCT_SELF_NAME "self" ++ ++#define UCT_SELF_IFACE_SEND_BUFFER_GET(_iface) \ ++ ({ /* use buffers from mpool to avoid buffer re-usage */ \ ++ /* till operation completes */ \ ++ void *ptr = ucs_mpool_get_inline(&(_iface)->msg_mp); \ ++ if (ucs_unlikely(ptr == NULL)) { \ ++ return UCS_ERR_NO_MEMORY; \ ++ } \ ++ ptr; \ ++ }) ++ ++ ++/* Forward declarations */ ++static uct_iface_ops_t uct_self_iface_ops; ++static uct_md_component_t uct_self_md; ++ ++ ++static ucs_status_t uct_self_iface_query(uct_iface_h tl_iface, uct_iface_attr_t *attr) ++{ ++ uct_self_iface_t *iface = ucs_derived_of(tl_iface, uct_self_iface_t); ++ ++ ucs_trace_func("iface=%p", iface); ++ memset(attr, 0, sizeof(*attr)); ++ ++ attr->iface_addr_len = sizeof(uct_self_iface_addr_t); ++ attr->device_addr_len = 0; ++ attr->ep_addr_len = 0; ++ attr->max_conn_priv = 0; ++ attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_AM_SHORT | ++ UCT_IFACE_FLAG_AM_BCOPY | ++ UCT_IFACE_FLAG_PUT_SHORT | ++ UCT_IFACE_FLAG_PUT_BCOPY | ++ UCT_IFACE_FLAG_GET_BCOPY | ++ UCT_IFACE_FLAG_ATOMIC_CPU | ++ UCT_IFACE_FLAG_PENDING | ++ UCT_IFACE_FLAG_CB_SYNC | ++ UCT_IFACE_FLAG_EP_CHECK; ++ ++ attr->cap.atomic32.op_flags = ++ attr->cap.atomic64.op_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ attr->cap.atomic32.fop_flags = ++ attr->cap.atomic64.fop_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ ++ attr->cap.put.max_short = UINT_MAX; ++ attr->cap.put.max_bcopy = SIZE_MAX; ++ attr->cap.put.min_zcopy = 0; ++ attr->cap.put.max_zcopy = 0; ++ attr->cap.put.opt_zcopy_align = 1; ++ attr->cap.put.align_mtu = attr->cap.put.opt_zcopy_align; ++ attr->cap.put.max_iov = 1; ++ ++ attr->cap.get.max_bcopy = SIZE_MAX; ++ attr->cap.get.min_zcopy = 0; ++ attr->cap.get.max_zcopy = 0; ++ attr->cap.get.opt_zcopy_align = 1; ++ attr->cap.get.align_mtu = attr->cap.get.opt_zcopy_align; ++ attr->cap.get.max_iov = 1; ++ ++ attr->cap.am.max_short = iface->send_size; ++ attr->cap.am.max_bcopy = iface->send_size; ++ attr->cap.am.min_zcopy = 0; ++ attr->cap.am.max_zcopy = 0; ++ attr->cap.am.opt_zcopy_align = 1; ++ attr->cap.am.align_mtu = attr->cap.am.opt_zcopy_align; ++ attr->cap.am.max_hdr = 0; ++ attr->cap.am.max_iov = 1; ++ ++ attr->latency.overhead = 0; ++ attr->latency.growth = 0; ++ attr->bandwidth = 6911 * 1024.0 * 1024.0; ++ attr->overhead = 10e-9; ++ attr->priority = 0; ++ ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_self_iface_get_address(uct_iface_h tl_iface, ++ uct_iface_addr_t *addr) ++{ ++ const uct_self_iface_t *iface = ucs_derived_of(tl_iface, uct_self_iface_t); ++ ++ *(uct_self_iface_addr_t*)addr = iface->id; ++ return UCS_OK; ++} ++ ++static int uct_self_iface_is_reachable(const uct_iface_h tl_iface, ++ const uct_device_addr_t *dev_addr, ++ const uct_iface_addr_t *iface_addr) ++{ ++ const uct_self_iface_t *iface = ucs_derived_of(tl_iface, uct_self_iface_t); ++ const uct_self_iface_addr_t *addr = (const uct_self_iface_addr_t*)iface_addr; ++ ++ return (addr != NULL) && (iface->id == *addr); ++} ++ ++static void uct_self_iface_sendrecv_am(uct_self_iface_t *iface, uint8_t am_id, ++ void *buffer, size_t length, const char *title) ++{ ++ ucs_status_t UCS_V_UNUSED status; ++ ++ uct_iface_trace_am(&iface->super, UCT_AM_TRACE_TYPE_SEND, am_id, ++ buffer, length, "TX: AM_%s", title); ++ uct_iface_trace_am(&iface->super, UCT_AM_TRACE_TYPE_RECV, am_id, ++ buffer, length, "RX: AM_%s", title); ++ ++ status = uct_iface_invoke_am(&iface->super, am_id, buffer, ++ length, 0); ++ ucs_assert(status == UCS_OK); ++ ucs_mpool_put_inline(buffer); ++} ++ ++static ucs_mpool_ops_t uct_self_iface_mpool_ops = { ++ .chunk_alloc = ucs_mpool_chunk_malloc, ++ .chunk_release = ucs_mpool_chunk_free, ++ .obj_init = NULL, ++ .obj_cleanup = NULL ++}; ++ ++static UCS_CLASS_DEFINE_DELETE_FUNC(uct_self_iface_t, uct_iface_t); ++ ++static UCS_CLASS_INIT_FUNC(uct_self_iface_t, uct_md_h md, uct_worker_h worker, ++ const uct_iface_params_t *params, ++ const uct_iface_config_t *tl_config) ++{ ++ ucs_status_t status; ++ ++ if (!(params->open_mode & UCT_IFACE_OPEN_MODE_DEVICE)) { ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ if (ucs_derived_of(worker, uct_priv_worker_t)->thread_mode == UCS_THREAD_MODE_MULTI) { ++ ucs_error("Self transport does not support multi-threaded worker"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ ++ if (strcmp(params->mode.device.dev_name, UCT_SELF_NAME) != 0) { ++ ucs_error("No device was found: %s", params->mode.device.dev_name); ++ return UCS_ERR_NO_DEVICE; ++ } ++ ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &uct_self_iface_ops, md, worker, ++ params, tl_config UCS_STATS_ARG(params->stats_root) ++ UCS_STATS_ARG(UCT_SELF_NAME)); ++ ++ self->id = ucs_generate_uuid((uintptr_t)self); ++ self->send_size = tl_config->max_bcopy; ++ ++ status = ucs_mpool_init(&self->msg_mp, 0, self->send_size, 0, ++ UCS_SYS_CACHE_LINE_SIZE, ++ 2, /* 2 elements are enough for most of communications */ ++ UINT_MAX, &uct_self_iface_mpool_ops, "self_msg_desc"); ++ ++ if (UCS_STATUS_IS_ERR(status)) { ++ return status; ++ } ++ ++ ucs_debug("created self iface id 0x%lx send_size %zu", self->id, ++ self->send_size); ++ return UCS_OK; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(uct_self_iface_t) ++{ ++ ucs_mpool_cleanup(&self->msg_mp, 1); ++} ++ ++UCS_CLASS_DEFINE(uct_self_iface_t, uct_base_iface_t); ++static UCS_CLASS_DEFINE_NEW_FUNC(uct_self_iface_t, uct_iface_t, uct_md_h, ++ uct_worker_h, const uct_iface_params_t*, ++ const uct_iface_config_t*); ++ ++static ucs_status_t uct_self_query_tl_resources(uct_md_h md, ++ uct_tl_resource_desc_t **resource_p, ++ unsigned *num_resources_p) ++{ ++ uct_tl_resource_desc_t *resource = 0; ++ ++ ucs_trace_func("md=%p", md); ++ ++ resource = ucs_calloc(1, sizeof(*resource), "resource desc"); ++ if (NULL == resource) { ++ ucs_error("Failed to allocate memory"); ++ return UCS_ERR_NO_MEMORY; ++ } ++ ++ ucs_snprintf_zero(resource->tl_name, sizeof(resource->tl_name), "%s", ++ UCT_SELF_NAME); ++ ucs_snprintf_zero(resource->dev_name, sizeof(resource->dev_name), "%s", ++ UCT_SELF_NAME); ++ resource->dev_type = UCT_DEVICE_TYPE_SELF; ++ ++ *num_resources_p = 1; ++ *resource_p = resource; ++ return UCS_OK; ++} ++ ++static UCS_CLASS_INIT_FUNC(uct_self_ep_t, uct_iface_t *tl_iface, ++ const uct_device_addr_t *dev_addr, ++ const uct_iface_addr_t *iface_addr) ++{ ++ uct_self_iface_t *iface = ucs_derived_of(tl_iface, uct_self_iface_t); ++ ++ UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &iface->super) ++ return UCS_OK; ++} ++ ++static UCS_CLASS_CLEANUP_FUNC(uct_self_ep_t) ++{ ++} ++ ++UCS_CLASS_DEFINE(uct_self_ep_t, uct_base_ep_t); ++UCS_CLASS_DEFINE_NEW_FUNC(uct_self_ep_t, uct_ep_t, uct_iface_t *, ++ const uct_device_addr_t *, const uct_iface_addr_t *); ++UCS_CLASS_DEFINE_DELETE_FUNC(uct_self_ep_t, uct_ep_t); ++ ++ ++ucs_status_t uct_self_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t header, ++ const void *payload, unsigned length) ++{ ++ uct_self_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_self_iface_t); ++ uct_self_ep_t UCS_V_UNUSED *ep = ucs_derived_of(tl_ep, uct_self_ep_t); ++ size_t total_length; ++ void *send_buffer; ++ ++ UCT_CHECK_AM_ID(id); ++ ++ total_length = length + sizeof(header); ++ UCT_CHECK_LENGTH(total_length, 0, iface->send_size, "am_short"); ++ ++ send_buffer = UCT_SELF_IFACE_SEND_BUFFER_GET(iface); ++ *(uint64_t*)send_buffer = header; ++ memcpy(send_buffer + sizeof(uint64_t), payload, length); ++ ++ UCT_TL_EP_STAT_OP(&ep->super, AM, SHORT, total_length); ++ uct_self_iface_sendrecv_am(iface, id, send_buffer, total_length, "SHORT"); ++ return UCS_OK; ++} ++ ++ssize_t uct_self_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, ++ uct_pack_callback_t pack_cb, void *arg, ++ unsigned flags) ++{ ++ uct_self_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_self_iface_t); ++ uct_self_ep_t UCS_V_UNUSED *ep = ucs_derived_of(tl_ep, uct_self_ep_t); ++ size_t length; ++ void *send_buffer; ++ ++ UCT_CHECK_AM_ID(id); ++ ++ send_buffer = UCT_SELF_IFACE_SEND_BUFFER_GET(iface); ++ length = pack_cb(send_buffer, arg); ++ ++ UCT_CHECK_LENGTH(length, 0, iface->send_size, "am_bcopy"); ++ UCT_TL_EP_STAT_OP(&ep->super, AM, BCOPY, length); ++ ++ uct_self_iface_sendrecv_am(iface, id, send_buffer, length, "BCOPY"); ++ return length; ++} ++ ++static uct_iface_ops_t uct_self_iface_ops = { ++ .ep_put_short = uct_sm_ep_put_short, ++ .ep_put_bcopy = uct_sm_ep_put_bcopy, ++ .ep_get_bcopy = uct_sm_ep_get_bcopy, ++ .ep_am_short = uct_self_ep_am_short, ++ .ep_am_bcopy = uct_self_ep_am_bcopy, ++ .ep_atomic_cswap64 = uct_sm_ep_atomic_cswap64, ++ .ep_atomic64_post = uct_sm_ep_atomic64_post, ++ .ep_atomic64_fetch = uct_sm_ep_atomic64_fetch, ++ .ep_atomic_cswap32 = uct_sm_ep_atomic_cswap32, ++ .ep_atomic32_post = uct_sm_ep_atomic32_post, ++ .ep_atomic32_fetch = uct_sm_ep_atomic32_fetch, ++ .ep_flush = uct_base_ep_flush, ++ .ep_fence = uct_base_ep_fence, ++ .ep_check = ucs_empty_function_return_success, ++ .ep_pending_add = ucs_empty_function_return_busy, ++ .ep_pending_purge = ucs_empty_function, ++ .ep_create_connected = UCS_CLASS_NEW_FUNC_NAME(uct_self_ep_t), ++ .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_self_ep_t), ++ .iface_flush = uct_base_iface_flush, ++ .iface_fence = uct_base_iface_fence, ++ .iface_progress_enable = ucs_empty_function, ++ .iface_progress_disable = ucs_empty_function, ++ .iface_progress = ucs_empty_function_return_zero, ++ .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_self_iface_t), ++ .iface_query = uct_self_iface_query, ++ .iface_get_device_address = ucs_empty_function_return_success, ++ .iface_get_address = uct_self_iface_get_address, ++ .iface_is_reachable = uct_self_iface_is_reachable ++}; ++ ++UCT_TL_COMPONENT_DEFINE(uct_self_tl, uct_self_query_tl_resources, uct_self_iface_t, ++ UCT_SELF_NAME, "SELF_", uct_iface_config_table, uct_iface_config_t); ++UCT_MD_REGISTER_TL(&uct_self_md, &uct_self_tl); ++ ++static ucs_status_t uct_self_md_query(uct_md_h md, uct_md_attr_t *attr) ++{ ++ /* Dummy memory registration provided. No real memory handling exists */ ++ attr->cap.flags = UCT_MD_FLAG_REG | ++ UCT_MD_FLAG_NEED_RKEY; /* TODO ignore rkey in rma/amo ops */ ++ attr->cap.reg_mem_types = UCS_BIT(UCT_MD_MEM_TYPE_HOST); ++ attr->cap.mem_type = UCT_MD_MEM_TYPE_HOST; ++ attr->cap.max_alloc = 0; ++ attr->cap.max_reg = ULONG_MAX; ++ attr->rkey_packed_size = 0; /* uct_md_query adds UCT_MD_COMPONENT_NAME_MAX to this */ ++ attr->reg_cost.overhead = 0; ++ attr->reg_cost.growth = 0; ++ memset(&attr->local_cpus, 0xff, sizeof(attr->local_cpus)); ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_self_query_md_resources(uct_md_resource_desc_t **resources_p, ++ unsigned *num_resources_p) ++{ ++ return uct_single_md_resource(&uct_self_md, resources_p, num_resources_p); ++} ++ ++static ucs_status_t uct_self_mem_reg(uct_md_h md, void *address, size_t length, ++ unsigned flags, uct_mem_h *memh_p) ++{ ++ /* We have to emulate memory registration. Return dummy pointer */ ++ *memh_p = (void *) 0xdeadbeef; ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_self_md_open(const char *md_name, const uct_md_config_t *md_config, ++ uct_md_h *md_p) ++{ ++ static uct_md_ops_t md_ops = { ++ .close = (void*)ucs_empty_function, ++ .query = uct_self_md_query, ++ .mkey_pack = ucs_empty_function_return_success, ++ .mem_reg = uct_self_mem_reg, ++ .mem_dereg = ucs_empty_function_return_success, ++ .is_mem_type_owned = (void *)ucs_empty_function_return_zero, ++ }; ++ static uct_md_t md = { ++ .ops = &md_ops, ++ .component = &uct_self_md ++ }; ++ ++ *md_p = &md; ++ return UCS_OK; ++} ++ ++static ucs_status_t uct_self_md_rkey_unpack(uct_md_component_t *mdc, ++ const void *rkey_buffer, uct_rkey_t *rkey_p, ++ void **handle_p) ++{ ++ /** ++ * Pseudo stub function for the key unpacking ++ * Need rkey == 0 due to work with same process to reuse uct_base_[put|get|atomic]* ++ */ ++ *rkey_p = 0; ++ *handle_p = NULL; ++ return UCS_OK; ++} ++ ++static UCT_MD_COMPONENT_DEFINE(uct_self_md, UCT_SELF_NAME, ++ uct_self_query_md_resources, uct_self_md_open, NULL, ++ uct_self_md_rkey_unpack, ++ ucs_empty_function_return_success, "SELF_", ++ uct_md_config_table, uct_md_config_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.h +new file mode 100644 +index 000000000..21c4bf9a7 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self.h +@@ -0,0 +1,30 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED. ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef UCT_SELF_H ++#define UCT_SELF_H ++ ++#include ++#include ++ ++ ++typedef uint64_t uct_self_iface_addr_t; ++ ++ ++typedef struct uct_self_iface { ++ uct_base_iface_t super; ++ uct_self_iface_addr_t id; /* Unique identifier for the instance */ ++ size_t send_size; /* Maximum size for payload */ ++ ucs_mpool_t msg_mp; /* Messages memory pool */ ++} uct_self_iface_t; ++ ++ ++typedef struct uct_self_ep { ++ uct_base_ep_t super; ++} uct_self_ep_t; ++ ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.c +deleted file mode 100644 +index d692f4127..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.c ++++ /dev/null +@@ -1,128 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#include "self_ep.h" +-#include "self_iface.h" +- +-static UCS_CLASS_INIT_FUNC(uct_self_ep_t, uct_iface_t *tl_iface, +- const uct_device_addr_t *dev_addr, +- const uct_iface_addr_t *iface_addr) +-{ +- uct_self_iface_t *local_iface = 0; +- +- ucs_trace_func("Creating an EP for loop-back transport self=%p", self); +- local_iface = ucs_derived_of(tl_iface, uct_self_iface_t); +- UCS_CLASS_CALL_SUPER_INIT(uct_base_ep_t, &local_iface->super) +- return UCS_OK; +-} +- +-static UCS_CLASS_CLEANUP_FUNC(uct_self_ep_t) +-{ +- ucs_trace_func("self=%p", self); +-} +- +-UCS_CLASS_DEFINE(uct_self_ep_t, uct_base_ep_t); +-UCS_CLASS_DEFINE_NEW_FUNC(uct_self_ep_t, uct_ep_t, uct_iface_t *, +- const uct_device_addr_t *, const uct_iface_addr_t *); +-UCS_CLASS_DEFINE_DELETE_FUNC(uct_self_ep_t, uct_ep_t); +- +-/** +- * Reserve the buffer and set the descriptor empty for later initialization +- * in case if UCS_ERR_NO_RESOURCE obtained from active message handler +- */ +-static void UCS_F_ALWAYS_INLINE uct_self_ep_am_reserve_buffer(uct_self_iface_t *self_iface, +- void *desc) +-{ +- uct_recv_desc(desc) = &self_iface->release_desc; +-} +- +-ucs_status_t uct_self_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t header, +- const void *payload, unsigned length) +-{ +- ucs_status_t status; +- uct_self_iface_t *self_iface = 0; +- uct_self_ep_t *self_ep = 0; +- void *desc = 0, *p_data = 0; +- unsigned total_length = 0; +- uct_recv_desc_t *cur_desc; +- +- self_ep = ucs_derived_of(tl_ep, uct_self_ep_t); +- self_iface = ucs_derived_of(self_ep->super.super.iface, uct_self_iface_t); +- total_length = length + sizeof(header); +- +- /* Send part */ +- UCT_CHECK_AM_ID(id); +- UCT_CHECK_LENGTH(total_length, 0, self_iface->data_length, "am_short"); +- UCT_TL_IFACE_GET_TX_DESC(&self_iface->super, &self_iface->msg_desc_mp, +- cur_desc, return UCS_ERR_NO_MEMORY); +- +- desc = cur_desc + 1; +- p_data = desc + self_iface->rx_headroom; +- *(typeof(header)*) p_data = header; +- memcpy(p_data + sizeof(header), payload, length); +- +- UCT_TL_EP_STAT_OP(&self_ep->super, AM, SHORT, total_length); +- uct_iface_trace_am(&self_iface->super, UCT_AM_TRACE_TYPE_SEND, id, p_data, +- total_length, "TX: AM_SHORT"); +- +- /* Receive part */ +- uct_iface_trace_am(&self_iface->super, UCT_AM_TRACE_TYPE_RECV, id, p_data, +- total_length, "RX: AM_SHORT"); +- status = uct_iface_invoke_am(&self_iface->super, id, p_data, total_length, +- UCT_CB_PARAM_FLAG_DESC); +- +- if (ucs_unlikely(UCS_INPROGRESS == status)) { +- uct_self_ep_am_reserve_buffer(self_iface, desc); +- status = UCS_OK; +- } else { +- UCT_TL_IFACE_PUT_DESC(cur_desc); +- } +- +- return status; +-} +- +-ssize_t uct_self_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, +- uct_pack_callback_t pack_cb, void *arg, +- unsigned flags) +-{ +- ucs_status_t status; +- uct_self_iface_t *self_iface = 0; +- uct_self_ep_t *self_ep = 0; +- void *desc = 0, *payload = 0; +- ssize_t length = 0; +- uct_recv_desc_t *cur_desc; +- +- self_ep = ucs_derived_of(tl_ep, uct_self_ep_t); +- self_iface = ucs_derived_of(self_ep->super.super.iface, uct_self_iface_t); +- +- /* Send part */ +- UCT_CHECK_AM_ID(id); +- UCT_TL_IFACE_GET_TX_DESC(&self_iface->super, &self_iface->msg_desc_mp, +- cur_desc, return UCS_ERR_NO_MEMORY); +- +- desc = cur_desc + 1; +- payload = desc + self_iface->rx_headroom; +- length = pack_cb(payload, arg); +- +- UCT_CHECK_LENGTH(length, 0, self_iface->data_length, "am_bcopy"); +- UCT_TL_EP_STAT_OP(&self_ep->super, AM, BCOPY, length); +- uct_iface_trace_am(&self_iface->super, UCT_AM_TRACE_TYPE_SEND, id, payload, +- length, "TX: AM_BCOPY"); +- +- /* Receive part */ +- uct_iface_trace_am(&self_iface->super, UCT_AM_TRACE_TYPE_RECV, id, payload, +- length, "RX: AM_BCOPY"); +- status = uct_iface_invoke_am(&self_iface->super, id, payload, length, +- UCT_CB_PARAM_FLAG_DESC); +- +- if (ucs_unlikely(UCS_INPROGRESS == status)) { +- uct_self_ep_am_reserve_buffer(self_iface, desc); +- status = UCS_OK; +- } else { +- UCT_TL_IFACE_PUT_DESC(cur_desc); +- } +- +- return length; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.h +deleted file mode 100644 +index de2813031..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_ep.h ++++ /dev/null +@@ -1,28 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#ifndef UCT_SELF_EP_H +-#define UCT_SELF_EP_H +- +-#include +- +- +-typedef struct uct_self_ep { +- uct_base_ep_t super; +-} uct_self_ep_t; +- +-UCS_CLASS_DECLARE_NEW_FUNC(uct_self_ep_t, uct_ep_t, uct_iface_t *, +- const uct_device_addr_t *, const uct_iface_addr_t *); +-UCS_CLASS_DECLARE_DELETE_FUNC(uct_self_ep_t, uct_ep_t); +- +-ucs_status_t uct_self_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t header, +- const void *payload, unsigned length); +-ssize_t uct_self_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, +- uct_pack_callback_t pack_cb, void *arg, +- unsigned flags); +- +-ucs_status_t uct_self_ep_check(uct_ep_h ep, unsigned flags, uct_completion_t *comp); +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.c +deleted file mode 100644 +index 6c81f2f96..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.c ++++ /dev/null +@@ -1,243 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#include "self_iface.h" +-#include "self_md.h" +-#include "self_ep.h" +- +-#include +-#include +-#include +- +- +-static ucs_config_field_t uct_self_iface_config_table[] = { +- {"", "", NULL, +- ucs_offsetof(uct_self_iface_config_t, super), +- UCS_CONFIG_TYPE_TABLE(uct_iface_config_table)}, +- +- UCT_IFACE_MPOOL_CONFIG_FIELDS("", 16384, 16, "", +- ucs_offsetof(uct_self_iface_config_t, mp), ""), +- +- {NULL} +-}; +- +-static ucs_status_t uct_self_iface_query(uct_iface_h iface, uct_iface_attr_t *attr) +-{ +- uct_self_iface_t *self_iface = ucs_derived_of(iface, uct_self_iface_t); +- +- ucs_trace_func("iface=%p", iface); +- memset(attr, 0, sizeof(*attr)); +- +- attr->iface_addr_len = sizeof(uct_self_iface_addr_t); +- attr->device_addr_len = 0; +- attr->ep_addr_len = 0; /* No UCT_IFACE_FLAG_CONNECT_TO_EP supported */ +- attr->max_conn_priv = 0; +- attr->cap.flags = UCT_IFACE_FLAG_CONNECT_TO_IFACE | +- UCT_IFACE_FLAG_AM_SHORT | +- UCT_IFACE_FLAG_AM_BCOPY | +- UCT_IFACE_FLAG_PUT_SHORT | +- UCT_IFACE_FLAG_PUT_BCOPY | +- UCT_IFACE_FLAG_GET_BCOPY | +- UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32 | +- UCT_IFACE_FLAG_ATOMIC_CPU | +- UCT_IFACE_FLAG_PENDING | +- UCT_IFACE_FLAG_CB_SYNC | +- UCT_IFACE_FLAG_EP_CHECK; +- +- attr->cap.put.max_short = UINT_MAX; +- attr->cap.put.max_bcopy = SIZE_MAX; +- attr->cap.put.min_zcopy = 0; +- attr->cap.put.max_zcopy = 0; +- attr->cap.put.opt_zcopy_align = UCS_SYS_CACHE_LINE_SIZE; +- attr->cap.put.align_mtu = attr->cap.put.opt_zcopy_align; +- attr->cap.put.max_iov = 1; +- +- attr->cap.get.max_bcopy = SIZE_MAX; +- attr->cap.get.min_zcopy = 0; +- attr->cap.get.max_zcopy = 0; +- attr->cap.get.opt_zcopy_align = UCS_SYS_CACHE_LINE_SIZE; +- attr->cap.get.align_mtu = attr->cap.get.opt_zcopy_align; +- attr->cap.get.max_iov = 1; +- +- attr->cap.am.max_short = self_iface->data_length; +- attr->cap.am.max_bcopy = self_iface->data_length; +- attr->cap.am.min_zcopy = 0; +- attr->cap.am.max_zcopy = 0; +- attr->cap.am.opt_zcopy_align = UCS_SYS_CACHE_LINE_SIZE; +- attr->cap.am.align_mtu = attr->cap.am.opt_zcopy_align; +- attr->cap.am.max_hdr = 0; +- attr->cap.am.max_iov = 1; +- +- attr->latency.overhead = 0; +- attr->latency.growth = 0; +- attr->bandwidth = 6911 * 1024.0 * 1024.0; +- attr->overhead = 10e-9; +- attr->priority = 0; +- +- return UCS_OK; +-} +- +-static ucs_status_t uct_self_iface_get_address(uct_iface_h iface, +- uct_iface_addr_t *addr) +-{ +- const uct_self_iface_t *self_iface = 0; +- +- ucs_trace_func("iface=%p", iface); +- self_iface = ucs_derived_of(iface, uct_self_iface_t); +- *(uct_self_iface_addr_t*)addr = self_iface->id; +- return UCS_OK; +-} +- +-static int uct_self_iface_is_reachable(const uct_iface_h iface, const uct_device_addr_t *dev_addr, +- const uct_iface_addr_t *iface_addr) +-{ +- const uct_self_iface_t *self_iface = NULL; +- const uct_self_iface_addr_t *self_addr = NULL; +- +- if (NULL == iface_addr) { +- return 0; +- } +- self_iface = ucs_derived_of(iface, uct_self_iface_t); +- self_addr = (const uct_self_iface_addr_t *) iface_addr; +- ucs_trace_func("iface=%p id=%lx addr=%lx", iface, self_iface->id, *self_addr); +- return self_iface->id == *self_addr; +-} +- +-static void uct_self_iface_release_desc(uct_recv_desc_t *self, void *desc) +-{ +- uct_recv_desc_t *self_desc = (uct_recv_desc_t *)desc - 1; +- ucs_mpool_put(self_desc); +-} +- +-static UCS_CLASS_DEFINE_DELETE_FUNC(uct_self_iface_t, uct_iface_t); +- +-static uct_iface_ops_t uct_self_iface_ops = { +- .ep_put_short = uct_sm_ep_put_short, +- .ep_put_bcopy = uct_sm_ep_put_bcopy, +- .ep_get_bcopy = uct_sm_ep_get_bcopy, +- .ep_am_short = uct_self_ep_am_short, +- .ep_am_bcopy = uct_self_ep_am_bcopy, +- .ep_atomic_add64 = uct_sm_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_sm_ep_atomic_fadd64, +- .ep_atomic_cswap64 = uct_sm_ep_atomic_cswap64, +- .ep_atomic_swap64 = uct_sm_ep_atomic_swap64, +- .ep_atomic_add32 = uct_sm_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_sm_ep_atomic_fadd32, +- .ep_atomic_cswap32 = uct_sm_ep_atomic_cswap32, +- .ep_atomic_swap32 = uct_sm_ep_atomic_swap32, +- .ep_flush = uct_base_ep_flush, +- .ep_fence = uct_base_ep_fence, +- .ep_check = ucs_empty_function_return_success, +- .ep_pending_add = ucs_empty_function_return_busy, +- .ep_pending_purge = ucs_empty_function, +- .ep_create_connected = UCS_CLASS_NEW_FUNC_NAME(uct_self_ep_t), +- .ep_destroy = UCS_CLASS_DELETE_FUNC_NAME(uct_self_ep_t), +- .iface_flush = uct_base_iface_flush, +- .iface_fence = uct_base_iface_fence, +- .iface_progress_enable = ucs_empty_function, +- .iface_progress_disable = ucs_empty_function, +- .iface_progress = ucs_empty_function_return_zero, +- .iface_close = UCS_CLASS_DELETE_FUNC_NAME(uct_self_iface_t), +- .iface_query = uct_self_iface_query, +- .iface_get_device_address = ucs_empty_function_return_success, +- .iface_get_address = uct_self_iface_get_address, +- .iface_is_reachable = uct_self_iface_is_reachable +-}; +- +-static UCS_CLASS_INIT_FUNC(uct_self_iface_t, uct_md_h md, uct_worker_h worker, +- const uct_iface_params_t *params, +- const uct_iface_config_t *tl_config) +-{ +- ucs_status_t status; +- uct_self_iface_config_t *self_config = 0; +- +- ucs_trace_func("Creating a loop-back transport self=%p rxh=%lu", +- self, params->rx_headroom); +- +- ucs_assert(params->open_mode & UCT_IFACE_OPEN_MODE_DEVICE); +- +- if (strcmp(params->mode.device.dev_name, UCT_SELF_NAME) != 0) { +- ucs_error("No device was found: %s", params->mode.device.dev_name); +- return UCS_ERR_NO_DEVICE; +- } +- +- UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &uct_self_iface_ops, md, worker, +- params, tl_config UCS_STATS_ARG(params->stats_root) +- UCS_STATS_ARG(UCT_SELF_NAME)); +- +- self_config = ucs_derived_of(tl_config, uct_self_iface_config_t); +- +- self->id = ucs_generate_uuid((uintptr_t)self); +- self->rx_headroom = params->rx_headroom; +- self->data_length = self_config->super.max_bcopy; +- self->release_desc.cb = uct_self_iface_release_desc; +- +- /* create a memory pool for data transferred */ +- status = uct_iface_mpool_init(&self->super, +- &self->msg_desc_mp, +- sizeof(uct_recv_desc_t) + self->rx_headroom + +- self->data_length, +- sizeof(uct_recv_desc_t) + self->rx_headroom, +- UCS_SYS_CACHE_LINE_SIZE, +- &self_config->mp, +- 256, +- ucs_empty_function, +- "self_msg_desc"); +- if (UCS_OK != status) { +- ucs_error("Failed to create a memory pool for the loop-back transport"); +- return status; +- } +- +- ucs_debug("Created a loop-back iface. id=0x%lx, len=%u, tx_hdr=%lu", +- self->id, self->data_length, self->rx_headroom); +- return UCS_OK; +-} +- +-static UCS_CLASS_CLEANUP_FUNC(uct_self_iface_t) +-{ +- ucs_trace_func("self=%p", self); +- +- ucs_mpool_cleanup(&self->msg_desc_mp, 1); +-} +- +-UCS_CLASS_DEFINE(uct_self_iface_t, uct_base_iface_t); +-static UCS_CLASS_DEFINE_NEW_FUNC(uct_self_iface_t, uct_iface_t, uct_md_h, +- uct_worker_h, const uct_iface_params_t*, +- const uct_iface_config_t*); +- +-static ucs_status_t uct_self_query_tl_resources(uct_md_h md, +- uct_tl_resource_desc_t **resource_p, +- unsigned *num_resources_p) +-{ +- uct_tl_resource_desc_t *resource = 0; +- +- ucs_trace_func("md=%p", md); +- resource = ucs_calloc(1, sizeof(*resource), "resource desc"); +- if (NULL == resource) { +- ucs_error("Failed to allocate memory"); +- return UCS_ERR_NO_MEMORY; +- } +- +- ucs_snprintf_zero(resource->tl_name, sizeof(resource->tl_name), "%s", +- UCT_SELF_NAME); +- ucs_snprintf_zero(resource->dev_name, sizeof(resource->dev_name), "%s", +- UCT_SELF_NAME); +- resource->dev_type = UCT_DEVICE_TYPE_SELF; +- +- *num_resources_p = 1; +- *resource_p = resource; +- return UCS_OK; +-} +- +-UCT_TL_COMPONENT_DEFINE(uct_self_tl, uct_self_query_tl_resources, uct_self_iface_t, +- UCT_SELF_NAME, "SELF_", uct_self_iface_config_table, uct_self_iface_config_t); +-UCT_MD_REGISTER_TL(&uct_self_md, &uct_self_tl); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.h +deleted file mode 100644 +index 772692707..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_iface.h ++++ /dev/null +@@ -1,30 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#ifndef UCT_SELF_IFACE_H +-#define UCT_SELF_IFACE_H +- +-#include +-#include +- +-typedef uint64_t uct_self_iface_addr_t; +- +-typedef struct uct_self_iface { +- uct_base_iface_t super; +- uct_self_iface_addr_t id; /* Unique identifier for the instance */ +- size_t rx_headroom; /* User data size precedes payload */ +- unsigned data_length; /* Maximum size for payload */ +- uct_recv_desc_t release_desc; /* Callback to desc release func */ +- ucs_mpool_t msg_desc_mp; /* Messages memory pool */ +-} UCS_V_ALIGNED(UCS_SYS_CACHE_LINE_SIZE) uct_self_iface_t; +- +-typedef struct uct_self_iface_config { +- uct_iface_config_t super; +- uct_iface_mpool_config_t mp; +-} uct_self_iface_config_t; +- +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.c +deleted file mode 100644 +index 01641b4dd..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.c ++++ /dev/null +@@ -1,76 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#include "self_md.h" +- +- +-static ucs_status_t uct_self_md_query(uct_md_h md, uct_md_attr_t *attr) +-{ +- /* Dummy memory registration provided. No real memory handling exists */ +- attr->cap.flags = UCT_MD_FLAG_REG | +- UCT_MD_FLAG_NEED_RKEY; /* TODO ignore rkey in rma/amo ops */ +- attr->cap.reg_mem_types = UCS_BIT(UCT_MD_MEM_TYPE_HOST); +- attr->cap.mem_type = UCT_MD_MEM_TYPE_HOST; +- attr->cap.max_alloc = 0; +- attr->cap.max_reg = ULONG_MAX; +- attr->rkey_packed_size = 0; /* uct_md_query adds UCT_MD_COMPONENT_NAME_MAX to this */ +- attr->reg_cost.overhead = 0; +- attr->reg_cost.growth = 0; +- memset(&attr->local_cpus, 0xff, sizeof(attr->local_cpus)); +- return UCS_OK; +-} +- +-static ucs_status_t uct_self_query_md_resources(uct_md_resource_desc_t **resources_p, +- unsigned *num_resources_p) +-{ +- return uct_single_md_resource(&uct_self_md, resources_p, num_resources_p); +-} +- +-static ucs_status_t uct_self_mem_reg(uct_md_h md, void *address, size_t length, +- unsigned flags, uct_mem_h *memh_p) +-{ +- /* We have to emulate memory registration. Return dummy pointer */ +- *memh_p = (void *) 0xdeadbeef; +- return UCS_OK; +-} +- +-static ucs_status_t uct_self_md_open(const char *md_name, const uct_md_config_t *md_config, +- uct_md_h *md_p) +-{ +- static uct_md_ops_t md_ops = { +- .close = (void*)ucs_empty_function, +- .query = uct_self_md_query, +- .mkey_pack = ucs_empty_function_return_success, +- .mem_reg = uct_self_mem_reg, +- .mem_dereg = ucs_empty_function_return_success, +- .is_mem_type_owned = (void *)ucs_empty_function_return_zero, +- }; +- static uct_md_t md = { +- .ops = &md_ops, +- .component = &uct_self_md +- }; +- +- *md_p = &md; +- return UCS_OK; +-} +-/** +- * Pseudo stub function for the key unpacking +- * Need rkey == 0 due to work with same process to reuse uct_base_[put|get|atomic]* +- */ +-static ucs_status_t uct_self_md_rkey_unpack(uct_md_component_t *mdc, +- const void *rkey_buffer, uct_rkey_t *rkey_p, +- void **handle_p) +-{ +- *rkey_p = 0; +- *handle_p = NULL; +- return UCS_OK; +-} +- +-UCT_MD_COMPONENT_DEFINE(uct_self_md, UCT_SELF_NAME, +- uct_self_query_md_resources, uct_self_md_open, NULL, +- uct_self_md_rkey_unpack, +- ucs_empty_function_return_success, "SELF_", +- uct_md_config_table, uct_md_config_t); +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.h +deleted file mode 100644 +index c2ee021d7..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/sm/self/self_md.h ++++ /dev/null +@@ -1,16 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#ifndef UCT_SELF_MD_H +-#define UCT_SELF_MD_H +- +-#include +- +-#define UCT_SELF_NAME "self" +- +-extern uct_md_component_t uct_self_md; +- +- +-#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp.h +index a355e2929..4d8aff87b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp.h +@@ -120,7 +120,8 @@ ssize_t uct_tcp_ep_am_bcopy(uct_ep_h uct_ep, uint8_t am_id, + uct_pack_callback_t pack_cb, void *arg, + unsigned flags); + +-ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req); ++ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req, ++ unsigned flags); + + void uct_tcp_ep_pending_purge(uct_ep_h tl_ep, uct_pending_purge_callback_t cb, + void *arg); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_ep.c +index 0268b39eb..b03815080 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_ep.c +@@ -209,6 +209,8 @@ unsigned uct_tcp_ep_progress_rx(uct_tcp_ep_t *ep) + + /* Receive next chunk of data */ + recv_length = iface->config.buf_size - ep->length; ++ ucs_assertv(recv_length > 0, "ep=%p", ep); ++ + status = uct_tcp_recv(ep->fd, ep->buf + ep->length, &recv_length); + if (status != UCS_OK) { + if (status == UCS_ERR_CANCELED) { +@@ -225,6 +227,8 @@ unsigned uct_tcp_ep_progress_rx(uct_tcp_ep_t *ep) + /* Parse received active messages */ + while ((remainder = ep->length - ep->offset) >= sizeof(*hdr)) { + hdr = ep->buf + ep->offset; ++ ucs_assert(hdr->length <= (iface->config.buf_size - sizeof(uct_tcp_am_hdr_t))); ++ + if (remainder < sizeof(*hdr) + hdr->length) { + break; + } +@@ -272,6 +276,9 @@ ssize_t uct_tcp_ep_am_bcopy(uct_ep_h uct_ep, uint8_t am_id, + hdr->length = packed_length = pack_cb(hdr + 1, arg); + ep->length = sizeof(*hdr) + packed_length; + ++ UCT_CHECK_LENGTH(hdr->length, 0, ++ iface->config.buf_size - sizeof(uct_tcp_am_hdr_t), ++ "am_bcopy"); + UCT_TL_EP_STAT_OP(&ep->super, AM, BCOPY, hdr->length); + uct_iface_trace_am(&iface->super, UCT_AM_TRACE_TYPE_SEND, hdr->am_id, + hdr + 1, hdr->length, "SEND fd %d", ep->fd); +@@ -284,7 +291,8 @@ ssize_t uct_tcp_ep_am_bcopy(uct_ep_h uct_ep, uint8_t am_id, + return packed_length; + } + +-ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req) ++ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req, ++ unsigned flags) + { + uct_tcp_ep_t *ep = ucs_derived_of(tl_ep, uct_tcp_ep_t); + +@@ -314,7 +322,6 @@ ucs_status_t uct_tcp_ep_flush(uct_ep_h tl_ep, unsigned flags, + return UCS_ERR_NO_RESOURCE; + } + +- ucs_assert(ucs_queue_is_empty(&ep->pending_q)); + UCT_TL_EP_STAT_FLUSH(&ep->super); + return UCS_OK; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_iface.c +index e0bfe8a8b..68f0e49e5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_iface.c +@@ -173,6 +173,14 @@ static ucs_status_t uct_tcp_iface_flush(uct_iface_h tl_iface, unsigned flags, + return UCS_OK; + } + ++static void uct_tcp_iface_listen_close(uct_tcp_iface_t *iface) ++{ ++ if (iface->listen_fd != -1) { ++ close(iface->listen_fd); ++ iface->listen_fd = -1; ++ } ++} ++ + static void uct_tcp_iface_connect_handler(int listen_fd, void *arg) + { + uct_tcp_iface_t *iface = arg; +@@ -189,6 +197,7 @@ static void uct_tcp_iface_connect_handler(int listen_fd, void *arg) + if (fd < 0) { + if ((errno != EAGAIN) && (errno != EINTR)) { + ucs_error("accept() failed: %m"); ++ uct_tcp_iface_listen_close(iface); + } + return; + } +@@ -275,6 +284,11 @@ static UCS_CLASS_INIT_FUNC(uct_tcp_iface_t, uct_md_h md, uct_worker_h worker, + self->sockopt.sndbuf = config->sockopt_sndbuf; + ucs_list_head_init(&self->ep_list); + ++ if (ucs_derived_of(worker, uct_priv_worker_t)->thread_mode == UCS_THREAD_MODE_MULTI) { ++ ucs_error("TCP transport does not support multi-threaded worker"); ++ return UCS_ERR_INVALID_PARAM; ++ } ++ + status = uct_tcp_netif_inaddr(self->if_name, &self->config.ifaddr, + &self->config.netmask); + if (status != UCS_OK) { +@@ -366,7 +380,7 @@ static UCS_CLASS_CLEANUP_FUNC(uct_tcp_iface_t) + uct_tcp_ep_destroy(&ep->super.super); + } + +- close(self->listen_fd); ++ uct_tcp_iface_listen_close(self); + close(self->epfd); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_net.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_net.c +index a82138899..4aaf88055 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_net.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/tcp/tcp_net.c +@@ -45,10 +45,12 @@ ucs_status_t uct_tcp_netif_caps(const char *if_name, double *latency_p, + ucs_status_t status; + struct ifreq ifr; + size_t mtu, ll_headers; ++ int speed_known; + short ether_type; + + memset(&ifr, 0, sizeof(ifr)); + ++ speed_known = 0; + edata.cmd = ETHTOOL_GSET; + ifr.ifr_data = (void*)&edata; + status = ucs_netif_ioctl(if_name, SIOCETHTOOL, &ifr); +@@ -59,15 +61,15 @@ ucs_status_t uct_tcp_netif_caps(const char *if_name, double *latency_p, + speed_mbps = edata.speed; + #endif + #if HAVE_DECL_SPEED_UNKNOWN +- if (speed_mbps == SPEED_UNKNOWN) { ++ speed_known = speed_mbps != SPEED_UNKNOWN; + #else +- if ((speed_mbps == 0) || ((uint16_t)speed_mbps == (uint16_t)-1)) { ++ speed_known = (speed_mbps != 0) && ((uint16_t)speed_mbps != (uint16_t)-1); + #endif +- ucs_error("speed of %s is UNKNOWN", if_name); +- return UCS_ERR_NO_DEVICE; +- } +- } else { +- speed_mbps = 100; /* Default value if SIOCETHTOOL is not supported */ ++ } ++ ++ if (!speed_known) { ++ speed_mbps = 100; ++ ucs_debug("speed of %s is UNKNOWN, assuming %d Mbps", if_name, speed_mbps); + } + + status = ucs_netif_ioctl(if_name, SIOCGIFHWADDR, &ifr); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_def.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_def.h +index 88701e8bf..c3e9720e0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_def.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_def.h +@@ -60,7 +60,7 @@ if (uct_ugni_check_lock_needed(_cdm)) { \ + } + #else + #define uct_ugni_cdm_init_lock(x) UCS_OK +-#define uct_ugni_cdm_destroy_lock(x) UCS_OK ++#define uct_ugni_cdm_destroy_lock(x) {} + #define uct_ugni_cdm_lock(x) + #define uct_ugni_cdm_unlock(x) + #define uct_ugni_check_lock_needed(x) 0 +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_device.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_device.c +index 7795f6f8e..251065291 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_device.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_device.c +@@ -27,7 +27,7 @@ typedef struct uct_ugni_job_info { + int pmi_rank_id; /**< rank id assigned by PMI */ + int num_devices; /**< Number of devices */ + uct_ugni_device_t devices[UCT_UGNI_MAX_DEVICES]; /**< Array of devices */ +- bool initialized; /**< Info status */ ++ int initialized; /**< Info status */ + } uct_ugni_job_info_t; + + static uct_ugni_job_info_t job_info = { +@@ -36,7 +36,7 @@ static uct_ugni_job_info_t job_info = { + .pmi_num_of_ranks = 0, + .pmi_rank_id = 0, + .num_devices = -1, +- .initialized = false, ++ .initialized = 0, + }; + + uint32_t ugni_domain_counter = 0; +@@ -168,7 +168,7 @@ static ucs_status_t uct_ugni_fetch_pmi() + ucs_debug("PMI cookie %d", job_info.cookie); + + /* Context and domain is activated */ +- job_info.initialized = true; ++ job_info.initialized = 1; + ucs_debug("UGNI job info was activated"); + return UCS_OK; + } +@@ -447,12 +447,8 @@ ucs_status_t uct_ugni_create_md_cdm(uct_ugni_cdm_t *cdm) + ucs_status_t uct_ugni_destroy_cdm(uct_ugni_cdm_t *cdm) + { + gni_return_t ugni_rc; +- ucs_status_t status; + +- status = uct_ugni_cdm_destroy_lock(cdm); +- if (UCS_OK != status) { +- ucs_error("Couldn't destroy cdm lock."); +- } ++ uct_ugni_cdm_destroy_lock(cdm); + + ucs_trace_func("cdm=%p", cdm); + ugni_rc = GNI_CdmDestroy(cdm->cdm_handle); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.c +index 51d588af4..71125e20f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.c +@@ -12,7 +12,8 @@ + SGLIB_DEFINE_LIST_FUNCTIONS(uct_ugni_ep_t, uct_ugni_ep_compare, next); + SGLIB_DEFINE_HASHED_CONTAINER_FUNCTIONS(uct_ugni_ep_t, UCT_UGNI_HASH_SIZE, uct_ugni_ep_hash); + +-ucs_status_t uct_ugni_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n){ ++ucs_status_t uct_ugni_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags){ + uct_ugni_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_iface_t); + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.h +index 53ddb247a..52743ddd6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_ep.h +@@ -35,7 +35,8 @@ UCS_CLASS_DECLARE_DELETE_FUNC(uct_ugni_ep_t, uct_ep_t); + uct_ugni_ep_t *uct_ugni_iface_lookup_ep(uct_ugni_iface_t *iface, uintptr_t hash_key); + ucs_status_t ugni_connect_ep(uct_ugni_iface_t *iface, const uct_devaddr_ugni_t *dev_addr, + const uct_sockaddr_ugni_t *iface_addr, uct_ugni_ep_t *ep); +-ucs_status_t uct_ugni_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n); ++ucs_status_t uct_ugni_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags); + void uct_ugni_ep_pending_purge(uct_ep_h tl_ep, uct_pending_purge_callback_t cb, + void *arg); + ucs_arbiter_cb_result_t uct_ugni_ep_process_pending(ucs_arbiter_t *arbiter, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_types.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_types.h +index 5c2f7ec0e..23e1447f8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_types.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/base/ugni_types.h +@@ -11,7 +11,6 @@ + #include + #include + #include +-#include + + typedef struct uct_ugni_device { + gni_nic_device_t type; /**< Device type */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.c +index 63994f8e5..486e5b527 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.c +@@ -243,51 +243,6 @@ static void uct_ugni_amo_unpack64(uct_completion_t *self, ucs_status_t status) + uct_ugni_invoke_orig_comp(fma, status); + } + +-ucs_status_t uct_ugni_ep_atomic_add64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey) +-{ +- uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); +- uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +- uct_ugni_rdma_fetch_desc_t *fma; +- +- UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, +- return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC_ADD, +- add, 0, NULL, remote_addr, +- rkey, LEN_64, ep, NULL, NULL, NULL); +- ucs_trace_data("Posting AMO ADD, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, add, +- (void *)fma->super.desc.remote_addr, +- fma->super.desc.remote_mem_hndl.qword1, +- fma->super.desc.remote_mem_hndl.qword2); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return uct_ugni_post_fma(iface, ep, &fma->super, UCS_OK); +-} +- +-ucs_status_t uct_ugni_ep_atomic_fadd64(uct_ep_h tl_ep, uint64_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) +-{ +- uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); +- uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +- uct_ugni_rdma_fetch_desc_t *fma; +- +- UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, +- return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC_FADD, +- add, 0, fma + 1, remote_addr, +- rkey, LEN_64, ep, comp, uct_ugni_amo_unpack64, (void *)result); +- ucs_trace_data("Posting AMO FADD, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, add, +- (void *)fma->super.desc.remote_addr, +- fma->super.desc.remote_mem_hndl.qword1, +- fma->super.desc.remote_mem_hndl.qword2); +- UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); +-} +- + ucs_status_t uct_ugni_ep_atomic_cswap64(uct_ep_h tl_ep, uint64_t compare, uint64_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint64_t *result, uct_completion_t *comp) +@@ -321,9 +276,9 @@ static void uct_ugni_amo_unpack32(uct_completion_t *self, ucs_status_t status) + uct_ugni_invoke_orig_comp(fma, status); + } + +-ucs_status_t uct_ugni_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint64_t *result, uct_completion_t *comp) ++ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -331,12 +286,12 @@ ucs_status_t uct_ugni_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FSWAP, +- swap, 0, fma + 1, remote_addr, +- rkey, LEN_64, ep, comp, uct_ugni_amo_unpack64, (void *)result); +- ucs_trace_data("Posting AMO SWAP, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, swap, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FCSWAP_S, ++ (uint64_t)compare, (uint64_t)swap, fma + 1, remote_addr, ++ rkey, LEN_32, ep, comp, uct_ugni_amo_unpack32, (void *)result); ++ ucs_trace_data("Posting AMO CSWAP, GNI_PostFma of size %"PRIx64" value" ++ "%"PRIx32" compare %"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", ++ fma->super.desc.length, swap, compare, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); +@@ -344,8 +299,9 @@ ucs_status_t uct_ugni_ep_atomic_swap64(uct_ep_h tl_ep, uint64_t swap, + return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); + } + +-ucs_status_t uct_ugni_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey) ++ucs_status_t uct_ugni_ep_atomic_op32(uct_ep_h tl_ep, uint32_t op, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ gni_fma_cmd_type_t op_type, char *op_str) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -353,12 +309,12 @@ ucs_status_t uct_ugni_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_IADD_S, +- (uint64_t)add, 0, NULL, remote_addr, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, op_type, ++ (uint64_t)op, 0, NULL, remote_addr, + rkey, LEN_32, ep, NULL, NULL, NULL); +- ucs_trace_data("Posting AMO ADD, GNI_PostFma of size %"PRIx64" value" ++ ucs_trace_data("Posting AMO %s, GNI_PostFma of size %"PRIx64" value" + "%"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, add, ++ op_str, fma->super.desc.length, op, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); +@@ -366,9 +322,31 @@ ucs_status_t uct_ugni_ep_atomic_add32(uct_ep_h tl_ep, uint32_t add, + return uct_ugni_post_fma(iface, ep, &fma->super, UCS_OK); + } + +-ucs_status_t uct_ugni_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_ugni_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_ugni_ep_atomic_op32(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC2_IADD_S, "ADD"); ++ case UCT_ATOMIC_OP_XOR: ++ return uct_ugni_ep_atomic_op32(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC2_XOR_S, "XOR"); ++ case UCT_ATOMIC_OP_AND: ++ return uct_ugni_ep_atomic_op32(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC2_AND_S, "AND"); ++ case UCT_ATOMIC_OP_OR: ++ return uct_ugni_ep_atomic_op32(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC2_OR_S, "OR"); ++ default: ++ ucs_assertv(0, "incorrect opcode for atomic: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++} ++ ++ucs_status_t uct_ugni_ep_atomic_op64(uct_ep_h tl_ep, uint64_t op, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ gni_fma_cmd_type_t op_type, char *op_str) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -376,22 +354,45 @@ ucs_status_t uct_ugni_ep_atomic_fadd32(uct_ep_h tl_ep, uint32_t add, + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FIADD_S, +- (uint64_t)add, 0, fma + 1, remote_addr, +- rkey, LEN_32, ep, comp, uct_ugni_amo_unpack32, (void *)result); +- ucs_trace_data("Posting AMO FADD, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, add, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, op_type, ++ op, 0, NULL, remote_addr, ++ rkey, LEN_64, ep, NULL, NULL, NULL); ++ ucs_trace_data("Posting AMO %s, GNI_PostFma of size %"PRIx64" value" ++ "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", ++ op_str, fma->super.desc.length, op, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); + UCT_TL_EP_STAT_ATOMIC(ucs_derived_of(tl_ep, uct_base_ep_t)); +- return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); ++ return uct_ugni_post_fma(iface, ep, &fma->super, UCS_OK); ++} ++ ++ucs_status_t uct_ugni_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_ugni_ep_atomic_op64(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC_ADD, "ADD"); ++ case UCT_ATOMIC_OP_XOR: ++ return uct_ugni_ep_atomic_op64(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC_XOR, "XOR"); ++ case UCT_ATOMIC_OP_AND: ++ return uct_ugni_ep_atomic_op64(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC_AND, "AND"); ++ case UCT_ATOMIC_OP_OR: ++ return uct_ugni_ep_atomic_op64(ep, value, remote_addr, rkey, ++ GNI_FMA_ATOMIC_OR, "OR"); ++ default: ++ ucs_assertv(0, "incorrect opcode for atomic: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } + } + +-ucs_status_t uct_ugni_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, +- uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ucs_status_t uct_ugni_ep_atomic_fop64(uct_ep_h tl_ep, uint64_t op, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint64_t *result, uct_completion_t *comp, ++ gni_fma_cmd_type_t op_type, char *op_str) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -399,12 +400,12 @@ ucs_status_t uct_ugni_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FSWAP_S, +- (uint64_t)swap, 0, fma + 1, remote_addr, +- rkey, LEN_32, ep, comp, uct_ugni_amo_unpack64, (void *)result); +- ucs_trace_data("Posting AMO SWAP, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, swap, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, op_type, ++ op, 0, fma + 1, remote_addr, ++ rkey, LEN_64, ep, comp, uct_ugni_amo_unpack64, (void *)result); ++ ucs_trace_data("Posting AMO %s, GNI_PostFma of size %"PRIx64" value" ++ "%"PRIx64" to %p, with [%"PRIx64" %"PRIx64"]", ++ op_str, fma->super.desc.length, op, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); +@@ -412,9 +413,37 @@ ucs_status_t uct_ugni_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, + return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); + } + +-ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, ++ucs_status_t uct_ugni_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, + uint64_t remote_addr, uct_rkey_t rkey, +- uint32_t *result, uct_completion_t *comp) ++ uct_completion_t *comp) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC_FADD, "FADD"); ++ case UCT_ATOMIC_OP_SWAP: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FSWAP, "FSWAP"); ++ case UCT_ATOMIC_OP_XOR: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC_FXOR, "FXOR"); ++ case UCT_ATOMIC_OP_AND: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC_FAND, "FAND"); ++ case UCT_ATOMIC_OP_OR: ++ return uct_ugni_ep_atomic_fop64(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC_FOR, "FOR"); ++ default: ++ ucs_assertv(0, "incorrect opcode for atomic: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++} ++ ++ucs_status_t uct_ugni_ep_atomic_fop32(uct_ep_h tl_ep, uint32_t op, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uint32_t *result, uct_completion_t *comp, ++ gni_fma_cmd_type_t op_type, char *op_str) + { + uct_ugni_ep_t *ep = ucs_derived_of(tl_ep, uct_ugni_ep_t); + uct_ugni_rdma_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_rdma_iface_t); +@@ -422,12 +451,12 @@ ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32 + + UCT_TL_IFACE_GET_TX_DESC(&iface->super.super, &iface->free_desc_famo, fma, + return UCS_ERR_NO_RESOURCE); +- uct_ugni_format_fma_amo(fma, GNI_POST_AMO, GNI_FMA_ATOMIC2_FCSWAP_S, +- (uint64_t)compare, (uint64_t)swap, fma + 1, remote_addr, ++ uct_ugni_format_fma_amo(fma, GNI_POST_AMO, op_type, ++ (uint64_t)op, 0, fma + 1, remote_addr, + rkey, LEN_32, ep, comp, uct_ugni_amo_unpack32, (void *)result); +- ucs_trace_data("Posting AMO CSWAP, GNI_PostFma of size %"PRIx64" value" +- "%"PRIx32" compare %"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", +- fma->super.desc.length, swap, compare, ++ ucs_trace_data("Posting AMO %s, GNI_PostFma of size %"PRIx64" value" ++ "%"PRIx32" to %p, with [%"PRIx64" %"PRIx64"]", ++ op_str, fma->super.desc.length, op, + (void *)fma->super.desc.remote_addr, + fma->super.desc.remote_mem_hndl.qword1, + fma->super.desc.remote_mem_hndl.qword2); +@@ -435,6 +464,33 @@ ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32 + return uct_ugni_post_fma(iface, ep, &fma->super, UCS_INPROGRESS); + } + ++ucs_status_t uct_ugni_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) ++{ ++ switch (opcode) { ++ case UCT_ATOMIC_OP_ADD: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FIADD_S, "ADD"); ++ case UCT_ATOMIC_OP_SWAP: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FSWAP_S, "SWAP"); ++ case UCT_ATOMIC_OP_XOR: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FXOR_S, "XOR"); ++ case UCT_ATOMIC_OP_AND: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FAND_S, "AND"); ++ case UCT_ATOMIC_OP_OR: ++ return uct_ugni_ep_atomic_fop32(ep, value, remote_addr, rkey, result, comp, ++ GNI_FMA_ATOMIC2_FOR_S, "OR"); ++ default: ++ ucs_assertv(0, "incorrect opcode for atomic: %d", opcode); ++ return UCS_ERR_UNSUPPORTED; ++ } ++} ++ + static void uct_ugni_unalign_fma_get_cb(uct_completion_t *self, ucs_status_t status) + { + uct_ugni_rdma_fetch_desc_t *fma = (uct_ugni_rdma_fetch_desc_t *) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.h +index 1466ad9d8..a8711b892 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_ep.h +@@ -45,6 +45,18 @@ ucs_status_t uct_ugni_ep_atomic_swap32(uct_ep_h tl_ep, uint32_t swap, + ucs_status_t uct_ugni_ep_atomic_cswap32(uct_ep_h tl_ep, uint32_t compare, uint32_t swap, + uint64_t remote_addr, uct_rkey_t rkey, + uint32_t *result, uct_completion_t *comp); ++ucs_status_t uct_ugni_ep_atomic64_post(uct_ep_h ep, unsigned opcode, uint64_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_ugni_ep_atomic32_post(uct_ep_h ep, unsigned opcode, uint32_t value, ++ uint64_t remote_addr, uct_rkey_t rkey); ++ucs_status_t uct_ugni_ep_atomic64_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); ++ucs_status_t uct_ugni_ep_atomic32_fetch(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp); + ucs_status_t uct_ugni_ep_get_bcopy(uct_ep_h tl_ep, + uct_unpack_callback_t unpack_cb, + void *arg, size_t length, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_iface.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_iface.c +index a07bdce51..77a395ef5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_iface.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/rdma/ugni_rdma_iface.c +@@ -62,22 +62,39 @@ static ucs_status_t uct_ugni_rdma_iface_query(uct_iface_h tl_iface, uct_iface_at + iface_attr->cap.flags = UCT_IFACE_FLAG_PUT_SHORT | + UCT_IFACE_FLAG_PUT_BCOPY | + UCT_IFACE_FLAG_PUT_ZCOPY | +- UCT_IFACE_FLAG_ATOMIC_CSWAP64 | +- UCT_IFACE_FLAG_ATOMIC_FADD64 | +- UCT_IFACE_FLAG_ATOMIC_ADD64 | +- UCT_IFACE_FLAG_ATOMIC_DEVICE | + UCT_IFACE_FLAG_GET_BCOPY | + UCT_IFACE_FLAG_GET_ZCOPY | + UCT_IFACE_FLAG_CONNECT_TO_IFACE | ++ UCT_IFACE_FLAG_ATOMIC_DEVICE | + UCT_IFACE_FLAG_PENDING; + ++ iface_attr->cap.atomic64.op_flags = UCS_BIT(UCT_ATOMIC_OP_ADD)| ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ ++ iface_attr->cap.atomic64.fop_flags = UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); ++ ++ + if (uct_ugni_check_device_type(&iface->super, GNI_DEVICE_ARIES)) { +- iface_attr->cap.flags |= UCT_IFACE_FLAG_PUT_SHORT | +- UCT_IFACE_FLAG_ATOMIC_SWAP64 | +- UCT_IFACE_FLAG_ATOMIC_SWAP32 | +- UCT_IFACE_FLAG_ATOMIC_FADD32 | +- UCT_IFACE_FLAG_ATOMIC_ADD32 | +- UCT_IFACE_FLAG_ATOMIC_CSWAP32; ++ iface_attr->cap.flags |= UCT_IFACE_FLAG_PUT_SHORT; ++ ++ iface_attr->cap.atomic64.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_SWAP); ++ iface_attr->cap.atomic32.op_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR); ++ iface_attr->cap.atomic32.fop_flags |= UCS_BIT(UCT_ATOMIC_OP_ADD) | ++ UCS_BIT(UCT_ATOMIC_OP_AND) | ++ UCS_BIT(UCT_ATOMIC_OP_OR) | ++ UCS_BIT(UCT_ATOMIC_OP_XOR) | ++ UCS_BIT(UCT_ATOMIC_OP_SWAP) | ++ UCS_BIT(UCT_ATOMIC_OP_CSWAP); + } + iface_attr->overhead = 80e-9; /* 80 ns */ + iface_attr->latency.overhead = 900e-9; /* 900 ns */ +@@ -169,14 +186,12 @@ static uct_iface_ops_t uct_ugni_aries_rdma_iface_ops = { + .ep_get_bcopy = uct_ugni_ep_get_bcopy, + .ep_get_zcopy = uct_ugni_ep_get_zcopy, + .ep_am_short = uct_ugni_ep_am_short, +- .ep_atomic_add64 = uct_ugni_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_ugni_ep_atomic_fadd64, + .ep_atomic_cswap64 = uct_ugni_ep_atomic_cswap64, +- .ep_atomic_swap64 = uct_ugni_ep_atomic_swap64, +- .ep_atomic_add32 = uct_ugni_ep_atomic_add32, +- .ep_atomic_fadd32 = uct_ugni_ep_atomic_fadd32, + .ep_atomic_cswap32 = uct_ugni_ep_atomic_cswap32, +- .ep_atomic_swap32 = uct_ugni_ep_atomic_swap32, ++ .ep_atomic64_post = uct_ugni_ep_atomic64_post, ++ .ep_atomic32_post = uct_ugni_ep_atomic32_post, ++ .ep_atomic64_fetch = uct_ugni_ep_atomic64_fetch, ++ .ep_atomic32_fetch = uct_ugni_ep_atomic32_fetch, + .ep_pending_add = uct_ugni_ep_pending_add, + .ep_pending_purge = uct_ugni_ep_pending_purge, + .ep_flush = uct_ugni_ep_flush, +@@ -202,8 +217,6 @@ static uct_iface_ops_t uct_ugni_gemini_rdma_iface_ops = { + .ep_get_bcopy = uct_ugni_ep_get_bcopy, + .ep_get_zcopy = uct_ugni_ep_get_zcopy, + .ep_am_short = uct_ugni_ep_am_short, +- .ep_atomic_add64 = uct_ugni_ep_atomic_add64, +- .ep_atomic_fadd64 = uct_ugni_ep_atomic_fadd64, + .ep_atomic_cswap64 = uct_ugni_ep_atomic_cswap64, + .ep_pending_add = uct_ugni_ep_pending_add, + .ep_pending_purge = uct_ugni_ep_pending_purge, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.c b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.c +index aa2ffe274..99c31f460 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.c +@@ -11,10 +11,11 @@ + + #define uct_ugni_udt_can_send(_ep) ((uct_ugni_ep_can_send(&_ep->super)) && (_ep->posted_desc == NULL)) + +-ucs_status_t uct_ugni_udt_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n) ++ucs_status_t uct_ugni_udt_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags) + { + uct_ugni_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_ugni_iface_t); +- ucs_status_t status = uct_ugni_ep_pending_add(tl_ep, n); ++ ucs_status_t status = uct_ugni_ep_pending_add(tl_ep, n, flags); + + if (UCS_OK == status) { + uct_worker_progress_add_safe(iface->super.worker, uct_ugni_udt_progress, +diff --git a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.h b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.h +index 05559e77b..48d11de38 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/src/uct/ugni/udt/ugni_udt_ep.h +@@ -29,7 +29,8 @@ ucs_status_t uct_ugni_udt_ep_am_short(uct_ep_h tl_ep, uint8_t id, uint64_t heade + ssize_t uct_ugni_udt_ep_am_bcopy(uct_ep_h tl_ep, uint8_t id, + uct_pack_callback_t pack_cb, void *arg, + unsigned flags); +-ucs_status_t uct_ugni_udt_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n); ++ucs_status_t uct_ugni_udt_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *n, ++ unsigned flags); + ucs_arbiter_cb_result_t uct_ugni_udt_ep_process_pending(ucs_arbiter_t *arbiter, + ucs_arbiter_elem_t *elem, + void *arg); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/apps/Makefile.am +index b4ea0552c..4341b5659 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/apps/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/Makefile.am +@@ -6,23 +6,28 @@ + # See file LICENSE for terms. + # + ++if HAVE_CXX11 ++SUBDIRS = sockaddr ++endif ++ + noinst_PROGRAMS = \ + test_dlopen + + + objdir = $(shell sed -n -e 's/^objdir=\(.*\)$$/\1/p' $(LIBTOOL)) + +-test_dlopen_SOURCES = dlopen.c ++test_dlopen_SOURCES = test_dlopen.c + test_dlopen_CPPFLAGS = $(BASE_CPPFLAGS) -g -DUCP_LIB_PATH=$(abs_top_builddir)/src/ucp/$(objdir)/libucp.so + test_dlopen_CFLAGS = $(BASE_CFLAGS) + test_dlopen_LDADD = -ldl + +-if HAVE_PROFILING +-noinst_PROGRAMS += \ +- test_profiling +- +-test_profiling_SOURCES = profiling.c +-test_profiling_LDADD = $(top_builddir)/src/ucs/libucs.la -lm +-test_profiling_CPPFLAGS = $(BASE_CPPFLAGS) -g -I$(top_srcdir)/src +-test_profiling_CFLAGS = $(BASE_CFLAGS) ++if HAVE_TCMALLOC ++noinst_PROGRAMS += test_tcmalloc ++test_tcmalloc_SOURCES = test_tcmalloc.c ++test_tcmalloc_CPPFLAGS = $(BASE_CPPFLAGS) -g \ ++ -I$(abs_top_builddir)/src \ ++ -I$(abs_top_srcdir)/src ++test_tcmalloc_CFLAGS = $(BASE_CFLAGS) ++test_tcmalloc_LDADD = -ldl $(TCMALLOC_LIB) \ ++ $(top_builddir)/src/ucp/libucp.la + endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/Makefile.am +new file mode 100644 +index 000000000..7ce7a019f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/Makefile.am +@@ -0,0 +1,23 @@ ++# ++# Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++# ++# See file LICENSE for terms. ++# ++ ++noinst_PROGRAMS = sa ++ ++noinst_HEADERS = \ ++ sa_base.h \ ++ sa_tcp.h \ ++ sa_util.h ++ ++sa_CXXFLAGS = \ ++ -std=c++11 -g -Wall -Werror ++ ++sa_CPPFLAGS = $(BASE_CPPFLAGS) ++ ++sa_SOURCES = \ ++ sa_base.cc \ ++ sa_main.cc \ ++ sa_tcp.cc \ ++ sa_util.cc +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.cc b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.cc +new file mode 100644 +index 000000000..dfb7389ff +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.cc +@@ -0,0 +1,37 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "sa_base.h" ++#include "sa_tcp.h" ++#include "sa_util.h" ++ ++#include ++ ++ ++connection::~connection() { ++} ++ ++void connection::set_id(uint64_t id) { ++ m_id = id; ++} ++ ++uint64_t connection::id() const { ++ return m_id; ++} ++ ++worker::~worker() { ++} ++ ++std::shared_ptr worker::make(const std::string& mode, ++ const struct sockaddr *listen_addr, ++ socklen_t addrlen) ++{ ++ if (mode == "tcp") { ++ return std::make_shared(listen_addr, addrlen); ++ } else { ++ throw error("invalid mode: " + mode); ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.h b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.h +new file mode 100644 +index 000000000..531f044d8 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_base.h +@@ -0,0 +1,68 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef SA_BASE_H_ ++#define SA_BASE_H_ ++ ++#include "sa_util.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++/* interface for classes which generate events */ ++class event_source { ++public: ++ virtual void add_to_evpoll(evpoll_set& evpoll) = 0; ++}; ++ ++ ++/* one data connection */ ++class connection : public event_source { ++public: ++ virtual ~connection(); ++ ++ virtual size_t send(const char *buffer, size_t size) = 0; ++ ++ virtual size_t recv(char *buffer, size_t size) = 0; ++ ++ virtual bool is_closed() const = 0; ++ ++ uint64_t id() const; ++ ++protected: ++ void set_id(uint64_t id); ++ ++private: ++ uint64_t m_id; ++}; ++ ++typedef std::shared_ptr conn_ptr_t; ++ ++ ++/* communication context */ ++class worker : public event_source { ++public: ++ typedef std::function conn_handler_t; ++ typedef std::function data_handler_t; ++ ++ virtual ~worker(); ++ ++ virtual conn_ptr_t connect(const struct sockaddr *addr, socklen_t addrlen) = 0; ++ ++ virtual void wait(const evpoll_set& evpoll, conn_handler_t conn_handler, ++ data_handler_t data_handler, int timeout_ms) = 0; ++ ++ /* factory function to create workers of given type */ ++ static std::shared_ptr make(const std::string& mode, ++ const struct sockaddr *listen_addr, ++ socklen_t addrlen); ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_main.cc b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_main.cc +new file mode 100644 +index 000000000..57ccf8814 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_main.cc +@@ -0,0 +1,420 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "sa_base.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++class application { ++public: ++ class usage_exception : public error { ++ public: ++ usage_exception(const std::string& message = ""); ++ }; ++ ++ application(int argc, char **argv); ++ ++ int run(); ++ ++ static void usage(const std::string& error); ++ ++private: ++ typedef struct { ++ std::string hostname; ++ int port; ++ } dest_t; ++ ++ typedef std::vector dest_vec_t; ++ ++ enum connection_type { ++ CONNECTION_CLIENT, ++ CONNECTION_SERVER ++ }; ++ ++ struct params { ++ params() : port(0), ++ total_conns(1000), ++ conn_ratio(1.5), ++ request_size(32), ++ response_size(1024) { ++ } ++ ++ std::string mode; ++ int port; ++ int total_conns; ++ double conn_ratio; ++ size_t request_size; ++ size_t response_size; ++ dest_vec_t dests; ++ }; ++ ++ struct connection_state { ++ conn_ptr_t conn_ptr; ++ connection_type conn_type; ++ size_t bytes_sent; ++ size_t bytes_recvd; ++ std::string send_data; ++ std::string recv_data; ++ }; ++ ++ typedef std::shared_ptr conn_state_ptr_t; ++ typedef std::map conn_map_t; ++ ++ void parse_hostfile(const std::string& filename); ++ ++ void initiate_connections(); ++ ++ int max_conns_inflight() const; ++ ++ void create_worker(); ++ ++ void add_connection(conn_ptr_t conn_ptr, connection_type conn_type); ++ ++ conn_ptr_t connect(const dest_t& dst); ++ ++ void advance_connection(conn_state_ptr_t s, uint32_t events); ++ ++ void connection_completed(conn_state_ptr_t s); ++ ++ static void pton(const dest_t& dst, struct sockaddr_storage& saddr, ++ socklen_t &addrlen); ++ ++ template ++ friend typename O::__basic_ostream& operator<<(O& os, connection_type conn_type); ++ ++ params m_params; ++ std::shared_ptr m_worker; ++ evpoll_set m_evpoll; ++ conn_map_t m_connections; ++ int m_num_conns_inflight; ++ int m_num_conns_started; ++}; ++ ++ ++application::usage_exception::usage_exception(const std::string& message) : ++ error(message) { ++}; ++ ++application::application(int argc, char **argv) : m_num_conns_inflight(0), ++ m_num_conns_started(0) { ++ int c; ++ ++ while ( (c = getopt(argc, argv, "p:f:m:r:n:S:s:vh")) != -1 ) { ++ switch (c) { ++ case 'p': ++ m_params.port = atoi(optarg); ++ break; ++ case 'f': ++ parse_hostfile(optarg); ++ break; ++ case 'm': ++ m_params.mode = optarg; ++ break; ++ case 'r': ++ m_params.conn_ratio = atof(optarg); ++ break; ++ case 'n': ++ m_params.total_conns = atoi(optarg); ++ break; ++ case 'S': ++ m_params.request_size = atoi(optarg); ++ break; ++ case 's': ++ m_params.response_size = atoi(optarg); ++ break; ++ case 'v': ++ log::more_verbose(); ++ break; ++ default: ++ throw usage_exception(); ++ } ++ } ++ ++ if (m_params.mode.empty()) { ++ throw usage_exception("missing mode argument"); ++ } ++ ++ if (m_params.dests.empty()) { ++ throw usage_exception("no remote destinations specified"); ++ } ++ ++ if (m_params.port == 0) { ++ throw usage_exception("local port not specified"); ++ } ++} ++ ++int application::run() { ++ LOG_INFO << "starting application with " ++ << max_conns_inflight() << " simultaneous connections, " ++ << m_params.total_conns << " total"; ++ ++ create_worker(); ++ ++ while ((m_num_conns_started > m_params.total_conns) || !m_connections.empty()) { ++ initiate_connections(); ++ m_worker->wait(m_evpoll, ++ [this](conn_ptr_t conn) { ++ LOG_DEBUG << "accepted new connection"; ++ add_connection(conn, CONNECTION_SERVER); ++ }, ++ [this](uint64_t conn_id, uint32_t events) { ++ LOG_DEBUG << "new event on connection id " ++ << conn_id << " events " ++ << ((events & EPOLLIN ) ? "i" : "") ++ << ((events & EPOLLOUT) ? "o" : "") ++ << ((events & EPOLLERR) ? "e" : "") ++ ; ++ advance_connection(m_connections.at(conn_id), events); ++ }, ++ -1); ++ } ++ ++ LOG_INFO << "all connections completed"; ++ ++ m_worker.reset(); ++ return 0; ++} ++ ++void application::create_worker() { ++ struct sockaddr_in inaddr_any; ++ memset(&inaddr_any, 0, sizeof(inaddr_any)); ++ inaddr_any.sin_family = AF_INET; ++ inaddr_any.sin_port = htons(m_params.port); ++ inaddr_any.sin_addr.s_addr = INADDR_ANY; ++ ++ m_worker = worker::make(m_params.mode, reinterpret_cast(&inaddr_any), ++ sizeof(inaddr_any)); ++ m_worker->add_to_evpoll(m_evpoll); ++} ++ ++std::shared_ptr application::connect(const dest_t& dst) { ++ struct sockaddr_storage saddr; ++ socklen_t addrlen; ++ pton(dst, saddr, addrlen); ++ return m_worker->connect(reinterpret_cast(&saddr), ++ addrlen); ++} ++ ++template ++typename O::__basic_ostream& operator<<(O& os, application::connection_type conn_type) { ++ switch (conn_type) { ++ case application::CONNECTION_CLIENT: ++ return os << "client"; ++ case application::CONNECTION_SERVER: ++ return os << "server"; ++ default: ++ return os; ++ } ++} ++ ++void application::add_connection(conn_ptr_t conn_ptr, connection_type conn_type) { ++ auto s = std::make_shared(); ++ s->conn_type = conn_type; ++ s->conn_ptr = conn_ptr; ++ s->bytes_sent = 0; ++ s->bytes_recvd = 0; ++ ++ switch (s->conn_type) { ++ case CONNECTION_CLIENT: ++ s->send_data.assign(m_params.request_size, 'r'); ++ s->recv_data.resize(m_params.response_size); ++ break; ++ case CONNECTION_SERVER: ++ s->send_data.resize(m_params.response_size); ++ s->recv_data.resize(m_params.request_size); ++ break; ++ } ++ ++ LOG_DEBUG << "add " << conn_type << " connection with id " << conn_ptr->id(); ++ conn_ptr->add_to_evpoll(m_evpoll); ++ m_connections[conn_ptr->id()] = s; ++ advance_connection(s, 0); ++} ++ ++void application::initiate_connections() { ++ int max = max_conns_inflight(); ++ while ((m_num_conns_started < m_params.total_conns) && (m_num_conns_inflight < max)) { ++ /* coverity[dont_call] */ ++ const dest_t& dest = m_params.dests[::rand() % m_params.dests.size()]; ++ ++m_num_conns_started; ++ ++m_num_conns_inflight; ++ LOG_DEBUG << "connecting to " << dest.hostname << ":" << dest.port; ++ add_connection(connect(dest), CONNECTION_CLIENT); ++ } ++} ++ ++int application::max_conns_inflight() const { ++ return m_params.conn_ratio * m_params.dests.size() + 0.5; ++} ++ ++void application::advance_connection(conn_state_ptr_t s, uint32_t events) { ++ LOG_DEBUG << "advance " << s->conn_type << " connection id " << s->conn_ptr->id() ++ << " total sent " << s->bytes_sent << ", received " << s->bytes_recvd; ++ switch (s->conn_type) { ++ case CONNECTION_CLIENT: ++ if (s->bytes_sent < m_params.request_size) { ++ /* more data should be sent */ ++ size_t nsent = s->conn_ptr->send(&s->send_data[s->bytes_sent], ++ m_params.request_size - s->bytes_sent); ++ LOG_DEBUG << "sent " << nsent << " bytes on connection id " ++ << s->conn_ptr->id(); ++ s->bytes_sent += nsent; ++ } ++ if (events & EPOLLIN) { ++ size_t nrecv = s->conn_ptr->recv(&s->recv_data[s->bytes_recvd], ++ m_params.response_size - s->bytes_recvd); ++ LOG_DEBUG << "received " << nrecv << " bytes on connection id " ++ << s->conn_ptr->id(); ++ s->bytes_recvd += nrecv; ++ } ++ if (s->bytes_recvd == m_params.response_size) { ++ connection_completed(s); ++ } ++ break; ++ case CONNECTION_SERVER: ++ if (events & EPOLLIN) { ++ size_t nrecv = s->conn_ptr->recv(&s->recv_data[s->bytes_recvd], ++ m_params.request_size - s->bytes_recvd); ++ LOG_DEBUG << "received " << nrecv << " bytes on connection id " ++ << s->conn_ptr->id(); ++ s->bytes_recvd += nrecv; ++ } ++ if ((s->bytes_recvd == m_params.request_size) && ++ (s->bytes_sent < m_params.response_size)) { ++ /* more data should be sent */ ++ size_t nsent = s->conn_ptr->send(&s->send_data[s->bytes_sent], ++ m_params.response_size - s->bytes_sent); ++ LOG_DEBUG << "sent " << nsent << " bytes on connection id " ++ << s->conn_ptr->id(); ++ s->bytes_sent += nsent; ++ } ++ if (s->conn_ptr->is_closed()) { ++ connection_completed(s); ++ } ++ break; ++ } ++} ++ ++void application::connection_completed(conn_state_ptr_t s) { ++ LOG_DEBUG << "completed " << s->conn_type << " connection id " << s->conn_ptr->id(); ++ m_connections.erase(s->conn_ptr->id()); ++ --m_num_conns_inflight; ++} ++ ++void application::pton(const dest_t& dst, struct sockaddr_storage& saddr, ++ socklen_t &addrlen) { ++ ++ struct hostent *he = gethostbyname(dst.hostname.c_str()); ++ if (he == NULL || he->h_addr_list == NULL) { ++ throw error("host " + dst.hostname + " not found: "+ hstrerror(h_errno)); ++ } ++ ++ memset(&saddr, 0, sizeof(saddr)); ++ saddr.ss_family = he->h_addrtype; ++ ++ void *addr; ++ int addr_datalen = 0; ++ switch (saddr.ss_family) { ++ case AF_INET: ++ reinterpret_cast(&saddr)->sin_port = ++ htons(dst.port); ++ addr = &reinterpret_cast(&saddr)->sin_addr; ++ addrlen = sizeof(struct sockaddr_in); ++ addr_datalen = sizeof(struct in_addr); ++ break; ++ case AF_INET6: ++ reinterpret_cast(&saddr)->sin6_port = ++ htons(dst.port); ++ addr = &reinterpret_cast(&saddr)->sin6_addr; ++ addrlen = sizeof(struct sockaddr_in6); ++ addr_datalen = sizeof(struct in6_addr); ++ break; ++ default: ++ throw error("unsupported address family"); ++ } ++ ++ if (he->h_length != addr_datalen) { ++ throw error("mismatching address length"); ++ } ++ ++ memcpy(addr, he->h_addr_list[0], addr_datalen); ++} ++ ++void application::usage(const std::string& error) { ++ if (!error.empty()) { ++ std::cout << "Error: " << error << std::endl; ++ std::cout << std::endl; ++ } ++ ++ params defaults; ++ std::cout << "Usage: ./sa [ options ]" << std::endl; ++ std::cout << "Options:" << std::endl; ++ std::cout << " -m Application mode (tcp)" << std::endl; ++ std::cout << " -p Local port number to listen on" << std::endl; ++ std::cout << " -f File with list of hosts and ports to connect to" << std::endl; ++ std::cout << " Each line in the file is formatter as follows:" << std::endl; ++ std::cout << "
" << std::endl; ++ std::cout << " -r How many in-flight connection to hold as multiple" << std::endl; ++ std::cout << " of number of possible destinations (" << defaults.conn_ratio << ")" << std::endl; ++ std::cout << " -n How many total exchanges to perform (" << defaults.total_conns << ")" << std::endl; ++ std::cout << " -S Request message size, in bytes (" << defaults.request_size << ")" << std::endl; ++ std::cout << " -s Response message size, in bytes (" << defaults.response_size << ")" << std::endl; ++ std::cout << " -v Increase verbosity level (may be specified several times)" << std::endl; ++} ++ ++void application::parse_hostfile(const std::string& filename) { ++ std::ifstream f(filename.c_str()); ++ if (!f) { ++ throw error("failed to open '" + filename + "'"); ++ } ++ ++ /* ++ * Each line in the file contains 2 whitespace-separated tokens: host-name ++ * and port number. ++ */ ++ std::string line; ++ int lineno = 1; ++ while (std::getline(f, line)) { ++ std::stringstream ss(line); ++ if (line.empty()) { ++ continue; ++ } ++ ++ dest_t dest; ++ if ((ss >> dest.hostname) && (ss >> dest.port)) { ++ m_params.dests.push_back(dest); ++ } else { ++ std::stringstream errss; ++ errss << "syntax error in file '" << filename << "' line " << lineno << ++ " near `" << line << "'"; ++ throw error(errss.str()); ++ } ++ ++lineno; ++ } ++} ++ ++int main(int argc, char **argv) ++{ ++ try { ++ application app(argc, argv); ++ return app.run(); ++ } catch (application::usage_exception& e) { ++ application::usage(e.what()); ++ return -127; ++ } catch (error& e) { ++ std::cerr << "Error: " << e.what() << std::endl; ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.cc b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.cc +new file mode 100644 +index 000000000..7d15776f3 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.cc +@@ -0,0 +1,127 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "sa_tcp.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++tcp_socket::tcp_socket() : file_desc(create_socket()) { ++} ++ ++tcp_socket::tcp_socket(int fd) : file_desc(fd) { ++} ++ ++tcp_socket::~tcp_socket() { ++} ++ ++int tcp_socket::create_socket() { ++ int fd = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ++ if (fd < 0) { ++ throw sys_error("failed to create tcp socket", errno); ++ } ++ return fd; ++} ++ ++tcp_connection::tcp_connection(const struct sockaddr *addr, socklen_t addrlen) : ++ m_is_closed(false) { ++ initialize(); ++ int ret = ::connect(m_socket, addr, addrlen); ++ if ((ret < 0) && (errno != EINPROGRESS)) { ++ throw sys_error("failed to connect tcp socket", errno); ++ } ++} ++ ++tcp_connection::tcp_connection(int fd) : m_socket(fd), m_is_closed(false) { ++ initialize(); ++} ++ ++void tcp_connection::initialize() { ++ int ret = fcntl(m_socket, F_SETFL, fcntl(m_socket, F_GETFL) | O_NONBLOCK); ++ if (ret < 0) { ++ throw sys_error("failed to set tcp socket to nonblocking", errno); ++ } ++ ++ set_id(m_socket); ++} ++ ++void tcp_connection::add_to_evpoll(evpoll_set& evpoll) { ++ evpoll.add(m_socket, EPOLLIN | EPOLLOUT | EPOLLERR | EPOLLET); ++} ++ ++size_t tcp_connection::send(const char *buffer, size_t size) { ++ ssize_t ret = ::send(m_socket, buffer, size, 0); ++ if (ret < 0) { ++ if (errno != EAGAIN) { ++ throw sys_error("failed to send on tcp socket", errno); ++ } ++ return 0; ++ } ++ return ret; ++} ++ ++size_t tcp_connection::recv(char *buffer, size_t size) { ++ ssize_t ret = ::recv(m_socket, buffer, size, 0); ++ if (ret < 0) { ++ if (errno != EAGAIN) { ++ throw sys_error("failed to receive from tcp socket", errno); ++ } ++ return 0; ++ } ++ if (ret == 0) { ++ m_is_closed = true; ++ } ++ return ret; ++} ++ ++bool tcp_connection::is_closed() const { ++ return m_is_closed; ++} ++ ++tcp_worker::tcp_worker(const struct sockaddr *listen_addr, socklen_t addrlen) { ++ int retb = ::bind(m_server_socket, listen_addr, addrlen); ++ if (retb != 0) { ++ throw sys_error("failed to bind tcp socket", errno); ++ } ++ ++ int retl = ::listen(m_server_socket, 1024); ++ if (retl != 0) { ++ throw sys_error("failed to listen on tcp socket", errno); ++ } ++} ++ ++void tcp_worker::add_to_evpoll(evpoll_set& evpoll) { ++ evpoll.add(m_server_socket, EPOLLIN | EPOLLERR); ++} ++ ++void tcp_worker::wait(const evpoll_set& evpoll, conn_handler_t conn_handler, ++ data_handler_t data_handler, int timeout_ms) { ++ std::vector events; ++ evpoll.wait(events, timeout_ms); ++ for (auto ev : events) { ++ if (ev.fd == m_server_socket) { ++ int ret = accept(m_server_socket, NULL, NULL); ++ if (ret < 0) { ++ throw sys_error("failed to accept", errno); ++ } ++ auto conn = std::make_shared(ret); ++ conn_handler(conn); ++ } else { ++ data_handler(ev.fd, ev.ev_flags); ++ } ++ } ++} ++ ++std::shared_ptr tcp_worker::connect(const struct sockaddr *addr, ++ socklen_t addrlen) { ++ return std::make_shared(addr, addrlen); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.h b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.h +new file mode 100644 +index 000000000..f8c371733 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_tcp.h +@@ -0,0 +1,64 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef SA_TCP_H_ ++#define SA_TCP_H_ ++ ++#include "sa_base.h" ++#include "sa_util.h" ++ ++ ++class tcp_socket : public file_desc { ++public: ++ tcp_socket(); ++ ++ tcp_socket(int fd); ++ ++ virtual ~tcp_socket(); ++ ++private: ++ static int create_socket(); ++}; ++ ++ ++class tcp_connection : public connection { ++public: ++ tcp_connection(const struct sockaddr *addr, socklen_t addrlen); ++ ++ tcp_connection(int fd); ++ ++ virtual void add_to_evpoll(evpoll_set& evpoll); ++ ++ virtual size_t send(const char *buffer, size_t size); ++ ++ virtual size_t recv(char *buffer, size_t size); ++ ++ virtual bool is_closed() const; ++ ++private: ++ void initialize(); ++ ++ tcp_socket m_socket; ++ bool m_is_closed; ++}; ++ ++ ++class tcp_worker : public worker { ++public: ++ tcp_worker(const struct sockaddr *listen_addr, socklen_t addrlen); ++ ++ virtual void add_to_evpoll(evpoll_set& evpoll); ++ ++ virtual conn_ptr_t connect(const struct sockaddr *addr, socklen_t addrlen); ++ ++ virtual void wait(const evpoll_set& evpoll, conn_handler_t conn_handler, ++ data_handler_t data_handler, int timeout_ms); ++ ++private: ++ tcp_socket m_server_socket; ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.cc b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.cc +new file mode 100644 +index 000000000..9e2a97e67 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.cc +@@ -0,0 +1,124 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include "sa_util.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++error::error(const std::string& message) : m_message(message) { ++} ++ ++error::~error() throw() { ++} ++ ++const char* error::what() const throw() { ++ return m_message.c_str(); ++} ++ ++sys_error::~sys_error() throw() { ++} ++ ++sys_error::sys_error(const std::string& message, int errn) : ++ error(message + ": " + strerror(errn) + " (" + std::to_string(errn) + ")") { ++} ++ ++file_desc::file_desc(int fd) : m_fd(fd) { ++} ++ ++file_desc::~file_desc() { ++ int ret = ::close(m_fd); ++ if (ret < 0) { ++ fprintf(stderr, "Warning: failed to close fd %d: %m", m_fd); ++ } ++} ++ ++file_desc::operator int() const { ++ return m_fd; ++} ++ ++evpoll_set::evpoll_set() : file_desc(create_epfd()) { ++} ++ ++void evpoll_set::add(int fd, uint32_t ev_flags) { ++ struct epoll_event ev; ++ memset(&ev, 0, sizeof(ev)); ++ ev.events = ev_flags; ++ ev.data.fd = fd; ++ int ret = ::epoll_ctl(*this, EPOLL_CTL_ADD, fd, &ev); ++ if (ret != 0) { ++ throw sys_error("failed to add fd to epoll", errno); ++ } ++} ++ ++void evpoll_set::wait(std::vector& events, int timeout_ms) const { ++ static const size_t maxevents = 32; ++ struct epoll_event ev_array[maxevents]; ++ ++ LOG_DEBUG << "epoll_wait with timeout " << timeout_ms << " milliseconds"; ++ int ret = epoll_wait(*this, ev_array, maxevents, timeout_ms); ++ if (ret < 0) { ++ if (errno != EINTR) { ++ throw sys_error("epoll_wait failed", errno); ++ } ++ } else { ++ for (int i = 0; i < ret; ++i) { ++ event ev = { ev_array[i].data.fd, ev_array[i].events }; ++ events.push_back(ev); ++ } ++ } ++} ++ ++int evpoll_set::create_epfd() { ++ int fd = epoll_create(1); ++ if (fd < 0) { ++ throw sys_error("failed to create epoll set", errno); ++ } ++ return fd; ++} ++ ++log::level_t log::m_log_level = INFO; ++ ++log::log(log::level_t level, const std::string& file, int line) : ++ m_enabled(level <= m_log_level) { ++ if (m_enabled) { ++ struct timeval tv; ++ gettimeofday(&tv, NULL); ++ ++ char cstr[64]; ++ snprintf(cstr, sizeof(cstr), "[%lu.%06lu] %12s:%-5d", ++ tv.tv_sec, tv.tv_usec, basename(file.c_str()), line); ++ m_msg << cstr << " " << level_str(level) << " "; ++ } ++} ++ ++log::~log() { ++ if (m_enabled) { ++ m_msg << std::endl; ++ std::cout << m_msg.str() << std::flush; ++ } ++} ++ ++std::string log::level_str(log::level_t level) { ++ switch (level) { ++ case INFO: ++ return "INFO "; ++ case DEBUG: ++ return "DEBUG"; ++ default: ++ throw error("invalid log level"); ++ } ++} ++ ++void log::more_verbose() { ++ if (m_log_level == INFO) { ++ m_log_level = DEBUG; ++ } ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.h b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.h +new file mode 100644 +index 000000000..7cd46bcec +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/sockaddr/sa_util.h +@@ -0,0 +1,107 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#ifndef SA_UTIL_H_ ++#define SA_UTIL_H_ ++ ++#include ++#include ++#include ++#include ++ ++ ++/* runtime error exception */ ++class error : public std::exception { ++public: ++ error(const std::string& message); ++ ++ virtual ~error() throw(); ++ ++ virtual const char* what() const throw(); ++ ++private: ++ std::string m_message; ++}; ++ ++ ++/* system error exception */ ++class sys_error : public error { ++public: ++ virtual ~sys_error() throw(); ++ ++ sys_error(const std::string& message, int errn); ++}; ++ ++ ++/* file descriptor wrapper which closes the file automatically */ ++class file_desc { ++public: ++ file_desc(int fd); ++ ++ virtual ~file_desc(); ++ ++ operator int() const; ++ ++private: ++ file_desc(const file_desc&); ++ ++ const file_desc& operator=(const file_desc&); ++ ++ int m_fd; ++}; ++ ++ ++/* event poll set */ ++class evpoll_set : public file_desc { ++public: ++ struct event { ++ int fd; ++ uint32_t ev_flags; ++ }; ++ ++ evpoll_set(); ++ ++ void add(int fd, uint32_t ev_flags); ++ ++ void wait(std::vector& events, int timeout_ms = -1) const; ++ ++private: ++ static int create_epfd(); ++}; ++ ++#define LOG_INFO \ ++ log(log::INFO, __FILE__, __LINE__) ++#define LOG_DEBUG \ ++ log(log::DEBUG, __FILE__, __LINE__) ++ ++/* logger */ ++class log { ++public: ++ typedef enum { ++ INFO, ++ DEBUG ++ } level_t; ++ ++ log(level_t level, const std::string& file, int line); ++ ~log(); ++ ++ template ++ log& operator<<(const T& value) { ++ m_msg << value; ++ return *this; ++ } ++ ++ static void more_verbose(); ++ ++private: ++ static std::string level_str(level_t level); ++ ++ static level_t m_log_level; ++ const bool m_enabled; ++ std::ostringstream m_msg; ++}; ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/dlopen.c b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_dlopen.c +similarity index 100% +rename from test/apps/dlopen.c +rename to test/apps/test_dlopen.c +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_tcmalloc.c b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_tcmalloc.c +new file mode 100644 +index 000000000..a987ed756 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_tcmalloc.c +@@ -0,0 +1,33 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++#include ++#include ++ ++ ++int main(int argc, char **argv) ++{ ++ ucp_params_t params; ++ ucs_status_t status; ++ ucp_context_h context; ++ ++ params.field_mask = UCP_PARAM_FIELD_FEATURES; ++ params.features = UCP_FEATURE_TAG; ++ ++ status = ucp_init(¶ms, NULL, &context); ++ if (status != UCS_OK) { ++ return -1; ++ } ++ ++ dlopen("libselinux.so", RTLD_LAZY); ++ ++ ucp_cleanup(context); ++ ++ printf("SUCCESS\n"); ++ return 0; ++} ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_ucx_tls.py b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_ucx_tls.py +index 6e62944c5..fcf1c8738 100755 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_ucx_tls.py ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/apps/test_ucx_tls.py +@@ -9,6 +9,8 @@ import sys + import subprocess + import os + import re ++from distutils.version import LooseVersion ++ + + #expected AM transport selections per given number of eps + mlx4_am = { +@@ -31,7 +33,7 @@ mlx5_am = { + 1000000 : "dc_mlx5", + } + +-mlx5_am_roce = { ++mlx5_am_no_dc = { + 2 : "rc_mlx5", + 16 : "rc_mlx5", + 32 : "rc_mlx5", +@@ -62,12 +64,13 @@ mlx4_am_override = { + 1000000 : "rc", + } + +-am_tls = { +- "mlx4" : mlx4_am, +- "mlx5" : mlx5_am, +- "mlx5_roce" : mlx5_am_roce, +- "mlx4_override" : mlx4_am_override, +- "mlx5_override" : mlx5_am_override ++am_tls = { ++ "mlx4" : mlx4_am, ++ "mlx5" : mlx5_am, ++ "mlx5_roce_dc" : mlx5_am, # mlx5 RoCE port which supports DC ++ "mlx5_roce_no_dc" : mlx5_am_no_dc, # mlx5 RoCE port which doesn't support DC ++ "mlx4_override" : mlx4_am_override, ++ "mlx5_override" : mlx5_am_override + } + + def find_am_transport(dev, neps, override = 0) : +@@ -111,7 +114,11 @@ for dev in sorted(dev_list): + dev_tl_override_map = am_tls[dev[0:dev.index('_')] + "_override"] + override = 1 + else: +- dev_tl_map = am_tls[dev[0:dev.index('_')]+"_roce"] ++ fw_ver = open("/sys/class/infiniband/%s/fw_ver" % dev).read() ++ if LooseVersion(fw_ver) >= LooseVersion("16.23.0"): ++ dev_tl_map = am_tls[dev[0:dev.index('_')]+"_roce_dc"] ++ else: ++ dev_tl_map = am_tls[dev[0:dev.index('_')]+"_roce_no_dc"] + override = 0 + + for n_eps in sorted(dev_tl_map): +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/examples/Makefile.am +index 73ec1931a..3eecc2af0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/examples/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/Makefile.am +@@ -1,5 +1,5 @@ + # +-# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. ++# Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + # + # Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. + # See file LICENSE for terms. +@@ -9,10 +9,53 @@ examplesdir = $(pkgdatadir)/examples + dist_examples_DATA = \ + ucx_hello_world.h \ + ucp_hello_world.c \ +- uct_hello_world.c ++ uct_hello_world.c \ ++ ucx_profiling.c \ ++ ucp_client_server.c ++ ++EXAMPLE_CC_FLAGS = -lucs -lucm -I$(includedir) -L$(libdir) -Wall -Werror -Wl,-rpath,$(libdir) + + installcheck-local: + @echo "INSTALLCHECK: Compiling examples with installed library" +- $(CC) -o uct_hello_world $(examplesdir)/uct_hello_world.c -luct -lucs -I$(includedir) -L$(libdir) -pedantic -Werror -Wl,-rpath,$(libdir) +- $(CC) -o ucp_hello_world $(examplesdir)/ucp_hello_world.c -lucp -lucs -I$(includedir) -L$(libdir) -pedantic -Werror -Wl,-rpath,$(libdir) +- $(RM) *.o uct_hello_world ucp_hello_world ++ $(CC) -o uct_hello_world $(examplesdir)/uct_hello_world.c -luct $(EXAMPLE_CC_FLAGS) -pedantic ++ $(CC) -o ucp_hello_world $(examplesdir)/ucp_hello_world.c -lucp $(EXAMPLE_CC_FLAGS) -pedantic ++ $(CC) -o ucp_client_server $(examplesdir)/ucp_client_server.c -lucp $(EXAMPLE_CC_FLAGS) -pedantic ++ $(CC) -o ucx_profiling $(examplesdir)/ucx_profiling.c -lucs $(EXAMPLE_CC_FLAGS) -Wall -lm ++ $(RM) *.o uct_hello_world ucp_hello_world ucp_client_server ucx_profiling ++ ++if HAVE_EXAMPLES ++ ++EXAMPLE_INCLUDE_FLAGS = \ ++ -I$(abs_top_srcdir)/src \ ++ -I$(abs_top_builddir)/src ++ ++EXAMPLE_CPPFLAGS = \ ++ $(EXAMPLE_INCLUDE_FLAGS) ++ ++noinst_PROGRAMS = \ ++ ucp_hello_world \ ++ uct_hello_world \ ++ ucx_profiling \ ++ ucp_client_server ++ ++ucp_hello_world_SOURCES = ucp_hello_world.c ++ucp_hello_world_CFLAGS = $(BASE_CFLAGS) ++ucp_hello_world_CPPFLAGS = $(EXAMPLE_CPPFLAGS) ++ucp_hello_world_LDADD = $(top_builddir)/src/ucp/libucp.la ++ ++uct_hello_world_SOURCES = uct_hello_world.c ++uct_hello_world_CFLAGS = $(BASE_CFLAGS) ++uct_hello_world_CPPFLAGS = $(EXAMPLE_CPPFLAGS) ++uct_hello_world_LDADD = $(top_builddir)/src/uct/libuct.la ++ ++ucp_client_server_SOURCES = ucp_client_server.c ++ucp_client_server_CFLAGS = $(BASE_CFLAGS) ++ucp_client_server_CPPFLAGS = $(EXAMPLE_CPPFLAGS) ++ucp_client_server_LDADD = $(top_builddir)/src/ucp/libucp.la ++ ++ucx_profiling_SOURCES = ucx_profiling.c ++ucx_profiling_CFLAGS = $(BASE_CFLAGS) ++ucx_profiling_CPPFLAGS = $(EXAMPLE_CPPFLAGS) ++ucx_profiling_LDADD = $(top_builddir)/src/ucs/libucs.la ++ ++endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_client_server.c b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_client_server.c +new file mode 100644 +index 000000000..44f49260d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_client_server.c +@@ -0,0 +1,485 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++/* ++ * UCP client - server example utility ++ * ----------------------------------------------- ++ * ++ * Server side: ++ * ++ * ./ucp_client_server ++ * ++ * Client side: ++ * ++ * ./ucp_client_server -a ++ * ++ * Notes: ++ * ++ * - The server will listen to incoming connection requests on INADDR_ANY. ++ * - The client needs to pass the IP address of the server side to connect to ++ * as an argument to the test. ++ * - Currently, the passed IP needs to be an IPoIB or a RoCE address. ++ * - The port which the server side would listen on can be modified with the ++ * '-p' option and should be used on both sides. The default port to use is ++ * 13337. ++ */ ++ ++#include ++ ++#include /* memset */ ++#include /* inet_addr */ ++#include /* getopt */ ++#include /* atoi */ ++ ++ ++const char test_message[] = "UCX Client-Server Hello World"; ++static uint16_t server_port = 13337; ++ ++#define TEST_STRING_LEN sizeof(test_message) ++ ++ ++/** ++ * Server context to be used in the user's accept callback. ++ * It holds the server's endpoint which will be created upon accepting a ++ * connection request from the client. ++ */ ++typedef struct ucx_server_ctx { ++ ucp_ep_h ep; ++} ucx_server_ctx_t; ++ ++ ++/** ++ * Stream request context. Holds a value to indicate whether or not the ++ * request is completed. ++ */ ++typedef struct test_req { ++ int complete; ++} test_req_t; ++ ++ ++/** ++ * The callback on the receiving side, which is invoked upon receiving the ++ * stream message. ++ */ ++static void stream_recv_cb(void *request, ucs_status_t status, size_t length) ++{ ++ test_req_t *req = request; ++ ++ req->complete = 1; ++ ++ printf("stream_recv_cb returned with status %d (%s), length: %lu\n", ++ status, ucs_status_string(status), length); ++} ++ ++/** ++ * The callback on the sending side, which is invoked after finishing sending ++ * the stream message. ++ */ ++static void stream_send_cb(void *request, ucs_status_t status) ++{ ++ test_req_t *req = request; ++ ++ req->complete = 1; ++ ++ printf("stream_send_cb returned with status %d (%s)\n", ++ status, ucs_status_string(status)); ++} ++ ++/** ++ * The callback on the server side which is invoked upon receiving a connection ++ * request from the client. ++ */ ++static void server_accept_cb(ucp_ep_h ep, void *arg) ++{ ++ ucx_server_ctx_t *context = arg; ++ ++ /* Save the server's endpoint in the user's context, for future usage */ ++ context->ep = ep; ++} ++ ++/** ++ * Set an address for the server to listen on - INADDR_ANY on a well known port. ++ */ ++void set_listen_addr(struct sockaddr_in *listen_addr) ++{ ++ /* The server will listen on INADDR_ANY */ ++ memset(listen_addr, 0, sizeof(struct sockaddr_in)); ++ listen_addr->sin_family = AF_INET; ++ listen_addr->sin_addr.s_addr = INADDR_ANY; ++ listen_addr->sin_port = server_port; ++} ++ ++/** ++ * Set an address to connect to. A given IP address on a well known port. ++ */ ++void set_connect_addr(const char *address_str, struct sockaddr_in *connect_addr) ++{ ++ memset(connect_addr, 0, sizeof(struct sockaddr_in)); ++ connect_addr->sin_family = AF_INET; ++ connect_addr->sin_addr.s_addr = inet_addr(address_str); ++ connect_addr->sin_port = server_port; ++} ++ ++/** ++ * Initialize the server side. The server starts listening on the set address ++ * and waits for its connected endpoint to be created. ++ */ ++static int start_server(ucp_worker_h ucp_worker, ucx_server_ctx_t *context, ++ ucp_listener_h *listener) ++{ ++ struct sockaddr_in listen_addr; ++ ucp_listener_params_t params; ++ ucs_status_t status; ++ ++ set_listen_addr(&listen_addr); ++ ++ params.field_mask = UCP_LISTENER_PARAM_FIELD_SOCK_ADDR | ++ UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER; ++ params.sockaddr.addr = (const struct sockaddr*)&listen_addr; ++ params.sockaddr.addrlen = sizeof(listen_addr); ++ params.accept_handler.cb = server_accept_cb; ++ params.accept_handler.arg = context; ++ ++ /* Create a listener on the server side to listen on the given address.*/ ++ status = ucp_listener_create(ucp_worker, ¶ms, listener); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to listen (%s)\n", ucs_status_string(status)); ++ } ++ ++ return status; ++} ++ ++/** ++ * Initialize the client side. Create an endpoint from the client side to be ++ * connected to the remote server (to the given IP). ++ */ ++static int start_client(ucp_worker_h ucp_worker, const char *ip, ++ ucp_ep_h *client_ep) ++{ ++ ucp_ep_params_t ep_params; ++ struct sockaddr_in connect_addr; ++ ucs_status_t status; ++ ++ set_connect_addr(ip, &connect_addr); ++ ++ /* ++ * Endpoint field mask bits: ++ * UCP_EP_PARAM_FIELD_FLAGS - Use the value of the 'flags' field. ++ * UCP_EP_PARAM_FIELD_SOCK_ADDR - Use a remote sockaddr to connect ++ * to the remote peer. ++ * UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE - Error handling mode - this flag ++ * is temporarily required since the ++ * endpoint will be closed with ++ * UCP_EP_CLOSE_MODE_FORCE which ++ * requires this mode. ++ * Once UCP_EP_CLOSE_MODE_FORCE is ++ * removed, the error handling mode ++ * will be removed. ++ */ ++ ep_params.field_mask = UCP_EP_PARAM_FIELD_FLAGS | ++ UCP_EP_PARAM_FIELD_SOCK_ADDR | ++ UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; ++ ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; ++ ep_params.flags = UCP_EP_PARAMS_FLAGS_CLIENT_SERVER; ++ ep_params.sockaddr.addr = (struct sockaddr*)&connect_addr; ++ ep_params.sockaddr.addrlen = sizeof(connect_addr); ++ ++ status = ucp_ep_create(ucp_worker, &ep_params, client_ep); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to connect to %s (%s)\n", ip, ucs_status_string(status)); ++ } ++ ++ return status; ++} ++ ++/** ++ * Print the received message on the server side or the sent data on the client ++ * side. ++ */ ++static void print_result(int is_server, char *recv_message) ++{ ++ if (is_server) { ++ printf("\n\n----- UCP TEST SUCCESS -------\n\n"); ++ printf("%s", recv_message); ++ printf("\n\n------------------------------\n\n"); ++ } else { ++ printf("\n\n-----------------------------------------\n\n"); ++ printf("Client sent message: \n%s.\nlength: %ld\n", ++ test_message, TEST_STRING_LEN); ++ printf("\n-----------------------------------------\n\n"); ++ } ++} ++ ++static void request_wait(ucp_worker_h ucp_worker, test_req_t *request) ++{ ++ while (request->complete == 0) { ++ ucp_worker_progress(ucp_worker); ++ } ++ ++ /* This request may be reused so initialize it for next time */ ++ request->complete = 0; ++ ucp_request_free(request); ++} ++ ++/** ++ * Send and receive a message using the Stream API. ++ * The client sends a message to the server and waits until the send it completed. ++ * The server receives a message from the client and waits for its completion. ++ */ ++static int send_recv_stream(ucp_worker_h ucp_worker, ucp_ep_h ep, int is_server) ++{ ++ char recv_message[TEST_STRING_LEN]= ""; ++ test_req_t *request; ++ size_t length; ++ int ret = 0; ++ ++ if (!is_server) { ++ /* Client sends a message to the server using the stream API */ ++ request = ucp_stream_send_nb(ep, test_message, 1, ++ ucp_dt_make_contig(TEST_STRING_LEN), ++ stream_send_cb, 0); ++ if (UCS_PTR_IS_ERR(request)) { ++ fprintf(stderr, "unable to send UCX message (%s)\n", ++ ucs_status_string(UCS_PTR_STATUS(request))); ++ ret = -1; ++ goto out; ++ } else if (UCS_PTR_STATUS(request) != UCS_OK) { ++ request_wait(ucp_worker, request); ++ } ++ } else { ++ /* Server receives a message from the client using the stream API */ ++ request = ucp_stream_recv_nb(ep, &recv_message, 1, ++ ucp_dt_make_contig(TEST_STRING_LEN), ++ stream_recv_cb, &length , 0); ++ if (UCS_PTR_IS_ERR(request)) { ++ fprintf(stderr, "unable to receive UCX message (%s)\n", ++ ucs_status_string(UCS_PTR_STATUS(request))); ++ ret = -1; ++ goto out; ++ } else { ++ request_wait(ucp_worker, request); ++ printf("UCX data message was received\n"); ++ } ++ } ++ ++ print_result(is_server, recv_message); ++ ++out: ++ return ret; ++} ++ ++/** ++ * Close the given endpoint. ++ * Currently closing the endpoint with UCP_EP_CLOSE_MODE_FORCE since we currently ++ * cannot rely on the client side to be present during the server's endpoint ++ * closing process. ++ */ ++static void ep_close(ucp_worker_h ucp_worker, ucp_ep_h ep) ++{ ++ ucs_status_t status; ++ void *close_req; ++ ++ close_req = ucp_ep_close_nb(ep, UCP_EP_CLOSE_MODE_FORCE); ++ if (UCS_PTR_IS_PTR(close_req)) { ++ do { ++ ucp_worker_progress(ucp_worker); ++ status = ucp_request_check_status(close_req); ++ } while (status == UCS_INPROGRESS); ++ ++ ucp_request_free(close_req); ++ } else if (UCS_PTR_STATUS(close_req) != UCS_OK) { ++ fprintf(stderr, "failed to close ep %p\n", (void*)ep); ++ } ++} ++ ++/** ++ * A callback to be invoked by UCX in order to initialize the user's request. ++ */ ++static void request_init(void *request) ++{ ++ test_req_t *req = request; ++ req->complete = 0; ++} ++ ++/** ++ * Print this application's usage help message. ++ */ ++static void usage() ++{ ++ fprintf(stderr, "Usage: ucp_client_server [parameters]\n"); ++ fprintf(stderr, "UCP client-server example utility\n"); ++ fprintf(stderr, "\nParameters are:\n"); ++ fprintf(stderr, " -a Set IP address of the server " ++ "(required for client and should not be specified " ++ "for the server)\n"); ++ fprintf(stderr, " -p Set alternative server port (default:13337)\n"); ++ fprintf(stderr, "\n"); ++} ++ ++/** ++ * Parse the command line arguments. ++ */ ++static int parse_cmd(int argc, char *const argv[], char **server_addr) ++{ ++ int c = 0; ++ opterr = 0; ++ ++ while ((c = getopt(argc, argv, "a:p:")) != -1) { ++ switch (c) { ++ case 'a': ++ *server_addr = optarg; ++ break; ++ case 'p': ++ server_port = atoi(optarg); ++ if (server_port < 0) { ++ fprintf(stderr, "Wrong server port number %d\n", server_port); ++ return -1; ++ } ++ break; ++ default: ++ usage(); ++ return -1; ++ } ++ } ++ ++ return 0; ++} ++ ++/** ++ * Initialize the UCP context and worker. ++ */ ++static int init_context(ucp_context_h *ucp_context, ucp_worker_h *ucp_worker) ++{ ++ /* UCP objects */ ++ ucp_worker_params_t worker_params; ++ ucp_params_t ucp_params; ++ ucs_status_t status; ++ int ret = 0; ++ ++ memset(&ucp_params, 0, sizeof(ucp_params)); ++ memset(&worker_params, 0, sizeof(worker_params)); ++ ++ /* UCP initialization */ ++ ucp_params.field_mask = UCP_PARAM_FIELD_FEATURES | ++ UCP_PARAM_FIELD_REQUEST_SIZE | ++ UCP_PARAM_FIELD_REQUEST_INIT; ++ ucp_params.features = UCP_FEATURE_STREAM; ++ ++ ucp_params.request_size = sizeof(test_req_t); ++ ucp_params.request_init = request_init; ++ ++ status = ucp_init(&ucp_params, NULL, ucp_context); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to ucp_init (%s)\n", ucs_status_string(status)); ++ ret = -1; ++ goto err; ++ } ++ ++ worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE; ++ worker_params.thread_mode = UCS_THREAD_MODE_SINGLE; ++ ++ status = ucp_worker_create(*ucp_context, &worker_params, ucp_worker); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to ucp_worker_create (%s)\n", ucs_status_string(status)); ++ ret = -1; ++ goto err_cleanup; ++ } ++ ++ return ret; ++ ++err_cleanup: ++ ucp_cleanup(*ucp_context); ++ ++err: ++ return ret; ++} ++ ++ ++int main(int argc, char **argv) ++{ ++ ucx_server_ctx_t context; ++ int is_server, ret; ++ char *server_addr = NULL; ++ ++ /* UCP objects */ ++ ucp_context_h ucp_context; ++ ucp_listener_h listener; ++ ucp_worker_h ucp_worker; ++ ucs_status_t status; ++ ucp_ep_h ep; ++ ++ ret = parse_cmd(argc, argv, &server_addr); ++ if (ret != 0) { ++ goto err; ++ } ++ ++ /* Initialize the UCX required objects */ ++ ret = init_context(&ucp_context, &ucp_worker); ++ if (ret != 0) { ++ goto err; ++ } ++ ++ /* Client-Server initialization */ ++ if (server_addr == NULL) { ++ /* Server side */ ++ is_server = 1; ++ ++ /* Initialize the server's endpoint to NULL. Once the server's endpoint ++ * is created, this field will have a valid value. */ ++ context.ep = NULL; ++ ++ status = start_server(ucp_worker, &context, &listener); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to start server\n"); ++ goto err_worker; ++ } ++ ++ /* Server is always up */ ++ while (1) { ++ printf("Waiting for connection...\n"); ++ ++ /* Wait for the server's callback to set the context->ep field, thus ++ * indicating that the server's endpoint was created and is ready to ++ * be used. The client side should initiate the connection, leading ++ * to this ep's creation */ ++ while (context.ep == NULL) { ++ ucp_worker_progress(ucp_worker); ++ } ++ ++ /* Client-Server communication via Stream API */ ++ send_recv_stream(ucp_worker, context.ep, is_server); ++ ++ /* Close the endpoint to the client */ ++ ep_close(ucp_worker, context.ep); ++ ++ /* Initialize server's endpoint for the next connection with a new ++ * client */ ++ context.ep = NULL; ++ } ++ } else { ++ /* Client side */ ++ is_server = 0; ++ status = start_client(ucp_worker, server_addr, &ep); ++ if (status != UCS_OK) { ++ fprintf(stderr, "failed to start client\n"); ++ goto err_worker; ++ } ++ ++ /* Client-Server communication via Stream API */ ++ ret = send_recv_stream(ucp_worker, ep, is_server); ++ ++ /* Close the endpoint to the server */ ++ ep_close(ucp_worker, ep); ++ } ++ ++err_worker: ++ ucp_worker_destroy(ucp_worker); ++ ++ ucp_cleanup(ucp_context); ++ ++err: ++ return ret; ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_hello_world.c b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_hello_world.c +index 49a3a4ad1..dbaeff8dc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_hello_world.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucp_hello_world.c +@@ -1,11 +1,14 @@ + /** + * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++* Copyright (C) Advanced Micro Devices, Inc. 2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ + +-#define HAVE_CONFIG_H /* Force using config.h, so test would fail if header +- actually tries to use it */ ++#ifndef HAVE_CONFIG_H ++# define HAVE_CONFIG_H /* Force using config.h, so test would fail if header ++ actually tries to use it */ ++#endif + + /* + * UCP hello world client / server example utility +@@ -88,7 +91,7 @@ static void request_init(void *request) + ctx->completed = 0; + } + +-static void send_handle(void *request, ucs_status_t status) ++static void send_handler(void *request, ucs_status_t status) + { + struct ucx_context *context = (struct ucx_context *) request; + +@@ -108,7 +111,7 @@ static void failure_handler(void *arg, ucp_ep_h ep, ucs_status_t status) + *arg_status = status; + } + +-static void recv_handle(void *request, ucs_status_t status, ++static void recv_handler(void *request, ucs_status_t status, + ucp_tag_recv_info_t *info) + { + struct ucx_context *context = (struct ucx_context *) request; +@@ -197,7 +200,7 @@ static int run_ucx_client(ucp_worker_h ucp_worker) + + request = ucp_tag_send_nb(server_ep, msg, msg_len, + ucp_dt_make_contig(1), tag, +- send_handle); ++ send_handler); + if (UCS_PTR_IS_ERR(request)) { + fprintf(stderr, "unable to send UCX address message\n"); + free(msg); +@@ -247,7 +250,7 @@ static int run_ucx_client(ucp_worker_h ucp_worker) + + request = ucp_tag_msg_recv_nb(ucp_worker, msg, info_tag.length, + ucp_dt_make_contig(1), msg_tag, +- recv_handle); ++ recv_handler); + + if (UCS_PTR_IS_ERR(request)) { + fprintf(stderr, "unable to receive UCX data message (%u)\n", +@@ -324,7 +327,7 @@ static int run_ucx_server(ucp_worker_h ucp_worker) + msg = malloc(info_tag.length); + CHKERR_JUMP(!msg, "allocate memory\n", err); + request = ucp_tag_msg_recv_nb(ucp_worker, msg, info_tag.length, +- ucp_dt_make_contig(1), msg_tag, recv_handle); ++ ucp_dt_make_contig(1), msg_tag, recv_handler); + + if (UCS_PTR_IS_ERR(request)) { + fprintf(stderr, "unable to receive UCX address message (%s)\n", +@@ -373,7 +376,7 @@ static int run_ucx_server(ucp_worker_h ucp_worker) + + request = ucp_tag_send_nb(client_ep, msg, msg_len, + ucp_dt_make_contig(1), tag, +- send_handle); ++ send_handler); + if (UCS_PTR_IS_ERR(request)) { + fprintf(stderr, "unable to send UCX data message\n"); + free(msg); +@@ -386,7 +389,7 @@ static int run_ucx_server(ucp_worker_h ucp_worker) + } + + status = flush_ep(ucp_worker, client_ep); +- fprintf(stderr, "ucp_ep_flush is completed with status %d (%s)\n", ++ printf("flush_ep completed with status %d (%s)\n", + status, ucs_status_string(status)); + + ret = 0; +@@ -599,78 +602,3 @@ int parse_cmd(int argc, char * const argv[], char **server_name) + } + return UCS_OK; + } +- +-int run_server() +-{ +- struct sockaddr_in inaddr; +- int lsock = -1; +- int dsock = -1; +- int optval = 1; +- int ret; +- +- lsock = socket(AF_INET, SOCK_STREAM, 0); +- CHKERR_JUMP(lsock < 0, "open server socket\n", err); +- +- optval = 1; +- ret = setsockopt(lsock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)); +- CHKERR_JUMP(ret < 0, "setsockopt server\n", err_sock); +- +- inaddr.sin_family = AF_INET; +- inaddr.sin_port = htons(server_port); +- inaddr.sin_addr.s_addr = INADDR_ANY; +- memset(inaddr.sin_zero, 0, sizeof(inaddr.sin_zero)); +- ret = bind(lsock, (struct sockaddr*)&inaddr, sizeof(inaddr)); +- CHKERR_JUMP(ret < 0, "bind server\n", err_sock); +- +- ret = listen(lsock, 0); +- CHKERR_JUMP(ret < 0, "listen server\n", err_sock); +- +- printf("Waiting for connection...\n"); +- +- /* Accept next connection */ +- dsock = accept(lsock, NULL, NULL); +- CHKERR_JUMP(dsock < 0, "accept server\n", err_sock); +- +- close(lsock); +- +- return dsock; +- +-err_sock: +- close(lsock); +- +-err: +- return -1; +-} +- +-int run_client(const char *server) +-{ +- struct sockaddr_in conn_addr; +- struct hostent *he; +- int connfd; +- int ret; +- +- connfd = socket(AF_INET, SOCK_STREAM, 0); +- if (connfd < 0) { +- fprintf(stderr, "socket() failed: %s\n", strerror(errno)); +- return -1; +- } +- +- he = gethostbyname(server); +- CHKERR_JUMP((he == NULL || he->h_addr_list == NULL), "found host\n", err_conn); +- +- conn_addr.sin_family = he->h_addrtype; +- conn_addr.sin_port = htons(server_port); +- +- memcpy(&conn_addr.sin_addr, he->h_addr_list[0], he->h_length); +- memset(conn_addr.sin_zero, 0, sizeof(conn_addr.sin_zero)); +- +- ret = connect(connfd, (struct sockaddr*)&conn_addr, sizeof(conn_addr)); +- CHKERR_JUMP(ret < 0, "connect client\n", err_conn); +- +- return connfd; +- +-err_conn: +- close(connfd); +- +- return -1; +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/examples/uct_hello_world.c b/src/mpid/ch4/netmod/ucx/ucx/test/examples/uct_hello_world.c +index c42259471..c19602afd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/examples/uct_hello_world.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/uct_hello_world.c +@@ -98,14 +98,22 @@ void am_short_params_pack(char *buf, size_t len, am_short_args_t *args) + } + } + +-ucs_status_t do_am_short(uct_ep_h ep, uint8_t id, const cmd_args_t *cmd_args, +- char *buf) ++ucs_status_t do_am_short(iface_info_t *if_info, uct_ep_h ep, uint8_t id, ++ const cmd_args_t *cmd_args, char *buf) + { ++ ucs_status_t status; + am_short_args_t send_args; ++ + am_short_params_pack(buf, cmd_args->test_strlen, &send_args); +- /* Send active message to remote endpoint */ +- return uct_ep_am_short(ep, id, send_args.header, send_args.payload, +- send_args.len); ++ ++ do { ++ /* Send active message to remote endpoint */ ++ status = uct_ep_am_short(ep, id, send_args.header, send_args.payload, ++ send_args.len); ++ uct_worker_progress(if_info->worker); ++ } while (status == UCS_ERR_NO_RESOURCE); ++ ++ return status; + } + + /* Pack callback for am_bcopy */ +@@ -116,8 +124,8 @@ size_t am_bcopy_data_pack_cb(void *dest, void *arg) + return bc_args->len; + } + +-ucs_status_t do_am_bcopy(uct_ep_h ep, uint8_t id, const cmd_args_t *cmd_args, +- char *buf) ++ucs_status_t do_am_bcopy(iface_info_t *if_info, uct_ep_h ep, uint8_t id, ++ const cmd_args_t *cmd_args, char *buf) + { + am_bcopy_args_t args; + ssize_t len; +@@ -126,7 +134,10 @@ ucs_status_t do_am_bcopy(uct_ep_h ep, uint8_t id, const cmd_args_t *cmd_args, + args.len = cmd_args->test_strlen; + + /* Send active message to remote endpoint */ +- len = uct_ep_am_bcopy(ep, id, am_bcopy_data_pack_cb, &args, 0); ++ do { ++ len = uct_ep_am_bcopy(ep, id, am_bcopy_data_pack_cb, &args, 0); ++ uct_worker_progress(if_info->worker); ++ } while (len == UCS_ERR_NO_RESOURCE); + /* Negative len is an error code */ + return (len >= 0) ? UCS_OK : len; + } +@@ -148,7 +159,7 @@ ucs_status_t do_am_zcopy(iface_info_t *if_info, uct_ep_h ep, uint8_t id, + zcopy_comp_t comp; + + ucs_status_t status = uct_md_mem_reg(if_info->pd, buf, cmd_args->test_strlen, +- 0, &memh); ++ UCT_MD_MEM_ACCESS_RMA, &memh); + iov.buffer = buf; + iov.length = cmd_args->test_strlen; + iov.memh = memh; +@@ -161,8 +172,12 @@ ucs_status_t do_am_zcopy(iface_info_t *if_info, uct_ep_h ep, uint8_t id, + comp.memh = memh; + + if (status == UCS_OK) { +- status = uct_ep_am_zcopy(ep, id, NULL, 0, &iov, 1, 0, +- (uct_completion_t *)&comp); ++ do { ++ status = uct_ep_am_zcopy(ep, id, NULL, 0, &iov, 1, 0, ++ (uct_completion_t *)&comp); ++ uct_worker_progress(if_info->worker); ++ } while (status == UCS_ERR_NO_RESOURCE); ++ + if (status == UCS_INPROGRESS) { + while (!desc_holder) { + /* Explicitly progress outstanding active message request */ +@@ -276,7 +291,7 @@ static ucs_status_t dev_tl_lookup(const cmd_args_t *cmd_args, + int j; + + status = uct_query_md_resources(&md_resources, &num_md_resources); +- CHKERR_JUMP(UCS_OK != status, "query for protected domain resources", error_ret); ++ CHKERR_JUMP(UCS_OK != status, "query for memory domain resources", error_ret); + + /* Iterate through protected domain resources */ + for (i = 0; i < num_md_resources; ++i) { +@@ -285,7 +300,7 @@ static ucs_status_t dev_tl_lookup(const cmd_args_t *cmd_args, + + status = uct_md_open(md_resources[i].md_name, md_config, &iface_p->pd); + uct_config_release(md_config); +- CHKERR_JUMP(UCS_OK != status, "open protected domains", release_pd); ++ CHKERR_JUMP(UCS_OK != status, "open memory domains", release_pd); + + status = uct_md_query_tl_resources(iface_p->pd, &tl_resources, &num_tl_resources); + CHKERR_JUMP(UCS_OK != status, "query transport resources", close_pd); +@@ -473,7 +488,7 @@ int main(int argc, char **argv) + uct_device_addr_t *peer_dev = NULL; + uct_iface_addr_t *own_iface; + uct_iface_addr_t *peer_iface = NULL; +- uct_ep_addr_t *own_ep; ++ uct_ep_addr_t *own_ep = NULL; + uct_ep_addr_t *peer_ep = NULL; + ucs_status_t status = UCS_OK; /* status codes for UCS */ + uct_ep_h ep; /* Remote endpoint */ +@@ -584,8 +599,7 @@ int main(int argc, char **argv) + + /*Set active message handler */ + status = uct_iface_set_am_handler(if_info.iface, id, hello_world, +- &cmd_args.func_am_type, +- UCT_CB_FLAG_SYNC); ++ &cmd_args.func_am_type, 0); + CHKERR_JUMP(UCS_OK != status, "set callback", out_free_ep); + + if (cmd_args.server_name) { +@@ -594,9 +608,9 @@ int main(int argc, char **argv) + + /* Send active message to remote endpoint */ + if (cmd_args.func_am_type == FUNC_AM_SHORT) { +- status = do_am_short(ep, id, &cmd_args, str); ++ status = do_am_short(&if_info, ep, id, &cmd_args, str); + } else if (cmd_args.func_am_type == FUNC_AM_BCOPY) { +- status = do_am_bcopy(ep, id, &cmd_args, str); ++ status = do_am_bcopy(&if_info, ep, id, &cmd_args, str); + } else if (cmd_args.func_am_type == FUNC_AM_ZCOPY) { + status = do_am_zcopy(&if_info, ep, id, &cmd_args, str); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/apps/profiling.c b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucx_profiling.c +similarity index 86% +rename from test/apps/profiling.c +rename to test/examples/ucx_profiling.c +index 13472053b..38c3eb645 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/apps/profiling.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/examples/ucx_profiling.c +@@ -1,13 +1,12 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ + +-#define HAVE_PROFILING 1 +-#include +- ++#include + #include ++#include + + + /* calc_pi() would be profiled */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/Makefile.am +index 1ca9649f9..29492aaf6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/Makefile.am ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/Makefile.am +@@ -6,20 +6,21 @@ + # See file LICENSE for terms. + # + ++if HAVE_GTEST + + # Set default configuration for running tests + UCX_HANDLE_ERRORS ?= freeze + UCX_LOG_LEVEL ?= info +-UCX_MEM_LOG_LEVEL ?= info + UCX_LOG_PRINT_ENABLE ?= y + GTEST_FILTER ?= * + GTEST_EXTRA_ARGS ?= + LAUNCHER ?= + VALGRIND_EXTRA_ARGS ?= + ++SUBDIRS = ucm/test_dlopen ++ + export UCX_HANDLE_ERRORS + export UCX_LOG_LEVEL +-export UCX_MEM_LOG_LEVEL + export UCX_LOG_PRINT_ENABLE + + GTEST_ARGS = \ +@@ -57,7 +58,8 @@ gtest_CPPFLAGS = \ + + gtest_LDFLAGS = $(GTEST_LDFLAGS) -no-install + gtest_CFLAGS = $(BASE_CFLAGS) +-gtest_CXXFLAGS = $(BASE_CXXFLAGS) $(GTEST_CXXFLAGS) -g -fno-tree-vectorize ++gtest_CXXFLAGS = $(BASE_CXXFLAGS) $(GTEST_CXXFLAGS) -fno-tree-vectorize \ ++ -DGTEST_UCM_HOOK_LIB_DIR="\"${abs_builddir}/ucm/test_dlopen/.libs\"" + + gtest_SOURCES = \ + common/gtest-all.cc \ +@@ -70,9 +72,11 @@ gtest_SOURCES = \ + ucm/malloc_hook.cc \ + \ + uct/test_amo.cc \ +- uct/test_amo_add.cc \ ++ uct/test_amo_add_xor.cc \ ++ uct/test_amo_and_or.cc \ + uct/test_amo_cswap.cc \ +- uct/test_amo_fadd.cc \ ++ uct/test_amo_fadd_fxor.cc \ ++ uct/test_amo_fand_for.cc \ + uct/test_amo_swap.cc \ + uct/test_event.cc \ + uct/test_fence.cc \ +@@ -121,6 +125,7 @@ gtest_SOURCES = \ + ucp/test_ucp_fence.cc \ + ucp/test_ucp_sockaddr.cc \ + ucp/ucp_test.cc \ ++ ucp/ucp_datatype.cc \ + \ + ucs/test_algorithm.cc \ + ucs/test_arbiter.cc \ +@@ -138,12 +143,13 @@ gtest_SOURCES = \ + ucs/test_pgtable.cc \ + ucs/test_profile.cc \ + ucs/test_rcache.cc \ ++ ucs/test_memtype_cache.cc \ + ucs/test_stats.cc \ ++ ucs/test_strided_alloc.cc \ + ucs/test_sys.cc \ + ucs/test_time.cc \ + ucs/test_twheel.cc \ + ucs/test_frag_list.cc \ +- ucs/test_hash_perf.cc \ + ucs/test_type.cc \ + ucs/test_log.cc + +@@ -200,7 +206,8 @@ noinst_HEADERS = \ + ucp/test_ucp_atomic.h \ + ucp/test_ucp_memheap.h \ + ucp/test_ucp_tag.h \ +- ucp/ucp_test.h ++ ucp/ucp_test.h \ ++ ucp/ucp_datatype.h + + .PHONY: test test gdb valgrind fix_rpath ucx + +@@ -237,7 +244,7 @@ list: gtest + # + test: ucx gtest + @rm -f core.* +- $(LAUNCHER) $(abs_builddir)/gtest $(GTEST_ARGS) ++ $(LAUNCHER) stdbuf -e0 -o0 $(abs_builddir)/gtest $(GTEST_ARGS) + + # + # Run unit tests with GDB +@@ -245,7 +252,6 @@ test: ucx gtest + test_gdb: ucx gtest + echo -e 'r\ninit-if-undefined $$_exitcode=-1\nif $$_exitcode>=0\n\tq\nend' > .gdbcommands + $(LAUNCHER) env UCX_HANDLE_ERRORS=none \ +- UCX_GDB_PATH="" \ + gdb -x .gdbcommands --args $(GDB_ARGS) \ + $(abs_builddir)/gtest $(GTEST_ARGS) + +@@ -254,4 +260,5 @@ test_gdb: ucx gtest + # + test_valgrind: ucx gtest + $(LAUNCHER) env LD_LIBRARY_PATH="$(VALGRIND_LIBPATH):${LD_LIBRARY_PATH}" \ +- valgrind $(VALGRIND_ARGS) $(abs_builddir)/gtest $(GTEST_ARGS) ++ stdbuf -e0 -o0 valgrind $(VALGRIND_ARGS) $(abs_builddir)/gtest $(GTEST_ARGS) ++endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/main.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/main.cc +index 0cde3173a..f5540b82f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/main.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/main.cc +@@ -8,6 +8,7 @@ + # include "config.h" + #endif + #include ++#include + #include + #include + #include "test_helpers.h" +@@ -79,8 +80,10 @@ int main(int argc, char **argv) { + modify_config_for_valgrind("IB_TX_BUFS_GROW", "64"); + modify_config_for_valgrind("RC_TX_CQ_LEN", "256"); + modify_config_for_valgrind("CM_TIMEOUT", "600ms"); +- ucm_config_modify("MALLOC_RELOC", "y"); /* Test reloc hooks with valgrind, +- though it's generally unsafe. */ ++ ucm_global_opts.enable_malloc_reloc = 1; /* Test reloc hooks with valgrind, ++ though it's generally unsafe. */ + } ++ ucs_global_opts.warn_unused_env_vars = 0; /* Avoid warnings if not all ++ config vars are being used */ + return RUN_ALL_TESTS(); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.cc +index 6499fd5e6..341023be8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.cc +@@ -16,6 +16,7 @@ pthread_mutex_t test_base::m_logger_mutex = PTHREAD_MUTEX_INITIALIZER; + unsigned test_base::m_total_warnings = 0; + unsigned test_base::m_total_errors = 0; + std::vector test_base::m_errors; ++std::vector test_base::m_warnings; + + test_base::test_base() : + m_state(NEW), +@@ -23,7 +24,8 @@ test_base::test_base() : + m_num_threads(1), + m_num_valgrind_errors_before(0), + m_num_errors_before(0), +- m_num_warnings_before(0) ++ m_num_warnings_before(0), ++ m_num_log_handlers_before(0) + { + push_config(); + } +@@ -93,13 +95,14 @@ void test_base::modify_config(const std::string& name, const std::string& value, + bool optional) + { + ucs_status_t status = ucs_global_opts_set_value(name.c_str(), value.c_str()); +- if ((status == UCS_OK) || (optional && (status == UCS_ERR_NO_ELEM))) { +- return; ++ if ((status == UCS_ERR_NO_ELEM) && optional) { ++ m_env_stack.push_back(new scoped_setenv(("UCX_" + name).c_str(), ++ value.c_str())); ++ } else if (status != UCS_OK) { ++ GTEST_FAIL() << "Invalid UCS configuration for " << name << " : " ++ << value << ", error message: " ++ << ucs_status_string(status) << "(" << status << ")"; + } +- +- GTEST_FAIL() << "Invalid UCS configuration for " << name << " : " +- << value << ", error message: " +- << ucs_status_string(status) << "(" << status << ")"; + } + + void test_base::push_config() +@@ -121,21 +124,6 @@ void test_base::pop_config() + m_config_stack.pop_back(); + } + +-void test_base::hide_errors() +-{ +- ucs_log_push_handler(hide_errors_logger); +-} +- +-void test_base::wrap_errors() +-{ +- ucs_log_push_handler(wrap_errors_logger); +-} +- +-void test_base::restore_errors() +-{ +- ucs_log_pop_handler(); +-} +- + ucs_log_func_rc_t + test_base::count_warns_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap) +@@ -175,6 +163,24 @@ test_base::hide_errors_logger(const char *file, unsigned line, const char *funct + return UCS_LOG_FUNC_RC_STOP; + } + ++ucs_log_func_rc_t ++test_base::hide_warns_logger(const char *file, unsigned line, const char *function, ++ ucs_log_level_t level, const char *message, va_list ap) ++{ ++ if (level == UCS_LOG_LEVEL_WARN) { ++ pthread_mutex_lock(&m_logger_mutex); ++ va_list ap2; ++ va_copy(ap2, ap); ++ m_warnings.push_back(format_message(message, ap2)); ++ va_end(ap2); ++ level = UCS_LOG_LEVEL_DEBUG; ++ pthread_mutex_unlock(&m_logger_mutex); ++ } ++ ++ ucs_log_default_handler(file, line, function, level, message, ap); ++ return UCS_LOG_FUNC_RC_STOP; ++} ++ + ucs_log_func_rc_t + test_base::wrap_errors_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap) +@@ -199,6 +205,7 @@ void test_base::SetUpProxy() { + m_num_errors_before = m_total_errors; + + m_errors.clear(); ++ m_num_log_handlers_before = ucs_log_num_handlers(); + ucs_log_push_handler(count_warns_logger); + + try { +@@ -223,9 +230,15 @@ void test_base::TearDownProxy() { + cleanup(); + } + +- ucs_log_pop_handler(); + m_errors.clear(); + ++ ucs_log_pop_handler(); ++ ++ unsigned num_not_removed = ucs_log_num_handlers() - m_num_log_handlers_before; ++ if (num_not_removed != 0) { ++ ADD_FAILURE() << num_not_removed << " log handlers were not removed"; ++ } ++ + int num_valgrind_errors = VALGRIND_COUNT_ERRORS - m_num_valgrind_errors_before; + if (num_valgrind_errors > 0) { + ADD_FAILURE() << "Got " << num_valgrind_errors << " valgrind errors during the test"; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.h +index e96972c08..0991dd296 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test.h +@@ -38,11 +38,16 @@ public: + virtual void push_config(); + virtual void pop_config(); + +- static void hide_errors(); +- static void wrap_errors(); +- static void restore_errors(); +- + protected: ++ class scoped_log_handler { ++ public: ++ scoped_log_handler(ucs_log_func_t handler) { ++ ucs_log_push_handler(handler); ++ } ++ ~scoped_log_handler() { ++ ucs_log_pop_handler(); ++ } ++ }; + + typedef enum { + NEW, RUNNING, SKIPPED, ABORTED, FINISHED +@@ -61,24 +66,6 @@ protected: + + virtual void test_body() = 0; + +- state_t m_state; +- bool m_initialized; +- unsigned m_num_threads; +- config_stack_t m_config_stack; +- int m_num_valgrind_errors_before; +- unsigned m_num_errors_before; +- unsigned m_num_warnings_before; +- +- static pthread_mutex_t m_logger_mutex; +- static unsigned m_total_errors; +- static unsigned m_total_warnings; +- static std::vector m_errors; +- +-private: +- void skipped(const test_skip_exception& e); +- void run(); +- static void *thread_func(void *arg); +- + static ucs_log_func_rc_t + count_warns_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap); +@@ -87,10 +74,35 @@ private: + hide_errors_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap); + ++ static ucs_log_func_rc_t ++ hide_warns_logger(const char *file, unsigned line, const char *function, ++ ucs_log_level_t level, const char *message, va_list ap); ++ + static ucs_log_func_rc_t + wrap_errors_logger(const char *file, unsigned line, const char *function, + ucs_log_level_t level, const char *message, va_list ap); + ++ state_t m_state; ++ bool m_initialized; ++ unsigned m_num_threads; ++ config_stack_t m_config_stack; ++ ptr_vector m_env_stack; ++ int m_num_valgrind_errors_before; ++ unsigned m_num_errors_before; ++ unsigned m_num_warnings_before; ++ unsigned m_num_log_handlers_before; ++ ++ static pthread_mutex_t m_logger_mutex; ++ static unsigned m_total_errors; ++ static unsigned m_total_warnings; ++ static std::vector m_errors; ++ static std::vector m_warnings; ++ ++private: ++ void skipped(const test_skip_exception& e); ++ void run(); ++ static void *thread_func(void *arg); ++ + pthread_barrier_t m_barrier; + }; + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.cc +index af672dcdc..a609e1843 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.cc +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + namespace ucs { + +@@ -25,19 +26,19 @@ int test_time_multiplier() + return factor; + } + +-std::ostream& operator<<(std::ostream& os, const std::vector& vec) { +- static const size_t LIMIT = 100; +- size_t i = 0; +- for (std::vector::const_iterator iter = vec.begin(); iter != vec.end(); ++iter) { +- if (i >= LIMIT) { +- os << "..."; +- break; +- } +- int n = static_cast(*iter); +- os << "[" << i << "]=" << n << " "; +- ++i; ++int max_tcp_connections() ++{ ++ int max_conn = 65535 - 1024; /* limit on number of ports */ ++ ++ /* Limit numer of endpoints to number of open files, for TCP */ ++ struct rlimit rlim; ++ int ret = getrlimit(RLIMIT_NOFILE, &rlim); ++ if (ret == 0) { ++ /* assume no more than 100 fd-s are already used */ ++ max_conn = ucs_min((static_cast(rlim.rlim_cur) - 100) / 2, max_conn); + } +- return os << std::endl; ++ ++ return max_conn; + } + + void fill_random(void *data, size_t size) +@@ -89,19 +90,42 @@ bool is_inet_addr(const struct sockaddr* ifa_addr) { + return ifa_addr->sa_family == AF_INET; + } + +-bool is_ib_netdev(const char *ifa_name) { ++bool is_rdmacm_netdev(const char *ifa_name) { ++ struct dirent *entry; + char path[PATH_MAX]; ++ char dev_name[16]; ++ char guid_buf[32]; + DIR *dir; + + snprintf(path, PATH_MAX, "/sys/class/net/%s/device/infiniband", ifa_name); +- + dir = opendir(path); + if (dir == NULL) { + return false; +- } else { +- closedir(dir); +- return true; + } ++ ++ /* read IB device name */ ++ for (;;) { ++ entry = readdir(dir); ++ if (entry == NULL) { ++ closedir(dir); ++ return false; ++ } else if (entry->d_name[0] != '.') { ++ ucs_strncpy_zero(dev_name, entry->d_name, sizeof(dev_name)); ++ break; ++ } ++ } ++ closedir(dir); ++ ++ /* read node guid */ ++ memset(guid_buf, 0, sizeof(guid_buf)); ++ ssize_t nread = ucs_read_file(guid_buf, sizeof(guid_buf), 1, ++ "/sys/class/infiniband/%s/node_guid", dev_name); ++ if (nread < 0) { ++ return false; ++ } ++ ++ /* use the device if node_guid != 0 */ ++ return strstr(guid_buf, "0000:0000:0000:0000") == NULL; + } + + uint16_t get_port() { +@@ -120,9 +144,10 @@ uint16_t get_port() { + + do { + addr_in.sin_port = htons(0); +- /* Ports below 1024 are considered "privileged" (can be used only by user root). +- * Ports above and including 1024 can be used by anyone */ +- ret = bind(sock_fd, (struct sockaddr*)&addr_in, sizeof(struct sockaddr_in)); ++ /* Ports below 1024 are considered "privileged" (can be used only by ++ * user root). Ports above and including 1024 can be used by anyone */ ++ ret = bind(sock_fd, (struct sockaddr*)&addr_in, ++ sizeof(struct sockaddr_in)); + } while (ret); + + ret = getsockname(sock_fd, (struct sockaddr*)&ret_addr, &len); +@@ -157,59 +182,3 @@ message_stream::~message_stream() { + } // detail + + } // ucs +- +-namespace ucp { +- +- +-data_type_desc_t & +-data_type_desc_t::make(ucp_datatype_t datatype, const void *buf, size_t length, +- size_t iov_cnt) +-{ +- EXPECT_FALSE(is_valid()); +- +- if (m_length == 0) { +- m_length = length; +- } +- +- if (m_origin == uintptr_t(NULL)) { +- m_origin = uintptr_t(buf); +- } +- +- m_dt = datatype; +- memset(m_iov, 0, sizeof(m_iov)); +- +- switch (m_dt & UCP_DATATYPE_CLASS_MASK) { +- case UCP_DATATYPE_CONTIG: +- m_buf = buf; +- m_count = length / ucp_contig_dt_elem_size(datatype); +- break; +- case UCP_DATATYPE_IOV: +- { +- const size_t iov_length = (length > iov_cnt) ? +- ucs::rand() % (length / iov_cnt) : 0; +- size_t iov_length_it = 0; +- for (size_t iov_it = 0; iov_it < iov_cnt - 1; ++iov_it) { +- m_iov[iov_it].buffer = (char *)(buf) + iov_length_it; +- m_iov[iov_it].length = iov_length; +- iov_length_it += iov_length; +- } +- +- /* Last entry */ +- m_iov[iov_cnt - 1].buffer = (char *)(buf) + iov_length_it; +- m_iov[iov_cnt - 1].length = length - iov_length_it; +- +- m_buf = m_iov; +- m_count = iov_cnt; +- break; +- } +- default: +- m_buf = NULL; +- m_count = 0; +- EXPECT_TRUE(false) << "Unsupported datatype"; +- break; +- } +- +- return *this; +-} +- +-} // ucp +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.h +index 8a0ad6efc..afcfa24c0 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_helpers.h +@@ -10,12 +10,6 @@ + + #include "gtest.h" + +-#include +-extern "C" { +-#include +-#include +-} +- + #include + #include + #include +@@ -31,6 +25,138 @@ extern "C" { + #include + + ++#ifndef UINT16_MAX ++#define UINT16_MAX (65535) ++#endif /* UINT16_MAX */ ++ ++ ++/* Test output */ ++#define UCS_TEST_MESSAGE \ ++ ucs::detail::message_stream("INFO") ++ ++ ++/* Skip test */ ++#define UCS_TEST_SKIP \ ++ do { \ ++ throw ucs::test_skip_exception(); \ ++ } while(0) ++ ++ ++#define UCS_TEST_SKIP_R(_reason) \ ++ do { \ ++ throw ucs::test_skip_exception(_reason); \ ++ } while(0) ++ ++ ++/* Abort test */ ++#define UCS_TEST_ABORT(_message) \ ++ do { \ ++ std::stringstream ss; \ ++ ss << _message; \ ++ GTEST_MESSAGE_(ss.str().c_str(), ::testing::TestPartResult::kFatalFailure); \ ++ throw ucs::test_abort_exception(); \ ++ } while(0) ++ ++ ++/* UCS error check */ ++#define EXPECT_UCS_OK(_expr) \ ++ do { \ ++ ucs_status_t _status = (_expr); \ ++ EXPECT_EQ(UCS_OK, _status) << "Error: " << ucs_status_string(_status); \ ++ } while (0) ++ ++ ++#define ASSERT_UCS_OK(_expr, ...) \ ++ do { \ ++ ucs_status_t _status = (_expr); \ ++ if ((_status) != UCS_OK) { \ ++ UCS_TEST_ABORT("Error: " << ucs_status_string(_status) __VA_ARGS__); \ ++ } \ ++ } while (0) ++ ++ ++#define ASSERT_UCS_OK_OR_INPROGRESS(_expr) \ ++ do { \ ++ ucs_status_t _status = (_expr); \ ++ if (((_status) != UCS_OK) && ((_status) != UCS_INPROGRESS)) { \ ++ UCS_TEST_ABORT("Error: " << ucs_status_string(_status)); \ ++ } \ ++ } while (0) ++ ++ ++#define ASSERT_UCS_PTR_OK(_expr) \ ++ do { \ ++ ucs_status_ptr_t _status = (_expr); \ ++ if (UCS_PTR_IS_ERR(_status)) { \ ++ UCS_TEST_ABORT("Error: " << ucs_status_string(UCS_PTR_STATUS(_status))); \ ++ } \ ++ } while (0) ++ ++ ++#define EXPECT_UD_CHECK(_val1, _val2, _exp_ud, _exp_non_ud) \ ++ do { \ ++ if ((GetParam()->tl_name == "ud") || (GetParam()->tl_name == "ud_mlx5")) { \ ++ EXPECT_##_exp_ud(_val1, _val2); \ ++ } else { \ ++ EXPECT_##_exp_non_ud(_val1, _val2); \ ++ } \ ++ } while (0) ++ ++ ++/* Run code block with given time limit */ ++#define UCS_TEST_TIME_LIMIT(_seconds) \ ++ for (ucs_time_t _start_time = ucs_get_time(), _elapsed = 0; \ ++ _start_time != 0; \ ++ ((ucs_time_to_sec(_elapsed = ucs_get_time() - _start_time) >= \ ++ (_seconds) * ucs::test_time_multiplier()) && \ ++ (ucs::perf_retry_count > 0)) \ ++ ? (GTEST_NONFATAL_FAILURE_("Time limit exceeded:") << \ ++ "Expected time: " << ((_seconds) * ucs::test_time_multiplier()) << " seconds\n" << \ ++ "Actual time: " << ucs_time_to_sec(_elapsed) << " seconds", 0) \ ++ : 0, \ ++ _start_time = 0) ++ ++ ++/** ++ * Scoped exit for C++. Usage: ++ * ++ * UCS_TEST_SCOPE_EXIT() { } UCS_TEST_SCOPE_EXIT_END ++ */ ++#define _UCS_TEST_SCOPE_EXIT(_classname, ...) \ ++ class _classname { \ ++ public: \ ++ _classname() {} \ ++ ~_classname() ++#define UCS_TEST_SCOPE_EXIT(...) \ ++ _UCS_TEST_SCOPE_EXIT(UCS_PP_APPEND_UNIQUE_ID(onexit), ## __VA_ARGS__) ++ ++ ++#define UCS_TEST_SCOPE_EXIT_END \ ++ } UCS_PP_APPEND_UNIQUE_ID(onexit_var); ++ ++ ++/** ++ * Make uct_iov_t iov[iovcnt] array with pointer elements to original buffer ++ */ ++#define UCS_TEST_GET_BUFFER_IOV(_name_iov, _name_iovcnt, _buffer_ptr, _buffer_length, _memh, _iovcnt) \ ++ uct_iov_t _name_iov[_iovcnt]; \ ++ const size_t _name_iovcnt = _iovcnt; \ ++ const size_t _buffer_iov_length = _buffer_length / _name_iovcnt; \ ++ size_t _buffer_iov_length_it = 0; \ ++ for (size_t iov_it = 0; iov_it < _name_iovcnt; ++iov_it) { \ ++ _name_iov[iov_it].buffer = (char *)(_buffer_ptr) + _buffer_iov_length_it; \ ++ _name_iov[iov_it].count = 1; \ ++ _name_iov[iov_it].stride = 0; \ ++ _name_iov[iov_it].memh = _memh; \ ++ if (iov_it == (_name_iovcnt - 1)) { /* Last iteration */ \ ++ _name_iov[iov_it].length = _buffer_length - _buffer_iov_length_it; \ ++ } else { \ ++ _name_iov[iov_it].length = _buffer_iov_length; \ ++ _buffer_iov_length_it += _buffer_iov_length; \ ++ } \ ++ } ++ ++ + namespace ucs { + + class test_abort_exception : public std::exception { +@@ -51,8 +177,8 @@ public: + + private: + const bool m_failed; +-} +-; ++}; ++ + + class test_skip_exception : public std::exception { + public: +@@ -76,6 +202,11 @@ private: + int test_time_multiplier(); + + ++/** ++ * @return System limit on number of TCP connections. ++ */ ++int max_tcp_connections(); ++ + /** + * Signal-safe sleep. + */ +@@ -90,9 +221,9 @@ bool is_inet_addr(const struct sockaddr* ifa_addr); + + + /** +- * Check if the given interface is associated with a device. ++ * Check if the given network device is supported by rdmacm. + */ +-bool is_ib_netdev(const char *ifa_name); ++bool is_rdmacm_netdev(const char *ifa_name); + + + /** +@@ -125,7 +256,8 @@ template + static std::ostream& operator<<(std::ostream& os, const std::vector& vec) { + static const size_t LIMIT = 2000; + size_t i = 0; +- for (std::vector::const_iterator iter = vec.begin(); iter != vec.end(); ++iter) { ++ for (std::vector::const_iterator iter = vec.begin(); ++ iter != vec.end(); ++iter) { + if (i >= LIMIT) { + os << "..."; + break; +@@ -159,7 +291,8 @@ static void fill_random(C& c, size_t size) { + + template + static inline T random_upper() { +- return static_cast((rand() / static_cast(RAND_MAX)) * std::numeric_limits::max()); ++ return static_cast((rand() / static_cast(RAND_MAX)) * ++ std::numeric_limits::max()); + } + + template +@@ -319,15 +452,16 @@ public: + EXPECT_TRUE(value != NULL); + } + +- handle(const T& value, dtor2_t dtor, ArgT *arg) : ++ handle(const T& value, dtor2_t dtor, ArgT arg) : + m_initialized(true), m_value(value), m_dtor(NULL), + m_dtor_with_arg(dtor), m_dtor_arg(arg) + { + EXPECT_TRUE(value != NULL); + } + +- handle(const handle& other) : m_initialized(false), m_value(NULL), m_dtor(NULL), +- m_dtor_with_arg(NULL), m_dtor_arg(NULL) { ++ handle(const handle& other) : m_initialized(false), m_value(NULL), ++ m_dtor(NULL), m_dtor_with_arg(NULL), ++ m_dtor_arg(NULL) { + *this = other; + } + +@@ -507,201 +641,4 @@ private: + + } // ucs + +- +-namespace ucp { +- +-class data_type_desc_t { +-public: +- data_type_desc_t() +- : m_origin(uintptr_t(NULL)), m_length(0), m_dt(0), m_buf(NULL), +- m_count(0), m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { +- memset(m_iov, 0, sizeof(m_iov)); +- }; +- +- data_type_desc_t(ucp_datatype_t datatype, const void *buf, size_t length) +- : m_origin(uintptr_t(buf)), m_length(length), m_buf(NULL), +- m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { +- make(datatype, buf, length); +- } +- +- data_type_desc_t(ucp_datatype_t datatype, const void *buf, size_t length, +- size_t iov_count) +- : m_origin(uintptr_t(buf)), m_length(length), m_buf(NULL), +- m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { +- make(datatype, buf, length, iov_count); +- }; +- +- data_type_desc_t &make(ucp_datatype_t datatype, const void *buf, +- size_t length, size_t iov_count); +- +- data_type_desc_t &make(ucp_datatype_t datatype, const void *buf, +- size_t length) { +- return make(datatype, buf, length, m_iov_cnt_limit); +- }; +- +- data_type_desc_t &forward_to(size_t offset) { +- EXPECT_LE(offset, m_length); +- invalidate(); +- return make(m_dt, (const void *)(m_origin + offset), m_length - offset, +- m_iov_cnt_limit); +- }; +- +- ucp_datatype_t dt() const { +- EXPECT_TRUE(is_valid()); +- return m_dt; +- }; +- +- void *buf() const { +- EXPECT_TRUE(is_valid()); +- return const_cast(m_buf); +- }; +- +- size_t count() const { +- EXPECT_TRUE(is_valid()); +- return m_count; +- }; +- +- bool is_valid() const { +- return (m_buf != NULL) && (m_count != 0) && +- (UCP_DT_IS_IOV(m_dt) ? (m_count <= m_iov_cnt_limit) : +- UCP_DT_IS_CONTIG(m_dt)); +- } +- +-private: +- void invalidate() { +- EXPECT_TRUE(is_valid()); +- m_buf = NULL; +- m_count = 0; +- } +- +- uintptr_t m_origin; +- size_t m_length; +- +- ucp_datatype_t m_dt; +- const void *m_buf; +- size_t m_count; +- +- const size_t m_iov_cnt_limit; +- ucp_dt_iov_t m_iov[40]; +-}; +- +-} // ucp +- +- +-#ifndef UINT16_MAX +-#define UINT16_MAX (65535) +-#endif /* UINT16_MAX */ +- +- +-/* Test output */ +-#define UCS_TEST_MESSAGE \ +- ucs::detail::message_stream("INFO") +- +- +-/* Skip test */ +-#define UCS_TEST_SKIP \ +- do { \ +- throw ucs::test_skip_exception(); \ +- } while(0) +-#define UCS_TEST_SKIP_R(_reason) \ +- do { \ +- throw ucs::test_skip_exception(_reason); \ +- } while(0) +- +- +-/* Abort test */ +-#define UCS_TEST_ABORT(_message) \ +- do { \ +- std::stringstream ss; \ +- ss << _message; \ +- GTEST_MESSAGE_(ss.str().c_str(), ::testing::TestPartResult::kFatalFailure); \ +- throw ucs::test_abort_exception(); \ +- } while(0) +- +- +-/* UCS error check */ +-#define EXPECT_UCS_OK(_expr) \ +- do { \ +- ucs_status_t _status = (_expr); \ +- EXPECT_EQ(UCS_OK, _status) << "Error: " << ucs_status_string(_status); \ +- } while (0) +- +-#define ASSERT_UCS_OK(_expr, ...) \ +- do { \ +- ucs_status_t _status = (_expr); \ +- if ((_status) != UCS_OK) { \ +- UCS_TEST_ABORT("Error: " << ucs_status_string(_status) __VA_ARGS__); \ +- } \ +- } while (0) +- +-#define ASSERT_UCS_OK_OR_INPROGRESS(_expr) \ +- do { \ +- ucs_status_t _status = (_expr); \ +- if ((status) != UCS_OK && (_status) != UCS_INPROGRESS) { \ +- UCS_TEST_ABORT("Error: " << ucs_status_string(_status)); \ +- } \ +- } while (0) +- +-#define EXPECT_UD_CHECK(_val1, _val2, _exp_ud, _exp_non_ud) \ +- do { \ +- if ((GetParam()->tl_name == "ud") || (GetParam()->tl_name == "ud_mlx5")) { \ +- EXPECT_##_exp_ud(_val1, _val2); \ +- } else { \ +- EXPECT_##_exp_non_ud(_val1, _val2); \ +- } \ +- } while (0) +- +- +-/* Run code block with given time limit */ +-#define UCS_TEST_TIME_LIMIT(_seconds) \ +- for (ucs_time_t _start_time = ucs_get_time(), _elapsed = 0; \ +- _start_time != 0; \ +- ((ucs_time_to_sec(_elapsed = ucs_get_time() - _start_time) >= \ +- (_seconds) * ucs::test_time_multiplier()) && \ +- (ucs::perf_retry_count > 0)) \ +- ? (GTEST_NONFATAL_FAILURE_("Time limit exceeded:") << \ +- "Expected time: " << ((_seconds) * ucs::test_time_multiplier()) << " seconds\n" << \ +- "Actual time: " << ucs_time_to_sec(_elapsed) << " seconds", 0) \ +- : 0, \ +- _start_time = 0) +- +- +-/** +- * Scoped exit for C++. Usage: +- * +- * UCS_TEST_SCOPE_EXIT() { } UCS_TEST_SCOPE_EXIT_END +- */ +-#define _UCS_TEST_SCOPE_EXIT(_classname, ...) \ +- class _classname { \ +- public: \ +- _classname() {} \ +- ~_classname() +-#define UCS_TEST_SCOPE_EXIT(...) \ +- _UCS_TEST_SCOPE_EXIT(UCS_PP_APPEND_UNIQUE_ID(onexit), ## __VA_ARGS__) +- +-#define UCS_TEST_SCOPE_EXIT_END \ +- } UCS_PP_APPEND_UNIQUE_ID(onexit_var); +- +-/** +- * Make uct_iov_t iov[iovcnt] array with pointer elements to original buffer +- */ +-#define UCS_TEST_GET_BUFFER_IOV(_name_iov, _name_iovcnt, _buffer_ptr, _buffer_length, _memh, _iovcnt) \ +- uct_iov_t _name_iov[_iovcnt]; \ +- const size_t _name_iovcnt = _iovcnt; \ +- const size_t _buffer_iov_length = _buffer_length / _name_iovcnt; \ +- size_t _buffer_iov_length_it = 0; \ +- for (size_t iov_it = 0; iov_it < _name_iovcnt; ++iov_it) { \ +- _name_iov[iov_it].buffer = (char *)(_buffer_ptr) + _buffer_iov_length_it; \ +- _name_iov[iov_it].count = 1; \ +- _name_iov[iov_it].stride = 0; \ +- _name_iov[iov_it].memh = _memh; \ +- if (iov_it == (_name_iovcnt - 1)) { /* Last iteration */ \ +- _name_iov[iov_it].length = _buffer_length - _buffer_iov_length_it; \ +- } else { \ +- _name_iov[iov_it].length = _buffer_iov_length; \ +- _buffer_iov_length_it += _buffer_iov_length; \ +- } \ +- } +- +- +-#endif ++#endif /* UCS_TEST_HELPERS_H */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_obj_size.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_obj_size.cc +index 4d7bd40e3..fd8a0512e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_obj_size.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_obj_size.cc +@@ -11,12 +11,13 @@ + #include + #include + ++extern "C" { + #include + #include + #include + #include + #include +-#include ++#include + #include + #if HAVE_TL_RC + # include +@@ -30,11 +31,12 @@ + # include + # include + #endif ++} + + class test_obj_size : public ucs::test { + }; + +-#define EXPECTED_SIZE(_obj, _size) EXPECT_EQ(sizeof(_obj), (size_t)_size) ++#define EXPECTED_SIZE(_obj, _size) EXPECT_EQ((size_t)_size, sizeof(_obj)) + + UCS_TEST_F(test_obj_size, size) { + +@@ -42,9 +44,12 @@ UCS_TEST_F(test_obj_size, size) { + UCS_TEST_SKIP_R("Debug data"); + #elif ENABLE_STATS + UCS_TEST_SKIP_R("Statistic enabled"); ++#elif ENABLE_ASSERT ++ UCS_TEST_SKIP_R("Assert enabled"); + #else +- EXPECTED_SIZE(ucp_ep_t, 104); +- EXPECTED_SIZE(ucp_request_t, 224); ++ EXPECTED_SIZE(ucp_ep_t, 64); ++ EXPECTED_SIZE(ucp_request_t, 232); ++ EXPECTED_SIZE(ucp_recv_desc_t, 48); + EXPECTED_SIZE(uct_ep_t, 8); + EXPECTED_SIZE(uct_base_ep_t, 8); + EXPECTED_SIZE(uct_rkey_bundle_t, 24); +@@ -64,8 +69,8 @@ UCS_TEST_F(test_obj_size, size) { + EXPECTED_SIZE(uct_dc_verbs_ep_t, 40); + # endif + # if HAVE_TL_UD +- EXPECTED_SIZE(uct_ud_ep_t, 248); +- EXPECTED_SIZE(uct_ud_verbs_ep_t, 264); ++ EXPECTED_SIZE(uct_ud_ep_t, 240); ++ EXPECTED_SIZE(uct_ud_verbs_ep_t, 256); + # endif + #endif + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.cc +index f46ba368c..ef27243df 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.cc +@@ -28,7 +28,8 @@ void test_perf::rte_comm::push(const void *data, size_t size) { + pthread_mutex_unlock(&m_mutex); + } + +-void test_perf::rte_comm::pop(void *data, size_t size) { ++void test_perf::rte_comm::pop(void *data, size_t size, ++ void (*progress)(void *arg), void *arg) { + bool done = false; + do { + pthread_mutex_lock(&m_mutex); +@@ -38,6 +39,9 @@ void test_perf::rte_comm::pop(void *data, size_t size) { + done = true; + } + pthread_mutex_unlock(&m_mutex); ++ if (!done) { ++ progress(arg); ++ } + } while (!done); + } + +@@ -59,13 +63,14 @@ unsigned test_perf::rte::group_index(void *rte_group) { + return self->index(); + } + +-void test_perf::rte::barrier(void *rte_group) { ++void test_perf::rte::barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg) { + static const uint32_t magic = 0xdeadbeed; + rte *self = reinterpret_cast(rte_group); + uint32_t dummy = magic; + self->m_send.push(&dummy, sizeof(dummy)); + dummy = 0; +- self->m_recv.pop(&dummy, sizeof(dummy)); ++ self->m_recv.pop(&dummy, sizeof(dummy), progress, arg); + ucs_assert_always(dummy == magic); + } + +@@ -97,9 +102,9 @@ void test_perf::rte::recv(void *rte_group, unsigned src, void *buffer, + return; + } + +- self->m_recv.pop(&size, sizeof(size)); ++ self->m_recv.pop(&size, sizeof(size), (void(*)(void*))ucs_empty_function, NULL); + ucs_assert_always(size <= max); +- self->m_recv.pop(buffer, size); ++ self->m_recv.pop(buffer, size, (void(*)(void*))ucs_empty_function, NULL); + } + + void test_perf::rte::exchange_vec(void *rte_group, void * req) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.h +index 743d5cd08..48952b19f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/common/test_perf.h +@@ -45,7 +45,7 @@ private: + + void push(const void *data, size_t size); + +- void pop(void *data, size_t size); ++ void pop(void *data, size_t size, void (*progress)(void *arg), void *arg); + + private: + pthread_mutex_t m_mutex; +@@ -63,7 +63,8 @@ private: + + static unsigned group_index(void *rte_group); + +- static void barrier(void *rte_group); ++ static void barrier(void *rte_group, void (*progress)(void *arg), ++ void *arg); + + static void post_vec(void *rte_group, const struct iovec *iovec, + int iovcnt, void **req); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/cuda_hooks.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/cuda_hooks.cc +index a3feec353..9e2ce5a19 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/cuda_hooks.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/cuda_hooks.cc +@@ -7,66 +7,229 @@ + #include + #include + +-class cuda_hook : public ucs::test { +-}; ++static ucm_event_t alloc_event, free_event; + +-static void *free_ptr; +-static void cuda_mem_event_callback(ucm_event_type_t event_type, ++static void cuda_mem_alloc_callback(ucm_event_type_t event_type, + ucm_event_t *event, void *arg) + { +- free_ptr = event->vm_unmapped.address; ++ alloc_event.mem_type.address = event->mem_type.address; ++ alloc_event.mem_type.size = event->mem_type.size; ++ alloc_event.mem_type.mem_type = event->mem_type.mem_type; + } + +-UCS_TEST_F(cuda_hook, cudafree) { +- ucs_status_t result; +- cudaError_t ret; +- void *ptr, *ptr1; ++static void cuda_mem_free_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, void *arg) ++{ ++ free_event.mem_type.address = event->mem_type.address; ++ free_event.mem_type.size = event->mem_type.size; ++ free_event.mem_type.mem_type = event->mem_type.mem_type; ++} ++ ++ ++class cuda_hooks : public ucs::test { ++protected: ++ ++ virtual void init() { ++ ucs_status_t result; ++ CUresult ret; ++ ucs::test::init(); ++ ++ /* intialize device context */ ++ if (cudaSetDevice(0) != cudaSuccess) { ++ UCS_TEST_SKIP_R("can't set cuda device"); ++ } ++ ++ ret = cuInit(0); ++ if (ret != CUDA_SUCCESS) { ++ UCS_TEST_SKIP_R("can't init cuda device"); ++ } ++ ++ ret = cuDeviceGet(&device, 0); ++ if (ret != CUDA_SUCCESS) { ++ UCS_TEST_SKIP_R("can't get cuda device"); ++ } ++ ++ ret = cuCtxCreate(&context, 0, device); ++ if (ret != CUDA_SUCCESS) { ++ UCS_TEST_SKIP_R("can't create cuda context"); ++ } ++ ++ /* install memory hooks */ ++ result = ucm_set_event_handler(UCM_EVENT_MEM_TYPE_ALLOC, 0, cuda_mem_alloc_callback, ++ reinterpret_cast(this)); ++ ASSERT_UCS_OK(result); ++ ++ result = ucm_set_event_handler(UCM_EVENT_MEM_TYPE_FREE, 0, cuda_mem_free_callback, ++ reinterpret_cast(this)); ++ ASSERT_UCS_OK(result); ++ } + +- /* set cuda device */ +- if (cudaSetDevice(0) != cudaSuccess) { +- UCS_TEST_SKIP_R("can't set cuda device"); ++ virtual void cleanup() { ++ CUresult ret; ++ ++ ucm_unset_event_handler(UCM_EVENT_MEM_TYPE_ALLOC, cuda_mem_alloc_callback, ++ reinterpret_cast(this)); ++ ucm_unset_event_handler(UCM_EVENT_MEM_TYPE_FREE, cuda_mem_free_callback, ++ reinterpret_cast(this)); ++ ++ ret = cuCtxDestroy(context); ++ EXPECT_EQ(ret, CUDA_SUCCESS); ++ ++ ucs::test::cleanup(); ++ } ++ ++ ++ void check_mem_alloc_events(void *ptr, size_t size, ++ int expect_mem_type = UCM_MEM_TYPE_CUDA) { ++ ASSERT_EQ(ptr, alloc_event.mem_type.address); ++ ASSERT_EQ(size, alloc_event.mem_type.size); ++ ASSERT_EQ(expect_mem_type, alloc_event.mem_type.mem_type); + } + +- /* Install memory hooks */ +- result = ucm_set_event_handler(UCM_EVENT_VM_UNMAPPED, 0, cuda_mem_event_callback, +- reinterpret_cast(this)); +- ASSERT_UCS_OK(result); ++ void check_mem_free_events(void *ptr, size_t size, ++ int expect_mem_type = UCM_MEM_TYPE_CUDA) { ++ ASSERT_EQ(ptr, free_event.mem_type.address); ++ ASSERT_EQ(expect_mem_type, free_event.mem_type.mem_type); ++ } ++ ++ CUdevice device; ++ CUcontext context; ++}; ++ ++UCS_TEST_F(cuda_hooks, test_cuMem_Alloc_Free) { ++ CUresult ret; ++ CUdeviceptr dptr, dptr1; ++ ++ /* small allocation */ ++ ret = cuMemAlloc(&dptr, 64); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, 64); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, 64); ++ ++ /* large allocation */ ++ ret = cuMemAlloc(&dptr, (256 * 1024 *1024)); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, (256 * 1024 *1024)); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, (256 * 1024 *1024)); ++ ++ /* multiple allocations, cudafree in reverse order */ ++ ret = cuMemAlloc(&dptr, (1 * 1024 *1024)); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, (1 * 1024 *1024)); ++ ++ ret = cuMemAlloc(&dptr1, (1 * 1024 *1024)); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr1, (1 * 1024 *1024)); ++ ++ ret = cuMemFree(dptr1); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr1, (1 * 1024 *1024)); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, (1 * 1024 *1024)); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cuMemAllocManaged) { ++ CUresult ret; ++ CUdeviceptr dptr; ++ ++ ret = cuMemAllocManaged(&dptr, 64, CU_MEM_ATTACH_GLOBAL); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, 64, UCM_MEM_TYPE_CUDA_MANAGED); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, 0); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cuMemAllocPitch) { ++ CUresult ret; ++ CUdeviceptr dptr; ++ size_t pitch; ++ ++ ret = cuMemAllocPitch(&dptr, &pitch, 4, 8, 4); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_alloc_events((void *)dptr, (4 * 8)); ++ ++ ret = cuMemFree(dptr); ++ ASSERT_EQ(ret, CUDA_SUCCESS); ++ check_mem_free_events((void *)dptr, 0); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cuda_Malloc_Free) { ++ cudaError_t ret; ++ void *ptr, *ptr1; + + /* small allocation */ +- free_ptr = NULL; + ret = cudaMalloc(&ptr, 64); +- EXPECT_EQ(ret, cudaSuccess); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr, 64); + + ret = cudaFree(ptr); +- EXPECT_EQ(ret, cudaSuccess); +- EXPECT_EQ(ptr, free_ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr, 64); + + /* large allocation */ +- free_ptr = NULL; + ret = cudaMalloc(&ptr, (256 * 1024 *1024)); +- EXPECT_EQ(ret, cudaSuccess); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr, (256 * 1024 *1024)); + + ret = cudaFree(ptr); +- EXPECT_EQ(ret, cudaSuccess); +- EXPECT_EQ(ptr, free_ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr, (256 * 1024 *1024)); + + /* multiple allocations, cudafree in reverse order */ +- free_ptr = NULL; + ret = cudaMalloc(&ptr, (1 * 1024 *1024)); +- EXPECT_EQ(ret, cudaSuccess); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr, (1 * 1024 *1024)); + + ret = cudaMalloc(&ptr1, (1 * 1024 *1024)); +- EXPECT_EQ(ret, cudaSuccess); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr1, (1 * 1024 *1024)); + + ret = cudaFree(ptr1); +- EXPECT_EQ(ret, cudaSuccess); +- EXPECT_EQ(ptr1, free_ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr1, (1 * 1024 *1024)); ++ ++ ret = cudaFree(ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr, (1 * 1024 *1024)); ++ ++ /* cudaFree with NULL */ ++ ret = cudaFree(NULL); ++ ASSERT_EQ(ret, cudaSuccess); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cudaMallocManaged) { ++ cudaError_t ret; ++ void *ptr; ++ ++ ret = cudaMallocManaged(&ptr, 64, cudaMemAttachGlobal); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(ptr, 64, UCM_MEM_TYPE_CUDA_MANAGED); + +- free_ptr = NULL; + ret = cudaFree(ptr); +- EXPECT_EQ(ret, cudaSuccess); +- EXPECT_EQ(ptr, free_ptr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(ptr, 0); ++} ++ ++UCS_TEST_F(cuda_hooks, test_cudaMallocPitch) { ++ cudaError_t ret; ++ void *devPtr; ++ size_t pitch; ++ ++ ret = cudaMallocPitch(&devPtr, &pitch, 4, 8); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_alloc_events(devPtr, (4 * 8)); + +- ucm_unset_event_handler(UCM_EVENT_VM_UNMAPPED, cuda_mem_event_callback, +- reinterpret_cast(this)); ++ ret = cudaFree(devPtr); ++ ASSERT_EQ(ret, cudaSuccess); ++ check_mem_free_events(devPtr, 0); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/malloc_hook.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/malloc_hook.cc +index dbb767a07..5dd500579 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/malloc_hook.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/malloc_hook.cc +@@ -1,5 +1,5 @@ + /** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. ++ * Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. + * + * See file LICENSE for terms. + */ +@@ -15,11 +15,13 @@ + #include + #include + #include ++#include ++#include + + extern "C" { + #include + #include +-#include ++#include + #include + #include + } +@@ -28,93 +30,166 @@ extern "C" { + # define HAVE_MALLOC_STATES 1 + #endif /* HAVE_MALLOC_SET_STATE && HAVE_MALLOC_GET_STATE */ + ++#define EXPECT_INCREASED(_value, _prev, _size, _name) \ ++ { \ ++ EXPECT_GE(_value, (_prev) + (_size)) << _name; \ ++ _prev = _value; \ ++ } ++ ++template ++class mhook_thread { ++public: ++ mhook_thread(T *test): m_test(test) ++ { ++ pthread_create(&m_thread, NULL, thread_func, reinterpret_cast(m_test)); ++ } ++ ++ ~mhook_thread() { ++ join(); ++ delete m_test; ++ } ++ ++ void join() { ++ void *retval; ++ pthread_join(m_thread, &retval); ++ } ++ ++protected: ++ T *m_test; ++ pthread_t m_thread; ++ ++ static void *thread_func(void *arg) { ++ T *test = reinterpret_cast(arg); ++ test->test(); ++ return NULL; ++ } ++}; ++ ++template ++class mmap_event { ++public: ++ mmap_event(T *test): m_test(test), m_events(0) ++ { ++ } ++ ++ ~mmap_event() ++ { ++ unset(); ++ } ++ ++ ucs_status_t set(int events) ++ { ++ ucs_status_t status; ++ ++ status = ucm_set_event_handler(events, 0, mem_event_callback, ++ reinterpret_cast(m_test)); ++ ASSERT_UCS_OK(status); ++ m_events |= events; ++ return status; ++ } ++ ++ void unset() ++ { ++ if (m_events) { ++ ucm_unset_event_handler(m_events, mem_event_callback, ++ reinterpret_cast(m_test)); ++ m_events = 0; ++ } ++ } ++ ++protected: ++ T *m_test; ++ int m_events; ++ ++ static void mem_event_callback(ucm_event_type_t event_type, ++ ucm_event_t *event, ++ void *arg) ++ { ++ T *test = reinterpret_cast(arg); ++ test->mem_event(event_type, event); ++ } ++}; ++ + + class malloc_hook : public ucs::test { ++ friend class mmap_event; + protected: ++ void mem_event(ucm_event_type_t event_type, ucm_event_t *event) ++ { ++ m_got_event = 1; ++ } ++ + virtual void init() { +- size_t free_space, min_free_space, prev_free_space, alloc_size; +- struct mallinfo mi; ++ ucs_status_t status; ++ mmap_event event(this); + ++ m_got_event = 0; + ucm_malloc_state_reset(128 * 1024, 128 * 1024); + malloc_trim(0); +- +- /* Take up free space so we would definitely get mmap events */ +- min_free_space = SIZE_MAX; +- alloc_size = 0; +- mi = mallinfo(); +- prev_free_space = mi.fsmblks + mi.fordblks; +- +- while (alloc_size < (size_t)(prev_free_space * 0.90)) { +- m_pts.push_back(malloc(small_alloc_size)); +- alloc_size += small_alloc_size; +- } ++ status = event.set(UCM_EVENT_VM_MAPPED); ++ ASSERT_UCS_OK(status); + + for (;;) { + void *ptr = malloc(small_alloc_size); +- mi = mallinfo(); +- free_space = mi.fsmblks + mi.fordblks; +- if (free_space > min_free_space) { ++ if (m_got_event) { + /* If the heap grew, the minimal size is the previous one */ + free(ptr); +- min_free_space = free_space; + break; + } else { + m_pts.push_back(ptr); +- alloc_size += small_alloc_size; +- min_free_space = free_space; + } + } ++ event.unset(); ++ } + +- UCS_TEST_MESSAGE << "Reduced heap free space from " << prev_free_space << +- " to " << free_space << " after allocating " << +- alloc_size << " bytes"; ++ static int bistro_munmap_hook(void *addr, size_t length) ++ { ++ UCM_BISTRO_PROLOGUE; ++ bistro_call_counter++; ++ int res = (intptr_t)syscall(SYS_munmap, addr, length); ++ UCM_BISTRO_EPILOGUE; ++ return res; ++ } ++ ++ void skip_on_bistro() { ++ /* BISTRO is disabled under valgrind, we may run tests */ ++ if ((ucm_global_opts.mmap_hook_mode == UCM_MMAP_HOOK_BISTRO) && ++ !RUNNING_ON_VALGRIND) { ++ UCS_TEST_SKIP_R("skipping on BISTRO hooks"); ++ } + } + + public: + static int small_alloc_count; +- static const size_t small_alloc_size = 10000; ++ static const size_t small_alloc_size = 10000; + ucs::ptr_vector m_pts; ++ int m_got_event; ++ static volatile int bistro_call_counter; + }; + +-int malloc_hook::small_alloc_count = 1000 / ucs::test_time_multiplier(); ++int malloc_hook::small_alloc_count = 1000 / ucs::test_time_multiplier(); ++volatile int malloc_hook::bistro_call_counter = 0; + + class test_thread { + public: + test_thread(const std::string& name, int num_threads, pthread_barrier_t *barrier, +- malloc_hook *test) : ++ malloc_hook *test, void (test_thread::*test_func)() = &test_thread::test) : + m_name(name), m_num_threads(num_threads), m_barrier(barrier), +- m_map_size(0), m_unmap_size(0), m_test(test) ++ m_map_size(0), m_unmap_size(0), m_test(test), m_event(this) + { + pthread_mutex_init(&m_stats_lock, NULL); +- pthread_create(&m_thread, NULL, thread_func, reinterpret_cast(this)); + } + + ~test_thread() { +- join(); + pthread_mutex_destroy(&m_stats_lock); + } + +- void join() { +- void *retval; +- pthread_join(m_thread, &retval); +- } ++ void test(); ++ void mem_event(ucm_event_type_t event_type, ucm_event_t *event); + + private: + typedef std::pair range; + +- static void *thread_func(void *arg) { +- test_thread *self = reinterpret_cast(arg); +- self->test(); +- return NULL; +- } +- +- static void mem_event_callback(ucm_event_type_t event_type, ucm_event_t *event, +- void *arg) +- { +- test_thread *self = reinterpret_cast(arg); +- self->mem_event(event_type, event); +- } +- + bool is_ptr_in_range(void *ptr, size_t size, const std::vector &ranges) { + for (std::vector::const_iterator iter = ranges.begin(); iter != ranges.end(); ++iter) { + if ((ptr >= iter->first) && ((char*)ptr < iter->second)) { +@@ -124,16 +199,12 @@ private: + return false; + } + +- void test(); +- void mem_event(ucm_event_type_t event_type, ucm_event_t *event); +- + static pthread_mutex_t lock; + static pthread_barrier_t barrier; + + std::string m_name; + int m_num_threads; + pthread_barrier_t *m_barrier; +- pthread_t m_thread; + + pthread_mutex_t m_stats_lock; + size_t m_map_size; +@@ -142,6 +213,7 @@ private: + std::vector m_unmap_ranges; + + malloc_hook *m_test; ++ mmap_event m_event; + }; + + pthread_mutex_t test_thread::lock = PTHREAD_MUTEX_INITIALIZER; +@@ -192,9 +264,7 @@ void test_thread::test() { + pthread_barrier_wait(m_barrier); + + /* Install memory hooks */ +- result = ucm_set_event_handler(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED, +- 0, mem_event_callback, +- reinterpret_cast(this)); ++ result = m_event.set(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED); + ASSERT_UCS_OK(result); + + /* Allocate small pointers with new heap manager */ +@@ -316,32 +386,36 @@ void test_thread::test() { + std::cout.flush(); + pthread_mutex_unlock(&lock); + +- ucm_unset_event_handler(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED, +- mem_event_callback, +- reinterpret_cast(this)); ++ m_event.unset(); + } + + UCS_TEST_F(malloc_hook, single_thread) { ++ skip_on_bistro(); ++ + pthread_barrier_t barrier; + pthread_barrier_init(&barrier, NULL, 1); + { +- test_thread thread("single-thread", 1, &barrier, this); ++ mhook_thread(new test_thread("single-thread", 1, &barrier, this)); + } + pthread_barrier_destroy(&barrier); + } + + UCS_TEST_F(malloc_hook, multi_threads) { ++ typedef mhook_thread thread_t; ++ + static const int num_threads = 8; +- ucs::ptr_vector threads; ++ ucs::ptr_vector threads; + pthread_barrier_t barrier; + ++ skip_on_bistro(); ++ + malloc_trim(0); + + pthread_barrier_init(&barrier, NULL, num_threads); + for (int i = 0; i < num_threads; ++i) { + std::stringstream ss; + ss << "thread " << i << "/" << num_threads; +- threads.push_back(new test_thread(ss.str(), num_threads, &barrier, this)); ++ threads.push_back(new thread_t(new test_thread(ss.str(), num_threads, &barrier, this))); + } + + threads.clear(); +@@ -384,44 +458,39 @@ public: + + malloc_hook_cplusplus() : + m_mapped_size(0), m_unmapped_size(0), +- m_dynamic_mmap_config(ucm_global_config.enable_dynamic_mmap_thresh) { ++ m_dynamic_mmap_config(ucm_global_opts.enable_dynamic_mmap_thresh), ++ m_event(this) { + } + + ~malloc_hook_cplusplus() { +- ucm_global_config.enable_dynamic_mmap_thresh = m_dynamic_mmap_config; ++ ucm_global_opts.enable_dynamic_mmap_thresh = m_dynamic_mmap_config; + } + + void set() { + ucs_status_t status; +- status = ucm_set_event_handler(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED, +- 0, mem_event_callback, +- reinterpret_cast(this)); ++ status = m_event.set(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED); + ASSERT_UCS_OK(status); + } + + void unset() { +- ucm_unset_event_handler(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED, +- mem_event_callback, reinterpret_cast(this)); ++ m_event.unset(); + } + +-protected: +- static void mem_event_callback(ucm_event_type_t event_type, +- ucm_event_t *event, void *arg) ++ void mem_event(ucm_event_type_t event_type, ucm_event_t *event) + { +- malloc_hook_cplusplus *self = +- reinterpret_cast(arg); + switch (event_type) { + case UCM_EVENT_VM_MAPPED: +- self->m_mapped_size += event->vm_mapped.size; ++ m_mapped_size += event->vm_mapped.size; + break; + case UCM_EVENT_VM_UNMAPPED: +- self->m_unmapped_size += event->vm_unmapped.size; ++ m_unmapped_size += event->vm_unmapped.size; + break; + default: + break; + } + } + ++protected: + double measure_alloc_time(size_t size, unsigned iters) + { + ucs_time_t start_time = ucs_get_time(); +@@ -459,7 +528,7 @@ protected: + + m_unmapped_size = 0; + strs.clear(); +- if (ucm_global_config.enable_dynamic_mmap_thresh) { ++ if (ucm_global_opts.enable_dynamic_mmap_thresh) { + EXPECT_EQ(0ul, m_unmapped_size); + } else { + EXPECT_GE(m_unmapped_size, size); +@@ -471,6 +540,139 @@ protected: + size_t m_mapped_size; + size_t m_unmapped_size; + int m_dynamic_mmap_config; ++ mmap_event m_event; ++}; ++ ++ ++class mmap_hooks { ++public: ++ mmap_hooks(const std::string& name, int num_threads, pthread_barrier_t *barrier): ++ m_num_threads(num_threads), m_mapped_size(0), m_unmapped_size(0), ++ m_name(name), m_barrier(barrier), m_event(this) ++ { ++ } ++ ++ void mem_event(ucm_event_type_t event_type, ucm_event_t *event) ++ { ++ switch (event_type) { ++ case UCM_EVENT_VM_MAPPED: ++ m_mapped_size += event->vm_mapped.size; ++ break; ++ case UCM_EVENT_VM_UNMAPPED: ++ m_unmapped_size += event->vm_unmapped.size; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ void test() ++ { ++ /* ++ * Test memory mapping functions which override an existing mapping ++ */ ++ size_t size = ucs_get_page_size() * 800; ++ size_t mapped_size = 0; ++ size_t unmapped_size = 0; ++ void *buffer; ++ int shmid; ++ ucs_status_t status; ++ ++ EXPECT_EQ(0u, m_mapped_size) << m_name; ++ EXPECT_EQ(0u, m_unmapped_size) << m_name; ++ ++ status = m_event.set(UCM_EVENT_VM_MAPPED|UCM_EVENT_VM_UNMAPPED); ++ ASSERT_UCS_OK(status); ++ ++ pthread_barrier_wait(m_barrier); ++ ++ /* 1. Map a large buffer */ ++ { ++ buffer = mmap(NULL, size, PROT_READ|PROT_WRITE, ++ MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); ++ ASSERT_NE(MAP_FAILED, buffer) << strerror(errno); ++ ++ EXPECT_INCREASED(m_mapped_size, mapped_size, size, m_name); ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, 0, m_name); ++ } ++ ++ /* ++ * 2. Map another buffer in the same place. ++ * Expected behavior: unmap event on the old buffer ++ */ ++ { ++ void *remap = mmap(buffer, size, PROT_READ|PROT_WRITE, ++ MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0); ++ ASSERT_EQ(buffer, remap); ++ ++ EXPECT_INCREASED(m_mapped_size, mapped_size, size, m_name); ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ ++ /* 3. Create a shared memory segment */ ++ { ++ shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | SHM_R | SHM_W); ++ ASSERT_NE(-1, shmid) << strerror(errno) << m_name; ++ } ++ ++ /* ++ * 4. Attach the segment at the same buffer address. ++ * Expected behavior: unmap event on the old buffer ++ */ ++ { ++ void *shmaddr = shmat(shmid, buffer, SHM_REMAP); ++ ASSERT_EQ(buffer, shmaddr) << m_name; ++ ++ EXPECT_INCREASED(m_mapped_size, mapped_size, size, m_name); ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ ++ /* 5. Detach the sysv segment */ ++ { ++ shmdt(buffer); ++ ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ ++ /* 6. Remove the shared memory segment */ ++ { ++ int ret = shmctl(shmid, IPC_RMID, NULL); ++ ASSERT_NE(-1, ret) << strerror(errno); ++ } ++ ++ /* 7. Unmap the buffer */ ++ { ++ munmap(buffer, size); ++ ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ ++ /* 8. sbrk call - single thread only */ ++ { ++ if (!RUNNING_ON_VALGRIND && m_num_threads < 2) { ++ /* valgrind failed when sbrk is called directly, ++ * also sbrk is not thread safe */ ++ ++ /* sbrk call is used to extend/cut memory heap, ++ * don't add any evaluations between calls sbrk+/sbrk- - it ++ * may break heap */ ++ sbrk(size); ++ sbrk(-size); ++ ++ EXPECT_INCREASED(m_mapped_size, mapped_size, size, m_name); ++ EXPECT_INCREASED(m_unmapped_size, unmapped_size, size, m_name); ++ } ++ } ++ pthread_barrier_wait(m_barrier); ++ } ++ ++protected: ++ int m_num_threads; ++ size_t m_mapped_size; ++ size_t m_unmapped_size; ++ std::string m_name; ++ pthread_barrier_t *m_barrier; ++ mmap_event m_event; + }; + + +@@ -503,12 +705,16 @@ UCS_TEST_F(malloc_hook_cplusplus, dynamic_mmap_enable) { + if (RUNNING_ON_VALGRIND) { + UCS_TEST_SKIP_R("skipping on valgrind"); + } +- EXPECT_TRUE(ucm_global_config.enable_dynamic_mmap_thresh); ++ skip_on_bistro(); ++ EXPECT_TRUE(ucm_global_opts.enable_dynamic_mmap_thresh); + test_dynamic_mmap_thresh(); + } + + UCS_TEST_F(malloc_hook_cplusplus, dynamic_mmap_disable) { +- ucm_global_config.enable_dynamic_mmap_thresh = 0; ++ skip_on_bistro(); ++ ++ ucm_global_opts.enable_dynamic_mmap_thresh = 0; ++ + test_dynamic_mmap_thresh(); + } + +@@ -523,6 +729,8 @@ UCS_TEST_F(malloc_hook_cplusplus, mallopt) { + char *p; + size_t size; + ++ skip_on_bistro(); ++ + /* This test can not be run with the other + * tests because it assumes that malloc hooks + * are not initialized +@@ -585,7 +793,7 @@ UCS_TEST_F(malloc_hook_cplusplus, mmap_ptrs) { + UCS_TEST_SKIP_R("skipping on valgrind"); + } + +- ucm_global_config.enable_dynamic_mmap_thresh = 0; ++ ucm_global_opts.enable_dynamic_mmap_thresh = 0; + set(); + + const size_t size = ucm_dlmallopt_get(M_MMAP_THRESHOLD) * 2; +@@ -647,3 +855,157 @@ UCS_TEST_F(malloc_hook_cplusplus, mmap_ptrs) { + unset(); + + } ++ ++UCS_TEST_F(malloc_hook_cplusplus, remap_override_single_thread) { ++ pthread_barrier_t barrier; ++ pthread_barrier_init(&barrier, NULL, 1); ++ { ++ mhook_thread(new mmap_hooks("single-thread", 1, &barrier)); ++ } ++ pthread_barrier_destroy(&barrier); ++} ++ ++UCS_TEST_F(malloc_hook_cplusplus, remap_override_multi_threads) { ++ typedef mhook_thread thread_t; ++ ++ static const int num_threads = 8; ++ ucs::ptr_vector threads; ++ pthread_barrier_t barrier; ++ ++ pthread_barrier_init(&barrier, NULL, num_threads); ++ for (int i = 0; i < num_threads; ++i) { ++ std::stringstream ss; ++ ss << "thread " << i << "/" << num_threads; ++ threads.push_back(new thread_t(new mmap_hooks(ss.str(), num_threads, &barrier))); ++ } ++ ++ threads.clear(); ++ pthread_barrier_destroy(&barrier); ++} ++ ++typedef int (munmap_f_t)(void *addr, size_t len); ++ ++UCS_TEST_F(malloc_hook, bistro_patch) { ++ const char *symbol = "munmap"; ++ ucm_bistro_restore_point_t *rp = NULL; ++ ucs_status_t status; ++ munmap_f_t *munmap_f; ++ void *ptr; ++ int res; ++ uint64_t UCS_V_UNUSED patched; ++ uint64_t UCS_V_UNUSED origin; ++ ++ if (RUNNING_ON_VALGRIND) { ++ UCS_TEST_SKIP_R("skipping on valgrind"); ++ } ++ ++ /* set hook to mmap call */ ++ status = ucm_bistro_patch(symbol, (void*)bistro_munmap_hook, &rp); ++ ASSERT_UCS_OK(status); ++ EXPECT_NE((intptr_t)rp, NULL); ++ ++ munmap_f = (munmap_f_t*)ucm_bistro_restore_addr(rp); ++ EXPECT_NE((intptr_t)munmap_f, NULL); ++ ++ /* save partial body of patched function */ ++ patched = *(uint64_t*)munmap_f; ++ ++ bistro_call_counter = 0; ++ ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); ++ EXPECT_NE(ptr, MAP_FAILED); ++ ++ /* try to call munmap, we should jump into munmap_hook instead */ ++ res = munmap_f(ptr, 4096); ++ EXPECT_EQ(res, 0); ++ /* due to cache coherency issues on ARM systems could be executed ++ * original function body, so, skip counter evaluation */ ++ EXPECT_GT(bistro_call_counter, 0); ++ ++ /* restore original mmap body */ ++ status = ucm_bistro_restore(rp); ++ ASSERT_UCS_OK(status); ++ ++ bistro_call_counter = 0; ++ /* now try to call mmap, we should NOT jump into mmap_hook */ ++ ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); ++ EXPECT_NE(ptr, MAP_FAILED); ++ res = munmap_f(ptr, 4096); ++ EXPECT_EQ(res, 0); ++ EXPECT_EQ(bistro_call_counter, 0); /* hook is not called */ ++ /* save partial body of restored function */ ++ origin = *(uint64_t*)munmap_f; ++ ++#if !defined (__powerpc64__) ++ EXPECT_NE(patched, origin); ++#endif ++} ++ ++/* test for mmap events are fired from non-direct load modules ++ * we are trying to load lib1, from lib1 load lib2, and ++ * fire mmap event from lib2 */ ++UCS_TEST_F(malloc_hook, dlopen) { ++#ifndef GTEST_UCM_HOOK_LIB_DIR ++# error "Missing build configuration" ++#else ++ typedef void (fire_mmap_f)(void); ++ typedef void* (load_lib_f)(const char *path); ++ ++ const char *libdlopen_load = "/libdlopen_test_do_load.so"; ++ const char *libdlopen_mmap = "/libdlopen_test_do_mmap.so"; ++ const char *load_lib = "load_lib"; ++ const char *fire_mmap = "fire_mmap"; ++ ++ std::string lib_load; ++ std::string lib_mmap; ++ void *lib; ++ void *lib2; ++ load_lib_f *load; ++ fire_mmap_f *fire; ++ ucs_status_t status; ++ mmap_event event(this); ++ ++ status = event.set(UCM_EVENT_VM_MAPPED); ++ ASSERT_UCS_OK(status); ++ ++ lib_load = std::string(GTEST_UCM_HOOK_LIB_DIR) + libdlopen_load; ++ lib_mmap = std::string(GTEST_UCM_HOOK_LIB_DIR) + libdlopen_mmap; ++ ++ UCS_TEST_MESSAGE << "Loading " << lib_load; ++ UCS_TEST_MESSAGE << "Loading " << lib_mmap; ++ ++ lib = dlopen(lib_load.c_str(), RTLD_NOW); ++ EXPECT_NE((uintptr_t)lib, (uintptr_t)NULL); ++ if (!lib) { ++ goto no_lib; ++ } ++ ++ load = (load_lib_f*)dlsym(lib, load_lib); ++ EXPECT_NE((uintptr_t)load, (uintptr_t)NULL); ++ if (!load) { ++ goto no_load; ++ } ++ ++ lib2 = load(lib_mmap.c_str()); ++ EXPECT_NE((uintptr_t)lib2, (uintptr_t)NULL); ++ if (!lib2) { ++ goto no_load; ++ } ++ ++ fire = (fire_mmap_f*)dlsym(lib2, fire_mmap); ++ EXPECT_NE((uintptr_t)fire, (uintptr_t)NULL); ++ if (!fire) { ++ goto no_fire; ++ } ++ ++ m_got_event = 0; ++ fire(); ++ EXPECT_GT(m_got_event, 0); ++ ++no_fire: ++ dlclose(lib2); ++no_load: ++ dlclose(lib); ++no_lib: ++ event.unset(); ++#endif /* GTEST_UCM_HOOK_LIB_DIR */ ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/Makefile.am b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/Makefile.am +new file mode 100644 +index 000000000..5aaf5d0e4 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/Makefile.am +@@ -0,0 +1,16 @@ ++# ++# Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++# ++# See file LICENSE for terms. ++# ++ ++ ++noinst_lib_LTLIBRARIES = \ ++ libdlopen_test_do_mmap.la \ ++ libdlopen_test_do_load.la ++ ++libdlopen_test_do_mmap_la_SOURCES = dlopen_test_do_mmap.c ++libdlopen_test_do_load_la_SOURCES = dlopen_test_do_load.c ++noinst_libdir = ${PWD}/.noinst ++ ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_load.c b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_load.c +new file mode 100644 +index 000000000..a6dae7e5f +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_load.c +@@ -0,0 +1,12 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++ ++void* load_lib(const char *path) ++{ ++ return dlopen(path, RTLD_NOW); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_mmap.c b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_mmap.c +new file mode 100644 +index 000000000..91bead84e +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucm/test_dlopen/dlopen_test_do_mmap.c +@@ -0,0 +1,15 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++ ++void fire_mmap(void) ++{ ++ void* map_ptr; ++ ++ map_ptr = mmap(0, 4096, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); ++ munmap(map_ptr, 4096); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.cc +index 9d54c90a7..53322c652 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.cc +@@ -38,7 +38,7 @@ void test_ucp_atomic::init() { + + template + void test_ucp_atomic::blocking_add(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) ++ ucp_rkey_h rkey, std::string& expected_data) + { + ucs_status_t status; + T add, prev; +@@ -63,126 +63,35 @@ void test_ucp_atomic::unaligned_blocking_add64(entity *e, size_t max_size, + void *memheap_addr, ucp_rkey_h rkey, + std::string& expected_data) + { +- /* Test that unaligned addresses generate error */ + ucs_status_t status; +- status = ucp_atomic_add64(e->ep(), 0, (uintptr_t)memheap_addr + 1, rkey); ++ { ++ /* Test that unaligned addresses generate error */ ++ scoped_log_handler slh(hide_errors_logger); ++ status = ucp_atomic_add64(e->ep(), 0, (uintptr_t)memheap_addr + 1, rkey); ++ } + EXPECT_EQ(UCS_ERR_INVALID_PARAM, status); + expected_data.clear(); + } + +-template +-void test_ucp_atomic::blocking_fadd(entity *e, size_t max_size, +- void *memheap_addr, ucp_rkey_h rkey, +- std::string& expected_data) +-{ +- ucs_status_t status; +- T add, prev, result; +- +- prev = *(T*)memheap_addr; +- add = (T)ucs::rand() * (T)ucs::rand(); +- +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_fadd32(e->ep(), add, (uintptr_t)memheap_addr, rkey, +- (uint32_t*)(void*)&result); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_fadd64(e->ep(), add, (uintptr_t)memheap_addr, rkey, +- (uint64_t*)(void*)&result); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } +- ASSERT_UCS_OK(status); +- +- EXPECT_EQ(prev, result); +- +- expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = add + prev; +-} +- +-template +-void test_ucp_atomic::blocking_swap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) +-{ +- ucs_status_t status; +- T swap, prev, result; +- +- prev = *(T*)memheap_addr; +- swap = (T)ucs::rand() * (T)ucs::rand(); +- +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_swap32(e->ep(), swap, (uintptr_t)memheap_addr, +- rkey, (uint32_t*)(void*)&result); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_swap64(e->ep(), swap, (uintptr_t)memheap_addr, +- rkey, (uint64_t*)(void*)&result); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } +- ASSERT_UCS_OK(status); +- +- EXPECT_EQ(prev, result); +- +- expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = swap; +-} +- +-template +-void test_ucp_atomic::blocking_cswap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) +-{ +- ucs_status_t status; +- T compare, swap, prev, result; +- +- prev = *(T*)memheap_addr; +- if ((ucs::rand() % 2) == 0) { +- compare = prev; /* success mode */ +- } else { +- compare = ~prev; /* fail mode */ +- } +- swap = (T)ucs::rand() * (T)ucs::rand(); +- +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_cswap32(e->ep(), compare, swap, +- (uintptr_t)memheap_addr, rkey, +- (uint32_t*)(void*)&result); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_cswap64(e->ep(), compare, swap, +- (uintptr_t)memheap_addr, rkey, +- (uint64_t*)(void*)&result); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } +- ASSERT_UCS_OK(status); +- +- EXPECT_EQ(prev, result); +- +- expected_data.resize(sizeof(T)); +- if (compare == prev) { +- *(T*)&expected_data[0] = swap; +- } else { +- *(T*)&expected_data[0] = prev; +- } +-} +- + template + ucs_status_t test_ucp_atomic::ucp_atomic_post_nbi(ucp_ep_h ep, ucp_atomic_post_op_t opcode, +- T value, void *remote_addr, +- ucp_rkey_h rkey) ++ T value, void *remote_addr, ++ ucp_rkey_h rkey) + { + return ucp_atomic_post(ep, opcode, value, sizeof(T), (uintptr_t)remote_addr, rkey); + } + +-template +-void test_ucp_atomic::nb_add(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) ++template ++void test_ucp_atomic::nb_post(entity *e, size_t max_size, void *memheap_addr, ++ ucp_rkey_h rkey, std::string& expected_data) + { + ucs_status_t status; +- T add, prev; ++ T val, prev; + +- prev = *(T*)memheap_addr; +- add = (T)ucs::rand() * (T)ucs::rand(); ++ prev = *(T*)memheap_addr; ++ val = (T)ucs::rand() * (T)ucs::rand(); + +- status = test_ucp_atomic::ucp_atomic_post_nbi(e->ep(), UCP_ATOMIC_POST_OP_ADD, add, +- memheap_addr, rkey); ++ status = test_ucp_atomic::ucp_atomic_post_nbi(e->ep(), OP, val, memheap_addr, rkey); + + if (status == UCS_INPROGRESS) { + flush_worker(*e); +@@ -190,20 +99,21 @@ void test_ucp_atomic::nb_add(entity *e, size_t max_size, void *memheap_addr, + ASSERT_UCS_OK(status); + } + expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = add + prev; ++ *(T*)&expected_data[0] = atomic_op_val(val, prev); + } + +-void test_ucp_atomic::unaligned_nb_add64(entity *e, size_t max_size, +- void *memheap_addr, ucp_rkey_h rkey, +- std::string& expected_data) ++template ++void test_ucp_atomic::unaligned_nb_post(entity *e, size_t max_size, ++ void *memheap_addr, ucp_rkey_h rkey, ++ std::string& expected_data) + { +- /* Test that unaligned addresses generate error */ + ucs_status_t status; +- +- status = test_ucp_atomic::ucp_atomic_post_nbi(e->ep(), +- UCP_ATOMIC_POST_OP_ADD, 0, +- (void *)((uintptr_t)memheap_addr + 1), +- rkey); ++ { ++ /* Test that unaligned addresses generate error */ ++ scoped_log_handler slh(hide_errors_logger); ++ status = test_ucp_atomic::ucp_atomic_post_nbi ++ (e->ep(), OP, 0, (void *)((uintptr_t)memheap_addr + 1), rkey); ++ } + EXPECT_EQ(UCS_ERR_INVALID_PARAM, status); + expected_data.clear(); + } +@@ -218,41 +128,19 @@ ucs_status_ptr_t test_ucp_atomic::ucp_atomic_fetch(ucp_ep_h ep, + (uintptr_t)remote_addr, rkey, send_completion); + } + +-template +-void test_ucp_atomic::nb_fadd(entity *e, size_t max_size, +- void *memheap_addr, ucp_rkey_h rkey, +- std::string& expected_data) +-{ +- void *amo_req; +- T add, prev, result; +- +- prev = *(T*)memheap_addr; +- add = (T)ucs::rand() * (T)ucs::rand(); +- +- amo_req = test_ucp_atomic::ucp_atomic_fetch(e->ep(), UCP_ATOMIC_FETCH_OP_FADD, +- add, &result, memheap_addr, rkey); +- if(UCS_PTR_IS_PTR(amo_req)){ +- wait(amo_req); +- } +- +- EXPECT_EQ(prev, result); +- +- expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = add + prev; +-} +- +-template +-void test_ucp_atomic::nb_swap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data) ++template ++void test_ucp_atomic::nb_fetch(entity *e, size_t max_size, ++ void *memheap_addr, ucp_rkey_h rkey, ++ std::string& expected_data) + { +- T swap, prev, result; + void *amo_req; ++ T val, prev, result; + +- prev = *(T*)memheap_addr; +- swap = (T)ucs::rand() * (T)ucs::rand(); ++ prev = *(T*)memheap_addr; ++ val = (T)ucs::rand() * (T)ucs::rand(); + +- amo_req = test_ucp_atomic::ucp_atomic_fetch(e->ep(), UCP_ATOMIC_FETCH_OP_SWAP, +- swap, &result, memheap_addr, rkey); ++ amo_req = test_ucp_atomic::ucp_atomic_fetch(e->ep(), FOP, ++ val, &result, memheap_addr, rkey); + if(UCS_PTR_IS_PTR(amo_req)){ + wait(amo_req); + } +@@ -260,7 +148,7 @@ void test_ucp_atomic::nb_swap(entity *e, size_t max_size, void *memheap_addr, + EXPECT_EQ(prev, result); + + expected_data.resize(sizeof(T)); +- *(T*)&expected_data[0] = swap; ++ *(T*)&expected_data[0] = atomic_fop_val(val, prev); + } + + template +@@ -319,33 +207,48 @@ UCS_TEST_P(test_ucp_atomic32, atomic_add) { + } + + UCS_TEST_P(test_ucp_atomic32, atomic_add_nb) { +- test(&test_ucp_atomic32::nb_add, false); +- test(&test_ucp_atomic32::nb_add, true); ++ test(&test_ucp_atomic32::nb_post, false); ++ test(&test_ucp_atomic32::nb_post, true); + } + +-UCS_TEST_P(test_ucp_atomic32, atomic_fadd) { +- test(&test_ucp_atomic32::blocking_fadd, false); +- test(&test_ucp_atomic32::blocking_fadd, true); ++UCS_TEST_P(test_ucp_atomic32, atomic_and_nb) { ++ test(&test_ucp_atomic32::nb_post, false); ++ test(&test_ucp_atomic32::nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic32, atomic_or_nb) { ++ test(&test_ucp_atomic32::nb_post, false); ++ test(&test_ucp_atomic32::nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic32, atomic_xor_nb) { ++ test(&test_ucp_atomic32::nb_post, false); ++ test(&test_ucp_atomic32::nb_post, true); + } + + UCS_TEST_P(test_ucp_atomic32, atomic_fadd_nb) { +- test(&test_ucp_atomic32::nb_fadd, false); +- test(&test_ucp_atomic32::nb_fadd, true); ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic32, atomic_swap) { +- test(&test_ucp_atomic32::blocking_swap, false); +- test(&test_ucp_atomic32::blocking_swap, true); ++UCS_TEST_P(test_ucp_atomic32, atomic_fand_nb) { ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic32, atomic_swap_nb) { +- test(&test_ucp_atomic32::nb_swap, false); +- test(&test_ucp_atomic32::nb_swap, true); ++UCS_TEST_P(test_ucp_atomic32, atomic_for_nb) { ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic32, atomic_cswap) { +- test(&test_ucp_atomic32::blocking_cswap, false); +- test(&test_ucp_atomic32::blocking_cswap, true); ++UCS_TEST_P(test_ucp_atomic32, atomic_fxor_nb) { ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic32, atomic_swap_nb) { ++ test(&test_ucp_atomic32::nb_fetch, false); ++ test(&test_ucp_atomic32::nb_fetch, true); + } + + UCS_TEST_P(test_ucp_atomic32, atomic_cswap_nb) { +@@ -370,35 +273,49 @@ UCS_TEST_P(test_ucp_atomic64, atomic_add) { + } + + UCS_TEST_P(test_ucp_atomic64, atomic_add_nb) { +- test(&test_ucp_atomic64::nb_add, false); +- test(&test_ucp_atomic64::nb_add, true); ++ test(&test_ucp_atomic64::nb_post, false); ++ test(&test_ucp_atomic64::nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, atomic_and_nb) { ++ test(&test_ucp_atomic64::nb_post, false); ++ test(&test_ucp_atomic64::nb_post, true); + } + +-UCS_TEST_P(test_ucp_atomic64, atomic_fadd) { +- test(&test_ucp_atomic64::blocking_fadd, false); +- test(&test_ucp_atomic64::blocking_fadd, true); ++UCS_TEST_P(test_ucp_atomic64, atomic_or_nb) { ++ test(&test_ucp_atomic64::nb_post, false); ++ test(&test_ucp_atomic64::nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, atomic_xor_nb) { ++ test(&test_ucp_atomic64::nb_post, false); ++ test(&test_ucp_atomic64::nb_post, true); + } + + UCS_TEST_P(test_ucp_atomic64, atomic_fadd_nb) { +- test(&test_ucp_atomic64::nb_fadd, false); +- test(&test_ucp_atomic64::nb_fadd, true); ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic64, atomic_swap) { +- test(&test_ucp_atomic64::blocking_swap, false); +- test(&test_ucp_atomic64::blocking_swap, true); ++UCS_TEST_P(test_ucp_atomic64, atomic_fand_nb) { ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic64, atomic_swap_nb) { +- test(&test_ucp_atomic64::nb_swap, false); +- test(&test_ucp_atomic64::nb_swap, true); ++UCS_TEST_P(test_ucp_atomic64, atomic_for_nb) { ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); + } + +-UCS_TEST_P(test_ucp_atomic64, atomic_cswap) { +- test(&test_ucp_atomic64::blocking_cswap, false); +- test(&test_ucp_atomic64::blocking_cswap, true); ++UCS_TEST_P(test_ucp_atomic64, atomic_fxor_nb) { ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); + } + ++UCS_TEST_P(test_ucp_atomic64, atomic_swap_nb) { ++ test(&test_ucp_atomic64::nb_fetch, false); ++ test(&test_ucp_atomic64::nb_fetch, true); ++} + + UCS_TEST_P(test_ucp_atomic64, atomic_cswap_nb) { + test(&test_ucp_atomic64::nb_cswap, false); +@@ -412,8 +329,23 @@ UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_add) { + } + + UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_add_nb) { +- test(&test_ucp_atomic::unaligned_nb_add64, false); +- test(&test_ucp_atomic::unaligned_nb_add64, true); ++ test(&test_ucp_atomic::unaligned_nb_post, false); ++ test(&test_ucp_atomic::unaligned_nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_and_nb) { ++ test(&test_ucp_atomic::unaligned_nb_post, false); ++ test(&test_ucp_atomic::unaligned_nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_or_nb) { ++ test(&test_ucp_atomic::unaligned_nb_post, false); ++ test(&test_ucp_atomic::unaligned_nb_post, true); ++} ++ ++UCS_TEST_P(test_ucp_atomic64, unaligned_atomic_xor_nb) { ++ test(&test_ucp_atomic::unaligned_nb_post, false); ++ test(&test_ucp_atomic::unaligned_nb_post, true); + } + #endif + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.h +index 4370e3733..0c48efed8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_atomic.h +@@ -30,40 +30,63 @@ public: + void unaligned_blocking_add64(entity *e, size_t max_size, void *memheap_addr, + ucp_rkey_h rkey, std::string& expected_data); + +- template +- void blocking_fadd(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void blocking_swap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void blocking_cswap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void nb_add(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- void unaligned_nb_add64(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void nb_fadd(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); +- +- template +- void nb_swap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); ++ template ++ void unaligned_nb_post(entity *e, size_t max_size, void *memheap_addr, ++ ucp_rkey_h rkey, std::string& expected_data); + + template + void nb_cswap(entity *e, size_t max_size, void *memheap_addr, +- ucp_rkey_h rkey, std::string& expected_data); ++ ucp_rkey_h rkey, std::string& expected_data); + + template + void test(F f, bool malloc_allocate); + ++ template ++ void nb_post(entity *e, size_t max_size, void *memheap_addr, ++ ucp_rkey_h rkey, std::string& expected_data); ++ ++ template ++ void nb_fetch(entity *e, size_t max_size, void *memheap_addr, ++ ucp_rkey_h rkey, std::string& expected_data); ++ ++ template ++ T atomic_op_val(T v1, T v2) ++ { ++ /* coverity[switch_selector_expr_is_constant] */ ++ switch (OP) { ++ case UCP_ATOMIC_POST_OP_ADD: ++ return v1 + v2; ++ case UCP_ATOMIC_POST_OP_AND: ++ return v1 & v2; ++ case UCP_ATOMIC_POST_OP_OR: ++ return v1 | v2; ++ case UCP_ATOMIC_POST_OP_XOR: ++ return v1 ^ v2; ++ default: ++ return 0; ++ } ++ } ++ ++ template ++ T atomic_fop_val(T v1, T v2) ++ { ++ /* coverity[switch_selector_expr_is_constant] */ ++ switch (OP) { ++ case UCP_ATOMIC_FETCH_OP_FADD: ++ return v1 + v2; ++ case UCP_ATOMIC_FETCH_OP_FAND: ++ return v1 & v2; ++ case UCP_ATOMIC_FETCH_OP_FOR: ++ return v1 | v2; ++ case UCP_ATOMIC_FETCH_OP_FXOR: ++ return v1 ^ v2; ++ case UCP_ATOMIC_FETCH_OP_SWAP: ++ return v1; ++ default: ++ return 0; ++ } ++ } ++ + private: + static void send_completion(void *request, ucs_status_t status){} + template +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_context.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_context.cc +index bbb7656de..964a2cd13 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_context.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_context.cc +@@ -78,14 +78,19 @@ UCS_TEST_P(test_ucp_version, wrong_api_version) { + ucp_params_t params = get_ctx_params(); + ucp_context_h ucph; + ucs_status_t status; ++ size_t warn_count; + { +- wrap_errors(); ++ scoped_log_handler slh(hide_warns_logger); ++ warn_count = m_warnings.size(); + status = ucp_init_version(99, 99, ¶ms, config.get(), &ucph); +- restore_errors(); + } +- if (status == UCS_OK) { ++ if (status != UCS_OK) { ++ ADD_FAILURE() << "Failed to create UCP with wrong version"; ++ } else { ++ if (m_warnings.size() == warn_count) { ++ ADD_FAILURE() << "Missing wrong version warning"; ++ } + ucp_cleanup(ucph); +- ADD_FAILURE() << "Created UCP with wrong version"; + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_fence.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_fence.cc +index b911afd08..4e5afc4ef 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_fence.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_fence.cc +@@ -5,6 +5,7 @@ + */ + + #include "test_ucp_atomic.h" ++#include "common/gtest.h" + + class test_ucp_fence : public test_ucp_atomic { + public: +@@ -12,19 +13,16 @@ public: + uint64_t *result_buf, void *memheap_addr, + ucp_rkey_h rkey); + ++ static void send_cb(void *request, ucs_status_t status) ++ { ++ } ++ + template + void blocking_add(entity *e, uint64_t *initial_buf, uint64_t *result_buf, + void *memheap_addr, ucp_rkey_h rkey) { +- ucs_status_t status; +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_add32(e->ep(), (uint32_t)(*initial_buf), +- (uintptr_t)memheap_addr, rkey); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_add64(e->ep(), (uint64_t)(*initial_buf), +- (uintptr_t)memheap_addr, rkey); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } ++ ucs_status_t status = ucp_atomic_post(e->ep(), UCP_ATOMIC_POST_OP_ADD, ++ *initial_buf, sizeof(T), ++ (uintptr_t)memheap_addr, rkey); + ASSERT_UCS_OK(status); + } + +@@ -32,19 +30,10 @@ public: + void blocking_fadd(entity *e, uint64_t *initial_buf, uint64_t *result_buf, + void *memheap_addr, ucp_rkey_h rkey) + { +- ucs_status_t status; +- if (sizeof(T) == sizeof(uint32_t)) { +- status = ucp_atomic_fadd32(e->ep(), (uint32_t)(*initial_buf), +- (uintptr_t)memheap_addr, +- rkey, (uint32_t*)(void*)result_buf); +- } else if (sizeof(T) == sizeof(uint64_t)) { +- status = ucp_atomic_fadd64(e->ep(), (uint64_t)(*initial_buf), +- (uintptr_t)memheap_addr, +- rkey, (uint64_t*)(void*)result_buf); +- } else { +- status = UCS_ERR_UNSUPPORTED; +- } +- ASSERT_UCS_OK(status); ++ void *request = ucp_atomic_fetch_nb(e->ep(), UCP_ATOMIC_FETCH_OP_FADD, ++ *initial_buf, (T*)result_buf, sizeof(T), ++ (uintptr_t)memheap_addr, rkey, send_cb); ++ wait(request); + } + + template +@@ -65,7 +54,7 @@ public: + } + + ~worker() { +- ucs_assert(!running); ++ assert(!running); + } + + static void *run(void *arg) { +@@ -142,6 +131,7 @@ protected: + uint32_t error = 0; + + sender().connect(&receiver(), get_ep_params()); ++ flush_worker(sender()); /* avoid deadlock for blocking amo */ + + params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | + UCP_MEM_MAP_PARAM_FIELD_LENGTH | +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mem_type.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mem_type.cc +index afa947d92..6e99e2ab2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mem_type.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mem_type.cc +@@ -5,9 +5,11 @@ + */ + + #include "ucp_test.h" ++extern "C" { + #include "uct/api/uct.h" + #include "ucp/core/ucp_context.h" + #include "ucp/core/ucp_mm.h" ++} + + + class test_ucp_mem_type : public ucp_test { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_memheap.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_memheap.cc +index cac3e8c1e..f1eacf890 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_memheap.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_memheap.cc +@@ -102,9 +102,8 @@ void test_ucp_memheap::test_nonblocking_implicit_stream_xfer(nonblocking_send_fu + + ucs_assert(size * i + alignment <= memheap_size); + +- (this->*send)(&sender(), size, +- (void*)((uintptr_t)memheap + alignment + i * size), +- rkey, expected_data[i]); ++ char *ptr = (char*)memheap + alignment + i * size; ++ (this->*send)(&sender(), size, (void*)ptr, rkey, expected_data[i]); + + ASSERT_UCS_OK(status); + +@@ -117,9 +116,10 @@ void test_ucp_memheap::test_nonblocking_implicit_stream_xfer(nonblocking_send_fu + } + + for (int i = 0; i < max_iter; ++i) { +- EXPECT_EQ(expected_data[i], +- std::string((char *)((uintptr_t)memheap + alignment + i * size), +- expected_data[i].length())); ++ char *ptr = (char*)memheap + alignment + i * size; ++ EXPECT_EQ(expected_data[i].substr(0, 20), ++ std::string(ptr, expected_data[i].length()).substr(0, 20)) << ++ ((void*)ptr); + } + + ucp_rkey_destroy(rkey); +@@ -159,6 +159,9 @@ void test_ucp_memheap::test_blocking_xfer(blocking_send_func_t send, + + sender().connect(&receiver(), get_ep_params()); + ++ /* avoid deadlock for blocking rma/amo */ ++ flush_worker(sender()); ++ + ucp_mem_h memh; + void *memheap = NULL; + +@@ -223,7 +226,6 @@ void test_ucp_memheap::test_blocking_xfer(blocking_send_func_t send, + expected_data.resize(size); + + ucs::fill_random(expected_data); +- + (this->*send)(&sender(), size, (void*)((uintptr_t)memheap + offset), + rkey, expected_data); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mmap.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mmap.cc +index 192cefac2..965634b3d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mmap.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_mmap.cc +@@ -30,14 +30,19 @@ protected: + bool resolve_rma(entity *e, ucp_rkey_h rkey); + bool resolve_amo(entity *e, ucp_rkey_h rkey); + bool resolve_rma_bw(entity *e, ucp_rkey_h rkey); ++ void test_length0(unsigned flags); + void test_rkey_management(entity *e, ucp_mem_h memh, bool is_dummy); + }; + + bool test_ucp_mmap::resolve_rma(entity *e, ucp_rkey_h rkey) + { +- hide_errors(); +- ucs_status_t status = UCP_RKEY_RESOLVE(rkey, e->ep(), rma); +- restore_errors(); ++ ucs_status_t status; ++ ++ { ++ scoped_log_handler slh(hide_errors_logger); ++ status = UCP_RKEY_RESOLVE(rkey, e->ep(), rma); ++ } ++ + if (status == UCS_OK) { + EXPECT_NE(UCP_NULL_LANE, rkey->cache.rma_lane); + return true; +@@ -51,9 +56,13 @@ bool test_ucp_mmap::resolve_rma(entity *e, ucp_rkey_h rkey) + + bool test_ucp_mmap::resolve_amo(entity *e, ucp_rkey_h rkey) + { +- hide_errors(); +- ucs_status_t status = UCP_RKEY_RESOLVE(rkey, e->ep(), amo); +- restore_errors(); ++ ucs_status_t status; ++ ++ { ++ scoped_log_handler slh(hide_errors_logger); ++ status = UCP_RKEY_RESOLVE(rkey, e->ep(), amo); ++ } ++ + if (status == UCS_OK) { + EXPECT_NE(UCP_NULL_LANE, rkey->cache.amo_lane); + return true; +@@ -70,7 +79,7 @@ bool test_ucp_mmap::resolve_rma_bw(entity *e, ucp_rkey_h rkey) + ucp_lane_index_t lane; + uct_rkey_t uct_rkey; + +- lane = ucp_rkey_get_rma_bw_lane(rkey, e->ep(), &uct_rkey, 0); ++ lane = ucp_rkey_get_rma_bw_lane(rkey, e->ep(), UCT_MD_MEM_TYPE_HOST, &uct_rkey, 0); + if (lane != UCP_NULL_LANE) { + return true; + } else { +@@ -203,8 +212,8 @@ UCS_TEST_P(test_ucp_mmap, reg) { + } + } + +-UCS_TEST_P(test_ucp_mmap, dummy_mem) { +- ++void test_ucp_mmap::test_length0(unsigned flags) ++{ + ucs_status_t status; + int buf_num = 2; + ucp_mem_h memh[buf_num]; +@@ -222,7 +231,7 @@ UCS_TEST_P(test_ucp_mmap, dummy_mem) { + UCP_MEM_MAP_PARAM_FIELD_FLAGS; + params.address = NULL; + params.length = 0; +- params.flags = rand_flags() | UCP_MEM_MAP_ALLOCATE; ++ params.flags = rand_flags() | flags; + + status = ucp_mem_map(sender().ucph(), ¶ms, &memh[0]); + ASSERT_UCS_OK(status); +@@ -238,6 +247,14 @@ UCS_TEST_P(test_ucp_mmap, dummy_mem) { + } + } + ++UCS_TEST_P(test_ucp_mmap, reg0) { ++ test_length0(0); ++} ++ ++UCS_TEST_P(test_ucp_mmap, alloc0) { ++ test_length0(UCP_MEM_MAP_ALLOCATE); ++} ++ + UCS_TEST_P(test_ucp_mmap, alloc_advise) { + ucs_status_t status; + bool is_dummy; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_peer_failure.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_peer_failure.cc +index 9df647e6a..7b0a62c91 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_peer_failure.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_peer_failure.cc +@@ -5,655 +5,409 @@ + */ + + #include "test_ucp_tag.h" +-#include "ucp/api/ucp_def.h" ++#include "ucp_datatype.h" + + extern "C" { +-#include ++#include /* for testing memory consumption */ ++#include // for debug + } + ++class test_ucp_peer_failure : public ucp_test { ++public: ++ test_ucp_peer_failure(); ++ ++ static std::vector ++ enum_test_params(const ucp_params_t& ctx_params, const std::string& name, ++ const std::string& test_case_name, const std::string& tls); ++ ++ ucp_ep_params_t get_ep_params(); + +-class test_ucp_peer_failure_base { + protected: + enum { +- FAIL_AFTER_WIREUP = ucp_test::DEFAULT_PARAM_VARIANT, +- FAIL_IMMEDIATELY ++ TEST_TAG = UCS_BIT(0), ++ TEST_RMA = UCS_BIT(1), ++ FAIL_IMM = UCS_BIT(2) + }; + +- test_ucp_peer_failure_base() { +- /* Set small TL timeouts to reduce testing time */ +- m_env.push_back(new ucs::scoped_setenv("UCX_RC_TIMEOUT", "10us")); +- m_env.push_back(new ucs::scoped_setenv("UCX_RC_RETRY_COUNT", "2")); +- std::string ud_timeout = ucs::to_string(1 * ucs::test_time_multiplier()) + "s"; +- m_env.push_back(new ucs::scoped_setenv("UCX_UD_TIMEOUT", ud_timeout.c_str())); +- } ++ enum { ++ STABLE_EP_INDEX, ++ FAILING_EP_INDEX ++ }; + +- virtual ucp_ep_params_t get_ep_params() { +- ucp_ep_params_t params; +- memset(¶ms, 0, sizeof(params)); +- params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | +- UCP_EP_PARAM_FIELD_ERR_HANDLER; +- params.err_mode = UCP_ERR_HANDLING_MODE_PEER; +- params.err_handler.cb = err_cb; +- params.err_handler.arg = NULL; +- return params; +- } ++ typedef ucs::handle mem_handle_t; ++ ++ void set_timeouts(); ++ static void err_cb(void *arg, ucp_ep_h ep, ucs_status_t status); ++ ucp_ep_h stable_sender(); ++ ucp_ep_h failing_sender(); ++ entity& stable_receiver(); ++ entity& failing_receiver(); ++ void *send_nb(ucp_ep_h ep, ucp_rkey_h rkey); ++ void *recv_nb(entity& e); ++ void fail_receiver(); ++ void smoke_test(bool stable_pair); ++ static void unmap_memh(ucp_mem_h memh, ucp_context_h context); ++ void get_rkey(ucp_ep_h ep, entity& dst, mem_handle_t& memh, ++ ucs::handle& rkey); ++ void set_rkeys(); ++ static void send_cb(void *request, ucs_status_t status); ++ static void recv_cb(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t *info); + +- void init() { +- m_err_cntr = 0; +- m_err_status = UCS_OK; +- } ++ virtual void cleanup(); + +- static void err_cb(void *arg, ucp_ep_h ep, ucs_status_t status) { +- EXPECT_EQ(UCS_ERR_ENDPOINT_TIMEOUT, status); +- m_err_status = status; +- ++m_err_cntr; +- } ++ void do_test(size_t msg_size, int pre_msg_count, bool force_close, ++ bool request_must_fail); + +-protected: +- static size_t m_err_cntr; +- static ucs_status_t m_err_status; ++ size_t m_err_count; ++ ucs_status_t m_err_status; ++ std::string m_sbuf, m_rbuf; ++ mem_handle_t m_stable_memh, m_failing_memh; ++ ucs::handle m_stable_rkey, m_failing_rkey; + ucs::ptr_vector m_env; + }; + +-size_t test_ucp_peer_failure_base::m_err_cntr = 0; +-ucs_status_t test_ucp_peer_failure_base::m_err_status = UCS_OK; +- +- +-class test_ucp_peer_failure : +- public test_ucp_tag, +- protected test_ucp_peer_failure_base { +-public: +- test_ucp_peer_failure() : m_msg_size(1024) { +- } +- +- static std::vector +- enum_test_params(const ucp_params_t& ctx_params, +- const std::string& name, +- const std::string& test_case_name, +- const std::string& tls) +- { +- std::vector result = +- test_ucp_tag::enum_test_params(ctx_params, name, test_case_name, tls); +- +- generate_test_params_variant(ctx_params, name, test_case_name, tls, +- FAIL_AFTER_WIREUP, result); +- generate_test_params_variant(ctx_params, name, test_case_name, tls, +- FAIL_IMMEDIATELY, result); +- return result; +- } +- +- virtual void init(); +- virtual void cleanup(); +- +- void test_status_after(bool request_must_fail); +- void test_force_close(); +- +-protected: +- virtual ucp_ep_params_t get_ep_params() { +- return test_ucp_peer_failure_base::get_ep_params(); +- } +- +- void fail_receiver() { +- /* TODO: need to handle non-empty TX window in UD EP destructor", +- * see debug message (ud_ep.c:220) +- * ucs_debug("ep=%p id=%d conn_id=%d has %d unacked packets", +- * self, self->ep_id, self->conn_id, +- * (int)ucs_queue_length(&self->tx.window)); +- */ +- flush_worker(receiver()); +- m_entities.remove(&receiver()); +- } ++UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure) + +- void smoke_test() { +- long buf = 0; +- request *req = recv_nb(&buf, sizeof(buf), DATATYPE, 0, 0); +- send_b(&buf, sizeof(buf), DATATYPE, 0, 0); +- wait_and_validate(req); +- } + +- void wait_err() { +- while (!m_err_cntr) { +- progress(); +- } +- } ++test_ucp_peer_failure::test_ucp_peer_failure() : m_err_count(0), m_err_status(UCS_OK) { ++ ucs::fill_random(m_sbuf); ++ set_timeouts(); ++} + +- static void err_cb_mod(void *arg, ucp_ep_h ep, ucs_status_t status) { +- EXPECT_EQ(uintptr_t(MAGIC), uintptr_t(arg)); +- err_cb(arg, ep, status); +- m_err_cb_mod = true; +- } ++std::vector ++test_ucp_peer_failure::enum_test_params(const ucp_params_t& ctx_params, ++ const std::string& name, ++ const std::string& test_case_name, ++ const std::string& tls) ++{ ++ std::vector result; + +-protected: +- const size_t m_msg_size; +- static bool m_err_cb_mod; +-}; ++ ucp_params_t params = ucp_test::get_ctx_params(); + +-bool test_ucp_peer_failure::m_err_cb_mod = false; ++ params.field_mask |= UCP_PARAM_FIELD_FEATURES; + +-void test_ucp_peer_failure::init() { +- m_err_cb_mod = false; ++ params.features = UCP_FEATURE_TAG; ++ generate_test_params_variant(params, name, test_case_name + "/tag", tls, ++ TEST_TAG, result); ++ generate_test_params_variant(params, name, test_case_name + "/tag_fail_imm", ++ tls, TEST_TAG | FAIL_IMM, result); + +- test_ucp_peer_failure_base::init(); +- test_ucp_tag::init(); +- if (GetParam().variant != FAIL_IMMEDIATELY) { +- smoke_test(); +- } ++ params.features = UCP_FEATURE_RMA; ++ generate_test_params_variant(params, name, test_case_name + "/rma", tls, ++ TEST_RMA, result); ++ generate_test_params_variant(params, name, test_case_name + "/rma_fail_imm", ++ tls, TEST_RMA | FAIL_IMM, result); + +- /* Make second pair */ +- create_entity(true); +- create_entity(false); +- sender().connect(&receiver(), get_ep_params()); +- if (GetParam().variant != FAIL_IMMEDIATELY) { +- smoke_test(); +- } +- wrap_errors(); +- +- ucp_ep_params_t ep_params_mod = {0}; +- ep_params_mod.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLER; +- ep_params_mod.err_handler.cb = err_cb_mod; +- /* NOTE: using of ucp_ep_params_t::user_data field is more preferable but +- * need to test err_handler.arg as well */ +- ep_params_mod.err_handler.arg = reinterpret_cast(uintptr_t(MAGIC)); +- +- for (size_t i = 0; i < m_entities.size(); ++i) { +- for (int widx = 0; widx < e(i).get_num_workers(); ++widx) { +- for (int epidx = 0; epidx < e(i).get_num_eps(widx); ++epidx) { +- void *req = e(i).modify_ep(ep_params_mod, widx, epidx); +- ucp_test::wait(req, widx); +- } +- } +- } ++ return result; + } + +-void test_ucp_peer_failure::cleanup() { +- restore_errors(); +- test_ucp_tag::cleanup(); ++ucp_ep_params_t test_ucp_peer_failure::get_ep_params() { ++ ucp_ep_params_t params; ++ memset(¶ms, 0, sizeof(params)); ++ params.field_mask = UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | ++ UCP_EP_PARAM_FIELD_ERR_HANDLER; ++ params.err_mode = UCP_ERR_HANDLING_MODE_PEER; ++ params.err_handler.cb = err_cb; ++ params.err_handler.arg = reinterpret_cast(this); ++ return params; + } + +-void test_ucp_peer_failure::test_status_after(bool request_must_fail) +-{ +- fail_receiver(); +- +- std::vector buf(m_msg_size, 0); +- request *req = send_nb(buf.data(), buf.size(), DATATYPE, +- 0x111337); +- wait_err(); +- EXPECT_NE(UCS_OK, m_err_status); +- EXPECT_TRUE(m_err_cb_mod); +- +- if (UCS_PTR_IS_PTR(req)) { +- /* The request may either succeed or fail, even though the data is not +- * delivered - depends on when the error is detected on sender side and +- * if zcopy/bcopy protocol is used. In any case, the request must +- * complete, and all resources have to be released. +- */ +- EXPECT_TRUE(req->completed); +- if (request_must_fail) { +- EXPECT_EQ(m_err_status, req->status); +- } else { +- EXPECT_TRUE((m_err_status == req->status) || (UCS_OK == req->status)); +- } +- request_release(req); +- } +- +- ucs_status_ptr_t status_ptr = ucp_tag_send_nb(sender().ep(), NULL, 0, DATATYPE, +- 0x111337, NULL); +- EXPECT_FALSE(UCS_PTR_IS_PTR(status_ptr)); +- EXPECT_EQ(m_err_status, UCS_PTR_STATUS(status_ptr)); +- +- /* Destroy failed sender */ +- sender().destroy_worker(); +- m_entities.remove(&sender()); +- +- /* Check workability of second pair */ +- smoke_test(); ++void test_ucp_peer_failure::set_timeouts() { ++ /* Set small TL timeouts to reduce testing time */ ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_TIMEOUT", "10ms")); ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_RNR_TIMEOUT", "10ms")); ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_RETRY_COUNT", "2")); ++ std::string ud_timeout = ucs::to_string(3 * ucs::test_time_multiplier()) + "s"; ++ m_env.push_back(new ucs::scoped_setenv("UCX_UD_TIMEOUT", ud_timeout.c_str())); + } + +-void test_ucp_peer_failure::test_force_close() +-{ +- const size_t msg_size = 16000; +- const size_t iter = 1000; +- uint8_t *buf = (uint8_t *)calloc(msg_size, iter); +- struct mallinfo mem_before, mem_after; +- std::vector reqs; ++void test_ucp_peer_failure::err_cb(void *arg, ucp_ep_h ep, ucs_status_t status) { ++ test_ucp_peer_failure *self = reinterpret_cast(arg); ++ EXPECT_EQ(UCS_ERR_ENDPOINT_TIMEOUT, status); ++ self->m_err_status = status; ++ ++self->m_err_count; ++} + +- reqs.reserve(iter); +- for (size_t i = 0; i < iter; ++i) { +- request *sreq = send_nb(&buf[i * msg_size], msg_size, DATATYPE, 17); ++ucp_ep_h test_ucp_peer_failure::stable_sender() { ++ return sender().ep(0, STABLE_EP_INDEX); ++} + +- if (UCS_PTR_IS_PTR(sreq)) { +- reqs.push_back(sreq); +- } else if (UCS_PTR_IS_ERR(sreq)) { +- EXPECT_EQ(UCS_ERR_NO_RESOURCE, UCS_PTR_STATUS(sreq)); +- break; +- } +- } ++ucp_ep_h test_ucp_peer_failure::failing_sender() { ++ return sender().ep(0, FAILING_EP_INDEX); ++} + +- fail_receiver(); ++ucp_test::entity& test_ucp_peer_failure::stable_receiver() { ++ return m_entities.at(m_entities.size() - 2); ++} + +- mem_before = mallinfo(); ++ucp_test::entity& test_ucp_peer_failure::failing_receiver() { ++ return m_entities.at(m_entities.size() - 1); ++} + +- request *close_req = (request *)ucp_ep_close_nb(sender().ep(), +- UCP_EP_CLOSE_MODE_FORCE); +- if (UCS_PTR_IS_PTR(close_req)) { +- wait(close_req); +- ucp_request_release(close_req); ++void *test_ucp_peer_failure::send_nb(ucp_ep_h ep, ucp_rkey_h rkey) { ++ if (GetParam().variant & TEST_TAG) { ++ return ucp_tag_send_nb(ep, &m_sbuf[0], m_sbuf.size(), DATATYPE, 0, ++ send_cb); ++ } else if (GetParam().variant & TEST_RMA) { ++ return ucp_put_nb(ep, &m_sbuf[0], m_sbuf.size(), (uintptr_t)&m_rbuf[0], ++ rkey, send_cb); + } else { +- EXPECT_FALSE(UCS_PTR_IS_ERR(close_req)); +- } +- +- mem_after = mallinfo(); +- /* Too low chance to predict memory consumption on wire up for all TLS */ +- if (GetParam().variant != FAIL_IMMEDIATELY) { +- EXPECT_GT(mem_before.uordblks, mem_after.uordblks); +- } +- +- /* The EP can't be used now */ +- sender().revoke_ep(); +- +- while (!reqs.empty()) { +- EXPECT_NE(UCS_INPROGRESS, ucp_request_test(reqs.back(), NULL)); +- ucp_request_release(reqs.back()); +- reqs.pop_back(); ++ ucs_fatal("invalid test case"); + } +- +- /* Check that TX polling is working well */ +- while (sender().progress()); +- +- /* When all requests on sender are done we need to prevent LOCAL_FLUSH +- * in test teardown. Receiver is killed and doesn't respond on FC requests +- */ +- sender().destroy_worker(); +- free(buf); + } + +-UCS_TEST_P(test_ucp_peer_failure, disable_sync_send) { +- /* 1GB memory markup takes too long time with valgrind, reduce to 1MB */ +- const size_t max_size = RUNNING_ON_VALGRIND ? (1024 * 1024) : +- (1024 * 1024 * 1024); +- std::vector buf(max_size, 0); +- request *req; +- +- /* Make sure API is disabled for any size and data type */ +- for (size_t size = 1; size <= max_size; size *= 2) { +- req = send_sync_nb(buf.data(), size, DATATYPE, 0x111337); +- EXPECT_FALSE(UCS_PTR_IS_PTR(req)); +- EXPECT_EQ(UCS_ERR_UNSUPPORTED, UCS_PTR_STATUS(req)); +- +- ucp::data_type_desc_t dt_desc(DATATYPE_IOV, buf.data(), size); +- req = send_sync_nb(dt_desc.buf(), dt_desc.count(), dt_desc.dt(), 0x111337); +- EXPECT_FALSE(UCS_PTR_IS_PTR(req)); +- EXPECT_EQ(UCS_ERR_UNSUPPORTED, UCS_PTR_STATUS(req)); ++void *test_ucp_peer_failure::recv_nb(entity& e) { ++ ucs_assert(m_rbuf.size() >= m_sbuf.size()); ++ if (GetParam().variant & TEST_TAG) { ++ return ucp_tag_recv_nb(e.worker(), &m_rbuf[0], m_rbuf.size(), DATATYPE, 0, ++ 0, recv_cb); ++ } else if (GetParam().variant & TEST_RMA) { ++ return NULL; ++ } else { ++ ucs_fatal("invalid test case"); + } + } + +-UCS_TEST_P(test_ucp_peer_failure, status_after_error) { +- test_status_after(false); ++void test_ucp_peer_failure::fail_receiver() { ++ /* TODO: need to handle non-empty TX window in UD EP destructor", ++ * see debug message (ud_ep.c:220) ++ * ucs_debug("ep=%p id=%d conn_id=%d has %d unacked packets", ++ * self, self->ep_id, self->conn_id, ++ * (int)ucs_queue_length(&self->tx.window)); ++ */ ++ // TODO use force-close to close connections ++ flush_worker(failing_receiver()); ++ m_failing_memh.reset(); ++ failing_receiver().cleanup(); + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure) +- +- +-class test_ucp_peer_failure_zcopy : public test_ucp_peer_failure +-{ +-public: +- virtual void init() { +- modify_config("ZCOPY_THRESH", ucs::to_string(m_msg_size - 1)); +- test_ucp_peer_failure::init(); +- } +-}; +- +-UCS_TEST_P(test_ucp_peer_failure_zcopy, status_after_error) { +- test_status_after(true); ++void test_ucp_peer_failure::smoke_test(bool stable_pair) { ++ void *rreq = recv_nb(stable_pair ? stable_receiver() : failing_receiver()); ++ void *sreq = send_nb(stable_pair ? stable_sender() : failing_sender(), ++ stable_pair ? m_stable_rkey : m_failing_rkey); ++ wait(sreq); ++ wait(rreq); ++ EXPECT_EQ(m_sbuf, m_rbuf); + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure_zcopy) +- +- +-class test_ucp_peer_failure_zcopy_multi : public test_ucp_peer_failure_zcopy ++void test_ucp_peer_failure::unmap_memh(ucp_mem_h memh, ucp_context_h context) + { +-public: +- virtual void init() { +- /* MAX BCOPY is internally used as fragment size */ +- m_env.push_back(new ucs::scoped_setenv("UCX_MAX_BCOPY", +- (ucs::to_string(m_msg_size/2) + "b").c_str())); +- /* HW TM does not support multiprotocols and eager protocol for messages +- * bigger than UCT segment size */ +- m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_ENABLE", "n")); +- test_ucp_peer_failure_zcopy::init(); ++ ucs_status_t status = ucp_mem_unmap(context, memh); ++ if (status != UCS_OK) { ++ ucs_warn("failed to unmap memory: %s", ucs_status_string(status)); + } +-}; +- +-UCS_TEST_P(test_ucp_peer_failure_zcopy_multi, status_after_error) { +- test_status_after(true); + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure_zcopy_multi) +- +- +-class test_ucp_peer_failure_with_rma : public test_ucp_peer_failure { +-public: +- enum { +- FAIL_ON_RMA = FAIL_IMMEDIATELY + 1 +- }; +- +- static std::vector +- enum_test_params(const ucp_params_t& ctx_params, +- const std::string& name, +- const std::string& test_case_name, +- const std::string& tls) +- { +- std::vector result = +- test_ucp_peer_failure::enum_test_params(ctx_params, name, +- test_case_name, tls); +- +- generate_test_params_variant(ctx_params, name, test_case_name, tls, +- FAIL_ON_RMA, result); +- return result; +- } +- +- static ucp_params_t get_ctx_params() { +- ucp_params_t params = test_ucp_tag::get_ctx_params(); +- params.features |= UCP_FEATURE_RMA; +- return params; +- } +-}; +- +-UCS_TEST_P(test_ucp_peer_failure_with_rma, status_after_error) { +- unsigned buf = 0; ++void test_ucp_peer_failure::get_rkey(ucp_ep_h ep, entity& dst, mem_handle_t& memh, ++ ucs::handle& rkey) { + ucp_mem_map_params_t params; ++ + memset(¶ms, 0, sizeof(params)); + params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | + UCP_MEM_MAP_PARAM_FIELD_LENGTH; +- params.address = &buf; +- params.length = sizeof(buf); ++ params.address = &m_rbuf[0]; ++ params.length = m_rbuf.size(); + +- ucp_mem_h memh; +- ucs_status_t status = ucp_mem_map(receiver().ucph(), ¶ms, &memh); +- ASSERT_UCS_OK(status); +- ucp_mem_attr_t mem_attr; +- mem_attr.field_mask = UCP_MEM_ATTR_FIELD_ADDRESS; +- status = ucp_mem_query(memh, &mem_attr); ++ ucp_mem_h ucp_memh; ++ ucs_status_t status = ucp_mem_map(dst.ucph(), ¶ms, &ucp_memh); + ASSERT_UCS_OK(status); ++ memh.reset(ucp_memh, unmap_memh, dst.ucph()); + + void *rkey_buffer; + size_t rkey_buffer_size; +- status = ucp_rkey_pack(receiver().ucph(), memh, &rkey_buffer, &rkey_buffer_size); +- ASSERT_UCS_OK(status); +- ucp_rkey_h rkey; +- status = ucp_ep_rkey_unpack(sender().ep(), rkey_buffer, &rkey); ++ status = ucp_rkey_pack(dst.ucph(), memh, &rkey_buffer, &rkey_buffer_size); + ASSERT_UCS_OK(status); +- ucp_rkey_buffer_release(rkey_buffer); +- ucp_mem_unmap(receiver().ucph(), memh); + +- fail_receiver(); +- if (GetParam().variant == FAIL_ON_RMA) { +- ucp_get_nbi(sender().ep(), mem_attr.address, 1, (uintptr_t)&buf, rkey); +- } else { +- request *req = send_nb(NULL, 0, DATATYPE, 0x111337); +- if (UCS_PTR_IS_PTR(req)) { +- request_release(req); +- } +- } +- +- ucp_ep_flush(sender().ep()); +- wait_err(); ++ ucp_rkey_h ucp_rkey; ++ status = ucp_ep_rkey_unpack(ep, rkey_buffer, &ucp_rkey); ++ ASSERT_UCS_OK(status); ++ rkey.reset(ucp_rkey, ucp_rkey_destroy); + +- EXPECT_NE(UCS_OK, m_err_status); ++ ucp_rkey_buffer_release(rkey_buffer); ++} + +- ucs_status_ptr_t status_ptr = ucp_tag_send_nb(sender().ep(), NULL, 0, DATATYPE, +- 0x111337, NULL); +- EXPECT_FALSE(UCS_PTR_IS_PTR(status_ptr)); +- EXPECT_EQ(m_err_status, UCS_PTR_STATUS(status_ptr)); ++void test_ucp_peer_failure::set_rkeys() { + +- status = ucp_put(sender().ep(), mem_attr.address, 1, (uintptr_t)&buf, rkey); +- EXPECT_FALSE(UCS_PTR_IS_PTR(status)); +- EXPECT_EQ(m_err_status, status); +- ucp_rkey_destroy(rkey); ++ if (GetParam().variant & TEST_RMA) { ++ get_rkey(failing_sender(), failing_receiver(), m_failing_memh, ++ m_failing_rkey); ++ get_rkey(stable_sender(), stable_receiver(), m_stable_memh, ++ m_stable_rkey); ++ } ++} + +- /* Destroy failed sender */ +- sender().destroy_worker(); +- m_entities.remove(&sender()); ++void test_ucp_peer_failure::send_cb(void *request, ucs_status_t status) ++{ ++} + +- /* Check workability of second pair */ +- smoke_test(); ++void test_ucp_peer_failure::recv_cb(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t *info) ++{ + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure_with_rma) ++void test_ucp_peer_failure::cleanup() { ++ m_failing_rkey.reset(); ++ m_stable_rkey.reset(); ++ m_failing_memh.reset(); ++ m_stable_memh.reset(); ++ ucp_test::cleanup(); ++} + +-class test_ucp_peer_failure_2pairs : +- public ucp_test, +- protected test_ucp_peer_failure_base ++void test_ucp_peer_failure::do_test(size_t msg_size, int pre_msg_count, ++ bool force_close, bool request_must_fail) + { +-public: +- static ucp_params_t get_ctx_params() { +- ucp_params_t params = ucp_test::get_ctx_params(); +- params.features = UCP_FEATURE_TAG; +- return params; +- } ++ skip_loopback(); + +-protected: +- virtual void init(); +- virtual void cleanup(); ++ /* connect 2 ep's from sender() to 2 receiver entities */ ++ create_entity(); ++ sender().connect(&stable_receiver(), get_ep_params(), STABLE_EP_INDEX); ++ sender().connect(&failing_receiver(), get_ep_params(), FAILING_EP_INDEX); + +- static void err_cb(void *arg, ucp_ep_h ep, ucs_status_t); +- ucp_worker_h rworker(int i); +- ucp_worker_h sworker(); +- void progress(); +- void wait_err(); +- ucs_status_t wait_req(void *req); +- static void rcomplete_cb(void *req, ucs_status_t status, +- ucp_tag_recv_info_t *info); +- static void scomplete_cb(void *req, ucs_status_t status); +- void smoke_test(size_t idx); +- +- static void ep_destructor(ucp_ep_h ep, test_ucp_peer_failure_2pairs* test) { +- test->wait_req(ucp_disconnect_nb(ep)); +- } ++ m_sbuf.resize(msg_size); ++ m_rbuf.resize(msg_size); + +- virtual ucp_ep_params_t get_ep_params() { +- return test_ucp_peer_failure_base::get_ep_params(); +- } ++ set_rkeys(); + +- ucs::handle m_ucph; +- std::vector > m_workers; +- std::vector > m_eps; +- ucs::ptr_vector m_env; +-}; ++ if (!(GetParam().variant & FAIL_IMM)) { ++ /* if not faill immediately, run traffic on failing pair to connect it */ ++ smoke_test(false); ++ } + +-void test_ucp_peer_failure_2pairs::init() +-{ +- test_base::init(); /* skip entities creation */ +- test_ucp_peer_failure_base::init(); +- +- set_ucp_config(m_ucp_config); +- ucp_params_t cparams = get_ctx_params(); +- UCS_TEST_CREATE_HANDLE(ucp_context_h, m_ucph, ucp_cleanup, +- ucp_init, &cparams, m_ucp_config); +- +- m_workers.resize(3); +- for (int i = 0; i < 3; ++i) { +- ucp_worker_params_t wparams = get_worker_params(); +- UCS_TEST_CREATE_HANDLE(ucp_worker_h, m_workers[i], ucp_worker_destroy, +- ucp_worker_create, m_ucph, &wparams); ++ /* put some sends on the failing pair */ ++ std::vector sreqs_pre; ++ for (int i = 0; i < pre_msg_count; ++i) { ++ progress(); ++ void *req = send_nb(failing_sender(), m_failing_rkey); ++ ASSERT_FALSE(UCS_PTR_IS_ERR(req)); ++ if (UCS_PTR_IS_PTR(req)) { ++ sreqs_pre.push_back(req); ++ } + } + +- m_eps.resize(2); +- for (int i = 0; i < 2; ++i) { +- ucp_address_t *address; +- size_t address_length; +- ucs_status_t status; +- ucp_ep_h ep; ++ EXPECT_EQ(UCS_OK, m_err_status); + +- status = ucp_worker_get_address(rworker(i), &address, &address_length); +- ASSERT_UCS_OK(status); ++ { ++ scoped_log_handler slh(wrap_errors_logger); + +- ucp_ep_params ep_params = get_ep_params(); +- ep_params.field_mask |= UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- ep_params.address = address; ++ fail_receiver(); + +- hide_errors(); +- status = ucp_ep_create(sworker(), &ep_params, &ep); +- restore_errors(); ++ void *sreq = send_nb(failing_sender(), m_failing_rkey); + +- ucp_worker_release_address(rworker(i), address); ++ while (!m_err_count) { ++ progress(); ++ } ++ EXPECT_NE(UCS_OK, m_err_status); + +- if (status == UCS_ERR_UNREACHABLE) { +- UCS_TEST_SKIP_R(m_errors.empty() ? "" : m_errors.back()); ++ if (UCS_PTR_IS_PTR(sreq)) { ++ /* The request may either succeed or fail, even though the data is ++ * not * delivered - depends on when the error is detected on sender ++ * side and if zcopy/bcopy protocol is used. In any case, the ++ * request must complete, and all resources have to be released. ++ */ ++ ucs_status_t status = ucp_request_check_status(sreq); ++ EXPECT_NE(UCS_INPROGRESS, status); ++ if (request_must_fail) { ++ EXPECT_EQ(m_err_status, status); ++ } else { ++ EXPECT_TRUE((m_err_status == status) || (UCS_OK == status)); ++ } ++ ucp_request_release(sreq); + } + +- m_eps[i].reset(ep, ep_destructor, this); +- } ++ /* Additional sends must fail */ ++ void *sreq2 = send_nb(failing_sender(), m_failing_rkey); ++ EXPECT_FALSE(UCS_PTR_IS_PTR(sreq2)); ++ EXPECT_EQ(m_err_status, UCS_PTR_STATUS(sreq2)); + +- /* Make sure wire up is done*/ +- smoke_test(0); +- smoke_test(1); ++ if (force_close) { ++ unsigned allocd_eps_before = ++ ucs_strided_alloc_inuse_count(&sender().worker()->ep_alloc); + +- wrap_errors(); +-} ++ ucp_ep_h ep = sender().revoke_ep(0, FAILING_EP_INDEX); + +-void test_ucp_peer_failure_2pairs::cleanup() +-{ +- restore_errors(); +- m_eps.clear(); +- m_workers.clear(); +- test_base::cleanup(); +-} ++ void *creq = ucp_ep_close_nb(ep, UCP_EP_CLOSE_MODE_FORCE); ++ wait(creq); + +-void test_ucp_peer_failure_2pairs::err_cb(void *arg, ucp_ep_h ep, ucs_status_t) { +- test_ucp_peer_failure_2pairs *self; +- self = *reinterpret_cast(arg); +- self->m_err_cntr++; +-} ++ unsigned allocd_eps_after = ++ ucs_strided_alloc_inuse_count(&sender().worker()->ep_alloc); + +-ucp_worker_h test_ucp_peer_failure_2pairs::rworker(int i) +-{ +- return m_workers[i]; +-} +- +-ucp_worker_h test_ucp_peer_failure_2pairs::sworker() +-{ +- return m_workers[2]; +-} +- +-void test_ucp_peer_failure_2pairs::progress() +-{ +- for (std::vector >::iterator iter = m_workers.begin(); +- iter != m_workers.end(); ++iter) +- { +- if (*iter) { +- ucp_worker_progress(*iter); ++ if (!(GetParam().variant & FAIL_IMM)) { ++ EXPECT_LT(allocd_eps_after, allocd_eps_before); ++ } + } +- } +-} + +-void test_ucp_peer_failure_2pairs::wait_err() +-{ +- while (!m_err_cntr) { +- progress(); ++ /* release requests */ ++ while (!sreqs_pre.empty()) { ++ void *req = sreqs_pre.back(); ++ sreqs_pre.pop_back(); ++ EXPECT_NE(UCS_INPROGRESS, ucp_request_test(req, NULL)); ++ ucp_request_release(req); ++ } + } +-} + +-ucs_status_t test_ucp_peer_failure_2pairs::wait_req(void *req) +-{ +- if (req == NULL) { +- return UCS_OK; +- } ++ /* Check workability of stable pair */ ++ smoke_test(true); + +- ucs_assert(!!req); +- if (UCS_PTR_IS_ERR(req)) { +- return UCS_PTR_STATUS(req); +- } ++ /* Check that TX polling is working well */ ++ while (sender().progress()); + +- ucs_status_t status; +- do { +- progress(); +- status = ucp_request_check_status(req); +- } while (status == UCS_INPROGRESS); +- ucp_request_release(req); +- return status; ++ /* When all requests on sender are done we need to prevent LOCAL_FLUSH ++ * in test teardown. Receiver is killed and doesn't respond on FC requests ++ */ ++ sender().destroy_worker(); + } + +-void test_ucp_peer_failure_2pairs::rcomplete_cb(void *req, ucs_status_t status, +- ucp_tag_recv_info_t *info) +-{ ++UCS_TEST_P(test_ucp_peer_failure, basic) { ++ do_test(1024, /* msg_size */ ++ 0, /* pre_msg_cnt */ ++ false, /* force_close */ ++ false /* must_fail */); + } + +-void test_ucp_peer_failure_2pairs::scomplete_cb(void *req, ucs_status_t status) +-{ ++UCS_TEST_P(test_ucp_peer_failure, zcopy, "ZCOPY_THRESH=1023") { ++ do_test(1024, /* msg_size */ ++ 0, /* pre_msg_cnt */ ++ false, /* force_close */ ++ true /* must_fail */); + } + +-void test_ucp_peer_failure_2pairs::smoke_test(size_t idx) +-{ +- long buf = 0; +- void *rreq = ucp_tag_recv_nb(rworker(idx), &buf, 1, +- ucp_dt_make_contig(1), 0, 0, +- rcomplete_cb); +- void *sreq = ucp_tag_send_nb(m_eps[idx], &buf, 1, +- ucp_dt_make_contig(1), 0, +- scomplete_cb); +- wait_req(sreq); +- wait_req(rreq); ++UCS_TEST_P(test_ucp_peer_failure, bcopy_multi, "MAX_BCOPY?=512", "RC_TM_ENABLE?=n") { ++ do_test(1024, /* msg_size */ ++ 0, /* pre_msg_cnt */ ++ false, /* force_close */ ++ false /* must_fail */); + } + +-UCS_TEST_P(test_ucp_peer_failure_2pairs, status_after_error) { +- +- m_workers[0].reset(); +- +- ucs_status_t status; +- void *sreq; +- unsigned buf = 0; +- +- do { +- sreq = ucp_tag_send_nb(m_eps[0], &buf, 1, ucp_dt_make_contig(1), +- 0x111337, scomplete_cb); +- status = wait_req(sreq); +- } while ((status == UCS_OK) || !m_err_cntr); +- +- wait_err(); +- +- EXPECT_NE(UCS_OK, m_err_status); +- +- sreq = ucp_tag_send_nb(m_eps[0], NULL, 0, ucp_dt_make_contig(1), 0x111337, +- scomplete_cb); +- EXPECT_FALSE(UCS_PTR_IS_PTR(sreq)); +- EXPECT_EQ(m_err_status, UCS_PTR_STATUS(sreq)); ++UCS_TEST_P(test_ucp_peer_failure, force_close, "RC_FC_ENABLE?=n") { ++ do_test(16000, /* msg_size */ ++ 1000, /* pre_msg_cnt */ ++ true, /* force_close */ ++ false /* must_fail */); ++} + +- /* Destroy failed sender */ +- m_eps[0].reset(); ++UCS_TEST_P(test_ucp_peer_failure, disable_sync_send) { ++ const size_t max_size = UCS_MBYTE; ++ std::vector buf(max_size, 0); ++ void *req; + +- /* Check workability of second pair */ +- smoke_test(1); +-} ++ if (!(GetParam().variant & TEST_TAG)) { ++ UCS_TEST_SKIP_R("Skip non-tagged variant"); ++ } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_peer_failure_2pairs) ++ sender().connect(&receiver(), get_ep_params()); + +-class test_ucp_ep_force_disconnect : public test_ucp_peer_failure +-{ +-public: +- virtual void init() { +- const std::vector &tls = GetParam().transports; +- std::vector skip_tls; +- +- skip_tls.push_back("rc_x"); +- skip_tls.push_back("ib"); +- +- if (std::find_first_of(tls.begin(), tls.end(), +- skip_tls.begin(), skip_tls.end()) != tls.end()) { +- UCS_TEST_SKIP_R("TEMPORATY DISABLED. There is a known issue with " +- "rc_mlx5 transport: it can't successfully clean up " +- "iface resources if it's receiving on closure. " +- "The issue is hardly reproducible with running 4+ " +- "gtest instances on the same node"); +- } ++ /* Make sure API is disabled for any size and data type */ ++ for (size_t size = 1; size <= max_size; size *= 2) { ++ req = ucp_tag_send_sync_nb(sender().ep(), buf.data(), size, DATATYPE, ++ 0x111337, NULL); ++ EXPECT_FALSE(UCS_PTR_IS_PTR(req)); ++ EXPECT_EQ(UCS_ERR_UNSUPPORTED, UCS_PTR_STATUS(req)); + +- m_env.clear(); /* restore default timeouts. */ +- test_ucp_peer_failure::init(); ++ ucp::data_type_desc_t dt_desc(DATATYPE_IOV, buf.data(), size); ++ req = ucp_tag_send_sync_nb(sender().ep(), dt_desc.buf(), dt_desc.count(), ++ dt_desc.dt(), 0x111337, NULL); ++ EXPECT_FALSE(UCS_PTR_IS_PTR(req)); ++ EXPECT_EQ(UCS_ERR_UNSUPPORTED, UCS_PTR_STATUS(req)); + } +-}; +- +-UCS_TEST_P(test_ucp_ep_force_disconnect, test) { +- test_force_close(); + } +- +-UCP_INSTANTIATE_TEST_CASE(test_ucp_ep_force_disconnect) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_perf.cc +index 50376c307..0109bca29 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_perf.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_perf.cc +@@ -66,7 +66,7 @@ test_perf::test_spec test_ucp_perf::tests[] = + { "tag sync mr", "Mpps", + UCX_PERF_API_UCP, UCX_PERF_CMD_TAG_SYNC, UCX_PERF_TEST_TYPE_STREAM_UNI, + UCP_PERF_DATATYPE_CONTIG, 0, 1, { 8 }, 1, 2000000l, +- ucs_offsetof(ucx_perf_result_t, msgrate.total_average), 1e-6, 0.1, 100.0, 0}, ++ ucs_offsetof(ucx_perf_result_t, msgrate.total_average), 1e-6, 0.05, 100.0, 0}, + + { "tag wild mr", "Mpps", + UCX_PERF_API_UCP, UCX_PERF_CMD_TAG, UCX_PERF_TEST_TYPE_STREAM_UNI, +@@ -139,7 +139,7 @@ test_perf::test_spec test_ucp_perf::tests[] = + { "atomic add rate", "Mpps", + UCX_PERF_API_UCP, UCX_PERF_CMD_ADD, UCX_PERF_TEST_TYPE_STREAM_UNI, + UCP_PERF_DATATYPE_CONTIG, 0, 1, { 8 }, 1, 1000000l, +- ucs_offsetof(ucx_perf_result_t, msgrate.total_average), 1e-6, 0.5, 100.0, ++ ucs_offsetof(ucx_perf_result_t, msgrate.total_average), 1e-6, 0.1, 500.0, + 0 }, + + { "atomic fadd latency", "usec", +@@ -175,14 +175,14 @@ UCS_TEST_P(test_ucp_perf, envelope) { + + /* coverity[tainted_string_argument] */ + ucs::scoped_setenv tls("UCX_TLS", ss.str().c_str()); ++ ucs::scoped_setenv warn_invalid("UCX_WARN_INVALID_CONFIG", "no"); ++ + for (test_spec *test = tests; test->title != NULL; ++test) { +- unsigned flags = (test->command == UCX_PERF_CMD_TAG) ? 0 : +- UCX_PERF_TEST_FLAG_ONE_SIDED; + if (ucs_arch_get_cpu_model() == UCS_CPU_MODEL_ARM_AARCH64) { + test->max *= UCP_ARM_PERF_TEST_MULTIPLIER; + test->min /= UCP_ARM_PERF_TEST_MULTIPLIER; + } +- run_test(*test, flags, check_perf, "", ""); ++ run_test(*test, 0, check_perf, "", ""); + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma.cc +index 690de2025..6bb31e2f8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma.cc +@@ -10,6 +10,8 @@ + + + class test_ucp_rma : public test_ucp_memheap { ++private: ++ static void send_completion(void *request, ucs_status_t status){} + public: + static ucp_params_t get_ctx_params() { + ucp_params_t params = ucp_test::get_ctx_params(); +@@ -42,15 +44,19 @@ public: + ASSERT_UCS_OK_OR_INPROGRESS(status); + } + +- void blocking_put(entity *e, size_t max_size, +- void *memheap_addr, +- ucp_rkey_h rkey, +- std::string& expected_data) ++ void nonblocking_put_nb(entity *e, size_t max_size, ++ void *memheap_addr, ++ ucp_rkey_h rkey, ++ std::string& expected_data) + { +- ucs_status_t status; +- status = ucp_put(e->ep(), &expected_data[0], expected_data.length(), +- (uintptr_t)memheap_addr, rkey); +- ASSERT_UCS_OK(status); ++ void *status; ++ ++ status = ucp_put_nb(e->ep(), &expected_data[0], expected_data.length(), ++ (uintptr_t)memheap_addr, rkey, send_completion); ++ ASSERT_UCS_PTR_OK(status); ++ if (UCS_PTR_IS_PTR(status)) { ++ wait(status); ++ } + } + + void nonblocking_get_nbi(entity *e, size_t max_size, +@@ -66,17 +72,20 @@ public: + ASSERT_UCS_OK_OR_INPROGRESS(status); + } + +- void blocking_get(entity *e, size_t max_size, +- void *memheap_addr, +- ucp_rkey_h rkey, +- std::string& expected_data) ++ void nonblocking_get_nb(entity *e, size_t max_size, ++ void *memheap_addr, ++ ucp_rkey_h rkey, ++ std::string& expected_data) + { +- ucs_status_t status; ++ void *status; + + ucs::fill_random(memheap_addr, ucs_min(max_size, 16384U)); +- status = ucp_get(e->ep(), (void *)&expected_data[0], expected_data.length(), +- (uintptr_t)memheap_addr, rkey); +- ASSERT_UCS_OK(status); ++ status = ucp_get_nb(e->ep(), &expected_data[0], expected_data.length(), ++ (uintptr_t)memheap_addr, rkey, send_completion); ++ ASSERT_UCS_PTR_OK(status); ++ if (UCS_PTR_IS_PTR(status)) { ++ wait(status); ++ } + } + + void test_message_sizes(blocking_send_func_t func, size_t *msizes, int iters, int is_nbi); +@@ -96,38 +105,8 @@ void test_ucp_rma::test_message_sizes(blocking_send_func_t func, size_t *msizes, + } + } + +-UCS_TEST_P(test_ucp_rma, blocking_small) { +- size_t sizes[] = { 8, 24, 96, 120, 250, 0}; +- +- test_message_sizes(static_cast(&test_ucp_rma::blocking_put), +- sizes, 1000, 0); +- test_message_sizes(static_cast(&test_ucp_rma::blocking_get), +- sizes, 1000, 0); +-} +- +-UCS_TEST_P(test_ucp_rma, blocking_med) { +- size_t sizes[] = { 1000, 3000, 9000, 17300, 31000, 99000, 130000, 0}; +- +- test_message_sizes(static_cast(&test_ucp_rma::blocking_put), +- sizes, 100, 0); +- test_message_sizes(static_cast(&test_ucp_rma::blocking_get), +- sizes, 100, 0); +-} +- + static const size_t MEG = 1024 * 1024ULL; + +-UCS_TEST_P(test_ucp_rma, blocking_large) { +- size_t sizes[] = { 1 * MEG, 3 * MEG, 9 * MEG, 17 * MEG, 32 * MEG, 0}; +- +- if (RUNNING_ON_VALGRIND) { +- UCS_TEST_SKIP_R("skipping on valgrind"); +- } +- test_message_sizes(static_cast(&test_ucp_rma::blocking_put), +- sizes, 3, 0); +- test_message_sizes(static_cast(&test_ucp_rma::blocking_get), +- sizes, 3, 0); +-} +- + UCS_TEST_P(test_ucp_rma, nbi_small) { + size_t sizes[] = { 8, 24, 96, 120, 250, 0}; + +@@ -159,16 +138,35 @@ UCS_TEST_P(test_ucp_rma, nbi_large) { + sizes, 3, 1); + } + +-UCS_TEST_P(test_ucp_rma, blocking_put_allocated) { +- test_blocking_xfer(static_cast(&test_ucp_rma::blocking_put), +- DEFAULT_SIZE, DEFAULT_ITERS, +- 1, false, false); ++UCS_TEST_P(test_ucp_rma, nb_small) { ++ size_t sizes[] = { 8, 24, 96, 120, 250, 0}; ++ ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ sizes, 1000, 1); ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ sizes, 1000, 1); + } + +-UCS_TEST_P(test_ucp_rma, blocking_put_registered) { +- test_blocking_xfer(static_cast(&test_ucp_rma::blocking_put), +- DEFAULT_SIZE, DEFAULT_ITERS, +- 1, true, false); ++UCS_TEST_P(test_ucp_rma, nb_med) { ++ size_t sizes[] = { 1000, 3000, 9000, 17300, 31000, 99000, 130000, 0}; ++ ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ sizes, 100, 1); ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ sizes, 100, 1); ++} ++ ++UCS_TEST_P(test_ucp_rma, nb_large) { ++ size_t sizes[] = { 1 * MEG, 3 * MEG, 9 * MEG, 17 * MEG, 32 * MEG, 0}; ++ ++ if (RUNNING_ON_VALGRIND) { ++ UCS_TEST_SKIP_R("skipping on valgrind"); ++ } ++ ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ sizes, 3, 1); ++ test_message_sizes(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ sizes, 3, 1); + } + + UCS_TEST_P(test_ucp_rma, nonblocking_put_nbi_flush_worker) { +@@ -207,15 +205,42 @@ UCS_TEST_P(test_ucp_rma, nonblocking_stream_put_nbi_flush_ep) { + 1, true, true); + } + +-UCS_TEST_P(test_ucp_rma, blocking_get) { +- test_blocking_xfer(static_cast(&test_ucp_rma::blocking_get), ++UCS_TEST_P(test_ucp_rma, nonblocking_put_nb_flush_worker) { ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), + DEFAULT_SIZE, DEFAULT_ITERS, + 1, false, false); +- test_blocking_xfer(static_cast(&test_ucp_rma::blocking_get), ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), + DEFAULT_SIZE, DEFAULT_ITERS, + 1, true, false); + } + ++UCS_TEST_P(test_ucp_rma, nonblocking_put_nb_flush_ep) { ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, true); ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, true); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_stream_put_nb_flush_worker) { ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, false); ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, false); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_stream_put_nb_flush_ep) { ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, true); ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_put_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, true); ++} ++ + UCS_TEST_P(test_ucp_rma, nonblocking_get_nbi_flush_worker) { + test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nbi), + DEFAULT_SIZE, DEFAULT_ITERS, +@@ -252,4 +277,40 @@ UCS_TEST_P(test_ucp_rma, nonblocking_stream_get_nbi_flush_ep) { + 1, true, true); + } + ++UCS_TEST_P(test_ucp_rma, nonblocking_get_nb_flush_worker) { ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, false); ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, false); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_get_nb_flush_ep) { ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, true); ++ test_blocking_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, true); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_stream_get_nb_flush_worker) { ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, false); ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, false); ++} ++ ++UCS_TEST_P(test_ucp_rma, nonblocking_stream_get_nb_flush_ep) { ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, false, true); ++ test_nonblocking_implicit_stream_xfer(static_cast(&test_ucp_rma::nonblocking_get_nb), ++ DEFAULT_SIZE, DEFAULT_ITERS, ++ 1, true, true); ++} ++ + UCP_INSTANTIATE_TEST_CASE(test_ucp_rma) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma_mt.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma_mt.cc +index 9f9b97c72..8ca56c85a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma_mt.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_rma_mt.cc +@@ -27,6 +27,14 @@ public: + { + ucp_test::init(); + sender().connect(&receiver(), get_ep_params()); ++ for (int i = 0; i < sender().get_num_workers(); i++) { ++ /* avoid deadlock for blocking rma */ ++ flush_worker(sender(), i); ++ } ++ } ++ ++ static void send_cb(void *req, ucs_status_t status) ++ { + } + + static std::vector enum_test_params(const ucp_params_t& ctx_params, +@@ -90,15 +98,16 @@ UCS_TEST_P(test_ucp_rma_mt, put_get) { + #if _OPENMP && ENABLE_MT + #pragma omp parallel for + for (i = 0; i < MT_TEST_NUM_THREADS; i++) { +- ucs_status_t status; + int worker_index = 0; + +- if (GetParam().thread_type == MULTI_THREAD_CONTEXT) ++ if (GetParam().thread_type == MULTI_THREAD_CONTEXT) { + worker_index = i; ++ } + +- status = ucp_put(sender().ep(worker_index), &orig_data[i], sizeof(uint64_t), +- (uintptr_t)((uint64_t *)memheap + i), rkey[worker_index]); +- ASSERT_UCS_OK(status); ++ void* req = ucp_put_nb(sender().ep(worker_index), &orig_data[i], ++ sizeof(uint64_t), (uintptr_t)((uint64_t*)memheap + i), ++ rkey[worker_index], send_cb); ++ wait(req, worker_index); + + flush_worker(sender(), worker_index); + +@@ -123,7 +132,7 @@ UCS_TEST_P(test_ucp_rma_mt, put_get) { + worker_index = i; + + status = ucp_put_nbi(sender().ep(worker_index), &orig_data[i], sizeof(uint64_t), +- (uintptr_t)((uint64_t *)memheap + i), rkey[worker_index]); ++ (uintptr_t)((uint64_t*)memheap + i), rkey[worker_index]); + ASSERT_UCS_OK_OR_INPROGRESS(status); + + flush_worker(sender(), worker_index); +@@ -142,15 +151,16 @@ UCS_TEST_P(test_ucp_rma_mt, put_get) { + #if _OPENMP && ENABLE_MT + #pragma omp parallel for + for (i = 0; i < MT_TEST_NUM_THREADS; i++) { +- ucs_status_t status; + int worker_index = 0; + +- if (GetParam().thread_type == MULTI_THREAD_CONTEXT) ++ if (GetParam().thread_type == MULTI_THREAD_CONTEXT) { + worker_index = i; ++ } + +- status = ucp_get(sender().ep(worker_index), &orig_data[i], sizeof(uint64_t), +- (uintptr_t)((uint64_t *)memheap + i), rkey[worker_index]); +- ASSERT_UCS_OK(status); ++ void *req = ucp_get_nb(sender().ep(worker_index), &orig_data[i], ++ sizeof(uint64_t), (uintptr_t)((uint64_t*)memheap + i), ++ rkey[worker_index], send_cb); ++ wait(req, worker_index); + + flush_worker(sender(), worker_index); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_sockaddr.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_sockaddr.cc +index 8fb00b5b3..0de1d7534 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_sockaddr.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_sockaddr.cc +@@ -9,16 +9,79 @@ + #include + #include + #include ++#include ++ ++#define UCP_INSTANTIATE_ALL_TEST_CASE(_test_case) \ ++ UCP_INSTANTIATE_TEST_CASE (_test_case) \ ++ UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, shm, "shm") \ ++ UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, dc_ud, "dc_x,dc,ud,ud_x,mm") \ ++ UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, no_ud_ud_x, "dc_x,dc,mm") \ ++ /* dc_ud case is for testing handling of a large worker address on ++ * UCT_IFACE_FLAG_CONNECT_TO_IFACE transports (dc, dc_x) */ ++ /* no_ud_ud_x case is for testing handling a large worker address ++ * but with the lack of ud/ud_x transports, which would return an error ++ * and skipped */ + + class test_ucp_sockaddr : public ucp_test { + public: + static ucp_params_t get_ctx_params() { + ucp_params_t params = ucp_test::get_ctx_params(); + params.field_mask |= UCP_PARAM_FIELD_FEATURES; +- params.features = UCP_FEATURE_TAG; ++ params.features = UCP_FEATURE_TAG | UCP_FEATURE_STREAM; + return params; + } + ++ enum { ++ MT_PARAM_VARIANT = DEFAULT_PARAM_VARIANT + 1, /* Enabled worker level ++ multi-threading */ ++ CONN_REQ_TAG, /* Accepting by ucp_conn_request_h, ++ send/recv by TAG API */ ++ CONN_REQ_STREAM /* Accepting by ucp_conn_request_h, ++ send/recv by STREAM API */ ++ }; ++ ++ typedef enum { ++ SEND_RECV_TAG, ++ SEND_RECV_STREAM ++ } send_recv_type_t; ++ ++ static std::vector ++ enum_test_params(const ucp_params_t& ctx_params, ++ const std::string& name, ++ const std::string& test_case_name, ++ const std::string& tls) ++ { ++ std::vector result = ++ ucp_test::enum_test_params(ctx_params, name, test_case_name, tls); ++ ++ generate_test_params_variant(ctx_params, name, test_case_name, tls, ++ MT_PARAM_VARIANT, result, ++ MULTI_THREAD_WORKER); ++ generate_test_params_variant(ctx_params, name, test_case_name, tls, ++ CONN_REQ_TAG, result); ++ generate_test_params_variant(ctx_params, name, test_case_name, tls, ++ CONN_REQ_STREAM, result); ++ return result; ++ } ++ ++ static ucs_log_func_rc_t ++ detect_error_logger(const char *file, unsigned line, const char *function, ++ ucs_log_level_t level, const char *message, va_list ap) ++ { ++ if (level == UCS_LOG_LEVEL_ERROR) { ++ std::string err_str = format_message(message, ap); ++ if ((strstr(err_str.c_str(), "no supported sockaddr auxiliary transports found for")) || ++ (strstr(err_str.c_str(), "sockaddr aux resources addresses")) || ++ (strstr(err_str.c_str(), "no peer failure handler")) || ++ /* when the "peer failure" error happens, it is followed by: */ ++ (strstr(err_str.c_str(), "received event RDMA_CM_EVENT_UNREACHABLE"))) { ++ UCS_TEST_MESSAGE << err_str; ++ return UCS_LOG_FUNC_RC_STOP; ++ } ++ } ++ return UCS_LOG_FUNC_RC_CONTINUE; ++ } ++ + void get_listen_addr(struct sockaddr_in *listen_addr) { + struct ifaddrs* ifaddrs; + int ret = getifaddrs(&ifaddrs); +@@ -27,7 +90,7 @@ public: + for (struct ifaddrs *ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) { + if (ucs_netif_is_active(ifa->ifa_name) && + ucs::is_inet_addr(ifa->ifa_addr) && +- ucs::is_ib_netdev(ifa->ifa_name)) ++ ucs::is_rdmacm_netdev(ifa->ifa_name)) + { + *listen_addr = *(struct sockaddr_in*)(void*)ifa->ifa_addr; + listen_addr->sin_port = ucs::get_port(); +@@ -39,41 +102,172 @@ public: + UCS_TEST_SKIP_R("No interface for testing"); + } + ++ void inaddr_any_addr(struct sockaddr_in *addr, in_port_t port) ++ { ++ memset(addr, 0, sizeof(struct sockaddr_in)); ++ addr->sin_family = AF_INET; ++ addr->sin_addr.s_addr = INADDR_ANY; ++ addr->sin_port = port; ++ } ++ ++ void start_listener(ucp_test_base::entity::listen_cb_type_t cb_type, ++ const struct sockaddr* addr) ++ { ++ ucs_status_t status = receiver().listen(cb_type, addr, sizeof(*addr)); ++ if (status == UCS_ERR_UNREACHABLE) { ++ UCS_TEST_SKIP_R("cannot listen to " + ucs::sockaddr_to_str(addr)); ++ } ++ } ++ + static void scomplete_cb(void *req, ucs_status_t status) + { +- ASSERT_UCS_OK(status); ++ if ((status == UCS_OK) || ++ (status == UCS_ERR_UNREACHABLE) || ++ (status == UCS_ERR_REJECTED)) { ++ return; ++ } ++ UCS_TEST_ABORT("Error: " << ucs_status_string(status)); ++ } ++ ++ static void rtag_complete_cb(void *req, ucs_status_t status, ++ ucp_tag_recv_info_t *info) ++ { ++ EXPECT_UCS_OK(status); + } + +- static void rcomplete_cb(void *req, ucs_status_t status, +- ucp_tag_recv_info_t *info) ++ static void rstream_complete_cb(void *req, ucs_status_t status, ++ size_t length) + { ++ EXPECT_UCS_OK(status); ++ } ++ ++ static void wait_for_wakeup(ucp_worker_h send_worker, ucp_worker_h recv_worker) ++ { ++ int ret, send_efd, recv_efd; ++ ucs_status_t status; ++ ++ ASSERT_UCS_OK(ucp_worker_get_efd(send_worker, &send_efd)); ++ ASSERT_UCS_OK(ucp_worker_get_efd(recv_worker, &recv_efd)); ++ ++ status = ucp_worker_arm(recv_worker); ++ if (status == UCS_ERR_BUSY) { ++ return; ++ } + ASSERT_UCS_OK(status); ++ ++ status = ucp_worker_arm(send_worker); ++ if (status == UCS_ERR_BUSY) { ++ return; ++ } ++ ASSERT_UCS_OK(status); ++ ++ do { ++ struct pollfd pfd[2]; ++ pfd[0].fd = send_efd; ++ pfd[1].fd = recv_efd; ++ pfd[0].events = POLLIN; ++ pfd[1].events = POLLIN; ++ ret = poll(pfd, 2, -1); ++ } while ((ret < 0) && (errno == EINTR)); ++ if (ret < 0) { ++ UCS_TEST_MESSAGE << "poll() failed: " << strerror(errno); ++ } ++ ++ EXPECT_GE(ret, 1); + } + +- void tag_send(entity& from, entity& to) { +- uint64_t send_data = ucs_generate_uuid(0); +- void *send_req = ucp_tag_send_nb(from.ep(), &send_data, 1, +- ucp_dt_make_contig(sizeof(send_data)), +- 1, scomplete_cb); ++ void check_events(ucp_worker_h send_worker, ucp_worker_h recv_worker, ++ bool wakeup, void *req) ++ { ++ if (progress()) { ++ return; ++ } ++ ++ if ((req != NULL) && (ucp_request_check_status(req) == UCS_ERR_UNREACHABLE)) { ++ return; ++ } ++ ++ if (wakeup) { ++ wait_for_wakeup(send_worker, recv_worker); ++ } ++ } ++ ++ void send_recv(entity& from, entity& to, send_recv_type_t send_recv_type, ++ bool wakeup, ucp_test_base::entity::listen_cb_type_t cb_type) ++ { ++ const uint64_t send_data = ucs_generate_uuid(0); ++ void *send_req = NULL; ++ if (send_recv_type == SEND_RECV_TAG) { ++ send_req = ucp_tag_send_nb(from.ep(), &send_data, 1, ++ ucp_dt_make_contig(sizeof(send_data)), 1, ++ scomplete_cb); ++ } else if (send_recv_type == SEND_RECV_STREAM) { ++ send_req = ucp_stream_send_nb(from.ep(), &send_data, 1, ++ ucp_dt_make_contig(sizeof(send_data)), ++ scomplete_cb, 0); ++ } else { ++ ASSERT_TRUE(false) << "unsupported communication type"; ++ } ++ ++ ucs_status_t send_status; + if (send_req == NULL) { ++ send_status = UCS_OK; + } else if (UCS_PTR_IS_ERR(send_req)) { +- ASSERT_UCS_OK(UCS_PTR_STATUS(send_req)); ++ send_status = UCS_PTR_STATUS(send_req); ++ ASSERT_UCS_OK(send_status); + } else { + while (!ucp_request_is_completed(send_req)) { +- progress(); ++ check_events(from.worker(), to.worker(), wakeup, send_req); + } ++ send_status = ucp_request_check_status(send_req); + ucp_request_free(send_req); + } + ++ if (send_status == UCS_ERR_UNREACHABLE) { ++ /* Check if the error was completed due to the error handling flow. ++ * If so, skip the test since a valid error occurred - the one expected ++ * from the error handling flow - cases of failure to handle long worker ++ * address or transport doesn't support the error handling requirement */ ++ UCS_TEST_SKIP_R("Skipping due an unreachable destination (unsupported " ++ "feature or too long worker address or no " ++ "supported transport to send partial worker " ++ "address)"); ++ } else if ((send_status == UCS_ERR_REJECTED) && ++ (cb_type == ucp_test_base::entity::LISTEN_CB_REJECT)) { ++ return; ++ } else { ++ ASSERT_UCS_OK(send_status); ++ } ++ + uint64_t recv_data = 0; +- void *recv_req = ucp_tag_recv_nb(to.worker(), &recv_data, 1, +- ucp_dt_make_contig(sizeof(recv_data)), +- 1, 0, rcomplete_cb); +- if (UCS_PTR_IS_ERR(recv_req)) { +- ASSERT_UCS_OK(UCS_PTR_STATUS(recv_req)); ++ void *recv_req; ++ if (send_recv_type == SEND_RECV_TAG) { ++ recv_req = ucp_tag_recv_nb(to.worker(), &recv_data, 1, ++ ucp_dt_make_contig(sizeof(recv_data)), ++ 1, 0, rtag_complete_cb); + } else { +- while (!ucp_request_is_completed(recv_req)) { ++ ASSERT_TRUE(send_recv_type == SEND_RECV_STREAM); ++ ucp_stream_poll_ep_t poll_eps; ++ ssize_t ep_count; ++ size_t recv_length; ++ do { + progress(); ++ ep_count = ucp_stream_worker_poll(to.worker(), &poll_eps, 1, 0); ++ } while (ep_count == 0); ++ ASSERT_EQ(1, ep_count); ++ EXPECT_EQ(to.ep(), poll_eps.ep); ++ EXPECT_EQ((void *)0xdeadbeef, poll_eps.user_data); ++ ++ recv_req = ucp_stream_recv_nb(to.ep(), &recv_data, 1, ++ ucp_dt_make_contig(sizeof(recv_data)), ++ rstream_complete_cb, &recv_length, ++ UCP_STREAM_RECV_FLAG_WAITALL); ++ } ++ ++ if (recv_req != NULL) { ++ ASSERT_TRUE(UCS_PTR_IS_PTR(recv_req)); ++ while (!ucp_request_is_completed(recv_req)) { ++ check_events(from.worker(), to.worker(), wakeup, recv_req); + } + ucp_request_free(recv_req); + } +@@ -81,81 +275,266 @@ public: + EXPECT_EQ(send_data, recv_data); + } + ++ bool wait_for_server_ep(bool wakeup) ++ { ++ ucs_time_t time_limit = ucs_get_time() + ucs_time_from_sec(UCP_TEST_TIMEOUT_IN_SEC); ++ ++ while ((receiver().get_num_eps() == 0) && (m_err_handler_count == 0) && ++ (ucs_get_time() < time_limit)) { ++ check_events(sender().worker(), receiver().worker(), wakeup, NULL); ++ } ++ return (m_err_handler_count == 0) && (receiver().get_num_eps() > 0); ++ } ++ ++ void wait_for_reject(entity &e, bool wakeup) ++ { ++ ucs_time_t time_limit = ucs_get_time() + ++ ucs_time_from_sec(UCP_TEST_TIMEOUT_IN_SEC); ++ ++ while ((e.get_rejected_cntr() == 0) && ++ (ucs_get_time() < time_limit)) { ++ check_events(sender().worker(), receiver().worker(), wakeup, NULL); ++ } ++ EXPECT_GT(time_limit, ucs_get_time()); ++ EXPECT_EQ(1ul, e.get_rejected_cntr()); ++ } ++ ++ virtual ucp_ep_params_t get_ep_params() ++ { ++ ucp_ep_params_t ep_params = ucp_test::get_ep_params(); ++ ep_params.field_mask |= UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | ++ UCP_EP_PARAM_FIELD_ERR_HANDLER | ++ UCP_EP_PARAM_FIELD_USER_DATA; ++ /* The error handling requirement is needed since we need to take ++ * care of a case where the client gets an error. In case ucp needs to ++ * handle a large worker address but neither ud nor ud_x are present */ ++ ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; ++ ep_params.err_handler.cb = err_handler_cb; ++ ep_params.err_handler.arg = NULL; ++ ep_params.user_data = reinterpret_cast(this); ++ return ep_params; ++ } ++ ++ void client_ep_connect(struct sockaddr *connect_addr) ++ { ++ ucp_ep_params_t ep_params = get_ep_params(); ++ ep_params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS | ++ UCP_EP_PARAM_FIELD_SOCK_ADDR; ++ ep_params.flags = UCP_EP_PARAMS_FLAGS_CLIENT_SERVER; ++ ep_params.sockaddr.addr = connect_addr; ++ ep_params.sockaddr.addrlen = sizeof(*connect_addr); ++ sender().connect(&receiver(), ep_params); ++ } ++ ++ void connect_and_send_recv(struct sockaddr *connect_addr, bool wakeup) ++ { ++ { ++ scoped_log_handler slh(detect_error_logger); ++ client_ep_connect(connect_addr); ++ if (!wait_for_server_ep(wakeup)) { ++ UCS_TEST_SKIP_R("cannot connect to server"); ++ } ++ } ++ ++ send_recv(sender(), receiver(), ++ (GetParam().variant == CONN_REQ_STREAM) ? SEND_RECV_STREAM : ++ SEND_RECV_TAG, wakeup, cb_type()); ++ } ++ ++ void connect_and_reject(struct sockaddr *connect_addr, bool wakeup) ++ { ++ { ++ scoped_log_handler slh(detect_error_logger); ++ client_ep_connect(connect_addr); ++ /* Check reachability with tagged send */ ++ send_recv(sender(), receiver(), SEND_RECV_TAG, wakeup, ++ ucp_test_base::entity::LISTEN_CB_REJECT); ++ } ++ wait_for_reject(receiver(), wakeup); ++ wait_for_reject(sender(), wakeup); ++ } ++ ++ void listen_and_communicate(ucp_test_base::entity::listen_cb_type_t cb_type, ++ bool wakeup) ++ { ++ struct sockaddr_in connect_addr; ++ get_listen_addr(&connect_addr); ++ ++ UCS_TEST_MESSAGE << "Testing " ++ << ucs::sockaddr_to_str( ++ (const struct sockaddr*)&connect_addr); ++ ++ start_listener(cb_type, (const struct sockaddr*)&connect_addr); ++ connect_and_send_recv((struct sockaddr*)&connect_addr, wakeup); ++ } ++ ++ void listen_and_reject(ucp_test_base::entity::listen_cb_type_t cb_type, ++ bool wakeup) ++ { ++ struct sockaddr_in connect_addr; ++ get_listen_addr(&connect_addr); ++ ++ UCS_TEST_MESSAGE << "Testing " ++ << ucs::sockaddr_to_str( ++ (const struct sockaddr*)&connect_addr); ++ start_listener(cb_type, (const struct sockaddr*)&connect_addr); ++ connect_and_reject((struct sockaddr*)&connect_addr, wakeup); ++ } ++ ++ + static void err_handler_cb(void *arg, ucp_ep_h ep, ucs_status_t status) { + test_ucp_sockaddr *self = reinterpret_cast(arg); +- self->err_handler_count++; ++ ucp_test::err_handler_cb(static_cast(self), ep, status); ++ ++ if (status == UCS_ERR_REJECTED) { ++ entity *e = self->get_entity_by_ep(ep); ++ if (e != NULL) { ++ e->inc_rejected_cntr(); ++ return; ++ } ++ } ++ ++ /* The current expected errors are only from the err_handle test ++ * and from transports where the worker address is too long but ud/ud_x ++ * are not present, or ud/ud_x are present but their addresses are too ++ * long as well */ ++ if (status != UCS_ERR_UNREACHABLE) { ++ UCS_TEST_ABORT("Error: " << ucs_status_string(status)); ++ } + } + + protected: +- volatile int err_handler_count; ++ ucp_test_base::entity::listen_cb_type_t cb_type() const { ++ if ((GetParam().variant == CONN_REQ_TAG) || ++ (GetParam().variant == CONN_REQ_STREAM)) { ++ return ucp_test_base::entity::LISTEN_CB_CONN; ++ } ++ return ucp_test_base::entity::LISTEN_CB_EP; ++ } + }; + + UCS_TEST_P(test_ucp_sockaddr, listen) { ++ listen_and_communicate(cb_type(), false); ++} + +- struct sockaddr_in listen_addr; +- get_listen_addr(&listen_addr); ++UCS_TEST_P(test_ucp_sockaddr, listen_inaddr_any) { + +- ucs_status_t status = receiver().listen((const struct sockaddr*)&listen_addr, +- sizeof(listen_addr)); +- if (status == UCS_ERR_INVALID_ADDR) { +- UCS_TEST_SKIP_R("cannot listen to " + ucs::sockaddr_to_str(&listen_addr)); +- } ++ struct sockaddr_in connect_addr, inaddr_any_listen_addr; ++ get_listen_addr(&connect_addr); ++ inaddr_any_addr(&inaddr_any_listen_addr, connect_addr.sin_port); + +- ucp_ep_params_t ep_params = ucp_test::get_ep_params(); +- ep_params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS | +- UCP_EP_PARAM_FIELD_SOCK_ADDR | +- UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE; +- ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; +- ep_params.flags = UCP_EP_PARAMS_FLAGS_CLIENT_SERVER; +- ep_params.sockaddr.addr = (struct sockaddr*)&listen_addr; +- ep_params.sockaddr.addrlen = sizeof(listen_addr); +- sender().connect(&receiver(), ep_params); ++ UCS_TEST_MESSAGE << "Testing " ++ << ucs::sockaddr_to_str( ++ (const struct sockaddr*)&inaddr_any_listen_addr); + +- tag_send(sender(), receiver()); ++ start_listener(cb_type(), (const struct sockaddr*)&inaddr_any_listen_addr); ++ connect_and_send_recv((struct sockaddr*)&connect_addr, false); ++} + +- /* wait for reverse ep to appear */ +- while (receiver().get_num_eps() == 0) { +- progress(); ++UCS_TEST_P(test_ucp_sockaddr, reject) { ++ if (GetParam().variant > 0) { ++ UCS_TEST_SKIP_R("Not parameterized test"); + } +- tag_send(receiver(), sender()); ++ ++ listen_and_reject(ucp_test_base::entity::LISTEN_CB_REJECT, false); + } + + UCS_TEST_P(test_ucp_sockaddr, err_handle) { + + struct sockaddr_in listen_addr; +- err_handler_count = 0; + + get_listen_addr(&listen_addr); + +- ucs_status_t status = receiver().listen((const struct sockaddr*)&listen_addr, ++ ucs_status_t status = receiver().listen(cb_type(), ++ (const struct sockaddr*)&listen_addr, + sizeof(listen_addr)); +- if (status == UCS_ERR_INVALID_ADDR) { ++ if (status == UCS_ERR_UNREACHABLE) { + UCS_TEST_SKIP_R("cannot listen to " + ucs::sockaddr_to_str(&listen_addr)); + } + + /* make the client try to connect to a non-existing port on the server side */ + listen_addr.sin_port = 1; + +- ucp_ep_params_t ep_params = ucp_test::get_ep_params(); +- ep_params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS | +- UCP_EP_PARAM_FIELD_SOCK_ADDR | +- UCP_EP_PARAM_FIELD_ERR_HANDLING_MODE | +- UCP_EP_PARAM_FIELD_ERR_HANDLER | +- UCP_EP_PARAM_FIELD_USER_DATA; +- ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER; +- ep_params.err_handler.cb = err_handler_cb; +- ep_params.err_handler.arg = NULL; +- ep_params.user_data = reinterpret_cast(this); +- ep_params.flags = UCP_EP_PARAMS_FLAGS_CLIENT_SERVER; +- ep_params.sockaddr.addr = (struct sockaddr*)&listen_addr; +- ep_params.sockaddr.addrlen = sizeof(listen_addr); +- wrap_errors(); +- sender().connect(&receiver(), ep_params); +- /* allow for the unreachable event to arrive before restoring errors */ +- wait_for_flag(&err_handler_count); +- restore_errors(); +- +- EXPECT_EQ(1, err_handler_count); ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ client_ep_connect((struct sockaddr*)&listen_addr); ++ /* allow for the unreachable event to arrive before restoring errors */ ++ wait_for_flag(&m_err_handler_count); ++ } ++ ++ EXPECT_EQ(1, m_err_handler_count); ++} ++ ++UCP_INSTANTIATE_ALL_TEST_CASE(test_ucp_sockaddr) ++ ++ ++class test_ucp_sockaddr_with_wakeup : public test_ucp_sockaddr { ++public: ++ ++ static ucp_params_t get_ctx_params() { ++ ucp_params_t params = test_ucp_sockaddr::get_ctx_params(); ++ params.features |= UCP_FEATURE_WAKEUP; ++ return params; ++ } ++}; ++ ++UCS_TEST_P(test_ucp_sockaddr_with_wakeup, wakeup) { ++ listen_and_communicate(cb_type(), true); ++} ++ ++UCS_TEST_P(test_ucp_sockaddr_with_wakeup, reject) { ++ if (GetParam().variant > 0) { ++ UCS_TEST_SKIP_R("Invalid test parameter"); ++ } ++ ++ listen_and_reject(ucp_test_base::entity::LISTEN_CB_REJECT, true); ++} ++ ++UCP_INSTANTIATE_ALL_TEST_CASE(test_ucp_sockaddr_with_wakeup) ++ ++ ++class test_ucp_sockaddr_with_rma_atomic : public test_ucp_sockaddr { ++public: ++ ++ static ucp_params_t get_ctx_params() { ++ ucp_params_t params = test_ucp_sockaddr::get_ctx_params(); ++ params.field_mask |= UCP_PARAM_FIELD_FEATURES; ++ params.features |= UCP_FEATURE_RMA | ++ UCP_FEATURE_AMO32 | ++ UCP_FEATURE_AMO64; ++ return params; ++ } ++}; ++ ++UCS_TEST_P(test_ucp_sockaddr_with_rma_atomic, wireup) { ++ ++ /* This test makes sure that the client-server flow works when the required ++ * features are RMA/ATOMIC. With these features, need to make sure that ++ * there is a lane for ucp-wireup (an am_lane should be created and used) */ ++ struct sockaddr_in connect_addr; ++ get_listen_addr(&connect_addr); ++ ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str((const struct sockaddr*)&connect_addr); ++ ++ start_listener(cb_type(), (const struct sockaddr*)&connect_addr); ++ ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ ++ client_ep_connect((struct sockaddr*)&connect_addr); ++ ++ /* allow the err_handler callback to be invoked if needed */ ++ if (!wait_for_server_ep(false)) { ++ EXPECT_EQ(1, m_err_handler_count); ++ UCS_TEST_SKIP_R("cannot connect to server"); ++ } ++ ++ EXPECT_EQ(0, m_err_handler_count); ++ /* even if server EP is created, in case of long address, wireup will be ++ * done later, need to communicate */ ++ send_recv(sender(), receiver(), (GetParam().variant == CONN_REQ_STREAM) ? ++ SEND_RECV_STREAM : SEND_RECV_TAG, false, cb_type()); ++ } + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_sockaddr) ++UCP_INSTANTIATE_ALL_TEST_CASE(test_ucp_sockaddr_with_rma_atomic) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_stream.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_stream.cc +index 377614fc4..e7c99d286 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_stream.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_stream.cc +@@ -9,8 +9,8 @@ + #include + #include + ++#include "ucp_datatype.h" + #include "ucp_test.h" +-#include + + + class test_ucp_stream_base : public ucp_test { +@@ -40,7 +40,7 @@ size_t test_ucp_stream_base::wait_stream_recv(void *request) + status = ucp_stream_recv_request_test(request, &length); + } while (status == UCS_INPROGRESS); + ASSERT_UCS_OK(status); +- ucp_request_release(request); ++ ucp_request_free(request); + + return length; + } +@@ -52,6 +52,67 @@ test_ucp_stream_base::stream_send_nb(const ucp::data_type_desc_t& dt_desc) + dt_desc.dt(), ucp_send_cb, 0); + } + ++class test_ucp_stream_onesided : public test_ucp_stream_base { ++public: ++ ucp_ep_params_t get_ep_params() { ++ ucp_ep_params_t params = test_ucp_stream_base::get_ep_params(); ++ params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS; ++ params.flags |= UCP_EP_PARAMS_FLAGS_NO_LOOPBACK; ++ return params; ++ } ++}; ++ ++UCS_TEST_P(test_ucp_stream_onesided, send_recv_no_ep) { ++ ++ /* connect from sender side only and send */ ++ sender().connect(&receiver(), get_ep_params()); ++ uint64_t send_data = ucs::rand(); ++ ucp::data_type_desc_t dt_desc(ucp_dt_make_contig(sizeof(uint64_t)), ++ &send_data, sizeof(send_data)); ++ void *sreq = stream_send_nb(dt_desc); ++ wait(sreq); ++ ++ /* must not receive data before ep is created on receiver side */ ++ static const size_t max_eps = 10; ++ ucp_stream_poll_ep_t poll_eps[max_eps]; ++ ssize_t count = ucp_stream_worker_poll(receiver().worker(), poll_eps, ++ max_eps, 0); ++ EXPECT_EQ(0l, count) << "ucp_stream_worker_poll returned ep too early"; ++ ++ /* create receiver side ep */ ++ ucp_ep_params_t recv_ep_param = get_ep_params(); ++ recv_ep_param.field_mask |= UCP_EP_PARAM_FIELD_USER_DATA; ++ recv_ep_param.user_data = reinterpret_cast(static_cast(ucs::rand())); ++ receiver().connect(&sender(), recv_ep_param); ++ ++ /* expect ep to be ready */ ++ ucs_time_t deadline = ucs_get_time() + ++ (ucs_time_from_sec(10.0) * ucs::test_time_multiplier()); ++ do { ++ progress(); ++ count = ucp_stream_worker_poll(receiver().worker(), poll_eps, max_eps, 0); ++ } while ((count == 0) && (ucs_get_time() < deadline)); ++ EXPECT_EQ(1l, count); ++ EXPECT_EQ(recv_ep_param.user_data, poll_eps[0].user_data); ++ EXPECT_EQ(receiver().ep(0), poll_eps[0].ep); ++ ++ /* expect data to be received */ ++ uint64_t recv_data = 0; ++ size_t recv_length = 0; ++ void *rreq = ucp_stream_recv_nb(receiver().ep(), &recv_data, 1, ++ ucp_dt_make_contig(sizeof(uint64_t)), ++ ucp_recv_cb, &recv_length, 0); ++ ASSERT_UCS_PTR_OK(rreq); ++ if (rreq != NULL) { ++ recv_length = wait_stream_recv(rreq); ++ } ++ ++ EXPECT_EQ(sizeof(uint64_t), recv_length); ++ EXPECT_EQ(send_data, recv_data); ++} ++ ++UCP_INSTANTIATE_TEST_CASE(test_ucp_stream_onesided) ++ + class test_ucp_stream : public test_ucp_stream_base + { + public: +@@ -66,11 +127,16 @@ public: + + protected: + void do_send_recv_data_test(ucp_datatype_t datatype); +- template ++ template + void do_send_recv_test(ucp_datatype_t datatype); +- template ++ template + void do_send_exp_recv_test(ucp_datatype_t datatype); + void do_send_recv_data_recv_test(ucp_datatype_t datatype); ++ ++ /* for self-validation of generic datatype ++ * NOTE: it's tested only with byte array data since it's recv completion ++ * granularity without UCP_RECV_FLAG_WAITALL flag */ ++ std::vector context; + }; + + void test_ucp_stream::do_send_recv_data_test(ucp_datatype_t datatype) +@@ -82,10 +148,17 @@ void test_ucp_stream::do_send_recv_data_test(ucp_datatype_t datatype) + + /* send all msg sizes*/ + for (size_t i = 3; i < sbuf.size(); i *= 2) { +- ucs::fill_random(sbuf, i); +- check_pattern.insert(check_pattern.end(), sbuf.begin(), +- sbuf.begin() + i); +- sstatus = stream_send_nb(ucp::data_type_desc_t(datatype, sbuf.data(), i)); ++ if (UCP_DT_IS_GENERIC(datatype)) { ++ for (size_t j = 0; j < i; ++j) { ++ check_pattern.push_back(char(j)); ++ } ++ } else { ++ ucs::fill_random(sbuf, i); ++ check_pattern.insert(check_pattern.end(), sbuf.begin(), ++ sbuf.begin() + i); ++ } ++ ucp::data_type_desc_t dt_desc(datatype, sbuf.data(), i); ++ sstatus = stream_send_nb(dt_desc); + EXPECT_FALSE(UCS_PTR_IS_ERR(sstatus)); + wait(sstatus); + ssize += i; +@@ -111,7 +184,7 @@ void test_ucp_stream::do_send_recv_data_test(ucp_datatype_t datatype) + EXPECT_EQ(check_pattern, rbuf); + } + +-template ++template + void test_ucp_stream::do_send_recv_test(ucp_datatype_t datatype) + { + const size_t dt_elem_size = UCP_DT_IS_CONTIG(datatype) ? +@@ -123,20 +196,33 @@ void test_ucp_stream::do_send_recv_test(ucp_datatype_t datatype) + + /* send all msg sizes in bytes*/ + for (size_t i = 3; i < sbuf.size(); i *= 2) { +- ucs::fill_random(sbuf, i); +- check_pattern.insert(check_pattern.end(), sbuf.begin(), sbuf.begin() + i); +- sstatus = stream_send_nb(ucp::data_type_desc_t(DATATYPE, sbuf.data(), i)); ++ ucp_datatype_t dt; ++ if (UCP_DT_IS_GENERIC(datatype)) { ++ dt = datatype; ++ for (size_t j = 0; j < i; ++j) { ++ context.push_back(uint8_t(j)); ++ } ++ } else { ++ dt = DATATYPE; ++ ucs::fill_random(sbuf, i); ++ check_pattern.insert(check_pattern.end(), sbuf.begin(), ++ sbuf.begin() + i); ++ } ++ ucp::data_type_desc_t dt_desc(dt, sbuf.data(), i); ++ sstatus = stream_send_nb(dt_desc); + EXPECT_FALSE(UCS_PTR_IS_ERR(sstatus)); + wait(sstatus); + ssize += i; + } + +- size_t align_tail = dt_elem_size - ssize % dt_elem_size; ++ size_t align_tail = UCP_DT_IS_GENERIC(datatype) ? 0 : ++ (dt_elem_size - ssize % dt_elem_size); + if (align_tail != 0) { + ucs::fill_random(sbuf, align_tail); + check_pattern.insert(check_pattern.end(), sbuf.begin(), sbuf.begin() + align_tail); +- sstatus = stream_send_nb(ucp::data_type_desc_t(ucp_dt_make_contig(align_tail), +- sbuf.data(), align_tail)); ++ ucp::data_type_desc_t dt_desc(ucp_dt_make_contig(align_tail), ++ sbuf.data(), align_tail); ++ sstatus = stream_send_nb(dt_desc); + EXPECT_FALSE(UCS_PTR_IS_ERR(sstatus)); + wait(sstatus); + ssize += align_tail; +@@ -146,6 +232,7 @@ void test_ucp_stream::do_send_recv_test(ucp_datatype_t datatype) + + std::vector rbuf(ssize / dt_elem_size, 'r'); + size_t roffset = 0; ++ size_t counter = 0; + do { + ucp::data_type_desc_t dt_desc(datatype, &rbuf[roffset / dt_elem_size], + ssize - roffset); +@@ -153,22 +240,30 @@ void test_ucp_stream::do_send_recv_test(ucp_datatype_t datatype) + size_t length; + void *rreq = ucp_stream_recv_nb(receiver().ep(), dt_desc.buf(), + dt_desc.count(), dt_desc.dt(), +- ucp_recv_cb, &length, 0); ++ ucp_recv_cb, &length, recv_flags); + ASSERT_TRUE(!UCS_PTR_IS_ERR(rreq)); + if (UCS_PTR_IS_PTR(rreq)) { + length = wait_stream_recv(rreq); + } + EXPECT_EQ(size_t(0), length % dt_elem_size); + roffset += length; ++ counter++; + } while (roffset < ssize); + ++ /* waitall flag requires completion by single request */ ++ if (recv_flags & UCP_STREAM_RECV_FLAG_WAITALL) { ++ EXPECT_EQ(size_t(1), counter); ++ } ++ + EXPECT_EQ(roffset, ssize); +- const T *check_ptr = reinterpret_cast(check_pattern.data()); +- const size_t check_size = check_pattern.size() / dt_elem_size; +- EXPECT_EQ(std::vector(check_ptr, check_ptr + check_size), rbuf); ++ if (!UCP_DT_IS_GENERIC(datatype)) { ++ const T *check_ptr = reinterpret_cast(check_pattern.data()); ++ const size_t check_size = check_pattern.size() / dt_elem_size; ++ EXPECT_EQ(std::vector(check_ptr, check_ptr + check_size), rbuf); ++ } + } + +-template ++template + void test_ucp_stream::do_send_exp_recv_test(ucp_datatype_t datatype) + { + const size_t dt_elem_size = UCP_DT_IS_CONTIG(datatype) ? +@@ -189,7 +284,7 @@ void test_ucp_stream::do_send_exp_recv_test(ucp_datatype_t datatype) + + void *rreq = ucp_stream_recv_nb(receiver().ep(), rdesc.buf(), + rdesc.count(), rdesc.dt(), ucp_recv_cb, +- &length, 0); ++ &length, recv_flags); + EXPECT_TRUE(UCS_PTR_IS_PTR(rreq)); + rreqs.push_back(rreq); + } +@@ -213,6 +308,7 @@ void test_ucp_stream::do_send_exp_recv_test(ucp_datatype_t datatype) + rcount += length; + } + ++ size_t counter = 0; + while (rcount < scount) { + size_t length = std::numeric_limits::max(); + ucs_status_ptr_t rreq; +@@ -226,9 +322,15 @@ void test_ucp_stream::do_send_exp_recv_test(ucp_datatype_t datatype) + ASSERT_LE(length, msg_size); + EXPECT_EQ(size_t(0), length % dt_elem_size); + rcount += length; ++ counter++; + } + EXPECT_EQ(scount, rcount); + ++ /* waitall flag requires completion by single request */ ++ if (recv_flags & UCP_STREAM_RECV_FLAG_WAITALL) { ++ EXPECT_EQ(size_t(0), counter); ++ } ++ + /* double check, no data should be here */ + while (progress()); + +@@ -263,8 +365,8 @@ void test_ucp_stream::do_send_recv_data_recv_test(ucp_datatype_t datatype) + ucs::fill_random(sbuf, send_i); + check_pattern.insert(check_pattern.end(), sbuf.begin(), + sbuf.begin() + send_i); +- sstatus = stream_send_nb(ucp::data_type_desc_t(datatype, sbuf.data(), +- send_i)); ++ ucp::data_type_desc_t dt_desc(datatype, sbuf.data(), send_i); ++ sstatus = stream_send_nb(dt_desc); + EXPECT_FALSE(UCS_PTR_IS_ERR(sstatus)); + wait(sstatus); + ssize += send_i; +@@ -306,44 +408,91 @@ UCS_TEST_P(test_ucp_stream, send_iov_recv_data) { + do_send_recv_data_test(DATATYPE_IOV); + } + ++UCS_TEST_P(test_ucp_stream, send_generic_recv_data) { ++ ucp_datatype_t dt; ++ ucs_status_t status; ++ ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, &dt); ++ ASSERT_UCS_OK(status); ++ do_send_recv_data_test(dt); ++ ucp_dt_destroy(dt); ++} ++ + UCS_TEST_P(test_ucp_stream, send_recv_8) { +- do_send_recv_test(ucp_dt_make_contig(sizeof(uint8_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint8_t)); ++ ++ do_send_recv_test(datatype); ++ do_send_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_recv_16) { +- do_send_recv_test(ucp_dt_make_contig(sizeof(uint16_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint16_t)); ++ ++ do_send_recv_test(datatype); ++ do_send_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_recv_32) { +- do_send_recv_test(ucp_dt_make_contig(sizeof(uint32_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint32_t)); ++ ++ do_send_recv_test(datatype); ++ do_send_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_recv_64) { +- do_send_recv_test(ucp_dt_make_contig(sizeof(uint64_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint64_t)); ++ ++ do_send_recv_test(datatype); ++ do_send_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_recv_iov) { +- do_send_recv_test(DATATYPE_IOV); ++ do_send_recv_test(DATATYPE_IOV); ++ do_send_recv_test(DATATYPE_IOV); ++} ++ ++UCS_TEST_P(test_ucp_stream, send_recv_generic) { ++ ucp_datatype_t dt; ++ ucs_status_t status; ++ ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, &context, &dt); ++ ASSERT_UCS_OK(status); ++ do_send_recv_test(dt); ++ ucp_dt_destroy(dt); ++ + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_8) { +- do_send_exp_recv_test(ucp_dt_make_contig(sizeof(uint8_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint8_t)); ++ ++ do_send_exp_recv_test(datatype); ++ do_send_exp_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_16) { +- do_send_exp_recv_test(ucp_dt_make_contig(sizeof(uint16_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint16_t)); ++ ++ do_send_exp_recv_test(datatype); ++ do_send_exp_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_32) { +- do_send_exp_recv_test(ucp_dt_make_contig(sizeof(uint32_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint32_t)); ++ ++ do_send_exp_recv_test(datatype); ++ do_send_exp_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_64) { +- do_send_exp_recv_test(ucp_dt_make_contig(sizeof(uint64_t))); ++ ucp_datatype_t datatype = ucp_dt_make_contig(sizeof(uint64_t)); ++ ++ do_send_exp_recv_test(datatype); ++ do_send_exp_recv_test(datatype); + } + + UCS_TEST_P(test_ucp_stream, send_exp_recv_iov) { +- do_send_exp_recv_test(DATATYPE_IOV); ++ do_send_exp_recv_test(DATATYPE_IOV); ++ do_send_exp_recv_test(DATATYPE_IOV); + } + + UCS_TEST_P(test_ucp_stream, send_recv_data_recv_8) { +@@ -366,6 +515,52 @@ UCS_TEST_P(test_ucp_stream, send_recv_data_recv_iov) { + do_send_recv_data_recv_test(DATATYPE_IOV); + } + ++UCS_TEST_P(test_ucp_stream, send_zero_ending_iov_recv_data) { ++ const size_t min_size = 1024; ++ const size_t max_size = min_size * 64; ++ const size_t iov_num = 8; /* must be divisible by 4 without a ++ * remainder, caught on mlx5 based TLs ++ * where max_iov = 3 for zcopy multi ++ * protocol, where every posting includes: ++ * 1 header + 2 nonempty IOVs */ ++ const size_t iov_num_nonempty = iov_num / 2; ++ ++ std::vector buf(max_size * 2); ++ ucs::fill_random(buf, buf.size()); ++ std::vector v(iov_num); ++ ++ for (size_t size = min_size; size < max_size; ++size) { ++ size_t slen = 0; ++ for (size_t j = 0; j < iov_num; ++j) { ++ if ((j % 2) == 0) { ++ uint8_t *ptr = buf.data(); ++ v[j].buffer = &(ptr[j * size / iov_num_nonempty]); ++ v[j].length = size / iov_num_nonempty; ++ slen += v[j].length; ++ } else { ++ v[j].buffer = NULL; ++ v[j].length = 0; ++ } ++ } ++ ++ void *sreq = ucp_stream_send_nb(sender().ep(), &v[0], iov_num, ++ DATATYPE_IOV, ucp_send_cb, 0); ++ ++ size_t rlen = 0; ++ while (rlen < slen) { ++ progress(); ++ size_t length; ++ void *rdata = ucp_stream_recv_data_nb(receiver().ep(), &length); ++ EXPECT_FALSE(UCS_PTR_IS_ERR(rdata)); ++ if (rdata != NULL) { ++ rlen += length; ++ ucp_stream_data_release(receiver().ep(), rdata); ++ } ++ } ++ wait(sreq); ++ } ++} ++ + UCP_INSTANTIATE_TEST_CASE(test_ucp_stream) + + class test_ucp_stream_many2one : public test_ucp_stream_base { +@@ -403,7 +598,7 @@ protected: + size_t send_all(ucp_datatype_t datatype, size_t n_iter); + void check_no_data(); + std::set check_no_data(entity &e); +- void check_recv_data(size_t n_iter); ++ void check_recv_data(size_t n_iter, ucp_datatype_t dt); + + std::vector m_msgs; + std::vector > m_recv_data; +@@ -476,7 +671,7 @@ void test_ucp_stream_many2one::do_send_worker_poll_test(ucp_datatype_t dt) + } while (!sreqs.empty() || (total_len != 0)); + + check_no_data(); +- check_recv_data(niter); ++ check_recv_data(niter, dt); + } + + void test_ucp_stream_many2one::do_send_recv_test(ucp_datatype_t dt) +@@ -495,7 +690,7 @@ void test_ucp_stream_many2one::do_send_recv_test(ucp_datatype_t dt) + m_recv_data[i].resize(m_msgs[i].length() * niter + 1); + ucp::data_type_desc_t &rdesc = dt_rdescs[i].make(dt, + &m_recv_data[i][roffsets[i]], +- m_recv_data[i].size()); ++ m_recv_data[i].size()); + size_t length; + void *rreq = ucp_stream_recv_nb(e(m_receiver_idx).ep(0, i), + rdesc.buf(), rdesc.count(), rdesc.dt(), +@@ -514,35 +709,44 @@ void test_ucp_stream_many2one::do_send_recv_test(ucp_datatype_t dt) + roffsets[rreqs[i].first] += wait_stream_recv(rreqs[i].second.m_req); + } + rreqs.clear(); ++ progress(); + +- do { +- const size_t max_eps = 10; +- ucp_stream_poll_ep_t poll_eps[max_eps]; +- progress(); +- count = ucp_stream_worker_poll(e(m_receiver_idx).worker(), +- poll_eps, max_eps, 0); +- EXPECT_LE(0, count); ++ const size_t max_eps = 10; ++ ucp_stream_poll_ep_t poll_eps[max_eps]; ++ count = ucp_stream_worker_poll(e(m_receiver_idx).worker(), ++ poll_eps, max_eps, 0); ++ EXPECT_LE(0, count); ++ EXPECT_LE(size_t(count), m_nsenders); + +- for (ssize_t i = 0; i < count; ++i) { ++ for (ssize_t i = 0; i < count; ++i) { ++ bool again = true; ++ while (again) { + size_t sender_idx = uintptr_t(poll_eps[i].user_data); + size_t &roffset = roffsets[sender_idx]; + ucp::data_type_desc_t &dt_desc = + dt_rdescs[sender_idx].forward_to(roffset); + EXPECT_TRUE(dt_desc.is_valid()); + size_t length; +- void *rreq = ucp_stream_recv_nb(poll_eps[i].ep, dt_desc.buf(), +- dt_desc.count(), dt_desc.dt(), ++ void *rreq = ucp_stream_recv_nb(poll_eps[i].ep, ++ dt_desc.buf(), ++ dt_desc.count(), ++ dt_desc.dt(), + ucp_recv_cb, &length, 0); +- if (UCS_PTR_STATUS(rreq) == UCS_OK) { ++ EXPECT_FALSE(UCS_PTR_IS_ERR(rreq)); ++ if (rreq == NULL) { ++ EXPECT_LT(size_t(0), length); + roffset += length; ++ if (ssize_t(length) < dt_desc.buf_length()) { ++ continue; /* Need to drain the EP */ ++ } + } else { + rreqs.push_back(std::make_pair(sender_idx, + request_wrapper_t(rreq, + &dt_desc))); + } +- EXPECT_FALSE(UCS_PTR_IS_ERR(rreq)); ++ again = false; + } +- } while (count > 0); ++ } + + erase_completed_reqs(sreqs); + } while (!rreqs.empty() || !sreqs.empty() || +@@ -552,7 +756,7 @@ void test_ucp_stream_many2one::do_send_recv_test(ucp_datatype_t dt) + EXPECT_EQ(total_sdata, std::accumulate(roffsets.begin(), + roffsets.end(), 0ul)); + check_no_data(); +- check_recv_data(niter); ++ check_recv_data(niter, dt); + } + + ucs_status_ptr_t +@@ -653,16 +857,25 @@ std::set test_ucp_stream_many2one::check_no_data(entity &e) + return ret; + } + +-void test_ucp_stream_many2one::check_recv_data(size_t n_iter) ++void test_ucp_stream_many2one::check_recv_data(size_t n_iter, ucp_datatype_t dt) + { + for (size_t i = 0; i < m_nsenders; ++i) { +- const std::string test = std::string("sender_") + ucs::to_string(i); ++ std::string test = std::string("sender_") + ucs::to_string(i); + const std::string str(&m_recv_data[i].front()); ++ if (UCP_DT_IS_GENERIC(dt)) { ++ std::vector test_gen; ++ for (size_t j = 0; j < test.length(); ++j) { ++ test_gen.push_back(char(j)); ++ } ++ test_gen.push_back('\0'); ++ test = std::string(test_gen.data()); ++ } ++ + size_t next = 0; + for (size_t j = 0; j < n_iter; ++j) { + size_t match = str.find(test, next); +- EXPECT_NE(std::string::npos, match) << "failed on " << j +- << " iteration"; ++ EXPECT_NE(std::string::npos, match) << "failed on sender " << i ++ << " iteration " << j; + if (match == std::string::npos) { + break; + } +@@ -682,7 +895,7 @@ test_ucp_stream_many2one::erase_completed_reqs(std::vector &r + ucs_status_t status = ucp_request_check_status(i->m_req); + if (status != UCS_INPROGRESS) { + EXPECT_EQ(UCS_OK, status); +- ucp_request_release(i->m_req); ++ ucp_request_free(i->m_req); + delete i->m_dt_desc; + i = reqs.erase(i); + } else { +@@ -707,9 +920,23 @@ UCS_TEST_P(test_ucp_stream_many2one, drop_data) { + m_entities.at(0).revoke_ep(); + m_entities.at(m_receiver_idx).revoke_ep(0, 0); + ++ /* wait for 1-st byte on the last EP to be sure the network packets have ++ been arrived */ ++ uint8_t check; ++ size_t check_length; ++ ucp_ep_h last_ep = m_entities.at(m_receiver_idx).ep(0, m_nsenders - 1); ++ void *check_req = ucp_stream_recv_nb(last_ep, &check, 1, DATATYPE, ++ ucp_recv_cb, &check_length, 0); ++ EXPECT_FALSE(UCS_PTR_IS_ERR(check_req)); ++ if (UCS_PTR_IS_PTR(check_req)) { ++ wait_stream_recv(check_req); ++ } ++ + /* data from disconnected EP should be dropped */ + std::set others = check_no_data(m_entities.at(0)); +- EXPECT_EQ(m_nsenders - 1, others.size()); ++ /* since ordering between EPs is not guaranteed, some data may be still in ++ * the network or buffered by transport */ ++ EXPECT_LE(others.size(), m_nsenders - 1); + + /* reconnect */ + m_entities.at(0).connect(&m_entities.at(m_receiver_idx), get_ep_params(), 0); +@@ -737,6 +964,16 @@ UCS_TEST_P(test_ucp_stream_many2one, send_worker_poll_iov) { + do_send_worker_poll_test(DATATYPE_IOV); + } + ++UCS_TEST_P(test_ucp_stream_many2one, send_worker_poll_generic) { ++ ucp_datatype_t dt; ++ ucs_status_t status; ++ ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, &dt); ++ ASSERT_UCS_OK(status); ++ do_send_worker_poll_test(dt); ++ ucp_dt_destroy(dt); ++} ++ + UCS_TEST_P(test_ucp_stream_many2one, send_recv_nb) { + do_send_recv_test(DATATYPE); + } +@@ -745,4 +982,14 @@ UCS_TEST_P(test_ucp_stream_many2one, send_recv_nb_iov) { + do_send_recv_test(DATATYPE_IOV); + } + ++UCS_TEST_P(test_ucp_stream_many2one, send_recv_nb_generic) { ++ ucp_datatype_t dt; ++ ucs_status_t status; ++ ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, &dt); ++ ASSERT_UCS_OK(status); ++ do_send_recv_test(dt); ++ ucp_dt_destroy(dt); ++} ++ + UCP_INSTANTIATE_TEST_CASE(test_ucp_stream_many2one) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.cc +index ec391895b..732e14175 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.cc +@@ -7,9 +7,12 @@ + + #include "test_ucp_tag.h" + +-#include ++#include "ucp_datatype.h" ++ + extern "C" { + #include ++#include ++#include + } + + +@@ -34,8 +37,8 @@ void test_ucp_tag::init() + ctx_attr.field_mask |= UCP_ATTR_FIELD_THREAD_MODE; + ucp_context_query(receiver().ucph(), &ctx_attr); + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + } + + void test_ucp_tag::request_init(void *request) +@@ -145,6 +148,16 @@ void test_ucp_tag::wait_for_unexpected_msg(ucp_worker_h worker, double sec) + } while (ucp_tag_unexp_is_empty(&worker->tm) && (ucs_get_time() < timeout)); + } + ++void test_ucp_tag::check_offload_support(bool offload_required) ++{ ++ bool offload_supported = ucp_ep_is_tag_offload_enabled(ucp_ep_config(sender().ep())); ++ if (offload_supported != offload_required) { ++ cleanup(); ++ std::string reason = offload_supported ? "tag offload" : "no tag offload"; ++ UCS_TEST_SKIP_R(reason); ++ } ++} ++ + int test_ucp_tag::get_worker_index(int buf_index) + { + int worker_index = 0; +@@ -306,131 +319,9 @@ ucs_status_t test_ucp_tag::recv_req_b(void *buffer, size_t count, ucp_datatype_t + return status; + } + +-void* test_ucp_tag::dt_common_start(size_t count) +-{ +- dt_gen_state *dt_state = new dt_gen_state; +- dt_state->count = count; +- dt_state->started = 1; +- dt_state->magic = MAGIC; +- dt_gen_start_count++; +- return dt_state; +-} +- +-void* test_ucp_tag::dt_common_start_pack(void *context, const void *buffer, size_t count) +-{ +- return dt_common_start(count); +-} +- +-void* test_ucp_tag::dt_common_start_unpack(void *context, void *buffer, size_t count) +-{ +- return dt_common_start(count); +-} +- +-template +-size_t test_ucp_tag::dt_packed_size(void *state) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- return dt_state->count * sizeof(T); +-} +- +-template +-size_t test_ucp_tag::dt_pack(void *state, size_t offset, void *dest, size_t max_length) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- T *p = reinterpret_cast (dest); +- uint32_t count; +- +- EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); +- EXPECT_EQ(1, dt_state->started); +- EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); +- +- ucs_assert((offset % sizeof(T)) == 0); +- +- count = ucs_min(max_length / sizeof(T), +- dt_state->count - (offset / sizeof(T))); +- for (unsigned i = 0; i < count; ++i) { +- p[i] = (offset / sizeof(T)) + i; +- } +- return count * sizeof(T); +-} +- +-template +-ucs_status_t test_ucp_tag::dt_unpack(void *state, size_t offset, const void *src, +- size_t length) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- uint32_t count; +- +- EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); +- EXPECT_EQ(1, dt_state->started); +- EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); +- +- count = length / sizeof(T); +- for (unsigned i = 0; i < count; ++i) { +- T expected = (offset / sizeof(T)) + i; +- T actual = ((T*)src)[i]; +- if (actual != expected) { +- UCS_TEST_ABORT("Invalid data at index " << i << ". expected: " << +- expected << " actual: " << actual << " offset: " << +- offset << "."); +- } +- } +- return UCS_OK; +-} +- +-ucs_status_t test_ucp_tag::dt_err_unpack(void *state, size_t offset, const void *src, +- size_t length) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- +- EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); +- EXPECT_EQ(1, dt_state->started); +- EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); +- +- return UCS_ERR_NO_MEMORY; +-} +- +-void test_ucp_tag::dt_common_finish(void *state) +-{ +- dt_gen_state *dt_state = (dt_gen_state*)state; +- --dt_state->started; +- EXPECT_EQ(0, dt_state->started); +- dt_gen_finish_count++; +- delete dt_state; +-} +- + bool test_ucp_tag::is_external_request() + { + return false; + } + +-ucp_generic_dt_ops test_ucp_tag::test_dt_uint32_ops = { +- test_ucp_tag::dt_common_start_pack, +- test_ucp_tag::dt_common_start_unpack, +- test_ucp_tag::dt_packed_size, +- test_ucp_tag::dt_pack, +- test_ucp_tag::dt_unpack, +- test_ucp_tag::dt_common_finish +-}; +- +-ucp_generic_dt_ops test_ucp_tag::test_dt_uint8_ops = { +- test_ucp_tag::dt_common_start_pack, +- test_ucp_tag::dt_common_start_unpack, +- test_ucp_tag::dt_packed_size, +- test_ucp_tag::dt_pack, +- test_ucp_tag::dt_unpack, +- test_ucp_tag::dt_common_finish +-}; +- +-ucp_generic_dt_ops test_ucp_tag::test_dt_uint32_err_ops = { +- test_ucp_tag::dt_common_start_pack, +- test_ucp_tag::dt_common_start_unpack, +- test_ucp_tag::dt_packed_size, +- test_ucp_tag::dt_pack, +- test_ucp_tag::dt_err_unpack, +- test_ucp_tag::dt_common_finish +-}; +- +-int test_ucp_tag::dt_gen_start_count = 0; +-int test_ucp_tag::dt_gen_finish_count = 0; + ucp_context_attr_t test_ucp_tag::ctx_attr; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.h +index db2ea2a6f..e7331d80b 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag.h +@@ -30,12 +30,6 @@ protected: + ucp_tag_recv_info_t info; + }; + +- struct dt_gen_state { +- size_t count; +- int started; +- uint32_t magic; +- }; +- + virtual void init(); + + static void request_init(void *request); +@@ -90,35 +84,10 @@ protected: + + void wait_for_unexpected_msg(ucp_worker_h worker, double sec); + +- static void* dt_common_start(size_t count); +- +- static void* dt_common_start_pack(void *context, const void *buffer, size_t count); +- +- static void* dt_common_start_unpack(void *context, void *buffer, size_t count); +- +- template +- static size_t dt_packed_size(void *state); +- +- template +- static size_t dt_pack(void *state, size_t offset, void *dest, size_t max_length); +- +- template +- static ucs_status_t dt_unpack(void *state, size_t offset, const void *src, +- size_t length); +- +- static ucs_status_t dt_err_unpack(void *state, size_t offset, const void *src, +- size_t length); +- +- static void dt_common_finish(void *state); ++ void check_offload_support(bool offload_required); + + virtual bool is_external_request(); + +- static const uint32_t MAGIC = 0xd7d7d7d7U; +- static ucp_generic_dt_ops test_dt_uint32_ops; +- static ucp_generic_dt_ops test_dt_uint32_err_ops; +- static ucp_generic_dt_ops test_dt_uint8_ops; +- static int dt_gen_start_count; +- static int dt_gen_finish_count; + static ucp_context_attr_t ctx_attr; + private: + int get_worker_index(int buf_index); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_match.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_match.cc +index d4279ef7f..9d0919c96 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_match.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_match.cc +@@ -17,7 +17,11 @@ public: + virtual void init() + { + m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_ENABLE", "y")); ++ if (RUNNING_ON_VALGRIND) { ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_MAX_BCOPY", "8k")); ++ } + modify_config("TM_THRESH", "1"); ++ + test_ucp_tag::init(); + ucp_test_param param = GetParam(); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_offload.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_offload.cc +index a30b9367b..7ea54ddd6 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_offload.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_offload.cc +@@ -6,10 +6,9 @@ + + #include "test_ucp_tag.h" + +-#include ++#include "ucp_datatype.h" + + extern "C" { +-#include + #include + #include + } +@@ -20,12 +19,8 @@ public: + void init() + { + m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_ENABLE", "y")); +- + test_ucp_tag::init(); +- if (!(sender().ep()->flags & UCP_EP_FLAG_TAG_OFFLOAD_ENABLED)) { +- test_ucp_tag::cleanup(); +- UCS_TEST_SKIP_R("no tag offload"); +- } ++ check_offload_support(true); + } + + request* recv_nb_and_check(void *buffer, size_t count, ucp_datatype_t dt, +@@ -37,30 +32,31 @@ public: + return req; + } + +- void send_b_from(entity &se, const void *buffer, size_t count, +- ucp_datatype_t datatype, ucp_tag_t tag) ++ void send_recv(entity &se, ucp_tag_t tag, size_t length) + { ++ std::vector sendbuf(length); ++ std::vector recvbuf(length); + +- request *req = (request*)ucp_tag_send_nb(se.ep(), buffer, count, +- datatype, tag, send_callback); +- if (UCS_PTR_IS_ERR(req)) { +- ASSERT_UCS_OK(UCS_PTR_STATUS(req)); +- } else if (req != NULL) { +- wait(req); +- request_free(req); ++ request *rreq = recv_nb_and_check(&recvbuf[0], length, DATATYPE, tag, ++ UCP_TAG_MASK_FULL); ++ request *sreq = (request*)ucp_tag_send_nb(se.ep(), &sendbuf[0], length, ++ DATATYPE, tag, send_callback); ++ if (UCS_PTR_IS_ERR(sreq)) { ++ ASSERT_UCS_OK(UCS_PTR_STATUS(sreq)); ++ } else if (sreq != NULL) { ++ wait(sreq); ++ request_free(sreq); + } ++ ++ wait(rreq); ++ request_free(rreq); + } + + void activate_offload(entity &se, ucp_tag_t tag = 0x11) + { + uint64_t small_val = 0xFAFA; + +- request *req = recv_nb_and_check(&small_val, sizeof(small_val), +- DATATYPE, tag, UCP_TAG_MASK_FULL); +- +- send_b_from(se, &small_val, sizeof(small_val), DATATYPE, tag); +- wait(req); +- request_free(req); ++ send_recv(se, tag, sizeof(small_val)); + } + + void req_cancel(entity &e, request *req) +@@ -293,18 +289,19 @@ public: + + // TODO: add more tls which support tag offloading + std::vector tls; +- tls.push_back("rc"); ++ tls.push_back("dc_x"); + tls.push_back("dc"); + tls.push_back("rc_x"); +- tls.push_back("dc_x"); + ucp_test_param params = GetParam(); + ++ // Create new entity and add to to the end of vector ++ // (thus it will be receiver without any connections) ++ create_entity(false); + for (std::vector::const_iterator i = tls.begin(); + i != tls.end(); ++i) { + params.transports.clear(); + params.transports.push_back(*i); + create_entity(true, params); +- e(0).connect(&receiver(), get_ep_params()); + } + } + +@@ -320,6 +317,15 @@ public: + return (i << 48) | t; + } + ++ void activate_offload_hashing(entity &se, ucp_tag_t tag) ++ { ++ se.connect(&receiver(), get_ep_params()); ++ // Need to send twice, since the first message may not enable hashing ++ // (num_active_iface on worker is increased after unexpected offload handler) ++ send_recv(se, tag, 2048); ++ send_recv(se, tag, 2048); ++ } ++ + void post_recv_and_check(entity &e, unsigned sw_count, ucp_tag_t tag, + ucp_tag_t tag_mask) + { +@@ -342,19 +348,20 @@ UCS_TEST_P(test_ucp_tag_offload_multi, recv_from_multi) + ucp_tag_t tag = 0x11; + + // Activate first offload iface. Tag hashing is not done yet, since we +- // have only one iface so far. +- activate_offload(e(0), make_tag(e(0), tag)); ++ // have only one active iface so far. ++ activate_offload_hashing(e(0), make_tag(e(0), tag)); + EXPECT_EQ(0u, kh_size(&receiver().worker()->tm.offload.tag_hash)); + + // Activate second offload iface. The tag has been added to the hash. + // From now requests will be offloaded only for those tags which are + // in the hash. +- activate_offload(e(1), make_tag(e(1), tag)); ++ activate_offload_hashing(e(1), make_tag(e(1), tag)); + EXPECT_EQ(1u, kh_size(&receiver().worker()->tm.offload.tag_hash)); + + // Need to send a message on the first iface again, for its 'tag_sender' + // part of the tag to be added to the hash. +- activate_offload(e(0), make_tag(e(0), tag)); ++ send_recv(e(0), make_tag(e(0), tag), 2048); ++ EXPECT_EQ(2u, kh_size(&receiver().worker()->tm.offload.tag_hash)); + + // Now requests from first two senders should be always offloaded regardless + // of the tag value. Tag does not matter, because hashing is done with +@@ -367,11 +374,15 @@ UCS_TEST_P(test_ucp_tag_offload_multi, recv_from_multi) + // sender and its 'tag_sender_mask' is not added to the hash yet. + post_recv_and_check(e(2), 1u, tag, UCP_TAG_MASK_FULL); + +- activate_offload(e(2), make_tag(e(2), tag)); ++ activate_offload_hashing(e(2), make_tag(e(2), tag)); ++ EXPECT_EQ(3u, kh_size(&receiver().worker()->tm.offload.tag_hash)); ++ + // Check that this sender was added as well + post_recv_and_check(e(2), 0u, tag + 1, UCP_TAG_MASK_FULL); + } + ++// Do not include SM transports, because they would be selected for tag matching. ++// And since they do not support TM offload, this test would be skipped. + UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_tag_offload_multi, all_rcdc, + "\\rc,\\dc,\\ud,rc_x,dc_x") + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_perf.cc +index 8701be5a1..60fcf6e62 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_perf.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_perf.cc +@@ -6,8 +6,6 @@ + + #include "test_ucp_tag.h" + +-#include +- + + class test_ucp_tag_perf : public test_ucp_tag { + public: +@@ -36,7 +34,7 @@ double test_ucp_tag_perf::check_perf(size_t count, bool is_exp) + + for (size_t i = 0; i < count; ++i) { + request *rreq = recv_nb(NULL, 0, DATATYPE, i, TAG_MASK); +- ucs_assert(!UCS_PTR_IS_ERR(rreq)); ++ assert(!UCS_PTR_IS_ERR(rreq)); + EXPECT_FALSE(rreq->completed); + rreqs.push_back(rreq); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_xfer.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_xfer.cc +index e5a5249d3..068da4563 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_xfer.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_tag_xfer.cc +@@ -7,12 +7,13 @@ + + #include "test_ucp_tag.h" + ++#include "ucp_datatype.h" ++ + extern "C" { + #include + #include + } + +-#include + #include + + +@@ -32,6 +33,12 @@ public: + } else if (GetParam().variant == VARIANT_RNDV_AUTO) { + modify_config("RNDV_SCHEME", "auto"); + } ++ modify_config("MAX_EAGER_LANES", "2"); ++ modify_config("MAX_RNDV_LANES", "2"); ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_ENABLE", "y")); ++ if (RUNNING_ON_VALGRIND) { ++ m_env.push_back(new ucs::scoped_setenv("UCX_RC_TM_MAX_BCOPY", "8k")); ++ } + test_ucp_tag::init(); + } + +@@ -87,6 +94,10 @@ protected: + typedef void (test_ucp_tag_xfer::* xfer_func_t)(size_t size, bool expected, + bool sync, bool truncated); + ++ size_t do_xfer(const void *sendbuf, void *recvbuf, size_t count, ++ ucp_datatype_t send_dt, ucp_datatype_t recv_dt, ++ bool expected, bool sync, bool truncated); ++ + void test_xfer(xfer_func_t func, bool expected, bool sync, bool truncated); + void test_run_xfer(bool send_contig, bool recv_contig, + bool expected, bool sync, bool truncated); +@@ -97,16 +108,15 @@ protected: + void test_xfer_probe(bool send_contig, bool recv_contig, + bool expected, bool sync); + +-private: +- size_t do_xfer(const void *sendbuf, void *recvbuf, size_t count, +- ucp_datatype_t send_dt, ucp_datatype_t recv_dt, +- bool expected, bool sync, bool truncated); ++ void test_xfer_len_offset(); + ++private: + request* do_send(const void *sendbuf, size_t count, ucp_datatype_t dt, bool sync); + + static const uint64_t SENDER_TAG = 0x111337; + static const uint64_t RECV_MASK = 0xffff; + static const uint64_t RECV_TAG = 0x1337; ++ ucs::ptr_vector m_env; + + }; + +@@ -179,7 +189,7 @@ void test_ucp_tag_xfer::test_xfer_prepare_bufs(uint8_t *sendbuf, uint8_t *recvbu + *send_dt = DATATYPE; + } else { + /* the sender has a generic datatype */ +- status = ucp_dt_create_generic(&test_dt_uint8_ops, NULL, send_dt); ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, send_dt); + ASSERT_UCS_OK(status); + } + +@@ -188,7 +198,7 @@ void test_ucp_tag_xfer::test_xfer_prepare_bufs(uint8_t *sendbuf, uint8_t *recvbu + *recv_dt = DATATYPE; + } else { + /* the receiver has a generic datatype */ +- status = ucp_dt_create_generic(&test_dt_uint8_ops, NULL, recv_dt); ++ status = ucp_dt_create_generic(&ucp::test_dt_uint8_ops, NULL, recv_dt); + /* the recvbuf can be NULL because we only validate the received data in the + * unpack function - we don't copy it to the recvbuf */ + ASSERT_UCS_OK(status); +@@ -207,8 +217,8 @@ void test_ucp_tag_xfer::test_run_xfer(bool send_contig, bool recv_contig, + skip_err_handling(); + } + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + + if (send_contig) { + /* the sender has a contig datatype for the data buffer */ +@@ -258,8 +268,8 @@ void test_ucp_tag_xfer::test_xfer_probe(bool send_contig, bool recv_contig, + UCS_TEST_SKIP_R("loop-back unsupported"); + } + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + + sendbuf = (uint8_t*) malloc(count * sizeof(*sendbuf)); + recvbuf = (uint8_t*) malloc(count * sizeof(*recvbuf)); +@@ -335,23 +345,23 @@ void test_ucp_tag_xfer::test_xfer_generic(size_t size, bool expected, bool sync, + ucs_status_t status; + size_t recvd; + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + + /* if count is zero, truncation has no effect */ + if ((truncated) && (!count)) { + truncated = false; + } + +- status = ucp_dt_create_generic(&test_dt_uint32_ops, this, &dt); ++ status = ucp_dt_create_generic(&ucp::test_dt_uint32_ops, NULL, &dt); + ASSERT_UCS_OK(status); + + recvd = do_xfer(NULL, NULL, count, dt, dt, expected, sync, truncated); + if (!truncated) { + EXPECT_EQ(count * sizeof(uint32_t), recvd); + } +- EXPECT_EQ(2, dt_gen_start_count); +- EXPECT_EQ(2, dt_gen_finish_count); ++ EXPECT_EQ(2, ucp::dt_gen_start_count); ++ EXPECT_EQ(2, ucp::dt_gen_finish_count); + + ucp_dt_destroy(dt); + } +@@ -389,10 +399,10 @@ void test_ucp_tag_xfer::test_xfer_generic_err(size_t size, bool expected, + ucs_status_t status; + request *rreq, *sreq; + +- dt_gen_start_count = 0; +- dt_gen_finish_count = 0; ++ ucp::dt_gen_start_count = 0; ++ ucp::dt_gen_finish_count = 0; + +- status = ucp_dt_create_generic(&test_dt_uint32_err_ops, this, &dt); ++ status = ucp_dt_create_generic(&ucp::test_dt_uint32_err_ops, this, &dt); + ASSERT_UCS_OK(status); + + if (expected) { +@@ -417,8 +427,8 @@ void test_ucp_tag_xfer::test_xfer_generic_err(size_t size, bool expected, + /* the generic unpack function is expected to fail */ + EXPECT_EQ(UCS_ERR_NO_MEMORY, rreq->status); + request_release(rreq); +- EXPECT_EQ(2, dt_gen_start_count); +- EXPECT_EQ(2, dt_gen_finish_count); ++ EXPECT_EQ(2, ucp::dt_gen_start_count); ++ EXPECT_EQ(2, ucp::dt_gen_finish_count); + ucp_dt_destroy(dt); + } + +@@ -472,7 +482,7 @@ size_t test_ucp_tag_xfer::do_xfer(const void *sendbuf, void *recvbuf, + + recvd = rreq->info.length; + if (!truncated) { +- ASSERT_UCS_OK(rreq->status); ++ EXPECT_UCS_OK(rreq->status); + EXPECT_EQ((ucp_tag_t)SENDER_TAG, rreq->info.sender_tag); + } else { + EXPECT_EQ(UCS_ERR_MESSAGE_TRUNCATED, rreq->status); +@@ -482,11 +492,66 @@ size_t test_ucp_tag_xfer::do_xfer(const void *sendbuf, void *recvbuf, + return recvd; + } + ++void test_ucp_tag_xfer::test_xfer_len_offset() ++{ ++ const size_t max_offset = 128; ++ const size_t max_length = 64 * 1024; ++ const size_t min_length = 1024; ++ const size_t offset_step = 16; ++ const size_t length_step = 16; ++ const size_t buf_size = max_length + max_offset + 2; ++ ucp_datatype_t type = ucp_dt_make_contig(1); ++ void *send_buf = 0; ++ void *recv_buf = 0;; ++ size_t offset; ++ size_t length; ++ ucs::detail::message_stream *ms; ++ ++ skip_err_handling(); ++ if (RUNNING_ON_VALGRIND) { ++ UCS_TEST_SKIP_R("valgrind"); ++ } ++ ++ EXPECT_EQ(posix_memalign(&send_buf, 8192, buf_size), 0); ++ EXPECT_EQ(posix_memalign(&recv_buf, 8192, buf_size), 0); ++ ++ memset(send_buf, 0, buf_size); ++ memset(recv_buf, 0, buf_size); ++ ++ for (offset = 0; offset <= max_offset; offset += offset_step) { ++ if (!offset || ucs_is_pow2(offset)) { ++ ms = new ucs::detail::message_stream("INFO"); ++ *ms << "offset: " << offset << ": "; ++ } else { ++ ms = NULL; ++ } ++ for (length = min_length; length <= max_length; length += length_step) { ++ if (ms && ucs_is_pow2(length)) { ++ *ms << length << " "; ++ fflush(stdout); ++ } ++ ++ do_xfer((char*)send_buf + offset, (char*)recv_buf + offset, ++ length, type, type, true, true, false); ++ do_xfer((char*)send_buf + max_offset - offset, ++ (char*)recv_buf + max_offset - offset, ++ length, type, type, true, true, false); ++ } ++ if (ms) { ++ delete(ms); ++ } ++ } ++ ++ free(recv_buf); ++ free(send_buf); ++} ++ + UCS_TEST_P(test_ucp_tag_xfer, contig_exp) { + test_xfer(&test_ucp_tag_xfer::test_xfer_contig, true, false, false); + } + +-UCS_TEST_P(test_ucp_tag_xfer, contig_exp_truncated, "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_xfer, contig_exp_truncated) { ++ check_offload_support(false); + test_xfer(&test_ucp_tag_xfer::test_xfer_contig, true, false, true); + } + +@@ -523,6 +588,11 @@ UCS_TEST_P(test_ucp_tag_xfer, generic_err_exp) { + } + + UCS_TEST_P(test_ucp_tag_xfer, generic_err_unexp) { ++#if HAVE_DC_DV ++ if (GetParam().transports.front().compare("dc_x") == 0) { ++ UCS_TEST_SKIP_R("DCI stuck bug"); ++ } ++#endif + test_xfer(&test_ucp_tag_xfer::test_xfer_generic_err, false, false, false); + } + +@@ -544,6 +614,11 @@ UCS_TEST_P(test_ucp_tag_xfer, contig_exp_sync) { + test_xfer(&test_ucp_tag_xfer::test_xfer_contig, true, true, false); + } + ++UCS_TEST_P(test_ucp_tag_xfer, contig_exp_sync_zcopy, "ZCOPY_THRESH=1000") { ++ skip_loopback(); ++ test_xfer(&test_ucp_tag_xfer::test_xfer_contig, true, true, false); ++} ++ + UCS_TEST_P(test_ucp_tag_xfer, contig_unexp_sync) { + test_xfer(&test_ucp_tag_xfer::test_xfer_contig, false, true, false); + } +@@ -634,8 +709,8 @@ UCS_TEST_P(test_ucp_tag_xfer, send_contig_recv_contig_exp_rndv, "RNDV_THRESH=100 + } + + UCS_TEST_P(test_ucp_tag_xfer, send_contig_recv_contig_exp_rndv_truncated, "RNDV_THRESH=1000", +- "ZCOPY_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++ "ZCOPY_THRESH=1248576") { ++ check_offload_support(false); + test_run_xfer(true, true, true, false, true); + } + +@@ -878,6 +953,46 @@ UCS_TEST_P(test_ucp_tag_xfer, send_contig_recv_generic_exp_rndv_probe_zcopy, "RN + test_xfer_probe(true, false, true, false); + } + ++UCS_TEST_P(test_ucp_tag_xfer, test_xfer_len_offset, "RNDV_THRESH=1000") { ++ test_xfer_len_offset(); ++} ++ ++UCS_TEST_P(test_ucp_tag_xfer, iov_with_empty_buffers, "ZCOPY_THRESH=512") { ++ const size_t iovcnt = ucp::data_type_desc_t::MAX_IOV; ++ const size_t size = 1024; ++ const int expected = 1; ++ const int sync = 0; ++ const int truncated = 0; ++ ++ std::vector sendbuf(size, 0); ++ std::vector recvbuf(size, 0); ++ ucp_dt_iov_t iovec[iovcnt]; ++ ++ ucs::fill_random(sendbuf); ++ ++ /* initialize iovec with MAX_IOV-1 empty buffers and one non-empty */ ++ for (size_t i = 0; i < iovcnt - 1; ++i) { ++ iovec[i].buffer = NULL; ++ iovec[i].length = 0; ++ } ++ ++ /* coverity[escape] */ ++ iovec[iovcnt - 1].buffer = &sendbuf[0]; ++ iovec[iovcnt - 1].length = size; ++ ++ ucp::data_type_desc_t recv_dt_desc(DATATYPE_IOV, recvbuf.data(), ++ recvbuf.size(), iovcnt); ++ ++ size_t recvd = do_xfer(iovec, recv_dt_desc.buf(), iovcnt, ++ DATATYPE_IOV, DATATYPE_IOV, expected, 0, ++ truncated); ++ ++ ASSERT_EQ(sendbuf.size(), recvd); ++ EXPECT_TRUE(!check_buffers(sendbuf, recvbuf, recvd, iovcnt, ++ recv_dt_desc.count(), size, expected, sync, ++ "IOV")); ++} ++ + UCP_INSTANTIATE_TEST_CASE(test_ucp_tag_xfer) + + +@@ -924,8 +1039,8 @@ public: + }; + + +-UCS_TEST_P(test_ucp_tag_stats, eager_expected, "RNDV_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, eager_expected, "RNDV_THRESH=1248576") { ++ check_offload_support(false); + test_run_xfer(true, true, true, false, false); + validate_counters(UCP_EP_STAT_TAG_TX_EAGER, + UCP_WORKER_STAT_TAG_RX_EAGER_MSG); +@@ -936,8 +1051,8 @@ UCS_TEST_P(test_ucp_tag_stats, eager_expected, "RNDV_THRESH=1248576", + EXPECT_EQ(cnt, 0ul); + } + +-UCS_TEST_P(test_ucp_tag_stats, eager_unexpected, "RNDV_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, eager_unexpected, "RNDV_THRESH=1248576") { ++ check_offload_support(false); + test_run_xfer(true, true, false, false, false); + validate_counters(UCP_EP_STAT_TAG_TX_EAGER, + UCP_WORKER_STAT_TAG_RX_EAGER_MSG); +@@ -947,8 +1062,8 @@ UCS_TEST_P(test_ucp_tag_stats, eager_unexpected, "RNDV_THRESH=1248576", + EXPECT_GT(cnt, 0ul); + } + +-UCS_TEST_P(test_ucp_tag_stats, sync_expected, "RNDV_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, sync_expected, "RNDV_THRESH=1248576") { ++ check_offload_support(false); + skip_loopback(); + test_run_xfer(true, true, true, true, false); + validate_counters(UCP_EP_STAT_TAG_TX_EAGER_SYNC, +@@ -960,8 +1075,8 @@ UCS_TEST_P(test_ucp_tag_stats, sync_expected, "RNDV_THRESH=1248576", + EXPECT_EQ(cnt, 0ul); + } + +-UCS_TEST_P(test_ucp_tag_stats, sync_unexpected, "RNDV_THRESH=1248576", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, sync_unexpected, "RNDV_THRESH=1248576") { ++ check_offload_support(false); + skip_loopback(); + test_run_xfer(true, true, false, true, false); + validate_counters(UCP_EP_STAT_TAG_TX_EAGER_SYNC, +@@ -972,15 +1087,15 @@ UCS_TEST_P(test_ucp_tag_stats, sync_unexpected, "RNDV_THRESH=1248576", + EXPECT_GT(cnt, 0ul); + } + +-UCS_TEST_P(test_ucp_tag_stats, rndv_expected, "RNDV_THRESH=1000", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, rndv_expected, "RNDV_THRESH=1000") { ++ check_offload_support(false); + test_run_xfer(true, true, true, false, false); + validate_counters(UCP_EP_STAT_TAG_TX_RNDV, + UCP_WORKER_STAT_TAG_RX_RNDV_EXP); + } + +-UCS_TEST_P(test_ucp_tag_stats, rndv_unexpected, "RNDV_THRESH=1000", +- "RC_TM_ENABLE?=n") { ++UCS_TEST_P(test_ucp_tag_stats, rndv_unexpected, "RNDV_THRESH=1000") { ++ check_offload_support(false); + test_run_xfer(true, true, false, false, false); + validate_counters(UCP_EP_STAT_TAG_TX_RNDV, + UCP_WORKER_STAT_TAG_RX_RNDV_UNEXP); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_wireup.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_wireup.cc +index 055c940d3..dfed76d13 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_wireup.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/test_ucp_wireup.cc +@@ -14,20 +14,23 @@ + extern "C" { + #include + #include ++#include + } + + class test_ucp_wireup : public ucp_test { + public: + static std::vector +- enum_test_params(const ucp_params_t& ctx_params, +- const std::string& name, +- const std::string& test_case_name, +- const std::string& tls); ++ enum_test_params_features(const ucp_params_t& ctx_params, ++ const std::string& name, ++ const std::string& test_case_name, ++ const std::string& tls, ++ uint64_t features); + + protected: + enum { + TEST_RMA, +- TEST_TAG ++ TEST_TAG, ++ TEST_STREAM + }; + + typedef uint64_t elem_type; +@@ -41,13 +44,17 @@ protected: + virtual void init(); + virtual void cleanup(); + +- void send_nb(ucp_ep_h ep, size_t length, int repeat, std::vector& reqs); ++ void send_nb(ucp_ep_h ep, size_t length, int repeat, std::vector& reqs, ++ uint64_t send_data = SEND_DATA); + +- void send_b(ucp_ep_h ep, size_t length, int repeat); ++ void send_b(ucp_ep_h ep, size_t length, int repeat, ++ uint64_t send_data = SEND_DATA); + +- void recv_b(ucp_worker_h worker, size_t length, int repeat); ++ void recv_b(ucp_worker_h worker, ucp_ep_h ep, size_t length, int repeat, ++ uint64_t recv_data = SEND_DATA); + +- void send_recv(ucp_ep_h ep, ucp_worker_h worker, size_t vecsize, int repeat); ++ void send_recv(ucp_ep_h send_ep, ucp_worker_h recv_worker, ucp_ep_h recv_ep, ++ size_t vecsize, int repeat); + + void waitall(std::vector reqs); + +@@ -56,50 +63,76 @@ protected: + void disconnect(ucp_test::entity &e); + + private: +- vec_type m_send_data; +- vec_type m_recv_data; +- ucp_mem_h m_memh1, m_memh2; +- ucp_rkey_h m_rkey1, m_rkey2; ++ vec_type m_send_data; ++ vec_type m_recv_data; ++ ucs::handle m_memh_sender; ++ ucs::handle m_memh_receiver; ++ std::vector< ucs::handle > m_rkeys; + + void clear_recv_data(); + +- ucp_rkey_h get_rkey(ucp_mem_h memh); ++ ucp_rkey_h get_rkey(ucp_ep_h ep, ucp_mem_h memh); + + static void send_completion(void *request, ucs_status_t status); + +- static void recv_completion(void *request, ucs_status_t status, +- ucp_tag_recv_info_t *info); ++ static void tag_recv_completion(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t *info); ++ ++ static void stream_recv_completion(void *request, ucs_status_t status, ++ size_t length); ++ ++ static void unmap_memh(ucp_mem_h memh, ucp_context_h context); + }; + + std::vector +-test_ucp_wireup::enum_test_params(const ucp_params_t& ctx_params, +- const std::string& name, +- const std::string& test_case_name, +- const std::string& tls) ++test_ucp_wireup::enum_test_params_features(const ucp_params_t& ctx_params, ++ const std::string& name, ++ const std::string& test_case_name, ++ const std::string& tls, ++ uint64_t features) + { + std::vector result; + ucp_params_t tmp_ctx_params = ctx_params; + +- tmp_ctx_params.features = UCP_FEATURE_RMA; +- generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/rma", +- tls, TEST_RMA, result); ++ if (features & UCP_FEATURE_RMA) { ++ tmp_ctx_params.features = UCP_FEATURE_RMA; ++ generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/rma", ++ tls, TEST_RMA, result); ++ } ++ ++ if (features & UCP_FEATURE_TAG) { ++ tmp_ctx_params.features = UCP_FEATURE_TAG; ++ generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/tag", ++ tls, TEST_TAG, result); ++ } + +- tmp_ctx_params.features = UCP_FEATURE_TAG; +- generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/tag", +- tls, TEST_TAG, result); ++ if (features & UCP_FEATURE_STREAM) { ++ tmp_ctx_params.features = UCP_FEATURE_STREAM; ++ generate_test_params_variant(tmp_ctx_params, name, test_case_name + "/stream", ++ tls, TEST_STREAM, result); ++ } + + return result; + } + ++void test_ucp_wireup::unmap_memh(ucp_mem_h memh, ucp_context_h context) ++{ ++ ucs_status_t status = ucp_mem_unmap(context, memh); ++ if (status != UCS_OK) { ++ ucs_warn("failed to unmap memory: %s", ucs_status_string(status)); ++ } ++} ++ + void test_ucp_wireup::init() { + ucp_test::init(); + +- m_send_data.resize(BUFFER_LENGTH, elem_type(SEND_DATA)); ++ m_send_data.resize(BUFFER_LENGTH, 0); + m_recv_data.resize(BUFFER_LENGTH, 0); + +- if (GetParam().variant == UCP_FEATURE_RMA) { ++ if (GetParam().variant == TEST_RMA) { + ucs_status_t status; + ucp_mem_map_params_t params; ++ ucp_mem_h memh; + + params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | + UCP_MEM_MAP_PARAM_FIELD_LENGTH | +@@ -108,28 +141,33 @@ void test_ucp_wireup::init() { + params.length = m_recv_data.size() * sizeof(m_recv_data[0]); + params.flags = 0; + +- status = ucp_mem_map(receiver().ucph(), ¶ms, &m_memh1); ++ status = ucp_mem_map(sender().ucph(), ¶ms, &memh); + ASSERT_UCS_OK(status); ++ m_memh_sender.reset(memh, unmap_memh, sender().ucph()); + +- status = ucp_mem_map(sender().ucph(), ¶ms, &m_memh2); ++ status = ucp_mem_map(receiver().ucph(), ¶ms, &memh); + ASSERT_UCS_OK(status); +- +- m_rkey1 = get_rkey(m_memh1); +- m_rkey2 = get_rkey(m_memh2); ++ m_memh_receiver.reset(memh, unmap_memh, receiver().ucph()); + } + } + +-ucp_rkey_h test_ucp_wireup::get_rkey(ucp_mem_h memh) ++ucp_rkey_h test_ucp_wireup::get_rkey(ucp_ep_h ep, ucp_mem_h memh) + { + void *rkey_buffer; + size_t rkey_size; + ucs_status_t status; + ucp_rkey_h rkey; + +- status = ucp_rkey_pack(receiver().ucph(), memh, &rkey_buffer, &rkey_size); ++ if (memh == m_memh_receiver) { ++ status = ucp_rkey_pack(receiver().ucph(), memh, &rkey_buffer, &rkey_size); ++ } else if (memh == m_memh_sender) { ++ status = ucp_rkey_pack(sender().ucph(), memh, &rkey_buffer, &rkey_size); ++ } else { ++ status = UCS_ERR_INVALID_PARAM; ++ } + ASSERT_UCS_OK(status); + +- status = ucp_ep_rkey_unpack(sender().ep(), rkey_buffer, &rkey); ++ status = ucp_ep_rkey_unpack(ep, rkey_buffer, &rkey); + ASSERT_UCS_OK(status); + + ucp_rkey_buffer_release(rkey_buffer); +@@ -138,12 +176,9 @@ ucp_rkey_h test_ucp_wireup::get_rkey(ucp_mem_h memh) + } + + void test_ucp_wireup::cleanup() { +- if (GetParam().variant == UCP_FEATURE_RMA) { +- ucp_rkey_destroy(m_rkey1); +- ucp_mem_unmap(receiver().ucph(), m_memh1); +- ucp_rkey_destroy(m_rkey2); +- ucp_mem_unmap(sender().ucph(), m_memh2); +- } ++ m_rkeys.clear(); ++ m_memh_sender.reset(); ++ m_memh_receiver.reset(); + ucp_test::cleanup(); + } + +@@ -152,9 +187,10 @@ void test_ucp_wireup::clear_recv_data() { + } + + void test_ucp_wireup::send_nb(ucp_ep_h ep, size_t length, int repeat, +- std::vector& reqs) ++ std::vector& reqs, uint64_t send_data) + { +- if (GetParam().variant == UCP_FEATURE_TAG) { ++ if (GetParam().variant == TEST_TAG) { ++ std::fill(m_send_data.begin(), m_send_data.end(), send_data); + for (int i = 0; i < repeat; ++i) { + void *req = ucp_tag_send_nb(ep, &m_send_data[0], length, + DT_U64, TAG, send_completion); +@@ -164,47 +200,86 @@ void test_ucp_wireup::send_nb(ucp_ep_h ep, size_t length, int repeat, + ASSERT_UCS_OK(UCS_PTR_STATUS(req)); + } + } +- } else if (GetParam().variant == UCP_FEATURE_RMA) { ++ } else if (GetParam().variant == TEST_STREAM) { ++ std::fill(m_send_data.begin(), m_send_data.end(), send_data); ++ for (int i = 0; i < repeat; ++i) { ++ void *req = ucp_stream_send_nb(ep, &m_send_data[0], length, DT_U64, ++ send_completion, 0); ++ if (UCS_PTR_IS_PTR(req)) { ++ reqs.push_back(req); ++ } else { ++ ASSERT_UCS_OK(UCS_PTR_STATUS(req)); ++ } ++ } ++ } else if (GetParam().variant == TEST_RMA) { + clear_recv_data(); ++ ++ ucp_mem_h memh = (sender().ucph() == ep->worker->context) ? ++ m_memh_receiver : m_memh_sender; ++ ucp_rkey_h rkey = get_rkey(ep, memh); ++ ++ m_rkeys.push_back(ucs::handle(rkey, ucp_rkey_destroy)); ++ + for (int i = 0; i < repeat; ++i) { +- std::fill(m_send_data.begin(), m_send_data.end(), SEND_DATA + i); +- ucs_status_t status; +- status = ucp_put(ep, &m_send_data[0], +- m_send_data.size() * sizeof(m_send_data[0]), +- (uintptr_t)&m_recv_data[0], +- (sender().ep() == ep) ? m_rkey1 : m_rkey2); +- ASSERT_UCS_OK(status); ++ std::fill(m_send_data.begin(), m_send_data.end(), send_data + i); ++ void *req = ucp_put_nb(ep, &m_send_data[0], ++ m_send_data.size() * sizeof(m_send_data[0]), ++ (uintptr_t)&m_recv_data[0], rkey, ++ send_completion); ++ if (UCS_PTR_IS_PTR(req)) { ++ reqs.push_back(req); ++ } else { ++ ASSERT_UCS_OK(UCS_PTR_STATUS(req)); ++ } + } + } + } + +-void test_ucp_wireup::send_b(ucp_ep_h ep, size_t length, int repeat) ++void test_ucp_wireup::send_b(ucp_ep_h ep, size_t length, int repeat, ++ uint64_t send_data) + { + std::vector reqs; +- send_nb(ep, length, repeat, reqs); ++ send_nb(ep, length, repeat, reqs, send_data); + waitall(reqs); + } + +-void test_ucp_wireup::recv_b(ucp_worker_h worker, size_t length, int repeat) ++void test_ucp_wireup::recv_b(ucp_worker_h worker, ucp_ep_h ep, size_t length, ++ int repeat, uint64_t recv_data) + { +- if (GetParam().variant == UCP_FEATURE_TAG) { ++ if ((GetParam().variant == TEST_TAG) || (GetParam().variant == TEST_STREAM)) ++ { + for (int i = 0; i < repeat; ++i) { ++ size_t recv_length; ++ void *req; ++ + clear_recv_data(); +- void *req = ucp_tag_recv_nb(worker, &m_recv_data[0], length, +- DT_U64, TAG, (ucp_tag_t)-1, +- recv_completion); ++ if (GetParam().variant == TEST_TAG) { ++ req = ucp_tag_recv_nb(worker, &m_recv_data[0], length, DT_U64, ++ TAG, (ucp_tag_t)-1, tag_recv_completion); ++ } else if (GetParam().variant == TEST_STREAM) { ++ req = ucp_stream_recv_nb(ep, &m_recv_data[0], length, DT_U64, ++ stream_recv_completion, &recv_length, ++ UCP_STREAM_RECV_FLAG_WAITALL); ++ } else { ++ req = NULL; ++ } + if (UCS_PTR_IS_PTR(req)) { + wait(req); + } else { + ASSERT_UCS_OK(UCS_PTR_STATUS(req)); + } ++ EXPECT_EQ(recv_data, m_recv_data[0]) ++ << "repeat " << i << "/" << repeat; + EXPECT_EQ(length, +- (size_t)std::count(m_recv_data.begin(), m_recv_data.begin() + length, +- elem_type(SEND_DATA))); ++ (size_t)std::count(m_recv_data.begin(), ++ m_recv_data.begin() + length, ++ recv_data)); + } +- } else if (GetParam().variant == UCP_FEATURE_RMA) { ++ } else if (GetParam().variant == TEST_RMA) { + for (size_t i = 0; i < length; ++i) { +- while (m_recv_data[i] != SEND_DATA + repeat); ++ while (m_recv_data[i] != recv_data + repeat - 1) { ++ progress(); ++ } + } + } + } +@@ -213,18 +288,27 @@ void test_ucp_wireup::send_completion(void *request, ucs_status_t status) + { + } + +-void test_ucp_wireup::recv_completion(void *request, ucs_status_t status, +- ucp_tag_recv_info_t *info) ++void test_ucp_wireup::tag_recv_completion(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t *info) ++{ ++} ++ ++void test_ucp_wireup::stream_recv_completion(void *request, ucs_status_t status, ++ size_t length) + { + } + +-void test_ucp_wireup::send_recv(ucp_ep_h ep, ucp_worker_h worker, +- size_t length, int repeat) ++void test_ucp_wireup::send_recv(ucp_ep_h send_ep, ucp_worker_h recv_worker, ++ ucp_ep_h recv_ep, size_t length, int repeat) + { + std::vector send_reqs; +- send_nb(ep, length, repeat, send_reqs); +- recv_b (worker, length, repeat); ++ static uint64_t next_send_data = 0; ++ uint64_t send_data = next_send_data++; ++ ++ send_nb(send_ep, length, repeat, send_reqs, send_data); ++ recv_b (recv_worker, recv_ep, length, repeat, send_data); + waitall(send_reqs); ++ m_rkeys.clear(); + } + + void test_ucp_wireup::disconnect(ucp_ep_h ep) { +@@ -247,12 +331,22 @@ void test_ucp_wireup::waitall(std::vector reqs) + } + } + +-UCS_TEST_P(test_ucp_wireup, address) { ++class test_ucp_wireup_1sided : public test_ucp_wireup { ++public: ++ static std::vector ++ enum_test_params(const ucp_params_t& ctx_params, const std::string& name, ++ const std::string& test_case_name, const std::string& tls) ++ { ++ return enum_test_params_features(ctx_params, name, test_case_name, tls, ++ UCP_FEATURE_RMA | UCP_FEATURE_TAG); ++ } ++}; ++ ++UCS_TEST_P(test_ucp_wireup_1sided, address) { + ucs_status_t status; + size_t size; + void *buffer; + unsigned order[UCP_MAX_RESOURCES]; +- const ucp_address_entry_t *ae; + std::set packed_dev_priorities, unpacked_dev_priorities; + int tl; + +@@ -268,30 +362,35 @@ UCS_TEST_P(test_ucp_wireup, address) { + packed_dev_priorities.insert(sender().worker()->ifaces[tl].attr.priority); + } + +- char name[UCP_WORKER_NAME_MAX]; +- uint64_t uuid; +- unsigned address_count; +- ucp_address_entry_t *address_list; ++ ucp_unpacked_address unpacked_address; + +- ucp_address_unpack(buffer, &uuid, name, sizeof(name), &address_count, +- &address_list); +- EXPECT_EQ(sender().worker()->uuid, uuid); +- EXPECT_EQ(std::string(ucp_worker_get_name(sender().worker())), std::string(name)); +- EXPECT_LE(address_count, static_cast(sender().ucph()->num_tls)); +- for (ae = address_list; ae < address_list + address_count; ++ae) { ++ status = ucp_address_unpack(buffer, &unpacked_address); ++ ASSERT_UCS_OK(status); ++ ++ EXPECT_EQ(sender().worker()->uuid, unpacked_address.uuid); ++#if ENABLE_DEBUG_DATA ++ EXPECT_EQ(std::string(ucp_worker_get_name(sender().worker())), ++ std::string(unpacked_address.name)); ++#endif ++ EXPECT_LE(unpacked_address.address_count, ++ static_cast(sender().ucph()->num_tls)); ++ ++ for (const ucp_address_entry_t *ae = unpacked_address.address_list; ++ ae < unpacked_address.address_list + unpacked_address.address_count; ++ ++ae) { + unpacked_dev_priorities.insert(ae->iface_attr.priority); + } + + /* TODO test addresses */ + +- ucs_free(address_list); ++ ucs_free(unpacked_address.address_list); + ucs_free(buffer); + /* Make sure that the packed device priorities are equal to the unpacked + * device priorities */ + ASSERT_TRUE(packed_dev_priorities == unpacked_dev_priorities); + } + +-UCS_TEST_P(test_ucp_wireup, empty_address) { ++UCS_TEST_P(test_ucp_wireup_1sided, empty_address) { + ucs_status_t status; + size_t size; + void *buffer; +@@ -302,41 +401,40 @@ UCS_TEST_P(test_ucp_wireup, empty_address) { + ASSERT_TRUE(buffer != NULL); + ASSERT_GT(size, 0ul); + +- char name[UCP_WORKER_NAME_MAX]; +- uint64_t uuid; +- unsigned address_count; +- ucp_address_entry_t *address_list; ++ ucp_unpacked_address unpacked_address; ++ ++ status = ucp_address_unpack(buffer, &unpacked_address); ++ ASSERT_UCS_OK(status); + +- ucp_address_unpack(buffer, &uuid, name, sizeof(name), &address_count, +- &address_list); +- EXPECT_EQ(sender().worker()->uuid, uuid); +- EXPECT_EQ(std::string(ucp_worker_get_name(sender().worker())), std::string(name)); +- EXPECT_LE(address_count, sender().ucph()->num_tls); +- EXPECT_EQ(0u, address_count); ++ EXPECT_EQ(sender().worker()->uuid, unpacked_address.uuid); ++#if ENABLE_DEBUG_DATA ++ EXPECT_EQ(std::string(ucp_worker_get_name(sender().worker())), ++ std::string(unpacked_address.name)); ++#endif ++ EXPECT_EQ(0u, unpacked_address.address_count); + +- ucs_free(address_list); ++ ucs_free(unpacked_address.address_list); + ucs_free(buffer); + } + +-UCS_TEST_P(test_ucp_wireup, one_sided_wireup) { ++UCS_TEST_P(test_ucp_wireup_1sided, one_sided_wireup) { + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, 1); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); + flush_worker(sender()); + } + +-UCS_TEST_P(test_ucp_wireup, two_sided_wireup) { ++UCS_TEST_P(test_ucp_wireup_1sided, one_sided_wireup_rndv, "RNDV_THRESH=1") { + sender().connect(&receiver(), get_ep_params()); +- if (&sender() != &receiver()) { +- receiver().connect(&sender(), get_ep_params()); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), BUFFER_LENGTH, 1); ++ if (is_loopback() && (GetParam().variant == TEST_TAG)) { ++ /* expect the endpoint to be connected to itself */ ++ ucp_ep_h ep = sender().ep(); ++ EXPECT_EQ((uintptr_t)ep, ucp_ep_dest_ep_ptr(ep)); + } +- +- send_recv(sender().ep(), receiver().worker(), 1, 1); + flush_worker(sender()); +- send_recv(receiver().ep(), sender().worker(), 1, 1); +- flush_worker(receiver()); + } + +-UCS_TEST_P(test_ucp_wireup, multi_wireup) { ++UCS_TEST_P(test_ucp_wireup_1sided, multi_wireup) { + skip_loopback(); + + const size_t count = 10; +@@ -346,53 +444,14 @@ UCS_TEST_P(test_ucp_wireup, multi_wireup) { + + /* connect from sender() to all the rest */ + for (size_t i = 0; i < count; ++i) { +- sender().connect(&entities().at(i), get_ep_params()); +- } +-} +- +-UCS_TEST_P(test_ucp_wireup, reply_ep_send_before) { +- skip_loopback(); +- +- sender().connect(&receiver(), get_ep_params()); +- +- if (GetParam().variant == TEST_TAG) { +- /* Send a reply */ +- ucp_ep_connect_remote(sender().ep()); +- ucp_ep_h ep = ucp_worker_get_reply_ep(receiver().worker(), +- sender().worker()->uuid); +- send_recv(ep, sender().worker(), 1, 1); +- flush_worker(sender()); +- +- disconnect(ep); ++ sender().connect(&entities().at(i), get_ep_params(), i); + } + } + +-UCS_TEST_P(test_ucp_wireup, reply_ep_send_after) { +- skip_loopback(); +- +- sender().connect(&receiver(), get_ep_params()); +- +- if (GetParam().variant == TEST_TAG) { +- ucp_ep_connect_remote(sender().ep()); +- +- /* Make sure the wireup message arrives before sending a reply */ +- send_recv(sender().ep(), receiver().worker(), 1, 1); +- flush_worker(sender()); +- +- /* Send a reply */ +- ucp_ep_h ep = ucp_worker_get_reply_ep(receiver().worker(), sender().worker()->uuid); +- send_recv(ep, sender().worker(), 1, 1); +- +- flush_worker(sender()); +- +- disconnect(ep); +- } +-} +- +-UCS_TEST_P(test_ucp_wireup, stress_connect) { ++UCS_TEST_P(test_ucp_wireup_1sided, stress_connect) { + for (int i = 0; i < 30; ++i) { + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, + 10000 / ucs::test_time_multiplier()); + if (!is_loopback()) { + receiver().connect(&sender(), get_ep_params()); +@@ -405,10 +464,11 @@ UCS_TEST_P(test_ucp_wireup, stress_connect) { + } + } + +-UCS_TEST_P(test_ucp_wireup, stress_connect2) { +- for (int i = 0; i < 1000 / ucs::test_time_multiplier(); ++i) { ++UCS_TEST_P(test_ucp_wireup_1sided, stress_connect2) { ++ int count = ucs_min(1000 / ucs::test_time_multiplier(), max_connections() / 2); ++ for (int i = 0; i < count; ++i) { + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, 1); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); + if (&sender() != &receiver()) { + receiver().connect(&sender(), get_ep_params()); + } +@@ -420,18 +480,7 @@ UCS_TEST_P(test_ucp_wireup, stress_connect2) { + } + } + +-UCS_TEST_P(test_ucp_wireup, connect_disconnect) { +- sender().connect(&receiver(), get_ep_params()); +- if (!is_loopback()) { +- receiver().connect(&sender(), get_ep_params()); +- } +- disconnect(sender()); +- if (!is_loopback()) { +- disconnect(receiver()); +- } +-} +- +-UCS_TEST_P(test_ucp_wireup, disconnect_nonexistent) { ++UCS_TEST_P(test_ucp_wireup_1sided, disconnect_nonexistent) { + skip_loopback(); + sender().connect(&receiver(), get_ep_params()); + disconnect(sender()); +@@ -439,33 +488,41 @@ UCS_TEST_P(test_ucp_wireup, disconnect_nonexistent) { + sender().destroy_worker(); + } + +-UCS_TEST_P(test_ucp_wireup, disconnect_reconnect) { ++UCS_TEST_P(test_ucp_wireup_1sided, disconnect_reconnect) { + sender().connect(&receiver(), get_ep_params()); + send_b(sender().ep(), 1000, 1); + disconnect(sender()); +- recv_b(receiver().worker(), 1000, 1); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 1); + + sender().connect(&receiver(), get_ep_params()); + send_b(sender().ep(), 1000, 1); + disconnect(sender()); +- recv_b(receiver().worker(), 1000, 1); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 1); + } + +-UCS_TEST_P(test_ucp_wireup, send_disconnect_onesided) { ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_onesided) { + sender().connect(&receiver(), get_ep_params()); + send_b(sender().ep(), 1000, 100); + disconnect(sender()); +- recv_b(receiver().worker(), 1000, 100); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 100); + } + +-UCS_TEST_P(test_ucp_wireup, send_disconnect_onesided_nozcopy, "ZCOPY_THRESH=-1") { ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_onesided_nozcopy, "ZCOPY_THRESH=-1") { + sender().connect(&receiver(), get_ep_params()); + send_b(sender().ep(), 1000, 100); + disconnect(sender()); +- recv_b(receiver().worker(), 1000, 100); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 100); ++} ++ ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_onesided_wait) { ++ sender().connect(&receiver(), get_ep_params()); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 8, 1); ++ send_b(sender().ep(), 1000, 200); ++ disconnect(sender()); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 200); + } + +-UCS_TEST_P(test_ucp_wireup, send_disconnect_reply1) { ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_reply1) { + sender().connect(&receiver(), get_ep_params()); + if (!is_loopback()) { + receiver().connect(&sender(), get_ep_params()); +@@ -476,20 +533,20 @@ UCS_TEST_P(test_ucp_wireup, send_disconnect_reply1) { + disconnect(sender()); + } + +- recv_b(receiver().worker(), 8, 1); ++ recv_b(receiver().worker(), receiver().ep(), 8, 1); + send_b(receiver().ep(), 8, 1); + disconnect(receiver()); +- recv_b(sender().worker(), 8, 1); ++ recv_b(sender().worker(), sender().ep(), 8, 1); + } + +-UCS_TEST_P(test_ucp_wireup, send_disconnect_reply2) { ++UCS_TEST_P(test_ucp_wireup_1sided, send_disconnect_reply2) { + sender().connect(&receiver(), get_ep_params()); + + send_b(sender().ep(), 8, 1); + if (!is_loopback()) { + disconnect(sender()); + } +- recv_b(receiver().worker(), 8, 1); ++ recv_b(receiver().worker(), receiver().ep(), 8, 1); + + if (!is_loopback()) { + receiver().connect(&sender(), get_ep_params()); +@@ -497,18 +554,10 @@ UCS_TEST_P(test_ucp_wireup, send_disconnect_reply2) { + + send_b(receiver().ep(), 8, 1); + disconnect(receiver()); +- recv_b(sender().worker(), 8, 1); +-} +- +-UCS_TEST_P(test_ucp_wireup, send_disconnect_onesided_wait) { +- sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 8, 1); +- send_b(sender().ep(), 1000, 200); +- disconnect(sender()); +- recv_b(receiver().worker(), 1000, 200); ++ recv_b(sender().worker(), receiver().ep(), 8, 1); + } + +-UCS_TEST_P(test_ucp_wireup, disconnect_nb_onesided) { ++UCS_TEST_P(test_ucp_wireup_1sided, disconnect_nb_onesided) { + sender().connect(&receiver(), get_ep_params()); + + std::vector sreqs; +@@ -520,15 +569,155 @@ UCS_TEST_P(test_ucp_wireup, disconnect_nb_onesided) { + } + + wait(dreq); +- recv_b(receiver().worker(), 1000, 1000); ++ recv_b(receiver().worker(), receiver().ep(), 1000, 1000); + + waitall(sreqs); ++} ++ ++UCS_TEST_P(test_ucp_wireup_1sided, multi_ep_1sided) { ++ const unsigned count = 10; ++ ++ for (unsigned i = 0; i < count; ++i) { ++ sender().connect(&receiver(), get_ep_params(), i); ++ } ++ ++ for (unsigned i = 0; i < count; ++i) { ++ send_recv(sender().ep(0, i), receiver().worker(), receiver().ep(), 8, 1); ++ } ++} ++ ++UCP_INSTANTIATE_TEST_CASE(test_ucp_wireup_1sided) ++ ++class test_ucp_wireup_2sided : public test_ucp_wireup { ++public: ++ static std::vector ++ enum_test_params(const ucp_params_t& ctx_params, const std::string& name, ++ const std::string& test_case_name, const std::string& tls) ++ { ++ return enum_test_params_features(ctx_params, name, test_case_name, tls, ++ UCP_FEATURE_RMA | UCP_FEATURE_TAG | ++ UCP_FEATURE_STREAM); ++ } ++ ++protected: ++ void test_connect_loopback(bool delay_before_connect, bool enable_loopback); ++}; ++ ++UCS_TEST_P(test_ucp_wireup_2sided, two_sided_wireup) { ++ sender().connect(&receiver(), get_ep_params()); ++ if (!is_loopback()) { ++ receiver().connect(&sender(), get_ep_params()); ++ } ++ ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); ++ flush_worker(sender()); ++ send_recv(receiver().ep(), sender().worker(), sender().ep(), 1, 1); ++ flush_worker(receiver()); ++} ++ ++void test_ucp_wireup_2sided::test_connect_loopback(bool delay_before_connect, ++ bool enable_loopback) { ++ ucp_ep_params_t params = test_ucp_wireup::get_ep_params(); ++ if (!enable_loopback) { ++ params.field_mask |= UCP_EP_PARAM_FIELD_FLAGS; ++ params.flags |= UCP_EP_PARAMS_FLAGS_NO_LOOPBACK; ++ } ++ ++ for (int i = 0; i < 5; ++i) { ++ int base_index = i * 2; ++ sender().connect(&sender(), params, base_index); ++ ucp_ep_h ep1 = sender().ep(0, base_index); ++ ++ if (delay_before_connect) { ++ /* let one side create ep */ ++ short_progress_loop(0); ++ } ++ ++ sender().connect(&sender(), params, base_index + 1); ++ ucp_ep_h ep2 = sender().ep(0, base_index + 1); ++ ++ EXPECT_NE(ep1, ep2); ++ ++ if (GetParam().variant == TEST_STREAM) { ++ uint64_t data1 = (base_index * 10) + 1; ++ uint64_t data2 = (base_index * 10) + 2; ++ ++ send_b(ep1, 1, 1, data1); ++ send_b(ep2, 1, 1, data2); ++ ++ if (enable_loopback) { ++ /* self-send - each ep receives what was sent on it */ ++ recv_b(sender().worker(), ep1, 1, 1, data1); ++ recv_b(sender().worker(), ep2, 1, 1, data2); ++ } else { ++ /* cross-send - each ep receives what was sent on the other ep */ ++ recv_b(sender().worker(), ep1, 1, 1, data2); ++ recv_b(sender().worker(), ep2, 1, 1, data1); ++ } ++ } ++ } ++ flush_worker(sender()); ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, loopback) { ++ test_connect_loopback(false, true); ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, loopback_with_delay) { ++ test_connect_loopback(true, true); ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, no_loopback) { ++ test_connect_loopback(false, false); ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, no_loopback_with_delay) { ++ test_connect_loopback(true, false); ++} + ++UCS_TEST_P(test_ucp_wireup_2sided, connect_disconnect) { ++ sender().connect(&receiver(), get_ep_params()); ++ if (!is_loopback()) { ++ receiver().connect(&sender(), get_ep_params()); ++ } ++ disconnect(sender()); ++ if (!is_loopback()) { ++ disconnect(receiver()); ++ } ++} ++ ++UCS_TEST_P(test_ucp_wireup_2sided, multi_ep_2sided) { ++ const unsigned count = 10; ++ ++ for (unsigned j = 0; j < 4; ++j) { ++ ++ unsigned offset = j * count; ++ ++ for (unsigned i = 0; i < count; ++i) { ++ unsigned ep_idx = offset + i; ++ sender().connect(&receiver(), get_ep_params(), ep_idx); ++ if (!is_loopback()) { ++ receiver().connect(&sender(), get_ep_params(), ep_idx); ++ } ++ UCS_TEST_MESSAGE << "iteration " << j << " pair " << i << ": " << ++ sender().ep(0, ep_idx) << " <--> " << receiver().ep(0, ep_idx); ++ } ++ ++ for (unsigned i = 0; i < count; ++i) { ++ unsigned ep_idx = offset + i; ++ send_recv(sender().ep(0, ep_idx), receiver().worker(), ++ receiver().ep(0, ep_idx), 8, 1); ++ send_recv(receiver().ep(0, ep_idx), sender().worker(), ++ sender().ep(0, ep_idx), 8, 1); ++ } ++ ++ short_progress_loop(0); ++ } + } + +-UCP_INSTANTIATE_TEST_CASE(test_ucp_wireup) ++UCP_INSTANTIATE_TEST_CASE(test_ucp_wireup_2sided) + +-class test_ucp_wireup_errh_peer : public test_ucp_wireup ++class test_ucp_wireup_errh_peer : public test_ucp_wireup_1sided + { + public: + virtual ucp_ep_params_t get_ep_params() { +@@ -553,19 +742,19 @@ UCS_TEST_P(test_ucp_wireup_errh_peer, msg_after_ep_create) { + receiver().connect(&sender(), get_ep_params()); + + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, 1); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); + flush_worker(sender()); + } + + UCS_TEST_P(test_ucp_wireup_errh_peer, msg_before_ep_create) { + + sender().connect(&receiver(), get_ep_params()); +- send_recv(sender().ep(), receiver().worker(), 1, 1); ++ send_recv(sender().ep(), receiver().worker(), receiver().ep(), 1, 1); + flush_worker(sender()); + + receiver().connect(&sender(), get_ep_params()); + +- send_recv(receiver().ep(), sender().worker(), 1, 1); ++ send_recv(receiver().ep(), sender().worker(), receiver().ep(), 1, 1); + flush_worker(receiver()); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.cc +new file mode 100644 +index 000000000..5c1cce737 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.cc +@@ -0,0 +1,201 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* See file LICENSE for terms. ++*/ ++ ++#include "ucp_datatype.h" ++#include "ucp_test.h" ++ ++#include ++ ++namespace ucp { ++ ++ ++data_type_desc_t & ++data_type_desc_t::make(ucp_datatype_t datatype, const void *buf, size_t length, ++ size_t iov_cnt) ++{ ++ EXPECT_FALSE(is_valid()); ++ ++ if (m_length == 0) { ++ m_length = length; ++ } ++ ++ if (m_origin == uintptr_t(NULL)) { ++ m_origin = uintptr_t(buf); ++ } ++ ++ m_dt = datatype; ++ memset(m_iov, 0, sizeof(m_iov)); ++ ++ switch (m_dt & UCP_DATATYPE_CLASS_MASK) { ++ case UCP_DATATYPE_CONTIG: ++ m_buf = buf; ++ m_count = length / ucp_contig_dt_elem_size(datatype); ++ break; ++ case UCP_DATATYPE_IOV: ++ { ++ const size_t iov_length = (length > iov_cnt) ? ++ ucs::rand() % (length / iov_cnt) : 0; ++ size_t iov_length_it = 0; ++ for (size_t iov_it = 0; iov_it < iov_cnt - 1; ++iov_it) { ++ m_iov[iov_it].buffer = (char *)(buf) + iov_length_it; ++ m_iov[iov_it].length = iov_length; ++ iov_length_it += iov_length; ++ } ++ ++ /* Last entry */ ++ m_iov[iov_cnt - 1].buffer = (char *)(buf) + iov_length_it; ++ m_iov[iov_cnt - 1].length = length - iov_length_it; ++ ++ m_buf = m_iov; ++ m_count = iov_cnt; ++ break; ++ } ++ case UCP_DATATYPE_GENERIC: ++ m_buf = buf; ++ m_count = length; ++ break; ++ default: ++ m_buf = NULL; ++ m_count = 0; ++ EXPECT_TRUE(false) << "Unsupported datatype"; ++ break; ++ } ++ ++ return *this; ++} ++ ++int dt_gen_start_count = 0; ++int dt_gen_finish_count = 0; ++ ++static void* dt_common_start(void *context, size_t count) ++{ ++ dt_gen_state *dt_state = new dt_gen_state; ++ ++ dt_state->count = count; ++ dt_state->started = 1; ++ dt_state->magic = ucp::MAGIC; ++ dt_state->context = context; ++ dt_gen_start_count++; ++ ++ return dt_state; ++} ++ ++static void* dt_common_start_pack(void *context, const void *buffer, ++ size_t count) ++{ ++ return dt_common_start(NULL, count); ++} ++ ++static void* dt_common_start_unpack(void *context, void *buffer, size_t count) ++{ ++ return dt_common_start(context, count); ++} ++ ++template ++size_t dt_packed_size(void *state) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ ++ return dt_state->count * sizeof(T); ++} ++ ++template ++size_t dt_pack(void *state, size_t offset, void *dest, size_t max_length) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ T *p = reinterpret_cast (dest); ++ uint32_t count; ++ ++ EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); ++ EXPECT_EQ(1, dt_state->started); ++ EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); ++ ++ ucs_assert((offset % sizeof(T)) == 0); ++ ++ count = std::min(max_length / sizeof(T), ++ dt_state->count - (offset / sizeof(T))); ++ for (unsigned i = 0; i < count; ++i) { ++ p[i] = (offset / sizeof(T)) + i; ++ } ++ return count * sizeof(T); ++} ++ ++template ++ucs_status_t dt_unpack(void *state, size_t offset, const void *src, ++ size_t length) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ std::vector *ctx; ++ uint32_t count; ++ ++ EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); ++ EXPECT_EQ(1, dt_state->started); ++ EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); ++ ++ ctx = reinterpret_cast*>(dt_state->context); ++ count = length / sizeof(T); ++ for (unsigned i = 0; i < count; ++i) { ++ T expected = ctx ? (*ctx)[offset / sizeof(T) + i] : ++ (offset / sizeof(T)) + i; ++ T actual = ((T*)src)[i]; ++ if (actual != expected) { ++ UCS_TEST_ABORT("Invalid data at index " << i << ". expected: " << ++ expected << " actual: " << actual << " offset: " << ++ offset << "."); ++ } ++ } ++ return UCS_OK; ++} ++ ++static ucs_status_t dt_err_unpack(void *state, size_t offset, const void *src, ++ size_t length) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ ++ EXPECT_GT(dt_gen_start_count, dt_gen_finish_count); ++ EXPECT_EQ(1, dt_state->started); ++ EXPECT_EQ(uint32_t(MAGIC), dt_state->magic); ++ ++ return UCS_ERR_NO_MEMORY; ++} ++ ++static void dt_common_finish(void *state) ++{ ++ dt_gen_state *dt_state = (dt_gen_state*)state; ++ ++ --dt_state->started; ++ EXPECT_EQ(0, dt_state->started); ++ dt_gen_finish_count++; ++ delete dt_state; ++} ++ ++ucp_generic_dt_ops test_dt_uint32_ops = { ++ dt_common_start_pack, ++ dt_common_start_unpack, ++ dt_packed_size, ++ dt_pack, ++ dt_unpack, ++ dt_common_finish ++}; ++ ++ucp_generic_dt_ops test_dt_uint8_ops = { ++ dt_common_start_pack, ++ dt_common_start_unpack, ++ dt_packed_size, ++ dt_pack, ++ dt_unpack, ++ dt_common_finish ++}; ++ ++ucp_generic_dt_ops test_dt_uint32_err_ops = { ++ dt_common_start_pack, ++ dt_common_start_unpack, ++ dt_packed_size, ++ dt_pack, ++ dt_err_unpack, ++ dt_common_finish ++}; ++ ++} // ucp +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.h +new file mode 100644 +index 000000000..545c86036 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_datatype.h +@@ -0,0 +1,132 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* See file LICENSE for terms. ++*/ ++ ++#ifndef TEST_UCP_DATATYPE_H_ ++#define TEST_UCP_DATATYPE_H_ ++ ++#include ++ ++#include ++extern "C" { ++#include ++#include ++#include ++} ++ ++#include ++ ++namespace ucp { ++ ++/* Can't be destroyed before related UCP request is completed */ ++class data_type_desc_t { ++public: ++ enum { ++ MAX_IOV = 40 ++ }; ++ ++ data_type_desc_t() ++ : m_origin(uintptr_t(NULL)), m_length(0), m_dt(0), m_buf(NULL), ++ m_count(0), m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { ++ memset(m_iov, 0, sizeof(m_iov)); ++ }; ++ ++ data_type_desc_t(ucp_datatype_t datatype, const void *buf, size_t length) ++ : m_origin(uintptr_t(buf)), m_length(length), m_dt(0), m_buf(NULL), ++ m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { ++ make(datatype, buf, length); ++ } ++ ++ data_type_desc_t(ucp_datatype_t datatype, const void *buf, size_t length, ++ size_t iov_count) ++ : m_origin(uintptr_t(buf)), m_length(length), m_dt(0), m_buf(NULL), ++ m_iov_cnt_limit(sizeof(m_iov) / sizeof(m_iov[0])) { ++ make(datatype, buf, length, iov_count); ++ }; ++ ++ data_type_desc_t &make(ucp_datatype_t datatype, const void *buf, ++ size_t length) { ++ return make(datatype, buf, length, m_iov_cnt_limit); ++ }; ++ ++ data_type_desc_t &forward_to(size_t offset) { ++ EXPECT_LE(offset, m_length); ++ invalidate(); ++ return make(m_dt, (const void *)(m_origin + offset), m_length - offset, ++ m_iov_cnt_limit); ++ }; ++ ++ ucp_datatype_t dt() const { ++ EXPECT_TRUE(is_valid()); ++ return m_dt; ++ }; ++ ++ void *buf() const { ++ EXPECT_TRUE(is_valid()); ++ return const_cast(m_buf); ++ }; ++ ++ ssize_t buf_length() const { ++ EXPECT_TRUE(is_valid()); ++ if (UCP_DT_IS_CONTIG(m_dt) || UCP_DT_IS_GENERIC(m_dt)) { ++ return m_length - (uintptr_t(m_buf) - m_origin); ++ } else if (UCP_DT_IS_IOV(m_dt)) { ++ size_t length = 0; ++ for (size_t i = 0; i < count(); ++i) { ++ length += m_iov[i].length; ++ } ++ return length; ++ } ++ ADD_FAILURE() << "Not supported datatype"; ++ return -1; ++ } ++ ++ size_t count() const { ++ EXPECT_TRUE(is_valid()); ++ return m_count; ++ }; ++ ++ bool is_valid() const { ++ return (m_buf != NULL) && (m_count != 0) && ++ (UCP_DT_IS_IOV(m_dt) ? (m_count <= m_iov_cnt_limit) : ++ (UCP_DT_IS_CONTIG(m_dt) || UCP_DT_IS_GENERIC(m_dt))); ++ } ++ ++private: ++ data_type_desc_t &make(ucp_datatype_t datatype, const void *buf, ++ size_t length, size_t iov_count); ++ ++ void invalidate() { ++ EXPECT_TRUE(is_valid()); ++ m_buf = NULL; ++ m_count = 0; ++ } ++ ++ uintptr_t m_origin; ++ size_t m_length; ++ ++ ucp_datatype_t m_dt; ++ const void *m_buf; ++ size_t m_count; ++ ++ const size_t m_iov_cnt_limit; ++ ucp_dt_iov_t m_iov[MAX_IOV]; ++}; ++ ++struct dt_gen_state { ++ size_t count; ++ int started; ++ uint32_t magic; ++ void *context; ++}; ++ ++extern int dt_gen_start_count; ++extern int dt_gen_finish_count; ++extern ucp_generic_dt_ops test_dt_uint32_ops; ++extern ucp_generic_dt_ops test_dt_uint32_err_ops; ++extern ucp_generic_dt_ops test_dt_uint8_ops; ++ ++} // ucp ++ ++#endif /* TEST_UCP_DATATYPE_H_ */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.cc +index 84ce7867c..c54ebd282 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.cc +@@ -8,8 +8,13 @@ + #include + #include + #include ++#include + + ++namespace ucp { ++const uint32_t MAGIC = 0xd7d7d7d7U; ++} ++ + std::ostream& operator<<(std::ostream& os, const ucp_test_param& test_param) + { + std::vector::const_iterator iter; +@@ -26,7 +31,7 @@ std::ostream& operator<<(std::ostream& os, const ucp_test_param& test_param) + const ucp_datatype_t ucp_test::DATATYPE = ucp_dt_make_contig(1); + const ucp_datatype_t ucp_test::DATATYPE_IOV = ucp_dt_make_iov(); + +-ucp_test::ucp_test() { ++ucp_test::ucp_test() : m_err_handler_count(0) { + ucs_status_t status; + status = ucp_config_read(NULL, NULL, &m_ucp_config); + ASSERT_UCS_OK(status); +@@ -87,6 +92,20 @@ ucp_test_base::entity* ucp_test::create_entity(bool add_in_front, + return e; + } + ++ucp_test::entity* ucp_test::get_entity_by_ep(ucp_ep_h ep) { ++ ucs::ptr_vector::const_iterator e_it; ++ for (e_it = entities().begin(); e_it != entities().end(); ++e_it) { ++ for (int w_idx = 0; w_idx < (*e_it)->get_num_workers(); ++w_idx) { ++ for (int ep_idx = 0; ep_idx < (*e_it)->get_num_eps(w_idx); ++ep_idx) { ++ if (ep == (*e_it)->ep(w_idx, ep_idx)) { ++ return *e_it; ++ } ++ } ++ } ++ } ++ return NULL; ++} ++ + ucp_params_t ucp_test::get_ctx_params() { + ucp_params_t params; + memset(¶ms, 0, sizeof(params)); +@@ -114,6 +133,7 @@ unsigned ucp_test::progress(int worker_index) const { + iter != entities().end(); ++iter) + { + count += (*iter)->progress(worker_index); ++ sched_yield(); + } + return count; + } +@@ -139,9 +159,14 @@ void ucp_test::flush_worker(const entity &e, int worker_index) + + void ucp_test::disconnect(const entity& entity) { + for (int i = 0; i < entity.get_num_workers(); i++) { +- flush_worker(entity, i); ++ if (m_err_handler_count == 0) { ++ flush_worker(entity, i); ++ } ++ + for (int j = 0; j < entity.get_num_eps(i); j++) { +- void *dreq = entity.disconnect_nb(i, j); ++ void *dreq = entity.disconnect_nb(i, j, m_err_handler_count == 0 ? ++ UCP_EP_CLOSE_MODE_FLUSH : ++ UCP_EP_CLOSE_MODE_FORCE); + if (!UCS_PTR_IS_PTR(dreq)) { + ASSERT_UCS_OK(UCS_PTR_STATUS(dreq)); + } +@@ -156,6 +181,12 @@ void ucp_test::wait(void *req, int worker_index) + return; + } + ++ if (UCS_PTR_IS_ERR(req)) { ++ ucs_error("operation returned error: %s", ++ ucs_status_string(UCS_PTR_STATUS(req))); ++ return; ++ } ++ + ucs_status_t status; + do { + progress(worker_index); +@@ -175,6 +206,15 @@ void ucp_test::set_ucp_config(ucp_config_t *config) { + set_ucp_config(config, GetParam()); + } + ++int ucp_test::max_connections() { ++ std::vector::const_iterator end = GetParam().transports.end(); ++ if (std::find(GetParam().transports.begin(), end, "tcp") != end) { ++ return ucs::max_tcp_connections(); ++ } else { ++ return std::numeric_limits::max(); ++ } ++} ++ + std::vector + ucp_test::enum_test_params(const ucp_params_t& ctx_params, + const std::string& name, +@@ -228,6 +268,8 @@ void ucp_test::set_ucp_config(ucp_config_t *config, + std::stringstream ss; + ss << test_param; + ucp_config_modify(config, "TLS", ss.str().c_str()); ++ /* prevent configuration warnings in the UCP testing */ ++ ucp_config_modify(config, "WARN_INVALID_CONFIG", "no"); + } + + void ucp_test::modify_config(const std::string& name, const std::string& value, +@@ -283,13 +325,13 @@ bool ucp_test::check_test_param(const std::string& name, + UCS_TEST_CREATE_HANDLE(ucp_config_t*, config, ucp_config_release, + ucp_config_read, NULL, NULL); + set_ucp_config(config, test_param); ++ ucp_config_modify(config.get(), "WARN_INVARIANT_TSC", "n"); + + ucp_context_h ucph; + ucs_status_t status; + { +- hide_errors(); ++ scoped_log_handler slh(hide_errors_logger); + status = ucp_init(&test_param.ctx_params, config, &ucph); +- restore_errors(); + } + + bool result; +@@ -311,9 +353,11 @@ bool ucp_test::check_test_param(const std::string& name, + ucp_test_base::entity::entity(const ucp_test_param& test_param, + ucp_config_t* ucp_config, + const ucp_worker_params_t& worker_params) ++ : m_rejected_cntr(0) + { + ucp_test_param entity_param = test_param; + ucp_worker_params_t local_worker_params = worker_params; ++ int num_workers; + + if (test_param.thread_type == MULTI_THREAD_CONTEXT) { + num_workers = MT_TEST_NUM_THREADS; +@@ -334,8 +378,11 @@ ucp_test_base::entity::entity(const ucp_test_param& test_param, + + ucp_test::set_ucp_config(ucp_config, entity_param); + +- UCS_TEST_CREATE_HANDLE(ucp_context_h, m_ucph, ucp_cleanup, ucp_init, +- &entity_param.ctx_params, ucp_config); ++ { ++ scoped_log_handler slh(hide_errors_logger); ++ UCS_TEST_CREATE_HANDLE(ucp_context_h, m_ucph, ucp_cleanup, ucp_init, ++ &entity_param.ctx_params, ucp_config); ++ } + + m_workers.resize(num_workers); + for (int i = 0; i < num_workers; i++) { +@@ -351,38 +398,63 @@ ucp_test_base::entity::~entity() { + + void ucp_test_base::entity::connect(const entity* other, + const ucp_ep_params_t& ep_params, +- int ep_idx) { +- assert(num_workers == other->get_num_workers()); +- for (unsigned i = 0; i < unsigned(num_workers); i++) { ++ int ep_idx, int do_set_ep) { ++ assert(get_num_workers() == other->get_num_workers()); ++ for (unsigned i = 0; i < unsigned(get_num_workers()); i++) { + ucs_status_t status; + ucp_address_t *address; + size_t address_length; + ucp_ep_h ep; +- ucp_ep_params_t local_ep_params = ep_params; + + status = ucp_worker_get_address(other->worker(i), &address, &address_length); + ASSERT_UCS_OK(status); + +- ucp_test::hide_errors(); +- local_ep_params.field_mask |= UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- local_ep_params.address = address; ++ { ++ scoped_log_handler slh(hide_errors_logger); + +- status = ucp_ep_create(m_workers[i].first, &local_ep_params, &ep); +- ucp_test::restore_errors(); ++ ucp_ep_params_t local_ep_params = ep_params; ++ local_ep_params.field_mask |= UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ local_ep_params.address = address; ++ ++ status = ucp_ep_create(m_workers[i].first, &local_ep_params, &ep); ++ } + + if (status == UCS_ERR_UNREACHABLE) { + ucp_worker_release_address(other->worker(i), address); +- UCS_TEST_SKIP_R(m_errors.empty() ? "" : m_errors.back()); ++ UCS_TEST_SKIP_R(m_errors.empty() ? "Unreachable" : m_errors.back()); + } + +- ASSERT_UCS_OK(status); ++ ASSERT_UCS_OK(status, << " (" << m_errors.back() << ")"); + +- set_ep(ep, i, ep_idx); ++ if (do_set_ep) { ++ set_ep(ep, i, ep_idx); ++ } + + ucp_worker_release_address(other->worker(i), address); + } + } + ++ucp_ep_h ucp_test_base::entity::accept(ucp_worker_h worker, ++ ucp_conn_request_h conn_request) ++{ ++ ucp_ep_h ep; ++ ucp_ep_params_t ep_params; ++ ep_params.field_mask = UCP_EP_PARAM_FIELD_USER_DATA | ++ UCP_EP_PARAM_FIELD_CONN_REQUEST; ++ ep_params.user_data = (void *)0xdeadbeef; ++ ep_params.conn_request = conn_request; ++ ++ ucs_status_t status = ucp_ep_create(worker, &ep_params, &ep); ++ if (status == UCS_ERR_UNREACHABLE) { ++ UCS_TEST_SKIP_R("Skipping due an unreachable destination (unsupported " ++ "feature or no supported transport to send partial " ++ "worker address)"); ++ } ++ ASSERT_UCS_OK(status); ++ return ep; ++} ++ ++ + void* ucp_test_base::entity::modify_ep(const ucp_ep_params_t& ep_params, + int worker_idx, int ep_idx) { + return ucp_ep_modify_nb(ep(worker_idx, ep_idx), &ep_params); +@@ -402,12 +474,25 @@ void ucp_test_base::entity::set_ep(ucp_ep_h ep, int worker_index, int ep_index) + void ucp_test_base::entity::empty_send_completion(void *r, ucs_status_t status) { + } + +-void ucp_test_base::entity::accept_cb(ucp_ep_h ep, void *arg) { ++void ucp_test_base::entity::accept_ep_cb(ucp_ep_h ep, void *arg) { + entity *self = reinterpret_cast(arg); + int worker_index = 0; /* TODO pass worker index in arg */ + self->set_ep(ep, worker_index, self->get_num_eps(worker_index)); + } + ++void ucp_test_base::entity::accept_conn_cb(ucp_conn_request_h conn_req, void* arg) ++{ ++ entity *self = reinterpret_cast(arg); ++ self->m_conn_reqs.push(conn_req); ++} ++ ++void ucp_test_base::entity::reject_conn_cb(ucp_conn_request_h conn_req, void* arg) ++{ ++ entity *self = reinterpret_cast(arg); ++ ucp_listener_reject(self->m_listener, conn_req); ++ self->m_rejected_cntr++; ++} ++ + void* ucp_test_base::entity::flush_ep_nb(int worker_index, int ep_index) const { + return ucp_ep_flush_nb(ep(worker_index, ep_index), 0, empty_send_completion); + } +@@ -424,12 +509,13 @@ void ucp_test_base::entity::fence(int worker_index) const { + ASSERT_UCS_OK(status); + } + +-void* ucp_test_base::entity::disconnect_nb(int worker_index, int ep_index) const { ++void* ucp_test_base::entity::disconnect_nb(int worker_index, int ep_index, ++ enum ucp_ep_close_mode mode) const { + ucp_ep_h ep = revoke_ep(worker_index, ep_index); + if (ep == NULL) { + return NULL; + } +- return ucp_disconnect_nb(ep); ++ return ucp_ep_close_nb(ep, mode); + } + + void ucp_test_base::entity::destroy_worker(int worker_index) { +@@ -458,33 +544,59 @@ ucp_ep_h ucp_test_base::entity::revoke_ep(int worker_index, int ep_index) const + return ucp_ep; + } + +-ucs_status_t ucp_test_base::entity::listen(const struct sockaddr* saddr, ++ucs_status_t ucp_test_base::entity::listen(listen_cb_type_t cb_type, ++ const struct sockaddr* saddr, + socklen_t addrlen, int worker_index) + { + ucp_listener_params_t params; +- ucp_listener_h listener; +- +- params.field_mask = UCP_LISTENER_PARAM_FIELD_SOCK_ADDR | +- UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER; +- params.sockaddr.addr = saddr; +- params.sockaddr.addrlen = addrlen; +- params.accept_handler.cb = accept_cb; +- params.accept_handler.arg = reinterpret_cast(this); +- +- wrap_errors(); +- ucs_status_t status = ucp_listener_create(worker(worker_index), ¶ms, &listener); +- restore_errors(); ++ ucp_listener_h listener; ++ ++ params.field_mask = UCP_LISTENER_PARAM_FIELD_SOCK_ADDR; ++ params.sockaddr.addr = saddr; ++ params.sockaddr.addrlen = addrlen; ++ ++ switch (cb_type) { ++ case LISTEN_CB_EP: ++ params.field_mask |= UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER; ++ params.accept_handler.cb = accept_ep_cb; ++ params.accept_handler.arg = reinterpret_cast(this); ++ break; ++ case LISTEN_CB_CONN: ++ params.field_mask |= UCP_LISTENER_PARAM_FIELD_CONN_HANDLER; ++ params.conn_handler.cb = accept_conn_cb; ++ params.conn_handler.arg = reinterpret_cast(this); ++ break; ++ case LISTEN_CB_REJECT: ++ params.field_mask |= UCP_LISTENER_PARAM_FIELD_CONN_HANDLER; ++ params.conn_handler.cb = reject_conn_cb; ++ params.conn_handler.arg = reinterpret_cast(this); ++ break; ++ default: ++ UCS_TEST_ABORT("invalid test parameter"); ++ } ++ ++ ucs_status_t status; ++ { ++ scoped_log_handler wrap_err(wrap_errors_logger); ++ status = ucp_listener_create(worker(worker_index), ¶ms, &listener); ++ } ++ + if (status == UCS_OK) { + m_listener.reset(listener, ucp_listener_destroy); +- } else if (status != UCS_ERR_INVALID_ADDR) { +- /* throw error if status is not (UCS_OK or UCS_ERR_INVALID_ADDR) */ +- ASSERT_UCS_OK(status); ++ } else { ++ /* throw error if status is not (UCS_OK or UCS_ERR_UNREACHABLE). ++ * UCS_ERR_INVALID_PARAM may also return but then the test should fail */ ++ EXPECT_EQ(UCS_ERR_UNREACHABLE, status); + } + return status; + } + + ucp_worker_h ucp_test_base::entity::worker(int worker_index) const { +- return m_workers[worker_index].first; ++ if (worker_index < get_num_workers()) { ++ return m_workers[worker_index].first; ++ } else { ++ return NULL; ++ } + } + + ucp_context_h ucp_test_base::entity::ucph() const { +@@ -494,18 +606,40 @@ ucp_context_h ucp_test_base::entity::ucph() const { + unsigned ucp_test_base::entity::progress(int worker_index) + { + ucp_worker_h ucp_worker = worker(worker_index); +- return ucp_worker ? ucp_worker_progress(ucp_worker) : 0; ++ ++ if (ucp_worker == NULL) { ++ return 0; ++ } ++ ++ unsigned progress_count = 0; ++ if (!m_conn_reqs.empty()) { ++ ucp_conn_request_h conn_req = m_conn_reqs.back(); ++ m_conn_reqs.pop(); ++ ucp_ep_h ep = accept(ucp_worker, conn_req); ++ set_ep(ep, worker_index, std::numeric_limits::max()); ++ ++progress_count; ++ } ++ ++ return progress_count + ucp_worker_progress(ucp_worker); + } + + int ucp_test_base::entity::get_num_workers() const { +- ucs_assert(m_workers.size() == size_t(num_workers)); +- return num_workers; ++ return m_workers.size(); + } + + int ucp_test_base::entity::get_num_eps(int worker_index) const { + return m_workers[worker_index].second.size(); + } + ++size_t ucp_test_base::entity::get_rejected_cntr() const { ++ return m_rejected_cntr; ++} ++ ++void ucp_test_base::entity::inc_rejected_cntr() { ++ ++m_rejected_cntr; ++} ++ ++ + void ucp_test_base::entity::warn_existing_eps() const { + for (size_t worker_index = 0; worker_index < m_workers.size(); ++worker_index) { + for (size_t ep_index = 0; ep_index < m_workers[worker_index].second.size(); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.h +index 361176f2f..bf0757801 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucp/ucp_test.h +@@ -16,9 +16,17 @@ + + #include + ++#include ++ + #define MT_TEST_NUM_THREADS 4 + #define UCP_TEST_TIMEOUT_IN_SEC 10.0 + ++ ++namespace ucp { ++extern const uint32_t MAGIC; ++} ++ ++ + struct ucp_test_param { + ucp_params_t ctx_params; + std::vector transports; +@@ -40,13 +48,21 @@ public: + ep_vec_t> > worker_vec_t; + + public: ++ typedef enum { ++ LISTEN_CB_EP, /* User's callback accepts ucp_ep_h */ ++ LISTEN_CB_CONN, /* User's callback accepts ucp_conn_request_h */ ++ LISTEN_CB_REJECT /* User's callback rejects ucp_conn_request_h */ ++ } listen_cb_type_t; ++ + entity(const ucp_test_param& test_param, ucp_config_t* ucp_config, + const ucp_worker_params_t& worker_params); + + ~entity(); + + void connect(const entity* other, const ucp_ep_params_t& ep_params, +- int ep_idx = 0); ++ int ep_idx = 0, int do_set_ep = 1); ++ ++ ucp_ep_h accept(ucp_worker_h worker, ucp_conn_request_h conn_request); + + void* modify_ep(const ucp_ep_params_t& ep_params, int worker_idx = 0, + int ep_idx = 0); +@@ -57,11 +73,13 @@ public: + + void fence(int worker_index = 0) const; + +- void* disconnect_nb(int worker_index = 0, int ep_index = 0) const; ++ void* disconnect_nb(int worker_index = 0, int ep_index = 0, ++ enum ucp_ep_close_mode mode = UCP_EP_CLOSE_MODE_FLUSH) const; + + void destroy_worker(int worker_index = 0); + +- ucs_status_t listen(const struct sockaddr *saddr, socklen_t addrlen, ++ ucs_status_t listen(listen_cb_type_t cb_type, ++ const struct sockaddr *saddr, socklen_t addrlen, + int worker_index = 0); + + ucp_ep_h ep(int worker_index = 0, int ep_index = 0) const; +@@ -78,6 +96,10 @@ public: + + int get_num_eps(int worker_index = 0) const; + ++ void inc_rejected_cntr(); ++ ++ size_t get_rejected_cntr() const; ++ + void warn_existing_eps() const; + + void cleanup(); +@@ -85,15 +107,17 @@ public: + static void ep_destructor(ucp_ep_h ep, entity *e); + + protected: +- ucs::handle m_ucph; +- worker_vec_t m_workers; +- ucs::handle m_listener; +- +- int num_workers; ++ ucs::handle m_ucph; ++ worker_vec_t m_workers; ++ ucs::handle m_listener; ++ std::queue m_conn_reqs; ++ size_t m_rejected_cntr; + + private: + static void empty_send_completion(void *r, ucs_status_t status); +- static void accept_cb(ucp_ep_h ep, void *arg); ++ static void accept_ep_cb(ucp_ep_h ep, void *arg); ++ static void accept_conn_cb(ucp_conn_request_h conn_req, void *arg); ++ static void reject_conn_cb(ucp_conn_request_h conn_req, void *arg); + + void set_ep(ucp_ep_h ep, int worker_index, int ep_index); + }; +@@ -150,6 +174,7 @@ protected: + virtual void cleanup(); + entity* create_entity(bool add_in_front = false); + entity* create_entity(bool add_in_front, const ucp_test_param& test_param); ++ entity* get_entity_by_ep(ucp_ep_h ep); + unsigned progress(int worker_index = 0) const; + void short_progress_loop(int worker_index = 0) const; + void flush_ep(const entity &e, int worker_index = 0, int ep_index = 0); +@@ -157,6 +182,12 @@ protected: + void disconnect(const entity& entity); + void wait(void *req, int worker_index = 0); + void set_ucp_config(ucp_config_t *config); ++ int max_connections(); ++ ++ static void err_handler_cb(void *arg, ucp_ep_h ep, ucs_status_t status) { ++ ucp_test *self = reinterpret_cast(arg); ++ self->m_err_handler_count++; ++ } + + template + void wait_for_flag(volatile T *flag, double timeout = 10.0) { +@@ -174,6 +205,7 @@ private: + const ucp_test_param& test_param); + + protected: ++ volatile int m_err_handler_count; + static const ucp_datatype_t DATATYPE; + static const ucp_datatype_t DATATYPE_IOV; + }; +@@ -181,7 +213,6 @@ protected: + + std::ostream& operator<<(std::ostream& os, const ucp_test_param& test_param); + +- + /** + * Instantiate the parameterized test case a combination of transports. + * +@@ -209,11 +240,9 @@ std::ostream& operator<<(std::ostream& os, const ucp_test_param& test_param); + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, udx, "ud_x") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, rc, "rc") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, rcx, "rc_x") \ +- UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, rcx_cm, "\\rc_mlx5,cm:aux") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, shm_ib, "shm,ib") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, ugni, "ugni") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, self, "self") \ + UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, tcp, "tcp") + +- + #endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_async.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_async.cc +index cb74fdab5..8dae204c8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_async.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_async.cc +@@ -240,8 +240,10 @@ public: + UCS_TEST_BASE_IMPL; + + protected: +- static const int COUNT = 40; +- static const unsigned SLEEP_USEC = 1000; ++ static const int COUNT = 40; ++ static const unsigned SLEEP_USEC = 1000; ++ static const int TIMER_RETRIES = 100; ++ static const int TIMER_EXP_COUNT = COUNT / 4; + + void suspend(double scale = 1.0) { + ucs::safe_usleep(ucs_max(scale * SLEEP_USEC, 0) * +@@ -414,6 +416,28 @@ UCS_TEST_P(test_async, max_events, "ASYNC_MAX_EVENTS=4") { + ucs_async_context_cleanup(&async); + } + ++UCS_TEST_P(test_async, many_timers) { ++ ++ for (int count = 0; count < 4010; ++count) { ++ std::vector timers; ++ ucs_status_t status; ++ int timer_id; ++ ++ for (int count2 = 0; count2 < 250; ++count2) { ++ status = ucs_async_add_timer(GetParam(), ucs_time_from_sec(1.0), ++ (ucs_async_event_cb_t)ucs_empty_function, ++ NULL, NULL, &timer_id); ++ ASSERT_UCS_OK(status); ++ timers.push_back(timer_id); ++ } ++ ++ while (!timers.empty()) { ++ ucs_async_remove_handler(timers.back(), 0); ++ timers.pop_back(); ++ } ++ } ++} ++ + UCS_TEST_P(test_async, ctx_event) { + local_event le(GetParam()); + le.push_event(); +@@ -423,16 +447,29 @@ UCS_TEST_P(test_async, ctx_event) { + + UCS_TEST_P(test_async, ctx_timer) { + local_timer lt(GetParam()); +- suspend_and_poll(<, COUNT * 4); +- EXPECT_GE(lt.count(), COUNT / 4); ++ for (int i = 0; i < TIMER_RETRIES; ++i) { ++ suspend_and_poll(<, COUNT * 4); ++ if (lt.count() >= TIMER_EXP_COUNT) { ++ break; ++ } ++ UCS_TEST_MESSAGE << "retry " << (i + 1); ++ } ++ EXPECT_GE(lt.count(), int(TIMER_EXP_COUNT)); + } + + UCS_TEST_P(test_async, two_timers) { + local_timer lt1(GetParam()); + local_timer lt2(GetParam()); +- suspend_and_poll2(<1, <2, COUNT * 4); +- EXPECT_GE(lt1.count(), COUNT / 4); +- EXPECT_GE(lt2.count(), COUNT / 4); ++ for (int i = 0; i < TIMER_RETRIES; ++i) { ++ suspend_and_poll2(<1, <2, COUNT * 4); ++ if ((lt1.count() >= TIMER_EXP_COUNT) && ++ (lt2.count() >= TIMER_EXP_COUNT)) { ++ break; ++ } ++ UCS_TEST_MESSAGE << "retry " << (i + 1); ++ } ++ EXPECT_GE(lt1.count(), int(TIMER_EXP_COUNT)); ++ EXPECT_GE(lt2.count(), int(TIMER_EXP_COUNT)); + } + + UCS_TEST_P(test_async, ctx_event_block) { +@@ -484,13 +521,19 @@ UCS_TEST_P(test_async, ctx_event_block_two_miss) { + UCS_TEST_P(test_async, ctx_timer_block) { + local_timer lt(GetParam()); + +- lt.block(); +- int count = lt.count(); +- suspend_and_poll(<, COUNT); +- EXPECT_EQ(count, lt.count()); +- lt.unblock(); ++ for (int i = 0; i < TIMER_RETRIES; ++i) { ++ lt.block(); ++ int count = lt.count(); ++ suspend_and_poll(<, COUNT); ++ EXPECT_EQ(count, lt.count()); ++ lt.unblock(); + +- lt.check_miss(); ++ lt.check_miss(); ++ if (lt.count() >= 1) { ++ break; ++ } ++ UCS_TEST_MESSAGE << "retry " << (i + 1); ++ } + EXPECT_GE(lt.count(), 1); /* Timer could expire again after unblock */ + } + +@@ -523,6 +566,25 @@ UCS_TEST_P(test_async, modify_event) { + EXPECT_EQ(le.count(), count); + } + ++UCS_TEST_P(test_async, warn_block) { ++ { ++ scoped_log_handler slh(hide_warns_logger); ++ { ++ local_event le(GetParam()); ++ le.block(); ++ } ++ } ++ ++ int warn_count = m_warnings.size(); ++ for (int i = 0; i < warn_count; ++i) { ++ UCS_TEST_MESSAGE << "< " << m_warnings[i] << " >"; ++ } ++ ++ if (GetParam() != UCS_ASYNC_MODE_POLL) { ++ EXPECT_GE(warn_count, 1); ++ } ++} ++ + class local_timer_remove_handler : public local_timer { + public: + local_timer_remove_handler(ucs_async_mode_t mode) : local_timer(mode) { +@@ -649,20 +711,27 @@ UCS_TEST_P(test_async_event_mt, multithread) { + + for (unsigned i = 0; i < NUM_THREADS; ++i) { + int count = thread_count(i); +- EXPECT_GE(count, (int)(COUNT * 0.75)); ++ EXPECT_GE(count, (int)(COUNT * 0.4)); + } + } + UCS_TEST_P(test_async_timer_mt, multithread) { +- spawn(); +- +- suspend(2 * COUNT); +- +- stop(); +- +- for (unsigned i = 0; i < NUM_THREADS; ++i) { +- int count = thread_count(i); +- EXPECT_GE(count, (int)(COUNT * 0.10)); ++ const int exp_min_count = (int)(COUNT * 0.10); ++ int min_count = 0; ++ for (int r = 0; r < TIMER_RETRIES; ++r) { ++ spawn(); ++ suspend(2 * COUNT); ++ stop(); ++ ++ min_count = std::numeric_limits::max(); ++ for (unsigned i = 0; i < NUM_THREADS; ++i) { ++ int count = thread_count(i); ++ min_count = ucs_min(count, min_count); ++ } ++ if (min_count >= exp_min_count) { ++ break; ++ } + } ++ EXPECT_GE(min_count, exp_min_count); + } + + INSTANTIATE_TEST_CASE_P(signal, test_async, ::testing::Values(UCS_ASYNC_MODE_SIGNAL)); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_config.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_config.cc +index e94f1c1aa..9b30c957f 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_config.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_config.cc +@@ -267,7 +267,7 @@ UCS_TEST_F(test_config, performance) { + } + + /* Now test the time */ +- UCS_TEST_TIME_LIMIT(0.005) { ++ UCS_TEST_TIME_LIMIT(0.05) { + car_opts opts(NULL, NULL); + } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_datatype.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_datatype.cc +index 5e4dd803f..2b1652e57 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_datatype.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_datatype.cc +@@ -147,27 +147,17 @@ UCS_TEST_F(test_datatype, queue) { + + UCS_TEST_F(test_datatype, queue_iter) { + ++ const int num_elems = 4; + ucs_queue_head_t head; +- elem_t *elem1, *elem2, *elem3, *elem4; ++ std::vector elems(num_elems); + + ucs_queue_head_init(&head); + EXPECT_TRUE(ucs_queue_is_empty(&head)); + +- elem1 = (elem_t*)malloc(sizeof(elem_t)); +- elem2 = (elem_t*)malloc(sizeof(elem_t)); +- elem3 = (elem_t*)malloc(sizeof(elem_t)); +- elem4 = (elem_t*)malloc(sizeof(elem_t)); +- +- elem1->i = 1; +- elem2->i = 2; +- elem3->i = 3; +- elem4->i = 4; +- +- ucs_queue_push(&head, &elem1->queue); +- ucs_queue_push(&head, &elem2->queue); +- ucs_queue_push(&head, &elem3->queue); +- ucs_queue_push(&head, &elem4->queue); +- ++ for (int i = 0; i < num_elems; ++i) { ++ elems[i].i = i + 1; ++ ucs_queue_push(&head, &elems[i].queue); ++ } + + { + std::vector vec; +@@ -176,7 +166,7 @@ UCS_TEST_F(test_datatype, queue_iter) { + ucs_queue_for_each(elem, &head, queue) { + vec.push_back(elem->i); + } +- ASSERT_EQ(4u, vec.size()); ++ ASSERT_EQ(static_cast(num_elems), vec.size()); + EXPECT_EQ(1, vec[0]); + EXPECT_EQ(2, vec[1]); + EXPECT_EQ(3, vec[2]); +@@ -192,7 +182,7 @@ UCS_TEST_F(test_datatype, queue_iter) { + { + if (elem->i == 3 || elem->i == 4) { + ucs_queue_del_iter(&head, iter); +- free(elem); ++ memset(elem, 0xff, sizeof(*elem)); + } + } + ASSERT_EQ((unsigned long)2, ucs_queue_length(&head)); +@@ -200,7 +190,7 @@ UCS_TEST_F(test_datatype, queue_iter) { + ucs_queue_for_each_safe(elem, iter, &head, queue) { + vec.push_back(elem->i); + ucs_queue_del_iter(&head, iter); +- free(elem); ++ memset(elem, 0xff, sizeof(*elem)); + } + ASSERT_EQ(2u, vec.size()); + EXPECT_EQ(1, vec[0]); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_hash_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_hash_perf.cc +deleted file mode 100644 +index 49b0e767e..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_hash_perf.cc ++++ /dev/null +@@ -1,297 +0,0 @@ +-/** +- * Copyright (C) Mellanox Technologies Ltd. 2001-2016. ALL RIGHTS RESERVED. +- * See file LICENSE for terms. +- */ +- +-#include +- +-extern "C" { +-#include +-#include +-#include +-#include +-#include +-} +- +-#include +-#include +-#include +- +-typedef uint64_t key_type; +-typedef ucp_ep_t hash_type; +- +-#define MAX_COUNT 4194304 +-#define START_TIME ucs_time_t time = -ucs_get_time(); +-#define END_TIME (ucs_time_to_nsec(time + ucs_get_time()) / num_elem) +-#define FIELD_ALIGN(_x_) ":" << std::right << std::setw(_x_) +- +-static key_type keys[MAX_COUNT]; /* the keys array */ +- +-static void generate_keys() +-{ +- for (int i = 0; i < MAX_COUNT; ++i) { +- keys[i] = ucs_generate_uuid((key_type)keys); +- } +-} +- +-class perf_compare_base { +-public: +- virtual ~perf_compare_base() {}; +- +- ucs_time_t initialize(const size_t num_elem) { +- START_TIME +- init_storage(); +- for (size_t i = 0; i < num_elem; ++i) { +- add_elem(keys[i]); +- } +- return (ucs_time_t)END_TIME; +- } +- +- ucs_time_t lookup(const size_t num_elem) const { +- START_TIME +- for (size_t i = 0; i < num_elem; ++i) { +- hash_type *ep = find_elem(keys[i]); +- EXPECT_TRUE(ep->dest_uuid == keys[i]); +- } +- return (ucs_time_t)END_TIME; +- } +- +- ucs_time_t cleanup(const size_t num_elem) { +- START_TIME +- del_elems(); +- return (ucs_time_t)END_TIME; +- } +- +- virtual void init_storage() = 0; +- virtual void add_elem(const uint64_t key) = 0; +- virtual hash_type *find_elem(const uint64_t key) const = 0; +- virtual void del_elems() = 0; +- virtual const char *get_name() const = 0; +- +- template +- _type_to_alloc *create_element(const uint64_t key) const { +- _type_to_alloc *ep = (_type_to_alloc *) ucs_malloc(sizeof(_type_to_alloc), get_name()); +- EXPECT_TRUE(ep); +- ep->dest_uuid = key; +- return ep; +- } +-}; +- +-class perf_compare_map : public perf_compare_base { +-public: +- const char *get_name() const { +- return "map"; +- } +- +- void init_storage() {} +- +- void add_elem(const uint64_t key) { +- obj[key] = create_element(key); +- } +- +- hash_type *find_elem(const uint64_t key) const { +- std::map::const_iterator ep_found = obj.find(key); +- EXPECT_TRUE(ep_found != obj.end()); +- return ep_found->second; +- } +- +- void del_elems() { +- for (std::map::const_iterator it = obj.begin(); +- it != obj.end(); ++it) { +- hash_type *ep = it->second; +- free(ep); +- } +- obj.clear(); +- } +- +- std::map obj; +-}; +- +-class perf_compare_unordered_map : public perf_compare_base { +-public: +- const char *get_name() const { +- return "unmap"; +- } +- +- void init_storage() {} +- +- void add_elem(const uint64_t key) { +- obj[key] = create_element(key); +- } +- +- hash_type *find_elem(const uint64_t key) const { +- std::tr1::unordered_map::const_iterator ep_found = obj.find(key); +- EXPECT_TRUE(ep_found != obj.end()); +- return ep_found->second; +- } +- +- void del_elems() { +- for (std::tr1::unordered_map::const_iterator it = obj.begin(); +- it != obj.end(); ++it) { +- hash_type *ep = it->second; +- free(ep); +- } +- obj.clear(); +- } +- +- std::tr1::unordered_map obj; +-}; +- +-class perf_compare_khash : public perf_compare_base { +-public: +- const char *get_name() const { +- return "khash"; +- } +- +- KHASH_MAP_INIT_INT64(khash_ep_hash, hash_type *); +- +- void init_storage() { +- kh_init_inplace(khash_ep_hash, &obj); +- } +- +- void add_elem(const uint64_t key) { +- int hash_extra_status = 0; +- +- khiter_t hash_it = kh_put(khash_ep_hash, &obj, key, &hash_extra_status); +- EXPECT_TRUE(hash_it != kh_end(&obj)); +- kh_value(&obj, hash_it) = create_element(key); +- } +- +- hash_type *find_elem(const uint64_t key) const { +- khiter_t ep_found = kh_get(khash_ep_hash, &obj, key); +- EXPECT_TRUE(ep_found != kh_end(&obj)); +- return kh_value(&obj, ep_found); +- } +- +- void del_elems() { +- for (khiter_t it = kh_begin(obj); it != kh_end(&obj); ++it) { +- if (!kh_exist(&obj, it)) { +- continue; +- } +- hash_type *ep = kh_value(&obj, it); +- free(ep); +- } +- kh_destroy_inplace(khash_ep_hash, &obj); +- } +- +- khash_t(khash_ep_hash) obj; +-}; +- +-#define SGLIB_HASH_SIZE 32767 +-#define test_sglib_compare(_ep1, _ep2) ((int64_t)(_ep1)->dest_uuid - (int64_t)(_ep2)->dest_uuid) +-#define test_sglib_hash(_ep) ((_ep)->dest_uuid) +- +-struct sglib_hash_type : public hash_type { +- sglib_hash_type *next; +-}; +- +-SGLIB_DEFINE_LIST_PROTOTYPES(sglib_hash_type, test_sglib_compare, next); +-SGLIB_DEFINE_LIST_FUNCTIONS(sglib_hash_type, test_sglib_compare, next); +-SGLIB_DEFINE_HASHED_CONTAINER_PROTOTYPES(sglib_hash_type, SGLIB_HASH_SIZE, test_sglib_hash); +-SGLIB_DEFINE_HASHED_CONTAINER_FUNCTIONS(sglib_hash_type, SGLIB_HASH_SIZE, test_sglib_hash); +- +-class perf_compare_sglib : public perf_compare_base { +-public: +- const char *get_name() const { +- return "sglib"; +- } +- +- void init_storage() { +- obj = (sglib_hash_type **) ucs_malloc(sizeof(*obj) * SGLIB_HASH_SIZE, "sglib_hash"); +- sglib_hashed_sglib_hash_type_init(obj); +- } +- +- void add_elem(const uint64_t key) { +- sglib_hash_type *ep = create_element(key); +- sglib_hashed_sglib_hash_type_add(obj, ep); +- } +- +- hash_type *find_elem(const uint64_t key) const { +- sglib_hash_type ep, *ep_found = 0; +- ep.dest_uuid = key; +- ep_found = sglib_hashed_sglib_hash_type_find_member(obj, &ep); +- EXPECT_TRUE(ep_found); +- return ep_found; +- } +- +- void del_elems() { +- struct sglib_hashed_sglib_hash_type_iterator it; +- for (sglib_hash_type *local_it = sglib_hashed_sglib_hash_type_it_init(&it, obj); +- local_it != NULL; +- local_it = sglib_hashed_sglib_hash_type_it_next(&it)) { +- sglib_hashed_sglib_hash_type_delete(obj, local_it); +- free(local_it); +- } +- free(obj); +- } +- +- sglib_hash_type **obj; +-}; +- +-class test_hash_perf : public ucs::test { +-protected: +- void check_lookup_perf(perf_compare_base* hash, size_t num_elems); +-}; +- +-void test_hash_perf::check_lookup_perf(perf_compare_base* hash, size_t num_elems) { +- const ucs_time_t MAX_LOOKUP_NS_1024 = 400; +- for (int i = 0; i < (ucs::perf_retry_count + 1); ++i) { +- ucs_time_t lookup_ns = hash->lookup(num_elems); +- if (!ucs::perf_retry_count) { +- UCS_TEST_MESSAGE << "not validating performance"; +- return; /* Skip */ +- } else if (lookup_ns < MAX_LOOKUP_NS_1024) { +- return; /* Success */ +- } else { +- ucs::safe_sleep(ucs::perf_retry_interval); +- } +- } +- ADD_FAILURE() << hash->get_name() << " bad lookup performance"; +-} +- +-UCS_TEST_F(test_hash_perf, perf_compare) { +- +- size_t trip_counts[] = {1, 2, 8, 128, 1024, 32768, 262144, 1048576, 0}; +- +- if (ucs::test_time_multiplier() > 1) { +- UCS_TEST_SKIP_R("Long run expected. Skipped."); +- } +- perf_compare_base *perf_compare_khash_ptr = new perf_compare_khash; +- perf_compare_base *perf_compare_sglib_ptr = new perf_compare_sglib; +- perf_compare_base *hashes[] = { +- perf_compare_khash_ptr, +- perf_compare_sglib_ptr, +- new perf_compare_map, +- new perf_compare_unordered_map, +- NULL +- }; +- +- generate_keys(); +- +- UCS_TEST_MESSAGE << ": elements :init :lookup:remove"; +- for (int i = 0; hashes[i] != NULL; ++i) { +- perf_compare_base *cur_hash = hashes[i]; +- for (int j = 0; trip_counts[j] > 0; ++j) { +- size_t num_elems = trip_counts[j]; +- +- ucs_time_t insert_ns = cur_hash->initialize(num_elems); +- ucs_time_t lookup_ns = cur_hash->lookup(num_elems); +- +- if ((1024 == num_elems) && +- ((cur_hash == perf_compare_khash_ptr) || +- (cur_hash == perf_compare_sglib_ptr))) +- { +- check_lookup_perf(cur_hash, num_elems); +- } +- +- ucs_time_t remove_ns = cur_hash->cleanup(num_elems); +- +- UCS_TEST_MESSAGE << FIELD_ALIGN(6) << cur_hash->get_name() +- << FIELD_ALIGN(8) << num_elems +- << FIELD_ALIGN(6) << insert_ns +- << FIELD_ALIGN(6) << lookup_ns +- << FIELD_ALIGN(6) << remove_ns; +- } +- delete cur_hash; +- } +-} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_log.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_log.cc +index 3778019ab..89ca33072 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_log.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_log.cc +@@ -41,6 +41,7 @@ public: + + virtual void cleanup() { + ucs_log_cleanup(); ++ m_num_log_handlers_before = 0; + pop_config(); + check_log_file(); + unlink(logfile); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_math.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_math.cc +index b39feab9d..16cc44aec 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_math.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_math.cc +@@ -54,17 +54,26 @@ UCS_TEST_F(test_math, circular_compare) { + } + + UCS_TEST_F(test_math, bitops) { +- EXPECT_EQ((unsigned)0, ucs_ffs64(0xfffff)); +- EXPECT_EQ((unsigned)16, ucs_ffs64(0xf0000)); +- EXPECT_EQ((unsigned)1, ucs_ffs64(0x4002)); +- EXPECT_EQ((unsigned)41, ucs_ffs64(1ull<<41)); +- +- EXPECT_EQ((unsigned)0, ucs_ilog2(1)); +- EXPECT_EQ((unsigned)2, ucs_ilog2(4)); +- EXPECT_EQ((unsigned)2, ucs_ilog2(5)); +- EXPECT_EQ((unsigned)2, ucs_ilog2(7)); +- EXPECT_EQ((unsigned)14, ucs_ilog2(17000)); +- EXPECT_EQ((unsigned)40, ucs_ilog2(1ull<<40)); ++ EXPECT_EQ(0u, ucs_ffs64(0xfffff)); ++ EXPECT_EQ(16u, ucs_ffs64(0xf0000)); ++ EXPECT_EQ(1u, ucs_ffs64(0x4002)); ++ EXPECT_EQ(41u, ucs_ffs64(1ull<<41)); ++ ++ EXPECT_EQ(0u, ucs_ilog2(1)); ++ EXPECT_EQ(2u, ucs_ilog2(4)); ++ EXPECT_EQ(2u, ucs_ilog2(5)); ++ EXPECT_EQ(2u, ucs_ilog2(7)); ++ EXPECT_EQ(14u, ucs_ilog2(17000)); ++ EXPECT_EQ(40u, ucs_ilog2(1ull<<40)); ++ ++ EXPECT_EQ(0, ucs_popcount(0)); ++ EXPECT_EQ(2, ucs_popcount(5)); ++ EXPECT_EQ(16, ucs_popcount(0xffff)); ++ EXPECT_EQ(48, ucs_popcount(0xffffffffffffUL)); ++ ++ EXPECT_EQ(0, ucs_count_trailing_zero_bits(1)); ++ EXPECT_EQ(28, ucs_count_trailing_zero_bits(0x10000000)); ++ EXPECT_EQ(32, ucs_count_trailing_zero_bits(0x100000000UL)); + } + + #define TEST_ATOMIC_ADD(_bitsize) \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtrack.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtrack.cc +index 6978e0870..830890f72 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtrack.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtrack.cc +@@ -147,7 +147,7 @@ UCS_TEST_F(test_memtrack, sysv) { + size = ALLOC_SIZE; + + status = ucs_sysv_alloc(&size, std::numeric_limits::max(), &ptr, 0, +- &shmid, ALLOC_NAME); ++ ALLOC_NAME, &shmid); + ASSERT_UCS_OK(status); + ASSERT_NE((void *)NULL, ptr); + +@@ -188,16 +188,13 @@ UCS_TEST_F(test_memtrack, mmap) { + + UCS_TEST_F(test_memtrack, custom) { + void *ptr, *initial_ptr; +- size_t size; + +- size = ucs_memtrack_adjust_alloc_size(ALLOC_SIZE); +- initial_ptr = ptr = malloc(size); +- ucs_memtrack_allocated(&ptr, &size, ALLOC_NAME); ++ initial_ptr = ptr = malloc(ALLOC_SIZE); ++ ucs_memtrack_allocated(ptr, ALLOC_SIZE, ALLOC_NAME); + +- EXPECT_EQ(size_t(ALLOC_SIZE), size); +- memset(ptr, 0, size); ++ memset(ptr, 0, ALLOC_SIZE); + +- ucs_memtrack_releasing(&ptr); ++ ucs_memtrack_releasing(ptr); + ASSERT_EQ(initial_ptr, ptr); + free(ptr); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtype_cache.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtype_cache.cc +new file mode 100644 +index 000000000..32602b90d +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_memtype_cache.cc +@@ -0,0 +1,80 @@ ++/** ++ * Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++ * ++ * See file LICENSE for terms. ++ */ ++ ++#include ++#if HAVE_CUDA ++#include ++#include ++#endif ++extern "C" { ++#include ++} ++ ++ ++class test_memtype_cache : public ucs::test { ++protected: ++ ++ virtual void init() { ++ ucs_status_t status; ++ ++ ucs::test::init(); ++ status = ucs_memtype_cache_create(&m_memtype_cache); ++ ASSERT_UCS_OK(status); ++ } ++ ++ virtual void cleanup() { ++ ucs_memtype_cache_destroy(m_memtype_cache); ++ ucs::test::cleanup(); ++ } ++ ++ ucs_memtype_cache_t *m_memtype_cache; ++}; ++ ++#if HAVE_CUDA ++UCS_TEST_F(test_memtype_cache, basic_cuda) { ++ cudaError_t cerr; ++ void *ptr; ++ ucm_mem_type_t ucm_mem_type; ++ ucs_status_t status; ++ ++ /* set cuda device */ ++ if (cudaSetDevice(0) != cudaSuccess) { ++ UCS_TEST_SKIP_R("can't set cuda device"); ++ } ++ ++ cerr = cudaMalloc(&ptr, 64); ++ EXPECT_EQ(cerr, cudaSuccess); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 64, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 32, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, (void *)((uintptr_t)ptr + 1), 7, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 1, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, (void *)((uintptr_t) ptr + 63), 1, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 0, &ucm_mem_type); ++ EXPECT_UCS_OK(status); ++ EXPECT_EQ(ucm_mem_type, UCM_MEM_TYPE_CUDA); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 65, &ucm_mem_type); ++ EXPECT_TRUE(status == UCS_ERR_NO_ELEM); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, (void *)((uintptr_t) ptr + 64), 1, &ucm_mem_type); ++ EXPECT_TRUE(status == UCS_ERR_NO_ELEM); ++ ++ cerr = cudaFree(ptr); ++ EXPECT_EQ(cerr, cudaSuccess); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 64, &ucm_mem_type); ++ EXPECT_TRUE(status == UCS_ERR_NO_ELEM); ++ status = ucs_memtype_cache_lookup(m_memtype_cache, ptr, 1, &ucm_mem_type); ++ EXPECT_TRUE(status == UCS_ERR_NO_ELEM); ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_pgtable.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_pgtable.cc +index 16895bd20..3444e290c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_pgtable.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_pgtable.cc +@@ -258,6 +258,17 @@ UCS_TEST_F(test_pgtable, nonexist_remove) { + remove(®ion2); + } + ++UCS_TEST_F(test_pgtable, search_large_region) { ++ ucs_pgt_region_t region = {0x3c03cb00, 0x3c03f600}; ++ insert(®ion, UCS_OK); ++ ++ search_result_t result = search(0x36990000, 0x3c810000); ++ EXPECT_EQ(1u, result.size()); ++ EXPECT_EQ(®ion, result.front()); ++ ++ remove(®ion); ++} ++ + class test_pgtable_perf : public test_pgtable { + protected: + +@@ -279,9 +290,10 @@ protected: + return NULL; + } else { + ucs_pgt_region_t *region = *iter; +- ucs_assertv(address < region->end, +- "address=0x%lx region 0x%lx..0x%lx", address, +- region->start, region->end); ++ EXPECT_LT(address, region->end) << std::hex << "address=" ++ << address << " region " ++ << region->start << ".." ++ << region->end << std::dec; + return (address >= region->start) ? region : NULL; + } + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_profile.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_profile.cc +index db41b86de..11b9b9c7a 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_profile.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_profile.cc +@@ -7,7 +7,8 @@ + #include + extern "C" { + #include +-#include ++#include ++#include + } + + #include +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_rcache.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_rcache.cc +index ff2bd3ca8..ffacc9ccc 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_rcache.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_rcache.cc +@@ -8,8 +8,11 @@ + extern "C" { + #include + #include ++#include + #include ++#include + #include ++#include + } + + +@@ -36,12 +39,13 @@ protected: + sizeof(region), + UCS_PGT_ADDR_ALIGN, + ucs_get_page_size(), ++ UCM_EVENT_VM_UNMAPPED, + 1000, + &ops, + reinterpret_cast(this) + }; + UCS_TEST_CREATE_HANDLE(ucs_rcache_t*, m_rcache, ucs_rcache_destroy, +- ucs_rcache_create, ¶ms, "test", NULL); ++ ucs_rcache_create, ¶ms, "test", ucs_stats_get_root()); + } + + virtual void cleanup() { +@@ -133,7 +137,8 @@ protected: + private: + + static ucs_status_t mem_reg_cb(void *context, ucs_rcache_t *rcache, +- void *arg, ucs_rcache_region_t *r) ++ void *arg, ucs_rcache_region_t *r, ++ uint16_t rcache_mem_reg_flags) + { + return reinterpret_cast(context)->mem_reg( + ucs_derived_of(r, struct region)); +@@ -602,3 +607,166 @@ UCS_MT_TEST_F(test_rcache_no_register, merge_invalid_prot_slow, 5) + + munmap(mem, size1+size2); + } ++ ++#if ENABLE_STATS ++class test_rcache_stats : public test_rcache { ++protected: ++ ++ virtual void init() { ++ ucs_stats_cleanup(); ++ push_config(); ++ modify_config("STATS_DEST", "file:/dev/null"); ++ modify_config("STATS_TRIGGER", "exit"); ++ ucs_stats_init(); ++ ASSERT_TRUE(ucs_stats_is_active()); ++ test_rcache::init(); ++ } ++ ++ virtual void cleanup() { ++ test_rcache::cleanup(); ++ ucs_stats_cleanup(); ++ pop_config(); ++ ucs_stats_init(); ++ } ++ ++ int get_counter(int stat) { ++ return (int)UCS_STATS_GET_COUNTER(m_rcache.get()->stats, stat); ++ } ++ ++ /* a helper function for stats tests debugging */ ++ void dump_stats() { ++ printf("gets %d hf %d hs %d misses %d merges %d unmaps %d" ++ " unmaps_inv %d puts %d regs %d deregs %d\n", ++ get_counter(UCS_RCACHE_GETS), ++ get_counter(UCS_RCACHE_HITS_FAST), ++ get_counter(UCS_RCACHE_HITS_SLOW), ++ get_counter(UCS_RCACHE_MISSES), ++ get_counter(UCS_RCACHE_MERGES), ++ get_counter(UCS_RCACHE_UNMAPS), ++ get_counter(UCS_RCACHE_UNMAP_INVALIDATES), ++ get_counter(UCS_RCACHE_PUTS), ++ get_counter(UCS_RCACHE_REGS), ++ get_counter(UCS_RCACHE_DEREGS)); ++ } ++}; ++ ++UCS_TEST_F(test_rcache_stats, basic) { ++ static const size_t size = 4096; ++ void *ptr = malloc(size); ++ region *r1, *r2; ++ ++ r1 = get(ptr, size); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_MISSES)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_REGS)); ++ ++ r2 = get(ptr, size); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_HITS_FAST)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_MISSES)); ++ ++ put(r1); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_PUTS)); ++ ++ put(r2); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_PUTS)); ++ ++ free(ptr); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_PUTS)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_DEREGS)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_UNMAPS)); ++} ++ ++UCS_TEST_F(test_rcache_stats, unmap_dereg) { ++ static const size_t size1 = 1024 * 1024; ++ void *mem = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ region *r1; ++ ++ r1 = get(mem, size1); ++ put(r1); ++ ++ /* Should generate umap event but no dereg or unmap invalidation. ++ * We can have more unmap events if releasing the region structure triggers ++ * releasing memory back to the OS. ++ */ ++ munmap(mem, size1); ++ EXPECT_GE(get_counter(UCS_RCACHE_UNMAPS), 1); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_UNMAP_INVALIDATES)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_DEREGS)); ++ ++ mem = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ ++ /* ++ * Adding a new region shall force a processing of invalidation queue and dereg ++ */ ++ r1 = get(mem, size1); ++ EXPECT_GE(get_counter(UCS_RCACHE_UNMAPS), 1); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_UNMAP_INVALIDATES)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_DEREGS)); ++ ++ /* cleanup */ ++ put(r1); ++ munmap(mem, size1); ++} ++ ++UCS_TEST_F(test_rcache_stats, merge) { ++ static const size_t size1 = 1024 * 1024; ++ void *mem = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ region *r1, *r2; ++ ++ r1 = get(mem, 8192); ++ /* should trigger merge of the two regions */ ++ r2 = get((char *)mem + 4096, 8192); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_MERGES)); ++ ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_MISSES)); ++ ++ put(r1); ++ put(r2); ++ munmap(mem, size1); ++} ++ ++UCS_TEST_F(test_rcache_stats, hits_slow) { ++ static const size_t size1 = 1024 * 1024; ++ region *r1, *r2; ++ void *mem1, *mem2; ++ ++ mem1 = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ r1 = get(mem1, size1); ++ put(r1); ++ ++ mem2 = alloc_pages(size1, PROT_READ|PROT_WRITE); ++ r1 = get(mem2, size1); ++ ++ /* generate unmap event */ ++ munmap(mem1, size1); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_UNMAPS)); ++ ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_PUTS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_MISSES)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_UNMAP_INVALIDATES)); ++ EXPECT_EQ(0, get_counter(UCS_RCACHE_DEREGS)); ++ /* it should produce a slow hit because there is ++ * a pending unmap event ++ */ ++ r2 = get(mem2, size1); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_HITS_SLOW)); ++ ++ EXPECT_EQ(3, get_counter(UCS_RCACHE_GETS)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_PUTS)); ++ EXPECT_EQ(2, get_counter(UCS_RCACHE_MISSES)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_UNMAPS)); ++ /* unmap event processed */ ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_UNMAP_INVALIDATES)); ++ EXPECT_EQ(1, get_counter(UCS_RCACHE_DEREGS)); ++ ++ put(r1); ++ put(r2); ++ munmap(mem2, size1); ++} ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats.cc +index a8a6f447c..d29dfa05c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats.cc +@@ -57,7 +57,7 @@ public: + void prepare_nodes(ucs_stats_node_t **cat_node, + ucs_stats_node_t *data_nodes[NUM_DATA_NODES]) { + static ucs_stats_class_t category_stats_class = { +- "category", 0, {} ++ "category", 0 + }; + + ucs_status_t status = UCS_STATS_NODE_ALLOC(cat_node, +@@ -149,7 +149,6 @@ public: + + void read_and_check_stats(ucs_stats_node_t *data_nodes[NUM_DATA_NODES]) { + ucs_list_link_t *list = ucs_stats_server_get_stats(m_server); +- ucs_assert(1ul == ucs_list_length(list)); + ASSERT_EQ(1ul, ucs_list_length(list)); + check_tree(ucs_list_head(list, ucs_stats_node_t, list), data_nodes); + ucs_stats_server_purge_stats(m_server); +@@ -258,7 +257,7 @@ UCS_TEST_F(stats_on_demand_test, null_root) { + ucs_stats_node_t *cat_node; + + static ucs_stats_class_t category_stats_class = { +- "category", 0, {} ++ "category", 0 + }; + ucs_status_t status = UCS_STATS_NODE_ALLOC(&cat_node, &category_stats_class, + NULL); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats_filter.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats_filter.cc +index 6a5b21c91..9dcfa2002 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats_filter.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_stats_filter.cc +@@ -7,6 +7,7 @@ + #include + extern "C" { + #include ++#include + #include + } + +@@ -44,6 +45,7 @@ public: + modify_config("STATS_DEST", stats_dest_config().c_str()); + modify_config("STATS_TRIGGER", stats_trigger_config().c_str()); + modify_config("STATS_FORMAT", stats_format_config().c_str()); ++ modify_config("WARN_INVARIANT_TSC", "n"); + ucs_stats_init(); + ASSERT_TRUE(ucs_stats_is_active()); + } +@@ -61,7 +63,7 @@ public: + + void prepare_nodes() { + static ucs_stats_class_t category_stats_class = { +- "category", 0, {} ++ "category", 0 + }; + + ucs_status_t status = UCS_STATS_NODE_ALLOC(&cat_node, &category_stats_class, +@@ -192,8 +194,10 @@ UCS_TEST_F(stats_filter_report, report) { + } + } + +- std::string compared_string = std::string(ucs_get_host_name()) + ":" + +- ucs::to_string(getpid()) + ":" + ++ std::string header = std::string(ucs_get_host_name()) + ":" + ++ ucs::to_string(getpid()); ++ ++ std::string compared_string = header.substr(0, UCS_STAT_NAME_MAX - 1) + ":" + + "\n category:\n" + + " data-0:\n" + + " counter0: 10\n" + +@@ -234,8 +238,11 @@ UCS_TEST_F(stats_filter_agg, report_agg) { + } + } + +- std::string compared_string = std::string(ucs_get_host_name()) + ":" + +- ucs::to_string(getpid()) + ":" + ++ std::string header = std::string(ucs_get_host_name()) + ":" + ++ ucs::to_string(getpid()); ++ ++ std::string compared_string = header.substr(0, UCS_STAT_NAME_MAX - 1) + ++ ":" + + "\n category:\n" + " data*:\n" + " counter0: 30\n" +@@ -264,8 +271,11 @@ UCS_TEST_F(stats_filter_summary, summary) { + break; + } + } +- std::string compared_string = std::string(ucs_get_host_name()) + ":" + +- ucs::to_string(getpid()) + ++ ++ std::string node_name = std::string(ucs_get_host_name()) + ":" + ++ ucs::to_string(getpid()); ++ node_name.resize(std::min(node_name.length(), UCS_STAT_NAME_MAX - 1)); ++ std::string compared_string = node_name + + ":data*:{counter0:30 counter1:60 " + + "counter2:90 counter3:120} \n"; + EXPECT_EQ(compared_string, output); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_strided_alloc.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_strided_alloc.cc +new file mode 100644 +index 000000000..e309b5a5a +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/ucs/test_strided_alloc.cc +@@ -0,0 +1,63 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include ++extern "C" { ++#include ++} ++ ++#include ++#include ++#include ++ ++class test_strided_alloc : public ucs::test { ++protected: ++ static const size_t area_size = 64; ++ static const unsigned num_areas = 3; ++}; ++ ++ ++UCS_TEST_F(test_strided_alloc, basic) { ++ ++ ucs_strided_alloc_t sa; ++ ++ ucs_strided_alloc_init(&sa, area_size, num_areas); ++ ++ std::vector objs; ++ for (size_t i = 0; i < 2; ++i) { ++ /* allocate */ ++ void *base = ucs_strided_alloc_get(&sa, "test"); ++ ++ for (unsigned j = 0; j < num_areas; ++j) { ++ void *area = ucs_strided_elem_get(base, 0, j); ++ memset(area, i*j, area_size); ++ } ++ ++ /* save in a vector */ ++ objs.push_back(base); ++ } ++ ++ /* check data integrity */ ++ char buf[area_size]; ++ for (size_t i = 0; i < objs.size(); ++i) { ++ void *base = objs[i]; ++ ++ for (unsigned j = 0; j < num_areas; ++j) { ++ void *area = ucs_strided_elem_get(base, 0, j); ++ memset(buf, i*j, area_size); ++ EXPECT_EQ(0, memcmp(area, buf, area_size)); ++ } ++ } ++ ++ /* release */ ++ while (!objs.empty()) { ++ void *base = objs.back(); ++ objs.pop_back(); ++ ucs_strided_alloc_put(&sa, base); ++ } ++ ++ ucs_strided_alloc_cleanup(&sa); ++} +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_cq_moderation.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_cq_moderation.cc +index a3826e5f0..4aee357a3 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_cq_moderation.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_cq_moderation.cc +@@ -117,7 +117,7 @@ void test_uct_cq_moderation::run_test(uct_iface_h iface) { + check_caps(UCT_IFACE_FLAG_EVENT_SEND_COMP); + check_caps(UCT_IFACE_FLAG_EVENT_RECV); + +- uct_iface_set_am_handler(m_receiver->iface(), 0, am_cb, this, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_receiver->iface(), 0, am_cb, this, 0); + + connect(); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_dc.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_dc.cc +index 442c59330..cb105dafd 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_dc.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_dc.cc +@@ -22,7 +22,7 @@ extern "C" { + _UCT_INSTANTIATE_TEST_CASE(_test_case, dc_mlx5) + + +-class test_dc : public uct_test { ++class test_dc : public test_rc { + public: + virtual void init() { + uct_test::init(); +@@ -33,10 +33,8 @@ public: + m_e2 = uct_test::create_entity(0); + m_entities.push_back(m_e2); + +- uct_iface_set_am_handler(m_e1->iface(), 0, am_dummy_handler, +- NULL, UCT_CB_FLAG_SYNC); +- uct_iface_set_am_handler(m_e2->iface(), 0, am_dummy_handler, +- NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e1->iface(), 0, am_dummy_handler, NULL, 0); ++ uct_iface_set_am_handler(m_e2->iface(), 0, am_dummy_handler, NULL, 0); + } + + static uct_dc_iface_t* dc_iface(entity *e) { +@@ -73,7 +71,6 @@ public: + } + + protected: +- entity *m_e1, *m_e2; + + struct dcs_comp { + uct_completion_t uct_comp; +@@ -85,7 +82,7 @@ protected: + struct dcs_comp *comp = (struct dcs_comp *)uct_comp; + uct_dc_ep_t *ep; + +- ASSERT_UCS_OK(status); ++ EXPECT_UCS_OK(status); + + ep = dc_ep(comp->e, 0); + /* dci must be released before completion cb is called */ +@@ -304,9 +301,9 @@ UCS_TEST_P(test_dc, dcs_ep_flush_pending) { + preq.is_done = 0; + preq.e = m_e1; + preq.uct_req.func = uct_pending_flush; +- status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req); ++ status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req, 0); + EXPECT_UCS_OK(status); +- ++ + /* progress till ep is flushed */ + do { + progress(); +@@ -319,6 +316,48 @@ UCS_TEST_P(test_dc, dcs_ep_flush_pending) { + EXPECT_EQ(0, iface->tx.stack_top); + } + ++/* Check that the following sequnce works ok: ++ * - Add some pending request to DCI wait queue ++ * - Try to send something from this ep. This will force ep to take free DCI ++ * (the send will not succeed anyway) ++ * - Progress all pendings ++ * - Make sure that there is no any assertion and everyting is ok ++ * (just send something). ++ * */ ++UCS_TEST_P(test_dc, dcs_ep_am_pending) { ++ ++ ucs_status_t status; ++ uct_dc_iface_t *iface; ++ ++ m_e1->connect_to_iface(0, *m_e2); ++ m_e1->connect_to_iface(1, *m_e2); ++ ++ /* use all iface resources */ ++ iface = dc_iface(m_e1); ++ iface->super.tx.cq_available = 8; ++ do { ++ status = uct_ep_am_short(m_e1->ep(1), 0, 0, NULL, 0); ++ } while (status == UCS_OK); ++ ++ EXPECT_EQ(UCS_ERR_NO_RESOURCE, status); ++ ++ /* put AM op on pending */ ++ preq.e = m_e1; ++ preq.uct_req.func = uct_pending_flush; ++ status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req, 0); ++ EXPECT_UCS_OK(status); ++ ++ status = uct_ep_am_short(m_e1->ep(0), 0, 0, NULL, 0); ++ EXPECT_EQ(UCS_ERR_NO_RESOURCE, status); ++ ++ flush(); ++ ++ status = uct_ep_am_short(m_e1->ep(0), 0, 0, NULL, 0); ++ EXPECT_EQ(UCS_OK, status); ++ ++ flush(); ++} ++ + /* check that ep does not hold dci after + * purge + */ +@@ -350,7 +389,7 @@ UCS_TEST_P(test_dc, dcs_ep_purge_pending) { + preq.is_done = 0; + preq.e = m_e1; + preq.uct_req.func = uct_pending_dummy; +- status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req); ++ status = uct_ep_pending_add(m_e1->ep(0), &preq.uct_req, 0); + EXPECT_UCS_OK(status); + + do { +@@ -364,6 +403,10 @@ UCS_TEST_P(test_dc, dcs_ep_purge_pending) { + EXPECT_EQ(0, iface->tx.stack_top); + } + ++UCS_TEST_P(test_dc, stress_iface_ops) { ++ test_iface_ops(); ++} ++ + UCT_DC_INSTANTIATE_TEST_CASE(test_dc) + + +@@ -418,7 +461,7 @@ UCS_TEST_P(test_dc_flow_control, fc_disabled_pending_no_dci) { + get_fc_ptr(m_e1, ep_index)->fc_wnd = 0; + + /* Add to pending */ +- status = uct_ep_pending_add(m_e1->ep(ep_index), &pending_req.uct); ++ status = uct_ep_pending_add(m_e1->ep(ep_index), &pending_req.uct, 0); + ASSERT_UCS_OK(status); + + wait_for_flag(&pending_req.cb_count); +@@ -448,10 +491,13 @@ UCS_TEST_P(test_dc_flow_control, soft_request) + EXPECT_EQ(get_fc_ptr(m_e1)->fc_wnd, s_thresh - 1); + } + +-/* Check that flush returns UCS_OK even if there is an outgoing grant request */ ++/* Check that: ++ * 1) flush returns UCS_OK even if there is an outgoing grant request ++ * 2) No crash when grant for destroyed ep arrives */ + UCS_TEST_P(test_dc_flow_control, flush_destroy) + { + int wnd = 5; ++ ucs_status_t status; + + disable_entity(m_e2); + +@@ -461,11 +507,24 @@ UCS_TEST_P(test_dc_flow_control, flush_destroy) + + send_am_and_flush(m_e1, wnd); + +- EXPECT_UCS_OK(uct_ep_flush(m_e1->ep(0), 0, NULL)); ++ /* At this point m_e1 sent grant request to m_e2, m_e2 received all ++ * messages and added grant to m_e1 to pending queue ++ * (because it does not have tx resources yet) */ ++ ++ /* Invoke flush in a loop, because some send completions may not be polled yet */ ++ ucs_time_t timeout = ucs_get_time() + ucs_time_from_sec(DEFAULT_TIMEOUT_SEC); ++ do { ++ short_progress_loop(); ++ status = uct_ep_flush(m_e1->ep(0), 0, NULL); ++ } while (((status == UCS_ERR_NO_RESOURCE) || (status == UCS_INPROGRESS)) && ++ (ucs_get_time() < timeout)); ++ ASSERT_UCS_OK(status); ++ + m_e1->destroy_eps(); + +- /* Enable send capabilities of m_e2 and send AM message +- * to force pending queue dispatch */ ++ /* Enable send capabilities of m_e2 and send AM message to force pending queue ++ * dispatch. Thus, pending grant will be sent to m_e1. There should not be ++ * any warning/error and/or crash. */ + enable_entity(m_e2); + set_tx_moderation(m_e2, 0); + send_am_and_flush(m_e2, 1); +@@ -486,7 +545,7 @@ UCS_TEST_P(test_dc_flow_control, dci_leak) + uct_pending_req_t req; + req.func = reinterpret_cast + (ucs_empty_function_return_no_resource); +- EXPECT_UCS_OK(uct_ep_pending_add(m_e1->ep(0), &req)); ++ EXPECT_UCS_OK(uct_ep_pending_add(m_e1->ep(0), &req, 0)); + + /* Make sure that ep does not hold dci when sends completed */ + uct_dc_iface_t *iface = ucs_derived_of(m_e1->iface(), uct_dc_iface_t); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib.cc +index f2df45f49..7066a7444 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib.cc +@@ -13,6 +13,7 @@ extern "C" { + #include + #include + #include ++#include + } + + +@@ -80,18 +81,35 @@ public: + } + + #if HAVE_DECL_IBV_LINK_LAYER_ETHERNET +- void test_eth_port(struct ibv_port_attr port_attr, struct ibv_context *ibctx, +- unsigned port_num, uct_ib_iface_config_t *ib_config, ++ void test_eth_port(struct ibv_device *device, struct ibv_port_attr port_attr, ++ struct ibv_context *ibctx, unsigned port_num, + ib_port_desc_t *port_desc) { + + union ibv_gid gid; ++ uct_ib_md_config_t *md_config = ucs_derived_of(m_md_config, uct_ib_md_config_t); ++ char md_name[UCT_MD_NAME_MAX]; ++ uct_md_h uct_md; ++ uct_ib_md_t *ib_md; ++ ucs_status_t status; ++ uint8_t gid_index; + + /* no pkeys for Ethernet */ + port_desc->have_pkey = 0; + ++ uct_ib_make_md_name(md_name, device); ++ ++ status = uct_ib_md_open(md_name, m_md_config, &uct_md); ++ ASSERT_UCS_OK(status); ++ ++ ib_md = ucs_derived_of(uct_md, uct_ib_md_t); ++ status = uct_ib_device_select_gid_index(&ib_md->dev, ++ port_num, md_config->ext.gid_index, ++ &gid_index); ++ ASSERT_UCS_OK(status); ++ + /* check the gid index */ +- if (ibv_query_gid(ibctx, port_num, ib_config->gid_index, &gid) != 0) { +- UCS_TEST_ABORT("Failed to query gid (index=" << ib_config->gid_index << ")"); ++ if (ibv_query_gid(ibctx, port_num, gid_index, &gid) != 0) { ++ UCS_TEST_ABORT("Failed to query gid (index=" << gid_index << ")"); + } + if (uct_ib_device_is_gid_raw_empty(gid.raw)) { + port_desc->have_valid_gid_idx = 0; +@@ -99,6 +117,7 @@ public: + port_desc->have_valid_gid_idx = 1; + } + ++ uct_ib_md_close(uct_md); + } + #endif + +@@ -113,7 +132,6 @@ public: + struct ibv_device **device_list; + struct ibv_context *ibctx = NULL; + struct ibv_port_attr port_attr; +- uct_ib_iface_config_t *ib_config = ucs_derived_of(m_iface_config, uct_ib_iface_config_t); + int num_devices, i, found = 0; + + /* get device list */ +@@ -147,7 +165,7 @@ public: + lmc_find(port_attr, port_desc); + + if (IBV_PORT_IS_LINK_LAYER_ETHERNET(&port_attr)) { +- test_eth_port(port_attr, ibctx, port_num, ib_config, port_desc); ++ test_eth_port(device_list[i], port_attr, ibctx, port_num, port_desc); + goto out; + } + +@@ -179,25 +197,28 @@ out: + free(dev_name); + } + +- void test_address_pack(uct_ib_address_type_t scope, uint64_t subnet_prefix) { ++ void test_address_pack(uint64_t subnet_prefix) { ++ uct_ib_iface_t *iface = ucs_derived_of(m_e1->iface(), uct_ib_iface_t); + static const uint16_t lid_in = 0x1ee7; + union ibv_gid gid_in, gid_out; + uct_ib_address_t *ib_addr; + uint16_t lid_out; +- uint8_t is_global; + +- ib_addr = (uct_ib_address_t*)malloc(uct_ib_address_size(scope)); ++ ib_addr = (uct_ib_address_t*)malloc(uct_ib_address_size(iface)); + + gid_in.global.subnet_prefix = subnet_prefix; + gid_in.global.interface_id = 0xdeadbeef; +- uct_ib_address_pack(ib_device(m_e1), scope, &gid_in, lid_in, ib_addr); ++ uct_ib_address_pack(iface, &gid_in, lid_in, ib_addr); + +- uct_ib_address_unpack(ib_addr, &lid_out, &is_global, &gid_out); ++ uct_ib_address_unpack(ib_addr, &lid_out, &gid_out); + +- EXPECT_EQ((scope != UCT_IB_ADDRESS_TYPE_LINK_LOCAL), is_global); +- EXPECT_EQ(lid_in, lid_out); ++ if (IBV_PORT_IS_LINK_LAYER_ETHERNET(uct_ib_iface_port_attr(iface))) { ++ EXPECT_TRUE(iface->is_global_addr); ++ } else { ++ EXPECT_EQ(lid_in, lid_out); ++ } + +- if (is_global) { ++ if (iface->is_global_addr) { + EXPECT_EQ(gid_in.global.subnet_prefix, gid_out.global.subnet_prefix); + EXPECT_EQ(gid_in.global.interface_id, gid_out.global.interface_id); + } +@@ -217,7 +238,7 @@ out: + recv_buffer->length = 0; /* Initialize length to 0 */ + + /* set a callback for the uct to invoke for receiving the data */ +- uct_iface_set_am_handler(m_e2->iface(), 0, ib_am_handler , recv_buffer, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e2->iface(), 0, ib_am_handler , recv_buffer, 0); + + /* send the data */ + uct_ep_am_short(m_e1->ep(0), 0, test_ib_hdr, &send_data, sizeof(send_data)); +@@ -281,7 +302,7 @@ UCS_TEST_P(test_uct_ib, non_default_lmc, "IB_LID_PATH_BITS=1") + } + + #if HAVE_DECL_IBV_LINK_LAYER_ETHERNET +-UCS_TEST_P(test_uct_ib, non_default_gid_idx, "IB_GID_INDEX=1") ++UCS_TEST_P(test_uct_ib, non_default_gid_idx, "GID_INDEX=1") + { + ib_port_desc_t *port_desc; + +@@ -303,9 +324,9 @@ UCS_TEST_P(test_uct_ib, non_default_gid_idx, "IB_GID_INDEX=1") + + UCS_TEST_P(test_uct_ib, address_pack) { + initialize(); +- test_address_pack(UCT_IB_ADDRESS_TYPE_LINK_LOCAL, UCT_IB_LINK_LOCAL_PREFIX); +- test_address_pack(UCT_IB_ADDRESS_TYPE_SITE_LOCAL, UCT_IB_SITE_LOCAL_PREFIX | htobe64(0x7200)); +- test_address_pack(UCT_IB_ADDRESS_TYPE_GLOBAL, 0xdeadfeedbeefa880ul); ++ test_address_pack(UCT_IB_LINK_LOCAL_PREFIX); ++ test_address_pack(UCT_IB_SITE_LOCAL_PREFIX | htobe64(0x7200)); ++ test_address_pack(0xdeadfeedbeefa880ul); + } + + +@@ -344,7 +365,7 @@ public: + + /* set a callback for the uct to invoke for receiving the data */ + uct_iface_set_am_handler(m_e1->iface(), 0, ib_am_handler, m_buf1->ptr(), +- UCT_CB_FLAG_SYNC); ++ 0); + + test_uct_event_ib::bcopy_pack_count = 0; + } +@@ -377,12 +398,12 @@ public: + + void check_send_cq(uct_iface_t *iface, size_t val) { + uct_ib_iface_t *ib_iface = ucs_derived_of(iface, uct_ib_iface_t); +- struct ibv_cq *send_cq = ib_iface->send_cq; ++ struct ibv_cq *send_cq = ib_iface->cq[UCT_IB_DIR_TX]; + + if (val != send_cq->comp_events_completed) { + uint32_t completed_evt = send_cq->comp_events_completed; + /* need this call to acknowledge the completion to prevent iface dtor hung*/ +- ibv_ack_cq_events(ib_iface->send_cq, 1); ++ ibv_ack_cq_events(ib_iface->cq[UCT_IB_DIR_TX], 1); + UCS_TEST_ABORT("send_cq->comp_events_completed have to be 1 but the value " + << completed_evt); + } +@@ -390,12 +411,12 @@ public: + + void check_recv_cq(uct_iface_t *iface, size_t val) { + uct_ib_iface_t *ib_iface = ucs_derived_of(iface, uct_ib_iface_t); +- struct ibv_cq *recv_cq = ib_iface->recv_cq; ++ struct ibv_cq *recv_cq = ib_iface->cq[UCT_IB_DIR_RX]; + + if (val != recv_cq->comp_events_completed) { + uint32_t completed_evt = recv_cq->comp_events_completed; + /* need this call to acknowledge the completion to prevent iface dtor hung*/ +- ibv_ack_cq_events(ib_iface->recv_cq, 1); ++ ibv_ack_cq_events(ib_iface->cq[UCT_IB_DIR_RX], 1); + UCS_TEST_ABORT("recv_cq->comp_events_completed have to be 1 but the value " + << completed_evt); + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_md.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_md.cc +index 901443f68..6a8105c24 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_md.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_md.cc +@@ -5,18 +5,20 @@ + * See file LICENSE for terms. + */ + +-extern "C" { + #include + #include + #include +-} ++ + #include + #include + + class test_ib_md : public test_md + { + protected: +- void ib_md_umr_check(void *rkey_buffer, bool amo_access); ++ void ib_md_umr_check(void *rkey_buffer, ++ bool amo_access, ++ size_t size = 8192); ++ bool has_ksm() const; + }; + + +@@ -25,15 +27,29 @@ protected: + * UCT_MD_MEM_ACCESS_REMOTE_ATOMIC is not set + */ + +-void test_ib_md::ib_md_umr_check(void *rkey_buffer, bool amo_access) { +- ++void test_ib_md::ib_md_umr_check(void *rkey_buffer, ++ bool amo_access, ++ size_t size) ++{ + ucs_status_t status; +- size_t size = 8192; +- void *buffer = malloc(size); +- ASSERT_TRUE(buffer != NULL); ++ size_t alloc_size; ++ void *buffer; ++ ++ if (ucs_get_phys_mem_size() < size * 8) { ++ UCS_TEST_SKIP_R("not enough physical memory"); ++ } ++ if (ucs_get_memfree_size() < size * 4) { ++ UCS_TEST_SKIP_R("not enough free memory"); ++ } ++ ++ buffer = NULL; ++ alloc_size = size; ++ status = ucs_mmap_alloc(&alloc_size, &buffer, 0 ++ UCS_MEMTRACK_NAME("test_umr")); ++ ASSERT_UCS_OK(status); + + uct_mem_h memh; +- status = uct_md_mem_reg(pd(), buffer, size, ++ status = uct_md_mem_reg(md(), buffer, size, + amo_access ? UCT_MD_MEM_ACCESS_REMOTE_ATOMIC : + UCT_MD_MEM_ACCESS_RMA, + &memh); +@@ -41,7 +57,7 @@ void test_ib_md::ib_md_umr_check(void *rkey_buffer, bool amo_access) { + ASSERT_TRUE(memh != UCT_MEM_HANDLE_NULL); + + uct_ib_mem_t *ib_memh = (uct_ib_mem_t *)memh; +- uct_ib_md_t *ib_md = (uct_ib_md_t *)pd(); ++ uct_ib_md_t *ib_md = (uct_ib_md_t *)md(); + + if (amo_access) { + EXPECT_TRUE(ib_memh->flags & UCT_IB_MEM_ACCESS_REMOTE_ATOMIC); +@@ -51,7 +67,7 @@ void test_ib_md::ib_md_umr_check(void *rkey_buffer, bool amo_access) { + EXPECT_FALSE(ib_memh->flags & UCT_IB_MEM_FLAG_ATOMIC_MR); + } + +- status = uct_md_mkey_pack(pd(), memh, rkey_buffer); ++ status = uct_md_mkey_pack(md(), memh, rkey_buffer); + EXPECT_UCS_OK(status); + + if (amo_access) { +@@ -67,50 +83,56 @@ void test_ib_md::ib_md_umr_check(void *rkey_buffer, bool amo_access) { + EXPECT_TRUE(ib_memh->atomic_mr == NULL); + } + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + EXPECT_UCS_OK(status); +- free(buffer); +-} + +-UCS_TEST_P(test_ib_md, ib_md_umr_rcache, "REG_METHODS=rcache") { ++ ucs_mmap_free(buffer, alloc_size); ++} + +- ucs_status_t status; +- uct_md_attr_t md_attr; +- void *rkey_buffer; ++bool test_ib_md::has_ksm() const { ++#ifdef HAVE_EXP_UMR_KSM ++ return ucs_derived_of(md(), uct_ib_md_t)->dev.dev_attr.exp_device_cap_flags & ++ IBV_EXP_DEVICE_UMR_FIXED_SIZE; ++#else ++ return false; ++#endif ++} + +- status = uct_md_query(pd(), &md_attr); +- ASSERT_UCS_OK(status); +- rkey_buffer = malloc(md_attr.rkey_packed_size); +- ASSERT_TRUE(rkey_buffer != NULL); ++UCS_TEST_P(test_ib_md, ib_md_umr_rcache, "REG_METHODS=rcache") { ++ std::string rkey_buffer(md_attr().rkey_packed_size, '\0'); + + /* The order is important here because + * of registration cache. A cached region will + * be promoted to atomic access but it will never be demoted + */ +- ib_md_umr_check(rkey_buffer, false); +- ib_md_umr_check(rkey_buffer, true); +- +- free(rkey_buffer); ++ ib_md_umr_check(&rkey_buffer[0], false); ++ ib_md_umr_check(&rkey_buffer[0], true); + } + + UCS_TEST_P(test_ib_md, ib_md_umr_direct, "REG_METHODS=direct") { ++ std::string rkey_buffer(md_attr().rkey_packed_size, '\0'); + +- ucs_status_t status; +- uct_md_attr_t md_attr; +- void *rkey_buffer; ++ /* without rcache the order is not really important */ ++ ib_md_umr_check(&rkey_buffer[0], true); ++ ib_md_umr_check(&rkey_buffer[0], false); ++ ib_md_umr_check(&rkey_buffer[0], true); ++ ib_md_umr_check(&rkey_buffer[0], false); ++} + +- status = uct_md_query(pd(), &md_attr); +- ASSERT_UCS_OK(status); +- rkey_buffer = malloc(md_attr.rkey_packed_size); +- ASSERT_TRUE(rkey_buffer != NULL); ++UCS_TEST_P(test_ib_md, ib_md_umr_ksm) { ++ std::string rkey_buffer(md_attr().rkey_packed_size, '\0'); ++ ib_md_umr_check(&rkey_buffer[0], has_ksm(), UCT_IB_MD_MAX_MR_SIZE + 0x1000); ++} + +- /* without rcache the order is not really important */ +- ib_md_umr_check(rkey_buffer, true); +- ib_md_umr_check(rkey_buffer, false); +- ib_md_umr_check(rkey_buffer, true); +- ib_md_umr_check(rkey_buffer, false); ++#if HAVE_UMR_KSM ++UCS_TEST_P(test_ib_md, umr_noninline_klm, "MAX_INLINE_KLM_LIST=1") { + +- free(rkey_buffer); ++ /* KLM list size would be 2, and setting MAX_INLINE_KLM_LIST=1 would force ++ * using non-inline UMR post_send. ++ */ ++ std::string rkey_buffer(md_attr().rkey_packed_size, '\0'); ++ ib_md_umr_check(&rkey_buffer[0], has_ksm(), UCT_IB_MD_MAX_MR_SIZE + 0x1000); + } ++#endif + + _UCT_MD_INSTANTIATE_TEST_CASE(test_ib_md, ib) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_xfer.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_xfer.cc +index 510094e64..c592b87a8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_xfer.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ib_xfer.cc +@@ -72,7 +72,7 @@ UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_rma_test_alloc_methods) + class uct_p2p_mix_test_alloc_methods : public uct_p2p_mix_test {}; + + UCS_TEST_P(uct_p2p_mix_test_alloc_methods, mix1000_odp, +- "REG_METHODS=odp,direct") ++ "REG_METHODS=odp,direct", "DM_COUNT?=0") + { + run(1000); + } +@@ -85,3 +85,14 @@ UCS_TEST_P(uct_p2p_mix_test_alloc_methods, mix1000_rcache, + + UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_mix_test_alloc_methods) + ++ ++class uct_p2p_mix_test_indirect_atomic : public uct_p2p_mix_test {}; ++ ++UCS_TEST_P(uct_p2p_mix_test_indirect_atomic, mix1000_indirect_atomic, ++ "INDIRECT_ATOMIC=n") ++{ ++ run(1000); ++} ++ ++UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_mix_test_indirect_atomic) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.cc +index 552dcfb9e..8b336e720 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.cc +@@ -31,12 +31,59 @@ void test_rc::connect() + m_e1->connect(0, *m_e2, 0); + m_e2->connect(0, *m_e1, 0); + +- uct_iface_set_am_handler(m_e1->iface(), 0, am_dummy_handler, +- NULL, UCT_CB_FLAG_SYNC); +- uct_iface_set_am_handler(m_e2->iface(), 0, am_dummy_handler, +- NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e1->iface(), 0, am_dummy_handler, NULL, 0); ++ uct_iface_set_am_handler(m_e2->iface(), 0, am_dummy_handler, NULL, 0); + } + ++// Check that iface tx ops buffer and flush comp memory pool are moderated ++// properly when we have communication ops + lots of flushes ++void test_rc::test_iface_ops() ++{ ++ check_caps(UCT_IFACE_FLAG_PUT_ZCOPY); ++ int cq_len = 16; ++ ++ if (UCS_OK != uct_config_modify(m_iface_config, "RC_TX_CQ_LEN", ++ ucs::to_string(cq_len).c_str())) { ++ UCS_TEST_ABORT("Error: cannot enable random DCI policy"); ++ } ++ ++ entity *e = uct_test::create_entity(0); ++ m_entities.push_back(e); ++ e->connect(0, *m_e2, 0); ++ ++ mapped_buffer sendbuf(1024, 0ul, *e); ++ mapped_buffer recvbuf(1024, 0ul, *m_e2); ++ uct_completion_t comp; ++ comp.count = cq_len * 512; // some big value to avoid func invocation ++ comp.func = NULL; ++ ++ UCS_TEST_GET_BUFFER_IOV(iov, iovcnt, sendbuf.ptr(), sendbuf.length(), ++ sendbuf.memh(), ++ m_e1->iface_attr().cap.am.max_iov); ++ // For _x transports several CQEs can be consumed per WQE, post less put zcopy ++ // ops, so that flush would be sucessfull (otherwise flush will return ++ // NO_RESOURCES and completion will not be added for it). ++ for (int i = 0; i < cq_len / 3; i++) { ++ ASSERT_UCS_OK_OR_INPROGRESS(uct_ep_put_zcopy(e->ep(0), iov, iovcnt, ++ recvbuf.addr(), ++ recvbuf.rkey(), &comp)); ++ ++ // Create some stress on iface (flush mp): ++ // post 10 flushes per every put. ++ for (int j = 0; j < 10; j++) { ++ ASSERT_UCS_OK_OR_INPROGRESS(uct_ep_flush(e->ep(0), 0, &comp)); ++ } ++ } ++ ++ flush(); ++} ++ ++UCS_TEST_P(test_rc, stress_iface_ops) { ++ test_iface_ops(); ++} ++ ++UCT_RC_INSTANTIATE_TEST_CASE(test_rc) ++ + + class test_rc_max_wr : public test_rc { + protected: +@@ -80,10 +127,8 @@ void test_rc_flow_control::init() + ucs_assert(rc_iface(m_e1)->config.fc_enabled); + ucs_assert(rc_iface(m_e2)->config.fc_enabled); + +- uct_iface_set_am_handler(m_e1->iface(), FLUSH_AM_ID, am_handler, +- NULL, UCT_CB_FLAG_SYNC); +- uct_iface_set_am_handler(m_e2->iface(), FLUSH_AM_ID, am_handler, +- NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e1->iface(), FLUSH_AM_ID, am_handler, NULL, 0); ++ uct_iface_set_am_handler(m_e2->iface(), FLUSH_AM_ID, am_handler, NULL, 0); + + } + +@@ -192,7 +237,7 @@ void test_rc_flow_control::test_pending_purge(int wnd, int num_pend_sends) + for (int i = 0; i < num_pend_sends; i++) { + reqs[i].uct.func = NULL; /* make valgrind happy */ + reqs[i].purge_count = 0; +- EXPECT_EQ(uct_ep_pending_add(m_e2->ep(0), &reqs[i].uct), UCS_OK); ++ EXPECT_EQ(uct_ep_pending_add(m_e2->ep(0), &reqs[i].uct, 0), UCS_OK); + } + uct_ep_pending_purge(m_e2->ep(0), purge_cb, NULL); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.h +index d4437035f..c5cd27174 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_rc.h +@@ -41,6 +41,8 @@ public: + uct_test::short_progress_loop(delta_ms); + } + ++ void test_iface_ops(); ++ + static ucs_status_t am_dummy_handler(void *arg, void *data, size_t length, + unsigned flags) { + return UCS_OK; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_sockaddr.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_sockaddr.cc +index f01528778..3470fd678 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_sockaddr.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_sockaddr.cc +@@ -13,41 +13,71 @@ extern "C" { + #include + } + ++#include ++ + class test_uct_sockaddr : public uct_test { + public: ++ struct completion : public uct_completion_t { ++ volatile bool m_flag; ++ ++ completion() : m_flag(false), m_status(UCS_INPROGRESS) { ++ count = 1; ++ func = completion_cb; ++ } ++ ++ ucs_status_t status() const { ++ return m_status; ++ } ++ private: ++ static void completion_cb(uct_completion_t *self, ucs_status_t status) ++ { ++ completion *c = static_cast(self); ++ c->m_status = status; ++ c->m_flag = true; ++ } ++ ++ ucs_status_t m_status; ++ }; ++ ++ test_uct_sockaddr() : server(NULL), client(NULL), err_count(0), ++ server_recv_req(0), delay_conn_reply(false) { ++ memset(&listen_sock_addr, 0, sizeof(listen_sock_addr)); ++ memset(&connect_sock_addr, 0, sizeof(connect_sock_addr)); ++ } ++ + void init() { + uct_test::init(); + + uct_iface_params server_params, client_params; +- struct sockaddr_in *addr_in; ++ struct sockaddr_in *listen_addr_in, *connect_addr_in; + + /* If we reached here, the interface is active, as it was tested at the + * resource creation */ +- if (!ucs::is_inet_addr((struct sockaddr *)&(GetParam()->if_addr))) { ++ if (!ucs::is_inet_addr((struct sockaddr *)&(GetParam()->connect_if_addr))) { + UCS_TEST_SKIP_R("There is no IP on the interface"); + } + +- /* If rdmacm is tested, make sure that this is an IPoIB or RoCE interface */ +- if (!strcmp(GetParam()->md_name.c_str(), "rdmacm") && +- (!ucs::is_ib_netdev(GetParam()->dev_name.c_str()))) { +- UCS_TEST_SKIP_R("rdmacm - not an IPoIB or RoCE interface"); +- } +- + /* This address is accessible, as it was tested at the resource creation */ +- sock_addr.addr = (struct sockaddr *)&(GetParam()->if_addr); +- ASSERT_TRUE(sock_addr.addr != NULL); ++ listen_sock_addr.addr = (struct sockaddr *)&(GetParam()->listen_if_addr); ++ ASSERT_TRUE(listen_sock_addr.addr != NULL); + +- addr_in = (struct sockaddr_in *) (sock_addr.addr); ++ listen_addr_in = (struct sockaddr_in *) (listen_sock_addr.addr); + + /* Get a usable port on the host */ +- addr_in->sin_port = ucs::get_port(); ++ listen_addr_in->sin_port = ucs::get_port(); ++ ++ connect_sock_addr.addr = (struct sockaddr *)&(GetParam()->connect_if_addr); ++ ASSERT_TRUE(connect_sock_addr.addr != NULL); ++ connect_addr_in = (struct sockaddr_in *)connect_sock_addr.addr; ++ connect_addr_in->sin_port = listen_addr_in->sin_port; + + /* open iface for the server side */ + memset(&server_params, 0, sizeof(server_params)); + server_params.open_mode = UCT_IFACE_OPEN_MODE_SOCKADDR_SERVER; + server_params.err_handler = err_handler; + server_params.err_handler_arg = reinterpret_cast(this); +- server_params.mode.sockaddr.listen_sockaddr = sock_addr; ++ server_params.err_handler_flags = 0; ++ server_params.mode.sockaddr.listen_sockaddr = listen_sock_addr; + server_params.mode.sockaddr.cb_flags = UCT_CB_FLAG_ASYNC; + server_params.mode.sockaddr.conn_request_cb = conn_request_cb; + server_params.mode.sockaddr.conn_request_arg = reinterpret_cast(this); +@@ -60,13 +90,18 @@ public: + client_params.open_mode = UCT_IFACE_OPEN_MODE_SOCKADDR_CLIENT; + client_params.err_handler = err_handler; + client_params.err_handler_arg = reinterpret_cast(this); ++ client_params.err_handler_flags = 0; + + client = uct_test::create_entity(client_params); + m_entities.push_back(client); ++ ++ /* initiate the client's private data callback argument */ ++ client->client_cb_arg = server->iface_attr().max_conn_priv; + } + +- static ucs_status_t conn_request_cb(void *arg, const void *conn_priv_data, +- size_t length) ++ static void conn_request_cb(uct_iface_h iface, void *arg, ++ uct_conn_request_h conn_request, ++ const void *conn_priv_data, size_t length) + { + test_uct_sockaddr *self = reinterpret_cast(arg); + +@@ -74,9 +109,13 @@ public: + (uct_test::entity::client_priv_data.c_str())), + std::string(reinterpret_cast(conn_priv_data))); + +- EXPECT_EQ(uct_test::entity::client_priv_data.length(), length); ++ EXPECT_EQ(1 + uct_test::entity::client_priv_data.length(), length); ++ if (self->delay_conn_reply) { ++ self->delayed_conn_reqs.push(conn_request); ++ } else { ++ uct_iface_accept(iface, conn_request); ++ } + self->server_recv_req++; +- return UCS_OK; + } + + static ucs_status_t err_handler(void *arg, uct_ep_h ep, ucs_status_t status) +@@ -88,21 +127,22 @@ public: + + protected: + entity *server, *client; +- ucs_sock_addr_t sock_addr; ++ ucs_sock_addr_t listen_sock_addr, connect_sock_addr; + volatile int err_count, server_recv_req; ++ std::queue delayed_conn_reqs; ++ bool delay_conn_reply; + }; + + UCS_TEST_P(test_uct_sockaddr, connect_client_to_server) + { +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + +- server_recv_req = 0; +- err_count = 0; +- client->connect(0, *server, 0); ++ client->connect(0, *server, 0, &connect_sock_addr); + + /* wait for the server to connect */ + while (server_recv_req == 0) { +- sched_yield(); ++ progress(); + } + ASSERT_TRUE(server_recv_req == 1); + /* since the transport may support a graceful exit in case of an error, +@@ -115,11 +155,64 @@ UCS_TEST_P(test_uct_sockaddr, connect_client_to_server) + * test ends and the client's ep was destroyed */ + } + ++UCS_TEST_P(test_uct_sockaddr, connect_client_to_server_with_delay) ++{ ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); ++ delay_conn_reply = true; ++ client->connect(0, *server, 0, &connect_sock_addr); ++ ++ /* wait for the server to connect */ ++ while (server_recv_req == 0) { ++ progress(); ++ } ++ ASSERT_EQ(1, server_recv_req); ++ ASSERT_EQ(1ul, delayed_conn_reqs.size()); ++ EXPECT_EQ(0, err_count); ++ while (!delayed_conn_reqs.empty()) { ++ uct_iface_accept(server->iface(), delayed_conn_reqs.front()); ++ delayed_conn_reqs.pop(); ++ } ++ ++ completion comp; ++ ucs_status_t status = uct_ep_flush(client->ep(0), 0, &comp); ++ if (status == UCS_INPROGRESS) { ++ wait_for_flag(&comp.m_flag); ++ EXPECT_EQ(UCS_OK, comp.status()); ++ } else { ++ EXPECT_EQ(UCS_OK, status); ++ } ++ EXPECT_EQ(0, err_count); ++} ++ ++UCS_TEST_P(test_uct_sockaddr, connect_client_to_server_reject_with_delay) ++{ ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); ++ delay_conn_reply = true; ++ client->connect(0, *server, 0, &connect_sock_addr); ++ ++ /* wait for the server to connect */ ++ while (server_recv_req == 0) { ++ progress(); ++ } ++ ASSERT_EQ(1, server_recv_req); ++ ASSERT_EQ(1ul, delayed_conn_reqs.size()); ++ EXPECT_EQ(0, err_count); ++ while (!delayed_conn_reqs.empty()) { ++ uct_iface_reject(server->iface(), delayed_conn_reqs.front()); ++ delayed_conn_reqs.pop(); ++ } ++ while (err_count == 0) { ++ progress(); ++ } ++ EXPECT_EQ(1, err_count); ++} ++ + UCS_TEST_P(test_uct_sockaddr, many_clients_to_one_server) + { +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); +- server_recv_req = 0; +- err_count = 0; ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + + uct_iface_params client_params; + entity *client_test; +@@ -129,18 +222,20 @@ UCS_TEST_P(test_uct_sockaddr, many_clients_to_one_server) + for (i = 0; i < num_clients; ++i) { + /* open iface for the client side */ + memset(&client_params, 0, sizeof(client_params)); +- client_params.open_mode = UCT_IFACE_OPEN_MODE_SOCKADDR_CLIENT; +- client_params.err_handler = err_handler; +- client_params.err_handler_arg = reinterpret_cast(this); ++ client_params.open_mode = UCT_IFACE_OPEN_MODE_SOCKADDR_CLIENT; ++ client_params.err_handler = err_handler; ++ client_params.err_handler_arg = reinterpret_cast(this); ++ client_params.err_handler_flags = 0; + + client_test = uct_test::create_entity(client_params); + m_entities.push_back(client_test); + +- client_test->connect(i, *server, 0); ++ client_test->client_cb_arg = server->iface_attr().max_conn_priv; ++ client_test->connect(i, *server, 0, &connect_sock_addr); + } + + while (server_recv_req < num_clients){ +- sched_yield(); ++ progress(); + } + ASSERT_TRUE(server_recv_req == num_clients); + EXPECT_EQ(0, err_count); +@@ -148,19 +243,18 @@ UCS_TEST_P(test_uct_sockaddr, many_clients_to_one_server) + + UCS_TEST_P(test_uct_sockaddr, many_conns_on_client) + { +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); +- server_recv_req = 0; +- err_count = 0; ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + + int i, num_conns_on_client = 100; + + /* multiple clients, on the same iface, connecting to the same server */ + for (i = 0; i < num_conns_on_client; ++i) { +- client->connect(i, *server, 0); ++ client->connect(i, *server, 0, &connect_sock_addr); + } + + while (server_recv_req < num_conns_on_client) { +- sched_yield(); ++ progress(); + } + ASSERT_TRUE(server_recv_req == num_conns_on_client); + EXPECT_EQ(0, err_count); +@@ -169,15 +263,13 @@ UCS_TEST_P(test_uct_sockaddr, many_conns_on_client) + UCS_TEST_P(test_uct_sockaddr, err_handle) + { + check_caps(UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE); +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); +- +- server_recv_req = 0; +- err_count = 0; ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + +- client->connect(0, *server, 0); ++ client->connect(0, *server, 0, &connect_sock_addr); + ++ scoped_log_handler slh(wrap_errors_logger); + /* kill the server */ +- wrap_errors(); + m_entities.remove(server); + + /* If the server didn't receive a connection request from the client yet, +@@ -186,35 +278,40 @@ UCS_TEST_P(test_uct_sockaddr, err_handle) + wait_for_flag(&err_count); + EXPECT_EQ(1, err_count); + } +- restore_errors(); + } + + UCS_TEST_P(test_uct_sockaddr, conn_to_non_exist_server) + { + check_caps(UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE); + +- struct sockaddr_in *addr_in; +- addr_in = (struct sockaddr_in *) (sock_addr.addr); +- in_port_t orig_port = addr_in->sin_port; ++ struct sockaddr_in *connect_addr_in; ++ connect_addr_in = (struct sockaddr_in *) (connect_sock_addr.addr); ++ in_port_t orig_port = connect_addr_in->sin_port; + +- addr_in->sin_port = 1; +- UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(sock_addr.addr); ++ connect_addr_in->sin_port = 1; ++ UCS_TEST_MESSAGE << "Testing " << ucs::sockaddr_to_str(listen_sock_addr.addr) ++ << " Interface: " << GetParam()->dev_name.c_str(); + + err_count = 0; + + /* wrap errors now since the client will try to connect to a non existing port */ +- wrap_errors(); +- /* client - try to connect to a non-existing port on the server side */ +- client->connect(0, *server, 0); +- +- /* destroy the client's ep. this ep shouldn't be accessed anymore */ +- client->destroy_ep(0); +- /* wait for the transport's events to arrive */ +- sleep(3); +- restore_errors(); +- ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ /* client - try to connect to a non-existing port on the server side */ ++ client->connect(0, *server, 0, &connect_sock_addr); ++ completion comp; ++ ucs_status_t status = uct_ep_flush(client->ep(0), 0, &comp); ++ if (status == UCS_INPROGRESS) { ++ wait_for_flag(&comp.m_flag); ++ EXPECT_EQ(UCS_ERR_UNREACHABLE, comp.status()); ++ } else { ++ EXPECT_EQ(UCS_ERR_UNREACHABLE, status); ++ } ++ /* destroy the client's ep. this ep shouldn't be accessed anymore */ ++ client->destroy_ep(0); ++ } + /* restore the previous existing port */ +- addr_in->sin_port = orig_port; ++ connect_addr_in->sin_port = orig_port; + } + + UCT_INSTANTIATE_SOCKADDR_TEST_CASE(test_uct_sockaddr) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud.cc +index 4841906b3..36a25cd64 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud.cc +@@ -434,13 +434,19 @@ UCS_TEST_P(test_ud, crep_ack_drop) { + NULL, UCT_CB_FLAG_ASYNC); + ASSERT_UCS_OK(status); + ++ /* allow sending the active message, in case the congestion window is ++ * already reduced to minimum (=2) by the slow timer, since CREP ACK ++ * was not received. ++ */ ++ set_tx_win(m_e1, 10); ++ + do { + status = uct_ep_am_short(m_e1->ep(0), 0, 0, NULL, 0); + progress(); + } while (status == UCS_ERR_NO_RESOURCE); + ASSERT_UCS_OK(status); + +- validate_recv(ep(m_e2), 3U); ++ validate_recv(ep(m_e2), 3u - no_creq_cnt(ep(m_e1))); + + ep(m_e1, 0)->rx.rx_hook = uct_ud_ep_null_hook; + ep(m_e2, 0)->rx.rx_hook = uct_ud_ep_null_hook; +@@ -543,6 +549,12 @@ UCS_TEST_P(test_ud, ca_md, "IB_TX_QUEUE_LEN=" UCS_PP_MAKE_STRING(UCT_UD_CA_MAX_W + ep(m_e2, 0)->rx.rx_hook = drop_rx; + for (i = 1; i < UCT_UD_CA_MAX_WINDOW; i++) { + status = tx(m_e1); ++ if (status == UCS_ERR_NO_RESOURCE) { ++ // the congestion window can shrink by async timer if ACKs are ++ // not received fast enough ++ EXPECT_GT(i, 1); /* at least one packet should be sent */ ++ break; ++ } + EXPECT_UCS_OK(status); + progress(); + } +@@ -590,7 +602,7 @@ UCS_TEST_P(test_ud, ca_resend) { + ack_req_tx_cnt = 0; + do { + progress(); +- } while(ep(m_e1)->ca.cwnd != max_window/2); ++ } while(ep(m_e1)->ca.cwnd > max_window/2); + /* expect that: + * 4 packets will be retransmitted + * first packet will have ack_req, +@@ -601,9 +613,9 @@ UCS_TEST_P(test_ud, ca_resend) { + disable_async(m_e1); + disable_async(m_e2); + short_progress_loop(100); +- EXPECT_LE(4, rx_drop_count); ++ EXPECT_LE(0, rx_drop_count); + EXPECT_GE(4+2, rx_drop_count); +- EXPECT_LE(2, ack_req_tx_cnt); ++ EXPECT_LE(0, ack_req_tx_cnt); + EXPECT_GE(2+2, ack_req_tx_cnt); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_ds.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_ds.cc +index a1d12359b..3c3cef254 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_ds.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_ds.cc +@@ -65,9 +65,8 @@ unsigned test_ud_ds::N = 1000; + UCS_TEST_P(test_ud_ds, if_addr) { + union ibv_gid gid1, gid2; + uint16_t lid1, lid2; +- uint8_t is_global; +- uct_ib_address_unpack(ib_adr1, &lid1, &is_global, &gid1); +- uct_ib_address_unpack(ib_adr2, &lid2, &is_global, &gid2); ++ uct_ib_address_unpack(ib_adr1, &lid1, &gid1); ++ uct_ib_address_unpack(ib_adr2, &lid2, &gid2); + EXPECT_EQ(lid1, lid2); + EXPECT_EQ(gid1.global.subnet_prefix, gid2.global.subnet_prefix); + EXPECT_EQ(gid1.global.interface_id, gid2.global.interface_id); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_pending.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_pending.cc +index 8e46398ca..10492d1e8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_pending.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_pending.cc +@@ -38,7 +38,7 @@ public: + /* queuee some work */ + for(i = 0; i < N; i++) { + m_r[i].func = pending_cb_dispatch; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &m_r[i])); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &m_r[i], 0)); + } + } + +@@ -102,7 +102,7 @@ UCS_TEST_P(test_ud_pending, async_progress) { + EXPECT_UCS_OK(tx(m_e1)); + + for(i = 0; i < N; i++) { +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i])); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i], 0)); + } + twait(300); + /* requests must not be dispatched from async progress */ +@@ -123,7 +123,7 @@ UCS_TEST_P(test_ud_pending, sync_progress) { + + for(i = 0; i < N; i++) { + r[i].func = pending_cb; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i])); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i], 0)); + } + wait_for_value(&req_count, N, true); + /* requests must be dispatched from progress */ +@@ -144,7 +144,7 @@ UCS_TEST_P(test_ud_pending, err_busy) { + + for(i = 0; i < N; i++) { + r[i].func = pending_cb_busy; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i])); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r[i], 0)); + } + short_progress_loop(); + /* requests will not be dispatched from progress */ +@@ -183,7 +183,7 @@ UCS_TEST_P(test_ud_pending, window) + } + EXPECT_EQ(UCS_ERR_NO_RESOURCE, tx(m_e1)); + r.func = pending_cb_dispatch; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r)); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r, 0)); + wait_for_value(&req_count, 1, true); + EXPECT_EQ(1, req_count); + uct_ep_pending_purge(m_e1->ep(0), purge_cb, NULL); +@@ -208,7 +208,7 @@ UCS_TEST_P(test_ud_pending, tx_wqe) + } while (status == UCS_OK); + + r.func = pending_cb_dispatch; +- EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r)); ++ EXPECT_EQ(UCS_OK, uct_ep_pending_add(m_e1->ep(0), &r, 0)); + wait_for_value(&req_count, 1, true); + EXPECT_EQ(1, req_count); + short_progress_loop(); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_slow_timer.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_slow_timer.cc +index bf29df44c..cf28a29ee 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_slow_timer.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/ib/test_ud_slow_timer.cc +@@ -11,6 +11,7 @@ + extern "C" { + #include + #include ++#include + #include + #include + } +@@ -35,7 +36,7 @@ public: + static ucs_status_t tick_counter(uct_ud_ep_t *ep, uct_ud_neth_t *neth) + { + uct_ud_iface_t *iface = ucs_derived_of(ep->super.super.iface, +- uct_ud_iface_t); ++ uct_ud_iface_t); + + /* hack to disable retransmit */ + ep->tx.send_time = ucs_twheel_get_time(&iface->async.slow_timer); +@@ -56,6 +57,18 @@ public: + usleep(1000); + } + } ++ ++ void wait_for_ep_destroyed(uct_ud_iface_t *iface, uint32_t ep_idx) ++ { ++ ucs_time_t deadline = ucs_get_time() + ++ ucs_time_from_sec(60) * ucs::test_time_multiplier(); ++ void *ud_ep_tmp; ++ ++ while ((ucs_get_time() < deadline) && ++ ucs_ptr_array_lookup(&iface->eps, ep_idx, ud_ep_tmp)) { ++ usleep(1000); ++ } ++ } + }; + + int test_ud_slow_timer::rx_limit = 10; +@@ -67,7 +80,7 @@ int test_ud_slow_timer::tick_count = 0; + UCS_TEST_P(test_ud_slow_timer, tx1) { + connect(); + EXPECT_UCS_OK(tx(m_e1)); +- twait(200); ++ wait_for_rx_sn(1); + EXPECT_EQ(2, ep(m_e1)->tx.psn); + EXPECT_EQ(1, ucs_frag_list_sn(&ep(m_e2)->rx.ooo_pkts)); + } +@@ -85,6 +98,21 @@ UCS_TEST_P(test_ud_slow_timer, txn) { + EXPECT_EQ(N, ucs_frag_list_sn(&ep(m_e2)->rx.ooo_pkts)); + } + ++UCS_TEST_P(test_ud_slow_timer, ep_destroy, "UD_TIMEOUT=1s") { ++ void *ud_ep_tmp; ++ connect(); ++ ++ uct_ud_ep_t *ud_ep = ep(m_e1); ++ uct_ud_iface_t *iface = ucs_derived_of(ud_ep->super.super.iface, ++ uct_ud_iface_t); ++ uint32_t ep_idx = ud_ep->ep_id; ++ EXPECT_TRUE(ucs_ptr_array_lookup(&iface->eps, ep_idx, ud_ep_tmp)); ++ ++ m_e1->destroy_eps(); ++ wait_for_ep_destroyed(iface, ep_idx); ++ EXPECT_FALSE(ucs_ptr_array_lookup(&iface->eps, ep_idx, ud_ep_tmp)); ++} ++ + #ifdef UCT_UD_EP_DEBUG_HOOKS + /* no traffic - no ticks */ + UCS_TEST_P(test_ud_slow_timer, tick1) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.cc +index b29b0ad3a..b898610d2 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.cc +@@ -196,4 +196,3 @@ void uct_amo_test::worker::join() { + pthread_join(m_thread, &retval); + running = false; + } +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.h +index ba11f456d..9e58c8d73 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo.h +@@ -79,6 +79,83 @@ public: + std::vector m_completions; + }; + ++ ucs_status_t atomic_post(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint64_t remote_addr, ++ uct_rkey_t rkey) { ++ return uct_ep_atomic32_post(ep, opcode, value, remote_addr, rkey); ++ } ++ ++ ucs_status_t atomic_post(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t remote_addr, ++ uct_rkey_t rkey) { ++ return uct_ep_atomic64_post(ep, opcode, value, remote_addr, rkey); ++ } ++ ++ ucs_status_t atomic_fetch_nb(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint32_t value, uint32_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) { ++ return uct_ep_atomic32_fetch(ep, opcode, value, result, remote_addr, rkey, comp); ++ } ++ ++ ucs_status_t atomic_fetch_nb(uct_ep_h ep, uct_atomic_op_t opcode, ++ uint64_t value, uint64_t *result, ++ uint64_t remote_addr, uct_rkey_t rkey, ++ uct_completion_t *comp) { ++ return uct_ep_atomic64_fetch(ep, opcode, value, result, remote_addr, rkey, comp); ++ } ++ ++ template ++ ucs_status_t atomic_op(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, ++ uint64_t *result, completion *comp) { ++ return atomic_post(ep, opcode, (T)worker.value, recvbuf.addr(), recvbuf.rkey()); ++ } ++ ++ template ++ ucs_status_t atomic_fop(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, ++ uint64_t *result, completion *comp) { ++ comp->self = this; ++ comp->uct.func = atomic_reply_cb; ++ return atomic_fetch_nb(ep, opcode, (T)worker.value, ++ (T*)result, recvbuf.addr(), recvbuf.rkey(), ++ &comp->uct); ++ } ++ ++ template ++ static T and_op(T v1, T v2) ++ { ++ return v1 & v2; ++ } ++ ++ template ++ static T or_op(T v1, T v2) ++ { ++ return v1 | v2; ++ } ++ ++ template ++ static T add_op(T v1, T v2) ++ { ++ return v1 + v2; ++ } ++ ++ template ++ static T xor_op(T v1, T v2) ++ { ++ return v1 ^ v2; ++ } ++ ++ template ++ static T and_val(unsigned i) ++ { ++ return ~(UCS_BIT(i * 2) | UCS_BIT(i + 16)); ++ } ++ ++ template ++ static T or_val(unsigned i) ++ { ++ return UCS_BIT(i * 2) | UCS_BIT(i + 16); ++ } + + protected: + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add.cc +deleted file mode 100644 +index e8f6b5a5a..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add.cc ++++ /dev/null +@@ -1,66 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include "test_amo.h" +- +- +-class uct_amo_add_test : public uct_amo_test { +-public: +- +- ucs_status_t add32(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, +- uint64_t *result, completion *comp) { +- return uct_ep_atomic_add32(ep, worker.value, recvbuf.addr(), recvbuf.rkey()); +- } +- +- ucs_status_t add64(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, +- uint64_t *result, completion *comp) { +- return uct_ep_atomic_add64(ep, worker.value, recvbuf.addr(), recvbuf.rkey()); +- } +- +- template +- void test_add(send_func_t send) { +- /* +- * Method: Add may random values from multiple workers running at the same +- * time. We expect the final result to be the sum of all these values. +- */ +- +- mapped_buffer recvbuf(sizeof(T), 0, receiver()); +- +- T value = rand64(); +- *(T*)recvbuf.ptr() = value; +- +- T exp_result = value; +- std::vector add_vec; +- for (unsigned i = 0; i < num_senders(); ++i) { +- value = rand64(); +- add_vec.push_back(value); +- +- for (unsigned j = 0; j < count(); ++j) { +- exp_result += value; +- value = hash64(value); +- } +- } +- +- run_workers(send, recvbuf, add_vec, true); +- +- wait_for_remote(); +- EXPECT_EQ(exp_result, *(T*)recvbuf.ptr()); +- } +-}; +- +- +-UCS_TEST_P(uct_amo_add_test, add32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD32); +- test_add(static_cast(&uct_amo_add_test::add32)); +-} +- +-UCS_TEST_P(uct_amo_add_test, add64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD64); +- test_add(static_cast(&uct_amo_add_test::add64)); +-} +- +-UCT_INSTANTIATE_TEST_CASE(uct_amo_add_test) +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add_xor.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add_xor.cc +new file mode 100644 +index 000000000..f89477b19 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_add_xor.cc +@@ -0,0 +1,66 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "test_amo.h" ++ ++ ++class uct_amo_add_xor_test : public uct_amo_test { ++public: ++ ++ template ++ void test_op(T (*op)(T, T)) { ++ /* ++ * Method: Add/xor may random values from multiple workers running at the same ++ * time. We expect the final result to be the sum/xor of all these values. ++ */ ++ ++ mapped_buffer recvbuf(sizeof(T), 0, receiver()); ++ ++ T value = rand64(); ++ *(T*)recvbuf.ptr() = value; ++ ++ T exp_result = value; ++ std::vector add_vec; ++ for (unsigned i = 0; i < num_senders(); ++i) { ++ value = rand64(); ++ add_vec.push_back(value); ++ ++ for (unsigned j = 0; j < count(); ++j) { ++ exp_result = op(exp_result, value); ++ value = hash64(value); ++ } ++ } ++ ++ run_workers(static_cast(&uct_amo_test::atomic_op), ++ recvbuf, add_vec, true); ++ ++ wait_for_remote(); ++ EXPECT_EQ(exp_result, *(T*)recvbuf.ptr()); ++ } ++}; ++ ++UCS_TEST_P(uct_amo_add_xor_test, add32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), OP32); ++ test_op(add_op); ++} ++ ++UCS_TEST_P(uct_amo_add_xor_test, add64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), OP64); ++ test_op(add_op); ++} ++ ++UCS_TEST_P(uct_amo_add_xor_test, xor32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), OP32); ++ test_op(xor_op); ++} ++ ++UCS_TEST_P(uct_amo_add_xor_test, xor64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), OP64); ++ test_op(xor_op); ++} ++ ++UCT_INSTANTIATE_TEST_CASE(uct_amo_add_xor_test) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_and_or.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_and_or.cc +new file mode 100644 +index 000000000..1cf0edbe6 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_and_or.cc +@@ -0,0 +1,65 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "test_amo.h" ++ ++ ++class uct_amo_and_or_test : public uct_amo_test { ++public: ++ ++ template ++ void test_op(T (*op)(T, T), T (*val)(unsigned)) { ++ /* ++ * Method: Add may random values from multiple workers running at the same ++ * time. We expect the final result to be the and/or of all these values. ++ * This is simplified version of add/xor test: operated value is costant ++ * for every worker to eliminate result to 0 or MAX_INT ++ */ ++ ++ check_atomics(UCS_BIT(opcode), sizeof(T) == sizeof(uint64_t) ? OP64 : OP32); ++ ++ mapped_buffer recvbuf(sizeof(T), 0, receiver()); ++ ++ T value = 0x0ff0f00f; ++ *(T*)recvbuf.ptr() = value; ++ ++ T exp_result = value; ++ std::vector op_vec; ++ for (unsigned i = 0; i < num_senders(); ++i) { ++ value = val(i); ++ op_vec.push_back(value); ++ ++ for (unsigned j = 0; j < count(); ++j) { ++ exp_result = op(exp_result, value); ++ } ++ } ++ ++ run_workers(static_cast(&uct_amo_test::atomic_op), ++ recvbuf, op_vec, false); ++ ++ wait_for_remote(); ++ EXPECT_EQ(exp_result, *(T*)recvbuf.ptr()); ++ } ++}; ++ ++UCS_TEST_P(uct_amo_and_or_test, and32) { ++ test_op(and_op, and_val); ++} ++ ++UCS_TEST_P(uct_amo_and_or_test, add64) { ++ test_op(and_op, and_val); ++} ++ ++UCS_TEST_P(uct_amo_and_or_test, or32) { ++ test_op(or_op, or_val); ++} ++ ++UCS_TEST_P(uct_amo_and_or_test, or64) { ++ test_op(or_op, or_val); ++} ++ ++UCT_INSTANTIATE_TEST_CASE(uct_amo_and_or_test) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_cswap.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_cswap.cc +index dfcd8e2fe..5bb7f8ede 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_cswap.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_cswap.cc +@@ -95,12 +95,12 @@ public: + + + UCS_TEST_P(uct_amo_cswap_test, cswap32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_CSWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_CSWAP), FOP32); + test_cswap(static_cast(&uct_amo_cswap_test::cswap32)); + } + + UCS_TEST_P(uct_amo_cswap_test, cswap64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_CSWAP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_CSWAP), FOP64); + test_cswap(static_cast(&uct_amo_cswap_test::cswap64)); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd.cc +deleted file mode 100644 +index 6672968a1..000000000 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd.cc ++++ /dev/null +@@ -1,89 +0,0 @@ +-/** +-* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. +-* +-* See file LICENSE for terms. +-*/ +- +-#include "test_amo.h" +- +- +-class uct_amo_fadd_test : public uct_amo_test { +-public: +- +- ucs_status_t fadd32(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, +- uint64_t *result, completion *comp) { +- comp->self = this; +- comp->uct.func = atomic_reply_cb; +- return uct_ep_atomic_fadd32(ep, worker.value, recvbuf.addr(), recvbuf.rkey(), +- (uint32_t*)result, &comp->uct); +- } +- +- ucs_status_t fadd64(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, +- uint64_t *result, completion *comp) { +- comp->self = this; +- comp->uct.func = atomic_reply_cb; +- return uct_ep_atomic_fadd64(ep, worker.value, recvbuf.addr(), recvbuf.rkey(), +- result, &comp->uct); +- } +- +- template +- void test_fadd(send_func_t send) { +- /* +- * Method: Do concurrent atomic fetch-and-add of constant random value +- * to a single atomic variable. Check that every sender gets a unique reply +- * and the final value of atomic variable is the sum of all. +- */ +- +- mapped_buffer recvbuf(sizeof(T), 0, receiver()); +- +- T value = rand64(); +- T add = rand64(); +- *(T*)recvbuf.ptr() = value; +- +- std::vector exp_replies; +- for (unsigned i = 0; i < count() * num_senders(); ++i) { +- exp_replies.push_back(value); +- value += add; +- } +- +- run_workers(send, recvbuf, std::vector(num_senders(), add), false); +- +- validate_replies(exp_replies); +- +- wait_for_remote(); +- EXPECT_EQ(value, *(T*)recvbuf.ptr()); +- } +-}; +- +- +-UCS_TEST_P(uct_amo_fadd_test, fadd32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD32); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd32)); +-} +- +-UCS_TEST_P(uct_amo_fadd_test, fadd64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd64)); +-} +- +-UCT_INSTANTIATE_TEST_CASE(uct_amo_fadd_test) +- +-class uct_amo_fadd_test_inlresp : public uct_amo_fadd_test {}; +- +-UCS_TEST_P(uct_amo_fadd_test_inlresp, fadd64_inlresp0, "IB_TX_INLINE_RESP=0") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd64)); +-} +- +-UCS_TEST_P(uct_amo_fadd_test_inlresp, fadd64_inlresp32, "IB_TX_INLINE_RESP=32") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd64)); +-} +- +-UCS_TEST_P(uct_amo_fadd_test_inlresp, fadd64_inlresp64, "IB_TX_INLINE_RESP=64") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fadd(static_cast(&uct_amo_fadd_test::fadd64)); +-} +- +-UCT_INSTANTIATE_IB_TEST_CASE(uct_amo_fadd_test_inlresp) +- +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd_fxor.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd_fxor.cc +new file mode 100644 +index 000000000..b4ebfb518 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fadd_fxor.cc +@@ -0,0 +1,98 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "test_amo.h" ++ ++ ++class uct_amo_fadd_fxor_test : public uct_amo_test { ++public: ++ ++ template ++ void test_fop(T (*op)(T, T)) { ++ /* ++ * Method: Do concurrent atomic fetch-and-add/xor of constant random value ++ * to a single atomic variable. Check that every sender gets a unique reply ++ * and the final value of atomic variable is the sum/xor of all. ++ */ ++ ++ mapped_buffer recvbuf(sizeof(T), 0, receiver()); ++ ++ T value = rand64(); ++ T add = rand64(); ++ *(T*)recvbuf.ptr() = value; ++ ++ std::vector exp_replies; ++ for (unsigned i = 0; i < count() * num_senders(); ++i) { ++ exp_replies.push_back(value); ++ value = op(value, add); ++ } ++ ++ run_workers(static_cast(&uct_amo_test::atomic_fop), ++ recvbuf, std::vector(num_senders(), add), false); ++ ++ validate_replies(exp_replies); ++ ++ wait_for_remote(); ++ EXPECT_EQ(value, *(T*)recvbuf.ptr()); ++ } ++}; ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test, fadd32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP32); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test, fadd64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test, fxor32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP32); ++ test_fop(xor_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test, fxor64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fop(xor_op); ++} ++ ++UCT_INSTANTIATE_TEST_CASE(uct_amo_fadd_fxor_test) ++ ++class uct_amo_fadd_fxor_test_inlresp : public uct_amo_fadd_fxor_test {}; ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fadd64_inlresp0, "IB_TX_INLINE_RESP=0") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fadd64_inlresp32, "IB_TX_INLINE_RESP=32") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fadd64_inlresp64, "IB_TX_INLINE_RESP=64") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fop(add_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fxor64_inlresp0, "IB_TX_INLINE_RESP=0") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fop(xor_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fxor64_inlresp32, "IB_TX_INLINE_RESP=32") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fop(xor_op); ++} ++ ++UCS_TEST_P(uct_amo_fadd_fxor_test_inlresp, fxor64_inlresp64, "IB_TX_INLINE_RESP=64") { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fop(xor_op); ++} ++ ++UCT_INSTANTIATE_IB_TEST_CASE(uct_amo_fadd_fxor_test_inlresp) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fand_for.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fand_for.cc +new file mode 100644 +index 000000000..4c8dc2a21 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_fand_for.cc +@@ -0,0 +1,90 @@ ++/** ++* Copyright (C) Mellanox Technologies Ltd. 2001-2018. ALL RIGHTS RESERVED. ++* ++* See file LICENSE for terms. ++*/ ++ ++#include "test_amo.h" ++ ++ ++class uct_amo_fand_for_test : public uct_amo_test { ++public: ++ ++ template ++ void test_fop(T (*op)(T, T)) { ++ /* ++ * Method: Do concurrent atomic fetch-and-and/or of constant random value ++ * to a single atomic variable. Check that every sender gets a unique reply ++ * and the final value of atomic variable is the and/or of all. ++ */ ++ ++ check_atomics(UCS_BIT(opcode), sizeof(T) == sizeof(uint64_t) ? FOP64 : FOP32); ++ ++ mapped_buffer recvbuf(sizeof(T), 0, receiver()); ++ ++ T value = rand64(); ++ T add = rand64(); ++ *(T*)recvbuf.ptr() = value; ++ ++ std::vector exp_replies; ++ for (unsigned i = 0; i < count() * num_senders(); ++i) { ++ exp_replies.push_back(value); ++ value = op(value, add); ++ } ++ ++ run_workers(static_cast(&uct_amo_test::atomic_fop), ++ recvbuf, std::vector(num_senders(), add), false); ++ ++ validate_replies(exp_replies); ++ ++ wait_for_remote(); ++ EXPECT_EQ(value, *(T*)recvbuf.ptr()); ++ } ++}; ++ ++UCS_TEST_P(uct_amo_fand_for_test, fand32) { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test, fand64) { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test, for32) { ++ test_fop(or_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test, for64) { ++ test_fop(or_op); ++} ++ ++UCT_INSTANTIATE_TEST_CASE(uct_amo_fand_for_test) ++ ++class uct_amo_fand_for_test_inlresp : public uct_amo_fand_for_test {}; ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, fand64_inlresp0, "IB_TX_INLINE_RESP=0") { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, fand64_inlresp32, "IB_TX_INLINE_RESP=32") { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, fand64_inlresp64, "IB_TX_INLINE_RESP=64") { ++ test_fop(and_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, for64_inlresp0, "IB_TX_INLINE_RESP=0") { ++ test_fop(or_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, for64_inlresp32, "IB_TX_INLINE_RESP=32") { ++ test_fop(or_op); ++} ++ ++UCS_TEST_P(uct_amo_fand_for_test_inlresp, for64_inlresp64, "IB_TX_INLINE_RESP=64") { ++ test_fop(or_op); ++} ++ ++UCT_INSTANTIATE_IB_TEST_CASE(uct_amo_fand_for_test_inlresp) ++ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_swap.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_swap.cc +index dc6bcbf16..10f23341d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_swap.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_amo_swap.cc +@@ -14,16 +14,16 @@ public: + uint64_t *result, completion *comp) { + comp->self = this; + comp->uct.func = atomic_reply_cb; +- return uct_ep_atomic_swap32(ep, worker.value, recvbuf.addr(), recvbuf.rkey(), +- (uint32_t*)result, &comp->uct); ++ return uct_ep_atomic32_fetch(ep, UCT_ATOMIC_OP_SWAP, worker.value, (uint32_t*)result, ++ recvbuf.addr(), recvbuf.rkey(), &comp->uct); + } + + ucs_status_t swap64(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf, + uint64_t *result, completion *comp) { + comp->self = this; + comp->uct.func = atomic_reply_cb; +- return uct_ep_atomic_swap64(ep, worker.value, recvbuf.addr(), recvbuf.rkey(), +- result, &comp->uct); ++ return uct_ep_atomic64_fetch(ep, UCT_ATOMIC_OP_SWAP, worker.value, (uint64_t*)result, ++ recvbuf.addr(), recvbuf.rkey(), &comp->uct); + } + + template +@@ -65,12 +65,12 @@ public: + + + UCS_TEST_P(uct_amo_swap_test, swap32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP32); + test_swap(static_cast(&uct_amo_swap_test::swap32)); + } + + UCS_TEST_P(uct_amo_swap_test, swap64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP64); + test_swap(static_cast(&uct_amo_swap_test::swap64)); + } + +@@ -79,17 +79,17 @@ UCT_INSTANTIATE_TEST_CASE(uct_amo_swap_test) + class uct_amo_swap_test_inlresp : public uct_amo_swap_test {}; + + UCS_TEST_P(uct_amo_swap_test_inlresp, swap32_inlresp0, "IB_TX_INLINE_RESP=0") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP32); + test_swap(static_cast(&uct_amo_swap_test::swap32)); + } + + UCS_TEST_P(uct_amo_swap_test_inlresp, swap32_inlresp32, "IB_TX_INLINE_RESP=32") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP32); + test_swap(static_cast(&uct_amo_swap_test::swap32)); + } + + UCS_TEST_P(uct_amo_swap_test_inlresp, swap32_inlresp64, "IB_TX_INLINE_RESP=64") { +- check_caps(UCT_IFACE_FLAG_ATOMIC_SWAP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_SWAP), FOP32); + test_swap(static_cast(&uct_amo_swap_test::swap32)); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_event.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_event.cc +index 2a4b2827b..1b5d6ab39 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_event.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_event.cc +@@ -110,8 +110,7 @@ void test_uct_event_fd::test_recv_am(bool signaled) + recv_buffer->length = 0; /* Initialize length to 0 */ + + /* set a callback for the uct to invoke for receiving the data */ +- uct_iface_set_am_handler(m_e2->iface(), 0, am_handler, recv_buffer, +- UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(m_e2->iface(), 0, am_handler, recv_buffer, 0); + + /* create receiver wakeup */ + status = uct_iface_event_fd_get(m_e2->iface(), &wakeup_fd.fd); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_fence.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_fence.cc +index 090d0baea..b568cb186 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_fence.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_fence.cc +@@ -58,9 +58,9 @@ public: + public: + worker(uct_fence_test* test, send_func_t send, recv_func_t recv, + const mapped_buffer& recvbuf, +- const entity& entity, uint64_t initial_value, uint32_t* error) : +- test(test), value(initial_value), result32(0), result64(0), +- error(error), running(true), m_send(send), m_recv(recv), ++ const entity& entity, uct_atomic_op_t op, uint32_t* error) : ++ test(test), value(0), result32(0), result64(0), ++ error(error), running(true), op(op), m_send(send), m_recv(recv), + m_recvbuf(recvbuf), m_entity(entity) { + pthread_create(&m_thread, NULL, run, reinterpret_cast(this)); + } +@@ -81,19 +81,46 @@ public: + running = false; + } + ++ uint64_t atomic_op_val(uct_atomic_op_t op, uint64_t v1, uint64_t v2) ++ { ++ switch (op) { ++ case UCT_ATOMIC_OP_ADD: ++ return v1 + v2; ++ case UCT_ATOMIC_OP_AND: ++ return v1 & v2; ++ case UCT_ATOMIC_OP_OR: ++ return v1 | v2; ++ case UCT_ATOMIC_OP_XOR: ++ return v1 ^ v2; ++ default: ++ return 0; ++ } ++ } ++ + uct_fence_test* const test; + uint64_t value; + uint32_t result32; + uint64_t result64; + uint32_t* error; + bool running; ++ uct_atomic_op_t op; + + private: + void run() { + uct_completion_t uct_comp; + uct_comp.func = completion_cb; + for (unsigned i = 0; i < uct_fence_test::count(); i++) { +- uct_comp.count = 1; ++ uint64_t local_val = ucs::rand(); ++ uint64_t remote_val = ucs::rand(); ++ uct_comp.count = 1; ++ ++ if (m_recvbuf.length() == sizeof(uint32_t)) { ++ *(uint32_t*)m_recvbuf.ptr() = remote_val; ++ } else { ++ *(uint64_t*)m_recvbuf.ptr() = remote_val; ++ } ++ value = local_val; ++ + (test->*m_send)(m_entity.ep(0), *this, m_recvbuf); + uct_ep_fence(m_entity.ep(0), 0); + (test->*m_recv)(m_entity.ep(0), *this, +@@ -103,7 +130,7 @@ public: + uint64_t result = (m_recvbuf.length() == sizeof(uint32_t)) ? + result32 : result64; + +- if (result != (uint64_t)(i+1)) ++ if (result != atomic_op_val(op, local_val, remote_val)) + (*error)++; + + // reset for next loop +@@ -119,39 +146,40 @@ public: + pthread_t m_thread; + }; + ++ template + void run_workers(send_func_t send, recv_func_t recv, +- const mapped_buffer& recvbuf, +- uint64_t initial_value, uint32_t* error) { ++ const mapped_buffer& recvbuf, uint32_t* error) { + ucs::ptr_vector m_workers; + m_workers.clear(); + m_workers.push_back(new worker(this, send, recv, recvbuf, +- sender(), initial_value, error)); ++ sender(), OP, error)); + m_workers.at(0).join(); + m_workers.clear(); + } + +- ucs_status_t add32(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf) { +- return uct_ep_atomic_add32(ep, worker.value, recvbuf.addr(), recvbuf.rkey()); +- } +- +- ucs_status_t add64(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf) { +- return uct_ep_atomic_add64(ep, worker.value, recvbuf.addr(), recvbuf.rkey()); +- } +- +- ucs_status_t fadd32(uct_ep_h ep, worker& worker, +- const mapped_buffer& recvbuf, uct_completion_t *comp) { +- return uct_ep_atomic_fadd32(ep, 0, recvbuf.addr(), recvbuf.rkey(), +- &worker.result32, comp); ++ template ++ ucs_status_t atomic_op(uct_ep_h ep, worker& worker, const mapped_buffer& recvbuf) { ++ if (sizeof(T) == sizeof(uint32_t)) { ++ return uct_ep_atomic32_post(ep, OP, worker.value, recvbuf.addr(), recvbuf.rkey()); ++ } else { ++ return uct_ep_atomic64_post(ep, OP, worker.value, recvbuf.addr(), recvbuf.rkey()); ++ } + } + +- ucs_status_t fadd64(uct_ep_h ep, worker& worker, +- const mapped_buffer& recvbuf, uct_completion_t *comp) { +- return uct_ep_atomic_fadd64(ep, 0, recvbuf.addr(), recvbuf.rkey(), +- &worker.result64, comp); ++ template ++ ucs_status_t atomic_fop(uct_ep_h ep, worker& worker, ++ const mapped_buffer& recvbuf, uct_completion_t *comp) { ++ if (sizeof(T) == sizeof(uint32_t)) { ++ return uct_ep_atomic32_fetch(ep, OP, 0, &worker.result32, ++ recvbuf.addr(), recvbuf.rkey(), comp); ++ } else { ++ return uct_ep_atomic64_fetch(ep, OP, 0, &worker.result64, ++ recvbuf.addr(), recvbuf.rkey(), comp); ++ } + } + +- template +- void test_fence(send_func_t send, recv_func_t recv) { ++ template ++ void test_fence() { + + mapped_buffer recvbuf(sizeof(T), 0, receiver()); + +@@ -159,24 +187,60 @@ public: + + *(T*)recvbuf.ptr() = 0; + +- run_workers(send, recv, recvbuf, 1, &error); ++ run_workers(static_cast(&uct_fence_test::atomic_op), ++ static_cast(&uct_fence_test::atomic_fop), ++ recvbuf, &error); + + EXPECT_EQ(error, (uint32_t)0); + } + }; + + UCS_TEST_P(uct_fence_test, add32) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD32); +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD32); +- test_fence(static_cast(&uct_fence_test::add32), +- static_cast(&uct_fence_test::fadd32)); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), OP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP32); ++ test_fence(); + } + + UCS_TEST_P(uct_fence_test, add64) { +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD64); +- check_caps(UCT_IFACE_FLAG_ATOMIC_FADD64); +- test_fence(static_cast(&uct_fence_test::add64), +- static_cast(&uct_fence_test::fadd64)); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), OP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ADD), FOP64); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, and32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_AND), OP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_AND), FOP32); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, and64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_AND), OP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_AND), FOP64); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, or32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_OR), OP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_OR), FOP32); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, or64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_OR), OP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_OR), FOP64); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, xor32) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), OP32); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP32); ++ test_fence(); ++} ++ ++UCS_TEST_P(uct_fence_test, xor64) { ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), OP64); ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_XOR), FOP64); ++ test_fence(); + } + + UCT_INSTANTIATE_TEST_CASE(uct_fence_test) +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_flush.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_flush.cc +index 08627eace..f37eb7d3c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_flush.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_flush.cc +@@ -343,7 +343,7 @@ void uct_flush_test::test_flush_am_pending(flush_func_t flush, bool destroy_ep) + it->uct.func = am_progress; + it->comp.count = 2; + it->comp.func = NULL; +- status = uct_ep_pending_add(sender().ep(0), &it->uct); ++ status = uct_ep_pending_add(sender().ep(0), &it->uct, 0); + if (UCS_ERR_BUSY == status) { + /* User advised to retry the send. It means no requests added + * to the queue +@@ -373,7 +373,7 @@ void uct_flush_test::test_flush_am_pending(flush_func_t flush, bool destroy_ep) + /* If flush returned NO_RESOURCE, add to pending must succeed */ + flush_req.test = this; + flush_req.uct.func = flush_progress; +- status = uct_ep_pending_add(sender().ep(0), &flush_req.uct); ++ status = uct_ep_pending_add(sender().ep(0), &flush_req.uct, 0); + if (status == UCS_ERR_BUSY) { + continue; + } +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_many2one_am.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_many2one_am.cc +index 07f6d42cd..4d74aa122 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_many2one_am.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_many2one_am.cc +@@ -100,7 +100,7 @@ UCS_TEST_P(test_many2one_am, am_bcopy, "MAX_BCOPY=16384") + m_am_count = 0; + + status = uct_iface_set_am_handler(receiver->iface(), AM_ID, am_handler, +- (void*)this, UCT_CB_FLAG_SYNC); ++ (void*)this, 0); + ASSERT_UCS_OK(status); + + for (unsigned i = 0; i < num_sends; ++i) { +@@ -129,8 +129,7 @@ UCS_TEST_P(test_many2one_am, am_bcopy, "MAX_BCOPY=16384") + progress(); + } + +- status = uct_iface_set_am_handler(receiver->iface(), AM_ID, NULL, NULL, +- UCT_CB_FLAG_SYNC); ++ status = uct_iface_set_am_handler(receiver->iface(), AM_ID, NULL, NULL, 0); + ASSERT_UCS_OK(status); + + check_backlog(); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.cc +index 680ff2383..49dc72234 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.cc +@@ -24,7 +24,7 @@ extern "C" { + #include + #endif + +-std::string const test_md::mem_types[] = {"host", "cuda"}; ++std::string const test_md::mem_types[] = {"host", "cuda", "cuda-managed"}; + + void* test_md::alloc_thread(void *arg) + { +@@ -75,18 +75,22 @@ test_md::test_md() + UCS_TEST_CREATE_HANDLE(uct_md_config_t*, m_md_config, + (void (*)(uct_md_config_t*))uct_config_release, + uct_md_config_read, GetParam().c_str(), NULL, NULL); ++ memset(&m_md_attr, 0, sizeof(m_md_attr)); + } + + void test_md::init() + { + ucs::test_base::init(); +- UCS_TEST_CREATE_HANDLE(uct_md_h, m_pd, uct_md_close, uct_md_open, ++ UCS_TEST_CREATE_HANDLE(uct_md_h, m_md, uct_md_close, uct_md_open, + GetParam().c_str(), m_md_config); ++ ++ ucs_status_t status = uct_md_query(m_md, &m_md_attr); ++ ASSERT_UCS_OK(status); + } + + void test_md::cleanup() + { +- m_pd.reset(); ++ m_md.reset(); + ucs::test_base::cleanup(); + } + +@@ -104,7 +108,7 @@ void test_md::modify_config(const std::string& name, const std::string& value, + void test_md::check_caps(uint64_t flags, const std::string& name) + { + uct_md_attr_t md_attr; +- ucs_status_t status = uct_md_query(pd(), &md_attr); ++ ucs_status_t status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + if (!ucs_test_all_flags(md_attr.cap.flags, flags)) { + std::stringstream ss; +@@ -187,23 +191,23 @@ UCS_TEST_P(test_md, rkey_ptr) { + check_caps(UCT_MD_FLAG_ALLOC|UCT_MD_FLAG_RKEY_PTR, "allocation+direct access"); + // alloc (should work with both sysv and xpmem + size = 1024 * 1024 * sizeof(unsigned); +- status = uct_md_mem_alloc(pd(), &size, (void **)&rva, ++ status = uct_md_mem_alloc(md(), &size, (void **)&rva, + UCT_MD_MEM_ACCESS_ALL, + "test", &memh); + ASSERT_UCS_OK(status); + EXPECT_LE(1024 * 1024 * sizeof(unsigned), size); + + // pack +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + rkey_buffer = malloc(md_attr.rkey_packed_size); + if (rkey_buffer == NULL) { + // make coverity happy +- uct_md_mem_free(pd(), memh); ++ uct_md_mem_free(md(), memh); + GTEST_FAIL(); + } + +- status = uct_md_mkey_pack(pd(), memh, rkey_buffer); ++ status = uct_md_mkey_pack(md(), memh, rkey_buffer); + + // unpack + status = uct_rkey_unpack(rkey_buffer, &rkey_bundle); +@@ -234,7 +238,7 @@ UCS_TEST_P(test_md, rkey_ptr) { + EXPECT_EQ(UCS_ERR_INVALID_ADDR, status); + + free(rkey_buffer); +- uct_md_mem_free(pd(), memh); ++ uct_md_mem_free(md(), memh); + uct_rkey_release(&rkey_bundle); + } + +@@ -252,7 +256,7 @@ UCS_TEST_P(test_md, alloc) { + continue; + } + +- status = uct_md_mem_alloc(pd(), &size, &address, ++ status = uct_md_mem_alloc(md(), &size, &address, + UCT_MD_MEM_ACCESS_ALL, "test", &memh); + EXPECT_GT(size, 0ul); + +@@ -262,7 +266,7 @@ UCS_TEST_P(test_md, alloc) { + EXPECT_TRUE(memh != UCT_MEM_HANDLE_NULL); + + memset(address, 0xBB, size); +- uct_md_mem_free(pd(), memh); ++ uct_md_mem_free(md(), memh); + } + } + +@@ -273,7 +277,7 @@ UCS_TEST_P(test_md, mem_type_owned) { + int ret; + void *address; + +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + + if (md_attr.cap.mem_type == UCT_MD_MEM_TYPE_HOST) { +@@ -282,7 +286,7 @@ UCS_TEST_P(test_md, mem_type_owned) { + + alloc_memory(&address, 1024, NULL, md_attr.cap.mem_type); + +- ret = uct_md_is_mem_type_owned(pd(), address, 1024); ++ ret = uct_md_is_mem_type_owned(md(), address, 1024); + EXPECT_TRUE(ret > 0); + } + +@@ -295,7 +299,7 @@ UCS_TEST_P(test_md, reg) { + + check_caps(UCT_MD_FLAG_REG, "registration"); + +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + for (unsigned mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { + if (!(md_attr.cap.reg_mem_types & UCS_BIT(mem_type))) { +@@ -314,13 +318,13 @@ UCS_TEST_P(test_md, reg) { + + alloc_memory(&address, size, &fill_buffer[0], mem_type); + +- status = uct_md_mem_reg(pd(), address, size, UCT_MD_MEM_ACCESS_ALL, &memh); ++ status = uct_md_mem_reg(md(), address, size, UCT_MD_MEM_ACCESS_ALL, &memh); + + ASSERT_UCS_OK(status); + ASSERT_TRUE(memh != UCT_MEM_HANDLE_NULL); + check_memory(address, &fill_buffer[0], size, mem_type); + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + ASSERT_UCS_OK(status); + check_memory(address, &fill_buffer[0], size, mem_type); + +@@ -338,7 +342,7 @@ UCS_TEST_P(test_md, reg_perf) { + + check_caps(UCT_MD_FLAG_REG, "registration"); + +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + for (unsigned mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { + if (!(md_attr.cap.reg_mem_types & UCS_BIT(mem_type))) { +@@ -355,12 +359,12 @@ UCS_TEST_P(test_md, reg_perf) { + unsigned n = 0; + while (n < count) { + uct_mem_h memh; +- status = uct_md_mem_reg(pd(), ptr, size, UCT_MD_MEM_ACCESS_ALL, ++ status = uct_md_mem_reg(md(), ptr, size, UCT_MD_MEM_ACCESS_ALL, + &memh); + ASSERT_UCS_OK(status); + ASSERT_TRUE(memh != UCT_MEM_HANDLE_NULL); + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + ASSERT_UCS_OK(status); + + ++n; +@@ -392,16 +396,16 @@ UCS_TEST_P(test_md, reg_advise) { + address = malloc(size); + ASSERT_TRUE(address != NULL); + +- status = uct_md_mem_reg(pd(), address, size, ++ status = uct_md_mem_reg(md(), address, size, + UCT_MD_MEM_FLAG_NONBLOCK|UCT_MD_MEM_ACCESS_ALL, + &memh); + ASSERT_UCS_OK(status); + ASSERT_TRUE(memh != UCT_MEM_HANDLE_NULL); + +- status = uct_md_mem_advise(pd(), memh, (char *)address + 7, 32*1024, UCT_MADV_WILLNEED); ++ status = uct_md_mem_advise(md(), memh, (char *)address + 7, 32*1024, UCT_MADV_WILLNEED); + EXPECT_UCS_OK(status); + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + EXPECT_UCS_OK(status); + free(address); + } +@@ -416,7 +420,7 @@ UCS_TEST_P(test_md, alloc_advise) { + + orig_size = size = 128 * 1024 * 1024; + +- status = uct_md_mem_alloc(pd(), &size, &address, ++ status = uct_md_mem_alloc(md(), &size, &address, + UCT_MD_MEM_FLAG_NONBLOCK| + UCT_MD_MEM_ACCESS_ALL, + "test", &memh); +@@ -425,11 +429,11 @@ UCS_TEST_P(test_md, alloc_advise) { + EXPECT_TRUE(address != NULL); + EXPECT_TRUE(memh != UCT_MEM_HANDLE_NULL); + +- status = uct_md_mem_advise(pd(), memh, (char *)address + 7, 32*1024, UCT_MADV_WILLNEED); ++ status = uct_md_mem_advise(md(), memh, (char *)address + 7, 32*1024, UCT_MADV_WILLNEED); + EXPECT_UCS_OK(status); + + memset(address, 0xBB, size); +- uct_md_mem_free(pd(), memh); ++ uct_md_mem_free(md(), memh); + } + + /* +@@ -442,7 +446,7 @@ UCS_TEST_P(test_md, reg_multi_thread) { + + check_caps(UCT_MD_FLAG_REG, "registration"); + +- status = uct_md_query(pd(), &md_attr); ++ status = uct_md_query(md(), &md_attr); + ASSERT_UCS_OK(status); + + if (!(md_attr.cap.reg_mem_types & UCS_BIT(UCT_MD_MEM_TYPE_HOST))) { +@@ -461,7 +465,7 @@ UCS_TEST_P(test_md, reg_multi_thread) { + ASSERT_TRUE(buffer != NULL); + + uct_mem_h memh; +- status = uct_md_mem_reg(pd(), buffer, size, ++ status = uct_md_mem_reg(md(), buffer, size, + UCT_MD_MEM_FLAG_NONBLOCK| + UCT_MD_MEM_ACCESS_ALL, + &memh); +@@ -470,7 +474,7 @@ UCS_TEST_P(test_md, reg_multi_thread) { + + sched_yield(); + +- status = uct_md_mem_dereg(pd(), memh); ++ status = uct_md_mem_dereg(md(), memh); + EXPECT_UCS_OK(status); + free(buffer); + } +@@ -482,7 +486,7 @@ UCS_TEST_P(test_md, reg_multi_thread) { + UCS_TEST_P(test_md, sockaddr_accessibility) { + ucs_sock_addr_t sock_addr; + struct ifaddrs *ifaddr, *ifa; +- int rc_local, rc_remote, found_ipoib = 0; ++ int found_ipoib = 0; + + check_caps(UCT_MD_FLAG_SOCKADDR, "sockaddr"); + +@@ -493,22 +497,23 @@ UCS_TEST_P(test_md, sockaddr_accessibility) { + if (ucs::is_inet_addr(ifa->ifa_addr) && ucs_netif_is_active(ifa->ifa_name)) { + sock_addr.addr = ifa->ifa_addr; + +- rc_local = uct_md_is_sockaddr_accessible(pd(), &sock_addr, UCT_SOCKADDR_ACC_LOCAL); +- rc_remote = uct_md_is_sockaddr_accessible(pd(), &sock_addr, UCT_SOCKADDR_ACC_REMOTE); +- + if (!strcmp(GetParam().c_str(), "rdmacm")) { +- if (ucs::is_ib_netdev(ifa->ifa_name)) { ++ if (ucs::is_rdmacm_netdev(ifa->ifa_name)) { + UCS_TEST_MESSAGE << "Testing " << ifa->ifa_name << " with " << + ucs::sockaddr_to_str(ifa->ifa_addr); +- ASSERT_TRUE(rc_local); +- ASSERT_TRUE(rc_remote); ++ ASSERT_TRUE(uct_md_is_sockaddr_accessible(md(), &sock_addr, ++ UCT_SOCKADDR_ACC_LOCAL)); ++ ASSERT_TRUE(uct_md_is_sockaddr_accessible(md(), &sock_addr, ++ UCT_SOCKADDR_ACC_REMOTE)); + found_ipoib = 1; + } + } else { + UCS_TEST_MESSAGE << "Testing " << ifa->ifa_name << " with " << + ucs::sockaddr_to_str(ifa->ifa_addr); +- ASSERT_TRUE(rc_local); +- ASSERT_TRUE(rc_remote); ++ ASSERT_TRUE(uct_md_is_sockaddr_accessible(md(), &sock_addr, ++ UCT_SOCKADDR_ACC_LOCAL)); ++ ASSERT_TRUE(uct_md_is_sockaddr_accessible(md(), &sock_addr, ++ UCT_SOCKADDR_ACC_REMOTE)); + } + } + } +@@ -528,6 +533,7 @@ UCS_TEST_P(test_md, sockaddr_accessibility) { + sysv, \ + xpmem, \ + cuda_cpy, \ ++ cuda_ipc, \ + rocm, \ + ib, \ + ugni, \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.h +index e12f243ca..7d9aa98bf 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_md.h +@@ -34,16 +34,22 @@ protected: + + void test_registration(); + +- uct_md_h pd() { +- return m_pd; ++ uct_md_h md() const { ++ return m_md; + } + ++ const uct_md_attr_t& md_attr() const { ++ return m_md_attr; ++ } ++ ++ + static void* alloc_thread(void *arg); + static std::string const mem_types[]; + + private: + ucs::handle m_md_config; +- ucs::handle m_pd; ++ ucs::handle m_md; ++ uct_md_attr_t m_md_attr; + }; + + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_mm.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_mm.cc +index c59b7192b..af0f72153 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_mm.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_mm.cc +@@ -84,7 +84,7 @@ UCS_TEST_P(test_uct_mm, open_for_posix) { + + /* set a callback for the uct to invoke for receiving the data */ + uct_iface_set_am_handler(m_e2->iface(), 0, mm_am_handler , recv_buffer, +- UCT_CB_FLAG_SYNC); ++ 0); + + /* send the data */ + uct_ep_am_short(m_e1->ep(0), 0, test_mm_hdr, &send_data, sizeof(send_data)); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_am.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_am.cc +index f4314e952..b8ee988c7 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_am.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_am.cc +@@ -208,7 +208,7 @@ public: + uct_memory_type_t mem_type) { + + if (receiver().iface_attr().cap.flags & UCT_IFACE_FLAG_CB_SYNC) { +- test_xfer_do(send, length, flags, UCT_CB_FLAG_SYNC, mem_type); ++ test_xfer_do(send, length, flags, 0, mem_type); + } + if (receiver().iface_attr().cap.flags & UCT_IFACE_FLAG_CB_ASYNC) { + test_xfer_do(send, length, flags, UCT_CB_FLAG_ASYNC, mem_type); +@@ -263,7 +263,7 @@ UCS_TEST_P(uct_p2p_am_test, am_sync) { + unsigned am_count = m_am_count = 0; + + status = uct_iface_set_am_handler(receiver().iface(), AM_ID, am_handler, +- this, UCT_CB_FLAG_SYNC); ++ this, 0); + ASSERT_UCS_OK(status); + + if (receiver().iface_attr().cap.flags & UCT_IFACE_FLAG_AM_SHORT) { +@@ -407,7 +407,7 @@ public: + + + UCS_TEST_P(uct_p2p_am_test, am_short) { +- check_caps(UCT_IFACE_FLAG_AM_SHORT); ++ check_caps(UCT_IFACE_FLAG_AM_SHORT, UCT_IFACE_FLAG_AM_DUP); + test_xfer_multi(static_cast(&uct_p2p_am_test::am_short), + sizeof(uint64_t), + sender().iface_attr().cap.am.max_short, +@@ -415,7 +415,7 @@ UCS_TEST_P(uct_p2p_am_test, am_short) { + } + + UCS_TEST_P(uct_p2p_am_test, am_bcopy) { +- check_caps(UCT_IFACE_FLAG_AM_BCOPY); ++ check_caps(UCT_IFACE_FLAG_AM_BCOPY, UCT_IFACE_FLAG_AM_DUP); + test_xfer_multi(static_cast(&uct_p2p_am_test::am_bcopy), + 0ul, + sender().iface_attr().cap.am.max_bcopy, +@@ -432,7 +432,7 @@ UCS_TEST_P(uct_p2p_am_test, am_short_keep_data) { + } + + UCS_TEST_P(uct_p2p_am_test, am_bcopy_keep_data) { +- check_caps(UCT_IFACE_FLAG_AM_BCOPY); ++ check_caps(UCT_IFACE_FLAG_AM_BCOPY, UCT_IFACE_FLAG_AM_DUP); + set_keep_data(true); + test_xfer_multi(static_cast(&uct_p2p_am_test::am_bcopy), + sizeof(uint64_t), +@@ -441,7 +441,7 @@ UCS_TEST_P(uct_p2p_am_test, am_bcopy_keep_data) { + } + + UCS_TEST_P(uct_p2p_am_test, am_zcopy) { +- check_caps(UCT_IFACE_FLAG_AM_ZCOPY); ++ check_caps(UCT_IFACE_FLAG_AM_ZCOPY, UCT_IFACE_FLAG_AM_DUP); + test_xfer_multi(static_cast(&uct_p2p_am_test::am_zcopy), + 0ul, + sender().iface_attr().cap.am.max_zcopy, +@@ -476,7 +476,7 @@ UCS_TEST_P(uct_p2p_am_misc, no_rx_buffs) { + + /* set a callback for the uct to invoke for receiving the data */ + status = uct_iface_set_am_handler(receiver().iface(), AM_ID, am_handler, +- (void*)this, UCT_CB_FLAG_SYNC); ++ (void*)this, 0); + ASSERT_UCS_OK(status); + + /* send many messages and progress the receiver. the receiver will keep getting +@@ -527,11 +527,14 @@ UCS_TEST_P(uct_p2p_am_misc, am_max_short_multi) { + ASSERT_UCS_OK(status); + } + +- /* do some progress */ +- short_progress_loop(50); +- +- /* should be able to send again */ +- status = uct_ep_am_short(sender_ep(), AM_ID, SEED1, NULL, 0); ++ /* should be able to send again after a while */ ++ ucs_time_t deadline = ucs_get_time() + ++ (ucs::test_time_multiplier() * ++ ucs_time_from_sec(DEFAULT_TIMEOUT_SEC)); ++ do { ++ progress(); ++ status = uct_ep_am_short(sender_ep(), AM_ID, SEED1, NULL, 0); ++ } while ((status == UCS_ERR_NO_RESOURCE) && (ucs_get_time() < deadline)); + EXPECT_EQ(UCS_OK, status); + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_err.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_err.cc +index 602683656..12f0b1cab 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_err.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_err.cc +@@ -26,7 +26,7 @@ public: + }; + + uct_p2p_err_test() : +- uct_p2p_test(0, uct_error_handler_t(ucs_empty_function_return_success)) { ++ uct_p2p_test(0, error_handler) { + } + + static size_t pack_cb(void *dest, void *arg) +@@ -43,9 +43,7 @@ public: + { + pack_arg arg; + +- wrap_errors(); +- +- UCS_TEST_SCOPE_EXIT() { restore_errors(); } UCS_TEST_SCOPE_EXIT_END ++ scoped_log_handler slh(wrap_errors_logger); + + ucs_status_t status = UCS_OK; + ssize_t packed_len; +@@ -130,6 +128,20 @@ public: + + static ucs_status_t last_error; + ++private: ++ static ucs_status_t ++ error_handler(void *arg, uct_ep_h ep, ucs_status_t status) { ++ uct_p2p_err_test *self = static_cast(arg); ++ const p2p_resource *r = dynamic_cast(self->GetParam()); ++ ucs_assert_always(r != NULL); ++ if (r->loopback) { ++ /* In loop back IB TLs can generate QP flush error before remote ++ * access error. */ ++ ucs_log(UCS_LOG_LEVEL_ERROR, "Error on ep %p with status %s is handled", ++ ep, ucs_status_string(status)); ++ } ++ return UCS_OK; ++ } + }; + + ucs_status_t uct_p2p_err_test::last_error = UCS_OK; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.cc +index 9f9e32435..c5ece1f6c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.cc +@@ -24,16 +24,21 @@ ucs_status_t uct_p2p_mix_test::am_callback(void *arg, void *data, size_t length, + + void uct_p2p_mix_test::completion_callback(uct_completion_t *comp, ucs_status_t status) + { +- ASSERT_UCS_OK(status); ++ EXPECT_UCS_OK(status); + } + +-ucs_status_t uct_p2p_mix_test::swap64(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp) ++template ++ucs_status_t uct_p2p_mix_test::uct_p2p_mix_test::atomic_fop(const mapped_buffer &sendbuf, ++ const mapped_buffer &recvbuf, ++ uct_completion_t *comp) + { +- return uct_ep_atomic_swap64(sender().ep(0), 1, recvbuf.addr(), +- recvbuf.rkey(), (uint64_t*)sendbuf.ptr(), +- comp); ++ if (sizeof(T) == sizeof(uint32_t)) { ++ return uct_ep_atomic32_fetch(sender().ep(0), OP, 1, (uint32_t*)sendbuf.ptr(), ++ recvbuf.addr(), recvbuf.rkey(), comp); ++ } else { ++ return uct_ep_atomic64_fetch(sender().ep(0), OP, 1, (uint64_t*)sendbuf.ptr(), ++ recvbuf.addr(), recvbuf.rkey(), comp); ++ } + } + + ucs_status_t uct_p2p_mix_test::cswap64(const mapped_buffer &sendbuf, +@@ -45,22 +50,6 @@ ucs_status_t uct_p2p_mix_test::cswap64(const mapped_buffer &sendbuf, + comp); + } + +-ucs_status_t uct_p2p_mix_test::uct_p2p_mix_test::fadd32(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp) +-{ +- return uct_ep_atomic_fadd32(sender().ep(0), 1, recvbuf.addr(), +- recvbuf.rkey(), (uint32_t*)sendbuf.ptr(), comp); +-} +- +-ucs_status_t uct_p2p_mix_test::swap32(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp) +-{ +- return uct_ep_atomic_swap32(sender().ep(0), 1, recvbuf.addr(), +- recvbuf.rkey(), (uint32_t*)sendbuf.ptr(), comp); +-} +- + ucs_status_t uct_p2p_mix_test::put_short(const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf, + uct_completion_t *comp) +@@ -166,6 +155,8 @@ void uct_p2p_mix_test::run(unsigned count) { + for (unsigned i = 0; i < count; ++i) { + random_op(sendbuf, recvbuf); + } ++ ++ sender().flush(); + } + + void uct_p2p_mix_test::init() { +@@ -192,17 +183,38 @@ void uct_p2p_mix_test::init() { + m_avail_send_funcs.push_back(&uct_p2p_mix_test::put_bcopy); + m_send_size = ucs_min(m_send_size, sender().iface_attr().cap.put.max_bcopy); + } +- if (sender().iface_attr().cap.flags & UCT_IFACE_FLAG_ATOMIC_SWAP64) { +- m_avail_send_funcs.push_back(&uct_p2p_mix_test::swap64); +- } +- if (sender().iface_attr().cap.flags & UCT_IFACE_FLAG_ATOMIC_CSWAP64) { ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_CSWAP)) { + m_avail_send_funcs.push_back(&uct_p2p_mix_test::cswap64); + } +- if (sender().iface_attr().cap.flags & UCT_IFACE_FLAG_ATOMIC_SWAP32) { +- m_avail_send_funcs.push_back(&uct_p2p_mix_test::swap32); ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_ADD)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_ADD)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_AND)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_AND)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_OR)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_OR)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_XOR)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_XOR)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); ++ } ++ if (sender().iface_attr().cap.atomic64.fop_flags & UCS_BIT(UCT_ATOMIC_OP_SWAP)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); + } +- if (sender().iface_attr().cap.flags & UCT_IFACE_FLAG_ATOMIC_FADD32) { +- m_avail_send_funcs.push_back(&uct_p2p_mix_test::fadd32); ++ if (sender().iface_attr().cap.atomic32.fop_flags & UCS_BIT(UCT_ATOMIC_OP_SWAP)) { ++ m_avail_send_funcs.push_back(&uct_p2p_mix_test::atomic_fop); + } + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.h +index d4dc51c77..458809525 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_mix.h +@@ -28,22 +28,15 @@ protected: + + static void completion_callback(uct_completion_t *comp, ucs_status_t status); + +- ucs_status_t swap64(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp); ++ template ++ ucs_status_t atomic_fop(const mapped_buffer &sendbuf, ++ const mapped_buffer &recvbuf, ++ uct_completion_t *comp); + + ucs_status_t cswap64(const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf, + uct_completion_t *comp); + +- ucs_status_t fadd32(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp); +- +- ucs_status_t swap32(const mapped_buffer &sendbuf, +- const mapped_buffer &recvbuf, +- uct_completion_t *comp); +- + ucs_status_t put_short(const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf, + uct_completion_t *comp); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.cc +index 574a778f6..832f02ef1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.cc +@@ -42,6 +42,13 @@ ucs_status_t uct_p2p_rma_test::put_zcopy(uct_ep_h ep, const mapped_buffer &sendb + return uct_ep_put_zcopy(ep, iov, iovcnt, recvbuf.addr(), recvbuf.rkey(), comp()); + } + ++ucs_status_t uct_p2p_rma_test::get_short(uct_ep_h ep, const mapped_buffer &sendbuf, ++ const mapped_buffer &recvbuf) ++{ ++ return uct_ep_get_short(ep, sendbuf.ptr(), sendbuf.length(), ++ recvbuf.addr(), recvbuf.rkey()); ++} ++ + ucs_status_t uct_p2p_rma_test::get_bcopy(uct_ep_h ep, const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf) + { +@@ -62,7 +69,13 @@ ucs_status_t uct_p2p_rma_test::get_zcopy(uct_ep_h ep, const mapped_buffer &sendb + void uct_p2p_rma_test::test_xfer(send_func_t send, size_t length, + unsigned flags, uct_memory_type_t mem_type) + { +- mapped_buffer sendbuf(length, SEED1, sender(), 1); ++ uct_memory_type_t src_mem_type = UCT_MD_MEM_TYPE_HOST; ++ ++ if ((GetParam()->tl_name.compare("cuda_ipc") == 0)) { ++ src_mem_type = mem_type; ++ } ++ ++ mapped_buffer sendbuf(length, SEED1, sender(), 1, src_mem_type); + mapped_buffer recvbuf(length, SEED2, receiver(), 3, mem_type); + + blocking_send(send, sender_ep(), sendbuf, recvbuf, true); +@@ -98,6 +111,13 @@ UCS_TEST_P(uct_p2p_rma_test, put_zcopy) { + TEST_UCT_FLAG_SEND_ZCOPY); + } + ++UCS_TEST_P(uct_p2p_rma_test, get_short) { ++ check_caps(UCT_IFACE_FLAG_GET_SHORT); ++ test_xfer_multi(static_cast(&uct_p2p_rma_test::get_short), ++ 0ul, sender().iface_attr().cap.get.max_short, ++ TEST_UCT_FLAG_RECV_ZCOPY); ++} ++ + UCS_TEST_P(uct_p2p_rma_test, get_bcopy) { + check_caps(UCT_IFACE_FLAG_GET_BCOPY); + test_xfer_multi(static_cast(&uct_p2p_rma_test::get_bcopy), +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.h +index d983593d2..599abe9d1 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_p2p_rma.h +@@ -26,6 +26,9 @@ public: + ucs_status_t put_zcopy(uct_ep_h ep, const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf); + ++ ucs_status_t get_short(uct_ep_h ep, const mapped_buffer &sendbuf, ++ const mapped_buffer &recvbuf); ++ + ucs_status_t get_bcopy(uct_ep_h ep, const mapped_buffer &sendbuf, + const mapped_buffer &recvbuf); + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_peer_failure.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_peer_failure.cc +index 40bff86ba..78f0b0821 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_peer_failure.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_peer_failure.cc +@@ -22,8 +22,7 @@ private: + void operator() (test_uct_peer_failure::entity *e) { + uct_iface_set_am_handler(e->iface(), 0, + am_dummy_handler, +- reinterpret_cast(m_test), +- UCT_CB_FLAG_SYNC); ++ reinterpret_cast(m_test), 0); + } + + test_uct_peer_failure* m_test; +@@ -40,8 +39,9 @@ public: + static uct_iface_params_t params; + + memset(¶ms, 0, sizeof(params)); +- params.err_handler = get_err_handler(); +- params.err_handler_arg = reinterpret_cast(this); ++ params.err_handler = get_err_handler(); ++ params.err_handler_arg = reinterpret_cast(this); ++ params.err_handler_flags = 0; + return params; + } + +@@ -187,9 +187,9 @@ void test_uct_peer_failure::init() + if (GetParam()->tl_name == "rc" || GetParam()->tl_name == "rc_mlx5" || + GetParam()->tl_name == "dc" || GetParam()->tl_name == "dc_mlx5") { + set_config("RC_TIMEOUT=100us"); /* 100 us should be enough */ +- set_config("RC_RETRY_COUNT=2"); ++ set_config("RC_RETRY_COUNT=4"); + } else if (GetParam()->tl_name == "ud" || GetParam()->tl_name == "ud_mlx5") { +- set_config("UD_TIMEOUT=1s"); ++ set_config("UD_TIMEOUT=3s"); + } + + uct_iface_params_t p = entity_params(); +@@ -210,14 +210,14 @@ UCS_TEST_P(test_uct_peer_failure, peer_failure) + { + check_caps(UCT_IFACE_FLAG_PUT_SHORT); + +- wrap_errors(); +- +- kill_receiver(); +- EXPECT_EQ(uct_ep_put_short(ep0(), NULL, 0, 0, 0), UCS_OK); ++ { ++ scoped_log_handler slh(wrap_errors_logger); + +- flush(); ++ kill_receiver(); ++ EXPECT_EQ(UCS_OK, uct_ep_put_short(ep0(), NULL, 0, 0, 0)); + +- restore_errors(); ++ flush(); ++ } + + UCS_TEST_GET_BUFFER_IOV(iov, iovcnt, NULL, 0, NULL, 1); + +@@ -234,15 +234,11 @@ UCS_TEST_P(test_uct_peer_failure, peer_failure) + UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_get_zcopy(ep0(), iov, iovcnt, 0, 0, NULL), + UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_add64(ep0(), 0, 0, 0), UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_add32(ep0(), 0, 0, 0), UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_fadd64(ep0(), 0, 0, 0, NULL, NULL), +- UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_fadd32(ep0(), 0, 0, 0, NULL, NULL), +- UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_swap64(ep0(), 0, 0, 0, NULL, NULL), ++ EXPECT_EQ(uct_ep_atomic64_post(ep0(), UCT_ATOMIC_OP_ADD, 0, 0, 0), UCS_ERR_ENDPOINT_TIMEOUT); ++ EXPECT_EQ(uct_ep_atomic32_post(ep0(), UCT_ATOMIC_OP_ADD, 0, 0, 0), UCS_ERR_ENDPOINT_TIMEOUT); ++ EXPECT_EQ(uct_ep_atomic64_fetch(ep0(), UCT_ATOMIC_OP_ADD, 0, NULL, 0, 0, NULL), + UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_atomic_swap32(ep0(), 0, 0, 0, NULL, NULL), ++ EXPECT_EQ(uct_ep_atomic32_fetch(ep0(), UCT_ATOMIC_OP_ADD, 0, NULL, 0, 0, NULL), + UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_atomic_cswap64(ep0(), 0, 0, 0, 0, NULL, NULL), + UCS_ERR_ENDPOINT_TIMEOUT); +@@ -250,7 +246,7 @@ UCS_TEST_P(test_uct_peer_failure, peer_failure) + UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_flush(ep0(), 0, NULL), UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_get_address(ep0(), NULL), UCS_ERR_ENDPOINT_TIMEOUT); +- EXPECT_EQ(uct_ep_pending_add(ep0(), NULL), UCS_ERR_ENDPOINT_TIMEOUT); ++ EXPECT_EQ(uct_ep_pending_add(ep0(), NULL, 0), UCS_ERR_ENDPOINT_TIMEOUT); + EXPECT_EQ(uct_ep_connect_to_ep(ep0(), NULL, NULL), UCS_ERR_ENDPOINT_TIMEOUT); + + EXPECT_GT(m_err_count, 0ul); +@@ -265,23 +261,25 @@ UCS_TEST_P(test_uct_peer_failure, purge_failed_peer) + send_recv_am(0); + send_recv_am(1); + +- wrap_errors(); +- kill_receiver(); +- +- ucs_status_t status; +- do { +- status = uct_ep_am_short(ep0(), 0, 0, NULL, 0); +- } while (status == UCS_OK); +- + const size_t num_pend_sends = 3ul; + uct_pending_req_t reqs[num_pend_sends]; +- for (size_t i = 0; i < num_pend_sends; i ++) { +- reqs[i].func = pending_cb; +- EXPECT_EQ(uct_ep_pending_add(ep0(), &reqs[i]), UCS_OK); +- } ++ { ++ scoped_log_handler slh(wrap_errors_logger); + +- flush(); +- restore_errors(); ++ kill_receiver(); ++ ++ ucs_status_t status; ++ do { ++ status = uct_ep_am_short(ep0(), 0, 0, NULL, 0); ++ } while (status == UCS_OK); ++ ++ for (size_t i = 0; i < num_pend_sends; i ++) { ++ reqs[i].func = pending_cb; ++ EXPECT_EQ(uct_ep_pending_add(ep0(), &reqs[i], 0), UCS_OK); ++ } ++ ++ flush(); ++ } + + EXPECT_EQ(uct_ep_am_short(ep0(), 0, 0, NULL, 0), UCS_ERR_ENDPOINT_TIMEOUT); + +@@ -302,12 +300,13 @@ UCS_TEST_P(test_uct_peer_failure, two_pairs_send) + } + + /* kill the 1st receiver while sending on 2nd pair */ +- wrap_errors(); +- kill_receiver(); +- send_am(0); +- send_recv_am(1); +- flush(); +- restore_errors(); ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ kill_receiver(); ++ send_am(0); ++ send_recv_am(1); ++ flush(); ++ } + + /* test flushing one operations */ + send_recv_am(0, UCS_ERR_ENDPOINT_TIMEOUT); +@@ -329,13 +328,14 @@ UCS_TEST_P(test_uct_peer_failure, two_pairs_send_after) + + set_am_handlers(); + +- wrap_errors(); +- kill_receiver(); +- for (int i = 0; i < 100; ++i) { +- send_am(0); ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ kill_receiver(); ++ for (int i = 0; i < 100; ++i) { ++ send_am(0); ++ } ++ flush(); + } +- flush(); +- restore_errors(); + + send_recv_am(0, UCS_ERR_ENDPOINT_TIMEOUT); + +@@ -368,11 +368,10 @@ UCS_TEST_P(test_uct_peer_failure_cb, desproy_ep_cb) + { + check_caps(UCT_IFACE_FLAG_PUT_SHORT); + +- wrap_errors(); ++ scoped_log_handler slh(wrap_errors_logger); + kill_receiver(); + EXPECT_EQ(uct_ep_put_short(ep0(), NULL, 0, 0, 0), UCS_OK); + flush(); +- restore_errors(); + } + + UCT_INSTANTIATE_TEST_CASE(test_uct_peer_failure_cb) +@@ -445,24 +444,25 @@ UCS_TEST_P(test_uct_peer_failure_multiple, test, "RC_TM_ENABLE?=n") + ucs_time_t timeout = ucs_get_time() + + ucs_time_from_sec(200 * ucs::test_time_multiplier()); + +- wrap_errors(); +- for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { +- for (size_t i = 0; i < m_tx_window; ++i) { +- send_am(idx); ++ { ++ scoped_log_handler slh(wrap_errors_logger); ++ for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { ++ for (size_t i = 0; i < m_tx_window; ++i) { ++ send_am(idx); ++ } ++ kill_receiver(); + } +- kill_receiver(); +- } +- flush(timeout); ++ flush(timeout); + +- /* if EPs are not failed yet, these ops should trigger that */ +- for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { +- for (size_t i = 0; i < m_tx_window; ++i) { +- send_am(idx); ++ /* if EPs are not failed yet, these ops should trigger that */ ++ for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { ++ for (size_t i = 0; i < m_tx_window; ++i) { ++ send_am(idx); ++ } + } +- } + +- flush(timeout); +- restore_errors(); ++ flush(timeout); ++ } + + for (size_t idx = 0; idx < m_nreceivers - 1; ++idx) { + send_recv_am(idx, UCS_ERR_ENDPOINT_TIMEOUT); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_pending.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_pending.cc +index 6bbf74bff..389354782 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_pending.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_pending.cc +@@ -34,6 +34,7 @@ public: + uct_pending_req_t uct; + int active; + int id; ++ mapped_buffer *buf; + } pending_send_request_t; + + static ucs_status_t am_handler(void *arg, void *data, size_t length, +@@ -70,7 +71,7 @@ public: + status = uct_ep_am_short(req->ep, 0, test_pending_hdr, &req->data, + sizeof(req->data)); + if (status == UCS_OK) { +- delete req; ++ pending_delete(req); + } + return status; + } +@@ -91,6 +92,29 @@ public: + return status; + } + ++ static ucs_status_t pending_send_op_bcopy(uct_pending_req_t *self) { ++ ++ pending_send_request_t *req = ucs_container_of(self, pending_send_request_t, uct); ++ ssize_t packed_len; ++ ++ packed_len = uct_ep_am_bcopy(req->ep, 0, mapped_buffer::pack, req->buf, 0); ++ if (packed_len > 0) { ++ req->countdown ++; ++ n_pending--; ++ req->active = 0; ++ return UCS_OK; ++ } ++ return (ucs_status_t)packed_len; ++ } ++ ++ static ucs_status_t pending_send_op_ok(uct_pending_req_t *self) { ++ pending_send_request_t *req = ucs_container_of(self, pending_send_request_t, uct); ++ ++ pending_delete(req); ++ n_pending--; ++ return UCS_OK; ++ } ++ + pending_send_request_t* pending_alloc(uint64_t send_data) { + pending_send_request_t *req = new pending_send_request_t(); + req->ep = m_e1->ep(0); +@@ -111,6 +135,20 @@ public: + return req; + } + ++ pending_send_request_t* pending_alloc_simple(mapped_buffer *sbuf, int idx) { ++ pending_send_request_t *req = new pending_send_request_t(); ++ req->ep = m_e1->ep(idx); ++ req->buf = sbuf; ++ req->countdown = 0; ++ req->uct.func = pending_send_op_bcopy; ++ req->active = 0; ++ req->id = idx; ++ return req; ++ } ++ ++ static void pending_delete(pending_send_request_t *req) { ++ delete req; ++ } + + protected: + static const uint64_t test_pending_hdr = 0xabcd; +@@ -129,8 +167,9 @@ void install_handler_sync_or_async(uct_iface_t *iface, uint8_t id, uct_am_callba + ASSERT_UCS_OK(status); + + if (attr.cap.flags & UCT_IFACE_FLAG_CB_SYNC) { +- uct_iface_set_am_handler(iface, id, cb, arg, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(iface, id, cb, arg, 0); + } else { ++ ASSERT_TRUE(attr.cap.flags & UCT_IFACE_FLAG_CB_ASYNC); + uct_iface_set_am_handler(iface, id, cb, arg, UCT_CB_FLAG_ASYNC); + } + } +@@ -159,11 +198,11 @@ UCS_TEST_P(test_uct_pending, pending_op) + + pending_send_request_t *req = pending_alloc(send_data); + +- status = uct_ep_pending_add(m_e1->ep(0), &req->uct); ++ status = uct_ep_pending_add(m_e1->ep(0), &req->uct, 0); + if (status != UCS_OK) { + /* the request wasn't added to the pending data structure + * since resources became available. retry sending this message */ +- delete req; ++ pending_delete(req); + } else { + /* the request was added to the pending data structure */ + send_data += 1; +@@ -209,9 +248,9 @@ UCS_TEST_P(test_uct_pending, send_ooo_with_pending) + + pending_send_request_t *req = pending_alloc(send_data); + +- status_pend = uct_ep_pending_add(m_e1->ep(0), &req->uct); ++ status_pend = uct_ep_pending_add(m_e1->ep(0), &req->uct, 0); + if (status_pend == UCS_ERR_BUSY) { +- delete req; ++ pending_delete(req); + } else { + /* coverity[leaked_storage] */ + ++send_data; +@@ -254,6 +293,116 @@ UCS_TEST_P(test_uct_pending, send_ooo_with_pending) + EXPECT_EQ(exp_counter, counter); + } + ++/* ++ * test that the pending op callback is only called from the progress() ++ */ ++UCS_TEST_P(test_uct_pending, pending_async) ++{ ++ pending_send_request_t *req = NULL; ++ ucs_status_t status; ++ ssize_t packed_len; ++ ++ initialize(); ++ check_caps(UCT_IFACE_FLAG_AM_BCOPY | UCT_IFACE_FLAG_PENDING); ++ ++ mapped_buffer sbuf(ucs_min(64ul, m_e1->iface_attr().cap.am.max_bcopy), 0, ++ *m_e1); ++ ++ req = pending_alloc_simple(&sbuf, 0); ++ ++ /* set a callback for the uct to invoke when receiving the data */ ++ install_handler_sync_or_async(m_e2->iface(), 0, am_handler_simple, 0); ++ ++ /* send while resources are available */ ++ n_pending = 0; ++ do { ++ packed_len = uct_ep_am_bcopy(m_e1->ep(0), 0, mapped_buffer::pack, ++ &sbuf, 0); ++ } while (packed_len >= 0); ++ ++ EXPECT_TRUE(packed_len == UCS_ERR_NO_RESOURCE); ++ ++ status = uct_ep_pending_add(m_e1->ep(0), &req->uct, 0); ++ EXPECT_UCS_OK(status); ++ n_pending++; ++ ++ /* pending op must not be called either asynchronously or from the ++ * uct_ep_am_bcopy() */ ++ twait(300); ++ EXPECT_EQ(1, n_pending); ++ ++ packed_len = uct_ep_am_bcopy(m_e1->ep(0), 0, mapped_buffer::pack, &sbuf, 0); ++ EXPECT_EQ(1, n_pending); ++ EXPECT_GT(0, packed_len); ++ ++ wait_for_value(&n_pending, 0, true); ++ EXPECT_EQ(0, n_pending); ++ pending_delete(req); ++} ++ ++/* ++ * test that arbiter does not block when ucs_ok is returned ++ * The issue is a dc transport specific but test may be also useful ++ * for other transports ++ */ ++UCS_TEST_P(test_uct_pending, pending_ucs_ok_dc_arbiter_bug) ++{ ++ ucs_status_t status; ++ ssize_t packed_len; ++ int N; ++ int i; ++ ++ initialize(); ++ check_caps(UCT_IFACE_FLAG_AM_BCOPY | UCT_IFACE_FLAG_PENDING); ++ ++ mapped_buffer sbuf(ucs_min(64ul, m_e1->iface_attr().cap.am.max_bcopy), 0, ++ *m_e1); ++ ++ /* set a callback for the uct to invoke when receiving the data */ ++ install_handler_sync_or_async(m_e2->iface(), 0, am_handler_simple, 0); ++ ++ if (RUNNING_ON_VALGRIND) { ++ N = 64; ++ } else if (m_e1->iface_attr().cap.flags & UCT_IFACE_FLAG_CONNECT_TO_IFACE) { ++ N = 2048; ++ } else { ++ N = 128; ++ } ++ ++ N = ucs_min(N, max_connections()); ++ ++ /* idx 0 is setup in initialize(). only need to alloc request */ ++ for (i = 1; i < N; i++) { ++ m_e1->connect(i, *m_e2, i); ++ } ++ /* give a chance to finish connection for some transports (ud) */ ++ short_progress_loop(); ++ ++ n_pending = 0; ++ ++ /* try to exaust global resources and create a pending queue */ ++ for (i = 0; i < N; i++) { ++ packed_len = uct_ep_am_bcopy(m_e1->ep(i), 0, mapped_buffer::pack, ++ &sbuf, 0); ++ ++ if (packed_len == UCS_ERR_NO_RESOURCE) { ++ pending_send_request_t *req = pending_alloc(i); ++ ++ req->uct.func = pending_send_op_ok; ++ status = uct_ep_pending_add(m_e1->ep(i), &req->uct, 0); ++ EXPECT_UCS_OK(status); ++ n_pending++; ++ /* coverity[leaked_storage] */ ++ } ++ } ++ ++ UCS_TEST_MESSAGE << "pending queue len: " << n_pending; ++ ++ wait_for_value(&n_pending, 0, true); ++ EXPECT_EQ(0, n_pending); ++} ++ ++ + UCS_TEST_P(test_uct_pending, pending_fairness) + { + int N=16; +@@ -296,7 +445,8 @@ UCS_TEST_P(test_uct_pending, pending_fairness) + &send_data, sizeof(send_data)); + if (status == UCS_ERR_NO_RESOURCE) { + /* schedule pending */ +- status = uct_ep_pending_add(m_e1->ep(i), &reqs[i]->uct); ++ status = uct_ep_pending_add(m_e1->ep(i), &reqs[i]->uct, ++ 0); + if (status == UCS_ERR_BUSY) { + continue; /* retry */ + } +@@ -343,7 +493,7 @@ UCS_TEST_P(test_uct_pending, pending_fairness) + flush(); + + for (i = 0; i < N; i++) { +- delete reqs[i]; ++ pending_delete(reqs[i]); + } + + /* there must be no starvation */ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_stats.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_stats.cc +index 571b4c667..77ce0b6ce 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_stats.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_stats.cc +@@ -31,7 +31,7 @@ public: + void init_bufs(size_t min, size_t max) + { + size_t size = ucs_max(min, ucs_min(64ul, max)); +- lbuf = new mapped_buffer(size, 0, sender()); ++ lbuf = new mapped_buffer(size, 0, sender(), 0, sender().md_attr().cap.mem_type); + rbuf = new mapped_buffer(size, 0, receiver(), 0, sender().md_attr().cap.mem_type); + } + +@@ -284,43 +284,55 @@ UCS_TEST_P(test_uct_stats, get_zcopy) + lbuf->length()); + } + +-#define TEST_STATS_ATOMIC_ADD(val) \ +-UCS_TEST_P(test_uct_stats, atomic_add ## val) \ +-{ \ +- ucs_status_t status; \ +-\ +- check_caps(UCT_IFACE_FLAG_ATOMIC_ADD ## val); \ +- init_bufs(sizeof(uint##val##_t), sizeof(uint##val##_t)); \ +- status = uct_ep_atomic_add ## val (sender_ep(), 1, rbuf->addr(), rbuf->rkey()); \ +- EXPECT_UCS_OK(status); \ +- check_atomic_counters(); \ ++#define TEST_STATS_ATOMIC_POST(_op, _val) \ ++UCS_TEST_P(test_uct_stats, atomic_post_ ## _op ## _val) \ ++{ \ ++ ucs_status_t status; \ ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ ## _op), OP ## _val); \ ++ init_bufs(sizeof(uint##_val##_t), sizeof(uint##_val##_t)); \ ++ status = uct_ep_atomic ##_val##_post(sender_ep(), (UCT_ATOMIC_OP_ ## _op), \ ++ 1, rbuf->addr(), rbuf->rkey()); \ ++ EXPECT_UCS_OK(status); \ ++ check_atomic_counters(); \ + } + +-TEST_STATS_ATOMIC_ADD(32) +- +-TEST_STATS_ATOMIC_ADD(64) +- +-#define TEST_STATS_ATOMIC_FUNC(func, flag, val) \ +-UCS_TEST_P(test_uct_stats, atomic_##func##val) \ +-{ \ +- ucs_status_t status; \ +- uint##val##_t result; \ +-\ +- check_caps(UCT_IFACE_FLAG_ATOMIC_ ## flag ## val); \ +- init_bufs(sizeof(result), sizeof(result)); \ +-\ +- init_completion(); \ +- status = uct_ep_atomic_##func##val (sender_ep(), 1, rbuf->addr(), rbuf->rkey(), &result, &m_comp); \ +- wait_for_completion(status); \ +-\ +- check_atomic_counters(); \ ++TEST_STATS_ATOMIC_POST(ADD, 32) ++TEST_STATS_ATOMIC_POST(ADD, 64) ++TEST_STATS_ATOMIC_POST(AND, 32) ++TEST_STATS_ATOMIC_POST(AND, 64) ++TEST_STATS_ATOMIC_POST(OR, 32) ++TEST_STATS_ATOMIC_POST(OR, 64) ++TEST_STATS_ATOMIC_POST(XOR, 32) ++TEST_STATS_ATOMIC_POST(XOR, 64) ++ ++ ++#define TEST_STATS_ATOMIC_FETCH(_op, _val) \ ++UCS_TEST_P(test_uct_stats, atomic_fetch_## _op ## _val) \ ++{ \ ++ ucs_status_t status; \ ++ uint##_val##_t result; \ ++ \ ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_ ## _op), FOP ## _val); \ ++ init_bufs(sizeof(result), sizeof(result)); \ ++ \ ++ init_completion(); \ ++ status = uct_ep_atomic##_val##_fetch(sender_ep(), (UCT_ATOMIC_OP_ ## _op), 1, \ ++ &result, rbuf->addr(), rbuf->rkey(), &m_comp); \ ++ wait_for_completion(status); \ ++ \ ++ check_atomic_counters(); \ + } + +-TEST_STATS_ATOMIC_FUNC(fadd, FADD, 32) +-TEST_STATS_ATOMIC_FUNC(fadd, FADD, 64) +- +-TEST_STATS_ATOMIC_FUNC(swap, SWAP, 32) +-TEST_STATS_ATOMIC_FUNC(swap, SWAP, 64) ++TEST_STATS_ATOMIC_FETCH(ADD, 32) ++TEST_STATS_ATOMIC_FETCH(ADD, 64) ++TEST_STATS_ATOMIC_FETCH(AND, 32) ++TEST_STATS_ATOMIC_FETCH(AND, 64) ++TEST_STATS_ATOMIC_FETCH(OR, 32) ++TEST_STATS_ATOMIC_FETCH(OR, 64) ++TEST_STATS_ATOMIC_FETCH(XOR, 32) ++TEST_STATS_ATOMIC_FETCH(XOR, 64) ++TEST_STATS_ATOMIC_FETCH(SWAP, 32) ++TEST_STATS_ATOMIC_FETCH(SWAP, 64) + + #define TEST_STATS_ATOMIC_CSWAP(val) \ + UCS_TEST_P(test_uct_stats, atomic_cswap##val) \ +@@ -328,7 +340,7 @@ UCS_TEST_P(test_uct_stats, atomic_cswap##val) \ + ucs_status_t status; \ + uint##val##_t result; \ + \ +- check_caps(UCT_IFACE_FLAG_ATOMIC_CSWAP ## val); \ ++ check_atomics(UCS_BIT(UCT_ATOMIC_OP_CSWAP), FOP ## val); \ + init_bufs(sizeof(result), sizeof(result)); \ + \ + init_completion(); \ +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_tag.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_tag.cc +index dc0d4835c..b86218e86 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_tag.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_tag.cc +@@ -10,6 +10,11 @@ extern "C" { + #include + #include "uct_test.h" + ++#define UCT_TAG_INSTANTIATE_TEST_CASE(_test_case) \ ++ _UCT_INSTANTIATE_TEST_CASE(_test_case, rc) \ ++ _UCT_INSTANTIATE_TEST_CASE(_test_case, dc) \ ++ _UCT_INSTANTIATE_TEST_CASE(_test_case, rc_mlx5) \ ++ _UCT_INSTANTIATE_TEST_CASE(_test_case, dc_mlx5) + + class test_tag : public uct_test { + public: +@@ -36,30 +41,28 @@ public: + }; + + struct send_ctx { +- send_ctx(mapped_buffer *b, uct_tag_t t, uint64_t i) : +- mbuf(b), rndv_op(NULL), tag(t), imm_data(i) { +- +- uct_comp.count = 2; +- uct_comp.func = NULL; +- sw_rndv = false; +- } + mapped_buffer *mbuf; + void *rndv_op; + uct_tag_t tag; + uint64_t imm_data; + uct_completion_t uct_comp; +- bool sw_rndv; ++ ucs_status_t status; ++ bool sw_rndv; ++ bool comp; ++ bool unexp; + }; + + typedef ucs_status_t (test_tag::*send_func)(entity&, send_ctx&); + +- void init() { ++ void init() ++ { + ucs_status_t status = uct_config_modify(m_iface_config, "RC_TM_ENABLE", "y"); + ASSERT_TRUE((status == UCS_OK) || (status == UCS_ERR_NO_ELEM)); + + uct_test::init(); + + uct_iface_params params; ++ memset(¶ms, 0, sizeof(params)); + + // tl and dev names are taken from resources via GetParam, no need + // to fill it here +@@ -86,8 +89,23 @@ public: + } + } + ++ void init_send_ctx(send_ctx &s,mapped_buffer *b, uct_tag_t t, uint64_t i, ++ bool unexp_flow = true) ++ { ++ s.mbuf = b; ++ s.rndv_op = NULL; ++ s.tag = t; ++ s.imm_data = i; ++ s.uct_comp.count = 1; ++ s.uct_comp.func = send_completion; ++ s.sw_rndv = s.comp = false; ++ s.unexp = unexp_flow; ++ s.status = UCS_ERR_NO_PROGRESS; ++ } ++ + void init_recv_ctx(recv_ctx &r, mapped_buffer *b, uct_tag_t t, +- uct_tag_t m = MASK, bool uct_d = false) { ++ uct_tag_t m = MASK, bool uct_d = false) ++ { + r.mbuf = b; + r.tag = t; + r.tmask = m; +@@ -95,13 +113,17 @@ public: + r.uct_ctx.tag_consumed_cb = tag_consumed; + r.uct_ctx.rndv_cb = sw_rndv_completed; + r.take_uct_desc = uct_d; ++ r.status = UCS_ERR_NO_PROGRESS; + r.comp = r.unexp = r.consumed = r.sw_rndv = false; + } + + ucs_status_t tag_eager_short(entity &e, send_ctx &ctx) + { +- return uct_ep_tag_eager_short(e.ep(0), ctx.tag, ctx.mbuf->ptr(), +- ctx.mbuf->length()); ++ ctx.status = uct_ep_tag_eager_short(e.ep(0), ctx.tag, ctx.mbuf->ptr(), ++ ctx.mbuf->length()); ++ ctx.comp = true; ++ ++ return ctx.status; + } + + ucs_status_t tag_eager_bcopy(entity &e, send_ctx &ctx) +@@ -110,8 +132,10 @@ public: + ctx.imm_data, mapped_buffer::pack, + reinterpret_cast(ctx.mbuf), + 0); ++ ctx.status = (status >= 0) ? UCS_OK : static_cast(status); ++ ctx.comp = true; + +- return (status >= 0) ? UCS_OK : static_cast(status); ++ return ctx.status; + } + + ucs_status_t tag_eager_zcopy(entity &e, send_ctx &ctx) +@@ -155,14 +179,25 @@ public: + + ucs_status_t tag_rndv_request(entity &e, send_ctx &ctx) + { +- rndv_hdr hdr = {{ctx.imm_data, +- reinterpret_cast(&ctx) +- }, +- 0xFAFA +- }; + ctx.sw_rndv = true; + +- return uct_ep_tag_rndv_request(e.ep(0), ctx.tag, &hdr, sizeof(hdr), 0); ++ if (ctx.unexp) { ++ // Unexpected flow, will need to analyze ctx data on the receiver ++ rndv_hdr hdr = {{ctx.imm_data, ++ reinterpret_cast(&ctx) ++ }, ++ 0xFAFA ++ }; ++ ctx.status = uct_ep_tag_rndv_request(e.ep(0), ctx.tag, &hdr, ++ sizeof(hdr), 0); ++ } else { ++ // Expected flow, send just plain data (will be stored in rx buf by HCA) ++ ctx.status = uct_ep_tag_rndv_request(e.ep(0), ctx.tag, ctx.mbuf->ptr(), ++ ctx.mbuf->length(), 0); ++ } ++ ctx.comp = true; ++ ++ return ctx.status; + } + + ucs_status_t tag_post(entity &e, recv_ctx &ctx) +@@ -184,20 +219,33 @@ public: + // called). And it is vice versa if message arrives unexpectedly. + // If expected SW RNDV request arrives tag_consumed and sw_rndv_cb + // should be called. +- void check_completion(recv_ctx &ctx, bool is_expected, uint64_t seed, +- ucs_status_t status = UCS_OK, bool is_sw_rndv = false) { +- EXPECT_EQ(ctx.consumed, is_expected); +- EXPECT_EQ(ctx.comp, (is_expected && !is_sw_rndv)); +- EXPECT_EQ(ctx.unexp, (!is_expected && !is_sw_rndv)); +- EXPECT_EQ(ctx.sw_rndv, is_sw_rndv); +- EXPECT_EQ(ctx.status, status); +- if (is_expected) { +- ctx.mbuf->pattern_check(seed); +- } +- } +- +- void test_tag_expected(send_func sfunc, size_t length = 75) { +- uct_tag_t tag = 11; ++ void check_rx_completion(recv_ctx &ctx, bool is_expected, uint64_t seed, ++ ucs_status_t status = UCS_OK, bool is_sw_rndv = false) ++ { ++ EXPECT_EQ(ctx.consumed, is_expected); ++ EXPECT_EQ(ctx.comp, (is_expected && !is_sw_rndv)); ++ EXPECT_EQ(ctx.unexp, (!is_expected && !is_sw_rndv)); ++ EXPECT_EQ(ctx.sw_rndv, is_sw_rndv); ++ EXPECT_EQ(ctx.status, status); ++ if (is_expected) { ++ ctx.mbuf->pattern_check(seed); ++ } ++ } ++ ++ void check_tx_completion(send_ctx &ctx) ++ { ++ wait_for_flag(&ctx.comp); ++ EXPECT_TRUE(ctx.comp); ++ EXPECT_EQ(ctx.status, UCS_OK); ++ } ++ ++ void test_tag_expected(send_func sfunc, size_t length = 75, ++ bool is_sw_rndv = false) { ++ uct_tag_t tag = 11; ++ ++ if (RUNNING_ON_VALGRIND) { ++ length = ucs_min(length, 128U); ++ } + + mapped_buffer recvbuf(length, RECV_SEED, receiver()); + recv_ctx r_ctx; +@@ -207,25 +255,36 @@ public: + short_progress_loop(); + + mapped_buffer sendbuf(length, SEND_SEED, sender()); +- send_ctx s_ctx(&sendbuf, tag, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, tag, reinterpret_cast(&r_ctx), ++ false); + ASSERT_UCS_OK((this->*sfunc)(sender(), s_ctx)); + +- wait_for_flag(&r_ctx.comp); ++ wait_for_flag(is_sw_rndv ? &r_ctx.sw_rndv : &r_ctx.comp); ++ ++ check_rx_completion(r_ctx, true, SEND_SEED, UCS_OK, is_sw_rndv); + +- check_completion(r_ctx, true, SEND_SEED); ++ // If it was RNDV send, need to wait send completion as well ++ check_tx_completion(s_ctx); + + flush(); + } + + void test_tag_unexpected(send_func sfunc, size_t length = 75, +- bool take_uct_desc = false) { ++ bool take_uct_desc = false) ++ { + uct_tag_t tag = 11; + ++ if (RUNNING_ON_VALGRIND) { ++ length = ucs_min(length, 128U); ++ } ++ + mapped_buffer recvbuf(length, RECV_SEED, receiver()); + mapped_buffer sendbuf(length, SEND_SEED, sender()); + recv_ctx r_ctx; + init_recv_ctx(r_ctx, &recvbuf, tag, MASK, take_uct_desc); +- send_ctx s_ctx(&sendbuf, tag, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, tag, reinterpret_cast(&r_ctx)); + ASSERT_UCS_OK((this->*sfunc)(sender(), s_ctx)); + + wait_for_flag(&r_ctx.unexp); +@@ -236,11 +295,12 @@ public: + ASSERT_UCS_OK(tag_rndv_cancel(sender(), s_ctx.rndv_op)); + } + +- check_completion(r_ctx, false, SEND_SEED); ++ check_rx_completion(r_ctx, false, SEND_SEED); + flush(); + } + +- void test_tag_wrong_tag(send_func sfunc) { ++ void test_tag_wrong_tag(send_func sfunc) ++ { + const size_t length = 65; + uct_tag_t tag = 11; + +@@ -251,7 +311,8 @@ public: + // and not to be macthed. + recv_ctx r_ctx; + init_recv_ctx(r_ctx, &recvbuf, tag + 1); +- send_ctx s_ctx(&sendbuf, tag, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, tag, reinterpret_cast(&r_ctx)); + + ASSERT_UCS_OK((this->*sfunc)(sender(), s_ctx)); + +@@ -263,11 +324,12 @@ public: + + // Message should be reported as unexpected and filled with + // recv seed (unchanged), as the incoming tag does not match the expected +- check_completion(r_ctx, false, RECV_SEED); ++ check_rx_completion(r_ctx, false, RECV_SEED); + flush(); + } + +- void test_tag_mask(send_func sfunc) { ++ void test_tag_mask(send_func sfunc) ++ { + const size_t length = 65; + + mapped_buffer recvbuf(length, RECV_SEED, receiver()); +@@ -281,12 +343,16 @@ public: + short_progress_loop(); + + mapped_buffer sendbuf(length, SEND_SEED, sender()); +- send_ctx s_ctx(&sendbuf, 0xffff, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, 0xffff, reinterpret_cast(&r_ctx)); + ASSERT_UCS_OK((this->*sfunc)(sender(), s_ctx)); + wait_for_flag(&r_ctx.comp); + + // Should be matched because tags are equal with tag mask applied. +- check_completion(r_ctx, true, SEND_SEED); ++ check_rx_completion(r_ctx, true, SEND_SEED); ++ ++ // If it was RNDV send, need to wait send completion as well ++ check_tx_completion(s_ctx); + flush(); + } + +@@ -366,7 +432,8 @@ public: + } + + static ucs_status_t am_handler(void *arg, void *data, size_t length, +- unsigned flags) { ++ unsigned flags) ++ { + is_am_received = true; + return UCS_OK; + } +@@ -382,6 +449,14 @@ public: + return UCS_LOG_FUNC_RC_CONTINUE; + } + ++ static void send_completion(uct_completion_t *self, ucs_status_t status) ++ { ++ send_ctx *user_ctx = ucs_container_of(self, send_ctx, uct_comp); ++ user_ctx->comp = true; ++ user_ctx->status = status; ++ } ++ ++ + protected: + uct_test::entity& sender() { + return **m_entities.begin(); +@@ -509,8 +584,7 @@ UCS_TEST_P(test_tag, tag_send_no_tag) + { + check_caps(UCT_IFACE_FLAG_TAG_EAGER_BCOPY); + +- uct_iface_set_am_handler(receiver().iface(), 0, am_handler, +- NULL, UCT_CB_FLAG_SYNC); ++ uct_iface_set_am_handler(receiver().iface(), 0, am_handler, NULL, 0); + mapped_buffer lbuf(200, SEND_SEED, sender()); + ssize_t len = uct_ep_am_bcopy(sender().ep(0), 0, mapped_buffer::pack, + reinterpret_cast(&lbuf), 0); +@@ -535,13 +609,14 @@ UCS_TEST_P(test_tag, tag_cancel_force) + short_progress_loop(); + + mapped_buffer sendbuf(length, SEND_SEED, sender()); +- send_ctx s_ctx(&sendbuf, 1, reinterpret_cast(&r_ctx)); ++ send_ctx s_ctx; ++ init_send_ctx(s_ctx, &sendbuf, 1, reinterpret_cast(&r_ctx)); + ASSERT_UCS_OK(tag_eager_bcopy(sender(), s_ctx)); + + // Message should arrive unexpected, since tag was cancelled + // on the receiver. + wait_for_flag(&r_ctx.unexp); +- check_completion(r_ctx, false, SEND_SEED); ++ check_rx_completion(r_ctx, false, SEND_SEED); + } + + UCS_TEST_P(test_tag, tag_cancel_noforce) +@@ -557,7 +632,7 @@ UCS_TEST_P(test_tag, tag_cancel_noforce) + short_progress_loop(200); + ASSERT_UCS_OK(tag_cancel(receiver(), r_ctx, 0)); + +- short_progress_loop(); ++ wait_for_flag(&r_ctx.comp); + + // Check that completed callback has been called with CANCELED status + // (because 0 was passed as force parameter to cancel). +@@ -604,28 +679,8 @@ UCS_TEST_P(test_tag, sw_rndv_expected) + { + check_caps(UCT_IFACE_FLAG_TAG_EAGER_BCOPY | UCT_IFACE_FLAG_TAG_RNDV_ZCOPY); + +- uct_tag_t tag = 11; +- const size_t length = sender().iface_attr().cap.tag.rndv.max_hdr; +- +- mapped_buffer recvbuf(length, RECV_SEED, receiver()); +- recv_ctx r_ctx; +- init_recv_ctx(r_ctx, &recvbuf, tag); +- ASSERT_UCS_OK(tag_post(receiver(), r_ctx)); +- +- short_progress_loop(); +- +- mapped_buffer sendbuf(length, SEND_SEED, sender()); +- send_ctx s_ctx(&sendbuf, tag, reinterpret_cast(&r_ctx)); +- +- ASSERT_UCS_OK(uct_ep_tag_rndv_request(sender().ep(0), s_ctx.tag, +- s_ctx.mbuf->ptr(), +- s_ctx.mbuf->length(), 0)); +- +- wait_for_flag(&r_ctx.sw_rndv); +- +- check_completion(r_ctx, true, SEND_SEED, UCS_OK, true); +- +- flush(); ++ test_tag_expected(static_cast(&test_tag::tag_rndv_request), ++ sender().iface_attr().cap.tag.rndv.max_hdr, true); + } + + UCS_TEST_P(test_tag, rndv_limit) +@@ -639,7 +694,8 @@ UCS_TEST_P(test_tag, rndv_limit) + void *op; + + do { +- sctx_p = new send_ctx(&sendbuf, 0xffff, 0); ++ sctx_p = new send_ctx; ++ init_send_ctx(*sctx_p, &sendbuf, 0xffff, 0); + status = tag_rndv_zcopy(sender(), *sctx_p); + sctxs.push_back(sctx_p); + } while (status == UCS_OK); +@@ -666,7 +722,171 @@ UCS_TEST_P(test_tag, sw_rndv_unexpected) + test_tag_unexpected(static_cast(&test_tag::tag_rndv_request)); + } + +-_UCT_INSTANTIATE_TEST_CASE(test_tag, rc) +-_UCT_INSTANTIATE_TEST_CASE(test_tag, dc) +-_UCT_INSTANTIATE_TEST_CASE(test_tag, rc_mlx5) +-_UCT_INSTANTIATE_TEST_CASE(test_tag, dc_mlx5) ++UCT_TAG_INSTANTIATE_TEST_CASE(test_tag) ++ ++ ++#if ENABLE_STATS && IBV_EXP_HW_TM ++extern "C" { ++#include ++#include ++#include ++} ++ ++class test_tag_stats : public test_tag { ++public: ++ void init() { ++ stats_activate(); ++ test_tag::init(); ++ } ++ ++ void cleanup() { ++ test_tag::cleanup(); ++ stats_restore(); ++ } ++ ++ ucs_stats_node_t *ep_stats(const entity &e) ++ { ++ return ucs_derived_of(e.ep(0), uct_base_ep_t)->stats; ++ } ++ ++ ucs_stats_node_t *iface_stats(const entity &e) ++ { ++ return ucs_derived_of(e.iface(), uct_rc_iface_t)->tm.stats; ++ } ++ ++ void provoke_sync(const entity &e) ++ { ++ uct_rc_iface_t *iface = ucs_derived_of(e.iface(), uct_rc_iface_t); ++ ++ // Counters are synced every IBV_DEVICE_MAX_UNEXP_COUNT ops, set ++ // it one op before, so that any following unexpected message would ++ // cause HW ans SW counters sync. ++ iface->tm.unexpected_cnt = IBV_DEVICE_MAX_UNEXP_COUNT - 1; ++ } ++ ++ void check_tx_counters(int op, uint64_t op_val, int type, size_t len) ++ { ++ uint64_t v; ++ ++ v = UCS_STATS_GET_COUNTER(ep_stats(sender()), op); ++ EXPECT_EQ(op_val, v); ++ ++ // With valgrind reduced messages is sent ++ if (!RUNNING_ON_VALGRIND) { ++ v = UCS_STATS_GET_COUNTER(ep_stats(sender()), type); ++ EXPECT_EQ(len, v); ++ } ++ } ++ ++ void check_rx_counter(int op, uint64_t val, entity &e) ++ { ++ EXPECT_EQ(val, UCS_STATS_GET_COUNTER(iface_stats(e), op)); ++ } ++}; ++ ++UCS_TEST_P(test_tag_stats, tag_expected_eager) ++{ ++ check_caps(UCT_IFACE_FLAG_TAG_EAGER_SHORT | ++ UCT_IFACE_FLAG_TAG_EAGER_BCOPY | ++ UCT_IFACE_FLAG_TAG_EAGER_ZCOPY); ++ ++ std::pair > sfuncs[3] = { ++ std::make_pair(static_cast(&test_tag::tag_eager_short), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_short, ++ static_cast(UCT_EP_STAT_BYTES_SHORT))), ++ ++ std::make_pair(static_cast(&test_tag::tag_eager_bcopy), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_bcopy, ++ static_cast(UCT_EP_STAT_BYTES_BCOPY))), ++ ++ std::make_pair(static_cast(&test_tag::tag_eager_zcopy), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_zcopy, ++ static_cast(UCT_EP_STAT_BYTES_ZCOPY))) ++ }; ++ ++ for (int i = 0; i < 3; ++i) { ++ test_tag_expected(sfuncs[i].first, sfuncs[i].second.first); ++ check_tx_counters(UCT_EP_STAT_TAG, i + 1, ++ sfuncs[i].second.second, ++ sfuncs[i].second.first); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_EXP, i + 1, receiver()); ++ } ++} ++ ++UCS_TEST_P(test_tag_stats, tag_unexpected_eager) ++{ ++ check_caps(UCT_IFACE_FLAG_TAG_EAGER_BCOPY | UCT_IFACE_FLAG_TAG_EAGER_ZCOPY); ++ ++ std::pair > sfuncs[2] = { ++ std::make_pair(static_cast(&test_tag::tag_eager_bcopy), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_bcopy, ++ static_cast(UCT_EP_STAT_BYTES_BCOPY))), ++ ++ std::make_pair(static_cast(&test_tag::tag_eager_zcopy), ++ std::make_pair(sender().iface_attr().cap.tag.eager.max_zcopy, ++ static_cast(UCT_EP_STAT_BYTES_ZCOPY))) ++ }; ++ ++ for (int i = 0; i < 2; ++i) { ++ test_tag_unexpected(sfuncs[i].first, sfuncs[i].second.first); ++ check_tx_counters(UCT_EP_STAT_TAG, i + 1, ++ sfuncs[i].second.second, ++ sfuncs[i].second.first); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_EAGER_UNEXP, i + 1, receiver()); ++ } ++} ++ ++UCS_TEST_P(test_tag_stats, tag_list_ops) ++{ ++ check_caps(UCT_IFACE_FLAG_TAG_EAGER_BCOPY); ++ mapped_buffer recvbuf(32, RECV_SEED, receiver()); ++ recv_ctx rctx; ++ ++ init_recv_ctx(rctx, &recvbuf, 1); ++ ++ ASSERT_UCS_OK(tag_post(receiver(), rctx)); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_LIST_ADD, 1ul, receiver()); ++ ++ ASSERT_UCS_OK(tag_cancel(receiver(), rctx, 1)); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_LIST_DEL, 1ul, receiver()); ++ ++ // Every ADD and DEL is paired with SYNC, but stats counter is increased ++ // when separate SYNC op is issued only. So, we expect it to be 0 after ++ // ADD and DEL operations. ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_LIST_SYNC, 0ul, receiver()); ++ ++ // Provoke real SYNC op and send a message unexpectedly ++ provoke_sync(receiver()); ++ test_tag_unexpected(static_cast(&test_tag::tag_eager_bcopy)); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_LIST_SYNC, 1ul, receiver()); ++} ++ ++ ++UCS_TEST_P(test_tag_stats, tag_rndv) ++{ ++ check_caps(UCT_IFACE_FLAG_TAG_RNDV_ZCOPY | UCT_IFACE_FLAG_TAG_EAGER_BCOPY); ++ ++ size_t len = sender().iface_attr().cap.tag.rndv.max_zcopy / 8; ++ ++ // Check UNEXP_RNDV on the receiver ++ test_tag_unexpected(static_cast(&test_tag::tag_rndv_zcopy), len); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_RNDV_UNEXP, 1ul, receiver()); ++ ++ // Check that sender receives RNDV_FIN in case of expected rndv message ++ test_tag_expected(static_cast(&test_tag::tag_rndv_zcopy), len); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_RNDV_FIN, 1ul, sender()); ++ ++ ++ // Check UNEXP_RNDV_REQ on the receiver ++ test_tag_unexpected(static_cast(&test_tag::tag_rndv_request)); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_UNEXP, 1ul, receiver()); ++ ++ // Check NEXP_RNDV_REQ on the receiver ++ test_tag_expected(static_cast(&test_tag::tag_rndv_request), ++ sender().iface_attr().cap.tag.rndv.max_hdr, true); ++ check_rx_counter(UCT_RC_IFACE_STAT_TAG_RX_RNDV_REQ_EXP, 1ul, receiver()); ++} ++ ++UCT_TAG_INSTANTIATE_TEST_CASE(test_tag_stats) ++ ++#endif +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_ep.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_ep.cc +index baf4810fe..ce985a55c 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_ep.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_ep.cc +@@ -45,6 +45,12 @@ UCS_TEST_P(test_uct_ep, disconnect_after_send) { + ucs_status_t status; + unsigned count; + ++#if HAVE_DC_DV ++ if (GetParam()->tl_name.compare("dc_mlx5") == 0) { ++ UCS_TEST_SKIP_R("DCI stuck bug"); ++ } ++#endif ++ + check_caps(UCT_IFACE_FLAG_AM_ZCOPY); + + mapped_buffer buffer(256, 0, *m_sender); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_perf.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_perf.cc +index 17499532b..fdcb46f6e 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_perf.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_uct_perf.cc +@@ -132,7 +132,7 @@ test_perf::test_spec test_uct_perf::tests[] = + UCS_TEST_P(test_uct_perf, envelope) { + bool check_perf; + +- if (GetParam()->tl_name == "cm" || GetParam()->tl_name == "ugni_udt") { ++ if (GetParam()->tl_name == "cm" || GetParam()->tl_name == "ugni_udt" || GetParam()->tl_name == "cuda_ipc") { + UCS_TEST_SKIP; + } + +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_zcopy_comp.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_zcopy_comp.cc +index b7f95a1e7..be8f901a8 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_zcopy_comp.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/test_zcopy_comp.cc +@@ -31,6 +31,12 @@ UCS_TEST_P(test_zcopy_comp, issue1440) + size_t size_large = ucs_min(65536ul, sender->iface_attr().cap.put.max_zcopy); + ucs_assert(size_large > size_small); + ++ if (sender->md_attr().cap.mem_type != UCT_MD_MEM_TYPE_HOST) { ++ std::stringstream ss; ++ ss << "test_zcopy_comp is not supported by " << GetParam(); ++ UCS_TEST_SKIP_R(ss.str()); ++ } ++ + mapped_buffer sendbuf_small(size_small, 0, *sender); + mapped_buffer sendbuf_large(size_large, 0, *sender); + mapped_buffer recvbuf_small(size_small, 0, *receiver_small); +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_p2p_test.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_p2p_test.cc +index e40adb297..3c709779d 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_p2p_test.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_p2p_test.cc +@@ -149,8 +149,12 @@ void uct_p2p_test::test_xfer_multi(send_func_t send, size_t min_length, + { + + for (int mem_type = 0; mem_type < UCT_MD_MEM_TYPE_LAST; mem_type++) { ++ /* test mem type if md supports mem type ++ * (or) if HOST MD can register mem type ++ */ + if (!((sender().md_attr().cap.mem_type == mem_type) || +- (sender().md_attr().cap.reg_mem_types & UCS_BIT(mem_type)))) { ++ (sender().md_attr().cap.mem_type == UCT_MD_MEM_TYPE_HOST && ++ sender().md_attr().cap.reg_mem_types & UCS_BIT(mem_type)))) { + continue; + } + if (mem_type == UCT_MD_MEM_TYPE_CUDA) { +@@ -162,6 +166,7 @@ void uct_p2p_test::test_xfer_multi(send_func_t send, size_t min_length, + (uct_memory_type_t) mem_type); + } + } ++ + void uct_p2p_test::test_xfer_multi_mem_type(send_func_t send, size_t min_length, + size_t max_length, unsigned flags, + uct_memory_type_t mem_type) { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.cc b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.cc +index 00effe28d..002cf9cba 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.cc ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.cc +@@ -58,6 +58,65 @@ uct_test::~uct_test() { + uct_config_release(m_md_config); + } + ++void uct_test::init_sockaddr_rsc(resource *rsc, struct sockaddr *listen_addr, ++ struct sockaddr *connect_addr, size_t size) ++{ ++ memcpy(&rsc->listen_if_addr, listen_addr, size); ++ memcpy(&rsc->connect_if_addr, connect_addr, size); ++} ++ ++void uct_test::set_interface_rscs(char *md_name, cpu_set_t local_cpus, ++ struct ifaddrs *ifa, ++ std::vector& all_resources) ++{ ++ int i; ++ ++ /* Create two resources on the same interface. the first one will have the ++ * ip of the interface and the second one will have INADDR_ANY */ ++ for (i = 0; i < 2; i++) { ++ resource rsc; ++ rsc.md_name = md_name, ++ rsc.local_cpus = local_cpus, ++ rsc.tl_name = "sockaddr", ++ rsc.dev_name = ifa->ifa_name; ++ rsc.dev_type = UCT_DEVICE_TYPE_NET; ++ ++ if (i == 0) { ++ /* first rsc */ ++ if (ifa->ifa_addr->sa_family == AF_INET) { ++ uct_test::init_sockaddr_rsc(&rsc, ifa->ifa_addr, ifa->ifa_addr, ++ sizeof(struct sockaddr_in)); ++ } else if (ifa->ifa_addr->sa_family == AF_INET6) { ++ uct_test::init_sockaddr_rsc(&rsc, ifa->ifa_addr, ifa->ifa_addr, ++ sizeof(struct sockaddr_in6)); ++ } else { ++ UCS_TEST_ABORT("Unknown sa_family " << ifa->ifa_addr->sa_family); ++ } ++ all_resources.push_back(rsc); ++ } else { ++ /* second rsc */ ++ if (ifa->ifa_addr->sa_family == AF_INET) { ++ struct sockaddr_in sin; ++ memset(&sin, 0, sizeof(struct sockaddr_in)); ++ sin.sin_family = AF_INET; ++ sin.sin_addr.s_addr = INADDR_ANY; ++ uct_test::init_sockaddr_rsc(&rsc, (struct sockaddr*)&sin, ++ ifa->ifa_addr, sizeof(struct sockaddr_in)); ++ } else if (ifa->ifa_addr->sa_family == AF_INET6) { ++ struct sockaddr_in6 sin; ++ memset(&sin, 0, sizeof(struct sockaddr_in6)); ++ sin.sin6_family = AF_INET6; ++ sin.sin6_addr = in6addr_any; ++ uct_test::init_sockaddr_rsc(&rsc, (struct sockaddr*)&sin, ++ ifa->ifa_addr, sizeof(struct sockaddr_in6)); ++ } else { ++ UCS_TEST_ABORT("Unknown sa_family " << ifa->ifa_addr->sa_family); ++ } ++ all_resources.push_back(rsc); ++ } ++ } ++} ++ + void uct_test::set_sockaddr_resources(uct_md_h md, char *md_name, cpu_set_t local_cpus, + std::vector& all_resources) { + +@@ -69,24 +128,16 @@ void uct_test::set_sockaddr_resources(uct_md_h md, char *md_name, cpu_set_t loca + for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { + sock_addr.addr = ifa->ifa_addr; + ++ /* If rdmacm is tested, make sure that this is an IPoIB or RoCE interface */ ++ if (!strcmp(md_name, "rdmacm") && (!ucs::is_rdmacm_netdev(ifa->ifa_name))) { ++ continue; ++ } ++ + if (uct_md_is_sockaddr_accessible(md, &sock_addr, UCT_SOCKADDR_ACC_LOCAL) && + uct_md_is_sockaddr_accessible(md, &sock_addr, UCT_SOCKADDR_ACC_REMOTE) && + ucs_netif_is_active(ifa->ifa_name)) { +- resource rsc; +- rsc.md_name = md_name, +- rsc.local_cpus = local_cpus, +- rsc.tl_name = "sockaddr", +- rsc.dev_name = ifa->ifa_name; +- rsc.dev_type = UCT_DEVICE_TYPE_NET; + +- if (ifa->ifa_addr->sa_family == AF_INET) { +- memcpy(&rsc.if_addr, ifa->ifa_addr, sizeof(struct sockaddr_in)); +- } else if (ifa->ifa_addr->sa_family == AF_INET6) { +- memcpy(&rsc.if_addr, ifa->ifa_addr, sizeof(struct sockaddr_in6)); +- } else { +- UCS_TEST_ABORT("Unknown sa_family " << ifa->ifa_addr->sa_family); +- } +- all_resources.push_back(rsc); ++ uct_test::set_interface_rscs(md_name, local_cpus, ifa, all_resources); + } + } + +@@ -114,9 +165,14 @@ std::vector uct_test::enum_resources(const std::string& tl_name + &md_config); + ASSERT_UCS_OK(status); + +- status = uct_md_open(md_resources[i].md_name, md_config, &pd); ++ { ++ scoped_log_handler slh(hide_errors_logger); ++ status = uct_md_open(md_resources[i].md_name, md_config, &pd); ++ } + uct_config_release(md_config); +- ASSERT_UCS_OK(status); ++ if (status != UCS_OK) { ++ continue; ++ } + + uct_md_attr_t md_attr; + status = uct_md_query(pd, &md_attr); +@@ -176,6 +232,12 @@ void uct_test::check_caps(uint64_t required_flags, uint64_t invalid_flags) { + } + } + ++void uct_test::check_atomics(uint64_t required_ops, atomic_mode mode) { ++ FOR_EACH_ENTITY(iter) { ++ (*iter)->check_atomics(required_ops, mode); ++ } ++} ++ + void uct_test::modify_config(const std::string& name, const std::string& value, + bool optional) { + ucs_status_t status; +@@ -235,9 +297,11 @@ uct_test::entity* uct_test::create_entity(size_t rx_headroom, + uct_iface_params_t iface_params; + + memset(&iface_params, 0, sizeof(iface_params)); +- iface_params.rx_headroom = rx_headroom; +- iface_params.open_mode = UCT_IFACE_OPEN_MODE_DEVICE; +- iface_params.err_handler = err_handler; ++ iface_params.rx_headroom = rx_headroom; ++ iface_params.open_mode = UCT_IFACE_OPEN_MODE_DEVICE; ++ iface_params.err_handler = err_handler; ++ iface_params.err_handler_arg = this; ++ iface_params.err_handler_flags = 0; + entity *new_ent = new entity(*GetParam(), m_iface_config, &iface_params, + m_md_config); + return new_ent; +@@ -301,7 +365,17 @@ void uct_test::twait(int delta_ms) const { + } while (now + ucs_time_from_msec(delta_ms) > ucs_get_time()); + } + +-const std::string uct_test::entity::client_priv_data = "Client private data"; ++int uct_test::max_connections() ++{ ++ if (GetParam()->tl_name == "tcp") { ++ return ucs::max_tcp_connections(); ++ } else { ++ return std::numeric_limits::max(); ++ } ++} ++ ++std::string uct_test::entity::client_priv_data = ""; ++size_t uct_test::entity::client_cb_arg = 0; + + uct_test::entity::entity(const resource& resource, uct_iface_config_t *iface_config, + uct_iface_params_t *params, uct_md_config_t *md_config) { +@@ -317,7 +391,7 @@ uct_test::entity::entity(const resource& resource, uct_iface_config_t *iface_con + UCS_CPU_ZERO(¶ms->cpu_mask); + + UCS_TEST_CREATE_HANDLE(uct_worker_h, m_worker, uct_worker_destroy, +- uct_worker_create, &m_async.m_async, UCS_THREAD_MODE_MULTI /* TODO */); ++ uct_worker_create, &m_async.m_async, UCS_THREAD_MODE_SINGLE); + + UCS_TEST_CREATE_HANDLE(uct_md_h, m_md, uct_md_close, + uct_md_open, resource.md_name.c_str(), md_config); +@@ -466,6 +540,33 @@ void uct_test::entity::check_caps(uint64_t required_flags, + } + } + ++void uct_test::entity::check_atomics(uint64_t required_ops, atomic_mode mode) ++{ ++ uint64_t amo; ++ ++ switch (mode) { ++ case OP32: ++ amo = iface_attr().cap.atomic32.op_flags; ++ break; ++ case OP64: ++ amo = iface_attr().cap.atomic64.op_flags; ++ break; ++ case FOP32: ++ amo = iface_attr().cap.atomic32.fop_flags; ++ break; ++ case FOP64: ++ amo = iface_attr().cap.atomic64.fop_flags; ++ break; ++ default: ++ UCS_TEST_ABORT("Incorrect atomic mode: " << mode); ++ break; ++ } ++ ++ if (!ucs_test_all_flags(amo, required_ops)) { ++ UCS_TEST_SKIP_R("unsupported"); ++ } ++} ++ + uct_md_h uct_test::entity::md() const { + return m_md; + } +@@ -558,7 +659,23 @@ void uct_test::entity::destroy_eps() { + } + } + +-void uct_test::entity::connect_to_sockaddr(unsigned index, entity& other) ++ssize_t uct_test::entity::client_priv_data_cb(void *arg, const char *dev_name, ++ void *priv_data) ++{ ++ size_t *max_conn_priv = (size_t*)arg; ++ size_t priv_data_len; ++ ++ client_priv_data = "Client private data"; ++ priv_data_len = 1 + client_priv_data.length(); ++ ++ memcpy(priv_data, client_priv_data.c_str(), priv_data_len); ++ EXPECT_LE(priv_data_len, (*max_conn_priv)); ++ ++ return priv_data_len; ++} ++ ++void uct_test::entity::connect_to_sockaddr(unsigned index, entity& other, ++ ucs_sock_addr_t *remote_addr) + { + uct_ep_h ep; + ucs_status_t status; +@@ -568,13 +685,10 @@ void uct_test::entity::connect_to_sockaddr(unsigned index, entity& other) + return; /* Already connected */ + } + +- ASSERT_TRUE(client_priv_data.length() <= other.iface_attr().max_conn_priv); +- + /* Connect to the server */ +- status = uct_ep_create_sockaddr(iface(), +- &other.iface_params().mode.sockaddr.listen_sockaddr, +- client_priv_data.c_str(), +- client_priv_data.length(), &ep); ++ status = uct_ep_create_sockaddr(iface(), remote_addr, ++ client_priv_data_cb, (void*)&client_cb_arg, ++ UCT_CB_FLAG_ASYNC, &ep); + ASSERT_UCS_OK(status); + + m_eps[index].reset(ep, uct_ep_destroy); +@@ -639,19 +753,25 @@ void uct_test::entity::connect_to_iface(unsigned index, entity& other) { + } + + void uct_test::entity::connect(unsigned index, entity& other, +- unsigned other_index) ++ unsigned other_index, ++ ucs_sock_addr_t *remote_addr) + { + if (iface_attr().cap.flags & UCT_IFACE_FLAG_CONNECT_TO_EP) { + connect_to_ep(index, other, other_index); + } else if (iface_attr().cap.flags & UCT_IFACE_FLAG_CONNECT_TO_IFACE) { + connect_to_iface(index, other); + } else if (iface_attr().cap.flags & UCT_IFACE_FLAG_CONNECT_TO_SOCKADDR) { +- connect_to_sockaddr(index, other); ++ connect_to_sockaddr(index, other, remote_addr); + } else { + UCS_TEST_SKIP_R("cannot connect"); + } + } + ++void uct_test::entity::connect(unsigned index, entity& other, unsigned other_index) ++{ ++ connect(index, other, other_index, NULL); ++} ++ + void uct_test::entity::flush() const { + ucs_status_t status; + do { +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.h b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.h +index 092b4aa28..78a92c8d5 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.h ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/gtest/uct/uct_test.h +@@ -35,7 +35,8 @@ struct resource { + std::string tl_name; + std::string dev_name; + uct_device_type_t dev_type; +- struct sockaddr_storage if_addr; ++ struct sockaddr_storage listen_if_addr; /* sockaddr to listen on */ ++ struct sockaddr_storage connect_if_addr; /* sockaddr to connect to */ + }; + + +@@ -53,10 +54,19 @@ public: + uct_test(); + virtual ~uct_test(); + ++ enum atomic_mode { ++ OP32, ++ OP64, ++ FOP32, ++ FOP64 ++ }; ++ + protected: + + class entity { + public: ++ typedef uct_test::atomic_mode atomic_mode; ++ + entity(const resource& resource, uct_iface_config_t *iface_config, + uct_iface_params_t *params, uct_md_config_t *md_config); + +@@ -71,6 +81,7 @@ protected: + + bool is_caps_supported(uint64_t required_flags); + void check_caps(uint64_t required_flags, uint64_t invalid_flags = 0); ++ void check_atomics(uint64_t required_ops, atomic_mode mode); + + uct_md_h md() const; + +@@ -90,14 +101,17 @@ protected: + void destroy_ep(unsigned index); + void destroy_eps(); + void connect(unsigned index, entity& other, unsigned other_index); ++ void connect(unsigned index, entity& other, unsigned other_index, ++ ucs_sock_addr_t *remote_addr); + void connect_to_iface(unsigned index, entity& other); + void connect_to_ep(unsigned index, entity& other, + unsigned other_index); +- void connect_to_sockaddr(unsigned index, entity& other); ++ void connect_to_sockaddr(unsigned index, entity& other, ucs_sock_addr_t *remote_addr); + + void flush() const; + +- static const std::string client_priv_data; ++ static std::string client_priv_data; ++ static size_t client_cb_arg; + + private: + class async_wrapper { +@@ -118,6 +132,8 @@ protected: + void connect_p2p_ep(uct_ep_h from, uct_ep_h to); + void cuda_mem_alloc(size_t length, uct_allocated_memory_t *mem) const; + void cuda_mem_free(const uct_allocated_memory_t *mem) const; ++ static ssize_t client_priv_data_cb(void *arg, const char *dev_name, ++ void *priv_data); + + ucs::handle m_md; + uct_md_attr_t m_md_attr; +@@ -214,6 +230,7 @@ protected: + bool is_caps_supported(uint64_t required_flags); + void check_caps(uint64_t required_flags, uint64_t invalid_flags = 0); + void check_caps(const entity& e, uint64_t required_flags, uint64_t invalid_flags = 0); ++ void check_atomics(uint64_t required_ops, atomic_mode mode); + const entity& ent(unsigned index) const; + unsigned progress() const; + void flush(ucs_time_t deadline = ULONG_MAX) const; +@@ -221,11 +238,17 @@ protected: + virtual void twait(int delta_ms = DEFAULT_DELAY_MS) const; + static void set_sockaddr_resources(uct_md_h pd, char *md_name, cpu_set_t local_cpus, + std::vector& all_resources); ++ static void set_interface_rscs(char *md_name, cpu_set_t local_cpus, ++ struct ifaddrs *ifa, ++ std::vector& all_resources); ++ static void init_sockaddr_rsc(resource *rsc, struct sockaddr *listen_addr, ++ struct sockaddr *connect_addr, size_t size); + static const char *uct_mem_type_names[]; + + uct_test::entity* create_entity(size_t rx_headroom, + uct_error_handler_t err_handler = NULL); + uct_test::entity* create_entity(uct_iface_params_t ¶ms); ++ int max_connections(); + + ucs::ptr_vector m_entities; + uct_iface_config_t *m_iface_config; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/test/mpi/test_memhooks.c b/src/mpid/ch4/netmod/ucx/ucx/test/mpi/test_memhooks.c +index c029c9b64..e6366b140 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/test/mpi/test_memhooks.c ++++ b/src/mpid/ch4/netmod/ucx/ucx/test/mpi/test_memhooks.c +@@ -9,10 +9,12 @@ + #include + #include + #include ++#include + #include + #include + #include + #include ++#include + + #define CHKERR_JUMP(cond, msg, label) \ + do { \ +@@ -35,9 +37,12 @@ + } \ + } while (0); + ++#define SHMAT_FAILED ((void*)-1) ++ + void* open_dyn_lib(const char *lib_path); + void* flag_no_install_init(const char *path); +-int malloc_hooks_run(void *dl); ++int malloc_hooks_run_all(void *dl); ++int malloc_hooks_run_unmapped(void *dl); + int ext_event_run(void *dl); + void *ext_event_init(const char *path); + +@@ -48,9 +53,10 @@ typedef struct memtest_type { + } memtest_type_t; + + memtest_type_t tests[] = { +- {"malloc_hooks", open_dyn_lib, malloc_hooks_run}, +- {"external_events", ext_event_init, ext_event_run}, +- {"flag_no_install", flag_no_install_init, ext_event_run}, ++ {"malloc_hooks", open_dyn_lib, malloc_hooks_run_all}, ++ {"malloc_hooks_unmapped", open_dyn_lib, malloc_hooks_run_unmapped}, ++ {"external_events", ext_event_init, ext_event_run}, ++ {"flag_no_install", flag_no_install_init, ext_event_run}, + {NULL} + }; + +@@ -62,9 +68,10 @@ static void usage() { + printf("Options are:\n"); + printf(" -h Print this info.\n"); + printf(" -t Test name to execute (malloc_hooks)\n"); +- printf(" malloc_hooks : General UCM test.\n"); +- printf(" external_events : Test of ucm_set_external_event() API.\n"); +- printf(" flag_no_install : Test of UCM_EVENT_FLAG_NO_INSTALL flag.\n"); ++ printf(" malloc_hooks : General UCM test for VM_MAPPED and VM_UNMAPPED\n"); ++ printf(" malloc_hooks_unmapped : Test VM_UNMAPPED event only\n"); ++ printf(" external_events : Test of ucm_set_external_event() API\n"); ++ printf(" flag_no_install : Test of UCM_EVENT_FLAG_NO_INSTALL flag\n"); + printf("\n"); + } + +@@ -78,7 +85,7 @@ static void event_callback(ucm_event_type_t event_type, ucm_event_t *event, + } + } + +-static ucs_status_t set_event_handler (void *dl, int events) ++static ucs_status_t set_event_handler(void *dl, int events) + { + ucs_status_t (*set_handler)(int events, int priority, + ucm_event_callback_t cb, void *arg); +@@ -91,18 +98,9 @@ static ucs_status_t set_event_handler (void *dl, int events) + + static ucs_status_t disable_memory_hooks(void *dl) + { +- ucs_status_t (*modify_cfg)(const char *name, const char *val); +- ucs_status_t status; +- +- DL_FIND_FUNC(dl, "ucm_config_modify", modify_cfg, +- return UCS_ERR_UNSUPPORTED); +- +- status = modify_cfg("MALLOC_HOOKS", "no"); +- if (status == UCS_OK) { +- status = modify_cfg("MMAP_RELOC", "no"); +- } +- +- return status; ++ setenv("UCX_MEM_MALLOC_HOOKS", "n", 1); ++ setenv("UCX_MEM_MMAP_RELOC", "n", 1); ++ return UCS_OK; + } + + void* open_dyn_lib(const char *lib_path) +@@ -171,59 +169,141 @@ fail: + return NULL; + } + +-int malloc_hooks_run(void *dl) ++int malloc_hooks_run_flags(void *dl, ucm_event_type_t events) + { + ucs_status_t status; + void *ptr_malloc_core = NULL; + void *ptr_malloc_mmap = NULL; + void *ptr_direct_mmap = MAP_FAILED; ++ int shmid = -1; ++ void *ptr_shmat = SHMAT_FAILED; + void *dl_test; + const size_t size = 1024 * 1024; + const char *lib_path = UCS_PP_MAKE_STRING(TEST_LIB_DIR) "/" "libtest_memhooks.so"; + const char *cust_mmap_name = "memhook_test_lib_call_mmap"; + void * (*cust_mmap)(size_t size); + +- status = set_event_handler(dl, UCM_EVENT_VM_MAPPED | UCM_EVENT_VM_UNMAPPED); ++ status = set_event_handler(dl, events); + CHKERR_JUMP(status != UCS_OK, "Failed to set event handler", fail_close_ucm); + + printf("Allocating memory\n"); + ++ /* Create SysV segment */ ++ shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|SHM_R|SHM_W); ++ CHKERR_JUMP(shmid == -1, "Failed to create shared memory segment: %m", ++ fail_close_ucm); ++ ++ /* ++ * Test shmat/shmdt before malloc() because shmat() add entires to an internal ++ * hash of pointers->size, which makes previous pointers un-releasable ++ */ ++ ++ /* Attach SysV segment */ ++ total_mapped = 0; ++ ptr_shmat = shmat(shmid, NULL, 0); ++ CHKERR_JUMP(ptr_shmat == SHMAT_FAILED, "Failed to attach shared memory segment", ++ fail_close_ucm); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped < size, "No callback for shmat", fail_close_ucm); ++ } ++ printf("After shmat: reported mapped=%zu\n", total_mapped); ++ ++ /* Detach SysV segment */ ++ total_unmapped = 0; ++ shmdt(ptr_shmat); ++ ptr_shmat = SHMAT_FAILED; ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped < size, "No callback for shmdt", fail_close_ucm); ++ } ++ printf("After shmdt: reported unmapped=%zu\n", total_unmapped); ++ ++ /* Attach SysV segment at fixed address */ ++ total_mapped = 0; ++ total_unmapped = 0; ++ ptr_shmat = shmat(shmid, (void*)0xff000000, SHM_REMAP); ++ CHKERR_JUMP(ptr_shmat == SHMAT_FAILED, "Failed to attach shared memory segment", ++ fail_close_ucm); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped < size, "No map callback for shmat(REMAP)", fail_close_ucm); ++ } ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped < size, "No unmap callback for shmat(REMAP)", ++ fail_close_ucm); ++ } ++ printf("After shmat(REMAP): reported mapped=%zu unmapped=%zu\n", total_mapped, ++ total_unmapped); ++ ++ /* Detach SysV segment */ ++ total_unmapped = 0; ++ shmdt(ptr_shmat); ++ ptr_shmat = SHMAT_FAILED; ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped < size, "No callback for shmdt", fail_close_ucm); ++ } ++ printf("After shmdt: reported unmapped=%zu\n", total_unmapped); ++ ++ /* Destroy SysV segment */ ++ shmctl(shmid, IPC_RMID, NULL); ++ shmid = -1; ++ + /* Allocate using morecore */ + mallopt(M_MMAP_THRESHOLD, size * 2); + mallopt(M_TRIM_THRESHOLD, size / 2); + total_mapped = 0; + ptr_malloc_core = malloc(1024 * 1024); +- CHKERR_JUMP(total_mapped == 0, "No callback for core malloc", fail_close_ucm); +- printf("After core malloc: mapped=%zu\n", total_mapped); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped == 0, "No callback for core malloc", ++ fail_close_ucm); ++ } ++ printf("After core malloc: reported mapped=%zu\n", total_mapped); + + /* Allocate using mmap */ + mallopt(M_MMAP_THRESHOLD, size / 2); + total_mapped = 0; + ptr_malloc_mmap = malloc(2 * 1024 * 1024); +- CHKERR_JUMP(total_mapped == 0, "No callback for mmap malloc", fail_close_ucm); +- printf("After mmap malloc: mapped=%zu\n", total_mapped); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped == 0, "No callback for mmap malloc", ++ fail_close_ucm); ++ } ++ printf("After mmap malloc: reported mapped=%zu\n", total_mapped); + + /* Allocate directly with mmap */ + total_mapped = 0; + ptr_direct_mmap = mmap(NULL, size, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANON, -1, 0); +- CHKERR_JUMP(total_mapped == 0, "No callback for mmap", fail_close_ucm); +- printf("After mmap: mapped=%zu\n", total_mapped); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped < size, "No callback for mmap", fail_close_ucm); ++ } ++ printf("After mmap: reported mapped=%zu\n", total_mapped); ++ ++ /* Remap */ ++ total_unmapped = 0; ++ ptr_direct_mmap = mmap(ptr_direct_mmap, size, PROT_READ|PROT_WRITE, ++ MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0); ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped < size, "No unmap callback for mmap(FIXED)", ++ fail_close_ucm); ++ } ++ printf("After mmap(FIXED): reported unmapped=%zu\n", total_unmapped); + + /* Call munmap directly */ + total_unmapped = 0; + munmap(ptr_direct_mmap, size); +- CHKERR_JUMP(total_unmapped == 0, "No callback for munmap", fail_close_ucm); +- printf("After munmap: unmapped=%zu\n", total_unmapped); ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped == 0, "No callback for munmap", fail_close_ucm); ++ } ++ printf("After munmap: reported unmapped=%zu\n", total_unmapped); + + /* Release indirectly */ + total_unmapped = 0; + free(ptr_malloc_mmap); + ptr_malloc_mmap = NULL; + malloc_trim(0); +- CHKERR_JUMP(total_unmapped == 0, "No callback for munmap from malloc", +- fail_close_ucm); +- printf("After mmap free + trim: unmapped=%zu\n", total_unmapped); ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped == 0, "No callback for munmap from free", ++ fail_close_ucm); ++ } ++ printf("After mmap free + trim: reported unmapped=%zu\n", total_unmapped); + + /* Call mmap from a library we load after hooks are installed */ + dl_test = open_dyn_lib(lib_path); +@@ -234,15 +314,17 @@ int malloc_hooks_run(void *dl) + ptr_direct_mmap = cust_mmap(size); + CHKERR_JUMP(ptr_direct_mmap == MAP_FAILED, "Failed to mmap from dynamic lib", + fail_close_all); +- CHKERR_JUMP(total_mapped == 0,"No callback for mmap from dynamic lib", +- fail_close_all); +- printf("After another mmap from dynamic lib: mapped=%zu\n", total_mapped); ++ if (events & UCM_EVENT_VM_MAPPED) { ++ CHKERR_JUMP(total_mapped == 0,"No callback for mmap from dynamic lib", ++ fail_close_all); ++ } ++ printf("After another mmap from dynamic lib: reported mapped=%zu\n", total_mapped); + munmap(ptr_direct_mmap, size); + ptr_direct_mmap = MAP_FAILED; + + /* + * Test closing UCM. +- * The library should not really be unloaded, because the meory hooks still ++ * The library should not really be unloaded, because the memory hooks still + * point to functions inside it. + */ + total_unmapped = 0; +@@ -250,8 +332,10 @@ int malloc_hooks_run(void *dl) + dlclose(dl_test); + free(ptr_malloc_core); /* This should still work */ + ptr_malloc_core = NULL; +- CHKERR_JUMP(total_unmapped == 0, "No callback for munmap from malloc", fail); +- printf("After core malloc free: unmapped=%zu\n", total_unmapped); ++ if (events & UCM_EVENT_VM_UNMAPPED) { ++ CHKERR_JUMP(total_unmapped == 0, "No callback for munmap from malloc", fail); ++ } ++ printf("After core malloc free: reported unmapped=%zu\n", total_unmapped); + + return 0; + +@@ -260,6 +344,12 @@ fail_close_all: + fail_close_ucm: + dlclose(dl); + fail: ++ if (ptr_shmat != SHMAT_FAILED) { ++ shmdt(ptr_shmat); ++ } ++ if (shmid != -1) { ++ shmctl(shmid, IPC_RMID, NULL); ++ } + free(ptr_malloc_mmap); + free(ptr_malloc_core); + if (ptr_direct_mmap != MAP_FAILED) { +@@ -269,6 +359,16 @@ fail: + return -1; + } + ++int malloc_hooks_run_all(void *dl) ++{ ++ return malloc_hooks_run_flags(dl, UCM_EVENT_VM_MAPPED | UCM_EVENT_VM_UNMAPPED); ++} ++ ++int malloc_hooks_run_unmapped(void *dl) ++{ ++ return malloc_hooks_run_flags(dl, UCM_EVENT_VM_UNMAPPED); ++} ++ + int ext_event_run(void *dl) + { + void *ptr_direct_mmap; +diff --git a/src/mpid/ch4/netmod/ucx/ucx/ucx.spec.in b/src/mpid/ch4/netmod/ucx/ucx/ucx.spec.in +index e909619f2..422405660 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx/ucx.spec.in ++++ b/src/mpid/ch4/netmod/ucx/ucx/ucx.spec.in +@@ -16,15 +16,17 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + ExclusiveArch: aarch64 ppc64le x86_64 + + BuildRequires: numactl-devel libibverbs-devel +-BuildRequires: automake autoconf libtool ++BuildRequires: automake autoconf libtool gcc-c++ + + %description +-UCX stands for Unified Communication X. It requires either RDMA-capable device +-(InfiniBand, RoCE, etc), Cray Gemini or Aries, for inter-node communication. +-Future versions will support also TCP for inter-node, to lift that hardware +-dependency. +-In addition, the library can be used for intra-node communication by leveraging +-the following shared memory mechanisms: posix. sysv, cma, knem, xpmem. ++UCX stands for Unified Communication X. UCX provides an optimized communication ++layer for Message Passing (MPI), PGAS/OpenSHMEM libraries and RPC/data-centric ++applications. UCX utilizes high-speed networks, such as RDMA (InfiniBand, RoCE, ++etc), Cray Gemini or Aries, for inter-node communication. If no such network is ++available, TCP is used instead. UCX supports efficient transfer of data in ++either main memory (RAM) or GPU memory (through CUDA and ROCm libraries). ++In addition, UCX provides efficient intra-node communication, by leveraging the ++following shared memory mechanisms: posix, sysv, cma, knem, and xpmem. + + %package devel + Requires: %{name}%{?_isa} = %{version}-%{release} +@@ -51,7 +53,6 @@ Provides static libraries required for development with UCX. + --disable-debug \ + --disable-assertions \ + --disable-params-check \ +- CXXFLAGS="%{optflags} -fno-exceptions" \ + %{?configure_options} + make %{?_smp_mflags} V=1 + +@@ -81,6 +82,15 @@ rm -f %{buildroot}%{_libdir}/*.la + %postun -p /sbin/ldconfig + + %changelog ++* Tue Nov 6 2018 Andrey Maslennikov 1.5.0-1 ++- Bump version to 1.5.0 ++- See NEWS for details ++* Tue Oct 30 2018 Andrey Maslennikov 1.4.0-1 ++- See NEWS for details ++* Mon Aug 20 2018 Andrey Maslennikov 1.3.1-1 ++- See NEWS for details ++* Thu Aug 16 2018 Andrey Maslennikov 1.3.0-1 ++- Explicitly set gcc-c++ as requirements + * Wed Mar 7 2018 Andrey Maslennikov 1.3.0-1 + - See NEWS for details + * Mon Aug 21 2017 Andrey Maslennikov 1.2.1-1 diff --git a/daos_adio.patch b/daos_adio.patch new file mode 100644 index 00000000000..4de36c40136 --- /dev/null +++ b/daos_adio.patch @@ -0,0 +1,207596 @@ +new file mode 100644 +--- /dev/null ++++ b/.github/pull_request_template.md +@@ -0,0 +1,22 @@ ++## Pull Request Description ++ ++ ++ ++ ++ ++## Expected Performance Changes ++ ++## Known Issues ++ ++## Author Checklist ++* [ ] Reference appropriate issues (with "Fixes" or "See" as appropriate) ++* [ ] Passes tests (included warning check) ++* [ ] Confirm whitespace/style checkers are happy (or has a good reason for being bad) ++* [ ] Commits are self-contained and do not do two things at once ++* [ ] Remove xfail from the test suite when fixing a test ++* [ ] Commit message is of the form: `module: short description` and follows [good practice](https://chris.beams.io/posts/git-commit/) ++* [ ] Add comments such that someone without knowledge of the code could understand ++* [ ] Add Devel Docs in the `doc/` directory for any new code design +--- a/.gitignore ++++ b/.gitignore +@@ -16,6 +16,8 @@ + Makefile.in + Makefile + ++/build ++ + # a lot of generic patterns for generated files + *-cache + *.MOD +@@ -601,6 +603,3 @@ Makefile.am-stamp + + # /test/util/timer/ + /test/util/timer/timertest +- +-# /src/mpid/ch4/include +-/src/mpid/ch4/include/netmodpre.h +--- a/.gitmodules ++++ b/.gitmodules +@@ -3,7 +3,7 @@ + url = https://github.com/pmodels/izem + [submodule "src/mpid/ch4/netmod/ofi/libfabric"] + path = src/mpid/ch4/netmod/ofi/libfabric +- url = https://github.com/ofiwg/libfabric ++ url = https://github.com/pmodels/libfabric + [submodule "src/hwloc"] + path = src/hwloc + url = https://github.com/pmodels/hwloc +new file mode 100644 +--- /dev/null ++++ b/0003-soften-version-check.patch +@@ -0,0 +1,13 @@ ++diff --git mpich-3.2/./src/binding/cxx/mpicxx.h.in~ mpich-3.2/./src/binding/cxx/mpicxx.h.in ++index 375c081e0e..24f1d6c2cc 100644 ++--- mpich-3.2/./src/binding/cxx/mpicxx.h.in~ +++++ mpich-3.2/./src/binding/cxx/mpicxx.h.in ++@@ -17,7 +17,7 @@ ++ // between 3.2.3 and 3.4.3 (!!) Normally such changes ++ // should only occur at major releases (e.g., version 3 to 4) ++ #ifdef __GNUC__ ++-# if __GNUC__ >= @GNUCXX_VERSION@ +++# if __GNUC__ >= @GNUCXX_VERSION@ && @GNUCXX_VERSION@ == 3 ++ # if __GNUC_MINOR__ > 2 && @GNUCXX_MINORVERSION@ == 2 ++ # error 'Please use the same version of GCC and g++ for compiling MPICH and user MPI programs' ++ # endif +--- a/CHANGES ++++ b/CHANGES +@@ -1,4 +1,11 @@ + =============================================================================== ++ Changes in 3.3.1 ++=============================================================================== ++ ++ # Removed support for logical reduction operations on floating point ++ types. ++ ++=============================================================================== + Changes in 3.3 + =============================================================================== + +new file mode 100644 +--- /dev/null ++++ b/Dockerfile.centos.7 +@@ -0,0 +1,71 @@ ++# ++# Copyright 2019, Intel Corporation ++# ++# 'recipe' for Docker to build an RPM ++# ++ ++# Pull base image ++FROM centos:7 ++MAINTAINER Brian J. Murrell ++ ++# use same UID as host and default value of 1000 if not specified ++ARG UID=1000 ++ ++# Update distribution ++#Nothing to do for CentOS ++ ++# Install basic tools ++RUN yum -y install epel-release ++RUN yum -y install mock make rpm-build curl createrepo rpmlint git ++ ++# Add build user (to keep rpmbuild happy) ++ENV USER build ++ENV PASSWD build ++RUN useradd -u $UID -ms /bin/bash $USER ++RUN echo "$USER:$PASSWD" | chpasswd ++# add the user to the mock group so it can run mock ++RUN usermod -a -G mock $USER ++ ++# mock in Docker needs to use the old-chroot option ++RUN echo "config_opts['use_nspawn'] = False" >> /etc/mock/site-defaults.cfg ++ ++ARG JENKINS_URL="" ++ ++RUN echo -e "config_opts['yum.conf'] += \"\"\"\n" >> /etc/mock/default.cfg; \ ++ for repo in openpa libfabric pmix ompi mercury spdk isa-l fio dpdk \ ++ protobuf-c fuse pmdk argobots raft cart@daos_devel daos \ ++ automake libtool; do \ ++ if [[ $repo = *@* ]]; then \ ++ branch="${repo#*@}"; \ ++ repo="${repo%@*}"; \ ++ else \ ++ branch="master"; \ ++ fi; \ ++ echo -e "[$repo:$branch:lastSuccessful]\n\ ++name=$repo:$branch:lastSuccessful\n\ ++baseurl=${JENKINS_URL}job/daos-stack/job/$repo/job/$branch/lastSuccessfulBuild/artifact/artifacts/centos7/\n\ ++enabled=1\n\ ++gpgcheck = False\n" >> /etc/mock/default.cfg; \ ++ done; \ ++ echo -e "[jhli-ipmctl]\n\ ++name=Copr repo for ipmctl owned by jhli\n\ ++baseurl=https://copr-be.cloud.fedoraproject.org/results/jhli/ipmctl/epel-7-\$basearch/\n\ ++type=rpm-md\n\ ++skip_if_unavailable=True\n\ ++gpgcheck=1\n\ ++gpgkey=https://copr-be.cloud.fedoraproject.org/results/jhli/ipmctl/pubkey.gpg\n\ ++repo_gpgcheck=0\n\ ++enabled=1\n\ ++enabled_metadata=1\n\n\ ++[jhli-safeclib]\n\ ++name=Copr repo for safeclib owned by jhli\n\ ++baseurl=https://copr-be.cloud.fedoraproject.org/results/jhli/safeclib/epel-7-\$basearch/\n\ ++type=rpm-md\n\ ++skip_if_unavailable=True\n\ ++gpgcheck=1\n\ ++gpgkey=https://copr-be.cloud.fedoraproject.org/results/jhli/safeclib/pubkey.gpg\n\ ++repo_gpgcheck=0\n\ ++enabled=1\n\ ++enabled_metadata=1\n\"\"\"" >> /etc/mock/default.cfg ++ ++RUN yum -y install autoconf automake libtool +new file mode 100644 +--- /dev/null ++++ b/Jenkinsfile +@@ -0,0 +1,70 @@ ++pipeline { ++ agent none ++ ++ stages { ++ stage('Lint') { ++ stages { ++ stage('RPM Lint') { ++ agent { ++ dockerfile { ++ filename 'Dockerfile.centos.7' ++ label 'docker_runner' ++ additionalBuildArgs '--build-arg UID=$(id -u)' ++ args '--group-add mock --cap-add=SYS_ADMIN --privileged=true' ++ } ++ } ++ steps { ++ sh 'make -f Makefile-rpm.mk rpmlint' ++ } ++ } ++ } ++ } ++ stage('Build') { ++ parallel { ++ stage('Build on CentOS 7') { ++ agent { ++ dockerfile { ++ filename 'Dockerfile.centos.7' ++ label 'docker_runner' ++ additionalBuildArgs '--build-arg UID=$(id -u) --build-arg JENKINS_URL=' + ++ env.JENKINS_URL ++ args '--group-add mock --cap-add=SYS_ADMIN --privileged=true' ++ } ++ } ++ steps { ++ sh '''rm -rf artifacts/centos7/ ++ mkdir -p artifacts/centos7/ ++ if make -f Makefile-rpm.mk srpm; then ++ if make -f Makefile-rpm.mk mockbuild; then ++ (cd /var/lib/mock/epel-7-x86_64/result/ && ++ cp -r . $OLDPWD/artifacts/centos7/) ++ createrepo artifacts/centos7/ ++ else ++ rc=\${PIPESTATUS[0]} ++ (cd /var/lib/mock/epel-7-x86_64/result/ && ++ cp -r . $OLDPWD/artifacts/centos7/) ++ cp -af _topdir/SRPMS artifacts/centos7/ ++ exit \$rc ++ fi ++ else ++ exit \${PIPESTATUS[0]} ++ fi''' ++ } ++ post { ++ always { ++ archiveArtifacts artifacts: 'artifacts/centos7/**' ++ } ++ } ++ } ++ stage('Build on Ubuntu 16.04') { ++ agent { ++ label 'docker_runner' ++ } ++ steps { ++ echo "Building on Ubuntu is not implemented for the moment" ++ } ++ } ++ } ++ } ++ } ++} +new file mode 100644 +--- /dev/null ++++ b/Makefile-rpm.mk +@@ -0,0 +1,130 @@ ++NAME := mpich ++SRC_EXT := gz ++SOURCE = https://www.mpich.org/static/downloads/$(VERSION)/$(NAME)-$(VERSION).tar.$(SRC_EXT) ++PATCHES := mpich-modules.patch 0003-soften-version-check.patch daos_adio.patch \ ++ daos_adio-hwloc.patch daos_adio-izem.patch daos_adio-ucx.patch \ ++ daos_adio-libfabric.patch mpich.pth.py2 mpich.pth.py3 ++# daos_adio-all.patch ++# ++GIT_TAG := v3.3 ++# daos_adio-libfabric.patch daos_adio-ucx.patch ++ ++TOPDIR := $(shell echo $$PWD) ++ ++# sadly, git is too old on EL7 to do this ++daos_adio-all.patch: ++ git checkout origin/daos_adio ++ git submodule update ++ git diff --submodule=diff v3.3..HEAD > $@ ++ ++# so instead we get a patch for each submodule ++define gen_submod_patch ++ set -ex; \ ++ DIR=$(1); \ ++ A=$$(git ls-tree $(GIT_TAG) $$DIR | \ ++ sed -e 's/[^ ]* [^ ]* \([^ ]*\) .*/\1/'); \ ++ B=$$(git ls-tree HEAD $$DIR | \ ++ sed -e 's/[^ ]* [^ ]* \([^ ]*\) .*/\1/'); \ ++ cd $$DIR; \ ++ git diff --src-prefix=a/$$DIR/ --dst-prefix=b/$$DIR/ \ ++ $$A..$$B > $(TOPDIR)/$@ ++endef ++ ++daos_adio-hwloc.patch: ++ $(call gen_submod_patch,src/hwloc) ++ ++daos_adio-izem.patch: ++ $(call gen_submod_patch,src/izem) ++ ++daos_adio-libfabric.patch: ++ $(call gen_submod_patch,src/mpid/ch4/netmod/ofi/libfabric) ++ ++daos_adio-ucx.patch: ++ $(call gen_submod_patch,src/mpid/ch4/netmod/ucx/ucx) ++ ++daos_adio.patch: ++ git checkout origin/daos_adio ++ git diff v3.3..HEAD -- \ ++ ':(exclude)README.vin' \ ++ ':(exclude)src/hwloc' \ ++ ':(exclude)src/izem' \ ++ ':(exclude)src/mpid/ch4/netmod/ofi/libfabric' \ ++ ':(exclude)src/mpid/ch4/netmod/ucx/ucx' \ ++ > $@ ++ ++COMMON_RPM_ARGS := --define "%_topdir $$PWD/_topdir" ++DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist}) ++ifeq ($(DIST),) ++SED_EXPR := 1p ++else ++SED_EXPR := 1s/$(DIST)//p ++endif ++SPEC := $(NAME).spec ++VERSION := $(shell rpm $(COMMON_RPM_ARGS) --specfile --qf '%{version}\n' $(SPEC) | sed -n '1p') ++RELEASE := $(shell rpm $(COMMON_RPM_ARGS) --specfile --qf '%{release}\n' $(SPEC) | sed -n '$(SED_EXPR)') ++SRPM := _topdir/SRPMS/$(NAME)-$(VERSION)-$(RELEASE)$(DIST).src.rpm ++RPMS := $(addsuffix .rpm,$(addprefix _topdir/RPMS/x86_64/,$(shell rpm --specfile $(SPEC)))) ++SOURCES := $(addprefix _topdir/SOURCES/,$(notdir $(SOURCE)) $(PATCHES)) ++TARGETS := $(RPMS) $(SRPM) ++ ++all: $(TARGETS) ++ ++%/: ++ mkdir -p $@ ++ ++_topdir/SOURCES/%: % | _topdir/SOURCES/ ++ rm -f $@ ++ ln $< $@ ++ ++$(NAME)-$(VERSION).tar.$(SRC_EXT).asc: ++ curl -f -L -O '$(SOURCE).asc' ++ ++$(NAME)-$(VERSION).tar.$(SRC_EXT): ++ curl -f -L -O '$(SOURCE)' ++ ++v$(VERSION).tar.$(SRC_EXT): ++ curl -f -L -O '$(SOURCE)' ++ ++$(VERSION).tar.$(SRC_EXT): ++ curl -f -L -O '$(SOURCE)' ++ ++# see https://stackoverflow.com/questions/2973445/ for why we subst ++# the "rpm" for "%" to effectively turn this into a multiple matching ++# target pattern rule ++$(subst rpm,%,$(RPMS)): $(SPEC) $(SOURCES) ++ rpmbuild -bb $(COMMON_RPM_ARGS) $(RPM_BUILD_OPTIONS) $(SPEC) ++ ++$(SRPM): $(SPEC) $(SOURCES) ++ rpmbuild -bs $(COMMON_RPM_ARGS) $(SPEC) ++ ++srpm: $(SRPM) ++ ++$(RPMS): Makefile ++ ++rpms: $(RPMS) ++ ++ls: $(TARGETS) ++ ls -ld $^ ++ ++mockbuild: $(SRPM) Makefile ++ mock $(MOCK_OPTIONS) $< ++ ++rpmlint: $(SPEC) ++ rpmlint $< ++ ++show_version: ++ @echo $(VERSION) ++ ++show_release: ++ @echo $(RELEASE) ++ ++show_rpms: ++ @echo $(RPMS) ++ ++show_source: ++ @echo $(SOURCE) ++ ++show_sources: ++ @echo $(SOURCES) ++ ++.PHONY: srpm rpms ls mockbuild rpmlint FORCE show_version show_release show_rpms show_source show_sources +--- a/autogen.sh ++++ b/autogen.sh +@@ -96,7 +96,7 @@ do_geterrmsgs=yes + do_getcvars=yes + do_f77=yes + do_build_configure=yes +-do_genstates=yes ++do_genstates=no + do_atdir_check=no + do_atver_check=yes + do_subcfg_m4=yes +@@ -110,7 +110,8 @@ export do_build_configure + MAKE=${MAKE-make} + + # amdirs are the directories that make use of autoreconf +-amdirs=". src/mpl src/util/logging/rlog" ++amdirs=". src/mpl" ++# amdirs="$amdirs src/util/logging/rlog" + + autoreconf_args="-if" + export autoreconf_args +@@ -548,6 +549,20 @@ fi + + + ######################################################################## ++## Checking for UNIX patch ++######################################################################## ++ ++echo_n "Checking for UNIX patch... " ++patch -v > /dev/null 2>&1 ++if [ $? = 0 ] ; then ++ echo "done" ++else ++ echo "not found (error)" ++ exit 1 ++fi ++ ++ ++######################################################################## + ## Checking if xargs rm -rf works + ######################################################################## + +@@ -686,7 +701,7 @@ fi + echo_n "Updating the README... " + . ./maint/Version + if [ -f README.vin ] ; then +- sed -e "s/%VERSION%/${MPICH_VERSION}/g" README.vin > README ++ sed -e "s/%VERSION%/${MPICH_VERSION}/g" -e "s/%LIBFABRIC_VERSION%/${LIBFABRIC_VERSION}/g" README.vin > README + echo "done" + else + echo "error" +@@ -887,6 +902,7 @@ echo + + # Run some of the simple codes + echo_n "Creating the enumeration of logging states into src/include/mpiallstates.h... " ++touch src/include/mpiallstates.h # silience build errors when do_genstates is disabled + if [ -x maint/extractstates -a $do_genstates = "yes" ] ; then + ./maint/extractstates + fi +@@ -931,6 +947,22 @@ if [ "$do_build_configure" = "yes" ] ; then + echo "------------------------------------------------------------------------" + echo "running $autoreconf in $amdir" + (cd $amdir && $autoreconf $autoreconf_args) || exit 1 ++ # Patching ltmain.sh ++ if [ -f $amdir/confdb/ltmain.sh ] ; then ++ echo_n "Patching ltmain.sh for compatibility with Intel compiler options... " ++ patch -N -s -l $amdir/confdb/ltmain.sh maint/patches/optional/confdb/intel-compiler.patch ++ if [ $? -eq 0 ] ; then ++ # Remove possible leftovers, which don't imply a failure ++ rm -f $amdir/confdb/ltmain.sh.orig ++ echo "done" ++ else ++ echo "failed" ++ fi ++ # Rebuild configure ++ (cd $amdir && $autoconf -f) || exit 1 ++ # Reset ltmain.sh timestamps to avoid confusing make ++ touch -r $amdir/confdb/ltversion.m4 $amdir/confdb/ltmain.sh ++ fi + # Patching libtool.m4 + # This works with libtool versions 2.4 - 2.4.2. + # Older versions are not supported to build mpich. +@@ -939,6 +971,19 @@ if [ "$do_build_configure" = "yes" ] ; then + # There is no need to patch if we're not going to use Fortran. + ifort_patch_requires_rebuild=no + oracle_patch_requires_rebuild=no ++ arm_patch_requires_rebuild=no ++ ibm_patch_requires_rebuild=no ++ sys_lib_dlsearch_path_patch_requires_rebuild=no ++ echo_n "Patching libtool.m4 for system dynamic library search path..." ++ patch -N -s -l $amdir/confdb/libtool.m4 maint/patches/optional/confdb/sys_lib_dlsearch_path_spec.patch ++ if [ $? -eq 0 ] ; then ++ sys_lib_dlsearch_path_patch_requires_rebuild=yes ++ # Remove possible leftovers, which don't imply a failure ++ rm -f $amdir/confdb/libtool.m4.orig ++ echo "done" ++ else ++ echo "failed" ++ fi + if [ $do_bindings = "yes" ] ; then + echo_n "Patching libtool.m4 for compatibility with ifort on OSX... " + patch -N -s -l $amdir/confdb/libtool.m4 maint/patches/optional/confdb/darwin-ifort.patch +@@ -970,9 +1015,21 @@ if [ "$do_build_configure" = "yes" ] ; then + else + echo "failed" + fi ++ echo_n "Patching libtool.m4 for compatibility with IBM XL Fortran compilers..." ++ patch -N -s -l $amdir/confdb/libtool.m4 maint/patches/optional/confdb/ibm-xlf.patch ++ if [ $? -eq 0 ] ; then ++ ibm_patch_requires_rebuild=yes ++ # Remove possible leftovers, which don't imply a failure ++ rm -f $amdir/confdb/libtool.m4.orig ++ echo "done" ++ else ++ echo "failed" ++ fi + fi + +- if [ $ifort_patch_requires_rebuild = "yes" ] || [ $oracle_patch_requires_rebuild = "yes" ] || [ $arm_patch_requires_rebuild = "yes" ]; then ++ if [ $ifort_patch_requires_rebuild = "yes" ] || [ $oracle_patch_requires_rebuild = "yes" ] \ ++ || [ $arm_patch_requires_rebuild = "yes" ] || [ $ibm_patch_requires_rebuild = "yes" ] \ ++ [ $sys_lib_dlsearch_path_patch_requires_rebuild = "yes" ]; then + # Rebuild configure + (cd $amdir && $autoconf -f) || exit 1 + # Reset libtool.m4 timestamps to avoid confusing make +deleted file mode 100644 +--- a/confdb/aclocal_atomic.m4 ++++ /dev/null +@@ -1,227 +0,0 @@ +-dnl /*D PAC_C_MEMATOMIC - Try and determine how to implement memory-atomic +-dnl operations with the selected C compiler +-dnl +-dnl Synopsis: +-dnl PAC_C_MEMATOMIC +-dnl +-dnl Notes: +-dnl Defines names of the following form +-dnl + HAVE_GCC_ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - gcc __asm__ will issue +-dnl mfence, lfence, or sfence +-dnl . HAVE___ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - __asm _emit will issue +-dnl mfence, lfence, or sfence +-dnl . HAVE_ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - asm("...") will issue +-dnl mfence, lfence, or sfence +-dnl . HAVE__INTERLOCKEDEXCHANGE - _InterlockedExchange intrinsic is available +-dnl (IA64) +-dnl . HAVE_GCC_ASM_SPARC_MEMBAR - gcc __asm__ will issue SPARC architecture +-dnl memory barrier instruction +-dnl . HAVE_SOLARIS_ASM_SPARC_MEMBAR - Solaris asm() will issue SPARC +-dnl architecture memory barrier instruction +-dnl . HAVE_GCC_ASM_SPARC_STBAR - gcc __asm__ will issue stbar +-dnl - HAVE_SOLARIS_ASM_SPARC_STBAR - Solaris __asm() will issue stbar +-dnl +-dnl D*/ +-AC_DEFUN([PAC_C_MEMATOMIC],[ +-AC_CACHE_CHECK([for x86 mfence instruction using __asm__], +- pac_cv_have_gcc_asm_and_x86_mfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- __asm__ __volatile__ ( ".byte 0x0f, 0xae, 0xf0" ::: "memory" ); +- exit(0); +-} +-], +-pac_cv_have_gcc_asm_and_x86_mfence=yes,pac_cv_have_gcc_asm_and_x86_mfence=no)]) +- +-if test "$pac_cv_have_gcc_asm_and_x86_mfence" = "yes" ; then +- AC_DEFINE(HAVE_GCC_ASM_AND_X86_MFENCE, 1, [Define if using gcc on a x86 system with the mfence instruction]) +-fi +- +-AC_CACHE_CHECK([for x86 sfence instruction using __asm__], +- pac_cv_have_gcc_asm_and_x86_sfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- __asm__ __volatile__ ( ".byte 0x0f, 0xae, 0xf8" ::: "memory" ); +- exit(0); +-} +-], +-pac_cv_have_gcc_asm_and_x86_sfence=yes,pac_cv_have_gcc_asm_and_x86_sfence=no)]) +- +-if test "$pac_cv_have_gcc_asm_and_x86_sfence" = "yes" ; then +- AC_DEFINE(HAVE_GCC_ASM_AND_X86_SFENCE, 1, [Define if using gcc on a x86 system with the sfence instruction]) +-fi +- +-AC_CACHE_CHECK([for x86 lfence instruction using __asm__], +- pac_cv_have_gcc_asm_and_x86_lfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- __asm__ __volatile__ ( ".byte 0x0f, 0xae, 0xe8" ::: "memory" ); +- exit(0); +-} +-], +-pac_cv_have_gcc_asm_and_x86_lfence=yes,pac_cv_have_gcc_asm_and_x86_lfence=no)]) +- +-if test "$pac_cv_have_gcc_asm_and_x86_lfence" = "yes" ; then +- AC_DEFINE(HAVE_GCC_ASM_AND_X86_LFENCE, 1, [Define if using gcc on a x86 system with the lfence instruction]) +-fi +- +-dnl Some compilers, like icc, may want __asm _emit +-AC_CACHE_CHECK([for x86 mfence instruction using __asm], +- pac_cv_have___asm_and_x86_mfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- __asm _emit 0x0f __asm _emit 0xae __asm _emit 0xf0 ; +- exit(0); +-} +-], +-pac_cv_have___asm_and_x86_mfence=yes,pac_cv_have___asm_and_x86_mfence=no)]) +- +-if test "$pac_cv_have___asm_and_x86_mfence" = "yes" ; then +- AC_DEFINE(HAVE___ASM_AND_X86_MFENCE, 1, [Define if using __asm on a x86 system with the mfence instruction]) +-fi +- +-AC_CACHE_CHECK([for x86 sfence instruction using __asm], +- pac_cv_have___asm_and_x86_sfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- __asm sfence ; +- exit(0); +-} +-], +-pac_cv_have___asm_and_x86_sfence=yes,pac_cv_have___asm_and_x86_sfence=no)]) +- +-if test "$pac_cv_have___asm_and_x86_sfence" = "yes" ; then +- AC_DEFINE(HAVE___ASM_AND_X86_SFENCE, 1, [Define if using __asm on a x86 system with the sfence instruction]) +-fi +- +-AC_CACHE_CHECK([for x86 lfence instruction using __asm], +- pac_cv_have___asm_and_x86_lfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- __asm _emit 0x0f __asm _emit 0xae __asm _emit 0xe8 ; +- exit(0); +-} +-], +-pac_cv_have___asm_and_x86_lfence=yes,pac_cv_have___asm_and_x86_lfence=no)]) +- +-if test "$lac_cv_have___asm_and_x86_lfence" = "yes" ; then +- AC_DEFINE(HAVE___ASM_AND_X86_LFENCE, 1, [Define if using __asm on a x86 system with the lfence instruction]) +-fi +- +-dnl +-dnl Some compilers, such as pgcc, may require additional arguments. +-dnl pgcc may need -Masmkeyword flag. We may want to try this with and +-dnl without adding -Masmkeyword to CFLAGS +- +-AC_CACHE_CHECK([for x86 mfence instruction using asm()], +- pac_cv_have_asm_and_x86_mfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- asm("_emit 0x0f __asm _emit 0xae __asm _emit 0xf0"); +- exit(0); +-} +-], +-pac_cv_have_asm_and_x86_mfence=yes,pac_cv_have_asm_and_x86_mfence=no)]) +- +-if test "$pac_cv_have_asm_and_x86_mfence" = "yes" ; then +- AC_DEFINE(HAVE_ASM_AND_X86_MFENCE, 1, [Define if using asm() on a x86 system with the mfence instruction]) +-fi +- +-AC_CACHE_CHECK([for x86 sfence instruction using asm()], +- pac_cv_have_asm_and_x86_sfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- asm("sfence"); +- exit(0); +-} +-], +-pac_cv_have_asm_and_x86_sfence=yes,pac_cv_have_asm_and_x86_sfence=no)]) +- +-if test "$pac_cv_have_asm_and_x86_sfence" = "yes" ; then +- AC_DEFINE(HAVE_ASM_AND_X86_SFENCE, 1, [Define if using asm() on a x86 system with the sfence instruction]) +-fi +- +-AC_CACHE_CHECK([for x86 lfence instruction using asm()], +- pac_cv_have_asm_and_x86_lfence,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- asm("_emit 0x0f __asm _emit 0xae __asm _emit 0xe8"); +- exit(0); +-} +-], +-pac_cv_have_asm_and_x86_lfence=yes,pac_cv_have_asm_and_x86_lfence=no)]) +- +-if test "$pac_cv_have_asm_and_x86_lfence" = "yes" ; then +- AC_DEFINE(HAVE_ASM_AND_X86_LFENCE, 1, [Define if using asm() on a x86 system with the lfence instruction]) +-fi +- +-AC_CACHE_CHECK([for _InterlockedExchange intrinsic], +- pac_cv_have__InterlockedExchange,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv) +-{ +- unsigned long lock, *lock_ptr; +- lock_ptr = &lock; +- _InterlockedExchange(lock_ptr, 1); +- exit(0); +-} +-], +-pac_cv_have__InterlockedExchange=yes,pac_cv_have__InterlockedExchange=no)]) +- +-if test "$pac_cv_have__InterlockedExchange" = "yes" ; then +- AC_DEFINE(HAVE__INTERLOCKEDEXCHANGE, 1, [Define if _InterlockedExchange intrinsic is available]) +-fi +- +-AC_CACHE_CHECK([for SPARC membar instruction with gcc], +- pac_cv_gcc_sparc_membar,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv){ +- __asm__ __volatile__ ( "membar #StoreLoad | #StoreStore" : : : "memory" ); +- exit(0); +-}],pac_cv_gcc_sparc_membar=yes,pac_cv_gcc_sparc_membar=no)]) +-if test "$pac_cv_gcc_sparc_membar" = yes ; then +- AC_DEFINE(HAVE_GCC_ASM_SPARC_MEMBAR,1,[Define if gcc asm membar supported]) +-fi +- +-AC_CACHE_CHECK([for SPARC membar instruction with Solaris C], +- pac_cv_solaris_sparc_membar,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv){ +- __asm ( "membar #StoreLoad | #StoreStore"); +- exit(0); +-}],pac_cv_solaris_sparc_membar=yes,pac_cv_solaris_sparc_membar=no)]) +-if test "$pac_cv_solaris_sparc_membar" = yes ; then +- AC_DEFINE(HAVE_SOLARIS_ASM_SPARC_MEMBAR,1,[Define if solaris asm membar supported]) +-fi +- +-AC_CACHE_CHECK([for SPARC stbar instruction with gcc], +- pac_cv_gcc_sparc_stbar,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv){ +- __asm__ __volatile__ ( "stbar" : : : "memory" ); +- exit(0); +-}],pac_cv_gcc_sparc_stbar=yes,pac_cv_gcc_sparc_stbar=no)]) +-if test "$pac_cv_gcc_sparc_stbar" = yes ; then +- AC_DEFINE(HAVE_GCC_ASM_SPARC_STBAR,1,[Define if gcc asm stbar supported]) +-fi +- +-AC_CACHE_CHECK([for SPARC stbar instruction with Solaris C], +- pac_cv_solaris_sparc_stbar,[ +-AC_TRY_RUN([ +-int main(int argc, char **argv){ +- __asm ( "stbar" ); +- exit(0); +-}],pac_cv_solaris_sparc_stbar=yes,pac_cv_solaris_sparc_stbar=no)]) +-if test "$pac_cv_solaris_sparc_stbar" = yes ; then +- AC_DEFINE(HAVE_SOLARIS_ASM_SPARC_STBAR,1,[Define if solaris asm stbar supported]) +-fi +-]) +\ No newline at end of file +--- a/confdb/aclocal_cc.m4 ++++ b/confdb/aclocal_cc.m4 +@@ -1,19 +1,6 @@ + dnl AC_PROG_CC_GNU + ifdef([AC_PROG_CC_GNU],,[AC_DEFUN([AC_PROG_CC_GNU],)]) + +-dnl PAC_PROG_CC - reprioritize the C compiler search order +-AC_DEFUN([PAC_PROG_CC],[ +- dnl Many standard autoconf/automake/libtool macros, such as LT_INIT, +- dnl perform an AC_REQUIRE([AC_PROG_CC]). If this macro (PAC_PROG_CC) +- dnl comes after LT_INIT (or similar) then the default compiler search +- dnl path will be used instead. This AC_BEFORE macro ensures that a +- dnl warning will be emitted at autoconf-time (autogen.sh-time) to help +- dnl developers notice this case. +- AC_BEFORE([$0],[AC_PROG_CC]) +- PAC_PUSH_FLAG([CFLAGS]) +- AC_PROG_CC([icc pgcc xlc xlC pathcc gcc clang cc]) +- PAC_POP_FLAG([CFLAGS]) +-]) + dnl + dnl/*D + dnl PAC_C_CHECK_COMPILER_OPTION - Check that a compiler option is accepted +@@ -459,6 +446,8 @@ dnl (-D __STRICT_ANSI__-trigraphs) + AC_DEFUN([PAC_CC_STRICT],[ + export enable_strict_done + if test "$enable_strict_done" != "yes" ; then ++ # make sure we don't add the below flags multiple times ++ enable_strict_done=yes + + # Some comments on strict warning options. + # These were added to improve portability +@@ -550,7 +539,6 @@ if test "$enable_strict_done" != "yes" ; then + -Wold-style-definition + -Wno-multichar + -Wno-deprecated-declarations +- -Wpacked + -Wnested-externs + -Winvalid-pch + -Wno-pointer-sign +@@ -561,56 +549,58 @@ if test "$enable_strict_done" != "yes" ; then + -Wstack-usage=262144 + " + +- enable_c89=no +- enable_c99=yes +- enable_posix=2001 ++ if test -z "$1"; then ++ flags=no ++ else ++ flags="`echo $1 | sed -e 's/:/ /g' -e 's/,/ /g'`" ++ fi ++ add_cflags=yes ++ c_std=c99 ++ posix_std=2001 + enable_opt=yes +- flags="`echo $1 | sed -e 's/:/ /g' -e 's/,/ /g'`" ++ pac_cc_strict_werror=no + for flag in ${flags}; do + case "$flag" in +- c89) +- enable_strict_done="yes" +- enable_c89=yes +- enable_c99=no ++ error) ++ # note: we can't enable -Werror early as it will break many config tests ++ # Need apply to CFLAGS at the end of configure. ++ pac_cc_strict_werror=yes ++ ;; ++ stdc89) ++ c_std=c89 ++ ;; ++ stdc99) ++ c_std=c99 + ;; +- c99) +- enable_strict_done="yes" +- enable_c89=no +- enable_c99=yes ++ stdgnu99) ++ c_std=gnu99 ++ ;; ++ !stdc) ++ c_std=none + ;; + posix1995) +- enable_strict_done="yes" +- enable_posix=1995 ++ posix_std=1995 + ;; +- posix|posix2001) +- enable_strict_done="yes" +- enable_posix=2001 ++ posix2001) ++ posix_std=2001 + ;; + posix2008) +- enable_strict_done="yes" +- enable_posix=2008 ++ posix_std=2008 + ;; +- noposix) +- enable_strict_done="yes" +- enable_posix=no ++ !posix) ++ posix_std=none + ;; + opt) +- enable_strict_done="yes" + enable_opt=yes + ;; +- noopt) +- enable_strict_done="yes" ++ !opt) + enable_opt=no + ;; + all|yes) +- enable_strict_done="yes" +- enable_c99=yes +- enable_posix=2001 +- enable_opt=yes ++ # leave the defaults + ;; +- no) +- # Accept and ignore this value +- : ++ no|none) ++ add_cflags=no + ;; + *) + if test -n "$flag" ; then +@@ -621,34 +611,48 @@ if test "$enable_strict_done" != "yes" ; then + done + + pac_cc_strict_flags="" +- if test "${enable_strict_done}" = "yes" ; then +- if test "${enable_opt}" = "yes" ; then +- pac_cc_strict_flags="-O2" +- fi ++ if test "${add_cflags}" = "yes" ; then ++ # common flags + pac_cc_strict_flags="$pac_cc_strict_flags $pac_common_strict_flags" +- # We only allow one of strict-C99 or strict-C89 to be +- # enabled. If C99 is enabled, we automatically disable C89. +- if test "${enable_c99}" = "yes" ; then +- PAC_APPEND_FLAG([-std=c99],[pac_cc_strict_flags]) +- # Use -D_STDC_C99= for Solaris compilers. See +- # http://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html +- # for discussion on why not to use -xc99 +- PAC_APPEND_FLAG([-D_STDC_C99=],[pac_cc_strict_flags]) +- elif test "${enable_c89}" = "yes" ; then +- PAC_APPEND_FLAG([-std=c89],[pac_cc_strict_flags]) +- PAC_APPEND_FLAG([-Wdeclaration-after-statement],[pac_cc_strict_flags]) ++ ++ # optimization flags ++ if test "${enable_opt}" = "yes" ; then ++ PAC_APPEND_FLAG([-O2],[pac_cc_strict_flags]) + fi +- # POSIX 2001 should be used with C99. But the default standard for some +- # compilers are not C99. We must test the support of POSIX 2001 after +- # testing C99. +- case "$enable_posix" in +- no) : ;; ++ ++ # stdc flags ++ case "${c_std}" in ++ none) ++ : ++ ;; ++ c89) ++ PAC_APPEND_FLAG([-std=c89],[pac_cc_strict_flags]) ++ PAC_APPEND_FLAG([-Wdeclaration-after-statement],[pac_cc_strict_flags]) ++ ;; ++ c99) ++ PAC_APPEND_FLAG([-std=c99],[pac_cc_strict_flags]) ++ # Use -D_STDC_C99= for Solaris compilers. See ++ # http://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html ++ # for discussion on why not to use -xc99 ++ PAC_APPEND_FLAG([-D_STDC_C99=],[pac_cc_strict_flags]) ++ ;; ++ gnu99) ++ PAC_APPEND_FLAG([-std=gnu99],[pac_cc_strict_flags]) ++ ;; ++ *) ++ AC_MSG_ERROR([internal error, unexpected C std version: '$c_std']) ++ ;; ++ esac ++ ++ # posix flags ++ case "${posix_std}" in ++ none) : ;; + 1995) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=199506L],[pac_cc_strict_flags]) ;; + 2001) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=200112L],[pac_cc_strict_flags]) ;; + 2008) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=200809L],[pac_cc_strict_flags]) ;; +- *) AC_MSG_ERROR([internal error, unexpected POSIX version: '$enable_posix']) ;; ++ *) AC_MSG_ERROR([internal error, unexpected POSIX version: '$posix_std']) ;; + esac +- if test "$enable_posix" != "no" ; then ++ if test "${posix_std}" != "none" ; then + AS_CASE([$host],[*-*-darwin*], [PAC_APPEND_FLAG([-D_DARWIN_C_SOURCE],[pac_cc_strict_flags])]) + fi + fi +@@ -677,7 +681,7 @@ dnl + dnl D*/ + AC_DEFUN([PAC_ARG_STRICT],[ + AC_ARG_ENABLE(strict, +- AC_HELP_STRING([--enable-strict], [Turn on strict compilation testing])) ++ AC_HELP_STRING([--enable-strict], [Turn on strict compilation testing]),,enable_strict=no) + PAC_CC_STRICT($enable_strict) + CFLAGS="$CFLAGS $pac_cc_strict_flags" + export CFLAGS +@@ -1296,75 +1300,6 @@ pac_cv_gnu_attr_format=yes,pac_cv_gnu_attr_format=no)]) + fi + fi + ]) +-dnl +-dnl Check for a broken install (fails to preserve file modification times, +-dnl thus breaking libraries. +-dnl +-dnl Create a library, install it, and then try to link against it. +-AC_DEFUN([PAC_PROG_INSTALL_BREAKS_LIBS],[ +-AC_CACHE_CHECK([whether install breaks libraries], +-ac_cv_prog_install_breaks_libs,[ +-AC_REQUIRE([AC_PROG_RANLIB]) +-AC_REQUIRE([AC_PROG_INSTALL]) +-AC_REQUIRE([AC_PROG_CC]) +-ac_cv_prog_install_breaks_libs=yes +- +-AC_COMPILE_IFELSE([ +- AC_LANG_SOURCE([ int foo(int); int foo(int a){return a;} ]) +-],[ +- if ${AR-ar} ${AR_FLAGS-cr} libconftest.a conftest.$OBJEXT >/dev/null 2>&1 ; then +- if ${RANLIB-:} libconftest.a >/dev/null 2>&1 ; then +- # Anything less than sleep 10, and Mac OS/X (Darwin) +- # will claim that install works because ranlib won't complain +- sleep 10 +- libinstall="$INSTALL_DATA" +- eval "libinstall=\"$libinstall\"" +- if ${libinstall} libconftest.a libconftest1.a >/dev/null 2>&1 ; then +- saved_LIBS="$LIBS" +- LIBS="libconftest1.a" +- AC_LINK_IFELSE([ +- AC_LANG_SOURCE([ +-extern int foo(int); +-int main(int argc, char **argv){ return foo(0); } +- ]) +- ],[ +- # Success! Install works +- ac_cv_prog_install_breaks_libs=no +- ],[ +- # Failure! Does install -p work? +- rm -f libconftest1.a +- if ${libinstall} -p libconftest.a libconftest1.a >/dev/null 2>&1 ; then +- AC_LINK_IFELSE([],[ +- # Success! Install works +- ac_cv_prog_install_breaks_libs="no, with -p" +- ]) +- fi +- ]) +- LIBS="$saved_LIBS" +- fi +- fi +- fi +-]) +-rm -f libconftest*.a +-]) dnl Endof ac_cache_check +- +-if test -z "$RANLIB_AFTER_INSTALL" ; then +- RANLIB_AFTER_INSTALL=no +-fi +-case "$ac_cv_prog_install_breaks_libs" in +- yes) +- RANLIB_AFTER_INSTALL=yes +- ;; +- "no, with -p") +- INSTALL_DATA="$INSTALL_DATA -p" +- ;; +- *) +- # Do nothing +- : +- ;; +-esac +-AC_SUBST(RANLIB_AFTER_INSTALL) +-]) + + # + # determine if the compiler defines a symbol containing the function name +@@ -1696,3 +1631,23 @@ if test x$have_builtin_expect = xyes ; then + AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], [Define to 1 if the compiler supports __builtin_expect.]) + fi + ]) ++ ++dnl ++dnl PAC_C_STATIC_ASSERT - Test whether C11 _Static_assert is supported ++dnl ++dnl will AC_DEFINE([HAVE_C11__STATIC_ASSERT]) if C11 _Static_assert is supported. ++dnl ++AC_DEFUN([PAC_C_STATIC_ASSERT], [ ++ AC_MSG_CHECKING([for C11 _Static_assert functionality]) ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ ++ int main(){ ++ _Static_assert(1, "The impossible happened!"); ++ return 0; ++ } ++ ])],[ ++ AC_DEFINE([HAVE_C11__STATIC_ASSERT],[1],[Define if C11 _Static_assert is supported.]) ++ AC_MSG_RESULT([yes]) ++ ],[ ++ AC_MSG_RESULT([no]) ++ ]) ++]) +--- a/confdb/aclocal_libs.m4 ++++ b/confdb/aclocal_libs.m4 +@@ -71,6 +71,7 @@ AC_DEFUN([PAC_CHECK_HEADER_LIB],[ + dnl PAC_CHECK_HEADER_LIB_FATAL(with_option, header.h, libname, function) + dnl Similar to PAC_CHECK_HEADER_LIB, but errors out on failure + AC_DEFUN([PAC_CHECK_HEADER_LIB_FATAL],[ ++ PAC_SET_HEADER_LIB_PATH($1) + PAC_CHECK_HEADER_LIB($2,$3,$4,success=yes,success=no) + if test "$success" = "no" ; then + AC_MSG_ERROR(['$2 or lib$3 library not found. Did you specify --with-$1= or --with-$1-include= or --with-$1-lib=?']) +@@ -102,3 +103,17 @@ AC_DEFUN([PAC_CHECK_PREFIX],[ + [with_$1_prefix="embedded"]) + ] + ) ++ ++dnl PAC_LIB_DEPS(library_name, library_pc_path) ++dnl library_pc_path is the path to the library pkg-config directory ++AC_DEFUN([PAC_LIB_DEPS],[ ++if test "x$2" != "x"; then ++ ac_lib$1_deps=`pkg-config --static --libs $2/lib$1.pc 2>/dev/null` ++ # remove the library itself in case it is embedded ++ ac_lib$1_deps=`echo $ac_lib$1_deps | sed 's/-l$1//'` ++else ++ # use system default ++ ac_lib$1_deps=`pkg-config --static --libs lib$1 2>/dev/null` ++fi ++]) ++ +--- a/confdb/aclocal_mpi.m4 ++++ b/confdb/aclocal_mpi.m4 +@@ -1,512 +1,4 @@ + dnl +-dnl/*D +-dnl PAC_LIB_MPI - Check for MPI library +-dnl +-dnl Synopsis: +-dnl PAC_LIB_MPI([action if found],[action if not found]) +-dnl +-dnl Output Effect: +-dnl +-dnl Notes: +-dnl Currently, only checks for lib mpi and mpi.h. Later, we will add +-dnl MPI_Pcontrol prototype (const int or not?). +-dnl +-dnl Prerequisites: +-dnl autoconf version 2.13 (for AC_SEARCH_LIBS) +-dnl D*/ +-dnl Other tests to add: +-dnl Version of MPI +-dnl MPI-2 I/O? +-dnl MPI-2 Spawn? +-dnl MPI-2 RMA? +-dnl PAC_LIB_MPI([found text],[not found text]) +-AC_DEFUN([PAC_LIB_MPI],[ +-dnl Set the prereq to 2.50 to avoid having +-AC_PREREQ(2.50) +-if test "X$pac_lib_mpi_is_building" != "Xyes" ; then +- # Use CC if TESTCC is defined +- if test "X$pac_save_level" != "X" ; then +- pac_save_TESTCC="${TESTCC}" +- pac_save_TESTCPP="${TESTCPP}" +- CC="$pac_save_CC" +- if test "X$pac_save_CPP" != "X" ; then +- CPP="$pac_save_CPP" +- fi +- fi +- # Look for MPILIB first if it is defined +- AC_SEARCH_LIBS(MPI_Init,$MPILIB mpi mpich) +- if test "$ac_cv_search_MPI_Init" = "no" ; then +- ifelse($2,, +- AC_MSG_ERROR([Could not find MPI library]),[$2]) +- fi +- AC_CHECK_HEADER(mpi.h,pac_have_mpi_h="yes",pac_have_mpi_h="no") +- if test $pac_have_mpi_h = "no" ; then +- ifelse($2,, +- AC_MSG_ERROR([Could not find mpi.h include file]),[$2]) +- fi +- if test "X$pac_save_level" != "X" ; then +- CC="$pac_save_TESTCC" +- CPP="$pac_save_TESTCPP" +- fi +-fi +-ifelse($1,,,[$1]) +-]) +- +-dnl This should also set MPIRUN. +-dnl +-dnl/*D +-dnl PAC_ARG_MPI_TYPES - Add command-line switches for different MPI +-dnl environments +-dnl +-dnl Synopsis: +-dnl PAC_ARG_MPI_TYPES([default]) +-dnl +-dnl Output Effects: +-dnl Adds the following command line options to configure +-dnl+ \-\-with\-mpich[=path] - MPICH. 'path' is the location of MPICH commands +-dnl. \-\-with\-ibmmpi - IBM MPI +-dnl. \-\-with\-lammpi[=path] - LAM/MPI +-dnl. \-\-with\-mpichnt - MPICH NT +-dnl- \-\-with\-sgimpi - SGI MPI +-dnl If no type is selected, and a default ("mpich", "ibmmpi", or "sgimpi") +-dnl is given, that type is used as if '--with-' was given. +-dnl +-dnl Sets 'CC', 'F77', 'TESTCC', 'TESTF77', and 'MPILIBNAME'. Does `not` +-dnl perform an AC_SUBST for these values. +-dnl Also sets 'MPIBOOT' and 'MPIUNBOOT'. These are used to specify +-dnl programs that may need to be run before and after running MPI programs. +-dnl For example, 'MPIBOOT' may start demons necessary to run MPI programs and +-dnl 'MPIUNBOOT' will stop those demons. +-dnl +-dnl The two forms of the compilers are to allow for tests of the compiler +-dnl when the MPI version of the compiler creates executables that cannot +-dnl be run on the local system (for example, the IBM SP, where executables +-dnl created with mpcc will not run locally, but executables created +-dnl with xlc may be used to discover properties of the compiler, such as +-dnl the size of data types). +-dnl +-dnl Historical note: +-dnl Some common autoconf tests, such as AC_CHECK_SIZEOF, used to require +-dnl running a program. But some MPI compilers (often really compilation +-dnl scripts) produced programs that could only be run with special commands, +-dnl such as a batch submission system. To allow these test programs to be +-dnl run, a separate set of compiler variables, TESTCC, TESTF77, etc., +-dnl were defined. However, in later versions of autoconf, it both became +-dnl unnecessary to run programs for tests such as AC_CHECK_SIZEOF and +-dnl it became necessary to define CC etc. before invoking AC_PROG_CC (and +-dnl the othe language compilers), because those commands now do much, much +-dnl more than just determining the compiler. +-dnl +-dnl To address the change, we still define the TESTCC etc. compilers where +-dnl possible to allow the use of AC_TRY_RUN when required, but we define +-dnl the CC etc variables and do not define ac_cv_prog_CC etc., as these +-dnl cause autoconf to skip all of the other initialization code that +-dnl AC_PROG_CC etc. runs. Note also that this command must occur before +-dnl AC_PROG_CC (or anything that might cause AC_PROG_CC to be invoked). +-dnl +-dnl See also: +-dnl PAC_LANG_PUSH_COMPILERS, PAC_LIB_MPI +-dnl D*/ +-AC_DEFUN([PAC_ARG_MPI_TYPES],[ +-# known types +-PAC_ARG_MPI_KNOWN_TYPES +-# find compilers +-PAC_MPI_FIND_COMPILER_SCRIPTS +-PAC_MPI_FIND_COMPILERS +-# check for MPI library +-PAC_MPI_CHECK_MPI_LIB +-]) +-dnl +-dnl To keep autoconf from prematurely invoking the compiler check scripts, +-dnl we need a command that first sets the compilers and a separate one +-dnl that makes any necessary checks for libraries +-dnl +-AC_DEFUN([PAC_ARG_MPI_KNOWN_TYPES],[ +-AC_ARG_WITH(mpich, +-[--with-mpich=path - Assume that we are building with MPICH], +-ac_mpi_type=mpich) +-# Allow MPICH as well as MPICH +-AC_ARG_WITH(mpich, +-[--with-mpich=path - Assume that we are building with MPICH], +-ac_mpi_type=mpich) +-AC_ARG_WITH(lammpi, +-[--with-lammpi=path - Assume that we are building with LAM/MPI], +-ac_mpi_type=lammpi) +-AC_ARG_WITH(ibmmpi, +-[--with-ibmmpi - Use the IBM SP implementation of MPI], +-ac_mpi_type=ibmmpi) +-AC_ARG_WITH(sgimpi, +-[--with-sgimpi - Use the SGI implementation of MPI], +-ac_mpi_type=sgimpi) +-AC_ARG_WITH(mpichnt, +-[--with-mpichnt - Use MPICH for Windows NT ], +-ac_mpi_type=mpichnt) +-AC_ARG_WITH(mpi, +-[--with-mpi=path - Use an MPI implementation with compile scripts mpicc +- and mpif77 in path/bin],ac_mpi_type=generic) +- +-if test "X$ac_mpi_type" = "X" ; then +- if test "X$1" != "X" ; then +- ac_mpi_type=$1 +- else +- ac_mpi_type=unknown +- fi +-fi +-if test "$ac_mpi_type" = "unknown" -a "$pac_lib_mpi_is_building" = "yes" ; then +- ac_mpi_type="mpich" +-fi +-]) +-dnl +-dnl Because autoconf insists on moving code to the beginning of +-dnl certain definitions, it is *not possible* to define a single command +-dnl that selects compilation scripts and also check for other options. +-dnl Thus, this needs to be divided into +-dnl MPI_FIND_COMPILER_SCRIPTS +-dnl which can fail (i.e., not find a script), and +-dnl MPI_FIND_COMPILERS +-dnl which runs the various PROC_xx for the compilers. +-dnl WARNING: this function ignores --program-suffix and --program-prefix. +-dnl However, this function is not currently used at all. +-AC_DEFUN([PAC_MPI_FIND_COMPILER_SCRIPTS],[ +-# Set defaults +-MPIRUN_NP="-np " +-MPIEXEC_N="-n " +-AC_SUBST(MPIRUN_NP) +-AC_SUBST(MPIEXEC_N) +-dnl +-AC_ARG_VAR([MPIEXEC],[Name and path of mpiexec program]) +-AC_ARG_VAR([MPIRUN],[Name and path of mpirun program]) +-AC_ARG_VAR([MPIBOOT],[Name and path of program to run before mpirun]) +-AC_ARG_VAR([MPIUNBOOT],[Name and path of program to run after all mpirun]) +-AC_ARG_VAR([MPICC],[Name and absolute path of program used to compile MPI programs in C]) +-AC_ARG_VAR([MPIF77],[Name and absolute path of program used to compile MPI programs in F77]) +-AC_ARG_VAR([MPICXX],[Name and absolute path of program used to compile MPI programs in C++]) +-AC_ARG_VAR([MPIF90],[Name and absolute path of program used to compile MPI programs in F90]) +-# +-# Check for things that will cause trouble. For example, +-# if MPICC is defined but does not contain a / or \, then PATH_PROG will +-# ignore the value +-if test -n "$MPICC" ; then +- case $MPICC in +-changequote(<<,>>) +- [\\/]* | ?:[\\/]*) +-changequote([,]) +- # Ok, PATH_PROG will figure it out +- ;; +- *) +- AC_MSG_ERROR([MPICC must be set to an absolute path if it is set]) +- esac +-fi +-if test -n "$MPICXX" ; then +- case $MPICXX in +-changequote(<<,>>) +- [\\/]* | ?:[\\/]*) +-changequote([,]) +- # Ok, PATH_PROG will figure it out +- ;; +- *) +- AC_MSG_ERROR([MPICXX must be set to an absolute path if it is set]) +- esac +-fi +-if test -n "$MPIF77" ; then +- case $MPIF77 in +-changequote(<<,>>) +- [\\/]* | ?:[\\/]*) +-changequote([,]) +- # Ok, PATH_PROG will figure it out +- ;; +- *) +- AC_MSG_ERROR([MPIF77 must be set to an absolute path if it is set]) +- esac +-fi +-if test -n "$MPIF90" ; then +- case $MPIF90 in +-changequote(<<,>>) +- [\\/]* | ?:[\\/]*) +-changequote([,]) +- # Ok, PATH_PROG will figure it out +- ;; +- *) +- AC_MSG_ERROR([MPIF90 must be set to an absolute path if it is set]) +- esac +-fi +- +-case $ac_mpi_type in +- mpich) +- dnl +- dnl This isn't correct. It should try to get the underlying compiler +- dnl from the mpicc and mpif77 scripts or mpireconfig +- if test "X$pac_lib_mpi_is_building" != "Xyes" ; then +- PAC_PUSH_FLAG([PATH]) +- if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then +- # Look for commands; if not found, try adding bin to the +- # path +- if test ! -x $with_mpich/mpicc -a -x $with_mpich/bin/mpicc ; then +- with_mpich="$with_mpich/bin" +- fi +- PATH=$with_mpich:${PATH} +- fi +- AC_PATH_PROG(MPICC,mpicc) +- if test -z "$TESTCC" ; then TESTCC=${CC-cc} ; fi +- CC="$MPICC" +- # Note that autoconf may unconditionally change the value of +- # CC (!) in some other command. Thus, we define CCMASTER +- CCMASTER=$CC +- # Force autoconf to respect this choice +- ac_ct_CC=$CC +- # to permit configure codes to recover the correct CC. This +- # is an ugly not-quite-correct workaround for the fact that +- # does not want you to change the C compiler once you have set it +- # (But since it does so unconditionally, it silently creates +- # bogus output files.) +- AC_PATH_PROG(MPIF77,mpif77) +- if test -z "$TESTF77" ; then TESTF77=${F77-f77} ; fi +- F77="$MPIF77" +- AC_PATH_PROG(MPIFC,mpif90) +- if test -z "$TESTFC" ; then TESTFC=${FC-f90} ; fi +- FC="$MPIFC" +- AC_PATH_PROG(MPICXX,mpiCC) +- if test -z "$TESTCXX" ; then TESTCXX=${CXX-CC} ; fi +- CXX="$MPICXX" +- # We may want to restrict this to the path containing mpirun +- AC_PATH_PROG(MPIEXEC,mpiexec) +- AC_PATH_PROG(MPIRUN,mpirun) +- AC_PATH_PROG(MPIBOOT,mpichboot) +- AC_PATH_PROG(MPIUNBOOT,mpichstop) +- PAC_POP_FLAG([PATH]) +- MPILIBNAME="mpich" +- else +- # All of the above should have been passed in the environment! +- : +- fi +- ;; +- +- mpichnt) +- ;; +- +- lammpi) +- dnl +- dnl This isn't correct. It should try to get the underlying compiler +- dnl from the mpicc and mpif77 scripts or mpireconfig +- PAC_PUSH_FLAG([PATH]) +- if test "$with_mpich" != "yes" -a "$with_mpich" != "no" ; then +- # Look for commands; if not found, try adding bin to the path +- if test ! -x $with_lammpi/mpicc -a -x $with_lammpi/bin/mpicc ; then +- with_lammpi="$with_lammpi/bin" +- fi +- PATH=$with_lammpi:${PATH} +- fi +- AC_PATH_PROG(MPICC,mpicc) +- if test -z "$TESTCC" ; then TESTCC=${CC-cc} ; fi +- CC="$MPICC" +- AC_PATH_PROG(MPIF77,mpif77) +- if test -z "$TESTCC" ; then TESTF77=${F77-f77} ; fi +- F77="$MPIF77" +- AC_PATH_PROG(MPIFC,mpif90) +- TESTFC=${FC-f90} +- if test -z "$TESTFC" ; then TESTFC=${FC-f90} ; fi +- FC="$MPIFC" +- AC_PATH_PROG(MPICXX,mpiCC) +- if test -z "$TESTCXX" ; then TESTCXX=${CXX-CC} ; fi +- CXX="$MPICXX" +- PAC_POP_FLAG([PATH]) +- MPILIBNAME="lammpi" +- MPIBOOT="lamboot" +- MPIUNBOOT="wipe" +- MPIRUN="mpirun" +- ;; +- +- ibmmpi) +- AC_CHECK_PROGS(MPCC,mpcc) +- AC_CHECK_PROGS(MPXLF,mpxlf mpfort) +- if test -z "$MPCC" -o -z "$MPXLF" ; then +- AC_MSG_ERROR([Could not find IBM MPI compilation scripts. Either mpcc or mpxlf/mpfort is missing]) +- fi +- if test -z "$TESTCC" ; then TESTCC=${CC-xlC} ; fi +- if test -z "$TESTF77" ; then TESTF77=${F77-xlf}; fi +- CC=mpcc; F77=$MPXLF +- # There is no mpxlf90, but the options langlvl and free can +- # select the Fortran 90 version of xlf +- if test "$enable_f90" != no ; then +- AC_CHECK_PROGS(MPIXLF90,mpxlf90 mpfort) +- if test -z "$TESTFC" ; then TESTFC=${FC-xlf90}; fi +- if test "X$MPIXLF90" != "X" ; then +- FC="$MPIXLF90" +- else +- FC="$MPXLF -qlanglvl=90ext -qfree=f90" +- fi +- fi +- MPILIBNAME="" +- cross_compiling=yes +- # Turn off the autoconf version 3 warning message +- ac_tool_warned=yes +- ;; +- +- sgimpi) +- if test -z "$TESTCC" ; then TESTCC=${CC:=cc} ; fi +- if test -z "$TESTF77" ; then TESTF77=${F77:=f77} ; fi +- if test -z "$TESTCXX" ; then TESTCXX=${CXX:=CC} ; fi +- if test -z "$TESTFC" ; then TESTFC=${FC:=f90} ; fi +- # Must check for the MPI library in a separate macro - adding +- # a test here will cause autoconf to prematurely define the +- # C compiler +- MPIRUN=mpirun +- MPIBOOT="" +- MPIUNBOOT="" +- ;; +- +- generic) +- # in $with_mpi/bin or $with_mpi +- if test "X$MPICC" = "X" ; then +- if test -x "$with_mpi/bin/mpicc" ; then +- MPICC=$with_mpi/bin/mpicc +- elif test -x "$with_mpi/mpicc" ; then +- MPICC=$with_mpi/mpicc +- fi +- fi +- if test "X$MPICXX" = "X" ; then +- if test -x "$with_mpi/bin/mpicxx" ; then +- MPICXX=$with_mpi/bin/mpicxx +- elif test -x "$with_mpi/mpicxx" ; then +- MPICXX=$with_mpi/mpicxx +- fi +- fi +- if test "X$MPIF77" = "X" ; then +- if test -x "$with_mpi/bin/mpif77" ; then +- MPIF77=$with_mpi/bin/mpif77 +- elif test -x "$with_mpi/mpif77" ; then +- MPIF77=$with_mpi/mpif77 +- fi +- fi +- if test "X$MPIF90" = "X" ; then +- if test -x "$with_mpi/bin/mpif90" ; then +- MPIF90=$with_mpi/bin/mpif90 +- elif test -x "$with_mpi/mpif90" ; then +- MPIF90=$with_mpi/mpif90 +- fi +- fi +- if test "X$MPIEXEC" = "X" ; then +- if test -x "$with_mpi/bin/mpiexec" ; then +- MPIEXEC=$with_mpi/bin/mpiexec +- elif test -x "$with_mpi/mpiexec" ; then +- MPIEXEC=$with_mpi/mpiexec +- fi +- fi +- CC=$MPICC +- F77=$MPIF77 +- if test "X$MPICXX" != "X" ; then CXX=$MPICXX ; fi +- if test "X$MPIF90" != "X" ; then F90=$MPIF90 ; fi +- ;; +- +- *) +- # Use the default choices for the compilers +- ;; +-esac +-]) +- +-AC_DEFUN([PAC_MPI_FIND_COMPILERS],[ +-# Tell autoconf to determine properties of the compilers (these are the +-# compilers for MPI programs) +-PAC_PROG_CC +-if test "$enable_f77" != no -a "$enable_fortran" != no ; then +- AC_PROG_F77 +-fi +-if test "$enable_cxx" != no ; then +- AC_PROG_CXX +-fi +-if test "$enable_f90" != no ; then +- PAC_PROG_FC +-fi +-]) +- +-dnl +-dnl This uses the selected CC etc to check for include paths and libraries +-AC_DEFUN([PAC_MPI_CHECK_MPI_LIB],[ +-AC_REQUIRE([AC_PROG_CC]) +-case $ac_mpi_type in +- mpich) +- ;; +- +- mpichnt) +- dnl +- dnl This isn't adequate, but it helps with using MPICH-NT/SDK.gcc +- PAC_PUSH_FLAG([CFLAGS]) +- CFLAGS="$CFLAGS -I$with_mpichnt/include" +- PAC_PUSH_FLAG([CPPFLAGS]) +- CPPFLAGS="$CPPFLAGS -I$with_mpichnt/include" +- PAC_PUSH_FLAG([LDFLAGS]) +- LDFLAGS="$LDFLAGS -L$with_mpichnt/lib" +- AC_CHECK_LIB(mpich,MPI_Init,found="yes",found="no") +- if test "$found" = "no" ; then +- AC_CHECK_LIB(mpich,MPI_Init,found="yes",found="no") +- fi +- if test "$enable_cxx" != no ; then +- AC_PROG_CXX +- fi +- if test "$enable_f90" != no ; then +- PAC_PROG_FC +- fi +- # Set defaults for the TEST versions if not already set +- if test -z "$TESTCC" ; then TESTCC=${CC:=cc} ; fi +- if test -z "$TESTF77" ; then TESTF77=${F77:=f77} ; fi +- if test -z "$TESTCXX" ; then TESTCXX=${CXX:=CC} ; fi +- if test -z "$TESTFC" ; then TESTFC=${FC:=f90} ; fi +- if test "$found" = "no" ; then +- PAC_POP_FLAG([CFLAGS]) +- PAC_POP_FLAG([CPPFLAGS]) +- PAC_POP_FLAG([LDFLAGS]) +- fi +- ;; +- +- lammpi) +- ;; +- +- ibmmpi) +- ;; +- +- sgimpi) +- AC_CHECK_LIB(mpi,MPI_Init) +- if test "$ac_cv_lib_mpi_MPI_Init" = "yes" ; then +- MPILIBNAME="mpi" +- fi +- ;; +- +- generic) +- AC_SEARCH_LIBS(MPI_Init,mpi mpich mpich) +- if test "$ac_cv_lib_mpi_MPI_Init" = "yes" ; then +- MPILIBNAME="mpi" +- fi +- ;; +- +- *) +- ;; +-esac +-]) +- +-dnl +-dnl/*D +-dnl PAC_MPI_F2C - Determine if MPI has the MPI-2 functions MPI_xxx_f2c and +-dnl MPI_xxx_c2f +-dnl +-dnl Output Effect: +-dnl Define 'HAVE_MPI_F2C' if the routines are found. +-dnl +-dnl Notes: +-dnl Looks only for 'MPI_Request_c2f'. +-dnl D*/ +-AC_DEFUN([PAC_MPI_F2C],[ +-AC_CACHE_CHECK([for MPI F2C and C2F routines], +-pac_cv_mpi_f2c, +-[ +-AC_TRY_LINK([#include "mpi.h"], +-[MPI_Request request;MPI_Fint a;a = MPI_Request_c2f(request);], +-pac_cv_mpi_f2c="yes",pac_cv_mpi_f2c="no") +-]) +-if test "$pac_cv_mpi_f2c" = "yes" ; then +- AC_DEFINE(HAVE_MPI_F2C,1,[Define if MPI has F2C]) +-fi +-]) +-dnl + dnl/*D + dnl PAC_HAVE_ROMIO - make mpi.h include mpio.h if romio enabled + dnl +new file mode 100644 +--- /dev/null ++++ b/confdb/aclocal_threads.m4 +@@ -0,0 +1,12 @@ ++dnl PAC_ARG_THREAD_PACKAGE ++dnl - Provide configure option to select a thread package. Defaults to posix. ++AC_DEFUN([PAC_ARG_THREAD_PACKAGE], [ ++ AC_ARG_WITH([thread-package], ++ [ --with-thread-package=package Thread package to use. Supported thread packages include: ++ posix or pthreads - POSIX threads (default, if required) ++ solaris - Solaris threads (Solaris OS only) ++ abt or argobots - Argobots threads ++ win - windows threads ++ uti - POSIX threads plus Utility Thread Offloading library ++ none - no threads ++ ],,with_thread_package=posix)]) +new file mode 100644 +--- /dev/null ++++ b/confdb/ax_execinfo.m4 +@@ -0,0 +1,67 @@ ++# =========================================================================== ++# https://www.gnu.org/software/autoconf-archive/ax_execinfo.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_EXECINFO([ACTION-IF-EXECINFO-H-IS-FOUND], [ACTION-IF-EXECINFO-H-IS-NOT-FOUND], [ADDITIONAL-TYPES-LIST]) ++# ++# DESCRIPTION ++# ++# Checks for execinfo.h header and if the len parameter/return type can be ++# found from a list, also define backtrace_size_t to that type. ++# ++# By default the list of types to try contains int and size_t, but should ++# some yet undiscovered system use e.g. unsigned, the 3rd argument can be ++# used for extensions. I'd like to hear of further suggestions. ++# ++# Executes ACTION-IF-EXECINFO-H-IS-FOUND when present and the execinfo.h ++# header is found or ACTION-IF-EXECINFO-H-IS-NOT-FOUND in case the header ++# seems unavailable. ++# ++# Also adds -lexecinfo to LIBS on BSD if needed. ++# ++# LICENSE ++# ++# Copyright (c) 2014 Thomas Jahns ++# ++# Copying and distribution of this file, with or without modification, are ++# permitted in any medium without royalty provided the copyright notice ++# and this notice are preserved. This file is offered as-is, without any ++# warranty. ++ ++#serial 2 ++ ++AC_DEFUN([AX_EXECINFO], ++ [AC_CHECK_HEADERS([execinfo.h]) ++ AS_IF([test x"$ac_cv_header_execinfo_h" = xyes], ++ [AC_CACHE_CHECK([size parameter type for backtrace()], ++ [ax_cv_proto_backtrace_type], ++ [AC_LANG_PUSH([C]) ++ for ax_cv_proto_backtrace_type in size_t int m4_ifnblank([$3],[$3 ])none; do ++ AS_IF([test "${ax_cv_proto_backtrace_type}" = none], ++ [ax_cv_proto_backtrace_type= ; break]) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ++#include ++extern ++${ax_cv_proto_backtrace_type} backtrace(void **addrlist, ${ax_cv_proto_backtrace_type} len); ++char **backtrace_symbols(void *const *buffer, ${ax_cv_proto_backtrace_type} size); ++])], ++ [break]) ++ done ++ AC_LANG_POP([C])])]) ++ AS_IF([test x${ax_cv_proto_backtrace_type} != x], ++ [AC_DEFINE_UNQUOTED([backtrace_size_t], [$ax_cv_proto_backtrace_type], ++ [Defined to return type of backtrace().])]) ++ AC_SEARCH_LIBS([backtrace],[execinfo]) ++ AS_IF([test x"${ax_cv_proto_backtrace_type}" != x -a x"$ac_cv_header_execinfo_h" = xyes -a x"$ac_cv_search_backtrace" != xno], ++ [AC_DEFINE([HAVE_BACKTRACE],[1], ++ [Defined if backtrace() could be fully identified.]) ++ ]m4_ifnblank([$1],[$1 ++]),m4_ifnblank([$2],[$2 ++]))]) ++dnl ++dnl Local Variables: ++dnl mode: autoconf ++dnl End: ++dnl +--- a/confdb/ax_tls.m4 ++++ b/confdb/ax_tls.m4 +@@ -1,21 +1,22 @@ + # =========================================================================== +-# http://www.nongnu.org/autoconf-archive/ax_tls.html ++# https://www.gnu.org/software/autoconf-archive/ax_tls.html + # =========================================================================== + # + # SYNOPSIS + # +-# AX_TLS ++# AX_TLS([action-if-found], [action-if-not-found]) + # + # DESCRIPTION + # + # Provides a test for the compiler support of thread local storage (TLS) +-# extensions. Defines TLS if it is found. Currently only knows about GCC +-# and MSVC. I think SunPro uses the same as GCC, and Borland apparently +-# supports either. ++# extensions. Defines TLS if it is found. Currently knows about C++11, ++# GCC/ICC, and MSVC. I think SunPro uses the same as GCC, and Borland ++# apparently supports either. + # + # LICENSE + # + # Copyright (c) 2008 Alan Woodland ++# Copyright (c) 2010 Diego Elio Petteno` + # + # This program is free software: you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the +@@ -28,7 +29,7 @@ + # Public License for more details. + # + # You should have received a copy of the GNU General Public License along +-# with this program. If not, see . ++# with this program. If not, see . + # + # As a special exception, the respective Autoconf Macro's copyright owner + # gives unlimited permission to copy, distribute and modify the configure +@@ -43,49 +44,31 @@ + # modified version of the Autoconf Macro, you may extend this special + # exception to the GPL to apply to your modified version as well. + +-AC_DEFUN([AX_TLS], [ +- AC_MSG_CHECKING(for thread local storage specifier) +- AC_CACHE_VAL(ac_cv_tls, [ +- ax_tls_keywords="_Thread_local __thread __declspec(thread) none" +- for ax_tls_keyword in $ax_tls_keywords; do +- case $ax_tls_keyword in +- none) ac_cv_tls=none ; break ;; +- *) +- # MPICH modification: This was an AC_TRY_COMPILE before, but +- # Darwin with non-standard compilers will accept __thread at +- # compile time but fail to link due to an undefined +- # "__emutls_get_address" symbol unless -lgcc_eh is added to the +- # link line. +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([$ax_tls_keyword int bar = 5;],[++bar;])], +- [ac_cv_tls=$ax_tls_keyword], +- [ac_cv_tls=none]) +- +- # MPICH modification: Also test with the extern keyword. +- # The intel compiler on Darwin (at least as of 15.0.1) +- # seems to break with the above error when the extern +- # keyword is specified in shared library builds. +- PAC_PUSH_FLAG([LIBS]) +- PAC_APPEND_FLAG([-shared],[LIBS]) +- if test "$ac_cv_tls" != "none" ; then +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM( +- [ +- extern $ax_tls_keyword int bar; +- $ax_tls_keyword int bar = 0; +- ],[++bar;])], +- [ac_cv_tls=$ax_tls_keyword], +- [ac_cv_tls=none]) +- fi +- PAC_POP_FLAG([LIBS]) ++#serial 14 + +- if test "$ac_cv_tls" != "none" ; then break ; fi +- esac ++AC_DEFUN([AX_TLS], [ ++ AC_MSG_CHECKING([for thread local storage (TLS) class]) ++ AC_CACHE_VAL([ac_cv_tls], ++ [for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do ++ AS_CASE([$ax_tls_keyword], ++ [none], [ac_cv_tls=none ; break], ++ [AC_TRY_COMPILE( ++ [#include ++ static void ++ foo(void) { ++ static ] $ax_tls_keyword [ int bar; ++ exit(1); ++ }], ++ [], ++ [ac_cv_tls=$ax_tls_keyword ; break], ++ ac_cv_tls=none ++ )]) + done +-]) ++ ]) ++ AC_MSG_RESULT([$ac_cv_tls]) + +- if test "$ac_cv_tls" != "none"; then +- AC_DEFINE_UNQUOTED([TLS_SPECIFIER], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here]) +- fi +- AC_MSG_RESULT($ac_cv_tls) ++ AS_IF([test "$ac_cv_tls" != "none"], ++ [AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class define it to that here]) ++ m4_ifnblank([$1],[$1])], ++ [m4_ifnblank([$2],[$2])]) + ]) +--- a/confdb/config.rpath ++++ b/confdb/config.rpath +@@ -151,6 +151,8 @@ hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no ++enable_dtags_flag= ++disable_dtags_flag= + + case "$host_os" in + cygwin* | mingw* | pw32* | cegcc*) +@@ -223,10 +225,12 @@ if test "$with_gnu_ld" = yes; then + # use --enable-new-dtags for RUNPATH support, which is required for + # switching between ABI compatible libraries at runtime. + if test "$GCC" = yes; then +- hardcode_libdir_flag_spec="${hardcode_libdir_flag_spec} ${wl}--enable-new-dtags" ++ enable_dtags_flag="${wl}--enable-new-dtags" ++ disable_dtags_flag="${wl}--disable-new-dtags" + else + case $cc_basename in ifort*) +- hardcode_libdir_flag_spec="${hardcode_libdir_flag_spec} ${wl}--enable-new-dtags" ++ enable_dtags_flag="${wl}--enable-new-dtags" ++ disable_dtags_flag="${wl}--disable-new-dtags" + ;; + esac + fi +@@ -692,6 +696,10 @@ library_names_spec="$escaped_library_names_spec" + # This must work even if \$libdir does not exist. + hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" + ++# Flag to add dtags to allow using runpath instead of rpath ++enable_dtags_flag="$enable_dtags_flag" ++disable_dtags_flag="$disable_dtags_flag" ++ + # Whether we need a single -rpath flag with a separated argument. + hardcode_libdir_separator="$hardcode_libdir_separator" + +--- a/configure.ac ++++ b/configure.ac +@@ -1,15 +1,15 @@ + AC_PREREQ(2.63) +-# ++# + # (C) 2006 by Argonne National Laboratory. + # See COPYRIGHT in top-level directory. + # + dnl Process this file with autoconf to produce a configure script. + dnl +-dnl aclocal_cache.m4, included by sowing/confdb/aclocal.m4, fixes ++dnl aclocal_cache.m4, included by sowing/confdb/aclocal.m4, fixes + dnl bugs in autoconf caching. + dnl + dnl This is a large configure script and it is important to keep it +-dnl clearly organized. In addition, this script must coordinate with ++dnl clearly organized. In addition, this script must coordinate with + dnl the other modules that can be used to construct MPICH, such as + dnl the communication device and the process manager. Each of these + dnl may have special features or limitations that other modules or +@@ -17,24 +17,24 @@ dnl this configure may need to take into account. To handle this, there + dnl are xx major steps in this configure script: + dnl + dnl 1. Identify major modules and source any prerequisite scripts +-dnl 2. Determine compiler characteristics ++dnl 2. Determine compiler characteristics + dnl 3. Setup and configure the other modules + dnl 4. Determine MPI features and characteristics (such as datatype values) + dnl + dnl Each of these is described in more detail below. + dnl +-dnl 1. Identify the modules (most are specified by ++dnl 1. Identify the modules (most are specified by + dnl --with-=instance, + dnl for example, --with-pm=hydra or --with-device=ch3:nemesis). + dnl For each module, source the file mpichprereq if present (in the + dnl module's top-level directory). This + dnl must be a bourne (sh) shell script; it can access any of the variables + dnl in the configure script. In addition, there are a few variables that +-dnl are defined and provided to allow the modules to communicate their ++dnl are defined and provided to allow the modules to communicate their + dnl needs or limitations to the other modules. These are: + dnl MPID_MAX_THREAD_LEVEL - thread level supported by device. + dnl if unset, is MPI_THREAD_FUNNELED +-dnl MPID_NO_LONG_LONG - if yes, the device does not support the ++dnl MPID_NO_LONG_LONG - if yes, the device does not support the + dnl long long integer type + dnl MPID_NO_LONG_DOUBLE - if yes, the device does not support the + dnl long double type +@@ -43,12 +43,12 @@ dnl that the process manager supports. + dnl This name server will be used if the + dnl default name server is selected. + dnl MPID_NO_PM - If yes, the device does not require any +-dnl PM implementation. ++dnl PM implementation. + dnl MPID_MAX_PROCESSOR_NAME - The maximum number of character in a processor + dnl name. If not set, 128 will be used. + dnl MPID_MAX_ERROR_STRING - The maximum number of character in an error + dnl string. If not set, 1024 will be used. +-dnl PM_REQUIRES_PMI - if set, provides the name of the PMI ++dnl PM_REQUIRES_PMI - if set, provides the name of the PMI + dnl interface implementation. If not set, + dnl the "simple" PMI implementation is used. + dnl A process manager that needs a particular +@@ -56,17 +56,17 @@ dnl process manager should check that this is + dnl not set to an incompatible value. + dnl MPID_NO_SPAWN - if yes, the device does not support the + dnl dynamic process routines (spawn, connect +-dnl attach, join, plus port and publish ++dnl attach, join, plus port and publish + dnl routines). The major effect of this + dnl is to let the test codes know that + dnl spawn is not implemented. + dnl MPID_NO_RMA - if yes, the device does not support the +-dnl MPI RMA routines (MPI_Win_create and ++dnl MPI RMA routines (MPI_Win_create and + dnl MPI_Put etc.). The major effect of this +-dnl is to let the test codes know that ++dnl is to let the test codes know that + dnl RMA is not implemented. + dnl +-dnl Note that the meanings of these variables are defined so that an ++dnl Note that the meanings of these variables are defined so that an + dnl undefined value gives the default. This makes it easy to expand + dnl the set of such variables, since only modules that need the new + dnl variable will need to be changed. +@@ -80,11 +80,11 @@ dnl Before each module configure is executed, the script setup_ + dnl is run if present. This is a bourne (sh) shell script and may + dnl access configure variables. It should not make any changes to the + dnl compiler name or flags (e.g., do not add -D_XOPEN_SOURCE to CFLAGS here, +-dnl because that may invalidate the determination of the compiler ++dnl because that may invalidate the determination of the compiler + dnl characteristics in the prior step). + dnl + dnl 4. Determine MPI features +-dnl ++dnl + dnl + dnl Special environment variables + dnl To let other scripts and in particular the configure in test/mpi +@@ -95,7 +95,7 @@ dnl MPICH_ENABLE_F77 + dnl MPICH_ENABLE_FC + dnl MPICH_ENABLE_CXX + dnl +-dnl Note that no executable statements are allowed (and any are silently ++dnl Note that no executable statements are allowed (and any are silently + dnl dropped) before AC_INIT. + + m4_include([maint/version.m4]) +@@ -106,12 +106,12 @@ AC_INIT([MPICH], + [mpich], + [http://www.mpich.org/]) + +-if test "x$prefix" != "xNONE" && test -d "$prefix"; then ++if test "x$prefix" != "xNONE" && test -d "$prefix"; then + if test "x`(cd \"$prefix\"; echo \"$PWD\")`" = "x`(cd \"$srcdir\"; echo \"$PWD\")`" ||\ + test "x`(cd \"$prefix\"; echo \"$PWD\")`" = "x$PWD" ; then + AC_MSG_ERROR([The install directory (--prefix=) cannot be the same as the build or src directory.]) + fi +-fi ++fi + + CONFIGURE_ARGS_CLEAN=`echo $* | tr '"' ' '` + AC_SUBST(CONFIGURE_ARGS_CLEAN) +@@ -191,7 +191,7 @@ CONFIGURE_ARGUMENTS="$ac_configure_args" + AC_SUBST(CONFIGURE_ARGUMENTS) + if test -n "$ac_configure_args" ; then + echo "Configuring MPICH version $MPICH_VERSION with $ac_configure_args" +-else ++else + echo "Configuring MPICH version $MPICH_VERSION" + fi + +@@ -319,15 +319,15 @@ m4_include([subsys_include.m4]) + + dnl ---------------------------------------------------------------------------- + dnl setup top-level argument handling +-AC_ARG_ENABLE(echo, ++AC_ARG_ENABLE(echo, + AC_HELP_STRING([--enable-echo], [Turn on strong echoing. The default is enable=no.]), + set -x) + + AC_ARG_ENABLE(error-checking, + [ --enable-error-checking=level +- Control the amount of error checking. ++ Control the amount of error checking. + no - no error checking +- runtime - error checking controllable at runtime through environment ++ runtime - error checking controllable at runtime through environment + variables + all - error checking always enabled (default) + ],,enable_error_checking=all) +@@ -389,7 +389,7 @@ AC_ARG_ENABLE([mpit-pvars], + all - All variables above + ],[],[enable_mpit_pvars=none]) + +-dnl We may want to force MPI_Aint to be the same size as MPI_Offset, ++dnl We may want to force MPI_Aint to be the same size as MPI_Offset, + dnl particularly on 32 bit systems with large (64 bit) file systems. + AC_ARG_WITH(aint-size, + AC_HELP_STRING([--with-aint-size], [Override the size of MPI_AINT (in bytes)]),, +@@ -473,7 +473,7 @@ AC_ARG_WITH(pmi, + AC_HELP_STRING([--with-pmi=name], [Specify the pmi interface for MPICH]),, + with_pmi=default) + +-AC_ARG_WITH(pm, ++AC_ARG_WITH(pm, + AC_HELP_STRING([--with-pm=name], + [Specify the process manager for MPICH. "no" or "none" are + valid values. Multiple process managers may be specified as +@@ -489,7 +489,7 @@ AC_ARG_WITH(logging, + [if test -z "$withval" ; then with_logging=rlog ; fi],with_logging=none) + + AC_ARG_ENABLE(threads, +-[ --enable-threads=level - Control the level of thread support in the ++[ --enable-threads=level - Control the level of thread support in the + MPICH implementation. The following levels + are supported. + single - No threads (MPI_THREAD_SINGLE) +@@ -507,7 +507,7 @@ AC_ARG_ENABLE(thread-cs, + [Choose the method used for critical sections + and other atomic updates when multiple + threads are present. Values may be global +- (default), per-object, per-vni, lock-free]),,enable_thread_cs=global) ++ (default), per-object, per-vci, lock-free]),,enable_thread_cs=global) + + AC_ARG_ENABLE(mdta, + AC_HELP_STRING([--enable-mdta], +@@ -522,7 +522,7 @@ AC_ARG_ENABLE(refcount, + Values may be lock-free or none. The + default depends on the thread-cs choice; for + global it is none (because none is required), +- for per-object, per-vni, and lock-free, lock-free]),, ++ for per-object, per-vci, and lock-free, lock-free]),, + enable_refcount=default) + + AC_ARG_ENABLE(mutex-timing, +@@ -559,17 +559,20 @@ AC_ARG_ENABLE(multi-aliases, + [Multiple aliasing to support multiple fortran compilers (default)]),, + enable_multi_aliases=yes) + +-AC_ARG_ENABLE([wrapper-rpath], +- [AC_HELP_STRING([--enable-wrapper-rpath], +- [Determine whether the rpath is set when programs +- are linked by mpicc compiler wrappers. This only +- applies when shared libraries are built. The +- default is yes; use --disable-wrapper-rpath to +- turn this feature off. In that case, shared +- libraries will be found according to the rules +- for your system (e.g., in LD_LIBRARY_PATH)])], +- [],[enable_wrapper_rpath=yes]) +-AC_SUBST([enable_wrapper_rpath]) ++AC_ARG_WITH([wrapper-dl-type], ++ [AC_HELP_STRING([--enable-wrapper-dl-type], ++ [Dynamic loading model for alternate MPI ++ libraries, used when programs are linked ++ by mpicc compiler wrappers. This only ++ applies when shared libraries are built. ++ The default is "runpath"; use ++ --with-wrapper-dl-type=rpath to force ++ rpath; use --with-wrapper-dl-type=none to ++ find shared libraries according to the ++ rules for your system (e.g., in ++ LD_LIBRARY_PATH)])], ++ [],[with_wrapper_dl_type=runpath]) ++AC_SUBST([with_wrapper_dl_type]) + + AC_ARG_ENABLE([long-double], + [AC_HELP_STRING([--disable-long-double], +@@ -588,7 +591,7 @@ AC_ARG_WITH(cross, + with_cross=$MPID_DEFAULT_CROSS_FILE) + + AC_ARG_WITH(namepublisher, +-[ --with-namepublisher=name Choose the system that will support ++[ --with-namepublisher=name Choose the system that will support + MPI_PUBLISH_NAME and MPI_LOOKUP_NAME. Options + include + pmi (default) +@@ -609,7 +612,7 @@ AC_CANONICAL_TARGET + # Find a C compiler. + # We also need to do this before the F77 and FC test to ensure that we + # find the C preprocessor reliably. +-PAC_PROG_CC ++AC_PROG_CC + AM_PROG_CC_C_O dnl needed for automake "silent-rules" + PAC_PUSH_FLAG([CFLAGS]) + AC_PROG_CPP +@@ -643,10 +646,11 @@ LT_INIT() + # Non-verbose make by default + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +-# Disable rpath in the compiler wrappers if shared libraries are disabled, since +-# rpath makes no sense in the context of static libraries. ++# Disable rpath/runpath-related linkflags in the compiler wrappers if ++# shared libraries are disabled, since rpath/runpath makes no sense in ++# the context of static libraries. + if test "X$enable_shared" = "Xno" ; then +- enable_wrapper_rpath=no ++ with_wrapper_dl_type=no + fi + + INTERLIB_DEPS=yes +@@ -751,17 +755,17 @@ PAC_VPATH_CHECK(src/include/mpi.h src/env/mpicc,lib) + # This test is complicated by the fact that top_srcdir is not set until + # the very end of configure. Instead, we get it ourselves + if test -z "$top_srcdir" ; then +- use_top_srcdir=$srcdir ++ use_top_srcdir=$srcdir + else + use_top_srcdir=$top_srcdir + fi +-if test -z "$master_top_srcdir" ; then ++if test -z "$master_top_srcdir" ; then + # This needs to be an absolute pathname + case "$use_top_srcdir" in + /*) ;; + *) + use_top_srcdir=`(cd $use_top_srcdir && pwd)` +- ;; ++ ;; + esac + master_top_srcdir=$use_top_srcdir + fi +@@ -799,8 +803,6 @@ dnl To be clear, without these exports any variable values determined by this + dnl configure script will not be seen by child scripts. Instead they will dnl + dnl receive the only the original inherited environment and configure args used + dnl when this configure script was invoked. +-export AR +-export AR_FLAGS + export CC + export CFLAGS + export CPPFLAGS +@@ -814,7 +816,6 @@ export LDFLAGS + export LIBS + export MPILIBNAME + export PMPILIBNAME +-export RANLIB + export OPALIBNAME + export MPLLIBNAME + # ---------------------------------------------------------------------------- +@@ -826,7 +827,7 @@ fi + # Extract the device name from any options + # Allow the device to specify a directory; if no directory, use the + # included directories +-# ++# + DEVICE=$with_device + AC_SUBST(DEVICE) + +@@ -838,7 +839,7 @@ changequote([,]) + devicedir=$use_top_srcdir/src/mpid/$device_name + devicereldir=src/mpid/$device_name + case "$device_name" in +- /*) ++ /*) + devicedir=$DEVICE + # Get the name from the leaf + device_name=`echo $device_name ~ sed -e 's%.*/%%'` +@@ -846,7 +847,7 @@ case "$device_name" in + # this allows use to build within our tree, even when other data + # is outside of the tree) + ;; +- *) ++ *) + ;; + esac + export device_name +@@ -869,11 +870,11 @@ AC_ARG_VAR([MPICXXLIBNAME],[can be used to override the name of the MPI C++ libr + AC_ARG_VAR([MPIFCLIBNAME],[can be used to override the name of the MPI fortran library (default: "${MPILIBNAME}fort")]) + MPILIBNAME=${MPILIBNAME:-"mpi"} + PMPILIBNAME_set=no +-if test -n "$PMPILIBNAME" ; then ++if test -n "$PMPILIBNAME" ; then + PMPILIBNAME_set=yes + fi + PMPILIBNAME=${PMPILIBNAME:-"p$MPILIBNAME"} +-# Note that the name for this library may be updated after we check for ++# Note that the name for this library may be updated after we check for + # enable_shmem + # Fortran names are set later. + # We use a different library for the C++ wrappers to avoid problems when +@@ -885,7 +886,7 @@ export MPIFCLIBNAME + AC_SUBST(MPICXXLIBNAME) + AC_SUBST(MPIFCLIBNAME) + +-# We'll set FORTRAN_BINDING to 1 if we support Fortran ++# We'll set FORTRAN_BINDING to 1 if we support Fortran + FORTRAN_BINDING=0 + + # enable-fast +@@ -945,7 +946,7 @@ if test "$enable_error_checking" = "yes" ; then + fi + # mpir_ext.h needs the variable HAVE_ERROR_CHECKING to have the value 0 or 1 + HAVE_ERROR_CHECKING=0 +-case "$enable_error_checking" in ++case "$enable_error_checking" in + no) + # if error checking has been disabled, then automatically disable the error + # checking tests in the test suite +@@ -966,7 +967,7 @@ esac + AC_SUBST([HAVE_ERROR_CHECKING]) + + # error-messages +-case "$enable_error_messages" in ++case "$enable_error_messages" in + no|none) + error_message_kind="MPICH_ERROR_MSG__NONE" + ;; +@@ -991,185 +992,13 @@ if test "$enable_tag_error_bits" = "yes" ; then + fi + + # ---------------------------------------------------------------------------- +-# +-# enable-timing and with-logging +-# +-# Still to do: add subsets: e.g., class=pt2pt,class=coll. See mpich doc +-# +-# Logging and timing are intertwined. If you select logging, you +-# may also need to select a timing level. If no timing is selected +-# but logging with rlog is selected, make "all" the default timing level. +-# +-# FIXME: make timing and logging options work more cleanly together, +-# particularly when other logging options are selected (e.g., logging is not +-# rlog). +-# ---------------------------------------------------------------------------- +-AM_CONDITIONAL([BUILD_LOGGING_RLOG],[test "X$with_logging" = "Xrlog"]) +-collect_stats=false +-logging_required=false +-if test "$enable_timing" = "default" ; then +- if test "$with_logging" = "rlog" ; then +- enable_timing=all +- fi +-fi +-timing_name=$enable_timing +-case "$enable_timing" in +- no) +- timing_name=none +- ;; +- time) +- collect_stats=true +- ;; +- log|log_detailed) +- logging_required=true +- ;; +- yes) +- timing_name=all +- collect_stats=true +- logging_required=true +- ;; +- all|runtime) +- collect_stats=true +- logging_required=true +- ;; +- none|default) +- timing_name=none +- ;; +- *) +- AC_MSG_WARN([Unknown value $enable_timing for enable-timing]) +- enable_timing=no +- timing_name=none +- ;; +-esac +-# +-# The default logging package is rlog; you can get it by +-# specifying --with-logging or --with-logging=rlog +-# +-case $with_logging in +- yes) +- logging_name=rlog +- ;; +- no|none) +- logging_name=none +- ;; +- default) +- if test "$logging_required" = "true" ; then +- logging_name=rlog +- else +- logging_name=none +- fi +- ;; +- *) +- logging_name=$with_logging +- ;; +-esac +-# +-# Include the selected logging subsystem +-# +-# Choices: +-# 1) A subdir of src/util/logging +-# This directory must contain a configure which will be executed +-# to build the +-# 2) An external directory +-# This directory must contain +-# a mpilogging.h file +-# It may contain +-# a setup_logging script +-# a configure +-# +-# +-logging_subsystems= +-if test "$logging_name" != "none" ; then +- # Check for an external name (directory containing a /) +- hasSlash=`echo A$logging_name | sed -e 's%[[^/]]%%g'` +- if test -n "$hasSlash" ; then +- # Check that the external logging system is complete. +- # Any failure will cause configure to abort +- if test ! -d $logging_name ; then +- AC_MSG_ERROR([External logging directory $logging_name not found. Configure aborted]) +- logging_name=none +- elif test ! -s $logging_name/mpilogging.h ; then +- AC_MSG_ERROR([External logging header $logging_name/mpilogging.h not found. Configure aborted]) +- logging_name=none +- fi +- +- logdir=$logging_name +- # Force the logdir to be absolute +- logdir=`cd $logdir && pwd` +- # Switch name to "external" because that is how the MPICH +- # code will know it +- logging_name=external +- # Add the dir to the include paths +- #CPPFLAGS="$CPPFLAGS -I$logdir" +- CPPFLAGS="$CPPFLAGS -I$logdir" +- # Add to the list of external modules to setup +- if test -x $logdir/setup_logging ; then +- EXTERNAL_SETUPS="$EXTERNAL_SETUPS $logdir/setup_logging" +- fi +- else +- logdir=$srcdir/src/util/logging +- logreldir=src/util/logging/$logging_name +- logging_subsystems="$logging_subsystems $logreldir" +- for dir in $logging_name ; do +- if test ! -d $logdir/$dir ; then +- AC_MSG_ERROR([$logdir/$dir does not exist. Configure aborted]) +- logging_name=none +- fi +- done +- for dir in $logging_subsystems ; do +- if test ! -x $srcdir/$dir/configure ; then +- AC_MSG_ERROR([$srcdir/$dir has no configure (required). Configure aborted]) +- logging_name=none +- fi +- done +- fi +-fi +-# +-# FIXME: Logging doesn't necessarily require timing (e.g., simply logging the +-# sequence of routines). +-if test "$logging_name" != "none" ; then +- if test "$enable_timing" != "no" ; then +- if test "$enable_timing" = "default" -o "$enable_timing" = "none" ; then +- enable_timing=log +- timing_name=log +- fi +- subsystems="$subsystems $logging_subsystems" +- else +- AC_MSG_WARN([Timing was disabled. Logging has been disabled as well.]) +- with_logging=no +- logging_name=none +- fi +-else +- if test "$logging_required" = "true" ; then +- AC_MSG_WARN([Timing was enabled with log option but no logging library is available. Timing has been disabled.]) +- enable_timing=no +- timing_name=none +- fi +-fi +-if test "$timing_name" != "none" ; then +- timing_kind=`echo $timing_name | \ +- tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +- timing_kind=MPICH_TIMING_KIND__$timing_kind +- AC_DEFINE_UNQUOTED(HAVE_TIMING,$timing_kind,[define to enable timing collection]) +- if test "$collect_stats" = "true" ; then +- AC_DEFINE(COLLECT_STATS,1,[define to enable collection of statistics]) +- fi +-fi +- +-use_logging_variable="MPICH_LOGGING__`echo $logging_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`" +-AC_DEFINE_UNQUOTED(USE_LOGGING,$use_logging_variable,[define to choose logging library]) +-# ---------------------------------------------------------------------------- +-# End of logging tests +-# ---------------------------------------------------------------------------- +- +-# ---------------------------------------------------------------------------- +-# Check to see if the device does not support spawn. ++# Check to see if the device does not support spawn. + # FIXME: This should provide the option of not building the dynamic + # process routines. It could also allow us to specialize support + # for all processes are members of MPI_COMM_WORLD (only one comm_world). + # ---------------------------------------------------------------------------- + if test "$MPID_NO_SPAWN" = yes ; then +- AC_MSG_WARN([The device $with_device does not support MPI dynamic process routines]) ++ AC_MSG_WARN([The device $with_device does not support MPI dynamic process routines]) + fi + + # MPL +@@ -1344,6 +1173,7 @@ fi + if test "$izem_atomic" = "yes" ; then + AC_DEFINE(ENABLE_IZEM_ATOMIC,1,[Define to enable using Izem CPU atomics]) + fi ++AM_CONDITIONAL([ENABLE_IZEM_ATOMIC], [test x$izem_atomic = xyes]) + + AC_ARG_VAR([ZMLIBNAME],[can be used to override the name of the Izem library (default: "zm")]) + ZMLIBNAME=${ZMLIBNAME:-"zm"} +@@ -1468,7 +1298,9 @@ AC_SUBST([hwloclibdir]) + hwloclib="" + AC_SUBST([hwloclib]) + +-if test "$with_hwloc_prefix" = "embedded" ; then ++if test "$with_hwloc_prefix" = "no" ; then ++ have_hwloc=no ++elif test "$with_hwloc_prefix" = "embedded" ; then + # Disable visibility when setting up hwloc + PAC_PUSH_FLAG([enable_visibility]) + enable_visibility=no; +@@ -1479,6 +1311,7 @@ if test "$with_hwloc_prefix" = "embedded" ; then + hwlocsrcdir="src/hwloc" + hwloclib="$HWLOC_EMBEDDED_LDADD" + PAC_PREPEND_FLAG([$HWLOC_EMBEDDED_LIBS], [WRAPPER_LIBS]) ++ PAC_APPEND_FLAG([$HWLOC_EMBEDDED_LDFLAGS], [WRAPPER_LDFLAGS]) + # if possible, do not expose hwloc symbols in libmpi.so + PAC_PREPEND_FLAG([$VISIBILITY_CFLAGS], [HWLOC_CFLAGS]) + fi +@@ -1516,8 +1349,6 @@ if test "$have_hwloc" = "yes" ; then + fi + + HWLOC_DO_AM_CONDITIONALS +-AM_CONDITIONAL([have_hwloc], [test "${have_hwloc}" = "yes"]) +-AM_CONDITIONAL([use_embedded_hwloc], [test "${use_embedded_hwloc}" = "yes"]) + + # ---------------------------------------------------------------------------- + # NETLOC +@@ -1584,7 +1415,7 @@ if test "$enable_threads" = default ; then + fi + + MPICH_THREAD_LEVEL=MPI_THREAD_FUNNELED +-case "$enable_threads" in ++case "$enable_threads" in + single) + thread_pkg_required=no + MPICH_THREAD_LEVEL=MPI_THREAD_SINGLE +@@ -1602,7 +1433,7 @@ case "$enable_threads" in + MPICH_THREAD_LEVEL=MPI_THREAD_MULTIPLE + ;; + *) +- AC_MSG_ERROR(["$enable_threads" is not a valid value for --enable-threads]) ++ AC_MSG_ERROR(["$enable_threads" is not a valid value for --enable-threads]) + ;; + esac + # Check that the requested thread level is available. +@@ -1610,7 +1441,7 @@ threadLevelOK=yes + if test ! -z "$MPID_MAX_THREAD_LEVEL" ; then + # Check that MPID_MAX_THREAD_LEVEL is at least as large as the + # selected MPICH_THREAD_LEVEL +- case $MPICH_THREAD_LEVEL in ++ case $MPICH_THREAD_LEVEL in + MPI_THREAD_MULTIPLE) + if test "$MPID_MAX_THREAD_LEVEL" != "MPI_THREAD_MULTIPLE" ; then + threadLevelOK=no +@@ -1653,7 +1484,7 @@ fi + thread_granularity=MPICH_THREAD_GRANULARITY__SINGLE + thread_refcount=MPICH_REFCOUNT__NONE + if test "$enable_threads" = "multiple" ; then +- case $enable_thread_cs in ++ case $enable_thread_cs in + global) + thread_granularity=MPICH_THREAD_GRANULARITY__GLOBAL + if test "$enable_refcount" = "default" ; then enable_refcount=none ; fi +@@ -1662,8 +1493,8 @@ if test "$enable_threads" = "multiple" ; then + thread_granularity=MPICH_THREAD_GRANULARITY__POBJ + if test "$enable_refcount" = "default" ; then enable_refcount=lock-free ; fi + ;; +- per-vni|per_vni) +- thread_granularity=MPICH_THREAD_GRANULARITY__VNI ++ per-vci|per_vci) ++ thread_granularity=MPICH_THREAD_GRANULARITY__VCI + if test "$enable_refcount" = "default" ; then enable_refcount=lock-free ; fi + ;; + lock-free|lock_free|lockfree) +@@ -1691,8 +1522,12 @@ if test "$enable_threads" = "multiple" ; then + fi + AC_DEFINE_UNQUOTED([MPICH_THREAD_GRANULARITY],$thread_granularity,[Method used to implement atomic updates and access]) + +-if test "$thread_granularity" = "MPICH_THREAD_GRANULARITY__VNI" -a "$device_name" != "ch4" ; then +- AC_MSG_ERROR([per-vni critical section granularity is only supported for the ch4 device]) ++if test "$thread_granularity" = "MPICH_THREAD_GRANULARITY__POBJ" -a "$device_name" == "ch4" ; then ++ AC_MSG_ERROR([the ch4 device does not support the per-object critical section]) ++fi ++ ++if test "$thread_granularity" = "MPICH_THREAD_GRANULARITY__VCI" -a "$device_name" != "ch4" ; then ++ AC_MSG_ERROR([per-vci critical section granularity is only supported for the ch4 device]) + fi + + if test "$enable_mdta" = "yes" ; then +@@ -1712,7 +1547,7 @@ AC_DEFINE_UNQUOTED([MPICH_THREAD_REFCOUNT],$thread_refcount,[Method used to impl + save_IFS="$IFS" + IFS="," + for option in $enable_g ; do +- case "$option" in ++ case "$option" in + debug|dbg) + enable_append_g=yes + ;; +@@ -1795,7 +1630,7 @@ if test -n "$perform_memtracing" ; then + fi + fi + +-if test -n "$perform_dbgmutex" ; then ++if test -n "$perform_dbgmutex" ; then + AC_DEFINE(MPICH_DEBUG_MUTEX,1,[Define to enable mutex debugging]) + fi + +@@ -1819,7 +1654,7 @@ if test "$with_cross" != "no" ; then + (set) 2>&1 | grep CROSS_ | \ + sed -e 's/^/export /g' -e 's/=.*//g' > confcross + . confcross +- rm -f confcross ++ rm -f confcross + fi + fi + +@@ -1868,13 +1703,12 @@ elif test ! -x $devicedir/configure ; then + AC_MSG_WARN([Device $device_name has no configure]) + fi + device_name="" +-else ++else + # Add the device to the configure list + devsubsystems="$devsubsystems $devicereldir" + # Make device_name available to subdirs + fi + +-PAC_SET_HEADER_LIB_PATH(pmix) + if test -n "${with_pmix}" -a "${with_pmix}" != "no" ; then + # disable built-in PMI and process managers + with_pmi="no" +@@ -1924,22 +1758,22 @@ else + fi + # + hasError=no +-# We need to be careful about PM's that have either conflicting ++# We need to be careful about PM's that have either conflicting + # requirements (e.g., different PMI implementations) or different + # optional features (e.g., MPID_PM_NAMESERVER). + # In addition, we need to interleave the setup of the PMI and PM + # modules. The order is as follows: + # +-# For each PM, execute the mpichprereq script for that pm (if present). ++# For each PM, execute the mpichprereq script for that pm (if present). + # This script provides information about the PM, including which PMI + # implementations are supported. +-# ++# + # Then, for the selected PMI, the setup script (if any) is run. This is + # necessary because the setup of the PM may require information discovered + # or provided duing the PMI setup step. + # + # Finally, for each PM, the setup script is executed. +-# ++# + # Step 1: invoke the mpichprereq for each PM + for pm_name in $pm_names ; do + if test -z "$first_pm_name" ; then +@@ -1960,7 +1794,7 @@ for pm_name in $pm_names ; do + hasError=yes + else + nameserver=$MPID_PM_NAMESERVER +- if test -f $use_top_srcdir/src/pm/$pm_name/mpichprereq ; then ++ if test -f $use_top_srcdir/src/pm/$pm_name/mpichprereq ; then + echo sourcing $use_top_srcdir/src/pm/$pm_name/mpichprereq + . $use_top_srcdir/src/pm/$pm_name/mpichprereq + fi +@@ -1999,7 +1833,7 @@ if test "$with_pmi" != "no" ; then + fi + fi + pmi_name=$with_pmi +- ++ + if test ! -d $use_top_srcdir/src/pmi/$pmi_name ; then + AC_MSG_WARN([$use_top_srcdir/src/pmi/$pmi_name does not exist. PMI is unknown]) + elif test ! -x $use_top_srcdir/src/pmi/$pmi_name/configure ; then +@@ -2024,19 +1858,18 @@ for this_pm_name in $pm_names ; do + if test -f $use_top_srcdir/src/pm/$this_pm_name/configure ; then + subsystems="$subsystems src/pm/$this_pm_name" + fi +- if test -f $use_top_srcdir/src/pm/$this_pm_name/setup_pm ; then ++ if test -f $use_top_srcdir/src/pm/$this_pm_name/setup_pm ; then + echo sourcing $use_top_srcdir/src/pm/$this_pm_name/setup_pm + . $use_top_srcdir/src/pm/$this_pm_name/setup_pm + fi + done + +-# Check for whether the compiler defines a symbol that contains the +-# function name. The MPICH code, for greater portability, defines +-# its own symbols, FCNAME (a string) and FUNCNAME (a token that is not a +-# string). Code should use these symbols where possible. However, +-# some debugging macros may want to use a compiler-provided symbol +-# for the function name, and this check makes it possible to +-# define such macros in a way that is always correct. ++# Check for whether the compiler defines a symbol that contains the ++# function name. The MPICH code uses this for debugging purposes. ++ ++# NOTE: C99, C11 defines __func__. If not supported, it will only ++# break debugging, not the main code. ++ + PAC_CC_FUNCTION_NAME_SYMBOL + + # Check if $MPI_DEFAULT_COPTS is valid with $CC +@@ -2051,18 +1884,33 @@ if test -n "$MPI_DEFAULT_COPTS" ; then + fi + + # --------------------------------------------------------------------------- +-# determine rpath and other shared library flags for CC ++# determine shared library flags for CC + # src/env may not exist yet in a vpath build + $MKDIR_P src/env + cc_shlib_conf=src/env/cc_shlib.conf + PAC_COMPILER_SHLIB_FLAGS([CC],[$cc_shlib_conf]) + AC_SUBST_FILE([cc_shlib_conf]) + +-# output rpath flags in a usable format for mpich.pc (pkg-config) +-if test "X$enable_wrapper_rpath" = "Xyes"; then +- eval WRAPPER_RPATH_LDFLAGS=\"$hardcode_libdir_flag_spec\" ++# We need variables from $cc_shlib_conf to set `WRAPPER_C_DYNAMIC_LOADING_FLAGS`, which ++# is used in `src/packaging/pkgconfig/mpich.pc.in` ++# However, libtool's $library_names_spec is more than what's given in $cc_shlib_conf, so ++# we need protect it. ++# FIXME: potentially, there are more variable collisions. Need better plan. ++PAC_PUSH_FLAG([library_names_spec]) ++. $cc_shlib_conf ++PAC_POP_FLAG([library_names_spec]) ++ ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval WRAPPER_C_DYNAMIC_LOADING_FLAGS=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval WRAPPER_C_DYNAMIC_LOADING_FLAGS=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ WRAPPER_C_DYNAMIC_LOADING_FLAGS="" + fi +-AC_SUBST(WRAPPER_RPATH_LDFLAGS) ++AC_SUBST(WRAPPER_C_DYNAMIC_LOADING_FLAGS) + + # --------------------------------------------------------------------------- + # Support for MPI_T performance variables +@@ -2126,11 +1974,11 @@ AC_DEFINE_UNQUOTED(ENABLE_PVAR_DIMS,$status_dims_pvars, + # + # First, we handle the case of no explicit enable/disable option. In that + # case, we look for a usable compiler. We cannot use the ac macros for this +-# because they abort the configure step if they fail to find a compiler ++# because they abort the configure step if they fail to find a compiler + # (earlier versions of autoconf did not have this behavior!). + # + # Second, we perform the langugage-specific tests, if necessary. This may +-# be relatively simple (C++) or complex (Fortran 77, including formation of ++# be relatively simple (C++) or complex (Fortran 77, including formation of + # the encoded MPI handles). + # + # Note that the bindings support needs to know some of the properties of +@@ -2206,14 +2054,14 @@ if test "$enable_f77" = yes ; then + AC_MSG_WARN([The compiler $F77 uses mixed case names. Fortran is monocase + and many Fortran programs may use either upper or lower case names for MPI + calls. Consider specifying a particular parameter to your Fortran compiler +-to select either upper or lower case names. For the Absoft compiler, +--f selects lower case and -N109 selects upper case (if you use -f, also use ++to select either upper or lower case names. For the Absoft compiler, ++-f selects lower case and -N109 selects upper case (if you use -f, also use + -B108 to enable the iargc and getarg routines, which are needed for some + tests and by many user programs). Specify new command + line options by setting the environment variable FFLAGS to include + the options (e.g., setenv FFLAGS "-f -B108"). In addition, make sure that your +-Fortran 90 compiler uses a compatible naming choice. For the +-Absoft Fortran 90, -YALL_NAMES=LCS selects lower case names and -B108 ++Fortran 90 compiler uses a compatible naming choice. For the ++Absoft Fortran 90, -YALL_NAMES=LCS selects lower case names and -B108 + adds underscores to names, as required for iargc and getarg. Pass this + information to configure with the FCFLAGS environment variable.]) + # If Fortran implicitly enabled, disable it now. Otherwise, +@@ -2223,10 +2071,10 @@ information to configure with the FCFLAGS environment variable.]) + fi + + # The MPI standard requires that MPI_Init in any language initialize +- # MPI in all languages. This can be a problem when objects produced ++ # MPI in all languages. This can be a problem when objects produced + # by the Fortran compiler require symbols from the Fortran runtime +- # (making linking C-only programs unnecessarily difficult). What we test +- # here is whether the much more restricted needs of the Fortran ++ # (making linking C-only programs unnecessarily difficult). What we test ++ # here is whether the much more restricted needs of the Fortran + # initialize can be met with no special use of the Fortran runtime + PAC_F77_INIT_WORKS_WITH_C + if test "$pac_f_init_works_with_c" = "yes" ; then +@@ -2307,9 +2155,9 @@ if test "$enable_fc" = "yes" -a "$enable_f77" = yes ; then + # that does not contain an underscore. The Fortran binding uses + # this rule for enabling multiple weak symbols: + # if defined(USE_WEAK_SYMBOLS) && !defined(USE_ONLY_MPI_NAMES) && +- # defined(HAVE_MULTIPLE_PRAGMA_WEAK) && ++ # defined(HAVE_MULTIPLE_PRAGMA_WEAK) && + # defined(F77_NAME_LOWER_2USCORE) +- # ++ # + testRoutine="t1_2" + if test "$pac_cv_prog_c_multiple_weak_symbols" = "yes" -a \ + "$enable_weak_symbols" = "yes" -a \ +@@ -2357,7 +2205,7 @@ fi + # Now test for Fortran compiler characteristics + # ---------------------------------------------------------------------------- + if test "$enable_f77" = "yes" ; then +- # determine rpath and other shared library flags for F77 ++ # determine shared library flags for F77 + f77_shlib_conf=src/env/f77_shlib.conf + PAC_COMPILER_SHLIB_FLAGS([F77],[$f77_shlib_conf]) + AC_SUBST_FILE([f77_shlib_conf]) +@@ -2372,7 +2220,7 @@ if test "$enable_f77" = "yes" ; then + # If the PMPI routines are not in the same library with the MPI + # routines, we may need to remove the pmpi declarations + PAC_PROG_F77_ALLOWS_UNUSED_EXTERNALS([MPIFPMPI=",PMPI_WTIME,PMPI_WTICK"],[ +- MPIFPMPI=""; ++ MPIFPMPI=""; + AC_MSG_WARN([Removed PMPI_WTIME and PMPI_WTICK from mpif.h])]) + else + MPIFPMPI=",PMPI_WTIME,PMPI_WTICK" +@@ -2398,11 +2246,11 @@ if test "$enable_f77" = "yes" ; then + # of different types (e.g., for MPI_Send) + PAC_PROG_F77_MISMATCHED_ARGS(addarg,yes) + if test "X$addarg" != "X" ; then +- # We could add the names of all of the MPI routines that +- # accept different types. Instead, we fail cleanly. +- # Some Fortran compilers allow you to turn off checking for ++ # We could add the names of all of the MPI routines that ++ # accept different types. Instead, we fail cleanly. ++ # Some Fortran compilers allow you to turn off checking for + # mismatched arguments for *all* routines. Adding an argument +- # that turns off checking for *everything* is not something that ++ # that turns off checking for *everything* is not something that + # configure should do - if the user wants this, they can follow + # the instructions in the following error message. + AC_MSG_ERROR([The Fortran compiler $F77 does not accept programs that call the same routine with arguments of different types without the option $addarg. Rerun configure with FFLAGS=$addarg]) +@@ -2415,10 +2263,10 @@ if test "$enable_f77" = "yes" ; then + + fi + +-dnl By modifying mpif.h to use ! for comments, it can work with many f90 +-dnl compilers without creating a separate version. ++dnl By modifying mpif.h to use ! for comments, it can work with many f90 ++dnl compilers without creating a separate version. + dnl Note that this is run AFTER the AC_OUTPUT actions +-AC_OUTPUT_COMMANDS([if test "$enable_f77" = yes ; then ++AC_OUTPUT_COMMANDS([if test "$enable_f77" = yes ; then + if test "$has_exclaim" = "yes" ; then + sed -e 's/^C/\!/g' src/binding/fortran/mpif_h/mpif.h > src/include/mpif.h + cp src/include/mpif.h src/binding/fortran/mpif_h/mpif.h +@@ -2444,7 +2292,7 @@ if test "$enable_fc" = "yes" ; then + if test "$enable_f77" != "yes" ; then + AC_MSG_WARN([Fortran 90 requires Fortran 77]) + enable_fc=no +- else ++ else + bindingsubsystems="$bindingsubsystems src/binding/fortran/use_mpi" + bindings="$bindings f90" + fi +@@ -2465,7 +2313,7 @@ fi + AC_DEFINE_UNQUOTED(HAVE_F08_BINDING, $status_f08_works, [Define to 1 to enable Fortran 2008 binding]) + + # Set defaults for these values so that the Makefile in src/bindings/f90 +-# is valid even if fc is not enabled (this is necessary for the ++# is valid even if fc is not enabled (this is necessary for the + # distclean target) + MPIMODNAME=mpi + MPICONSTMODNAME=mpi_constants +@@ -2486,7 +2334,7 @@ MPI_C_INTERFACE_TYPES_NAME=mpi_c_interface_types + MPI_C_INTERFACE_CDESC_NAME=mpi_c_interface_cdesc + + if test "$enable_fc" = "yes" ; then +- # determine rpath and other shared library flags for FC ++ # determine shared library flags for FC + fc_shlib_conf=src/env/fc_shlib.conf + PAC_COMPILER_SHLIB_FLAGS([FC],[$fc_shlib_conf]) + AC_SUBST_FILE([fc_shlib_conf]) +@@ -2500,7 +2348,7 @@ if test "$enable_fc" = "yes" ; then + dnl PAC_PROG_FC + PAC_PROG_FC_WORKS + FCFLAGS=$saveFCFLAGS +- if test "$pac_cv_prog_fc_works" = no ; then ++ if test "$pac_cv_prog_fc_works" = no ; then + # Reject this compiler + if test "$FC" != "no" ; then + fc_rejected=yes +@@ -2640,7 +2488,7 @@ fi + + if test "$enable_cxx" = "yes" ; then + # Another bug in autoconf. The checks for the C++ compiler do not +- # ensure that you can link a program that is built with the C++ ++ # ensure that you can link a program that is built with the C++ + # compiler. We've seen this error with gcc and icc, particularly + # when those compilers accept C++ language elements but are unable + # to link programs that are really C++. For that reason, +@@ -2650,7 +2498,7 @@ if test "$enable_cxx" = "yes" ; then + pac_cv_cxx_builds_exe,[ + AC_LANG_PUSH([C++]) + AC_TRY_LINK([ +-class mytest { ++class mytest { + int a; + public: + mytest(void) : a(1) {} +@@ -2663,13 +2511,13 @@ public: + AC_MSG_ERROR([Aborting because C++ compiler does not work. If you do not need a C++ compiler, configure with --disable-cxx]) + fi + # Recent failures have come when a standard header is loaded +- # The Intel icpc 10.x compiler fails with if gcc 4.2 is installed. ++ # The Intel icpc 10.x compiler fails with if gcc 4.2 is installed. + AC_CACHE_CHECK([whether C++ compiler works with string],pac_cv_cxx_compiles_string,[ + AC_LANG_PUSH([C++]) + AC_TRY_COMPILE([#include ],[return 0;],pac_cv_cxx_compiles_string=yes,pac_cv_cxx_compiles_string=no) + AC_LANG_POP([C++]) + ]) +- if test "$pac_cv_cxx_compiles_string" != yes ; then ++ if test "$pac_cv_cxx_compiles_string" != yes ; then + AC_MSG_WARN([The C++ compiler $CXX cannot compile a program containing the header - this may indicate a problem with the C++ installation. Consider configuing with --disable-cxx]) + fi + +@@ -2691,7 +2539,7 @@ public: + #include + ],[using namespace std;],pac_cv_cxx_has_iostream=yes,pac_cv_cxx_has_iostream=no)]) + AX_CXX_NAMESPACE_STD +- ++ + AC_CACHE_CHECK([whether available],pac_cv_cxx_has_math,[ + AC_TRY_COMPILE([ + #include +@@ -2703,13 +2551,13 @@ public: + # In a cross-compiling environment, these can be set with environment + # variables, either directly or through the standard "CROSS" variable. + if test -z "$GNUCXX_VERSION" ; then +- if test -n "$CROSS_GNUCXX_VERSION" ; then ++ if test -n "$CROSS_GNUCXX_VERSION" ; then + GNUCXX_VERSION=$CROSS_GNUCXX_VERSION + else + GNUCXX_VERSION=0 + fi + fi +- if test -z "$GNUCXX_MINORVERSION" ; then ++ if test -z "$GNUCXX_MINORVERSION" ; then + if test -n "$CROSS_GNUCXX_MINORVERSION" ; then + GNUCXX_MINORVERSION=$CROSS_GNUCXX_MINORVERSION + else +@@ -2742,8 +2590,8 @@ int main() { + GNUCXX_MINORVERSION=$m + else + AC_MSG_RESULT([unknown]) +- fi +- fi ++ fi ++ fi + AC_SUBST(GNUCXX_VERSION) + AC_SUBST(GNUCXX_MINORVERSION) + +@@ -2752,14 +2600,14 @@ int main() { + INCLUDE_MPICXX_H='#include "mpicxx.h"' + AC_SUBST(INCLUDE_MPICXX_H) + +- # In order to support the Fortran datatypes within C++, +- # ++ # In order to support the Fortran datatypes within C++, ++ # + # FORTRAN_BINDING always has a CPP-time value of either 0 or 1, +- # so that it may be used in #if statements without adding to ++ # so that it may be used in #if statements without adding to + # the CPP name space + AC_SUBST(FORTRAN_BINDING) + +- # Special C++ datatypes. Set to DATATYPE NULL first; we'll ++ # Special C++ datatypes. Set to DATATYPE NULL first; we'll + # replace the ones that we have later, after we have determined + # the C datatypes + MPIR_CXX_BOOL=0x0c000000 +@@ -2771,7 +2619,7 @@ int main() { + AC_SUBST(MPIR_CXX_DOUBLE_COMPLEX) + AC_SUBST(MPIR_CXX_LONG_DOUBLE_COMPLEX) + +- # determine rpath and other shared library flags for CXX ++ # determine shared library flags for CXX + cxx_shlib_conf=src/env/cxx_shlib.conf + PAC_COMPILER_SHLIB_FLAGS([CXX],[$cxx_shlib_conf]) + AC_SUBST_FILE([cxx_shlib_conf]) +@@ -2799,7 +2647,7 @@ AC_SUBST(bindings) + AC_LANG_C + # + # ---------------------------------------------------------------------------- +-# Done with the basic argument processing and decisions about which ++# Done with the basic argument processing and decisions about which + # subsystems to build + # ---------------------------------------------------------------------------- + +@@ -2810,32 +2658,12 @@ AC_LANG_C + # We need the full path to perl since we'll use it as the interpreter for + # a shell script. + AC_PATH_PROG(PERL,perl) +-# Look for ar. If we fail, abort +-AC_CHECK_PROGS(AR,ar) +-if test -z "$AR" ; then +- AC_MSG_ERROR([The program ar is required for building MPICH. Make sure that your path includes ar]) +-fi +- +-# FIXME: this is probably unnecessary now that we only do one "ar" at the end +-# (via libtool). If anything, it's likely to cause problems instead. +-# AR_FLAGS provides a way to potentially improve build performance on Mac OSX +-AR_FLAGS=cr +-# this logic is lame, should really write a real test at some point +-AS_CASE([$host], +- # Barry proposes AR_FLAGS="Scq" in trac#754, but that won't work correctly for re-builds +- [*-*-darwin*], [AR_FLAGS=Scr] +-) +-AC_ARG_VAR(AR_FLAGS,[AR command flags]) # causes AC_SUBST too +- +-# Note that we set RANLIB to true if we don't find it (some systems neither +-# need it nor provide it) +-AC_CHECK_PROGS(RANLIB,ranlib,true) + + # Check for the killall program; this can be used in some of the tests + # in test/commands + AC_CHECK_PROGS(KILLALL,killall,true) + +-# Does xargs need the -r option to handle the case where the input ++# Does xargs need the -r option to handle the case where the input + # is empty (gnu utils do, Mac OSX does not accept -r) + xargs_out=`echo "" | xargs ls | wc -l | sed -e 's/ //g'` + if test "$xargs_out" != "0" ; then +@@ -2846,9 +2674,6 @@ AC_SUBST(XARGS_NODATA_OPT) + AC_PROG_INSTALL + PAC_PROG_CHECK_INSTALL_WORKS + # +-# On Mac OS/X, install breaks libraries unless used with the -p switch +-dnl FIXME not necessary now that we are using libtool +-dnl PAC_PROG_INSTALL_BREAKS_LIBS + # We also need mkdir -p. + PAC_PROG_MKDIR_P + PAC_PROG_MAKE +@@ -2857,9 +2682,9 @@ PAC_PROG_MAKE + # Check for bash to allow more robust shell scripts + AC_PATH_PROG(BASH_SHELL,bash) + # +-# Confirm that bash has working arrays. We can use this to +-# build more robust versions of the scripts (particularly the +-# compliation scripts) by taking advantage of the array features in ++# Confirm that bash has working arrays. We can use this to ++# build more robust versions of the scripts (particularly the ++# compliation scripts) by taking advantage of the array features in + # bash. + bashWorks=no + if test -x "$BASH_SHELL" ; then +@@ -2901,25 +2726,25 @@ export SHLIB_EXT + AC_SUBST(SHLIB_EXT) + + # ---------------------------------------------------------------------------- +-# ++# + # Add the steps for debugger support + BUILD_TVDLL=no + if test "$enable_debuginfo" = "yes" ; then + # We can build the Totalview interface DLL only if we know how to build + # shared libraries. +- ++ + # FIXME is this really the right test? + # No. Before MPICH 1.5, there was the capability to build the debugger + # libraries without forcing the build of shared libraries for everything. + # There may be some way to restore this capability, but until then, we +- # at least cause the configure to cleanly fail with a clear error message ++ # at least cause the configure to cleanly fail with a clear error message + if test "X$enable_shared" = "Xyes" ; then + BUILD_TVDLL=yes + else + AC_MSG_ERROR([Building with --enable-debuginfo now requires building with shared library support. Add --enable-shared and reconfigure]) + fi + +- # One more nasty problem. Totalview relies on debugger symbols ++ # One more nasty problem. Totalview relies on debugger symbols + # being present in the executable. Some experimental versions of + # gcc (3.2 20020329 for ia64) do *not* include the object symbols + # when debugging. For HPUX, the necessary linking options are +@@ -2930,7 +2755,7 @@ if test "$enable_debuginfo" = "yes" ; then + AC_MSG_WARN([Some versions of gcc do not include debugging information + within the executable. Totalview requires this information to detect + an MPICH code. If you have trouble, try linking with the additional +-option ++option + +noobjdebug + on all link lines (consider adding it to LDFLAGS)]) + fi +@@ -2938,12 +2763,12 @@ on all link lines (consider adding it to LDFLAGS)]) + # The debugger library name cannot be set until we know the extension + # of shared libraries - the name is so on most Unix system, dylib on OS X. + AC_DEFINE(HAVE_DEBUGGER_SUPPORT,1,[Define if debugger support is included]) +- # The debugger support requires a shared library. This is handled ++ # The debugger support requires a shared library. This is handled + # below, after we check for compiler support for shared libraries + # Note: if libdir contains exec_prefix, handle the fact that the + # default exec_prefix is NONE, which (much later in configure) + # gets turned into the value of prefix +- ##ENVVAR: MPICH_DEBUGLIBNAME - Set this environment variable to ++ ##ENVVAR: MPICH_DEBUGLIBNAME - Set this environment variable to + ## override the default name of the debugger support library. + ## The default name is libtvmpich.$SHLIB_EXT (e.g., libtvmpich.so for + ## most Unix versions, libtvmpich.dylib for Mac OSX). +@@ -2989,16 +2814,16 @@ if test "$with_namepublisher" = "default" ; then + fi + + if test "$with_namepublisher" != no -a "$with_namepublisher" != "none" ; then +- case "$with_namepublisher" in ++ case "$with_namepublisher" in + none|no) ;; + # Removed ldap namepublisher hook - we no longer support or distribute + # the ldap-based name server + file*) + # Note that we always build the Makefile for the file version because +- # this name publisher is really too simple to require a ++ # this name publisher is really too simple to require a + # separate configure, and we might as well include a basic + # name publisher with any MPICH distribution +- # We DO need to extract the directory name that is used for writing ++ # We DO need to extract the directory name that is used for writing + # the files, with the User's home directory as the default + nameserv_name="file" + basedir=`echo $with_namepublisher | sed -e 's/file://'` +@@ -3025,7 +2850,7 @@ if test "$with_namepublisher" != no -a "$with_namepublisher" != "none" ; then + AC_MSG_WARN([Unknown name publisher $with_namepublisher]) + fi + ;; +- esac ++ esac + fi + if test -n "$nameserv_name" ; then + AC_DEFINE(HAVE_NAMEPUB_SERVICE,1,[Define if a name publishing service is available]) +@@ -3034,7 +2859,7 @@ export nameserv_name + AM_CONDITIONAL([BUILD_NAMEPUB_FILE],[test "X$nameserv_name" = "Xfile"]) + AM_CONDITIONAL([BUILD_NAMEPUB_PMI],[test "X$nameserv_name" = "Xpmi"]) + +-# In case the documentation targets are used, find doctext and attempt to ++# In case the documentation targets are used, find doctext and attempt to + # find the source for the doctext LaTeX style files. Use "false" if + # doctext is not found + AC_PATH_PROG(DOCTEXT,doctext,false) +@@ -3050,19 +2875,20 @@ AC_C_INLINE + + PAC_C_GNU_ATTRIBUTE + PAC_C_BUILTIN_EXPECT ++PAC_C_STATIC_ASSERT + + # We need to check for the endianess in order to implement the + # "external32" representations. This defines "WORDS_BIGENDIAN when + # the system is bigendian. + # As of autoconf 2.62, this macro takes an additional argument for systems +-# that can produce object files for either endianess. +-# With the as-always-incompatible-with-every-version autoconf, the ++# that can produce object files for either endianess. ++# With the as-always-incompatible-with-every-version autoconf, the + # arguments for this macro *changed* in 2.62 to + # (if-bigendian,if-littleendian,unknown,universal) + # The fourth argument is new. + # Also note that the definition emitted by autoheader requires that gcc +-# be used to compile the programs - other compilers may not define the +-# non-standard __BIG_ENDIAN__ or __LITTLE_ENDIAN__ CPP names on which ++# be used to compile the programs - other compilers may not define the ++# non-standard __BIG_ENDIAN__ or __LITTLE_ENDIAN__ CPP names on which + # autoconf 2.62 now depends. + byteOrdering=unknown + AC_C_BIGENDIAN(byteOrdering=big,byteOrdering=little,,byteOrdering=universal) +@@ -3086,9 +2912,9 @@ esac + if test "$enable_f77" ; then + PAC_PROG_C_UNALIGNED_DOUBLES(, + [AC_MSG_WARN(Your C compiler $CC does not support unaligned accesses +-to doubles. This is required for interoperation with ++to doubles. This is required for interoperation with + Fortran (the Fortran standard requires it). +-You may need to specify an additional argument to your C compiler to ++You may need to specify an additional argument to your C compiler to + force it to allow unaligned accesses.)]) + fi + # Check for __func__ (defined in C99) or __FUNCTION__ (defined in older GCC) +@@ -3127,6 +2953,16 @@ if test "$MPID_NO_LONG_LONG" != "yes" ; then + AC_DEFINE(HAVE_LONG_LONG_INT,1,[Define if long long is supported]) + fi + fi ++# Add HAVE_FLOAT16 detection ++if test "$MPID_NO_FLOAT16" != "yes" ; then ++ AC_CACHE_CHECK([whether _Float16 is supported], ++ pac_cv_have_float16,[ ++ AC_TRY_COMPILE(,[_Float16 a;], ++ pac_cv_have_float16=yes,pac_cv_have_float16=no)]) ++ if test "$pac_cv_have_float16" = "yes" ; then ++ AC_DEFINE(HAVE_FLOAT16,1,[Define if _Float16 is supported]) ++ fi ++fi + # ---------------------------------------------------------------------------- + # Get default structure alignment for integers + dnl PAC_C_MAX_INTEGER_ALIGN places the default alignment into +@@ -3184,21 +3020,21 @@ if test "$pac_cv_have_long_double" = yes ; then + AC_MSG_WARN([Structures containing long doubles may be aligned differently from structures with floats or longs. MPICH does not handle this case automatically and you should avoid assumed extents for structures containing float types.]) + + double_align=-1 +- case $pac_cv_c_max_double_fp_align in ++ case $pac_cv_c_max_double_fp_align in + packed) double_align=1 ;; + two) double_align=2 ;; + four) double_align=4 ;; + eight) double_align=8 ;; + esac + longdouble_align=-1 +- case $pac_cv_c_max_longdouble_fp_align in ++ case $pac_cv_c_max_longdouble_fp_align in + packed) longdouble_align=1 ;; + two) longdouble_align=2 ;; + four) longdouble_align=4 ;; + eight) longdouble_align=8 ;; + sixteen)longdouble_align=16 ;; + esac +- ++ + AC_DEFINE_UNQUOTED(HAVE_MAX_DOUBLE_FP_ALIGNMENT,$double_align,[Controls byte alignment of structs with doubles]) + AC_DEFINE_UNQUOTED(HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT,$longdouble_align,[Controls byte alignment of structs with long doubles]) + fi +@@ -3315,7 +3151,7 @@ if test "$ac_cv_c_int64_t" != no ; then + fi + + # The following make these definitions: +-# define _UINT_T 1 ++# define _UINT_T 1 + # if uint_t is available. E.g., define _UINT8_T as 1 if uint8_t is available + # if not available, define uint_t as the related C type, e.g., + # define uint8_t unsigned char +@@ -3364,6 +3200,7 @@ AS_IF([test "X$pac_cv_have_long_double" = "Xyes"],[ + #endif + ]) + ]) ++AC_CHECK_SIZEOF([_Float16]) + + # we need really could just use the result of AC_CHECK_SIZEOF, but having a + # HAVE_typename macro is useful for consistency +@@ -3376,9 +3213,10 @@ AS_IF([test "X$pac_cv_have_long_double" = "Xyes"],[ + # Generate a hex version of the size of each type + for type in short int long long_long float double long_double wchar_t \ + float_int double_int long_int short_int two_int long_double_int \ +- _Bool float__Complex double__Complex long_double__Complex ; do ++ _Bool float__Complex double__Complex long_double__Complex \ ++ _Float16; do + eval len=\$ac_cv_sizeof_$type +- if test -z "$len" ; then ++ if test -z "$len" ; then + len=0 + # Check for sizes from the CHECK_SIZEOF_DERIVED macro + eval pclen=\$ac_cv_sizeof_$type +@@ -3396,7 +3234,7 @@ for type in short int long long_long float double long_double wchar_t \ + AC_MSG_ERROR([Configure was unable to determine the size of $type ; if cross compiling, + use the environment variables CROSS_SIZEOF_typename, e.g., CROSS_SIZEOF_SHORT, + or use the --with-cross=file configure option to specify a file containing +-Bourne (sh) shell assignments to CROSS_SIZEOF_typename for all datatype ++Bourne (sh) shell assignments to CROSS_SIZEOF_typename for all datatype + types. The program maint/getcross.c can be compiled and run on the target + system; this program outputs an appropriate file for the --with-cross option]) + fi +@@ -3407,13 +3245,13 @@ system; this program outputs an appropriate file for the --with-cross option]) + # in the built-in datatype handle for the length; see + # src/mpid/common/datatype/mpidu_datatype.h) + if test "$len" -gt 255 ; then +- AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type $type is $len bytes)]) ++ AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type $type is $len bytes)]) + fi + tmplen=$len + hexlen="" + while test $tmplen -gt 0 ; do + lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)` +- case $lowdigit in ++ case $lowdigit in + 10) char=a ;; + 11) char=b ;; + 12) char=c ;; +@@ -3445,7 +3283,7 @@ MPI_LONG="0x4c00${len_long}07" + MPI_UNSIGNED_LONG="0x4c00${len_long}08" + if test "$len_long_long" != 0 -a "$MPID_NO_LONG_LONG" != yes ; then + MPI_LONG_LONG="0x4c00${len_long_long}09" +-else ++else + MPI_LONG_LONG=MPI_DATATYPE_NULL; + fi + MPI_FLOAT="0x4c00${len_float}0a" +@@ -3600,12 +3438,12 @@ fi + # + # Search for the integer types + for type in char short int long long_long ; do +- # ctype is a valid C type which we can use to declare a C version of ++ # ctype is a valid C type which we can use to declare a C version of + # this item + ctype=`echo $type | sed 's/_/ /'` + eval len=\$ac_cv_sizeof_$type +- if test -n "$len" ; then +- case $len in ++ if test -n "$len" ; then ++ case $len in + 1) if test "$MPI_INTEGER1" = "MPI_DATATYPE_NULL" ; then + MPI_INTEGER1="0x4c00012d" + MPIR_INTEGER1_CTYPE="$ctype" +@@ -3683,6 +3521,7 @@ MPI_C_BOOL=MPI_DATATYPE_NULL + MPI_C_FLOAT_COMPLEX=MPI_DATATYPE_NULL + MPI_C_DOUBLE_COMPLEX=MPI_DATATYPE_NULL + MPI_C_LONG_DOUBLE_COMPLEX=MPI_DATATYPE_NULL ++MPIX_C_FLOAT16=MPI_DATATYPE_NULL + if test ${len__Bool} != 0 ; then + MPI_C_BOOL=0x4c00${len__Bool}3f + fi +@@ -3695,6 +3534,9 @@ fi + if test ${len_long_double__Complex} != 0 ; then + MPI_C_LONG_DOUBLE_COMPLEX=0x4c00${len_long_double__Complex}42 + fi ++if test ${len__Float16} != 0 ; then ++ MPIX_C_FLOAT16=0x4c000246 ++fi + + AC_SUBST(MPI_INT8_T) + AC_SUBST(MPI_INT16_T) +@@ -3708,6 +3550,7 @@ AC_SUBST(MPI_C_BOOL) + AC_SUBST(MPI_C_FLOAT_COMPLEX) + AC_SUBST(MPI_C_DOUBLE_COMPLEX) + AC_SUBST(MPI_C_LONG_DOUBLE_COMPLEX) ++AC_SUBST(MPIX_C_FLOAT16) + export MPI_INT8_T + export MPI_INT16_T + export MPI_INT32_T +@@ -3720,6 +3563,7 @@ export MPI_C_BOOL + export MPI_C_FLOAT_COMPLEX + export MPI_C_DOUBLE_COMPLEX + export MPI_C_LONG_DOUBLE_COMPLEX ++export MPIX_C_FLOAT16 + + + # ---------------------------------------------------------------------------- +@@ -3737,10 +3581,10 @@ export MPI_C_LONG_DOUBLE_COMPLEX + # In addition, we need to look at a few additional constants that depend + # on how the compiler sizes some datatypes. These are: + # STATUS_SIZE, INTEGER_KIND, ADDRESS_KIND, and OFFSET_KIND +-# ++# + # ---------------------------------------------------------------------------- + if test "$enable_f77" = yes ; then +- # Up to size checking code in master configure.ac (where it tries to ++ # Up to size checking code in master configure.ac (where it tries to + # find the matching C sizes) as part of defining mpi_integer8 etc. + # The results are available in pac_cv_sizeof_f77_ + # Size is 0 if unknown or unavailable (or cross-compiling) +@@ -3756,7 +3600,7 @@ if test "$enable_f77" = yes ; then + PAC_PROG_F77_CHECK_SIZEOF_EXT(real,$CROSS_F77_SIZEOF_REAL) + PAC_PROG_F77_CHECK_SIZEOF_EXT(double precision,$CROSS_F77_SIZEOF_DOUBLE_PRECISION) + AC_LANG_FORTRAN77 +- # If we have sizes for real and double, we do not need to call ++ # If we have sizes for real and double, we do not need to call + # mpir_get_fsize at run time. + # For the size-defined types (e.g., integer*2), we assume that if the + # compiler allows it, it has the stated size. +@@ -3808,15 +3652,15 @@ if test "$enable_f77" = yes ; then + # Take len and turn it into two hex digits (there are 8 bits available + # in the built-in datatype handle for the length; see + # src/mpid/common/datatype/mpidu_datatype.h). This code is taken +- # from the code in mpich/configure.ac ++ # from the code in mpich/configure.ac + if test "$len" -gt 255 ; then +- AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type INTEGER is $len bytes)]) ++ AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type INTEGER is $len bytes)]) + fi + tmplen=$len + hexlen="" + while test $tmplen -gt 0 ; do + lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)` +- case $lowdigit in ++ case $lowdigit in + 10) char=a ;; + 11) char=b ;; + 12) char=c ;; +@@ -3855,15 +3699,15 @@ if test "$enable_f77" = yes ; then + # Take len and turn it into two hex digits (there are 8 bits available + # in the built-in datatype handle for the length; see + # src/mpid/common/datatype/mpidu_datatype.h). This code is taken +- # from the code in mpich/configure.ac ++ # from the code in mpich/configure.ac + if test "$len" -gt 255 ; then +- AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type DOUBLE is $len bytes)]) ++ AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type DOUBLE is $len bytes)]) + fi + tmplen=$len + hexlen="" + while test $tmplen -gt 0 ; do + lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)` +- case $lowdigit in ++ case $lowdigit in + 10) char=a ;; + 11) char=b ;; + 12) char=c ;; +@@ -3877,7 +3721,7 @@ if test "$enable_f77" = yes ; then + done + if test $len -lt 16 ; then + hexlen="0$hexlen" +- fi ++ fi + len_double=$hexlen + if test "$len_double" = 0 ; then + # We have a problem +@@ -3932,7 +3776,7 @@ if test "$enable_f77" = yes ; then + [The C type for FORTRAN DOUBLE PRECISION]) + + # Use the proper length values for these items in case we are building +- # with Fortran integers that are not the same size as C ints and ++ # with Fortran integers that are not the same size as C ints and + # reals and double precision that are the same size (not valid Fortran, + # but used by some applications) + +@@ -3949,13 +3793,13 @@ if test "$enable_f77" = yes ; then + for lenname in len_2integer len_2real len_doublecplx ; do + eval len=\$$lenname + if test "$len" -gt 255 ; then +- AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type $lenname is $len bytes)]) +- fi ++ AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type $lenname is $len bytes)]) ++ fi + tmplen=$len + hexlen="" + while test $tmplen -gt 0 ; do + lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)` +- case $lowdigit in ++ case $lowdigit in + 10) char=a ;; + 11) char=b ;; + 12) char=c ;; +@@ -3969,7 +3813,7 @@ if test "$enable_f77" = yes ; then + done + if test $len -lt 16 ; then + hexlen="0$hexlen" +- fi ++ fi + eval ${lenname}=$hexlen + if test "$hexlen" = 0 ; then + # We have a problem +@@ -3993,15 +3837,15 @@ dnl # + dnl # Take len and turn it into two hex digits (there are 8 bits available + dnl # in the built-in datatype handle for the length; see + dnl # src/mpid/common/datatype/mpidu_datatype.h). This code is taken +-dnl # from the code in mpich/configure.ac ++dnl # from the code in mpich/configure.ac + dnl if test "$len" -gt 255 ; then +-dnl AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type DOUBLE COMPLEX is $len bytes)]) ++dnl AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type DOUBLE COMPLEX is $len bytes)]) + dnl fi + dnl tmplen=$len + dnl hexlen="" + dnl while test $tmplen -gt 0 ; do + dnl lowdigit=`expr $tmplen - 16 \* \( $tmplen / 16 \)` +-dnl case $lowdigit in ++dnl case $lowdigit in + dnl 10) char=a ;; + dnl 11) char=b ;; + dnl 12) char=c ;; +@@ -4046,7 +3890,7 @@ dnl len_doublecplx=$hexlen + seconddigit=0 + while test $len_2dc -ge 16 ; do + firstdigit=`expr $firstdigit + 1` +- len_2dc=`expr $len_2dc - 16` ++ len_2dc=`expr $len_2dc - 16` + done + case $len_2dc in + 10) seconddigit=a ;; +@@ -4073,11 +3917,11 @@ dnl len_doublecplx=$hexlen + # We must convert all hex values to decimal (!) + # It would be nice to use expr to extract the next character rather than + # the heavier-weight sed, but expr under Tru64 Unix discards leading zeros, +- # even when used only with the match (:) command. Rather than have ++ # even when used only with the match (:) command. Rather than have + # configure figure out if expr works, we just use sed. Sigh. + for var in CHARACTER INTEGER REAL LOGICAL DOUBLE_PRECISION COMPLEX \ + DOUBLE_COMPLEX 2INTEGER 2REAL 2COMPLEX 2DOUBLE_PRECISION \ +- 2DOUBLE_COMPLEX F77_PACKED F77_UB F77_LB F77_BYTE; do ++ 2DOUBLE_COMPLEX F77_PACKED F77_UB F77_LB F77_BYTE; do + fullvar="MPI_$var" + eval fullvarvalue=\$$fullvar + #echo "$fullvar = $fullvarvalue" +@@ -4090,7 +3934,7 @@ dnl len_doublecplx=$hexlen + # FIXME: Tru64 Unix eliminates leading zeros (!) + # How do we fix something that broken? + fullvarvalue=`echo $fullvarvalue | sed -e 's/.\(.*\)/\1/'` +- case $char in ++ case $char in + a) char=10 ;; + b) char=11 ;; + c) char=12 ;; +@@ -4125,7 +3969,7 @@ dnl len_doublecplx=$hexlen + + # + # The following code was correct for MPI-1, which allowed these datatypes +- # to be an alias for another MPI type. MPI-2 requires these to ++ # to be an alias for another MPI type. MPI-2 requires these to + # be distinct types, so these are enumerated + if test "$use_alias_types" = yes ; then + for len in 1 2 4 8 16 ; do +@@ -4175,11 +4019,11 @@ dnl len_doublecplx=$hexlen + AC_MSG_RESULT([unavailable]) + fi + done +- else ++ else + # Simply determine which types exist. These may have been set by the + # toplevel configure + for var in INTEGER1 INTEGER2 INTEGER4 INTEGER8 INTEGER16 \ +- REAL4 REAL8 REAL16 COMPLEX8 COMPLEX16 COMPLEX32 ; do ++ REAL4 REAL8 REAL16 COMPLEX8 COMPLEX16 COMPLEX32 ; do + eval varname=MPI_$var + eval varvalue=\$$varname + #echo "$varname = $varvalue" +@@ -4192,10 +4036,10 @@ dnl len_doublecplx=$hexlen + fi + # We must convert all hex values to decimal (!) + for var in INTEGER1 INTEGER2 INTEGER4 INTEGER8 INTEGER16 \ +- REAL4 REAL8 REAL16 COMPLEX8 COMPLEX16 COMPLEX32 ; do ++ REAL4 REAL8 REAL16 COMPLEX8 COMPLEX16 COMPLEX32 ; do + fullvar="F77_$var" + eval fullvarvalue=\$$fullvar +- if test "$fullvarvalue" = 0 -o -z "$fullvarvalue" ; then ++ if test "$fullvarvalue" = 0 -o -z "$fullvarvalue" ; then + eval $fullvar=MPI_DATATYPE_NULL + continue + fi +@@ -4210,7 +4054,7 @@ dnl len_doublecplx=$hexlen + # buggy and set the status to one on expressions like + # expr 00ccc : '\(.\)' + # while both +- # expr 00ccc : '\(..\)' ++ # expr 00ccc : '\(..\)' + # and + # expr 100cc : '\(.\)' + # return a zero status. So the status is set even on success, +@@ -4221,7 +4065,7 @@ dnl len_doublecplx=$hexlen + # break + #fi + fullvarvalue=`echo $fullvarvalue | sed -e 's/.\(.*\)/\1/'` +- case $char in ++ case $char in + a) char=10 ;; + b) char=11 ;; + c) char=12 ;; +@@ -4268,7 +4112,7 @@ dnl len_doublecplx=$hexlen + AC_MSG_RESULT([unavailable]) + fi + # We also need to check the size of MPI_Aint vs MPI_Fint, and +- # define AINT_LARGER_THAN_FINT if aint is larger (this ++ # define AINT_LARGER_THAN_FINT if aint is larger (this + # affects code in MPI_Address) + if test "$ac_cv_sizeof_void_p" != "0" -a \ + "$ac_cv_sizeof_void_p" -gt "$pac_cv_f77_sizeof_integer" ; then +@@ -4278,7 +4122,7 @@ dnl len_doublecplx=$hexlen + "$ac_cv_sizeof_void_p" != "$pac_cv_f77_sizeof_integer" ; then + AC_DEFINE(HAVE_AINT_DIFFERENT_THAN_FINT,1,[Define if addresses are a different size than Fortran integers]) + fi +- ++ + # Include a defined value for Fint is int + if test "$MPI_FINT" = "int" ; then + AC_DEFINE(HAVE_FINT_IS_INT,1,[Define if Fortran integer are the same size as C ints]) +@@ -4286,10 +4130,10 @@ dnl len_doublecplx=$hexlen + # Make this fatal because we do not want to build a broken fortran + # interface (was error) + # Check to see if the f77 binding has enabled the code to support +- # the case of int != fint. ++ # the case of int != fint. + if grep HAVE_FINT_IS_INT $master_top_srcdir/src/binding/fortran/mpif_h/testf.c 2>&1 1>/dev/null ; then + AC_MSG_WARN([Fortran integers and C ints are not the same size. Support for this case is experimental; use at your own risk]) +- else ++ else + AC_MSG_ERROR([Fortran integers and C ints are not the same size. The current Fortran binding does not support this case. Either force the Fortran compiler to use integers of $ac_cv_sizeof_int bytes, or use --disable-fortran on the configure line for MPICH.]) + fi + fi +@@ -4324,7 +4168,7 @@ dnl len_doublecplx=$hexlen + # FIXME: Tru64 Unix eliminates leading zeros (!) + # How do we fix something that broken? + fullvarvalue=`echo $fullvarvalue | sed -e 's/.\(.*\)/\1/'` +- case $char in ++ case $char in + a) char=10 ;; + b) char=11 ;; + c) char=12 ;; +@@ -4332,7 +4176,7 @@ dnl len_doublecplx=$hexlen + e) char=14 ;; + f) char=15 ;; + esac +- # For Fortran, if the value is too big for an unsigned int, ++ # For Fortran, if the value is too big for an unsigned int, + # we need to make it a signed (negative) int. Currently, the + # types in this class are the minloc/maxloc types. + if test $pos = 3 -a $char -ge 8 ; then +@@ -4342,7 +4186,7 @@ dnl len_doublecplx=$hexlen + fi + value=`expr $value \* 16 + $char` + done +- if test "$offset" != 0 ; then ++ if test "$offset" != 0 ; then + #echo "$fullf77var: $value, $offset" + value=`expr $value + $offset` + fi +@@ -4388,21 +4232,21 @@ dnl len_doublecplx=$hexlen + AC_SUBST(MPI_F77_C_COMPLEX) + AC_SUBST(MPI_F77_C_DOUBLE_COMPLEX) + AC_SUBST(MPI_F77_C_LONG_DOUBLE_COMPLEX) +- # these two are not yet defined, but AC_SUBST only cares about them at ++ # these two are not yet defined, but AC_SUBST only cares about them at + # AC_OUTPUT-time + AC_SUBST(MPI_F77_AINT) + AC_SUBST(MPI_F77_OFFSET) + + # Try and compute the values of .true. and .false. in Fortran + # This code has been removed because the Fortran binding code does +- # not yet support it. ++ # not yet support it. + PAC_F77_LOGICALS_IN_C([$MPI_FINT]) + + # Get the INTEGER_KIND, ADDRESS_KIND and OFFSET_KIND if possible + # + # For Fortran 90, we'll also need MPI_ADDRESS_KIND and MPI_OFFSET_KIND + # Since our compiler might BE a Fortran 90 compiler, try and determine the +- # values. ++ # values. + if test "$FC" = "no" ; then + PAC_F77_IS_FC([ + FC=$F77 +@@ -4428,7 +4272,7 @@ dnl len_doublecplx=$hexlen + if test "$testsize" = 0 ; then + # Set a default + testsize=4 +- fi ++ fi + dnl Using the {} around testsize helps the comments work correctly + PAC_PROG_FC_INT_KIND(ADDRESS_KIND,${testsize},$CROSS_F90_ADDRESS_KIND) + if test "$testsize" = 8 ; then +@@ -4445,7 +4289,7 @@ dnl len_doublecplx=$hexlen + AC_MSG_ERROR([Unable to determine Fortran 90 KIND values for either address-sized integers or offset-sized integers.]) + fi + # +- # Some compilers won't allow a -1 kind (e.g., absoft). In this case, ++ # Some compilers won't allow a -1 kind (e.g., absoft). In this case, + # use a fallback (sizeof(int) kind) + if test "$ADDRESS_KIND" = "-1" -o "$OFFSET_KIND" = "-1" ; then + if test "$ADDRESS_KIND" = "-1" ; then +@@ -4482,13 +4326,13 @@ dnl len_doublecplx=$hexlen + if test -z "$OFFSET_KIND" ; then + OFFSET_KIND=0 + fi +- # Note, however, that zero value are (in all practical case) invalid ++ # Note, however, that zero value are (in all practical case) invalid + # for Fortran 90, and indicate a failure. Test and fail if Fortran 90 + # enabled. + if test "$enable_fc" = "yes" ; then + if test "$ADDRESS_KIND" -le 0 -o "$OFFSET_KIND" -le 0 ; then + AC_MSG_ERROR([Unable to determine Fortran 90 integer kinds for MPI types. If you do not need Fortran 90, add --disable-fc to the configure options.]) +- # If the above is converted to a warning, you need to change ++ # If the above is converted to a warning, you need to change + # enable_fc and remote f90 from the bindings + enable_fc=no + fi +@@ -4497,8 +4341,8 @@ dnl len_doublecplx=$hexlen + AC_SUBST(OFFSET_KIND) + AC_SUBST(INTEGER_KIND) + +- # Some compilers may require special directives to handle the common +- # block in a library. In particular, directives are needed for Microsoft ++ # Some compilers may require special directives to handle the common ++ # block in a library. In particular, directives are needed for Microsoft + # Windows to support dynamic library import. The following six + # directives may be needed: + # CMS\$ATTRIBUTES DLLIMPORT::/MPIPRIV1/ +@@ -4508,7 +4352,7 @@ dnl len_doublecplx=$hexlen + # CDEC\$ATTRIBUTES DLLIMPORT::/MPIPRIV2/ + # CDEC\$ATTRIBUTES DLLIMPORT::/MPIPRIVC/ + # CMS is for the Microsoft compiler, +- # CDEC is (we believe) for the DEC Fortran compiler. ++ # CDEC is (we believe) for the DEC Fortran compiler. + # We need to make this a configure-time variable because some compilers + # (in particular, a version of the Intel Fortran compiler for Linux) + # will read directives for other compilers and then flag as fatal +@@ -4521,8 +4365,8 @@ dnl len_doublecplx=$hexlen + # We also need to include + # SIZEOF_FC_MPI_OFFSET + # SIZEOF_FC_MPI_AINT +- # +- # If other "kinds" are supported, MPI_SIZEOF needs to identify ++ # ++ # If other "kinds" are supported, MPI_SIZEOF needs to identify + # those as well. This is very difficult to do in a general way. + + # To start with, we use the sizes determined for the Fortran 77 values. +@@ -4554,7 +4398,7 @@ dnl len_doublecplx=$hexlen + # Fortran 90 comment character if true. This is necessary to + # allow the mpi_sizeofs module to be built, since if this part of the + # Fortran standard is violated by the compiler (unfortunately common, +- # as some applications are written to require this non-standard ++ # as some applications are written to require this non-standard + # version), the double precision versions of the MPI_SIZEOF routine + # must be commented out of the module (!). + REQD= +@@ -4580,7 +4424,7 @@ dnl len_doublecplx=$hexlen + REQI8= + fi + AC_SUBST(REQI8) +- # ++ # + + AC_LANG_C + fi +@@ -4631,8 +4475,8 @@ if test "$enable_cxx" = "yes" ; then + [a C type used to compute C++ bool reductions]) + + AC_CHECK_HEADER(complex) +- if test "$ac_cv_header_complex" = "yes" ; then +- # The C++ complex types are all templated. We finagle this by ++ if test "$ac_cv_header_complex" = "yes" ; then ++ # The C++ complex types are all templated. We finagle this by + # defining a standin name + AC_CHECK_SIZEOF(Complex,0,[#include + #include +@@ -4660,22 +4504,22 @@ using namespace std; + fi + + # Datatypes are given by +- # 0x4c00 (1 byte) (1 byte) ++ # 0x4c00 (1 byte) (1 byte) + # where the unique nums are + # 33,34,35,36 +- case "$ac_cv_sizeof_bool" in ++ case "$ac_cv_sizeof_bool" in + 1) MPIR_CXX_BOOL=0x4c000133 ;; + 2) MPIR_CXX_BOOL=0x4c000233 ;; + 4) MPIR_CXX_BOOL=0x4c000433 ;; + 8) MPIR_CXX_BOOL=0x4c000833 ;; + *) ;; + esac +- case "$ac_cv_sizeof_Complex" in ++ case "$ac_cv_sizeof_Complex" in + 8) MPIR_CXX_COMPLEX=0x4c000834 ;; + 16) MPIR_CXX_COMPLEX=0x4c001034 ;; + *) ;; + esac +- case "$ac_cv_sizeof_DoubleComplex" in ++ case "$ac_cv_sizeof_DoubleComplex" in + 8) MPIR_CXX_DOUBLE_COMPLEX=0x4c000835 ;; + 16) MPIR_CXX_DOUBLE_COMPLEX=0x4c001035 ;; + 32) MPIR_CXX_DOUBLE_COMPLEX=0x4c002035 ;; +@@ -4700,7 +4544,7 @@ using namespace std; + AC_DEFINE_UNQUOTED(MPIR_CXX_COMPLEX_VALUE,$MPIR_CXX_COMPLEX,[Define as the MPI Datatype handle for MPI::COMPLEX]) + AC_DEFINE_UNQUOTED(MPIR_CXX_DOUBLE_COMPLEX_VALUE,$MPIR_CXX_DOUBLE_COMPLEX,[Define as the MPI Datatype handle for MPI::DOUBLE_COMPLEX]) + AC_DEFINE_UNQUOTED(MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE,$MPIR_CXX_LONG_DOUBLE_COMPLEX,[Define as the MPI Datatype handle for MPI::LONG_DOUBLE_COMPLEX]) +- ++ + # compute F77 decimal constant values for these types + PAC_CONV_HEX_TO_DEC([$MPIR_CXX_BOOL], [MPI_F77_CXX_BOOL]) + PAC_CONV_HEX_TO_DEC([$MPIR_CXX_COMPLEX], [MPI_F77_CXX_FLOAT_COMPLEX]) +@@ -4741,7 +4585,7 @@ AC_SUBST(DISABLE_TAG_SUPPORT) + + # ---------------------------------------------------------------------------- + # Check for the alignment rules moves with types int64_t etc. These +-# are used in the datatype code to perform pack and unpack operations. ++# are used in the datatype code to perform pack and unpack operations. + # These only determine if different alignments *work*, not whether they + # work efficiently. The datatype pack code (should) allow the developer + # to include stricter alignment rules than are needed for correctness to +@@ -4794,7 +4638,7 @@ if test "$ac_cv_int32_t" != "no" ; then + INT32_T="$ac_cv_int32_t" + fi + fi +- ++ + AC_CACHE_CHECK([for alignment restrictions on int32_t],pac_cv_int32_t_alignment,[ + AC_TRY_RUN([ + #include +@@ -4854,7 +4698,7 @@ AC_CHECK_FUNCS(setitimer alarm) + # These are used for error reporting + AC_CHECK_FUNCS(vsnprintf vsprintf) + if test "$ac_cv_func_vsnprintf" = "yes" ; then +- # vsnprintf may be declared in stdio.h and may need stdarg.h ++ # vsnprintf may be declared in stdio.h and may need stdarg.h + PAC_FUNC_NEEDS_DECL([#include + #include ],vsnprintf) + fi +@@ -4876,7 +4720,7 @@ fi + AC_CHECK_FUNCS([qsort]) + + # if we are using stdarg, we may need va_copy . Test to see if we have it +-# Since it may be a built-in instead of a function, we must try to ++# Since it may be a built-in instead of a function, we must try to + # compile and link a program that uses it. + # va_copy is currently used only in src/util/dbg_printf.c, in an obsolete + # debugging routine. We may want to withdraw this (saving the +@@ -5014,16 +4858,6 @@ AC_SUBST(MPI_AINT_FMT_DEC_SPEC) + AC_SUBST(MPI_AINT_FMT_HEX_SPEC) + AC_DEFINE_UNQUOTED([MPIR_AINT_MAX],[$MPIR_AINT_MAX],[limits.h _MAX constant for MPI_Aint]) + +-# If sizeof(mpi_aint) = sizeof(int), set this value +-if test "$ac_cv_sizeof_int" = "$aint_size" ; then +- AC_DEFINE(SIZEOF_INT_IS_AINT,1,[define if sizeof(int) = sizeof(MPI_Aint)]) +-fi +- +-# If sizeof(mpi_aint) = sizeof(int), set this value +-if test "$ac_cv_sizeof_void_p" = "$aint_size" ; then +- AC_DEFINE(SIZEOF_PTR_IS_AINT,1,[define if sizeof(void *) = sizeof(MPI_Aint)]) +-fi +- + # ---------------------------------------------------------------------------- + # MPI_AINT datatype + # ---------------------------------------------------------------------------- +@@ -5076,16 +4910,16 @@ BSEND_OVERHEAD=$ac_cv_sizeof_MPII_Bsend_data_t + export BSEND_OVERHEAD + AC_SUBST(BSEND_OVERHEAD) + +-dnl Configure any subdirectories. Note that config.status will *not* ++dnl Configure any subdirectories. Note that config.status will *not* + dnl reexecute these! +-dnl ++dnl + dnl Gastly problem. CONFIG_SUBDIRS only adds the directories to the + dnl list of directories to be configured. It does NOT control the + dnl timing of the configuration. For that, we must do something different. +-dnl Our original solution was to use a separate macro that does cause +-dnl immediate configure; this macro made use of the code that autoconf +-dnl uses to handle the subdir configure. However, later versions of +-dnl autoconf did this in a way that caused problems, paritcularly with ++dnl Our original solution was to use a separate macro that does cause ++dnl immediate configure; this macro made use of the code that autoconf ++dnl uses to handle the subdir configure. However, later versions of ++dnl autoconf did this in a way that caused problems, paritcularly with + dnl errors reported as inconsistent cache files. Instead, we simply + dnl invoke the configure scripts (if present) directly. + +@@ -5110,7 +4944,7 @@ if test "$ac_cv_func_sched_setaffinity" = "yes" ; then + if test "$pac_cv_cpu_set_defined" = "yes" ; then + AC_DEFINE(HAVE_CPU_SET_MACROS,1,[Define if CPU_SET and CPU_ZERO defined]) + fi +- # FIXME: Some versions of sched_setaffinity return ENOSYS (!), ++ # FIXME: Some versions of sched_setaffinity return ENOSYS (!), + # so we should test for the unfriendly and useless behavior + fi + fi +@@ -5136,7 +4970,6 @@ fi + AC_ARG_ENABLE(checkpointing, + [AC_HELP_STRING([--enable-checkpointing], [Enable application checkpointing])], + [ if test "$enableval" != "no" ; then +- PAC_SET_HEADER_LIB_PATH(blcr) + PAC_PUSH_FLAG([LIBS]) + PAC_CHECK_HEADER_LIB_FATAL(blcr, libcr.h, cr, cr_init) + PAC_APPEND_FLAG([-lcr],[WRAPPER_LIBS]) +@@ -5147,7 +4980,7 @@ AC_ARG_ENABLE(checkpointing, + + # Update the cache first with the results of the previous configure steps + # We don't use the subdir cache because ensuring that the cache is consistant +-# with the way in which configure wishes to use it is very difficult and ++# with the way in which configure wishes to use it is very difficult and + # too prone to error. + dnl PAC_SUBDIR_CACHE(always) + # ----------------------------------------------------------------------------- +@@ -5170,7 +5003,7 @@ PAC_CREATE_BASE_CACHE + # libraries in order to create the compilation scripts) + + user_specified_atomic_primitives=no +-if test "$DEBUG_SUBDIR_CACHE" = yes ; then ++if test "$DEBUG_SUBDIR_CACHE" = yes ; then + set -x + fi + +@@ -5179,10 +5012,10 @@ m4_map([PAC_SUBCFG_CONFIGURE_SUBSYS], [PAC_SUBCFG_MODULE_LIST]) + + # now configure any actual recursively configures subsystems, such as ROMIO and + # hydra, or older components that haven't been updated to a subconfigure.m4 yet +-for subsys in $devsubsystems $subsystems ; do ++for subsys in $devsubsystems $subsystems ; do + PAC_CONFIG_SUBDIR([$subsys],[],[AC_MSG_ERROR([$subsys configure failed])]) +-done +-if test "$DEBUG_SUBDIR_CACHE" = yes -a "$enable_echo" != yes ; then ++done ++if test "$DEBUG_SUBDIR_CACHE" = yes -a "$enable_echo" != yes ; then + set +x + fi + dnl PAC_SUBDIR_CACHE_CLEANUP +@@ -5236,7 +5069,7 @@ if test -n "$MPI_OFFSET_TYPE" ; then + # We got the value from the ROMIO configure + MPI_OFFSET="$MPI_OFFSET_TYPE" + # Get and export the size of this type if possible +- if test -z "$MPI_SIZEOF_OFFSET" ; then ++ if test -z "$MPI_SIZEOF_OFFSET" ; then + # set a default + AC_CACHE_CHECK([the sizeof MPI_Offset],ac_cv_sizeof_MPI_Offset,[ + ac_cv_sizeof_MPI_Offset=unknown +@@ -5244,13 +5077,13 @@ if test -n "$MPI_OFFSET_TYPE" ; then + AC_MSG_WARN([Unable to determine the size of MPI_Offset]) + ]) + ]) +- if test "$ac_cv_sizeof_MPI_Offset" != "unknown" ; then ++ if test "$ac_cv_sizeof_MPI_Offset" != "unknown" ; then + MPI_SIZEOF_OFFSET=$ac_cv_sizeof_MPI_Offset + fi + fi + export MPI_SIZEOF_OFFSET + else +- # Make a guess at the appropriate definition for offset. Try to ++ # Make a guess at the appropriate definition for offset. Try to + # find a 64bit type. + if test "$ac_cv_sizeof_long" = 8 ; then + MPI_OFFSET="long" +@@ -5276,10 +5109,10 @@ AS_CASE([$MPI_OFFSET], + [AC_MSG_ERROR([unable to determine MPIR_OFFSET_MAX for MPI_Offset])]) + AC_DEFINE_UNQUOTED([MPIR_OFFSET_MAX],[$MPIR_OFFSET_MAX],[limits.h _MAX constant for MPI_Offset]) + +-# FIXME: we need an explanation of why we need both MPI_OFFSET and ++# FIXME: we need an explanation of why we need both MPI_OFFSET and + # MPI_OFFSET_TYPEDEF. Why is MPI_OFFSET_TYPEDEF necessary? + # This appears to be used by the Windows "winconfigure.wsf" which is used +-# to create a multiline definition using an #ifdef check on USE_GCC ++# to create a multiline definition using an #ifdef check on USE_GCC + # We may wish to use a different approach + MPI_OFFSET_TYPEDEF="typedef $MPI_OFFSET MPI_Offset;" + AC_SUBST(MPI_OFFSET_TYPEDEF) +@@ -5384,7 +5217,7 @@ AC_SUBST([MPI_F77_COUNT]) + # + + # +-# The size of MPI_Status is needed for the Fortran interface. ++# The size of MPI_Status is needed for the Fortran interface. + # + # WARNING!!! this is a spot where we duplicate code from mpi.h.in and it *must* + # be kept in sync in order to make a proper computation +@@ -5405,7 +5238,7 @@ _EOF + ] + + dnl just compute it, since a 1s-complement or sign-and-magnitude machine is +-dnl *highly* unlikely. Users will report the error if it is ever ++dnl *highly* unlikely. Users will report the error if it is ever + dnl encountered, which will be safer than attempting some never-tested + dnl default fallback. + AC_COMPUTE_INT([pac_cv_sizeof_mpi_status], +@@ -5436,7 +5269,7 @@ AC_DEFINE_UNQUOTED([MPIF_STATUS_SIZE],[$MPIF_STATUS_SIZE],[Size of an MPI_STATUS + + if test "$enable_f77" = yes ; then + # Check if multiple __attribute__((alias)) is available +- # This test requires MPI_STATUS_SIZE, and thus must be made after ++ # This test requires MPI_STATUS_SIZE, and thus must be made after + # MPI_STATUS_SIZE is determined + if test "$enable_multi_aliases" = "yes" ; then + PAC_C_MULTI_ATTR_ALIAS +@@ -5498,11 +5331,11 @@ AC_SUBST(MPI_MAX_ERROR_STRING) + MPIU_DLL_SPEC_DEF="#define MPIU_DLL_SPEC" + AC_SUBST(MPIU_DLL_SPEC_DEF) + +-dnl We can configure the test directory after the rest of the configure ++dnl We can configure the test directory after the rest of the configure + dnl steps because it does not depend on them. + # set and export values that the test/mpi configure will reference to ensure + # that the correct decisions are made since this configure happens before the +-# MPICH library is built. ++# MPICH library is built. + MPICH_ENABLE_CXX=$enable_cxx + MPICH_ENABLE_F77=$enable_f77 + MPICH_ENABLE_FC=$enable_fc +@@ -5548,7 +5381,7 @@ dnl Run a setup command for any external modules (normally, this is empty) + dnl Pass a subset of the environment to the invoked process. + AC_OUTPUT_COMMANDS([ + for prog in $EXTERNAL_SETUPS - ; do +- if test "$prog" != "-" ; then ++ if test "$prog" != "-" ; then + dir=`dirname $prog` + name=`basename $prog` + (cd $dir && ./$name) +@@ -5558,12 +5391,11 @@ EXTERNAL_SETUPS="$EXTERNAL_SETUPS" + LIBDIR="$libbuild_dir" + MPILIBNAME="$MPILIBNAME" + PMPILIBNAME="$PMPILIBNAME" +-AR="$AR" + CC="$CC" + CPPFLAGS="$CPPFLAGS" + CFLAGS="$CFLAGS" +-export LIBDIR ; export MPILIBNAME ; export AR ; export CC ; export CPPFLAGS +-export PMPILIBNAME ++export LIBDIR ; export MPILIBNAME ; export CC ; export CPPFLAGS ++export PMPILIBNAME + export CFLAGS + # For test/mpi/configure + MPI_SRCDIR=$MPI_SRCDIR +@@ -5587,7 +5419,7 @@ dnl + dnl If we rerun configure, place a file in the lib directory with the + dnl date. We can use this to avoid rebuilding the library when + dnl a build aborts due to an error (this is intended to help developers) +-AC_OUTPUT_COMMANDS([if [ ! -d lib ] ; then mkdir lib ; fi ++AC_OUTPUT_COMMANDS([if [ ! -d lib ] ; then mkdir lib ; fi + date > lib/newconfig]) + + AC_OUTPUT_COMMANDS([chmod a+x test/commands/cmdtests]) +@@ -5606,13 +5438,6 @@ fi + LT_OUTPUT + + if test "X$enable_shared" = "Xyes" ; then +- # see Github issue pmodels/mpich#3050 for shared object linking issue with +- # IBM compiler +- PAC_C_CHECK_COMPILER_OPTION("-qmkshrobj",found_opt=yes,found_opt=no) +- if test "$found_opt" = "yes" ; then +- PAC_APPEND_FLAG([-qmkshrobj],[LDFLAGS]) +- fi +- + # see ticket #1590 for some more background on these Darwin linking issues + AS_CASE([$host], + [*-*-darwin*], +@@ -5832,6 +5657,11 @@ if test "X$f08_works" = "Xyes"; then + fi + + ######################################################################## ++# Some of the settings need to be applied at the end ++if test x"$pac_cc_strict_werror" = xyes ; then ++ PAC_APPEND_FLAG([-Werror],[CFLAGS]) ++fi ++######################################################################## + + if test -z "$pkgconfigdir" ; then + # The default pkgconfig dir is under the lib dir +deleted file mode 100644 +--- a/contrib/knem/README ++++ /dev/null +@@ -1,14 +0,0 @@ +-knem ("kernel nemesis") +-------------------------- +-This is a Linux kernel module that provides high-bandwidth message +-transfers on Linux when using the nemesis communication subsystem. In +-order to use MPICH with knem you must build and install knem according +-configure MPICH with the following arguments: +- +- --enable-device=ch3:nemesis(:net_mod) +- --with-nemesis-local-lmt=knem +- --with-knem-include=/path/to/knem/include/files +- +-Where (:net_mod) indicates an optional network module parameter such as +-tcp or mx. Omitting a netmod will select the default netmod ("tcp" as +-of the time of this writing). +deleted file mode 100644 +Binary files a/contrib/knem/knem-0.5.0.tar.gz and /dev/null differ +new file mode 100644 +--- /dev/null ++++ b/doc/notes/ch4_inline.txt +@@ -0,0 +1,83 @@ ++The note documents the inlining strategy in CH4. ++ ++The goal of inlining is to avoid the function call overhead (especially ++for functions with many arguments). It is the most beneficial for the ++latency sensitive code path---communication related code path. For ++other codes like Init/Finalize and Comm/Win creation/destroy function ++inlining is less beneficial. ++ ++The guidelines for inlining are as follow. ++ ++1. PT2PT, Collective and RMA communication functions need to be inlined. ++ This also means any function that is used in this code path need to ++ be inlined as well. For example, request creation, AM fallback for ++ communication. ++ ++2. Any function that does not fall in the first rule should not be ++ inlined. ++ ++3. For a given component, some of its functions may need to be inlined ++ while others do not. For example, in ch4r_buf.h/.c the creation and ++ destroy of buf pool is only used in init/finalize code, therefore no ++ inlining is needed. But the functions for obtaining and returning ++ individual buffers are used in the communication code path, ++ therefore, inlining is required. ++ ++Uninlining procedure for CH4 layer ++ ++1. Create a src/*.c file, include `mpidimpl.h`. ++2. For functions need to be uninlined, move them to *.c and create ++ create declarations in the *.h file. Note that the functions ++ implemented the ADI do not need this as the prototype is already ++ declared in `mpidch4.h`. ++3. Remove `static inline` or `MPL_STATIC_INLINE_PREFIX` of the uninlined ++ functions (both declarations `mpidch4.h` and definitions) ++4. For uninlined functions that is only used in the *.c file, make them ++ “private”. 1) remove their namespace prefix; 2) create declarations ++ in *.c file; 3) make them `static`. ++5. Remove the *.h file if they are empty. `ch4r_*.h` files are kept for ++ the decls ++6. Keep CVAR to the place where it is used. ++ ++Uninlining procedure for netmod/shm layer ++ ++1. Create *.c file, include `mpidimpl.h`. ++2. For functions need to be uninlined, move them to *.c. Rename from ++ `MPIDI_NM_*` to `MPIDI_OFI_*`. Create decls and #define in ++ `ofi_noinline.h` ++3. Remove `static inline` or `MPL_STATIC_INLINE_PREFIX` of the uninlined ++ functions (both declarations `netmod.h` and definitions). Move ++ wrapper funcs in `netmod_impl.h` to `netmod/src/netmod_impl.c`. ++4. Make internal funcs “private”. ++5. Remove the *.h file if they are empty. ++6. Keep CVAR to the place where it is used. ++ ++For netmod, why do we need to create the #define in `*_noinline.h`? ++ ++ The problem is sort of backward from the case when NETMOD_INLINE ++ disabled---both netmod_impl.c/h and the ofi_init.h/c will have their ++ own MPIDI_NM_* (the one in netmod_impl.c/h is the wrapper). To solve ++ this name collision, we have to change the name of the uninlined ++ functions to MPIDI_OFI_*. Then we run into the problem when ++ NETMOD_INLINE is enabled, the function name does not match the defined ++ interface name anymore, hence the #define solution. ++ ++Why the MPIDI_NM_comm_get_lpid function is moved to ofi_proc.h? ++ ++ This function is used in MPIDIG RMA code and need to be inlined. ++ Because it was the only function in ofi_init.h that should be inlined ++ and it is ugly to keep ofi_init.h just for this function. ++ ++ It cannot be put in ofi_impl.h because ofi_impl.h is included in many ++ .c file which in turn will create their own copy of ++ MPIDI_NM_comm_get_lpid and conflict with each other. Therefore, I put ++ it in ofi_proc.h. ++ ++Tips for resolving conflict when rebasing. ++ ++ If you run into conflict in rebasing the file that is uninlined, try ++ doing a diff between the original .h file and the new .c file. I tried ++ to maintain the relative location of the functions when moving them to ++ the .c file so that it is easier to do a diff in editor. I would ++ usually do something like ```vimdiff ofi_win.h ofi_win.c``` to figure ++ out what was changed during conflict resolving. +new file mode 100644 +--- /dev/null ++++ b/doc/notes/ch4_namespace.txt +@@ -0,0 +1,57 @@ ++This note explains how the namespaces should be used in CH4. ++ ++= Terms in this note: ++ 1. Component: a set of data structures and/or functions that related ++ to a particular functionality. ++ ++= MPID_ namespace ++ This is the abstract device interface (ADI). Usually, these names are ++ linked to their corresponding implementations in the MPIDI_ namespace. ++ ++= MPIDI_ namespace ++ This is the namespace for internal functionalities of CH4. ++ Functionalities that is specific for CH4 should live in here. For ++ example, WorkQ and rankmap as they are independent from ++ netmod/shmmod/AM. ++ ++ Any function that calls the corresponding netmod/shmmod function or ++ arbitrates between netmod and shmmod should also live in MPIDI_ ++ namespace. ++ ++= MPIDIU_ namespace ++ This is the namespace for utility functionalities. If a ++ function, a data structure or a component that provide common ++ functionalities used by CH4, generic, netmod or shmmod. Many of the ++ functions that fit in here have the appearance of a helper function. ++ ++ Example: the buf pool management, symmetric heap allocator, threading ++ and locking, AV table manager. ++ ++ Anything lives in MPIDIU_ namespace should not be implementing AM ++ protocol. ++ Anything lives in MPIDIU_ should not call MPIDI_NM_, MPIDI_SHM_ or ++ MPIDIG_ functions. For example, a "helper" that arbitrates between ++ netmod and shmmod should always lives in MPIDI_ namespace. ++ ++= MPIDIG_ namespace ++ This is the namespace for the CH4 active message (AM) implementation ++ which consists components for AM communication protocol for pt2pt and ++ RMA. Note that any function start with MPIDIG_mpi_ prefix is the AM ++ implementation of the corresponding MPI call. ++ ++ Since the generic functionalities provides the fallback implementation ++ for any ADI that is not implemented by a netmod or shmmod, the ++ functions in MPIDIG_ can be called in netmod and shmmod. Similarly, ++ the netmod and shmmod can access the data structures in the MPIDIG_ ++ namespace through the accessors (e.g. MPIDIG_REQUEST(), MPIDIG_WIN(), ++ etc.). ++ ++= netmod namespace ++ Each netmod should have its own namespace with the prefix MPIDI_{NM ++ name}_. The functionalities defined in one netmod should be used only ++ in that netmod. ++ ++= shmmod namespace ++ Each shmmod should have its own namespace with the prefix MPIDI_{SHM ++ name}_. The functionalities defined in one shmmod should be used only ++ in that shmmod. +new file mode 100644 +--- /dev/null ++++ b/doc/notes/cvar.txt +@@ -0,0 +1,40 @@ ++-- updated by Hui Zhou, 2019/02 ++ ++CVARs are declared in comment blocks such as: ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++cvars: ++ - name : MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM ++ category : COLLECTIVE ++ type : enum ++ default : auto ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : |- ++ Variable to select iallgather algorithm ++ auto - Internal algorithm selection ++ ring - Force ring algorithm ++ brucks - Force brucks algorithm ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++It is in YAML format -- which means, although it looks like plain text, it is not -- the format matters here. In particular, indentations are important. The above block is parsed into a perl HASH with key `cvars` point to an array of items, each is a HASH with keys: name, category, ..., description. ++ ++If the type is enum, the possible values of the enum need be listed in the description block. An enum entry is recognized with regex pattern `/^\s*(\w+)\s+-\s/m`, i.e. a word leading the line followed by ' - '. ++ ++Above example represents (in `src/include/mpir_cvars.h`): ++ extern int MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM; ++ enum MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_choice { ++ MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_auto, ++ MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_ring, ++ MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_brucks ++ }; ++ ++Note the first entry in the enum is 0. ++ ++`autogen.sh` runs perl script `maint/extractcvars`, which looks through all .c and .h files in directories listed in `maint/cvardirs`. Both these files need be processed by configure only to replace `@abs_srcdir@`. If we assume it will always be run by `autogen.sh` or it will always run from top src dir, then probably can simplify the process quite a bit. ++ ++`maint/extractcvars` generates `src/include/mpir_cvars.h` and `src/util/cvar/mpir_cvars.c`. The former is included by `mpiimpl.h`, thus every file, declares `MPIR_CVAR_...` extern variables. The latter defines MPIR_T_cvar_init/finalize functions that are called by MPI_Init/Finalize. The `MPIR_T_cvar_init` function checks environment variable for each CVAR variable and sets values according to the CVAR data type. ++ +--- a/doc/notes/rma/passive-shm.txt ++++ b/doc/notes/rma/passive-shm.txt +@@ -56,7 +56,7 @@ MPID_Accumulate + NOTE: When the lock is shared, we can achieve more parallelism by + dividing the local window into regions. Each region would have a + separate mutex to guarantee that all data elements with that region +-were processed atomically. Ideally, dataloops would be optimized such ++were processed atomically. Ideally, typereps would be optimized such + that a region mutex would never be acquired more than once per + accumulate operation. + +@@ -69,4 +69,4 @@ extra logic will be required to hold multiple mutexes when a type + crosses a region boundary. + + NOTE: When the lock is exclusive, slicing up the local window and +-optimizing the dataloops to increase region locality is unnecessary. ++optimizing the typereps to increase region locality is unnecessary. +--- a/doc/notes/rma/shm.txt ++++ b/doc/notes/rma/shm.txt +@@ -140,14 +140,14 @@ MPID_shm_Accumulate + * Perform requested accumulation + + We need an algorithm for performing accumulations when the +- datatype are non-contiguous. Ideally, the two dataloops and the ++ datatype are non-contiguous. Ideally, the two typereps and the + accumulation operations could be processed without requiring any + extra copying, packing, or temporary buffers. + + NOTE: While it may be possible to write a function to perform the + requested operations, it is likely that such functionality will need + to be inlined so that appropriate locking of local window regions +- occurs as data is being processed. Also, the dataloops will need to ++ occurs as data is being processed. Also, the typereps will need to + be optimized so that it is not necessary to acquire a region's mutex + more than once per request. + +--- a/doc/notes/rma/util.c ++++ b/doc/notes/rma/util.c +@@ -53,7 +53,7 @@ MPIR_Copy_data(src_addr, src_count, src_datatype, + /* + * The data arrangement at both the src and dest buffers is + * non-contiguous. Theoretically, we should be able to manage the two +- * dataloops and copy the data without an intermediate buffer. I need ++ * typereps and copy the data without an intermediate buffer. I need + * to talk to Rob/Bill about this. + */ + } +--- a/examples/argobots/sendrecv_ult.c ++++ b/examples/argobots/sendrecv_ult.c +@@ -95,7 +95,7 @@ int main(int argc, char *argv[]) + assert(buf_size >= 0); + + /* Initialize */ +- ret = ABT_init(*argc, *argv); ++ ret = ABT_init(argc, argv); + if (ret != ABT_SUCCESS) { + printf("Failed to initialize Argobots\n"); + return EXIT_FAILURE; +--- a/maint/Version.base.m4 ++++ b/maint/Version.base.m4 +@@ -23,5 +23,14 @@ dnl $MPICH_VERSION as before + MPICH_VERSION=MPICH_VERSION_m4 + export MPICH_VERSION + ++if [[ -f src/mpid/ch4/netmod/ofi/libfabric/autogen.sh ]]; then ++ cd src/mpid/ch4/netmod/ofi/libfabric ++ LIBFABRIC_VERSION=`git describe --tags` ++ export LIBFABRIC_VERSION ++ cd - ++else ++ error "Submodule libfabric not checked out. Perhaps you need to run 'git submodule update --init' from the top of the MPICH source tree?" ++fi ++ + dnl balance our pushed diversion + m4_divert_pop([])dnl +--- a/maint/checkbuilds.in ++++ b/maint/checkbuilds.in +@@ -69,7 +69,6 @@ $hasDemon = 0; + 'refcount;lock;lock-free;none', + 'mutex-timing', + 'multi-aliases', +- 'wrapper-rpath', + 'predefined-refcount', + 'alloca', + 'yield;sched_yield;yield;select;usleep;sleep', +@@ -83,6 +82,7 @@ $hasDemon = 0; + 'pm;gforker', #;remshell + 'namepublisher;no;file', #;ldap:ldapserver', + 'device;ch3;ch3:sock', ++ 'wrapper-dl-type;runpath;rpath;none', + ); + %chosenWith = (); + @env_array = ( +--- a/maint/code-cleanup.sh ++++ b/maint/code-cleanup.sh +@@ -7,10 +7,10 @@ else + fi + + indent_version=$($indent --version) +-if echo "$indent_version" | grep -q "GNU indent"; then ++if echo "$indent_version" | grep -q "GNU indent 2.2.11"; then + : + else +- echo "This script requires GNU indent." ++ echo "This script requires GNU indent version 2.2.11." + exit + fi + +@@ -92,7 +92,8 @@ recursive=0 + got_file=0 + debug= + ignore=0 +-ignore_list="src/mpid/ch3|doc/" ++ignore_list="doc/|src/mpid/ch3/doc|src/mpid/ch3/include|src/mpid/ch3/src|src/mpid/ch3/util" ++ignore_list="$ignore_list|src/mpid/ch3/channels/nemesis/include|src/mpid/ch3/channels/nemesis/src|src/mpid/ch3/channels/nemesis/utils" + ignore_list="$ignore_list|src/mpi/romio/include/mpiof.h.in|test/mpi/errors/f77/io/addsize.h.in|test/mpi/errors/f77/io/iooffset.h.in" + ignore_list="$ignore_list|test/mpi/f77/attr/attraints.h.in|test/mpi/f77/datatype/typeaints.h.in|test/mpi/f77/ext/add1size.h.in" + ignore_list="$ignore_list|test/mpi/f77/io/ioaint.h.in|test/mpi/f77/io/iodisp.h.in|test/mpi/f77/io/iooffset.h.in" +--- a/maint/cvardirs.in ++++ b/maint/cvardirs.in +@@ -1 +1 @@ +-@abs_srcdir@/../src/mpi @abs_srcdir@/../src/mpi_t @abs_srcdir@/../src/nameserv @abs_srcdir@/../src/util @abs_srcdir@/../src/binding @abs_srcdir@/../src/include @abs_srcdir@/../src/mpid @abs_srcdir@/../src/pmi @abs_srcdir@/../src/mutex ++@abs_srcdir@/../src/mpi @abs_srcdir@/../src/mpi_t @abs_srcdir@/../src/nameserv @abs_srcdir@/../src/util @abs_srcdir@/../src/binding @abs_srcdir@/../src/include @abs_srcdir@/../src/mpid @abs_srcdir@/../src/pmi +--- a/maint/errmsgdirs ++++ b/maint/errmsgdirs +@@ -1 +1 @@ +-src/mpi src/mpi_t src/nameserv src/util src/binding src/include src/mpid src/pmi src/mutex ++src/mpi src/mpi_t src/nameserv src/util src/binding src/include src/mpid src/pmi +--- a/maint/extractcvars.in ++++ b/maint/extractcvars.in +@@ -42,9 +42,11 @@ my $alt_ns = "MPIR_PARAM"; + my $dep_ns = "MPICH"; + + # Default :output source files +-my $header_file = "@abs_srcdir@/../src/include/mpir_cvars.h"; +-my $c_file = "@abs_srcdir@/../src/util/cvar/mpir_cvars.c"; +-my $readme_file = "@abs_srcdir@/../README.envvar"; ++# NOTE: it's important to use single quote. abs_srcdir may contain sigils ++# e.g. /var/lib/jenkins-slave/workspace/hzhou-custom@2/config/ch3-sock/label/centos64 ++my $header_file = '@abs_srcdir@/../src/include/mpir_cvars.h'; ++my $c_file = '@abs_srcdir@/../src/util/cvar/mpir_cvars.c'; ++my $readme_file = '@abs_srcdir@/../README.envvar'; + + sub Usage { + print <{location} */\n"; + printf OUTPUT_H "extern %s ${uc_ns}_%s;\n", Type2Ctype($p->{type}), $p->{name}; ++ if($p->{type} eq "enum"){ ++ my @enum; ++ while($p->{description}=~/^\s*(\w+)\s+-\s/mg){ ++ # i.e. leading word followed with ' - ' ++ push @enum, $1; ++ } ++ $p->{enum} = \@enum; ++ my @t; ++ foreach my $a (@enum){ ++ push @t, " MPIR_CVAR_$p->{name}_$a,"; ++ } ++ $t[-1]=~s/,$//; ++ ++ print OUTPUT_H "enum $p->{name}_choice {\n"; ++ foreach my $l (@t){ ++ print OUTPUT_H "$l\n"; ++ } ++ print OUTPUT_H "};\n"; ++ } + } + + print OUTPUT_H <{type} eq 'string') { +- printf OUTPUT_C "%s ${uc_ns}_%s = (char*)%s;\n", Type2Ctype($p->{type}), $p->{name}, $default; ++ printf OUTPUT_C "%s ${uc_ns}_%s = (const char*)%s;\n", Type2Ctype($p->{type}), $p->{name}, $default; + } else { + printf OUTPUT_C "%s ${uc_ns}_%s = %s;\n", Type2Ctype($p->{type}), $p->{name}, $default; + } +@@ -223,10 +244,6 @@ foreach my $p (@cvars) { + # Generate the init function. + print OUTPUT_C <{name}, $p->{default}, $p->{type}); +- printf OUTPUT_C qq( defaultval.str = (char *)%s;\n), $dftval; ++ printf OUTPUT_C qq( defaultval.str = (const char *)%s;\n), $dftval; + } + elsif ($p->{type} eq 'int' or $p->{type} eq 'boolean') { + $mpi_dtype = "MPI_INT"; +@@ -286,6 +303,12 @@ foreach my $p (@cvars) { + printf OUTPUT_C qq( defaultval.range = tmp;\n); + printf OUTPUT_C qq( }\n); + } ++ elsif ($p->{type} eq 'enum') { ++ $mpi_dtype = "MPI_INT"; ++ $count = 1; ++ $dftval = FmtDefault($p->{name}, $p->{default}, $p->{type}); ++ printf OUTPUT_C " defaultval.d = %s;\n", $dftval; ++ } + else { + die "unknown type $p->{type}, stopped"; + } +@@ -310,6 +333,9 @@ print OUTPUT_C <{name}, &tmp_str); + EOT + } ++ elsif ($p->{type} eq 'enum') { ++ print OUTPUT_C " tmp_str=NULL;\n"; ++ } + + # Get the env variable value. + my $env_fn = Type2EnvFn($p->{type}); +@@ -332,7 +358,7 @@ print OUTPUT_C <{type} eq 'string') { ++ elsif ($p->{type} eq 'string' or $p->{type} eq 'enum') { + print OUTPUT_C <{type} eq 'enum') { ++ print OUTPUT_C " if (tmp_str != NULL) {\n"; ++ my $c = "if"; ++ my $sp = ' ' x 8; ++ foreach my $a (@{$p->{enum}}){ ++ print OUTPUT_C $sp, "$c (0 == strcmp(tmp_str, \"$a\"))\n"; ++ print OUTPUT_C $sp, " $var_name = $var_name\_$a;\n"; ++ $c = "else if"; ++ } ++ # FIXME: There is no failure mode designed for the entire MPIR_T_..._init currently ++ # MPIR_T_cvar_env_init and MPIR_T_env_init et el returns void ++ # I don't see why not, but the change is another PR. ++ # Once we checks the error code, uncomment the following. ++ # print OUTPUT_C $sp, "else {\n"; ++ # print OUTPUT_C $sp, " mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL,__func__,__LINE__,MPI_ERR_ARG, \"**cvar_val\", \"**cvar_val %s %s\", \"$var_name\", tmp_str);\n"; ++ # print OUTPUT_C $sp, " goto fn_fail;\n"; ++ # print OUTPUT_C $sp, "}\n"; ++ print OUTPUT_C " }\n"; ++ } + print OUTPUT_C "\n"; + } + +@@ -385,10 +430,8 @@ foreach my $p (@cvars) { + if ($p->{type} eq 'string') { + # Need to cleanup after whatever was strduped by the init routine + print OUTPUT_C < 'int', + 'double' => 'double', +- 'string' => 'char *', ++ 'string' => 'const char *', + 'boolean' => 'int', + 'range' => "MPIR_T_cvar_range_value_t", ++ 'enum' => 'int', + ); + die "unknown type '$type', stopped" unless exists $typemap{$type}; + return $typemap{$type}; +@@ -495,6 +539,9 @@ sub FmtDefault { + $val =~ s/:/,/; + return qq({$val}); + } ++ elsif ($type eq 'enum') { ++ return "MPIR_CVAR_$name\_$val"; ++ } + else { + return qq($val); + } +@@ -518,6 +565,7 @@ sub Type2EnvFn { + 'boolean' => 'bool', + 'double' => 'double', + 'range' => 'range', ++ 'enum' => 'str', + ); + + die "unknown type '$type', stopped" unless exists $typemap{$type}; +@@ -586,7 +634,7 @@ sub ExpandDir { + my @subdirs = (); + my $DIR_HANDLE; + opendir $DIR_HANDLE, "$dir" or die "Error: open directory $dir -- $!\n"; +- while (my $filename = readdir $DIR_HANDLE) { ++ for my $filename (sort readdir $DIR_HANDLE) { + if ($filename =~ /^\./) { + next; + } elsif (-d "$dir/$filename") { +--- a/maint/extracterrmsgs ++++ b/maint/extracterrmsgs +@@ -731,7 +731,7 @@ sub ProcessFile + !($args[$errClassLoc] =~ /^MPIDI_CH3I_SOCK_ERR_/) && + !($args[$errClassLoc] =~ /^MPIX_ERR_/) && + !($args[$errClassLoc] =~ /^errclass/) && +- !($args[$errClassLoc] =~ /^\*\(errflag_\)/) && ++ !($args[$errClassLoc] =~ /^errflag/) && + !($args[$errClassLoc] =~ /^\*errflag/)) { + $bad_syntax_in_file{$filename} = 1; + print STDERR "Invalid argument $args[$errClassLoc] for the MPI Error class in $routineName in $filename\n"; +--- a/maint/extractfixme.in ++++ b/maint/extractfixme.in +@@ -114,7 +114,7 @@ sub ExpandDir { + my @otherdirs = (); + my @files = (); + opendir DIR, "$dir"; +- while ($filename = readdir DIR) { ++ for $filename (sort readdir DIR) { + if ($filename =~ /^\./ || $filename eq ".svn") { + next; + } +--- a/maint/extractstates.in ++++ b/maint/extractstates.in +@@ -387,7 +387,7 @@ sub findStateDecl { + $inDecls = 0; + if (! ($lastState =~ /:$state:/) && + ! defined($exceptionState{$state}) ) { +- print STDERR "Warning: State in FUNC_ENTER($state) does not match STATE_DECL($lastState) in $file\n" if $showWarnings; ++ print STDERR "Warning: State in FUNC_ENTER($state) does not match STATE_DECL($lastState) in $file at $linenum\n" if $showWarnings; + } + } + elsif (/FUNC_EXIT\((.*)\)/ && !/^\#\s*define\s/) { +@@ -396,7 +396,7 @@ sub findStateDecl { + $inDecls = 0; + if (! ($lastState =~ /:$state:/) && + ! defined($exceptionState{$state})) { +- print STDERR "Warning: State in FUNC_EXIT($state) does not match STATE_DECL($lastState) in $file\n" if $showWarnings; ++ print STDERR "Warning: State in FUNC_EXIT($state) does not match STATE_DECL($lastState) in $file\n" if $showWarnings; + } + # else { + # # Remove this state from the defined states +--- a/maint/extractstrings.in ++++ b/maint/extractstrings.in +@@ -73,7 +73,7 @@ sub GetFileNamesInDirectory { + my @filesFound = (); + + opendir DIR, $dir || die "Could not open $dir\n"; +- while (my $file = readdir DIR) { ++ for my $file (sort readdir DIR) { + if (! -f "$dir/$file") { next; } + if ($file =~ /^\.$/ || $file =~ /^\.\.$/) { next; } + if ($file =~ /$pattern/) { +@@ -246,7 +246,7 @@ sub processDirs { + my @dirs = (); + # Find the directories + opendir DIR, "$dir" || die "Cannot open $dir\n"; +- while (my $file = readdir DIR) { ++ for my $file (sort readdir DIR) { + if (! -d "$dir/$file") { next; } + if ($file =~ /^\./) { next; } + if ($file =~ /^.svn/) { next; } +@@ -273,7 +273,7 @@ sub processDirsAndAction { + my @dirs = (); + # Find the directories + opendir DIR, "$dir" || die "Cannot open $dir\n"; +- while (my $file = readdir DIR) { ++ for my $file (sort readdir DIR) { + if (! -d "$dir/$file") { next; } + if ($file =~ /^\./) { next; } + if ($file =~ /^.svn/) { next; } +--- a/maint/fcrosscompile/configure.ac ++++ b/maint/fcrosscompile/configure.ac +@@ -7,6 +7,7 @@ AC_ARG_WITH(aint-size, + + AC_PROG_CPP + AC_PROG_CC ++AC_PROG_CC_C99 + AC_CHECK_SIZEOF([char]) + AC_CHECK_SIZEOF([short]) + AC_CHECK_SIZEOF([int]) +--- a/maint/gen_subcfg_m4 ++++ b/maint/gen_subcfg_m4 +@@ -9,14 +9,12 @@ + # correct order. + # + # Finding a "dnl MPICH_SUBCFG_BEFORE=BAR" statement inside of +-# FOO/subconfigure.m4 means that FOO depends on BAR and that FOO's macros should +-# be emitted *before* BAR's macros so that FOO can influence BAR's +-# configuration. ++# FOO/subconfigure.m4 means that BAR depends on FOO and that FOO's macros should ++# be emitted *before* BAR's macros. + # + # Finding a "dnl MPICH_SUBCFG_AFTER=QUUX" statement inside of +-# BAZ/subconfigure.m4 means that BAZ uses QUUX and that BAZ's macros be emitted +-# *after* QUUX's macros so that BAZ can utilize information exported by QUUX's +-# configuration macros. ++# BAZ/subconfigure.m4 means that BAZ depends on QUUX and that BAZ's macros be emitted ++# *after* QUUX's macros. + # + # We have both forms of macros because some subsystems know their consumers + # explicitly and some packages only know what they consume explicitly, and some +@@ -118,7 +116,7 @@ while (my $dir = pop @dirstack) { + # the stack to continue the traversal + opendir DH, $dir + or die "unable to open dir='$dir', stopped"; +- my @contents = readdir DH; ++ my @contents = sort readdir DH; + foreach my $f (@contents) { + # avoid endless recursion + next if $f eq "." || $f eq ".."; +--- a/maint/getcoverage.in ++++ b/maint/getcoverage.in +@@ -312,12 +312,6 @@ L: while () { + $missed_lines++; + $executableLines++; # This missed line is executable + +- # The char\s+.* allows char or const char (or other +- # things, but nothing else should use FCNAME). +- if (/static\s+char\s+.*FCNAME\[\]\s*=\s*\"(.*)\"/) { +- # Add this to a list of functions never called. +- $UnCalled[$#UnCalled + 1] = $1; +- } + if ($outputUncovered) { + if (!$headerOutput) { + print "\nUncovered lines in $filename\n"; +@@ -774,7 +768,7 @@ sub ExpandDir { + my @otherdirs = (); + my @files = (); + opendir DIR, "$dir"; +- while ($filename = readdir DIR) { ++ for $filename (sort readdir DIR) { + if ($filename =~ /^\./ || $filename eq ".svn") { + next; + } +--- a/maint/hooks/pre-commit ++++ b/maint/hooks/pre-commit +@@ -68,7 +68,7 @@ ret=0 + for file in $filestring + do + if [[ ($file == *.c || $file == *.h || $file == *.c.in || $file == *.h.in) && +- !($file == *mpi.h.in || $file == *mpio.h.in || $file == src/mpid/ch3/* || $file == doc/*) ]]; then ++ !($file == *mpi.h.in || $file == *mpio.h.in || $file == *mpitestcxx.h || $file == src/mpid/ch3/* || $file == doc/*) ]]; then + cp ${file} ${TMP_FILENAME} + maint/code-cleanup.sh ${file} + git --no-pager diff ${file} ${TMP_FILENAME} +new file mode 100644 +--- /dev/null ++++ b/maint/patches/optional/confdb/ibm-xlf.patch +@@ -0,0 +1,40 @@ ++--- confdb/libtool.m4 2018-10-26 14:37:44.332395000 +0000 +++++ /home/yguo/libtool_new.m4 2018-10-25 22:55:38.108314000 +0000 ++@@ -5242,16 +5242,27 @@ ++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ++ ;; ++ xlf* | bgf* | bgxlf* | mpixlf*) ++- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself ++- _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' ++- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ++- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' ++- if test yes = "$supports_anon_versioning"; then ++- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ ++- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ ++- echo "local: *; };" >> $output_objdir/$libname.ver~ ++- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++- fi +++ XLF_VERSION=$($CC -qversion 2>/dev/null | sed 1q | sed -e "s+^.*V++" | sed -e "s+\..*++") +++ if test $XLF_VERSION -ge 13; then +++ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +++ if test yes = "$supports_anon_versioning"; then +++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ +++ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +++ echo "local: *; };" >> $output_objdir/$libname.ver~ +++ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' +++ fi +++ else +++ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself +++ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' +++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' +++ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' +++ if test yes = "$supports_anon_versioning"; then +++ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ +++ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +++ echo "local: *; };" >> $output_objdir/$libname.ver~ +++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' +++ fi +++ fi ++ ;; ++ esac ++ else +new file mode 100644 +--- /dev/null ++++ b/maint/patches/optional/confdb/intel-compiler.patch +@@ -0,0 +1,14 @@ ++--- ltmain.sh 2019-02-22 16:28:30.548803098 -0600 +++++ ltmain.sh.new 2019-02-22 16:44:08.057521482 -0600 ++@@ -7183,6 +7183,11 @@ ++ continue ++ ;; ++ +++ -static-intel) +++ func_append compiler_flags " $arg" +++ continue +++ ;; +++ ++ -thread-safe) ++ thread_safe=yes ++ continue +new file mode 100644 +--- /dev/null ++++ b/maint/patches/optional/confdb/sys_lib_dlsearch_path_spec.patch +@@ -0,0 +1,56 @@ ++--- /Users/flyxian/libtool.m4 2019-03-06 15:31:23.000000000 -0600 +++++ confdb/libtool.m4 2019-03-07 14:13:16.000000000 -0600 ++@@ -2876,9 +2876,50 @@ ++ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, ++ # even though it is searched at run-time. Try to do the best guess by ++ # appending ld.so.conf contents (and includes) to the search path. ++- if test -f /etc/ld.so.conf; then ++- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` ++- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" +++ +++ # There is no easy way to reliably detect the sys dlsearch path. We will first +++ # assume ldconfig reports the path correctly, but check it with the current +++ # ld cache. If any cached path is not present in the generated path_spec, then +++ # we know ldconfig is bad and should manually parse the ld.so.conf files. +++ # Note the reported paths can be a superset of the cached paths. +++ # The catch is that the default path may not be in the ld.so.conf. We have to +++ # add any missing one back to the path_spec (from the cached paths). +++ +++ if test -x /sbin/ldconfig; then +++ sys_lib_dlsearch_path_spec=`/sbin/ldconfig -N -X -v 2>/dev/null | grep ^/ | sed -e 's/:.*//g' | tr '\n' ' '` +++ cached_lib_dlsearch_path=`/sbin/ldconfig -p | sed -e 's/.*=> //g' | grep '^/' | while read p; do dirname $p; done | sort | uniq | tr '\n' ' '` +++ for p in `echo $cached_lib_dlsearch_path`; do +++ case "$sys_lib_dlsearch_path_spec" in +++ *$p*) +++ bad_ldconfig=no +++ ;; +++ *) +++ # ldconfig is bad if cached path is not reported +++ bad_ldconfig=yes +++ break +++ ;; +++ esac +++ done +++ else +++ bad_ldconfig=yes +++ fi +++ +++ if test "$bad_ldconfig" = "yes"; then +++ if test -f /etc/ld.so.conf; then +++ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` +++ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" +++ fi +++ +++ # catch anything that in the cached path but not in the conf files +++ for p in `echo $cached_lib_dlsearch_path`; do +++ case "$sys_lib_dlsearch_path_spec" in +++ *$p*) +++ ;; +++ *) +++ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $p" +++ ;; +++ esac +++ done ++ fi ++ ++ # We used to test for /lib/ld.so.1 and disable shared libraries on +new file mode 100644 +--- /dev/null ++++ b/mpich-modules.patch +@@ -0,0 +1,33 @@ ++--- mpich-3.2.1/src/packaging/envmods/mpich.module.in.orig 2017-11-11 03:19:44.000000000 +0100 +++++ mpich-3.2.1/src/packaging/envmods/mpich.module.in 2018-04-04 14:14:16.553160669 +0200 ++@@ -3,12 +3,23 @@ ++ # MPICH module for use with 'environment-modules' package: ++ # ++ +++# Only allow one mpi module to be loaded at a time +++conflict mpi +++ ++ # Define prefix so PATH and MANPATH can be updated. ++-setenv prefix @prefix@ ++-setenv exec_prefix @exec_prefix@ +++setenv MPI_BIN @LIBDIR@/bin +++setenv MPI_SYSCONFIG @sysconfdir@/@MPINAME@-@ARCH@ +++setenv MPI_FORTRAN_MOD_DIR @fortranmoddir@/@MPINAME@ +++setenv MPI_INCLUDE @includedir@ +++setenv MPI_LIB @libdir@ +++setenv MPI_MAN @mandir@ +++setenv MPI_PYTHON_SITEARCH @py2sitearch@/@MPINAME@ +++setenv MPI_PYTHON2_SITEARCH @py2sitearch@/@MPINAME@ +++setenv MPI_PYTHON3_SITEARCH @py3sitearch@/@MPINAME@ +++setenv MPI_COMPILER @MPINAME@-@ARCH@ +++setenv MPI_SUFFIX _@MPINAME@ +++setenv MPI_HOME @LIBDIR@ ++ prepend-path PATH @bindir@ ++-prepend-path MANPATH @mandir@ ++- ++-# Undefine prefix and exec_prefix which are too generic environment variables. ++-unsetenv prefix ++-unsetenv exec_prefix +++prepend-path LD_LIBRARY_PATH @libdir@ +++prepend-path MANPATH :@mandir@ +++prepend-path PKG_CONFIG_PATH @LIBDIR@/lib/pkgconfig +new file mode 100644 +--- /dev/null ++++ b/mpich.macros +@@ -0,0 +1,7 @@ ++%_mpich_load \ ++ . /etc/profile.d/modules.sh; \ ++ module load mpi/mpich-%{_arch}; \ ++ export CFLAGS="$CFLAGS %{optflags}"; ++%_mpich_unload \ ++ . /etc/profile.d/modules.sh; \ ++ module unload mpi/mpich-%{_arch}; +new file mode 100644 +--- /dev/null ++++ b/mpich.pth.py2 +@@ -0,0 +1 @@ ++import sys, os; s = os.getenv('MPI_PYTHON2_SITEARCH'); s and (s in sys.path or sys.path.append(s)) +new file mode 100644 +--- /dev/null ++++ b/mpich.pth.py3 +@@ -0,0 +1 @@ ++import sys, os; s = os.getenv('MPI_PYTHON3_SITEARCH'); s and (s in sys.path or sys.path.append(s)) +new file mode 100644 +--- /dev/null ++++ b/mpich.spec +@@ -0,0 +1,483 @@ ++Summary: A high-performance implementation of MPI ++Name: mpich ++Version: 3.3 ++Release: 9.01%{?dist} ++License: MIT ++URL: http://www.mpich.org/ ++ ++Source0: http://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz ++Source1: mpich.macros ++Source2: mpich.pth.py2 ++Source3: mpich.pth.py3 ++Patch0: mpich-modules.patch ++Patch3: 0003-soften-version-check.patch ++# sadly we cannot do this on EL7 due to git being too old ++#Patch10: daos_adio-all.patch ++Patch10: daos_adio.patch ++Patch11: daos_adio-hwloc.patch ++Patch12: daos_adio-izem.patch ++Patch13: daos_adio-libfabric.patch ++Patch14: daos_adio-ucx.patch ++ ++BuildRequires: gcc ++BuildRequires: gcc-c++ ++BuildRequires: gcc-gfortran ++BuildRequires: hwloc-devel >= 1.8 ++%ifnarch s390 %{mips} ++BuildRequires: valgrind-devel ++%endif ++# For python[23]_sitearch ++%if (0%{?fedora} >= 30) ++BuildRequires: python2-devel ++BuildRequires: python3-devel ++BuildRequires: rpm-mpi-hooks ++%else ++BuildRequires: python-devel ++BuildRequires: python34-devel ++%endif ++BuildRequires: automake >= 1.15 ++BuildRequires: libtool >= 2.4.4 ++Provides: mpi ++Provides: mpich2 = %{version} ++Obsoletes: mpich2 < 3.0 ++# the standard EL7 compatibility package ++Obsoletes: mpich-3.0 < 3.1 ++Requires: environment(modules) ++Provides: bundled(hwloc) = 2.0.1rc2 ++ ++%description ++MPICH is a high-performance and widely portable implementation of the Message ++Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3). The goals of MPICH ++are: (1) to provide an MPI implementation that efficiently supports different ++computation and communication platforms including commodity clusters (desktop ++systems, shared-memory systems, multicore architectures), high-speed networks ++(10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics) and proprietary high-end ++computing systems (Blue Gene, Cray) and (2) to enable cutting-edge research in ++MPI through an easy-to-extend modular framework for other derived ++implementations. ++ ++The mpich binaries in this RPM packages were configured to use the default ++process manager (Hydra) using the default device (ch3). The ch3 device ++was configured with support for the nemesis channel that allows for ++shared-memory and TCP/IP sockets based communication. ++ ++This build also include support for using the 'module environment' to select ++which MPI implementation to use when multiple implementations are installed. ++If you want MPICH support to be automatically loaded, you need to install the ++mpich-autoload package. ++ ++%package autoload ++Summary: Load mpich automatically into profile ++Requires: mpich = %{version}-%{release} ++Provides: mpich2-autoload = 3.0.1 ++Obsoletes: mpich2-autoload < 3.0 ++ ++%description autoload ++This package contains profile files that make mpich automatically loaded. ++ ++%package devel ++Summary: Development files for mpich ++Provides: %{name}-devel-static = %{version}-%{release} ++Requires: %{name} = %{version}-%{release} ++Requires: pkgconfig ++Requires: gcc-gfortran ++%if (0%{?fedora} >= 30) ++Requires: rpm-mpi-hooks ++%endif ++Provides: mpich2-devel = 3.0.1 ++Obsoletes: mpich2-devel < 3.0 ++# the standard EL7 compatibility package ++Obsoletes: mpich-3.0-devel < 3.1 ++ ++%description devel ++Contains development headers and libraries for mpich ++ ++%package doc ++Summary: Documentations and examples for mpich ++BuildArch: noarch ++Requires: %{name}-devel = %{version}-%{release} ++Provides: mpich2-doc = 3.0.1 ++Obsoletes: mpich2-doc < 3.0 ++ ++%description doc ++Contains documentations, examples and man-pages for mpich ++ ++%package -n python2-mpich ++Summary: mpich support for Python 2 ++ ++%description -n python2-mpich ++mpich support for Python 2. ++ ++%package -n python3-mpich ++Summary: mpich support for Python 3 ++ ++%description -n python3-mpich ++mpich support for Python 3. ++ ++# We only compile with gcc, but other people may want other compilers. ++# Set the compiler here. ++%{!?opt_cc: %global opt_cc gcc} ++%{!?opt_fc: %global opt_fc gfortran} ++%{!?opt_f77: %global opt_f77 gfortran} ++# Optional CFLAGS to use with the specific compiler...gcc doesn't need any, ++# so uncomment and undefine to NOT use ++%{!?opt_cc_cflags: %global opt_cc_cflags %{optflags}} ++%{!?opt_fc_fflags: %global opt_fc_fflags %{optflags}} ++#%%{!?opt_fc_fflags: %%global opt_fc_fflags %%{optflags} -I%%{_fmoddir}} ++%{!?opt_f77_fflags: %global opt_f77_fflags %{optflags}} ++ ++%ifarch s390 ++%global m_option -m31 ++%else ++%global m_option -m%{__isa_bits} ++%endif ++ ++%ifarch %{arm} aarch64 %{mips} ++%global m_option "" ++%endif ++ ++%global selected_channels ch3:nemesis ++ ++%ifarch %{ix86} x86_64 s390 %{arm} aarch64 ++%global XFLAGS -fPIC ++%endif ++ ++%prep ++%autosetup -p1 ++# we patched autoconf.ac (and friends) so need to regnerate configure ++./autogen.sh ++ ++%build ++%configure \ ++ --enable-sharedlibs=gcc \ ++ --enable-shared \ ++ --enable-static=no \ ++ --enable-lib-depend \ ++ --disable-rpath \ ++ --disable-silent-rules \ ++ --enable-fc \ ++ --with-device=%{selected_channels} \ ++ --with-pm=hydra:gforker \ ++ --includedir=%{_includedir}/%{name}-%{_arch} \ ++ --bindir=%{_libdir}/%{name}/bin \ ++ --libdir=%{_libdir}/%{name}/lib \ ++ --datadir=%{_datadir}/%{name} \ ++ --mandir=%{_mandir}/%{name}-%{_arch} \ ++ --docdir=%{_datadir}/%{name}/doc \ ++ --htmldir=%{_datadir}/%{name}/doc \ ++ --with-hwloc-prefix=embedded \ ++ FC=%{opt_fc} \ ++ F77=%{opt_f77} \ ++ CFLAGS="%{m_option} -O2 %{?XFLAGS}" \ ++ CXXFLAGS="%{m_option} -O2 %{?XFLAGS}" \ ++ FCFLAGS="%{m_option} -O2 %{?XFLAGS}" \ ++ FFLAGS="%{m_option} -O2 %{?XFLAGS}" \ ++ LDFLAGS='-Wl,-z,noexecstack' \ ++ MPICHLIB_CFLAGS="%{?opt_cc_cflags}" \ ++ MPICHLIB_CXXFLAGS="%{optflags}" \ ++ MPICHLIB_FCFLAGS="%{?opt_fc_fflags}" \ ++ MPICHLIB_FFLAGS="%{?opt_f77_fflags}" ++# MPICHLIB_LDFLAGS='-Wl,-z,noexecstack' \ ++# MPICH_MPICC_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ ++# MPICH_MPICXX_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ ++# MPICH_MPIFC_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ ++# MPICH_MPIF77_FLAGS="%{m_option} -O2 %{?XFLAGS}" ++# --with-openpa-prefix=embedded \ ++ ++# FCFLAGS="%{?opt_fc_fflags} -I%{_fmoddir}/%{name} %{?XFLAGS}" \ ++ ++# fix aclocal-1.15 references. i am sure there is a more proper ++# way to do this ++#exit 1 ++#find . -name Makefile | xargs sed -i -e 's/aclocal-1.15/aclocal/g' ++ ++# Remove rpath ++sed -r -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool ++sed -r -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool ++ ++#Try and work around 'unused-direct-shlib-dependency' rpmlint warnning ++sed -i -e 's| -shared | -Wl,--as-needed\0|g' libtool ++ ++%make_build VERBOSE=1 ++ ++%install ++%make_install ++ ++mkdir -p %{buildroot}%{_fmoddir}/%{name} ++mv %{buildroot}%{_includedir}/%{name}-*/*.mod %{buildroot}%{_fmoddir}/%{name}/ ++sed -r -i 's|^modincdir=.*|modincdir=%{_fmoddir}/%{name}|' %{buildroot}%{_libdir}/%{name}/bin/mpifort ++ ++# Install the module file ++mkdir -p %{buildroot}%{_sysconfdir}/modulefiles/mpi ++sed -r 's|%{_bindir}|%{_libdir}/%{name}/bin|; ++ s|@LIBDIR@|%{_libdir}/%{name}|; ++ s|@MPINAME@|%{name}|; ++ s|@py2sitearch@|%{python2_sitearch}|; ++ s|@py3sitearch@|%{python3_sitearch}|; ++ s|@ARCH@|%{_arch}|; ++ s|@fortranmoddir@|%{_fmoddir}|; ++ ' \ ++ %{buildroot}%{_sysconfdir}/modulefiles/mpi/%{name}-%{_arch} ++ ++mkdir -p %{buildroot}%{_sysconfdir}/profile.d ++cat >%{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.sh <= 30) ++%ldconfig_scriptlets ++%else ++%post -p /sbin/ldconfig ++%postun -p /sbin/ldconfig ++%endif ++ ++ ++%files ++%license COPYRIGHT ++%doc CHANGES README README.envvar RELEASE_NOTES ++%dir %{_libdir}/%{name} ++%dir %{_libdir}/%{name}/lib ++%dir %{_libdir}/%{name}/bin ++%{_libdir}/%{name}/lib/*.so.* ++%{_libdir}/%{name}/bin/hydra* ++%{_libdir}/%{name}/bin/mpichversion ++%{_libdir}/%{name}/bin/mpiexec* ++%{_libdir}/%{name}/bin/mpirun ++%{_libdir}/%{name}/bin/mpivars ++%{_libdir}/%{name}/bin/parkill ++%dir %{_mandir}/%{name}-%{_arch} ++%doc %{_mandir}/%{name}-%{_arch}/man1/ ++%{_sysconfdir}/modulefiles/mpi/ ++ ++%files autoload ++%{_sysconfdir}/profile.d/mpich-%{_arch}.* ++ ++%files devel ++%{_includedir}/%{name}-%{_arch}/ ++%{_libdir}/%{name}/lib/pkgconfig/ ++%{_libdir}/%{name}/lib/*.so ++%{_libdir}/%{name}/bin/mpicc ++%{_libdir}/%{name}/bin/mpic++ ++%{_libdir}/%{name}/bin/mpicxx ++%{_libdir}/%{name}/bin/mpif77 ++%{_libdir}/%{name}/bin/mpif90 ++%{_libdir}/%{name}/bin/mpifort ++%{_fmoddir}/%{name}/ ++%{_rpmconfigdir}/macros.d/macros.%{name} ++%{_mandir}/%{name}-%{_arch}/man3/ ++ ++%files doc ++%dir %{_datadir}/%{name} ++%{_datadir}/%{name}/doc/ ++ ++%files -n python2-mpich ++%dir %{python2_sitearch}/%{name} ++%{python2_sitearch}/%{name}.pth ++ ++%files -n python3-mpich ++%dir %{python3_sitearch}/%{name} ++%{python3_sitearch}/%{name}.pth ++ ++%changelog ++* Mon Jun 10 2019 Brian J. Murrell - 3.2.1-9.01 ++- Tweak and build for EL7 ++- Replace the standard EL7 3.0 compatibility package ++ ++* Fri Feb 01 2019 Fedora Release Engineering - 3.2.1-9 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild ++ ++* Fri Jul 13 2018 Fedora Release Engineering - 3.2.1-8 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild ++ ++* Tue Jun 19 2018 Miro Hrončok - 3.2.1-7 ++- Rebuilt for Python 3.7 ++ ++* Tue Jun 19 2018 Miro Hrončok - 3.2.1-6 ++- Rebuilt for Python 3.7 ++ ++* Wed Apr 4 2018 Zbigniew Jędrzejewski-Szmek - 3.2.1-5 ++- Update MANPATH so that normal man pages can still be found (#1533717) ++ ++* Thu Feb 08 2018 Fedora Release Engineering - 3.2.1-4 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild ++ ++* Thu Feb 01 2018 Ralf Corsépius - 3.2.1-3 ++- Rebuilt for GCC-8.0.1. ++ ++* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-2 ++- Update $modincdir in mpifort after moving .mod files (#1301533) ++- Move compiler wrappers to mpich-devel (#1353621) ++- Remove bogus rpath (#1361586) ++ ++* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-1 ++- Update to latest bugfix release (#1512188) ++ ++* Thu Aug 03 2017 Fedora Release Engineering - 3.2-10 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild ++ ++* Wed Jul 26 2017 Fedora Release Engineering - 3.2-9 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild ++ ++* Fri Feb 10 2017 Fedora Release Engineering - 3.2-8 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild ++ ++* Mon Dec 19 2016 Miro Hrončok - 3.2-7 ++- Rebuild for Python 3.6 ++ ++* Wed Nov 2 2016 Orion Poplawski - 3.2-7 ++- Split python support into sub-packages ++ ++* Wed Mar 30 2016 Michal Toman - 3.2-6 ++- Fix build on MIPS ++ ++* Thu Feb 04 2016 Fedora Release Engineering - 3.2-5 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild ++ ++* Fri Jan 22 2016 Orion Poplawski - 3.2-4 ++- Add patch to allow -host localhost to work on builders ++ ++* Wed Jan 20 2016 Orion Poplawski - 3.2-3 ++- Use nemesis channel on all platforms ++ ++* Wed Dec 9 2015 Zbigniew Jędrzejewski-Szmek - 3.2-2 ++- Soften version check (#1289779) ++ ++* Tue Dec 1 2015 Zbigniew Jędrzejewski-Szmek - 3.2-1 ++- Update to latest version ++ ++* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-9 ++- Update requires and fix MPI_FORTRAN_MOD_DIR var ++ ++* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-8 ++- Move fortran .mod files to %%{_fmoddir}/mpich (#1154991) ++- Move man pages to arch-specific dir (#1264359) ++ ++* Tue Nov 10 2015 Fedora Release Engineering - 3.1.4-7 ++- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 ++ ++* Thu Aug 27 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-6 ++- Use .pth files to set the python path (https://fedorahosted.org/fpc/ticket/563) ++- Cleanups to the spec file ++ ++* Sun Jul 26 2015 Sandro Mani - 3.1.4-5 ++- Require, BuildRequire: rpm-mpi-hooks ++ ++* Wed Jun 17 2015 Fedora Release Engineering - 3.1.4-4 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild ++ ++* Sat May 9 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-3 ++- Change MPI_SYCONFIG to /etc/mpich-x86_64 (#1196728) ++ ++* Fri Mar 13 2015 Orion Poplawski - 3.1.4-2 ++- Set PKG_CONFIG_DIR (bug #1113627) ++- Fix modulefile names and python paths (bug#1201343) ++ ++* Wed Mar 11 2015 Orion Poplawski - 3.1.4-1 ++- Update to 3.1.4 ++- Own and set PKG_CONFIG_DIR (bug #1113627) ++- Do not ship old modulefile location (bug #921534) ++ ++* Sun Aug 17 2014 Fedora Release Engineering - 3.1-4 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild ++ ++* Sat Jun 07 2014 Fedora Release Engineering - 3.1-3 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild ++ ++* Fri Feb 21 2014 Ville Skyttä - 3.1-2 ++- Install rpm macros to %%{_rpmconfigdir}/macros.d as non-%%config. ++ ++* Fri Feb 21 2014 Deji Akingunola - 3.1-1 ++- Update to 3.1 ++ ++* Mon Jan 6 2014 Peter Robinson 3.0.4-7 ++- Set the aarch64 compiler options ++ ++* Fri Dec 13 2013 Peter Robinson 3.0.4-6 ++- Now have valgrind on ARMv7 ++- No valgrind on aarch64 ++ ++* Fri Aug 23 2013 Orion Poplawski - 3.0.4-5 ++- Add %%check ++ ++* Sat Aug 03 2013 Fedora Release Engineering - 3.0.4-4 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild ++ ++* Sat Jul 20 2013 Deji Akingunola - 3.0.4-3 ++- Add proper Provides and Obsoletes for the sub-packages ++ ++* Thu Jul 18 2013 Deji Akingunola - 3.0.4-2 ++- Fix some of the rpmlint warnings from package review (BZ #973493) ++ ++* Wed Jun 12 2013 Deji Akingunola - 3.0.4-1 ++- Update to 3.0.4 ++ ++* Thu Feb 21 2013 Deji Akingunola - 3.0.2-1 ++- Update to 3.0.2 ++- Rename to mpich. ++- Drop check for old alternatives' installation ++ ++* Thu Feb 14 2013 Fedora Release Engineering - 1.5-2 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild ++ ++* Thu Nov 1 2012 Orion Poplawski - 1.5-1 ++- Update to 1.5 ++- Drop destdir-fix and mpicxx-und patches ++- Update rpm macros to use the new module location ++ ++* Wed Oct 31 2012 Orion Poplawski - 1.4.1p1-9 ++- Install module file in mpi subdirectory and conflict with other mpi modules ++- Leave existing module file location for backwards compatibility for a while ++ ++* Fri Jul 20 2012 Fedora Release Engineering - 1.4.1p1-8 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild ++ ++* Wed Feb 15 2012 Peter Robinson - 1.4.1p1-7 ++- Rebuild for new hwloc ++ ++* Wed Feb 15 2012 Peter Robinson - 1.4.1p1-6 ++- Update ARM build configuration ++ ++* Fri Jan 13 2012 Fedora Release Engineering - 1.4.1p1-5 ++- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild ++ ++* Mon Jan 2 2012 Jussi Lehtola - 1.4.1p1-4 ++- Bump spec. ++ ++* Wed Nov 16 2011 Jussi Lehtola - 1.4.1p1-3 ++- Comply to MPI guidelines by separating autoloading into separate package ++ (BZ #647147). ++ ++* Tue Oct 18 2011 Deji Akingunola - 1.4.1p1-2 ++- Rebuild for hwloc soname bump. ++ ++* Sun Sep 11 2011 Deji Akingunola - 1.4.1p1-1 ++- Update to 1.4.1p1 patch update ++- Add enable-lib-depend to configure flags ++ ++* Sat Aug 27 2011 Deji Akingunola - 1.4.1-1 ++- Update to 1.4.1 final ++- Drop the mpd subpackage, the PM is no longer supported upstream ++- Fix undefined symbols in libmpichcxx (again) (#732926) ++ ++* Wed Aug 03 2011 Jussi Lehtola - 1.4-2 ++- Respect environment module guidelines wrt placement of module file. ++ ++* Fri Jun 17 2011 Deji Akingunola - 1.4-1 ++- Update to 1.4 final +--- a/src/Makefile.mk ++++ b/src/Makefile.mk +@@ -14,7 +14,6 @@ include $(top_srcdir)/src/env/Makefile.mk + include $(top_srcdir)/src/glue/Makefile.mk + include $(top_srcdir)/src/include/Makefile.mk + include $(top_srcdir)/src/mpid/Makefile.mk +-include $(top_srcdir)/src/mutex/Makefile.mk + include $(top_srcdir)/src/mpi_t/Makefile.mk + include $(top_srcdir)/src/nameserv/Makefile.mk + include $(top_srcdir)/src/packaging/Makefile.mk +--- a/src/binding/cxx/buildiface ++++ b/src/binding/cxx/buildiface +@@ -1454,21 +1454,6 @@ sub printDefineChecks { + #endif\n\n"; + } + +- # GCC changed the calling convention between 3.2.3 and 3.4.3 (!!!) +- # check for that +- print $OUTFD " +-// Check for incompatible GCC versions +-// GCC (specifically) g++ changed the calling convention +-// between 3.2.3 and 3.4.3 (!!) Normally such changes +-// should only occur at major releases (e.g., version 3 to 4) +-#ifdef __GNUC__ +-# if __GNUC__ >= \@GNUCXX_VERSION\@ +-# if __GNUC_MINOR__ > 2 && \@GNUCXX_MINORVERSION\@ == 2 +-# error 'Please use the same version of GCC and g++ for compiling MPICH and user MPI programs' +-# endif +-# endif +-#endif\n"; +- + print $OUTFD " + /* + * Because the API is defined, some methods have parameters that are +--- a/src/binding/fortran/mpif_h/buildiface ++++ b/src/binding/fortran/mpif_h/buildiface +@@ -1980,7 +1980,7 @@ sub logical_array_in_decl { + print $OUTFD " int _ctsize;\n"; + } + print $OUTFD " int *l$count=0;\n"; +- $clean_up .= " if (l$count) { $free( l$count ); }\n"; ++ $clean_up .= " $free( l$count );\n"; + } + sub logical_array_in_arg { + my $count = $_[0]; +@@ -2820,7 +2820,7 @@ sub fint2int_array_in_ftoc { + } + } + "; +- $clean_up .= " if ($coutvar) { $free( $coutvar ); }\n"; ++ $clean_up .= " $free( $coutvar );\n"; + } + } + sub fint2int_array_inout_ftoc { +@@ -2851,7 +2851,7 @@ sub fint2int_array_out_ftoc { + print $OUTFD "\ + $coutvar = (int *)$malloc( $asize * sizeof(int), MPL_MEM_OTHER ); + "; +- $clean_up .= " if ($coutvar) { $free( $coutvar ); }\n"; ++ $clean_up .= " $free( $coutvar );\n"; + } + } + +@@ -2998,7 +2998,7 @@ sub fint2intinplace_array_in_ftoc { + } + } + "; +- $clean_up .= " if ($coutvar) { $free( $coutvar ); }\n"; ++ $clean_up .= " $free( $coutvar );\n"; + } + } + sub fint2intinplace_array_in_decl { +@@ -3051,7 +3051,7 @@ sub fint2int_rangearray_in_ftoc { + } + } + "; +- $clean_up .= " if ($coutvar) { $free( $coutvar ); }\n"; ++ $clean_up .= " $free( $coutvar );\n"; + } + } + sub fint2int_rangearray_in_decl { +@@ -3515,7 +3515,7 @@ sub intToAintArr_in_ctof { + my $vname = $_[1]; + print $OUTFD " + #ifdef HAVE_AINT_LARGER_THAN_FINT +- if ($lname) { $free($lname); } ++ $free($lname); + #endif\n"; + } + # --------------------------------------------------------------------------- +@@ -4408,7 +4408,7 @@ MPII_Comm_copy_attr_f77_proxy( + MPI_Fint ierr = 0; + MPI_Fint fhandle = (MPI_Fint)comm; + MPI_Fint fkeyval = (MPI_Fint)keyval; +- MPI_Aint fvalue = MPIR_VOID_PTR_CAST_TO_MPI_AINT (value); ++ MPI_Aint fvalue = (MPI_Aint)value; + MPI_Aint *fextra = (MPI_Aint *)extra_state; + MPI_Aint fnew = 0; + MPI_Fint fflag = 0; +@@ -4416,7 +4416,7 @@ MPII_Comm_copy_attr_f77_proxy( + ((F77_CopyFunction*)user_function)( &fhandle, &fkeyval, fextra, &fvalue, &fnew, &fflag, &ierr ); + + *flag = MPII_FROM_FLOG(fflag); +- *new_value = MPIR_AINT_CAST_TO_VOID_PTR ((MPI_Aint) fnew); ++ *new_value = (void *)fnew; + return (int)ierr; + } + +@@ -4439,7 +4439,7 @@ MPIR_Comm_delete_attr_f77_proxy( + MPI_Fint ierr = 0; + MPI_Fint fhandle = (MPI_Fint)comm; + MPI_Fint fkeyval = (MPI_Fint)keyval; +- MPI_Aint fvalue = MPIR_VOID_PTR_CAST_TO_MPI_AINT (value); ++ MPI_Aint fvalue = (MPI_Aint)value; + MPI_Aint *fextra = (MPI_Aint *)extra_state; + + ((F77_DeleteFunction*)user_function)( &fhandle, &fkeyval, &fvalue, fextra, &ierr ); +@@ -4592,8 +4592,6 @@ MPIR_Comm_delete_attr_f77_proxy( + #define MPI_Status_f2c PMPI_Status_f2c + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Status_f2c + + int MPI_Status_f2c( const MPI_Fint *f_status, MPI_Status *c_status ) + { +@@ -4665,8 +4663,6 @@ print $OUTFD "\ + #define MPI_Status_c2f PMPI_Status_c2f + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Status_c2f + + int MPI_Status_c2f( const MPI_Status *c_status, MPI_Fint *f_status ) + { +@@ -5421,7 +5417,7 @@ MPIR_Type_copy_attr_f90_proxy( + MPI_Fint ierr = 0; + MPI_Fint fhandle = (MPI_Fint)datatype; + MPI_Fint fkeyval = (MPI_Fint)keyval; +- MPI_Aint fvalue = MPIR_VOID_PTR_CAST_TO_MPI_AINT (value); ++ MPI_Aint fvalue = (MPI_Aint)value; + MPI_Aint* fextra = (MPI_Aint*)extra_state; + MPI_Aint fnew = 0; + MPI_Fint fflag = 0; +@@ -5429,7 +5425,7 @@ MPIR_Type_copy_attr_f90_proxy( + ((F90_CopyFunction*)user_function)( &fhandle, &fkeyval, fextra, &fvalue, &fnew, &fflag, &ierr ); + + *flag = MPII_FROM_FLOG(fflag); +- *new_value = MPIR_AINT_CAST_TO_VOID_PTR (fnew); ++ *new_value = (void *)fnew; + return (int)ierr; + } + +@@ -5452,7 +5448,7 @@ MPIR_Type_delete_attr_f90_proxy( + MPI_Fint ierr = 0; + MPI_Fint fhandle = (MPI_Fint)datatype; + MPI_Fint fkeyval = (MPI_Fint)keyval; +- MPI_Aint fvalue = MPIR_VOID_PTR_CAST_TO_MPI_AINT (value); ++ MPI_Aint fvalue = (MPI_Aint)value; + MPI_Aint* fextra = (MPI_Aint*)extra_state; + + ((F90_DeleteFunction*)user_function)( &fhandle, &fkeyval, &fvalue, fextra, &ierr ); +@@ -5485,7 +5481,7 @@ MPII_Comm_copy_attr_f90_proxy( + MPI_Fint ierr = 0; + MPI_Fint fhandle = (MPI_Fint)comm; + MPI_Fint fkeyval = (MPI_Fint)keyval; +- MPI_Aint fvalue = MPIR_VOID_PTR_CAST_TO_MPI_AINT (value); ++ MPI_Aint fvalue = (MPI_Aint)value; + MPI_Aint* fextra = (MPI_Aint*)extra_state; + MPI_Aint fnew = 0; + MPI_Fint fflag = 0; +@@ -5493,7 +5489,7 @@ MPII_Comm_copy_attr_f90_proxy( + ((F90_CopyFunction*)user_function)( &fhandle, &fkeyval, fextra, &fvalue, &fnew, &fflag, &ierr ); + + *flag = MPII_FROM_FLOG(fflag); +- *new_value = MPIR_AINT_CAST_TO_VOID_PTR (fnew); ++ *new_value = (void *)fnew; + return (int)ierr; + } + +@@ -5516,7 +5512,7 @@ MPIR_Comm_delete_attr_f90_proxy( + MPI_Fint ierr = 0; + MPI_Fint fhandle = (MPI_Fint)comm; + MPI_Fint fkeyval = (MPI_Fint)keyval; +- MPI_Aint fvalue = MPIR_VOID_PTR_CAST_TO_MPI_AINT (value); ++ MPI_Aint fvalue = (MPI_Aint)value; + MPI_Aint* fextra = (MPI_Aint*)extra_state; + + ((F90_DeleteFunction*)user_function)( &fhandle, &fkeyval, &fvalue, fextra, &ierr ); +@@ -5549,7 +5545,7 @@ MPIR_Win_copy_attr_f90_proxy( + MPI_Fint ierr = 0; + MPI_Fint fhandle = (MPI_Fint)win; + MPI_Fint fkeyval = (MPI_Fint)keyval; +- MPI_Aint fvalue = MPIR_VOID_PTR_CAST_TO_MPI_AINT (value); ++ MPI_Aint fvalue = (MPI_Aint)value; + MPI_Aint* fextra = (MPI_Aint*)extra_state; + MPI_Aint fnew = 0; + MPI_Fint fflag = 0; +@@ -5557,7 +5553,7 @@ MPIR_Win_copy_attr_f90_proxy( + ((F90_CopyFunction*)user_function)( &fhandle, &fkeyval, fextra, &fvalue, &fnew, &fflag, &ierr ); + + *flag = MPII_FROM_FLOG(fflag); +- *new_value = MPIR_AINT_CAST_TO_VOID_PTR (fnew); ++ *new_value = (void *)fnew; + return (int)ierr; + } + +@@ -5580,7 +5576,7 @@ MPIR_Win_delete_attr_f90_proxy( + MPI_Fint ierr = 0; + MPI_Fint fhandle = (MPI_Fint)win; + MPI_Fint fkeyval = (MPI_Fint)keyval; +- MPI_Aint fvalue = MPIR_VOID_PTR_CAST_TO_MPI_AINT (value); ++ MPI_Aint fvalue = (MPI_Aint)value; + MPI_Aint* fextra = (MPI_Aint*)extra_state; + + ((F90_DeleteFunction*)user_function)( &fhandle, &fkeyval, &fvalue, fextra, &ierr ); +--- a/src/binding/fortran/mpif_h/setbot.c.in ++++ b/src/binding/fortran/mpif_h/setbot.c.in +@@ -102,7 +102,7 @@ struct mpif_cmblk1_t_ { + }; + typedef struct mpif_cmblk1_t_ mpif_cmblk1_t; + /* *INDENT-OFF* */ +-mpif_cmblk1_t mpifcmb1r @CMB_STATUS_ALIGNMENT@ = {{0}}; ++mpif_cmblk1_t mpifcmb1r @CMB_STATUS_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern mpif_cmblk1_t _CMPIFCMB1 __attribute__ ((alias("mpifcmb1r"))); + extern mpif_cmblk1_t MPIFCMB1 __attribute__ ((alias("mpifcmb1r"))); +@@ -116,7 +116,7 @@ struct mpif_cmblk2_t_ { + }; + typedef struct mpif_cmblk2_t_ mpif_cmblk2_t; + /* *INDENT-OFF* */ +-mpif_cmblk2_t mpifcmb2r @CMB_STATUS_ALIGNMENT@ = {{{0}}}; ++mpif_cmblk2_t mpifcmb2r @CMB_STATUS_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern mpif_cmblk2_t _CMPIFCMB2 __attribute__ ((alias("mpifcmb2r"))); + extern mpif_cmblk2_t MPIFCMB2 __attribute__ ((alias("mpifcmb2r"))); +@@ -130,7 +130,7 @@ struct mpif_cmblk3_t_ { + }; + typedef struct mpif_cmblk3_t_ mpif_cmblk3_t; + /* *INDENT-OFF* */ +-mpif_cmblk3_t mpifcmb3r @CMB_1INT_ALIGNMENT@ = {0}; ++mpif_cmblk3_t mpifcmb3r @CMB_1INT_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern mpif_cmblk3_t _CMPIFCMB3 __attribute__ ((alias("mpifcmb3r"))); + extern mpif_cmblk3_t MPIFCMB3 __attribute__ ((alias("mpifcmb3r"))); +@@ -144,7 +144,7 @@ struct mpif_cmblk4_t_ { + }; + typedef struct mpif_cmblk4_t_ mpif_cmblk4_t; + /* *INDENT-OFF* */ +-mpif_cmblk4_t mpifcmb4r @CMB_1INT_ALIGNMENT@ = {0}; ++mpif_cmblk4_t mpifcmb4r @CMB_1INT_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern mpif_cmblk4_t _CMPIFCMB4 __attribute__ ((alias("mpifcmb4r"))); + extern mpif_cmblk4_t MPIFCMB4 __attribute__ ((alias("mpifcmb4r"))); +@@ -158,7 +158,7 @@ struct mpif_cmblk5_t_ { + }; + typedef struct mpif_cmblk5_t_ mpif_cmblk5_t; + /* *INDENT-OFF* */ +-FORT_DLL_SPEC mpif_cmblk5_t mpifcmb5r @CMB_1INT_ALIGNMENT@ = {0}; ++FORT_DLL_SPEC mpif_cmblk5_t mpifcmb5r @CMB_1INT_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern FORT_DLL_SPEC mpif_cmblk5_t _CMPIFCMB5 __attribute__ ((alias("mpifcmb5r"))); + extern FORT_DLL_SPEC mpif_cmblk5_t MPIFCMB5 __attribute__ ((alias("mpifcmb5r"))); +@@ -172,7 +172,7 @@ struct mpif_cmblk6_t_ { + }; + typedef struct mpif_cmblk6_t_ mpif_cmblk6_t; + /* *INDENT-OFF* */ +-mpif_cmblk6_t mpifcmb6r @CMB_1INT_ALIGNMENT@ = {{0}}; ++mpif_cmblk6_t mpifcmb6r @CMB_1INT_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern mpif_cmblk6_t _CMPIFCMB6 __attribute__ ((alias("mpifcmb6r"))); + extern mpif_cmblk6_t MPIFCMB6 __attribute__ ((alias("mpifcmb6r"))); +@@ -187,7 +187,7 @@ struct mpif_cmblk7_t_ { + }; + typedef struct mpif_cmblk7_t_ mpif_cmblk7_t; + /* *INDENT-OFF* */ +-mpif_cmblk7_t mpifcmb7r @CMB_1INT_ALIGNMENT@ = {{{0}}}; ++mpif_cmblk7_t mpifcmb7r @CMB_1INT_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern mpif_cmblk7_t _CMPIFCMB7 __attribute__ ((alias("mpifcmb7r"))); + extern mpif_cmblk7_t MPIFCMB7 __attribute__ ((alias("mpifcmb7r"))); +@@ -202,7 +202,7 @@ struct mpif_cmblk8_t_ { + }; + typedef struct mpif_cmblk8_t_ mpif_cmblk8_t; + /* *INDENT-OFF* */ +-mpif_cmblk8_t mpifcmb8r @CMB_1INT_ALIGNMENT@ = {{0}}; ++mpif_cmblk8_t mpifcmb8r @CMB_1INT_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern mpif_cmblk8_t _CMPIFCMB8 __attribute__ ((alias("mpifcmb8r"))); + extern mpif_cmblk8_t MPIFCMB8 __attribute__ ((alias("mpifcmb8r"))); +@@ -216,7 +216,7 @@ struct mpif_cmblk9_t_ { + }; + typedef struct mpif_cmblk9_t_ mpif_cmblk9_t; + /* *INDENT-OFF* */ +-FORT_DLL_SPEC mpif_cmblk9_t mpifcmb9r @CMB_1INT_ALIGNMENT@ = {0}; ++FORT_DLL_SPEC mpif_cmblk9_t mpifcmb9r @CMB_1INT_ALIGNMENT@ = {}; + /* *INDENT-ON* */ + extern FORT_DLL_SPEC mpif_cmblk9_t _CMPIFCMB9 __attribute__ ((alias("mpifcmb9r"))); + extern FORT_DLL_SPEC mpif_cmblk9_t MPIFCMB9 __attribute__ ((alias("mpifcmb9r"))); +--- a/src/binding/fortran/use_mpi/create_f90_complex.c ++++ b/src/binding/fortran/use_mpi/create_f90_complex.c +@@ -41,10 +41,6 @@ typedef struct realModel { + MPI_Datatype dtype; + } realModel; + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_f90_complex +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_f90_complex - Return a predefined type that matches + the specified range +@@ -134,12 +130,12 @@ int MPI_Type_create_f90_complex(int precision, int range, MPI_Datatype * newtype + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_f90_complex", + "**mpi_type_create_f90_complex %d %d", precision, range); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/binding/fortran/use_mpi/create_f90_int.c ++++ b/src/binding/fortran/use_mpi/create_f90_int.c +@@ -39,10 +39,6 @@ typedef struct intModel { + int range, kind, bytes; + } intModel; + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_f90_integer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_f90_integer - Return a predefined type that matches + the specified range +@@ -125,12 +121,12 @@ int MPI_Type_create_f90_integer(int range, MPI_Datatype * newtype) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_f90_int", "**mpi_type_create_f90_int %d", + range); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/binding/fortran/use_mpi/create_f90_real.c ++++ b/src/binding/fortran/use_mpi/create_f90_real.c +@@ -40,10 +40,6 @@ typedef struct realModel { + MPI_Datatype dtype; + } realModel; + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_f90_real +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_f90_real - Return a predefined type that matches + the specified range +@@ -132,12 +128,12 @@ int MPI_Type_create_f90_real(int precision, int range, MPI_Datatype * newtype) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_f90_real", "**mpi_type_create_f90_real %d %d", + precision, range); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/binding/fortran/use_mpi/create_f90_util.c ++++ b/src/binding/fortran/use_mpi/create_f90_util.c +@@ -36,10 +36,6 @@ static int MPIR_FreeF90Datatypes(void *d) + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Create_unnamed_predefined +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Create_unnamed_predefined(MPI_Datatype old, int combiner, + int r, int p, MPI_Datatype * new_ptr) + { +@@ -106,9 +102,6 @@ int MPIR_Create_unnamed_predefined(MPI_Datatype old, int combiner, + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- /* FIXME should we be setting type->is_permanent=TRUE here too? If so, +- * will the cleanup code handle it correctly and not freak out? */ +- + #ifndef NDEBUG + { + MPI_Datatype old_basic = MPI_DATATYPE_NULL; +--- a/src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c ++++ b/src/binding/fortran/use_mpi_f08/wrappers_c/comm_spawn_multiple_c.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + #include "cdesc.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_spawn_multiple_c +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_spawn_multiple_c(int count, char *array_of_commands_f, + char *array_of_argv_f, const int *array_of_maxprocs, + const MPI_Info * array_of_info, int root, MPI_Comm comm, +--- a/src/binding/fortran/use_mpi_f08/wrappers_c/utils.c ++++ b/src/binding/fortran/use_mpi_f08/wrappers_c/utils.c +@@ -26,10 +26,6 @@ + + Note: The caller needs to free memory of strs_c + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Fortran_array_of_string_f2c +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + extern int MPIR_Fortran_array_of_string_f2c(const char *strs_f, char ***strs_c, int str_len, + int know_size, int size) + { +--- a/src/env/mpicc.bash.in ++++ b/src/env/mpicc.bash.in +@@ -39,9 +39,20 @@ libdir=__LIBDIR_TO_BE_FILLED_AT_INSTALL_TIME__ + CC="@CC@" + MPICH_VERSION="@MPICH_VERSION@" + +-enable_wrapper_rpath="@enable_wrapper_rpath@" + @cc_shlib_conf@ + ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++with_wrapper_dl_type=@with_wrapper_dl_type@ ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ wrapper_dl_type_flags="" ++fi ++ + # Internal variables + # Show is set to echo to cause the compilation command to be echoed instead + # of executed. +@@ -236,34 +247,14 @@ fi + # file or an object file. Instead, we just check for an option that + # suppressing linking, such as -c or -M. + if [ "$linking" = yes ] ; then +- # Attempt to encode rpath info into the executable if the user has not +- # disabled rpath usage and some flavor of rpath makes sense on this +- # platform. +- # TODO configure and config.rpath are computing more sophisticated rpath +- # schemes than this simple one. Consider updating this logic accordingly. +- if test "X$enable_wrapper_rpath" = "Xyes" ; then +- eval rpath_flags=\"${hardcode_libdir_flag_spec}\" +- else +- rpath_flags="" +- fi +- + if [ "$nativelinking" = yes ] ; then + $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir + rc=$? + else + if [ "$static_mpi" = no ] ; then +- $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} ++ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} + else +- fabric_dep="" +- if [ "@ofi_embedded@" = yes ] ; then +- fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc` +- fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'` +- elif [ -f @with_libfabric@/lib/pkgconfig/libfabric.pc ] ; then +- fabric_dep=`pkg-config --static --libs @with_libfabric@/lib/pkgconfig/libfabric.pc` +- else +- fabric_dep=`pkg-config --static --libs libfabric` +- fi +- $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} ${fabric_dep} ++ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/lib@MPILIBNAME@.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} + fi + rc=$? + fi +--- a/src/env/mpicc.sh.in ++++ b/src/env/mpicc.sh.in +@@ -39,9 +39,20 @@ libdir=__LIBDIR_TO_BE_FILLED_AT_INSTALL_TIME__ + CC="@CC@" + MPICH_VERSION="@MPICH_VERSION@" + +-enable_wrapper_rpath="@enable_wrapper_rpath@" + @cc_shlib_conf@ + ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++with_wrapper_dl_type=@with_wrapper_dl_type@ ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ wrapper_dl_type_flags="" ++fi ++ + # Internal variables + # Show is set to echo to cause the compilation command to be echoed instead + # of executed. +@@ -245,34 +256,14 @@ fi + # file or an object file. Instead, we just check for an option that + # suppressing linking, such as -c or -M. + if [ "$linking" = yes ] ; then +- # Attempt to encode rpath info into the executable if the user has not +- # disabled rpath usage and some flavor of rpath makes sense on this +- # platform. +- # TODO configure and config.rpath are computing more sophisticated rpath +- # schemes than this simple one. Consider updating this logic accordingly. +- if test "X$enable_wrapper_rpath" = "Xyes" ; then +- eval rpath_flags=\"${hardcode_libdir_flag_spec}\" +- else +- rpath_flags="" +- fi +- + if [ "$nativelinking" = yes ] ; then + $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} $allargs -I$includedir + rc=$? + else + if [ "$static_mpi" = no ] ; then +- $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} ++ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} + else +- fabric_dep="" +- if [ "@ofi_embedded@" = yes ] ; then +- fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc` +- fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'` +- elif [ -f @with_libfabric@/lib/pkgconfig/libfabric.pc ] ; then +- fabric_dep=`pkg-config --static --libs @with_libfabric@/lib/pkgconfig/libfabric.pc` +- else +- fabric_dep=`pkg-config --static --libs libfabric` +- fi +- $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} ${fabric_dep} ++ $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/lib@MPILIBNAME@.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} + fi + rc=$? + fi +--- a/src/env/mpicxx.bash.in ++++ b/src/env/mpicxx.bash.in +@@ -36,9 +36,20 @@ libdir=__LIBDIR_TO_BE_FILLED_AT_INSTALL_TIME__ + CXX="@CXX@" + MPICH_VERSION="@MPICH_VERSION@" + +-enable_wrapper_rpath="@enable_wrapper_rpath@" + @cxx_shlib_conf@ + ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++with_wrapper_dl_type=@with_wrapper_dl_type@ ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ wrapper_dl_type_flags="" ++fi ++ + # Internal variables + # Show is set to echo to cause the compilation command to be echoed instead + # of executed. +@@ -234,34 +245,14 @@ fi + # Eventually, we'll want to move this after any non-MPI implementation + # libraries + if [ "$linking" = yes ] ; then +- # Attempt to encode rpath info into the executable if the user has not +- # disabled rpath usage and some flavor of rpath makes sense on this +- # platform. +- # TODO configure and config.rpath are computing more sophisticated rpath +- # schemes than this simple one. Consider updating this logic accordingly. +- if test "X$enable_wrapper_rpath" = "Xyes" ; then +- eval rpath_flags=\"${hardcode_libdir_flag_spec}\" +- else +- rpath_flags="" +- fi +- + if [ "$nativelinking" = yes ] ; then + $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir + rc=$? + else + if [ "$static_mpi" = no ] ; then +- $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} ++ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} + else +- fabric_dep="" +- if [ "@ofi_embedded@" = yes ] ; then +- fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc` +- fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'` +- elif [ -f @with_libfabric@/lib/pkgconfig/libfabric.pc ] ; then +- fabric_dep=`pkg-config --static --libs @with_libfabric@/lib/pkgconfig/libfabric.pc` +- else +- fabric_dep=`pkg-config --static --libs libfabric` +- fi +- $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} ${fabric_dep} ++ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/lib@MPILIBNAME@.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} + fi + rc=$? + fi +--- a/src/env/mpicxx.sh.in ++++ b/src/env/mpicxx.sh.in +@@ -36,9 +36,20 @@ libdir=__LIBDIR_TO_BE_FILLED_AT_INSTALL_TIME__ + CXX="@CXX@" + MPICH_VERSION="@MPICH_VERSION@" + +-enable_wrapper_rpath="@enable_wrapper_rpath@" + @cxx_shlib_conf@ + ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++with_wrapper_dl_type=@with_wrapper_dl_type@ ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ wrapper_dl_type_flags="" ++fi ++ + # Internal variables + # Show is set to echo to cause the compilation command to be echoed instead + # of executed. +@@ -243,34 +254,14 @@ fi + # Eventually, we'll want to move this after any non-MPI implementation + # libraries + if [ "$linking" = yes ] ; then +- # Attempt to encode rpath info into the executable if the user has not +- # disabled rpath usage and some flavor of rpath makes sense on this +- # platform. +- # TODO configure and config.rpath are computing more sophisticated rpath +- # schemes than this simple one. Consider updating this logic accordingly. +- if test "X$enable_wrapper_rpath" = "Xyes" ; then +- eval rpath_flags=\"${hardcode_libdir_flag_spec}\" +- else +- rpath_flags="" +- fi +- + if [ "$nativelinking" = yes ] ; then + $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} $allargs -I$includedir + rc=$? + else + if [ "$static_mpi" = no ] ; then +- $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} ++ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} + else +- fabric_dep="" +- if [ "@ofi_embedded@" = yes ] ; then +- fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc` +- fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'` +- elif [ -f @with_libfabric@/lib/pkgconfig/libfabric.pc ] ; then +- fabric_dep=`pkg-config --static --libs @with_libfabric@/lib/pkgconfig/libfabric.pc` +- else +- fabric_dep=`pkg-config --static --libs libfabric` +- fi +- $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} ${fabric_dep} ++ $Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/lib@MPILIBNAME@.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} + fi + rc=$? + fi +--- a/src/env/mpif77.bash.in ++++ b/src/env/mpif77.bash.in +@@ -42,9 +42,20 @@ F77="@F77@" + F77CPP="@F77CPP@" + MPICH_VERSION="@MPICH_VERSION@" + +-enable_wrapper_rpath="@enable_wrapper_rpath@" + @f77_shlib_conf@ + ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++with_wrapper_dl_type=@with_wrapper_dl_type@ ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ wrapper_dl_type_flags="" ++fi ++ + # Internal variables + # Show is set to echo to cause the compilation command to be echoed instead + # of executed. +@@ -286,34 +297,14 @@ fi + # libraries + # + if [ "$linking" = yes ] ; then +- # Attempt to encode rpath info into the executable if the user has not +- # disabled rpath usage and some flavor of rpath makes sense on this +- # platform. +- # TODO configure and config.rpath are computing more sophisticated rpath +- # schemes than this simple one. Consider updating this logic accordingly. +- if test "X$enable_wrapper_rpath" = "Xyes" ; then +- eval rpath_flags=\"${hardcode_libdir_flag_spec}\" +- else +- rpath_flags="" +- fi +- + if [ "$nativelinking" = yes ] ; then + $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir + rc=$? + else + if [ "$static_mpi" = no ] ; then +- $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@ ++ $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@ + else +- fabric_dep="" +- if [ "@ofi_embedded@" = yes ] ; then +- fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc` +- fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'` +- elif [ -f @with_libfabric@/lib/pkgconfig/libfabric.pc ] ; then +- fabric_dep=`pkg-config --static --libs @with_libfabric@/lib/pkgconfig/libfabric.pc` +- else +- fabric_dep=`pkg-config --static --libs libfabric` +- fi +- $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@ ${fabric_dep} ++ $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/lib@MPILIBNAME@.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@ + fi + rc=$? + fi +--- a/src/env/mpif77.sh.in ++++ b/src/env/mpif77.sh.in +@@ -42,9 +42,20 @@ F77="@F77@" + F77CPP="@F77CPP@" + MPICH_VERSION="@MPICH_VERSION@" + +-enable_wrapper_rpath="@enable_wrapper_rpath@" + @f77_shlib_conf@ + ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++with_wrapper_dl_type=@with_wrapper_dl_type@ ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ wrapper_dl_type_flags="" ++fi ++ + # Internal variables + # Show is set to echo to cause the compilation command to be echoed instead + # of executed. +@@ -308,34 +319,14 @@ fi + # libraries + # + if [ "$linking" = yes ] ; then +- # Attempt to encode rpath info into the executable if the user has not +- # disabled rpath usage and some flavor of rpath makes sense on this +- # platform. +- # TODO configure and config.rpath are computing more sophisticated rpath +- # schemes than this simple one. Consider updating this logic accordingly. +- if test "X$enable_wrapper_rpath" = "Xyes" ; then +- eval rpath_flags=\"${hardcode_libdir_flag_spec}\" +- else +- rpath_flags="" +- fi +- + if [ "$nativelinking" = yes ] ; then + $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} $allargs -I$includedir + rc=$? + else + if [ "$static_mpi" = no ] ; then +- $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@ ++ $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@ + else +- fabric_dep="" +- if [ "@ofi_embedded@" = yes ] ; then +- fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc` +- fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'` +- elif [ -f @with_libfabric@/lib/pkgconfig/libfabric.pc ] ; then +- fabric_dep=`pkg-config --static --libs @with_libfabric@/lib/pkgconfig/libfabric.pc` +- else +- fabric_dep=`pkg-config --static --libs libfabric` +- fi +- $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@ ${fabric_dep} ++ $Show $F77 $PROFILE_INCPATHS ${final_fflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $f77libs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/lib@MPILIBNAME@.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @F77_OTHER_LIBS@ + fi + rc=$? + fi +--- a/src/env/mpifort.bash.in ++++ b/src/env/mpifort.bash.in +@@ -55,9 +55,20 @@ FCEXT="@FCEXT@" + + MPICH_VERSION="@MPICH_VERSION@" + +-enable_wrapper_rpath="@enable_wrapper_rpath@" + @fc_shlib_conf@ + ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++with_wrapper_dl_type=@with_wrapper_dl_type@ ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ wrapper_dl_type_flags="" ++fi ++ + # Internal variables + # Show is set to echo to cause the compilation command to be echoed instead + # of executed. +@@ -326,35 +337,14 @@ fi + # Eventually, we'll want to move this after any non-MPI implementation + # libraries + if [ "$linking" = yes ] ; then +- # Attempt to encode rpath info into the executable if the user has not +- # disabled rpath usage and some flavor of rpath makes sense on this +- # platform. +- # TODO configure and config.rpath are computing more sophisticated rpath +- # schemes than this simple one. Consider updating this logic accordingly. +- if test "X$enable_wrapper_rpath" = "Xyes" ; then +- # prepend the path for the shared libraries to the library list +- eval rpath_flags=\"${hardcode_libdir_flag_spec}\" +- else +- rpath_flags="" +- fi +- + if [ "$nativelinking" = yes ] ; then + $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" + rc=$? + else + if [ "$static_mpi" = no ] ; then +- $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@ ++ $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@ + else +- fabric_dep="" +- if [ "@ofi_embedded@" = yes ] ; then +- fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc` +- fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'` +- elif [ -f @with_libfabric@/lib/pkgconfig/libfabric.pc ] ; then +- fabric_dep=`pkg-config --static --libs @with_libfabric@/lib/pkgconfig/libfabric.pc` +- else +- fabric_dep=`pkg-config --static --libs libfabric` +- fi +- $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@ ${fabric_dep} ++ $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/lib@MPILIBNAME@.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@ + fi + rc=$? + fi +--- a/src/env/mpifort.sh.in ++++ b/src/env/mpifort.sh.in +@@ -55,9 +55,20 @@ FCEXT="@FCEXT@" + # + MPICH_VERSION="@MPICH_VERSION@" + +-enable_wrapper_rpath="@enable_wrapper_rpath@" + @fc_shlib_conf@ + ++# Attempt to construct dynamic loading info, based on the user ++# preference of rpath, runpath or none and on the detected libdir ++# flags. ++with_wrapper_dl_type=@with_wrapper_dl_type@ ++if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\" ++elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then ++ eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\" ++else ++ wrapper_dl_type_flags="" ++fi ++ + # Internal variables + # Show is set to echo to cause the compilation command to be echoed instead + # of executed. +@@ -343,34 +354,14 @@ fi + # Eventually, we'll want to move this after any non-MPI implementation + # libraries + if [ "$linking" = yes ] ; then +- # Attempt to encode rpath info into the executable if the user has not +- # disabled rpath usage and some flavor of rpath makes sense on this +- # platform. +- # TODO configure and config.rpath are computing more sophisticated rpath +- # schemes than this simple one. Consider updating this logic accordingly. +- if test "X$enable_wrapper_rpath" = "Xyes" ; then +- eval rpath_flags=\"${hardcode_libdir_flag_spec}\" +- else +- rpath_flags="" +- fi +- + if [ "$nativelinking" = yes ] ; then + $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} $allargs + rc=$? + else + if [ "$static_mpi" = no ] ; then +- $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@ ++ $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} -l@MPILIBNAME@ @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@ + else +- fabric_dep="" +- if [ "@ofi_embedded@" = yes ] ; then +- fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc` +- fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'` +- elif [ -f @with_libfabric@/lib/pkgconfig/libfabric.pc ] ; then +- fabric_dep=`pkg-config --static --libs @with_libfabric@/lib/pkgconfig/libfabric.pc` +- else +- fabric_dep=`pkg-config --static --libs libfabric` +- fi +- $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@ ${fabric_dep} ++ $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -l@MPIFCLIBNAME@ $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} $libdir/lib@MPILIBNAME@.a @LPMPILIBNAME@ $PROFILE_POSTLIB ${final_libs} @FC_OTHER_LIBS@ + fi + rc=$? + fi +--- a/src/glue/romio/glue_romio.c ++++ b/src/glue/romio/glue_romio.c +@@ -71,10 +71,6 @@ void MPIR_Ext_cs_yield(void) + } + + /* will consider MPI_DATATYPE_NULL to be an error */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ext_datatype_iscommitted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ext_datatype_iscommitted(MPI_Datatype datatype) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/include/mpi.h.in ++++ b/src/include/mpi.h.in +@@ -257,6 +257,8 @@ static const MPI_Datatype mpich_mpi_uint64_t MPICH_ATTR_TYPE_TAG_STDINT(uint64_t + #define MPI_C_COMPLEX MPI_C_FLOAT_COMPLEX + #define MPI_C_DOUBLE_COMPLEX ((MPI_Datatype)@MPI_C_DOUBLE_COMPLEX@) + #define MPI_C_LONG_DOUBLE_COMPLEX ((MPI_Datatype)@MPI_C_LONG_DOUBLE_COMPLEX@) ++/* other extension types */ ++#define MPIX_C_FLOAT16 ((MPI_Datatype)@MPIX_C_FLOAT16@) + + #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES + static const MPI_Datatype mpich_mpi_c_bool MPICH_ATTR_TYPE_TAG_C99(_Bool) = MPI_C_BOOL; +@@ -2260,15 +2262,6 @@ int MPIX_Grequest_start(MPI_Grequest_query_function *query_fn, + MPIX_Grequest_wait_function *wait_fn, void *extra_state, + MPI_Request *request) MPICH_API_PUBLIC; + +-/* RMA Mutexes Extensions */ +-struct mpixi_mutex_s; +-typedef struct mpixi_mutex_s * MPIX_Mutex; +-int MPIX_Mutex_create(int count, MPI_Comm comm, MPIX_Mutex *hdl) MPICH_API_PUBLIC; +-int MPIX_Mutex_free(MPIX_Mutex *hdl) MPICH_API_PUBLIC; +-int MPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc) MPICH_API_PUBLIC; +-int MPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc) MPICH_API_PUBLIC; +- +- + #if !defined(MPI_BUILD_PROFILING) + /* Generalized requests extensions */ + int PMPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn, +@@ -2285,12 +2278,6 @@ int PMPIX_Grequest_start(MPI_Grequest_query_function *query_fn, + MPIX_Grequest_poll_function *poll_fn, + MPIX_Grequest_wait_function *wait_fn, void *extra_state, + MPI_Request *request) MPICH_API_PUBLIC; +- +-/* RMA Mutexes Extensions */ +-int PMPIX_Mutex_create(int count, MPI_Comm comm, MPIX_Mutex *hdl) MPICH_API_PUBLIC; +-int PMPIX_Mutex_free(MPIX_Mutex *hdl) MPICH_API_PUBLIC; +-int PMPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc) MPICH_API_PUBLIC; +-int PMPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc) MPICH_API_PUBLIC; + #endif /* MPI_BUILD_PROFILING */ + + #endif +--- a/src/include/mpichconfconst.h ++++ b/src/include/mpichconfconst.h +@@ -34,7 +34,7 @@ + #define MPICH_THREAD_GRANULARITY__LOCKFREE 3 + /* _SINGLE is the "null" granularity, where all processes are single-threaded */ + #define MPICH_THREAD_GRANULARITY__SINGLE 4 +-#define MPICH_THREAD_GRANULARITY__VNI 5 ++#define MPICH_THREAD_GRANULARITY__VCI 5 + + /* _NONE means no concurrency control, such as when using MPI_THREAD_SINGLE */ + #define MPICH_REFCOUNT__NONE 1 +--- a/src/include/mpiimpl.h ++++ b/src/include/mpiimpl.h +@@ -97,6 +97,10 @@ int usleep(useconds_t usec); + int vsnprintf(char *str, size_t size, const char *format, va_list ap); + #endif + ++/* Just in case __func__ is not supported won't break code */ ++#ifndef HAVE__FUNC__ ++#define __func__ "__func__" ++#endif + + /***************************************************************************** + * We use the following ordering of information in this file: +@@ -222,7 +226,7 @@ typedef struct MPIR_Topology MPIR_Topology; + #include "mpir_err.h" + #include "mpir_nbc.h" + #include "mpir_process.h" +-#include "mpir_dataloop.h" ++#include "mpir_typerep.h" + #include "mpir_datatype.h" + #include "mpir_cvars.h" + #include "mpir_misc_post.h" +@@ -235,8 +239,6 @@ typedef struct MPIR_Topology MPIR_Topology; + + #include "mpidpost.h" + +-/* avoid conflicts in source files with old-style "char FCNAME[]" vars */ +-#undef FUNCNAME +-#undef FCNAME ++/* avoid conflicts in source files with old-style "char __func__[]" vars */ + + #endif /* MPIIMPL_H_INCLUDED */ +--- a/src/include/mpir_assert.h ++++ b/src/include/mpir_assert.h +@@ -14,15 +14,6 @@ + #if __has_extension(c_generic_selections) + #define HAVE_C11__GENERIC 1 + #endif +-#if __has_extension(c_static_assert) +-#define HAVE_C11__STATIC_ASSERT 1 +-#endif +-#endif +- +-/* GCC 4.6 added support for _Static_assert: +- * http://gcc.gnu.org/gcc-4.6/changes.html */ +-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined __cplusplus +-#define HAVE_C11__STATIC_ASSERT 1 + #endif + + /* prototypes for assertion implementation helpers */ +--- a/src/include/mpir_coll.h ++++ b/src/include/mpir_coll.h +@@ -445,15 +445,18 @@ int MPIR_Iallgather_sched_intra_recursive_doubling(const void *sendbuf, int send + int MPIR_Iallgather_sched_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s); +-int MPIR_Iallgather_intra_recexch_distance_doubling(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Request ** req); +-int MPIR_Iallgather_intra_recexch_distance_halving(const void *sendbuf, int sendcount, ++int MPIR_Iallgather_intra_gentran_recexch_doubling(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Request ** req); +- ++int MPIR_Iallgather_intra_gentran_recexch_halving(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req); ++int MPIR_Iallgather_intra_gentran_ring(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req); + /* sched-based intercomm-only functions */ + int MPIR_Iallgather_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -472,6 +475,10 @@ int MPIR_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + int MPIR_Iallgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Iallgatherv_intra_gentran_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Iallgatherv_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, +@@ -497,16 +504,16 @@ int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sen + int MPIR_Iallgatherv_sched_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s); +-int MPIR_Iallgatherv_intra_recexch_distance_doubling(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Request ** req); +-int MPIR_Iallgatherv_intra_recexch_distance_halving(const void *sendbuf, int sendcount, ++int MPIR_Iallgatherv_intra_gentran_recexch_doubling(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm, + MPIR_Request ** req); ++int MPIR_Iallgatherv_intra_gentran_recexch_halving(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, const int *displs, ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_Request ** req); + int MPIR_Iallgatherv_intra_gentran_ring(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -551,18 +558,16 @@ int MPIR_Iallreduce_sched_intra_reduce_scatter_allgather(const void *sendbuf, vo + int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s); +-int MPIR_Iallreduce_intra_recexch_single_buffer(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, +- MPIR_Comm * comm, MPIR_Request ** req); +-int MPIR_Iallreduce_intra_recexch_multiple_buffer(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, +- MPIR_Comm * comm, MPIR_Request ** req); +-int MPIR_Iallreduce_intra_tree_kary(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Request ** request); +-int MPIR_Iallreduce_intra_tree_knomial(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, +- MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Iallreduce_intra_gentran_recexch_single_buffer(const void *sendbuf, void *recvbuf, ++ int count, MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_Request ** req); ++int MPIR_Iallreduce_intra_gentran_recexch_multiple_buffer(const void *sendbuf, void *recvbuf, ++ int count, MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm, ++ MPIR_Request ** req); ++int MPIR_Iallreduce_intra_gentran_tree(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request); + int MPIR_Iallreduce_sched_intra_smp(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s); +@@ -585,6 +590,12 @@ int MPIR_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, vo + int MPIR_Ialltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, + MPIR_Request ** request); ++int MPIR_Ialltoall_intra_gentran_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Ialltoall_intra_gentran_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Ialltoall_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, +@@ -657,6 +668,11 @@ int MPIR_Ialltoallv_sched_intra_inplace(const void *sendbuf, const int sendcount + const int recvcounts[], const int rdispls[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, + MPIR_Sched_t s); ++int MPIR_Ialltoallv_intra_gentran_scattered(const void *sendbuf, const int sendcnts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcnts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based intercomm-only functions */ + int MPIR_Ialltoallv_sched_inter_auto(const void *sendbuf, const int *sendcounts, const int *sdispls, +@@ -734,7 +750,7 @@ int MPIR_Ibarrier_sched_impl(MPIR_Comm * comm_ptr, MPIR_Sched_t s); + /* sched-based intracomm-only functions */ + int MPIR_Ibarrier_sched_intra_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s); + int MPIR_Ibarrier_sched_intra_recursive_doubling(MPIR_Comm * comm_ptr, MPIR_Sched_t s); +-int MPIR_Ibarrier_intra_recexch(MPIR_Comm * comm, MPIR_Request ** req); ++int MPIR_Ibarrier_intra_gentran_recexch(MPIR_Comm * comm, MPIR_Request ** req); + + /* sched-based intercomm-only functions */ + int MPIR_Ibarrier_sched_inter_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s); +@@ -747,13 +763,14 @@ int MPIR_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_C + MPIR_Request ** request); + int MPIR_Ibcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, + MPIR_Request ** request); +-int MPIR_Ibcast_intra_tree(void *buffer, int count, MPI_Datatype datatype, int root, +- MPIR_Comm * comm_ptr, MPIR_Request ** request); +-int MPIR_Ibcast_intra_scatter_recexch_allgather(void *buffer, int count, MPI_Datatype datatype, +- int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** request); +-int MPIR_Ibcast_intra_ring(void *buffer, int count, MPI_Datatype datatype, int root, +- MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Ibcast_intra_gentran_tree(void *buffer, int count, MPI_Datatype datatype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Ibcast_intra_gentran_scatter_recexch_allgather(void *buffer, int count, ++ MPI_Datatype datatype, int root, ++ MPIR_Comm * comm_ptr, ++ MPIR_Request ** request); ++int MPIR_Ibcast_intra_gentran_ring(void *buffer, int count, MPI_Datatype datatype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Ibcast_sched(void *buffer, int count, MPI_Datatype datatype, int root, +@@ -812,9 +829,9 @@ int MPIR_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void + int MPIR_Igather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, + MPIR_Request ** request); +-int MPIR_Igather_intra_tree(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, +- MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Igather_intra_gentran_tree(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Igather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, +@@ -888,6 +905,10 @@ int MPIR_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype se + int MPIR_Ineighbor_allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Ineighbor_allgather_allcomm_gentran_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Ineighbor_allgather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +@@ -925,6 +946,11 @@ int MPIR_Ineighbor_allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datat + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, + MPIR_Request ** request); ++int MPIR_Ineighbor_allgatherv_allcomm_gentran_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Ineighbor_allgatherv_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +@@ -965,6 +991,10 @@ int MPIR_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sen + int MPIR_Ineighbor_alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Ineighbor_alltoall_allcomm_gentran_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Ineighbor_alltoall_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +@@ -1003,6 +1033,11 @@ int MPIR_Ineighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], c + MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr, + MPIR_Request ** request); ++int MPIR_Ineighbor_alltoallv_allcomm_gentran_linear(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Ineighbor_alltoallv_sched(const void *sendbuf, const int sendcounts[], const int sdispls[], +@@ -1048,6 +1083,13 @@ int MPIR_Ineighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], + void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], + const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr, + MPIR_Request ** request); ++int MPIR_Ineighbor_alltoallw_allcomm_gentran_linear(const void *sendbuf, const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], void *recvbuf, ++ const int recvcounts[], ++ const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Ineighbor_alltoallw_sched(const void *sendbuf, const int sendcounts[], +@@ -1092,12 +1134,12 @@ int MPIR_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dat + int root, MPIR_Comm * comm_ptr, MPIR_Request ** request); + int MPIR_Ireduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Request ** request); +-int MPIR_Ireduce_intra_tree(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** request); +-int MPIR_Ireduce_intra_ring(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, +- MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Ireduce_intra_gentran_tree(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Ireduce_intra_gentran_ring(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Ireduce_sched(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, +@@ -1164,9 +1206,9 @@ int MPIR_Ireduce_scatter_sched_intra_recursive_halving(const void *sendbuf, void + const int *recvcnts, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s); +-int MPIR_Ireduce_scatter_intra_recexch(const void *sendbuf, void *recvbuf, +- const int *recvcounts, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm, MPIR_Request ** req); ++int MPIR_Ireduce_scatter_intra_gentran_recexch(const void *sendbuf, void *recvbuf, ++ const int *recvcounts, MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm, MPIR_Request ** req); + + /* sched-based intercomm-only functions */ + int MPIR_Ireduce_scatter_sched_inter_auto(const void *sendbuf, void *recvbuf, const int *recvcnts, +@@ -1188,9 +1230,10 @@ int MPIR_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount + int MPIR_Ireduce_scatter_block_impl(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Request ** request); +-int MPIR_Ireduce_scatter_block_intra_recexch(const void *sendbuf, void *recvbuf, +- int recvcount, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm, MPIR_Request ** req); ++int MPIR_Ireduce_scatter_block_intra_gentran_recexch(const void *sendbuf, void *recvbuf, ++ int recvcount, MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm, ++ MPIR_Request ** req); + + /* sched-based functions */ + int MPIR_Ireduce_scatter_block_sched(const void *sendbuf, void *recvbuf, int recvcount, +@@ -1255,6 +1298,9 @@ int MPIR_Iscan_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf + MPIR_Comm * comm_ptr, MPIR_Sched_t s); + int MPIR_Iscan_sched_intra_smp(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s); ++int MPIR_Iscan_intra_gentran_recursive_doubling(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req); + + + /******************************** Iscatter ********************************/ +@@ -1265,9 +1311,9 @@ int MPIR_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, voi + int MPIR_Iscatter_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, + MPIR_Request ** request); +-int MPIR_Iscatter_intra_tree(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, +- MPIR_Comm * comm_ptr, MPIR_Request ** request); ++int MPIR_Iscatter_intra_gentran_tree(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request); + + /* sched-based functions */ + int MPIR_Iscatter_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, +--- a/src/include/mpir_comm.h ++++ b/src/include/mpir_comm.h +@@ -207,10 +207,6 @@ int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr); + This routine has been inlined because keeping it as a separate routine + results in a >5% performance hit for the SQMR benchmark. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_release +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIR_Comm_release(MPIR_Comm * comm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -228,8 +224,6 @@ static inline int MPIR_Comm_release(MPIR_Comm * comm_ptr) + return mpi_errno; + } + +-#undef FUNCNAME +-#undef FCNAME + + /* MPIR_Comm_release_always is the same as MPIR_Comm_release except it uses + MPIR_Comm_release_ref_always instead. +deleted file mode 100644 +--- a/src/include/mpir_dataloop.h ++++ /dev/null +@@ -1,589 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#ifndef MPIR_DATALOOP_H_INCLUDED +-#define MPIR_DATALOOP_H_INCLUDED +- +-#include +- +-/* +- * The following macro allows us to reference the regular +- * value for the 3 fields (NULL,_size,_depth) in the +- * MPIR_Datatype structure. This is used in the many +- * macros that access fields of the datatype. We need this macro +- * to simplify the definition of the other macros. +- */ +-#define MPIR_DATALOOP_GET_FIELD(value_,fieldname_) \ +- value_ = ((MPIR_Datatype *)ptr)->dataloop##fieldname_ +- +-#define MPIR_DATALOOP_SET_FIELD(value_,fieldname_) \ +- ((MPIR_Datatype *)ptr)->dataloop##fieldname_ = value_ +- +-/* These following dataloop-specific types will be used throughout the DLOOP +- * instance: +- */ +-#define DLOOP_Offset MPI_Aint +-#define DLOOP_Count MPI_Aint +-#define DLOOP_Handle MPI_Datatype +-#define DLOOP_Type MPI_Datatype +-#define DLOOP_Buffer void * +-#define DLOOP_VECTOR MPL_IOV +-#define DLOOP_VECTOR_LEN MPL_IOV_LEN +-#define DLOOP_VECTOR_BUF MPL_IOV_BUF +-#define DLOOP_Size MPI_Aint +- +-/* The following accessor functions must also be defined: +- * +- * DLOOP_Handle_extent() +- * DLOOP_Handle_size() +- * DLOOP_Handle_loopptr() +- * DLOOP_Handle_loopdepth() +- * DLOOP_Handle_hasloop() +- * +- */ +- +-/* USE THE NOTATION THAT BILL USED IN MPIIMPL.H AND MAKE THESE MACROS */ +- +-/* NOTE: put get size into mpiimpl.h; the others go here until such time +- * as we see that we need them elsewhere. +- */ +-#define DLOOP_Handle_get_loopdepth_macro(handle_,depth_) \ +- MPIR_Datatype_get_loopdepth_macro(handle_,depth_) +- +-#define DLOOP_Handle_get_loopsize_macro(handle_,size_) \ +- MPIR_Datatype_get_loopsize_macro(handle_,size_) +- +-#define DLOOP_Handle_get_loopptr_macro(handle_,lptr_) \ +- MPIR_Datatype_get_loopptr_macro(handle_,lptr_) +- +-#define DLOOP_Handle_set_loopptr_macro(handle_,lptr_) \ +- MPIR_Datatype_set_loopptr_macro(handle_,lptr_) +- +-#define DLOOP_Handle_set_loopdepth_macro(handle_,depth_) \ +- MPIR_Datatype_set_loopdepth_macro(handle_,depth_) +- +-#define DLOOP_Handle_set_loopsize_macro(handle_,size_) \ +- MPIR_Datatype_set_loopsize_macro(handle_,size_) +- +-#define DLOOP_Handle_get_size_macro(handle_,size_) \ +- MPIR_Datatype_get_size_macro(handle_,size_) +- +-#define DLOOP_Handle_get_basic_type_macro(handle_,basic_type_) \ +- MPIR_Datatype_get_basic_type(handle_, basic_type_) +- +-#define DLOOP_Handle_get_extent_macro(handle_,extent_) \ +- MPIR_Datatype_get_extent_macro(handle_,extent_) +- +-#define DLOOP_Handle_hasloop_macro(handle_) \ +- ((HANDLE_GET_KIND(handle_) == HANDLE_KIND_BUILTIN) ? 0 : 1) +- +-#define DLOOP_Ensure_Offset_fits_in_pointer(value_) \ +- MPIR_Ensure_Aint_fits_in_pointer(value_) +- +-/* allocate and free functions must also be defined. */ +-#define DLOOP_Malloc MPL_malloc +-#define DLOOP_Free MPL_free +- +-/* assert function */ +-#define DLOOP_Assert MPIR_Assert +- +-/* memory copy function */ +-#define DLOOP_Memcpy MPIR_Memcpy +- +-/* casting macros */ +-#define DLOOP_OFFSET_CAST_TO_VOID_PTR MPIR_AINT_CAST_TO_VOID_PTR +-#define DLOOP_VOID_PTR_CAST_TO_OFFSET MPIR_VOID_PTR_CAST_TO_MPI_AINT +-#define DLOOP_PTR_DISP_CAST_TO_OFFSET MPIR_PTR_DISP_CAST_TO_MPI_AINT +- +-/* printing macros */ +-#define DLOOP_OFFSET_FMT_DEC_SPEC MPI_AINT_FMT_DEC_SPEC +-#define DLOOP_OFFSET_FMT_HEX_SPEC MPI_AINT_FMT_HEX_SPEC +- +-/* Redefine all of the internal structures in terms of the prefix */ +-#define DLOOP_Dataloop MPIR_Dataloop +-#define DLOOP_Dataloop_contig MPIR_Dataloop_contig +-#define DLOOP_Dataloop_vector MPIR_Dataloop_vector +-#define DLOOP_Dataloop_blockindexed MPIR_Dataloop_blockindexed +-#define DLOOP_Dataloop_indexed MPIR_Dataloop_indexed +-#define DLOOP_Dataloop_struct MPIR_Dataloop_struct +-#define DLOOP_Dataloop_common MPIR_Dataloop_common +-#define DLOOP_Segment MPIR_Segment +-#define DLOOP_Dataloop_stackelm MPIR_Dataloop_stackelm +- +-/* These flags are used at creation time to specify what types of +- * optimizations may be applied. +- */ +-#define DLOOP_DATALOOP_DEFAULT 0 +-#define DLOOP_DATALOOP_ALL_BYTES 1 +- +-/* NOTE: ASSUMING LAST TYPE IS SIGNED */ +-#define SEGMENT_IGNORE_LAST ((DLOOP_Offset) -1) +-/* +- * Each of the MPI datatypes can be mapped into one of 5 very simple +- * loops. This loop has the following parameters: +- * - count +- * - blocksize[] +- * - offset[] +- * - stride +- * - datatype[] +- * +- * where each [] indicates that a field may be *either* an array or a scalar. +- * For each such type, we define a struct that describes these parameters +- */ +- +-/*S +- DLOOP_Dataloop_contig - Description of a contiguous dataloop +- +- Fields: +-+ count - Number of elements +-- dataloop - Dataloop of the elements +- +- Module: +- Datatype +- S*/ +-typedef struct DLOOP_Dataloop_contig { +- DLOOP_Count count; +- struct DLOOP_Dataloop *dataloop; +-} DLOOP_Dataloop_contig; +- +-/*S +- DLOOP_Dataloop_vector - Description of a vector or strided dataloop +- +- Fields: +-+ count - Number of elements +-. blocksize - Number of dataloops in each element +-. stride - Stride (in bytes) between each block +-- dataloop - Dataloop of each element +- +- Module: +- Datatype +- S*/ +-typedef struct DLOOP_Dataloop_vector { +- DLOOP_Count count; +- struct DLOOP_Dataloop *dataloop; +- DLOOP_Count blocksize; +- DLOOP_Offset stride; +-} DLOOP_Dataloop_vector; +- +-/*S +- DLOOP_Dataloop_blockindexed - Description of a block-indexed dataloop +- +- Fields: +-+ count - Number of blocks +-. blocksize - Number of elements in each block +-. offset_array - Array of offsets (in bytes) to each block +-- dataloop - Dataloop of each element +- +- Module: +- Datatype +- +- S*/ +-typedef struct DLOOP_Dataloop_blockindexed { +- DLOOP_Count count; +- struct DLOOP_Dataloop *dataloop; +- DLOOP_Count blocksize; +- DLOOP_Offset *offset_array; +-} DLOOP_Dataloop_blockindexed; +- +-/*S +- DLOOP_Dataloop_indexed - Description of an indexed dataloop +- +- Fields: +-+ count - Number of blocks +-. blocksize_array - Array giving the number of elements in each block +-. offset_array - Array of offsets (in bytes) to each block +-. total_blocks - count of total blocks in the array (cached value) +-- dataloop - Dataloop of each element +- +- Module: +- Datatype +- +- S*/ +-typedef struct DLOOP_Dataloop_indexed { +- DLOOP_Count count; +- struct DLOOP_Dataloop *dataloop; +- DLOOP_Count *blocksize_array; +- DLOOP_Offset *offset_array; +- DLOOP_Count total_blocks; +-} DLOOP_Dataloop_indexed; +- +-/*S +- DLOOP_Dataloop_struct - Description of a structure dataloop +- +- Fields: +-+ count - Number of blocks +-. blocksize_array - Array giving the number of elements in each block +-. offset_array - Array of offsets (in bytes) to each block +-- dataloop_array - Array of dataloops describing the elements of each block +- +- Module: +- Datatype +- +- S*/ +-typedef struct DLOOP_Dataloop_struct { +- DLOOP_Count count; +- struct DLOOP_Dataloop **dataloop_array; +- DLOOP_Count *blocksize_array; +- DLOOP_Offset *offset_array; +- DLOOP_Offset *el_extent_array; /* need more than one */ +-} DLOOP_Dataloop_struct; +- +-/* In many cases, we need the count and the next dataloop item. This +- common structure gives a quick access to both. Note that all other +- structures must use the same ordering of elements. +- Question: should we put the pointer first in case +- sizeof(pointer)>sizeof(int) ? +-*/ +-typedef struct DLOOP_Dataloop_common { +- DLOOP_Count count; +- struct DLOOP_Dataloop *dataloop; +-} DLOOP_Dataloop_common; +- +-/*S +- DLOOP_Dataloop - Description of the structure used to hold a dataloop +- description +- +- Fields: +-+ kind - Describes the type of the dataloop. This is divided into three +- separate bit fields\: +-.vb +- Dataloop type (e.g., DLOOP_CONTIG etc.). 3 bits +- IsFinal (a "leaf" dataloop; see text) 1 bit +- Element Size (units for fields.) 2 bits +- Element size has 4 values +- 0 - Elements are in units of bytes +- 1 - Elements are in units of 2 bytes +- 2 - Elements are in units of 4 bytes +- 3 - Elements are in units of 8 bytes +-.ve +- The dataloop type is one of 'DLOOP_CONTIG', 'DLOOP_VECTOR', +- 'DLOOP_BLOCKINDEXED', 'DLOOP_INDEXED', or 'DLOOP_STRUCT'. +-. loop_parms - A union containing the 5 dataloop structures, e.g., +- 'DLOOP_Dataloop_contig', 'DLOOP_Dataloop_vector', etc. A sixth element in +- this union, 'count', allows quick access to the shared 'count' field in the +- five dataloop structure. +-. extent - The extent of the dataloop +- +- Module: +- Datatype +- +- S*/ +-typedef struct DLOOP_Dataloop { +- int kind; /* Contains both the loop type +- * (contig, vector, blockindexed, indexed, +- * or struct) and a bit that indicates +- * whether the dataloop is a leaf type. */ +- union { +- DLOOP_Count count; +- DLOOP_Dataloop_contig c_t; +- DLOOP_Dataloop_vector v_t; +- DLOOP_Dataloop_blockindexed bi_t; +- DLOOP_Dataloop_indexed i_t; +- DLOOP_Dataloop_struct s_t; +- DLOOP_Dataloop_common cm_t; +- } loop_params; +- DLOOP_Offset el_size; +- DLOOP_Offset el_extent; +- DLOOP_Type el_type; +-} DLOOP_Dataloop; +- +-#define DLOOP_FINAL_MASK 0x00000008 +-#define DLOOP_KIND_MASK 0x00000007 +-#define DLOOP_KIND_CONTIG 0x1 +-#define DLOOP_KIND_VECTOR 0x2 +-#define DLOOP_KIND_BLOCKINDEXED 0x3 +-#define DLOOP_KIND_INDEXED 0x4 +-#define DLOOP_KIND_STRUCT 0x5 +- +-/* The max datatype depth is the maximum depth of the stack used to +- evaluate datatypes. It represents the length of the chain of +- datatype dependencies. Defining this and testing when a datatype +- is created removes a test in the datatype evaluation loop. */ +-#define DLOOP_MAX_DATATYPE_DEPTH 16 +- +-/*S +- DLOOP_Dataloop_stackelm - Structure for an element of the stack used +- to process dataloops +- +- Fields: +-+ curcount - Current loop count value (between 0 and +- loop.loop_params.count-1) +-. orig_count - original count value (cached so we don't have to look it up) +-. curoffset - Offset into memory relative to the pointer to the buffer +- passed in by the user. Used to maintain our position as we +- move up and down the stack. NEED MORE NOTES ON THIS!!! +-. orig_offset - original offset, set before the stackelm is processed, so that +- we know where the offset was. this is used in processing indexed +- types and possibly others. it is set for all types, but not +- referenced in some cases. +-. curblock - Current block value...NEED MORE NOTES ON THIS!!! +-. orig_block - original block value (caches so we don't have to look it up); +- INVALID FOR INDEX AND STRUCT TYPES. +-- loop_p - pointer to Loop-based description of the dataloop +- +-S*/ +-typedef struct DLOOP_Dataloop_stackelm { +- int may_require_reloading; /* indicates that items below might +- * need reloading (e.g. this is a struct) +- */ +- +- DLOOP_Count curcount; +- DLOOP_Offset curoffset; +- DLOOP_Count curblock; +- +- DLOOP_Count orig_count; +- DLOOP_Offset orig_offset; +- DLOOP_Count orig_block; +- +- struct DLOOP_Dataloop *loop_p; +-} DLOOP_Dataloop_stackelm; +- +-/*S +- DLOOP_Segment - Description of the Segment datatype +- +- Notes: +- This has no corresponding MPI datatype. +- +- Module: +- Segment +- +- Questions: +- Should this have an id for allocation and similarity purposes? +- S*/ +-typedef struct DLOOP_Segment { +- void *ptr; /* pointer to datatype buffer */ +- DLOOP_Handle handle; +- DLOOP_Offset stream_off; /* next offset into data stream resulting from datatype +- * processing. in other words, how many bytes have +- * we created/used by parsing so far? that amount + 1. +- */ +- DLOOP_Dataloop_stackelm stackelm[DLOOP_MAX_DATATYPE_DEPTH]; +- int cur_sp; /* Current stack pointer when using dataloop */ +- int valid_sp; /* maximum valid stack pointer. This is used to +- * maintain information on the stack after it has +- * been placed there by following the datatype field +- * in a DLOOP_Dataloop_st for any type except struct */ +- +- struct DLOOP_Dataloop builtin_loop; /* used for both predefined types (which +- * won't have a loop already) and for +- * situations where a count is passed in +- * and we need to create a contig loop +- * to handle it +- */ +- /* other, device-specific information */ +-} DLOOP_Segment; +- +-/* Dataloop functions (dataloop.c) */ +-void MPIR_Dataloop_copy(void *dest, void *src, DLOOP_Size size); +-void MPIR_Dataloop_update(DLOOP_Dataloop * dataloop, DLOOP_Offset ptrdiff); +-DLOOP_Offset +-MPIR_Dataloop_stream_size(DLOOP_Dataloop * dl_p, DLOOP_Offset(*sizefn) (DLOOP_Type el_type)); +-void MPIR_Dataloop_print(DLOOP_Dataloop * dataloop, int depth); +- +-void MPIR_Dataloop_alloc(int kind, +- DLOOP_Count count, +- DLOOP_Dataloop ** new_loop_p, DLOOP_Size * new_loop_sz_p); +-void MPIR_Dataloop_alloc_and_copy(int kind, +- DLOOP_Count count, +- DLOOP_Dataloop * old_loop, +- DLOOP_Size old_loop_sz, +- DLOOP_Dataloop ** new_loop_p, DLOOP_Size * new_loop_sz_p); +-void MPIR_Dataloop_struct_alloc(DLOOP_Count count, +- DLOOP_Size old_loop_sz, +- int basic_ct, +- DLOOP_Dataloop ** old_loop_p, +- DLOOP_Dataloop ** new_loop_p, DLOOP_Size * new_loop_sz_p); +-void MPIR_Dataloop_dup(DLOOP_Dataloop * old_loop, +- DLOOP_Size old_loop_sz, DLOOP_Dataloop ** new_loop_p); +- +-void MPIR_Dataloop_free(DLOOP_Dataloop ** dataloop); +- +-/* Segment functions (segment.c) */ +-DLOOP_Segment *MPIR_Segment_alloc(void); +- +-void MPIR_Segment_free(DLOOP_Segment * segp); +- +-int MPIR_Segment_init(const DLOOP_Buffer buf, +- DLOOP_Count count, DLOOP_Handle handle, DLOOP_Segment * segp); +- +-void +-MPIR_Segment_manipulate(DLOOP_Segment * segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, +- int (*piecefn) (DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp, +- void *v_paramp), +- int (*vectorfn) (DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blklen, +- DLOOP_Offset stride, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp, +- void *v_paramp), +- int (*blkidxfn) (DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blklen, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp, +- void *v_paramp), +- int (*indexfn) (DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count * blockarray, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp, +- void *v_paramp), +- DLOOP_Offset(*sizefn) (DLOOP_Type el_type), void *pieceparams); +- +-/* Common segment operations (segment_ops.c) */ +-void MPIR_Segment_count_contig_blocks(DLOOP_Segment * segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, DLOOP_Count * countp); +-void MPIR_Segment_mpi_flatten(DLOOP_Segment * segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, +- DLOOP_Size * blklens, MPI_Aint * disps, DLOOP_Size * lengthp); +- +-#define DLOOP_M2M_TO_USERBUF 0 +-#define DLOOP_M2M_FROM_USERBUF 1 +- +-struct MPIR_m2m_params { +- int direction; /* M2M_TO_USERBUF or M2M_FROM_USERBUF */ +- char *streambuf; +- char *userbuf; +-}; +- +-void MPIR_Segment_pack(struct DLOOP_Segment *segp, +- DLOOP_Offset first, DLOOP_Offset * lastp, void *streambuf); +-void MPIR_Segment_unpack(struct DLOOP_Segment *segp, +- DLOOP_Offset first, DLOOP_Offset * lastp, void *streambuf); +- +-/* Segment piece functions that are used in specific cases elsewhere */ +-int MPIR_Segment_contig_m2m(DLOOP_Offset * blocks_p, DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, /* unused */ +- void *v_paramp); +-int MPIR_Segment_vector_m2m(DLOOP_Offset * blocks_p, DLOOP_Count count, /* unused */ +- DLOOP_Count blksz, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, /* unused */ +- void *v_paramp); +-int MPIR_Segment_blkidx_m2m(DLOOP_Offset * blocks_p, DLOOP_Count count, DLOOP_Count blocklen, DLOOP_Offset * offsetarray, DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, /*unused */ +- void *v_paramp); +-int MPIR_Segment_index_m2m(DLOOP_Offset * blocks_p, DLOOP_Count count, DLOOP_Count * blockarray, DLOOP_Offset * offsetarray, DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, /*unused */ +- void *v_paramp); +- +-/* Dataloop construction functions */ +-void MPIR_Dataloop_create(MPI_Datatype type, +- DLOOP_Dataloop ** dlp_p, DLOOP_Size * dlsz_p, int *dldepth_p, int flag); +-int MPIR_Dataloop_create_contiguous(DLOOP_Count count, +- MPI_Datatype oldtype, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag); +-int MPIR_Dataloop_create_vector(DLOOP_Count count, +- DLOOP_Size blocklength, +- MPI_Aint stride, +- int strideinbytes, +- MPI_Datatype oldtype, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag); +-int MPIR_Dataloop_create_blockindexed(DLOOP_Count count, +- DLOOP_Size blklen, +- const void *disp_array, +- int dispinbytes, +- MPI_Datatype oldtype, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag); +-/* we bump up the size of the blocklength array because create_struct might use +- * create_indexed in an optimization, and in course of doing so, generate a +- * request of a large blocklength. */ +-int MPIR_Dataloop_create_indexed(DLOOP_Count count, +- const DLOOP_Size * blocklength_array, +- const void *displacement_array, +- int dispinbytes, +- MPI_Datatype oldtype, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag); +-int MPIR_Dataloop_create_struct(DLOOP_Count count, +- const int *blklen_array, +- const MPI_Aint * disp_array, +- const MPI_Datatype * oldtype_array, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag); +-int MPIR_Dataloop_create_pairtype(MPI_Datatype type, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag); +- +-/* Helper functions for dataloop construction */ +-int MPIR_Type_convert_subarray(int ndims, +- int *array_of_sizes, +- int *array_of_subsizes, +- int *array_of_starts, +- int order, MPI_Datatype oldtype, MPI_Datatype * newtype); +-int MPIR_Type_convert_darray(int size, +- int rank, +- int ndims, +- int *array_of_gsizes, +- int *array_of_distribs, +- int *array_of_dargs, +- int *array_of_psizes, +- int order, MPI_Datatype oldtype, MPI_Datatype * newtype); +- +-DLOOP_Count MPIR_Type_indexed_count_contig(DLOOP_Count count, +- const DLOOP_Count * blocklength_array, +- const void *displacement_array, +- int dispinbytes, DLOOP_Offset old_extent); +- +-DLOOP_Count MPIR_Type_blockindexed_count_contig(DLOOP_Count count, +- DLOOP_Count blklen, +- const void *disp_array, +- int dispinbytes, DLOOP_Offset old_extent); +- +-int MPIR_Type_blockindexed(int count, +- int blocklength, +- const void *displacement_array, +- int dispinbytes, MPI_Datatype oldtype, MPI_Datatype * newtype); +- +-int MPIR_Type_commit(MPI_Datatype * type); +- +-/* Segment functions specific to MPICH */ +-void MPIR_Segment_pack_vector(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, DLOOP_VECTOR * vector, int *lengthp); +- +-void MPIR_Segment_unpack_vector(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, DLOOP_VECTOR * vector, int *lengthp); +- +-void MPIR_Segment_flatten(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, +- DLOOP_Offset * offp, DLOOP_Size * sizep, DLOOP_Offset * lengthp); +- +-void MPIR_Segment_pack_external32(struct DLOOP_Segment *segp, +- DLOOP_Offset first, DLOOP_Offset * lastp, void *pack_buffer); +- +-void MPIR_Segment_unpack_external32(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, DLOOP_Buffer unpack_buffer); +- +-/* These values are defined by DLOOP code. +- * +- * Note: DLOOP_DATALOOP_ALL_BYTES is used only when the device +- * defines MPID_NEEDS_DLOOP_ALL_BYTES. +- */ +-#define MPIR_DATALOOP_DEFAULT DLOOP_DATALOOP_DEFAULT +-#define MPIR_DATALOOP_ALL_BYTES DLOOP_DATALOOP_ALL_BYTES +- +-DLOOP_Count DLOOP_Stackelm_blocksize(struct DLOOP_Dataloop_stackelm *elmp); +-DLOOP_Offset DLOOP_Stackelm_offset(struct DLOOP_Dataloop_stackelm *elmp); +-void DLOOP_Stackelm_load(struct DLOOP_Dataloop_stackelm *elmp, +- struct DLOOP_Dataloop *dlp, int branch_flag); +- +-#endif /* MPIR_DATALOOP_H_INCLUDED */ +--- a/src/include/mpir_datatype.h ++++ b/src/include/mpir_datatype.h +@@ -12,11 +12,8 @@ + * the predefined handles. That is, look at the last two hex digits of all + * predefined datatype handles, take the greatest one, and convert it to decimal + * here. */ +-/* FIXME calculating this value this way is foolish, we should make this more +- * automatic and less error prone */ +-/* FIXME: Given that this is relatively static, an adequate alternative is +- to provide a check that this value is valid. */ +-#define MPIR_DATATYPE_N_BUILTIN 70 ++/* FIXME: I will fix this by refactor the current datatype code out-of configure.ac */ ++#define MPIR_DATATYPE_N_BUILTIN 71 + #define MPIR_DTYPE_BEGINNING 0 + #define MPIR_DTYPE_END -1 + +@@ -68,7 +65,7 @@ typedef struct MPIR_Datatype_contents { + efficiency was outweighed by the added complexity of the implementation. + + A number of fields contain only boolean inforation ('is_contig', +- 'has_sticky_ub', 'has_sticky_lb', 'is_permanent', 'is_committed'). These ++ 'has_sticky_ub', 'has_sticky_lb', 'is_committed'). These + could be combined and stored in a single bit vector. + + 'MPI_Type_dup' could be implemented with a shallow copy, where most of the +@@ -79,7 +76,7 @@ typedef struct MPIR_Datatype_contents { + invalidate the dup'ed datatype. + + Originally we attempted to keep contents/envelope data in a non-optimized +- dataloop. The subarray and darray types were particularly problematic, ++ typerep. The subarray and darray types were particularly problematic, + and eventually we decided it would be simpler to just keep contents/ + envelope data in arrays separately. + +@@ -95,14 +92,17 @@ struct MPIR_Datatype { + /* handle and ref_count are filled in by MPIR_Handle_obj_alloc() */ + MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ + +- /* basic parameters for datatype, accessible via MPI calls */ ++ /* user-visible parameters */ + MPI_Aint size; /* MPI_Count could be 128 bits, so use MPI_Aint */ + MPI_Aint extent, ub, lb, true_ub, true_lb; ++ struct MPIR_Attribute *attributes; ++ char name[MPI_MAX_OBJECT_NAME]; + ++ ++ /* private fields */ + /* chars affecting subsequent datatype processing and creation */ + MPI_Aint alignsize; + int has_sticky_ub, has_sticky_lb; +- int is_permanent; /* non-zero if datatype is a predefined type */ + int is_committed; + + /* element information; used for accumulate and get elements +@@ -134,23 +134,8 @@ struct MPIR_Datatype { + /* pointer to contents and envelope data for the datatype */ + MPIR_Datatype_contents *contents; + +- /* dataloop members, including a pointer to the loop, the size in bytes, +- * and a depth used to verify that we can process it (limited stack depth +- */ +- struct MPIR_Dataloop *dataloop; /* might be optimized for homogenous */ +- MPI_Aint dataloop_size; +- int dataloop_depth; +- /* MPI-2 attributes and name */ +- struct MPIR_Attribute *attributes; +- char name[MPI_MAX_OBJECT_NAME]; +- +- /* not yet used; will be used to track what processes have cached +- * copies of this type. +- */ +- int32_t cache_id; +- /* MPID_Lpidmask mask; */ +- +- /* int (*free_fn)(struct MPIR_Datatype *); *//* Function to free this datatype */ ++ /* internal type representation */ ++ void *typerep; /* might be optimized for homogenous */ + + /* Other, device-specific information */ + #ifdef MPID_DEV_DATATYPE_DECL +@@ -162,7 +147,7 @@ extern MPIR_Datatype MPIR_Datatype_builtin[MPIR_DATATYPE_N_BUILTIN]; + extern MPIR_Datatype MPIR_Datatype_direct[]; + extern MPIR_Object_alloc_t MPIR_Datatype_mem; + +-static inline void MPIR_Datatype_free(MPIR_Datatype * ptr); ++void MPIR_Datatype_free(MPIR_Datatype * ptr); + + #define MPIR_Datatype_ptr_add_ref(datatype_ptr) MPIR_Object_add_ref((datatype_ptr)) + +@@ -174,7 +159,7 @@ static inline void MPIR_Datatype_free(MPIR_Datatype * ptr); + if ((err == MPI_SUCCESS) && !((ptr)->is_committed)) \ + err = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, \ ++ __func__, \ + __LINE__, \ + MPI_ERR_TYPE, \ + "**dtypecommit", \ +@@ -298,7 +283,7 @@ static inline void MPIR_Datatype_free(MPIR_Datatype * ptr); + mpi_errno = (datatype_ptr->free_fn)(datatype_ptr); \ + if (mpi_errno) { \ + MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPI_TYPE_FREE); \ +- return MPIR_Err_return_comm(0, FCNAME, mpi_errno); \ ++ return MPIR_Err_return_comm(0, __func__, mpi_errno); \ + } \ + } */ \ + if (lmpi_errno == MPI_SUCCESS) { \ +@@ -323,133 +308,6 @@ static inline void MPIR_Datatype_free(MPIR_Datatype * ptr); + + #define MPIR_Datatype_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Datatype,ptr,MPI_ERR_TYPE,err) + +-#define MPIR_Datatype_get_loopdepth_macro(a,depth_) do { \ +- void *ptr; \ +- switch (HANDLE_GET_KIND(a)) { \ +- case HANDLE_KIND_DIRECT: \ +- MPIR_Assert(HANDLE_INDEX(a) < MPIR_DATATYPE_PREALLOC); \ +- ptr = MPIR_Datatype_direct+HANDLE_INDEX(a); \ +- MPIR_DATALOOP_GET_FIELD(depth_,_depth); \ +- break; \ +- case HANDLE_KIND_INDIRECT: \ +- ptr = ((MPIR_Datatype *) \ +- MPIR_Handle_get_ptr_indirect(a,&MPIR_Datatype_mem)); \ +- MPIR_DATALOOP_GET_FIELD(depth_,_depth); \ +- break; \ +- case HANDLE_KIND_INVALID: \ +- case HANDLE_KIND_BUILTIN: \ +- default: \ +- depth_ = 0; \ +- break; \ +- } \ +-} while (0) +- +- +-#define MPIR_Datatype_get_loopptr_macro(a,lptr_) do { \ +- void *ptr; \ +- switch (HANDLE_GET_KIND(a)) { \ +- case HANDLE_KIND_DIRECT: \ +- MPIR_Assert(HANDLE_INDEX(a) < MPIR_DATATYPE_PREALLOC); \ +- ptr = MPIR_Datatype_direct+HANDLE_INDEX(a); \ +- MPIR_DATALOOP_GET_FIELD(lptr_,); \ +- break; \ +- case HANDLE_KIND_INDIRECT: \ +- ptr = ((MPIR_Datatype *) \ +- MPIR_Handle_get_ptr_indirect(a,&MPIR_Datatype_mem)); \ +- MPIR_DATALOOP_GET_FIELD(lptr_,); \ +- break; \ +- case HANDLE_KIND_INVALID: \ +- case HANDLE_KIND_BUILTIN: \ +- default: \ +- lptr_ = 0; \ +- break; \ +- } \ +-} while (0) +- +-#define MPIR_Datatype_get_loopsize_macro(a,depth_) do { \ +- void *ptr; \ +- switch (HANDLE_GET_KIND(a)) { \ +- case HANDLE_KIND_DIRECT: \ +- MPIR_Assert(HANDLE_INDEX(a) < MPIR_DATATYPE_PREALLOC) ; \ +- ptr = MPIR_Datatype_direct+HANDLE_INDEX(a); \ +- MPIR_DATALOOP_GET_FIELD(depth_,_size); \ +- break; \ +- case HANDLE_KIND_INDIRECT: \ +- ptr = ((MPIR_Datatype *) \ +- MPIR_Handle_get_ptr_indirect(a,&MPIR_Datatype_mem)); \ +- MPIR_DATALOOP_GET_FIELD(depth_,_size); \ +- break; \ +- case HANDLE_KIND_INVALID: \ +- case HANDLE_KIND_BUILTIN: \ +- default: \ +- depth_ = 0; \ +- break; \ +- } \ +-} while (0) +- +-#define MPIR_Datatype_set_loopdepth_macro(a,depth_) do { \ +- void *ptr; \ +- switch (HANDLE_GET_KIND(a)) { \ +- case HANDLE_KIND_DIRECT: \ +- MPIR_Assert(HANDLE_INDEX(a) < MPIR_DATATYPE_PREALLOC); \ +- ptr = MPIR_Datatype_direct+HANDLE_INDEX(a); \ +- MPIR_DATALOOP_SET_FIELD(depth_,_depth); \ +- break; \ +- case HANDLE_KIND_INDIRECT: \ +- ptr = ((MPIR_Datatype *) \ +- MPIR_Handle_get_ptr_indirect(a,&MPIR_Datatype_mem)); \ +- MPIR_DATALOOP_SET_FIELD(depth_,_depth); \ +- break; \ +- case HANDLE_KIND_INVALID: \ +- case HANDLE_KIND_BUILTIN: \ +- default: \ +- depth_ = 0; \ +- break; \ +- } \ +-} while (0) +- +-#define MPIR_Datatype_set_loopptr_macro(a,lptr_) do { \ +- void *ptr; \ +- switch (HANDLE_GET_KIND(a)) { \ +- case HANDLE_KIND_DIRECT: \ +- MPIR_Assert(HANDLE_INDEX(a) < MPIR_DATATYPE_PREALLOC); \ +- ptr = MPIR_Datatype_direct+HANDLE_INDEX(a); \ +- MPIR_DATALOOP_SET_FIELD(lptr_,); \ +- break; \ +- case HANDLE_KIND_INDIRECT: \ +- ptr = ((MPIR_Datatype *) \ +- MPIR_Handle_get_ptr_indirect(a,&MPIR_Datatype_mem)); \ +- MPIR_DATALOOP_SET_FIELD(lptr_,); \ +- break; \ +- case HANDLE_KIND_INVALID: \ +- case HANDLE_KIND_BUILTIN: \ +- default: \ +- lptr_ = 0; \ +- break; \ +- } \ +-} while (0) +- +-#define MPIR_Datatype_set_loopsize_macro(a,depth_) do { \ +- void *ptr; \ +- switch (HANDLE_GET_KIND(a)) { \ +- case HANDLE_KIND_DIRECT: \ +- MPIR_Assert(HANDLE_INDEX(a) < MPIR_DATATYPE_PREALLOC); \ +- ptr = MPIR_Datatype_direct+HANDLE_INDEX(a); \ +- MPIR_DATALOOP_SET_FIELD(depth_,_size); \ +- break; \ +- case HANDLE_KIND_INDIRECT: \ +- ptr = ((MPIR_Datatype *) \ +- MPIR_Handle_get_ptr_indirect(a,&MPIR_Datatype_mem)); \ +- MPIR_DATALOOP_SET_FIELD(depth_,_size); \ +- break; \ +- case HANDLE_KIND_INVALID: \ +- case HANDLE_KIND_BUILTIN: \ +- default: \ +- depth_ = 0; \ +- break; \ +- } \ +-} while (0) +- + /* we pessimistically assume that MPI_DATATYPE_NULL may be passed as a "valid" type + * for send/recv when MPI_PROC_NULL is the destination/src */ + #define MPIR_Datatype_add_ref_if_not_builtin(datatype_) \ +@@ -459,6 +317,7 @@ static inline void MPIR_Datatype_free(MPIR_Datatype * ptr); + { \ + MPIR_Datatype *dtp_ = NULL; \ + MPIR_Datatype_get_ptr((datatype_), dtp_); \ ++ MPIR_Assert(dtp_ != NULL); \ + MPIR_Datatype_ptr_add_ref(dtp_); \ + } \ + } while (0) +@@ -501,47 +360,6 @@ static inline void MPIR_Datatype_free_contents(MPIR_Datatype * dtp) + } + + /*@ +- MPIR_Datatype_free +- +-Input Parameters: +-. MPIR_Datatype ptr - pointer to MPID datatype structure that is no longer +- referenced +- +-Output Parameters: +- none +- +- Return Value: +- none +- +- This function handles freeing dynamically allocated memory associated with +- the datatype. In the process MPIR_Datatype_free_contents() is also called, +- which handles decrementing reference counts to constituent types (in +- addition to freeing the space used for contents information). +- MPIR_Datatype_free_contents() will call MPIR_Datatype_free() on constituent +- types that are no longer referenced as well. +- +- @*/ +-static inline void MPIR_Datatype_free(MPIR_Datatype * ptr) +-{ +- MPL_DBG_MSG_P(MPIR_DBG_DATATYPE, VERBOSE, "type %x freed.", ptr->handle); +- +-#ifdef MPID_Type_free_hook +- MPID_Type_free_hook(ptr); +-#endif /* MPID_Type_free_hook */ +- +- /* before freeing the contents, check whether the pointer is not +- * null because it is null in the case of a datatype shipped to the target +- * for RMA ops */ +- if (ptr->contents) { +- MPIR_Datatype_free_contents(ptr); +- } +- if (ptr->dataloop) { +- MPIR_Dataloop_free(&(ptr->dataloop)); +- } +- MPIR_Handle_obj_free(&MPIR_Datatype_mem, ptr); +-} +- +-/*@ + MPIR_Datatype_set_contents - store contents information for use in + MPI_Type_get_contents. + +@@ -690,11 +508,7 @@ int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype o + MPI_Datatype * newtype_p); + int MPIR_Type_struct_impl(int count, const int blocklens[], const MPI_Aint indices[], + const MPI_Datatype old_types[], MPI_Datatype * newtype); +-int MPIR_Pack_impl(const void *inbuf, MPI_Aint incount, MPI_Datatype datatype, void *outbuf, +- MPI_Aint outcount, MPI_Aint * position); + void MPIR_Pack_size_impl(int incount, MPI_Datatype datatype, MPI_Aint * size); +-int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize, MPI_Aint * position, +- void *outbuf, int outcount, MPI_Datatype datatype); + void MPIR_Type_lb_impl(MPI_Datatype datatype, MPI_Aint * displacement); + + /* Datatype functions */ +@@ -706,6 +520,12 @@ int MPIR_Type_indexed(int count, const int *blocklength_array, const void *displ + int MPIR_Type_vector(int count, int blocklength, MPI_Aint stride, int strideinbytes, + MPI_Datatype oldtype, MPI_Datatype * newtype); + int MPIR_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype * newtype); ++int MPIR_Type_blockindexed(int count, ++ int blocklength, ++ const void *displacement_array, ++ int dispinbytes, MPI_Datatype oldtype, MPI_Datatype * newtype); ++ ++int MPIR_Type_commit(MPI_Datatype * type); + int MPII_Type_zerolen(MPI_Datatype * newtype); + int MPIR_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, + MPI_Datatype * newtype); +@@ -713,28 +533,24 @@ int MPIR_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addr + int max_datatypes, int array_of_integers[], + MPI_Aint array_of_addresses[], MPI_Datatype array_of_datatypes[]); + int MPIR_Type_create_pairtype(MPI_Datatype datatype, MPIR_Datatype * new_dtp); +-int MPIR_Type_flatten(MPI_Datatype type, MPI_Aint * off_array, DLOOP_Size * size_array, +- MPI_Aint * array_len_p); + + /* debugging helper functions */ + char *MPIR_Datatype_builtin_to_string(MPI_Datatype type); + char *MPIR_Datatype_combiner_to_string(int combiner); + void MPIR_Datatype_debug(MPI_Datatype type, int array_ct); + +-MPI_Aint MPII_Datatype_get_basic_size_external32(MPI_Datatype el_type); ++MPI_Aint MPIR_Datatype_size_external32(MPI_Datatype type); + +-static inline MPI_Aint MPIR_Datatype_size_external32(MPI_Datatype type) +-{ +- if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) { +- return MPII_Datatype_get_basic_size_external32(type); +- } else { +- MPIR_Dataloop *dlp = NULL; ++MPI_Aint MPII_Datatype_get_basic_size_external32(MPI_Datatype el_type); + +- MPIR_Datatype_get_loopptr_macro(type, dlp); +- MPIR_Assert(dlp != NULL); ++MPI_Aint MPII_Datatype_indexed_count_contig(MPI_Aint count, ++ const MPI_Aint * blocklength_array, ++ const void *displacement_array, ++ int dispinbytes, MPI_Aint old_extent); + +- return MPIR_Dataloop_stream_size(dlp, MPII_Datatype_get_basic_size_external32); +- } +-} ++MPI_Aint MPII_Datatype_blockindexed_count_contig(MPI_Aint count, ++ MPI_Aint blklen, ++ const void *disp_array, ++ int dispinbytes, MPI_Aint old_extent); + + #endif /* MPIR_DATATYPE_H_INCLUDED */ +--- a/src/include/mpir_err.h ++++ b/src/include/mpir_err.h +@@ -48,7 +48,7 @@ MPICH_API_PUBLIC int MPIR_Err_return_file(MPI_File, const char[], int); /* Romio + A typical use is\: + .vb + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_RANK, ++ __func__, __LINE__, MPI_ERR_RANK, + "Invalid Rank", "Invalid rank %d", rank); + .ve + +@@ -204,21 +204,21 @@ cvars: + */ + #define MPIR_ERRTEST_SEND_TAG(tag,err) \ + if ((tag) < 0 || (tag) > MPIR_Process.attrs.tag_ub) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_TAG, "**tag", "**tag %d", tag); \ + goto fn_fail; \ + } + + #define MPIR_ERRTEST_RECV_TAG(tag,err) \ + if ((tag) < MPI_ANY_TAG || (tag) > MPIR_Process.attrs.tag_ub) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_TAG, "**tag", "**tag %d", tag); \ + goto fn_fail; \ + } + + #define MPIR_ERRTEST_RANK(comm_ptr,rank,err) \ + if ((rank) < 0 || (rank) >= (comm_ptr)->remote_size) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_RANK, "**rank", "**rank %d %d", rank, \ + (comm_ptr)->remote_size); \ + goto fn_fail; \ +@@ -226,7 +226,7 @@ cvars: + + #define MPIR_ERRTEST_SEND_RANK(comm_ptr,rank,err) \ + if ((rank) < MPI_PROC_NULL || (rank) >= (comm_ptr)->remote_size) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_RANK, "**rank", "**rank %d %d", rank, \ + (comm_ptr)->remote_size); \ + goto fn_fail; \ +@@ -234,7 +234,7 @@ cvars: + + #define MPIR_ERRTEST_RECV_RANK(comm_ptr,rank,err) \ + if ((rank) < MPI_ANY_SOURCE || (rank) >= (comm_ptr)->remote_size) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_RANK, "**rank", "**rank %d %d", rank, \ + (comm_ptr)->remote_size); \ + goto fn_fail; \ +@@ -244,7 +244,7 @@ cvars: + if ((count) < 0) { \ + err = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_COUNT, \ + "**countneg", \ + "**countneg %d", \ +@@ -256,7 +256,7 @@ cvars: + if ((disp) < 0) { \ + err = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_DISP, \ + "**rmadisp", 0); \ + goto fn_fail; \ +@@ -266,7 +266,7 @@ cvars: + if ((ptr1)==(ptr2) && (ptr1) != MPI_BOTTOM) { \ + err = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_BUFFER, \ + "**bufalias", 0); \ + goto fn_fail; \ +@@ -278,7 +278,7 @@ cvars: + if (MPIR_CVAR_COLL_ALIAS_CHECK && (ptr1)==(ptr2)) { \ + err = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_BUFFER, \ + "**bufalias", 0); \ + goto fn_fail; \ +@@ -288,7 +288,7 @@ cvars: + if (!(arg)) { \ + err = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_ARG, \ + "**nullptr", \ + "**nullptr %s", \ +@@ -299,7 +299,7 @@ cvars: + #define MPIR_ERRTEST_ARGNEG(arg,arg_name,err) \ + if ((arg) < 0) { \ + err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, MPI_ERR_ARG, \ ++ __func__, __LINE__, MPI_ERR_ARG, \ + "**argneg", \ + "**argneg %s %d", arg_name, arg); \ + goto fn_fail; \ +@@ -309,7 +309,7 @@ cvars: + if ((arg) <= 0) { \ + err = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + errclass, \ + "**argnonpos", \ + "**argnonpos %s %d", \ +@@ -321,7 +321,7 @@ cvars: + /* intercomm can be between MPI_PROC_NULL (or MPI_ROOT) and remote_size-1 */ + #define MPIR_ERRTEST_INTRA_ROOT(comm_ptr,root,err) \ + if ((root) < 0 || (root) >= (comm_ptr)->local_size) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_ROOT, "**root", "**root %d", root); \ + goto fn_fail; \ + } +@@ -330,14 +330,14 @@ cvars: + intercomm test */ + #define MPIR_ERRTEST_INTER_ROOT(comm_ptr,root,err) \ + if ((root) < -3 || (root) >= (comm_ptr)->remote_size) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_ROOT, "**root", "**root %d", root); \ + goto fn_fail; \ + } + + #define MPIR_ERRTEST_PERSISTENT(reqp,err) \ + if ((reqp)->kind != MPIR_REQUEST_KIND__PREQUEST_SEND && (reqp)->kind != MPIR_REQUEST_KIND__PREQUEST_RECV) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_REQUEST, "**requestnotpersist", 0); \ + goto fn_fail; \ + } +@@ -345,21 +345,21 @@ cvars: + #define MPIR_ERRTEST_PERSISTENT_ACTIVE(reqp,err) \ + if (((reqp)->kind == MPIR_REQUEST_KIND__PREQUEST_SEND || \ + (reqp)->kind == MPIR_REQUEST_KIND__PREQUEST_RECV) && (reqp)->u.persist.real_request != NULL) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_REQUEST, "**requestpersistactive", 0); \ + goto fn_fail; \ + } + + #define MPIR_ERRTEST_COMM_INTRA(comm_ptr, err) \ + if ((comm_ptr)->comm_kind != MPIR_COMM_KIND__INTRACOMM) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_COMM,"**commnotintra",0); \ + goto fn_fail; \ + } + + #define MPIR_ERRTEST_COMM_TAG(tag,err) \ + if ((tag) < 0 || (tag) > MPIR_Process.attrs.tag_ub) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_TAG, "**tag", "**tag %d", tag); \ + goto fn_fail; \ + } +@@ -375,7 +375,7 @@ cvars: + { \ + err_ = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_TYPE, \ + "**dtype", 0); \ + goto fn_fail; \ +@@ -384,7 +384,7 @@ cvars: + { \ + err_ = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_TYPE, \ + "**dtypenull", \ + "**dtypenull %s", \ +@@ -398,7 +398,7 @@ cvars: + if (!MPIR_Type_is_rma_atomic(datatype_)) { \ + err_ = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_TYPE, \ + "**rmatypenotatomic", \ + "**rmatypenotatomic %D", \ +@@ -418,21 +418,21 @@ cvars: + + #define MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf,count,err) \ + if (count > 0 && sendbuf == MPI_IN_PLACE) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_BUFFER, "**sendbuf_inplace", 0); \ + goto fn_fail; \ + } + + #define MPIR_ERRTEST_RECVBUF_INPLACE(recvbuf,count,err) \ + if (count > 0 && recvbuf == MPI_IN_PLACE) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_BUFFER, "**recvbuf_inplace", 0); \ + goto fn_fail; \ + } + + #define MPIR_ERRTEST_BUF_INPLACE(buf,count,err) \ + if (count > 0 && buf == MPI_IN_PLACE) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_BUFFER, "**buf_inplace", 0); \ + goto fn_fail; \ + } +@@ -470,7 +470,7 @@ cvars: + if (ferr) { \ + err = MPIR_Err_create_code(MPI_SUCCESS, \ + MPIR_ERR_RECOVERABLE, \ +- FCNAME, __LINE__, \ ++ __func__, __LINE__, \ + MPI_ERR_BUFFER, \ + "**bufnull", 0); \ + goto fn_fail; \ +@@ -796,79 +796,89 @@ cvars: + */ + #ifdef HAVE_ERROR_CHECKING + #define MPIR_ERR_SETSIMPLE(err_,class_,msg_) \ +- err_ = MPIR_Err_create_code(MPI_SUCCESS,MPIR_ERR_RECOVERABLE,FCNAME, \ ++ err_ = MPIR_Err_create_code(MPI_SUCCESS,MPIR_ERR_RECOVERABLE,__func__, \ + __LINE__, class_, msg_, 0) + #define MPIR_ERR_SET(err_,class_,msg_) \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,__func__, \ + __LINE__, class_, msg_, 0) + #define MPIR_ERR_SET1(err_,class_,gmsg_,smsg_,arg1_) \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_) + #define MPIR_ERR_SET2(err_,class_,gmsg_,smsg_,arg1_,arg2_) \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_, arg2_) + #define MPIR_ERR_SETANDSTMT(err_,class_,stmt_,msg_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,FCNAME, \ +- __LINE__, class_, msg_, 0); stmt_ ; \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,__func__, \ ++ __LINE__, class_, msg_, 0); \ ++ assert(err_); \ ++ stmt_ ; \ + } while (0) + #define MPIR_ERR_SETANDSTMT1(err_,class_,stmt_,gmsg_,smsg_,arg1_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,FCNAME, \ +- __LINE__, class_, gmsg_, smsg_, arg1_); stmt_ ; \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,__func__, \ ++ __LINE__, class_, gmsg_, smsg_, arg1_); \ ++ assert(err_); \ ++ stmt_ ; \ + } while (0) + #define MPIR_ERR_SETANDSTMT2(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,FCNAME, \ +- __LINE__, class_, gmsg_, smsg_, arg1_, arg2_); stmt_ ; \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,__func__, \ ++ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_); \ ++ assert(err_); \ ++ stmt_ ; \ + } while (0) + #define MPIR_ERR_SETANDSTMT3(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_, arg3_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,FCNAME, \ +- __LINE__, class_, gmsg_, smsg_, arg1_, arg2_, arg3_); stmt_ ; \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,__func__, \ ++ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_, arg3_); \ ++ assert(err_); \ ++ stmt_ ; \ + } while (0) + #define MPIR_ERR_SETANDSTMT4(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_, arg3_, arg4_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_RECOVERABLE,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_, \ +- arg2_, arg3_, arg4_); stmt_ ; \ ++ arg2_, arg3_, arg4_); \ ++ assert(err_); \ ++ stmt_ ; \ + } while (0) + + #define MPIR_ERR_SETFATALSIMPLE(err_,class_,msg_) \ +- err_ = MPIR_Err_create_code(MPI_SUCCESS,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(MPI_SUCCESS,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, msg_, 0) + #define MPIR_ERR_SETFATAL(err_,class_,msg_) \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, msg_, 0) + #define MPIR_ERR_SETFATAL1(err_,class_,gmsg_,smsg_,arg1_) \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_) + #define MPIR_ERR_SETFATAL2(err_,class_,gmsg_,smsg_,arg1_,arg2_) \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_, arg2_) + #define MPIR_ERR_SETFATALANDSTMT(err_,class_,stmt_,msg_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, msg_, 0); stmt_ ; \ + } while (0) + #define MPIR_ERR_SETFATALANDSTMT1(err_,class_,stmt_,gmsg_,smsg_,arg1_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_); stmt_ ; \ + } while (0) + #define MPIR_ERR_SETFATALANDSTMT2(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_, arg2_); stmt_ ; \ + } while (0) + #define MPIR_ERR_SETFATALANDSTMT3(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_, arg3_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_, arg2_, arg3_); stmt_ ; \ + } while (0) + #define MPIR_ERR_SETFATALANDSTMT4(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_, arg3_, arg4_) \ + do { \ +- err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,FCNAME, \ ++ err_ = MPIR_Err_create_code(err_,MPIR_ERR_FATAL,__func__, \ + __LINE__, class_, gmsg_, smsg_, arg1_, arg2_, arg3_, arg4_); stmt_ ; \ + } while (0) + #define MPIR_ERR_ADD(err_, newerr_) \ +--- a/src/include/mpir_ext.h.in ++++ b/src/include/mpir_ext.h.in +@@ -69,11 +69,6 @@ extern int MPIR_Ext_dbg_romio_terse_enabled; + extern int MPIR_Ext_dbg_romio_typical_enabled; + extern int MPIR_Ext_dbg_romio_verbose_enabled; + +-/* a copy of MPIU_Ensure_Aint_fits_in_pointer for external use, slightly +- * modified to use ROMIO's version of the pointer-casting macro */ +-#define MPIR_Ext_ensure_Aint_fits_in_pointer(aint) \ +- MPIR_Ext_assert((aint) == (MPI_Aint)(uintptr_t) ADIOI_AINT_CAST_TO_VOID_PTR(aint)); +- + /* to be called early by ROMIO's initialization process in order to setup init-time + * glue code that cannot be initialized statically */ + int MPIR_Ext_init(void); +--- a/src/include/mpir_handlemem.h ++++ b/src/include/mpir_handlemem.h +@@ -66,9 +66,7 @@ static inline int MPIR_Handle_free(void *((*indirect)[]), int indirect_size) + for (i = 0; i < indirect_size; i++) { + MPL_free((*indirect)[i]); + } +- if (indirect) { +- MPL_free(indirect); +- } ++ MPL_free(indirect); + /* This does *not* remove any objects that the user created + * and then did not destroy */ + return 0; +@@ -208,30 +206,22 @@ Input Parameters: + MPI_Requests) and should not call any other routines in the common + case. + +- Threading: The 'MPID_THREAD_CS_ENTER/EXIT(POBJ/VNI, MPIR_THREAD_POBJ_HANDLE_MUTEX)' enables both ++ Threading: The 'MPID_THREAD_CS_ENTER/EXIT(POBJ/VCI, MPIR_THREAD_POBJ_HANDLE_MUTEX)' enables both + finer-grain + locking with a single global mutex and with a mutex specific for handles. + + +*/ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Handle_obj_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void *MPIR_Handle_obj_alloc(MPIR_Object_alloc_t * objmem) + { + void *ret; + MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX); +- MPID_THREAD_CS_ENTER(VNI, MPIR_THREAD_POBJ_HANDLE_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI, MPIR_THREAD_POBJ_HANDLE_MUTEX); + ret = MPIR_Handle_obj_alloc_unsafe(objmem); +- MPID_THREAD_CS_EXIT(VNI, MPIR_THREAD_POBJ_HANDLE_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI, MPIR_THREAD_POBJ_HANDLE_MUTEX); + MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX); + return ret; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Handle_obj_alloc_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void *MPIR_Handle_obj_alloc_unsafe(MPIR_Object_alloc_t * objmem) + { + MPIR_Handle_common *ptr; +@@ -338,7 +328,7 @@ static inline void MPIR_Handle_obj_free(MPIR_Object_alloc_t * objmem, void *obje + MPIR_Handle_common *obj = (MPIR_Handle_common *) object; + + MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX); +- MPID_THREAD_CS_ENTER(VNI, MPIR_THREAD_POBJ_HANDLE_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI, MPIR_THREAD_POBJ_HANDLE_MUTEX); + + MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, (MPL_DBG_FDEST, + "Freeing object ptr %p (0x%08x kind=%s) refcount=%d", +@@ -382,7 +372,7 @@ static inline void MPIR_Handle_obj_free(MPIR_Object_alloc_t * objmem, void *obje + + obj->next = objmem->avail; + objmem->avail = obj; +- MPID_THREAD_CS_EXIT(VNI, MPIR_THREAD_POBJ_HANDLE_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI, MPIR_THREAD_POBJ_HANDLE_MUTEX); + MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX); + } + +--- a/src/include/mpir_mem.h ++++ b/src/include/mpir_mem.h +@@ -84,31 +84,6 @@ extern "C" { + memcpy((dst), (src), (len)); \ + } while (0) + +-#ifdef USE_MEMORY_TRACING +- +-/* Define these as invalid C to catch their use in the code */ +-#define malloc(a) 'Error use MPL_malloc' ::: +-#define calloc(a,b) 'Error use MPL_calloc' ::: +-#define free(a) 'Error use MPL_free' ::: +-#define realloc(a) 'Error use MPL_realloc' ::: +-/* These two functions can't be guarded because we use #include +- * throughout the code to be able to use other symbols in that header file. +- * Because we include that header directly, we bypass this guard and cause +- * compile problems. +- * #define mmap(a,b,c,d,e,f) 'Error use MPL_mmap' ::: +- * #define munmap(a,b) 'Error use MPL_munmap' ::: +- */ +-#if defined(strdup) || defined(__strdup) +-#undef strdup +-#endif /* defined(strdup) || defined(__strdup) */ +- /* The ::: should cause the compiler to choke; the string +- * will give the explanation */ +-#undef strdup /* in case strdup is a macro */ +-#define strdup(a) 'Error use MPL_strdup' ::: +- +-#endif /* USE_MEMORY_TRACING */ +- +- + /* Memory allocation macros. See document. */ + + /* Standard macro for generating error codes. We set the error to be +@@ -116,7 +91,7 @@ extern "C" { + #ifdef HAVE_ERROR_CHECKING + #define MPIR_CHKMEM_SETERR(rc_,nbytes_,name_) \ + rc_=MPIR_Err_create_code(MPI_SUCCESS, \ +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, \ + MPI_ERR_OTHER, "**nomem2", "**nomem2 %d %s", nbytes_, name_) + #else /* HAVE_ERROR_CHECKING */ + #define MPIR_CHKMEM_SETERR(rc_,nbytes_,name_) rc_=MPI_ERR_OTHER +@@ -154,7 +129,7 @@ extern "C" { + pointer_ = (type_)MPL_malloc(nbytes_,class_); \ + if (pointer_) { \ + MPIR_Assert(mpiu_chklmem_stk_sp_ 0) { \ + MPIR_CHKMEM_SETERR(rc_,nbytes_,name_); \ + stmt_; \ +--- a/src/include/mpir_misc.h ++++ b/src/include/mpir_misc.h +@@ -78,10 +78,10 @@ Notes: + void MPIR_Add_finalize(int (*routine) (void *), void *extra, int priority); + + /* Routines for determining local and remote processes */ +-int MPIR_Find_local_and_external(struct MPIR_Comm *comm, int *local_size_p, int *local_rank_p, +- int **local_ranks_p, int *external_size_p, int *external_rank_p, +- int **external_ranks_p, int **intranode_table, +- int **internode_table_p); ++int MPIR_Find_local(struct MPIR_Comm *comm, int *local_size_p, int *local_rank_p, ++ int **local_ranks_p, int **intranode_table); ++int MPIR_Find_external(struct MPIR_Comm *comm, int *external_size_p, int *external_rank_p, ++ int **external_ranks_p, int **internode_table_p); + int MPIR_Get_internode_rank(MPIR_Comm * comm_ptr, int r); + int MPIR_Get_intranode_rank(MPIR_Comm * comm_ptr, int r); + +--- a/src/include/mpir_misc_post.h ++++ b/src/include/mpir_misc_post.h +@@ -9,10 +9,6 @@ + #define MPIR_MISC_POST_H_INCLUDED + + /* Pull the error status out of the tag space and put it into an errflag. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_process_status +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPIR_Process_status(MPI_Status * status, MPIR_Errflag_t * errflag) + { + if (MPI_PROC_NULL != status->MPI_SOURCE && +--- a/src/include/mpir_op_util.h ++++ b/src/include/mpir_op_util.h +@@ -65,6 +65,7 @@ MPIR_OP_TYPE_GROUP(C_INTEGER) + #define MPIR_OP_TYPE_MACRO_HAVE_COMPLEX16(mpi_type_,c_type_,type_name_) + #define MPIR_OP_TYPE_MACRO_HAVE_LONG_LONG(mpi_type_,c_type_,type_name_) + #define MPIR_OP_TYPE_MACRO_HAVE_LONG_DOUBLE(mpi_type_,c_type_,type_name_) ++#define MPIR_OP_TYPE_MACRO_HAVE_FLOAT16(mpi_type_,c_type_,type_name_) + #define MPIR_OP_TYPE_MACRO_HAVE_INTEGER1_CTYPE(mpi_type_,c_type_,type_name_) + #define MPIR_OP_TYPE_MACRO_HAVE_INTEGER2_CTYPE(mpi_type_,c_type_,type_name_) + #define MPIR_OP_TYPE_MACRO_HAVE_INTEGER4_CTYPE(mpi_type_,c_type_,type_name_) +@@ -107,6 +108,10 @@ MPIR_OP_TYPE_GROUP(C_INTEGER) + #undef MPIR_OP_TYPE_MACRO_HAVE_LONG_DOUBLE + #define MPIR_OP_TYPE_MACRO_HAVE_LONG_DOUBLE(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_) + #endif ++#if defined(HAVE_FLOAT16) ++#undef MPIR_OP_TYPE_MACRO_HAVE_FLOAT16 ++#define MPIR_OP_TYPE_MACRO_HAVE_FLOAT16(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_) ++#endif + /* Fortran fixed width integer type support */ + #if defined(MPIR_INTEGER1_CTYPE) + #undef MPIR_OP_TYPE_MACRO_HAVE_INTEGER1_CTYPE +@@ -303,13 +308,15 @@ typedef struct { + MPIR_OP_TYPE_MACRO(MPI_DOUBLE, double, mpir_typename_double) \ + MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(MPI_REAL, MPIR_FC_REAL_CTYPE, mpir_typename_real) \ + MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(MPI_DOUBLE_PRECISION, MPIR_FC_DOUBLE_CTYPE, mpir_typename_double_precision) \ +- MPIR_OP_TYPE_MACRO_HAVE_LONG_DOUBLE(MPI_LONG_DOUBLE, long double, mpir_typename_long_double) \ +- /* The MPI Standard doesn't include these types in the floating point group for +- * predefined operations but MPICH supports them when possible. */ ++ MPIR_OP_TYPE_MACRO_HAVE_LONG_DOUBLE(MPI_LONG_DOUBLE, long double, mpir_typename_long_double) ++ ++/* The MPI Standard doesn't include these types in the floating point group for ++ * predefined operations but MPICH supports them when possible. */ + #define MPIR_OP_TYPE_GROUP_FLOATING_POINT_EXTRA \ + MPIR_OP_TYPE_MACRO_HAVE_REAL4_CTYPE(MPI_REAL4, MPIR_REAL4_CTYPE, mpir_typename_real4) \ + MPIR_OP_TYPE_MACRO_HAVE_REAL8_CTYPE(MPI_REAL8, MPIR_REAL8_CTYPE, mpir_typename_real8) \ +- MPIR_OP_TYPE_MACRO_HAVE_REAL16_CTYPE(MPI_REAL16, MPIR_REAL16_CTYPE, mpir_typename_real16) ++ MPIR_OP_TYPE_MACRO_HAVE_REAL16_CTYPE(MPI_REAL16, MPIR_REAL16_CTYPE, mpir_typename_real16) \ ++ MPIR_OP_TYPE_MACRO_HAVE_FLOAT16(MPIX_C_FLOAT16, _Float16, mpir_typename_float16) + + /* logical group */ + /* FIXME Is MPI_Fint really OK here? */ +--- a/src/include/mpir_pointers.h ++++ b/src/include/mpir_pointers.h +@@ -20,7 +20,7 @@ + #define MPIR_Valid_ptr_class(kind,ptr,errclass,err) \ + do { \ + if (!(ptr)) { \ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, errclass, \ ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, errclass, \ + "**nullptrtype", "**nullptrtype %s", #kind); \ + /* Explicitly tell Coverity that errclass != MPI_SUCCESS => err != MPI_SUCCESS */ \ + MPIR_Assert((errclass) == MPI_SUCCESS || ((err) != MPI_SUCCESS)); \ +@@ -73,17 +73,4 @@ + #define MPIR_Ensure_Aint_fits_in_int(aint) \ + MPIR_Assert((aint) == (MPI_Aint)(int)(aint)); + +-/* +- * Ensure an MPI_Aint value fits into a pointer. +- * Useful for detecting overflow when MPI_Aint is larger than a pointer. +- * +- * \param[in] aint Variable of type MPI_Aint +- */ +-#ifndef SIZEOF_PTR_IS_AINT +-#define MPIR_Ensure_Aint_fits_in_pointer(aint) \ +- MPIR_Assert((aint) == (MPI_Aint)(uintptr_t) MPIR_AINT_CAST_TO_VOID_PTR(aint)); +-#else +-#define MPIR_Ensure_Aint_fits_in_pointer(aint) do {} while (0) +-#endif +- + #endif /* MPIR_POINTERS_H_INCLUDED */ +--- a/src/include/mpir_refcount.h ++++ b/src/include/mpir_refcount.h +@@ -14,9 +14,9 @@ + + #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL + #include "mpir_refcount_global.h" +-/* For the VNI granularity, is this overkill? */ ++/* For the VCI granularity, is this overkill? */ + #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ || \ +- MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++ MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + #include "mpir_refcount_pobj.h" + #endif + +--- a/src/include/mpir_request.h ++++ b/src/include/mpir_request.h +@@ -238,7 +238,7 @@ static inline MPIR_Request *MPIR_Request_create(MPIR_Request_kind_t kind) + if (HANDLE_GET_MPI_KIND(req->handle) != MPIR_REQUEST) { + int mpi_errno; + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**invalid_handle", "**invalid_handle %d", + req->handle); + MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL); +@@ -330,7 +330,7 @@ static inline void MPIR_Request_free(MPIR_Request * req) + #ifdef MPICH_DBG_OUTPUT + if (HANDLE_GET_MPI_KIND(req->handle) != MPIR_REQUEST) { + int mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**invalid_handle", "**invalid_handle %d", + req->handle); + MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL); +@@ -338,7 +338,7 @@ static inline void MPIR_Request_free(MPIR_Request * req) + + if (req->ref_count != 0) { + int mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**invalid_refcount", "**invalid_refcount %d", + req->ref_count); + MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL); +@@ -354,7 +354,7 @@ static inline void MPIR_Request_free(MPIR_Request * req) + MPIR_Comm_release(req->comm); + } + +- if (req->kind == MPIR_REQUEST_KIND__GREQUEST && req->u.ureq.greq_fns != NULL) { ++ if (req->kind == MPIR_REQUEST_KIND__GREQUEST) { + MPL_free(req->u.ureq.greq_fns); + } + +@@ -382,10 +382,6 @@ MPL_STATIC_INLINE_PREFIX void MPIR_Request_attach_sync(MPIR_Request * req_ptr, + * routine (or some a variation of it) is an unfortunately necessary stunt to + * get high message rates on key benchmarks for high-end systems. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Request_completion_processing_fastpath +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIR_Request_completion_processing_fastpath(MPI_Request * request, + MPIR_Request * request_ptr) + { +@@ -408,7 +404,7 @@ MPL_STATIC_INLINE_PREFIX int MPIR_Request_completion_processing_fastpath(MPI_Req + return mpi_errno; + } + +-int MPIR_Request_completion_processing(MPIR_Request *, MPI_Status *, int *); ++int MPIR_Request_completion_processing(MPIR_Request *, MPI_Status *); + int MPIR_Request_get_error(MPIR_Request *); + + MPL_STATIC_INLINE_PREFIX int MPID_Request_is_anysource(MPIR_Request *); +--- a/src/include/mpir_status.h ++++ b/src/include/mpir_status.h +@@ -38,6 +38,13 @@ + + #define MPIR_STATUS_GET_CANCEL_BIT(status_) ((status_).count_hi_and_cancelled & 1) + ++/* Same as MPIR_STATUS_SET_CANCEL_BIT, but check MPI_STATUS_IGNORE as its family. */ ++#define MPIR_Status_set_cancel_bit(status_, cancelled_) \ ++ { \ ++ if ((status_) != MPI_STATUS_IGNORE) \ ++ MPIR_STATUS_SET_CANCEL_BIT(*(status_), cancelled_) \ ++ } ++ + /* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */ + #define MPIR_Status_set_empty(status_) \ + { \ +--- a/src/include/mpir_thread.h ++++ b/src/include/mpir_thread.h +@@ -73,8 +73,8 @@ typedef struct { + #endif + } MPIR_Per_thread_t; + +-#if defined(MPICH_IS_THREADED) && defined(MPL_TLS_SPECIFIER) +-extern MPL_TLS_SPECIFIER MPIR_Per_thread_t MPIR_Per_thread; ++#if defined(MPICH_IS_THREADED) && defined(MPL_TLS) ++extern MPL_TLS MPIR_Per_thread_t MPIR_Per_thread; + #else + extern MPIR_Per_thread_t MPIR_Per_thread; + #endif +@@ -91,7 +91,7 @@ extern MPID_Thread_tls_t MPIR_Per_thread_key; + + #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL || \ + MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ || \ +- MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++ MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + extern MPID_Thread_mutex_t MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX; + #endif + +@@ -167,7 +167,7 @@ MPL_STATIC_INLINE_PREFIX void MPIR_Thread_sync_wait(MPIR_Thread_sync_t * sync) + + #endif /* MPICH_THREAD_USE_MDTA */ + +-#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + extern MPID_Thread_mutex_t MPIR_THREAD_POBJ_HANDLE_MUTEX; + #endif + +--- a/src/include/mpir_type_defs.h ++++ b/src/include/mpir_type_defs.h +@@ -72,10 +72,4 @@ + #define MPIR_Aint_to_ptr(a) (void*)(a) + #endif + +-/* Adding the 32-bit compute/64-bit I/O related type-casts in here as +- * they are not a part of the MPI standard yet. */ +-#define MPIR_AINT_CAST_TO_VOID_PTR (void *)(intptr_t) +-#define MPIR_VOID_PTR_CAST_TO_MPI_AINT (MPI_Aint)(uintptr_t) +-#define MPIR_PTR_DISP_CAST_TO_MPI_AINT (MPI_Aint)(intptr_t) +- + #endif /* MPIR_TYPE_DEFS_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/include/mpir_typerep.h +@@ -0,0 +1,41 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef MPIR_DATALOOP_H_INCLUDED ++#define MPIR_DATALOOP_H_INCLUDED ++ ++#include ++ ++void MPIR_Typerep_create(MPI_Datatype type, void **typerep_p); ++void MPIR_Typerep_free(void **typerep_p); ++void MPIR_Typerep_dup(void *old_typerep, void **new_typerep_p); ++ ++int MPIR_Typerep_flatten_size(MPIR_Datatype * datatype_ptr, int *flattened_type_size); ++int MPIR_Typerep_flatten(MPIR_Datatype * datatype_ptr, void *flattened_type); ++int MPIR_Typerep_unflatten(MPIR_Datatype * datatype_ptr, void *flattened_type); ++ ++int MPIR_Typerep_to_iov(const void *buf, MPI_Aint count, MPI_Datatype type, MPI_Aint offset, ++ MPL_IOV * iov, int max_iov_len, MPI_Aint max_iov_bytes, ++ int *actual_iov_len, MPI_Aint * actual_iov_bytes); ++int MPIR_Typerep_iov_len(const void *buf, MPI_Aint count, MPI_Datatype type, MPI_Aint offset, ++ MPI_Aint max_iov_bytes, MPI_Aint * iov_len); ++ ++int MPIR_Typerep_pack(const void *inbuf, MPI_Aint incount, MPI_Datatype datatype, ++ MPI_Aint inoffset, void *outbuf, MPI_Aint max_pack_bytes, ++ MPI_Aint * actual_pack_bytes); ++int MPIR_Typerep_unpack(const void *inbuf, MPI_Aint insize, ++ void *outbuf, MPI_Aint outcount, MPI_Datatype datatype, MPI_Aint outoffset, ++ MPI_Aint * actual_unpack_bytes); ++ ++int MPIR_Typerep_pack_external(const void *inbuf, MPI_Aint incount, MPI_Datatype datatype, ++ void *outbuf, MPI_Aint * actual_pack_bytes); ++int MPIR_Typerep_unpack_external(const void *inbuf, void *outbuf, MPI_Aint outcount, ++ MPI_Datatype datatype, MPI_Aint * actual_unpack_bytes); ++ ++void MPIR_Typerep_debug(MPI_Datatype type); ++ ++#endif /* MPIR_DATALOOP_H_INCLUDED */ +--- a/src/include/mpir_win.h ++++ b/src/include/mpir_win.h +@@ -73,10 +73,10 @@ struct MPIR_Win { + + char name[MPI_MAX_OBJECT_NAME]; + +- MPIR_Win_flavor_t create_flavor; +- MPIR_Win_model_t model; +- MPIR_Win_flavor_t copyCreateFlavor; +- MPIR_Win_model_t copyModel; ++ int create_flavor; ++ int model; ++ int copyCreateFlavor; ++ int copyModel; + + /* Other, device-specific information */ + #ifdef MPID_DEV_WIN_DECL +--- a/src/include/mpitimpl.h ++++ b/src/include/mpitimpl.h +@@ -75,7 +75,7 @@ typedef union MPIR_T_cvar_value_s { + unsigned ul; + unsigned ull; + MPI_Count c; +- char *str; ++ const char *str; + double f; + MPIR_T_cvar_range_value_t range; + } MPIR_T_cvar_value_t; +@@ -1173,7 +1173,7 @@ static inline int MPIR_T_pvar_unset_first(MPIR_T_pvar_handle_t * handle) + /* A counter that keeps track of the relative balance of calls to + * MPI_T_init_thread and MPI_T_finalize */ + extern int MPIR_T_init_balance; +-static inline int MPIR_T_is_initialized() ++static inline int MPIR_T_is_initialized(void) + { + return MPIR_T_init_balance > 0; + } +--- a/src/mpi/attr/attr_delete.c ++++ b/src/mpi/attr/attr_delete.c +@@ -28,10 +28,6 @@ int MPI_Attr_delete(MPI_Comm comm, int keyval) __attribute__ ((weak, alias("PMPI + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Attr_delete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Attr_delete - Deletes an attribute value associated with a key on a +@@ -115,11 +111,11 @@ int MPI_Attr_delete(MPI_Comm comm, int keyval) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_attr_delete", "**mpi_attr_delete %C %d", comm, keyval); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/attr_get.c ++++ b/src/mpi/attr/attr_get.c +@@ -28,10 +28,6 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Attr_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Attr_get - Retrieves attribute value by key +@@ -140,12 +136,12 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_attr_get", "**mpi_attr_get %C %d %p %p", comm, keyval, + attribute_val, flag); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/attr_put.c ++++ b/src/mpi/attr/attr_put.c +@@ -28,10 +28,6 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Attr_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Attr_put - Stores attribute value associated with a key +@@ -132,12 +128,12 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_attr_put", "**mpi_attr_put %C %d %p", comm, keyval, + attribute_val); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/attrutil.c ++++ b/src/mpi/attr/attrutil.c +@@ -27,8 +27,7 @@ + #endif + + /* Preallocated keyval objects */ +-MPII_Keyval MPII_Keyval_direct[MPID_KEYVAL_PREALLOC] = { {0} +-}; ++MPII_Keyval MPII_Keyval_direct[MPID_KEYVAL_PREALLOC]; + + MPIR_Object_alloc_t MPII_Keyval_mem = { 0, 0, 0, 0, MPIR_KEYVAL, + sizeof(MPII_Keyval), +@@ -41,8 +40,7 @@ MPIR_Object_alloc_t MPII_Keyval_mem = { 0, 0, 0, 0, MPIR_KEYVAL, + #endif + + /* Preallocated keyval objects */ +-MPIR_Attribute MPID_Attr_direct[MPIR_ATTR_PREALLOC] = { {0} +-}; ++MPIR_Attribute MPID_Attr_direct[MPIR_ATTR_PREALLOC]; + + MPIR_Object_alloc_t MPID_Attr_mem = { 0, 0, 0, 0, MPIR_ATTR, + sizeof(MPIR_Attribute), +@@ -66,10 +64,6 @@ void MPID_Attr_free(MPIR_Attribute * attr_ptr) + MPIR_Handle_obj_free(&MPID_Attr_mem, attr_ptr); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Call_attr_delete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* + This function deletes a single attribute. + It is called by both the function to delete a list and attribute set/put +@@ -110,8 +104,8 @@ int MPIR_Call_attr_delete(int handle, MPIR_Attribute * attr_p) + mpi_errno = rc; + #else + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**user", "**userdel %d", rc); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**user", "**userdel %d", rc); + #endif + goto fn_fail; + } +@@ -135,10 +129,6 @@ int MPIR_Call_attr_delete(int handle, MPIR_Attribute * attr_p) + + Note that this simply invokes the attribute copy function. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Call_attr_copy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Call_attr_copy(int handle, MPIR_Attribute * attr_p, void **value_copy, int *flag) + { + int mpi_errno = MPI_SUCCESS; +@@ -160,8 +150,8 @@ int MPIR_Call_attr_copy(int handle, MPIR_Attribute * attr_p, void **value_copy, + mpi_errno = rc; + #else + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**user", "**usercopy %d", rc); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**user", "**usercopy %d", rc); + #endif + goto fn_fail; + } +@@ -172,10 +162,6 @@ int MPIR_Call_attr_copy(int handle, MPIR_Attribute * attr_p, void **value_copy, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Attr_dup_list +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* Routine to duplicate an attribute list */ + int MPIR_Attr_dup_list(int handle, MPIR_Attribute * old_attrs, MPIR_Attribute ** new_attr) + { +@@ -202,7 +188,7 @@ int MPIR_Attr_dup_list(int handle, MPIR_Attribute * old_attrs, MPIR_Attribute ** + /* --BEGIN ERROR HANDLING-- */ + if (!new_p) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**nomem", 0); + goto fn_fail; + } +@@ -233,10 +219,6 @@ int MPIR_Attr_dup_list(int handle, MPIR_Attribute * old_attrs, MPIR_Attribute ** + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Attr_delete_list +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* Routine to delete an attribute list */ + int MPIR_Attr_delete_list(int handle, MPIR_Attribute ** attr) + { +--- a/src/mpi/attr/comm_create_keyval.c ++++ b/src/mpi/attr/comm_create_keyval.c +@@ -38,10 +38,6 @@ int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function * comm_copy_attr_fn, + #undef MPI_Comm_create_keyval + #define MPI_Comm_create_keyval PMPI_Comm_create_keyval + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_create_keyval_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_create_keyval_impl(MPI_Comm_copy_attr_function * comm_copy_attr_fn, + MPI_Comm_delete_attr_function * comm_delete_attr_fn, + int *comm_keyval, void *extra_state) +@@ -81,10 +77,6 @@ int MPIR_Comm_create_keyval_impl(MPI_Comm_copy_attr_function * comm_copy_attr_fn + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_create_keyval +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_create_keyval - Create a new attribute key + +@@ -164,12 +156,12 @@ int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function * comm_copy_attr_fn, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_create_keyval", "**mpi_comm_create_keyval %p %p %p %p", + comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/comm_delete_attr.c ++++ b/src/mpi/attr/comm_delete_attr.c +@@ -27,10 +27,6 @@ int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval) + #undef MPI_Comm_delete_attr + #define MPI_Comm_delete_attr PMPI_Comm_delete_attr + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_delete_attr_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_delete_attr_impl(MPIR_Comm * comm_ptr, MPII_Keyval * keyval_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -84,10 +80,6 @@ int MPIR_Comm_delete_attr_impl(MPIR_Comm * comm_ptr, MPII_Keyval * keyval_ptr) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_delete_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_delete_attr - Deletes an attribute value associated with a key on + a communicator +@@ -171,12 +163,12 @@ int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_delete_attr", "**mpi_comm_delete_attr %C %d", comm, + comm_keyval); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/comm_free_keyval.c ++++ b/src/mpi/attr/comm_free_keyval.c +@@ -26,10 +26,6 @@ int MPI_Comm_free_keyval(int *comm_keyval) __attribute__ ((weak, alias("PMPI_Com + #undef MPI_Comm_free_keyval + #define MPI_Comm_free_keyval PMPI_Comm_free_keyval + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_free_keyval_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Comm_free_keyval_impl(int keyval) + { + int in_use; +@@ -49,10 +45,6 @@ void MPIR_Comm_free_keyval_impl(int keyval) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_free_keyval +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_free_keyval - Frees an attribute key for communicators + +@@ -131,11 +123,11 @@ int MPI_Comm_free_keyval(int *comm_keyval) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_free_keyval", "**mpi_comm_free_keyval %p", + comm_keyval); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/attr/comm_get_attr.c ++++ b/src/mpi/attr/comm_get_attr.c +@@ -26,10 +26,6 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int * + #undef MPI_Comm_get_attr + #define MPI_Comm_get_attr PMPI_Comm_get_attr + +-#undef FUNCNAME +-#define FUNCNAME MPII_Comm_get_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* Find the requested attribute. If it exists, return either the attribute + entry or the address of the entry, based on whether the request is for + a pointer-valued attribute (C or C++) or an integer-valued attribute +@@ -270,12 +266,12 @@ int MPII_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpir_comm_get_attr", "**mpir_comm_get_attr %C %d %p %p", comm, + comm_keyval, attribute_val, flag); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +@@ -298,10 +294,6 @@ int MPII_Comm_get_attr_fort(MPI_Comm comm, int comm_keyval, void *attribute_val, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_get_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /* FIXME: Attributes must be visable from all languages */ + /*@ +@@ -361,7 +353,7 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int * + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_get_attr", "**mpi_comm_get_attr %C %d %p %p", comm, + comm_keyval, attribute_val, flag); + } +--- a/src/mpi/attr/comm_set_attr.c ++++ b/src/mpi/attr/comm_set_attr.c +@@ -27,10 +27,6 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val) + #undef MPI_Comm_set_attr + #define MPI_Comm_set_attr PMPI_Comm_set_attr + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_set_attr_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_set_attr_impl(MPIR_Comm * comm_ptr, int comm_keyval, void *attribute_val, + MPIR_Attr_type attrType) + { +@@ -104,10 +100,6 @@ int MPIR_Comm_set_attr_impl(MPIR_Comm * comm_ptr, int comm_keyval, void *attribu + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Comm_set_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, MPIR_Attr_type attrType) + { + int mpi_errno = MPI_SUCCESS; +@@ -172,21 +164,17 @@ int MPII_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, MPIR + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_set_attr", "**mpi_comm_set_attr %C %d %p", comm, + comm_keyval, attribute_val); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_set_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_set_attr - Stores attribute value associated with a key + +@@ -281,7 +269,7 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_set_attr", "**mpi_comm_set_attr %C %d %p", comm, + comm_keyval, attribute_val); + } +--- a/src/mpi/attr/keyval_create.c ++++ b/src/mpi/attr/keyval_create.c +@@ -29,10 +29,6 @@ int MPI_Keyval_create(MPI_Copy_function * copy_fn, MPI_Delete_function * delete_ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Keyval_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Keyval_create - Greates a new attribute key +@@ -108,12 +104,12 @@ int MPI_Keyval_create(MPI_Copy_function * copy_fn, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_keyval_create", "**mpi_keyval_create %p %p %p %p", copy_fn, + delete_fn, keyval, extra_state); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/keyval_free.c ++++ b/src/mpi/attr/keyval_free.c +@@ -28,10 +28,6 @@ int MPI_Keyval_free(int *keyval) __attribute__ ((weak, alias("PMPI_Keyval_free") + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Keyval_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Keyval_free - Frees an attribute key for communicators +@@ -112,10 +108,10 @@ int MPI_Keyval_free(int *keyval) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_keyval_free", "**mpi_keyval_free %p", keyval); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/attr/type_create_keyval.c ++++ b/src/mpi/attr/type_create_keyval.c +@@ -40,10 +40,6 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function * type_copy_attr_fn, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_keyval +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_keyval - Create an attribute keyval for MPI datatypes + +@@ -136,12 +132,12 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function * type_copy_attr_fn, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_keyval", "**mpi_type_create_keyval %p %p %p %p", + type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/type_delete_attr.c ++++ b/src/mpi/attr/type_delete_attr.c +@@ -29,10 +29,6 @@ int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_delete_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_delete_attr - Deletes an attribute value associated with a key on + a datatype +@@ -151,12 +147,12 @@ int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_delete_attr", "**mpi_type_delete_attr %D %d", datatype, + type_keyval); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/type_free_keyval.c ++++ b/src/mpi/attr/type_free_keyval.c +@@ -28,10 +28,6 @@ int MPI_Type_free_keyval(int *type_keyval) __attribute__ ((weak, alias("PMPI_Typ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_free_keyval +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_free_keyval - Frees an attribute key for datatypes + +@@ -113,11 +109,11 @@ int MPI_Type_free_keyval(int *type_keyval) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_free_keyval", "**mpi_type_free_keyval %p", + type_keyval); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/attr/type_get_attr.c ++++ b/src/mpi/attr/type_get_attr.c +@@ -27,10 +27,6 @@ int MPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_va + #undef MPI_Type_get_attr + #define MPI_Type_get_attr PMPI_Type_get_attr + +-#undef FUNCNAME +-#define FUNCNAME MPII_Type_get_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val, + int *flag, MPIR_Attr_type outAttrType) + { +@@ -135,21 +131,17 @@ int MPII_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_v + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpir_type_get_attr", "**mpir_type_get_attr %D %d %p %p", + datatype, type_keyval, attribute_val, flag); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_get_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + MPI_Type_get_attr - Retrieves attribute value by key +@@ -206,12 +198,12 @@ int MPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_va + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_get_attr", "**mpi_type_get_attr %D %d %p %p", datatype, + type_keyval, attribute_val, flag); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/type_set_attr.c ++++ b/src/mpi/attr/type_set_attr.c +@@ -27,10 +27,6 @@ int MPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_va + #undef MPI_Type_set_attr + #define MPI_Type_set_attr PMPI_Type_set_attr + +-#undef FUNCNAME +-#define FUNCNAME MPII_Type_set_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val, + MPIR_Attr_type attrType) + { +@@ -150,22 +146,18 @@ int MPII_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_v + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_set_attr", "**mpi_type_set_attr %D %d %p", datatype, + type_keyval, attribute_val); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_set_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_set_attr - Stores attribute value associated with a key + +@@ -211,12 +203,12 @@ int MPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_va + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_set_attr", "**mpi_type_set_attr %D %d %p", datatype, + type_keyval, attribute_val); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/win_create_keyval.c ++++ b/src/mpi/attr/win_create_keyval.c +@@ -40,10 +40,6 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function * win_copy_attr_fn, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_create_keyval +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_create_keyval - Create an attribute keyval for MPI window objects + +@@ -132,12 +128,12 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function * win_copy_attr_fn, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_create_keyval", "**mpi_win_create_keyval %p %p %p %p", + win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/win_delete_attr.c ++++ b/src/mpi/attr/win_delete_attr.c +@@ -29,10 +29,6 @@ int MPI_Win_delete_attr(MPI_Win win, int win_keyval) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_delete_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_delete_attr - Deletes an attribute value associated with a key on + a datatype +@@ -152,12 +148,12 @@ int MPI_Win_delete_attr(MPI_Win win, int win_keyval) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_delete_attr", "**mpi_win_delete_attr %W %d", win, + win_keyval); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/attr/win_free_keyval.c ++++ b/src/mpi/attr/win_free_keyval.c +@@ -28,10 +28,6 @@ int MPI_Win_free_keyval(int *win_keyval) __attribute__ ((weak, alias("PMPI_Win_f + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_free_keyval +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_free_keyval - Frees an attribute key for MPI RMA windows + +@@ -114,10 +110,10 @@ int MPI_Win_free_keyval(int *win_keyval) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_free_keyval", "**mpi_win_free_keyval %p", win_keyval); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/attr/win_get_attr.c ++++ b/src/mpi/attr/win_get_attr.c +@@ -26,10 +26,6 @@ int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, int *flag + #undef MPI_Win_get_attr + #define MPI_Win_get_attr PMPI_Win_get_attr + +-#undef FUNCNAME +-#define FUNCNAME MPII_Win_get_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, + int *flag, MPIR_Attr_type outAttrType) + { +@@ -128,7 +124,7 @@ int MPII_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, + case MPII_ATTR_C_TO_FORTRAN(MPI_WIN_BASE): + /* The Fortran routine that matches this routine should + * provide an address-sized integer, not an MPI_Fint */ +- *attr_int = MPIR_VOID_PTR_CAST_TO_MPI_AINT(win_ptr->base); ++ *attr_int = (MPI_Aint) win_ptr->base; + break; + case MPII_ATTR_C_TO_FORTRAN(MPI_WIN_SIZE): + /* We do not need to copy because we return the value, +@@ -203,21 +199,17 @@ int MPII_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpir_wingetattr", "**mpir_wingetattr %W %d %p %p", win, + win_keyval, attribute_val, flag); + } +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_get_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_get_attr - Get attribute cached on an MPI window object + +@@ -273,12 +265,12 @@ int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, int *flag + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_get_attr", "**mpi_win_get_attr %W %d %p %p", win, + win_keyval, attribute_val, flag); + } + MPIR_Win_get_ptr(win, win_ptr); +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + #endif + goto fn_exit; + /* --END ERROR HANDLING-- */ +--- a/src/mpi/attr/win_set_attr.c ++++ b/src/mpi/attr/win_set_attr.c +@@ -27,10 +27,6 @@ int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val) + #undef MPI_Win_set_attr + #define MPI_Win_set_attr PMPI_Win_set_attr + +-#undef FUNCNAME +-#define FUNCNAME MPII_Win_set_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val, MPIR_Attr_type attrType) + { + int mpi_errno = MPI_SUCCESS; +@@ -152,21 +148,17 @@ int MPII_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val, MPIR_Att + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_set_attr", "**mpi_win_set_attr %W %d %p", win, + win_keyval, attribute_val); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_set_attr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + MPI_Win_set_attr - Stores attribute value associated with a key +@@ -217,7 +209,7 @@ int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_set_attr", "**mpi_win_set_attr %W %d %p", win, + win_keyval, attribute_val); + } +--- a/src/mpi/coll/algorithms/common/algo_common.h ++++ b/src/mpi/coll/algorithms/common/algo_common.h +@@ -14,10 +14,6 @@ + + /* This is a simple function to compare two integers. + * It is used for sorting list of ranks. */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Algo_compare_int +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* Avoid unused function warning in certain configurations */ + static int MPII_Algo_compare_int(const void *a, const void *b) ATTRIBUTE((unused)); + static int MPII_Algo_compare_int(const void *a, const void *b) +@@ -25,24 +21,20 @@ static int MPII_Algo_compare_int(const void *a, const void *b) + return (*(int *) a - *(int *) b); + } + +-#undef FUNCNAME +-#define FUNCNAME MPII_Algo_calculate_pipeline_chunk_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* Avoid unused function warning in certain configurations */ +-static int MPII_Algo_calculate_pipeline_chunk_info(int maxbytes, int type_size, int count, +- int *num_segments, int *segsize_floor, +- int *segsize_ceil) ATTRIBUTE((unused)); +-static int MPII_Algo_calculate_pipeline_chunk_info(int maxbytes, +- int type_size, int count, +- int *num_segments, +- int *segsize_floor, int *segsize_ceil) ++static inline int MPIR_Algo_calculate_pipeline_chunk_info(int maxbytes, int type_size, int count, ++ int *num_segments, int *segsize_floor, ++ int *segsize_ceil) ATTRIBUTE((unused)); ++static inline int MPIR_Algo_calculate_pipeline_chunk_info(int maxbytes, ++ int type_size, int count, ++ int *num_segments, ++ int *segsize_floor, int *segsize_ceil) + { + int maxelems; + int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPII_ALGO_CALCULATE_PIPELINE_CHUNK_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPII_ALGO_CALCULATE_PIPELINE_CHUNK_INFO); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_ALGO_CALCULATE_PIPELINE_CHUNK_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_ALGO_CALCULATE_PIPELINE_CHUNK_INFO); + + if (count == 0 || type_size == 0) { + *num_segments = *segsize_floor = *segsize_ceil = 0; +@@ -65,7 +57,7 @@ static int MPII_Algo_calculate_pipeline_chunk_info(int maxbytes, + + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "num_segments %d", *num_segments)); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPII_ALGO_CALCULATE_PIPELINE_CHUNK_INFO); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_ALGO_CALCULATE_PIPELINE_CHUNK_INFO); + + fn_exit: + return mpi_errno; +--- a/src/mpi/coll/algorithms/recexchalgo/recexchalgo.c ++++ b/src/mpi/coll/algorithms/recexchalgo/recexchalgo.c +@@ -11,7 +11,7 @@ + #include "mpiimpl.h" + #include "recexchalgo.h" + +-int MPII_Recexchalgo_init() ++int MPII_Recexchalgo_init(void) + { + int mpi_errno = MPI_SUCCESS; + +@@ -45,10 +45,6 @@ int MPII_Recexchalgo_comm_cleanup(MPIR_Comm * comm) + * participating in Step 2. In Step 3, the ranks that participated in Step 2 send + * the final data to non-partcipating ranks. + */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Recexchalgo_get_neighbors +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Recexchalgo_get_neighbors(int rank, int nranks, int *k_, + int *step1_sendto, int **step1_recvfrom_, int *step1_nrecvs, + int ***step2_nbrs_, int *step2_nphases, int *p_of_k_, int *T_) +@@ -142,18 +138,20 @@ int MPII_Recexchalgo_get_neighbors(int rank, int nranks, int *k_, + if (*step1_sendto == -1) { /* calulate step2_nbrs only for participating ranks */ + int *digit = (int *) MPL_malloc(sizeof(int) * log_p_of_k, MPL_MEM_COLL); + MPIR_Assert(digit != NULL); +- int temprank = newrank, index = 0, remainder; ++ int temprank = newrank; + int mask = 0x1; + int phase = 0, cbit, cnt, nbr, power; + + /* calculate the digits in base k representation of newrank */ + for (i = 0; i < log_p_of_k; i++) + digit[i] = 0; ++ ++ int remainder, i_digit = 0; + while (temprank != 0) { + remainder = temprank % k; + temprank = temprank / k; +- digit[index] = remainder; +- index++; ++ digit[i_digit] = remainder; ++ i_digit++; + } + + while (mask < p_of_k) { +@@ -196,10 +194,6 @@ int MPII_Recexchalgo_get_neighbors(int rank, int nranks, int *k_, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Recexchalgo_origrank_to_step2rank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Recexchalgo_origrank_to_step2rank(int rank, int rem, int T, int k) + { + int step2rank; +@@ -215,10 +209,6 @@ int MPII_Recexchalgo_origrank_to_step2rank(int rank, int rem, int T, int k) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Recexchalgo_step2rank_to_origrank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Recexchalgo_step2rank_to_origrank(int rank, int rem, int T, int k) + { + int orig_rank; +@@ -238,10 +228,6 @@ int MPII_Recexchalgo_step2rank_to_origrank(int rank, int rem, int T, int k) + * phase in recursive exchange algorithms in collective operations like Allgather, + * Allgatherv, Reducescatter. + */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Recexchalgo_get_count_and_offset +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Recexchalgo_get_count_and_offset(int rank, int phase, int k, int nranks, int *count, + int *offset) + { +@@ -290,16 +276,11 @@ int MPII_Recexchalgo_get_count_and_offset(int rank, int phase, int k, int nranks + * 2. Calculates the digit reversed (in base 'k' representation) rank of the Step 2 rank + * 3. Convert the digit reversed rank in the previous Step to the original rank. + */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Recexchalgo_reverse_digits_step2 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Recexchalgo_reverse_digits_step2(int rank, int comm_size, int k) + { + int i, T, rem, power, step2rank, step2_reverse_rank = 0; + int pofk = 1, log_pofk = 0; + int *digit, *digit_reverse; +- int remainder, index = 0; + int mpi_errno = MPI_SUCCESS; + MPIR_CHKLMEM_DECL(2); + +@@ -326,11 +307,13 @@ int MPII_Recexchalgo_reverse_digits_step2(int rank, int comm_size, int k) + mpi_errno, "digit_reverse buffer", MPL_MEM_COLL); + for (i = 0; i < log_pofk; i++) + digit[i] = 0; ++ ++ int remainder, i_digit = 0; + while (step2rank != 0) { + remainder = step2rank % k; + step2rank = step2rank / k; +- digit[index] = remainder; +- index++; ++ digit[i_digit] = remainder; ++ i_digit++; + } + + /* reverse the number in base k representation to get the step2_reverse_rank +@@ -357,5 +340,7 @@ int MPII_Recexchalgo_reverse_digits_step2(int rank, int comm_size, int k) + MPIR_CHKLMEM_FREEALL(); + return step2_reverse_rank; + fn_fail: ++ /* TODO - Replace this with real error handling */ ++ MPIR_Assert(MPI_SUCCESS == mpi_errno); + goto fn_exit; + } +--- a/src/mpi/coll/algorithms/stubalgo/stubalgo.c ++++ b/src/mpi/coll/algorithms/stubalgo/stubalgo.c +@@ -10,7 +10,7 @@ + + #include "mpiimpl.h" + +-int MPII_Stubalgo_init() ++int MPII_Stubalgo_init(void) + { + return MPI_SUCCESS; + } +--- a/src/mpi/coll/algorithms/treealgo/treealgo.c ++++ b/src/mpi/coll/algorithms/treealgo/treealgo.c +@@ -11,7 +11,7 @@ + #include "treealgo.h" + #include "treeutil.h" + +-int MPII_Treealgo_init() ++int MPII_Treealgo_init(void) + { + int mpi_errno = MPI_SUCCESS; + +@@ -35,17 +35,13 @@ int MPII_Treealgo_comm_cleanup(MPIR_Comm * comm) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Treealgo_tree_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPII_Treealgo_tree_create(int rank, int nranks, int tree_type, int k, int root, +- MPII_Treealgo_tree_t * ct) ++int MPIR_Treealgo_tree_create(int rank, int nranks, int tree_type, int k, int root, ++ MPIR_Treealgo_tree_t * ct) + { + int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPII_TREEALGO_TREE_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPII_TREEALGO_TREE_INIT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TREEALGO_TREE_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TREEALGO_TREE_INIT); + + switch (tree_type) { + case MPIR_TREE_TYPE_KARY: +@@ -72,7 +68,7 @@ int MPII_Treealgo_tree_create(int rank, int nranks, int tree_type, int k, int ro + break; + } + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPII_TREEALGO_TREE_INIT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TREEALGO_TREE_INIT); + + fn_exit: + return mpi_errno; +@@ -82,11 +78,7 @@ int MPII_Treealgo_tree_create(int rank, int nranks, int tree_type, int k, int ro + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Treealgo_tree_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPII_Treealgo_tree_free(MPII_Treealgo_tree_t * tree) ++void MPIR_Treealgo_tree_free(MPIR_Treealgo_tree_t * tree) + { + utarray_free(tree->children); + } +--- a/src/mpi/coll/algorithms/treealgo/treealgo.h ++++ b/src/mpi/coll/algorithms/treealgo/treealgo.h +@@ -16,8 +16,8 @@ + int MPII_Treealgo_init(void); + int MPII_Treealgo_comm_init(MPIR_Comm * comm); + int MPII_Treealgo_comm_cleanup(MPIR_Comm * comm); +-int MPII_Treealgo_tree_create(int rank, int nranks, int tree_type, int k, int root, +- MPII_Treealgo_tree_t * ct); +-void MPII_Treealgo_tree_free(MPII_Treealgo_tree_t * tree); ++int MPIR_Treealgo_tree_create(int rank, int nranks, int tree_type, int k, int root, ++ MPIR_Treealgo_tree_t * ct); ++void MPIR_Treealgo_tree_free(MPIR_Treealgo_tree_t * tree); + + #endif /* TREEALGO_H_INCLUDED */ +--- a/src/mpi/coll/algorithms/treealgo/treealgo_types.h ++++ b/src/mpi/coll/algorithms/treealgo/treealgo_types.h +@@ -18,6 +18,6 @@ typedef struct { + int parent; + int num_children; + UT_array *children; +-} MPII_Treealgo_tree_t; ++} MPIR_Treealgo_tree_t; + + #endif /* TREEALGO_TYPES_H_INCLUDED */ +--- a/src/mpi/coll/algorithms/treealgo/treeutil.c ++++ b/src/mpi/coll/algorithms/treealgo/treeutil.c +@@ -15,11 +15,7 @@ + #include "treeutil.h" + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME tree_add_child +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int tree_add_child(MPII_Treealgo_tree_t * t, int rank) ++static int tree_add_child(MPIR_Treealgo_tree_t * t, int rank) + { + int mpi_errno = MPI_SUCCESS; + +@@ -30,11 +26,7 @@ static int tree_add_child(MPII_Treealgo_tree_t * t, int rank) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Treeutil_tree_kary_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPII_Treeutil_tree_kary_init(int rank, int nranks, int k, int root, MPII_Treealgo_tree_t * ct) ++int MPII_Treeutil_tree_kary_init(int rank, int nranks, int k, int root, MPIR_Treealgo_tree_t * ct) + { + int lrank, child; + int mpi_errno = MPI_SUCCESS; +@@ -83,14 +75,10 @@ int MPII_Treeutil_tree_kary_init(int rank, int nranks, int k, int root, MPII_Tre + * | + * 3 + */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Treeutil_tree_knomial_1_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Treeutil_tree_knomial_1_init(int rank, int nranks, int k, int root, +- MPII_Treealgo_tree_t * ct) ++ MPIR_Treealgo_tree_t * ct) + { +- int lrank, i, j, maxtime, tmp, time, parent, current_rank, running_rank, crank; ++ int lrank, i, j, maxstep, tmp, step, parent, current_rank, running_rank, crank; + int mpi_errno = MPI_SUCCESS; + + ct->rank = rank; +@@ -106,20 +94,20 @@ int MPII_Treeutil_tree_knomial_1_init(int rank, int nranks, int k, int root, + MPIR_Assert(k >= 2); + + /* maximum number of steps while generating the knomial tree */ +- maxtime = 0; ++ maxstep = 0; + for (tmp = nranks - 1; tmp; tmp /= k) +- maxtime++; ++ maxstep++; + + utarray_new(ct->children, &ut_int_icd, MPL_MEM_COLL); + ct->num_children = 0; +- time = 0; ++ step = 0; + parent = -1; /* root has no parent */ + current_rank = 0; /* start at root of the tree */ + running_rank = current_rank + 1; /* used for calculation below + * start with first child of the current_rank */ + +- for (time = 0;; time++) { +- MPIR_Assert(time <= nranks); /* actually, should not need more steps than log_k(nranks) */ ++ for (step = 0;; step++) { ++ MPIR_Assert(step <= nranks); /* actually, should not need more steps than log_k(nranks) */ + + /* desired rank found */ + if (lrank == current_rank) +@@ -127,7 +115,7 @@ int MPII_Treeutil_tree_knomial_1_init(int rank, int nranks, int k, int root, + + /* check if rank lies in this range */ + for (j = 1; j < k; j++) { +- if (lrank >= running_rank && lrank < running_rank + MPL_ipow(k, maxtime - time - 1)) { ++ if (lrank >= running_rank && lrank < running_rank + MPL_ipow(k, maxstep - step - 1)) { + /* move to the corresponding subtree */ + parent = current_rank; + current_rank = running_rank; +@@ -135,7 +123,7 @@ int MPII_Treeutil_tree_knomial_1_init(int rank, int nranks, int k, int root, + break; + } + +- running_rank += MPL_ipow(k, maxtime - time - 1); ++ running_rank += MPL_ipow(k, maxstep - step - 1); + } + } + +@@ -150,7 +138,7 @@ int MPII_Treeutil_tree_knomial_1_init(int rank, int nranks, int k, int root, + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, + (MPL_DBG_FDEST, "parent of rank %d is %d, total ranks = %d (root=%d)", rank, + ct->parent, nranks, root)); +- for (i = time; i < maxtime; i++) { ++ for (i = step; i < maxstep; i++) { + for (j = 1; j < k; j++) { + if (crank < nranks) { + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, +@@ -160,7 +148,7 @@ int MPII_Treeutil_tree_knomial_1_init(int rank, int nranks, int k, int root, + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +- crank += MPL_ipow(k, maxtime - i - 1); ++ crank += MPL_ipow(k, maxstep - i - 1); + } + } + +@@ -182,12 +170,8 @@ int MPII_Treeutil_tree_knomial_1_init(int rank, int nranks, int k, int root, + * | + * 7 + */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Treeutil_tree_knomial_2_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Treeutil_tree_knomial_2_init(int rank, int nranks, int k, int root, +- MPII_Treealgo_tree_t * ct) ++ MPIR_Treealgo_tree_t * ct) + { + int mpi_errno = MPI_SUCCESS; + int lrank, i, j, depth; +@@ -248,6 +232,5 @@ int MPII_Treeutil_tree_knomial_2_init(int rank, int nranks, int k, int root, + ct->parent, nranks, root)); + MPL_free(flip_bit); + +- fn_exit: + return mpi_errno; + } +--- a/src/mpi/coll/algorithms/treealgo/treeutil.h ++++ b/src/mpi/coll/algorithms/treealgo/treeutil.h +@@ -13,14 +13,14 @@ + #define TREEUTIL_H_INCLUDED + + /* Generate kary tree information for rank 'rank' */ +-int MPII_Treeutil_tree_kary_init(int rank, int nranks, int k, int root, MPII_Treealgo_tree_t * ct); ++int MPII_Treeutil_tree_kary_init(int rank, int nranks, int k, int root, MPIR_Treealgo_tree_t * ct); + + /* Generate knomial_1 tree information for rank 'rank' */ + int MPII_Treeutil_tree_knomial_1_init(int rank, int nranks, int k, int root, +- MPII_Treealgo_tree_t * ct); ++ MPIR_Treealgo_tree_t * ct); + + /* Generate knomial_2 tree information for rank 'rank' */ + int MPII_Treeutil_tree_knomial_2_init(int rank, int nranks, int k, int root, +- MPII_Treealgo_tree_t * ct); ++ MPIR_Treealgo_tree_t * ct); + + #endif /* TREEUTIL_H_INCLUDED */ +--- a/src/mpi/coll/allgather/allgather.c ++++ b/src/mpi/coll/allgather/allgather.c +@@ -37,7 +37,7 @@ cvars: + + - name : MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -52,7 +52,7 @@ cvars: + + - name : MPIR_CVAR_ALLGATHER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -100,10 +100,6 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, voi + #undef MPI_Allgather + #define MPI_Allgather PMPI_Allgather + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather_intra_auto(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -151,10 +147,6 @@ int MPIR_Allgather_intra_auto(const void *sendbuf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather_inter_auto(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -171,10 +163,6 @@ int MPIR_Allgather_inter_auto(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -183,28 +171,28 @@ int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtyp + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Allgather_intra_algo_choice) { +- case MPIR_ALLGATHER_INTRA_ALGO_BRUCKS: ++ switch (MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM_brucks: + mpi_errno = + MPIR_Allgather_intra_brucks(sendbuf, sendcount, sendtype, recvbuf, recvcount, + recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLGATHER_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = + MPIR_Allgather_intra_recursive_doubling(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLGATHER_INTRA_ALGO_RING: ++ case MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM_ring: + mpi_errno = + MPIR_Allgather_intra_ring(sendbuf, sendcount, sendtype, recvbuf, recvcount, + recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLGATHER_INTRA_ALGO_NB: ++ case MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM_nb: + mpi_errno = + MPIR_Allgather_allcomm_nb(sendbuf, sendcount, sendtype, recvbuf, recvcount, + recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLGATHER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -214,19 +202,19 @@ int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtyp + } + } else { + /* intercommunicator */ +- switch (MPIR_Allgather_inter_algo_choice) { +- case MPIR_ALLGATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_BCAST: ++ switch (MPIR_CVAR_ALLGATHER_INTER_ALGORITHM) { ++ case MPIR_CVAR_ALLGATHER_INTER_ALGORITHM_local_gather_remote_bcast: + mpi_errno = + MPIR_Allgather_inter_local_gather_remote_bcast(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLGATHER_INTER_ALGO_NB: ++ case MPIR_CVAR_ALLGATHER_INTER_ALGORITHM_nb: + mpi_errno = + MPIR_Allgather_allcomm_nb(sendbuf, sendcount, sendtype, recvbuf, recvcount, + recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLGATHER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_ALLGATHER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -244,10 +232,6 @@ int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtyp + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -268,10 +252,6 @@ int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Allgather - Gathers data from all tasks and distribute the combined + data to all tasks +@@ -418,12 +398,12 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_allgather", "**mpi_allgather %p %d %D %p %d %D %C", sendbuf, + sendcount, sendtype, recvbuf, recvcount, recvtype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/allgather/allgather_allcomm_nb.c ++++ b/src/mpi/coll/allgather/allgather_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c ++++ b/src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c +@@ -14,10 +14,6 @@ + * broadcast. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather_inter_local_gather_remote_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -25,7 +21,7 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, int send + { + int rank, local_size, remote_size, mpi_errno = MPI_SUCCESS, root; + int mpi_errno_ret = MPI_SUCCESS; +- MPI_Aint true_extent, true_lb = 0, extent, send_extent; ++ MPI_Aint sendtype_sz; + void *tmp_buf = NULL; + MPIR_Comm *newcomm_ptr = NULL; + +@@ -38,17 +34,12 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, int send + if ((rank == 0) && (sendcount != 0)) { + /* In each group, rank 0 allocates temp. buffer for local + * gather */ +- MPIR_Type_get_true_extent_impl(sendtype, &true_lb, &true_extent); +- +- MPIR_Datatype_get_extent_macro(sendtype, send_extent); +- extent = MPL_MAX(send_extent, true_extent); +- +- MPIR_Ensure_Aint_fits_in_pointer(extent * sendcount * local_size); +- MPIR_CHKLMEM_MALLOC(tmp_buf, void *, extent * sendcount * local_size, mpi_errno, "tmp_buf", +- MPL_MEM_BUFFER); +- +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - true_lb); ++ MPIR_Datatype_get_size_macro(sendtype, sendtype_sz); ++ MPIR_CHKLMEM_MALLOC(tmp_buf, void *, sendcount * sendtype_sz * local_size, mpi_errno, ++ "tmp_buf", MPL_MEM_BUFFER); ++ } else { ++ /* silence -Wmaybe-uninitialized due to MPIR_{Gather,Bcast} calls by non-zero ranks */ ++ sendtype_sz = 0; + } + + /* Get the local intracommunicator */ +@@ -58,8 +49,8 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, int send + newcomm_ptr = comm_ptr->local_comm; + + if (sendcount != 0) { +- mpi_errno = MPIR_Gather(sendbuf, sendcount, sendtype, tmp_buf, sendcount, +- sendtype, 0, newcomm_ptr, errflag); ++ mpi_errno = MPIR_Gather(sendbuf, sendcount, sendtype, tmp_buf, sendcount * sendtype_sz, ++ MPI_BYTE, 0, newcomm_ptr, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ + *errflag = +@@ -76,8 +67,8 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, int send + /* bcast to right */ + if (sendcount != 0) { + root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; +- mpi_errno = MPIR_Bcast(tmp_buf, sendcount * local_size, +- sendtype, root, comm_ptr, errflag); ++ mpi_errno = MPIR_Bcast(tmp_buf, sendcount * sendtype_sz * local_size, ++ MPI_BYTE, root, comm_ptr, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ + *errflag = +@@ -121,8 +112,8 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, int send + /* bcast to left */ + if (sendcount != 0) { + root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; +- mpi_errno = MPIR_Bcast(tmp_buf, sendcount * local_size, +- sendtype, root, comm_ptr, errflag); ++ mpi_errno = MPIR_Bcast(tmp_buf, sendcount * sendtype_sz * local_size, ++ MPI_BYTE, root, comm_ptr, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ + *errflag = +--- a/src/mpi/coll/allgather/allgather_intra_brucks.c ++++ b/src/mpi/coll/allgather/allgather_intra_brucks.c +@@ -16,10 +16,6 @@ + * Cost = lgp.alpha + n.((p-1)/p).beta + * where n is total size of data gathered on each process. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather_intra_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather_intra_brucks(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -31,8 +27,7 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, + int comm_size, rank; + int mpi_errno = MPI_SUCCESS; + int mpi_errno_ret = MPI_SUCCESS; +- MPI_Aint recvtype_extent; +- MPI_Aint recvtype_true_extent, recvbuf_extent, recvtype_true_lb; ++ MPI_Aint recvtype_extent, recvtype_sz; + int pof2, src, rem; + void *tmp_buf = NULL; + int curr_cnt, dst; +@@ -46,33 +41,22 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, + rank = comm_ptr->rank; + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); +- +- /* This is the largest offset we add to recvbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (comm_size * recvcount * recvtype_extent)); ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + + /* allocate a temporary buffer of the same size as recvbuf. */ +- +- /* get true extent of recvtype */ +- MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent); +- +- recvbuf_extent = recvcount * comm_size * (MPL_MAX(recvtype_true_extent, recvtype_extent)); +- +- MPIR_CHKLMEM_MALLOC(tmp_buf, void *, recvbuf_extent, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); +- +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - recvtype_true_lb); ++ MPIR_CHKLMEM_MALLOC(tmp_buf, void *, recvcount * comm_size * recvtype_sz, mpi_errno, ++ "tmp_buf", MPL_MEM_BUFFER); + + /* copy local data to the top of tmp_buf */ + if (sendbuf != MPI_IN_PLACE) { +- mpi_errno = MPIR_Localcopy(sendbuf, sendcount, sendtype, tmp_buf, recvcount, recvtype); ++ mpi_errno = MPIR_Localcopy(sendbuf, sendcount, sendtype, ++ tmp_buf, recvcount * recvtype_sz, MPI_BYTE); + if (mpi_errno) { + MPIR_ERR_POP(mpi_errno); + } + } else { +- mpi_errno = MPIR_Localcopy(((char *) recvbuf + +- rank * recvcount * recvtype_extent), +- recvcount, recvtype, tmp_buf, recvcount, recvtype); ++ mpi_errno = MPIR_Localcopy((char *) recvbuf + rank * recvcount * recvtype_extent, ++ recvcount, recvtype, tmp_buf, recvcount * recvtype_sz, MPI_BYTE); + if (mpi_errno) { + MPIR_ERR_POP(mpi_errno); + } +@@ -86,10 +70,10 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, + src = (rank + pof2) % comm_size; + dst = (rank - pof2 + comm_size) % comm_size; + +- mpi_errno = MPIC_Sendrecv(tmp_buf, curr_cnt, recvtype, dst, ++ mpi_errno = MPIC_Sendrecv(tmp_buf, curr_cnt * recvtype_sz, MPI_BYTE, dst, + MPIR_ALLGATHER_TAG, +- ((char *) tmp_buf + curr_cnt * recvtype_extent), +- curr_cnt, recvtype, ++ ((char *) tmp_buf + curr_cnt * recvtype_sz), ++ curr_cnt * recvtype_sz, MPI_BYTE, + src, MPIR_ALLGATHER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ +@@ -110,10 +94,10 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, + src = (rank + pof2) % comm_size; + dst = (rank - pof2 + comm_size) % comm_size; + +- mpi_errno = MPIC_Sendrecv(tmp_buf, rem * recvcount, recvtype, ++ mpi_errno = MPIC_Sendrecv(tmp_buf, rem * recvcount * recvtype_sz, MPI_BYTE, + dst, MPIR_ALLGATHER_TAG, +- ((char *) tmp_buf + curr_cnt * recvtype_extent), +- rem * recvcount, recvtype, ++ ((char *) tmp_buf + curr_cnt * recvtype_sz), ++ rem * recvcount * recvtype_sz, MPI_BYTE, + src, MPIR_ALLGATHER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ +@@ -128,8 +112,8 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, + /* Rotate blocks in tmp_buf down by (rank) blocks and store + * result in recvbuf. */ + +- mpi_errno = MPIR_Localcopy(tmp_buf, (comm_size - rank) * recvcount, +- recvtype, (char *) recvbuf + rank * recvcount * recvtype_extent, ++ mpi_errno = MPIR_Localcopy(tmp_buf, (comm_size - rank) * recvcount * recvtype_sz, MPI_BYTE, ++ (char *) recvbuf + rank * recvcount * recvtype_extent, + (comm_size - rank) * recvcount, recvtype); + if (mpi_errno) { + MPIR_ERR_POP(mpi_errno); +@@ -137,8 +121,9 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, + + if (rank) { + mpi_errno = MPIR_Localcopy((char *) tmp_buf + +- (comm_size - rank) * recvcount * recvtype_extent, +- rank * recvcount, recvtype, recvbuf, rank * recvcount, recvtype); ++ (comm_size - rank) * recvcount * recvtype_sz, ++ rank * recvcount * recvtype_sz, MPI_BYTE, recvbuf, ++ rank * recvcount, recvtype); + if (mpi_errno) { + MPIR_ERR_POP(mpi_errno); + } +--- a/src/mpi/coll/allgather/allgather_intra_recursive_doubling.c ++++ b/src/mpi/coll/allgather/allgather_intra_recursive_doubling.c +@@ -19,10 +19,6 @@ + * property of recursive doubling (see Benson et al paper in Euro + * PVM/MPI 2003). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather_intra_recursive_doubling(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -56,11 +52,6 @@ int MPIR_Allgather_intra_recursive_doubling(const void *sendbuf, + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- /* This is the largest offset we add to recvbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (comm_size * recvcount * recvtype_extent)); +- +- + if (sendbuf != MPI_IN_PLACE) { + mpi_errno = MPIR_Localcopy(sendbuf, sendcount, sendtype, + ((char *) recvbuf + +--- a/src/mpi/coll/allgather/allgather_intra_ring.c ++++ b/src/mpi/coll/allgather/allgather_intra_ring.c +@@ -22,10 +22,6 @@ + * performs twice as fast as recursive doubling for long messages (on + * Myrinet and IBM SP). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgather_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgather_intra_ring(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -48,10 +44,6 @@ int MPIR_Allgather_intra_ring(const void *sendbuf, + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- /* This is the largest offset we add to recvbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (comm_size * recvcount * recvtype_extent)); +- + /* First, load the "local" version in the recvbuf. */ + if (sendbuf != MPI_IN_PLACE) { + mpi_errno = MPIR_Localcopy(sendbuf, sendcount, sendtype, +--- a/src/mpi/coll/allgatherv/allgatherv.c ++++ b/src/mpi/coll/allgatherv/allgatherv.c +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -39,7 +39,7 @@ cvars: + + - name : MPIR_CVAR_ALLGATHERV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -87,10 +87,6 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, vo + #undef MPI_Allgatherv + #define MPI_Allgatherv PMPI_Allgatherv + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv_intra_auto(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -158,10 +154,6 @@ int MPIR_Allgatherv_intra_auto(const void *sendbuf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv_inter_auto(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -180,10 +172,6 @@ int MPIR_Allgatherv_inter_auto(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -192,28 +180,28 @@ int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendty + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Allgatherv_intra_algo_choice) { +- case MPIR_ALLGATHERV_INTRA_ALGO_BRUCKS: ++ switch (MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM_brucks: + mpi_errno = MPIR_Allgatherv_intra_brucks(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLGATHERV_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = MPIR_Allgatherv_intra_recursive_doubling(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLGATHERV_INTRA_ALGO_RING: ++ case MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM_ring: + mpi_errno = MPIR_Allgatherv_intra_ring(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLGATHERV_INTRA_ALGO_NB: ++ case MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Allgatherv_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLGATHERV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Allgatherv_intra_auto(sendbuf, sendcount, sendtype, +@@ -223,19 +211,19 @@ int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendty + } + } else { + /* intercommunicator */ +- switch (MPIR_Allgatherv_inter_algo_choice) { +- case MPIR_ALLGATHERV_INTER_ALGO_REMOTE_GATHER_LOCAL_BCAST: ++ switch (MPIR_CVAR_ALLGATHERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_ALLGATHERV_INTER_ALGORITHM_remote_gather_local_bcast: + mpi_errno = + MPIR_Allgatherv_inter_remote_gather_local_bcast(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLGATHERV_INTER_ALGO_NB: ++ case MPIR_CVAR_ALLGATHERV_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Allgatherv_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLGATHERV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_ALLGATHERV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Allgatherv_inter_auto(sendbuf, sendcount, sendtype, +@@ -254,10 +242,6 @@ int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendty + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -278,10 +262,6 @@ int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Allgatherv - Gathers data from all tasks and deliver the combined data +@@ -447,13 +427,13 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_allgatherv", "**mpi_allgatherv %p %d %D %p %p %p %D %C", + sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, + recvtype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c ++++ b/src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +--- a/src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c ++++ b/src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c +@@ -17,10 +17,6 @@ + * intracommunicator broadcast. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv_inter_remote_gather_local_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv_inter_remote_gather_local_bcast(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int +--- a/src/mpi/coll/allgatherv/allgatherv_intra_brucks.c ++++ b/src/mpi/coll/allgatherv/allgatherv_intra_brucks.c +@@ -18,10 +18,6 @@ + * where n is total size of data gathered on each process. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv_intra_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv_intra_brucks(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -35,7 +31,7 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, + int mpi_errno = MPI_SUCCESS; + int mpi_errno_ret = MPI_SUCCESS; + MPI_Status status; +- MPI_Aint recvbuf_extent, recvtype_extent, recvtype_true_extent, recvtype_true_lb; ++ MPI_Aint recvtype_extent, recvtype_sz; + int pof2, src, rem, send_cnt; + MPI_Aint curr_cnt, recv_cnt; + int dst, total_count; +@@ -54,29 +50,23 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- /* allocate a temporary buffer of the same size as recvbuf. */ ++ /* allocate a temporary buffer that can hold all the data */ ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + +- /* get true extent of recvtype */ +- MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent); +- +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(recvtype_true_extent, recvtype_extent)); +- recvbuf_extent = total_count * (MPL_MAX(recvtype_true_extent, recvtype_extent)); +- +- MPIR_CHKLMEM_MALLOC(tmp_buf, void *, recvbuf_extent, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); +- +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - recvtype_true_lb); ++ MPIR_CHKLMEM_MALLOC(tmp_buf, void *, total_count * recvtype_sz, mpi_errno, "tmp_buf", ++ MPL_MEM_BUFFER); + + /* copy local data to the top of tmp_buf */ + if (sendbuf != MPI_IN_PLACE) { + mpi_errno = MPIR_Localcopy(sendbuf, sendcount, sendtype, +- tmp_buf, recvcounts[rank], recvtype); ++ tmp_buf, recvcounts[rank] * recvtype_sz, MPI_BYTE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } else { + mpi_errno = MPIR_Localcopy(((char *) recvbuf + + displs[rank] * recvtype_extent), +- recvcounts[rank], recvtype, tmp_buf, recvcounts[rank], recvtype); ++ recvcounts[rank], recvtype, tmp_buf, ++ recvcounts[rank] * recvtype_sz, MPI_BYTE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -89,10 +79,10 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, + src = (rank + pof2) % comm_size; + dst = (rank - pof2 + comm_size) % comm_size; + +- mpi_errno = MPIC_Sendrecv(tmp_buf, curr_cnt, recvtype, dst, ++ mpi_errno = MPIC_Sendrecv(tmp_buf, curr_cnt * recvtype_sz, MPI_BYTE, dst, + MPIR_ALLGATHERV_TAG, +- ((char *) tmp_buf + curr_cnt * recvtype_extent), +- total_count - curr_cnt, recvtype, ++ ((char *) tmp_buf + curr_cnt * recvtype_sz), ++ (total_count - curr_cnt) * recvtype_sz, MPI_BYTE, + src, MPIR_ALLGATHERV_TAG, comm_ptr, &status, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ +@@ -120,10 +110,10 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, + for (i = 0; i < rem; i++) + send_cnt += recvcounts[(rank + i) % comm_size]; + +- mpi_errno = MPIC_Sendrecv(tmp_buf, send_cnt, recvtype, ++ mpi_errno = MPIC_Sendrecv(tmp_buf, send_cnt * recvtype_sz, MPI_BYTE, + dst, MPIR_ALLGATHERV_TAG, +- ((char *) tmp_buf + curr_cnt * recvtype_extent), +- total_count - curr_cnt, recvtype, ++ ((char *) tmp_buf + curr_cnt * recvtype_sz), ++ (total_count - curr_cnt) * recvtype_sz, MPI_BYTE, + src, MPIR_ALLGATHERV_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ +@@ -141,8 +131,8 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, + send_cnt = 0; + for (i = 0; i < (comm_size - rank); i++) { + j = (rank + i) % comm_size; +- mpi_errno = MPIR_Localcopy((char *) tmp_buf + send_cnt * recvtype_extent, +- recvcounts[j], recvtype, ++ mpi_errno = MPIR_Localcopy((char *) tmp_buf + send_cnt * recvtype_sz, ++ recvcounts[j] * recvtype_sz, MPI_BYTE, + (char *) recvbuf + displs[j] * recvtype_extent, + recvcounts[j], recvtype); + if (mpi_errno) +@@ -151,8 +141,8 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, + } + + for (i = 0; i < rank; i++) { +- mpi_errno = MPIR_Localcopy((char *) tmp_buf + send_cnt * recvtype_extent, +- recvcounts[i], recvtype, ++ mpi_errno = MPIR_Localcopy((char *) tmp_buf + send_cnt * recvtype_sz, ++ recvcounts[i] * recvtype_sz, MPI_BYTE, + (char *) recvbuf + displs[i] * recvtype_extent, + recvcounts[i], recvtype); + if (mpi_errno) +--- a/src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c ++++ b/src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c +@@ -20,10 +20,6 @@ + * PVM/MPI 2003). + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -37,7 +33,7 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + int mpi_errno = MPI_SUCCESS; + int mpi_errno_ret = MPI_SUCCESS; + MPI_Status status; +- MPI_Aint recvtype_extent, recvtype_true_extent, recvtype_true_lb; ++ MPI_Aint recvtype_extent, recvtype_sz; + MPI_Aint curr_cnt, last_recv_cnt; + int dst, total_count; + void *tmp_buf; +@@ -61,22 +57,12 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + if (total_count == 0) + goto fn_exit; + ++ /* receive contiguously into tmp_buf */ + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + +- +- /* need to receive contiguously into tmp_buf because +- * displs could make the recvbuf noncontiguous */ +- +- MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent); +- +- MPIR_Ensure_Aint_fits_in_pointer(total_count * +- (MPL_MAX(recvtype_true_extent, recvtype_extent))); + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, +- total_count * (MPL_MAX(recvtype_true_extent, recvtype_extent)), +- mpi_errno, "tmp_buf", MPL_MEM_BUFFER); +- +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - recvtype_true_lb); ++ total_count * recvtype_sz, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + + /* copy local data into right location in tmp_buf */ + position = 0; +@@ -85,7 +71,7 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + if (sendbuf != MPI_IN_PLACE) { + mpi_errno = MPIR_Localcopy(sendbuf, sendcount, sendtype, + ((char *) tmp_buf + position * +- recvtype_extent), recvcounts[rank], recvtype); ++ recvtype_sz), recvcounts[rank] * recvtype_sz, MPI_BYTE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } else { +@@ -94,7 +80,7 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + displs[rank] * recvtype_extent), + recvcounts[rank], recvtype, + ((char *) tmp_buf + position * +- recvtype_extent), recvcounts[rank], recvtype); ++ recvtype_sz), recvcounts[rank] * recvtype_sz, MPI_BYTE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -126,11 +112,11 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + for (j = 0; j < dst_tree_root; j++) + recv_offset += recvcounts[j]; + +- mpi_errno = MPIC_Sendrecv(((char *) tmp_buf + send_offset * recvtype_extent), +- curr_cnt, recvtype, dst, ++ mpi_errno = MPIC_Sendrecv(((char *) tmp_buf + send_offset * recvtype_sz), ++ curr_cnt * recvtype_sz, MPI_BYTE, dst, + MPIR_ALLGATHERV_TAG, +- ((char *) tmp_buf + recv_offset * recvtype_extent), +- total_count - recv_offset, recvtype, dst, ++ ((char *) tmp_buf + recv_offset * recvtype_sz), ++ (total_count - recv_offset) * recvtype_sz, MPI_BYTE, dst, + MPIR_ALLGATHERV_TAG, comm_ptr, &status, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ +@@ -195,11 +181,10 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + offset = 0; + for (j = 0; j < (my_tree_root + mask); j++) + offset += recvcounts[j]; +- offset *= recvtype_extent; + +- mpi_errno = MPIC_Send(((char *) tmp_buf + offset), +- last_recv_cnt, +- recvtype, dst, MPIR_ALLGATHERV_TAG, comm_ptr, errflag); ++ mpi_errno = MPIC_Send(((char *) tmp_buf + offset * recvtype_sz), ++ last_recv_cnt * recvtype_sz, ++ MPI_BYTE, dst, MPIR_ALLGATHERV_TAG, comm_ptr, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ + *errflag = +@@ -222,8 +207,8 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + for (j = 0; j < (my_tree_root + mask); j++) + offset += recvcounts[j]; + +- mpi_errno = MPIC_Recv(((char *) tmp_buf + offset * recvtype_extent), +- total_count - offset, recvtype, ++ mpi_errno = MPIC_Recv(((char *) tmp_buf + offset * recvtype_sz), ++ (total_count - offset) * recvtype_sz, MPI_BYTE, + dst, MPIR_ALLGATHERV_TAG, comm_ptr, &status, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ +@@ -255,8 +240,8 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, + if ((sendbuf != MPI_IN_PLACE) || (j != rank)) { + /* not necessary to copy if in_place and + * j==rank. otherwise copy. */ +- mpi_errno = MPIR_Localcopy(((char *) tmp_buf + position * recvtype_extent), +- recvcounts[j], recvtype, ++ mpi_errno = MPIR_Localcopy(((char *) tmp_buf + position * recvtype_sz), ++ recvcounts[j] * recvtype_sz, MPI_BYTE, + ((char *) recvbuf + displs[j] * recvtype_extent), + recvcounts[j], recvtype); + if (mpi_errno) +--- a/src/mpi/coll/allgatherv/allgatherv_intra_ring.c ++++ b/src/mpi/coll/allgatherv/allgatherv_intra_ring.c +@@ -24,10 +24,6 @@ + * Myrinet and IBM SP). + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allgatherv_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allgatherv_intra_ring(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +--- a/src/mpi/coll/allreduce/allreduce.c ++++ b/src/mpi/coll/allreduce/allreduce.c +@@ -54,7 +54,7 @@ cvars: + + - name : MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -68,7 +68,7 @@ cvars: + + - name : MPIR_CVAR_ALLREDUCE_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -138,10 +138,6 @@ MPIR_Op_check_dtype_fn *MPIR_Op_check_dtype_table[] = { + MPIR_REPLACE_check_dtype, MPIR_NO_OP_check_dtype + }; + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce_intra_auto(const void *sendbuf, + void *recvbuf, + int count, +@@ -217,10 +213,6 @@ int MPIR_Allreduce_intra_auto(const void *sendbuf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce_inter_auto(const void *sendbuf, + void *recvbuf, + int count, +@@ -236,10 +228,6 @@ int MPIR_Allreduce_inter_auto(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +@@ -247,22 +235,22 @@ int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datat + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Allreduce_intra_algo_choice) { +- case MPIR_ALLREDUCE_INTRA_ALGO_RECURSIVE_DOUBLING: ++ switch (MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = MPIR_Allreduce_intra_recursive_doubling(sendbuf, recvbuf, count, + datatype, op, comm_ptr, + errflag); + break; +- case MPIR_ALLREDUCE_INTRA_ALGO_REDUCE_SCATTER_ALLGATHER: ++ case MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM_reduce_scatter_allgather: + mpi_errno = MPIR_Allreduce_intra_reduce_scatter_allgather(sendbuf, recvbuf, count, + datatype, op, comm_ptr, + errflag); + break; +- case MPIR_ALLREDUCE_INTRA_ALGO_NB: ++ case MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Allreduce_allcomm_nb(sendbuf, recvbuf, count, + datatype, op, comm_ptr, errflag); + break; +- case MPIR_ALLREDUCE_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Allreduce_intra_auto(sendbuf, recvbuf, count, datatype, op, +@@ -271,17 +259,17 @@ int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datat + } + } else { + /* intercommunicator */ +- switch (MPIR_Allreduce_inter_algo_choice) { +- case MPIR_ALLREDUCE_INTER_ALGO_REDUCE_EXCHANGE_BCAST: ++ switch (MPIR_CVAR_ALLREDUCE_INTER_ALGORITHM) { ++ case MPIR_CVAR_ALLREDUCE_INTER_ALGORITHM_reduce_exchange_bcast: + mpi_errno = + MPIR_Allreduce_inter_reduce_exchange_bcast(sendbuf, recvbuf, count, datatype, + op, comm_ptr, errflag); + break; +- case MPIR_ALLREDUCE_INTER_ALGO_NB: ++ case MPIR_CVAR_ALLREDUCE_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Allreduce_allcomm_nb(sendbuf, recvbuf, count, + datatype, op, comm_ptr, errflag); + break; +- case MPIR_ALLREDUCE_INTER_ALGO_AUTO: ++ case MPIR_CVAR_ALLREDUCE_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Allreduce_inter_auto(sendbuf, recvbuf, count, datatype, op, +@@ -299,10 +287,6 @@ int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datat + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +@@ -319,10 +303,6 @@ int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype d + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Allreduce - Combines values from all processes and distributes the result + back to all processes +@@ -447,12 +427,12 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_allreduce", "**mpi_allreduce %p %p %d %D %O %C", sendbuf, + recvbuf, count, datatype, op, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/allreduce/allreduce_allcomm_nb.c ++++ b/src/mpi/coll/allreduce/allreduce_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +--- a/src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c ++++ b/src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c +@@ -14,10 +14,6 @@ + * group. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce_inter_reduce_exchange_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce_inter_reduce_exchange_bcast(const void *sendbuf, void *recvbuf, int + count, MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -32,10 +28,6 @@ int MPIR_Allreduce_inter_reduce_exchange_bcast(const void *sendbuf, void *recvbu + if (comm_ptr->rank == 0) { + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); +- /* I think this is the worse case, so we can avoid an assert() +- * inside the for loop */ +- /* Should MPIR_CHKLMEM_MALLOC do this? */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), mpi_errno, + "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +--- a/src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c ++++ b/src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c +@@ -18,10 +18,6 @@ + */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf, + void *recvbuf, + int count, +@@ -46,7 +42,6 @@ int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf, + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), mpi_errno, + "temporary buffer", MPL_MEM_BUFFER); + +--- a/src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c ++++ b/src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c +@@ -39,10 +39,6 @@ + * Cost = (2.floor(lgp)+2).alpha + (2.((p-1)/p) + 2).n.beta + n.(1+(p-1)/p).gamma + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce_intra_reduce_scatter_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, + void *recvbuf, + int count, +@@ -66,7 +62,6 @@ int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), mpi_errno, + "temporary buffer", MPL_MEM_BUFFER); + +--- a/src/mpi/coll/allreduce/allreduce_intra_smp.c ++++ b/src/mpi/coll/allreduce/allreduce_intra_smp.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Allreduce_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Allreduce_intra_smp(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/allreduce_group/allreduce_group.c ++++ b/src/mpi/coll/allreduce_group/allreduce_group.c +@@ -16,10 +16,6 @@ + MPIR_Assert((cr_) != MPI_UNDEFINED); \ + } while (0) + +-#undef FUNCNAME +-#define FUNCNAME MPII_Allreduce_group_intra +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Group * group_ptr, int tag, MPIR_Errflag_t * errflag) +@@ -46,7 +42,6 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count, + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), mpi_errno, + "temporary buffer", MPL_MEM_BUFFER); + +@@ -349,10 +344,6 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPII_Allreduce_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Allreduce_group(void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Group * group_ptr, int tag, MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/alltoall/alltoall.c ++++ b/src/mpi/coll/alltoall/alltoall.c +@@ -54,7 +54,7 @@ cvars: + + - name : MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -70,7 +70,7 @@ cvars: + + - name : MPIR_CVAR_ALLTOALL_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -118,10 +118,6 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void + #undef MPI_Alltoall + #define MPI_Alltoall PMPI_Alltoall + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_intra_auto(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -171,10 +167,6 @@ int MPIR_Alltoall_intra_auto(const void *sendbuf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_inter_auto(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -191,10 +183,6 @@ int MPIR_Alltoall_inter_auto(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -203,34 +191,34 @@ int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Alltoall_intra_algo_choice) { +- case MPIR_ALLTOALL_INTRA_ALGO_BRUCKS: ++ switch (MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM_brucks: + mpi_errno = MPIR_Alltoall_intra_brucks(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLTOALL_INTRA_ALGO_PAIRWISE: ++ case MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM_pairwise: + mpi_errno = MPIR_Alltoall_intra_pairwise(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLTOALL_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE: ++ case MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM_pairwise_sendrecv_replace: + mpi_errno = MPIR_Alltoall_intra_pairwise_sendrecv_replace(sendbuf, sendcount, + sendtype, recvbuf, + recvcount, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLTOALL_INTRA_ALGO_SCATTERED: ++ case MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM_scattered: + mpi_errno = MPIR_Alltoall_intra_scattered(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLTOALL_INTRA_ALGO_NB: ++ case MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Alltoall_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, comm_ptr, + errflag); + break; +- case MPIR_ALLTOALL_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Alltoall_intra_auto(sendbuf, sendcount, sendtype, +@@ -240,18 +228,18 @@ int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype + } + } else { + /* intercommunicator */ +- switch (MPIR_Alltoall_inter_algo_choice) { +- case MPIR_ALLTOALL_INTER_ALGO_PAIRWISE_EXCHANGE: ++ switch (MPIR_CVAR_ALLTOALL_INTER_ALGORITHM) { ++ case MPIR_CVAR_ALLTOALL_INTER_ALGORITHM_pairwise_exchange: + mpi_errno = MPIR_Alltoall_inter_pairwise_exchange(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLTOALL_INTER_ALGO_NB: ++ case MPIR_CVAR_ALLTOALL_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Alltoall_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, comm_ptr, + errflag); + break; +- case MPIR_ALLTOALL_INTER_ALGO_AUTO: ++ case MPIR_CVAR_ALLTOALL_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Alltoall_inter_auto(sendbuf, sendcount, sendtype, +@@ -269,10 +257,6 @@ int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -292,10 +276,6 @@ int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Alltoall - Sends data from all to all processes + +@@ -419,12 +399,12 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_alltoall", "**mpi_alltoall %p %d %D %p %d %D %C", sendbuf, + sendcount, sendtype, recvbuf, recvcount, recvtype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/alltoall/alltoall_allcomm_nb.c ++++ b/src/mpi/coll/alltoall/alltoall_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c ++++ b/src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c +@@ -18,10 +18,6 @@ + * max_size if dst < remote_size. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_inter_pairwise_exchange +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_inter_pairwise_exchange(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -45,10 +41,6 @@ int MPIR_Alltoall_inter_pairwise_exchange(const void *sendbuf, int sendcount, + + /* Do the pairwise exchanges */ + max_size = MPL_MAX(local_size, remote_size); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- max_size * recvcount * recvtype_extent); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- max_size * sendcount * sendtype_extent); + for (i = 0; i < max_size; i++) { + src = (rank - i + max_size) % max_size; + dst = (rank + i) % max_size; +--- a/src/mpi/coll/alltoall/alltoall_intra_brucks.c ++++ b/src/mpi/coll/alltoall/alltoall_intra_brucks.c +@@ -20,10 +20,6 @@ + * where n is the total amount of data a process needs to send to all + * other processes. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_intra_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_intra_brucks(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -34,12 +30,13 @@ int MPIR_Alltoall_intra_brucks(const void *sendbuf, + { + int comm_size, i, pof2; + MPI_Aint sendtype_extent, recvtype_extent; +- MPI_Aint recvtype_true_extent, recvbuf_extent, recvtype_true_lb; ++ MPI_Aint recvtype_sz; + int mpi_errno = MPI_SUCCESS, src, dst, rank; + int mpi_errno_ret = MPI_SUCCESS; + int block, *displs, count; +- MPI_Aint pack_size, position; ++ MPI_Aint pack_size; + MPI_Datatype newtype = MPI_DATATYPE_NULL; ++ MPI_Aint newtype_sz; + void *tmp_buf; + MPIR_CHKLMEM_DECL(6); + +@@ -58,7 +55,8 @@ int MPIR_Alltoall_intra_brucks(const void *sendbuf, + MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); + + /* allocate temporary buffer */ +- MPIR_Pack_size_impl(recvcount * comm_size, recvtype, &pack_size); ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); ++ pack_size = recvcount * comm_size * recvtype_sz; + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, pack_size, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + + /* Do Phase 1 of the algorithim. Shift the data blocks on process i +@@ -115,12 +113,12 @@ int MPIR_Alltoall_intra_brucks(const void *sendbuf, + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- position = 0; +- mpi_errno = MPIR_Pack_impl(recvbuf, 1, newtype, tmp_buf, pack_size, &position); ++ newtype_sz = count * recvcount * recvtype_sz; ++ mpi_errno = MPIR_Localcopy(recvbuf, 1, newtype, tmp_buf, newtype_sz, MPI_BYTE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIC_Sendrecv(tmp_buf, position, MPI_PACKED, dst, ++ mpi_errno = MPIC_Sendrecv(tmp_buf, newtype_sz, MPI_BYTE, dst, + MPIR_ALLTOALL_TAG, recvbuf, 1, newtype, + src, MPIR_ALLTOALL_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + if (mpi_errno) { +@@ -139,25 +137,18 @@ int MPIR_Alltoall_intra_brucks(const void *sendbuf, + + /* Rotate blocks in recvbuf upwards by (rank + 1) blocks. Need + * a temporary buffer of the same size as recvbuf. */ +- +- /* get true extent of recvtype */ +- MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent); +- +- recvbuf_extent = recvcount * comm_size * (MPL_MAX(recvtype_true_extent, recvtype_extent)); +- MPIR_CHKLMEM_MALLOC(tmp_buf, void *, recvbuf_extent, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - recvtype_true_lb); ++ MPIR_CHKLMEM_MALLOC(tmp_buf, void *, pack_size, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + + mpi_errno = MPIR_Localcopy((char *) recvbuf + (rank + 1) * recvcount * recvtype_extent, + (comm_size - rank - 1) * recvcount, recvtype, tmp_buf, +- (comm_size - rank - 1) * recvcount, recvtype); ++ (comm_size - rank - 1) * recvcount * recvtype_sz, MPI_BYTE); + if (mpi_errno) { + MPIR_ERR_POP(mpi_errno); + } + mpi_errno = MPIR_Localcopy(recvbuf, (rank + 1) * recvcount, recvtype, +- (char *) tmp_buf + (comm_size - rank - +- 1) * recvcount * recvtype_extent, +- (rank + 1) * recvcount, recvtype); ++ (char *) tmp_buf + (comm_size - rank - 1) ++ * recvcount * recvtype_sz, ++ (rank + 1) * recvcount * recvtype_sz, MPI_BYTE); + if (mpi_errno) { + MPIR_ERR_POP(mpi_errno); + } +@@ -166,8 +157,8 @@ int MPIR_Alltoall_intra_brucks(const void *sendbuf, + * Reorder them to (0 to comm_size-1) and store them in recvbuf. */ + + for (i = 0; i < comm_size; i++) { +- mpi_errno = MPIR_Localcopy((char *) tmp_buf + i * recvcount * recvtype_extent, +- recvcount, recvtype, ++ mpi_errno = MPIR_Localcopy((char *) tmp_buf + i * recvcount * recvtype_sz, ++ recvcount * recvtype_sz, MPI_BYTE, + (char *) recvbuf + (comm_size - i - + 1) * recvcount * recvtype_extent, recvcount, + recvtype); +--- a/src/mpi/coll/alltoall/alltoall_intra_pairwise.c ++++ b/src/mpi/coll/alltoall/alltoall_intra_pairwise.c +@@ -24,10 +24,6 @@ + * where n is the total amount of data a process needs to send to all + * other processes. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_intra_pairwise +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_intra_pairwise(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +--- a/src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c ++++ b/src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c +@@ -21,10 +21,6 @@ + * maintaining a single buffer across the whole loop. Something like + * MADRE is probably the best solution for the MPI_IN_PLACE scenario. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_intra_pairwise_sendrecv_replace +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_intra_pairwise_sendrecv_replace(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +--- a/src/mpi/coll/alltoall/alltoall_intra_scattered.c ++++ b/src/mpi/coll/alltoall/alltoall_intra_scattered.c +@@ -29,10 +29,6 @@ + * block (when there are only a few isend/irecvs left). + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoall_intra_scattered +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoall_intra_scattered(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +--- a/src/mpi/coll/alltoallv/alltoallv.c ++++ b/src/mpi/coll/alltoallv/alltoallv.c +@@ -14,7 +14,7 @@ + cvars: + - name : MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -28,7 +28,7 @@ cvars: + + - name : MPIR_CVAR_ALLTOALLV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -77,10 +77,6 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls + #undef MPI_Alltoallv + #define MPI_Alltoallv PMPI_Alltoallv + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallv_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallv_intra_auto(const void *sendbuf, const int *sendcounts, const int *sdispls, + MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, + const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -114,10 +110,6 @@ int MPIR_Alltoallv_intra_auto(const void *sendbuf, const int *sendcounts, const + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallv_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallv_inter_auto(const void *sendbuf, const int *sendcounts, const int *sdispls, + MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, + const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -133,10 +125,6 @@ int MPIR_Alltoallv_inter_auto(const void *sendbuf, const int *sendcounts, const + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcounts, const int *sdispls, + MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, + const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -146,25 +134,25 @@ int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcounts, const int *s + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Alltoallv_intra_algo_choice) { +- case MPIR_ALLTOALLV_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE: ++ switch (MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM_pairwise_sendrecv_replace: + mpi_errno = MPIR_Alltoallv_intra_pairwise_sendrecv_replace(sendbuf, sendcounts, + sdispls, sendtype, + recvbuf, recvcounts, + rdispls, recvtype, + comm_ptr, errflag); + break; +- case MPIR_ALLTOALLV_INTRA_ALGO_SCATTERED: ++ case MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM_scattered: + mpi_errno = MPIR_Alltoallv_intra_scattered(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLTOALLV_INTRA_ALGO_NB: ++ case MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Alltoallv_allcomm_nb(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLTOALLV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Alltoallv_intra_auto(sendbuf, sendcounts, sdispls, +@@ -173,20 +161,20 @@ int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcounts, const int *s + break; + } + } else { +- switch (MPIR_Alltoallv_inter_algo_choice) { ++ switch (MPIR_CVAR_ALLTOALLV_INTER_ALGORITHM) { + /* intercommunicator */ +- case MPIR_ALLTOALLV_INTER_ALGO_PAIRWISE_EXCHANGE: ++ case MPIR_CVAR_ALLTOALLV_INTER_ALGORITHM_pairwise_exchange: + mpi_errno = MPIR_Alltoallv_inter_pairwise_exchange(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, + errflag); + break; +- case MPIR_ALLTOALLV_INTER_ALGO_NB: ++ case MPIR_CVAR_ALLTOALLV_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Alltoallv_allcomm_nb(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, errflag); + break; +- case MPIR_ALLTOALLV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_ALLTOALLV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Alltoallv_inter_auto(sendbuf, sendcounts, sdispls, +@@ -204,10 +192,6 @@ int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcounts, const int *s + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls, + MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -228,10 +212,6 @@ int MPIR_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispl + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Alltoallv - Sends data from all to all processes; each process may + send a different amount of data and provide displacements for the input +@@ -386,13 +366,13 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_alltoallv", "**mpi_alltoallv %p %p %p %D %p %p %p %D %C", + sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c ++++ b/src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallv_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallv_allcomm_nb(const void *sendbuf, const int *sendcounts, const int *sdispls, + MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, + const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +--- a/src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c ++++ b/src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c +@@ -21,10 +21,6 @@ + * FIXME: change algorithm to match intracommunicator alltoallv + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallv_inter_pairwise_exchange +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallv_inter_pairwise_exchange(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *rdispls, +@@ -57,8 +53,6 @@ int MPIR_Alltoallv_inter_pairwise_exchange(const void *sendbuf, const int *sendc + recvaddr = NULL; + recvcount = 0; + } else { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- rdispls[src] * recv_extent); + recvaddr = (char *) recvbuf + rdispls[src] * recv_extent; + recvcount = recvcounts[src]; + } +@@ -67,8 +61,6 @@ int MPIR_Alltoallv_inter_pairwise_exchange(const void *sendbuf, const int *sendc + sendaddr = NULL; + sendcount = 0; + } else { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- sdispls[dst] * send_extent); + sendaddr = (char *) sendbuf + sdispls[dst] * send_extent; + sendcount = sendcounts[dst]; + } +--- a/src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c ++++ b/src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c +@@ -20,10 +20,6 @@ + * time and there will be multiple repeated malloc/free's rather than + * maintaining a single buffer across the whole loop. Something like + * MADRE is probably the best solution for the MPI_IN_PLACE scenario. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallv_intra_pairwise_sendrecv_replace +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallv_intra_pairwise_sendrecv_replace(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +--- a/src/mpi/coll/alltoallv/alltoallv_intra_scattered.c ++++ b/src/mpi/coll/alltoallv/alltoallv_intra_scattered.c +@@ -23,10 +23,6 @@ + * *** Modification: We post only a small number of isends and irecvs + * at a time and wait on them as suggested by Tony Ladd. *** + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallv_intra_scattered +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallv_intra_scattered(const void *sendbuf, const int *sendcounts, const int *sdispls, + MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, + const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -76,8 +72,6 @@ int MPIR_Alltoallv_intra_scattered(const void *sendbuf, const int *sendcounts, c + if (recvcounts[dst]) { + MPIR_Datatype_get_size_macro(recvtype, type_size); + if (type_size) { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- rdispls[dst] * recv_extent); + mpi_errno = MPIC_Irecv((char *) recvbuf + rdispls[dst] * recv_extent, + recvcounts[dst], recvtype, dst, + MPIR_ALLTOALLV_TAG, comm_ptr, &reqarray[req_cnt]); +@@ -99,8 +93,6 @@ int MPIR_Alltoallv_intra_scattered(const void *sendbuf, const int *sendcounts, c + if (sendcounts[dst]) { + MPIR_Datatype_get_size_macro(sendtype, type_size); + if (type_size) { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- sdispls[dst] * send_extent); + mpi_errno = MPIC_Isend((char *) sendbuf + sdispls[dst] * send_extent, + sendcounts[dst], sendtype, dst, + MPIR_ALLTOALLV_TAG, comm_ptr, +--- a/src/mpi/coll/alltoallw/alltoallw.c ++++ b/src/mpi/coll/alltoallw/alltoallw.c +@@ -13,7 +13,7 @@ + cvars: + - name : MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -27,7 +27,7 @@ cvars: + + - name : MPIR_CVAR_ALLTOALLW_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -76,10 +76,6 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls + #undef MPI_Alltoallw + #define MPI_Alltoallw PMPI_Alltoallw + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallw_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallw_intra_auto(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPI_Datatype recvtypes[], +@@ -112,10 +108,6 @@ int MPIR_Alltoallw_intra_auto(const void *sendbuf, const int sendcounts[], const + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallw_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallw_inter_auto(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPI_Datatype recvtypes[], +@@ -130,10 +122,6 @@ int MPIR_Alltoallw_inter_auto(const void *sendbuf, const int sendcounts[], const + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallw_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallw_impl(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPI_Datatype recvtypes[], +@@ -143,25 +131,25 @@ int MPIR_Alltoallw_impl(const void *sendbuf, const int sendcounts[], const int s + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Alltoallw_intra_algo_choice) { +- case MPIR_ALLTOALLW_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE: ++ switch (MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM_pairwise_sendrecv_replace: + mpi_errno = MPIR_Alltoallw_intra_pairwise_sendrecv_replace(sendbuf, sendcounts, + sdispls, sendtypes, + recvbuf, recvcounts, + rdispls, recvtypes, + comm_ptr, errflag); + break; +- case MPIR_ALLTOALLW_INTRA_ALGO_SCATTERED: ++ case MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM_scattered: + mpi_errno = MPIR_Alltoallw_intra_scattered(sendbuf, sendcounts, + sdispls, sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, errflag); + break; +- case MPIR_ALLTOALLW_INTRA_ALGO_NB: ++ case MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Alltoallw_allcomm_nb(sendbuf, sendcounts, + sdispls, sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, errflag); + break; +- case MPIR_ALLTOALLW_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Alltoallw_intra_auto(sendbuf, sendcounts, +@@ -171,19 +159,19 @@ int MPIR_Alltoallw_impl(const void *sendbuf, const int sendcounts[], const int s + } + } else { + /* intercommunicator */ +- switch (MPIR_Alltoallw_inter_algo_choice) { +- case MPIR_ALLTOALLW_INTER_ALGO_PAIRWISE_EXCHANGE: ++ switch (MPIR_CVAR_ALLTOALLW_INTER_ALGORITHM) { ++ case MPIR_CVAR_ALLTOALLW_INTER_ALGORITHM_pairwise_exchange: + mpi_errno = MPIR_Alltoallw_inter_pairwise_exchange(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, + errflag); + break; +- case MPIR_ALLTOALLW_INTER_ALGO_NB: ++ case MPIR_CVAR_ALLTOALLW_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Alltoallw_allcomm_nb(sendbuf, sendcounts, + sdispls, sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, errflag); + break; +- case MPIR_ALLTOALLW_INTER_ALGO_AUTO: ++ case MPIR_CVAR_ALLTOALLW_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Alltoallw_inter_auto(sendbuf, sendcounts, sdispls, +@@ -201,10 +189,6 @@ int MPIR_Alltoallw_impl(const void *sendbuf, const int sendcounts[], const int s + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPI_Datatype recvtypes[], +@@ -226,10 +210,6 @@ int MPIR_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispl + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Alltoallw - Generalized all-to-all communication allowing different + datatypes, counts, and displacements for each partner +@@ -398,13 +378,13 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_alltoallw", "**mpi_alltoallw %p %p %p %p %p %p %p %p %C", + sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c ++++ b/src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallw_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallw_allcomm_nb(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPI_Datatype recvtypes[], +--- a/src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c ++++ b/src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c +@@ -21,10 +21,6 @@ + * FIXME: change algorithm to match intracommunicator alltoallv + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallw_inter_pairwise_exchange +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallw_inter_pairwise_exchange(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +--- a/src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c ++++ b/src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c +@@ -19,10 +19,6 @@ + * single buffer across the whole loop. Something like MADRE is probably the + * best solution for the MPI_IN_PLACE scenario. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallw_intra_pairwise_sendrecv_replace +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallw_intra_pairwise_sendrecv_replace(const void *sendbuf, const int sendcounts[], + const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +--- a/src/mpi/coll/alltoallw/alltoallw_intra_scattered.c ++++ b/src/mpi/coll/alltoallw/alltoallw_intra_scattered.c +@@ -21,10 +21,6 @@ + * *** Modification: We post only a small number of isends and irecvs at a time + * and wait on them as suggested by Tony Ladd. *** + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Alltoallw_intra_scattered +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Alltoallw_intra_scattered(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], const int rdispls[], +--- a/src/mpi/coll/barrier/barrier.c ++++ b/src/mpi/coll/barrier/barrier.c +@@ -22,20 +22,20 @@ cvars: + + - name : MPIR_CVAR_BARRIER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select barrier algorithm +- auto - Internal algorithm selection +- nb - Force nonblocking algorithm +- recursive_doubling - Force recursive doubling algorithm ++ auto - Internal algorithm selection ++ nb - Force nonblocking algorithm ++ dissemination - Force dissemination algorithm + + - name : MPIR_CVAR_BARRIER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -81,10 +81,6 @@ int MPI_Barrier(MPI_Comm comm) __attribute__ ((weak, alias("PMPI_Barrier"))); + #undef MPI_Barrier + #define MPI_Barrier PMPI_Barrier + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Barrier_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Barrier_intra_auto(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int size, mpi_errno = MPI_SUCCESS; +@@ -119,10 +115,6 @@ int MPIR_Barrier_intra_auto(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Barrier_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Barrier_inter_auto(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; +@@ -132,24 +124,20 @@ int MPIR_Barrier_inter_auto(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Barrier_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Barrier_impl(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Barrier_intra_algo_choice) { +- case MPIR_BARRIER_INTRA_ALGO_RECURSIVE_DOUBLING: ++ switch (MPIR_CVAR_BARRIER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_BARRIER_INTRA_ALGORITHM_dissemination: + mpi_errno = MPIR_Barrier_intra_dissemination(comm_ptr, errflag); + break; +- case MPIR_BARRIER_INTRA_ALGO_NB: ++ case MPIR_CVAR_BARRIER_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Barrier_allcomm_nb(comm_ptr, errflag); + break; +- case MPIR_BARRIER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_BARRIER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Barrier_intra_auto(comm_ptr, errflag); +@@ -157,14 +145,14 @@ int MPIR_Barrier_impl(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + } + } else { + /* intercommunicator */ +- switch (MPIR_Barrier_inter_algo_choice) { +- case MPIR_BARRIER_INTER_ALGO_BCAST: ++ switch (MPIR_CVAR_BARRIER_INTER_ALGORITHM) { ++ case MPIR_CVAR_BARRIER_INTER_ALGORITHM_bcast: + mpi_errno = MPIR_Barrier_inter_bcast(comm_ptr, errflag); + break; +- case MPIR_BARRIER_INTER_ALGO_NB: ++ case MPIR_CVAR_BARRIER_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Barrier_allcomm_nb(comm_ptr, errflag); + break; +- case MPIR_BARRIER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_BARRIER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Barrier_inter_auto(comm_ptr, errflag); +@@ -180,10 +168,6 @@ int MPIR_Barrier_impl(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; +@@ -202,10 +186,6 @@ int MPIR_Barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -286,11 +266,11 @@ int MPI_Barrier(MPI_Comm comm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_barrier", "**mpi_barrier %C", comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/barrier/barrier_allcomm_nb.c ++++ b/src/mpi/coll/barrier/barrier_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Barrier_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Barrier_allcomm_nb(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/coll/barrier/barrier_inter_bcast.c ++++ b/src/mpi/coll/barrier/barrier_inter_bcast.c +@@ -19,10 +19,6 @@ + * group. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Barrier_inter_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Barrier_inter_bcast(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int rank, mpi_errno = MPI_SUCCESS, root; +--- a/src/mpi/coll/barrier/barrier_intra_dissemination.c ++++ b/src/mpi/coll/barrier/barrier_intra_dissemination.c +@@ -18,10 +18,6 @@ + * process i sends to process (i + 2^k) % p and receives from process + * (i - 2^k + p) % p. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Barrier_intra_dissemination +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Barrier_intra_dissemination(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int size, rank, src, dst, mask, mpi_errno = MPI_SUCCESS; +--- a/src/mpi/coll/barrier/barrier_intra_smp.c ++++ b/src/mpi/coll/barrier/barrier_intra_smp.c +@@ -7,10 +7,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Barrier_intra_smp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Barrier_intra_smp(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/coll/bcast/bcast.c ++++ b/src/mpi/coll/bcast/bcast.c +@@ -94,7 +94,7 @@ cvars: + + - name : MPIR_CVAR_BCAST_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -109,7 +109,7 @@ cvars: + + - name : MPIR_CVAR_BCAST_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -155,10 +155,6 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm + #undef MPI_Bcast + #define MPI_Bcast PMPI_Bcast + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_intra_auto(void *buffer, + int count, + MPI_Datatype datatype, +@@ -236,10 +232,6 @@ int MPIR_Bcast_intra_auto(void *buffer, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_inter_auto(void *buffer, + int count, + MPI_Datatype datatype, +@@ -253,10 +245,6 @@ int MPIR_Bcast_inter_auto(void *buffer, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) + { +@@ -264,25 +252,25 @@ int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MP + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Bcast_intra_algo_choice) { +- case MPIR_BCAST_INTRA_ALGO_BINOMIAL: ++ switch (MPIR_CVAR_BCAST_INTRA_ALGORITHM) { ++ case MPIR_CVAR_BCAST_INTRA_ALGORITHM_binomial: + mpi_errno = + MPIR_Bcast_intra_binomial(buffer, count, datatype, root, comm_ptr, errflag); + break; +- case MPIR_BCAST_INTRA_ALGO_SCATTER_RECURSIVE_DOUBLING_ALLGATHER: ++ case MPIR_CVAR_BCAST_INTRA_ALGORITHM_scatter_recursive_doubling_allgather: + mpi_errno = + MPIR_Bcast_intra_scatter_recursive_doubling_allgather(buffer, count, datatype, + root, comm_ptr, errflag); + break; +- case MPIR_BCAST_INTRA_ALGO_SCATTER_RING_ALLGATHER: ++ case MPIR_CVAR_BCAST_INTRA_ALGORITHM_scatter_ring_allgather: + mpi_errno = + MPIR_Bcast_intra_scatter_ring_allgather(buffer, count, datatype, root, comm_ptr, + errflag); + break; +- case MPIR_BCAST_INTRA_ALGO_NB: ++ case MPIR_CVAR_BCAST_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Bcast_allcomm_nb(buffer, count, datatype, root, comm_ptr, errflag); + break; +- case MPIR_BCAST_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_BCAST_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Bcast_intra_auto(buffer, count, datatype, root, comm_ptr, errflag); +@@ -290,16 +278,16 @@ int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MP + } + } else { + /* intercommunicator */ +- switch (MPIR_Bcast_inter_algo_choice) { +- case MPIR_BCAST_INTER_ALGO_REMOTE_SEND_LOCAL_BCAST: ++ switch (MPIR_CVAR_BCAST_INTER_ALGORITHM) { ++ case MPIR_CVAR_BCAST_INTER_ALGORITHM_remote_send_local_bcast: + mpi_errno = + MPIR_Bcast_inter_remote_send_local_bcast(buffer, count, datatype, root, + comm_ptr, errflag); + break; +- case MPIR_BCAST_INTER_ALGO_NB: ++ case MPIR_CVAR_BCAST_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Bcast_allcomm_nb(buffer, count, datatype, root, comm_ptr, errflag); + break; +- case MPIR_BCAST_INTER_ALGO_AUTO: ++ case MPIR_CVAR_BCAST_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Bcast_inter_auto(buffer, count, datatype, root, comm_ptr, errflag); +@@ -315,10 +303,6 @@ int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MP + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) + { +@@ -336,10 +320,6 @@ int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Co + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + MPI_Bcast - Broadcasts a message from the process with rank "root" to +@@ -445,12 +425,12 @@ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_bcast", "**mpi_bcast %p %d %D %d %C", buffer, count, + datatype, root, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/bcast/bcast_allcomm_nb.c ++++ b/src/mpi/coll/bcast/bcast_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_allcomm_nb(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +--- a/src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c ++++ b/src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c +@@ -13,10 +13,6 @@ + * intracommunicator broadcast. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_inter_remote_send_local_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_inter_remote_send_local_bcast(void *buffer, + int count, + MPI_Datatype datatype, +@@ -65,8 +61,17 @@ int MPIR_Bcast_inter_remote_send_local_bcast(void *buffer, + } + + /* Get the local intracommunicator */ +- if (!comm_ptr->local_comm) +- MPII_Setup_intercomm_localcomm(comm_ptr); ++ if (!comm_ptr->local_comm) { ++ mpi_errno = MPII_Setup_intercomm_localcomm(comm_ptr); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } + + newcomm_ptr = comm_ptr->local_comm; + +--- a/src/mpi/coll/bcast/bcast_intra_binomial.c ++++ b/src/mpi/coll/bcast/bcast_intra_binomial.c +@@ -12,10 +12,6 @@ + * For short messages, we use a binomial tree algorithm. + * Cost = lgp.alpha + n.lgp.beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_intra_binomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_intra_binomial(void *buffer, + int count, + MPI_Datatype datatype, +@@ -30,7 +26,6 @@ int MPIR_Bcast_intra_binomial(void *buffer, + MPI_Status status; + int is_contig; + MPI_Aint type_size; +- MPI_Aint position; + void *tmp_buf = NULL; + MPIR_CHKLMEM_DECL(1); + +@@ -57,9 +52,8 @@ int MPIR_Bcast_intra_binomial(void *buffer, + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, nbytes, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + + /* TODO: Pipeline the packing and communication */ +- position = 0; + if (rank == root) { +- mpi_errno = MPIR_Pack_impl(buffer, count, datatype, tmp_buf, nbytes, &position); ++ mpi_errno = MPIR_Localcopy(buffer, count, datatype, tmp_buf, nbytes, MPI_BYTE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -165,8 +159,7 @@ int MPIR_Bcast_intra_binomial(void *buffer, + + if (!is_contig) { + if (rank != root) { +- position = 0; +- mpi_errno = MPIR_Unpack_impl(tmp_buf, nbytes, &position, buffer, count, datatype); ++ mpi_errno = MPIR_Localcopy(tmp_buf, nbytes, MPI_BYTE, buffer, count, datatype); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +--- a/src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c ++++ b/src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c +@@ -27,10 +27,6 @@ + * it's still a logarithmic algorithm.) Therefore, for long messages + * Total Cost = 2.lgp.alpha + 2.n.((p-1)/p).beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_intra_scatter_recursive_doubling_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, + int count, + MPI_Datatype datatype, +@@ -49,7 +45,6 @@ int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, + MPI_Aint type_size, nbytes = 0; + int relative_dst, dst_tree_root, my_tree_root, send_offset; + int recv_offset, tree_root, nprocs_completed, offset; +- MPI_Aint position; + MPIR_CHKLMEM_DECL(1); + MPI_Aint true_extent, true_lb; + void *tmp_buf; +@@ -88,9 +83,8 @@ int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, + } else { + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, nbytes, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + +- position = 0; + if (rank == root) { +- mpi_errno = MPIR_Pack_impl(buffer, count, datatype, tmp_buf, nbytes, &position); ++ mpi_errno = MPIR_Localcopy(buffer, count, datatype, tmp_buf, nbytes, MPI_BYTE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -280,8 +274,7 @@ int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, + + if (!is_contig) { + if (rank != root) { +- position = 0; +- mpi_errno = MPIR_Unpack_impl(tmp_buf, nbytes, &position, buffer, count, datatype); ++ mpi_errno = MPIR_Localcopy(tmp_buf, nbytes, MPI_BYTE, buffer, count, datatype); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +--- a/src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c ++++ b/src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c +@@ -23,10 +23,6 @@ + * medium-sized non-power-of-two messages. + * Total Cost = (lgp+p-1).alpha + 2.n.((p-1)/p).beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_intra_scatter_ring_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_intra_scatter_ring_allgather(void *buffer, + int count, + MPI_Datatype datatype, +@@ -38,7 +34,7 @@ int MPIR_Bcast_intra_scatter_ring_allgather(void *buffer, + int mpi_errno_ret = MPI_SUCCESS; + int scatter_size; + int j, i, is_contig; +- MPI_Aint nbytes, type_size, position; ++ MPI_Aint nbytes, type_size; + int left, right, jnext; + void *tmp_buf; + MPI_Aint recvd_size, curr_size = 0; +@@ -73,9 +69,8 @@ int MPIR_Bcast_intra_scatter_ring_allgather(void *buffer, + } else { + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, nbytes, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + +- position = 0; + if (rank == root) { +- mpi_errno = MPIR_Pack_impl(buffer, count, datatype, tmp_buf, nbytes, &position); ++ mpi_errno = MPIR_Localcopy(buffer, count, datatype, tmp_buf, nbytes, MPI_BYTE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -150,8 +145,7 @@ int MPIR_Bcast_intra_scatter_ring_allgather(void *buffer, + + if (!is_contig) { + if (rank != root) { +- position = 0; +- mpi_errno = MPIR_Unpack_impl(tmp_buf, nbytes, &position, buffer, count, datatype); ++ mpi_errno = MPIR_Localcopy(tmp_buf, nbytes, MPI_BYTE, buffer, count, datatype); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +--- a/src/mpi/coll/bcast/bcast_intra_smp.c ++++ b/src/mpi/coll/bcast/bcast_intra_smp.c +@@ -12,10 +12,6 @@ + * the cutoff points for these algorithms. If I've done this right, you should + * be able to make changes along these lines almost exclusively in this function + * and some new functions. [goodell@ 2008/01/07] */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bcast_intra_smp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bcast_intra_smp(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +--- a/src/mpi/coll/bcast/bcast_utils.c ++++ b/src/mpi/coll/bcast/bcast_utils.c +@@ -18,10 +18,6 @@ + + At the moment this function always scatters a buffer of nbytes starting at + tmp_buf address. */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Scatter_for_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Scatter_for_bcast(void *buffer ATTRIBUTE((unused)), + int count ATTRIBUTE((unused)), + MPI_Datatype datatype ATTRIBUTE((unused)), +--- a/src/mpi/coll/exscan/exscan.c ++++ b/src/mpi/coll/exscan/exscan.c +@@ -13,7 +13,7 @@ + cvars: + - name : MPIR_CVAR_EXSCAN_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -61,10 +61,6 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat + #undef MPI_Exscan + #define MPI_Exscan PMPI_Exscan + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Exscan_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Exscan_intra_auto(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +@@ -85,27 +81,23 @@ int MPIR_Exscan_intra_auto(const void *sendbuf, void *recvbuf, int count, MPI_Da + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Exscan_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; + +- switch (MPIR_Exscan_intra_algo_choice) { +- case MPIR_EXSCAN_INTRA_ALGO_RECURSIVE_DOUBLING: ++ switch (MPIR_CVAR_EXSCAN_INTRA_ALGORITHM) { ++ case MPIR_CVAR_EXSCAN_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = + MPIR_Exscan_intra_recursive_doubling(sendbuf, recvbuf, count, datatype, op, + comm_ptr, errflag); + break; +- case MPIR_EXSCAN_INTRA_ALGO_NB: ++ case MPIR_CVAR_EXSCAN_INTRA_ALGORITHM_nb: + mpi_errno = + MPIR_Exscan_allcomm_nb(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); + break; +- case MPIR_EXSCAN_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_EXSCAN_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -123,10 +115,6 @@ int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Exscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +@@ -143,10 +131,6 @@ int MPIR_Exscan(const void *sendbuf, void *recvbuf, int count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Exscan - Computes the exclusive scan (partial reductions) of data on a +@@ -284,12 +268,12 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_exscan", "**mpi_exscan %p %p %d %D %O %C", sendbuf, recvbuf, + count, datatype, op, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/exscan/exscan_allcomm_nb.c ++++ b/src/mpi/coll/exscan/exscan_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Exscan_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Exscan_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +--- a/src/mpi/coll/exscan/exscan_intra_recursive_doubling.c ++++ b/src/mpi/coll/exscan/exscan_intra_recursive_doubling.c +@@ -46,10 +46,6 @@ + } + .ve + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Exscan_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Exscan_intra_recursive_doubling(const void *sendbuf, + void *recvbuf, + int count, +--- a/src/mpi/coll/gather/gather.c ++++ b/src/mpi/coll/gather/gather.c +@@ -25,7 +25,7 @@ cvars: + + - name : MPIR_CVAR_GATHER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -38,7 +38,7 @@ cvars: + + - name : MPIR_CVAR_GATHER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -87,10 +87,6 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void * + #undef MPI_Gather + #define MPI_Gather PMPI_Gather + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gather_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gather_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +@@ -112,10 +108,6 @@ int MPIR_Gather_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype send + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gather_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gather_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +@@ -152,10 +144,6 @@ int MPIR_Gather_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype send + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gather_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -164,18 +152,18 @@ int MPIR_Gather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Gather_intra_algo_choice) { +- case MPIR_GATHER_INTRA_ALGO_BINOMIAL: ++ switch (MPIR_CVAR_GATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_GATHER_INTRA_ALGORITHM_binomial: + mpi_errno = MPIR_Gather_intra_binomial(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, errflag); + break; +- case MPIR_GATHER_INTRA_ALGO_NB: ++ case MPIR_CVAR_GATHER_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Gather_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, comm_ptr, + errflag); + break; +- case MPIR_GATHER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_GATHER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Gather_intra_auto(sendbuf, sendcount, sendtype, +@@ -185,23 +173,23 @@ int MPIR_Gather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + } + } else { + /* intercommunicator */ +- switch (MPIR_Gather_inter_algo_choice) { +- case MPIR_GATHER_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_GATHER_INTER_ALGORITHM) { ++ case MPIR_CVAR_GATHER_INTER_ALGORITHM_linear: + mpi_errno = MPIR_Gather_inter_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, errflag); + break; +- case MPIR_GATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_SEND: ++ case MPIR_CVAR_GATHER_INTER_ALGORITHM_local_gather_remote_send: + mpi_errno = MPIR_Gather_inter_local_gather_remote_send(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + root, comm_ptr, errflag); + break; +- case MPIR_GATHER_INTER_ALGO_NB: ++ case MPIR_CVAR_GATHER_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Gather_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, comm_ptr, + errflag); + break; +- case MPIR_GATHER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_GATHER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Gather_inter_auto(sendbuf, sendcount, sendtype, +@@ -219,10 +207,6 @@ int MPIR_Gather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -242,10 +226,6 @@ int MPIR_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Gather - Gathers together values from a group of processes +@@ -421,12 +401,12 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_gather", "**mpi_gather %p %d %D %p %d %D %d %C", sendbuf, + sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/gather/gather_allcomm_nb.c ++++ b/src/mpi/coll/gather/gather_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gather_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gather_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/gather/gather_inter_linear.c ++++ b/src/mpi/coll/gather/gather_inter_linear.c +@@ -15,10 +15,6 @@ + * Cost: p.alpha + n.beta + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gather_inter_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gather_inter_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -38,8 +34,6 @@ int MPIR_Gather_inter_linear(const void *sendbuf, int sendcount, MPI_Datatype se + + if (root == MPI_ROOT) { + MPIR_Datatype_get_extent_macro(recvtype, extent); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (recvcount * remote_size * extent)); + + for (i = 0; i < remote_size; i++) { + mpi_errno = +--- a/src/mpi/coll/gather/gather_inter_local_gather_remote_send.c ++++ b/src/mpi/coll/gather/gather_inter_local_gather_remote_send.c +@@ -15,10 +15,6 @@ + * Cost: (lgp+1).alpha + n.((p-1)/p).beta + n.beta + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gather_inter_local_gather_remote_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, +@@ -27,8 +23,6 @@ int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, int sendcoun + int rank, local_size, remote_size, mpi_errno = MPI_SUCCESS; + int mpi_errno_ret = MPI_SUCCESS; + MPI_Status status; +- MPI_Aint extent, true_extent, true_lb = 0; +- void *tmp_buf = NULL; + MPIR_Comm *newcomm_ptr = NULL; + MPIR_CHKLMEM_DECL(1); + +@@ -57,20 +51,19 @@ int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, int sendcoun + /* remote group. Rank 0 allocates temporary buffer, does + * local intracommunicator gather, and then sends the data + * to root. */ ++ MPI_Aint sendtype_sz; ++ void *tmp_buf = NULL; + + rank = comm_ptr->rank; + + if (rank == 0) { +- MPIR_Type_get_true_extent_impl(sendtype, &true_lb, &true_extent); +- MPIR_Datatype_get_extent_macro(sendtype, extent); +- +- MPIR_Ensure_Aint_fits_in_pointer(sendcount * local_size * +- (MPL_MAX(extent, true_extent))); ++ MPIR_Datatype_get_size_macro(sendtype, sendtype_sz); + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, +- sendcount * local_size * (MPL_MAX(extent, true_extent)), mpi_errno, ++ sendcount * local_size * sendtype_sz, mpi_errno, + "tmp_buf", MPL_MEM_BUFFER); +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - true_lb); ++ } else { ++ /* silence -Wmaybe-uninitialized due to MPIR_Gather by non-zero ranks */ ++ sendtype_sz = 0; + } + + /* all processes in remote group form new intracommunicator */ +@@ -83,9 +76,9 @@ int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, int sendcoun + newcomm_ptr = comm_ptr->local_comm; + + /* now do the a local gather on this intracommunicator */ +- mpi_errno = +- MPIR_Gather(sendbuf, sendcount, sendtype, tmp_buf, sendcount, sendtype, 0, newcomm_ptr, +- errflag); ++ mpi_errno = MPIR_Gather(sendbuf, sendcount, sendtype, ++ tmp_buf, sendcount * sendtype_sz, MPI_BYTE, ++ 0, newcomm_ptr, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ + *errflag = +@@ -96,9 +89,8 @@ int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, int sendcoun + } + + if (rank == 0) { +- mpi_errno = +- MPIC_Send(tmp_buf, sendcount * local_size, sendtype, root, MPIR_GATHER_TAG, +- comm_ptr, errflag); ++ mpi_errno = MPIC_Send(tmp_buf, sendcount * local_size * sendtype_sz, MPI_BYTE, ++ root, MPIR_GATHER_TAG, comm_ptr, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ + *errflag = +--- a/src/mpi/coll/gather/gather_intra_binomial.c ++++ b/src/mpi/coll/gather/gather_intra_binomial.c +@@ -39,10 +39,6 @@ cvars: + * Cost = lgp.alpha + n.((p-1)/p).beta where n is the total size of the data + * gathered at the root. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gather_intra_binomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gather_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -79,8 +75,6 @@ int MPIR_Gather_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype + + if (rank == root) { + MPIR_Datatype_get_extent_macro(recvtype, extent); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (extent * recvcount * comm_size)); + } + + if (rank == root) { +@@ -270,7 +264,7 @@ int MPIR_Gather_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype + } + } else { + blocks[0] = sendcount; +- struct_displs[0] = MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf; ++ struct_displs[0] = (MPI_Aint) sendbuf; + types[0] = sendtype; + /* check for overflow. work around int limits if needed */ + if (curr_cnt - nbytes != (int) (curr_cnt - nbytes)) { +@@ -280,7 +274,7 @@ int MPIR_Gather_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype + MPIR_Assign_trunc(blocks[1], curr_cnt - nbytes, int); + types[1] = MPI_BYTE; + } +- struct_displs[1] = MPIR_VOID_PTR_CAST_TO_MPI_AINT tmp_buf; ++ struct_displs[1] = (MPI_Aint) tmp_buf; + mpi_errno = + MPIR_Type_create_struct_impl(2, blocks, struct_displs, types, &tmp_type); + if (mpi_errno) +--- a/src/mpi/coll/gatherv/gatherv.c ++++ b/src/mpi/coll/gatherv/gatherv.c +@@ -13,7 +13,7 @@ + cvars: + - name : MPIR_CVAR_GATHERV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -26,7 +26,7 @@ cvars: + + - name : MPIR_CVAR_GATHERV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -75,10 +75,6 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void + #undef MPI_Gatherv + #define MPI_Gatherv PMPI_Gatherv + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gatherv_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gatherv_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -101,10 +97,6 @@ int MPIR_Gatherv_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gatherv_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gatherv_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -127,10 +119,6 @@ int MPIR_Gatherv_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gatherv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gatherv_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -140,18 +128,18 @@ int MPIR_Gatherv_impl(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Gatherv_intra_algo_choice) { +- case MPIR_GATHERV_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_GATHERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_GATHERV_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Gatherv_allcomm_linear(sendbuf, sendcount, sendtype, recvbuf, recvcounts, + displs, recvtype, root, comm_ptr, errflag); + break; +- case MPIR_GATHERV_INTRA_ALGO_NB: ++ case MPIR_CVAR_GATHERV_INTRA_ALGORITHM_nb: + mpi_errno = + MPIR_Gatherv_allcomm_nb(sendbuf, sendcount, sendtype, recvbuf, recvcounts, + displs, recvtype, root, comm_ptr, errflag); + break; +- case MPIR_GATHERV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_GATHERV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -160,18 +148,18 @@ int MPIR_Gatherv_impl(const void *sendbuf, int sendcount, + break; + } + } else { +- switch (MPIR_Gatherv_inter_algo_choice) { +- case MPIR_GATHERV_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_GATHERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_GATHERV_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Gatherv_allcomm_linear(sendbuf, sendcount, sendtype, recvbuf, recvcounts, + displs, recvtype, root, comm_ptr, errflag); + break; +- case MPIR_GATHERV_INTER_ALGO_NB: ++ case MPIR_CVAR_GATHERV_INTER_ALGORITHM_nb: + mpi_errno = + MPIR_Gatherv_allcomm_nb(sendbuf, sendcount, sendtype, recvbuf, recvcounts, + displs, recvtype, root, comm_ptr, errflag); + break; +- case MPIR_GATHERV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_GATHERV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -192,10 +180,6 @@ int MPIR_Gatherv_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -215,10 +199,6 @@ int MPIR_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Gatherv - Gathers into specified locations from all processes in a group +@@ -413,13 +393,13 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_gatherv", "**mpi_gatherv %p %d %D %p %p %p %D %d %C", + sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, + recvtype, root, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/gatherv/gatherv_allcomm_linear.c ++++ b/src/mpi/coll/gatherv/gatherv_allcomm_linear.c +@@ -37,10 +37,6 @@ cvars: + * + * Cost = (p-1).alpha + n.((p-1)/p).beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gatherv_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gatherv_allcomm_linear(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -71,9 +67,6 @@ int MPIR_Gatherv_allcomm_linear(const void *sendbuf, + comm_size = comm_ptr->remote_size; + + MPIR_Datatype_get_extent_macro(recvtype, extent); +- /* each node can make sure it is not going to overflow aint */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- displs[rank] * extent); + + MPIR_CHKLMEM_MALLOC(reqarray, MPIR_Request **, comm_size * sizeof(MPIR_Request *), + mpi_errno, "reqarray", MPL_MEM_BUFFER); +--- a/src/mpi/coll/gatherv/gatherv_allcomm_nb.c ++++ b/src/mpi/coll/gatherv/gatherv_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Gatherv_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Gatherv_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +--- a/src/mpi/coll/helper_fns.c ++++ b/src/mpi/coll/helper_fns.c +@@ -17,10 +17,6 @@ + sends/receives by setting the context offset to + MPIR_CONTEXT_INTRA_COLL or MPIR_CONTEXT_INTER_COLL. */ + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Probe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; +@@ -49,10 +45,6 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status) + the global lock is *not* held when this routine is called. (unless we change + progress_start/end to grab the lock, in which case we must *still* make + sure that the lock is not held when this routine is called). */ +-#undef FUNCNAME +-#define FUNCNAME MPIC_Wait +-#undef FCNAME +-#define FCNAME "MPIC_Wait" + int MPIC_Wait(MPIR_Request * request_ptr, MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; +@@ -107,10 +99,6 @@ int MPIC_Wait(MPIR_Request * request_ptr, MPIR_Errflag_t * errflag) + collective will not communicate failure information this way, but + this is OK since there is no data that can be received corrupted. */ + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +@@ -170,10 +158,6 @@ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, + MPIR_Comm * comm_ptr, MPI_Status * status, MPIR_Errflag_t * errflag) + { +@@ -232,10 +216,6 @@ int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +@@ -295,10 +275,6 @@ int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Sendrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, + int dest, int sendtag, void *recvbuf, MPI_Aint recvcount, + MPI_Datatype recvtype, int source, int recvtag, +@@ -381,10 +357,6 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype + /* NOTE: for regular collectives (as opposed to irregular collectives) calling + * this function repeatedly will almost always be slower than performing the + * equivalent inline because of the overhead of the repeated malloc/free */ +-#undef FUNCNAME +-#define FUNCNAME MPIC_Sendrecv_replace +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, + int dest, int sendtag, + int source, int recvtag, +@@ -397,7 +369,7 @@ int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, + MPIR_Request *rreq = NULL; + void *tmpbuf = NULL; + MPI_Aint tmpbuf_size = 0; +- MPI_Aint tmpbuf_count = 0; ++ MPI_Aint actual_pack_bytes = 0; + MPIR_CHKLMEM_DECL(1); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIC_SENDRECV_REPLACE); + +@@ -428,7 +400,8 @@ int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, + MPIR_CHKLMEM_MALLOC(tmpbuf, void *, tmpbuf_size, mpi_errno, "temporary send buffer", + MPL_MEM_BUFFER); + +- mpi_errno = MPIR_Pack_impl(buf, count, datatype, tmpbuf, tmpbuf_size, &tmpbuf_count); ++ mpi_errno = ++ MPIR_Typerep_pack(buf, count, datatype, 0, tmpbuf, tmpbuf_size, &actual_pack_bytes); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -438,7 +411,7 @@ int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPID_Isend(tmpbuf, tmpbuf_count, MPI_PACKED, dest, ++ mpi_errno = MPID_Isend(tmpbuf, actual_pack_bytes, MPI_PACKED, dest, + sendtag, comm_ptr, context_id_offset, &sreq); + if (mpi_errno != MPI_SUCCESS) { + /* --BEGIN ERROR HANDLING-- */ +@@ -484,10 +457,6 @@ int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, + MPIR_Comm * comm_ptr, MPIR_Request ** request_ptr, MPIR_Errflag_t * errflag) + { +@@ -528,10 +497,6 @@ int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, + MPIR_Comm * comm_ptr, MPIR_Request ** request_ptr, MPIR_Errflag_t * errflag) + { +@@ -572,10 +537,6 @@ int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, + int tag, MPIR_Comm * comm_ptr, MPIR_Request ** request_ptr) + { +@@ -605,10 +566,6 @@ int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIC_Waitall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[], + MPIR_Errflag_t * errflag) + { +--- a/src/mpi/coll/iallgather/Makefile.mk ++++ b/src/mpi/coll/iallgather/Makefile.mk +@@ -21,6 +21,7 @@ mpi_core_sources += \ + src/mpi/coll/iallgather/iallgather_intra_ring.c \ + src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c \ + src/mpi/coll/iallgather/iallgather_gentran_algos.c \ +- src/mpi/coll/iallgather/iallgather_intra_recexch_distance_doubling.c \ +- src/mpi/coll/iallgather/iallgather_intra_recexch_distance_halving.c \ +- src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c ++ src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c \ ++ src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c \ ++ src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c \ ++ src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c +--- a/src/mpi/coll/iallgather/iallgather.c ++++ b/src/mpi/coll/iallgather/iallgather.c +@@ -32,7 +32,7 @@ cvars: + + - name : MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -40,16 +40,17 @@ cvars: + description : |- + Variable to select iallgather algorithm + auto - Internal algorithm selection ++ ring - Force ring algorithm + brucks - Force brucks algorithm + recursive_doubling - Force recursive doubling algorithm +- ring - Force ring algorithm +- recexch_distance_doubling - Force generic transport recursive exchange with neighbours doubling in distance in each phase +- recexch_distance_halving - Force generic transport recursive exchange with neighbours halving in distance in each phase ++ gentran_ring - Force generic transport ring algorithm + gentran_brucks - Force generic transport based brucks algorithm ++ gentran_recexch_doubling - Force generic transport recursive exchange with neighbours doubling in distance in each phase ++ gentran_recexch_halving - Force generic transport recursive exchange with neighbours halving in distance in each phase + + - name : MPIR_CVAR_IALLGATHER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -141,10 +142,6 @@ int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, vo + End Algorithm: MPI_Allgather + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -183,10 +180,6 @@ int MPIR_Iallgather_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Dat + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_sched_inter_auto(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -200,10 +193,6 @@ int MPIR_Iallgather_sched_inter_auto(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_sched_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -213,23 +202,23 @@ int MPIR_Iallgather_sched_impl(const void *sendbuf, int sendcount, + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Iallgather_intra_algo_choice) { +- case MPIR_IALLGATHER_INTRA_ALGO_BRUCKS: ++ switch (MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_brucks: + mpi_errno = MPIR_Iallgather_sched_intra_brucks(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLGATHER_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = MPIR_Iallgather_sched_intra_recursive_doubling(sendbuf, sendcount, + sendtype, recvbuf, + recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLGATHER_INTRA_ALGO_RING: ++ case MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_ring: + mpi_errno = MPIR_Iallgather_sched_intra_ring(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm_ptr, s); + break; +- case MPIR_IALLGATHER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Iallgather_sched_intra_auto(sendbuf, sendcount, sendtype, recvbuf, +@@ -238,15 +227,15 @@ int MPIR_Iallgather_sched_impl(const void *sendbuf, int sendcount, + } + } else { + /* intercommunicator */ +- switch (MPIR_Iallgather_inter_algo_choice) { +- case MPIR_IALLGATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_BCAST: ++ switch (MPIR_CVAR_IALLGATHER_INTER_ALGORITHM) { ++ case MPIR_CVAR_IALLGATHER_INTER_ALGORITHM_local_gather_remote_bcast: + mpi_errno = + MPIR_Iallgather_sched_inter_local_gather_remote_bcast(sendbuf, sendcount, + sendtype, recvbuf, + recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLGATHER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IALLGATHER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Iallgather_sched_inter_auto(sendbuf, sendcount, sendtype, +@@ -259,10 +248,6 @@ int MPIR_Iallgather_sched_impl(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -280,10 +265,6 @@ int MPIR_Iallgather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendt + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -301,26 +282,26 @@ int MPIR_Iallgather_impl(const void *sendbuf, int sendcount, + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Iallgather_intra_algo_choice) { +- case MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_DOUBLING: ++ switch (MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_gentran_recexch_doubling: + mpi_errno = +- MPIR_Iallgather_intra_recexch_distance_doubling(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, +- comm_ptr, request); ++ MPIR_Iallgather_intra_gentran_recexch_doubling(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_HALVING: ++ case MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_gentran_recexch_halving: + mpi_errno = +- MPIR_Iallgather_intra_recexch_distance_halving(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, +- comm_ptr, request); ++ MPIR_Iallgather_intra_gentran_recexch_halving(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_BRUCKS: ++ case MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_gentran_brucks: + mpi_errno = + MPIR_Iallgather_intra_gentran_brucks(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm_ptr, request); +@@ -328,6 +309,15 @@ int MPIR_Iallgather_impl(const void *sendbuf, int sendcount, + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; ++ case MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM_gentran_ring: ++ mpi_errno = ++ MPIR_Iallgather_intra_gentran_ring(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, comm_ptr, ++ request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; + default: + /* go down to the MPIR_Sched-based algorithms */ + break; +@@ -357,10 +347,6 @@ int MPIR_Iallgather_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -380,10 +366,6 @@ int MPIR_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Iallgather - Gathers data from all tasks and distribute the combined data + to all tasks in a nonblocking way +@@ -511,13 +493,13 @@ int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_iallgather", "**mpi_iallgather %p %d %D %p %d %D %C %p", + sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, + request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/iallgather/iallgather_gentran_algos.c ++++ b/src/mpi/coll/iallgather/iallgather_gentran_algos.c +@@ -23,4 +23,9 @@ + #include "iallgather_tsp_brucks_algos.h" + #include "iallgather_tsp_brucks_algos_undef.h" + ++/* instantiate iallgather ring algorithms for the gentran transport */ ++#include "iallgather_tsp_ring_algos_prototypes.h" ++#include "iallgather_tsp_ring_algos.h" ++#include "iallgather_tsp_ring_algos_undef.h" ++ + #include "tsp_undef.h" +--- a/src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c ++++ b/src/mpi/coll/iallgather/iallgather_inter_local_gather_remote_bcast.c +@@ -12,10 +12,6 @@ + * intracommunicator, and then does an intercommunicator broadcast. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_sched_inter_local_gather_remote_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_sched_inter_local_gather_remote_bcast(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -23,7 +19,7 @@ int MPIR_Iallgather_sched_inter_local_gather_remote_bcast(const void *sendbuf, i + { + int mpi_errno = MPI_SUCCESS; + int rank, local_size, remote_size, root; +- MPI_Aint true_extent, true_lb = 0, extent, send_extent; ++ MPI_Aint sendtype_sz; + void *tmp_buf = NULL; + MPIR_Comm *newcomm_ptr = NULL; + MPIR_SCHED_CHKPMEM_DECL(1); +@@ -35,17 +31,12 @@ int MPIR_Iallgather_sched_inter_local_gather_remote_bcast(const void *sendbuf, i + if ((rank == 0) && (sendcount != 0)) { + /* In each group, rank 0 allocates temp. buffer for local + * gather */ +- MPIR_Type_get_true_extent_impl(sendtype, &true_lb, &true_extent); +- +- MPIR_Datatype_get_extent_macro(sendtype, send_extent); +- extent = MPL_MAX(send_extent, true_extent); +- +- MPIR_Ensure_Aint_fits_in_pointer(extent * sendcount * local_size); +- MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, extent * sendcount * local_size, mpi_errno, ++ MPIR_Datatype_get_size_macro(sendtype, sendtype_sz); ++ MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, sendcount * local_size * sendtype_sz, mpi_errno, + "tmp_buf", MPL_MEM_BUFFER); +- +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - true_lb); ++ } else { ++ /* silence -Wmaybe-uninitialized due to MPIR_{Igather,Ibcast}_sched by non-zero ranks */ ++ sendtype_sz = 0; + } + + /* Get the local intracommunicator */ +@@ -56,7 +47,8 @@ int MPIR_Iallgather_sched_inter_local_gather_remote_bcast(const void *sendbuf, i + + if (sendcount != 0) { + mpi_errno = MPIR_Igather_sched(sendbuf, sendcount, sendtype, +- tmp_buf, sendcount, sendtype, 0, newcomm_ptr, s); ++ tmp_buf, sendcount * sendtype_sz, MPI_BYTE, ++ 0, newcomm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -68,8 +60,8 @@ int MPIR_Iallgather_sched_inter_local_gather_remote_bcast(const void *sendbuf, i + /* bcast to right */ + if (sendcount != 0) { + root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; +- mpi_errno = MPIR_Ibcast_sched(tmp_buf, sendcount * local_size, +- sendtype, root, comm_ptr, s); ++ mpi_errno = MPIR_Ibcast_sched(tmp_buf, sendcount * local_size * sendtype_sz, ++ MPI_BYTE, root, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -100,8 +92,8 @@ int MPIR_Iallgather_sched_inter_local_gather_remote_bcast(const void *sendbuf, i + /* bcast to left */ + if (sendcount != 0) { + root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; +- mpi_errno = MPIR_Ibcast_sched(tmp_buf, sendcount * local_size, +- sendtype, root, comm_ptr, s); ++ mpi_errno = MPIR_Ibcast_sched(tmp_buf, sendcount * local_size * sendtype_sz, ++ MPI_BYTE, root, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +--- a/src/mpi/coll/iallgather/iallgather_intra_brucks.c ++++ b/src/mpi/coll/iallgather/iallgather_intra_brucks.c +@@ -15,10 +15,6 @@ + * Cost = lgp.alpha + n.((p-1)/p).beta + * where n is total size of data gathered on each process. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_sched_intra_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -26,7 +22,7 @@ int MPIR_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_D + int mpi_errno = MPI_SUCCESS; + int pof2, curr_cnt, rem, src, dst; + int rank, comm_size; +- MPI_Aint recvtype_extent, recvtype_true_lb, recvtype_true_extent, recvbuf_extent; ++ MPI_Aint recvtype_extent, recvtype_sz; + void *tmp_buf = NULL; + MPIR_SCHED_CHKPMEM_DECL(1); + +@@ -34,32 +30,22 @@ int MPIR_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_D + rank = comm_ptr->rank; + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); +- MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent); +- +- /* This is the largest offset we add to recvbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (comm_size * recvcount * recvtype_extent)); +- + /* allocate a temporary buffer of the same size as recvbuf. */ +- /* get true extent of recvtype */ +- +- recvbuf_extent = recvcount * comm_size * (MPL_MAX(recvtype_true_extent, recvtype_extent)); +- +- MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, recvbuf_extent, mpi_errno, "tmp_buf", +- MPL_MEM_BUFFER); +- +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - recvtype_true_lb); ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); ++ MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, recvcount * comm_size * recvtype_sz, mpi_errno, ++ "tmp_buf", MPL_MEM_BUFFER); + + /* copy local data to the top of tmp_buf */ + if (sendbuf != MPI_IN_PLACE) { +- mpi_errno = MPIR_Sched_copy(sendbuf, sendcount, sendtype, tmp_buf, recvcount, recvtype, s); ++ mpi_errno = MPIR_Sched_copy(sendbuf, sendcount, sendtype, tmp_buf, ++ recvcount * recvtype_sz, MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); + } else { +- mpi_errno = MPIR_Sched_copy(((char *) recvbuf + rank * recvcount * recvtype_extent), +- recvcount, recvtype, tmp_buf, recvcount, recvtype, s); ++ mpi_errno = MPIR_Sched_copy((char *) recvbuf + rank * recvcount * recvtype_extent, ++ recvcount, recvtype, ++ tmp_buf, recvcount * recvtype_sz, MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -73,12 +59,12 @@ int MPIR_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_D + src = (rank + pof2) % comm_size; + dst = (rank - pof2 + comm_size) % comm_size; + +- mpi_errno = MPIR_Sched_send(tmp_buf, curr_cnt, recvtype, dst, comm_ptr, s); ++ mpi_errno = MPIR_Sched_send(tmp_buf, curr_cnt * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + /* logically sendrecv, so no barrier here */ +- mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_cnt * recvtype_extent), +- curr_cnt, recvtype, src, comm_ptr, s); ++ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_cnt * recvtype_sz), ++ curr_cnt * recvtype_sz, MPI_BYTE, src, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -94,12 +80,13 @@ int MPIR_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_D + src = (rank + pof2) % comm_size; + dst = (rank - pof2 + comm_size) % comm_size; + +- mpi_errno = MPIR_Sched_send(tmp_buf, rem * recvcount, recvtype, dst, comm_ptr, s); ++ mpi_errno = ++ MPIR_Sched_send(tmp_buf, rem * recvcount * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + /* logically sendrecv, so no barrier here */ +- mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_cnt * recvtype_extent), +- (rem * recvcount), recvtype, src, comm_ptr, s); ++ mpi_errno = MPIR_Sched_recv((char *) tmp_buf + curr_cnt * recvtype_sz, ++ rem * recvcount * recvtype_sz, MPI_BYTE, src, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -108,17 +95,18 @@ int MPIR_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_D + /* Rotate blocks in tmp_buf down by (rank) blocks and store + * result in recvbuf. */ + +- mpi_errno = MPIR_Sched_copy(tmp_buf, ((comm_size - rank) * recvcount), recvtype, ++ mpi_errno = MPIR_Sched_copy(tmp_buf, (comm_size - rank) * recvcount * recvtype_sz, MPI_BYTE, + ((char *) recvbuf + rank * recvcount * recvtype_extent), +- ((comm_size - rank) * recvcount), recvtype, s); ++ (comm_size - rank) * recvcount, recvtype, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); + + if (rank) { + mpi_errno = +- MPIR_Sched_copy(((char *) tmp_buf + (comm_size - rank) * recvcount * recvtype_extent), +- rank * recvcount, recvtype, recvbuf, rank * recvcount, recvtype, s); ++ MPIR_Sched_copy((char *) tmp_buf + (comm_size - rank) * recvcount * recvtype_sz, ++ rank * recvcount * recvtype_sz, MPI_BYTE, ++ recvbuf, rank * recvcount, recvtype, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +--- a/src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c ++++ b/src/mpi/coll/iallgather/iallgather_intra_gentran_brucks.c +@@ -16,10 +16,6 @@ + #include "iallgather_tsp_brucks_algos_prototypes.h" + #include "tsp_undef.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_intra_gentran_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_intra_gentran_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** request) +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_doubling.c +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallgather_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallgather_intra_gentran_recexch_doubling(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallgather_intra_recexch(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm, req, ++ MPIR_IALLGATHER_RECEXCH_TYPE_DISTANCE_DOUBLING, ++ MPIR_CVAR_IALLGATHER_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgather/iallgather_intra_gentran_recexch_halving.c +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallgather_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallgather_intra_gentran_recexch_halving(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallgather_intra_recexch(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm, req, ++ MPIR_IALLGATHER_RECEXCH_TYPE_DISTANCE_HALVING, ++ MPIR_CVAR_IALLGATHER_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgather/iallgather_intra_gentran_ring.c +@@ -0,0 +1,30 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallgather_tsp_ring_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallgather_intra_gentran_ring(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, ++ MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallgather_intra_ring(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, comm, req); ++ ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpi/coll/iallgather/iallgather_intra_recexch_distance_doubling.c ++++ /dev/null +@@ -1,37 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iallgather_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_intra_recexch_single_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iallgather_intra_recexch_distance_doubling(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iallgather_intra_recexch(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, +- comm, req, +- MPIR_IALLGATHER_RECEXCH_TYPE_DISTANCE_DOUBLING, +- MPIR_CVAR_IALLGATHER_RECEXCH_KVAL); +- +- return mpi_errno; +-} +deleted file mode 100644 +--- a/src/mpi/coll/iallgather/iallgather_intra_recexch_distance_halving.c ++++ /dev/null +@@ -1,37 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iallgather_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_intra_recexch_single_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iallgather_intra_recexch_distance_halving(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iallgather_intra_recexch(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, +- comm, req, +- MPIR_IALLGATHER_RECEXCH_TYPE_DISTANCE_HALVING, +- MPIR_CVAR_IALLGATHER_RECEXCH_KVAL); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c ++++ b/src/mpi/coll/iallgather/iallgather_intra_recursive_doubling.c +@@ -42,10 +42,6 @@ static int dtp_release_ref(MPIR_Comm * comm, int tag, void *state) + * property of recursive doubling (see Benson et al paper in Euro + * PVM/MPI 2003). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_sched_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_sched_intra_recursive_doubling(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -78,10 +74,6 @@ int MPIR_Iallgather_sched_intra_recursive_doubling(const void *sendbuf, int send + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- /* This is the largest offset we add to recvbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (comm_size * recvcount * recvtype_extent)); +- + /* copy local data into recvbuf */ + if (sendbuf != MPI_IN_PLACE) { + mpi_errno = MPIR_Sched_copy(sendbuf, sendcount, sendtype, +--- a/src/mpi/coll/iallgather/iallgather_intra_ring.c ++++ b/src/mpi/coll/iallgather/iallgather_intra_ring.c +@@ -21,10 +21,6 @@ + * performs twice as fast as recursive doubling for long messages (on + * Myrinet and IBM SP). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgather_sched_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgather_sched_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype + sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -39,10 +35,6 @@ int MPIR_Iallgather_sched_intra_ring(const void *sendbuf, int sendcount, MPI_Dat + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- /* This is the largest offset we add to recvbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (comm_size * recvcount * recvtype_extent)); +- + /* First, load the "local" version in the recvbuf. */ + if (sendbuf != MPI_IN_PLACE) { + mpi_errno = MPIR_Sched_copy(sendbuf, sendcount, sendtype, +--- a/src/mpi/coll/iallgather/iallgather_tsp_brucks_algos.h ++++ b/src/mpi/coll/iallgather/iallgather_tsp_brucks_algos.h +@@ -16,10 +16,6 @@ + #include "algo_common.h" + #include "tsp_namespace_def.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgather_sched_intra_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int + MPIR_TSP_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, +@@ -39,12 +35,12 @@ MPIR_TSP_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, + int is_inplace = (sendbuf == MPI_IN_PLACE); + int max = size - 1; + +- size_t sendtype_size, sendtype_extent, sendtype_lb; +- size_t recvtype_size, recvtype_extent, recvtype_lb; +- size_t sendtype_true_extent, recvtype_true_extent; ++ MPI_Aint sendtype_extent, sendtype_lb; ++ MPI_Aint recvtype_extent, recvtype_lb; ++ MPI_Aint sendtype_true_extent, recvtype_true_extent; + + int delta = 1; +- int index = 0; ++ int i_recv = 0; + int *recv_id = NULL; + void *tmp_recvbuf = NULL; + +@@ -65,22 +61,20 @@ MPIR_TSP_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, + } + + /* get datatype info of sendtype and recvtype */ +- MPIR_Datatype_get_size_macro(sendtype, sendtype_size); + MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); + MPIR_Type_get_true_extent_impl(sendtype, &sendtype_lb, &sendtype_true_extent); + sendtype_extent = MPL_MAX(sendtype_extent, sendtype_true_extent); + +- MPIR_Datatype_get_size_macro(recvtype, recvtype_size); + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + MPIR_Type_get_true_extent_impl(recvtype, &recvtype_lb, &recvtype_true_extent); + recvtype_extent = MPL_MAX(recvtype_extent, recvtype_true_extent); + + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, +- "send_type_size: %zu, send_type_extent: %zu, send_count: %d", +- sendtype_size, sendtype_extent, sendcount)); ++ "send_type_extent: %zu, send_count: %d", ++ sendtype_extent, sendcount)); + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, +- "recv_type_size: %zu, recv_type_extent: %zu, recv_count: %d", +- recvtype_size, recvtype_extent, recvcount)); ++ "recv_type_extent: %zu, recv_count: %d", ++ recvtype_extent, recvcount)); + + while (max) { + nphases++; +@@ -137,7 +131,7 @@ MPIR_TSP_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, + } + + /* Receive at the exact location. */ +- recv_id[index++] = ++ recv_id[i_recv++] = + MPIR_TSP_sched_irecv((char *) tmp_recvbuf + j * recvcount * delta * recvtype_extent, + count, recvtype, src, tag, comm, sched, 0, NULL); + +@@ -185,10 +179,6 @@ MPIR_TSP_Iallgather_sched_intra_brucks(const void *sendbuf, int sendcount, + + + /* Non-blocking brucks based Allgather */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgather_intra_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgather_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** req, int k) +--- a/src/mpi/coll/iallgather/iallgather_tsp_recexch_algos.h ++++ b/src/mpi/coll/iallgather/iallgather_tsp_recexch_algos.h +@@ -16,10 +16,6 @@ + #include "recexchalgo.h" + #include "tsp_namespace_def.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgather_sched_intra_recexch_data_exchange +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgather_sched_intra_recexch_data_exchange(int rank, int nranks, int k, int p_of_k, + int log_pofk, int T, void *recvbuf, + MPI_Datatype recvtype, size_t recv_extent, +@@ -62,10 +58,6 @@ int MPIR_TSP_Iallgather_sched_intra_recexch_data_exchange(int rank, int nranks, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgather_sched_intra_recexch_step1 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgather_sched_intra_recexch_step1(int step1_sendto, int *step1_recvfrom, + int step1_nrecvs, int is_inplace, int rank, + int tag, const void *sendbuf, void *recvbuf, +@@ -103,10 +95,6 @@ int MPIR_TSP_Iallgather_sched_intra_recexch_step1(int step1_sendto, int *step1_r + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgather_sched_intra_recexch_step2 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgather_sched_intra_recexch_step2(int step1_sendto, int step2_nphases, + int **step2_nbrs, int rank, int nranks, int k, + int p_of_k, int log_pofk, int T, int *nrecvs_, +@@ -179,10 +167,6 @@ int MPIR_TSP_Iallgather_sched_intra_recexch_step2(int step1_sendto, int step2_np + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgather_sched_intra_recexch_step3 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgather_sched_intra_recexch_step3(int step1_sendto, int *step1_recvfrom, + int step1_nrecvs, int step2_nphases, + void *recvbuf, int recvcount, int nranks, int k, +@@ -220,10 +204,6 @@ int MPIR_TSP_Iallgather_sched_intra_recexch_step3(int step1_sendto, int *step1_r + * paper, Sack et al, "Faster topology-aware collective algorithms through + * non-minimal communication", 2012. + * */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgather_sched_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgather_sched_intra_recexch(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -234,7 +214,7 @@ int MPIR_TSP_Iallgather_sched_intra_recexch(const void *sendbuf, int sendcount, + int nranks, rank; + size_t recv_extent; + MPI_Aint recv_lb, true_extent; +- int step1_sendto = -1, step2_nphases, step1_nrecvs, p_of_k, T; ++ int step1_sendto = -1, step2_nphases = 0, step1_nrecvs = 0, p_of_k, T; + int dtcopy_id, n_invtcs = 0, invtx; + int is_instep2, log_pofk; + int *step1_recvfrom; +@@ -327,10 +307,6 @@ int MPIR_TSP_Iallgather_sched_intra_recexch(const void *sendbuf, int sendcount, + + + /* Non-blocking recexch based Allgather */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgather_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgather_intra_recexch(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Request ** req, int allgather_type, +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgather/iallgather_tsp_ring_algos.h +@@ -0,0 +1,191 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLGATHER_TSP_RING_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++/* Routine to schedule a ring based allgather */ ++int MPIR_TSP_Iallgather_sched_intra_ring(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i, src, dst, copy_dst; ++ /* Temporary buffers to execute the ring algorithm */ ++ void *buf1, *buf2, *data_buf, *rbuf, *sbuf; ++ ++ int size = MPIR_Comm_size(comm); ++ int rank = MPIR_Comm_rank(comm); ++ int is_inplace = (sendbuf == MPI_IN_PLACE); ++ int tag; ++ ++ MPI_Aint recvtype_lb, recvtype_extent; ++ MPI_Aint sendtype_lb, sendtype_extent; ++ MPI_Aint sendtype_true_extent, recvtype_true_extent; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLGATHER_SCHED_INTRA_RING); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLGATHER_SCHED_INTRA_RING); ++ ++ /* Find out the buffer which has the send data and point data_buf to it */ ++ if (is_inplace) { ++ sendcount = recvcount; ++ sendtype = recvtype; ++ data_buf = (char *) recvbuf; ++ } else ++ data_buf = (char *) sendbuf; ++ ++ /* Get datatype info of sendtype and recvtype */ ++ MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); ++ MPIR_Type_get_true_extent_impl(sendtype, &sendtype_lb, &sendtype_true_extent); ++ sendtype_extent = MPL_MAX(sendtype_extent, sendtype_true_extent); ++ ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ MPIR_Type_get_true_extent_impl(recvtype, &recvtype_lb, &recvtype_true_extent); ++ recvtype_extent = MPL_MAX(recvtype_extent, recvtype_true_extent); ++ ++ /* Allocate space for temporary buffers */ ++ buf1 = MPIR_TSP_sched_malloc(recvcount * recvtype_extent, sched); ++ buf2 = MPIR_TSP_sched_malloc(recvcount * recvtype_extent, sched); ++ ++ int dtcopy_id[3]; ++ if (is_inplace) { ++ /* Copy data to buf1 from sendbuf or recvbuf(in case of inplace) */ ++ dtcopy_id[0] = ++ MPIR_TSP_sched_localcopy((char *) data_buf + rank * recvcount * recvtype_extent, ++ sendcount, sendtype, (char *) buf1, recvcount, recvtype, sched, ++ 0, NULL); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "copying data to tmp_buf on add:%p on %d rank before for loop from sendbuf:%p and dtcopy_id:%d", ++ buf1, rank, (char *) data_buf + rank * sendtype_extent, dtcopy_id[0])); ++ } else { ++ /* Copy your data into your recvbuf from your sendbuf */ ++ MPIR_TSP_sched_localcopy((char *) sendbuf, sendcount, sendtype, ++ (char *) recvbuf + rank * recvcount * recvtype_extent, ++ recvcount, recvtype, sched, 0, NULL); ++ ++ /* Copy data from sendbuf to buf1 to send the data */ ++ dtcopy_id[0] = MPIR_TSP_sched_localcopy((char *) data_buf, sendcount, sendtype, ++ (char *) buf1, recvcount, recvtype, sched, 0, NULL); ++ } ++ ++ /* In ring algorithm src and dst are fixed */ ++ src = (size + rank - 1) % size; ++ dst = (rank + 1) % size; ++ ++ sbuf = buf1; ++ rbuf = buf2; ++ ++ /* Ranks pass around the data (size - 1) times */ ++ int send_id[3]; ++ int recv_id[3] = { 0 }; /* warning fix: icc: maybe used before set */ ++ for (i = 0; i < size - 1; i++) { ++ /* Get new tag for each cycle so that the send-recv pairs are matched correctly */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ int vtcs[3], nvtcs; ++ if (i == 0) { ++ nvtcs = 1; ++ vtcs[0] = dtcopy_id[0]; ++ send_id[0] = MPIR_TSP_sched_isend((char *) sbuf, recvcount, recvtype, ++ dst, tag, comm, sched, nvtcs, vtcs); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "posting recv at address=%p, count=%d", rbuf, ++ size * recvcount)); ++ nvtcs = 0; ++ } else { ++ nvtcs = 2; ++ vtcs[0] = recv_id[(i - 1) % 3]; ++ vtcs[1] = send_id[(i - 1) % 3]; ++ send_id[i % 3] = MPIR_TSP_sched_isend((char *) sbuf, recvcount, recvtype, ++ dst, tag, comm, sched, nvtcs, vtcs); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "posting recv at address=%p, count=%d", rbuf, ++ size * recvcount)); ++ if (i == 1) { ++ nvtcs = 2; ++ vtcs[0] = send_id[0]; ++ vtcs[1] = recv_id[0]; ++ } else { ++ nvtcs = 3; ++ vtcs[0] = send_id[(i - 1) % 3]; ++ vtcs[1] = dtcopy_id[(i - 2) % 3]; ++ vtcs[2] = recv_id[(i - 1) % 3]; ++ } ++ } ++ ++ recv_id[i % 3] = MPIR_TSP_sched_irecv((char *) rbuf, recvcount, recvtype, ++ src, tag, comm, sched, nvtcs, vtcs); ++ ++ copy_dst = (size + rank - i - 1) % size; /* Destination offset of the copy */ ++ dtcopy_id[i % 3] = MPIR_TSP_sched_localcopy((char *) rbuf, recvcount, recvtype, ++ (char *) recvbuf + ++ copy_dst * recvcount * recvtype_extent, ++ recvcount, recvtype, sched, 1, &recv_id[i % 3]); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "copying from location=%p to location=%p", ++ (char *) rbuf + rank * recvcount * recvtype_extent, ++ (char *) recvbuf + copy_dst * recvcount * recvtype_extent)); ++ ++ data_buf = sbuf; ++ sbuf = rbuf; ++ rbuf = data_buf; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_RING); ++ return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Non-blocking ring based Allgather */ ++int MPIR_TSP_Iallgather_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLGATHER_INTRA_RING); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLGATHER_INTRA_RING); ++ ++ ++ /* Generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_ERR_CHKANDJUMP(!sched, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ MPIR_TSP_sched_create(sched); ++ ++ mpi_errno = ++ MPIR_TSP_Iallgather_sched_intra_ring(sendbuf, sendcount, sendtype, recvbuf, ++ recvcount, recvtype, comm, sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IALLGATHER_INTRA_RING); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgather/iallgather_tsp_ring_algos_prototypes.h +@@ -0,0 +1,30 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLGATHER_TSP_RING_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Iallgather_intra_ring ++#define MPIR_TSP_Iallgather_intra_ring MPIR_TSP_NAMESPACE(Iallgather_intra_ring) ++#undef MPIR_TSP_Iallgather_sched_intra_ring ++#define MPIR_TSP_Iallgather_sched_intra_ring MPIR_TSP_NAMESPACE(Iallgather_sched_intra_ring) ++ ++int MPIR_TSP_Iallgather_sched_intra_ring(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_TSP_sched_t * sched); ++ ++int MPIR_TSP_Iallgather_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgather/iallgather_tsp_ring_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLGATHER_TSP_RING_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Iallgather_intra_ring ++#undef MPIR_TSP_Iallgather_sched_intra_ring +--- a/src/mpi/coll/iallgatherv/Makefile.mk ++++ b/src/mpi/coll/iallgatherv/Makefile.mk +@@ -21,6 +21,11 @@ mpi_core_sources += \ + src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c \ + src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c \ + src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c \ +- src/mpi/coll/iallgatherv/iallgatherv_intra_recexch_distance_doubling.c \ +- src/mpi/coll/iallgatherv/iallgatherv_intra_recexch_distance_halving.c \ +- src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c ++ src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c \ ++ src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c \ ++ src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c \ ++ src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c \ ++ src/mpi/coll/iallgatherv/iallgatherv_utils.c ++ ++noinst_HEADERS += \ ++ src/mpi/coll/iallgatherv/iallgatherv.h +--- a/src/mpi/coll/iallgatherv/iallgatherv.c ++++ b/src/mpi/coll/iallgatherv/iallgatherv.c +@@ -5,6 +5,7 @@ + */ + + #include "mpiimpl.h" ++#include "iallgatherv.h" + + /* + === BEGIN_MPI_T_CVAR_INFO_BLOCK === +@@ -20,9 +21,19 @@ cvars: + description : >- + k value for recursive exchange based iallgatherv + ++ - name : MPIR_CVAR_IALLGATHERV_BRUCKS_KVAL ++ category : COLLECTIVE ++ type : int ++ default : 2 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ k value for radix in brucks based iallgatherv ++ + - name : MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -33,13 +44,14 @@ cvars: + brucks - Force brucks algorithm + recursive_doubling - Force recursive doubling algorithm + ring - Force ring algorithm +- recexch_distance_doubling - Force generic transport recursive exchange with neighbours doubling in distance in each phase +- recexch_distance_halving - Force generic transport recursive exchange with neighbours halving in distance in each phase +- gentran_ring - Force generic transport ring algorithm ++ gentran_recexch_doubling - Force generic transport recursive exchange with neighbours doubling in distance in each phase ++ gentran_recexch_halving - Force generic transport recursive exchange with neighbours halving in distance in each phase ++ gentran_ring - Force generic transport ring algorithm ++ gentran_brucks - Force generic transport based brucks algorithm + + - name : MPIR_CVAR_IALLGATHERV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -81,22 +93,6 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, v + #endif + /* -- End Profiling Symbol Block */ + +-/* This function checks whether the displacements are in increasing order and +- * that there is no overlap or gap between the data of successive ranks. Some +- * algorithms can only handle ordered array of data and hence this function for +- * checking whether the data is ordered. */ +-static int is_ordered(int comm_size, const int recvcounts[], const int displs[]) +-{ +- int i, pos = 0; +- for (i = 0; i < comm_size; i++) { +- if (pos != displs[i]) { +- return 0; +- } +- pos += recvcounts[i]; +- } +- return 1; +-} +- + /* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build + the MPI routines */ + #ifndef MPICH_MPI_FROM_PMPI +@@ -139,10 +135,6 @@ static int is_ordered(int comm_size, const int recvcounts[], const int displs[]) + + End Algorithm: MPI_Allgatherv + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -194,10 +186,6 @@ int MPIR_Iallgatherv_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Da + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -212,10 +200,6 @@ int MPIR_Iallgatherv_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Da + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -224,24 +208,24 @@ int MPIR_Iallgatherv_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Iallgatherv_intra_algo_choice) { +- case MPIR_IALLGATHERV_INTRA_ALGO_BRUCKS: ++ switch (MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_brucks: + mpi_errno = MPIR_Iallgatherv_sched_intra_brucks(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm_ptr, s); + break; +- case MPIR_IALLGATHERV_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = + MPIR_Iallgatherv_sched_intra_recursive_doubling(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm_ptr, s); + break; +- case MPIR_IALLGATHERV_INTRA_ALGO_RING: ++ case MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_ring: + mpi_errno = MPIR_Iallgatherv_sched_intra_ring(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLGATHERV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Iallgatherv_sched_intra_auto(sendbuf, sendcount, sendtype, +@@ -251,15 +235,15 @@ int MPIR_Iallgatherv_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype + } + } else { + /* intercommunicator */ +- switch (MPIR_Iallgatherv_inter_algo_choice) { +- case MPIR_IALLGATHERV_INTER_ALGO_REMOTE_GATHER_LOCAL_BCAST: ++ switch (MPIR_CVAR_IALLGATHERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_IALLGATHERV_INTER_ALGORITHM_remote_gather_local_bcast: + mpi_errno = + MPIR_Iallgatherv_sched_inter_remote_gather_local_bcast(sendbuf, sendcount, + sendtype, recvbuf, + recvcounts, displs, + recvtype, comm_ptr, s); + break; +- case MPIR_IALLGATHERV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IALLGATHERV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Iallgatherv_sched_inter_auto(sendbuf, sendcount, sendtype, +@@ -272,10 +256,6 @@ int MPIR_Iallgatherv_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -293,10 +273,6 @@ int MPIR_Iallgatherv_sched(const void *sendbuf, int sendcount, MPI_Datatype send + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -314,30 +290,32 @@ int MPIR_Iallgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendt + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Iallgatherv_intra_algo_choice) { +- case MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_DOUBLING: +- if (!is_ordered(comm_size, recvcounts, displs)) /* This algo cannot handle unordered data */ ++ switch (MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_gentran_recexch_doubling: ++ /* This algo cannot handle unordered data */ ++ if (!MPII_Iallgatherv_is_displs_ordered(comm_size, recvcounts, displs)) + break; + mpi_errno = +- MPIR_Iallgatherv_intra_recexch_distance_doubling(sendbuf, sendcount, sendtype, +- recvbuf, recvcounts, displs, +- recvtype, comm_ptr, request); ++ MPIR_Iallgatherv_intra_gentran_recexch_doubling(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, ++ recvtype, comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_HALVING: +- if (!is_ordered(comm_size, recvcounts, displs)) /* This algo cannot handle unordered data */ ++ case MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_gentran_recexch_halving: ++ /* This algo cannot handle unordered data */ ++ if (!MPII_Iallgatherv_is_displs_ordered(comm_size, recvcounts, displs)) + break; + mpi_errno = +- MPIR_Iallgatherv_intra_recexch_distance_halving(sendbuf, sendcount, sendtype, +- recvbuf, recvcounts, displs, +- recvtype, comm_ptr, request); ++ MPIR_Iallgatherv_intra_gentran_recexch_halving(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, ++ recvtype, comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RING: ++ case MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_gentran_ring: + mpi_errno = + MPIR_Iallgatherv_intra_gentran_ring(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, +@@ -346,6 +324,15 @@ int MPIR_Iallgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendt + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; ++ case MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_gentran_brucks: ++ mpi_errno = ++ MPIR_Iallgatherv_intra_gentran_brucks(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, ++ recvtype, comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; + default: + /* go down to the MPIR_Sched-based algorithms */ + break; +@@ -375,10 +362,6 @@ int MPIR_Iallgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendt + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -398,10 +381,6 @@ int MPIR_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Iallgatherv - Gathers data from all tasks and deliver the combined data + to all tasks in a nonblocking way +@@ -535,13 +514,13 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, v + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_iallgatherv", + "**mpi_iallgatherv %p %d %D %p %p %p %D %C %p", sendbuf, sendcount, + sendtype, recvbuf, recvcounts, displs, recvtype, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgatherv/iallgatherv.h +@@ -0,0 +1,14 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef IALLGATHERV_H_INCLUDED ++#define IALLGATHERV_H_INCLUDED ++ ++#include "mpiimpl.h" ++ ++int MPII_Iallgatherv_is_displs_ordered(int size, const int recvcounts[], const int displs[]); ++ ++#endif /* IALLGATHERV_H_INCLUDED */ +--- a/src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c ++++ b/src/mpi/coll/iallgatherv/iallgatherv_gentran_algos.c +@@ -23,4 +23,9 @@ + #include "iallgatherv_tsp_ring_algos.h" + #include "iallgatherv_tsp_ring_algos_undef.h" + ++/* instantiate iallgatherv brucks algorithms for the gentran transport */ ++#include "iallgatherv_tsp_brucks_algos_prototypes.h" ++#include "iallgatherv_tsp_brucks_algos.h" ++#include "iallgatherv_tsp_brucks_algos_undef.h" ++ + #include "tsp_undef.h" +--- a/src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c ++++ b/src/mpi/coll/iallgatherv/iallgatherv_inter_remote_gather_local_bcast.c +@@ -17,10 +17,6 @@ + * intracommunicator broadcast. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_sched_inter_remote_gather_local_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_sched_inter_remote_gather_local_bcast(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], +--- a/src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c ++++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_brucks.c +@@ -6,17 +6,13 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_sched_intra_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + int comm_size, rank, j, i; +- MPI_Aint recvbuf_extent, recvtype_extent, recvtype_true_extent, recvtype_true_lb; ++ MPI_Aint recvtype_extent, recvtype_sz; + int send_cnt, dst, total_count, pof2, src, rem; + int incoming_count, curr_count; + void *tmp_buf; +@@ -26,6 +22,7 @@ int MPIR_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_ + rank = comm_ptr->rank; + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + + total_count = 0; + for (i = 0; i < comm_size; i++) +@@ -35,30 +32,20 @@ int MPIR_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_ + goto fn_exit; + + /* allocate a temporary buffer of the same size as recvbuf. */ +- +- /* get true extent of recvtype */ +- MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent); +- +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(recvtype_true_extent, recvtype_extent)); +- recvbuf_extent = total_count * (MPL_MAX(recvtype_true_extent, recvtype_extent)); +- +- MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, recvbuf_extent, mpi_errno, "tmp_buf", ++ MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, total_count * recvtype_sz, mpi_errno, "tmp_buf", + MPL_MEM_BUFFER); + +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - recvtype_true_lb); +- + /* copy local data to the top of tmp_buf */ + if (sendbuf != MPI_IN_PLACE) { + mpi_errno = MPIR_Sched_copy(sendbuf, sendcount, sendtype, +- tmp_buf, recvcounts[rank], recvtype, s); ++ tmp_buf, recvcounts[rank] * recvtype_sz, MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); + } else { + mpi_errno = MPIR_Sched_copy(((char *) recvbuf + displs[rank] * recvtype_extent), + recvcounts[rank], recvtype, +- tmp_buf, recvcounts[rank], recvtype, s); ++ tmp_buf, recvcounts[rank] * recvtype_sz, MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -84,12 +71,12 @@ int MPIR_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_ + incoming_count += recvcounts[(src + i) % comm_size]; + } + +- mpi_errno = MPIR_Sched_send(tmp_buf, curr_count, recvtype, dst, comm_ptr, s); ++ mpi_errno = MPIR_Sched_send(tmp_buf, curr_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + /* sendrecv, no barrier */ +- mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_count * recvtype_extent), +- incoming_count, recvtype, src, comm_ptr, s); ++ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_count * recvtype_sz), ++ incoming_count * recvtype_sz, MPI_BYTE, src, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -109,12 +96,13 @@ int MPIR_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_ + for (i = 0; i < rem; i++) + send_cnt += recvcounts[(rank + i) % comm_size]; + +- mpi_errno = MPIR_Sched_send(tmp_buf, send_cnt, recvtype, dst, comm_ptr, s); ++ mpi_errno = MPIR_Sched_send(tmp_buf, send_cnt * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + /* sendrecv, no barrier */ +- mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_count * recvtype_extent), +- (total_count - curr_count), recvtype, src, comm_ptr, s); ++ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_count * recvtype_sz), ++ (total_count - curr_count) * recvtype_sz, MPI_BYTE, ++ src, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -126,8 +114,8 @@ int MPIR_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_ + send_cnt = 0; + for (i = 0; i < (comm_size - rank); i++) { + j = (rank + i) % comm_size; +- mpi_errno = MPIR_Sched_copy(((char *) tmp_buf + send_cnt * recvtype_extent), +- recvcounts[j], recvtype, ++ mpi_errno = MPIR_Sched_copy(((char *) tmp_buf + send_cnt * recvtype_sz), ++ recvcounts[j] * recvtype_sz, MPI_BYTE, + ((char *) recvbuf + displs[j] * recvtype_extent), + recvcounts[j], recvtype, s); + if (mpi_errno) +@@ -136,8 +124,8 @@ int MPIR_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_ + } + + for (i = 0; i < rank; i++) { +- mpi_errno = MPIR_Sched_copy(((char *) tmp_buf + send_cnt * recvtype_extent), +- recvcounts[i], recvtype, ++ mpi_errno = MPIR_Sched_copy(((char *) tmp_buf + send_cnt * recvtype_sz), ++ recvcounts[i] * recvtype_sz, MPI_BYTE, + ((char *) recvbuf + displs[i] * recvtype_extent), + recvcounts[i], recvtype, s); + if (mpi_errno) +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_brucks.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallgatherv_tsp_brucks_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallgatherv_intra_gentran_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallgatherv_intra_brucks(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, ++ recvtype, comm_ptr, request, ++ MPIR_CVAR_IALLGATHERV_BRUCKS_KVAL); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_doubling.c +@@ -0,0 +1,34 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallgatherv_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallgatherv_intra_gentran_recexch_doubling(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, const int *displs, ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallgatherv_intra_recexch(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, recvtype, ++ comm, req, ++ MPIR_IALLGATHERV_RECEXCH_TYPE_DISTANCE_DOUBLING, ++ MPIR_CVAR_IALLGATHERV_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_recexch_halving.c +@@ -0,0 +1,34 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallgatherv_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallgatherv_intra_gentran_recexch_halving(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, const int *displs, ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallgatherv_intra_recexch(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, recvtype, ++ comm, req, ++ MPIR_IALLGATHERV_RECEXCH_TYPE_DISTANCE_HALVING, ++ MPIR_CVAR_IALLGATHERV_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c ++++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_gentran_ring.c +@@ -16,10 +16,6 @@ + #include "iallgatherv_tsp_ring_algos_prototypes.h" + #include "tsp_undef.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_intra_gentran_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_intra_gentran_ring(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +deleted file mode 100644 +--- a/src/mpi/coll/iallgatherv/iallgatherv_intra_recexch_distance_doubling.c ++++ /dev/null +@@ -1,38 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iallgatherv_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_intra_recexch_single_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iallgatherv_intra_recexch_distance_doubling(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iallgatherv_intra_recexch(sendbuf, sendcount, sendtype, +- recvbuf, recvcounts, displs, recvtype, +- comm, req, +- MPIR_IALLGATHERV_RECEXCH_TYPE_DISTANCE_DOUBLING, +- MPIR_CVAR_IALLGATHERV_RECEXCH_KVAL); +- +- return mpi_errno; +-} +deleted file mode 100644 +--- a/src/mpi/coll/iallgatherv/iallgatherv_intra_recexch_distance_halving.c ++++ /dev/null +@@ -1,38 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iallgatherv_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_intra_recexch_single_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iallgatherv_intra_recexch_distance_halving(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iallgatherv_intra_recexch(sendbuf, sendcount, sendtype, +- recvbuf, recvcounts, displs, recvtype, +- comm, req, +- MPIR_IALLGATHERV_RECEXCH_TYPE_DISTANCE_HALVING, +- MPIR_CVAR_IALLGATHERV_RECEXCH_KVAL); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c ++++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_recursive_doubling.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_sched_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -20,7 +16,7 @@ int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sen + int comm_size, rank, i, j, k; + int curr_count, send_offset, incoming_count, recv_offset; + int mask, dst, total_count, position, offset, my_tree_root, dst_tree_root; +- MPI_Aint recvtype_extent, recvtype_true_extent, recvtype_true_lb; ++ MPI_Aint recvtype_extent, recvtype_sz; + void *tmp_buf = NULL; + MPIR_SCHED_CHKPMEM_DECL(1); + +@@ -35,8 +31,8 @@ int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sen + + /* need to receive contiguously into tmp_buf because + * displs could make the recvbuf noncontiguous */ ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); +- MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent); + + total_count = 0; + for (i = 0; i < comm_size; i++) +@@ -45,31 +41,25 @@ int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sen + if (total_count == 0) + goto fn_exit; + +- MPIR_Ensure_Aint_fits_in_pointer(total_count * +- (MPL_MAX(recvtype_true_extent, recvtype_extent))); +- MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, +- total_count * (MPL_MAX(recvtype_true_extent, recvtype_extent)), ++ MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, total_count * recvtype_sz, + mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - recvtype_true_lb); +- + /* copy local data into right location in tmp_buf */ + position = 0; + for (i = 0; i < rank; i++) + position += recvcounts[i]; + if (sendbuf != MPI_IN_PLACE) { + mpi_errno = MPIR_Sched_copy(sendbuf, sendcount, sendtype, +- ((char *) tmp_buf + position * recvtype_extent), +- recvcounts[rank], recvtype, s); ++ ((char *) tmp_buf + position * recvtype_sz), ++ recvcounts[rank] * recvtype_sz, MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } else { + /* if in_place specified, local data is found in recvbuf */ + mpi_errno = MPIR_Sched_copy(((char *) recvbuf + displs[rank] * recvtype_extent), + recvcounts[rank], recvtype, +- ((char *) tmp_buf + position * recvtype_extent), +- recvcounts[rank], recvtype, s); ++ ((char *) tmp_buf + position * recvtype_sz), ++ recvcounts[rank] * recvtype_sz, MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -117,13 +107,13 @@ int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sen + for (j = dst_tree_root; j < (dst_tree_root + mask) && j < comm_size; ++j) + incoming_count += recvcounts[j]; + +- mpi_errno = MPIR_Sched_send(((char *) tmp_buf + send_offset * recvtype_extent), +- curr_count, recvtype, dst, comm_ptr, s); ++ mpi_errno = MPIR_Sched_send(((char *) tmp_buf + send_offset * recvtype_sz), ++ curr_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + /* sendrecv, no barrier here */ +- mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + recv_offset * recvtype_extent), +- incoming_count, recvtype, dst, comm_ptr, s); ++ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + recv_offset * recvtype_sz), ++ incoming_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -182,13 +172,14 @@ int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sen + offset = 0; + for (j = 0; j < (my_tree_root + mask); j++) + offset += recvcounts[j]; +- offset *= recvtype_extent; ++ offset *= recvtype_sz; + + /* incoming_count was set in the previous + * receive. that's the amount of data to be + * sent now. */ + mpi_errno = MPIR_Sched_send(((char *) tmp_buf + offset), +- incoming_count, recvtype, dst, comm_ptr, s); ++ incoming_count * recvtype_sz, MPI_BYTE, ++ dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -209,8 +200,9 @@ int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sen + for (j = dst_tree_root; j < (dst_tree_root + mask) && j < comm_size; ++j) + incoming_count += recvcounts[j]; + +- mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + offset * recvtype_extent), +- incoming_count, recvtype, dst, comm_ptr, s); ++ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + offset * recvtype_sz), ++ incoming_count * recvtype_sz, MPI_BYTE, ++ dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -235,8 +227,8 @@ int MPIR_Iallgatherv_sched_intra_recursive_doubling(const void *sendbuf, int sen + if ((sendbuf != MPI_IN_PLACE) || (j != rank)) { + /* not necessary to copy if in_place and + * j==rank. otherwise copy. */ +- mpi_errno = MPIR_Sched_copy(((char *) tmp_buf + position * recvtype_extent), +- recvcounts[j], recvtype, ++ mpi_errno = MPIR_Sched_copy(((char *) tmp_buf + position * recvtype_sz), ++ recvcounts[j] * recvtype_sz, MPI_BYTE, + ((char *) recvbuf + displs[j] * recvtype_extent), + recvcounts[j], recvtype, s); + if (mpi_errno) +--- a/src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c ++++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_ring.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallgatherv_sched_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallgatherv_sched_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_brucks_algos.h +@@ -0,0 +1,358 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLGATHERV_TSP_BRUCKS_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++#include "iallgatherv.h" ++ ++/* XXX The code has work around to deal with a known failure with a ICC version ++ * 2019.0.105 build with the following configuration: ++ * ./configure -C --disable-perftest --disable-ft-tests --with-fwrapname=mpigf \ ++ --with-filesystem=ufs+nfs --enable-timer-type=linux86_cycle --enable-romio \ ++ --with-mpe=no --with-smpcoll=yes --with-assert-level=0 --enable-shared \ ++ --enable-static --enable-error-messages=yes --enable-visibility --enable-large-tests \ ++ --enable-strict --enable-collalgo-tests --with-ch4-posix-eager-modules=fbox \ ++ --enable-g=none --enable-error-checking=no --enable-fast=all,O3 --disable-debuginfo \ ++ --with-device=ch4:ofi:sockets --enable-handle-allocation=default --enable-threads=multiple \ ++ --without-valgrind --enable-timing=none --enable-ch4-direct=auto \ ++ --with-ch4-netmod-ofi-args= --enable-thread-cs=global --with-libfabric=embedded \ ++ MPICHLIB_CFLAGS="-O3 -Wall -ggdb -ggdb -mtune=generic -std=gnu99 -Wcheck -Wall -w3 \ ++ -wd869 -wd280 -wd593 -wd2259 -wd981" MPICHLIB_CXXFLAGS="-O3 -Wall -ggdb -ggdb \ ++ -mtune=generic -Wcheck -Wall -w3 -wd869 -wd280 -wd593 -wd2259 -wd981" \ ++ MPICHLIB_FCFLAGS="-O3 -Wall -ggdb -ggdb -mtune=generic -w" MPICHLIB_F77FLAGS="-O3 \ ++ -Wall -ggdb -ggdb -mtune=generic -w" MPICHLIB_LDFLAGS="-O3 -L/usr/lib64 -O0" \ ++ CC=icc LDFLAGS=" -Wl,-z,muldefs -Wl,-z,now" CXX=icpc FC=ifort F77=ifort --disable-checkerrors ++ */ ++ ++int ++MPIR_TSP_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_TSP_sched_t * sched, int k) ++{ ++ int i, j, l; ++ int nphases = 0; ++ int n_invtcs = 0; ++ int src, dst, p_of_k = 0; /* largest power of k that is (strictly) smaller than 'size' */ ++ int total_recvcount = 0; ++ int delta = 1; ++ ++ int is_inplace, rank, size, max; ++ MPI_Aint sendtype_extent, sendtype_lb; ++ MPI_Aint recvtype_extent, recvtype_lb; ++ MPI_Aint sendtype_true_extent, recvtype_true_extent; ++ ++#ifdef MPL_USE_DBG_LOGGING ++ size_t sendtype_size; ++#endif ++ ++ int tag; ++ int *recv_id = NULL; ++ int *recv_index = NULL; ++ int *scount_lookup = NULL; ++ MPIR_CHKLMEM_DECL(3); ++ void *tmp_recvbuf = NULL; ++ int **s_counts = NULL; ++ int **r_counts = NULL; ++ int tmp_sum = 0; ++ int idx = 0; ++ int index_sum = 0; ++ int prev_delta = 0; ++ int count_length, top_count, bottom_count, left_count; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_BRUCKS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_BRUCKS); ++ ++ int mpi_errno = MPI_SUCCESS; ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ is_inplace = (sendbuf == MPI_IN_PLACE); ++ rank = MPIR_Comm_rank(comm); ++ size = MPIR_Comm_size(comm); ++ max = size - 1; ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "allgatherv_brucks: num_ranks: %d, k: %d", size, k)); ++ ++ if (is_inplace) { ++ sendcount = recvcounts[rank]; ++ sendtype = recvtype; ++ } ++ ++ /* Get datatype info of sendtype and recvtype */ ++ MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); ++ MPIR_Type_get_true_extent_impl(sendtype, &sendtype_lb, &sendtype_true_extent); ++ sendtype_extent = MPL_MAX(sendtype_extent, sendtype_true_extent); ++ ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ MPIR_Type_get_true_extent_impl(recvtype, &recvtype_lb, &recvtype_true_extent); ++ recvtype_extent = MPL_MAX(recvtype_extent, recvtype_true_extent); ++ ++#ifdef MPL_USE_DBG_LOGGING ++ MPIR_Datatype_get_size_macro(sendtype, sendtype_size); ++#endif ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "send_type_size: %lu, sendtype_extent: %lu, send_count: %d", ++ sendtype_size, sendtype_extent, sendcount)); ++ ++ while (max) { ++ nphases++; ++ max /= k; ++ } ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "comm_size:%d, nphases:%d, recvcounts[rank:%d]:%d", size, ++ nphases, rank, recvcounts[rank])); ++ ++ /* Check if size is power of k */ ++ if (MPL_ipow(k, nphases) == size) ++ p_of_k = 1; ++ ++ /* if nphases=0 then no recv_id needed */ ++ MPIR_CHKLMEM_MALLOC(recv_id, int *, sizeof(int) * nphases * (k - 1), mpi_errno, "recv_id", ++ MPL_MEM_COLL); ++ MPIR_CHKLMEM_MALLOC(scount_lookup, int *, sizeof(int) * nphases, mpi_errno, "scount_lookup", ++ MPL_MEM_COLL); ++ ++ /* To store the index to receive in various phases and steps within */ ++ MPIR_CHKLMEM_MALLOC(recv_index, int *, sizeof(int) * nphases * (k - 1), mpi_errno, "recv_index", ++ MPL_MEM_COLL); ++ ++ for (i = 0; i < size; i++) ++ total_recvcount += recvcounts[i]; ++ ++ if (rank == 0) ++ tmp_recvbuf = recvbuf; ++ else ++ tmp_recvbuf = MPIR_TSP_sched_malloc(total_recvcount * recvtype_extent, sched); ++ ++ r_counts = (int **) MPL_malloc(sizeof(int *) * nphases, MPL_MEM_COLL); ++ if (nphases > 0) ++ MPIR_ERR_CHKANDJUMP(!r_counts, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ ++ s_counts = (int **) MPL_malloc(sizeof(int *) * nphases, MPL_MEM_COLL); ++ if (nphases > 0) ++ MPIR_ERR_CHKANDJUMP(!s_counts, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ ++ for (i = 0; i < nphases; i++) { ++ r_counts[i] = (int *) MPL_malloc(sizeof(int) * (k - 1), MPL_MEM_COLL); ++ MPIR_ERR_CHKANDJUMP(!r_counts[i], mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ s_counts[i] = (int *) MPL_malloc(sizeof(int) * (k - 1), MPL_MEM_COLL); ++ MPIR_ERR_CHKANDJUMP(!s_counts[i], mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ ++ index_sum = recvcounts[rank]; /* because in initially you copy your own data to the top of recv_buf */ ++ if (nphases > 0) ++ recv_index[idx++] = index_sum; ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "addresses of all allocated memory:\n recv_index:%p, recv_id:%p, r_counts:%p, s_counts:%p, tmp_recvbuf:%p", ++ recv_index, recv_id, r_counts, s_counts, tmp_recvbuf)); ++ ++ delta = 1; ++ for (i = 0; i < nphases; i++) { ++ scount_lookup[i] = (i == 0) ? 0 : scount_lookup[i - 1]; ++ for (l = prev_delta; l < delta; l++) { ++ scount_lookup[i] += recvcounts[(rank + l) % size]; ++ } ++ prev_delta = delta; ++ delta *= k; ++ } ++ ++ delta = 1; ++ /* The least s_count for any send will be their own sendcount(=recvcounts[rank]) ++ * We add all the r_counts received from neighbours during the previous phase */ ++ for (i = 0; i < nphases; i++) { ++ for (j = 1; j < k; j++) { ++ r_counts[i][j - 1] = 0; ++ s_counts[i][j - 1] = 0; ++ src = (int) (rank + delta * j) % size; ++ if ((i == nphases - 1) && (!p_of_k)) { ++ left_count = size - delta * j; ++ count_length = MPL_MIN(delta, left_count); ++ } else { ++ count_length = delta; ++ } ++ /* Calculate r_counts and s_counts for the data you'll receive and send in ++ * the next steps(phase, [0, 1, ..,(k-1)]) */ ++ tmp_sum = 0; ++ /* XXX We use a temporary variable to hold the sum instead of directly ++ * accumulating in r_counts[i][j-1]. Using r_counts[i][j-1] does not ++ * compile properly for a certain build. The same issue happens with ++ * s_counts[i][j - 1] after we use the tmp_sum for r_counts[i][j - 1]. ++ * Details of the configuration are at the top of the file. */ ++ for (l = 0; l < count_length; l++) { ++ tmp_sum += recvcounts[(src + l) % size]; ++ } ++ r_counts[i][j - 1] = tmp_sum; ++ ++ if (count_length != delta) { ++ tmp_sum = 0; ++ for (l = 0; l < count_length; l++) { ++ tmp_sum += recvcounts[(rank + l) % size]; ++ } ++ s_counts[i][j - 1] = tmp_sum; ++ } else { ++ s_counts[i][j - 1] = scount_lookup[i]; ++ } ++ ++ /* Helps point to correct recv location in tmp_recvbuf */ ++ index_sum += r_counts[i][j - 1]; ++ if (idx < nphases * (k - 1)) ++ recv_index[idx++] = index_sum; ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "r_counts[%d][%d]=%d, s_counts[%d][%d]=%d", i, j - 1, ++ r_counts[i][j - 1], i, j - 1, s_counts[i][j - 1])); ++ } ++ delta *= k; ++ } ++ ++ /* Step1: copy own data from sendbuf to top of recvbuf */ ++ if (is_inplace && rank != 0) ++ MPIR_TSP_sched_localcopy((char *) recvbuf + displs[rank] * recvtype_extent, ++ recvcounts[rank], recvtype, tmp_recvbuf, ++ recvcounts[rank], recvtype, sched, 0, NULL); ++ else if (!is_inplace) ++ MPIR_TSP_sched_localcopy(sendbuf, sendcount, sendtype, tmp_recvbuf, ++ recvcounts[rank], recvtype, sched, 0, NULL); ++ ++ MPIR_TSP_sched_fence(sched); ++ ++ idx = 0; ++ delta = 1; ++ for (i = 0; i < nphases; i++) { ++ for (j = 1; j < k; j++) { ++ /* If the first location exceeds comm size, nothing is to be sent */ ++ if (MPL_ipow(k, i) * j >= size) ++ break; ++ ++ dst = (int) (size + (rank - delta * j)) % size; ++ src = (int) (rank + delta * j) % size; ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "Phase#%d/%d:j:%d: src:%d, dst:%d", ++ i, nphases, j, src, dst)); ++ /* Recv at the exact location */ ++ recv_id[idx] = ++ MPIR_TSP_sched_irecv((char *) tmp_recvbuf + recv_index[idx] * recvtype_extent, ++ r_counts[i][j - 1], recvtype, src, tag, comm, sched, 0, NULL); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "Phase#%d:, k:%d with recv_index[idx:%d]:%d at Recv at:%p from src:%d for recv_count:%d", ++ i, k, idx, recv_index[idx], ++ ((char *) tmp_recvbuf + recv_index[idx] * recvtype_extent), src, ++ r_counts[i][j - 1])); ++ idx++; ++ ++ /* Send from the start of recv till the count amount of data */ ++ MPIR_TSP_sched_isend(tmp_recvbuf, s_counts[i][j - 1], recvtype, dst, tag, comm, sched, ++ n_invtcs, recv_id); ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, ++ "Phase#%d:, k:%d Send from:%p to dst:%d for count:%d", ++ i, k, tmp_recvbuf, dst, s_counts[i][j - 1])); ++ } ++ n_invtcs += (k - 1); ++ delta *= k; ++ } ++ MPIR_TSP_sched_fence(sched); ++ ++ /* No shift required for rank 0 */ ++ if (rank != 0) { ++ idx = 0; ++ if (MPII_Iallgatherv_is_displs_ordered(size, recvcounts, displs)) { ++ /* Calculate idx(same as count) till 0th rank's data */ ++ for (i = 0; i < (size - rank); i++) ++ idx += recvcounts[(rank + i) % size]; ++ ++ bottom_count = idx; ++ top_count = total_recvcount - idx; ++ MPIR_TSP_sched_localcopy((char *) tmp_recvbuf + bottom_count * recvtype_extent, ++ top_count, recvtype, recvbuf, top_count, recvtype, sched, 0, ++ NULL); ++ MPIR_TSP_sched_localcopy(tmp_recvbuf, bottom_count, recvtype, ++ (char *) recvbuf + top_count * recvtype_extent, bottom_count, ++ recvtype, sched, 0, NULL); ++ } else { ++ for (i = 0; i < size; i++) { ++ src = (rank + i) % size; /* Rank whose data it is copying */ ++ idx += (i == 0) ? 0 : recvcounts[(rank + i - 1) % size]; ++ MPIR_TSP_sched_localcopy((char *) tmp_recvbuf + idx * recvtype_extent, ++ recvcounts[src], recvtype, ++ (char *) recvbuf + displs[src] * recvtype_extent, ++ recvcounts[src], recvtype, sched, 0, NULL); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "Copied rank %d's data for recvcounts:%d from idx:%d at displs:%d", ++ src, recvcounts[src], idx, displs[src])); ++ } ++ } ++ } ++ ++ for (i = 0; i < nphases; i++) { ++ MPL_free(r_counts[i]); ++ MPL_free(s_counts[i]); ++ } ++ MPL_free(r_counts); ++ MPL_free(s_counts); ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_BRUCKS); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Non-blocking brucks based Allgatherv */ ++int MPIR_TSP_Iallgatherv_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** req, int k) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLGATHERV_INTRA_BRUCKS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLGATHERV_INTRA_BRUCKS); ++ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ /* generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_ERR_CHKANDJUMP(!sched, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ MPIR_TSP_sched_create(sched); ++ ++ mpi_errno = MPIR_TSP_Iallgatherv_sched_intra_brucks(sendbuf, sendcount, sendtype, recvbuf, ++ recvcounts, displs, recvtype, comm_ptr, ++ sched, k); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm_ptr, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IALLGATHERV_INTRA_BRUCKS); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_brucks_algos_prototypes.h +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLGATHERV_TSP_BRUCKS_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Iallgatherv_intra_brucks ++#define MPIR_TSP_Iallgatherv_intra_brucks MPIR_TSP_NAMESPACE(Iallgatherv_intra_brucks) ++#undef MPIR_TSP_Iallgatherv_sched_intra_brucks ++#define MPIR_TSP_Iallgatherv_sched_intra_brucks MPIR_TSP_NAMESPACE(Iallgatherv_sched_intra_brucks) ++ ++int MPIR_TSP_Iallgatherv_sched_intra_brucks(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_TSP_sched_t * s, int k); ++int MPIR_TSP_Iallgatherv_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request, int k); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_brucks_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLGATHERV_TSP_BRUCKS_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Iallgatherv_intra_brucks ++#undef MPIR_TSP_Iallgatherv_sched_intra_brucks +--- a/src/mpi/coll/iallgatherv/iallgatherv_tsp_recexch_algos.h ++++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_recexch_algos.h +@@ -16,10 +16,6 @@ + #include "recexchalgo.h" + #include "tsp_namespace_def.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgatherv_sched_intra_recexch_data_exchange +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgatherv_sched_intra_recexch_data_exchange(int rank, int nranks, int k, int p_of_k, + int log_pofk, int T, void *recvbuf, + MPI_Datatype recvtype, +@@ -73,10 +69,6 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_data_exchange(int rank, int nranks, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgatherv_sched_intra_recexch_step1 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgatherv_sched_intra_recexch_step1(int step1_sendto, int *step1_recvfrom, + int step1_nrecvs, int is_inplace, int rank, + int tag, const void *sendbuf, void *recvbuf, +@@ -115,10 +107,6 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_step1(int step1_sendto, int *step1_ + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgatherv_sched_intra_recexch_step2 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgatherv_sched_intra_recexch_step2(int step1_sendto, int step2_nphases, + int **step2_nbrs, int rank, int nranks, int k, + int p_of_k, int log_pofk, int T, int *nrecvs_, +@@ -199,10 +187,6 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_step2(int step1_sendto, int step2_n + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgatherv_sched_intra_recexch_step3 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgatherv_sched_intra_recexch_step3(int step1_sendto, int *step1_recvfrom, + int step1_nrecvs, int step2_nphases, + void *recvbuf, const int *recvcounts, int nranks, +@@ -236,14 +220,10 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_step3(int step1_sendto, int *step1_ + } + + /* Routine to schedule a recursive exchange based allgather */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgatherv_sched_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int tag, MPIR_Comm * comm, ++ MPI_Datatype recvtype, MPIR_Comm * comm, + int is_dist_halving, int k, MPIR_TSP_sched_t * sched) + { + int mpi_errno = MPI_SUCCESS; +@@ -251,13 +231,14 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, int sendcount, + int nranks, rank; + size_t recv_extent; + MPI_Aint recv_lb, true_extent; +- int step1_sendto = -1, step2_nphases, step1_nrecvs, p_of_k, T; ++ int step1_sendto = -1, step2_nphases = 0, step1_nrecvs = 0, p_of_k, T; + int dtcopy_id, n_invtcs = 0, invtx; + int is_instep2, log_pofk; +- int *step1_recvfrom; +- int **step2_nbrs; ++ int *step1_recvfrom = NULL; ++ int **step2_nbrs = NULL; + int nrecvs; +- int *recv_id; ++ int *recv_id = NULL; ++ int tag; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_RECEXCH); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_RECEXCH); +@@ -270,6 +251,11 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, int sendcount, + MPIR_Type_get_true_extent_impl(recvtype, &recv_lb, &true_extent); + recv_extent = MPL_MAX(recv_extent, true_extent); + ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + if (nranks == 1) { /*If only one rank, copy sendbuf to recvbuf and return */ + if (!is_inplace) +@@ -330,6 +316,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, int sendcount, + step2_nphases, recvbuf, recvcounts, nranks, k, + nrecvs, recv_id, tag, recvtype, comm, sched); + ++ fn_exit: + /* free the memory */ + for (i = 0; i < step2_nphases; i++) + MPL_free(step2_nbrs[i]); +@@ -340,21 +327,18 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, int sendcount, + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_RECEXCH); + + return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + + /* Non-blocking recexch based Allgather */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgatherv_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgatherv_intra_recexch(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Request ** req, + int algo_type, int k) + { + int mpi_errno = MPI_SUCCESS; +- int tag; + MPIR_TSP_sched_t *sched; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLGATHERV_INTRA_RECEXCH); +@@ -367,15 +351,9 @@ int MPIR_TSP_Iallgatherv_intra_recexch(const void *sendbuf, int sendcount, MPI_D + MPIR_Assert(sched != NULL); + MPIR_TSP_sched_create(sched); + +- /* For correctness, transport based collectives need to get the +- * tag from the same pool as schedule based collectives */ +- mpi_errno = MPIR_Sched_next_tag(comm, &tag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- + mpi_errno = + MPIR_TSP_Iallgatherv_sched_intra_recexch(sendbuf, sendcount, sendtype, recvbuf, recvcounts, +- displs, recvtype, tag, comm, algo_type, k, sched); ++ displs, recvtype, comm, algo_type, k, sched); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +--- a/src/mpi/coll/iallgatherv/iallgatherv_tsp_recexch_algos_prototypes.h ++++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_recexch_algos_prototypes.h +@@ -63,7 +63,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_step3(int step1_sendto, int *step1_ + int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int tag, MPIR_Comm * comm, ++ MPI_Datatype recvtype, MPIR_Comm * comm, + int is_dist_halving, int k, MPIR_TSP_sched_t * sched); + + int MPIR_TSP_Iallgatherv_intra_recexch(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +--- a/src/mpi/coll/iallgatherv/iallgatherv_tsp_ring_algos.h ++++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_ring_algos.h +@@ -17,14 +17,10 @@ + #include "tsp_namespace_def.h" + + /* Routine to schedule a recursive exchange based allgatherv */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgatherv_sched_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int tag, MPIR_Comm * comm, ++ MPI_Datatype recvtype, MPIR_Comm * comm, + MPIR_TSP_sched_t * sched) + { + size_t extent; +@@ -32,10 +28,10 @@ int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + int i, src, dst; + int nranks, is_inplace, rank; +- int nvtcs, vtcs[3], send_id[3], recv_id[3], dtcopy_id[3]; + int send_rank, recv_rank; + void *data_buf, *buf1, *buf2, *sbuf, *rbuf; + int max_count; ++ int tag; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_RING); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_RING); +@@ -67,6 +63,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, int sendcount, + buf2 = MPIR_TSP_sched_malloc(max_count * extent, sched); + + /* Phase 1: copy data to buf1 from sendbuf or recvbuf(in case of inplace) */ ++ int dtcopy_id[3]; + if (is_inplace) { + dtcopy_id[0] = + MPIR_TSP_sched_localcopy((char *) data_buf + displs[rank] * extent, sendcount, sendtype, +@@ -88,35 +85,46 @@ int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, int sendcount, + sbuf = buf1; + rbuf = buf2; + ++ int send_id[3]; ++ int recv_id[3] = { 0 }; /* warning fix: icc: maybe used before set */ + for (i = 0; i < nranks - 1; i++) { + recv_rank = (rank - i - 1 + nranks) % nranks; /* Rank whose data you're receiving */ + send_rank = (rank - i + nranks) % nranks; /* Rank whose data you're sending */ + ++ /* New tag for each send-recv pair. */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ int nvtcs, vtcs[3]; + if (i == 0) { + nvtcs = 1; + vtcs[0] = dtcopy_id[0]; ++ ++ send_id[i % 3] = ++ MPIR_TSP_sched_isend(sbuf, recvcounts[send_rank], recvtype, dst, tag, comm, sched, ++ nvtcs, vtcs); ++ ++ nvtcs = 0; + } else { + nvtcs = 2; + vtcs[0] = recv_id[(i - 1) % 3]; + vtcs[1] = send_id[(i - 1) % 3]; +- } +- +- send_id[i % 3] = +- MPIR_TSP_sched_isend(sbuf, recvcounts[send_rank], recvtype, dst, tag, comm, sched, +- nvtcs, vtcs); + +- +- if (i == 0) { +- nvtcs = 0; +- } else if (i == 1) { +- nvtcs = 2; +- vtcs[0] = send_id[(i - 1) % 3]; +- vtcs[1] = recv_id[(i - 1) % 3]; +- } else { +- nvtcs = 3; +- vtcs[0] = send_id[(i - 1) % 3]; +- vtcs[1] = dtcopy_id[(i - 2) % 3]; +- vtcs[2] = recv_id[(i - 1) % 3]; ++ send_id[i % 3] = ++ MPIR_TSP_sched_isend(sbuf, recvcounts[send_rank], recvtype, dst, tag, comm, sched, ++ nvtcs, vtcs); ++ ++ if (i == 1) { ++ nvtcs = 2; ++ vtcs[0] = send_id[0]; ++ vtcs[1] = recv_id[0]; ++ } else { ++ nvtcs = 3; ++ vtcs[0] = send_id[(i - 1) % 3]; ++ vtcs[1] = dtcopy_id[(i - 2) % 3]; ++ vtcs[2] = recv_id[(i - 1) % 3]; ++ } + } + + recv_id[i % 3] = +@@ -140,20 +148,17 @@ int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, int sendcount, + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IALLGATHERV_SCHED_INTRA_RING); + return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + + /* Non-blocking ring based Allgatherv */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallgatherv_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallgatherv_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Request ** req) + { + int mpi_errno = MPI_SUCCESS; +- int tag; + MPIR_TSP_sched_t *sched; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLGATHERV_INTRA_RING); +@@ -166,15 +171,9 @@ int MPIR_TSP_Iallgatherv_intra_ring(const void *sendbuf, int sendcount, MPI_Data + MPIR_Assert(sched != NULL); + MPIR_TSP_sched_create(sched); + +- /* For correctness, transport based collectives need to get the +- * tag from the same pool as schedule based collectives */ +- mpi_errno = MPIDU_Sched_next_tag(comm, &tag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- + mpi_errno = + MPIR_TSP_Iallgatherv_sched_intra_ring(sendbuf, sendcount, sendtype, recvbuf, recvcounts, +- displs, recvtype, tag, comm, sched); ++ displs, recvtype, comm, sched); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +--- a/src/mpi/coll/iallgatherv/iallgatherv_tsp_ring_algos_prototypes.h ++++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_ring_algos_prototypes.h +@@ -23,7 +23,7 @@ + int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int tag, MPIR_Comm * comm, ++ MPI_Datatype recvtype, MPIR_Comm * comm, + MPIR_TSP_sched_t * sched); + + int MPIR_TSP_Iallgatherv_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallgatherv/iallgatherv_utils.c +@@ -0,0 +1,30 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++#include "iallgatherv.h" ++ ++/* This function checks whether the displacements are in increasing order and ++ * that there is no overlap or gap between the data of successive ranks. Some ++ * algorithms can only handle ordered array of data and hence this function for ++ * checking whether the data is ordered. ++ */ ++int MPII_Iallgatherv_is_displs_ordered(int size, const int recvcounts[], const int displs[]) ++{ ++ int i, pos = 0; ++ for (i = 0; i < size; i++) { ++ if (pos != displs[i]) { ++ return 0; ++ } ++ pos += recvcounts[i]; ++ } ++ return 1; ++} +--- a/src/mpi/coll/iallreduce/Makefile.mk ++++ b/src/mpi/coll/iallreduce/Makefile.mk +@@ -22,7 +22,6 @@ mpi_core_sources += \ + src/mpi/coll/iallreduce/iallreduce_intra_smp.c \ + src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c \ + src/mpi/coll/iallreduce/iallreduce_gentran_algos.c \ +- src/mpi/coll/iallreduce/iallreduce_intra_recexch_single_buffer.c \ +- src/mpi/coll/iallreduce/iallreduce_intra_recexch_multiple_buffer.c \ +- src/mpi/coll/iallreduce/iallreduce_intra_tree_kary.c \ +- src/mpi/coll/iallreduce/iallreduce_intra_tree_knomial.c ++ src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c \ ++ src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c \ ++ src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c +--- a/src/mpi/coll/iallreduce/iallreduce.c ++++ b/src/mpi/coll/iallreduce/iallreduce.c +@@ -20,17 +20,29 @@ cvars: + description : >- + k value for tree based iallreduce (for tree_kary and tree_knomial) + ++ - name : MPIR_CVAR_IALLREDUCE_TREE_TYPE ++ category : COLLECTIVE ++ type : string ++ default : kary ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Tree type for tree based ibcast ++ kary - kary tree type ++ knomial_1 - knomial_1 tree type ++ knomial_2 - knomial_2 tree type ++ + - name : MPIR_CVAR_IALLREDUCE_TREE_PIPELINE_CHUNK_SIZE + category : COLLECTIVE + type : int +- default : -1 ++ default : 0 + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : >- + Maximum chunk size (in bytes) for pipelining in tree based +- iallreduce (tree_kary and tree_knomial). Default value is 0, that is, +- no pipelining by default ++ iallreduce. Default value is 0, that is, no pipelining by default + + - name : MPIR_CVAR_IALLREDUCE_TREE_BUFFER_PER_CHILD + category : COLLECTIVE +@@ -59,7 +71,7 @@ cvars: + + - name : MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -70,12 +82,13 @@ cvars: + naive - Force naive algorithm + recursive_doubling - Force recursive doubling algorithm + reduce_scatter_allgather - Force reduce scatter allgather algorithm +- recexch_single_buffer - Force generic transport recursive exchange with single buffer for receives +- recexch_multiple_buffer - Force generic transport recursive exchange with multiple buffers for receives ++ gentran_recexch_single_buffer - Force generic transport recursive exchange with single buffer for receives ++ gentran_recexch_multiple_buffer - Force generic transport recursive exchange with multiple buffers for receives ++ gentran_tree - Force generic transport tree algorithm + + - name : MPIR_CVAR_IALLREDUCE_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -122,10 +135,6 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype d + #undef MPI_Iallreduce + #define MPI_Iallreduce PMPI_Iallreduce + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched_intra_auto(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -172,10 +181,6 @@ int MPIR_Iallreduce_sched_intra_auto(const void *sendbuf, void *recvbuf, int cou + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched_inter_auto(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -189,10 +194,6 @@ int MPIR_Iallreduce_sched_inter_auto(const void *sendbuf, void *recvbuf, int cou + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -205,23 +206,23 @@ int MPIR_Iallreduce_sched_impl(const void *sendbuf, void *recvbuf, int count, MP + MPIR_Iallreduce_sched_intra_smp(sendbuf, recvbuf, count, datatype, op, comm_ptr, s); + } else { + /* intracommunicator */ +- switch (MPIR_Iallreduce_intra_algo_choice) { +- case MPIR_IALLREDUCE_INTRA_ALGO_NAIVE: ++ switch (MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_naive: + mpi_errno = MPIR_Iallreduce_sched_intra_naive(sendbuf, recvbuf, count, + datatype, op, comm_ptr, s); + break; +- case MPIR_IALLREDUCE_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = + MPIR_Iallreduce_sched_intra_recursive_doubling(sendbuf, recvbuf, count, + datatype, op, comm_ptr, s); + break; +- case MPIR_IALLREDUCE_INTRA_ALGO_REDUCE_SCATTER_ALLGATHER: ++ case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_reduce_scatter_allgather: + mpi_errno = + MPIR_Iallreduce_sched_intra_reduce_scatter_allgather(sendbuf, recvbuf, + count, datatype, op, + comm_ptr, s); + break; +- case MPIR_IALLREDUCE_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Iallreduce_sched_intra_auto(sendbuf, recvbuf, count, +@@ -231,14 +232,14 @@ int MPIR_Iallreduce_sched_impl(const void *sendbuf, void *recvbuf, int count, MP + } + } else { + /* intercommunicator */ +- switch (MPIR_Iallreduce_inter_algo_choice) { +- case MPIR_IALLREDUCE_INTER_ALGO_REMOTE_REDUCE_LOCAL_BCAST: ++ switch (MPIR_CVAR_IALLREDUCE_INTER_ALGORITHM) { ++ case MPIR_CVAR_IALLREDUCE_INTER_ALGORITHM_remote_reduce_local_bcast: + mpi_errno = + MPIR_Iallreduce_sched_inter_remote_reduce_local_bcast(sendbuf, recvbuf, count, + datatype, op, comm_ptr, + s); + break; +- case MPIR_IALLREDUCE_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IALLREDUCE_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Iallreduce_sched_inter_auto(sendbuf, recvbuf, count, +@@ -250,10 +251,6 @@ int MPIR_Iallreduce_sched_impl(const void *sendbuf, void *recvbuf, int count, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -268,10 +265,6 @@ int MPIR_Iallreduce_sched(const void *sendbuf, void *recvbuf, int count, MPI_Dat + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_impl(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Request ** request) +@@ -288,34 +281,28 @@ int MPIR_Iallreduce_impl(const void *sendbuf, void *recvbuf, int count, + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Iallreduce_intra_algo_choice) { +- case MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_RECEXCH_SINGLE_BUFFER: +- mpi_errno = +- MPIR_Iallreduce_intra_recexch_single_buffer(sendbuf, recvbuf, count, datatype, +- op, comm_ptr, request); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- goto fn_exit; +- break; +- case MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_RECEXCH_MULTIPLE_BUFFER: ++ switch (MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_gentran_recexch_single_buffer: + mpi_errno = +- MPIR_Iallreduce_intra_recexch_multiple_buffer(sendbuf, recvbuf, count, datatype, +- op, comm_ptr, request); ++ MPIR_Iallreduce_intra_gentran_recexch_single_buffer(sendbuf, recvbuf, count, ++ datatype, op, comm_ptr, ++ request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_TREE_KARY: ++ case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_gentran_recexch_multiple_buffer: + mpi_errno = +- MPIR_Iallreduce_intra_tree_kary(sendbuf, recvbuf, count, datatype, +- op, comm_ptr, request); ++ MPIR_Iallreduce_intra_gentran_recexch_multiple_buffer(sendbuf, recvbuf, count, ++ datatype, op, comm_ptr, ++ request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_TREE_KNOMIAL: ++ case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_gentran_tree: + mpi_errno = +- MPIR_Iallreduce_intra_tree_knomial(sendbuf, recvbuf, count, datatype, ++ MPIR_Iallreduce_intra_gentran_tree(sendbuf, recvbuf, count, datatype, + op, comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -348,10 +335,6 @@ int MPIR_Iallreduce_impl(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request) + { +@@ -368,10 +351,6 @@ int MPIR_Iallreduce(const void *sendbuf, void *recvbuf, int count, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Iallreduce - Combines values from all processes and distributes the result + back to all processes in a nonblocking way +@@ -493,12 +472,12 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_iallreduce", "**mpi_iallreduce %p %p %d %D %O %C %p", + sendbuf, recvbuf, count, datatype, op, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c ++++ b/src/mpi/coll/iallreduce/iallreduce_inter_remote_reduce_local_bcast.c +@@ -17,10 +17,6 @@ + * buffer. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched_inter_remote_reduce_local_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched_inter_remote_reduce_local_bcast(const void *sendbuf, void *recvbuf, + int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_multiple_buffer.c +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallreduce_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallreduce_intra_gentran_recexch_multiple_buffer(const void *sendbuf, void *recvbuf, ++ int count, MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallreduce_intra_recexch(sendbuf, recvbuf, count, ++ datatype, op, ++ comm, req, ++ MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, ++ MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallreduce/iallreduce_intra_gentran_recexch_single_buffer.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallreduce_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallreduce_intra_gentran_recexch_single_buffer(const void *sendbuf, void *recvbuf, ++ int count, MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallreduce_intra_recexch(sendbuf, recvbuf, count, ++ datatype, op, ++ comm, req, ++ MPIR_IALLREDUCE_RECEXCH_TYPE_SINGLE_BUFFER, ++ MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iallreduce/iallreduce_intra_gentran_tree.c +@@ -0,0 +1,30 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iallreduce_tsp_tree_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iallreduce_intra_gentran_tree(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iallreduce_intra_tree(sendbuf, recvbuf, count, datatype, op, ++ comm_ptr, request, MPIR_Iallreduce_tree_type, ++ MPIR_CVAR_IALLREDUCE_TREE_KVAL, ++ MPIR_CVAR_IALLREDUCE_TREE_PIPELINE_CHUNK_SIZE); ++ return mpi_errno; ++} +--- a/src/mpi/coll/iallreduce/iallreduce_intra_naive.c ++++ b/src/mpi/coll/iallreduce/iallreduce_intra_naive.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + + /* implements the naive intracomm allreduce, that is, reduce followed by bcast */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched_intra_naive +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched_intra_naive(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +deleted file mode 100644 +--- a/src/mpi/coll/iallreduce/iallreduce_intra_recexch_multiple_buffer.c ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iallreduce_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_intra_recexch_multiple_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iallreduce_intra_recexch_multiple_buffer(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, +- MPIR_Comm * comm, MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iallreduce_intra_recexch(sendbuf, recvbuf, count, +- datatype, op, +- comm, req, +- MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, +- MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL); +- +- return mpi_errno; +-} +deleted file mode 100644 +--- a/src/mpi/coll/iallreduce/iallreduce_intra_recexch_single_buffer.c ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iallreduce_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_intra_recexch_single_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iallreduce_intra_recexch_single_buffer(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, +- MPIR_Comm * comm, MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iallreduce_intra_recexch(sendbuf, recvbuf, count, +- datatype, op, +- comm, req, +- MPIR_IALLREDUCE_RECEXCH_TYPE_SINGLE_BUFFER, +- MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c ++++ b/src/mpi/coll/iallreduce/iallreduce_intra_recursive_doubling.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -30,7 +26,6 @@ int MPIR_Iallreduce_sched_intra_recursive_doubling(const void *sendbuf, void *re + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), mpi_errno, + "temporary buffer", MPL_MEM_BUFFER); + +--- a/src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c ++++ b/src/mpi/coll/iallreduce/iallreduce_intra_reduce_scatter_allgather.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + + /* also known as "Rabenseifner's algorithm" */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched_intra_reduce_scatter_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched_intra_reduce_scatter_allgather(const void *sendbuf, void *recvbuf, + int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -38,7 +34,6 @@ int MPIR_Iallreduce_sched_intra_reduce_scatter_allgather(const void *sendbuf, vo + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), mpi_errno, + "temporary buffer", MPL_MEM_BUFFER); + +--- a/src/mpi/coll/iallreduce/iallreduce_intra_smp.c ++++ b/src/mpi/coll/iallreduce/iallreduce_intra_smp.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_sched_intra_smp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iallreduce_sched_intra_smp(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +deleted file mode 100644 +--- a/src/mpi/coll/iallreduce/iallreduce_intra_tree_kary.c ++++ /dev/null +@@ -1,34 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iallreduce_tsp_tree_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_intra_tree_knomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iallreduce_intra_tree_kary(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iallreduce_intra_tree(sendbuf, recvbuf, count, datatype, op, +- comm_ptr, request, MPIR_TREE_TYPE_KARY, +- MPIR_CVAR_IALLREDUCE_TREE_KVAL, +- MPIR_CVAR_IALLREDUCE_TREE_PIPELINE_CHUNK_SIZE); +- return mpi_errno; +-} +deleted file mode 100644 +--- a/src/mpi/coll/iallreduce/iallreduce_intra_tree_knomial.c ++++ /dev/null +@@ -1,35 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iallreduce_tsp_tree_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iallreduce_intra_tree_knomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iallreduce_intra_tree_knomial(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, +- MPIR_Comm * comm_ptr, MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iallreduce_intra_tree(sendbuf, recvbuf, count, datatype, op, +- comm_ptr, request, MPIR_TREE_TYPE_KNOMIAL_1, +- MPIR_CVAR_IALLREDUCE_TREE_KVAL, +- MPIR_CVAR_IALLREDUCE_TREE_PIPELINE_CHUNK_SIZE); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/iallreduce/iallreduce_tsp_recexch_algos.h ++++ b/src/mpi/coll/iallreduce/iallreduce_tsp_recexch_algos.h +@@ -18,12 +18,8 @@ + #include "recexchalgo.h" + + /* Routine to schedule a recursive exchange based allreduce */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallreduce_sched_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int tag, ++ MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm, int per_nbr_buffer, int k, + MPIR_TSP_sched_t * sched) + { +@@ -34,8 +30,8 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, + MPI_Aint lb, true_extent; + int is_commutative; + int nranks, rank; +- int step1_sendto = -1, step1_nrecvs, *step1_recvfrom; +- int step2_nphases, **step2_nbrs; ++ int step1_sendto = -1, step1_nrecvs = 0, *step1_recvfrom; ++ int step2_nphases = 0, **step2_nbrs; + int p_of_k, T; + int buf = 0; + int nvtcs, step1_id, *recv_id, *vtcs; +@@ -46,6 +42,7 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, + void *tmp_buf; + void **step1_recvbuf = NULL; + void **nbr_buffer; ++ int tag; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLREDUCE_SCHED_INTRA_RECEXCH); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLREDUCE_SCHED_INTRA_RECEXCH); +@@ -61,6 +58,10 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, + + tmp_buf = MPIR_TSP_sched_malloc(count * extent, sched); + ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ + /* if there is only 1 rank, copy data from sendbuf + * to recvbuf and exit */ + if (nranks == 1) { +@@ -358,16 +359,11 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, + + + /* Non-blocking recexch based ALLREDUCE */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallreduce_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallreduce_intra_recexch(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request ** req, int recexch_type, int k) + { + int mpi_errno = MPI_SUCCESS; +- int tag; + MPIR_TSP_sched_t *sched; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLREDUCE_INTRA_RECEXCH); +@@ -380,14 +376,8 @@ int MPIR_TSP_Iallreduce_intra_recexch(const void *sendbuf, void *recvbuf, int co + MPIR_Assert(sched != NULL); + MPIR_TSP_sched_create(sched); + +- /* For correctness, transport based collectives need to get the +- * tag from the same pool as schedule based collectives */ +- mpi_errno = MPIR_Sched_next_tag(comm, &tag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- + mpi_errno = +- MPIR_TSP_Iallreduce_sched_intra_recexch(sendbuf, recvbuf, count, datatype, op, tag, comm, ++ MPIR_TSP_Iallreduce_sched_intra_recexch(sendbuf, recvbuf, count, datatype, op, comm, + recexch_type, k, sched); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +--- a/src/mpi/coll/iallreduce/iallreduce_tsp_recexch_algos_prototypes.h ++++ b/src/mpi/coll/iallreduce/iallreduce_tsp_recexch_algos_prototypes.h +@@ -21,7 +21,7 @@ + #define MPIR_TSP_Iallreduce_sched_intra_recexch MPIR_TSP_NAMESPACE(Iallreduce_sched_intra_recexch) + + int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int tag, ++ MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm, int recexch_type, int k, + MPIR_TSP_sched_t * sched); + +--- a/src/mpi/coll/iallreduce/iallreduce_tsp_tree_algos.h ++++ b/src/mpi/coll/iallreduce/iallreduce_tsp_tree_algos.h +@@ -18,10 +18,6 @@ + #include "tsp_namespace_def.h" + + /* Routine to schedule a pipelined tree based allreduce */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallreduce_sched_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm, int tree_type, int k, int maxbytes, +@@ -36,13 +32,12 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + int is_commutative; + int size; + int rank; +- int num_children; +- int is_tree_leaf; /* Variables to store location of this rank in the tree */ +- MPII_Treealgo_tree_t my_tree; ++ int num_children = 0; ++ MPIR_Treealgo_tree_t my_tree; + void **child_buffer; /* Buffer array in which data from children is received */ + void *reduce_buffer; /* Buffer in which allreduced data is present */ + int *vtcs = NULL, *recv_id = NULL, *reduce_id = NULL; /* Arrays to store graph vertex ids */ +- int sink_id, bcast_recv_id; ++ int sink_id; + int nvtcs; + int buffer_per_child = MPIR_CVAR_IALLREDUCE_TREE_BUFFER_PER_CHILD; + int tag; +@@ -66,7 +61,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + + + /* calculate chunking information for pipelining */ +- MPII_Algo_calculate_pipeline_chunk_info(maxbytes, type_size, count, &num_chunks, ++ MPIR_Algo_calculate_pipeline_chunk_info(maxbytes, type_size, count, &num_chunks, + &chunk_size_floor, &chunk_size_ceil); + /* print chunking information */ + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, +@@ -75,20 +70,17 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + chunk_size_floor, chunk_size_ceil)); + + if (!is_commutative) { +- tree_type = MPIR_TREE_TYPE_KNOMIAL_1; /* Force tree_type to be knomial because kary trees cannot +- * handle non-commutative operations correctly */ ++ tree_type = MPIR_TREE_TYPE_KNOMIAL_1; /* Force tree_type to be knomial_1 because kary and knomial_2 trees ++ * cannot handle non-commutative operations correctly */ + } + + /* initialize the tree */ + my_tree.children = NULL; +- mpi_errno = MPII_Treealgo_tree_create(rank, size, tree_type, k, root, &my_tree); ++ mpi_errno = MPIR_Treealgo_tree_create(rank, size, tree_type, k, root, &my_tree); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + num_children = my_tree.num_children; + +- /* identify my locaion in the tree */ +- is_tree_leaf = (num_children == 0) ? 1 : 0; +- + /* Allocate buffers to receive data from children. Any memory required for execution + * of the schedule, for example child_buffer, reduce_buffer below, is allocated using + * MPIR_TSP_sched_malloc function. This function stores the allocated memory address +@@ -96,7 +88,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + * programmer need not free this memory. This is unlike the MPL_malloc function that + * will be used for any memory required to generate the schedule and then freed by + * the programmer once that memory is no longer required */ +- if (!is_tree_leaf) { ++ if (num_children > 0) { + child_buffer = MPIR_TSP_sched_malloc(sizeof(void *) * num_children, sched); + child_buffer[0] = MPIR_TSP_sched_malloc(extent * count, sched); + child_buffer[0] = (void *) ((char *) child_buffer[0] - type_lb); +@@ -108,6 +100,9 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + child_buffer[i] = child_buffer[0]; + } + } ++ } else { ++ /* silence warnings */ ++ child_buffer = NULL; + } + + /* Set reduce_buffer based on location in the tree */ +@@ -203,6 +198,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + sink_id = MPIR_TSP_sched_sink(sched); + + /* Receive message from parent */ ++ int bcast_recv_id = sink_id; + if (my_tree.parent != -1) { + bcast_recv_id = + MPIR_TSP_sched_irecv(reduce_address, msgsize, datatype, +@@ -212,11 +208,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + if (num_children) { + /* Multicast data to the children */ + nvtcs = 1; +- if (my_tree.parent != -1) { +- vtcs[0] = bcast_recv_id; +- } else { +- vtcs[0] = sink_id; +- } ++ vtcs[0] = bcast_recv_id; + MPIR_TSP_sched_imcast(reduce_address, msgsize, datatype, + my_tree.children, num_children, tag, comm, sched, nvtcs, vtcs); + } +@@ -224,7 +216,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + offset += msgsize; + } + +- MPII_Treealgo_tree_free(&my_tree); ++ MPIR_Treealgo_tree_free(&my_tree); + + fn_exit: + MPL_free(vtcs); +@@ -238,10 +230,6 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int + + + /* Non-blocking tree based allreduce */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iallreduce_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iallreduce_intra_tree(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request ** req, int tree_type, int k, int maxbytes) +--- a/src/mpi/coll/ialltoall/Makefile.mk ++++ b/src/mpi/coll/ialltoall/Makefile.mk +@@ -20,4 +20,7 @@ mpi_core_sources += \ + src/mpi/coll/ialltoall/ialltoall_intra_brucks.c \ + src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c \ + src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c \ +- src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c ++ src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c \ ++ src/mpi/coll/ialltoall/ialltoall_gentran_algos.c \ ++ src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c \ ++ src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c +--- a/src/mpi/coll/ialltoall/ialltoall.c ++++ b/src/mpi/coll/ialltoall/ialltoall.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -24,10 +24,12 @@ cvars: + inplace - Force inplace algorithm + pairwise - Force pairwise algorithm + permuted_sendrecv - Force permuted sendrecv algorithm ++ gentran_ring - Force generic transport based ring algorithm ++ gentran_brucks - Force generic transport based brucks algorithm + + - name : MPIR_CVAR_IALLTOALL_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -119,10 +121,6 @@ int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, voi + + End Algorithm: MPI_Alltoall + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -162,10 +160,6 @@ int MPIR_Ialltoall_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Data + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype + sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -179,10 +173,6 @@ int MPIR_Ialltoall_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Data + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -191,29 +181,29 @@ int MPIR_Ialltoall_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype s + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ialltoall_intra_algo_choice) { +- case MPIR_IALLTOALL_INTRA_ALGO_BRUCKS: ++ switch (MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM_brucks: + mpi_errno = MPIR_Ialltoall_sched_intra_brucks(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLTOALL_INTRA_ALGO_INPLACE: ++ case MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM_inplace: + mpi_errno = MPIR_Ialltoall_sched_intra_inplace(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLTOALL_INTRA_ALGO_PAIRWISE: ++ case MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM_pairwise: + mpi_errno = MPIR_Ialltoall_sched_intra_pairwise(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLTOALL_INTRA_ALGO_PERMUTED_SENDRECV: ++ case MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM_permuted_sendrecv: + mpi_errno = + MPIR_Ialltoall_sched_intra_permuted_sendrecv(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLTOALL_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ialltoall_sched_intra_auto(sendbuf, sendcount, sendtype, +@@ -223,14 +213,14 @@ int MPIR_Ialltoall_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype s + } + } else { + /* intercommunicator */ +- switch (MPIR_Ialltoall_inter_algo_choice) { +- case MPIR_IALLTOALL_INTER_ALGO_PAIRWISE_EXCHANGE: ++ switch (MPIR_CVAR_IALLTOALL_INTER_ALGORITHM) { ++ case MPIR_CVAR_IALLTOALL_INTER_ALGORITHM_pairwise_exchange: + mpi_errno = + MPIR_Ialltoall_sched_inter_pairwise_exchange(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_IALLTOALL_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IALLTOALL_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ialltoall_sched_inter_auto(sendbuf, sendcount, sendtype, +@@ -243,10 +233,6 @@ int MPIR_Ialltoall_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -263,10 +249,6 @@ int MPIR_Ialltoall_sched(const void *sendbuf, int sendcount, MPI_Datatype sendty + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -274,6 +256,38 @@ int MPIR_Ialltoall_impl(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + int tag = -1; + MPIR_Sched_t s = MPIR_SCHED_NULL; ++ /* If the user picks one of the transport-enabled algorithms, branch there ++ * before going down to the MPIR_Sched-based algorithms. */ ++ /* TODO - Eventually the intention is to replace all of the ++ * MPIR_Sched-based algorithms with transport-enabled algorithms, but that ++ * will require sufficient performance testing and replacement algorithms. */ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ /* intracommunicator */ ++ switch (MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM_gentran_ring: ++ mpi_errno = ++ MPIR_Ialltoall_intra_gentran_ring(sendbuf, sendcount, sendtype, recvbuf, ++ recvcount, recvtype, comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ case MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM_gentran_brucks: ++ mpi_errno = ++ MPIR_Ialltoall_intra_gentran_brucks(sendbuf, sendcount, sendtype, recvbuf, ++ recvcount, recvtype, comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } ++ ++ /* If the user doesn't pick a transport-enabled algorithm, go to the old ++ * sched function. */ + + *request = NULL; + +@@ -300,10 +314,6 @@ int MPIR_Ialltoall_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -323,10 +333,6 @@ int MPIR_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ialltoall - Sends data from all to all processes in a nonblocking way + +@@ -451,13 +457,13 @@ int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ialltoall", "**mpi_ialltoall %p %d %D %p %d %D %C %p", + sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, + request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_gentran_algos.c +@@ -0,0 +1,25 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++#include "tsp_gentran.h" ++ ++/* instantiate ialltoall ring algorithms for the gentran transport */ ++#include "ialltoall_tsp_ring_algos_prototypes.h" ++#include "ialltoall_tsp_ring_algos.h" ++#include "ialltoall_tsp_ring_algos_undef.h" ++/* instantiate ialltoall brucks algorithms for the gentran transport */ ++#include "ialltoall_tsp_brucks_algos_prototypes.h" ++#include "ialltoall_tsp_brucks_algos.h" ++#include "ialltoall_tsp_brucks_algos_undef.h" ++ ++#include "tsp_undef.h" +--- a/src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c ++++ b/src/mpi/coll/ialltoall/ialltoall_inter_pairwise_exchange.c +@@ -17,10 +17,6 @@ + * max_size if dst < remote_size. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched_inter_pairwise_exchange +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched_inter_pairwise_exchange(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -42,10 +38,6 @@ int MPIR_Ialltoall_sched_inter_pairwise_exchange(const void *sendbuf, int sendco + + /* Do the pairwise exchanges */ + max_size = MPL_MAX(local_size, remote_size); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- max_size * recvcount * recvtype_extent); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- max_size * sendcount * sendtype_extent); + for (i = 0; i < max_size; i++) { + src = (rank - i + max_size) % max_size; + dst = (rank + i) % max_size; +--- a/src/mpi/coll/ialltoall/ialltoall_intra_brucks.c ++++ b/src/mpi/coll/ialltoall/ialltoall_intra_brucks.c +@@ -19,20 +19,16 @@ + * where n is the total amount of data a process needs to send to all + * other processes. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched_intra_brucks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + int i; +- int nbytes, recvtype_size, recvbuf_extent, newtype_size; ++ int nbytes, recvtype_sz, newtype_size; + int rank, comm_size; + void *tmp_buf = NULL; +- MPI_Aint sendtype_extent, recvtype_extent, recvtype_true_lb, recvtype_true_extent; ++ MPI_Aint sendtype_extent, recvtype_extent; + int pof2, dst, src; + int count, block; + MPI_Datatype newtype; +@@ -48,12 +44,12 @@ int MPIR_Ialltoall_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Da + rank = comm_ptr->rank; + + MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); +- MPIR_Datatype_get_size_macro(recvtype, recvtype_size); ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + + /* allocate temporary buffer */ + /* must be same size as entire recvbuf for Phase 3 */ +- nbytes = recvtype_size * recvcount * comm_size; ++ nbytes = recvtype_sz * recvcount * comm_size; + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, nbytes, mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + + /* Do Phase 1 of the algorithim. Shift the data blocks on process i +@@ -132,25 +128,20 @@ int MPIR_Ialltoall_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Da + /* Phase 3: Rotate blocks in recvbuf upwards by (rank + 1) blocks. Need + * a temporary buffer of the same size as recvbuf. */ + +- /* get true extent of recvtype */ +- MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent); +- +- recvbuf_extent = recvcount * comm_size * (MPL_MAX(recvtype_true_extent, recvtype_extent)); + /* not a leak, old tmp_buf value is still tracked by CHKPMEM macros */ +- MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, recvbuf_extent, mpi_errno, "tmp_buf", +- MPL_MEM_BUFFER); +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - recvtype_true_lb); ++ MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, recvcount * comm_size * recvtype_sz, ++ mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + + mpi_errno = MPIR_Sched_copy(((char *) recvbuf + (rank + 1) * recvcount * recvtype_extent), + (comm_size - rank - 1) * recvcount, recvtype, +- tmp_buf, (comm_size - rank - 1) * recvcount, recvtype, s); ++ tmp_buf, (comm_size - rank - 1) * recvcount * recvtype_sz, ++ MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + mpi_errno = MPIR_Sched_copy(recvbuf, (rank + 1) * recvcount, recvtype, + ((char *) tmp_buf + +- (comm_size - rank - 1) * recvcount * recvtype_extent), +- (rank + 1) * recvcount, recvtype, s); ++ (comm_size - rank - 1) * recvcount * recvtype_sz), ++ (rank + 1) * recvcount * recvtype_sz, MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -159,8 +150,8 @@ int MPIR_Ialltoall_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Da + * Reorder them to (0 to comm_size-1) and store them in recvbuf. */ + + for (i = 0; i < comm_size; i++) { +- mpi_errno = MPIR_Sched_copy(((char *) tmp_buf + i * recvcount * recvtype_extent), +- recvcount, recvtype, ++ mpi_errno = MPIR_Sched_copy(((char *) tmp_buf + i * recvcount * recvtype_sz), ++ recvcount * recvtype_sz, MPI_BYTE, + ((char *) recvbuf + + (comm_size - i - 1) * recvcount * recvtype_extent), recvcount, + recvtype, s); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_intra_gentran_brucks.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ialltoall_tsp_brucks_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ialltoall_intra_gentran_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ialltoall_intra_brucks(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request, ++ MPIR_CVAR_IALLTOALL_BRUCKS_KVAL, ++ MPIR_CVAR_IALLTOALL_BRUCKS_BUFFER_PER_NBR); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_intra_gentran_ring.c +@@ -0,0 +1,29 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ialltoall_tsp_ring_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ialltoall_intra_gentran_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ialltoall_intra_ring(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, comm, req); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ialltoall/ialltoall_intra_inplace.c ++++ b/src/mpi/coll/ialltoall/ialltoall_intra_inplace.c +@@ -18,10 +18,6 @@ + * Note that this is not an especially efficient algorithm in terms of time. + * Something like MADRE is probably the best solution for the MPI_IN_PLACE + * scenario. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched_intra_inplace +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched_intra_inplace(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +--- a/src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c ++++ b/src/mpi/coll/ialltoall/ialltoall_intra_pairwise.c +@@ -23,10 +23,6 @@ + * where n is the total amount of data a process needs to send to all + * other processes. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched_intra_pairwise +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched_intra_pairwise(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +--- a/src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c ++++ b/src/mpi/coll/ialltoall/ialltoall_intra_permuted_sendrecv.c +@@ -14,10 +14,6 @@ + * + * We use this as our medium-sized-message algorithm. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoall_sched_intra_permuted_sendrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoall_sched_intra_permuted_sendrecv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_tsp_brucks_algos.h +@@ -0,0 +1,422 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALL_TSP_BRUCKS_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++cvars: ++ - name : MPIR_CVAR_IALLTOALL_BRUCKS_KVAL ++ category : COLLECTIVE ++ type : int ++ default : 2 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ radix (k) value for generic transport brucks based ialltoall ++ ++ - name : MPIR_CVAR_IALLTOALL_BRUCKS_BUFFER_PER_NBR ++ category : COLLECTIVE ++ type : boolean ++ default : 0 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ If set to true, the gentran based brucks algorithm will allocate ++ dedicated send and receive buffers for every neighbor in the brucks ++ algorithm. Otherwise, it would reuse a single buffer for sending ++ and receiving data to/from neighbors ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++#include "tsp_namespace_def.h" ++ ++/* Brucks Pack, UnPack (PUP) utility function ++* This functions packs (unpacks) non-contiguous (contiguous) ++* data from (to) rbuf to (from) pupbuf. It goes to every offset ++* that has the value "digitval" at the "phase"th digit in the ++* base k representation of the offset. The argument phase corresponds ++* to the phase in the brucks algorithm. */ ++static int ++brucks_sched_pup(int pack, void *rbuf, void *pupbuf, MPI_Datatype rtype, int count, ++ int phase, int k, int digitval, int comm_size, int *pupsize, ++ MPIR_TSP_sched_t * sched, int ninvtcs, int *invtcs) ++{ ++ MPI_Aint type_extent, type_lb, type_true_extent; ++ int pow_k_phase, offset, nconsecutive_occurrences, delta; ++ int *dtcopy_id; ++ int counter; ++ int sink_id; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_BRUCKS_SCHED_PUP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_BRUCKS_SCHED_PUP); ++ ++ MPIR_Datatype_get_extent_macro(rtype, type_extent); ++ MPIR_Type_get_true_extent_impl(rtype, &type_lb, &type_true_extent); ++ type_extent = MPL_MAX(type_extent, type_true_extent); ++ ++ pow_k_phase = MPL_ipow(k, phase); ++ /* first offset where the phase'th bit has value digitval */ ++ offset = pow_k_phase * digitval; ++ /* number of consecutive occurences of digitval */ ++ nconsecutive_occurrences = pow_k_phase; ++ /* distance between non-consecutive occurences of digitval */ ++ delta = (k - 1) * pow_k_phase; ++ ++ dtcopy_id = MPL_malloc(sizeof(int) * comm_size, MPL_MEM_COLL); /* NOTE: We do not need this much large array - make it more accurate */ ++ MPIR_Assert(dtcopy_id != NULL); ++ counter = 0; ++ *pupsize = 0; /* points to the first empty location in pupbuf */ ++ while (offset < comm_size) { ++ if (pack) { ++ dtcopy_id[counter++] = ++ MPIR_TSP_sched_localcopy((char *) rbuf + offset * count * type_extent, count, rtype, ++ (char *) pupbuf + *pupsize, count, rtype, sched, ninvtcs, ++ invtcs); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "packing rbuf+%ld to pupbuf+%d\n", ++ offset * count * type_extent, *pupsize)); ++ } else { ++ dtcopy_id[counter++] = ++ MPIR_TSP_sched_localcopy((char *) pupbuf + *pupsize, count, rtype, ++ (char *) rbuf + offset * count * type_extent, count, rtype, ++ sched, ninvtcs, invtcs); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "unpacking from pupbuf+%d to rbuf+%ld\n", *pupsize, ++ offset * count * type_extent)); ++ } ++ ++ offset += 1; ++ nconsecutive_occurrences -= 1; ++ ++ if (nconsecutive_occurrences == 0) { /* consecutive occurrences are over */ ++ offset += delta; ++ nconsecutive_occurrences = pow_k_phase; ++ } ++ ++ *pupsize += count * type_extent; /* NOTE: This may not be extent, it might be type_size - CHECK THIS */ ++ } ++ ++ sink_id = MPIR_TSP_sched_selective_sink(sched, counter, dtcopy_id); ++ MPL_free(dtcopy_id); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_COLL_BRUCKS_SCHED_PUP); ++ ++ return sink_id; ++} ++ ++int ++MPIR_TSP_Ialltoall_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_TSP_sched_t * sched, int k, ++ int buffer_per_phase) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i, j; ++ int pack_ninvtcs, recv_ninvtcs, unpack_ninvtcs; ++ int *pack_invtcs, *recv_invtcs, *unpack_invtcs; ++ int *invtcs, n_invtcs; ++ int rank, size; ++ int nphases = 0, max; ++ int p_of_k; /* largest power of k that is (strictly) smaller than 'size' */ ++ int is_inplace; ++ MPI_Aint s_extent, s_lb, r_extent, r_lb; ++ MPI_Aint s_true_extent, r_true_extent; ++ int delta, src, dst; ++ void ***tmp_sbuf = NULL, ***tmp_rbuf = NULL; ++ int *packids, *sendids = NULL, *recvids = NULL, *unpackids = NULL; ++ int packsize, num_unpacks_in_last_phase; ++ void *tmp_buf = NULL; ++ const void *senddata; ++ int tag; ++ ++ MPIR_CHKLMEM_DECL(6); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLTOALL_SCHED_INTRA_BRUCKS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLTOALL_SCHED_INTRA_BRUCKS); ++ ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_CHKLMEM_MALLOC(pack_invtcs, int *, sizeof(int) * k, mpi_errno, "pack_invtcs", ++ MPL_MEM_COLL); ++ MPIR_CHKLMEM_MALLOC(recv_invtcs, int *, sizeof(int) * k, mpi_errno, "recv_invtcs", ++ MPL_MEM_COLL); ++ MPIR_CHKLMEM_MALLOC(unpack_invtcs, int *, sizeof(int) * k, mpi_errno, "unpack_invtcs", ++ MPL_MEM_COLL); ++ MPIR_CHKLMEM_MALLOC(invtcs, int *, sizeof(int) * 6 * k, mpi_errno, "invtcs", MPL_MEM_COLL); ++ ++ is_inplace = (sendbuf == MPI_IN_PLACE); ++ ++ rank = MPIR_Comm_rank(comm); ++ size = MPIR_Comm_size(comm); ++ ++ max = size - 1; ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "Ialltoall_brucks: num_ranks: %d, k: %d \n", size, k)); ++ /* calculate the number of bits required to represent a rank in base k */ ++ while (max) { ++ nphases++; ++ max /= k; ++ } ++ ++ /* calculate largest power of k that is smaller than 'size'. ++ * This is used for allocating temporary space for sending ++ * and receving data. */ ++ p_of_k = 1; ++ for (i = 0; i < nphases - 1; i++) { ++ p_of_k *= k; ++ } ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "Num phases: %d\n", nphases)); ++ ++ if (is_inplace) { ++ sendcount = recvcount; ++ sendtype = recvtype; ++ } ++ ++ MPIR_Datatype_get_extent_macro(sendtype, s_extent); ++ MPIR_Type_get_true_extent_impl(sendtype, &s_lb, &s_true_extent); ++ s_extent = MPL_MAX(s_extent, s_true_extent); ++ ++ MPIR_Datatype_get_extent_macro(recvtype, r_extent); ++ MPIR_Type_get_true_extent_impl(recvtype, &r_lb, &r_true_extent); ++ r_extent = MPL_MAX(r_extent, r_true_extent); ++ ++#ifdef MPL_USE_DBG_LOGGING ++ { ++ size_t s_type_size; ++ MPIR_Datatype_get_size_macro(sendtype, s_type_size); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "send_type_size: %ld, send_type_extent: %ld, send_count: %d\n", ++ s_type_size, s_extent, sendcount)); ++ } ++#endif ++ tmp_buf = (void *) MPIR_TSP_sched_malloc(recvcount * size * r_extent, sched); /* temporary buffer used for rotation ++ * also used as sendbuf when inplace is true */ ++ MPIR_Assert(tmp_buf != NULL); ++ ++ if (is_inplace) { ++ invtcs[0] = MPIR_TSP_sched_localcopy(recvbuf, size * recvcount, recvtype, ++ tmp_buf, size * recvcount, recvtype, sched, 0, NULL); ++ n_invtcs = 1; ++ senddata = tmp_buf; ++ } else { ++ senddata = sendbuf; ++ n_invtcs = 0; ++ } ++ ++ /* Step 1: rotate the data locally */ ++ MPIR_TSP_sched_localcopy((void *) ((char *) senddata + rank * sendcount * s_extent), ++ (size - rank) * sendcount, sendtype, ++ recvbuf, (size - rank) * recvcount, recvtype, sched, n_invtcs, invtcs); ++ MPIR_TSP_sched_localcopy(senddata, rank * sendcount, sendtype, ++ (void *) ((char *) recvbuf + (size - rank) * recvcount * r_extent), ++ rank * recvcount, recvtype, sched, n_invtcs, invtcs); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "Step 1 data rotation scheduled\n")); ++ ++ MPIR_TSP_sched_fence(sched); ++ ++ /* Step 2: Allocate buffer space for packing/receving data for every phase */ ++ delta = 1; ++ MPIR_CHKLMEM_MALLOC(tmp_sbuf, void ***, sizeof(void **) * nphases, mpi_errno, "tmp_sbuf", ++ MPL_MEM_COLL); ++ MPIR_CHKLMEM_MALLOC(tmp_rbuf, void ***, sizeof(void **) * nphases, mpi_errno, "tmp_rbuf", ++ MPL_MEM_COLL); ++ ++ for (i = 0; i < nphases; i++) { ++ tmp_sbuf[i] = (void **) MPL_malloc(sizeof(void *) * (k - 1), MPL_MEM_COLL); ++ MPIR_Assert(tmp_sbuf[i] != NULL); ++ tmp_rbuf[i] = (void **) MPL_malloc(sizeof(void *) * (k - 1), MPL_MEM_COLL); ++ MPIR_Assert(tmp_rbuf[i] != NULL); ++ for (j = 0; j < k - 1; j++) { ++ if (i == 0 || buffer_per_phase == 1) { /* allocate new memory if buffer_per_phase is set to true */ ++ tmp_sbuf[i][j] = ++ (void *) MPIR_TSP_sched_malloc((int) r_extent * recvcount * p_of_k, sched); ++ MPIR_Assert(tmp_sbuf[i][j] != NULL); ++ tmp_rbuf[i][j] = ++ (void *) MPIR_TSP_sched_malloc((int) r_extent * recvcount * p_of_k, sched); ++ MPIR_Assert(tmp_rbuf[i][j] != NULL); ++ } else { /* reuse memory from first phase, make sure task dependencies are set correctly */ ++ tmp_sbuf[i][j] = tmp_sbuf[0][j]; ++ tmp_rbuf[i][j] = tmp_rbuf[0][j]; ++ } ++ } ++ } ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "Allocated temporary buffer space for packing\n")); ++ ++ /* use invtcs in the following manner ++ * 0..k-2 for pack ids ++ * k-1..2k-3 for send ids ++ * 2k-2..3k-4 for recv ids ++ * 3k-3..4k-5 for unpack ids ++ */ ++ packids = invtcs; ++ sendids = invtcs + k - 1; ++ recvids = invtcs + 2 * k - 2; ++ unpackids = invtcs + 3 * k - 3; ++ pack_ninvtcs = recv_ninvtcs = 0; ++ ++ packsize = 0; ++ num_unpacks_in_last_phase = 0; /* record number of unpacking tasks in last phase for building dependency graph */ ++ ++ for (i = 0; i < nphases; i++) { ++ num_unpacks_in_last_phase = 0; ++ for (j = 1; j < k; j++) { /* for every non-zero value of digitval */ ++ if (MPL_ipow(k, i) * j >= size) /* if the first location exceeds comm size, nothing is to be sent */ ++ break; ++ ++ src = (rank - delta * j + size) % size; ++ dst = (rank + delta * j) % size; ++ ++ if (i != 0 && buffer_per_phase == 0) { /* this dependency holds only when we don't have dedicated send buffer per phase */ ++ pack_invtcs[k - 1] = sendids[j - 1]; ++ pack_ninvtcs = k; ++ } ++ packids[j - 1] = ++ brucks_sched_pup(1, recvbuf, tmp_sbuf[i][j - 1], ++ recvtype, recvcount, i, k, j, size, ++ &packsize, sched, pack_ninvtcs, pack_invtcs); ++ *unpack_invtcs = packids[j - 1]; ++ unpack_ninvtcs = 1; ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "phase %d, digit %d packing scheduled\n", i, j)); ++ ++ sendids[j - 1] = ++ MPIR_TSP_sched_isend(tmp_sbuf[i][j - 1], packsize, MPI_BYTE, dst, tag, ++ comm, sched, 1, &packids[j - 1]); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "phase %d, digit %d send scheduled\n", i, j)); ++ ++ if (i != 0 && buffer_per_phase == 0) { /* this dependency holds only when we don't have dedicated recv buffer per phase */ ++ *recv_invtcs = unpackids[j - 1]; ++ recv_ninvtcs = 1; ++ } ++ recvids[j - 1] = ++ MPIR_TSP_sched_irecv(tmp_rbuf[i][j - 1], packsize, MPI_BYTE, ++ src, tag, comm, sched, recv_ninvtcs, recv_invtcs); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "phase %d, digit %d recv scheduled\n", i, j)); ++ ++ *(unpack_invtcs + 1) = recvids[j - 1]; ++ unpack_ninvtcs = 2; ++ unpackids[j - 1] = ++ brucks_sched_pup(0, recvbuf, tmp_rbuf[i][j - 1], recvtype, ++ recvcount, i, k, j, size, ++ &packsize, sched, unpack_ninvtcs, unpack_invtcs); ++ num_unpacks_in_last_phase++; ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "phase %d, digit %d unpacking scheduled\n", i, j)); ++ } ++ MPIR_Localcopy(unpackids, sizeof(int) * (k - 1), MPI_BYTE, ++ pack_invtcs, sizeof(int) * (k - 1), MPI_BYTE); ++ pack_ninvtcs = k - 1; ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "phase %d scheduled\n", i)); ++ ++ delta *= k; ++ } ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "Step 2 scheduled\n")); ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "Step 2: num_unpacks_in_last_phase: %d\n", ++ num_unpacks_in_last_phase)); ++ ++ /* Step 3: rotate the buffer */ ++ /* TODO: MPICH implementation does some lower_bound adjustment ++ * here for derived datatypes, I am skipping that for now, ++ * will come back to it later on - will require adding API ++ * for getting true_lb */ ++ invtcs[0] = ++ MPIR_TSP_sched_localcopy((void *) ((char *) recvbuf + (rank + 1) * recvcount * r_extent), ++ (size - rank - 1) * recvcount, recvtype, tmp_buf, ++ (size - rank - 1) * recvcount, recvtype, sched, ++ num_unpacks_in_last_phase, unpackids); ++ invtcs[1] = ++ MPIR_TSP_sched_localcopy(recvbuf, (rank + 1) * recvcount, recvtype, ++ (void *) ((char *) tmp_buf + ++ (size - rank - 1) * recvcount * r_extent), ++ (rank + 1) * recvcount, recvtype, sched, num_unpacks_in_last_phase, ++ unpackids); ++ ++ /* invert the buffer now to get the result in desired order */ ++ for (i = 0; i < size; i++) ++ MPIR_TSP_sched_localcopy((char *) tmp_buf + i * recvcount * r_extent, recvcount, recvtype, ++ (void *) ((char *) recvbuf + ++ (size - i - 1) * recvcount * r_extent), recvcount, ++ recvtype, sched, 2, invtcs); ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "Step 3: data rearrangement scheduled\n")); ++ ++ fn_exit: ++ for (i = 0; i < nphases; i++) { ++ MPL_free(tmp_sbuf[i]); ++ MPL_free(tmp_rbuf[i]); ++ } ++ MPIR_CHKLMEM_FREEALL(); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IALLTOALL_SCHED_INTRA_BRUCKS); ++ ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Non-blocking brucks based Alltoall */ ++int MPIR_TSP_Ialltoall_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req, int k, ++ int buffer_per_phase) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLTOALL_INTRA_BRUCKS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLTOALL_INTRA_BRUCKS); ++ ++ /* generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_Assert(sched != NULL); ++ MPIR_TSP_sched_create(sched); ++ ++ /* schedule pipelined tree algo */ ++ mpi_errno = MPIR_TSP_Ialltoall_sched_intra_brucks(sendbuf, sendcount, sendtype, recvbuf, ++ recvcount, recvtype, comm_ptr, sched, ++ k, buffer_per_phase); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm_ptr, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IALLTOALL_INTRA_BRUCKS); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_tsp_brucks_algos_prototypes.h +@@ -0,0 +1,30 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALL_TSP_BRUCKS_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Ialltoall_intra_brucks ++#define MPIR_TSP_Ialltoall_intra_brucks MPIR_TSP_NAMESPACE(Ialltoall_intra_brucks) ++#undef MPIR_TSP_Ialltoall_sched_intra_brucks ++#define MPIR_TSP_Ialltoall_sched_intra_brucks MPIR_TSP_NAMESPACE(Ialltoall_sched_intra_brucks) ++ ++int MPIR_TSP_Ialltoall_sched_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_TSP_sched_t * s, int k, ++ int buffer_per_phase); ++int MPIR_TSP_Ialltoall_intra_brucks(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request, int k, ++ int buffer_per_phase); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_tsp_brucks_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALL_TSP_BRUCKS_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Ialltoall_intra_brucks ++#undef MPIR_TSP_Ialltoall_sched_intra_brucks +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_tsp_ring_algos.h +@@ -0,0 +1,222 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALL_TSP_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++/* The below code is an implementation of alltoall ring algorithm, ++ * the dependencies are show below (buf1 and buf2 are temporary buffers ++ * used for execution of the ring algorithm) : ++ * ++ send (buf1) recv (buf2) --> copy (buf2) ++ | | / ++ | | / ++ v V / ++copy (buf1)<--recv (buf1) send (buf2) / ++ \ | | / ++ \ | | / ++ \ V V v ++ \ send (buf1) recv (buf2) --> copy (buf2) ++ \ | | ++ \ | | ++ v v v ++ recv (buf1) send (buf2) ++*/ ++#include "tsp_namespace_def.h" ++ ++/* This ring algorithm passes entire buffer around (as if an allgather) ++ each round each process picks one portion out of it. ++ ++ It does N-1 round N messages with each message N time larger than a ++ linear method. However it may prevent congestion in a network topology ++ that is missing efficient all-to-all transport. ++ -- notes by Hui. ++*/ ++ ++/* Routine to schedule a ring based allgather */ ++int MPIR_TSP_Ialltoall_sched_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i, src, dst, copy_dst; ++ ++ /* Temporary buffers to execute the ring algorithm */ ++ void *buf1, *buf2, *data_buf, *sbuf, *rbuf; ++ int tag; ++ ++ int size = MPIR_Comm_size(comm); ++ int rank = MPIR_Comm_rank(comm); ++ int is_inplace = (sendbuf == MPI_IN_PLACE); ++ ++ MPI_Aint recvtype_lb, recvtype_extent; ++ MPI_Aint sendtype_lb, sendtype_extent; ++ MPI_Aint sendtype_true_extent, recvtype_true_extent; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLTOALL_SCHED_INTRA_RING); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLTOALL_SCHED_INTRA_RING); ++ ++ /* find out the buffer which has the send data and point data_buf to it */ ++ if (is_inplace) { ++ sendcount = recvcount; ++ sendtype = recvtype; ++ data_buf = (char *) recvbuf; ++ } else ++ data_buf = (char *) sendbuf; ++ ++ /* Get datatype info of sendtype and recvtype */ ++ MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); ++ MPIR_Type_get_true_extent_impl(sendtype, &sendtype_lb, &sendtype_true_extent); ++ sendtype_extent = MPL_MAX(sendtype_extent, sendtype_true_extent); ++ ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ MPIR_Type_get_true_extent_impl(recvtype, &recvtype_lb, &recvtype_true_extent); ++ recvtype_extent = MPL_MAX(recvtype_extent, recvtype_true_extent); ++ ++ /* allocate space for temporary buffers */ ++ buf1 = MPIR_TSP_sched_malloc(size * recvcount * recvtype_extent, sched); ++ buf2 = MPIR_TSP_sched_malloc(size * recvcount * recvtype_extent, sched); ++ ++ /* copy my data to buf1 which will be forwarded in phase 0 of the ring. ++ * TODO: We could avoid this copy but that would make the implementation more ++ * complicated */ ++ int dtcopy_id[3]; ++ dtcopy_id[0] = MPIR_TSP_sched_localcopy((char *) data_buf, size * recvcount, recvtype, ++ (char *) buf1, size * recvcount, recvtype, sched, 0, ++ NULL); ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "rank =%d, data_buf=%p, sendbuf=%p, buf1=%p, buf2=%p, recvbuf=%p", ++ rank, data_buf, sendbuf, buf1, buf2, recvbuf)); ++ ++ if (!is_inplace) { /* copy my part of my sendbuf to recv_buf */ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "copying my part from sendbuf address=%p to my recvbuf address=%p", ++ (char *) sendbuf + rank * sendcount * sendtype_extent, ++ (char *) recvbuf + rank * recvcount * recvtype_extent)); ++ ++ MPIR_TSP_sched_localcopy((char *) sendbuf + rank * sendcount * sendtype_extent, ++ sendcount, sendtype, ++ (char *) recvbuf + rank * recvcount * recvtype_extent, ++ recvcount, recvtype, sched, 0, NULL); ++ } ++ ++ /* in ring algorithm, source and destination of messages are fixed */ ++ src = (size + rank - 1) % size; ++ dst = (rank + 1) % size; ++ ++ sbuf = buf1; ++ rbuf = buf2; ++ int send_id[3] = { 0 }; /* warning fix: icc: maybe used before set */ ++ int recv_id[3] = { 0 }; /* warning fix: icc: maybe used before set */ ++ for (i = 0; i < size - 1; i++) { ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ int vtcs[3], nvtcs; ++ /* schedule send */ ++ if (i == 0) { ++ nvtcs = 1; ++ vtcs[0] = dtcopy_id[0]; ++ } else { ++ nvtcs = 2; ++ vtcs[0] = recv_id[(i - 1) % 3]; ++ vtcs[1] = send_id[(i - 1) % 3]; ++ } ++ ++ send_id[i % 3] = ++ MPIR_TSP_sched_isend((char *) sbuf, size * recvcount, recvtype, dst, tag, comm, sched, ++ nvtcs, vtcs); ++ ++ /* schedule recv */ ++ if (i == 0) ++ nvtcs = 0; ++ else if (i == 1) { ++ nvtcs = 1; ++ vtcs[0] = send_id[(i - 1) % 3]; ++ vtcs[1] = recv_id[(i - 1) % 3]; ++ } else { ++ nvtcs = 3; ++ vtcs[0] = send_id[(i - 1) % 3]; ++ vtcs[1] = dtcopy_id[(i - 2) % 3]; ++ vtcs[2] = recv_id[(i - 1) % 3]; ++ } ++ ++ recv_id[i % 3] = ++ MPIR_TSP_sched_irecv((char *) rbuf, size * recvcount, recvtype, src, tag, comm, sched, ++ nvtcs, vtcs); ++ ++ /* destination offset of the copy */ ++ copy_dst = (size + rank - i - 1) % size; ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, ++ (MPL_DBG_FDEST, "copying from location=%p to location=%p", ++ (char *) rbuf + rank * recvcount * recvtype_extent, ++ (char *) recvbuf + copy_dst * recvcount * recvtype_extent)); ++ /* schedule data copy */ ++ dtcopy_id[i % 3] = ++ MPIR_TSP_sched_localcopy((char *) rbuf + rank * recvcount * recvtype_extent, recvcount, ++ recvtype, ++ (char *) recvbuf + copy_dst * recvcount * recvtype_extent, ++ recvcount, recvtype, sched, 1, &recv_id[i % 3]); ++ ++ /* swap sbuf and rbuf - using data_buf as intermeidate buffer */ ++ data_buf = sbuf; ++ sbuf = rbuf; ++ rbuf = data_buf; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLTOALL_SCHED_INTRA_RING); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Non-blocking ring based Alltoall */ ++int MPIR_TSP_Ialltoall_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLTOALL_INTRA_RING); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLTOALL_INTRA_RING); ++ ++ /* Generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_ERR_CHKANDJUMP(!sched, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ MPIR_TSP_sched_create(sched); ++ ++ mpi_errno = ++ MPIR_TSP_Ialltoall_sched_intra_ring(sendbuf, sendcount, sendtype, recvbuf, ++ recvcount, recvtype, comm, sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IALLTOALL_INTRA_RING); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_tsp_ring_algos_prototypes.h +@@ -0,0 +1,29 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALL_TSP_RING_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Ialltoall_intra_ring ++#define MPIR_TSP_Ialltoall_intra_ring MPIR_TSP_NAMESPACE(Ialltoall_intra_ring) ++#undef MPIR_TSP_Ialltoall_sched_intra_ring ++#define MPIR_TSP_Ialltoall_sched_intra_ring MPIR_TSP_NAMESPACE(Ialltoall_sched_intra_ring) ++ ++int MPIR_TSP_Ialltoall_sched_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_TSP_sched_t * sched); ++ ++int MPIR_TSP_Ialltoall_intra_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoall/ialltoall_tsp_ring_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALL_TSP_RING_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Ialltoall_intra_ring ++#undef MPIR_TSP_Ialltoall_sched_intra_ring +--- a/src/mpi/coll/ialltoallv/Makefile.mk ++++ b/src/mpi/coll/ialltoallv/Makefile.mk +@@ -18,4 +18,6 @@ mpi_sources += \ + mpi_core_sources += \ + src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c \ + src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c \ +- src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c ++ src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c \ ++ src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c \ ++ src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c +--- a/src/mpi/coll/ialltoallv/ialltoallv.c ++++ b/src/mpi/coll/ialltoallv/ialltoallv.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -23,17 +23,19 @@ cvars: + blocked - Force blocked algorithm + inplace - Force inplace algorithm + pairwise_exchange - Force pairwise exchange algorithm ++ gentran_scattered - Force generic transport based scattered algorithm + + - name : MPIR_CVAR_IALLTOALLV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ialltoallv algorithm +- auto - Internal algorithm selection ++ auto - Internal algorithm selection ++ pairwise_exchange - Force pairwise exchange algorithm + + - name : MPIR_CVAR_IALLTOALLV_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -49,6 +51,27 @@ cvars: + If set to false, the device-level ialltoallv function will not be + called. + ++ - name : MPIR_CVAR_IALLTOALLV_SCATTERED_OUTSTANDING_TASKS ++ category : COLLECTIVE ++ type : int ++ default : 64 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Maximum number of outstanding sends and recvs posted at a time ++ ++ - name : MPIR_CVAR_IALLTOALLV_SCATTERED_BATCH_SIZE ++ category : COLLECTIVE ++ type : int ++ default : 4 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Number of send/receive tasks that scattered algorithm waits for ++ completion before posting another batch of send/receives of that size ++ + === END_MPI_T_CVAR_INFO_BLOCK === + */ + +@@ -75,10 +98,6 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv_sched_intra_auto(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], +@@ -101,10 +120,6 @@ int MPIR_Ialltoallv_sched_intra_auto(const void *sendbuf, const int sendcounts[] + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv_sched_inter_auto(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], +@@ -119,10 +134,6 @@ int MPIR_Ialltoallv_sched_inter_auto(const void *sendbuf, const int sendcounts[] + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv_sched_impl(const void *sendbuf, const int sendcounts[], const int sdispls[], + MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -132,18 +143,18 @@ int MPIR_Ialltoallv_sched_impl(const void *sendbuf, const int sendcounts[], cons + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ialltoallv_intra_algo_choice) { +- case MPIR_IALLTOALLV_INTRA_ALGO_BLOCKED: ++ switch (MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM_blocked: + mpi_errno = MPIR_Ialltoallv_sched_intra_blocked(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, s); + break; +- case MPIR_IALLTOALLV_INTRA_ALGO_INPLACE: ++ case MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM_inplace: + mpi_errno = MPIR_Ialltoallv_sched_intra_inplace(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, s); + break; +- case MPIR_IALLTOALLV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ialltoallv_sched_intra_auto(sendbuf, sendcounts, sdispls, +@@ -153,14 +164,14 @@ int MPIR_Ialltoallv_sched_impl(const void *sendbuf, const int sendcounts[], cons + } + } else { + /* intercommunicator */ +- switch (MPIR_Ialltoallv_inter_algo_choice) { +- case MPIR_IALLTOALLV_INTER_ALGO_PAIRWISE_EXCHANGE: ++ switch (MPIR_CVAR_IALLTOALLV_INTER_ALGORITHM) { ++ case MPIR_CVAR_IALLTOALLV_INTER_ALGORITHM_pairwise_exchange: + mpi_errno = + MPIR_Ialltoallv_sched_inter_pairwise_exchange(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, s); + break; +- case MPIR_IALLTOALLV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IALLTOALLV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ialltoallv_sched_inter_auto(sendbuf, sendcounts, sdispls, +@@ -173,10 +184,6 @@ int MPIR_Ialltoallv_sched_impl(const void *sendbuf, const int sendcounts[], cons + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv_sched(const void *sendbuf, const int sendcounts[], const int sdispls[], + MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -195,10 +202,6 @@ int MPIR_Ialltoallv_sched(const void *sendbuf, const int sendcounts[], const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv_impl(const void *sendbuf, const int sendcounts[], const int sdispls[], + MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -207,6 +210,34 @@ int MPIR_Ialltoallv_impl(const void *sendbuf, const int sendcounts[], const int + int mpi_errno = MPI_SUCCESS; + int tag = -1; + MPIR_Sched_t s = MPIR_SCHED_NULL; ++ /* If the user picks one of the transport-enabled algorithms, branch there ++ * before going down to the MPIR_Sched-based algorithms. */ ++ /* TODO - Eventually the intention is to replace all of the ++ * MPIR_Sched-based algorithms with transport-enabled algorithms, but that ++ * will require sufficient performance testing and replacement algorithms. */ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ /* intracommunicator */ ++ switch (MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM_gentran_scattered: ++ if (sendbuf != MPI_IN_PLACE) { ++ mpi_errno = ++ MPIR_Ialltoallv_intra_gentran_scattered(sendbuf, sendcounts, sdispls, ++ sendtype, recvbuf, recvcounts, ++ rdispls, recvtype, comm_ptr, ++ request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ } ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } ++ ++ /* If the user doesn't pick a transport-enabled algorithm, go to the old ++ * sched function. */ + + *request = NULL; + +@@ -233,10 +264,6 @@ int MPIR_Ialltoallv_impl(const void *sendbuf, const int sendcounts[], const int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], + MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], + const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -257,10 +284,6 @@ int MPIR_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdisp + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ialltoallv - Sends data from all to all processes in a nonblocking way; + each process may send a different amount of data and provide displacements +@@ -390,14 +413,14 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ialltoallv", + "**mpi_ialltoallv %p %p %p %D %p %p %p %D %C %p", sendbuf, + sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, + recvtype, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoallv/ialltoallv_gentran_algos.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++#include "tsp_gentran.h" ++ ++/* instantiate ialltoall scattered algorithms for the gentran transport */ ++#include "ialltoallv_tsp_scattered_algos_prototypes.h" ++#include "ialltoallv_tsp_scattered_algos.h" ++#include "ialltoallv_tsp_scattered_algos_undef.h" ++ ++#include "tsp_undef.h" +--- a/src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c ++++ b/src/mpi/coll/ialltoallv/ialltoallv_inter_pairwise_exchange.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv_sched_inter_pairwise_exchange +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv_sched_inter_pairwise_exchange(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -53,8 +49,6 @@ int MPIR_Ialltoallv_sched_inter_pairwise_exchange(const void *sendbuf, const int + recvaddr = NULL; + recvcount = 0; + } else { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- rdispls[src] * recv_extent); + recvaddr = (char *) recvbuf + rdispls[src] * recv_extent; + recvcount = recvcounts[src]; + } +@@ -63,8 +57,6 @@ int MPIR_Ialltoallv_sched_inter_pairwise_exchange(const void *sendbuf, const int + sendaddr = NULL; + sendcount = 0; + } else { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- sdispls[dst] * send_extent); + sendaddr = (char *) sendbuf + sdispls[dst] * send_extent; + sendcount = sendcounts[dst]; + } +--- a/src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c ++++ b/src/mpi/coll/ialltoallv/ialltoallv_intra_blocked.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv_sched_intra_blocked +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv_sched_intra_blocked(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], +@@ -49,8 +45,6 @@ int MPIR_Ialltoallv_sched_intra_blocked(const void *sendbuf, const int sendcount + for (i = 0; i < ss; i++) { + dst = (rank + i + ii) % comm_size; + if (recvcounts[dst] && recvtype_size) { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- rdispls[dst] * recv_extent); + mpi_errno = MPIR_Sched_recv((char *) recvbuf + rdispls[dst] * recv_extent, + recvcounts[dst], recvtype, dst, comm_ptr, s); + if (mpi_errno) +@@ -61,8 +55,6 @@ int MPIR_Ialltoallv_sched_intra_blocked(const void *sendbuf, const int sendcount + for (i = 0; i < ss; i++) { + dst = (rank - i - ii + comm_size) % comm_size; + if (sendcounts[dst] && sendtype_size) { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- sdispls[dst] * send_extent); + mpi_errno = MPIR_Sched_send((char *) sendbuf + sdispls[dst] * send_extent, + sendcounts[dst], sendtype, dst, comm_ptr, s); + if (mpi_errno) +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoallv/ialltoallv_intra_gentran_scattered.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ialltoallv_tsp_scattered_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ialltoallv_intra_gentran_scattered(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ialltoallv_intra_scattered(sendbuf, sendcounts, sdispls, sendtype, ++ recvbuf, recvcounts, rdispls, recvtype, ++ comm, req); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c ++++ b/src/mpi/coll/ialltoallv/ialltoallv_intra_inplace.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallv_sched_intra_inplace +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallv_sched_intra_inplace(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], +@@ -20,7 +16,7 @@ int MPIR_Ialltoallv_sched_intra_inplace(const void *sendbuf, const int sendcount + int mpi_errno = MPI_SUCCESS; + int comm_size; + int i, j; +- MPI_Aint recv_extent; ++ MPI_Aint recvtype_extent, recvtype_sz; + int dst, rank; + MPIR_SCHED_CHKPMEM_DECL(1); + +@@ -28,7 +24,8 @@ int MPIR_Ialltoallv_sched_intra_inplace(const void *sendbuf, const int sendcount + rank = comm_ptr->rank; + + /* Get extent and size of recvtype, don't look at sendtype for MPI_IN_PLACE */ +- MPIR_Datatype_get_extent_macro(recvtype, recv_extent); ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + + /* The regular MPI_Alltoallv handles MPI_IN_PLACE using pairwise + * sendrecv_replace calls. We don't have a sendrecv_replace, so just +@@ -47,7 +44,7 @@ int MPIR_Ialltoallv_sched_intra_inplace(const void *sendbuf, const int sendcount + max_count = MPL_MAX(max_count, recvcounts[i]); + } + +- MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, max_count * recv_extent, mpi_errno, ++ MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, max_count * recvtype_sz, mpi_errno, + "Ialltoallv tmp_buf", MPL_MEM_BUFFER); + + for (i = 0; i < comm_size; ++i) { +@@ -61,17 +58,18 @@ int MPIR_Ialltoallv_sched_intra_inplace(const void *sendbuf, const int sendcount + else + dst = i; + +- mpi_errno = MPIR_Sched_send(((char *) recvbuf + rdispls[dst] * recv_extent), ++ mpi_errno = MPIR_Sched_send(((char *) recvbuf + rdispls[dst] * recvtype_extent), + recvcounts[dst], recvtype, dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +- mpi_errno = MPIR_Sched_recv(tmp_buf, recvcounts[dst], recvtype, dst, comm_ptr, s); ++ mpi_errno = MPIR_Sched_recv(tmp_buf, recvcounts[dst] * recvtype_sz, MPI_BYTE, ++ dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); + +- mpi_errno = MPIR_Sched_copy(tmp_buf, recvcounts[dst], recvtype, +- ((char *) recvbuf + rdispls[dst] * recv_extent), ++ mpi_errno = MPIR_Sched_copy(tmp_buf, recvcounts[dst] * recvtype_sz, MPI_BYTE, ++ ((char *) recvbuf + rdispls[dst] * recvtype_extent), + recvcounts[dst], recvtype, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoallv/ialltoallv_tsp_scattered_algos.h +@@ -0,0 +1,154 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALLV_TSP_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++/* Routine to schedule a scattered based alltoallv */ ++/* Alltoallv doesn't support MPI_IN_PLACE */ ++int MPIR_TSP_Ialltoallv_sched_intra_scattered(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int src, dst; ++ int i, j, ww; ++ int invtcs; ++ int tag; ++ int *vtcs, *recv_id, *send_id; ++ MPIR_CHKLMEM_DECL(3); ++ ++ MPIR_Assert(!(sendbuf == MPI_IN_PLACE)); ++ ++ int size = MPIR_Comm_size(comm); ++ int rank = MPIR_Comm_rank(comm); ++ int batch_size = MPIR_CVAR_IALLTOALLV_SCATTERED_BATCH_SIZE; ++ int bblock = MPIR_CVAR_IALLTOALLV_SCATTERED_OUTSTANDING_TASKS; ++ ++ MPI_Aint recvtype_lb, recvtype_extent; ++ MPI_Aint sendtype_lb, sendtype_extent; ++ MPI_Aint sendtype_true_extent, recvtype_true_extent; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLTOALLV_SCHED_INTRA_SCATTERED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLTOALLV_SCHED_INTRA_SCATTERED); ++ ++ /* Alltoall: each process need send #size msgs and recv #size msgs ++ * This algorithm does #bblock send/recv first ++ * followed by addition batchs of #batch_size each. ++ */ ++ if (bblock > size) ++ bblock = size; ++ ++ /* vtcs is twice the batch size to store both send and recv ids */ ++ MPIR_CHKLMEM_MALLOC(vtcs, int *, 2 * batch_size * sizeof(int), mpi_errno, "vtcs", MPL_MEM_COLL); ++ MPIR_CHKLMEM_MALLOC(recv_id, int *, bblock * sizeof(int), mpi_errno, "recv_id", MPL_MEM_COLL); ++ MPIR_CHKLMEM_MALLOC(send_id, int *, bblock * sizeof(int), mpi_errno, "send_id", MPL_MEM_COLL); ++ ++ /* Get datatype info of sendtype and recvtype */ ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ MPIR_Type_get_true_extent_impl(recvtype, &recvtype_lb, &recvtype_true_extent); ++ recvtype_extent = MPL_MAX(recvtype_extent, recvtype_true_extent); ++ ++ MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); ++ MPIR_Type_get_true_extent_impl(sendtype, &sendtype_lb, &sendtype_true_extent); ++ sendtype_extent = MPL_MAX(sendtype_extent, sendtype_true_extent); ++ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* First, post bblock number of sends/recvs */ ++ for (i = 0; i < bblock; i++) { ++ src = (rank + i) % size; ++ recv_id[i] = ++ MPIR_TSP_sched_irecv((char *) recvbuf + rdispls[src] * recvtype_extent, ++ recvcounts[src], recvtype, src, tag, comm, sched, 0, NULL); ++ dst = (rank - i + size) % size; ++ send_id[i] = ++ MPIR_TSP_sched_isend((char *) sendbuf + sdispls[dst] * sendtype_extent, ++ sendcounts[dst], sendtype, dst, tag, comm, sched, 0, NULL); ++ } ++ ++ /* Post more send/recv pairs as the previous ones finish */ ++ for (i = bblock; i < size; i += batch_size) { ++ int i_vtcs = 0; ++ ww = MPL_MIN(size - i, batch_size); ++ /* Add dependency to ensure not to run until previous block the batch portion ++ * is finished -- effectively limiting the on-going tasks to bblock ++ */ ++ for (j = 0; j < ww; j++) { ++ vtcs[i_vtcs++] = recv_id[(i + j) % bblock]; ++ vtcs[i_vtcs++] = send_id[(i + j) % bblock]; ++ } ++ invtcs = MPIR_TSP_sched_selective_sink(sched, 2 * ww, vtcs); ++ for (j = 0; j < ww; j++) { ++ src = (rank + i + j) % size; ++ recv_id[(i + j) % bblock] = ++ MPIR_TSP_sched_irecv((char *) recvbuf + rdispls[src] * recvtype_extent, ++ recvcounts[src], recvtype, src, tag, comm, sched, 1, &invtcs); ++ dst = (rank - i - j + size) % size; ++ send_id[(i + j) % bblock] = ++ MPIR_TSP_sched_isend((char *) sendbuf + sdispls[dst] * sendtype_extent, ++ sendcounts[dst], sendtype, dst, tag, comm, sched, 1, &invtcs); ++ } ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLTOALLV_SCHED_INTRA_SCATTERED); ++ return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Scattered sliding window based Alltoallv */ ++int MPIR_TSP_Ialltoallv_intra_scattered(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int rdispls[], ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IALLTOALLV_INTRA_SCATTERED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IALLTOALLV_INTRA_SCATTERED); ++ ++ /* Generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_ERR_CHKANDJUMP(!sched, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ MPIR_TSP_sched_create(sched); ++ ++ mpi_errno = ++ MPIR_TSP_Ialltoallv_sched_intra_scattered(sendbuf, sendcounts, sdispls, sendtype, ++ recvbuf, recvcounts, rdispls, recvtype, comm, ++ sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IALLTOALLV_INTRA_SCATTERED); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoallv/ialltoallv_tsp_scattered_algos_prototypes.h +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALLV_TSP_SCATTERED_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Ialltoallv_intra_scattered ++#define MPIR_TSP_Ialltoallv_intra_scattered MPIR_TSP_NAMESPACE(Ialltoallv_intra_scattered) ++#undef MPIR_TSP_Ialltoallv_sched_intra_scattered ++#define MPIR_TSP_Ialltoallv_sched_intra_scattered MPIR_TSP_NAMESPACE(Ialltoallv_sched_intra_scattered) ++ ++int MPIR_TSP_Ialltoallv_sched_intra_scattered(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_TSP_sched_t * sched); ++ ++int MPIR_TSP_Ialltoallv_intra_scattered(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int rdispls[], ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ialltoallv/ialltoallv_tsp_scattered_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IALLTOALLV_TSP_SCATTERED_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Ialltoallv_intra_scattered ++#undef MPIR_TSP_Ialltoallv_sched_intra_scattered +--- a/src/mpi/coll/ialltoallw/ialltoallw.c ++++ b/src/mpi/coll/ialltoallw/ialltoallw.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_IALLTOALLW_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -22,18 +22,18 @@ cvars: + auto - Internal algorithm selection + blocked - Force blocked algorithm + inplace - Force inplace algorithm +- pairwise_exchange - Force pairwise exchange algorithm + + - name : MPIR_CVAR_IALLTOALLW_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ialltoallw algorithm +- auto - Internal algorithm selection ++ auto - Internal algorithm selection ++ pairwise_exchange - Force pairwise exchange algorithm + + - name : MPIR_CVAR_IALLTOALLW_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -73,10 +73,6 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl + #undef MPI_Ialltoallw + #define MPI_Ialltoallw PMPI_Ialltoallw + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw_sched_intra_auto(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], const int rdispls[], +@@ -98,10 +94,6 @@ int MPIR_Ialltoallw_sched_intra_auto(const void *sendbuf, const int sendcounts[] + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw_sched_inter_auto(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], const int rdispls[], +@@ -117,10 +109,6 @@ int MPIR_Ialltoallw_sched_inter_auto(const void *sendbuf, const int sendcounts[] + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw_sched_impl(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], const int rdispls[], +@@ -130,18 +118,18 @@ int MPIR_Ialltoallw_sched_impl(const void *sendbuf, const int sendcounts[], cons + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ialltoallw_intra_algo_choice) { +- case MPIR_IALLTOALLW_INTRA_ALGO_BLOCKED: ++ switch (MPIR_CVAR_IALLTOALLW_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IALLTOALLW_INTRA_ALGORITHM_blocked: + mpi_errno = MPIR_Ialltoallw_sched_intra_blocked(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, s); + break; +- case MPIR_IALLTOALLW_INTRA_ALGO_INPLACE: ++ case MPIR_CVAR_IALLTOALLW_INTRA_ALGORITHM_inplace: + mpi_errno = MPIR_Ialltoallw_sched_intra_inplace(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, s); + break; +- case MPIR_IALLTOALLW_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IALLTOALLW_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ialltoallw_sched_intra_auto(sendbuf, sendcounts, sdispls, +@@ -151,14 +139,14 @@ int MPIR_Ialltoallw_sched_impl(const void *sendbuf, const int sendcounts[], cons + } + } else { + /* intercommunicator */ +- switch (MPIR_Ialltoallw_inter_algo_choice) { +- case MPIR_IALLTOALLW_INTER_ALGO_PAIRWISE_EXCHANGE: ++ switch (MPIR_CVAR_IALLTOALLW_INTER_ALGORITHM) { ++ case MPIR_CVAR_IALLTOALLW_INTER_ALGORITHM_pairwise_exchange: + mpi_errno = + MPIR_Ialltoallw_sched_inter_pairwise_exchange(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, s); + break; +- case MPIR_IALLTOALLW_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IALLTOALLW_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ialltoallw_sched_inter_auto(sendbuf, sendcounts, sdispls, +@@ -171,10 +159,6 @@ int MPIR_Ialltoallw_sched_impl(const void *sendbuf, const int sendcounts[], cons + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw_sched(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPI_Datatype recvtypes[], +@@ -193,10 +177,6 @@ int MPIR_Ialltoallw_sched(const void *sendbuf, const int sendcounts[], const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw_impl(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr, +@@ -231,10 +211,6 @@ int MPIR_Ialltoallw_impl(const void *sendbuf, const int sendcounts[], const int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], + const int rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr, +@@ -255,10 +231,6 @@ int MPIR_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdisp + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ialltoallw - Nonblocking generalized all-to-all communication allowing + different datatypes, counts, and displacements for each partner +@@ -368,14 +340,14 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ialltoallw", + "**mpi_ialltoallw %p %p %p %p %p %p %p %p %C %p", sendbuf, + sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, + recvtypes, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c ++++ b/src/mpi/coll/ialltoallw/ialltoallw_inter_pairwise_exchange.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw_sched_inter_pairwise_exchange +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw_sched_inter_pairwise_exchange(const void *sendbuf, const int sendcounts[], + const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +--- a/src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c ++++ b/src/mpi/coll/ialltoallw/ialltoallw_intra_blocked.c +@@ -20,10 +20,6 @@ + * *** Modification: We post only a small number of isends and irecvs at a time + * and wait on them as suggested by Tony Ladd. *** + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw_sched_intra_blocked +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw_sched_intra_blocked(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], const int rdispls[], +--- a/src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c ++++ b/src/mpi/coll/ialltoallw/ialltoallw_intra_inplace.c +@@ -18,10 +18,6 @@ + * single buffer across the whole loop. Something like MADRE is probably the + * best solution for the MPI_IN_PLACE scenario. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ialltoallw_sched_intra_inplace +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ialltoallw_sched_intra_inplace(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], const int rdispls[], +@@ -31,10 +27,9 @@ int MPIR_Ialltoallw_sched_intra_inplace(const void *sendbuf, const int sendcount + int mpi_errno = MPI_SUCCESS; + int comm_size, i, j; + int dst, rank; +- int recv_extent; +- MPI_Aint true_extent, true_lb; ++ MPI_Aint recvtype_sz; + int max_size; +- void *tmp_buf = NULL, *adj_tmp_buf = NULL; ++ void *tmp_buf = NULL; + MPIR_SCHED_CHKPMEM_DECL(1); + + comm_size = comm_ptr->local_size; +@@ -56,9 +51,8 @@ int MPIR_Ialltoallw_sched_intra_inplace(const void *sendbuf, const int sendcount + for (i = 0; i < comm_size; ++i) { + /* only look at recvtypes/recvcounts because the send vectors are + * ignored when sendbuf==MPI_IN_PLACE */ +- MPIR_Type_get_true_extent_impl(recvtypes[i], &true_lb, &true_extent); +- MPIR_Datatype_get_extent_macro(recvtypes[i], recv_extent); +- max_size = MPL_MAX(max_size, recvcounts[i] * MPL_MAX(recv_extent, true_extent)); ++ MPIR_Datatype_get_size_macro(recvtypes[i], recvtype_sz); ++ max_size = MPL_MAX(max_size, recvcounts[i] * recvtype_sz); + } + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, max_size, mpi_errno, "Ialltoallw tmp_buf", + MPL_MEM_BUFFER); +@@ -74,20 +68,18 @@ int MPIR_Ialltoallw_sched_intra_inplace(const void *sendbuf, const int sendcount + else + dst = i; + +- MPIR_Type_get_true_extent_impl(recvtypes[i], &true_lb, &true_extent); +- adj_tmp_buf = (void *) ((char *) tmp_buf - true_lb); +- ++ MPIR_Datatype_get_size_macro(recvtypes[i], recvtype_sz); + mpi_errno = MPIR_Sched_send(((char *) recvbuf + rdispls[dst]), + recvcounts[dst], recvtypes[dst], dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +- mpi_errno = +- MPIR_Sched_recv(adj_tmp_buf, recvcounts[dst], recvtypes[dst], dst, comm_ptr, s); ++ mpi_errno = MPIR_Sched_recv(tmp_buf, recvcounts[dst] * recvtype_sz, MPI_BYTE, ++ dst, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); + +- mpi_errno = MPIR_Sched_copy(adj_tmp_buf, recvcounts[dst], recvtypes[dst], ++ mpi_errno = MPIR_Sched_copy(tmp_buf, recvcounts[dst] * recvtype_sz, MPI_BYTE, + ((char *) recvbuf + rdispls[dst]), + recvcounts[dst], recvtypes[dst], s); + if (mpi_errno) +--- a/src/mpi/coll/ibarrier/Makefile.mk ++++ b/src/mpi/coll/ibarrier/Makefile.mk +@@ -18,4 +18,4 @@ mpi_sources += \ + mpi_core_sources += \ + src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c \ + src/mpi/coll/ibarrier/ibarrier_inter_bcast.c \ +- src/mpi/coll/ibarrier/ibarrier_intra_recexch.c ++ src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c +--- a/src/mpi/coll/ibarrier/ibarrier.c ++++ b/src/mpi/coll/ibarrier/ibarrier.c +@@ -22,7 +22,7 @@ cvars: + + - name : MPIR_CVAR_IBARRIER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -31,11 +31,11 @@ cvars: + Variable to select ibarrier algorithm + auto - Internal algorithm selection + recursive_doubling - Force recursive doubling algorithm +- recexch - Force generic transport based recursive exchange algorithm ++ gentran_recexch - Force generic transport based recursive exchange algorithm + + - name : MPIR_CVAR_IBARRIER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -83,10 +83,6 @@ int MPI_Ibarrier(MPI_Comm comm, MPI_Request * request) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibarrier_sched_intra_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; +@@ -98,10 +94,6 @@ int MPIR_Ibarrier_sched_intra_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + + /* It will choose between several different algorithms based on the given + * parameters. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibarrier_sched_inter_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno; +@@ -111,21 +103,17 @@ int MPIR_Ibarrier_sched_inter_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibarrier_sched_impl(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ibarrier_intra_algo_choice) { +- case MPIR_IBARRIER_INTRA_ALGO_RECURSIVE_DOUBLING: ++ switch (MPIR_CVAR_IBARRIER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IBARRIER_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = MPIR_Ibarrier_sched_intra_recursive_doubling(comm_ptr, s); + break; +- case MPIR_IBARRIER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IBARRIER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ibarrier_sched_intra_auto(comm_ptr, s); +@@ -133,11 +121,11 @@ int MPIR_Ibarrier_sched_impl(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + } + } else { + /* intercommunicator */ +- switch (MPIR_Ibarrier_inter_algo_choice) { +- case MPIR_IBARRIER_INTER_ALGO_BCAST: ++ switch (MPIR_CVAR_IBARRIER_INTER_ALGORITHM) { ++ case MPIR_CVAR_IBARRIER_INTER_ALGORITHM_bcast: + mpi_errno = MPIR_Ibarrier_sched_inter_bcast(comm_ptr, s); + break; +- case MPIR_IBARRIER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IBARRIER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ibarrier_sched_inter_auto(comm_ptr, s); +@@ -148,10 +136,6 @@ int MPIR_Ibarrier_sched_impl(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibarrier_sched(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; +@@ -165,10 +149,6 @@ int MPIR_Ibarrier_sched(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibarrier_impl(MPIR_Comm * comm_ptr, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; +@@ -184,9 +164,9 @@ int MPIR_Ibarrier_impl(MPIR_Comm * comm_ptr, MPIR_Request ** request) + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ibarrier_intra_algo_choice) { +- case MPIR_IBARRIER_INTRA_ALGO_GENTRAN_RECEXCH: +- mpi_errno = MPIR_Ibarrier_intra_recexch(comm_ptr, request); ++ switch (MPIR_CVAR_IBARRIER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IBARRIER_INTRA_ALGORITHM_gentran_recexch: ++ mpi_errno = MPIR_Ibarrier_intra_gentran_recexch(comm_ptr, request); + + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -220,10 +200,6 @@ int MPIR_Ibarrier_impl(MPIR_Comm * comm_ptr, MPIR_Request ** request) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; +@@ -239,10 +215,6 @@ int MPIR_Ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** request) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ibarrier - Notifies the process that it has reached the barrier and returns + immediately +@@ -334,11 +306,11 @@ int MPI_Ibarrier(MPI_Comm comm, MPI_Request * request) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ibarrier", "**mpi_ibarrier %C %p", comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/ibarrier/ibarrier_inter_bcast.c ++++ b/src/mpi/coll/ibarrier/ibarrier_inter_bcast.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier_sched_inter_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibarrier_sched_inter_bcast(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ibarrier/ibarrier_intra_gentran_recexch.c +@@ -0,0 +1,30 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "../iallreduce/iallreduce_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ibarrier_intra_gentran_recexch(MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ void *recvbuf = NULL; ++ ++ mpi_errno = ++ MPII_Gentran_Iallreduce_intra_recexch(MPI_IN_PLACE, recvbuf, 0, MPI_BYTE, MPI_SUM, comm, ++ req, MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, ++ MPIR_CVAR_IBARRIER_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpi/coll/ibarrier/ibarrier_intra_recexch.c ++++ /dev/null +@@ -1,34 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "../iallreduce/iallreduce_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Ibarrier_intra_recexch(MPIR_Comm * comm, MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- void *recvbuf = NULL; +- +- mpi_errno = +- MPII_Gentran_Iallreduce_intra_recexch(MPI_IN_PLACE, recvbuf, 0, MPI_BYTE, MPI_SUM, comm, +- req, MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, +- MPIR_CVAR_IBARRIER_RECEXCH_KVAL); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c ++++ b/src/mpi/coll/ibarrier/ibarrier_intra_recursive_doubling.c +@@ -19,10 +19,6 @@ + * process i sends to process (i + 2^k) % p and receives from process + * (i - 2^k + p) % p. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibarrier_sched_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibarrier_sched_intra_recursive_doubling(MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/coll/ibcast/Makefile.mk ++++ b/src/mpi/coll/ibcast/Makefile.mk +@@ -22,9 +22,9 @@ mpi_core_sources += \ + src/mpi/coll/ibcast/ibcast_intra_smp.c \ + src/mpi/coll/ibcast/ibcast_inter_flat.c \ + src/mpi/coll/ibcast/ibcast_gentran_algos.c \ +- src/mpi/coll/ibcast/ibcast_intra_tree.c \ +- src/mpi/coll/ibcast/ibcast_intra_scatter_recexch_allgather.c \ +- src/mpi/coll/ibcast/ibcast_intra_ring.c \ ++ src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c \ ++ src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c \ ++ src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c \ + src/mpi/coll/ibcast/ibcast_utils.c + + noinst_HEADERS += \ +--- a/src/mpi/coll/ibcast/ibcast.c ++++ b/src/mpi/coll/ibcast/ibcast.c +@@ -58,7 +58,7 @@ cvars: + + - name : MPIR_CVAR_IBCAST_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -69,9 +69,9 @@ cvars: + binomial - Force Binomial algorithm + scatter_recursive_doubling_allgather - Force Scatter Recursive Doubling Allgather algorithm + scatter_ring_allgather - Force Scatter Ring Allgather algorithm +- tree - Force Generic Transport Tree algorithm +- scatter_recexch_allgather - Force Generic Transport Scatter followed by Recursive Exchange Allgather algorithm +- ring - Force Generic Transport Ring algorithm ++ gentran_tree - Force Generic Transport Tree algorithm ++ gentran_scatter_recexch_allgather - Force Generic Transport Scatter followed by Recursive Exchange Allgather algorithm ++ gentran_ring - Force Generic Transport Ring algorithm + + - name : MPIR_CVAR_IBCAST_SCATTER_KVAL + category : COLLECTIVE +@@ -95,7 +95,7 @@ cvars: + + - name : MPIR_CVAR_IBCAST_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -145,10 +145,6 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Com + /* Provides a "flat" broadcast that doesn't know anything about + * hierarchy. It will choose between several different algorithms + * based on the given parameters. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_sched_intra_auto(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -194,10 +190,6 @@ int MPIR_Ibcast_sched_intra_auto(void *buffer, int count, MPI_Datatype datatype, + /* Provides a "flat" broadcast for intercommunicators that doesn't + * know anything about hierarchy. It will choose between several + * different algorithms based on the given parameters. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_sched_inter_auto(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -208,10 +200,6 @@ int MPIR_Ibcast_sched_inter_auto(void *buffer, int count, MPI_Datatype datatype, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_sched_impl(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -223,23 +211,23 @@ int MPIR_Ibcast_sched_impl(void *buffer, int count, MPI_Datatype datatype, int r + mpi_errno = MPIR_Ibcast_sched_intra_smp(buffer, count, datatype, root, comm_ptr, s); + } else { + /* intercommunicator */ +- switch (MPIR_Ibcast_intra_algo_choice) { +- case MPIR_IBCAST_INTRA_ALGO_BINOMIAL: ++ switch (MPIR_CVAR_IBCAST_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_binomial: + mpi_errno = MPIR_Ibcast_sched_intra_binomial(buffer, count, datatype, + root, comm_ptr, s); + break; +- case MPIR_IBCAST_INTRA_ALGO_SCATTER_RECURSIVE_DOUBLING_ALLGATHER: ++ case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_scatter_recursive_doubling_allgather: + mpi_errno = + MPIR_Ibcast_sched_intra_scatter_recursive_doubling_allgather(buffer, count, + datatype, root, + comm_ptr, s); + break; +- case MPIR_IBCAST_INTRA_ALGO_SCATTER_RING_ALLGATHER: ++ case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_scatter_ring_allgather: + mpi_errno = + MPIR_Ibcast_sched_intra_scatter_ring_allgather(buffer, count, datatype, + root, comm_ptr, s); + break; +- case MPIR_IBCAST_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ibcast_sched_intra_auto(buffer, count, datatype, +@@ -249,12 +237,12 @@ int MPIR_Ibcast_sched_impl(void *buffer, int count, MPI_Datatype datatype, int r + } + } else { + /* intercommunicator */ +- switch (MPIR_Ibcast_inter_algo_choice) { +- case MPIR_IBCAST_INTER_ALGO_FLAT: ++ switch (MPIR_CVAR_IBCAST_INTER_ALGORITHM) { ++ case MPIR_CVAR_IBCAST_INTER_ALGORITHM_flat: + mpi_errno = MPIR_Ibcast_sched_inter_flat(buffer, count, datatype, root, + comm_ptr, s); + break; +- case MPIR_IBCAST_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IBCAST_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ibcast_sched_inter_auto(buffer, count, datatype, root, +@@ -266,10 +254,6 @@ int MPIR_Ibcast_sched_impl(void *buffer, int count, MPI_Datatype datatype, int r + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_sched(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -284,10 +268,6 @@ int MPIR_Ibcast_sched(void *buffer, int count, MPI_Datatype datatype, int root, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Request ** request) + { +@@ -307,27 +287,29 @@ int MPIR_Ibcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ibcast_intra_algo_choice) { +- case MPIR_IBCAST_INTRA_ALGO_GENTRAN_TREE: ++ switch (MPIR_CVAR_IBCAST_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_gentran_tree: + mpi_errno = +- MPIR_Ibcast_intra_tree(buffer, count, datatype, root, comm_ptr, request); ++ MPIR_Ibcast_intra_gentran_tree(buffer, count, datatype, root, comm_ptr, ++ request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IBCAST_INTRA_ALGO_GENTRAN_SCATTER_RECEXCH_ALLGATHER: ++ case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_gentran_scatter_recexch_allgather: + if (nbytes % MPIR_Comm_size(comm_ptr) != 0) /* currently this algorithm cannot handle this scenario */ + break; + mpi_errno = +- MPIR_Ibcast_intra_scatter_recexch_allgather(buffer, count, datatype, root, +- comm_ptr, request); ++ MPIR_Ibcast_intra_gentran_scatter_recexch_allgather(buffer, count, datatype, ++ root, comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IBCAST_INTRA_ALGO_GENTRAN_RING: ++ case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_gentran_ring: + mpi_errno = +- MPIR_Ibcast_intra_ring(buffer, count, datatype, root, comm_ptr, request); ++ MPIR_Ibcast_intra_gentran_ring(buffer, count, datatype, root, comm_ptr, ++ request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; +@@ -361,10 +343,6 @@ int MPIR_Ibcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, + MPIR_Request ** request) + { +@@ -381,10 +359,6 @@ int MPIR_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_C + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ibcast - Broadcasts a message from the process with rank "root" to + all other processes of the communicator in a nonblocking way +@@ -487,12 +461,12 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Com + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ibcast", "**mpi_ibcast %p %d %D %C %p", buffer, count, + datatype, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/ibcast/ibcast_inter_flat.c ++++ b/src/mpi/coll/ibcast/ibcast_inter_flat.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + #include "ibcast.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_sched_intra_flat +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_sched_inter_flat(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +--- a/src/mpi/coll/ibcast/ibcast_intra_binomial.c ++++ b/src/mpi/coll/ibcast/ibcast_intra_binomial.c +@@ -13,10 +13,6 @@ + * binomial broadcast. It does _not_ start the schedule. This permits callers + * to build up a larger hierarchical broadcast from multiple invocations of this + * function. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_sched_intra_binomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_sched_intra_binomial(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -57,7 +53,7 @@ int MPIR_Ibcast_sched_intra_binomial(void *buffer, int count, MPI_Datatype datat + + /* TODO: Pipeline the packing and communication */ + if (rank == root) { +- mpi_errno = MPIR_Sched_copy(buffer, count, datatype, tmp_buf, nbytes, MPI_PACKED, s); ++ mpi_errno = MPIR_Sched_copy(buffer, count, datatype, tmp_buf, nbytes, MPI_BYTE, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +@@ -149,7 +145,7 @@ int MPIR_Ibcast_sched_intra_binomial(void *buffer, int count, MPI_Datatype datat + if (!is_contig) { + if (rank != root) { + MPIR_SCHED_BARRIER(s); +- mpi_errno = MPIR_Sched_copy(tmp_buf, nbytes, MPI_PACKED, buffer, count, datatype, s); ++ mpi_errno = MPIR_Sched_copy(tmp_buf, nbytes, MPI_BYTE, buffer, count, datatype, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ibcast/ibcast_intra_gentran_ring.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++#include "ibcast.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ibcast_tsp_tree_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ibcast_intra_gentran_ring(void *buffer, int count, ++ MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ /* Ring algorithm is equivalent to kary tree algorithm with k = 1 */ ++ mpi_errno = MPII_Gentran_Ibcast_intra_tree(buffer, count, datatype, root, ++ comm_ptr, request, MPIR_TREE_TYPE_KARY, ++ 1, MPIR_CVAR_IBCAST_RING_CHUNK_SIZE); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ibcast/ibcast_intra_gentran_scatter_recexch_allgather.c +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++#include "ibcast.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ibcast_tsp_scatter_recexch_allgather_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ibcast_intra_gentran_scatter_recexch_allgather(void *buffer, int count, ++ MPI_Datatype datatype, int root, ++ MPIR_Comm * comm_ptr, ++ MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ibcast_intra_scatter_recexch_allgather(buffer, count, datatype, root, ++ comm_ptr, request); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ibcast/ibcast_intra_gentran_tree.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++#include "ibcast.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ibcast_tsp_tree_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ibcast_intra_gentran_tree(void *buffer, int count, ++ MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ibcast_intra_tree(buffer, count, datatype, root, ++ comm_ptr, request, MPIR_Ibcast_tree_type, ++ MPIR_CVAR_IBCAST_TREE_KVAL, ++ MPIR_CVAR_IBCAST_TREE_PIPELINE_CHUNK_SIZE); ++ ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpi/coll/ibcast/ibcast_intra_ring.c ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +-#include "ibcast.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "ibcast_tsp_tree_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Ibcast_intra_ring(void *buffer, int count, +- MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- /* Ring algorithm is equivalent to kary tree algorithm with k = 1 */ +- mpi_errno = MPII_Gentran_Ibcast_intra_tree(buffer, count, datatype, root, +- comm_ptr, request, MPIR_TREE_TYPE_KARY, +- 1, MPIR_CVAR_IBCAST_RING_CHUNK_SIZE); +- +- return mpi_errno; +-} +deleted file mode 100644 +--- a/src/mpi/coll/ibcast/ibcast_intra_scatter_recexch_allgather.c ++++ /dev/null +@@ -1,34 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +-#include "ibcast.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "ibcast_tsp_scatter_recexch_allgather_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_intra_scatter_recexch_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Ibcast_intra_scatter_recexch_allgather(void *buffer, int count, +- MPI_Datatype datatype, int root, +- MPIR_Comm * comm_ptr, MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Ibcast_intra_scatter_recexch_allgather(buffer, count, datatype, root, +- comm_ptr, request); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c ++++ b/src/mpi/coll/ibcast/ibcast_intra_scatter_recursive_doubling_allgather.c +@@ -47,10 +47,6 @@ + * bytes and knows how to deal with a "ragged edge" vector length and we + * implement the recursive doubling algorithm here. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_sched_intra_scatter_recursive_doubling_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_sched_intra_scatter_recursive_doubling_allgather(void *buffer, int count, + MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, +--- a/src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c ++++ b/src/mpi/coll/ibcast/ibcast_intra_scatter_ring_allgather.c +@@ -25,10 +25,6 @@ + * + * Total Cost = (lgp+p-1).alpha + 2.n.((p-1)/p).beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_sched_intra_scatter_ring_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibcast_sched_intra_scatter_ring_allgather(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +--- a/src/mpi/coll/ibcast/ibcast_intra_smp.c ++++ b/src/mpi/coll/ibcast/ibcast_intra_smp.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + #include "ibcast.h" + +-#undef FUNCNAME +-#define FUNCNAME sched_test_length +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int sched_test_length(MPIR_Comm * comm, int tag, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -19,7 +15,7 @@ static int sched_test_length(MPIR_Comm * comm, int tag, void *state) + MPIR_Get_count_impl(&ibcast_state->status, MPI_BYTE, &recv_size); + if (ibcast_state->n_bytes != recv_size || ibcast_state->status.MPI_ERROR != MPI_SUCCESS) { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**collective_size_mismatch", + "**collective_size_mismatch %d %d", ibcast_state->n_bytes, + recv_size); +deleted file mode 100644 +--- a/src/mpi/coll/ibcast/ibcast_intra_tree.c ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +-#include "ibcast.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "ibcast_tsp_tree_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibcast_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Ibcast_intra_tree(void *buffer, int count, +- MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Ibcast_intra_tree(buffer, count, datatype, root, +- comm_ptr, request, MPIR_Ibcast_tree_type, +- MPIR_CVAR_IBCAST_TREE_KVAL, +- MPIR_CVAR_IBCAST_TREE_PIPELINE_CHUNK_SIZE); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/ibcast/ibcast_tsp_scatter_recexch_allgather_algos.h ++++ b/src/mpi/coll/ibcast/ibcast_tsp_scatter_recexch_allgather_algos.h +@@ -19,10 +19,6 @@ + #include "../iallgather/iallgather_tsp_recexch_algos_prototypes.h" + + /* Routine to schedule a scatter followed by recursive exchange based broadcast */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ibcast_sched_intra_scatter_recexch_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ibcast_sched_intra_scatter_recexch_allgather(void *buffer, int count, + MPI_Datatype datatype, int root, + MPIR_Comm * comm, +@@ -109,10 +105,6 @@ int MPIR_TSP_Ibcast_sched_intra_scatter_recexch_allgather(void *buffer, int coun + + + /* Non-blocking scatter followed by recursive exchange allgather based broadcast */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ibcast_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ibcast_intra_scatter_recexch_allgather(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm, MPIR_Request ** req) + { +--- a/src/mpi/coll/ibcast/ibcast_tsp_tree_algos.h ++++ b/src/mpi/coll/ibcast/ibcast_tsp_tree_algos.h +@@ -18,10 +18,6 @@ + #include "tsp_namespace_def.h" + + /* Routine to schedule a pipelined tree based broadcast */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ibcast_sched_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm, int tree_type, int k, int maxbytes, + MPIR_TSP_sched_t * sched) +@@ -36,7 +32,7 @@ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, int count, MPI_Datatype datat + int rank; + int recv_id; + int num_children; +- MPII_Treealgo_tree_t my_tree; ++ MPIR_Treealgo_tree_t my_tree; + int tag; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IBCAST_SCHED_INTRA_TREE); +@@ -55,7 +51,7 @@ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, int count, MPI_Datatype datat + extent = MPL_MAX(extent, true_extent); + + /* calculate chunking information for pipelining */ +- MPII_Algo_calculate_pipeline_chunk_info(maxbytes, type_size, count, &num_chunks, ++ MPIR_Algo_calculate_pipeline_chunk_info(maxbytes, type_size, count, &num_chunks, + &chunk_size_floor, &chunk_size_ceil); + /* print chunking information */ + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, +@@ -63,7 +59,7 @@ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, int count, MPI_Datatype datat + maxbytes, count, num_chunks, + chunk_size_floor, chunk_size_ceil)); + +- mpi_errno = MPII_Treealgo_tree_create(rank, size, tree_type, k, root, &my_tree); ++ mpi_errno = MPIR_Treealgo_tree_create(rank, size, tree_type, k, root, &my_tree); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + num_children = my_tree.num_children; +@@ -97,7 +93,7 @@ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, int count, MPI_Datatype datat + offset += msgsize; + } + +- MPII_Treealgo_tree_free(&my_tree); ++ MPIR_Treealgo_tree_free(&my_tree); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_IBCAST_SCHED_INTRA_TREE); +@@ -108,10 +104,6 @@ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, int count, MPI_Datatype datat + + + /* Non-blocking tree based broadcast */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ibcast_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ibcast_intra_tree(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm, MPIR_Request ** req, int tree_type, int k, + int maxbytes) +--- a/src/mpi/coll/ibcast/ibcast_utils.c ++++ b/src/mpi/coll/ibcast/ibcast_utils.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + #include "ibcast.h" + +-#undef FUNCNAME +-#define FUNCNAME MPII_Ibcast_sched_test_length +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Ibcast_sched_test_length(MPIR_Comm * comm, int tag, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -20,7 +16,7 @@ int MPII_Ibcast_sched_test_length(MPIR_Comm * comm, int tag, void *state) + MPIR_Get_count_impl(&ibcast_state->status, MPI_BYTE, &recv_size); + if (ibcast_state->n_bytes != recv_size || ibcast_state->status.MPI_ERROR != MPI_SUCCESS) { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**collective_size_mismatch", + "**collective_size_mismatch %d %d", ibcast_state->n_bytes, + recv_size); +@@ -30,10 +26,6 @@ int MPII_Ibcast_sched_test_length(MPIR_Comm * comm, int tag, void *state) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Ibcast_sched_test_curr_length +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Ibcast_sched_test_curr_length(MPIR_Comm * comm, int tag, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -41,7 +33,7 @@ int MPII_Ibcast_sched_test_curr_length(MPIR_Comm * comm, int tag, void *state) + + if (ibcast_state->n_bytes != ibcast_state->curr_bytes) { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**collective_size_mismatch", + "**collective_size_mismatch %d %d", ibcast_state->n_bytes, + ibcast_state->curr_bytes); +@@ -51,10 +43,6 @@ int MPII_Ibcast_sched_test_curr_length(MPIR_Comm * comm, int tag, void *state) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Ibcast_sched_add_length +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Ibcast_sched_add_length(MPIR_Comm * comm, int tag, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -75,10 +63,6 @@ int MPII_Ibcast_sched_add_length(MPIR_Comm * comm, int tag, void *state) + /* This is a binomial scatter operation, but it does *not* take + * typical scatter arguments. At the moment this function always + * scatters a buffer of nbytes starting at tmp_buf address. */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Iscatter_for_bcast_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Iscatter_for_bcast_sched(void *tmp_buf, int root, MPIR_Comm * comm_ptr, int nbytes, + MPIR_Sched_t s) + { +--- a/src/mpi/coll/iexscan/iexscan.c ++++ b/src/mpi/coll/iexscan/iexscan.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_IEXSCAN_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -59,10 +59,6 @@ int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data + #undef MPI_Iexscan + #define MPI_Iexscan PMPI_Iexscan + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iexscan_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iexscan_sched_intra_auto(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -82,23 +78,19 @@ int MPIR_Iexscan_sched_intra_auto(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iexscan_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iexscan_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + + /* intracommunicator */ +- switch (MPIR_Iexscan_intra_algo_choice) { +- case MPIR_IEXSCAN_INTRA_ALGO_RECURSIVE_DOUBLING: ++ switch (MPIR_CVAR_IEXSCAN_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IEXSCAN_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = + MPIR_Iexscan_sched_intra_recursive_doubling(sendbuf, recvbuf, count, datatype, op, + comm_ptr, s); + break; +- case MPIR_IEXSCAN_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IEXSCAN_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -109,10 +101,6 @@ int MPIR_Iexscan_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iexscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iexscan_sched(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -127,10 +115,6 @@ int MPIR_Iexscan_sched(const void *sendbuf, void *recvbuf, int count, MPI_Dataty + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iexscan_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iexscan_impl(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Request ** request) +@@ -162,10 +146,6 @@ int MPIR_Iexscan_impl(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iexscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request) + { +@@ -182,10 +162,6 @@ int MPIR_Iexscan(const void *sendbuf, void *recvbuf, int count, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Iexscan - Computes the exclusive scan (partial reductions) of data on a + collection of processes in a nonblocking way +@@ -300,12 +276,12 @@ int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_iexscan", "**mpi_iexscan %p %p %d %D %O %C %p", sendbuf, + recvbuf, count, datatype, op, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c ++++ b/src/mpi/coll/iexscan/iexscan_intra_recursive_doubling.c +@@ -49,10 +49,6 @@ + + End Algorithm: MPI_Exscan + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iexscan_sched_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iexscan_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +--- a/src/mpi/coll/igather/Makefile.mk ++++ b/src/mpi/coll/igather/Makefile.mk +@@ -20,4 +20,4 @@ mpi_core_sources += \ + src/mpi/coll/igather/igather_inter_short.c \ + src/mpi/coll/igather/igather_inter_long.c \ + src/mpi/coll/igather/igather_gentran_algos.c \ +- src/mpi/coll/igather/igather_intra_tree.c ++ src/mpi/coll/igather/igather_intra_gentran_tree.c +--- a/src/mpi/coll/igather/igather.c ++++ b/src/mpi/coll/igather/igather.c +@@ -12,16 +12,16 @@ + cvars: + - name : MPIR_CVAR_IGATHER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select igather algorithm +- auto - Internal algorithm selection +- binomial - Force binomial algorithm +- tree - Force genetric transport based tree algorithm ++ auto - Internal algorithm selection ++ binomial - Force binomial algorithm ++ gentran_tree - Force genetric transport based tree algorithm + + - name : MPIR_CVAR_IGATHER_TREE_KVAL + category : COLLECTIVE +@@ -35,16 +35,16 @@ cvars: + + - name : MPIR_CVAR_IGATHER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select igather algorithm +- auto - Internal algorithm selection +- long_inter - Force long inter algorithm +- short_inter - Force short inter algorithm ++ auto - Internal algorithm selection ++ long - Force long inter algorithm ++ short - Force short inter algorithm + + - name : MPIR_CVAR_IGATHER_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -84,10 +84,6 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void + #undef MPI_Igather + #define MPI_Igather PMPI_Igather + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -106,10 +102,6 @@ int MPIR_Igather_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Dataty + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -149,10 +141,6 @@ int MPIR_Igather_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Dataty + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -161,13 +149,13 @@ int MPIR_Igather_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sen + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Igather_intra_algo_choice) { +- case MPIR_IGATHER_INTRA_ALGO_BINOMIAL: ++ switch (MPIR_CVAR_IGATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IGATHER_INTRA_ALGORITHM_binomial: + mpi_errno = MPIR_Igather_sched_intra_binomial(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, s); + break; +- case MPIR_IGATHER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IGATHER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Igather_sched_intra_auto(sendbuf, sendcount, sendtype, +@@ -177,18 +165,18 @@ int MPIR_Igather_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sen + } + } else { + /* intercommunicator */ +- switch (MPIR_Igather_inter_algo_choice) { +- case MPIR_IGATHER_INTER_ALGO_LONG: ++ switch (MPIR_CVAR_IGATHER_INTER_ALGORITHM) { ++ case MPIR_CVAR_IGATHER_INTER_ALGORITHM_long: + mpi_errno = MPIR_Igather_sched_inter_long(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, s); + break; +- case MPIR_IGATHER_INTER_ALGO_SHORT: ++ case MPIR_CVAR_IGATHER_INTER_ALGORITHM_short: + mpi_errno = MPIR_Igather_sched_inter_short(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, s); + break; +- case MPIR_IGATHER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IGATHER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Igather_sched_inter_auto(sendbuf, sendcount, sendtype, recvbuf, +@@ -199,10 +187,6 @@ int MPIR_Igather_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sen + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -220,10 +204,6 @@ int MPIR_Igather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -242,11 +222,12 @@ int MPIR_Igather_impl(const void *sendbuf, int sendcount, + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Igather_intra_algo_choice) { +- case MPIR_IGATHER_INTRA_ALGO_TREE: ++ switch (MPIR_CVAR_IGATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IGATHER_INTRA_ALGORITHM_gentran_tree: + mpi_errno = +- MPIR_Igather_intra_tree(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, root, comm_ptr, request); ++ MPIR_Igather_intra_gentran_tree(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, root, comm_ptr, ++ request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; +@@ -280,10 +261,6 @@ int MPIR_Igather_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -303,10 +280,6 @@ int MPIR_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Igather - Gathers together values from a group of processes in + a nonblocking way +@@ -481,13 +454,13 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_igather", "**mpi_igather %p %d %D %p %d %D %d %C %p", + sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, + comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/igather/igather_inter_long.c ++++ b/src/mpi/coll/igather/igather_inter_long.c +@@ -13,10 +13,6 @@ + * + * Cost: p.alpha + n.beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_sched_inter_long +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather_sched_inter_long(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -31,8 +27,6 @@ int MPIR_Igather_sched_inter_long(const void *sendbuf, int sendcount, MPI_Dataty + /* long message. use linear algorithm. */ + if (root == MPI_ROOT) { + MPIR_Datatype_get_extent_macro(recvtype, extent); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (recvcount * remote_size * extent)); + + for (i = 0; i < remote_size; i++) { + mpi_errno = MPIR_Sched_recv(((char *) recvbuf + recvcount * i * extent), +--- a/src/mpi/coll/igather/igather_inter_short.c ++++ b/src/mpi/coll/igather/igather_inter_short.c +@@ -14,10 +14,6 @@ + * + * Cost: (lgp+1).alpha + n.((p-1)/p).beta + n.beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_sched_inter_short +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather_sched_inter_short(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -25,8 +21,6 @@ int MPIR_Igather_sched_inter_short(const void *sendbuf, int sendcount, MPI_Datat + int mpi_errno = MPI_SUCCESS; + int rank; + MPI_Aint local_size, remote_size; +- MPI_Aint extent, true_extent, true_lb = 0; +- void *tmp_buf = NULL; + MPIR_Comm *newcomm_ptr = NULL; + MPIR_SCHED_CHKPMEM_DECL(1); + +@@ -42,20 +36,19 @@ int MPIR_Igather_sched_inter_short(const void *sendbuf, int sendcount, MPI_Datat + /* remote group. Rank 0 allocates temporary buffer, does + * local intracommunicator gather, and then sends the data + * to root. */ ++ MPI_Aint sendtype_sz; ++ void *tmp_buf = NULL; + + rank = comm_ptr->rank; + + if (rank == 0) { +- MPIR_Type_get_true_extent_impl(sendtype, &true_lb, &true_extent); +- MPIR_Datatype_get_extent_macro(sendtype, extent); +- +- MPIR_Ensure_Aint_fits_in_pointer(sendcount * local_size * +- (MPL_MAX(extent, true_extent))); ++ MPIR_Datatype_get_size_macro(sendtype, sendtype_sz); + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, +- sendcount * local_size * (MPL_MAX(extent, true_extent)), ++ sendcount * local_size * sendtype_sz, + mpi_errno, "tmp_buf", MPL_MEM_BUFFER); +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - true_lb); ++ } else { ++ /* silience -Wmaybe-uninitialized due to MPIR_Igather_sched by non-zero ranks */ ++ sendtype_sz = 0; + } + + /* all processes in remote group form new intracommunicator */ +@@ -69,13 +62,14 @@ int MPIR_Igather_sched_inter_short(const void *sendbuf, int sendcount, MPI_Datat + + /* now do the a local gather on this intracommunicator */ + mpi_errno = MPIR_Igather_sched(sendbuf, sendcount, sendtype, +- tmp_buf, sendcount, sendtype, 0, newcomm_ptr, s); ++ tmp_buf, sendcount * sendtype_sz, MPI_BYTE, ++ 0, newcomm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + + if (rank == 0) { +- mpi_errno = +- MPIR_Sched_send(tmp_buf, sendcount * local_size, sendtype, root, comm_ptr, s); ++ mpi_errno = MPIR_Sched_send(tmp_buf, sendcount * local_size * sendtype_sz, MPI_BYTE, ++ root, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +--- a/src/mpi/coll/igather/igather_intra_binomial.c ++++ b/src/mpi/coll/igather/igather_intra_binomial.c +@@ -26,10 +26,6 @@ + + End Algorithm: MPI_Gather + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_sched_intra_binomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igather_sched_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -64,8 +60,6 @@ int MPIR_Igather_sched_intra_binomial(const void *sendbuf, int sendcount, MPI_Da + + if (rank == root) { + MPIR_Datatype_get_extent_macro(recvtype, extent); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (extent * recvcount * comm_size)); + } + + if (rank == root) { +@@ -225,7 +219,7 @@ int MPIR_Igather_sched_intra_binomial(const void *sendbuf, int sendcount, MPI_Da + MPIR_ERR_POP(mpi_errno); + } else { + blocks[0] = sendcount; +- struct_displs[0] = MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf; ++ struct_displs[0] = (MPI_Aint) sendbuf; + types[0] = sendtype; + /* check for overflow. work around int limits if needed */ + if (curr_cnt - nbytes != (int) (curr_cnt - nbytes)) { +@@ -235,7 +229,7 @@ int MPIR_Igather_sched_intra_binomial(const void *sendbuf, int sendcount, MPI_Da + MPIR_Assign_trunc(blocks[1], curr_cnt - nbytes, int); + types[1] = MPI_BYTE; + } +- struct_displs[1] = MPIR_VOID_PTR_CAST_TO_MPI_AINT tmp_buf; ++ struct_displs[1] = (MPI_Aint) tmp_buf; + + mpi_errno = + MPIR_Type_create_struct_impl(2, blocks, struct_displs, types, &tmp_type); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/igather/igather_intra_gentran_tree.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "igather_tsp_tree_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Igather_intra_gentran_tree(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Igather_intra_tree(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ root, comm_ptr, request, ++ MPIR_CVAR_IGATHER_TREE_KVAL); ++ ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpi/coll/igather/igather_intra_tree.c ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "igather_tsp_tree_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igather_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Igather_intra_tree(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Igather_intra_tree(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, +- root, comm_ptr, request, +- MPIR_CVAR_IGATHER_TREE_KVAL); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/igather/igather_tsp_tree_algos.h ++++ b/src/mpi/coll/igather/igather_tsp_tree_algos.h +@@ -18,10 +18,6 @@ + #include "tsp_namespace_def.h" + + /* Routine to schedule a tree based gather */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Igathert_sched_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -30,13 +26,13 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + int size, rank, lrank; + int i, j, tag, is_inplace = false; +- size_t sendtype_lb, sendtype_extent, sendtype_true_extent; +- size_t recvtype_lb, recvtype_extent, recvtype_true_extent; ++ MPI_Aint sendtype_lb, sendtype_extent, sendtype_true_extent; ++ MPI_Aint recvtype_lb, recvtype_extent, recvtype_true_extent; + int dtcopy_id, *recv_id = NULL; + void *tmp_buf = NULL; + const void *data_buf = NULL; + int tree_type; +- MPII_Treealgo_tree_t my_tree, parents_tree; ++ MPIR_Treealgo_tree_t my_tree, parents_tree; + int next_child, num_children, *child_subtree_size = NULL, *child_data_offset = NULL; + int offset, recv_size, num_dependencies; + +@@ -52,7 +48,7 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, int sendcount, + is_inplace = (sendbuf == MPI_IN_PLACE); /* For gather, MPI_IN_PLACE is significant only at root */ + + tree_type = MPIR_TREE_TYPE_KNOMIAL_1; /* currently only tree_type=MPIR_TREE_TYPE_KNOMIAL_1 is supported for gather */ +- mpi_errno = MPII_Treealgo_tree_create(rank, size, tree_type, k, root, &my_tree); ++ mpi_errno = MPIR_Treealgo_tree_create(rank, size, tree_type, k, root, &my_tree); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + num_children = my_tree.num_children; +@@ -87,7 +83,7 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, int sendcount, + + /* get tree information of the parent */ + if (my_tree.parent != -1) { +- MPII_Treealgo_tree_create(my_tree.parent, size, tree_type, k, root, &parents_tree); ++ MPIR_Treealgo_tree_create(my_tree.parent, size, tree_type, k, root, &parents_tree); + } else { /* initialize an empty children array */ + utarray_new(parents_tree.children, &ut_int_icd, MPL_MEM_COLL); + parents_tree.num_children = 0; +@@ -120,7 +116,7 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, int sendcount, + recv_size += child_subtree_size[i]; + } + +- MPII_Treealgo_tree_free(&parents_tree); ++ MPIR_Treealgo_tree_free(&parents_tree); + + recv_size *= (lrank == 0) ? recvcount : sendcount; + offset = (lrank == 0) ? recvcount : sendcount; +@@ -188,7 +184,7 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, int sendcount, + + } + +- MPII_Treealgo_tree_free(&my_tree); ++ MPIR_Treealgo_tree_free(&my_tree); + + fn_exit: + MPL_free(child_subtree_size); +@@ -202,10 +198,6 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, int sendcount, + + + /* Non-blocking tree based gather */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Igather_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Igather_intra_tree(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +--- a/src/mpi/coll/igatherv/igatherv.c ++++ b/src/mpi/coll/igatherv/igatherv.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_IGATHERV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_IGATHERV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -72,10 +72,6 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void + #undef MPI_Igatherv + #define MPI_Igatherv PMPI_Igatherv + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igatherv_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igatherv_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -96,10 +92,6 @@ int MPIR_Igatherv_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Datat + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igatherv_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igatherv_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -120,10 +112,6 @@ int MPIR_Igatherv_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Datat + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igatherv_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igatherv_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -131,14 +119,14 @@ int MPIR_Igatherv_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype se + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Igatherv_intra_algo_choice) { +- case MPIR_IGATHERV_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_IGATHERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IGATHERV_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Igatherv_sched_allcomm_linear(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, root, comm_ptr, + s); + break; +- case MPIR_IGATHERV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IGATHERV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -147,14 +135,14 @@ int MPIR_Igatherv_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype se + break; + } + } else { +- switch (MPIR_Igatherv_inter_algo_choice) { +- case MPIR_IGATHERV_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_IGATHERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_IGATHERV_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Igatherv_sched_allcomm_linear(sendbuf, sendcount, sendtype, recvbuf, + recvcounts, displs, recvtype, root, comm_ptr, + s); + break; +- case MPIR_IGATHERV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IGATHERV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -167,10 +155,6 @@ int MPIR_Igatherv_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype se + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igatherv_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -188,10 +172,6 @@ int MPIR_Igatherv_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtyp + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igatherv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -225,10 +205,6 @@ int MPIR_Igatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -248,10 +224,6 @@ int MPIR_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, voi + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Igatherv - Gathers into specified locations from all processes in a group + in a nonblocking way +@@ -444,13 +416,13 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_igatherv", "**mpi_igatherv %p %d %D %p %p %p %D %d %C %p", + sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, + recvtype, root, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/igatherv/igatherv_allcomm_linear.c ++++ b/src/mpi/coll/igatherv/igatherv_allcomm_linear.c +@@ -12,10 +12,6 @@ + * Root receives from all processes, everyone else sends to root. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Igatherv_sched_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Igatherv_sched_allcomm_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -38,9 +34,6 @@ int MPIR_Igatherv_sched_allcomm_linear(const void *sendbuf, int sendcount, MPI_D + comm_size = comm_ptr->remote_size; + + MPIR_Datatype_get_extent_macro(recvtype, extent); +- /* each node can make sure it is not going to overflow aint */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- displs[rank] * extent); + + for (i = 0; i < comm_size; i++) { + if (recvcounts[i]) { +--- a/src/mpi/coll/include/coll_impl.h ++++ b/src/mpi/coll/include/coll_impl.h +@@ -23,610 +23,10 @@ + + extern int MPIR_Nbc_progress_hook_id; + +-/* Enumerate the list of algorithms */ +-typedef enum MPIR_Allgather_intra_algo_t { +- MPIR_ALLGATHER_INTRA_ALGO_AUTO, +- MPIR_ALLGATHER_INTRA_ALGO_BRUCKS, +- MPIR_ALLGATHER_INTRA_ALGO_NB, +- MPIR_ALLGATHER_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_ALLGATHER_INTRA_ALGO_RING, +-} MPIR_Allgather_intra_algo_t; +-/* Have an easy way of finding the algorithm choice later without doing string +- * comparisons */ +-extern MPIR_Allgather_intra_algo_t MPIR_Allgather_intra_algo_choice; +- +-typedef enum MPIR_Allgather_inter_algo_t { +- MPIR_ALLGATHER_INTER_ALGO_AUTO, +- MPIR_ALLGATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_BCAST, +- MPIR_ALLGATHER_INTER_ALGO_NB, +-} MPIR_Allgather_inter_algo_t; +-extern MPIR_Allgather_inter_algo_t MPIR_Allgather_inter_algo_choice; +- +-typedef enum MPIR_Allgatherv_intra_algo_t { +- MPIR_ALLGATHERV_INTRA_ALGO_AUTO, +- MPIR_ALLGATHERV_INTRA_ALGO_BRUCKS, +- MPIR_ALLGATHERV_INTRA_ALGO_NB, +- MPIR_ALLGATHERV_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_ALLGATHERV_INTRA_ALGO_RING, +-} MPIR_Allgatherv_intra_algo_t; +-extern MPIR_Allgatherv_intra_algo_t MPIR_Allgatherv_intra_algo_choice; +- +-typedef enum MPIR_Allgatherv_inter_algo_t { +- MPIR_ALLGATHERV_INTER_ALGO_AUTO, +- MPIR_ALLGATHERV_INTER_ALGO_NB, +- MPIR_ALLGATHERV_INTER_ALGO_REMOTE_GATHER_LOCAL_BCAST, +-} MPIR_Allgatherv_inter_algo_t; +-extern MPIR_Allgatherv_inter_algo_t MPIR_Allgatherv_inter_algo_choice; +- +-typedef enum MPIR_Allreduce_intra_algo_t { +- MPIR_ALLREDUCE_INTRA_ALGO_AUTO, +- MPIR_ALLREDUCE_INTRA_ALGO_NB, +- MPIR_ALLREDUCE_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_ALLREDUCE_INTRA_ALGO_REDUCE_SCATTER_ALLGATHER, +-} MPIR_Allreduce_intra_algo_t; +-extern MPIR_Allreduce_intra_algo_t MPIR_Allreduce_intra_algo_choice; +- +-typedef enum MPIR_Allreduce_inter_algo_t { +- MPIR_ALLREDUCE_INTER_ALGO_AUTO, +- MPIR_ALLREDUCE_INTER_ALGO_NB, +- MPIR_ALLREDUCE_INTER_ALGO_REDUCE_EXCHANGE_BCAST, +-} MPIR_Allreduce_inter_algo_t; +-extern MPIR_Allreduce_inter_algo_t MPIR_Allreduce_inter_algo_choice; +- +-typedef enum MPIR_Alltoall_intra_algo_t { +- MPIR_ALLTOALL_INTRA_ALGO_AUTO, +- MPIR_ALLTOALL_INTRA_ALGO_BRUCKS, +- MPIR_ALLTOALL_INTRA_ALGO_NB, +- MPIR_ALLTOALL_INTRA_ALGO_PAIRWISE, +- MPIR_ALLTOALL_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE, +- MPIR_ALLTOALL_INTRA_ALGO_SCATTERED, +-} MPIR_Alltoall_intra_algo_t; +-extern MPIR_Alltoall_intra_algo_t MPIR_Alltoall_intra_algo_choice; +- +-typedef enum MPIR_Alltoall_inter_algo_t { +- MPIR_ALLTOALL_INTER_ALGO_AUTO, +- MPIR_ALLTOALL_INTER_ALGO_NB, +- MPIR_ALLTOALL_INTER_ALGO_PAIRWISE_EXCHANGE, +-} MPIR_Alltoall_inter_algo_t; +-extern MPIR_Alltoall_inter_algo_t MPIR_Alltoall_inter_algo_choice; +- +-typedef enum MPIR_Alltoallv_intra_algo_t { +- MPIR_ALLTOALLV_INTRA_ALGO_AUTO, +- MPIR_ALLTOALLV_INTRA_ALGO_NB, +- MPIR_ALLTOALLV_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE, +- MPIR_ALLTOALLV_INTRA_ALGO_SCATTERED, +-} MPIR_Alltoallv_intra_algo_t; +-extern MPIR_Alltoallv_intra_algo_t MPIR_Alltoallv_intra_algo_choice; +- +-typedef enum MPIR_Alltoallv_inter_algo_t { +- MPIR_ALLTOALLV_INTER_ALGO_AUTO, +- MPIR_ALLTOALLV_INTER_ALGO_NB, +- MPIR_ALLTOALLV_INTER_ALGO_PAIRWISE_EXCHANGE, +-} MPIR_Alltoallv_inter_algo_t; +-extern MPIR_Alltoallv_inter_algo_t MPIR_Alltoallv_inter_algo_choice; +- +-typedef enum MPIR_Alltoallw_intra_algo_t { +- MPIR_ALLTOALLW_INTRA_ALGO_AUTO, +- MPIR_ALLTOALLW_INTRA_ALGO_NB, +- MPIR_ALLTOALLW_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE, +- MPIR_ALLTOALLW_INTRA_ALGO_SCATTERED, +-} MPIR_Alltoallw_intra_algo_t; +-extern MPIR_Alltoallw_intra_algo_t MPIR_Alltoallw_intra_algo_choice; +- +-typedef enum MPIR_Alltoallw_inter_algo_t { +- MPIR_ALLTOALLW_INTER_ALGO_AUTO, +- MPIR_ALLTOALLW_INTER_ALGO_NB, +- MPIR_ALLTOALLW_INTER_ALGO_PAIRWISE_EXCHANGE, +-} MPIR_Alltoallw_inter_algo_t; +-extern MPIR_Alltoallw_inter_algo_t MPIR_Alltoallw_inter_algo_choice; +- +-typedef enum MPIR_Barrier_intra_algo_t { +- MPIR_BARRIER_INTRA_ALGO_AUTO, +- MPIR_BARRIER_INTRA_ALGO_NB, +- MPIR_BARRIER_INTRA_ALGO_RECURSIVE_DOUBLING, +-} MPIR_Barrier_intra_algo_t; +-extern MPIR_Barrier_intra_algo_t MPIR_Barrier_intra_algo_choice; +- +-typedef enum MPIR_Barrier_inter_algo_t { +- MPIR_BARRIER_INTER_ALGO_AUTO, +- MPIR_BARRIER_INTER_ALGO_BCAST, +- MPIR_BARRIER_INTER_ALGO_NB, +-} MPIR_Barrier_inter_algo_t; +-extern MPIR_Barrier_inter_algo_t MPIR_Barrier_inter_algo_choice; +- +-typedef enum MPIR_Bcast_intra_algo_t { +- MPIR_BCAST_INTRA_ALGO_AUTO, +- MPIR_BCAST_INTRA_ALGO_BINOMIAL, +- MPIR_BCAST_INTRA_ALGO_NB, +- MPIR_BCAST_INTRA_ALGO_SCATTER_RECURSIVE_DOUBLING_ALLGATHER, +- MPIR_BCAST_INTRA_ALGO_SCATTER_RING_ALLGATHER, +-} MPIR_Bcast_intra_algo_t; +-extern MPIR_Bcast_intra_algo_t MPIR_Bcast_intra_algo_choice; +- +-typedef enum MPIR_Bcast_inter_algo_t { +- MPIR_BCAST_INTER_ALGO_AUTO, +- MPIR_BCAST_INTER_ALGO_NB, +- MPIR_BCAST_INTER_ALGO_REMOTE_SEND_LOCAL_BCAST, +-} MPIR_Bcast_inter_algo_t; +-extern MPIR_Bcast_inter_algo_t MPIR_Bcast_inter_algo_choice; +- +-typedef enum MPIR_Exscan_intra_algo_t { +- MPIR_EXSCAN_INTRA_ALGO_AUTO, +- MPIR_EXSCAN_INTRA_ALGO_NB, +- MPIR_EXSCAN_INTRA_ALGO_RECURSIVE_DOUBLING, +-} MPIR_Exscan_intra_algo_t; +-extern MPIR_Exscan_intra_algo_t MPIR_Exscan_intra_algo_choice; +- +-typedef enum MPIR_Gather_intra_algo_t { +- MPIR_GATHER_INTRA_ALGO_AUTO, +- MPIR_GATHER_INTRA_ALGO_BINOMIAL, +- MPIR_GATHER_INTRA_ALGO_NB, +-} MPIR_Gather_intra_algo_t; +-extern MPIR_Gather_intra_algo_t MPIR_Gather_intra_algo_choice; +- +-typedef enum MPIR_Gather_inter_algo_t { +- MPIR_GATHER_INTER_ALGO_AUTO, +- MPIR_GATHER_INTER_ALGO_LINEAR, +- MPIR_GATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_SEND, +- MPIR_GATHER_INTER_ALGO_NB, +-} MPIR_Gather_inter_algo_t; +-extern MPIR_Gather_inter_algo_t MPIR_Gather_inter_algo_choice; +- +-typedef enum MPIR_Gatherv_intra_algo_t { +- MPIR_GATHERV_INTRA_ALGO_AUTO, +- MPIR_GATHERV_INTRA_ALGO_LINEAR, +- MPIR_GATHERV_INTRA_ALGO_NB, +-} MPIR_Gatherv_intra_algo_t; +-extern MPIR_Gatherv_intra_algo_t MPIR_Gatherv_intra_algo_choice; +- +-typedef enum MPIR_Gatherv_inter_algo_t { +- MPIR_GATHERV_INTER_ALGO_AUTO, +- MPIR_GATHERV_INTER_ALGO_LINEAR, +- MPIR_GATHERV_INTER_ALGO_NB, +-} MPIR_Gatherv_inter_algo_t; +-extern MPIR_Gatherv_inter_algo_t MPIR_Gatherv_inter_algo_choice; +- +-typedef enum MPIR_Iallgather_intra_algo_t { +- MPIR_IALLGATHER_INTRA_ALGO_AUTO, +- MPIR_IALLGATHER_INTRA_ALGO_BRUCKS, +- MPIR_IALLGATHER_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_IALLGATHER_INTRA_ALGO_RING, +- MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_DOUBLING, +- MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_HALVING, +- MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_BRUCKS, +-} MPIR_Iallgather_intra_algo_t; +-extern MPIR_Iallgather_intra_algo_t MPIR_Iallgather_intra_algo_choice; +- +-typedef enum MPIR_Iallgather_inter_algo_t { +- MPIR_IALLGATHER_INTER_ALGO_AUTO, +- MPIR_IALLGATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_BCAST, +-} MPIR_Iallgather_inter_algo_t; +-extern MPIR_Iallgather_inter_algo_t MPIR_Iallgather_inter_algo_choice; +- +-typedef enum MPIR_Iallgatherv_intra_algo_t { +- MPIR_IALLGATHERV_INTRA_ALGO_AUTO, +- MPIR_IALLGATHERV_INTRA_ALGO_BRUCKS, +- MPIR_IALLGATHERV_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_IALLGATHERV_INTRA_ALGO_RING, +- MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_DOUBLING, +- MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_HALVING, +- MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RING, +-} MPIR_Iallgatherv_intra_algo_t; +-extern MPIR_Iallgatherv_intra_algo_t MPIR_Iallgatherv_intra_algo_choice; +- +-typedef enum MPIR_Iallgatherv_inter_algo_t { +- MPIR_IALLGATHERV_INTER_ALGO_AUTO, +- MPIR_IALLGATHERV_INTER_ALGO_REMOTE_GATHER_LOCAL_BCAST, +-} MPIR_Iallgatherv_inter_algo_t; +-extern MPIR_Iallgatherv_inter_algo_t MPIR_Iallgatherv_inter_algo_choice; +- +-typedef enum MPIR_Iallreduce_intra_algo_t { +- MPIR_IALLREDUCE_INTRA_ALGO_AUTO, +- MPIR_IALLREDUCE_INTRA_ALGO_NAIVE, +- MPIR_IALLREDUCE_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_IALLREDUCE_INTRA_ALGO_REDUCE_SCATTER_ALLGATHER, +- MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_RECEXCH_SINGLE_BUFFER, +- MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_RECEXCH_MULTIPLE_BUFFER, +- MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_TREE_KARY, +- MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_TREE_KNOMIAL, +-} MPIR_Iallreduce_intra_algo_t; +-extern MPIR_Iallreduce_intra_algo_t MPIR_Iallreduce_intra_algo_choice; +- +-typedef enum MPIR_Iallreduce_inter_algo_t { +- MPIR_IALLREDUCE_INTER_ALGO_AUTO, +- MPIR_IALLREDUCE_INTER_ALGO_REMOTE_REDUCE_LOCAL_BCAST, +-} MPIR_Iallreduce_inter_algo_t; +-extern MPIR_Iallreduce_inter_algo_t MPIR_Iallreduce_inter_algo_choice; +- +-typedef enum MPIR_Ialltoall_intra_algo_t { +- MPIR_IALLTOALL_INTRA_ALGO_AUTO, +- MPIR_IALLTOALL_INTRA_ALGO_BRUCKS, +- MPIR_IALLTOALL_INTRA_ALGO_INPLACE, +- MPIR_IALLTOALL_INTRA_ALGO_PAIRWISE, +- MPIR_IALLTOALL_INTRA_ALGO_PERMUTED_SENDRECV, +-} MPIR_Ialltoall_intra_algo_t; +-extern MPIR_Ialltoall_intra_algo_t MPIR_Ialltoall_intra_algo_choice; +- +-typedef enum MPIR_Ialltoall_inter_algo_t { +- MPIR_IALLTOALL_INTER_ALGO_AUTO, +- MPIR_IALLTOALL_INTER_ALGO_PAIRWISE_EXCHANGE, +-} MPIR_Ialltoall_inter_algo_t; +-extern MPIR_Ialltoall_inter_algo_t MPIR_Ialltoall_inter_algo_choice; +- +-typedef enum MPIR_Ialltoallv_intra_algo_t { +- MPIR_IALLTOALLV_INTRA_ALGO_AUTO, +- MPIR_IALLTOALLV_INTRA_ALGO_BLOCKED, +- MPIR_IALLTOALLV_INTRA_ALGO_INPLACE, +-} MPIR_Ialltoallv_intra_algo_t; +-extern MPIR_Ialltoallv_intra_algo_t MPIR_Ialltoallv_intra_algo_choice; +- +-typedef enum MPIR_Ialltoallv_inter_algo_t { +- MPIR_IALLTOALLV_INTER_ALGO_AUTO, +- MPIR_IALLTOALLV_INTER_ALGO_PAIRWISE_EXCHANGE, +-} MPIR_Ialltoallv_inter_algo_t; +-extern MPIR_Ialltoallv_inter_algo_t MPIR_Ialltoallv_inter_algo_choice; +- +-typedef enum MPIR_Ialltoallw_intra_algo_t { +- MPIR_IALLTOALLW_INTRA_ALGO_AUTO, +- MPIR_IALLTOALLW_INTRA_ALGO_BLOCKED, +- MPIR_IALLTOALLW_INTRA_ALGO_INPLACE, +-} MPIR_Ialltoallw_intra_algo_t; +-extern MPIR_Ialltoallw_intra_algo_t MPIR_Ialltoallw_intra_algo_choice; +- +-typedef enum MPIR_Ialltoallw_inter_algo_t { +- MPIR_IALLTOALLW_INTER_ALGO_AUTO, +- MPIR_IALLTOALLW_INTER_ALGO_PAIRWISE_EXCHANGE, +-} MPIR_Ialltoallw_inter_algo_t; +-extern MPIR_Ialltoallw_inter_algo_t MPIR_Ialltoallw_inter_algo_choice; +- +-typedef enum MPIR_Ibarrier_intra_algo_t { +- MPIR_IBARRIER_INTRA_ALGO_AUTO, +- MPIR_IBARRIER_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_IBARRIER_INTRA_ALGO_GENTRAN_RECEXCH, +-} MPIR_Ibarrier_intra_algo_t; +-extern MPIR_Ibarrier_intra_algo_t MPIR_Ibarrier_intra_algo_choice; +- +-typedef enum MPIR_Ibarrier_inter_algo_t { +- MPIR_IBARRIER_INTER_ALGO_AUTO, +- MPIR_IBARRIER_INTER_ALGO_BCAST, +-} MPIR_Ibarrier_inter_algo_t; +-extern MPIR_Ibarrier_inter_algo_t MPIR_Ibarrier_inter_algo_choice; +- +-typedef enum MPIR_Ibcast_intra_algo_t { +- MPIR_IBCAST_INTRA_ALGO_AUTO, +- MPIR_IBCAST_INTRA_ALGO_BINOMIAL, +- MPIR_IBCAST_INTRA_ALGO_SCATTER_RECURSIVE_DOUBLING_ALLGATHER, +- MPIR_IBCAST_INTRA_ALGO_SCATTER_RING_ALLGATHER, +- MPIR_IBCAST_INTRA_ALGO_GENTRAN_TREE, +- MPIR_IBCAST_INTRA_ALGO_GENTRAN_SCATTER_RECEXCH_ALLGATHER, +- MPIR_IBCAST_INTRA_ALGO_GENTRAN_RING, +-} MPIR_Ibcast_intra_algo_t; +-extern MPIR_Ibcast_intra_algo_t MPIR_Ibcast_intra_algo_choice; +- +-typedef enum MPIR_Ibcast_inter_algo_t { +- MPIR_IBCAST_INTER_ALGO_AUTO, +- MPIR_IBCAST_INTER_ALGO_FLAT, +-} MPIR_Ibcast_inter_algo_t; +-extern MPIR_Ibcast_inter_algo_t MPIR_Ibcast_inter_algo_choice; +- +-typedef enum MPIR_Iexscan_intra_algo_t { +- MPIR_IEXSCAN_INTRA_ALGO_AUTO, +- MPIR_IEXSCAN_INTRA_ALGO_RECURSIVE_DOUBLING, +-} MPIR_Iexscan_intra_algo_t; +-extern MPIR_Iexscan_intra_algo_t MPIR_Iexscan_intra_algo_choice; +- +-typedef enum MPIR_Igather_intra_algo_t { +- MPIR_IGATHER_INTRA_ALGO_AUTO, +- MPIR_IGATHER_INTRA_ALGO_BINOMIAL, +- MPIR_IGATHER_INTRA_ALGO_TREE, +-} MPIR_Igather_intra_algo_t; +-extern MPIR_Igather_intra_algo_t MPIR_Igather_intra_algo_choice; +- +-typedef enum MPIR_Igather_inter_algo_t { +- MPIR_IGATHER_INTER_ALGO_AUTO, +- MPIR_IGATHER_INTER_ALGO_LONG, +- MPIR_IGATHER_INTER_ALGO_SHORT, +-} MPIR_Igather_inter_algo_t; +-extern MPIR_Igather_inter_algo_t MPIR_Igather_inter_algo_choice; +- +-typedef enum MPIR_Igatherv_intra_algo_t { +- MPIR_IGATHERV_INTRA_ALGO_AUTO, +- MPIR_IGATHERV_INTRA_ALGO_LINEAR, +-} MPIR_Igatherv_intra_algo_t; +-extern MPIR_Igatherv_intra_algo_t MPIR_Igatherv_intra_algo_choice; +- +-typedef enum MPIR_Igatherv_inter_algo_t { +- MPIR_IGATHERV_INTER_ALGO_AUTO, +- MPIR_IGATHERV_INTER_ALGO_LINEAR, +-} MPIR_Igatherv_inter_algo_t; +-extern MPIR_Igatherv_inter_algo_t MPIR_Igatherv_inter_algo_choice; +- +-typedef enum MPIR_Ineighbor_allgather_intra_algo_t { +- MPIR_INEIGHBOR_ALLGATHER_INTRA_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLGATHER_INTRA_ALGO_LINEAR, +-} MPIR_Ineighbor_allgather_intra_algo_t; +-extern MPIR_Ineighbor_allgather_intra_algo_t MPIR_Ineighbor_allgather_intra_algo_choice; +- +-typedef enum MPIR_Ineighbor_allgather_inter_algo_t { +- MPIR_INEIGHBOR_ALLGATHER_INTER_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLGATHER_INTER_ALGO_LINEAR, +-} MPIR_Ineighbor_allgather_inter_algo_t; +-extern MPIR_Ineighbor_allgather_inter_algo_t MPIR_Ineighbor_allgather_inter_algo_choice; +- +-typedef enum MPIR_Ineighbor_allgatherv_intra_algo_t { +- MPIR_INEIGHBOR_ALLGATHERV_INTRA_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLGATHERV_INTRA_ALGO_LINEAR, +-} MPIR_Ineighbor_allgatherv_intra_algo_t; +-extern MPIR_Ineighbor_allgatherv_intra_algo_t MPIR_Ineighbor_allgatherv_intra_algo_choice; +- +-typedef enum MPIR_Ineighbor_allgatherv_inter_algo_t { +- MPIR_INEIGHBOR_ALLGATHERV_INTER_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLGATHERV_INTER_ALGO_LINEAR, +-} MPIR_Ineighbor_allgatherv_inter_algo_t; +-extern MPIR_Ineighbor_allgatherv_inter_algo_t MPIR_Ineighbor_allgatherv_inter_algo_choice; +- +-typedef enum MPIR_Ineighbor_alltoall_intra_algo_t { +- MPIR_INEIGHBOR_ALLTOALL_INTRA_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLTOALL_INTRA_ALGO_LINEAR, +-} MPIR_Ineighbor_alltoall_intra_algo_t; +-extern MPIR_Ineighbor_alltoall_intra_algo_t MPIR_Ineighbor_alltoall_intra_algo_choice; +- +-typedef enum MPIR_Ineighbor_alltoall_inter_algo_t { +- MPIR_INEIGHBOR_ALLTOALL_INTER_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLTOALL_INTER_ALGO_LINEAR, +-} MPIR_Ineighbor_alltoall_inter_algo_t; +-extern MPIR_Ineighbor_alltoall_inter_algo_t MPIR_Ineighbor_alltoall_inter_algo_choice; +- +-typedef enum MPIR_Ineighbor_alltoallv_intra_algo_t { +- MPIR_INEIGHBOR_ALLTOALLV_INTRA_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLTOALLV_INTRA_ALGO_LINEAR, +-} MPIR_Ineighbor_alltoallv_intra_algo_t; +-extern MPIR_Ineighbor_alltoallv_intra_algo_t MPIR_Ineighbor_alltoallv_intra_algo_choice; +- +-typedef enum MPIR_Ineighbor_alltoallv_inter_algo_t { +- MPIR_INEIGHBOR_ALLTOALLV_INTER_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLTOALLV_INTER_ALGO_LINEAR, +-} MPIR_Ineighbor_alltoallv_inter_algo_t; +-extern MPIR_Ineighbor_alltoallv_inter_algo_t MPIR_Ineighbor_alltoallv_inter_algo_choice; +- +-typedef enum MPIR_Ineighbor_alltoallw_intra_algo_t { +- MPIR_INEIGHBOR_ALLTOALLW_INTRA_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLTOALLW_INTRA_ALGO_LINEAR, +-} MPIR_Ineighbor_alltoallw_intra_algo_t; +-extern MPIR_Ineighbor_alltoallw_intra_algo_t MPIR_Ineighbor_alltoallw_intra_algo_choice; +- +-typedef enum MPIR_Ineighbor_alltoallw_inter_algo_t { +- MPIR_INEIGHBOR_ALLTOALLW_INTER_ALGO_AUTO, +- MPIR_INEIGHBOR_ALLTOALLW_INTER_ALGO_LINEAR, +-} MPIR_Ineighbor_alltoallw_inter_algo_t; +-extern MPIR_Ineighbor_alltoallw_inter_algo_t MPIR_Ineighbor_alltoallw_inter_algo_choice; +- +-typedef enum MPIR_Ireduce_scatter_intra_algo_t { +- MPIR_IREDUCE_SCATTER_INTRA_ALGO_AUTO, +- MPIR_IREDUCE_SCATTER_INTRA_ALGO_NONCOMMUTATIVE, +- MPIR_IREDUCE_SCATTER_INTRA_ALGO_PAIRWISE, +- MPIR_IREDUCE_SCATTER_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_IREDUCE_SCATTER_INTRA_ALGO_RECURSIVE_HALVING, +- MPIR_IREDUCE_SCATTER_INTRA_ALGO_GENTRAN_RECEXCH, +-} MPIR_Ireduce_scatter_intra_algo_t; +-extern MPIR_Ireduce_scatter_intra_algo_t MPIR_Ireduce_scatter_intra_algo_choice; ++extern MPIR_Tree_type_t MPIR_Iallreduce_tree_type; + extern MPIR_Tree_type_t MPIR_Ireduce_tree_type; + extern MPIR_Tree_type_t MPIR_Ibcast_tree_type; + +-typedef enum MPIR_Ireduce_scatter_inter_algo_t { +- MPIR_IREDUCE_SCATTER_INTER_ALGO_AUTO, +- MPIR_IREDUCE_SCATTER_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTERV, +-} MPIR_Ireduce_scatter_inter_algo_t; +-extern MPIR_Ireduce_scatter_inter_algo_t MPIR_Ireduce_scatter_inter_algo_choice; +- +-typedef enum MPIR_Ireduce_scatter_block_intra_algo_t { +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_AUTO, +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_NONCOMMUTATIVE, +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_PAIRWISE, +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_HALVING, +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_GENTRAN_RECEXCH, +-} MPIR_Ireduce_scatter_block_intra_algo_t; +-extern MPIR_Ireduce_scatter_block_intra_algo_t MPIR_Ireduce_scatter_block_intra_algo_choice; +- +-typedef enum MPIR_Ireduce_scatter_block_inter_algo_t { +- MPIR_IREDUCE_SCATTER_BLOCK_INTER_ALGO_AUTO, +- MPIR_IREDUCE_SCATTER_BLOCK_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTERV, +-} MPIR_Ireduce_scatter_block_inter_algo_t; +-extern MPIR_Ireduce_scatter_block_inter_algo_t MPIR_Ireduce_scatter_block_inter_algo_choice; +- +-typedef enum MPIR_Ireduce_intra_algo_t { +- MPIR_IREDUCE_INTRA_ALGO_AUTO, +- MPIR_IREDUCE_INTRA_ALGO_BINOMIAL, +- MPIR_IREDUCE_INTRA_ALGO_REDUCE_SCATTER_GATHER, +- MPIR_IREDUCE_INTRA_ALGO_GENTRAN_TREE, +- MPIR_IREDUCE_INTRA_ALGO_GENTRAN_RING, +-} MPIR_Ireduce_intra_algo_t; +-extern MPIR_Ireduce_intra_algo_t MPIR_Ireduce_intra_algo_choice; +- +-typedef enum MPIR_Ireduce_inter_algo_t { +- MPIR_IREDUCE_INTER_ALGO_AUTO, +- MPIR_IREDUCE_INTER_ALGO_LOCAL_REDUCE_REMOTE_SEND, +-} MPIR_Ireduce_inter_algo_t; +-extern MPIR_Ireduce_inter_algo_t MPIR_Ireduce_inter_algo_choice; +- +-typedef enum MPIR_Iscan_intra_algo_t { +- MPIR_ISCAN_INTRA_ALGO_AUTO, +- MPIR_ISCAN_INTRA_ALGO_RECURSIVE_DOUBLING, +-} MPIR_Iscan_intra_algo_t; +-extern MPIR_Iscan_intra_algo_t MPIR_Iscan_intra_algo_choice; +- +-typedef enum MPIR_Iscatter_intra_algo_t { +- MPIR_ISCATTER_INTRA_ALGO_AUTO, +- MPIR_ISCATTER_INTRA_ALGO_BINOMIAL, +- MPIR_ISCATTER_INTRA_ALGO_TREE +-} MPIR_Iscatter_intra_algo_t; +-extern MPIR_Iscatter_intra_algo_t MPIR_Iscatter_intra_algo_choice; +- +-typedef enum MPIR_Iscatter_inter_algo_t { +- MPIR_ISCATTER_INTER_ALGO_AUTO, +- MPIR_ISCATTER_INTER_ALGO_LINEAR, +- MPIR_ISCATTER_INTER_ALGO_REMOTE_SEND_LOCAL_SCATTER, +-} MPIR_Iscatter_inter_algo_t; +-extern MPIR_Iscatter_inter_algo_t MPIR_Iscatter_inter_algo_choice; +- +-typedef enum MPIR_Iscatterv_intra_algo_t { +- MPIR_ISCATTERV_INTRA_ALGO_AUTO, +- MPIR_ISCATTERV_INTRA_ALGO_LINEAR, +-} MPIR_Iscatterv_intra_algo_t; +-extern MPIR_Iscatterv_intra_algo_t MPIR_Iscatterv_intra_algo_choice; +- +-typedef enum MPIR_Iscatterv_inter_algo_t { +- MPIR_ISCATTERV_INTER_ALGO_AUTO, +- MPIR_ISCATTERV_INTER_ALGO_LINEAR, +-} MPIR_Iscatterv_inter_algo_t; +-extern MPIR_Iscatterv_inter_algo_t MPIR_Iscatterv_inter_algo_choice; +- +-typedef enum MPIR_Neighbor_allgather_intra_algo_t { +- MPIR_NEIGHBOR_ALLGATHER_INTRA_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLGATHER_INTRA_ALGO_NB, +-} MPIR_Neighbor_allgather_intra_algo_t; +-extern MPIR_Neighbor_allgather_intra_algo_t MPIR_Neighbor_allgather_intra_algo_choice; +- +-typedef enum MPIR_Neighbor_allgather_inter_algo_t { +- MPIR_NEIGHBOR_ALLGATHER_INTER_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLGATHER_INTER_ALGO_NB, +-} MPIR_Neighbor_allgather_inter_algo_t; +-extern MPIR_Neighbor_allgather_inter_algo_t MPIR_Neighbor_allgather_inter_algo_choice; +- +-typedef enum MPIR_Neighbor_allgatherv_intra_algo_t { +- MPIR_NEIGHBOR_ALLGATHERV_INTRA_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLGATHERV_INTRA_ALGO_NB, +-} MPIR_Neighbor_allgatherv_intra_algo_t; +-extern MPIR_Neighbor_allgatherv_intra_algo_t MPIR_Neighbor_allgatherv_intra_algo_choice; +- +-typedef enum MPIR_Neighbor_allgatherv_inter_algo_t { +- MPIR_NEIGHBOR_ALLGATHERV_INTER_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLGATHERV_INTER_ALGO_NB, +-} MPIR_Neighbor_allgatherv_inter_algo_t; +-extern MPIR_Neighbor_allgatherv_inter_algo_t MPIR_Neighbor_allgatherv_inter_algo_choice; +- +-typedef enum MPIR_Neighbor_alltoall_intra_algo_t { +- MPIR_NEIGHBOR_ALLTOALL_INTRA_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLTOALL_INTRA_ALGO_NB, +-} MPIR_Neighbor_alltoall_intra_algo_t; +-extern MPIR_Neighbor_alltoall_intra_algo_t MPIR_Neighbor_alltoall_intra_algo_choice; +- +-typedef enum MPIR_Neighbor_alltoall_inter_algo_t { +- MPIR_NEIGHBOR_ALLTOALL_INTER_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLTOALL_INTER_ALGO_NB, +-} MPIR_Neighbor_alltoall_inter_algo_t; +-extern MPIR_Neighbor_alltoall_inter_algo_t MPIR_Neighbor_alltoall_inter_algo_choice; +- +-typedef enum MPIR_Neighbor_alltoallv_intra_algo_t { +- MPIR_NEIGHBOR_ALLTOALLV_INTRA_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLTOALLV_INTRA_ALGO_NB, +-} MPIR_Neighbor_alltoallv_intra_algo_t; +-extern MPIR_Neighbor_alltoallv_intra_algo_t MPIR_Neighbor_alltoallv_intra_algo_choice; +- +-typedef enum MPIR_Neighbor_alltoallv_inter_algo_t { +- MPIR_NEIGHBOR_ALLTOALLV_INTER_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLTOALLV_INTER_ALGO_NB, +-} MPIR_Neighbor_alltoallv_inter_algo_t; +-extern MPIR_Neighbor_alltoallv_inter_algo_t MPIR_Neighbor_alltoallv_inter_algo_choice; +- +-typedef enum MPIR_Neighbor_alltoallw_intra_algo_t { +- MPIR_NEIGHBOR_ALLTOALLW_INTRA_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLTOALLW_INTRA_ALGO_NB, +-} MPIR_Neighbor_alltoallw_intra_algo_t; +-extern MPIR_Neighbor_alltoallw_intra_algo_t MPIR_Neighbor_alltoallw_intra_algo_choice; +- +-typedef enum MPIR_Neighbor_alltoallw_inter_algo_t { +- MPIR_NEIGHBOR_ALLTOALLW_INTER_ALGO_AUTO, +- MPIR_NEIGHBOR_ALLTOALLW_INTER_ALGO_NB, +-} MPIR_Neighbor_alltoallw_inter_algo_t; +-extern MPIR_Neighbor_alltoallw_inter_algo_t MPIR_Neighbor_alltoallw_inter_algo_choice; +- +-typedef enum MPIR_Reduce_scatter_intra_algo_t { +- MPIR_REDUCE_SCATTER_INTRA_ALGO_AUTO, +- MPIR_REDUCE_SCATTER_INTRA_ALGO_NB, +- MPIR_REDUCE_SCATTER_INTRA_ALGO_NONCOMMUTATIVE, +- MPIR_REDUCE_SCATTER_INTRA_ALGO_PAIRWISE, +- MPIR_REDUCE_SCATTER_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_REDUCE_SCATTER_INTRA_ALGO_RECURSIVE_HALVING, +-} MPIR_Reduce_scatter_intra_algo_t; +-extern MPIR_Reduce_scatter_intra_algo_t MPIR_Reduce_scatter_intra_algo_choice; +- +-typedef enum MPIR_Reduce_scatter_inter_algo_t { +- MPIR_REDUCE_SCATTER_INTER_ALGO_AUTO, +- MPIR_REDUCE_SCATTER_INTER_ALGO_NB, +- MPIR_REDUCE_SCATTER_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTER, +-} MPIR_Reduce_scatter_inter_algo_t; +-extern MPIR_Reduce_scatter_inter_algo_t MPIR_Reduce_scatter_inter_algo_choice; +- +-typedef enum MPIR_Reduce_scatter_block_intra_algo_t { +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_AUTO, +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_NB, +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_NONCOMMUTATIVE, +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_PAIRWISE, +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_DOUBLING, +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_HALVING, +-} MPIR_Reduce_scatter_block_intra_algo_t; +-extern MPIR_Reduce_scatter_block_intra_algo_t MPIR_Reduce_scatter_block_intra_algo_choice; +- +-typedef enum MPIR_Reduce_scatter_block_inter_algo_t { +- MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_AUTO, +- MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_NB, +- MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTER, +-} MPIR_Reduce_scatter_block_inter_algo_t; +-extern MPIR_Reduce_scatter_block_inter_algo_t MPIR_Reduce_scatter_block_inter_algo_choice; +- +-typedef enum MPIR_Reduce_intra_algo_t { +- MPIR_REDUCE_INTRA_ALGO_AUTO, +- MPIR_REDUCE_INTRA_ALGO_BINOMIAL, +- MPIR_REDUCE_INTRA_ALGO_NB, +- MPIR_REDUCE_INTRA_ALGO_REDUCE_SCATTER_GATHER, +-} MPIR_Reduce_intra_algo_t; +-extern MPIR_Reduce_intra_algo_t MPIR_Reduce_intra_algo_choice; +- +-typedef enum MPIR_Reduce_inter_algo_t { +- MPIR_REDUCE_INTER_ALGO_AUTO, +- MPIR_REDUCE_INTER_ALGO_LOCAL_REDUCE_REMOTE_SEND, +- MPIR_REDUCE_INTER_ALGO_NB, +-} MPIR_Reduce_inter_algo_t; +-extern MPIR_Reduce_inter_algo_t MPIR_Reduce_inter_algo_choice; +- +-typedef enum MPIR_Scan_intra_algo_t { +- MPIR_SCAN_INTRA_ALGO_AUTO, +- MPIR_SCAN_INTRA_ALGO_NB, +- MPIR_SCAN_INTRA_ALGO_RECURSIVE_DOUBLING, +-} MPIR_Scan_intra_algo_t; +-extern MPIR_Scan_intra_algo_t MPIR_Scan_intra_algo_choice; +- +-typedef enum MPIR_Scatter_intra_algo_t { +- MPIR_SCATTER_INTRA_ALGO_AUTO, +- MPIR_SCATTER_INTRA_ALGO_BINOMIAL, +- MPIR_SCATTER_INTRA_ALGO_NB, +-} MPIR_Scatter_intra_algo_t; +-extern MPIR_Scatter_intra_algo_t MPIR_Scatter_intra_algo_choice; +- +-typedef enum MPIR_Scatter_inter_algo_t { +- MPIR_SCATTER_INTER_ALGO_AUTO, +- MPIR_SCATTER_INTER_ALGO_LINEAR, +- MPIR_SCATTER_INTER_ALGO_NB, +- MPIR_SCATTER_INTER_ALGO_REMOTE_SEND_LOCAL_SCATTER, +-} MPIR_Scatter_inter_algo_t; +-extern MPIR_Scatter_inter_algo_t MPIR_Scatter_inter_algo_choice; +- +-typedef enum MPIR_Scatterv_intra_algo_t { +- MPIR_SCATTERV_INTRA_ALGO_AUTO, +- MPIR_SCATTERV_INTRA_ALGO_LINEAR, +- MPIR_SCATTERV_INTRA_ALGO_NB, +-} MPIR_Scatterv_intra_algo_t; +-extern MPIR_Scatterv_intra_algo_t MPIR_Scatterv_intra_algo_choice; +- +-typedef enum MPIR_Scatterv_inter_algo_t { +- MPIR_SCATTERV_INTER_ALGO_AUTO, +- MPIR_SCATTERV_INTER_ALGO_LINEAR, +- MPIR_SCATTERV_INTER_ALGO_NB, +-} MPIR_Scatterv_inter_algo_t; +-extern MPIR_Scatterv_inter_algo_t MPIR_Scatterv_inter_algo_choice; +- + /* Function to initialze communicators for collectives */ + int MPIR_Coll_comm_init(MPIR_Comm * comm); + +--- a/src/mpi/coll/ineighbor_allgather/Makefile.mk ++++ b/src/mpi/coll/ineighbor_allgather/Makefile.mk +@@ -16,4 +16,6 @@ mpi_sources += \ + src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c + + mpi_core_sources += \ +- src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c ++ src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c \ ++ src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c \ ++ src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c +--- a/src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c ++++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather.c +@@ -12,27 +12,29 @@ + cvars: + - name : MPIR_CVAR_INEIGHBOR_ALLGATHER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_allgather algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLGATHER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_allgather algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLGATHER_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -72,10 +74,6 @@ int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sen + #undef MPI_Ineighbor_allgather + #define MPI_Ineighbor_allgather PMPI_Ineighbor_allgather + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgather_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgather_sched_intra_auto(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -96,10 +94,6 @@ int MPIR_Ineighbor_allgather_sched_intra_auto(const void *sendbuf, int sendcount + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgather_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgather_sched_inter_auto(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -120,10 +114,6 @@ int MPIR_Ineighbor_allgather_sched_inter_auto(const void *sendbuf, int sendcount + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgather_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgather_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -131,14 +121,14 @@ int MPIR_Ineighbor_allgather_sched_impl(const void *sendbuf, int sendcount, MPI_ + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Ineighbor_allgather_intra_algo_choice) { +- case MPIR_INEIGHBOR_ALLGATHER_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLGATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLGATHER_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_allgather_sched_allcomm_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLGATHER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLGATHER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ineighbor_allgather_sched_intra_auto(sendbuf, sendcount, sendtype, +@@ -147,14 +137,14 @@ int MPIR_Ineighbor_allgather_sched_impl(const void *sendbuf, int sendcount, MPI_ + break; + } + } else { +- switch (MPIR_Ineighbor_allgather_inter_algo_choice) { +- case MPIR_INEIGHBOR_ALLGATHER_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLGATHER_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLGATHER_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_allgather_sched_allcomm_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLGATHER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLGATHER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ineighbor_allgather_sched_inter_auto(sendbuf, sendcount, sendtype, +@@ -167,10 +157,6 @@ int MPIR_Ineighbor_allgather_sched_impl(const void *sendbuf, int sendcount, MPI_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -188,10 +174,6 @@ int MPIR_Ineighbor_allgather_sched(const void *sendbuf, int sendcount, MPI_Datat + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgather_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgather_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -202,6 +184,47 @@ int MPIR_Ineighbor_allgather_impl(const void *sendbuf, int sendcount, + MPIR_Sched_t s = MPIR_SCHED_NULL; + + *request = NULL; ++ /* If the user picks one of the transport-enabled algorithms, branch there ++ * before going down to the MPIR_Sched-based algorithms. */ ++ /* TODO - Eventually the intention is to replace all of the ++ * MPIR_Sched-based algorithms with transport-enabled algorithms, but that ++ * will require sufficient performance testing and replacement algorithms. */ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ /* intracommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLGATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLGATHER_INTRA_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_allgather_allcomm_gentran_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } else { ++ /* intercommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLGATHER_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLGATHER_INTER_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_allgather_allcomm_gentran_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } ++ ++ /* If the user doesn't pick a transport-enabled algorithm, go to the old ++ * sched function. */ + + mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); + if (mpi_errno) +@@ -224,10 +247,6 @@ int MPIR_Ineighbor_allgather_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -248,10 +267,6 @@ int MPIR_Ineighbor_allgather(const void *sendbuf, int sendcount, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ineighbor_allgather - Nonblocking version of MPI_Neighbor_allgather. + +@@ -366,13 +381,13 @@ int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sen + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ineighbor_allgather", + "**mpi_ineighbor_allgather %p %d %D %p %d %D %C %p", sendbuf, + sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_gentran_linear.c +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ineighbor_allgather_tsp_linear_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ineighbor_allgather_allcomm_gentran_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ineighbor_allgather_allcomm_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c ++++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_linear.c +@@ -13,10 +13,6 @@ + * neighbor. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgather_sched_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgather_sched_allcomm_linear(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -31,10 +27,6 @@ int MPIR_Ineighbor_allgather_sched_allcomm_linear(const void *sendbuf, int sendc + + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- /* This is the largest offset we add to recvbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (comm_ptr->local_size * recvcount * recvtype_extent)); +- + mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_gentran_algos.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++#include "tsp_gentran.h" ++ ++/* instantiate ibcast tree algorithms for the gentran transport */ ++#include "ineighbor_allgather_tsp_linear_algos_prototypes.h" ++#include "ineighbor_allgather_tsp_linear_algos.h" ++#include "ineighbor_allgather_tsp_linear_algos_undef.h" ++ ++#include "tsp_undef.h" +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_tsp_linear_algos.h +@@ -0,0 +1,111 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLGATHER_TSP_LINEAR_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "algo_common.h" ++#include "treealgo.h" ++#include "tsp_namespace_def.h" ++ ++/* Routine to schedule a pipelined tree based broadcast */ ++int MPIR_TSP_Ineighbor_allgather_sched_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int indegree, outdegree, weighted; ++ int k, l; ++ int *srcs, *dsts; ++ int tag; ++ MPI_Aint recvtype_extent; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHER_SCHED_INTRA_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHER_SCHED_INTRA_LINEAR); ++ ++ MPIR_CHKLMEM_DECL(2); ++ ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ ++ mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_CHKLMEM_MALLOC(srcs, int *, indegree * sizeof(int), mpi_errno, "srcs", MPL_MEM_COMM); ++ MPIR_CHKLMEM_MALLOC(dsts, int *, outdegree * sizeof(int), mpi_errno, "dsts", MPL_MEM_COMM); ++ mpi_errno = MPIR_Topo_canon_nhb(comm_ptr, ++ indegree, srcs, MPI_UNWEIGHTED, ++ outdegree, dsts, MPI_UNWEIGHTED); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ for (k = 0; k < outdegree; ++k) { ++ MPIR_TSP_sched_isend(sendbuf, sendcount, sendtype, dsts[k], tag, comm_ptr, sched, 0, NULL); ++ } ++ ++ for (l = 0; l < indegree; ++l) { ++ char *rb = ((char *) recvbuf) + l * recvcount * recvtype_extent; ++ MPIR_TSP_sched_irecv(rb, recvcount, recvtype, srcs[l], tag, comm_ptr, sched, 0, NULL); ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHER_SCHED_INTRA_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/* Non-blocking linear algo based neighbor_allgather */ ++int MPIR_TSP_Ineighbor_allgather_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHER_INTRA_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHER_INTRA_LINEAR); ++ ++ /* generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_Assert(sched != NULL); ++ MPIR_TSP_sched_create(sched); ++ ++ /* schedule pipelined tree algo */ ++ mpi_errno = MPIR_TSP_Ineighbor_allgather_sched_allcomm_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm_ptr, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHER_INTRA_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_tsp_linear_algos_prototypes.h +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IBCAST_TSP_TREE_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Ineighbor_allgather_allcomm_linear ++#define MPIR_TSP_Ineighbor_allgather_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_allgather_allcomm_linear) ++#undef MPIR_TSP_Ineighor_allgather_sched_allcomm_linear ++#define MPIR_TSP_Ineighbor_allgather_sched_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_allgather_sched_allcomm_linear) ++ ++int MPIR_TSP_Ineighbor_allgather_sched_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched); ++int MPIR_TSP_Ineighbor_allgather_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_tsp_linear_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLGATHER_TSP_LINEAR_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Ineighbor_allgather_allcomm_linear ++#undef MPIR_TSP_Ineighbor_allgather_sched_allcomm_linear +--- a/src/mpi/coll/ineighbor_allgatherv/Makefile.mk ++++ b/src/mpi/coll/ineighbor_allgatherv/Makefile.mk +@@ -16,4 +16,6 @@ mpi_sources += \ + src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c + + mpi_core_sources += \ +- src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c ++ src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c \ ++ src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c \ ++ src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c +--- a/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c ++++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv.c +@@ -12,27 +12,29 @@ + cvars: + - name : MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_allgatherv algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_allgatherv algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLGATHERV_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -72,10 +74,6 @@ int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype se + #undef MPI_Ineighbor_allgatherv + #define MPI_Ineighbor_allgatherv PMPI_Ineighbor_allgatherv + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgatherv_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgatherv_sched_intra_auto(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -97,10 +95,6 @@ int MPIR_Ineighbor_allgatherv_sched_intra_auto(const void *sendbuf, int sendcoun + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgatherv_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgatherv_sched_inter_auto(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -122,10 +116,6 @@ int MPIR_Ineighbor_allgatherv_sched_inter_auto(const void *sendbuf, int sendcoun + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgatherv_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgatherv_sched_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -135,14 +125,14 @@ int MPIR_Ineighbor_allgatherv_sched_impl(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Ineighbor_allgatherv_intra_algo_choice) { +- case MPIR_INEIGHBOR_ALLGATHERV_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_allgatherv_sched_allcomm_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLGATHERV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ineighbor_allgatherv_sched_intra_auto(sendbuf, sendcount, sendtype, +@@ -151,14 +141,14 @@ int MPIR_Ineighbor_allgatherv_sched_impl(const void *sendbuf, int sendcount, + break; + } + } else { +- switch (MPIR_Ineighbor_allgatherv_inter_algo_choice) { +- case MPIR_INEIGHBOR_ALLGATHERV_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_allgatherv_sched_allcomm_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLGATHERV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ineighbor_allgatherv_sched_inter_auto(sendbuf, sendcount, sendtype, +@@ -171,10 +161,6 @@ int MPIR_Ineighbor_allgatherv_sched_impl(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgatherv_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -193,10 +179,6 @@ int MPIR_Ineighbor_allgatherv_sched(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgatherv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgatherv_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -208,6 +190,47 @@ int MPIR_Ineighbor_allgatherv_impl(const void *sendbuf, int sendcount, + MPIR_Sched_t s = MPIR_SCHED_NULL; + + *request = NULL; ++ /* If the user picks one of the transport-enabled algorithms, branch there ++ * before going down to the MPIR_Sched-based algorithms. */ ++ /* TODO - Eventually the intention is to replace all of the ++ * MPIR_Sched-based algorithms with transport-enabled algorithms, but that ++ * will require sufficient performance testing and replacement algorithms. */ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ /* intracommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTRA_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_allgatherv_allcomm_gentran_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, ++ recvtype, comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } else { ++ /* intercommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTER_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_allgatherv_allcomm_gentran_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, ++ recvtype, comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } ++ ++ /* If the user doesn't pick a transport-enabled algorithm, go to the old ++ * sched function. */ + + mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); + if (mpi_errno) +@@ -230,10 +253,6 @@ int MPIR_Ineighbor_allgatherv_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -254,10 +273,6 @@ int MPIR_Ineighbor_allgatherv(const void *sendbuf, int sendcount, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ineighbor_allgatherv - Nonblocking version of MPI_Neighbor_allgatherv. + +@@ -374,14 +389,14 @@ int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype se + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ineighbor_allgatherv", + "**mpi_ineighbor_allgatherv %p %d %D %p %p %p %D %C %p", sendbuf, + sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, + request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_gentran_linear.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ineighbor_allgatherv_tsp_linear_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ineighbor_allgatherv_allcomm_gentran_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ineighbor_allgatherv_allcomm_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, ++ recvtype, comm_ptr, request); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c ++++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_linear.c +@@ -13,10 +13,6 @@ + * neighbor. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_allgatherv_sched_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_allgatherv_sched_allcomm_linear(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -25,21 +21,13 @@ int MPIR_Ineighbor_allgatherv_sched_allcomm_linear(const void *sendbuf, int send + { + int mpi_errno = MPI_SUCCESS; + int indegree, outdegree, weighted; +- int i, k, l; ++ int k, l; + int *srcs, *dsts; +- int comm_size; + MPI_Aint recvtype_extent; + MPIR_CHKLMEM_DECL(2); + +- comm_size = comm_ptr->local_size; +- + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- for (i = 0; i < comm_size; ++i) { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (displs[i] * recvtype_extent)); +- } +- + mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_gentran_algos.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++#include "tsp_gentran.h" ++ ++/* instantiate allgatherv linear algorithms for the gentran transport */ ++#include "ineighbor_allgatherv_tsp_linear_algos_prototypes.h" ++#include "ineighbor_allgatherv_tsp_linear_algos.h" ++#include "ineighbor_allgatherv_tsp_linear_algos_undef.h" ++ ++#include "tsp_undef.h" +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_tsp_linear_algos.h +@@ -0,0 +1,111 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLGATHERV_TSP_LINEAR_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "algo_common.h" ++#include "treealgo.h" ++#include "tsp_namespace_def.h" ++ ++/* Routine to schedule linear algorithm fir neighbor_allgatherv */ ++int MPIR_TSP_Ineighbor_allgatherv_sched_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int indegree, outdegree, weighted; ++ int k, l; ++ int *srcs, *dsts; ++ int tag; ++ MPI_Aint recvtype_extent; ++ MPIR_CHKLMEM_DECL(2); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHERV_SCHED_INTRA_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHERV_SCHED_INTRA_LINEAR); ++ ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ ++ mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_CHKLMEM_MALLOC(srcs, int *, indegree * sizeof(int), mpi_errno, "srcs", MPL_MEM_COMM); ++ MPIR_CHKLMEM_MALLOC(dsts, int *, outdegree * sizeof(int), mpi_errno, "dsts", MPL_MEM_COMM); ++ mpi_errno = MPIR_Topo_canon_nhb(comm_ptr, ++ indegree, srcs, MPI_UNWEIGHTED, ++ outdegree, dsts, MPI_UNWEIGHTED); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ for (k = 0; k < outdegree; ++k) { ++ MPIR_TSP_sched_isend(sendbuf, sendcount, sendtype, dsts[k], tag, comm_ptr, sched, 0, NULL); ++ } ++ ++ for (l = 0; l < indegree; ++l) { ++ char *rb = ((char *) recvbuf) + displs[l] * recvtype_extent; ++ MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtype, srcs[l], tag, comm_ptr, sched, 0, NULL); ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHERV_SCHED_INTRA_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/* Non-blocking linear algo based neighbor_allgatherv */ ++int MPIR_TSP_Ineighbor_allgatherv_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHERV_ALLCOMM_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHERV_ALLCOMM_LINEAR); ++ ++ /* generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_Assert(sched != NULL); ++ MPIR_TSP_sched_create(sched); ++ ++ /* schedule pipelined tree algo */ ++ mpi_errno = MPIR_TSP_Ineighbor_allgatherv_sched_allcomm_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcounts, displs, ++ recvtype, comm_ptr, sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm_ptr, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLGATHERV_ALLCOMM_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_tsp_linear_algos_prototypes.h +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., IBCAST_TSP_TREE_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Ineighbor_allgatherv_allcomm_linear ++#define MPIR_TSP_Ineighbor_allgatherv_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_allgatherv_allcomm_linear) ++#undef MPIR_TSP_Ineighor_allgatherv_sched_allcomm_linear ++#define MPIR_TSP_Ineighbor_allgatherv_sched_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_allgatherv_sched_allcomm_linear) ++ ++int MPIR_TSP_Ineighbor_allgatherv_sched_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched); ++int MPIR_TSP_Ineighbor_allgatherv_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], const int displs[], ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_tsp_linear_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLGATHERV_TSP_LINEAR_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Ineighbor_allgatherv_allcomm_linear ++#undef MPIR_TSP_Ineighbor_allgatherv_sched_allcomm_linear +--- a/src/mpi/coll/ineighbor_alltoall/Makefile.mk ++++ b/src/mpi/coll/ineighbor_alltoall/Makefile.mk +@@ -16,4 +16,6 @@ mpi_sources += \ + src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c + + mpi_core_sources += \ +- src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c ++ src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c \ ++ src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c \ ++ src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c +--- a/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c ++++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall.c +@@ -12,27 +12,30 @@ + cvars: + - name : MPIR_CVAR_INEIGHBOR_ALLTOALL_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_alltoall algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm ++ + + - name : MPIR_CVAR_INEIGHBOR_ALLTOALL_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_alltoall algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLTOALL_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -72,10 +75,6 @@ int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype send + #undef MPI_Ineighbor_alltoall + #define MPI_Ineighbor_alltoall PMPI_Ineighbor_alltoall + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoall_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoall_sched_intra_auto(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -96,10 +95,6 @@ int MPIR_Ineighbor_alltoall_sched_intra_auto(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoall_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoall_sched_inter_auto(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -120,10 +115,6 @@ int MPIR_Ineighbor_alltoall_sched_inter_auto(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoall_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoall_sched_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -132,14 +123,14 @@ int MPIR_Ineighbor_alltoall_sched_impl(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Ineighbor_alltoall_intra_algo_choice) { +- case MPIR_INEIGHBOR_ALLTOALL_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALL_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALL_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_alltoall_sched_allcomm_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLTOALL_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLTOALL_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ineighbor_alltoall_sched_intra_auto(sendbuf, sendcount, sendtype, +@@ -148,14 +139,14 @@ int MPIR_Ineighbor_alltoall_sched_impl(const void *sendbuf, int sendcount, + break; + } + } else { +- switch (MPIR_Ineighbor_alltoall_inter_algo_choice) { +- case MPIR_INEIGHBOR_ALLTOALL_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALL_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALL_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_alltoall_sched_allcomm_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLTOALL_INTER_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLTOALL_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ineighbor_alltoall_sched_inter_auto(sendbuf, sendcount, sendtype, +@@ -168,10 +159,6 @@ int MPIR_Ineighbor_alltoall_sched_impl(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoall_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -190,10 +177,6 @@ int MPIR_Ineighbor_alltoall_sched(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoall_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoall_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -204,7 +187,47 @@ int MPIR_Ineighbor_alltoall_impl(const void *sendbuf, int sendcount, + MPIR_Sched_t s = MPIR_SCHED_NULL; + + *request = NULL; ++ /* If the user picks one of the transport-enabled algorithms, branch there ++ * before going down to the MPIR_Sched-based algorithms. */ ++ /* TODO - Eventually the intention is to replace all of the ++ * MPIR_Sched-based algorithms with transport-enabled algorithms, but that ++ * will require sufficient performance testing and replacement algorithms. */ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ /* intracommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALL_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALL_INTRA_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_alltoall_allcomm_gentran_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } else { ++ /* intercommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALL_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALL_INTER_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_alltoall_allcomm_gentran_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } + ++ /* If the user doesn't pick a transport-enabled algorithm, go to the old ++ * sched function. */ + mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -227,10 +250,6 @@ int MPIR_Ineighbor_alltoall_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -251,10 +270,6 @@ int MPIR_Ineighbor_alltoall(const void *sendbuf, int sendcount, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ineighbor_alltoall - Nonblocking version of MPI_Neighbor_alltoall. + +@@ -369,13 +384,13 @@ int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype send + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ineighbor_alltoall", + "**mpi_ineighbor_alltoall %p %d %D %p %d %D %C %p", sendbuf, + sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_gentran_linear.c +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ineighbor_alltoall_tsp_linear_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ineighbor_alltoall_allcomm_gentran_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ineighbor_alltoall_allcomm_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, request); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c ++++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_linear.c +@@ -13,10 +13,6 @@ + * neighbor. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoall_sched_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoall_sched_allcomm_linear(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -32,13 +28,6 @@ int MPIR_Ineighbor_alltoall_sched_allcomm_linear(const void *sendbuf, int sendco + MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- /* This is the largest offset we add to sendbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- (comm_ptr->local_size * sendcount * sendtype_extent)); +- /* This is the largest offset we add to recvbuf */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (comm_ptr->local_size * recvcount * recvtype_extent)); +- + mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_gentran_algos.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++#include "tsp_gentran.h" ++ ++/* instantiate alltoall linear algorithms for the gentran transport */ ++#include "ineighbor_alltoall_tsp_linear_algos_prototypes.h" ++#include "ineighbor_alltoall_tsp_linear_algos.h" ++#include "ineighbor_alltoall_tsp_linear_algos_undef.h" ++ ++#include "tsp_undef.h" +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_tsp_linear_algos.h +@@ -0,0 +1,113 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALL_TSP_LINEAR_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "algo_common.h" ++#include "treealgo.h" ++#include "tsp_namespace_def.h" ++ ++/* Routine to schedule linear algorithm fir neighbor_alltoall */ ++int MPIR_TSP_Ineighbor_alltoall_sched_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int indegree, outdegree, weighted; ++ int k, l; ++ int *srcs, *dsts; ++ MPI_Aint sendtype_extent, recvtype_extent; ++ int tag; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALL_SCHED_ALLCOMM_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALL_SCHED_ALLCOMM_LINEAR); ++ ++ MPIR_CHKLMEM_DECL(2); ++ ++ MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ ++ mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_CHKLMEM_MALLOC(srcs, int *, indegree * sizeof(int), mpi_errno, "srcs", MPL_MEM_COMM); ++ MPIR_CHKLMEM_MALLOC(dsts, int *, outdegree * sizeof(int), mpi_errno, "dsts", MPL_MEM_COMM); ++ mpi_errno = MPIR_Topo_canon_nhb(comm_ptr, ++ indegree, srcs, MPI_UNWEIGHTED, ++ outdegree, dsts, MPI_UNWEIGHTED); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ ++ for (k = 0; k < outdegree; ++k) { ++ char *sb = ((char *) sendbuf) + k * sendcount * sendtype_extent; ++ MPIR_TSP_sched_isend(sb, sendcount, sendtype, dsts[k], tag, comm_ptr, sched, 0, NULL); ++ } ++ ++ for (l = 0; l < indegree; ++l) { ++ char *rb = ((char *) recvbuf) + l * recvcount * recvtype_extent; ++ MPIR_TSP_sched_irecv(rb, recvcount, recvtype, srcs[l], tag, comm_ptr, sched, 0, NULL); ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALL_SCHED_ALLCOMM_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/* Non-blocking linear algo based neighbor_allgatherv */ ++int MPIR_TSP_Ineighbor_alltoall_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALL_ALLCOMM_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALL_ALLCOMM_LINEAR); ++ ++ /* generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_Assert(sched != NULL); ++ MPIR_TSP_sched_create(sched); ++ ++ /* schedule pipelined tree algo */ ++ mpi_errno = MPIR_TSP_Ineighbor_alltoall_sched_allcomm_linear(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ comm_ptr, sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm_ptr, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALL_ALLCOMM_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_tsp_linear_algos_prototypes.h +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALL_TSP_LINEAR_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Ineighbor_alltoall_allcomm_linear ++#define MPIR_TSP_Ineighbor_alltoall_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_alltoall_allcomm_linear) ++#undef MPIR_TSP_Ineighor_alltoall_sched_allcomm_linear ++#define MPIR_TSP_Ineighbor_alltoall_sched_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_alltoall_sched_allcomm_linear) ++ ++int MPIR_TSP_Ineighbor_alltoall_sched_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched); ++int MPIR_TSP_Ineighbor_alltoall_allcomm_linear(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_tsp_linear_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALL_TSP_LINEAR_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Ineighbor_alltoall_allcomm_linear ++#undef MPIR_TSP_Ineighbor_alltoall_sched_allcomm_linear +--- a/src/mpi/coll/ineighbor_alltoallv/Makefile.mk ++++ b/src/mpi/coll/ineighbor_alltoallv/Makefile.mk +@@ -16,4 +16,6 @@ mpi_sources += \ + src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c + + mpi_core_sources += \ +- src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c ++ src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c \ ++ src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c \ ++ src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c +--- a/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c ++++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv.c +@@ -12,27 +12,29 @@ + cvars: + - name : MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_alltoallv algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_alltoallv algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLTOALLV_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -73,10 +75,6 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i + #undef MPI_Ineighbor_alltoallv + #define MPI_Ineighbor_alltoallv PMPI_Ineighbor_alltoallv + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallv_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallv_sched_intra_auto(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -99,10 +97,6 @@ int MPIR_Ineighbor_alltoallv_sched_intra_auto(const void *sendbuf, const int sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallv_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallv_sched_inter_auto(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -125,10 +119,6 @@ int MPIR_Ineighbor_alltoallv_sched_inter_auto(const void *sendbuf, const int sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallv_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallv_sched_impl(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -138,14 +128,14 @@ int MPIR_Ineighbor_alltoallv_sched_impl(const void *sendbuf, const int sendcount + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Ineighbor_alltoallv_intra_algo_choice) { +- case MPIR_INEIGHBOR_ALLTOALLV_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_alltoallv_sched_allcomm_linear(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLTOALLV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -155,14 +145,14 @@ int MPIR_Ineighbor_alltoallv_sched_impl(const void *sendbuf, const int sendcount + break; + } + } else { +- switch (MPIR_Ineighbor_alltoallv_inter_algo_choice) { +- case MPIR_INEIGHBOR_ALLTOALLV_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_alltoallv_sched_allcomm_linear(sendbuf, sendcounts, sdispls, + sendtype, recvbuf, recvcounts, + rdispls, recvtype, comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLTOALLV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -175,10 +165,6 @@ int MPIR_Ineighbor_alltoallv_sched_impl(const void *sendbuf, const int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallv_sched(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -199,10 +185,6 @@ int MPIR_Ineighbor_alltoallv_sched(const void *sendbuf, const int sendcounts[], + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -214,7 +196,49 @@ int MPIR_Ineighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], + MPIR_Sched_t s = MPIR_SCHED_NULL; + + *request = NULL; ++ /* If the user picks one of the transport-enabled algorithms, branch there ++ * before going down to the MPIR_Sched-based algorithms. */ ++ /* TODO - Eventually the intention is to replace all of the ++ * MPIR_Sched-based algorithms with transport-enabled algorithms, but that ++ * will require sufficient performance testing and replacement algorithms. */ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ /* intracommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTRA_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_alltoallv_allcomm_gentran_linear(sendbuf, sendcounts, sdispls, ++ sendtype, recvbuf, recvcounts, ++ rdispls, recvtype, comm_ptr, ++ request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } else { ++ /* intercommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTER_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_alltoallv_allcomm_gentran_linear(sendbuf, sendcounts, sdispls, ++ sendtype, recvbuf, recvcounts, ++ rdispls, recvtype, comm_ptr, ++ request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } + ++ /* If the user doesn't pick a transport-enabled algorithm, go to the old ++ * sched function. */ + mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -236,10 +260,6 @@ int MPIR_Ineighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -261,10 +281,6 @@ int MPIR_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ineighbor_alltoallv - Nonblocking version of MPI_Neighbor_alltoallv. + +@@ -381,14 +397,14 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ineighbor_alltoallv", + "**mpi_ineighbor_alltoallv %p %p %p %D %p %p %p %D %C %p", sendbuf, + sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, + recvtype, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_gentran_linear.c +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ineighbor_alltoallv_tsp_linear_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ineighbor_alltoallv_allcomm_gentran_linear(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = ++ MPII_Gentran_Ineighbor_alltoallv_allcomm_linear(sendbuf, sendcounts, sdispls, sendtype, ++ recvbuf, recvcounts, rdispls, recvtype, ++ comm_ptr, request); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c ++++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_linear.c +@@ -13,10 +13,6 @@ + * neighbor. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallv_sched_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallv_sched_allcomm_linear(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -25,24 +21,14 @@ int MPIR_Ineighbor_alltoallv_sched_allcomm_linear(const void *sendbuf, const int + { + int mpi_errno = MPI_SUCCESS; + int indegree, outdegree, weighted; +- int i, k, l; ++ int k, l; + int *srcs, *dsts; +- int comm_size; + MPI_Aint sendtype_extent, recvtype_extent; + MPIR_CHKLMEM_DECL(2); + +- comm_size = comm_ptr->local_size; +- + MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); + MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); + +- for (i = 0; i < comm_size; ++i) { +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- (sdispls[i] * sendtype_extent)); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + +- (rdispls[i] * recvtype_extent)); +- } +- + mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_gentran_algos.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++#include "tsp_gentran.h" ++ ++/* instantiate alltoallv linear algorithms for the gentran transport */ ++#include "ineighbor_alltoallv_tsp_linear_algos_prototypes.h" ++#include "ineighbor_alltoallv_tsp_linear_algos.h" ++#include "ineighbor_alltoallv_tsp_linear_algos_undef.h" ++ ++#include "tsp_undef.h" +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_tsp_linear_algos.h +@@ -0,0 +1,116 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALL_TSP_LINEAR_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "algo_common.h" ++#include "treealgo.h" ++#include "tsp_namespace_def.h" ++ ++/* Routine to schedule linear algorithm for neighbor_alltoallv */ ++int MPIR_TSP_Ineighbor_alltoallv_sched_allcomm_linear(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int indegree, outdegree, weighted; ++ int k, l; ++ int *srcs, *dsts; ++ int tag; ++ MPI_Aint sendtype_extent, recvtype_extent; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLV_SCHED_ALLCOMM_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLV_SCHED_ALLCOMM_LINEAR); ++ ++ MPIR_CHKLMEM_DECL(2); ++ ++ MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); ++ MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); ++ ++ mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_CHKLMEM_MALLOC(srcs, int *, indegree * sizeof(int), mpi_errno, "srcs", MPL_MEM_COMM); ++ MPIR_CHKLMEM_MALLOC(dsts, int *, outdegree * sizeof(int), mpi_errno, "dsts", MPL_MEM_COMM); ++ mpi_errno = MPIR_Topo_canon_nhb(comm_ptr, ++ indegree, srcs, MPI_UNWEIGHTED, ++ outdegree, dsts, MPI_UNWEIGHTED); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ for (k = 0; k < outdegree; ++k) { ++ char *sb = ((char *) sendbuf) + sdispls[k] * sendtype_extent; ++ MPIR_TSP_sched_isend(sb, sendcounts[k], sendtype, dsts[k], tag, comm_ptr, sched, 0, NULL); ++ } ++ ++ for (l = 0; l < indegree; ++l) { ++ char *rb = ((char *) recvbuf) + rdispls[l] * recvtype_extent; ++ MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtype, srcs[l], tag, comm_ptr, sched, 0, NULL); ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLV_SCHED_ALLCOMM_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/* Non-blocking linear algo based neighbor_alltoallv */ ++int MPIR_TSP_Ineighbor_alltoallv_allcomm_linear(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLV_ALLCOMM_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLV_ALLCOMM_LINEAR); ++ ++ /* generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_Assert(sched != NULL); ++ MPIR_TSP_sched_create(sched); ++ ++ /* schedule pipelined tree algo */ ++ mpi_errno = ++ MPIR_TSP_Ineighbor_alltoallv_sched_allcomm_linear(sendbuf, sendcounts, sdispls, sendtype, ++ recvbuf, recvcounts, rdispls, recvtype, ++ comm_ptr, sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm_ptr, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLV_ALLCOMM_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_tsp_linear_algos_prototypes.h +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALL_TSP_LINEAR_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Ineighbor_alltoallv_allcomm_linear ++#define MPIR_TSP_Ineighbor_alltoallv_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_alltoallv_allcomm_linear) ++#undef MPIR_TSP_Ineighor_alltoallv_sched_allcomm_linear ++#define MPIR_TSP_Ineighbor_alltoallv_sched_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_alltoallv_sched_allcomm_linear) ++ ++int MPIR_TSP_Ineighbor_alltoallv_sched_allcomm_linear(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched); ++int MPIR_TSP_Ineighbor_alltoallv_allcomm_linear(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], MPI_Datatype sendtype, ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_tsp_linear_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALL_TSP_LINEAR_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Ineighbor_alltoallv_allcomm_linear ++#undef MPIR_TSP_Ineighbor_alltoallv_sched_allcomm_linear +--- a/src/mpi/coll/ineighbor_alltoallw/Makefile.mk ++++ b/src/mpi/coll/ineighbor_alltoallw/Makefile.mk +@@ -16,4 +16,6 @@ mpi_sources += \ + src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c + + mpi_core_sources += \ +- src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c ++ src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c \ ++ src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c \ ++ src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c +--- a/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c ++++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw.c +@@ -12,27 +12,29 @@ + cvars: + - name : MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_alltoallw algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select ineighbor_alltoallw algorithm +- auto - Internal algorithm selection +- linear - Force linear algorithm ++ auto - Internal algorithm selection ++ linear - Force linear algorithm ++ gentran_linear - Force generic transport based linear algorithm + + - name : MPIR_CVAR_INEIGHBOR_ALLTOALLW_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -73,10 +75,6 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + #undef MPI_Ineighbor_alltoallw + #define MPI_Ineighbor_alltoallw PMPI_Ineighbor_alltoallw + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallw_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallw_sched_intra_auto(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -100,10 +98,6 @@ int MPIR_Ineighbor_alltoallw_sched_intra_auto(const void *sendbuf, const int sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallw_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallw_sched_inter_auto(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -127,10 +121,6 @@ int MPIR_Ineighbor_alltoallw_sched_inter_auto(const void *sendbuf, const int sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallw_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallw_sched_impl(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -140,14 +130,14 @@ int MPIR_Ineighbor_alltoallw_sched_impl(const void *sendbuf, const int sendcount + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Ineighbor_alltoallw_intra_algo_choice) { +- case MPIR_INEIGHBOR_ALLTOALLW_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_alltoallw_sched_allcomm_linear(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLTOALLW_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -157,14 +147,14 @@ int MPIR_Ineighbor_alltoallw_sched_impl(const void *sendbuf, const int sendcount + break; + } + } else { +- switch (MPIR_Ineighbor_alltoallw_inter_algo_choice) { +- case MPIR_INEIGHBOR_ALLTOALLW_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Ineighbor_alltoallw_sched_allcomm_linear(sendbuf, sendcounts, sdispls, + sendtypes, recvbuf, recvcounts, + rdispls, recvtypes, comm_ptr, s); + break; +- case MPIR_INEIGHBOR_ALLTOALLW_INTER_ALGO_AUTO: ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -178,10 +168,6 @@ int MPIR_Ineighbor_alltoallw_sched_impl(const void *sendbuf, const int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallw_sched(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -202,10 +188,6 @@ int MPIR_Ineighbor_alltoallw_sched(const void *sendbuf, const int sendcounts[], + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallw_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], +@@ -219,6 +201,49 @@ int MPIR_Ineighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], + MPIR_Sched_t s = MPIR_SCHED_NULL; + + *request = NULL; ++ /* If the user picks one of the transport-enabled algorithms, branch there ++ * before going down to the MPIR_Sched-based algorithms. */ ++ /* TODO - Eventually the intention is to replace all of the ++ * MPIR_Sched-based algorithms with transport-enabled algorithms, but that ++ * will require sufficient performance testing and replacement algorithms. */ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ /* intracommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTRA_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTRA_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_alltoallw_allcomm_gentran_linear(sendbuf, sendcounts, sdispls, ++ sendtypes, recvbuf, recvcounts, ++ rdispls, recvtypes, comm_ptr, ++ request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } else { ++ /* intercommunicator */ ++ switch (MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTER_ALGORITHM) { ++ case MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTER_ALGORITHM_gentran_linear: ++ mpi_errno = ++ MPIR_Ineighbor_alltoallw_allcomm_gentran_linear(sendbuf, sendcounts, sdispls, ++ sendtypes, recvbuf, recvcounts, ++ rdispls, recvtypes, comm_ptr, ++ request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } ++ ++ /* If the user doesn't pick a transport-enabled algorithm, go to the old ++ * sched function. */ + + mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); + if (mpi_errno) +@@ -242,10 +267,6 @@ int MPIR_Ineighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -269,10 +290,6 @@ int MPIR_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ineighbor_alltoallw - Nonblocking version of MPI_Neighbor_alltoallw. + +@@ -367,14 +384,14 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const M + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ineighbor_alltoallw", + "**mpi_ineighbor_alltoallw %p %p %p %p %p %p %p %p %C %p", sendbuf, + sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, + recvtypes, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_gentran_linear.c +@@ -0,0 +1,35 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ineighbor_alltoallw_tsp_linear_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ineighbor_alltoallw_allcomm_gentran_linear(const void *sendbuf, const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], void *recvbuf, ++ const int recvcounts[], ++ const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = ++ MPII_Gentran_Ineighbor_alltoallw_allcomm_linear(sendbuf, sendcounts, sdispls, sendtypes, ++ recvbuf, recvcounts, rdispls, recvtypes, ++ comm_ptr, request); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c ++++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_linear.c +@@ -13,10 +13,6 @@ + * neighbor. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ineighbor_alltoallw_sched_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ineighbor_alltoallw_sched_allcomm_linear(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -43,7 +39,6 @@ int MPIR_Ineighbor_alltoallw_sched_allcomm_linear(const void *sendbuf, const int + + for (k = 0; k < outdegree; ++k) { + char *sb; +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + sdispls[k]); + + sb = ((char *) sendbuf) + sdispls[k]; + mpi_errno = MPIR_Sched_send(sb, sendcounts[k], sendtypes[k], dsts[k], comm_ptr, s); +@@ -53,7 +48,6 @@ int MPIR_Ineighbor_alltoallw_sched_allcomm_linear(const void *sendbuf, const int + + for (l = 0; l < indegree; ++l) { + char *rb; +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT recvbuf + rdispls[l]); + + rb = ((char *) recvbuf) + rdispls[l]; + mpi_errno = MPIR_Sched_recv(rb, recvcounts[l], recvtypes[l], srcs[l], comm_ptr, s); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_gentran_algos.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++#include "tsp_gentran.h" ++ ++/* instantiate alltoallw linear algorithms for the gentran transport */ ++#include "ineighbor_alltoallw_tsp_linear_algos_prototypes.h" ++#include "ineighbor_alltoallw_tsp_linear_algos.h" ++#include "ineighbor_alltoallw_tsp_linear_algos_undef.h" ++ ++#include "tsp_undef.h" +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_tsp_linear_algos.h +@@ -0,0 +1,121 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALL_TSP_LINEAR_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "algo_common.h" ++#include "treealgo.h" ++#include "tsp_namespace_def.h" ++ ++/* Routine to schedule linear algorithm for neighbor_alltoallw */ ++int MPIR_TSP_Ineighbor_alltoallw_sched_allcomm_linear(const void *sendbuf, const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], void *recvbuf, ++ const int recvcounts[], ++ const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int indegree, outdegree, weighted; ++ int k, l; ++ int *srcs, *dsts; ++ int tag; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLW_SCHED_ALLCOMM_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLW_SCHED_ALLCOMM_LINEAR); ++ ++ MPIR_CHKLMEM_DECL(2); ++ ++ mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_CHKLMEM_MALLOC(srcs, int *, indegree * sizeof(int), mpi_errno, "srcs", MPL_MEM_COMM); ++ MPIR_CHKLMEM_MALLOC(dsts, int *, outdegree * sizeof(int), mpi_errno, "dsts", MPL_MEM_COMM); ++ mpi_errno = MPIR_Topo_canon_nhb(comm_ptr, ++ indegree, srcs, MPI_UNWEIGHTED, ++ outdegree, dsts, MPI_UNWEIGHTED); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ for (k = 0; k < outdegree; ++k) { ++ char *sb; ++ ++ sb = ((char *) sendbuf) + sdispls[k]; ++ MPIR_TSP_sched_isend(sb, sendcounts[k], sendtypes[k], dsts[k], tag, comm_ptr, sched, 0, ++ NULL); ++ } ++ ++ for (l = 0; l < indegree; ++l) { ++ char *rb; ++ ++ rb = ((char *) recvbuf) + rdispls[l]; ++ MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtypes[l], srcs[l], tag, comm_ptr, sched, 0, ++ NULL); ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLW_SCHED_ALLCOMM_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/* Non-blocking linear algo based neighbor_alltoallw */ ++int MPIR_TSP_Ineighbor_alltoallw_allcomm_linear(const void *sendbuf, const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], void *recvbuf, ++ const int recvcounts[], const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLW_ALLCOMM_LINEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLW_ALLCOMM_LINEAR); ++ ++ /* generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_Assert(sched != NULL); ++ MPIR_TSP_sched_create(sched); ++ ++ /* schedule linear algo */ ++ mpi_errno = ++ MPIR_TSP_Ineighbor_alltoallw_sched_allcomm_linear(sendbuf, sendcounts, sdispls, sendtypes, ++ recvbuf, recvcounts, rdispls, recvtypes, ++ comm_ptr, sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm_ptr, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_INEIGHBOR_ALLTOALLW_ALLCOMM_LINEAR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_tsp_linear_algos_prototypes.h +@@ -0,0 +1,36 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALL_TSP_LINEAR_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Ineighbor_alltoallw_allcomm_linear ++#define MPIR_TSP_Ineighbor_alltoallw_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_alltoallw_allcomm_linear) ++#undef MPIR_TSP_Ineighor_alltoallw_sched_allcomm_linear ++#define MPIR_TSP_Ineighbor_alltoallw_sched_allcomm_linear MPIR_TSP_NAMESPACE(Ineighbor_alltoallw_sched_allcomm_linear) ++ ++int MPIR_TSP_Ineighbor_alltoallw_sched_allcomm_linear(const void *sendbuf, const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], void *recvbuf, ++ const int recvcounts[], ++ const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, ++ MPIR_TSP_sched_t * sched); ++int MPIR_TSP_Ineighbor_alltoallw_allcomm_linear(const void *sendbuf, const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], void *recvbuf, ++ const int recvcounts[], const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_tsp_linear_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., INEIGHBOR_ALLTOALLW_TSP_LINEAR_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Ineighbor_alltoallw_allcomm_linear ++#undef MPIR_TSP_Ineighbor_alltoallw_sched_allcomm_linear +--- a/src/mpi/coll/ireduce/Makefile.mk ++++ b/src/mpi/coll/ireduce/Makefile.mk +@@ -21,5 +21,5 @@ mpi_core_sources += \ + src/mpi/coll/ireduce/ireduce_intra_smp.c \ + src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c \ + src/mpi/coll/ireduce/ireduce_gentran_algos.c \ +- src/mpi/coll/ireduce/ireduce_intra_tree.c \ +- src/mpi/coll/ireduce/ireduce_intra_ring.c ++ src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c \ ++ src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c +--- a/src/mpi/coll/ireduce/ireduce.c ++++ b/src/mpi/coll/ireduce/ireduce.c +@@ -72,7 +72,7 @@ cvars: + + - name : MPIR_CVAR_IREDUCE_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -82,12 +82,12 @@ cvars: + auto - Internal algorithm selection + binomial - Force binomial algorithm + reduce_scatter_gather - Force reduce scatter gather algorithm +- tree - Force Generic Transport Tree +- ring - Force Generic Transport Ring ++ gentran_tree - Force Generic Transport Tree ++ gentran_ring - Force Generic Transport Ring + + - name : MPIR_CVAR_IREDUCE_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -134,10 +134,6 @@ int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data + #undef MPI_Ireduce + #define MPI_Ireduce PMPI_Ireduce + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_sched_intra_auto(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -175,10 +171,6 @@ int MPIR_Ireduce_sched_intra_auto(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_sched_inter_auto(const void *sendbuf, void *recvbuf, + int count, MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -191,10 +183,6 @@ int MPIR_Ireduce_sched_inter_auto(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -207,18 +195,18 @@ int MPIR_Ireduce_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_D + datatype, op, root, comm_ptr, s); + } else { + /* intracommunicator */ +- switch (MPIR_Ireduce_intra_algo_choice) { +- case MPIR_IREDUCE_INTRA_ALGO_BINOMIAL: ++ switch (MPIR_CVAR_IREDUCE_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_INTRA_ALGORITHM_binomial: + mpi_errno = MPIR_Ireduce_sched_intra_binomial(sendbuf, recvbuf, count, + datatype, op, root, comm_ptr, s); + break; +- case MPIR_IREDUCE_INTRA_ALGO_REDUCE_SCATTER_GATHER: ++ case MPIR_CVAR_IREDUCE_INTRA_ALGORITHM_reduce_scatter_gather: + mpi_errno = + MPIR_Ireduce_sched_intra_reduce_scatter_gather(sendbuf, recvbuf, count, + datatype, op, root, comm_ptr, + s); + break; +- case MPIR_IREDUCE_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IREDUCE_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ireduce_sched_intra_auto(sendbuf, recvbuf, count, +@@ -228,14 +216,14 @@ int MPIR_Ireduce_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_D + } + } else { + /* intercommunicator */ +- switch (MPIR_Ireduce_inter_algo_choice) { +- case MPIR_IREDUCE_INTER_ALGO_LOCAL_REDUCE_REMOTE_SEND: ++ switch (MPIR_CVAR_IREDUCE_INTER_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_INTER_ALGORITHM_local_reduce_remote_send: + mpi_errno = + MPIR_Ireduce_sched_inter_local_reduce_remote_send(sendbuf, recvbuf, count, + datatype, op, root, comm_ptr, + s); + break; +- case MPIR_IREDUCE_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IREDUCE_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ireduce_sched_inter_auto(sendbuf, recvbuf, count, +@@ -247,10 +235,6 @@ int MPIR_Ireduce_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_sched(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -266,10 +250,6 @@ int MPIR_Ireduce_sched(const void *sendbuf, void *recvbuf, int count, MPI_Dataty + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_impl(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -286,19 +266,19 @@ int MPIR_Ireduce_impl(const void *sendbuf, void *recvbuf, int count, + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ireduce_intra_algo_choice) { +- case MPIR_IREDUCE_INTRA_ALGO_GENTRAN_TREE: ++ switch (MPIR_CVAR_IREDUCE_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_INTRA_ALGORITHM_gentran_tree: + mpi_errno = +- MPIR_Ireduce_intra_tree(sendbuf, recvbuf, count, datatype, op, root, +- comm_ptr, request); ++ MPIR_Ireduce_intra_gentran_tree(sendbuf, recvbuf, count, datatype, op, root, ++ comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; + break; +- case MPIR_IREDUCE_INTRA_ALGO_GENTRAN_RING: ++ case MPIR_CVAR_IREDUCE_INTRA_ALGORITHM_gentran_ring: + mpi_errno = +- MPIR_Ireduce_intra_ring(sendbuf, recvbuf, count, datatype, op, root, +- comm_ptr, request); ++ MPIR_Ireduce_intra_gentran_ring(sendbuf, recvbuf, count, datatype, op, root, ++ comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; +@@ -332,10 +312,6 @@ int MPIR_Ireduce_impl(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -354,10 +330,6 @@ int MPIR_Ireduce(const void *sendbuf, void *recvbuf, int count, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ireduce - Reduces values on all processes to a single value + in a nonblocking way +@@ -487,12 +459,12 @@ int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ireduce", "**mpi_ireduce %p %p %d %D %O %d %C %p", sendbuf, + recvbuf, count, datatype, op, root, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c ++++ b/src/mpi/coll/ireduce/ireduce_inter_local_reduce_remote_send.c +@@ -12,10 +12,6 @@ + * 0 then sends data to root. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_sched_inter_local_reduce_remote_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_sched_inter_local_reduce_remote_send(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -51,10 +47,6 @@ int MPIR_Ireduce_sched_inter_local_reduce_remote_send(const void *sendbuf, void + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + + MPIR_Datatype_get_extent_macro(datatype, extent); +- /* I think this is the worse case, so we can avoid an assert() +- * inside the for loop */ +- /* Should MPIR_SCHED_CHKPMEM_MALLOC do this? */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +--- a/src/mpi/coll/ireduce/ireduce_intra_binomial.c ++++ b/src/mpi/coll/ireduce/ireduce_intra_binomial.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_sched_intra_binomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_sched_intra_binomial(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -47,11 +43,6 @@ int MPIR_Ireduce_sched_intra_binomial(const void *sendbuf, void *recvbuf, int co + + is_commutative = MPIR_Op_is_commutative(op); + +- /* I think this is the worse case, so we can avoid an assert() +- * inside the for loop */ +- /* should be buf+{this}? */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ireduce/ireduce_intra_gentran_ring.c +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ireduce_tsp_tree_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ireduce_intra_gentran_ring(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ /* Ring algorithm is equivalent to kary tree with k = 1 */ ++ mpi_errno = MPII_Gentran_Ireduce_intra_tree(sendbuf, recvbuf, count, datatype, op, root, ++ comm_ptr, request, MPIR_TREE_TYPE_KARY, ++ 1, MPIR_CVAR_IREDUCE_RING_CHUNK_SIZE); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ireduce/ireduce_intra_gentran_tree.c +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ireduce_tsp_tree_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ireduce_intra_gentran_tree(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ireduce_intra_tree(sendbuf, recvbuf, count, datatype, op, root, ++ comm_ptr, request, MPIR_Ireduce_tree_type, ++ MPIR_CVAR_IREDUCE_TREE_KVAL, ++ MPIR_CVAR_IREDUCE_TREE_PIPELINE_CHUNK_SIZE); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c ++++ b/src/mpi/coll/ireduce/ireduce_intra_reduce_scatter_gather.c +@@ -33,10 +33,6 @@ + Cost = (2.floor(lgp)+1).alpha + (2.((p-1)/p) + 1).n.beta + + n.(1+(p-1)/p).gamma + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_sched_intra_reduce_scatter_gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_sched_intra_reduce_scatter_gather(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -65,13 +61,6 @@ int MPIR_Ireduce_sched_intra_reduce_scatter_gather(const void *sendbuf, void *re + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +-#ifdef HAVE_ERROR_CHECKING +- /* I think this is the worse case, so we can avoid an assert() +- * inside the for loop */ +- /* should be buf+{this}? */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +-#endif /* HAVE_ERROR_CHECKING */ +- + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +deleted file mode 100644 +--- a/src/mpi/coll/ireduce/ireduce_intra_ring.c ++++ /dev/null +@@ -1,35 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "ireduce_tsp_tree_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_intra_ring +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Ireduce_intra_ring(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- /* Ring algorithm is equivalent to kary tree with k = 1 */ +- mpi_errno = MPII_Gentran_Ireduce_intra_tree(sendbuf, recvbuf, count, datatype, op, root, +- comm_ptr, request, MPIR_TREE_TYPE_KARY, +- 1, MPIR_CVAR_IREDUCE_RING_CHUNK_SIZE); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/ireduce/ireduce_intra_smp.c ++++ b/src/mpi/coll/ireduce/ireduce_intra_smp.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_sched_intra_smp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_sched_intra_smp(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -43,8 +39,6 @@ int MPIR_Ireduce_sched_intra_smp(const void *sendbuf, void *recvbuf, int count, + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +deleted file mode 100644 +--- a/src/mpi/coll/ireduce/ireduce_intra_tree.c ++++ /dev/null +@@ -1,35 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "ireduce_tsp_tree_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Ireduce_intra_tree(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Ireduce_intra_tree(sendbuf, recvbuf, count, datatype, op, root, +- comm_ptr, request, MPIR_Ireduce_tree_type, +- MPIR_CVAR_IREDUCE_TREE_KVAL, +- MPIR_CVAR_IREDUCE_TREE_PIPELINE_CHUNK_SIZE); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/ireduce/ireduce_tsp_tree_algos.h ++++ b/src/mpi/coll/ireduce/ireduce_tsp_tree_algos.h +@@ -18,10 +18,6 @@ + #include "tsp_namespace_def.h" + + /* Routine to schedule a pipelined tree based reduce */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ireduce_sched_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm, int tree_type, int k, int maxbytes, +@@ -44,7 +40,7 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int co + * rank 0 sends the reduced data to the root of the ecollective op. */ + int is_tree_root, is_tree_leaf, is_tree_intermediate; /* Variables to store location of this rank in the tree */ + int is_root; +- MPII_Treealgo_tree_t my_tree; ++ MPIR_Treealgo_tree_t my_tree; + void **child_buffer = NULL; /* Buffer array in which data from children is received */ + void *reduce_buffer; /* Buffer in which reduced data is present */ + int *vtcs = NULL, *recv_id = NULL, *reduce_id = NULL; /* Arrays to store graph vertex ids */ +@@ -70,7 +66,7 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int co + is_commutative = MPIR_Op_is_commutative(op); + + /* calculate chunking information for pipelining */ +- MPII_Algo_calculate_pipeline_chunk_info(maxbytes, type_size, count, &num_chunks, ++ MPIR_Algo_calculate_pipeline_chunk_info(maxbytes, type_size, count, &num_chunks, + &chunk_size_floor, &chunk_size_ceil); + /* print chunking information */ + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, +@@ -89,7 +85,7 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int co + + /* initialize the tree */ + my_tree.children = NULL; +- mpi_errno = MPII_Treealgo_tree_create(rank, size, tree_type, k, tree_root, &my_tree); ++ mpi_errno = MPIR_Treealgo_tree_create(rank, size, tree_type, k, tree_root, &my_tree); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + num_children = my_tree.num_children; +@@ -244,7 +240,7 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int co + offset += msgsize; + } + +- MPII_Treealgo_tree_free(&my_tree); ++ MPIR_Treealgo_tree_free(&my_tree); + + fn_exit: + MPL_free(vtcs); +@@ -258,10 +254,6 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, int co + + + /* Non-blocking tree based reduce */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ireduce_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ireduce_intra_tree(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm, + MPIR_Request ** req, int tree_type, int k, int maxbytes) +--- a/src/mpi/coll/ireduce_scatter/Makefile.mk ++++ b/src/mpi/coll/ireduce_scatter/Makefile.mk +@@ -22,4 +22,4 @@ mpi_core_sources += \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c \ + src/mpi/coll/ireduce_scatter/ireduce_scatter_gentran_algos.c \ +- src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recexch.c ++ src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter.c ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter.c +@@ -22,7 +22,7 @@ cvars: + + - name : MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -34,11 +34,11 @@ cvars: + recursive_doubling - Force recursive doubling algorithm + pairwise - Force pairwise algorithm + recursive_halving - Force recursive halving algorithm +- recexch - Force generic transport recursive exchange algorithm ++ gentran_recexch - Force generic transport recursive exchange algorithm + + - name : MPIR_CVAR_IREDUCE_SCATTER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -85,10 +85,6 @@ int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts + #undef MPI_Ireduce_scatter + #define MPI_Ireduce_scatter PMPI_Ireduce_scatter + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched_intra_auto(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -158,10 +154,6 @@ int MPIR_Ireduce_scatter_sched_intra_auto(const void *sendbuf, void *recvbuf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched_inter_auto(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -175,10 +167,6 @@ int MPIR_Ireduce_scatter_sched_inter_auto(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched_impl(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -187,29 +175,29 @@ int MPIR_Ireduce_scatter_sched_impl(const void *sendbuf, void *recvbuf, const in + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ireduce_scatter_intra_algo_choice) { +- case MPIR_IREDUCE_SCATTER_INTRA_ALGO_NONCOMMUTATIVE: ++ switch (MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM_noncommutative: + mpi_errno = MPIR_Ireduce_scatter_sched_intra_noncommutative(sendbuf, recvbuf, + recvcounts, datatype, + op, comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_INTRA_ALGO_PAIRWISE: ++ case MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM_pairwise: + mpi_errno = MPIR_Ireduce_scatter_sched_intra_pairwise(sendbuf, recvbuf, + recvcounts, datatype, op, + comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_INTRA_ALGO_RECURSIVE_HALVING: ++ case MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM_recursive_halving: + mpi_errno = MPIR_Ireduce_scatter_sched_intra_recursive_halving(sendbuf, recvbuf, + recvcounts, datatype, + op, comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = MPIR_Ireduce_scatter_sched_intra_recursive_doubling(sendbuf, recvbuf, + recvcounts, + datatype, op, + comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ireduce_scatter_sched_intra_auto(sendbuf, recvbuf, +@@ -219,15 +207,15 @@ int MPIR_Ireduce_scatter_sched_impl(const void *sendbuf, void *recvbuf, const in + } + } else { + /* intercommunicator */ +- switch (MPIR_Ireduce_scatter_inter_algo_choice) { +- case MPIR_IREDUCE_SCATTER_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTERV: ++ switch (MPIR_CVAR_IREDUCE_SCATTER_INTER_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_SCATTER_INTER_ALGORITHM_remote_reduce_local_scatterv: + mpi_errno = + MPIR_Ireduce_scatter_sched_inter_remote_reduce_local_scatterv(sendbuf, recvbuf, + recvcounts, + datatype, op, + comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IREDUCE_SCATTER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ireduce_scatter_sched_inter_auto(sendbuf, recvbuf, recvcounts, +@@ -239,10 +227,6 @@ int MPIR_Ireduce_scatter_sched_impl(const void *sendbuf, void *recvbuf, const in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -260,10 +244,6 @@ int MPIR_Ireduce_scatter_sched(const void *sendbuf, void *recvbuf, const int rec + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_impl(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Request ** request) +@@ -282,12 +262,12 @@ int MPIR_Ireduce_scatter_impl(const void *sendbuf, void *recvbuf, const int recv + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ireduce_scatter_intra_algo_choice) { +- case MPIR_IREDUCE_SCATTER_INTRA_ALGO_GENTRAN_RECEXCH: ++ switch (MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM_gentran_recexch: + if (is_commutative) { + mpi_errno = +- MPIR_Ireduce_scatter_intra_recexch(sendbuf, recvbuf, recvcounts, datatype, +- op, comm_ptr, request); ++ MPIR_Ireduce_scatter_intra_gentran_recexch(sendbuf, recvbuf, recvcounts, ++ datatype, op, comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; +@@ -320,10 +300,6 @@ int MPIR_Ireduce_scatter_impl(const void *sendbuf, void *recvbuf, const int recv + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Request ** request) +@@ -343,10 +319,6 @@ int MPIR_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcount + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ireduce_scatter - Combines values and scatters the results in + a nonblocking way +@@ -470,13 +442,13 @@ int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ireduce_scatter", + "**mpi_ireduce_scatter %p %p %p %D %O %C %p", sendbuf, recvbuf, + recvcounts, datatype, op, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_remote_reduce_local_scatterv.c +@@ -13,10 +13,6 @@ + * by local intracommunicator scattervs in each group. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched_inter_remote_reduce_local_scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched_inter_remote_reduce_local_scatterv(const void *sendbuf, + void *recvbuf, + const int recvcounts[], +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_gentran_recexch.c +@@ -0,0 +1,31 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ireduce_scatter_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ireduce_scatter_intra_gentran_recexch(const void *sendbuf, void *recvbuf, ++ const int *recvcounts, MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ireduce_scatter_intra_recexch(sendbuf, recvbuf, recvcounts, ++ datatype, op, ++ comm, req, ++ MPIR_CVAR_IREDUCE_SCATTER_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_noncommutative.c +@@ -21,10 +21,6 @@ + * + * Cost = lgp.alpha + n.(lgp-(p-1)/p).beta + n.(lgp-(p-1)/p).gamma + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched_intra_noncommutative +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched_intra_noncommutative(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_pairwise.c +@@ -13,10 +13,6 @@ + * process sends n/p amount of data to (rank+i) and receives n/p amount of data + * from (rank-i). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched_intra_pairwise +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched_intra_pairwise(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -28,7 +24,6 @@ int MPIR_Ireduce_scatter_sched_intra_pairwise(const void *sendbuf, void *recvbuf + void *tmp_recvbuf; + int src, dst; + int total_count; +- int is_commutative; + MPIR_SCHED_CHKPMEM_DECL(2); + + comm_size = comm_ptr->local_size; +@@ -37,10 +32,9 @@ int MPIR_Ireduce_scatter_sched_intra_pairwise(const void *sendbuf, void *recvbuf + MPIR_Datatype_get_extent_macro(datatype, extent); + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + +- is_commutative = MPIR_Op_is_commutative(op); + #ifdef HAVE_ERROR_CHECKING + { +- MPIR_Assert(is_commutative); ++ MPIR_Assert(MPIR_Op_is_commutative(op)); + } + #endif + +@@ -56,9 +50,6 @@ int MPIR_Ireduce_scatter_sched_intra_pairwise(const void *sendbuf, void *recvbuf + if (total_count == 0) { + goto fn_exit; + } +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); + + if (sendbuf != MPI_IN_PLACE) { + /* copy local data into recvbuf */ +deleted file mode 100644 +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recexch.c ++++ /dev/null +@@ -1,35 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "ireduce_scatter_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Ireduce_scatter_intra_recexch(const void *sendbuf, void *recvbuf, +- const int *recvcounts, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm, MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Ireduce_scatter_intra_recexch(sendbuf, recvbuf, recvcounts, +- datatype, op, +- comm, req, +- MPIR_CVAR_IREDUCE_SCATTER_RECEXCH_KVAL); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_doubling.c +@@ -17,10 +17,6 @@ + * + * Cost = lgp.alpha + n.(lgp-(p-1)/p).beta + n.(lgp-(p-1)/p).gamma + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, +@@ -60,11 +56,6 @@ int MPIR_Ireduce_scatter_sched_intra_recursive_doubling(const void *sendbuf, voi + + MPIR_Datatype_get_size_macro(datatype, type_size); + +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); +- +- + /* need to allocate temporary buffer to receive incoming data */ + MPIR_SCHED_CHKPMEM_MALLOC(tmp_recvbuf, void *, total_count * (MPL_MAX(true_extent, extent)), + mpi_errno, "tmp_recvbuf", MPL_MEM_BUFFER); +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_recursive_halving.c +@@ -34,10 +34,6 @@ + * + * Cost = (p-1).alpha + n.((p-1)/p).beta + n.((p-1)/p).gamma + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_sched_intra_recursive_halving +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_sched_intra_recursive_halving(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_tsp_recexch_algos.h ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_tsp_recexch_algos.h +@@ -18,21 +18,16 @@ + #include "recexchalgo.h" + + /* Routine to schedule a recursive exchange based reduce_scatter with distance halving in each phase */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ireduce_scatter_sched_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recvbuf, + const int *recvcounts, MPI_Datatype datatype, +- MPI_Op op, int tag, MPIR_Comm * comm, int k, ++ MPI_Op op, MPIR_Comm * comm, int k, + MPIR_TSP_sched_t * sched) + { + int mpi_errno = MPI_SUCCESS; + int is_inplace; + size_t extent; + MPI_Aint lb, true_extent; +- int is_commutative; +- int step1_sendto = -1, step2_nphases, step1_nrecvs; ++ int step1_sendto = -1, step2_nphases = 0, step1_nrecvs = 0; + int in_step2; + int *step1_recvfrom = NULL; + int **step2_nbrs = NULL; +@@ -43,10 +38,15 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recv + int nvtcs, vtcs[2]; + void *tmp_recvbuf = NULL, *tmp_results = NULL; + int *displs; ++ int tag; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IREDUCE_SCATTER_SCHED_INTRA_RECEXCH); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IREDUCE_SCATTER_SCHED_INTRA_RECEXCH); + ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ + is_inplace = (sendbuf == MPI_IN_PLACE); + nranks = MPIR_Comm_size(comm); + rank = MPIR_Comm_rank(comm); +@@ -54,8 +54,7 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recv + MPIR_Datatype_get_extent_macro(datatype, extent); + MPIR_Type_get_true_extent_impl(datatype, &lb, &true_extent); + extent = MPL_MAX(extent, true_extent); +- is_commutative = MPIR_Op_is_commutative(op); +- MPIR_Assert(is_commutative == 1); ++ MPIR_Assert(MPIR_Op_is_commutative(op) == 1); + + total_count = 0; + for (i = 0; i < nranks; i++) { +@@ -223,16 +222,11 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recv + + + /* Non-blocking recursive exchange based Reduce_scatter */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ireduce_scatter_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ireduce_scatter_intra_recexch(const void *sendbuf, void *recvbuf, + const int *recvcounts, MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm, MPIR_Request ** req, int k) + { + int mpi_errno = MPI_SUCCESS; +- int tag; + MPIR_TSP_sched_t *sched; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IREDUCE_SCATTER_INTRA_RECEXCH); +@@ -245,15 +239,9 @@ int MPIR_TSP_Ireduce_scatter_intra_recexch(const void *sendbuf, void *recvbuf, + MPIR_Assert(sched != NULL); + MPIR_TSP_sched_create(sched); + +- /* For correctness, transport based collectives need to get the +- * tag from the same pool as schedule based collectives */ +- mpi_errno = MPIR_Sched_next_tag(comm, &tag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- + mpi_errno = + MPIR_TSP_Ireduce_scatter_sched_intra_recexch(sendbuf, recvbuf, recvcounts, datatype, +- op, tag, comm, k, sched); ++ op, comm, k, sched); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +--- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_tsp_recexch_algos_prototypes.h ++++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_tsp_recexch_algos_prototypes.h +@@ -22,7 +22,7 @@ + + int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recvbuf, + const int *recvcounts, MPI_Datatype datatype, +- MPI_Op op, int tag, MPIR_Comm * comm, int k, ++ MPI_Op op, MPIR_Comm * comm, int k, + MPIR_TSP_sched_t * sched); + + int MPIR_TSP_Ireduce_scatter_intra_recexch(const void *sendbuf, void *recvbuf, +--- a/src/mpi/coll/ireduce_scatter_block/Makefile.mk ++++ b/src/mpi/coll/ireduce_scatter_block/Makefile.mk +@@ -22,4 +22,4 @@ mpi_core_sources += \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c \ + src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_gentran_algos.c \ +- src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recexch.c ++ src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block.c +@@ -22,7 +22,7 @@ cvars: + + - name : MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -34,11 +34,11 @@ cvars: + recursive_doubling - Force recursive doubling algorithm + pairwise - Force pairwise algorithm + recursive_halving - Force recursive halving algorithm +- recexch - Force generic transport recursive exchange algorithm ++ gentran_recexch - Force generic transport recursive exchange algorithm + + - name : MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -86,10 +86,6 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, + #undef MPI_Ireduce_scatter_block + #define MPI_Ireduce_scatter_block PMPI_Ireduce_scatter_block + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched_intra_auto(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -149,10 +145,6 @@ int MPIR_Ireduce_scatter_block_sched_intra_auto(const void *sendbuf, void *recvb + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched_inter_auto(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -167,10 +159,6 @@ int MPIR_Ireduce_scatter_block_sched_inter_auto(const void *sendbuf, void *recvb + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched_impl(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -179,31 +167,31 @@ int MPIR_Ireduce_scatter_block_sched_impl(const void *sendbuf, void *recvbuf, in + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ireduce_scatter_block_intra_algo_choice) { +- case MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_NONCOMMUTATIVE: ++ switch (MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_noncommutative: + mpi_errno = MPIR_Ireduce_scatter_block_sched_intra_noncommutative(sendbuf, recvbuf, + recvcount, + datatype, op, + comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_PAIRWISE: ++ case MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_pairwise: + mpi_errno = MPIR_Ireduce_scatter_block_sched_intra_pairwise(sendbuf, recvbuf, + recvcount, datatype, op, + comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_HALVING: ++ case MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_recursive_halving: + mpi_errno = + MPIR_Ireduce_scatter_block_sched_intra_recursive_halving(sendbuf, recvbuf, + recvcount, datatype, + op, comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = + MPIR_Ireduce_scatter_block_sched_intra_recursive_doubling(sendbuf, recvbuf, + recvcount, datatype, + op, comm_ptr, s); + break; +- case MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ireduce_scatter_block_sched_intra_auto(sendbuf, recvbuf, +@@ -213,8 +201,8 @@ int MPIR_Ireduce_scatter_block_sched_impl(const void *sendbuf, void *recvbuf, in + } + } else { + /* intercommunicator */ +- switch (MPIR_Ireduce_scatter_block_inter_algo_choice) { +- case MPIR_IREDUCE_SCATTER_BLOCK_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTERV: ++ switch (MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTER_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTER_ALGORITHM_remote_reduce_local_scatterv: + mpi_errno = + MPIR_Ireduce_scatter_block_sched_inter_remote_reduce_local_scatterv(sendbuf, + recvbuf, +@@ -224,7 +212,7 @@ int MPIR_Ireduce_scatter_block_sched_impl(const void *sendbuf, void *recvbuf, in + comm_ptr, + s); + break; +- case MPIR_IREDUCE_SCATTER_BLOCK_INTER_ALGO_AUTO: ++ case MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Ireduce_scatter_block_sched_inter_auto(sendbuf, recvbuf, +@@ -236,10 +224,6 @@ int MPIR_Ireduce_scatter_block_sched_impl(const void *sendbuf, void *recvbuf, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -257,10 +241,6 @@ int MPIR_Ireduce_scatter_block_sched(const void *sendbuf, void *recvbuf, int rec + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_impl(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -279,12 +259,13 @@ int MPIR_Ireduce_scatter_block_impl(const void *sendbuf, void *recvbuf, + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Ireduce_scatter_block_intra_algo_choice) { +- case MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_GENTRAN_RECEXCH: ++ switch (MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM) { ++ case MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_gentran_recexch: + if (is_commutative) { + mpi_errno = +- MPIR_Ireduce_scatter_block_intra_recexch(sendbuf, recvbuf, recvcount, +- datatype, op, comm_ptr, request); ++ MPIR_Ireduce_scatter_block_intra_gentran_recexch(sendbuf, recvbuf, ++ recvcount, datatype, op, ++ comm_ptr, request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; +@@ -317,10 +298,6 @@ int MPIR_Ireduce_scatter_block_impl(const void *sendbuf, void *recvbuf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -340,10 +317,6 @@ int MPIR_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ireduce_scatter_block - Combines values and scatters the results in + a nonblocking way +@@ -461,13 +434,13 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ireduce_scatter_block", + "**mpi_ireduce_scatter_block %p %p %d %D %O %C %p", sendbuf, + recvbuf, recvcount, datatype, op, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_remote_reduce_local_scatterv.c +@@ -13,10 +13,6 @@ + * by local intracommunicator scattervs in each group. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched_inter_remote_reduce_local_scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched_inter_remote_reduce_local_scatterv(const void *sendbuf, + void *recvbuf, + int recvcount, +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_gentran_recexch.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "ireduce_scatter_block_tsp_recexch_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Ireduce_scatter_block_intra_gentran_recexch(const void *sendbuf, void *recvbuf, ++ int recvcount, MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Ireduce_scatter_block_intra_recexch(sendbuf, recvbuf, recvcount, ++ datatype, op, ++ comm, req, ++ MPIR_CVAR_IREDUCE_SCATTER_BLOCK_RECEXCH_KVAL); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_noncommutative.c +@@ -10,10 +10,6 @@ + * "An Improved Algorithm for (Non-commutative) Reduce-Scatter with an Application" + * from EuroPVM/MPI 2005. This function currently only implements support for + * the power-of-2 case. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched_intra_noncommutative +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched_intra_noncommutative(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_pairwise.c +@@ -8,10 +8,6 @@ + + /* A pairwise exchange algorithm for MPI_Ireduce_scatter_block. Requires a + * commutative op and is intended for use with large messages. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched_intra_pairwise +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched_intra_pairwise(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -23,7 +19,6 @@ int MPIR_Ireduce_scatter_block_sched_intra_pairwise(const void *sendbuf, void *r + void *tmp_recvbuf; + int src, dst; + int total_count; +- int is_commutative; + MPIR_SCHED_CHKPMEM_DECL(2); + + comm_size = comm_ptr->local_size; +@@ -32,10 +27,9 @@ int MPIR_Ireduce_scatter_block_sched_intra_pairwise(const void *sendbuf, void *r + MPIR_Datatype_get_extent_macro(datatype, extent); + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + +- is_commutative = MPIR_Op_is_commutative(op); + #ifdef HAVE_ERROR_CHECKING + { +- MPIR_Assert(is_commutative); ++ MPIR_Assert(MPIR_Op_is_commutative(op)); + } + #endif /* HAVE_ERROR_CHECKING */ + +@@ -51,9 +45,6 @@ int MPIR_Ireduce_scatter_block_sched_intra_pairwise(const void *sendbuf, void *r + if (total_count == 0) { + goto fn_exit; + } +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); + + if (sendbuf != MPI_IN_PLACE) { + /* copy local data into recvbuf */ +deleted file mode 100644 +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recexch.c ++++ /dev/null +@@ -1,35 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "ireduce_scatter_block_tsp_recexch_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Ireduce_scatter_block_intra_recexch(const void *sendbuf, void *recvbuf, +- int recvcount, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm, MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Ireduce_scatter_block_intra_recexch(sendbuf, recvbuf, recvcount, +- datatype, op, +- comm, req, +- MPIR_CVAR_IREDUCE_SCATTER_BLOCK_RECEXCH_KVAL); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_doubling.c +@@ -8,10 +8,6 @@ + + /* A recursive doubling algorithm for MPI_Ireduce_scatter_block, suitable for + * noncommutative and (non-pof2 or block irregular). */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -51,11 +47,6 @@ int MPIR_Ireduce_scatter_block_sched_intra_recursive_doubling(const void *sendbu + + MPIR_Datatype_get_size_macro(datatype, type_size); + +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); +- +- + /* need to allocate temporary buffer to receive incoming data */ + MPIR_SCHED_CHKPMEM_MALLOC(tmp_recvbuf, void *, total_count * (MPL_MAX(true_extent, extent)), + mpi_errno, "tmp_recvbuf", MPL_MEM_BUFFER); +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_recursive_halving.c +@@ -8,10 +8,6 @@ + + /* A recursive halving MPI_Ireduce_scatter_block algorithm. Requires that op is + * commutative. Typically yields better performance for shorter messages. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ireduce_scatter_block_sched_intra_recursive_halving +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ireduce_scatter_block_sched_intra_recursive_halving(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_tsp_recexch_algos.h ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_tsp_recexch_algos.h +@@ -18,21 +18,16 @@ + #include "recexchalgo.h" + + /* Routine to schedule a recursive exchange based reduce_scatter with distance halving in each phase */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, +- MPI_Op op, int tag, MPIR_Comm * comm, int k, ++ MPI_Op op, MPIR_Comm * comm, int k, + MPIR_TSP_sched_t * sched) + { + int mpi_errno = MPI_SUCCESS; + int is_inplace; + size_t extent; + MPI_Aint lb, true_extent; +- int is_commutative; +- int step1_sendto = -1, step2_nphases, step1_nrecvs; ++ int step1_sendto = -1, step2_nphases = 0, step1_nrecvs = 0; + int in_step2; + int *step1_recvfrom = NULL; + int **step2_nbrs = NULL; +@@ -42,6 +37,7 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void + int dtcopy_id = -1, send_id = -1, recv_id = -1, reduce_id = -1, step1_id = -1; + int nvtcs, vtcs[2]; + void *tmp_recvbuf = NULL, *tmp_results = NULL; ++ int tag; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IREDUCE_SCATTER_BLOCK_SCHED_INTRA_RECEXCH); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_IREDUCE_SCATTER_BLOCK_SCHED_INTRA_RECEXCH); +@@ -50,6 +46,10 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void + return mpi_errno; + } + ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ + is_inplace = (sendbuf == MPI_IN_PLACE); + nranks = MPIR_Comm_size(comm); + rank = MPIR_Comm_rank(comm); +@@ -57,8 +57,7 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void + MPIR_Datatype_get_extent_macro(datatype, extent); + MPIR_Type_get_true_extent_impl(datatype, &lb, &true_extent); + extent = MPL_MAX(extent, true_extent); +- is_commutative = MPIR_Op_is_commutative(op); +- MPIR_Assert(is_commutative == 1); ++ MPIR_Assert(MPIR_Op_is_commutative(op) == 1); + + total_count = nranks * recvcount; + +@@ -207,16 +206,11 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void + + + /* Non-blocking recexch based REDUCE_SCATTER_BLOCK */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Ireduce_scatter_block_intra_recexch +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Ireduce_scatter_block_intra_recexch(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request ** req, int k) + { + int mpi_errno = MPI_SUCCESS; +- int tag; + MPIR_TSP_sched_t *sched; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_IREDUCE_SCATTER_BLOCK_INTRA_RECEXCH); +@@ -229,15 +223,9 @@ int MPIR_TSP_Ireduce_scatter_block_intra_recexch(const void *sendbuf, void *recv + MPIR_Assert(sched != NULL); + MPIR_TSP_sched_create(sched); + +- /* For correctness, transport based collectives need to get the +- * tag from the same pool as schedule based collectives */ +- mpi_errno = MPIR_Sched_next_tag(comm, &tag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- + mpi_errno = + MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(sendbuf, recvbuf, recvcount, datatype, +- op, tag, comm, k, sched); ++ op, comm, k, sched); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +--- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_tsp_recexch_algos_prototypes.h ++++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_tsp_recexch_algos_prototypes.h +@@ -22,7 +22,7 @@ + + int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, +- MPI_Op op, int tag, MPIR_Comm * comm, int k, ++ MPI_Op op, MPIR_Comm * comm, int k, + MPIR_TSP_sched_t * sched); + + int MPIR_TSP_Ireduce_scatter_block_intra_recexch(const void *sendbuf, void *recvbuf, int recvcount, +--- a/src/mpi/coll/iscan/Makefile.mk ++++ b/src/mpi/coll/iscan/Makefile.mk +@@ -17,4 +17,6 @@ mpi_sources += \ + + mpi_core_sources += \ + src/mpi/coll/iscan/iscan_intra_recursive_doubling.c \ +- src/mpi/coll/iscan/iscan_intra_smp.c ++ src/mpi/coll/iscan/iscan_intra_smp.c \ ++ src/mpi/coll/iscan/iscan_gentran_algos.c \ ++ src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c +--- a/src/mpi/coll/iscan/iscan.c ++++ b/src/mpi/coll/iscan/iscan.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_ISCAN_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -21,6 +21,7 @@ cvars: + Variable to select allgather algorithm + auto - Internal algorithm selection + recursive_doubling - Force recursive doubling algorithm ++ gentran_recursive_doubling - Force generic transport recursive doubling algorithm + + - name : MPIR_CVAR_ISCAN_DEVICE_COLLECTIVE + category : COLLECTIVE +@@ -59,10 +60,6 @@ int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty + #undef MPI_Iscan + #define MPI_Iscan PMPI_Iscan + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscan_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscan_sched_intra_auto(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Sched_t s) +@@ -80,22 +77,18 @@ int MPIR_Iscan_sched_intra_auto(const void *sendbuf, void *recvbuf, int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscan_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscan_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +- switch (MPIR_Iscan_intra_algo_choice) { +- case MPIR_ISCAN_INTRA_ALGO_RECURSIVE_DOUBLING: ++ switch (MPIR_CVAR_ISCAN_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ISCAN_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = + MPIR_Iscan_sched_intra_recursive_doubling(sendbuf, recvbuf, count, datatype, op, + comm_ptr, s); + break; +- case MPIR_ISCAN_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ISCAN_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -112,10 +105,6 @@ int MPIR_Iscan_sched_impl(const void *sendbuf, void *recvbuf, int count, MPI_Dat + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscan_sched(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -130,10 +119,6 @@ int MPIR_Iscan_sched(const void *sendbuf, void *recvbuf, int count, MPI_Datatype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscan_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscan_impl(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request) + { +@@ -143,6 +128,28 @@ int MPIR_Iscan_impl(const void *sendbuf, void *recvbuf, int count, + + *request = NULL; + ++ /* If the user picks one of the transport-enabled algorithms, branch there ++ * before going down to the MPIR_Sched-based algorithms. */ ++ /* TODO - Eventually the intention is to replace all of the ++ * MPIR_Sched-based algorithms with transport-enabled algorithms, but that ++ * will require sufficient performance testing and replacement algorithms. */ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ /* intracommunicator */ ++ switch (MPIR_CVAR_ISCAN_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ISCAN_INTRA_ALGORITHM_gentran_recursive_doubling: ++ mpi_errno = ++ MPIR_Iscan_intra_gentran_recursive_doubling(sendbuf, recvbuf, count, ++ datatype, op, comm_ptr, request); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ break; ++ default: ++ /* go down to the MPIR_Sched-based algorithms */ ++ break; ++ } ++ } ++ + mpi_errno = MPIR_Sched_next_tag(comm_ptr, &tag); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -164,10 +171,6 @@ int MPIR_Iscan_impl(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** request) + { +@@ -184,10 +187,6 @@ int MPIR_Iscan(const void *sendbuf, void *recvbuf, int count, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Iscan - Computes the scan (partial reductions) of data on a collection of + processes in a nonblocking way +@@ -304,12 +303,12 @@ int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_iscan", "**mpi_iscan %p %p %d %D %O %C %p", sendbuf, + recvbuf, count, datatype, op, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iscan/iscan_gentran_algos.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++#include "tsp_gentran.h" ++ ++/* instantiate iscan algorithms for the gentran transport */ ++#include "iscan_tsp_recursive_doubling_algos_prototypes.h" ++#include "iscan_tsp_recursive_doubling_algos.h" ++#include "iscan_tsp_recursive_doubling_algos_undef.h" ++ ++#include "tsp_undef.h" +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iscan/iscan_intra_gentran_recursive_doubling.c +@@ -0,0 +1,29 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iscan_tsp_recursive_doubling_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iscan_intra_gentran_recursive_doubling(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iscan_intra_recursive_doubling(sendbuf, recvbuf, count, datatype, op, ++ comm, req); ++ ++ return mpi_errno; ++} +--- a/src/mpi/coll/iscan/iscan_intra_recursive_doubling.c ++++ b/src/mpi/coll/iscan/iscan_intra_recursive_doubling.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscan_sched_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscan_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -37,10 +33,6 @@ int MPIR_Iscan_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf + MPIR_SCHED_CHKPMEM_MALLOC(partial_scan, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "partial_scan", MPL_MEM_BUFFER); + +- /* This eventually gets malloc()ed as a temp buffer, not added to +- * any user buffers */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + /* adjust for potential negative lower bound in datatype */ + partial_scan = (void *) ((char *) partial_scan - true_lb); + +--- a/src/mpi/coll/iscan/iscan_intra_smp.c ++++ b/src/mpi/coll/iscan/iscan_intra_smp.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscan_sched_intra_smp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscan_sched_intra_smp(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + { +@@ -42,8 +38,6 @@ int MPIR_Iscan_sched_intra_smp(const void *sendbuf, void *recvbuf, int count, MP + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_SCHED_CHKPMEM_MALLOC(tempbuf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + tempbuf = (void *) ((char *) tempbuf - true_lb); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iscan/iscan_tsp_recursive_doubling_algos.h +@@ -0,0 +1,165 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., ISCAN_TSP_RECURSIVE_DOUBLING_ALGOS_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "algo_common.h" ++#include "tsp_namespace_def.h" ++ ++/* Routine to schedule a recursive exchange based scan */ ++int MPIR_TSP_Iscan_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_TSP_sched_t * sched) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPI_Aint extent, true_extent; ++ MPI_Aint lb; ++ int nranks, rank; ++ int is_commutative; ++ int mask, recv_reduce = -1; ++ int dst, loop_count; ++ void *partial_scan = NULL; ++ void *tmp_buf = NULL; ++ int tag = 0; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_ISCAN_SCHED_INTRA_RECURSIVE_DOUBLING); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_ISCAN_SCHED_INTRA_RECURSIVE_DOUBLING); ++ ++ /* For correctness, transport based collectives need to get the ++ * tag from the same pool as schedule based collectives */ ++ mpi_errno = MPIR_Sched_next_tag(comm, &tag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (count == 0) ++ goto fn_exit; ++ ++ nranks = MPIR_Comm_size(comm); ++ rank = MPIR_Comm_rank(comm); ++ ++ is_commutative = MPIR_Op_is_commutative(op); ++ ++ MPIR_Datatype_get_extent_macro(datatype, extent); ++ MPIR_Type_get_true_extent_impl(datatype, &lb, &true_extent); ++ extent = MPL_MAX(extent, true_extent); ++ ++ partial_scan = MPIR_TSP_sched_malloc(count * extent, sched); ++ ++ int dtcopy_id; ++ if (sendbuf != MPI_IN_PLACE) { ++ /* Since this is an inclusive scan, copy local contribution into ++ * recvbuf. */ ++ MPIR_TSP_sched_localcopy(sendbuf, count, datatype, recvbuf, count, datatype, sched, 0, ++ NULL); ++ dtcopy_id = ++ MPIR_TSP_sched_localcopy(sendbuf, count, datatype, partial_scan, count, datatype, sched, ++ 0, NULL); ++ } else ++ dtcopy_id = ++ MPIR_TSP_sched_localcopy(recvbuf, count, datatype, partial_scan, count, datatype, sched, ++ 0, NULL); ++ ++ tmp_buf = MPIR_TSP_sched_malloc(count * extent, sched); ++ mask = 0x1; ++ loop_count = 0; ++ ++ int send_id, recv_id; ++ int reduce_id = 0; /* warning fix: icc: maybe used before set */ ++ while (mask < nranks) { ++ dst = rank ^ mask; ++ if (dst < nranks) { ++ int nvtcs, vtcs[2]; ++ ++ /* Send partial_scan to dst. Recv into tmp_buf */ ++ nvtcs = 1; ++ vtcs[0] = (loop_count == 0) ? dtcopy_id : reduce_id; ++ send_id = ++ MPIR_TSP_sched_isend(partial_scan, count, datatype, dst, tag, comm, sched, nvtcs, ++ vtcs); ++ ++ if (recv_reduce != -1) { ++ nvtcs++; ++ vtcs[1] = recv_reduce; ++ } ++ recv_id = ++ MPIR_TSP_sched_irecv(tmp_buf, count, datatype, dst, tag, comm, sched, nvtcs, vtcs); ++ ++ nvtcs = 2; ++ vtcs[0] = send_id; ++ vtcs[1] = recv_id; ++ if (rank > dst) { ++ reduce_id = MPIR_TSP_sched_reduce_local(tmp_buf, partial_scan, count, ++ datatype, op, sched, nvtcs, vtcs); ++ recv_reduce = MPIR_TSP_sched_reduce_local(tmp_buf, recvbuf, count, ++ datatype, op, sched, nvtcs, vtcs); ++ } else { ++ if (is_commutative) { ++ reduce_id = MPIR_TSP_sched_reduce_local(tmp_buf, partial_scan, count, ++ datatype, op, sched, nvtcs, vtcs); ++ } else { ++ reduce_id = MPIR_TSP_sched_reduce_local(partial_scan, tmp_buf, count, ++ datatype, op, sched, nvtcs, vtcs); ++ ++ reduce_id = MPIR_TSP_sched_localcopy(tmp_buf, count, datatype, ++ partial_scan, count, datatype, sched, 1, ++ &reduce_id); ++ } ++ recv_reduce = -1; ++ } ++ loop_count++; ++ } ++ mask <<= 1; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_ISCAN_SCHED_INTRA_RECURSIVE_DOUBLING); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/* Non-blocking recursive_doubling based SCAN */ ++int MPIR_TSP_Iscan_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_TSP_sched_t *sched; ++ *req = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_TSP_ISCAN_INTRA_RECURSIVE_DOUBLING); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_TSP_ISCAN_INTRA_RECURSIVE_DOUBLING); ++ ++ /* generate the schedule */ ++ sched = MPL_malloc(sizeof(MPIR_TSP_sched_t), MPL_MEM_COLL); ++ MPIR_ERR_CHKANDJUMP(!sched, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ MPIR_TSP_sched_create(sched); ++ ++ mpi_errno = ++ MPIR_TSP_Iscan_sched_intra_recursive_doubling(sendbuf, recvbuf, count, datatype, ++ op, comm, sched); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* start and register the schedule */ ++ mpi_errno = MPIR_TSP_sched_start(sched, comm, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_TSP_ISCAN_INTRA_RECURSIVE_DOUBLING); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iscan/iscan_tsp_recursive_doubling_algos_prototypes.h +@@ -0,0 +1,29 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., ISCAN_TSP_RECURSIVE_DOUBLING_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#include "tsp_namespace_def.h" ++ ++#undef MPIR_TSP_Iscan_intra_recursive_doubling ++#define MPIR_TSP_Iscan_intra_recursive_doubling MPIR_TSP_NAMESPACE(Iscan_intra_recursive_doubling) ++#undef MPIR_TSP_Iscan_sched_intra_recursive_doubling ++#define MPIR_TSP_Iscan_sched_intra_recursive_doubling MPIR_TSP_NAMESPACE(Iscan_sched_intra_recursive_doubling) ++ ++int MPIR_TSP_Iscan_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_TSP_sched_t * s); ++ ++int MPIR_TSP_Iscan_intra_recursive_doubling(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req); +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iscan/iscan_tsp_recursive_doubling_algos_undef.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* Header protection (i.e., ISCAN_TSP_ALGOS_PROTOTYPES_H_INCLUDED) is ++ * intentionally omitted since this header might get included multiple ++ * times within the same .c file. */ ++ ++#undef MPIR_TSP_Iscan_intra_recursive_doubling ++#undef MPIR_TSP_Iscan_sched_intra_recursive_doubling +--- a/src/mpi/coll/iscatter/Makefile.mk ++++ b/src/mpi/coll/iscatter/Makefile.mk +@@ -20,4 +20,4 @@ mpi_core_sources += \ + src/mpi/coll/iscatter/iscatter_inter_linear.c \ + src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c \ + src/mpi/coll/iscatter/iscatter_gentran_algos.c \ +- src/mpi/coll/iscatter/iscatter_intra_tree.c ++ src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c +--- a/src/mpi/coll/iscatter/iscatter.c ++++ b/src/mpi/coll/iscatter/iscatter.c +@@ -12,16 +12,16 @@ + cvars: + - name : MPIR_CVAR_ISCATTER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC + scope : MPI_T_SCOPE_ALL_EQ + description : |- + Variable to select iscatter algorithm +- auto - Internal algorithm selection +- binomial - Force binomial algorithm +- tree - Force genetric transport based tree algorithm ++ auto - Internal algorithm selection ++ binomial - Force binomial algorithm ++ gentran_tree - Force genetric transport based tree algorithm + + - name : MPIR_CVAR_ISCATTER_TREE_KVAL + category : COLLECTIVE +@@ -35,7 +35,7 @@ cvars: + + - name : MPIR_CVAR_ISCATTER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -94,10 +94,6 @@ struct shared_state { + }; + + /* any non-MPI functions go here, especially non-static ones */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -117,10 +113,6 @@ int MPIR_Iscatter_sched_intra_auto(const void *sendbuf, int sendcount, MPI_Datat + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -159,10 +151,6 @@ int MPIR_Iscatter_sched_inter_auto(const void *sendbuf, int sendcount, MPI_Datat + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -171,13 +159,13 @@ int MPIR_Iscatter_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype se + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Iscatter_intra_algo_choice) { +- case MPIR_ISCATTER_INTRA_ALGO_BINOMIAL: ++ switch (MPIR_CVAR_ISCATTER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ISCATTER_INTRA_ALGORITHM_binomial: + mpi_errno = MPIR_Iscatter_sched_intra_binomial(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, s); + break; +- case MPIR_ISCATTER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ISCATTER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Iscatter_sched_intra_auto(sendbuf, sendcount, sendtype, +@@ -187,20 +175,20 @@ int MPIR_Iscatter_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype se + } + } else { + /* intercommunicator */ +- switch (MPIR_Iscatter_inter_algo_choice) { +- case MPIR_ISCATTER_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_ISCATTER_INTER_ALGORITHM) { ++ case MPIR_CVAR_ISCATTER_INTER_ALGORITHM_linear: + mpi_errno = MPIR_Iscatter_sched_inter_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, s); + break; +- case MPIR_ISCATTER_INTER_ALGO_REMOTE_SEND_LOCAL_SCATTER: ++ case MPIR_CVAR_ISCATTER_INTER_ALGORITHM_remote_send_local_scatter: + mpi_errno = + MPIR_Iscatter_sched_inter_remote_send_local_scatter(sendbuf, sendcount, + sendtype, recvbuf, + recvcount, recvtype, root, + comm_ptr, s); + break; +- case MPIR_ISCATTER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_ISCATTER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Iscatter_sched_inter_auto(sendbuf, sendcount, sendtype, +@@ -213,10 +201,6 @@ int MPIR_Iscatter_sched_impl(const void *sendbuf, int sendcount, MPI_Datatype se + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -234,10 +218,6 @@ int MPIR_Iscatter_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtyp + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -255,11 +235,12 @@ int MPIR_Iscatter_impl(const void *sendbuf, int sendcount, + * will require sufficient performance testing and replacement algorithms. */ + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Iscatter_intra_algo_choice) { +- case MPIR_ISCATTER_INTRA_ALGO_TREE: ++ switch (MPIR_CVAR_ISCATTER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ISCATTER_INTRA_ALGORITHM_gentran_tree: + mpi_errno = +- MPIR_Iscatter_intra_tree(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, root, comm_ptr, request); ++ MPIR_Iscatter_intra_gentran_tree(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, root, comm_ptr, ++ request); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; +@@ -296,10 +277,6 @@ int MPIR_Iscatter_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -319,10 +296,6 @@ int MPIR_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Iscatter - Sends data from one process to all other processes in a + communicator in a nonblocking way +@@ -492,13 +465,13 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_iscatter", "**mpi_iscatter %p %d %D %p %d %D %d %C %p", + sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, + comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/iscatter/iscatter_inter_linear.c ++++ b/src/mpi/coll/iscatter/iscatter_inter_linear.c +@@ -14,10 +14,6 @@ + * Cost: p.alpha + n.beta + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_sched_inter_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter_sched_inter_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Sched_t s) +--- a/src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c ++++ b/src/mpi/coll/iscatter/iscatter_inter_remote_send_local_scatter.c +@@ -15,10 +15,6 @@ + * where n is the total size of the data to be scattered from the root. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_sched_inter_remote_send_local_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter_sched_inter_remote_send_local_scatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -27,8 +23,6 @@ int MPIR_Iscatter_sched_inter_remote_send_local_scatter(const void *sendbuf, int + { + int mpi_errno = MPI_SUCCESS; + int rank, local_size, remote_size; +- MPI_Aint extent, true_extent, true_lb = 0; +- void *tmp_buf = NULL; + MPIR_Comm *newcomm_ptr = NULL; + MPIR_SCHED_CHKPMEM_DECL(1); + +@@ -50,28 +44,26 @@ int MPIR_Iscatter_sched_inter_remote_send_local_scatter(const void *sendbuf, int + } else { + /* remote group. rank 0 receives data from root. need to + * allocate temporary buffer to store this data. */ ++ MPI_Aint recvtype_sz; ++ void *tmp_buf = NULL; ++ + rank = comm_ptr->rank; + + if (rank == 0) { +- MPIR_Type_get_true_extent_impl(recvtype, &true_lb, &true_extent); +- +- MPIR_Datatype_get_extent_macro(recvtype, extent); +- MPIR_Ensure_Aint_fits_in_pointer(extent * recvcount * local_size); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- sendcount * remote_size * extent); +- ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, +- recvcount * local_size * (MPL_MAX(extent, true_extent)), ++ recvcount * local_size * recvtype_sz, + mpi_errno, "tmp_buf", MPL_MEM_BUFFER); + +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - true_lb); +- + mpi_errno = +- MPIR_Sched_recv(tmp_buf, recvcount * local_size, recvtype, root, comm_ptr, s); ++ MPIR_Sched_recv(tmp_buf, recvcount * local_size * recvtype_sz, MPI_BYTE, ++ root, comm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); ++ } else { ++ /* silience -Wmaybe-uninitialized due to MPIR_Iscatter_sched by non-zero ranks */ ++ recvtype_sz = 0; + } + + /* Get the local intracommunicator */ +@@ -82,8 +74,8 @@ int MPIR_Iscatter_sched_inter_remote_send_local_scatter(const void *sendbuf, int + + /* now do the usual scatter on this intracommunicator */ + mpi_errno = +- MPIR_Iscatter_sched(tmp_buf, recvcount, recvtype, recvbuf, recvcount, recvtype, 0, +- newcomm_ptr, s); ++ MPIR_Iscatter_sched(tmp_buf, recvcount * recvtype_sz, MPI_BYTE, ++ recvbuf, recvcount, recvtype, 0, newcomm_ptr, s); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_SCHED_BARRIER(s); +--- a/src/mpi/coll/iscatter/iscatter_intra_binomial.c ++++ b/src/mpi/coll/iscatter/iscatter_intra_binomial.c +@@ -64,10 +64,6 @@ static int calc_curr_count(MPIR_Comm * comm, int tag, void *state) + + End Algorithm: MPI_Scatter + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_sched_intra_binomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatter_sched_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -102,13 +98,9 @@ int MPIR_Iscatter_sched_intra_binomial(const void *sendbuf, int sendcount, MPI_D + * in the event of recvbuf=MPI_IN_PLACE on the root, + * recvcount and recvtype are not valid */ + MPIR_Datatype_get_size_macro(sendtype, sendtype_size); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- extent * sendcount * comm_size); +- + ss->nbytes = sendtype_size * sendcount; + } else { + MPIR_Datatype_get_size_macro(recvtype, recvtype_size); +- MPIR_Ensure_Aint_fits_in_pointer(extent * recvcount * comm_size); + ss->nbytes = recvtype_size * recvcount; + } + +new file mode 100644 +--- /dev/null ++++ b/src/mpi/coll/iscatter/iscatter_intra_gentran_tree.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2017 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++ ++/* generate gentran algo prototypes */ ++#include "tsp_gentran.h" ++#include "iscatter_tsp_tree_algos_prototypes.h" ++#include "tsp_undef.h" ++ ++int MPIR_Iscatter_intra_gentran_tree(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, ++ MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPII_Gentran_Iscatter_intra_tree(sendbuf, sendcount, sendtype, ++ recvbuf, recvcount, recvtype, ++ root, comm_ptr, request, ++ MPIR_CVAR_ISCATTER_TREE_KVAL); ++ ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpi/coll/iscatter/iscatter_intra_tree.c ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2017 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpiimpl.h" +- +-/* generate gentran algo prototypes */ +-#include "tsp_gentran.h" +-#include "iscatter_tsp_tree_algos_prototypes.h" +-#include "tsp_undef.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatter_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Iscatter_intra_tree(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPII_Gentran_Iscatter_intra_tree(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, +- root, comm_ptr, request, +- MPIR_CVAR_ISCATTER_TREE_KVAL); +- +- return mpi_errno; +-} +--- a/src/mpi/coll/iscatter/iscatter_tsp_tree_algos.h ++++ b/src/mpi/coll/iscatter/iscatter_tsp_tree_algos.h +@@ -17,10 +17,6 @@ + #include "tsp_namespace_def.h" + + /* Routine to schedule a tree based scatter */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iscattert_sched_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -33,13 +29,13 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, int sendcount, + int size, rank; + int i, j, is_inplace = false; + int lrank; +- size_t sendtype_lb, sendtype_extent, sendtype_true_extent; +- size_t recvtype_lb, recvtype_extent, recvtype_true_extent; ++ MPI_Aint sendtype_lb, sendtype_extent, sendtype_true_extent; ++ MPI_Aint recvtype_lb, recvtype_extent, recvtype_true_extent; + int dtcopy_id[2]; + void *tmp_buf = NULL; + int recv_id; + int tree_type; +- MPII_Treealgo_tree_t my_tree, parents_tree; ++ MPIR_Treealgo_tree_t my_tree, parents_tree; + int next_child; + int num_children, *child_subtree_size = NULL, *child_data_offset = NULL; + int offset, recv_size; +@@ -54,7 +50,7 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, int sendcount, + is_inplace = (recvbuf == MPI_IN_PLACE); /* For scatter, MPI_IN_PLACE is significant only at root */ + + tree_type = MPIR_TREE_TYPE_KNOMIAL_1; /* currently only tree_type=MPIR_TREE_TYPE_KNOMIAL_1 is supported for scatter */ +- mpi_errno = MPII_Treealgo_tree_create(rank, size, tree_type, k, root, &my_tree); ++ mpi_errno = MPIR_Treealgo_tree_create(rank, size, tree_type, k, root, &my_tree); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + num_children = my_tree.num_children; +@@ -89,7 +85,7 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, int sendcount, + + /* get tree information of the parent */ + if (my_tree.parent != -1) { +- MPII_Treealgo_tree_create(my_tree.parent, size, tree_type, k, root, &parents_tree); ++ MPIR_Treealgo_tree_create(my_tree.parent, size, tree_type, k, root, &parents_tree); + } else { /* initialize an empty children array */ + utarray_new(parents_tree.children, &ut_int_icd, MPL_MEM_COLL); + parents_tree.num_children = 0; +@@ -122,7 +118,7 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, int sendcount, + recv_size += child_subtree_size[i]; + } + +- MPII_Treealgo_tree_free(&parents_tree); ++ MPIR_Treealgo_tree_free(&parents_tree); + + recv_size *= (lrank == 0) ? sendcount : recvcount; + offset = (lrank == 0) ? sendcount : recvcount; +@@ -181,7 +177,7 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, int sendcount, + recvcount, recvtype, sched, 0, NULL); + } + +- MPII_Treealgo_tree_free(&my_tree); ++ MPIR_Treealgo_tree_free(&my_tree); + + fn_exit: + MPL_free(child_subtree_size); +@@ -194,10 +190,6 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, int sendcount, + + + /* Non-blocking tree based scatter */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_TSP_Iscatter_intra_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_TSP_Iscatter_intra_tree(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +--- a/src/mpi/coll/iscatterv/iscatterv.c ++++ b/src/mpi/coll/iscatterv/iscatterv.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_ISCATTERV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_ISCATTERV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -74,10 +74,6 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[ + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatterv_sched_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatterv_sched_intra_auto(const void *sendbuf, const int sendcounts[], const int displs[], + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -98,10 +94,6 @@ int MPIR_Iscatterv_sched_intra_auto(const void *sendbuf, const int sendcounts[], + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatterv_sched_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatterv_sched_inter_auto(const void *sendbuf, const int sendcounts[], const int displs[], + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -122,10 +114,6 @@ int MPIR_Iscatterv_sched_inter_auto(const void *sendbuf, const int sendcounts[], + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatterv_sched_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatterv_sched_impl(const void *sendbuf, const int sendcounts[], const int displs[], + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -133,14 +121,14 @@ int MPIR_Iscatterv_sched_impl(const void *sendbuf, const int sendcounts[], const + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Iscatterv_intra_algo_choice) { +- case MPIR_ISCATTERV_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_ISCATTERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_ISCATTERV_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Iscatterv_sched_allcomm_linear(sendbuf, sendcounts, displs, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, s); + break; +- case MPIR_ISCATTERV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_ISCATTERV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -149,14 +137,14 @@ int MPIR_Iscatterv_sched_impl(const void *sendbuf, const int sendcounts[], const + break; + } + } else { +- switch (MPIR_Iscatterv_inter_algo_choice) { +- case MPIR_ISCATTERV_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_ISCATTERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_ISCATTERV_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Iscatterv_sched_allcomm_linear(sendbuf, sendcounts, displs, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, s); + break; +- case MPIR_ISCATTERV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_ISCATTERV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -174,10 +162,6 @@ int MPIR_Iscatterv_sched_impl(const void *sendbuf, const int sendcounts[], const + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatterv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatterv_sched(const void *sendbuf, const int sendcounts[], const int displs[], + MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) +@@ -195,10 +179,6 @@ int MPIR_Iscatterv_sched(const void *sendbuf, const int sendcounts[], const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatterv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatterv_impl(const void *sendbuf, const int sendcounts[], const int displs[], + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -233,10 +213,6 @@ int MPIR_Iscatterv_impl(const void *sendbuf, const int sendcounts[], const int d + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[], + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, MPIR_Request ** request) +@@ -256,10 +232,6 @@ int MPIR_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Iscatterv - Scatters a buffer in parts to all processes in a communicator + in a nonblocking way +@@ -457,13 +429,13 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[ + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_iscatterv", "**mpi_iscatterv %p %p %p %D %p %d %D %d %C %p", + sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, + recvtype, root, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c ++++ b/src/mpi/coll/iscatterv/iscatterv_allcomm_linear.c +@@ -16,10 +16,6 @@ + * + * Cost = (p-1).alpha + n.((p-1)/p).beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Iscatterv_sched_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Iscatterv_sched_allcomm_linear(const void *sendbuf, const int sendcounts[], + const int displs[], MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, +@@ -41,13 +37,6 @@ int MPIR_Iscatterv_sched_allcomm_linear(const void *sendbuf, const int sendcount + comm_size = comm_ptr->remote_size; + + MPIR_Datatype_get_extent_macro(sendtype, extent); +- /* We need a check to ensure extent will fit in a +- * pointer. That needs extent * (max count) but we can't get +- * that without looping over the input data. This is at least +- * a minimal sanity check. Maybe add a global var since we do +- * loop over sendcount[] in MPI_Scatterv before calling +- * this? */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + extent); + + for (i = 0; i < comm_size; i++) { + if (sendcounts[i]) { +--- a/src/mpi/coll/nbcutil.c ++++ b/src/mpi/coll/nbcutil.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Sched_cb_free_buf +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Sched_cb_free_buf(MPIR_Comm * comm, int tag, void *state) + { + MPL_free(state); +--- a/src/mpi/coll/neighbor_allgather/neighbor_allgather.c ++++ b/src/mpi/coll/neighbor_allgather/neighbor_allgather.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_NEIGHBOR_ALLGATHER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_NEIGHBOR_ALLGATHER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -73,10 +73,6 @@ int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype send + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgather_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgather_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr) +@@ -95,10 +91,6 @@ int MPIR_Neighbor_allgather_intra_auto(const void *sendbuf, int sendcount, MPI_D + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgather_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgather_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr) +@@ -117,10 +109,6 @@ int MPIR_Neighbor_allgather_inter_auto(const void *sendbuf, int sendcount, MPI_D + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgather_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgather_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr) +@@ -128,13 +116,13 @@ int MPIR_Neighbor_allgather_impl(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Neighbor_allgather_intra_algo_choice) { +- case MPIR_NEIGHBOR_ALLGATHER_INTRA_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLGATHER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLGATHER_INTRA_ALGORITHM_nb: + mpi_errno = + MPIR_Neighbor_allgather_allcomm_nb(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLGATHER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLGATHER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -143,13 +131,13 @@ int MPIR_Neighbor_allgather_impl(const void *sendbuf, int sendcount, + break; + } + } else { +- switch (MPIR_Neighbor_allgather_inter_algo_choice) { +- case MPIR_NEIGHBOR_ALLGATHER_INTER_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLGATHER_INTER_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLGATHER_INTER_ALGORITHM_nb: + mpi_errno = + MPIR_Neighbor_allgather_allcomm_nb(sendbuf, sendcount, sendtype, recvbuf, + recvcount, recvtype, comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLGATHER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLGATHER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -167,10 +155,6 @@ int MPIR_Neighbor_allgather_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr) +@@ -190,10 +174,6 @@ int MPIR_Neighbor_allgather(const void *sendbuf, int sendcount, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Neighbor_allgather - In this function, each process i gathers data items + from each process j if an edge (j,i) exists in the topology graph, and each +@@ -293,13 +273,13 @@ int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype send + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_neighbor_allgather", + "**mpi_neighbor_allgather %p %d %D %p %d %D %C", sendbuf, + sendcount, sendtype, recvbuf, recvcount, recvtype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c ++++ b/src/mpi/coll/neighbor_allgather/neighbor_allgather_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgather_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgather_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr) +--- a/src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c ++++ b/src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -74,10 +74,6 @@ int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sen + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgatherv_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgatherv_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr) +@@ -97,10 +93,6 @@ int MPIR_Neighbor_allgatherv_intra_auto(const void *sendbuf, int sendcount, MPI_ + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgatherv_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgatherv_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr) +@@ -120,10 +112,6 @@ int MPIR_Neighbor_allgatherv_inter_auto(const void *sendbuf, int sendcount, MPI_ + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgatherv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgatherv_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -132,13 +120,13 @@ int MPIR_Neighbor_allgatherv_impl(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Neighbor_allgatherv_intra_algo_choice) { +- case MPIR_NEIGHBOR_ALLGATHERV_INTRA_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Neighbor_allgatherv_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLGATHERV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Neighbor_allgatherv_intra_auto(sendbuf, sendcount, sendtype, +@@ -147,13 +135,13 @@ int MPIR_Neighbor_allgatherv_impl(const void *sendbuf, int sendcount, + break; + } + } else { +- switch (MPIR_Neighbor_allgatherv_inter_algo_choice) { +- case MPIR_NEIGHBOR_ALLGATHERV_INTER_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Neighbor_allgatherv_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcounts, displs, + recvtype, comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLGATHERV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Neighbor_allgatherv_inter_auto(sendbuf, sendcount, sendtype, +@@ -171,10 +159,6 @@ int MPIR_Neighbor_allgatherv_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -195,10 +179,6 @@ int MPIR_Neighbor_allgatherv(const void *sendbuf, int sendcount, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Neighbor_allgatherv - The vector variant of MPI_Neighbor_allgather. + +@@ -296,13 +276,13 @@ int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sen + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_neighbor_allgatherv", + "**mpi_neighbor_allgatherv %p %d %D %p %p %p %D %C", sendbuf, + sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c ++++ b/src/mpi/coll/neighbor_allgatherv/neighbor_allgatherv_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_allgatherv_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_allgatherv_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], const int displs[], + MPI_Datatype recvtype, MPIR_Comm * comm_ptr) +--- a/src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c ++++ b/src/mpi/coll/neighbor_alltoall/neighbor_alltoall.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_NEIGHBOR_ALLTOALL_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_NEIGHBOR_ALLTOALL_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -73,10 +73,6 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoall_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoall_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr) +@@ -95,10 +91,6 @@ int MPIR_Neighbor_alltoall_intra_auto(const void *sendbuf, int sendcount, MPI_Da + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoall_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoall_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr) +@@ -117,10 +109,6 @@ int MPIR_Neighbor_alltoall_inter_auto(const void *sendbuf, int sendcount, MPI_Da + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoall_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoall_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr) +@@ -128,13 +116,13 @@ int MPIR_Neighbor_alltoall_impl(const void *sendbuf, int sendcount, + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Neighbor_alltoall_intra_algo_choice) { +- case MPIR_NEIGHBOR_ALLTOALL_INTRA_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLTOALL_INTRA_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLTOALL_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Neighbor_alltoall_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLTOALL_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLTOALL_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Neighbor_alltoall_intra_auto(sendbuf, sendcount, sendtype, +@@ -143,13 +131,13 @@ int MPIR_Neighbor_alltoall_impl(const void *sendbuf, int sendcount, + break; + } + } else { +- switch (MPIR_Neighbor_alltoall_inter_algo_choice) { +- case MPIR_NEIGHBOR_ALLTOALL_INTER_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLTOALL_INTER_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLTOALL_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Neighbor_alltoall_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, + comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLTOALL_INTER_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLTOALL_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Neighbor_alltoall_inter_auto(sendbuf, sendcount, sendtype, +@@ -167,10 +155,6 @@ int MPIR_Neighbor_alltoall_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr) +@@ -190,10 +174,6 @@ int MPIR_Neighbor_alltoall(const void *sendbuf, int sendcount, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Neighbor_alltoall - In this function, each process i receives data items + from each process j if an edge (j,i) exists in the topology graph or Cartesian +@@ -295,13 +275,13 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_neighbor_alltoall", + "**mpi_neighbor_alltoall %p %d %D %p %d %D %C", sendbuf, sendcount, + sendtype, recvbuf, recvcount, recvtype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c ++++ b/src/mpi/coll/neighbor_alltoall/neighbor_alltoall_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoall_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoall_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr) +--- a/src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c ++++ b/src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -74,10 +74,6 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallv_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallv_intra_auto(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], +@@ -98,10 +94,6 @@ int MPIR_Neighbor_alltoallv_intra_auto(const void *sendbuf, const int sendcounts + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallv_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallv_inter_auto(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], +@@ -122,10 +114,6 @@ int MPIR_Neighbor_alltoallv_inter_auto(const void *sendbuf, const int sendcounts + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -134,14 +122,14 @@ int MPIR_Neighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Neighbor_alltoallv_intra_algo_choice) { +- case MPIR_NEIGHBOR_ALLTOALLV_INTRA_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTRA_ALGORITHM_nb: + mpi_errno = + MPIR_Neighbor_alltoallv_allcomm_nb(sendbuf, sendcounts, sdispls, sendtype, + recvbuf, recvcounts, rdispls, recvtype, + comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLTOALLV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -151,14 +139,14 @@ int MPIR_Neighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], + break; + } + } else { +- switch (MPIR_Neighbor_alltoallv_inter_algo_choice) { +- case MPIR_NEIGHBOR_ALLTOALLV_INTER_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTER_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTER_ALGORITHM_nb: + mpi_errno = + MPIR_Neighbor_alltoallv_allcomm_nb(sendbuf, sendcounts, sdispls, sendtype, + recvbuf, recvcounts, rdispls, recvtype, + comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLTOALLV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -177,10 +165,6 @@ int MPIR_Neighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -203,10 +187,6 @@ int MPIR_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Neighbor_alltoallv - The vector variant of MPI_Neighbor_alltoall allows + sending/receiving different numbers of elements to and from each neighbor. +@@ -306,14 +286,14 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_neighbor_alltoallv", + "**mpi_neighbor_alltoallv %p %p %p %D %p %p %p %D %C", sendbuf, + sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, + recvtype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c ++++ b/src/mpi/coll/neighbor_alltoallv/neighbor_alltoallv_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallv_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallv_allcomm_nb(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int rdispls[], +--- a/src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c ++++ b/src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw.c +@@ -12,7 +12,7 @@ + cvars: + - name : MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -74,10 +74,6 @@ int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MP + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallw_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallw_intra_auto(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -99,10 +95,6 @@ int MPIR_Neighbor_alltoallw_intra_auto(const void *sendbuf, const int sendcounts + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallw_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallw_inter_auto(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -124,10 +116,6 @@ int MPIR_Neighbor_alltoallw_inter_auto(const void *sendbuf, const int sendcounts + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallw_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -138,14 +126,14 @@ int MPIR_Neighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Neighbor_alltoallw_intra_algo_choice) { +- case MPIR_NEIGHBOR_ALLTOALLW_INTRA_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTRA_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTRA_ALGORITHM_nb: + mpi_errno = + MPIR_Neighbor_alltoallw_allcomm_nb(sendbuf, sendcounts, sdispls, sendtypes, + recvbuf, recvcounts, rdispls, recvtypes, + comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLTOALLW_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -155,14 +143,14 @@ int MPIR_Neighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], + break; + } + } else { +- switch (MPIR_Neighbor_alltoallw_inter_algo_choice) { +- case MPIR_NEIGHBOR_ALLTOALLW_INTER_ALGO_NB: ++ switch (MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTER_ALGORITHM) { ++ case MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTER_ALGORITHM_nb: + mpi_errno = + MPIR_Neighbor_alltoallw_allcomm_nb(sendbuf, sendcounts, sdispls, sendtypes, + recvbuf, recvcounts, rdispls, recvtypes, + comm_ptr); + break; +- case MPIR_NEIGHBOR_ALLTOALLW_INTER_ALGO_AUTO: ++ case MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -181,10 +169,6 @@ int MPIR_Neighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -208,10 +192,6 @@ int MPIR_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Neighbor_alltoallw - Like MPI_Neighbor_alltoallv but it allows one to send + and receive with different types to and from each neighbor. +@@ -296,14 +276,14 @@ int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MP + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_neighbor_alltoallw", + "**mpi_neighbor_alltoallw %p %p %p %p %p %p %p %p %C", sendbuf, + sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, + recvtypes, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c ++++ b/src/mpi/coll/neighbor_alltoallw/neighbor_alltoallw_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Neighbor_alltoallw_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Neighbor_alltoallw_allcomm_nb(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +--- a/src/mpi/coll/op/op_commutative.c ++++ b/src/mpi/coll/op/op_commutative.c +@@ -28,10 +28,6 @@ int MPI_Op_commutative(MPI_Op op, int *commute) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Op_is_commutative +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* TODO with a modest amount of work in the handle allocator code we should be + * able to encode commutativity in the handle value and greatly simplify this + * routine */ +@@ -52,10 +48,6 @@ int MPIR_Op_is_commutative(MPI_Op op) + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Op_commutative +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Op_commutative(MPIR_Op * op_ptr, int *commute) + { + int mpi_errno = MPI_SUCCESS; +@@ -73,10 +65,6 @@ int MPIR_Op_commutative(MPIR_Op * op_ptr, int *commute) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPI_Op_commutative +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Op_commute - Queries an MPI reduction operation for its commutativity. + +@@ -141,10 +129,10 @@ int MPI_Op_commutative(MPI_Op op, int *commute) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_op_commutative", "**mpi_op_commutative %O %p", op, commute); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/coll/op/op_create.c ++++ b/src/mpi/coll/op/op_create.c +@@ -31,8 +31,8 @@ int MPI_Op_create(MPI_User_function * user_fn, int commute, MPI_Op * op) + #endif + + /* Preallocated op objects */ +-MPIR_Op MPIR_Op_builtin[MPIR_OP_N_BUILTIN] = { {0} }; +-MPIR_Op MPIR_Op_direct[MPIR_OP_PREALLOC] = { {0} }; ++MPIR_Op MPIR_Op_builtin[MPIR_OP_N_BUILTIN]; ++MPIR_Op MPIR_Op_direct[MPIR_OP_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Op_mem = { 0, 0, 0, 0, MPIR_OP, + sizeof(MPIR_Op), +@@ -65,12 +65,7 @@ void MPII_Op_set_fc(MPI_Op op) + } + #endif + +-#endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Op_create_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Op_create_impl(MPI_User_function * user_fn, int commute, MPI_Op * op) + { + MPIR_Op *op_ptr; +@@ -80,8 +75,8 @@ int MPIR_Op_create_impl(MPI_User_function * user_fn, int commute, MPI_Op * op) + /* --BEGIN ERROR HANDLING-- */ + if (!op_ptr) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**nomem", "**nomem %s", "MPI_Op"); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPI_Op"); + goto fn_fail; + } + /* --END ERROR HANDLING-- */ +@@ -94,9 +89,7 @@ int MPIR_Op_create_impl(MPI_User_function * user_fn, int commute, MPI_Op * op) + + MPIR_OBJ_PUBLISH_HANDLE(*op, op_ptr->handle); + +-#ifdef MPID_Op_commit_hook + MPID_Op_commit_hook(op_ptr); +-#endif + + fn_exit: + return mpi_errno; +@@ -104,10 +97,8 @@ int MPIR_Op_create_impl(MPI_User_function * user_fn, int commute, MPI_Op * op) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPI_Op_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) ++#endif /* MPICH_MPI_FROM_PMPI */ ++ + /*@ + MPI_Op_create - Creates a user-defined combination function handle + +@@ -168,12 +159,12 @@ int MPI_Op_create(MPI_User_function * user_fn, int commute, MPI_Op * op) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_op_create", "**mpi_op_create %p %d %p", user_fn, commute, + op); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/op/op_free.c ++++ b/src/mpi/coll/op/op_free.c +@@ -25,12 +25,7 @@ int MPI_Op_free(MPI_Op * op) __attribute__ ((weak, alias("PMPI_Op_free"))); + #undef MPI_Op_free + #define MPI_Op_free PMPI_Op_free + +-#endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Op_free_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Op_free_impl(MPI_Op * op) + { + MPIR_Op *op_ptr = NULL; +@@ -42,17 +37,13 @@ void MPIR_Op_free_impl(MPI_Op * op) + MPIR_Op_ptr_release_ref(op_ptr, &in_use); + if (!in_use) { + MPIR_Handle_obj_free(&MPIR_Op_mem, op_ptr); +-#ifdef MPID_Op_free_hook + MPID_Op_free_hook(op_ptr); +-#endif + } + *op = MPI_OP_NULL; + } + +-#undef FUNCNAME +-#define FUNCNAME MPI_Op_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) ++#endif ++ + /*@ + MPI_Op_free - Frees a user-defined combination function handle + +@@ -77,7 +68,6 @@ Input Parameters: + @*/ + int MPI_Op_free(MPI_Op * op) + { +- MPIR_Op *op_ptr = NULL; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_OP_FREE); + +@@ -86,16 +76,17 @@ int MPI_Op_free(MPI_Op * op) + MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_ENTER(MPID_STATE_MPI_OP_FREE); + +- MPIR_Op_get_ptr(*op, op_ptr); + #ifdef HAVE_ERROR_CHECKING + { + MPID_BEGIN_ERROR_CHECKS; + { ++ MPIR_Op *op_ptr = NULL; ++ MPIR_Op_get_ptr(*op, op_ptr); + MPIR_Op_valid_ptr(op_ptr, mpi_errno); + if (!mpi_errno) { + if (op_ptr->kind < MPIR_OP_KIND__USER_NONCOMMUTE) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**permop", 0); + } + } +@@ -124,10 +115,10 @@ int MPI_Op_free(MPI_Op * op) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_op_free", "**mpi_op_free %p", op); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/coll/op/opband.c ++++ b/src/mpi/coll/op/opband.c +@@ -16,10 +16,6 @@ + #define MPIR_LBAND(a,b) ((a)&(b)) + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_BAND +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_BAND(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -46,7 +42,7 @@ void MPIR_BAND(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_BAND"); + } +@@ -57,10 +53,6 @@ void MPIR_BAND(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_BAND_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_BAND_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -77,7 +69,7 @@ int MPIR_BAND_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_BAND"); + /* --END ERROR HANDLING-- */ +--- a/src/mpi/coll/op/opbor.c ++++ b/src/mpi/coll/op/opbor.c +@@ -16,10 +16,6 @@ + #define MPIR_LBOR(a,b) ((a)|(b)) + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_BOR +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_BOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -46,7 +42,7 @@ void MPIR_BOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_BOR"); + } +@@ -57,10 +53,6 @@ void MPIR_BOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_BAND_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_BOR_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -77,7 +69,7 @@ int MPIR_BOR_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", "MPI_BOR"); + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/op/opbxor.c ++++ b/src/mpi/coll/op/opbxor.c +@@ -16,10 +16,6 @@ + #define MPIR_LBXOR(a,b) ((a)^(b)) + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_BXOR +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_BXOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -46,7 +42,7 @@ void MPIR_BXOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_BXOR"); + } +@@ -57,10 +53,6 @@ void MPIR_BXOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_BXOR +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_BXOR_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -77,7 +69,7 @@ int MPIR_BXOR_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_BXOR"); + /* --END ERROR HANDLING-- */ +--- a/src/mpi/coll/op/opland.c ++++ b/src/mpi/coll/op/opland.c +@@ -19,10 +19,6 @@ + #define MPIR_LLAND(a,b) ((a)&&(b)) + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_LAND +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_LAND(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -61,10 +57,6 @@ void MPIR_LAND(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_OP_TYPE_GROUP(C_INTEGER_EXTRA) + MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER) + MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER_EXTRA) +- /* We previously supported floating point types, although I question +- * their utility in logical boolean ops [goodell@ 2009-03-16] */ +- MPIR_OP_TYPE_GROUP(FLOATING_POINT) +- MPIR_OP_TYPE_GROUP(FLOATING_POINT_EXTRA) + #undef MPIR_OP_TYPE_MACRO + /* --BEGIN ERROR HANDLING-- */ + default:{ +@@ -76,7 +68,7 @@ void MPIR_LAND(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_LAND"); + } +@@ -87,10 +79,6 @@ void MPIR_LAND(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_LAND +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_LAND_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -112,7 +100,7 @@ int MPIR_LAND_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_LAND"); + /* --END ERROR HANDLING-- */ +--- a/src/mpi/coll/op/oplor.c ++++ b/src/mpi/coll/op/oplor.c +@@ -19,10 +19,6 @@ + #define MPIR_LLOR(a,b) ((a)||(b)) + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_LOR +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_LOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -61,10 +57,6 @@ void MPIR_LOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_OP_TYPE_GROUP(C_INTEGER_EXTRA) + MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER) + MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER_EXTRA) +- /* We previously supported floating point types, although I question +- * their utility in logical boolean ops [goodell@ 2009-03-16] */ +- MPIR_OP_TYPE_GROUP(FLOATING_POINT) +- MPIR_OP_TYPE_GROUP(FLOATING_POINT_EXTRA) + #undef MPIR_OP_TYPE_MACRO + /* --BEGIN ERROR HANDLING-- */ + default:{ +@@ -76,7 +68,7 @@ void MPIR_LOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_LOR"); + } +@@ -87,10 +79,6 @@ void MPIR_LOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_LOR +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_LOR_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -112,7 +100,7 @@ int MPIR_LOR_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", "MPI_LOR"); + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/op/oplxor.c ++++ b/src/mpi/coll/op/oplxor.c +@@ -19,10 +19,6 @@ + #define MPIR_LLXOR(a,b) (((a)&&(!b))||((!a)&&(b))) + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_LXOR +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_LXOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -76,7 +72,7 @@ void MPIR_LXOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_LXOR"); + } +@@ -87,10 +83,6 @@ void MPIR_LXOR(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_LXOR +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_LXOR_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -112,7 +104,7 @@ int MPIR_LXOR_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_LXOR"); + /* --END ERROR HANDLING-- */ +--- a/src/mpi/coll/op/opmax.c ++++ b/src/mpi/coll/op/opmax.c +@@ -13,10 +13,6 @@ + * and floating point types (5.9.2 Predefined reduce operations) + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_MAXF +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_MAXF(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -43,7 +39,7 @@ void MPIR_MAXF(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_MAX"); + } +@@ -54,10 +50,6 @@ void MPIR_MAXF(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_MAXF_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_MAXF_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -74,7 +66,7 @@ int MPIR_MAXF_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", "MPI_MAX"); + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/op/opmaxloc.c ++++ b/src/mpi/coll/op/opmaxloc.c +@@ -72,10 +72,6 @@ typedef struct MPIR_longdoubleint_loctype { + break + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_MAXLOC +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_MAXLOC(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int mpi_errno = MPI_SUCCESS; +@@ -136,10 +132,6 @@ void MPIR_MAXLOC(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_MAXLOC_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_MAXLOC_check_dtype(MPI_Datatype type) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/coll/op/opmin.c ++++ b/src/mpi/coll/op/opmin.c +@@ -12,10 +12,6 @@ + * In MPI-2.1, this operation is valid only for C integer, Fortran integer, + * and floating point types (5.9.2 Predefined reduce operations) + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_MINF +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_MINF(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -42,7 +38,7 @@ void MPIR_MINF(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_MIN"); + } +@@ -53,10 +49,6 @@ void MPIR_MINF(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_MINF_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_MINF_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -73,7 +65,7 @@ int MPIR_MINF_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", "MPI_MIN"); + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/op/opminloc.c ++++ b/src/mpi/coll/op/opminloc.c +@@ -71,10 +71,6 @@ typedef struct MPIR_longdoubleint_loctype { + } \ + break + +-#undef FUNCNAME +-#define FUNCNAME MPIR_MINLOC +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_MINLOC(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int mpi_errno = MPI_SUCCESS; +@@ -137,10 +133,6 @@ void MPIR_MINLOC(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_MINLOC_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_MINLOC_check_dtype(MPI_Datatype type) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/coll/op/opno_op.c ++++ b/src/mpi/coll/op/opno_op.c +@@ -8,20 +8,12 @@ + #include "mpiimpl.h" + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_NO_OP +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_NO_OP(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + return; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_NO_OP_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_NO_OP_check_dtype(MPI_Datatype type) + { + return MPI_SUCCESS; +--- a/src/mpi/coll/op/opprod.c ++++ b/src/mpi/coll/op/opprod.c +@@ -14,10 +14,6 @@ + */ + #define MPIR_LPROD(a,b) ((a)*(b)) + +-#undef FUNCNAME +-#define FUNCNAME MPIR_PROD +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_PROD(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -66,7 +62,7 @@ void MPIR_PROD(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_PROD"); + } +@@ -92,10 +88,6 @@ void MPIR_PROD(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_PROD_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_PROD_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -115,7 +107,7 @@ int MPIR_PROD_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_PROD"); + /* --END ERROR HANDLING-- */ +--- a/src/mpi/coll/op/opreplace.c ++++ b/src/mpi/coll/op/opreplace.c +@@ -8,10 +8,6 @@ + #include "mpiimpl.h" + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_REPLACE +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_REPLACE(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int mpi_errno = MPI_SUCCESS; +@@ -30,10 +26,6 @@ void MPIR_REPLACE(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_REPLACE_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_REPLACE_check_dtype(MPI_Datatype type) + { + return MPI_SUCCESS; +--- a/src/mpi/coll/op/opsum.c ++++ b/src/mpi/coll/op/opsum.c +@@ -14,10 +14,6 @@ + */ + #define MPIR_LSUM(a,b) ((a)+(b)) + +-#undef FUNCNAME +-#define FUNCNAME MPIR_SUM +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_SUM(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + { + int i, len = *Len; +@@ -65,7 +61,7 @@ void MPIR_SUM(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + MPIR_Per_thread, per_thread, &err); + MPIR_Assert(err == 0); + per_thread->op_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", + "MPI_SUM"); + } +@@ -76,10 +72,6 @@ void MPIR_SUM(void *invec, void *inoutvec, int *Len, MPI_Datatype * type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_SUM_check_dtype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_SUM_check_dtype(MPI_Datatype type) + { + switch (type) { +@@ -99,7 +91,7 @@ int MPIR_SUM_check_dtype(MPI_Datatype type) + return MPI_SUCCESS; + /* --BEGIN ERROR HANDLING-- */ + default: +- return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OP, "**opundefined", "**opundefined %s", "MPI_SUM"); + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/reduce/reduce.c ++++ b/src/mpi/coll/reduce/reduce.c +@@ -45,7 +45,7 @@ cvars: + + - name : MPIR_CVAR_REDUCE_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -59,7 +59,7 @@ cvars: + + - name : MPIR_CVAR_REDUCE_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -163,10 +163,6 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat + */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_intra_auto(const void *sendbuf, + void *recvbuf, + int count, +@@ -240,10 +236,6 @@ int MPIR_Reduce_intra_auto(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_inter_auto(const void *sendbuf, + void *recvbuf, + int count, +@@ -258,10 +250,6 @@ int MPIR_Reduce_inter_auto(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -270,22 +258,22 @@ int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Reduce_intra_algo_choice) { +- case MPIR_REDUCE_INTRA_ALGO_BINOMIAL: ++ switch (MPIR_CVAR_REDUCE_INTRA_ALGORITHM) { ++ case MPIR_CVAR_REDUCE_INTRA_ALGORITHM_binomial: + mpi_errno = MPIR_Reduce_intra_binomial(sendbuf, recvbuf, + count, datatype, op, root, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_INTRA_ALGO_REDUCE_SCATTER_GATHER: ++ case MPIR_CVAR_REDUCE_INTRA_ALGORITHM_reduce_scatter_gather: + mpi_errno = MPIR_Reduce_intra_reduce_scatter_gather(sendbuf, recvbuf, + count, datatype, op, root, + comm_ptr, errflag); + break; +- case MPIR_REDUCE_INTRA_ALGO_NB: ++ case MPIR_CVAR_REDUCE_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Reduce_allcomm_nb(sendbuf, recvbuf, + count, datatype, op, root, comm_ptr, errflag); + break; +- case MPIR_REDUCE_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_REDUCE_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Reduce_intra_auto(sendbuf, recvbuf, +@@ -294,17 +282,17 @@ int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, + } + } else { + /* intercommunicator */ +- switch (MPIR_Reduce_inter_algo_choice) { +- case MPIR_REDUCE_INTER_ALGO_LOCAL_REDUCE_REMOTE_SEND: ++ switch (MPIR_CVAR_REDUCE_INTER_ALGORITHM) { ++ case MPIR_CVAR_REDUCE_INTER_ALGORITHM_local_reduce_remote_send: + mpi_errno = + MPIR_Reduce_inter_local_reduce_remote_send(sendbuf, recvbuf, count, datatype, + op, root, comm_ptr, errflag); + break; +- case MPIR_REDUCE_INTER_ALGO_NB: ++ case MPIR_CVAR_REDUCE_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Reduce_allcomm_nb(sendbuf, recvbuf, + count, datatype, op, root, comm_ptr, errflag); + break; +- case MPIR_REDUCE_INTER_ALGO_AUTO: ++ case MPIR_CVAR_REDUCE_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Reduce_inter_auto(sendbuf, recvbuf, count, datatype, +@@ -321,10 +309,6 @@ int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +@@ -343,10 +327,6 @@ int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -520,12 +500,12 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_reduce", "**mpi_reduce %p %p %d %D %O %d %C", + sendbuf, recvbuf, count, datatype, op, root, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/reduce/reduce_allcomm_nb.c ++++ b/src/mpi/coll/reduce/reduce_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +--- a/src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c ++++ b/src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c +@@ -15,10 +15,6 @@ + * Cost: (lgp+1).alpha + n.(lgp+1).beta + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_inter_local_reduce_remote_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_inter_local_reduce_remote_send(const void *sendbuf, + void *recvbuf, + int count, +@@ -63,10 +59,6 @@ int MPIR_Reduce_inter_local_reduce_remote_send(const void *sendbuf, + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + + MPIR_Datatype_get_extent_macro(datatype, extent); +- /* I think this is the worse case, so we can avoid an assert() +- * inside the for loop */ +- /* Should MPIR_CHKLMEM_MALLOC do this? */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), mpi_errno, + "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +--- a/src/mpi/coll/reduce/reduce_intra_binomial.c ++++ b/src/mpi/coll/reduce/reduce_intra_binomial.c +@@ -11,10 +11,6 @@ + + Cost = lgp.alpha + n.lgp.beta + n.lgp.gamma + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_intra_binomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_intra_binomial(const void *sendbuf, + void *recvbuf, + int count, +@@ -43,11 +39,6 @@ int MPIR_Reduce_intra_binomial(const void *sendbuf, + + is_commutative = MPIR_Op_is_commutative(op); + +- /* I think this is the worse case, so we can avoid an assert() +- * inside the for loop */ +- /* should be buf+{this}? */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +--- a/src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c ++++ b/src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c +@@ -34,10 +34,6 @@ + Cost = (2.floor(lgp)+1).alpha + (2.((p-1)/p) + 1).n.beta + + n.(1+(p-1)/p).gamma + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_intra_reduce_scatter_gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, + void *recvbuf, + int count, +@@ -76,11 +72,6 @@ int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- /* I think this is the worse case, so we can avoid an assert() +- * inside the for loop */ +- /* should be buf+{this}? */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +--- a/src/mpi/coll/reduce/reduce_intra_smp.c ++++ b/src/mpi/coll/reduce/reduce_intra_smp.c +@@ -7,10 +7,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_intra_smp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +@@ -35,8 +31,6 @@ int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, int count, + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +--- a/src/mpi/coll/reduce_local/reduce_local.c ++++ b/src/mpi/coll/reduce_local/reduce_local.c +@@ -28,10 +28,6 @@ int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype + /* any utility functions should go here, usually prefixed with PMPI_LOCAL to + * correctly handle weak symbols and the profiling interface */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, + MPI_Op op) + { +@@ -123,10 +119,6 @@ int MPIR_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Reduce_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Reduce_local - Applies a reduction operator to local arguments. + +@@ -209,11 +201,11 @@ int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_reduce_local", "**mpi_reduce_local %p %p %d %D %O", inbuf, + inoutbuf, count, datatype, op); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/reduce_scatter/reduce_scatter.c ++++ b/src/mpi/coll/reduce_scatter/reduce_scatter.c +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -40,7 +40,7 @@ cvars: + + - name : MPIR_CVAR_REDUCE_SCATTER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -99,10 +99,6 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[ + End Algorithm: MPI_Reduce_scatter + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_intra_auto(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +@@ -229,10 +225,6 @@ int MPIR_Reduce_scatter_intra_auto(const void *sendbuf, void *recvbuf, const int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_inter_auto(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +@@ -245,10 +237,6 @@ int MPIR_Reduce_scatter_inter_auto(const void *sendbuf, void *recvbuf, const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -257,33 +245,33 @@ int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Reduce_scatter_intra_algo_choice) { +- case MPIR_REDUCE_SCATTER_INTRA_ALGO_NONCOMMUTATIVE: ++ switch (MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM_noncommutative: + mpi_errno = MPIR_Reduce_scatter_intra_noncommutative(sendbuf, recvbuf, + recvcounts, datatype, op, + comm_ptr, errflag); + break; +- case MPIR_REDUCE_SCATTER_INTRA_ALGO_PAIRWISE: ++ case MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM_pairwise: + mpi_errno = MPIR_Reduce_scatter_intra_pairwise(sendbuf, recvbuf, + recvcounts, datatype, op, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_SCATTER_INTRA_ALGO_RECURSIVE_HALVING: ++ case MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM_recursive_halving: + mpi_errno = MPIR_Reduce_scatter_intra_recursive_halving(sendbuf, recvbuf, + recvcounts, datatype, op, + comm_ptr, errflag); + break; +- case MPIR_REDUCE_SCATTER_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = MPIR_Reduce_scatter_intra_recursive_doubling(sendbuf, recvbuf, + recvcounts, datatype, op, + comm_ptr, errflag); + break; +- case MPIR_REDUCE_SCATTER_INTRA_ALGO_NB: ++ case MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Reduce_scatter_allcomm_nb(sendbuf, recvbuf, + recvcounts, datatype, op, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_SCATTER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Reduce_scatter_intra_auto(sendbuf, recvbuf, +@@ -293,19 +281,19 @@ int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, + } + } else { + /* intercommunicator */ +- switch (MPIR_Reduce_scatter_inter_algo_choice) { +- case MPIR_REDUCE_SCATTER_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTER: ++ switch (MPIR_CVAR_REDUCE_SCATTER_INTER_ALGORITHM) { ++ case MPIR_CVAR_REDUCE_SCATTER_INTER_ALGORITHM_remote_reduce_local_scatter: + mpi_errno = + MPIR_Reduce_scatter_inter_remote_reduce_local_scatter(sendbuf, recvbuf, + recvcounts, datatype, op, + comm_ptr, errflag); + break; +- case MPIR_REDUCE_SCATTER_INTER_ALGO_NB: ++ case MPIR_CVAR_REDUCE_SCATTER_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Reduce_scatter_allcomm_nb(sendbuf, recvbuf, + recvcounts, datatype, op, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_SCATTER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_REDUCE_SCATTER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Reduce_scatter_inter_auto(sendbuf, recvbuf, recvcounts, +@@ -322,10 +310,6 @@ int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -345,10 +329,6 @@ int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Reduce_scatter - Combines values and scatters the results +@@ -482,12 +462,12 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[ + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_reduce_scatter", "**mpi_reduce_scatter %p %p %p %D %O %C", + sendbuf, recvbuf, recvcounts, datatype, op, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c ++++ b/src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_allcomm_nb(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c ++++ b/src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c +@@ -14,10 +14,6 @@ + * by local intracommunicator scattervs in each group. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_inter_remote_reduce_local_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_inter_remote_reduce_local_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, +--- a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c ++++ b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c +@@ -22,10 +22,6 @@ + * + * Cost = lgp.alpha + n.(lgp-(p-1)/p).beta + n.(lgp-(p-1)/p).gamma + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_intra_noncommutative +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_intra_noncommutative(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +--- a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c ++++ b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c +@@ -7,10 +7,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_intra_pairwise +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /* Algorithm: Pairwise Exchange + * +@@ -70,11 +66,6 @@ int MPIR_Reduce_scatter_intra_pairwise(const void *sendbuf, void *recvbuf, const + goto fn_exit; + } + +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); +- +- + /* commutative and long message, or noncommutative and long message. + * use (p-1) pairwise exchanges */ + +--- a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c ++++ b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c +@@ -7,10 +7,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /* Algorithm: Recursive Doubling + * +@@ -72,10 +68,6 @@ int MPIR_Reduce_scatter_intra_recursive_doubling(const void *sendbuf, void *recv + goto fn_exit; + } + +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); +- + /* slightly retask pof2 to mean pof2 equal or greater, not always greater as it is above */ + pof2 = 1; + while (pof2 < comm_size) +--- a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c ++++ b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c +@@ -7,10 +7,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_intra_recursive_halving +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /* Algorithm: Recursive Halving + * +@@ -94,10 +90,6 @@ int MPIR_Reduce_scatter_intra_recursive_halving(const void *sendbuf, void *recvb + goto fn_exit; + } + +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); +- + /* commutative and short. use recursive halving algorithm */ + + /* allocate temp. buffer to receive incoming data */ +--- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c ++++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block.c +@@ -18,7 +18,7 @@ + cvars: + - name : MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -34,7 +34,7 @@ cvars: + + - name : MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -92,10 +92,6 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, + End Algorithm: MPI_Reduce_scatter + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_block_intra_auto(const void *sendbuf, + void *recvbuf, + int recvcount, +@@ -189,10 +185,6 @@ int MPIR_Reduce_scatter_block_intra_auto(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_block_inter_auto(const void *sendbuf, + void *recvbuf, + int recvcount, +@@ -208,10 +200,6 @@ int MPIR_Reduce_scatter_block_inter_auto(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -219,36 +207,36 @@ int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Reduce_scatter_block_intra_algo_choice) { ++ switch (MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM) { + /* intracommunicator */ +- case MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_NONCOMMUTATIVE: ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_noncommutative: + mpi_errno = MPIR_Reduce_scatter_block_intra_noncommutative(sendbuf, recvbuf, + recvcount, datatype, op, + comm_ptr, errflag); + break; +- case MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_PAIRWISE: ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_pairwise: + mpi_errno = MPIR_Reduce_scatter_block_intra_pairwise(sendbuf, recvbuf, + recvcount, datatype, op, + comm_ptr, errflag); + break; +- case MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_HALVING: ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_recursive_halving: + mpi_errno = MPIR_Reduce_scatter_block_intra_recursive_halving(sendbuf, recvbuf, + recvcount, datatype, + op, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_DOUBLING: ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = MPIR_Reduce_scatter_block_intra_recursive_doubling(sendbuf, recvbuf, + recvcount, datatype, + op, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_NB: ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Reduce_scatter_block_allcomm_nb(sendbuf, recvbuf, + recvcount, datatype, op, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Reduce_scatter_block_intra_auto(sendbuf, recvbuf, +@@ -258,20 +246,20 @@ int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, + } + } else { + /* intercommunicator */ +- switch (MPIR_Reduce_scatter_block_inter_algo_choice) { +- case MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTER: ++ switch (MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTER_ALGORITHM) { ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTER_ALGORITHM_remote_reduce_local_scatter: + mpi_errno = + MPIR_Reduce_scatter_block_inter_remote_reduce_local_scatter(sendbuf, recvbuf, + recvcount, datatype, + op, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_NB: ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Reduce_scatter_block_allcomm_nb(sendbuf, recvbuf, + recvcount, datatype, op, comm_ptr, + errflag); + break; +- case MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_AUTO: ++ case MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Reduce_scatter_block_inter_auto(sendbuf, recvbuf, recvcount, +@@ -288,10 +276,6 @@ int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -311,10 +295,6 @@ int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Reduce_scatter_block - Combines values and scatters the results +@@ -440,13 +420,13 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_reduce_scatter_block", + "**mpi_reduce_scatter_block %p %p %d %D %O %C", sendbuf, recvbuf, + recvcount, datatype, op, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c ++++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_block_allcomm_nb(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c ++++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c +@@ -14,10 +14,6 @@ + * by local intracommunicator scattervs in each group. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_inter_remote_reduce_local_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_block_inter_remote_reduce_local_scatter(const void *sendbuf, + void *recvbuf, + int recvcount, +--- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c ++++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c +@@ -24,10 +24,6 @@ + * Application" from EuroPVM/MPI 2005. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_intra_noncommutative +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Reduce_scatter_block_intra_noncommutative(const void *sendbuf, + void *recvbuf, + int recvcount, +--- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c ++++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c +@@ -13,10 +13,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_intra_pairwise +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /* Algorithm: Pairwise Exchange + * +--- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c ++++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c +@@ -13,10 +13,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /* Algorithm: Recursive Doubling + * +@@ -77,10 +73,6 @@ int MPIR_Reduce_scatter_block_intra_recursive_doubling(const void *sendbuf, + disps[i] = i * recvcount; + } + +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); +- + /* need to allocate temporary buffer to receive incoming data */ + MPIR_CHKLMEM_MALLOC(tmp_recvbuf, void *, total_count * (MPL_MAX(true_extent, extent)), + mpi_errno, "tmp_recvbuf", MPL_MEM_BUFFER); +--- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c ++++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c +@@ -13,10 +13,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Reduce_scatter_block_intra_recursive_halving +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /* Algorithm: Recursive halving + * +@@ -97,10 +93,6 @@ int MPIR_Reduce_scatter_block_intra_recursive_halving(const void *sendbuf, + disps[i] = i * recvcount; + } + +- /* total_count*extent eventually gets malloced. it isn't added to +- * a user-passed in buffer */ +- MPIR_Ensure_Aint_fits_in_pointer(total_count * MPL_MAX(true_extent, extent)); +- + /* commutative and short. use recursive halving algorithm */ + + /* allocate temp. buffer to receive incoming data */ +--- a/src/mpi/coll/scan/scan.c ++++ b/src/mpi/coll/scan/scan.c +@@ -13,7 +13,7 @@ + cvars: + - name : MPIR_CVAR_SCAN_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -61,10 +61,6 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp + #undef MPI_Scan + #define MPI_Scan PMPI_Scan + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scan_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scan_intra_auto(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +@@ -96,26 +92,22 @@ int MPIR_Scan_intra_auto(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scan_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scan_impl(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; + +- switch (MPIR_Scan_intra_algo_choice) { +- case MPIR_SCAN_INTRA_ALGO_RECURSIVE_DOUBLING: ++ switch (MPIR_CVAR_SCAN_INTRA_ALGORITHM) { ++ case MPIR_CVAR_SCAN_INTRA_ALGORITHM_recursive_doubling: + mpi_errno = + MPIR_Scan_intra_recursive_doubling(sendbuf, recvbuf, count, datatype, op, comm_ptr, + errflag); + break; +- case MPIR_SCAN_INTRA_ALGO_NB: ++ case MPIR_CVAR_SCAN_INTRA_ALGORITHM_nb: + mpi_errno = + MPIR_Scan_allcomm_nb(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); + break; +- case MPIR_SCAN_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_SCAN_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -132,10 +124,6 @@ int MPIR_Scan_impl(const void *sendbuf, void *recvbuf, int count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +@@ -152,10 +140,6 @@ int MPIR_Scan(const void *sendbuf, void *recvbuf, int count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Scan - Computes the scan (partial reductions) of data on a collection of +@@ -279,12 +263,12 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_scan", "**mpi_scan %p %p %d %D %O %C", sendbuf, recvbuf, + count, datatype, op, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/scan/scan_allcomm_nb.c ++++ b/src/mpi/coll/scan/scan_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scan_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scan_allcomm_nb(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) + { +--- a/src/mpi/coll/scan/scan_intra_recursive_doubling.c ++++ b/src/mpi/coll/scan/scan_intra_recursive_doubling.c +@@ -42,10 +42,6 @@ + * + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scan_intra_recursive_doubling +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scan_intra_recursive_doubling(const void *sendbuf, + void *recvbuf, + int count, +@@ -87,10 +83,6 @@ int MPIR_Scan_intra_recursive_doubling(const void *sendbuf, + MPIR_CHKLMEM_MALLOC(partial_scan, void *, count * (MPL_MAX(extent, true_extent)), mpi_errno, + "partial_scan", MPL_MEM_BUFFER); + +- /* This eventually gets malloc()ed as a temp buffer, not added to +- * any user buffers */ +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + /* adjust for potential negative lower bound in datatype */ + partial_scan = (void *) ((char *) partial_scan - true_lb); + +--- a/src/mpi/coll/scan/scan_intra_smp.c ++++ b/src/mpi/coll/scan/scan_intra_smp.c +@@ -8,10 +8,6 @@ + #include "mpiimpl.h" + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scan_intra_smp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +@@ -30,8 +26,6 @@ int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, int count, + + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_CHKLMEM_MALLOC(tempbuf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + tempbuf = (void *) ((char *) tempbuf - true_lb); +--- a/src/mpi/coll/scatter/scatter.c ++++ b/src/mpi/coll/scatter/scatter.c +@@ -24,7 +24,7 @@ cvars: + + - name : MPIR_CVAR_SCATTER_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -37,7 +37,7 @@ cvars: + + - name : MPIR_CVAR_SCATTER_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -86,10 +86,6 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void + #undef MPI_Scatter + #define MPI_Scatter PMPI_Scatter + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatter_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatter_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -109,10 +105,6 @@ int MPIR_Scatter_intra_auto(const void *sendbuf, int sendcount, MPI_Datatype sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatter_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatter_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -152,10 +144,6 @@ int MPIR_Scatter_inter_auto(const void *sendbuf, int sendcount, MPI_Datatype sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatter_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatter_impl(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -165,18 +153,18 @@ int MPIR_Scatter_impl(const void *sendbuf, int sendcount, + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { + /* intracommunicator */ +- switch (MPIR_Scatter_intra_algo_choice) { +- case MPIR_SCATTER_INTRA_ALGO_BINOMIAL: ++ switch (MPIR_CVAR_SCATTER_INTRA_ALGORITHM) { ++ case MPIR_CVAR_SCATTER_INTRA_ALGORITHM_binomial: + mpi_errno = MPIR_Scatter_intra_binomial(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, errflag); + break; +- case MPIR_SCATTER_INTRA_ALGO_NB: ++ case MPIR_CVAR_SCATTER_INTRA_ALGORITHM_nb: + mpi_errno = MPIR_Scatter_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, comm_ptr, + errflag); + break; +- case MPIR_SCATTER_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_SCATTER_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Scatter_intra_auto(sendbuf, sendcount, sendtype, +@@ -186,24 +174,24 @@ int MPIR_Scatter_impl(const void *sendbuf, int sendcount, + } + } else { + /* intercommunicator */ +- switch (MPIR_Scatter_inter_algo_choice) { +- case MPIR_SCATTER_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_SCATTER_INTER_ALGORITHM) { ++ case MPIR_CVAR_SCATTER_INTER_ALGORITHM_linear: + mpi_errno = MPIR_Scatter_inter_linear(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, errflag); + break; +- case MPIR_SCATTER_INTER_ALGO_NB: ++ case MPIR_CVAR_SCATTER_INTER_ALGORITHM_nb: + mpi_errno = MPIR_Scatter_allcomm_nb(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, comm_ptr, + errflag); + break; +- case MPIR_SCATTER_INTER_ALGO_REMOTE_SEND_LOCAL_SCATTER: ++ case MPIR_CVAR_SCATTER_INTER_ALGORITHM_remote_send_local_scatter: + mpi_errno = + MPIR_Scatter_inter_remote_send_local_scatter(sendbuf, sendcount, sendtype, + recvbuf, recvcount, recvtype, root, + comm_ptr, errflag); + break; +- case MPIR_SCATTER_INTER_ALGO_AUTO: ++ case MPIR_CVAR_SCATTER_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = MPIR_Scatter_inter_auto(sendbuf, sendcount, sendtype, +@@ -222,10 +210,6 @@ int MPIR_Scatter_impl(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -245,10 +229,6 @@ int MPIR_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Scatter - Sends data from one process to all other processes in a +@@ -424,12 +404,12 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_scatter", "**mpi_scatter %p %d %D %p %d %D %d %C", sendbuf, + sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/scatter/scatter_allcomm_nb.c ++++ b/src/mpi/coll/scatter/scatter_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatter_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatter_allcomm_nb(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/scatter/scatter_inter_linear.c ++++ b/src/mpi/coll/scatter/scatter_inter_linear.c +@@ -14,10 +14,6 @@ + * Cost: p.alpha + n.beta + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatter_inter_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatter_inter_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +--- a/src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c ++++ b/src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c +@@ -15,10 +15,6 @@ + * Cost: (lgp+1).alpha + n.((p-1)/p).beta + n.beta + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatter_inter_remote_send_local_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, +@@ -27,8 +23,6 @@ int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, int sendco + int rank, local_size, remote_size, mpi_errno = MPI_SUCCESS; + int mpi_errno_ret = MPI_SUCCESS; + MPI_Status status; +- MPI_Aint extent, true_extent, true_lb = 0; +- void *tmp_buf = NULL; + MPIR_Comm *newcomm_ptr = NULL; + MPIR_CHKLMEM_DECL(1); + +@@ -57,27 +51,19 @@ int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, int sendco + } else { + /* remote group. rank 0 receives data from root. need to + * allocate temporary buffer to store this data. */ ++ MPI_Aint recvtype_sz; ++ void *tmp_buf = NULL; + + rank = comm_ptr->rank; + + if (rank == 0) { +- MPIR_Type_get_true_extent_impl(recvtype, &true_lb, &true_extent); +- +- MPIR_Datatype_get_extent_macro(recvtype, extent); +- MPIR_Ensure_Aint_fits_in_pointer(extent * recvcount * local_size); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- sendcount * remote_size * extent); +- ++ MPIR_Datatype_get_size_macro(recvtype, recvtype_sz); + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, +- recvcount * local_size * (MPL_MAX(extent, true_extent)), mpi_errno, ++ recvcount * local_size * recvtype_sz, mpi_errno, + "tmp_buf", MPL_MEM_BUFFER); + +- /* adjust for potential negative lower bound in datatype */ +- tmp_buf = (void *) ((char *) tmp_buf - true_lb); +- +- mpi_errno = +- MPIC_Recv(tmp_buf, recvcount * local_size, recvtype, root, MPIR_SCATTER_TAG, +- comm_ptr, &status, errflag); ++ mpi_errno = MPIC_Recv(tmp_buf, recvcount * local_size * recvtype_sz, MPI_BYTE, ++ root, MPIR_SCATTER_TAG, comm_ptr, &status, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ + *errflag = +@@ -86,6 +72,9 @@ int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, int sendco + MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); + MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); + } ++ } else { ++ /* silience -Wmaybe-uninitialized due to MPIR_Scatter by non-zero ranks */ ++ recvtype_sz = 0; + } + + /* Get the local intracommunicator */ +@@ -95,9 +84,8 @@ int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, int sendco + newcomm_ptr = comm_ptr->local_comm; + + /* now do the usual scatter on this intracommunicator */ +- mpi_errno = +- MPIR_Scatter(tmp_buf, recvcount, recvtype, recvbuf, recvcount, recvtype, 0, newcomm_ptr, +- errflag); ++ mpi_errno = MPIR_Scatter(tmp_buf, recvcount * recvtype_sz, MPI_BYTE, ++ recvbuf, recvcount, recvtype, 0, newcomm_ptr, errflag); + if (mpi_errno) { + /* for communication errors, just record the error but continue */ + *errflag = +--- a/src/mpi/coll/scatter/scatter_intra_binomial.c ++++ b/src/mpi/coll/scatter/scatter_intra_binomial.c +@@ -28,10 +28,6 @@ + + + /* not declared static because a machine-specific function may call this one in some cases */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatter_intra_binomial +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatter_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) +@@ -65,13 +61,9 @@ int MPIR_Scatter_intra_binomial(const void *sendbuf, int sendcount, MPI_Datatype + * in the event of recvbuf=MPI_IN_PLACE on the root, + * recvcount and recvtype are not valid */ + MPIR_Datatype_get_size_macro(sendtype, sendtype_size); +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + +- extent * sendcount * comm_size); +- + nbytes = sendtype_size * sendcount; + } else { + MPIR_Datatype_get_size_macro(recvtype, recvtype_size); +- MPIR_Ensure_Aint_fits_in_pointer(extent * recvcount * comm_size); + nbytes = recvtype_size * recvcount; + } + +--- a/src/mpi/coll/scatterv/scatterv.c ++++ b/src/mpi/coll/scatterv/scatterv.c +@@ -13,7 +13,7 @@ + cvars: + - name : MPIR_CVAR_SCATTERV_INTRA_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -26,7 +26,7 @@ cvars: + + - name : MPIR_CVAR_SCATTERV_INTER_ALGORITHM + category : COLLECTIVE +- type : string ++ type : enum + default : auto + class : device + verbosity : MPI_T_VERBOSITY_USER_BASIC +@@ -75,10 +75,6 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs, + #undef MPI_Scatterv + #define MPI_Scatterv PMPI_Scatterv + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatterv_intra_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatterv_intra_auto(const void *sendbuf, const int *sendcounts, const int *displs, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -101,10 +97,6 @@ int MPIR_Scatterv_intra_auto(const void *sendbuf, const int *sendcounts, const i + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatterv_inter_auto +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatterv_inter_auto(const void *sendbuf, const int *sendcounts, const int *displs, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -127,10 +119,6 @@ int MPIR_Scatterv_inter_auto(const void *sendbuf, const int *sendcounts, const i + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatterv_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatterv_impl(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, +@@ -139,18 +127,18 @@ int MPIR_Scatterv_impl(const void *sendbuf, const int *sendcounts, + int mpi_errno = MPI_SUCCESS; + + if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- switch (MPIR_Scatterv_intra_algo_choice) { +- case MPIR_SCATTERV_INTRA_ALGO_LINEAR: ++ switch (MPIR_CVAR_SCATTERV_INTRA_ALGORITHM) { ++ case MPIR_CVAR_SCATTERV_INTRA_ALGORITHM_linear: + mpi_errno = + MPIR_Scatterv_allcomm_linear(sendbuf, sendcounts, displs, sendtype, recvbuf, + recvcount, recvtype, root, comm_ptr, errflag); + break; +- case MPIR_SCATTERV_INTRA_ALGO_NB: ++ case MPIR_CVAR_SCATTERV_INTRA_ALGORITHM_nb: + mpi_errno = + MPIR_Scatterv_allcomm_nb(sendbuf, sendcounts, displs, sendtype, recvbuf, + recvcount, recvtype, root, comm_ptr, errflag); + break; +- case MPIR_SCATTERV_INTRA_ALGO_AUTO: ++ case MPIR_CVAR_SCATTERV_INTRA_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -159,18 +147,18 @@ int MPIR_Scatterv_impl(const void *sendbuf, const int *sendcounts, + break; + } + } else { +- switch (MPIR_Scatterv_inter_algo_choice) { +- case MPIR_SCATTERV_INTER_ALGO_LINEAR: ++ switch (MPIR_CVAR_SCATTERV_INTER_ALGORITHM) { ++ case MPIR_CVAR_SCATTERV_INTER_ALGORITHM_linear: + mpi_errno = + MPIR_Scatterv_allcomm_linear(sendbuf, sendcounts, displs, sendtype, recvbuf, + recvcount, recvtype, root, comm_ptr, errflag); + break; +- case MPIR_SCATTERV_INTER_ALGO_NB: ++ case MPIR_CVAR_SCATTERV_INTER_ALGORITHM_nb: + mpi_errno = + MPIR_Scatterv_allcomm_nb(sendbuf, sendcounts, displs, sendtype, recvbuf, + recvcount, recvtype, root, comm_ptr, errflag); + break; +- case MPIR_SCATTERV_INTER_ALGO_AUTO: ++ case MPIR_CVAR_SCATTERV_INTER_ALGORITHM_auto: + MPL_FALLTHROUGH; + default: + mpi_errno = +@@ -190,10 +178,6 @@ int MPIR_Scatterv_impl(const void *sendbuf, const int *sendcounts, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, int root, +@@ -214,10 +198,6 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Scatterv - Scatters a buffer in parts to all processes in a communicator +@@ -415,13 +395,13 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_scatterv", "**mpi_scatterv %p %p %p %D %p %d %D %d %C", + sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, + recvtype, root, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/coll/scatterv/scatterv_allcomm_linear.c ++++ b/src/mpi/coll/scatterv/scatterv_allcomm_linear.c +@@ -19,10 +19,6 @@ + + Cost = (p-1).alpha + n.((p-1)/p).beta + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatterv_allcomm_linear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatterv_allcomm_linear(const void *sendbuf, const int *sendcounts, const int *displs, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -47,13 +43,6 @@ int MPIR_Scatterv_allcomm_linear(const void *sendbuf, const int *sendcounts, con + comm_size = comm_ptr->remote_size; + + MPIR_Datatype_get_extent_macro(sendtype, extent); +- /* We need a check to ensure extent will fit in a +- * pointer. That needs extent * (max count) but we can't get +- * that without looping over the input data. This is at least +- * a minimal sanity check. Maybe add a global var since we do +- * loop over sendcount[] in MPI_Scatterv before calling +- * this? */ +- MPIR_Ensure_Aint_fits_in_pointer(MPIR_VOID_PTR_CAST_TO_MPI_AINT sendbuf + extent); + + MPIR_CHKLMEM_MALLOC(reqarray, MPIR_Request **, comm_size * sizeof(MPIR_Request *), + mpi_errno, "reqarray", MPL_MEM_BUFFER); +--- a/src/mpi/coll/scatterv/scatterv_allcomm_nb.c ++++ b/src/mpi/coll/scatterv/scatterv_allcomm_nb.c +@@ -6,10 +6,6 @@ + + #include "mpiimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Scatterv_allcomm_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Scatterv_allcomm_nb(const void *sendbuf, const int *sendcounts, const int *displs, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +--- a/src/mpi/coll/src/coll_impl.c ++++ b/src/mpi/coll/src/coll_impl.c +@@ -33,470 +33,22 @@ cvars: + */ + + int MPIR_Nbc_progress_hook_id = 0; +-/* +- * Initializing the below choice variables is not strictly necessary. +- * However, such uninitialized variables are common variables, which +- * some linkers treat as undefined references. Initializing them to +- * AUTO keeps such linkers happy. +- * +- * More discussion on this can be found in the "--warn-common" +- * discussion of +- * https://sourceware.org/binutils/docs/ld/Options.html#Options +- */ +-MPIR_Allgather_intra_algo_t MPIR_Allgather_intra_algo_choice = MPIR_ALLGATHER_INTRA_ALGO_AUTO; +-MPIR_Allgather_inter_algo_t MPIR_Allgather_inter_algo_choice = MPIR_ALLGATHER_INTER_ALGO_AUTO; +-MPIR_Allgatherv_intra_algo_t MPIR_Allgatherv_intra_algo_choice = MPIR_ALLGATHERV_INTRA_ALGO_AUTO; +-MPIR_Allgatherv_inter_algo_t MPIR_Allgatherv_inter_algo_choice = MPIR_ALLGATHERV_INTER_ALGO_AUTO; +-MPIR_Allreduce_intra_algo_t MPIR_Allreduce_intra_algo_choice = MPIR_ALLREDUCE_INTRA_ALGO_AUTO; +-MPIR_Allreduce_inter_algo_t MPIR_Allreduce_inter_algo_choice = MPIR_ALLREDUCE_INTER_ALGO_AUTO; +-MPIR_Alltoall_intra_algo_t MPIR_Alltoall_intra_algo_choice = MPIR_ALLTOALL_INTRA_ALGO_AUTO; +-MPIR_Alltoall_inter_algo_t MPIR_Alltoall_inter_algo_choice = MPIR_ALLTOALL_INTER_ALGO_AUTO; +-MPIR_Alltoallv_intra_algo_t MPIR_Alltoallv_intra_algo_choice = MPIR_ALLTOALLV_INTRA_ALGO_AUTO; +-MPIR_Alltoallv_inter_algo_t MPIR_Alltoallv_inter_algo_choice = MPIR_ALLTOALLV_INTER_ALGO_AUTO; +-MPIR_Alltoallw_intra_algo_t MPIR_Alltoallw_intra_algo_choice = MPIR_ALLTOALLW_INTRA_ALGO_AUTO; +-MPIR_Alltoallw_inter_algo_t MPIR_Alltoallw_inter_algo_choice = MPIR_ALLTOALLW_INTER_ALGO_AUTO; +-MPIR_Barrier_intra_algo_t MPIR_Barrier_intra_algo_choice = MPIR_BARRIER_INTRA_ALGO_AUTO; +-MPIR_Barrier_inter_algo_t MPIR_Barrier_inter_algo_choice = MPIR_BARRIER_INTER_ALGO_AUTO; +-MPIR_Bcast_intra_algo_t MPIR_Bcast_intra_algo_choice = MPIR_BCAST_INTRA_ALGO_AUTO; +-MPIR_Bcast_inter_algo_t MPIR_Bcast_inter_algo_choice = MPIR_BCAST_INTER_ALGO_AUTO; +-MPIR_Exscan_intra_algo_t MPIR_Exscan_intra_algo_choice = MPIR_EXSCAN_INTRA_ALGO_AUTO; +-MPIR_Gather_intra_algo_t MPIR_Gather_intra_algo_choice = MPIR_GATHER_INTRA_ALGO_AUTO; +-MPIR_Gather_inter_algo_t MPIR_Gather_inter_algo_choice = MPIR_GATHER_INTER_ALGO_AUTO; +-MPIR_Gatherv_intra_algo_t MPIR_Gatherv_intra_algo_choice = MPIR_GATHERV_INTRA_ALGO_AUTO; +-MPIR_Gatherv_inter_algo_t MPIR_Gatherv_inter_algo_choice = MPIR_GATHERV_INTER_ALGO_AUTO; +-MPIR_Iallgather_intra_algo_t MPIR_Iallgather_intra_algo_choice = MPIR_IALLGATHER_INTRA_ALGO_AUTO; +-MPIR_Iallgather_inter_algo_t MPIR_Iallgather_inter_algo_choice = MPIR_IALLGATHER_INTER_ALGO_AUTO; +-MPIR_Iallgatherv_intra_algo_t MPIR_Iallgatherv_intra_algo_choice = MPIR_IALLGATHERV_INTRA_ALGO_AUTO; +-MPIR_Iallgatherv_inter_algo_t MPIR_Iallgatherv_inter_algo_choice = MPIR_IALLGATHERV_INTER_ALGO_AUTO; +-MPIR_Iallreduce_intra_algo_t MPIR_Iallreduce_intra_algo_choice = MPIR_IALLREDUCE_INTRA_ALGO_AUTO; +-MPIR_Iallreduce_inter_algo_t MPIR_Iallreduce_inter_algo_choice = MPIR_IALLREDUCE_INTER_ALGO_AUTO; +-MPIR_Ialltoall_intra_algo_t MPIR_Ialltoall_intra_algo_choice = MPIR_IALLTOALL_INTRA_ALGO_AUTO; +-MPIR_Ialltoall_inter_algo_t MPIR_Ialltoall_inter_algo_choice = MPIR_IALLTOALL_INTER_ALGO_AUTO; +-MPIR_Ialltoallv_intra_algo_t MPIR_Ialltoallv_intra_algo_choice = MPIR_IALLTOALLV_INTRA_ALGO_AUTO; +-MPIR_Ialltoallv_inter_algo_t MPIR_Ialltoallv_inter_algo_choice = MPIR_IALLTOALLV_INTER_ALGO_AUTO; +-MPIR_Ialltoallw_intra_algo_t MPIR_Ialltoallw_intra_algo_choice = MPIR_IALLTOALLW_INTRA_ALGO_AUTO; +-MPIR_Ialltoallw_inter_algo_t MPIR_Ialltoallw_inter_algo_choice = MPIR_IALLTOALLW_INTER_ALGO_AUTO; +-MPIR_Ibarrier_intra_algo_t MPIR_Ibarrier_intra_algo_choice = MPIR_IBARRIER_INTRA_ALGO_AUTO; +-MPIR_Ibarrier_inter_algo_t MPIR_Ibarrier_inter_algo_choice = MPIR_IBARRIER_INTER_ALGO_AUTO; +-MPIR_Ibcast_intra_algo_t MPIR_Ibcast_intra_algo_choice = MPIR_IBCAST_INTRA_ALGO_AUTO; ++ ++MPIR_Tree_type_t MPIR_Iallreduce_tree_type = MPIR_TREE_TYPE_KARY; + MPIR_Tree_type_t MPIR_Ibcast_tree_type = MPIR_TREE_TYPE_KARY; +-MPIR_Ibcast_inter_algo_t MPIR_Ibcast_inter_algo_choice = MPIR_IBCAST_INTER_ALGO_AUTO; +-MPIR_Iexscan_intra_algo_t MPIR_Iexscan_intra_algo_choice = MPIR_IEXSCAN_INTRA_ALGO_AUTO; +-MPIR_Igather_intra_algo_t MPIR_Igather_intra_algo_choice = MPIR_IGATHER_INTRA_ALGO_AUTO; +-MPIR_Igather_inter_algo_t MPIR_Igather_inter_algo_choice = MPIR_IGATHER_INTER_ALGO_AUTO; +-MPIR_Igatherv_intra_algo_t MPIR_Igatherv_intra_algo_choice = MPIR_IGATHERV_INTRA_ALGO_AUTO; +-MPIR_Igatherv_inter_algo_t MPIR_Igatherv_inter_algo_choice = MPIR_IGATHERV_INTER_ALGO_AUTO; +-MPIR_Ineighbor_allgather_intra_algo_t MPIR_Ineighbor_allgather_intra_algo_choice = +- MPIR_INEIGHBOR_ALLGATHER_INTRA_ALGO_AUTO; +-MPIR_Ineighbor_allgather_inter_algo_t MPIR_Ineighbor_allgather_inter_algo_choice = +- MPIR_INEIGHBOR_ALLGATHER_INTER_ALGO_AUTO; +-MPIR_Ineighbor_allgatherv_intra_algo_t MPIR_Ineighbor_allgatherv_intra_algo_choice = +- MPIR_INEIGHBOR_ALLGATHERV_INTRA_ALGO_AUTO; +-MPIR_Ineighbor_allgatherv_inter_algo_t MPIR_Ineighbor_allgatherv_inter_algo_choice = +- MPIR_INEIGHBOR_ALLGATHERV_INTER_ALGO_AUTO; +-MPIR_Ineighbor_alltoall_intra_algo_t MPIR_Ineighbor_alltoall_intra_algo_choice = +- MPIR_INEIGHBOR_ALLTOALL_INTRA_ALGO_AUTO; +-MPIR_Ineighbor_alltoall_inter_algo_t MPIR_Ineighbor_alltoall_inter_algo_choice = +- MPIR_INEIGHBOR_ALLTOALL_INTER_ALGO_AUTO; +-MPIR_Ineighbor_alltoallv_intra_algo_t MPIR_Ineighbor_alltoallv_intra_algo_choice = +- MPIR_INEIGHBOR_ALLTOALLV_INTRA_ALGO_AUTO; +-MPIR_Ineighbor_alltoallv_inter_algo_t MPIR_Ineighbor_alltoallv_inter_algo_choice = +- MPIR_INEIGHBOR_ALLTOALLV_INTER_ALGO_AUTO; +-MPIR_Ineighbor_alltoallw_intra_algo_t MPIR_Ineighbor_alltoallw_intra_algo_choice = +- MPIR_INEIGHBOR_ALLTOALLW_INTRA_ALGO_AUTO; +-MPIR_Ineighbor_alltoallw_inter_algo_t MPIR_Ineighbor_alltoallw_inter_algo_choice = +- MPIR_INEIGHBOR_ALLTOALLW_INTER_ALGO_AUTO; +-MPIR_Ireduce_scatter_intra_algo_t MPIR_Ireduce_scatter_intra_algo_choice = +- MPIR_IREDUCE_SCATTER_INTRA_ALGO_AUTO; + MPIR_Tree_type_t MPIR_Ireduce_tree_type = MPIR_TREE_TYPE_KARY; +-MPIR_Ireduce_scatter_inter_algo_t MPIR_Ireduce_scatter_inter_algo_choice = +- MPIR_IREDUCE_SCATTER_INTER_ALGO_AUTO; +-MPIR_Ireduce_scatter_block_intra_algo_t MPIR_Ireduce_scatter_block_intra_algo_choice = +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_AUTO; +-MPIR_Ireduce_scatter_block_inter_algo_t MPIR_Ireduce_scatter_block_inter_algo_choice = +- MPIR_IREDUCE_SCATTER_BLOCK_INTER_ALGO_AUTO; +-MPIR_Ireduce_intra_algo_t MPIR_Ireduce_intra_algo_choice = MPIR_IREDUCE_INTRA_ALGO_AUTO; +-MPIR_Ireduce_inter_algo_t MPIR_Ireduce_inter_algo_choice = MPIR_IREDUCE_INTER_ALGO_AUTO; +-MPIR_Iscan_intra_algo_t MPIR_Iscan_intra_algo_choice = MPIR_ISCAN_INTRA_ALGO_AUTO; +-MPIR_Iscatter_intra_algo_t MPIR_Iscatter_intra_algo_choice = MPIR_ISCATTER_INTRA_ALGO_AUTO; +-MPIR_Iscatter_inter_algo_t MPIR_Iscatter_inter_algo_choice = MPIR_ISCATTER_INTER_ALGO_AUTO; +-MPIR_Iscatterv_intra_algo_t MPIR_Iscatterv_intra_algo_choice = MPIR_ISCATTERV_INTRA_ALGO_AUTO; +-MPIR_Iscatterv_inter_algo_t MPIR_Iscatterv_inter_algo_choice = MPIR_ISCATTERV_INTER_ALGO_AUTO; +-MPIR_Neighbor_allgather_intra_algo_t MPIR_Neighbor_allgather_intra_algo_choice = +- MPIR_NEIGHBOR_ALLGATHER_INTRA_ALGO_AUTO; +-MPIR_Neighbor_allgather_inter_algo_t MPIR_Neighbor_allgather_inter_algo_choice = +- MPIR_NEIGHBOR_ALLGATHER_INTER_ALGO_AUTO; +-MPIR_Neighbor_allgatherv_intra_algo_t MPIR_Neighbor_allgatherv_intra_algo_choice = +- MPIR_NEIGHBOR_ALLGATHERV_INTRA_ALGO_AUTO; +-MPIR_Neighbor_allgatherv_inter_algo_t MPIR_Neighbor_allgatherv_inter_algo_choice = +- MPIR_NEIGHBOR_ALLGATHERV_INTER_ALGO_AUTO; +-MPIR_Neighbor_alltoall_intra_algo_t MPIR_Neighbor_alltoall_intra_algo_choice = +- MPIR_NEIGHBOR_ALLTOALL_INTRA_ALGO_AUTO; +-MPIR_Neighbor_alltoall_inter_algo_t MPIR_Neighbor_alltoall_inter_algo_choice = +- MPIR_NEIGHBOR_ALLTOALL_INTER_ALGO_AUTO; +-MPIR_Neighbor_alltoallv_intra_algo_t MPIR_Neighbor_alltoallv_intra_algo_choice = +- MPIR_NEIGHBOR_ALLTOALLV_INTRA_ALGO_AUTO; +-MPIR_Neighbor_alltoallv_inter_algo_t MPIR_Neighbor_alltoallv_inter_algo_choice = +- MPIR_NEIGHBOR_ALLTOALLV_INTER_ALGO_AUTO; +-MPIR_Neighbor_alltoallw_intra_algo_t MPIR_Neighbor_alltoallw_intra_algo_choice = +- MPIR_NEIGHBOR_ALLTOALLW_INTRA_ALGO_AUTO; +-MPIR_Neighbor_alltoallw_inter_algo_t MPIR_Neighbor_alltoallw_inter_algo_choice = +- MPIR_NEIGHBOR_ALLTOALLW_INTER_ALGO_AUTO; +-MPIR_Reduce_scatter_intra_algo_t MPIR_Reduce_scatter_intra_algo_choice = +- MPIR_REDUCE_SCATTER_INTRA_ALGO_AUTO; +-MPIR_Reduce_scatter_inter_algo_t MPIR_Reduce_scatter_inter_algo_choice = +- MPIR_REDUCE_SCATTER_INTER_ALGO_AUTO; +-MPIR_Reduce_scatter_block_intra_algo_t MPIR_Reduce_scatter_block_intra_algo_choice = +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_AUTO; +-MPIR_Reduce_scatter_block_inter_algo_t MPIR_Reduce_scatter_block_inter_algo_choice = +- MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_AUTO; +-MPIR_Reduce_intra_algo_t MPIR_Reduce_intra_algo_choice = MPIR_REDUCE_INTRA_ALGO_AUTO; +-MPIR_Reduce_inter_algo_t MPIR_Reduce_inter_algo_choice = MPIR_REDUCE_INTER_ALGO_AUTO; +-MPIR_Scan_intra_algo_t MPIR_Scan_intra_algo_choice = MPIR_SCAN_INTRA_ALGO_AUTO; +-MPIR_Scatterv_intra_algo_t MPIR_Scatterv_intra_algo_choice = MPIR_SCATTERV_INTRA_ALGO_AUTO; +-MPIR_Scatterv_inter_algo_t MPIR_Scatterv_inter_algo_choice = MPIR_SCATTERV_INTER_ALGO_AUTO; +-MPIR_Scatter_intra_algo_t MPIR_Scatter_intra_algo_choice = MPIR_SCATTER_INTRA_ALGO_AUTO; +-MPIR_Scatter_inter_algo_t MPIR_Scatter_inter_algo_choice = MPIR_SCATTER_INTER_ALGO_AUTO; + +-#undef FUNCNAME +-#define FUNCNAME MPII_Coll_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Coll_init(void) + { + int mpi_errno = MPI_SUCCESS; + +- /* =========================================================================== */ +- /* | Check if the user manually selected any collective algorithms via CVARs | */ +- /* =========================================================================== */ +- +- /* Allgather Intra */ +- if (0 == strcmp(MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM, "brucks")) +- MPIR_Allgather_intra_algo_choice = MPIR_ALLGATHER_INTRA_ALGO_BRUCKS; +- else if (0 == strcmp(MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM, "nb")) +- MPIR_Allgather_intra_algo_choice = MPIR_ALLGATHER_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Allgather_intra_algo_choice = MPIR_ALLGATHER_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM, "ring")) +- MPIR_Allgather_intra_algo_choice = MPIR_ALLGATHER_INTRA_ALGO_RING; +- else +- MPIR_Allgather_intra_algo_choice = MPIR_ALLGATHER_INTRA_ALGO_AUTO; +- +- /* Allgather Inter */ +- if (0 == strcmp(MPIR_CVAR_ALLGATHER_INTER_ALGORITHM, "local_gather_remote_bcast")) +- MPIR_Allgather_inter_algo_choice = MPIR_ALLGATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_BCAST; +- else if (0 == strcmp(MPIR_CVAR_ALLGATHER_INTER_ALGORITHM, "nb")) +- MPIR_Allgather_inter_algo_choice = MPIR_ALLGATHER_INTER_ALGO_NB; +- else +- MPIR_Allgather_inter_algo_choice = MPIR_ALLGATHER_INTER_ALGO_AUTO; +- +- /* Allgatherv Intra */ +- if (0 == strcmp(MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM, "brucks")) +- MPIR_Allgatherv_intra_algo_choice = MPIR_ALLGATHERV_INTRA_ALGO_BRUCKS; +- else if (0 == strcmp(MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM, "nb")) +- MPIR_Allgatherv_intra_algo_choice = MPIR_ALLGATHERV_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Allgatherv_intra_algo_choice = MPIR_ALLGATHERV_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM, "ring")) +- MPIR_Allgatherv_intra_algo_choice = MPIR_ALLGATHERV_INTRA_ALGO_RING; +- else +- MPIR_Allgatherv_intra_algo_choice = MPIR_ALLGATHERV_INTRA_ALGO_AUTO; +- +- /* Allgatherv Inter */ +- if (0 == strcmp(MPIR_CVAR_ALLGATHERV_INTER_ALGORITHM, "nb")) +- MPIR_Allgatherv_inter_algo_choice = MPIR_ALLGATHERV_INTER_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLGATHERV_INTER_ALGORITHM, "remote_gather_local_bcast")) +- MPIR_Allgatherv_inter_algo_choice = MPIR_ALLGATHERV_INTER_ALGO_REMOTE_GATHER_LOCAL_BCAST; +- else +- MPIR_Allgatherv_inter_algo_choice = MPIR_ALLGATHERV_INTER_ALGO_AUTO; +- +- /* Allreduce Intra */ +- if (0 == strcmp(MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM, "nb")) +- MPIR_Allreduce_intra_algo_choice = MPIR_ALLREDUCE_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Allreduce_intra_algo_choice = MPIR_ALLREDUCE_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM, "reduce_scatter_allgather")) +- MPIR_Allreduce_intra_algo_choice = MPIR_ALLREDUCE_INTRA_ALGO_REDUCE_SCATTER_ALLGATHER; +- else +- MPIR_Allreduce_intra_algo_choice = MPIR_ALLREDUCE_INTRA_ALGO_AUTO; +- +- /* Allreduce Inter */ +- if (0 == strcmp(MPIR_CVAR_ALLREDUCE_INTER_ALGORITHM, "nb")) +- MPIR_Allreduce_inter_algo_choice = MPIR_ALLREDUCE_INTER_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLREDUCE_INTER_ALGORITHM, "reduce_exchange_bcast")) +- MPIR_Allreduce_inter_algo_choice = MPIR_ALLREDUCE_INTER_ALGO_REDUCE_EXCHANGE_BCAST; +- else +- MPIR_Allreduce_inter_algo_choice = MPIR_ALLREDUCE_INTER_ALGO_AUTO; +- +- /* Alltoall Intra */ +- if (0 == strcmp(MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM, "brucks")) +- MPIR_Alltoall_intra_algo_choice = MPIR_ALLTOALL_INTRA_ALGO_BRUCKS; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM, "nb")) +- MPIR_Alltoall_intra_algo_choice = MPIR_ALLTOALL_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM, "pairwise")) +- MPIR_Alltoall_intra_algo_choice = MPIR_ALLTOALL_INTRA_ALGO_PAIRWISE; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM, "pairwise_sendrecv_replace")) +- MPIR_Alltoall_intra_algo_choice = MPIR_ALLTOALL_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM, "scattered")) +- MPIR_Alltoall_intra_algo_choice = MPIR_ALLTOALL_INTRA_ALGO_SCATTERED; +- else +- MPIR_Alltoall_intra_algo_choice = MPIR_ALLTOALL_INTRA_ALGO_AUTO; +- +- /* Alltoall Inter */ +- if (0 == strcmp(MPIR_CVAR_ALLTOALL_INTER_ALGORITHM, "pairwise_exchange")) +- MPIR_Alltoall_inter_algo_choice = MPIR_ALLTOALL_INTER_ALGO_PAIRWISE_EXCHANGE; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALL_INTER_ALGORITHM, "nb")) +- MPIR_Alltoall_inter_algo_choice = MPIR_ALLTOALL_INTER_ALGO_NB; +- else +- MPIR_Alltoall_inter_algo_choice = MPIR_ALLTOALL_INTER_ALGO_AUTO; +- +- /* Alltoallv Intra */ +- if (0 == strcmp(MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM, "nb")) +- MPIR_Alltoallv_intra_algo_choice = MPIR_ALLTOALLV_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM, "pairwise_sendrecv_replace")) +- MPIR_Alltoallv_intra_algo_choice = MPIR_ALLTOALLV_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM, "scattered")) +- MPIR_Alltoallv_intra_algo_choice = MPIR_ALLTOALLV_INTRA_ALGO_SCATTERED; +- else +- MPIR_Alltoallv_intra_algo_choice = MPIR_ALLTOALLV_INTRA_ALGO_AUTO; +- +- /* Alltoallv Inter */ +- if (0 == strcmp(MPIR_CVAR_ALLTOALLV_INTER_ALGORITHM, "nb")) +- MPIR_Alltoallv_inter_algo_choice = MPIR_ALLTOALLV_INTER_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALLV_INTER_ALGORITHM, "pairwise_exchange")) +- MPIR_Alltoallv_inter_algo_choice = MPIR_ALLTOALLV_INTER_ALGO_PAIRWISE_EXCHANGE; +- else +- MPIR_Alltoallv_inter_algo_choice = MPIR_ALLTOALLV_INTER_ALGO_AUTO; +- +- /* Alltoallw Intra */ +- if (0 == strcmp(MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM, "nb")) +- MPIR_Alltoallw_intra_algo_choice = MPIR_ALLTOALLW_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM, "pairwise_sendrecv_replace")) +- MPIR_Alltoallw_intra_algo_choice = MPIR_ALLTOALLW_INTRA_ALGO_PAIRWISE_SENDRECV_REPLACE; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALLW_INTRA_ALGORITHM, "scattered")) +- MPIR_Alltoallw_intra_algo_choice = MPIR_ALLTOALLW_INTRA_ALGO_SCATTERED; +- else +- MPIR_Alltoallw_intra_algo_choice = MPIR_ALLTOALLW_INTRA_ALGO_AUTO; +- +- /* Alltoallw Inter */ +- if (0 == strcmp(MPIR_CVAR_ALLTOALLW_INTER_ALGORITHM, "nb")) +- MPIR_Alltoallw_inter_algo_choice = MPIR_ALLTOALLW_INTER_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_ALLTOALLW_INTER_ALGORITHM, "pairwise_exchange")) +- MPIR_Alltoallw_inter_algo_choice = MPIR_ALLTOALLW_INTER_ALGO_PAIRWISE_EXCHANGE; +- else +- MPIR_Alltoallw_inter_algo_choice = MPIR_ALLTOALLW_INTER_ALGO_AUTO; +- +- /* Barrier Intra */ +- if (0 == strcmp(MPIR_CVAR_BARRIER_INTRA_ALGORITHM, "nb")) +- MPIR_Barrier_intra_algo_choice = MPIR_BARRIER_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_BARRIER_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Barrier_intra_algo_choice = MPIR_BARRIER_INTRA_ALGO_RECURSIVE_DOUBLING; +- else +- MPIR_Barrier_intra_algo_choice = MPIR_BARRIER_INTRA_ALGO_AUTO; +- +- /* Barrier Inter */ +- if (0 == strcmp(MPIR_CVAR_BARRIER_INTER_ALGORITHM, "bcast")) +- MPIR_Barrier_inter_algo_choice = MPIR_BARRIER_INTER_ALGO_BCAST; +- else if (0 == strcmp(MPIR_CVAR_BARRIER_INTER_ALGORITHM, "nb")) +- MPIR_Barrier_inter_algo_choice = MPIR_BARRIER_INTER_ALGO_NB; +- else +- MPIR_Barrier_inter_algo_choice = MPIR_BARRIER_INTER_ALGO_AUTO; +- +- /* Bcast Intra */ +- if (0 == strcmp(MPIR_CVAR_BCAST_INTRA_ALGORITHM, "binomial")) +- MPIR_Bcast_intra_algo_choice = MPIR_BCAST_INTRA_ALGO_BINOMIAL; +- else if (0 == strcmp(MPIR_CVAR_BCAST_INTRA_ALGORITHM, "nb")) +- MPIR_Bcast_intra_algo_choice = MPIR_BCAST_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_BCAST_INTRA_ALGORITHM, "scatter_recursive_doubling_allgather")) +- MPIR_Bcast_intra_algo_choice = MPIR_BCAST_INTRA_ALGO_SCATTER_RECURSIVE_DOUBLING_ALLGATHER; +- else if (0 == strcmp(MPIR_CVAR_BCAST_INTRA_ALGORITHM, "scatter_ring_allgather")) +- MPIR_Bcast_intra_algo_choice = MPIR_BCAST_INTRA_ALGO_SCATTER_RING_ALLGATHER; +- else +- MPIR_Bcast_intra_algo_choice = MPIR_BCAST_INTRA_ALGO_AUTO; +- +- /* Bcast Inter */ +- if (0 == strcmp(MPIR_CVAR_BCAST_INTER_ALGORITHM, "nb")) +- MPIR_Bcast_inter_algo_choice = MPIR_BCAST_INTER_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_BCAST_INTER_ALGORITHM, "remote_send_local_bcast")) +- MPIR_Bcast_inter_algo_choice = MPIR_BCAST_INTER_ALGO_REMOTE_SEND_LOCAL_BCAST; +- else +- MPIR_Bcast_inter_algo_choice = MPIR_BCAST_INTER_ALGO_AUTO; +- +- /* Exscan Intra */ +- if (0 == strcmp(MPIR_CVAR_EXSCAN_INTRA_ALGORITHM, "nb")) +- MPIR_Exscan_intra_algo_choice = MPIR_EXSCAN_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_EXSCAN_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Exscan_intra_algo_choice = MPIR_EXSCAN_INTRA_ALGO_RECURSIVE_DOUBLING; +- else +- MPIR_Exscan_intra_algo_choice = MPIR_EXSCAN_INTRA_ALGO_AUTO; +- +- /* Gather Intra */ +- if (0 == strcmp(MPIR_CVAR_GATHER_INTRA_ALGORITHM, "binomial")) +- MPIR_Gather_intra_algo_choice = MPIR_GATHER_INTRA_ALGO_BINOMIAL; +- else if (0 == strcmp(MPIR_CVAR_GATHER_INTRA_ALGORITHM, "nb")) +- MPIR_Gather_intra_algo_choice = MPIR_GATHER_INTRA_ALGO_NB; +- else +- MPIR_Gather_intra_algo_choice = MPIR_GATHER_INTRA_ALGO_AUTO; +- +- /* Gather Inter */ +- if (0 == strcmp(MPIR_CVAR_GATHER_INTER_ALGORITHM, "linear")) +- MPIR_Gather_inter_algo_choice = MPIR_GATHER_INTER_ALGO_LINEAR; +- else if (0 == strcmp(MPIR_CVAR_GATHER_INTER_ALGORITHM, "local_gather_remote_send")) +- MPIR_Gather_inter_algo_choice = MPIR_GATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_SEND; +- else if (0 == strcmp(MPIR_CVAR_GATHER_INTER_ALGORITHM, "nb")) +- MPIR_Gather_inter_algo_choice = MPIR_GATHER_INTER_ALGO_NB; +- else +- MPIR_Gather_inter_algo_choice = MPIR_GATHER_INTER_ALGO_AUTO; +- +- /* Gatherv Intra */ +- if (0 == strcmp(MPIR_CVAR_GATHERV_INTRA_ALGORITHM, "linear")) +- MPIR_Gatherv_intra_algo_choice = MPIR_GATHERV_INTRA_ALGO_LINEAR; +- else if (0 == strcmp(MPIR_CVAR_GATHERV_INTRA_ALGORITHM, "nb")) +- MPIR_Gatherv_intra_algo_choice = MPIR_GATHERV_INTRA_ALGO_NB; +- else +- MPIR_Gatherv_intra_algo_choice = MPIR_GATHERV_INTRA_ALGO_AUTO; +- +- /* Gatherv Inter */ +- if (0 == strcmp(MPIR_CVAR_GATHERV_INTER_ALGORITHM, "linear")) +- MPIR_Gatherv_inter_algo_choice = MPIR_GATHERV_INTER_ALGO_LINEAR; +- else if (0 == strcmp(MPIR_CVAR_GATHERV_INTER_ALGORITHM, "nb")) +- MPIR_Gatherv_inter_algo_choice = MPIR_GATHERV_INTER_ALGO_NB; +- else +- MPIR_Gatherv_inter_algo_choice = MPIR_GATHERV_INTER_ALGO_AUTO; +- +- /* Iallgather Intra */ +- if (0 == strcmp(MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM, "brucks")) +- MPIR_Iallgather_intra_algo_choice = MPIR_IALLGATHER_INTRA_ALGO_BRUCKS; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Iallgather_intra_algo_choice = MPIR_IALLGATHER_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM, "ring")) +- MPIR_Iallgather_intra_algo_choice = MPIR_IALLGATHER_INTRA_ALGO_RING; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM, "recexch_distance_doubling")) +- MPIR_Iallgather_intra_algo_choice = +- MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM, "recexch_distance_halving")) +- MPIR_Iallgather_intra_algo_choice = +- MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_HALVING; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHER_INTRA_ALGORITHM, "gentran_brucks")) +- MPIR_Iallgather_intra_algo_choice = MPIR_IALLGATHER_INTRA_ALGO_GENTRAN_BRUCKS; +- else +- MPIR_Iallgather_intra_algo_choice = MPIR_IALLGATHER_INTRA_ALGO_AUTO; +- +- /* Iallgather Inter */ +- if (0 == strcmp(MPIR_CVAR_IALLGATHER_INTER_ALGORITHM, "local_gather_remote_bcast")) +- MPIR_Iallgather_inter_algo_choice = MPIR_IALLGATHER_INTER_ALGO_LOCAL_GATHER_REMOTE_BCAST; +- else +- MPIR_Iallgather_inter_algo_choice = MPIR_IALLGATHER_INTER_ALGO_AUTO; +- +- /* Iallgatherv Intra */ +- if (0 == strcmp(MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM, "brucks")) +- MPIR_Iallgatherv_intra_algo_choice = MPIR_IALLGATHERV_INTRA_ALGO_BRUCKS; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Iallgatherv_intra_algo_choice = MPIR_IALLGATHERV_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM, "ring")) +- MPIR_Iallgatherv_intra_algo_choice = MPIR_IALLGATHERV_INTRA_ALGO_RING; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM, "recexch_distance_doubling")) +- MPIR_Iallgatherv_intra_algo_choice = +- MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM, "recexch_distance_halving")) +- MPIR_Iallgatherv_intra_algo_choice = +- MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RECEXCH_DISTANCE_HALVING; +- else if (0 == strcmp(MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM, "gentran_ring")) +- MPIR_Iallgatherv_intra_algo_choice = MPIR_IALLGATHERV_INTRA_ALGO_GENTRAN_RING; +- else +- MPIR_Iallgatherv_intra_algo_choice = MPIR_IALLGATHERV_INTRA_ALGO_AUTO; +- +- /* Iallgatherv Inter */ +- if (0 == strcmp(MPIR_CVAR_IALLGATHERV_INTER_ALGORITHM, "remote_gather_local_bcast")) +- MPIR_Iallgatherv_inter_algo_choice = MPIR_IALLGATHERV_INTER_ALGO_REMOTE_GATHER_LOCAL_BCAST; +- else +- MPIR_Iallgatherv_inter_algo_choice = MPIR_IALLGATHERV_INTER_ALGO_AUTO; +- +- /* Iallreduce Intra */ +- if (0 == strcmp(MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM, "naive")) +- MPIR_Iallreduce_intra_algo_choice = MPIR_IALLREDUCE_INTRA_ALGO_NAIVE; +- else if (0 == strcmp(MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Iallreduce_intra_algo_choice = MPIR_IALLREDUCE_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM, "reduce_scatter_allgather")) +- MPIR_Iallreduce_intra_algo_choice = MPIR_IALLREDUCE_INTRA_ALGO_REDUCE_SCATTER_ALLGATHER; +- else if (0 == strcmp(MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM, "recexch_single_buffer")) +- MPIR_Iallreduce_intra_algo_choice = +- MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_RECEXCH_SINGLE_BUFFER; +- else if (0 == strcmp(MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM, "recexch_multiple_buffer")) +- MPIR_Iallreduce_intra_algo_choice = +- MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_RECEXCH_MULTIPLE_BUFFER; +- else if (0 == strcmp(MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM, "tree_kary")) +- MPIR_Iallreduce_intra_algo_choice = MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_TREE_KARY; +- else if (0 == strcmp(MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM, "tree_knomial")) +- MPIR_Iallreduce_intra_algo_choice = MPIR_IALLREDUCE_INTRA_ALGO_GENTRAN_TREE_KNOMIAL; +- else +- MPIR_Iallreduce_intra_algo_choice = MPIR_IALLREDUCE_INTRA_ALGO_AUTO; +- +- /* Iallreduce Inter */ +- if (0 == strcmp(MPIR_CVAR_IALLREDUCE_INTER_ALGORITHM, "remote_reduce_local_bcast")) +- MPIR_Iallreduce_inter_algo_choice = MPIR_IALLREDUCE_INTER_ALGO_REMOTE_REDUCE_LOCAL_BCAST; +- else +- MPIR_Iallreduce_inter_algo_choice = MPIR_IALLREDUCE_INTER_ALGO_AUTO; +- +- /* Ialltoall Intra */ +- if (0 == strcmp(MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM, "brucks")) +- MPIR_Ialltoall_intra_algo_choice = MPIR_IALLTOALL_INTRA_ALGO_BRUCKS; +- else if (0 == strcmp(MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM, "inplace")) +- MPIR_Ialltoall_intra_algo_choice = MPIR_IALLTOALL_INTRA_ALGO_INPLACE; +- else if (0 == strcmp(MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM, "pairwise")) +- MPIR_Ialltoall_intra_algo_choice = MPIR_IALLTOALL_INTRA_ALGO_PAIRWISE; +- else if (0 == strcmp(MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM, "permuted_sendrecv")) +- MPIR_Ialltoall_intra_algo_choice = MPIR_IALLTOALL_INTRA_ALGO_PERMUTED_SENDRECV; +- else +- MPIR_Ialltoall_intra_algo_choice = MPIR_IALLTOALL_INTRA_ALGO_AUTO; +- +- /* Ialltoall Inter */ +- if (0 == strcmp(MPIR_CVAR_IALLTOALL_INTER_ALGORITHM, "pairwise_exchange")) +- MPIR_Ialltoall_inter_algo_choice = MPIR_IALLTOALL_INTER_ALGO_PAIRWISE_EXCHANGE; +- else +- MPIR_Ialltoall_inter_algo_choice = MPIR_IALLTOALL_INTER_ALGO_AUTO; +- +- /* Ialltoallv Intra */ +- if (0 == strcmp(MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM, "blocked")) +- MPIR_Ialltoallv_intra_algo_choice = MPIR_IALLTOALLV_INTRA_ALGO_BLOCKED; +- else if (0 == strcmp(MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM, "inplace")) +- MPIR_Ialltoallv_intra_algo_choice = MPIR_IALLTOALLV_INTRA_ALGO_INPLACE; +- else +- MPIR_Ialltoallv_intra_algo_choice = MPIR_IALLTOALLV_INTRA_ALGO_AUTO; +- +- /* Ialltoallv Inter */ +- if (0 == strcmp(MPIR_CVAR_IALLTOALLV_INTER_ALGORITHM, "pairwise_exchange")) +- MPIR_Ialltoallv_inter_algo_choice = MPIR_IALLTOALLV_INTER_ALGO_PAIRWISE_EXCHANGE; +- else +- MPIR_Ialltoallv_inter_algo_choice = MPIR_IALLTOALLV_INTER_ALGO_AUTO; +- +- /* Ialltoallw Intra */ +- if (0 == strcmp(MPIR_CVAR_IALLTOALLW_INTRA_ALGORITHM, "blocked")) +- MPIR_Ialltoallw_intra_algo_choice = MPIR_IALLTOALLW_INTRA_ALGO_BLOCKED; +- else if (0 == strcmp(MPIR_CVAR_IALLTOALLW_INTRA_ALGORITHM, "inplace")) +- MPIR_Ialltoallw_intra_algo_choice = MPIR_IALLTOALLW_INTRA_ALGO_INPLACE; +- else +- MPIR_Ialltoallw_intra_algo_choice = MPIR_IALLTOALLW_INTRA_ALGO_AUTO; +- +- /* Ialltoallw Inter */ +- if (0 == strcmp(MPIR_CVAR_IALLTOALLW_INTER_ALGORITHM, "pairwise_exchange")) +- MPIR_Ialltoallw_inter_algo_choice = MPIR_IALLTOALLW_INTER_ALGO_PAIRWISE_EXCHANGE; +- else +- MPIR_Ialltoallw_inter_algo_choice = MPIR_IALLTOALLW_INTER_ALGO_AUTO; +- +- /* Ibarrier Intra */ +- if (0 == strcmp(MPIR_CVAR_IBARRIER_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Ibarrier_intra_algo_choice = MPIR_IBARRIER_INTRA_ALGO_RECURSIVE_DOUBLING; +- if (0 == strcmp(MPIR_CVAR_IBARRIER_INTRA_ALGORITHM, "recexch")) +- MPIR_Ibarrier_intra_algo_choice = MPIR_IBARRIER_INTRA_ALGO_GENTRAN_RECEXCH; +- else +- MPIR_Ibarrier_intra_algo_choice = MPIR_IBARRIER_INTRA_ALGO_AUTO; +- +- /* Ibarrier Inter */ +- if (0 == strcmp(MPIR_CVAR_IBARRIER_INTER_ALGORITHM, "bcast")) +- MPIR_Ibarrier_inter_algo_choice = MPIR_IBARRIER_INTER_ALGO_BCAST; +- else +- MPIR_Ibarrier_inter_algo_choice = MPIR_IBARRIER_INTER_ALGO_AUTO; ++ /* Iallreduce */ ++ if (0 == strcmp(MPIR_CVAR_IALLREDUCE_TREE_TYPE, "kary")) ++ MPIR_Iallreduce_tree_type = MPIR_TREE_TYPE_KARY; ++ else if (0 == strcmp(MPIR_CVAR_IALLREDUCE_TREE_TYPE, "knomial_1")) ++ MPIR_Iallreduce_tree_type = MPIR_TREE_TYPE_KNOMIAL_1; ++ else if (0 == strcmp(MPIR_CVAR_IALLREDUCE_TREE_TYPE, "knomial_2")) ++ MPIR_Iallreduce_tree_type = MPIR_TREE_TYPE_KNOMIAL_2; + + /* Ibcast */ + if (0 == strcmp(MPIR_CVAR_IBCAST_TREE_TYPE, "kary")) +@@ -508,170 +60,6 @@ int MPII_Coll_init(void) + else + MPIR_Ibcast_tree_type = MPIR_TREE_TYPE_KARY; + +- /* Ibcast Intra */ +- if (0 == strcmp(MPIR_CVAR_IBCAST_INTRA_ALGORITHM, "binomial")) +- MPIR_Ibcast_intra_algo_choice = MPIR_IBCAST_INTRA_ALGO_BINOMIAL; +- else if (0 == strcmp(MPIR_CVAR_IBCAST_INTRA_ALGORITHM, "scatter_recursive_doubling_allgather")) +- MPIR_Ibcast_intra_algo_choice = MPIR_IBCAST_INTRA_ALGO_SCATTER_RECURSIVE_DOUBLING_ALLGATHER; +- else if (0 == strcmp(MPIR_CVAR_IBCAST_INTRA_ALGORITHM, "scatter_ring_allgather")) +- MPIR_Ibcast_intra_algo_choice = MPIR_IBCAST_INTRA_ALGO_SCATTER_RING_ALLGATHER; +- else if (0 == strcmp(MPIR_CVAR_IBCAST_INTRA_ALGORITHM, "tree")) +- MPIR_Ibcast_intra_algo_choice = MPIR_IBCAST_INTRA_ALGO_GENTRAN_TREE; +- else if (0 == strcmp(MPIR_CVAR_IBCAST_INTRA_ALGORITHM, "scatter_recexch_allgather")) +- MPIR_Ibcast_intra_algo_choice = MPIR_IBCAST_INTRA_ALGO_GENTRAN_SCATTER_RECEXCH_ALLGATHER; +- else if (0 == strcmp(MPIR_CVAR_IBCAST_INTRA_ALGORITHM, "ring")) +- MPIR_Ibcast_intra_algo_choice = MPIR_IBCAST_INTRA_ALGO_GENTRAN_RING; +- else +- MPIR_Ibcast_intra_algo_choice = MPIR_IBCAST_INTRA_ALGO_AUTO; +- +- /* Ibcast Inter */ +- if (0 == strcmp(MPIR_CVAR_IBCAST_INTER_ALGORITHM, "flat")) +- MPIR_Ibcast_inter_algo_choice = MPIR_IBCAST_INTER_ALGO_FLAT; +- else +- MPIR_Ibcast_inter_algo_choice = MPIR_IBCAST_INTER_ALGO_AUTO; +- +- /* Iexscan Intra */ +- if (0 == strcmp(MPIR_CVAR_IEXSCAN_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Iexscan_intra_algo_choice = MPIR_IEXSCAN_INTRA_ALGO_RECURSIVE_DOUBLING; +- else +- MPIR_Iexscan_intra_algo_choice = MPIR_IEXSCAN_INTRA_ALGO_AUTO; +- +- /* Igather Intra */ +- if (0 == strcmp(MPIR_CVAR_IGATHER_INTRA_ALGORITHM, "binomial")) +- MPIR_Igather_intra_algo_choice = MPIR_IGATHER_INTRA_ALGO_BINOMIAL; +- else if (0 == strcmp(MPIR_CVAR_IGATHER_INTRA_ALGORITHM, "tree")) +- MPIR_Igather_intra_algo_choice = MPIR_IGATHER_INTRA_ALGO_TREE; +- else +- MPIR_Igather_intra_algo_choice = MPIR_IGATHER_INTRA_ALGO_AUTO; +- +- /* Igather Inter */ +- if (0 == strcmp(MPIR_CVAR_IGATHER_INTER_ALGORITHM, "long_inter")) +- MPIR_Igather_inter_algo_choice = MPIR_IGATHER_INTER_ALGO_LONG; +- else if (0 == strcmp(MPIR_CVAR_IGATHER_INTER_ALGORITHM, "short_inter")) +- MPIR_Igather_inter_algo_choice = MPIR_IGATHER_INTER_ALGO_SHORT; +- else +- MPIR_Igather_inter_algo_choice = MPIR_IGATHER_INTER_ALGO_AUTO; +- +- /* Igatherv Intra */ +- if (0 == strcmp(MPIR_CVAR_IGATHERV_INTRA_ALGORITHM, "linear")) +- MPIR_Igatherv_intra_algo_choice = MPIR_IGATHERV_INTRA_ALGO_LINEAR; +- else +- MPIR_Igatherv_intra_algo_choice = MPIR_IGATHERV_INTRA_ALGO_AUTO; +- +- /* Igatherv Inter */ +- if (0 == strcmp(MPIR_CVAR_IGATHERV_INTER_ALGORITHM, "linear")) +- MPIR_Igatherv_inter_algo_choice = MPIR_IGATHERV_INTER_ALGO_LINEAR; +- else +- MPIR_Igatherv_inter_algo_choice = MPIR_IGATHERV_INTER_ALGO_AUTO; +- +- /* Ineighbor_allgather Intra */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLGATHER_INTRA_ALGORITHM, "linear")) +- MPIR_Ineighbor_allgather_intra_algo_choice = MPIR_INEIGHBOR_ALLGATHER_INTRA_ALGO_LINEAR; +- else +- MPIR_Ineighbor_allgather_intra_algo_choice = MPIR_INEIGHBOR_ALLGATHER_INTRA_ALGO_AUTO; +- +- /* Ineighbor_allgather Inter */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLGATHER_INTER_ALGORITHM, "linear")) +- MPIR_Ineighbor_allgather_inter_algo_choice = MPIR_INEIGHBOR_ALLGATHER_INTER_ALGO_LINEAR; +- else +- MPIR_Ineighbor_allgather_inter_algo_choice = MPIR_INEIGHBOR_ALLGATHER_INTER_ALGO_AUTO; +- +- /* Ineighbor_allgatherv Intra */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTRA_ALGORITHM, "linear")) +- MPIR_Ineighbor_allgatherv_intra_algo_choice = MPIR_INEIGHBOR_ALLGATHERV_INTRA_ALGO_LINEAR; +- else +- MPIR_Ineighbor_allgatherv_intra_algo_choice = MPIR_INEIGHBOR_ALLGATHERV_INTRA_ALGO_AUTO; +- +- /* Ineighbor_allgatherv Inter */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTER_ALGORITHM, "linear")) +- MPIR_Ineighbor_allgatherv_inter_algo_choice = MPIR_INEIGHBOR_ALLGATHERV_INTER_ALGO_LINEAR; +- else +- MPIR_Ineighbor_allgatherv_inter_algo_choice = MPIR_INEIGHBOR_ALLGATHERV_INTER_ALGO_AUTO; +- +- /* Ineighbor_alltoall Intra */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLTOALL_INTRA_ALGORITHM, "linear")) +- MPIR_Ineighbor_alltoall_intra_algo_choice = MPIR_INEIGHBOR_ALLTOALL_INTRA_ALGO_LINEAR; +- else +- MPIR_Ineighbor_alltoall_intra_algo_choice = MPIR_INEIGHBOR_ALLTOALL_INTRA_ALGO_AUTO; +- +- /* Ineighbor_alltoall Inter */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLTOALL_INTER_ALGORITHM, "linear")) +- MPIR_Ineighbor_alltoall_inter_algo_choice = MPIR_INEIGHBOR_ALLTOALL_INTER_ALGO_LINEAR; +- else +- MPIR_Ineighbor_alltoall_inter_algo_choice = MPIR_INEIGHBOR_ALLTOALL_INTER_ALGO_AUTO; +- +- /* Ineighbor_alltoallv Intra */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTRA_ALGORITHM, "linear")) +- MPIR_Ineighbor_alltoallv_intra_algo_choice = MPIR_INEIGHBOR_ALLTOALLV_INTRA_ALGO_LINEAR; +- else +- MPIR_Ineighbor_alltoallv_intra_algo_choice = MPIR_INEIGHBOR_ALLTOALLV_INTRA_ALGO_AUTO; +- +- /* Ineighbor_alltoallv Inter */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTER_ALGORITHM, "linear")) +- MPIR_Ineighbor_alltoallv_inter_algo_choice = MPIR_INEIGHBOR_ALLTOALLV_INTER_ALGO_LINEAR; +- else +- MPIR_Ineighbor_alltoallv_inter_algo_choice = MPIR_INEIGHBOR_ALLTOALLV_INTER_ALGO_AUTO; +- +- /* Ineighbor_alltoallw Intra */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTRA_ALGORITHM, "linear")) +- MPIR_Ineighbor_alltoallw_intra_algo_choice = MPIR_INEIGHBOR_ALLTOALLW_INTRA_ALGO_LINEAR; +- else +- MPIR_Ineighbor_alltoallw_intra_algo_choice = MPIR_INEIGHBOR_ALLTOALLW_INTRA_ALGO_AUTO; +- +- /* Ineighbor_alltoallw Inter */ +- if (0 == strcmp(MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTER_ALGORITHM, "linear")) +- MPIR_Ineighbor_alltoallw_inter_algo_choice = MPIR_INEIGHBOR_ALLTOALLW_INTER_ALGO_LINEAR; +- else +- MPIR_Ineighbor_alltoallw_inter_algo_choice = MPIR_INEIGHBOR_ALLTOALLW_INTER_ALGO_AUTO; +- +- /* Ireduce_scatter Intra */ +- if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM, "noncommutative")) +- MPIR_Ireduce_scatter_intra_algo_choice = MPIR_IREDUCE_SCATTER_INTRA_ALGO_NONCOMMUTATIVE; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM, "pairwise")) +- MPIR_Ireduce_scatter_intra_algo_choice = MPIR_IREDUCE_SCATTER_INTRA_ALGO_PAIRWISE; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Ireduce_scatter_intra_algo_choice = MPIR_IREDUCE_SCATTER_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM, "recursive_halving")) +- MPIR_Ireduce_scatter_intra_algo_choice = MPIR_IREDUCE_SCATTER_INTRA_ALGO_RECURSIVE_HALVING; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_INTRA_ALGORITHM, "recexch")) +- MPIR_Ireduce_scatter_intra_algo_choice = MPIR_IREDUCE_SCATTER_INTRA_ALGO_GENTRAN_RECEXCH; +- else +- MPIR_Ireduce_scatter_intra_algo_choice = MPIR_IREDUCE_SCATTER_INTRA_ALGO_AUTO; +- +- /* Ireduce_scatter Inter */ +- if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_INTER_ALGORITHM, "remote_reduce_local_scatterv")) +- MPIR_Ireduce_scatter_inter_algo_choice = +- MPIR_IREDUCE_SCATTER_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTERV; +- else +- MPIR_Ireduce_scatter_inter_algo_choice = MPIR_IREDUCE_SCATTER_INTER_ALGO_AUTO; +- +- /* Ireduce_scatter_block Intra */ +- if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "noncommutative")) +- MPIR_Ireduce_scatter_block_intra_algo_choice = +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_NONCOMMUTATIVE; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "pairwise")) +- MPIR_Ireduce_scatter_block_intra_algo_choice = +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_PAIRWISE; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Ireduce_scatter_block_intra_algo_choice = +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "recursive_halving")) +- MPIR_Ireduce_scatter_block_intra_algo_choice = +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_HALVING; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "recexch")) +- MPIR_Ireduce_scatter_block_intra_algo_choice = +- MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_GENTRAN_RECEXCH; +- else +- MPIR_Ireduce_scatter_block_intra_algo_choice = MPIR_IREDUCE_SCATTER_BLOCK_INTRA_ALGO_AUTO; +- +- /* Ireduce_scatter_block Inter */ +- if (0 == +- strcmp(MPIR_CVAR_IREDUCE_SCATTER_BLOCK_INTER_ALGORITHM, "remote_reduce_local_scatterv")) +- MPIR_Ireduce_scatter_block_inter_algo_choice = +- MPIR_IREDUCE_SCATTER_BLOCK_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTERV; +- else +- MPIR_Ireduce_scatter_block_inter_algo_choice = MPIR_IREDUCE_SCATTER_BLOCK_INTER_ALGO_AUTO; +- + /* Ireduce */ + if (0 == strcmp(MPIR_CVAR_IREDUCE_TREE_TYPE, "kary")) + MPIR_Ireduce_tree_type = MPIR_TREE_TYPE_KARY; +@@ -682,228 +70,6 @@ int MPII_Coll_init(void) + else + MPIR_Ireduce_tree_type = MPIR_TREE_TYPE_KARY; + +- /* Ireduce Intra */ +- if (0 == strcmp(MPIR_CVAR_IREDUCE_INTRA_ALGORITHM, "binomial")) +- MPIR_Ireduce_intra_algo_choice = MPIR_IREDUCE_INTRA_ALGO_BINOMIAL; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_INTRA_ALGORITHM, "reduce_scatter_gather")) +- MPIR_Ireduce_intra_algo_choice = MPIR_IREDUCE_INTRA_ALGO_REDUCE_SCATTER_GATHER; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_INTRA_ALGORITHM, "tree")) +- MPIR_Ireduce_intra_algo_choice = MPIR_IREDUCE_INTRA_ALGO_GENTRAN_TREE; +- else if (0 == strcmp(MPIR_CVAR_IREDUCE_INTRA_ALGORITHM, "ring")) +- MPIR_Ireduce_intra_algo_choice = MPIR_IREDUCE_INTRA_ALGO_GENTRAN_RING; +- else +- MPIR_Ireduce_intra_algo_choice = MPIR_IREDUCE_INTRA_ALGO_AUTO; +- +- /* Ireduce Inter */ +- if (0 == strcmp(MPIR_CVAR_IREDUCE_INTER_ALGORITHM, "local_reduce_remote_send")) +- MPIR_Ireduce_inter_algo_choice = MPIR_IREDUCE_INTER_ALGO_LOCAL_REDUCE_REMOTE_SEND; +- else +- MPIR_Ireduce_inter_algo_choice = MPIR_IREDUCE_INTER_ALGO_AUTO; +- +- /* Iscan Intra */ +- if (0 == strcmp(MPIR_CVAR_ISCAN_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Iscan_intra_algo_choice = MPIR_ISCAN_INTRA_ALGO_RECURSIVE_DOUBLING; +- else +- MPIR_Iscan_intra_algo_choice = MPIR_ISCAN_INTRA_ALGO_AUTO; +- +- /* Iscatter Intra */ +- if (0 == strcmp(MPIR_CVAR_ISCATTER_INTRA_ALGORITHM, "binomial")) +- MPIR_Iscatter_intra_algo_choice = MPIR_ISCATTER_INTRA_ALGO_BINOMIAL; +- else if (0 == strcmp(MPIR_CVAR_ISCATTER_INTRA_ALGORITHM, "tree")) +- MPIR_Iscatter_intra_algo_choice = MPIR_ISCATTER_INTRA_ALGO_TREE; +- else +- MPIR_Iscatter_intra_algo_choice = MPIR_ISCATTER_INTRA_ALGO_AUTO; +- +- /* Iscatter Inter */ +- if (0 == strcmp(MPIR_CVAR_ISCATTER_INTER_ALGORITHM, "linear")) +- MPIR_Iscatter_inter_algo_choice = MPIR_ISCATTER_INTER_ALGO_LINEAR; +- else if (0 == strcmp(MPIR_CVAR_ISCATTER_INTER_ALGORITHM, "remote_send_local_scatter")) +- MPIR_Iscatter_inter_algo_choice = MPIR_ISCATTER_INTER_ALGO_REMOTE_SEND_LOCAL_SCATTER; +- else +- MPIR_Iscatter_inter_algo_choice = MPIR_ISCATTER_INTER_ALGO_AUTO; +- +- /* Iscatterv Intra */ +- if (0 == strcmp(MPIR_CVAR_ISCATTERV_INTRA_ALGORITHM, "linear")) +- MPIR_Iscatterv_intra_algo_choice = MPIR_ISCATTERV_INTRA_ALGO_LINEAR; +- else +- MPIR_Iscatterv_intra_algo_choice = MPIR_ISCATTERV_INTRA_ALGO_AUTO; +- +- /* Iscatterv Inter */ +- if (0 == strcmp(MPIR_CVAR_ISCATTERV_INTER_ALGORITHM, "linear")) +- MPIR_Iscatterv_inter_algo_choice = MPIR_ISCATTERV_INTER_ALGO_LINEAR; +- else +- MPIR_Iscatterv_inter_algo_choice = MPIR_ISCATTERV_INTER_ALGO_AUTO; +- +- /* Neighbor_allgather Intra */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLGATHER_INTRA_ALGORITHM, "nb")) +- MPIR_Neighbor_allgather_intra_algo_choice = MPIR_NEIGHBOR_ALLGATHER_INTRA_ALGO_NB; +- else +- MPIR_Neighbor_allgather_intra_algo_choice = MPIR_NEIGHBOR_ALLGATHER_INTRA_ALGO_AUTO; +- +- /* Neighbor_allgather Inter */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLGATHER_INTER_ALGORITHM, "nb")) +- MPIR_Neighbor_allgather_inter_algo_choice = MPIR_NEIGHBOR_ALLGATHER_INTER_ALGO_NB; +- else +- MPIR_Neighbor_allgather_inter_algo_choice = MPIR_NEIGHBOR_ALLGATHER_INTER_ALGO_AUTO; +- +- /* Neighbor_allgatherv Intra */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTRA_ALGORITHM, "nb")) +- MPIR_Neighbor_allgatherv_intra_algo_choice = MPIR_NEIGHBOR_ALLGATHERV_INTRA_ALGO_NB; +- else +- MPIR_Neighbor_allgatherv_intra_algo_choice = MPIR_NEIGHBOR_ALLGATHERV_INTRA_ALGO_AUTO; +- +- /* Neighbor_allgatherv Inter */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTER_ALGORITHM, "nb")) +- MPIR_Neighbor_allgatherv_inter_algo_choice = MPIR_NEIGHBOR_ALLGATHERV_INTER_ALGO_NB; +- else +- MPIR_Neighbor_allgatherv_inter_algo_choice = MPIR_NEIGHBOR_ALLGATHERV_INTER_ALGO_AUTO; +- +- /* Neighbor_alltoall Intra */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLTOALL_INTRA_ALGORITHM, "nb")) +- MPIR_Neighbor_alltoall_intra_algo_choice = MPIR_NEIGHBOR_ALLTOALL_INTRA_ALGO_NB; +- else +- MPIR_Neighbor_alltoall_intra_algo_choice = MPIR_NEIGHBOR_ALLTOALL_INTRA_ALGO_AUTO; +- +- /* Neighbor_alltoall Inter */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLTOALL_INTER_ALGORITHM, "nb")) +- MPIR_Neighbor_alltoall_inter_algo_choice = MPIR_NEIGHBOR_ALLTOALL_INTER_ALGO_NB; +- else +- MPIR_Neighbor_alltoall_inter_algo_choice = MPIR_NEIGHBOR_ALLTOALL_INTER_ALGO_AUTO; +- +- /* Neighbor_alltoallv Intra */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTRA_ALGORITHM, "nb")) +- MPIR_Neighbor_alltoallv_intra_algo_choice = MPIR_NEIGHBOR_ALLTOALLV_INTRA_ALGO_NB; +- else +- MPIR_Neighbor_alltoallv_intra_algo_choice = MPIR_NEIGHBOR_ALLTOALLV_INTRA_ALGO_AUTO; +- +- /* Neighbor_alltoallv Inter */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTER_ALGORITHM, "nb")) +- MPIR_Neighbor_alltoallv_inter_algo_choice = MPIR_NEIGHBOR_ALLTOALLV_INTER_ALGO_NB; +- else +- MPIR_Neighbor_alltoallv_inter_algo_choice = MPIR_NEIGHBOR_ALLTOALLV_INTER_ALGO_AUTO; +- +- /* Neighbor_alltoallw Intra */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTRA_ALGORITHM, "nb")) +- MPIR_Neighbor_alltoallw_intra_algo_choice = MPIR_NEIGHBOR_ALLTOALLW_INTRA_ALGO_NB; +- else +- MPIR_Neighbor_alltoallw_intra_algo_choice = MPIR_NEIGHBOR_ALLTOALLW_INTRA_ALGO_AUTO; +- +- /* Neighbor_alltoallw Inter */ +- if (0 == strcmp(MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTER_ALGORITHM, "nb")) +- MPIR_Neighbor_alltoallw_inter_algo_choice = MPIR_NEIGHBOR_ALLTOALLW_INTER_ALGO_NB; +- else +- MPIR_Neighbor_alltoallw_inter_algo_choice = MPIR_NEIGHBOR_ALLTOALLW_INTER_ALGO_AUTO; +- +- /* Red_scat Intra */ +- if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM, "nb")) +- MPIR_Reduce_scatter_intra_algo_choice = MPIR_REDUCE_SCATTER_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM, "noncommutative")) +- MPIR_Reduce_scatter_intra_algo_choice = MPIR_REDUCE_SCATTER_INTRA_ALGO_NONCOMMUTATIVE; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM, "pairwise")) +- MPIR_Reduce_scatter_intra_algo_choice = MPIR_REDUCE_SCATTER_INTRA_ALGO_PAIRWISE; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Reduce_scatter_intra_algo_choice = MPIR_REDUCE_SCATTER_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM, "recursive_halving")) +- MPIR_Reduce_scatter_intra_algo_choice = MPIR_REDUCE_SCATTER_INTRA_ALGO_RECURSIVE_HALVING; +- else +- MPIR_Reduce_scatter_intra_algo_choice = MPIR_REDUCE_SCATTER_INTRA_ALGO_AUTO; +- +- /* Red_scat Inter */ +- if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_INTER_ALGORITHM, "nb")) +- MPIR_Reduce_scatter_inter_algo_choice = MPIR_REDUCE_SCATTER_INTER_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_INTER_ALGORITHM, "remote_reduce_local_scatter")) +- MPIR_Reduce_scatter_inter_algo_choice = +- MPIR_REDUCE_SCATTER_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTER; +- else +- MPIR_Reduce_scatter_inter_algo_choice = MPIR_REDUCE_SCATTER_INTER_ALGO_AUTO; +- +- /* Red_scat_block Intra */ +- if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "nb")) +- MPIR_Reduce_scatter_block_intra_algo_choice = MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "noncommutative")) +- MPIR_Reduce_scatter_block_intra_algo_choice = +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_NONCOMMUTATIVE; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "pairwise")) +- MPIR_Reduce_scatter_block_intra_algo_choice = MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_PAIRWISE; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Reduce_scatter_block_intra_algo_choice = +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_DOUBLING; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM, "recursive_halving")) +- MPIR_Reduce_scatter_block_intra_algo_choice = +- MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_RECURSIVE_HALVING; +- else +- MPIR_Reduce_scatter_block_intra_algo_choice = MPIR_REDUCE_SCATTER_BLOCK_INTRA_ALGO_AUTO; +- +- /* Red_scat_block Inter */ +- if (0 == strcmp(MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTER_ALGORITHM, "nb")) +- MPIR_Reduce_scatter_block_inter_algo_choice = MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_NB; +- else if (0 == +- strcmp(MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTER_ALGORITHM, "remote_reduce_local_scatter")) +- MPIR_Reduce_scatter_block_inter_algo_choice = +- MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_REMOTE_REDUCE_LOCAL_SCATTER; +- else +- MPIR_Reduce_scatter_block_inter_algo_choice = MPIR_REDUCE_SCATTER_BLOCK_INTER_ALGO_AUTO; +- +- /* Reduce Intra */ +- if (0 == strcmp(MPIR_CVAR_REDUCE_INTRA_ALGORITHM, "binomial")) +- MPIR_Reduce_intra_algo_choice = MPIR_REDUCE_INTRA_ALGO_BINOMIAL; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_INTRA_ALGORITHM, "nb")) +- MPIR_Reduce_intra_algo_choice = MPIR_REDUCE_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_INTRA_ALGORITHM, "reduce_scatter_gather")) +- MPIR_Reduce_intra_algo_choice = MPIR_REDUCE_INTRA_ALGO_REDUCE_SCATTER_GATHER; +- else +- MPIR_Reduce_intra_algo_choice = MPIR_REDUCE_INTRA_ALGO_AUTO; +- +- /* Reduce Inter */ +- if (0 == strcmp(MPIR_CVAR_REDUCE_INTER_ALGORITHM, "local_reduce_remote_send")) +- MPIR_Reduce_inter_algo_choice = MPIR_REDUCE_INTER_ALGO_LOCAL_REDUCE_REMOTE_SEND; +- else if (0 == strcmp(MPIR_CVAR_REDUCE_INTER_ALGORITHM, "nb")) +- MPIR_Reduce_inter_algo_choice = MPIR_REDUCE_INTER_ALGO_NB; +- else +- MPIR_Reduce_inter_algo_choice = MPIR_REDUCE_INTER_ALGO_AUTO; +- +- /* Scan Intra */ +- if (0 == strcmp(MPIR_CVAR_SCAN_INTRA_ALGORITHM, "nb")) +- MPIR_Scan_intra_algo_choice = MPIR_SCAN_INTRA_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_SCAN_INTRA_ALGORITHM, "recursive_doubling")) +- MPIR_Scan_intra_algo_choice = MPIR_SCAN_INTRA_ALGO_RECURSIVE_DOUBLING; +- else +- MPIR_Scan_intra_algo_choice = MPIR_SCAN_INTRA_ALGO_AUTO; +- +- /* Scatter Intra */ +- if (0 == strcmp(MPIR_CVAR_SCATTER_INTRA_ALGORITHM, "binomial")) +- MPIR_Scatter_intra_algo_choice = MPIR_SCATTER_INTRA_ALGO_BINOMIAL; +- else if (0 == strcmp(MPIR_CVAR_SCATTER_INTRA_ALGORITHM, "nb")) +- MPIR_Scatter_intra_algo_choice = MPIR_SCATTER_INTRA_ALGO_NB; +- else +- MPIR_Scatter_intra_algo_choice = MPIR_SCATTER_INTRA_ALGO_AUTO; +- +- /* Scatter Inter */ +- if (0 == strcmp(MPIR_CVAR_SCATTER_INTRA_ALGORITHM, "linear")) +- MPIR_Scatter_inter_algo_choice = MPIR_SCATTER_INTER_ALGO_LINEAR; +- else if (0 == strcmp(MPIR_CVAR_SCATTER_INTRA_ALGORITHM, "nb")) +- MPIR_Scatter_inter_algo_choice = MPIR_SCATTER_INTER_ALGO_NB; +- else if (0 == strcmp(MPIR_CVAR_SCATTER_INTRA_ALGORITHM, "remote_send_local_scatter")) +- MPIR_Scatter_inter_algo_choice = MPIR_SCATTER_INTER_ALGO_REMOTE_SEND_LOCAL_SCATTER; +- else +- MPIR_Scatter_inter_algo_choice = MPIR_SCATTER_INTER_ALGO_AUTO; +- +- /* Scatterv Intra */ +- if (0 == strcmp(MPIR_CVAR_SCATTERV_INTRA_ALGORITHM, "linear")) +- MPIR_Scatterv_intra_algo_choice = MPIR_SCATTERV_INTRA_ALGO_LINEAR; +- else if (0 == strcmp(MPIR_CVAR_SCATTERV_INTRA_ALGORITHM, "nb")) +- MPIR_Scatterv_intra_algo_choice = MPIR_SCATTERV_INTRA_ALGO_NB; +- else +- MPIR_Scatterv_intra_algo_choice = MPIR_SCATTERV_INTRA_ALGO_AUTO; +- +- /* Scatterv Inter */ +- if (0 == strcmp(MPIR_CVAR_SCATTERV_INTER_ALGORITHM, "linear")) +- MPIR_Scatterv_inter_algo_choice = MPIR_SCATTERV_INTER_ALGO_LINEAR; +- else if (0 == strcmp(MPIR_CVAR_SCATTERV_INTER_ALGORITHM, "nb")) +- MPIR_Scatterv_inter_algo_choice = MPIR_SCATTERV_INTER_ALGO_NB; +- else +- MPIR_Scatterv_inter_algo_choice = MPIR_SCATTERV_INTER_ALGO_AUTO; +- + /* register non blocking collectives progress hook */ + mpi_errno = MPID_Progress_register_hook(MPIDU_Sched_progress, &MPIR_Nbc_progress_hook_id); + if (mpi_errno) +@@ -934,10 +100,6 @@ int MPII_Coll_init(void) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPII_Coll_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Coll_finalize(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -960,7 +122,7 @@ int MPII_Coll_finalize(void) + + /* Function used by CH3 progress engine to decide whether to + * block for a recv operation */ +-int MPIR_Coll_safe_to_block() ++int MPIR_Coll_safe_to_block(void) + { + return MPII_Gentran_scheds_are_pending() == false; + } +--- a/src/mpi/coll/transports/gentran/gentran_impl.c ++++ b/src/mpi/coll/transports/gentran/gentran_impl.c +@@ -36,11 +36,7 @@ MPII_Coll_queue_t coll_queue = { NULL }; + + int MPII_Genutil_progress_hook_id = 0; + +-#undef FUNCNAME +-#define FUNCNAME MPII_Gentran_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPII_Gentran_init() ++int MPII_Gentran_init(void) + { + int mpi_errno = MPI_SUCCESS; + +@@ -57,10 +53,6 @@ int MPII_Gentran_init() + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Gentran_comm_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Gentran_comm_init(MPIR_Comm * comm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -69,10 +61,6 @@ int MPII_Gentran_comm_init(MPIR_Comm * comm_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Gentran_comm_cleanup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Gentran_comm_cleanup(MPIR_Comm * comm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -81,11 +69,7 @@ int MPII_Gentran_comm_cleanup(MPIR_Comm * comm_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Gentran_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPII_Gentran_finalize() ++int MPII_Gentran_finalize(void) + { + int mpi_errno = MPI_SUCCESS; + +@@ -95,11 +79,7 @@ int MPII_Gentran_finalize() + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Gentran_scheds_are_pending +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPII_Gentran_scheds_are_pending() ++int MPII_Gentran_scheds_are_pending(void) + { + return coll_queue.head != NULL; + } +--- a/src/mpi/coll/transports/gentran/gentran_utils.c ++++ b/src/mpi/coll/transports/gentran/gentran_utils.c +@@ -16,10 +16,6 @@ + + static void vtx_record_completion(MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t * sched); + +-#undef FUNCNAME +-#define FUNCNAME vtx_extend_utarray +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void vtx_extend_utarray(UT_array * dst_array, int n_elems, int *elems) + { + int i; +@@ -29,20 +25,12 @@ static void vtx_extend_utarray(UT_array * dst_array, int n_elems, int *elems) + } + } + +-#undef FUNCNAME +-#define FUNCNAME vtx_record_issue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void vtx_record_issue(MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t * sched) + { + vtxp->vtx_state = MPII_GENUTIL_VTX_STATE__ISSUED; + LL_APPEND(sched->issued_head, sched->issued_tail, vtxp); + } + +-#undef FUNCNAME +-#define FUNCNAME vtx_issue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void vtx_issue(int vtxid, MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t * sched) + { + int i; +@@ -164,9 +152,9 @@ static void vtx_issue(int vtxid, MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t + /* print issued vertex list */ + { + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "Issued vertices list: ")); +- vtx_t *vtxp; +- LL_FOREACH(sched->issued_head, vtxp) { +- MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "%d", vtxp->vtx_id)); ++ vtx_t *vtxp_tmp; ++ LL_FOREACH(sched->issued_head, vtxp_tmp) { ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "%d", vtxp_tmp->vtx_id)); + } + } + #endif +@@ -176,10 +164,6 @@ static void vtx_issue(int vtxid, MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t + } + + +-#undef FUNCNAME +-#define FUNCNAME vtx_record_completion +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void vtx_record_completion(MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t * sched) + { + int i; +@@ -217,10 +201,6 @@ static void vtx_record_completion(MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_ + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_progress_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_progress_hook(int *made_progress) + { + int count = 0; +@@ -260,10 +240,6 @@ int MPII_Genutil_progress_hook(int *made_progress) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_vtx_copy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPII_Genutil_vtx_copy(void *_dst, const void *_src) + { + vtx_t *dst = (vtx_t *) _dst; +@@ -284,10 +260,6 @@ void MPII_Genutil_vtx_copy(void *_dst, const void *_src) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_vtx_dtor +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPII_Genutil_vtx_dtor(void *_elt) + { + vtx_t *elt = (vtx_t *) _elt; +@@ -297,10 +269,6 @@ void MPII_Genutil_vtx_dtor(void *_elt) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_vtx_add_dependencies +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPII_Genutil_vtx_add_dependencies(MPII_Genutil_sched_t * sched, int vtx_id, + int n_in_vtcs, int *in_vtcs) + { +@@ -358,10 +326,6 @@ void MPII_Genutil_vtx_add_dependencies(MPII_Genutil_sched_t * sched, int vtx_id, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_vtx_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_vtx_create(MPII_Genutil_sched_t * sched, MPII_Genutil_vtx_t ** vtx) + { + MPII_Genutil_vtx_t *vtxp; +@@ -383,10 +347,6 @@ int MPII_Genutil_vtx_create(MPII_Genutil_sched_t * sched, MPII_Genutil_vtx_t ** + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_poke +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_poke(MPII_Genutil_sched_t * sched, int *is_complete, int *made_progress) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/coll/transports/gentran/tsp_gentran.c ++++ b/src/mpi/coll/transports/gentran/tsp_gentran.c +@@ -22,10 +22,6 @@ UT_icd vtx_t_icd = { + MPII_Genutil_vtx_dtor + }; + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_create(MPII_Genutil_sched_t * sched) + { + sched->total_vtcs = 0; +@@ -44,10 +40,6 @@ int MPII_Genutil_sched_create(MPII_Genutil_sched_t * sched) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_isend(const void *buf, + int count, + MPI_Datatype dt, +@@ -79,10 +71,6 @@ int MPII_Genutil_sched_isend(const void *buf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_irecv(void *buf, + int count, + MPI_Datatype dt, +@@ -115,10 +103,6 @@ int MPII_Genutil_sched_irecv(void *buf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_imcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_imcast(const void *buf, + int count, + MPI_Datatype dt, +@@ -155,10 +139,6 @@ int MPII_Genutil_sched_imcast(const void *buf, + return vtx_id; + } + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_reduce_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_reduce_local(const void *inbuf, void *inoutbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPII_Genutil_sched_t * sched, + int n_in_vtcs, int *in_vtcs) +@@ -186,10 +166,6 @@ int MPII_Genutil_sched_reduce_local(const void *inbuf, void *inoutbuf, int count + } + + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_localcopy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, + void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, + MPII_Genutil_sched_t * sched, int n_in_vtcs, int *in_vtcs) +@@ -220,10 +196,6 @@ int MPII_Genutil_sched_localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Da + + /* Transport function that adds a no op vertex in the graph that has + * all the vertices posted before it as incoming vertices */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_sink +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_sink(MPII_Genutil_sched_t * sched) + { + MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, +@@ -263,13 +235,11 @@ int MPII_Genutil_sched_sink(MPII_Genutil_sched_t * sched) + MPIR_CHKLMEM_FREEALL(); + return vtx_id; + fn_fail: ++ /* TODO - Replace this with real error handling */ ++ MPIR_Assert(MPI_SUCCESS == mpi_errno); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_fence +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPII_Genutil_sched_fence(MPII_Genutil_sched_t * sched) + { + int fence_id; +@@ -284,10 +254,6 @@ void MPII_Genutil_sched_fence(MPII_Genutil_sched_t * sched) + sched->last_fence = fence_id; + } + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_selective_sink +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_selective_sink(MPII_Genutil_sched_t * sched, int n_in_vtcs, int *in_vtcs) + { + vtx_t *vtxp; +@@ -306,10 +272,6 @@ int MPII_Genutil_sched_selective_sink(MPII_Genutil_sched_t * sched, int n_in_vtc + + } + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_malloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void *MPII_Genutil_sched_malloc(size_t size, MPII_Genutil_sched_t * sched) + { + void *addr = MPL_malloc(size, MPL_MEM_COLL); +@@ -317,10 +279,6 @@ void *MPII_Genutil_sched_malloc(size_t size, MPII_Genutil_sched_t * sched) + return addr; + } + +-#undef FUNCNAME +-#define FUNCNAME MPII_Genutil_sched_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Genutil_sched_start(MPII_Genutil_sched_t * sched, MPIR_Comm * comm, MPIR_Request ** req) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/coll/transports/gentran/tsp_gentran.h ++++ b/src/mpi/coll/transports/gentran/tsp_gentran.h +@@ -14,6 +14,25 @@ + #include "mpiimpl.h" + #include "tsp_gentran_types.h" + ++/* Undefine the previous definitions to avoid redefinition warnings */ ++#undef MPIR_TSP_TRANSPORT_NAME ++#undef MPIR_TSP_sched_t ++#undef MPIR_TSP_sched_create ++#undef MPIR_TSP_sched_isend ++#undef MPIR_TSP_sched_irecv ++#undef MPIR_TSP_sched_imcast ++#undef MPIR_TSP_sched_issend ++#undef MPIR_TSP_sched_reduce_local ++#undef MPIR_TSP_sched_localcopy ++#undef MPIR_TSP_sched_selective_sink ++#undef MPIR_TSP_sched_sink ++#undef MPIR_TSP_sched_fence ++#undef MPIR_TSP_sched_malloc ++#undef MPIR_TSP_sched_start ++#undef MPIR_TSP_sched_free ++#undef MPIR_TSP_sched_optimize ++#undef MPIR_TSP_sched_reset ++ + #define MPIR_TSP_TRANSPORT_NAME Gentran_ + + /* Transport data structures */ +--- a/src/mpi/coll/transports/stubtran/stubtran_impl.c ++++ b/src/mpi/coll/transports/stubtran/stubtran_impl.c +@@ -12,12 +12,12 @@ + #include "mpiimpl.h" + #include "tsp_stubtran.h" + +-int MPII_Stubtran_init() ++int MPII_Stubtran_init(void) + { + return MPI_SUCCESS; + } + +-int MPII_Stubtran_finalize() ++int MPII_Stubtran_finalize(void) + { + return MPI_SUCCESS; + } +--- a/src/mpi/coll/transports/stubtran/tsp_stubtran.h ++++ b/src/mpi/coll/transports/stubtran/tsp_stubtran.h +@@ -11,6 +11,25 @@ + #ifndef TSP_STUBTRAN_H_INCLUDED + #define TSP_STUBTRAN_H_INCLUDED + ++/* Undefine the previous definitions to avoid redefinition warnings */ ++#undef MPIR_TSP_TRANSPORT_NAME ++#undef MPIR_TSP_sched_t ++#undef MPIR_TSP_sched_create ++#undef MPIR_TSP_sched_isend ++#undef MPIR_TSP_sched_irecv ++#undef MPIR_TSP_sched_imcast ++#undef MPIR_TSP_sched_issend ++#undef MPIR_TSP_sched_reduce_local ++#undef MPIR_TSP_sched_localcopy ++#undef MPIR_TSP_sched_selective_sink ++#undef MPIR_TSP_sched_sink ++#undef MPIR_TSP_sched_fence ++#undef MPIR_TSP_sched_malloc ++#undef MPIR_TSP_sched_start ++#undef MPIR_TSP_sched_free ++#undef MPIR_TSP_sched_optimize ++#undef MPIR_TSP_sched_reset ++ + #define MPIR_TSP_TRANSPORT_NAME Stubtran_ + + /* Stub transport data structures */ +--- a/src/mpi/comm/comm_agree.c ++++ b/src/mpi/comm/comm_agree.c +@@ -26,10 +26,6 @@ int MPIX_Comm_agree(MPI_Comm comm, int *flag) __attribute__ ((weak, alias("PMPIX + #undef MPIX_Comm_agree + #define MPIX_Comm_agree PMPIX_Comm_agree + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_agree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_agree(MPIR_Comm * comm_ptr, int *flag) + { + int mpi_errno = MPI_SUCCESS, mpi_errno_tmp = MPI_SUCCESS; +@@ -111,10 +107,6 @@ int MPIR_Comm_agree(MPIR_Comm * comm_ptr, int *flag) + + #endif /* !defined(MPICH_MPI_FROM_PMPI) */ + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Comm_agree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIX_Comm_agree - Performs agreement operation on comm + +@@ -187,11 +179,11 @@ int MPIX_Comm_agree(MPI_Comm comm, int *flag) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpix_comm_agree", "**mpix_comm_agree %C", comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_compare.c ++++ b/src/mpi/comm/comm_compare.c +@@ -28,10 +28,6 @@ int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_compare +-#undef FCNAME +-#define FCNAME "MPI_Comm_compare" + + /*@ + +@@ -203,13 +199,13 @@ int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_compare", "**mpi_comm_compare %C %C %p", comm1, comm2, + result); + } + /* Use whichever communicator is non-null if possible */ + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr1 ? comm_ptr1 : comm_ptr2, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr1 ? comm_ptr1 : comm_ptr2, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_create.c ++++ b/src/mpi/comm/comm_create.c +@@ -38,10 +38,6 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPIR_Comm * comm_ptr, MPIR_Group * group_p + * + * Ownership of the (*mapping_out) array is transferred to the caller who is + * responsible for freeing it. */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Comm_create_calculate_mapping +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Comm_create_calculate_mapping(MPIR_Group * group_ptr, + MPIR_Comm * comm_ptr, + int **mapping_out, MPIR_Comm ** mapping_comm) +@@ -152,10 +148,6 @@ int MPII_Comm_create_calculate_mapping(MPIR_Group * group_ptr, + /* WARNING: local_mapping and remote_mapping are stored in this + * function. The caller is responsible for their storage and will + * need to retain them till Comm_commit. */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Comm_create_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Comm_create_map(int local_n, + int remote_n, + int *local_mapping, +@@ -173,10 +165,6 @@ int MPII_Comm_create_map(int local_n, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_create_intra +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* comm create impl for intracommunicators, assumes that the standard error + * checking has already taken place in the calling function */ + int MPIR_Comm_create_intra(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, MPIR_Comm ** newcomm_ptr) +@@ -251,8 +239,7 @@ int MPIR_Comm_create_intra(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, MPIR_Co + } + + fn_exit: +- if (mapping) +- MPL_free(mapping); ++ MPL_free(mapping); + + MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPIR_COMM_CREATE_INTRA); + return mpi_errno; +@@ -269,10 +256,6 @@ int MPIR_Comm_create_intra(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, MPIR_Co + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_create_inter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* comm create impl for intercommunicators, assumes that the standard error + * checking has already taken place in the calling function */ + PMPI_LOCAL int MPIR_Comm_create_inter(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, +@@ -443,8 +426,7 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPIR_Comm * comm_ptr, MPIR_Group * group_p + + fn_exit: + MPIR_CHKLMEM_FREEALL(); +- if (mapping) +- MPL_free(mapping); ++ MPL_free(mapping); + + MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPIR_COMM_CREATE_INTER); + return mpi_errno; +@@ -454,10 +436,6 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPIR_Comm * comm_ptr, MPIR_Group * group_p + + #endif /* !defined(MPICH_MPI_FROM_PMPI) */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Comm_create - Creates a new communicator +@@ -562,12 +540,12 @@ int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_create", "**mpi_comm_create %C %G %p", comm, group, + newcomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_create_group.c ++++ b/src/mpi/comm/comm_create_group.c +@@ -28,10 +28,6 @@ int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm * ne + #undef MPI_Comm_create_group + #define MPI_Comm_create_group PMPI_Comm_create_group + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_create_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* comm create group impl; assumes that the standard error checking + * has already taken place in the calling function */ + int MPIR_Comm_create_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, int tag, +@@ -107,8 +103,7 @@ int MPIR_Comm_create_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, int tag + } + + fn_exit: +- if (mapping) +- MPL_free(mapping); ++ MPL_free(mapping); + + MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPIR_COMM_CREATE_GROUP); + return mpi_errno; +@@ -127,10 +122,6 @@ int MPIR_Comm_create_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, int tag + + #endif /* !defined(MPICH_MPI_FROM_PMPI) */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_create_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Comm_create_group - Creates a new communicator +@@ -233,12 +224,12 @@ int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm * ne + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_comm_create_group", + "**mpi_comm_create_group %C %G %d %p", comm, group, tag, newcomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_dup.c ++++ b/src/mpi/comm/comm_dup.c +@@ -26,10 +26,6 @@ int MPI_Comm_dup(MPI_Comm comm, MPI_Comm * newcomm) __attribute__ ((weak, alias( + #undef MPI_Comm_dup + #define MPI_Comm_dup PMPI_Comm_dup + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_dup_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_dup_impl(MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -67,10 +63,6 @@ int MPIR_Comm_dup_impl(MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm_ptr) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_dup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Comm_dup - Duplicates an existing communicator with all its cached +@@ -176,13 +168,13 @@ int MPI_Comm_dup(MPI_Comm comm, MPI_Comm * newcomm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_dup", "**mpi_comm_dup %C %p", comm, newcomm); + } + #endif + if (newcomm) + *newcomm = MPI_COMM_NULL; +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_dup_with_info.c ++++ b/src/mpi/comm/comm_dup_with_info.c +@@ -27,10 +27,6 @@ int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm * newcomm) + #undef MPI_Comm_dup_with_info + #define MPI_Comm_dup_with_info PMPI_Comm_dup_with_info + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_dup_with_info_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_dup_with_info_impl(MPIR_Comm * comm_ptr, MPIR_Info * info_ptr, + MPIR_Comm ** newcomm_p_p) + { +@@ -51,10 +47,6 @@ int MPIR_Comm_dup_with_info_impl(MPIR_Comm * comm_ptr, MPIR_Info * info_ptr, + #endif /* MPICH_MPI_FROM_PMPI */ + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_dup_with_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Comm_dup_with_info - Duplicates an existing communicator with all its cached +@@ -147,13 +139,13 @@ int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm * newcomm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_comm_dup_with_info", + "**mpi_comm_dup_with_info %C %I %p", comm, info, newcomm); + } + #endif + *newcomm = MPI_COMM_NULL; +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_failure_ack.c ++++ b/src/mpi/comm/comm_failure_ack.c +@@ -28,10 +28,6 @@ int MPIX_Comm_failure_ack(MPI_Comm comm) __attribute__ ((weak, alias("PMPIX_Comm + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Comm_failure_ack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPIX_Comm_failure_ack - Acknowledge the current group of failed processes +@@ -108,11 +104,11 @@ int MPIX_Comm_failure_ack(MPI_Comm comm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpix_comm_failure_ack", "**mpix_comm_failure_ack %C", comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_failure_get_acked.c ++++ b/src/mpi/comm/comm_failure_get_acked.c +@@ -29,10 +29,6 @@ int MPIX_Comm_failure_get_acked(MPI_Comm comm, MPI_Group * failedgrp) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Comm_failure_get_acked +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPIX_Comm_failure_get_acked - Get the group of acknowledged failures. +@@ -113,12 +109,12 @@ int MPIX_Comm_failure_get_acked(MPI_Comm comm, MPI_Group * failedgrp) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpix_comm_failure_get_acked", + "**mpix_comm_failure_get_acked %C %p", comm, failedgrp); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_free.c ++++ b/src/mpi/comm/comm_free.c +@@ -26,20 +26,12 @@ int MPI_Comm_free(MPI_Comm * comm) __attribute__ ((weak, alias("PMPI_Comm_free") + #undef MPI_Comm_free + #define MPI_Comm_free PMPI_Comm_free + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_free_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_free_impl(MPIR_Comm * comm_ptr) + { + return MPIR_Comm_release(comm_ptr); + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_free - Marks the communicator object for deallocation + +@@ -111,7 +103,7 @@ int MPI_Comm_free(MPI_Comm * comm) + /* Cannot free the predefined communicators */ + if (HANDLE_GET_KIND(*comm) == HANDLE_KIND_BUILTIN) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_COMM, "**commperm", "**commperm %s", + comm_ptr->name); + } +@@ -142,11 +134,11 @@ int MPI_Comm_free(MPI_Comm * comm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_free", "**mpi_comm_free %p", comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_get_info.c ++++ b/src/mpi/comm/comm_get_info.c +@@ -27,10 +27,6 @@ int MPI_Comm_get_info(MPI_Comm comm, MPI_Info * info) + #undef MPI_Comm_get_info + #define MPI_Comm_get_info PMPI_Comm_get_info + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_get_info_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_get_info_impl(MPIR_Comm * comm_ptr, MPIR_Info ** info_p_p) + { + int mpi_errno = MPI_SUCCESS; +@@ -48,10 +44,6 @@ int MPIR_Comm_get_info_impl(MPIR_Comm * comm_ptr, MPIR_Info ** info_p_p) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_get_info - Returns a new info object containing the hints + of the communicator associated with comm. The current setting of +@@ -137,12 +129,12 @@ int MPI_Comm_get_info(MPI_Comm comm, MPI_Info * info_used) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_comm_get_info", + "**mpi_comm_get_info %W %p", comm, info_used); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_get_name.c ++++ b/src/mpi/comm/comm_get_name.c +@@ -36,10 +36,6 @@ void MPIR_Comm_get_name_impl(MPIR_Comm * comm_ptr, char *comm_name, int *resultl + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_get_name +-#undef FCNAME +-#define FCNAME "MPI_Comm_get_name" + + /*@ + MPI_Comm_get_name - Return the print name from the communicator +@@ -122,11 +118,11 @@ int MPI_Comm_get_name(MPI_Comm comm, char *comm_name, int *resultlen) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_get_name", "**mpi_comm_get_name %C %p %p", comm, + comm_name, resultlen); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/comm/comm_group.c ++++ b/src/mpi/comm/comm_group.c +@@ -27,10 +27,6 @@ int MPI_Comm_group(MPI_Comm comm, MPI_Group * group) + #undef MPI_Comm_group + #define MPI_Comm_group PMPI_Comm_group + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_group_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_group_impl(MPIR_Comm * comm_ptr, MPIR_Group ** group_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -82,10 +78,6 @@ int MPIR_Comm_group_impl(MPIR_Comm * comm_ptr, MPIR_Group ** group_ptr) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Comm_group - Accesses the group associated with given communicator +@@ -168,11 +160,11 @@ int MPI_Comm_group(MPI_Comm comm, MPI_Group * group) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_group", "**mpi_comm_group %C %p", comm, group); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_idup.c ++++ b/src/mpi/comm/comm_idup.c +@@ -27,10 +27,6 @@ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm * newcomm, MPI_Request * request) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_idup_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_idup_impl(MPIR_Comm * comm_ptr, MPIR_Comm ** newcommp, MPIR_Request ** reqp) + { + int mpi_errno = MPI_SUCCESS; +@@ -74,10 +70,6 @@ int MPIR_Comm_idup_impl(MPIR_Comm * comm_ptr, MPIR_Comm ** newcommp, MPIR_Reques + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_idup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_idup - nonblocking communicator duplication + +@@ -162,12 +154,12 @@ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm * newcomm, MPI_Request * request) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_idup", "**mpi_comm_idup %C %p %p", comm, newcomm, + request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_rank.c ++++ b/src/mpi/comm/comm_rank.c +@@ -26,10 +26,6 @@ int MPI_Comm_rank(MPI_Comm comm, int *rank) __attribute__ ((weak, alias("PMPI_Co + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_rank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -108,10 +104,10 @@ int MPI_Comm_rank(MPI_Comm comm, int *rank) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_rank", "**mpi_comm_rank %C %p", comm, rank); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/comm/comm_remote_group.c ++++ b/src/mpi/comm/comm_remote_group.c +@@ -27,10 +27,6 @@ int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group * group) + #undef MPI_Comm_remote_group + #define MPI_Comm_remote_group PMPI_Comm_remote_group + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_remote_group_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_remote_group_impl(MPIR_Comm * comm_ptr, MPIR_Group ** group_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -70,10 +66,6 @@ int MPIR_Comm_remote_group_impl(MPIR_Comm * comm_ptr, MPIR_Group ** group_ptr) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_remote_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Comm_remote_group - Accesses the remote group associated with +@@ -134,7 +126,7 @@ int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group * group) + /* If comm_ptr is not valid, it will be reset to null */ + if (comm_ptr && comm_ptr->comm_kind != MPIR_COMM_KIND__INTERCOMM) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_COMM, "**commnotinter", 0); + } + if (mpi_errno) +@@ -164,12 +156,12 @@ int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group * group) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_remote_group", "**mpi_comm_remote_group %C %p", comm, + group); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_remote_size.c ++++ b/src/mpi/comm/comm_remote_size.c +@@ -28,10 +28,6 @@ int MPI_Comm_remote_size(MPI_Comm comm, int *size) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_remote_size +-#undef FCNAME +-#define FCNAME "MPI_Comm_remote_size" + + /*@ + +@@ -87,7 +83,7 @@ int MPI_Comm_remote_size(MPI_Comm comm, int *size) + /* If comm_ptr is not valid, it will be reset to null */ + if (comm_ptr && comm_ptr->comm_kind != MPIR_COMM_KIND__INTERCOMM) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_COMM, "**commnotinter", 0); + } + if (mpi_errno) +@@ -115,11 +111,11 @@ int MPI_Comm_remote_size(MPI_Comm comm, int *size) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_remote_size", "**mpi_comm_remote_size %C %p", comm, + size); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/comm/comm_revoke.c ++++ b/src/mpi/comm/comm_revoke.c +@@ -30,10 +30,6 @@ int MPIX_Comm_revoke(MPI_Comm comm) __attribute__ ((weak, alias("PMPIX_Comm_revo + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Comm_revoke +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIX_Comm_revoke - Prevent a communicator from being used in the future + +@@ -106,11 +102,11 @@ int MPIX_Comm_revoke(MPI_Comm comm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpix_comm_revoke", "**mpix_comm_revoke %C", comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_set_info.c ++++ b/src/mpi/comm/comm_set_info.c +@@ -28,10 +28,6 @@ int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info) + #undef MPI_Comm_set_info + #define MPI_Comm_set_info PMPI_Comm_set_info + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_set_info_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_set_info_impl(MPIR_Comm * comm_ptr, MPIR_Info * info_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -73,10 +69,6 @@ int MPIR_Comm_set_info_impl(MPIR_Comm * comm_ptr, MPIR_Info * info_ptr) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_set_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_set_info - Set new values for the hints of the + communicator associated with comm. The call is collective on the +@@ -155,12 +147,12 @@ int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_comm_set_info", + "**mpi_comm_set_info %W %p", comm, info); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_set_name.c ++++ b/src/mpi/comm/comm_set_name.c +@@ -28,10 +28,6 @@ int MPI_Comm_set_name(MPI_Comm comm, const char *comm_name) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_set_name +-#undef FCNAME +-#define FCNAME "MPI_Comm_set_name" + + /*@ + MPI_Comm_set_name - Sets the print name for a communicator +@@ -107,11 +103,11 @@ int MPI_Comm_set_name(MPI_Comm comm, const char *comm_name) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_set_name", "**mpi_comm_set_name %C %s", comm, + comm_name); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/comm/comm_shrink.c ++++ b/src/mpi/comm/comm_shrink.c +@@ -41,10 +41,6 @@ int MPIX_Comm_shrink(MPI_Comm comm, MPI_Comm * newcomm) + #undef MPIX_Comm_shrink + #define MPIX_Comm_shrink PMPIX_Comm_shrink + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_shrink +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* comm shrink impl; assumes that standard error checking has already taken + * place in the calling function */ + int MPIR_Comm_shrink(MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm_ptr) +@@ -118,10 +114,6 @@ int MPIR_Comm_shrink(MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm_ptr) + + #endif /* !defined(MPICH_MPI_FROM_PMPI) */ + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Comm_shrink +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIX_Comm_shrink - Creates a new communitor from an existing communicator while + excluding failed processes +@@ -199,12 +191,12 @@ int MPIX_Comm_shrink(MPI_Comm comm, MPI_Comm * newcomm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpix_comm_shrink", + "**mpix_comm_shrink %C %p", comm, newcomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_size.c ++++ b/src/mpi/comm/comm_size.c +@@ -25,10 +25,6 @@ int MPI_Comm_size(MPI_Comm comm, int *size) __attribute__ ((weak, alias("PMPI_Co + #define MPI_Comm_size PMPI_Comm_size + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_size +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -111,10 +107,10 @@ int MPI_Comm_size(MPI_Comm comm, int *size) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_size", "**mpi_comm_size %C %p", comm, size); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/comm/comm_split.c ++++ b/src/mpi/comm/comm_split.c +@@ -122,10 +122,6 @@ static void MPIU_Sort_inttable(sorttype * keytable, int size) + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_impl(MPIR_Comm * comm_ptr, int color, int key, MPIR_Comm ** newcomm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -400,10 +396,6 @@ int MPIR_Comm_split_impl(MPIR_Comm * comm_ptr, int color, int key, MPIR_Comm ** + + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_split +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Comm_split - Creates new communicators based on colors and keys +@@ -504,12 +496,12 @@ int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm * newcomm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_split", "**mpi_comm_split %C %d %d %p", comm, color, + key, newcomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_split_type.c ++++ b/src/mpi/comm/comm_split_type.c +@@ -35,10 +35,6 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, M + #undef MPI_Comm_split_type + #define MPI_Comm_split_type PMPI_Comm_split_type + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_type_self +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_type_self(MPIR_Comm * user_comm_ptr, int split_type, int key, + MPIR_Comm ** newcomm_ptr) + { +@@ -72,10 +68,6 @@ int MPIR_Comm_split_type_self(MPIR_Comm * user_comm_ptr, int split_type, int key + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_type_node +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_type_node(MPIR_Comm * user_comm_ptr, int split_type, int key, + MPIR_Comm ** newcomm_ptr) + { +@@ -613,59 +605,73 @@ static int network_split_by_minsize(MPIR_Comm * comm_ptr, int key, int subcomm_m + num_processes_at_node[node_index] < subcomm_min_size))) { + MPIR_Comm *node_comm; + int subcomm_rank; +- int min_tree_depth; +- hwloc_cpuset_t *node_comm_bindset; ++ int tree_depth; ++ int min_tree_depth = -1; + int num_procs; + + num_procs = num_processes_at_node[node_index]; + node_comm = *newcomm_ptr; + subcomm_rank = MPIR_Comm_rank(node_comm); +- node_comm_bindset = +- (hwloc_cpuset_t *) MPL_calloc(num_procs, sizeof(hwloc_cpuset_t), MPL_MEM_OTHER); +- node_comm_bindset[subcomm_rank] = MPIR_Process.bindset; ++ hwloc_obj_t obj_containing_cpuset = ++ hwloc_get_obj_covering_cpuset(MPIR_Process.hwloc_topology, MPIR_Process.bindset); + +- /* Send the bindset to processes in node communicator */ +- mpi_errno = +- MPID_Allreduce(MPI_IN_PLACE, node_comm_bindset, +- num_procs * sizeof(hwloc_cpuset_t), MPI_BYTE, +- MPI_NO_OP, node_comm, &errflag); +- +- +- min_tree_depth = -1; +- for (i = 0; i < num_procs; i++) { +- hwloc_obj_t obj_containing_cpuset = +- hwloc_get_obj_covering_cpuset(MPIR_Process.hwloc_topology, +- node_comm_bindset[i]); +- if (obj_containing_cpuset->depth < min_tree_depth || min_tree_depth == -1) { +- min_tree_depth = obj_containing_cpuset->depth; +- } +- } ++ /* get depth in topology tree */ ++ tree_depth = obj_containing_cpuset->depth; ++ ++ /* get min tree depth to all processes */ ++ MPID_Allreduce(&tree_depth, &min_tree_depth, 1, MPI_INT, MPI_MIN, node_comm, &errflag); + + if (min_tree_depth) { +- int num_hwloc_objs_at_depth = +- hwloc_get_nbobjs_by_depth(MPIR_Process.hwloc_topology, min_tree_depth); ++ int num_hwloc_objs_at_depth; ++ int *parent_idx = MPL_calloc(num_procs, sizeof(int), MPL_MEM_OTHER); ++ ++ while (obj_containing_cpuset->depth != min_tree_depth) ++ obj_containing_cpuset = obj_containing_cpuset->parent; ++ parent_idx[subcomm_rank] = obj_containing_cpuset->logical_index; ++ ++ /* get parent_idx to all processes */ ++ MPID_Allgather(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, parent_idx, 1, MPI_INT, ++ node_comm, &errflag); ++ ++ /* reorder parent indices */ ++ for (i = 0; i < num_procs - 1; i++) { ++ for (j = 0; j < num_procs - i - 1; j++) { ++ if (parent_idx[j] > parent_idx[j + 1]) { ++ int tmp = parent_idx[j]; ++ parent_idx[j] = parent_idx[j + 1]; ++ parent_idx[j + 1] = tmp; ++ } ++ } ++ } ++ ++ /* get number of parents and unique indices */ ++ int *obj_idx_at_depth = MPL_malloc(sizeof(int) * num_procs, MPL_MEM_OTHER); ++ obj_idx_at_depth[0] = parent_idx[0]; ++ int current_idx = parent_idx[0]; ++ num_hwloc_objs_at_depth = 1; ++ for (i = 1; i < num_procs; i++) { ++ if (parent_idx[i] != current_idx) { ++ obj_idx_at_depth[num_hwloc_objs_at_depth++] = parent_idx[i]; ++ current_idx = parent_idx[i]; ++ } ++ } ++ + int *processes_cpuset = + (int *) MPL_calloc(num_hwloc_objs_at_depth, sizeof(int), MPL_MEM_OTHER); +- hwloc_obj_t parent_obj; ++ + int hw_obj_index; + int current_proc_index = -1; + +- parent_obj = NULL; +- hw_obj_index = 0; +- while ((parent_obj = +- hwloc_get_next_obj_by_depth(MPIR_Process.hwloc_topology, min_tree_depth, +- parent_obj)) != NULL) { ++ for (hw_obj_index = 0; hw_obj_index < num_hwloc_objs_at_depth; hw_obj_index++) { + for (i = 0; i < num_procs; i++) { +- if (hwloc_bitmap_isincluded(parent_obj->cpuset, node_comm_bindset[i]) || +- hwloc_bitmap_isequal(parent_obj->cpuset, node_comm_bindset[i])) { +- processes_cpuset[hw_obj_index] = 1; ++ if (parent_idx[i] == obj_idx_at_depth[hw_obj_index]) { ++ processes_cpuset[hw_obj_index]++; + if (i == subcomm_rank) { + current_proc_index = hw_obj_index; + } + break; + } + } +- hw_obj_index++; + } + + color = +@@ -676,9 +682,10 @@ static int network_split_by_minsize(MPIR_Comm * comm_ptr, int key, int subcomm_m + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPL_free(processes_cpuset); ++ MPL_free(parent_idx); ++ MPL_free(obj_idx_at_depth); + MPIR_Comm_free_impl(node_comm); + } +- MPL_free(node_comm_bindset); + } + MPL_free(num_processes_at_node); + } +@@ -824,8 +831,7 @@ static int compare_info_hint(const char *hintval, MPIR_Comm * comm_ptr, int *inf + MPIR_ERR_POP(mpi_errno); + + fn_exit: +- if (hintval_global != NULL) +- MPL_free(hintval_global); ++ MPL_free(hintval_global); + + *info_args_are_equal = hintval_equal_global; + return mpi_errno; +@@ -834,10 +840,6 @@ static int compare_info_hint(const char *hintval, MPIR_Comm * comm_ptr, int *inf + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_type_node_topo +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_type_node_topo(MPIR_Comm * user_comm_ptr, int split_type, int key, + MPIR_Info * info_ptr, MPIR_Comm ** newcomm_ptr) + { +@@ -916,10 +918,6 @@ int MPIR_Comm_split_type_node_topo(MPIR_Comm * user_comm_ptr, int split_type, in + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_type_network_topo +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_type_network_topo(MPIR_Comm * comm_ptr, int key, const char *hintval, + MPIR_Comm ** newcomm_ptr) + { +@@ -944,14 +942,9 @@ int MPIR_Comm_split_type_network_topo(MPIR_Comm * comm_ptr, int key, const char + mpi_errno = network_split_by_torus_dimension(comm_ptr, key, dimension, newcomm_ptr); + } + #endif +- fn_exit: + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_type +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_type(MPIR_Comm * user_comm_ptr, int split_type, int key, + MPIR_Info * info_ptr, MPIR_Comm ** newcomm_ptr) + { +@@ -991,10 +984,6 @@ int MPIR_Comm_split_type(MPIR_Comm * user_comm_ptr, int split_type, int key, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_type_nbhd_common_dir +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_type_nbhd_common_dir(MPIR_Comm * user_comm_ptr, int key, const char *hintval, + MPIR_Comm ** newcomm_ptr) + { +@@ -1018,10 +1007,6 @@ int MPIR_Comm_split_type_nbhd_common_dir(MPIR_Comm * user_comm_ptr, int key, con + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_type_neighborhood +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_type_neighborhood(MPIR_Comm * comm_ptr, int split_type, int key, + MPIR_Info * info_ptr, MPIR_Comm ** newcomm_ptr) + { +@@ -1077,10 +1062,6 @@ int MPIR_Comm_split_type_neighborhood(MPIR_Comm * comm_ptr, int split_type, int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_type_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_split_type_impl(MPIR_Comm * comm_ptr, int split_type, int key, + MPIR_Info * info_ptr, MPIR_Comm ** newcomm_ptr) + { +@@ -1107,10 +1088,6 @@ int MPIR_Comm_split_type_impl(MPIR_Comm * comm_ptr, int split_type, int key, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_split_type +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Comm_split_type - Creates new communicators based on split types and keys +@@ -1206,12 +1183,12 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, M + /* FIXME this error code is wrong, it's the error code for + * regular MPI_Comm_split */ + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_comm_split", + "**mpi_comm_split %C %d %d %p", comm, split_type, key, newcomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/comm_test_inter.c ++++ b/src/mpi/comm/comm_test_inter.c +@@ -28,10 +28,6 @@ int MPI_Comm_test_inter(MPI_Comm comm, int *flag) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_test_inter +-#undef FCNAME +-#define FCNAME "MPI_Comm_test_inter" + + /*@ + +@@ -109,11 +105,11 @@ int MPI_Comm_test_inter(MPI_Comm comm, int *flag) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_test_inter", "**mpi_comm_test_inter %C %p", comm, + flag); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/comm/commutil.c ++++ b/src/mpi/comm/commutil.c +@@ -19,10 +19,8 @@ + + /* Preallocated comm objects */ + /* initialized in initthread.c */ +-MPIR_Comm MPIR_Comm_builtin[MPIR_COMM_N_BUILTIN] = { {0} +-}; +-MPIR_Comm MPIR_Comm_direct[MPID_COMM_PREALLOC] = { {0} +-}; ++MPIR_Comm MPIR_Comm_builtin[MPIR_COMM_N_BUILTIN]; ++MPIR_Comm MPIR_Comm_direct[MPID_COMM_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Comm_mem = { + 0, +@@ -123,10 +121,6 @@ int MPII_Comm_init(MPIR_Comm * comm_p) + Create a communicator structure and perform basic initialization + (mostly clearing fields and updating the reference count). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_create +-#undef FCNAME +-#define FCNAME "MPIR_Comm_create" + int MPIR_Comm_create(MPIR_Comm ** newcomm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -158,10 +152,6 @@ int MPIR_Comm_create(MPIR_Comm ** newcomm_ptr) + /* Create a local intra communicator from the local group of the + specified intercomm. */ + /* FIXME this is an alternative constructor that doesn't use MPIR_Comm_create! */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Setup_intercomm_localcomm +-#undef FCNAME +-#define FCNAME "MPII_Setup_intercomm_localcomm" + int MPII_Setup_intercomm_localcomm(MPIR_Comm * intercomm_ptr) + { + MPIR_Comm *localcomm_ptr; +@@ -217,10 +207,6 @@ int MPII_Setup_intercomm_localcomm(MPIR_Comm * intercomm_ptr) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_map_irregular +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_map_irregular(MPIR_Comm * newcomm, MPIR_Comm * src_comm, + int *src_mapping, int src_mapping_size, + MPIR_Comm_map_dir_t dir, MPIR_Comm_map_t ** map) +@@ -266,10 +252,6 @@ int MPIR_Comm_map_irregular(MPIR_Comm * newcomm, MPIR_Comm * src_comm, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_map_dup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_map_dup(MPIR_Comm * newcomm, MPIR_Comm * src_comm, MPIR_Comm_map_dir_t dir) + { + int mpi_errno = MPI_SUCCESS; +@@ -300,10 +282,6 @@ int MPIR_Comm_map_dup(MPIR_Comm * newcomm, MPIR_Comm * src_comm, MPIR_Comm_map_d + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_map_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_map_free(MPIR_Comm * comm) + { + int mpi_errno = MPI_SUCCESS; +@@ -330,10 +308,6 @@ int MPIR_Comm_map_free(MPIR_Comm * comm) + + For example, we create sub-communicators for SMP-aware collectives at this + step. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_commit +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_commit(MPIR_Comm * comm) + { + int mpi_errno = MPI_SUCCESS; +@@ -370,10 +344,25 @@ int MPIR_Comm_commit(MPIR_Comm * comm) + + if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM && !MPIR_CONTEXT_READ_FIELD(SUBCOMM, comm->context_id)) { /*make sure this is not a subcomm */ + +- mpi_errno = MPIR_Find_local_and_external(comm, +- &num_local, &local_rank, &local_procs, +- &num_external, &external_rank, &external_procs, +- &comm->intranode_table, &comm->internode_table); ++ mpi_errno = MPIR_Find_local(comm, &num_local, &local_rank, &local_procs, ++ &comm->intranode_table); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno) { ++ if (MPIR_Err_is_fatal(mpi_errno)) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Non-fatal errors simply mean that this communicator will not have ++ * any node awareness. Node-aware collectives are an optimization. */ ++ MPL_DBG_MSG_P(MPIR_DBG_COMM, VERBOSE, "MPIR_Find_local failed for comm_ptr=%p", comm); ++ MPL_free(comm->intranode_table); ++ ++ mpi_errno = MPI_SUCCESS; ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ mpi_errno = MPIR_Find_external(comm, &num_external, &external_rank, &external_procs, ++ &comm->internode_table); + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno) { + if (MPIR_Err_is_fatal(mpi_errno)) +@@ -382,11 +371,8 @@ int MPIR_Comm_commit(MPIR_Comm * comm) + /* Non-fatal errors simply mean that this communicator will not have + * any node awareness. Node-aware collectives are an optimization. */ + MPL_DBG_MSG_P(MPIR_DBG_COMM, VERBOSE, +- "MPIR_Find_local_and_external failed for comm_ptr=%p", comm); +- if (comm->intranode_table) +- MPL_free(comm->intranode_table); +- if (comm->internode_table) +- MPL_free(comm->internode_table); ++ "MPIR_Find_external failed for comm_ptr=%p", comm); ++ MPL_free(comm->internode_table); + + mpi_errno = MPI_SUCCESS; + goto fn_exit; +@@ -489,10 +475,8 @@ int MPIR_Comm_commit(MPIR_Comm * comm) + MPIR_Comm_map_free(comm); + } + +- if (external_procs != NULL) +- MPL_free(external_procs); +- if (local_procs != NULL) +- MPL_free(local_procs); ++ MPL_free(external_procs); ++ MPL_free(local_procs); + + MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPIR_COMM_COMMIT); + return mpi_errno; +@@ -541,16 +525,12 @@ int MPII_Comm_is_node_consecutive(MPIR_Comm * comm) + * + * Used by cart_create, graph_create, and dup_create + */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Comm_copy +-#undef FCNAME +-#define FCNAME "MPII_Comm_copy" + int MPII_Comm_copy(MPIR_Comm * comm_ptr, int size, MPIR_Comm ** outcomm_ptr) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Context_id_t new_context_id, new_recvcontext_id; + MPIR_Comm *newcomm_ptr = NULL; +- MPIR_Comm_map_t *map; ++ MPIR_Comm_map_t *map = NULL; + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPIR_COMM_COPY); + + MPIR_FUNC_TERSE_ENTER(MPID_STATE_MPIR_COMM_COPY); +@@ -677,10 +657,6 @@ int MPII_Comm_copy(MPIR_Comm * comm_ptr, int size, MPIR_Comm ** outcomm_ptr) + * + * Used by comm_idup. + */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Comm_copy_data +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Comm_copy_data(MPIR_Comm * comm_ptr, MPIR_Comm ** outcomm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -743,10 +719,6 @@ int MPII_Comm_copy_data(MPIR_Comm * comm_ptr, MPIR_Comm ** outcomm_ptr) + * + * !!! This routine should *never* be called outside of MPIR_Comm_release{,_always} !!! + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_delete_internal +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr) + { + int in_use; +@@ -810,10 +782,8 @@ int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr) + MPIR_Comm_release(comm_ptr->node_comm); + if (comm_ptr->node_roots_comm) + MPIR_Comm_release(comm_ptr->node_roots_comm); +- if (comm_ptr->intranode_table != NULL) +- MPL_free(comm_ptr->intranode_table); +- if (comm_ptr->internode_table != NULL) +- MPL_free(comm_ptr->internode_table); ++ MPL_free(comm_ptr->intranode_table); ++ MPL_free(comm_ptr->internode_table); + + /* Free the context value. This should come after freeing the + * intra/inter-node communicators since those free calls won't +@@ -868,10 +838,6 @@ int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr) + references, delete the communicator and recover all storage and + context ids. This version of the function always manipulates the reference + counts, even for predefined objects. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_release_always +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_release_always(MPIR_Comm * comm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -898,10 +864,6 @@ int MPIR_Comm_release_always(MPIR_Comm * comm_ptr) + + /* Apply all known info hints in the specified info chain to the given + * communicator. */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Comm_apply_hints +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPII_Comm_apply_hints(MPIR_Comm * comm_ptr, MPIR_Info * info_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -936,10 +898,6 @@ int MPII_Comm_apply_hints(MPIR_Comm * comm_ptr, MPIR_Info * info_ptr) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME free_hint_handles +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int free_hint_handles(void *ignore) + { + int mpi_errno = MPI_SUCCESS; +@@ -961,10 +919,6 @@ static int free_hint_handles(void *ignore) + + /* The hint logic is stored in a uthash, with hint name as key and + * the function responsible for applying the hint as the value. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_register_hint +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_register_hint(const char *hint_key, MPIR_Comm_hint_fn_t fn, void *state) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/comm/contextid.c ++++ b/src/mpi/comm/contextid.c +@@ -288,10 +288,6 @@ static volatile int mask_in_use = 0; + * used. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_contextid_sparse +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Get_contextid_sparse(MPIR_Comm * comm_ptr, MPIR_Context_id_t * context_id, int ignore_id) + { + return MPIR_Get_contextid_sparse_group(comm_ptr, NULL /*group_ptr */ , +@@ -320,10 +316,6 @@ struct gcn_state *next_gcn = NULL; + * according to the context_id of of parrent communicator and the tag, wherby blocking context_id + * allocations can have the same tag, while nonblocking operations cannot. In the non-blocking + * case, the user is reponsible for the right tags if "comm_create_group" is used */ +-#undef FUNCNAME +-#define FUNCNAME add_gcn_to_list +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int add_gcn_to_list(struct gcn_state *new_state) + { + int mpi_errno = 0; +@@ -365,10 +357,6 @@ static int add_gcn_to_list(struct gcn_state *new_state) + * in the group should call this routine. That is, it is collective only over + * the given group. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_contextid_sparse_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Get_contextid_sparse_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, int tag, + MPIR_Context_id_t * context_id, int ignore_id) + { +@@ -649,10 +637,6 @@ int MPIR_Get_contextid_sparse_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr + static int sched_cb_gcn_copy_mask(MPIR_Comm * comm, int tag, void *state); + static int sched_cb_gcn_allocate_cid(MPIR_Comm * comm, int tag, void *state); + static int sched_cb_gcn_bcast(MPIR_Comm * comm, int tag, void *state); +-#undef FUNCNAME +-#define FUNCNAME sched_cb_commit_comm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int sched_cb_commit_comm(MPIR_Comm * comm, int tag, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -667,10 +651,6 @@ static int sched_cb_commit_comm(MPIR_Comm * comm, int tag, void *state) + + } + +-#undef FUNCNAME +-#define FUNCNAME sched_cb_gcn_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int sched_cb_gcn_bcast(MPIR_Comm * comm, int tag, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -722,10 +702,6 @@ static int sched_cb_gcn_bcast(MPIR_Comm * comm, int tag, void *state) + * execute and insert wrong order of entries to the nonblocking schedule and + * cause errors. + */ +-#undef FUNCNAME +-#define FUNCNAME sched_cb_gcn_allocate_cid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int sched_cb_gcn_allocate_cid(MPIR_Comm * comm, int tag, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -837,10 +813,6 @@ static int sched_cb_gcn_allocate_cid(MPIR_Comm * comm, int tag, void *state) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME sched_cb_gcn_copy_mask +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int sched_cb_gcn_copy_mask(MPIR_Comm * comm, int tag, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -931,10 +903,6 @@ static int sched_cb_gcn_copy_mask(MPIR_Comm * comm, int tag, void *state) + * To avoid deadlock or livelock, it uses the same eager protocol as + * multi-threaded MPIR_Get_contextid_sparse_group. + */ +-#undef FUNCNAME +-#define FUNCNAME sched_get_cid_nonblock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int sched_get_cid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcomm, + MPIR_Context_id_t * ctx0, MPIR_Context_id_t * ctx1, + MPIR_Sched_t s, MPIR_Comm_kind_t gcn_cid_kind) +@@ -987,10 +955,6 @@ static int sched_get_cid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcomm, + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_contextid_nonblock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Get_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcommp, MPIR_Request ** req) + { + int mpi_errno = MPI_SUCCESS; +@@ -1030,10 +994,6 @@ int MPIR_Get_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcommp, MPIR + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_intercomm_contextid_nonblock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Get_intercomm_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcommp, + MPIR_Request ** req) + { +@@ -1099,10 +1059,6 @@ int MPIR_Get_intercomm_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newc + * This uses the thread-safe (if necessary) routine to get a context id + * and does not need its own thread-safe version. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_intercomm_contextid +-#undef FCNAME +-#define FCNAME "MPIR_Get_intercomm_contextid" + int MPIR_Get_intercomm_contextid(MPIR_Comm * comm_ptr, MPIR_Context_id_t * context_id, + MPIR_Context_id_t * recvcontext_id) + { +@@ -1143,8 +1099,8 @@ int MPIR_Get_intercomm_contextid(MPIR_Comm * comm_ptr, MPIR_Context_id_t * conte + + /* Make sure that all of the local processes now have this + * id */ +- mpi_errno = MPIR_Bcast(&remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, +- 0, comm_ptr->local_comm, &errflag); ++ mpi_errno = MPIR_Bcast_impl(&remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, ++ 0, comm_ptr->local_comm, &errflag); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +@@ -1159,10 +1115,6 @@ int MPIR_Get_intercomm_contextid(MPIR_Comm * comm_ptr, MPIR_Context_id_t * conte + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Free_contextid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Free_contextid(MPIR_Context_id_t context_id) + { + int idx, bitpos, raw_prefix; +--- a/src/mpi/comm/intercomm_create.c ++++ b/src/mpi/comm/intercomm_create.c +@@ -28,10 +28,6 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_co + #undef MPI_Intercomm_create + #define MPI_Intercomm_create PMPI_Intercomm_create + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Intercomm_create_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Intercomm_create_impl(MPIR_Comm * local_comm_ptr, int local_leader, + MPIR_Comm * peer_comm_ptr, int remote_leader, int tag, + MPIR_Comm ** new_intercomm_ptr) +@@ -148,10 +144,8 @@ int MPIR_Intercomm_create_impl(MPIR_Comm * local_comm_ptr, int local_leader, + + + fn_exit: +- if (remote_lpids) { +- MPL_free(remote_lpids); +- remote_lpids = NULL; +- } ++ MPL_free(remote_lpids); ++ remote_lpids = NULL; + MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPIR_COMM_KIND__INTERCOMM_CREATE_IMPL); + return mpi_errno; + fn_fail: +@@ -162,10 +156,6 @@ int MPIR_Intercomm_create_impl(MPIR_Comm * local_comm_ptr, int local_leader, + #endif /* MPICH_MPI_FROM_PMPI */ + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Intercomm_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Intercomm_create - Creates an intercommuncator from two intracommunicators +@@ -333,13 +323,13 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_intercomm_create", + "**mpi_intercomm_create %C %d %C %d %d %p", local_comm, + local_leader, peer_comm, remote_leader, tag, newintercomm); + } + #endif /* HAVE_ERROR_CHECKING */ +- mpi_errno = MPIR_Err_return_comm(local_comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(local_comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/comm/intercomm_merge.c ++++ b/src/mpi/comm/intercomm_merge.c +@@ -32,10 +32,6 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm * newintracomm) + * basing on network addresses of existing communicator. + */ + +-#undef FUNCNAME +-#define FUNCNAME create_and_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int create_and_map(MPIR_Comm * comm_ptr, int local_high, MPIR_Comm * new_intracomm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -64,10 +60,6 @@ static int create_and_map(MPIR_Comm * comm_ptr, int local_high, MPIR_Comm * new_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Intercomm_merge_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Intercomm_merge_impl(MPIR_Comm * comm_ptr, int high, MPIR_Comm ** new_intracomm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -208,10 +200,6 @@ int MPIR_Intercomm_merge_impl(MPIR_Comm * comm_ptr, int high, MPIR_Comm ** new_i + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Intercomm_merge +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + MPI_Intercomm_merge - Creates an intracommuncator from an intercommunicator +@@ -287,7 +275,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm * newintracomm) + /* If comm_ptr is not valid, it will be reset to null */ + if (comm_ptr && comm_ptr->comm_kind != MPIR_COMM_KIND__INTERCOMM) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_COMM, "**commnotinter", 0); + } + if (mpi_errno) +@@ -320,7 +308,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm * newintracomm) + /* acthigh must either == 0 or the size of the local comm */ + if (acthigh != 0 && acthigh != comm_ptr->local_size) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_ARG, "**notsame", "**notsame %s %s", + "high", "MPI_Intercomm_merge"); + goto fn_fail; +@@ -350,12 +338,12 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm * newintracomm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_intercomm_merge", "**mpi_intercomm_merge %C %d %p", + intercomm, high, newintracomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/Makefile.mk ++++ b/src/mpi/datatype/Makefile.mk +@@ -5,7 +5,7 @@ + ## See COPYRIGHT in top-level directory. + ## + +-include $(top_srcdir)/src/mpi/datatype/dataloop/Makefile.mk ++include $(top_srcdir)/src/mpi/datatype/typerep/Makefile.mk + + # for datatype.h, which is included by some other dirs + AM_CPPFLAGS += -I$(top_srcdir)/src/mpi/datatype +@@ -65,8 +65,6 @@ noinst_HEADERS += src/mpi/datatype/datatype.h \ + mpi_core_sources += \ + src/mpi/datatype/typeutil.c \ + src/mpi/datatype/ext32_datatype.c \ +- src/mpi/datatype/looputil.c \ + src/mpi/datatype/type_blockindexed.c \ + src/mpi/datatype/type_create_pairtype.c \ +- src/mpi/datatype/type_debug.c \ +- src/mpi/datatype/type_flatten.c ++ src/mpi/datatype/type_debug.c +--- a/src/mpi/datatype/address.c ++++ b/src/mpi/datatype/address.c +@@ -27,10 +27,6 @@ int MPI_Address(void *location, MPI_Aint * address) __attribute__ ((weak, alias( + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Address +-#undef FCNAME +-#define FCNAME "MPI_Address" + + /*@ + MPI_Address - Gets the address of a location in memory +@@ -89,7 +85,7 @@ int MPI_Address(void *location, MPI_Aint * address) + * standard, I can't tell if this is a compiler bug or a language bug. + */ + #ifdef CHAR_PTR_IS_ADDRESS +- *address = MPIR_VOID_PTR_CAST_TO_MPI_AINT((char *) location); ++ *address = (MPI_Aint) location; + #else + /* Note that this is the "portable" way to generate an address. + * The difference of two pointers is the number of elements +@@ -98,7 +94,7 @@ int MPI_Address(void *location, MPI_Aint * address) + * of bytes from 0 to location */ + /* To cover the case where a pointer is 32 bits and MPI_Aint is 64 bits, + * add cast to unsigned so the high order address bit is not sign-extended. */ +- *address = MPIR_VOID_PTR_CAST_TO_MPI_AINT((char *) location - (char *) MPI_BOTTOM); ++ *address = (MPI_Aint) ((char *) location - (char *) MPI_BOTTOM); + #endif + /* The same code is used in MPI_Get_address */ + +@@ -115,10 +111,10 @@ int MPI_Address(void *location, MPI_Aint * address) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_address", "**mpi_address %p %p", location, address); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/Makefile.mk ++++ /dev/null +@@ -1,27 +0,0 @@ +-## -*- Mode: Makefile; -*- +-## vim: set ft=automake : +-## +-## (C) 2016 by Argonne National Laboratory. +-## See COPYRIGHT in top-level directory. +-## +- +-mpi_core_sources += \ +- src/mpi/datatype/dataloop/darray_support.c \ +- src/mpi/datatype/dataloop/dataloop.c \ +- src/mpi/datatype/dataloop/dataloop_create.c \ +- src/mpi/datatype/dataloop/dataloop_create_blockindexed.c \ +- src/mpi/datatype/dataloop/dataloop_create_contig.c \ +- src/mpi/datatype/dataloop/dataloop_create_indexed.c \ +- src/mpi/datatype/dataloop/dataloop_create_pairtype.c \ +- src/mpi/datatype/dataloop/dataloop_create_struct.c \ +- src/mpi/datatype/dataloop/dataloop_create_vector.c \ +- src/mpi/datatype/dataloop/segment.c \ +- src/mpi/datatype/dataloop/segment_count.c \ +- src/mpi/datatype/dataloop/segment_flatten.c \ +- src/mpi/datatype/dataloop/subarray_support.c +- +-# several headers are included by the rest of MPICH +-AM_CPPFLAGS += -I$(top_srcdir)/src/mpi/datatype +- +-noinst_HEADERS += \ +- src/mpi/datatype/dataloop/typesize_support.h +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/darray_support.c ++++ /dev/null +@@ -1,344 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * Copyright (C) 1997 University of Chicago. +- * See COPYRIGHT notice in top-level directory. +- * +- * Note: This code originally appeared in ROMIO. +- */ +- +-#include "mpiimpl.h" +- +-static int MPII_Type_block(int *array_of_gsizes, int dim, int ndims, +- int nprocs, int rank, int darg, int order, MPI_Aint orig_extent, +- MPI_Datatype type_old, MPI_Datatype * type_new, MPI_Aint * st_offset); +-static int MPII_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nprocs, +- int rank, int darg, int order, MPI_Aint orig_extent, +- MPI_Datatype type_old, MPI_Datatype * type_new, MPI_Aint * st_offset); +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Type_convert_darray +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Type_convert_darray(int size, +- int rank, +- int ndims, +- int *array_of_gsizes, +- int *array_of_distribs, +- int *array_of_dargs, +- int *array_of_psizes, +- int order, MPI_Datatype oldtype, MPI_Datatype * newtype) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPI_Datatype type_old, type_new = MPI_DATATYPE_NULL, types[3]; +- int procs, tmp_rank, i, tmp_size, blklens[3], *coords; +- MPI_Aint *st_offsets, orig_extent, disps[3]; +- +- MPIR_Datatype_get_extent_macro(oldtype, orig_extent); +- +-/* calculate position in Cartesian grid as MPI would (row-major +- ordering) */ +- coords = (int *) DLOOP_Malloc(ndims * sizeof(int), MPL_MEM_DATATYPE); +- procs = size; +- tmp_rank = rank; +- for (i = 0; i < ndims; i++) { +- procs = procs / array_of_psizes[i]; +- coords[i] = tmp_rank / procs; +- tmp_rank = tmp_rank % procs; +- } +- +- st_offsets = (MPI_Aint *) DLOOP_Malloc(ndims * sizeof(MPI_Aint), MPL_MEM_DATATYPE); +- type_old = oldtype; +- +- if (order == MPI_ORDER_FORTRAN) { +- /* dimension 0 changes fastest */ +- for (i = 0; i < ndims; i++) { +- switch (array_of_distribs[i]) { +- case MPI_DISTRIBUTE_BLOCK: +- mpi_errno = MPII_Type_block(array_of_gsizes, i, ndims, +- array_of_psizes[i], +- coords[i], array_of_dargs[i], +- order, orig_extent, +- type_old, &type_new, st_offsets + i); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- break; +- case MPI_DISTRIBUTE_CYCLIC: +- mpi_errno = MPII_Type_cyclic(array_of_gsizes, i, ndims, +- array_of_psizes[i], coords[i], +- array_of_dargs[i], order, +- orig_extent, type_old, &type_new, st_offsets + i); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- break; +- case MPI_DISTRIBUTE_NONE: +- /* treat it as a block distribution on 1 process */ +- mpi_errno = MPII_Type_block(array_of_gsizes, i, ndims, 1, 0, +- MPI_DISTRIBUTE_DFLT_DARG, order, +- orig_extent, type_old, &type_new, st_offsets + i); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- break; +- } +- if (i) +- MPIR_Type_free_impl(&type_old); +- type_old = type_new; +- } +- +- /* add displacement and UB */ +- disps[1] = st_offsets[0]; +- tmp_size = 1; +- for (i = 1; i < ndims; i++) { +- tmp_size *= array_of_gsizes[i - 1]; +- disps[1] += ((MPI_Aint) tmp_size) * st_offsets[i]; +- } +- /* rest done below for both Fortran and C order */ +- } +- +- else { /* order == MPI_ORDER_C */ +- +- /* dimension ndims-1 changes fastest */ +- for (i = ndims - 1; i >= 0; i--) { +- switch (array_of_distribs[i]) { +- case MPI_DISTRIBUTE_BLOCK: +- mpi_errno = MPII_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], +- coords[i], array_of_dargs[i], order, +- orig_extent, type_old, &type_new, st_offsets + i); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- break; +- case MPI_DISTRIBUTE_CYCLIC: +- mpi_errno = MPII_Type_cyclic(array_of_gsizes, i, ndims, +- array_of_psizes[i], coords[i], +- array_of_dargs[i], order, +- orig_extent, type_old, &type_new, st_offsets + i); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- break; +- case MPI_DISTRIBUTE_NONE: +- /* treat it as a block distribution on 1 process */ +- mpi_errno = MPII_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], +- coords[i], MPI_DISTRIBUTE_DFLT_DARG, order, +- orig_extent, type_old, &type_new, st_offsets + i); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- break; +- } +- if (i != ndims - 1) +- MPIR_Type_free_impl(&type_old); +- type_old = type_new; +- } +- +- /* add displacement and UB */ +- disps[1] = st_offsets[ndims - 1]; +- tmp_size = 1; +- for (i = ndims - 2; i >= 0; i--) { +- tmp_size *= array_of_gsizes[i + 1]; +- disps[1] += ((MPI_Aint) tmp_size) * st_offsets[i]; +- } +- } +- +- disps[1] *= orig_extent; +- +- disps[2] = orig_extent; +- for (i = 0; i < ndims; i++) +- disps[2] *= (MPI_Aint) (array_of_gsizes[i]); +- +- disps[0] = 0; +- blklens[0] = blklens[1] = blklens[2] = 1; +- types[0] = MPI_LB; +- types[1] = type_new; +- types[2] = MPI_UB; +- +- DLOOP_Free(st_offsets); +- DLOOP_Free(coords); +- +- mpi_errno = MPIR_Type_struct_impl(3, blklens, disps, types, newtype); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIR_Type_free_impl(&type_new); +- +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-/* Returns MPI_SUCCESS on success, an MPI error code on failure. Code above +- * needs to call MPIO_Err_return_xxx. +- */ +-#undef FUNCNAME +-#define FUNCNAME MPII_Type_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPII_Type_block(int *array_of_gsizes, int dim, int ndims, int nprocs, +- int rank, int darg, int order, MPI_Aint orig_extent, +- MPI_Datatype type_old, MPI_Datatype * type_new, MPI_Aint * st_offset) +-{ +-/* nprocs = no. of processes in dimension dim of grid +- rank = coordinate of this process in dimension dim */ +- int mpi_errno = MPI_SUCCESS; +- int blksize, global_size, mysize, i, j; +- MPI_Aint stride; +- +- global_size = array_of_gsizes[dim]; +- +- if (darg == MPI_DISTRIBUTE_DFLT_DARG) +- blksize = (global_size + nprocs - 1) / nprocs; +- else { +- blksize = darg; +- +- MPIR_ERR_CHKINTERNAL(blksize <= 0, mpi_errno, "blksize must be > 0"); +- MPIR_ERR_CHKINTERNAL(blksize * nprocs < global_size, mpi_errno, +- "blksize * nprocs must be >= global size"); +- } +- +- j = global_size - blksize * rank; +- mysize = (blksize < j) ? blksize : j; +- if (mysize < 0) +- mysize = 0; +- +- stride = orig_extent; +- if (order == MPI_ORDER_FORTRAN) { +- if (dim == 0) { +- mpi_errno = MPIR_Type_contiguous_impl(mysize, type_old, type_new); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } else { +- for (i = 0; i < dim; i++) +- stride *= (MPI_Aint) (array_of_gsizes[i]); +- mpi_errno = MPIR_Type_hvector_impl(mysize, 1, stride, type_old, type_new); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- } else { +- if (dim == ndims - 1) { +- mpi_errno = MPIR_Type_contiguous_impl(mysize, type_old, type_new); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } else { +- for (i = ndims - 1; i > dim; i--) +- stride *= (MPI_Aint) (array_of_gsizes[i]); +- mpi_errno = MPIR_Type_hvector_impl(mysize, 1, stride, type_old, type_new); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- } +- +- *st_offset = blksize * rank; +- /* in terms of no. of elements of type oldtype in this dimension */ +- if (mysize == 0) +- *st_offset = 0; +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-/* Returns MPI_SUCCESS on success, an MPI error code on failure. Code above +- * needs to call MPIO_Err_return_xxx. +- */ +-static int MPII_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nprocs, +- int rank, int darg, int order, MPI_Aint orig_extent, +- MPI_Datatype type_old, MPI_Datatype * type_new, MPI_Aint * st_offset) +-{ +-/* nprocs = no. of processes in dimension dim of grid +- rank = coordinate of this process in dimension dim */ +- int mpi_errno = MPI_SUCCESS; +- int blksize, i, blklens[3], st_index, end_index, local_size, rem, count; +- MPI_Aint stride, disps[3]; +- MPI_Datatype type_tmp, types[3]; +- +- if (darg == MPI_DISTRIBUTE_DFLT_DARG) +- blksize = 1; +- else +- blksize = darg; +- +- MPIR_ERR_CHKINTERNAL(blksize <= 0, mpi_errno, "blksize must be > 0"); +- +- st_index = rank * blksize; +- end_index = array_of_gsizes[dim] - 1; +- +- if (end_index < st_index) +- local_size = 0; +- else { +- local_size = ((end_index - st_index + 1) / (nprocs * blksize)) * blksize; +- rem = (end_index - st_index + 1) % (nprocs * blksize); +- local_size += (rem < blksize) ? rem : blksize; +- } +- +- count = local_size / blksize; +- rem = local_size % blksize; +- +- stride = ((MPI_Aint) nprocs) * ((MPI_Aint) blksize) * orig_extent; +- if (order == MPI_ORDER_FORTRAN) +- for (i = 0; i < dim; i++) +- stride *= (MPI_Aint) (array_of_gsizes[i]); +- else +- for (i = ndims - 1; i > dim; i--) +- stride *= (MPI_Aint) (array_of_gsizes[i]); +- +- mpi_errno = MPIR_Type_hvector_impl(count, blksize, stride, type_old, type_new); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (rem) { +- /* if the last block is of size less than blksize, include +- * it separately using MPI_Type_struct */ +- +- types[0] = *type_new; +- types[1] = type_old; +- disps[0] = 0; +- disps[1] = ((MPI_Aint) count) * stride; +- blklens[0] = 1; +- blklens[1] = rem; +- +- mpi_errno = MPIR_Type_struct_impl(2, blklens, disps, types, &type_tmp); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIR_Type_free_impl(type_new); +- *type_new = type_tmp; +- } +- +- /* In the first iteration, we need to set the displacement in that +- * dimension correctly. */ +- if (((order == MPI_ORDER_FORTRAN) && (dim == 0)) || +- ((order == MPI_ORDER_C) && (dim == ndims - 1))) { +- types[0] = MPI_LB; +- disps[0] = 0; +- types[1] = *type_new; +- disps[1] = ((MPI_Aint) rank) * ((MPI_Aint) blksize) * orig_extent; +- types[2] = MPI_UB; +- disps[2] = orig_extent * ((MPI_Aint) (array_of_gsizes[dim])); +- blklens[0] = blklens[1] = blklens[2] = 1; +- +- mpi_errno = MPIR_Type_struct_impl(3, blklens, disps, types, &type_tmp); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIR_Type_free_impl(type_new); +- *type_new = type_tmp; +- +- *st_offset = 0; /* set it to 0 because it is taken care of in +- * the struct above */ +- } else { +- *st_offset = ((MPI_Aint) rank) * ((MPI_Aint) blksize); +- /* st_offset is in terms of no. of elements of type oldtype in +- * this dimension */ +- } +- +- if (local_size == 0) +- *st_offset = 0; +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/dataloop.c ++++ /dev/null +@@ -1,818 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-#include +-#include +-#include +- +-#undef DEBUG_DLOOP_SIZE +-#undef DLOOP_DEBUG_MEMORY +- +-/* Dataloops +- * +- * The functions here are used for the creation, copying, update, and display +- * of DLOOP_Dataloop structures and trees of these structures. +- * +- * Currently we store trees of dataloops in contiguous regions of memory. They +- * are stored in such a way that subtrees are also stored contiguously. This +- * makes it somewhat easier to copy these subtrees around. Keep this in mind +- * when looking at the functions below. +- * +- * The structures used in this file are defined in mpidu_datatype.h. There is +- * no separate mpidu_dataloop.h at this time. +- * +- * OPTIMIZATIONS: +- * +- * There are spots in the code with OPT tags that indicate where we could +- * optimize particular calculations or avoid certain checks. +- * +- * NOTES: +- * +- * Don't have locks in place at this time! +- */ +- +-/* Some functions in this file are responsible for allocation of space for +- * dataloops. These structures include the dataloop structure itself +- * followed by a sequence of variable-sized arrays, depending on the loop +- * kind. For example, a dataloop of kind DLOOP_KIND_INDEXED has a +- * dataloop structure followed by an array of block sizes and then an array +- * of offsets. +- * +- * For efficiency and ease of cleanup (preserving a single free at +- * deallocation), we want to allocate this memory as a single large chunk. +- * However, we must perform some alignment of the components of this chunk +- * in order to obtain correct and efficient operation across all platforms. +- */ +- +- +-/*@ +- Dataloop_free - deallocate the resources used to store a dataloop +- +-Input/output Parameters: +-. dataloop - pointer to dataloop structure +-@*/ +-void MPIR_Dataloop_free(DLOOP_Dataloop ** dataloop) +-{ +- +- if (*dataloop == NULL) +- return; +- +-#ifdef DLOOP_DEBUG_MEMORY +- MPL_DBG_MSG_D(MPIR_DBG_DATATYPE, VERBOSE, "DLOOP_Dataloop_free: freeing loop @ %x.\n", +- (int) *dataloop); +-#endif +- +- memset(*dataloop, 0, sizeof(DLOOP_Dataloop_common)); +- DLOOP_Free(*dataloop); +- *dataloop = NULL; +- return; +-} +- +-/*@ +- Dataloop_copy - Copy an arbitrary dataloop structure, updating +- pointers as necessary +- +-Input Parameters: +-+ dest - pointer to destination region +-. src - pointer to original dataloop structure +-- size - size of dataloop structure +- +- This routine parses the dataloop structure as it goes in order to +- determine what exactly it needs to update. +- +- Notes: +- It assumes that the source dataloop was allocated in our usual way; +- this means that the entire dataloop is in a contiguous region and that +- the root of the tree is first in the array. +- +- This has some implications: +-+ we can use a contiguous copy mechanism to copy the majority of the +- structure +-- all pointers in the region are relative to the start of the data region +- the first dataloop in the array is the root of the tree +-@*/ +-void MPIR_Dataloop_copy(void *dest, void *src, DLOOP_Size size) +-{ +- DLOOP_Offset ptrdiff; +- +-#ifdef DLOOP_DEBUG_MEMORY +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "DLOOP_Dataloop_copy: copying from %x to %x (%z bytes).\n", +- (int) src, (int) dest, (size_t) size)); +-#endif +- +- /* copy region first */ +- DLOOP_Memcpy(dest, src, size); +- +- /* Calculate difference in starting locations. DLOOP_Dataloop_update() +- * then traverses the new structure and updates internal pointers by +- * adding this difference to them. This way we can just copy the +- * structure, including pointers, in one big block. +- */ +- ptrdiff = (DLOOP_Offset) ((char *) dest - (char *) src); +- +- /* traverse structure updating pointers */ +- MPIR_Dataloop_update(dest, ptrdiff); +- +- return; +-} +- +- +-/*@ +- Dataloop_update - update pointers after a copy operation +- +-Input Parameters: +-+ dataloop - pointer to loop to update +-- ptrdiff - value indicating offset between old and new pointer values +- +- This function is used to recursively update all the pointers in a +- dataloop tree. +-@*/ +-void MPIR_Dataloop_update(DLOOP_Dataloop * dataloop, DLOOP_Offset ptrdiff) +-{ +- /* OPT: only declare these variables down in the Struct case */ +- int i; +- DLOOP_Dataloop **looparray; +- +- switch (dataloop->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- case DLOOP_KIND_VECTOR: +- /* +- * All these really ugly assignments are really of the form: +- * +- * ((char *) dataloop->loop_params.c_t.loop) += ptrdiff; +- * +- * However, some compilers spit out warnings about casting on the +- * LHS, so we get this much nastier form instead (using common +- * struct for contig and vector): +- */ +- +- if (!(dataloop->kind & DLOOP_FINAL_MASK)) { +- DLOOP_Assert(dataloop->loop_params.cm_t.dataloop); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.cm_t.dataloop + +- ptrdiff); +- +- dataloop->loop_params.cm_t.dataloop = +- (DLOOP_Dataloop *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.cm_t.dataloop + +- ptrdiff); +- +- MPIR_Dataloop_update(dataloop->loop_params.cm_t.dataloop, ptrdiff); +- } +- break; +- +- case DLOOP_KIND_BLOCKINDEXED: +- DLOOP_Assert(dataloop->loop_params.bi_t.offset_array); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.bi_t.offset_array + +- ptrdiff); +- +- dataloop->loop_params.bi_t.offset_array = +- (DLOOP_Offset *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.bi_t.offset_array + +- ptrdiff); +- +- if (!(dataloop->kind & DLOOP_FINAL_MASK)) { +- DLOOP_Assert(dataloop->loop_params.bi_t.dataloop); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.bi_t.dataloop + +- ptrdiff); +- +- dataloop->loop_params.bi_t.dataloop = +- (DLOOP_Dataloop *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.bi_t.dataloop + +- ptrdiff); +- +- MPIR_Dataloop_update(dataloop->loop_params.bi_t.dataloop, ptrdiff); +- } +- break; +- +- case DLOOP_KIND_INDEXED: +- DLOOP_Assert(dataloop->loop_params.i_t.blocksize_array); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.i_t.blocksize_array + +- ptrdiff); +- +- dataloop->loop_params.i_t.blocksize_array = +- (DLOOP_Count *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.i_t.blocksize_array + +- ptrdiff); +- +- DLOOP_Assert(dataloop->loop_params.i_t.offset_array); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.i_t.offset_array + +- ptrdiff); +- +- dataloop->loop_params.i_t.offset_array = +- (DLOOP_Offset *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.i_t.offset_array + +- ptrdiff); +- +- if (!(dataloop->kind & DLOOP_FINAL_MASK)) { +- DLOOP_Assert(dataloop->loop_params.i_t.dataloop); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.i_t.dataloop + +- ptrdiff); +- +- dataloop->loop_params.i_t.dataloop = +- (DLOOP_Dataloop *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.i_t.dataloop + +- ptrdiff); +- +- MPIR_Dataloop_update(dataloop->loop_params.i_t.dataloop, ptrdiff); +- } +- break; +- +- case DLOOP_KIND_STRUCT: +- DLOOP_Assert(dataloop->loop_params.s_t.blocksize_array); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.s_t.blocksize_array + +- ptrdiff); +- +- dataloop->loop_params.s_t.blocksize_array = +- (DLOOP_Count *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.s_t.blocksize_array + +- ptrdiff); +- +- DLOOP_Assert(dataloop->loop_params.s_t.offset_array); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.s_t.offset_array + +- ptrdiff); +- +- dataloop->loop_params.s_t.offset_array = +- (DLOOP_Offset *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.s_t.offset_array + +- ptrdiff); +- +- if (dataloop->kind & DLOOP_FINAL_MASK) +- break; +- +- DLOOP_Assert(dataloop->loop_params.s_t.dataloop_array); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET +- (char *)dataloop->loop_params.s_t.dataloop_array + +- ptrdiff); +- +- dataloop->loop_params.s_t.dataloop_array = +- (DLOOP_Dataloop **) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)dataloop->loop_params.s_t.dataloop_array + +- ptrdiff); +- +- /* fix the N dataloop pointers too */ +- looparray = dataloop->loop_params.s_t.dataloop_array; +- for (i = 0; i < dataloop->loop_params.s_t.count; i++) { +- DLOOP_Assert(looparray[i]); +- +- DLOOP_Ensure_Offset_fits_in_pointer(DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)looparray +- [i] + ptrdiff); +- +- looparray[i] = (DLOOP_Dataloop *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (DLOOP_VOID_PTR_CAST_TO_OFFSET(char *)looparray[i] + ptrdiff); +- } +- +- for (i = 0; i < dataloop->loop_params.s_t.count; i++) { +- MPIR_Dataloop_update(looparray[i], ptrdiff); +- } +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- return; +-} +- +-/*@ +- Dataloop_alloc - allocate the resources used to store a dataloop with +- no old loops associated with it. +- +-Input Parameters: +-+ kind - kind of dataloop to allocate +-. count - number of elements in dataloop (kind dependent) +-. new_loop_p - address at which to store new dataloop pointer +-- new_loop_sz_p - pointer to integer in which to store new loop size +- +- Notes: +- The count parameter passed into this function will often be different +- from the count passed in at the MPI layer due to optimizations. +-@*/ +-void MPIR_Dataloop_alloc(int kind, +- DLOOP_Count count, DLOOP_Dataloop ** new_loop_p, MPI_Aint * new_loop_sz_p) +-{ +- MPIR_Dataloop_alloc_and_copy(kind, count, NULL, 0, new_loop_p, new_loop_sz_p); +- return; +-} +- +-/*@ +- Dataloop_alloc_and_copy - allocate the resources used to store a +- dataloop and copy in old dataloop as +- appropriate +- +-Input Parameters: +-+ kind - kind of dataloop to allocate +-. count - number of elements in dataloop (kind dependent) +-. old_loop - pointer to old dataloop (or NULL for none) +-. old_loop_sz - size of old dataloop (should be zero if old_loop is NULL) +-. new_loop_p - address at which to store new dataloop pointer +-- new_loop_sz_p - pointer to integer in which to store new loop size +- +- Notes: +- The count parameter passed into this function will often be different +- from the count passed in at the MPI layer. +-@*/ +-void MPIR_Dataloop_alloc_and_copy(int kind, +- DLOOP_Count count, +- DLOOP_Dataloop * old_loop, +- DLOOP_Size old_loop_sz, +- DLOOP_Dataloop ** new_loop_p, DLOOP_Size * new_loop_sz_p) +-{ +- DLOOP_Size new_loop_sz = 0; +- int align_sz; +- int epsilon; +- DLOOP_Size loop_sz = sizeof(DLOOP_Dataloop); +- DLOOP_Size off_sz = 0, blk_sz = 0, ptr_sz = 0, extent_sz = 0; +- +- char *pos; +- DLOOP_Dataloop *new_loop; +- +-#ifdef HAVE_MAX_STRUCT_ALIGNMENT +- align_sz = HAVE_MAX_STRUCT_ALIGNMENT; +-#else +- align_sz = 8; /* default aligns everything to 8-byte boundaries */ +-#endif +- +- if (old_loop != NULL) { +- DLOOP_Assert((old_loop_sz % align_sz) == 0); +- } +- +- /* calculate the space that we actually need for everything */ +- switch (kind) { +- case DLOOP_KIND_STRUCT: +- /* need space for dataloop pointers and extents */ +- ptr_sz = count * sizeof(DLOOP_Dataloop *); +- extent_sz = count * sizeof(DLOOP_Offset); +- MPL_FALLTHROUGH; +- case DLOOP_KIND_INDEXED: +- /* need space for block sizes */ +- blk_sz = count * sizeof(DLOOP_Count); +- MPL_FALLTHROUGH; +- case DLOOP_KIND_BLOCKINDEXED: +- /* need space for block offsets */ +- off_sz = count * sizeof(DLOOP_Offset); +- case DLOOP_KIND_CONTIG: +- case DLOOP_KIND_VECTOR: +- break; +- default: +- DLOOP_Assert(0); +- } +- +- /* pad everything that we're going to allocate */ +- epsilon = loop_sz % align_sz; +- if (epsilon) +- loop_sz += align_sz - epsilon; +- +- epsilon = off_sz % align_sz; +- if (epsilon) +- off_sz += align_sz - epsilon; +- +- epsilon = blk_sz % align_sz; +- if (epsilon) +- blk_sz += align_sz - epsilon; +- +- epsilon = ptr_sz % align_sz; +- if (epsilon) +- ptr_sz += align_sz - epsilon; +- +- epsilon = extent_sz % align_sz; +- if (epsilon) +- extent_sz += align_sz - epsilon; +- +- new_loop_sz += loop_sz + off_sz + blk_sz + ptr_sz + extent_sz + old_loop_sz; +- +- /* allocate space */ +- new_loop = (DLOOP_Dataloop *) DLOOP_Malloc(new_loop_sz, MPL_MEM_DATATYPE); +- if (new_loop == NULL) { +- *new_loop_p = NULL; +- return; +- } +-#ifdef DLOOP_DEBUG_MEMORY +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "DLOOP_Dataloop_alloc_and_copy: new loop @ %x (tot sz = %z, loop = %z, off = %z, blk = %z, ptr = %z, extent = %z, old = %z)\n", +- (int) new_loop, new_loop_sz, loop_sz, off_sz, blk_sz, ptr_sz, extent_sz, +- old_loop_sz)); +-#endif +- +- /* set all the pointers in the new dataloop structure */ +- switch (kind) { +- case DLOOP_KIND_STRUCT: +- /* order is: +- * - pointers +- * - blocks +- * - offsets +- * - extents +- */ +- new_loop->loop_params.s_t.dataloop_array = +- (DLOOP_Dataloop **) (((char *) new_loop) + loop_sz); +- new_loop->loop_params.s_t.blocksize_array = +- (DLOOP_Count *) (((char *) new_loop) + loop_sz + ptr_sz); +- new_loop->loop_params.s_t.offset_array = +- (DLOOP_Offset *) (((char *) new_loop) + loop_sz + ptr_sz + blk_sz); +- new_loop->loop_params.s_t.el_extent_array = +- (DLOOP_Offset *) (((char *) new_loop) + loop_sz + ptr_sz + blk_sz + off_sz); +- break; +- case DLOOP_KIND_INDEXED: +- /* order is: +- * - blocks +- * - offsets +- */ +- new_loop->loop_params.i_t.blocksize_array = +- (DLOOP_Count *) (((char *) new_loop) + loop_sz); +- new_loop->loop_params.i_t.offset_array = +- (DLOOP_Offset *) (((char *) new_loop) + loop_sz + blk_sz); +- if (old_loop == NULL) { +- new_loop->loop_params.i_t.dataloop = NULL; +- } else { +- new_loop->loop_params.i_t.dataloop = +- (DLOOP_Dataloop *) (((char *) new_loop) + (new_loop_sz - old_loop_sz)); +- } +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- new_loop->loop_params.bi_t.offset_array = +- (DLOOP_Offset *) (((char *) new_loop) + loop_sz); +- if (old_loop == NULL) { +- new_loop->loop_params.bi_t.dataloop = NULL; +- } else { +- new_loop->loop_params.bi_t.dataloop = +- (DLOOP_Dataloop *) (((char *) new_loop) + (new_loop_sz - old_loop_sz)); +- } +- break; +- case DLOOP_KIND_CONTIG: +- if (old_loop == NULL) { +- new_loop->loop_params.c_t.dataloop = NULL; +- } else { +- new_loop->loop_params.c_t.dataloop = +- (DLOOP_Dataloop *) (((char *) new_loop) + (new_loop_sz - old_loop_sz)); +- } +- break; +- case DLOOP_KIND_VECTOR: +- if (old_loop == NULL) { +- new_loop->loop_params.v_t.dataloop = NULL; +- } else { +- new_loop->loop_params.v_t.dataloop = +- (DLOOP_Dataloop *) (((char *) new_loop) + (new_loop_sz - old_loop_sz)); +- } +- break; +- default: +- DLOOP_Assert(0); +- } +- +- pos = ((char *) new_loop) + (new_loop_sz - old_loop_sz); +- if (old_loop != NULL) { +- MPIR_Dataloop_copy(pos, old_loop, old_loop_sz); +- } +- +- *new_loop_p = new_loop; +- *new_loop_sz_p = new_loop_sz; +- return; +-} +- +-/*@ +- Dataloop_struct_alloc - allocate the resources used to store a dataloop and +- copy in old dataloop as appropriate. This version +- is specifically for use when a struct dataloop is +- being created; the space to hold old dataloops in +- this case must be described back to the +- implementation in order for efficient copying. +- +-Input Parameters: +-+ count - number of elements in dataloop (kind dependent) +-. old_loop_sz - size of old dataloop (should be zero if old_loop is NULL) +-. basic_ct - number of basic types for which new dataloops are needed +-. old_loop_p - address at which to store pointer to old loops +-. new_loop_p - address at which to store new struct dataloop pointer +-- new_loop_sz_p - address at which to store new loop size +- +- Notes: +- The count parameter passed into this function will often be different +- from the count passed in at the MPI layer due to optimizations. +- +- The caller is responsible for filling in the region pointed to by +- old_loop_p (count elements). +-@*/ +-void MPIR_Dataloop_struct_alloc(DLOOP_Count count, +- DLOOP_Size old_loop_sz, +- int basic_ct, +- DLOOP_Dataloop ** old_loop_p, +- DLOOP_Dataloop ** new_loop_p, DLOOP_Size * new_loop_sz_p) +-{ +- DLOOP_Size new_loop_sz = 0; +- int align_sz; +- int epsilon; +- DLOOP_Size loop_sz = sizeof(DLOOP_Dataloop); +- DLOOP_Size off_sz, blk_sz, ptr_sz, extent_sz, basic_sz; +- +- DLOOP_Dataloop *new_loop; +- +-#ifdef HAVE_MAX_STRUCT_ALIGNMENT +- align_sz = HAVE_MAX_STRUCT_ALIGNMENT; +-#else +- align_sz = 8; /* default aligns everything to 8-byte boundaries */ +-#endif +- +- /* calculate the space that we actually need for everything */ +- ptr_sz = count * sizeof(DLOOP_Dataloop *); +- extent_sz = count * sizeof(DLOOP_Offset); +- blk_sz = count * sizeof(DLOOP_Count); +- off_sz = count * sizeof(DLOOP_Offset); +- basic_sz = sizeof(DLOOP_Dataloop); +- +- /* pad everything that we're going to allocate */ +- epsilon = loop_sz % align_sz; +- if (epsilon) +- loop_sz += align_sz - epsilon; +- +- epsilon = off_sz % align_sz; +- if (epsilon) +- off_sz += align_sz - epsilon; +- +- epsilon = blk_sz % align_sz; +- if (epsilon) +- blk_sz += align_sz - epsilon; +- +- epsilon = ptr_sz % align_sz; +- if (epsilon) +- ptr_sz += align_sz - epsilon; +- +- epsilon = extent_sz % align_sz; +- if (epsilon) +- extent_sz += align_sz - epsilon; +- +- epsilon = basic_sz % align_sz; +- if (epsilon) +- basic_sz += align_sz - epsilon; +- +- /* note: we pad *each* basic type dataloop, because the +- * code used to create them assumes that we're going to +- * do that. +- */ +- +- new_loop_sz += loop_sz + off_sz + blk_sz + ptr_sz + +- extent_sz + (basic_ct * basic_sz) + old_loop_sz; +- +- /* allocate space */ +- new_loop = (DLOOP_Dataloop *) DLOOP_Malloc(new_loop_sz, MPL_MEM_DATATYPE); +- if (new_loop == NULL) { +- *new_loop_p = NULL; +- return; +- } +-#ifdef DLOOP_DEBUG_MEMORY +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "DLOOP_Dataloop_struct_alloc: new loop @ %x (tot sz = %z, loop = %z, off = %z, blk = %z, ptr = %z, extent = %z, basics = %z, old = %z)\n", +- (int) new_loop, new_loop_sz, loop_sz, off_sz, blk_sz, ptr_sz, extent_sz, +- basic_sz, old_loop_sz)); +-#endif +- +- /* set all the pointers in the new dataloop structure */ +- new_loop->loop_params.s_t.dataloop_array = (DLOOP_Dataloop **) +- (((char *) new_loop) + loop_sz); +- new_loop->loop_params.s_t.blocksize_array = (DLOOP_Count *) +- (((char *) new_loop) + loop_sz + ptr_sz); +- new_loop->loop_params.s_t.offset_array = (DLOOP_Offset *) +- (((char *) new_loop) + loop_sz + ptr_sz + blk_sz); +- new_loop->loop_params.s_t.el_extent_array = (DLOOP_Offset *) +- (((char *) new_loop) + loop_sz + ptr_sz + blk_sz + off_sz); +- +- *old_loop_p = (DLOOP_Dataloop *) +- (((char *) new_loop) + loop_sz + ptr_sz + blk_sz + off_sz + extent_sz); +- *new_loop_p = new_loop; +- *new_loop_sz_p = new_loop_sz; +- +- return; +-} +- +-/*@ +- Dataloop_dup - make a copy of a dataloop +- +- Returns 0 on success, -1 on failure. +-@*/ +-void MPIR_Dataloop_dup(DLOOP_Dataloop * old_loop, +- DLOOP_Count old_loop_sz, DLOOP_Dataloop ** new_loop_p) +-{ +- DLOOP_Dataloop *new_loop; +- +- DLOOP_Assert(old_loop != NULL); +- DLOOP_Assert(old_loop_sz > 0); +- +- new_loop = (DLOOP_Dataloop *) DLOOP_Malloc(old_loop_sz, MPL_MEM_DATATYPE); +- if (new_loop == NULL) { +- *new_loop_p = NULL; +- return; +- } +- +- MPIR_Dataloop_copy(new_loop, old_loop, old_loop_sz); +- *new_loop_p = new_loop; +- return; +-} +- +-/*@ +- Dataloop_stream_size - return the size of the data described by the dataloop +- +-Input Parameters: +-+ dl_p - pointer to dataloop for which we will return the size +-- sizefn - function for determining size of types in the corresponding stream +- (passing NULL will instead result in el_size values being used) +- +-@*/ +-DLOOP_Offset +-MPIR_Dataloop_stream_size(struct DLOOP_Dataloop * dl_p, DLOOP_Offset(*sizefn) (DLOOP_Type el_type)) +-{ +- DLOOP_Offset tmp_sz, tmp_ct = 1; +- +- for (;;) { +- if ((dl_p->kind & DLOOP_KIND_MASK) == DLOOP_KIND_STRUCT) { +- int i; +- +- tmp_sz = 0; +- for (i = 0; i < dl_p->loop_params.s_t.count; i++) { +- tmp_sz += (DLOOP_Offset) (dl_p->loop_params.s_t.blocksize_array[i]) * +- MPIR_Dataloop_stream_size(dl_p->loop_params.s_t.dataloop_array[i], sizefn); +- } +- return tmp_sz * tmp_ct; +- } +- +- switch (dl_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- tmp_ct *= (DLOOP_Offset) (dl_p->loop_params.c_t.count); +-#ifdef DLOOP_DEBUG_SIZE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "stream_size: contig: ct = %d; new tot_ct = " +- DLOOP_OFFSET_FMT_DEC_SPEC "\n", (int) dl_p->loop_params.c_t.count, +- (DLOOP_Offset) tmp_ct)); +-#endif +- break; +- case DLOOP_KIND_VECTOR: +- tmp_ct *= (DLOOP_Offset) (dl_p->loop_params.v_t.count) * +- (DLOOP_Offset) (dl_p->loop_params.v_t.blocksize); +-#ifdef DLOOP_DEBUG_SIZE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "stream_size: vector: ct = %d; blk = %d; new tot_ct = " +- DLOOP_OFFSET_FMT_DEC_SPEC "\n", (int) dl_p->loop_params.v_t.count, +- (int) dl_p->loop_params.v_t.blocksize, (DLOOP_Offset) tmp_ct)); +-#endif +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- tmp_ct *= (DLOOP_Offset) (dl_p->loop_params.bi_t.count) * +- (DLOOP_Offset) (dl_p->loop_params.bi_t.blocksize); +-#ifdef DLOOP_DEBUG_SIZE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "stream_size: blkindexed: blks = %d; new tot_ct = " +- DLOOP_OFFSET_FMT_DEC_SPEC "\n", +- (int) dl_p->loop_params.bi_t.count * +- (int) dl_p->loop_params.bi_t.blocksize, (DLOOP_Offset) tmp_ct)); +-#endif +- break; +- case DLOOP_KIND_INDEXED: +- tmp_ct *= (DLOOP_Offset) (dl_p->loop_params.i_t.total_blocks); +-#ifdef DLOOP_DEBUG_SIZE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "stream_size: contig: blks = %d; new tot_ct = " +- DLOOP_OFFSET_FMT_DEC_SPEC "\n", +- (int) dl_p->loop_params.i_t.total_blocks, (DLOOP_Offset) tmp_ct)); +-#endif +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- +- if (dl_p->kind & DLOOP_FINAL_MASK) +- break; +- else { +- DLOOP_Assert(dl_p->loop_params.cm_t.dataloop != NULL); +- dl_p = dl_p->loop_params.cm_t.dataloop; +- } +- } +- +- /* call fn for size using bottom type, or use size if fnptr is NULL */ +- tmp_sz = ((sizefn) ? sizefn(dl_p->el_type) : dl_p->el_size); +- +- return tmp_sz * tmp_ct; +-} +- +-/* --BEGIN ERROR HANDLING-- */ +-/*@ +- Dataloop_print - dump a dataloop tree to stdout for debugging +- purposes +- +-Input Parameters: +-+ dataloop - root of tree to dump +-- depth - starting depth; used to help keep up with where we are in the tree +-@*/ +-void MPIR_Dataloop_print(struct DLOOP_Dataloop *dataloop, int depth) +-{ +- int i; +- +- if (dataloop == NULL) { +- MPL_DBG_MSG(MPIR_DBG_DATATYPE, VERBOSE, "dataloop is NULL (probably basic type)\n"); +- return; +- } +- +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "loc=%p, treedepth=%d, kind=%d, el_extent=" DLOOP_OFFSET_FMT_DEC_SPEC "\n", +- dataloop, (int) depth, (int) dataloop->kind, +- (DLOOP_Offset) dataloop->el_extent)); +- switch (dataloop->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "\tCONTIG: count=%d, datatype=%p\n", +- (int) dataloop->loop_params.c_t.count, +- dataloop->loop_params.c_t.dataloop)); +- if (!(dataloop->kind & DLOOP_FINAL_MASK)) +- MPIR_Dataloop_print(dataloop->loop_params.c_t.dataloop, depth + 1); +- break; +- case DLOOP_KIND_VECTOR: +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\tVECTOR: count=%d, blksz=%d, stride=" DLOOP_OFFSET_FMT_DEC_SPEC +- ", datatype=%p\n", (int) dataloop->loop_params.v_t.count, +- (int) dataloop->loop_params.v_t.blocksize, +- (DLOOP_Offset) dataloop->loop_params.v_t.stride, +- dataloop->loop_params.v_t.dataloop)); +- if (!(dataloop->kind & DLOOP_FINAL_MASK)) +- MPIR_Dataloop_print(dataloop->loop_params.v_t.dataloop, depth + 1); +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "\tBLOCKINDEXED: count=%d, blksz=%d, datatype=%p\n", +- (int) dataloop->loop_params.bi_t.count, +- (int) dataloop->loop_params.bi_t.blocksize, +- dataloop->loop_params.bi_t.dataloop)); +- /* print out offsets later */ +- if (!(dataloop->kind & DLOOP_FINAL_MASK)) +- MPIR_Dataloop_print(dataloop->loop_params.bi_t.dataloop, depth + 1); +- break; +- case DLOOP_KIND_INDEXED: +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "\tINDEXED: count=%d, datatype=%p\n", +- (int) dataloop->loop_params.i_t.count, +- dataloop->loop_params.i_t.dataloop)); +- /* print out blocksizes and offsets later */ +- if (!(dataloop->kind & DLOOP_FINAL_MASK)) +- MPIR_Dataloop_print(dataloop->loop_params.i_t.dataloop, depth + 1); +- break; +- case DLOOP_KIND_STRUCT: +- MPL_DBG_MSG_D(MPIR_DBG_DATATYPE, VERBOSE, "\tSTRUCT: count=%d\n", +- (int) dataloop->loop_params.s_t.count); +- MPL_DBG_MSG(MPIR_DBG_DATATYPE, VERBOSE, "\tblocksizes:\n"); +- for (i = 0; i < dataloop->loop_params.s_t.count; i++) +- MPL_DBG_MSG_D(MPIR_DBG_DATATYPE, VERBOSE, "\t\t%d\n", +- (int) dataloop->loop_params.s_t.blocksize_array[i]); +- MPL_DBG_MSG(MPIR_DBG_DATATYPE, VERBOSE, "\toffsets:\n"); +- for (i = 0; i < dataloop->loop_params.s_t.count; i++) +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "\t\t" DLOOP_OFFSET_FMT_DEC_SPEC "\n", +- (DLOOP_Offset) dataloop->loop_params.s_t.offset_array[i])); +- MPL_DBG_MSG(MPIR_DBG_DATATYPE, VERBOSE, "\tdatatypes:\n"); +- for (i = 0; i < dataloop->loop_params.s_t.count; i++) +- MPL_DBG_MSG_P(MPIR_DBG_DATATYPE, VERBOSE, "\t\t%p\n", +- dataloop->loop_params.s_t.dataloop_array[i]); +- if (dataloop->kind & DLOOP_FINAL_MASK) +- break; +- +- for (i = 0; i < dataloop->loop_params.s_t.count; i++) { +- MPIR_Dataloop_print(dataloop->loop_params.s_t.dataloop_array[i], depth + 1); +- } +- break; +- default: +- DLOOP_Assert(0); +- break; +- } +- return; +-} +- +-/* --END ERROR HANDLING-- */ +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/dataloop_create.c ++++ /dev/null +@@ -1,348 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-#include +-#include +- +- +-static void DLOOP_Dataloop_create_named(MPI_Datatype type, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag); +- +-void MPIR_Dataloop_create(MPI_Datatype type, +- DLOOP_Dataloop ** dlp_p, MPI_Aint * dlsz_p, int *dldepth_p, int flag) +-{ +- int i; +- int err ATTRIBUTE((unused)); +- +- int nr_ints, nr_aints, nr_types, combiner; +- MPI_Datatype *types; +- int *ints; +- MPI_Aint *aints; +- +- DLOOP_Dataloop *old_dlp; +- MPI_Aint old_dlsz; +- int old_dldepth; +- +- int dummy1, dummy2, dummy3, type0_combiner, ndims; +- MPI_Datatype tmptype; +- +- MPI_Aint stride; +- MPI_Aint *disps; +- DLOOP_Size *blklen; +- +- MPIR_Type_get_envelope(type, &nr_ints, &nr_aints, &nr_types, &combiner); +- +- /* some named types do need dataloops; handle separately. */ +- if (combiner == MPI_COMBINER_NAMED) { +- DLOOP_Dataloop_create_named(type, dlp_p, dlsz_p, dldepth_p, flag); +- return; +- } else if (combiner == MPI_COMBINER_F90_REAL || +- combiner == MPI_COMBINER_F90_COMPLEX || combiner == MPI_COMBINER_F90_INTEGER) { +- MPI_Datatype f90basetype; +- DLOOP_Handle_get_basic_type_macro(type, f90basetype); +- MPIR_Dataloop_create_contiguous(1 /* count */ , +- f90basetype, dlp_p, dlsz_p, dldepth_p, flag); +- return; +- } +- +- /* Q: should we also check for "hasloop", or is the COMBINER +- * check above enough to weed out everything that wouldn't +- * have a loop? +- */ +- DLOOP_Handle_get_loopptr_macro(type, old_dlp); +- if (old_dlp != NULL) { +- /* dataloop already created; just return it. */ +- *dlp_p = old_dlp; +- DLOOP_Handle_get_loopsize_macro(type, *dlsz_p); +- DLOOP_Handle_get_loopdepth_macro(type, *dldepth_p); +- return; +- } +- +- MPIR_Type_access_contents(type, &ints, &aints, &types); +- +- /* first check for zero count on types where that makes sense */ +- switch (combiner) { +- case MPI_COMBINER_CONTIGUOUS: +- case MPI_COMBINER_VECTOR: +- case MPI_COMBINER_HVECTOR_INTEGER: +- case MPI_COMBINER_HVECTOR: +- case MPI_COMBINER_INDEXED_BLOCK: +- case MPI_COMBINER_HINDEXED_BLOCK: +- case MPI_COMBINER_INDEXED: +- case MPI_COMBINER_HINDEXED_INTEGER: +- case MPI_COMBINER_HINDEXED: +- case MPI_COMBINER_STRUCT_INTEGER: +- case MPI_COMBINER_STRUCT: +- if (ints[0] == 0) { +- MPIR_Dataloop_create_contiguous(0, MPI_INT, dlp_p, dlsz_p, dldepth_p, flag); +- goto clean_exit; +- } +- break; +- default: +- break; +- } +- +- /* recurse, processing types "below" this one before processing +- * this one, if those type don't already have dataloops. +- * +- * note: in the struct case below we'll handle any additional +- * types "below" the current one. +- */ +- MPIR_Type_get_envelope(types[0], &dummy1, &dummy2, &dummy3, &type0_combiner); +- if (type0_combiner != MPI_COMBINER_NAMED) { +- DLOOP_Handle_get_loopptr_macro(types[0], old_dlp); +- if (old_dlp == NULL) { +- /* no dataloop already present; create and store one */ +- MPIR_Dataloop_create(types[0], &old_dlp, &old_dlsz, &old_dldepth, flag); +- +- DLOOP_Handle_set_loopptr_macro(types[0], old_dlp); +- DLOOP_Handle_set_loopsize_macro(types[0], old_dlsz); +- DLOOP_Handle_set_loopdepth_macro(types[0], old_dldepth); +- } else { +- DLOOP_Handle_get_loopsize_macro(types[0], old_dlsz); +- DLOOP_Handle_get_loopdepth_macro(types[0], old_dldepth); +- } +- } +- +- switch (combiner) { +- case MPI_COMBINER_DUP: +- if (type0_combiner != MPI_COMBINER_NAMED) { +- MPIR_Dataloop_dup(old_dlp, old_dlsz, dlp_p); +- *dlsz_p = old_dlsz; +- *dldepth_p = old_dldepth; +- } else { +- MPIR_Dataloop_create_contiguous(1, types[0], dlp_p, dlsz_p, dldepth_p, flag); +- } +- break; +- case MPI_COMBINER_RESIZED: +- if (type0_combiner != MPI_COMBINER_NAMED) { +- MPIR_Dataloop_dup(old_dlp, old_dlsz, dlp_p); +- *dlsz_p = old_dlsz; +- *dldepth_p = old_dldepth; +- } else { +- MPIR_Dataloop_create_contiguous(1, types[0], dlp_p, dlsz_p, dldepth_p, flag); +- +- (*dlp_p)->el_extent = aints[1]; /* extent */ +- } +- break; +- case MPI_COMBINER_CONTIGUOUS: +- MPIR_Dataloop_create_contiguous(ints[0] /* count */ , +- types[0] /* oldtype */ , +- dlp_p, dlsz_p, dldepth_p, flag); +- break; +- case MPI_COMBINER_VECTOR: +- MPIR_Dataloop_create_vector(ints[0] /* count */ , +- ints[1] /* blklen */ , +- ints[2] /* stride */ , +- 0 /* stride not bytes */ , +- types[0] /* oldtype */ , +- dlp_p, dlsz_p, dldepth_p, flag); +- break; +- case MPI_COMBINER_HVECTOR_INTEGER: +- case MPI_COMBINER_HVECTOR: +- /* fortran hvector has integer stride in bytes */ +- if (combiner == MPI_COMBINER_HVECTOR_INTEGER) { +- stride = (MPI_Aint) ints[2]; +- } else { +- stride = aints[0]; +- } +- +- MPIR_Dataloop_create_vector(ints[0] /* count */ , +- ints[1] /* blklen */ , +- stride, 1 /* stride in bytes */ , +- types[0] /* oldtype */ , +- dlp_p, dlsz_p, dldepth_p, flag); +- break; +- case MPI_COMBINER_INDEXED_BLOCK: +- MPIR_Dataloop_create_blockindexed(ints[0] /* count */ , +- ints[1] /* blklen */ , +- &ints[2] /* disps */ , +- 0 /* disp not bytes */ , +- types[0] /* oldtype */ , +- dlp_p, dlsz_p, dldepth_p, flag); +- break; +- case MPI_COMBINER_HINDEXED_BLOCK: +- disps = (MPI_Aint *) DLOOP_Malloc(ints[0] * sizeof(MPI_Aint), MPL_MEM_DATATYPE); +- for (i = 0; i < ints[0]; i++) +- disps[i] = aints[i]; +- MPIR_Dataloop_create_blockindexed(ints[0] /* count */ , +- ints[1] /* blklen */ , +- disps /* disps */ , +- 1 /* disp is bytes */ , +- types[0] /* oldtype */ , +- dlp_p, dlsz_p, dldepth_p, flag); +- DLOOP_Free(disps); +- break; +- case MPI_COMBINER_INDEXED: +- blklen = (DLOOP_Size *) DLOOP_Malloc(ints[0] * sizeof(DLOOP_Size), MPL_MEM_DATATYPE); +- for (i = 0; i < ints[0]; i++) +- blklen[i] = ints[1 + i]; +- MPIR_Dataloop_create_indexed(ints[0] /* count */ , +- blklen /* blklens */ , +- &ints[ints[0] + 1] /* disp */ , +- 0 /* disp not in bytes */ , +- types[0] /* oldtype */ , +- dlp_p, dlsz_p, dldepth_p, flag); +- DLOOP_Free(blklen); +- break; +- case MPI_COMBINER_HINDEXED_INTEGER: +- case MPI_COMBINER_HINDEXED: +- if (combiner == MPI_COMBINER_HINDEXED_INTEGER) { +- disps = (MPI_Aint *) DLOOP_Malloc(ints[0] * sizeof(MPI_Aint), MPL_MEM_DATATYPE); +- +- for (i = 0; i < ints[0]; i++) { +- disps[i] = (MPI_Aint) ints[ints[0] + 1 + i]; +- } +- } else { +- disps = aints; +- } +- +- blklen = (DLOOP_Size *) DLOOP_Malloc(ints[0] * sizeof(DLOOP_Size), MPL_MEM_DATATYPE); +- for (i = 0; i < ints[0]; i++) +- blklen[i] = (DLOOP_Size) ints[1 + i]; +- MPIR_Dataloop_create_indexed(ints[0] /* count */ , +- blklen /* blklens */ , +- disps, 1 /* disp in bytes */ , +- types[0] /* oldtype */ , +- dlp_p, dlsz_p, dldepth_p, flag); +- +- if (combiner == MPI_COMBINER_HINDEXED_INTEGER) { +- DLOOP_Free(disps); +- } +- DLOOP_Free(blklen); +- +- break; +- case MPI_COMBINER_STRUCT_INTEGER: +- case MPI_COMBINER_STRUCT: +- for (i = 1; i < ints[0]; i++) { +- int type_combiner; +- MPIR_Type_get_envelope(types[i], &dummy1, &dummy2, &dummy3, &type_combiner); +- +- if (type_combiner != MPI_COMBINER_NAMED) { +- DLOOP_Handle_get_loopptr_macro(types[i], old_dlp); +- if (old_dlp == NULL) { +- MPIR_Dataloop_create(types[i], &old_dlp, &old_dlsz, &old_dldepth, flag); +- +- DLOOP_Handle_set_loopptr_macro(types[i], old_dlp); +- DLOOP_Handle_set_loopsize_macro(types[i], old_dlsz); +- DLOOP_Handle_set_loopdepth_macro(types[i], old_dldepth); +- } +- } +- } +- if (combiner == MPI_COMBINER_STRUCT_INTEGER) { +- disps = (MPI_Aint *) DLOOP_Malloc(ints[0] * sizeof(MPI_Aint), MPL_MEM_DATATYPE); +- +- for (i = 0; i < ints[0]; i++) { +- disps[i] = (MPI_Aint) ints[ints[0] + 1 + i]; +- } +- } else { +- disps = aints; +- } +- +- err = MPIR_Dataloop_create_struct(ints[0] /* count */ , +- &ints[1] /* blklens */ , +- disps, types /* oldtype array */ , +- dlp_p, dlsz_p, dldepth_p, flag); +- /* TODO if/when this function returns error codes, propagate this failure instead */ +- DLOOP_Assert(0 == err); +- /* if (err) return err; */ +- +- if (combiner == MPI_COMBINER_STRUCT_INTEGER) { +- DLOOP_Free(disps); +- } +- break; +- case MPI_COMBINER_SUBARRAY: +- ndims = ints[0]; +- MPIR_Type_convert_subarray(ndims, &ints[1] /* sizes */ , +- &ints[1 + ndims] /* subsizes */ , +- &ints[1 + 2 * ndims] /* starts */ , +- ints[1 + 3 * ndims] /* order */ , +- types[0], &tmptype); +- +- MPIR_Dataloop_create(tmptype, dlp_p, dlsz_p, dldepth_p, flag); +- +- MPIR_Type_free_impl(&tmptype); +- break; +- case MPI_COMBINER_DARRAY: +- ndims = ints[2]; +- MPIR_Type_convert_darray(ints[0] /* size */ , +- ints[1] /* rank */ , +- ndims, &ints[3] /* gsizes */ , +- &ints[3 + ndims] /*distribs */ , +- &ints[3 + 2 * ndims] /* dargs */ , +- &ints[3 + 3 * ndims] /* psizes */ , +- ints[3 + 4 * ndims] /* order */ , +- types[0], &tmptype); +- +- MPIR_Dataloop_create(tmptype, dlp_p, dlsz_p, dldepth_p, flag); +- +- MPIR_Type_free_impl(&tmptype); +- break; +- default: +- DLOOP_Assert(0); +- break; +- } +- +- clean_exit: +- +- MPIR_Type_release_contents(type, &ints, &aints, &types); +- +- /* for now we just leave the intermediate dataloops in place. +- * could remove them to save space if we wanted. +- */ +- +- return; +-} +- +-/*@ +- DLOOP_Dataloop_create_named - create a dataloop for a "named" type +- if necessary. +- +- "named" types are ones for which MPI_Type_get_envelope() returns a +- combiner of MPI_COMBINER_NAMED. some types that fit this category, +- such as MPI_SHORT_INT, have multiple elements with potential gaps +- and padding. these types need dataloops for correct processing. +-@*/ +-static void DLOOP_Dataloop_create_named(MPI_Datatype type, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag) +-{ +- DLOOP_Dataloop *dlp; +- +- /* special case: pairtypes need dataloops too. +- * +- * note: not dealing with MPI_2INT because size == extent +- * in all cases for that type. +- * +- * note: MPICH always precreates these, so we will never call +- * Dataloop_create_pairtype() from here in the MPICH +- * case. +- */ +- if (type == MPI_FLOAT_INT || type == MPI_DOUBLE_INT || +- type == MPI_LONG_INT || type == MPI_SHORT_INT || type == MPI_LONG_DOUBLE_INT) { +- DLOOP_Handle_get_loopptr_macro(type, dlp); +- if (dlp != NULL) { +- /* dataloop already created; just return it. */ +- *dlp_p = dlp; +- DLOOP_Handle_get_loopsize_macro(type, *dlsz_p); +- DLOOP_Handle_get_loopdepth_macro(type, *dldepth_p); +- } else { +- MPIR_Dataloop_create_pairtype(type, dlp_p, dlsz_p, dldepth_p, flag); +- } +- return; +- } +- /* no other combiners need dataloops; exit. */ +- else { +- *dlp_p = NULL; +- *dlsz_p = 0; +- *dldepth_p = 0; +- return; +- } +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/dataloop_create_blockindexed.c ++++ /dev/null +@@ -1,262 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-#include +- +- +-static void DLOOP_Type_blockindexed_array_copy(DLOOP_Count count, +- const void *disp_array, +- DLOOP_Offset * out_disp_array, +- int dispinbytes, DLOOP_Offset old_extent); +- +-/*@ +- Dataloop_create_blockindexed - create blockindexed dataloop +- +- Arguments: +-+ DLOOP_Count count +-. void *displacement_array (array of either MPI_Aints or ints) +-. int displacement_in_bytes (boolean) +-. MPI_Datatype old_type +-. DLOOP_Dataloop **output_dataloop_ptr +-. int output_dataloop_size +-. int output_dataloop_depth +-- int flag +- +-.N Errors +-.N Returns 0 on success, -1 on failure. +-@*/ +-int MPIR_Dataloop_create_blockindexed(DLOOP_Count icount, +- DLOOP_Count iblklen, +- const void *disp_array, +- int dispinbytes, +- DLOOP_Type oldtype, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag) +-{ +- int err, is_builtin, is_vectorizable = 1; +- int i, old_loop_depth; +- DLOOP_Size new_loop_sz; +- +- DLOOP_Count contig_count, count, blklen; +- DLOOP_Offset old_extent, eff_disp0, eff_disp1, last_stride; +- DLOOP_Dataloop *new_dlp; +- +- count = (DLOOP_Count) icount; /* avoid subsequent casting */ +- blklen = (DLOOP_Count) iblklen; +- +- /* if count or blklen are zero, handle with contig code, call it a int */ +- if (count == 0 || blklen == 0) { +- err = MPIR_Dataloop_create_contiguous(0, MPI_INT, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- is_builtin = (DLOOP_Handle_hasloop_macro(oldtype)) ? 0 : 1; +- +- if (is_builtin) { +- DLOOP_Handle_get_size_macro(oldtype, old_extent); +- old_loop_depth = 0; +- } else { +- DLOOP_Handle_get_extent_macro(oldtype, old_extent); +- DLOOP_Handle_get_loopdepth_macro(oldtype, old_loop_depth); +- } +- +- contig_count = MPIR_Type_blockindexed_count_contig(count, +- blklen, disp_array, dispinbytes, old_extent); +- +- /* optimization: +- * +- * if contig_count == 1 and block starts at displacement 0, +- * store it as a contiguous rather than a blockindexed dataloop. +- */ +- if ((contig_count == 1) && +- ((!dispinbytes && ((int *) disp_array)[0] == 0) || +- (dispinbytes && ((MPI_Aint *) disp_array)[0] == 0))) { +- err = MPIR_Dataloop_create_contiguous(icount * iblklen, +- oldtype, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- /* optimization: +- * +- * if contig_count == 1 store it as a blockindexed with one +- * element rather than as a lot of individual blocks. +- */ +- if (contig_count == 1) { +- /* adjust count and blklen and drop through */ +- blklen *= count; +- count = 1; +- iblklen *= icount; +- icount = 1; +- } +- +- /* optimization: +- * +- * if displacements start at zero and result in a fixed stride, +- * store it as a vector rather than a blockindexed dataloop. +- */ +- eff_disp0 = (dispinbytes) ? ((DLOOP_Offset) ((MPI_Aint *) disp_array)[0]) : +- (((DLOOP_Offset) ((int *) disp_array)[0]) * old_extent); +- +- if (count > 1 && eff_disp0 == (DLOOP_Offset) 0) { +- eff_disp1 = (dispinbytes) ? +- ((DLOOP_Offset) ((MPI_Aint *) disp_array)[1]) : +- (((DLOOP_Offset) ((int *) disp_array)[1]) * old_extent); +- last_stride = eff_disp1 - eff_disp0; +- +- for (i = 2; i < count; i++) { +- eff_disp0 = eff_disp1; +- eff_disp1 = (dispinbytes) ? +- ((DLOOP_Offset) ((MPI_Aint *) disp_array)[i]) : +- (((DLOOP_Offset) ((int *) disp_array)[i]) * old_extent); +- if (eff_disp1 - eff_disp0 != last_stride) { +- is_vectorizable = 0; +- break; +- } +- } +- if (is_vectorizable) { +- err = MPIR_Dataloop_create_vector(count, blklen, last_stride, 1, /* strideinbytes */ +- oldtype, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- } +- +- /* TODO: optimization: +- * +- * if displacements result in a fixed stride, but first displacement +- * is not zero, store it as a blockindexed (blklen == 1) of a vector. +- */ +- +- /* TODO: optimization: +- * +- * if a blockindexed of a contig, absorb the contig into the blocklen +- * parameter and keep the same overall depth +- */ +- +- /* otherwise storing as a blockindexed dataloop */ +- +- /* Q: HOW CAN WE TELL IF IT IS WORTH IT TO STORE AS AN +- * INDEXED WITH FEWER CONTIG BLOCKS (IF CONTIG_COUNT IS SMALL)? +- */ +- +- if (is_builtin) { +- MPIR_Dataloop_alloc(DLOOP_KIND_BLOCKINDEXED, count, &new_dlp, &new_loop_sz); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- new_dlp->kind = DLOOP_KIND_BLOCKINDEXED | DLOOP_FINAL_MASK; +- +- if (flag == DLOOP_DATALOOP_ALL_BYTES) { +- blklen *= old_extent; +- new_dlp->el_size = 1; +- new_dlp->el_extent = 1; +- new_dlp->el_type = MPI_BYTE; +- } else { +- new_dlp->el_size = old_extent; +- new_dlp->el_extent = old_extent; +- new_dlp->el_type = oldtype; +- } +- } else { +- DLOOP_Dataloop *old_loop_ptr = NULL; +- MPI_Aint old_loop_sz = 0; +- +- DLOOP_Handle_get_loopptr_macro(oldtype, old_loop_ptr); +- DLOOP_Handle_get_loopsize_macro(oldtype, old_loop_sz); +- +- MPIR_Dataloop_alloc_and_copy(DLOOP_KIND_BLOCKINDEXED, +- count, old_loop_ptr, old_loop_sz, &new_dlp, &new_loop_sz); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- new_dlp->kind = DLOOP_KIND_BLOCKINDEXED; +- +- DLOOP_Handle_get_size_macro(oldtype, new_dlp->el_size); +- DLOOP_Handle_get_extent_macro(oldtype, new_dlp->el_extent); +- DLOOP_Handle_get_basic_type_macro(oldtype, new_dlp->el_type); +- } +- +- new_dlp->loop_params.bi_t.count = count; +- new_dlp->loop_params.bi_t.blocksize = blklen; +- +- /* copy in displacement parameters +- * +- * regardless of dispinbytes, we store displacements in bytes in loop. +- */ +- DLOOP_Type_blockindexed_array_copy(count, +- disp_array, +- new_dlp->loop_params.bi_t.offset_array, +- dispinbytes, old_extent); +- +- *dlp_p = new_dlp; +- *dlsz_p = new_loop_sz; +- *dldepth_p = old_loop_depth + 1; +- +- return 0; +-} +- +-/* DLOOP_Type_blockindexed_array_copy +- * +- * Unlike the indexed version, this one does not compact adjacent +- * blocks, because that would really mess up the blockindexed type! +- */ +-static void DLOOP_Type_blockindexed_array_copy(DLOOP_Count count, +- const void *in_disp_array, +- DLOOP_Offset * out_disp_array, +- int dispinbytes, DLOOP_Offset old_extent) +-{ +- int i; +- if (!dispinbytes) { +- for (i = 0; i < count; i++) { +- out_disp_array[i] = ((DLOOP_Offset) ((int *) in_disp_array)[i]) * old_extent; +- } +- } else { +- for (i = 0; i < count; i++) { +- out_disp_array[i] = ((DLOOP_Offset) ((MPI_Aint *) in_disp_array)[i]); +- } +- } +- return; +-} +- +-DLOOP_Count MPIR_Type_blockindexed_count_contig(DLOOP_Count count, +- DLOOP_Count blklen, +- const void *disp_array, +- int dispinbytes, DLOOP_Offset old_extent) +-{ +- int i, contig_count = 1; +- +- if (!dispinbytes) { +- /* this is from the MPI type, is of type int */ +- DLOOP_Offset cur_tdisp = (DLOOP_Offset) ((int *) disp_array)[0]; +- +- for (i = 1; i < count; i++) { +- DLOOP_Offset next_tdisp = (DLOOP_Offset) ((int *) disp_array)[i]; +- +- if (cur_tdisp + (DLOOP_Offset) blklen != next_tdisp) { +- contig_count++; +- } +- cur_tdisp = next_tdisp; +- } +- } else { +- /* this is from the MPI type, is of type MPI_Aint */ +- DLOOP_Offset cur_bdisp = (DLOOP_Offset) ((MPI_Aint *) disp_array)[0]; +- +- for (i = 1; i < count; i++) { +- DLOOP_Offset next_bdisp = (DLOOP_Offset) ((MPI_Aint *) disp_array)[i]; +- +- if (cur_bdisp + (DLOOP_Offset) blklen * old_extent != next_bdisp) { +- contig_count++; +- } +- cur_bdisp = next_bdisp; +- } +- } +- return contig_count; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/dataloop_create_contig.c ++++ /dev/null +@@ -1,134 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-/*@ +- Dataloop_contiguous - create the dataloop representation for a +- contiguous datatype +- +- Input Parameters: +-+ int icount, +-. DLOOP_Type oldtype +-- int flag +- +- Output Parameters: +-+ DLOOP_Dataloop **dlp_p, +-. DLOOP_Size *dlsz_p, +-- int *dldepth_p, +- +- +-.N Errors +-.N Returns 0 on success, -1 on failure. +-@*/ +-int MPIR_Dataloop_create_contiguous(DLOOP_Count icount, +- DLOOP_Type oldtype, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag) +-{ +- DLOOP_Count count; +- int is_builtin, apply_contig_coalescing = 0; +- int new_loop_depth; +- DLOOP_Size new_loop_sz; +- +- DLOOP_Dataloop *new_dlp; +- +- count = icount; +- +- is_builtin = (DLOOP_Handle_hasloop_macro(oldtype)) ? 0 : 1; +- +- if (is_builtin) { +- new_loop_depth = 1; +- } else { +- int old_loop_depth = 0; +- DLOOP_Offset old_size = 0, old_extent = 0; +- DLOOP_Dataloop *old_loop_ptr; +- +- DLOOP_Handle_get_loopdepth_macro(oldtype, old_loop_depth); +- DLOOP_Handle_get_loopptr_macro(oldtype, old_loop_ptr); +- DLOOP_Handle_get_size_macro(oldtype, old_size); +- DLOOP_Handle_get_extent_macro(oldtype, old_extent); +- +- /* if we have a simple combination of contigs, coalesce */ +- if (((old_loop_ptr->kind & DLOOP_KIND_MASK) == DLOOP_KIND_CONTIG) +- && (old_size == old_extent)) { +- /* will just copy contig and multiply count */ +- apply_contig_coalescing = 1; +- new_loop_depth = old_loop_depth; +- } else { +- new_loop_depth = old_loop_depth + 1; +- } +- } +- +- if (is_builtin) { +- DLOOP_Offset basic_sz = 0; +- +- MPIR_Dataloop_alloc(DLOOP_KIND_CONTIG, count, &new_dlp, &new_loop_sz); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- DLOOP_Handle_get_size_macro(oldtype, basic_sz); +- new_dlp->kind = DLOOP_KIND_CONTIG | DLOOP_FINAL_MASK; +- +- if (flag == DLOOP_DATALOOP_ALL_BYTES) { +- count *= basic_sz; +- new_dlp->el_size = 1; +- new_dlp->el_extent = 1; +- new_dlp->el_type = MPI_BYTE; +- } else { +- new_dlp->el_size = basic_sz; +- new_dlp->el_extent = new_dlp->el_size; +- new_dlp->el_type = oldtype; +- } +- +- new_dlp->loop_params.c_t.count = count; +- } else { +- /* user-defined base type (oldtype) */ +- DLOOP_Dataloop *old_loop_ptr; +- MPI_Aint old_loop_sz = 0; +- +- DLOOP_Handle_get_loopptr_macro(oldtype, old_loop_ptr); +- DLOOP_Handle_get_loopsize_macro(oldtype, old_loop_sz); +- +- if (apply_contig_coalescing) { +- /* make a copy of the old loop and multiply the count */ +- MPIR_Dataloop_dup(old_loop_ptr, old_loop_sz, &new_dlp); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- new_dlp->loop_params.c_t.count *= count; +- +- new_loop_sz = old_loop_sz; +- DLOOP_Handle_get_loopdepth_macro(oldtype, new_loop_depth); +- } else { +- /* allocate space for new loop including copy of old */ +- MPIR_Dataloop_alloc_and_copy(DLOOP_KIND_CONTIG, +- count, old_loop_ptr, old_loop_sz, &new_dlp, &new_loop_sz); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- new_dlp->kind = DLOOP_KIND_CONTIG; +- DLOOP_Handle_get_size_macro(oldtype, new_dlp->el_size); +- DLOOP_Handle_get_extent_macro(oldtype, new_dlp->el_extent); +- DLOOP_Handle_get_basic_type_macro(oldtype, new_dlp->el_type); +- +- new_dlp->loop_params.c_t.count = count; +- } +- } +- +- *dlp_p = new_dlp; +- *dlsz_p = new_loop_sz; +- *dldepth_p = new_loop_depth; +- +- return 0; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/dataloop_create_indexed.c ++++ /dev/null +@@ -1,373 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-#include +- +-static void DLOOP_Type_indexed_array_copy(DLOOP_Count count, +- DLOOP_Count contig_count, +- const DLOOP_Size * input_blocklength_array, +- const void *input_displacement_array, +- DLOOP_Count * output_blocklength_array, +- DLOOP_Offset * out_disp_array, +- int dispinbytes, DLOOP_Offset old_extent); +- +-/*@ +- DLOOP_Dataloop_create_indexed +- +- Arguments: +-+ int icount +-. DLOOP_Size *iblocklength_array +-. void *displacement_array (either ints or MPI_Aints) +-. int dispinbytes +-. MPI_Datatype oldtype +-. DLOOP_Dataloop **dlp_p +-. int *dlsz_p +-. int *dldepth_p +-- int flag +- +-.N Errors +-.N Returns 0 on success, -1 on error. +-@*/ +- +-int MPIR_Dataloop_create_indexed(DLOOP_Count icount, +- const DLOOP_Size * blocklength_array, +- const void *displacement_array, +- int dispinbytes, +- MPI_Datatype oldtype, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag) +-{ +- int err, is_builtin; +- int old_loop_depth; +- MPI_Aint i; +- DLOOP_Size new_loop_sz, blksz; +- DLOOP_Count first; +- +- DLOOP_Count old_type_count = 0, contig_count, count; +- DLOOP_Offset old_extent; +- struct DLOOP_Dataloop *new_dlp; +- +- count = (DLOOP_Count) icount; /* avoid subsequent casting */ +- +- +- /* if count is zero, handle with contig code, call it an int */ +- if (count == 0) { +- err = MPIR_Dataloop_create_contiguous(0, MPI_INT, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- /* Skip any initial zero-length blocks */ +- for (first = 0; first < count; first++) +- if ((DLOOP_Count) blocklength_array[first]) +- break; +- +- +- is_builtin = (DLOOP_Handle_hasloop_macro(oldtype)) ? 0 : 1; +- +- if (is_builtin) { +- DLOOP_Handle_get_extent_macro(oldtype, old_extent); +- old_loop_depth = 0; +- } else { +- DLOOP_Handle_get_extent_macro(oldtype, old_extent); +- DLOOP_Handle_get_loopdepth_macro(oldtype, old_loop_depth); +- } +- +- for (i = first; i < count; i++) { +- old_type_count += (DLOOP_Count) blocklength_array[i]; +- } +- +- contig_count = MPIR_Type_indexed_count_contig(count, +- blocklength_array, +- displacement_array, dispinbytes, old_extent); +- +- /* if contig_count is zero (no data), handle with contig code */ +- if (contig_count == 0) { +- err = MPIR_Dataloop_create_contiguous(0, MPI_INT, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- /* optimization: +- * +- * if contig_count == 1 and block starts at displacement 0, +- * store it as a contiguous rather than an indexed dataloop. +- */ +- if ((contig_count == 1) && +- ((!dispinbytes && ((int *) displacement_array)[first] == 0) || +- (dispinbytes && ((MPI_Aint *) displacement_array)[first] == 0))) { +- err = MPIR_Dataloop_create_contiguous(old_type_count, +- oldtype, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- /* optimization: +- * +- * if contig_count == 1 (and displacement != 0), store this as +- * a single element blockindexed rather than a lot of individual +- * blocks. +- */ +- if (contig_count == 1) { +- const void *disp_arr_tmp; /* no ternary assignment to avoid clang warnings */ +- if (dispinbytes) +- disp_arr_tmp = &(((const MPI_Aint *) displacement_array)[first]); +- else +- disp_arr_tmp = &(((const int *) displacement_array)[first]); +- err = MPIR_Dataloop_create_blockindexed(1, +- old_type_count, +- disp_arr_tmp, +- dispinbytes, +- oldtype, dlp_p, dlsz_p, dldepth_p, flag); +- +- return err; +- } +- +- /* optimization: +- * +- * if block length is the same for all blocks, store it as a +- * blockindexed rather than an indexed dataloop. +- */ +- blksz = blocklength_array[first]; +- for (i = first + 1; i < count; i++) { +- if (blocklength_array[i] != blksz) { +- blksz--; +- break; +- } +- } +- if (blksz == blocklength_array[first]) { +- const void *disp_arr_tmp; /* no ternary assignment to avoid clang warnings */ +- if (dispinbytes) +- disp_arr_tmp = &(((const MPI_Aint *) displacement_array)[first]); +- else +- disp_arr_tmp = &(((const int *) displacement_array)[first]); +- err = MPIR_Dataloop_create_blockindexed(icount - first, +- blksz, +- disp_arr_tmp, +- dispinbytes, +- oldtype, dlp_p, dlsz_p, dldepth_p, flag); +- +- return err; +- } +- +- /* note: blockindexed looks for the vector optimization */ +- +- /* TODO: optimization: +- * +- * if an indexed of a contig, absorb the contig into the blocklen array +- * and keep the same overall depth +- */ +- +- /* otherwise storing as an indexed dataloop */ +- +- if (is_builtin) { +- MPIR_Dataloop_alloc(DLOOP_KIND_INDEXED, count, &new_dlp, &new_loop_sz); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- new_dlp->kind = DLOOP_KIND_INDEXED | DLOOP_FINAL_MASK; +- +- if (flag == DLOOP_DATALOOP_ALL_BYTES) { +- /* blocklengths are modified below */ +- new_dlp->el_size = 1; +- new_dlp->el_extent = 1; +- new_dlp->el_type = MPI_BYTE; +- } else { +- new_dlp->el_size = old_extent; +- new_dlp->el_extent = old_extent; +- new_dlp->el_type = oldtype; +- } +- } else { +- DLOOP_Dataloop *old_loop_ptr = NULL; +- MPI_Aint old_loop_sz = 0; +- +- DLOOP_Handle_get_loopptr_macro(oldtype, old_loop_ptr); +- DLOOP_Handle_get_loopsize_macro(oldtype, old_loop_sz); +- +- MPIR_Dataloop_alloc_and_copy(DLOOP_KIND_INDEXED, +- contig_count, +- old_loop_ptr, old_loop_sz, &new_dlp, &new_loop_sz); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- new_dlp->kind = DLOOP_KIND_INDEXED; +- +- DLOOP_Handle_get_size_macro(oldtype, new_dlp->el_size); +- DLOOP_Handle_get_extent_macro(oldtype, new_dlp->el_extent); +- DLOOP_Handle_get_basic_type_macro(oldtype, new_dlp->el_type); +- } +- +- new_dlp->loop_params.i_t.count = contig_count; +- new_dlp->loop_params.i_t.total_blocks = old_type_count; +- +- /* copy in blocklength and displacement parameters (in that order) +- * +- * regardless of dispinbytes, we store displacements in bytes in loop. +- */ +- DLOOP_Type_indexed_array_copy(count, +- contig_count, +- blocklength_array, +- displacement_array, +- new_dlp->loop_params.i_t.blocksize_array, +- new_dlp->loop_params.i_t.offset_array, dispinbytes, old_extent); +- +- if (is_builtin && (flag == DLOOP_DATALOOP_ALL_BYTES)) { +- DLOOP_Count *tmp_blklen_array = new_dlp->loop_params.i_t.blocksize_array; +- +- for (i = 0; i < contig_count; i++) { +- /* increase block lengths so they are in bytes */ +- tmp_blklen_array[i] *= old_extent; +- } +- +- new_dlp->loop_params.i_t.total_blocks *= old_extent; +- } +- +- *dlp_p = new_dlp; +- *dlsz_p = new_loop_sz; +- *dldepth_p = old_loop_depth + 1; +- +- return MPI_SUCCESS; +-} +- +-/* DLOOP_Type_indexed_array_copy() +- * +- * Copies arrays into place, combining adjacent contiguous regions and +- * dropping zero-length regions. +- * +- * Extent passed in is for the original type. +- * +- * Output displacements are always output in bytes, while block +- * lengths are always output in terms of the base type. +- */ +-static void DLOOP_Type_indexed_array_copy(DLOOP_Count count, +- DLOOP_Count contig_count, +- const DLOOP_Size * in_blklen_array, +- const void *in_disp_array, +- DLOOP_Count * out_blklen_array, +- DLOOP_Offset * out_disp_array, +- int dispinbytes, DLOOP_Offset old_extent) +-{ +- DLOOP_Count i, first, cur_idx = 0; +- +- /* Skip any initial zero-length blocks */ +- for (first = 0; first < count; ++first) +- if ((DLOOP_Count) in_blklen_array[first]) +- break; +- +- out_blklen_array[0] = (DLOOP_Count) in_blklen_array[first]; +- +- if (!dispinbytes) { +- out_disp_array[0] = (DLOOP_Offset) +- ((int *) in_disp_array)[first] * old_extent; +- +- for (i = first + 1; i < count; ++i) { +- if (in_blklen_array[i] == 0) { +- continue; +- } else if (out_disp_array[cur_idx] + +- ((DLOOP_Offset) out_blklen_array[cur_idx]) * old_extent == +- ((DLOOP_Offset) ((int *) in_disp_array)[i]) * old_extent) { +- /* adjacent to current block; add to block */ +- out_blklen_array[cur_idx] += (DLOOP_Count) in_blklen_array[i]; +- } else { +- cur_idx++; +- DLOOP_Assert(cur_idx < contig_count); +- out_disp_array[cur_idx] = ((DLOOP_Offset) ((int *) in_disp_array)[i]) * old_extent; +- out_blklen_array[cur_idx] = in_blklen_array[i]; +- } +- } +- } else { /* input displacements already in bytes */ +- +- out_disp_array[0] = (DLOOP_Offset) ((MPI_Aint *) in_disp_array)[first]; +- +- for (i = first + 1; i < count; ++i) { +- if (in_blklen_array[i] == 0) { +- continue; +- } else if (out_disp_array[cur_idx] + +- ((DLOOP_Offset) out_blklen_array[cur_idx]) * old_extent == +- ((DLOOP_Offset) ((MPI_Aint *) in_disp_array)[i])) { +- /* adjacent to current block; add to block */ +- out_blklen_array[cur_idx] += in_blklen_array[i]; +- } else { +- cur_idx++; +- DLOOP_Assert(cur_idx < contig_count); +- out_disp_array[cur_idx] = (DLOOP_Offset) ((MPI_Aint *) in_disp_array)[i]; +- out_blklen_array[cur_idx] = (DLOOP_Count) in_blklen_array[i]; +- } +- } +- } +- +- DLOOP_Assert(cur_idx == contig_count - 1); +- return; +-} +- +-/* DLOOP_Type_indexed_count_contig() +- * +- * Determines the actual number of contiguous blocks represented by the +- * blocklength/displacement arrays. This might be less than count (as +- * few as 1). +- * +- * Extent passed in is for the original type. +- */ +-DLOOP_Count MPIR_Type_indexed_count_contig(DLOOP_Count count, +- const DLOOP_Count * blocklength_array, +- const void *displacement_array, +- int dispinbytes, DLOOP_Offset old_extent) +-{ +- DLOOP_Count i, contig_count = 1; +- DLOOP_Count cur_blklen, first; +- +- if (count) { +- /* Skip any initial zero-length blocks */ +- for (first = 0; first < count; ++first) +- if ((DLOOP_Count) blocklength_array[first]) +- break; +- +- if (first == count) { /* avoid invalid reads later on */ +- contig_count = 0; +- return contig_count; +- } +- +- cur_blklen = (DLOOP_Count) blocklength_array[first]; +- if (!dispinbytes) { +- DLOOP_Offset cur_tdisp = (DLOOP_Offset) ((int *) displacement_array)[first]; +- +- for (i = first + 1; i < count; ++i) { +- if (blocklength_array[i] == 0) { +- continue; +- } else if (cur_tdisp + (DLOOP_Offset) cur_blklen == +- (DLOOP_Offset) ((int *) displacement_array)[i]) { +- /* adjacent to current block; add to block */ +- cur_blklen += (DLOOP_Count) blocklength_array[i]; +- } else { +- cur_tdisp = (DLOOP_Offset) ((int *) displacement_array)[i]; +- cur_blklen = (DLOOP_Count) blocklength_array[i]; +- contig_count++; +- } +- } +- } else { +- DLOOP_Offset cur_bdisp = (DLOOP_Offset) ((MPI_Aint *) displacement_array)[first]; +- +- for (i = first + 1; i < count; ++i) { +- if (blocklength_array[i] == 0) { +- continue; +- } else if (cur_bdisp + (DLOOP_Offset) cur_blklen * old_extent == +- (DLOOP_Offset) ((MPI_Aint *) displacement_array)[i]) { +- /* adjacent to current block; add to block */ +- cur_blklen += (DLOOP_Count) blocklength_array[i]; +- } else { +- cur_bdisp = (DLOOP_Offset) ((MPI_Aint *) displacement_array)[i]; +- cur_blklen = (DLOOP_Count) blocklength_array[i]; +- contig_count++; +- } +- } +- } +- } +- return contig_count; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/dataloop_create_pairtype.c ++++ /dev/null +@@ -1,65 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-#define PAIRTYPE_CONTENTS(mt1_,ut1_,mt2_,ut2_) \ +- { \ +- struct { ut1_ a; ut2_ b; } foo; \ +- disps[0] = 0; \ +- disps[1] = DLOOP_VOID_PTR_CAST_TO_OFFSET ((char *) &foo.b - (char *) &foo.a); \ +- types[0] = mt1_; \ +- types[1] = mt2_; \ +- } +- +-/*@ +- Dataloop_create_pairtype - create dataloop for a pairtype +- +- Arguments: +-+ MPI_Datatype type - the pairtype +-. DLOOP_Dataloop **output_dataloop_ptr +-. int output_dataloop_size +-. int output_dataloop_depth +-- int flag +- +-.N Errors +-.N Returns 0 on success, -1 on failure. +- +- Note: +- This function simply creates the appropriate input parameters for +- use with Dataloop_create_struct and then calls that function. +- +- This same function could be used to create dataloops for any type +- that actually consists of two distinct elements. +-@*/ +-int MPIR_Dataloop_create_pairtype(MPI_Datatype type, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag) +-{ +- int blocks[2] = { 1, 1 }; +- MPI_Aint disps[2]; +- MPI_Datatype types[2]; +- +- DLOOP_Assert(type == MPI_FLOAT_INT || type == MPI_DOUBLE_INT || +- type == MPI_LONG_INT || type == MPI_SHORT_INT || +- type == MPI_LONG_DOUBLE_INT || type == MPI_2INT); +- +- if (type == MPI_FLOAT_INT) +- PAIRTYPE_CONTENTS(MPI_FLOAT, float, MPI_INT, int); +- if (type == MPI_DOUBLE_INT) +- PAIRTYPE_CONTENTS(MPI_DOUBLE, double, MPI_INT, int); +- if (type == MPI_LONG_INT) +- PAIRTYPE_CONTENTS(MPI_LONG, long, MPI_INT, int); +- if (type == MPI_SHORT_INT) +- PAIRTYPE_CONTENTS(MPI_SHORT, short, MPI_INT, int); +- if (type == MPI_LONG_DOUBLE_INT) +- PAIRTYPE_CONTENTS(MPI_LONG_DOUBLE, long double, MPI_INT, int); +- if (type == MPI_2INT) +- PAIRTYPE_CONTENTS(MPI_INT, int, MPI_INT, int); +- +- return MPIR_Dataloop_create_struct(2, blocks, disps, types, dlp_p, dlsz_p, dldepth_p, flag); +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/dataloop_create_struct.c ++++ /dev/null +@@ -1,439 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-static int DLOOP_Dataloop_create_struct_memory_error(void); +-static int DLOOP_Dataloop_create_unique_type_struct(DLOOP_Count count, +- const int *blklens, +- const MPI_Aint * disps, +- const DLOOP_Type * oldtypes, +- int type_pos, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag); +-static int DLOOP_Dataloop_create_basic_all_bytes_struct(DLOOP_Count count, +- const int *blklens, +- const MPI_Aint * disps, +- const DLOOP_Type * oldtypes, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, +- int *dldepth_p, int flag); +-static int DLOOP_Dataloop_create_flattened_struct(DLOOP_Count count, +- const int *blklens, +- const MPI_Aint * disps, +- const DLOOP_Type * oldtypes, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag); +- +-/*@ +- Dataloop_create_struct - create the dataloop representation for a +- struct datatype +- +-Input Parameters: +-+ count - number of blocks in vector +-. blklens - number of elements in each block +-. disps - offsets of blocks from start of type in bytes +-- oldtypes - types (using handle) of datatypes on which vector is based +- +-Output Parameters: +-+ dlp_p - pointer to address in which to place pointer to new dataloop +-- dlsz_p - pointer to address in which to place size of new dataloop +- +- Return Value: +- 0 on success, -1 on failure. +- +- Notes: +- This function relies on others, like Dataloop_create_indexed, to create +- types in some cases. This call (like all the rest) takes int blklens +- and MPI_Aint displacements, so it's possible to overflow when working +- with a particularly large struct type in some cases. This isn't detected +- or corrected in this code at this time. +- +-@*/ +-int MPIR_Dataloop_create_struct(DLOOP_Count count, +- const int *blklens, +- const MPI_Aint * disps, +- const DLOOP_Type * oldtypes, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag) +-{ +- int err, i, nr_basics = 0, nr_derived = 0, type_pos = 0; +- +- DLOOP_Type first_basic = MPI_DATATYPE_NULL, first_derived = MPI_DATATYPE_NULL; +- +- /* if count is zero, handle with contig code, call it a int */ +- if (count == 0) { +- err = MPIR_Dataloop_create_contiguous(0, MPI_INT, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- /* browse the old types and characterize */ +- for (i = 0; i < count; i++) { +- /* ignore type elements with a zero blklen */ +- if (blklens[i] == 0) +- continue; +- +- if (oldtypes[i] != MPI_LB && oldtypes[i] != MPI_UB) { +- int is_builtin; +- +- is_builtin = (DLOOP_Handle_hasloop_macro(oldtypes[i])) ? 0 : 1; +- +- if (is_builtin) { +- if (nr_basics == 0) { +- first_basic = oldtypes[i]; +- type_pos = i; +- } else if (oldtypes[i] != first_basic) { +- first_basic = MPI_DATATYPE_NULL; +- } +- nr_basics++; +- } else { /* derived type */ +- +- if (nr_derived == 0) { +- first_derived = oldtypes[i]; +- type_pos = i; +- } else if (oldtypes[i] != first_derived) { +- first_derived = MPI_DATATYPE_NULL; +- } +- nr_derived++; +- } +- } +- } +- +- /* note on optimizations: +- * +- * because LB, UB, and extent calculations are handled as part of +- * the Datatype, we can safely ignore them in all our calculations +- * here. +- */ +- +- /* optimization: +- * +- * if there were only MPI_LBs and MPI_UBs in the struct type, +- * treat it as a zero-element contiguous (just as count == 0). +- */ +- if (nr_basics == 0 && nr_derived == 0) { +- err = MPIR_Dataloop_create_contiguous(0, MPI_INT, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- /* optimization: +- * +- * if there is only one unique instance of a type in the struct, treat it +- * as a blockindexed type. +- * +- * notes: +- * +- * if the displacement happens to be zero, the blockindexed code will +- * optimize this into a contig. +- */ +- if (nr_basics + nr_derived == 1) { +- /* type_pos is index to only real type in array */ +- err = MPIR_Dataloop_create_blockindexed(1, /* count */ +- blklens[type_pos], &disps[type_pos], 1, /* displacement in bytes */ +- oldtypes[type_pos], dlp_p, dlsz_p, dldepth_p, flag); +- +- return err; +- } +- +- /* optimization: +- * +- * if there only one unique type (more than one instance) in the +- * struct, treat it as an indexed type. +- * +- * notes: +- * +- * this will apply to a single type with an LB/UB, as those +- * are handled elsewhere. +- * +- */ +- if (((nr_derived == 0) && (first_basic != MPI_DATATYPE_NULL)) || +- ((nr_basics == 0) && (first_derived != MPI_DATATYPE_NULL))) { +- return DLOOP_Dataloop_create_unique_type_struct(count, +- blklens, +- disps, +- oldtypes, +- type_pos, dlp_p, dlsz_p, dldepth_p, flag); +- } +- +- /* optimization: +- * +- * if there are no derived types, convert +- * everything to bytes and use an indexed type. +- */ +- if (nr_derived == 0) { +- return DLOOP_Dataloop_create_basic_all_bytes_struct(count, +- blklens, +- disps, +- oldtypes, +- dlp_p, dlsz_p, dldepth_p, flag); +- } +- +- /* optimization: +- * flatten the type and store it as an indexed type so that +- * there are no branches in the dataloop tree. +- */ +- return DLOOP_Dataloop_create_flattened_struct(count, +- blklens, +- disps, oldtypes, dlp_p, dlsz_p, dldepth_p, flag); +-} +- +-/* --BEGIN ERROR HANDLING-- */ +-static int DLOOP_Dataloop_create_struct_memory_error(void) +-{ +- return -1; +-} +- +-/* --END ERROR HANDLING-- */ +- +-static int DLOOP_Dataloop_create_unique_type_struct(DLOOP_Count count, +- const int *blklens, +- const MPI_Aint * disps, +- const DLOOP_Type * oldtypes, +- int type_pos, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag) +-{ +- /* the same type used more than once in the array; type_pos +- * indexes to the first of these. +- */ +- int i, err, cur_pos = 0; +- DLOOP_Size *tmp_blklens; +- DLOOP_Offset *tmp_disps; +- +- /* count is an upper bound on number of type instances */ +- tmp_blklens = (DLOOP_Size *) DLOOP_Malloc(count * sizeof(DLOOP_Size), MPL_MEM_DATATYPE); +- /* --BEGIN ERROR HANDLING-- */ +- if (!tmp_blklens) { +- /* TODO: ??? */ +- return DLOOP_Dataloop_create_struct_memory_error(); +- } +- /* --END ERROR HANDLING-- */ +- +- tmp_disps = (DLOOP_Offset *) +- DLOOP_Malloc(count * sizeof(DLOOP_Offset), MPL_MEM_DATATYPE); +- /* --BEGIN ERROR HANDLING-- */ +- if (!tmp_disps) { +- DLOOP_Free(tmp_blklens); +- /* TODO: ??? */ +- return DLOOP_Dataloop_create_struct_memory_error(); +- } +- /* --END ERROR HANDLING-- */ +- +- for (i = type_pos; i < count; i++) { +- if (oldtypes[i] == oldtypes[type_pos] && blklens != 0) { +- tmp_blklens[cur_pos] = blklens[i]; +- tmp_disps[cur_pos] = disps[i]; +- cur_pos++; +- } +- } +- +- err = MPIR_Dataloop_create_indexed(cur_pos, tmp_blklens, tmp_disps, 1, /* disp in bytes */ +- oldtypes[type_pos], dlp_p, dlsz_p, dldepth_p, flag); +- +- DLOOP_Free(tmp_blklens); +- DLOOP_Free(tmp_disps); +- +- return err; +- +-} +- +-static int DLOOP_Dataloop_create_basic_all_bytes_struct(DLOOP_Count count, +- const int *blklens, +- const MPI_Aint * disps, +- const DLOOP_Type * oldtypes, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag) +-{ +- int i, err, cur_pos = 0; +- DLOOP_Size *tmp_blklens; +- MPI_Aint *tmp_disps; +- +- /* count is an upper bound on number of type instances */ +- tmp_blklens = (DLOOP_Size *) DLOOP_Malloc(count * sizeof(DLOOP_Size), MPL_MEM_DATATYPE); +- +- /* --BEGIN ERROR HANDLING-- */ +- if (!tmp_blklens) { +- return DLOOP_Dataloop_create_struct_memory_error(); +- } +- /* --END ERROR HANDLING-- */ +- +- tmp_disps = (MPI_Aint *) DLOOP_Malloc(count * sizeof(MPI_Aint), MPL_MEM_DATATYPE); +- +- /* --BEGIN ERROR HANDLING-- */ +- if (!tmp_disps) { +- DLOOP_Free(tmp_blklens); +- return DLOOP_Dataloop_create_struct_memory_error(); +- } +- /* --END ERROR HANDLING-- */ +- +- for (i = 0; i < count; i++) { +- if (oldtypes[i] != MPI_LB && oldtypes[i] != MPI_UB && blklens[i] != 0) { +- DLOOP_Offset sz; +- +- DLOOP_Handle_get_size_macro(oldtypes[i], sz); +- tmp_blklens[cur_pos] = (int) sz *blklens[i]; +- tmp_disps[cur_pos] = disps[i]; +- cur_pos++; +- } +- } +- err = MPIR_Dataloop_create_indexed(cur_pos, tmp_blklens, tmp_disps, 1, /* disp in bytes */ +- MPI_BYTE, dlp_p, dlsz_p, dldepth_p, flag); +- +- DLOOP_Free(tmp_blklens); +- DLOOP_Free(tmp_disps); +- +- return err; +-} +- +-static int DLOOP_Dataloop_create_flattened_struct(DLOOP_Count count, +- const int *blklens, +- const MPI_Aint * disps, +- const DLOOP_Type * oldtypes, +- DLOOP_Dataloop ** dlp_p, +- MPI_Aint * dlsz_p, int *dldepth_p, int flag) +-{ +- /* arbitrary types, convert to bytes and use indexed */ +- int i, err, nr_blks = 0; +- DLOOP_Size *tmp_blklens; +- MPI_Aint *tmp_disps; /* since we're calling another fn that takes +- * this type as an input parameter */ +- DLOOP_Offset bytes; +- DLOOP_Segment *segp; +- +- int first_ind; +- DLOOP_Size last_ind; +- +- segp = MPIR_Segment_alloc(); +- /* --BEGIN ERROR HANDLING-- */ +- if (!segp) { +- return DLOOP_Dataloop_create_struct_memory_error(); +- } +- /* --END ERROR HANDLING-- */ +- +- /* use segment code once to count contiguous regions */ +- for (i = 0; i < count; i++) { +- int is_basic; +- +- /* ignore type elements with a zero blklen */ +- if (blklens[i] == 0) +- continue; +- +- is_basic = (DLOOP_Handle_hasloop_macro(oldtypes[i])) ? 0 : 1; +- +- if (is_basic && (oldtypes[i] != MPI_LB && oldtypes[i] != MPI_UB)) { +- nr_blks++; +- } else { /* derived type; get a count of contig blocks */ +- +- DLOOP_Count tmp_nr_blks, sz; +- +- DLOOP_Handle_get_size_macro(oldtypes[i], sz); +- +- /* if the derived type has some data to contribute, +- * add to flattened representation */ +- if (sz > 0) { +- err = MPIR_Segment_init(NULL, (DLOOP_Count) blklens[i], oldtypes[i], segp); +- if (err) +- return err; +- +- bytes = SEGMENT_IGNORE_LAST; +- +- MPIR_Segment_count_contig_blocks(segp, 0, &bytes, &tmp_nr_blks); +- +- nr_blks += tmp_nr_blks; +- } +- } +- } +- +- /* it's possible for us to get to this point only to realize that +- * there isn't any data in this type. in that case do what we always +- * do: store a simple contig of zero ints and call it done. +- */ +- if (nr_blks == 0) { +- MPIR_Segment_free(segp); +- err = MPIR_Dataloop_create_contiguous(0, MPI_INT, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- +- } +- +- nr_blks += 2; /* safety measure */ +- +- tmp_blklens = (DLOOP_Size *) DLOOP_Malloc(nr_blks * sizeof(DLOOP_Size), MPL_MEM_DATATYPE); +- /* --BEGIN ERROR HANDLING-- */ +- if (!tmp_blklens) { +- MPIR_Segment_free(segp); +- return DLOOP_Dataloop_create_struct_memory_error(); +- } +- /* --END ERROR HANDLING-- */ +- +- +- tmp_disps = (MPI_Aint *) DLOOP_Malloc(nr_blks * sizeof(MPI_Aint), MPL_MEM_DATATYPE); +- /* --BEGIN ERROR HANDLING-- */ +- if (!tmp_disps) { +- DLOOP_Free(tmp_blklens); +- MPIR_Segment_free(segp); +- return DLOOP_Dataloop_create_struct_memory_error(); +- } +- /* --END ERROR HANDLING-- */ +- +- /* use segment code again to flatten the type */ +- first_ind = 0; +- for (i = 0; i < count; i++) { +- int is_basic; +- DLOOP_Count sz = -1; +- +- is_basic = (DLOOP_Handle_hasloop_macro(oldtypes[i])) ? 0 : 1; +- if (!is_basic) +- DLOOP_Handle_get_size_macro(oldtypes[i], sz); +- +- /* we're going to use the segment code to flatten the type. +- * we put in our displacement as the buffer location, and use +- * the blocklength as the count value to get N contiguous copies +- * of the type. +- * +- * Note that we're going to get back values in bytes, so that will +- * be our new element type. +- */ +- if (oldtypes[i] != MPI_UB && +- oldtypes[i] != MPI_LB && blklens[i] != 0 && (is_basic || sz > 0)) { +- err = MPIR_Segment_init((char *) DLOOP_OFFSET_CAST_TO_VOID_PTR disps[i], +- (DLOOP_Count) blklens[i], oldtypes[i], segp); +- if (err) +- return err; +- +- last_ind = nr_blks - first_ind; +- bytes = SEGMENT_IGNORE_LAST; +- MPIR_Segment_mpi_flatten(segp, +- 0, +- &bytes, +- &tmp_blklens[first_ind], &tmp_disps[first_ind], &last_ind); +- first_ind += last_ind; +- } +- } +- nr_blks = first_ind; +- +-#if 0 +- if (MPL_DBG_SELECTED(MPIR_DBG_DATATYPE, VERBOSE)) { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "--- start of flattened type ---"); +- for (i = 0; i < nr_blks; i++) { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- "a[%d] = (%d, " DLOOP_OFFSET_FMT_DEC_SPEC ")", i, +- tmp_blklens[i], tmp_disps[i])); +- } +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "--- end of flattened type ---"); +- } +-#endif +- +- MPIR_Segment_free(segp); +- +- err = MPIR_Dataloop_create_indexed(nr_blks, tmp_blklens, tmp_disps, 1, /* disp in bytes */ +- MPI_BYTE, dlp_p, dlsz_p, dldepth_p, flag); +- +- DLOOP_Free(tmp_blklens); +- DLOOP_Free(tmp_disps); +- +- return err; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/dataloop_create_vector.c ++++ /dev/null +@@ -1,147 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-/*@ +- Dataloop_create_vector +- +- Arguments: +-+ int icount +-. int iblocklength +-. MPI_Aint astride +-. int strideinbytes +-. MPI_Datatype oldtype +-. DLOOP_Dataloop **dlp_p +-. int *dlsz_p +-. int *dldepth_p +-- int flag +- +- Returns 0 on success, -1 on failure. +- +-@*/ +-int MPIR_Dataloop_create_vector(DLOOP_Count icount, +- DLOOP_Size iblocklength, +- MPI_Aint astride, +- int strideinbytes, +- DLOOP_Type oldtype, +- DLOOP_Dataloop ** dlp_p, +- DLOOP_Size * dlsz_p, int *dldepth_p, int flag) +-{ +- int err, is_builtin; +- DLOOP_Size new_loop_sz; +- int new_loop_depth; +- +- DLOOP_Count count, blocklength; +- DLOOP_Offset stride; +- DLOOP_Dataloop *new_dlp; +- +- count = (DLOOP_Count) icount; /* avoid subsequent casting */ +- blocklength = (DLOOP_Count) iblocklength; +- stride = (DLOOP_Offset) astride; +- +- /* if count or blocklength are zero, handle with contig code, +- * call it a int +- */ +- if (count == 0 || blocklength == 0) { +- +- err = MPIR_Dataloop_create_contiguous(0, MPI_INT, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- /* optimization: +- * +- * if count == 1, store as a contiguous rather than a vector dataloop. +- */ +- if (count == 1) { +- err = MPIR_Dataloop_create_contiguous(iblocklength, +- oldtype, dlp_p, dlsz_p, dldepth_p, flag); +- return err; +- } +- +- is_builtin = (DLOOP_Handle_hasloop_macro(oldtype)) ? 0 : 1; +- +- if (is_builtin) { +- new_loop_sz = sizeof(DLOOP_Dataloop); +- new_loop_depth = 1; +- } else { +- MPI_Aint old_loop_sz = 0; +- int old_loop_depth = 0; +- +- DLOOP_Handle_get_loopsize_macro(oldtype, old_loop_sz); +- DLOOP_Handle_get_loopdepth_macro(oldtype, old_loop_depth); +- +- /* TODO: ACCOUNT FOR PADDING IN LOOP_SZ HERE */ +- new_loop_sz = sizeof(DLOOP_Dataloop) + old_loop_sz; +- new_loop_depth = old_loop_depth + 1; +- } +- +- +- if (is_builtin) { +- DLOOP_Offset basic_sz = 0; +- +- MPIR_Dataloop_alloc(DLOOP_KIND_VECTOR, count, &new_dlp, &new_loop_sz); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- DLOOP_Handle_get_size_macro(oldtype, basic_sz); +- new_dlp->kind = DLOOP_KIND_VECTOR | DLOOP_FINAL_MASK; +- +- if (flag == DLOOP_DATALOOP_ALL_BYTES) { +- +- blocklength *= basic_sz; +- new_dlp->el_size = 1; +- new_dlp->el_extent = 1; +- new_dlp->el_type = MPI_BYTE; +- +- if (!strideinbytes) +- /* the stride was specified in units of oldtype, now +- * that we're using bytes, rather than oldtype, we +- * need to update stride. */ +- stride *= basic_sz; +- } else { +- new_dlp->el_size = basic_sz; +- new_dlp->el_extent = new_dlp->el_size; +- new_dlp->el_type = oldtype; +- } +- } else { /* user-defined base type (oldtype) */ +- +- DLOOP_Dataloop *old_loop_ptr; +- MPI_Aint old_loop_sz = 0; +- +- DLOOP_Handle_get_loopptr_macro(oldtype, old_loop_ptr); +- DLOOP_Handle_get_loopsize_macro(oldtype, old_loop_sz); +- +- MPIR_Dataloop_alloc_and_copy(DLOOP_KIND_VECTOR, +- count, old_loop_ptr, old_loop_sz, &new_dlp, &new_loop_sz); +- /* --BEGIN ERROR HANDLING-- */ +- if (!new_dlp) +- return -1; +- /* --END ERROR HANDLING-- */ +- +- new_dlp->kind = DLOOP_KIND_VECTOR; +- DLOOP_Handle_get_size_macro(oldtype, new_dlp->el_size); +- DLOOP_Handle_get_extent_macro(oldtype, new_dlp->el_extent); +- DLOOP_Handle_get_basic_type_macro(oldtype, new_dlp->el_type); +- } +- +- /* vector-specific members +- * +- * stride stored in dataloop is always in bytes for local rep of type +- */ +- new_dlp->loop_params.v_t.count = count; +- new_dlp->loop_params.v_t.blocksize = blocklength; +- new_dlp->loop_params.v_t.stride = (strideinbytes) ? stride : stride * new_dlp->el_extent; +- +- *dlp_p = new_dlp; +- *dlsz_p = new_loop_sz; +- *dldepth_p = new_loop_depth; +- +- return 0; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/segment.c ++++ /dev/null +@@ -1,747 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-#include +-#include +- +-#undef DLOOP_DEBUG_MANIPULATE +- +-/* Notes on functions: +- * +- * There are a few different sets of functions here: +- * - DLOOP_Segment_manipulate() - uses a "piece" function to perform operations +- * using segments (piece functions defined elsewhere) +- * - MPIDU functions - these define the externally visible interface +- * to segment functionality +- */ +- +-/* DLOOP_Segment_manipulate - do something to a segment +- * +- * If you think of all the data to be manipulated (packed, unpacked, whatever), +- * as a stream of bytes, it's easier to understand how first and last fit in. +- * +- * This function does all the work, calling the piecefn passed in when it +- * encounters a datatype element which falls into the range of first..(last-1). +- * +- * piecefn can be NULL, in which case this function doesn't do anything when it +- * hits a region. This is used internally for repositioning within this stream. +- * +- * last is a byte offset to the byte just past the last byte in the stream +- * to operate on. this makes the calculations all over MUCH cleaner. +- * +- * stream_off, stream_el_size, first, and last are all working in terms of the +- * types and sizes for the stream, which might be different from the local sizes +- * (in the heterogeneous case). +- * +- * This is a horribly long function. Too bad; it's complicated :)! -- Rob +- * +- * NOTE: THIS IMPLEMENTATION CANNOT HANDLE STRUCT DATALOOPS. +- */ +-#define DLOOP_SEGMENT_SAVE_LOCAL_VALUES \ +- { \ +- segp->cur_sp = cur_sp; \ +- segp->valid_sp = valid_sp; \ +- segp->stream_off = stream_off; \ +- *lastp = stream_off; \ +- } +- +-#define DLOOP_SEGMENT_LOAD_LOCAL_VALUES \ +- { \ +- last = *lastp; \ +- cur_sp = segp->cur_sp; \ +- valid_sp = segp->valid_sp; \ +- stream_off = segp->stream_off; \ +- cur_elmp = &(segp->stackelm[cur_sp]); \ +- } +- +-#define DLOOP_SEGMENT_RESET_VALUES \ +- { \ +- segp->stream_off = 0; \ +- segp->cur_sp = 0; \ +- cur_elmp = &(segp->stackelm[0]); \ +- cur_elmp->curcount = cur_elmp->orig_count; \ +- cur_elmp->orig_block = DLOOP_Stackelm_blocksize(cur_elmp); \ +- cur_elmp->curblock = cur_elmp->orig_block; \ +- cur_elmp->curoffset = cur_elmp->orig_offset + \ +- DLOOP_Stackelm_offset(cur_elmp); \ +- } +- +-#define DLOOP_SEGMENT_POP_AND_MAYBE_EXIT \ +- { \ +- cur_sp--; \ +- if (cur_sp >= 0) cur_elmp = &segp->stackelm[cur_sp]; \ +- else { \ +- DLOOP_SEGMENT_SAVE_LOCAL_VALUES; \ +- return; \ +- } \ +- } +- +-#define DLOOP_SEGMENT_PUSH \ +- { \ +- cur_sp++; \ +- cur_elmp = &segp->stackelm[cur_sp]; \ +- } +- +-#define DLOOP_STACKELM_BLOCKINDEXED_OFFSET(elmp_, curcount_) \ +- (elmp_)->loop_p->loop_params.bi_t.offset_array[(curcount_)] +- +-#define DLOOP_STACKELM_INDEXED_OFFSET(elmp_, curcount_) \ +- (elmp_)->loop_p->loop_params.i_t.offset_array[(curcount_)] +- +-#define DLOOP_STACKELM_INDEXED_BLOCKSIZE(elmp_, curcount_) \ +- (elmp_)->loop_p->loop_params.i_t.blocksize_array[(curcount_)] +- +-#define DLOOP_STACKELM_STRUCT_OFFSET(elmp_, curcount_) \ +- (elmp_)->loop_p->loop_params.s_t.offset_array[(curcount_)] +- +-#define DLOOP_STACKELM_STRUCT_BLOCKSIZE(elmp_, curcount_) \ +- (elmp_)->loop_p->loop_params.s_t.blocksize_array[(curcount_)] +- +-#define DLOOP_STACKELM_STRUCT_EL_EXTENT(elmp_, curcount_) \ +- (elmp_)->loop_p->loop_params.s_t.el_extent_array[(curcount_)] +- +-#define DLOOP_STACKELM_STRUCT_DATALOOP(elmp_, curcount_) \ +- (elmp_)->loop_p->loop_params.s_t.dataloop_array[(curcount_)] +- +-void MPIR_Segment_manipulate(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, +- int (*contigfn) (DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp, +- void *v_paramp), +- int (*vectorfn) (DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blklen, +- DLOOP_Offset stride, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp, +- void *v_paramp), +- int (*blkidxfn) (DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blklen, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp, +- void *v_paramp), +- int (*indexfn) (DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count * blockarray, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp, +- void *v_paramp), +- DLOOP_Offset(*sizefn) (DLOOP_Type el_type), void *pieceparams) +-{ +- /* these four are the "local values": cur_sp, valid_sp, last, stream_off */ +- int cur_sp, valid_sp; +- DLOOP_Offset last, stream_off; +- +- struct DLOOP_Dataloop_stackelm *cur_elmp; +- enum { PF_NULL, PF_CONTIG, PF_VECTOR, PF_BLOCKINDEXED, PF_INDEXED } piecefn_type = PF_NULL; +- +- DLOOP_SEGMENT_LOAD_LOCAL_VALUES; +- +- if (first == *lastp) { +- /* nothing to do */ +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "dloop_segment_manipulate: warning: first == last (" +- DLOOP_OFFSET_FMT_DEC_SPEC ")\n", first)); +- return; +- } +- +- /* first we ensure that stream_off and first are in the same spot */ +- if (first != stream_off) { +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "first=" DLOOP_OFFSET_FMT_DEC_SPEC "; stream_off=" +- DLOOP_OFFSET_FMT_DEC_SPEC "; resetting.\n", first, stream_off)); +-#endif +- +- if (first < stream_off) { +- DLOOP_SEGMENT_RESET_VALUES; +- stream_off = 0; +- } +- +- if (first != stream_off) { +- DLOOP_Offset tmp_last = first; +- +- /* use manipulate function with a NULL piecefn to advance +- * stream offset +- */ +- MPIR_Segment_manipulate(segp, stream_off, &tmp_last, NULL, /* contig fn */ +- NULL, /* vector fn */ +- NULL, /* blkidx fn */ +- NULL, /* index fn */ +- sizefn, NULL); +- +- /* --BEGIN ERROR HANDLING-- */ +- /* verify that we're in the right location */ +- DLOOP_Assert(tmp_last == first); +- /* --END ERROR HANDLING-- */ +- } +- +- DLOOP_SEGMENT_LOAD_LOCAL_VALUES; +- +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "done repositioning stream_off; first=" DLOOP_OFFSET_FMT_DEC_SPEC +- ", stream_off=" DLOOP_OFFSET_FMT_DEC_SPEC ", last=" +- DLOOP_OFFSET_FMT_DEC_SPEC "\n", first, stream_off, last)); +-#endif +- } +- +- for (;;) { +-#ifdef DLOOP_DEBUG_MANIPULATE +-#if 0 +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "looptop; cur_sp=%d, cur_elmp=%x\n", cur_sp, +- (unsigned) cur_elmp)); +-#endif +-#endif +- +- if (cur_elmp->loop_p->kind & DLOOP_FINAL_MASK) { +- int piecefn_indicated_exit = -1; +- DLOOP_Offset myblocks, local_el_size, stream_el_size; +- DLOOP_Type el_type; +- +- /* structs are never finals (leaves) */ +- DLOOP_Assert((cur_elmp->loop_p->kind & DLOOP_KIND_MASK) != DLOOP_KIND_STRUCT); +- +- /* pop immediately on zero count */ +- if (cur_elmp->curcount == 0) +- DLOOP_SEGMENT_POP_AND_MAYBE_EXIT; +- +- /* size on this system of the int, double, etc. that is +- * the elementary type. +- */ +- local_el_size = cur_elmp->loop_p->el_size; +- el_type = cur_elmp->loop_p->el_type; +- stream_el_size = (sizefn) ? sizefn(el_type) : local_el_size; +- +- /* calculate number of elem. types to work on and function to use. +- * default is to use the contig piecefn (if there is one). +- */ +- myblocks = cur_elmp->curblock; +- piecefn_type = (contigfn ? PF_CONTIG : PF_NULL); +- +- /* check for opportunities to use other piecefns */ +- switch (cur_elmp->loop_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- /* only use blkidx piecefn if at start of blkidx type */ +- if (blkidxfn && +- cur_elmp->orig_block == cur_elmp->curblock && +- cur_elmp->orig_count == cur_elmp->curcount) { +- /* TODO: RELAX CONSTRAINTS */ +- myblocks = cur_elmp->curblock * cur_elmp->curcount; +- piecefn_type = PF_BLOCKINDEXED; +- } +- break; +- case DLOOP_KIND_INDEXED: +- /* only use index piecefn if at start of the index type. +- * count test checks that we're on first block. +- * block test checks that we haven't made progress on first block. +- */ +- if (indexfn && +- cur_elmp->orig_count == cur_elmp->curcount && +- cur_elmp->curblock == DLOOP_STACKELM_INDEXED_BLOCKSIZE(cur_elmp, 0)) { +- /* TODO: RELAX CONSTRAINT ON COUNT? */ +- myblocks = cur_elmp->loop_p->loop_params.i_t.total_blocks; +- piecefn_type = PF_INDEXED; +- } +- break; +- case DLOOP_KIND_VECTOR: +- /* only use the vector piecefn if at the start of a +- * contiguous block. +- */ +- if (vectorfn && cur_elmp->orig_block == cur_elmp->curblock) { +- myblocks = cur_elmp->curblock * cur_elmp->curcount; +- piecefn_type = PF_VECTOR; +- } +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\thit leaf; cur_sp=%d, elmp=%x, piece_sz=" DLOOP_OFFSET_FMT_DEC_SPEC +- "\n", cur_sp, (unsigned) cur_elmp, myblocks * local_el_size)); +-#endif +- +- /* enforce the last parameter if necessary by reducing myblocks */ +- if (last != SEGMENT_IGNORE_LAST && (stream_off + (myblocks * stream_el_size) > last)) { +- myblocks = ((last - stream_off) / stream_el_size); +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\tpartial block count=" DLOOP_OFFSET_FMT_DEC_SPEC " (" +- DLOOP_OFFSET_FMT_DEC_SPEC " bytes)\n", myblocks, +- myblocks * stream_el_size)); +-#endif +- if (myblocks == 0) { +- DLOOP_SEGMENT_SAVE_LOCAL_VALUES; +- return; +- } +- } +- +- /* call piecefn to perform data manipulation */ +- switch (piecefn_type) { +- case PF_NULL: +- piecefn_indicated_exit = 0; +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG("\tNULL piecefn for this piece\n"); +-#endif +- break; +- case PF_CONTIG: +- DLOOP_Assert(myblocks <= cur_elmp->curblock); +- piecefn_indicated_exit = contigfn(&myblocks, el_type, cur_elmp->curoffset, /* relative to segp->ptr */ +- segp->ptr, /* start of buffer (from segment) */ +- pieceparams); +- break; +- case PF_VECTOR: +- piecefn_indicated_exit = +- vectorfn(&myblocks, +- cur_elmp->curcount, +- cur_elmp->orig_block, +- cur_elmp->loop_p->loop_params.v_t.stride, +- el_type, cur_elmp->curoffset, segp->ptr, pieceparams); +- break; +- case PF_BLOCKINDEXED: +- piecefn_indicated_exit = blkidxfn(&myblocks, cur_elmp->curcount, cur_elmp->orig_block, cur_elmp->loop_p->loop_params.bi_t.offset_array, el_type, cur_elmp->orig_offset, /* blkidxfn adds offset */ +- segp->ptr, pieceparams); +- break; +- case PF_INDEXED: +- piecefn_indicated_exit = indexfn(&myblocks, cur_elmp->curcount, cur_elmp->loop_p->loop_params.i_t.blocksize_array, cur_elmp->loop_p->loop_params.i_t.offset_array, el_type, cur_elmp->orig_offset, /* indexfn adds offset value */ +- segp->ptr, pieceparams); +- break; +- } +- +- /* update local values based on piecefn returns (myblocks and +- * piecefn_indicated_exit) +- */ +- DLOOP_Assert(piecefn_indicated_exit >= 0); +- DLOOP_Assert(myblocks >= 0); +- stream_off += myblocks * stream_el_size; +- +- /* myblocks of 0 or less than cur_elmp->curblock indicates +- * that we should stop processing and return. +- */ +- if (myblocks == 0) { +- DLOOP_SEGMENT_SAVE_LOCAL_VALUES; +- return; +- } else if (myblocks < (DLOOP_Offset) (cur_elmp->curblock)) { +- cur_elmp->curoffset += myblocks * local_el_size; +- cur_elmp->curblock -= myblocks; +- +- DLOOP_SEGMENT_SAVE_LOCAL_VALUES; +- return; +- } else { /* myblocks >= cur_elmp->curblock */ +- +- MPI_Aint count_index = 0; +- +- /* this assumes we're either *just* processing the last parts +- * of the current block, or we're processing as many blocks as +- * we like starting at the beginning of one. +- */ +- +- switch (cur_elmp->loop_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_INDEXED: +- while (myblocks > 0 && myblocks >= (DLOOP_Offset) (cur_elmp->curblock)) { +- myblocks -= (DLOOP_Offset) (cur_elmp->curblock); +- cur_elmp->curcount--; +- DLOOP_Assert(cur_elmp->curcount >= 0); +- +- count_index = cur_elmp->orig_count - cur_elmp->curcount; +- cur_elmp->curblock = +- DLOOP_STACKELM_INDEXED_BLOCKSIZE(cur_elmp, count_index); +- } +- +- if (cur_elmp->curcount == 0) { +- /* don't bother to fill in values; we're popping anyway */ +- DLOOP_Assert(myblocks == 0); +- DLOOP_SEGMENT_POP_AND_MAYBE_EXIT; +- } else { +- cur_elmp->orig_block = cur_elmp->curblock; +- cur_elmp->curoffset = cur_elmp->orig_offset + +- DLOOP_STACKELM_INDEXED_OFFSET(cur_elmp, count_index); +- +- cur_elmp->curblock -= myblocks; +- cur_elmp->curoffset += myblocks * local_el_size; +- } +- break; +- case DLOOP_KIND_VECTOR: +- /* this math relies on assertions at top of code block */ +- cur_elmp->curcount -= myblocks / (DLOOP_Offset) (cur_elmp->curblock); +- if (cur_elmp->curcount == 0) { +- DLOOP_Assert(myblocks % ((DLOOP_Offset) (cur_elmp->curblock)) == 0); +- DLOOP_SEGMENT_POP_AND_MAYBE_EXIT; +- } else { +- /* this math relies on assertions at top of code +- * block +- */ +- cur_elmp->curblock = cur_elmp->orig_block - +- (myblocks % (DLOOP_Offset) (cur_elmp->curblock)); +- /* new offset = original offset + +- * stride * whole blocks + +- * leftover bytes +- */ +- cur_elmp->curoffset = cur_elmp->orig_offset + +- (((DLOOP_Offset) (cur_elmp->orig_count - cur_elmp->curcount)) * +- cur_elmp->loop_p->loop_params.v_t.stride) + +- (((DLOOP_Offset) (cur_elmp->orig_block - cur_elmp->curblock)) * +- local_el_size); +- } +- break; +- case DLOOP_KIND_CONTIG: +- /* contigs that reach this point have always been +- * completely processed +- */ +- DLOOP_Assert(myblocks == (DLOOP_Offset) (cur_elmp->curblock) && +- cur_elmp->curcount == 1); +- DLOOP_SEGMENT_POP_AND_MAYBE_EXIT; +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- while (myblocks > 0 && myblocks >= (DLOOP_Offset) (cur_elmp->curblock)) { +- myblocks -= (DLOOP_Offset) (cur_elmp->curblock); +- cur_elmp->curcount--; +- DLOOP_Assert(cur_elmp->curcount >= 0); +- +- count_index = cur_elmp->orig_count - cur_elmp->curcount; +- cur_elmp->curblock = cur_elmp->orig_block; +- } +- if (cur_elmp->curcount == 0) { +- /* popping */ +- DLOOP_Assert(myblocks == 0); +- DLOOP_SEGMENT_POP_AND_MAYBE_EXIT; +- } else { +- /* cur_elmp->orig_block = cur_elmp->curblock; */ +- cur_elmp->curoffset = cur_elmp->orig_offset + +- DLOOP_STACKELM_BLOCKINDEXED_OFFSET(cur_elmp, count_index); +- cur_elmp->curblock -= myblocks; +- cur_elmp->curoffset += myblocks * local_el_size; +- } +- break; +- } +- } +- +- if (piecefn_indicated_exit) { +- /* piece function indicated that we should quit processing */ +- DLOOP_SEGMENT_SAVE_LOCAL_VALUES; +- return; +- } +- } /* end of if leaf */ +- else if (cur_elmp->curblock == 0) { +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "\thit end of block; elmp=%x [%d]\n", +- (unsigned) cur_elmp, cur_sp)); +-#endif +- cur_elmp->curcount--; +- +- /* new block. for indexed and struct reset orig_block. +- * reset curblock for all types +- */ +- switch (cur_elmp->loop_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- case DLOOP_KIND_VECTOR: +- case DLOOP_KIND_BLOCKINDEXED: +- break; +- case DLOOP_KIND_INDEXED: +- cur_elmp->orig_block = +- DLOOP_STACKELM_INDEXED_BLOCKSIZE(cur_elmp, +- cur_elmp->curcount ? cur_elmp->orig_count - +- cur_elmp->curcount : 0); +- break; +- case DLOOP_KIND_STRUCT: +- cur_elmp->orig_block = +- DLOOP_STACKELM_STRUCT_BLOCKSIZE(cur_elmp, +- cur_elmp->curcount ? cur_elmp->orig_count - +- cur_elmp->curcount : 0); +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- cur_elmp->curblock = cur_elmp->orig_block; +- +- if (cur_elmp->curcount == 0) { +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "\talso hit end of count; elmp=%x [%d]\n", +- (unsigned) cur_elmp, cur_sp)); +-#endif +- DLOOP_SEGMENT_POP_AND_MAYBE_EXIT; +- } +- } else { /* push the stackelm */ +- +- DLOOP_Dataloop_stackelm *next_elmp; +- MPI_Aint count_index, block_index; +- +- count_index = cur_elmp->orig_count - cur_elmp->curcount; +- block_index = cur_elmp->orig_block - cur_elmp->curblock; +- +- /* reload the next stackelm if necessary */ +- next_elmp = &(segp->stackelm[cur_sp + 1]); +- if (cur_elmp->may_require_reloading) { +- DLOOP_Dataloop *load_dlp = NULL; +- switch (cur_elmp->loop_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- case DLOOP_KIND_VECTOR: +- case DLOOP_KIND_BLOCKINDEXED: +- case DLOOP_KIND_INDEXED: +- load_dlp = cur_elmp->loop_p->loop_params.cm_t.dataloop; +- break; +- case DLOOP_KIND_STRUCT: +- load_dlp = DLOOP_STACKELM_STRUCT_DATALOOP(cur_elmp, count_index); +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "\tloading dlp=%x, elmp=%x [%d]\n", +- (unsigned) load_dlp, (unsigned) next_elmp, cur_sp + 1)); +-#endif +- +- DLOOP_Stackelm_load(next_elmp, load_dlp, 1); +- } +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "\tpushing type, elmp=%x [%d], count=%d, block=%d\n", +- (unsigned) cur_elmp, cur_sp, count_index, block_index)); +-#endif +- /* set orig_offset and all cur values for new stackelm. +- * this is done in two steps: first set orig_offset based on +- * current stackelm, then set cur values based on new stackelm. +- */ +- switch (cur_elmp->loop_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- next_elmp->orig_offset = cur_elmp->curoffset + +- (DLOOP_Offset) block_index *cur_elmp->loop_p->el_extent; +- break; +- case DLOOP_KIND_VECTOR: +- /* note: stride is in bytes */ +- next_elmp->orig_offset = cur_elmp->orig_offset + +- (DLOOP_Offset) count_index *cur_elmp->loop_p->loop_params.v_t.stride + +- (DLOOP_Offset) block_index *cur_elmp->loop_p->el_extent; +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- next_elmp->orig_offset = cur_elmp->orig_offset + +- (DLOOP_Offset) block_index *cur_elmp->loop_p->el_extent + +- DLOOP_STACKELM_BLOCKINDEXED_OFFSET(cur_elmp, count_index); +- break; +- case DLOOP_KIND_INDEXED: +- next_elmp->orig_offset = cur_elmp->orig_offset + +- (DLOOP_Offset) block_index *cur_elmp->loop_p->el_extent + +- DLOOP_STACKELM_INDEXED_OFFSET(cur_elmp, count_index); +- break; +- case DLOOP_KIND_STRUCT: +- next_elmp->orig_offset = cur_elmp->orig_offset + +- (DLOOP_Offset) block_index *DLOOP_STACKELM_STRUCT_EL_EXTENT(cur_elmp, +- count_index) + +- DLOOP_STACKELM_STRUCT_OFFSET(cur_elmp, count_index); +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\tstep 1: next orig_offset = " DLOOP_OFFSET_FMT_DEC_SPEC " (0x" +- DLOOP_OFFSET_FMT_HEX_SPEC ")\n", next_elmp->orig_offset, +- next_elmp->orig_offset)); +-#endif +- +- switch (next_elmp->loop_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- case DLOOP_KIND_VECTOR: +- next_elmp->curcount = next_elmp->orig_count; +- next_elmp->curblock = next_elmp->orig_block; +- next_elmp->curoffset = next_elmp->orig_offset; +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- next_elmp->curcount = next_elmp->orig_count; +- next_elmp->curblock = next_elmp->orig_block; +- next_elmp->curoffset = next_elmp->orig_offset + +- DLOOP_STACKELM_BLOCKINDEXED_OFFSET(next_elmp, 0); +- break; +- case DLOOP_KIND_INDEXED: +- next_elmp->curcount = next_elmp->orig_count; +- next_elmp->curblock = DLOOP_STACKELM_INDEXED_BLOCKSIZE(next_elmp, 0); +- next_elmp->curoffset = next_elmp->orig_offset + +- DLOOP_STACKELM_INDEXED_OFFSET(next_elmp, 0); +- break; +- case DLOOP_KIND_STRUCT: +- next_elmp->curcount = next_elmp->orig_count; +- next_elmp->curblock = DLOOP_STACKELM_STRUCT_BLOCKSIZE(next_elmp, 0); +- next_elmp->curoffset = next_elmp->orig_offset + +- DLOOP_STACKELM_STRUCT_OFFSET(next_elmp, 0); +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\tstep 2: next curoffset = " DLOOP_OFFSET_FMT_DEC_SPEC " (0x" +- DLOOP_OFFSET_FMT_HEX_SPEC ")\n", next_elmp->curoffset, +- next_elmp->curoffset)); +-#endif +- +- cur_elmp->curblock--; +- DLOOP_SEGMENT_PUSH; +- } /* end of else push the stackelm */ +- } /* end of for (;;) */ +- +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG("hit end of datatype\n"); +-#endif +- +- DLOOP_SEGMENT_SAVE_LOCAL_VALUES; +- return; +-} +- +-/* DLOOP_Stackelm_blocksize - returns block size for stackelm based on current +- * count in stackelm. +- * +- * NOTE: loop_p, orig_count, and curcount members of stackelm MUST be correct +- * before this is called! +- * +- */ +-DLOOP_Count DLOOP_Stackelm_blocksize(struct DLOOP_Dataloop_stackelm * elmp) +-{ +- struct DLOOP_Dataloop *dlp = elmp->loop_p; +- +- switch (dlp->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- /* NOTE: we're dropping the count into the +- * blksize field for contigs, as described +- * in the init call. +- */ +- return dlp->loop_params.c_t.count; +- break; +- case DLOOP_KIND_VECTOR: +- return dlp->loop_params.v_t.blocksize; +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- return dlp->loop_params.bi_t.blocksize; +- break; +- case DLOOP_KIND_INDEXED: +- return dlp->loop_params.i_t.blocksize_array[elmp->orig_count - elmp->curcount]; +- break; +- case DLOOP_KIND_STRUCT: +- return dlp->loop_params.s_t.blocksize_array[elmp->orig_count - elmp->curcount]; +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- return -1; +-} +- +-/* DLOOP_Stackelm_offset - returns starting offset (displacement) for stackelm +- * based on current count in stackelm. +- * +- * NOTE: loop_p, orig_count, and curcount members of stackelm MUST be correct +- * before this is called! +- * +- * also, this really is only good at init time for vectors and contigs +- * (all the time for indexed) at the moment. +- * +- */ +-DLOOP_Offset DLOOP_Stackelm_offset(struct DLOOP_Dataloop_stackelm * elmp) +-{ +- struct DLOOP_Dataloop *dlp = elmp->loop_p; +- +- switch (dlp->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_VECTOR: +- case DLOOP_KIND_CONTIG: +- return 0; +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- return dlp->loop_params.bi_t.offset_array[elmp->orig_count - elmp->curcount]; +- break; +- case DLOOP_KIND_INDEXED: +- return dlp->loop_params.i_t.offset_array[elmp->orig_count - elmp->curcount]; +- break; +- case DLOOP_KIND_STRUCT: +- return dlp->loop_params.s_t.offset_array[elmp->orig_count - elmp->curcount]; +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- return -1; +-} +- +-/* DLOOP_Stackelm_load +- * loop_p, orig_count, orig_block, and curcount are all filled by us now. +- * the rest are filled in at processing time. +- */ +-void DLOOP_Stackelm_load(struct DLOOP_Dataloop_stackelm *elmp, +- struct DLOOP_Dataloop *dlp, int branch_flag) +-{ +- elmp->loop_p = dlp; +- +- if ((dlp->kind & DLOOP_KIND_MASK) == DLOOP_KIND_CONTIG) { +- elmp->orig_count = 1; /* put in blocksize instead */ +- } else { +- elmp->orig_count = dlp->loop_params.count; +- } +- +- if (branch_flag || (dlp->kind & DLOOP_KIND_MASK) == DLOOP_KIND_STRUCT) { +- elmp->may_require_reloading = 1; +- } else { +- elmp->may_require_reloading = 0; +- } +- +- /* required by DLOOP_Stackelm_blocksize */ +- elmp->curcount = elmp->orig_count; +- +- elmp->orig_block = DLOOP_Stackelm_blocksize(elmp); +- /* TODO: GO AHEAD AND FILL IN CURBLOCK? */ +-} +- +-/* +- * Local variables: +- * c-indent-tabs-mode: nil +- * End: +- */ +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/segment_count.c ++++ /dev/null +@@ -1,243 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-#include +-#include +-#include +-#include +- +-/* NOTE: bufp values are unused, ripe for removal */ +- +-static int DLOOP_Leaf_contig_count_block(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, DLOOP_Buffer bufp, void *v_paramp); +-static int DLOOP_Leaf_vector_count_block(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blksz, +- DLOOP_Offset stride, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +-static int DLOOP_Leaf_blkidx_count_block(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blksz, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +-static int DLOOP_Leaf_index_count_block(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count * blockarray, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +- +-struct MPIR_contig_blocks_params { +- DLOOP_Count count; +- DLOOP_Offset last_loc; +-}; +- +-/* DLOOP_Segment_count_contig_blocks() +- * +- * Count number of contiguous regions in segment between first and last. +- */ +-void MPIR_Segment_count_contig_blocks(DLOOP_Segment * segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, DLOOP_Count * countp) +-{ +- struct MPIR_contig_blocks_params params; +- +- params.count = 0; +- params.last_loc = 0; +- +- /* FIXME: The blkidx and index functions are not used since they +- * optimize the count by coalescing contiguous segments, while +- * functions using the count do not optimize in the same way +- * (e.g., flatten code) */ +- MPIR_Segment_manipulate(segp, first, lastp, DLOOP_Leaf_contig_count_block, DLOOP_Leaf_vector_count_block, DLOOP_Leaf_blkidx_count_block, DLOOP_Leaf_index_count_block, NULL, /* size fn */ +- (void *) ¶ms); +- +- *countp = params.count; +- return; +-} +- +-/* PIECE FUNCTIONS BELOW */ +- +-/* MPID_Leaf_contig_count_block +- * +- * Note: because bufp is just an offset, we can ignore it in our +- * calculations of # of contig regions. +- */ +-static int DLOOP_Leaf_contig_count_block(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- DLOOP_Buffer bufp ATTRIBUTE((unused)), void *v_paramp) +-{ +- DLOOP_Offset size, el_size; +- struct MPIR_contig_blocks_params *paramp = v_paramp; +- +- DLOOP_Assert(*blocks_p > 0); +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- size = *blocks_p * el_size; +- +-#ifdef MPID_SP_VERBOSE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "contig count block: count = %d, buf+off = %d, lastloc = " +- DLOOP_OFFSET_FMT_DEC_SPEC "\n", (int) paramp->count, +- (int) ((char *) bufp + rel_off), paramp->last_loc)); +-#endif +- +- if (paramp->count > 0 && rel_off == paramp->last_loc) { +- /* this region is adjacent to the last */ +- paramp->last_loc += size; +- } else { +- /* new region */ +- paramp->last_loc = rel_off + size; +- paramp->count++; +- } +- return 0; +-} +- +-/* DLOOP_Leaf_vector_count_block +- * +- * Input Parameters: +- * blocks_p - [inout] pointer to a count of blocks (total, for all noncontiguous pieces) +- * count - # of noncontiguous regions +- * blksz - size of each noncontiguous region +- * stride - distance in bytes from start of one region to start of next +- * el_type - elemental type (e.g. MPI_INT) +- * ... +- * +- * Note: this is only called when the starting position is at the beginning +- * of a whole block in a vector type. +- */ +-static int DLOOP_Leaf_vector_count_block(DLOOP_Offset * blocks_p, DLOOP_Count count, DLOOP_Count blksz, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, /* offset into buffer */ +- void *bufp ATTRIBUTE((unused)), void *v_paramp) +-{ +- DLOOP_Count new_blk_count; +- DLOOP_Offset size, el_size; +- struct MPIR_contig_blocks_params *paramp = v_paramp; +- +- DLOOP_Assert(count > 0 && blksz > 0 && *blocks_p > 0); +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- size = el_size * blksz; +- new_blk_count = count; +- +- /* if size == stride, then blocks are adjacent to one another */ +- if (size == stride) +- new_blk_count = 1; +- +- if (paramp->count > 0 && rel_off == paramp->last_loc) { +- /* first block sits at end of last block */ +- new_blk_count--; +- } +- +- paramp->last_loc = rel_off + ((DLOOP_Offset) (count - 1)) * stride + size; +- paramp->count += new_blk_count; +- return 0; +-} +- +-/* DLOOP_Leaf_blkidx_count_block +- * +- * Note: this is only called when the starting position is at the +- * beginning of a whole block in a blockindexed type. +- */ +-static int DLOOP_Leaf_blkidx_count_block(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blksz, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- void *bufp ATTRIBUTE((unused)), void *v_paramp) +-{ +- DLOOP_Count i, new_blk_count; +- DLOOP_Offset size, el_size, last_loc; +- struct MPIR_contig_blocks_params *paramp = v_paramp; +- +- DLOOP_Assert(count > 0 && blksz > 0 && *blocks_p > 0); +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- size = el_size * (DLOOP_Offset) blksz; +- new_blk_count = count; +- +- if (paramp->count > 0 && ((rel_off + offsetarray[0]) == paramp->last_loc)) { +- /* first block sits at end of last block */ +- new_blk_count--; +- } +- +- last_loc = rel_off + offsetarray[0] + size; +- for (i = 1; i < count; i++) { +- if (last_loc == rel_off + offsetarray[i]) +- new_blk_count--; +- +- last_loc = rel_off + offsetarray[i] + size; +- } +- +- paramp->last_loc = last_loc; +- paramp->count += new_blk_count; +- return 0; +-} +- +-/* DLOOP_Leaf_index_count_block +- * +- * Note: this is only called when the starting position is at the +- * beginning of a whole block in an indexed type. +- */ +-static int DLOOP_Leaf_index_count_block(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count * blockarray, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- void *bufp ATTRIBUTE((unused)), void *v_paramp) +-{ +- DLOOP_Count new_blk_count; +- DLOOP_Offset el_size, last_loc; +- struct MPIR_contig_blocks_params *paramp = v_paramp; +- +- DLOOP_Assert(count > 0 && *blocks_p > 0); +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- new_blk_count = count; +- +- if (paramp->count > 0 && ((rel_off + offsetarray[0]) == paramp->last_loc)) { +- /* first block sits at end of last block */ +- new_blk_count--; +- } +- +- /* Note: when we build an indexed type we combine adjacent regions, +- * so we're not going to go through and check every piece +- * separately here. if someone else were building indexed +- * dataloops by hand, then the loop here might be necessary. +- * DLOOP_Count i and DLOOP_Offset size would need to be +- * declared above. +- */ +-#if 0 +- last_loc = rel_off * offsetarray[0] + ((DLOOP_Offset) blockarray[0]) * el_size; +- for (i = 1; i < count; i++) { +- if (last_loc == rel_off + offsetarray[i]) +- new_blk_count--; +- +- last_loc = rel_off + offsetarray[i] + ((DLOOP_Offset) blockarray[i]) * el_size; +- } +-#else +- last_loc = rel_off + offsetarray[count - 1] + ((DLOOP_Offset) blockarray[count - 1]) * el_size; +-#endif +- +- paramp->last_loc = last_loc; +- paramp->count += new_blk_count; +- return 0; +-} +- +-/* +- * Local variables: +- * c-indent-tabs-mode: nil +- * End: +- */ +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/segment_flatten.c ++++ /dev/null +@@ -1,407 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +- +-#include +-#include +-#include +-#include +- +-/* NOTE: I don't think I've removed the need for bufp in here yet! -- RobR */ +- +-static int DLOOP_Leaf_contig_mpi_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +-static int DLOOP_Leaf_vector_mpi_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blksz, +- DLOOP_Offset stride, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +-static int DLOOP_Leaf_blkidx_mpi_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blksz, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +-static int DLOOP_Leaf_index_mpi_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count * blockarray, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +- +-struct MPIDU_mpi_flatten_params { +- int index; +- MPI_Aint length; +- MPI_Aint last_end; +- MPI_Aint *blklens; +- MPI_Aint *disps; +-}; +- +-/* MPIR_Segment_mpi_flatten - flatten a type into a representation +- * appropriate for passing to hindexed create. +- * +- * NOTE: blocks will be in units of bytes when returned. +- * +- * WARNING: there's potential for overflow here as we convert from +- * various types into an index of bytes. +- * +- * Parameters: +- * segp - pointer to segment structure +- * first - first byte in segment to pack +- * lastp - in/out parameter describing last byte to pack (and afterwards +- * the last byte _actually_ packed) +- * NOTE: actually returns index of byte _after_ last one packed +- * blklens, disps - the usual blocklength and displacement arrays for MPI +- * lengthp - in/out parameter describing length of array (and afterwards +- * the amount of the array that has actual data) +- */ +-void MPIR_Segment_mpi_flatten(DLOOP_Segment * segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, +- DLOOP_Size * blklens, MPI_Aint * disps, DLOOP_Size * lengthp) +-{ +- struct MPIDU_mpi_flatten_params params; +- +- DLOOP_Assert(*lengthp > 0); +- +- params.index = 0; +- params.length = *lengthp; +- params.blklens = blklens; +- params.disps = disps; +- +- MPIR_Segment_manipulate(segp, +- first, +- lastp, +- DLOOP_Leaf_contig_mpi_flatten, +- DLOOP_Leaf_vector_mpi_flatten, +- DLOOP_Leaf_blkidx_mpi_flatten, +- DLOOP_Leaf_index_mpi_flatten, NULL, ¶ms); +- +- /* last value already handled by MPIR_Segment_manipulate */ +- *lengthp = params.index; +- return; +-} +- +-/* PIECE FUNCTIONS BELOW */ +- +-/* DLOOP_Leaf_contig_mpi_flatten +- * +- */ +-static int DLOOP_Leaf_contig_mpi_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp) +-{ +- int last_idx; +- DLOOP_Offset size; +- DLOOP_Offset el_size; +- char *last_end = NULL; +- struct MPIDU_mpi_flatten_params *paramp = v_paramp; +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- size = *blocks_p * el_size; +- +- last_idx = paramp->index - 1; +- if (last_idx >= 0) { +- /* Since disps can be negative, we cannot use +- * DLOOP_Ensure_Offset_fits_in_pointer to verify that disps + +- * blklens fits in a pointer. Just let it truncate, if the +- * sizeof a pointer is less than the sizeof an MPI_Aint. +- */ +- last_end = (char *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (paramp->disps[last_idx] + ((DLOOP_Offset) paramp->blklens[last_idx])); +- } +- +- /* Since bufp can be a displacement and can be negative, we cannot +- * use DLOOP_Ensure_Offset_fits_in_pointer to ensure the sum fits in +- * a pointer. Just let it truncate. +- */ +- if ((last_idx == paramp->length - 1) && (last_end != ((char *) bufp + rel_off))) { +- /* we have used up all our entries, and this region doesn't fit on +- * the end of the last one. setting blocks to 0 tells manipulation +- * function that we are done (and that we didn't process any blocks). +- */ +- *blocks_p = 0; +- return 1; +- } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off))) { +- /* add this size to the last vector rather than using up another one */ +- paramp->blklens[last_idx] += size; +- } else { +- /* Since bufp can be a displacement and can be negative, we cannot use +- * DLOOP_VOID_PTR_CAST_TO_OFFSET to cast the sum to a pointer. Just let it +- * sign extend. +- */ +- paramp->disps[last_idx + 1] = DLOOP_PTR_DISP_CAST_TO_OFFSET bufp + rel_off; +- paramp->blklens[last_idx + 1] = size; +- paramp->index++; +- } +- return 0; +-} +- +-/* DLOOP_Leaf_vector_mpi_flatten +- * +- * Input Parameters: +- * blocks_p - [inout] pointer to a count of blocks (total, for all noncontiguous pieces) +- * count - # of noncontiguous regions +- * blksz - size of each noncontiguous region +- * stride - distance in bytes from start of one region to start of next +- * el_type - elemental type (e.g. MPI_INT) +- * ... +- * +- * Note: this is only called when the starting position is at the beginning +- * of a whole block in a vector type. +- * +- * TODO: MAKE THIS CODE SMARTER, USING THE SAME GENERAL APPROACH AS IN THE +- * COUNT BLOCK CODE ABOVE. +- */ +-static int DLOOP_Leaf_vector_mpi_flatten(DLOOP_Offset * blocks_p, DLOOP_Count count, DLOOP_Count blksz, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, /* offset into buffer */ +- void *bufp, /* start of buffer */ +- void *v_paramp) +-{ +- int i; +- DLOOP_Size size, blocks_left; +- DLOOP_Offset el_size; +- struct MPIDU_mpi_flatten_params *paramp = v_paramp; +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- blocks_left = *blocks_p; +- +- DLOOP_Assert(el_size != 0); +- +- for (i = 0; i < count && blocks_left > 0; i++) { +- int last_idx; +- char *last_end = NULL; +- +- if (blocks_left > blksz) { +- size = blksz * el_size; +- blocks_left -= blksz; +- } else { +- /* last pass */ +- size = blocks_left * el_size; +- blocks_left = 0; +- } +- +- last_idx = paramp->index - 1; +- if (last_idx >= 0) { +- /* Since disps can be negative, we cannot use +- * DLOOP_Ensure_Offset_fits_in_pointer to verify that disps + +- * blklens fits in a pointer. Nor can we use +- * DLOOP_OFFSET_CAST_TO_VOID_PTR to cast the sum to a pointer. +- * Just let it truncate, if the sizeof a pointer is less +- * than the sizeof an MPI_Aint. +- */ +- last_end = (char *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (paramp->disps[last_idx] + (MPI_Aint) (paramp->blklens[last_idx])); +- } +- +- /* Since bufp can be a displacement and can be negative, we cannot use +- * DLOOP_Ensure_Offset_fits_in_pointer to ensure the sum fits in a pointer. +- * Just let it truncate. +- */ +- if ((last_idx == paramp->length - 1) && (last_end != ((char *) bufp + rel_off))) { +- /* we have used up all our entries, and this one doesn't fit on +- * the end of the last one. +- */ +- *blocks_p -= (blocks_left + (size / el_size)); +-#ifdef MPID_SP_VERBOSE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\t[vector to vec exiting (1): next ind = %d, " +- DLOOP_OFFSET_FMT_DEC_SPEC " blocks processed.\n", +- paramp->u.pack_vector.index, *blocks_p)); +-#endif +- return 1; +- } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off))) { +- /* add this size to the last vector rather than using up new one */ +- paramp->blklens[last_idx] += size; +- } else { +- /* Since bufp can be a displacement and can be negative, we cannot use +- * DLOOP_VOID_PTR_CAST_TO_OFFSET to cast the sum to a pointer. Just let it +- * sign extend. +- */ +- paramp->disps[last_idx + 1] = DLOOP_PTR_DISP_CAST_TO_OFFSET bufp + rel_off; +- paramp->blklens[last_idx + 1] = size; +- paramp->index++; +- } +- +- rel_off += stride; +- } +- +-#ifdef MPID_SP_VERBOSE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\t[vector to vec exiting (2): next ind = %d, " DLOOP_OFFSET_FMT_DEC_SPEC +- " blocks processed.\n", paramp->u.pack_vector.index, *blocks_p)); +-#endif +- +- /* if we get here then we processed ALL the blocks; don't need to update +- * blocks_p +- */ +- +- DLOOP_Assert(blocks_left == 0); +- return 0; +-} +- +-static int DLOOP_Leaf_blkidx_mpi_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blksz, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp) +-{ +- int i; +- DLOOP_Size blocks_left, size; +- DLOOP_Offset el_size; +- struct MPIDU_mpi_flatten_params *paramp = v_paramp; +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- blocks_left = *blocks_p; +- +- DLOOP_Assert(el_size != 0); +- +- for (i = 0; i < count && blocks_left > 0; i++) { +- int last_idx; +- char *last_end = NULL; +- +- if (blocks_left > blksz) { +- size = blksz * el_size; +- blocks_left -= blksz; +- } else { +- /* last pass */ +- size = blocks_left * el_size; +- blocks_left = 0; +- } +- +- last_idx = paramp->index - 1; +- if (last_idx >= 0) { +- /* Since disps can be negative, we cannot use +- * DLOOP_Ensure_Offset_fits_in_pointer to verify that disps + +- * blklens fits in a pointer. Nor can we use +- * DLOOP_OFFSET_CAST_TO_VOID_PTR to cast the sum to a pointer. +- * Just let it truncate, if the sizeof a pointer is less +- * than the sizeof an MPI_Aint. +- */ +- last_end = (char *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (paramp->disps[last_idx] + ((DLOOP_Offset) paramp->blklens[last_idx])); +- } +- +- /* Since bufp can be a displacement and can be negative, we +- * cannot use DLOOP_Ensure_Offset_fits_in_pointer to ensure the +- * sum fits in a pointer. Just let it truncate. +- */ +- if ((last_idx == paramp->length - 1) && +- (last_end != ((char *) bufp + rel_off + offsetarray[i]))) { +- /* we have used up all our entries, and this one doesn't fit on +- * the end of the last one. +- */ +- *blocks_p -= ((DLOOP_Offset) blocks_left + (((DLOOP_Offset) size) / el_size)); +- return 1; +- } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off + offsetarray[i]))) { +- /* add this size to the last vector rather than using up new one */ +- paramp->blklens[last_idx] += size; +- } else { +- /* Since bufp can be a displacement and can be negative, we cannot +- * use DLOOP_VOID_PTR_CAST_TO_OFFSET to cast the sum to a pointer. +- * Just let it sign extend. +- */ +- paramp->disps[last_idx + 1] = DLOOP_PTR_DISP_CAST_TO_OFFSET bufp + +- rel_off + offsetarray[i]; +- paramp->blklens[last_idx + 1] = size; +- paramp->index++; +- } +- } +- +- /* if we get here then we processed ALL the blocks; don't need to update +- * blocks_p +- */ +- DLOOP_Assert(blocks_left == 0); +- return 0; +-} +- +-static int DLOOP_Leaf_index_mpi_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count * blockarray, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp) +-{ +- int i; +- DLOOP_Size size, blocks_left; +- DLOOP_Offset el_size; +- struct MPIDU_mpi_flatten_params *paramp = v_paramp; +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- blocks_left = *blocks_p; +- +- DLOOP_Assert(el_size != 0); +- +- for (i = 0; i < count && blocks_left > 0; i++) { +- int last_idx; +- char *last_end = NULL; +- +- if (blocks_left > blockarray[i]) { +- size = blockarray[i] * el_size; +- blocks_left -= blockarray[i]; +- } else { +- /* last pass */ +- size = blocks_left * el_size; +- blocks_left = 0; +- } +- +- last_idx = paramp->index - 1; +- if (last_idx >= 0) { +- /* Since disps can be negative, we cannot use +- * DLOOP_Ensure_Offset_fits_in_pointer to verify that disps + +- * blklens fits in a pointer. Nor can we use +- * DLOOP_OFFSET_CAST_TO_VOID_PTR to cast the sum to a pointer. +- * Just let it truncate, if the sizeof a pointer is less +- * than the sizeof an MPI_Aint. +- */ +- last_end = (char *) DLOOP_OFFSET_CAST_TO_VOID_PTR +- (paramp->disps[last_idx] + (MPI_Aint) (paramp->blklens[last_idx])); +- } +- +- /* Since bufp can be a displacement and can be negative, we +- * cannot use DLOOP_Ensure_Offset_fits_in_pointer to ensure the +- * sum fits in a pointer. Just let it truncate. +- */ +- if ((last_idx == paramp->length - 1) && +- (last_end != ((char *) bufp + rel_off + offsetarray[i]))) { +- /* we have used up all our entries, and this one doesn't fit on +- * the end of the last one. +- */ +- *blocks_p -= (blocks_left + (size / el_size)); +- return 1; +- } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off + offsetarray[i]))) { +- /* add this size to the last vector rather than using up new one */ +- paramp->blklens[last_idx] += size; +- } else { +- /* Since bufp can be a displacement and can be negative, we cannot +- * use DLOOP_VOID_PTR_CAST_TO_OFFSET to cast the sum to a pointer. +- * Just let it sign extend. +- */ +- paramp->disps[last_idx + 1] = DLOOP_PTR_DISP_CAST_TO_OFFSET bufp + +- rel_off + offsetarray[i]; +- paramp->blklens[last_idx + 1] = size; /* these blocks are in bytes */ +- paramp->index++; +- } +- } +- +- /* if we get here then we processed ALL the blocks; don't need to update +- * blocks_p +- */ +- DLOOP_Assert(blocks_left == 0); +- return 0; +-} +- +-/* +- * Local variables: +- * c-indent-tabs-mode: nil +- * End: +- */ +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/subarray_support.c ++++ /dev/null +@@ -1,119 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * Copyright (C) 1997 University of Chicago. +- * See COPYRIGHT notice in top-level directory. +- * +- * Note: This code originally appeared in ROMIO. +- */ +- +-#include "mpiimpl.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Type_convert_subarray +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Type_convert_subarray(int ndims, +- int *array_of_sizes, +- int *array_of_subsizes, +- int *array_of_starts, +- int order, MPI_Datatype oldtype, MPI_Datatype * newtype) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPI_Aint extent, disps[3], size; +- int i, blklens[3]; +- MPI_Datatype tmp1, tmp2, types[3]; +- +- MPIR_Datatype_get_extent_macro(oldtype, extent); +- +- if (order == MPI_ORDER_FORTRAN) { +- /* dimension 0 changes fastest */ +- if (ndims == 1) { +- mpi_errno = MPIR_Type_contiguous_impl(array_of_subsizes[0], oldtype, &tmp1); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } else { +- mpi_errno = MPIR_Type_vector_impl(array_of_subsizes[1], +- array_of_subsizes[0], +- array_of_sizes[0], oldtype, &tmp1); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- size = (MPI_Aint) (array_of_sizes[0]) * extent; +- for (i = 2; i < ndims; i++) { +- size *= (MPI_Aint) (array_of_sizes[i - 1]); +- mpi_errno = MPIR_Type_hvector_impl(array_of_subsizes[i], 1, size, tmp1, &tmp2); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_Type_free_impl(&tmp1); +- tmp1 = tmp2; +- } +- } +- +- /* add displacement and UB */ +- disps[1] = (MPI_Aint) (array_of_starts[0]); +- size = 1; +- for (i = 1; i < ndims; i++) { +- size *= (MPI_Aint) (array_of_sizes[i - 1]); +- disps[1] += size * (MPI_Aint) (array_of_starts[i]); +- } +- /* rest done below for both Fortran and C order */ +- } +- +- else { /* order == MPI_ORDER_C */ +- +- /* dimension ndims-1 changes fastest */ +- if (ndims == 1) { +- mpi_errno = MPIR_Type_contiguous_impl(array_of_subsizes[0], oldtype, &tmp1); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } else { +- mpi_errno = MPIR_Type_vector_impl(array_of_subsizes[ndims - 2], +- array_of_subsizes[ndims - 1], +- array_of_sizes[ndims - 1], oldtype, &tmp1); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- size = (MPI_Aint) (array_of_sizes[ndims - 1]) * extent; +- for (i = ndims - 3; i >= 0; i--) { +- size *= (MPI_Aint) (array_of_sizes[i + 1]); +- mpi_errno = MPIR_Type_hvector_impl(array_of_subsizes[i], 1, size, tmp1, &tmp2); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_Type_free_impl(&tmp1); +- tmp1 = tmp2; +- } +- } +- +- /* add displacement and UB */ +- disps[1] = (MPI_Aint) (array_of_starts[ndims - 1]); +- size = 1; +- for (i = ndims - 2; i >= 0; i--) { +- size *= (MPI_Aint) (array_of_sizes[i + 1]); +- disps[1] += size * (MPI_Aint) (array_of_starts[i]); +- } +- } +- +- disps[1] *= extent; +- +- disps[2] = extent; +- for (i = 0; i < ndims; i++) +- disps[2] *= (MPI_Aint) (array_of_sizes[i]); +- +- disps[0] = 0; +- blklens[0] = blklens[1] = blklens[2] = 1; +- types[0] = MPI_LB; +- types[1] = tmp1; +- types[2] = MPI_UB; +- +- mpi_errno = MPIR_Type_struct_impl(3, blklens, disps, types, newtype); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIR_Type_free_impl(&tmp1); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/typesize_support.c ++++ /dev/null +@@ -1,1014 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-/* Notes: +- * - Not used my MPICH +- * - "alignsz" value for non-structs is based simply on element +- * size. This seems nonintuitive, but so far is working for +- * MPICH. If we start to get weird alignment problems with +- * complex structs of non-basics, that would be a place to look. +- * - Depends on configure tests that define (if available): +- * HAVE_LONG_LONG_INT +- * HAVE_LONG_DOUBLE +- */ +- +-#include "mpiimpl.h" +-#include "typesize_support.h" +- +-static void DLOOP_Type_calc_footprint_struct(MPI_Datatype type, +- int combiner, +- int *ints, +- MPI_Aint * aints, +- MPI_Datatype * types, DLOOP_Type_footprint * tfp); +-static int DLOOP_Named_type_alignsize(MPI_Datatype type, MPI_Aint disp); +-static int DLOOP_Structalign_integer_max(void); +-static int DLOOP_Structalign_float_max(void); +-static int DLOOP_Structalign_double_max(void); +-static int DLOOP_Structalign_long_double_max(void); +-static int DLOOP_Structalign_double_position(void); +-static int DLOOP_Structalign_llint_position(void); +- +-/* LB/UB calculation helper macros, from MPICH */ +- +-/* DLOOP_DATATYPE_CONTIG_LB_UB() +- * +- * Determines the new LB and UB for a block of old types given the +- * old type's LB, UB, and extent, and a count of these types in the +- * block. +- * +- * Note: if the displacement is non-zero, the DLOOP_DATATYPE_BLOCK_LB_UB() +- * should be used instead (see below). +- */ +-#define DLOOP_DATATYPE_CONTIG_LB_UB(cnt_, \ +- old_lb_, \ +- old_ub_, \ +- old_extent_, \ +- lb_, \ +- ub_) \ +- { \ +- if (cnt_ == 0) { \ +- lb_ = old_lb_; \ +- ub_ = old_ub_; \ +- } \ +- else if (old_ub_ >= old_lb_) { \ +- lb_ = old_lb_; \ +- ub_ = old_ub_ + (old_extent_) * (cnt_ - 1); \ +- } \ +- else /* negative extent */ { \ +- lb_ = old_lb_ + (old_extent_) * (cnt_ - 1); \ +- ub_ = old_ub_; \ +- } \ +- } +- +-/* DLOOP_DATATYPE_VECTOR_LB_UB() +- * +- * Determines the new LB and UB for a vector of blocks of old types +- * given the old type's LB, UB, and extent, and a count, stride, and +- * blocklen describing the vectorization. +- */ +-#define DLOOP_DATATYPE_VECTOR_LB_UB(cnt_, \ +- stride_, \ +- blklen_, \ +- old_lb_, \ +- old_ub_, \ +- old_extent_, \ +- lb_, \ +- ub_) \ +- { \ +- if (cnt_ == 0 || blklen_ == 0) { \ +- lb_ = old_lb_; \ +- ub_ = old_ub_; \ +- } \ +- else if (stride_ >= 0 && (old_extent_) >= 0) { \ +- lb_ = old_lb_; \ +- ub_ = old_ub_ + (old_extent_) * ((blklen_) - 1) + \ +- (stride_) * ((cnt_) - 1); \ +- } \ +- else if (stride_ < 0 && (old_extent_) >= 0) { \ +- lb_ = old_lb_ + (stride_) * ((cnt_) - 1); \ +- ub_ = old_ub_ + (old_extent_) * ((blklen_) - 1); \ +- } \ +- else if (stride_ >= 0 && (old_extent_) < 0) { \ +- lb_ = old_lb_ + (old_extent_) * ((blklen_) - 1); \ +- ub_ = old_ub_ + (stride_) * ((cnt_) - 1); \ +- } \ +- else { \ +- lb_ = old_lb_ + (old_extent_) * ((blklen_) - 1) + \ +- (stride_) * ((cnt_) - 1); \ +- ub_ = old_ub_; \ +- } \ +- } +- +-/* DLOOP_DATATYPE_BLOCK_LB_UB() +- * +- * Determines the new LB and UB for a block of old types given the LB, +- * UB, and extent of the old type as well as a new displacement and count +- * of types. +- * +- * Note: we need the extent here in addition to the lb and ub because the +- * extent might have some padding in it that we need to take into account. +- */ +-#define DLOOP_DATATYPE_BLOCK_LB_UB(cnt_, \ +- disp_, \ +- old_lb_, \ +- old_ub_, \ +- old_extent_, \ +- lb_, \ +- ub_) \ +- { \ +- if (cnt_ == 0) { \ +- lb_ = old_lb_ + (disp_); \ +- ub_ = old_ub_ + (disp_); \ +- } \ +- else if (old_ub_ >= old_lb_) { \ +- lb_ = old_lb_ + (disp_); \ +- ub_ = old_ub_ + (disp_) + (old_extent_) * ((cnt_) - 1); \ +- } \ +- else /* negative extent */ { \ +- lb_ = old_lb_ + (disp_) + (old_extent_) * ((cnt_) - 1); \ +- ub_ = old_ub_ + (disp_); \ +- } \ +- } +- +-void MPIDU_Type_calc_footprint(MPI_Datatype type, DLOOP_Type_footprint * tfp) +-{ +- int mpi_errno; +- int nr_ints, nr_aints, nr_types, combiner; +- int *ints; +- MPI_Aint *aints; +- MPI_Datatype *types; +- +- /* used to store parameters for constituent types */ +- DLOOP_Offset size = 0, lb = 0, ub = 0, true_lb = 0, true_ub = 0; +- DLOOP_Offset extent = 0, alignsz; +- int has_sticky_lb, has_sticky_ub; +- +- /* used for vector/hvector/hvector_integer calculations */ +- DLOOP_Offset stride; +- +- /* used for indexed/hindexed calculations */ +- DLOOP_Offset disp; +- +- /* used for calculations on types with more than one block of data */ +- DLOOP_Offset i, min_lb, max_ub, ntypes, tmp_lb, tmp_ub; +- +- /* used for processing subarray and darray types */ +- int ndims; +- MPI_Datatype tmptype; +- +- MPIR_Type_get_envelope(type, &nr_ints, &nr_aints, &nr_types, &combiner); +- +- if (combiner == MPI_COMBINER_NAMED) { +- int mpisize; +- MPI_Aint mpiextent; +- +- MPIR_Datatype_get_size_macro(type, mpisize); +- MPIR_Datatype_get_extent_macro(type, mpiextent); +- tfp->size = (DLOOP_Offset) mpisize; +- tfp->lb = 0; +- tfp->ub = (DLOOP_Offset) mpiextent; +- tfp->true_lb = 0; +- tfp->true_ub = (DLOOP_Offset) mpiextent; +- tfp->extent = (DLOOP_Offset) mpiextent; +- tfp->alignsz = DLOOP_Named_type_alignsize(type, (MPI_Aint) 0); +- tfp->has_sticky_lb = (type == MPI_LB) ? 1 : 0; +- tfp->has_sticky_ub = (type == MPI_UB) ? 1 : 0; +- +- goto clean_exit; +- } +- +- /* get access to contents; need it immediately to check for zero count */ +- MPIDU_Type_access_contents(type, &ints, &aints, &types); +- +- /* knock out all the zero count cases */ +- if ((combiner == MPI_COMBINER_CONTIGUOUS || +- combiner == MPI_COMBINER_VECTOR || +- combiner == MPI_COMBINER_HVECTOR_INTEGER || +- combiner == MPI_COMBINER_HVECTOR || +- combiner == MPI_COMBINER_INDEXED_BLOCK || +- combiner == MPI_COMBINER_HINDEXED_BLOCK || +- combiner == MPI_COMBINER_INDEXED || +- combiner == MPI_COMBINER_HINDEXED_INTEGER || +- combiner == MPI_COMBINER_STRUCT_INTEGER || +- combiner == MPI_COMBINER_STRUCT) && ints[0] == 0) { +- tfp->size = tfp->lb = tfp->ub = tfp->extent = tfp->alignsz = 0; +- tfp->true_lb = tfp->true_ub = 0; +- tfp->has_sticky_lb = tfp->has_sticky_ub = 0; +- goto clean_exit; +- } +- +- if (combiner != MPI_COMBINER_STRUCT && combiner != MPI_COMBINER_STRUCT_INTEGER) { +- DLOOP_Type_footprint cfp; +- +- MPIDU_Type_calc_footprint(types[0], &cfp); +- size = cfp.size; +- lb = cfp.lb; +- ub = cfp.ub; +- true_lb = cfp.true_lb; +- true_ub = cfp.true_ub; +- extent = cfp.extent; +- alignsz = cfp.alignsz; +- has_sticky_lb = cfp.has_sticky_lb; +- has_sticky_ub = cfp.has_sticky_ub; +- +- /* initialize some common values so we don't have to assign +- * them in every case below. +- */ +- tfp->alignsz = alignsz; +- tfp->has_sticky_lb = has_sticky_lb; +- tfp->has_sticky_ub = has_sticky_ub; +- +- } +- +- switch (combiner) { +- case MPI_COMBINER_DUP: +- tfp->size = size; +- tfp->lb = lb; +- tfp->ub = ub; +- tfp->true_lb = true_lb; +- tfp->true_ub = true_ub; +- tfp->extent = extent; +- break; +- case MPI_COMBINER_RESIZED: +- tfp->size = size; +- tfp->lb = aints[0]; /* lb */ +- tfp->ub = aints[0] + aints[1]; +- tfp->true_lb = true_lb; +- tfp->true_ub = true_ub; +- tfp->extent = aints[1]; /* extent */ +- tfp->has_sticky_lb = 1; +- tfp->has_sticky_ub = 1; +- break; +- case MPI_COMBINER_CONTIGUOUS: +- DLOOP_DATATYPE_CONTIG_LB_UB(ints[0] /* count */ , +- lb, ub, extent, tfp->lb, tfp->ub); +- tfp->true_lb = tfp->lb + (true_lb - lb); +- tfp->true_ub = tfp->ub + (true_ub - ub); +- tfp->size = (DLOOP_Offset) ints[0] * size; +- tfp->extent = tfp->ub - tfp->lb; +- break; +- case MPI_COMBINER_VECTOR: +- case MPI_COMBINER_HVECTOR: +- case MPI_COMBINER_HVECTOR_INTEGER: +- if (combiner == MPI_COMBINER_VECTOR) +- stride = (DLOOP_Offset) ints[2] * extent; +- else if (combiner == MPI_COMBINER_HVECTOR) +- stride = aints[0]; +- else /* HVECTOR_INTEGER */ +- stride = (DLOOP_Offset) ints[2]; +- +- DLOOP_DATATYPE_VECTOR_LB_UB(ints[0] /* count */ , +- stride /* stride in bytes */ , +- ints[1] /* blklen */ , +- lb, ub, extent, tfp->lb, tfp->ub); +- tfp->true_lb = tfp->lb + (true_lb - lb); +- tfp->true_ub = tfp->ub + (true_ub - ub); +- tfp->size = (DLOOP_Offset) ints[0] * (DLOOP_Offset) ints[1] * size; +- tfp->extent = tfp->ub - tfp->lb; +- break; +- case MPI_COMBINER_INDEXED_BLOCK: +- /* prime min_lb and max_ub */ +- DLOOP_DATATYPE_BLOCK_LB_UB(ints[1] /* blklen */ , +- (DLOOP_Offset) ints[2] * extent /* disp */ , +- lb, ub, extent, min_lb, max_ub); +- +- for (i = 1; i < ints[0]; i++) { +- DLOOP_DATATYPE_BLOCK_LB_UB(ints[1] /* blklen */ , +- (DLOOP_Offset) ints[i + 2] * extent /* disp */ , +- lb, ub, extent, tmp_lb, tmp_ub); +- if (tmp_lb < min_lb) +- min_lb = tmp_lb; +- if (tmp_ub > max_ub) +- max_ub = tmp_ub; +- } +- tfp->size = (DLOOP_Offset) ints[0] * (DLOOP_Offset) ints[1] * size; +- tfp->lb = min_lb; +- tfp->ub = max_ub; +- tfp->true_lb = min_lb + (true_lb - lb); +- tfp->true_ub = max_ub + (true_ub - ub); +- tfp->extent = tfp->ub - tfp->lb; +- break; +- case MPI_COMBINER_HINDEXED_BLOCK: +- /* prime min_lb and max_ub */ +- DLOOP_DATATYPE_BLOCK_LB_UB(ints[1] /* blklen */ , +- (DLOOP_Offset) ints[2] /* disp */ , +- lb, ub, extent, min_lb, max_ub); +- +- for (i = 1; i < ints[0]; i++) { +- DLOOP_DATATYPE_BLOCK_LB_UB(ints[1] /* blklen */ , +- (DLOOP_Offset) ints[i + 2] /* disp */ , +- lb, ub, extent, tmp_lb, tmp_ub); +- if (tmp_lb < min_lb) +- min_lb = tmp_lb; +- if (tmp_ub > max_ub) +- max_ub = tmp_ub; +- } +- tfp->size = (DLOOP_Offset) ints[0] * (DLOOP_Offset) ints[1] * size; +- tfp->lb = min_lb; +- tfp->ub = max_ub; +- tfp->true_lb = min_lb + (true_lb - lb); +- tfp->true_ub = max_ub + (true_ub - ub); +- tfp->extent = tfp->ub - tfp->lb; +- break; +- case MPI_COMBINER_INDEXED: +- case MPI_COMBINER_HINDEXED_INTEGER: +- case MPI_COMBINER_HINDEXED: +- /* find first non-zero blocklength element */ +- for (i = 0; i < ints[0] && ints[i + 1] == 0; i++); +- if (i == ints[0]) { +- /* all zero blocklengths */ +- tfp->size = tfp->lb = tfp->ub = tfp->extent = tfp->alignsz = 0; +- tfp->has_sticky_lb = tfp->has_sticky_ub = 0; +- } else { +- /* prime min_lb, max_ub, count */ +- ntypes = ints[i + 1]; +- if (combiner == MPI_COMBINER_INDEXED) +- disp = (DLOOP_Offset) ints[ints[0] + i + 1] * extent; +- else if (combiner == MPI_COMBINER_HINDEXED_INTEGER) +- disp = (DLOOP_Offset) ints[ints[0] + i + 1]; +- else /* MPI_COMBINER_HINDEXED */ +- disp = aints[i]; +- +- DLOOP_DATATYPE_BLOCK_LB_UB(ints[i + 1] /* blklen */ , +- disp, lb, ub, extent, min_lb, max_ub); +- +- for (i++; i < ints[0]; i++) { +- /* skip zero blocklength elements */ +- if (ints[i + 1] == 0) +- continue; +- +- ntypes += ints[i + 1]; +- if (combiner == MPI_COMBINER_INDEXED) +- disp = (DLOOP_Offset) ints[ints[0] + i + 1] * extent; +- else if (combiner == MPI_COMBINER_HINDEXED_INTEGER) +- disp = (DLOOP_Offset) ints[ints[0] + i + 1]; +- else /* MPI_COMBINER_HINDEXED */ +- disp = aints[i]; +- +- DLOOP_DATATYPE_BLOCK_LB_UB(ints[i + 1], disp, lb, ub, extent, tmp_lb, tmp_ub); +- if (tmp_lb < min_lb) +- min_lb = tmp_lb; +- if (tmp_ub > max_ub) +- max_ub = tmp_ub; +- } +- tfp->size = ntypes * size; +- tfp->lb = min_lb; +- tfp->ub = max_ub; +- tfp->true_lb = min_lb + (true_lb - lb); +- tfp->true_ub = max_ub + (true_ub - ub); +- tfp->extent = tfp->ub - tfp->lb; +- } +- break; +- case MPI_COMBINER_STRUCT_INTEGER: +- DLOOP_Assert(combiner != MPI_COMBINER_STRUCT_INTEGER); +- break; +- case MPI_COMBINER_STRUCT: +- /* sufficiently complicated to pull out into separate fn */ +- DLOOP_Type_calc_footprint_struct(type, combiner, ints, aints, types, tfp); +- break; +- case MPI_COMBINER_SUBARRAY: +- ndims = ints[0]; +- MPIDU_Type_convert_subarray(ndims, &ints[1] /* sizes */ , +- &ints[1 + ndims] /* subsz */ , +- &ints[1 + 2 * ndims] /* strts */ , +- ints[1 + 3 * ndims] /* order */ , +- types[0], &tmptype); +- MPIDU_Type_calc_footprint(tmptype, tfp); +- MPIR_Type_free_impl(&tmptype); +- break; +- case MPI_COMBINER_DARRAY: +- ndims = ints[2]; +- +- MPIDU_Type_convert_darray(ints[0] /* size */ , +- ints[1] /* rank */ , +- ndims, &ints[3] /* gsizes */ , +- &ints[3 + ndims] /*distribs */ , +- &ints[3 + 2 * ndims] /* dargs */ , +- &ints[3 + 3 * ndims] /* psizes */ , +- ints[3 + 4 * ndims] /* order */ , +- types[0], &tmptype); +- +- MPIDU_Type_calc_footprint(tmptype, tfp); +- MPIR_Type_free_impl(&tmptype); +- break; +- case MPI_COMBINER_F90_REAL: +- case MPI_COMBINER_F90_COMPLEX: +- case MPI_COMBINER_F90_INTEGER: +- default: +- DLOOP_Assert(0); +- break; +- } +- +- clean_exit: +- MPIDU_Type_release_contents(type, &ints, &aints, &types); +- return; +-} +- +-/* +- DLOOP_Type_calc_footprint_struct - calculate size, lb, ub, extent, +- and alignsize for a struct type +-*/ +-static void DLOOP_Type_calc_footprint_struct(MPI_Datatype type, +- int struct_combiner, +- int *ints, +- MPI_Aint * aints, +- MPI_Datatype * types, DLOOP_Type_footprint * tfp) +-{ +- int i, found_sticky_lb = 0, found_sticky_ub = 0, first_iter = 1; +- DLOOP_Offset tmp_lb, tmp_ub, tmp_extent, tmp_true_lb, tmp_true_ub; +- DLOOP_Offset max_alignsz = 0, tmp_size = 0, min_lb = 0, max_ub = 0; +- DLOOP_Offset min_true_lb = 0, max_true_ub = 0; +- +- int nr_ints, nr_aints, nr_types, combiner; +- +- /* used to store parameters for constituent types */ +- DLOOP_Type_footprint cfp; +- DLOOP_Offset size, lb, ub, true_lb, true_ub, extent, alignsz; +- int sticky_lb, sticky_ub; +- +- /* find first non-zero blocklength element */ +- for (i = 0; i < ints[0] && ints[i + 1] == 0; i++); +- +- if (i == ints[0]) { /* all zero-length blocks */ +- tfp->size = tfp->lb = tfp->ub = tfp->extent = tfp->alignsz = 0; +- tfp->has_sticky_lb = tfp->has_sticky_ub = 0; +- return; +- } +- +- for (; i < ints[0]; i++) { +- /* skip zero blocklength elements */ +- if (ints[i + 1] == 0) +- continue; +- +- MPIR_Type_get_envelope(types[i], &nr_ints, &nr_aints, &nr_types, &combiner); +- +- /* opt: could just inline assignments for combiner == NAMED case */ +- +- MPIDU_Type_calc_footprint(types[i], &cfp); +- size = cfp.size; +- lb = cfp.lb; +- ub = cfp.ub; +- true_lb = cfp.true_lb; +- true_ub = cfp.true_ub; +- extent = cfp.extent; +- alignsz = cfp.alignsz; +- sticky_lb = cfp.has_sticky_lb; +- sticky_ub = cfp.has_sticky_ub; +- +- DLOOP_DATATYPE_BLOCK_LB_UB(ints[i + 1] /* blklen */ , +- aints[i] /* disp */ , +- lb, ub, extent, tmp_lb, tmp_ub); +- +- tmp_true_lb = tmp_lb + (true_lb - lb); +- tmp_true_ub = tmp_ub + (true_ub - ub); +- tmp_size += size * (DLOOP_Offset) ints[i + 1]; +- +- if (combiner == MPI_COMBINER_NAMED) { +- /* NOTE: This is a special case. If a user creates a struct +- * with a named type at a non-zero displacement, the +- * alignment may be different than expected due to +- * special compiler rules for this case. Thus we must +- * over-ride the value that we obtained from +- * Type_calc_footprint() above. +- */ +- alignsz = DLOOP_Named_type_alignsize(types[i], aints[i]); +- } +- +- if (max_alignsz < alignsz) +- max_alignsz = alignsz; +- +- /* We save this LB if: +- * (1) this is our first iteration where we saw a nonzero blklen, +- * (2) we haven't found a sticky LB and this LB is lower than +- * any we have previously seen, +- * (3) we haven't found a sticky LB and this one is sticky, or +- * (4) this sticky LB is lower than any we have previously seen. +- */ +- if ((first_iter) || +- (!found_sticky_lb && min_lb > tmp_lb) || +- (!found_sticky_lb && sticky_lb) || (sticky_lb && min_lb > tmp_lb)) { +- min_lb = tmp_lb; +- if (sticky_lb) +- found_sticky_lb = 1; +- } +- +- if ((first_iter) || +- (!found_sticky_ub && max_ub < tmp_ub) || +- (!found_sticky_ub && sticky_ub) || (sticky_ub && max_ub < tmp_ub)) { +- max_ub = tmp_ub; +- if (sticky_ub) +- found_sticky_ub = 1; +- } +- +- if ((first_iter) || (tmp_true_lb > min_true_lb)) { +- min_true_lb = tmp_true_lb; +- } +- +- if ((first_iter) || (tmp_true_ub < max_true_ub)) { +- max_true_ub = tmp_true_ub; +- } +- +- first_iter = 0; +- } +- +- /* calculate extent, not including potential padding */ +- tmp_extent = max_ub - min_lb; +- +- /* account for padding if no sticky LB/UB is found */ +- if ((!found_sticky_lb) && (!found_sticky_ub)) { +- DLOOP_Offset epsilon; +- +- epsilon = (max_alignsz > 0) ? tmp_extent % max_alignsz : 0; +- +- if (epsilon) { +- max_ub += (max_alignsz - epsilon); +- tmp_extent = max_ub - min_lb; +- } +- } +- +- tfp->size = tmp_size; +- tfp->lb = min_lb; +- tfp->ub = max_ub; +- tfp->true_lb = min_true_lb; +- tfp->true_ub = max_true_ub; +- tfp->extent = tmp_extent; +- tfp->alignsz = max_alignsz; +- tfp->has_sticky_lb = found_sticky_lb; +- tfp->has_sticky_ub = found_sticky_ub; +- return; +-} +- +-/* +- DLOOP_Named_type_alignsize - calculate alignment in bytes for a struct +- based on constituent elements. +- +- Returns alignment in bytes. +-*/ +-static int DLOOP_Named_type_alignsize(MPI_Datatype type, MPI_Aint disp) +-{ +- int alignsize = 0; +- +- static int havent_tested_align_rules = 1; +- static int max_intalign = 0, max_fpalign = 0; +- static int have_double_pos_align = 0, have_llint_pos_align = 0; +- static int max_doublealign = 0, max_longdoublealign = 0; +- +- if (havent_tested_align_rules) { +- max_intalign = DLOOP_Structalign_integer_max(); +- max_fpalign = DLOOP_Structalign_float_max(); +- max_doublealign = DLOOP_Structalign_double_max(); +- max_longdoublealign = DLOOP_Structalign_long_double_max(); +- have_double_pos_align = DLOOP_Structalign_double_position(); +- have_llint_pos_align = DLOOP_Structalign_llint_position(); +- +- havent_tested_align_rules = 0; +- } +- +- /* skip LBs, UBs, and elements with zero block length */ +- if (type == MPI_LB || type == MPI_UB) +- return 0; +- +- MPIR_Datatype_get_size_macro(type, alignsize); +- +- switch (type) { +- case MPI_FLOAT: +- if (alignsize > max_fpalign) +- alignsize = max_fpalign; +- break; +- case MPI_DOUBLE: +- if (alignsize > max_doublealign) +- alignsize = max_doublealign; +- +- if (have_double_pos_align && disp != (MPI_Aint) 0) +- alignsize = 4; /* would be better to test */ +- break; +- case MPI_LONG_DOUBLE: +- if (alignsize > max_longdoublealign) +- alignsize = max_longdoublealign; +- break; +- default: +- if (alignsize > max_intalign) +- alignsize = max_intalign; +- +- if (have_llint_pos_align && type == MPI_LONG_LONG_INT && disp != (MPI_Aint) 0) { +- alignsize = 4; /* would be better to test */ +- } +- break; +- } +- +- return alignsize; +-} +- +- +-/* INTERNAL STRUCT ALIGNMENT TESTS BELOW */ +- +-/* from MPICH PAC_C_MAX_INTEGER_ALIGN test: +- * +- * Tests for max C struct integer alignment. Note that this is for *all* +- * integer types. +- * +- * Return value is 1, 2, 4, or 8. +- */ +-static int DLOOP_Structalign_integer_max() +-{ +- int is_packed = 1; +- int is_two = 1; +- int is_four = 1; +- int is_eight = 1; +- +- int size, extent; +- +- struct { +- char a; +- int b; +- } char_int; +- struct { +- char a; +- short b; +- } char_short; +- struct { +- char a; +- long b; +- } char_long; +- struct { +- char a; +- int b; +- char c; +- } char_int_char; +- struct { +- char a; +- short b; +- char c; +- } char_short_char; +-#ifdef HAVE_LONG_LONG_INT +- struct { +- long long int a; +- char b; +- } lli_c; +- struct { +- char a; +- long long int b; +- } c_lli; +- int extent2; +-#endif +- +- /* assume max integer alignment isn't 8 if we don't have +- * an eight-byte value. +- */ +-#ifdef HAVE_LONG_LONG_INT +- if (sizeof(int) < 8 && sizeof(long) < 8 && sizeof(long long int) < 8) +- is_eight = 0; +-#else +- if (sizeof(int) < 8 && sizeof(long) < 8) +- is_eight = 0; +-#endif +- +- size = sizeof(char) + sizeof(int); +- extent = sizeof(char_int); +- if (size != extent) +- is_packed = 0; +- if ((extent % 2) != 0) +- is_two = 0; +- if ((extent % 4) != 0) +- is_four = 0; +- if (sizeof(int) == 8 && (extent % 8) != 0) +- is_eight = 0; +- +- size = sizeof(char) + sizeof(short); +- extent = sizeof(char_short); +- if (size != extent) +- is_packed = 0; +- if ((extent % 2) != 0) +- is_two = 0; +- if (sizeof(short) == 4 && (extent % 4) != 0) +- is_four = 0; +- if (sizeof(short) == 8 && (extent % 8) != 0) +- is_eight = 0; +- +- size = sizeof(char) + sizeof(long); +- extent = sizeof(char_long); +- if (size != extent) +- is_packed = 0; +- if ((extent % 2) != 0) +- is_two = 0; +- if ((extent % 4) != 0) +- is_four = 0; +- if (sizeof(long) == 8 && (extent % 8) != 0) +- is_eight = 0; +- +-#ifdef HAVE_LONG_LONG_INT +- size = sizeof(char) + sizeof(long long int); +- extent = sizeof(lli_c); +- extent2 = sizeof(c_lli); +- if (size != extent) +- is_packed = 0; +- if ((extent % 2) != 0 && (extent2 % 2) != 0) +- is_two = 0; +- if ((extent % 4) != 0 && (extent2 % 4) != 0) +- is_four = 0; +- if (sizeof(long long int) >= 8 && (extent % 8) != 0 && (extent2 % 8) != 0) +- is_eight = 0; +-#endif +- +- size = sizeof(char) + sizeof(int) + sizeof(char); +- extent = sizeof(char_int_char); +- if (size != extent) +- is_packed = 0; +- if ((extent % 2) != 0) +- is_two = 0; +- if ((extent % 4) != 0) +- is_four = 0; +- if (sizeof(int) == 8 && (extent % 8) != 0) +- is_eight = 0; +- +- size = sizeof(char) + sizeof(short) + sizeof(char); +- extent = sizeof(char_short_char); +- if (size != extent) +- is_packed = 0; +- if ((extent % 2) != 0) +- is_two = 0; +- if (sizeof(short) == 4 && (extent % 4) != 0) +- is_four = 0; +- if (sizeof(short) == 8 && (extent % 8) != 0) +- is_eight = 0; +- +- if (is_eight) { +- is_four = 0; +- is_two = 0; +- } +- if (is_four) +- is_two = 0; +- +- DLOOP_Assert(is_packed + is_two + is_four + is_eight == 1); +- +- if (is_packed) +- return 1; +- if (is_two) +- return 2; +- if (is_four) +- return 4; +- return 8; +-} +- +-/* from MPICH PAC_C_MAX_FP_ALIGN test: +- * +- * Checks for max C struct floating point alignment. Note that +- * in this test we are *only* testing float types, whereas in +- * the original test we were testing double and long double also. +- * +- * Return value is 1, 2, 4, 8, or 16. +- */ +-static int DLOOP_Structalign_float_max() +-{ +- int is_packed = 1; +- int is_two = 1; +- int is_four = 1; +- int is_eight = 1; +- int is_sixteen = 1; +- struct { +- char a; +- float b; +- } char_float; +- struct { +- float b; +- char a; +- } float_char; +- int size, extent1, extent2; +- +- size = sizeof(char) + sizeof(float); +- extent1 = sizeof(char_float); +- extent2 = sizeof(float_char); +- if (size != extent1) +- is_packed = 0; +- if ((extent1 % 2) != 0 && (extent2 % 2) != 0) +- is_two = 0; +- if ((extent1 % 4) != 0 && (extent2 % 4) != 0) +- is_four = 0; +- if (sizeof(float) == 8 && (extent1 % 8) != 0 && (extent2 % 8) != 0) +- is_eight = 0; +- +- if (is_sixteen) { +- is_eight = 0; +- is_four = 0; +- is_two = 0; +- } +- if (is_eight) { +- is_four = 0; +- is_two = 0; +- } +- if (is_four) +- is_two = 0; +- +- DLOOP_Assert(is_packed + is_two + is_four + is_eight + is_sixteen == 1); +- +- if (is_packed) +- return 1; +- if (is_two) +- return 2; +- if (is_four) +- return 4; +- if (is_eight) +- return 8; +- return 16; +-} +- +-/* from MPICH PAC_C_MAX_DOUBLE_FP_ALIGN test: +- * +- * Determines maximum struct alignment with floats and doubles. +- * +- * Return value is 1, 2, 4, or 8. +- */ +-static int DLOOP_Structalign_double_max() +-{ +- int is_packed = 1; +- int is_two = 1; +- int is_four = 1; +- int is_eight = 1; +- struct { +- char a; +- double b; +- } char_double; +- struct { +- double b; +- char a; +- } double_char; +- int size, extent1, extent2; +- +- size = sizeof(char) + sizeof(double); +- extent1 = sizeof(char_double); +- extent2 = sizeof(double_char); +- if (size != extent1) +- is_packed = 0; +- if ((extent1 % 2) != 0 && (extent2 % 2) != 0) +- is_two = 0; +- if ((extent1 % 4) != 0 && (extent2 % 4) != 0) +- is_four = 0; +- if (sizeof(double) == 8 && (extent1 % 8) != 0 && (extent2 % 8) != 0) +- is_eight = 0; +- +- if (is_eight) { +- is_four = 0; +- is_two = 0; +- } +- if (is_four) +- is_two = 0; +- +- DLOOP_Assert(is_packed + is_two + is_four + is_eight == 1); +- +- if (is_packed) +- return 1; +- if (is_two) +- return 2; +- if (is_four) +- return 4; +- return 8; +-} +- +-/* from MPICH PAC_C_MAX_LONGDOUBLE_FP_ALIGN test: +- * +- * Determines maximum alignment of structs with long doubles. +- * +- * Return value is 1, 2, 4, 8, or 16. +- */ +-static int DLOOP_Structalign_long_double_max() +-{ +- int is_packed = 1; +- int is_two = 1; +- int is_four = 1; +- int is_eight = 1; +- int is_sixteen = 1; +- struct { +- char a; +- long double b; +- } char_long_double; +- struct { +- long double b; +- char a; +- } long_double_char; +- struct { +- long double a; +- int b; +- char c; +- } long_double_int_char; +- int size, extent1, extent2; +- +- size = sizeof(char) + sizeof(long double); +- extent1 = sizeof(char_long_double); +- extent2 = sizeof(long_double_char); +- if (size != extent1) +- is_packed = 0; +- if ((extent1 % 2) != 0 && (extent2 % 2) != 0) +- is_two = 0; +- if ((extent1 % 4) != 0 && (extent2 % 4) != 0) +- is_four = 0; +- if (sizeof(long double) >= 8 && (extent1 % 8) != 0 && (extent2 % 8) != 0) +- is_eight = 0; +- if (sizeof(long double) > 8 && (extent1 % 16) != 0 && (extent2 % 16) != 0) +- is_sixteen = 0; +- +- extent1 = sizeof(long_double_int_char); +- if ((extent1 % 2) != 0) +- is_two = 0; +- if ((extent1 % 4) != 0) +- is_four = 0; +- if (sizeof(long double) >= 8 && (extent1 % 8) != 0) +- is_eight = 0; +- if (sizeof(long double) > 8 && (extent1 % 16) != 0) +- is_sixteen = 0; +- +- if (is_sixteen) { +- is_eight = 0; +- is_four = 0; +- is_two = 0; +- } +- if (is_eight) { +- is_four = 0; +- is_two = 0; +- } +- if (is_four) +- is_two = 0; +- +- DLOOP_Assert(is_packed + is_two + is_four + is_eight + is_sixteen == 1); +- +- if (is_packed) +- return 1; +- if (is_two) +- return 2; +- if (is_four) +- return 4; +- if (is_eight) +- return 8; +- return 16; +-} +- +- +-/* from MPICH PAC_C_DOUBLE_POS_ALIGN test: +- * +- * Test for odd struct alignment rule that only applies max. padding when +- * double value is at front of type. +- * +- * Search for "Power alignment mode" for more details. +- * +- * Return value is 1 or 0. +- */ +-static int DLOOP_Structalign_double_position() +-{ +- int padding_varies_by_pos = 0; +- struct { +- char a; +- double b; +- } char_double; +- struct { +- double b; +- char a; +- } double_char; +- int extent1, extent2; +- +- extent1 = sizeof(char_double); +- extent2 = sizeof(double_char); +- if (extent1 != extent2) +- padding_varies_by_pos = 1; +- +- if (padding_varies_by_pos) +- return 1; +- else +- return 0; +-} +- +-/* from MPICH PAC_C_LLINT_POS_ALIGN test: +- * Test for odd struct alignment rule that only applies max. +- * padding when long long int value is at front of type. +- * +- * Search for "Power alignment mode" for more details. +- * +- * Return value is 1 or 0. +- */ +-static int DLOOP_Structalign_llint_position() +-{ +- int padding_varies_by_pos = 0; +-#ifdef HAVE_LONG_LONG_INT +- struct { +- char a; +- long long int b; +- } char_llint; +- struct { +- long long int b; +- char a; +- } llint_char; +- int extent1, extent2; +- +- extent1 = sizeof(char_llint); +- extent2 = sizeof(llint_char); +- if (extent1 != extent2) +- padding_varies_by_pos = 1; +-#endif +- +- if (padding_varies_by_pos) +- return 1; +- else +- return 0; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/dataloop/typesize_support.h ++++ /dev/null +@@ -1,27 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#ifndef TYPESIZE_SUPPORT_H_INCLUDED +-#define TYPESIZE_SUPPORT_H_INCLUDED +- +-#include "dataloop.h" +- +-#define DLOOP_Type_footprint MPIDU_Type_footprint +- +-typedef struct MPIDU_Type_footprint_s { +- DLOOP_Offset size, extent; +- +- /* these are only needed for calculating footprint of types +- * built using this type. no reason to expose these. +- */ +- DLOOP_Offset lb, ub, alignsz; +- DLOOP_Offset true_lb, true_ub; +- int has_sticky_lb; +- int has_sticky_ub; +-} DLOOP_Type_footprint; +- +-void MPIDU_Type_calc_footprint(MPI_Datatype type, DLOOP_Type_footprint * tfp); +- +-#endif /* TYPESIZE_SUPPORT_H_INCLUDED */ +--- a/src/mpi/datatype/datatype.h ++++ b/src/mpi/datatype/datatype.h +@@ -120,8 +120,6 @@ extern void MPIR_Datatype_iscontig(MPI_Datatype, int *); + /* internal debugging functions */ + void MPII_Datatype_printf(MPI_Datatype type, int depth, MPI_Aint displacement, int blocklength, + int header); +-void MPII_Dataloop_dot_printf(MPIR_Dataloop * loop_p, int depth, int header); +- + void MPII_Datatype_get_contents_ints(MPIR_Datatype_contents * cp, int *user_ints); + void MPII_Datatype_get_contents_aints(MPIR_Datatype_contents * cp, MPI_Aint * user_aints); + void MPII_Datatype_get_contents_types(MPIR_Datatype_contents * cp, MPI_Datatype * user_types); +--- a/src/mpi/datatype/ext32_datatype.c ++++ b/src/mpi/datatype/ext32_datatype.c +@@ -6,7 +6,7 @@ + */ + + #include +-#include ++#include + + #include + #include +--- a/src/mpi/datatype/get_address.c ++++ b/src/mpi/datatype/get_address.c +@@ -28,10 +28,6 @@ int MPI_Get_address(const void *location, MPI_Aint * address) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Get_address +-#undef FCNAME +-#define FCNAME "MPI_Get_address" + + /*@ + MPI_Get_address - Get the address of a location in memory +@@ -100,14 +96,14 @@ int MPI_Get_address(const void *location, MPI_Aint * address) + * standard, I can't tell if this is a compiler bug or a language bug. + */ + #ifdef CHAR_PTR_IS_ADDRESS +- *address = MPIR_VOID_PTR_CAST_TO_MPI_AINT((char *) location); ++ *address = (MPI_Aint) location; + #else + /* Note that this is the "portable" way to generate an address. + * The difference of two pointers is the number of elements + * between them, so this gives the number of chars between location + * and ptr. As long as sizeof(char) represents one byte, + * of bytes from 0 to location */ +- *address = MPIR_VOID_PTR_CAST_TO_MPI_AINT((char *) location - (char *) MPI_BOTTOM); ++ *address = (MPI_Aint) ((char *) location - (char *) MPI_BOTTOM); + #endif + /* The same code is used in MPI_Address */ + +@@ -124,10 +120,10 @@ int MPI_Get_address(const void *location, MPI_Aint * address) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_get_address", "**mpi_get_address %p %p", location, address); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/get_count.c ++++ b/src/mpi/datatype/get_count.c +@@ -25,10 +25,6 @@ int MPI_Get_count(const MPI_Status * status, MPI_Datatype datatype, int *count) + #undef MPI_Get_count + #define MPI_Get_count PMPI_Get_count + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_count_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Get_count_impl(const MPI_Status * status, MPI_Datatype datatype, MPI_Aint * count) + { + MPI_Aint size; +@@ -64,10 +60,6 @@ void MPIR_Get_count_impl(const MPI_Status * status, MPI_Datatype datatype, MPI_A + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Get_count +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Get_count - Gets the number of "top level" elements + +@@ -142,11 +134,11 @@ int MPI_Get_count(const MPI_Status * status, MPI_Datatype datatype, int *count) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_get_count", "**mpi_get_count %p %D %p", status, datatype, + count); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/get_elements.c ++++ b/src/mpi/datatype/get_elements.c +@@ -30,10 +30,6 @@ int MPI_Get_elements(const MPI_Status * status, MPI_Datatype datatype, int *coun + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Get_elements +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Get_elements - Returns the number of basic elements + in a datatype +@@ -125,11 +121,11 @@ int MPI_Get_elements(const MPI_Status * status, MPI_Datatype datatype, int *coun + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_get_elements", "**mpi_get_elements %p %D %p", status, + datatype, count); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/get_elements_x.c ++++ b/src/mpi/datatype/get_elements_x.c +@@ -198,6 +198,7 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_elements(MPI_Count * bytes_p, + case MPI_COMBINER_VECTOR: + case MPI_COMBINER_HVECTOR_INTEGER: + case MPI_COMBINER_HVECTOR: ++ case MPI_COMBINER_SUBARRAY: + /* count is first in ints array */ + return MPIR_Type_get_elements(bytes_p, count * (*ints), *types); + break; +@@ -246,7 +247,6 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_elements(MPI_Count * bytes_p, + } + return nr_elements; + break; +- case MPI_COMBINER_SUBARRAY: + case MPI_COMBINER_DARRAY: + case MPI_COMBINER_F90_REAL: + case MPI_COMBINER_F90_COMPLEX: +@@ -261,10 +261,6 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_elements(MPI_Count * bytes_p, + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_elements_x_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* MPIR_Get_elements_x_impl + * + * Arguments: +@@ -339,10 +335,6 @@ int MPIR_Get_elements_x_impl(MPI_Count * byte_count, MPI_Datatype datatype, MPI_ + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Get_elements_x +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* N.B. "count" is the name mandated by the MPI-3 standard, but it should + * probably be called "elements" instead and is handled that way in the _impl + * routine [goodell@ 2012-11-05 */ +@@ -428,12 +420,12 @@ int MPI_Get_elements_x(const MPI_Status * status, MPI_Datatype datatype, MPI_Cou + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_get_elements_x", "**mpi_get_elements_x %p %D %p", status, + datatype, count); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +deleted file mode 100644 +--- a/src/mpi/datatype/looputil.c ++++ /dev/null +@@ -1,1311 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpiimpl.h" +-#include "datatype.h" +-#include "mpir_dataloop.h" +-#include "looputil.h" +-#include "veccpy.h" +- +-/* MPIR_Segment_piece_params +- * +- * This structure is used to pass function-specific parameters into our +- * segment processing function. This allows us to get additional parameters +- * to the functions it calls without changing the prototype. +- */ +-struct MPIR_Segment_piece_params { +- union { +- struct { +- char *pack_buffer; +- } pack; +- struct { +- DLOOP_VECTOR *vectorp; +- int index; +- int length; +- } pack_vector; +- struct { +- int64_t *offp; +- DLOOP_Size *sizep; /* see notes in Segment_flatten header */ +- int index; +- int length; +- } flatten; +- struct { +- char *last_loc; +- int count; +- } contig_blocks; +- struct { +- char *unpack_buffer; +- } unpack; +- struct { +- int stream_off; +- } print; +- } u; +-}; +- +-/* #define MPICH_DEBUG_SEGMENT_MOVE */ +-/* TODO: Consider integrating this with the general debug support. */ +-/* Note: This does not use the CVAR support for the environment variable +- because (a) this is a temporary code and (b) it is expert developer +- only */ +-#ifdef MPICH_DEBUG_SEGMENT_MOVE +-static int printSegment = -1; +-static void setPrint(void) +-{ +- char *s = getenv("MPICH_DATALOOP_PRINT"); +- if (s && (strcmp(s, "yes") == 0 || strcmp(s, "YES") == 0)) { +- printSegment = 1; +- } else { +- printSegment = 0; +- } +-} +- +-#define DBG_SEGMENT(_a) do { if (printSegment < 0) setPrint(); \ +- if (printSegment) { _a; } } while (0) +-#else +-#define DBG_SEGMENT(_a) +-#endif +- +-/* NOTE: bufp values are unused, ripe for removal */ +- +-int MPIR_Segment_contig_m2m(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, void *v_paramp); +-int MPIR_Segment_vector_m2m(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blksz, +- DLOOP_Offset stride, +- DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, void *v_paramp); +-int MPIR_Segment_blkidx_m2m(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blocklen, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, void *v_paramp); +-int MPIR_Segment_index_m2m(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count * blockarray, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, void *v_paramp); +- +-/* prototypes of internal functions */ +-static int MPII_Segment_vector_pack_to_iov(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Size blksz, +- DLOOP_Offset stride, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +- +-static int MPII_Segment_contig_pack_to_iov(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +- +-static int MPII_Segment_contig_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp); +- +-static int MPII_Segment_vector_flatten(DLOOP_Offset * blocks_p, DLOOP_Count count, DLOOP_Size blksz, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, /* offset into buffer */ +- void *bufp, /* start of buffer */ +- void *v_paramp); +- +-static inline int is_float_type(DLOOP_Type el_type) +-{ +- return ((el_type == MPI_FLOAT) || (el_type == MPI_DOUBLE) || +- (el_type == MPI_LONG_DOUBLE) || +- (el_type == MPI_DOUBLE_PRECISION) || +- (el_type == MPI_COMPLEX) || (el_type == MPI_DOUBLE_COMPLEX)); +-/* (el_type == MPI_REAL4) || (el_type == MPI_REAL8) || */ +-/* (el_type == MPI_REAL16)); */ +-} +- +-static int external32_basic_convert(char *dest_buf, +- char *src_buf, +- int dest_el_size, int src_el_size, DLOOP_Offset count) +-{ +- char *src_ptr = src_buf, *dest_ptr = dest_buf; +- char *src_end = (char *) (src_buf + ((int) count * src_el_size)); +- +- MPIR_Assert(dest_buf && src_buf); +- +- if (src_el_size == dest_el_size) { +- if (src_el_size == 2) { +- while (src_ptr != src_end) { +- BASIC_convert16((*(TWO_BYTE_BASIC_TYPE *) src_ptr), +- (*(TWO_BYTE_BASIC_TYPE *) dest_ptr)); +- +- src_ptr += src_el_size; +- dest_ptr += dest_el_size; +- } +- } else if (src_el_size == 4) { +- while (src_ptr != src_end) { +- BASIC_convert32((*(FOUR_BYTE_BASIC_TYPE *) src_ptr), +- (*(FOUR_BYTE_BASIC_TYPE *) dest_ptr)); +- +- src_ptr += src_el_size; +- dest_ptr += dest_el_size; +- } +- } else if (src_el_size == 8) { +- while (src_ptr != src_end) { +- BASIC_convert64(src_ptr, dest_ptr); +- +- src_ptr += src_el_size; +- dest_ptr += dest_el_size; +- } +- } +- } else { +- /* TODO */ +- MPL_error_printf +- ("Conversion of types whose size is not the same as the size in external32 is not supported\n"); +- MPID_Abort(0, MPI_SUCCESS, 1, "Aborting with internal error"); +- /* There is no way to return an error code, so an abort is the +- * only choice (the return value of this routine is not +- * an error code) */ +- } +- return 0; +-} +- +-static int external32_float_convert(char *dest_buf, +- char *src_buf, int dest_el_size, int src_el_size, int count) +-{ +- char *src_ptr = src_buf, *dest_ptr = dest_buf; +- char *src_end = (char *) (src_buf + ((int) count * src_el_size)); +- +- MPIR_Assert(dest_buf && src_buf); +- +- if (src_el_size == dest_el_size) { +- if (src_el_size == 4) { +- while (src_ptr != src_end) { +- FLOAT_convert((*(FOUR_BYTE_FLOAT_TYPE *) src_ptr), +- (*(FOUR_BYTE_FLOAT_TYPE *) dest_ptr)); +- +- src_ptr += src_el_size; +- dest_ptr += dest_el_size; +- } +- } else if (src_el_size == 8) { +- while (src_ptr != src_end) { +- FLOAT_convert((*(EIGHT_BYTE_FLOAT_TYPE *) src_ptr), +- (*(EIGHT_BYTE_FLOAT_TYPE *) dest_ptr)); +- +- src_ptr += src_el_size; +- dest_ptr += dest_el_size; +- } +- } +- } else { +- /* TODO */ +- MPL_error_printf +- ("Conversion of types whose size is not the same as the size in external32 is not supported\n"); +- MPID_Abort(0, MPI_SUCCESS, 1, "Aborting with internal error"); +- /* There is no way to return an error code, so an abort is the +- * only choice (the return value of this routine is not +- * an error code) */ +- } +- return 0; +-} +- +-/* Segment_init +- * +- * buf - datatype buffer location +- * count - number of instances of the datatype in the buffer +- * handle - handle for datatype (could be derived or not) +- * segp - pointer to previously allocated segment structure +- * +- * Notes: +- * - Assumes that the segment has been allocated. +- * +- */ +-int MPIR_Segment_init(const DLOOP_Buffer buf, +- DLOOP_Count count, DLOOP_Handle handle, struct DLOOP_Segment *segp) +-{ +- DLOOP_Offset elmsize = 0; +- int i, depth = 0; +- int branch_detected = 0; +- +- struct DLOOP_Dataloop_stackelm *elmp; +- struct DLOOP_Dataloop *dlp = 0, *sblp = &segp->builtin_loop; +- +-#ifdef DLOOP_DEBUG_MANIPULATE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, "DLOOP_Segment_init: count = %d, buf = %x\n", count, buf)); +-#endif +- +- if (!DLOOP_Handle_hasloop_macro(handle)) { +- /* simplest case; datatype has no loop (basic) */ +- +- DLOOP_Handle_get_size_macro(handle, elmsize); +- +- sblp->kind = DLOOP_KIND_CONTIG | DLOOP_FINAL_MASK; +- sblp->loop_params.c_t.count = count; +- sblp->loop_params.c_t.dataloop = 0; +- sblp->el_size = elmsize; +- DLOOP_Handle_get_basic_type_macro(handle, sblp->el_type); +- DLOOP_Handle_get_extent_macro(handle, sblp->el_extent); +- +- dlp = sblp; +- depth = 1; +- } else if (count == 0) { +- /* only use the builtin */ +- sblp->kind = DLOOP_KIND_CONTIG | DLOOP_FINAL_MASK; +- sblp->loop_params.c_t.count = 0; +- sblp->loop_params.c_t.dataloop = 0; +- sblp->el_size = 0; +- sblp->el_extent = 0; +- +- dlp = sblp; +- depth = 1; +- } else if (count == 1) { +- /* don't use the builtin */ +- DLOOP_Handle_get_loopptr_macro(handle, dlp); +- DLOOP_Handle_get_loopdepth_macro(handle, depth); +- } else { +- /* default: need to use builtin to handle contig; must check +- * loop depth first +- */ +- DLOOP_Dataloop *oldloop; /* loop from original type, before new count */ +- DLOOP_Offset type_size, type_extent; +- DLOOP_Type el_type; +- +- DLOOP_Handle_get_loopdepth_macro(handle, depth); +- +- DLOOP_Handle_get_loopptr_macro(handle, oldloop); +- DLOOP_Assert(oldloop != NULL); +- DLOOP_Handle_get_size_macro(handle, type_size); +- DLOOP_Handle_get_extent_macro(handle, type_extent); +- DLOOP_Handle_get_basic_type_macro(handle, el_type); +- +- if (depth == 1 && ((oldloop->kind & DLOOP_KIND_MASK) == DLOOP_KIND_CONTIG)) { +- if (type_size == type_extent) { +- /* use a contig */ +- sblp->kind = DLOOP_KIND_CONTIG | DLOOP_FINAL_MASK; +- sblp->loop_params.c_t.count = count * oldloop->loop_params.c_t.count; +- sblp->loop_params.c_t.dataloop = NULL; +- sblp->el_size = oldloop->el_size; +- sblp->el_extent = oldloop->el_extent; +- sblp->el_type = oldloop->el_type; +- } else { +- /* use a vector, with extent of original type becoming the stride */ +- sblp->kind = DLOOP_KIND_VECTOR | DLOOP_FINAL_MASK; +- sblp->loop_params.v_t.count = count; +- sblp->loop_params.v_t.blocksize = oldloop->loop_params.c_t.count; +- sblp->loop_params.v_t.stride = type_extent; +- sblp->loop_params.v_t.dataloop = NULL; +- sblp->el_size = oldloop->el_size; +- sblp->el_extent = oldloop->el_extent; +- sblp->el_type = oldloop->el_type; +- } +- } else { +- /* general case */ +- sblp->kind = DLOOP_KIND_CONTIG; +- sblp->loop_params.c_t.count = count; +- sblp->loop_params.c_t.dataloop = oldloop; +- sblp->el_size = type_size; +- sblp->el_extent = type_extent; +- sblp->el_type = el_type; +- +- depth++; /* we're adding to the depth with the builtin */ +- DLOOP_Assert(depth < (DLOOP_MAX_DATATYPE_DEPTH)); +- } +- +- dlp = sblp; +- } +- +- /* assert instead of return b/c dtype/dloop errorhandling code is inconsistent */ +- DLOOP_Assert(depth < (DLOOP_MAX_DATATYPE_DEPTH)); +- +- /* initialize the rest of the segment values */ +- segp->handle = handle; +- segp->ptr = (DLOOP_Buffer) buf; +- segp->stream_off = 0; +- segp->cur_sp = 0; +- segp->valid_sp = 0; +- +- /* initialize the first stackelm in its entirety */ +- elmp = &(segp->stackelm[0]); +- DLOOP_Stackelm_load(elmp, dlp, 0); +- branch_detected = elmp->may_require_reloading; +- +- /* Fill in parameters not set by DLOOP_Stackelm_load */ +- elmp->orig_offset = 0; +- elmp->curblock = elmp->orig_block; +- /* DLOOP_Stackelm_offset assumes correct orig_count, curcount, loop_p */ +- elmp->curoffset = /* elmp->orig_offset + */ DLOOP_Stackelm_offset(elmp); +- +- i = 1; +- while (!(dlp->kind & DLOOP_FINAL_MASK)) { +- /* get pointer to next dataloop */ +- switch (dlp->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- case DLOOP_KIND_VECTOR: +- case DLOOP_KIND_BLOCKINDEXED: +- case DLOOP_KIND_INDEXED: +- dlp = dlp->loop_params.cm_t.dataloop; +- break; +- case DLOOP_KIND_STRUCT: +- dlp = dlp->loop_params.s_t.dataloop_array[0]; +- break; +- default: +- /* --BEGIN ERROR HANDLING-- */ +- DLOOP_Assert(0); +- break; +- /* --END ERROR HANDLING-- */ +- } +- +- DLOOP_Assert(i < DLOOP_MAX_DATATYPE_DEPTH); +- +- /* loop_p, orig_count, orig_block, and curcount are all filled by us now. +- * the rest are filled in at processing time. +- */ +- elmp = &(segp->stackelm[i]); +- +- DLOOP_Stackelm_load(elmp, dlp, branch_detected); +- branch_detected = elmp->may_require_reloading; +- i++; +- +- } +- +- segp->valid_sp = depth - 1; +- +- return 0; +-} +- +-/* Segment_alloc +- * +- */ +-struct DLOOP_Segment *MPIR_Segment_alloc(void) +-{ +- return (struct DLOOP_Segment *) DLOOP_Malloc(sizeof(struct DLOOP_Segment), MPL_MEM_DATATYPE); +-} +- +-/* Segment_free +- * +- * Input Parameters: +- * segp - pointer to segment +- */ +-void MPIR_Segment_free(struct DLOOP_Segment *segp) +-{ +- DLOOP_Free(segp); +- return; +-} +- +-void MPIR_Segment_pack(DLOOP_Segment * segp, +- DLOOP_Offset first, DLOOP_Offset * lastp, void *streambuf) +-{ +- struct MPIR_m2m_params params; /* defined in dataloop_parts.h */ +- +- DBG_SEGMENT(printf("Segment_pack...\n")); +- /* experimenting with discarding buf value in the segment, keeping in +- * per-use structure instead. would require moving the parameters around a +- * bit. +- */ +- params.userbuf = segp->ptr; +- params.streambuf = streambuf; +- params.direction = DLOOP_M2M_FROM_USERBUF; +- +- MPIR_Segment_manipulate(segp, first, lastp, MPIR_Segment_contig_m2m, MPIR_Segment_vector_m2m, MPIR_Segment_blkidx_m2m, MPIR_Segment_index_m2m, NULL, /* size fn */ +- ¶ms); +- return; +-} +- +-void MPIR_Segment_unpack(DLOOP_Segment * segp, +- DLOOP_Offset first, DLOOP_Offset * lastp, void *streambuf) +-{ +- struct MPIR_m2m_params params; +- +- DBG_SEGMENT(printf("Segment_unpack...\n")); +- /* experimenting with discarding buf value in the segment, keeping in +- * per-use structure instead. would require moving the parameters around a +- * bit. +- */ +- params.userbuf = segp->ptr; +- params.streambuf = streambuf; +- params.direction = DLOOP_M2M_TO_USERBUF; +- +- MPIR_Segment_manipulate(segp, first, lastp, MPIR_Segment_contig_m2m, MPIR_Segment_vector_m2m, MPIR_Segment_blkidx_m2m, MPIR_Segment_index_m2m, NULL, /* size fn */ +- ¶ms); +- return; +-} +- +-/* PIECE FUNCTIONS BELOW */ +- +-int MPIR_Segment_contig_m2m(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) +-{ +- DLOOP_Offset el_size; /* DLOOP_Count? */ +- DLOOP_Offset size; +- struct MPIR_m2m_params *paramp = v_paramp; +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- size = *blocks_p * el_size; +- +- DBG_SEGMENT(printf("element type = %lx\n", (long) el_type)); +- DBG_SEGMENT(printf("contig m2m: elsize = %d, size = %d\n", (int) el_size, (int) size)); +-#ifdef MPID_SU_VERBOSE +- dbg_printf("\t[contig unpack: do=" DLOOP_OFFSET_FMT_DEC_SPEC ", dp=%x, bp=%x, sz=" +- DLOOP_OFFSET_FMT_DEC_SPEC ", blksz=" DLOOP_OFFSET_FMT_DEC_SPEC "]\n", rel_off, +- (unsigned) bufp, (unsigned) paramp->u.unpack.unpack_buffer, el_size, *blocks_p); +-#endif +- +- if (paramp->direction == DLOOP_M2M_TO_USERBUF) { +- /* Ensure that pointer increment fits in a pointer */ +- /* userbuf is a pointer (not a displacement) since it is being +- * used on a memcpy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(paramp->userbuf)) + +- rel_off); +- DLOOP_Memcpy((char *) paramp->userbuf + rel_off, paramp->streambuf, size); +- } else { +- /* Ensure that pointer increment fits in a pointer */ +- /* userbuf is a pointer (not a displacement) since it is being used on a memcpy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(paramp->userbuf)) + +- rel_off); +- DLOOP_Memcpy(paramp->streambuf, (char *) paramp->userbuf + rel_off, size); +- } +- /* Ensure that pointer increment fits in a pointer */ +- /* streambuf is a pointer (not a displacement) since it was used on a memcpy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(paramp->streambuf)) + size); +- paramp->streambuf += size; +- return 0; +-} +- +-/* Segment_vector_m2m +- * +- * Note: this combines both packing and unpacking functionality. +- * +- * Note: this is only called when the starting position is at the beginning +- * of a whole block in a vector type. +- */ +-int MPIR_Segment_vector_m2m(DLOOP_Offset * blocks_p, DLOOP_Count count ATTRIBUTE((unused)), DLOOP_Count blksz, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, /* offset into buffer */ +- void *bufp ATTRIBUTE((unused)), void *v_paramp) +-{ +- DLOOP_Count i; +- DLOOP_Offset el_size, whole_count, blocks_left; +- struct MPIR_m2m_params *paramp = v_paramp; +- char *cbufp; +- +- /* Ensure that pointer increment fits in a pointer */ +- /* userbuf is a pointer (not a displacement) since it is being used for a memory copy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(paramp->userbuf)) + rel_off); +- cbufp = (char *) paramp->userbuf + rel_off; +- DLOOP_Handle_get_size_macro(el_type, el_size); +- DBG_SEGMENT(printf +- ("vector m2m: elsize = %d, count = %d, stride = %d, blocksize = %d\n", +- (int) el_size, (int) count, (int) stride, (int) blksz)); +- +- whole_count = (DLOOP_Count) ((blksz > 0) ? (*blocks_p / (DLOOP_Offset) blksz) : 0); +- blocks_left = (DLOOP_Count) ((blksz > 0) ? (*blocks_p % (DLOOP_Offset) blksz) : 0); +- +- if (paramp->direction == DLOOP_M2M_TO_USERBUF) { +- if (el_size == 8 MPIR_ALIGN8_TEST(paramp->streambuf, cbufp)) { +- MPII_COPY_TO_VEC(paramp->streambuf, cbufp, stride, int64_t, blksz, whole_count); +- MPII_COPY_TO_VEC(paramp->streambuf, cbufp, 0, int64_t, blocks_left, 1); +- } else if (el_size == 4 MPIR_ALIGN4_TEST(paramp->streambuf, cbufp)) { +- MPII_COPY_TO_VEC((paramp->streambuf), cbufp, stride, int32_t, blksz, whole_count); +- MPII_COPY_TO_VEC(paramp->streambuf, cbufp, 0, int32_t, blocks_left, 1); +- } else if (el_size == 2) { +- MPII_COPY_TO_VEC(paramp->streambuf, cbufp, stride, int16_t, blksz, whole_count); +- MPII_COPY_TO_VEC(paramp->streambuf, cbufp, 0, int16_t, blocks_left, 1); +- } else { +- for (i = 0; i < whole_count; i++) { +- DLOOP_Memcpy(cbufp, paramp->streambuf, ((DLOOP_Offset) blksz) * el_size); +- DBG_SEGMENT(printf("vec: memcpy %p %p %d\n", cbufp, +- paramp->streambuf, (int) (blksz * el_size))); +- /* Ensure that pointer increment fits in a pointer */ +- /* streambuf is a pointer (not a displacement) since it is being used for a memory copy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET +- (paramp->streambuf)) + +- ((DLOOP_Offset) blksz) * el_size); +- paramp->streambuf += ((DLOOP_Offset) blksz) * el_size; +- +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(cbufp)) + +- stride); +- cbufp += stride; +- } +- if (blocks_left) { +- DLOOP_Memcpy(cbufp, paramp->streambuf, ((DLOOP_Offset) blocks_left) * el_size); +- DBG_SEGMENT(printf("vec(left): memcpy %p %p %d\n", cbufp, +- paramp->streambuf, (int) (blocks_left * el_size))); +- /* Ensure that pointer increment fits in a pointer */ +- /* streambuf is a pointer (not a displacement) since +- * it is being used for a memory copy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET +- (paramp->streambuf)) + +- ((DLOOP_Offset) blocks_left) * el_size); +- paramp->streambuf += ((DLOOP_Offset) blocks_left) * el_size; +- } +- } +- } else { /* M2M_FROM_USERBUF */ +- +- if (el_size == 8 MPIR_ALIGN8_TEST(cbufp, paramp->streambuf)) { +- MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, stride, int64_t, blksz, whole_count); +- MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, 0, int64_t, blocks_left, 1); +- } else if (el_size == 4 MPIR_ALIGN4_TEST(cbufp, paramp->streambuf)) { +- MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, stride, int32_t, blksz, whole_count); +- MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, 0, int32_t, blocks_left, 1); +- } else if (el_size == 2) { +- MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, stride, int16_t, blksz, whole_count); +- MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, 0, int16_t, blocks_left, 1); +- } else { +- for (i = 0; i < whole_count; i++) { +- DLOOP_Memcpy(paramp->streambuf, cbufp, (DLOOP_Offset) blksz * el_size); +- /* Ensure that pointer increment fits in a pointer */ +- /* streambuf is a pointer (not a displacement) since +- * it is being used for a memory copy */ +- DBG_SEGMENT(printf("vec: memcpy %p %p %d\n", +- paramp->streambuf, cbufp, (int) (blksz * el_size))); +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET +- (paramp->streambuf)) + +- (DLOOP_Offset) blksz * el_size); +- paramp->streambuf += (DLOOP_Offset) blksz *el_size; +- cbufp += stride; +- } +- if (blocks_left) { +- DLOOP_Memcpy(paramp->streambuf, cbufp, (DLOOP_Offset) blocks_left * el_size); +- DBG_SEGMENT(printf("vec(left): memcpy %p %p %d\n", +- paramp->streambuf, cbufp, (int) (blocks_left * el_size))); +- /* Ensure that pointer increment fits in a pointer */ +- /* streambuf is a pointer (not a displacement) since +- * it is being used for a memory copy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET +- (paramp->streambuf)) + +- (DLOOP_Offset) blocks_left * el_size); +- paramp->streambuf += (DLOOP_Offset) blocks_left *el_size; +- } +- } +- } +- +- return 0; +-} +- +-/* MPIR_Segment_blkidx_m2m +- */ +-int MPIR_Segment_blkidx_m2m(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count blocklen, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) +-{ +- DLOOP_Count curblock = 0; +- DLOOP_Offset el_size; +- DLOOP_Offset blocks_left = *blocks_p; +- char *cbufp; +- struct MPIR_m2m_params *paramp = v_paramp; +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- DBG_SEGMENT(printf("blkidx m2m: elsize = %ld, count = %ld, blocklen = %ld," +- " blocks_left = %ld\n", el_size, count, blocklen, blocks_left)); +- +- while (blocks_left) { +- char *src, *dest; +- +- DLOOP_Assert(curblock < count); +- +- /* Ensure that pointer increment fits in a pointer */ +- /* userbuf is a pointer (not a displacement) since it is being +- * used for a memory copy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(paramp->userbuf)) + +- rel_off + offsetarray[curblock]); +- cbufp = (char *) paramp->userbuf + rel_off + offsetarray[curblock]; +- +- /* there was some casting going on here at one time but now all types +- * are promoted ot big values */ +- if (blocklen > blocks_left) +- blocklen = blocks_left; +- +- if (paramp->direction == DLOOP_M2M_TO_USERBUF) { +- src = paramp->streambuf; +- dest = cbufp; +- } else { +- src = cbufp; +- dest = paramp->streambuf; +- } +- +- /* note: macro modifies dest buffer ptr, so we must reset */ +- if (el_size == 8 MPIR_ALIGN8_TEST(src, dest)) { +- MPII_COPY_FROM_VEC(src, dest, 0, int64_t, blocklen, 1); +- } else if (el_size == 4 MPIR_ALIGN4_TEST(src, dest)) { +- MPII_COPY_FROM_VEC(src, dest, 0, int32_t, blocklen, 1); +- } else if (el_size == 2) { +- MPII_COPY_FROM_VEC(src, dest, 0, int16_t, blocklen, 1); +- } else { +- DLOOP_Memcpy(dest, src, (DLOOP_Offset) blocklen * el_size); +- DBG_SEGMENT(printf +- ("blkidx m3m:memcpy(%p,%p,%d)\n", dest, src, (int) (blocklen * el_size))); +- } +- +- /* Ensure that pointer increment fits in a pointer */ +- /* streambuf is a pointer (not a displacement) since it is +- * being used for a memory copy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(paramp->streambuf)) + +- (DLOOP_Offset) blocklen * el_size); +- paramp->streambuf += (DLOOP_Offset) blocklen *el_size; +- blocks_left -= blocklen; +- curblock++; +- } +- +- return 0; +-} +- +-/* MPIR_Segment_index_m2m +- */ +-int MPIR_Segment_index_m2m(DLOOP_Offset * blocks_p, +- DLOOP_Count count, +- DLOOP_Count * blockarray, +- DLOOP_Offset * offsetarray, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) +-{ +- int curblock = 0; +- DLOOP_Offset el_size; +- DLOOP_Offset cur_block_sz, blocks_left = *blocks_p; +- char *cbufp; +- struct MPIR_m2m_params *paramp = v_paramp; +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- DBG_SEGMENT(printf("index m2m: elsize = %d, count = %d\n", (int) el_size, (int) count)); +- +- while (blocks_left) { +- char *src, *dest; +- +- DLOOP_Assert(curblock < count); +- cur_block_sz = blockarray[curblock]; +- +- /* Ensure that pointer increment fits in a pointer */ +- /* userbuf is a pointer (not a displacement) since it is being +- * used for a memory copy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(paramp->userbuf)) + +- rel_off + offsetarray[curblock]); +- cbufp = (char *) paramp->userbuf + rel_off + offsetarray[curblock]; +- +- if (cur_block_sz > blocks_left) +- cur_block_sz = blocks_left; +- +- if (paramp->direction == DLOOP_M2M_TO_USERBUF) { +- src = paramp->streambuf; +- dest = cbufp; +- } else { +- src = cbufp; +- dest = paramp->streambuf; +- } +- +- /* note: macro modifies dest buffer ptr, so we must reset */ +- if (el_size == 8 MPIR_ALIGN8_TEST(src, dest)) { +- MPII_COPY_FROM_VEC(src, dest, 0, int64_t, cur_block_sz, 1); +- } else if (el_size == 4 MPIR_ALIGN4_TEST(src, dest)) { +- MPII_COPY_FROM_VEC(src, dest, 0, int32_t, cur_block_sz, 1); +- } else if (el_size == 2) { +- MPII_COPY_FROM_VEC(src, dest, 0, int16_t, cur_block_sz, 1); +- } else { +- DLOOP_Memcpy(dest, src, cur_block_sz * el_size); +- } +- +- /* Ensure that pointer increment fits in a pointer */ +- /* streambuf is a pointer (not a displacement) since it is +- * being used for a memory copy */ +- DLOOP_Ensure_Offset_fits_in_pointer((DLOOP_VOID_PTR_CAST_TO_OFFSET(paramp->streambuf)) + +- cur_block_sz * el_size); +- paramp->streambuf += cur_block_sz * el_size; +- blocks_left -= cur_block_sz; +- curblock++; +- } +- +- return 0; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPII_Segment_contig_pack_external32_to_buf +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPII_Segment_contig_pack_external32_to_buf(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- void *bufp, void *v_paramp) +-{ +- int src_el_size, dest_el_size; +- struct MPIR_Segment_piece_params *paramp = v_paramp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPIR_STATE_MPID_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF); +- +- MPIR_FUNC_VERBOSE_ENTER(MPIR_STATE_MPID_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF); +- +- src_el_size = MPIR_Datatype_get_basic_size(el_type); +- dest_el_size = MPII_Datatype_get_basic_size_external32(el_type); +- MPIR_Assert(dest_el_size); +- +- /* +- * h = handle value +- * do = datatype buffer offset +- * dp = datatype buffer pointer +- * bp = pack buffer pointer (current location, incremented as we go) +- * sz = size of datatype (guess we could get this from handle value if +- * we wanted...) +- */ +-#ifdef MPID_SP_VERBOSE +- dbg_printf("\t[contig pack [external32]: do=%d, dp=%x, bp=%x, " +- "src_el_sz=%d, dest_el_sz=%d, blksz=%d]\n", +- rel_off, +- (unsigned) bufp, +- (unsigned) paramp->u.pack.pack_buffer, src_el_size, dest_el_size, (int) *blocks_p); +-#endif +- +- /* TODO: DEAL WITH CASE WHERE ALL DATA DOESN'T FIT! */ +- if ((src_el_size == dest_el_size) && (src_el_size == 1)) { +- MPIR_Memcpy(paramp->u.pack.pack_buffer, ((char *) bufp) + rel_off, *blocks_p); +- } else if (is_float_type(el_type)) { +- external32_float_convert(paramp->u.pack.pack_buffer, +- ((char *) bufp) + rel_off, dest_el_size, src_el_size, *blocks_p); +- } else { +- external32_basic_convert(paramp->u.pack.pack_buffer, +- ((char *) bufp) + rel_off, dest_el_size, src_el_size, *blocks_p); +- } +- paramp->u.pack.pack_buffer += (dest_el_size * (*blocks_p)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPIR_STATE_MPID_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF); +- return 0; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPII_Segment_contig_unpack_external32_to_buf +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPII_Segment_contig_unpack_external32_to_buf(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, +- void *bufp, void *v_paramp) +-{ +- int src_el_size, dest_el_size; +- struct MPIR_Segment_piece_params *paramp = v_paramp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPIR_STATE_MPID_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF); +- +- MPIR_FUNC_VERBOSE_ENTER(MPIR_STATE_MPID_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF); +- +- src_el_size = MPIR_Datatype_get_basic_size(el_type); +- dest_el_size = MPII_Datatype_get_basic_size_external32(el_type); +- MPIR_Assert(dest_el_size); +- +- /* +- * h = handle value +- * do = datatype buffer offset +- * dp = datatype buffer pointer +- * up = unpack buffer pointer (current location, incremented as we go) +- * sz = size of datatype (guess we could get this from handle value if +- * we wanted...) +- */ +-#ifdef MPID_SP_VERBOSE +- dbg_printf("\t[contig unpack [external32]: do=%d, dp=%x, up=%x, " +- "src_el_sz=%d, dest_el_sz=%d, blksz=%d]\n", +- rel_off, +- (unsigned) bufp, +- (unsigned) paramp->u.unpack.unpack_buffer, +- src_el_size, dest_el_size, (int) *blocks_p); +-#endif +- +- /* TODO: DEAL WITH CASE WHERE ALL DATA DOESN'T FIT! */ +- if ((src_el_size == dest_el_size) && (src_el_size == 1)) { +- MPIR_Memcpy(((char *) bufp) + rel_off, paramp->u.unpack.unpack_buffer, *blocks_p); +- } else if (is_float_type(el_type)) { +- external32_float_convert(((char *) bufp) + rel_off, +- paramp->u.unpack.unpack_buffer, +- dest_el_size, src_el_size, *blocks_p); +- } else { +- external32_basic_convert(((char *) bufp) + rel_off, +- paramp->u.unpack.unpack_buffer, +- dest_el_size, src_el_size, *blocks_p); +- } +- paramp->u.unpack.unpack_buffer += (dest_el_size * (*blocks_p)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPIR_STATE_MPID_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF); +- return 0; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Segment_pack_external32 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPIR_Segment_pack_external32(struct DLOOP_Segment *segp, +- DLOOP_Offset first, DLOOP_Offset * lastp, void *pack_buffer) +-{ +- struct MPIR_Segment_piece_params pack_params; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPIR_STATE_MPID_SEGMENT_PACK_EXTERNAL); +- +- MPIR_FUNC_VERBOSE_ENTER(MPIR_STATE_MPID_SEGMENT_PACK_EXTERNAL); +- +- pack_params.u.pack.pack_buffer = (DLOOP_Buffer) pack_buffer; +- MPIR_Segment_manipulate(segp, first, lastp, MPII_Segment_contig_pack_external32_to_buf, NULL, /* MPIR_Segment_vector_pack_external32_to_buf, */ +- NULL, /* blkidx */ +- NULL, /* MPIR_Segment_index_pack_external32_to_buf, */ +- MPII_Datatype_get_basic_size_external32, &pack_params); +- +- MPIR_FUNC_VERBOSE_EXIT(MPIR_STATE_MPID_SEGMENT_PACK_EXTERNAL); +- return; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Segment_unpack_external32 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPIR_Segment_unpack_external32(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, DLOOP_Buffer unpack_buffer) +-{ +- struct MPIR_Segment_piece_params pack_params; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPIR_STATE_MPID_SEGMENT_UNPACK_EXTERNAL32); +- +- MPIR_FUNC_VERBOSE_ENTER(MPIR_STATE_MPID_SEGMENT_UNPACK_EXTERNAL32); +- +- pack_params.u.unpack.unpack_buffer = unpack_buffer; +- MPIR_Segment_manipulate(segp, first, lastp, MPII_Segment_contig_unpack_external32_to_buf, NULL, /* MPIR_Segment_vector_unpack_external32_to_buf, */ +- NULL, /* blkidx */ +- NULL, /* MPIR_Segment_index_unpack_external32_to_buf, */ +- MPII_Datatype_get_basic_size_external32, &pack_params); +- +- MPIR_FUNC_VERBOSE_EXIT(MPIR_STATE_MPID_SEGMENT_UNPACK_EXTERNAL32); +- return; +-} +- +-void MPIR_Type_access_contents(MPI_Datatype type, +- int **ints_p, MPI_Aint ** aints_p, MPI_Datatype ** types_p) +-{ +- int nr_ints, nr_aints, nr_types, combiner; +- int types_sz, struct_sz, ints_sz, epsilon, align_sz; +- MPIR_Datatype *dtp; +- MPIR_Datatype_contents *cp; +- +- MPIR_Type_get_envelope(type, &nr_ints, &nr_aints, &nr_types, &combiner); +- +- /* hardcoded handling of MPICH contents format... */ +- MPIR_Datatype_get_ptr(type, dtp); +- DLOOP_Assert(dtp != NULL); +- +- cp = dtp->contents; +- DLOOP_Assert(cp != NULL); +- +-#ifdef HAVE_MAX_STRUCT_ALIGNMENT +- align_sz = HAVE_MAX_STRUCT_ALIGNMENT; +-#else +- align_sz = 8; +-#endif +- +- struct_sz = sizeof(MPIR_Datatype_contents); +- types_sz = nr_types * sizeof(MPI_Datatype); +- ints_sz = nr_ints * sizeof(int); +- +- if ((epsilon = struct_sz % align_sz)) { +- struct_sz += align_sz - epsilon; +- } +- if ((epsilon = types_sz % align_sz)) { +- types_sz += align_sz - epsilon; +- } +- if ((epsilon = ints_sz % align_sz)) { +- ints_sz += align_sz - epsilon; +- } +- *types_p = (MPI_Datatype *) (((char *) cp) + struct_sz); +- *ints_p = (int *) (((char *) (*types_p)) + types_sz); +- *aints_p = (MPI_Aint *) (((char *) (*ints_p)) + ints_sz); +- /* end of hardcoded handling of MPICH contents format */ +- +- return; +-} +- +-/* FIXME: Is this routine complete? Why is it needed? If it is needed, it +- must have a comment that describes why it is needed and the arguments +- must have ATTRIBUTE((unused)) */ +-void MPIR_Type_release_contents(MPI_Datatype type, +- int **ints_p, MPI_Aint ** aints_p, MPI_Datatype ** types_p) +-{ +- return; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Segment_pack_vector +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* MPIR_Segment_pack_vector +-* +-* Parameters: +-* segp - pointer to segment structure +-* first - first byte in segment to pack +-* lastp - in/out parameter describing last byte to pack (and afterwards +-* the last byte _actually_ packed) +-* NOTE: actually returns index of byte _after_ last one packed +-* vectorp - pointer to (off, len) pairs to fill in +-* lengthp - in/out parameter describing length of array (and afterwards +-* the amount of the array that has actual data) +-*/ +-void MPIR_Segment_pack_vector(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, DLOOP_VECTOR * vectorp, int *lengthp) +-{ +- struct MPIR_Segment_piece_params packvec_params; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_PACK_VECTOR); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_PACK_VECTOR); +- +- packvec_params.u.pack_vector.vectorp = vectorp; +- packvec_params.u.pack_vector.index = 0; +- packvec_params.u.pack_vector.length = *lengthp; +- +- MPIR_Assert(*lengthp > 0); +- +- MPIR_Segment_manipulate(segp, first, lastp, MPII_Segment_contig_pack_to_iov, MPII_Segment_vector_pack_to_iov, NULL, /* blkidx fn */ +- NULL, /* index fn */ +- NULL, &packvec_params); +- +- /* last value already handled by MPIR_Segment_manipulate */ +- *lengthp = packvec_params.u.pack_vector.index; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_PACK_VECTOR); +- return; +-} +- +- +-/* MPIR_Segment_unpack_vector +-* +-* Q: Should this be any different from pack vector? +-*/ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Segment_unpack_vector +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPIR_Segment_unpack_vector(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, DLOOP_VECTOR * vectorp, int *lengthp) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_UNPACK_VECTOR); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_UNPACK_VECTOR); +- +- MPIR_Segment_pack_vector(segp, first, lastp, vectorp, lengthp); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_UNPACK_VECTOR); +- return; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Segment_flatten +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* MPIR_Segment_flatten +-* +-* offp - pointer to array to fill in with offsets +-* sizep - pointer to array to fill in with sizes +-* lengthp - pointer to value holding size of arrays; # used is returned +-* +-* Internally, index is used to store the index of next array value to fill in. +-* +-* TODO: MAKE SIZES Aints IN ROMIO, CHANGE THIS TO USE INTS TOO. +-*/ +-void MPIR_Segment_flatten(struct DLOOP_Segment *segp, +- DLOOP_Offset first, +- DLOOP_Offset * lastp, +- DLOOP_Offset * offp, DLOOP_Size * sizep, DLOOP_Offset * lengthp) +-{ +- struct MPIR_Segment_piece_params packvec_params; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_FLATTEN); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_FLATTEN); +- +- packvec_params.u.flatten.offp = (int64_t *) offp; +- packvec_params.u.flatten.sizep = sizep; +- packvec_params.u.flatten.index = 0; +- packvec_params.u.flatten.length = *lengthp; +- +- MPIR_Assert(*lengthp > 0); +- +- MPIR_Segment_manipulate(segp, first, lastp, MPII_Segment_contig_flatten, MPII_Segment_vector_flatten, NULL, /* blkidx fn */ +- NULL, NULL, &packvec_params); +- +- /* last value already handled by MPIR_Segment_manipulate */ +- *lengthp = packvec_params.u.flatten.index; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_FLATTEN); +- return; +-} +- +-/* +-* EVERYTHING BELOW HERE IS USED ONLY WITHIN THIS FILE +-*/ +- +-/********** FUNCTIONS FOR CREATING AN IOV DESCRIBING BUFFER **********/ +- +-#undef FUNCNAME +-#define FUNCNAME MPII_Segment_contig_pack_to_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* MPII_Segment_contig_pack_to_iov +-*/ +-static int MPII_Segment_contig_pack_to_iov(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp) +-{ +- int el_size, last_idx; +- DLOOP_Offset size; +- char *last_end = NULL; +- struct MPIR_Segment_piece_params *paramp = v_paramp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV); +- +- el_size = MPIR_Datatype_get_basic_size(el_type); +- size = *blocks_p * (DLOOP_Offset) el_size; +- +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, (MPL_DBG_FDEST, +- " contig to vec: do=" MPI_AINT_FMT_DEC_SPEC +- ", dp=%p, ind=%d, sz=%d, blksz=" +- MPI_AINT_FMT_DEC_SPEC, (MPI_Aint) rel_off, bufp, +- paramp->u.pack_vector.index, el_size, +- (MPI_Aint) * blocks_p)); +- +- last_idx = paramp->u.pack_vector.index - 1; +- if (last_idx >= 0) { +- last_end = ((char *) paramp->u.pack_vector.vectorp[last_idx].DLOOP_VECTOR_BUF) + +- paramp->u.pack_vector.vectorp[last_idx].DLOOP_VECTOR_LEN; +- } +- +- MPIR_Ensure_Aint_fits_in_pointer((MPIR_VOID_PTR_CAST_TO_MPI_AINT(bufp)) + rel_off); +- if ((last_idx == paramp->u.pack_vector.length - 1) && (last_end != ((char *) bufp + rel_off))) { +- /* we have used up all our entries, and this region doesn't fit on +- * the end of the last one. setting blocks to 0 tells manipulation +- * function that we are done (and that we didn't process any blocks). +- */ +- *blocks_p = 0; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV); +- return 1; +- } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off))) { +- /* add this size to the last vector rather than using up another one */ +- paramp->u.pack_vector.vectorp[last_idx].DLOOP_VECTOR_LEN += size; +- } else { +- paramp->u.pack_vector.vectorp[last_idx + 1].DLOOP_VECTOR_BUF = (char *) bufp + rel_off; +- paramp->u.pack_vector.vectorp[last_idx + 1].DLOOP_VECTOR_LEN = size; +- paramp->u.pack_vector.index++; +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV); +- return 0; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPII_Segment_vector_pack_to_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* MPII_Segment_vector_pack_to_iov +- * +- * Input Parameters: +- * blocks_p - [inout] pointer to a count of blocks (total, for all noncontiguous pieces) +- * count - # of noncontiguous regions +- * blksz - size of each noncontiguous region +- * stride - distance in bytes from start of one region to start of next +- * el_type - elemental type (e.g. MPI_INT) +- * ... +- * +- * Note: this is only called when the starting position is at the beginning +- * of a whole block in a vector type. +- */ +-static int MPII_Segment_vector_pack_to_iov(DLOOP_Offset * blocks_p, DLOOP_Count count, DLOOP_Size blksz, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, /* offset into buffer */ +- void *bufp, /* start of buffer */ +- void *v_paramp) +-{ +- int i; +- DLOOP_Offset size, blocks_left, basic_size; +- struct MPIR_Segment_piece_params *paramp = v_paramp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV); +- +- basic_size = (DLOOP_Offset) MPIR_Datatype_get_basic_size(el_type); +- blocks_left = *blocks_p; +- +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, (MPL_DBG_FDEST, +- " vector to vec: do=" MPI_AINT_FMT_DEC_SPEC +- ", dp=%p" +- ", len=" MPI_AINT_FMT_DEC_SPEC +- ", ind=" MPI_AINT_FMT_DEC_SPEC +- ", ct=" MPI_AINT_FMT_DEC_SPEC +- ", blksz=" MPI_AINT_FMT_DEC_SPEC +- ", str=" MPI_AINT_FMT_DEC_SPEC +- ", blks=" MPI_AINT_FMT_DEC_SPEC, +- (MPI_Aint) rel_off, +- bufp, +- (MPI_Aint) paramp->u.pack_vector.length, +- (MPI_Aint) paramp->u.pack_vector.index, +- count, +- blksz, (MPI_Aint) stride, (MPI_Aint) * blocks_p)); +- +- for (i = 0; i < count && blocks_left > 0; i++) { +- int last_idx; +- char *last_end = NULL; +- +- if (blocks_left > (DLOOP_Offset) blksz) { +- size = ((DLOOP_Offset) blksz) * basic_size; +- blocks_left -= (DLOOP_Offset) blksz; +- } else { +- /* last pass */ +- size = blocks_left * basic_size; +- blocks_left = 0; +- } +- +- last_idx = paramp->u.pack_vector.index - 1; +- if (last_idx >= 0) { +- last_end = ((char *) paramp->u.pack_vector.vectorp[last_idx].DLOOP_VECTOR_BUF) + +- paramp->u.pack_vector.vectorp[last_idx].DLOOP_VECTOR_LEN; +- } +- +- MPIR_Ensure_Aint_fits_in_pointer((MPIR_VOID_PTR_CAST_TO_MPI_AINT(bufp)) + rel_off); +- if ((last_idx == paramp->u.pack_vector.length - 1) && +- (last_end != ((char *) bufp + rel_off))) { +- /* we have used up all our entries, and this one doesn't fit on +- * the end of the last one. +- */ +- *blocks_p -= (blocks_left + (size / basic_size)); +-#ifdef MPID_SP_VERBOSE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\t[vector to vec exiting (1): next ind = %d, " MPI_AINT_FMT_DEC_SPEC +- " blocks processed.\n", paramp->u.pack_vector.index, +- (MPI_Aint) * blocks_p)); +-#endif +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV); +- return 1; +- } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off))) { +- /* add this size to the last vector rather than using up new one */ +- paramp->u.pack_vector.vectorp[last_idx].DLOOP_VECTOR_LEN += size; +- } else { +- paramp->u.pack_vector.vectorp[last_idx + 1].DLOOP_VECTOR_BUF = (char *) bufp + rel_off; +- paramp->u.pack_vector.vectorp[last_idx + 1].DLOOP_VECTOR_LEN = size; +- paramp->u.pack_vector.index++; +- } +- +- rel_off += stride; +- +- } +- +-#ifdef MPID_SP_VERBOSE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\t[vector to vec exiting (2): next ind = %d, " MPI_AINT_FMT_DEC_SPEC +- " blocks processed.\n", paramp->u.pack_vector.index, (MPI_Aint) * blocks_p)); +-#endif +- +- /* if we get here then we processed ALL the blocks; don't need to update +- * blocks_p +- */ +- MPIR_Assert(blocks_left == 0); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV); +- return 0; +-} +- +-/********** FUNCTIONS FOR FLATTENING A TYPE **********/ +- +-#undef FUNCNAME +-#define FUNCNAME MPII_Segment_contig_flatten +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* MPII_Segment_contig_flatten +- */ +-static int MPII_Segment_contig_flatten(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, void *bufp, void *v_paramp) +-{ +- int idx, el_size; +- DLOOP_Offset size; +- struct MPIR_Segment_piece_params *paramp = v_paramp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_CONTIG_FLATTEN); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_CONTIG_FLATTEN); +- +- el_size = MPIR_Datatype_get_basic_size(el_type); +- size = *blocks_p * (DLOOP_Offset) el_size; +- idx = paramp->u.flatten.index; +- +-#ifdef MPID_SP_VERBOSE +- MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, +- (MPL_DBG_FDEST, +- "\t[contig flatten: idx = %d, loc = (" MPI_AINT_FMT_HEX_SPEC " + " +- MPI_AINT_FMT_HEX_SPEC ") = " MPI_AINT_FMT_HEX_SPEC ", size = " +- MPI_AINT_FMT_DEC_SPEC "]\n", idx, MPIR_VOID_PTR_CAST_TO_MPI_AINT bufp, +- (MPI_Aint) rel_off, MPIR_VOID_PTR_CAST_TO_MPI_AINT bufp + rel_off, +- (MPI_Aint) size)); +-#endif +- +- if (idx > 0 && ((DLOOP_Offset) MPIR_VOID_PTR_CAST_TO_MPI_AINT bufp + rel_off) == +- ((paramp->u.flatten.offp[idx - 1]) + (DLOOP_Offset) paramp->u.flatten.sizep[idx - 1])) { +- /* add this size to the last vector rather than using up another one */ +- paramp->u.flatten.sizep[idx - 1] += size; +- } else { +- paramp->u.flatten.offp[idx] = +- ((int64_t) MPIR_VOID_PTR_CAST_TO_MPI_AINT bufp) + (int64_t) rel_off; +- paramp->u.flatten.sizep[idx] = size; +- +- paramp->u.flatten.index++; +- /* check to see if we have used our entire vector buffer, and if so +- * return 1 to stop processing +- */ +- if (paramp->u.flatten.index == paramp->u.flatten.length) { +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_CONTIG_FLATTEN); +- return 1; +- } +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_CONTIG_FLATTEN); +- return 0; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPII_Segment_vector_flatten +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* MPII_Segment_vector_flatten +- * +- * Notes: +- * - this is only called when the starting position is at the beginning +- * of a whole block in a vector type. +- * - this was a virtual copy of MPIR_Segment_pack_to_iov; now it has improvements +- * that MPIR_Segment_pack_to_iov needs. +- * - we return the number of blocks that we did process in region pointed to by +- * blocks_p. +- */ +-static int MPII_Segment_vector_flatten(DLOOP_Offset * blocks_p, DLOOP_Count count, DLOOP_Size blksz, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, /* offset into buffer */ +- void *bufp, /* start of buffer */ +- void *v_paramp) +-{ +- int i; +- DLOOP_Offset size, blocks_left, basic_size; +- struct MPIR_Segment_piece_params *paramp = v_paramp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_VECTOR_FLATTEN); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_VECTOR_FLATTEN); +- +- basic_size = (DLOOP_Offset) MPIR_Datatype_get_basic_size(el_type); +- blocks_left = *blocks_p; +- +- for (i = 0; i < count && blocks_left > 0; i++) { +- int idx = paramp->u.flatten.index; +- +- if (blocks_left > (DLOOP_Offset) blksz) { +- size = ((DLOOP_Offset) blksz) * basic_size; +- blocks_left -= (DLOOP_Offset) blksz; +- } else { +- /* last pass */ +- size = blocks_left * basic_size; +- blocks_left = 0; +- } +- +- if (idx > 0 && ((DLOOP_Offset) MPIR_VOID_PTR_CAST_TO_MPI_AINT bufp + rel_off) == +- ((paramp->u.flatten.offp[idx - 1]) + (DLOOP_Offset) paramp->u.flatten.sizep[idx - 1])) { +- /* add this size to the last region rather than using up another one */ +- paramp->u.flatten.sizep[idx - 1] += size; +- } else if (idx < paramp->u.flatten.length) { +- /* take up another region */ +- paramp->u.flatten.offp[idx] = +- (DLOOP_Offset) MPIR_VOID_PTR_CAST_TO_MPI_AINT bufp + rel_off; +- paramp->u.flatten.sizep[idx] = size; +- paramp->u.flatten.index++; +- } else { +- /* we tried to add to the end of the last region and failed; add blocks back in */ +- *blocks_p = *blocks_p - blocks_left + (size / basic_size); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_VECTOR_FLATTEN); +- return 1; +- } +- rel_off += stride; +- +- } +- /* --BEGIN ERROR HANDLING-- */ +- MPIR_Assert(blocks_left == 0); +- /* --END ERROR HANDLING-- */ +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_VECTOR_FLATTEN); +- return 0; +-} +deleted file mode 100644 +--- a/src/mpi/datatype/looputil.h ++++ /dev/null +@@ -1,415 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#ifndef LOOPUTIL_H_INCLUDED +-#define LOOPUTIL_H_INCLUDED +- +-#include "mpichconf.h" +- +-/* FIXME!!! TODO!!! FOO!!! DO THIS!!! DETECT ME!!! +- * +- * Consider using MPIU_INT64_T etc. types instead of the +- * EIGHT_BYTE_BASIC_TYPE stuff, or put #defines at the top of this file +- * assigning them in a simple manner. +- * +- * Doing that might require that we create MPIU_UINT64_T types (etc), +- * because it looks like we really want to have unsigned types for the +- * various convert functions below. +- */ +- +-#ifdef HAVE_INTTYPES_H +-#include +-#endif +-#ifdef HAVE_LIMITS_H +-#include +-#endif +-#ifdef HAVE_ENDIAN_H +-#include +-#endif +- +-#ifdef HAVE_INT64 +-#define uint64_t __int64 +-#define uint32_t __int32 +-#elif defined(MPIU_INT64_T) +-/* FIXME: This is necessary with some compilers or compiler settings */ +-#define uint64_t unsigned MPIU_INT64_T +-#endif +- +-/* FIXME: Who defines __BYTE_ORDER or __BIG_ENDIAN? They aren't part of C */ +-/* FIXME: The else test assumes that the byte order is little endian, whereas +- it may simply have been undetermined. This should instead use either +- a configure-time test (for which there are macros) or a runtime test +- and not use this non-portable check */ +- +-/* Some platforms, like AIX, use BYTE_ORDER instead of __BYTE_ORDER */ +-#if defined(BYTE_ORDER) && !defined(__BYTE_ORDER) +-#define __BYTE_ORDER BYTE_ORDER +-#endif +- +-#if defined(WORDS_BIGENDIAN) +-#define BLENDIAN 0 +-#elif defined(WORDS_LITTLEENDIAN) +-#define BLENDIAN 1 +-#else +-#if !defined(__BYTE_ORDER) || !defined(__BIG_ENDIAN) +-#error This code assumes that __BYTE_ORDER and __BIG_ENDIAN are defined +-#endif +-/* FIXME: "BLENDIAN" is a non-conforming name - it could conflict with some +- other definition in a non-mpich header file */ +-#if ((defined(_BIG_ENDIAN) && !defined(ntohl)) || (__BYTE_ORDER == __BIG_ENDIAN)) +-#define BLENDIAN 0 /* detected host arch byte order is big endian */ +-#else +-#define BLENDIAN 1 /* detected host arch byte order is little endian */ +-#endif +-#endif +- +-/* +- set to 1: uses manual swapping routines +- for 16/32 bit data types +- set to 0: uses system provided swapping routines +- for 16/32 bit data types +-*/ +-#define MANUAL_BYTESWAPS 1 +- +-/* +- NOTE: +- +- There are two 'public' calls here: +- +- FLOAT_convert(src, dest) -- converts floating point src into +- external32 floating point format and stores the result in dest. +- +- BASIC_convert(src, dest) -- converts integral type src into +- external32 integral type and stores the result in dest. +- +- These two macros compile to assignments on big-endian architectures. +-*/ +- +-#if (MANUAL_BYTESWAPS == 0) +-#include +-#endif +- +-#define BITSIZE_OF(type) (sizeof(type) * CHAR_BIT) +- +-#if (MANUAL_BYTESWAPS == 1) +-#define BASIC_convert32(src, dest) \ +-{ \ +- dest = (((src >> 24) & 0x000000FF) |\ +- ((src >> 8) & 0x0000FF00) |\ +- ((src << 8) & 0x00FF0000) |\ +- ((src << 24) & 0xFF000000));\ +-} +-#else +-#define BASIC_convert32(src, dest) \ +-{ \ +- dest = htonl((uint32_t)src); \ +-} +-#endif +- +-#if (MANUAL_BYTESWAPS == 1) +-#define BASIC_convert16(src, dest) \ +-{ \ +- dest = (((src >> 8) & 0x00FF) | \ +- ((src << 8) & 0xFF00)); \ +-} +-#else +-#define BASIC_convert16(src, dest) \ +-{ \ +- dest = htons((uint16_t)src); \ +-} +-#endif +- +- +-/* changed the argument types to be char* instead of uint64_t* because the Sun compiler +- prints out warnings that the function expects unsigned long long, but is being passed +- signed long long in mpid_ext32_segment.c. */ +-static inline void BASIC_convert64(char *src, char *dest) +-{ +- uint32_t tmp_src[2]; +- uint32_t tmp_dest[2]; +- +- tmp_src[0] = (uint32_t) (*((uint64_t *) src) >> 32); +- tmp_src[1] = (uint32_t) ((*((uint64_t *) src) << 32) >> 32); +- +- BASIC_convert32(tmp_src[0], tmp_dest[0]); +- BASIC_convert32(tmp_src[1], tmp_dest[1]); +- +- *((uint64_t *) dest) = (uint64_t) tmp_dest[0]; +- *((uint64_t *) dest) <<= 32; +- *((uint64_t *) dest) |= (uint64_t) tmp_dest[1]; +-} +- +-static inline void BASIC_convert96(char *src, char *dest) +-{ +- uint32_t tmp_src[3]; +- uint32_t tmp_dest[3]; +- char *ptr = dest; +- +- tmp_src[0] = (uint32_t) (*((uint64_t *) src) >> 32); +- tmp_src[1] = (uint32_t) ((*((uint64_t *) src) << 32) >> 32); +- tmp_src[2] = (uint32_t) +- (*((uint32_t *) ((char *) src + sizeof(uint64_t)))); +- +- BASIC_convert32(tmp_src[0], tmp_dest[0]); +- BASIC_convert32(tmp_src[1], tmp_dest[1]); +- BASIC_convert32(tmp_src[2], tmp_dest[2]); +- +- *((uint32_t *) ptr) = tmp_dest[0]; +- ptr += sizeof(uint32_t); +- *((uint32_t *) ptr) = tmp_dest[1]; +- ptr += sizeof(uint32_t); +- *((uint32_t *) ptr) = tmp_dest[2]; +-} +- +-static inline void BASIC_convert128(char *src, char *dest) +-{ +- uint64_t tmp_src[2]; +- uint64_t tmp_dest[2]; +- char *ptr = dest; +- +- tmp_src[0] = *((uint64_t *) src); +- tmp_src[1] = *((uint64_t *) ((char *) src + sizeof(uint64_t))); +- +- BASIC_convert64((char *) &tmp_src[0], (char *) &tmp_dest[0]); +- BASIC_convert64((char *) &tmp_src[1], (char *) &tmp_dest[1]); +- +- *((uint64_t *) ptr) = tmp_dest[0]; +- ptr += sizeof(uint64_t); +- *((uint64_t *) ptr) = tmp_dest[1]; +-} +- +-#if (BLENDIAN == 1) +-#define BASIC_convert(src, dest) \ +-{ \ +- register int type_byte_size = sizeof(src); \ +- switch(type_byte_size) \ +- { \ +- case 1: \ +- dest = src; \ +- break; \ +- case 2: \ +- BASIC_convert16(src, dest); \ +- break; \ +- case 4: \ +- BASIC_convert32(src, dest); \ +- break; \ +- case 8: \ +- BASIC_convert64((char *)&src, \ +- (char *)&dest);\ +- break; \ +- } \ +-} +- +-/* +- http://www.mpi-forum.org/docs/mpi-20-html/node200.htm +- +- When converting a larger size integer to a smaller size integer, +- only the less significant bytes are moved. Care must be taken to +- preserve the sign bit value. This allows no conversion errors if the +- data range is within the range of the smaller size integer. (End of +- advice to implementors.) +-*/ +-#define BASIC_mixed_convert(src, dest) +-#else +-#define BASIC_convert(src, dest) \ +- { dest = src; } +-#define BASIC_mixed_convert(src, dest) \ +- { dest = src; } +-#endif +- +-/* +- Notes on the IEEE floating point format +- --------------------------------------- +- +- external32 for floating point types is big-endian IEEE format. +- +- --------------------- +- 32 bit floating point +- --------------------- +- * big endian byte order +- struct be_ieee754_single_precision +- { +- unsigned int sign_neg:1; +- unsigned int exponent:8; +- unsigned int mantissa:23; +- }; +- +- * little endian byte order +- struct le_ieee754_single_precision +- { +- unsigned int mantissa:23; +- unsigned int exponent:8; +- unsigned int sign_neg:1; +- }; +- --------------------- +- +- --------------------- +- 64 bit floating point +- --------------------- +- * big endian byte order +- struct be_ieee754_double_precision +- { +- unsigned int sign_neg:1; +- unsigned int exponent:11; +- unsigned int mantissa0:20; +- unsigned int mantissa1:32; +- }; +- +- * little endian byte order +- * big endian float word order +- struct le_ieee754_double_precision +- { +- unsigned int mantissa0:20; +- unsigned int exponent:11; +- unsigned int sign_neg:1; +- unsigned int mantissa1:32; +- }; +- +- * little endian byte order +- * little endian float word order +- struct le_ieee754_double_precision +- { +- unsigned int mantissa1:32; +- unsigned int mantissa0:20; +- unsigned int exponent:11; +- unsigned int sign_neg:1; +- }; +- --------------------- +- +- --------------------- +- 96 bit floating point +- --------------------- +- * big endian byte order +- struct be_ieee854_double_extended +- { +- unsigned int negative:1; +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int mantissa0:32; +- unsigned int mantissa1:32; +- }; +- +- * little endian byte order +- * big endian float word order +- struct le_ieee854_double_extended +- { +- unsigned int exponent:15; +- unsigned int negative:1; +- unsigned int empty:16; +- unsigned int mantissa0:32; +- unsigned int mantissa1:32; +- }; +- +- * little endian byte order +- * little endian float word order +- struct le_ieee854_double_extended +- { +- unsigned int mantissa1:32; +- unsigned int mantissa0:32; +- unsigned int exponent:15; +- unsigned int negative:1; +- unsigned int empty:16; +- }; +- --------------------- +- +- 128 bit floating point implementation notes +- =========================================== +- +- "A 128-bit long double number consists of an ordered pair of +- 64-bit double-precision numbers. The first member of the +- ordered pair contains the high-order part of the number, and +- the second member contains the low-order part. The value of the +- long double quantity is the sum of the two 64-bit numbers." +- +- From http://nscp.upenn.edu/aix4.3html/aixprggd/genprogc/128bit_long_double_floating-point_datatype.htm +- [ as of 09/04/2003 ] +-*/ +- +-#if (BLENDIAN == 1) +-#define FLOAT_convert(src, dest) \ +-{ \ +- register int type_byte_size = sizeof(src);\ +- switch(type_byte_size) \ +- { \ +- case 4: \ +- { \ +- long d; \ +- BASIC_convert32((long)src, d); \ +- dest = (float)d; \ +- } \ +- break; \ +- case 8: \ +- { \ +- BASIC_convert64((char *)&src, \ +- (char *)&dest);\ +- } \ +- break; \ +- case 12: \ +- { \ +- BASIC_convert96((char *)&src, \ +- (char *)&dest); \ +- } \ +- break; \ +- case 16: \ +- { \ +- BASIC_convert128((char *)&src, \ +- (char *)&dest); \ +- } \ +- break; \ +- } \ +-} +-#else +-#define FLOAT_convert(src, dest) \ +- { dest = src; } +-#endif +- +-#ifdef HAVE_INT16_T +-#define TWO_BYTE_BASIC_TYPE int16_t +-#else +-#if (SIZEOF_SHORT == 2) +-#define TWO_BYTE_BASIC_TYPE short +-#else +-#error "Cannot detect a basic type that is 2 bytes long" +-#endif +-#endif /* HAVE_INT16_T */ +- +-#ifdef HAVE_INT32_T +-#define FOUR_BYTE_BASIC_TYPE int32_t +-#else +-#if (SIZEOF_INT == 4) +-#define FOUR_BYTE_BASIC_TYPE int +-#elif (SIZEOF_LONG == 4) +-#define FOUR_BYTE_BASIC_TYPE long +-#else +-#error "Cannot detect a basic type that is 4 bytes long" +-#endif +-#endif /* HAVE_INT32_T */ +- +-#ifdef HAVE_INT64_T +-#define EIGHT_BYTE_BASIC_TYPE int64_t +-#else +-#ifdef HAVE_INT64 +-#define EIGHT_BYTE_BASIC_TYPE __int64 +-#elif (SIZEOF_LONG_LONG == 8) +-#define EIGHT_BYTE_BASIC_TYPE long long +-#else +-#error "Cannot detect a basic type that is 8 bytes long" +-#endif +-#endif /* HAVE_INT64_T */ +- +-#if (SIZEOF_FLOAT == 4) +-#define FOUR_BYTE_FLOAT_TYPE float +-#else +-#error "Cannot detect a float type that is 4 bytes long" +-#endif +- +-#if (SIZEOF_DOUBLE == 8) +-#define EIGHT_BYTE_FLOAT_TYPE double +-#else +-#error "Cannot detect a float type that is 8 bytes long" +-#endif +- +-#endif /* LOOPUTIL_H_INCLUDED */ +--- a/src/mpi/datatype/pack.c ++++ b/src/mpi/datatype/pack.c +@@ -25,89 +25,8 @@ int MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf + #ifndef MPICH_MPI_FROM_PMPI + #undef MPI_Pack + #define MPI_Pack PMPI_Pack +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Pack_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Pack_impl(const void *inbuf, +- MPI_Aint incount, +- MPI_Datatype datatype, void *outbuf, MPI_Aint outsize, MPI_Aint * position) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPI_Aint first, last; +- MPIR_Segment *segp; +- int contig; +- MPI_Aint dt_true_lb; +- MPI_Aint data_sz; +- +- if (incount == 0) { +- goto fn_exit; +- } +- +- /* Handle contig case quickly */ +- if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) { +- contig = TRUE; +- dt_true_lb = 0; +- data_sz = incount * MPIR_Datatype_get_basic_size(datatype); +- } else { +- MPIR_Datatype *dt_ptr; +- MPIR_Datatype_get_ptr(datatype, dt_ptr); +- MPIR_Datatype_is_contig(datatype, &contig); +- dt_true_lb = dt_ptr->true_lb; +- data_sz = incount * dt_ptr->size; +- } +- +- if (contig) { +- MPIR_Memcpy((char *) outbuf + *position, (char *) inbuf + dt_true_lb, data_sz); +- *position = (int) ((MPI_Aint) * position + data_sz); +- goto fn_exit; +- } +- +- +- /* non-contig case */ +- +- /* TODO: CHECK RETURN VALUES?? */ +- /* TODO: SHOULD THIS ALL BE IN A MPID_PACK??? */ +- segp = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segp == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment"); +- +- mpi_errno = MPIR_Segment_init(inbuf, incount, datatype, segp); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* NOTE: the use of buffer values and positions in MPI_Pack and in +- * MPIR_Segment_pack are quite different. See code or docs or something. +- */ +- first = 0; +- last = SEGMENT_IGNORE_LAST; +- +- /* Ensure that pointer increment fits in a pointer */ +- MPIR_Ensure_Aint_fits_in_pointer((MPIR_VOID_PTR_CAST_TO_MPI_AINT outbuf) + +- (MPI_Aint) * position); +- +- MPIR_Segment_pack(segp, first, &last, (void *) ((char *) outbuf + *position)); +- +- /* Ensure that calculation fits into an int datatype. */ +- MPIR_Ensure_Aint_fits_in_int((MPI_Aint) * position + last); +- +- *position = (int) ((MPI_Aint) * position + last); +- +- MPIR_Segment_free(segp); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Pack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Pack - Packs a datatype into contiguous memory + +@@ -235,10 +154,15 @@ int MPI_Pack(const void *inbuf, + /* ... body of routine ... */ + + position_x = *position; +- mpi_errno = MPIR_Pack_impl(inbuf, incount, datatype, outbuf, outsize, &position_x); +- MPIR_Assign_trunc(*position, position_x, int); ++ ++ MPI_Aint actual_pack_bytes; ++ void *buf = (void *) ((char *) outbuf + position_x); ++ mpi_errno = MPIR_Typerep_pack(inbuf, incount, datatype, 0, buf, outsize, &actual_pack_bytes); + if (mpi_errno) + goto fn_fail; ++ position_x += actual_pack_bytes; ++ ++ MPIR_Assign_trunc(*position, position_x, int); + + /* ... end of body of routine ... */ + +@@ -251,12 +175,12 @@ int MPI_Pack(const void *inbuf, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_pack", "**mpi_pack %p %d %D %p %d %p %C", inbuf, incount, + datatype, outbuf, outsize, position, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/pack_external.c ++++ b/src/mpi/datatype/pack_external.c +@@ -29,10 +29,6 @@ int MPI_Pack_external(const char datarep[], const void *inbuf, int incount, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Pack_external +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Pack_external - Packs a datatype into contiguous memory, using the + external32 format +@@ -66,9 +62,7 @@ int MPI_Pack_external(const char datarep[], + MPI_Datatype datatype, void *outbuf, MPI_Aint outsize, MPI_Aint * position) + { + int mpi_errno = MPI_SUCCESS; +- MPI_Aint first, last; + +- MPIR_Segment *segp; + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_PACK_EXTERNAL); + + MPIR_ERRTEST_INITIALIZED_ORDIE(); +@@ -109,37 +103,13 @@ int MPI_Pack_external(const char datarep[], + goto fn_exit; + } + +- segp = MPIR_Segment_alloc(); +- /* --BEGIN ERROR HANDLING-- */ +- if (segp == NULL) { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, +- FCNAME, +- __LINE__, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment"); ++ MPI_Aint actual_pack_bytes; ++ mpi_errno = ++ MPIR_Typerep_pack_external(inbuf, incount, datatype, (void *) ((char *) outbuf + *position), ++ &actual_pack_bytes); ++ if (mpi_errno) + goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- mpi_errno = MPIR_Segment_init(inbuf, incount, datatype, segp); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- /* NOTE: the use of buffer values and positions in MPI_Pack_external and +- * in MPIR_Segment_pack_external are quite different. See code or docs +- * or something. +- */ +- first = 0; +- last = SEGMENT_IGNORE_LAST; +- +- /* Ensure that pointer increment fits in a pointer */ +- MPIR_Ensure_Aint_fits_in_pointer((MPIR_VOID_PTR_CAST_TO_MPI_AINT outbuf) + *position); +- +- MPIR_Segment_pack_external32(segp, first, &last, (void *) ((char *) outbuf + *position)); +- +- *position += last; +- +- MPIR_Segment_free(segp); +- ++ *position += actual_pack_bytes; + /* ... end of body of routine ... */ + + fn_exit: +@@ -151,12 +121,12 @@ int MPI_Pack_external(const char datarep[], + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_pack_external", "**mpi_pack_external %s %p %d %D %p %d %p", + datarep, inbuf, incount, datatype, outbuf, outsize, position); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/pack_external_size.c ++++ b/src/mpi/datatype/pack_external_size.c +@@ -29,10 +29,6 @@ int MPI_Pack_external_size(const char datarep[], int incount, MPI_Datatype datat + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Pack_external_size +-#undef FCNAME +-#define FCNAME "MPI_Pack_external_size" + + /*@ + MPI_Pack_external_size - Returns the upper bound on the amount of +@@ -114,11 +110,11 @@ int MPI_Pack_external_size(const char datarep[], + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_pack_external_size", "**mpi_pack_external_size %s %d %D %p", + datarep, incount, datatype, size); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/pack_size.c ++++ b/src/mpi/datatype/pack_size.c +@@ -26,10 +26,6 @@ int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int *size) + #undef MPI_Pack_size + #define MPI_Pack_size PMPI_Pack_size + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Pack_size_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Pack_size_impl(int incount, MPI_Datatype datatype, MPI_Aint * size) + { + MPI_Aint typesize; +@@ -40,10 +36,6 @@ void MPIR_Pack_size_impl(int incount, MPI_Datatype datatype, MPI_Aint * size) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Pack_size +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Pack_size - Returns the upper bound on the amount of space needed to + pack a message +@@ -144,11 +136,11 @@ int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int *size) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_pack_size", "**mpi_pack_size %d %D %C %p", incount, + datatype, comm, size); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/register_datarep.c ++++ b/src/mpi/datatype/register_datarep.c +@@ -25,10 +25,6 @@ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Register_datarep +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Register_datarep - Register a set of user-provided data conversion + functions +@@ -77,7 +73,7 @@ int MPI_Register_datarep(char *datarep, + + /* FIXME UNIMPLEMENTED */ + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**notimpl", 0); + + /* ... end of body of routine ... */ +@@ -95,13 +91,13 @@ int MPI_Register_datarep(char *datarep, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_register_datarep", "**mpi_register_datarep %s %p %p %p %p", + datarep, read_conversion_fn, write_conversion_fn, + dtype_file_extent_fn, extra_state); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +deleted file mode 100644 +--- a/src/mpi/datatype/segment_states.h ++++ /dev/null +@@ -1,31 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#ifndef SEGMENT_STATES_H_INCLUDED +-#define SEGMENT_STATES_H_INCLUDED +- +-#define MPID_STATE_LIST_SEGMENT \ +-MPID_STATE_MPIR_SEGMENT_PACK, \ +-MPID_STATE_MPIR_SEGMENT_PACK_EXTERNAL, \ +-MPID_STATE_MPIR_SEGMENT_PACK_VECTOR, \ +-MPID_STATE_MPIR_SEGMENT_FLATTEN, \ +-MPID_STATE_MPIR_SEGMENT_COUNT_CONTIG_BLOCKS, \ +-MPID_STATE_MPIR_SEGMENT_UNPACK, \ +-MPID_STATE_MPIR_SEGMENT_UNPACK_EXTERNAL, \ +-MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV, \ +-MPID_STATE_MPIR_SEGMENT_VECTOR_FLATTEN, \ +-MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV, \ +-MPID_STATE_MPIR_SEGMENT_CONTIG_FLATTEN, \ +-MPID_STATE_MPIR_SEGMENT_CONTIG_COUNT_BLOCK, \ +-MPID_STATE_MPIR_SEGMENT_UNPACK_VECTOR, \ +-MPID_STATE_MPIR_SEGMENT_VECTOR_UNPACK_TO_BUF, \ +-MPID_STATE_MPIR_SEGMENT_CONTIG_UNPACK_TO_BUF, \ +-MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_BUF, \ +-MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_BUF, \ +-MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF, \ +-MPID_STATE_MPIR_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF, +- +-#endif /* SEGMENT_STATES_H_INCLUDED */ +--- a/src/mpi/datatype/status_set_elements.c ++++ b/src/mpi/datatype/status_set_elements.c +@@ -28,10 +28,6 @@ int MPI_Status_set_elements(MPI_Status * status, MPI_Datatype datatype, int coun + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Status_set_elements +-#undef FCNAME +-#define FCNAME "MPI_Status_set_elements" + + /*@ + MPI_Status_set_elements - Set the number of elements in a status +@@ -97,11 +93,11 @@ int MPI_Status_set_elements(MPI_Status * status, MPI_Datatype datatype, int coun + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_status_set_elements", "**mpi_status_set_elements %p %D %d", + status, datatype, count); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/status_set_elements_x.c ++++ b/src/mpi/datatype/status_set_elements_x.c +@@ -27,10 +27,6 @@ int MPI_Status_set_elements_x(MPI_Status * status, MPI_Datatype datatype, MPI_Co + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Status_set_elements_x_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Status_set_elements_x_impl(MPI_Status * status, MPI_Datatype datatype, MPI_Count count) + { + int mpi_errno = MPI_SUCCESS; +@@ -51,10 +47,6 @@ int MPIR_Status_set_elements_x_impl(MPI_Status * status, MPI_Datatype datatype, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Status_set_elements_x +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Status_set_elements_x - Set the number of elements in a status + +@@ -132,12 +124,12 @@ int MPI_Status_set_elements_x(MPI_Status * status, MPI_Datatype datatype, MPI_Co + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_status_set_elements_x", + "**mpi_status_set_elements_x %p %D %c", status, datatype, count); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_blockindexed.c ++++ b/src/mpi/datatype/type_blockindexed.c +@@ -59,16 +59,12 @@ int MPIR_Type_blockindexed(int count, + + /* handle is filled in by MPIR_Handle_obj_alloc() */ + MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 0; + new_dtp->is_committed = 0; + new_dtp->attributes = NULL; +- new_dtp->cache_id = 0; + new_dtp->name[0] = 0; + new_dtp->contents = NULL; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = -1; +- new_dtp->dataloop_depth = -1; ++ new_dtp->typerep = NULL; + + is_builtin = (HANDLE_GET_KIND(oldtype) == HANDLE_KIND_BUILTIN); + +@@ -153,10 +149,10 @@ int MPIR_Type_blockindexed(int count, + */ + new_dtp->is_contig = 0; + if (old_is_contig) { +- contig_count = MPIR_Type_blockindexed_count_contig(count, +- blocklength, +- displacement_array, +- dispinbytes, old_extent); ++ contig_count = MPII_Datatype_blockindexed_count_contig(count, ++ blocklength, ++ displacement_array, ++ dispinbytes, old_extent); + new_dtp->max_contig_blocks = contig_count; + if ((contig_count == 1) && ((MPI_Aint) new_dtp->size == new_dtp->extent)) { + new_dtp->is_contig = 1; +--- a/src/mpi/datatype/type_commit.c ++++ b/src/mpi/datatype/type_commit.c +@@ -25,17 +25,6 @@ int MPI_Type_commit(MPI_Datatype * datatype) __attribute__ ((weak, alias("PMPI_T + #undef MPI_Type_commit + #define MPI_Type_commit PMPI_Type_commit + +-/*@ +- MPIR_Type_commit +- +-Input Parameters: +-. datatype_p - pointer to MPI datatype +- +-Output Parameters: +- +- Return Value: +- 0 on success, -1 on failure. +-@*/ + int MPIR_Type_commit(MPI_Datatype * datatype_p) + { + int mpi_errno = MPI_SUCCESS; +@@ -48,39 +37,17 @@ int MPIR_Type_commit(MPI_Datatype * datatype_p) + if (datatype_ptr->is_committed == 0) { + datatype_ptr->is_committed = 1; + +-#ifdef MPID_NEEDS_DLOOP_ALL_BYTES +- /* If MPID implementation needs use to reduce everything to +- * a byte stream, do that. */ +- MPIR_Dataloop_create(*datatype_p, +- &datatype_ptr->dataloop, +- &datatype_ptr->dataloop_size, +- &datatype_ptr->dataloop_depth, MPIDU_DATALOOP_ALL_BYTES); +-#else +- MPIR_Dataloop_create(*datatype_p, +- &datatype_ptr->dataloop, +- &datatype_ptr->dataloop_size, +- &datatype_ptr->dataloop_depth, MPIR_DATALOOP_DEFAULT); +-#endif ++ MPIR_Typerep_create(*datatype_p, &datatype_ptr->typerep); + + MPL_DBG_MSG_D(MPIR_DBG_DATATYPE, TERSE, "# contig blocks = %d\n", + (int) datatype_ptr->max_contig_blocks); + +-#if 0 +- MPII_Dataloop_dot_printf(datatype_ptr->dataloop, 0, 1); +-#endif +- +-#ifdef MPID_Type_commit_hook + MPID_Type_commit_hook(datatype_ptr); +-#endif /* MPID_Type_commit_hook */ + + } + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_commit_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_commit_impl(MPI_Datatype * datatype) + { + int mpi_errno = MPI_SUCCESS; +@@ -106,10 +73,6 @@ int MPIR_Type_commit_impl(MPI_Datatype * datatype) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_commit +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_commit - Commits the datatype + +@@ -183,11 +146,11 @@ int MPI_Type_commit(MPI_Datatype * datatype) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_commit", "**mpi_type_commit %p", datatype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_contiguous.c ++++ b/src/mpi/datatype/type_contiguous.c +@@ -27,19 +27,6 @@ int MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype * newtype) + #undef MPI_Type_contiguous + #define MPI_Type_contiguous PMPI_Type_contiguous + +-/*@ +- MPIR_Type_contiguous - create a contiguous datatype +- +-Input Parameters: +-+ count - number of elements in the contiguous block +-- oldtype - type (using handle) of datatype on which vector is based +- +-Output Parameters: +-. newtype - handle of new contiguous datatype +- +- Return Value: +- MPI_SUCCESS on success, MPI error code on failure. +-@*/ + int MPIR_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype * newtype) + { + int mpi_errno = MPI_SUCCESS; +@@ -64,16 +51,12 @@ int MPIR_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype * newtype + + /* handle is filled in by MPIR_Handle_obj_alloc() */ + MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 0; + new_dtp->is_committed = 0; + new_dtp->attributes = NULL; +- new_dtp->cache_id = 0; + new_dtp->name[0] = 0; + new_dtp->contents = NULL; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = -1; +- new_dtp->dataloop_depth = -1; ++ new_dtp->typerep = NULL; + + is_builtin = (HANDLE_GET_KIND(oldtype) == HANDLE_KIND_BUILTIN); + +@@ -139,10 +122,6 @@ int MPIR_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype * newtype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_contiguous_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_contiguous_impl(int count, MPI_Datatype oldtype, MPI_Datatype * newtype) + { + int mpi_errno = MPI_SUCCESS; +@@ -170,10 +149,6 @@ int MPIR_Type_contiguous_impl(int count, MPI_Datatype oldtype, MPI_Datatype * ne + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_contiguous_x_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_contiguous_x_impl(MPI_Count count, MPI_Datatype oldtype, MPI_Datatype * newtype) + { + /* to make 'count' fit MPI-3 type processing routines (which take integer +@@ -223,10 +198,6 @@ int MPIR_Type_contiguous_x_impl(MPI_Count count, MPI_Datatype oldtype, MPI_Datat + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_contiguous +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_contiguous - Creates a contiguous datatype + +@@ -296,12 +267,12 @@ int MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype * newtype) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_contiguous", "**mpi_type_contiguous %d %D %p", count, + oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_create_darray.c ++++ b/src/mpi/datatype/type_create_darray.c +@@ -50,10 +50,6 @@ PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes, + #undef MPI_Type_create_darray + #define MPI_Type_create_darray PMPI_Type_create_darray + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes, + int dim, + int ndims, +@@ -80,7 +76,7 @@ PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes, + if (blksize <= 0) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**darrayblock", "**darrayblock %d", blksize); +@@ -89,7 +85,7 @@ PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes, + if (blksize * nprocs < global_size) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**darrayblock2", +@@ -111,7 +107,7 @@ PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**fail", 0); + return mpi_errno; + } +@@ -124,7 +120,7 @@ PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**fail", 0); + return mpi_errno; + } +@@ -136,7 +132,7 @@ PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**fail", 0); + return mpi_errno; + } +@@ -149,7 +145,7 @@ PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**fail", 0); + return mpi_errno; + } +@@ -165,10 +161,6 @@ PMPI_LOCAL int MPIR_Type_block(const int *array_of_gsizes, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_cyclic +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes, + int dim, + int ndims, +@@ -195,7 +187,7 @@ PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes, + if (blksize <= 0) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**darraycyclic", "**darraycyclic %d", blksize); +@@ -230,7 +222,7 @@ PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**fail", 0); + return mpi_errno; + } +@@ -254,7 +246,7 @@ PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**fail", 0); + return mpi_errno; + } +@@ -280,7 +272,7 @@ PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**fail", 0); + return mpi_errno; + } +@@ -295,7 +287,7 @@ PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**fail", 0); + return mpi_errno; + } +@@ -316,10 +308,6 @@ PMPI_LOCAL int MPIR_Type_cyclic(const int *array_of_gsizes, + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_darray +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_darray - Create a datatype representing a distributed array + +@@ -411,7 +399,7 @@ int MPI_Type_create_darray(int size, + if (order != MPI_ORDER_C && order != MPI_ORDER_FORTRAN) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, "**arg", "**arg %s", "order"); + goto fn_fail; +@@ -427,7 +415,7 @@ int MPI_Type_create_darray(int size, + (array_of_distribs[i] != MPI_DISTRIBUTE_CYCLIC)) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, MPI_ERR_ARG, "**darrayunknown", 0); + goto fn_fail; + } +@@ -435,7 +423,7 @@ int MPI_Type_create_darray(int size, + if ((array_of_dargs[i] != MPI_DISTRIBUTE_DFLT_DARG) && (array_of_dargs[i] <= 0)) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**arg", "**arg %s", "array_of_dargs"); +@@ -445,7 +433,7 @@ int MPI_Type_create_darray(int size, + if ((array_of_distribs[i] == MPI_DISTRIBUTE_NONE) && (array_of_psizes[i] != 1)) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**darraydist", +@@ -473,7 +461,7 @@ int MPI_Type_create_darray(int size, + if (size_with_aint != size_with_offset) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_FATAL, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**darrayoverflow", +@@ -707,14 +695,14 @@ int MPI_Type_create_darray(int size, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_darray", + "**mpi_type_create_darray %d %d %d %p %p %p %p %d %D %p", size, + rank, ndims, array_of_gsizes, array_of_distribs, array_of_dargs, + array_of_psizes, order, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_create_hindexed.c ++++ b/src/mpi/datatype/type_create_hindexed.c +@@ -30,10 +30,6 @@ int MPI_Type_create_hindexed(int count, const int array_of_blocklengths[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_hindexed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_hindexed - Create a datatype for an indexed datatype with + displacements in bytes +@@ -142,13 +138,13 @@ int MPI_Type_create_hindexed(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_hindexed", + "**mpi_type_create_hindexed %d %p %p %D %p", count, + array_of_blocklengths, array_of_displacements, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_create_hindexed_block.c ++++ b/src/mpi/datatype/type_create_hindexed_block.c +@@ -28,10 +28,6 @@ int MPI_Type_create_hindexed_block(int count, int blocklength, + #undef MPI_Type_create_hindexed_block + #define MPI_Type_create_hindexed_block PMPI_Type_create_hindexed_block + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_create_hindexed_block_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_create_hindexed_block_impl(int count, int blocklength, + const MPI_Aint array_of_displacements[], + MPI_Datatype oldtype, MPI_Datatype * newtype) +@@ -68,10 +64,6 @@ int MPIR_Type_create_hindexed_block_impl(int count, int blocklength, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_hindexed_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_hindexed_block - Create an hindexed + datatype with constant-sized blocks +@@ -153,13 +145,13 @@ int MPI_Type_create_hindexed_block(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_type_create_hindexed_block", + "**mpi_type_create_hindexed_block %d %d %p %D %p", count, + blocklength, array_of_displacements, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_create_hvector.c ++++ b/src/mpi/datatype/type_create_hvector.c +@@ -29,10 +29,6 @@ int MPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, MPI_Dat + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_hvector +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_hvector - Create a datatype with a constant stride given + in bytes +@@ -122,13 +118,13 @@ int MPI_Type_create_hvector(int count, + /* --BEGIN ERROR HANDLING-- */ + #ifdef HAVE_ERROR_CHECKING + { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_type_create_hvector", + "**mpi_type_create_hvector %d %d %d %D %p", count, + blocklength, stride, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_create_indexed_block.c ++++ b/src/mpi/datatype/type_create_indexed_block.c +@@ -27,10 +27,6 @@ int MPI_Type_create_indexed_block(int count, int blocklength, const int array_of + #undef MPI_Type_create_indexed_block + #define MPI_Type_create_indexed_block PMPI_Type_create_indexed_block + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_create_indexed_block_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_create_indexed_block_impl(int count, + int blocklength, + const int array_of_displacements[], +@@ -76,10 +72,6 @@ int MPIR_Type_create_indexed_block_impl(int count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_indexed_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_indexed_block - Create an indexed + datatype with constant-sized blocks +@@ -182,13 +174,13 @@ int MPI_Type_create_indexed_block(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_indexed_block", + "**mpi_type_create_indexed_block %d %d %p %D %p", count, + blocklength, array_of_displacements, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_create_pairtype.c ++++ b/src/mpi/datatype/type_create_pairtype.c +@@ -19,9 +19,8 @@ + type_size_ = sizeof(foo.a) + sizeof(foo.b); \ + type_extent_ = (MPI_Aint) sizeof(foo); \ + el_size_ = (sizeof(foo.a) == sizeof(foo.b)) ? (int) sizeof(foo.a) : -1; \ +- true_ub_ = (MPIR_VOID_PTR_CAST_TO_MPI_AINT ((char *) &foo.b - \ +- (char *) &foo.a)) + \ +- (MPI_Aint) sizeof(foo.b); \ ++ true_ub_ = ((MPI_Aint) ((char *) &foo.b - (char *) &foo.a)) + \ ++ (MPI_Aint) sizeof(foo.b); \ + alignsize_ = MPL_MAX(MPIR_Datatype_get_basic_size(mt1_), \ + MPIR_Datatype_get_basic_size(mt2_)); \ + } +@@ -64,22 +63,18 @@ Input Parameters: + @*/ + int MPIR_Type_create_pairtype(MPI_Datatype type, MPIR_Datatype * new_dtp) + { +- int err, mpi_errno = MPI_SUCCESS; ++ int mpi_errno = MPI_SUCCESS; + int type_size, alignsize; + MPI_Aint type_extent, true_ub, el_size; + + /* handle is filled in by MPIR_Handle_obj_alloc() */ + MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 1; + new_dtp->is_committed = 1; /* predefined types are pre-committed */ + new_dtp->attributes = NULL; +- new_dtp->cache_id = 0; + new_dtp->name[0] = 0; + new_dtp->contents = NULL; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = -1; +- new_dtp->dataloop_depth = -1; ++ new_dtp->typerep = NULL; + + switch (type) { + case MPI_FLOAT_INT: +@@ -162,39 +157,23 @@ int MPIR_Type_create_pairtype(MPI_Datatype type, MPIR_Datatype * new_dtp) + new_dtp->is_contig = (((MPI_Aint) type_size) == type_extent) ? 1 : 0; + new_dtp->max_contig_blocks = (((MPI_Aint) type_size) == type_extent) ? 1 : 2; + +- /* fill in dataloops -- only case where we precreate dataloops ++ /* fill in typereps -- only case where we precreate typereps + * + * this is necessary because these types aren't committed by the +- * user, which is the other place where we create dataloops. so ++ * user, which is the other place where we create typereps. so + * if the user uses one of these w/out building some more complex +- * type and then committing it, then the dataloop will be missing. ++ * type and then committing it, then the typerep will be missing. + */ + +-#ifdef MPID_NEEDS_DLOOP_ALL_BYTES +- /* If MPID implementation needs use to reduce everything to +- * a byte stream, do that. */ +- err = MPIR_Dataloop_create_pairtype(type, +- &(new_dtp->dataloop), +- &(new_dtp->dataloop_size), +- &(new_dtp->dataloop_depth), MPIDU_DATALOOP_ALL_BYTES); +-#else +- err = MPIR_Dataloop_create_pairtype(type, +- &(new_dtp->dataloop), +- &(new_dtp->dataloop_size), +- &(new_dtp->dataloop_depth), MPIR_DATALOOP_DEFAULT); +-#endif ++ MPIR_Typerep_create(type, &(new_dtp->typerep)); + +-#ifdef MPID_Type_commit_hook +- if (!err) { +- err = MPID_Type_commit_hook(new_dtp); +- } +-#endif /* MPID_Type_commit_hook */ ++ int err = MPID_Type_commit_hook(new_dtp); + + /* --BEGIN ERROR HANDLING-- */ + if (err) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- "MPIR_Dataloop_create_pairtype", ++ "MPID_Type_commit_hook", + __LINE__, MPI_ERR_OTHER, "**nomem", 0); + return mpi_errno; + +--- a/src/mpi/datatype/type_create_resized.c ++++ b/src/mpi/datatype/type_create_resized.c +@@ -56,25 +56,20 @@ int MPIR_Type_create_resized(MPI_Datatype oldtype, + + /* handle is filled in by MPIR_Handle_obj_alloc() */ + MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 0; + new_dtp->is_committed = 0; + new_dtp->attributes = 0; +- new_dtp->cache_id = 0; + new_dtp->name[0] = 0; + new_dtp->contents = 0; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = -1; +- new_dtp->dataloop_depth = -1; ++ new_dtp->typerep = NULL; + +- /* if oldtype is a basic, we build a contiguous dataloop of count = 1 */ ++ /* if oldtype is a basic, we build a contiguous typerep of count = 1 */ + if (HANDLE_GET_KIND(oldtype) == HANDLE_KIND_BUILTIN) { + int oldsize = MPIR_Datatype_get_basic_size(oldtype); + + new_dtp->size = oldsize; + new_dtp->has_sticky_ub = 0; + new_dtp->has_sticky_lb = 0; +- new_dtp->dataloop_depth = 1; + new_dtp->true_lb = 0; + new_dtp->lb = lb; + new_dtp->true_ub = oldsize; +@@ -95,7 +90,6 @@ int MPIR_Type_create_resized(MPI_Datatype oldtype, + new_dtp->size = old_dtp->size; + new_dtp->has_sticky_ub = 0; + new_dtp->has_sticky_lb = 0; +- new_dtp->dataloop_depth = old_dtp->dataloop_depth; + new_dtp->true_lb = old_dtp->true_lb; + new_dtp->lb = lb; + new_dtp->true_ub = old_dtp->true_ub; +@@ -120,10 +114,6 @@ int MPIR_Type_create_resized(MPI_Datatype oldtype, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_resized +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_resized - Create a datatype with a new lower bound and + extent from an existing datatype +@@ -210,13 +200,13 @@ int MPI_Type_create_resized(MPI_Datatype oldtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_resized", + "**mpi_type_create_resized %D %L %L %p", oldtype, lb, extent, + newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_create_struct.c ++++ b/src/mpi/datatype/type_create_struct.c +@@ -28,10 +28,6 @@ int MPI_Type_create_struct(int count, const int array_of_blocklengths[], + #undef MPI_Type_create_struct + #define MPI_Type_create_struct PMPI_Type_create_struct + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_create_struct_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_create_struct_impl(int count, + const int array_of_blocklengths[], + const MPI_Aint array_of_displacements[], +@@ -77,10 +73,6 @@ int MPIR_Type_create_struct_impl(int count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_struct +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_struct - Create an MPI datatype from a general set of + datatypes, displacements, and block sizes +@@ -169,14 +161,14 @@ int MPI_Type_create_struct(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_struct", + "**mpi_type_create_struct %d %p %p %p %p", count, + array_of_blocklengths, array_of_displacements, array_of_types, + newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_create_subarray.c ++++ b/src/mpi/datatype/type_create_subarray.c +@@ -29,10 +29,6 @@ int MPI_Type_create_subarray(int ndims, const int array_of_sizes[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_create_subarray +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_create_subarray - Create a datatype for a subarray of a regular, + multidimensional array +@@ -108,7 +104,7 @@ int MPI_Type_create_subarray(int ndims, + if (array_of_subsizes[i] > array_of_sizes[i]) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**argrange", +@@ -120,7 +116,7 @@ int MPI_Type_create_subarray(int ndims, + if (array_of_starts[i] > (array_of_sizes[i] - array_of_subsizes[i])) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**argrange", +@@ -134,7 +130,7 @@ int MPI_Type_create_subarray(int ndims, + if (order != MPI_ORDER_FORTRAN && order != MPI_ORDER_C) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, "**arg", "**arg %s", "order"); + goto fn_fail; +@@ -154,7 +150,7 @@ int MPI_Type_create_subarray(int ndims, + if (size_with_aint != size_with_offset) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_FATAL, +- FCNAME, ++ __func__, + __LINE__, + MPI_ERR_ARG, + "**subarrayoflow", +@@ -324,14 +320,14 @@ int MPI_Type_create_subarray(int ndims, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_create_subarray", + "**mpi_type_create_subarray %d %p %p %p %d %D %p", ndims, + array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, + newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_debug.c ++++ b/src/mpi/datatype/type_debug.c +@@ -20,11 +20,8 @@ + * + */ + +- +-void MPII_Datatype_dot_printf(MPI_Datatype type, int depth, int header); +-void MPII_Datatype_contents_printf(MPI_Datatype type, int depth, int acount); +-void MPII_Dataloop_dot_printf(MPIR_Dataloop * loop_p, int depth, int header); +-static char *MPII_Datatype_depth_spacing(int depth) ATTRIBUTE((unused)); ++static void contents_printf(MPI_Datatype type, int depth, int acount); ++static char *depth_spacing(int depth) ATTRIBUTE((unused)); + + #define NR_TYPE_CUTOFF 6 /* Number of types to display before truncating + * output. 6 picked as arbitrary cutoff */ +@@ -34,202 +31,6 @@ static char *MPII_Datatype_depth_spacing(int depth) ATTRIBUTE((unused)); + */ + + /* --BEGIN ERROR HANDLING-- */ +-void MPII_Dataloop_dot_printf(MPIR_Dataloop * loop_p, int depth, int header) +-{ +- int i; +- +- if (loop_p == NULL) { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "\n")); +- return; +- } +- +- if (header) { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- /* graphviz does not like the 0xNNN format */ +- "digraph %lld { {", (long long int) loop_p)); +- } +- +- switch (loop_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- " dl%d [shape = record, label = \"contig |{ ct = %d; el_sz = " +- MPI_AINT_FMT_DEC_SPEC "; el_ext = " +- MPI_AINT_FMT_DEC_SPEC " }\"];", depth, +- (int) loop_p->loop_params.c_t.count, +- (MPI_Aint) loop_p->el_size, +- (MPI_Aint) loop_p->el_extent)); +- break; +- case DLOOP_KIND_VECTOR: +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- " dl%d [shape = record, label = \"vector |{ ct = %d; blk = %d; str = " +- MPI_AINT_FMT_DEC_SPEC "; el_sz = " +- MPI_AINT_FMT_DEC_SPEC "; el_ext = " +- MPI_AINT_FMT_DEC_SPEC " }\"];", depth, +- (int) loop_p->loop_params.v_t.count, +- (int) loop_p->loop_params.v_t.blocksize, +- (MPI_Aint) loop_p->loop_params.v_t.stride, +- (MPI_Aint) loop_p->el_size, +- (MPI_Aint) loop_p->el_extent)); +- break; +- case DLOOP_KIND_INDEXED: +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- " dl%d [shape = record, label = \"indexed |{ ct = %d; tot_blks = %d; regions = ", +- depth, +- (int) loop_p->loop_params.i_t.count, +- (int) loop_p->loop_params.i_t.total_blocks)); +- +- for (i = 0; i < NR_TYPE_CUTOFF && i < loop_p->loop_params.i_t.count; i++) { +- if (i + 1 < loop_p->loop_params.i_t.count) { +- /* more regions after this one */ +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- "\\n(" MPI_AINT_FMT_DEC_SPEC ", %d), ", +- (MPI_Aint) loop_p->loop_params. +- i_t.offset_array[i], +- (int) loop_p->loop_params. +- i_t.blocksize_array[i])); +- } else { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- "\\n(" MPI_AINT_FMT_DEC_SPEC ", %d); ", +- (MPI_Aint) loop_p->loop_params. +- i_t.offset_array[i], +- (int) loop_p->loop_params. +- i_t.blocksize_array[i])); +- } +- } +- if (i < loop_p->loop_params.i_t.count) { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "\\n...; "); +- } +- +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- "\\nel_sz = " MPI_AINT_FMT_DEC_SPEC "; el_ext = " +- MPI_AINT_FMT_DEC_SPEC " }\"];\n", +- (MPI_Aint) loop_p->el_size, +- (MPI_Aint) loop_p->el_extent)); +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- " dl%d [shape = record, label = \"blockindexed |{ ct = %d; blk = %d; disps = ", +- depth, +- (int) loop_p->loop_params.bi_t.count, +- (int) loop_p->loop_params.bi_t.blocksize)); +- +- for (i = 0; i < NR_TYPE_CUTOFF && i < loop_p->loop_params.bi_t.count; i++) { +- if (i + 1 < loop_p->loop_params.bi_t.count) { +- /* more regions after this one */ +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- MPI_AINT_FMT_DEC_SPEC ",\\n ", +- (MPI_Aint) loop_p->loop_params. +- bi_t.offset_array[i])); +- } else { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- MPI_AINT_FMT_DEC_SPEC "; ", +- (MPI_Aint) loop_p->loop_params. +- bi_t.offset_array[i])); +- } +- } +- if (i < loop_p->loop_params.bi_t.count) { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "...; "); +- } +- +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- "\\nel_sz = " MPI_AINT_FMT_DEC_SPEC "; el_ext = " +- MPI_AINT_FMT_DEC_SPEC " }\"];", +- (MPI_Aint) loop_p->el_size, +- (MPI_Aint) loop_p->el_extent)); +- break; +- case DLOOP_KIND_STRUCT: +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- " dl%d [shape = record, label = \"struct | {ct = %d; blks = ", +- depth, (int) loop_p->loop_params.s_t.count)); +- for (i = 0; i < NR_TYPE_CUTOFF && i < loop_p->loop_params.s_t.count; i++) { +- if (i + 1 < loop_p->loop_params.s_t.count) { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "%d, ", +- (int) loop_p->loop_params. +- s_t.blocksize_array[i])); +- } else { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "%d; ", +- (int) loop_p->loop_params. +- s_t.blocksize_array[i])); +- } +- } +- if (i < loop_p->loop_params.s_t.count) { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "...; disps = "); +- } else { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "disps = "); +- } +- +- for (i = 0; i < NR_TYPE_CUTOFF && i < loop_p->loop_params.s_t.count; i++) { +- if (i + 1 < loop_p->loop_params.s_t.count) { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, MPI_AINT_FMT_DEC_SPEC ", ", +- (MPI_Aint) loop_p->loop_params. +- s_t.offset_array[i])); +- } else { +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, MPI_AINT_FMT_DEC_SPEC "; ", +- (MPI_Aint) loop_p->loop_params. +- s_t.offset_array[i])); +- } +- } +- if (i < loop_p->loop_params.s_t.count) { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "... }\"];"); +- } else { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "}\"];"); +- } +- break; +- default: +- MPIR_Assert(0); +- } +- +- if (!(loop_p->kind & DLOOP_FINAL_MASK)) { +- /* more loops to go; recurse */ +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, +- " dl%d -> dl%d;\n", depth, depth + 1)); +- switch (loop_p->kind & DLOOP_KIND_MASK) { +- case DLOOP_KIND_CONTIG: +- MPII_Dataloop_dot_printf(loop_p->loop_params.c_t.dataloop, depth + 1, 0); +- break; +- case DLOOP_KIND_VECTOR: +- MPII_Dataloop_dot_printf(loop_p->loop_params.v_t.dataloop, depth + 1, 0); +- break; +- case DLOOP_KIND_INDEXED: +- MPII_Dataloop_dot_printf(loop_p->loop_params.i_t.dataloop, depth + 1, 0); +- break; +- case DLOOP_KIND_BLOCKINDEXED: +- MPII_Dataloop_dot_printf(loop_p->loop_params.bi_t.dataloop, depth + 1, 0); +- break; +- case DLOOP_KIND_STRUCT: +- for (i = 0; i < loop_p->loop_params.s_t.count; i++) { +- MPII_Dataloop_dot_printf(loop_p->loop_params.s_t.dataloop_array[i], +- depth + 1, 0); +- } +- break; +- default: +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, " < unsupported type >"); +- } +- } +- +- +- if (header) { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, " }\n}"); +- } +- return; +-} +- +-void MPII_Datatype_dot_printf(MPI_Datatype type, int depth, int header) +-{ +- if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) { +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "MPII_Datatype_dot_printf: type is a basic"); +- return; +- } else { +- MPIR_Datatype *dt_p; +- MPIR_Dataloop *loop_p; +- +- MPIR_Datatype_get_ptr(type, dt_p); +- loop_p = dt_p->dataloop; +- +- MPII_Dataloop_dot_printf(loop_p, depth, header); +- return; +- } +-} + + void MPII_Datatype_printf(MPI_Datatype type, + int depth, MPI_Aint displacement, int blocklength, int header) +@@ -450,6 +251,7 @@ char *MPIR_Datatype_combiner_to_string(int combiner) + static char c_f90_complex[] = "f90_complex"; + static char c_f90_integer[] = "f90_integer"; + static char c_resized[] = "resized"; ++ static char c_other[] = "not builtin"; + + if (combiner == MPI_COMBINER_NAMED) + return c_named; +@@ -490,7 +292,7 @@ char *MPIR_Datatype_combiner_to_string(int combiner) + if (combiner == MPI_COMBINER_RESIZED) + return c_resized; + +- return NULL; ++ return c_other; + } + + /* --BEGIN DEBUG-- */ +@@ -502,7 +304,9 @@ char *MPIR_Datatype_combiner_to_string(int combiner) + void MPIR_Datatype_debug(MPI_Datatype type, int array_ct) + { + int is_builtin; ++#if (defined HAVE_ERROR_CHECKING) || (defined MPL_USE_DBG_LOGGING) + const char *string; ++#endif + MPIR_Datatype *dtp ATTRIBUTE((unused)); + + is_builtin = (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN); +@@ -515,12 +319,12 @@ void MPIR_Datatype_debug(MPI_Datatype type, int array_ct) + (MPL_DBG_FDEST, "# MPIU_Datatype_debug: MPI_Datatype = MPI_DATATYPE_NULL")); + return; + } +- ++#if (defined HAVE_ERROR_CHECKING) || (defined MPL_USE_DBG_LOGGING) + string = MPIR_Datatype_builtin_to_string(type); +- MPIR_Assert(string != NULL); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, + "# MPIU_Datatype_debug: MPI_Datatype = 0x%0x (%s)", type, + (is_builtin) ? string : "derived")); ++#endif + + if (is_builtin) + return; +@@ -528,6 +332,7 @@ void MPIR_Datatype_debug(MPI_Datatype type, int array_ct) + MPIR_Datatype_get_ptr(type, dtp); + MPIR_Assert(dtp != NULL); + ++#if (defined HAVE_ERROR_CHECKING) || (defined MPL_USE_DBG_LOGGING) + string = MPIR_Datatype_builtin_to_string(dtp->basic_type); + MPIR_Assert(string != NULL); + +@@ -546,15 +351,16 @@ void MPIR_Datatype_debug(MPI_Datatype type, int array_ct) + -1 ? "multiple types" : + string, + dtp->is_contig ? "is N contig" : "is not N contig")); ++#endif + + MPL_DBG_OUT(MPIR_DBG_DATATYPE, "# Contents:"); +- MPII_Datatype_contents_printf(type, 0, array_ct); ++ contents_printf(type, 0, array_ct); + +- MPL_DBG_OUT(MPIR_DBG_DATATYPE, "# Dataloop:"); +- MPII_Datatype_dot_printf(type, 0, 1); ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "# Typerep:"); ++ MPIR_Typerep_debug(type); + } + +-static char *MPII_Datatype_depth_spacing(int depth) ++static char *depth_spacing(int depth) + { + static char d0[] = ""; + static char d1[] = " "; +@@ -585,7 +391,7 @@ static char *MPII_Datatype_depth_spacing(int depth) + if (cp->nr_types > 0) MPL_free(types); \ + return; } + +-void MPII_Datatype_contents_printf(MPI_Datatype type, int depth, int acount) ++static void contents_printf(MPI_Datatype type, int depth, int acount) + { + int i; + MPIR_Datatype *dtp; +@@ -594,15 +400,16 @@ void MPII_Datatype_contents_printf(MPI_Datatype type, int depth, int acount) + MPI_Aint *aints = NULL; + MPI_Datatype *types = NULL; + int *ints = NULL; +- const char *string; + ++#if (defined HAVE_ERROR_CHECKING) || (defined MPL_USE_DBG_LOGGING) + if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) { +- string = MPIR_Datatype_builtin_to_string(type); ++ const char *string = MPIR_Datatype_builtin_to_string(type); + MPIR_Assert(string != NULL); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %stype: %s\n", +- MPII_Datatype_depth_spacing(depth), string)); ++ depth_spacing(depth), string)); + return; + } ++#endif + + MPIR_Datatype_get_ptr(type, dtp); + cp = dtp->contents; +@@ -629,12 +436,14 @@ void MPII_Datatype_contents_printf(MPI_Datatype type, int depth, int acount) + MPIR_Assert(types != NULL); + MPII_Datatype_get_contents_types(cp, types); + } +- +- +- string = MPIR_Datatype_combiner_to_string(cp->combiner); +- MPIR_Assert(string != NULL); +- MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %scombiner: %s", +- MPII_Datatype_depth_spacing(depth), string)); ++#if (defined HAVE_ERROR_CHECKING) || (defined MPL_USE_DBG_LOGGING) ++ { ++ const char *string = MPIR_Datatype_combiner_to_string(cp->combiner); ++ MPIR_Assert(string != NULL); ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %scombiner: %s", ++ depth_spacing(depth), string)); ++ } ++#endif + + switch (cp->combiner) { + case MPI_COMBINER_NAMED: +@@ -645,78 +454,77 @@ void MPII_Datatype_contents_printf(MPI_Datatype type, int depth, int acount) + case MPI_COMBINER_CONTIGUOUS: + MPIR_Assert((ints != NULL) && (types != NULL)); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %scontig ct = %d\n", +- MPII_Datatype_depth_spacing(depth), *ints)); +- MPII_Datatype_contents_printf(*types, depth + 1, acount); ++ depth_spacing(depth), *ints)); ++ contents_printf(*types, depth + 1, acount); + MPII_DATATYPE_FREE_AND_RETURN; + case MPI_COMBINER_VECTOR: + MPIR_Assert((ints != NULL) && (types != NULL)); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, + "# %svector ct = %d, blk = %d, str = %d\n", +- MPII_Datatype_depth_spacing(depth), +- ints[0], ints[1], ints[2])); +- MPII_Datatype_contents_printf(*types, depth + 1, acount); ++ depth_spacing(depth), ints[0], ints[1], ints[2])); ++ contents_printf(*types, depth + 1, acount); + MPII_DATATYPE_FREE_AND_RETURN; + case MPI_COMBINER_HVECTOR: + MPIR_Assert((ints != NULL) && (aints != NULL) && (types != NULL)); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, + "# %shvector ct = %d, blk = %d, str = " + MPI_AINT_FMT_DEC_SPEC "\n", +- MPII_Datatype_depth_spacing(depth), ints[0], ++ depth_spacing(depth), ints[0], + ints[1], (MPI_Aint) aints[0])); +- MPII_Datatype_contents_printf(*types, depth + 1, acount); ++ contents_printf(*types, depth + 1, acount); + MPII_DATATYPE_FREE_AND_RETURN; + case MPI_COMBINER_INDEXED: + MPIR_Assert((ints != NULL) && (types != NULL)); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %sindexed ct = %d:", +- MPII_Datatype_depth_spacing(depth), ints[0])); ++ depth_spacing(depth), ints[0])); + for (i = 0; i < acount && i < ints[0]; i++) { + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, + "# %s indexed [%d]: blk = %d, disp = %d\n", +- MPII_Datatype_depth_spacing(depth), ++ depth_spacing(depth), + i, + ints[i + 1], ints[i + (cp->nr_ints / 2) + 1])); +- MPII_Datatype_contents_printf(*types, depth + 1, acount); ++ contents_printf(*types, depth + 1, acount); + } + MPII_DATATYPE_FREE_AND_RETURN; + case MPI_COMBINER_HINDEXED: + MPIR_Assert((ints != NULL) && (aints != NULL) && (types != NULL)); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %shindexed ct = %d:", +- MPII_Datatype_depth_spacing(depth), ints[0])); ++ depth_spacing(depth), ints[0])); + for (i = 0; i < acount && i < ints[0]; i++) { + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, + "# %s hindexed [%d]: blk = %d, disp = " + MPI_AINT_FMT_DEC_SPEC "\n", +- MPII_Datatype_depth_spacing(depth), i, ++ depth_spacing(depth), i, + (int) ints[i + 1], (MPI_Aint) aints[i])); +- MPII_Datatype_contents_printf(*types, depth + 1, acount); ++ contents_printf(*types, depth + 1, acount); + } + MPII_DATATYPE_FREE_AND_RETURN; + case MPI_COMBINER_STRUCT: + MPIR_Assert((ints != NULL) && (aints != NULL) && (types != NULL)); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %sstruct ct = %d:", +- MPII_Datatype_depth_spacing(depth), (int) ints[0])); ++ depth_spacing(depth), (int) ints[0])); + for (i = 0; i < acount && i < ints[0]; i++) { + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, + "# %s struct[%d]: blk = %d, disp = " + MPI_AINT_FMT_DEC_SPEC "\n", +- MPII_Datatype_depth_spacing(depth), i, ++ depth_spacing(depth), i, + (int) ints[i + 1], (MPI_Aint) aints[i])); +- MPII_Datatype_contents_printf(types[i], depth + 1, acount); ++ contents_printf(types[i], depth + 1, acount); + } + MPII_DATATYPE_FREE_AND_RETURN; + case MPI_COMBINER_SUBARRAY: + MPIR_Assert((ints != NULL) && (types != NULL)); + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %ssubarray ct = %d:", +- MPII_Datatype_depth_spacing(depth), (int) ints[0])); ++ depth_spacing(depth), (int) ints[0])); + for (i = 0; i < acount && i < ints[0]; i++) { + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, + "# %s sizes[%d] = %d subsizes[%d] = %d starts[%d] = %d\n", +- MPII_Datatype_depth_spacing(depth), ++ depth_spacing(depth), + i, (int) ints[i + 1], + i, (int) ints[i + ints[0] + 1], + i, (int) ints[2 * ints[0] + 1])); + } +- MPII_Datatype_contents_printf(*types, depth + 1, acount); ++ contents_printf(*types, depth + 1, acount); + MPII_DATATYPE_FREE_AND_RETURN; + + case MPI_COMBINER_RESIZED: +@@ -724,13 +532,12 @@ void MPII_Datatype_contents_printf(MPI_Datatype type, int depth, int acount) + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, + (MPL_DBG_FDEST, + "# %sresized lb = " MPI_AINT_FMT_DEC_SPEC " extent = " +- MPI_AINT_FMT_DEC_SPEC "\n", MPII_Datatype_depth_spacing(depth), +- aints[0], aints[1])); +- MPII_Datatype_contents_printf(*types, depth + 1, acount); ++ MPI_AINT_FMT_DEC_SPEC "\n", depth_spacing(depth), aints[0], aints[1])); ++ contents_printf(*types, depth + 1, acount); + MPII_DATATYPE_FREE_AND_RETURN; + default: + MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "# %sunhandled combiner", +- MPII_Datatype_depth_spacing(depth))); ++ depth_spacing(depth))); + MPII_DATATYPE_FREE_AND_RETURN; + } + } +--- a/src/mpi/datatype/type_dup.c ++++ b/src/mpi/datatype/type_dup.c +@@ -28,22 +28,6 @@ int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype * newtype) + + #endif + +-/*@ +- MPIR_Type_dup - create a copy of a datatype +- +-Input Parameters: +-- oldtype - handle of original datatype +- +-Output Parameters: +-. newtype - handle of newly created copy of datatype +- +- Return Value: +- 0 on success, MPI error code on failure. +-@*/ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_dup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_dup(MPI_Datatype oldtype, MPI_Datatype * newtype) + { + int mpi_errno = MPI_SUCCESS; +@@ -82,29 +66,25 @@ int MPIR_Type_dup(MPI_Datatype oldtype, MPI_Datatype * newtype) + new_dtp->alignsize = old_dtp->alignsize; + new_dtp->has_sticky_ub = old_dtp->has_sticky_ub; + new_dtp->has_sticky_lb = old_dtp->has_sticky_lb; +- new_dtp->is_permanent = old_dtp->is_permanent; + new_dtp->is_committed = old_dtp->is_committed; + + new_dtp->attributes = NULL; /* Attributes are copied in the + * top-level MPI_Type_dup routine */ +- new_dtp->cache_id = -1; /* ??? */ + new_dtp->name[0] = 0; /* The Object name is not copied on + * a dup */ + new_dtp->n_builtin_elements = old_dtp->n_builtin_elements; + new_dtp->builtin_element_size = old_dtp->builtin_element_size; + new_dtp->basic_type = old_dtp->basic_type; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = old_dtp->dataloop_size; +- new_dtp->dataloop_depth = old_dtp->dataloop_depth; ++ new_dtp->max_contig_blocks = old_dtp->max_contig_blocks; ++ ++ new_dtp->typerep = NULL; + *newtype = new_dtp->handle; + + if (old_dtp->is_committed) { +- MPIR_Assert(old_dtp->dataloop != NULL); +- MPIR_Dataloop_dup(old_dtp->dataloop, old_dtp->dataloop_size, &new_dtp->dataloop); +-#ifdef MPID_Type_commit_hook ++ MPIR_Assert(old_dtp->typerep != NULL); ++ MPIR_Typerep_dup(old_dtp->typerep, &new_dtp->typerep); + MPID_Type_commit_hook(new_dtp); +-#endif /* MPID_Type_commit_hook */ + } + } + +@@ -131,10 +111,6 @@ Output Parameters: + .N MPI_SUCCESS + .N MPI_ERR_TYPE + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_dup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype * newtype) + { + int mpi_errno = MPI_SUCCESS; +@@ -224,11 +200,11 @@ int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype * newtype) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_dup", "**mpi_type_dup %D %p", oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_extent.c ++++ b/src/mpi/datatype/type_extent.c +@@ -28,10 +28,6 @@ int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint * extent) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_extent +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_extent - Returns the extent of a datatype + +@@ -109,10 +105,10 @@ int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint * extent) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_extent", "**mpi_type_extent %D %p", datatype, extent); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +deleted file mode 100644 +--- a/src/mpi/datatype/type_flatten.c ++++ /dev/null +@@ -1,60 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +- +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include +-#include +-#include +- +-/*@ +- MPIR_Type_flatten +- +-Input Parameters: +-. type - MPI Datatype (must have been committed) +- +-Output Parameters: +-. nr_blocks_p - pointer to int in which to store the number of contiguous blocks in the type +- +- +- Return Value: +- 0 on success, -1 on failure. +-@*/ +- +-int MPIR_Type_flatten(MPI_Datatype type, +- MPI_Aint * off_array, MPI_Aint * size_array, MPI_Aint * array_len_p) +-{ +- int err; +- MPI_Aint first, last; +- MPIR_Datatype *datatype_ptr ATTRIBUTE((unused)); +- MPIR_Segment *segp; +- +- if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) { +- off_array[0] = 0; +- MPIR_Datatype_get_size_macro(type, size_array[0]); +- *array_len_p = 1; +- return 0; +- } +- +- MPIR_Datatype_get_ptr(type, datatype_ptr); +- MPIR_Assert(datatype_ptr->is_committed); +- MPIR_Assert(*array_len_p >= datatype_ptr->max_contig_blocks); +- +- segp = MPIR_Segment_alloc(); +- err = MPIR_Segment_init(0, 1, type, segp); /* first 0 is bufptr, +- * 1 is count +- */ +- if (err) +- return err; +- +- first = 0; +- last = SEGMENT_IGNORE_LAST; +- +- MPIR_Segment_flatten(segp, first, &last, off_array, size_array, array_len_p); +- +- MPIR_Segment_free(segp); +- +- return 0; +-} +--- a/src/mpi/datatype/type_free.c ++++ b/src/mpi/datatype/type_free.c +@@ -25,10 +25,6 @@ int MPI_Type_free(MPI_Datatype * datatype) __attribute__ ((weak, alias("PMPI_Typ + #undef MPI_Type_free + #define MPI_Type_free PMPI_Type_free + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_free_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Type_free_impl(MPI_Datatype * datatype) + { + MPIR_Datatype *datatype_ptr = NULL; +@@ -41,10 +37,6 @@ void MPIR_Type_free_impl(MPI_Datatype * datatype) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_free - Frees the datatype + +@@ -104,7 +96,8 @@ int MPI_Type_free(MPI_Datatype * datatype) + if (HANDLE_GET_KIND(*datatype) == HANDLE_KIND_BUILTIN) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_TYPE, "**dtypeperm", 0); ++ __func__, __LINE__, MPI_ERR_TYPE, "**dtypeperm", ++ 0); + goto fn_fail; + } + +@@ -117,7 +110,8 @@ int MPI_Type_free(MPI_Datatype * datatype) + *datatype == MPI_SHORT_INT || *datatype == MPI_LONG_DOUBLE_INT) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_TYPE, "**dtypeperm", 0); ++ __func__, __LINE__, MPI_ERR_TYPE, "**dtypeperm", ++ 0); + goto fn_fail; + } + /* Validate parameters, especially handles needing to be converted */ +@@ -150,10 +144,10 @@ int MPI_Type_free(MPI_Datatype * datatype) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_free", "**mpi_type_free %p", datatype); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/type_get_contents.c ++++ b/src/mpi/datatype/type_get_contents.c +@@ -7,7 +7,7 @@ + + #include "mpiimpl.h" + #include "mpir_datatype.h" +-#include "mpir_dataloop.h" ++#include "mpir_typerep.h" + #include "datatype.h" + + /* -- Begin Profiling Symbol Block for routine MPI_Type_get_contents */ +@@ -31,21 +31,6 @@ int MPI_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addre + #undef MPI_Type_get_contents + #define MPI_Type_get_contents PMPI_Type_get_contents + +-/*@ +- MPIR_Type_get_contents - get content information from datatype +- +-Input Parameters: +-+ datatype - MPI datatype +-. max_integers - size of array_of_integers +-. max_addresses - size of array_of_addresses +-- max_datatypes - size of array_of_datatypes +- +-Output Parameters: +-+ array_of_integers - integers used in creating type +-. array_of_addresses - MPI_Aints used in creating type +-- array_of_datatypes - MPI_Datatypes used in creating type +- +-@*/ + int MPIR_Type_get_contents(MPI_Datatype datatype, + int max_integers, + int max_addresses, +@@ -105,10 +90,6 @@ int MPIR_Type_get_contents(MPI_Datatype datatype, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_get_contents +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_get_contents - get type contents + +@@ -167,7 +148,7 @@ int MPI_Type_get_contents(MPI_Datatype datatype, + if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_TYPE, "**contentspredef", 0); + goto fn_fail; + } +@@ -181,7 +162,7 @@ int MPI_Type_get_contents(MPI_Datatype datatype, + datatype == MPI_SHORT_INT || datatype == MPI_LONG_DOUBLE_INT) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_TYPE, "**contentspredef", 0); + goto fn_fail; + } +@@ -221,14 +202,14 @@ int MPI_Type_get_contents(MPI_Datatype datatype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_get_contents", + "**mpi_type_get_contents %D %d %d %d %p %p %p", datatype, + max_integers, max_addresses, max_datatypes, array_of_integers, + array_of_addresses, array_of_datatypes); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_get_envelope.c ++++ b/src/mpi/datatype/type_get_envelope.c +@@ -27,10 +27,6 @@ int MPI_Type_get_envelope(MPI_Datatype datatype, int *num_integers, int *num_add + #undef MPI_Type_get_envelope + #define MPI_Type_get_envelope PMPI_Type_get_envelope + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_get_envelope +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Type_get_envelope(MPI_Datatype datatype, + int *num_integers, + int *num_addresses, int *num_datatypes, int *combiner) +@@ -58,10 +54,6 @@ void MPIR_Type_get_envelope(MPI_Datatype datatype, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_get_envelope +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_get_envelope - get type envelope + +@@ -139,12 +131,12 @@ int MPI_Type_get_envelope(MPI_Datatype datatype, + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_get_envelope", + "**mpi_type_get_envelope %D %p %p %p %p", datatype, num_integers, + num_addresses, num_datatypes, combiner); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/datatype/type_get_extent.c ++++ b/src/mpi/datatype/type_get_extent.c +@@ -26,10 +26,6 @@ int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent) + #undef MPI_Type_get_extent + #define MPI_Type_get_extent PMPI_Type_get_extent + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_get_extent_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Type_get_extent_impl(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent) + { + MPI_Count lb_x, extent_x; +@@ -41,10 +37,6 @@ void MPIR_Type_get_extent_impl(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_get_extent +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_get_extent - Get the lower bound and extent for a Datatype + +@@ -122,11 +114,11 @@ int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_get_extent", "**mpi_type_get_extent %D %p %p", + datatype, lb, extent); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/type_get_extent_x.c ++++ b/src/mpi/datatype/type_get_extent_x.c +@@ -27,10 +27,6 @@ int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count * lb, MPI_Count * ext + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_get_extent_x_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Type_get_extent_x_impl(MPI_Datatype datatype, MPI_Count * lb, MPI_Count * extent) + { + MPIR_Datatype *datatype_ptr = NULL; +@@ -48,10 +44,6 @@ void MPIR_Type_get_extent_x_impl(MPI_Datatype datatype, MPI_Count * lb, MPI_Coun + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_get_extent_x +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_get_extent_x - Get the lower bound and extent as MPI_Count values + for a Datatype +@@ -131,11 +123,11 @@ int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count * lb, MPI_Count * ext + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_get_extent_x", "**mpi_type_get_extent_x %D %p %p", + datatype, lb, extent); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/datatype/type_get_name.c ++++ b/src/mpi/datatype/type_get_name.c +@@ -55,10 +55,10 @@ static mpi_names_t mpi_names[] = { + type_name_entry(MPI_FLOAT), + type_name_entry(MPI_DOUBLE), + type_name_entry(MPI_LONG_DOUBLE), +- /* LONG_LONG_INT is allowed as an alias; we don't make it a separate ++ /* LONG_LONG is a synonym of LONG_LONG_INT; we don't make it a separate + * type */ +-/* type_name_entry(MPI_LONG_LONG_INT), */ +- type_name_entry(MPI_LONG_LONG), ++/* type_name_entry(MPI_LONG_LONG), */ ++ type_name_entry(MPI_LONG_LONG_INT), + type_name_entry(MPI_UNSIGNED_LONG_LONG), + type_name_entry(MPI_PACKED), + type_name_entry(MPI_LB), +@@ -110,7 +110,10 @@ static mpi_names_t mpi_names[] = { + type_name_entry(MPI_UINT32_T), + type_name_entry(MPI_UINT64_T), + type_name_entry(MPI_C_BOOL), +- type_name_entry(MPI_C_FLOAT_COMPLEX), ++ /* C_FLOAT_COMPLEX is a synonym of C_COMPLEX; we don't make it a separate ++ * type */ ++/* type_name_entry(MPI_C_FLOAT_COMPLEX), */ ++ type_name_entry(MPI_C_COMPLEX), + type_name_entry(MPI_C_DOUBLE_COMPLEX), + type_name_entry(MPI_C_LONG_DOUBLE_COMPLEX), + +@@ -141,10 +144,6 @@ static mpi_names_t mpi_maxloc_names[] = { + #undef type_name_entry + /* This routine is also needed by type_set_name */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Datatype_init_names +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Datatype_init_names(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -214,10 +213,6 @@ int MPIR_Datatype_init_names(void) + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_get_name +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_get_name - Get the print name for a datatype + +@@ -311,12 +306,12 @@ int MPI_Type_get_name(MPI_Datatype datatype, char *type_name, int *resultlen) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_get_name", "**mpi_type_get_name %D %p %p", datatype, + type_name, resultlen); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_get_true_extent.c ++++ b/src/mpi/datatype/type_get_true_extent.c +@@ -26,10 +26,6 @@ int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint * true_lb, MPI_Aint + #undef MPI_Type_get_true_extent + #define MPI_Type_get_true_extent PMPI_Type_get_true_extent + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_get_true_extent_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Type_get_true_extent_impl(MPI_Datatype datatype, MPI_Aint * true_lb, + MPI_Aint * true_extent) + { +@@ -42,10 +38,6 @@ void MPIR_Type_get_true_extent_impl(MPI_Datatype datatype, MPI_Aint * true_lb, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_get_true_extent +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_get_true_extent - Get the true lower bound and extent for a + datatype +@@ -124,12 +116,12 @@ int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint * true_lb, MPI_Aint + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_get_true_extent", + "**mpi_type_get_true_extent %D %p %p", datatype, true_lb, + true_extent); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/type_get_true_extent_x.c ++++ b/src/mpi/datatype/type_get_true_extent_x.c +@@ -27,10 +27,6 @@ int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count * lb, MPI_Count + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_get_true_extent_x_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Type_get_true_extent_x_impl(MPI_Datatype datatype, MPI_Count * true_lb, + MPI_Count * true_extent) + { +@@ -49,10 +45,6 @@ void MPIR_Type_get_true_extent_x_impl(MPI_Datatype datatype, MPI_Count * true_lb + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_get_true_extent_x +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_get_true_extent_x - Get the true lower bound and extent as MPI_Count + values for a datatype +@@ -132,12 +124,12 @@ int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count * true_lb, MPI_C + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_get_true_extent_x", + "**mpi_type_get_true_extent_x %D %p %p", datatype, true_lb, + true_extent); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/datatype/type_hindexed.c ++++ b/src/mpi/datatype/type_hindexed.c +@@ -29,10 +29,6 @@ int MPI_Type_hindexed(int count, int *array_of_blocklengths, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_hindexed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_hindexed - Creates an indexed datatype with offsets in bytes + +@@ -167,12 +163,12 @@ int MPI_Type_hindexed(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_hindexed", "**mpi_type_hindexed %d %p %p %D %p", count, + array_of_blocklengths, array_of_displacements, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_hvector.c ++++ b/src/mpi/datatype/type_hvector.c +@@ -26,10 +26,6 @@ int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype o + #undef MPI_Type_hvector + #define MPI_Type_hvector PMPI_Type_hvector + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_hvector_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_hvector_impl(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, + MPI_Datatype * newtype) + { +@@ -64,10 +60,6 @@ int MPIR_Type_hvector_impl(int count, int blocklength, MPI_Aint stride, MPI_Data + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_hvector +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_hvector - type_hvector + +@@ -140,12 +132,12 @@ int MPI_Type_hvector(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_hvector", "**mpi_type_hvector %d %d %d %D %p", count, + blocklength, stride, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_indexed.c ++++ b/src/mpi/datatype/type_indexed.c +@@ -28,26 +28,6 @@ int MPI_Type_indexed(int count, const int *array_of_blocklengths, + #undef MPI_Type_indexed + #define MPI_Type_indexed PMPI_Type_indexed + +-/*@ +- MPIR_Type_indexed - create an indexed datatype +- +-Input Parameters: +-+ count - number of blocks in type +-. blocklength_array - number of elements in each block +-. displacement_array - offsets of blocks from start of type (see next +- parameter for units) +-. dispinbytes - if nonzero, then displacements are in bytes (the +- displacement_array is an array of ints), otherwise they in terms of +- extent of oldtype (the displacement_array is an array of MPI_Aints) +-- oldtype - type (using handle) of datatype on which new type is based +- +-Output Parameters: +-. newtype - handle of new indexed datatype +- +- Return Value: +- 0 on success, -1 on failure. +-@*/ +- + int MPIR_Type_indexed(int count, + const int *blocklength_array, + const void *displacement_array, +@@ -69,7 +49,7 @@ int MPIR_Type_indexed(int count, + + /* sanity check that blocklens are all non-negative */ + for (i = 0; i < count; ++i) { +- DLOOP_Assert(blocklength_array[i] >= 0); ++ MPIR_Assert(blocklength_array[i] >= 0); + } + + /* allocate new datatype object and handle */ +@@ -86,22 +66,18 @@ int MPIR_Type_indexed(int count, + + /* handle is filled in by MPIR_Handle_obj_alloc() */ + MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 0; + new_dtp->is_committed = 0; + new_dtp->attributes = NULL; +- new_dtp->cache_id = 0; + new_dtp->name[0] = 0; + new_dtp->contents = NULL; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = -1; +- new_dtp->dataloop_depth = -1; ++ new_dtp->typerep = NULL; + + is_builtin = (HANDLE_GET_KIND(oldtype) == HANDLE_KIND_BUILTIN); + + if (is_builtin) { + /* builtins are handled differently than user-defined types because +- * they have no associated dataloop or datatype structure. ++ * they have no associated typerep or datatype structure. + */ + el_sz = MPIR_Datatype_get_basic_size(oldtype); + old_sz = el_sz; +@@ -146,6 +122,8 @@ int MPIR_Type_indexed(int count, + + new_dtp->has_sticky_lb = old_dtp->has_sticky_lb; + new_dtp->has_sticky_ub = old_dtp->has_sticky_ub; ++ ++ new_dtp->alignsize = old_dtp->alignsize; + new_dtp->builtin_element_size = (MPI_Aint) el_sz; + new_dtp->basic_type = el_type; + +@@ -216,9 +194,10 @@ int MPIR_Type_indexed(int count, + MPIR_Assert(blklens != NULL); + for (i = 0; i < count; i++) + blklens[i] = blocklength_array[i]; +- contig_count = MPIR_Type_indexed_count_contig(count, +- blklens, +- displacement_array, dispinbytes, old_extent); ++ contig_count = MPII_Datatype_indexed_count_contig(count, ++ blklens, ++ displacement_array, dispinbytes, ++ old_extent); + new_dtp->max_contig_blocks = contig_count; + if ((contig_count == 1) && ((MPI_Aint) new_dtp->size == new_dtp->extent)) { + new_dtp->is_contig = 1; +@@ -230,10 +209,6 @@ int MPIR_Type_indexed(int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_indexed_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_indexed_impl(int count, const int *array_of_blocklengths, + const int *array_of_displacements, + MPI_Datatype oldtype, MPI_Datatype * newtype) +@@ -283,10 +258,6 @@ int MPIR_Type_indexed_impl(int count, const int *array_of_blocklengths, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_indexed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_indexed - Creates an indexed datatype + +@@ -395,12 +366,12 @@ int MPI_Type_indexed(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_indexed", "**mpi_type_indexed %d %p %p %D %p", count, + array_of_blocklengths, array_of_displacements, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_lb.c ++++ b/src/mpi/datatype/type_lb.c +@@ -26,10 +26,6 @@ int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint * displacement) + #undef MPI_Type_lb + #define MPI_Type_lb PMPI_Type_lb + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_lb_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Type_lb_impl(MPI_Datatype datatype, MPI_Aint * displacement) + { + if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) { +@@ -43,10 +39,6 @@ void MPIR_Type_lb_impl(MPI_Datatype datatype, MPI_Aint * displacement) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_lb +-#undef FCNAME +-#define FCNAME "MPI_Type_lb" + /*@ + MPI_Type_lb - Returns the lower-bound of a datatype + +@@ -126,10 +118,10 @@ int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint * displacement) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_lb", "**mpi_type_lb %D %p", datatype, displacement); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/type_match_size.c ++++ b/src/mpi/datatype/type_match_size.c +@@ -28,10 +28,6 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype * datatype) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_match_size +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_match_size - Find an MPI datatype matching a specified size + +@@ -200,12 +196,12 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype * datatype) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_match_size", "**mpi_type_match_size %d %d %p", + typeclass, size, datatype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_set_name.c ++++ b/src/mpi/datatype/type_set_name.c +@@ -29,10 +29,6 @@ int MPI_Type_set_name(MPI_Datatype datatype, const char *type_name) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_set_name +-#undef FCNAME +-#define FCNAME "MPI_Type_set_name" + + /*@ + MPI_Type_set_name - set datatype name +@@ -120,11 +116,11 @@ int MPI_Type_set_name(MPI_Datatype datatype, const char *type_name) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_set_name", "**mpi_type_set_name %D %s", datatype, + type_name); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/type_size.c ++++ b/src/mpi/datatype/type_size.c +@@ -28,10 +28,6 @@ int MPI_Type_size(MPI_Datatype datatype, int *size) __attribute__ ((weak, alias( + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_size +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_size - Return the number of bytes occupied by entries + in the datatype +@@ -117,10 +113,10 @@ int MPI_Type_size(MPI_Datatype datatype, int *size) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_size", "**mpi_type_size %D %p", datatype, size); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_size_x.c ++++ b/src/mpi/datatype/type_size_x.c +@@ -27,10 +27,6 @@ int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count * size) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_size_x_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_size_x_impl(MPI_Datatype datatype, MPI_Count * size) + { + int mpi_errno = MPI_SUCCESS; +@@ -42,10 +38,6 @@ int MPIR_Type_size_x_impl(MPI_Datatype datatype, MPI_Count * size) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_size_x +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_size_x - Return the number of bytes occupied by entries + in the datatype +@@ -123,11 +115,11 @@ int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count * size) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_size_x", "**mpi_type_size_x %D %p", datatype, size); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_struct.c ++++ b/src/mpi/datatype/type_struct.c +@@ -134,26 +134,6 @@ static MPI_Aint MPII_Type_struct_alignsize(int count, + return max_alignsize; + } + +- +-/*@ +- MPIR_Type_struct - create a struct datatype +- +-Input Parameters: +-+ count - number of blocks in vector +-. blocklength_array - number of elements in each block +-. displacement_array - offsets of blocks from start of type in bytes +-- oldtype_array - types (using handle) of datatypes on which vector is based +- +-Output Parameters: +-. newtype - handle of new struct datatype +- +- Return Value: +- MPI_SUCCESS on success, MPI errno on failure. +-@*/ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_struct +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_struct(int count, + const int *blocklength_array, + const MPI_Aint * displacement_array, +@@ -193,16 +173,12 @@ int MPIR_Type_struct(int count, + + /* handle is filled in by MPIR_Handle_obj_alloc() */ + MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 0; + new_dtp->is_committed = 0; + new_dtp->attributes = NULL; +- new_dtp->cache_id = 0; + new_dtp->name[0] = 0; + new_dtp->contents = NULL; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = -1; +- new_dtp->dataloop_depth = -1; ++ new_dtp->typerep = NULL; + + /* check for junk struct with all zero blocks */ + for (i = 0; i < count; i++) +@@ -259,7 +235,7 @@ int MPIR_Type_struct(int count, + + size += old_dtp->size * blocklength_array[i]; + +- new_dtp->max_contig_blocks += old_dtp->max_contig_blocks; ++ new_dtp->max_contig_blocks += old_dtp->max_contig_blocks * blocklength_array[i]; + } + + /* element size and type */ +@@ -390,10 +366,6 @@ int MPIR_Type_struct(int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_struct_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_struct_impl(int count, const int *array_of_blocklengths, + const MPI_Aint * array_of_displacements, + const MPI_Datatype * array_of_types, MPI_Datatype * newtype) +@@ -439,10 +411,6 @@ int MPIR_Type_struct_impl(int count, const int *array_of_blocklengths, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_struct +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_struct - Creates a struct datatype + +@@ -574,13 +542,13 @@ int MPI_Type_struct(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_struct", "**mpi_type_struct %d %p %p %p %p", count, + array_of_blocklengths, array_of_displacements, array_of_types, + newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/type_ub.c ++++ b/src/mpi/datatype/type_ub.c +@@ -28,10 +28,6 @@ int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint * displacement) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_ub +-#undef FCNAME +-#define FCNAME "MPI_Type_ub" + + /*@ + MPI_Type_ub - Returns the upper bound of a datatype +@@ -114,10 +110,10 @@ int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint * displacement) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_ub", "**mpi_type_ub %D %p", datatype, displacement); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/datatype/type_vector.c ++++ b/src/mpi/datatype/type_vector.c +@@ -27,24 +27,6 @@ int MPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype + #undef MPI_Type_vector + #define MPI_Type_vector PMPI_Type_vector + +-/*@ +- MPIR_Type_vector - create a vector datatype +- +-Input Parameters: +-+ count - number of blocks in vector +-. blocklength - number of elements in each block +-. stride - distance from beginning of one block to the next (see next +- parameter for units) +-. strideinbytes - if nonzero, then stride is in bytes, otherwise stride +- is in terms of extent of oldtype +-- oldtype - type (using handle) of datatype on which vector is based +- +-Output Parameters: +-. newtype - handle of new vector datatype +- +- Return Value: +- 0 on success, MPI error code on failure. +-@*/ + int MPIR_Type_vector(int count, + int blocklength, + MPI_Aint stride, +@@ -73,16 +55,12 @@ int MPIR_Type_vector(int count, + + /* handle is filled in by MPIR_Handle_obj_alloc() */ + MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 0; + new_dtp->is_committed = 0; + new_dtp->attributes = NULL; +- new_dtp->cache_id = 0; + new_dtp->name[0] = 0; + new_dtp->contents = NULL; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = -1; +- new_dtp->dataloop_depth = -1; ++ new_dtp->typerep = NULL; + + is_builtin = (HANDLE_GET_KIND(oldtype) == HANDLE_KIND_BUILTIN); + +@@ -167,10 +145,6 @@ int MPIR_Type_vector(int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Type_vector_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype oldtype, + MPI_Datatype * newtype) + { +@@ -206,10 +180,6 @@ int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype o + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Type_vector +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Type_vector - Creates a vector (strided) datatype + +@@ -284,12 +254,12 @@ int MPI_Type_vector(int count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_type_vector", "**mpi_type_vector %d %d %d %D %p", count, + blocklength, stride, oldtype, newtype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/Makefile.mk +@@ -0,0 +1,16 @@ ++## -*- Mode: Makefile; -*- ++## vim: set ft=automake : ++## ++## (C) 2016 by Argonne National Laboratory. ++## See COPYRIGHT in top-level directory. ++## ++ ++include $(top_srcdir)/src/mpi/datatype/typerep/dataloop/Makefile.mk ++ ++mpi_core_sources += \ ++ src/mpi/datatype/typerep/src/typerep_flatten.c \ ++ src/mpi/datatype/typerep/src/typerep_pack.c \ ++ src/mpi/datatype/typerep/src/typerep_pack_external.c \ ++ src/mpi/datatype/typerep/src/typerep_iov.c \ ++ src/mpi/datatype/typerep/src/typerep_create.c \ ++ src/mpi/datatype/typerep/src/typerep_debug.c +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/Makefile.mk +@@ -0,0 +1,29 @@ ++## -*- Mode: Makefile; -*- ++## vim: set ft=automake : ++## ++## (C) 2016 by Argonne National Laboratory. ++## See COPYRIGHT in top-level directory. ++## ++ ++mpi_core_sources += \ ++ src/mpi/datatype/typerep/dataloop/darray_support.c \ ++ src/mpi/datatype/typerep/dataloop/dataloop.c \ ++ src/mpi/datatype/typerep/dataloop/dataloop_create.c \ ++ src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c \ ++ src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c \ ++ src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c \ ++ src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c \ ++ src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c \ ++ src/mpi/datatype/typerep/dataloop/looputil.c \ ++ src/mpi/datatype/typerep/dataloop/segment.c \ ++ src/mpi/datatype/typerep/dataloop/segment_count.c \ ++ src/mpi/datatype/typerep/dataloop/segment_flatten.c \ ++ src/mpi/datatype/typerep/dataloop/subarray_support.c \ ++ src/mpi/datatype/typerep/dataloop/dataloop_debug.c ++ ++# several headers are included by the rest of MPICH ++AM_CPPFLAGS += -I$(top_srcdir)/src/mpi/datatype/typerep/dataloop ++ ++noinst_HEADERS += \ ++ src/mpi/datatype/typerep/dataloop/typesize_support.h \ ++ src/mpi/datatype/typerep/dataloop/dataloop_internal.h +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/darray_support.c +@@ -0,0 +1,337 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 1997 University of Chicago. ++ * See COPYRIGHT notice in top-level directory. ++ * ++ * Note: This code originally appeared in ROMIO. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++static int MPII_Type_block(int *array_of_gsizes, int dim, int ndims, ++ int nprocs, int rank, int darg, int order, MPI_Aint orig_extent, ++ MPI_Datatype type_old, MPI_Datatype * type_new, MPI_Aint * st_offset); ++static int MPII_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nprocs, ++ int rank, int darg, int order, MPI_Aint orig_extent, ++ MPI_Datatype type_old, MPI_Datatype * type_new, MPI_Aint * st_offset); ++ ++ ++int MPII_Dataloop_convert_darray(int size, ++ int rank, ++ int ndims, ++ int *array_of_gsizes, ++ int *array_of_distribs, ++ int *array_of_dargs, ++ int *array_of_psizes, ++ int order, MPI_Datatype oldtype, MPI_Datatype * newtype) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPI_Datatype type_old, type_new = MPI_DATATYPE_NULL, types[3]; ++ int procs, tmp_rank, i, tmp_size, blklens[3], *coords; ++ MPI_Aint *st_offsets, orig_extent, disps[3]; ++ ++ MPIR_Datatype_get_extent_macro(oldtype, orig_extent); ++ ++/* calculate position in Cartesian grid as MPI would (row-major ++ ordering) */ ++ coords = (int *) MPL_malloc(ndims * sizeof(int), MPL_MEM_DATATYPE); ++ procs = size; ++ tmp_rank = rank; ++ for (i = 0; i < ndims; i++) { ++ procs = procs / array_of_psizes[i]; ++ coords[i] = tmp_rank / procs; ++ tmp_rank = tmp_rank % procs; ++ } ++ ++ st_offsets = (MPI_Aint *) MPL_malloc(ndims * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ type_old = oldtype; ++ ++ if (order == MPI_ORDER_FORTRAN) { ++ /* dimension 0 changes fastest */ ++ for (i = 0; i < ndims; i++) { ++ switch (array_of_distribs[i]) { ++ case MPI_DISTRIBUTE_BLOCK: ++ mpi_errno = MPII_Type_block(array_of_gsizes, i, ndims, ++ array_of_psizes[i], ++ coords[i], array_of_dargs[i], ++ order, orig_extent, ++ type_old, &type_new, st_offsets + i); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ break; ++ case MPI_DISTRIBUTE_CYCLIC: ++ mpi_errno = MPII_Type_cyclic(array_of_gsizes, i, ndims, ++ array_of_psizes[i], coords[i], ++ array_of_dargs[i], order, ++ orig_extent, type_old, &type_new, st_offsets + i); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ break; ++ case MPI_DISTRIBUTE_NONE: ++ /* treat it as a block distribution on 1 process */ ++ mpi_errno = MPII_Type_block(array_of_gsizes, i, ndims, 1, 0, ++ MPI_DISTRIBUTE_DFLT_DARG, order, ++ orig_extent, type_old, &type_new, st_offsets + i); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ break; ++ } ++ if (i) ++ MPIR_Type_free_impl(&type_old); ++ type_old = type_new; ++ } ++ ++ /* add displacement and UB */ ++ disps[1] = st_offsets[0]; ++ tmp_size = 1; ++ for (i = 1; i < ndims; i++) { ++ tmp_size *= array_of_gsizes[i - 1]; ++ disps[1] += ((MPI_Aint) tmp_size) * st_offsets[i]; ++ } ++ /* rest done below for both Fortran and C order */ ++ } ++ ++ else { /* order == MPI_ORDER_C */ ++ ++ /* dimension ndims-1 changes fastest */ ++ for (i = ndims - 1; i >= 0; i--) { ++ switch (array_of_distribs[i]) { ++ case MPI_DISTRIBUTE_BLOCK: ++ mpi_errno = MPII_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], ++ coords[i], array_of_dargs[i], order, ++ orig_extent, type_old, &type_new, st_offsets + i); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ break; ++ case MPI_DISTRIBUTE_CYCLIC: ++ mpi_errno = MPII_Type_cyclic(array_of_gsizes, i, ndims, ++ array_of_psizes[i], coords[i], ++ array_of_dargs[i], order, ++ orig_extent, type_old, &type_new, st_offsets + i); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ break; ++ case MPI_DISTRIBUTE_NONE: ++ /* treat it as a block distribution on 1 process */ ++ mpi_errno = MPII_Type_block(array_of_gsizes, i, ndims, array_of_psizes[i], ++ coords[i], MPI_DISTRIBUTE_DFLT_DARG, order, ++ orig_extent, type_old, &type_new, st_offsets + i); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ break; ++ } ++ if (i != ndims - 1) ++ MPIR_Type_free_impl(&type_old); ++ type_old = type_new; ++ } ++ ++ /* add displacement and UB */ ++ disps[1] = st_offsets[ndims - 1]; ++ tmp_size = 1; ++ for (i = ndims - 2; i >= 0; i--) { ++ tmp_size *= array_of_gsizes[i + 1]; ++ disps[1] += ((MPI_Aint) tmp_size) * st_offsets[i]; ++ } ++ } ++ ++ disps[1] *= orig_extent; ++ ++ disps[2] = orig_extent; ++ for (i = 0; i < ndims; i++) ++ disps[2] *= (MPI_Aint) (array_of_gsizes[i]); ++ ++ disps[0] = 0; ++ blklens[0] = blklens[1] = blklens[2] = 1; ++ types[0] = MPI_LB; ++ types[1] = type_new; ++ types[2] = MPI_UB; ++ ++ MPL_free(st_offsets); ++ MPL_free(coords); ++ ++ mpi_errno = MPIR_Type_struct_impl(3, blklens, disps, types, newtype); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_Type_free_impl(&type_new); ++ ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/* Returns MPI_SUCCESS on success, an MPI error code on failure. Code above ++ * needs to call MPIO_Err_return_xxx. ++ */ ++static int MPII_Type_block(int *array_of_gsizes, int dim, int ndims, int nprocs, ++ int rank, int darg, int order, MPI_Aint orig_extent, ++ MPI_Datatype type_old, MPI_Datatype * type_new, MPI_Aint * st_offset) ++{ ++/* nprocs = no. of processes in dimension dim of grid ++ rank = coordinate of this process in dimension dim */ ++ int mpi_errno = MPI_SUCCESS; ++ int blksize, global_size, mysize, i, j; ++ MPI_Aint stride; ++ ++ global_size = array_of_gsizes[dim]; ++ ++ if (darg == MPI_DISTRIBUTE_DFLT_DARG) ++ blksize = (global_size + nprocs - 1) / nprocs; ++ else { ++ blksize = darg; ++ ++ MPIR_ERR_CHKINTERNAL(blksize <= 0, mpi_errno, "blksize must be > 0"); ++ MPIR_ERR_CHKINTERNAL(blksize * nprocs < global_size, mpi_errno, ++ "blksize * nprocs must be >= global size"); ++ } ++ ++ j = global_size - blksize * rank; ++ mysize = (blksize < j) ? blksize : j; ++ if (mysize < 0) ++ mysize = 0; ++ ++ stride = orig_extent; ++ if (order == MPI_ORDER_FORTRAN) { ++ if (dim == 0) { ++ mpi_errno = MPIR_Type_contiguous_impl(mysize, type_old, type_new); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ for (i = 0; i < dim; i++) ++ stride *= (MPI_Aint) (array_of_gsizes[i]); ++ mpi_errno = MPIR_Type_hvector_impl(mysize, 1, stride, type_old, type_new); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } else { ++ if (dim == ndims - 1) { ++ mpi_errno = MPIR_Type_contiguous_impl(mysize, type_old, type_new); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ for (i = ndims - 1; i > dim; i--) ++ stride *= (MPI_Aint) (array_of_gsizes[i]); ++ mpi_errno = MPIR_Type_hvector_impl(mysize, 1, stride, type_old, type_new); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } ++ ++ *st_offset = blksize * rank; ++ /* in terms of no. of elements of type oldtype in this dimension */ ++ if (mysize == 0) ++ *st_offset = 0; ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/* Returns MPI_SUCCESS on success, an MPI error code on failure. Code above ++ * needs to call MPIO_Err_return_xxx. ++ */ ++static int MPII_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nprocs, ++ int rank, int darg, int order, MPI_Aint orig_extent, ++ MPI_Datatype type_old, MPI_Datatype * type_new, MPI_Aint * st_offset) ++{ ++/* nprocs = no. of processes in dimension dim of grid ++ rank = coordinate of this process in dimension dim */ ++ int mpi_errno = MPI_SUCCESS; ++ int blksize, i, blklens[3], st_index, end_index, local_size, rem, count; ++ MPI_Aint stride, disps[3]; ++ MPI_Datatype type_tmp, types[3]; ++ ++ if (darg == MPI_DISTRIBUTE_DFLT_DARG) ++ blksize = 1; ++ else ++ blksize = darg; ++ ++ MPIR_ERR_CHKINTERNAL(blksize <= 0, mpi_errno, "blksize must be > 0"); ++ ++ st_index = rank * blksize; ++ end_index = array_of_gsizes[dim] - 1; ++ ++ if (end_index < st_index) ++ local_size = 0; ++ else { ++ local_size = ((end_index - st_index + 1) / (nprocs * blksize)) * blksize; ++ rem = (end_index - st_index + 1) % (nprocs * blksize); ++ local_size += (rem < blksize) ? rem : blksize; ++ } ++ ++ count = local_size / blksize; ++ rem = local_size % blksize; ++ ++ stride = ((MPI_Aint) nprocs) * ((MPI_Aint) blksize) * orig_extent; ++ if (order == MPI_ORDER_FORTRAN) ++ for (i = 0; i < dim; i++) ++ stride *= (MPI_Aint) (array_of_gsizes[i]); ++ else ++ for (i = ndims - 1; i > dim; i--) ++ stride *= (MPI_Aint) (array_of_gsizes[i]); ++ ++ mpi_errno = MPIR_Type_hvector_impl(count, blksize, stride, type_old, type_new); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (rem) { ++ /* if the last block is of size less than blksize, include ++ * it separately using MPI_Type_struct */ ++ ++ types[0] = *type_new; ++ types[1] = type_old; ++ disps[0] = 0; ++ disps[1] = ((MPI_Aint) count) * stride; ++ blklens[0] = 1; ++ blklens[1] = rem; ++ ++ mpi_errno = MPIR_Type_struct_impl(2, blklens, disps, types, &type_tmp); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_Type_free_impl(type_new); ++ *type_new = type_tmp; ++ } ++ ++ /* In the first iteration, we need to set the displacement in that ++ * dimension correctly. */ ++ if (((order == MPI_ORDER_FORTRAN) && (dim == 0)) || ++ ((order == MPI_ORDER_C) && (dim == ndims - 1))) { ++ types[0] = MPI_LB; ++ disps[0] = 0; ++ types[1] = *type_new; ++ disps[1] = ((MPI_Aint) rank) * ((MPI_Aint) blksize) * orig_extent; ++ types[2] = MPI_UB; ++ disps[2] = orig_extent * ((MPI_Aint) (array_of_gsizes[dim])); ++ blklens[0] = blklens[1] = blklens[2] = 1; ++ ++ mpi_errno = MPIR_Type_struct_impl(3, blklens, disps, types, &type_tmp); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_Type_free_impl(type_new); ++ *type_new = type_tmp; ++ ++ *st_offset = 0; /* set it to 0 because it is taken care of in ++ * the struct above */ ++ } else { ++ *st_offset = ((MPI_Aint) rank) * ((MPI_Aint) blksize); ++ /* st_offset is in terms of no. of elements of type oldtype in ++ * this dimension */ ++ } ++ ++ if (local_size == 0) ++ *st_offset = 0; ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop.c +@@ -0,0 +1,623 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++#include ++#include ++#include ++ ++#undef DEBUG_MEMORY ++ ++/* Dataloops ++ * ++ * The functions here are used for the creation, copying, update, and display ++ * of MPII_Dataloop structures and trees of these structures. ++ * ++ * Currently we store trees of dataloops in contiguous regions of memory. They ++ * are stored in such a way that subtrees are also stored contiguously. This ++ * makes it somewhat easier to copy these subtrees around. Keep this in mind ++ * when looking at the functions below. ++ * ++ * The structures used in this file are defined in mpidu_datatype.h. There is ++ * no separate mpidu_dataloop_internal.h at this time. ++ * ++ * OPTIMIZATIONS: ++ * ++ * There are spots in the code with OPT tags that indicate where we could ++ * optimize particular calculations or avoid certain checks. ++ * ++ * NOTES: ++ * ++ * Don't have locks in place at this time! ++ */ ++ ++/* Some functions in this file are responsible for allocation of space for ++ * dataloops. These structures include the dataloop structure itself ++ * followed by a sequence of variable-sized arrays, depending on the loop ++ * kind. For example, a dataloop of kind MPII_DATALOOP_KIND_INDEXED has a ++ * dataloop structure followed by an array of block sizes and then an array ++ * of offsets. ++ * ++ * For efficiency and ease of cleanup (preserving a single free at ++ * deallocation), we want to allocate this memory as a single large chunk. ++ * However, we must perform some alignment of the components of this chunk ++ * in order to obtain correct and efficient operation across all platforms. ++ */ ++ ++ ++/*@ ++ Dataloop_free - deallocate the resources used to store a dataloop ++ ++Input/output Parameters: ++. dataloop - pointer to dataloop structure ++@*/ ++void MPIR_Dataloop_free(void **dataloop_) ++{ ++ MPII_Dataloop **dataloop = (MPII_Dataloop **) dataloop_; ++ ++ if (*dataloop == NULL) ++ return; ++ ++#ifdef DEBUG_MEMORY ++ MPL_DBG_MSG_D(MPIR_DBG_DATATYPE, VERBOSE, "MPIR_Dataloop_free: freeing loop @ %x.\n", ++ (int) *dataloop); ++#endif ++ ++ MPL_free(*dataloop); ++ *dataloop = NULL; ++ return; ++} ++ ++struct dloop_flatten_hdr { ++ MPI_Aint dloop_sz; ++ MPII_Dataloop *dataloop_local_addr; ++}; ++ ++int MPIR_Dataloop_flatten_size(MPIR_Datatype * dtp, int *flattened_loop_size) ++{ ++ MPII_Dataloop *dloop = (MPII_Dataloop *) dtp->typerep; ++ ++ *flattened_loop_size = sizeof(struct dloop_flatten_hdr) + dloop->dloop_sz; ++ ++ return MPI_SUCCESS; ++} ++ ++int MPIR_Dataloop_flatten(MPIR_Datatype * dtp, void *flattened_dataloop) ++{ ++ struct dloop_flatten_hdr *dloop_flatten_hdr = (struct dloop_flatten_hdr *) flattened_dataloop; ++ int mpi_errno = MPI_SUCCESS; ++ MPII_Dataloop *dloop = (MPII_Dataloop *) dtp->typerep; ++ ++ /* ++ * Our flattened layout contains three elements: ++ * - The size of the dataloop ++ * - The local address of the dataloop (needed to update the dataloop pointers when we unflatten) ++ * - The actual dataloop itself ++ */ ++ ++ dloop_flatten_hdr->dloop_sz = dloop->dloop_sz; ++ dloop_flatten_hdr->dataloop_local_addr = dloop; ++ ++ MPIR_Memcpy(((char *) flattened_dataloop + sizeof(struct dloop_flatten_hdr)), ++ dloop, dloop->dloop_sz); ++ ++ return mpi_errno; ++} ++ ++int MPIR_Dataloop_unflatten(MPIR_Datatype * dtp, void *flattened_dataloop) ++{ ++ struct dloop_flatten_hdr *dloop_flatten_hdr = (struct dloop_flatten_hdr *) flattened_dataloop; ++ MPI_Aint ptrdiff; ++ int mpi_errno = MPI_SUCCESS; ++ ++ dtp->typerep = MPL_malloc(dloop_flatten_hdr->dloop_sz, MPL_MEM_DATATYPE); ++ MPIR_ERR_CHKANDJUMP1(dtp->typerep == NULL, mpi_errno, MPI_ERR_INTERN, "**nomem", "**nomem %s", ++ "dataloop flatten hdr"); ++ ++ MPIR_Memcpy(dtp->typerep, (char *) flattened_dataloop + sizeof(struct dloop_flatten_hdr), ++ dloop_flatten_hdr->dloop_sz); ++ ++ ptrdiff = ++ (MPI_Aint) ((char *) (dtp->typerep) - (char *) dloop_flatten_hdr->dataloop_local_addr); ++ MPII_Dataloop_update(dtp->typerep, ptrdiff); ++ ++ fn_exit: ++ return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++/*@ ++ Dataloop_copy - Copy an arbitrary dataloop structure, updating ++ pointers as necessary ++ ++Input Parameters: +++ dest - pointer to destination region ++. src - pointer to original dataloop structure ++- size - size of dataloop structure ++ ++ This routine parses the dataloop structure as it goes in order to ++ determine what exactly it needs to update. ++ ++ Notes: ++ It assumes that the source dataloop was allocated in our usual way; ++ this means that the entire dataloop is in a contiguous region and that ++ the root of the tree is first in the array. ++ ++ This has some implications: +++ we can use a contiguous copy mechanism to copy the majority of the ++ structure ++- all pointers in the region are relative to the start of the data region ++ the first dataloop in the array is the root of the tree ++@*/ ++static void dloop_copy(void *dest, void *src, MPI_Aint size) ++{ ++ MPI_Aint ptrdiff; ++ ++#ifdef DEBUG_MEMORY ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, "dloop_copy: copying from %x to %x (%z bytes).\n", ++ (int) src, (int) dest, (size_t) size)); ++#endif ++ ++ /* copy region first */ ++ MPIR_Memcpy(dest, src, size); ++ ++ /* Calculate difference in starting locations. MPII_Dataloop_update() ++ * then traverses the new structure and updates internal pointers by ++ * adding this difference to them. This way we can just copy the ++ * structure, including pointers, in one big block. ++ */ ++ ptrdiff = (MPI_Aint) ((char *) dest - (char *) src); ++ ++ /* traverse structure updating pointers */ ++ MPII_Dataloop_update(dest, ptrdiff); ++ ++ return; ++} ++ ++ ++/*@ ++ MPII_Dataloop_update - update pointers after a copy operation ++ ++Input Parameters: +++ dataloop - pointer to loop to update ++- ptrdiff - value indicating offset between old and new pointer values ++ ++ This function is used to recursively update all the pointers in a ++ dataloop tree. ++@*/ ++void MPII_Dataloop_update(MPII_Dataloop * dataloop, MPI_Aint ptrdiff) ++{ ++ /* OPT: only declare these variables down in the Struct case */ ++ int i; ++ MPII_Dataloop **looparray; ++ ++ switch (dataloop->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ case MPII_DATALOOP_KIND_VECTOR: ++ /* ++ * All these really ugly assignments are really of the form: ++ * ++ * ((char *) dataloop->loop_params.c_t.loop) += ptrdiff; ++ * ++ * However, some compilers spit out warnings about casting on the ++ * LHS, so we get this much nastier form instead (using common ++ * struct for contig and vector): ++ */ ++ ++ if (!(dataloop->kind & MPII_DATALOOP_FINAL_MASK)) { ++ MPIR_Assert(dataloop->loop_params.cm_t.dataloop); ++ ++ dataloop->loop_params.cm_t.dataloop = (MPII_Dataloop *) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.cm_t.dataloop + ptrdiff); ++ ++ MPII_Dataloop_update(dataloop->loop_params.cm_t.dataloop, ptrdiff); ++ } ++ break; ++ ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ MPIR_Assert(dataloop->loop_params.bi_t.offset_array); ++ ++ dataloop->loop_params.bi_t.offset_array = (MPI_Aint *) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.bi_t.offset_array + ptrdiff); ++ ++ if (!(dataloop->kind & MPII_DATALOOP_FINAL_MASK)) { ++ MPIR_Assert(dataloop->loop_params.bi_t.dataloop); ++ ++ dataloop->loop_params.bi_t.dataloop = (MPII_Dataloop *) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.bi_t.dataloop + ptrdiff); ++ ++ MPII_Dataloop_update(dataloop->loop_params.bi_t.dataloop, ptrdiff); ++ } ++ break; ++ ++ case MPII_DATALOOP_KIND_INDEXED: ++ MPIR_Assert(dataloop->loop_params.i_t.blocksize_array); ++ ++ dataloop->loop_params.i_t.blocksize_array = (MPI_Aint *) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.i_t.blocksize_array + ptrdiff); ++ ++ MPIR_Assert(dataloop->loop_params.i_t.offset_array); ++ ++ dataloop->loop_params.i_t.offset_array = (MPI_Aint *) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.i_t.offset_array + ptrdiff); ++ ++ if (!(dataloop->kind & MPII_DATALOOP_FINAL_MASK)) { ++ MPIR_Assert(dataloop->loop_params.i_t.dataloop); ++ ++ dataloop->loop_params.i_t.dataloop = (MPII_Dataloop *) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.i_t.dataloop + ptrdiff); ++ ++ MPII_Dataloop_update(dataloop->loop_params.i_t.dataloop, ptrdiff); ++ } ++ break; ++ ++ case MPII_DATALOOP_KIND_STRUCT: ++ MPIR_Assert(dataloop->loop_params.s_t.blocksize_array); ++ ++ dataloop->loop_params.s_t.blocksize_array = (MPI_Aint *) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.s_t.blocksize_array + ptrdiff); ++ ++ MPIR_Assert(dataloop->loop_params.s_t.offset_array); ++ ++ dataloop->loop_params.s_t.offset_array = (MPI_Aint *) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.s_t.offset_array + ptrdiff); ++ ++ if (dataloop->kind & MPII_DATALOOP_FINAL_MASK) ++ break; ++ ++ MPIR_Assert(dataloop->loop_params.s_t.dataloop_array); ++ ++ dataloop->loop_params.s_t.dataloop_array = (MPII_Dataloop **) (void *) ++ ((MPI_Aint) (char *) dataloop->loop_params.s_t.dataloop_array + ptrdiff); ++ ++ /* fix the N dataloop pointers too */ ++ looparray = dataloop->loop_params.s_t.dataloop_array; ++ for (i = 0; i < dataloop->loop_params.s_t.count; i++) { ++ MPIR_Assert(looparray[i]); ++ ++ looparray[i] = (MPII_Dataloop *) (void *) ++ ((MPI_Aint) (char *) looparray[i] + ptrdiff); ++ } ++ ++ for (i = 0; i < dataloop->loop_params.s_t.count; i++) { ++ MPII_Dataloop_update(looparray[i], ptrdiff); ++ } ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ return; ++} ++ ++/*@ ++ Dataloop_alloc - allocate the resources used to store a dataloop with ++ no old loops associated with it. ++ ++Input Parameters: +++ kind - kind of dataloop to allocate ++. count - number of elements in dataloop (kind dependent) ++. new_loop_p - address at which to store new dataloop pointer ++ ++ Notes: ++ The count parameter passed into this function will often be different ++ from the count passed in at the MPI layer due to optimizations. ++@*/ ++void MPII_Dataloop_alloc(int kind, MPI_Aint count, MPII_Dataloop ** new_loop_p) ++{ ++ MPII_Dataloop_alloc_and_copy(kind, count, NULL, new_loop_p); ++ return; ++} ++ ++/*@ ++ Dataloop_alloc_and_copy - allocate the resources used to store a ++ dataloop and copy in old dataloop as ++ appropriate ++ ++Input Parameters: +++ kind - kind of dataloop to allocate ++. count - number of elements in dataloop (kind dependent) ++. old_loop - pointer to old dataloop (or NULL for none) ++. new_loop_p - address at which to store new dataloop pointer ++ ++ Notes: ++ The count parameter passed into this function will often be different ++ from the count passed in at the MPI layer. ++@*/ ++void MPII_Dataloop_alloc_and_copy(int kind, ++ MPI_Aint count, ++ MPII_Dataloop * old_loop, MPII_Dataloop ** new_loop_p) ++{ ++ MPI_Aint new_loop_sz = 0; ++ int align_sz; ++ int epsilon; ++ MPI_Aint loop_sz = sizeof(MPII_Dataloop); ++ MPI_Aint off_sz = 0, blk_sz = 0, ptr_sz = 0, extent_sz = 0; ++ ++ char *pos; ++ MPII_Dataloop *new_loop; ++ MPI_Aint old_loop_sz = old_loop ? old_loop->dloop_sz : 0; ++ ++#ifdef HAVE_MAX_STRUCT_ALIGNMENT ++ align_sz = HAVE_MAX_STRUCT_ALIGNMENT; ++#else ++ align_sz = 8; /* default aligns everything to 8-byte boundaries */ ++#endif ++ ++ if (old_loop != NULL) { ++ MPIR_Assert((old_loop_sz % align_sz) == 0); ++ } ++ ++ /* calculate the space that we actually need for everything */ ++ switch (kind) { ++ case MPII_DATALOOP_KIND_STRUCT: ++ /* need space for dataloop pointers and extents */ ++ ptr_sz = count * sizeof(MPII_Dataloop *); ++ extent_sz = count * sizeof(MPI_Aint); ++ MPL_FALLTHROUGH; ++ case MPII_DATALOOP_KIND_INDEXED: ++ /* need space for block sizes */ ++ blk_sz = count * sizeof(MPI_Aint); ++ MPL_FALLTHROUGH; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ /* need space for block offsets */ ++ off_sz = count * sizeof(MPI_Aint); ++ case MPII_DATALOOP_KIND_CONTIG: ++ case MPII_DATALOOP_KIND_VECTOR: ++ break; ++ default: ++ MPIR_Assert(0); ++ } ++ ++ /* pad everything that we're going to allocate */ ++ epsilon = loop_sz % align_sz; ++ if (epsilon) ++ loop_sz += align_sz - epsilon; ++ ++ epsilon = off_sz % align_sz; ++ if (epsilon) ++ off_sz += align_sz - epsilon; ++ ++ epsilon = blk_sz % align_sz; ++ if (epsilon) ++ blk_sz += align_sz - epsilon; ++ ++ epsilon = ptr_sz % align_sz; ++ if (epsilon) ++ ptr_sz += align_sz - epsilon; ++ ++ epsilon = extent_sz % align_sz; ++ if (epsilon) ++ extent_sz += align_sz - epsilon; ++ ++ new_loop_sz += loop_sz + off_sz + blk_sz + ptr_sz + extent_sz + old_loop_sz; ++ ++ /* allocate space */ ++ new_loop = (MPII_Dataloop *) MPL_malloc(new_loop_sz, MPL_MEM_DATATYPE); ++ if (new_loop == NULL) { ++ *new_loop_p = NULL; ++ return; ++ } ++#ifdef DEBUG_MEMORY ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "MPII_Dataloop_alloc_and_copy: new loop @ %x (tot sz = %z, loop = %z, off = %z, blk = %z, ptr = %z, extent = %z, old = %z)\n", ++ (int) new_loop, new_loop_sz, loop_sz, off_sz, blk_sz, ptr_sz, extent_sz, ++ old_loop_sz)); ++#endif ++ ++ /* set all the pointers in the new dataloop structure */ ++ switch (kind) { ++ case MPII_DATALOOP_KIND_STRUCT: ++ /* order is: ++ * - pointers ++ * - blocks ++ * - offsets ++ * - extents ++ */ ++ new_loop->loop_params.s_t.dataloop_array = ++ (MPII_Dataloop **) (((char *) new_loop) + loop_sz); ++ new_loop->loop_params.s_t.blocksize_array = ++ (MPI_Aint *) (((char *) new_loop) + loop_sz + ptr_sz); ++ new_loop->loop_params.s_t.offset_array = ++ (MPI_Aint *) (((char *) new_loop) + loop_sz + ptr_sz + blk_sz); ++ new_loop->loop_params.s_t.el_extent_array = ++ (MPI_Aint *) (((char *) new_loop) + loop_sz + ptr_sz + blk_sz + off_sz); ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ /* order is: ++ * - blocks ++ * - offsets ++ */ ++ new_loop->loop_params.i_t.blocksize_array = ++ (MPI_Aint *) (((char *) new_loop) + loop_sz); ++ new_loop->loop_params.i_t.offset_array = ++ (MPI_Aint *) (((char *) new_loop) + loop_sz + blk_sz); ++ if (old_loop == NULL) { ++ new_loop->loop_params.i_t.dataloop = NULL; ++ } else { ++ new_loop->loop_params.i_t.dataloop = ++ (MPII_Dataloop *) (((char *) new_loop) + (new_loop_sz - old_loop_sz)); ++ } ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ new_loop->loop_params.bi_t.offset_array = (MPI_Aint *) (((char *) new_loop) + loop_sz); ++ if (old_loop == NULL) { ++ new_loop->loop_params.bi_t.dataloop = NULL; ++ } else { ++ new_loop->loop_params.bi_t.dataloop = ++ (MPII_Dataloop *) (((char *) new_loop) + (new_loop_sz - old_loop_sz)); ++ } ++ break; ++ case MPII_DATALOOP_KIND_CONTIG: ++ if (old_loop == NULL) { ++ new_loop->loop_params.c_t.dataloop = NULL; ++ } else { ++ new_loop->loop_params.c_t.dataloop = ++ (MPII_Dataloop *) (((char *) new_loop) + (new_loop_sz - old_loop_sz)); ++ } ++ break; ++ case MPII_DATALOOP_KIND_VECTOR: ++ if (old_loop == NULL) { ++ new_loop->loop_params.v_t.dataloop = NULL; ++ } else { ++ new_loop->loop_params.v_t.dataloop = ++ (MPII_Dataloop *) (((char *) new_loop) + (new_loop_sz - old_loop_sz)); ++ } ++ break; ++ default: ++ MPIR_Assert(0); ++ } ++ ++ pos = ((char *) new_loop) + (new_loop_sz - old_loop_sz); ++ if (old_loop != NULL) { ++ dloop_copy(pos, old_loop, old_loop_sz); ++ } ++ ++ *new_loop_p = new_loop; ++ new_loop->dloop_sz = new_loop_sz; ++ return; ++} ++ ++/*@ ++ Dataloop_dup - make a copy of a dataloop ++ ++ Returns 0 on success, -1 on failure. ++@*/ ++void MPIR_Dataloop_dup(void *old_loop_, void **new_loop_p_) ++{ ++ MPII_Dataloop *new_loop; ++ MPII_Dataloop **new_loop_p = (MPII_Dataloop **) new_loop_p_; ++ MPII_Dataloop *old_loop = (MPII_Dataloop *) old_loop_; ++ ++ MPIR_Assert(old_loop != NULL); ++ ++ MPI_Aint old_loop_sz = old_loop->dloop_sz; ++ MPIR_Assert(old_loop_sz > 0); ++ ++ new_loop = (MPII_Dataloop *) MPL_malloc(old_loop_sz, MPL_MEM_DATATYPE); ++ if (new_loop == NULL) { ++ *new_loop_p = NULL; ++ return; ++ } ++ ++ dloop_copy(new_loop, old_loop, old_loop_sz); ++ *new_loop_p = new_loop; ++ return; ++} ++ ++MPI_Aint MPIR_Datatype_size_external32(MPI_Datatype type) ++{ ++ if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) { ++ return MPII_Datatype_get_basic_size_external32(type); ++ } else { ++ MPII_Dataloop *dlp = NULL; ++ ++ MPII_DATALOOP_GET_LOOPPTR(type, dlp); ++ MPIR_Assert(dlp != NULL); ++ ++ return MPII_Dataloop_stream_size(dlp, MPII_Datatype_get_basic_size_external32); ++ } ++} ++ ++/*@ ++MPII_Dataloop_stream_size - return the size of the data described by the dataloop ++ ++Input Parameters: +++ dl_p - pointer to dataloop for which we will return the size ++- sizefn - function for determining size of types in the corresponding stream ++ (passing NULL will instead result in el_size values being used) ++ ++@*/ ++MPI_Aint MPII_Dataloop_stream_size(MPII_Dataloop * dl_p, MPI_Aint(*sizefn) (MPI_Datatype el_type)) ++{ ++ MPI_Aint tmp_sz, tmp_ct = 1; ++ ++ for (;;) { ++ if ((dl_p->kind & MPII_DATALOOP_KIND_MASK) == MPII_DATALOOP_KIND_STRUCT) { ++ int i; ++ ++ tmp_sz = 0; ++ for (i = 0; i < dl_p->loop_params.s_t.count; i++) { ++ tmp_sz += (MPI_Aint) (dl_p->loop_params.s_t.blocksize_array[i]) * ++ MPII_Dataloop_stream_size(dl_p->loop_params.s_t.dataloop_array[i], sizefn); ++ } ++ return tmp_sz * tmp_ct; ++ } ++ ++ switch (dl_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ tmp_ct *= (MPI_Aint) (dl_p->loop_params.c_t.count); ++#ifdef MPII_DATALOOP_DEBUG_SIZE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "stream_size: contig: ct = %d; new tot_ct = " ++ MPI_AINT_FMT_DEC_SPEC "\n", (int) dl_p->loop_params.c_t.count, ++ (MPI_Aint) tmp_ct)); ++#endif ++ break; ++ case MPII_DATALOOP_KIND_VECTOR: ++ tmp_ct *= (MPI_Aint) (dl_p->loop_params.v_t.count) * ++ (MPI_Aint) (dl_p->loop_params.v_t.blocksize); ++#ifdef MPII_DATALOOP_DEBUG_SIZE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "stream_size: vector: ct = %d; blk = %d; new tot_ct = " ++ MPI_AINT_FMT_DEC_SPEC "\n", (int) dl_p->loop_params.v_t.count, ++ (int) dl_p->loop_params.v_t.blocksize, (MPI_Aint) tmp_ct)); ++#endif ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ tmp_ct *= (MPI_Aint) (dl_p->loop_params.bi_t.count) * ++ (MPI_Aint) (dl_p->loop_params.bi_t.blocksize); ++#ifdef MPII_DATALOOP_DEBUG_SIZE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "stream_size: blkindexed: blks = %d; new tot_ct = " ++ MPI_AINT_FMT_DEC_SPEC "\n", ++ (int) dl_p->loop_params.bi_t.count * ++ (int) dl_p->loop_params.bi_t.blocksize, (MPI_Aint) tmp_ct)); ++#endif ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ tmp_ct *= (MPI_Aint) (dl_p->loop_params.i_t.total_blocks); ++#ifdef MPII_DATALOOP_DEBUG_SIZE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "stream_size: contig: blks = %d; new tot_ct = " ++ MPI_AINT_FMT_DEC_SPEC "\n", ++ (int) dl_p->loop_params.i_t.total_blocks, (MPI_Aint) tmp_ct)); ++#endif ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ ++ if (dl_p->kind & MPII_DATALOOP_FINAL_MASK) ++ break; ++ else { ++ MPIR_Assert(dl_p->loop_params.cm_t.dataloop != NULL); ++ dl_p = dl_p->loop_params.cm_t.dataloop; ++ } ++ } ++ ++ /* call fn for size using bottom type, or use size if fnptr is NULL */ ++ tmp_sz = ((sizefn) ? sizefn(dl_p->el_type) : dl_p->el_size); ++ ++ return tmp_sz * tmp_ct; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop.h +@@ -0,0 +1,46 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef DATALOOP_H_INCLUDED ++#define DATALOOP_H_INCLUDED ++ ++#include ++#include ++ ++struct MPIR_Datatype; ++ ++void MPIR_Dataloop_create(MPI_Datatype type, void **dlp_p); ++void MPIR_Dataloop_free(void **dataloop); ++void MPIR_Dataloop_dup(void *old_loop, void **new_loop_p); ++int MPIR_Dataloop_flatten_size(struct MPIR_Datatype *dtp, int *flattened_dataloop_size); ++int MPIR_Dataloop_flatten(struct MPIR_Datatype *dtp, void *flattened_dataloop); ++int MPIR_Dataloop_unflatten(struct MPIR_Datatype *dtp, void *flattened_dataloop); ++void MPIR_Dataloop_printf(MPI_Datatype type, int depth, int header); ++ ++typedef struct MPIR_Segment MPIR_Segment; ++ ++/* NOTE: ASSUMING LAST TYPE IS SIGNED */ ++#define MPIR_SEGMENT_IGNORE_LAST ((MPI_Aint) -1) ++ ++MPIR_Segment *MPIR_Segment_alloc(const void *buf, MPI_Aint count, MPI_Datatype handle); ++void MPIR_Segment_free(MPIR_Segment * segp); ++ ++void MPIR_Segment_pack(MPIR_Segment * segp, MPI_Aint first, MPI_Aint * lastp, void *streambuf); ++void MPIR_Segment_unpack(MPIR_Segment * segp, ++ MPI_Aint first, MPI_Aint * lastp, const void *streambuf); ++ ++void MPIR_Segment_pack_external32(MPIR_Segment * segp, ++ MPI_Aint first, MPI_Aint * lastp, void *pack_buffer); ++void MPIR_Segment_unpack_external32(MPIR_Segment * segp, ++ MPI_Aint first, MPI_Aint * lastp, const void *unpack_buffer); ++ ++void MPIR_Segment_to_iov(MPIR_Segment * segp, ++ MPI_Aint first, MPI_Aint * lastp, MPL_IOV * vector, int *lengthp); ++void MPIR_Segment_count_contig_blocks(MPIR_Segment * segp, ++ MPI_Aint first, MPI_Aint * lastp, MPI_Aint * countp); ++ ++#endif /* MPIR_DATALOOP_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop_create.c +@@ -0,0 +1,384 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++#include ++#include ++ ++#define PAIRTYPE_CONTENTS(mt1_,ut1_,mt2_,ut2_) \ ++ { \ ++ struct { ut1_ a; ut2_ b; } foo; \ ++ disps[0] = 0; \ ++ disps[1] = (MPI_Aint) ((char *) &foo.b - (char *) &foo.a); \ ++ types[0] = mt1_; \ ++ types[1] = mt2_; \ ++ } ++ ++/*@ ++create_pairtype - create dataloop for a pairtype ++ ++ Arguments: +++ MPI_Datatype type - the pairtype ++. MPII_Dataloop **output_dataloop_ptr ++ ++.N Errors ++.N Returns 0 on success, -1 on failure. ++ ++ Note: ++ This function simply creates the appropriate input parameters for ++ use with Dataloop_create_struct and then calls that function. ++ ++ This same function could be used to create dataloops for any type ++ that actually consists of two distinct elements. ++@*/ ++static int create_pairtype(MPI_Datatype type, MPII_Dataloop ** dlp_p) ++{ ++ int blocks[2] = { 1, 1 }; ++ MPI_Aint disps[2]; ++ MPI_Datatype types[2]; ++ ++ MPIR_Assert(type == MPI_FLOAT_INT || type == MPI_DOUBLE_INT || ++ type == MPI_LONG_INT || type == MPI_SHORT_INT || ++ type == MPI_LONG_DOUBLE_INT || type == MPI_2INT); ++ ++ if (type == MPI_FLOAT_INT) ++ PAIRTYPE_CONTENTS(MPI_FLOAT, float, MPI_INT, int); ++ if (type == MPI_DOUBLE_INT) ++ PAIRTYPE_CONTENTS(MPI_DOUBLE, double, MPI_INT, int); ++ if (type == MPI_LONG_INT) ++ PAIRTYPE_CONTENTS(MPI_LONG, long, MPI_INT, int); ++ if (type == MPI_SHORT_INT) ++ PAIRTYPE_CONTENTS(MPI_SHORT, short, MPI_INT, int); ++ if (type == MPI_LONG_DOUBLE_INT) ++ PAIRTYPE_CONTENTS(MPI_LONG_DOUBLE, long double, MPI_INT, int); ++ if (type == MPI_2INT) ++ PAIRTYPE_CONTENTS(MPI_INT, int, MPI_INT, int); ++ ++ return MPII_Dataloop_create_struct(2, blocks, disps, types, dlp_p); ++} ++ ++static void create_named(MPI_Datatype type, MPII_Dataloop ** dlp_p); ++ ++void MPIR_Dataloop_create(MPI_Datatype type, void **dlp_p_) ++{ ++ int i; ++ int err ATTRIBUTE((unused)); ++ ++ int nr_ints, nr_aints, nr_types, combiner; ++ MPI_Datatype *types; ++ int *ints; ++ MPI_Aint *aints; ++ ++ MPII_Dataloop *old_dlp; ++ ++ int dummy1, dummy2, dummy3, type0_combiner, ndims; ++ MPI_Datatype tmptype; ++ ++ MPI_Aint stride; ++ MPI_Aint *disps; ++ MPI_Aint *blklen; ++ MPII_Dataloop **dlp_p = (MPII_Dataloop **) dlp_p_; ++ ++ if (type == MPI_FLOAT_INT || type == MPI_DOUBLE_INT || ++ type == MPI_LONG_INT || type == MPI_SHORT_INT || ++ type == MPI_LONG_DOUBLE_INT || type == MPI_2INT) { ++ create_pairtype(type, dlp_p); ++ return; ++ } ++ ++ MPIR_Type_get_envelope(type, &nr_ints, &nr_aints, &nr_types, &combiner); ++ ++ /* some named types do need dataloops; handle separately. */ ++ if (combiner == MPI_COMBINER_NAMED) { ++ create_named(type, dlp_p); ++ return; ++ } else if (combiner == MPI_COMBINER_F90_REAL || ++ combiner == MPI_COMBINER_F90_COMPLEX || combiner == MPI_COMBINER_F90_INTEGER) { ++ MPI_Datatype f90basetype; ++ MPIR_Datatype_get_basic_type(type, f90basetype); ++ MPII_Dataloop_create_contiguous(1 /* count */ , ++ f90basetype, dlp_p); ++ return; ++ } ++ ++ /* Q: should we also check for "hasloop", or is the COMBINER ++ * check above enough to weed out everything that wouldn't ++ * have a loop? ++ */ ++ MPII_DATALOOP_GET_LOOPPTR(type, old_dlp); ++ if (old_dlp != NULL) { ++ /* dataloop already created; just return it. */ ++ *dlp_p = old_dlp; ++ return; ++ } ++ ++ MPIR_Type_access_contents(type, &ints, &aints, &types); ++ ++ /* first check for zero count on types where that makes sense */ ++ switch (combiner) { ++ case MPI_COMBINER_CONTIGUOUS: ++ case MPI_COMBINER_VECTOR: ++ case MPI_COMBINER_HVECTOR_INTEGER: ++ case MPI_COMBINER_HVECTOR: ++ case MPI_COMBINER_INDEXED_BLOCK: ++ case MPI_COMBINER_HINDEXED_BLOCK: ++ case MPI_COMBINER_INDEXED: ++ case MPI_COMBINER_HINDEXED_INTEGER: ++ case MPI_COMBINER_HINDEXED: ++ case MPI_COMBINER_STRUCT_INTEGER: ++ case MPI_COMBINER_STRUCT: ++ if (ints[0] == 0) { ++ MPII_Dataloop_create_contiguous(0, MPI_INT, dlp_p); ++ goto clean_exit; ++ } ++ break; ++ default: ++ break; ++ } ++ ++ /* recurse, processing types "below" this one before processing ++ * this one, if those type don't already have dataloops. ++ * ++ * note: in the struct case below we'll handle any additional ++ * types "below" the current one. ++ */ ++ MPIR_Type_get_envelope(types[0], &dummy1, &dummy2, &dummy3, &type0_combiner); ++ if (type0_combiner != MPI_COMBINER_NAMED) { ++ MPII_DATALOOP_GET_LOOPPTR(types[0], old_dlp); ++ if (old_dlp == NULL) { ++ /* no dataloop already present; create and store one */ ++ MPIR_Dataloop_create(types[0], (void **) &old_dlp); ++ ++ MPII_DATALOOP_SET_LOOPPTR(types[0], old_dlp); ++ } ++ } ++ ++ switch (combiner) { ++ case MPI_COMBINER_DUP: ++ if (type0_combiner != MPI_COMBINER_NAMED) { ++ MPIR_Dataloop_dup(old_dlp, (void **) dlp_p); ++ } else { ++ MPII_Dataloop_create_contiguous(1, types[0], dlp_p); ++ } ++ break; ++ case MPI_COMBINER_RESIZED: ++ if (type0_combiner != MPI_COMBINER_NAMED) { ++ MPIR_Dataloop_dup(old_dlp, (void **) dlp_p); ++ } else { ++ MPII_Dataloop_create_contiguous(1, types[0], dlp_p); ++ ++ (*dlp_p)->el_extent = aints[1]; /* extent */ ++ } ++ break; ++ case MPI_COMBINER_CONTIGUOUS: ++ MPII_Dataloop_create_contiguous(ints[0] /* count */ , ++ types[0] /* oldtype */ , ++ dlp_p); ++ break; ++ case MPI_COMBINER_VECTOR: ++ MPII_Dataloop_create_vector(ints[0] /* count */ , ++ ints[1] /* blklen */ , ++ ints[2] /* stride */ , ++ 0 /* stride not bytes */ , ++ types[0] /* oldtype */ , ++ dlp_p); ++ break; ++ case MPI_COMBINER_HVECTOR_INTEGER: ++ case MPI_COMBINER_HVECTOR: ++ /* fortran hvector has integer stride in bytes */ ++ if (combiner == MPI_COMBINER_HVECTOR_INTEGER) { ++ stride = (MPI_Aint) ints[2]; ++ } else { ++ stride = aints[0]; ++ } ++ ++ MPII_Dataloop_create_vector(ints[0] /* count */ , ++ ints[1] /* blklen */ , ++ stride, 1 /* stride in bytes */ , ++ types[0] /* oldtype */ , ++ dlp_p); ++ break; ++ case MPI_COMBINER_INDEXED_BLOCK: ++ MPII_Dataloop_create_blockindexed(ints[0] /* count */ , ++ ints[1] /* blklen */ , ++ &ints[2] /* disps */ , ++ 0 /* disp not bytes */ , ++ types[0] /* oldtype */ , ++ dlp_p); ++ break; ++ case MPI_COMBINER_HINDEXED_BLOCK: ++ disps = (MPI_Aint *) MPL_malloc(ints[0] * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ for (i = 0; i < ints[0]; i++) ++ disps[i] = aints[i]; ++ MPII_Dataloop_create_blockindexed(ints[0] /* count */ , ++ ints[1] /* blklen */ , ++ disps /* disps */ , ++ 1 /* disp is bytes */ , ++ types[0] /* oldtype */ , ++ dlp_p); ++ MPL_free(disps); ++ break; ++ case MPI_COMBINER_INDEXED: ++ blklen = (MPI_Aint *) MPL_malloc(ints[0] * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ for (i = 0; i < ints[0]; i++) ++ blklen[i] = ints[1 + i]; ++ MPII_Dataloop_create_indexed(ints[0] /* count */ , ++ blklen /* blklens */ , ++ &ints[ints[0] + 1] /* disp */ , ++ 0 /* disp not in bytes */ , ++ types[0] /* oldtype */ , ++ dlp_p); ++ MPL_free(blklen); ++ break; ++ case MPI_COMBINER_HINDEXED_INTEGER: ++ case MPI_COMBINER_HINDEXED: ++ if (combiner == MPI_COMBINER_HINDEXED_INTEGER) { ++ disps = (MPI_Aint *) MPL_malloc(ints[0] * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ ++ for (i = 0; i < ints[0]; i++) { ++ disps[i] = (MPI_Aint) ints[ints[0] + 1 + i]; ++ } ++ } else { ++ disps = aints; ++ } ++ ++ blklen = (MPI_Aint *) MPL_malloc(ints[0] * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ for (i = 0; i < ints[0]; i++) ++ blklen[i] = (MPI_Aint) ints[1 + i]; ++ MPII_Dataloop_create_indexed(ints[0] /* count */ , ++ blklen /* blklens */ , ++ disps, 1 /* disp in bytes */ , ++ types[0] /* oldtype */ , ++ dlp_p); ++ ++ if (combiner == MPI_COMBINER_HINDEXED_INTEGER) { ++ MPL_free(disps); ++ } ++ MPL_free(blklen); ++ ++ break; ++ case MPI_COMBINER_STRUCT_INTEGER: ++ case MPI_COMBINER_STRUCT: ++ for (i = 1; i < ints[0]; i++) { ++ int type_combiner; ++ MPIR_Type_get_envelope(types[i], &dummy1, &dummy2, &dummy3, &type_combiner); ++ ++ if (type_combiner != MPI_COMBINER_NAMED) { ++ MPII_DATALOOP_GET_LOOPPTR(types[i], old_dlp); ++ if (old_dlp == NULL) { ++ MPIR_Dataloop_create(types[i], (void **) &old_dlp); ++ ++ MPII_DATALOOP_SET_LOOPPTR(types[i], old_dlp); ++ } ++ } ++ } ++ if (combiner == MPI_COMBINER_STRUCT_INTEGER) { ++ disps = (MPI_Aint *) MPL_malloc(ints[0] * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ ++ for (i = 0; i < ints[0]; i++) { ++ disps[i] = (MPI_Aint) ints[ints[0] + 1 + i]; ++ } ++ } else { ++ disps = aints; ++ } ++ ++ err = MPII_Dataloop_create_struct(ints[0] /* count */ , ++ &ints[1] /* blklens */ , ++ disps, types /* oldtype array */ , ++ dlp_p); ++ /* TODO if/when this function returns error codes, propagate this failure instead */ ++ MPIR_Assert(0 == err); ++ /* if (err) return err; */ ++ ++ if (combiner == MPI_COMBINER_STRUCT_INTEGER) { ++ MPL_free(disps); ++ } ++ break; ++ case MPI_COMBINER_SUBARRAY: ++ ndims = ints[0]; ++ MPII_Dataloop_convert_subarray(ndims, &ints[1] /* sizes */ , ++ &ints[1 + ndims] /* subsizes */ , ++ &ints[1 + 2 * ndims] /* starts */ , ++ ints[1 + 3 * ndims] /* order */ , ++ types[0], &tmptype); ++ ++ MPIR_Dataloop_create(tmptype, (void **) dlp_p); ++ ++ MPIR_Type_free_impl(&tmptype); ++ break; ++ case MPI_COMBINER_DARRAY: ++ ndims = ints[2]; ++ MPII_Dataloop_convert_darray(ints[0] /* size */ , ++ ints[1] /* rank */ , ++ ndims, &ints[3] /* gsizes */ , ++ &ints[3 + ndims] /*distribs */ , ++ &ints[3 + 2 * ndims] /* dargs */ , ++ &ints[3 + 3 * ndims] /* psizes */ , ++ ints[3 + 4 * ndims] /* order */ , ++ types[0], &tmptype); ++ ++ MPIR_Dataloop_create(tmptype, (void **) dlp_p); ++ ++ MPIR_Type_free_impl(&tmptype); ++ break; ++ default: ++ MPIR_Assert(0); ++ break; ++ } ++ ++ clean_exit: ++ ++ MPIR_Type_release_contents(type, &ints, &aints, &types); ++ ++ /* for now we just leave the intermediate dataloops in place. ++ * could remove them to save space if we wanted. ++ */ ++ ++ return; ++} ++ ++/*@ ++ create_named - create a dataloop for a "named" type ++ if necessary. ++ ++ "named" types are ones for which MPI_Type_get_envelope() returns a ++ combiner of MPI_COMBINER_NAMED. some types that fit this category, ++ such as MPI_SHORT_INT, have multiple elements with potential gaps ++ and padding. these types need dataloops for correct processing. ++@*/ ++static void create_named(MPI_Datatype type, MPII_Dataloop ** dlp_p) ++{ ++ MPII_Dataloop *dlp; ++ ++ /* special case: pairtypes need dataloops too. ++ * ++ * note: not dealing with MPI_2INT because size == extent ++ * in all cases for that type. ++ * ++ * note: MPICH always precreates these, so we will never call ++ * create_pairtype() from here in the MPICH ++ * case. ++ */ ++ if (type == MPI_FLOAT_INT || type == MPI_DOUBLE_INT || ++ type == MPI_LONG_INT || type == MPI_SHORT_INT || type == MPI_LONG_DOUBLE_INT) { ++ MPII_DATALOOP_GET_LOOPPTR(type, dlp); ++ if (dlp != NULL) { ++ /* dataloop already created; just return it. */ ++ *dlp_p = dlp; ++ } else { ++ create_pairtype(type, dlp_p); ++ } ++ return; ++ } ++ /* no other combiners need dataloops; exit. */ ++ else { ++ *dlp_p = NULL; ++ return; ++ } ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop_create_blockindexed.c +@@ -0,0 +1,210 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++#include ++ ++ ++static void blockindexed_array_copy(MPI_Aint count, ++ const void *disp_array, ++ MPI_Aint * out_disp_array, ++ int dispinbytes, MPI_Aint old_extent); ++ ++/*@ ++ Dataloop_create_blockindexed - create blockindexed dataloop ++ ++ Arguments: +++ MPI_Aint count ++. void *displacement_array (array of either MPI_Aints or ints) ++. int displacement_in_bytes (boolean) ++. MPI_Datatype old_type ++. MPII_Dataloop **output_dataloop_ptr ++ ++.N Errors ++.N Returns 0 on success, -1 on failure. ++@*/ ++int MPII_Dataloop_create_blockindexed(MPI_Aint icount, ++ MPI_Aint iblklen, ++ const void *disp_array, ++ int dispinbytes, MPI_Datatype oldtype, MPII_Dataloop ** dlp_p) ++{ ++ int err, is_builtin, is_vectorizable = 1; ++ int i; ++ MPI_Aint new_loop_sz; ++ ++ MPI_Aint contig_count, count, blklen; ++ MPI_Aint old_extent, eff_disp0, eff_disp1, last_stride; ++ MPII_Dataloop *new_dlp; ++ ++ count = (MPI_Aint) icount; /* avoid subsequent casting */ ++ blklen = (MPI_Aint) iblklen; ++ ++ /* if count or blklen are zero, handle with contig code, call it a int */ ++ if (count == 0 || blklen == 0) { ++ err = MPII_Dataloop_create_contiguous(0, MPI_INT, dlp_p); ++ return err; ++ } ++ ++ is_builtin = (MPII_DATALOOP_HANDLE_HASLOOP(oldtype)) ? 0 : 1; ++ ++ if (is_builtin) { ++ MPIR_Datatype_get_size_macro(oldtype, old_extent); ++ } else { ++ MPIR_Datatype_get_extent_macro(oldtype, old_extent); ++ } ++ ++ contig_count = MPII_Datatype_blockindexed_count_contig(count, ++ blklen, disp_array, dispinbytes, ++ old_extent); ++ ++ /* optimization: ++ * ++ * if contig_count == 1 and block starts at displacement 0, ++ * store it as a contiguous rather than a blockindexed dataloop. ++ */ ++ if ((contig_count == 1) && ++ ((!dispinbytes && ((int *) disp_array)[0] == 0) || ++ (dispinbytes && ((MPI_Aint *) disp_array)[0] == 0))) { ++ err = MPII_Dataloop_create_contiguous(icount * iblklen, oldtype, dlp_p); ++ return err; ++ } ++ ++ /* optimization: ++ * ++ * if contig_count == 1 store it as a blockindexed with one ++ * element rather than as a lot of individual blocks. ++ */ ++ if (contig_count == 1) { ++ /* adjust count and blklen and drop through */ ++ blklen *= count; ++ count = 1; ++ iblklen *= icount; ++ icount = 1; ++ } ++ ++ /* optimization: ++ * ++ * if displacements start at zero and result in a fixed stride, ++ * store it as a vector rather than a blockindexed dataloop. ++ */ ++ eff_disp0 = (dispinbytes) ? ((MPI_Aint) ((MPI_Aint *) disp_array)[0]) : ++ (((MPI_Aint) ((int *) disp_array)[0]) * old_extent); ++ ++ if (count > 1 && eff_disp0 == (MPI_Aint) 0) { ++ eff_disp1 = (dispinbytes) ? ++ ((MPI_Aint) ((MPI_Aint *) disp_array)[1]) : ++ (((MPI_Aint) ((int *) disp_array)[1]) * old_extent); ++ last_stride = eff_disp1 - eff_disp0; ++ ++ for (i = 2; i < count; i++) { ++ eff_disp0 = eff_disp1; ++ eff_disp1 = (dispinbytes) ? ++ ((MPI_Aint) ((MPI_Aint *) disp_array)[i]) : ++ (((MPI_Aint) ((int *) disp_array)[i]) * old_extent); ++ if (eff_disp1 - eff_disp0 != last_stride) { ++ is_vectorizable = 0; ++ break; ++ } ++ } ++ if (is_vectorizable) { ++ err = MPII_Dataloop_create_vector(count, blklen, last_stride, 1, /* strideinbytes */ ++ oldtype, dlp_p); ++ return err; ++ } ++ } ++ ++ /* TODO: optimization: ++ * ++ * if displacements result in a fixed stride, but first displacement ++ * is not zero, store it as a blockindexed (blklen == 1) of a vector. ++ */ ++ ++ /* TODO: optimization: ++ * ++ * if a blockindexed of a contig, absorb the contig into the blocklen ++ * parameter and keep the same overall depth ++ */ ++ ++ /* otherwise storing as a blockindexed dataloop */ ++ ++ /* Q: HOW CAN WE TELL IF IT IS WORTH IT TO STORE AS AN ++ * INDEXED WITH FEWER CONTIG BLOCKS (IF CONTIG_COUNT IS SMALL)? ++ */ ++ ++ if (is_builtin) { ++ MPII_Dataloop_alloc(MPII_DATALOOP_KIND_BLOCKINDEXED, count, &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ new_loop_sz = new_dlp->dloop_sz; ++ ++ new_dlp->kind = MPII_DATALOOP_KIND_BLOCKINDEXED | MPII_DATALOOP_FINAL_MASK; ++ ++ new_dlp->el_size = old_extent; ++ new_dlp->el_extent = old_extent; ++ new_dlp->el_type = oldtype; ++ } else { ++ MPII_Dataloop *old_loop_ptr = NULL; ++ ++ MPII_DATALOOP_GET_LOOPPTR(oldtype, old_loop_ptr); ++ ++ MPII_Dataloop_alloc_and_copy(MPII_DATALOOP_KIND_BLOCKINDEXED, ++ count, old_loop_ptr, &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ new_loop_sz = new_dlp->dloop_sz; ++ ++ new_dlp->kind = MPII_DATALOOP_KIND_BLOCKINDEXED; ++ ++ MPIR_Datatype_get_size_macro(oldtype, new_dlp->el_size); ++ MPIR_Datatype_get_extent_macro(oldtype, new_dlp->el_extent); ++ MPIR_Datatype_get_basic_type(oldtype, new_dlp->el_type); ++ } ++ ++ new_dlp->loop_params.bi_t.count = count; ++ new_dlp->loop_params.bi_t.blocksize = blklen; ++ ++ /* copy in displacement parameters ++ * ++ * regardless of dispinbytes, we store displacements in bytes in loop. ++ */ ++ blockindexed_array_copy(count, ++ disp_array, ++ new_dlp->loop_params.bi_t.offset_array, dispinbytes, old_extent); ++ ++ *dlp_p = new_dlp; ++ new_dlp->dloop_sz = new_loop_sz; ++ ++ return 0; ++} ++ ++/* blockindexed_array_copy ++ * ++ * Unlike the indexed version, this one does not compact adjacent ++ * blocks, because that would really mess up the blockindexed type! ++ */ ++static void blockindexed_array_copy(MPI_Aint count, ++ const void *in_disp_array, ++ MPI_Aint * out_disp_array, int dispinbytes, MPI_Aint old_extent) ++{ ++ int i; ++ if (!dispinbytes) { ++ for (i = 0; i < count; i++) { ++ out_disp_array[i] = ((MPI_Aint) ((int *) in_disp_array)[i]) * old_extent; ++ } ++ } else { ++ for (i = 0; i < count; i++) { ++ out_disp_array[i] = ((MPI_Aint) ((MPI_Aint *) in_disp_array)[i]); ++ } ++ } ++ return; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop_create_contig.c +@@ -0,0 +1,112 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++/*@ ++ Dataloop_contiguous - create the dataloop representation for a ++ contiguous datatype ++ ++ Input Parameters: +++ int icount, ++. MPI_Datatype oldtype ++ ++ Output Parameters: +++ MPII_Dataloop **dlp_p, ++- int *dldepth_p, ++ ++ ++.N Errors ++.N Returns 0 on success, -1 on failure. ++@*/ ++int MPII_Dataloop_create_contiguous(MPI_Aint icount, MPI_Datatype oldtype, MPII_Dataloop ** dlp_p) ++{ ++ MPI_Aint count; ++ int is_builtin, apply_contig_coalescing = 0; ++ MPI_Aint new_loop_sz; ++ ++ MPII_Dataloop *new_dlp; ++ ++ count = icount; ++ ++ is_builtin = (MPII_DATALOOP_HANDLE_HASLOOP(oldtype)) ? 0 : 1; ++ ++ if (!is_builtin) { ++ MPI_Aint old_size = 0, old_extent = 0; ++ MPII_Dataloop *old_loop_ptr; ++ ++ MPII_DATALOOP_GET_LOOPPTR(oldtype, old_loop_ptr); ++ MPIR_Datatype_get_size_macro(oldtype, old_size); ++ MPIR_Datatype_get_extent_macro(oldtype, old_extent); ++ ++ /* if we have a simple combination of contigs, coalesce */ ++ if (((old_loop_ptr->kind & MPII_DATALOOP_KIND_MASK) == MPII_DATALOOP_KIND_CONTIG) ++ && (old_size == old_extent)) { ++ /* will just copy contig and multiply count */ ++ apply_contig_coalescing = 1; ++ } ++ } ++ ++ if (is_builtin) { ++ MPI_Aint basic_sz = 0; ++ ++ MPII_Dataloop_alloc(MPII_DATALOOP_KIND_CONTIG, count, &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ new_loop_sz = new_dlp->dloop_sz; ++ ++ MPIR_Datatype_get_size_macro(oldtype, basic_sz); ++ new_dlp->kind = MPII_DATALOOP_KIND_CONTIG | MPII_DATALOOP_FINAL_MASK; ++ ++ new_dlp->el_size = basic_sz; ++ new_dlp->el_extent = new_dlp->el_size; ++ new_dlp->el_type = oldtype; ++ ++ new_dlp->loop_params.c_t.count = count; ++ } else { ++ /* user-defined base type (oldtype) */ ++ MPII_Dataloop *old_loop_ptr; ++ ++ MPII_DATALOOP_GET_LOOPPTR(oldtype, old_loop_ptr); ++ ++ if (apply_contig_coalescing) { ++ /* make a copy of the old loop and multiply the count */ ++ MPIR_Dataloop_dup(old_loop_ptr, (void **) &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ ++ new_dlp->loop_params.c_t.count *= count; ++ ++ new_loop_sz = old_loop_ptr->dloop_sz; ++ } else { ++ /* allocate space for new loop including copy of old */ ++ MPII_Dataloop_alloc_and_copy(MPII_DATALOOP_KIND_CONTIG, count, old_loop_ptr, &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ new_loop_sz = new_dlp->dloop_sz; ++ ++ new_dlp->kind = MPII_DATALOOP_KIND_CONTIG; ++ MPIR_Datatype_get_size_macro(oldtype, new_dlp->el_size); ++ MPIR_Datatype_get_extent_macro(oldtype, new_dlp->el_extent); ++ MPIR_Datatype_get_basic_type(oldtype, new_dlp->el_type); ++ ++ new_dlp->loop_params.c_t.count = count; ++ } ++ } ++ ++ *dlp_p = new_dlp; ++ new_dlp->dloop_sz = new_loop_sz; ++ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop_create_indexed.c +@@ -0,0 +1,272 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++#include ++ ++static void indexed_array_copy(MPI_Aint count, ++ MPI_Aint contig_count, ++ const MPI_Aint * input_blocklength_array, ++ const void *input_displacement_array, ++ MPI_Aint * output_blocklength_array, ++ MPI_Aint * out_disp_array, int dispinbytes, MPI_Aint old_extent); ++ ++/*@ ++ MPII_Dataloop_create_indexed ++ ++ Arguments: +++ int icount ++. MPI_Aint *iblocklength_array ++. void *displacement_array (either ints or MPI_Aints) ++. int dispinbytes ++. MPI_Datatype oldtype ++. MPII_Dataloop **dlp_p ++ ++.N Errors ++.N Returns 0 on success, -1 on error. ++@*/ ++ ++int MPII_Dataloop_create_indexed(MPI_Aint icount, ++ const MPI_Aint * blocklength_array, ++ const void *displacement_array, ++ int dispinbytes, MPI_Datatype oldtype, MPII_Dataloop ** dlp_p) ++{ ++ int err, is_builtin; ++ MPI_Aint i; ++ MPI_Aint new_loop_sz, blksz; ++ MPI_Aint first; ++ ++ MPI_Aint old_type_count = 0, contig_count, count; ++ MPI_Aint old_extent; ++ MPII_Dataloop *new_dlp; ++ ++ count = (MPI_Aint) icount; /* avoid subsequent casting */ ++ ++ ++ /* if count is zero, handle with contig code, call it an int */ ++ if (count == 0) { ++ err = MPII_Dataloop_create_contiguous(0, MPI_INT, dlp_p); ++ return err; ++ } ++ ++ /* Skip any initial zero-length blocks */ ++ for (first = 0; first < count; first++) ++ if ((MPI_Aint) blocklength_array[first]) ++ break; ++ ++ ++ is_builtin = (MPII_DATALOOP_HANDLE_HASLOOP(oldtype)) ? 0 : 1; ++ ++ if (is_builtin) { ++ MPIR_Datatype_get_extent_macro(oldtype, old_extent); ++ } else { ++ MPIR_Datatype_get_extent_macro(oldtype, old_extent); ++ } ++ ++ for (i = first; i < count; i++) { ++ old_type_count += (MPI_Aint) blocklength_array[i]; ++ } ++ ++ contig_count = MPII_Datatype_indexed_count_contig(count, ++ blocklength_array, ++ displacement_array, dispinbytes, old_extent); ++ ++ /* if contig_count is zero (no data), handle with contig code */ ++ if (contig_count == 0) { ++ err = MPII_Dataloop_create_contiguous(0, MPI_INT, dlp_p); ++ return err; ++ } ++ ++ /* optimization: ++ * ++ * if contig_count == 1 and block starts at displacement 0, ++ * store it as a contiguous rather than an indexed dataloop. ++ */ ++ if ((contig_count == 1) && ++ ((!dispinbytes && ((int *) displacement_array)[first] == 0) || ++ (dispinbytes && ((MPI_Aint *) displacement_array)[first] == 0))) { ++ err = MPII_Dataloop_create_contiguous(old_type_count, oldtype, dlp_p); ++ return err; ++ } ++ ++ /* optimization: ++ * ++ * if contig_count == 1 (and displacement != 0), store this as ++ * a single element blockindexed rather than a lot of individual ++ * blocks. ++ */ ++ if (contig_count == 1) { ++ const void *disp_arr_tmp; /* no ternary assignment to avoid clang warnings */ ++ if (dispinbytes) ++ disp_arr_tmp = &(((const MPI_Aint *) displacement_array)[first]); ++ else ++ disp_arr_tmp = &(((const int *) displacement_array)[first]); ++ err = MPII_Dataloop_create_blockindexed(1, ++ old_type_count, ++ disp_arr_tmp, dispinbytes, oldtype, dlp_p); ++ ++ return err; ++ } ++ ++ /* optimization: ++ * ++ * if block length is the same for all blocks, store it as a ++ * blockindexed rather than an indexed dataloop. ++ */ ++ blksz = blocklength_array[first]; ++ for (i = first + 1; i < count; i++) { ++ if (blocklength_array[i] != blksz) { ++ blksz--; ++ break; ++ } ++ } ++ if (blksz == blocklength_array[first]) { ++ const void *disp_arr_tmp; /* no ternary assignment to avoid clang warnings */ ++ if (dispinbytes) ++ disp_arr_tmp = &(((const MPI_Aint *) displacement_array)[first]); ++ else ++ disp_arr_tmp = &(((const int *) displacement_array)[first]); ++ err = MPII_Dataloop_create_blockindexed(icount - first, ++ blksz, disp_arr_tmp, dispinbytes, oldtype, dlp_p); ++ ++ return err; ++ } ++ ++ /* note: blockindexed looks for the vector optimization */ ++ ++ /* TODO: optimization: ++ * ++ * if an indexed of a contig, absorb the contig into the blocklen array ++ * and keep the same overall depth ++ */ ++ ++ /* otherwise storing as an indexed dataloop */ ++ ++ if (is_builtin) { ++ MPII_Dataloop_alloc(MPII_DATALOOP_KIND_INDEXED, count, &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ new_loop_sz = new_dlp->dloop_sz; ++ ++ new_dlp->kind = MPII_DATALOOP_KIND_INDEXED | MPII_DATALOOP_FINAL_MASK; ++ ++ new_dlp->el_size = old_extent; ++ new_dlp->el_extent = old_extent; ++ new_dlp->el_type = oldtype; ++ } else { ++ MPII_Dataloop *old_loop_ptr = NULL; ++ ++ MPII_DATALOOP_GET_LOOPPTR(oldtype, old_loop_ptr); ++ ++ MPII_Dataloop_alloc_and_copy(MPII_DATALOOP_KIND_INDEXED, ++ contig_count, old_loop_ptr, &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ new_loop_sz = new_dlp->dloop_sz; ++ ++ new_dlp->kind = MPII_DATALOOP_KIND_INDEXED; ++ ++ MPIR_Datatype_get_size_macro(oldtype, new_dlp->el_size); ++ MPIR_Datatype_get_extent_macro(oldtype, new_dlp->el_extent); ++ MPIR_Datatype_get_basic_type(oldtype, new_dlp->el_type); ++ } ++ ++ new_dlp->loop_params.i_t.count = contig_count; ++ new_dlp->loop_params.i_t.total_blocks = old_type_count; ++ ++ /* copy in blocklength and displacement parameters (in that order) ++ * ++ * regardless of dispinbytes, we store displacements in bytes in loop. ++ */ ++ indexed_array_copy(count, ++ contig_count, ++ blocklength_array, ++ displacement_array, ++ new_dlp->loop_params.i_t.blocksize_array, ++ new_dlp->loop_params.i_t.offset_array, dispinbytes, old_extent); ++ ++ *dlp_p = new_dlp; ++ new_dlp->dloop_sz = new_loop_sz; ++ ++ return MPI_SUCCESS; ++} ++ ++/* indexed_array_copy() ++ * ++ * Copies arrays into place, combining adjacent contiguous regions and ++ * dropping zero-length regions. ++ * ++ * Extent passed in is for the original type. ++ * ++ * Output displacements are always output in bytes, while block ++ * lengths are always output in terms of the base type. ++ */ ++static void indexed_array_copy(MPI_Aint count, ++ MPI_Aint contig_count, ++ const MPI_Aint * in_blklen_array, ++ const void *in_disp_array, ++ MPI_Aint * out_blklen_array, ++ MPI_Aint * out_disp_array, int dispinbytes, MPI_Aint old_extent) ++{ ++ MPI_Aint i, first, cur_idx = 0; ++ ++ /* Skip any initial zero-length blocks */ ++ for (first = 0; first < count; ++first) ++ if ((MPI_Aint) in_blklen_array[first]) ++ break; ++ ++ out_blklen_array[0] = (MPI_Aint) in_blklen_array[first]; ++ ++ if (!dispinbytes) { ++ out_disp_array[0] = (MPI_Aint) ++ ((int *) in_disp_array)[first] * old_extent; ++ ++ for (i = first + 1; i < count; ++i) { ++ if (in_blklen_array[i] == 0) { ++ continue; ++ } else if (out_disp_array[cur_idx] + ++ ((MPI_Aint) out_blklen_array[cur_idx]) * old_extent == ++ ((MPI_Aint) ((int *) in_disp_array)[i]) * old_extent) { ++ /* adjacent to current block; add to block */ ++ out_blklen_array[cur_idx] += (MPI_Aint) in_blklen_array[i]; ++ } else { ++ cur_idx++; ++ MPIR_Assert(cur_idx < contig_count); ++ out_disp_array[cur_idx] = ((MPI_Aint) ((int *) in_disp_array)[i]) * old_extent; ++ out_blklen_array[cur_idx] = in_blklen_array[i]; ++ } ++ } ++ } else { /* input displacements already in bytes */ ++ ++ out_disp_array[0] = (MPI_Aint) ((MPI_Aint *) in_disp_array)[first]; ++ ++ for (i = first + 1; i < count; ++i) { ++ if (in_blklen_array[i] == 0) { ++ continue; ++ } else if (out_disp_array[cur_idx] + ++ ((MPI_Aint) out_blklen_array[cur_idx]) * old_extent == ++ ((MPI_Aint) ((MPI_Aint *) in_disp_array)[i])) { ++ /* adjacent to current block; add to block */ ++ out_blklen_array[cur_idx] += in_blklen_array[i]; ++ } else { ++ cur_idx++; ++ MPIR_Assert(cur_idx < contig_count); ++ out_disp_array[cur_idx] = (MPI_Aint) ((MPI_Aint *) in_disp_array)[i]; ++ out_blklen_array[cur_idx] = (MPI_Aint) in_blklen_array[i]; ++ } ++ } ++ } ++ ++ MPIR_Assert(cur_idx == contig_count - 1); ++ return; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop_create_struct.c +@@ -0,0 +1,400 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++static int create_struct_memory_error(void); ++static int create_unique_type_struct(MPI_Aint count, ++ const int *blklens, ++ const MPI_Aint * disps, ++ const MPI_Datatype * oldtypes, ++ int type_pos, MPII_Dataloop ** dlp_p); ++static int create_basic_all_bytes_struct(MPI_Aint count, ++ const int *blklens, ++ const MPI_Aint * disps, ++ const MPI_Datatype * oldtypes, MPII_Dataloop ** dlp_p); ++static int create_flattened_struct(MPI_Aint count, ++ const int *blklens, ++ const MPI_Aint * disps, ++ const MPI_Datatype * oldtypes, MPII_Dataloop ** dlp_p); ++ ++/*@ ++ Dataloop_create_struct - create the dataloop representation for a ++ struct datatype ++ ++Input Parameters: +++ count - number of blocks in vector ++. blklens - number of elements in each block ++. disps - offsets of blocks from start of type in bytes ++- oldtypes - types (using handle) of datatypes on which vector is based ++ ++Output Parameters: +++ dlp_p - pointer to address in which to place pointer to new dataloop ++ ++ Return Value: ++ 0 on success, -1 on failure. ++ ++ Notes: ++ This function relies on others, like Dataloop_create_indexed, to create ++ types in some cases. This call (like all the rest) takes int blklens ++ and MPI_Aint displacements, so it's possible to overflow when working ++ with a particularly large struct type in some cases. This isn't detected ++ or corrected in this code at this time. ++ ++@*/ ++int MPII_Dataloop_create_struct(MPI_Aint count, ++ const int *blklens, ++ const MPI_Aint * disps, ++ const MPI_Datatype * oldtypes, MPII_Dataloop ** dlp_p) ++{ ++ int err, i, nr_basics = 0, nr_derived = 0, type_pos = 0; ++ ++ MPI_Datatype first_basic = MPI_DATATYPE_NULL, first_derived = MPI_DATATYPE_NULL; ++ ++ /* if count is zero, handle with contig code, call it a int */ ++ if (count == 0) { ++ err = MPII_Dataloop_create_contiguous(0, MPI_INT, dlp_p); ++ return err; ++ } ++ ++ /* browse the old types and characterize */ ++ for (i = 0; i < count; i++) { ++ /* ignore type elements with a zero blklen */ ++ if (blklens[i] == 0) ++ continue; ++ ++ if (oldtypes[i] != MPI_LB && oldtypes[i] != MPI_UB) { ++ int is_builtin; ++ ++ is_builtin = (MPII_DATALOOP_HANDLE_HASLOOP(oldtypes[i])) ? 0 : 1; ++ ++ if (is_builtin) { ++ if (nr_basics == 0) { ++ first_basic = oldtypes[i]; ++ type_pos = i; ++ } else if (oldtypes[i] != first_basic) { ++ first_basic = MPI_DATATYPE_NULL; ++ } ++ nr_basics++; ++ } else { /* derived type */ ++ ++ if (nr_derived == 0) { ++ first_derived = oldtypes[i]; ++ type_pos = i; ++ } else if (oldtypes[i] != first_derived) { ++ first_derived = MPI_DATATYPE_NULL; ++ } ++ nr_derived++; ++ } ++ } ++ } ++ ++ /* note on optimizations: ++ * ++ * because LB, UB, and extent calculations are handled as part of ++ * the Datatype, we can safely ignore them in all our calculations ++ * here. ++ */ ++ ++ /* optimization: ++ * ++ * if there were only MPI_LBs and MPI_UBs in the struct type, ++ * treat it as a zero-element contiguous (just as count == 0). ++ */ ++ if (nr_basics == 0 && nr_derived == 0) { ++ err = MPII_Dataloop_create_contiguous(0, MPI_INT, dlp_p); ++ return err; ++ } ++ ++ /* optimization: ++ * ++ * if there is only one unique instance of a type in the struct, treat it ++ * as a blockindexed type. ++ * ++ * notes: ++ * ++ * if the displacement happens to be zero, the blockindexed code will ++ * optimize this into a contig. ++ */ ++ if (nr_basics + nr_derived == 1) { ++ /* type_pos is index to only real type in array */ ++ err = MPII_Dataloop_create_blockindexed(1, /* count */ ++ blklens[type_pos], &disps[type_pos], 1, /* displacement in bytes */ ++ oldtypes[type_pos], dlp_p); ++ ++ return err; ++ } ++ ++ /* optimization: ++ * ++ * if there only one unique type (more than one instance) in the ++ * struct, treat it as an indexed type. ++ * ++ * notes: ++ * ++ * this will apply to a single type with an LB/UB, as those ++ * are handled elsewhere. ++ * ++ */ ++ if (((nr_derived == 0) && (first_basic != MPI_DATATYPE_NULL)) || ++ ((nr_basics == 0) && (first_derived != MPI_DATATYPE_NULL))) { ++ return create_unique_type_struct(count, blklens, disps, oldtypes, type_pos, dlp_p); ++ } ++ ++ /* optimization: ++ * ++ * if there are no derived types, convert ++ * everything to bytes and use an indexed type. ++ */ ++ if (nr_derived == 0) { ++ return create_basic_all_bytes_struct(count, blklens, disps, oldtypes, dlp_p); ++ } ++ ++ /* optimization: ++ * flatten the type and store it as an indexed type so that ++ * there are no branches in the dataloop tree. ++ */ ++ return create_flattened_struct(count, blklens, disps, oldtypes, dlp_p); ++} ++ ++/* --BEGIN ERROR HANDLING-- */ ++static int create_struct_memory_error(void) ++{ ++ return -1; ++} ++ ++/* --END ERROR HANDLING-- */ ++ ++static int create_unique_type_struct(MPI_Aint count, ++ const int *blklens, ++ const MPI_Aint * disps, ++ const MPI_Datatype * oldtypes, ++ int type_pos, MPII_Dataloop ** dlp_p) ++{ ++ /* the same type used more than once in the array; type_pos ++ * indexes to the first of these. ++ */ ++ int i, err, cur_pos = 0; ++ MPI_Aint *tmp_blklens; ++ MPI_Aint *tmp_disps; ++ ++ /* count is an upper bound on number of type instances */ ++ tmp_blklens = (MPI_Aint *) MPL_malloc(count * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!tmp_blklens) { ++ /* TODO: ??? */ ++ return create_struct_memory_error(); ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ tmp_disps = (MPI_Aint *) ++ MPL_malloc(count * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!tmp_disps) { ++ MPL_free(tmp_blklens); ++ /* TODO: ??? */ ++ return create_struct_memory_error(); ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ for (i = type_pos; i < count; i++) { ++ if (oldtypes[i] == oldtypes[type_pos] && blklens != 0) { ++ tmp_blklens[cur_pos] = blklens[i]; ++ tmp_disps[cur_pos] = disps[i]; ++ cur_pos++; ++ } ++ } ++ ++ err = MPII_Dataloop_create_indexed(cur_pos, tmp_blklens, tmp_disps, 1, /* disp in bytes */ ++ oldtypes[type_pos], dlp_p); ++ ++ MPL_free(tmp_blklens); ++ MPL_free(tmp_disps); ++ ++ return err; ++ ++} ++ ++static int create_basic_all_bytes_struct(MPI_Aint count, ++ const int *blklens, ++ const MPI_Aint * disps, ++ const MPI_Datatype * oldtypes, MPII_Dataloop ** dlp_p) ++{ ++ int i, err, cur_pos = 0; ++ MPI_Aint *tmp_blklens; ++ MPI_Aint *tmp_disps; ++ ++ /* count is an upper bound on number of type instances */ ++ tmp_blklens = (MPI_Aint *) MPL_malloc(count * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!tmp_blklens) { ++ return create_struct_memory_error(); ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ tmp_disps = (MPI_Aint *) MPL_malloc(count * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!tmp_disps) { ++ MPL_free(tmp_blklens); ++ return create_struct_memory_error(); ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ for (i = 0; i < count; i++) { ++ if (oldtypes[i] != MPI_LB && oldtypes[i] != MPI_UB && blklens[i] != 0) { ++ MPI_Aint sz; ++ ++ MPIR_Datatype_get_size_macro(oldtypes[i], sz); ++ tmp_blklens[cur_pos] = (int) sz *blklens[i]; ++ tmp_disps[cur_pos] = disps[i]; ++ cur_pos++; ++ } ++ } ++ err = MPII_Dataloop_create_indexed(cur_pos, tmp_blklens, tmp_disps, 1, /* disp in bytes */ ++ MPI_BYTE, dlp_p); ++ ++ MPL_free(tmp_blklens); ++ MPL_free(tmp_disps); ++ ++ return err; ++} ++ ++static int create_flattened_struct(MPI_Aint count, ++ const int *blklens, ++ const MPI_Aint * disps, ++ const MPI_Datatype * oldtypes, MPII_Dataloop ** dlp_p) ++{ ++ /* arbitrary types, convert to bytes and use indexed */ ++ int i, err, nr_blks = 0; ++ MPI_Aint *tmp_blklens; ++ MPI_Aint *tmp_disps; /* since we're calling another fn that takes ++ * this type as an input parameter */ ++ MPI_Aint bytes; ++ MPIR_Segment *segp; ++ ++ int first_ind; ++ MPI_Aint last_ind; ++ ++ /* use segment code once to count contiguous regions */ ++ for (i = 0; i < count; i++) { ++ int is_basic; ++ ++ /* ignore type elements with a zero blklen */ ++ if (blklens[i] == 0) ++ continue; ++ ++ is_basic = (MPII_DATALOOP_HANDLE_HASLOOP(oldtypes[i])) ? 0 : 1; ++ ++ if (is_basic && (oldtypes[i] != MPI_LB && oldtypes[i] != MPI_UB)) { ++ nr_blks++; ++ } else { /* derived type; get a count of contig blocks */ ++ ++ MPI_Aint tmp_nr_blks, sz; ++ ++ MPIR_Datatype_get_size_macro(oldtypes[i], sz); ++ ++ /* if the derived type has some data to contribute, ++ * add to flattened representation */ ++ if (sz > 0) { ++ segp = MPIR_Segment_alloc(NULL, (MPI_Aint) blklens[i], oldtypes[i]); ++ ++ bytes = MPIR_SEGMENT_IGNORE_LAST; ++ ++ MPIR_Segment_count_contig_blocks(segp, 0, &bytes, &tmp_nr_blks); ++ MPIR_Segment_free(segp); ++ ++ nr_blks += tmp_nr_blks; ++ } ++ } ++ } ++ ++ /* it's possible for us to get to this point only to realize that ++ * there isn't any data in this type. in that case do what we always ++ * do: store a simple contig of zero ints and call it done. ++ */ ++ if (nr_blks == 0) { ++ err = MPII_Dataloop_create_contiguous(0, MPI_INT, dlp_p); ++ return err; ++ ++ } ++ ++ nr_blks += 2; /* safety measure */ ++ ++ tmp_blklens = (MPI_Aint *) MPL_malloc(nr_blks * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!tmp_blklens) { ++ return create_struct_memory_error(); ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ ++ tmp_disps = (MPI_Aint *) MPL_malloc(nr_blks * sizeof(MPI_Aint), MPL_MEM_DATATYPE); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!tmp_disps) { ++ MPL_free(tmp_blklens); ++ return create_struct_memory_error(); ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ /* use segment code again to flatten the type */ ++ first_ind = 0; ++ for (i = 0; i < count; i++) { ++ int is_basic; ++ MPI_Aint sz = -1; ++ ++ is_basic = (MPII_DATALOOP_HANDLE_HASLOOP(oldtypes[i])) ? 0 : 1; ++ if (!is_basic) ++ MPIR_Datatype_get_size_macro(oldtypes[i], sz); ++ ++ /* we're going to use the segment code to flatten the type. ++ * we put in our displacement as the buffer location, and use ++ * the blocklength as the count value to get N contiguous copies ++ * of the type. ++ * ++ * Note that we're going to get back values in bytes, so that will ++ * be our new element type. ++ */ ++ if (oldtypes[i] != MPI_UB && ++ oldtypes[i] != MPI_LB && blklens[i] != 0 && (is_basic || sz > 0)) { ++ segp = MPIR_Segment_alloc((char *) disps[i], (MPI_Aint) blklens[i], oldtypes[i]); ++ ++ last_ind = nr_blks - first_ind; ++ bytes = MPIR_SEGMENT_IGNORE_LAST; ++ MPII_Dataloop_segment_flatten(segp, ++ 0, ++ &bytes, ++ &tmp_blklens[first_ind], &tmp_disps[first_ind], ++ &last_ind); ++ MPIR_Segment_free(segp); ++ first_ind += last_ind; ++ } ++ } ++ nr_blks = first_ind; ++ ++#if 0 ++ if (MPL_DBG_SELECTED(MPIR_DBG_DATATYPE, VERBOSE)) { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "--- start of flattened type ---"); ++ for (i = 0; i < nr_blks; i++) { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ "a[%d] = (%d, " MPI_AINT_FMT_DEC_SPEC ")", i, ++ tmp_blklens[i], tmp_disps[i])); ++ } ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "--- end of flattened type ---"); ++ } ++#endif ++ ++ err = MPII_Dataloop_create_indexed(nr_blks, tmp_blklens, tmp_disps, 1, /* disp in bytes */ ++ MPI_BYTE, dlp_p); ++ ++ MPL_free(tmp_blklens); ++ MPL_free(tmp_disps); ++ ++ return err; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop_create_vector.c +@@ -0,0 +1,104 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++/*@ ++ Dataloop_create_vector ++ ++ Arguments: +++ int icount ++. int iblocklength ++. MPI_Aint astride ++. int strideinbytes ++. MPI_Datatype oldtype ++. MPII_Dataloop **dlp_p ++ ++ Returns 0 on success, -1 on failure. ++ ++@*/ ++int MPII_Dataloop_create_vector(MPI_Aint icount, ++ MPI_Aint iblocklength, ++ MPI_Aint astride, ++ int strideinbytes, MPI_Datatype oldtype, MPII_Dataloop ** dlp_p) ++{ ++ int err, is_builtin; ++ ++ MPI_Aint count, blocklength; ++ MPI_Aint stride; ++ MPII_Dataloop *new_dlp; ++ ++ count = (MPI_Aint) icount; /* avoid subsequent casting */ ++ blocklength = (MPI_Aint) iblocklength; ++ stride = (MPI_Aint) astride; ++ ++ /* if count or blocklength are zero, handle with contig code, ++ * call it a int ++ */ ++ if (count == 0 || blocklength == 0) { ++ ++ err = MPII_Dataloop_create_contiguous(0, MPI_INT, dlp_p); ++ return err; ++ } ++ ++ /* optimization: ++ * ++ * if count == 1, store as a contiguous rather than a vector dataloop. ++ */ ++ if (count == 1) { ++ err = MPII_Dataloop_create_contiguous(iblocklength, oldtype, dlp_p); ++ return err; ++ } ++ ++ is_builtin = (MPII_DATALOOP_HANDLE_HASLOOP(oldtype)) ? 0 : 1; ++ ++ if (is_builtin) { ++ MPI_Aint basic_sz = 0; ++ ++ MPII_Dataloop_alloc(MPII_DATALOOP_KIND_VECTOR, count, &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ ++ MPIR_Datatype_get_size_macro(oldtype, basic_sz); ++ new_dlp->kind = MPII_DATALOOP_KIND_VECTOR | MPII_DATALOOP_FINAL_MASK; ++ ++ new_dlp->el_size = basic_sz; ++ new_dlp->el_extent = new_dlp->el_size; ++ new_dlp->el_type = oldtype; ++ } else { /* user-defined base type (oldtype) */ ++ ++ MPII_Dataloop *old_loop_ptr; ++ ++ MPII_DATALOOP_GET_LOOPPTR(oldtype, old_loop_ptr); ++ ++ MPII_Dataloop_alloc_and_copy(MPII_DATALOOP_KIND_VECTOR, count, old_loop_ptr, &new_dlp); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (!new_dlp) ++ return -1; ++ /* --END ERROR HANDLING-- */ ++ ++ new_dlp->kind = MPII_DATALOOP_KIND_VECTOR; ++ MPIR_Datatype_get_size_macro(oldtype, new_dlp->el_size); ++ MPIR_Datatype_get_extent_macro(oldtype, new_dlp->el_extent); ++ MPIR_Datatype_get_basic_type(oldtype, new_dlp->el_type); ++ } ++ ++ /* vector-specific members ++ * ++ * stride stored in dataloop is always in bytes for local rep of type ++ */ ++ new_dlp->loop_params.v_t.count = count; ++ new_dlp->loop_params.v_t.blocksize = blocklength; ++ new_dlp->loop_params.v_t.stride = (strideinbytes) ? stride : stride * new_dlp->el_extent; ++ ++ *dlp_p = new_dlp; ++ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop_debug.c +@@ -0,0 +1,217 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++#include ++#include ++#include "datatype.h" ++ ++#define NR_TYPE_CUTOFF 6 /* Number of types to display before truncating ++ * output. 6 picked as arbitrary cutoff */ ++ ++/* note: this isn't really "error handling" per se, but leave these comments ++ * because Bill uses them for coverage analysis. ++ */ ++ ++/* --BEGIN ERROR HANDLING-- */ ++static void dot_printf(MPII_Dataloop * loop_p, int depth, int header); ++static void dot_printf(MPII_Dataloop * loop_p, int depth, int header) ++{ ++ int i; ++ ++ if (loop_p == NULL) { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "\n")); ++ return; ++ } ++ ++ if (header) { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ /* graphviz does not like the 0xNNN format */ ++ "digraph %lld { {", (long long int) loop_p)); ++ } ++ ++ switch (loop_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ " dl%d [shape = record, label = \"contig |{ ct = %d; el_sz = " ++ MPI_AINT_FMT_DEC_SPEC "; el_ext = " ++ MPI_AINT_FMT_DEC_SPEC " }\"];", depth, ++ (int) loop_p->loop_params.c_t.count, ++ (MPI_Aint) loop_p->el_size, ++ (MPI_Aint) loop_p->el_extent)); ++ break; ++ case MPII_DATALOOP_KIND_VECTOR: ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ " dl%d [shape = record, label = \"vector |{ ct = %d; blk = %d; str = " ++ MPI_AINT_FMT_DEC_SPEC "; el_sz = " ++ MPI_AINT_FMT_DEC_SPEC "; el_ext = " ++ MPI_AINT_FMT_DEC_SPEC " }\"];", depth, ++ (int) loop_p->loop_params.v_t.count, ++ (int) loop_p->loop_params.v_t.blocksize, ++ (MPI_Aint) loop_p->loop_params.v_t.stride, ++ (MPI_Aint) loop_p->el_size, ++ (MPI_Aint) loop_p->el_extent)); ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ " dl%d [shape = record, label = \"indexed |{ ct = %d; tot_blks = %d; regions = ", ++ depth, ++ (int) loop_p->loop_params.i_t.count, ++ (int) loop_p->loop_params.i_t.total_blocks)); ++ ++ for (i = 0; i < NR_TYPE_CUTOFF && i < loop_p->loop_params.i_t.count; i++) { ++ if (i + 1 < loop_p->loop_params.i_t.count) { ++ /* more regions after this one */ ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ "\\n(" MPI_AINT_FMT_DEC_SPEC ", %d), ", ++ (MPI_Aint) loop_p->loop_params. ++ i_t.offset_array[i], ++ (int) loop_p->loop_params. ++ i_t.blocksize_array[i])); ++ } else { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ "\\n(" MPI_AINT_FMT_DEC_SPEC ", %d); ", ++ (MPI_Aint) loop_p->loop_params. ++ i_t.offset_array[i], ++ (int) loop_p->loop_params. ++ i_t.blocksize_array[i])); ++ } ++ } ++ if (i < loop_p->loop_params.i_t.count) { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "\\n...; "); ++ } ++ ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ "\\nel_sz = " MPI_AINT_FMT_DEC_SPEC "; el_ext = " ++ MPI_AINT_FMT_DEC_SPEC " }\"];\n", ++ (MPI_Aint) loop_p->el_size, ++ (MPI_Aint) loop_p->el_extent)); ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ " dl%d [shape = record, label = \"blockindexed |{ ct = %d; blk = %d; disps = ", ++ depth, ++ (int) loop_p->loop_params.bi_t.count, ++ (int) loop_p->loop_params.bi_t.blocksize)); ++ ++ for (i = 0; i < NR_TYPE_CUTOFF && i < loop_p->loop_params.bi_t.count; i++) { ++ if (i + 1 < loop_p->loop_params.bi_t.count) { ++ /* more regions after this one */ ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ MPI_AINT_FMT_DEC_SPEC ",\\n ", ++ (MPI_Aint) loop_p->loop_params. ++ bi_t.offset_array[i])); ++ } else { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ MPI_AINT_FMT_DEC_SPEC "; ", ++ (MPI_Aint) loop_p->loop_params. ++ bi_t.offset_array[i])); ++ } ++ } ++ if (i < loop_p->loop_params.bi_t.count) { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "...; "); ++ } ++ ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ "\\nel_sz = " MPI_AINT_FMT_DEC_SPEC "; el_ext = " ++ MPI_AINT_FMT_DEC_SPEC " }\"];", ++ (MPI_Aint) loop_p->el_size, ++ (MPI_Aint) loop_p->el_extent)); ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ " dl%d [shape = record, label = \"struct | {ct = %d; blks = ", ++ depth, (int) loop_p->loop_params.s_t.count)); ++ for (i = 0; i < NR_TYPE_CUTOFF && i < loop_p->loop_params.s_t.count; i++) { ++ if (i + 1 < loop_p->loop_params.s_t.count) { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "%d, ", ++ (int) loop_p->loop_params. ++ s_t.blocksize_array[i])); ++ } else { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, "%d; ", ++ (int) loop_p->loop_params. ++ s_t.blocksize_array[i])); ++ } ++ } ++ if (i < loop_p->loop_params.s_t.count) { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "...; disps = "); ++ } else { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "disps = "); ++ } ++ ++ for (i = 0; i < NR_TYPE_CUTOFF && i < loop_p->loop_params.s_t.count; i++) { ++ if (i + 1 < loop_p->loop_params.s_t.count) { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, MPI_AINT_FMT_DEC_SPEC ", ", ++ (MPI_Aint) loop_p->loop_params. ++ s_t.offset_array[i])); ++ } else { ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, MPI_AINT_FMT_DEC_SPEC "; ", ++ (MPI_Aint) loop_p->loop_params. ++ s_t.offset_array[i])); ++ } ++ } ++ if (i < loop_p->loop_params.s_t.count) { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "... }\"];"); ++ } else { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "}\"];"); ++ } ++ break; ++ default: ++ MPIR_Assert(0); ++ } ++ ++ if (!(loop_p->kind & MPII_DATALOOP_FINAL_MASK)) { ++ /* more loops to go; recurse */ ++ MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE, (MPL_DBG_FDEST, ++ " dl%d -> dl%d;\n", depth, depth + 1)); ++ switch (loop_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ dot_printf(loop_p->loop_params.c_t.dataloop, depth + 1, 0); ++ break; ++ case MPII_DATALOOP_KIND_VECTOR: ++ dot_printf(loop_p->loop_params.v_t.dataloop, depth + 1, 0); ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ dot_printf(loop_p->loop_params.i_t.dataloop, depth + 1, 0); ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ dot_printf(loop_p->loop_params.bi_t.dataloop, depth + 1, 0); ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ for (i = 0; i < loop_p->loop_params.s_t.count; i++) { ++ dot_printf(loop_p->loop_params.s_t.dataloop_array[i], depth + 1, 0); ++ } ++ break; ++ default: ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, " < unsupported type >"); ++ } ++ } ++ ++ ++ if (header) { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, " }\n}"); ++ } ++ return; ++} ++ ++void MPIR_Dataloop_printf(MPI_Datatype type, int depth, int header) ++{ ++ if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) { ++ MPL_DBG_OUT(MPIR_DBG_DATATYPE, "type_dot_printf: type is a basic"); ++ return; ++ } else { ++ MPIR_Datatype *dt_p; ++ MPII_Dataloop *loop_p; ++ ++ MPIR_Datatype_get_ptr(type, dt_p); ++ loop_p = (MPII_Dataloop *) dt_p->typerep; ++ ++ dot_printf(loop_p, depth, header); ++ return; ++ } ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/dataloop_internal.h +@@ -0,0 +1,324 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef DATALOOP_INTERNAL_H_INCLUDED ++#define DATALOOP_INTERNAL_H_INCLUDED ++ ++#include ++#include "dataloop.h" ++ ++#define MPII_DATALOOP_HANDLE_HASLOOP(handle_) \ ++ ((HANDLE_GET_KIND(handle_) == HANDLE_KIND_BUILTIN) ? 0 : 1) ++ ++#define MPII_DATALOOP_FINAL_MASK 0x00000008 ++#define MPII_DATALOOP_KIND_MASK 0x00000007 ++#define MPII_DATALOOP_KIND_CONTIG 0x1 ++#define MPII_DATALOOP_KIND_VECTOR 0x2 ++#define MPII_DATALOOP_KIND_BLOCKINDEXED 0x3 ++#define MPII_DATALOOP_KIND_INDEXED 0x4 ++#define MPII_DATALOOP_KIND_STRUCT 0x5 ++ ++#define MPII_DATALOOP_GET_LOOPPTR(a,lptr_) do { \ ++ void *ptr; \ ++ switch (HANDLE_GET_KIND(a)) { \ ++ case HANDLE_KIND_DIRECT: \ ++ MPIR_Assert(HANDLE_INDEX(a) < MPIR_DATATYPE_PREALLOC); \ ++ ptr = MPIR_Datatype_direct+HANDLE_INDEX(a); \ ++ lptr_ = ((MPIR_Datatype *)ptr)->typerep; \ ++ break; \ ++ case HANDLE_KIND_INDIRECT: \ ++ ptr = ((MPIR_Datatype *) \ ++ MPIR_Handle_get_ptr_indirect(a,&MPIR_Datatype_mem)); \ ++ lptr_ = ((MPIR_Datatype *)ptr)->typerep; \ ++ break; \ ++ case HANDLE_KIND_INVALID: \ ++ case HANDLE_KIND_BUILTIN: \ ++ default: \ ++ lptr_ = 0; \ ++ break; \ ++ } \ ++ } while (0) ++ ++#define MPII_DATALOOP_SET_LOOPPTR(a,lptr_) do { \ ++ void *ptr; \ ++ switch (HANDLE_GET_KIND(a)) { \ ++ case HANDLE_KIND_DIRECT: \ ++ MPIR_Assert(HANDLE_INDEX(a) < MPIR_DATATYPE_PREALLOC); \ ++ ptr = MPIR_Datatype_direct+HANDLE_INDEX(a); \ ++ ((MPIR_Datatype *)ptr)->typerep = lptr_; \ ++ break; \ ++ case HANDLE_KIND_INDIRECT: \ ++ ptr = ((MPIR_Datatype *) \ ++ MPIR_Handle_get_ptr_indirect(a,&MPIR_Datatype_mem)); \ ++ ((MPIR_Datatype *)ptr)->typerep = lptr_; \ ++ break; \ ++ case HANDLE_KIND_INVALID: \ ++ case HANDLE_KIND_BUILTIN: \ ++ default: \ ++ lptr_ = 0; \ ++ break; \ ++ } \ ++ } while (0) ++ ++/* The max datatype depth is the maximum depth of the stack used to ++ evaluate datatypes. It represents the length of the chain of ++ datatype dependencies. Defining this and testing when a datatype ++ is created removes a test in the datatype evaluation loop. */ ++#define MPII_DATALOOP_MAX_DATATYPE_DEPTH 16 ++ ++/*S ++ MPII_Dataloop_stackelm - Structure for an element of the stack used ++ to process dataloops ++ ++ Fields: +++ curcount - Current loop count value (between 0 and ++ loop.loop_params.count-1) ++. orig_count - original count value (cached so we don't have to look it up) ++. curoffset - Offset into memory relative to the pointer to the buffer ++ passed in by the user. Used to maintain our position as we ++ move up and down the stack. NEED MORE NOTES ON THIS!!! ++. orig_offset - original offset, set before the stackelm is processed, so that ++ we know where the offset was. this is used in processing indexed ++ types and possibly others. it is set for all types, but not ++ referenced in some cases. ++. curblock - Current block value...NEED MORE NOTES ON THIS!!! ++. orig_block - original block value (caches so we don't have to look it up); ++ INVALID FOR INDEX AND STRUCT TYPES. ++- loop_p - pointer to Loop-based description of the dataloop ++ ++S*/ ++typedef struct MPII_Dataloop_stackelm { ++ int may_require_reloading; /* indicates that items below might ++ * need reloading (e.g. this is a struct) ++ */ ++ ++ MPI_Aint curcount; ++ MPI_Aint curoffset; ++ MPI_Aint curblock; ++ ++ MPI_Aint orig_count; ++ MPI_Aint orig_offset; ++ MPI_Aint orig_block; ++ ++ struct MPII_Dataloop *loop_p; ++} MPII_Dataloop_stackelm; ++ ++/*S ++ MPII_Dataloop - Description of the structure used to hold a dataloop ++ description ++ ++ Fields: +++ kind - Describes the type of the dataloop. This is divided into three ++ separate bit fields\: ++.vb ++ Dataloop type. 3 bits ++ IsFinal (a "leaf" dataloop; see text) 1 bit ++ Element Size (units for fields.) 2 bits ++ Element size has 4 values ++ 0 - Elements are in units of bytes ++ 1 - Elements are in units of 2 bytes ++ 2 - Elements are in units of 4 bytes ++ 3 - Elements are in units of 8 bytes ++.ve ++. loop_parms - A union containing the 5 dataloop structures. A sixth element in ++ this union, 'count', allows quick access to the shared 'count' field in the ++ five dataloop structure. ++. extent - The extent of the dataloop ++ ++ Module: ++ Datatype ++ ++ S*/ ++typedef struct MPII_Dataloop { ++ int kind; /* Contains both the loop type ++ * (contig, vector, blockindexed, indexed, ++ * or struct) and a bit that indicates ++ * whether the dataloop is a leaf type. */ ++ union { ++ MPI_Aint count; ++ struct { ++ MPI_Aint count; ++ struct MPII_Dataloop *dataloop; ++ } c_t; ++ struct { ++ MPI_Aint count; ++ struct MPII_Dataloop *dataloop; ++ MPI_Aint blocksize; ++ MPI_Aint stride; ++ } v_t; ++ struct { ++ MPI_Aint count; ++ struct MPII_Dataloop *dataloop; ++ MPI_Aint blocksize; ++ MPI_Aint *offset_array; ++ } bi_t; ++ struct { ++ MPI_Aint count; ++ struct MPII_Dataloop *dataloop; ++ MPI_Aint *blocksize_array; ++ MPI_Aint *offset_array; ++ MPI_Aint total_blocks; ++ } i_t; ++ struct { ++ MPI_Aint count; ++ struct MPII_Dataloop **dataloop_array; ++ MPI_Aint *blocksize_array; ++ MPI_Aint *offset_array; ++ MPI_Aint *el_extent_array; /* need more than one */ ++ } s_t; ++ struct { ++ MPI_Aint count; ++ struct MPII_Dataloop *dataloop; ++ } cm_t; ++ } loop_params; ++ MPI_Aint el_size; ++ MPI_Aint el_extent; ++ MPI_Datatype el_type; ++ ++ MPI_Aint dloop_sz; ++} MPII_Dataloop; ++ ++static int MPII_Type_dloop_size(MPI_Datatype type) ATTRIBUTE((unused)); ++static int MPII_Type_dloop_size(MPI_Datatype type) ++{ ++ MPII_Dataloop *dloop; ++ ++ MPII_DATALOOP_GET_LOOPPTR(type, dloop); ++ return dloop->dloop_sz; ++} ++ ++ ++/*S ++ MPIR_Segment - Description of the Segment datatype ++ ++ Notes: ++ This has no corresponding MPI datatype. ++ ++ Module: ++ Segment ++ ++ Questions: ++ Should this have an id for allocation and similarity purposes? ++ S*/ ++struct MPIR_Segment { ++ void *ptr; /* pointer to datatype buffer */ ++ MPI_Datatype handle; ++ MPI_Aint stream_off; /* next offset into data stream resulting from datatype ++ * processing. in other words, how many bytes have ++ * we created/used by parsing so far? that amount + 1. ++ */ ++ MPII_Dataloop_stackelm stackelm[MPII_DATALOOP_MAX_DATATYPE_DEPTH]; ++ int cur_sp; /* Current stack pointer when using dataloop */ ++ int valid_sp; /* maximum valid stack pointer. This is used to ++ * maintain information on the stack after it has ++ * been placed there by following the datatype field ++ * for any type except struct */ ++ MPII_Dataloop builtin_loop; /* used for both predefined types ++ * (which won't have a loop already) ++ * and for situations where a count ++ * is passed in and we need to create ++ * a contig loop to handle it ++ */ ++}; ++ ++struct MPII_Dataloop_m2m_params { ++ int direction; /* M2M_TO_USERBUF or M2M_FROM_USERBUF */ ++ char *streambuf; ++ char *userbuf; ++}; ++ ++MPI_Aint MPII_Dataloop_stackelm_blocksize(struct MPII_Dataloop_stackelm *elmp); ++MPI_Aint MPII_Dataloop_stackelm_offset(struct MPII_Dataloop_stackelm *elmp); ++void MPII_Dataloop_stackelm_load(struct MPII_Dataloop_stackelm *elmp, ++ MPII_Dataloop * dlp, int branch_flag); ++ ++int MPII_Dataloop_create_contiguous(MPI_Aint count, MPI_Datatype oldtype, MPII_Dataloop ** dlp_p); ++int MPII_Dataloop_create_vector(MPI_Aint count, ++ MPI_Aint blocklength, ++ MPI_Aint stride, ++ int strideinbytes, MPI_Datatype oldtype, MPII_Dataloop ** dlp_p); ++int MPII_Dataloop_create_blockindexed(MPI_Aint count, ++ MPI_Aint blklen, ++ const void *disp_array, ++ int dispinbytes, ++ MPI_Datatype oldtype, MPII_Dataloop ** dlp_p); ++/* we bump up the size of the blocklength array because create_struct might use ++ * create_indexed in an optimization, and in course of doing so, generate a ++ * request of a large blocklength. */ ++int MPII_Dataloop_create_indexed(MPI_Aint count, ++ const MPI_Aint * blocklength_array, ++ const void *displacement_array, ++ int dispinbytes, MPI_Datatype oldtype, MPII_Dataloop ** dlp_p); ++int MPII_Dataloop_create_struct(MPI_Aint count, ++ const int *blklen_array, ++ const MPI_Aint * disp_array, ++ const MPI_Datatype * oldtype_array, MPII_Dataloop ** dlp_p); ++ ++/* Helper functions for dataloop construction */ ++int MPII_Dataloop_convert_subarray(int ndims, ++ int *array_of_sizes, ++ int *array_of_subsizes, ++ int *array_of_starts, ++ int order, MPI_Datatype oldtype, MPI_Datatype * newtype); ++int MPII_Dataloop_convert_darray(int size, ++ int rank, ++ int ndims, ++ int *array_of_gsizes, ++ int *array_of_distribs, ++ int *array_of_dargs, ++ int *array_of_psizes, ++ int order, MPI_Datatype oldtype, MPI_Datatype * newtype); ++ ++MPI_Aint MPII_Dataloop_stream_size(MPII_Dataloop * dl_p, MPI_Aint(*sizefn) (MPI_Datatype el_type)); ++ ++void MPII_Dataloop_alloc(int kind, MPI_Aint count, MPII_Dataloop ** new_loop_p); ++void MPII_Dataloop_alloc_and_copy(int kind, ++ MPI_Aint count, ++ MPII_Dataloop * old_loop, MPII_Dataloop ** new_loop_p); ++ ++void MPII_Dataloop_segment_flatten(MPIR_Segment * segp, ++ MPI_Aint first, ++ MPI_Aint * lastp, ++ MPI_Aint * blklens, MPI_Aint * disps, MPI_Aint * lengthp); ++ ++void MPII_Dataloop_update(MPII_Dataloop * dataloop, MPI_Aint ptrdiff); ++ ++void MPII_Segment_manipulate(MPIR_Segment * segp, ++ MPI_Aint first, ++ MPI_Aint * lastp, ++ int (*piecefn) (MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, ++ void *bufp, ++ void *v_paramp), ++ int (*vectorfn) (MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blklen, ++ MPI_Aint stride, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, ++ void *bufp, ++ void *v_paramp), ++ int (*blkidxfn) (MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blklen, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, ++ void *bufp, ++ void *v_paramp), ++ int (*indexfn) (MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint * blockarray, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, ++ void *bufp, ++ void *v_paramp), ++ MPI_Aint(*sizefn) (MPI_Datatype el_type), void *pieceparams); ++ ++#endif /* DATALOOP_INTERNAL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/looputil.c +@@ -0,0 +1,1022 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++#include "datatype.h" ++#include "mpir_typerep.h" ++#include "looputil.h" ++#include "veccpy.h" ++ ++#define M2M_TO_USERBUF 0 ++#define M2M_FROM_USERBUF 1 ++ ++/* piece_params ++ * ++ * This structure is used to pass function-specific parameters into our ++ * segment processing function. This allows us to get additional parameters ++ * to the functions it calls without changing the prototype. ++ */ ++struct piece_params { ++ union { ++ struct { ++ char *pack_buffer; ++ } pack; ++ struct { ++ MPL_IOV *vectorp; ++ int index; ++ int length; ++ } pack_vector; ++ struct { ++ int64_t *offp; ++ MPI_Aint *sizep; /* see notes in Segment_flatten header */ ++ int index; ++ int length; ++ } flatten; ++ struct { ++ char *last_loc; ++ int count; ++ } contig_blocks; ++ struct { ++ const char *unpack_buffer; ++ } unpack; ++ struct { ++ int stream_off; ++ } print; ++ } u; ++}; ++ ++/* #define MPICH_DEBUG_SEGMENT_MOVE */ ++/* TODO: Consider integrating this with the general debug support. */ ++/* Note: This does not use the CVAR support for the environment variable ++ because (a) this is a temporary code and (b) it is expert developer ++ only */ ++#ifdef MPICH_DEBUG_SEGMENT_MOVE ++static int printSegment = -1; ++static void setPrint(void) ++{ ++ char *s = getenv("MPICH_DATALOOP_PRINT"); ++ if (s && (strcmp(s, "yes") == 0 || strcmp(s, "YES") == 0)) { ++ printSegment = 1; ++ } else { ++ printSegment = 0; ++ } ++} ++ ++#define DBG_SEGMENT(_a) do { if (printSegment < 0) setPrint(); \ ++ if (printSegment) { _a; } } while (0) ++#else ++#define DBG_SEGMENT(_a) ++#endif ++ ++/* NOTE: bufp values are unused, ripe for removal */ ++ ++static int contig_m2m(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int vector_m2m(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blksz, ++ MPI_Aint stride, ++ MPI_Datatype el_type, MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int blkidx_m2m(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blocklen, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int index_m2m(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint * blockarray, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, MPI_Aint rel_off, void *bufp, void *v_paramp); ++ ++/* prototypes of internal functions */ ++static int vector_pack_to_iov(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blksz, ++ MPI_Aint stride, ++ MPI_Datatype el_type, MPI_Aint rel_off, void *bufp, void *v_paramp); ++ ++static int contig_pack_to_iov(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, MPI_Aint rel_off, void *bufp, void *v_paramp); ++ ++static inline int is_float_type(MPI_Datatype el_type) ++{ ++ return ((el_type == MPI_FLOAT) || (el_type == MPI_DOUBLE) || ++ (el_type == MPI_LONG_DOUBLE) || ++ (el_type == MPI_DOUBLE_PRECISION) || ++ (el_type == MPI_COMPLEX) || (el_type == MPI_DOUBLE_COMPLEX)); ++/* (el_type == MPI_REAL4) || (el_type == MPI_REAL8) || */ ++/* (el_type == MPI_REAL16)); */ ++} ++ ++static int external32_basic_convert(char *dest_buf, ++ const char *src_buf, ++ int dest_el_size, int src_el_size, MPI_Aint count) ++{ ++ const char *src_ptr = src_buf; ++ char *dest_ptr = dest_buf; ++ const char *src_end = src_buf + ((int) count * src_el_size); ++ ++ MPIR_Assert(dest_buf && src_buf); ++ ++ if (src_el_size == dest_el_size) { ++ if (src_el_size == 2) { ++ while (src_ptr != src_end) { ++ BASIC_convert16((*(const TWO_BYTE_BASIC_TYPE *) src_ptr), ++ (*(TWO_BYTE_BASIC_TYPE *) dest_ptr)); ++ ++ src_ptr += src_el_size; ++ dest_ptr += dest_el_size; ++ } ++ } else if (src_el_size == 4) { ++ while (src_ptr != src_end) { ++ BASIC_convert32((*(const FOUR_BYTE_BASIC_TYPE *) src_ptr), ++ (*(FOUR_BYTE_BASIC_TYPE *) dest_ptr)); ++ ++ src_ptr += src_el_size; ++ dest_ptr += dest_el_size; ++ } ++ } else if (src_el_size == 8) { ++ while (src_ptr != src_end) { ++ BASIC_convert64(src_ptr, dest_ptr); ++ ++ src_ptr += src_el_size; ++ dest_ptr += dest_el_size; ++ } ++ } ++ } else { ++ /* TODO */ ++ MPL_error_printf ++ ("Conversion of types whose size is not the same as the size in external32 is not supported\n"); ++ MPID_Abort(0, MPI_SUCCESS, 1, "Aborting with internal error"); ++ /* There is no way to return an error code, so an abort is the ++ * only choice (the return value of this routine is not ++ * an error code) */ ++ } ++ return 0; ++} ++ ++static int external32_float_convert(char *dest_buf, ++ const char *src_buf, int dest_el_size, int src_el_size, ++ int count) ++{ ++ const char *src_ptr = src_buf; ++ char *dest_ptr = dest_buf; ++ const char *src_end = src_buf + ((int) count * src_el_size); ++ ++ MPIR_Assert(dest_buf && src_buf); ++ ++ if (src_el_size == dest_el_size) { ++ if (src_el_size == 4) { ++ while (src_ptr != src_end) { ++ FLOAT_convert((*(const FOUR_BYTE_FLOAT_TYPE *) src_ptr), ++ (*(FOUR_BYTE_FLOAT_TYPE *) dest_ptr)); ++ ++ src_ptr += src_el_size; ++ dest_ptr += dest_el_size; ++ } ++ } else if (src_el_size == 8) { ++ while (src_ptr != src_end) { ++ FLOAT_convert((*(const EIGHT_BYTE_FLOAT_TYPE *) src_ptr), ++ (*(EIGHT_BYTE_FLOAT_TYPE *) dest_ptr)); ++ ++ src_ptr += src_el_size; ++ dest_ptr += dest_el_size; ++ } ++ } ++ } else { ++ /* TODO */ ++ MPL_error_printf ++ ("Conversion of types whose size is not the same as the size in external32 is not supported\n"); ++ MPID_Abort(0, MPI_SUCCESS, 1, "Aborting with internal error"); ++ /* There is no way to return an error code, so an abort is the ++ * only choice (the return value of this routine is not ++ * an error code) */ ++ } ++ return 0; ++} ++ ++/* segment_init ++ * ++ * buf - datatype buffer location ++ * count - number of instances of the datatype in the buffer ++ * handle - handle for datatype (could be derived or not) ++ * segp - pointer to previously allocated segment structure ++ * ++ * Notes: ++ * - Assumes that the segment has been allocated. ++ * ++ */ ++static inline void segment_init(const void *buf, ++ MPI_Aint count, MPI_Datatype handle, struct MPIR_Segment *segp) ++{ ++ MPI_Aint elmsize = 0; ++ int i, depth = 0; ++ int branch_detected = 0; ++ ++ struct MPII_Dataloop_stackelm *elmp; ++ MPII_Dataloop *dlp = 0, *sblp = &segp->builtin_loop; ++ ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, "segment_init: count = %d, buf = %x\n", count, buf)); ++#endif ++ ++ if (!MPII_DATALOOP_HANDLE_HASLOOP(handle)) { ++ /* simplest case; datatype has no loop (basic) */ ++ ++ MPIR_Datatype_get_size_macro(handle, elmsize); ++ ++ sblp->kind = MPII_DATALOOP_KIND_CONTIG | MPII_DATALOOP_FINAL_MASK; ++ sblp->loop_params.c_t.count = count; ++ sblp->loop_params.c_t.dataloop = 0; ++ sblp->el_size = elmsize; ++ MPIR_Datatype_get_basic_type(handle, sblp->el_type); ++ MPIR_Datatype_get_extent_macro(handle, sblp->el_extent); ++ ++ dlp = sblp; ++ depth = 1; ++ } else if (count == 0) { ++ /* only use the builtin */ ++ sblp->kind = MPII_DATALOOP_KIND_CONTIG | MPII_DATALOOP_FINAL_MASK; ++ sblp->loop_params.c_t.count = 0; ++ sblp->loop_params.c_t.dataloop = 0; ++ sblp->el_size = 0; ++ sblp->el_extent = 0; ++ ++ dlp = sblp; ++ depth = 1; ++ } else if (count == 1) { ++ /* don't use the builtin */ ++ MPII_DATALOOP_GET_LOOPPTR(handle, dlp); ++ } else { ++ /* default: need to use builtin to handle contig; must check ++ * loop depth first ++ */ ++ MPII_Dataloop *oldloop; /* loop from original type, before new count */ ++ MPI_Aint type_size, type_extent; ++ MPI_Datatype el_type; ++ ++ MPII_DATALOOP_GET_LOOPPTR(handle, oldloop); ++ MPIR_Assert(oldloop != NULL); ++ MPIR_Datatype_get_size_macro(handle, type_size); ++ MPIR_Datatype_get_extent_macro(handle, type_extent); ++ MPIR_Datatype_get_basic_type(handle, el_type); ++ ++ if (depth == 1 && ((oldloop->kind & MPII_DATALOOP_KIND_MASK) == MPII_DATALOOP_KIND_CONTIG)) { ++ if (type_size == type_extent) { ++ /* use a contig */ ++ sblp->kind = MPII_DATALOOP_KIND_CONTIG | MPII_DATALOOP_FINAL_MASK; ++ sblp->loop_params.c_t.count = count * oldloop->loop_params.c_t.count; ++ sblp->loop_params.c_t.dataloop = NULL; ++ sblp->el_size = oldloop->el_size; ++ sblp->el_extent = oldloop->el_extent; ++ sblp->el_type = oldloop->el_type; ++ } else { ++ /* use a vector, with extent of original type becoming the stride */ ++ sblp->kind = MPII_DATALOOP_KIND_VECTOR | MPII_DATALOOP_FINAL_MASK; ++ sblp->loop_params.v_t.count = count; ++ sblp->loop_params.v_t.blocksize = oldloop->loop_params.c_t.count; ++ sblp->loop_params.v_t.stride = type_extent; ++ sblp->loop_params.v_t.dataloop = NULL; ++ sblp->el_size = oldloop->el_size; ++ sblp->el_extent = oldloop->el_extent; ++ sblp->el_type = oldloop->el_type; ++ } ++ } else { ++ /* general case */ ++ sblp->kind = MPII_DATALOOP_KIND_CONTIG; ++ sblp->loop_params.c_t.count = count; ++ sblp->loop_params.c_t.dataloop = oldloop; ++ sblp->el_size = type_size; ++ sblp->el_extent = type_extent; ++ sblp->el_type = el_type; ++ ++ depth++; /* we're adding to the depth with the builtin */ ++ MPIR_Assert(depth < (MPII_DATALOOP_MAX_DATATYPE_DEPTH)); ++ } ++ ++ dlp = sblp; ++ } ++ ++ /* assert instead of return b/c dtype/dloop errorhandling code is inconsistent */ ++ MPIR_Assert(depth < (MPII_DATALOOP_MAX_DATATYPE_DEPTH)); ++ ++ /* initialize the rest of the segment values */ ++ segp->handle = handle; ++ segp->ptr = (void *) buf; ++ segp->stream_off = 0; ++ segp->cur_sp = 0; ++ segp->valid_sp = 0; ++ ++ /* initialize the first stackelm in its entirety */ ++ elmp = &(segp->stackelm[0]); ++ MPII_Dataloop_stackelm_load(elmp, dlp, 0); ++ branch_detected = elmp->may_require_reloading; ++ ++ /* Fill in parameters not set by MPII_Dataloop_stackelm_load */ ++ elmp->orig_offset = 0; ++ elmp->curblock = elmp->orig_block; ++ /* MPII_Dataloop_stackelm_offset assumes correct orig_count, curcount, loop_p */ ++ elmp->curoffset = /* elmp->orig_offset + */ MPII_Dataloop_stackelm_offset(elmp); ++ ++ i = 1; ++ while (!(dlp->kind & MPII_DATALOOP_FINAL_MASK)) { ++ /* get pointer to next dataloop */ ++ switch (dlp->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ case MPII_DATALOOP_KIND_VECTOR: ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ case MPII_DATALOOP_KIND_INDEXED: ++ dlp = dlp->loop_params.cm_t.dataloop; ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ dlp = dlp->loop_params.s_t.dataloop_array[0]; ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ ++ MPIR_Assert(i < MPII_DATALOOP_MAX_DATATYPE_DEPTH); ++ ++ /* loop_p, orig_count, orig_block, and curcount are all filled by us now. ++ * the rest are filled in at processing time. ++ */ ++ elmp = &(segp->stackelm[i]); ++ ++ MPII_Dataloop_stackelm_load(elmp, dlp, branch_detected); ++ branch_detected = elmp->may_require_reloading; ++ i++; ++ ++ } ++ ++ segp->valid_sp = depth - 1; ++} ++ ++struct MPIR_Segment *MPIR_Segment_alloc(const void *buf, MPI_Aint count, MPI_Datatype handle) ++{ ++ struct MPIR_Segment *segp; ++ ++ segp = (struct MPIR_Segment *) MPL_malloc(sizeof(struct MPIR_Segment), MPL_MEM_DATATYPE); ++ if (segp) ++ segment_init(buf, count, handle, segp); ++ ++ return segp; ++} ++ ++/* Segment_free ++ * ++ * Input Parameters: ++ * segp - pointer to segment ++ */ ++void MPIR_Segment_free(struct MPIR_Segment *segp) ++{ ++ MPL_free(segp); ++ return; ++} ++ ++void MPIR_Segment_pack(MPIR_Segment * segp, MPI_Aint first, MPI_Aint * lastp, void *streambuf) ++{ ++ struct MPII_Dataloop_m2m_params params; /* defined in dataloop_parts.h */ ++ ++ DBG_SEGMENT(printf("Segment_pack...\n")); ++ /* experimenting with discarding buf value in the segment, keeping in ++ * per-use structure instead. would require moving the parameters around a ++ * bit. ++ */ ++ params.userbuf = segp->ptr; ++ params.streambuf = streambuf; ++ params.direction = M2M_FROM_USERBUF; ++ ++ MPII_Segment_manipulate(segp, first, lastp, contig_m2m, vector_m2m, blkidx_m2m, index_m2m, NULL, /* size fn */ ++ ¶ms); ++ return; ++} ++ ++void MPIR_Segment_unpack(MPIR_Segment * segp, MPI_Aint first, MPI_Aint * lastp, ++ const void *streambuf) ++{ ++ struct MPII_Dataloop_m2m_params params; ++ ++ DBG_SEGMENT(printf("Segment_unpack...\n")); ++ /* experimenting with discarding buf value in the segment, keeping in ++ * per-use structure instead. would require moving the parameters around a ++ * bit. ++ */ ++ params.userbuf = segp->ptr; ++ params.streambuf = (void *) streambuf; ++ params.direction = M2M_TO_USERBUF; ++ ++ MPII_Segment_manipulate(segp, first, lastp, contig_m2m, vector_m2m, blkidx_m2m, index_m2m, NULL, /* size fn */ ++ ¶ms); ++ return; ++} ++ ++/* PIECE FUNCTIONS BELOW */ ++ ++static int contig_m2m(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) ++{ ++ MPI_Aint el_size; /* MPI_Aint? */ ++ MPI_Aint size; ++ struct MPII_Dataloop_m2m_params *paramp = v_paramp; ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ size = *blocks_p * el_size; ++ ++ DBG_SEGMENT(printf("element type = %lx\n", (long) el_type)); ++ DBG_SEGMENT(printf("contig m2m: elsize = %d, size = %d\n", (int) el_size, (int) size)); ++#ifdef MPID_SU_VERBOSE ++ dbg_printf("\t[contig unpack: do=" MPI_AINT_FMT_DEC_SPEC ", dp=%x, bp=%x, sz=" ++ MPI_AINT_FMT_DEC_SPEC ", blksz=" MPI_AINT_FMT_DEC_SPEC "]\n", rel_off, ++ (unsigned) bufp, (unsigned) paramp->u.unpack.unpack_buffer, el_size, *blocks_p); ++#endif ++ ++ if (paramp->direction == M2M_TO_USERBUF) { ++ MPIR_Memcpy((char *) paramp->userbuf + rel_off, paramp->streambuf, size); ++ } else { ++ MPIR_Memcpy(paramp->streambuf, (char *) paramp->userbuf + rel_off, size); ++ } ++ paramp->streambuf += size; ++ return 0; ++} ++ ++/* Segment_vector_m2m ++ * ++ * Note: this combines both packing and unpacking functionality. ++ * ++ * Note: this is only called when the starting position is at the beginning ++ * of a whole block in a vector type. ++ */ ++static int vector_m2m(MPI_Aint * blocks_p, MPI_Aint count ATTRIBUTE((unused)), MPI_Aint blksz, MPI_Aint stride, MPI_Datatype el_type, MPI_Aint rel_off, /* offset into buffer */ ++ void *bufp ATTRIBUTE((unused)), void *v_paramp) ++{ ++ MPI_Aint i; ++ MPI_Aint el_size, whole_count, blocks_left; ++ struct MPII_Dataloop_m2m_params *paramp = v_paramp; ++ char *cbufp; ++ ++ cbufp = (char *) paramp->userbuf + rel_off; ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ DBG_SEGMENT(printf ++ ("vector m2m: elsize = %d, count = %d, stride = %d, blocksize = %d\n", ++ (int) el_size, (int) count, (int) stride, (int) blksz)); ++ ++ whole_count = (MPI_Aint) ((blksz > 0) ? (*blocks_p / (MPI_Aint) blksz) : 0); ++ blocks_left = (MPI_Aint) ((blksz > 0) ? (*blocks_p % (MPI_Aint) blksz) : 0); ++ ++ if (paramp->direction == M2M_TO_USERBUF) { ++ if (el_size == 8 MPIR_ALIGN8_TEST(paramp->streambuf, cbufp)) { ++ MPII_COPY_TO_VEC(paramp->streambuf, cbufp, stride, int64_t, blksz, whole_count); ++ MPII_COPY_TO_VEC(paramp->streambuf, cbufp, 0, int64_t, blocks_left, 1); ++ } else if (el_size == 4 MPIR_ALIGN4_TEST(paramp->streambuf, cbufp)) { ++ MPII_COPY_TO_VEC((paramp->streambuf), cbufp, stride, int32_t, blksz, whole_count); ++ MPII_COPY_TO_VEC(paramp->streambuf, cbufp, 0, int32_t, blocks_left, 1); ++ } else if (el_size == 2) { ++ MPII_COPY_TO_VEC(paramp->streambuf, cbufp, stride, int16_t, blksz, whole_count); ++ MPII_COPY_TO_VEC(paramp->streambuf, cbufp, 0, int16_t, blocks_left, 1); ++ } else { ++ for (i = 0; i < whole_count; i++) { ++ MPIR_Memcpy(cbufp, paramp->streambuf, ((MPI_Aint) blksz) * el_size); ++ DBG_SEGMENT(printf("vec: memcpy %p %p %d\n", cbufp, ++ paramp->streambuf, (int) (blksz * el_size))); ++ paramp->streambuf += ((MPI_Aint) blksz) * el_size; ++ ++ cbufp += stride; ++ } ++ if (blocks_left) { ++ MPIR_Memcpy(cbufp, paramp->streambuf, ((MPI_Aint) blocks_left) * el_size); ++ DBG_SEGMENT(printf("vec(left): memcpy %p %p %d\n", cbufp, ++ paramp->streambuf, (int) (blocks_left * el_size))); ++ paramp->streambuf += ((MPI_Aint) blocks_left) * el_size; ++ } ++ } ++ } else { /* M2M_FROM_USERBUF */ ++ ++ if (el_size == 8 MPIR_ALIGN8_TEST(cbufp, paramp->streambuf)) { ++ MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, stride, int64_t, blksz, whole_count); ++ MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, 0, int64_t, blocks_left, 1); ++ } else if (el_size == 4 MPIR_ALIGN4_TEST(cbufp, paramp->streambuf)) { ++ MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, stride, int32_t, blksz, whole_count); ++ MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, 0, int32_t, blocks_left, 1); ++ } else if (el_size == 2) { ++ MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, stride, int16_t, blksz, whole_count); ++ MPII_COPY_FROM_VEC(cbufp, paramp->streambuf, 0, int16_t, blocks_left, 1); ++ } else { ++ for (i = 0; i < whole_count; i++) { ++ MPIR_Memcpy(paramp->streambuf, cbufp, (MPI_Aint) blksz * el_size); ++ DBG_SEGMENT(printf("vec: memcpy %p %p %d\n", ++ paramp->streambuf, cbufp, (int) (blksz * el_size))); ++ paramp->streambuf += (MPI_Aint) blksz *el_size; ++ cbufp += stride; ++ } ++ if (blocks_left) { ++ MPIR_Memcpy(paramp->streambuf, cbufp, (MPI_Aint) blocks_left * el_size); ++ DBG_SEGMENT(printf("vec(left): memcpy %p %p %d\n", ++ paramp->streambuf, cbufp, (int) (blocks_left * el_size))); ++ paramp->streambuf += (MPI_Aint) blocks_left *el_size; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int blkidx_m2m(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blocklen, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) ++{ ++ MPI_Aint curblock = 0; ++ MPI_Aint el_size; ++ MPI_Aint blocks_left = *blocks_p; ++ char *cbufp; ++ struct MPII_Dataloop_m2m_params *paramp = v_paramp; ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ DBG_SEGMENT(printf("blkidx m2m: elsize = %ld, count = %ld, blocklen = %ld," ++ " blocks_left = %ld\n", el_size, count, blocklen, blocks_left)); ++ ++ while (blocks_left) { ++ char *src, *dest; ++ ++ MPIR_Assert(curblock < count); ++ ++ cbufp = (char *) paramp->userbuf + rel_off + offsetarray[curblock]; ++ ++ /* there was some casting going on here at one time but now all types ++ * are promoted ot big values */ ++ if (blocklen > blocks_left) ++ blocklen = blocks_left; ++ ++ if (paramp->direction == M2M_TO_USERBUF) { ++ src = paramp->streambuf; ++ dest = cbufp; ++ } else { ++ src = cbufp; ++ dest = paramp->streambuf; ++ } ++ ++ /* note: macro modifies dest buffer ptr, so we must reset */ ++ if (el_size == 8 MPIR_ALIGN8_TEST(src, dest)) { ++ MPII_COPY_FROM_VEC(src, dest, 0, int64_t, blocklen, 1); ++ } else if (el_size == 4 MPIR_ALIGN4_TEST(src, dest)) { ++ MPII_COPY_FROM_VEC(src, dest, 0, int32_t, blocklen, 1); ++ } else if (el_size == 2) { ++ MPII_COPY_FROM_VEC(src, dest, 0, int16_t, blocklen, 1); ++ } else { ++ MPIR_Memcpy(dest, src, (MPI_Aint) blocklen * el_size); ++ DBG_SEGMENT(printf ++ ("blkidx m3m:memcpy(%p,%p,%d)\n", dest, src, (int) (blocklen * el_size))); ++ } ++ ++ paramp->streambuf += (MPI_Aint) blocklen *el_size; ++ blocks_left -= blocklen; ++ curblock++; ++ } ++ ++ return 0; ++} ++ ++static int index_m2m(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint * blockarray, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) ++{ ++ int curblock = 0; ++ MPI_Aint el_size; ++ MPI_Aint cur_block_sz, blocks_left = *blocks_p; ++ char *cbufp; ++ struct MPII_Dataloop_m2m_params *paramp = v_paramp; ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ DBG_SEGMENT(printf("index m2m: elsize = %d, count = %d\n", (int) el_size, (int) count)); ++ ++ while (blocks_left) { ++ char *src, *dest; ++ ++ MPIR_Assert(curblock < count); ++ cur_block_sz = blockarray[curblock]; ++ ++ cbufp = (char *) paramp->userbuf + rel_off + offsetarray[curblock]; ++ ++ if (cur_block_sz > blocks_left) ++ cur_block_sz = blocks_left; ++ ++ if (paramp->direction == M2M_TO_USERBUF) { ++ src = paramp->streambuf; ++ dest = cbufp; ++ } else { ++ src = cbufp; ++ dest = paramp->streambuf; ++ } ++ ++ /* note: macro modifies dest buffer ptr, so we must reset */ ++ if (el_size == 8 MPIR_ALIGN8_TEST(src, dest)) { ++ MPII_COPY_FROM_VEC(src, dest, 0, int64_t, cur_block_sz, 1); ++ } else if (el_size == 4 MPIR_ALIGN4_TEST(src, dest)) { ++ MPII_COPY_FROM_VEC(src, dest, 0, int32_t, cur_block_sz, 1); ++ } else if (el_size == 2) { ++ MPII_COPY_FROM_VEC(src, dest, 0, int16_t, cur_block_sz, 1); ++ } else { ++ MPIR_Memcpy(dest, src, cur_block_sz * el_size); ++ } ++ ++ paramp->streambuf += cur_block_sz * el_size; ++ blocks_left -= cur_block_sz; ++ curblock++; ++ } ++ ++ return 0; ++} ++ ++static int contig_pack_external32_to_buf(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp) ++{ ++ int src_el_size, dest_el_size; ++ struct piece_params *paramp = v_paramp; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPIR_STATE_MPID_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF); ++ ++ MPIR_FUNC_VERBOSE_ENTER(MPIR_STATE_MPID_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF); ++ ++ src_el_size = MPIR_Datatype_get_basic_size(el_type); ++ dest_el_size = MPII_Datatype_get_basic_size_external32(el_type); ++ MPIR_Assert(dest_el_size); ++ ++ /* ++ * h = handle value ++ * do = datatype buffer offset ++ * dp = datatype buffer pointer ++ * bp = pack buffer pointer (current location, incremented as we go) ++ * sz = size of datatype (guess we could get this from handle value if ++ * we wanted...) ++ */ ++#ifdef MPID_SP_VERBOSE ++ dbg_printf("\t[contig pack [external32]: do=%d, dp=%x, bp=%x, " ++ "src_el_sz=%d, dest_el_sz=%d, blksz=%d]\n", ++ rel_off, ++ (unsigned) bufp, ++ (unsigned) paramp->u.pack.pack_buffer, src_el_size, dest_el_size, (int) *blocks_p); ++#endif ++ ++ /* TODO: DEAL WITH CASE WHERE ALL DATA DOESN'T FIT! */ ++ if ((src_el_size == dest_el_size) && (src_el_size == 1)) { ++ MPIR_Memcpy(paramp->u.pack.pack_buffer, ((char *) bufp) + rel_off, *blocks_p); ++ } else if (is_float_type(el_type)) { ++ external32_float_convert(paramp->u.pack.pack_buffer, ++ ((char *) bufp) + rel_off, dest_el_size, src_el_size, *blocks_p); ++ } else { ++ external32_basic_convert(paramp->u.pack.pack_buffer, ++ ((char *) bufp) + rel_off, dest_el_size, src_el_size, *blocks_p); ++ } ++ paramp->u.pack.pack_buffer += (dest_el_size * (*blocks_p)); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPIR_STATE_MPID_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF); ++ return 0; ++} ++ ++static int contig_unpack_external32_to_buf(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp) ++{ ++ int src_el_size, dest_el_size; ++ struct piece_params *paramp = v_paramp; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPIR_STATE_MPID_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF); ++ ++ MPIR_FUNC_VERBOSE_ENTER(MPIR_STATE_MPID_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF); ++ ++ src_el_size = MPIR_Datatype_get_basic_size(el_type); ++ dest_el_size = MPII_Datatype_get_basic_size_external32(el_type); ++ MPIR_Assert(dest_el_size); ++ ++ /* ++ * h = handle value ++ * do = datatype buffer offset ++ * dp = datatype buffer pointer ++ * up = unpack buffer pointer (current location, incremented as we go) ++ * sz = size of datatype (guess we could get this from handle value if ++ * we wanted...) ++ */ ++#ifdef MPID_SP_VERBOSE ++ dbg_printf("\t[contig unpack [external32]: do=%d, dp=%x, up=%x, " ++ "src_el_sz=%d, dest_el_sz=%d, blksz=%d]\n", ++ rel_off, ++ (unsigned) bufp, ++ (unsigned) paramp->u.unpack.unpack_buffer, ++ src_el_size, dest_el_size, (int) *blocks_p); ++#endif ++ ++ /* TODO: DEAL WITH CASE WHERE ALL DATA DOESN'T FIT! */ ++ if ((src_el_size == dest_el_size) && (src_el_size == 1)) { ++ MPIR_Memcpy(((char *) bufp) + rel_off, paramp->u.unpack.unpack_buffer, *blocks_p); ++ } else if (is_float_type(el_type)) { ++ external32_float_convert(((char *) bufp) + rel_off, ++ paramp->u.unpack.unpack_buffer, ++ dest_el_size, src_el_size, *blocks_p); ++ } else { ++ external32_basic_convert(((char *) bufp) + rel_off, ++ paramp->u.unpack.unpack_buffer, ++ dest_el_size, src_el_size, *blocks_p); ++ } ++ paramp->u.unpack.unpack_buffer += (dest_el_size * (*blocks_p)); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPIR_STATE_MPID_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF); ++ return 0; ++} ++ ++void MPIR_Segment_pack_external32(struct MPIR_Segment *segp, ++ MPI_Aint first, MPI_Aint * lastp, void *pack_buffer) ++{ ++ struct piece_params pack_params; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPIR_STATE_MPID_SEGMENT_PACK_EXTERNAL); ++ ++ MPIR_FUNC_VERBOSE_ENTER(MPIR_STATE_MPID_SEGMENT_PACK_EXTERNAL); ++ ++ pack_params.u.pack.pack_buffer = (void *) pack_buffer; ++ MPII_Segment_manipulate(segp, first, lastp, contig_pack_external32_to_buf, NULL, /* MPIR_Segment_vector_pack_external32_to_buf, */ ++ NULL, /* blkidx */ ++ NULL, /* MPIR_Segment_index_pack_external32_to_buf, */ ++ MPII_Datatype_get_basic_size_external32, &pack_params); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPIR_STATE_MPID_SEGMENT_PACK_EXTERNAL); ++ return; ++} ++ ++void MPIR_Segment_unpack_external32(struct MPIR_Segment *segp, ++ MPI_Aint first, MPI_Aint * lastp, const void *unpack_buffer) ++{ ++ struct piece_params pack_params; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPIR_STATE_MPID_SEGMENT_UNPACK_EXTERNAL32); ++ ++ MPIR_FUNC_VERBOSE_ENTER(MPIR_STATE_MPID_SEGMENT_UNPACK_EXTERNAL32); ++ ++ pack_params.u.unpack.unpack_buffer = unpack_buffer; ++ MPII_Segment_manipulate(segp, first, lastp, contig_unpack_external32_to_buf, NULL, /* MPIR_Segment_vector_unpack_external32_to_buf, */ ++ NULL, /* blkidx */ ++ NULL, /* MPIR_Segment_index_unpack_external32_to_buf, */ ++ MPII_Datatype_get_basic_size_external32, &pack_params); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPIR_STATE_MPID_SEGMENT_UNPACK_EXTERNAL32); ++ return; ++} ++ ++void MPIR_Type_access_contents(MPI_Datatype type, ++ int **ints_p, MPI_Aint ** aints_p, MPI_Datatype ** types_p) ++{ ++ int nr_ints, nr_aints, nr_types, combiner; ++ int types_sz, struct_sz, ints_sz, epsilon, align_sz; ++ MPIR_Datatype *dtp; ++ MPIR_Datatype_contents *cp; ++ ++ MPIR_Type_get_envelope(type, &nr_ints, &nr_aints, &nr_types, &combiner); ++ ++ /* hardcoded handling of MPICH contents format... */ ++ MPIR_Datatype_get_ptr(type, dtp); ++ MPIR_Assert(dtp != NULL); ++ ++ cp = dtp->contents; ++ MPIR_Assert(cp != NULL); ++ ++#ifdef HAVE_MAX_STRUCT_ALIGNMENT ++ align_sz = HAVE_MAX_STRUCT_ALIGNMENT; ++#else ++ align_sz = 8; ++#endif ++ ++ struct_sz = sizeof(MPIR_Datatype_contents); ++ types_sz = nr_types * sizeof(MPI_Datatype); ++ ints_sz = nr_ints * sizeof(int); ++ ++ if ((epsilon = struct_sz % align_sz)) { ++ struct_sz += align_sz - epsilon; ++ } ++ if ((epsilon = types_sz % align_sz)) { ++ types_sz += align_sz - epsilon; ++ } ++ if ((epsilon = ints_sz % align_sz)) { ++ ints_sz += align_sz - epsilon; ++ } ++ *types_p = (MPI_Datatype *) (((char *) cp) + struct_sz); ++ *ints_p = (int *) (((char *) (*types_p)) + types_sz); ++ *aints_p = (MPI_Aint *) (((char *) (*ints_p)) + ints_sz); ++ /* end of hardcoded handling of MPICH contents format */ ++ ++ return; ++} ++ ++/* FIXME: Is this routine complete? Why is it needed? If it is needed, it ++ must have a comment that describes why it is needed and the arguments ++ must have ATTRIBUTE((unused)) */ ++void MPIR_Type_release_contents(MPI_Datatype type, ++ int **ints_p, MPI_Aint ** aints_p, MPI_Datatype ** types_p) ++{ ++ return; ++} ++ ++/* MPIR_Segment_to_iov ++* ++* Parameters: ++* segp - pointer to segment structure ++* first - first byte in segment to pack ++* lastp - in/out parameter describing last byte to pack (and afterwards ++* the last byte _actually_ packed) ++* NOTE: actually returns index of byte _after_ last one packed ++* vectorp - pointer to (off, len) pairs to fill in ++* lengthp - in/out parameter describing length of array (and afterwards ++* the amount of the array that has actual data) ++*/ ++void MPIR_Segment_to_iov(struct MPIR_Segment *segp, ++ MPI_Aint first, MPI_Aint * lastp, MPL_IOV * vectorp, int *lengthp) ++{ ++ struct piece_params packvec_params; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_TO_IOV); ++ ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_TO_IOV); ++ ++ packvec_params.u.pack_vector.vectorp = vectorp; ++ packvec_params.u.pack_vector.index = 0; ++ packvec_params.u.pack_vector.length = *lengthp; ++ ++ MPIR_Assert(*lengthp > 0); ++ ++ MPII_Segment_manipulate(segp, first, lastp, contig_pack_to_iov, vector_pack_to_iov, NULL, /* blkidx fn */ ++ NULL, /* index fn */ ++ NULL, &packvec_params); ++ ++ /* last value already handled by MPII_Segment_manipulate */ ++ *lengthp = packvec_params.u.pack_vector.index; ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_TO_IOV); ++ return; ++} ++ ++ ++/* ++* EVERYTHING BELOW HERE IS USED ONLY WITHIN THIS FILE ++*/ ++ ++/********** FUNCTIONS FOR CREATING AN IOV DESCRIBING BUFFER **********/ ++ ++static int contig_pack_to_iov(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, MPI_Aint rel_off, void *bufp, void *v_paramp) ++{ ++ int el_size, last_idx; ++ MPI_Aint size; ++ char *last_end = NULL; ++ struct piece_params *paramp = v_paramp; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV); ++ ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV); ++ ++ el_size = MPIR_Datatype_get_basic_size(el_type); ++ size = *blocks_p * (MPI_Aint) el_size; ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, (MPL_DBG_FDEST, ++ " contig to vec: do=" MPI_AINT_FMT_DEC_SPEC ++ ", dp=%p, ind=%d, sz=%d, blksz=" ++ MPI_AINT_FMT_DEC_SPEC, (MPI_Aint) rel_off, bufp, ++ paramp->u.pack_vector.index, el_size, ++ (MPI_Aint) * blocks_p)); ++ ++ last_idx = paramp->u.pack_vector.index - 1; ++ if (last_idx >= 0) { ++ last_end = ((char *) paramp->u.pack_vector.vectorp[last_idx].MPL_IOV_BUF) + ++ paramp->u.pack_vector.vectorp[last_idx].MPL_IOV_LEN; ++ } ++ ++ if ((last_idx == paramp->u.pack_vector.length - 1) && (last_end != ((char *) bufp + rel_off))) { ++ /* we have used up all our entries, and this region doesn't fit on ++ * the end of the last one. setting blocks to 0 tells manipulation ++ * function that we are done (and that we didn't process any blocks). ++ */ ++ *blocks_p = 0; ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV); ++ return 1; ++ } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off))) { ++ /* add this size to the last vector rather than using up another one */ ++ paramp->u.pack_vector.vectorp[last_idx].MPL_IOV_LEN += size; ++ } else { ++ paramp->u.pack_vector.vectorp[last_idx + 1].MPL_IOV_BUF = (char *) bufp + rel_off; ++ paramp->u.pack_vector.vectorp[last_idx + 1].MPL_IOV_LEN = size; ++ paramp->u.pack_vector.index++; ++ } ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_CONTIG_PACK_TO_IOV); ++ return 0; ++} ++ ++/* vector_pack_to_iov ++ * ++ * Input Parameters: ++ * blocks_p - [inout] pointer to a count of blocks (total, for all noncontiguous pieces) ++ * count - # of noncontiguous regions ++ * blksz - size of each noncontiguous region ++ * stride - distance in bytes from start of one region to start of next ++ * el_type - elemental type (e.g. MPI_INT) ++ * ... ++ * ++ * Note: this is only called when the starting position is at the beginning ++ * of a whole block in a vector type. ++ */ ++static int vector_pack_to_iov(MPI_Aint * blocks_p, MPI_Aint count, MPI_Aint blksz, MPI_Aint stride, MPI_Datatype el_type, MPI_Aint rel_off, /* offset into buffer */ ++ void *bufp, /* start of buffer */ ++ void *v_paramp) ++{ ++ int i; ++ MPI_Aint size, blocks_left, basic_size; ++ struct piece_params *paramp = v_paramp; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV); ++ ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV); ++ ++ basic_size = (MPI_Aint) MPIR_Datatype_get_basic_size(el_type); ++ blocks_left = *blocks_p; ++ ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, (MPL_DBG_FDEST, ++ " vector to vec: do=" MPI_AINT_FMT_DEC_SPEC ++ ", dp=%p" ++ ", len=" MPI_AINT_FMT_DEC_SPEC ++ ", ind=" MPI_AINT_FMT_DEC_SPEC ++ ", ct=" MPI_AINT_FMT_DEC_SPEC ++ ", blksz=" MPI_AINT_FMT_DEC_SPEC ++ ", str=" MPI_AINT_FMT_DEC_SPEC ++ ", blks=" MPI_AINT_FMT_DEC_SPEC, ++ (MPI_Aint) rel_off, ++ bufp, ++ (MPI_Aint) paramp->u.pack_vector.length, ++ (MPI_Aint) paramp->u.pack_vector.index, ++ count, ++ blksz, (MPI_Aint) stride, (MPI_Aint) * blocks_p)); ++ ++ for (i = 0; i < count && blocks_left > 0; i++) { ++ int last_idx; ++ char *last_end = NULL; ++ ++ if (blocks_left > (MPI_Aint) blksz) { ++ size = ((MPI_Aint) blksz) * basic_size; ++ blocks_left -= (MPI_Aint) blksz; ++ } else { ++ /* last pass */ ++ size = blocks_left * basic_size; ++ blocks_left = 0; ++ } ++ ++ last_idx = paramp->u.pack_vector.index - 1; ++ if (last_idx >= 0) { ++ last_end = ((char *) paramp->u.pack_vector.vectorp[last_idx].MPL_IOV_BUF) + ++ paramp->u.pack_vector.vectorp[last_idx].MPL_IOV_LEN; ++ } ++ ++ if ((last_idx == paramp->u.pack_vector.length - 1) && ++ (last_end != ((char *) bufp + rel_off))) { ++ /* we have used up all our entries, and this one doesn't fit on ++ * the end of the last one. ++ */ ++ *blocks_p -= (blocks_left + (size / basic_size)); ++#ifdef MPID_SP_VERBOSE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "\t[vector to vec exiting (1): next ind = %d, " MPI_AINT_FMT_DEC_SPEC ++ " blocks processed.\n", paramp->u.pack_vector.index, ++ (MPI_Aint) * blocks_p)); ++#endif ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV); ++ return 1; ++ } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off))) { ++ /* add this size to the last vector rather than using up new one */ ++ paramp->u.pack_vector.vectorp[last_idx].MPL_IOV_LEN += size; ++ } else { ++ paramp->u.pack_vector.vectorp[last_idx + 1].MPL_IOV_BUF = (char *) bufp + rel_off; ++ paramp->u.pack_vector.vectorp[last_idx + 1].MPL_IOV_LEN = size; ++ paramp->u.pack_vector.index++; ++ } ++ ++ rel_off += stride; ++ ++ } ++ ++#ifdef MPID_SP_VERBOSE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "\t[vector to vec exiting (2): next ind = %d, " MPI_AINT_FMT_DEC_SPEC ++ " blocks processed.\n", paramp->u.pack_vector.index, (MPI_Aint) * blocks_p)); ++#endif ++ ++ /* if we get here then we processed ALL the blocks; don't need to update ++ * blocks_p ++ */ ++ MPIR_Assert(blocks_left == 0); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIR_SEGMENT_VECTOR_PACK_TO_IOV); ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/looputil.h +@@ -0,0 +1,415 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef LOOPUTIL_H_INCLUDED ++#define LOOPUTIL_H_INCLUDED ++ ++#include "mpichconf.h" ++ ++/* FIXME!!! TODO!!! FOO!!! DO THIS!!! DETECT ME!!! ++ * ++ * Consider using MPIU_INT64_T etc. types instead of the ++ * EIGHT_BYTE_BASIC_TYPE stuff, or put #defines at the top of this file ++ * assigning them in a simple manner. ++ * ++ * Doing that might require that we create MPIU_UINT64_T types (etc), ++ * because it looks like we really want to have unsigned types for the ++ * various convert functions below. ++ */ ++ ++#ifdef HAVE_INTTYPES_H ++#include ++#endif ++#ifdef HAVE_LIMITS_H ++#include ++#endif ++#ifdef HAVE_ENDIAN_H ++#include ++#endif ++ ++#ifdef HAVE_INT64 ++#define uint64_t __int64 ++#define uint32_t __int32 ++#elif defined(MPIU_INT64_T) ++/* FIXME: This is necessary with some compilers or compiler settings */ ++#define uint64_t unsigned MPIU_INT64_T ++#endif ++ ++/* FIXME: Who defines __BYTE_ORDER or __BIG_ENDIAN? They aren't part of C */ ++/* FIXME: The else test assumes that the byte order is little endian, whereas ++ it may simply have been undetermined. This should instead use either ++ a configure-time test (for which there are macros) or a runtime test ++ and not use this non-portable check */ ++ ++/* Some platforms, like AIX, use BYTE_ORDER instead of __BYTE_ORDER */ ++#if defined(BYTE_ORDER) && !defined(__BYTE_ORDER) ++#define __BYTE_ORDER BYTE_ORDER ++#endif ++ ++#if defined(WORDS_BIGENDIAN) ++#define BLENDIAN 0 ++#elif defined(WORDS_LITTLEENDIAN) ++#define BLENDIAN 1 ++#else ++#if !defined(__BYTE_ORDER) || !defined(__BIG_ENDIAN) ++#error This code assumes that __BYTE_ORDER and __BIG_ENDIAN are defined ++#endif ++/* FIXME: "BLENDIAN" is a non-conforming name - it could conflict with some ++ other definition in a non-mpich header file */ ++#if ((defined(_BIG_ENDIAN) && !defined(ntohl)) || (__BYTE_ORDER == __BIG_ENDIAN)) ++#define BLENDIAN 0 /* detected host arch byte order is big endian */ ++#else ++#define BLENDIAN 1 /* detected host arch byte order is little endian */ ++#endif ++#endif ++ ++/* ++ set to 1: uses manual swapping routines ++ for 16/32 bit data types ++ set to 0: uses system provided swapping routines ++ for 16/32 bit data types ++*/ ++#define MANUAL_BYTESWAPS 1 ++ ++/* ++ NOTE: ++ ++ There are two 'public' calls here: ++ ++ FLOAT_convert(src, dest) -- converts floating point src into ++ external32 floating point format and stores the result in dest. ++ ++ BASIC_convert(src, dest) -- converts integral type src into ++ external32 integral type and stores the result in dest. ++ ++ These two macros compile to assignments on big-endian architectures. ++*/ ++ ++#if (MANUAL_BYTESWAPS == 0) ++#include ++#endif ++ ++#define BITSIZE_OF(type) (sizeof(type) * CHAR_BIT) ++ ++#if (MANUAL_BYTESWAPS == 1) ++#define BASIC_convert32(src, dest) \ ++{ \ ++ dest = (((src >> 24) & 0x000000FF) |\ ++ ((src >> 8) & 0x0000FF00) |\ ++ ((src << 8) & 0x00FF0000) |\ ++ ((src << 24) & 0xFF000000));\ ++} ++#else ++#define BASIC_convert32(src, dest) \ ++{ \ ++ dest = htonl((uint32_t)src); \ ++} ++#endif ++ ++#if (MANUAL_BYTESWAPS == 1) ++#define BASIC_convert16(src, dest) \ ++{ \ ++ dest = (((src >> 8) & 0x00FF) | \ ++ ((src << 8) & 0xFF00)); \ ++} ++#else ++#define BASIC_convert16(src, dest) \ ++{ \ ++ dest = htons((uint16_t)src); \ ++} ++#endif ++ ++ ++/* changed the argument types to be char* instead of uint64_t* because the Sun compiler ++ prints out warnings that the function expects unsigned long long, but is being passed ++ signed long long in mpid_ext32_segment.c. */ ++static inline void BASIC_convert64(const char *src, char *dest) ++{ ++ uint32_t tmp_src[2]; ++ uint32_t tmp_dest[2]; ++ ++ tmp_src[0] = (uint32_t) (*((uint64_t *) src) >> 32); ++ tmp_src[1] = (uint32_t) ((*((uint64_t *) src) << 32) >> 32); ++ ++ BASIC_convert32(tmp_src[0], tmp_dest[0]); ++ BASIC_convert32(tmp_src[1], tmp_dest[1]); ++ ++ *((uint64_t *) dest) = (uint64_t) tmp_dest[0]; ++ *((uint64_t *) dest) <<= 32; ++ *((uint64_t *) dest) |= (uint64_t) tmp_dest[1]; ++} ++ ++static inline void BASIC_convert96(const char *src, char *dest) ++{ ++ uint32_t tmp_src[3]; ++ uint32_t tmp_dest[3]; ++ char *ptr = dest; ++ ++ tmp_src[0] = (uint32_t) (*((uint64_t *) src) >> 32); ++ tmp_src[1] = (uint32_t) ((*((uint64_t *) src) << 32) >> 32); ++ tmp_src[2] = (uint32_t) ++ (*((uint32_t *) ((char *) src + sizeof(uint64_t)))); ++ ++ BASIC_convert32(tmp_src[0], tmp_dest[0]); ++ BASIC_convert32(tmp_src[1], tmp_dest[1]); ++ BASIC_convert32(tmp_src[2], tmp_dest[2]); ++ ++ *((uint32_t *) ptr) = tmp_dest[0]; ++ ptr += sizeof(uint32_t); ++ *((uint32_t *) ptr) = tmp_dest[1]; ++ ptr += sizeof(uint32_t); ++ *((uint32_t *) ptr) = tmp_dest[2]; ++} ++ ++static inline void BASIC_convert128(const char *src, char *dest) ++{ ++ uint64_t tmp_src[2]; ++ uint64_t tmp_dest[2]; ++ char *ptr = dest; ++ ++ tmp_src[0] = *((uint64_t *) src); ++ tmp_src[1] = *((uint64_t *) ((char *) src + sizeof(uint64_t))); ++ ++ BASIC_convert64((char *) &tmp_src[0], (char *) &tmp_dest[0]); ++ BASIC_convert64((char *) &tmp_src[1], (char *) &tmp_dest[1]); ++ ++ *((uint64_t *) ptr) = tmp_dest[0]; ++ ptr += sizeof(uint64_t); ++ *((uint64_t *) ptr) = tmp_dest[1]; ++} ++ ++#if (BLENDIAN == 1) ++#define BASIC_convert(src, dest) \ ++{ \ ++ register int type_byte_size = sizeof(src); \ ++ switch(type_byte_size) \ ++ { \ ++ case 1: \ ++ dest = src; \ ++ break; \ ++ case 2: \ ++ BASIC_convert16(src, dest); \ ++ break; \ ++ case 4: \ ++ BASIC_convert32(src, dest); \ ++ break; \ ++ case 8: \ ++ BASIC_convert64((char *)&src, \ ++ (char *)&dest);\ ++ break; \ ++ } \ ++} ++ ++/* ++ http://www.mpi-forum.org/docs/mpi-20-html/node200.htm ++ ++ When converting a larger size integer to a smaller size integer, ++ only the less significant bytes are moved. Care must be taken to ++ preserve the sign bit value. This allows no conversion errors if the ++ data range is within the range of the smaller size integer. (End of ++ advice to implementors.) ++*/ ++#define BASIC_mixed_convert(src, dest) ++#else ++#define BASIC_convert(src, dest) \ ++ { dest = src; } ++#define BASIC_mixed_convert(src, dest) \ ++ { dest = src; } ++#endif ++ ++/* ++ Notes on the IEEE floating point format ++ --------------------------------------- ++ ++ external32 for floating point types is big-endian IEEE format. ++ ++ --------------------- ++ 32 bit floating point ++ --------------------- ++ * big endian byte order ++ struct be_ieee754_single_precision ++ { ++ unsigned int sign_neg:1; ++ unsigned int exponent:8; ++ unsigned int mantissa:23; ++ }; ++ ++ * little endian byte order ++ struct le_ieee754_single_precision ++ { ++ unsigned int mantissa:23; ++ unsigned int exponent:8; ++ unsigned int sign_neg:1; ++ }; ++ --------------------- ++ ++ --------------------- ++ 64 bit floating point ++ --------------------- ++ * big endian byte order ++ struct be_ieee754_double_precision ++ { ++ unsigned int sign_neg:1; ++ unsigned int exponent:11; ++ unsigned int mantissa0:20; ++ unsigned int mantissa1:32; ++ }; ++ ++ * little endian byte order ++ * big endian float word order ++ struct le_ieee754_double_precision ++ { ++ unsigned int mantissa0:20; ++ unsigned int exponent:11; ++ unsigned int sign_neg:1; ++ unsigned int mantissa1:32; ++ }; ++ ++ * little endian byte order ++ * little endian float word order ++ struct le_ieee754_double_precision ++ { ++ unsigned int mantissa1:32; ++ unsigned int mantissa0:20; ++ unsigned int exponent:11; ++ unsigned int sign_neg:1; ++ }; ++ --------------------- ++ ++ --------------------- ++ 96 bit floating point ++ --------------------- ++ * big endian byte order ++ struct be_ieee854_double_extended ++ { ++ unsigned int negative:1; ++ unsigned int exponent:15; ++ unsigned int empty:16; ++ unsigned int mantissa0:32; ++ unsigned int mantissa1:32; ++ }; ++ ++ * little endian byte order ++ * big endian float word order ++ struct le_ieee854_double_extended ++ { ++ unsigned int exponent:15; ++ unsigned int negative:1; ++ unsigned int empty:16; ++ unsigned int mantissa0:32; ++ unsigned int mantissa1:32; ++ }; ++ ++ * little endian byte order ++ * little endian float word order ++ struct le_ieee854_double_extended ++ { ++ unsigned int mantissa1:32; ++ unsigned int mantissa0:32; ++ unsigned int exponent:15; ++ unsigned int negative:1; ++ unsigned int empty:16; ++ }; ++ --------------------- ++ ++ 128 bit floating point implementation notes ++ =========================================== ++ ++ "A 128-bit long double number consists of an ordered pair of ++ 64-bit double-precision numbers. The first member of the ++ ordered pair contains the high-order part of the number, and ++ the second member contains the low-order part. The value of the ++ long double quantity is the sum of the two 64-bit numbers." ++ ++ From http://nscp.upenn.edu/aix4.3html/aixprggd/genprogc/128bit_long_double_floating-point_datatype.htm ++ [ as of 09/04/2003 ] ++*/ ++ ++#if (BLENDIAN == 1) ++#define FLOAT_convert(src, dest) \ ++{ \ ++ register int type_byte_size = sizeof(src);\ ++ switch(type_byte_size) \ ++ { \ ++ case 4: \ ++ { \ ++ long d; \ ++ BASIC_convert32((long)src, d); \ ++ dest = (float)d; \ ++ } \ ++ break; \ ++ case 8: \ ++ { \ ++ BASIC_convert64((const char *)&src,\ ++ (char *)&dest);\ ++ } \ ++ break; \ ++ case 12: \ ++ { \ ++ BASIC_convert96((const char *)&src,\ ++ (char *)&dest); \ ++ } \ ++ break; \ ++ case 16: \ ++ { \ ++ BASIC_convert128((const char *)&src,\ ++ (char *)&dest); \ ++ } \ ++ break; \ ++ } \ ++} ++#else ++#define FLOAT_convert(src, dest) \ ++ { dest = src; } ++#endif ++ ++#ifdef HAVE_INT16_T ++#define TWO_BYTE_BASIC_TYPE int16_t ++#else ++#if (SIZEOF_SHORT == 2) ++#define TWO_BYTE_BASIC_TYPE short ++#else ++#error "Cannot detect a basic type that is 2 bytes long" ++#endif ++#endif /* HAVE_INT16_T */ ++ ++#ifdef HAVE_INT32_T ++#define FOUR_BYTE_BASIC_TYPE int32_t ++#else ++#if (SIZEOF_INT == 4) ++#define FOUR_BYTE_BASIC_TYPE int ++#elif (SIZEOF_LONG == 4) ++#define FOUR_BYTE_BASIC_TYPE long ++#else ++#error "Cannot detect a basic type that is 4 bytes long" ++#endif ++#endif /* HAVE_INT32_T */ ++ ++#ifdef HAVE_INT64_T ++#define EIGHT_BYTE_BASIC_TYPE int64_t ++#else ++#ifdef HAVE_INT64 ++#define EIGHT_BYTE_BASIC_TYPE __int64 ++#elif (SIZEOF_LONG_LONG == 8) ++#define EIGHT_BYTE_BASIC_TYPE long long ++#else ++#error "Cannot detect a basic type that is 8 bytes long" ++#endif ++#endif /* HAVE_INT64_T */ ++ ++#if (SIZEOF_FLOAT == 4) ++#define FOUR_BYTE_FLOAT_TYPE float ++#else ++#error "Cannot detect a float type that is 4 bytes long" ++#endif ++ ++#if (SIZEOF_DOUBLE == 8) ++#define EIGHT_BYTE_FLOAT_TYPE double ++#else ++#error "Cannot detect a float type that is 8 bytes long" ++#endif ++ ++#endif /* LOOPUTIL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/segment.c +@@ -0,0 +1,1074 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++#include ++#include ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++categories: ++ - name : DATALOOP ++ description : Dataloop-related CVARs ++ ++cvars: ++ - name : MPIR_CVAR_DATALOOP_FAST_SEEK ++ category : DATALOOP ++ type : int ++ default : 1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ use a datatype-specialized algorithm to shortcut seeking to ++ the correct location in a noncontiguous buffer ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++#undef MPII_DATALOOP_DEBUG_MANIPULATE ++ ++/* Notes on functions: ++ * ++ * There are a few different sets of functions here: ++ * - MPII_Segment_manipulate() - uses a "piece" function to perform operations ++ * using segments (piece functions defined elsewhere) ++ * - MPIDU functions - these define the externally visible interface ++ * to segment functionality ++ */ ++ ++/* MPII_Segment_manipulate - do something to a segment ++ * ++ * If you think of all the data to be manipulated (packed, unpacked, whatever), ++ * as a stream of bytes, it's easier to understand how first and last fit in. ++ * ++ * This function does all the work, calling the piecefn passed in when it ++ * encounters a datatype element which falls into the range of first..(last-1). ++ * ++ * piecefn can be NULL, in which case this function doesn't do anything when it ++ * hits a region. This is used internally for repositioning within this stream. ++ * ++ * last is a byte offset to the byte just past the last byte in the stream ++ * to operate on. this makes the calculations all over MUCH cleaner. ++ * ++ * stream_off, stream_el_size, first, and last are all working in terms of the ++ * types and sizes for the stream, which might be different from the local sizes ++ * (in the heterogeneous case). ++ * ++ * This is a horribly long function. Too bad; it's complicated :)! -- Rob ++ * ++ * NOTE: THIS IMPLEMENTATION CANNOT HANDLE STRUCT DATALOOPS. ++ */ ++ ++#define SEGMENT_SAVE_LOCAL_VALUES \ ++ { \ ++ segp->cur_sp = cur_sp; \ ++ segp->valid_sp = valid_sp; \ ++ segp->stream_off = stream_off; \ ++ *lastp = stream_off; \ ++ } ++ ++#define SEGMENT_LOAD_LOCAL_VALUES \ ++ { \ ++ last = *lastp; \ ++ cur_sp = segp->cur_sp; \ ++ valid_sp = segp->valid_sp; \ ++ stream_off = segp->stream_off; \ ++ cur_elmp = &(segp->stackelm[cur_sp]); \ ++ } ++ ++#define SEGMENT_RESET_VALUES \ ++ { \ ++ segp->stream_off = 0; \ ++ segp->cur_sp = 0; \ ++ cur_elmp = &(segp->stackelm[0]); \ ++ cur_elmp->curcount = cur_elmp->orig_count; \ ++ cur_elmp->orig_block = MPII_Dataloop_stackelm_blocksize(cur_elmp); \ ++ cur_elmp->curblock = cur_elmp->orig_block; \ ++ cur_elmp->curoffset = cur_elmp->orig_offset + \ ++ MPII_Dataloop_stackelm_offset(cur_elmp); \ ++ } ++ ++#define SEGMENT_POP_AND_MAYBE_EXIT \ ++ { \ ++ cur_sp--; \ ++ if (cur_sp >= 0) cur_elmp = &segp->stackelm[cur_sp]; \ ++ else { \ ++ SEGMENT_SAVE_LOCAL_VALUES; \ ++ return; \ ++ } \ ++ } ++ ++#define SEGMENT_PUSH \ ++ { \ ++ cur_sp++; \ ++ cur_elmp = &segp->stackelm[cur_sp]; \ ++ } ++ ++#define STACKELM_BLOCKINDEXED_OFFSET(elmp_, curcount_) \ ++ (elmp_)->loop_p->loop_params.bi_t.offset_array[(curcount_)] ++ ++#define STACKELM_INDEXED_OFFSET(elmp_, curcount_) \ ++ (elmp_)->loop_p->loop_params.i_t.offset_array[(curcount_)] ++ ++#define STACKELM_INDEXED_BLOCKSIZE(elmp_, curcount_) \ ++ (elmp_)->loop_p->loop_params.i_t.blocksize_array[(curcount_)] ++ ++#define STACKELM_STRUCT_OFFSET(elmp_, curcount_) \ ++ (elmp_)->loop_p->loop_params.s_t.offset_array[(curcount_)] ++ ++#define STACKELM_STRUCT_BLOCKSIZE(elmp_, curcount_) \ ++ (elmp_)->loop_p->loop_params.s_t.blocksize_array[(curcount_)] ++ ++#define STACKELM_STRUCT_EL_EXTENT(elmp_, curcount_) \ ++ (elmp_)->loop_p->loop_params.s_t.el_extent_array[(curcount_)] ++ ++#define STACKELM_STRUCT_DATALOOP(elmp_, curcount_) \ ++ (elmp_)->loop_p->loop_params.s_t.dataloop_array[(curcount_)] ++ ++static void segment_seek(struct MPIR_Segment *segp, MPI_Aint position, ++ MPI_Aint(*sizefn) (MPI_Datatype el_type)) ++{ ++ struct MPII_Dataloop_stackelm *cur_elmp; ++ struct MPII_Dataloop_stackelm *next_elmp; ++ int cur_sp; ++ ++ MPIR_Assert(segp->stream_off < position); ++ ++ if (segp->stream_off || sizefn || !MPIR_CVAR_DATALOOP_FAST_SEEK) { ++ goto fallback_path; ++ } ++ ++ SEGMENT_RESET_VALUES; ++ cur_sp = segp->cur_sp; ++ ++ /* in the common case where this is a new segment and user wants ++ * to pack or unpack from a non-zero offset, try to skip through ++ * large blocks and setup the segment cursor at the correct ++ * position */ ++ /* in the below code, at the leaf-level, the curblocks is setup to ++ * point to the remaining blocks. But at the upper levels, the ++ * curblocks are setup to be one lesser than the remaining blocks ++ * (even if the lower-level block is completely unused). */ ++ cur_elmp->orig_offset = 0; ++ cur_elmp->curoffset = 0; ++ while (1) { ++ switch ((cur_elmp->loop_p->kind & MPII_DATALOOP_KIND_MASK)) { ++ ++ case MPII_DATALOOP_KIND_CONTIG: ++ { ++ MPI_Aint blocksize = MPII_Dataloop_stackelm_blocksize(cur_elmp); ++ ++ MPI_Aint num_elems = (position - segp->stream_off) / cur_elmp->loop_p->el_size; ++ if (num_elems > blocksize) ++ num_elems = blocksize; ++ segp->stream_off += num_elems * cur_elmp->loop_p->el_size; ++ ++ /* contig should have exactly one block */ ++ MPIR_Assert(cur_elmp->orig_count == 1); ++ ++ /* current (remaining) block count */ ++ cur_elmp->curcount = (num_elems == blocksize ? 0 : 1); ++ ++ /* current (remaining) block size */ ++ cur_elmp->curblock = blocksize - num_elems; ++ ++ /* current offset */ ++ cur_elmp->curoffset = cur_elmp->orig_offset + ++ num_elems * cur_elmp->loop_p->el_extent; ++ ++ /* if there is a child element, setup its ++ * parameters */ ++ if ((cur_elmp->loop_p->kind & MPII_DATALOOP_FINAL_MASK) == 0) { ++ next_elmp = &(segp->stackelm[cur_sp + 1]); ++ next_elmp->orig_offset = cur_elmp->curoffset; ++ cur_elmp->curoffset = cur_elmp->orig_offset; ++ ++ cur_elmp->curblock--; ++ segp->cur_sp++; ++ ++ /* we can't skip any large blocks at this ++ * level anymore; move one level lower and ++ * repeat the same process */ ++ SEGMENT_PUSH; ++ ++ continue; ++ } else { ++ goto fn_exit; ++ } ++ ++ break; ++ } ++ ++ case MPII_DATALOOP_KIND_VECTOR: ++ { ++ MPI_Aint blocksize = MPII_Dataloop_stackelm_blocksize(cur_elmp); ++ ++ MPI_Aint num_blocks = ++ (position - segp->stream_off) / (cur_elmp->loop_p->el_size * blocksize); ++ if (num_blocks > cur_elmp->orig_count) ++ num_blocks = cur_elmp->orig_count; ++ segp->stream_off += num_blocks * cur_elmp->loop_p->el_size * blocksize; ++ ++ MPI_Aint num_elems = (position - segp->stream_off) / cur_elmp->loop_p->el_size; ++ MPIR_Assert(num_elems < blocksize); ++ segp->stream_off += num_elems * cur_elmp->loop_p->el_size; ++ ++ /* current (remaining) block count */ ++ cur_elmp->curcount = cur_elmp->orig_count - num_blocks; ++ ++ /* current (remaining) block size */ ++ cur_elmp->curblock = blocksize - num_elems; ++ ++ /* current offset */ ++ cur_elmp->curoffset = cur_elmp->orig_offset + ++ num_blocks * cur_elmp->loop_p->loop_params.v_t.stride + ++ num_elems * cur_elmp->loop_p->el_extent; ++ ++ /* if there is a child element, setup its ++ * parameters */ ++ if ((cur_elmp->loop_p->kind & MPII_DATALOOP_FINAL_MASK) == 0) { ++ next_elmp = &(segp->stackelm[cur_sp + 1]); ++ next_elmp->orig_offset = cur_elmp->curoffset; ++ cur_elmp->curoffset = cur_elmp->orig_offset; ++ ++ cur_elmp->curblock--; ++ segp->cur_sp++; ++ ++ /* we can't skip any large blocks at this ++ * level anymore; move one level lower and ++ * repeat the same process */ ++ SEGMENT_PUSH; ++ ++ continue; ++ } else { ++ goto fn_exit; ++ } ++ ++ break; ++ } ++ ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ { ++ MPI_Aint blocksize = MPII_Dataloop_stackelm_blocksize(cur_elmp); ++ ++ MPI_Aint num_blocks = ++ (position - segp->stream_off) / (cur_elmp->loop_p->el_size * blocksize); ++ if (num_blocks > cur_elmp->orig_count) ++ num_blocks = cur_elmp->orig_count; ++ segp->stream_off += num_blocks * cur_elmp->loop_p->el_size * blocksize; ++ ++ MPI_Aint num_elems = (position - segp->stream_off) / cur_elmp->loop_p->el_size; ++ MPIR_Assert(num_elems < blocksize); ++ segp->stream_off += num_elems * cur_elmp->loop_p->el_size; ++ ++ /* current (remaining) block count */ ++ cur_elmp->curcount = cur_elmp->orig_count - num_blocks; ++ ++ /* current (remaining) block size */ ++ cur_elmp->curblock = blocksize - num_elems; ++ ++ /* current offset */ ++ cur_elmp->curoffset = cur_elmp->orig_offset + ++ num_elems * cur_elmp->loop_p->el_extent + ++ STACKELM_BLOCKINDEXED_OFFSET(cur_elmp, num_blocks); ++ ++ /* if there is a child element, setup its ++ * parameters */ ++ if ((cur_elmp->loop_p->kind & MPII_DATALOOP_FINAL_MASK) == 0) { ++ next_elmp = &(segp->stackelm[cur_sp + 1]); ++ next_elmp->orig_offset = cur_elmp->curoffset; ++ cur_elmp->curoffset = cur_elmp->orig_offset; ++ ++ cur_elmp->curblock--; ++ segp->cur_sp++; ++ ++ /* we can't skip any large blocks at this ++ * level anymore; move one level lower and ++ * repeat the same process */ ++ SEGMENT_PUSH; ++ ++ continue; ++ } else { ++ goto fn_exit; ++ } ++ ++ break; ++ } ++ ++ case MPII_DATALOOP_KIND_INDEXED: ++ { ++ MPI_Aint blocksize; ++ MPI_Aint num_blocks; ++ ++ for (num_blocks = 0; num_blocks < cur_elmp->orig_count; num_blocks++) { ++ blocksize = STACKELM_INDEXED_BLOCKSIZE(cur_elmp, num_blocks); ++ ++ if (position - segp->stream_off < cur_elmp->loop_p->el_size * blocksize) ++ break; ++ ++ segp->stream_off += cur_elmp->loop_p->el_size * blocksize; ++ } ++ ++ blocksize = STACKELM_INDEXED_BLOCKSIZE(cur_elmp, num_blocks); ++ ++ MPI_Aint num_elems = (position - segp->stream_off) / cur_elmp->loop_p->el_size; ++ MPIR_Assert(num_elems < blocksize); ++ segp->stream_off += num_elems * cur_elmp->loop_p->el_size; ++ ++ /* current (remaining) block count */ ++ cur_elmp->curcount = cur_elmp->orig_count - num_blocks; ++ ++ /* current (remaining) block size */ ++ cur_elmp->curblock = blocksize - num_elems; ++ ++ /* current offset */ ++ cur_elmp->curoffset = cur_elmp->orig_offset + ++ num_elems * cur_elmp->loop_p->el_extent + ++ STACKELM_INDEXED_OFFSET(cur_elmp, num_blocks); ++ ++ /* if there is a child element, setup its ++ * parameters */ ++ if ((cur_elmp->loop_p->kind & MPII_DATALOOP_FINAL_MASK) == 0) { ++ next_elmp = &(segp->stackelm[cur_sp + 1]); ++ next_elmp->orig_offset = cur_elmp->curoffset; ++ cur_elmp->curoffset = cur_elmp->orig_offset; ++ ++ cur_elmp->curblock--; ++ segp->cur_sp++; ++ ++ /* we can't skip any large blocks at this ++ * level anymore; move one level lower and ++ * repeat the same process */ ++ SEGMENT_PUSH; ++ ++ continue; ++ } else { ++ goto fn_exit; ++ } ++ ++ break; ++ } ++ ++ case MPII_DATALOOP_KIND_STRUCT: ++ { ++ MPI_Aint blocksize; ++ MPI_Aint num_blocks; ++ MPII_Dataloop *dloop; ++ ++ for (num_blocks = 0; num_blocks < cur_elmp->orig_count; num_blocks++) { ++ blocksize = STACKELM_INDEXED_BLOCKSIZE(cur_elmp, num_blocks); ++ dloop = STACKELM_STRUCT_DATALOOP(cur_elmp, num_blocks); ++ ++ if (position - segp->stream_off < dloop->el_size * blocksize) ++ break; ++ ++ segp->stream_off += cur_elmp->loop_p->el_size * blocksize; ++ } ++ ++ blocksize = STACKELM_INDEXED_BLOCKSIZE(cur_elmp, num_blocks); ++ dloop = STACKELM_STRUCT_DATALOOP(cur_elmp, num_blocks); ++ ++ MPI_Aint num_elems = (position - segp->stream_off) / dloop->el_size; ++ MPIR_Assert(num_elems < blocksize); ++ segp->stream_off += num_elems * dloop->el_size; ++ ++ /* current (remaining) block count */ ++ cur_elmp->curcount = cur_elmp->orig_count - num_blocks; ++ ++ /* current (remaining) block size */ ++ cur_elmp->curblock = blocksize - num_elems; ++ ++ /* current offset */ ++ cur_elmp->curoffset = cur_elmp->orig_offset + ++ num_elems * STACKELM_STRUCT_EL_EXTENT(cur_elmp, num_blocks) + ++ STACKELM_STRUCT_OFFSET(cur_elmp, num_blocks); ++ ++ /* structs cannot be leaves */ ++ MPIR_Assert((cur_elmp->loop_p->kind & MPII_DATALOOP_FINAL_MASK) == 0); ++ ++ /* if there is a child element, setup its ++ * parameters */ ++ if ((cur_elmp->loop_p->kind & MPII_DATALOOP_FINAL_MASK) == 0) { ++ next_elmp = &(segp->stackelm[cur_sp + 1]); ++ next_elmp->orig_offset = cur_elmp->curoffset; ++ cur_elmp->curoffset = cur_elmp->orig_offset; ++ ++ cur_elmp->curblock--; ++ segp->cur_sp++; ++ ++ /* we can't skip any large blocks at this ++ * level anymore; move one level lower and ++ * repeat the same process */ ++ SEGMENT_PUSH; ++ ++ continue; ++ } else { ++ goto fn_exit; ++ } ++ ++ break; ++ } ++ ++ default: ++ goto fallback_path; ++ } ++ ++ MPIR_Assert(segp->stream_off == position); ++ break; ++ } ++ ++ goto fn_exit; ++ ++ fallback_path: ++ { ++ MPI_Aint tmp_last = position; ++ ++ /* use manipulate function with a NULL piecefn to advance ++ * stream offset */ ++ MPII_Segment_manipulate(segp, segp->stream_off, &tmp_last, NULL, /* contig fn */ ++ NULL, /* vector fn */ ++ NULL, /* blkidx fn */ ++ NULL, /* index fn */ ++ sizefn, NULL); ++ ++ /* --BEGIN ERROR HANDLING-- */ ++ /* verify that we're in the right location */ ++ MPIR_Assert(tmp_last == position); ++ /* --END ERROR HANDLING-- */ ++ } ++ ++ fn_exit: ++ return; ++} ++ ++void MPII_Segment_manipulate(struct MPIR_Segment *segp, ++ MPI_Aint first, ++ MPI_Aint * lastp, ++ int (*contigfn) (MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, ++ void *bufp, ++ void *v_paramp), ++ int (*vectorfn) (MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blklen, ++ MPI_Aint stride, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, ++ void *bufp, ++ void *v_paramp), ++ int (*blkidxfn) (MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blklen, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, ++ void *bufp, ++ void *v_paramp), ++ int (*indexfn) (MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint * blockarray, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, ++ void *bufp, ++ void *v_paramp), ++ MPI_Aint(*sizefn) (MPI_Datatype el_type), void *pieceparams) ++{ ++ /* these four are the "local values": cur_sp, valid_sp, last, stream_off */ ++ int cur_sp, valid_sp; ++ MPI_Aint last, stream_off; ++ ++ struct MPII_Dataloop_stackelm *cur_elmp; ++ enum { PF_NULL, PF_CONTIG, PF_VECTOR, PF_BLOCKINDEXED, PF_INDEXED } piecefn_type = PF_NULL; ++ ++ SEGMENT_LOAD_LOCAL_VALUES; ++ ++ if (first == *lastp) { ++ /* nothing to do */ ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "dloop_segment_manipulate: warning: first == last (" ++ MPI_AINT_FMT_DEC_SPEC ")\n", first)); ++ return; ++ } ++ ++ /* first we ensure that stream_off and first are in the same spot */ ++ if (first != stream_off) { ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "first=" MPI_AINT_FMT_DEC_SPEC "; stream_off=" ++ MPI_AINT_FMT_DEC_SPEC "; resetting.\n", first, stream_off)); ++#endif ++ ++ if (first < stream_off) { ++ SEGMENT_RESET_VALUES; ++ stream_off = 0; ++ } ++ ++ if (first != stream_off) { ++ segment_seek(segp, first, sizefn); ++ } ++ ++ SEGMENT_LOAD_LOCAL_VALUES; ++ ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "done repositioning stream_off; first=" MPI_AINT_FMT_DEC_SPEC ++ ", stream_off=" MPI_AINT_FMT_DEC_SPEC ", last=" ++ MPI_AINT_FMT_DEC_SPEC "\n", first, stream_off, last)); ++#endif ++ } ++ ++ for (;;) { ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++#if 0 ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, "looptop; cur_sp=%d, cur_elmp=%x\n", cur_sp, ++ (unsigned) cur_elmp)); ++#endif ++#endif ++ ++ if (cur_elmp->loop_p->kind & MPII_DATALOOP_FINAL_MASK) { ++ int piecefn_indicated_exit = -1; ++ MPI_Aint myblocks, local_el_size, stream_el_size; ++ MPI_Datatype el_type; ++ ++ /* structs are never finals (leaves) */ ++ MPIR_Assert((cur_elmp->loop_p->kind & MPII_DATALOOP_KIND_MASK) != ++ MPII_DATALOOP_KIND_STRUCT); ++ ++ /* pop immediately on zero count */ ++ if (cur_elmp->curcount == 0) ++ SEGMENT_POP_AND_MAYBE_EXIT; ++ ++ /* size on this system of the int, double, etc. that is ++ * the elementary type. ++ */ ++ local_el_size = cur_elmp->loop_p->el_size; ++ el_type = cur_elmp->loop_p->el_type; ++ stream_el_size = (sizefn) ? sizefn(el_type) : local_el_size; ++ ++ /* calculate number of elem. types to work on and function to use. ++ * default is to use the contig piecefn (if there is one). ++ */ ++ myblocks = cur_elmp->curblock; ++ piecefn_type = (contigfn ? PF_CONTIG : PF_NULL); ++ ++ /* check for opportunities to use other piecefns */ ++ switch (cur_elmp->loop_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ /* only use blkidx piecefn if at start of blkidx type */ ++ if (blkidxfn && ++ cur_elmp->orig_block == cur_elmp->curblock && ++ cur_elmp->orig_count == cur_elmp->curcount) { ++ /* TODO: RELAX CONSTRAINTS */ ++ myblocks = cur_elmp->curblock * cur_elmp->curcount; ++ piecefn_type = PF_BLOCKINDEXED; ++ } ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ /* only use index piecefn if at start of the index type. ++ * count test checks that we're on first block. ++ * block test checks that we haven't made progress on first block. ++ */ ++ if (indexfn && ++ cur_elmp->orig_count == cur_elmp->curcount && ++ cur_elmp->curblock == STACKELM_INDEXED_BLOCKSIZE(cur_elmp, 0)) { ++ /* TODO: RELAX CONSTRAINT ON COUNT? */ ++ myblocks = cur_elmp->loop_p->loop_params.i_t.total_blocks; ++ piecefn_type = PF_INDEXED; ++ } ++ break; ++ case MPII_DATALOOP_KIND_VECTOR: ++ /* only use the vector piecefn if at the start of a ++ * contiguous block. ++ */ ++ if (vectorfn && cur_elmp->orig_block == cur_elmp->curblock) { ++ myblocks = cur_elmp->curblock * cur_elmp->curcount; ++ piecefn_type = PF_VECTOR; ++ } ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "\thit leaf; cur_sp=%d, elmp=%x, piece_sz=" MPI_AINT_FMT_DEC_SPEC ++ "\n", cur_sp, (unsigned) cur_elmp, myblocks * local_el_size)); ++#endif ++ ++ /* enforce the last parameter if necessary by reducing myblocks */ ++ if (last != MPIR_SEGMENT_IGNORE_LAST && ++ (stream_off + (myblocks * stream_el_size) > last)) { ++ myblocks = ((last - stream_off) / stream_el_size); ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "\tpartial block count=" MPI_AINT_FMT_DEC_SPEC " (" ++ MPI_AINT_FMT_DEC_SPEC " bytes)\n", myblocks, ++ myblocks * stream_el_size)); ++#endif ++ if (myblocks == 0) { ++ SEGMENT_SAVE_LOCAL_VALUES; ++ return; ++ } ++ } ++ ++ /* call piecefn to perform data manipulation */ ++ switch (piecefn_type) { ++ case PF_NULL: ++ piecefn_indicated_exit = 0; ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG("\tNULL piecefn for this piece\n"); ++#endif ++ break; ++ case PF_CONTIG: ++ MPIR_Assert(myblocks <= cur_elmp->curblock); ++ piecefn_indicated_exit = contigfn(&myblocks, el_type, cur_elmp->curoffset, /* relative to segp->ptr */ ++ segp->ptr, /* start of buffer (from segment) */ ++ pieceparams); ++ break; ++ case PF_VECTOR: ++ piecefn_indicated_exit = ++ vectorfn(&myblocks, ++ cur_elmp->curcount, ++ cur_elmp->orig_block, ++ cur_elmp->loop_p->loop_params.v_t.stride, ++ el_type, cur_elmp->curoffset, segp->ptr, pieceparams); ++ break; ++ case PF_BLOCKINDEXED: ++ piecefn_indicated_exit = blkidxfn(&myblocks, cur_elmp->curcount, cur_elmp->orig_block, cur_elmp->loop_p->loop_params.bi_t.offset_array, el_type, cur_elmp->orig_offset, /* blkidxfn adds offset */ ++ segp->ptr, pieceparams); ++ break; ++ case PF_INDEXED: ++ piecefn_indicated_exit = indexfn(&myblocks, cur_elmp->curcount, cur_elmp->loop_p->loop_params.i_t.blocksize_array, cur_elmp->loop_p->loop_params.i_t.offset_array, el_type, cur_elmp->orig_offset, /* indexfn adds offset value */ ++ segp->ptr, pieceparams); ++ break; ++ } ++ ++ /* update local values based on piecefn returns (myblocks and ++ * piecefn_indicated_exit) ++ */ ++ MPIR_Assert(piecefn_indicated_exit >= 0); ++ MPIR_Assert(myblocks >= 0); ++ stream_off += myblocks * stream_el_size; ++ ++ /* myblocks of 0 or less than cur_elmp->curblock indicates ++ * that we should stop processing and return. ++ */ ++ if (myblocks == 0) { ++ SEGMENT_SAVE_LOCAL_VALUES; ++ return; ++ } else if (myblocks < (MPI_Aint) (cur_elmp->curblock)) { ++ cur_elmp->curoffset += myblocks * local_el_size; ++ cur_elmp->curblock -= myblocks; ++ ++ SEGMENT_SAVE_LOCAL_VALUES; ++ return; ++ } else { /* myblocks >= cur_elmp->curblock */ ++ ++ MPI_Aint count_index = 0; ++ ++ /* this assumes we're either *just* processing the last parts ++ * of the current block, or we're processing as many blocks as ++ * we like starting at the beginning of one. ++ */ ++ ++ switch (cur_elmp->loop_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_INDEXED: ++ while (myblocks > 0 && myblocks >= (MPI_Aint) (cur_elmp->curblock)) { ++ myblocks -= (MPI_Aint) (cur_elmp->curblock); ++ cur_elmp->curcount--; ++ MPIR_Assert(cur_elmp->curcount >= 0); ++ ++ count_index = cur_elmp->orig_count - cur_elmp->curcount; ++ cur_elmp->curblock = STACKELM_INDEXED_BLOCKSIZE(cur_elmp, count_index); ++ } ++ ++ if (cur_elmp->curcount == 0) { ++ /* don't bother to fill in values; we're popping anyway */ ++ MPIR_Assert(myblocks == 0); ++ SEGMENT_POP_AND_MAYBE_EXIT; ++ } else { ++ cur_elmp->orig_block = cur_elmp->curblock; ++ cur_elmp->curoffset = cur_elmp->orig_offset + ++ STACKELM_INDEXED_OFFSET(cur_elmp, count_index); ++ ++ cur_elmp->curblock -= myblocks; ++ cur_elmp->curoffset += myblocks * local_el_size; ++ } ++ break; ++ case MPII_DATALOOP_KIND_VECTOR: ++ /* this math relies on assertions at top of code block */ ++ cur_elmp->curcount -= myblocks / (MPI_Aint) (cur_elmp->curblock); ++ if (cur_elmp->curcount == 0) { ++ MPIR_Assert(myblocks % ((MPI_Aint) (cur_elmp->curblock)) == 0); ++ SEGMENT_POP_AND_MAYBE_EXIT; ++ } else { ++ /* this math relies on assertions at top of code ++ * block ++ */ ++ cur_elmp->curblock = cur_elmp->orig_block - ++ (myblocks % (MPI_Aint) (cur_elmp->curblock)); ++ /* new offset = original offset + ++ * stride * whole blocks + ++ * leftover bytes ++ */ ++ cur_elmp->curoffset = cur_elmp->orig_offset + ++ (((MPI_Aint) (cur_elmp->orig_count - cur_elmp->curcount)) * ++ cur_elmp->loop_p->loop_params.v_t.stride) + ++ (((MPI_Aint) (cur_elmp->orig_block - cur_elmp->curblock)) * ++ local_el_size); ++ } ++ break; ++ case MPII_DATALOOP_KIND_CONTIG: ++ /* contigs that reach this point have always been ++ * completely processed ++ */ ++ MPIR_Assert(myblocks == (MPI_Aint) (cur_elmp->curblock) && ++ cur_elmp->curcount == 1); ++ SEGMENT_POP_AND_MAYBE_EXIT; ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ while (myblocks > 0 && myblocks >= (MPI_Aint) (cur_elmp->curblock)) { ++ myblocks -= (MPI_Aint) (cur_elmp->curblock); ++ cur_elmp->curcount--; ++ MPIR_Assert(cur_elmp->curcount >= 0); ++ ++ count_index = cur_elmp->orig_count - cur_elmp->curcount; ++ cur_elmp->curblock = cur_elmp->orig_block; ++ } ++ if (cur_elmp->curcount == 0) { ++ /* popping */ ++ MPIR_Assert(myblocks == 0); ++ SEGMENT_POP_AND_MAYBE_EXIT; ++ } else { ++ /* cur_elmp->orig_block = cur_elmp->curblock; */ ++ cur_elmp->curoffset = cur_elmp->orig_offset + ++ STACKELM_BLOCKINDEXED_OFFSET(cur_elmp, count_index); ++ cur_elmp->curblock -= myblocks; ++ cur_elmp->curoffset += myblocks * local_el_size; ++ } ++ break; ++ } ++ } ++ ++ if (piecefn_indicated_exit) { ++ /* piece function indicated that we should quit processing */ ++ SEGMENT_SAVE_LOCAL_VALUES; ++ return; ++ } ++ } /* end of if leaf */ ++ else if (cur_elmp->curblock == 0) { ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, "\thit end of block; elmp=%x [%d]\n", ++ (unsigned) cur_elmp, cur_sp)); ++#endif ++ cur_elmp->curcount--; ++ ++ /* new block. for indexed and struct reset orig_block. ++ * reset curblock for all types ++ */ ++ switch (cur_elmp->loop_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ case MPII_DATALOOP_KIND_VECTOR: ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ cur_elmp->orig_block = ++ STACKELM_INDEXED_BLOCKSIZE(cur_elmp, ++ cur_elmp->curcount ? cur_elmp->orig_count - ++ cur_elmp->curcount : 0); ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ cur_elmp->orig_block = ++ STACKELM_STRUCT_BLOCKSIZE(cur_elmp, ++ cur_elmp->curcount ? cur_elmp->orig_count - ++ cur_elmp->curcount : 0); ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ cur_elmp->curblock = cur_elmp->orig_block; ++ ++ if (cur_elmp->curcount == 0) { ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, "\talso hit end of count; elmp=%x [%d]\n", ++ (unsigned) cur_elmp, cur_sp)); ++#endif ++ SEGMENT_POP_AND_MAYBE_EXIT; ++ } ++ } else { /* push the stackelm */ ++ ++ MPII_Dataloop_stackelm *next_elmp; ++ MPI_Aint count_index, block_index; ++ ++ count_index = cur_elmp->orig_count - cur_elmp->curcount; ++ block_index = cur_elmp->orig_block - cur_elmp->curblock; ++ ++ /* reload the next stackelm if necessary */ ++ next_elmp = &(segp->stackelm[cur_sp + 1]); ++ if (cur_elmp->may_require_reloading) { ++ MPII_Dataloop *load_dlp = NULL; ++ switch (cur_elmp->loop_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ case MPII_DATALOOP_KIND_VECTOR: ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ case MPII_DATALOOP_KIND_INDEXED: ++ load_dlp = cur_elmp->loop_p->loop_params.cm_t.dataloop; ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ load_dlp = STACKELM_STRUCT_DATALOOP(cur_elmp, count_index); ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, "\tloading dlp=%x, elmp=%x [%d]\n", ++ (unsigned) load_dlp, (unsigned) next_elmp, cur_sp + 1)); ++#endif ++ ++ MPII_Dataloop_stackelm_load(next_elmp, load_dlp, 1); ++ } ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, "\tpushing type, elmp=%x [%d], count=%d, block=%d\n", ++ (unsigned) cur_elmp, cur_sp, count_index, block_index)); ++#endif ++ /* set orig_offset and all cur values for new stackelm. ++ * this is done in two steps: first set orig_offset based on ++ * current stackelm, then set cur values based on new stackelm. ++ */ ++ switch (cur_elmp->loop_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ next_elmp->orig_offset = cur_elmp->curoffset + ++ (MPI_Aint) block_index *cur_elmp->loop_p->el_extent; ++ break; ++ case MPII_DATALOOP_KIND_VECTOR: ++ /* note: stride is in bytes */ ++ next_elmp->orig_offset = cur_elmp->orig_offset + ++ (MPI_Aint) count_index *cur_elmp->loop_p->loop_params.v_t.stride + ++ (MPI_Aint) block_index *cur_elmp->loop_p->el_extent; ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ next_elmp->orig_offset = cur_elmp->orig_offset + ++ (MPI_Aint) block_index *cur_elmp->loop_p->el_extent + ++ STACKELM_BLOCKINDEXED_OFFSET(cur_elmp, count_index); ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ next_elmp->orig_offset = cur_elmp->orig_offset + ++ (MPI_Aint) block_index *cur_elmp->loop_p->el_extent + ++ STACKELM_INDEXED_OFFSET(cur_elmp, count_index); ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ next_elmp->orig_offset = cur_elmp->orig_offset + ++ (MPI_Aint) block_index *STACKELM_STRUCT_EL_EXTENT(cur_elmp, ++ count_index) + ++ STACKELM_STRUCT_OFFSET(cur_elmp, count_index); ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "\tstep 1: next orig_offset = " MPI_AINT_FMT_DEC_SPEC " (0x" ++ MPI_AINT_FMT_HEX_SPEC ")\n", next_elmp->orig_offset, ++ next_elmp->orig_offset)); ++#endif ++ ++ switch (next_elmp->loop_p->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ case MPII_DATALOOP_KIND_VECTOR: ++ next_elmp->curcount = next_elmp->orig_count; ++ next_elmp->curblock = next_elmp->orig_block; ++ next_elmp->curoffset = next_elmp->orig_offset; ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ next_elmp->curcount = next_elmp->orig_count; ++ next_elmp->curblock = next_elmp->orig_block; ++ next_elmp->curoffset = next_elmp->orig_offset + ++ STACKELM_BLOCKINDEXED_OFFSET(next_elmp, 0); ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ next_elmp->curcount = next_elmp->orig_count; ++ next_elmp->curblock = STACKELM_INDEXED_BLOCKSIZE(next_elmp, 0); ++ next_elmp->curoffset = next_elmp->orig_offset + ++ STACKELM_INDEXED_OFFSET(next_elmp, 0); ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ next_elmp->curcount = next_elmp->orig_count; ++ next_elmp->curblock = STACKELM_STRUCT_BLOCKSIZE(next_elmp, 0); ++ next_elmp->curoffset = next_elmp->orig_offset + ++ STACKELM_STRUCT_OFFSET(next_elmp, 0); ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "\tstep 2: next curoffset = " MPI_AINT_FMT_DEC_SPEC " (0x" ++ MPI_AINT_FMT_HEX_SPEC ")\n", next_elmp->curoffset, ++ next_elmp->curoffset)); ++#endif ++ ++ cur_elmp->curblock--; ++ SEGMENT_PUSH; ++ } /* end of else push the stackelm */ ++ } /* end of for (;;) */ ++ ++#ifdef MPII_DATALOOP_DEBUG_MANIPULATE ++ MPL_DBG_MSG("hit end of datatype\n"); ++#endif ++ ++ SEGMENT_SAVE_LOCAL_VALUES; ++ return; ++} ++ ++/* MPII_Dataloop_stackelm_blocksize - returns block size for stackelm based on current ++ * count in stackelm. ++ * ++ * NOTE: loop_p, orig_count, and curcount members of stackelm MUST be correct ++ * before this is called! ++ * ++ */ ++MPI_Aint MPII_Dataloop_stackelm_blocksize(struct MPII_Dataloop_stackelm * elmp) ++{ ++ MPII_Dataloop *dlp = elmp->loop_p; ++ ++ switch (dlp->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_CONTIG: ++ /* NOTE: we're dropping the count into the ++ * blksize field for contigs, as described ++ * in the init call. ++ */ ++ return dlp->loop_params.c_t.count; ++ break; ++ case MPII_DATALOOP_KIND_VECTOR: ++ return dlp->loop_params.v_t.blocksize; ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ return dlp->loop_params.bi_t.blocksize; ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ return dlp->loop_params.i_t.blocksize_array[elmp->orig_count - elmp->curcount]; ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ return dlp->loop_params.s_t.blocksize_array[elmp->orig_count - elmp->curcount]; ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ return -1; ++} ++ ++/* MPII_Dataloop_stackelm_offset - returns starting offset (displacement) for stackelm ++ * based on current count in stackelm. ++ * ++ * NOTE: loop_p, orig_count, and curcount members of stackelm MUST be correct ++ * before this is called! ++ * ++ * also, this really is only good at init time for vectors and contigs ++ * (all the time for indexed) at the moment. ++ * ++ */ ++MPI_Aint MPII_Dataloop_stackelm_offset(struct MPII_Dataloop_stackelm * elmp) ++{ ++ MPII_Dataloop *dlp = elmp->loop_p; ++ ++ switch (dlp->kind & MPII_DATALOOP_KIND_MASK) { ++ case MPII_DATALOOP_KIND_VECTOR: ++ case MPII_DATALOOP_KIND_CONTIG: ++ return 0; ++ break; ++ case MPII_DATALOOP_KIND_BLOCKINDEXED: ++ return dlp->loop_params.bi_t.offset_array[elmp->orig_count - elmp->curcount]; ++ break; ++ case MPII_DATALOOP_KIND_INDEXED: ++ return dlp->loop_params.i_t.offset_array[elmp->orig_count - elmp->curcount]; ++ break; ++ case MPII_DATALOOP_KIND_STRUCT: ++ return dlp->loop_params.s_t.offset_array[elmp->orig_count - elmp->curcount]; ++ break; ++ default: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_Assert(0); ++ break; ++ /* --END ERROR HANDLING-- */ ++ } ++ return -1; ++} ++ ++/* MPII_Dataloop_stackelm_load ++ * loop_p, orig_count, orig_block, and curcount are all filled by us now. ++ * the rest are filled in at processing time. ++ */ ++void MPII_Dataloop_stackelm_load(struct MPII_Dataloop_stackelm *elmp, ++ MPII_Dataloop * dlp, int branch_flag) ++{ ++ elmp->loop_p = dlp; ++ ++ if ((dlp->kind & MPII_DATALOOP_KIND_MASK) == MPII_DATALOOP_KIND_CONTIG) { ++ elmp->orig_count = 1; /* put in blocksize instead */ ++ } else { ++ elmp->orig_count = dlp->loop_params.count; ++ } ++ ++ if (branch_flag || (dlp->kind & MPII_DATALOOP_KIND_MASK) == MPII_DATALOOP_KIND_STRUCT) { ++ elmp->may_require_reloading = 1; ++ } else { ++ elmp->may_require_reloading = 0; ++ } ++ ++ /* required by MPII_Dataloop_stackelm_blocksize */ ++ elmp->curcount = elmp->orig_count; ++ ++ elmp->orig_block = MPII_Dataloop_stackelm_blocksize(elmp); ++ /* TODO: GO AHEAD AND FILL IN CURBLOCK? */ ++} ++ ++/* ++ * Local variables: ++ * c-indent-tabs-mode: nil ++ * End: ++ */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/segment_count.c +@@ -0,0 +1,240 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++#include ++#include ++#include ++#include ++ ++/* NOTE: bufp values are unused, ripe for removal */ ++ ++static int leaf_contig_count_block(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int leaf_vector_count_block(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blksz, ++ MPI_Aint stride, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int leaf_blkidx_count_block(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blksz, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int leaf_index_count_block(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint * blockarray, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp); ++ ++struct MPIR_contig_blocks_params { ++ MPI_Aint count; ++ MPI_Aint last_loc; ++}; ++ ++/* MPIR_Segment_count_contig_blocks() ++ * ++ * Count number of contiguous regions in segment between first and last. ++ */ ++void MPIR_Segment_count_contig_blocks(MPIR_Segment * segp, ++ MPI_Aint first, MPI_Aint * lastp, MPI_Aint * countp) ++{ ++ struct MPIR_contig_blocks_params params; ++ ++ params.count = 0; ++ params.last_loc = 0; ++ ++ /* FIXME: The blkidx and index functions are not used since they ++ * optimize the count by coalescing contiguous segments, while ++ * functions using the count do not optimize in the same way ++ * (e.g., flatten code) */ ++ MPII_Segment_manipulate(segp, first, lastp, leaf_contig_count_block, leaf_vector_count_block, leaf_blkidx_count_block, leaf_index_count_block, NULL, /* size fn */ ++ (void *) ¶ms); ++ ++ *countp = params.count; ++ return; ++} ++ ++/* PIECE FUNCTIONS BELOW */ ++ ++/* MPID_Leaf_contig_count_block ++ * ++ * Note: because bufp is just an offset, we can ignore it in our ++ * calculations of # of contig regions. ++ */ ++static int leaf_contig_count_block(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) ++{ ++ MPI_Aint size, el_size; ++ struct MPIR_contig_blocks_params *paramp = v_paramp; ++ ++ MPIR_Assert(*blocks_p > 0); ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ size = *blocks_p * el_size; ++ ++#ifdef MPID_SP_VERBOSE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "contig count block: count = %d, buf+off = %d, lastloc = " ++ MPI_AINT_FMT_DEC_SPEC "\n", (int) paramp->count, ++ (int) ((char *) bufp + rel_off), paramp->last_loc)); ++#endif ++ ++ if (paramp->count > 0 && rel_off == paramp->last_loc) { ++ /* this region is adjacent to the last */ ++ paramp->last_loc += size; ++ } else { ++ /* new region */ ++ paramp->last_loc = rel_off + size; ++ paramp->count++; ++ } ++ return 0; ++} ++ ++/* leaf_vector_count_block ++ * ++ * Input Parameters: ++ * blocks_p - [inout] pointer to a count of blocks (total, for all noncontiguous pieces) ++ * count - # of noncontiguous regions ++ * blksz - size of each noncontiguous region ++ * stride - distance in bytes from start of one region to start of next ++ * el_type - elemental type (e.g. MPI_INT) ++ * ... ++ * ++ * Note: this is only called when the starting position is at the beginning ++ * of a whole block in a vector type. ++ */ ++static int leaf_vector_count_block(MPI_Aint * blocks_p, MPI_Aint count, MPI_Aint blksz, MPI_Aint stride, MPI_Datatype el_type, MPI_Aint rel_off, /* offset into buffer */ ++ void *bufp ATTRIBUTE((unused)), void *v_paramp) ++{ ++ MPI_Aint new_blk_count; ++ MPI_Aint size, el_size; ++ struct MPIR_contig_blocks_params *paramp = v_paramp; ++ ++ MPIR_Assert(count > 0 && blksz > 0 && *blocks_p > 0); ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ size = el_size * blksz; ++ new_blk_count = count; ++ ++ /* if size == stride, then blocks are adjacent to one another */ ++ if (size == stride) ++ new_blk_count = 1; ++ ++ if (paramp->count > 0 && rel_off == paramp->last_loc) { ++ /* first block sits at end of last block */ ++ new_blk_count--; ++ } ++ ++ paramp->last_loc = rel_off + ((MPI_Aint) (count - 1)) * stride + size; ++ paramp->count += new_blk_count; ++ return 0; ++} ++ ++/* leaf_blkidx_count_block ++ * ++ * Note: this is only called when the starting position is at the ++ * beginning of a whole block in a blockindexed type. ++ */ ++static int leaf_blkidx_count_block(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blksz, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) ++{ ++ MPI_Aint i, new_blk_count; ++ MPI_Aint size, el_size, last_loc; ++ struct MPIR_contig_blocks_params *paramp = v_paramp; ++ ++ MPIR_Assert(count > 0 && blksz > 0 && *blocks_p > 0); ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ size = el_size * (MPI_Aint) blksz; ++ new_blk_count = count; ++ ++ if (paramp->count > 0 && ((rel_off + offsetarray[0]) == paramp->last_loc)) { ++ /* first block sits at end of last block */ ++ new_blk_count--; ++ } ++ ++ last_loc = rel_off + offsetarray[0] + size; ++ for (i = 1; i < count; i++) { ++ if (last_loc == rel_off + offsetarray[i]) ++ new_blk_count--; ++ ++ last_loc = rel_off + offsetarray[i] + size; ++ } ++ ++ paramp->last_loc = last_loc; ++ paramp->count += new_blk_count; ++ return 0; ++} ++ ++/* leaf_index_count_block ++ * ++ * Note: this is only called when the starting position is at the ++ * beginning of a whole block in an indexed type. ++ */ ++static int leaf_index_count_block(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint * blockarray, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp ATTRIBUTE((unused)), void *v_paramp) ++{ ++ MPI_Aint new_blk_count; ++ MPI_Aint el_size, last_loc; ++ struct MPIR_contig_blocks_params *paramp = v_paramp; ++ ++ MPIR_Assert(count > 0 && *blocks_p > 0); ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ new_blk_count = count; ++ ++ if (paramp->count > 0 && ((rel_off + offsetarray[0]) == paramp->last_loc)) { ++ /* first block sits at end of last block */ ++ new_blk_count--; ++ } ++ ++ /* Note: when we build an indexed type we combine adjacent regions, ++ * so we're not going to go through and check every piece ++ * separately here. if someone else were building indexed ++ * dataloops by hand, then the loop here might be necessary. ++ * MPI_Aint i and MPI_Aint size would need to be ++ * declared above. ++ */ ++#if 0 ++ last_loc = rel_off * offsetarray[0] + ((MPI_Aint) blockarray[0]) * el_size; ++ for (i = 1; i < count; i++) { ++ if (last_loc == rel_off + offsetarray[i]) ++ new_blk_count--; ++ ++ last_loc = rel_off + offsetarray[i] + ((MPI_Aint) blockarray[i]) * el_size; ++ } ++#else ++ last_loc = rel_off + offsetarray[count - 1] + ((MPI_Aint) blockarray[count - 1]) * el_size; ++#endif ++ ++ paramp->last_loc = last_loc; ++ paramp->count += new_blk_count; ++ return 0; ++} ++ ++/* ++ * Local variables: ++ * c-indent-tabs-mode: nil ++ * End: ++ */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/segment_flatten.c +@@ -0,0 +1,347 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++#include ++#include ++#include ++#include ++ ++/* NOTE: I don't think I've removed the need for bufp in here yet! -- RobR */ ++ ++struct flatten_params { ++ int index; ++ MPI_Aint length; ++ MPI_Aint last_end; ++ MPI_Aint *blklens; ++ MPI_Aint *disps; ++}; ++ ++static int leaf_contig_mpi_flatten(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int leaf_vector_mpi_flatten(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blksz, ++ MPI_Aint stride, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int leaf_blkidx_mpi_flatten(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blksz, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp); ++static int leaf_index_mpi_flatten(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint * blockarray, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp); ++ ++/* MPII_Dataloop_segment_flatten - flatten a type into a representation ++ * appropriate for passing to hindexed create. ++ * ++ * NOTE: blocks will be in units of bytes when returned. ++ * ++ * WARNING: there's potential for overflow here as we convert from ++ * various types into an index of bytes. ++ * ++ * Parameters: ++ * segp - pointer to segment structure ++ * first - first byte in segment to pack ++ * lastp - in/out parameter describing last byte to pack (and afterwards ++ * the last byte _actually_ packed) ++ * NOTE: actually returns index of byte _after_ last one packed ++ * blklens, disps - the usual blocklength and displacement arrays for MPI ++ * lengthp - in/out parameter describing length of array (and afterwards ++ * the amount of the array that has actual data) ++ */ ++void MPII_Dataloop_segment_flatten(MPIR_Segment * segp, ++ MPI_Aint first, ++ MPI_Aint * lastp, ++ MPI_Aint * blklens, MPI_Aint * disps, MPI_Aint * lengthp) ++{ ++ struct flatten_params params; ++ ++ MPIR_Assert(*lengthp > 0); ++ ++ params.index = 0; ++ params.length = *lengthp; ++ params.blklens = blklens; ++ params.disps = disps; ++ ++ MPII_Segment_manipulate(segp, ++ first, ++ lastp, ++ leaf_contig_mpi_flatten, ++ leaf_vector_mpi_flatten, ++ leaf_blkidx_mpi_flatten, leaf_index_mpi_flatten, NULL, ¶ms); ++ ++ /* last value already handled by MPII_Segment_manipulate */ ++ *lengthp = params.index; ++ return; ++} ++ ++/* PIECE FUNCTIONS BELOW */ ++ ++/* leaf_contig_mpi_flatten ++ * ++ */ ++static int leaf_contig_mpi_flatten(MPI_Aint * blocks_p, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp) ++{ ++ int last_idx; ++ MPI_Aint size; ++ MPI_Aint el_size; ++ char *last_end = NULL; ++ struct flatten_params *paramp = v_paramp; ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ size = *blocks_p * el_size; ++ ++ last_idx = paramp->index - 1; ++ if (last_idx >= 0) { ++ last_end = (char *) ++ (paramp->disps[last_idx] + ((MPI_Aint) paramp->blklens[last_idx])); ++ } ++ ++ if ((last_idx == paramp->length - 1) && (last_end != ((char *) bufp + rel_off))) { ++ /* we have used up all our entries, and this region doesn't fit on ++ * the end of the last one. setting blocks to 0 tells manipulation ++ * function that we are done (and that we didn't process any blocks). ++ */ ++ *blocks_p = 0; ++ return 1; ++ } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off))) { ++ /* add this size to the last vector rather than using up another one */ ++ paramp->blklens[last_idx] += size; ++ } else { ++ paramp->disps[last_idx + 1] = (MPI_Aint) bufp + rel_off; ++ paramp->blklens[last_idx + 1] = size; ++ paramp->index++; ++ } ++ return 0; ++} ++ ++/* leaf_vector_mpi_flatten ++ * ++ * Input Parameters: ++ * blocks_p - [inout] pointer to a count of blocks (total, for all noncontiguous pieces) ++ * count - # of noncontiguous regions ++ * blksz - size of each noncontiguous region ++ * stride - distance in bytes from start of one region to start of next ++ * el_type - elemental type (e.g. MPI_INT) ++ * ... ++ * ++ * Note: this is only called when the starting position is at the beginning ++ * of a whole block in a vector type. ++ * ++ * TODO: MAKE THIS CODE SMARTER, USING THE SAME GENERAL APPROACH AS IN THE ++ * COUNT BLOCK CODE ABOVE. ++ */ ++static int leaf_vector_mpi_flatten(MPI_Aint * blocks_p, MPI_Aint count, MPI_Aint blksz, MPI_Aint stride, MPI_Datatype el_type, MPI_Aint rel_off, /* offset into buffer */ ++ void *bufp, /* start of buffer */ ++ void *v_paramp) ++{ ++ int i; ++ MPI_Aint size, blocks_left; ++ MPI_Aint el_size; ++ struct flatten_params *paramp = v_paramp; ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ blocks_left = *blocks_p; ++ ++ MPIR_Assert(el_size != 0); ++ ++ for (i = 0; i < count && blocks_left > 0; i++) { ++ int last_idx; ++ char *last_end = NULL; ++ ++ if (blocks_left > blksz) { ++ size = blksz * el_size; ++ blocks_left -= blksz; ++ } else { ++ /* last pass */ ++ size = blocks_left * el_size; ++ blocks_left = 0; ++ } ++ ++ last_idx = paramp->index - 1; ++ if (last_idx >= 0) { ++ last_end = (char *) ++ (paramp->disps[last_idx] + (MPI_Aint) (paramp->blklens[last_idx])); ++ } ++ ++ if ((last_idx == paramp->length - 1) && (last_end != ((char *) bufp + rel_off))) { ++ /* we have used up all our entries, and this one doesn't fit on ++ * the end of the last one. ++ */ ++ *blocks_p -= (blocks_left + (size / el_size)); ++#ifdef MPID_SP_VERBOSE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "\t[vector to vec exiting (1): next ind = %d, " ++ MPI_AINT_FMT_DEC_SPEC " blocks processed.\n", ++ paramp->u.pack_vector.index, *blocks_p)); ++#endif ++ return 1; ++ } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off))) { ++ /* add this size to the last vector rather than using up new one */ ++ paramp->blklens[last_idx] += size; ++ } else { ++ paramp->disps[last_idx + 1] = (MPI_Aint) bufp + rel_off; ++ paramp->blklens[last_idx + 1] = size; ++ paramp->index++; ++ } ++ ++ rel_off += stride; ++ } ++ ++#ifdef MPID_SP_VERBOSE ++ MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE, VERBOSE, ++ (MPL_DBG_FDEST, ++ "\t[vector to vec exiting (2): next ind = %d, " MPI_AINT_FMT_DEC_SPEC ++ " blocks processed.\n", paramp->u.pack_vector.index, *blocks_p)); ++#endif ++ ++ /* if we get here then we processed ALL the blocks; don't need to update ++ * blocks_p ++ */ ++ ++ MPIR_Assert(blocks_left == 0); ++ return 0; ++} ++ ++static int leaf_blkidx_mpi_flatten(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint blksz, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp) ++{ ++ int i; ++ MPI_Aint blocks_left, size; ++ MPI_Aint el_size; ++ struct flatten_params *paramp = v_paramp; ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ blocks_left = *blocks_p; ++ ++ MPIR_Assert(el_size != 0); ++ ++ for (i = 0; i < count && blocks_left > 0; i++) { ++ int last_idx; ++ char *last_end = NULL; ++ ++ if (blocks_left > blksz) { ++ size = blksz * el_size; ++ blocks_left -= blksz; ++ } else { ++ /* last pass */ ++ size = blocks_left * el_size; ++ blocks_left = 0; ++ } ++ ++ last_idx = paramp->index - 1; ++ if (last_idx >= 0) { ++ last_end = (char *) ++ (paramp->disps[last_idx] + ((MPI_Aint) paramp->blklens[last_idx])); ++ } ++ ++ if ((last_idx == paramp->length - 1) && ++ (last_end != ((char *) bufp + rel_off + offsetarray[i]))) { ++ /* we have used up all our entries, and this one doesn't fit on ++ * the end of the last one. ++ */ ++ *blocks_p -= ((MPI_Aint) blocks_left + (((MPI_Aint) size) / el_size)); ++ return 1; ++ } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off + offsetarray[i]))) { ++ /* add this size to the last vector rather than using up new one */ ++ paramp->blklens[last_idx] += size; ++ } else { ++ paramp->disps[last_idx + 1] = (MPI_Aint) bufp + rel_off + offsetarray[i]; ++ paramp->blklens[last_idx + 1] = size; ++ paramp->index++; ++ } ++ } ++ ++ /* if we get here then we processed ALL the blocks; don't need to update ++ * blocks_p ++ */ ++ MPIR_Assert(blocks_left == 0); ++ return 0; ++} ++ ++static int leaf_index_mpi_flatten(MPI_Aint * blocks_p, ++ MPI_Aint count, ++ MPI_Aint * blockarray, ++ MPI_Aint * offsetarray, ++ MPI_Datatype el_type, ++ MPI_Aint rel_off, void *bufp, void *v_paramp) ++{ ++ int i; ++ MPI_Aint size, blocks_left; ++ MPI_Aint el_size; ++ struct flatten_params *paramp = v_paramp; ++ ++ MPIR_Datatype_get_size_macro(el_type, el_size); ++ blocks_left = *blocks_p; ++ ++ MPIR_Assert(el_size != 0); ++ ++ for (i = 0; i < count && blocks_left > 0; i++) { ++ int last_idx; ++ char *last_end = NULL; ++ ++ if (blocks_left > blockarray[i]) { ++ size = blockarray[i] * el_size; ++ blocks_left -= blockarray[i]; ++ } else { ++ /* last pass */ ++ size = blocks_left * el_size; ++ blocks_left = 0; ++ } ++ ++ last_idx = paramp->index - 1; ++ if (last_idx >= 0) { ++ last_end = (char *) ++ (paramp->disps[last_idx] + (MPI_Aint) (paramp->blklens[last_idx])); ++ } ++ ++ if ((last_idx == paramp->length - 1) && ++ (last_end != ((char *) bufp + rel_off + offsetarray[i]))) { ++ /* we have used up all our entries, and this one doesn't fit on ++ * the end of the last one. ++ */ ++ *blocks_p -= (blocks_left + (size / el_size)); ++ return 1; ++ } else if (last_idx >= 0 && (last_end == ((char *) bufp + rel_off + offsetarray[i]))) { ++ /* add this size to the last vector rather than using up new one */ ++ paramp->blklens[last_idx] += size; ++ } else { ++ paramp->disps[last_idx + 1] = (MPI_Aint) bufp + rel_off + offsetarray[i]; ++ paramp->blklens[last_idx + 1] = size; /* these blocks are in bytes */ ++ paramp->index++; ++ } ++ } ++ ++ /* if we get here then we processed ALL the blocks; don't need to update ++ * blocks_p ++ */ ++ MPIR_Assert(blocks_left == 0); ++ return 0; ++} ++ ++/* ++ * Local variables: ++ * c-indent-tabs-mode: nil ++ * End: ++ */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/subarray_support.c +@@ -0,0 +1,116 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 1997 University of Chicago. ++ * See COPYRIGHT notice in top-level directory. ++ * ++ * Note: This code originally appeared in ROMIO. ++ */ ++ ++#include "mpiimpl.h" ++#include "dataloop_internal.h" ++ ++int MPII_Dataloop_convert_subarray(int ndims, ++ int *array_of_sizes, ++ int *array_of_subsizes, ++ int *array_of_starts, ++ int order, MPI_Datatype oldtype, MPI_Datatype * newtype) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPI_Aint extent, disps[3], size; ++ int i, blklens[3]; ++ MPI_Datatype tmp1, tmp2, types[3]; ++ ++ MPIR_Datatype_get_extent_macro(oldtype, extent); ++ ++ if (order == MPI_ORDER_FORTRAN) { ++ /* dimension 0 changes fastest */ ++ if (ndims == 1) { ++ mpi_errno = MPIR_Type_contiguous_impl(array_of_subsizes[0], oldtype, &tmp1); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ mpi_errno = MPIR_Type_vector_impl(array_of_subsizes[1], ++ array_of_subsizes[0], ++ array_of_sizes[0], oldtype, &tmp1); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ size = (MPI_Aint) (array_of_sizes[0]) * extent; ++ for (i = 2; i < ndims; i++) { ++ size *= (MPI_Aint) (array_of_sizes[i - 1]); ++ mpi_errno = MPIR_Type_hvector_impl(array_of_subsizes[i], 1, size, tmp1, &tmp2); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Type_free_impl(&tmp1); ++ tmp1 = tmp2; ++ } ++ } ++ ++ /* add displacement and UB */ ++ disps[1] = (MPI_Aint) (array_of_starts[0]); ++ size = 1; ++ for (i = 1; i < ndims; i++) { ++ size *= (MPI_Aint) (array_of_sizes[i - 1]); ++ disps[1] += size * (MPI_Aint) (array_of_starts[i]); ++ } ++ /* rest done below for both Fortran and C order */ ++ } ++ ++ else { /* order == MPI_ORDER_C */ ++ ++ /* dimension ndims-1 changes fastest */ ++ if (ndims == 1) { ++ mpi_errno = MPIR_Type_contiguous_impl(array_of_subsizes[0], oldtype, &tmp1); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ mpi_errno = MPIR_Type_vector_impl(array_of_subsizes[ndims - 2], ++ array_of_subsizes[ndims - 1], ++ array_of_sizes[ndims - 1], oldtype, &tmp1); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ size = (MPI_Aint) (array_of_sizes[ndims - 1]) * extent; ++ for (i = ndims - 3; i >= 0; i--) { ++ size *= (MPI_Aint) (array_of_sizes[i + 1]); ++ mpi_errno = MPIR_Type_hvector_impl(array_of_subsizes[i], 1, size, tmp1, &tmp2); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Type_free_impl(&tmp1); ++ tmp1 = tmp2; ++ } ++ } ++ ++ /* add displacement and UB */ ++ disps[1] = (MPI_Aint) (array_of_starts[ndims - 1]); ++ size = 1; ++ for (i = ndims - 2; i >= 0; i--) { ++ size *= (MPI_Aint) (array_of_sizes[i + 1]); ++ disps[1] += size * (MPI_Aint) (array_of_starts[i]); ++ } ++ } ++ ++ disps[1] *= extent; ++ ++ disps[2] = extent; ++ for (i = 0; i < ndims; i++) ++ disps[2] *= (MPI_Aint) (array_of_sizes[i]); ++ ++ disps[0] = 0; ++ blklens[0] = blklens[1] = blklens[2] = 1; ++ types[0] = MPI_LB; ++ types[1] = tmp1; ++ types[2] = MPI_UB; ++ ++ mpi_errno = MPIR_Type_struct_impl(3, blklens, disps, types, newtype); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_Type_free_impl(&tmp1); ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/dataloop/typesize_support.h +@@ -0,0 +1,27 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#ifndef TYPESIZE_SUPPORT_H_INCLUDED ++#define TYPESIZE_SUPPORT_H_INCLUDED ++ ++#include "dataloop_internal.h" ++ ++#define MPII_Dataloop_type_footprint MPIDU_Type_footprint ++ ++typedef struct MPIDU_Type_footprint_s { ++ MPI_Aint size, extent; ++ ++ /* these are only needed for calculating footprint of types ++ * built using this type. no reason to expose these. ++ */ ++ MPI_Aint lb, ub, alignsz; ++ MPI_Aint true_lb, true_ub; ++ int has_sticky_lb; ++ int has_sticky_ub; ++} MPII_Dataloop_type_footprint; ++ ++void MPIDU_Type_calc_footprint(MPI_Datatype type, MPII_Dataloop_type_footprint * tfp); ++ ++#endif /* TYPESIZE_SUPPORT_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/src/typerep_create.c +@@ -0,0 +1,26 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++void MPIR_Typerep_create(MPI_Datatype type, void **typerep_p) ++{ ++ MPIR_Dataloop_create(type, typerep_p); ++} ++ ++void MPIR_Typerep_free(void **typerep_p) ++{ ++ MPIR_Dataloop_free(typerep_p); ++} ++ ++void MPIR_Typerep_dup(void *old_typerep, void **new_typerep_p) ++{ ++ MPIR_Dataloop_dup(old_typerep, new_typerep_p); ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/src/typerep_debug.c +@@ -0,0 +1,16 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++void MPIR_Typerep_debug(MPI_Datatype type) ++{ ++ MPIR_Dataloop_printf(type, 0, 1); ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/src/typerep_flatten.c +@@ -0,0 +1,114 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include ++#include ++#include ++ ++struct flatten_hdr { ++ MPI_Aint size; ++ MPI_Aint extent, ub, lb, true_ub, true_lb; ++ int has_sticky_ub, has_sticky_lb; ++ int is_contig; ++ int basic_type; ++ MPI_Aint max_contig_blocks; ++}; ++ ++/* ++ * MPIR_Typerep_flatten_size ++ * ++ * Parameters: ++ * datatype_ptr - (IN) datatype to flatten ++ * flattened_type_size - (OUT) buffer size needed for the flattened representation ++ */ ++int MPIR_Typerep_flatten_size(MPIR_Datatype * datatype_ptr, int *flattened_type_size) ++{ ++ int flattened_loop_size; ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_Dataloop_flatten_size(datatype_ptr, &flattened_loop_size); ++ ++ *flattened_type_size = flattened_loop_size + sizeof(struct flatten_hdr); ++ ++ return mpi_errno; ++} ++ ++/* ++ * MPIR_Typerep_flatten ++ * ++ * Parameters: ++ * datatype_ptr - (IN) datatype to flatten ++ * flattened_type - (OUT) buffer that will contain the flattened representation ++ */ ++int MPIR_Typerep_flatten(MPIR_Datatype * datatype_ptr, void *flattened_type) ++{ ++ struct flatten_hdr *flatten_hdr = (struct flatten_hdr *) flattened_type; ++ void *flattened_dataloop = (void *) ((char *) flattened_type + sizeof(struct flatten_hdr)); ++ int mpi_errno = MPI_SUCCESS; ++ ++ flatten_hdr->size = datatype_ptr->size; ++ flatten_hdr->extent = datatype_ptr->extent; ++ flatten_hdr->ub = datatype_ptr->ub; ++ flatten_hdr->lb = datatype_ptr->lb; ++ flatten_hdr->true_ub = datatype_ptr->true_ub; ++ flatten_hdr->true_lb = datatype_ptr->true_lb; ++ flatten_hdr->has_sticky_ub = datatype_ptr->has_sticky_ub; ++ flatten_hdr->has_sticky_lb = datatype_ptr->has_sticky_lb; ++ flatten_hdr->is_contig = datatype_ptr->is_contig; ++ flatten_hdr->basic_type = datatype_ptr->basic_type; ++ flatten_hdr->max_contig_blocks = datatype_ptr->max_contig_blocks; ++ ++ mpi_errno = MPIR_Dataloop_flatten(datatype_ptr, flattened_dataloop); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* ++ * MPIR_Typerep_unflatten ++ * ++ * Parameters: ++ * datatype_ptr - (OUT) datatype into which the buffer will be unflattened ++ * flattened_type - (IN) buffer that contains the flattened representation ++ */ ++int MPIR_Typerep_unflatten(MPIR_Datatype * datatype_ptr, void *flattened_type) ++{ ++ struct flatten_hdr *flatten_hdr = (struct flatten_hdr *) flattened_type; ++ void *flattened_dataloop = (void *) ((char *) flattened_type + sizeof(struct flatten_hdr)); ++ int mpi_errno = MPI_SUCCESS; ++ ++ datatype_ptr->is_committed = 1; ++ datatype_ptr->attributes = 0; ++ datatype_ptr->name[0] = 0; ++ datatype_ptr->is_contig = flatten_hdr->is_contig; ++ datatype_ptr->max_contig_blocks = flatten_hdr->max_contig_blocks; ++ datatype_ptr->size = flatten_hdr->size; ++ datatype_ptr->extent = flatten_hdr->extent; ++ datatype_ptr->basic_type = flatten_hdr->basic_type; ++ datatype_ptr->ub = flatten_hdr->ub; ++ datatype_ptr->lb = flatten_hdr->lb; ++ datatype_ptr->true_ub = flatten_hdr->true_ub; ++ datatype_ptr->true_lb = flatten_hdr->true_lb; ++ datatype_ptr->has_sticky_ub = flatten_hdr->has_sticky_ub; ++ datatype_ptr->has_sticky_lb = flatten_hdr->has_sticky_lb; ++ datatype_ptr->contents = NULL; ++ ++ mpi_errno = MPIR_Dataloop_unflatten(datatype_ptr, flattened_dataloop); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/src/typerep_iov.c +@@ -0,0 +1,46 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++ ++/* ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++int MPIR_Typerep_to_iov(const void *buf, MPI_Aint count, MPI_Datatype type, MPI_Aint offset, ++ MPL_IOV * iov, int max_iov_len, MPI_Aint max_iov_bytes, ++ int *actual_iov_len, MPI_Aint * actual_iov_bytes) ++{ ++ MPIR_Segment *seg; ++ int mpi_errno = MPI_SUCCESS; ++ ++ seg = MPIR_Segment_alloc(buf, count, type); ++ ++ MPI_Aint last = offset + max_iov_bytes; ++ *actual_iov_len = max_iov_len; ++ MPIR_Segment_to_iov(seg, offset, &last, iov, actual_iov_len); ++ *actual_iov_bytes = last - offset; ++ ++ MPIR_Segment_free(seg); ++ ++ return mpi_errno; ++} ++ ++int MPIR_Typerep_iov_len(const void *buf, MPI_Aint count, MPI_Datatype type, MPI_Aint offset, ++ MPI_Aint max_iov_bytes, MPI_Aint * iov_len) ++{ ++ MPIR_Segment *seg; ++ int mpi_errno = MPI_SUCCESS; ++ ++ seg = MPIR_Segment_alloc(buf, count, type); ++ ++ MPI_Aint last = offset + max_iov_bytes; ++ MPIR_Segment_count_contig_blocks(seg, offset, &last, iov_len); ++ ++ MPIR_Segment_free(seg); ++ ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/src/typerep_pack.c +@@ -0,0 +1,123 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include ++ ++int MPIR_Typerep_pack(const void *inbuf, MPI_Aint incount, MPI_Datatype datatype, ++ MPI_Aint inoffset, void *outbuf, MPI_Aint max_pack_bytes, ++ MPI_Aint * actual_pack_bytes) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Segment *segp; ++ int contig; ++ MPI_Aint dt_true_lb; ++ MPI_Aint data_sz; ++ MPI_Aint last; ++ ++ if (incount == 0) { ++ *actual_pack_bytes = 0; ++ goto fn_exit; ++ } ++ ++ if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) { ++ contig = TRUE; ++ dt_true_lb = 0; ++ data_sz = incount * MPIR_Datatype_get_basic_size(datatype); ++ } else { ++ MPIR_Datatype *dt_ptr; ++ MPIR_Datatype_get_ptr(datatype, dt_ptr); ++ MPIR_Datatype_is_contig(datatype, &contig); ++ dt_true_lb = dt_ptr->true_lb; ++ data_sz = incount * dt_ptr->size; ++ } ++ ++ /* make sure we don't pack more than the max bytes */ ++ /* FIXME: we need to make sure to pack each basic datatype ++ * atomically, even if the max_pack_bytes allows us to split it */ ++ if (data_sz > max_pack_bytes) ++ data_sz = max_pack_bytes; ++ ++ /* Handle contig case quickly */ ++ if (contig) { ++ MPIR_Memcpy(outbuf, (char *) inbuf + dt_true_lb + inoffset, data_sz); ++ *actual_pack_bytes = data_sz; ++ } else { ++ segp = MPIR_Segment_alloc(inbuf, incount, datatype); ++ MPIR_ERR_CHKANDJUMP1(segp == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", ++ "MPIR_Segment"); ++ ++ last = inoffset + max_pack_bytes; ++ MPIR_Segment_pack(segp, inoffset, &last, outbuf); ++ MPIR_Segment_free(segp); ++ ++ *actual_pack_bytes = last - inoffset; ++ } ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIR_Typerep_unpack(const void *inbuf, MPI_Aint insize, ++ void *outbuf, MPI_Aint outcount, MPI_Datatype datatype, MPI_Aint outoffset, ++ MPI_Aint * actual_unpack_bytes) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Segment *segp; ++ int contig; ++ MPI_Aint last; ++ MPI_Aint data_sz; ++ MPI_Aint dt_true_lb; ++ ++ if (insize == 0) { ++ *actual_unpack_bytes = 0; ++ goto fn_exit; ++ } ++ ++ if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) { ++ contig = TRUE; ++ dt_true_lb = 0; ++ data_sz = outcount * MPIR_Datatype_get_basic_size(datatype); ++ } else { ++ MPIR_Datatype *dt_ptr; ++ MPIR_Datatype_get_ptr(datatype, dt_ptr); ++ MPIR_Datatype_is_contig(datatype, &contig); ++ dt_true_lb = dt_ptr->true_lb; ++ data_sz = outcount * dt_ptr->size; ++ } ++ ++ /* make sure we are not unpacking more than the provided buffer ++ * length */ ++ /* FIXME: we need to make sure to unpack each basic datatype ++ * atomically, even if the max_unpack_bytes allows us to split ++ * it */ ++ if (data_sz > insize) ++ data_sz = insize; ++ ++ /* Handle contig case quickly */ ++ if (contig) { ++ MPIR_Memcpy((char *) outbuf + dt_true_lb + outoffset, inbuf, data_sz); ++ *actual_unpack_bytes = data_sz; ++ } else { ++ segp = MPIR_Segment_alloc(outbuf, outcount, datatype); ++ MPIR_ERR_CHKANDJUMP1(segp == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", ++ "MPIR_Segment_alloc"); ++ ++ last = data_sz + outoffset; ++ MPIR_Segment_unpack(segp, outoffset, &last, inbuf); ++ MPIR_Segment_free(segp); ++ ++ *actual_unpack_bytes = last - outoffset; ++ } ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/datatype/typerep/src/typerep_pack_external.c +@@ -0,0 +1,67 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpiimpl.h" ++#include ++ ++/* The pack/unpack_external functions do not have the full generality ++ * of the regular pack/unpack functions because we only need them for ++ * satisfying the MPI-level pack/unpack_external functions. MPICH ++ * internals do not need them. */ ++ ++int MPIR_Typerep_pack_external(const void *inbuf, MPI_Aint incount, MPI_Datatype datatype, ++ void *outbuf, MPI_Aint * actual_pack_bytes) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Segment *segp; ++ ++ segp = MPIR_Segment_alloc(inbuf, incount, datatype); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (segp == NULL) { ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, ++ __func__, ++ __LINE__, ++ MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment"); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ /* NOTE: the use of buffer values and positions in ++ * MPI_Pack_external and in MPIR_Segment_pack_external are quite ++ * different. See code or docs or something. */ ++ *actual_pack_bytes = MPIR_SEGMENT_IGNORE_LAST; ++ MPIR_Segment_pack_external32(segp, 0, actual_pack_bytes, outbuf); ++ ++ MPIR_Segment_free(segp); ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIR_Typerep_unpack_external(const void *inbuf, void *outbuf, MPI_Aint outcount, ++ MPI_Datatype datatype, MPI_Aint * actual_unpack_bytes) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Segment *segp; ++ ++ segp = MPIR_Segment_alloc(outbuf, outcount, datatype); ++ MPIR_ERR_CHKANDJUMP1((segp == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", ++ "MPIR_Segment_alloc"); ++ ++ *actual_unpack_bytes = MPIR_SEGMENT_IGNORE_LAST; ++ MPIR_Segment_unpack_external32(segp, 0, actual_unpack_bytes, inbuf); ++ ++ MPIR_Segment_free(segp); ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpi/datatype/typeutil.c ++++ b/src/mpi/datatype/typeutil.c +@@ -13,10 +13,8 @@ + that is used by ROMIO to test to see if datatypes are contiguous */ + + /* Preallocated datatype objects */ +-MPIR_Datatype MPIR_Datatype_builtin[MPIR_DATATYPE_N_BUILTIN] = { {0} +-}; +-MPIR_Datatype MPIR_Datatype_direct[MPIR_DATATYPE_PREALLOC] = { {0} +-}; ++MPIR_Datatype MPIR_Datatype_builtin[MPIR_DATATYPE_N_BUILTIN]; ++MPIR_Datatype MPIR_Datatype_direct[MPIR_DATATYPE_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Datatype_mem = { 0, 0, 0, 0, MPIR_DATATYPE, + sizeof(MPIR_Datatype), MPIR_Datatype_direct, +@@ -140,10 +138,6 @@ static MPI_Datatype mpi_pairtypes[] = { + (MPI_Datatype) - 1 + }; + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Datatype_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Datatype_init(void) + { + int i; +@@ -189,10 +183,6 @@ int MPIR_Datatype_init(void) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Datatype_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIR_Datatype_finalize(void *dummy ATTRIBUTE((unused))) + { + int i; +@@ -212,10 +202,6 @@ static int MPIR_Datatype_finalize(void *dummy ATTRIBUTE((unused))) + That routine calls it from within a single-init section to + ensure thread-safety. */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Datatype_builtin_fillin +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Datatype_builtin_fillin(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -247,7 +233,7 @@ int MPIR_Datatype_builtin_fillin(void) + if (dptr < MPIR_Datatype_builtin || + dptr > MPIR_Datatype_builtin + MPIR_DATATYPE_N_BUILTIN) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_FATAL, FCNAME, ++ MPIR_ERR_FATAL, __func__, + __LINE__, MPI_ERR_INTERN, + "**typeinitbadmem", "**typeinitbadmem %d", i); + return mpi_errno; +@@ -256,7 +242,6 @@ int MPIR_Datatype_builtin_fillin(void) + + /* dptr will point into MPIR_Datatype_builtin */ + dptr->handle = d; +- dptr->is_permanent = 1; + dptr->is_contig = 1; + MPIR_Object_set_ref(dptr, 1); + MPIR_Datatype_get_size_macro(mpi_dtypes[i], dptr->size); +@@ -269,7 +254,7 @@ int MPIR_Datatype_builtin_fillin(void) + if (d != -1 && i < sizeof(mpi_dtypes) / sizeof(*mpi_dtypes) && mpi_dtypes[i] != -1) { + /* We did not hit the end-of-list */ + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_INTERN, "**typeinitfail", + "**typeinitfail %d", i - 1); + return mpi_errno; +@@ -349,16 +334,12 @@ int MPII_Type_zerolen(MPI_Datatype * newtype) + + /* handle is filled in by MPIR_Handle_obj_alloc() */ + MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 0; + new_dtp->is_committed = 0; + new_dtp->attributes = NULL; +- new_dtp->cache_id = 0; + new_dtp->name[0] = 0; + new_dtp->contents = NULL; + +- new_dtp->dataloop = NULL; +- new_dtp->dataloop_size = -1; +- new_dtp->dataloop_depth = -1; ++ new_dtp->typerep = NULL; + + new_dtp->size = 0; + new_dtp->has_sticky_ub = 0; +@@ -477,3 +458,142 @@ void MPII_Datatype_get_contents_types(MPIR_Datatype_contents * cp, MPI_Datatype + + return; + } ++ ++/* MPII_Datatype_indexed_count_contig() ++ * ++ * Determines the actual number of contiguous blocks represented by the ++ * blocklength/displacement arrays. This might be less than count (as ++ * few as 1). ++ * ++ * Extent passed in is for the original type. ++ */ ++MPI_Aint MPII_Datatype_indexed_count_contig(MPI_Aint count, ++ const MPI_Aint * blocklength_array, ++ const void *displacement_array, ++ int dispinbytes, MPI_Aint old_extent) ++{ ++ MPI_Aint i, contig_count = 1; ++ MPI_Aint cur_blklen, first; ++ ++ if (count) { ++ /* Skip any initial zero-length blocks */ ++ for (first = 0; first < count; ++first) ++ if ((MPI_Aint) blocklength_array[first]) ++ break; ++ ++ if (first == count) { /* avoid invalid reads later on */ ++ contig_count = 0; ++ return contig_count; ++ } ++ ++ cur_blklen = (MPI_Aint) blocklength_array[first]; ++ if (!dispinbytes) { ++ MPI_Aint cur_tdisp = (MPI_Aint) ((int *) displacement_array)[first]; ++ ++ for (i = first + 1; i < count; ++i) { ++ if (blocklength_array[i] == 0) { ++ continue; ++ } else if (cur_tdisp + (MPI_Aint) cur_blklen == ++ (MPI_Aint) ((int *) displacement_array)[i]) { ++ /* adjacent to current block; add to block */ ++ cur_blklen += (MPI_Aint) blocklength_array[i]; ++ } else { ++ cur_tdisp = (MPI_Aint) ((int *) displacement_array)[i]; ++ cur_blklen = (MPI_Aint) blocklength_array[i]; ++ contig_count++; ++ } ++ } ++ } else { ++ MPI_Aint cur_bdisp = (MPI_Aint) ((MPI_Aint *) displacement_array)[first]; ++ ++ for (i = first + 1; i < count; ++i) { ++ if (blocklength_array[i] == 0) { ++ continue; ++ } else if (cur_bdisp + (MPI_Aint) cur_blklen * old_extent == ++ (MPI_Aint) ((MPI_Aint *) displacement_array)[i]) { ++ /* adjacent to current block; add to block */ ++ cur_blklen += (MPI_Aint) blocklength_array[i]; ++ } else { ++ cur_bdisp = (MPI_Aint) ((MPI_Aint *) displacement_array)[i]; ++ cur_blklen = (MPI_Aint) blocklength_array[i]; ++ contig_count++; ++ } ++ } ++ } ++ } ++ return contig_count; ++} ++ ++MPI_Aint MPII_Datatype_blockindexed_count_contig(MPI_Aint count, ++ MPI_Aint blklen, ++ const void *disp_array, ++ int dispinbytes, MPI_Aint old_extent) ++{ ++ int i, contig_count = 1; ++ ++ if (!dispinbytes) { ++ /* this is from the MPI type, is of type int */ ++ MPI_Aint cur_tdisp = (MPI_Aint) ((int *) disp_array)[0]; ++ ++ for (i = 1; i < count; i++) { ++ MPI_Aint next_tdisp = (MPI_Aint) ((int *) disp_array)[i]; ++ ++ if (cur_tdisp + (MPI_Aint) blklen != next_tdisp) { ++ contig_count++; ++ } ++ cur_tdisp = next_tdisp; ++ } ++ } else { ++ /* this is from the MPI type, is of type MPI_Aint */ ++ MPI_Aint cur_bdisp = (MPI_Aint) ((MPI_Aint *) disp_array)[0]; ++ ++ for (i = 1; i < count; i++) { ++ MPI_Aint next_bdisp = (MPI_Aint) ((MPI_Aint *) disp_array)[i]; ++ ++ if (cur_bdisp + (MPI_Aint) blklen * old_extent != next_bdisp) { ++ contig_count++; ++ } ++ cur_bdisp = next_bdisp; ++ } ++ } ++ return contig_count; ++} ++ ++/*@ ++ MPIR_Datatype_free ++ ++Input Parameters: ++. MPIR_Datatype ptr - pointer to MPID datatype structure that is no longer ++ referenced ++ ++Output Parameters: ++ none ++ ++ Return Value: ++ none ++ ++ This function handles freeing dynamically allocated memory associated with ++ the datatype. In the process MPIR_Datatype_free_contents() is also called, ++ which handles decrementing reference counts to constituent types (in ++ addition to freeing the space used for contents information). ++ MPIR_Datatype_free_contents() will call MPIR_Datatype_free() on constituent ++ types that are no longer referenced as well. ++ ++ @*/ ++void MPIR_Datatype_free(MPIR_Datatype * ptr) ++{ ++ MPL_DBG_MSG_P(MPIR_DBG_DATATYPE, VERBOSE, "type %x freed.", ptr->handle); ++ ++ MPID_Type_free_hook(ptr); ++ ++ /* before freeing the contents, check whether the pointer is not ++ * null because it is null in the case of a datatype shipped to the target ++ * for RMA ops */ ++ if (ptr->contents) { ++ MPIR_Datatype_free_contents(ptr); ++ } ++ if (ptr->typerep) { ++ MPIR_Typerep_free(&(ptr->typerep)); ++ } ++ MPIR_Handle_obj_free(&MPIR_Datatype_mem, ptr); ++} +--- a/src/mpi/datatype/unpack.c ++++ b/src/mpi/datatype/unpack.c +@@ -25,84 +25,8 @@ int MPI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, int o + #ifndef MPICH_MPI_FROM_PMPI + #undef MPI_Unpack + #define MPI_Unpack PMPI_Unpack +- +-#undef FUNCNAME +-#define FUNCNAME MPIR_Unpack_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize, MPI_Aint * position, +- void *outbuf, int outcount, MPI_Datatype datatype) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPI_Aint first, last; +- MPIR_Segment *segp; +- int contig; +- MPI_Aint dt_true_lb; +- MPI_Aint data_sz; +- +- if (insize == 0) +- goto fn_exit; +- +- /* Handle contig case quickly */ +- if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) { +- contig = TRUE; +- dt_true_lb = 0; +- data_sz = outcount * MPIR_Datatype_get_basic_size(datatype); +- } else { +- MPIR_Datatype *dt_ptr; +- MPIR_Datatype_get_ptr(datatype, dt_ptr); +- MPIR_Datatype_is_contig(datatype, &contig); +- dt_true_lb = dt_ptr->true_lb; +- data_sz = outcount * dt_ptr->size; +- } +- +- if (contig) { +- MPIR_Memcpy((char *) outbuf + dt_true_lb, (char *) inbuf + *position, data_sz); +- *position = (int) ((MPI_Aint) * position + data_sz); +- goto fn_exit; +- } +- +- +- /* non-contig case */ +- segp = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segp == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment_alloc"); +- mpi_errno = MPIR_Segment_init(outbuf, outcount, datatype, segp); +- MPIR_Assert(mpi_errno == MPI_SUCCESS); +- +- /* NOTE: the use of buffer values and positions in MPI_Unpack and in +- * MPIR_Segment_unpack are quite different. See code or docs or something. +- */ +- first = 0; +- last = SEGMENT_IGNORE_LAST; +- +- /* Ensure that pointer increment fits in a pointer */ +- MPIR_Ensure_Aint_fits_in_pointer((MPIR_VOID_PTR_CAST_TO_MPI_AINT inbuf) + +- (MPI_Aint) * position); +- +- MPIR_Segment_unpack(segp, first, &last, (void *) ((char *) inbuf + *position)); +- +- /* Ensure that calculation fits into an int datatype. */ +- MPIR_Ensure_Aint_fits_in_int((MPI_Aint) * position + last); +- +- *position = (int) ((MPI_Aint) * position + last); +- +- MPIR_Segment_free(segp); +- +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Unpack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Unpack - Unpack a buffer according to a datatype into contiguous memory + +@@ -196,9 +120,15 @@ int MPI_Unpack(const void *inbuf, int insize, int *position, + /* ... body of routine ... */ + + position_x = *position; +- mpi_errno = MPIR_Unpack_impl(inbuf, insize, &position_x, outbuf, outcount, datatype); ++ ++ MPI_Aint actual_unpack_bytes; ++ void *buf = (void *) ((char *) inbuf + position_x); ++ mpi_errno = ++ MPIR_Typerep_unpack(buf, insize, outbuf, outcount, datatype, 0, &actual_unpack_bytes); + if (mpi_errno) + goto fn_fail; ++ ++ position_x += actual_unpack_bytes; + MPIR_Assign_trunc(*position, position_x, int); + + /* ... end of body of routine ... */ +@@ -213,12 +143,12 @@ int MPI_Unpack(const void *inbuf, int insize, int *position, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_unpack", "**mpi_unpack %p %d %p %p %d %D %C", inbuf, insize, + position, outbuf, outcount, datatype, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/unpack_external.c ++++ b/src/mpi/datatype/unpack_external.c +@@ -29,10 +29,6 @@ int MPI_Unpack_external(const char datarep[], const void *inbuf, MPI_Aint insize + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Unpack_external +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Unpack_external - Unpack a buffer (packed with MPI_Pack_external) + according to a datatype into contiguous memory +@@ -65,8 +61,6 @@ int MPI_Unpack_external(const char datarep[], + MPI_Aint * position, void *outbuf, int outcount, MPI_Datatype datatype) + { + int mpi_errno = MPI_SUCCESS; +- MPI_Aint first, last; +- MPIR_Segment *segp; + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_UNPACK_EXTERNAL); + + MPIR_ERRTEST_INITIALIZED_ORDIE(); +@@ -108,28 +102,12 @@ int MPI_Unpack_external(const char datarep[], + goto fn_exit; + } + +- segp = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((segp == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment_alloc"); +- mpi_errno = MPIR_Segment_init(outbuf, outcount, datatype, segp); +- if (mpi_errno != MPI_SUCCESS) ++ MPI_Aint actual_unpack_bytes; ++ mpi_errno = MPIR_Typerep_unpack_external((void *) ((char *) inbuf + *position), ++ outbuf, outcount, datatype, &actual_unpack_bytes); ++ if (mpi_errno) + goto fn_fail; +- +- /* NOTE: buffer values and positions in MPI_Unpack_external are used very +- * differently from use in MPIR_Segment_unpack_external... +- */ +- first = 0; +- last = SEGMENT_IGNORE_LAST; +- +- /* Ensure that pointer increment fits in a pointer */ +- MPIR_Ensure_Aint_fits_in_pointer((MPIR_VOID_PTR_CAST_TO_MPI_AINT inbuf) + *position); +- +- MPIR_Segment_unpack_external32(segp, first, &last, (void *) ((char *) inbuf + *position)); +- +- *position += last; +- +- MPIR_Segment_free(segp); +- ++ *position += actual_unpack_bytes; + /* ... end of body of routine ... */ + + fn_exit: +@@ -141,13 +119,13 @@ int MPI_Unpack_external(const char datarep[], + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_unpack_external", + "**mpi_unpack_external %s %p %d %p %p %d %D", datarep, inbuf, + insize, position, outbuf, outcount, datatype); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/datatype/veccpy.h ++++ b/src/mpi/datatype/veccpy.h +@@ -11,42 +11,42 @@ + #ifdef HAVE_ANY_INT64_T_ALIGNEMENT + #define MPIR_ALIGN8_TEST(p1,p2) + #else +-#define MPIR_ALIGN8_TEST(p1,p2) && (((DLOOP_VOID_PTR_CAST_TO_OFFSET p1 | DLOOP_VOID_PTR_CAST_TO_OFFSET p2) & 0x7) == 0) ++#define MPIR_ALIGN8_TEST(p1,p2) && ((((MPI_Aint) p1 | (MPI_Aint) p2) & 0x7) == 0) + #endif + + #ifdef HAVE_ANY_INT32_T_ALIGNEMENT + #define MPIR_ALIGN4_TEST(p1,p2) + #else +-#define MPIR_ALIGN4_TEST(p1,p2) && (((DLOOP_VOID_PTR_CAST_TO_OFFSET p1 | DLOOP_VOID_PTR_CAST_TO_OFFSET p2) & 0x3) == 0) ++#define MPIR_ALIGN4_TEST(p1,p2) && ((((MPI_Aint) p1 | (MPI_Aint) p2) & 0x3) == 0) + #endif + + #define MPII_COPY_FROM_VEC(src,dest,stride,type,nelms,count) \ + { \ + if (!nelms) { \ +- src = (char*) DLOOP_OFFSET_CAST_TO_VOID_PTR \ +- ((DLOOP_VOID_PTR_CAST_TO_OFFSET (src)) + \ +- ((DLOOP_Offset) count * (DLOOP_Offset) stride)); \ ++ src = (char*) \ ++ (((MPI_Aint) (src)) + \ ++ ((MPI_Aint) count * (MPI_Aint) stride)); \ + } \ + else if (stride % sizeof(type)) { \ + MPII_COPY_FROM_VEC_UNALIGNED(src,dest,stride,type,nelms,count); \ + } \ + else { \ +- MPII_COPY_FROM_VEC_ALIGNED(src,dest,stride/(DLOOP_Offset)sizeof(type),type,nelms,count); \ ++ MPII_COPY_FROM_VEC_ALIGNED(src,dest,stride/(MPI_Aint)sizeof(type),type,nelms,count); \ + } \ + } + + #define MPII_COPY_TO_VEC(src,dest,stride,type,nelms,count) \ + { \ + if (!nelms) { \ +- dest = (char*) DLOOP_OFFSET_CAST_TO_VOID_PTR \ +- ((DLOOP_VOID_PTR_CAST_TO_OFFSET (dest)) + \ +- ((DLOOP_Offset) count * (DLOOP_Offset) stride)); \ ++ dest = (char*) \ ++ (((MPI_Aint) (dest)) + \ ++ ((MPI_Aint) count * (MPI_Aint) stride)); \ + } \ +- else if (stride % (DLOOP_Offset) sizeof(type)) { \ ++ else if (stride % (MPI_Aint) sizeof(type)) { \ + MPII_COPY_TO_VEC_UNALIGNED(src,dest,stride,type,nelms,count); \ + } \ + else { \ +- MPII_COPY_TO_VEC_ALIGNED(src,dest,stride/(DLOOP_Offset)sizeof(type),type,nelms,count); \ ++ MPII_COPY_TO_VEC_ALIGNED(src,dest,stride/(MPI_Aint)sizeof(type),type,nelms,count); \ + } \ + } + +@@ -57,11 +57,11 @@ + register int k; \ + register unsigned long _i, j; \ + unsigned long total_count = count * nelms; \ +- const DLOOP_Offset l_stride = stride; \ ++ const MPI_Aint l_stride = stride; \ + \ +- DLOOP_Assert(stride <= INT_MAX); \ +- DLOOP_Assert(total_count <= INT_MAX); \ +- DLOOP_Assert(nelms <= INT_MAX); \ ++ MPIR_Assert(stride <= INT_MAX); \ ++ MPIR_Assert(total_count <= INT_MAX); \ ++ MPIR_Assert(nelms <= INT_MAX); \ + if (nelms == 1) { \ + for (_i = (int)total_count; _i; _i--) { \ + *l_dest++ = *l_src; \ +@@ -172,11 +172,11 @@ + type * tmp_src = l_src; \ + register int k; \ + register unsigned long _i, j, total_count = count * nelms; \ +- const DLOOP_Offset l_stride = stride; \ ++ const MPI_Aint l_stride = stride; \ + \ +- DLOOP_Assert(stride <= INT_MAX); \ +- DLOOP_Assert(total_count <= INT_MAX); \ +- DLOOP_Assert(nelms <= INT_MAX); \ ++ MPIR_Assert(stride <= INT_MAX); \ ++ MPIR_Assert(total_count <= INT_MAX); \ ++ MPIR_Assert(nelms <= INT_MAX); \ + if (nelms == 1) { \ + for (_i = (int)total_count; _i; _i--) { \ + *l_dest++ = *l_src; \ +@@ -288,11 +288,11 @@ + register int k; \ + register unsigned long _i, j; \ + unsigned long total_count = count * nelms; \ +- const DLOOP_Offset l_stride = stride; \ ++ const MPI_Aint l_stride = stride; \ + \ +- DLOOP_Assert(stride <= INT_MAX); \ +- DLOOP_Assert(total_count <= INT_MAX); \ +- DLOOP_Assert(nelms <= INT_MAX); \ ++ MPIR_Assert(stride <= INT_MAX); \ ++ MPIR_Assert(total_count <= INT_MAX); \ ++ MPIR_Assert(nelms <= INT_MAX); \ + if (nelms == 1) { \ + for (_i = (int)total_count; _i; _i--) { \ + *l_dest = *l_src++; \ +@@ -404,11 +404,11 @@ + register int k; \ + register unsigned long _i, j; \ + unsigned long total_count = count * nelms; \ +- const DLOOP_Offset l_stride = stride; \ ++ const MPI_Aint l_stride = stride; \ + \ +- DLOOP_Assert(stride <= INT_MAX); \ +- DLOOP_Assert(total_count <= INT_MAX); \ +- DLOOP_Assert(nelms <= INT_MAX); \ ++ MPIR_Assert(stride <= INT_MAX); \ ++ MPIR_Assert(total_count <= INT_MAX); \ ++ MPIR_Assert(nelms <= INT_MAX); \ + if (nelms == 1) { \ + for (_i = (int)total_count; _i; _i--) { \ + *l_dest = *l_src++; \ +--- a/src/mpi/debugger/dbginit.c ++++ b/src/mpi/debugger/dbginit.c +@@ -352,7 +352,7 @@ void MPII_Sendq_remember(MPIR_Request * req, int rank, int tag, int context_id) + #if defined HAVE_DEBUGGER_SUPPORT + MPIR_Sendq *p; + +-/* TODO: We reuse the global lock for the per-vni granularity here instead of a ++/* TODO: We reuse the global lock for the per-vci granularity here instead of a + * theoritically more scalable approach of creating a separate lock. Whether + * this brief-global critical section would perturbate debugging is unknown; + * investigation is needed before attempting to optimize this case. */ +@@ -534,9 +534,7 @@ static int MPIR_FreeProctable(void *ptable) + int i; + MPIR_PROCDESC *proctable = (MPIR_PROCDESC *) ptable; + for (i = 0; i < MPIR_proctable_size; i++) { +- if (proctable[i].host_name) { +- MPL_free(proctable[i].host_name); +- } ++ MPL_free(proctable[i].host_name); + } + MPL_free(proctable); + +--- a/src/mpi/debugger/dll_mpich.c ++++ b/src/mpi/debugger/dll_mpich.c +@@ -159,9 +159,9 @@ int mqs_version_compatibility(void) + return MQS_INTERFACE_COMPATIBILITY; + } + +-char *mqs_version_string(void) ++const char *mqs_version_string(void) + { +- return (char *) "MPICH message queue support for MPICH " MPICH_VERSION " compiled on " __DATE__; ++ return "MPICH message queue support for MPICH " MPICH_VERSION " compiled on " __DATE__; + } + + /* Allow the debugger to discover the size of an address type */ +@@ -244,12 +244,12 @@ int mqs_setup_image(mqs_image * image, const mqs_image_callbacks * icb) + * dbgr_find_function (?) or by having the queue implementation provide a + * separate file that can be included here to get the necessary information. + */ +-int mqs_image_has_queues(mqs_image * image, char **message) ++int mqs_image_has_queues(mqs_image * image, const char **message) + { + mpich_image_info *i_info = (mpich_image_info *) dbgr_get_image_info(image); + + /* Default failure message ! */ +- *message = (char *) "The symbols and types in the MPICH library used by TotalView\n" ++ *message = "The symbols and types in the MPICH library used by TotalView\n" + "to extract the message queues are not as expected in\n" + "the image '%s'\n" + "No message queue display is possible.\n" +@@ -431,26 +431,26 @@ int mqs_process_has_queues(mqs_process * proc, char **msg) + + /* This routine is called by the debugger to map an error code into a + printable string */ +-char *mqs_dll_error_string(int errcode) ++const char *mqs_dll_error_string(int errcode) + { + switch (errcode) { + case err_silent_failure: +- return (char *) ""; ++ return ""; + case err_no_current_communicator: +- return (char *) "No current communicator in the communicator iterator"; ++ return "No current communicator in the communicator iterator"; + case err_bad_request: +- return (char *) "Attempting to setup to iterate over an unknown queue of operations"; ++ return "Attempting to setup to iterate over an unknown queue of operations"; + case err_no_store: +- return (char *) "Unable to allocate store"; ++ return "Unable to allocate store"; + case err_group_corrupt: +- return (char *) ++ return + "Could not read a communicator's group from the process (probably a store corruption)"; + case err_unexpected: +- return (char *) "Failed to find symbol MPID_Recvq_unexpected_head_ptr"; ++ return "Failed to find symbol MPID_Recvq_unexpected_head_ptr"; + case err_posted: +- return (char *) "Failed to find symbol MPID_Recvq_posted_head_ptr"; ++ return "Failed to find symbol MPID_Recvq_posted_head_ptr"; + } +- return (char *) "Unknown error code"; ++ return "Unknown error code"; + } + + /* ------------------------------------------------------------------------ */ +--- a/src/mpi/debugger/mpi_interface.h ++++ b/src/mpi/debugger/mpi_interface.h +@@ -453,7 +453,7 @@ typedef struct mqs_process_callbacks { + extern void mqs_setup_basic_callbacks(const mqs_basic_callbacks *); + + /* Version handling */ +-extern char *mqs_version_string(void); ++extern const char *mqs_version_string(void); + extern int mqs_version_compatibility(void); + /* This gives the width which has been compiled into the DLL, it is + * _not_ the width of a specific process, which could be smaller than +@@ -462,7 +462,7 @@ extern int mqs_version_compatibility(void); + extern int mqs_dll_taddr_width(void); + + /* Provide a text string for an error value */ +-extern char *mqs_dll_error_string(int); ++extern const char *mqs_dll_error_string(int); + + /*********************************************************************** + * Calls related to an executable image. +@@ -497,7 +497,7 @@ extern int mqs_setup_image(mqs_image *, const mqs_image_callbacks *); + * disable things, or loudly enable them). + */ + +-extern int mqs_image_has_queues(mqs_image *, char **); ++extern int mqs_image_has_queues(mqs_image *, const char **); + + /* This will be called by the debugger to let you tidy up whatever is + * required when the mqs_image_info is no longer needed. +--- a/src/mpi/debugger/tvtest.c ++++ b/src/mpi/debugger/tvtest.c +@@ -120,8 +120,8 @@ struct mqs_image_ { + int init_dbr(void) + { + int hasQ = 0; +- char *version = mqs_version_string(); +- char *msg; ++ const char *version = mqs_version_string(); ++ const char *msg; + + if (mqs_version_compatibility() != MQS_INTERFACE_COMPATIBILITY) { + fprintf(stderr, "Unexpected value of version\n"); +--- a/src/mpi/errhan/add_error_class.c ++++ b/src/mpi/errhan/add_error_class.c +@@ -28,10 +28,6 @@ int MPI_Add_error_class(int *errorclass) __attribute__ ((weak, alias("PMPI_Add_e + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Add_error_class +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Add_error_class - Add an MPI error class to the known classes + +@@ -92,11 +88,11 @@ int MPI_Add_error_class(int *errorclass) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_add_error_class", "**mpi_add_error_class %p", errorclass); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/errhan/add_error_code.c ++++ b/src/mpi/errhan/add_error_code.c +@@ -29,10 +29,6 @@ int MPI_Add_error_code(int errorclass, int *errorcode) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Add_error_code +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Add_error_code - Add an MPI error code to an MPI error class + +@@ -92,12 +88,12 @@ int MPI_Add_error_code(int errorclass, int *errorcode) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_add_error_code", "**mpi_add_error_code %d %p", errorclass, + errorcode); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/errhan/add_error_string.c ++++ b/src/mpi/errhan/add_error_string.c +@@ -29,10 +29,6 @@ int MPI_Add_error_string(int errorcode, const char *string) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Add_error_string +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Add_error_string - Associates an error string with an MPI error code or + class +@@ -99,12 +95,12 @@ int MPI_Add_error_string(int errorcode, const char *string) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_add_error_string", "**mpi_add_error_string %d %s", + errorcode, string); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/errhan/comm_call_errhandler.c ++++ b/src/mpi/errhan/comm_call_errhandler.c +@@ -28,10 +28,6 @@ int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_call_errhandler +-#undef FCNAME +-#define FCNAME "MPI_Comm_call_errhandler" + + /*@ + MPI_Comm_call_errhandler - Call the error handler installed on a +@@ -166,11 +162,11 @@ int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_call_errhandler", "**mpi_comm_call_errhandler %C %d", + comm, errorcode); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/comm_create_errhandler.c ++++ b/src/mpi/errhan/comm_create_errhandler.c +@@ -27,10 +27,6 @@ int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function * comm_errhandler_fn + #undef MPI_Comm_create_errhandler + #define MPI_Comm_create_errhandler PMPI_Comm_create_errhandler + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_create_errhandler_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_create_errhandler_impl(MPI_Comm_errhandler_function * comm_errhandler_fn, + MPI_Errhandler * errhandler) + { +@@ -55,10 +51,6 @@ int MPIR_Comm_create_errhandler_impl(MPI_Comm_errhandler_function * comm_errhand + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_create_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_create_errhandler - Create a communicator error handler + +@@ -123,13 +115,13 @@ int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function * comm_errhandler_fn + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_create_errhandler", + "**mpi_comm_create_errhandler %p %p", comm_errhandler_fn, + errhandler); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/errhan/comm_get_errhandler.c ++++ b/src/mpi/errhan/comm_get_errhandler.c +@@ -28,10 +28,6 @@ int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler * errhandler) + + /* MPIR_Comm_get_errhandler_impl + returning NULL for errhandler_ptr means the default handler, MPI_ERRORS_ARE_FATAL is used */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_get_errhandler_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Comm_get_errhandler_impl(MPIR_Comm * comm_ptr, MPIR_Errhandler ** errhandler_ptr) + { + MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr)); +@@ -45,10 +41,6 @@ void MPIR_Comm_get_errhandler_impl(MPIR_Comm * comm_ptr, MPIR_Errhandler ** errh + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_get_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_get_errhandler - Get the error handler attached to a communicator + +@@ -129,11 +121,11 @@ int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler * errhandler) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_get_errhandler", "**mpi_comm_get_errhandler %C %p", + comm, errhandler); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/comm_set_errhandler.c ++++ b/src/mpi/errhan/comm_set_errhandler.c +@@ -26,10 +26,6 @@ int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) + #undef MPI_Comm_set_errhandler + #define MPI_Comm_set_errhandler PMPI_Comm_set_errhandler + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_set_errhandler_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Comm_set_errhandler_impl(MPIR_Comm * comm_ptr, MPIR_Errhandler * errhandler_ptr) + { + int in_use; +@@ -55,10 +51,6 @@ void MPIR_Comm_set_errhandler_impl(MPIR_Comm * comm_ptr, MPIR_Errhandler * errha + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_set_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + MPI_Comm_set_errhandler - Set the error handler for a communicator +@@ -140,11 +132,11 @@ int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_set_errhandler", "**mpi_comm_set_errhandler %C %E", + comm, errhandler); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/dynerrutil.c ++++ b/src/mpi/errhan/dynerrutil.c +@@ -96,10 +96,6 @@ static void MPIR_Init_err_dyncodes(void) + MPIR_Add_finalize(MPIR_Dynerrcodes_finalize, (void *) 0, 9); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Err_set_msg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* + MPIR_Err_set_msg - Change the message for an error code or class + +@@ -137,7 +133,7 @@ int MPIR_Err_set_msg(int code, const char *msg_string) + if (code & ~(ERROR_CLASS_MASK | ERROR_DYN_MASK | ERROR_GENERIC_MASK)) { + /* Check for invalid error code */ + return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, "**argerrcode", "**argerrcode %d", code); + } + /* --END ERROR HANDLING-- */ +@@ -148,7 +144,7 @@ int MPIR_Err_set_msg(int code, const char *msg_string) + /* --BEGIN ERROR HANDLING-- */ + if (!str) { + return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**nomem", "**nomem %s %d", "error message string", msg_len); + } + /* --END ERROR HANDLING-- */ +@@ -157,9 +153,7 @@ int MPIR_Err_set_msg(int code, const char *msg_string) + MPL_strncpy(str, msg_string, msg_len + 1); + if (errcode) { + if (errcode < first_free_code) { +- if (user_code_msgs[errcode]) { +- MPL_free((void *) (user_code_msgs[errcode])); +- } ++ MPL_free((void *) (user_code_msgs[errcode])); + user_code_msgs[errcode] = (const char *) str; + } else { + /* FIXME : Unallocated error code? */ +@@ -167,9 +161,7 @@ int MPIR_Err_set_msg(int code, const char *msg_string) + } + } else { + if (errclass < first_free_class) { +- if (user_class_msgs[errclass]) { +- MPL_free((void *) (user_class_msgs[errclass])); +- } ++ MPL_free((void *) (user_class_msgs[errclass])); + user_class_msgs[errclass] = (const char *) str; + } else { + /* FIXME : Unallocated error code? */ +@@ -323,13 +315,11 @@ static int MPIR_Dynerrcodes_finalize(void *p ATTRIBUTE((unused))) + if (not_initialized == 0) { + + for (i = 0; i < first_free_class; i++) { +- if (user_class_msgs[i]) +- MPL_free((char *) user_class_msgs[i]); ++ MPL_free((char *) user_class_msgs[i]); + } + + for (i = 0; i < first_free_code; i++) { +- if (user_code_msgs[i]) +- MPL_free((char *) user_code_msgs[i]); ++ MPL_free((char *) user_code_msgs[i]); + } + } + return 0; +--- a/src/mpi/errhan/errhandler_create.c ++++ b/src/mpi/errhan/errhandler_create.c +@@ -28,10 +28,6 @@ int MPI_Errhandler_create(MPI_Handler_function * function, MPI_Errhandler * errh + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Errhandler_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Errhandler_create - Creates an MPI-style errorhandler + +@@ -101,12 +97,12 @@ int MPI_Errhandler_create(MPI_Handler_function * function, MPI_Errhandler * errh + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_errhandler_create", "**mpi_errhandler_create %p %p", + function, errhandler); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/errhan/errhandler_free.c ++++ b/src/mpi/errhan/errhandler_free.c +@@ -28,10 +28,6 @@ int MPI_Errhandler_free(MPI_Errhandler * errhandler) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Errhandler_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Errhandler_free - Frees an MPI-style errorhandler + +@@ -109,10 +105,10 @@ int MPI_Errhandler_free(MPI_Errhandler * errhandler) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_errhandler_free", "**mpi_errhandler_free %p", errhandler); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/errhandler_get.c ++++ b/src/mpi/errhan/errhandler_get.c +@@ -28,10 +28,6 @@ int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler * errhandler) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Errhandler_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Errhandler_get - Gets the error handler for a communicator + +@@ -125,11 +121,11 @@ int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler * errhandler) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_errhandler_get", "**mpi_errhandler_get %C %p", comm, + errhandler); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/errhandler_set.c ++++ b/src/mpi/errhan/errhandler_set.c +@@ -28,10 +28,6 @@ int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Errhandler_set +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Errhandler_set - Sets the error handler for a communicator + +@@ -119,11 +115,11 @@ int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_errhandler_set", "**mpi_errhandler_set %C %E", comm, + errhandler); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/errhan/errnames.txt ++++ b/src/mpi/errhan/errnames.txt +@@ -213,6 +213,9 @@ MPI_TYPECLASS_INTEGER, or MPI_TYPECLASS_COMPLEX + **treetype: Invalid tree type used for initializing Tree algorithms + **treetype %d: Invalid tree type (%d) used for initializing Tree algorithms + ++**noizem: release_gather based intra-node collectives cannot be used without izem submodule. \ ++Reconfigure mpich with --enable-izem=atomic --with-zm-prefix=yes ++ + # -- FIXME: Some (but not all) of the messages below this line have been used + #---- The messages below this line haven't been used yet. + # +@@ -735,85 +738,6 @@ is too big (> MPIU_SHMW_GHND_SZ) + **open %s:open failed - %s + **setenv:setenv failed + **putenv:putenv failed +-**mxm_config_read_opts: mxm_config_read_opts failed +-**mxm_config_read_opts %s:mxm_config_read_opts failed (%s) +-**mxm_init: mxm_init failed +-**mxm_init %s:mxm_init failed (%s) +-**mxm_set_am_handler: mxm_set_am_handler failed +-**mxm_set_am_handler %s:mxm_set_am_handler failed (%s) +-**mxm_mq_create: mxm_mq_create failed +-**mxm_mq_create %s:mxm_mq_create failed (%s) +-**mxm_ep_create: mxm_ep_create failed +-**mxm_ep_create %s:mxm_ep_create failed (%s) +-**mxm_ep_get_address: mxm_ep_get_address failed +-**mxm_ep_get_address %s:mxm_ep_get_address failed (%s) +-**mxm_ep_connect: mxm_ep_connect failed +-**mxm_ep_connect %s:mxm_ep_connect failed (%s) +-**mxm_ep_disconnect: mxm_ep_disconnect failed +-**mxm_ep_disconnect %s:mxm_ep_disconnect failed (%s) +-**mx_close_endpoint: mx_close_endpoint failed +-**mx_close_endpoint %s:mx_close_endpoint failed (%s) +-**mx_finalize:mx_finalize failed +-**mx_finalize %s:mx_finalize failed (%s) +-**mx_init:mx_init failed +-**mx_init %s:mx_init failed (%s) +-**mx_open_endpoint:mx_open_endpoint failed +-**mx_open_endpoint %s:mx_open_endpoint failed (%s) +-**mx_get_endpoint_addr:mx_get_endpoint_addr failed +-**mx_get_endpoint_addr %s:mx_get_endpoint_addr failed (%s) +-**mx_decompose_endpoint_addr:mx_decompose_endpoint_addr failed +-**mx_decompose_endpoint_addr %s:mx_decompose_endpoint_addr failed (%s) +-**mx_connect:mx_connect failed +-**mx_connect %s:mx_connect failed (%s) +-**mx_irecv:mx_irecv failed +-**mx_irecv %s:mx_irecv failed (%s) +-**mx_isend:mx_isend failed +-**mx_isend %s:mx_isend failed (%s) +-**mx_cancel:mx_cancel failed +-**mx_cancel %s:mx_cancel failed (%s) +-**ibv_alloc_pd:ibv_alloc_pd failed +-**ibv_alloc_pd %s:ibv_alloc_pd failed for device (%s) +-**ibv_create_comp_channel:ibv_create_comp_channel failed +-**ibv_create_comp_channel %s:ibv_create_comp_channel failed for device (%s) +-**ibv_destroy_comp_channel:ibv_destroy_comp_channel failed +-**ibv_destroy_comp_channel %s:ibv_destroy_comp_channel failed (%s) +-**ibv_create_cq:ibv_create_cq failed +-**ibv_create_cq %s:ibv_create_cq failed for device (%s) +-**ibv_destroy_cq:ibv_destroy_cq failed +-**ibv_destroy_cq %s:ibv_destroy_cq failed (%s) +-**ibv_create_srq:ibv_create_srq failed +-**ibv_create_srq %s:ibv_create_srq failed for device (%s) +-**ibv_modify_srq:ibv_modify_srq failed +-**ibv_modify_srq %d:ibv_modify_srq failed (%d) +-**ibv_get_device_list:ibv_get_device_list failed +-**ibv_get_device_list %p:ibv_get_device_list failed got list (%p) +-**ibv_open_device:ibv_open_device failed +-**ibv_open_device %s:ibv_open_device failed for device (%s) +-**ibv_reg_mr:ibv_reg_mr failed +-**ibv_reg_mr %d:ibv_reg_mr failed for buffer length (%d) +-**ibv_dereg_mr:ibv_dereg_mr failed +-**ibv_dereg_mr %s:ibv_dereg_mr failed (%s) +-**ibv_create_qp:ibv_create_qp failed +-**ibv_create_qp %s:ibv_create_qp failed for device (%s) +-**ibv_destroy_qp:ibv_destroy_qp failed +-**ibv_destroy_qp %s:ibv_destroy_qp failed (%s) +-**ibv_query_device:ibv_query_device failed +-**ibv_query_device %s:ibv_query_device failed for device (%s) +-**ibv_modify_qp:ibv_modify_qp failed +-**ibv_modify_qp %s:ibv_modify_qp failed for device (%s) +-**ibv_post_recv:ibv_post_recv failed +-**ibv_post_recv %d:ibv_post_recv failed len (%d) +-**ibv_req_notify_cq:ibv_req_notify_cq failed +-**ibv_req_notify_cq %s:ibv_req_notify_cq failed for device (%s) +-**ibv_create_ah:ibv_create_ah failed +-**ibv_create_ah %p:ibv_create_ah failed returned handle (%p) +-**ibv_post_send:ibv_post_send failed +-**ibv_post_send %s:ibv_post_send failed msg (%s) +-**ibv_poll_cq:ibv_poll_cq failed +-**ibv_poll_cq %d:ibv_poll_cq failed ret (%d) +-**ibv_post_srq_recv:ibv_post_srq_recv failed +-**ibv_post_srq_recv %d:ibv_post_srq_recv failed ret (%d) +-**ibv_post_send %d:ibv_post_send failed ret (%d) + **pthread_create:pthread_create failed + **pthread_create %d:pthread_create failed with status (%d) + **pthread_cancel:pthread_cancel failed +@@ -858,11 +782,7 @@ is too big (> MPIU_SHMW_GHND_SZ) + **abi_version_mismatch %D %D:ABI version mismatch, expected %D - got %D + **recv_status:receive status failed + **recv_status %d:receive status failed %d +-**invalid_knem_status:Invalid knem status value +-**invalid_knem_status %d:Invalid knem status value - %d + +-**vmsplice:vmsplice failed +-**vmsplice %d %s:vmsplice failed - errno %d (%s) + **mkfifo:mkfifo failed + **mkfifo %d %s:mkfifo failed - errno %d (%s) + **tempnam:tempnam failed +@@ -898,6 +818,8 @@ is too big (> MPIU_SHMW_GHND_SZ) + + **envvarparse:Unable to parse environment variable + **envvarparse %s:Unable to parse environment variable (%s) ++**cvar_val:Invalid CVAR value ++**cvar_val %s %s:Invalid %s value (%s) + + **infohintparse:Unable to parse info hint + **infohintparse %s:Unable to parse info hint (%s) +--- a/src/mpi/errhan/error_class.c ++++ b/src/mpi/errhan/error_class.c +@@ -29,10 +29,6 @@ int MPI_Error_class(int errorcode, int *errorclass) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Error_class +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Error_class - Converts an error code into an error class + +@@ -88,11 +84,11 @@ int MPI_Error_class(int errorcode, int *errorclass) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_error_class", "**mpi_error_class %d %p", errorcode, + errorclass); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/error_string.c ++++ b/src/mpi/errhan/error_string.c +@@ -29,10 +29,6 @@ int MPI_Error_string(int errorcode, char *string, int *resultlen) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Error_string +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Error_string - Return a string for a given error code + +@@ -94,11 +90,11 @@ int MPI_Error_string(int errorcode, char *string, int *resultlen) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_error_string", "**mpi_error_string %d %s %p", errorcode, + string, resultlen); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/errutil.c ++++ b/src/mpi/errhan/errutil.c +@@ -144,8 +144,8 @@ static int checkForUserErrcode(int); + #endif + + /* Preallocated errorhandler objects */ +-MPIR_Errhandler MPIR_Errhandler_builtin[MPIR_ERRHANDLER_N_BUILTIN] = { {0} }; +-MPIR_Errhandler MPIR_Errhandler_direct[MPIR_ERRHANDLER_PREALLOC] = { {0} }; ++MPIR_Errhandler MPIR_Errhandler_builtin[MPIR_ERRHANDLER_N_BUILTIN]; ++MPIR_Errhandler MPIR_Errhandler_direct[MPIR_ERRHANDLER_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Errhandler_mem = { 0, 0, 0, 0, MPIR_ERRHANDLER, + sizeof(MPIR_Errhandler), +--- a/src/mpi/errhan/file_call_errhandler.c ++++ b/src/mpi/errhan/file_call_errhandler.c +@@ -28,10 +28,6 @@ int MPI_File_call_errhandler(MPI_File fh, int errorcode) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_File_call_errhandler +-#undef FCNAME +-#define FCNAME "MPI_File_call_errhander" + /*@ + MPI_File_call_errhandler - Call the error handler installed on a + file +@@ -146,10 +142,6 @@ int MPI_File_call_errhandler(MPI_File fh, int errorcode) + /* This is a glue routine that can be used by ROMIO + (see mpi-io/glue/mpich/mpio_err.c) to properly invoke the C++ + error handler */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_File_call_cxx_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_File_call_cxx_errhandler(MPI_File * fh, int *errorcode, + void (*c_errhandler) (MPI_File *, int *, ...)) + { +--- a/src/mpi/errhan/file_create_errhandler.c ++++ b/src/mpi/errhan/file_create_errhandler.c +@@ -29,10 +29,6 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function * file_errhandler_fn + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_File_create_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_File_create_errhandler - Create a file error handler + +@@ -95,13 +91,13 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function * file_errhandler_fn + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_file_create_errhandler", + "**mpi_file_create_errhandler %p %p", file_errhandler_fn, + errhandler); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/errhan/file_get_errhandler.c ++++ b/src/mpi/errhan/file_get_errhandler.c +@@ -29,10 +29,6 @@ int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler * errhandler) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_File_get_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_File_get_errhandler - Get the error handler attached to a file + +@@ -111,7 +107,7 @@ int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler * errhandler) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_file_get_errhandler", "**mpi_file_get_errhandler %F %p", + file, errhandler); + } +--- a/src/mpi/errhan/file_set_errhandler.c ++++ b/src/mpi/errhan/file_set_errhandler.c +@@ -29,10 +29,6 @@ int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_File_set_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_File_set_errhandler - Set the error handler for an MPI file + +@@ -89,7 +85,7 @@ int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) + if (!mpi_errno) { + if (errhan_ptr->kind != MPIR_FILE) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, + __LINE__, MPI_ERR_ARG, "**errhandnotfile", NULL); + } + } +@@ -143,7 +139,7 @@ int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_file_set_errhandler", "**mpi_file_set_errhandler %F %E", + file, errhandler); + } +@@ -159,10 +155,6 @@ int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) + #ifndef MPICH_MPI_FROM_PMPI + /* Export this routine only once (if we need to compile this file twice + to get the PMPI and MPI versions without weak symbols */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_file_error_routine +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Get_file_error_routine(MPI_Errhandler e, void (**c) (MPI_File *, int *, ...), int *kind) + { + MPIR_Errhandler *e_ptr = 0; +--- a/src/mpi/errhan/win_call_errhandler.c ++++ b/src/mpi/errhan/win_call_errhandler.c +@@ -28,10 +28,6 @@ int MPI_Win_call_errhandler(MPI_Win win, int errorcode) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_call_errhandler +-#undef FCNAME +-#define FCNAME "MPI_Win_call_errhander" + + /*@ + MPI_Win_call_errhandler - Call the error handler installed on a +@@ -159,11 +155,11 @@ int MPI_Win_call_errhandler(MPI_Win win, int errorcode) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_call_errhandler", "**mpi_win_call_errhandler %W %d", + win, errorcode); + } +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/win_create_errhandler.c ++++ b/src/mpi/errhan/win_create_errhandler.c +@@ -29,10 +29,6 @@ int MPI_Win_create_errhandler(MPI_Win_errhandler_function * win_errhandler_fn, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_create_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_create_errhandler - Create an error handler for use with MPI window + objects +@@ -98,12 +94,12 @@ int MPI_Win_create_errhandler(MPI_Win_errhandler_function * win_errhandler_fn, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_create_errhandler", "**mpi_win_create_errhandler %p %p", + win_errhandler_fn, errhandler); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/errhan/win_get_errhandler.c ++++ b/src/mpi/errhan/win_get_errhandler.c +@@ -28,10 +28,6 @@ int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler * errhandler) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_get_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_get_errhandler - Get the error handler for the MPI RMA window + +@@ -119,11 +115,11 @@ int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler * errhandler) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_get_errhandler", "**mpi_win_get_errhandler %W %p", win, + errhandler); + } +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/errhan/win_set_errhandler.c ++++ b/src/mpi/errhan/win_set_errhandler.c +@@ -28,10 +28,6 @@ int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_set_errhandler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_set_errhandler - Set window error handler + +@@ -89,9 +85,9 @@ int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) + /* Also check for a valid errhandler kind */ + if (!mpi_errno) { + if (errhan_ptr->kind != MPIR_WIN) { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, +- __LINE__, MPI_ERR_ARG, "**errhandnotwin", +- NULL); ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, ++ __LINE__, MPI_ERR_ARG, "**errhandnotwin", NULL); + } + } + } +@@ -131,11 +127,11 @@ int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_set_errhandler", "**mpi_win_set_errhandler %W %E", win, + errhandler); + } +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/group/group_compare.c ++++ b/src/mpi/group/group_compare.c +@@ -78,10 +78,6 @@ int MPIR_Group_compare_impl(MPIR_Group * group_ptr1, MPIR_Group * group_ptr2, in + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_compare +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Group_compare - Compares two groups +@@ -169,11 +165,11 @@ int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_compare", "**mpi_group_compare %G %G %p", group1, + group2, result); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_difference.c ++++ b/src/mpi/group/group_difference.c +@@ -27,10 +27,6 @@ int MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group * newgrou + #undef MPI_Group_difference + #define MPI_Group_difference PMPI_Group_difference + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_difference_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_difference_impl(MPIR_Group * group_ptr1, MPIR_Group * group_ptr2, + MPIR_Group ** new_group_ptr) + { +@@ -105,10 +101,6 @@ int MPIR_Group_difference_impl(MPIR_Group * group_ptr1, MPIR_Group * group_ptr2, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_difference +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -201,12 +193,12 @@ int MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group * newgrou + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_difference", "**mpi_group_difference %G %G %p", + group1, group2, newgroup); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_excl.c ++++ b/src/mpi/group/group_excl.c +@@ -27,10 +27,6 @@ int MPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group * newgro + #undef MPI_Group_excl + #define MPI_Group_excl PMPI_Group_excl + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_excl_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_excl_impl(MPIR_Group * group_ptr, int n, const int ranks[], + MPIR_Group ** new_group_ptr) + { +@@ -81,10 +77,6 @@ int MPIR_Group_excl_impl(MPIR_Group * group_ptr, int n, const int ranks[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_excl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -184,12 +176,12 @@ int MPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group * newgro + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_excl", "**mpi_group_excl %G %d %p %p", group, n, + ranks, newgroup); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_free.c ++++ b/src/mpi/group/group_free.c +@@ -25,10 +25,6 @@ int MPI_Group_free(MPI_Group * group) __attribute__ ((weak, alias("PMPI_Group_fr + #undef MPI_Group_free + #define MPI_Group_free PMPI_Group_free + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_free_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_free_impl(MPIR_Group * group_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -48,10 +44,6 @@ int MPIR_Group_free_impl(MPIR_Group * group_ptr) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Group_free - Frees a group +@@ -109,7 +101,7 @@ int MPI_Group_free(MPI_Group * group) + * because otherwise many tests fail */ + if ((HANDLE_GET_KIND(*group) == HANDLE_KIND_BUILTIN) && *group != MPI_GROUP_EMPTY) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_GROUP, "**groupperm", 0); + } + if (mpi_errno) +@@ -138,11 +130,11 @@ int MPI_Group_free(MPI_Group * group) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_free", "**mpi_group_free %p", group); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_incl.c ++++ b/src/mpi/group/group_incl.c +@@ -27,10 +27,6 @@ int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group * newgro + #undef MPI_Group_incl + #define MPI_Group_incl PMPI_Group_incl + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_incl_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_incl_impl(MPIR_Group * group_ptr, int n, const int ranks[], + MPIR_Group ** new_group_ptr) + { +@@ -71,10 +67,6 @@ int MPIR_Group_incl_impl(MPIR_Group * group_ptr, int n, const int ranks[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_incl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -173,12 +165,12 @@ int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group * newgro + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_incl", "**mpi_group_incl %G %d %p %p", group, n, + ranks, newgroup); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_intersection.c ++++ b/src/mpi/group/group_intersection.c +@@ -27,10 +27,6 @@ int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group * newgr + #undef MPI_Group_intersection + #define MPI_Group_intersection PMPI_Group_intersection + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_intersection_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_intersection_impl(MPIR_Group * group_ptr1, MPIR_Group * group_ptr2, + MPIR_Group ** new_group_ptr) + { +@@ -105,10 +101,6 @@ int MPIR_Group_intersection_impl(MPIR_Group * group_ptr1, MPIR_Group * group_ptr + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_intersection +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -203,12 +195,12 @@ int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group * newgr + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_intersection", "**mpi_group_intersection %G %G %p", + group1, group2, newgroup); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_range_excl.c ++++ b/src/mpi/group/group_range_excl.c +@@ -26,10 +26,6 @@ int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group * ne + #ifndef MPICH_MPI_FROM_PMPI + #undef MPI_Group_range_excl + #define MPI_Group_range_excl PMPI_Group_range_excl +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_range_excl_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_range_excl_impl(MPIR_Group * group_ptr, int n, int ranges[][3], + MPIR_Group ** new_group_ptr) + { +@@ -115,10 +111,6 @@ int MPIR_Group_range_excl_impl(MPIR_Group * group_ptr, int n, int ranges[][3], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_range_excl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -221,12 +213,12 @@ int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group * ne + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_range_excl", "**mpi_group_range_excl %G %d %p %p", + group, n, ranges, newgroup); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_range_incl.c ++++ b/src/mpi/group/group_range_incl.c +@@ -27,10 +27,6 @@ int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group * ne + #undef MPI_Group_range_incl + #define MPI_Group_range_incl PMPI_Group_range_incl + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_range_incl_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_range_incl_impl(MPIR_Group * group_ptr, int n, int ranges[][3], + MPIR_Group ** new_group_ptr) + { +@@ -99,10 +95,6 @@ int MPIR_Group_range_incl_impl(MPIR_Group * group_ptr, int n, int ranges[][3], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_range_incl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -197,12 +189,12 @@ int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group * ne + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_range_incl", "**mpi_group_range_incl %G %d %p %p", + group, n, ranges, newgroup); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_rank.c ++++ b/src/mpi/group/group_rank.c +@@ -27,10 +27,6 @@ int MPI_Group_rank(MPI_Group group, int *rank) __attribute__ ((weak, alias("PMPI + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_rank +-#undef FCNAME +-#define FCNAME "MPI_Group_rank" + + /*@ + +@@ -109,10 +105,10 @@ int MPI_Group_rank(MPI_Group group, int *rank) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_rank", "**mpi_group_rank %G %p", group, rank); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/group/group_size.c ++++ b/src/mpi/group/group_size.c +@@ -27,10 +27,6 @@ int MPI_Group_size(MPI_Group group, int *size) __attribute__ ((weak, alias("PMPI + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_size +-#undef FCNAME +-#define FCNAME "MPI_Group_size" + + /*@ + +@@ -108,10 +104,10 @@ int MPI_Group_size(MPI_Group group, int *size) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_size", "**mpi_group_size %G %p", group, size); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/group/group_translate_ranks.c ++++ b/src/mpi/group/group_translate_ranks.c +@@ -28,10 +28,6 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[], MPI_G + #undef MPI_Group_translate_ranks + #define MPI_Group_translate_ranks PMPI_Group_translate_ranks + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_translate_ranks_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_translate_ranks_impl(MPIR_Group * gp1, int n, const int ranks1[], + MPIR_Group * gp2, int ranks2[]) + { +@@ -107,10 +103,6 @@ int MPIR_Group_translate_ranks_impl(MPIR_Group * gp1, int n, const int ranks1[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_translate_ranks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Group_translate_ranks - Translates the ranks of processes in one group to + those in another group +@@ -185,7 +177,7 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[], + for (i = 0; i < n; i++) { + if ((ranks1[i] < 0 && ranks1[i] != MPI_PROC_NULL) || ranks1[i] >= size1) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_RANK, + "**rank", "**rank %d %d", + ranks1[i], size1); +@@ -216,12 +208,12 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[], + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_translate_ranks", + "**mpi_group_translate_ranks %G %d %p %G %p", group1, n, ranks1, + group2, ranks2); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/group_union.c ++++ b/src/mpi/group/group_union.c +@@ -27,10 +27,6 @@ int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup) + #undef MPI_Group_union + #define MPI_Group_union PMPI_Group_union + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_union_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Group_union_impl(MPIR_Group * group_ptr1, MPIR_Group * group_ptr2, + MPIR_Group ** new_group_ptr) + { +@@ -140,10 +136,6 @@ int MPIR_Group_union_impl(MPIR_Group * group_ptr1, MPIR_Group * group_ptr2, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Group_union +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + +@@ -233,12 +225,12 @@ int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_group_union", "**mpi_group_union %G %G %p", group1, group2, + newgroup); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/group/grouputil.c ++++ b/src/mpi/group/grouputil.c +@@ -12,10 +12,8 @@ + #endif + + /* Preallocated group objects */ +-MPIR_Group MPIR_Group_builtin[MPIR_GROUP_N_BUILTIN] = { {0} +-}; +-MPIR_Group MPIR_Group_direct[MPID_GROUP_PREALLOC] = { {0} +-}; ++MPIR_Group MPIR_Group_builtin[MPIR_GROUP_N_BUILTIN]; ++MPIR_Group MPIR_Group_direct[MPID_GROUP_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Group_mem = { 0, 0, 0, 0, MPIR_GROUP, + sizeof(MPIR_Group), MPIR_Group_direct, +@@ -61,7 +59,6 @@ int MPIR_Group_release(MPIR_Group * group_ptr) + * Allocate a new group and the group lrank to lpid array. Does *not* + * initialize any arrays, but does set the reference count. + */ +-#define FCNAME "MPIR_Group_create" + int MPIR_Group_create(int nproc, MPIR_Group ** new_group_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -226,10 +223,6 @@ void MPIR_Group_setup_lpid_pairs(MPIR_Group * group_ptr1, MPIR_Group * group_ptr + * The following routines are needed only for error checking + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_check_valid_ranks +-#undef FCNAME +-#define FCNAME "MPIR_Group_check_valid_ranks" + /* + * This routine is for error checking for a valid ranks array, used + * by Group_incl and Group_excl. +@@ -248,14 +241,14 @@ int MPIR_Group_check_valid_ranks(MPIR_Group * group_ptr, const int ranks[], int + for (i = 0; i < n; i++) { + if (ranks[i] < 0 || ranks[i] >= group_ptr->size) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_RANK, "**rankarray", "**rankarray %d %d %d", i, + ranks[i], group_ptr->size - 1); + break; + } + if (group_ptr->lrank_to_lpid[ranks[i]].flag) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_RANK, "**rankdup", "**rankdup %d %d %d", i, ranks[i], + group_ptr->lrank_to_lpid[ranks[i]].flag - 1); + break; +@@ -273,10 +266,6 @@ int MPIR_Group_check_valid_ranks(MPIR_Group * group_ptr, const int ranks[], int + be within the SINGLE_CS (the routines are group_range_incl and + group_range_excl) */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Group_check_valid_ranges +-#undef FCNAME +-#define FCNAME "MPIR_Group_check_valid_ranges" + int MPIR_Group_check_valid_ranges(MPIR_Group * group_ptr, int ranges[][3], int n) + { + int i, j, size, first, last, stride, mpi_errno = MPI_SUCCESS; +@@ -300,14 +289,14 @@ int MPIR_Group_check_valid_ranges(MPIR_Group * group_ptr, int ranges[][3], int n + stride = ranges[i][2]; + if (first < 0 || first >= size) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_ARG, "**rangestartinvalid", + "**rangestartinvalid %d %d %d", i, first, size); + break; + } + if (stride == 0) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_ARG, "**stridezero", 0); + break; + } +@@ -322,14 +311,14 @@ int MPIR_Group_check_valid_ranges(MPIR_Group * group_ptr, int ranges[][3], int n + /* Use last instead of act_last in the error message since + * the last value is the one that the user provided */ + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_ARG, "**rangeendinvalid", "**rangeendinvalid %d %d %d", + i, last, size); + break; + } + if ((stride > 0 && first > last) || (stride < 0 && first < last)) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_ARG, "**stride", "**stride %d %d %d", first, last, + stride); + break; +@@ -340,7 +329,7 @@ int MPIR_Group_check_valid_ranges(MPIR_Group * group_ptr, int ranges[][3], int n + for (j = first; j <= last; j += stride) { + if (group_ptr->lrank_to_lpid[j].flag) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_ARG, "**rangedup", "**rangedup %d %d %d", j, i, + group_ptr->lrank_to_lpid[j].flag - 1); + break; +@@ -351,7 +340,7 @@ int MPIR_Group_check_valid_ranges(MPIR_Group * group_ptr, int ranges[][3], int n + for (j = first; j >= last; j += stride) { + if (group_ptr->lrank_to_lpid[j].flag) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_ARG, "**rangedup", "**rangedup %d %d %d", j, i, + group_ptr->lrank_to_lpid[j].flag - 1); + break; +--- a/src/mpi/info/info_create.c ++++ b/src/mpi/info/info_create.c +@@ -26,10 +26,6 @@ int MPI_Info_create(MPI_Info * info) __attribute__ ((weak, alias("PMPI_Info_crea + #define MPI_Info_create PMPI_Info_create + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Info_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Info_create - Creates a new info object + +@@ -89,11 +85,11 @@ int MPI_Info_create(MPI_Info * info) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_create", "**mpi_info_create %p", info); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/info/info_delete.c ++++ b/src/mpi/info/info_delete.c +@@ -27,10 +27,6 @@ int MPI_Info_delete(MPI_Info info, const char *key) + #define MPI_Info_delete PMPI_Info_delete + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Info_delete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Info_delete - Deletes a (key,value) pair from info + +@@ -127,11 +123,11 @@ int MPI_Info_delete(MPI_Info info, const char *key) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_delete", "**mpi_info_delete %I %s", info, key); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/info/info_dup.c ++++ b/src/mpi/info/info_dup.c +@@ -27,10 +27,6 @@ int MPI_Info_dup(MPI_Info info, MPI_Info * newinfo) __attribute__ ((weak, alias( + #undef MPI_Info_dup + #define MPI_Info_dup PMPI_Info_dup + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Info_dup_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Info_dup_impl(MPIR_Info * info_ptr, MPIR_Info ** new_info_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -72,10 +68,6 @@ int MPIR_Info_dup_impl(MPIR_Info * info_ptr, MPIR_Info ** new_info_ptr) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Info_dup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Info_dup - Returns a duplicate of the info object + +@@ -151,11 +143,11 @@ int MPI_Info_dup(MPI_Info info, MPI_Info * newinfo) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_dup", "**mpi_info_dup %I %p", info, newinfo); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/info/info_free.c ++++ b/src/mpi/info/info_free.c +@@ -26,10 +26,6 @@ int MPI_Info_free(MPI_Info * info) __attribute__ ((weak, alias("PMPI_Info_free") + #define MPI_Info_free PMPI_Info_free + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Info_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Info_free - Frees an info object + +@@ -103,10 +99,10 @@ int MPI_Info_free(MPI_Info * info) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_free", "**mpi_info_free %p", info); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/info/info_get.c ++++ b/src/mpi/info/info_get.c +@@ -26,10 +26,6 @@ int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int + #undef MPI_Info_get + #define MPI_Info_get PMPI_Info_get + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Info_get_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Info_get_impl(MPIR_Info * info_ptr, const char *key, int valuelen, char *value, int *flag) + { + MPIR_Info *curr_ptr; +@@ -54,7 +50,7 @@ int MPIR_Info_get_impl(MPIR_Info * info_ptr, const char *key, int valuelen, char + /* --BEGIN ERROR HANDLING-- */ + if (err != 0) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_INFO_VALUE, "**infovallong", NULL); + } + /* --END ERROR HANDLING-- */ +@@ -88,10 +84,6 @@ Output Parameters: + .N MPI_ERR_ARG + .N MPI_ERR_INFO_VALUE + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPI_Info_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int *flag) + { + MPIR_Info *info_ptr = 0; +@@ -161,12 +153,12 @@ int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_get", + "**mpi_info_get %I %s %d %p %p", info, key, valuelen, + value, flag); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + #endif + goto fn_exit; + /* --END ERROR HANDLING-- */ +--- a/src/mpi/info/info_getn.c ++++ b/src/mpi/info/info_getn.c +@@ -26,10 +26,6 @@ int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) + #undef MPI_Info_get_nkeys + #define MPI_Info_get_nkeys PMPI_Info_get_nkeys + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Info_get_nkeys_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Info_get_nkeys_impl(MPIR_Info * info_ptr, int *nkeys) + { + int n; +@@ -66,10 +62,6 @@ Output Parameters: + .N MPI_SUCCESS + .N MPI_ERR_OTHER + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPI_Info_get_nkeys +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) + { + MPIR_Info *info_ptr = 0; +@@ -128,10 +120,10 @@ int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_get_nkeys", "**mpi_info_get_nkeys %I %p", info, nkeys); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/info/info_getnth.c ++++ b/src/mpi/info/info_getnth.c +@@ -26,10 +26,6 @@ int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) + #undef MPI_Info_get_nthkey + #define MPI_Info_get_nthkey PMPI_Info_get_nthkey + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Info_get_nthkey_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Info_get_nthkey_impl(MPIR_Info * info_ptr, int n, char *key) + { + int mpi_errno = MPI_SUCCESS; +@@ -80,10 +76,6 @@ Output Parameters: + .N MPI_ERR_OTHER + .N MPI_ERR_ARG + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPI_Info_get_nthkey +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) + { + int mpi_errno = MPI_SUCCESS; +@@ -141,12 +133,12 @@ int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_get_nthkey", "**mpi_info_get_nthkey %I %d %p", info, n, + key); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/info/info_getvallen.c ++++ b/src/mpi/info/info_getvallen.c +@@ -26,10 +26,6 @@ int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *fl + #undef MPI_Info_get_valuelen + #define MPI_Info_get_valuelen PMPI_Info_get_valuelen + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Info_get_valuelen_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Info_get_valuelen_impl(MPIR_Info * info_ptr, const char *key, int *valuelen, int *flag) + { + MPIR_Info *curr_ptr; +@@ -72,10 +68,6 @@ Output Parameters: + .N MPI_ERR_INFO_KEY + .N MPI_ERR_OTHER + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPIRInfo_get_valuelen +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *flag) + { + MPIR_Info *info_ptr = 0; +@@ -144,11 +136,11 @@ int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *fl + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_get_valuelen", "**mpi_info_get_valuelen %I %s %p %p", + info, key, valuelen, flag); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/info/info_set.c ++++ b/src/mpi/info/info_set.c +@@ -29,10 +29,6 @@ int MPI_Info_set(MPI_Info info, const char *key, const char *value) + #define MPI_Info_set PMPI_Info_set + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Info_set +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Info_set - Adds a (key,value) pair to info + +@@ -120,10 +116,10 @@ int MPI_Info_set(MPI_Info info, const char *key, const char *value) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_info_set", "**mpi_info_set %I %s %s", info, key, value); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +@@ -132,10 +128,6 @@ int MPI_Info_set(MPI_Info info, const char *key, const char *value) + + #ifndef MPICH_MPI_FROM_PMPI + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Info_set_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Info_set_impl(MPIR_Info * info_ptr, const char *key, const char *value) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/info/infoutil.c ++++ b/src/mpi/info/infoutil.c +@@ -15,10 +15,8 @@ + #endif + + /* Preallocated info objects */ +-MPIR_Info MPIR_Info_builtin[MPIR_INFO_N_BUILTIN] = { {0} +-}; +-MPIR_Info MPIR_Info_direct[MPIR_INFO_PREALLOC] = { {0} +-}; ++MPIR_Info MPIR_Info_builtin[MPIR_INFO_N_BUILTIN]; ++MPIR_Info MPIR_Info_direct[MPIR_INFO_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Info_mem = { 0, 0, 0, 0, MPIR_INFO, + sizeof(MPIR_Info), MPIR_Info_direct, +@@ -27,10 +25,6 @@ MPIR_Object_alloc_t MPIR_Info_mem = { 0, 0, 0, 0, MPIR_INFO, + + /* Free an info structure. In the multithreaded case, this routine + relies on the SINGLE_CS in the info routines (particularly MPI_Info_free) */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Info_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Info_free(MPIR_Info * info_ptr) + { + MPIR_Info *curr_ptr, *last_ptr; +@@ -54,10 +48,6 @@ void MPIR_Info_free(MPIR_Info * info_ptr) + /* Allocate and initialize an MPIR_Info object. + * + * Returns MPICH error codes */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Info_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Info_alloc(MPIR_Info ** info_p_p) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/init/abort.c ++++ b/src/mpi/init/abort.c +@@ -46,10 +46,6 @@ int MPI_Abort(MPI_Comm comm, int errorcode) __attribute__ ((weak, alias("PMPI_Ab + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Abort +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Abort - Terminates MPI execution environment + +@@ -75,8 +71,6 @@ int MPI_Abort(MPI_Comm comm, int errorcode) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Comm *comm_ptr = NULL; +- /* FIXME: 100 is arbitrary and may not be long enough */ +- char abort_str[100] = "", comm_name[MPI_MAX_OBJECT_NAME]; + int len = MPI_MAX_OBJECT_NAME; + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_ABORT); + +@@ -125,15 +119,17 @@ int MPI_Abort(MPI_Comm comm, int errorcode) + comm_ptr = MPIR_Process.comm_self; + } + +- ++ char abort_str[MPI_MAX_OBJECT_NAME + 100] = ""; ++ char comm_name[MPI_MAX_OBJECT_NAME]; + MPIR_Comm_get_name_impl(comm_ptr, comm_name, &len); + if (len == 0) { + MPL_snprintf(comm_name, MPI_MAX_OBJECT_NAME, "comm=0x%X", comm); + } + if (!MPIR_CVAR_SUPPRESS_ABORT_MESSAGE) + /* FIXME: This is not internationalized */ +- MPL_snprintf(abort_str, 100, "application called MPI_Abort(%s, %d) - process %d", comm_name, +- errorcode, comm_ptr->rank); ++ MPL_snprintf(abort_str, sizeof(abort_str), ++ "application called MPI_Abort(%s, %d) - process %d", comm_name, errorcode, ++ comm_ptr->rank); + mpi_errno = MPID_Abort(comm_ptr, mpi_errno, errorcode, abort_str); + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) +@@ -155,11 +151,11 @@ int MPI_Abort(MPI_Comm comm, int errorcode) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_abort", "**mpi_abort %C %d", comm, errorcode); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/init/async.c ++++ b/src/mpi/init/async.c +@@ -20,10 +20,6 @@ static volatile int progress_thread_done = 0; + * for communicating with the progress thread. */ + #define WAKE_TAG 100 + +-#undef FUNCNAME +-#define FUNCNAME progress_fn +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void progress_fn(void *data) + { + int mpi_errno = MPI_SUCCESS; +@@ -71,10 +67,6 @@ static void progress_fn(void *data) + + #endif /* MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Init_async_thread +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Init_async_thread(void) + { + #if MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE +@@ -115,10 +107,6 @@ int MPIR_Init_async_thread(void) + #endif /* MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Finalize_async_thread +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Finalize_async_thread(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/init/finalize.c ++++ b/src/mpi/init/finalize.c +@@ -127,10 +127,6 @@ PMPI_LOCAL void MPIR_Call_finalize_callbacks(int, int); + #endif + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Finalize - Terminates MPI execution environment + +@@ -167,14 +163,12 @@ int MPI_Finalize(void) + #ifdef HAVE_NETLOC + switch (MPIR_Process.network_attr.type) { + case MPIR_NETLOC_NETWORK_TYPE__TORUS: +- if (MPIR_Process.network_attr.u.torus.geometry != NULL) +- MPL_free(MPIR_Process.network_attr.u.torus.geometry); ++ MPL_free(MPIR_Process.network_attr.u.torus.geometry); + break; + case MPIR_NETLOC_NETWORK_TYPE__FAT_TREE: + case MPIR_NETLOC_NETWORK_TYPE__CLOS_NETWORK: + default: +- if (MPIR_Process.network_attr.u.tree.node_levels != NULL) +- MPL_free(MPIR_Process.network_attr.u.tree.node_levels); ++ MPL_free(MPIR_Process.network_attr.u.tree.node_levels); + break; + } + #endif +@@ -337,6 +331,16 @@ int MPI_Finalize(void) + } + #endif + ++#if defined(MPICH_IS_THREADED) ++ /* Finalize the threading library after releasing all synchronization ++ * objects (e.g., mutexes) */ ++ { ++ int thread_err; ++ MPL_thread_finalize(&thread_err); ++ MPIR_Assert(thread_err == 0); ++ } ++#endif ++ + /* ... end of body of routine ... */ + fn_exit: + MPIR_FUNC_TERSE_FINALIZE_EXIT(MPID_STATE_MPI_FINALIZE); +@@ -347,10 +351,10 @@ int MPI_Finalize(void) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**mpi_finalize", 0); ++ __func__, __LINE__, MPI_ERR_OTHER, "**mpi_finalize", 0); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + if (OPA_load_int(&MPIR_Process.mpich_state) < MPICH_MPI_STATE__POST_FINALIZED) { + MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + } +--- a/src/mpi/init/finalized.c ++++ b/src/mpi/init/finalized.c +@@ -25,10 +25,6 @@ int MPI_Finalized(int *flag) __attribute__ ((weak, alias("PMPI_Finalized"))); + #define MPI_Finalized PMPI_Finalized + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Finalized +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Finalized - Indicates whether 'MPI_Finalize' has been called. + +@@ -82,12 +78,12 @@ int MPI_Finalized(int *flag) + if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__IN_INIT || + OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_INIT) { + { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_finalized", + "**mpi_finalized %p", flag); + } + +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + } + goto fn_exit; + #endif +--- a/src/mpi/init/init.c ++++ b/src/mpi/init/init.c +@@ -79,10 +79,6 @@ int MPI_Init(int *argc, char ***argv) __attribute__ ((weak, alias("PMPI_Init"))) + int MPIR_async_thread_initialized = 0; + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Init - Initialize the MPI execution environment + +@@ -137,7 +133,7 @@ int MPI_Init(int *argc, char ***argv) + { + if (OPA_load_int(&MPIR_Process.mpich_state) != MPICH_MPI_STATE__PRE_INIT) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**inittwice", NULL); + } + if (mpi_errno) +@@ -207,11 +203,11 @@ int MPI_Init(int *argc, char ***argv) + #ifdef HAVE_ERROR_REPORTING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_init", "**mpi_init %p %p", argc, argv); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + return mpi_errno; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/init/initialized.c ++++ b/src/mpi/init/initialized.c +@@ -25,10 +25,6 @@ int MPI_Initialized(int *flag) __attribute__ ((weak, alias("PMPI_Initialized"))) + #define MPI_Initialized PMPI_Initialized + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Initialized +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Initialized - Indicates whether 'MPI_Init' has been called. + +@@ -82,12 +78,12 @@ int MPI_Initialized(int *flag) + if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__IN_INIT || + OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_INIT) { + { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_initialized", + "**mpi_initialized %p", flag); + } + +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + } + goto fn_exit; + #endif +--- a/src/mpi/init/initthread.c ++++ b/src/mpi/init/initthread.c +@@ -98,8 +98,8 @@ MPIR_Process_t MPIR_Process = { OPA_INT_T_INITIALIZER(MPICH_MPI_STATE__PRE_INIT) + /* all other fields in MPIR_Process are irrelevant */ + MPIR_Thread_info_t MPIR_ThreadInfo = { 0 }; + +-#if defined(MPICH_IS_THREADED) && defined(MPL_TLS_SPECIFIER) +-MPL_TLS_SPECIFIER MPIR_Per_thread_t MPIR_Per_thread = { 0 }; ++#if defined(MPICH_IS_THREADED) && defined(MPL_TLS) ++MPL_TLS MPIR_Per_thread_t MPIR_Per_thread = { 0 }; + #else + MPIR_Per_thread_t MPIR_Per_thread = { 0 }; + #endif +@@ -187,7 +187,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) + + #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL || \ + MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ || \ +- MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++ MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + MPID_Thread_mutex_t MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX; + #endif + +@@ -199,15 +199,11 @@ MPID_Thread_mutex_t MPIR_THREAD_POBJ_CTX_MUTEX; + MPID_Thread_mutex_t MPIR_THREAD_POBJ_PMI_MUTEX; + #endif + +-#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + MPID_Thread_mutex_t MPIR_THREAD_POBJ_HANDLE_MUTEX; + #endif + + /* These routine handle any thread initialization that my be required */ +-#undef FUNCNAME +-#define FUNCNAME thread_cs_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int thread_cs_init(void) + { + int err; +@@ -232,7 +228,7 @@ static int thread_cs_init(void) + MPID_Thread_mutex_create(&MPIR_THREAD_POBJ_PMI_MUTEX, &err); + MPIR_Assert(err == 0); + +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + MPID_Thread_mutex_create(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err); + MPIR_Assert(err == 0); + MPID_Thread_mutex_create(&MPIR_THREAD_POBJ_HANDLE_MUTEX, &err); +@@ -256,10 +252,6 @@ static int thread_cs_init(void) + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Thread_CS_Finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Thread_CS_Finalize(void) + { + int err; +@@ -286,7 +278,7 @@ int MPIR_Thread_CS_Finalize(void) + MPID_Thread_mutex_destroy(&MPIR_THREAD_POBJ_PMI_MUTEX, &err); + MPIR_Assert(err == 0); + +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + MPID_Thread_mutex_destroy(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err); + MPIR_Assert(err == 0); + MPID_Thread_mutex_destroy(&MPIR_THREAD_POBJ_HANDLE_MUTEX, &err); +@@ -344,10 +336,6 @@ MPL_dbg_class MPIR_DBG_ASSERT; + MPL_dbg_class MPIR_DBG_STRING; + #endif /* MPL_USE_DBG_LOGGING */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Init_thread +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Init_thread(int *argc, char ***argv, int required, int *provided) + { + int mpi_errno = MPI_SUCCESS; +@@ -356,14 +344,17 @@ int MPIR_Init_thread(int *argc, char ***argv, int required, int *provided) + int thread_provided = 0; + int exit_init_cs_on_failure = 0; + MPIR_Info *info_ptr; ++#if defined(MPICH_IS_THREADED) ++ bool cs_initialized = false; + +-#if (MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_ARGOBOTS) +- int rc = ABT_initialized(); +- if (rc != ABT_SUCCESS) { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- "MPI_Init_thread", __LINE__, MPI_ERR_OTHER, +- "**argobots_uninitialized", 0); +- goto fn_fail; ++ /* The threading library must be initialized at the very beginning because ++ * it manages all synchronization objects (e.g., mutexes) that will be ++ * initialized later */ ++ { ++ int thread_err; ++ MPL_thread_init(&thread_err); ++ if (thread_err) ++ goto fn_fail; + } + #endif + +@@ -401,6 +392,7 @@ int MPIR_Init_thread(int *argc, char ***argv, int required, int *provided) + + #if defined(MPICH_IS_THREADED) + mpi_errno = thread_cs_init(); ++ cs_initialized = true; + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + #endif +@@ -560,15 +552,17 @@ int MPIR_Init_thread(int *argc, char ***argv, int required, int *provided) + /* Set the number of tag bits. The device may override this value. */ + MPIR_Process.tag_bits = MPIR_TAG_BITS_DEFAULT; + +- mpi_errno = MPID_Init(argc, argv, required, &thread_provided, &has_args, &has_env); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- + /* Create complete request to return in the event of immediately complete + * operations. Use a SEND request to cover all possible use-cases. */ + MPIR_Process.lw_req = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); ++ MPIR_ERR_CHKANDSTMT(MPIR_Process.lw_req == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, ++ "**nomemreq"); + MPIR_cc_set(&MPIR_Process.lw_req->cc, 0); + ++ mpi_errno = MPID_Init(argc, argv, required, &thread_provided, &has_args, &has_env); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + /* Initialize collectives infrastructure */ + mpi_errno = MPII_Coll_init(); + if (mpi_errno) +@@ -673,17 +667,15 @@ int MPIR_Init_thread(int *argc, char ***argv, int required, int *provided) + MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + } + #if defined(MPICH_IS_THREADED) +- MPIR_Thread_CS_Finalize(); ++ if (cs_initialized) { ++ MPIR_Thread_CS_Finalize(); ++ } + #endif + return mpi_errno; + /* --END ERROR HANDLING-- */ + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Init_thread +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Init_thread - Initialize the MPI execution environment + +@@ -799,12 +791,12 @@ int MPI_Init_thread(int *argc, char ***argv, int required, int *provided) + #ifdef HAVE_ERROR_REPORTING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_init_thread", "**mpi_init_thread %p %p %d %p", argc, argv, + required, provided); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + MPIR_FUNC_TERSE_INIT_EXIT(MPID_STATE_MPI_INIT_THREAD); + + MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); +--- a/src/mpi/init/ismain.c ++++ b/src/mpi/init/ismain.c +@@ -25,10 +25,6 @@ int MPI_Is_thread_main(int *flag) __attribute__ ((weak, alias("PMPI_Is_thread_ma + #define MPI_Is_thread_main PMPI_Is_thread_main + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Is_thread_main +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Is_thread_main - Returns a flag indicating whether this thread called + 'MPI_Init' or 'MPI_Init_thread' +@@ -87,11 +83,11 @@ int MPI_Is_thread_main(int *flag) + #ifdef HAVE_ERROR_CHECKING + fn_fail: + { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_is_thread_main", + "**mpi_is_thread_main %p", flag); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/init/netloc_util.c ++++ b/src/mpi/init/netloc_util.c +@@ -24,10 +24,6 @@ typedef struct tree { + int num_edges; + } tree; + +-#undef FUNCNAME +-#define FUNCNAME get_tree_attributes +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int get_tree_attributes(netloc_topology_t topology, + MPIR_Netloc_network_attributes * network_attr) + { +@@ -311,12 +307,8 @@ static int get_tree_attributes(netloc_topology_t topology, + fn_exit: + MPIR_CHKPMEM_COMMIT(); + MPIR_CHKPMEM_REAP(); +- if (host_nodes != NULL) { +- MPL_free(host_nodes); +- } +- if (nodes != NULL) { +- MPL_free(nodes); +- } ++ MPL_free(host_nodes); ++ MPL_free(nodes); + return mpi_errno; + + fn_fail: +@@ -771,15 +763,9 @@ static void find_augmenting_path(netloc_topology_t topology, netloc_node_t *** n + } + + fn_exit: +- if (forest != NULL) { +- MPL_free(forest); +- } +- if (unmarked_vertices != NULL) { +- MPL_free(unmarked_vertices); +- } +- if (unmarked_edges != NULL) { +- MPL_free(unmarked_edges); +- } ++ MPL_free(forest); ++ MPL_free(unmarked_vertices); ++ MPL_free(unmarked_edges); + *augmenting_path = current_augmenting_path; + *augmenting_path_length = path_length; + return; +@@ -850,9 +836,7 @@ static void find_maximum_matching(netloc_topology_t topology, netloc_node_t *** + } + + fn_exit: +- if (augmenting_path != NULL) { +- MPL_free(augmenting_path); +- } ++ MPL_free(augmenting_path); + return; + } + +@@ -1452,21 +1436,11 @@ static int get_torus_attributes(netloc_topology_t topology, + } + + cleanup: +- if (traversal_order != NULL) { +- MPL_free(traversal_order); +- } +- if (hypercube_labels != NULL) { +- MPL_free(hypercube_labels); +- } +- if (semicube_edges != NULL) { +- MPL_free(semicube_edges); +- } +- if (semicube_vertices != NULL) { +- MPL_free(semicube_vertices); +- } +- if (maximum_matching != NULL) { +- MPL_free(maximum_matching); +- } ++ MPL_free(traversal_order); ++ MPL_free(hypercube_labels); ++ MPL_free(semicube_edges); ++ MPL_free(semicube_vertices); ++ MPL_free(maximum_matching); + } else { + network_attr->type = MPIR_NETLOC_NETWORK_TYPE__INVALID; + } +@@ -1478,10 +1452,6 @@ static int get_torus_attributes(netloc_topology_t topology, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Netloc_parse_topology +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Netloc_parse_topology(netloc_topology_t netloc_topology, + MPIR_Netloc_network_attributes * network_attr) + { +@@ -1527,10 +1497,6 @@ static int get_physical_address(hwloc_obj_t hwloc_obj, char **device_physical_ad + + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Netloc_get_network_end_point +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Netloc_get_network_end_point(MPIR_Netloc_network_attributes network_attributes, + netloc_topology_t netloc_topology, + hwloc_topology_t hwloc_topology, netloc_node_t ** end_point) +@@ -1580,9 +1546,7 @@ int MPIR_Netloc_get_network_end_point(MPIR_Netloc_network_attributes network_att + } + + fn_exit: +- if (host_nodes != NULL) { +- MPL_free(host_nodes); +- } ++ MPL_free(host_nodes); + *end_point = node_end_point; + return mpi_errno; + +@@ -1590,10 +1554,6 @@ int MPIR_Netloc_get_network_end_point(MPIR_Netloc_network_attributes network_att + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Netloc_get_hostnode_index_in_tree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Netloc_get_hostnode_index_in_tree(MPIR_Netloc_network_attributes attributes, + netloc_topology_t topology, + netloc_node_t * network_endpoint, +@@ -1665,10 +1625,6 @@ int MPIR_Netloc_get_hostnode_index_in_tree(MPIR_Netloc_network_attributes attrib + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Netloc_get_switches_at_level +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Netloc_get_switches_at_level(netloc_topology_t topology, + MPIR_Netloc_network_attributes attributes, int level, + netloc_node_t *** switches_at_level, int *switch_count) +@@ -1705,12 +1661,8 @@ int MPIR_Netloc_get_switches_at_level(netloc_topology_t topology, + } + + fn_exit: +- if (switches != NULL) { +- MPL_free(switches); +- } +- if (switch_nodes != NULL) { +- MPL_free(switch_nodes); +- } ++ MPL_free(switches); ++ MPL_free(switch_nodes); + *switches_at_level = switches; + *switch_count = i; + return mpi_errno; +--- a/src/mpi/init/querythread.c ++++ b/src/mpi/init/querythread.c +@@ -25,10 +25,6 @@ int MPI_Query_thread(int *provided) __attribute__ ((weak, alias("PMPI_Query_thre + #define MPI_Query_thread PMPI_Query_thread + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Query_thread +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Query_thread - Return the level of thread support provided by the MPI + library +@@ -95,10 +91,10 @@ int MPI_Query_thread(int *provided) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_query_thread", "**mpi_query_thread %p", provided); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/misc/aint_add.c ++++ b/src/mpi/misc/aint_add.c +@@ -27,8 +27,6 @@ MPI_Aint MPI_Aint_add(MPI_Aint base, MPI_Aint disp) __attribute__ ((weak, alias( + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Aint_add + + /*@ + MPI_Aint_add - Returns the sum of base and disp +--- a/src/mpi/misc/aint_diff.c ++++ b/src/mpi/misc/aint_diff.c +@@ -28,8 +28,6 @@ MPI_Aint MPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Aint_diff + + /*@ + MPI_Aint_diff - Returns the difference between addr1 and addr2 +--- a/src/mpi/misc/getpname.c ++++ b/src/mpi/misc/getpname.c +@@ -32,10 +32,6 @@ int MPI_Get_processor_name(char *name, int *resultlen) + into nothing otherwise. */ + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Get_processor_name +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Get_processor_name - Gets the name of the processor + +@@ -109,12 +105,12 @@ int MPI_Get_processor_name(char *name, int *resultlen) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_get_processor_name", "**mpi_get_processor_name %p %p", name, + resultlen); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/misc/library_version.c ++++ b/src/mpi/misc/library_version.c +@@ -42,10 +42,6 @@ Output Parameters: + .N Errors + .N MPI_SUCCESS + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPI_Get_library_version +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPI_Get_library_version(char *version, int *resultlen) + { + int mpi_errno = MPI_SUCCESS; +@@ -98,11 +94,11 @@ int MPI_Get_library_version(char *version, int *resultlen) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**mpi_get_library_version", + "**mpi_get_library_version %p %p", version, resultlen); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/misc/pcontrol.c ++++ b/src/mpi/misc/pcontrol.c +@@ -27,8 +27,6 @@ int MPI_Pcontrol(const int level, ...) __attribute__ ((weak, alias("PMPI_Pcontro + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Pcontrol + + /*@ + MPI_Pcontrol - Controls profiling +--- a/src/mpi/misc/utils.c ++++ b/src/mpi/misc/utils.c +@@ -14,10 +14,6 @@ + + #define COPY_BUFFER_SZ 16384 + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Localcopy +-#undef FCNAME +-#define FCNAME "MPIR_Localcopy" + int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, + void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype) + { +@@ -71,58 +67,48 @@ int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtyp + MPIR_Memcpy(((char *) recvbuf + recvtype_true_lb), + ((char *) sendbuf + sendtype_true_lb), copy_sz); + } else if (sendtype_iscontig) { +- MPIR_Segment seg; +- MPI_Aint last; +- +- MPIR_Segment_init(recvbuf, recvcount, recvtype, &seg); +- last = copy_sz; +- MPIR_Segment_unpack(&seg, 0, &last, (char *) sendbuf + sendtype_true_lb); +- MPIR_ERR_CHKANDJUMP(last != copy_sz, mpi_errno, MPI_ERR_TYPE, "**dtypemismatch"); ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack((char *) sendbuf + sendtype_true_lb, copy_sz, recvbuf, recvcount, ++ recvtype, 0, &actual_unpack_bytes); ++ MPIR_ERR_CHKANDJUMP(actual_unpack_bytes != copy_sz, mpi_errno, MPI_ERR_TYPE, ++ "**dtypemismatch"); + } else if (recvtype_iscontig) { +- MPIR_Segment seg; +- MPI_Aint last; +- +- MPIR_Segment_init(sendbuf, sendcount, sendtype, &seg); +- last = copy_sz; +- MPIR_Segment_pack(&seg, 0, &last, (char *) recvbuf + recvtype_true_lb); +- MPIR_ERR_CHKANDJUMP(last != copy_sz, mpi_errno, MPI_ERR_TYPE, "**dtypemismatch"); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(sendbuf, sendcount, sendtype, 0, (char *) recvbuf + recvtype_true_lb, ++ copy_sz, &actual_pack_bytes); ++ MPIR_ERR_CHKANDJUMP(actual_pack_bytes != copy_sz, mpi_errno, MPI_ERR_TYPE, ++ "**dtypemismatch"); + } else { + char *buf; +- intptr_t buf_off; +- MPIR_Segment sseg; + intptr_t sfirst; +- MPIR_Segment rseg; + intptr_t rfirst; + + MPIR_CHKLMEM_MALLOC(buf, char *, COPY_BUFFER_SZ, mpi_errno, "buf", MPL_MEM_BUFFER); + +- MPIR_Segment_init(sendbuf, sendcount, sendtype, &sseg); +- MPIR_Segment_init(recvbuf, recvcount, recvtype, &rseg); +- + sfirst = 0; + rfirst = 0; +- buf_off = 0; + + while (1) { +- MPI_Aint last; +- char *buf_end; +- +- if (copy_sz - sfirst > COPY_BUFFER_SZ - buf_off) { +- last = sfirst + (COPY_BUFFER_SZ - buf_off); ++ MPI_Aint max_pack_bytes; ++ if (copy_sz - sfirst > COPY_BUFFER_SZ) { ++ max_pack_bytes = COPY_BUFFER_SZ; + } else { +- last = copy_sz; ++ max_pack_bytes = copy_sz - sfirst; + } + +- MPIR_Segment_pack(&sseg, sfirst, &last, buf + buf_off); +- MPIR_Assert(last > sfirst); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(sendbuf, sendcount, sendtype, sfirst, buf, ++ max_pack_bytes, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes > 0); + +- buf_end = buf + buf_off + (last - sfirst); +- sfirst = last; ++ sfirst += actual_pack_bytes; + +- MPIR_Segment_unpack(&rseg, rfirst, &last, buf); +- MPIR_Assert(last > rfirst); ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack(buf, actual_pack_bytes, recvbuf, recvcount, recvtype, ++ rfirst, &actual_unpack_bytes); ++ MPIR_Assert(actual_unpack_bytes > 0); + +- rfirst = last; ++ rfirst += actual_unpack_bytes; + + if (rfirst == copy_sz) { + /* successful completion */ +@@ -131,12 +117,6 @@ int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtyp + + /* if the send side finished, but the recv side couldn't unpack it, there's a datatype mismatch */ + MPIR_ERR_CHKANDJUMP(sfirst == copy_sz, mpi_errno, MPI_ERR_TYPE, "**dtypemismatch"); +- +- /* if not all data was unpacked, copy it to the front of the buffer for next time */ +- buf_off = sfirst - rfirst; +- if (buf_off > 0) { +- memmove(buf, buf_end - buf_off, buf_off); +- } + } + } + +--- a/src/mpi/misc/version.c ++++ b/src/mpi/misc/version.c +@@ -28,10 +28,6 @@ int MPI_Get_version(int *version, int *subversion) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Get_version +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Get_version - Return the version number of MPI + +@@ -86,11 +82,11 @@ int MPI_Get_version(int *version, int *subversion) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_get_version", "**mpi_get_version %p %p", version, + subversion); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/pt2pt/bsend.c ++++ b/src/mpi/pt2pt/bsend.c +@@ -29,10 +29,6 @@ int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Bsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Bsend - Basic send with user-provided buffering + +@@ -181,12 +177,12 @@ int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_bsend", "**mpi_bsend %p %d %D %i %t %C", buf, count, + datatype, dest, tag, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/bsend_init.c ++++ b/src/mpi/pt2pt/bsend_init.c +@@ -29,10 +29,6 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Bsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Bsend_init - Builds a handle for a buffered send + +@@ -143,12 +139,12 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_bsend_init", "**mpi_bsend_init %p %d %D %i %t %C %p", buf, + count, datatype, dest, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/bsendutil.c ++++ b/src/mpi/pt2pt/bsendutil.c +@@ -88,10 +88,6 @@ static void MPIR_Bsend_free_segment(MPII_Bsend_data_t *); + * Attach a buffer. This checks for the error conditions and then + * initialized the avail buffer. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bsend_attach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bsend_attach(void *buffer, int buffer_size) + { + MPII_Bsend_data_t *p; +@@ -164,10 +160,6 @@ int MPIR_Bsend_attach(void *buffer, int buffer_size) + * argument as an "int" (the definition predates that of ssize_t as a + * standard type). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bsend_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bsend_detach(void *bufferp, int *size) + { + int mpi_errno = MPI_SUCCESS; +@@ -213,10 +205,6 @@ int MPIR_Bsend_detach(void *bufferp, int *size) + /* + * Initiate an ibsend. We'll used this for Bsend as well. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bsend_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bsend_isend(const void *buf, int count, MPI_Datatype dtype, + int dest, int tag, MPIR_Comm * comm_ptr, + MPII_Bsend_kind_t kind, MPIR_Request ** request) +@@ -272,10 +260,13 @@ int MPIR_Bsend_isend(const void *buf, int count, MPI_Datatype dtype, + * use MPIR_Memcpy and the provided datatype */ + msg->count = 0; + if (dtype != MPI_PACKED) { ++ MPI_Aint actual_pack_bytes; ++ void *pbuf = (void *) ((char *) p->msg.msgbuf + p->msg.count); + mpi_errno = +- MPIR_Pack_impl(buf, count, dtype, p->msg.msgbuf, packsize, &p->msg.count); ++ MPIR_Typerep_pack(buf, count, dtype, 0, pbuf, packsize, &actual_pack_bytes); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); ++ p->msg.count += actual_pack_bytes; + } else { + MPIR_Memcpy(p->msg.msgbuf, buf, count); + p->msg.count = count; +@@ -335,10 +326,6 @@ int MPIR_Bsend_isend(const void *buf, int count, MPI_Datatype dtype, + * and frees it. The request is assumed to be completed. This routine + * is called by only MPIR_Ibsend_free. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bsend_free_seg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Bsend_free_req_seg(MPIR_Request * req) + { + int mpi_errno = MPI_ERR_INTERN; +@@ -370,10 +357,6 @@ int MPIR_Bsend_free_req_seg(MPIR_Request * req) + /* Add block p to the free list. Merge into adjacent blocks. Used only + within the check_active */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bsend_free_segment +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void MPIR_Bsend_free_segment(MPII_Bsend_data_t * p) + { + MPII_Bsend_data_t *prev = p->prev, *avail = BsendBuffer.avail, *avail_prev; +@@ -462,10 +445,6 @@ static void MPIR_Bsend_free_segment(MPII_Bsend_data_t * p) + * track of the type of MPI routine (ibsend, bsend, or bsend_init/start) + * that created the bsend entry. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Bsend_check_active +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIR_Bsend_check_active(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpi/pt2pt/bufattach.c ++++ b/src/mpi/pt2pt/bufattach.c +@@ -28,10 +28,6 @@ int MPI_Buffer_attach(void *buffer, int size) __attribute__ ((weak, alias("PMPI_ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Buffer_attach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Buffer_attach - Attaches a user-provided buffer for sending + +@@ -113,11 +109,11 @@ int MPI_Buffer_attach(void *buffer, int size) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_buffer_attach", "**mpi_buffer_attach %p %d", buffer, size); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/buffree.c ++++ b/src/mpi/pt2pt/buffree.c +@@ -29,10 +29,6 @@ int MPI_Buffer_detach(void *buffer_addr, int *size) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Buffer_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Buffer_detach - Removes an existing buffer (for use in MPI_Bsend etc) + +@@ -131,12 +127,12 @@ int MPI_Buffer_detach(void *buffer_addr, int *size) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_buffer_detach", "**mpi_buffer_detach %p %p", buffer_addr, + size); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/ibsend.c ++++ b/src/mpi/pt2pt/ibsend.c +@@ -52,10 +52,6 @@ PMPI_LOCAL int MPIR_Ibsend_free(void *extra) + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibsend_cancel +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + PMPI_LOCAL int MPIR_Ibsend_cancel(void *extra, int complete) + { + int mpi_errno = MPI_SUCCESS; +@@ -93,10 +89,6 @@ PMPI_LOCAL int MPIR_Ibsend_cancel(void *extra, int complete) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Ibsend_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Ibsend_impl(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, + MPIR_Comm * comm_ptr, MPI_Request * request) + { +@@ -134,10 +126,6 @@ int MPIR_Ibsend_impl(const void *buf, int count, MPI_Datatype datatype, int dest + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ibsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ibsend - Starts a nonblocking buffered send + +@@ -251,12 +239,12 @@ int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int + #ifdef HAVE_ERROR_REPORTING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ibsend", "**mpi_ibsend %p %d %D %i %t %C %p", buf, count, + datatype, dest, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/improbe.c ++++ b/src/mpi/pt2pt/improbe.c +@@ -29,10 +29,6 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message * mes + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Improbe - Nonblocking matched probe. + +@@ -60,7 +56,7 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message * mes + MPIR_Comm *comm_ptr = NULL; + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_IMPROBE); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_ENTER(MPID_STATE_MPI_IMPROBE); + + /* Validate parameters, especially handles needing to be converted */ +@@ -115,7 +111,7 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message * mes + + fn_exit: + MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPI_IMPROBE); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -123,12 +119,12 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message * mes + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_improbe", "**mpi_improbe %d %d %C %p %p %p", source, tag, + comm, flag, message, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/imrecv.c ++++ b/src/mpi/pt2pt/imrecv.c +@@ -29,10 +29,6 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message * messag + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Imrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Imrecv - Nonblocking receive of message matched by MPI_Mprobe or MPI_Improbe. + +@@ -134,12 +130,12 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message * messag + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_imrecv", "**mpi_imrecv %p %d %D %p %p", buf, count, + datatype, message, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/iprobe.c ++++ b/src/mpi/pt2pt/iprobe.c +@@ -28,10 +28,6 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status * statu + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Iprobe - Nonblocking test for a message + +@@ -64,7 +60,7 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status * statu + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER(MPID_STATE_MPI_IPROBE); + + /* Validate handle parameters needing to be converted */ +@@ -112,7 +108,7 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status * statu + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT(MPID_STATE_MPI_IPROBE); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -120,12 +116,12 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status * statu + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_iprobe", "**mpi_iprobe %i %t %C %p %p", source, tag, comm, + flag, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/irecv.c ++++ b/src/mpi/pt2pt/irecv.c +@@ -28,10 +28,6 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Irecv - Begins a nonblocking receive + +@@ -69,7 +65,7 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER_BACK(MPID_STATE_MPI_IRECV); + + /* Validate handle parameters needing to be converted */ +@@ -145,7 +141,7 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT_BACK(MPID_STATE_MPI_IRECV); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -153,12 +149,12 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_irecv", "**mpi_irecv %p %d %D %i %t %C %p", buf, count, + datatype, source, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/irsend.c ++++ b/src/mpi/pt2pt/irsend.c +@@ -28,10 +28,6 @@ int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Irsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Irsend - Starts a nonblocking ready send + +@@ -150,12 +146,12 @@ int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_irsend", "**mpi_irsend %p %d %D %i %t %C %p", buf, count, + datatype, dest, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/isend.c ++++ b/src/mpi/pt2pt/isend.c +@@ -28,10 +28,6 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Isend - Begins a nonblocking send + +@@ -68,7 +64,7 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER_FRONT(MPID_STATE_MPI_ISEND); + + /* Validate handle parameters needing to be converted */ +@@ -141,7 +137,7 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT(MPID_STATE_MPI_ISEND); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -149,12 +145,12 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_isend", "**mpi_isend %p %d %D %i %t %C %p", buf, count, + datatype, dest, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/issend.c ++++ b/src/mpi/pt2pt/issend.c +@@ -28,10 +28,6 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Issend - Starts a nonblocking synchronous send + +@@ -69,7 +65,7 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER_FRONT(MPID_STATE_MPI_ISSEND); + + /* Validate handle parameters needing to be converted */ +@@ -141,7 +137,7 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT(MPID_STATE_MPI_ISSEND); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -149,12 +145,12 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_issend", "**mpi_issend %p %d %D %i %t %C %p", buf, count, + datatype, dest, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/mprobe.c ++++ b/src/mpi/pt2pt/mprobe.c +@@ -29,10 +29,6 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message * message, MPI_St + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Mprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Mprobe - Blocking matched probe. + +@@ -58,7 +54,7 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message * message, MPI_St + MPIR_Comm *comm_ptr = NULL; + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_MPROBE); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_ENTER(MPID_STATE_MPI_MPROBE); + + /* Validate parameters, especially handles needing to be converted */ +@@ -109,7 +105,7 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message * message, MPI_St + + fn_exit: + MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPI_MPROBE); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -117,12 +113,12 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message * message, MPI_St + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_mprobe", "**mpi_mprobe %d %d %C %p %p", source, tag, comm, + message, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/mrecv.c ++++ b/src/mpi/pt2pt/mrecv.c +@@ -29,10 +29,6 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message * message + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Mrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Mrecv - Blocking receive of message matched by MPI_Mprobe or MPI_Improbe. + +@@ -56,7 +52,7 @@ Output Parameters: + int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message * message, + MPI_Status * status) + { +- int mpi_errno = MPI_SUCCESS, active_flag; /* dummy for MPIR_Request_completion_processing */ ++ int mpi_errno = MPI_SUCCESS; + MPIR_Request *msgp = NULL, *rreq = NULL; + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_MRECV); + +@@ -123,7 +119,7 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message * message + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIR_Request_completion_processing(rreq, status, &active_flag); ++ mpi_errno = MPIR_Request_completion_processing(rreq, status); + MPIR_Request_free(rreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -143,12 +139,12 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message * message + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_mrecv", "**mpi_mrecv %p %d %D %p %p", buf, count, datatype, + message, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/probe.c ++++ b/src/mpi/pt2pt/probe.c +@@ -28,10 +28,6 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Probe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Probe - Blocking test for a message + +@@ -61,7 +57,7 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status) + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER(MPID_STATE_MPI_PROBE); + + /* Validate handle parameters needing to be converted */ +@@ -107,7 +103,7 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status) + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT(MPID_STATE_MPI_PROBE); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -115,12 +111,12 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_probe", "**mpi_probe %i %t %C %p", source, tag, comm, + status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/recv.c ++++ b/src/mpi/pt2pt/recv.c +@@ -28,10 +28,6 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Recv - Blocking receive for a message + +@@ -75,7 +71,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER_BACK(MPID_STATE_MPI_RECV); + + /* Validate handle parameters needing to be converted */ +@@ -160,7 +156,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT_BACK(MPID_STATE_MPI_RECV); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -168,12 +164,12 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_recv", "**mpi_recv %p %d %D %i %t %C %p", buf, count, + datatype, source, tag, comm, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/recv_init.c ++++ b/src/mpi/pt2pt/recv_init.c +@@ -29,10 +29,6 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int t + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Recv_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Recv_init - Create a persistent request for a receive + +@@ -148,12 +144,12 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_recv_init", "**mpi_recv_init %p %d %D %i %t %C %p", buf, + count, datatype, source, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/rsend.c ++++ b/src/mpi/pt2pt/rsend.c +@@ -28,10 +28,6 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Rsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Rsend - Blocking ready send + +@@ -153,12 +149,12 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_rsend", "**mpi_rsend %p %d %D %i %t %C", buf, count, + datatype, dest, tag, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/rsend_init.c ++++ b/src/mpi/pt2pt/rsend_init.c +@@ -29,10 +29,6 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Rsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Rsend_init - Creates a persistent request for a ready send + +@@ -148,12 +144,12 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_rsend_init", "**mpi_rsend_init %p %d %D %i %t %C %p", buf, + count, datatype, dest, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/send.c ++++ b/src/mpi/pt2pt/send.c +@@ -28,10 +28,6 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Send - Performs a blocking send + +@@ -70,7 +66,7 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER_FRONT(MPID_STATE_MPI_SEND); + + /* Validate handle parameters needing to be converted */ +@@ -148,7 +144,7 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT(MPID_STATE_MPI_SEND); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -156,12 +152,12 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_send", "**mpi_send %p %d %D %i %t %C", buf, count, datatype, + dest, tag, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/send_init.c ++++ b/src/mpi/pt2pt/send_init.c +@@ -29,10 +29,6 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, i + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Send_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Send_init - Create a persistent request for a standard send + +@@ -149,12 +145,12 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_send_init", "**mpi_send_init %p %d %D %i %t %C %p", buf, + count, datatype, dest, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/sendrecv.c ++++ b/src/mpi/pt2pt/sendrecv.c +@@ -30,10 +30,6 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Sendrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Sendrecv - Sends and receives a message + +@@ -81,7 +77,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER_BOTH(MPID_STATE_MPI_SENDRECV); + + /* Validate handle parameters needing to be converted */ +@@ -225,7 +221,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT_BOTH(MPID_STATE_MPI_SENDRECV); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -233,14 +229,14 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_sendrecv", + "**mpi_sendrecv %p %d %D %i %t %p %d %D %i %t %C %p", sendbuf, + sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, + source, recvtag, comm, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/sendrecv_rep.c ++++ b/src/mpi/pt2pt/sendrecv_rep.c +@@ -29,10 +29,6 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, int dest, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Sendrecv_replace +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Sendrecv_replace - Sends and receives using a single buffer + +@@ -142,7 +138,7 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, + MPIR_Request *rreq = NULL; + void *tmpbuf = NULL; + MPI_Aint tmpbuf_size = 0; +- MPI_Aint tmpbuf_count = 0; ++ MPI_Aint actual_pack_bytes = 0; + + if (count > 0 && dest != MPI_PROC_NULL) { + MPIR_Pack_size_impl(count, datatype, &tmpbuf_size); +@@ -150,7 +146,8 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, + MPIR_CHKLMEM_MALLOC_ORJUMP(tmpbuf, void *, tmpbuf_size, mpi_errno, + "temporary send buffer", MPL_MEM_BUFFER); + +- mpi_errno = MPIR_Pack_impl(buf, count, datatype, tmpbuf, tmpbuf_size, &tmpbuf_count); ++ mpi_errno = ++ MPIR_Typerep_pack(buf, count, datatype, 0, tmpbuf, tmpbuf_size, &actual_pack_bytes); + if (mpi_errno != MPI_SUCCESS) + goto fn_fail; + } +@@ -160,7 +157,7 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, + if (mpi_errno != MPI_SUCCESS) + goto fn_fail; + +- mpi_errno = MPID_Isend(tmpbuf, tmpbuf_count, MPI_PACKED, dest, ++ mpi_errno = MPID_Isend(tmpbuf, actual_pack_bytes, MPI_PACKED, dest, + sendtag, comm_ptr, MPIR_CONTEXT_INTRA_PT2PT, &sreq); + if (mpi_errno != MPI_SUCCESS) { + /* --BEGIN ERROR HANDLING-- */ +@@ -213,13 +210,13 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_sendrecv_replace", + "**mpi_sendrecv_replace %p %d %D %i %t %i %t %C %p", buf, count, + datatype, dest, sendtag, source, recvtag, comm, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/ssend.c ++++ b/src/mpi/pt2pt/ssend.c +@@ -28,10 +28,6 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ssend - Blocking synchronous send + +@@ -64,7 +60,7 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_PT2PT_ENTER_FRONT(MPID_STATE_MPI_SSEND); + + /* Validate handle parameters needing to be converted */ +@@ -144,7 +140,7 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + + fn_exit: + MPIR_FUNC_TERSE_PT2PT_EXIT(MPID_STATE_MPI_SSEND); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -152,12 +148,12 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ssend", "**mpi_ssend %p %d %D %i %t %C", buf, count, + datatype, dest, tag, comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/pt2pt/ssend_init.c ++++ b/src/mpi/pt2pt/ssend_init.c +@@ -29,10 +29,6 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Ssend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Ssend_init - Creates a persistent request for a synchronous send + +@@ -145,12 +141,12 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_ssend_init", "**mpi_ssend_init %p %d %D %i %t %C %p", buf, + count, datatype, dest, tag, comm, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/cancel.c ++++ b/src/mpi/request/cancel.c +@@ -26,10 +26,6 @@ int MPI_Cancel(MPI_Request * request) __attribute__ ((weak, alias("PMPI_Cancel") + #define MPI_Cancel PMPI_Cancel + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Cancel +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Cancel(MPIR_Request * request_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -129,10 +125,6 @@ int MPIR_Cancel(MPIR_Request * request_ptr) + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cancel +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Cancel - Cancels a communication request + +@@ -172,7 +164,7 @@ int MPI_Cancel(MPI_Request * request) + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_REQUEST_ENTER(MPID_STATE_MPI_CANCEL); + + /* Convert MPI object handles to object pointers */ +@@ -202,7 +194,7 @@ int MPI_Cancel(MPI_Request * request) + + fn_exit: + MPIR_FUNC_TERSE_REQUEST_EXIT(MPID_STATE_MPI_CANCEL); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -210,11 +202,11 @@ int MPI_Cancel(MPI_Request * request) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**mpi_cancel", ++ __func__, __LINE__, MPI_ERR_OTHER, "**mpi_cancel", + "**mpi_cancel %p", request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/greq_complete.c ++++ b/src/mpi/request/greq_complete.c +@@ -30,10 +30,6 @@ int MPI_Grequest_complete(MPI_Request request) + are used by both the MPI and PMPI versions, use PMPI_LOCAL instead of + static; this macro expands into "static" if weak symbols are supported and + into nothing otherwise. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Grequest_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Grequest_complete(MPIR_Request * request_ptr) + { + /* Set the request as completed. This does not change the +@@ -46,10 +42,6 @@ void MPIR_Grequest_complete(MPIR_Request * request_ptr) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Grequest_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Grequest_complete - Notify MPI that a user-defined request is complete + +@@ -98,7 +90,7 @@ int MPI_Grequest_complete(MPI_Request request) + MPIR_Request_valid_ptr(request_ptr, mpi_errno); + if (request_ptr && request_ptr->kind != MPIR_REQUEST_KIND__GREQUEST) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_ARG, "**notgenreq", 0); + } + if (mpi_errno) +@@ -126,10 +118,10 @@ int MPI_Grequest_complete(MPI_Request request) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_grequest_complete", "**mpi_grequest_complete %R", request); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/request/greq_start.c ++++ b/src/mpi/request/greq_start.c +@@ -34,7 +34,7 @@ PMPI_LOCAL int MPIR_Grequest_free_classes_on_finalize(void *extra_data); + #define MPIR_GREQ_CLASS_PREALLOC 2 + #endif + +-MPIR_Grequest_class MPIR_Grequest_class_direct[MPIR_GREQ_CLASS_PREALLOC] = { {0} }; ++MPIR_Grequest_class MPIR_Grequest_class_direct[MPIR_GREQ_CLASS_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Grequest_class_mem = { 0, 0, 0, 0, MPIR_GREQ_CLASS, + sizeof(MPIR_Grequest_class), +@@ -71,10 +71,6 @@ PMPI_LOCAL int MPIR_Grequest_free_classes_on_finalize(void *extra_data ATTRIBUTE + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Grequest_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Grequest_start(MPI_Grequest_query_function * query_fn, + MPI_Grequest_free_function * free_fn, + MPI_Grequest_cancel_function * cancel_fn, +@@ -124,10 +120,6 @@ extern int MPIR_Grequest_registered_finalizer; + extern MPIR_Grequest_class *MPIR_Grequest_class_list; + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Grequest_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Grequest_start - Create and return a user-defined request + +@@ -219,12 +211,12 @@ int MPI_Grequest_start(MPI_Grequest_query_function * query_fn, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_grequest_start", "**mpi_grequest_start %p %p %p %p %p", + query_fn, free_fn, cancel_fn, extra_state, request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +@@ -254,10 +246,6 @@ int MPIX_Grequest_class_create(MPI_Grequest_query_function * query_fn, + #define MPIX_Grequest_class_create PMPIX_Grequest_class_create + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Grequest_class_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* extensions for Generalized Request redesign paper */ + int MPIX_Grequest_class_create(MPI_Grequest_query_function * query_fn, + MPI_Grequest_free_function * free_fn, +@@ -274,7 +262,7 @@ int MPIX_Grequest_class_create(MPI_Grequest_query_function * query_fn, + /* --BEGIN ERROR HANDLING-- */ + if (!class_ptr) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**nomem", + "**nomem %s", "MPIX_Grequest_class"); + goto fn_fail; +@@ -313,13 +301,13 @@ int MPIX_Grequest_class_create(MPI_Grequest_query_function * query_fn, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpix_grequest_class_create", + "**mpix_grequest_class_create %p %p %p %p %p", query_fn, free_fn, + cancel_fn, poll_fn, wait_fn); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +@@ -345,8 +333,6 @@ int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class, void *extra_sta + #define MPIX_Grequest_class_allocate PMPIX_Grequest_class_allocate + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Grequest_class_allocate + + int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class, + void *extra_state, MPI_Request * request) +@@ -393,8 +379,6 @@ int MPIX_Grequest_start(MPI_Grequest_query_function * query_fn, + #define MPIX_Grequest_start PMPIX_Grequest_start + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Grequest_start + + int MPIX_Grequest_start(MPI_Grequest_query_function * query_fn, + MPI_Grequest_free_function * free_fn, +@@ -421,10 +405,6 @@ int MPIX_Grequest_start(MPI_Grequest_query_function * query_fn, + + #ifndef MPICH_MPI_FROM_PMPI + +-#undef FUNCNAME +-#define FUNCNAME MPIX_Grequest_start_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIX_Grequest_start_impl(MPI_Grequest_query_function * query_fn, + MPI_Grequest_free_function * free_fn, + MPI_Grequest_cancel_function * cancel_fn, +--- a/src/mpi/request/mpir_request.c ++++ b/src/mpi/request/mpir_request.c +@@ -9,45 +9,35 @@ + + /* style:PMPIuse:PMPI_Status_f2c:2 sig:0 */ + +-MPIR_Request MPIR_Request_direct[MPIR_REQUEST_PREALLOC] = { {0} +-}; ++MPIR_Request MPIR_Request_direct[MPIR_REQUEST_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Request_mem = { + 0, 0, 0, 0, MPIR_REQUEST, sizeof(MPIR_Request), MPIR_Request_direct, + MPIR_REQUEST_PREALLOC + }; + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Request_completion_processing +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* Complete a request, saving the status data if necessary. +- "active" has meaning only if the request is a persistent request; this +- allows the completion routines to indicate that a persistent request +- was inactive and did not require any extra completion operation. +- + If debugger information is being provided for pending (user-initiated) + send operations, the macros MPII_SENDQ_FORGET will be defined to + call the routine MPII_Sendq_forget; otherwise that macro will be a no-op. + The implementation of the MPIR_Sendq_xxx is in src/mpi/debugger/dbginit.c . + */ +-int MPIR_Request_completion_processing(MPIR_Request * request_ptr, MPI_Status * status, int *active) ++int MPIR_Request_completion_processing(MPIR_Request * request_ptr, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; ++ int rc; + +- *active = TRUE; + switch (request_ptr->kind) { + case MPIR_REQUEST_KIND__SEND: + { +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, +- MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status)); +- } ++ MPIR_Status_set_cancel_bit(status, MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status)); + mpi_errno = request_ptr->status.MPI_ERROR; + MPII_SENDQ_FORGET(request_ptr); + break; + } + case MPIR_REQUEST_KIND__RECV: ++ case MPIR_REQUEST_KIND__COLL: ++ case MPIR_REQUEST_KIND__RMA: + { + MPIR_Request_extract_status(request_ptr, status); + mpi_errno = request_ptr->status.MPI_ERROR; +@@ -65,25 +55,15 @@ int MPIR_Request_completion_processing(MPIR_Request * request_ptr, MPI_Status * + request_ptr->u.persist.real_request = NULL; + + if (prequest_ptr->kind != MPIR_REQUEST_KIND__GREQUEST) { +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, +- MPIR_STATUS_GET_CANCEL_BIT +- (prequest_ptr->status)); +- } ++ MPIR_Status_set_cancel_bit(status, ++ MPIR_STATUS_GET_CANCEL_BIT((prequest_ptr->status))); + mpi_errno = prequest_ptr->status.MPI_ERROR; + } else { + /* This is needed for persistent Bsend requests */ +- int rc; +- +- rc = MPIR_Grequest_query(prequest_ptr); +- if (mpi_errno == MPI_SUCCESS) { +- mpi_errno = rc; +- } +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, +- MPIR_STATUS_GET_CANCEL_BIT +- (prequest_ptr->status)); +- } ++ mpi_errno = MPIR_Grequest_query(prequest_ptr); ++ MPIR_Status_set_cancel_bit(status, ++ MPIR_STATUS_GET_CANCEL_BIT ++ (prequest_ptr->status)); + if (mpi_errno == MPI_SUCCESS) { + mpi_errno = prequest_ptr->status.MPI_ERROR; + } +@@ -98,13 +78,10 @@ int MPIR_Request_completion_processing(MPIR_Request * request_ptr, MPI_Status * + if (request_ptr->status.MPI_ERROR != MPI_SUCCESS) { + /* if the persistent request failed to start then make the + * error code available */ +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, FALSE); +- } ++ MPIR_Status_set_cancel_bit(status, FALSE); + mpi_errno = request_ptr->status.MPI_ERROR; + } else { + MPIR_Status_set_empty(status); +- *active = FALSE; + } + } + +@@ -132,8 +109,6 @@ int MPIR_Request_completion_processing(MPIR_Request * request_ptr, MPI_Status * + /* if the persistent request failed to start then make the + * error code available */ + mpi_errno = request_ptr->status.MPI_ERROR; +- } else { +- *active = FALSE; + } + /* --END ERROR HANDLING-- */ + } +@@ -143,12 +118,7 @@ int MPIR_Request_completion_processing(MPIR_Request * request_ptr, MPI_Status * + + case MPIR_REQUEST_KIND__GREQUEST: + { +- int rc; +- +- rc = MPIR_Grequest_query(request_ptr); +- if (mpi_errno == MPI_SUCCESS) { +- mpi_errno = rc; +- } ++ mpi_errno = MPIR_Grequest_query(request_ptr); + MPIR_Request_extract_status(request_ptr, status); + rc = MPIR_Grequest_free(request_ptr); + if (mpi_errno == MPI_SUCCESS) { +@@ -158,14 +128,6 @@ int MPIR_Request_completion_processing(MPIR_Request * request_ptr, MPI_Status * + break; + } + +- case MPIR_REQUEST_KIND__COLL: +- case MPIR_REQUEST_KIND__RMA: +- { +- mpi_errno = request_ptr->status.MPI_ERROR; +- MPIR_Request_extract_status(request_ptr, status); +- break; +- } +- + default: + { + /* --BEGIN ERROR HANDLING-- */ +@@ -180,10 +142,6 @@ int MPIR_Request_completion_processing(MPIR_Request * request_ptr, MPI_Status * + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Request_handle_proc_failed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Request_handle_proc_failed(MPIR_Request * request_ptr) + { + if (request_ptr->kind == MPIR_REQUEST_KIND__RECV) { +@@ -195,14 +153,13 @@ int MPIR_Request_handle_proc_failed(MPIR_Request * request_ptr) + return request_ptr->status.MPI_ERROR; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Request_get_error +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* FIXME: What is this routine for? ++/* This routine is for obtaining the error code of an existing request. ++ * It is similar as MPIR_Request_completion_processing without any "free" + status setting. + * +- * [BRT] it is used by testall, although looking at testall now, I think the +- * algorithm can be change slightly and eliminate the need for this routine ++ * It is only needed by MPI_Testall because if not all request are completed then (quote): ++ * "neither the array_of_requests nor the array_of_statuses is modified. ++ * If one or more of the requests completes with an error, MPI_ERR_IN_STATUS is returned". ++ * Therefore, we have to get the error code without modifying the request. + */ + int MPIR_Request_get_error(MPIR_Request * request_ptr) + { +@@ -248,51 +205,7 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr) + + case MPIR_REQUEST_KIND__GREQUEST: + { +- int rc; +- +- /* Note that we've acquired the thread private storage above */ +- +- switch (request_ptr->u.ureq.greq_fns->greq_lang) { +- case MPIR_LANG__C: +-#ifdef HAVE_CXX_BINDING +- case MPIR_LANG__CXX: +-#endif +- rc = (request_ptr->u.ureq.greq_fns->query_fn) (request_ptr->u. +- ureq.greq_fns->grequest_extra_state, +- &request_ptr->status); +- MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno, MPI_ERR_OTHER,;, +- "**user", "**userquery %d", rc); +- break; +-#ifdef HAVE_FORTRAN_BINDING +- case MPIR_LANG__FORTRAN: +- case MPIR_LANG__FORTRAN90: +- { +- MPI_Fint ierr; +- MPI_Fint is[sizeof(MPI_Status) / sizeof(int)]; +- ((MPIR_Grequest_f77_query_function *) (request_ptr->u.ureq. +- greq_fns->query_fn)) +- (request_ptr->u.ureq.greq_fns->grequest_extra_state, is, &ierr); +- rc = (int) ierr; +- if (rc == MPI_SUCCESS) +- PMPI_Status_f2c(is, &request_ptr->status); +- MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno, MPI_ERR_OTHER,;, +- "**user", "**userquery %d", rc); +- break; +- } +-#endif +- +- default: +- { +- /* --BEGIN ERROR HANDLING-- */ +- /* This should not happen */ +- MPIR_ERR_SETANDSTMT1(mpi_errno, MPI_ERR_INTERN,;, +- "**badcase", +- "**badcase %d", +- request_ptr->u.ureq.greq_fns->greq_lang); +- break; +- /* --END ERROR HANDLING-- */ +- } +- } ++ mpi_errno = MPIR_Grequest_query(request_ptr); + + break; + } +@@ -324,10 +237,6 @@ void MPII_Grequest_set_lang_f77(MPI_Request greq) + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Grequest_cancel +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete) + { + int rc; +@@ -377,10 +286,6 @@ int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Grequest_query +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Grequest_query(MPIR_Request * request_ptr) + { + int rc; +@@ -430,10 +335,6 @@ int MPIR_Grequest_query(MPIR_Request * request_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Grequest_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Grequest_free(MPIR_Request * request_ptr) + { + int rc; +--- a/src/mpi/request/request_free.c ++++ b/src/mpi/request/request_free.c +@@ -27,10 +27,6 @@ int MPI_Request_free(MPI_Request * request) __attribute__ ((weak, alias("PMPI_Re + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Request_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Request_free - Frees a communication request object + +@@ -121,6 +117,8 @@ int MPI_Request_free(MPI_Request * request) + + case MPIR_REQUEST_KIND__PREQUEST_SEND: + { ++ /* Tell the device that we are freeing a persistent request object */ ++ MPID_Prequest_free_hook(request_ptr); + /* If this is an active persistent request, we must also + * release the partner request. */ + if (request_ptr->u.persist.real_request != NULL) { +@@ -136,6 +134,8 @@ int MPI_Request_free(MPI_Request * request) + + case MPIR_REQUEST_KIND__PREQUEST_RECV: + { ++ /* Tell the device that we are freeing a persistent request object */ ++ MPID_Prequest_free_hook(request_ptr); + /* If this is an active persistent request, we must also + * release the partner request. */ + if (request_ptr->u.persist.real_request != NULL) { +@@ -154,7 +154,7 @@ int MPI_Request_free(MPI_Request * request) + default: + { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**request_invalid_kind", + "**request_invalid_kind %d", request_ptr->kind); + break; +@@ -180,11 +180,11 @@ int MPI_Request_free(MPI_Request * request) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**mpi_request_free", ++ __func__, __LINE__, MPI_ERR_OTHER, "**mpi_request_free", + "**mpi_request_free %p", request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/request_get_status.c ++++ b/src/mpi/request/request_get_status.c +@@ -29,10 +29,6 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status * status) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Request_get_status +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Request_get_status - Nondestructive test for the completion of a Request + +@@ -120,10 +116,8 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status * status) + switch (request_ptr->kind) { + case MPIR_REQUEST_KIND__SEND: + { +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, +- MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status)); +- } ++ MPIR_Status_set_cancel_bit(status, ++ MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status)); + mpi_errno = request_ptr->status.MPI_ERROR; + break; + } +@@ -141,11 +135,9 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status * status) + + if (prequest_ptr != NULL) { + if (prequest_ptr->kind != MPIR_REQUEST_KIND__GREQUEST) { +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, +- MPIR_STATUS_GET_CANCEL_BIT +- (request_ptr->status)); +- } ++ MPIR_Status_set_cancel_bit(status, ++ MPIR_STATUS_GET_CANCEL_BIT ++ (request_ptr->status)); + mpi_errno = prequest_ptr->status.MPI_ERROR; + } else { + /* This is needed for persistent Bsend requests */ +@@ -155,11 +147,9 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status * status) + if (mpi_errno == MPI_SUCCESS) { + mpi_errno = rc; + } +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, +- MPIR_STATUS_GET_CANCEL_BIT +- (prequest_ptr->status)); +- } ++ MPIR_Status_set_cancel_bit(status, ++ MPIR_STATUS_GET_CANCEL_BIT ++ (prequest_ptr->status)); + if (mpi_errno == MPI_SUCCESS) { + mpi_errno = prequest_ptr->status.MPI_ERROR; + } +@@ -168,11 +158,9 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status * status) + if (request_ptr->status.MPI_ERROR != MPI_SUCCESS) { + /* if the persistent request failed to start then + * make the error code available */ +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, +- MPIR_STATUS_GET_CANCEL_BIT +- (request_ptr->status)); +- } ++ MPIR_Status_set_cancel_bit(status, ++ MPIR_STATUS_GET_CANCEL_BIT ++ (request_ptr->status)); + mpi_errno = request_ptr->status.MPI_ERROR; + } else { + MPIR_Status_set_empty(status); +@@ -207,10 +195,8 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status * status) + if (mpi_errno == MPI_SUCCESS) { + mpi_errno = rc; + } +- if (status != MPI_STATUS_IGNORE) { +- MPIR_STATUS_SET_CANCEL_BIT(*status, +- MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status)); +- } ++ MPIR_Status_set_cancel_bit(status, ++ MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status)); + MPIR_Request_extract_status(request_ptr, status); + + break; +@@ -242,13 +228,13 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status * status) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_request_get_status", + "**mpi_request_get_status %R %p %p", request, flag, + status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/start.c ++++ b/src/mpi/request/start.c +@@ -27,10 +27,6 @@ int MPI_Start(MPI_Request * request) __attribute__ ((weak, alias("PMPI_Start"))) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Start - Initiates a communication with a persistent request handle + +@@ -105,11 +101,11 @@ int MPI_Start(MPI_Request * request) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_start", "**mpi_start %p", request); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/startall.c ++++ b/src/mpi/request/startall.c +@@ -32,10 +32,6 @@ int MPI_Startall(int count, MPI_Request array_of_requests[]) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Startall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Startall - Starts a collection of persistent requests + +@@ -141,12 +137,12 @@ int MPI_Startall(int count, MPI_Request array_of_requests[]) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_startall", "**mpi_startall %d %p", count, + array_of_requests); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/status_set_cancelled.c ++++ b/src/mpi/request/status_set_cancelled.c +@@ -28,10 +28,6 @@ int MPI_Status_set_cancelled(MPI_Status * status, int flag) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Status_set_cancelled +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Status_set_cancelled - Sets the cancelled state associated with a + Status object +@@ -84,11 +80,11 @@ int MPI_Status_set_cancelled(MPI_Status * status, int flag) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_status_set_cancelled", "**mpi_status_set_cancelled %p %d", + status, flag); + } +- mpi_errno = MPIR_Err_return_comm(0, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(0, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/request/test.c ++++ b/src/mpi/request/test.c +@@ -26,10 +26,6 @@ int MPI_Test(MPI_Request * request, int *flag, MPI_Status * status) + #undef MPI_Test + #define MPI_Test PMPI_Test + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Test_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Test_impl(MPIR_Request * request_ptr, int *flag, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; +@@ -56,14 +52,9 @@ int MPIR_Test_impl(MPIR_Request * request_ptr, int *flag, MPI_Status * status) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Test(MPI_Request * request, int *flag, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; +- int active_flag; + MPIR_Request *request_ptr = NULL; + + /* If this is a null request handle, then return an empty status */ +@@ -81,7 +72,7 @@ int MPIR_Test(MPI_Request * request, int *flag, MPI_Status * status) + MPIR_ERR_POP(mpi_errno); + + if (*flag) { +- mpi_errno = MPIR_Request_completion_processing(request_ptr, status, &active_flag); ++ mpi_errno = MPIR_Request_completion_processing(request_ptr, status); + if (!MPIR_Request_is_persistent(request_ptr)) { + MPIR_Request_free(request_ptr); + *request = MPI_REQUEST_NULL; +@@ -103,10 +94,6 @@ int MPIR_Test(MPI_Request * request, int *flag, MPI_Status * status) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Test - Tests for the completion of a request + +@@ -139,7 +126,7 @@ int MPI_Test(MPI_Request * request, int *flag, MPI_Status * status) + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_REQUEST_ENTER(MPID_STATE_MPI_TEST); + + /* Validate parameters, especially handles needing to be converted */ +@@ -190,7 +177,7 @@ int MPI_Test(MPI_Request * request, int *flag, MPI_Status * status) + + fn_exit: + MPIR_FUNC_TERSE_REQUEST_EXIT(MPID_STATE_MPI_TEST); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -198,11 +185,11 @@ int MPI_Test(MPI_Request * request, int *flag, MPI_Status * status) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_test", "**mpi_test %p %p %p", request, flag, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/test_cancelled.c ++++ b/src/mpi/request/test_cancelled.c +@@ -28,10 +28,6 @@ int MPI_Test_cancelled(const MPI_Status * status, int *flag) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Test_cancelled +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Test_cancelled - Tests to see if a request was cancelled + +@@ -86,11 +82,11 @@ int MPI_Test_cancelled(const MPI_Status * status, int *flag) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_test_cancelled", "**mpi_test_cancelled %p %p", status, + flag); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/request/testall.c ++++ b/src/mpi/request/testall.c +@@ -31,10 +31,6 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag, + #define MPI_Testall PMPI_Testall + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Testall_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Testall_impl(int count, MPIR_Request * request_ptrs[], int *flag, + MPI_Status array_of_statuses[], int requests_property) + { +@@ -91,10 +87,6 @@ int MPIR_Testall_impl(int count, MPIR_Request * request_ptrs[], int *flag, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Testall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Testall(int count, MPI_Request array_of_requests[], int *flag, + MPI_Status array_of_statuses[]) + { +@@ -211,8 +203,7 @@ int MPIR_Testall(int count, MPI_Request array_of_requests[], int *flag, + if (ignoring_status) { + for (i = 0; i < count; i++) { + if (request_ptrs[i] != NULL && MPIR_Request_is_complete(request_ptrs[i])) { +- MPIR_Request_completion_processing(request_ptrs[i], +- MPI_STATUS_IGNORE, &active_flag); ++ MPIR_Request_completion_processing(request_ptrs[i], MPI_STATUS_IGNORE); + if (!MPIR_Request_is_persistent(request_ptrs[i])) { + MPIR_Request_free(request_ptrs[i]); + array_of_requests[i] = MPI_REQUEST_NULL; +@@ -225,8 +216,8 @@ int MPIR_Testall(int count, MPI_Request array_of_requests[], int *flag, + for (i = 0; i < count; i++) { + if (request_ptrs[i] != NULL) { + if (MPIR_Request_is_complete(request_ptrs[i])) { +- rc = MPIR_Request_completion_processing(request_ptrs[i], +- &array_of_statuses[i], &active_flag); ++ active_flag = MPIR_Request_is_active(request_ptrs[i]); ++ rc = MPIR_Request_completion_processing(request_ptrs[i], &array_of_statuses[i]); + if (!MPIR_Request_is_persistent(request_ptrs[i])) { + MPIR_Request_free(request_ptrs[i]); + array_of_requests[i] = MPI_REQUEST_NULL; +@@ -266,10 +257,6 @@ int MPIR_Testall(int count, MPI_Request array_of_requests[], int *flag, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Testall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Testall - Tests for the completion of all previously initiated + requests +@@ -319,7 +306,7 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag, + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_REQUEST_ENTER(MPID_STATE_MPI_TESTALL); + + /* Check the arguments */ +@@ -357,7 +344,7 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag, + fn_exit: + + MPIR_FUNC_TERSE_REQUEST_EXIT(MPID_STATE_MPI_TESTALL); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -365,12 +352,12 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_testall", "**mpi_testall %d %p %p %p", count, + array_of_requests, flag, array_of_statuses); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/testany.c ++++ b/src/mpi/request/testany.c +@@ -30,10 +30,6 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx, int *flag + #undef MPI_Testany + #define MPI_Testany PMPI_Testany + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Testany_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Testany_impl(int count, MPIR_Request * request_ptrs[], + int *indx, int *flag, MPI_Status * status) + { +@@ -81,10 +77,6 @@ int MPIR_Testany_impl(int count, MPIR_Request * request_ptrs[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Testany +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Testany - Tests for completion of any previdously initiated + requests +@@ -121,16 +113,15 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx, + MPIR_Request **request_ptrs = request_ptr_array; + int i; + int n_inactive; +- int active_flag; + int last_disabled_anysource = -1; +- int first_nonnull = 0; ++ int first_nonnull = count; + int mpi_errno = MPI_SUCCESS; + MPIR_CHKLMEM_DECL(1); + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_TESTANY); + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_REQUEST_ENTER(MPID_STATE_MPI_TESTANY); + + /* Check the arguments */ +@@ -196,7 +187,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx, + request_ptrs[i] = NULL; + } + } else { +- if (!first_nonnull) ++ if (first_nonnull == count) + first_nonnull = i; + } + } else { +@@ -228,7 +219,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx, + } + + if (*indx != MPI_UNDEFINED) { +- mpi_errno = MPIR_Request_completion_processing(request_ptrs[*indx], status, &active_flag); ++ mpi_errno = MPIR_Request_completion_processing(request_ptrs[*indx], status); + if (!MPIR_Request_is_persistent(request_ptrs[*indx])) { + MPIR_Request_free(request_ptrs[*indx]); + array_of_requests[*indx] = MPI_REQUEST_NULL; +@@ -256,7 +247,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx, + } + + MPIR_FUNC_TERSE_REQUEST_EXIT(MPID_STATE_MPI_TESTANY); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -264,12 +255,12 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_testany", "**mpi_testany %d %p %p %p %p", count, + array_of_requests, indx, flag, status); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/testsome.c ++++ b/src/mpi/request/testsome.c +@@ -31,10 +31,6 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, + #undef MPI_Testsome + #define MPI_Testsome PMPI_Testsome + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Testsome_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Testsome_impl(int incount, MPIR_Request * request_ptrs[], + int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]) + { +@@ -82,10 +78,6 @@ int MPIR_Testsome_impl(int incount, MPIR_Request * request_ptrs[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Testsome +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Testsome - Tests for some given requests to complete + +@@ -126,7 +118,6 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, + int i; + int n_inactive; + int proc_failure = FALSE; +- int active_flag; + int rc = MPI_SUCCESS; + int mpi_errno = MPI_SUCCESS; + MPIR_CHKLMEM_DECL(1); +@@ -134,7 +125,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_REQUEST_ENTER(MPID_STATE_MPI_TESTSOME); + + /* Check the arguments */ +@@ -219,7 +210,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, + int idx = array_of_indices[i]; + status_ptr = (array_of_statuses == MPI_STATUSES_IGNORE) ? + MPI_STATUS_IGNORE : &array_of_statuses[i]; +- rc = MPIR_Request_completion_processing(request_ptrs[idx], status_ptr, &active_flag); ++ rc = MPIR_Request_completion_processing(request_ptrs[idx], status_ptr); + if (!MPIR_Request_is_persistent(request_ptrs[idx])) { + MPIR_Request_free(request_ptrs[idx]); + array_of_requests[idx] = MPI_REQUEST_NULL; +@@ -252,7 +243,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, + } + + MPIR_FUNC_TERSE_REQUEST_EXIT(MPID_STATE_MPI_TESTSOME); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -260,12 +251,12 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_testsome", "**mpi_testsome %d %p %p %p %p", incount, + array_of_requests, outcount, array_of_indices, array_of_statuses); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/wait.c ++++ b/src/mpi/request/wait.c +@@ -25,10 +25,6 @@ int MPI_Wait(MPI_Request * request, MPI_Status * status) __attribute__ ((weak, a + #undef MPI_Wait + #define MPI_Wait PMPI_Wait + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Wait_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Wait_impl(MPIR_Request * request_ptr, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; +@@ -59,10 +55,6 @@ int MPIR_Wait_impl(MPIR_Request * request_ptr, MPI_Status * status) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Wait(MPI_Request * request, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; +@@ -103,7 +95,7 @@ int MPIR_Wait(MPI_Request * request, MPI_Status * status) + } + } + +- mpi_errno = MPIR_Request_completion_processing(request_ptr, status, &active_flag); ++ mpi_errno = MPIR_Request_completion_processing(request_ptr, status); + if (!MPIR_Request_is_persistent(request_ptr)) { + MPIR_Request_free(request_ptr); + *request = MPI_REQUEST_NULL; +@@ -119,10 +111,6 @@ int MPIR_Wait(MPI_Request * request, MPI_Status * status) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Wait - Waits for an MPI request to complete + +@@ -154,7 +142,7 @@ int MPI_Wait(MPI_Request * request, MPI_Status * status) + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_REQUEST_ENTER(MPID_STATE_MPI_WAIT); + + /* Check the arguments */ +@@ -206,17 +194,17 @@ int MPI_Wait(MPI_Request * request, MPI_Status * status) + + fn_exit: + MPIR_FUNC_TERSE_REQUEST_EXIT(MPID_STATE_MPI_WAIT); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: + /* --BEGIN ERROR HANDLING-- */ + #ifdef HAVE_ERROR_CHECKING + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_wait", "**mpi_wait %p %p", request, status); + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/waitall.c ++++ b/src/mpi/request/waitall.c +@@ -31,10 +31,6 @@ int MPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_ + #undef MPI_Waitall + #define MPI_Waitall PMPI_Waitall + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Waitall_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Waitall_impl(int count, MPIR_Request * request_ptrs[], MPI_Status array_of_statuses[], + int requests_property) + { +@@ -88,10 +84,6 @@ int MPIR_Waitall_impl(int count, MPIR_Request * request_ptrs[], MPI_Status array + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Waitall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]) + { + int mpi_errno = MPI_SUCCESS; +@@ -99,7 +91,6 @@ int MPIR_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of + MPIR_Request **request_ptrs = request_ptr_array; + int i, j, ii, icount; + int n_completed; +- int active_flag; + int rc = MPI_SUCCESS; + int disabled_anysource = FALSE; + const int ignoring_statuses = (array_of_statuses == MPI_STATUSES_IGNORE); +@@ -199,8 +190,7 @@ int MPIR_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of + for (i = ii; i < ii + icount; i++) { + if (request_ptrs[i] == NULL) + continue; +- rc = MPIR_Request_completion_processing(request_ptrs[i], MPI_STATUS_IGNORE, +- &active_flag); ++ rc = MPIR_Request_completion_processing(request_ptrs[i], MPI_STATUS_IGNORE); + if (!MPIR_Request_is_persistent(request_ptrs[i])) { + MPIR_Request_free(request_ptrs[i]); + array_of_requests[i] = MPI_REQUEST_NULL; +@@ -216,8 +206,7 @@ int MPIR_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of + for (i = ii; i < ii + icount; i++) { + if (request_ptrs[i] == NULL) + continue; +- rc = MPIR_Request_completion_processing(request_ptrs[i], &array_of_statuses[i], +- &active_flag); ++ rc = MPIR_Request_completion_processing(request_ptrs[i], &array_of_statuses[i]); + if (!MPIR_Request_is_persistent(request_ptrs[i])) { + MPIR_Request_free(request_ptrs[i]); + array_of_requests[i] = MPI_REQUEST_NULL; +@@ -263,10 +252,6 @@ int MPIR_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Waitall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Waitall - Waits for all given MPI Requests to complete + +@@ -310,7 +295,7 @@ int MPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_ + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_REQUEST_ENTER(MPID_STATE_MPI_WAITALL); + + /* Check the arguments */ +@@ -346,19 +331,19 @@ int MPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_ + + fn_exit: + MPIR_FUNC_TERSE_REQUEST_EXIT(MPID_STATE_MPI_WAITALL); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: + /* --BEGIN ERROR HANDLING-- */ + #ifdef HAVE_ERROR_CHECKING + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_waitall", + "**mpi_waitall %d %p %p", + count, array_of_requests, array_of_statuses); + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/waitany.c ++++ b/src/mpi/request/waitany.c +@@ -11,10 +11,25 @@ + #define MPIR_REQUEST_PTR_ARRAY_SIZE 16 + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Waitany +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) ++/* -- Begin Profiling Symbol Block for routine MPI_Waitany */ ++#if defined(HAVE_PRAGMA_WEAK) ++#pragma weak MPI_Waitany = PMPI_Waitany ++#elif defined(HAVE_PRAGMA_HP_SEC_DEF) ++#pragma _HP_SECONDARY_DEF PMPI_Waitany MPI_Waitany ++#elif defined(HAVE_PRAGMA_CRI_DUP) ++#pragma _CRI duplicate MPI_Waitany as PMPI_Waitany ++#elif defined(HAVE_WEAK_ATTRIBUTE) ++int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Status * status) ++ __attribute__ ((weak, alias("PMPI_Waitany"))); ++#endif ++/* -- End Profiling Symbol Block */ ++ ++/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build ++ the MPI routines */ ++#ifndef MPICH_MPI_FROM_PMPI ++#undef MPI_Waitany ++#define MPI_Waitany PMPI_Waitany ++ + int MPIR_Waitany_impl(int count, MPIR_Request * request_ptrs[], int *indx, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; +@@ -89,31 +104,8 @@ int MPIR_Waitany_impl(int count, MPIR_Request * request_ptrs[], int *indx, MPI_S + goto fn_exit; + } + +-/* -- Begin Profiling Symbol Block for routine MPI_Waitany */ +-#if defined(HAVE_PRAGMA_WEAK) +-#pragma weak MPI_Waitany = PMPI_Waitany +-#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +-#pragma _HP_SECONDARY_DEF PMPI_Waitany MPI_Waitany +-#elif defined(HAVE_PRAGMA_CRI_DUP) +-#pragma _CRI duplicate MPI_Waitany as PMPI_Waitany +-#elif defined(HAVE_WEAK_ATTRIBUTE) +-int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Status * status) +- __attribute__ ((weak, alias("PMPI_Waitany"))); +-#endif +-/* -- End Profiling Symbol Block */ +- +-/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build +- the MPI routines */ +-#ifndef MPICH_MPI_FROM_PMPI +-#undef MPI_Waitany +-#define MPI_Waitany PMPI_Waitany +- + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Waitany +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Waitany - Waits for any specified MPI Request to complete + +@@ -150,9 +142,8 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Statu + MPIR_Request *request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE]; + MPIR_Request **request_ptrs = request_ptr_array; + int i; +- int active_flag; + int last_disabled_anysource = -1; +- int first_nonnull = 0; ++ int first_nonnull = count; + int mpi_errno = MPI_SUCCESS; + MPIR_CHKLMEM_DECL(1); + MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_WAITANY); +@@ -230,7 +221,7 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Statu + request_ptrs[i] = NULL; + } + } else { +- if (!first_nonnull) ++ if (first_nonnull == count) + first_nonnull = i; + } + } else { +@@ -256,7 +247,7 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Statu + } + } + +- mpi_errno = MPIR_Request_completion_processing(request_ptrs[*indx], status, &active_flag); ++ mpi_errno = MPIR_Request_completion_processing(request_ptrs[*indx], status); + if (!MPIR_Request_is_persistent(request_ptrs[*indx])) { + MPIR_Request_free(request_ptrs[*indx]); + array_of_requests[*indx] = MPI_REQUEST_NULL; +@@ -279,12 +270,12 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Statu + /* --BEGIN ERROR HANDLING-- */ + #ifdef HAVE_ERROR_CHECKING + mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, ++ __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_waitany", + "**mpi_waitany %d %p %p %p", + count, array_of_requests, indx, status); + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/request/waitsome.c ++++ b/src/mpi/request/waitsome.c +@@ -31,10 +31,6 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[], int *outcount, + #undef MPI_Waitsome + #define MPI_Waitsome PMPI_Waitsome + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Waitsome_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Waitsome_impl(int incount, MPIR_Request * request_ptrs[], + int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]) + { +@@ -117,10 +113,6 @@ int MPIR_Waitsome_impl(int incount, MPIR_Request * request_ptrs[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Waitsome +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Waitsome - Waits for some given MPI Requests to complete + +@@ -176,7 +168,6 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[], + MPI_Status *status_ptr; + int i; + int n_inactive; +- int active_flag; + int rc = MPI_SUCCESS; + int disabled_anysource = FALSE; + int mpi_errno = MPI_SUCCESS; +@@ -185,7 +176,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[], + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_REQUEST_ENTER(MPID_STATE_MPI_WAITSOME); + + /* Check the arguments */ +@@ -277,7 +268,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[], + int idx = array_of_indices[i]; + status_ptr = + (array_of_statuses != MPI_STATUSES_IGNORE) ? &array_of_statuses[i] : MPI_STATUS_IGNORE; +- rc = MPIR_Request_completion_processing(request_ptrs[idx], status_ptr, &active_flag); ++ rc = MPIR_Request_completion_processing(request_ptrs[idx], status_ptr); + if (!MPIR_Request_is_persistent(request_ptrs[idx])) { + MPIR_Request_free(request_ptrs[idx]); + array_of_requests[idx] = MPI_REQUEST_NULL; +@@ -310,18 +301,18 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[], + } + + MPIR_FUNC_TERSE_REQUEST_EXIT(MPID_STATE_MPI_WAITSOME); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: + /* --BEGIN ERROR HANDLING-- */ + #ifdef HAVE_ERROR_CHECKING + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_waitsome", "**mpi_waitsome %d %p %p %p %p", incount, + array_of_requests, outcount, array_of_indices, array_of_statuses); + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/accumulate.c ++++ b/src/mpi/rma/accumulate.c +@@ -30,10 +30,6 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origi + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Accumulate - Accumulate data into the target process using remote + memory access +@@ -167,13 +163,13 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_accumulate", "**mpi_accumulate %p %d %D %d %d %d %D %O %W", + origin_addr, origin_count, origin_datatype, target_rank, + target_disp, target_count, target_datatype, op, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/alloc_mem.c ++++ b/src/mpi/rma/alloc_mem.c +@@ -28,10 +28,6 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Alloc_mem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Alloc_mem - Allocate memory for message passing and RMA + +@@ -90,13 +86,12 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) + + /* ... body of routine ... */ + +- MPIR_Ensure_Aint_fits_in_pointer(size); + ap = MPID_Alloc_mem(size, info_ptr); + + /* --BEGIN ERROR HANDLING-- */ + if (!ap) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_NO_MEM, "**allocmem", 0); + goto fn_fail; + } +@@ -117,12 +112,12 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_alloc_mem", "**mpi_alloc_mem %d %I %p", size, info, + baseptr); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/compare_and_swap.c ++++ b/src/mpi/rma/compare_and_swap.c +@@ -30,10 +30,6 @@ int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Compare_and_swap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Compare_and_swap - Perform one-sided atomic compare-and-swap. + +@@ -152,14 +148,14 @@ int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_compare_and_swap", + "**mpi_compare_and_swap %p %p %p %D %d %d %W", origin_addr, + compare_addr, result_addr, datatype, target_rank, target_disp, + win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/fetch_and_op.c ++++ b/src/mpi/rma/fetch_and_op.c +@@ -30,10 +30,6 @@ int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Fetch_and_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Fetch_and_op - Perform one-sided read-modify-write. + +@@ -165,13 +161,13 @@ int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_fetch_and_op", "**mpi_fetch_and_op %p %p %D %d %d %O %W", + origin_addr, result_addr, datatype, target_rank, target_disp, op, + win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/free_mem.c ++++ b/src/mpi/rma/free_mem.c +@@ -27,10 +27,6 @@ int MPI_Free_mem(void *base) __attribute__ ((weak, alias("PMPI_Free_mem"))); + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Free_mem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Free_mem - Free memory allocated with MPI_Alloc_mem + +@@ -76,13 +72,13 @@ int MPI_Free_mem(void *base) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_free_mem", "**mpi_free_mem %p", base); + } + #endif + /* MPI_Free_mem must invoke the error handler on MPI_COMM_WORLD if there + * is an error */ +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/get.c ++++ b/src/mpi/rma/get.c +@@ -29,10 +29,6 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Get - Get data from a memory window on a remote process + +@@ -71,7 +67,7 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_RMA_ENTER(MPID_STATE_MPI_GET); + + /* Validate parameters, especially handles needing to be converted */ +@@ -150,7 +146,7 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype + + fn_exit: + MPIR_FUNC_TERSE_RMA_EXIT(MPID_STATE_MPI_GET); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -158,13 +154,13 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_get", "**mpi_get %p %d %D %d %d %d %D %W", origin_addr, + origin_count, origin_datatype, target_rank, target_disp, + target_count, target_datatype, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/get_accumulate.c ++++ b/src/mpi/rma/get_accumulate.c +@@ -31,10 +31,6 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Get_accumulate - Perform an atomic, one-sided read-and-accumulate operation. + +@@ -221,7 +217,7 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_get_accumulate", + "**mpi_get_accumulate %p %d %D %p %d %D %d %d %d %D %O %W", + origin_addr, origin_count, origin_datatype, result_addr, +@@ -229,7 +225,7 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count, + target_count, target_datatype, op, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/put.c ++++ b/src/mpi/rma/put.c +@@ -29,10 +29,6 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datat + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Put - Put data into a memory window on a remote process + +@@ -71,7 +67,7 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype + + MPIR_ERRTEST_INITIALIZED_ORDIE(); + +- MPID_THREAD_CS_ENTER(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + MPIR_FUNC_TERSE_RMA_ENTER(MPID_STATE_MPI_PUT); + + /* Validate parameters, especially handles needing to be converted */ +@@ -150,7 +146,7 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype + + fn_exit: + MPIR_FUNC_TERSE_RMA_EXIT(MPID_STATE_MPI_PUT); +- MPID_THREAD_CS_EXIT(VNI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI_GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + return mpi_errno; + + fn_fail: +@@ -158,13 +154,13 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_put", "**mpi_put %p %d %D %d %d %d %D %W", origin_addr, + origin_count, origin_datatype, target_rank, target_disp, + target_count, target_datatype, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/raccumulate.c ++++ b/src/mpi/rma/raccumulate.c +@@ -31,10 +31,6 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Raccumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Raccumulate - Accumulate data into the target process using remote memory + access and return a request handle for the operation. +@@ -183,14 +179,14 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_raccumulate", + "**mpi_raccumulate %p %d %D %d %d %d %D %O %W %p", origin_addr, + origin_count, origin_datatype, target_rank, target_disp, + target_count, target_datatype, op, win, request); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/rget.c ++++ b/src/mpi/rma/rget.c +@@ -30,10 +30,6 @@ int MPI_Rget(void *origin_addr, int origin_count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Rget +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Rget - Get data from a memory window on a remote process + +@@ -175,13 +171,13 @@ int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_rget", "**mpi_rget %p %d %D %d %d %d %D %W %p", origin_addr, + origin_count, origin_datatype, target_rank, target_disp, + target_count, target_datatype, win, request); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/rget_accumulate.c ++++ b/src/mpi/rma/rget_accumulate.c +@@ -32,10 +32,6 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Rget_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Rget_accumulate - Perform an atomic, one-sided read-and-accumulate + operation and return a request handle for the operation. +@@ -212,7 +208,7 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_rget_accumulate", + "**mpi_rget_accumulate %p %d %D %p %d %D %d %d %d %D %O %W %p", + origin_addr, origin_count, origin_datatype, result_addr, +@@ -220,7 +216,7 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count, + target_count, target_datatype, op, win, request); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/rmatypeutil.c ++++ b/src/mpi/rma/rmatypeutil.c +@@ -16,10 +16,6 @@ + /* Returns true iff the given type is valid for use in MPI-3 RMA atomics, such + * as MPI_Compare_and_swap or MPI_Fetch_and_op. Does NOT return MPICH error + * codes. */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Sched_cb_free_buf +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Type_is_rma_atomic(MPI_Datatype type) + { + switch (type) { +@@ -46,10 +42,6 @@ int MPIR_Type_is_rma_atomic(MPI_Datatype type) + /* Returns true if (a == b) when interepreted using the given datatype. + * Currently, this is only defined for RMA atomic types. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_COMPARE_EQUAL +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Compare_equal(const void *a, const void *b, MPI_Datatype type) + { + switch (type) { +--- a/src/mpi/rma/rput.c ++++ b/src/mpi/rma/rput.c +@@ -30,10 +30,6 @@ int MPI_Rput(const void *origin_addr, int origin_count, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Rput +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Rput - Put data into a memory window on a remote process and return a + request handle for the operation. +@@ -177,13 +173,13 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_rput", "**mpi_rput %p %d %D %d %d %d %D %W %p", origin_addr, + origin_count, origin_datatype, target_rank, target_disp, + target_count, target_datatype, win, request); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_allocate.c ++++ b/src/mpi/rma/win_allocate.c +@@ -28,10 +28,6 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_allocate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_allocate - Create and allocate an MPI Window object for one-sided communication. + +@@ -112,18 +108,18 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, + if (size < 0) + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_SIZE, "**rmasize", "**rmasize %d", size); + if (disp_unit <= 0) + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**arg", "**arg %s", "disp_unit must be positive"); + if (size > 0 && baseptr == NULL) + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**nullptr", + "**nullptr %s", +@@ -160,12 +156,12 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_allocate", "**mpi_win_allocate %d %d %I %C %p %p", size, + disp_unit, info, comm, baseptr, win); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_allocate_shared.c ++++ b/src/mpi/rma/win_allocate_shared.c +@@ -29,10 +29,6 @@ int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Com + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_allocate_shared +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + MPI_Win_allocate_shared - Create an MPI Window object for one-sided +@@ -160,13 +156,13 @@ int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Com + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_allocate_shared", + "**mpi_win_allocate_shared %d %I %C %p %p", size, info, comm, + baseptr, win); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_attach.c ++++ b/src/mpi/rma/win_attach.c +@@ -28,10 +28,6 @@ int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_attach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_attach - Attach memory to a dynamic window. + +@@ -100,12 +96,12 @@ int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size) + if (size < 0) + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_SIZE, "**rmasize", "**rmasize %d", size); + if (size > 0 && base == NULL) + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**nullptr", + "**nullptr %s", +@@ -138,11 +134,11 @@ int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_attach", "**mpi_win_attach %W %p %d", size, base, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_complete.c ++++ b/src/mpi/rma/win_complete.c +@@ -27,10 +27,6 @@ int MPI_Win_complete(MPI_Win win) __attribute__ ((weak, alias("PMPI_Win_complete + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_complete - Completes an RMA operations begun after an MPI_Win_start. + +@@ -104,11 +100,11 @@ int MPI_Win_complete(MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_complete", "**mpi_win_complete %W", win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_create.c ++++ b/src/mpi/rma/win_create.c +@@ -28,10 +28,6 @@ int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_create - Create an MPI Window object for one-sided communication + +@@ -140,18 +136,18 @@ int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, + if (size < 0) + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_SIZE, "**rmasize", "**rmasize %d", size); + if (disp_unit <= 0) + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**arg", "**arg %s", "disp_unit must be positive"); + if (size > 0 && base == NULL) + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**nullptr", + "**nullptr %s", +@@ -188,12 +184,12 @@ int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_create", "**mpi_win_create %p %d %d %I %C %p", base, + size, disp_unit, info, comm, win); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_create_dynamic.c ++++ b/src/mpi/rma/win_create_dynamic.c +@@ -28,10 +28,6 @@ int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win * win) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_create_dynamic +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_create_dynamic - Create an MPI Window object for one-sided + communication. This window allows memory to be dynamically exposed and +@@ -156,12 +152,12 @@ int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win * win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_create_dynamic", "**mpi_win_create_dynamic %I %C %p", + info, comm, win); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_detach.c ++++ b/src/mpi/rma/win_detach.c +@@ -27,10 +27,6 @@ int MPI_Win_detach(MPI_Win win, const void *base) __attribute__ ((weak, alias("P + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_detach - Detach memory from a dynamic window + +@@ -120,11 +116,11 @@ int MPI_Win_detach(MPI_Win win, const void *base) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_detach", "**mpi_win_detach %W %p", win, base); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_fence.c ++++ b/src/mpi/rma/win_fence.c +@@ -27,10 +27,6 @@ int MPI_Win_fence(int assert, MPI_Win win) __attribute__ ((weak, alias("PMPI_Win + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_fence +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_fence - Perform an MPI fence synchronization on a MPI window + +@@ -125,11 +121,11 @@ int MPI_Win_fence(int assert, MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_fence", "**mpi_win_fence %A %W", assert, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_flush.c ++++ b/src/mpi/rma/win_flush.c +@@ -27,10 +27,6 @@ int MPI_Win_flush(int rank, MPI_Win win) __attribute__ ((weak, alias("PMPI_Win_f + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_flush +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_flush - Complete all outstanding RMA operations at the given target. + +@@ -120,11 +116,11 @@ int MPI_Win_flush(int rank, MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_flush", "**mpi_win_flush %d %W", rank, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_flush_all.c ++++ b/src/mpi/rma/win_flush_all.c +@@ -27,10 +27,6 @@ int MPI_Win_flush_all(MPI_Win win) __attribute__ ((weak, alias("PMPI_Win_flush_a + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_flush_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_flush_all - Complete all outstanding RMA operations at all targets + +@@ -114,11 +110,11 @@ int MPI_Win_flush_all(MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_flush_all", "**mpi_win_flush_all %W", win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_flush_local.c ++++ b/src/mpi/rma/win_flush_local.c +@@ -28,10 +28,6 @@ int MPI_Win_flush_local(int rank, MPI_Win win) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_flush_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_flush_local - Complete locally all outstanding RMA operations at the + given target +@@ -123,11 +119,11 @@ int MPI_Win_flush_local(int rank, MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_flush_local", "**mpi_win_flush_local %d %W", rank, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_flush_local_all.c ++++ b/src/mpi/rma/win_flush_local_all.c +@@ -27,10 +27,6 @@ int MPI_Win_flush_local_all(MPI_Win win) __attribute__ ((weak, alias("PMPI_Win_f + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_flush_local_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_flush_local_all - Complete locally all outstanding RMA operations at all targets + +@@ -112,11 +108,11 @@ int MPI_Win_flush_local_all(MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_flush_local_all", "**mpi_win_flush_local_all %W", win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_free.c ++++ b/src/mpi/rma/win_free.c +@@ -27,10 +27,6 @@ int MPI_Win_free(MPI_Win * win) __attribute__ ((weak, alias("PMPI_Win_free"))); + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_free - Free an MPI RMA window + +@@ -131,11 +127,11 @@ int MPI_Win_free(MPI_Win * win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_free", "**mpi_win_free %p", win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_get_group.c ++++ b/src/mpi/rma/win_get_group.c +@@ -28,10 +28,6 @@ int MPI_Win_get_group(MPI_Win win, MPI_Group * group) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_get_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_get_group - Get the MPI Group of the window object + +@@ -121,11 +117,11 @@ int MPI_Win_get_group(MPI_Win win, MPI_Group * group) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_get_group", "**mpi_win_get_group %W %p", win, group); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_get_info.c ++++ b/src/mpi/rma/win_get_info.c +@@ -28,10 +28,6 @@ int MPI_Win_get_info(MPI_Win win, MPI_Info * info_used) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_get_info - Returns a new info object containing the hints of the window + associated with win. +@@ -129,11 +125,11 @@ int MPI_Win_get_info(MPI_Win win, MPI_Info * info_used) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_get_info", "**mpi_win_get_info %W %p", win, info_used); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_get_name.c ++++ b/src/mpi/rma/win_get_name.c +@@ -28,10 +28,6 @@ int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_get_name +-#undef FCNAME +-#define FCNAME "MPI_Win_get_name" + + /*@ + MPI_Win_get_name - Get the print name associated with the MPI RMA window +@@ -114,11 +110,11 @@ int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_get_name", "**mpi_win_get_name %W %p %p", win, win_name, + resultlen); + } +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/rma/win_lock.c ++++ b/src/mpi/rma/win_lock.c +@@ -28,10 +28,6 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_lock - Begin an RMA access epoch at the target process. + +@@ -154,12 +150,12 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_lock", "**mpi_win_lock %d %d %A %W", lock_type, rank, + assert, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_lock_all.c ++++ b/src/mpi/rma/win_lock_all.c +@@ -27,10 +27,6 @@ int MPI_Win_lock_all(int assert, MPI_Win win) __attribute__ ((weak, alias("PMPI_ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_lock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_lock_all - Begin an RMA access epoch at all processes on the given window. + +@@ -146,11 +142,11 @@ int MPI_Win_lock_all(int assert, MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_lock_all", "**mpi_win_lock_all %A %W", assert, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_post.c ++++ b/src/mpi/rma/win_post.c +@@ -28,10 +28,6 @@ int MPI_Win_post(MPI_Group group, int assert, MPI_Win win) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_post +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_post - Start an RMA exposure epoch + +@@ -129,11 +125,11 @@ int MPI_Win_post(MPI_Group group, int assert, MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_post", "**mpi_win_post %G %A %W", group, assert, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_set_info.c ++++ b/src/mpi/rma/win_set_info.c +@@ -27,10 +27,6 @@ int MPI_Win_set_info(MPI_Win win, MPI_Info info) __attribute__ ((weak, alias("PM + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_set_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_set_info - Set new values for the hints of the window associated with + win. +@@ -128,11 +124,11 @@ int MPI_Win_set_info(MPI_Win win, MPI_Info info) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_set_info", "**mpi_win_set_info %W %I", win, info); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_set_name.c ++++ b/src/mpi/rma/win_set_name.c +@@ -28,10 +28,6 @@ int MPI_Win_set_name(MPI_Win win, const char *win_name) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_set_name +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_set_name - Set the print name for an MPI RMA window + +@@ -107,10 +103,10 @@ int MPI_Win_set_name(MPI_Win win, const char *win_name) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_set_name", "**mpi_win_set_name %W %s", win, win_name); + } +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/rma/win_shared_query.c ++++ b/src/mpi/rma/win_shared_query.c +@@ -28,10 +28,6 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint * size, int *disp_unit, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_shared_query +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_shared_query - Query the size and base pointer for a patch of a shared + memory window. +@@ -140,12 +136,12 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint * size, int *disp_unit, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_shared_query", "**mpi_win_shared_query %W %d %p %p", + win, rank, size, baseptr); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_start.c ++++ b/src/mpi/rma/win_start.c +@@ -28,10 +28,6 @@ int MPI_Win_start(MPI_Group group, int assert, MPI_Win win) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_start - Start an RMA access epoch for MPI + +@@ -131,11 +127,11 @@ int MPI_Win_start(MPI_Group group, int assert, MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_start", "**mpi_win_start %G %A %W", group, assert, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_sync.c ++++ b/src/mpi/rma/win_sync.c +@@ -27,10 +27,6 @@ int MPI_Win_sync(MPI_Win win) __attribute__ ((weak, alias("PMPI_Win_sync"))); + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_sync +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_sync - Synchronize public and private copies of the given window. + +@@ -114,11 +110,11 @@ int MPI_Win_sync(MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_sync", "**mpi_win_sync %W", win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_test.c ++++ b/src/mpi/rma/win_test.c +@@ -27,10 +27,6 @@ int MPI_Win_test(MPI_Win win, int *flag) __attribute__ ((weak, alias("PMPI_Win_t + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_test - Test whether an RMA exposure epoch has completed + +@@ -115,11 +111,11 @@ int MPI_Win_test(MPI_Win win, int *flag) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_test", "**mpi_win_test %W %p", win, flag); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_unlock.c ++++ b/src/mpi/rma/win_unlock.c +@@ -27,10 +27,6 @@ int MPI_Win_unlock(int rank, MPI_Win win) __attribute__ ((weak, alias("PMPI_Win_ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_unlock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_unlock - Completes an RMA access epoch at the target process + +@@ -115,11 +111,11 @@ int MPI_Win_unlock(int rank, MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_unlock", "**mpi_win_unlock %d %W", rank, win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_unlock_all.c ++++ b/src/mpi/rma/win_unlock_all.c +@@ -27,10 +27,6 @@ int MPI_Win_unlock_all(MPI_Win win) __attribute__ ((weak, alias("PMPI_Win_unlock + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_unlock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_unlock_all - Completes an RMA access epoch at all processes on the given window. + +@@ -117,11 +113,11 @@ int MPI_Win_unlock_all(MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_unlock_all", "**mpi_win_unlock_all %W", win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/win_wait.c ++++ b/src/mpi/rma/win_wait.c +@@ -27,10 +27,6 @@ int MPI_Win_wait(MPI_Win win) __attribute__ ((weak, alias("PMPI_Win_wait"))); + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Win_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Win_wait - Completes an RMA exposure epoch begun with MPI_Win_post + +@@ -105,11 +101,11 @@ int MPI_Win_wait(MPI_Win win) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_win_wait", "**mpi_win_wait %W", win); + } + #endif +- mpi_errno = MPIR_Err_return_win(win_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_win(win_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/rma/winutil.c ++++ b/src/mpi/rma/winutil.c +@@ -13,8 +13,7 @@ + #endif + + /* Preallocated window objects */ +-MPIR_Win MPIR_Win_direct[MPIR_WIN_PREALLOC] = { {0} +-}; ++MPIR_Win MPIR_Win_direct[MPIR_WIN_PREALLOC]; + + MPIR_Object_alloc_t MPIR_Win_mem = { 0, 0, 0, 0, MPIR_WIN, + sizeof(MPIR_Win), MPIR_Win_direct, +--- a/src/mpi/romio/adio/Makefile.mk ++++ b/src/mpi/romio/adio/Makefile.mk +@@ -23,6 +23,7 @@ noinst_HEADERS += \ + adio/include/mpiu_external32.h \ + adio/include/hint_fns.h + ++include $(top_srcdir)/adio/ad_daos/Makefile.mk + include $(top_srcdir)/adio/ad_gpfs/Makefile.mk + include $(top_srcdir)/adio/ad_gpfs/bg/Makefile.mk + include $(top_srcdir)/adio/ad_gpfs/pe/Makefile.mk +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/Makefile.mk +@@ -0,0 +1,32 @@ ++## -*- Mode: Makefile; -*- ++## vim: set ft=automake : ++## ++## (C) 2018 by Intel Corporation ++## ++## GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++## The Government's rights to use, modify, reproduce, release, perform, display, ++## or disclose this software are subject to the terms of the Apache License as ++## provided in Contract No. 8F-30005. ++## Any reproduction of computer software, computer software documentation, or ++## portions thereof marked with this legend must also reproduce the markings. ++## ++ ++if BUILD_AD_DAOS ++ ++noinst_HEADERS += adio/ad_daos/ad_daos.h ++ ++romio_other_sources += \ ++ adio/ad_daos/ad_daos.c \ ++ adio/ad_daos/ad_daos_close.c \ ++ adio/ad_daos/ad_daos_common.c \ ++ adio/ad_daos/ad_daos_fcntl.c \ ++ adio/ad_daos/ad_daos_features.c \ ++ adio/ad_daos/ad_daos_hhash.c \ ++ adio/ad_daos/ad_daos_hints.c \ ++ adio/ad_daos/ad_daos_io.c \ ++ adio/ad_daos/ad_daos_io_str.c \ ++ adio/ad_daos/ad_daos_open.c \ ++ adio/ad_daos/ad_daos_resize.c ++ ++endif BUILD_AD_DAOS ++ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos.c +@@ -0,0 +1,47 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++ ++/* adioi.h has the ADIOI_Fns_struct define */ ++#include "adioi.h" ++ ++struct ADIOI_Fns_struct ADIO_DAOS_operations = { ++ ADIOI_DAOS_Open, /* Open */ ++ ADIOI_DAOS_OpenColl, /* OpenColl */ ++ ADIOI_DAOS_ReadContig, /* ReadContig */ ++ ADIOI_DAOS_WriteContig, /* WriteContig */ ++ ADIOI_DAOS_ReadStridedColl, /* ReadStridedColl */ ++ ADIOI_DAOS_WriteStridedColl, /* WriteStridedColl */ ++ ADIOI_GEN_SeekIndividual, /* SeekIndividual */ ++ ADIOI_DAOS_Fcntl, /* Fcntl */ ++ ADIOI_DAOS_SetInfo, /* SetInfo */ ++ ADIOI_DAOS_ReadStrided, /* ReadStrided */ ++ ADIOI_DAOS_WriteStrided, /* WriteStrided */ ++ ADIOI_DAOS_Close, /* Close */ ++ ADIOI_DAOS_IReadContig, /* IreadContig */ ++ ADIOI_DAOS_IWriteContig, /* IwriteContig */ ++ ADIOI_FAKE_IODone, /* ReadDone */ ++ ADIOI_FAKE_IODone, /* WriteDone */ ++ ADIOI_FAKE_IOComplete, /* ReadComplete */ ++ ADIOI_FAKE_IOComplete, /* WriteComplete */ ++ ADIOI_DAOS_IreadStrided, /* IreadStrided */ ++ ADIOI_DAOS_IwriteStrided, /* IwriteStrided */ ++ ADIOI_DAOS_Flush, /* Flush */ ++ ADIOI_DAOS_Resize, /* Resize */ ++ ADIOI_DAOS_Delete, /* Delete */ ++ ADIOI_DAOS_Feature, /* Features */ ++ "DAOS: ROMIO driver for DAOS", ++ ADIOI_DAOS_IreadStridedColl, /* IreadStridedColl */ ++ ADIOI_DAOS_IwriteStridedColl, /* IwriteStridedColl */ ++}; +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos.h +@@ -0,0 +1,255 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#ifndef AD_DAOS_H_INCLUDED ++#define AD_DAOS_H_INCLUDED ++ ++#include "adio.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* #define D_PRINT_IO */ ++/* #define D_PRINT_IO_MEM */ ++ ++#define PRINT_MSG(str, fmt, ...) \ ++ do { \ ++ fprintf(str, "%s:%d %s() - " fmt"\n" , \ ++ __FILE__, __LINE__, __func__, ##__VA_ARGS__); \ ++ } while (0) ++ ++struct adio_daos_hdl { ++ d_list_t entry; ++ uuid_t uuid; ++ daos_handle_t open_hdl; ++ int ref; ++ int type; ++}; ++ ++struct ADIO_DAOS_cont { ++ /** container uuid */ ++ uuid_t cuuid; ++ /** pool uuid */ ++ uuid_t puuid; ++ /** Container name (Path to the file opened) */ ++ char *cont_name; ++ /** Object name (File name) */ ++ char *obj_name; ++ /** pool open handle */ ++ daos_handle_t poh; ++ /** container open handle */ ++ daos_handle_t coh; ++ /** flat namespace mount */ ++ dfs_t *dfs; ++ /** dfs object for file */ ++ dfs_obj_t *obj; ++ /** Array Object ID for the MPI file */ ++ daos_obj_id_t oid; ++ /** Array OH for the MPI file */ ++ daos_handle_t oh; ++ /** Object class of the DAOS object associated with the file */ ++ daos_oclass_id_t obj_class; ++ /** data size to store in a dkey */ ++ daos_size_t chunk_size; ++ /** file open mode */ ++ unsigned int amode; ++ /** Event queue to store all async requests on file */ ++ daos_handle_t eqh; ++ /** pool handle for directory holding the file object */ ++ struct adio_daos_hdl *p; ++ /** container handle for directory holding the file object */ ++ struct adio_daos_hdl *c; ++}; ++ ++struct ADIO_DAOS_req { ++ MPI_Request req; ++ MPI_Offset nbytes; ++ daos_event_t daos_event; ++ daos_array_iod_t iod; ++ daos_range_t rg; ++ d_sg_list_t sgl; ++ d_iov_t iov; ++ daos_range_t *rgs; ++ d_iov_t *iovs; ++}; ++ ++static inline void ++adio_daos_sync_ranks(MPI_Comm comm) ++{ ++ daos_epoch_t e = daos_ts2epoch(); ++ daos_epoch_t ge; ++ ++ MPI_Allreduce(&e, &ge, 1, MPI_UINT64_T, MPI_MAX, comm); ++ ++ e = daos_ts2epoch(); ++ if (ge > e) { ++ struct timespec ts; ++ ++ ts.tv_sec = 0; ++ ts.tv_nsec = ge - e; ++ nanosleep(&ts, NULL); ++ } ++} ++ ++enum { ++ HANDLE_POOL, ++ HANDLE_CO, ++ HANDLE_OBJ ++}; ++ ++static inline void ++handle_share(daos_handle_t *hdl, int type, int rank, daos_handle_t parent, ++ MPI_Comm comm) ++{ ++ d_iov_t ghdl = { NULL, 0, 0 }; ++ int rc; ++ ++ if (rank == 0) { ++ /** fetch size of global handle */ ++ if (type == HANDLE_POOL) ++ rc = daos_pool_local2global(*hdl, &ghdl); ++ else if (type == HANDLE_CO) ++ rc = daos_cont_local2global(*hdl, &ghdl); ++ else { ++ assert (type == HANDLE_OBJ); ++ rc = daos_array_local2global(*hdl, &ghdl); ++ } ++ assert(rc == 0); ++ } ++ ++ /** broadcast size of global handle to all peers */ ++ rc = MPI_Bcast(&ghdl.iov_buf_len, 1, MPI_UINT64_T, 0, comm); ++ assert(rc == MPI_SUCCESS); ++ ++ /** allocate buffer for global pool handle */ ++ ghdl.iov_buf = ADIOI_Malloc(ghdl.iov_buf_len); ++ ghdl.iov_len = ghdl.iov_buf_len; ++ ++ if (rank == 0) { ++ /** generate actual global handle to share with peer tasks */ ++ if (type == HANDLE_POOL) ++ rc = daos_pool_local2global(*hdl, &ghdl); ++ else if (type == HANDLE_CO) ++ rc = daos_cont_local2global(*hdl, &ghdl); ++ else ++ rc = daos_array_local2global(*hdl, &ghdl); ++ assert(rc == 0); ++ } ++ ++ /** broadcast global handle to all peers */ ++ rc = MPI_Bcast(ghdl.iov_buf, ghdl.iov_len, MPI_BYTE, 0, comm); ++ assert(rc == MPI_SUCCESS); ++ ++ if (rank != 0) { ++ /** unpack global handle */ ++ if (type == HANDLE_POOL) ++ rc = daos_pool_global2local(ghdl, hdl); ++ else if (type == HANDLE_CO) ++ rc = daos_cont_global2local(parent, ghdl, hdl); ++ else ++ rc = daos_array_global2local(parent, ghdl, hdl); ++ assert(rc == 0); ++ } ++ ++ ADIOI_Free(ghdl.iov_buf); ++ MPI_Barrier(comm); ++} ++ ++/** initialize the DAOS library and hashtables for handles */ ++void ADIOI_DAOS_Init(int *error_code); ++ ++/** Container/Pool Handle Hash functions */ ++int adio_daos_hash_init(void); ++void adio_daos_hash_finalize(void); ++struct adio_daos_hdl *adio_daos_poh_lookup(const uuid_t uuid); ++int adio_daos_poh_insert(uuid_t uuid, daos_handle_t poh, ++ struct adio_daos_hdl **hdl); ++int adio_daos_poh_lookup_connect(uuid_t uuid, struct adio_daos_hdl **hdl); ++void adio_daos_poh_release(struct adio_daos_hdl *hdl); ++struct adio_daos_hdl *adio_daos_coh_lookup(const uuid_t uuid); ++int adio_daos_coh_insert(uuid_t uuid, daos_handle_t coh, ++ struct adio_daos_hdl **hdl); ++int adio_daos_coh_lookup_create(daos_handle_t poh, uuid_t uuid, bool create, ++ struct adio_daos_hdl **hdl); ++void adio_daos_coh_release(struct adio_daos_hdl *hdl); ++ ++int ADIOI_DAOS_aio_free_fn(void *extra_state); ++int ADIOI_DAOS_aio_poll_fn(void *extra_state, MPI_Status *status); ++int ADIOI_DAOS_aio_wait_fn(int count, void ** array_of_states, ++ double timeout, MPI_Status *status); ++int ADIOI_DAOS_err(const char *myname, const char *filename, int line, int rc); ++ ++void ADIOI_DAOS_Open(ADIO_File fd, int *error_code); ++void ADIOI_DAOS_OpenColl(ADIO_File fd, int rank, ++ int access_mode, int *error_code); ++int ADIOI_DAOS_Feature(ADIO_File fd, int flag); ++void ADIOI_DAOS_Flush(ADIO_File fd, int *error_code); ++void ADIOI_DAOS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); ++void ADIOI_DAOS_Close(ADIO_File fd, int *error_code); ++void ADIOI_DAOS_Delete(const char *filename, int *error_code); ++void ADIOI_DAOS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, ++ int *error_code); ++void ADIOI_DAOS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); ++void ADIOI_DAOS_ReadContig(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code); ++void ADIOI_DAOS_WriteContig(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code); ++void ADIOI_DAOS_IReadContig(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, MPI_Request *request, ++ int *error_code); ++void ADIOI_DAOS_IWriteContig(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, MPI_Request *request, ++ int *error_code); ++void ADIOI_DAOS_ReadStrided(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code); ++void ADIOI_DAOS_WriteStrided(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code); ++void ADIOI_DAOS_IreadStrided(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Request *request, ++ int *error_code); ++void ADIOI_DAOS_IwriteStrided(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, MPI_Request *request, ++ int *error_code); ++void ADIOI_DAOS_ReadStridedColl(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code); ++void ADIOI_DAOS_WriteStridedColl(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code); ++void ADIOI_DAOS_IreadStridedColl(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Request *request, ++ int *error_code); ++void ADIOI_DAOS_IwriteStridedColl(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, MPI_Request *request, ++ int *error_code); ++#endif /* AD_DAOS_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_close.c +@@ -0,0 +1,78 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++ ++void ADIOI_DAOS_Close(ADIO_File fd, int *error_code) ++{ ++ int rank; ++ struct ADIO_DAOS_cont *cont = (struct ADIO_DAOS_cont *)fd->fs_ptr; ++ static char myname[] = "ADIOI_DAOS_CLOSE"; ++ int rc; ++ ++ if (cont->amode == DAOS_COO_RW) ++ adio_daos_sync_ranks(fd->comm); ++ else ++ MPI_Barrier(fd->comm); ++ ++ MPI_Comm_rank(fd->comm, &rank); ++ ++ if (rank == 0) { ++ /* release the dfs object handle for the file. */ ++ rc = dfs_release(cont->obj); ++ if (rc) { ++ PRINT_MSG(stderr, "dfs_release() failed (%d)\n", rc); ++ goto bcast_rc; ++ } ++ ++ rc = dfs_umount(cont->dfs); ++ if (rc) { ++ PRINT_MSG(stderr, "dfs_umount() failed (%d)\n", rc); ++ goto bcast_rc; ++ } ++ } ++ ++bcast_rc: ++ /* bcast the return code to the other ranks */ ++ MPI_Bcast(&rc, 1, MPI_INT, 0, fd->comm); ++ if (rc != 0) { ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, rc); ++ return; ++ } ++ ++ /* array is closed on rank 0 in dfs_release(), close it on the other ranks */ ++ if (rank != 0) { ++ rc = daos_array_close(cont->oh, NULL); ++ if (rc != 0) { ++ PRINT_MSG(stderr, "daos_array_close() failed (%d)\n", rc); ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, rc); ++ return; ++ } ++ } ++ ++ /* decrement ref count on the container and pool in the hashtable. */ ++ adio_daos_coh_release(cont->c); ++ cont->c = NULL; ++ adio_daos_poh_release(cont->p); ++ cont->p = NULL; ++ ++ ADIOI_Free(cont->obj_name); ++ ADIOI_Free(cont->cont_name); ++ ADIOI_Free(fd->fs_ptr); ++ fd->fs_ptr = NULL; ++ ++ *error_code = MPI_SUCCESS; ++} ++/* ++ * vim: ts=8 sts=4 sw=4 noexpandtab ++ */ +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_common.c +@@ -0,0 +1,178 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++#include ++ ++int ADIOI_DAOS_Initialized = MPI_KEYVAL_INVALID; ++ ++int ADIOI_DAOS_End(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state) ++{ ++ int error_code = MPI_SUCCESS; ++ static char myname[] = "ADIOI_DAOS_END"; ++ int rc; ++ ++ adio_daos_hash_finalize(); ++ rc = daos_fini(); ++ ++ if (rc != 0) { ++ error_code = ADIOI_DAOS_err(myname, "DAOS Finalize Error", __LINE__, rc); ++ return error_code; ++ } ++ ++ MPI_Keyval_free(&keyval); ++ return error_code; ++} ++ ++void ADIOI_DAOS_Init(int *error_code) ++{ ++ static char myname[] = "ADIOI_DAOS_INIT"; ++ int rc; ++ ++ *error_code = MPI_SUCCESS; ++ ++ /** nothing to do if already initialized */ ++ if (ADIOI_DAOS_Initialized != MPI_KEYVAL_INVALID) ++ return; ++ ++ rc = daos_init(); ++ if (rc) { ++ *error_code = ADIOI_DAOS_err(myname, "DAOS Init Error", __LINE__, rc); ++ fprintf(stderr, "daos_init() failed with %d\n", rc); ++ return; ++ } ++ ++ rc = adio_daos_hash_init(); ++ if (rc < 0) { ++ *error_code = ADIOI_DAOS_err(myname, "DAOS Init Error", __LINE__, rc); ++ fprintf(stderr, "Failed to init daos handle hash table\n"); ++ return; ++ } ++ ++ /** attach to comm_self destroy to finalize DAOS */ ++ MPI_Keyval_create(MPI_NULL_COPY_FN, ADIOI_DAOS_End, ++ &ADIOI_DAOS_Initialized, (void *) 0); ++ MPI_Attr_put(MPI_COMM_SELF, ADIOI_DAOS_Initialized, (void *) 0); ++} ++ ++int ADIOI_DAOS_error_convert(int error) ++{ ++ switch (error) ++ { ++ case -DER_NO_PERM: ++ return MPI_ERR_ACCESS; ++ case -DER_ENOENT: ++ case -DER_NONEXIST: ++ return MPI_ERR_NO_SUCH_FILE; ++ case -DER_IO: ++ return MPI_ERR_IO; ++ case -DER_EXIST: ++ return MPI_ERR_FILE_EXISTS; ++ case -DER_NOTDIR: ++ return MPI_ERR_BAD_FILE; ++ case -DER_INVAL: ++ case -DER_STALE: ++ return MPI_ERR_FILE; ++ case -DER_NOSPACE: ++ return MPI_ERR_NO_SPACE; ++ case -DER_NOSYS: ++ return MPI_ERR_UNSUPPORTED_OPERATION; ++ case -DER_NOMEM: ++ return MPI_ERR_INTERN; ++ default: ++ return MPI_UNDEFINED; ++ } ++} ++ ++int ADIOI_DAOS_err(const char *myname, const char *filename, int line, int rc) ++{ ++ int error_code = MPI_SUCCESS; ++ ++ if (rc == 0) ++ return MPI_SUCCESS; ++ ++ switch (rc) { ++ case -DER_NO_PERM: ++ case -EPERM: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, myname, ++ line, MPI_ERR_ACCESS, ++ "**fileaccess", "**fileaccess %s", ++ filename); ++ break; ++ case -DER_ENOENT: ++ case -DER_NONEXIST: ++ case -DER_NO_HDL: ++ case -ENOENT: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, myname, ++ line, MPI_ERR_NO_SUCH_FILE, ++ "**filenoexist", "**filenoexist %s", ++ filename); ++ break; ++ case -DER_IO: ++ case -EIO: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ myname, line, MPI_ERR_IO, "**io", ++ "**io %s", filename); ++ break; ++ case -DER_EXIST: ++ case -EEXIST: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, myname, ++ line, MPI_ERR_FILE_EXISTS, ++ "**fileexist", 0); ++ break; ++ case -DER_NOTDIR: ++ case -ENOTDIR: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, ++ myname, line, ++ MPI_ERR_BAD_FILE, ++ "**filenamedir", "**filenamedir %s", ++ filename); ++ break; ++ case -DER_NOSPACE: ++ case -ENOSPC: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, myname, line, ++ MPI_ERR_NO_SPACE, "**filenospace", 0); ++ break; ++ case -DER_INVAL: ++ case -EINVAL: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, myname, line, ++ MPI_ERR_ARG, "**arg", 0); ++ break; ++ case -DER_NOSYS: ++ case -ENOSYS: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ myname, line, ++ MPI_ERR_UNSUPPORTED_OPERATION, ++ "**fileopunsupported", 0); ++ break; ++ case -DER_NOMEM: ++ case -ENOMEM: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ myname, line, MPI_ERR_NO_MEM, ++ "**allocmem", 0); ++ break; ++ default: ++ error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ myname, line, MPI_ERR_IO, "**io", ++ "**io %s", filename); ++ break; ++ } ++ ++ return error_code; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_fcntl.c +@@ -0,0 +1,46 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++ ++void ADIOI_DAOS_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, ++ int *error_code) ++{ ++ int rc; ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ static char myname[] = "ADIOI_DAOS_FCNTL"; ++ ++ switch(flag) { ++ case ADIO_FCNTL_GET_FSIZE: ++ { ++ daos_size_t fsize; ++ ++ rc = daos_array_get_size(cont->oh, DAOS_TX_NONE, &fsize, NULL); ++ if (rc != 0) { ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, rc); ++ break; ++ } ++ *error_code = MPI_SUCCESS; ++ fcntl_struct->fsize = (ADIO_Offset)fsize; ++ break; ++ } ++ case ADIO_FCNTL_SET_DISKSPACE: ++ case ADIO_FCNTL_SET_ATOMICITY: ++ default: ++ *error_code = MPIO_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, ++ myname, __LINE__, ++ MPI_ERR_ARG, ++ "**flag", "**flag %d", flag); ++ } ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_features.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "adio.h" ++#include "ad_daos.h" ++ ++int ADIOI_DAOS_Feature(ADIO_File fd, int flag) ++{ ++ switch(flag) { ++ case ADIO_TWO_PHASE: ++ case ADIO_SCALABLE_OPEN: ++ case ADIO_SCALABLE_RESIZE: ++ case ADIO_SHARED_FP: ++ case ADIO_LOCKS: ++ case ADIO_SEQUENTIAL: ++ case ADIO_DATA_SIEVING_WRITES: ++ case ADIO_ATOMIC_MODE: ++ case ADIO_UNLINK_AFTER_CLOSE: ++ default: ++ return 0; ++ } ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_hhash.c +@@ -0,0 +1,317 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++#include "gurt/hash.h" ++#include ++ ++static struct d_hash_table *coh_hash; ++static struct d_hash_table *poh_hash; ++ ++enum { ++ DAOS_POOL, ++ DAOS_CONT, ++}; ++ ++static inline struct adio_daos_hdl * ++hdl_obj(d_list_t *rlink) ++{ ++ return container_of(rlink, struct adio_daos_hdl, entry); ++} ++ ++static bool ++key_cmp(struct d_hash_table *htable, d_list_t *rlink, ++ const void *key, unsigned int ksize) ++{ ++ struct adio_daos_hdl *hdl = hdl_obj(rlink); ++ ++ return (uuid_compare(hdl->uuid, key) == 0); ++} ++ ++static void ++rec_addref(struct d_hash_table *htable, d_list_t *rlink) ++{ ++ hdl_obj(rlink)->ref++; ++} ++ ++static bool ++rec_decref(struct d_hash_table *htable, d_list_t *rlink) ++{ ++ struct adio_daos_hdl *hdl = hdl_obj(rlink); ++ ++ assert(hdl->ref > 0); ++ hdl->ref--; ++ return (hdl->ref == 0); ++} ++ ++static void ++rec_free(struct d_hash_table *htable, d_list_t *rlink) ++{ ++ struct adio_daos_hdl *hdl = hdl_obj(rlink); ++ ++ assert(d_hash_rec_unlinked(&hdl->entry)); ++ assert(hdl->ref == 0); ++ ++ if (hdl->type == DAOS_POOL) ++ daos_pool_disconnect(hdl->open_hdl, NULL); ++ else if (hdl->type == DAOS_CONT) ++ daos_cont_close(hdl->open_hdl, NULL); ++ else ++ assert(0); ++ ADIOI_Free(hdl); ++} ++ ++static d_hash_table_ops_t hdl_hash_ops = { ++ .hop_key_cmp = key_cmp, ++ .hop_rec_addref = rec_addref, ++ .hop_rec_decref = rec_decref, ++ .hop_rec_free = rec_free ++}; ++ ++int ++adio_daos_hash_init(void) ++{ ++ int rc; ++ ++ rc = d_hash_table_create(0, 16, NULL, &hdl_hash_ops, &poh_hash); ++ if (rc) ++ return rc; ++ ++ return d_hash_table_create(0, 16, NULL, &hdl_hash_ops, &coh_hash); ++} ++ ++void ++adio_daos_hash_finalize(void) ++{ ++ d_hash_table_destroy(coh_hash, true /* force */); ++ d_hash_table_destroy(poh_hash, true /* force */); ++} ++ ++struct adio_daos_hdl * ++adio_daos_poh_lookup(const uuid_t uuid) ++{ ++ d_list_t *rlink; ++ ++ rlink = d_hash_rec_find(poh_hash, uuid, sizeof(uuid_t)); ++ if (rlink == NULL) ++ return NULL; ++ ++ return hdl_obj(rlink); ++} ++ ++void ++adio_daos_poh_release(struct adio_daos_hdl *hdl) ++{ ++ d_hash_rec_decref(poh_hash, &hdl->entry); ++} ++ ++int ++adio_daos_poh_insert(uuid_t uuid, daos_handle_t poh, struct adio_daos_hdl **hdl) ++{ ++ struct adio_daos_hdl *phdl; ++ int rc; ++ ++ phdl = (struct adio_daos_hdl *)ADIOI_Calloc ++ (1, sizeof(struct adio_daos_hdl)); ++ if (phdl == NULL) ++ return -1; ++ ++ phdl->type = DAOS_POOL; ++ uuid_copy(phdl->uuid, uuid); ++ phdl->open_hdl.cookie = poh.cookie; ++ ++ rc = d_hash_rec_insert(poh_hash, phdl->uuid, sizeof(uuid_t), &phdl->entry, ++ true); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to add phdl to hashtable\n", rc); ++ goto free_hdl; ++ } ++ ++ d_hash_rec_addref(poh_hash, &phdl->entry); ++ *hdl = phdl; ++ ++ return 0; ++ ++free_hdl: ++ ADIOI_Free(phdl); ++ return rc; ++} ++ ++int ++adio_daos_poh_lookup_connect(uuid_t uuid, struct adio_daos_hdl **hdl) ++{ ++ struct adio_daos_hdl *phdl; ++ int rc; ++ ++ phdl = adio_daos_poh_lookup(uuid); ++ if (phdl != NULL) { ++ *hdl = phdl; ++ return 0; ++ } ++ ++ phdl = (struct adio_daos_hdl *)ADIOI_Calloc ++ (1, sizeof(struct adio_daos_hdl)); ++ if (phdl == NULL) ++ return -1; ++ ++ phdl->type = DAOS_POOL; ++ uuid_copy(phdl->uuid, uuid); ++ ++ /** Get the SVCL and Server group from env variables. This is temp as those ++ * won't be needed later */ ++ char *svcl_str = NULL; ++ char *group = NULL; ++ daos_pool_info_t pool_info; ++ d_rank_list_t *svcl = NULL; ++ ++ svcl_str = getenv ("DAOS_SVCL"); ++ if (svcl_str != NULL) { ++ svcl = daos_rank_list_parse(svcl_str, ":"); ++ if (svcl == NULL) { ++ PRINT_MSG(stderr, "Failed to parse SVC list env\n"); ++ rc = -1; ++ goto free_hdl; ++ } ++ } ++ group = getenv ("DAOS_GROUP"); ++ ++ rc = daos_pool_connect(uuid, group, svcl, DAOS_PC_RW, &phdl->open_hdl, ++ &pool_info, NULL); ++ d_rank_list_free(svcl); ++ if (rc < 0) { ++ PRINT_MSG(stderr, "Failed to connect to pool (%d)\n", rc); ++ goto free_hdl; ++ } ++ ++ rc = d_hash_rec_insert(poh_hash, phdl->uuid, sizeof(uuid_t), &phdl->entry, ++ true); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to add phdl to hashtable\n", rc); ++ goto err_pool; ++ } ++ ++ d_hash_rec_addref(poh_hash, &phdl->entry); ++ *hdl = phdl; ++ ++ return 0; ++ ++err_pool: ++ daos_pool_disconnect(phdl->open_hdl, NULL); ++free_hdl: ++ ADIOI_Free(phdl); ++ return rc; ++} ++ ++struct adio_daos_hdl * ++adio_daos_coh_lookup(const uuid_t uuid) ++{ ++ d_list_t *rlink; ++ ++ rlink = d_hash_rec_find(coh_hash, uuid, sizeof(uuid_t)); ++ if (rlink == NULL) ++ return NULL; ++ ++ return hdl_obj(rlink); ++} ++ ++void ++adio_daos_coh_release(struct adio_daos_hdl *hdl) ++{ ++ d_hash_rec_decref(coh_hash, &hdl->entry); ++} ++ ++int ++adio_daos_coh_insert(uuid_t uuid, daos_handle_t coh, struct adio_daos_hdl **hdl) ++{ ++ struct adio_daos_hdl *co_hdl; ++ int rc; ++ ++ co_hdl = (struct adio_daos_hdl *)ADIOI_Calloc ++ (1, sizeof(struct adio_daos_hdl)); ++ if (co_hdl == NULL) ++ return -1; ++ ++ co_hdl->type = DAOS_CONT; ++ uuid_copy(co_hdl->uuid, uuid); ++ co_hdl->open_hdl.cookie = coh.cookie; ++ ++ rc = d_hash_rec_insert(coh_hash, co_hdl->uuid, sizeof(uuid_t), ++ &co_hdl->entry, true); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to add co_hdl to hashtable\n", rc); ++ goto err_coh; ++ } ++ ++ d_hash_rec_addref(coh_hash, &co_hdl->entry); ++ *hdl = co_hdl; ++ ++ return 0; ++ ++err_coh: ++ ADIOI_Free(co_hdl); ++ return rc; ++} ++ ++int ++adio_daos_coh_lookup_create(daos_handle_t poh, uuid_t uuid, bool create, ++ struct adio_daos_hdl **hdl) ++{ ++ struct adio_daos_hdl *co_hdl; ++ int rc; ++ ++ co_hdl = adio_daos_coh_lookup(uuid); ++ if (co_hdl != NULL) { ++ *hdl = co_hdl; ++ return 0; ++ } ++ ++ co_hdl = (struct adio_daos_hdl *)ADIOI_Calloc ++ (1, sizeof(struct adio_daos_hdl)); ++ if (co_hdl == NULL) ++ return -1; ++ ++ co_hdl->type = DAOS_CONT; ++ uuid_copy(co_hdl->uuid, uuid); ++ ++ /* Try to open the DAOS container first (the parent directory) */ ++ rc = daos_cont_open(poh, uuid, DAOS_COO_RW, &co_hdl->open_hdl, ++ NULL, NULL); ++ /* If fails with NOEXIST we can create it then reopen if create mode */ ++ if (rc == -DER_NONEXIST && create) { ++ rc = daos_cont_create(poh, uuid, NULL, NULL); ++ if (rc == 0) ++ rc = daos_cont_open(poh, uuid, DAOS_COO_RW, ++ &co_hdl->open_hdl, NULL, NULL); ++ } ++ ++ if (rc != 0) ++ goto free_coh; ++ ++ rc = d_hash_rec_insert(coh_hash, co_hdl->uuid, sizeof(uuid_t), ++ &co_hdl->entry, true); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to add co_hdl to hashtable\n", rc); ++ goto err_cont; ++ } ++ ++ d_hash_rec_addref(coh_hash, &co_hdl->entry); ++ *hdl = co_hdl; ++ ++ return 0; ++ ++err_cont: ++ daos_cont_close(co_hdl->open_hdl, NULL); ++free_coh: ++ ADIOI_Free(co_hdl); ++ return rc; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_hints.c +@@ -0,0 +1,49 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++ ++#include "hint_fns.h" ++ ++void ADIOI_DAOS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) ++{ ++ char *value; ++ int flag, tmp_value; ++ static char myname[] = "ADIOI_DAOS_SETINFO"; ++ ++ if ((fd->info) == MPI_INFO_NULL) { ++ /* part of the open call */ ++ MPI_Info_create(&(fd->info)); ++ ++ ADIOI_Info_set(fd->info, "romio_daos_chunk_size", "0"); ++ fd->hints->fs_hints.daos.chunk_size = 0; ++ ++ ADIOI_Info_set(fd->info, "romio_daos_obj_class", "DAOS_OC_UNKNOWN"); ++ fd->hints->fs_hints.daos.obj_class = DAOS_OC_UNKNOWN; ++ ++ if (users_info != MPI_INFO_NULL) { ++ /* Chunk size in each dkey */ ++ ADIOI_Info_check_and_install_int(fd, users_info, "romio_daos_chunk_size", ++ &(fd->hints->fs_hints.daos.chunk_size), myname, error_code); ++ ++ /* object class for each file */ ++ ADIOI_Info_check_and_install_int(fd, users_info, "romio_daos_obj_class", ++ &(fd->hints->fs_hints.daos.obj_class), myname, error_code); ++ } ++ } ++ ++ /* set the values for collective I/O and data sieving parameters */ ++ ADIOI_GEN_SetInfo(fd, users_info, error_code); ++ ++ *error_code = MPI_SUCCESS; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_io.c +@@ -0,0 +1,249 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++ ++#include "../../mpi-io/mpioimpl.h" ++#ifdef MPIO_BUILD_PROFILING ++#include "../../mpi-io/mpioprof.h" ++#endif ++#include "mpiu_greq.h" ++ ++enum { ++ DAOS_WRITE, ++ DAOS_READ ++}; ++ ++static MPIX_Grequest_class ADIOI_DAOS_greq_class = 0; ++ ++static void DAOS_IOContig(ADIO_File fd, void * buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ MPI_Request *request, int flag, int *error_code) ++{ ++ MPI_Count datatype_size; ++ uint64_t len; ++ daos_array_iod_t *iod, loc_iod; ++ daos_range_t *rg, loc_rg; ++ d_sg_list_t *sgl, loc_sgl; ++ d_iov_t *iov, loc_iov; ++ int ret; ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ struct ADIO_DAOS_req *aio_req; ++ static char myname[] = "ADIOI_DAOS_IOCONTIG"; ++ ++ MPI_Type_size_x(datatype, &datatype_size); ++ len = (ADIO_Offset)datatype_size * (ADIO_Offset)count; ++ ++ if (request) { ++ aio_req = (struct ADIO_DAOS_req*)ADIOI_Calloc(sizeof(struct ADIO_DAOS_req), 1); ++ daos_event_init(&aio_req->daos_event, DAOS_HDL_INVAL, NULL); ++ ++ iod = &aio_req->iod; ++ rg = &aio_req->rg; ++ sgl = &aio_req->sgl; ++ iov = &aio_req->iov; ++ ++ if (ADIOI_DAOS_greq_class == 0) { ++ MPIX_Grequest_class_create(ADIOI_GEN_aio_query_fn, ++ ADIOI_DAOS_aio_free_fn, MPIU_Greq_cancel_fn, ++ ADIOI_DAOS_aio_poll_fn, ADIOI_DAOS_aio_wait_fn, ++ &ADIOI_DAOS_greq_class); ++ } ++ MPIX_Grequest_class_allocate(ADIOI_DAOS_greq_class, aio_req, request); ++ memcpy(&(aio_req->req), request, sizeof(MPI_Request)); ++ ++ aio_req->nbytes = len; ++ } ++ else { ++ iod = &loc_iod; ++ rg = &loc_rg; ++ sgl = &loc_sgl; ++ iov = &loc_iov; ++ } ++ ++ if (len == 0) ++ goto done; ++ ++ if (file_ptr_type == ADIO_INDIVIDUAL) { ++ offset = fd->fp_ind; ++ } ++ ++ /** set memory location */ ++ sgl->sg_nr = 1; ++ sgl->sg_nr_out = 0; ++ d_iov_set(iov, buf, len); ++ sgl->sg_iovs = iov; ++#ifdef D_PRINT_IO_MEM ++ printf("MEM : off %lld len %zu\n", buf, len); ++#endif ++ /** set array location */ ++ iod->arr_nr = 1; ++ rg->rg_len = len; ++ rg->rg_idx = offset; ++ iod->arr_rgs = rg; ++ ++#ifdef ADIOI_MPE_LOGGING ++ MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); ++#endif ++ ++#ifdef D_PRINT_IO ++ int mpi_rank; ++ ++ MPI_Comm_rank(fd->comm, &mpi_rank); ++ printf("(%d) CONTIG IO OP %d, Off %llu, Len %zu\n", ++ mpi_rank, flag, offset, len); ++#endif ++ ++ if (flag == DAOS_WRITE) { ++ ret = daos_array_write(cont->oh, DAOS_TX_NONE, iod, sgl, NULL, ++ (request ? &aio_req->daos_event : NULL)); ++ if (ret != 0) { ++ PRINT_MSG(stderr, "daos_array_write() failed with %d\n", ret); ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, ret); ++ return; ++ } ++ } ++ else if (flag == DAOS_READ) { ++ ret = daos_array_read(cont->oh, DAOS_TX_NONE, iod, sgl, NULL, ++ (request ? &aio_req->daos_event : NULL)); ++ if (ret != 0) { ++ PRINT_MSG(stderr, "daos_array_read() failed with %d\n", ret); ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, ret); ++ return; ++ } ++ } ++ ++#ifdef ADIOI_MPE_LOGGING ++ MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); ++#endif ++ ++ if (file_ptr_type == ADIO_INDIVIDUAL) { ++ fd->fp_ind += len; ++ } ++ ++ fd->fp_sys_posn = offset + len; ++ ++done: ++#ifdef HAVE_STATUS_SET_BYTES ++ if (status) ++ MPIR_Status_set_bytes(status, datatype, len); ++#endif ++ ++ *error_code = MPI_SUCCESS; ++} ++ ++void ADIOI_DAOS_ReadContig(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code) ++{ ++ DAOS_IOContig(fd, buf, count, datatype, file_ptr_type, ++ offset, status, NULL, DAOS_READ, error_code); ++} ++ ++void ADIOI_DAOS_WriteContig(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code) ++{ ++ DAOS_IOContig(fd, (void *)buf, count, datatype, file_ptr_type, ++ offset, status, NULL, DAOS_WRITE, error_code); ++} ++ ++void ADIOI_DAOS_IReadContig(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, MPI_Request *request, ++ int *error_code) ++{ ++ DAOS_IOContig(fd, buf, count, datatype, file_ptr_type, ++ offset, NULL, request, DAOS_READ, error_code); ++} ++ ++void ADIOI_DAOS_IWriteContig(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, MPI_Request *request, ++ int *error_code) ++{ ++ DAOS_IOContig(fd, (void *)buf, count, datatype, file_ptr_type, ++ offset, NULL, request, DAOS_WRITE, error_code); ++} ++ ++int ADIOI_DAOS_aio_free_fn(void *extra_state) ++{ ++ struct ADIO_DAOS_req *aio_req = (struct ADIO_DAOS_req *)extra_state; ++ ++ if(aio_req->iovs) ++ ADIOI_Free(aio_req->iovs); ++ ++ if(aio_req->rgs) ++ ADIOI_Free(aio_req->rgs); ++ ++ ADIOI_Free(aio_req); ++ ++ return MPI_SUCCESS; ++} ++ ++int ADIOI_DAOS_aio_poll_fn(void *extra_state, MPI_Status *status) ++{ ++ struct ADIO_DAOS_req *aio_req = (struct ADIO_DAOS_req *)extra_state;; ++ int ret; ++ bool flag; ++ ++ /* MSC - MPICH hangs if we just test with NOWAIT.. */ ++ ret = daos_event_test(&aio_req->daos_event, DAOS_EQ_WAIT, &flag); ++ if (ret != 0) ++ return MPI_UNDEFINED; ++ ++ if (flag) ++ MPI_Grequest_complete(aio_req->req); ++ else ++ return MPI_UNDEFINED; ++ ++ if (aio_req->daos_event.ev_error != 0) ++ ret = ADIOI_DAOS_err("ADIOI_DAOS_aio_poll_fn", "DAOS Event Error", ++ __LINE__, ret); ++ else ++ ret = MPI_SUCCESS; ++ ++ return ret; ++} ++ ++/* wait for multiple requests to complete */ ++int ADIOI_DAOS_aio_wait_fn(int count, void ** array_of_states, ++ double timeout, MPI_Status *status) ++{ ++ ++ struct ADIO_DAOS_req **aio_reqlist; ++ int i, nr_complete, ret; ++ ++ aio_reqlist = (struct ADIO_DAOS_req **)array_of_states; ++ ++ nr_complete = 0; ++ while(nr_complete < count) { ++ for (i = 0; i < count; i++) { ++ bool flag; ++ ++ ret = daos_event_test(&aio_reqlist[i]->daos_event, ++ (timeout > 0) ? (int64_t)timeout : DAOS_EQ_WAIT, &flag); ++ if (ret != 0) ++ return MPI_UNDEFINED; ++ ++ if (flag) { ++ MPI_Grequest_complete(aio_reqlist[i]->req); ++ nr_complete++; ++ } ++ } ++ } ++ return MPI_SUCCESS; /* TODO: no idea how to deal with errors */ ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_io_str.c +@@ -0,0 +1,463 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++#include "adio_extern.h" ++#include ++ ++#include "../../mpi-io/mpioimpl.h" ++#ifdef MPIO_BUILD_PROFILING ++#include "../../mpi-io/mpioprof.h" ++#endif ++#include "mpiu_greq.h" ++ ++enum { ++ DAOS_WRITE, ++ DAOS_READ ++}; ++ ++static void ++ADIOI_DAOS_StridedListIO(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ MPI_Request *request, int rw_type, int *error_code); ++ ++static MPIX_Grequest_class ADIOI_DAOS_greq_class = 0; ++int ADIOI_DAOS_aio_free_fn(void *extra_state); ++int ADIOI_DAOS_aio_poll_fn(void *extra_state, MPI_Status *status); ++int ADIOI_DAOS_aio_wait_fn(int count, void ** array_of_states, ++ double timeout, MPI_Status *status); ++ ++void ADIOI_DAOS_ReadStrided(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code) ++{ ++ ADIOI_DAOS_StridedListIO(fd, buf, count, datatype, file_ptr_type, ++ offset, status, NULL, DAOS_READ, error_code); ++ return; ++} ++ ++void ADIOI_DAOS_WriteStrided(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code) ++{ ++ ADIOI_DAOS_StridedListIO(fd, (void *)buf, count, datatype, file_ptr_type, ++ offset, status, NULL, DAOS_WRITE, error_code); ++ return; ++} ++ ++void ADIOI_DAOS_IreadStrided(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Request *request, ++ int *error_code) ++{ ++ ADIOI_DAOS_StridedListIO(fd, buf, count, datatype, file_ptr_type, ++ offset, NULL, request, DAOS_READ, error_code); ++ return; ++} ++ ++void ADIOI_DAOS_IwriteStrided(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, MPI_Request *request, ++ int *error_code) ++{ ++ ADIOI_DAOS_StridedListIO(fd, (void *)buf, count, datatype, file_ptr_type, ++ offset, NULL, request, DAOS_WRITE, error_code); ++ return; ++} ++ ++ ++static void ++ADIOI_DAOS_StridedListIO(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ MPI_Request *request, int rw_type, int *error_code) ++{ ++ ADIOI_Flatlist_node *flat_buf, *flat_file; ++ int i, j, k, bwr_size, fwr_size=0, st_index=0; ++ int sum, n_etypes_in_filetype, size_in_filetype; ++ MPI_Count bufsize; ++ int n_filetypes, etype_in_filetype; ++ ADIO_Offset abs_off_in_filetype=0; ++ MPI_Count filetype_size, etype_size, buftype_size; ++ MPI_Aint filetype_extent, buftype_extent; ++ int buf_count, buftype_is_contig, filetype_is_contig; ++ ADIO_Offset off, disp, start_off; ++ int flag, st_fwr_size, st_n_filetypes; ++ int mem_list_count, file_list_count; ++ int64_t * mem_offsets; ++ int64_t *file_offsets; ++ int *mem_lengths; ++ int64_t file_length; ++ int total_blks_to_write; ++ int f_data_wrote; ++ int n_write_lists; ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ struct ADIO_DAOS_req *aio_req; ++ static char myname[] = "ADIOI_DAOS_StridedListIO"; ++ int err_flag=0, ret; ++ int mpi_rank; ++ ++ MPI_Comm_rank(fd->comm, &mpi_rank); ++ *error_code = MPI_SUCCESS; ++ ++ ADIOI_Datatype_iscontig(datatype, &buftype_is_contig); ++ ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); ++ ++ MPI_Type_size_x(fd->filetype, &filetype_size); ++ ++ MPI_Type_extent(fd->filetype, &filetype_extent); ++ MPI_Type_size_x(datatype, &buftype_size); ++ MPI_Type_extent(datatype, &buftype_extent); ++ etype_size = fd->etype_size; ++ ++ bufsize = buftype_size * count; ++ ++ ++ d_sg_list_t *sgl, loc_sgl; ++ d_iov_t *iovs; ++ daos_array_iod_t *iod, loc_iod; ++ daos_range_t *rgs; ++ ++ if (request) { ++ aio_req = (struct ADIO_DAOS_req*)ADIOI_Calloc(sizeof(struct ADIO_DAOS_req), 1); ++ daos_event_init(&aio_req->daos_event, DAOS_HDL_INVAL, NULL); ++ iod = &aio_req->iod; ++ sgl = &aio_req->sgl; ++ ++ if (ADIOI_DAOS_greq_class == 0) { ++ MPIX_Grequest_class_create(ADIOI_GEN_aio_query_fn, ++ ADIOI_DAOS_aio_free_fn, MPIU_Greq_cancel_fn, ++ ADIOI_DAOS_aio_poll_fn, ADIOI_DAOS_aio_wait_fn, ++ &ADIOI_DAOS_greq_class); ++ } ++ MPIX_Grequest_class_allocate(ADIOI_DAOS_greq_class, aio_req, request); ++ memcpy(&(aio_req->req), request, sizeof(MPI_Request)); ++ aio_req->nbytes = 0; ++ } ++ else { ++ iod = &loc_iod; ++ sgl = &loc_sgl; ++ } ++ ++ if (filetype_size == 0) { ++#ifdef HAVE_STATUS_SET_BYTES ++ if (status) ++ MPIR_Status_set_bytes(status, datatype, 0); ++#endif ++ *error_code = MPI_SUCCESS; ++ return; ++ } ++ ++ if (bufsize == 0) { ++#ifdef HAVE_STATUS_SET_BYTES ++ if (status) ++ MPIR_Status_set_bytes(status, datatype, 0); ++#endif ++ *error_code = MPI_SUCCESS; ++ return; ++ } ++ ++ /* Create Memory SGL */ ++ file_length = 0; ++ if (!buftype_is_contig) { ++ flat_buf = ADIOI_Flatten_and_find(datatype); ++ mem_list_count = count*flat_buf->count; ++ ++ iovs = (d_iov_t *)ADIOI_Malloc(mem_list_count * sizeof(d_iov_t)); ++ ++ k = 0; ++ for (j = 0; j < count; j++) { ++ for (i = 0; i < flat_buf->count; i++) { ++ ADIO_Offset tmp_off; ++ ++ if (flat_buf->blocklens[i] == 0) { ++ continue; ++ } ++ if (file_length + flat_buf->blocklens[i] > bufsize) ++ break; ++ ++ tmp_off = ((size_t)buf + j*buftype_extent + flat_buf->indices[i]); ++ file_length += flat_buf->blocklens[i]; ++ d_iov_set(&iovs[k++], (char *) tmp_off, flat_buf->blocklens[i]); ++ ++#ifdef D_PRINT_IO_MEM ++ printf("(MEM %d) %d: off %lld len %zu\n", mpi_rank, k, ++ tmp_off, flat_buf->blocklens[i]); ++#endif ++ } ++ } ++ } ++ else { ++ k = 1; ++ iovs = (d_iov_t *)ADIOI_Malloc(sizeof(d_iov_t)); ++ file_length = bufsize; ++ d_iov_set(iovs, (void *)buf, bufsize); ++#ifdef D_PRINT_IO_MEM ++ printf("(MEM SINGLE) off %lld len %zu\n", buf, bufsize); ++#endif ++ } ++ sgl->sg_nr = k; ++ sgl->sg_nr_out = 0; ++ sgl->sg_iovs = iovs; ++ if (request) ++ aio_req->iovs = iovs; ++ ++ if (filetype_is_contig) { ++ n_write_lists = 1; ++ ++ if (file_ptr_type == ADIO_EXPLICIT_OFFSET) ++ off = fd->disp + etype_size * offset; ++ else ++ off = fd->fp_ind; ++ ++ rgs = (daos_range_t *)ADIOI_Malloc(sizeof(daos_range_t)); ++ rgs->rg_idx = off; ++ rgs->rg_len = bufsize; ++#ifdef D_PRINT_IO ++ printf("(%d) Single: idx %lld len %zu\n", ++ mpi_rank, rgs->rg_idx, rgs->rg_len); ++#endif ++ ++ if (request) ++ aio_req->nbytes = bufsize; ++ } ++ else { ++ flat_file = ADIOI_Flatten_and_find(fd->filetype); ++ disp = fd->disp; ++ ++ /* for each case - ADIO_Individual pointer or explicit, find offset ++ (file offset in bytes), n_filetypes (how many filetypes into file to ++ start), fwr_size (remaining amount of data in present file block), ++ and st_index (start point in terms of blocks in starting filetype) */ ++ if (file_ptr_type == ADIO_INDIVIDUAL) { ++ start_off = fd->fp_ind; /* in bytes */ ++ n_filetypes = -1; ++ flag = 0; ++ while (!flag) { ++ n_filetypes++; ++ for (i=0; icount; i++) { ++ if (disp + flat_file->indices[i] + ++ ((ADIO_Offset) n_filetypes)*filetype_extent + ++ flat_file->blocklens[i] >= start_off) { ++ st_index = i; ++ fwr_size = disp + flat_file->indices[i] + ++ ((ADIO_Offset) n_filetypes)*filetype_extent ++ + flat_file->blocklens[i] - start_off; ++ flag = 1; ++ break; ++ } ++ } ++ } /* while (!flag) */ ++ } /* if (file_ptr_type == ADIO_INDIVIDUAL) */ ++ else { ++ n_etypes_in_filetype = filetype_size/etype_size; ++ n_filetypes = (int) (offset / n_etypes_in_filetype); ++ etype_in_filetype = (int) (offset % n_etypes_in_filetype); ++ size_in_filetype = etype_in_filetype * etype_size; ++ ++ sum = 0; ++ for (i=0; icount; i++) { ++ sum += flat_file->blocklens[i]; ++ if (sum > size_in_filetype) { ++ st_index = i; ++ fwr_size = sum - size_in_filetype; ++ abs_off_in_filetype = flat_file->indices[i] + ++ size_in_filetype - (sum - flat_file->blocklens[i]); ++ break; ++ } ++ } ++ /* abs. offset in bytes in the file */ ++ start_off = disp + ((ADIO_Offset) n_filetypes)*filetype_extent + ++ abs_off_in_filetype; ++ } /* else [file_ptr_type != ADIO_INDIVIDUAL] */ ++ ++ st_fwr_size = fwr_size; ++ st_n_filetypes = n_filetypes; ++ ++ i = 0; ++ j = st_index; ++ f_data_wrote = MPL_MIN(st_fwr_size, bufsize); ++ n_filetypes = st_n_filetypes; ++ ++ /* determine how many blocks in file to write */ ++ total_blks_to_write = 1; ++ if (j < (flat_file->count - 1)) j++; ++ else { ++ j = 0; ++ n_filetypes++; ++ } ++ ++ while (f_data_wrote < bufsize) { ++ f_data_wrote += flat_file->blocklens[j]; ++ if(flat_file->blocklens[j]) ++ total_blks_to_write++; ++ if (j<(flat_file->count-1)) j++; ++ else { ++ j = 0; ++ n_filetypes++; ++ } ++ } ++ ++ j = st_index; ++ n_filetypes = st_n_filetypes; ++ n_write_lists = total_blks_to_write; ++ ++ rgs = (daos_range_t *)ADIOI_Malloc(sizeof(daos_range_t) * n_write_lists); ++ ++#if 0 ++ for(i=0 ; icount ; i++) ++ fprintf(stderr, "(%d) FF: %d: off %lld, len %zu\n", mpi_rank, i, ++ flat_file->indices[i], flat_file->blocklens[i]); ++ fprintf(stderr, "NUM IO lists = %d\n", n_write_lists); ++#endif ++ ++ for (i=0; inbytes += rgs[i].rg_len; ++#ifdef D_PRINT_IO ++ printf("(%d) %d: idx %lld len %zu\n", ++ mpi_rank, i, rgs[i].rg_idx, rgs[i].rg_len); ++#endif ++ } ++ else { ++ if (flat_file->blocklens[j]) { ++ rgs[i].rg_idx = disp + ++ ((ADIO_Offset)n_filetypes)*filetype_extent ++ + flat_file->indices[j]; ++ rgs[i].rg_len = flat_file->blocklens[j]; ++#ifdef D_PRINT_IO ++ printf("(%d) %d: idx %lld len %zu\n", ++ mpi_rank, i, rgs[i].rg_idx, rgs[i].rg_len); ++#endif ++ if(request) ++ aio_req->nbytes += rgs[i].rg_len; ++ } ++ else ++ i--; ++ } ++ ++ if (j<(flat_file->count - 1)) j++; ++ else { ++ j = 0; ++ n_filetypes++; ++ } ++ } ++ } ++ ++ /** set array location */ ++ iod->arr_nr = n_write_lists; ++ iod->arr_rgs = rgs; ++ if (request) ++ aio_req->rgs = rgs; ++ ++ if (rw_type == DAOS_WRITE) { ++ ret = daos_array_write(cont->oh, DAOS_TX_NONE, iod, sgl, NULL, ++ (request ? &aio_req->daos_event : NULL)); ++ if (ret != 0) { ++ PRINT_MSG(stderr, "daos_array_write() failed with %d\n", ret); ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, ret); ++ return; ++ } ++ } ++ else if (rw_type == DAOS_READ) { ++ ret = daos_array_read(cont->oh, DAOS_TX_NONE, iod, sgl, NULL, ++ (request ? &aio_req->daos_event : NULL)); ++ if (ret != 0) { ++ PRINT_MSG(stderr, "daos_array_read() failed with %d\n", ret); ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, ret); ++ return; ++ } ++ } ++ ++ if (file_ptr_type == ADIO_INDIVIDUAL) { ++ if (filetype_is_contig) ++ fd->fp_ind += bufsize; ++ else ++ fd->fp_ind = rgs[n_write_lists-1].rg_idx + rgs[n_write_lists-1].rg_len; ++ } ++ ++ if (!err_flag) ++ *error_code = MPI_SUCCESS; ++ ++ fd->fp_sys_posn = -1; /* clear this. */ ++ ++#ifdef HAVE_STATUS_SET_BYTES ++ if (status) ++ MPIR_Status_set_bytes(status, datatype, bufsize); ++#endif ++ ++ if (!request) { ++ ADIOI_Free(iovs); ++ ADIOI_Free(rgs); ++ } ++ ++ return; ++} ++ ++void ADIOI_DAOS_ReadStridedColl(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code) ++{ ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ ++ adio_daos_sync_ranks(fd->comm); ++ ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type, ++ offset, status, error_code); ++ return; ++} ++ ++void ADIOI_DAOS_WriteStridedColl(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Status *status, ++ int *error_code) ++{ ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ ++ ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type, ++ offset, status, error_code); ++ adio_daos_sync_ranks(fd->comm); ++ return; ++} ++ ++void ADIOI_DAOS_IreadStridedColl(ADIO_File fd, void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, ADIO_Request *request, ++ int *error_code) ++{ ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ ++ adio_daos_sync_ranks(fd->comm); ++ ADIOI_DAOS_StridedListIO(fd, buf, count, datatype, file_ptr_type, ++ offset, NULL, request, DAOS_READ, error_code); ++ return; ++} ++ ++void ADIOI_DAOS_IwriteStridedColl(ADIO_File fd, const void *buf, int count, ++ MPI_Datatype datatype, int file_ptr_type, ++ ADIO_Offset offset, MPI_Request *request, ++ int *error_code) ++{ ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ ++ ADIOI_DAOS_StridedListIO(fd, (void *)buf, count, datatype, file_ptr_type, ++ offset, NULL, request, DAOS_WRITE, error_code); ++ adio_daos_sync_ranks(fd->comm); ++ return; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_open.c +@@ -0,0 +1,622 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++#include ++#include ++#include ++#include ++ ++#define OID_SEED 5731 ++ ++# define UINT64ENCODE(p, n) { \ ++ uint64_t _n = (n); \ ++ size_t _i; \ ++ uint8_t *_p = (uint8_t*)(p); \ ++ \ ++ for (_i = 0; _i < sizeof(uint64_t); _i++, _n >>= 8) \ ++ *_p++ = (uint8_t)(_n & 0xff); \ ++ for (/*void*/; _i < 8; _i++) \ ++ *_p++ = 0; \ ++ (p) = (uint8_t*)(p) + 8; \ ++} ++ ++# define UINT64DECODE(p, n) { \ ++ /* WE DON'T CHECK FOR OVERFLOW! */ \ ++ size_t _i; \ ++ \ ++ n = 0; \ ++ (p) += 8; \ ++ for (_i = 0; _i < sizeof(uint64_t); _i++) \ ++ n = (n << 8) | *(--p); \ ++ (p) += 8; \ ++} ++ ++/* Decode a variable-sized buffer */ ++/* (Assumes that the high bits of the integer will be zero) */ ++# define DECODE_VAR(p, n, l) { \ ++ size_t _i; \ ++ \ ++ n = 0; \ ++ (p) += l; \ ++ for (_i = 0; _i < l; _i++) \ ++ n = (n << 8) | *(--p); \ ++ (p) += l; \ ++} ++ ++/* Decode a variable-sized buffer into a 64-bit unsigned integer */ ++/* (Assumes that the high bits of the integer will be zero) */ ++# define UINT64DECODE_VAR(p, n, l) DECODE_VAR(p, n, l) ++ ++/* Multiply two 128 bit unsigned integers to yield a 128 bit unsigned integer */ ++static void ++duuid_mult128(uint64_t x_lo, uint64_t x_hi, uint64_t y_lo, uint64_t y_hi, ++ uint64_t *ans_lo, uint64_t *ans_hi) ++{ ++ uint64_t xlyl; ++ uint64_t xlyh; ++ uint64_t xhyl; ++ uint64_t xhyh; ++ uint64_t temp; ++ ++ /* ++ * First calculate x_lo * y_lo ++ */ ++ /* Compute 64 bit results of multiplication of each combination of high and ++ * low 32 bit sections of x_lo and y_lo */ ++ xlyl = (x_lo & 0xffffffff) * (y_lo & 0xffffffff); ++ xlyh = (x_lo & 0xffffffff) * (y_lo >> 32); ++ xhyl = (x_lo >> 32) * (y_lo & 0xffffffff); ++ xhyh = (x_lo >> 32) * (y_lo >> 32); ++ ++ /* Calculate lower 32 bits of the answer */ ++ *ans_lo = xlyl & 0xffffffff; ++ ++ /* Calculate second 32 bits of the answer. Use temp to keep a 64 bit result ++ * of the calculation for these 32 bits, to keep track of overflow past ++ * these 32 bits. */ ++ temp = (xlyl >> 32) + (xlyh & 0xffffffff) + (xhyl & 0xffffffff); ++ *ans_lo += temp << 32; ++ ++ /* Calculate third 32 bits of the answer, including overflowed result from ++ * the previous operation */ ++ temp >>= 32; ++ temp += (xlyh >> 32) + (xhyl >> 32) + (xhyh & 0xffffffff); ++ *ans_hi = temp & 0xffffffff; ++ ++ /* Calculate highest 32 bits of the answer. No need to keep track of ++ * overflow because it has overflowed past the end of the 128 bit answer */ ++ temp >>= 32; ++ temp += (xhyh >> 32); ++ *ans_hi += temp << 32; ++ ++ /* ++ * Now add the results from multiplying x_lo * y_hi and x_hi * y_lo. No need ++ * to consider overflow here, and no need to consider x_hi * y_hi because ++ * those results would overflow past the end of the 128 bit answer. ++ */ ++ *ans_hi += (x_lo * y_hi) + (x_hi * y_lo); ++ ++ return; ++} /* end duuid_mult128() */ ++ ++/* Implementation of the FNV hash algorithm */ ++static void ++duuid_hash128(const char *name, void *hash, uint64_t *hi, uint64_t *lo) ++{ ++ const uint8_t *name_p = (const uint8_t *)name; ++ uint8_t *hash_p = (uint8_t *)hash; ++ uint64_t name_lo; ++ uint64_t name_hi; ++ /* Initialize hash value in accordance with the FNV algorithm */ ++ uint64_t hash_lo = 0x62b821756295c58d; ++ uint64_t hash_hi = 0x6c62272e07bb0142; ++ /* Initialize FNV prime number in accordance with the FNV algorithm */ ++ const uint64_t fnv_prime_lo = 0x13b; ++ const uint64_t fnv_prime_hi = 0x1000000; ++ size_t name_len_rem = strlen(name); ++ ++ while(name_len_rem > 0) { ++ /* "Decode" lower 64 bits of this 128 bit section of the name, so the ++ * numberical value of the integer is the same on both little endian and ++ * big endian systems */ ++ if(name_len_rem >= 8) { ++ UINT64DECODE(name_p, name_lo) ++ name_len_rem -= 8; ++ } /* end if */ ++ else { ++ name_lo = 0; ++ UINT64DECODE_VAR(name_p, name_lo, name_len_rem) ++ name_len_rem = 0; ++ } /* end else */ ++ ++ /* "Decode" second 64 bits */ ++ if(name_len_rem > 0) { ++ if(name_len_rem >= 8) { ++ UINT64DECODE(name_p, name_hi) ++ name_len_rem -= 8; ++ } /* end if */ ++ else { ++ name_hi = 0; ++ UINT64DECODE_VAR(name_p, name_hi, name_len_rem) ++ name_len_rem = 0; ++ } /* end else */ ++ } /* end if */ ++ else ++ name_hi = 0; ++ ++ /* FNV algorithm - XOR hash with name then multiply by fnv_prime */ ++ hash_lo ^= name_lo; ++ hash_hi ^= name_hi; ++ duuid_mult128(hash_lo, hash_hi, fnv_prime_lo, fnv_prime_hi, &hash_lo, &hash_hi); ++ } /* end while */ ++ ++ /* "Encode" hash integers to char buffer, so the buffer is the same on both ++ * little endian and big endian systems */ ++ UINT64ENCODE(hash_p, hash_lo) ++ UINT64ENCODE(hash_p, hash_hi) ++ ++ if (hi) ++ *hi = hash_hi; ++ if (lo) ++ *lo = hash_lo; ++ ++ return; ++} /* end duuid_hash128() */ ++ ++static void ++parse_filename(const char *path, char **_obj_name, char **_cont_name) ++{ ++ char *f1 = ADIOI_Strdup(path); ++ char *f2 = ADIOI_Strdup(path); ++ char *fname = basename(f1); ++ char *cont_name = dirname(f2); ++ ++ if (cont_name[0] == '.' || cont_name[0] != '/') { ++ char cwd[1024]; ++ ++ getcwd(cwd, 1024); ++ ++ if (strcmp(cont_name, ".") == 0) { ++ cont_name = ADIOI_Strdup(cwd); ++ } ++ else { ++ char *new_dir = ADIOI_Calloc(strlen(cwd) + strlen(cont_name) + 1, ++ sizeof(char)); ++ ++ strcpy(new_dir, cwd); ++ if (cont_name[0] == '.') ++ strcat(new_dir, &cont_name[1]); ++ else { ++ strcat(new_dir, "/"); ++ strcat(new_dir, cont_name); ++ } ++ cont_name = new_dir; ++ } ++ *_cont_name = cont_name; ++ } ++ else { ++ *_cont_name = ADIOI_Strdup(cont_name); ++ } ++ ++ *_obj_name = ADIOI_Strdup(fname); ++ ++ ADIOI_Free(f1); ++ ADIOI_Free(f2); ++} ++ ++int ++get_pool_cont_uuids(const char *path, uuid_t *puuid, uuid_t *cuuid, ++ daos_oclass_id_t *oclass, daos_size_t *chunk_size) ++{ ++ bool use_duns = false; ++ char *uuid_str; ++ int rc; ++ ++ d_getenv_bool("DAOS_USE_DUNS", &use_duns); ++ ++ if (use_duns) { ++ struct duns_attr_t attr; ++ ++ rc = duns_resolve_path(path, &attr); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to resolve DAOS Namespace Properties\n"); ++ return rc; ++ } ++ ++ if (attr.da_type != DAOS_PROP_CO_LAYOUT_POSIX) { ++ PRINT_MSG(stderr, "Invalid DAOS container type\n"); ++ return -DER_INVAL; ++ } ++ ++ uuid_copy(*puuid, attr.da_puuid); ++ uuid_copy(*cuuid, attr.da_cuuid); ++ *oclass = (attr.da_oclass == DAOS_OC_UNKNOWN) ? ++ DAOS_OC_LARGE_RW : attr.da_oclass; ++ *chunk_size = attr.da_chunk_size; ++ ++ return 0; ++ } ++ ++ uuid_str = getenv ("DAOS_POOL"); ++ if (uuid_str != NULL) { ++ if (uuid_parse(uuid_str, *puuid) < 0) { ++ PRINT_MSG(stderr, "Failed to parse pool uuid\n"); ++ return -DER_INVAL; ++ } ++ } ++ ++ /* Hash container name to create uuid */ ++ duuid_hash128(path, cuuid, NULL, NULL); ++ *oclass = DAOS_OC_LARGE_RW; ++ *chunk_size = 0; ++ ++ return 0; ++} ++ ++void ++ADIOI_DAOS_Open(ADIO_File fd, int *error_code) ++{ ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ static char myname[] = "ADIOI_DAOS_OPEN"; ++ int perm, old_mask, amode; ++ int rc; ++ ++ *error_code = MPI_SUCCESS; ++ ++ rc = get_pool_cont_uuids(cont->cont_name, &cont->puuid, &cont->cuuid, ++ &cont->obj_class, &cont->chunk_size); ++ if (rc) { ++ *error_code = ADIOI_DAOS_err(myname, cont->cont_name, __LINE__, rc); ++ return; ++ } ++ ++ /** Info object setting should override */ ++ if (fd->hints->fs_hints.daos.obj_class != DAOS_OC_UNKNOWN) ++ cont->obj_class = fd->hints->fs_hints.daos.obj_class; ++ if (fd->hints->fs_hints.daos.chunk_size != 0) ++ cont->chunk_size = fd->hints->fs_hints.daos.chunk_size; ++ ++#if 0 ++ { ++ char uuid_str[37]; ++ uuid_unparse(cont->cuuid, uuid_str); ++ ++ fprintf(stderr, "Container Open %s %s\n", cont->cont_name, uuid_str); ++ fprintf(stderr, "File %s\n", cont->obj_name); ++ } ++ fprintf(stderr, "chunk_size = %d\n", cont->chunk_size); ++ fprintf(stderr, "OCLASS = %d\n", cont->obj_class); ++#endif ++ ++ rc = adio_daos_poh_lookup_connect(cont->puuid, &cont->p); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to connect to DAOS Pool (%d)\n", rc); ++ *error_code = ADIOI_DAOS_err(myname, cont->cont_name, __LINE__, rc); ++ return; ++ } ++ ++ cont->poh = cont->p->open_hdl; ++ ++ rc = adio_daos_coh_lookup_create(cont->poh, cont->cuuid, ++ (fd->access_mode & ADIO_CREATE), ++ &cont->c); ++ if (rc) { ++ *error_code = ADIOI_DAOS_err(myname, cont->cont_name, __LINE__, rc); ++ goto err_pool; ++ } ++ ++ cont->coh = cont->c->open_hdl; ++ if (cont->amode == DAOS_COO_RW) ++ amode = O_RDWR; ++ else ++ amode = O_RDONLY; ++ ++ /* Mount a DFS namespace on the container */ ++ rc = dfs_mount(cont->p->open_hdl, cont->coh, amode, &cont->dfs); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to mount flat namespace (%d)\n", rc); ++ *error_code = ADIOI_DAOS_err(myname, cont->cont_name, __LINE__, rc); ++ goto err_cont; ++ } ++ ++ /* Set file access flags */ ++ amode = 0; ++ if (fd->access_mode & ADIO_CREATE) ++ amode = amode | O_CREAT; ++ if (fd->access_mode & ADIO_RDONLY) ++ amode = amode | O_RDONLY; ++ if (fd->access_mode & ADIO_WRONLY) ++ amode = amode | O_WRONLY; ++ if (fd->access_mode & ADIO_RDWR) ++ amode = amode | O_RDWR; ++ if (fd->access_mode & ADIO_EXCL) ++ amode = amode | O_EXCL; ++ ++ /* Set DFS permission mode + object type */ ++ if (fd->perm == ADIO_PERM_NULL) { ++ old_mask = umask(022); ++ umask(old_mask); ++ perm = old_mask ^ 0666; ++ } else { ++ perm = fd->perm; ++ } ++ perm = S_IFREG | perm; ++ ++ rc = dfs_open(cont->dfs, NULL, cont->obj_name, perm, amode, ++ cont->obj_class, cont->chunk_size, NULL, &cont->obj); ++ if (rc) { ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, rc); ++ goto err_dfs; ++ } ++ ++ rc = dfs_get_file_oh(cont->obj, &cont->oh); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to get DFS object handle (%d)\n", rc); ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, rc); ++ goto err_obj; ++ } ++ ++out: ++ return; ++err_obj: ++ dfs_release(cont->obj); ++ if (fd->access_mode & ADIO_CREATE) ++ dfs_remove(cont->dfs, NULL, cont->obj_name, true); ++err_dfs: ++ dfs_umount(cont->dfs); ++err_cont: ++ adio_daos_coh_release(cont->c); ++ cont->c = NULL; ++err_pool: ++ adio_daos_poh_release(cont->p); ++ cont->p = NULL; ++ goto out; ++} ++ ++static int ++cache_handles(struct ADIO_DAOS_cont *cont, int *error_code) ++{ ++ char *uuid_str; ++ static char myname[] = "ADIOI_DAOS_OPEN"; ++ int rc; ++ ++ cont->c = adio_daos_coh_lookup(cont->cuuid); ++ if (cont->c == NULL) { ++ /** insert handle into container hashtable */ ++ rc = adio_daos_coh_insert(cont->cuuid, cont->coh, &cont->c); ++ } else { ++ /** g2l handle not needed, already cached */ ++ rc = daos_cont_close(cont->coh, NULL); ++ cont->coh = cont->c->open_hdl; ++ } ++ if (rc) { ++ *error_code = ADIOI_DAOS_err(myname, cont->cont_name, __LINE__, rc); ++ return rc; ++ } ++ ++ cont->p = adio_daos_poh_lookup(cont->puuid); ++ if (cont->p == NULL) { ++ /** insert handle into pool hashtable */ ++ rc = adio_daos_poh_insert(cont->puuid, cont->poh, &cont->p); ++ } else { ++ /** g2l handle not needed, already cached */ ++ rc = daos_pool_disconnect(cont->poh, NULL); ++ cont->poh = cont->p->open_hdl; ++ } ++ if (rc) ++ *error_code = ADIOI_DAOS_err(myname, uuid_str, __LINE__, rc); ++ ++ return rc; ++} ++ ++static int ++share_cont_info(struct ADIO_DAOS_cont *cont, int rank, MPI_Comm comm) ++{ ++ char buf[74]; ++ int rc; ++ ++ if (rank == 0) { ++ uuid_unparse(cont->puuid, buf); ++ uuid_unparse(cont->cuuid, buf+37); ++ } ++ rc = MPI_Bcast(buf, sizeof(buf), MPI_BYTE, 0, comm); ++ if (rc != MPI_SUCCESS) ++ return rc; ++ ++ if (rank != 0) { ++ rc = uuid_parse(buf, cont->puuid); ++ if (rc) ++ return rc; ++ ++ rc = uuid_parse(buf+37, cont->cuuid); ++ if (rc) ++ return rc; ++ } ++ return 0; ++} ++ ++void ++ADIOI_DAOS_OpenColl(ADIO_File fd, int rank, int access_mode, int *error_code) ++{ ++ struct ADIO_DAOS_cont *cont; ++ int amode; ++ MPI_Comm comm = fd->comm; ++ int mpi_size; ++ int rc; ++ static char myname[] = "ADIOI_DAOS_OPENCOLL"; ++ ++ ADIOI_DAOS_Init(error_code); ++ if (*error_code != MPI_SUCCESS) ++ return; ++ ++ MPI_Comm_size(comm, &mpi_size); ++ ++ amode = 0; ++ if (access_mode & ADIO_RDONLY) ++ amode = DAOS_COO_RO; ++ else ++ amode = DAOS_COO_RW; ++ ++ cont = (struct ADIO_DAOS_cont *)ADIOI_Malloc(sizeof(struct ADIO_DAOS_cont)); ++ if (cont == NULL) { ++ *error_code = MPI_ERR_NO_MEM; ++ return; ++ } ++ ++ fd->access_mode = access_mode; ++ cont->amode = amode; ++ parse_filename(fd->filename, &cont->obj_name, &cont->cont_name); ++ cont->p = NULL; ++ cont->c = NULL; ++ fd->fs_ptr = cont; ++ ++ if (rank == 0) { ++ (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); ++ MPI_Error_class(*error_code, &rc); ++ } ++ ++ if (mpi_size > 1) { ++ MPI_Bcast(&rc, 1, MPI_INT, 0, comm); ++ ++ if (rank != 0) { ++ if (rc) ++ *error_code = MPIO_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, myname, ++ __LINE__, rc, ++ "File Open error", 0); ++ else ++ *error_code = MPI_SUCCESS; ++ } ++ } ++ if (*error_code != MPI_SUCCESS) ++ goto err_free; ++ ++ if (mpi_size > 1) { ++ share_cont_info(cont, rank, comm); ++ handle_share(&cont->poh, HANDLE_POOL, rank, cont->poh, comm); ++ handle_share(&cont->coh, HANDLE_CO, rank, cont->poh, comm); ++ if (rank != 0) { ++ rc = cache_handles(cont, error_code); ++ if (rc) ++ goto err_free; ++ } ++ handle_share(&cont->oh, HANDLE_OBJ, rank, cont->coh, comm); ++ } ++ ++ fd->is_open = 1; ++ ++#ifdef ADIOI_MPE_LOGGING ++ MPE_Log_event( ADIOI_MPE_open_b, 0, NULL ); ++#endif ++ ++ return; ++ ++err_free: ++ if (cont->obj_name) ++ ADIOI_Free(cont->obj_name); ++ if (cont->cont_name) ++ ADIOI_Free(cont->cont_name); ++ ADIOI_Free(cont); ++ return; ++} ++ ++void ++ADIOI_DAOS_Flush(ADIO_File fd, int *error_code) ++{ ++ int rank, rc, err; ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ static char myname[] = "ADIOI_DAOS_FLUSH"; ++ ++ *error_code = MPI_SUCCESS; ++ MPI_Comm_rank(fd->comm, &rank); ++ ++ if (fd->is_open <= 0) ++ return; ++ ++ adio_daos_sync_ranks(fd->comm); ++ ++ if (rank == 0) { ++ rc = dfs_sync(cont->dfs); ++ if (rc) ++ PRINT_MSG(stderr, "dfs_sync() failed (%d)\n", rc); ++ } ++ ++ MPI_Bcast(&rc, 1, MPI_INT, 0, fd->comm); ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, rc); ++} ++ ++void ++ADIOI_DAOS_Delete(const char *filename, int *error_code) ++{ ++ struct adio_daos_hdl *p, *c; ++ uuid_t puuid, cuuid; ++ dfs_t *dfs; ++ char *obj_name, *cont_name; ++ daos_oclass_id_t oclass; ++ daos_size_t chunk_size; ++ static char myname[] = "ADIOI_DAOS_DELETE"; ++ int rc; ++ ++ ADIOI_DAOS_Init(error_code); ++ if (*error_code != MPI_SUCCESS) ++ return; ++ ++ parse_filename(filename, &obj_name, &cont_name); ++ rc = get_pool_cont_uuids(cont_name, &puuid, &cuuid, &oclass, &chunk_size); ++ if (rc) { ++ *error_code = ADIOI_DAOS_err(myname, cont_name, __LINE__, rc); ++ return; ++ } ++ ++ rc = adio_daos_poh_lookup_connect(puuid, &p); ++ if (rc || p == NULL) { ++ PRINT_MSG(stderr, "Failed to connect to pool\n"); ++ *error_code = ADIOI_DAOS_err(myname, cont_name, __LINE__, rc); ++ return; ++ } ++ ++ rc = adio_daos_coh_lookup_create(p->open_hdl, cuuid, false, &c); ++ if (rc || c == NULL) { ++ *error_code = ADIOI_DAOS_err(myname, cont_name, __LINE__, rc); ++ goto out_pool; ++ } ++ ++ /* Mount a flat namespace on the container */ ++ rc = dfs_mount(p->open_hdl, c->open_hdl, O_RDWR, &dfs); ++ if (rc) { ++ PRINT_MSG(stderr, "Failed to mount flat namespace (%d)\n", rc); ++ *error_code = ADIOI_DAOS_err(myname, obj_name, __LINE__, rc); ++ goto out_cont; ++ } ++ ++ /* Remove the file from the flat namespace */ ++ rc = dfs_remove(dfs, NULL, obj_name, true); ++ if (rc) { ++ *error_code = ADIOI_DAOS_err(myname, obj_name, __LINE__, rc); ++ goto out_dfs; ++ } ++ ++ *error_code = MPI_SUCCESS; ++ ++out_dfs: ++ dfs_umount(dfs); ++out_cont: ++ adio_daos_coh_release(c); ++out_pool: ++ adio_daos_poh_release(p); ++out_free: ++ ADIOI_Free(obj_name); ++ ADIOI_Free(cont_name); ++ return; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpi/romio/adio/ad_daos/ad_daos_resize.c +@@ -0,0 +1,38 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * Copyright (C) 2018-2019 Intel Corporation ++ * ++ * GOVERNMENT LICENSE RIGHTS-OPEN SOURCE SOFTWARE ++ * The Government's rights to use, modify, reproduce, release, perform, display, ++ * or disclose this software are subject to the terms of the Apache License as ++ * provided in Contract No. 8F-30005. ++ * Any reproduction of computer software, computer software documentation, or ++ * portions thereof marked with this legend must also reproduce the markings. ++ */ ++ ++#include "ad_daos.h" ++ ++void ADIOI_DAOS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) ++{ ++ int ret, rank; ++ struct ADIO_DAOS_cont *cont = fd->fs_ptr; ++ static char myname[] = "ADIOI_DAOS_RESIZE"; ++ ++ *error_code = MPI_SUCCESS; ++ ++ MPI_Comm_rank(fd->comm, &rank); ++ adio_daos_sync_ranks(fd->comm); ++ ++ if (rank == fd->hints->ranklist[0]) { ++ ret = daos_array_set_size(cont->oh, DAOS_TX_NONE, size, NULL); ++ MPI_Bcast(&ret, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); ++ } else { ++ MPI_Bcast(&ret, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); ++ } ++ ++ adio_daos_sync_ranks(fd->comm); ++ ++ if (ret != 0) ++ *error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, ret); ++} +--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c ++++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c +@@ -250,8 +250,8 @@ void ADIOI_GPFS_Calc_file_domains(ADIO_File fd, + fd_size = min_fd_size; + */ + fd_size = (ADIO_Offset *) ADIOI_Malloc(nprocs_for_coll * sizeof(ADIO_Offset)); +- *fd_start_ptr = (ADIO_Offset *) ADIOI_Malloc(nprocs_for_coll * sizeof(ADIO_Offset)); +- *fd_end_ptr = (ADIO_Offset *) ADIOI_Malloc(nprocs_for_coll * sizeof(ADIO_Offset)); ++ *fd_start_ptr = (ADIO_Offset *) ADIOI_Malloc(nprocs_for_coll * 2 * sizeof(ADIO_Offset)); ++ *fd_end_ptr = *fd_start_ptr + nprocs_for_coll; + fd_start = *fd_start_ptr; + fd_end = *fd_end_ptr; + +--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c ++++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c +@@ -123,16 +123,15 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + #endif + + #if 0 +-/* From common code - not implemented for bg. */ ++ /* From common code - not implemented for bg. */ + if (fd->hints->cb_pfr != ADIOI_HINT_DISABLE) { + ADIOI_IOStridedColl(fd, buf, count, ADIOI_READ, datatype, + file_ptr_type, offset, status, error_code); + return; + } +- */ + #endif + #ifdef PROFILE +- MPE_Log_event(13, 0, "start computation"); ++ MPE_Log_event(13, 0, "start computation"); + #endif + + MPI_Comm_size(fd->comm, &nprocs); +@@ -142,24 +141,23 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + nprocs_for_coll = fd->hints->cb_nodes; + orig_fp = fd->fp_ind; + +- GPFSMPIO_T_CIO_SET_GET(r, 1, 0, GPFSMPIO_CIO_T_MPIO_CRW, GPFSMPIO_CIO_LAST) +- GPFSMPIO_T_CIO_SET_GET(r, 1, 0, GPFSMPIO_CIO_T_LCOMP, GPFSMPIO_CIO_LAST) ++ GPFSMPIO_T_CIO_SET_GET(r, 1, 0, GPFSMPIO_CIO_T_MPIO_CRW, GPFSMPIO_CIO_LAST); ++ GPFSMPIO_T_CIO_SET_GET(r, 1, 0, GPFSMPIO_CIO_T_LCOMP, GPFSMPIO_CIO_LAST); + +- /* only check for interleaving if cb_read isn't disabled */ +- if (fd->hints->cb_read != ADIOI_HINT_DISABLE) { ++ /* only check for interleaving if cb_read isn't disabled */ ++ if (fd->hints->cb_read != ADIOI_HINT_DISABLE) { + /* For this process's request, calculate the list of offsets and +- * lengths in the file and determine the start and end offsets. */ +- +- /* Note: end_offset points to the last byte-offset that will be accessed. +- * e.g., if start_offset=0 and 100 bytes to be read, end_offset=99 */ +- ++ * lengths in the file and determine the start and end offsets. ++ * Note: end_offset points to the last byte-offset to be accessed. ++ * e.g., if start_offset=0 and 100 bytes to be read, end_offset=99 ++ */ + ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset, + &offset_list, &len_list, &start_offset, + &end_offset, &contig_access_count); + +- GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_GATHER, GPFSMPIO_CIO_T_LCOMP) ++ GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_GATHER, GPFSMPIO_CIO_T_LCOMP); + #ifdef RDCOLL_DEBUG +- for (i = 0; i < contig_access_count; i++) { ++ for (i = 0; i < contig_access_count; i++) { + DBG_FPRINTF(stderr, "rank %d off %lld len %lld\n", + myrank, offset_list[i], len_list[i]); + } +@@ -169,12 +167,13 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + * processes. The result is an array each of start and end offsets + * stored in order of process rank. */ + +- st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); ++ st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * 2 * sizeof(ADIO_Offset)); ++ end_offsets = st_offsets + nprocs; + + ADIO_Offset my_count_size = 0; +- /* One-sided aggregation needs the amount of data per rank as well because the difference in +- * starting and ending offsets for 1 byte is 0 the same as 0 bytes so it cannot be distiguished. ++ /* One-sided aggregation needs the amount of data per rank as well ++ * because the difference in starting and ending offsets for 1 byte is ++ * 0 the same as 0 bytes so it cannot be distiguished. + */ + if ((romio_read_aggmethod == 1) || (romio_read_aggmethod == 2)) { + count_sizes = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +@@ -184,8 +183,8 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + } + if (romio_tunegather) { + if ((romio_read_aggmethod == 1) || (romio_read_aggmethod == 2)) { +- gpfs_offsets0 = (ADIO_Offset *) ADIOI_Malloc(3 * nprocs * sizeof(ADIO_Offset)); +- gpfs_offsets = (ADIO_Offset *) ADIOI_Malloc(3 * nprocs * sizeof(ADIO_Offset)); ++ gpfs_offsets0 = (ADIO_Offset *) ADIOI_Malloc(6 * nprocs * sizeof(ADIO_Offset)); ++ gpfs_offsets = gpfs_offsets0 + 3 * nprocs; + for (ii = 0; ii < nprocs; ii++) { + gpfs_offsets0[ii * 3] = 0; + gpfs_offsets0[ii * 3 + 1] = 0; +@@ -202,8 +201,8 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + count_sizes[ii] = gpfs_offsets[ii * 3 + 2]; + } + } else { +- gpfs_offsets0 = (ADIO_Offset *) ADIOI_Malloc(2 * nprocs * sizeof(ADIO_Offset)); +- gpfs_offsets = (ADIO_Offset *) ADIOI_Malloc(2 * nprocs * sizeof(ADIO_Offset)); ++ gpfs_offsets0 = (ADIO_Offset *) ADIOI_Malloc(4 * nprocs * sizeof(ADIO_Offset)); ++ gpfs_offsets = gpfs_offsets0 + 2 * nprocs; + for (ii = 0; ii < nprocs; ii++) { + gpfs_offsets0[ii * 2] = 0; + gpfs_offsets0[ii * 2 + 1] = 0; +@@ -220,7 +219,6 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + } + } + ADIOI_Free(gpfs_offsets0); +- ADIOI_Free(gpfs_offsets); + } else { + MPI_Allgather(&start_offset, 1, ADIO_OFFSET, st_offsets, 1, ADIO_OFFSET, fd->comm); + MPI_Allgather(&end_offset, 1, ADIO_OFFSET, end_offsets, 1, ADIO_OFFSET, fd->comm); +@@ -229,10 +227,10 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + } + } + +- GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_PATANA, GPFSMPIO_CIO_T_GATHER) ++ GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_PATANA, GPFSMPIO_CIO_T_GATHER); + +- /* are the accesses of different processes interleaved? */ +- for (i = 1; i < nprocs; i++) ++ /* are the accesses of different processes interleaved? */ ++ for (i = 1; i < nprocs; i++) + if ((st_offsets[i] < end_offsets[i - 1]) && (st_offsets[i] <= end_offsets[i])) + interleave_count++; + /* This is a rudimentary check for interleaving, but should suffice +@@ -246,9 +244,7 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + /* don't do aggregation */ + if (fd->hints->cb_read != ADIOI_HINT_DISABLE) { + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + } + + fd->fp_ind = orig_fp; +@@ -267,24 +263,24 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + return; + } + +- GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_FD_PART, GPFSMPIO_CIO_T_PATANA) +- +- /* We're going to perform aggregation of I/O. Here we call +- * ADIOI_Calc_file_domains() to determine what processes will handle I/O +- * to what regions. We pass nprocs_for_coll into this function; it is +- * used to determine how many processes will perform I/O, which is also +- * the number of regions into which the range of bytes must be divided. +- * These regions are called "file domains", or FDs. +- * +- * When this function returns, fd_start, fd_end, fd_size, and +- * min_st_offset will be filled in. fd_start holds the starting byte +- * location for each file domain. fd_end holds the ending byte location. +- * min_st_offset holds the minimum byte location that will be accessed. +- * +- * Both fd_start[] and fd_end[] are indexed by an aggregator number; this +- * needs to be mapped to an actual rank in the communicator later. +- * +- */ ++ GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_FD_PART, GPFSMPIO_CIO_T_PATANA); ++ ++ /* We're going to perform aggregation of I/O. Here we call ++ * ADIOI_Calc_file_domains() to determine what processes will handle I/O ++ * to what regions. We pass nprocs_for_coll into this function; it is ++ * used to determine how many processes will perform I/O, which is also ++ * the number of regions into which the range of bytes must be divided. ++ * These regions are called "file domains", or FDs. ++ * ++ * When this function returns, fd_start, fd_end, fd_size, and ++ * min_st_offset will be filled in. fd_start holds the starting byte ++ * location for each file domain. fd_end holds the ending byte location. ++ * min_st_offset holds the minimum byte location that will be accessed. ++ * ++ * Both fd_start[] and fd_end[] are indexed by an aggregator number; this ++ * needs to be mapped to an actual rank in the communicator later. ++ * ++ */ + int currentNonZeroDataIndex = 0; + if ((romio_read_aggmethod == 1) || (romio_read_aggmethod == 2)) { + /* Take out the 0-data offsets by shifting the indexes with data to the +@@ -330,19 +326,16 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + + GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_MYREQ, GPFSMPIO_CIO_T_FD_PART); + if ((romio_read_aggmethod == 1) || (romio_read_aggmethod == 2)) { +- /* If the user has specified to use a one-sided aggregation method then do that at +- * this point instead of the two-phase I/O. ++ /* If the user has specified to use a one-sided aggregation method then ++ * do that at this point instead of the two-phase I/O. + */ + ADIOI_OneSidedReadAggregation(fd, offset_list, len_list, contig_access_count, buf, + datatype, error_code, st_offsets, end_offsets, + currentNonZeroDataIndex, fd_start, fd_end); +- GPFSMPIO_T_CIO_REPORT(0, fd, myrank, nprocs) +- ADIOI_Free(offset_list); +- ADIOI_Free(len_list); ++ GPFSMPIO_T_CIO_REPORT(0, fd, myrank, nprocs); ++ ADIOI_Free(offset_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); + ADIOI_Free(count_sizes); + goto fn_exit; + } +@@ -366,16 +359,12 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + error_code, st_offsets, end_offsets, fd_start, fd_end); + + /* NOTE: we are skipping the rest of two-phase in this path */ +- GPFSMPIO_T_CIO_REPORT(0, fd, myrank, nprocs) ++ GPFSMPIO_T_CIO_REPORT(0, fd, myrank, nprocs); + +- ADIOI_Free(offset_list); +- ADIOI_Free(len_list); ++ ADIOI_Free(offset_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); + goto fn_exit; +- + } + } + +@@ -401,39 +390,33 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + min_st_offset, fd_start, fd_end, fd_size, + nprocs, &count_my_req_procs, &count_my_req_per_proc, &my_req, &buf_idx); + +- GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_OTHREQ, GPFSMPIO_CIO_T_MYREQ) ++ GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_OTHREQ, GPFSMPIO_CIO_T_MYREQ); + +- /* perform a collective communication in order to distribute the +- * data calculated above. fills in the following: +- * count_others_req_procs - number of processes (including this +- * one) which have requests in this process's file domain. +- * count_others_req_per_proc[] - number of separate contiguous +- * requests from proc i lie in this process's file domain. +- */ +- if (gpfsmpio_tuneblocking) ++ /* perform a collective communication in order to distribute the ++ * data calculated above. fills in the following: ++ * count_others_req_procs - number of processes (including this ++ * one) which have requests in this process's file domain. ++ * count_others_req_per_proc[] - number of separate contiguous ++ * requests from proc i lie in this process's file domain. ++ */ ++ if (gpfsmpio_tuneblocking) + ADIOI_GPFS_Calc_others_req(fd, count_my_req_procs, + count_my_req_per_proc, my_req, + nprocs, myrank, &count_others_req_procs, &others_req); +- + else + ADIOI_Calc_others_req(fd, count_my_req_procs, + count_my_req_per_proc, my_req, + nprocs, myrank, &count_others_req_procs, &others_req); + +- GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_DEXCH, GPFSMPIO_CIO_T_OTHREQ) ++ GPFSMPIO_T_CIO_SET_GET(r, 1, 1, GPFSMPIO_CIO_T_DEXCH, GPFSMPIO_CIO_T_OTHREQ); + +- /* my_req[] and count_my_req_per_proc aren't needed at this point, so +- * let's free the memory +- */ +- ADIOI_Free(count_my_req_per_proc); +- for (i = 0; i < nprocs; i++) { +- if (my_req[i].count) { +- ADIOI_Free(my_req[i].offsets); +- } +- } ++ /* my_req[] and count_my_req_per_proc aren't needed at this point, so ++ * let's free the memory ++ */ ++ ADIOI_Free(count_my_req_per_proc); ++ ADIOI_Free(my_req[0].offsets); + ADIOI_Free(my_req); + +- + /* read data in sizes of no more than ADIOI_Coll_bufsize, + * communicate, and fill user buf. + */ +@@ -442,28 +425,19 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count, + len_list, contig_access_count, min_st_offset, + fd_size, fd_start, fd_end, buf_idx, error_code); + +- GPFSMPIO_T_CIO_SET_GET(r, 0, 1, GPFSMPIO_CIO_LAST, GPFSMPIO_CIO_T_DEXCH) +- GPFSMPIO_T_CIO_SET_GET(r, 0, 1, GPFSMPIO_CIO_LAST, GPFSMPIO_CIO_T_MPIO_CRW) +- +- GPFSMPIO_T_CIO_REPORT(0, fd, myrank, nprocs) ++ GPFSMPIO_T_CIO_SET_GET(r, 0, 1, GPFSMPIO_CIO_LAST, GPFSMPIO_CIO_T_DEXCH); ++ GPFSMPIO_T_CIO_SET_GET(r, 0, 1, GPFSMPIO_CIO_LAST, GPFSMPIO_CIO_T_MPIO_CRW); ++ GPFSMPIO_T_CIO_REPORT(0, fd, myrank, nprocs); + +- +- /* free all memory allocated for collective I/O */ +- for (i = 0; i < nprocs; i++) { +- if (others_req[i].count) { +- ADIOI_Free(others_req[i].offsets); +- ADIOI_Free(others_req[i].mem_ptrs); +- } +- } ++ /* free all memory allocated for collective I/O */ ++ ADIOI_Free(others_req[0].offsets); ++ ADIOI_Free(others_req[0].mem_ptrs); + ADIOI_Free(others_req); + + ADIOI_Free(buf_idx); + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); + + fn_exit: + #ifdef HAVE_STATUS_SET_BYTES +@@ -912,8 +886,12 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node + } + } + ++#ifdef MPI_STATUSES_IGNORE ++ statuses = MPI_STATUSES_IGNORE; ++#else + statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send + nprocs_recv + 1) * sizeof(MPI_Status)); + /* +1 to avoid a 0-size malloc */ ++#endif + + /* wait on the receives */ + if (nprocs_recv) { +@@ -937,7 +915,9 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node + /* wait on the sends */ + MPI_Waitall(nprocs_send, requests + nprocs_recv, statuses + nprocs_recv); + ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(statuses); ++#endif + ADIOI_Free(requests); + + if (!buftype_is_contig) { +@@ -1173,7 +1153,6 @@ static void ADIOI_R_Exchange_data_alltoallv(ADIO_File fd, void *buf, ADIOI_Flatl + } + sbuf_ptr = all_send_buf + sdispls[i]; + for (j = 0; j < count[i]; j++) { +- ADIOI_ENSURE_AINT_FITS_IN_PTR(others_req[i].mem_ptrs[start_pos[i] + j]); + from_ptr = + (char *) ADIOI_AINT_CAST_TO_VOID_PTR(others_req[i].mem_ptrs[start_pos[i] + j]); + len = others_req[i].lens[start_pos[i] + j]; +--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c ++++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c +@@ -136,34 +136,32 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + nprocs_for_coll = fd->hints->cb_nodes; + orig_fp = fd->fp_ind; + +- GPFSMPIO_T_CIO_SET_GET(w, 1, 0, GPFSMPIO_CIO_T_MPIO_CRW, GPFSMPIO_CIO_LAST) +- GPFSMPIO_T_CIO_SET_GET(w, 1, 0, GPFSMPIO_CIO_T_LCOMP, GPFSMPIO_CIO_LAST) ++ GPFSMPIO_T_CIO_SET_GET(w, 1, 0, GPFSMPIO_CIO_T_MPIO_CRW, GPFSMPIO_CIO_LAST); ++ GPFSMPIO_T_CIO_SET_GET(w, 1, 0, GPFSMPIO_CIO_T_LCOMP, GPFSMPIO_CIO_LAST); + +- +- /* only check for interleaving if cb_write isn't disabled */ +- if (fd->hints->cb_write != ADIOI_HINT_DISABLE) { ++ /* only check for interleaving if cb_write isn't disabled */ ++ if (fd->hints->cb_write != ADIOI_HINT_DISABLE) { + /* For this process's request, calculate the list of offsets and +- * lengths in the file and determine the start and end offsets. */ +- +- /* Note: end_offset points to the last byte-offset that will be accessed. +- * e.g., if start_offset=0 and 100 bytes to be read, end_offset=99 */ +- ++ * lengths in the file and determine the start and end offsets. ++ * Note: end_offset points to the last byte-offset to be accessed. ++ * e.g., if start_offset=0 and 100 bytes to be read, end_offset=99 ++ */ + ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset, + &offset_list, &len_list, &start_offset, + &end_offset, &contig_access_count); + +- GPFSMPIO_T_CIO_SET_GET(w, 1, 1, GPFSMPIO_CIO_T_GATHER, GPFSMPIO_CIO_T_LCOMP) ++ GPFSMPIO_T_CIO_SET_GET(w, 1, 1, GPFSMPIO_CIO_T_GATHER, GPFSMPIO_CIO_T_LCOMP); + +- /* each process communicates its start and end offsets to other +- * processes. The result is an array each of start and end offsets stored +- * in order of process rank. */ +- st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); ++ /* each process communicates its start and end offsets to other ++ * processes. The result is an array each of start and end offsets stored ++ * in order of process rank. */ ++ st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * 2 * sizeof(ADIO_Offset)); ++ end_offsets = st_offsets + nprocs; + + ADIO_Offset my_count_size = 0; +- /* One-sided aggregation needs the amount of data per rank as well because +- * the difference in starting and ending offsets for 1 byte is 0 the same +- * as 0 bytes so it cannot be distiguished. ++ /* One-sided aggregation needs the amount of data per rank as well ++ * because the difference in starting and ending offsets for 1 byte is ++ * 0 the same as 0 bytes so it cannot be distiguished. + */ + if ((romio_write_aggmethod == 1) || (romio_write_aggmethod == 2)) { + count_sizes = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +@@ -173,8 +171,8 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + } + if (romio_tunegather) { + if ((romio_write_aggmethod == 1) || (romio_write_aggmethod == 2)) { +- gpfs_offsets0 = (ADIO_Offset *) ADIOI_Malloc(3 * nprocs * sizeof(ADIO_Offset)); +- gpfs_offsets = (ADIO_Offset *) ADIOI_Malloc(3 * nprocs * sizeof(ADIO_Offset)); ++ gpfs_offsets0 = (ADIO_Offset *) ADIOI_Malloc(6 * nprocs * sizeof(ADIO_Offset)); ++ gpfs_offsets = gpfs_offsets0 + 3 * nprocs; + for (ii = 0; ii < nprocs; ii++) { + gpfs_offsets0[ii * 3] = 0; + gpfs_offsets0[ii * 3 + 1] = 0; +@@ -209,7 +207,6 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + } + } + ADIOI_Free(gpfs_offsets0); +- ADIOI_Free(gpfs_offsets); + } else { + MPI_Allgather(&start_offset, 1, ADIO_OFFSET, st_offsets, 1, ADIO_OFFSET, fd->comm); + MPI_Allgather(&end_offset, 1, ADIO_OFFSET, end_offsets, 1, ADIO_OFFSET, fd->comm); +@@ -219,10 +216,10 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + } + } + +- GPFSMPIO_T_CIO_SET_GET(w, 1, 1, GPFSMPIO_CIO_T_PATANA, GPFSMPIO_CIO_T_GATHER) ++ GPFSMPIO_T_CIO_SET_GET(w, 1, 1, GPFSMPIO_CIO_T_PATANA, GPFSMPIO_CIO_T_GATHER); + +- /* are the accesses of different processes interleaved? */ +- for (i = 1; i < nprocs; i++) ++ /* are the accesses of different processes interleaved? */ ++ for (i = 1; i < nprocs; i++) + if ((st_offsets[i] < end_offsets[i - 1]) && (st_offsets[i] <= end_offsets[i])) + interleave_count++; + /* This is a rudimentary check for interleaving, but should suffice +@@ -236,16 +233,13 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + /* use independent accesses */ + if (fd->hints->cb_write != ADIOI_HINT_DISABLE) { + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + } + + fd->fp_ind = orig_fp; + ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); + + if (buftype_is_contig && filetype_is_contig) { +- + if (file_ptr_type == ADIO_EXPLICIT_OFFSET) { + off = fd->disp + (ADIO_Offset) (fd->etype_size) * offset; + ADIO_WriteContig(fd, buf, count, datatype, +@@ -291,7 +285,6 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + nprocs_for_coll, &min_st_offset, + &fd_start, &fd_end, &fd_size, fd->fs_ptr); + } else { +- + ADIOI_GPFS_Calc_file_domains(fd, st_offsets, end_offsets, nprocs, + nprocs_for_coll, &min_st_offset, + &fd_start, &fd_end, &fd_size, fd->fs_ptr); +@@ -339,13 +332,10 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + if (!romio_onesided_no_rmw) + MPI_Allreduce(&holeFound, &anyHolesFound, 1, MPI_INT, MPI_MAX, fd->comm); + if (anyHolesFound == 0) { +- GPFSMPIO_T_CIO_REPORT(1, fd, myrank, nprocs) +- ADIOI_Free(offset_list); +- ADIOI_Free(len_list); ++ GPFSMPIO_T_CIO_REPORT(1, fd, myrank, nprocs); ++ ADIOI_Free(offset_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); + ADIOI_Free(count_sizes); + goto fn_exit; + } else { +@@ -368,22 +358,23 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + currentValidDataIndex, fd_start, fd_end, &holeFound, + noStripeParms); + romio_onesided_no_rmw = prev_romio_onesided_no_rmw; +- GPFSMPIO_T_CIO_REPORT(1, fd, myrank, nprocs) +- ADIOI_Free(offset_list); +- ADIOI_Free(len_list); ++ GPFSMPIO_T_CIO_REPORT(1, fd, myrank, nprocs); ++ ADIOI_Free(offset_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); + ADIOI_Free(count_sizes); + goto fn_exit; + } + } + if (gpfsmpio_p2pcontig == 1) { +- /* For some simple yet common(?) workloads, full-on two-phase I/O is overkill. We can establish sub-groups of processes and their aggregator, and then these sub-groups will carry out a simplified two-phase over that sub-group. ++ /* For some simple yet common(?) workloads, full-on two-phase I/O is ++ * overkill. We can establish sub-groups of processes and their ++ * aggregator, and then these sub-groups will carry out a simplified ++ * two-phase over that sub-group. + * + * First verify that the filetype is contig and the offsets are +- * increasing in rank order*/ ++ * increasing in rank order ++ */ + int inOrderAndNoGaps = 1; + for (i = 0; i < (nprocs - 1); i++) { + if (end_offsets[i] != (st_offsets[i + 1] - 1)) +@@ -395,15 +386,11 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + ADIOI_P2PContigWriteAggregation(fd, buf, + error_code, st_offsets, end_offsets, fd_start, fd_end); + /* NOTE: we are skipping the rest of two-phase in this path */ +- GPFSMPIO_T_CIO_REPORT(1, fd, myrank, nprocs) ++ GPFSMPIO_T_CIO_REPORT(1, fd, myrank, nprocs); + +- ADIOI_Free(offset_list); +- ADIOI_Free(len_list); ++ ADIOI_Free(offset_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); +- + goto fn_exit; + } + } +@@ -421,15 +408,16 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + min_st_offset, fd_start, fd_end, fd_size, + nprocs, &count_my_req_procs, &count_my_req_per_proc, &my_req, &buf_idx); + +- GPFSMPIO_T_CIO_SET_GET(w, 1, 1, GPFSMPIO_CIO_T_OTHREQ, GPFSMPIO_CIO_T_MYREQ) ++ GPFSMPIO_T_CIO_SET_GET(w, 1, 1, GPFSMPIO_CIO_T_OTHREQ, GPFSMPIO_CIO_T_MYREQ); + +-/* based on everyone's my_req, calculate what requests of other +- processes lie in this process's file domain. +- count_others_req_procs = number of processes whose requests lie in +- this process's file domain (including this process itself) +- count_others_req_per_proc[i] indicates how many separate contiguous +- requests of proc. i lie in this process's file domain. */ +- if (gpfsmpio_tuneblocking) ++ /* based on everyone's my_req, calculate what requests of other ++ * processes lie in this process's file domain. ++ * count_others_req_procs = number of processes whose requests lie in ++ * this process's file domain (including this process itself) ++ * count_others_req_per_proc[i] indicates how many separate contiguous ++ * requests of proc. i lie in this process's file domain. ++ */ ++ if (gpfsmpio_tuneblocking) + ADIOI_GPFS_Calc_others_req(fd, count_my_req_procs, + count_my_req_per_proc, my_req, + nprocs, myrank, &count_others_req_procs, &others_req); +@@ -438,43 +426,31 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count, + count_my_req_per_proc, my_req, + nprocs, myrank, &count_others_req_procs, &others_req); + +- GPFSMPIO_T_CIO_SET_GET(w, 1, 1, GPFSMPIO_CIO_T_DEXCH, GPFSMPIO_CIO_T_OTHREQ) ++ GPFSMPIO_T_CIO_SET_GET(w, 1, 1, GPFSMPIO_CIO_T_DEXCH, GPFSMPIO_CIO_T_OTHREQ); + +- ADIOI_Free(count_my_req_per_proc); +- for (i = 0; i < nprocs; i++) { +- if (my_req[i].count) { +- ADIOI_Free(my_req[i].offsets); +- } +- } ++ ADIOI_Free(count_my_req_per_proc); ++ ADIOI_Free(my_req[0].offsets); + ADIOI_Free(my_req); + +-/* exchange data and write in sizes of no more than coll_bufsize. */ ++ /* exchange data and write in sizes of no more than coll_bufsize. */ + ADIOI_Exch_and_write(fd, buf, datatype, nprocs, myrank, + others_req, offset_list, + len_list, contig_access_count, min_st_offset, + fd_size, fd_start, fd_end, buf_idx, error_code); + +- GPFSMPIO_T_CIO_SET_GET(w, 0, 1, GPFSMPIO_CIO_LAST, GPFSMPIO_CIO_T_DEXCH) +- GPFSMPIO_T_CIO_SET_GET(w, 0, 1, GPFSMPIO_CIO_LAST, GPFSMPIO_CIO_T_MPIO_CRW) +- +- GPFSMPIO_T_CIO_REPORT(1, fd, myrank, nprocs) ++ GPFSMPIO_T_CIO_SET_GET(w, 0, 1, GPFSMPIO_CIO_LAST, GPFSMPIO_CIO_T_DEXCH); ++ GPFSMPIO_T_CIO_SET_GET(w, 0, 1, GPFSMPIO_CIO_LAST, GPFSMPIO_CIO_T_MPIO_CRW); ++ GPFSMPIO_T_CIO_REPORT(1, fd, myrank, nprocs); + +-/* free all memory allocated for collective I/O */ +- for (i = 0; i < nprocs; i++) { +- if (others_req[i].count) { +- ADIOI_Free(others_req[i].offsets); +- ADIOI_Free(others_req[i].mem_ptrs); +- } +- } ++ /* free all memory allocated for collective I/O */ ++ ADIOI_Free(others_req[0].offsets); ++ ADIOI_Free(others_req[0].mem_ptrs); + ADIOI_Free(others_req); + + ADIOI_Free(buf_idx); + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); + + fn_exit: + #ifdef HAVE_STATUS_SET_BYTES +@@ -723,9 +699,9 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype + /* amount of data sent to each proc so far. Used in + * ADIOI_Fill_send_buffer. initialized to 0 here. */ + +- send_buf_idx = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +- curr_to_proc = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +- done_to_proc = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ send_buf_idx = (int *) ADIOI_Malloc(nprocs * 3 * sizeof(int)); ++ curr_to_proc = send_buf_idx + nprocs; ++ done_to_proc = curr_to_proc + nprocs; + /* Above three are used in ADIOI_Fill_send_buffer */ + + start_pos = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +@@ -964,8 +940,6 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype + ADIOI_Free(sent_to_proc); + ADIOI_Free(start_pos); + ADIOI_Free(send_buf_idx); +- ADIOI_Free(curr_to_proc); +- ADIOI_Free(done_to_proc); + + if (ntimes != 0 && getenv("ROMIO_GPFS_DECLARE_ACCESS") != NULL) { + gpfs_wr_access_end(fd->fd_sys, st_loc, end_loc - st_loc); +@@ -1153,10 +1127,13 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf + } + } else if (nprocs_send) { + /* buftype is not contig */ +- send_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char *)); ++ size_t msgLen = 0; + for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- send_buf[i] = (char *) ADIOI_Malloc(send_size[i]); ++ msgLen += send_size[i]; ++ send_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char *)); ++ send_buf[0] = (char *) ADIOI_Malloc(msgLen * sizeof(char)); ++ for (i = 1; i < nprocs; i++) ++ send_buf[i] = send_buf[i - 1] + send_size[i - 1]; + + ADIOI_Fill_send_buffer(fd, buf, flat_buf, send_buf, + offset_list, len_list, send_size, +@@ -1185,6 +1162,9 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf + MPI_Type_free(recv_types + i); + ADIOI_Free(recv_types); + ++#ifdef MPI_STATUSES_IGNORE ++ statuses = MPI_STATUSES_IGNORE; ++#else + if (fd->atomicity) { + /* bug fix from Wei-keng Liao and Kenin Coloma */ + statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send + 1) * sizeof(MPI_Status)); +@@ -1194,6 +1174,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf + sizeof(MPI_Status)); + /* +1 to avoid a 0-size malloc */ + } ++#endif + + #ifdef NEEDS_MPI_TEST + i = 0; +@@ -1216,12 +1197,12 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf + #ifdef AGGREGATION_PROFILE + MPE_Log_event(5033, 0, NULL); + #endif ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(statuses); ++#endif + ADIOI_Free(requests); + if (!buftype_is_contig && nprocs_send) { +- for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- ADIOI_Free(send_buf[i]); ++ ADIOI_Free(send_buf[0]); + ADIOI_Free(send_buf); + } + } +@@ -1645,7 +1626,6 @@ static void ADIOI_W_Exchange_data_alltoallv(ADIO_File fd, const void *buf, char + + sbuf_ptr = all_recv_buf + rdispls[i]; + for (j = 0; j < count[i]; j++) { +- ADIOI_ENSURE_AINT_FITS_IN_PTR(others_req[i].mem_ptrs[start_pos[i] + j]); + to_ptr = + (char *) ADIOI_AINT_CAST_TO_VOID_PTR(others_req[i].mem_ptrs[start_pos[i] + j]); + len = others_req[i].lens[start_pos[i] + j]; +--- a/src/mpi/romio/adio/ad_lustre/ad_lustre.h ++++ b/src/mpi/romio/adio/ad_lustre/ad_lustre.h +@@ -82,7 +82,7 @@ void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); + int ADIOI_LUSTRE_Docollect(ADIO_File fd, int contig_access_count, + ADIO_Offset * len_list, int nprocs); + +-void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int **striping_info_ptr, int mode); ++void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int *striping_info, int mode); + void ADIOI_LUSTRE_Calc_my_req(ADIO_File fd, ADIO_Offset * offset_list, + ADIO_Offset * len_list, int contig_access_count, + int *striping_info, int nprocs, +--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_aggregate.c ++++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_aggregate.c +@@ -13,9 +13,8 @@ + + #undef AGG_DEBUG + +-void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int **striping_info_ptr, int mode) ++void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int *striping_info, int mode) + { +- int *striping_info = NULL; + /* get striping information: + * striping_info[0]: stripe_size + * striping_info[1]: stripe_count +@@ -88,8 +87,6 @@ void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int **striping_info_ptr, int m + } + } + +- *striping_info_ptr = (int *) ADIOI_Malloc(3 * sizeof(int)); +- striping_info = *striping_info_ptr; + striping_info[0] = stripe_size; + striping_info[1] = stripe_count; + striping_info[2] = avail_cb_nodes; +@@ -142,7 +139,8 @@ void ADIOI_LUSTRE_Calc_my_req(ADIO_File fd, ADIO_Offset * offset_list, + * ADIOI_Lustre_Calc_aggregator() instead of the old one */ + int *count_my_req_per_proc, count_my_req_procs; + int i, l, proc; +- ADIO_Offset avail_len, rem_len, curr_idx, off, **buf_idx; ++ size_t memLen; ++ ADIO_Offset avail_len, rem_len, curr_idx, off, **buf_idx, *ptr; + ADIOI_Access *my_req; + + *count_my_req_per_proc_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); +@@ -153,8 +151,6 @@ void ADIOI_LUSTRE_Calc_my_req(ADIO_File fd, ADIO_Offset * offset_list, + * MPI_Alltoall later on. + */ + +- buf_idx = (ADIO_Offset **) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset *)); +- + /* one pass just to calculate how much space to allocate for my_req; + * contig_access_count was calculated way back in ADIOI_Calc_my_off_len() + */ +@@ -194,23 +190,30 @@ void ADIOI_LUSTRE_Calc_my_req(ADIO_File fd, ADIO_Offset * offset_list, + * without extra buffer. This can't be done if buftype is not contig. + */ + ++ memLen = 0; ++ for (i = 0; i < nprocs; i++) ++ memLen += count_my_req_per_proc[i]; ++ ptr = (ADIO_Offset *) ADIOI_Malloc((memLen * 3 + nprocs) * sizeof(ADIO_Offset)); ++ + /* initialize buf_idx vectors */ +- for (i = 0; i < nprocs; i++) { +- /* add one to count_my_req_per_proc[i] to avoid zero size malloc */ +- buf_idx[i] = (ADIO_Offset *) ADIOI_Malloc((count_my_req_per_proc[i] + 1) +- * sizeof(ADIO_Offset)); +- } ++ buf_idx = (ADIO_Offset **) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset *)); ++ buf_idx[0] = ptr; ++ for (i = 1; i < nprocs; i++) ++ buf_idx[i] = buf_idx[i - 1] + count_my_req_per_proc[i - 1] + 1; ++ ptr += memLen + nprocs; /* "+ nprocs" puts a terminal index at the end */ + + /* now allocate space for my_req, offset, and len */ + *my_req_ptr = (ADIOI_Access *) ADIOI_Malloc(nprocs * sizeof(ADIOI_Access)); + my_req = *my_req_ptr; ++ my_req[0].offsets = ptr; + + count_my_req_procs = 0; + for (i = 0; i < nprocs; i++) { + if (count_my_req_per_proc[i]) { +- my_req[i].offsets = (ADIO_Offset *) +- ADIOI_Malloc(count_my_req_per_proc[i] * 2 * sizeof(ADIO_Offset)); +- my_req[i].lens = my_req[i].offsets + count_my_req_per_proc[i]; ++ my_req[i].offsets = ptr; ++ ptr += count_my_req_per_proc[i]; ++ my_req[i].lens = ptr; ++ ptr += count_my_req_per_proc[i]; + count_my_req_procs++; + } + my_req[i].count = 0; /* will be incremented where needed later */ +--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c ++++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c +@@ -150,7 +150,7 @@ static void ADIOI_LUSTRE_IOContig(ADIO_File fd, const void *buf, int count, + ADIO_Offset offset, ADIO_Status * status, + int io_mode, int *error_code) + { +- ssize_t err = -1; ++ ssize_t err = 0; + size_t rw_count; + ADIO_Offset bytes_xfered = 0; + MPI_Count datatype_size, len; +--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c ++++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c +@@ -114,7 +114,7 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + ADIO_Offset orig_fp, start_offset, end_offset, off; + ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *end_offsets = NULL; + ADIO_Offset *len_list = NULL; +- int *striping_info = NULL; ++ int striping_info[3]; + ADIO_Offset **buf_idx = NULL; + int old_error, tmp_error; + ADIO_Offset *lustre_offsets0, *lustre_offsets, *count_sizes = NULL; +@@ -127,12 +127,10 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + /* IO patten identification if cb_write isn't disabled */ + if (fd->hints->cb_write != ADIOI_HINT_DISABLE) { + /* For this process's request, calculate the list of offsets and +- * lengths in the file and determine the start and end offsets. */ +- +- /* Note: end_offset points to the last byte-offset that will be accessed. ++ * lengths in the file and determine the start and end offsets. ++ * Note: end_offset points to the last byte-offset to be accessed. + * e.g., if start_offset=0 and 100 bytes to be read, end_offset=99 + */ +- + ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset, + &offset_list, &len_list, &start_offset, + &end_offset, &contig_access_count); +@@ -141,12 +139,12 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + * processes. The result is an array each of start and end offsets + * stored in order of process rank. + */ +- st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); ++ st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * 2 * sizeof(ADIO_Offset)); ++ end_offsets = st_offsets + nprocs; + ADIO_Offset my_count_size = 0; +- /* One-sided aggregation needs the amount of data per rank as well because +- * the difference in starting and ending offsets for 1 byte is 0 the same +- * as 0 bytes so it cannot be distiguished. ++ /* One-sided aggregation needs the amount of data per rank as well ++ * because the difference in starting and ending offsets for 1 byte is ++ * 0 the same as 0 bytes so it cannot be distiguished. + */ + if ((romio_write_aggmethod == 1) || (romio_write_aggmethod == 2)) { + count_sizes = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +@@ -156,8 +154,8 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + } + if (romio_tunegather) { + if ((romio_write_aggmethod == 1) || (romio_write_aggmethod == 2)) { +- lustre_offsets0 = (ADIO_Offset *) ADIOI_Malloc(3 * nprocs * sizeof(ADIO_Offset)); +- lustre_offsets = (ADIO_Offset *) ADIOI_Malloc(3 * nprocs * sizeof(ADIO_Offset)); ++ lustre_offsets0 = (ADIO_Offset *) ADIOI_Malloc(6 * nprocs * sizeof(ADIO_Offset)); ++ lustre_offsets = lustre_offsets0 + 3 * nprocs; + for (i = 0; i < nprocs; i++) { + lustre_offsets0[i * 3] = 0; + lustre_offsets0[i * 3 + 1] = 0; +@@ -174,8 +172,8 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + count_sizes[i] = lustre_offsets[i * 3 + 2]; + } + } else { +- lustre_offsets0 = (ADIO_Offset *) ADIOI_Malloc(2 * nprocs * sizeof(ADIO_Offset)); +- lustre_offsets = (ADIO_Offset *) ADIOI_Malloc(2 * nprocs * sizeof(ADIO_Offset)); ++ lustre_offsets0 = (ADIO_Offset *) ADIOI_Malloc(4 * nprocs * sizeof(ADIO_Offset)); ++ lustre_offsets = lustre_offsets0 + 2 * nprocs; + for (i = 0; i < nprocs; i++) { + lustre_offsets0[i * 2] = 0; + lustre_offsets0[i * 2 + 1] = 0; +@@ -192,7 +190,6 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + } + } + ADIOI_Free(lustre_offsets0); +- ADIOI_Free(lustre_offsets); + } else { + MPI_Allgather(&start_offset, 1, ADIO_OFFSET, st_offsets, 1, ADIO_OFFSET, fd->comm); + MPI_Allgather(&end_offset, 1, ADIO_OFFSET, end_offsets, 1, ADIO_OFFSET, fd->comm); +@@ -227,9 +224,7 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + /* use independent accesses */ + if (fd->hints->cb_write != ADIOI_HINT_DISABLE) { + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + if ((romio_write_aggmethod == 1) || (romio_write_aggmethod == 2)) + ADIOI_Free(count_sizes); + } +@@ -272,9 +267,9 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + } + + /* Get Lustre hints information */ +- ADIOI_LUSTRE_Get_striping_info(fd, &striping_info, 1); +- /* If the user has specified to use a one-sided aggregation method then do that at +- * this point instead of the two-phase I/O. ++ ADIOI_LUSTRE_Get_striping_info(fd, striping_info, 1); ++ /* If the user has specified to use a one-sided aggregation method then do ++ * that at this point instead of the two-phase I/O. + */ + if ((romio_write_aggmethod == 1) || (romio_write_aggmethod == 2)) { + +@@ -284,14 +279,9 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + firstFileOffset, lastFileOffset, datatype, myrank, error_code); + + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(count_sizes); +- ADIOI_Free(striping_info); +- + goto fn_exit; +- + } // onesided aggregation + + /* calculate what portions of the access requests of this process are +@@ -351,32 +341,16 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count, + if ((old_error != MPI_SUCCESS) && (old_error != MPI_ERR_IO)) + *error_code = old_error; + +- + /* free all memory allocated for collective I/O */ + /* free others_req */ +- for (i = 0; i < nprocs; i++) { +- if (others_req[i].count) { +- ADIOI_Free(others_req[i].offsets); +- ADIOI_Free(others_req[i].mem_ptrs); +- } +- } ++ ADIOI_Free(others_req[0].offsets); ++ ADIOI_Free(others_req[0].mem_ptrs); + ADIOI_Free(others_req); +- /* free my_req here */ +- for (i = 0; i < nprocs; i++) { +- if (my_req[i].count) { +- ADIOI_Free(my_req[i].offsets); +- } +- } +- ADIOI_Free(my_req); +- for (i = 0; i < nprocs; i++) { +- ADIOI_Free(buf_idx[i]); +- } ++ ADIOI_Free(buf_idx[0]); /* also my_req[*].offsets and my_req[*].lens */ + ADIOI_Free(buf_idx); ++ ADIOI_Free(my_req); + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); +- ADIOI_Free(striping_info); + + fn_exit: + #ifdef HAVE_STATUS_SET_BYTES +@@ -485,7 +459,10 @@ static void ADIOI_LUSTRE_Exch_and_write(ADIO_File fd, const void *buf, + write_buf = (char *) ADIOI_Malloc(stripe_size); + + /* calculate the start offset for each iteration */ +- off_list = (ADIO_Offset *) ADIOI_Malloc(max_ntimes * sizeof(ADIO_Offset)); ++ off_list = (ADIO_Offset *) ADIOI_Malloc((max_ntimes + 2 * nprocs) * sizeof(ADIO_Offset)); ++ send_buf_idx = off_list + max_ntimes; ++ this_buf_idx = send_buf_idx + nprocs; ++ + for (m = 0; m < max_ntimes; m++) + off_list[m] = max_end_loc; + for (i = 0; i < nprocs; i++) { +@@ -496,33 +473,30 @@ static void ADIOI_LUSTRE_Exch_and_write(ADIO_File fd, const void *buf, + } + } + +- recv_curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); +- send_curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); ++ recv_curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs * 9, sizeof(int)); ++ send_curr_offlen_ptr = recv_curr_offlen_ptr + nprocs; + /* their use is explained below. calloc initializes to 0. */ + +- recv_count = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ recv_count = send_curr_offlen_ptr + nprocs; + /* to store count of how many off-len pairs per proc are satisfied + * in an iteration. */ + +- send_size = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ send_size = recv_count + nprocs; + /* total size of data to be sent to each proc. in an iteration. + * Of size nprocs so that I can use MPI_Alltoall later. */ + +- recv_size = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ recv_size = send_size + nprocs; + /* total size of data to be recd. from each proc. in an iteration. */ + +- sent_to_proc = (int *) ADIOI_Calloc(nprocs, sizeof(int)); ++ sent_to_proc = recv_size + nprocs; + /* amount of data sent to each proc so far. Used in + * ADIOI_Fill_send_buffer. initialized to 0 here. */ + +- send_buf_idx = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- curr_to_proc = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +- done_to_proc = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ curr_to_proc = sent_to_proc + nprocs; ++ done_to_proc = curr_to_proc + nprocs; + /* Above three are used in ADIOI_Fill_send_buffer */ + +- this_buf_idx = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- +- recv_start_pos = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ recv_start_pos = done_to_proc + nprocs; + /* used to store the starting value of recv_curr_offlen_ptr[i] in + * this iteration */ + +@@ -703,16 +677,6 @@ static void ADIOI_LUSTRE_Exch_and_write(ADIO_File fd, const void *buf, + if (ntimes) + ADIOI_Free(write_buf); + ADIOI_Free(recv_curr_offlen_ptr); +- ADIOI_Free(send_curr_offlen_ptr); +- ADIOI_Free(recv_count); +- ADIOI_Free(send_size); +- ADIOI_Free(recv_size); +- ADIOI_Free(sent_to_proc); +- ADIOI_Free(recv_start_pos); +- ADIOI_Free(send_buf_idx); +- ADIOI_Free(curr_to_proc); +- ADIOI_Free(done_to_proc); +- ADIOI_Free(this_buf_idx); + ADIOI_Free(off_list); + } + +@@ -740,20 +704,35 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, + ADIO_Offset ** srt_off, int **srt_len, int *srt_num, + int *error_code) + { +- int i, j, nprocs_recv, nprocs_send, err; ++ int i, j, k, nprocs_recv, nprocs_send, err; + char **send_buf = NULL; + MPI_Request *requests, *send_req; + MPI_Datatype *recv_types; + MPI_Status *statuses, status; + int sum_recv; + int data_sieving = *hole; ++ static size_t malloc_srt_num = 0; ++ size_t send_total_size; + static char myname[] = "ADIOI_W_EXCHANGE_DATA"; + + /* create derived datatypes for recv */ ++ *srt_num = 0; ++ sum_recv = 0; + nprocs_recv = 0; +- for (i = 0; i < nprocs; i++) ++ nprocs_send = 0; ++ send_total_size = 0; ++ for (i = 0; i < nprocs; i++) { ++ *srt_num += count[i]; ++ sum_recv += recv_size[i]; + if (recv_size[i]) + nprocs_recv++; ++ if (send_size[i]) { ++ nprocs_send++; ++ send_total_size += send_size[i]; ++ } ++ } ++ ++ *hole = (size > sum_recv) ? 1 : 0; + + recv_types = (MPI_Datatype *) ADIOI_Malloc((nprocs_recv + 1) * sizeof(MPI_Datatype)); + /* +1 to avoid a 0-size malloc */ +@@ -776,30 +755,23 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, + * For this, merge the (sorted) offset lists others_req using a heap-merge. + */ + +- *srt_num = 0; +- for (i = 0; i < nprocs; i++) +- *srt_num += count[i]; +- if (*srt_off) +- *srt_off = (ADIO_Offset *) ADIOI_Realloc(*srt_off, (*srt_num + 1) * sizeof(ADIO_Offset)); +- else +- *srt_off = (ADIO_Offset *) ADIOI_Malloc((*srt_num + 1) * sizeof(ADIO_Offset)); +- if (*srt_len) +- *srt_len = (int *) ADIOI_Realloc(*srt_len, (*srt_num + 1) * sizeof(int)); +- else +- *srt_len = (int *) ADIOI_Malloc((*srt_num + 1) * sizeof(int)); +- /* +1 to avoid a 0-size malloc */ +- +- ADIOI_Heap_merge(others_req, count, *srt_off, *srt_len, start_pos, +- nprocs, nprocs_recv, *srt_num); +- +- /* check if there are any holes */ +- *hole = 0; +- for (i = 0; i < *srt_num - 1; i++) { +- if ((*srt_off)[i] + (*srt_len)[i] < (*srt_off)[i + 1]) { +- *hole = 1; +- break; ++ if (*srt_num) { ++ if (*srt_off == NULL || *srt_num > malloc_srt_num) { ++ /* must check srt_off against NULL, as the collective write can be ++ * called more than once */ ++ if (*srt_off != NULL) { ++ ADIOI_Free(*srt_off); ++ ADIOI_Free(*srt_len); ++ } ++ *srt_off = (ADIO_Offset *) ADIOI_Malloc(*srt_num * sizeof(ADIO_Offset)); ++ *srt_len = (int *) ADIOI_Malloc(*srt_num * sizeof(int)); ++ malloc_srt_num = *srt_num; + } ++ ++ ADIOI_Heap_merge(others_req, count, *srt_off, *srt_len, start_pos, ++ nprocs, nprocs_recv, *srt_num); + } ++ + /* In some cases (see John Bent ROMIO REQ # 835), an odd interaction + * between aggregation, nominally contiguous regions, and cb_buffer_size + * should be handled with a read-modify-write (otherwise we will write out +@@ -807,12 +779,14 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, + * hole detection + */ + if (*hole == 0) { +- sum_recv = 0; +- for (i = 0; i < nprocs; i++) +- sum_recv += recv_size[i]; +- if (size > sum_recv) +- *hole = 1; ++ for (i = 0; i < *srt_num - 1; i++) { ++ if ((*srt_off)[i] + (*srt_len)[i] < (*srt_off)[i + 1]) { ++ *hole = 1; ++ break; ++ } ++ } + } ++ + /* check the hint for data sieving */ + if (data_sieving == ADIOI_HINT_ENABLE && nprocs_recv && *hole) { + ADIO_ReadContig(fd, write_buf, size, MPI_BYTE, ADIO_EXPLICIT_OFFSET, off, &status, &err); +@@ -827,11 +801,6 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, + // --END ERROR HANDLING-- + } + +- nprocs_send = 0; +- for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- nprocs_send++; +- + if (fd->atomicity) { + /* bug fix from Wei-keng Liao and Kenin Coloma */ + requests = (MPI_Request *) ADIOI_Malloc((nprocs_send + 1) * sizeof(MPI_Request)); +@@ -862,16 +831,16 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, + for (i = 0; i < nprocs; i++) + if (send_size[i]) { + ADIOI_Assert(buf_idx[i] != -1); +- MPI_Isend(((char *) buf) + buf_idx[i], send_size[i], +- MPI_BYTE, i, myrank + i + 100 * iter, fd->comm, send_req + j); ++ MPI_Issend(((char *) buf) + buf_idx[i], send_size[i], ++ MPI_BYTE, i, myrank + i + 100 * iter, fd->comm, send_req + j); + j++; + } + } else if (nprocs_send) { + /* buftype is not contig */ + send_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char *)); +- for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- send_buf[i] = (char *) ADIOI_Malloc(send_size[i]); ++ send_buf[0] = (char *) ADIOI_Malloc(send_total_size); ++ for (i = 1; i < nprocs; i++) ++ send_buf[i] = send_buf[i - 1] + send_size[i - 1]; + + ADIOI_LUSTRE_Fill_send_buffer(fd, buf, flat_buf, send_buf, offset_list, + len_list, send_size, send_req, +@@ -899,6 +868,9 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, + MPI_Type_free(recv_types + i); + ADIOI_Free(recv_types); + ++#ifdef MPI_STATUSES_IGNORE ++ statuses = MPI_STATUSES_IGNORE; ++#else + /* bug fix from Wei-keng Liao and Kenin Coloma */ + /* +1 to avoid a 0-size malloc */ + if (fd->atomicity) { +@@ -907,6 +879,7 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, + statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send + nprocs_recv + 1) * + sizeof(MPI_Status)); + } ++#endif + + #ifdef NEEDS_MPI_TEST + i = 0; +@@ -925,12 +898,13 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf, + else + MPI_Waitall(nprocs_send + nprocs_recv, requests, statuses); + #endif ++ ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(statuses); ++#endif + ADIOI_Free(requests); + if (!buftype_is_contig && nprocs_send) { +- for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- ADIOI_Free(send_buf[i]); ++ ADIOI_Free(send_buf[0]); + ADIOI_Free(send_buf); + } + } +@@ -1058,8 +1032,8 @@ static void ADIOI_LUSTRE_Fill_send_buffer(ADIO_File fd, const void *buf, + curr_to_proc[p] += size; + ADIOI_BUF_COPY} + if (send_buf_idx[p] == send_size[p]) { +- MPI_Isend(send_buf[p], send_size[p], MPI_BYTE, p, +- myrank + p + 100 * iter, fd->comm, requests + jj); ++ MPI_Issend(send_buf[p], send_size[p], MPI_BYTE, p, ++ myrank + p + 100 * iter, fd->comm, requests + jj); + jj++; + } + } else { +@@ -1407,7 +1381,6 @@ static void ADIOI_LUSTRE_IterateOneSided(ADIO_File fd, const void *buf, int *str + + if (anyHolesFound) { + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Calc_my_off_len(fd, count, datatype, file_ptr_type, offset, + &offset_list, &len_list, &start_offset, + &end_offset, &contig_access_count); +--- a/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c ++++ b/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c +@@ -158,7 +158,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count, + + ADIOI_Flatlist_node *flat_buf, *flat_file; + ADIO_Offset i_offset, new_brd_size, brd_size, size; +- int i, j, k, err, err_flag=0, st_index = 0; ++ int i, j, k, err, err_flag = 0, st_index = 0; + MPI_Count num, bufsize; + int n_etypes_in_filetype; + ADIO_Offset n_filetypes, etype_in_filetype, st_n_filetypes, size_in_filetype; +--- a/src/mpi/romio/adio/common/ad_aggregate.c ++++ b/src/mpi/romio/adio/common/ad_aggregate.c +@@ -172,10 +172,8 @@ void ADIOI_Calc_file_domains(ADIO_Offset * st_offsets, ADIO_Offset + if (fd_size < min_fd_size) + fd_size = min_fd_size; + +- *fd_start_ptr = (ADIO_Offset *) +- ADIOI_Malloc(nprocs_for_coll * sizeof(ADIO_Offset)); +- *fd_end_ptr = (ADIO_Offset *) +- ADIOI_Malloc(nprocs_for_coll * sizeof(ADIO_Offset)); ++ *fd_start_ptr = (ADIO_Offset *) ADIOI_Malloc(nprocs_for_coll * 2 * sizeof(ADIO_Offset)); ++ *fd_end_ptr = *fd_start_ptr + nprocs_for_coll; + + fd_start = *fd_start_ptr; + fd_end = *fd_end_ptr; +@@ -261,7 +259,8 @@ void ADIOI_Calc_my_req(ADIO_File fd, ADIO_Offset * offset_list, ADIO_Offset * le + int *count_my_req_per_proc, count_my_req_procs; + MPI_Aint *buf_idx; + int i, l, proc; +- ADIO_Offset fd_len, rem_len, curr_idx, off; ++ size_t memLen; ++ ADIO_Offset fd_len, rem_len, curr_idx, off, *ptr; + ADIOI_Access *my_req; + + #ifdef AGGREGATION_PROFILE +@@ -322,20 +321,26 @@ void ADIOI_Calc_my_req(ADIO_File fd, ADIO_Offset * offset_list, ADIO_Offset * le + + /* now allocate space for my_req, offset, and len */ + +- *my_req_ptr = (ADIOI_Access *) +- ADIOI_Malloc(nprocs * sizeof(ADIOI_Access)); ++ *my_req_ptr = (ADIOI_Access *) ADIOI_Malloc(nprocs * sizeof(ADIOI_Access)); + my_req = *my_req_ptr; + ++ /* combine offsets and lens into a single regions so we can make one ++ * exchange instead of two later on. Over-allocate the 'offsets' array and ++ * make 'lens' point to the over-allocated part ++ */ ++ memLen = 0; ++ for (i = 0; i < nprocs; i++) ++ memLen += count_my_req_per_proc[i]; ++ ptr = (ADIO_Offset *) ADIOI_Malloc(memLen * 2 * sizeof(ADIO_Offset)); ++ my_req[0].offsets = ptr; ++ + count_my_req_procs = 0; + for (i = 0; i < nprocs; i++) { + if (count_my_req_per_proc[i]) { +- /* combine offsets and lens into a single regions so we can +- * make one exchange instead of two later on. Over-allocate +- * the 'offsets' array and make 'lens' point to the +- * over-allocated part */ +- my_req[i].offsets = (ADIO_Offset *) +- ADIOI_Malloc(count_my_req_per_proc[i] * 2 * sizeof(ADIO_Offset)); +- my_req[i].lens = my_req[i].offsets + count_my_req_per_proc[i]; ++ my_req[i].offsets = ptr; ++ ptr += count_my_req_per_proc[i]; ++ my_req[i].lens = ptr; ++ ptr += count_my_req_per_proc[i]; + count_my_req_procs++; + } + my_req[i].count = 0; /* will be incremented where needed +@@ -433,8 +438,10 @@ void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, + int *count_others_req_per_proc, count_others_req_procs; + int i, j; + MPI_Request *requests; +- MPI_Status *statuses; + ADIOI_Access *others_req; ++ size_t memLen; ++ ADIO_Offset *ptr; ++ MPI_Aint *mem_ptrs; + + /* first find out how much to send/recv and from/to whom */ + #ifdef AGGREGATION_PROFILE +@@ -445,23 +452,32 @@ void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, + MPI_Alltoall(count_my_req_per_proc, 1, MPI_INT, + count_others_req_per_proc, 1, MPI_INT, fd->comm); + +- *others_req_ptr = (ADIOI_Access *) +- ADIOI_Malloc(nprocs * sizeof(ADIOI_Access)); ++ *others_req_ptr = (ADIOI_Access *) ADIOI_Malloc(nprocs * sizeof(ADIOI_Access)); + others_req = *others_req_ptr; + ++ memLen = 0; ++ for (i = 0; i < nprocs; i++) ++ memLen += count_others_req_per_proc[i]; ++ ptr = (ADIO_Offset *) ADIOI_Malloc(memLen * 2 * sizeof(ADIO_Offset)); ++ mem_ptrs = (MPI_Aint *) ADIOI_Malloc(memLen * sizeof(MPI_Aint)); ++ others_req[0].offsets = ptr; ++ others_req[0].mem_ptrs = mem_ptrs; ++ + count_others_req_procs = 0; + for (i = 0; i < nprocs; i++) { + if (count_others_req_per_proc[i]) { + others_req[i].count = count_others_req_per_proc[i]; +- others_req[i].offsets = (ADIO_Offset *) +- ADIOI_Malloc(count_others_req_per_proc[i] * 2 * sizeof(ADIO_Offset)); +- others_req[i].lens = others_req[i].offsets + count_others_req_per_proc[i]; +- others_req[i].mem_ptrs = (MPI_Aint *) +- ADIOI_Malloc(count_others_req_per_proc[i] * sizeof(MPI_Aint)); ++ others_req[i].offsets = ptr; ++ ptr += count_others_req_per_proc[i]; ++ others_req[i].lens = ptr; ++ ptr += count_others_req_per_proc[i]; ++ others_req[i].mem_ptrs = mem_ptrs; ++ mem_ptrs += count_others_req_per_proc[i]; + count_others_req_procs++; + } else + others_req[i].count = 0; + } ++ ADIOI_Free(count_others_req_per_proc); + + /* now send the calculated offsets and lengths to respective processes */ + +@@ -485,14 +501,16 @@ void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, + } + + if (j) { +- /* TODO: consider using MPI_STATUSES_IGNORE to avoid malloc */ +- statuses = (MPI_Status *) ADIOI_Malloc(j * sizeof(MPI_Status)); ++#ifdef MPI_STATUSES_IGNORE ++ MPI_Waitall(j, requests, MPI_STATUSES_IGNORE); ++#else ++ MPI_Status *statuses = (MPI_Status *) ADIOI_Malloc(j * sizeof(MPI_Status)); + MPI_Waitall(j, requests, statuses); + ADIOI_Free(statuses); ++#endif + } + + ADIOI_Free(requests); +- ADIOI_Free(count_others_req_per_proc); + + *count_others_req_procs_ptr = count_others_req_procs; + #ifdef AGGREGATION_PROFILE +@@ -551,19 +569,31 @@ void ADIOI_Icalc_others_req_main(ADIOI_NBC_Request * nbc_req, int *error_code) + int count_others_req_procs; + int i, j; + ADIOI_Access *others_req; ++ size_t memLen; ++ ADIO_Offset *ptr; ++ MPI_Aint *mem_ptrs; + + *others_req_ptr = (ADIOI_Access *) ADIOI_Malloc(nprocs * sizeof(ADIOI_Access)); + others_req = *others_req_ptr; + ++ memLen = 0; ++ for (i = 0; i < nprocs; i++) ++ memLen += count_others_req_per_proc[i]; ++ ptr = (ADIO_Offset *) ADIOI_Malloc(memLen * 2 * sizeof(ADIO_Offset)); ++ mem_ptrs = (MPI_Aint *) ADIOI_Malloc(memLen * sizeof(MPI_Aint)); ++ others_req[0].offsets = ptr; ++ others_req[0].mem_ptrs = mem_ptrs; ++ + count_others_req_procs = 0; + for (i = 0; i < nprocs; i++) { + if (count_others_req_per_proc[i]) { + others_req[i].count = count_others_req_per_proc[i]; +- others_req[i].offsets = (ADIO_Offset *) +- ADIOI_Malloc(count_others_req_per_proc[i] * 2 * sizeof(ADIO_Offset)); +- others_req[i].lens = others_req[i].offsets + count_others_req_per_proc[i]; +- others_req[i].mem_ptrs = (MPI_Aint *) +- ADIOI_Malloc(count_others_req_per_proc[i] * sizeof(MPI_Aint)); ++ others_req[i].offsets = ptr; ++ ptr += count_others_req_per_proc[i]; ++ others_req[i].lens = ptr; ++ ptr += count_others_req_per_proc[i]; ++ others_req[i].mem_ptrs = mem_ptrs; ++ mem_ptrs += count_others_req_per_proc[i]; + count_others_req_procs++; + } else + others_req[i].count = 0; +--- a/src/mpi/romio/adio/common/ad_coll_exch_new.c ++++ b/src/mpi/romio/adio/common/ad_coll_exch_new.c +@@ -214,13 +214,19 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, + return; + } + } else { ++#ifdef MPI_STATUSES_IGNORE ++ statuses = MPI_STATUSES_IGNORE; ++#else + statuses = (MPI_Status *) ADIOI_Malloc(1 + nprocs * sizeof(MPI_Status)); ++#endif + if (fd->is_agg) { + MPI_Waitall(nprocs, recv_req_arr, statuses); + ADIOI_Free(recv_req_arr); + } + MPI_Waitall(fd->hints->cb_nodes, send_req_arr, statuses); ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(statuses); ++#endif + ADIOI_Free(send_req_arr); + } + #ifdef DEBUG2 +@@ -338,9 +344,13 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, + + /* Since ADIOI_Malloc may do other things we add the +1 + * to avoid a 0-size malloc */ ++#ifdef MPI_STATUSES_IGNORE ++ statuses = MPI_STATUSES_IGNORE; ++#else + statuses = (MPI_Status *) + ADIOI_Malloc(1 + 2 * MPL_MAX(send_req_arr_sz, recv_req_arr_sz) + * sizeof(MPI_Status)); ++#endif + + if (send_req_arr_sz > 0) { + MPI_Waitall(2 * send_req_arr_sz, send_req_arr, statuses); +@@ -352,7 +362,9 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type, + ADIOI_Free(recv_count_arr); + ADIOI_Free(recv_req_arr); + } ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(statuses); ++#endif + + if (fd->is_agg == 1) { + ADIOI_init_view_state(file_ptr_type, nprocs, client_file_view_state_arr, TEMP_OFF); +--- a/src/mpi/romio/adio/common/ad_fstype.c ++++ b/src/mpi/romio/adio/common/ad_fstype.c +@@ -10,6 +10,10 @@ + + #include "adio.h" + ++#ifdef HAVE_STRINGS_H ++#include ++#endif ++ + #ifdef HAVE_UNISTD_H + #include + #endif +@@ -78,7 +82,6 @@ + #define EXFS_SUPER_MAGIC 0x45584653 + #endif + +- + #if !defined(PVFS2_SUPER_MAGIC) + #define PVFS2_SUPER_MAGIC (0x20030528) + #endif +@@ -87,6 +90,10 @@ + #define GPFS_SUPER_MAGIC 0x47504653 + #endif + ++#if !defined(DAOS_SUPER_MAGIC) ++#define DAOS_SUPER_MAGIC (0xDA05AD10) ++#endif ++ + #ifdef ROMIO_HAVE_STRUCT_STATVFS_WITH_F_BASETYPE + #ifdef HAVE_SYS_STATVFS_H + #include +@@ -122,8 +129,55 @@ + static void ADIO_FileSysType_parentdir(const char *filename, char **dirnamep); + #endif + #endif +-static void ADIO_FileSysType_prefix(const char *filename, int *fstype, int *error_code); ++static void ADIO_FileSysType_prefix(const char *filename, int *fstype, ++ ADIOI_Fns ** ops, int *error_code); + static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *error_code); ++struct ADIO_FSTypes { ++ ADIOI_Fns *fileops; /* function table */ ++ int fstype; /* ADIO_xxx constant */ ++ const char *prefix; /* file prefix */ ++}; ++ ++/* ++ * To add an ADIO ++ * - add to the table below ++ * - add a constant for your ADIO in include/adio.h ++ * - add a guarded include in include/adioi_fs_proto.h ++ */ ++static struct ADIO_FSTypes fstypes[] = { ++#ifdef ROMIO_UFS ++ {&ADIO_UFS_operations, ADIO_UFS, "ufs:"}, ++#endif ++#ifdef ROMIO_NFS ++ {&ADIO_NFS_operations, ADIO_NFS, "nfs:"}, ++#endif ++#ifdef ROMIO_XFS ++ {&ADIO_XFS_operations, ADIO_XFS, "xfs:"}, ++#endif ++#ifdef ROMIO_PVFS2 ++ {&ADIO_PVFS2_operations, ADIO_PVFS2, "pvfs2:"}, ++#endif ++#ifdef ROMIO_GPFS ++ {&ADIO_GPFS_operations, ADIO_GPFS, "gpfs:"}, ++#endif ++#ifdef ROMIO_PANFS ++ {&ADIO_PANFS_operations, ADIO_PANFS, "panfs:"}, ++#endif ++#ifdef ROMIO_LUSTRE ++ {&ADIO_LUSTRE_operations, ADIO_LUSTRE, "lustre:"}, ++#endif ++#ifdef ROMIO_DAOS ++ {&ADIO_DAOS_operations, ADIO_DAOS, "daos:"}, ++#endif ++#ifdef ROMIO_TESTFS ++ {&ADIO_TESTFS_operations, ADIO_TESTFS, "testfs:"}, ++#endif ++#ifdef ROMIO_IME ++ {&ADIO_IME_operations, ADIO_IME, "ime:"}, ++#endif ++ {0, 0, 0} /* guard entry */ ++}; ++ + + /* + ADIO_FileSysType_parentdir - determines a string pathname for the +@@ -376,6 +430,13 @@ static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *erro + } + #endif + ++#ifdef DAOS_SUPER_MAGIC ++ if (fsbuf.f_type == DAOS_SUPER_MAGIC) { ++ *fstype = ADIO_DAOS; ++ return; ++ } ++#endif ++ + #ifdef PAN_KERNEL_FS_CLIENT_SUPER_MAGIC + if (fsbuf.f_type == PAN_KERNEL_FS_CLIENT_SUPER_MAGIC) { + *fstype = ADIO_PANFS; +@@ -523,32 +584,28 @@ Output Parameters: + is considered an error. Except for on Windows systems where the default is NTFS. + + */ +-static void ADIO_FileSysType_prefix(const char *filename, int *fstype, int *error_code) ++static void ADIO_FileSysType_prefix(const char *filename, int *fstype, ++ ADIOI_Fns ** ops, int *error_code) + { +- static char myname[] = "ADIO_RESOLVEFILETYPE_PREFIX"; ++ int i; ++ static char myname[] = "ADIO_FileSysType_prefix"; ++ + *error_code = MPI_SUCCESS; ++ *fstype = -1; + +- if (!strncmp(filename, "ufs:", 4) || !strncmp(filename, "UFS:", 4)) { +- *fstype = ADIO_UFS; +- } else if (!strncmp(filename, "nfs:", 4) || !strncmp(filename, "NFS:", 4)) { +- *fstype = ADIO_NFS; +- } else if (!strncmp(filename, "panfs:", 6) || !strncmp(filename, "PANFS:", 6)) { +- *fstype = ADIO_PANFS; +- } else if (!strncmp(filename, "xfs:", 4) || !strncmp(filename, "XFS:", 4)) { +- *fstype = ADIO_XFS; +- } else if (!strncmp(filename, "pvfs2:", 6) || !strncmp(filename, "PVFS2:", 6)) { +- *fstype = ADIO_PVFS2; +- } else if (!strncmp(filename, "ime:", 4) || !strncmp(filename, "IME:", 4)) { +- *fstype = ADIO_IME; +- } else if (!strncmp(filename, "testfs:", 7) +- || !strncmp(filename, "TESTFS:", 7)) { +- *fstype = ADIO_TESTFS; +- } else if (!strncmp(filename, "lustre:", 7) +- || !strncmp(filename, "LUSTRE:", 7)) { +- *fstype = ADIO_LUSTRE; +- } else if (!strncmp(filename, "gpfs:", 5) || !strncmp(filename, "GPFS:", 5)) { +- *fstype = ADIO_GPFS; +- } else { ++ /* search table for prefix */ ++ ++ i = 0; ++ while (fstypes[i].fileops) { ++ if (!strncasecmp(fstypes[i].prefix, filename, strlen(fstypes[i].prefix))) { ++ *fstype = fstypes[i].fstype; ++ *ops = fstypes[i].fileops; ++ break; ++ } ++ ++i; ++ } ++ ++ if (-1 == *fstype) { + *fstype = 0; + /* --BEGIN ERROR HANDLING-- */ + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +@@ -583,8 +640,10 @@ void ADIO_ResolveFileType(MPI_Comm comm, const char *filename, int *fstype, + { + int myerrcode, file_system, min_code, max_code; + char *tmp; ++ int i; + static char myname[] = "ADIO_RESOLVEFILETYPE"; + char *p; ++ *ops = 0; + + file_system = -1; + if (filename == NULL) { +@@ -652,7 +711,7 @@ void ADIO_ResolveFileType(MPI_Comm comm, const char *filename, int *fstype, + * + * perhaps we should have this code go through the allreduce as well? + */ +- ADIO_FileSysType_prefix(filename, &file_system, &myerrcode); ++ ADIO_FileSysType_prefix(filename, &file_system, ops, &myerrcode); + if (myerrcode != MPI_SUCCESS) { + *error_code = myerrcode; + return; +@@ -668,106 +727,26 @@ void ADIO_ResolveFileType(MPI_Comm comm, const char *filename, int *fstype, + * including the colon! */ + p = getenv("ROMIO_FSTYPE_FORCE"); + if (p != NULL) { +- ADIO_FileSysType_prefix(p, &file_system, &myerrcode); ++ ADIO_FileSysType_prefix(p, &file_system, ops, &myerrcode); + if (myerrcode != MPI_SUCCESS) { + *error_code = myerrcode; + return; + } + } +- +- /* verify that we support this file system type and set ops pointer */ +- if (file_system == ADIO_UFS) { +-#ifndef ROMIO_UFS +- *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- myname, __LINE__, MPI_ERR_IO, +- "**iofstypeunsupported", 0); +- return; +-#else +- *ops = &ADIO_UFS_operations; +-#endif +- } +- if (file_system == ADIO_NFS) { +-#ifndef ROMIO_NFS +- *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- myname, __LINE__, MPI_ERR_IO, +- "**iofstypeunsupported", 0); +- return; +-#else +- *ops = &ADIO_NFS_operations; +-#endif +- } +- if (file_system == ADIO_PANFS) { +-#ifndef ROMIO_PANFS +- *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- myname, __LINE__, MPI_ERR_IO, +- "**iofstypeunsupported", 0); +- return; +-#else +- *ops = &ADIO_PANFS_operations; +-#endif +- } +- if (file_system == ADIO_XFS) { +-#ifndef ROMIO_XFS +- *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- myname, __LINE__, MPI_ERR_IO, +- "**iofstypeunsupported", 0); +- return; +-#else +- *ops = &ADIO_XFS_operations; +-#endif +- } +- if (file_system == ADIO_PVFS2) { +-#ifndef ROMIO_PVFS2 +- *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- myname, __LINE__, MPI_ERR_IO, +- "**iofstypeunsupported", 0); +- return; +-#else +- *ops = &ADIO_PVFS2_operations; +-#endif +- } +- if (file_system == ADIO_TESTFS) { +-#ifndef ROMIO_TESTFS +- *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- myname, __LINE__, MPI_ERR_IO, +- "**iofstypeunsupported", 0); +- return; +-#else +- *ops = &ADIO_TESTFS_operations; +-#endif ++ if (!(*ops)) { ++ for (i = 0; fstypes[i].fileops; i++) ++ if (file_system == fstypes[i].fstype) { ++ *ops = fstypes[i].fileops; ++ break; ++ } + } +- +- if (file_system == ADIO_GPFS) { +-#ifndef ROMIO_GPFS ++ if (!(*ops)) { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**iofstypeunsupported", 0); + return; +-#else +- *ops = &ADIO_GPFS_operations; +-#endif + } + +- if (file_system == ADIO_LUSTRE) { +-#ifndef ROMIO_LUSTRE +- *error_code = +- MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, +- "**iofstypeunsupported", 0); +- return; +-#else +- *ops = &ADIO_LUSTRE_operations; +-#endif +- } +- if (file_system == ADIO_IME) { +-#ifndef ROMIO_IME +- *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- myname, __LINE__, MPI_ERR_IO, +- "**iofstypeunsupported", 0); +- return; +-#else +- *ops = &ADIO_IME_operations; +-#endif +- } + *error_code = MPI_SUCCESS; + *fstype = file_system; + return; +--- a/src/mpi/romio/adio/common/ad_init.c ++++ b/src/mpi/romio/adio/common/ad_init.c +@@ -6,6 +6,7 @@ + */ + + #include "adio.h" ++#include "adio_extern.h" + + ADIOI_Datarep *ADIOI_Datarep_head = NULL; + /* list of datareps registered by the user */ +@@ -72,7 +73,6 @@ void ADIO_Init(int *argc, char ***argv, int *error_code) + ADIOI_Direct_write = 0; + #endif + +- + #ifdef ADIOI_MPE_LOGGING + { + MPE_Log_get_state_eventIDs(&ADIOI_MPE_open_a, &ADIOI_MPE_open_b); +--- a/src/mpi/romio/adio/common/ad_io_coll.c ++++ b/src/mpi/romio/adio/common/ad_io_coll.c +@@ -364,23 +364,35 @@ void ADIOI_IOStridedColl(ADIO_File fd, void *buf, int count, int rdwr, + &agg_comm_requests, &aggs_client_count); + + if (fd->is_agg && aggs_client_count) { ++#ifdef MPI_STATUSES_IGNORE ++ agg_comm_statuses = MPI_STATUSES_IGNORE; ++#else + agg_comm_statuses = ADIOI_Malloc(aggs_client_count * sizeof(MPI_Status)); ++#endif + MPI_Waitall(aggs_client_count, agg_comm_requests, agg_comm_statuses); + #ifdef AGGREGATION_PROFILE + MPE_Log_event(5033, 0, NULL); + #endif + ADIOI_Free(agg_comm_requests); ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(agg_comm_statuses); ++#endif + } + + if (clients_agg_count) { ++#ifdef MPI_STATUSES_IGNORE ++ client_comm_statuses = MPI_STATUSES_IGNORE; ++#else + client_comm_statuses = ADIOI_Malloc(clients_agg_count * sizeof(MPI_Status)); ++#endif + MPI_Waitall(clients_agg_count, client_comm_requests, client_comm_statuses); + #ifdef AGGREGATION_PROFILE + MPE_Log_event(5039, 0, NULL); + #endif + ADIOI_Free(client_comm_requests); ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(client_comm_statuses); ++#endif + } + #ifdef DEBUG2 + fprintf(stderr, "buffered_io_size = %lld\n", buffered_io_size); +@@ -427,13 +439,19 @@ void ADIOI_IOStridedColl(ADIO_File fd, void *buf, int count, int rdwr, + #endif + + if (clients_agg_count) { ++#ifdef MPI_STATUSES_IGNORE ++ client_comm_statuses = MPI_STATUSES_IGNORE; ++#else + client_comm_statuses = ADIOI_Malloc(clients_agg_count * sizeof(MPI_Status)); ++#endif + MPI_Waitall(clients_agg_count, client_comm_requests, client_comm_statuses); + #ifdef AGGREGATION_PROFILE + MPE_Log_event(5039, 0, NULL); + #endif + ADIOI_Free(client_comm_requests); ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(client_comm_statuses); ++#endif + } + #ifdef DEBUG2 + if (bufextent) { +@@ -447,15 +465,21 @@ void ADIOI_IOStridedColl(ADIO_File fd, void *buf, int count, int rdwr, + if (fd->is_agg && buffered_io_size) { + ADIOI_Assert(aggs_client_count != 0); + /* make sure we actually have the data to write out */ ++#ifdef MPI_STATUSES_IGNORE ++ agg_comm_statuses = MPI_STATUSES_IGNORE; ++#else + agg_comm_statuses = (MPI_Status *) + ADIOI_Malloc(aggs_client_count * sizeof(MPI_Status)); ++#endif + + MPI_Waitall(aggs_client_count, agg_comm_requests, agg_comm_statuses); + #ifdef AGGREGATION_PROFILE + MPE_Log_event(5033, 0, NULL); + #endif + ADIOI_Free(agg_comm_requests); ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(agg_comm_statuses); ++#endif + #ifdef DEBUG2 + fprintf(stderr, "cb_buf = ["); + for (i = 0; i < buffered_io_size; i++) +@@ -917,7 +941,6 @@ static void Exch_data_amounts(ADIO_File fd, int nprocs, + MPI_Request *recv_requests; + MPI_Request *send_requests; + MPI_Status status; +- MPI_Status *send_statuses; + /* Aggregators send amounts for data requested to clients */ + if (fd->hints->cb_alltoall != ADIOI_HINT_DISABLE) { + MPI_Alltoall(client_comm_sz_arr, sizeof(ADIO_Offset), MPI_BYTE, +@@ -984,10 +1007,14 @@ static void Exch_data_amounts(ADIO_File fd, int nprocs, + ADIOI_Free(recv_requests); + if (fd->is_agg) { + /* wait for all sends to complete */ +- send_statuses = ADIOI_Malloc(nprocs * sizeof(MPI_Status)); ++#ifdef MPI_STATUSES_IGNORE ++ MPI_Waitall(nprocs, send_requests, MPI_STATUSES_IGNORE); ++#else ++ MPI_Status *send_statuses = ADIOI_Malloc(nprocs * sizeof(MPI_Status)); + MPI_Waitall(nprocs, send_requests, send_statuses); +- ADIOI_Free(send_requests); + ADIOI_Free(send_statuses); ++#endif ++ ADIOI_Free(send_requests); + } + } + } +--- a/src/mpi/romio/adio/common/ad_iread_coll.c ++++ b/src/mpi/romio/adio/common/ad_iread_coll.c +@@ -280,8 +280,8 @@ void ADIOI_GEN_IreadStridedColl(ADIO_File fd, void *buf, int count, + * processes. The result is an array each of start and end offsets + * stored in order of process rank. */ + +- vars->st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- vars->end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); ++ vars->st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * 2 * sizeof(ADIO_Offset)); ++ vars->end_offsets = vars->st_offsets + nprocs; + + *error_code = MPI_Iallgather(&vars->start_offset, 1, ADIO_OFFSET, + vars->st_offsets, 1, ADIO_OFFSET, +@@ -344,9 +344,7 @@ static void ADIOI_GEN_IreadStridedColl_indio(ADIOI_NBC_Request * nbc_req, int *e + /* don't do aggregation */ + if (fd->hints->cb_read != ADIOI_HINT_DISABLE) { + ADIOI_Free(vars->offset_list); +- ADIOI_Free(vars->len_list); + ADIOI_Free(vars->st_offsets); +- ADIOI_Free(vars->end_offsets); + } + + fd->fp_ind = vars->orig_fp; +@@ -457,18 +455,12 @@ static void ADIOI_GEN_IreadStridedColl_read(ADIOI_NBC_Request * nbc_req, int *er + ADIOI_GEN_IreadStridedColl_vars *vars = nbc_req->data.rd.rsc_vars; + ADIOI_Iread_and_exch_vars *rae_vars = NULL; + ADIOI_Access *my_req = vars->my_req; +- int nprocs = vars->nprocs; +- int i; + + /* my_req[] and count_my_req_per_proc aren't needed at this point, so + * let's free the memory + */ + ADIOI_Free(vars->count_my_req_per_proc); +- for (i = 0; i < nprocs; i++) { +- if (my_req[i].count) { +- ADIOI_Free(my_req[i].offsets); +- } +- } ++ ADIOI_Free(my_req[0].offsets); + ADIOI_Free(my_req); + + /* read data in sizes of no more than ADIOI_Coll_bufsize, +@@ -500,26 +492,17 @@ static void ADIOI_GEN_IreadStridedColl_free(ADIOI_NBC_Request * nbc_req, int *er + ADIOI_GEN_IreadStridedColl_vars *vars = nbc_req->data.rd.rsc_vars; + ADIO_File fd = vars->fd; + ADIOI_Access *others_req = vars->others_req; +- int nprocs = vars->nprocs; +- int i; + + + /* free all memory allocated for collective I/O */ +- for (i = 0; i < nprocs; i++) { +- if (others_req[i].count) { +- ADIOI_Free(others_req[i].offsets); +- ADIOI_Free(others_req[i].mem_ptrs); +- } +- } ++ ADIOI_Free(others_req[0].offsets); ++ ADIOI_Free(others_req[0].mem_ptrs); + ADIOI_Free(others_req); + + ADIOI_Free(vars->buf_idx); + ADIOI_Free(vars->offset_list); +- ADIOI_Free(vars->len_list); + ADIOI_Free(vars->st_offsets); +- ADIOI_Free(vars->end_offsets); + ADIOI_Free(vars->fd_start); +- ADIOI_Free(vars->fd_end); + + fd->fp_sys_posn = -1; /* set it to null. */ + +--- a/src/mpi/romio/adio/common/ad_iread_fake.c ++++ b/src/mpi/romio/adio/common/ad_iread_fake.c +@@ -18,7 +18,7 @@ void ADIOI_FAKE_IreadContig(ADIO_File fd, void *buf, int count, + ADIO_Status status; + MPI_Count typesize; + MPI_Offset len; +- int actual_len=0; ++ int actual_len = 0; + + + MPI_Type_size_x(datatype, &typesize); +--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c ++++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c +@@ -298,8 +298,8 @@ void ADIOI_GEN_IwriteStridedColl(ADIO_File fd, const void *buf, int count, + * processes. The result is an array each of start and end offsets + * stored in order of process rank. */ + +- vars->st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- vars->end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); ++ vars->st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * 2 * sizeof(ADIO_Offset)); ++ vars->end_offsets = vars->st_offsets + nprocs; + + *error_code = MPI_Iallgather(&vars->start_offset, 1, ADIO_OFFSET, + vars->st_offsets, 1, ADIO_OFFSET, +@@ -362,9 +362,7 @@ static void ADIOI_GEN_IwriteStridedColl_indio(ADIOI_NBC_Request * nbc_req, int * + /* use independent accesses */ + if (fd->hints->cb_write != ADIOI_HINT_DISABLE) { + ADIOI_Free(vars->offset_list); +- ADIOI_Free(vars->len_list); + ADIOI_Free(vars->st_offsets); +- ADIOI_Free(vars->end_offsets); + } + + fd->fp_ind = vars->orig_fp; +@@ -453,15 +451,9 @@ static void ADIOI_GEN_IwriteStridedColl_exch(ADIOI_NBC_Request * nbc_req, int *e + ADIOI_GEN_IwriteStridedColl_vars *vars = nbc_req->data.wr.wsc_vars; + ADIOI_Iexch_and_write_vars *eaw_vars = NULL; + ADIOI_Access *my_req = vars->my_req; +- int nprocs = vars->nprocs; +- int i; + + ADIOI_Free(vars->count_my_req_per_proc); +- for (i = 0; i < nprocs; i++) { +- if (my_req[i].count) { +- ADIOI_Free(my_req[i].offsets); +- } +- } ++ ADIOI_Free(my_req[0].offsets); + ADIOI_Free(my_req); + + /* exchange data and write in sizes of no more than coll_bufsize. */ +@@ -530,9 +522,7 @@ static void ADIOI_GEN_IwriteStridedColl_free(ADIOI_NBC_Request * nbc_req, int *e + ADIOI_GEN_IwriteStridedColl_vars *vars = nbc_req->data.wr.wsc_vars; + ADIO_File fd = vars->fd; + ADIOI_Access *others_req = vars->others_req; +- int nprocs = vars->nprocs; + int old_error = vars->old_error; +- int i; + + #ifdef ADIOI_MPE_LOGGING + MPE_Log_event(ADIOI_MPE_postwrite_b, 0, NULL); +@@ -544,23 +534,15 @@ static void ADIOI_GEN_IwriteStridedColl_free(ADIOI_NBC_Request * nbc_req, int *e + if ((old_error != MPI_SUCCESS) && (old_error != MPI_ERR_IO)) + *error_code = old_error; + +- + /* free all memory allocated for collective I/O */ +- for (i = 0; i < nprocs; i++) { +- if (others_req[i].count) { +- ADIOI_Free(others_req[i].offsets); +- ADIOI_Free(others_req[i].mem_ptrs); +- } +- } ++ ADIOI_Free(others_req[0].offsets); ++ ADIOI_Free(others_req[0].mem_ptrs); + ADIOI_Free(others_req); + + ADIOI_Free(vars->buf_idx); + ADIOI_Free(vars->offset_list); +- ADIOI_Free(vars->len_list); + ADIOI_Free(vars->st_offsets); +- ADIOI_Free(vars->end_offsets); + ADIOI_Free(vars->fd_start); +- ADIOI_Free(vars->fd_end); + + fd->fp_sys_posn = -1; /* set it to null. */ + #ifdef AGGREGATION_PROFILE +@@ -681,9 +663,9 @@ static void ADIOI_Iexch_and_write(ADIOI_NBC_Request * nbc_req, int *error_code) + /* amount of data sent to each proc so far. Used in + * ADIOI_Fill_send_buffer. initialized to 0 here. */ + +- vars->send_buf_idx = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +- vars->curr_to_proc = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +- vars->done_to_proc = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ vars->send_buf_idx = (int *) ADIOI_Malloc(nprocs * 3 * sizeof(int)); ++ vars->curr_to_proc = vars->send_buf_idx + nprocs; ++ vars->done_to_proc = vars->curr_to_proc + nprocs; + /* Above three are used in ADIOI_Fill_send_buffer */ + + vars->start_pos = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +@@ -926,7 +908,6 @@ static void ADIOI_Iexch_and_write_reset(ADIOI_NBC_Request * nbc_req, int *error_ + static void ADIOI_Iexch_and_write_l2_begin(ADIOI_NBC_Request * nbc_req, int *error_code) + { + ADIOI_Iexch_and_write_vars *vars = nbc_req->data.wr.eaw_vars; +- ADIO_Offset size = vars->size; + ADIOI_W_Iexchange_data_vars *wed_vars = NULL; + + /* loop exit condition */ +@@ -935,7 +916,7 @@ static void ADIOI_Iexch_and_write_l2_begin(ADIOI_NBC_Request * nbc_req, int *err + return; + } + +- ADIOI_Assert(size == (int) size); ++ ADIOI_Assert(vars->size == (int) vars->size); + + /* create a struct for ADIOI_W_Iexchange_data() */ + wed_vars = (ADIOI_W_Iexchange_data_vars *) ADIOI_Calloc(1, sizeof(ADIOI_W_Iexchange_data_vars)); +@@ -998,8 +979,6 @@ static void ADIOI_Iexch_and_write_fini(ADIOI_NBC_Request * nbc_req, int *error_c + ADIOI_Free(vars->sent_to_proc); + ADIOI_Free(vars->start_pos); + ADIOI_Free(vars->send_buf_idx); +- ADIOI_Free(vars->curr_to_proc); +- ADIOI_Free(vars->done_to_proc); + + next_fn = vars->next_fn; + +@@ -1206,11 +1185,14 @@ static void ADIOI_W_Iexchange_data_send(ADIOI_NBC_Request * nbc_req, int *error_ + } + } else if (nprocs_send) { + /* buftype is not contig */ ++ size_t msgLen = 0; ++ for (i = 0; i < nprocs; i++) ++ msgLen += send_size[i]; + send_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char *)); ++ send_buf[0] = (char *) ADIOI_Malloc(msgLen * sizeof(char)); ++ for (i = 1; i < nprocs; i++) ++ send_buf[i] = send_buf[i - 1] + send_size[i - 1]; + vars->send_buf = send_buf; +- for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- send_buf[i] = (char *) ADIOI_Malloc(send_size[i]); + + ADIOI_Fill_send_buffer(fd, buf, vars->flat_buf, send_buf, + vars->offset_list, vars->len_list, send_size, +@@ -1279,10 +1261,7 @@ static void ADIOI_W_Iexchange_data_fini(ADIOI_NBC_Request * nbc_req, int *error_ + ADIOI_W_Iexchange_data_vars *vars = nbc_req->data.wr.wed_vars; + void (*next_fn) (ADIOI_NBC_Request *, int *); + ADIO_File fd = vars->fd; +- int *send_size = vars->send_size; +- int nprocs = vars->nprocs; + char **send_buf = vars->send_buf; +- int i; + + if (fd->atomicity) + ADIOI_Free(vars->req3); +@@ -1292,9 +1271,7 @@ static void ADIOI_W_Iexchange_data_fini(ADIOI_NBC_Request * nbc_req, int *error_ + #endif + ADIOI_Free(vars->requests); + if (!vars->buftype_is_contig && vars->nprocs_send) { +- for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- ADIOI_Free(send_buf[i]); ++ ADIOI_Free(send_buf[0]); + ADIOI_Free(send_buf); + } + +--- a/src/mpi/romio/adio/common/ad_read_coll.c ++++ b/src/mpi/romio/adio/common/ad_read_coll.c +@@ -139,8 +139,8 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, + * processes. The result is an array each of start and end offsets + * stored in order of process rank. */ + +- st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); ++ st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * 2 * sizeof(ADIO_Offset)); ++ end_offsets = st_offsets + nprocs; + + MPI_Allgather(&start_offset, 1, ADIO_OFFSET, st_offsets, 1, ADIO_OFFSET, fd->comm); + MPI_Allgather(&end_offset, 1, ADIO_OFFSET, end_offsets, 1, ADIO_OFFSET, fd->comm); +@@ -160,9 +160,7 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, + /* don't do aggregation */ + if (fd->hints->cb_read != ADIOI_HINT_DISABLE) { + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + } + + fd->fp_ind = orig_fp; +@@ -233,14 +231,9 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, + * let's free the memory + */ + ADIOI_Free(count_my_req_per_proc); +- for (i = 0; i < nprocs; i++) { +- if (my_req[i].count) { +- ADIOI_Free(my_req[i].offsets); +- } +- } ++ ADIOI_Free(my_req[0].offsets); + ADIOI_Free(my_req); + +- + /* read data in sizes of no more than ADIOI_Coll_bufsize, + * communicate, and fill user buf. + */ +@@ -251,21 +244,14 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count, + + + /* free all memory allocated for collective I/O */ +- for (i = 0; i < nprocs; i++) { +- if (others_req[i].count) { +- ADIOI_Free(others_req[i].offsets); +- ADIOI_Free(others_req[i].mem_ptrs); +- } +- } ++ ADIOI_Free(others_req[0].offsets); ++ ADIOI_Free(others_req[0].mem_ptrs); + ADIOI_Free(others_req); + + ADIOI_Free(buf_idx); + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); + + #ifdef HAVE_STATUS_SET_BYTES + MPI_Type_size_x(datatype, &size); +@@ -319,8 +305,8 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype + + if (!filetype_size) { + *contig_access_count_ptr = 0; +- *offset_list_ptr = (ADIO_Offset *) ADIOI_Malloc(2 * sizeof(ADIO_Offset)); +- *len_list_ptr = (ADIO_Offset *) ADIOI_Malloc(2 * sizeof(ADIO_Offset)); ++ *offset_list_ptr = (ADIO_Offset *) ADIOI_Malloc(4 * sizeof(ADIO_Offset)); ++ *len_list_ptr = *offset_list_ptr + 2; + /* 2 is for consistency. everywhere I malloc one more than needed */ + + offset_list = *offset_list_ptr; +@@ -336,8 +322,8 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype + + if (filetype_is_contig) { + *contig_access_count_ptr = 1; +- *offset_list_ptr = (ADIO_Offset *) ADIOI_Malloc(2 * sizeof(ADIO_Offset)); +- *len_list_ptr = (ADIO_Offset *) ADIOI_Malloc(2 * sizeof(ADIO_Offset)); ++ *offset_list_ptr = (ADIO_Offset *) ADIOI_Malloc(4 * sizeof(ADIO_Offset)); ++ *len_list_ptr = *offset_list_ptr + 2; + /* 2 is for consistency. everywhere I malloc one more than needed */ + + offset_list = *offset_list_ptr; +@@ -437,10 +423,9 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype + + /* allocate space for offset_list and len_list */ + +- *offset_list_ptr = (ADIO_Offset *) +- ADIOI_Malloc((contig_access_count + 1) * sizeof(ADIO_Offset)); +- *len_list_ptr = +- (ADIO_Offset *) ADIOI_Malloc((contig_access_count + 1) * sizeof(ADIO_Offset)); ++ *offset_list_ptr = ++ (ADIO_Offset *) ADIOI_Malloc((contig_access_count + 1) * 2 * sizeof(ADIO_Offset)); ++ *len_list_ptr = *offset_list_ptr + (contig_access_count + 1); + /* +1 to avoid a 0-size malloc */ + + offset_list = *offset_list_ptr; +@@ -574,30 +559,30 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype + + read_buf = fd->io_buf; /* Allocated at open time */ + +- curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); ++ curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs * 7, sizeof(int)); + /* its use is explained below. calloc initializes to 0. */ + +- count = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ count = curr_offlen_ptr + nprocs; + /* to store count of how many off-len pairs per proc are satisfied + * in an iteration. */ + +- partial_send = (int *) ADIOI_Calloc(nprocs, sizeof(int)); ++ partial_send = count + nprocs; + /* if only a portion of the last off-len pair is sent to a process + * in a particular iteration, the length sent is stored here. + * calloc initializes to 0. */ + +- send_size = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ send_size = partial_send + nprocs; + /* total size of data to be sent to each proc. in an iteration */ + +- recv_size = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ recv_size = send_size + nprocs; + /* total size of data to be recd. from each proc. in an iteration. + * Of size nprocs so that I can use MPI_Alltoall later. */ + +- recd_from_proc = (int *) ADIOI_Calloc(nprocs, sizeof(int)); ++ recd_from_proc = recv_size + nprocs; + /* amount of data recd. so far from each proc. Used in + * ADIOI_Fill_user_buffer. initialized to 0 here. */ + +- start_pos = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ start_pos = recd_from_proc + nprocs; + /* used to store the starting value of curr_offlen_ptr[i] in + * this iteration */ + +@@ -767,12 +752,6 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype + others_req, m, buftype_extent, buf_idx); + + ADIOI_Free(curr_offlen_ptr); +- ADIOI_Free(count); +- ADIOI_Free(partial_send); +- ADIOI_Free(send_size); +- ADIOI_Free(recv_size); +- ADIOI_Free(recd_from_proc); +- ADIOI_Free(start_pos); + } + + static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node +@@ -789,6 +768,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node + { + int i, j, k = 0, tmp = 0, nprocs_recv, nprocs_send; + char **recv_buf = NULL; ++ size_t memLen; + MPI_Request *requests; + MPI_Datatype send_type; + MPI_Status *statuses; +@@ -799,14 +779,15 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node + MPI_Alltoall(send_size, 1, MPI_INT, recv_size, 1, MPI_INT, fd->comm); + + nprocs_recv = 0; +- for (i = 0; i < nprocs; i++) ++ nprocs_send = 0; ++ memLen = 0; ++ for (i = 0; i < nprocs; i++) { ++ memLen += recv_size[i]; + if (recv_size[i]) + nprocs_recv++; +- +- nprocs_send = 0; +- for (i = 0; i < nprocs; i++) + if (send_size[i]) + nprocs_send++; ++ } + + requests = (MPI_Request *) + ADIOI_Malloc((nprocs_send + nprocs_recv + 1) * sizeof(MPI_Request)); +@@ -830,13 +811,11 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node + } + } + } else { +-/* allocate memory for recv_buf and post receives */ ++ /* allocate memory for recv_buf and post receives */ + recv_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char *)); +- for (i = 0; i < nprocs; i++) { +- if (recv_size[i]) { +- recv_buf[i] = (char *) ADIOI_Malloc(recv_size[i]); +- } +- } ++ recv_buf[0] = (char *) ADIOI_Malloc(memLen); ++ for (i = 1; i < nprocs; i++) ++ recv_buf[i] = recv_buf[i - 1] + recv_size[i - 1]; + + j = 0; + for (i = 0; i < nprocs; i++) { +@@ -878,8 +857,12 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node + } + } + ++#ifdef MPI_STATUSES_IGNORE ++ statuses = MPI_STATUSES_IGNORE; ++#else + statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send + nprocs_recv + 1) * sizeof(MPI_Status)); + /* +1 to avoid a 0-size malloc */ ++#endif + + /* wait on the receives */ + if (nprocs_recv) { +@@ -901,15 +884,17 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node + } + + /* wait on the sends */ ++#ifdef MPI_STATUSES_IGNORE ++ MPI_Waitall(nprocs_send, requests + nprocs_recv, MPI_STATUSES_IGNORE); ++#else + MPI_Waitall(nprocs_send, requests + nprocs_recv, statuses + nprocs_recv); + + ADIOI_Free(statuses); ++#endif + ADIOI_Free(requests); + + if (!buftype_is_contig) { +- for (i = 0; i < nprocs; i++) +- if (recv_size[i]) +- ADIOI_Free(recv_buf[i]); ++ ADIOI_Free(recv_buf[0]); + ADIOI_Free(recv_buf); + } + #ifdef AGGREGATION_PROFILE +@@ -995,9 +980,9 @@ void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node + filled into user buffer in previous iterations + user_buf_idx = current location in user buffer + recv_buf_idx[p] = current location in recv_buf of proc. p */ +- curr_from_proc = (unsigned *) ADIOI_Malloc(nprocs * sizeof(unsigned)); +- done_from_proc = (unsigned *) ADIOI_Malloc(nprocs * sizeof(unsigned)); +- recv_buf_idx = (unsigned *) ADIOI_Malloc(nprocs * sizeof(unsigned)); ++ curr_from_proc = (unsigned *) ADIOI_Malloc(nprocs * 3 * sizeof(unsigned)); ++ done_from_proc = curr_from_proc + nprocs; ++ recv_buf_idx = done_from_proc + nprocs; + + for (i = 0; i < nprocs; i++) { + recv_buf_idx[i] = curr_from_proc[i] = 0; +@@ -1061,6 +1046,4 @@ void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node + recd_from_proc[i] = curr_from_proc[i]; + + ADIOI_Free(curr_from_proc); +- ADIOI_Free(done_from_proc); +- ADIOI_Free(recv_buf_idx); + } +--- a/src/mpi/romio/adio/common/ad_set_view.c ++++ b/src/mpi/romio/adio/common/ad_set_view.c +@@ -45,7 +45,8 @@ int check_type(ADIOI_Flatlist_node * flat_type, + err_check: + *error_code = MPIO_Err_create_code(*error_code, + MPIR_ERR_RECOVERABLE, caller, +- __LINE__, MPI_ERR_IO, "**iobadoverlap", " **iobadoverlap %s", err_msg); ++ __LINE__, MPI_ERR_IO, "**iobadoverlap", " **iobadoverlap %s", ++ err_msg); + return 0; + } + +--- a/src/mpi/romio/adio/common/ad_write_coll.c ++++ b/src/mpi/romio/adio/common/ad_write_coll.c +@@ -112,8 +112,8 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, + * processes. The result is an array each of start and end offsets stored + * in order of process rank. */ + +- st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); +- end_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * sizeof(ADIO_Offset)); ++ st_offsets = (ADIO_Offset *) ADIOI_Malloc(nprocs * 2 * sizeof(ADIO_Offset)); ++ end_offsets = st_offsets + nprocs; + + MPI_Allgather(&start_offset, 1, ADIO_OFFSET, st_offsets, 1, ADIO_OFFSET, fd->comm); + MPI_Allgather(&end_offset, 1, ADIO_OFFSET, end_offsets, 1, ADIO_OFFSET, fd->comm); +@@ -133,9 +133,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, + /* use independent accesses */ + if (fd->hints->cb_write != ADIOI_HINT_DISABLE) { + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + } + + fd->fp_ind = orig_fp; +@@ -183,11 +181,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, + nprocs, myrank, &count_others_req_procs, &others_req); + + ADIOI_Free(count_my_req_per_proc); +- for (i = 0; i < nprocs; i++) { +- if (my_req[i].count) { +- ADIOI_Free(my_req[i].offsets); +- } +- } ++ ADIOI_Free(my_req[0].offsets); + ADIOI_Free(my_req); + + /* exchange data and write in sizes of no more than coll_bufsize. */ +@@ -233,24 +227,15 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count, + if ((old_error != MPI_SUCCESS) && (old_error != MPI_ERR_IO)) + *error_code = old_error; + +- +-/* free all memory allocated for collective I/O */ +- +- for (i = 0; i < nprocs; i++) { +- if (others_req[i].count) { +- ADIOI_Free(others_req[i].offsets); +- ADIOI_Free(others_req[i].mem_ptrs); +- } +- } ++ /* free all memory allocated for collective I/O */ ++ ADIOI_Free(others_req[0].offsets); ++ ADIOI_Free(others_req[0].mem_ptrs); + ADIOI_Free(others_req); + + ADIOI_Free(buf_idx); + ADIOI_Free(offset_list); +- ADIOI_Free(len_list); + ADIOI_Free(st_offsets); +- ADIOI_Free(end_offsets); + ADIOI_Free(fd_start); +- ADIOI_Free(fd_end); + + #ifdef HAVE_STATUS_SET_BYTES + if (status) { +@@ -349,35 +334,35 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype + + write_buf = fd->io_buf; + +- curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs, sizeof(int)); ++ curr_offlen_ptr = (int *) ADIOI_Calloc(nprocs * 10, sizeof(int)); + /* its use is explained below. calloc initializes to 0. */ + +- count = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ count = curr_offlen_ptr + nprocs; + /* to store count of how many off-len pairs per proc are satisfied + * in an iteration. */ + +- partial_recv = (int *) ADIOI_Calloc(nprocs, sizeof(int)); ++ partial_recv = count + nprocs; + /* if only a portion of the last off-len pair is recd. from a process + * in a particular iteration, the length recd. is stored here. + * calloc initializes to 0. */ + +- send_size = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ send_size = partial_recv + nprocs; + /* total size of data to be sent to each proc. in an iteration. + * Of size nprocs so that I can use MPI_Alltoall later. */ + +- recv_size = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ recv_size = send_size + nprocs; + /* total size of data to be recd. from each proc. in an iteration. */ + +- sent_to_proc = (int *) ADIOI_Calloc(nprocs, sizeof(int)); ++ sent_to_proc = recv_size + nprocs; + /* amount of data sent to each proc so far. Used in + * ADIOI_Fill_send_buffer. initialized to 0 here. */ + +- send_buf_idx = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +- curr_to_proc = (int *) ADIOI_Malloc(nprocs * sizeof(int)); +- done_to_proc = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ send_buf_idx = sent_to_proc + nprocs; ++ curr_to_proc = send_buf_idx + nprocs; ++ done_to_proc = curr_to_proc + nprocs; + /* Above three are used in ADIOI_Fill_send_buffer */ + +- start_pos = (int *) ADIOI_Malloc(nprocs * sizeof(int)); ++ start_pos = done_to_proc + nprocs; + /* used to store the starting value of curr_offlen_ptr[i] in + * this iteration */ + +@@ -524,15 +509,6 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype + } + + ADIOI_Free(curr_offlen_ptr); +- ADIOI_Free(count); +- ADIOI_Free(partial_recv); +- ADIOI_Free(send_size); +- ADIOI_Free(recv_size); +- ADIOI_Free(sent_to_proc); +- ADIOI_Free(start_pos); +- ADIOI_Free(send_buf_idx); +- ADIOI_Free(curr_to_proc); +- ADIOI_Free(done_to_proc); + } + + +@@ -572,10 +548,16 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, + + /* create derived datatypes for recv */ + ++ nprocs_send = 0; + nprocs_recv = 0; +- for (i = 0; i < nprocs; i++) ++ sum = 0; ++ for (i = 0; i < nprocs; i++) { ++ sum += count[i]; + if (recv_size[i]) + nprocs_recv++; ++ if (send_size[i]) ++ nprocs_send++; ++ } + + recv_types = (MPI_Datatype *) + ADIOI_Malloc((nprocs_recv + 1) * sizeof(MPI_Datatype)); +@@ -605,9 +587,6 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, + * data to be written. For this, merge the (sorted) offset lists + * others_req using a heap-merge. */ + +- sum = 0; +- for (i = 0; i < nprocs; i++) +- sum += count[i]; + /* valgrind-detcted optimization: if there is no work on this process we do + * not need to search for holes */ + if (sum) { +@@ -617,7 +596,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, + ADIOI_Heap_merge(others_req, count, srt_off, srt_len, start_pos, nprocs, nprocs_recv, sum); + } + +-/* for partial recvs, restore original lengths */ ++ /* for partial recvs, restore original lengths */ + for (i = 0; i < nprocs; i++) + if (partial_recv[i]) { + k = start_pos[i] + count[i] - 1; +@@ -669,11 +648,6 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, + } + } + +- nprocs_send = 0; +- for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- nprocs_send++; +- + if (fd->atomicity) { + /* bug fix from Wei-keng Liao and Kenin Coloma */ + requests = (MPI_Request *) +@@ -713,10 +687,13 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, + } + } else if (nprocs_send) { + /* buftype is not contig */ +- send_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char *)); ++ size_t msgLen = 0; + for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- send_buf[i] = (char *) ADIOI_Malloc(send_size[i]); ++ msgLen += send_size[i]; ++ send_buf = (char **) ADIOI_Malloc(nprocs * sizeof(char *)); ++ send_buf[0] = (char *) ADIOI_Malloc(msgLen * sizeof(char)); ++ for (i = 1; i < nprocs; i++) ++ send_buf[i] = send_buf[i - 1] + send_size[i - 1]; + + ADIOI_Fill_send_buffer(fd, buf, flat_buf, send_buf, + offset_list, len_list, send_size, +@@ -745,6 +722,9 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, + MPI_Type_free(recv_types + i); + ADIOI_Free(recv_types); + ++#ifdef MPI_STATUSES_IGNORE ++ statuses = MPI_STATUSES_IGNORE; ++#else + if (fd->atomicity) { + /* bug fix from Wei-keng Liao and Kenin Coloma */ + statuses = (MPI_Status *) ADIOI_Malloc((nprocs_send + 1) * sizeof(MPI_Status)); +@@ -754,6 +734,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, + sizeof(MPI_Status)); + /* +1 to avoid a 0-size malloc */ + } ++#endif + + #ifdef NEEDS_MPI_TEST + i = 0; +@@ -776,12 +757,12 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf, + #ifdef AGGREGATION_PROFILE + MPE_Log_event(5033, 0, NULL); + #endif ++#ifndef MPI_STATUSES_IGNORE + ADIOI_Free(statuses); ++#endif + ADIOI_Free(requests); + if (!buftype_is_contig && nprocs_send) { +- for (i = 0; i < nprocs; i++) +- if (send_size[i]) +- ADIOI_Free(send_buf[i]); ++ ADIOI_Free(send_buf[0]); + ADIOI_Free(send_buf); + } + } +--- a/src/mpi/romio/adio/common/flatten.c ++++ b/src/mpi/romio/adio/common/flatten.c +@@ -33,9 +33,6 @@ void ADIOI_Optimize_flattened(ADIOI_Flatlist_node * flat_type); + /* flatten datatype and add it to Flatlist */ + ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype) + { +-#ifdef HAVE_MPIR_TYPE_FLATTEN +- MPI_Aint flatten_idx; +-#endif + MPI_Count flat_count, curr_index = 0; + int is_contig, flag; + ADIOI_Flatlist_node *flat; +@@ -48,10 +45,6 @@ ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype) + + /* check if necessary to flatten. */ + +-#ifdef FLATTEN_DEBUG +- DBG_FPRINTF(stderr, "ADIOI_Flatten_datatype:: is_contig %#X\n", is_contig); +-#endif +- + /* has it already been flattened? */ + MPI_Type_get_attr(datatype, ADIOI_Flattened_type_keyval, &flat, &flag); + if (flag) { +@@ -63,6 +56,10 @@ ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype) + + /* is it entirely contiguous? */ + ADIOI_Datatype_iscontig(datatype, &is_contig); ++ ++#ifdef FLATTEN_DEBUG ++ DBG_FPRINTF(stderr, "ADIOI_Flatten_datatype:: is_contig %#X\n", is_contig); ++#endif + /* it would be great if ADIOI_Count_contiguous_blocks and the rest of the + * flattening code operated on the built-in named types, but + * it recursively processes types, stopping when it hits a named type. So +@@ -82,20 +79,12 @@ ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype) + } else { + + curr_index = 0; +-#ifdef HAVE_MPIR_TYPE_FLATTEN +- flatten_idx = (MPI_Aint) flat->count; +- MPIR_Type_flatten(datatype, flat->indices, flat->blocklens, &flatten_idx); +-#ifdef FLATTEN_DEBUG +- DBG_FPRINTF(stderr, "ADIOI_Flatten_datatype:: MPIR_Type_flatten\n"); +-#endif +-#else + ADIOI_Flatten(datatype, flat, 0, &curr_index); + #ifdef FLATTEN_DEBUG + DBG_FPRINTF(stderr, "ADIOI_Flatten_datatype:: ADIOI_Flatten\n"); + #endif + + ADIOI_Optimize_flattened(flat); +-#endif + /* debug */ + #ifdef FLATTEN_DEBUG + { +--- a/src/mpi/romio/adio/common/hint_fns.c ++++ b/src/mpi/romio/adio/common/hint_fns.c +@@ -146,7 +146,7 @@ int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *ke + + ADIOI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag); + if (flag) { +- ADIOI_Info_set(fd->info, "cb_config_list", value); ++ ADIOI_Info_set(fd->info, key, value); + len = (strlen(value) + 1) * sizeof(char); + *local_cache = ADIOI_Malloc(len); + if (*local_cache == NULL) { +--- a/src/mpi/romio/adio/common/malloc.c ++++ b/src/mpi/romio/adio/common/malloc.c +@@ -20,10 +20,6 @@ + #include + #include "mpipr.h" + +-#ifdef HAVE_MALLOC_H +-#include +-#endif +- + /* for the style checker */ + /* style: allow:malloc:1 sig:0 */ + /* style: allow:free:1 sig:0 */ +--- a/src/mpi/romio/adio/include/adio.h ++++ b/src/mpi/romio/adio/include/adio.h +@@ -287,8 +287,9 @@ typedef struct { + #define ADIO_PVFS2 160 /* PVFS2: 2nd generation PVFS */ + #define ADIO_PANFS 161 /* Panasas FS */ + #define ADIO_LUSTRE 163 /* Lustre */ +-#define ADIO_GPFS 168 ++#define ADIO_GPFS 168 + #define ADIO_IME 169 /* IME burst buffer */ ++#define ADIO_DAOS 170 + + #define ADIO_SEEK_SET SEEK_SET + #define ADIO_SEEK_CUR SEEK_CUR +--- a/src/mpi/romio/adio/include/adioi.h ++++ b/src/mpi/romio/adio/include/adioi.h +@@ -53,6 +53,10 @@ struct ADIOI_Hints_struct { + int *ranklist; + union { + struct { ++ int chunk_size; ++ int obj_class; ++ } daos; ++ struct { + int listio_read; + int listio_write; + } pvfs; +@@ -88,7 +92,6 @@ struct ADIOI_Hints_struct { + int numbridges; /* total number of bridges */ + } bg; + } fs_hints; +- + }; + + typedef struct ADIOI_Datarep { +@@ -143,6 +146,10 @@ typedef struct ADIOI_Fl_node { + #ifdef ROMIO_PVFS2 + #include + #endif ++#ifdef ROMIO_DAOS ++#include ++#endif ++ + typedef struct ADIOI_AIO_req_str { + /* very weird: if this MPI_Request is a pointer, some C++ compilers + * will clobber it when the MPICH C++ bindings are used */ +@@ -158,6 +165,9 @@ typedef struct ADIOI_AIO_req_str { + PVFS_Request file_req; + PVFS_Request mem_req; + #endif ++#ifdef ROMIO_DAOS ++ daos_event_t daos_event; ++#endif + } ADIOI_AIO_Request; + + struct ADIOI_Fns_struct { +@@ -930,8 +940,6 @@ int ADIOI_MPE_iwrite_b; + (no loss of (meaningful) high order bytes in 8 byte MPI_Aint + to (possible) 4 byte ptr cast) */ + /* Should work even on 64bit or old 32bit configs */ +- /* Use MPIR_Ensure_Aint_fits_in_pointer and +- * MPIR_AINT_CAST_TO_VOID_PTR from configure (mpi.h) */ + #include "mpir_ext.h" + + #define ADIOI_AINT_CAST_TO_VOID_PTR (void*)(intptr_t) +@@ -939,15 +947,12 @@ int ADIOI_MPE_iwrite_b; + * when casting a (possible 4 byte) aint to a (8 byte) long long or offset */ + #define ADIOI_AINT_CAST_TO_LONG_LONG (long long) + #define ADIOI_AINT_CAST_TO_OFFSET ADIOI_AINT_CAST_TO_LONG_LONG +- +-#define ADIOI_ENSURE_AINT_FITS_IN_PTR(aint_value) MPIR_Ext_ensure_Aint_fits_in_pointer(aint_value) + #define ADIOI_Assert MPIR_Ext_assert + #else + #include + #define ADIOI_AINT_CAST_TO_VOID_PTR (void*) + #define ADIOI_AINT_CAST_TO_LONG_LONG (long long) + #define ADIOI_AINT_CAST_TO_OFFSET ADIOI_AINT_CAST_TO_LONG_LONG +-#define ADIOI_ENSURE_AINT_FITS_IN_PTR(aint_value) + #define ADIOI_Assert assert + #endif + +--- a/src/mpi/romio/adio/include/adioi_fs_proto.h ++++ b/src/mpi/romio/adio/include/adioi_fs_proto.h +@@ -54,4 +54,8 @@ extern struct ADIOI_Fns_struct ADIO_GPFS_operations; + extern struct ADIOI_Fns_struct ADIO_IME_operations; + #endif + ++#ifdef ROMIO_DAOS ++/* prototypes are in adio/ad_daos/ad_daos.h */ ++extern struct ADIOI_Fns_struct ADIO_DAOS_operations; ++#endif + #endif /* ADIOI_FS_PROTO_H_INCLUDED */ +--- a/src/mpi/romio/configure.ac ++++ b/src/mpi/romio/configure.ac +@@ -26,7 +26,8 @@ AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability-recursive foreign 1.12.3 silent + AM_MAINTAINER_MODE([enable]) + + dnl must come before LT_INIT, which AC_REQUIREs AC_PROG_CC +-PAC_PROG_CC ++AC_PROG_CC ++AC_PROG_CC_C99 + AM_PROG_CC_C_O + PAC_CHECK_VISIBILITY + AC_SUBST(VISIBILITY_CFLAGS) +@@ -187,7 +188,7 @@ dnl An m4 macro for use with m4_foreach_w and friends. You should modify this + dnl list if you want to add a known file system. The list is just whitespace + dnl separated, so you can use newlines and tabs as well. + m4_define([known_filesystems_m4_w], +- [nfs ufs pvfs2 testfs xfs panfs lustre gpfs ime])dnl ++ [daos nfs ufs pvfs2 testfs xfs panfs lustre gpfs ime])dnl + dnl + dnl An m4 macro for use with m4_foreach and friends. Expands to a quoted list of + dnl quoted elements. A bit easier to use without unintended expansion than the +@@ -776,6 +777,44 @@ if test -n "$FILE_SYSTEM" ; then + done + fi + ++AC_ARG_WITH([cart], ++ [AS_HELP_STRING([--with-cart], ++ [Build DAOS ROMIO driver[default=no]])],, ++ [with_cart=no]) ++ ++AS_IF([test "x$with_cart" != xno], ++ CART="yes" ++ LDFLAGS="$LDFLAGS -L$with_cart/lib" ++ CPPFLAGS="$CPPFLAGS -I$with_cart/include/" ++ AC_CHECK_HEADERS(gurt/common.h,, [unset CART]) ++ AC_CHECK_LIB([gurt], [d_hash_murmur64],, [unset CART])) ++ ++AC_ARG_WITH([daos], ++ [AS_HELP_STRING([--with-daos], ++ [Build DAOS ROMIO driver[default=no]])],, ++ [with_daos=no]) ++ ++AS_IF([test "x$with_daos" != xno], ++ DAOS="yes" ++ LDFLAGS="$LDFLAGS -L$with_daos/lib" ++ CPPFLAGS="$CPPFLAGS -I$with_daos/include" ++ AC_CHECK_HEADERS(daos_types.h,, [unset DAOS]) ++ AC_CHECK_LIB([uuid], [uuid_generate],, [unset DAOS]) ++ AC_CHECK_LIB([daos_common], [daos_sgl_init],, [unset DAOS]) ++ AC_CHECK_LIB([daos], [daos_init],, [unset DAOS]) ++ AC_CHECK_LIB([dfs], [dfs_mount],, [unset DAOS]) ++ AC_CHECK_LIB([duns], [duns_resolve_path],, [unset DAOS])) ++ ++AS_IF([test "x$CART" != xyes], [unset DAOS]) ++ ++if test -n "$file_system_daos" ; then ++ if test "x$DAOS" == xyes ; then ++ AC_DEFINE(ROMIO_DAOS,1,[Define for ROMIO with DAOS]) ++ else ++ AC_MSG_ERROR([DAOS support requested but not found (--with-daos, --with-cart)]) ++ fi ++fi ++ + ############################################# + # This PVFS2 logic is special because it's hard to get it right if it comes + # before the known_filesystems check loop above. So we handle it down here, +@@ -985,7 +1024,6 @@ if test -n "$file_system_pvfs2"; then + ) + fi + +- + AS_IF([test -n "$file_system_gpfs"], + [SYSDEP_INC=-I${prefix}/include], [SYSDEP_INC=]) + +--- a/src/mpi/romio/mpi-io/mpir_cst_filesys.c ++++ b/src/mpi/romio/mpi-io/mpir_cst_filesys.c +@@ -240,10 +240,6 @@ static int comm_split_filesystem_heuristic(MPI_Comm comm, int key, + /* not to be called directly (note the MPIR_ prefix), but instead from + * MPI-level MPI_Comm_split_type implementation (e.g. + * MPIR_Comm_split_type_impl). */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_split_filesystem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /* split communicator based on access to directory 'dirname'. */ + int MPIR_Comm_split_filesystem(MPI_Comm comm, int key, const char *dirname, MPI_Comm * newcomm) +--- a/src/mpi/romio/mpi-io/read.c ++++ b/src/mpi/romio/mpi-io/read.c +@@ -97,10 +97,11 @@ int MPIOI_File_read(MPI_File fh, + MPIO_CHECK_COUNT_SIZE(adio_fh, count, datatype_size, myname, error_code); + /* --END ERROR HANDLING-- */ + +- if (count * datatype_size == 0) { + #ifdef HAVE_STATUS_SET_BYTES +- MPIR_Status_set_bytes(status, datatype, 0); ++ MPIR_Status_set_bytes(status, datatype, 0); + #endif ++ ++ if (count * datatype_size == 0) { + error_code = MPI_SUCCESS; + goto fn_exit; + } +--- a/src/mpi/romio/mpi-io/write.c ++++ b/src/mpi/romio/mpi-io/write.c +@@ -100,10 +100,11 @@ int MPIOI_File_write(MPI_File fh, + MPIO_CHECK_COUNT_SIZE(adio_fh, count, datatype_size, myname, error_code); + /* --END ERROR HANDLING-- */ + +- if (count * datatype_size == 0) { + #ifdef HAVE_STATUS_SET_BYTES +- MPIR_Status_set_bytes(status, datatype, 0); ++ MPIR_Status_set_bytes(status, datatype, 0); + #endif ++ ++ if (count * datatype_size == 0) { + error_code = MPI_SUCCESS; + goto fn_exit; + } +--- a/src/mpi/romio/test/async-multiple.c ++++ b/src/mpi/romio/test/async-multiple.c +@@ -80,7 +80,10 @@ int main(int argc, char **argv) + if (errcode != MPI_SUCCESS) { + handle_error(errcode, "MPI_File_open"); + } +- MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); ++ errcode = MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); ++ if (errcode != MPI_SUCCESS) { ++ handle_error(errcode, "MPI_File_set_view"); ++ } + for (i = 0; i < NR_NBOPS; i++) { + errcode = MPI_File_iwrite_at(fh, nints / NR_NBOPS * i, + buf + (nints / NR_NBOPS * i), nints / NR_NBOPS, MPI_INT, +@@ -103,7 +106,10 @@ int main(int argc, char **argv) + handle_error(errcode, "MPI_File_open"); + } + +- MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); ++ errcode = MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); ++ if (errcode != MPI_SUCCESS) { ++ handle_error(errcode, "MPI_File_set_view"); ++ } + for (i = 0; i < NR_NBOPS; i++) { + errcode = MPI_File_iread_at(fh, nints / NR_NBOPS * i, + buf + (nints / NR_NBOPS * i), nints / NR_NBOPS, MPI_INT, +--- a/src/mpi/romio/test/async.c ++++ b/src/mpi/romio/test/async.c +@@ -78,7 +78,11 @@ int main(int argc, char **argv) + if (errcode != MPI_SUCCESS) { + handle_error(errcode, "MPI_File_open"); + } +- MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); ++ errcode = MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); ++ if (errcode != MPI_SUCCESS) { ++ handle_error(errcode, "MPI_File_set_view"); ++ } ++ + errcode = MPI_File_iwrite(fh, buf, nints, MPI_INT, &request); + if (errcode != MPI_SUCCESS) { + handle_error(errcode, "MPI_File_iwrite"); +@@ -100,7 +104,10 @@ int main(int argc, char **argv) + handle_error(errcode, "MPI_File_open"); + } + +- MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); ++ errcode = MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, "native", MPI_INFO_NULL); ++ if (errcode != MPI_SUCCESS) { ++ handle_error(errcode, "MPI_File_set_view"); ++ } + errcode = MPI_File_iread(fh, buf, nints, MPI_INT, &request); + if (errcode != MPI_SUCCESS) { + handle_error(errcode, "MPI_File_open"); +--- a/src/mpi/romio/test/atomicity.c ++++ b/src/mpi/romio/test/atomicity.c +@@ -14,6 +14,18 @@ + + /* The file name is taken as a command-line argument. */ + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + #define BUFSIZE 10000 /* no. of integers */ + #define VERBOSE 0 + int main(int argc, char **argv) +@@ -61,12 +73,14 @@ int main(int argc, char **argv) + + /* initialize file to all zeros */ + if (!mynod) { ++ /* ignore error: file may or may not exist */ + MPI_File_delete(filename, MPI_INFO_NULL); +- MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_SELF, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + for (i = 0; i < BUFSIZE; i++) + writebuf[i] = 0; +- MPI_File_write(fh, writebuf, BUFSIZE, MPI_INT, &status); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_write(fh, writebuf, BUFSIZE, MPI_INT, &status)); ++ MPI_CHECK(MPI_File_close(&fh)); + #if VERBOSE + fprintf(stderr, "\ntesting contiguous accesses\n"); + #endif +@@ -78,7 +92,8 @@ int main(int argc, char **argv) + for (i = 0; i < BUFSIZE; i++) + readbuf[i] = 20; + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + + /* set atomicity to true */ + err = MPI_File_set_atomicity(fh, 1); +@@ -95,9 +110,9 @@ int main(int argc, char **argv) + the data read must be either all old values or all new values; nothing + in between. */ + +- if (!mynod) +- MPI_File_write(fh, writebuf, BUFSIZE, MPI_INT, &status); +- else { ++ if (!mynod) { ++ MPI_CHECK(MPI_File_write(fh, writebuf, BUFSIZE, MPI_INT, &status)); ++ } else { + err = MPI_File_read(fh, readbuf, BUFSIZE, MPI_INT, &status); + if (err == MPI_SUCCESS) { + if (readbuf[0] == 0) { /* the rest must also be 0 */ +@@ -124,7 +139,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -141,12 +156,13 @@ int main(int argc, char **argv) + MPI_Info_set(info, "ind_wr_buffer_size", "1107"); + + if (!mynod) { +- MPI_File_delete(filename, MPI_INFO_NULL); +- MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); ++ MPI_CHECK(MPI_File_delete(filename, MPI_INFO_NULL)); ++ MPI_CHECK(MPI_File_open(MPI_COMM_SELF, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh)); + for (i = 0; i < BUFSIZE; i++) + writebuf[i] = 0; +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info); +- MPI_File_write(fh, writebuf, BUFSIZE, MPI_INT, &status); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info)); ++ MPI_CHECK(MPI_File_write(fh, writebuf, BUFSIZE, MPI_INT, &status)); + MPI_File_close(&fh); + #if VERBOSE + fprintf(stderr, "\ntesting noncontiguous accesses\n"); +@@ -159,14 +175,14 @@ int main(int argc, char **argv) + for (i = 0; i < BUFSIZE; i++) + readbuf[i] = 20; + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); +- MPI_File_set_atomicity(fh, 1); +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh)); ++ MPI_CHECK(MPI_File_set_atomicity(fh, 1)); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info)); + MPI_Barrier(MPI_COMM_WORLD); + +- if (!mynod) +- MPI_File_write(fh, writebuf, BUFSIZE, MPI_INT, &status); +- else { ++ if (!mynod) { ++ MPI_CHECK(MPI_File_write(fh, writebuf, BUFSIZE, MPI_INT, &status)); ++ } else { + err = MPI_File_read(fh, readbuf, BUFSIZE, MPI_INT, &status); + if (err == MPI_SUCCESS) { + if (readbuf[0] == 0) { +--- a/src/mpi/romio/test/coll_perf.c ++++ b/src/mpi/romio/test/coll_perf.c +@@ -8,6 +8,18 @@ + #include + #include + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + /* The file name is taken as a command-line argument. */ + + /* Measures the I/O bandwidth for writing/reading a 3D +@@ -91,24 +103,26 @@ int main(int argc, char **argv) + /* to eliminate paging effects, do the operations once but don't time + them */ + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); +- MPI_File_write_all(fh, buf, bufcount, MPI_INT, &status); +- MPI_File_seek(fh, 0, MPI_SEEK_SET); +- MPI_File_read_all(fh, buf, bufcount, MPI_INT, &status); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); ++ MPI_CHECK(MPI_File_write_all(fh, buf, bufcount, MPI_INT, &status)); ++ MPI_CHECK(MPI_File_seek(fh, 0, MPI_SEEK_SET)); ++ MPI_CHECK(MPI_File_read_all(fh, buf, bufcount, MPI_INT, &status)); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + /* now time write_all */ + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); + + MPI_Barrier(MPI_COMM_WORLD); + stim = MPI_Wtime(); +- MPI_File_write_all(fh, buf, bufcount, MPI_INT, &status); ++ MPI_CHECK(MPI_File_write_all(fh, buf, bufcount, MPI_INT, &status)); + write_tim = MPI_Wtime() - stim; +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Allreduce(&write_tim, &new_write_tim, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); + +@@ -126,14 +140,15 @@ int main(int argc, char **argv) + MPI_Barrier(MPI_COMM_WORLD); + /* now time read_all */ + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); + + MPI_Barrier(MPI_COMM_WORLD); + stim = MPI_Wtime(); +- MPI_File_read_all(fh, buf, bufcount, MPI_INT, &status); ++ MPI_CHECK(MPI_File_read_all(fh, buf, bufcount, MPI_INT, &status)); + read_tim = MPI_Wtime() - stim; +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Allreduce(&read_tim, &new_read_tim, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); + +--- a/src/mpi/romio/test/error.c ++++ b/src/mpi/romio/test/error.c +@@ -8,6 +8,22 @@ + #include + #include + ++/* many calls are deliberately passed bogus values, are expected to fail, and ++ * then checked to see if we get the right error message. Other ++ * calls are expected to succeed but the preciese return string is not checked. This ++ * rouine and MPI_CHECK macro handle these unexpected error cases */ ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + #define VERBOSE 0 + /* tests if error message is printed correctly */ + +@@ -58,8 +74,8 @@ int main(int argc, char **argv) + strcpy(tmp, filename); + sprintf(filename, "%s.%d", tmp, rank); + +- err = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE + MPI_MODE_RDWR, +- MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE + MPI_MODE_RDWR, ++ MPI_INFO_NULL, &fh)); + err = MPI_File_set_view(fh, -1, MPI_BYTE, MPI_BYTE, "native", MPI_INFO_NULL); + /* disp is deliberately passed as -1 */ + +--- a/src/mpi/romio/test/file_info.c ++++ b/src/mpi/romio/test/file_info.c +@@ -121,7 +121,6 @@ int main(int argc, char **argv) + defaults = NULL; + } + +- + /* open the file with MPI_INFO_NULL */ + ret = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, + MPI_INFO_NULL, &fh); +@@ -412,6 +411,12 @@ int main(int argc, char **argv) + } + + MPI_File_close(&fh); ++ ++ /* delete the file */ ++ if (!mynod) ++ MPI_File_delete(filename, MPI_INFO_NULL); ++ MPI_Barrier(MPI_COMM_WORLD); ++ + free(filename); + MPI_Info_free(&info_used); + MPI_Info_free(&info); +--- a/src/mpi/romio/test/hindexed.c ++++ b/src/mpi/romio/test/hindexed.c +@@ -10,6 +10,18 @@ + #include + #include + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + #define YLEN 5 + #define XLEN 10 + #define SUB_XLEN 3 +@@ -143,10 +155,10 @@ int main(int argc, char **argv) + /* zero file contents --------------------------------------------------- */ + if (rank == 0) { + char *wr_buf = (char *) calloc(num_io * global_array_size, 1); +- MPI_File_open(MPI_COMM_SELF, filename, +- MPI_MODE_CREATE | MPI_MODE_WRONLY, MPI_INFO_NULL, &fh); +- MPI_File_write(fh, wr_buf, num_io * global_array_size, MPI_CHAR, &status); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_SELF, filename, ++ MPI_MODE_CREATE | MPI_MODE_WRONLY, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_write(fh, wr_buf, num_io * global_array_size, MPI_CHAR, &status)); ++ MPI_CHECK(MPI_File_close(&fh)); + free(wr_buf); + } + /* open the file -------------------------------------------------------- */ +@@ -162,18 +174,18 @@ int main(int argc, char **argv) + for (i = 0; i < num_io; i++) { + offset = i * global_array_size; + /* set the file view */ +- MPI_File_set_view(fh, offset, MPI_BYTE, ftype, "native", MPI_INFO_NULL); +- MPI_File_write_all(fh, buf, ftype_size, MPI_CHAR, &status); ++ MPI_CHECK(MPI_File_set_view(fh, offset, MPI_BYTE, ftype, "native", MPI_INFO_NULL)); ++ MPI_CHECK(MPI_File_write_all(fh, buf, ftype_size, MPI_CHAR, &status)); + } +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + /* read and print file contents ----------------------------------------- */ + if (rank == 0) { + char *ptr; + char *rd_buf = (char *) calloc(num_io * global_array_size, 1); +- MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_RDONLY, MPI_INFO_NULL, &fh); +- MPI_File_read(fh, rd_buf, num_io * global_array_size, MPI_CHAR, &status); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_RDONLY, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_read(fh, rd_buf, num_io * global_array_size, MPI_CHAR, &status)); ++ MPI_CHECK(MPI_File_close(&fh)); + + #ifdef VERBOSE + printf("-------------------------------------------------------\n"); +--- a/src/mpi/romio/test/i_noncontig.c ++++ b/src/mpi/romio/test/i_noncontig.c +@@ -9,6 +9,18 @@ + #include + + /* tests noncontiguous reads/writes using nonblocking I/O */ ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + + #define SIZE 5000 + +@@ -83,13 +95,14 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); + + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_iwrite(fh, buf, 1, newtype, &req); ++ MPI_CHECK(MPI_File_iwrite(fh, buf, 1, newtype, &req)); + #ifdef MPIO_USES_MPI_REQUEST + MPI_Wait(&req, &status); + #else +@@ -101,7 +114,7 @@ int main(int argc, char **argv) + for (i = 0; i < SIZE; i++) + buf[i] = -1; + +- MPI_File_iread_at(fh, 0, buf, 1, newtype, &req); ++ MPI_CHECK(MPI_File_iread_at(fh, 0, buf, 1, newtype, &req)); + #ifdef MPIO_USES_MPI_REQUEST + MPI_Wait(&req, &status); + #else +@@ -131,7 +144,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -144,11 +157,12 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_iwrite_at(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &req); ++ MPI_CHECK(MPI_File_iwrite_at(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &req)); + #ifdef MPIO_USES_MPI_REQUEST + MPI_Wait(&req, &status); + #else +@@ -160,7 +174,7 @@ int main(int argc, char **argv) + for (i = 0; i < SIZE; i++) + buf[i] = -1; + +- MPI_File_iread_at(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &req); ++ MPI_CHECK(MPI_File_iread_at(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &req)); + #ifdef MPIO_USES_MPI_REQUEST + MPI_Wait(&req, &status); + #else +@@ -190,7 +204,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -203,13 +217,14 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); + + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_iwrite(fh, buf, SIZE, MPI_INT, &req); ++ MPI_CHECK(MPI_File_iwrite(fh, buf, SIZE, MPI_INT, &req)); + #ifdef MPIO_USES_MPI_REQUEST + MPI_Wait(&req, &status); + #else +@@ -221,7 +236,7 @@ int main(int argc, char **argv) + for (i = 0; i < SIZE; i++) + buf[i] = -1; + +- MPI_File_iread_at(fh, 0, buf, SIZE, MPI_INT, &req); ++ MPI_CHECK(MPI_File_iread_at(fh, 0, buf, SIZE, MPI_INT, &req)); + #ifdef MPIO_USES_MPI_REQUEST + MPI_Wait(&req, &status); + #else +@@ -243,7 +258,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Allreduce(&errs, &toterrs, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); + if (mynod == 0) { +--- a/src/mpi/romio/test/large_array.c ++++ b/src/mpi/romio/test/large_array.c +@@ -18,6 +18,20 @@ + /* This program will work only if the MPI implementation defines MPI_Aint + as a 64-bit integer. */ + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ ++ ++ + int main(int argc, char **argv) + { + MPI_Datatype newtype; +@@ -111,10 +125,11 @@ int main(int argc, char **argv) + writebuf[i] = mynod * 1024 + i; + + /* write the array to the file */ +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); +- MPI_File_write_all(fh, writebuf, bufcount, MPI_INT, &status); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); ++ MPI_CHECK(MPI_File_write_all(fh, writebuf, bufcount, MPI_INT, &status)); ++ MPI_CHECK(MPI_File_close(&fh)); + + free(writebuf); + +@@ -123,10 +138,11 @@ int main(int argc, char **argv) + if (!readbuf) + fprintf(stderr, "Process %d, not enough memory for readbuf\n", mynod); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); +- MPI_File_read_all(fh, readbuf, bufcount, MPI_INT, &status); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); ++ MPI_CHECK(MPI_File_read_all(fh, readbuf, bufcount, MPI_INT, &status)); ++ MPI_CHECK(MPI_File_close(&fh)); + + /* check the data read */ + flag = 0; +--- a/src/mpi/romio/test/large_file.c.in ++++ b/src/mpi/romio/test/large_file.c.in +@@ -17,6 +17,18 @@ + #define SIZE 1048576*4 /* no. of long longs in each write/read */ + #define NTIMES 128 /* no. of writes/reads */ + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + int main(int argc, char **argv) + { + MPI_File fh; +@@ -58,7 +70,8 @@ int main(int argc, char **argv) + MPI_Abort(MPI_COMM_WORLD, 1); + } + +- MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_SELF, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + + for (i = 0; i < NTIMES; i++) { + for (j = 0; j < SIZE; j++) +@@ -73,10 +86,10 @@ int main(int argc, char **argv) + } + } + +- MPI_File_get_size(fh, &size); ++ MPI_CHECK(MPI_File_get_size(fh, &size)); + fprintf(stderr, "file size = %@LL@ bytes\n", size); + +- MPI_File_seek(fh, 0, MPI_SEEK_SET); ++ MPI_CHECK(MPI_File_seek(fh, 0, MPI_SEEK_SET)); + + for (j = 0; j < SIZE; j++) + buf[j] = -1; +@@ -100,7 +113,7 @@ int main(int argc, char **argv) + + if (!flag) + fprintf(stderr, "Data read back is correct\n"); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + free(buf); + free(filename); +--- a/src/mpi/romio/test/noncontig.c ++++ b/src/mpi/romio/test/noncontig.c +@@ -13,6 +13,19 @@ + #define SIZE 5000 + + #define VERBOSE 0 ++ ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + int main(int argc, char **argv) + { + int *buf, i, mynod, nprocs, len, b[3]; +@@ -93,17 +106,17 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh)); + + /* set the file view for each process -- now writes go into the non- + * overlapping but interleaved region defined by the struct type up above + */ +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info)); + + /* fill our buffer with a pattern and write, using our type again */ + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_write(fh, buf, 1, newtype, &status); ++ MPI_CHECK(MPI_File_write(fh, buf, 1, newtype, &status)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -113,7 +126,7 @@ int main(int argc, char **argv) + */ + for (i = 0; i < SIZE; i++) + buf[i] = -1; +- MPI_File_read_at(fh, 0, buf, 1, newtype, &status); ++ MPI_CHECK(MPI_File_read_at(fh, 0, buf, 1, newtype, &status)); + + /* check that all the values read are correct and also that we didn't + * overwrite any of the -1 values that we shouldn't have. +@@ -141,7 +154,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -154,7 +167,7 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh)); + + /* in this case we write to either the first half or the second half + * of the file space, so the regions are not interleaved. this is done +@@ -162,7 +175,7 @@ int main(int argc, char **argv) + */ + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_write_at(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &status); ++ MPI_CHECK(MPI_File_write_at(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &status)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -171,7 +184,7 @@ int main(int argc, char **argv) + */ + for (i = 0; i < SIZE; i++) + buf[i] = -1; +- MPI_File_read_at(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &status); ++ MPI_CHECK(MPI_File_read_at(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &status)); + + /* verify that the buffer looks like it should */ + for (i = 0; i < SIZE; i++) { +@@ -197,7 +210,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -210,22 +223,22 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh)); + + /* set the file view so that we have interleaved access again */ +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info)); + + /* this time write a contiguous buffer */ + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_write(fh, buf, SIZE, MPI_INT, &status); ++ MPI_CHECK(MPI_File_write(fh, buf, SIZE, MPI_INT, &status)); + + MPI_Barrier(MPI_COMM_WORLD); + + /* fill buffer with -1's; this time they will all be overwritten */ + for (i = 0; i < SIZE; i++) + buf[i] = -1; +- MPI_File_read_at(fh, 0, buf, SIZE, MPI_INT, &status); ++ MPI_CHECK(MPI_File_read_at(fh, 0, buf, SIZE, MPI_INT, &status)); + + for (i = 0; i < SIZE; i++) { + if (!mynod) { +@@ -242,7 +255,12 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); ++ ++ /* delete the file */ ++ if (!mynod) ++ MPI_File_delete(filename, MPI_INFO_NULL); ++ MPI_Barrier(MPI_COMM_WORLD); + + MPI_Allreduce(&errs, &toterrs, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); + if (mynod == 0) { +--- a/src/mpi/romio/test/noncontig_coll.c ++++ b/src/mpi/romio/test/noncontig_coll.c +@@ -10,6 +10,18 @@ + + /* tests noncontiguous reads/writes using collective I/O */ + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + #define SIZE 5000 + + #define VERBOSE 0 +@@ -81,20 +93,21 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); + + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_write_all(fh, buf, 1, newtype, &status); ++ MPI_CHECK(MPI_File_write_all(fh, buf, 1, newtype, &status)); + + MPI_Barrier(MPI_COMM_WORLD); + + for (i = 0; i < SIZE; i++) + buf[i] = -1; + +- MPI_File_read_at_all(fh, 0, buf, 1, newtype, &status); ++ MPI_CHECK(MPI_File_read_at_all(fh, 0, buf, 1, newtype, &status)); + + for (i = 0; i < SIZE; i++) { + if (!mynod) { +@@ -119,7 +132,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -132,18 +145,20 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_write_at_all(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &status); ++ MPI_CHECK(MPI_File_write_at_all(fh, mynod * (SIZE / 2) * sizeof(int), ++ buf, 1, newtype, &status)); + + MPI_Barrier(MPI_COMM_WORLD); + + for (i = 0; i < SIZE; i++) + buf[i] = -1; + +- MPI_File_read_at_all(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &status); ++ MPI_CHECK(MPI_File_read_at_all(fh, mynod * (SIZE / 2) * sizeof(int), buf, 1, newtype, &status)); + + for (i = 0; i < SIZE; i++) { + if (!mynod) { +@@ -168,7 +183,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -181,20 +196,21 @@ int main(int argc, char **argv) + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); + +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); + + for (i = 0; i < SIZE; i++) + buf[i] = i + mynod * SIZE; +- MPI_File_write_all(fh, buf, SIZE, MPI_INT, &status); ++ MPI_CHECK(MPI_File_write_all(fh, buf, SIZE, MPI_INT, &status)); + + MPI_Barrier(MPI_COMM_WORLD); + + for (i = 0; i < SIZE; i++) + buf[i] = -1; + +- MPI_File_read_at_all(fh, 0, buf, SIZE, MPI_INT, &status); ++ MPI_CHECK(MPI_File_read_at_all(fh, 0, buf, SIZE, MPI_INT, &status)); + + for (i = 0; i < SIZE; i++) { + if (!mynod) { +@@ -211,7 +227,12 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); ++ ++ /* delete the file */ ++ if (!mynod) ++ MPI_File_delete(filename, MPI_INFO_NULL); ++ MPI_Barrier(MPI_COMM_WORLD); + + MPI_Allreduce(&errs, &toterrs, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); + if (mynod == 0) { +--- a/src/mpi/romio/test/noncontig_coll2.c ++++ b/src/mpi/romio/test/noncontig_coll2.c +@@ -19,6 +19,9 @@ + * the processors ] + */ + ++ ++#define MPI_CHECK(fn) { int _errcode; _errcode = (fn); if (_errcode != MPI_SUCCESS) handle_error(_errcode, #fn); } ++ + /* we are going to muck with this later to make it evenly divisible by however many compute nodes we have */ + #define STARTING_SIZE 5000 + +@@ -407,7 +410,7 @@ int test_file(char *filename, int mynod, int nprocs, char *cb_hosts, const char + handle_error(errcode, "MPI_File_open"); + } + +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info)); + + for (i = 0; i < SIZE; i++) + buf[i] = SEEDER(mynod, i, SIZE); +@@ -457,7 +460,7 @@ int test_file(char *filename, int mynod, int nprocs, char *cb_hosts, const char + errors++; + } + } +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -469,7 +472,7 @@ int test_file(char *filename, int mynod, int nprocs, char *cb_hosts, const char + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh)); + + for (i = 0; i < SIZE; i++) + buf[i] = SEEDER(mynod, i, SIZE); +@@ -510,7 +513,7 @@ int test_file(char *filename, int mynod, int nprocs, char *cb_hosts, const char + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +@@ -522,9 +525,9 @@ int test_file(char *filename, int mynod, int nprocs, char *cb_hosts, const char + } + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh)); + +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", info)); + + for (i = 0; i < SIZE; i++) + buf[i] = SEEDER(mynod, i, SIZE); +@@ -551,7 +554,12 @@ int test_file(char *filename, int mynod, int nprocs, char *cb_hosts, const char + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); ++ ++ /* delete the file */ ++ if (!mynod) ++ MPI_File_delete(filename, info); ++ MPI_Barrier(MPI_COMM_WORLD); + + MPI_Type_free(&newtype); + free(buf); +--- a/src/mpi/romio/test/perf.c ++++ b/src/mpi/romio/test/perf.c +@@ -13,6 +13,19 @@ + + #define SIZE (1048576*4) /* read/write size per node in bytes */ + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ ++ + int main(int argc, char **argv) + { + int *buf, i, j, mynod, nprocs, ntimes = 5, len, err, flag; +@@ -55,29 +68,29 @@ int main(int argc, char **argv) + buf = (int *) malloc(SIZE); + + for (j = 0; j < ntimes; j++) { +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | +- MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_seek(fh, mynod * SIZE, MPI_SEEK_SET); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_seek(fh, mynod * SIZE, MPI_SEEK_SET)); + + MPI_Barrier(MPI_COMM_WORLD); + stim = MPI_Wtime(); +- MPI_File_write(fh, buf, SIZE, MPI_BYTE, &status); ++ MPI_CHECK(MPI_File_write(fh, buf, SIZE, MPI_BYTE, &status)); + write_tim = MPI_Wtime() - stim; + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | +- MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_seek(fh, mynod * SIZE, MPI_SEEK_SET); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | ++ MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_seek(fh, mynod * SIZE, MPI_SEEK_SET)); + + MPI_Barrier(MPI_COMM_WORLD); + stim = MPI_Wtime(); +- MPI_File_read(fh, buf, SIZE, MPI_BYTE, &status); ++ MPI_CHECK(MPI_File_read(fh, buf, SIZE, MPI_BYTE, &status)); + read_tim = MPI_Wtime() - stim; + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Allreduce(&write_tim, &new_write_tim, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); + MPI_Allreduce(&read_tim, &new_read_tim, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); +@@ -98,13 +111,13 @@ int main(int argc, char **argv) + + flag = 0; + for (j = 0; j < ntimes; j++) { +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | +- MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_seek(fh, mynod * SIZE, MPI_SEEK_SET); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | ++ MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_seek(fh, mynod * SIZE, MPI_SEEK_SET)); + + MPI_Barrier(MPI_COMM_WORLD); + stim = MPI_Wtime(); +- MPI_File_write(fh, buf, SIZE, MPI_BYTE, &status); ++ MPI_CHECK(MPI_File_write(fh, buf, SIZE, MPI_BYTE, &status)); + err = MPI_File_sync(fh); + write_tim = MPI_Wtime() - stim; + if (err == MPI_ERR_UNKNOWN) { +@@ -112,20 +125,20 @@ int main(int argc, char **argv) + break; + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Barrier(MPI_COMM_WORLD); + +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | +- MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_seek(fh, mynod * SIZE, MPI_SEEK_SET); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | ++ MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_seek(fh, mynod * SIZE, MPI_SEEK_SET)); + + MPI_Barrier(MPI_COMM_WORLD); + stim = MPI_Wtime(); +- MPI_File_read(fh, buf, SIZE, MPI_BYTE, &status); ++ MPI_CHECK(MPI_File_read(fh, buf, SIZE, MPI_BYTE, &status)); + read_tim = MPI_Wtime() - stim; + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Allreduce(&write_tim, &new_write_tim, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); + MPI_Allreduce(&read_tim, &new_read_tim, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); +--- a/src/mpi/romio/test/psimple.c ++++ b/src/mpi/romio/test/psimple.c +@@ -17,6 +17,18 @@ + The file name is taken as a command-line argument, and the process rank + is appended to it. */ + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + int main(int argc, char **argv) + { + int *buf, i, rank, nints, len; +@@ -63,17 +75,19 @@ int main(int argc, char **argv) + strcpy(tmp, filename); + sprintf(filename, "%s.%d", tmp, rank); + +- PMPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- PMPI_File_write(fh, buf, nints, MPI_INT, &status); +- PMPI_File_close(&fh); ++ MPI_CHECK(PMPI_File_open(MPI_COMM_SELF, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(PMPI_File_write(fh, buf, nints, MPI_INT, &status)); ++ MPI_CHECK(PMPI_File_close(&fh)); + + /* reopen the file and read the data back */ + + for (i = 0; i < nints; i++) + buf[i] = 0; +- PMPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- PMPI_File_read(fh, buf, nints, MPI_INT, &status); +- PMPI_File_close(&fh); ++ MPI_CHECK(PMPI_File_open(MPI_COMM_SELF, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(PMPI_File_read(fh, buf, nints, MPI_INT, &status)); ++ MPI_CHECK(PMPI_File_close(&fh)); + + /* check if the data read is correct */ + for (i = 0; i < nints; i++) { +--- a/src/mpi/romio/test/runtests.in ++++ b/src/mpi/romio/test/runtests.in +@@ -14,6 +14,7 @@ MAKE="@MAKE@" + srcdir=@srcdir@ + check_canrun=0 + subset_only=0 ++daos_pool=0 + FILENAME=test + # Using shifts should remove args from the list. + for arg in "$@" ; do +@@ -46,6 +47,10 @@ for arg in "$@" ; do + shift + subset_only=1 + ;; ++ -daos) ++ shift ++ daos_pool=1 ++ ;; + -fname=*) + FILENAME=`echo $arg|sed 's/-*fname=//'` + ;; +@@ -65,6 +70,8 @@ for arg in "$@" ; do + echo "is used to check that mpirun can run an MPI program." + echo "If -subset is used, we skip tests for atomicity and shared" + echo "file pointers which can fail on some distributed file systems" ++ echo "If -daos is used, a DAOS pool is created before tests are run" ++ echo "and destroyed after." + exit 1 + ;; + *) +@@ -159,6 +166,20 @@ if [ ! -x simple -a $makeeach = 0 ] ; then + $MAKE default + fi + # ++ ++if [ $daos_pool = 1 ] ; then ++echo '**** Creating DAOS Pool ****' ++pool=`mpirun -np 1 dmg create --size=1GB` ++value=$pool ++echo $value ++OLDIFS=$IFS ++IFS=" " ++read -a array <<< "$(printf "%s" "$value")" ++IFS=$OLDIFS ++export DAOS_POOL=${array[0]} ++export DAOS_SVCL=${array[1]} ++fi ++ + testfiles="" + if [ $runtests = 1 ] ; then + echo '**** Testing I/O functions ****' +@@ -438,6 +459,12 @@ else + exit 1 + fi + fi ++ ++if [ $daos_pool = 1 ] ; then ++echo '**** Destroying DAOS Pool ****' ++pool=`mpirun -np 1 dmg destroy --force --pool=${array[0]}` ++fi ++ + # + # echo '*** Checking for differences from expected output ***' + # rm -f iotests.diff +--- a/src/mpi/romio/test/split_coll.c ++++ b/src/mpi/romio/test/split_coll.c +@@ -18,6 +18,18 @@ + + /* Note that the file access pattern is noncontiguous. */ + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + int main(int argc, char **argv) + { + MPI_Datatype newtype; +@@ -115,20 +127,22 @@ int main(int argc, char **argv) + /* end of initialization */ + + /* write the array to the file */ +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); +- MPI_File_write_all_begin(fh, writebuf, bufcount, MPI_INT); +- MPI_File_write_all_end(fh, writebuf, &status); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); ++ MPI_CHECK(MPI_File_write_all_begin(fh, writebuf, bufcount, MPI_INT)); ++ MPI_CHECK(MPI_File_write_all_end(fh, writebuf, &status)); ++ MPI_CHECK(MPI_File_close(&fh)); + + + /* now read it back */ + readbuf = (int *) malloc(bufcount * sizeof(int)); +- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL); +- MPI_File_read_all_begin(fh, readbuf, bufcount, MPI_INT); +- MPI_File_read_all_end(fh, readbuf, &status); +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_open(MPI_COMM_WORLD, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_set_view(fh, 0, MPI_INT, newtype, "native", MPI_INFO_NULL)); ++ MPI_CHECK(MPI_File_read_all_begin(fh, readbuf, bufcount, MPI_INT)); ++ MPI_CHECK(MPI_File_read_all_end(fh, readbuf, &status)); ++ MPI_CHECK(MPI_File_close(&fh)); + + /* check the data read */ + for (i = 0; i < bufcount; i++) { +--- a/src/mpi/romio/test/status.c ++++ b/src/mpi/romio/test/status.c +@@ -12,6 +12,18 @@ + + /* Checks if the status objects is filled correctly by I/O functions */ + ++static void handle_error(int errcode, const char *str) ++{ ++ char msg[MPI_MAX_ERROR_STRING]; ++ int resultlen; ++ MPI_Error_string(errcode, msg, &resultlen); ++ fprintf(stderr, "%s: %s\n", str, msg); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++} ++ ++#define MPI_CHECK(fn) { int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn); } ++ ++ + int main(int argc, char **argv) + { + int *buf, i, rank, nints, len, count, elements; +@@ -55,8 +67,9 @@ int main(int argc, char **argv) + strcpy(tmp, filename); + sprintf(filename, "%s.%d", tmp, rank); + +- MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh); +- MPI_File_write(fh, buf, nints, MPI_INT, &status); ++ MPI_CHECK(MPI_File_open(MPI_COMM_SELF, filename, ++ MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh)); ++ MPI_CHECK(MPI_File_write(fh, buf, nints, MPI_INT, &status)); + + MPI_Get_count(&status, MPI_INT, &count); + MPI_Get_elements(&status, MPI_INT, &elements); +@@ -71,7 +84,7 @@ int main(int argc, char **argv) + } + } + +- MPI_File_close(&fh); ++ MPI_CHECK(MPI_File_close(&fh)); + + MPI_Allreduce(&errs, &toterrs, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); + if (rank == 0) { +--- a/src/mpi/spawn/close_port.c ++++ b/src/mpi/spawn/close_port.c +@@ -33,10 +33,6 @@ int MPIR_Close_port_impl(const char *port_name) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Close_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Close_port - close port + +@@ -78,11 +74,11 @@ int MPI_Close_port(const char *port_name) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_close_port", "**mpi_close_port %s", port_name); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/comm_accept.c ++++ b/src/mpi/spawn/comm_accept.c +@@ -26,10 +26,6 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm com + #undef MPI_Comm_accept + #define MPI_Comm_accept PMPI_Comm_accept + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_accept_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_accept_impl(const char *port_name, MPIR_Info * info_ptr, int root, + MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm_ptr) + { +@@ -39,10 +35,6 @@ int MPIR_Comm_accept_impl(const char *port_name, MPIR_Info * info_ptr, int root, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_accept +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_accept - Accept a request to form a new intercommunicator + +@@ -128,12 +120,12 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm com + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_accept", "**mpi_comm_accept %s %I %d %C %p", port_name, + info, root, comm, newcomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/comm_connect.c ++++ b/src/mpi/spawn/comm_connect.c +@@ -25,10 +25,6 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm co + #undef MPI_Comm_connect + #define MPI_Comm_connect PMPI_Comm_connect + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Comm_connect_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Comm_connect_impl(const char *port_name, MPIR_Info * info_ptr, int root, + MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm_ptr) + { +@@ -37,10 +33,6 @@ int MPIR_Comm_connect_impl(const char *port_name, MPIR_Info * info_ptr, int root + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_connect - Make a request to form a new intercommunicator + +@@ -128,12 +120,12 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm co + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_connect", "**mpi_comm_connect %s %I %d %C %p", + port_name, info, root, comm, newcomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/comm_disconnect.c ++++ b/src/mpi/spawn/comm_disconnect.c +@@ -27,10 +27,6 @@ int MPI_Comm_disconnect(MPI_Comm * comm) __attribute__ ((weak, alias("PMPI_Comm_ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_disconnect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_disconnect - Disconnect from a communicator + +@@ -137,11 +133,11 @@ int MPI_Comm_disconnect(MPI_Comm * comm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_disconnect", "**mpi_comm_disconnect %C", *comm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/comm_get_parent.c ++++ b/src/mpi/spawn/comm_get_parent.c +@@ -27,10 +27,6 @@ int MPI_Comm_get_parent(MPI_Comm * parent) __attribute__ ((weak, alias("PMPI_Com + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_get_parent +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_get_parent - Return the parent communicator for this process + +@@ -96,10 +92,10 @@ int MPI_Comm_get_parent(MPI_Comm * parent) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_get_parent", "**mpi_comm_get_parent %p", parent); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/spawn/comm_join.c ++++ b/src/mpi/spawn/comm_join.c +@@ -102,10 +102,6 @@ PMPI_LOCAL int MPIR_fd_recv(int fd, void *buffer, int length) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_join +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_join - Create a communicator by joining two processes connected by + a socket. +@@ -199,11 +195,11 @@ int MPI_Comm_join(int fd, MPI_Comm * intercomm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_join", "**mpi_comm_join %d %p", fd, intercomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/comm_spawn.c ++++ b/src/mpi/spawn/comm_spawn.c +@@ -29,10 +29,6 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf + /* Any internal routines can go here. Make them static if possible */ + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_spawn +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_spawn - Spawn up to maxprocs instances of a single MPI application + +@@ -139,13 +135,13 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_spawn", "**mpi_comm_spawn %s %p %d %I %d %C %p %p", + command, argv, maxprocs, info, root, comm, intercomm, + array_of_errcodes); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/comm_spawn_multiple.c ++++ b/src/mpi/spawn/comm_spawn_multiple.c +@@ -30,10 +30,6 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o + /* Any internal routines can go here. Make them static if possible */ + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Comm_spawn_multiple +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Comm_spawn_multiple - short description + +@@ -160,14 +156,14 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_comm_spawn_multiple", + "**mpi_comm_spawn_multiple %d %p %p %p %p %d %C %p %p", count, + array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, + root, comm, intercomm, array_of_errcodes); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/lookup_name.c ++++ b/src/mpi/spawn/lookup_name.c +@@ -35,10 +35,6 @@ MPID_NS_Handle MPIR_Namepub = 0; + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Lookup_name +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Lookup_name - Lookup a port given a service name + +@@ -144,12 +140,12 @@ int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_lookup_name", "**mpi_lookup_name %s %I %s", service_name, + info, port_name); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/open_port.c ++++ b/src/mpi/spawn/open_port.c +@@ -31,10 +31,6 @@ int MPIR_Open_port_impl(MPIR_Info * info_ptr, char *port_name) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Open_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Open_port - Establish an address that can be used to establish + connections between groups of MPI processes +@@ -121,11 +117,11 @@ int MPI_Open_port(MPI_Info info, char *port_name) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_open_port", "**mpi_open_port %I %p", info, port_name); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/publish_name.c ++++ b/src/mpi/spawn/publish_name.c +@@ -29,10 +29,6 @@ int MPI_Publish_name(const char *service_name, MPI_Info info, const char *port_n + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Publish_name +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Publish_name - Publish a service name for use with MPI_Comm_connect + +@@ -131,12 +127,12 @@ int MPI_Publish_name(const char *service_name, MPI_Info info, const char *port_n + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_publish_name", "**mpi_publish_name %s %I %s", service_name, + info, port_name); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/spawn/unpublish_name.c ++++ b/src/mpi/spawn/unpublish_name.c +@@ -29,10 +29,6 @@ int MPI_Unpublish_name(const char *service_name, MPI_Info info, const char *port + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Unpublish_name +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Unpublish_name - Unpublish a service name published with + MPI_Publish_name +@@ -131,12 +127,12 @@ int MPI_Unpublish_name(const char *service_name, MPI_Info info, const char *port + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_unpublish_name", "**mpi_unpublish_name %s %I %s", + service_name, info, port_name); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/timer/wtick.c ++++ b/src/mpi/timer/wtick.c +@@ -27,8 +27,6 @@ double MPI_Wtick(void) __attribute__ ((weak, alias("PMPI_Wtick"))); + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Wtick + + /*@ + MPI_Wtick - Returns the resolution of MPI_Wtime +--- a/src/mpi/timer/wtime.c ++++ b/src/mpi/timer/wtime.c +@@ -24,8 +24,6 @@ double MPI_Wtime(void) __attribute__ ((weak, alias("PMPI_Wtime"))); + #define MPI_Wtime PMPI_Wtime + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Wtime + + /*@ + MPI_Wtime - Returns an elapsed time on the calling processor +--- a/src/mpi/topo/cart_coords.c ++++ b/src/mpi/topo/cart_coords.c +@@ -28,10 +28,6 @@ int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cart_coords +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Cart_coords - Determines process coords in cartesian topology given + rank in group +@@ -142,11 +138,11 @@ int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_cart_coords", "**mpi_cart_coords %C %d %d %p", comm, rank, + maxdims, coords); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/topo/cart_create.c ++++ b/src/mpi/topo/cart_create.c +@@ -32,10 +32,6 @@ int MPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[], const int pe + /* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build + the MPI routines */ + #ifndef MPICH_MPI_FROM_PMPI +-#undef FUNCNAME +-#define FUNCNAME MPIR_Cart_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Cart_create(MPIR_Comm * comm_ptr, int ndims, const int dims[], + const int periods[], int reorder, MPI_Comm * comm_cart) + { +@@ -170,10 +166,6 @@ int MPIR_Cart_create(MPIR_Comm * comm_ptr, int ndims, const int dims[], + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Cart_create_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Cart_create_impl(MPIR_Comm * comm_ptr, int ndims, const int dims[], + const int periods[], int reorder, MPI_Comm * comm_cart) + { +@@ -202,10 +194,6 @@ int MPIR_Cart_create_impl(MPIR_Comm * comm_ptr, int ndims, const int dims[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cart_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Cart_create - Makes a new communicator to which topology information +@@ -284,7 +272,7 @@ int MPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[], + if (ndims < 0) { + /* Must have a non-negative number of dimensions */ + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_DIMS, "**dims", "**dims %d", 0); + goto fn_fail; + } +@@ -316,12 +304,12 @@ int MPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[], + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_cart_create", "**mpi_cart_create %C %d %p %p %d %p", + comm_old, ndims, dims, periods, reorder, comm_cart); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + /* --END ERROR HANDLING-- */ + goto fn_exit; + } +--- a/src/mpi/topo/cart_get.c ++++ b/src/mpi/topo/cart_get.c +@@ -28,10 +28,6 @@ int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], int periods[], int coor + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cart_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Cart_get - Retrieves Cartesian topology information associated with a +@@ -154,11 +150,11 @@ int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], int periods[], int coor + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_cart_get", "**mpi_cart_get %C %d %p %p %p", comm, maxdims, + dims, periods, coords); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi/topo/cart_map.c ++++ b/src/mpi/topo/cart_map.c +@@ -26,10 +26,6 @@ int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], const int periods[] + #undef MPI_Cart_map + #define MPI_Cart_map PMPI_Cart_map + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Cart_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Cart_map(const MPIR_Comm * comm_ptr, int ndims, const int dims[], + const int periodic[], int *newrank) + { +@@ -66,10 +62,6 @@ int MPIR_Cart_map(const MPIR_Comm * comm_ptr, int ndims, const int dims[], + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Cart_map_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Cart_map_impl(const MPIR_Comm * comm_ptr, int ndims, const int dims[], + const int periods[], int *newrank) + { +@@ -97,10 +89,6 @@ int MPIR_Cart_map_impl(const MPIR_Comm * comm_ptr, int ndims, const int dims[], + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cart_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Cart_map - Maps process to Cartesian topology information + +@@ -166,7 +154,7 @@ int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], const int periods[] + if (ndims < 0) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_DIMS, ++ __func__, __LINE__, MPI_ERR_DIMS, + "**dims", "**dims %d", ndims); + goto fn_fail; + } +@@ -191,12 +179,12 @@ int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], const int periods[] + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_cart_map", "**mpi_cart_map %C %d %p %p %p", comm, ndims, + dims, periods, newrank); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/cart_rank.c ++++ b/src/mpi/topo/cart_rank.c +@@ -26,10 +26,6 @@ int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank) + #undef MPI_Cart_rank + #define MPI_Cart_rank PMPI_Cart_rank + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Cart_rank_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIR_Cart_rank_impl(MPIR_Topology * cart_ptr, const int coords[], int *rank) + { + int i, ndims, coord, multiplier; +@@ -57,10 +53,6 @@ void MPIR_Cart_rank_impl(MPIR_Topology * cart_ptr, const int coords[], int *rank + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cart_rank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Cart_rank - Determines process rank in communicator given Cartesian + location +@@ -170,11 +162,11 @@ int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_cart_rank", "**mpi_cart_rank %C %p %p", comm, coords, rank); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/cart_shift.c ++++ b/src/mpi/topo/cart_shift.c +@@ -26,10 +26,6 @@ int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, int *rank_source, int + #undef MPI_Cart_shift + #define MPI_Cart_shift PMPI_Cart_shift + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Cart_shift_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Cart_shift_impl(MPIR_Comm * comm_ptr, int direction, int disp, int *rank_source, + int *rank_dest) + { +@@ -86,10 +82,6 @@ int MPIR_Cart_shift_impl(MPIR_Comm * comm_ptr, int direction, int disp, int *ran + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cart_shift +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Cart_shift - Returns the shifted source and destination ranks, given a + shift direction and amount +@@ -179,12 +171,12 @@ int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, int *rank_source, int + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_cart_shift", "**mpi_cart_shift %C %d %d %p %p", comm, + direction, disp, rank_source, rank_dest); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/cart_sub.c ++++ b/src/mpi/topo/cart_sub.c +@@ -28,10 +28,6 @@ int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm * newcomm) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cart_sub +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Cart_sub - Partitions a communicator into subgroups which +@@ -210,12 +206,12 @@ int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm * newcomm) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_cart_sub", "**mpi_cart_sub %C %p %p", comm, remain_dims, + newcomm); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/cartdim_get.c ++++ b/src/mpi/topo/cartdim_get.c +@@ -27,10 +27,6 @@ int MPI_Cartdim_get(MPI_Comm comm, int *ndims) __attribute__ ((weak, alias("PMPI + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Cartdim_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Cartdim_get - Retrieves Cartesian topology information associated with a +@@ -112,11 +108,11 @@ int MPI_Cartdim_get(MPI_Comm comm, int *ndims) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_cartdim_get", "**mpi_cartdim_get %C %p", comm, ndims); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/dims_create.c ++++ b/src/mpi/topo/dims_create.c +@@ -257,8 +257,6 @@ static int ndivisors_from_factor(int nf, const Factors * factors) + return ndiv; + } + +-#undef FCNAME +-#define FCNAME "factor_to_divisors" + static int factor_to_divisors(int nf, Factors * factors, int ndiv, int divs[]) + { + int i, powers[MAX_FACTORS], curbase[MAX_FACTORS], nd, idx, val, mpi_errno; +@@ -833,10 +831,6 @@ extern volatile int MPIR_DIMS_initPCVars; + + #endif /* PMPI Local */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_Dims_create +-#undef FCNAME +-#define FCNAME "MPI_Dims_create" + + /*@ + MPI_Dims_create - Creates a division of processors in a cartesian grid +@@ -906,12 +900,12 @@ int MPI_Dims_create(int nnodes, int ndims, int dims[]) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_dims_create", "**mpi_dims_create %d %d %p", nnodes, ndims, + dims); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/dist_gr_create.c ++++ b/src/mpi/topo/dist_gr_create.c +@@ -31,10 +31,6 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], const i + * correctly handle weak symbols and the profiling interface */ + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Dist_graph_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Dist_graph_create - MPI_DIST_GRAPH_CREATE returns a handle to a new + communicator to which the distributed graph topology information is +@@ -439,10 +435,8 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], + + fn_exit: + for (i = 0; i < comm_size; ++i) { +- if (rin[i]) +- MPL_free(rin[i]); +- if (rout[i]) +- MPL_free(rout[i]); ++ MPL_free(rin[i]); ++ MPL_free(rout[i]); + } + + MPIR_CHKLMEM_FREEALL(); +@@ -453,24 +447,22 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], + + /* --BEGIN ERROR HANDLING-- */ + fn_fail: +- if (dist_graph_ptr && dist_graph_ptr->in) ++ if (dist_graph_ptr) { + MPL_free(dist_graph_ptr->in); +- if (dist_graph_ptr && dist_graph_ptr->in_weights) + MPL_free(dist_graph_ptr->in_weights); +- if (dist_graph_ptr && dist_graph_ptr->out) + MPL_free(dist_graph_ptr->out); +- if (dist_graph_ptr && dist_graph_ptr->out_weights) + MPL_free(dist_graph_ptr->out_weights); ++ } + MPIR_CHKPMEM_REAP(); + #ifdef HAVE_ERROR_CHECKING + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_dist_graph_create", + "**mpi_dist_graph_create %C %d %p %p %p %p %I %d %p", comm_old, n, + sources, degrees, destinations, weights, info, reorder, + comm_dist_graph); + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/dist_gr_create_adj.c ++++ b/src/mpi/topo/dist_gr_create_adj.c +@@ -32,10 +32,6 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, const int so + * correctly handle weak symbols and the profiling interface */ + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Dist_graph_create_adjacent +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Dist_graph_create_adjacent - returns a handle to a new communicator to + which the distributed graph topology information is attached. +@@ -198,13 +194,13 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old, + MPIR_CHKPMEM_REAP(); + #ifdef HAVE_ERROR_CHECKING + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_dist_graph_create_adjacent", + "**mpi_dist_graph_create_adjacent %C %d %p %p %d %p %p %I %d %p", + comm_old, indegree, sources, sourceweights, outdegree, destinations, + destweights, info, reorder, comm_dist_graph); + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/dist_gr_neighb.c ++++ b/src/mpi/topo/dist_gr_neighb.c +@@ -29,10 +29,6 @@ int MPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, int sources[], int + /* any utility functions should go here, usually prefixed with PMPI_LOCAL to + * correctly handle weak symbols and the profiling interface */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Dist_graph_neighbors_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Dist_graph_neighbors_impl(MPIR_Comm * comm_ptr, + int maxindegree, int sources[], int sourceweights[], + int maxoutdegree, int destinations[], int destweights[]) +@@ -63,10 +59,6 @@ int MPIR_Dist_graph_neighbors_impl(MPIR_Comm * comm_ptr, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Dist_graph_neighbors +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Dist_graph_neighbors - Provides adjacency information for a distributed graph topology. + +@@ -160,12 +152,12 @@ int MPI_Dist_graph_neighbors(MPI_Comm comm, + /* --BEGIN ERROR HANDLING-- */ + #ifdef HAVE_ERROR_CHECKING + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_dist_graph_neighbors", + "**mpi_dist_graph_neighbors %C %d %p %p %d %p %p", comm, maxindegree, + sources, sourceweights, maxoutdegree, destinations, destweights); + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/dist_gr_neighb_count.c ++++ b/src/mpi/topo/dist_gr_neighb_count.c +@@ -28,10 +28,6 @@ int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, + /* any utility functions should go here, usually prefixed with PMPI_LOCAL to + * correctly handle weak symbols and the profiling interface */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Dist_graph_neighbors_count_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Dist_graph_neighbors_count_impl(MPIR_Comm * comm_ptr, int *indegree, int *outdegree, + int *weighted) + { +@@ -54,10 +50,6 @@ int MPIR_Dist_graph_neighbors_count_impl(MPIR_Comm * comm_ptr, int *indegree, in + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Dist_graph_neighbors_count +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Dist_graph_neighbors_count - Provides adjacency information for a distributed graph topology. + +@@ -137,13 +129,13 @@ int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_dist_graph_neighbors_count", + "**mpi_dist_graph_neighbors_count %C %p %p %p", comm, indegree, + outdegree, weighted); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/graph_get.c ++++ b/src/mpi/topo/graph_get.c +@@ -28,10 +28,6 @@ int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, int indx[], int edg + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Graph_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Graph_get - Retrieves graph topology information associated with a +@@ -137,12 +133,12 @@ int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, int indx[], int edg + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_graph_get", "**mpi_graph_get %C %d %d %p %p", comm, + maxindex, maxedges, indx, edges); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/graph_map.c ++++ b/src/mpi/topo/graph_map.c +@@ -41,10 +41,6 @@ int MPIR_Graph_map(const MPIR_Comm * comm_ptr, int nnodes, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Graph_map_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Graph_map_impl(const MPIR_Comm * comm_ptr, int nnodes, + const int indx[], const int edges[], int *newrank) + { +@@ -72,10 +68,6 @@ int MPIR_Graph_map_impl(const MPIR_Comm * comm_ptr, int nnodes, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Graph_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Graph_map - Maps process to graph topology information + +@@ -162,12 +154,12 @@ int MPI_Graph_map(MPI_Comm comm, int nnodes, const int indx[], const int edges[] + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_graph_map", "**mpi_graph_map %C %d %p %p %p", comm, nnodes, + indx, edges, newrank); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/graph_nbr.c ++++ b/src/mpi/topo/graph_nbr.c +@@ -28,10 +28,6 @@ int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int neighbors + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Graph_neighbors_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Graph_neighbors_impl(MPIR_Comm * comm_ptr, int rank, int maxneighbors, int neighbors[]) + { + int mpi_errno = MPI_SUCCESS; +@@ -65,10 +61,6 @@ int MPIR_Graph_neighbors_impl(MPIR_Comm * comm_ptr, int rank, int maxneighbors, + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Graph_neighbors +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + MPI_Graph_neighbors - Returns the neighbors of a node associated +@@ -152,12 +144,12 @@ int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int neighbors + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_graph_neighbors", "**mpi_graph_neighbors %C %d %d %p", comm, + rank, maxneighbors, neighbors); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/graphcreate.c ++++ b/src/mpi/topo/graphcreate.c +@@ -38,10 +38,6 @@ int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], const int + the MPI routines */ + #ifndef MPICH_MPI_FROM_PMPI + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Graph_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Graph_create(MPIR_Comm * comm_ptr, int nnodes, + const int indx[], const int edges[], int reorder, MPI_Comm * comm_graph) + { +@@ -121,21 +117,17 @@ int MPIR_Graph_create(MPIR_Comm * comm_ptr, int nnodes, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_graph_create", "**mpi_graph_create %C %d %p %p %d %p", + comm_ptr->handle, nnodes, indx, edges, reorder, comm_graph); + } + #endif +- mpi_errno = MPIR_Err_return_comm((MPIR_Comm *) comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm((MPIR_Comm *) comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Graph_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_Graph_create - Makes a new communicator to which topology information + has been attached +@@ -229,7 +221,7 @@ int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], + if (nnodes > comm_size) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**topotoolarge", "**topotoolarge %d %d", + nnodes, comm_size); +@@ -248,14 +240,14 @@ int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], + if (indx[i] < 0) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**indexneg", "**indexneg %d %d", i, indx[i]); + } + if (i + 1 < nnodes && indx[i] > indx[i + 1]) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**indexnonmonotone", + "**indexnonmonotone %d %d %d", i, indx[i], +@@ -271,7 +263,7 @@ int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], + if (edges[i] > comm_size || edges[i] < 0) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, ++ __func__, __LINE__, + MPI_ERR_ARG, + "**edgeoutrange", + "**edgeoutrange %d %d %d", i, edges[i], +@@ -319,12 +311,12 @@ int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_graph_create", "**mpi_graph_create %C %d %p %p %d %p", + comm_old, nnodes, indx, edges, reorder, comm_graph); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/graphdimsget.c ++++ b/src/mpi/topo/graphdimsget.c +@@ -28,10 +28,6 @@ int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges) + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Graphdims_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Graphdims_get - Retrieves graph topology information associated with a +@@ -121,12 +117,12 @@ int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_graphdims_get", "**mpi_graphdims_get %C %p %p", comm, + nnodes, nedges); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/graphnbrcnt.c ++++ b/src/mpi/topo/graphnbrcnt.c +@@ -26,10 +26,6 @@ int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors) + #undef MPI_Graph_neighbors_count + #define MPI_Graph_neighbors_count PMPI_Graph_neighbors_count + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Graph_neighbors_count_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Graph_neighbors_count_impl(MPIR_Comm * comm_ptr, int rank, int *nneighbors) + { + int mpi_errno = MPI_SUCCESS; +@@ -57,10 +53,6 @@ int MPIR_Graph_neighbors_count_impl(MPIR_Comm * comm_ptr, int rank, int *nneighb + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Graph_neighbors_count +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + /*@ + MPI_Graph_neighbors_count - Returns the number of neighbors of a node +@@ -141,12 +133,12 @@ int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_graph_neighbors_count", + "**mpi_graph_neighbors_count %C %d %p", comm, rank, nneighbors); + } + #endif +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi/topo/topo_test.c ++++ b/src/mpi/topo/topo_test.c +@@ -27,10 +27,6 @@ int MPI_Topo_test(MPI_Comm comm, int *status) __attribute__ ((weak, alias("PMPI_ + + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPI_Topo_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + + MPI_Topo_test - Determines the type of topology (if any) associated with a +@@ -117,10 +113,10 @@ int MPI_Topo_test(MPI_Comm comm, int *status) + fn_fail: + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_topo_test", "**mpi_topo_test %C %p", comm, status); + } +- mpi_errno = MPIR_Err_return_comm(comm_ptr, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(comm_ptr, __func__, mpi_errno); + goto fn_exit; + #endif + /* --END ERROR HANDLING-- */ +--- a/src/mpi/topo/topoutil.c ++++ b/src/mpi/topo/topoutil.c +@@ -44,10 +44,6 @@ MPIR_Topology *MPIR_Topology_get(MPIR_Comm * comm_ptr) + return NULL; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Topology_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Topology_put(MPIR_Comm * comm_ptr, MPIR_Topology * topo_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -120,10 +116,6 @@ static int *MPIR_Copy_array(int n, const int a[], int *err) + of enough integers for all fields (including the ones in the structure) + and freeing the single object later. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Topology_copy_fn +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIR_Topology_copy_fn(MPI_Comm comm ATTRIBUTE((unused)), + int keyval ATTRIBUTE((unused)), + void *extra_data ATTRIBUTE((unused)), +@@ -198,10 +190,6 @@ static int MPIR_Topology_copy_fn(MPI_Comm comm ATTRIBUTE((unused)), + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Topology_delete_fn +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIR_Topology_delete_fn(MPI_Comm comm ATTRIBUTE((unused)), + int keyval ATTRIBUTE((unused)), + void *attr_val, void *extra_data ATTRIBUTE((unused))) +@@ -226,10 +214,8 @@ static int MPIR_Topology_delete_fn(MPI_Comm comm ATTRIBUTE((unused)), + } else if (topology->kind == MPI_DIST_GRAPH) { + MPL_free(topology->topo.dist_graph.in); + MPL_free(topology->topo.dist_graph.out); +- if (topology->topo.dist_graph.in_weights) +- MPL_free(topology->topo.dist_graph.in_weights); +- if (topology->topo.dist_graph.out_weights) +- MPL_free(topology->topo.dist_graph.out_weights); ++ MPL_free(topology->topo.dist_graph.in_weights); ++ MPL_free(topology->topo.dist_graph.out_weights); + MPL_free(topology); + } + /* --BEGIN ERROR HANDLING-- */ +@@ -264,10 +250,6 @@ static int MPIR_Topology_delete_fn(MPI_Comm comm ATTRIBUTE((unused)), + * to be MPI_PROC_NULL. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Topo_canon_nhb_count +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Topo_canon_nhb_count(MPIR_Comm * comm_ptr, int *indegree, int *outdegree, int *weighted) + { + int mpi_errno = MPI_SUCCESS; +@@ -302,10 +284,6 @@ int MPIR_Topo_canon_nhb_count(MPIR_Comm * comm_ptr, int *indegree, int *outdegre + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_Topo_canon_nhb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Topo_canon_nhb(MPIR_Comm * comm_ptr, + int indegree, int sources[], int inweights[], + int outdegree, int dests[], int outweights[]) +--- a/src/mpi_t/cat_changed.c ++++ b/src/mpi_t/cat_changed.c +@@ -25,10 +25,6 @@ int MPI_T_category_changed(int *stamp) __attribute__ ((weak, alias("PMPI_T_categ + #define MPI_T_category_changed PMPI_T_category_changed + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_category_changed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_category_changed - Get the timestamp indicating the last change to the categories + +@@ -84,10 +80,10 @@ int MPI_T_category_changed(int *stamp) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_category_changed", "**mpi_t_category_changed %p", stamp); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/cat_get_categories.c ++++ b/src/mpi_t/cat_get_categories.c +@@ -27,10 +27,6 @@ int MPI_T_category_get_categories(int cat_index, int len, int indices[]) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_category_get_categories_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_category_get_categories_impl(int cat_index, int len, int indices[]) + { + int mpi_errno = MPI_SUCCESS; +@@ -50,10 +46,6 @@ int MPIR_T_category_get_categories_impl(int cat_index, int len, int indices[]) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_category_get_categories +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_category_get_categories - Get sub-categories in a category + +@@ -114,13 +106,13 @@ int MPI_T_category_get_categories(int cat_index, int len, int indices[]) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_category_get_categories", + "**mpi_t_category_get_categories %d %d %p", cat_index, len, + indices); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/cat_get_cvars.c ++++ b/src/mpi_t/cat_get_cvars.c +@@ -27,10 +27,6 @@ int MPI_T_category_get_cvars(int cat_index, int len, int indices[]) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_category_get_cvars_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_category_get_cvars_impl(int cat_index, int len, int indices[]) + { + int mpi_errno = MPI_SUCCESS; +@@ -50,10 +46,6 @@ int MPIR_T_category_get_cvars_impl(int cat_index, int len, int indices[]) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_category_get_cvars +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_category_get_cvars - Get control variables in a category + +@@ -114,12 +106,12 @@ int MPI_T_category_get_cvars(int cat_index, int len, int indices[]) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_category_get_cvars", + "**mpi_t_category_get_cvars %d %d %p", cat_index, len, indices); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/cat_get_index.c ++++ b/src/mpi_t/cat_get_index.c +@@ -26,10 +26,6 @@ int MPI_T_category_get_index(const char *name, int *cat_index) + #define MPI_T_category_get_index PMPI_T_category_get_index + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_category_get_index +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_category_get_index - Get the index of a category + +--- a/src/mpi_t/cat_get_info.c ++++ b/src/mpi_t/cat_get_info.c +@@ -27,10 +27,6 @@ int MPI_T_category_get_info(int cat_index, char *name, int *name_len, char *desc + #define MPI_T_category_get_info PMPI_T_category_get_info + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_category_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_category_get_info - Get the information about a category + +@@ -108,13 +104,13 @@ int MPI_T_category_get_info(int cat_index, char *name, int *name_len, char *desc + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_category_get_info", + "**mpi_t_category_get_info %d %p %p %p %p %p %p %p", cat_index, + name, name_len, desc, desc_len, num_cvars, num_pvars, + num_categories); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/cat_get_num.c ++++ b/src/mpi_t/cat_get_num.c +@@ -25,10 +25,6 @@ int MPI_T_category_get_num(int *num_cat) __attribute__ ((weak, alias("PMPI_T_cat + #define MPI_T_category_get_num PMPI_T_category_get_num + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_category_get_num +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_category_get_num - Get the number of categories + +@@ -79,11 +75,11 @@ int MPI_T_category_get_num(int *num_cat) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_category_get_num", "**mpi_t_category_get_num %p", + num_cat); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/cat_get_pvars.c ++++ b/src/mpi_t/cat_get_pvars.c +@@ -27,10 +27,6 @@ int MPI_T_category_get_pvars(int cat_index, int len, int indices[]) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_category_get_pvars_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_category_get_pvars_impl(int cat_index, int len, int indices[]) + { + int mpi_errno = MPI_SUCCESS; +@@ -50,10 +46,6 @@ int MPIR_T_category_get_pvars_impl(int cat_index, int len, int indices[]) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_category_get_pvars +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_category_get_pvars - Get performance variables in a category + +@@ -114,12 +106,12 @@ int MPI_T_category_get_pvars(int cat_index, int len, int indices[]) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_category_get_pvars", + "**mpi_t_category_get_pvars %d %d %p", cat_index, len, indices); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/cvar_get_index.c ++++ b/src/mpi_t/cvar_get_index.c +@@ -26,10 +26,6 @@ int MPI_T_cvar_get_index(const char *name, int *cvar_index) + #define MPI_T_cvar_get_index PMPI_T_cvar_get_index + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_cvar_get_index +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_cvar_get_index - Get the index of a control variable + +--- a/src/mpi_t/cvar_get_info.c ++++ b/src/mpi_t/cvar_get_info.c +@@ -28,10 +28,6 @@ int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosit + #define MPI_T_cvar_get_info PMPI_T_cvar_get_info + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_cvar_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_cvar_get_info - Get the information about a control variable + +@@ -119,13 +115,13 @@ int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_cvar_get_info", + "**mpi_t_cvar_get_info %d %p %p %p %p %p %p %p %p %p", cvar_index, + name, name_len, verbosity, datatype, enumtype, desc, desc_len, + binding, scope); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/cvar_get_num.c ++++ b/src/mpi_t/cvar_get_num.c +@@ -25,10 +25,6 @@ int MPI_T_cvar_get_num(int *num_cvar) __attribute__ ((weak, alias("PMPI_T_cvar_g + #define MPI_T_cvar_get_num PMPI_T_cvar_get_num + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_cvar_get_num +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_cvar_get_num - Get the number of control variables + +@@ -80,10 +76,10 @@ int MPI_T_cvar_get_num(int *num_cvar) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_cvar_get_num", "**mpi_t_cvar_get_num %p", num_cvar); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/cvar_handle_alloc.c ++++ b/src/mpi_t/cvar_handle_alloc.c +@@ -27,10 +27,6 @@ int MPI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, MPI_T_cvar_handle + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_cvar_handle_alloc_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_cvar_handle_alloc_impl(int cvar_index, void *obj_handle, MPI_T_cvar_handle * handle, + int *count) + { +@@ -77,10 +73,6 @@ int MPIR_T_cvar_handle_alloc_impl(int cvar_index, void *obj_handle, MPI_T_cvar_h + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_cvar_handle_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_cvar_handle_alloc - Allocate a handle for a control variable + +@@ -144,13 +136,13 @@ int MPI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, MPI_T_cvar_handle + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_cvar_handle_alloc", + "**mpi_t_cvar_handle_alloc %d %p %p %p", cvar_index, obj_handle, + handle, count); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/cvar_handle_free.c ++++ b/src/mpi_t/cvar_handle_free.c +@@ -26,10 +26,6 @@ int MPI_T_cvar_handle_free(MPI_T_cvar_handle * handle) + #define MPI_T_cvar_handle_free PMPI_T_cvar_handle_free + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_cvar_handle_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_cvar_handle_free - Free an existing handle for a control variable + +@@ -84,10 +80,10 @@ int MPI_T_cvar_handle_free(MPI_T_cvar_handle * handle) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_cvar_handle_free", "**mpi_t_cvar_handle_free %p", handle); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/cvar_read.c ++++ b/src/mpi_t/cvar_read.c +@@ -27,10 +27,6 @@ int MPI_T_cvar_read(MPI_T_cvar_handle handle, void *buf) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_cvar_read_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_cvar_read_impl(MPI_T_cvar_handle handle, void *buf) + { + int mpi_errno = MPI_SUCCESS; +@@ -81,10 +77,6 @@ int MPIR_T_cvar_read_impl(MPI_T_cvar_handle handle, void *buf) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_cvar_read +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_cvar_read - Read the value of a control variable + +@@ -140,11 +132,11 @@ int MPI_T_cvar_read(MPI_T_cvar_handle handle, void *buf) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_cvar_read", "**mpi_t_cvar_read %p %p", handle, buf); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/cvar_write.c ++++ b/src/mpi_t/cvar_write.c +@@ -27,10 +27,6 @@ int MPI_T_cvar_write(MPI_T_cvar_handle handle, const void *buf) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_cvar_write_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_cvar_write_impl(MPI_T_cvar_handle handle, const void *buf) + { + int mpi_errno = MPI_SUCCESS; +@@ -90,10 +86,6 @@ int MPIR_T_cvar_write_impl(MPI_T_cvar_handle handle, const void *buf) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_cvar_write +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_cvar_write - Write a control variable + +@@ -149,11 +141,11 @@ int MPI_T_cvar_write(MPI_T_cvar_handle handle, const void *buf) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_cvar_write", "**mpi_t_cvar_write %p %p", handle, buf); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/enum_get_info.c ++++ b/src/mpi_t/enum_get_info.c +@@ -26,10 +26,6 @@ int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len + #define MPI_T_enum_get_info PMPI_T_enum_get_info + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_enum_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_enum_get_info - Get the information about an enumeration + +@@ -93,11 +89,11 @@ int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_enum_get_info", "**mpi_t_enum_get_info %p %p %p %p", + enumtype, num, name, name_len); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/enum_get_item.c ++++ b/src/mpi_t/enum_get_item.c +@@ -26,10 +26,6 @@ int MPI_T_enum_get_item(MPI_T_enum enumtype, int indx, int *value, char *name, i + #define MPI_T_enum_get_item PMPI_T_enum_get_item + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_enum_get_item +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_enum_get_item - Get the information about an item in an enumeration + +@@ -40,7 +36,7 @@ Input Parameters: + . enumtype - enumeration to be queried (handle) + + Output Parameters: +-+ index - number of the value to be queried in this enumeration (integer) +++ indx - number of the value to be queried in this enumeration (integer) + . value - variable value (integer) + - name - buffer to return the string containing the name of the enumeration item (string) + +@@ -52,7 +48,7 @@ Output Parameters: + .N MPI_T_ERR_INVALID_HANDLE + .N MPI_T_ERR_INVALID_ITEM + @*/ +-int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name, int *name_len) ++int MPI_T_enum_get_item(MPI_T_enum enumtype, int indx, int *value, char *name, int *name_len) + { + int mpi_errno = MPI_SUCCESS; + enum_item_t *item; +@@ -68,7 +64,7 @@ int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name, + MPID_BEGIN_ERROR_CHECKS; + { + MPIR_ERRTEST_ENUM_HANDLE(enumtype, mpi_errno); +- MPIR_ERRTEST_ENUM_ITEM(enumtype, index, mpi_errno); ++ MPIR_ERRTEST_ENUM_ITEM(enumtype, indx, mpi_errno); + MPIR_ERRTEST_ARGNULL(value, "value", mpi_errno); + /* Do not do TEST_ARGNULL for name or name_len, since this is + * permitted per MPI_T standard. +@@ -80,7 +76,7 @@ int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name, + + /* ... body of routine ... */ + +- item = (enum_item_t *) utarray_eltptr(enumtype->items, index); ++ item = (enum_item_t *) utarray_eltptr(enumtype->items, indx); + *value = item->value; + MPIR_T_strncpy(name, item->name, name_len); + +@@ -98,11 +94,11 @@ int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name, + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_enum_get_item", "**mpi_t_enum_get_item %p %d %p %p %p", +- enumtype, index, value, name, name_len); ++ enumtype, indx, value, name, name_len); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/mpit_finalize.c ++++ b/src/mpi_t/mpit_finalize.c +@@ -169,10 +169,6 @@ void MPIR_T_env_finalize(void) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_finalize - Finalize the MPI tool information interface + +@@ -230,11 +226,11 @@ int MPI_T_finalize(void) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_finalize", NULL); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/mpit_initthread.c ++++ b/src/mpi_t/mpit_initthread.c +@@ -77,10 +77,6 @@ void MPIR_T_env_init(void) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_init_thread +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_init_thread - Initialize the MPI_T execution environment + +--- a/src/mpi_t/pvar_get_index.c ++++ b/src/mpi_t/pvar_get_index.c +@@ -26,10 +26,6 @@ int MPI_T_pvar_get_index(const char *name, int var_class, int *pvar_index) + #define MPI_T_pvar_get_index PMPI_T_pvar_get_index + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_get_index +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_get_index - Get the index of a performance variable + +--- a/src/mpi_t/pvar_get_info.c ++++ b/src/mpi_t/pvar_get_info.c +@@ -28,10 +28,6 @@ int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, int *verbosit + #define MPI_T_pvar_get_info PMPI_T_pvar_get_info + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_get_info - Get the inforamtion about a performance variable + +@@ -137,14 +133,14 @@ int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, int *verbosit + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_get_info", + "**mpi_t_pvar_get_info %d %p %p %p %p %p %p %p %p %p %p %p %p", + pvar_index, name, name_len, verbosity, var_class, datatype, + enumtype, desc, desc_len, binding, readonly, continuous, atomic); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_get_num.c ++++ b/src/mpi_t/pvar_get_num.c +@@ -25,10 +25,6 @@ int MPI_T_pvar_get_num(int *num_pvar) __attribute__ ((weak, alias("PMPI_T_pvar_g + #define MPI_T_pvar_get_num PMPI_T_pvar_get_num + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_get_num +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_get_num - Get the number of performance variables + +@@ -79,10 +75,10 @@ int MPI_T_pvar_get_num(int *num_pvar) + /* --BEGIN ERROR HANDLING-- */ + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_get_num", "**mpi_t_pvar_get_num %p", num_pvar); + } +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + #endif +--- a/src/mpi_t/pvar_handle_alloc.c ++++ b/src/mpi_t/pvar_handle_alloc.c +@@ -39,10 +39,6 @@ MPIR_T_pvar_handle_t *const MPI_T_PVAR_ALL_HANDLES = &MPIR_T_pvar_all_handles_ob + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_handle_alloc_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_handle_alloc_impl(MPI_T_pvar_session session, int pvar_index, + void *obj_handle, MPI_T_pvar_handle * handle, int *count) + { +@@ -171,10 +167,6 @@ int MPIR_T_pvar_handle_alloc_impl(MPI_T_pvar_session session, int pvar_index, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_handle_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_handle_alloc - Allocate a handle for a performance variable + +@@ -246,13 +238,13 @@ int MPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_handle_alloc", + "**mpi_t_pvar_handle_alloc %p %d %p %p %p", session, pvar_index, + obj_handle, handle, count); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_handle_free.c ++++ b/src/mpi_t/pvar_handle_free.c +@@ -28,10 +28,6 @@ int MPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle * handl + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_handle_free_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_handle_free_impl(MPI_T_pvar_session session, MPI_T_pvar_handle * handle) + { + int mpi_errno = MPI_SUCCESS; +@@ -68,10 +64,6 @@ int MPIR_T_pvar_handle_free_impl(MPI_T_pvar_session session, MPI_T_pvar_handle * + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_handle_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_handle_free - Free an existing handle for a performance variable + +@@ -134,12 +126,12 @@ int MPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle * handl + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_handle_free", "**mpi_t_pvar_handle_free %p %p", + session, handle); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_read.c ++++ b/src/mpi_t/pvar_read.c +@@ -27,10 +27,6 @@ int MPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void * + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_read_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_read_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *restrict buf) + { + int i, mpi_errno = MPI_SUCCESS; +@@ -197,10 +193,6 @@ int MPIR_T_pvar_read_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_read +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_read - Read the value of a performance variable + +@@ -275,12 +267,12 @@ int MPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void * + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_read", "**mpi_t_pvar_read %p %p %p", session, handle, + buf); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_readreset.c ++++ b/src/mpi_t/pvar_readreset.c +@@ -27,10 +27,6 @@ int MPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, v + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_readreset_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_readreset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf) + { + int mpi_errno = MPI_SUCCESS; +@@ -51,10 +47,6 @@ int MPIR_T_pvar_readreset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle han + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_readreset +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_readreset - Read the value of a performance variable and then reset it + +@@ -125,12 +117,12 @@ int MPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, v + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_readreset", "**mpi_t_pvar_readreset %p %p %p", + session, handle, buf); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_reset.c ++++ b/src/mpi_t/pvar_reset.c +@@ -28,10 +28,6 @@ int MPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_reset_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_reset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + { + int mpi_errno = MPI_SUCCESS; +@@ -72,10 +68,6 @@ int MPIR_T_pvar_reset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_reset +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_reset - Reset a performance variable + +@@ -165,11 +157,11 @@ int MPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_reset", "**mpi_t_pvar_reset %p %p", session, handle); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_session_create.c ++++ b/src/mpi_t/pvar_session_create.c +@@ -27,10 +27,6 @@ int MPI_T_pvar_session_create(MPI_T_pvar_session * session) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_session_create_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_session_create_impl(MPI_T_pvar_session * session) + { + int mpi_errno = MPI_SUCCESS; +@@ -58,10 +54,6 @@ int MPIR_T_pvar_session_create_impl(MPI_T_pvar_session * session) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_session_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_session_create - Create a new session for accessing performance variables + +@@ -113,12 +105,12 @@ int MPI_T_pvar_session_create(MPI_T_pvar_session * session) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_session_create", "**mpi_t_pvar_session_create %p", + session); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_session_free.c ++++ b/src/mpi_t/pvar_session_free.c +@@ -28,10 +28,6 @@ int MPI_T_pvar_session_free(MPI_T_pvar_session * session) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_session_free_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_session_free_impl(MPI_T_pvar_session * session) + { + int mpi_errno = MPI_SUCCESS; +@@ -55,10 +51,6 @@ int MPIR_T_pvar_session_free_impl(MPI_T_pvar_session * session) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_session_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_session_free - Free an existing performance variable session + +@@ -115,12 +107,12 @@ int MPI_T_pvar_session_free(MPI_T_pvar_session * session) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_session_free", "**mpi_t_pvar_session_free %p", + session); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_start.c ++++ b/src/mpi_t/pvar_start.c +@@ -28,10 +28,6 @@ int MPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_start_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_start_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + { + int mpi_errno = MPI_SUCCESS; +@@ -72,10 +68,6 @@ int MPIR_T_pvar_start_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_start - Start a performance variable + +@@ -158,11 +150,11 @@ int MPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_start", "**mpi_t_pvar_start %p %p", session, handle); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_stop.c ++++ b/src/mpi_t/pvar_stop.c +@@ -28,10 +28,6 @@ int MPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_stop_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_stop_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + { + int i, mpi_errno = MPI_SUCCESS; +@@ -99,10 +95,6 @@ int MPIR_T_pvar_stop_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_stop +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_stop - Stop a performance variable + +@@ -194,11 +186,11 @@ int MPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle) + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_stop", "**mpi_t_pvar_stop %p %p", session, handle); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpi_t/pvar_write.c ++++ b/src/mpi_t/pvar_write.c +@@ -27,10 +27,6 @@ int MPI_T_pvar_write(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const + + /* any non-MPI functions go here, especially non-static ones */ + +-#undef FUNCNAME +-#define FUNCNAME MPIR_T_pvar_write_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_T_pvar_write_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf) + { + /* This function should never be called */ +@@ -39,10 +35,6 @@ int MPIR_T_pvar_write_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, + + #endif /* MPICH_MPI_FROM_PMPI */ + +-#undef FUNCNAME +-#define FUNCNAME MPI_T_pvar_write +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPI_T_pvar_write - Write a performance variable + +@@ -120,12 +112,12 @@ int MPI_T_pvar_write(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const + #ifdef HAVE_ERROR_CHECKING + { + mpi_errno = +- MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**mpi_t_pvar_write", "**mpi_t_pvar_write %p %p %p", session, + handle, buf); + } + #endif +- mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); ++ mpi_errno = MPIR_Err_return_comm(NULL, __func__, mpi_errno); + goto fn_exit; + /* --END ERROR HANDLING-- */ + } +--- a/src/mpid/ch3/Makefile.mk ++++ b/src/mpid/ch3/Makefile.mk +@@ -15,7 +15,6 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/ch3/include \ + -I$(top_builddir)/src/mpid/ch3/include + + noinst_HEADERS += \ +- src/mpid/ch3/include/mpidftb.h \ + src/mpid/ch3/include/mpidimpl.h \ + src/mpid/ch3/include/mpidpkt.h \ + src/mpid/ch3/include/mpidpost.h \ +--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h ++++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h +@@ -63,7 +63,7 @@ + For optimization, we want the cell to start at a cacheline boundary + and the cell length to be a multiple of cacheline size. This will + avoid false sharing. We also want payload to start at an 8-byte +- boundary to to optimize memcpys and dataloop operations on the ++ boundary to to optimize memcpys and datatype operations on the + payload. To ensure payload is 8-byte aligned, we add padding after + the next pointer so the packet starts at the 8-byte boundary. + +--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h ++++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h +@@ -202,10 +202,6 @@ typedef union MPIDI_CH3_nem_pkt + } \ + } while (0) + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_send_COOKIE +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_nem_lmt_send_COOKIE(MPIDI_VC_t *vc, MPIR_Request *req, + void *cookie_buf, MPI_Aint cookie_len) + { +--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h ++++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h +@@ -19,18 +19,18 @@ static inline int MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *v + static inline int MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again); + static inline void MPID_nem_mpich_dequeue_fastbox (int local_rank); + static inline void MPID_nem_mpich_enqueue_fastbox (int local_rank); +-static inline int MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov, +- void *ext_header, intptr_t ext_header_sz, +- MPIDI_VC_t *vc, int *again); ++static inline int MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again); + static inline int MPID_nem_recv_seqno_matches (MPID_nem_queue_ptr_t qhead); + static inline int MPID_nem_mpich_test_recv (MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress); + static inline int MPID_nem_mpich_blocking_recv (MPID_nem_cell_ptr_t *cell, int *in_fbox, int completions); + static inline int MPID_nem_mpich_test_recv_wait (MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout); + static inline int MPID_nem_mpich_release_cell (MPID_nem_cell_ptr_t cell, MPIDI_VC_t *vc); +-static inline void MPID_nem_mpich_send_seg_header (MPIR_Segment *segment, intptr_t *segment_first, +- intptr_t segment_size, void *header, intptr_t header_sz, +- void *ext_header, intptr_t ext_header_sz, MPIDI_VC_t *vc, int *again); +-static inline void MPID_nem_mpich_send_seg (MPIR_Segment *segment, intptr_t *segment_first, intptr_t segment_size, ++static inline void MPID_nem_mpich_send_seg_header (void *buf, MPI_Aint count, MPI_Datatype datatype, ++ intptr_t *msg_offset, ++ intptr_t msgsize, void *header, intptr_t header_sz, ++ MPIDI_VC_t *vc, int *again); ++static inline void MPID_nem_mpich_send_seg (void *buf, MPI_Aint count, MPI_Datatype datatype, ++ intptr_t *msg_offset, intptr_t msgsize, + MPIDI_VC_t *vc, int *again); + + +@@ -93,10 +93,6 @@ cvars: + MPIR_Coll_safe_to_block() && \ + !MPIDI_RMA_Win_active_list_head) + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_send_header +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int + MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *vc, int *again) + { +@@ -221,10 +217,6 @@ MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *vc, int *again) + iov will describe unsent data + sets again to 1 if it can't get a free cell, 0 otherwise + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_sendv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int + MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again) + { +@@ -323,14 +315,8 @@ MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again) + + /* MPID_nem_mpich_sendv_header (struct iovec **iov, int *n_iov, int dest) + same as above but first iov element is an MPICH header */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_sendv_header +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int +-MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov, +- void *ext_hdr_ptr, intptr_t ext_hdr_sz, +- MPIDI_VC_t *vc, int *again) ++MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again) + { + int mpi_errno = MPI_SUCCESS; + MPID_nem_cell_ptr_t el; +@@ -351,8 +337,7 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov, + my_rank = MPID_nem_mem_region.rank; + + #ifdef USE_FASTBOX +- /* Note: use fastbox only when there is no streaming optimization. */ +- if (ext_hdr_sz == 0 && *n_iov == 2 && (*iov)[1].MPL_IOV_LEN + sizeof(MPIDI_CH3_Pkt_t) <= MPID_NEM_FBOX_DATALEN) ++ if (*n_iov == 2 && (*iov)[1].MPL_IOV_LEN + sizeof(MPIDI_CH3_Pkt_t) <= MPID_NEM_FBOX_DATALEN) + { + MPID_nem_fbox_mpich_t *pbox = vc_ch->fbox_out; + +@@ -406,15 +391,6 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov, + MPIR_Memcpy((void *)el->pkt.p.payload, (*iov)->MPL_IOV_BUF, sizeof(MPIDI_CH3_Pkt_t)); + buf_offset += sizeof(MPIDI_CH3_Pkt_t); + +- if (ext_hdr_sz > 0) { +- /* ensure extended header fits in this cell. */ +- MPIR_Assert(MPID_NEM_MPICH_DATA_LEN - buf_offset >= ext_hdr_sz); +- +- /* when extended packet header exists, copy it */ +- MPIR_Memcpy((void *)((char *)(el->pkt.p.payload) + buf_offset), ext_hdr_ptr, ext_hdr_sz); +- buf_offset += ext_hdr_sz; +- } +- + cell_buf = (char *)(el->pkt.p.payload) + buf_offset; + ++(*iov); + --(*n_iov); +@@ -473,25 +449,21 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov, + + /* send the header and data described by the segment in one cell. If + there is no cell available, *again is set to 1. If all of the data +- cannot be sent, *segment_first is set to the index of the first ++ cannot be sent, *msg_offset is set to the index of the first + unsent byte. + Pre condition: This must be the first packet of a message (i.e., + *segment first == 0) + The destination process is local + Post conditions: the header has been sent iff *again == 0 +- if there is data to send (segment_size > 0) then ++ if there is data to send (msgsize > 0) then + (the header has been sent iff any data has +- been sent (i.e., *segment_first > 0) ) ++ been sent (i.e., *msg_offset > 0) ) + i.e.: we will never send only the header + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_send_seg_header +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void +-MPID_nem_mpich_send_seg_header (MPIR_Segment *segment, intptr_t *segment_first, intptr_t segment_size, +- void *header, intptr_t header_sz, void *ext_header, intptr_t ext_header_sz, +- MPIDI_VC_t *vc, int *again) ++MPID_nem_mpich_send_seg_header (void *buf, MPI_Aint count, MPI_Datatype datatype, ++ intptr_t *msg_offset, intptr_t msgsize, ++ void *header, intptr_t header_sz, MPIDI_VC_t *vc, int *again) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MPICH_SEND_SEG_HEADER); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MPICH_SEND_SEG_HEADER); +@@ -499,7 +471,6 @@ MPID_nem_mpich_send_seg_header (MPIR_Segment *segment, intptr_t *segment_first, + MPID_nem_cell_ptr_t el; + intptr_t datalen; + int my_rank; +- intptr_t last; + MPIDI_CH3I_VC *vc_ch = &vc->ch; + MPI_Aint buf_offset = 0; + +@@ -512,7 +483,7 @@ MPID_nem_mpich_send_seg_header (MPIR_Segment *segment, intptr_t *segment_first, + my_rank = MPID_nem_mem_region.rank; + + #ifdef USE_FASTBOX +- if (ext_header_sz == 0 && sizeof(MPIDI_CH3_Pkt_t) + segment_size <= MPID_NEM_FBOX_DATALEN) ++ if (sizeof(MPIDI_CH3_Pkt_t) + msgsize <= MPID_NEM_FBOX_DATALEN) + { + MPID_nem_fbox_mpich_t *pbox = vc_ch->fbox_out; + +@@ -522,16 +493,16 @@ MPID_nem_mpich_send_seg_header (MPIR_Segment *segment, intptr_t *segment_first, + + /* NOTE: when FASTBOX is being used, streaming optimization is never triggered, + * because streaming unit size is larger than FASTBOX size. In such case, +- * first offset (*segment_first) is zero, and last offset (segment_size) ++ * first offset (*msg_offset) is zero, and last offset (msgsize) + * is the data size */ +- MPIR_Assert(*segment_first == 0); ++ MPIR_Assert(*msg_offset == 0); + + if (MPID_nem_fbox_is_full((MPID_nem_fbox_common_ptr_t)pbox)) + goto usequeue_l; + + { + pbox->cell.pkt.header.source = MPID_nem_mem_region.local_rank; +- pbox->cell.pkt.header.datalen = sizeof(MPIDI_CH3_Pkt_t) + segment_size; ++ pbox->cell.pkt.header.datalen = sizeof(MPIDI_CH3_Pkt_t) + msgsize; + pbox->cell.pkt.header.seqno = vc_ch->send_seqno++; + MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, pbox->cell.pkt.header.type = MPID_NEM_PKT_MPICH_HEAD); + +@@ -539,13 +510,15 @@ MPID_nem_mpich_send_seg_header (MPIR_Segment *segment, intptr_t *segment_first, + MPIR_Memcpy((void *)pbox->cell.pkt.p.payload, header, header_sz); + + /* copy data */ +- last = segment_size; +- MPIR_Segment_pack(segment, *segment_first, &last, (char *)pbox->cell.pkt.p.payload + sizeof(MPIDI_CH3_Pkt_t)); +- MPIR_Assert(last == segment_size); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(buf, count, datatype, *msg_offset, ++ (char *)pbox->cell.pkt.p.payload + sizeof(MPIDI_CH3_Pkt_t), ++ msgsize - *msg_offset, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes == msgsize - *msg_offset); + + OPA_store_release_int(&pbox->flag.value, 1); + +- *segment_first = last; ++ *msg_offset += actual_pack_bytes;; + + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "--> Sent fbox "); + MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, MPID_nem_dbg_dump_cell (&pbox->cell)); +@@ -586,22 +559,19 @@ MPID_nem_mpich_send_seg_header (MPIR_Segment *segment, intptr_t *segment_first, + + buf_offset += sizeof(MPIDI_CH3_Pkt_t); + +- if (ext_header_sz > 0) { +- /* when extended packet header exists, copy it */ +- MPIR_Memcpy((void *)((char *)(el->pkt.p.payload) + buf_offset), ext_header, ext_header_sz); +- buf_offset += ext_header_sz; +- } +- + /* copy data */ +- if (segment_size - *segment_first <= MPID_NEM_MPICH_DATA_LEN - buf_offset) +- last = segment_size; ++ MPI_Aint max_pack_bytes; ++ if (msgsize - *msg_offset <= MPID_NEM_MPICH_DATA_LEN - buf_offset) ++ max_pack_bytes = msgsize - *msg_offset; + else +- last = *segment_first + MPID_NEM_MPICH_DATA_LEN - buf_offset; ++ max_pack_bytes = MPID_NEM_MPICH_DATA_LEN - buf_offset; ++ ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(buf, count, datatype, *msg_offset, (char *)el->pkt.p.payload + buf_offset, ++ max_pack_bytes, &actual_pack_bytes); ++ datalen = buf_offset + actual_pack_bytes; ++ *msg_offset += actual_pack_bytes; + +- MPIR_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.p.payload + buf_offset); +- datalen = buf_offset + last - *segment_first; +- *segment_first = last; +- + el->pkt.header.source = my_rank; + el->pkt.header.dest = vc->lpid; + el->pkt.header.datalen = datalen; +@@ -634,12 +604,9 @@ MPID_nem_mpich_send_seg_header (MPIR_Segment *segment, intptr_t *segment_first, + + /* similar to MPID_nem_mpich_send_seg_header, except there is no + header to send. This need not be the first packet of a message. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_send_seg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void +-MPID_nem_mpich_send_seg (MPIR_Segment *segment, intptr_t *segment_first, intptr_t segment_size, MPIDI_VC_t *vc, int *again) ++MPID_nem_mpich_send_seg (void *buf, MPI_Aint count, MPI_Datatype datatype, ++ intptr_t *msg_offset, intptr_t msgsize, MPIDI_VC_t *vc, int *again) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MPICH_SEND_SEG); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MPICH_SEND_SEG); +@@ -647,7 +614,6 @@ MPID_nem_mpich_send_seg (MPIR_Segment *segment, intptr_t *segment_first, intptr_ + MPID_nem_cell_ptr_t el; + intptr_t datalen; + int my_rank; +- intptr_t last; + MPIDI_CH3I_VC *vc_ch = &vc->ch; + + MPIR_Assert(vc_ch->is_local); /* netmods will have their own implementation */ +@@ -680,14 +646,17 @@ MPID_nem_mpich_send_seg (MPIR_Segment *segment, intptr_t *segment_first, intptr_ + #endif /*PREFETCH_CELL */ + + /* copy data */ +- if (segment_size - *segment_first <= MPID_NEM_MPICH_DATA_LEN) +- last = segment_size; ++ MPI_Aint max_pack_bytes; ++ if (msgsize - *msg_offset <= MPID_NEM_MPICH_DATA_LEN) ++ max_pack_bytes = msgsize - *msg_offset; + else +- last = *segment_first + MPID_NEM_MPICH_DATA_LEN; +- +- MPIR_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.p.payload); +- datalen = last - *segment_first; +- *segment_first = last; ++ max_pack_bytes = MPID_NEM_MPICH_DATA_LEN; ++ ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(buf, count, datatype, *msg_offset, (char *)el->pkt.p.payload, ++ max_pack_bytes, &actual_pack_bytes); ++ datalen = actual_pack_bytes; ++ *msg_offset += actual_pack_bytes; + + el->pkt.header.source = my_rank; + el->pkt.header.dest = vc->lpid; +@@ -725,10 +694,6 @@ MPID_nem_mpich_send_seg (MPIR_Segment *segment, intptr_t *segment_first, intptr_ + This function is called whenever a receive for a process on this node is matched. + Fastboxes on fbox queue are polled regularly for incoming messages. + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_dequeue_fastbox +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPID_nem_mpich_dequeue_fastbox(int local_rank) + { + MPID_nem_fboxq_elem_t *el; +@@ -772,10 +737,6 @@ static inline void MPID_nem_mpich_dequeue_fastbox(int local_rank) + This function is called whenever a receive is posted for a process on this node. + Fastboxes on fbox queue are polled regularly for incoming messages. + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_dequeue_fastbox +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPID_nem_mpich_enqueue_fastbox(int local_rank) + { + MPID_nem_fboxq_elem_t *el; +@@ -816,10 +777,6 @@ static inline void MPID_nem_mpich_enqueue_fastbox(int local_rank) + expected from the sender of that cell + We only check these for processes in COMM_WORLD (i.e. the ones initially allocated) + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_recv_seqno_matches +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int + MPID_nem_recv_seqno_matches (MPID_nem_queue_ptr_t qhead) + { +@@ -841,10 +798,6 @@ MPID_nem_recv_seqno_matches (MPID_nem_queue_ptr_t qhead) + sets cell to the received cell, or NULL if there is nothing to receive. in_fbox is true iff the cell was found in a fbox + the cell must be released back to the subsystem with MPID_nem_mpich_release_cell() once the packet has been copied out + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_test_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int + MPID_nem_mpich_test_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress) + { +@@ -918,10 +871,6 @@ MPID_nem_mpich_test_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blockin + sets cell to the received cell, or NULL if there is nothing to receive. in_fbox is true iff the cell was found in a fbox + the cell must be released back to the subsystem with MPID_nem_mpich_release_cell() once the packet has been copied out + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_test_recv_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int + MPID_nem_mpich_test_recv_wait (MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout) + { +@@ -978,10 +927,6 @@ MPID_nem_mpich_test_recv_wait (MPID_nem_cell_ptr_t *cell, int *in_fbox, int time + found in a fbox the cell must be released back to the subsystem with + MPID_nem_mpich_release_cell() once the packet has been copied out + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_blocking_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int + MPID_nem_mpich_blocking_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int completions) + { +@@ -1066,10 +1011,6 @@ MPID_nem_mpich_blocking_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int comple + + releases the cell back to the subsystem to be used for subsequent receives + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_release_cell +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int + MPID_nem_mpich_release_cell (MPID_nem_cell_ptr_t cell, MPIDI_VC_t *vc) + { +--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h ++++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h +@@ -54,12 +54,7 @@ MPID_nem_mpich_win_t; + #if !defined (MPID_NEM_INLINE) || !MPID_NEM_INLINE + int MPID_nem_mpich_send_header(void* buf, int size, struct MPIDI_VC *vc, int *again); + int MPID_nem_mpich_sendv(MPL_IOV **iov, int *n_iov, struct MPIDI_VC *vc, int *again); +-int MPID_nem_mpich_sendv_header(MPL_IOV **iov, int *n_iov, void *ext_header, +- intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again); +-void MPID_nem_mpich_send_seg(MPIR_Segment segment, intptr_t *segment_first, intptr_t segment_sz, struct MPIDI_VC *vc, int *again); +-void MPID_nem_mpich_send_seg_header(MPIR_Segment segment, intptr_t *segment_first, intptr_t segment_size, +- void *header, intptr_t header_sz, void *ext_header, +- intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again); ++int MPID_nem_mpich_sendv_header(MPL_IOV **iov, int *n_iov, struct MPIDI_VC *vc, int *again); + int MPID_nem_mpich_test_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress); + int MPID_nem_mpich_test_recv_wait(MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout); + int MPID_nem_recv_seqno_matches(MPID_nem_queue_ptr_t qhead) ; +--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_queue.h ++++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_queue.h +@@ -33,10 +33,6 @@ int MPID_nem_network_poll(int in_blocking_progress); + do {/*nothing*/} while (0) + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_cell_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPID_nem_cell_init(MPID_nem_cell_ptr_t cell) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_CELL_INIT); +@@ -51,10 +47,6 @@ static inline void MPID_nem_cell_init(MPID_nem_cell_ptr_t cell) + + #if defined(MPID_NEM_USE_LOCK_FREE_QUEUES) + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_queue_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPID_nem_queue_init(MPID_nem_queue_ptr_t qhead) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_QUEUE_INIT); +@@ -239,10 +231,6 @@ MPID_nem_queue_dequeue (MPID_nem_queue_ptr_t qhead, MPID_nem_cell_ptr_t *e) + #define MPID_nem_queue_mutex_unlock MPID_Thread_mutex_unlock + + /* must be called by exactly one process per queue */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_queue_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPID_nem_queue_init(MPID_nem_queue_ptr_t qhead) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_QUEUE_INIT); +--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h ++++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h +@@ -56,7 +56,8 @@ int MPIDI_CH3I_Progress_deactivate_hook(int id); + int MPIDI_CH3I_Shm_send_progress(void); + int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc); + +-int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz ); ++int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz, ++ MPL_IOV *hdr_iov, int n_hdr_iov); + + int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPIR_Request *req); + int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie); +@@ -204,10 +205,6 @@ extern MPIDI_SHM_Wins_list_t shm_wins_list; + + #define MPIDI_SHM_Wins_next_and_continue(elem) {elem = elem->next; continue;} + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_SHM_Wins_append +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_SHM_Wins_append(MPIDI_SHM_Wins_list_t * list, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -236,10 +233,6 @@ static inline int MPIDI_CH3I_SHM_Wins_append(MPIDI_SHM_Wins_list_t * list, MPIR_ + * @param IN list Pointer to the SHM window list + * @param IN elem Pointer to the element to be unlinked + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_SHM_Wins_unlink +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPIDI_CH3I_SHM_Wins_unlink(MPIDI_SHM_Wins_list_t * list, MPIR_Win * shm_win) + { + MPIDI_SHM_Win_t *elem = NULL; +--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h ++++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h +@@ -107,6 +107,11 @@ typedef struct MPIDI_CH3I_VC + network module should complete the request once the message has been completely sent. */ + int (* iSendContig)(struct MPIDI_VC *vc, struct MPIR_Request *sreq, void *hdr, intptr_t hdr_sz, + void *data, intptr_t data_sz); ++ /* iSendIov -- sends a message consisting of multiple iovs, possibly of 0 n_iov. ++ n_iov should not exceed MPL_IOV_LIMIT - 1. network module should complete the request once the ++ message has been completely sent. */ ++ int (* iSendIov)(struct MPIDI_VC *vc, struct MPIR_Request *sreq, void *hdr, intptr_t hdr_sz, ++ MPL_IOV *iov, int n_iov); + + #ifdef ENABLE_CHECKPOINTING + /* ckpt_pause_send -- netmod should stop sending on this vc and queue messages to be sent after ckpt_continue()*/ +--- a/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk ++++ b/src/mpid/ch3/channels/nemesis/netmod/Makefile.mk +@@ -8,7 +8,4 @@ + + include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/tcp/Makefile.mk + include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/none/Makefile.mk +-include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/portals4/Makefile.mk +-include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/mxm/Makefile.mk + include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/ofi/Makefile.mk +-include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/llc/Makefile.mk +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/Makefile.mk ++++ /dev/null +@@ -1,26 +0,0 @@ +-## -*- Mode: Makefile; -*- +-## vim: set ft=automake : +-## +-## (C) 2015 by Argonne National Laboratory. +-## See COPYRIGHT in top-level directory. +-## +- +-if BUILD_NEMESIS_NETMOD_LLC +- +-# AM_CPPFLAGS += -I... +- +-mpi_core_sources += \ +- src/mpid/ch3/channels/nemesis/netmod/llc/llc_init.c \ +- src/mpid/ch3/channels/nemesis/netmod/llc/llc_fini.c \ +- src/mpid/ch3/channels/nemesis/netmod/llc/llc_vc.c \ +- src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c \ +- src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c \ +- src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c \ +- src/mpid/ch3/channels/nemesis/netmod/llc/llc_cancel.c \ +- $(EOA) +- +-noinst_HEADERS += \ +- src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h \ +- $(EOA) +- +-endif BUILD_NEMESIS_NETMOD_LLC +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/errnames.txt ++++ /dev/null +@@ -1,16 +0,0 @@ +- +-**LLC_cmd_free:LLC_cmd_free failed +-**LLC_comm_rank:LLC_comm_rank failed +-**LLC_init:LLC_init failed +-**LLC_iov_free:LLC_iov_free failed +-**LLC_poll:LLC_poll failed +-**LLC_post:LLC_post failed +-**LLC_release_buffer:LLC_release_buffer failed +-**MPIDI_PG_GetConnKVSname:MPIDI_PG_GetConnKVSname failed +-**MPID_nem_ib_kvs_get_binary:MPID_nem_ib_kvs_get_binary failed +-**MPID_nem_ib_kvs_put_binary:MPID_nem_ib_kvs_put_binary failed +-**PMI_Barrier:PMI_Barrier failed +-**PMI_KVS_Put:PMI_KVS_Put failed +-**PMS_KVS_Get:PMS_KVS_Get failed +-**llc_poll:llc_poll failed +-**outofmemory:outofmemory failed +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_cancel.c ++++ /dev/null +@@ -1,39 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* vim: set ts=8 sts=4 sw=4 noexpandtab : */ +-/* +- * +- */ +- +- +- +-#include "mpid_nem_impl.h" +-#include "llc_impl.h" +- +-//#define MPID_NEM_LLC_DEBUG_PROBE +-#ifdef MPID_NEM_LLC_DEBUG_PROBE +-#define dprintf printf +-#else +-#define dprintf(...) +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_cancel_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* returns zero in case request is canceled */ +-int MPID_nem_llc_cancel_recv(struct MPIDI_VC *vc, struct MPIR_Request *req) +-{ +- int canceled; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_CANCEL_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_CANCEL_RECV); +- +- /* returns zero in case request is canceled */ +- canceled = LLC_req_approve_recv((LLC_cmd_t *) REQ_FIELD(req, cmds)); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_CANCEL_RECV); +- return canceled; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_fini.c ++++ /dev/null +@@ -1,33 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* vim: set ts=8 sts=4 sw=4 noexpandtab : */ +-/* +- * +- */ +- +- +- +-#include "mpid_nem_impl.h" +-#include "llc_impl.h" +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_finalize(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int rc; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_FINALIZE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_FINALIZE); +- +- rc = LLC_finalize(); +- MPIR_ERR_CHKANDJUMP(rc != 0, mpi_errno, MPI_ERR_OTHER, "**fail"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h ++++ /dev/null +@@ -1,139 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* vim: set ts=8 sts=4 sw=4 noexpandtab : */ +- +-#ifndef LLC_IMPL_H_INCLUDED +-#define LLC_IMPL_H_INCLUDED +- +-#ifdef USE_PMI2_API +-#include "pmi2.h" +-#else +-#include "pmi.h" +-#endif +-#include "mpid_nem_impl.h" +-#include "llc.h" +- +-extern int MPID_nem_llc_my_llc_rank; +- +-/* The vc provides a generic buffer in which network modules can store +- * private fields This removes all dependencies from the VC struction +- * on the network module, facilitating dynamic module loading. */ +- +-/* +- * GENERIC_Q_*: +- * src/mpid/ch3/channels/nemesis/include/mpid_nem_generic_queue.h +- */ +-typedef GENERIC_Q_DECL(struct MPIR_Request) rque_t; +-/* +-typedef GENERIC_Q_DECL(struct MPIR_Request) MPIDI_nem_llc_request_queue_t; +- */ +- +-typedef struct { +- uint64_t remote_endpoint_addr; +- void *endpoint; +- rque_t send_queue; /* MPIR_Request Queue */ +- unsigned int unsolicited_count; +-} MPID_nem_llc_vc_area; +- +-/* macro for llc private in VC */ +-#define VC_LLC(vc) ((MPID_nem_llc_vc_area *)(vc)->ch.netmod_area.padding) +-#define VC_FIELD(vcp, field) (((MPID_nem_llc_vc_area *)(vc)->ch.netmod_area.padding)->field) +- +-#define UNSOLICITED_NUM_INC(req) \ +-{ \ +- MPIR_Request *sreq = req; \ +- MPIDI_VC_t *vc = sreq->ch.vc; \ +- VC_FIELD(vc, unsolicited_count)++; \ +-} +-#define UNSOLICITED_NUM_DEC(req) \ +-{ \ +- MPIR_Request *sreq = req; \ +- MPIDI_VC_t *vc = sreq->ch.vc; \ +- VC_FIELD(vc, unsolicited_count)--; \ +-} +- +-typedef struct { +- void *cmds; +- void *pack_buf; /* to pack non-contiguous data */ +- +- void *rma_buf; +-} MPID_nem_llc_req_area; +- +-#define REQ_LLC(req) \ +- ((MPID_nem_llc_req_area *)(&(req)->ch.netmod_area.padding)) +-#define REQ_FIELD(reqp, field) (((MPID_nem_llc_req_area *)((reqp)->ch.netmod_area.padding))->field) +- +-struct llc_cmd_area { +- void *cbarg; +- uint32_t raddr; +-}; +- +-/* functions */ +-int MPID_nem_llc_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p); +-int MPID_nem_llc_finalize(void); +-int MPID_nem_llc_poll(int in_blocking_progress); +-int MPID_nem_llc_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p); +-int MPID_nem_llc_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc); +-int MPID_nem_llc_vc_init(MPIDI_VC_t * vc); +-int MPID_nem_llc_vc_destroy(MPIDI_VC_t * vc); +-int MPID_nem_llc_vc_terminate(MPIDI_VC_t * vc); +- +-int MPID_nem_llc_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag, +- MPI_Status * status); +-int MPID_nem_llc_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, +- MPIR_Request ** message, MPI_Status * status); +-int MPID_nem_llc_get_ordering(int *ordering); +- +-int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, +- void *data, intptr_t data_sz); +-int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data, +- intptr_t data_sz, MPIR_Request ** sreq_ptr); +-int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, +- intptr_t hdr_sz); +- +-int MPIDI_nem_llc_Rqst_iov_update(MPIR_Request * mreq, intptr_t consume); +-int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue); +- +-int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, +- int dest, int tag, MPIR_Comm * comm, int context_offset, +- struct MPIR_Request **request); +-int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, +- int dest, int tag, MPIR_Comm * comm, int context_offset, +- struct MPIR_Request **request); +-int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPIR_Request *req); +-int MPID_nem_llc_kvs_put_binary(int from, const char *postfix, const uint8_t * buf, int length); +-int MPID_nem_llc_kvs_get_binary(int from, const char *postfix, char *buf, int length); +-void MPID_nem_llc_anysource_posted(MPIR_Request * req); +-int MPID_nem_llc_anysource_matched(MPIR_Request * req); +-int MPID_nem_llc_probe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- MPI_Status * status); +-int MPID_nem_llc_iprobe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPI_Status * status); +-int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPIR_Request ** message, MPI_Status * status); +-int MPID_nem_llc_cancel_recv(struct MPIDI_VC *vc, struct MPIR_Request *req); +- +-/* +- * temporary llc api +- */ +-typedef void (*llc_send_f) (void *cba, uint64_t * reqid); +-typedef void (*llc_recv_f) +- (void *cba, uint64_t addr, void *buf, size_t bsz); +- +-extern ssize_t llc_writev(void *endpt, uint64_t raddr, +- const struct iovec *iovs, int niov, void *cbarg, void **vpp_reqid); +-extern int llc_bind(void **vpp_endpt, uint64_t raddr, void *cbarg); +-extern int llc_unbind(void *endpt); +- +-extern int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc); +- +-extern int convert_rank_llc2mpi(MPIR_Comm * comm, int llc_rank, int *mpi_rank); +-typedef struct MPID_nem_llc_netmod_hdr { +- int initiator_pg_rank; +-#ifndef notdef_hsiz_hack +- int reserved_for_alignment; +-#endif /* notdef_hsiz_hack */ +-} MPID_nem_llc_netmod_hdr_t; +- +-#define MPID_nem_llc_segv printf("%d\n", *(int32_t*)0); +- +-#endif /* LLC_IMPL_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_init.c ++++ /dev/null +@@ -1,234 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* vim: set ts=8 sts=4 sw=4 noexpandtab : */ +-/* +- * +- */ +- +- +- +-#include "mpid_nem_impl.h" +-#include "llc_impl.h" +- +-//#define MPID_NEM_LLC_DEBUG_INIT +-#ifdef MPID_NEM_LLC_DEBUG_INIT +-#define dprintf printf +-#else +-#define dprintf(...) +-#endif +- +-/* global variables */ +- +-/* src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h */ +- +-MPID_nem_netmod_funcs_t MPIDI_nem_llc_funcs = { +- .init = MPID_nem_llc_init, +- .finalize = MPID_nem_llc_finalize, +-#ifdef ENABLE_CHECKPOINTING +- .ckpt_precheck = NULL, +- .ckpt_restart = NULL, +- .ckpt_continue = NULL, +-#endif +- .poll = MPID_nem_llc_poll, +- .get_business_card = MPID_nem_llc_get_business_card, +- .connect_to_root = MPID_nem_llc_connect_to_root, +- .vc_init = MPID_nem_llc_vc_init, +- .vc_destroy = MPID_nem_llc_vc_destroy, +- .vc_terminate = MPID_nem_llc_vc_terminate, +- .anysource_iprobe = MPID_nem_llc_anysource_iprobe, +- .anysource_improbe = MPID_nem_llc_anysource_improbe, +- .get_ordering = MPID_nem_llc_get_ordering, +-}; +- +-int MPID_nem_llc_my_llc_rank; +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_kvs_put_binary +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_kvs_put_binary(int from, const char *postfix, const uint8_t * buf, int length) +-{ +- int mpi_errno = MPI_SUCCESS; +- int pmi_errno; +- char *kvs_name; +- char key[256], val[256], str[256]; +- int j; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_KVS_PUT_BINARY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_KVS_PUT_BINARY); +- +- mpi_errno = MPIDI_PG_GetConnKVSname(&kvs_name); +- MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**MPIDI_PG_GetConnKVSname"); +- dprintf("kvs_put_binary,kvs_name=%s\n", kvs_name); +- +- MPL_snprintf(key, sizeof(key), "bc/%d/%s", from, postfix); +- val[0] = 0; +- for (j = 0; j < length; j++) { +- MPL_snprintf(str, sizeof(str), "%02x", buf[j]); +- strcat(val, str); +- } +- dprintf("kvs_put_binary,rank=%d,from=%d,PMI_KVS_Put(%s, %s, %s)\n", +- MPIDI_Process.my_pg_rank, from, kvs_name, key, val); +- pmi_errno = PMI_KVS_Put(kvs_name, key, val); +- MPIR_ERR_CHKANDJUMP(pmi_errno, mpi_errno, MPI_ERR_OTHER, "**PMI_KVS_Put"); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_KVS_PUT_BINARY); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_kvs_get_binary +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_kvs_get_binary(int from, const char *postfix, char *buf, int length) +-{ +- int mpi_errno = MPI_SUCCESS; +- int pmi_errno; +- char *kvs_name; +- char key[256], val[256], str[256]; +- int j; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_KVS_GET_BINARY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_KVS_GET_BINARY); +- +- mpi_errno = MPIDI_PG_GetConnKVSname(&kvs_name); +- dprintf("kvs_get_binary,kvs_name=%s\n", kvs_name); +- MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**MPIDI_PG_GetConnKVSname"); +- +- MPL_snprintf(key, sizeof(key), "bc/%d/%s", from, postfix); +- dprintf("kvs_put_binary,rank=%d,from=%d,PMI_KVS_Get(%s, %s, %s)\n", +- MPIDI_Process.my_pg_rank, from, kvs_name, key, val); +- pmi_errno = PMI_KVS_Get(kvs_name, key, val, 256); +- MPIR_ERR_CHKANDJUMP(pmi_errno, mpi_errno, MPI_ERR_OTHER, "**PMS_KVS_Get"); +- +- dprintf("rank=%d,obtained val=%s\n", MPIDI_Process.my_pg_rank, val); +- char *strp = val; +- for (j = 0; j < length; j++) { +- memcpy(str, strp, 2); +- str[2] = 0; +- buf[j] = strtol(str, NULL, 16); +- strp += 2; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_KVS_GET_BINARY); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p) +-{ +- int mpi_errno = MPI_SUCCESS, pmi_errno, llc_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_INIT); +- +- llc_errno = LLC_init(TYPE_MPI); +- MPIR_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_init"); +- +- llc_errno = LLC_comm_rank(LLC_COMM_MPICH, &MPID_nem_llc_my_llc_rank); +- MPIR_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_comm_rank"); +- +- /* Announce my LLC rank */ +- mpi_errno = +- MPID_nem_llc_kvs_put_binary(pg_rank, "llc_rank", +- (uint8_t *) & MPID_nem_llc_my_llc_rank, sizeof(int)); +- MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**MPID_nem_ib_kvs_put_binary"); +- dprintf("llc_init,my_pg_rank=%d,my_llc_rank=%d\n", +- MPIDI_Process.my_pg_rank, MPID_nem_llc_my_llc_rank); +- +- /* Wait until the key-value propagates among all ranks */ +- pmi_errno = PMI_Barrier(); +- MPIR_ERR_CHKANDJUMP(pmi_errno != PMI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**PMI_Barrier"); +- +- mpi_errno = +- MPIDI_CH3I_Register_anysource_notification(MPID_nem_llc_anysource_posted, +- MPID_nem_llc_anysource_matched); +- +- MPIDI_Anysource_improbe_fn = MPID_nem_llc_anysource_improbe; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_get_business_card +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_GET_BUSINESS_CARD); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_GET_BUSINESS_CARD); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_GET_BUSINESS_CARD); +- return mpi_errno; +- //fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_connect_to_root +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_CONNECT_TO_ROOT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_CONNECT_TO_ROOT); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_CONNECT_TO_ROOT); +- return mpi_errno; +- //fn_fail: +- goto fn_exit; +-} +- +-/* ============================================== */ +-/* ================ llc_probe.c ================ */ +-/* ============================================== */ +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_anysource_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag, +- MPI_Status * status) +-{ +- return MPID_nem_llc_iprobe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, status); +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_anysource_improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, +- MPIR_Request ** message, MPI_Status * status) +-{ +- return MPID_nem_llc_improbe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, message, +- status); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_get_ordering +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_get_ordering(int *ordering) +-{ +- (*ordering) = 1; +- return MPI_SUCCESS; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c ++++ /dev/null +@@ -1,380 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* vim: set ts=8 sts=4 sw=4 noexpandtab : */ +-/* +- * +- */ +- +- +- +-#include "mpid_nem_impl.h" +-#include "llc_impl.h" +- +-//#define MPID_NEM_LLC_DEBUG_POLL +-#ifdef MPID_NEM_LLC_DEBUG_POLL +-#define dprintf printf +-#else +-#define dprintf(...) +-#endif +- +-/* function prototypes */ +- +-static void MPID_nem_llc_send_handler(void *cba, uint64_t * p_reqid); +-static void MPID_nem_llc_recv_handler(void *vp_vc, uint64_t raddr, void *buf, size_t bsz); +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_poll +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_poll(int in_blocking_progress) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_POLL); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_POLL); +- +- { +- int rc; +- rc = llc_poll(in_blocking_progress, MPID_nem_llc_send_handler, MPID_nem_llc_recv_handler); +- if (rc != 0) { +- mpi_errno = MPI_ERR_OTHER; +- MPIR_ERR_POP(mpi_errno); +- } +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_POLL); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_send_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static void MPID_nem_llc_send_handler(void *cba, uint64_t * p_reqid) +-{ +- /* int mpi_errno = 0; */ +- MPIR_Request *sreq = cba; /* from llc_writev(,,,,cbarg,) */ +- MPIR_Request_kind_t kind; +- /* MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_SEND_HANDLER); */ +- +- /* MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_SEND_HANDLER); */ +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_send_handler"); +- +- MPIR_Assert(sreq != NULL); +- +- if (sreq == (void *) 0xdeadbeefUL) { +- MPIDI_VC_t *vc = (void *) p_reqid[0]; +- MPID_nem_llc_vc_area *vc_llc; +- +- MPIR_Assert(vc != NULL); +- /* printf("from credit %p (pg_rank %d)\n", vc, vc->pg_rank); */ +- +- vc_llc = VC_LLC(vc); +- MPID_nem_llc_send_queued(vc, &vc_llc->send_queue); +- +- p_reqid[0] = !MPIDI_CH3I_Sendq_empty(vc_llc->send_queue); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_send_handler"); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send queue %d", (unsigned int) p_reqid[0]); +- +- goto fn_exit; +- } +- +- kind = sreq->kind; +- switch (kind) { +- unsigned int reqtype; +- case MPIR_REQUEST_KIND__SEND: +- case MPIR_REQUEST_KIND__PREQUEST_SEND:{ +- reqtype = MPIDI_Request_get_type(sreq); +- +- /* Free temporal buffer for non-contiguous data. +- * MPIDI_Request_create_sreq (in mpid_isend.c) sets req->dev.datatype. +- * A control message has a req_type of MPIDI_REQUEST_TYPE_RECV and +- * msg_type of MPIDI_REQUEST_EAGER_MSG because +- * control message send follows +- * MPIDI_CH3_iStartMsg/v-->MPID_nem_llc_iStartContigMsg-->MPID_nem_llc_iSendContig +- * and MPID_nem_llc_iSendContig set req->dev.state to zero +- * because MPIR_Request_create +- * sets it to zero. In addition, eager-short message has req->comm of zero. */ +-#ifndef notdef_leak_0001_hack +- /* See also MPIDI_CH3_Request_create and _destory() */ +- /* in src/mpid/ch3/src/ch3u_request.c */ +-#endif /* notdef_leak_0001_hack */ +- if (reqtype != MPIDI_REQUEST_TYPE_RECV && sreq->comm) { +- /* Exclude control messages which have MPIDI_REQUEST_TYPE_RECV. +- * Note that RMA messages should be included. +- * Exclude eager-short by requiring req->comm != 0. */ +- int is_contig; +- MPIR_Datatype_is_contig(sreq->dev.datatype, &is_contig); +- if (!is_contig && REQ_FIELD(sreq, pack_buf)) { +- dprintf("llc_send_handler,non-contiguous,free pack_buf\n"); +- MPL_free(REQ_FIELD(sreq, pack_buf)); +- } +- } +- +- if ((REQ_FIELD(sreq, rma_buf) != NULL && sreq->dev.datatype_ptr && +- sreq->dev.segment_size > 0)) { +- MPL_free(REQ_FIELD(sreq, rma_buf)); // allocated in MPID_nem_llc_SendNoncontig +- REQ_FIELD(sreq, rma_buf) = NULL; +- } +- +- /* sreq: src/mpid/ch3/include/mpidpre.h */ +- { +- MPIDI_VC_t *vc; +- int (*reqFn) (MPIDI_VC_t * vc, MPIR_Request * sreq, int *complete); +- int complete; +- int r_mpi_errno; +- +- p_reqid[0] = 0 /* REQ_LLC(sreq)->woff */ ; +- +- vc = sreq->ch.vc; /* before callback */ +- reqFn = sreq->dev.OnDataAvail; +- if (reqFn == 0) { +- MPIR_Assert(reqtype != MPIDI_REQUEST_TYPE_GET_RESP); +- +- r_mpi_errno = MPID_Request_complete(sreq); +- if (r_mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(r_mpi_errno); +- } +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- } +- else { +- complete = 0; +- r_mpi_errno = reqFn(vc, sreq, &complete); +- if (r_mpi_errno) +- MPIR_ERR_POP(r_mpi_errno); +- if (complete == 0) { +- MPIR_Assert(complete == TRUE); +- } +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete2"); +- } +- +- /* push queued messages */ +- { +- MPID_nem_llc_vc_area *vc_llc = VC_LLC(vc); +- +- MPID_nem_llc_send_queued(vc, &vc_llc->send_queue); +- } +- } +- break; +- } +- default: +- printf("send_handler,unknown kind=%08x\n", sreq->kind); +- MPID_nem_llc_segv; +- break; +- } +- +- fn_exit: +- /* MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_SEND_HANDLER); */ +- return /* mpi_errno */ ; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_recv_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static void MPID_nem_llc_recv_handler(void *vp_vc, uint64_t raddr, void *buf, size_t bsz) +-{ +- int mpi_errno = 0; +- MPIDI_VC_t *vc = vp_vc; +- /* MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_RECV_HANDLER); */ +- +- /* MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_RECV_HANDLER); */ +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_recv_handler"); +- +- { +- int pg_rank = (int) raddr; +- MPIDI_PG_t *pg = MPIDI_Process.my_pg; +- MPIDI_VC_t *vc_from_pg = 0; +- +- if ((pg != 0) +- && ((pg_rank >= 0) && (pg_rank < MPIDI_PG_Get_size(pg))) +-) { +- /* +- * MPIDI_Comm_get_vc_set_active(comm, rank, &vc); +- */ +- MPIDI_PG_Get_vc_set_active(pg, pg_rank, &vc_from_pg); +- } +- else { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "bad vc %p or", pg); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "bad pg_rank %d", pg_rank); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "bad pg_rank < %d", MPIDI_PG_Get_size(pg)); +- vc_from_pg = vc; /* XXX */ +- } +- if (vc != vc_from_pg) { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "bad vc for pg_rank %d", pg_rank); +- } +- if (vc == 0) { +- vc = vc_from_pg; +- } +- } +- if (vc != 0) { +- mpi_errno = MPID_nem_handle_pkt(vc, buf, bsz); +- if (mpi_errno != 0) { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "MPID_nem_handle_pkt() = %d", mpi_errno); +- } +- } +- +- fn_exit: +- /* MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_RECV_HANDLER); */ +- return; +- //fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_recv_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPIR_Request *req) +-{ +- int mpi_errno = MPI_SUCCESS, llc_errno; +- int dt_contig; +- intptr_t data_sz; +- MPIR_Datatype*dt_ptr; +- MPI_Aint dt_true_lb; +- int i; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_RECV_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_RECV_POSTED); +- +- /* req->dev.datatype is set in MPID_irecv --> MPIDI_CH3U_Recvq_FDU_or_AEP */ +- MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype, dt_contig, data_sz, dt_ptr, +- dt_true_lb); +- +- /* Don't save VC because it's not used in llc_poll */ +- +- /* Save data size for llc_poll */ +- req->dev.recv_data_sz = data_sz; +- +-#if 0 /* FIXME : vc is NULL when rank is MPI_ANY_SOURCE */ +- dprintf +- ("llc_recv_posted,%d<-%d,vc=%p,req=%p,user_buf=%p,data_sz=%ld,datatype=%08x,dt_contig=%d\n", +- MPIDI_Process.my_pg_rank, vc->pg_rank, vc, req, req->dev.user_buf, req->dev.recv_data_sz, +- req->dev.datatype, dt_contig); +-#endif +- +- void *write_to_buf; +- if (dt_contig) { +- write_to_buf = (void *) ((char *) req->dev.user_buf + dt_true_lb); +- } +- else { +- REQ_FIELD(req, pack_buf) = MPL_malloc(data_sz, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP(!REQ_FIELD(req, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory"); +- write_to_buf = REQ_FIELD(req, pack_buf); +- } +- +- int LLC_my_rank; +- LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank); +- dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank); +- +-#if 0 /* FIXME : vc is NULL when rank is MPI_ANY_SOURCE */ +- dprintf("llc_recv_posted,remote_endpoint_addr=%ld\n", VC_FIELD(vc, remote_endpoint_addr)); +-#endif +- +- LLC_cmd_t *cmd = LLC_cmd_alloc2(1, 1, 1); +- +- cmd[0].opcode = LLC_OPCODE_RECV; +- cmd[0].comm = LLC_COMM_MPICH; +- cmd[0].req_id = (uint64_t) cmd; +- +- if (req->dev.match.parts.rank == MPI_ANY_SOURCE) { +- cmd[0].rank = LLC_ANY_SOURCE; +- cmd[0].mask.rank = 0; +- } +- else { +- cmd[0].rank = VC_FIELD(vc, remote_endpoint_addr); +- } +- +- /* req->comm is set in MPID_irecv --> MPIDI_CH3U_Recvq_FDU_or_AEP */ +- if (req->dev.match.parts.tag == MPI_ANY_TAG) { +- *(int32_t *) ((uint8_t *) & cmd[0].tag) = LLC_ANY_TAG; +- *(int32_t *) ((uint8_t *) & cmd[0].mask.tag) = 0; +- } +- else { +- *(int32_t *) ((uint8_t *) & cmd[0].tag) = req->dev.match.parts.tag; +- } +- +- *(MPIR_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) = +- req->dev.match.parts.context_id; +- MPIR_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIR_Context_id_t)); +- memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t), +- 0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t)); +- +- +- dprintf("llc_recv_posted,tag="); +- for (i = 0; i < sizeof(LLC_tag_t); i++) { +- dprintf("%02x", (int) *((uint8_t *) & cmd[0].tag + i)); +- } +- dprintf("\n"); +- +- +- cmd[0].iov_local[0].addr = (uint64_t) write_to_buf; +- cmd[0].iov_local[0].length = data_sz; +- cmd[0].niov_local = 1; +- +- cmd[0].iov_remote[0].addr = 0; +- cmd[0].iov_remote[0].length = data_sz;; +- cmd[0].niov_remote = 1; +- +- ((struct llc_cmd_area *) cmd[0].usr_area)->cbarg = req; +- if (req->dev.match.parts.rank == MPI_ANY_SOURCE) { +- ((struct llc_cmd_area *) cmd[0].usr_area)->raddr = MPI_ANY_SOURCE; /* FIXME : should 0 ? */ +- } +- else { +- ((struct llc_cmd_area *) cmd[0].usr_area)->raddr = VC_FIELD(vc, remote_endpoint_addr); +- } +- +- REQ_FIELD(req, cmds) = cmd; +- +- llc_errno = LLC_post(cmd, 1); +- MPIR_ERR_CHKANDJUMP(llc_errno != LLC_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**LLC_post"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_RECV_POSTED); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_anysource_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPID_nem_llc_anysource_posted(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_AYSOURCE_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_AYSOURCE_POSTED); +- +- mpi_errno = MPID_nem_llc_recv_posted(NULL, req); +- MPIR_Assert(mpi_errno == MPI_SUCCESS); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_AYSOURCE_POSTED); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_anysource_matched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_anysource_matched(MPIR_Request * req) +-{ +- int matched = FALSE; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_ANYSOURCE_MATCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_ANYSOURCE_MATCHED); +- +- /* FIXME : How to call a cancel_recv function */ +- /* If LLC_postedq is still having this request, delete it. +- * Ohterwise, return TURE */ +- matched = LLC_req_approve_recv((LLC_cmd_t *) REQ_FIELD(req, cmds)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_ANYSOURCE_MATCHED); +- +- return matched; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c ++++ /dev/null +@@ -1,237 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* vim: set ts=8 sts=4 sw=4 noexpandtab : */ +-/* +- * +- */ +- +- +- +-#include "mpid_nem_impl.h" +-#include "llc_impl.h" +- +-//#define MPID_NEM_LLC_DEBUG_PROBE +-#ifdef MPID_NEM_LLC_DEBUG_PROBE +-#define dprintf printf +-#else +-#define dprintf(...) +-#endif +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_probe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_probe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- MPI_Status * status) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_PROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_PROBE); +- dprintf("llc_probe,source=%d,tag=%d\n", source, tag); +- +- /* NOTE : This function is not used. Because 'vc->comm_ops->probe()' is not used */ +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_PROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_iprobe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPI_Status * status) +-{ +- int mpi_errno = MPI_SUCCESS, llc_errno; +- int rank; +- LLC_tag_t _tag; +- LLC_probe_t probe; +- LLC_match_mask_t mask; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_IPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_IPROBE); +- dprintf("llc_iprobe,source=%d,tag=%d\n", source, tag); +- +- mask.rank = ~0; +- mask.tag = ~0; +- +- if (tag == MPI_ANY_TAG) { +- *(int32_t *) ((uint8_t *) & _tag) = LLC_ANY_TAG; +- *(int32_t *) ((uint8_t *) & mask.tag) = 0; +- } +- else { +- *(int32_t *) ((uint8_t *) & _tag) = tag; +- } +- +- *(MPIR_Context_id_t *) ((uint8_t *) & _tag + sizeof(int32_t)) = +- comm->recvcontext_id + context_offset; +- memset((uint8_t *) & _tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t), +- 0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t)); +- +- if (source == MPI_ANY_SOURCE) { +- rank = LLC_ANY_SOURCE; +- mask.rank = 0; +- } +- else { +- MPIR_Assert(vc); +- rank = VC_FIELD(vc, remote_endpoint_addr); +- } +- +- llc_errno = LLC_probe(LLC_COMM_MPICH, rank, _tag, &mask, &probe); +- if (llc_errno == LLC_SUCCESS) { +- *flag = 1; +- status->MPI_ERROR = MPI_SUCCESS; +- if (source != MPI_ANY_SOURCE) { +- status->MPI_SOURCE = source; +- } +- else { +- int found = 0; +- found = convert_rank_llc2mpi(comm, probe.rank, &status->MPI_SOURCE); +- MPIR_Assert(found); +- } +- status->MPI_TAG = probe.tag & 0xffffffff; +- MPIR_STATUS_SET_COUNT(*status, probe.len); +- } +- else { +- *flag = 0; +- +- MPID_Progress_poke(); /* do LLC_poll */ +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_IPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPIR_Request ** message, MPI_Status * status) +-{ +- int mpi_errno = MPI_SUCCESS; +- int rank; +- LLC_tag_t _tag; +- LLC_probe_t probe; +- LLC_match_mask_t mask; +- LLC_cmd_t *msg = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_IMPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_IMPROBE); +- dprintf("llc_improbe,source=%d,tag=%d\n", source, tag); +- +- mask.rank = ~0; +- mask.tag = ~0; +- +- if (tag == MPI_ANY_TAG) { +- *(int32_t *) ((uint8_t *) & _tag) = LLC_ANY_TAG; +- *(int32_t *) ((uint8_t *) & mask.tag) = 0; +- } +- else { +- *(int32_t *) ((uint8_t *) & _tag) = tag; +- } +- +- *(MPIR_Context_id_t *) ((uint8_t *) & _tag + sizeof(int32_t)) = +- comm->recvcontext_id + context_offset; +- memset((uint8_t *) & _tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t), +- 0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t)); +- +- if (source == MPI_ANY_SOURCE) { +- rank = LLC_ANY_SOURCE; +- mask.rank = 0; +- } +- else { +- MPIR_Assert(vc); +- rank = VC_FIELD(vc, remote_endpoint_addr); +- } +- +- msg = LLC_mprobe(LLC_COMM_MPICH, rank, _tag, &mask, &probe); +- if (msg) { +- MPIR_Request *req; +- +- *flag = 1; +- +- req = MPIR_Request_create(MPIR_REQUEST_KIND__MPROBE); +- MPIR_Object_set_ref(req, 2); +- req->comm = comm; +- MPIR_Comm_add_ref(comm); +- req->ch.vc = vc; +- +- MPIDI_Request_set_msg_type(req, MPIDI_REQUEST_EAGER_MSG); +- req->dev.recv_pending_count = 1; +- req->status.MPI_ERROR = MPI_SUCCESS; +- if (source != MPI_ANY_SOURCE) { +- req->status.MPI_SOURCE = source; +- } +- else { +- int found = 0; +- found = convert_rank_llc2mpi(comm, probe.rank, &req->status.MPI_SOURCE); +- MPIR_Assert(found); +- } +- req->status.MPI_TAG = probe.tag & 0xffffffff; +- req->dev.recv_data_sz = probe.len; +- MPIR_STATUS_SET_COUNT(req->status, req->dev.recv_data_sz); +- req->dev.tmpbuf = MPL_malloc(req->dev.recv_data_sz, MPL_MEM_BUFFER); +- MPIR_Assert(req->dev.tmpbuf); +- +- /* receive message in req->dev.tmpbuf */ +- LLC_cmd_t *cmd = LLC_cmd_alloc2(1, 1, 1); +- +- cmd[0].opcode = 0; // not use +- cmd[0].comm = LLC_COMM_MPICH; +- cmd[0].req_id = (uint64_t) cmd; +- cmd[0].rank = msg->rank; +- // cmd[0].tag = 0; // not use +- +- cmd[0].iov_local[0].addr = (uint64_t) req->dev.tmpbuf; +- cmd[0].iov_local[0].length = req->dev.recv_data_sz; +- cmd[0].niov_local = 1; +- +- cmd[0].iov_remote[0].addr = 0; +- cmd[0].iov_remote[0].length = req->dev.recv_data_sz; +- cmd[0].niov_remote = 1; +- +- ((struct llc_cmd_area *) cmd[0].usr_area)->cbarg = req; +- if (source == MPI_ANY_SOURCE) { +- ((struct llc_cmd_area *) cmd[0].usr_area)->raddr = MPI_ANY_SOURCE; +- } +- else { +- ((struct llc_cmd_area *) cmd[0].usr_area)->raddr = VC_FIELD(vc, remote_endpoint_addr); +- } +- +- LLC_recv_msg(cmd, msg); +- +- /* Wait until the reception of data is completed */ +- do { +- mpi_errno = MPID_nem_llc_poll(0); +- } while (!MPIR_Request_is_complete(req)); +- +-// MPID_Request_complete(req); // This operation is done in llc_poll. +- +- *message = req; +- +- /* TODO : Should we change status ? */ +- //status->MPI_ERROR = MPI_SUCCESS; +- status->MPI_SOURCE = req->status.MPI_SOURCE; +- status->MPI_TAG = req->status.MPI_TAG; +- MPIR_STATUS_SET_COUNT(*status, req->dev.recv_data_sz); +- } +- else { +- *flag = 0; +- *message = NULL; +- +- MPID_Progress_poke(); /* do LLC_poll */ +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_IMPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c ++++ /dev/null +@@ -1,1077 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* vim: set ts=8 sts=4 sw=4 noexpandtab : */ +-/* +- * +- */ +- +- +- +-#include "mpid_nem_impl.h" +-#include "llc_impl.h" +- +-//#define MPID_NEM_LLC_DEBUG_SEND +-#ifdef MPID_NEM_LLC_DEBUG_SEND +-#define dprintf printf +-#else +-#define dprintf(...) +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, +- int dest, int tag, MPIR_Comm * comm, int context_offset, +- struct MPIR_Request **req_out) +-{ +- int mpi_errno = MPI_SUCCESS, llc_errno; +- int dt_contig; +- intptr_t data_sz; +- MPIR_Datatype*dt_ptr; +- MPI_Aint dt_true_lb; +- int i; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_ISEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_ISEND); +- +- dprintf +- ("llc_isend,%d->%d,buf=%p,count=%d,datatype=%08x,dest=%d,tag=%08x,comm=%p,context_offset=%d\n", +- MPIDI_Process.my_pg_rank, vc->pg_rank, buf, count, datatype, dest, tag, comm, +- context_offset); +- +- int LLC_my_rank; +- LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank); +- dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank); +- +- struct MPIR_Request *sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- MPIR_Assert(sreq != NULL); +- MPIR_Object_set_ref(sreq, 2); +- +- /* Used in llc_poll --> MPID_nem_llc_send_handler */ +- sreq->ch.vc = vc; +- sreq->dev.OnDataAvail = 0; +- /* Don't save iov_offset because it's not used. */ +- +- /* Save it because it's used in send_handler */ +-#ifndef notdef_leak_0002_hack +- /* See also MPIDI_Request_create_sreq() */ +- /* in src/mpid/ch3/include/mpidimpl.h */ +- MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SEND); +-#endif /* notdef_leak_0002_hack */ +- sreq->dev.datatype = datatype; +-#ifndef notdef_leak_0002_hack +- sreq->comm = comm; +- MPIR_Comm_add_ref(comm); +-#endif /* notdef_leak_0002_hack */ +-#ifndef notdef_scan_hack +- +- /* used for MPI_Cancel() */ +- sreq->status.MPI_ERROR = MPI_SUCCESS; +- MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE); +- sreq->dev.cancel_pending = FALSE; +- /* Do not reset dev.state after calling MPIDI_Request_set_type() */ +- /* sreq->dev.state = 0; */ +- sreq->dev.match.parts.rank = dest; +- sreq->dev.match.parts.tag = tag; +- sreq->dev.match.parts.context_id = comm->context_id + context_offset; +-#endif /* notdef_scan_hack */ +- +- dprintf("llc_isend,remote_endpoint_addr=%ld\n", VC_FIELD(vc, remote_endpoint_addr)); +- +- REQ_FIELD(sreq, rma_buf) = NULL; +- +- LLC_cmd_t *cmd = LLC_cmd_alloc2(1, 1, 1); +- cmd[0].opcode = LLC_OPCODE_SEND; +- cmd[0].comm = LLC_COMM_MPICH; +- cmd[0].rank = VC_FIELD(vc, remote_endpoint_addr); +- cmd[0].req_id = (uint64_t) cmd; +- +- /* Prepare bit-vector to perform tag-match. We use the same bit-vector as in CH3 layer. */ +- /* See src/mpid/ch3/src/mpid_isend.c */ +- *(int32_t *) ((uint8_t *) & cmd[0].tag) = tag; +- *(MPIR_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) = +- comm->context_id + context_offset; +- MPIR_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIR_Context_id_t)); +- memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t), +- 0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t)); +- +- dprintf("llc_isend,tag="); +- for (i = 0; i < sizeof(LLC_tag_t); i++) { +- dprintf("%02x", (int) *((uint8_t *) & cmd[0].tag + i)); +- } +- dprintf("\n"); +- +- /* Prepare RDMA-write from buffer */ +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- dprintf("llc_isend,dt_contig=%d,data_sz=%ld\n", dt_contig, data_sz); +- +- +- const void *write_from_buf; +- if (dt_contig) { +- write_from_buf = (void *) ((char *) buf + dt_true_lb); +-#ifndef notdef_leak_0002_hack +- REQ_FIELD(sreq, pack_buf) = 0; +-#endif /* notdef_leak_0002_hack */ +- } +- else { +- /* See MPIDI_CH3_EagerNoncontigSend (in ch3u_eager.c) */ +- struct MPIR_Segment *segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP(!segment_ptr, mpi_errno, MPI_ERR_OTHER, "**outofmemory"); +-#ifndef notdef_leak_0001_hack +- /* See also MPIDI_CH3_Request_create and _destory() */ +- /* in src/mpid/ch3/src/ch3u_request.c */ +- sreq->dev.segment_ptr = segment_ptr; +-#endif /* notdef_leak_0001_hack */ +- +- MPIR_Segment_init(buf, count, datatype, segment_ptr); +- intptr_t segment_first = 0; +- intptr_t segment_size = data_sz; +- intptr_t last = segment_size; +- MPIR_Assert(last > 0); +- REQ_FIELD(sreq, pack_buf) = MPL_malloc((size_t) data_sz, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory"); +- MPIR_Segment_pack(segment_ptr, segment_first, &last, (char *) (REQ_FIELD(sreq, pack_buf))); +- MPIR_Assert(last == data_sz); +- write_from_buf = REQ_FIELD(sreq, pack_buf); +- } +- +- cmd[0].iov_local[0].addr = (uint64_t) write_from_buf; +- cmd[0].iov_local[0].length = data_sz; +- cmd[0].niov_local = 1; +- +- cmd[0].iov_remote[0].addr = 0; +- cmd[0].iov_remote[0].length = data_sz; +- cmd[0].niov_remote = 1; +- +- ((struct llc_cmd_area *) cmd[0].usr_area)->cbarg = sreq; +- ((struct llc_cmd_area *) cmd[0].usr_area)->raddr = VC_FIELD(vc, remote_endpoint_addr); +- +- llc_errno = LLC_post(cmd, 1); +- MPIR_ERR_CHKANDJUMP(llc_errno != LLC_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**LLC_post"); +- +- fn_exit: +- *req_out = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_ISEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_iStartContigMsg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data, +- intptr_t data_sz, MPIR_Request ** sreq_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPID_nem_llc_vc_area *vc_llc = 0; +- int need_to_queue = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_ISTARTCONTIGMSG); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_ISTARTCONTIGMSG); +- +- dprintf("llc_iStartContigMsg,%d->%d,hdr=%p,hdr_sz=%ld,data=%p,data_sz=%ld\n", +- MPIDI_Process.my_pg_rank, vc->pg_rank, hdr, hdr_sz, data, data_sz); +- +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_iStartContigMsg"); +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "vc.pg_rank = %d", vc->pg_rank); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "my_pg_rank = %d", MPIDI_Process.my_pg_rank); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "hdr_sz = %d", (int) hdr_sz); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "data_sz = %d", (int) data_sz); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "hdr type = %d", ((MPIDI_CH3_Pkt_t *) hdr)->type); +- +- /* create a request */ +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- MPIR_Assert(sreq != NULL); +- MPIR_Object_set_ref(sreq, 2); +- +- sreq->ch.vc = vc; +- sreq->dev.OnDataAvail = 0; +- sreq->dev.iov_offset = 0; +- +- REQ_FIELD(sreq, rma_buf) = NULL; +- +- /* sreq: src/mpid/ch3/include/mpidpre.h */ +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; +- sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt; +- sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); +- sreq->dev.iov_count = 1; +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "IOV_LEN = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN); +- if (data_sz > 0) { +- sreq->dev.iov[1].MPL_IOV_BUF = data; +- sreq->dev.iov[1].MPL_IOV_LEN = data_sz; +- sreq->dev.iov_count = 2; +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "IOV_LEN = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN); +- } +- +- vc_llc = VC_LLC(vc); +- if (!MPIDI_CH3I_Sendq_empty(vc_llc->send_queue)) { +- need_to_queue = 1; +- goto queue_it; +- } +- +- { +- int ret; +- +- ret = llc_writev(vc_llc->endpoint, +- vc_llc->remote_endpoint_addr, +- sreq->dev.iov, sreq->dev.iov_count, sreq, &REQ_LLC(sreq)->cmds); +- if (ret < 0) { +- mpi_errno = MPI_ERR_OTHER; +- MPIR_ERR_POP(mpi_errno); +- } +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "IOV_LEN = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN); +- if (!MPIDI_nem_llc_Rqst_iov_update(sreq, ret)) { +- need_to_queue = 2; /* YYY */ +- } +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "IOV_LEN = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN); +- } +- +- queue_it: +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "need_to_que %d", need_to_queue); +- if (need_to_queue > 0) { +- MPIDI_CH3I_Sendq_enqueue(&vc_llc->send_queue, sreq); +- } +- +- fn_exit: +- *sreq_ptr = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_ISTARTCONTIGMSG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_iSendContig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, +- void *data, intptr_t data_sz) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_llc_vc_area *vc_llc = 0; +- int need_to_queue = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_ISENDCONTIGMSG); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_ISENDCONTIGMSG); +- +- if (sreq->kind == MPIR_REQUEST_KIND__UNDEFINED) { +- sreq->kind = MPIR_REQUEST_KIND__SEND; +- } +- dprintf("llc_iSendConitig,sreq=%p,hdr=%p,hdr_sz=%ld,data=%p,data_sz=%ld\n", +- sreq, hdr, hdr_sz, data, data_sz); +- +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_iSendContig"); +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr); +- MPL_DBG_PKT(vc, hdr, "isendcontig"); +- { +- MPIDI_CH3_Pkt_t *pkt = (MPIDI_CH3_Pkt_t *) hdr; +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "pkt->type = %d", pkt->type); +- } +- +- MPIR_Assert(sreq != NULL); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "OnDataAvail= %p", sreq->dev.OnDataAvail); +- sreq->ch.vc = vc; +- sreq->dev.iov_offset = 0; +- +- /* sreq: src/mpid/ch3/include/mpidpre.h */ +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; +- sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt; +- sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); +- sreq->dev.iov_count = 1; +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "IOV_LEN = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN); +- if (data_sz > 0) { +- sreq->dev.iov[1].MPL_IOV_BUF = data; +- sreq->dev.iov[1].MPL_IOV_LEN = data_sz; +- sreq->dev.iov_count = 2; +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "IOV_LEN = %d", (int) sreq->dev.iov[1].MPL_IOV_LEN); +- } +- +- vc_llc = VC_LLC(vc); +- if (!MPIDI_CH3I_Sendq_empty(vc_llc->send_queue)) { +- need_to_queue = 1; +- goto queue_it; +- } +- +- { +- int ret; +- +- ret = llc_writev(vc_llc->endpoint, +- vc_llc->remote_endpoint_addr, +- sreq->dev.iov, sreq->dev.iov_count, sreq, &REQ_LLC(sreq)->cmds); +- if (ret < 0) { +- mpi_errno = MPI_ERR_OTHER; +- MPIR_ERR_POP(mpi_errno); +- } +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "WRITEV() = %d", ret); +- if (!MPIDI_nem_llc_Rqst_iov_update(sreq, ret)) { +- need_to_queue = 2; /* YYY */ +- } +- } +- +- queue_it: +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "need_to_que %d", need_to_queue); +- if (need_to_queue > 0) { +- MPIDI_CH3I_Sendq_enqueue(&vc_llc->send_queue, sreq); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_ISENDCONTIGMSG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_SendNoncontig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, +- intptr_t hdr_sz) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_SENDNONCONTIG); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_SENDNONCONTIG); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_SendNoncontig"); +- +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- +- intptr_t data_sz; +- MPID_nem_llc_vc_area *vc_llc = 0; +- int need_to_queue = 0; +- +- MPIR_Assert(sreq->dev.segment_first == 0); +- REQ_FIELD(sreq, rma_buf) = NULL; +- +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; +- sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt; +- sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); +- sreq->dev.iov_count = 1; +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "IOV_LEN = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN); +- +- data_sz = sreq->dev.segment_size; +- if (data_sz > 0) { +- REQ_FIELD(sreq, rma_buf) = MPL_malloc((size_t) sreq->dev.segment_size, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, rma_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory"); +- MPIR_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &data_sz, +- (char *) REQ_FIELD(sreq, rma_buf)); +- +- sreq->dev.iov[1].MPL_IOV_BUF = REQ_FIELD(sreq, rma_buf); +- sreq->dev.iov[1].MPL_IOV_LEN = data_sz; +- sreq->dev.iov_count = 2; +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "IOV_LEN = %d", (int) sreq->dev.iov[1].MPL_IOV_LEN); +- } +- +- sreq->ch.vc = vc; +- vc_llc = VC_LLC(vc); +- if (!MPIDI_CH3I_Sendq_empty(vc_llc->send_queue)) { +- need_to_queue = 1; +- goto queue_it; +- } +- +- { +- int ret; +- +- ret = llc_writev(vc_llc->endpoint, +- vc_llc->remote_endpoint_addr, +- sreq->dev.iov, sreq->dev.iov_count, sreq, &REQ_LLC(sreq)->cmds); +- if (ret < 0) { +- mpi_errno = MPI_ERR_OTHER; +- MPIR_ERR_POP(mpi_errno); +- } +- +- if (!MPIDI_nem_llc_Rqst_iov_update(sreq, ret)) { +- need_to_queue = 2; /* YYY */ +- } +- } +- +- queue_it: +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "need_to_que %d", need_to_queue); +- if (need_to_queue > 0) { +- MPIDI_CH3I_Sendq_enqueue(&vc_llc->send_queue, sreq); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_SENDNONCONTIG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_send_queued +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_llc_vc_area *vc_llc; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_SEND_QUEUED); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_SEND_QUEUED); +- +- MPIR_Assert(vc != NULL); +- vc_llc = VC_LLC(vc); +- MPIR_Assert(vc_llc != NULL); +- +- while (!MPIDI_CH3I_Sendq_empty(*send_queue)) { +- ssize_t ret = 0; +- MPIR_Request *sreq; +- void *endpt = vc_llc->endpoint; +- MPL_IOV *iovs; +- int niov; +- +- sreq = MPIDI_CH3I_Sendq_head(*send_queue); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "sreq %p", sreq); +- +- if (mpi_errno == MPI_SUCCESS) { +- iovs = &sreq->dev.iov[sreq->dev.iov_offset]; +- niov = sreq->dev.iov_count; +- +- ret = llc_writev(endpt, vc_llc->remote_endpoint_addr, +- iovs, niov, sreq, &REQ_LLC(sreq)->cmds); +- if (ret < 0) { +- mpi_errno = MPI_ERR_OTHER; +- } +- } +- if (mpi_errno != MPI_SUCCESS) { +- MPIDI_CH3I_Sendq_dequeue(send_queue, &sreq); +- sreq->status.MPI_ERROR = mpi_errno; +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "OnDataAvail = %p", sreq->dev.OnDataAvail); +- MPID_Request_complete(sreq); +- continue; +- } +- if (!MPIDI_nem_llc_Rqst_iov_update(sreq, ret)) { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "skip %p", sreq); +- break; +- } +- MPIDI_CH3I_Sendq_dequeue(send_queue, &sreq); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_SEND_QUEUED); +- return mpi_errno; +- //fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_nem_llc_Rqst_iov_update +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_nem_llc_Rqst_iov_update(MPIR_Request * mreq, intptr_t consume) +-{ +- int ret = TRUE; +- /* intptr_t oconsume = consume; */ +- int iv, nv; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NEM_LLC_RQST_IOV_UPDATE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NEM_LLC_RQST_IOV_UPDATE); +- +- MPIR_Assert(consume >= 0); +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_update() : consume %d", (int) consume); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_update() : iov_count %d", mreq->dev.iov_count); +- +- nv = mreq->dev.iov_count; +- for (iv = mreq->dev.iov_offset; iv < nv; iv++) { +- MPL_IOV *iov = &mreq->dev.iov[iv]; +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_update() : iov[iv] %d", iv); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_update() : consume b %d", (int) consume); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "iov_update() : iov_len b %d", (int) iov->MPL_IOV_LEN); +- if (iov->MPL_IOV_LEN > consume) { +- iov->MPL_IOV_BUF = ((char *) iov->MPL_IOV_BUF) + consume; +- iov->MPL_IOV_LEN -= consume; +- consume = 0; +- ret = FALSE; +- break; +- } +- consume -= iov->MPL_IOV_LEN; +- iov->MPL_IOV_LEN = 0; +- } +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_update() : consume %d", (int) consume); +- +- mreq->dev.iov_count = nv - iv; +- mreq->dev.iov_offset = iv; +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_update() : iov_offset %ld", mreq->dev.iov_offset); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_update() = %d", ret); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NEM_LLC_RQST_IOV_UPDATE); +- return ret; +-} +- +-ssize_t llc_writev(void *endpt, uint64_t raddr, +- const struct iovec * iovs, int niov, void *cbarg, void **vpp_reqid) +-{ +- ssize_t nw = 0; +- LLC_cmd_t *lcmd = 0; +-#ifndef notdef_hsiz_hack +- uint32_t bsiz; +-#endif /* notdef_hsiz_hack */ +- +- dprintf("writev,raddr=%ld,niov=%d,sreq=%p", raddr, niov, cbarg); +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_writev(%d)", (int) raddr); +- { +- uint8_t *buff = 0; +-#ifdef notdef_hsiz_hack +- uint32_t bsiz; +-#endif /* notdef_hsiz_hack */ +- +- { +- int iv, nv = niov; +- bsiz = 0; +- for (iv = 0; iv < nv; iv++) { +- size_t len = iovs[iv].iov_len; +- +- if (len <= 0) { +- continue; +- } +- bsiz += len; +- } +-#ifdef notdef_hsiz_hack +- if (bsiz > 0) { +- buff = MPL_malloc(bsiz + sizeof(MPID_nem_llc_netmod_hdr_t), MPL_MEM_BUFFER); +- if (buff == 0) { +- nw = -1; /* ENOMEM */ +- goto bad; +- } +- } +-#else /* notdef_hsiz_hack */ +- buff = MPL_malloc(bsiz + sizeof(MPID_nem_llc_netmod_hdr_t), MPL_MEM_BUFFER); +- if (buff == 0) { +- nw = -1; /* ENOMEM */ +- goto bad; +- } +-#endif /* notdef_hsiz_hack */ +- } +- +- lcmd = LLC_cmd_alloc2(1, 1, 1); +- if (lcmd == 0) { +- if (buff != 0) { +- MPL_free(buff); +- buff = 0; +- } +- nw = -1; /* ENOMEM */ +- goto bad; +- } +- +- UNSOLICITED_NUM_INC(cbarg); +- lcmd->opcode = LLC_OPCODE_UNSOLICITED; +- lcmd->comm = LLC_COMM_MPICH; +- lcmd->rank = (uint32_t) raddr; /* XXX */ +- lcmd->req_id = (uint64_t) lcmd; +- +- lcmd->iov_local[0].addr = (uintptr_t) buff; +- lcmd->iov_local[0].length = bsiz; +- lcmd->niov_local = 1; +- +- lcmd->iov_remote[0].addr = 0; +- lcmd->iov_remote[0].length = bsiz; +- lcmd->niov_remote = 1; +- +- { +- struct llc_cmd_area *usr = (void *) lcmd->usr_area; +- usr->cbarg = cbarg; +- usr->raddr = lcmd->rank; +- } +- buff = 0; +- } +- +- { +- int iv, nv = niov; +- char *bp; +- size_t bz; +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_writev() : nv %d", nv); +- bp = (void *) lcmd->iov_local[0].addr; +- bz = lcmd->iov_local[0].length; +- +- /* Prepare netmod header */ +- ((MPID_nem_llc_netmod_hdr_t *) bp)->initiator_pg_rank = MPIDI_Process.my_pg_rank; +- bp += sizeof(MPID_nem_llc_netmod_hdr_t); +-#ifndef notdef_hsiz_hack +- lcmd->iov_local[0].length += sizeof(MPID_nem_llc_netmod_hdr_t); +- lcmd->iov_remote[0].length += sizeof(MPID_nem_llc_netmod_hdr_t); +-#endif /* notdef_hsiz_hack */ +- +- /* Pack iovs into buff */ +- for (iv = 0; iv < nv; iv++) { +- size_t len = iovs[iv].iov_len; +- +- if (len <= 0) { +- continue; +- } +- if (len > bz) { +- len = bz; +- } +- memcpy(bp, iovs[iv].iov_base, len); +- if ((bz -= len) <= 0) { +- break; +- } +- bp += len; +- } +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_writev() : iv %d", iv); +- { +- void *bb = (void *) lcmd->iov_local[0].addr; +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "wptr = %d", (int) (bp - (char *) bb)); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "blocklengt = %d", (int) lcmd->iov_local[0].length); +- MPL_DBG_PKT(endpt, bb, "writev"); +- } +- } +- { +- int llc_errno; +- llc_errno = LLC_post(lcmd, 1); +- if (llc_errno != 0) { +- if ((llc_errno == EAGAIN) || (llc_errno == ENOSPC)) { +- nw = 0; +- } +- else { +- if (lcmd->iov_local[0].addr != 0) { +- MPL_free((void *) lcmd->iov_local[0].addr); +- lcmd->iov_local[0].addr = 0; +- } +- (void) LLC_cmd_free(lcmd, 1); +- nw = -1; +- goto bad; +- } +- } +- else { +-#ifdef notdef_hsiz_hack +- nw = (ssize_t) lcmd->iov_local[0].length; +-#else /* notdef_hsiz_hack */ +- nw = bsiz; +-#endif /* notdef_hsiz_hack */ +- } +- } +- if (vpp_reqid != 0) { +- vpp_reqid[0] = lcmd; +- } +- +- bad: +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "llc_writev() : nw %d", (int) nw); +- return nw; +-} +- +-int convert_rank_llc2mpi(MPIR_Comm * comm, int llc_rank, int *mpi_rank) +-{ +- int size, rank; +- int found = 0; +- MPIDI_VC_t *vc; +- size = MPIR_Comm_size(comm); +- +- for (rank = 0; rank < size; rank++) { +- MPIDI_Comm_get_vc(comm, rank, &vc); +- MPIDI_CH3I_VC *vc_ch = &vc->ch; +- +- /* Self-vc isn't initialized, so vc_ch->is_local is 0. +- * +- * If vc_ch->is_local is 1, vc_init is not called. +- * - vc->comm_ops is not overridden, so send to / receive from this vc +- * are not via LLC_post. +- * - VC_FIELD(vc, remote_endpoint_addr) is 0. +- */ +- if (vc->pg_rank == MPIDI_Process.my_pg_rank || vc_ch->is_local == 1) { +- if (llc_rank == MPID_nem_llc_my_llc_rank) { +- *mpi_rank = rank; +- found = 1; +- break; +- } +- } +- else if (llc_rank == VC_FIELD(vc, remote_endpoint_addr)) { +- *mpi_rank = rank; // rank number in the req->comm +- found = 1; +- break; +- } +- } +- +- return found; +-} +- +-int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- int llc_errno; +- int nevents; +- LLC_event_t events[1]; +- +- while (1) { +- llc_errno = LLC_poll(LLC_COMM_MPICH, 1, events, &nevents); +- MPIR_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_poll"); +- +- LLC_cmd_t *lcmd; +- void *vp_sreq; +- uint64_t reqid = 0; +- +- if (nevents == 0) { +- break; +- } +- MPIR_Assert(nevents == 1); +- +- switch (events[0].type) { +- case LLC_EVENT_SEND_LEFT:{ +- dprintf("llc_poll,EVENT_SEND_LEFT\n"); +- lcmd = (LLC_cmd_t *) events[0].side.initiator.req_id; +- MPIR_Assert(lcmd != 0); +- MPIR_Assert(lcmd->opcode == LLC_OPCODE_SEND || lcmd->opcode == LLC_OPCODE_SSEND); +- +- if (events[0].side.initiator.error_code != LLC_ERROR_SUCCESS) { +- printf("llc_poll,error_code=%d\n", events[0].side.initiator.error_code); +- MPID_nem_llc_segv; +- } +- +- /* Call send_handler. First arg is a pointer to MPIR_Request */ +- (*sfnc) (((struct llc_cmd_area *) lcmd->usr_area)->cbarg, &reqid); +- +- /* Don't free iov_local[0].addr */ +- +- llc_errno = LLC_cmd_free(lcmd, 1); +- MPIR_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_cmd_free"); +- break; +- } +- +- case LLC_EVENT_UNSOLICITED_LEFT:{ +- dprintf("llc_poll,EVENT_UNSOLICITED_LEFT\n"); +- lcmd = (LLC_cmd_t *) events[0].side.initiator.req_id; +- MPIR_Assert(lcmd != 0); +- MPIR_Assert(lcmd->opcode == LLC_OPCODE_UNSOLICITED); +- +- struct llc_cmd_area *usr; +- usr = (void *) lcmd->usr_area; +- vp_sreq = usr->cbarg; +- +- UNSOLICITED_NUM_DEC(vp_sreq); +- +- if (events[0].side.initiator.error_code != LLC_ERROR_SUCCESS) { +- printf("llc_poll,error_code=%d\n", events[0].side.initiator.error_code); +- MPID_nem_llc_segv; +- } +- (*sfnc) (vp_sreq, &reqid); +- +- if (lcmd->iov_local[0].addr != 0) { +- MPL_free((void *) lcmd->iov_local[0].addr); +- lcmd->iov_local[0].addr = 0; +- } +- llc_errno = LLC_cmd_free(lcmd, 1); +- MPIR_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_cmd_free"); +- +- break; +- } +- case LLC_EVENT_UNSOLICITED_ARRIVED:{ +- void *vp_vc = 0; +- void *buff; +- size_t bsiz; +- +- buff = events[0].side.responder.addr; +- bsiz = events[0].side.responder.length; +-#ifndef notdef_hsiz_hack +-#if defined(__sparc__) +- MPIR_Assert(((uintptr_t) buff % 8) == 0); +-#endif +-#endif /* notdef_hsiz_hack */ +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "LLC_leng = %d", (int) bsiz); +- MPL_DBG_PKT(vp_vc, buff, "poll"); +- } +- dprintf("llc_poll,EVENT_UNSOLICITED_ARRIVED,%d<-%d\n", +- MPIDI_Process.my_pg_rank, +- ((MPID_nem_llc_netmod_hdr_t *) buff)->initiator_pg_rank); +-#ifdef notdef_hsiz_hack +- (*rfnc) (vp_vc, +- ((MPID_nem_llc_netmod_hdr_t *) buff)->initiator_pg_rank, +- (uint8_t *) buff + sizeof(MPID_nem_llc_netmod_hdr_t), bsiz); +-#else /* notdef_hsiz_hack */ +- (*rfnc) (vp_vc, +- ((MPID_nem_llc_netmod_hdr_t *) buff)->initiator_pg_rank, +- (uint8_t *) buff + sizeof(MPID_nem_llc_netmod_hdr_t), +- bsiz - sizeof(MPID_nem_llc_netmod_hdr_t)); +-#endif /* notdef_hsiz_hack */ +- llc_errno = LLC_release_buffer(&events[0]); +- MPIR_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_release_buffer"); +- +- break; +- } +- case LLC_EVENT_RECV_MATCHED:{ +- dprintf("llc_poll,EVENT_RECV_MATCHED\n"); +- lcmd = (LLC_cmd_t *) events[0].side.initiator.req_id; +- MPIR_Request *req = ((struct llc_cmd_area *) lcmd->usr_area)->cbarg; +- +- if (req->kind != MPIR_REQUEST_KIND__MPROBE) { +- /* Unpack non-contiguous dt */ +- int is_contig; +- MPIR_Datatype_is_contig(req->dev.datatype, &is_contig); +- if (!is_contig) { +- dprintf("llc_poll,unpack noncontiguous data to user buffer\n"); +- +- /* see MPIDI_CH3U_Request_unpack_uebuf (in /src/mpid/ch3/src/ch3u_request.c) */ +- /* or MPIDI_CH3U_Receive_data_found (in src/mpid/ch3/src/ch3u_handle_recv_pkt.c) */ +- +- /* set_request_info() sets req->dev.recv_data_sz to pkt->data_sz. +- * pkt->data_sz is sender's request size. +- */ +- intptr_t unpack_sz = events[0].side.initiator.length; +- MPIR_Segment seg; +- MPI_Aint last; +- +- /* user_buf etc. are set in MPID_irecv --> MPIDI_CH3U_Recvq_FDU_or_AEP */ +- MPIR_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype, +- &seg); +- last = unpack_sz; +- MPIR_Segment_unpack(&seg, 0, &last, REQ_FIELD(req, pack_buf)); +- if (last != unpack_sz) { +- /* --BEGIN ERROR HANDLING-- */ +- /* received data was not entirely consumed by unpack() +- * because too few bytes remained to fill the next basic +- * datatype */ +- MPIR_STATUS_SET_COUNT(req->status, last); +- req->status.MPI_ERROR = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, +- __LINE__, MPI_ERR_TYPE, "**llc_poll", 0); +- /* --END ERROR HANDLING-- */ +- } +- dprintf("llc_poll,ref_count=%d,pack_buf=%p\n", req->ref_count, +- REQ_FIELD(req, pack_buf)); +- MPL_free(REQ_FIELD(req, pack_buf)); +- } +- +- req->status.MPI_TAG = events[0].side.initiator.tag & 0xffffffff;; +- if (req->dev.match.parts.rank != MPI_ANY_SOURCE) { +- req->status.MPI_SOURCE = req->dev.match.parts.rank; +- } +- else { +- /* 'events[0].side.initiator.rank' is LLC rank. +- * Convert it to a rank number in the communicator. */ +- int found = 0; +- found = +- convert_rank_llc2mpi(req->comm, events[0].side.initiator.rank, +- &req->status.MPI_SOURCE); +- MPIR_Assert(found); +- } +- +- if (unlikely(events[0].side.initiator.error_code == LLC_ERROR_TRUNCATE)) { +- req->status.MPI_ERROR = MPI_ERR_TRUNCATE; +- MPIR_STATUS_SET_COUNT(req->status, lcmd->iov_local[0].length); +- } +- else { +- MPIR_STATUS_SET_COUNT(req->status, events[0].side.initiator.length); +- } +- +- /* Dequeue request from posted queue. +- * It's posted in MPID_Irecv --> MPIDI_CH3U_Recvq_FDU_or_AEP */ +- int found = MPIDI_CH3U_Recvq_DP(req); +- MPIR_Assert(found); +- } +- +- /* Mark completion on rreq */ +- MPID_Request_complete(req); +- +- llc_errno = LLC_cmd_free(lcmd, 1); +- MPIR_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_cmd_free"); +- break; +- } +- case LLC_EVENT_TARGET_PROC_FAIL:{ +- MPIR_Request *req; +- +- lcmd = (LLC_cmd_t *) events[0].side.initiator.req_id; +- MPIR_Assert(lcmd != 0); +- +- req = ((struct llc_cmd_area *) lcmd->usr_area)->cbarg; +- +- if (lcmd->opcode == LLC_OPCODE_UNSOLICITED) { +- struct llc_cmd_area *usr; +- usr = (void *) lcmd->usr_area; +- vp_sreq = usr->cbarg; +- +- UNSOLICITED_NUM_DEC(vp_sreq); +- +- req->status.MPI_ERROR = MPI_SUCCESS; +- MPIR_ERR_SET(req->status.MPI_ERROR, MPIX_ERR_PROC_FAIL_STOP, "**comm_fail"); +- +- MPID_Request_complete(req); +- +- if (lcmd->iov_local[0].addr != 0) { +- MPL_free((void *) lcmd->iov_local[0].addr); +- lcmd->iov_local[0].addr = 0; +- } +- } +- else if (lcmd->opcode == LLC_OPCODE_SEND || lcmd->opcode == LLC_OPCODE_SSEND) { +- req->status.MPI_ERROR = MPI_SUCCESS; +- MPIR_ERR_SET(req->status.MPI_ERROR, MPIX_ERR_PROC_FAIL_STOP, "**comm_fail"); +- +- MPID_Request_complete(req); +- } +- else if (lcmd->opcode == LLC_OPCODE_RECV) { +- /* Probably ch3 dequeued and completed this request. */ +-#if 0 +- MPIDI_CH3U_Recvq_DP(req); +- req->status.MPI_ERROR = MPI_SUCCESS; +- MPIR_ERR_SET(req->status.MPI_ERROR, MPIX_ERR_PROC_FAIL_STOP, "**comm_fail"); +- MPID_Request_complete(req); +-#endif +- } +- else { +- printf("llc_poll,target dead, unknown opcode=%d\n", lcmd->opcode); +- MPID_nem_llc_segv; +- } +- +- llc_errno = LLC_cmd_free(lcmd, 1); +- MPIR_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_cmd_free"); +- +- break; +- } +- default: +- printf("llc_poll,unknown event type=%d\n", events[0].type); +- MPID_nem_llc_segv; +- } +- } +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, +- int dest, int tag, MPIR_Comm * comm, int context_offset, +- struct MPIR_Request **request) +-{ +- int mpi_errno = MPI_SUCCESS, llc_errno; +- int dt_contig; +- intptr_t data_sz; +- MPIR_Datatype*dt_ptr; +- MPI_Aint dt_true_lb; +- int i; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_ISSEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_ISSEND); +- +- dprintf +- ("llc_isend,%d->%d,buf=%p,count=%d,datatype=%08x,dest=%d,tag=%08x,comm=%p,context_offset=%d\n", +- MPIDI_Process.my_pg_rank, vc->pg_rank, buf, count, datatype, dest, tag, comm, +- context_offset); +- +- int LLC_my_rank; +- LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank); +- dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank); +- +- struct MPIR_Request *sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- MPIR_Assert(sreq != NULL); +- MPIR_Object_set_ref(sreq, 2); +- +- /* Used in llc_poll --> MPID_nem_llc_send_handler */ +- sreq->ch.vc = vc; +- sreq->dev.OnDataAvail = 0; +- /* Don't save iov_offset because it's not used. */ +- +- /* Save it because it's used in send_handler */ +- /* See also MPIDI_Request_create_sreq() */ +- /* in src/mpid/ch3/include/mpidimpl.h */ +- MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SEND); +- sreq->dev.datatype = datatype; +- sreq->comm = comm; +- MPIR_Comm_add_ref(comm); +- +- /* used for MPI_Cancel() */ +- sreq->status.MPI_ERROR = MPI_SUCCESS; +- MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE); +- sreq->dev.cancel_pending = FALSE; +- /* Do not reset dev.state after calling MPIDI_Request_set_type() */ +- /* sreq->dev.state = 0; */ +- sreq->dev.match.parts.rank = dest; +- sreq->dev.match.parts.tag = tag; +- sreq->dev.match.parts.context_id = comm->context_id + context_offset; +- +- dprintf("llc_isend,remote_endpoint_addr=%ld\n", VC_FIELD(vc, remote_endpoint_addr)); +- +- LLC_cmd_t *cmd = LLC_cmd_alloc2(1, 1, 1); +- cmd[0].opcode = LLC_OPCODE_SSEND; +- cmd[0].comm = LLC_COMM_MPICH; +- cmd[0].rank = VC_FIELD(vc, remote_endpoint_addr); +- cmd[0].req_id = (uint64_t) cmd; +- +- /* Prepare bit-vector to perform tag-match. We use the same bit-vector as in CH3 layer. */ +- /* See src/mpid/ch3/src/mpid_isend.c */ +- *(int32_t *) ((uint8_t *) & cmd[0].tag) = tag; +- *(MPIR_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) = +- comm->context_id + context_offset; +- MPIR_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIR_Context_id_t)); +- memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t), +- 0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t)); +- +- dprintf("llc_isend,tag="); +- for (i = 0; i < sizeof(LLC_tag_t); i++) { +- dprintf("%02x", (int) *((uint8_t *) & cmd[0].tag + i)); +- } +- dprintf("\n"); +- +- /* Prepare RDMA-write from buffer */ +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- dprintf("llc_isend,dt_contig=%d,data_sz=%ld\n", dt_contig, data_sz); +- +- +- const void *write_from_buf; +- if (dt_contig) { +- write_from_buf = (void *) ((char *) buf + dt_true_lb); +- REQ_FIELD(sreq, pack_buf) = 0; +- } +- else { +- /* See MPIDI_CH3_EagerNoncontigSend (in ch3u_eager.c) */ +- struct MPIR_Segment *segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP(!segment_ptr, mpi_errno, MPI_ERR_OTHER, "**outofmemory"); +- /* See also MPIDI_CH3_Request_create and _destory() */ +- /* in src/mpid/ch3/src/ch3u_request.c */ +- sreq->dev.segment_ptr = segment_ptr; +- +- MPIR_Segment_init(buf, count, datatype, segment_ptr); +- intptr_t segment_first = 0; +- intptr_t segment_size = data_sz; +- intptr_t last = segment_size; +- MPIR_Assert(last > 0); +- REQ_FIELD(sreq, pack_buf) = MPL_malloc((size_t) data_sz, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory"); +- MPIR_Segment_pack(segment_ptr, segment_first, &last, (char *) (REQ_FIELD(sreq, pack_buf))); +- MPIR_Assert(last == data_sz); +- write_from_buf = REQ_FIELD(sreq, pack_buf); +- } +- +- cmd[0].iov_local[0].addr = (uint64_t) write_from_buf; +- cmd[0].iov_local[0].length = data_sz; +- cmd[0].niov_local = 1; +- +- cmd[0].iov_remote[0].addr = 0; +- cmd[0].iov_remote[0].length = data_sz; +- cmd[0].niov_remote = 1; +- +- ((struct llc_cmd_area *) cmd[0].usr_area)->cbarg = sreq; +- ((struct llc_cmd_area *) cmd[0].usr_area)->raddr = VC_FIELD(vc, remote_endpoint_addr); +- +- llc_errno = LLC_post(cmd, 1); +- MPIR_ERR_CHKANDJUMP(llc_errno != LLC_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**LLC_post"); +- +- fn_exit: +- *request = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_ISSEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_vc.c ++++ /dev/null +@@ -1,219 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* vim: set ts=8 sts=4 sw=4 noexpandtab : */ +-/* +- * +- */ +- +- +- +-#include "mpid_nem_impl.h" +-#include "llc_impl.h" +- +-//#define MPID_NEM_LLC_DEBUG_VC +-#ifdef MPID_NEM_LLC_DEBUG_VC +-#define dprintf printf +-#else +-#define dprintf(...) +-#endif +- +-/* function prototypes */ +- +-static int llc_vc_init(MPIDI_VC_t * vc); +- +-static MPIDI_Comm_ops_t comm_ops = { +- .recv_posted = MPID_nem_llc_recv_posted, +- .send = MPID_nem_llc_isend, /* wait is performed separately after calling this */ +- .rsend = MPID_nem_llc_isend, +- .ssend = MPID_nem_llc_issend, +- .isend = MPID_nem_llc_isend, +- .irsend = MPID_nem_llc_isend, +- .issend = MPID_nem_llc_issend, +- +- .send_init = NULL, +- .bsend_init = NULL, +- .rsend_init = NULL, +- .ssend_init = NULL, +- .startall = NULL, +- +- .cancel_send = NULL, +- .cancel_recv = MPID_nem_llc_cancel_recv, +- +- .probe = MPID_nem_llc_probe, +- .iprobe = MPID_nem_llc_iprobe, +- .improbe = MPID_nem_llc_improbe, +- .imrecv = NULL +-}; +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_vc_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_vc_init(MPIDI_VC_t * vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_VC_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_VC_INIT); +- +- mpi_errno = llc_vc_init(vc); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_VC_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_vc_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_vc_destroy(MPIDI_VC_t * vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_VC_DESTROY); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_VC_DESTROY); +- /* free any resources associated with this VC here */ +- +- { +- MPID_nem_llc_vc_area *vc_llc = VC_LLC(vc); +- +- vc_llc->endpoint = 0; +- } +- +- /* wait until all UNSOLICITED are done */ +- while (VC_FIELD(vc, unsolicited_count)) { +- MPID_nem_llc_poll(1); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_VC_DESTROY); +- return mpi_errno; +- //fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_vc_terminate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_llc_vc_terminate(MPIDI_VC_t * vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LLC_VC_TERMINATE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LLC_VC_TERMINATE); +- +- dprintf("llc_vc_terminate,enter,%d->%d\n", MPIDI_Process.my_pg_rank, vc->pg_rank); +- +- mpi_errno = MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LLC_VC_TERMINATE); +- return mpi_errno; +- //fn_fail: +- goto fn_exit; +-} +- +-/* ============================================== */ +- +-#undef FUNCNAME +-#define FUNCNAME llc_vc_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int llc_vc_init(MPIDI_VC_t * vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- +- +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "MPIDI_NEM_VC_NETMOD_AREA_LEN = %d\n", MPIDI_NEM_VC_NETMOD_AREA_LEN); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "MPIDI_NEM_REQ_NETMOD_AREA_LEN = %d", MPIDI_NEM_REQ_NETMOD_AREA_LEN); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- "MPID_nem_llc_vc_area = %d\n", (int) sizeof(MPID_nem_llc_vc_area)); +- } +- +- /* MPIDI_CH3I_VC: src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h */ +- { +- MPIDI_CH3I_VC *vc_ch = &vc->ch; +- MPID_nem_llc_vc_area *vc_llc = VC_LLC(vc); +- +- vc_llc->endpoint = vc; +- mpi_errno = +- MPID_nem_llc_kvs_get_binary(vc->pg_rank, +- "llc_rank", +- (char *) &vc_llc->remote_endpoint_addr, sizeof(int)); +- MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**MPID_nem_ib_kvs_get_binary"); +- dprintf("llc_vc_init,my_pg_rank=%d,pg_rank=%d,my_llc_rank=%d,llc_rank=%ld\n", +- MPIDI_Process.my_pg_rank, vc->pg_rank, MPID_nem_llc_my_llc_rank, +- vc_llc->remote_endpoint_addr); +- +- vc_llc->send_queue.head = 0; /* GENERIC_Q_DECL */ +- vc_llc->send_queue.tail = 0; /* GENERIC_Q_DECL */ +- +- vc->eager_max_msg_sz = (12 * 1024); +- vc->ready_eager_max_msg_sz = (12 * 1024); +- /* vc->rndvSend_fn = 0 */ +- /* vc->rndvRecv_fn = 0 */ +- vc->sendNoncontig_fn = MPID_nem_llc_SendNoncontig; +-#ifdef ENABLE_COMM_OVERRIDES +- vc->comm_ops = &comm_ops; +-#endif +- +- vc_ch->iStartContigMsg = MPID_nem_llc_iStartContigMsg; +- vc_ch->iSendContig = MPID_nem_llc_iSendContig; +- +-#ifdef ENABLE_CHECKPOINTING +- vc_ch->ckpt_pause_send_vc = 0 /* MPID_nem_llc_ckpt_pause_send_vc */ ; +- vc_ch->ckpt_continue_vc = 0 /* MPID_nem_llc_ckpt_continue_vc */ ; +- vc_ch->ckpt_restart_vc = 0 /* = MPID_nem_llc_ckpt_restart_vc */ ; +-#endif +- +- MPIDI_CHANGE_VC_STATE(vc, ACTIVE); +- } +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#if 0 /* not use */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_llc_vc_prnt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPID_nem_llc_vc_prnt(MPIDI_VC_t * vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- /* MPIR_OBJECT_HEADER; */ +- /* src/include/mpir_objects.h */ +- /* int handle; */ +- /* MPIDI_VC_State_t state; */ +- /* struct MPIDI_PG *pg; */ +- /* int pg_rank; */ +- /* int lpid; */ +- /* int node_id; */ +- /* int port_name_tag; */ +- /* MPID_Seqnum_t seqnum_send; *//* MPID_USE_SEQUENCE_NUMBERS */ +- /* MPID_Seqnum_t seqnum_recv; *//* MPID_CH3_MSGS_UNORDERED */ +- /* MPIDI_CH3_Pkt_send_container_t *msg_reorder_queue; */ +- /* int (*rndvSend_fn)(); */ +- /* int (*rndvRecv_fn)(); */ +- /* int eager_max_msg_sz; */ +- /* int ready_eager_max_msg_sz; */ +- /* int (*sendNonconfig_gn)(); */ +- /* MPIDI_Comm_ops_t *comm_ops; *//* ENABLE_COMM_OVERRIDES */ +- /* MPIDI_CH3_VC_DECL *//* MPIDI_CH3_VC_DECL */ +- /* src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h */ +- +- return mpi_errno; +-} +-#endif +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/llc/subconfigure.m4 ++++ /dev/null +@@ -1,57 +0,0 @@ +-[#] start of __file__ +-dnl MPICH_SUBCFG_AFTER=src/mpid/ch3/channels/nemesis +- +-AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ +- AM_COND_IF([BUILD_CH3_NEMESIS],[ +- for net in $nemesis_networks ; do +- AS_CASE([$net],[llc],[build_nemesis_netmod_llc=yes]) +- done +- ]) +- AM_CONDITIONAL([BUILD_NEMESIS_NETMOD_LLC],[test "X$build_nemesis_netmod_llc" = "Xyes"]) +- +-])dnl +- +-AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ +-AM_COND_IF([BUILD_NEMESIS_NETMOD_LLC],[ +- AC_MSG_NOTICE([RUNNING CONFIGURE FOR ch3:nemesis:llc]) +- +- PAC_SET_HEADER_LIB_PATH(libmemcached) +- PAC_SET_HEADER_LIB_PATH(ibverbs) +- PAC_SET_HEADER_LIB_PATH(llc) +- +- PAC_CHECK_HEADER_LIB(libmemcached/memcached.h,memcached,memcached,libmemcached_found=yes,libmemcached_found=no) +- if test "${libmemcached_found}" = "yes" ; then +- AC_MSG_NOTICE([libmemcached is going to be linked.]) +- else +- AC_MSG_NOTICE([libmemcached was not found]) +- fi +- +- PAC_CHECK_HEADER_LIB([infiniband/verbs.h],ibverbs,ibv_open_device,ibverbs_found=yes,ibverbs_found=no) +- if test "${ibverbs_found}" = "yes" ; then +- AC_MSG_NOTICE([libibverbs is going to be linked.]) +- else +- AC_MSG_ERROR([Internal error: ibverbs was not found]) +- fi +- +- PAC_CHECK_HEADER_LIB(llc.h,llc,LLC_init,llc_found=yes,llc_found=no) +- if test "${llc_found}" = "yes" ; then +- AC_MSG_NOTICE([libllc is going to be linked.]) +- else +- AC_MSG_ERROR([Internal error: llc was not found]) +- fi +- +- #AC_CHECK_HEADERS([stdlib.h dlfcn.h]) +- #AC_CHECK_FUNCS([dlopen]) +- #AC_SEARCH_LIBS([dlopen], [dl]) +- +-dnl AC_TRY_COMPILE([ +-dnl #include +-dnl #include +-dnl ],[ +-dnl dlopen(NULL, RTLD_LAZY) +-dnl ],[ac_cv_func_dlopen=yes],[ac_cv_func_dlopen=no]) +- +- AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions]) +-])dnl end AM_COND_IF(BUILD_NEMESIS_NETMOD_LLC,...) +-])dnl end _BODY +-[#] end of __file__ +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/Makefile.mk ++++ /dev/null +@@ -1,21 +0,0 @@ +-## -*- Mode: Makefile; -*- +-## vim: set ft=automake : +-## +-## (C) 2014 Mellanox Technologies, Inc. +-## See COPYRIGHT in top-level directory. +-## +- +-if BUILD_NEMESIS_NETMOD_MXM +- +-mpi_core_sources += \ +- src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_cancel.c \ +- src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_finalize.c \ +- src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_init.c \ +- src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c \ +- src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c \ +- src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c +- +-noinst_HEADERS += \ +- src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h +- +-endif BUILD_NEMESIS_NETMOD_MXM +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_cancel.c ++++ /dev/null +@@ -1,82 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portion of this code were written by Mellanox Technologies, Inc. +- * (C) 2014 Mellanox Technologies, Inc. +- * +- */ +- +- +- +-#include "mxm_impl.h" +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_cancel_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_cancel_send(MPIDI_VC_t * vc, MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t ret = MXM_OK; +- MPID_nem_mxm_vc_area *vc_area = VC_BASE(req->ch.vc); +- MPID_nem_mxm_req_area *req_area = REQ_BASE(req); +- +- _dbg_mxm_output(5, "========> Canceling SEND req %p\n", req); +- +- if (likely(!_mxm_req_test(&req_area->mxm_req->item.base))) { +- ret = mxm_req_cancel_send(&req_area->mxm_req->item.send); +- if ((MXM_OK == ret) || (MXM_ERR_NO_PROGRESS == ret)) { +- _mxm_req_wait(&req_area->mxm_req->item.base); +- if (MPIR_STATUS_GET_CANCEL_BIT(req->status)) { +- vc_area->pending_sends -= 1; +- } +- } +- else { +- mpi_errno = MPI_ERR_INTERN; +- } +- } +- +- _dbg_mxm_out_req(req); +- +- fn_exit: +- return mpi_errno; +- fn_fail:ATTRIBUTE((unused)) +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_cancel_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_cancel_recv(MPIDI_VC_t * vc, MPIR_Request * req) +-{ +- int mpi_errno ATTRIBUTE((unused)) = MPI_SUCCESS; +- mxm_error_t ret = MXM_OK; +- MPID_nem_mxm_req_area *req_area = REQ_BASE(req); +- +- _dbg_mxm_output(5, "========> Canceling RECV req %p\n", req); +- +- if (likely(!_mxm_req_test(&req_area->mxm_req->item.base))) { +- ret = mxm_req_cancel_recv(&req_area->mxm_req->item.recv); +- if ((MXM_OK == ret) || (MXM_ERR_NO_PROGRESS == ret)) { +- _mxm_req_wait(&req_area->mxm_req->item.base); +- } +- else { +- mpi_errno = MPI_ERR_INTERN; +- } +- } +- +- _dbg_mxm_out_req(req); +- +- fn_exit: +- /* This function returns zero in case request is canceled +- * and nonzero otherwise +- */ +- return (!MPIR_STATUS_GET_CANCEL_BIT(req->status)); +- fn_fail:ATTRIBUTE((unused)) +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_finalize.c ++++ /dev/null +@@ -1,13 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portion of this code were written by Mellanox Technologies, Inc. +- * (C) 2014 Mellanox Technologies, Inc. +- * +- */ +- +- +- +-#include "mxm_impl.h" +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h ++++ /dev/null +@@ -1,447 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portion of this code were written by Mellanox Technologies, Inc. +- * (C) 2014 Mellanox Technologies, Inc. +- * +- */ +- +- +- +-#ifndef MXM_IMPL_H_INCLUDED +-#define MXM_IMPL_H_INCLUDED +-#include "mpid_nem_impl.h" +-#include "pmi.h" +-#include +- +- +-#if !defined(MXM_VERSION) || (MXM_API < MXM_VERSION(3,0)) +-#error "Unsupported MXM version, version 3.0 or above required" +-#endif +- +- +-int MPID_nem_mxm_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p); +-int MPID_nem_mxm_finalize(void); +-int MPID_nem_mxm_poll(int in_blocking_progress); +-int MPID_nem_mxm_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p); +-int MPID_nem_mxm_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc); +-int MPID_nem_mxm_vc_init(MPIDI_VC_t * vc); +-int MPID_nem_mxm_vc_destroy(MPIDI_VC_t * vc); +-int MPID_nem_mxm_vc_terminate(MPIDI_VC_t * vc); +-int MPID_nem_mxm_get_ordering(int *ordering); +- +-/* alternate interface */ +-int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, +- void *data, intptr_t data_sz); +-int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data, +- intptr_t data_sz, MPIR_Request ** sreq_ptr); +-int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *header, +- intptr_t hdr_sz); +- +-/* direct interface */ +-int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPIR_Request * rreq); +-int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** sreq_p); +-int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** sreq_p); +-int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** sreq_p); +-int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** sreq_p); +-int MPID_nem_mxm_cancel_send(MPIDI_VC_t * vc, MPIR_Request * sreq); +-int MPID_nem_mxm_cancel_recv(MPIDI_VC_t * vc, MPIR_Request * rreq); +-int MPID_nem_mxm_probe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- MPI_Status * status); +-int MPID_nem_mxm_iprobe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPI_Status * status); +-int MPID_nem_mxm_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPIR_Request ** message, MPI_Status * status); +- +-int MPID_nem_mxm_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag, +- MPI_Status * status); +-int MPID_nem_mxm_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, +- MPIR_Request ** message, MPI_Status * status); +- +-/* active message callback */ +-#define MXM_MPICH_HID_ADI_MSG 1 +-void MPID_nem_mxm_get_adi_msg(mxm_conn_h conn, mxm_imm_t imm, void *data, +- size_t length, size_t offset, int last); +- +-/* any source management */ +-void MPID_nem_mxm_anysource_posted(MPIR_Request * req); +-int MPID_nem_mxm_anysource_matched(MPIR_Request * req); +- +-int _mxm_handle_sreq(MPIR_Request * req); +- +-/* List type as queue +- * Operations, initialization etc +- */ +-typedef struct list_item list_item_t; +-struct list_item { +- list_item_t *next; +-}; +- +-typedef struct list_head list_head_t; +-struct list_head { +- list_item_t *head; +- list_item_t **ptail; +- int length; +-}; +- +-static inline void list_init(list_head_t * list_head) +-{ +- list_head->head = NULL; +- list_head->ptail = &list_head->head; +- list_head->length = 0; +-} +- +-static inline int list_length(list_head_t * list_head) +-{ +- return list_head->length; +-} +- +-static inline int list_is_empty(list_head_t * list_head) +-{ +- return list_head->length == 0; +-} +- +-static inline void list_enqueue(list_head_t * list_head, list_item_t * list_item) +-{ +- *list_head->ptail = list_item; +- list_head->ptail = &list_item->next; +- ++list_head->length; +-} +- +-static inline list_item_t *list_dequeue(list_head_t * list_head) +-{ +- list_item_t *list_item; +- +- if (list_is_empty(list_head)) { +- return NULL; +- } +- +- list_item = list_head->head; +- list_head->head = list_item->next; +- --list_head->length; +- if (list_head->length == 0) { +- list_head->ptail = &list_head->head; +- } +- return list_item; +-} +- +- +-#define MXM_MPICH_MQ_ID 0x8888 +-#define MXM_MPICH_MAX_ADDR_SIZE 512 +-#define MXM_MPICH_ENDPOINT_KEY "endpoint_id" +-#define MXM_MPICH_MAX_REQ 100 +-#define MXM_MPICH_MAX_IOV 3 +- +- +-/* The vc provides a generic buffer in which network modules can store +- private fields This removes all dependencies from the VC structure +- on the network module, facilitating dynamic module loading. +- */ +-typedef struct { +- mxm_conn_h mxm_conn; +- list_head_t free_queue; +-} MPID_nem_mxm_ep_t; +- +-typedef struct { +- MPIDI_VC_t *ctx; +- MPID_nem_mxm_ep_t *mxm_ep; +- int pending_sends; +-} MPID_nem_mxm_vc_area; +- +-/* macro for mxm private in VC */ +-#define VC_BASE(vcp) ((vcp) ? (MPID_nem_mxm_vc_area *)((vcp)->ch.netmod_area.padding) : NULL) +- +-/* The req provides a generic buffer in which network modules can store +- private fields This removes all dependencies from the req structure +- on the network module, facilitating dynamic module loading. */ +-typedef struct { +- list_item_t queue; +- union { +- mxm_req_base_t base; +- mxm_send_req_t send; +- mxm_recv_req_t recv; +- } item; +-} MPID_nem_mxm_req_t; +- +-typedef struct { +- MPIR_Request *ctx; +- MPID_nem_mxm_req_t *mxm_req; +- mxm_req_buffer_t *iov_buf; +- int iov_count; +- mxm_req_buffer_t tmp_buf[MXM_MPICH_MAX_IOV]; +-} MPID_nem_mxm_req_area; +- +-/* macro for mxm private in REQ */ +-#define REQ_BASE(reqp) ((reqp) ? (MPID_nem_mxm_req_area *)((reqp)->ch.netmod_area.padding) : NULL) +- +-typedef GENERIC_Q_DECL(struct MPIR_Request) MPID_nem_mxm_reqq_t; +-#define MPID_nem_mxm_queue_empty(q) GENERIC_Q_EMPTY (q) +-#define MPID_nem_mxm_queue_head(q) GENERIC_Q_HEAD (q) +-#define MPID_nem_mxm_queue_enqueue(qp, ep) do { \ +- /* add refcount so req doesn't get freed before it's dequeued */ \ +- MPIR_Request_add_ref(ep); \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, \ +- "MPID_nem_mxm_queue_enqueue req=%p (handle=%#x), queue=%p", \ +- ep, (ep)->handle, qp)); \ +- GENERIC_Q_ENQUEUE (qp, ep, dev.next); \ +- } while (0) +-#define MPID_nem_mxm_queue_dequeue(qp, ep) do { \ +- GENERIC_Q_DEQUEUE (qp, ep, dev.next); \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, \ +- "MPID_nem_mxm_queue_dequeuereq=%p (handle=%#x), queue=%p", \ +- *(ep), *(ep) ? (*(ep))->handle : -1, qp)); \ +- MPIR_Request_free(*(ep)); \ +- } while (0) +- +-typedef struct MPID_nem_mxm_module_t { +- char *runtime_version; +- const char *compiletime_version; +- mxm_context_opts_t *mxm_ctx_opts; +- mxm_ep_opts_t *mxm_ep_opts; +- mxm_h mxm_context; +- mxm_mq_h mxm_mq; +- mxm_ep_h mxm_ep; +- char mxm_ep_addr[MXM_MPICH_MAX_ADDR_SIZE]; +- size_t mxm_ep_addr_size; +- int mxm_rank; +- int mxm_np; +- MPID_nem_mxm_ep_t *endpoint; +- list_head_t free_queue; +- MPID_nem_mxm_reqq_t sreq_queue; +- struct { +- int bulk_connect; /* use bulk connect */ +- int bulk_disconnect; /* use bulk disconnect */ +- } conf; +-} MPID_nem_mxm_module_t; +- +-extern MPID_nem_mxm_module_t *mxm_obj; +- +-#define list_dequeue_mxm_req(head) \ +- MPL_container_of(list_dequeue(head), MPID_nem_mxm_req_t, queue) +-static inline void list_grow_mxm_req(list_head_t * list_head) +-{ +- MPID_nem_mxm_req_t *mxm_req = NULL; +- int count = MXM_MPICH_MAX_REQ; +- +- while (count--) { +- mxm_req = (MPID_nem_mxm_req_t *) MPL_malloc(sizeof(MPID_nem_mxm_req_t), MPL_MEM_OBJECT); +- list_enqueue(list_head, &mxm_req->queue); +- } +-} +- +-static inline void _mxm_barrier(void) +-{ +- int pmi_errno ATTRIBUTE((unused)); +- +-#ifdef USE_PMI2_API +- pmi_errno = PMI2_KVS_Fence(); +-#else +- pmi_errno = PMI_Barrier(); +-#endif +-} +- +-static inline void _mxm_to_mpi_status(mxm_error_t mxm_error, MPI_Status * mpi_status) +-{ +- switch (mxm_error) { +- case MXM_OK: +- mpi_status->MPI_ERROR = MPI_SUCCESS; +- break; +- case MXM_ERR_CANCELED: +- MPIR_STATUS_SET_CANCEL_BIT(*mpi_status, TRUE); +- mpi_status->MPI_ERROR = MPI_SUCCESS; +- break; +- case MXM_ERR_MESSAGE_TRUNCATED: +- mpi_status->MPI_ERROR = MPI_ERR_TRUNCATE; +- break; +- default: +- mpi_status->MPI_ERROR = MPI_ERR_INTERN; +- break; +- } +-} +- +-static inline int _mxm_req_test(mxm_req_base_t * req) +-{ +- return req->state == MXM_REQ_COMPLETED; +-} +- +-static inline void _mxm_progress_cb(void *user_data) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- mpi_errno = MPIDI_CH3_Progress_poke(); +- MPIR_Assert(mpi_errno == MPI_SUCCESS); +-} +- +-static inline void _mxm_req_wait(mxm_req_base_t * req) +-{ +- mxm_wait_t mxm_wreq; +- +- mxm_wreq.req = req; +- mxm_wreq.state = MXM_REQ_COMPLETED; +- mxm_wreq.progress_cb = _mxm_progress_cb; +- mxm_wreq.progress_arg = NULL; +- +- mxm_wait(&mxm_wreq); +-} +- +-static inline int _mxm_eager_threshold(void) +-{ +- return 262144; +-} +- +-/* +- * Tag management section +- */ +-static inline mxm_tag_t _mxm_tag_mpi2mxm(int mpi_tag, MPIR_Context_id_t context_id) +-{ +- mxm_tag_t mxm_tag; +- +- mxm_tag = (mpi_tag == MPI_ANY_TAG ? 0 : mpi_tag) & 0x7fffffff; +- mxm_tag |= (context_id << 31) & 0x80000000; +- +- return mxm_tag; +-} +- +-static inline int _mxm_tag_mxm2mpi(mxm_tag_t mxm_tag) +-{ +- return (mxm_tag & 0x7fffffff); +-} +- +-static inline mxm_tag_t _mxm_tag_mask(int mpi_tag) +-{ +- return (mpi_tag == MPI_ANY_TAG ? 0x80000000U : ~(MPIR_TAG_PROC_FAILURE_BIT | MPIR_TAG_ERROR_BIT)); +-} +- +-/* +- * Debugging section +- */ +- +-#define MXM_DEBUG 0 +-#define MXM_DEBUG_PREFIX "MXM" +- +- +-static inline void _dbg_mxm_out(int level, +- FILE * output_id, +- int cr, +- const char *file_name, +- const char *func_name, int line_no, const char *format, ...) +-{ +- va_list args; +- char str[200]; +- int ret; +- +- if (level < MXM_DEBUG) { +- output_id = (output_id ? output_id : stderr); +- +- va_start(args, format); +- +- ret = vsnprintf(str, sizeof(str), format, args); +- assert(-1 != ret); +- +- if (cr) { +-// ret = fprintf(output_id, "[%s #%d] %s %s:%s:%d", MXM_DEBUG_PREFIX, MPIR_Process.comm_world->rank, str, file_name, func_name, line_no); +- ret = +- fprintf(output_id, "[%s #%d] %s", MXM_DEBUG_PREFIX, MPIR_Process.comm_world->rank, +- str); +- } +- else { +- ret = fprintf(output_id, "%s", str); +- } +- assert(-1 != ret); +- +- va_end(args); +- } +-} +- +-static inline void _dbg_mxm_hexdump(void *ptr, int buflen) +-{ +- unsigned char *buf = (unsigned char *) ptr; +- char *str = NULL; +- int len = 0; +- int cur_len = 0; +- int i, j; +- +- if (!ptr) +- return; +- +- len = 80 * (buflen / 16 + 1); +- str = (char *) MPL_malloc(len, MPL_MEM_STRINGS); +- for (i = 0; i < buflen; i += 16) { +- cur_len += MPL_snprintf(str + cur_len, len - cur_len, "%06x: ", i); +- for (j = 0; j < 16; j++) +- if (i + j < buflen) +- cur_len += MPL_snprintf(str + cur_len, len - cur_len, "%02x ", buf[i + j]); +- else +- cur_len += MPL_snprintf(str + cur_len, len - cur_len, " "); +- cur_len += MPL_snprintf(str + cur_len, len - cur_len, " "); +- for (j = 0; j < 16; j++) +- if (i + j < buflen) +- cur_len += +- MPL_snprintf(str + cur_len, len - cur_len, "%c", +- isprint(buf[i + j]) ? buf[i + j] : '.'); +- cur_len += MPL_snprintf(str + cur_len, len - cur_len, "\n"); +- } +- _dbg_mxm_out(8, NULL, 1, NULL, NULL, -1, "%s", str); +- MPL_free(str); +-} +- +-static inline char *_tag_val_to_str(int tag, char *out, int max) +-{ +- if (tag == MPI_ANY_TAG) { +- MPL_strncpy(out, "MPI_ANY_TAG", max); +- } +- else { +- MPL_snprintf(out, max, "%d", tag); +- } +- return out; +-} +- +-static inline char *_rank_val_to_str(int rank, char *out, int max) +-{ +- if (rank == MPI_ANY_SOURCE) { +- MPL_strncpy(out, "MPI_ANY_SOURCE", max); +- } +- else { +- MPL_snprintf(out, max, "%d", rank); +- } +- return out; +-} +- +-static inline void _dbg_mxm_req(MPIR_Request * req) +-{ +- char tag_buf[128]; +- char rank_buf[128]; +- +- if (req) { +- _dbg_mxm_out(10, NULL, 1, NULL, NULL, -1, +- "[ctx=%#x rank=%d] req=%p ctx=%#x rank=%s tag=%s kind=%d\n", +- MPIR_Process.comm_world->context_id, MPIR_Process.comm_world->rank, +- req, req->dev.match.parts.context_id, +- _rank_val_to_str(req->dev.match.parts.rank, rank_buf, sizeof(rank_buf)), +- _tag_val_to_str(req->dev.match.parts.tag, tag_buf, sizeof(tag_buf)), +- req->kind); +- } +-} +- +- +-#if defined(MXM_DEBUG) && (MXM_DEBUG > 0) +-#define _dbg_mxm_out_buf(ptr, len) _dbg_mxm_hexdump(ptr, len) +-#define _dbg_mxm_out_req(req) _dbg_mxm_req(req) +-#define _dbg_mxm_output(level, ...) _dbg_mxm_out(level, NULL, 1, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__) +-#else +-#define _dbg_mxm_out_buf(ptr, len) ((void)0) +-#define _dbg_mxm_out_req(req) ((void)0) +-#define _dbg_mxm_output(level, ...) ((void)0) +-#endif +- +-#endif /* MXM_IMPL_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_init.c ++++ /dev/null +@@ -1,692 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portion of this code were written by Mellanox Technologies, Inc. +- * (C) 2014 Mellanox Technologies, Inc. +- * +- */ +- +- +-#ifdef USE_PMI2_API +-#include "pmi2.h" +-#else +-#include "pmi.h" +-#endif +- +-#include "mpid_nem_impl.h" +-#include "mxm_impl.h" +- +-/* +-=== BEGIN_MPI_T_CVAR_INFO_BLOCK === +- +-cvars: +- - name : MPIR_CVAR_NEMESIS_MXM_BULK_CONNECT +- category : CH3 +- type : boolean +- default : false +- class : none +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_ALL_EQ +- description : >- +- If true, force mxm to connect all processes at initialization +- time. +- +- - name : MPIR_CVAR_NEMESIS_MXM_BULK_DISCONNECT +- category : CH3 +- type : boolean +- default : false +- class : none +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_ALL_EQ +- description : >- +- If true, force mxm to disconnect all processes at +- finalization time. +- +- - name : MPIR_CVAR_NEMESIS_MXM_HUGEPAGE +- category : CH3 +- type : boolean +- default : false +- class : none +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_ALL_EQ +- description : >- +- If true, mxm tries detecting hugepage support. On HPC-X 2.3 +- and earlier, this might cause problems on Ubuntu and other +- platforms even if the system provides hugepage support. +- +-=== END_MPI_T_CVAR_INFO_BLOCK === +-*/ +- +- +-MPID_nem_netmod_funcs_t MPIDI_nem_mxm_funcs = { +- MPID_nem_mxm_init, +- MPID_nem_mxm_finalize, +-#ifdef ENABLE_CHECKPOINTING +- NULL, +- NULL, +- NULL, +-#endif +- MPID_nem_mxm_poll, +- MPID_nem_mxm_get_business_card, +- MPID_nem_mxm_connect_to_root, +- MPID_nem_mxm_vc_init, +- MPID_nem_mxm_vc_destroy, +- MPID_nem_mxm_vc_terminate, +- MPID_nem_mxm_anysource_iprobe, +- MPID_nem_mxm_anysource_improbe, +- MPID_nem_mxm_get_ordering +-}; +- +-static MPIDI_Comm_ops_t comm_ops = { +- MPID_nem_mxm_recv, /* recv_posted */ +- +- MPID_nem_mxm_send, /* send */ +- MPID_nem_mxm_send, /* rsend */ +- MPID_nem_mxm_ssend, /* ssend */ +- MPID_nem_mxm_isend, /* isend */ +- MPID_nem_mxm_isend, /* irsend */ +- MPID_nem_mxm_issend, /* issend */ +- +- NULL, /* send_init */ +- NULL, /* bsend_init */ +- NULL, /* rsend_init */ +- NULL, /* ssend_init */ +- NULL, /* startall */ +- +- MPID_nem_mxm_cancel_send, /* cancel_send */ +- MPID_nem_mxm_cancel_recv, /* cancel_recv */ +- +- MPID_nem_mxm_probe, /* probe */ +- MPID_nem_mxm_iprobe, /* iprobe */ +- MPID_nem_mxm_improbe, /* improbe */ +- NULL /* imrecv */ +-}; +- +- +-static MPID_nem_mxm_module_t _mxm_obj; +-MPID_nem_mxm_module_t *mxm_obj; +- +-static int _mxm_init(int rank, int size); +-static int _mxm_fini(void); +-static int _mxm_post_init(void); +-static int _mxm_connect(MPID_nem_mxm_ep_t * ep, const char *business_card, +- MPID_nem_mxm_vc_area * vc_area); +-static int _mxm_disconnect(MPID_nem_mxm_ep_t * ep); +-static int _mxm_add_comm(MPIR_Comm * comm, void *param); +-static int _mxm_del_comm(MPIR_Comm * comm, void *param); +-static int _mxm_conf(void); +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p) +-{ +- int r; +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_INIT); +- +- /* first make sure that our private fields in the vc and req fit into the area provided */ +- MPIR_Assert(sizeof(MPID_nem_mxm_vc_area) <= MPIDI_NEM_VC_NETMOD_AREA_LEN); +- MPIR_Assert(sizeof(MPID_nem_mxm_req_area) <= MPIDI_NEM_REQ_NETMOD_AREA_LEN); +- +- +- /* mpich-specific initialization of mxm */ +- /* check if the user is not trying to override the tls setting +- * before resetting it */ +- if (getenv("MXM_TLS") == NULL) { +- r = MPL_putenv("MXM_TLS=rc,dc,ud"); +- MPIR_ERR_CHKANDJUMP(r, mpi_errno, MPI_ERR_OTHER, "**putenv"); +- } +- +- /* [PB @ 2014-10-06] If hugepage support is not enabled, we force +- * memory allocation to go through mmap. This is mainly to +- * workaround issues in MXM with Ubuntu where the detection has +- * some issues (either because of bugs on the platform or within +- * MXM) causing errors. This can probably be deleted eventually +- * when this issue is resolved. */ +- if (MPIR_CVAR_NEMESIS_MXM_HUGEPAGE == 0) { +- if (getenv("MXM_MEM_ALLOC") == NULL) { +- r = MPL_putenv("MXM_MEM_ALLOC=mmap,libc,sysv"); +- MPIR_ERR_CHKANDJUMP(r, mpi_errno, MPI_ERR_OTHER, "**putenv"); +- } +- } +- +- +- mpi_errno = _mxm_init(pg_rank, pg_p->size); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPID_nem_mxm_get_business_card(pg_rank, bc_val_p, val_max_sz_p); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = +- MPIDI_CH3I_Register_anysource_notification(MPID_nem_mxm_anysource_posted, +- MPID_nem_mxm_anysource_matched); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPID_nem_register_initcomp_cb(_mxm_post_init); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIDI_CH3U_Comm_register_create_hook(_mxm_add_comm, NULL); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIDI_CH3U_Comm_register_destroy_hook(_mxm_del_comm, NULL); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIDI_Anysource_improbe_fn = MPID_nem_mxm_anysource_improbe; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_finalize(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_FINALIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_FINALIZE); +- +- _mxm_barrier(); +- +- mpi_errno = _mxm_fini(); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_get_business_card +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- int str_errno = MPL_STR_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_GET_BUSINESS_CARD); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_GET_BUSINESS_CARD); +- +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, MXM_MPICH_ENDPOINT_KEY, +- _mxm_obj.mxm_ep_addr, _mxm_obj.mxm_ep_addr_size); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_GET_BUSINESS_CARD); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_connect_to_root +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_CONNECT_TO_ROOT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_CONNECT_TO_ROOT); +- +- MPIR_ERR_SETFATAL(mpi_errno, MPI_ERR_OTHER, "**notimpl"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_CONNECT_TO_ROOT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_vc_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_vc_init(MPIDI_VC_t * vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH3I_VC *vc_ch = &vc->ch; +- MPID_nem_mxm_vc_area *vc_area = VC_BASE(vc); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_VC_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_VC_INIT); +- +- /* local connection is used for any source communication */ +- MPIR_Assert(MPID_nem_mem_region.rank != vc->lpid); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- (MPL_DBG_FDEST, +- "[%i]=== connecting to %i \n", MPID_nem_mem_region.rank, vc->lpid)); +- { +- char *business_card; +- int val_max_sz; +-#ifdef USE_PMI2_API +- val_max_sz = PMI2_MAX_VALLEN; +-#else +- mpi_errno = PMI_KVS_Get_value_length_max(&val_max_sz); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- business_card = (char *) MPL_malloc(val_max_sz, MPL_MEM_ADDRESS); +- mpi_errno = vc->pg->getConnInfo(vc->pg_rank, business_card, val_max_sz, vc->pg); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- vc_area->ctx = vc; +- vc_area->mxm_ep = &_mxm_obj.endpoint[vc->pg_rank]; +- mpi_errno = _mxm_connect(&_mxm_obj.endpoint[vc->pg_rank], business_card, vc_area); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPL_free(business_card); +- } +- +- MPIDI_CHANGE_VC_STATE(vc, ACTIVE); +- +- vc_area->pending_sends = 0; +- +- /* Use default rendezvous functions */ +- vc->eager_max_msg_sz = _mxm_eager_threshold(); +- vc->ready_eager_max_msg_sz = vc->eager_max_msg_sz; +- vc->rndvSend_fn = MPID_nem_lmt_RndvSend; +- vc->rndvRecv_fn = MPID_nem_lmt_RndvRecv; +- +- vc->sendNoncontig_fn = MPID_nem_mxm_SendNoncontig; +- vc->comm_ops = &comm_ops; +- +- vc_ch->iStartContigMsg = MPID_nem_mxm_iStartContigMsg; +- vc_ch->iSendContig = MPID_nem_mxm_iSendContig; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_VC_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_vc_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_vc_destroy(MPIDI_VC_t * vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_VC_DESTROY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_VC_DESTROY); +- +- /* Do nothing because +- * finalize is called before vc destroy as result it is not possible +- * to destroy endpoint here +- */ +-#if 0 +- MPID_nem_mxm_vc_area *vc_area = VC_BASE(vc); +- if (vc_area->ctx == vc) { +- mpi_errno = _mxm_disconnect(vc_area->mxm_ep); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_VC_DESTROY); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_vc_terminate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_vc_terminate(MPIDI_VC_t * vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_mxm_vc_area *vc_area = VC_BASE(vc); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_VC_TERMINATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_VC_TERMINATE); +- +- if (vc->state != MPIDI_VC_STATE_CLOSED) { +- /* VC is terminated as a result of a fault. Complete +- * outstanding sends with an error and terminate connection +- * immediately. */ +- MPIR_ERR_SET1(mpi_errno, MPI_ERR_OTHER, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- } +- else { +- while (vc_area->pending_sends > 0) +- MPID_nem_mxm_poll(FALSE); +- } +- +- mpi_errno = MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_VC_TERMINATE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_get_ordering +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_get_ordering(int *ordering) +-{ +- (*ordering) = 1; +- return MPI_SUCCESS; +-} +- +-static int _mxm_conf(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- unsigned long cur_ver; +- +- cur_ver = mxm_get_version(); +- if (cur_ver != MXM_API) { +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- (MPL_DBG_FDEST, +- "WARNING: MPICH was compiled with MXM version %d.%d but version %ld.%ld detected.", +- MXM_VERNO_MAJOR, +- MXM_VERNO_MINOR, +- (cur_ver >> MXM_MAJOR_BIT) & 0xff, (cur_ver >> MXM_MINOR_BIT) & 0xff)); +- } +- +- _mxm_obj.compiletime_version = MXM_VERNO_STRING; +-#if MXM_API >= MXM_VERSION(3,0) +- _mxm_obj.runtime_version = MPL_strdup(mxm_get_version_string()); +-#else +- _mxm_obj.runtime_version = MPL_malloc(sizeof(MXM_VERNO_STRING) + 10, MPL_MEM_STRINGS); +- snprintf(_mxm_obj.runtime_version, (sizeof(MXM_VERNO_STRING) + 9), +- "%ld.%ld", (cur_ver >> MXM_MAJOR_BIT) & 0xff, (cur_ver >> MXM_MINOR_BIT) & 0xff); +-#endif +- +- _mxm_obj.conf.bulk_connect = +- cur_ver < MXM_VERSION(3, 2) ? 0 : MPIR_CVAR_NEMESIS_MXM_BULK_CONNECT; +- _mxm_obj.conf.bulk_disconnect = +- cur_ver < MXM_VERSION(3, 2) ? 0 : MPIR_CVAR_NEMESIS_MXM_BULK_DISCONNECT; +- +- if (cur_ver < MXM_VERSION(3, 2) && +- (_mxm_obj.conf.bulk_connect || _mxm_obj.conf.bulk_disconnect)) { +- _mxm_obj.conf.bulk_connect = 0; +- _mxm_obj.conf.bulk_disconnect = 0; +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, +- (MPL_DBG_FDEST, +- "WARNING: MPICH runs with %s version of MXM that is less than 3.2, " +- "so bulk connect/disconnect cannot work properly and will be turn off.", +- _mxm_obj.runtime_version)); +- } +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static int _mxm_init(int rank, int size) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t ret = MXM_OK; +- +- ret = _mxm_conf(); +- +- ret = mxm_config_read_opts(&_mxm_obj.mxm_ctx_opts, &_mxm_obj.mxm_ep_opts, "MPICH2", NULL, 0); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_config_read_opts", +- "**mxm_config_read_opts %s", mxm_error_string(ret)); +- +- ret = mxm_init(_mxm_obj.mxm_ctx_opts, &_mxm_obj.mxm_context); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_init", "**mxm_init %s", mxm_error_string(ret)); +- +- ret = +- mxm_set_am_handler(_mxm_obj.mxm_context, MXM_MPICH_HID_ADI_MSG, MPID_nem_mxm_get_adi_msg, +- 0); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, mpi_errno, MPI_ERR_OTHER, "**mxm_set_am_handler", +- "**mxm_set_am_handler %s", mxm_error_string(ret)); +- +- ret = mxm_mq_create(_mxm_obj.mxm_context, MXM_MPICH_MQ_ID, &_mxm_obj.mxm_mq); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_mq_create", "**mxm_mq_create %s", mxm_error_string(ret)); +- +- ret = mxm_ep_create(_mxm_obj.mxm_context, _mxm_obj.mxm_ep_opts, &_mxm_obj.mxm_ep); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_ep_create", "**mxm_ep_create %s", mxm_error_string(ret)); +- +- _mxm_obj.mxm_ep_addr_size = MXM_MPICH_MAX_ADDR_SIZE; +- ret = mxm_ep_get_address(_mxm_obj.mxm_ep, &_mxm_obj.mxm_ep_addr, &_mxm_obj.mxm_ep_addr_size); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_ep_get_address", "**mxm_ep_get_address %s", mxm_error_string(ret)); +- +- _mxm_obj.mxm_rank = rank; +- _mxm_obj.mxm_np = size; +- _mxm_obj.endpoint = +- (MPID_nem_mxm_ep_t *) MPL_malloc(_mxm_obj.mxm_np * sizeof(MPID_nem_mxm_ep_t), MPL_MEM_ADDRESS); +- memset(_mxm_obj.endpoint, 0, _mxm_obj.mxm_np * sizeof(MPID_nem_mxm_ep_t)); +- +- list_init(&_mxm_obj.free_queue); +- list_grow_mxm_req(&_mxm_obj.free_queue); +- MPIR_Assert(list_length(&_mxm_obj.free_queue) == MXM_MPICH_MAX_REQ); +- +- _mxm_obj.sreq_queue.head = _mxm_obj.sreq_queue.tail = NULL; +- +- mxm_obj = &_mxm_obj; +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static int _mxm_fini(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- if (_mxm_obj.mxm_context) { +- +- while (!list_is_empty(&_mxm_obj.free_queue)) { +- MPL_free(list_dequeue(&_mxm_obj.free_queue)); +- } +- +-#if MXM_API >= MXM_VERSION(3,1) +- if (_mxm_obj.conf.bulk_disconnect) { +- mxm_ep_powerdown(_mxm_obj.mxm_ep); +- } +-#endif +- +- while (_mxm_obj.mxm_np) { +- _mxm_disconnect(&(_mxm_obj.endpoint[--_mxm_obj.mxm_np])); +- } +- +- if (_mxm_obj.endpoint) +- MPL_free(_mxm_obj.endpoint); +- +- _mxm_barrier(); +- +- if (_mxm_obj.mxm_ep) +- mxm_ep_destroy(_mxm_obj.mxm_ep); +- +- if (_mxm_obj.mxm_mq) +- mxm_mq_destroy(_mxm_obj.mxm_mq); +- +- mxm_cleanup(_mxm_obj.mxm_context); +- _mxm_obj.mxm_context = NULL; +- +- mxm_config_free_ep_opts(_mxm_obj.mxm_ep_opts); +- mxm_config_free_context_opts(_mxm_obj.mxm_ctx_opts); +- +- MPL_free(_mxm_obj.runtime_version); +- } +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static int _mxm_post_init(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- _mxm_barrier(); +- +-#if MXM_API >= MXM_VERSION(3,1) +- /* Current logic guarantees that all VCs have been initialized before post init call */ +- if (_mxm_obj.conf.bulk_connect) { +- mxm_ep_wireup(_mxm_obj.mxm_ep); +- } +-#endif +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static int _mxm_connect(MPID_nem_mxm_ep_t * ep, const char *business_card, +- MPID_nem_mxm_vc_area * vc_area) +-{ +- int mpi_errno = MPI_SUCCESS; +- int str_errno = MPL_STR_SUCCESS; +- mxm_error_t ret = MXM_OK; +- char mxm_ep_addr[MXM_MPICH_MAX_ADDR_SIZE]; +- int len = 0; +- +- str_errno = +- MPL_str_get_binary_arg(business_card, MXM_MPICH_ENDPOINT_KEY, mxm_ep_addr, +- sizeof(mxm_ep_addr), &len); +- MPIR_ERR_CHKANDJUMP(str_errno, mpi_errno, MPI_ERR_OTHER, "**buscard"); +- +- ret = mxm_ep_connect(_mxm_obj.mxm_ep, mxm_ep_addr, &ep->mxm_conn); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_ep_connect", "**mxm_ep_connect %s", mxm_error_string(ret)); +- +- mxm_conn_ctx_set(ep->mxm_conn, vc_area->ctx); +- +- list_init(&ep->free_queue); +- list_grow_mxm_req(&ep->free_queue); +- MPIR_Assert(list_length(&ep->free_queue) == MXM_MPICH_MAX_REQ); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static int _mxm_disconnect(MPID_nem_mxm_ep_t * ep) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t ret = MXM_OK; +- +- MPIR_Assert(ep); +- +- if (ep->mxm_conn) { +- ret = mxm_ep_disconnect(ep->mxm_conn); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_ep_disconnect", +- "**mxm_ep_disconnect %s", mxm_error_string(ret)); +- +- while (!list_is_empty(&ep->free_queue)) { +- MPL_free(list_dequeue(&ep->free_queue)); +- } +- } +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static int _mxm_add_comm(MPIR_Comm * comm, void *param) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t ret = MXM_OK; +- mxm_mq_h *mq_h_v; +- MPIR_CHKPMEM_DECL(1); +- +- MPIR_CHKPMEM_MALLOC(mq_h_v, mxm_mq_h *, sizeof(mxm_mq_h) * 2, mpi_errno, +- "mxm_mq_h_context_ptr", MPL_MEM_COMM); +- +- _dbg_mxm_output(6, "Add COMM comm %p (rank %d type %d context %d | %d size %d | %d) \n", +- comm, comm->rank, comm->comm_kind, +- comm->context_id, comm->recvcontext_id, comm->local_size, comm->remote_size); +- +- ret = mxm_mq_create(_mxm_obj.mxm_context, comm->recvcontext_id, &mq_h_v[0]); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_mq_create", "**mxm_mq_create %s", mxm_error_string(ret)); +- +- if (comm->recvcontext_id != comm->context_id) { +- ret = mxm_mq_create(_mxm_obj.mxm_context, comm->context_id, &mq_h_v[1]); +- MPIR_ERR_CHKANDJUMP1(ret != MXM_OK, +- mpi_errno, MPI_ERR_OTHER, +- "**mxm_mq_create", "**mxm_mq_create %s", mxm_error_string(ret)); +- } +- else +- memcpy(&mq_h_v[1], &mq_h_v[0], sizeof(mxm_mq_h)); +- +- comm->dev.ch.netmod_priv = (void *) mq_h_v; +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +-static int _mxm_del_comm(MPIR_Comm * comm, void *param) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_mq_h *mxm_mq = (mxm_mq_h *) comm->dev.ch.netmod_priv; +- +- _dbg_mxm_output(6, "Del COMM comm %p (rank %d type %d) \n", comm, comm->rank, comm->comm_kind); +- +- if (mxm_mq[1] != mxm_mq[0]) +- mxm_mq_destroy(mxm_mq[1]); +- if (mxm_mq[0]) +- mxm_mq_destroy(mxm_mq[0]); +- +- MPL_free(mxm_mq); +- +- comm->dev.ch.netmod_priv = NULL; +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c ++++ /dev/null +@@ -1,509 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portion of this code were written by Mellanox Technologies, Inc. +- * (C) 2014 Mellanox Technologies, Inc. +- * +- */ +- +- +- +-#include "mxm_impl.h" +- +-static int _mxm_poll(void); +-static int _mxm_handle_rreq(MPIR_Request * req); +-static void _mxm_recv_completion_cb(void *context); +-static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int id, mxm_mq_h mxm_mq, +- mxm_tag_t mxm_tag); +-static int _mxm_process_rdtype(MPIR_Request ** rreq_p, MPI_Datatype datatype, +- MPIR_Datatype* dt_ptr, intptr_t data_sz, const void *buf, +- int count, mxm_req_buffer_t ** iov_buf, int *iov_count); +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_poll +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_poll(int in_blocking_progress) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *req = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_POLL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_POLL); +- +- while (!MPID_nem_mxm_queue_empty(mxm_obj->sreq_queue)) { +- MPID_nem_mxm_queue_dequeue(&mxm_obj->sreq_queue, &req); +- _mxm_handle_sreq(req); +- } +- +- mpi_errno = _mxm_poll(); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_POLL); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-static int _mxm_poll(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t ret = MXM_OK; +- +- ret = mxm_progress(mxm_obj->mxm_context); +- if ((MXM_OK != ret) && (MXM_ERR_NO_PROGRESS != ret)) { +- mpi_errno = MPI_ERR_OTHER; +- goto fn_fail; +- } +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_get_adi_msg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPID_nem_mxm_get_adi_msg(mxm_conn_h conn, mxm_imm_t imm, void *data, +- size_t length, size_t offset, int last) +-{ +- MPIDI_VC_t *vc = NULL; +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "MPID_nem_mxm_get_adi_msg"); +- +- vc = mxm_conn_ctx_get(conn); +- +- _dbg_mxm_output(5, "========> Getting ADI msg (from=%d data_size %d) \n", vc->pg_rank, length); +- _dbg_mxm_out_buf(data, (length > 16 ? 16 : length)); +- +- MPID_nem_handle_pkt(vc, data, (intptr_t) (length)); +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_anysource_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPID_nem_mxm_anysource_posted(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_ANYSOURCE_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_ANYSOURCE_POSTED); +- +- _dbg_mxm_output(5, "Any Source ========> Posting req %p \n", req); +- +- mpi_errno = MPID_nem_mxm_recv(NULL, req); +- MPIR_Assert(mpi_errno == MPI_SUCCESS); +- +- _dbg_mxm_out_req(req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_ANYSOURCE_POSTED); +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_anysource_matched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_anysource_matched(MPIR_Request * req) +-{ +- mxm_error_t ret = MXM_OK; +- MPID_nem_mxm_req_area *req_area = NULL; +- int matched = FALSE; +- +- /* This function is called when an anysource request in the posted +- * receive queue is matched and dequeued see MPIDI_POSTED_RECV_DEQUEUE_HOOK(). +- * It returns 0(FALSE) if the req was not matched by mxm and non-zero(TRUE) +- * otherwise. +- * This happens +- * when the channel supports shared-memory and network communication +- * with a network capable of matching, and the same request is matched +- * by the network and, e.g., shared-memory. +- */ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_ANYSOURCE_MATCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_ANYSOURCE_MATCHED); +- +- _dbg_mxm_output(5, "Any Source ========> Matching req %p \n", req); +- +- req_area = REQ_BASE(req); +- ret = mxm_req_cancel_recv(&req_area->mxm_req->item.recv); +- mxm_req_wait(&req_area->mxm_req->item.base); +- if (req_area->mxm_req->item.base.error != MXM_ERR_CANCELED) { +- matched = TRUE; +- } +- +- _dbg_mxm_out_req(req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_ANYSOURCE_MATCHED); +- return matched; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- intptr_t data_sz; +- int dt_contig; +- MPI_Aint dt_true_lb; +- MPIR_Datatype*dt_ptr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_RECV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_RECV); +- +- MPIR_Assert(rreq); +- MPIR_Assert(((rreq->dev.match.parts.rank == MPI_ANY_SOURCE) && (vc == NULL)) || +- (vc && !vc->ch.is_local)); +- +- MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype, dt_contig, data_sz, +- dt_ptr, dt_true_lb); +- +- { +- MPIR_Context_id_t context_id = rreq->dev.match.parts.context_id; +- int tag = rreq->dev.match.parts.tag; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- +- mxm_mq_h *mq_h_v = (mxm_mq_h *) rreq->comm->dev.ch.netmod_priv; +- rreq->dev.OnDataAvail = NULL; +- rreq->dev.tmpbuf = NULL; +- rreq->ch.vc = vc; +- rreq->ch.noncontig = FALSE; +- +- _dbg_mxm_output(5, +- "Recv ========> Getting USER msg for req %p (context %d from %d tag %d size %d) \n", +- rreq, context_id, rreq->dev.match.parts.rank, tag, data_sz); +- +- vc_area = VC_BASE(vc); +- req_area = REQ_BASE(rreq); +- +- req_area->ctx = rreq; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- req_area->iov_buf[0].ptr = NULL; +- req_area->iov_buf[0].length = 0; +- +- if (dt_contig) { +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = (char *) (rreq->dev.user_buf) + dt_true_lb; +- req_area->iov_buf[0].length = data_sz; +- } +- else { +- rreq->ch.noncontig = TRUE; +- mpi_errno = _mxm_process_rdtype(&rreq, rreq->dev.datatype, dt_ptr, data_sz, +- rreq->dev.user_buf, rreq->dev.user_count, +- &req_area->iov_buf, &req_area->iov_count); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- mpi_errno = _mxm_irecv((vc_area ? vc_area->mxm_ep : NULL), req_area, +- tag, +- (rreq->comm ? mq_h_v[0] : mxm_obj->mxm_mq), _mxm_tag_mpi2mxm(tag, +- context_id)); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- if (vc) +- _dbg_mxm_out_req(rreq); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_RECV); +- return mpi_errno; +- fn_fail:ATTRIBUTE((unused)) +- goto fn_exit; +-} +- +- +-static int _mxm_handle_rreq(MPIR_Request * req) +-{ +- int complete = FALSE, found = FALSE; +- int dt_contig; +- MPI_Aint dt_true_lb ATTRIBUTE((unused)); +- intptr_t userbuf_sz; +- MPIR_Datatype*dt_ptr; +- intptr_t data_sz; +- MPID_nem_mxm_vc_area *vc_area ATTRIBUTE((unused)) = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- void *tmp_buf = NULL; +- +- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX); +- found = MPIDI_CH3U_Recvq_DP(req); +- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX); +- /* an MPI_ANY_SOURCE request may have been previously removed from the +- * CH3 queue by an FDP (find and dequeue posted) operation */ +- if (req->dev.match.parts.rank != MPI_ANY_SOURCE) { +- MPIR_Assert(found); +- } +- +- MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype, dt_contig, userbuf_sz, dt_ptr, +- dt_true_lb); +- +- vc_area = VC_BASE(req->ch.vc); +- req_area = REQ_BASE(req); +- +- _dbg_mxm_out_buf(req_area->iov_buf[0].ptr, +- (req_area->iov_buf[0].length > 16 ? 16 : req_area->iov_buf[0].length)); +- +- if (req->dev.recv_data_sz <= userbuf_sz) { +- data_sz = req->dev.recv_data_sz; +- if (req->status.MPI_ERROR == MPI_ERR_TRUNCATE) { +- req->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_TRUNCATE, "**truncate", +- "**truncate %d %d %d %d", +- req->status.MPI_SOURCE, +- req->status.MPI_TAG, req->dev.recv_data_sz, +- userbuf_sz); +- } +- } +- else { +- data_sz = userbuf_sz; +- MPIR_STATUS_SET_COUNT(req->status, userbuf_sz); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, VERBOSE, (MPL_DBG_FDEST, +- "receive buffer too small; message truncated, msg_sz=" +- PRIdPTR ", userbuf_sz=" +- PRIdPTR, req->dev.recv_data_sz, userbuf_sz)); +- req->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_TRUNCATE, "**truncate", +- "**truncate %d %d %d %d", +- req->status.MPI_SOURCE, req->status.MPI_TAG, +- req->dev.recv_data_sz, userbuf_sz); +- } +- +- if (!dt_contig) { +- intptr_t last = 0; +- +- if (req->dev.tmpbuf != NULL) { +- last = req->dev.recv_data_sz; +- MPIR_Segment_unpack(req->dev.segment_ptr, 0, &last, req->dev.tmpbuf); +- tmp_buf = req->dev.tmpbuf; +- } +- else { +- mxm_req_buffer_t *iov_buf; +- MPL_IOV *iov; +- int n_iov = 0; +- int index; +- +- last = req->dev.recv_data_sz; +- n_iov = req_area->iov_count; +- iov_buf = req_area->iov_buf; +- if (last && n_iov > 0) { +- iov = MPL_malloc(n_iov * sizeof(*iov), MPL_MEM_BUFFER); +- MPIR_Assert(iov); +- +- for (index = 0; index < n_iov; index++) { +- iov[index].MPL_IOV_BUF = iov_buf[index].ptr; +- iov[index].MPL_IOV_LEN = iov_buf[index].length; +- } +- +- MPIR_Segment_unpack_vector(req->dev.segment_ptr, req->dev.segment_first, &last, iov, +- &n_iov); +- MPL_free(iov); +- } +- if (req_area->iov_count > MXM_MPICH_MAX_IOV) { +- tmp_buf = req_area->iov_buf; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- } +- } +- if (last != data_sz) { +- MPIR_STATUS_SET_COUNT(req->status, last); +- if (req->dev.recv_data_sz <= userbuf_sz) { +- /* If the data can't be unpacked, the we have a +- * mismatch between the datatype and the amount of +- * data received. Throw away received data. +- */ +- MPIR_ERR_SETSIMPLE(req->status.MPI_ERROR, MPI_ERR_TYPE, "**dtypemismatch"); +- } +- } +- } +- +- MPIDI_CH3U_Handle_recv_req(req->ch.vc, req, &complete); +- MPIR_Assert(complete == TRUE); +- +- if (tmp_buf) +- MPL_free(tmp_buf); +- +- return complete; +-} +- +- +-static void _mxm_recv_completion_cb(void *context) +-{ +- MPIR_Request *req = (MPIR_Request *) context; +- mxm_recv_req_t *mxm_rreq; +- MPID_nem_mxm_req_area *req_area = NULL; +- +- MPIR_Assert(req); +- _dbg_mxm_out_req(req); +- +- req_area = REQ_BASE(req); +- _mxm_to_mpi_status(req_area->mxm_req->item.base.error, &req->status); +- +- mxm_rreq = &req_area->mxm_req->item.recv; +- req->status.MPI_TAG = _mxm_tag_mxm2mpi(mxm_rreq->completion.sender_tag); +- req->status.MPI_SOURCE = mxm_rreq->completion.sender_imm; +- req->dev.recv_data_sz = mxm_rreq->completion.actual_len; +- MPIR_STATUS_SET_COUNT(req->status, req->dev.recv_data_sz); +- +- if (req->ch.vc) { +- MPID_nem_mxm_vc_area *vc_area = VC_BASE(req->ch.vc); +- list_enqueue(&vc_area->mxm_ep->free_queue, &req_area->mxm_req->queue); +- } +- else { +- list_enqueue(&mxm_obj->free_queue, &req_area->mxm_req->queue); +- } +- +- _dbg_mxm_output(5, "========> %s RECV req %p status %d\n", +- (MPIR_STATUS_GET_CANCEL_BIT(req->status) ? "Canceling" : "Completing"), +- req, req->status.MPI_ERROR); +- +- if (likely(!MPIR_STATUS_GET_CANCEL_BIT(req->status))) { +- _mxm_handle_rreq(req); +- } +-} +- +- +-static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int id, mxm_mq_h mxm_mq, +- mxm_tag_t mxm_tag) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t ret = MXM_OK; +- mxm_recv_req_t *mxm_rreq; +- list_head_t *free_queue = NULL; +- +- MPIR_Assert(req); +- +- free_queue = (ep ? &ep->free_queue : &mxm_obj->free_queue); +- req->mxm_req = list_dequeue_mxm_req(free_queue); +- if (!req->mxm_req) { +- list_grow_mxm_req(free_queue); +- req->mxm_req = list_dequeue_mxm_req(free_queue); +- if (!req->mxm_req) { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "empty free queue"); +- mpi_errno = MPI_ERR_OTHER; +- goto fn_fail; +- } +- } +- mxm_rreq = &(req->mxm_req->item.recv); +- +- mxm_rreq->base.state = MXM_REQ_NEW; +- mxm_rreq->base.mq = mxm_mq; +- mxm_rreq->base.conn = (ep ? ep->mxm_conn : 0); +- mxm_rreq->base.completed_cb = _mxm_recv_completion_cb; +- mxm_rreq->base.context = req->ctx; +- +- mxm_rreq->tag = mxm_tag; +- mxm_rreq->tag_mask = _mxm_tag_mask(id); +- +- if (likely(req->iov_count == 1)) { +- mxm_rreq->base.data_type = MXM_REQ_DATA_BUFFER; +- mxm_rreq->base.data.buffer.ptr = req->iov_buf[0].ptr; +- mxm_rreq->base.data.buffer.length = req->iov_buf[0].length; +- } +- else { +- mxm_rreq->base.data_type = MXM_REQ_DATA_IOV; +- mxm_rreq->base.data.iov.vector = req->iov_buf; +- mxm_rreq->base.data.iov.count = req->iov_count; +- } +- +- ret = mxm_req_recv(mxm_rreq); +- if (MXM_OK != ret) { +- list_enqueue(free_queue, &req->mxm_req->queue); +- mpi_errno = MPI_ERR_OTHER; +- goto fn_fail; +- } +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-static int _mxm_process_rdtype(MPIR_Request ** rreq_p, MPI_Datatype datatype, +- MPIR_Datatype* dt_ptr, intptr_t data_sz, const void *buf, +- int count, mxm_req_buffer_t ** iov_buf, int *iov_count) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = *rreq_p; +- intptr_t last; +- MPL_IOV *iov; +- int n_iov = 0; +- int index; +- +- if (rreq->dev.segment_ptr == NULL) { +- rreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); +- } +- MPIR_Segment_init(buf, count, datatype, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = data_sz; +- +- last = rreq->dev.segment_size; +- MPIR_Segment_count_contig_blocks(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, +- (MPI_Aint *) & n_iov); +- MPIR_Assert(n_iov > 0); +- iov = MPL_malloc(n_iov * sizeof(*iov), MPL_MEM_BUFFER); +- MPIR_Assert(iov); +- +- last = rreq->dev.segment_size; +- MPIR_Segment_unpack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, iov, &n_iov); +- MPIR_Assert(last == rreq->dev.segment_size); +- +-#if defined(MXM_DEBUG) && (MXM_DEBUG > 0) +- _dbg_mxm_output(7, "Recv Noncontiguous data vector %i entries (free slots : %i)\n", n_iov, +- MXM_REQ_DATA_MAX_IOV); +- for (index = 0; index < n_iov; index++) { +- _dbg_mxm_output(7, "======= Recv iov[%i] = ptr : %p, len : %i \n", +- index, iov[index].MPL_IOV_BUF, iov[index].MPL_IOV_LEN); +- } +-#endif +- +- if (n_iov <= MXM_REQ_DATA_MAX_IOV) { +- if (n_iov > MXM_MPICH_MAX_IOV) { +- *iov_buf = (mxm_req_buffer_t *) MPL_malloc(n_iov * sizeof(**iov_buf), MPL_MEM_BUFFER); +- MPIR_Assert(*iov_buf); +- } +- +- for (index = 0; index < n_iov; index++) { +- (*iov_buf)[index].ptr = iov[index].MPL_IOV_BUF; +- (*iov_buf)[index].length = iov[index].MPL_IOV_LEN; +- } +- rreq->dev.tmpbuf = NULL; +- rreq->dev.tmpbuf_sz = 0; +- *iov_count = n_iov; +- } +- else { +- MPI_Aint packsize = 0; +- MPIR_Pack_size_impl(rreq->dev.user_count, rreq->dev.datatype, &packsize); +- rreq->dev.tmpbuf = MPL_malloc((size_t) packsize, MPL_MEM_BUFFER); +- MPIR_Assert(rreq->dev.tmpbuf); +- rreq->dev.tmpbuf_sz = packsize; +- (*iov_buf)[0].ptr = rreq->dev.tmpbuf; +- (*iov_buf)[0].length = (size_t) packsize; +- *iov_count = 1; +- } +- MPL_free(iov); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c ++++ /dev/null +@@ -1,219 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portion of this code were written by Mellanox Technologies, Inc. +- * (C) 2014 Mellanox Technologies, Inc. +- * +- */ +- +- +- +-#include "mxm_impl.h" +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_probe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_probe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- MPI_Status * status) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t err; +- mxm_recv_req_t mxm_req; +- mxm_mq_h *mq_h_v = (mxm_mq_h *) comm->dev.ch.netmod_priv; +- MPID_nem_mxm_vc_area *vc_area = (vc ? VC_BASE(vc) : NULL); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_PROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_PROBE); +- +- mxm_req.base.state = MXM_REQ_NEW; +- mxm_req.base.mq = mq_h_v[0]; +- mxm_req.base.conn = (vc_area ? vc_area->mxm_ep->mxm_conn : 0); +- +- mxm_req.tag = _mxm_tag_mpi2mxm(tag, comm->context_id + context_offset); +- mxm_req.tag_mask = _mxm_tag_mask(tag); +- +- do { +- err = mxm_req_probe(&mxm_req); +- _mxm_progress_cb(NULL); +- } while (err != MXM_ERR_NO_MESSAGE); +- +- if (MXM_OK == err) { +- _mxm_to_mpi_status(mxm_req.base.error, status); +- status->MPI_SOURCE = mxm_req.completion.sender_imm; +- status->MPI_TAG = _mxm_tag_mxm2mpi(mxm_req.completion.sender_tag); +- MPIR_STATUS_SET_COUNT(*status, mxm_req.completion.sender_len); +- } +- else { +- mpi_errno = MPI_ERR_INTERN; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_PROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_iprobe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPI_Status * status) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t err; +- mxm_recv_req_t mxm_req; +- mxm_mq_h *mq_h_v = (mxm_mq_h *) comm->dev.ch.netmod_priv; +- MPID_nem_mxm_vc_area *vc_area = (vc ? VC_BASE(vc) : NULL); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_IPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_IPROBE); +- +- mxm_req.base.state = MXM_REQ_NEW; +- mxm_req.base.mq = mq_h_v[0]; +- mxm_req.base.conn = (vc_area ? vc_area->mxm_ep->mxm_conn : 0); +- +- mxm_req.tag = _mxm_tag_mpi2mxm(tag, comm->context_id + context_offset); +- mxm_req.tag_mask = _mxm_tag_mask(tag); +- +- err = mxm_req_probe(&mxm_req); +- if (MXM_OK == err) { +- *flag = 1; +- _mxm_to_mpi_status(mxm_req.base.error, status); +- status->MPI_SOURCE = mxm_req.completion.sender_imm; +- status->MPI_TAG = _mxm_tag_mxm2mpi(mxm_req.completion.sender_tag); +- MPIR_STATUS_SET_COUNT(*status, mxm_req.completion.sender_len); +- } +- else if (MXM_ERR_NO_MESSAGE == err) { +- *flag = 0; +- } +- else { +- mpi_errno = MPI_ERR_INTERN; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_IPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPIR_Request ** message, MPI_Status * status) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t err; +- mxm_recv_req_t mxm_req; +- mxm_message_h mxm_msg; +- mxm_mq_h *mq_h_v = (mxm_mq_h *) comm->dev.ch.netmod_priv; +- MPID_nem_mxm_vc_area *vc_area = (vc ? VC_BASE(vc) : NULL); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MXM_IMPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MXM_IMPROBE); +- +- mxm_req.base.state = MXM_REQ_NEW; +- mxm_req.base.mq = mq_h_v[0]; +- mxm_req.base.conn = (vc_area ? vc_area->mxm_ep->mxm_conn : 0); +- +- mxm_req.tag = _mxm_tag_mpi2mxm(tag, comm->context_id + context_offset); +- mxm_req.tag_mask = _mxm_tag_mask(tag); +- +- err = mxm_req_mprobe(&mxm_req, &mxm_msg); +- if (MXM_OK == err) { +- MPIR_Request *req; +- +- *flag = 1; +- +- req = MPIR_Request_create(MPIR_REQUEST_KIND__MPROBE); +- MPIR_Object_set_ref(req, 2); +- req->comm = comm; +- MPIR_Comm_add_ref(comm); +- req->ch.vc = vc; +-// MPIDI_Request_set_sync_send_flag(req, 1); /* set this flag in case MXM_REQ_OP_SEND_SYNC*/ +- MPIDI_Request_set_msg_type(req, MPIDI_REQUEST_EAGER_MSG); +- req->dev.recv_pending_count = 1; +- +- _mxm_to_mpi_status(mxm_req.base.error, &req->status); +- req->status.MPI_TAG = _mxm_tag_mxm2mpi(mxm_req.completion.sender_tag); +- req->status.MPI_SOURCE = mxm_req.completion.sender_imm; +- req->dev.recv_data_sz = mxm_req.completion.sender_len; +- MPIR_STATUS_SET_COUNT(req->status, req->dev.recv_data_sz); +- req->dev.tmpbuf = MPL_malloc(req->dev.recv_data_sz, MPL_MEM_BUFFER); +- MPIR_Assert(req->dev.tmpbuf); +- +- mxm_req.base.completed_cb = NULL; +- mxm_req.base.context = req; +- mxm_req.base.data_type = MXM_REQ_DATA_BUFFER; +- mxm_req.base.data.buffer.ptr = req->dev.tmpbuf; +- mxm_req.base.data.buffer.length = req->dev.recv_data_sz; +- +- err = mxm_message_recv(&mxm_req, mxm_msg); +- _mxm_req_wait(&mxm_req.base); +- +- mpi_errno = MPID_Request_complete(req); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- *message = req; +- +- /* TODO: Should we change status +- * _mxm_to_mpi_status(mxm_req.base.error, status); +- */ +- status->MPI_SOURCE = req->status.MPI_SOURCE; +- status->MPI_TAG = req->status.MPI_TAG; +- MPIR_STATUS_SET_COUNT(*status, req->dev.recv_data_sz); +- +- _dbg_mxm_output(8, +- "imProbe ========> Found USER msg (context %d from %d tag %d size %d) \n", +- comm->context_id + context_offset, status->MPI_SOURCE, status->MPI_TAG, +- MPIR_STATUS_GET_COUNT(*status)); +- } +- else if (MXM_ERR_NO_MESSAGE == err) { +- *flag = 0; +- *message = NULL; +- } +- else { +- mpi_errno = MPI_ERR_INTERN; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MXM_IMPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_anysource_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag, +- MPI_Status * status) +-{ +- return MPID_nem_mxm_iprobe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, status); +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_anysource_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, +- MPIR_Request ** message, MPI_Status * status) +-{ +- return MPID_nem_mxm_improbe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, message, +- status); +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c ++++ /dev/null +@@ -1,870 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portion of this code were written by Mellanox Technologies, Inc. +- * (C) 2014 Mellanox Technologies, Inc. +- * +- */ +- +- +- +-#include "mxm_impl.h" +- +-enum { +- MXM_MPICH_ISEND, +- MXM_MPICH_ISEND_SYNC, +- MXM_MPICH_ISEND_AM +-}; +- +- +-static void _mxm_send_completion_cb(void *context); +-static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, +- int type, mxm_mq_h mxm_mq, int mxm_rank, int id, mxm_tag_t tag, int block); +-#if 0 /* Consider using this function in case non contiguous data */ +-static int _mxm_process_sdtype(MPIR_Request ** rreq_p, MPI_Datatype datatype, +- MPIR_Datatype* dt_ptr, intptr_t data_sz, const void *buf, +- int count, mxm_req_buffer_t ** iov_buf, int *iov_count); +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_iSendContig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, +- void *data, intptr_t data_sz) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_ISENDCONTIGMSG); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_ISENDCONTIGMSG); +- +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "mxm_iSendContig"); +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr); +- +- MPIR_Memcpy(&(sreq->dev.pending_pkt), (char *) hdr, sizeof(MPIDI_CH3_Pkt_t)); +- +- _dbg_mxm_output(5, +- "iSendContig ========> Sending ADI msg (to=%d type=%d) for req %p (data_size %d, %d) \n", +- vc->pg_rank, sreq->dev.pending_pkt.type, sreq, sizeof(MPIDI_CH3_Pkt_t), +- data_sz); +- +- vc_area = VC_BASE(vc); +- req_area = REQ_BASE(sreq); +- +- req_area->ctx = sreq; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- +- req_area->iov_buf[req_area->iov_count].ptr = (void *) &(sreq->dev.pending_pkt); +- req_area->iov_buf[req_area->iov_count].length = sizeof(MPIDI_CH3_Pkt_t); +- (req_area->iov_count)++; +- +- if (sreq->dev.ext_hdr_sz != 0) { +- req_area->iov_buf[req_area->iov_count].ptr = (void *) (sreq->dev.ext_hdr_ptr); +- req_area->iov_buf[req_area->iov_count].length = sreq->dev.ext_hdr_sz; +- (req_area->iov_count)++; +- } +- +- if (data_sz) { +- req_area->iov_buf[req_area->iov_count].ptr = (void *) data; +- req_area->iov_buf[req_area->iov_count].length = data_sz; +- (req_area->iov_count)++; +- } +- +- vc_area->pending_sends += 1; +- sreq->ch.vc = vc; +- sreq->ch.noncontig = FALSE; +- +- mpi_errno = _mxm_isend(vc_area->mxm_ep, req_area, MXM_MPICH_ISEND_AM, +- mxm_obj->mxm_mq, mxm_obj->mxm_rank, MXM_MPICH_HID_ADI_MSG, 0, 0); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_ISENDCONTIGMSG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_iStartContigMsg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data, +- intptr_t data_sz, MPIR_Request ** sreq_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_ISTARTCONTIGMSG); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_ISTARTCONTIGMSG); +- +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "mxm_iStartContigMsg"); +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr); +- +- /* create a request */ +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +- MPIR_Assert(sreq != NULL); +- MPIR_Object_set_ref(sreq, 2); +- MPIR_Memcpy(&(sreq->dev.pending_pkt), (char *) hdr, sizeof(MPIDI_CH3_Pkt_t)); +- sreq->kind = MPIR_REQUEST_KIND__SEND; +- sreq->dev.OnDataAvail = NULL; +- sreq->dev.tmpbuf = NULL; +- +- _dbg_mxm_output(5, +- "iStartContigMsg ========> Sending ADI msg (to=%d type=%d) for req %p (data_size %d, %d) \n", +- vc->pg_rank, sreq->dev.pending_pkt.type, sreq, sizeof(MPIDI_CH3_Pkt_t), +- data_sz); +- +- vc_area = VC_BASE(vc); +- req_area = REQ_BASE(sreq); +- +- req_area->ctx = sreq; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = (void *) &(sreq->dev.pending_pkt); +- req_area->iov_buf[0].length = sizeof(MPIDI_CH3_Pkt_t); +- if (data_sz) { +- req_area->iov_count = 2; +- req_area->iov_buf[1].ptr = (void *) data; +- req_area->iov_buf[1].length = data_sz; +- } +- +- vc_area->pending_sends += 1; +- sreq->ch.vc = vc; +- sreq->ch.noncontig = FALSE; +- +- mpi_errno = _mxm_isend(vc_area->mxm_ep, req_area, MXM_MPICH_ISEND_AM, +- mxm_obj->mxm_mq, mxm_obj->mxm_rank, MXM_MPICH_HID_ADI_MSG, 0, 0); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- *sreq_ptr = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_ISTARTCONTIGMSG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_SendNoncontig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, +- intptr_t hdr_sz) +-{ +- int mpi_errno = MPI_SUCCESS; +- intptr_t last; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_SENDNONCONTIGMSG); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_SENDNONCONTIGMSG); +- +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "MPID_nem_mxm_iSendNoncontig"); +- +- MPIR_Memcpy(&(sreq->dev.pending_pkt), (char *) hdr, sizeof(MPIDI_CH3_Pkt_t)); +- +- _dbg_mxm_output(5, +- "SendNoncontig ========> Sending ADI msg (to=%d type=%d) for req %p (data_size %d, %d) \n", +- vc->pg_rank, sreq->dev.pending_pkt.type, sreq, sizeof(MPIDI_CH3_Pkt_t), +- sreq->dev.segment_size - sreq->dev.segment_first); +- +- vc_area = VC_BASE(vc); +- req_area = REQ_BASE(sreq); +- +- req_area->ctx = sreq; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- +- req_area->iov_buf[req_area->iov_count].ptr = (void *) &(sreq->dev.pending_pkt); +- req_area->iov_buf[req_area->iov_count].length = sizeof(MPIDI_CH3_Pkt_t); +- (req_area->iov_count)++; +- +- if (sreq->dev.ext_hdr_ptr != NULL) { +- req_area->iov_buf[req_area->iov_count].ptr = (void *) (sreq->dev.ext_hdr_ptr); +- req_area->iov_buf[req_area->iov_count].length = sreq->dev.ext_hdr_sz; +- (req_area->iov_count)++; +- } +- +- last = sreq->dev.segment_size; +- +- /* NOTE: currently upper layer never pass packet with data that has +- * either "last <= 0" or "last-sreq->dev.segment_first <=0" to this +- * layer. In future, if upper layer passes such kind of packet, the +- * judgement of the following IF branch needs to be modified. */ +- MPIR_Assert(last > 0 && last - sreq->dev.segment_first > 0); +- +- if (last > 0) { +- sreq->dev.tmpbuf = MPL_malloc((size_t) (sreq->dev.segment_size - sreq->dev.segment_first), MPL_MEM_BUFFER); +- MPIR_Assert(sreq->dev.tmpbuf); +- MPIR_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, sreq->dev.tmpbuf); +- MPIR_Assert(last == sreq->dev.segment_size); +- +- req_area->iov_buf[req_area->iov_count].ptr = sreq->dev.tmpbuf; +- req_area->iov_buf[req_area->iov_count].length = last - sreq->dev.segment_first; +- (req_area->iov_count)++; +- } +- +- vc_area->pending_sends += 1; +- sreq->ch.vc = vc; +- sreq->ch.noncontig = TRUE; +- +- mpi_errno = _mxm_isend(vc_area->mxm_ep, req_area, MXM_MPICH_ISEND_AM, +- mxm_obj->mxm_mq, mxm_obj->mxm_rank, MXM_MPICH_HID_ADI_MSG, 0, 0); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_SENDNONCONTIGMSG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** sreq_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPIR_Datatype*dt_ptr; +- int dt_contig; +- intptr_t data_sz; +- MPI_Aint dt_true_lb; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- mxm_mq_h *mq_h_v = (mxm_mq_h *) comm->dev.ch.netmod_priv; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_SEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_SEND); +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- /* create a request */ +- MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit); +- MPIR_Assert(sreq != NULL); +- MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SEND); +- +- MPIDI_VC_FAI_send_seqnum(vc, seqnum); +- MPIDI_Request_set_seqnum(sreq, seqnum); +- if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) { +- MPIR_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr); +- MPIR_Datatype_ptr_add_ref(sreq->dev.datatype_ptr); +- } +- sreq->dev.partner_request = NULL; +- sreq->dev.OnDataAvail = NULL; +- sreq->dev.tmpbuf = NULL; +- sreq->ch.vc = vc; +- sreq->ch.noncontig = FALSE; +- +- _dbg_mxm_output(5, +- "Send ========> Sending USER msg for req %p (context %d to %d tag %d size %d) \n", +- sreq, comm->context_id + context_offset, rank, tag, data_sz); +- +- vc_area = VC_BASE(vc); +- req_area = REQ_BASE(sreq); +- +- req_area->ctx = sreq; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- req_area->iov_buf[0].ptr = NULL; +- req_area->iov_buf[0].length = 0; +- +- if (data_sz) { +- if (dt_contig) { +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = (char *) (buf) + dt_true_lb; +- req_area->iov_buf[0].length = data_sz; +- } +- else { +- intptr_t last; +- MPI_Aint packsize = 0; +- +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, +- "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Pack_size_impl(count, datatype, &packsize); +- +- last = data_sz; +- if (packsize > 0) { +- sreq->dev.tmpbuf = MPL_malloc((size_t) packsize, MPL_MEM_BUFFER); +- MPIR_Assert(sreq->dev.tmpbuf); +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- MPIR_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf); +- +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = sreq->dev.tmpbuf; +- req_area->iov_buf[0].length = last; +- } +- sreq->ch.noncontig = TRUE; +- } +- } +- +- vc_area->pending_sends += 1; +- +- mpi_errno = _mxm_isend(vc_area->mxm_ep, req_area, MXM_MPICH_ISEND, +- mq_h_v[1], comm->rank, tag, _mxm_tag_mpi2mxm(tag, +- comm->context_id +- + context_offset), 0); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- _dbg_mxm_out_req(sreq); +- +- fn_exit: +- *sreq_ptr = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_SEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** sreq_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPIR_Datatype*dt_ptr; +- int dt_contig; +- intptr_t data_sz; +- MPI_Aint dt_true_lb; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- mxm_mq_h *mq_h_v = (mxm_mq_h *) comm->dev.ch.netmod_priv; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_SSEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_SSEND); +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- /* create a request */ +- MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit); +- MPIR_Assert(sreq != NULL); +- MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SSEND); +- +- MPIDI_VC_FAI_send_seqnum(vc, seqnum); +- MPIDI_Request_set_seqnum(sreq, seqnum); +- if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) { +- MPIR_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr); +- MPIR_Datatype_ptr_add_ref(sreq->dev.datatype_ptr); +- } +- sreq->dev.partner_request = NULL; +- sreq->dev.OnDataAvail = NULL; +- sreq->dev.tmpbuf = NULL; +- sreq->ch.vc = vc; +- sreq->ch.noncontig = FALSE; +- +- _dbg_mxm_output(5, +- "sSend ========> Sending USER msg for req %p (context %d to %d tag %d size %d) \n", +- sreq, comm->context_id + context_offset, rank, tag, data_sz); +- +- vc_area = VC_BASE(vc); +- req_area = REQ_BASE(sreq); +- +- req_area->ctx = sreq; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- req_area->iov_buf[0].ptr = NULL; +- req_area->iov_buf[0].length = 0; +- +- if (data_sz) { +- if (dt_contig) { +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = (char *) (buf) + dt_true_lb; +- req_area->iov_buf[0].length = data_sz; +- } +- else { +- intptr_t last; +- MPI_Aint packsize = 0; +- +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, +- "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Pack_size_impl(count, datatype, &packsize); +- +- last = data_sz; +- if (packsize > 0) { +- sreq->dev.tmpbuf = MPL_malloc((size_t) packsize, MPL_MEM_BUFFER); +- MPIR_Assert(sreq->dev.tmpbuf); +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- MPIR_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf); +- +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = sreq->dev.tmpbuf; +- req_area->iov_buf[0].length = last; +- } +- sreq->ch.noncontig = TRUE; +- } +- } +- +- vc_area->pending_sends += 1; +- +- mpi_errno = _mxm_isend(vc_area->mxm_ep, req_area, MXM_MPICH_ISEND_SYNC, +- mq_h_v[1], comm->rank, tag, _mxm_tag_mpi2mxm(tag, +- comm->context_id +- + context_offset), 0); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- _dbg_mxm_out_req(sreq); +- +- fn_exit: +- *sreq_ptr = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_SSEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** sreq_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPIR_Datatype*dt_ptr; +- int dt_contig; +- intptr_t data_sz; +- MPI_Aint dt_true_lb; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- mxm_mq_h *mq_h_v = (mxm_mq_h *) comm->dev.ch.netmod_priv; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_ISEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_ISEND); +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- /* create a request */ +- MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit); +- MPIR_Assert(sreq != NULL); +- MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SEND); +- +- MPIDI_VC_FAI_send_seqnum(vc, seqnum); +- MPIDI_Request_set_seqnum(sreq, seqnum); +- if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) { +- MPIR_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr); +- MPIR_Datatype_ptr_add_ref(sreq->dev.datatype_ptr); +- } +- sreq->dev.partner_request = NULL; +- sreq->dev.OnDataAvail = NULL; +- sreq->dev.tmpbuf = NULL; +- sreq->ch.vc = vc; +- sreq->ch.noncontig = FALSE; +- +- _dbg_mxm_output(5, +- "iSend ========> Sending USER msg for req %p (context %d to %d tag %d size %d) \n", +- sreq, comm->context_id + context_offset, rank, tag, data_sz); +- +- vc_area = VC_BASE(vc); +- req_area = REQ_BASE(sreq); +- +- req_area->ctx = sreq; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- req_area->iov_buf[0].ptr = NULL; +- req_area->iov_buf[0].length = 0; +- +- if (data_sz) { +- if (dt_contig) { +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = (char *) (buf) + dt_true_lb; +- req_area->iov_buf[0].length = data_sz; +- } +- else { +- intptr_t last; +- MPI_Aint packsize = 0; +- +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, +- "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Pack_size_impl(count, datatype, &packsize); +- +- last = data_sz; +- if (packsize > 0) { +- sreq->dev.tmpbuf = MPL_malloc((size_t) packsize, MPL_MEM_BUFFER); +- MPIR_Assert(sreq->dev.tmpbuf); +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- MPIR_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf); +- +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = sreq->dev.tmpbuf; +- req_area->iov_buf[0].length = last; +- } +- sreq->ch.noncontig = TRUE; +- } +- } +- +- vc_area->pending_sends += 1; +- +- mpi_errno = _mxm_isend(vc_area->mxm_ep, req_area, MXM_MPICH_ISEND, +- mq_h_v[1], comm->rank, tag, _mxm_tag_mpi2mxm(tag, +- comm->context_id +- + context_offset), 0); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- _dbg_mxm_out_req(sreq); +- +- fn_exit: +- *sreq_ptr = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_ISEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mxm_issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** sreq_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPIR_Datatype*dt_ptr; +- int dt_contig; +- intptr_t data_sz; +- MPI_Aint dt_true_lb; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- mxm_mq_h *mq_h_v = (mxm_mq_h *) comm->dev.ch.netmod_priv; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_MXM_ISSEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_MXM_ISSEND); +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- /* create a request */ +- MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit); +- MPIR_Assert(sreq != NULL); +- MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SSEND); +- +- MPIDI_VC_FAI_send_seqnum(vc, seqnum); +- MPIDI_Request_set_seqnum(sreq, seqnum); +- if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) { +- MPIR_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr); +- MPIR_Datatype_ptr_add_ref(sreq->dev.datatype_ptr); +- } +- sreq->dev.partner_request = NULL; +- sreq->dev.OnDataAvail = NULL; +- sreq->dev.tmpbuf = NULL; +- sreq->ch.vc = vc; +- sreq->ch.noncontig = FALSE; +- +- _dbg_mxm_output(5, +- "isSend ========> Sending USER msg for req %p (context %d to %d tag %d size %d) \n", +- sreq, comm->context_id + context_offset, rank, tag, data_sz); +- +- vc_area = VC_BASE(vc); +- req_area = REQ_BASE(sreq); +- +- req_area->ctx = sreq; +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- req_area->iov_buf[0].ptr = NULL; +- req_area->iov_buf[0].length = 0; +- +- if (data_sz) { +- if (dt_contig) { +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = (char *) (buf) + dt_true_lb; +- req_area->iov_buf[0].length = data_sz; +- } +- else { +- intptr_t last; +- MPI_Aint packsize = 0; +- +- sreq->ch.noncontig = TRUE; +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, +- "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Pack_size_impl(count, datatype, &packsize); +- +- last = data_sz; +- if (packsize > 0) { +- sreq->dev.tmpbuf = MPL_malloc((size_t) packsize, MPL_MEM_BUFFER); +- MPIR_Assert(sreq->dev.tmpbuf); +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- MPIR_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf); +- +- req_area->iov_count = 1; +- req_area->iov_buf[0].ptr = sreq->dev.tmpbuf; +- req_area->iov_buf[0].length = last; +- } +- } +- } +- +- vc_area->pending_sends += 1; +- +- mpi_errno = _mxm_isend(vc_area->mxm_ep, req_area, MXM_MPICH_ISEND_SYNC, +- mq_h_v[1], comm->rank, tag, _mxm_tag_mpi2mxm(tag, +- comm->context_id +- + context_offset), 0); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- _dbg_mxm_out_req(sreq); +- +- fn_exit: +- *sreq_ptr = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_MXM_ISSEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-int _mxm_handle_sreq(MPIR_Request * req) +-{ +- int complete = FALSE; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- +- vc_area = VC_BASE(req->ch.vc); +- req_area = REQ_BASE(req); +- +- _dbg_mxm_out_buf(req_area->iov_buf[0].ptr, +- (req_area->iov_buf[0].length > 16 ? 16 : req_area->iov_buf[0].length)); +- +- vc_area->pending_sends -= 1; +- if (req->dev.tmpbuf) { +- if (req->dev.datatype_ptr || req->ch.noncontig) { +- MPL_free(req->dev.tmpbuf); +- } +- } +- +- if (req_area->iov_count > MXM_MPICH_MAX_IOV) { +- MPL_free(req_area->iov_buf); +- req_area->iov_buf = req_area->tmp_buf; +- req_area->iov_count = 0; +- } +- +- MPIDI_CH3U_Handle_send_req(req->ch.vc, req, &complete); +- MPIR_Assert(complete == TRUE); +- +- return complete; +-} +- +- +-static void _mxm_send_completion_cb(void *context) +-{ +- MPIR_Request *req = (MPIR_Request *) context; +- MPID_nem_mxm_vc_area *vc_area = NULL; +- MPID_nem_mxm_req_area *req_area = NULL; +- +- MPIR_Assert(req); +- _dbg_mxm_out_req(req); +- +- vc_area = VC_BASE(req->ch.vc); +- req_area = REQ_BASE(req); +- +- _mxm_to_mpi_status(req_area->mxm_req->item.base.error, &req->status); +- +- list_enqueue(&vc_area->mxm_ep->free_queue, &req_area->mxm_req->queue); +- +- _dbg_mxm_output(5, "========> %s SEND req %p status %d\n", +- (MPIR_STATUS_GET_CANCEL_BIT(req->status) ? "Canceling" : "Completing"), +- req, req->status.MPI_ERROR); +- +- if (likely(!MPIR_STATUS_GET_CANCEL_BIT(req->status))) { +- MPID_nem_mxm_queue_enqueue(&mxm_obj->sreq_queue, req); +- } +-} +- +- +-static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, +- int type, mxm_mq_h mxm_mq, int mxm_rank, int id, mxm_tag_t mxm_tag, int block) +-{ +- int mpi_errno = MPI_SUCCESS; +- mxm_error_t ret = MXM_OK; +- mxm_send_req_t *mxm_sreq; +- list_head_t *free_queue = NULL; +- +- MPIR_Assert(ep); +- MPIR_Assert(req); +- +- free_queue = &ep->free_queue; +- req->mxm_req = list_dequeue_mxm_req(free_queue); +- if (!req->mxm_req) { +- list_grow_mxm_req(free_queue); +- req->mxm_req = list_dequeue_mxm_req(free_queue); +- if (!req->mxm_req) { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "empty free queue"); +- mpi_errno = MPI_ERR_OTHER; +- goto fn_fail; +- } +- } +- mxm_sreq = &(req->mxm_req->item.send); +- +- mxm_sreq->base.state = MXM_REQ_NEW; +- mxm_sreq->base.mq = mxm_mq; +- mxm_sreq->base.conn = ep->mxm_conn; +- mxm_sreq->base.completed_cb = _mxm_send_completion_cb; +- mxm_sreq->base.context = req->ctx; +- +- if (type == MXM_MPICH_ISEND_AM) { +- mxm_sreq->opcode = MXM_REQ_OP_AM; +- mxm_sreq->flags = 0; +- +- mxm_sreq->op.am.hid = id; +- mxm_sreq->op.am.imm_data = mxm_rank; +- } +- else if (type == MXM_MPICH_ISEND_SYNC) { +- mxm_sreq->opcode = MXM_REQ_OP_SEND_SYNC; +- mxm_sreq->flags = 0; +- +- mxm_sreq->op.send.tag = mxm_tag; +- mxm_sreq->op.send.imm_data = mxm_rank; +- } +- else { +- mxm_sreq->opcode = MXM_REQ_OP_SEND; +- mxm_sreq->flags = 0; +- +- mxm_sreq->op.send.tag = mxm_tag; +- mxm_sreq->op.send.imm_data = mxm_rank; +- } +- +- if (likely(req->iov_count == 1)) { +- mxm_sreq->base.data_type = MXM_REQ_DATA_BUFFER; +- mxm_sreq->base.data.buffer.ptr = req->iov_buf[0].ptr; +- mxm_sreq->base.data.buffer.length = req->iov_buf[0].length; +- } +- else { +- mxm_sreq->base.data_type = MXM_REQ_DATA_IOV; +- mxm_sreq->base.data.iov.vector = req->iov_buf; +- mxm_sreq->base.data.iov.count = req->iov_count; +- } +- +- ret = mxm_req_send(mxm_sreq); +- if (MXM_OK != ret) { +- list_enqueue(free_queue, &req->mxm_req->queue); +- mpi_errno = MPI_ERR_OTHER; +- goto fn_fail; +- } +- +- if (block) +- _mxm_req_wait(&mxm_sreq->base); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#if 0 /* Consider using this function in case non contiguous data */ +-static int _mxm_process_sdtype(MPIR_Request ** sreq_p, MPI_Datatype datatype, +- MPIR_Datatype* dt_ptr, intptr_t data_sz, const void *buf, +- int count, mxm_req_buffer_t ** iov_buf, int *iov_count) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = *sreq_p; +- intptr_t last; +- MPL_IOV *iov; +- int n_iov = 0; +- int index; +- int size_to_copy = 0; +- +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); +- +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = data_sz; +- +- last = sreq->dev.segment_size; +- MPIR_Segment_count_contig_blocks(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, +- (MPI_Aint *) & n_iov); +- MPIR_Assert(n_iov > 0); +- iov = MPL_malloc(n_iov * sizeof(*iov)); +- MPIR_Assert(iov); +- +- last = sreq->dev.segment_size; +- MPIR_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, iov, &n_iov); +- MPIR_Assert(last == sreq->dev.segment_size); +- +-#if defined(MXM_DEBUG) && (MXM_DEBUG > 0) +- _dbg_mxm_output(7, "Send Noncontiguous data vector %i entries (free slots : %i)\n", n_iov, +- MXM_REQ_DATA_MAX_IOV); +- for (index = 0; index < n_iov; index++) { +- _dbg_mxm_output(7, "======= Recv iov[%i] = ptr : %p, len : %i \n", +- index, iov[index].MPL_IOV_BUF, iov[index].MPL_IOV_LEN); +- } +-#endif +- +- if (n_iov > MXM_MPICH_MAX_IOV) { +- *iov_buf = (mxm_req_buffer_t *) MPL_malloc(n_iov * sizeof(**iov_buf)); +- MPIR_Assert(*iov_buf); +- } +- +- for (index = 0; index < n_iov; index++) { +- if (index < (MXM_REQ_DATA_MAX_IOV - 1)) { +- (*iov_buf)[index].ptr = iov[index].MPL_IOV_BUF; +- (*iov_buf)[index].length = iov[index].MPL_IOV_LEN; +- } +- else { +- size_to_copy += iov[index].MPL_IOV_LEN; +- } +- } +- +- if (size_to_copy == 0) { +- sreq->dev.tmpbuf = NULL; +- sreq->dev.tmpbuf_sz = 0; +- *iov_count = n_iov; +- } +- else { +- int offset = 0; +- sreq->dev.tmpbuf = MPL_malloc(size_to_copy); +- sreq->dev.tmpbuf_sz = size_to_copy; +- MPIR_Assert(sreq->dev.tmpbuf); +- for (index = (MXM_REQ_DATA_MAX_IOV - 1); index < n_iov; index++) { +- MPIR_Memcpy((char *) (sreq->dev.tmpbuf) + offset, iov[index].MPL_IOV_BUF, +- iov[index].MPL_IOV_LEN); +- offset += iov[index].MPL_IOV_LEN; +- } +- (*iov_buf)[MXM_REQ_DATA_MAX_IOV - 1].ptr = sreq->dev.tmpbuf; +- (*iov_buf)[MXM_REQ_DATA_MAX_IOV - 1].length = size_to_copy; +- *iov_count = MXM_REQ_DATA_MAX_IOV; +- } +- MPL_free(iov); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +-#endif +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/subconfigure.m4 ++++ /dev/null +@@ -1,44 +0,0 @@ +-[#] start of __file__ +-dnl MPICH_SUBCFG_AFTER=src/mpid/ch3/channels/nemesis +- +-AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ +- AM_COND_IF([BUILD_CH3_NEMESIS],[ +- for net in $nemesis_networks ; do +- AS_CASE([$net],[mxm],[build_nemesis_netmod_mxm=yes]) +- done +- ]) +- AM_CONDITIONAL([BUILD_NEMESIS_NETMOD_MXM],[test "X$build_nemesis_netmod_mxm" = "Xyes"]) +-])dnl +- +-AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ +-AM_COND_IF([BUILD_NEMESIS_NETMOD_MXM],[ +- AC_MSG_NOTICE([RUNNING CONFIGURE FOR ch3:nemesis:mxm]) +- +- PAC_SET_HEADER_LIB_PATH(mxm) +- PAC_PUSH_FLAG(LIBS) +- PAC_CHECK_HEADER_LIB_FATAL(mxm, [mxm/api/mxm_api.h], mxm, mxm_get_version) +- PAC_POP_FLAG(LIBS) +- AC_CHECK_HEADER([mxm/api/mxm_api.h], , [ +- AC_MSG_ERROR(['mxm/api/mxm_api.h not found.']) +- ]) +- AC_TRY_COMPILE([ +- #include "mxm/api/mxm_version.h" +-#ifndef MXM_VERSION +-#error "MXM Version is less than 1.5, please upgrade" +-#endif +-# +-#if MXM_API < MXM_VERSION(3,1) +-#error "MXM Version is less than 3.1, please upgrade" +-#endif], +- [int a=0;], +- mxm_api_version=yes, +- mxm_api_version=no) +- if test "$mxm_api_version" = no ; then +- AC_MSG_ERROR(['MXM API version Problem. Are you running a recent version of MXM (at least 3.1)?']) +- fi; +- AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions]) +- PAC_APPEND_FLAG([-lmxm],[WRAPPER_LIBS]) +- +-])dnl end AM_COND_IF(BUILD_NEMESIS_NETMOD_MXM,...) +-])dnl end _BODY +-[#] end of __file__ +--- a/src/mpid/ch3/channels/nemesis/netmod/none/none.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/none/none.c +@@ -7,8 +7,7 @@ + #include "mpid_nem_impl.h" + + +-static int nm_init(MPIDI_PG_t *pg_p, int pg_rank, +- char **bc_val_p, int *val_max_sz_p) ++static int nm_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p) + { + return MPI_SUCCESS; + } +@@ -19,40 +18,40 @@ static int nm_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p) + return MPI_SUCCESS; + } + +-static int nm_connect_to_root(const char *business_card, MPIDI_VC_t *new_vc) ++static int nm_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) + { + MPIR_Assertp(0); + return MPI_SUCCESS; + } + +-static int nm_vc_init(MPIDI_VC_t *vc) ++static int nm_vc_init(MPIDI_VC_t * vc) + { + return MPI_SUCCESS; + } + +-static int nm_vc_destroy(MPIDI_VC_t *vc) ++static int nm_vc_destroy(MPIDI_VC_t * vc) + { + return MPI_SUCCESS; + } + +-static int nm_vc_terminate(MPIDI_VC_t *vc) ++static int nm_vc_terminate(MPIDI_VC_t * vc) + { + return MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED); + } + + static int nm_poll(int in_blocking_poll) +-{ ++{ + return MPI_SUCCESS; + } + + static int nm_ckpt_shutdown(void) + { +- return MPI_SUCCESS; ++ return MPI_SUCCESS; + } + + static int nm_finalize(void) + { +- return nm_ckpt_shutdown(); ++ return nm_ckpt_shutdown(); + } + + MPID_nem_netmod_funcs_t MPIDI_nem_none_funcs = { +@@ -64,5 +63,5 @@ MPID_nem_netmod_funcs_t MPIDI_nem_none_funcs = { + nm_vc_init, + nm_vc_destroy, + nm_vc_terminate, +- NULL /* anysource iprobe */ ++ NULL /* anysource iprobe */ + }; +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c +@@ -20,8 +20,6 @@ + /* data contained in the process group, and a source. The source/pg number */ + /* is enough to look up the VC. */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(ofi_tag_to_vc) + static inline MPIDI_VC_t *ofi_wc_to_vc(cq_tagged_entry_t * wc) + { + int pgid = 0, port = 0; +@@ -29,7 +27,8 @@ static inline MPIDI_VC_t *ofi_wc_to_vc(cq_tagged_entry_t * wc) + MPIDI_PG_t *pg = NULL; + uint64_t match_bits = wc->tag; + int wc_pgid; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_OFI_TAG_TO_VC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_OFI_TAG_TO_VC); + if (gl_data.api_set == API_SET_1) { + wc_pgid = get_pgid(match_bits); + } else { +@@ -50,8 +49,7 @@ static inline MPIDI_VC_t *ofi_wc_to_vc(cq_tagged_entry_t * wc) + if (NULL == vc) { + MPIR_Assertp(0); + } +- } +- else { ++ } else { + /* -------------------------------------------------------------------- */ + /* If there are no connection management VC's, this is the normal path */ + /* Generate the PG number has from each known process group compare to */ +@@ -67,12 +65,11 @@ static inline MPIDI_VC_t *ofi_wc_to_vc(cq_tagged_entry_t * wc) + } + if (pg) { + MPIDI_PG_Get_vc(pg, get_psource(match_bits), &vc); +- } +- else { ++ } else { + MPIR_Assert(0); + } + } +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_OFI_TAG_TO_VC); + return vc; + } + +@@ -92,8 +89,6 @@ static inline MPIDI_VC_t *ofi_wc_to_vc(cq_tagged_entry_t * wc) + /* by the upper layers. We handle the cm vc's slightly differently than */ + /* other VC's because they may not be part of a process group. */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_conn_req_callback) + static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPIR_Request * rreq) + { + int ret, len, mpi_errno = MPI_SUCCESS; +@@ -103,19 +98,20 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPIR_Re + char *addr = NULL; + fi_addr_t direct_addr; + +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_CONN_REQ_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_CONN_REQ_CALLBACK); + + MPIR_Memcpy(bc, rreq->dev.user_buf, wc->len); + bc[wc->len] = '\0'; + MPIR_Assert(gl_data.conn_req == rreq); + FI_RC_RETRY(fi_trecv(gl_data.endpoint, +- gl_data.conn_req->dev.user_buf, +- MPIDI_OFI_KVSAPPSTRLEN, +- gl_data.mr, +- FI_ADDR_UNSPEC, +- MPIDI_OFI_CONN_REQ, +- GET_RCD_IGNORE_MASK(), +- (void *) &(REQ_OFI(gl_data.conn_req)->ofi_context)), trecv); ++ gl_data.conn_req->dev.user_buf, ++ MPIDI_OFI_KVSAPPSTRLEN, ++ gl_data.mr, ++ FI_ADDR_UNSPEC, ++ MPIDI_OFI_CONN_REQ, ++ GET_RCD_IGNORE_MASK(), ++ (void *) &(REQ_OFI(gl_data.conn_req)->ofi_context)), trecv); + + addr = MPL_malloc(gl_data.bound_addrlen, MPL_MEM_ADDRESS); + MPIR_Assertp(addr); +@@ -128,7 +124,7 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPIR_Re + ret = MPL_str_get_binary_arg(bc, "OFI", addr, gl_data.bound_addrlen, &len); + MPIR_ERR_CHKANDJUMP((ret != MPL_STR_SUCCESS && ret != MPL_STR_NOMEM) || + (size_t) len != gl_data.bound_addrlen, +- mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); ++ mpi_errno, MPI_ERR_OTHER, "**business_card"); + + FI_RC(fi_av_insert(gl_data.av, addr, 1, &direct_addr, 0ULL, NULL), avmap); + VC_OFI(vc)->direct_addr = direct_addr; +@@ -141,11 +137,10 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPIR_Re + MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT; + fn_exit: + MPL_free(addr); +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_CONN_REQ_CALLBACK); + return mpi_errno; + fn_fail: +- if (vc) +- MPL_free(vc); ++ MPL_free(vc); + goto fn_exit; + } + +@@ -156,23 +151,27 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPIR_Re + /* Notify CH3 that we have an incoming packet (if cc hits 1). Otherwise */ + /* decrement the ref counter via request completion */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_handle_packet) + static inline int MPID_nem_ofi_handle_packet(cq_tagged_entry_t * wc ATTRIBUTE((unused)), + MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_VC_t *vc; + +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_HANDLE_PACKET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_HANDLE_PACKET); + if (MPIR_cc_get(rreq->cc) == 1) { +- vc = REQ_OFI(rreq)->vc; +- MPIR_Assert(vc); +- MPIDI_CH3I_NM_OFI_RC(MPID_nem_handle_pkt(vc, REQ_OFI(rreq)->pack_buffer, REQ_OFI(rreq)->pack_buffer_size)); +- MPL_free(REQ_OFI(rreq)->pack_buffer); ++ vc = REQ_OFI(rreq)->vc; ++ MPIR_Assert(vc); ++ MPIDI_CH3I_NM_OFI_RC(MPID_nem_handle_pkt ++ (vc, REQ_OFI(rreq)->pack_buffer, REQ_OFI(rreq)->pack_buffer_size)); ++ MPL_free(REQ_OFI(rreq)->pack_buffer); + } + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(rreq)); +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_HANDLE_PACKET); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + /* ------------------------------------------------------------------------ */ +@@ -180,15 +179,18 @@ static inline int MPID_nem_ofi_handle_packet(cq_tagged_entry_t * wc ATTRIBUTE((u + /* A wrapper around MPID_nem_ofi_handle_packet that decrements */ + /* the parent request's counter, and cleans up the CTS request */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_cts_send_callback) + static inline int MPID_nem_ofi_cts_send_callback(cq_tagged_entry_t * wc, MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_CTS_SEND_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_CTS_SEND_CALLBACK); + MPIDI_CH3I_NM_OFI_RC(MPID_nem_ofi_handle_packet(wc, REQ_OFI(sreq)->parent)); + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(sreq)); +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_CTS_SEND_CALLBACK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + /* ------------------------------------------------------------------------ */ +@@ -200,8 +202,6 @@ static inline int MPID_nem_ofi_cts_send_callback(cq_tagged_entry_t * wc, MPIR_Re + /* * Create a child request and send the CTS packet */ + /* * Re-Post the RTS receive and handler to handle the next message */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_preposted_callback) + static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPIR_Request * rreq) + { + int c, mpi_errno = MPI_SUCCESS; +@@ -209,7 +209,8 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPIR_R + char *pack_buffer = NULL; + MPIDI_VC_t *vc; + MPIR_Request *new_rreq, *sreq; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_PREPOSTED_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_PREPOSTED_CALLBACK); + + vc = ofi_wc_to_vc(wc); + MPIR_Assert(vc); +@@ -220,8 +221,8 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPIR_R + /* If the pack buffer is NULL, let OFI handle the truncation + * in the progress loop + */ +- if(pack_buffer == NULL) +- pkt_len = 0; ++ if (pack_buffer == NULL) ++ pkt_len = 0; + c = 1; + MPID_nem_ofi_create_req(&new_rreq, 1); + MPIR_cc_incr(new_rreq->cc_ptr, &c); +@@ -232,11 +233,12 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPIR_R + REQ_OFI(new_rreq)->pack_buffer = pack_buffer; + REQ_OFI(new_rreq)->pack_buffer_size = pkt_len; + FI_RC_RETRY(fi_trecv(gl_data.endpoint, +- REQ_OFI(new_rreq)->pack_buffer, +- REQ_OFI(new_rreq)->pack_buffer_size, +- gl_data.mr, +- VC_OFI(vc)->direct_addr, +- wc->tag | MPIDI_OFI_MSG_CTS | MPIDI_OFI_MSG_DATA, 0, &(REQ_OFI(new_rreq)->ofi_context)), trecv); ++ REQ_OFI(new_rreq)->pack_buffer, ++ REQ_OFI(new_rreq)->pack_buffer_size, ++ gl_data.mr, ++ VC_OFI(vc)->direct_addr, ++ wc->tag | MPIDI_OFI_MSG_CTS | MPIDI_OFI_MSG_DATA, 0, ++ &(REQ_OFI(new_rreq)->ofi_context)), trecv); + + MPID_nem_ofi_create_req(&sreq, 1); + sreq->dev.OnDataAvail = NULL; +@@ -244,45 +246,50 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPIR_R + REQ_OFI(sreq)->event_callback = MPID_nem_ofi_cts_send_callback; + REQ_OFI(sreq)->parent = new_rreq; + FI_RC_RETRY(fi_tsend(gl_data.endpoint, +- NULL, +- 0, +- gl_data.mr, +- VC_OFI(vc)->direct_addr, +- wc->tag | MPIDI_OFI_MSG_CTS, &(REQ_OFI(sreq)->ofi_context)), tsend); ++ NULL, ++ 0, ++ gl_data.mr, ++ VC_OFI(vc)->direct_addr, ++ wc->tag | MPIDI_OFI_MSG_CTS, &(REQ_OFI(sreq)->ofi_context)), tsend); + MPIR_Assert(gl_data.persistent_req == rreq); + + FI_RC_RETRY(fi_trecv(gl_data.endpoint, +- &REQ_OFI(rreq)->msg_bytes, +- sizeof REQ_OFI(rreq)->msg_bytes, +- gl_data.mr, +- FI_ADDR_UNSPEC, +- MPIDI_OFI_MSG_RTS, +- GET_RCD_IGNORE_MASK(), +- &(REQ_OFI(rreq)->ofi_context)), trecv); ++ &REQ_OFI(rreq)->msg_bytes, ++ sizeof REQ_OFI(rreq)->msg_bytes, ++ gl_data.mr, ++ FI_ADDR_UNSPEC, ++ MPIDI_OFI_MSG_RTS, ++ GET_RCD_IGNORE_MASK(), &(REQ_OFI(rreq)->ofi_context)), trecv); + /* Return a proper error to MPI to indicate out of memory condition */ + MPIR_ERR_CHKANDJUMP1(pack_buffer == NULL, mpi_errno, MPI_ERR_OTHER, + "**nomem", "**nomem %s", "Pack Buffer alloc"); +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_PREPOSTED_CALLBACK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + /* ------------------------------------------------------------------------ */ + /* MPID_nem_ofi_connect_to_root_callback */ + /* Complete and clean up the request */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_connect_to_root_callback) + int MPID_nem_ofi_connect_to_root_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)), + MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_CONNECT_TO_ROOT_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_CONNECT_TO_ROOT_CALLBACK); + +- if (REQ_OFI(sreq)->pack_buffer) +- MPL_free(REQ_OFI(sreq)->pack_buffer); ++ MPL_free(REQ_OFI(sreq)->pack_buffer); + + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(sreq)); + +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_CONNECT_TO_ROOT_CALLBACK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + /* ------------------------------------------------------------------------ */ +@@ -291,25 +298,24 @@ int MPID_nem_ofi_connect_to_root_callback(cq_tagged_entry_t * wc ATTRIBUTE((unus + /* requests and a persistent data request to handle rendezvous SendContig */ + /* messages. */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_cm_init) + int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused))) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *persistent_req, *conn_req; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_CM_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_CM_INIT); + + /* ------------------------------------- */ + /* Set up CH3 and netmod data structures */ + /* ------------------------------------- */ + if (gl_data.api_set == API_SET_1) { +- MPIDI_CH3I_NM_OFI_RC(MPIDI_CH3I_Register_anysource_notification(MPID_nem_ofi_anysource_posted, +- MPID_nem_ofi_anysource_matched)); ++ MPIDI_CH3I_NM_OFI_RC(MPIDI_CH3I_Register_anysource_notification ++ (MPID_nem_ofi_anysource_posted, MPID_nem_ofi_anysource_matched)); + MPIDI_Anysource_iprobe_fn = MPID_nem_ofi_anysource_iprobe; + MPIDI_Anysource_improbe_fn = MPID_nem_ofi_anysource_improbe; + } else { +- MPIDI_CH3I_NM_OFI_RC(MPIDI_CH3I_Register_anysource_notification(MPID_nem_ofi_anysource_posted_2, +- MPID_nem_ofi_anysource_matched)); ++ MPIDI_CH3I_NM_OFI_RC(MPIDI_CH3I_Register_anysource_notification ++ (MPID_nem_ofi_anysource_posted_2, MPID_nem_ofi_anysource_matched)); + MPIDI_Anysource_iprobe_fn = MPID_nem_ofi_anysource_iprobe_2; + MPIDI_Anysource_improbe_fn = MPID_nem_ofi_anysource_improbe_2; + } +@@ -324,13 +330,13 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused))) + REQ_OFI(persistent_req)->vc = NULL; + REQ_OFI(persistent_req)->event_callback = MPID_nem_ofi_preposted_callback; + FI_RC_RETRY(fi_trecv(gl_data.endpoint, +- &REQ_OFI(persistent_req)->msg_bytes, +- sizeof REQ_OFI(persistent_req)->msg_bytes, +- gl_data.mr, +- FI_ADDR_UNSPEC, +- MPIDI_OFI_MSG_RTS, +- GET_RCD_IGNORE_MASK(), +- (void *) &(REQ_OFI(persistent_req)->ofi_context)), trecv); ++ &REQ_OFI(persistent_req)->msg_bytes, ++ sizeof REQ_OFI(persistent_req)->msg_bytes, ++ gl_data.mr, ++ FI_ADDR_UNSPEC, ++ MPIDI_OFI_MSG_RTS, ++ GET_RCD_IGNORE_MASK(), ++ (void *) &(REQ_OFI(persistent_req)->ofi_context)), trecv); + gl_data.persistent_req = persistent_req; + + /* --------------------------------- */ +@@ -343,18 +349,17 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused))) + REQ_OFI(conn_req)->vc = NULL; /* We don't know the source yet */ + REQ_OFI(conn_req)->event_callback = MPID_nem_ofi_conn_req_callback; + FI_RC_RETRY(fi_trecv(gl_data.endpoint, +- conn_req->dev.user_buf, +- MPIDI_OFI_KVSAPPSTRLEN, +- gl_data.mr, +- FI_ADDR_UNSPEC, +- MPIDI_OFI_CONN_REQ, +- GET_RCD_IGNORE_MASK(), +- (void *) &(REQ_OFI(conn_req)->ofi_context)), trecv); ++ conn_req->dev.user_buf, ++ MPIDI_OFI_KVSAPPSTRLEN, ++ gl_data.mr, ++ FI_ADDR_UNSPEC, ++ MPIDI_OFI_CONN_REQ, ++ GET_RCD_IGNORE_MASK(), (void *) &(REQ_OFI(conn_req)->ofi_context)), trecv); + gl_data.conn_req = conn_req; + + + fn_exit: +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_CM_INIT); + return mpi_errno; + + fn_fail: +@@ -365,12 +370,11 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused))) + /* MPID_nem_ofi_cm_finalize */ + /* Clean up and cancle the requests initiated by the cm_init routine */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_cm_finalize) + int MPID_nem_ofi_cm_finalize() + { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_CM_FINALIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_CM_FINALIZE); + FI_RC(fi_cancel((fid_t) gl_data.endpoint, + &(REQ_OFI(gl_data.persistent_req)->ofi_context)), cancel); + MPIR_STATUS_SET_CANCEL_BIT(gl_data.persistent_req->status, TRUE); +@@ -382,7 +386,11 @@ int MPID_nem_ofi_cm_finalize() + MPIR_STATUS_SET_CANCEL_BIT(gl_data.conn_req->status, TRUE); + MPIR_STATUS_SET_COUNT(gl_data.conn_req->status, 0); + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(gl_data.conn_req)); +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_CM_FINALIZE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + /* ------------------------------------------------------------------------ */ +@@ -392,14 +400,13 @@ int MPID_nem_ofi_cm_finalize() + /* the fabric address name. */ + /* * Use fi_av_insert to register the address name with OFI */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_vc_connect) + int MPID_nem_ofi_vc_connect(MPIDI_VC_t * vc) + { + int len, ret, mpi_errno = MPI_SUCCESS; + char bc[MPIDI_OFI_KVSAPPSTRLEN], *addr = NULL; + +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_VC_CONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_VC_CONNECT); + addr = MPL_malloc(gl_data.bound_addrlen, MPL_MEM_ADDRESS); + MPIR_Assert(addr); + MPIR_Assert(1 != VC_OFI(vc)->ready); +@@ -412,32 +419,31 @@ int MPID_nem_ofi_vc_connect(MPIDI_VC_t * vc) + ret = MPL_str_get_binary_arg(bc, "OFI", addr, gl_data.bound_addrlen, &len); + MPIR_ERR_CHKANDJUMP((ret != MPL_STR_SUCCESS && ret != MPL_STR_NOMEM) || + (size_t) len != gl_data.bound_addrlen, +- mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); ++ mpi_errno, MPI_ERR_OTHER, "**business_card"); + FI_RC(fi_av_insert(gl_data.av, addr, 1, &(VC_OFI(vc)->direct_addr), 0ULL, NULL), avmap); + VC_OFI(vc)->ready = 1; + + fn_exit: +- if (addr) +- MPL_free(addr); +- END_FUNC(FCNAME); ++ MPL_free(addr); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_VC_CONNECT); + return mpi_errno; + + fn_fail: + goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_vc_init) + int MPID_nem_ofi_vc_init(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3I_VC *const vc_ch = &vc->ch; + MPID_nem_ofi_vc_t *const vc_ofi = VC_OFI(vc); + +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_VC_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_VC_INIT); + vc->sendNoncontig_fn = MPID_nem_ofi_SendNoncontig; + vc_ch->iStartContigMsg = MPID_nem_ofi_iStartContigMsg; + vc_ch->iSendContig = MPID_nem_ofi_iSendContig; ++ vc_ch->iSendIov = MPID_nem_ofi_iSendIov; + vc_ch->next = NULL; + vc_ch->prev = NULL; + vc_ofi->is_cmvc = 0; +@@ -447,10 +453,9 @@ int MPID_nem_ofi_vc_init(MPIDI_VC_t * vc) + + if (NULL == vc->pg) { + vc_ofi->is_cmvc = 1; ++ } else { + } +- else { +- } +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_VC_INIT); + return mpi_errno; + } + +@@ -459,11 +464,10 @@ int MPID_nem_ofi_vc_init(MPIDI_VC_t * vc) + /* MPID_nem_ofi_vc_terminate */ + /* TODO: Verify this code has no leaks */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_vc_destroy) + int MPID_nem_ofi_vc_destroy(MPIDI_VC_t * vc) + { +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_VC_DESTROY); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_VC_DESTROY); + if (gl_data.cm_vcs && vc && (VC_OFI(vc)->is_cmvc == 1)) { + if (vc->pg != NULL) { + printf("ERROR: VC Destroy (%p) pg = %s\n", vc, (char *) vc->pg->id); +@@ -477,28 +481,29 @@ int MPID_nem_ofi_vc_destroy(MPIDI_VC_t * vc) + + if (VC_OFI(prev)->next == vc) { + VC_OFI(prev)->next = VC_OFI(vc)->next; +- } +- else if (vc == gl_data.cm_vcs) { ++ } else if (vc == gl_data.cm_vcs) { + gl_data.cm_vcs = VC_OFI(vc)->next; +- } +- else { ++ } else { + MPIR_Assert(0); + } + } + VC_OFI(vc)->ready = 0; +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_VC_DESTROY); + return MPI_SUCCESS; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_vc_terminate) + int MPID_nem_ofi_vc_terminate(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_VC_TERMINATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_VC_TERMINATE); + MPIDI_CH3I_NM_OFI_RC(MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED)); + VC_OFI(vc)->ready = 0; +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_VC_TERMINATE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + +@@ -517,8 +522,6 @@ int MPID_nem_ofi_vc_terminate(MPIDI_VC_t * vc) + /* are not part of the process group, so they require special handling */ + /* during the SendContig family of routines. */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(nm_connect_to_root) + int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) + { + int len, ret, mpi_errno = MPI_SUCCESS, str_errno = MPI_SUCCESS; +@@ -527,7 +530,8 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) + MPIR_Request *sreq; + uint64_t conn_req_send_bits; + +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NM_CONNECT_TO_ROOT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NM_CONNECT_TO_ROOT); + addr = MPL_malloc(gl_data.bound_addrlen, MPL_MEM_ADDRESS); + bc = MPL_malloc(MPIDI_OFI_KVSAPPSTRLEN, MPL_MEM_ADDRESS); + MPIR_Assertp(addr); +@@ -541,13 +545,14 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) + ret = MPL_str_get_binary_arg(business_card, "OFI", addr, gl_data.bound_addrlen, &len); + MPIR_ERR_CHKANDJUMP((ret != MPL_STR_SUCCESS && ret != MPL_STR_NOMEM) || + (size_t) len != gl_data.bound_addrlen, +- mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); ++ mpi_errno, MPI_ERR_OTHER, "**business_card"); + FI_RC(fi_av_insert(gl_data.av, addr, 1, &(VC_OFI(new_vc)->direct_addr), 0ULL, NULL), avmap); + + VC_OFI(new_vc)->ready = 1; + str_errno = MPL_str_add_int_arg(&bc, &my_bc_len, "tag", new_vc->port_name_tag); + MPIR_ERR_CHKANDJUMP(str_errno, mpi_errno, MPI_ERR_OTHER, "**argstr_port_name_tag"); +- MPIDI_CH3I_NM_OFI_RC(MPID_nem_ofi_get_business_card(MPIR_Process.comm_world->rank, &bc, &my_bc_len)); ++ MPIDI_CH3I_NM_OFI_RC(MPID_nem_ofi_get_business_card ++ (MPIR_Process.comm_world->rank, &bc, &my_bc_len)); + my_bc_len = MPIDI_OFI_KVSAPPSTRLEN - my_bc_len; + + MPID_nem_ofi_create_req(&sreq, 1); +@@ -559,50 +564,50 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) + if (gl_data.api_set == API_SET_1) { + conn_req_send_bits = init_sendtag(0, MPIR_Process.comm_world->rank, 0, MPIDI_OFI_CONN_REQ); + FI_RC_RETRY(fi_tsend(gl_data.endpoint, +- REQ_OFI(sreq)->pack_buffer, +- my_bc_len, +- gl_data.mr, +- VC_OFI(new_vc)->direct_addr, +- conn_req_send_bits, &(REQ_OFI(sreq)->ofi_context)), tsend); ++ REQ_OFI(sreq)->pack_buffer, ++ my_bc_len, ++ gl_data.mr, ++ VC_OFI(new_vc)->direct_addr, ++ conn_req_send_bits, &(REQ_OFI(sreq)->ofi_context)), tsend); + } else { + conn_req_send_bits = init_sendtag_2(0, 0, MPIDI_OFI_CONN_REQ); + FI_RC_RETRY(fi_tsenddata(gl_data.endpoint, +- REQ_OFI(sreq)->pack_buffer, +- my_bc_len, +- gl_data.mr, +- MPIR_Process.comm_world->rank, +- VC_OFI(new_vc)->direct_addr, +- conn_req_send_bits, &(REQ_OFI(sreq)->ofi_context)), tsend); ++ REQ_OFI(sreq)->pack_buffer, ++ my_bc_len, ++ gl_data.mr, ++ MPIR_Process.comm_world->rank, ++ VC_OFI(new_vc)->direct_addr, ++ conn_req_send_bits, &(REQ_OFI(sreq)->ofi_context)), tsend); + } + MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL); + VC_OFI(new_vc)->is_cmvc = 1; + VC_OFI(new_vc)->next = gl_data.cm_vcs; + gl_data.cm_vcs = new_vc; + fn_exit: +- if (addr) +- MPL_free(addr); +- END_FUNC(FCNAME); ++ MPL_free(addr); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NM_CONNECT_TO_ROOT); + return mpi_errno; + fn_fail: +- if (my_bc) +- MPL_free(my_bc); ++ MPL_free(my_bc); + goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_get_business_card) + int MPID_nem_ofi_get_business_card(int my_rank ATTRIBUTE((unused)), + char **bc_val_p, int *val_max_sz_p) + { + int mpi_errno = MPI_SUCCESS, str_errno = MPL_STR_SUCCESS; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_GET_BUSINESS_CARD); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_GET_BUSINESS_CARD); + str_errno = MPL_str_add_binary_arg(bc_val_p, +- val_max_sz_p, +- "OFI", +- (char *) &gl_data.bound_addr, gl_data.bound_addrlen); ++ val_max_sz_p, ++ "OFI", (char *) &gl_data.bound_addr, gl_data.bound_addrlen); + if (str_errno) { + MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); + } +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_GET_BUSINESS_CARD); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h +@@ -70,25 +70,25 @@ typedef int (*req_fn) (MPIDI_VC_t *, MPIR_Request *, int *); + /* Global Object for state tracking */ + /* ******************************** */ + typedef struct { +- char bound_addr[OFI_MAX_ADDR_LEN]; /* This ranks bound address */ +- size_t bound_addrlen; /* length of the bound address */ +- struct fid_fabric *fabric; /* fabric object */ +- struct fid_domain *domain; /* domain object */ +- struct fid_ep *endpoint; /* endpoint object */ +- struct fid_cq *cq; /* completion queue */ +- struct fid_av *av; /* address vector */ +- struct fid_mr *mr; /* memory region */ +- size_t iov_limit; /* Max send iovec limit */ +- size_t max_buffered_send; /* Buffered send threshold */ +- int rts_cts_in_flight; /* Count of incompleted */ +- /* RTS-CTS-DATA exchanges */ +- int api_set; /* Used OFI API for send */ +- /* operations */ +- MPIR_Request *persistent_req; /* Unexpected request queue */ +- MPIR_Request *conn_req; /* Connection request */ +- MPIDI_PG_t *pg_p; /* MPI Process group */ +- MPIDI_VC_t *cm_vcs; /* temporary VC's */ +-} MPID_nem_ofi_global_t __attribute__ ((aligned (MPID_NEM_CACHE_LINE_LEN))); ++ char bound_addr[OFI_MAX_ADDR_LEN]; /* This ranks bound address */ ++ size_t bound_addrlen; /* length of the bound address */ ++ struct fid_fabric *fabric; /* fabric object */ ++ struct fid_domain *domain; /* domain object */ ++ struct fid_ep *endpoint; /* endpoint object */ ++ struct fid_cq *cq; /* completion queue */ ++ struct fid_av *av; /* address vector */ ++ struct fid_mr *mr; /* memory region */ ++ size_t iov_limit; /* Max send iovec limit */ ++ size_t max_buffered_send; /* Buffered send threshold */ ++ int rts_cts_in_flight; /* Count of incompleted */ ++ /* RTS-CTS-DATA exchanges */ ++ int api_set; /* Used OFI API for send */ ++ /* operations */ ++ MPIR_Request *persistent_req; /* Unexpected request queue */ ++ MPIR_Request *conn_req; /* Connection request */ ++ MPIDI_PG_t *pg_p; /* MPI Process group */ ++ MPIDI_VC_t *cm_vcs; /* temporary VC's */ ++} MPID_nem_ofi_global_t __attribute__ ((aligned(MPID_NEM_CACHE_LINE_LEN))); + + /* ******************************** */ + /* Device channel specific data */ +@@ -110,10 +110,10 @@ typedef struct { + context_t ofi_context; /* Context Object */ + void *addr; /* OFI Address */ + event_callback_fn event_callback; /* Callback Event */ +- char *pack_buffer; /* MPI Pack Buffer */ ++ char *pack_buffer; /* MPI Pack Buffer */ + size_t pack_buffer_size; /* Pack buffer size */ + size_t msg_bytes; /* msg api bytes */ +- int iov_count; /* Number of iovecs */ ++ int iov_count; /* Number of iovecs */ + void *real_hdr; /* Extended header */ + int match_state; /* State of the match */ + int req_started; /* Request state */ +@@ -127,27 +127,11 @@ typedef struct { + /* ******************************** */ + /* Logging and function macros */ + /* ******************************** */ +-#undef FUNCNAME +-#define FUNCNAME nothing +-#define BEGIN_FUNC(FUNCNAME) \ +- MPIR_FUNC_VERBOSE_STATE_DECL(FUNCNAME); \ +- MPIR_FUNC_VERBOSE_ENTER(FUNCNAME); +-#define END_FUNC(FUNCNAME) \ +- MPIR_FUNC_VERBOSE_EXIT(FUNCNAME); +-#define END_FUNC_RC(FUNCNAME) \ +- fn_exit: \ +- MPIR_FUNC_VERBOSE_EXIT(FUNCNAME); \ +- return mpi_errno; \ +-fn_fail: \ +- goto fn_exit; +- + #define __SHORT_FILE__ \ + (strrchr(__FILE__,'/') \ + ? strrchr(__FILE__,'/')+1 \ + : __FILE__ \ + ) +-#define OFI_COMPILE_TIME_ASSERT(expr_) \ +- do { switch(0) { case 0: case (expr_): default: break; } } while (0) + + #define FI_RC(FUNC,STR) \ + do \ +@@ -160,7 +144,7 @@ fn_fail: \ + "**ofi_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + fi_strerror(-_ret)); \ + } while (0) + +@@ -169,7 +153,7 @@ fn_fail: \ + ssize_t _ret; \ + do { \ + _ret = FUNC; \ +- if(likely(_ret==0)) break; \ ++ if (likely(_ret==0)) break; \ + MPIR_ERR_##CHKANDJUMP4(_ret != -FI_EAGAIN, \ + mpi_errno, \ + MPI_ERR_OTHER, \ +@@ -177,10 +161,10 @@ fn_fail: \ + "**ofi_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + fi_strerror(-_ret)); \ + mpi_errno = MPID_nem_ofi_poll(0); \ +- if(mpi_errno != MPI_SUCCESS) \ ++ if (mpi_errno != MPI_SUCCESS) \ + MPIR_ERR_POP(mpi_errno); \ + } while (_ret == -FI_EAGAIN); \ + } while (0) +@@ -197,7 +181,7 @@ fn_fail: \ + "**ofi_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + #STR); \ + } while (0) + +@@ -267,7 +251,7 @@ static inline int MPID_nem_ofi_create_req_lw(MPIR_Request ** request, int refcnt + * instructions since a good compiler will discard the kind and cc + * setting in the above request create anyway */ + req->kind = MPIR_REQUEST_KIND__SEND; +- MPIR_cc_set(&req->cc, 0); // request is already completed ++ MPIR_cc_set(&req->cc, 0); // request is already completed + + *request = req; + return mpi_errno; +@@ -280,43 +264,45 @@ static inline int MPID_nem_ofi_create_req_lw(MPIR_Request ** request, int refcnt + _ret _fc_name(__VA_ARGS__); \ + _ret _fc_name##_2(__VA_ARGS__); + +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_recv_posted, struct MPIDI_VC *vc, struct MPIR_Request *req); ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_recv_posted, struct MPIDI_VC * vc, ++ struct MPIR_Request * req); + +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_send, struct MPIDI_VC *vc, const void *buf, MPI_Aint count,\ +- MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm,\ ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_send, struct MPIDI_VC *vc, const void *buf, MPI_Aint count, ++ MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm, + int context_offset, struct MPIR_Request **request); +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_isend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count,\ +- MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm,\ ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_isend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count, ++ MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm, + int context_offset, struct MPIR_Request **request); +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_ssend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count,\ ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_ssend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count, + MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm, + int context_offset, struct MPIR_Request **request); +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_issend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count,\ +- MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm,\ ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_issend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count, ++ MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm, + int context_offset, struct MPIR_Request **request); + int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc, struct MPIR_Request *sreq); + int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc, struct MPIR_Request *rreq); + +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_iprobe, struct MPIDI_VC *vc, int source, int tag, MPIR_Comm * comm, +- int context_offset, int *flag, MPI_Status * status); +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_improbe,struct MPIDI_VC *vc, int source, int tag, MPIR_Comm * comm, +- int context_offset, int *flag, MPIR_Request ** message, ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_iprobe, struct MPIDI_VC *vc, int source, int tag, ++ MPIR_Comm * comm, int context_offset, int *flag, MPI_Status * status); ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_improbe, struct MPIDI_VC *vc, int source, int tag, ++ MPIR_Comm * comm, int context_offset, int *flag, MPIR_Request ** message, + MPI_Status * status); +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_anysource_iprobe,int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPI_Status * status); +-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_anysource_improbe,int tag, MPIR_Comm * comm, int context_offset, +- int *flag, MPIR_Request ** message, MPI_Status * status); ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_anysource_iprobe, int tag, MPIR_Comm * comm, ++ int context_offset, int *flag, MPI_Status * status); ++DECLARE_TWO_API_SETS(int, MPID_nem_ofi_anysource_improbe, int tag, MPIR_Comm * comm, ++ int context_offset, int *flag, MPIR_Request ** message, MPI_Status * status); + DECLARE_TWO_API_SETS(void, MPID_nem_ofi_anysource_posted, MPIR_Request * rreq); + + int MPID_nem_ofi_anysource_matched(MPIR_Request * rreq); + int MPID_nem_ofi_send_data(cq_tagged_entry_t * wc, MPIR_Request * sreq); +-int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, +- void *hdr, intptr_t hdr_sz); ++int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, ++ MPL_IOV * hdr_iov, int n_hdr_iov); + int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, + void *data, intptr_t data_sz, MPIR_Request ** sreq_ptr); + int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, + intptr_t hdr_sz, void *data, intptr_t data_sz); +- ++int MPID_nem_ofi_iSendIov(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, ++ MPL_IOV * iov, int n_iov); + /* ************************************************************************** */ + /* OFI utility functions : not exposed as a netmod public API */ + /* ************************************************************************** */ +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c +@@ -25,10 +25,8 @@ cvars: + scope : MPI_T_SCOPE_LOCAL + description : >- + If non-null, choose an OFI provider by name. If using with the CH4 +- device and using a provider that supports an older version of the +- libfabric API then the default version of the installed library, +- specifying the OFI version via the appropriate CVARs is also +- recommended. ++ device and using an older libfabric installation than the recommended ++ version to accompany this MPICH version, unexpected results may occur. + + - name : MPIR_CVAR_OFI_DUMP_PROVIDERS + category : DEVELOPER +@@ -42,8 +40,6 @@ cvars: + + === END_MPI_T_CVAR_INFO_BLOCK === + */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_init) + int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p) + { + int ret, fi_version, i, len, pmi_errno; +@@ -56,7 +52,8 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + fi_addr_t *fi_addrs = NULL; + MPIDI_VC_t *vc; + +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_INIT); + MPIR_CHKLMEM_DECL(2); + + compile_time_checking(); +@@ -81,10 +78,10 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + /* We expect to register all memory up front for use with this */ + /* endpoint, so the netmod requires dynamic memory regions */ + /* ------------------------------------------------------------------------ */ +- hints = fi_allocinfo(); +- hints->mode = FI_CONTEXT; +- hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */ +- hints->caps = FI_TAGGED; /* Tag matching interface */ ++ hints = fi_allocinfo(); ++ hints->mode = FI_CONTEXT; ++ hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */ ++ hints->caps = FI_TAGGED; /* Tag matching interface */ + hints->tx_attr->msg_order = FI_ORDER_SAS; + hints->rx_attr->msg_order = FI_ORDER_SAS; + +@@ -103,23 +100,22 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + /* remote node or service. this does not necessarily allocate resources. */ + /* Pass NULL for name/service because we want a list of providers supported */ + /* ------------------------------------------------------------------------ */ +- hints->domain_attr->threading = FI_THREAD_ENDPOINT; ++ hints->domain_attr->threading = FI_THREAD_ENDPOINT; + hints->domain_attr->control_progress = FI_PROGRESS_AUTO; +- hints->domain_attr->data_progress = FI_PROGRESS_AUTO; ++ hints->domain_attr->data_progress = FI_PROGRESS_AUTO; + char *provname; +- provname = MPIR_CVAR_OFI_USE_PROVIDER? +- MPL_strdup(MPIR_CVAR_OFI_USE_PROVIDER):NULL; +- hints->fabric_attr->prov_name = provname; +- FI_RC(fi_getinfo(fi_version, /* Interface version requested */ +- NULL, /* Optional name or fabric to resolve */ +- NULL, /* Service name or port number to request */ +- 0ULL, /* Flag: node/service specify local address */ +- hints, /* In: Hints to filter available providers */ +- &prov_tagged), /* Out: List of providers that match hints */ ++ provname = MPIR_CVAR_OFI_USE_PROVIDER ? MPL_strdup(MPIR_CVAR_OFI_USE_PROVIDER) : NULL; ++ hints->fabric_attr->prov_name = provname; ++ FI_RC(fi_getinfo(fi_version, /* Interface version requested */ ++ NULL, /* Optional name or fabric to resolve */ ++ NULL, /* Service name or port number to request */ ++ 0ULL, /* Flag: node/service specify local address */ ++ hints, /* In: Hints to filter available providers */ ++ &prov_tagged), /* Out: List of providers that match hints */ + getinfo); + MPIR_ERR_CHKANDJUMP4(prov_tagged == NULL, mpi_errno, MPI_ERR_OTHER, + "**ofi_getinfo", "**ofi_getinfo %s %d %s %s", +- __SHORT_FILE__, __LINE__, FCNAME, "No tag matching provider found"); ++ __SHORT_FILE__, __LINE__, __func__, "No tag matching provider found"); + /* ------------------------------------------------------------------------ */ + /* Open fabric */ + /* The getinfo struct returns a fabric attribute struct that can be used to */ +@@ -128,9 +124,9 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + /* returns a list. see man fi_fabric for details */ + /* ------------------------------------------------------------------------ */ + dump_and_choose_providers(prov_tagged, &prov_use); +- FI_RC(fi_fabric(prov_use->fabric_attr, /* In: Fabric attributes */ +- &gl_data.fabric, /* Out: Fabric descriptor */ +- NULL), openfabric); /* Context: fabric events */ ++ FI_RC(fi_fabric(prov_use->fabric_attr, /* In: Fabric attributes */ ++ &gl_data.fabric, /* Out: Fabric descriptor */ ++ NULL), openfabric); /* Context: fabric events */ + + gl_data.iov_limit = prov_use->tx_attr->iov_limit; + gl_data.max_buffered_send = prov_use->tx_attr->inject_size; +@@ -146,7 +142,7 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + /* In this case, we want remote completion to be set by default */ + /* ------------------------------------------------------------------------ */ + FI_RC(fi_domain(gl_data.fabric, /* In: Fabric object */ +- prov_use, /* In: default domain attributes */ ++ prov_use, /* In: default domain attributes */ + &gl_data.domain, /* Out: domain object */ + NULL), opendomain); /* Context: Domain events */ + +@@ -157,10 +153,10 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + /* completion queues, etc. */ + /* see man fi_endpoint for more details */ + /* ------------------------------------------------------------------------ */ +- FI_RC(fi_endpoint(gl_data.domain, /* In: Domain Object */ +- prov_use, /* In: Configuration object */ +- &gl_data.endpoint, /* Out: Endpoint Object */ +- NULL), openep); /* Context: endpoint events */ ++ FI_RC(fi_endpoint(gl_data.domain, /* In: Domain Object */ ++ prov_use, /* In: Configuration object */ ++ &gl_data.endpoint, /* Out: Endpoint Object */ ++ NULL), openep); /* Context: endpoint events */ + + /* ------------------------------------------------------------------------ */ + /* Create the objects that will be bound to the endpoint. */ +@@ -175,14 +171,14 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + memset(&cq_attr, 0, sizeof(cq_attr)); + cq_attr.format = FI_CQ_FORMAT_TAGGED; + FI_RC(fi_cq_open(gl_data.domain, /* In: Domain Object */ +- &cq_attr, /* In: Configuration object */ ++ &cq_attr, /* In: Configuration object */ + &gl_data.cq, /* Out: CQ Object */ + NULL), opencq); /* Context: CQ events */ + + memset(&av_attr, 0, sizeof(av_attr)); +- av_attr.type = FI_AV_MAP; /* Mapped addressing mode */ ++ av_attr.type = FI_AV_MAP; /* Mapped addressing mode */ + FI_RC(fi_av_open(gl_data.domain, /* In: Domain Object */ +- &av_attr, /* In: Configuration object */ ++ &av_attr, /* In: Configuration object */ + &gl_data.av, /* Out: AV Object */ + NULL), avopen); /* Context: AV events */ + +@@ -201,10 +197,8 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + /* --------------------------- */ + /* Free providers info */ + /* --------------------------- */ +- if(provname) { +- MPL_free(provname); +- hints->fabric_attr->prov_name = NULL; +- } ++ MPL_free(provname); ++ hints->fabric_attr->prov_name = NULL; + + fi_freeinfo(hints); + fi_freeinfo(prov_use); +@@ -250,18 +244,19 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + /* from KVS and store them in local */ + /* table */ + /* --------------------------------- */ +- MPIR_CHKLMEM_MALLOC(addrs, char *, pg_p->size * gl_data.bound_addrlen, mpi_errno, "addrs", MPL_MEM_ADDRESS); ++ MPIR_CHKLMEM_MALLOC(addrs, char *, pg_p->size * gl_data.bound_addrlen, mpi_errno, "addrs", ++ MPL_MEM_ADDRESS); + + for (i = 0; i < pg_p->size; ++i) { + MPL_snprintf(key, sizeof(key), "OFI-%d", i); + + PMI_RC(PMI_KVS_Get(kvsname, key, bc, MPIDI_OFI_KVSAPPSTRLEN), pmi); + ret = MPL_str_get_binary_arg(bc, "OFI", +- (char *) &addrs[i * gl_data.bound_addrlen], +- gl_data.bound_addrlen, &len); ++ (char *) &addrs[i * gl_data.bound_addrlen], ++ gl_data.bound_addrlen, &len); + MPIR_ERR_CHKANDJUMP((ret != MPL_STR_SUCCESS && ret != MPL_STR_NOMEM) || + (size_t) len != gl_data.bound_addrlen, +- mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); ++ mpi_errno, MPI_ERR_OTHER, "**business_card"); + } + + /* ---------------------------------------------------- */ +@@ -292,24 +287,22 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_ + /* --------------------------------------------- */ + MPIDI_CH3I_NM_OFI_RC(MPID_nem_ofi_cm_init(pg_p, pg_rank)); + fn_exit: +- if (fi_addrs) +- MPL_free(fi_addrs); ++ MPL_free(fi_addrs); + MPIR_CHKLMEM_FREEALL(); +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_INIT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_finalize) + int MPID_nem_ofi_finalize(void) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Errflag_t ret = MPIR_ERR_NONE; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_FINALIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_FINALIZE); + +- while(gl_data.rts_cts_in_flight) { ++ while (gl_data.rts_cts_in_flight) { + MPID_nem_ofi_poll(0); + } + /* --------------------------------------------- */ +@@ -324,11 +317,13 @@ int MPID_nem_ofi_finalize(void) + FI_RC(fi_close((fid_t) gl_data.cq), cqclose); + FI_RC(fi_close((fid_t) gl_data.domain), domainclose); + FI_RC(fi_close((fid_t) gl_data.fabric), fabricclose); +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_FINALIZE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_get_ordering) + int MPID_nem_ofi_get_ordering(int *ordering) + { + (*ordering) = 1; +@@ -337,9 +332,9 @@ int MPID_nem_ofi_get_ordering(int *ordering) + + static inline int compile_time_checking() + { +- OFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_ofi_vc_t) <= MPIDI_NEM_VC_NETMOD_AREA_LEN); +- OFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_ofi_req_t) <= MPIDI_NEM_REQ_NETMOD_AREA_LEN); +- OFI_COMPILE_TIME_ASSERT(sizeof(iovec_t) == sizeof(MPL_IOV)); ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPID_nem_ofi_vc_t) <= MPIDI_NEM_VC_NETMOD_AREA_LEN); ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPID_nem_ofi_req_t) <= MPIDI_NEM_REQ_NETMOD_AREA_LEN); ++ MPL_COMPILE_TIME_ASSERT(sizeof(iovec_t) == sizeof(MPL_IOV)); + MPIR_Assert(((void *) &(((iovec_t *) 0)->iov_base)) == + ((void *) &(((MPL_IOV *) 0)->MPL_IOV_BUF))); + MPIR_Assert(((void *) &(((iovec_t *) 0)->iov_len)) == +@@ -369,8 +364,10 @@ static inline int compile_time_checking() + MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_avclose", "**ofi_avclose %s %d %s %s", a, b, a, a); + MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_epclose", "**ofi_epclose %s %d %s %s", a, b, a, a); + MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_cqclose", "**ofi_cqclose %s %d %s %s", a, b, a, a); +- MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_fabricclose", "**ofi_fabricclose %s %d %s %s", a, b, a,a); +- MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_domainclose", "**ofi_domainclose %s %d %s %s", a, b, a,a); ++ MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_fabricclose", "**ofi_fabricclose %s %d %s %s", a, b, a, ++ a); ++ MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_domainclose", "**ofi_domainclose %s %d %s %s", a, b, a, ++ a); + MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_peek", "**ofi_peek %s %d %s %s", a, b, a, a); + MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_poll", "**ofi_poll %s %d %s %s", a, b, a, a); + MPIR_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_cancel", "**ofi_cancel %s %d %s %s", a, b, a, a); +@@ -381,15 +378,15 @@ static inline int compile_time_checking() + + static inline int dump_and_choose_providers(info_t * prov, info_t ** prov_use) + { +- info_t *p = prov; +- int i = 0; +- *prov_use = prov; +- if (MPIR_CVAR_OFI_DUMP_PROVIDERS) { +- fprintf(stdout, "Dumping Providers(first=%p):\n", prov); +- while(p) { +- fprintf(stdout, "%s", fi_tostr(p, FI_TYPE_INFO)); +- p=p->next; ++ info_t *p = prov; ++ int i = 0; ++ *prov_use = prov; ++ if (MPIR_CVAR_OFI_DUMP_PROVIDERS) { ++ fprintf(stdout, "Dumping Providers(first=%p):\n", prov); ++ while (p) { ++ fprintf(stdout, "%s", fi_tostr(p, FI_TYPE_INFO)); ++ p = p->next; ++ } + } +- } +- return i; ++ return i; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c +@@ -44,6 +44,7 @@ + /* iSendContig */ + /* SendNoncontig */ + /* iStartContigMsg */ ++/* iSendIov */ + /* These routines differ slightly in their behaviors, but can share common */ + /* code to perform the send. START_COMM provides that common code, which */ + /* is based on a tagged rendezvous message. */ +@@ -115,47 +116,47 @@ + /* Handles SEND-side events only. We cannot rely on wc->tag field being */ + /* set for these events, so we must use the TAG stored in the sreq. */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_data_callback) + static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPIR_Request * sreq) + { + int complete = 0, mpi_errno = MPI_SUCCESS; + MPIDI_VC_t *vc; + req_fn reqFn; + uint64_t tag = 0; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_DATA_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_DATA_CALLBACK); + switch (REQ_OFI(sreq)->tag & MPIDI_OFI_PROTOCOL_MASK) { +- case MPIDI_OFI_MSG_CTS | MPIDI_OFI_MSG_RTS | MPIDI_OFI_MSG_DATA: +- /* Verify request is complete prior to freeing buffers. +- * Multiple DATA events may arrive because we need +- * to store updated TAG values in the sreq. +- */ +- if (MPIR_cc_get(sreq->cc) == 1) { +- if (REQ_OFI(sreq)->pack_buffer) ++ case MPIDI_OFI_MSG_CTS | MPIDI_OFI_MSG_RTS | MPIDI_OFI_MSG_DATA: ++ /* Verify request is complete prior to freeing buffers. ++ * Multiple DATA events may arrive because we need ++ * to store updated TAG values in the sreq. ++ */ ++ if (MPIR_cc_get(sreq->cc) == 1) { + MPL_free(REQ_OFI(sreq)->pack_buffer); + +- if (REQ_OFI(sreq)->real_hdr) + MPL_free(REQ_OFI(sreq)->real_hdr); + +- reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) { ++ reqFn = sreq->dev.OnDataAvail; ++ if (!reqFn) { ++ MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(sreq)); ++ } else { ++ vc = REQ_OFI(sreq)->vc; ++ MPIDI_CH3I_NM_OFI_RC(reqFn(vc, sreq, &complete)); ++ } ++ gl_data.rts_cts_in_flight--; ++ ++ } else { + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(sreq)); + } +- else { +- vc = REQ_OFI(sreq)->vc; +- MPIDI_CH3I_NM_OFI_RC(reqFn(vc, sreq, &complete)); +- } +- gl_data.rts_cts_in_flight--; +- +- } else { ++ break; ++ case MPIDI_OFI_MSG_RTS: + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(sreq)); +- } +- break; +- case MPIDI_OFI_MSG_RTS: +- MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(sreq)); +- break; ++ break; + } +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_DATA_CALLBACK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + /* ------------------------------------------------------------------------ */ +@@ -164,55 +165,55 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPIR_Request * sre + /* Handles RECV-side events only. We rely on wc->tag field being set for */ + /* these events. */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_cts_recv_callback) + static int MPID_nem_ofi_cts_recv_callback(cq_tagged_entry_t * wc, MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *preq; + MPIDI_VC_t *vc; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_CTS_RECV_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_CTS_RECV_CALLBACK); + preq = REQ_OFI(rreq)->parent; + switch (wc->tag & MPIDI_OFI_PROTOCOL_MASK) { +- case MPIDI_OFI_MSG_CTS | MPIDI_OFI_MSG_RTS: +- vc = REQ_OFI(preq)->vc; +- /* store tag in the request for SEND-side event processing */ +- REQ_OFI(preq)->tag = wc->tag | MPIDI_OFI_MSG_DATA; +- if(REQ_OFI(preq)->pack_buffer) { +- FI_RC_RETRY(fi_tsend(gl_data.endpoint, +- REQ_OFI(preq)->pack_buffer, +- REQ_OFI(preq)->pack_buffer_size, +- gl_data.mr, +- VC_OFI(vc)->direct_addr, +- REQ_OFI(preq)->tag, +- (void *) &(REQ_OFI(preq)->ofi_context)), tsend); +- } else { +- struct fi_msg_tagged msg; +- void *desc = NULL; +- msg.msg_iov = REQ_OFI(preq)->iov; +- msg.desc = &desc; +- msg.iov_count = REQ_OFI(preq)->iov_count; +- msg.addr = VC_OFI(vc)->direct_addr; +- msg.tag = REQ_OFI(preq)->tag, +- msg.ignore = 0ULL; +- msg.context = &(REQ_OFI(preq)->ofi_context); +- msg.data = 0ULL; +- FI_RC_RETRY(fi_tsendmsg(gl_data.endpoint,&msg,0ULL),tsend); +- } +- MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(preq)); +- break; ++ case MPIDI_OFI_MSG_CTS | MPIDI_OFI_MSG_RTS: ++ vc = REQ_OFI(preq)->vc; ++ /* store tag in the request for SEND-side event processing */ ++ REQ_OFI(preq)->tag = wc->tag | MPIDI_OFI_MSG_DATA; ++ if (REQ_OFI(preq)->pack_buffer) { ++ FI_RC_RETRY(fi_tsend(gl_data.endpoint, ++ REQ_OFI(preq)->pack_buffer, ++ REQ_OFI(preq)->pack_buffer_size, ++ gl_data.mr, ++ VC_OFI(vc)->direct_addr, ++ REQ_OFI(preq)->tag, ++ (void *) &(REQ_OFI(preq)->ofi_context)), tsend); ++ } else { ++ struct fi_msg_tagged msg; ++ void *desc = NULL; ++ msg.msg_iov = REQ_OFI(preq)->iov; ++ msg.desc = &desc; ++ msg.iov_count = REQ_OFI(preq)->iov_count; ++ msg.addr = VC_OFI(vc)->direct_addr; ++ msg.tag = REQ_OFI(preq)->tag, msg.ignore = 0ULL; ++ msg.context = &(REQ_OFI(preq)->ofi_context); ++ msg.data = 0ULL; ++ FI_RC_RETRY(fi_tsendmsg(gl_data.endpoint, &msg, 0ULL), tsend); ++ } ++ MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(preq)); ++ break; + } + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(rreq)); + +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_CTS_RECV_CALLBACK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + /* ------------------------------------------------------------------------ */ + /* The nemesis API implementations: */ + /* Use packing if iovecs are not supported by the OFI provider */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_iSendContig) + int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc, + MPIR_Request * sreq, + void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz) +@@ -222,91 +223,132 @@ int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc, + uint64_t match_bits; + MPIR_Request *cts_req; + intptr_t buf_offset = 0; +- size_t pkt_len; +- BEGIN_FUNC(FCNAME); ++ size_t pkt_len; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ISENDCONTIG); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ISENDCONTIG); + MPIR_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t)); + MPID_nem_ofi_init_req(sreq); +- pkt_len = sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz + data_sz; +- if (sreq->dev.ext_hdr_sz > 0 && gl_data.iov_limit > 2) { +- REQ_OFI(sreq)->real_hdr = MPL_malloc(sizeof(MPIDI_CH3_Pkt_t)+sreq->dev.ext_hdr_sz, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP1(REQ_OFI(sreq)->real_hdr == NULL, mpi_errno, MPI_ERR_OTHER, +- "**nomem", "**nomem %s", "iSendContig extended header allocation"); +- REQ_OFI(sreq)->iov[0].iov_base = REQ_OFI(sreq)->real_hdr; +- REQ_OFI(sreq)->iov[0].iov_len = hdr_sz; +- REQ_OFI(sreq)->iov[1].iov_base = REQ_OFI(sreq)->real_hdr+sizeof(MPIDI_CH3_Pkt_t); +- REQ_OFI(sreq)->iov[1].iov_len = sreq->dev.ext_hdr_sz; +- REQ_OFI(sreq)->iov[2].iov_base = data; +- REQ_OFI(sreq)->iov[2].iov_len = data_sz; +- REQ_OFI(sreq)->iov_count = 3; +- MPIR_Memcpy(REQ_OFI(sreq)->real_hdr, hdr, hdr_sz); +- MPIR_Memcpy(REQ_OFI(sreq)->real_hdr + sizeof(MPIDI_CH3_Pkt_t), +- sreq->dev.ext_hdr_ptr, sreq->dev.ext_hdr_sz); +- } +- else if(sreq->dev.ext_hdr_sz == 0 && gl_data.iov_limit > 1) { ++ pkt_len = sizeof(MPIDI_CH3_Pkt_t) + data_sz; ++ if (gl_data.iov_limit > 1) { + REQ_OFI(sreq)->real_hdr = MPL_malloc(sizeof(MPIDI_CH3_Pkt_t), MPL_MEM_BUFFER); + MPIR_ERR_CHKANDJUMP1(REQ_OFI(sreq)->real_hdr == NULL, mpi_errno, MPI_ERR_OTHER, + "**nomem", "**nomem %s", "iSendContig header allocation"); + MPIR_Memcpy(REQ_OFI(sreq)->real_hdr, hdr, hdr_sz); + REQ_OFI(sreq)->iov[0].iov_base = REQ_OFI(sreq)->real_hdr; +- REQ_OFI(sreq)->iov[0].iov_len = sizeof(MPIDI_CH3_Pkt_t); ++ REQ_OFI(sreq)->iov[0].iov_len = sizeof(MPIDI_CH3_Pkt_t); + REQ_OFI(sreq)->iov[1].iov_base = data; +- REQ_OFI(sreq)->iov[1].iov_len = data_sz; +- REQ_OFI(sreq)->iov_count = 2; ++ REQ_OFI(sreq)->iov[1].iov_len = data_sz; ++ REQ_OFI(sreq)->iov_count = 2; ++ } else { ++ pack_buffer = MPL_malloc(pkt_len, MPL_MEM_BUFFER); ++ MPIR_ERR_CHKANDJUMP1(pack_buffer == NULL, mpi_errno, MPI_ERR_OTHER, ++ "**nomem", "**nomem %s", "iSendContig pack buffer allocation"); ++ MPIR_Memcpy(pack_buffer, hdr, hdr_sz); ++ buf_offset += sizeof(MPIDI_CH3_Pkt_t); ++ MPIR_Memcpy(pack_buffer + buf_offset, data, data_sz); + } +- else { +- pack_buffer = MPL_malloc(pkt_len, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP1(pack_buffer == NULL, mpi_errno, MPI_ERR_OTHER, +- "**nomem", "**nomem %s", "iSendContig pack buffer allocation"); +- MPIR_Memcpy(pack_buffer, hdr, hdr_sz); +- buf_offset += sizeof(MPIDI_CH3_Pkt_t); +- if (sreq->dev.ext_hdr_sz > 0) { +- MPIR_Memcpy(pack_buffer + buf_offset, sreq->dev.ext_hdr_ptr, sreq->dev.ext_hdr_sz); +- buf_offset += sreq->dev.ext_hdr_sz; +- } +- MPIR_Memcpy(pack_buffer + buf_offset, data, data_sz); ++ START_COMM(); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ISENDCONTIG); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_nem_ofi_iSendIov(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, ++ MPL_IOV * iov, int n_iov) ++{ ++ int pgid, c, mpi_errno = MPI_SUCCESS; ++ char *pack_buffer = NULL; ++ uint64_t match_bits; ++ MPIR_Request *cts_req; ++ intptr_t buf_offset = 0; ++ size_t pkt_len; ++ int i; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ISENDIOV); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ISENDIOV); ++ ++ MPID_nem_ofi_init_req(sreq); ++ ++ /* Compute packed buffer size */ ++ MPIR_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t)); ++ pkt_len = sizeof(MPIDI_CH3_Pkt_t); ++ for (i = 0; i < n_iov; i++) ++ pkt_len += iov[i].MPL_IOV_LEN; ++ ++ pack_buffer = MPL_malloc(pkt_len, MPL_MEM_BUFFER); ++ MPIR_ERR_CHKANDJUMP1(pack_buffer == NULL, mpi_errno, MPI_ERR_OTHER, ++ "**nomem", "**nomem %s", "iSendIov pack buffer allocation"); ++ ++ /* Copy header and iovs into packed buffer */ ++ MPIR_Memcpy(pack_buffer, hdr, hdr_sz); ++ buf_offset += sizeof(MPIDI_CH3_Pkt_t); ++ for (i = 0; i < n_iov; i++) { ++ MPIR_Memcpy(pack_buffer + buf_offset, iov[i].MPL_IOV_BUF, iov[i].MPL_IOV_LEN); ++ buf_offset += iov[i].MPL_IOV_LEN; + } + START_COMM(); +- END_FUNC_RC(FCNAME); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ISENDIOV); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_SendNoncontig) +-int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, +- MPIR_Request * sreq, void *hdr, intptr_t hdr_sz) ++int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, ++ MPL_IOV * hdr_iov, int n_hdr_iov) + { +- int c, pgid, mpi_errno = MPI_SUCCESS; ++ int c, i, pgid, mpi_errno = MPI_SUCCESS; + char *pack_buffer; + MPI_Aint data_sz; + uint64_t match_bits; + MPIR_Request *cts_req; +- intptr_t first, last; + intptr_t buf_offset = 0; +- void *data = NULL; +- size_t pkt_len; +- BEGIN_FUNC(FCNAME); ++ void *data = NULL; ++ size_t pkt_len; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_SENDNONCONTIG); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_SENDNONCONTIG); + MPIR_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t)); ++ + MPID_nem_ofi_init_req(sreq); +- first = sreq->dev.segment_first; +- last = sreq->dev.segment_size; +- data_sz = sreq->dev.segment_size - sreq->dev.segment_first; +- pkt_len = sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz + data_sz; ++ data_sz = sreq->dev.msgsize - sreq->dev.msg_offset; ++ pkt_len = sizeof(MPIDI_CH3_Pkt_t) + data_sz; ++ if (n_hdr_iov > 0) { ++ /* add length of extended header iovs */ ++ for (i = 0; i < n_hdr_iov; i++) ++ pkt_len += hdr_iov[i].MPL_IOV_LEN; ++ } ++ + pack_buffer = MPL_malloc(pkt_len, MPL_MEM_BUFFER); + MPIR_ERR_CHKANDJUMP1(pack_buffer == NULL, mpi_errno, MPI_ERR_OTHER, + "**nomem", "**nomem %s", "SendNonContig pack buffer allocation"); + MPIR_Memcpy(pack_buffer, hdr, hdr_sz); + buf_offset += sizeof(MPIDI_CH3_Pkt_t); +- if (sreq->dev.ext_hdr_sz > 0) { +- MPIR_Memcpy(pack_buffer + buf_offset, sreq->dev.ext_hdr_ptr, sreq->dev.ext_hdr_sz); +- buf_offset += sreq->dev.ext_hdr_sz; ++ ++ if (n_hdr_iov > 0) { ++ /* pack extended header iovs */ ++ for (i = 0; i < n_hdr_iov; i++) { ++ MPIR_Memcpy(pack_buffer + buf_offset, hdr_iov[i].MPL_IOV_BUF, hdr_iov[i].MPL_IOV_LEN); ++ buf_offset += hdr_iov[i].MPL_IOV_LEN; ++ } + } +- MPIR_Segment_pack(sreq->dev.segment_ptr, first, &last, pack_buffer + buf_offset); ++ ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(sreq->dev.user_buf, sreq->dev.user_count, sreq->dev.datatype, ++ sreq->dev.msg_offset, pack_buffer + buf_offset, ++ sreq->dev.msgsize - sreq->dev.msg_offset, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes == sreq->dev.msgsize - sreq->dev.msg_offset); ++ + START_COMM(); + MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL); +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_SENDNONCONTIG); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_iStartContigMsg) + int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, + void *hdr, + intptr_t hdr_sz, +@@ -315,10 +357,11 @@ int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, + int c, pgid, mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq; + MPIR_Request *cts_req; +- char *pack_buffer = NULL; ++ char *pack_buffer = NULL; + uint64_t match_bits; +- size_t pkt_len; +- BEGIN_FUNC(FCNAME); ++ size_t pkt_len; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ISTARTCONTIGMSG); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ISTARTCONTIGMSG); + MPIR_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t)); + + MPID_nem_ofi_create_req(&sreq, 2); +@@ -326,24 +369,27 @@ int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, + sreq->dev.OnDataAvail = NULL; + sreq->dev.next = NULL; + pkt_len = sizeof(MPIDI_CH3_Pkt_t) + data_sz; +- if(gl_data.iov_limit > 1) { +- REQ_OFI(sreq)->real_hdr = MPL_malloc(sizeof(MPIDI_CH3_Pkt_t), MPL_MEM_BUFFER); +- MPIR_Memcpy(REQ_OFI(sreq)->real_hdr, hdr, hdr_sz); +- REQ_OFI(sreq)->iov[0].iov_base = REQ_OFI(sreq)->real_hdr; +- REQ_OFI(sreq)->iov[0].iov_len = sizeof(MPIDI_CH3_Pkt_t); +- REQ_OFI(sreq)->iov[1].iov_base = data; +- REQ_OFI(sreq)->iov[1].iov_len = data_sz; +- REQ_OFI(sreq)->iov_count = 2; +- } +- else { +- pack_buffer = MPL_malloc(pkt_len, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP1(pack_buffer == NULL, mpi_errno, MPI_ERR_OTHER, +- "**nomem", "**nomem %s", "iStartContig pack buffer allocation"); +- MPIR_Memcpy((void *) pack_buffer, hdr, hdr_sz); +- if (data_sz) +- MPIR_Memcpy((void *) (pack_buffer + sizeof(MPIDI_CH3_Pkt_t)), data, data_sz); ++ if (gl_data.iov_limit > 1) { ++ REQ_OFI(sreq)->real_hdr = MPL_malloc(sizeof(MPIDI_CH3_Pkt_t), MPL_MEM_BUFFER); ++ MPIR_Memcpy(REQ_OFI(sreq)->real_hdr, hdr, hdr_sz); ++ REQ_OFI(sreq)->iov[0].iov_base = REQ_OFI(sreq)->real_hdr; ++ REQ_OFI(sreq)->iov[0].iov_len = sizeof(MPIDI_CH3_Pkt_t); ++ REQ_OFI(sreq)->iov[1].iov_base = data; ++ REQ_OFI(sreq)->iov[1].iov_len = data_sz; ++ REQ_OFI(sreq)->iov_count = 2; ++ } else { ++ pack_buffer = MPL_malloc(pkt_len, MPL_MEM_BUFFER); ++ MPIR_ERR_CHKANDJUMP1(pack_buffer == NULL, mpi_errno, MPI_ERR_OTHER, ++ "**nomem", "**nomem %s", "iStartContig pack buffer allocation"); ++ MPIR_Memcpy((void *) pack_buffer, hdr, hdr_sz); ++ if (data_sz) ++ MPIR_Memcpy((void *) (pack_buffer + sizeof(MPIDI_CH3_Pkt_t)), data, data_sz); + } + START_COMM(); + *sreq_ptr = sreq; +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ISTARTCONTIGMSG); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c +@@ -14,34 +14,29 @@ + /* ------------------------------------------------------------------------ */ + /* peek_callback called when a successful peek is completed */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(peek_callback) +-static int +-ADD_SUFFIX(peek_callback)(cq_tagged_entry_t * wc, MPIR_Request * rreq) +-{ ++static int ADD_SUFFIX(peek_callback) (cq_tagged_entry_t * wc, MPIR_Request * rreq) { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_PEEK_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_PEEK_CALLBACK); + REQ_OFI(rreq)->match_state = PEEK_FOUND; + #if API_SET == API_SET_1 +- rreq->status.MPI_SOURCE = get_source(wc->tag); ++ rreq->status.MPI_SOURCE = get_source(wc->tag); + #elif API_SET == API_SET_2 +- rreq->status.MPI_SOURCE = wc->data; ++ rreq->status.MPI_SOURCE = wc->data; + #endif +- rreq->status.MPI_TAG = get_tag(wc->tag); ++ rreq->status.MPI_TAG = get_tag(wc->tag); + MPIR_STATUS_SET_COUNT(rreq->status, wc->len); +- rreq->status.MPI_ERROR = MPI_SUCCESS; +- END_FUNC(FCNAME); ++ rreq->status.MPI_ERROR = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_PEEK_CALLBACK); + return mpi_errno; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_iprobe_impl) +-int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc, +- int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- int *flag, MPI_Status * status, MPIR_Request ** rreq_ptr) ++int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl) (struct MPIDI_VC * vc, ++ int source, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, ++ int *flag, MPI_Status * status, MPIR_Request ** rreq_ptr) + { + int ret, mpi_errno = MPI_SUCCESS; + fi_addr_t remote_proc = 0; +@@ -49,7 +44,8 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc, + size_t len; + MPIR_Request rreq_s, *rreq; + +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_IPROBE_IMPL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_IPROBE_IMPL); + if (rreq_ptr) { + MPIDI_CH3I_NM_OFI_RC(MPID_nem_ofi_create_req(&rreq, 1)); + rreq->kind = MPIR_REQUEST_KIND__RECV; +@@ -60,15 +56,14 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc, + rreq->dev.match.parts.tag = tag; + rreq->dev.match.parts.context_id = comm->context_id; + MPIR_Comm_add_ref(comm); +- } +- else { ++ } else { + rreq = &rreq_s; + rreq->dev.OnDataAvail = NULL; + } + +- REQ_OFI(rreq)->pack_buffer = NULL; ++ REQ_OFI(rreq)->pack_buffer = NULL; + REQ_OFI(rreq)->event_callback = ADD_SUFFIX(peek_callback); +- REQ_OFI(rreq)->match_state = PEEK_INIT; ++ REQ_OFI(rreq)->match_state = PEEK_INIT; + OFI_ADDR_INIT(source, vc, remote_proc); + #if API_SET == API_SET_1 + match_bits = init_recvtag(&mask_bits, comm->context_id + context_offset, source, tag); +@@ -85,30 +80,30 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc, + /* entry is enqueued. */ + /* ------------------------------------------------------------------------- */ + msg_tagged_t msg; +- uint64_t msgflags = FI_PEEK; +- msg.msg_iov = NULL; +- msg.desc = NULL; ++ uint64_t msgflags = FI_PEEK; ++ msg.msg_iov = NULL; ++ msg.desc = NULL; + msg.iov_count = 0; +- msg.addr = remote_proc; +- msg.tag = match_bits; +- msg.ignore = mask_bits; +- msg.context = (void *) &(REQ_OFI(rreq)->ofi_context); +- msg.data = 0; +- if(*flag == CLAIM_PEEK) +- msgflags|=FI_CLAIM; +- ret = fi_trecvmsg(gl_data.endpoint,&msg,msgflags); +- if(ret == -ENOMSG) { +- if (rreq_ptr) { +- MPIR_Request_free(rreq); +- *rreq_ptr = NULL; +- *flag = 0; +- } +- MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL); +- goto fn_exit; ++ msg.addr = remote_proc; ++ msg.tag = match_bits; ++ msg.ignore = mask_bits; ++ msg.context = (void *) &(REQ_OFI(rreq)->ofi_context); ++ msg.data = 0; ++ if (*flag == CLAIM_PEEK) ++ msgflags |= FI_CLAIM; ++ ret = fi_trecvmsg(gl_data.endpoint, &msg, msgflags); ++ if (ret == -ENOMSG) { ++ if (rreq_ptr) { ++ MPIR_Request_free(rreq); ++ *rreq_ptr = NULL; ++ *flag = 0; ++ } ++ MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL); ++ goto fn_exit; + } + MPIR_ERR_CHKANDJUMP4((ret < 0), mpi_errno, MPI_ERR_OTHER, + "**ofi_peek", "**ofi_peek %s %d %s %s", +- __SHORT_FILE__, __LINE__, FCNAME, fi_strerror(-ret)); ++ __SHORT_FILE__, __LINE__, __func__, fi_strerror(-ret)); + + while (PEEK_INIT == REQ_OFI(rreq)->match_state) + MPID_nem_ofi_poll(MPID_BLOCKING_POLL); +@@ -129,76 +124,74 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc, + if (rreq_ptr) + MPIR_Request_add_ref(rreq); + *flag = 1; +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_IPROBE_IMPL); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_iprobe) +-int ADD_SUFFIX(MPID_nem_ofi_iprobe)(struct MPIDI_VC *vc, +- int source, +- int tag, +- MPIR_Comm * comm, int context_offset, int *flag, MPI_Status * status) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_iprobe) (struct MPIDI_VC * vc, ++ int source, ++ int tag, ++ MPIR_Comm * comm, int context_offset, int *flag, ++ MPI_Status * status) { + int rc; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_IPROBE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_IPROBE); + *flag = 0; +- rc = ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(vc, source, +- tag, comm, context_offset, flag, status, NULL); +- END_FUNC(FCNAME); ++ rc = ADD_SUFFIX(MPID_nem_ofi_iprobe_impl) (vc, source, ++ tag, comm, context_offset, flag, status, NULL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_IPROBE); + return rc; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_improbe) +-int ADD_SUFFIX(MPID_nem_ofi_improbe)(struct MPIDI_VC *vc, +- int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- int *flag, MPIR_Request ** message, MPI_Status * status) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_improbe) (struct MPIDI_VC * vc, ++ int source, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, ++ int *flag, MPIR_Request ** message, MPI_Status * status) { + int old_error = status->MPI_ERROR; + int s; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_IMPROBE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_IMPROBE); + *flag = CLAIM_PEEK; +- s = ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(vc, source, +- tag, comm, context_offset, flag, status, message); ++ s = ADD_SUFFIX(MPID_nem_ofi_iprobe_impl) (vc, source, ++ tag, comm, context_offset, flag, status, message); + if (*flag) { + status->MPI_ERROR = old_error; + (*message)->kind = MPIR_REQUEST_KIND__MPROBE; + } +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_IMPROBE); + return s; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_anysource_iprobe) +-int ADD_SUFFIX(MPID_nem_ofi_anysource_iprobe)(int tag, +- MPIR_Comm * comm, +- int context_offset, int *flag, MPI_Status * status) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_anysource_iprobe) (int tag, ++ MPIR_Comm * comm, ++ int context_offset, int *flag, MPI_Status * status) { + int rc; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_IPROBE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_IPROBE); + *flag = NORMAL_PEEK; +- rc = ADD_SUFFIX(MPID_nem_ofi_iprobe)(NULL, MPI_ANY_SOURCE, +- tag, comm, context_offset, flag, status); +- END_FUNC(FCNAME); ++ rc = ADD_SUFFIX(MPID_nem_ofi_iprobe) (NULL, MPI_ANY_SOURCE, ++ tag, comm, context_offset, flag, status); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_IPROBE); + return rc; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_anysource_improbe) +-int ADD_SUFFIX(MPID_nem_ofi_anysource_improbe)(int tag, +- MPIR_Comm * comm, +- int context_offset, +- int *flag, MPIR_Request ** message, MPI_Status * status) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_anysource_improbe) (int tag, ++ MPIR_Comm * comm, ++ int context_offset, ++ int *flag, MPIR_Request ** message, ++ MPI_Status * status) { + int rc; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_IMPROBE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_IMPROBE); + *flag = CLAIM_PEEK; +- rc = ADD_SUFFIX(MPID_nem_ofi_improbe)(NULL, MPI_ANY_SOURCE, tag, comm, +- context_offset, flag, message, status); +- END_FUNC(FCNAME); ++ rc = ADD_SUFFIX(MPID_nem_ofi_improbe) (NULL, MPI_ANY_SOURCE, tag, comm, ++ context_offset, flag, message, status); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_IMPROBE); + return rc; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c +@@ -31,8 +31,6 @@ static inline MPIR_Request *context_to_req(void *ofi_context) + #include "ofi_probe_template.c" + + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_poll) + int MPID_nem_ofi_poll(int in_blocking_poll) + { + int complete = 0, mpi_errno = MPI_SUCCESS; +@@ -42,7 +40,8 @@ int MPID_nem_ofi_poll(int in_blocking_poll) + MPIDI_VC_t *vc; + MPIR_Request *req; + req_fn reqFn; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_POLL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_POLL); + do { + /* ----------------------------------------------------- */ + /* Poll the completion queue */ +@@ -64,25 +63,19 @@ int MPID_nem_ofi_poll(int in_blocking_poll) + } + reqFn = req->dev.OnDataAvail; + if (reqFn) { +- if (REQ_OFI(req)->pack_buffer) { +- MPL_free(REQ_OFI(req)->pack_buffer); +- } ++ MPL_free(REQ_OFI(req)->pack_buffer); + vc = REQ_OFI(req)->vc; + + complete = 0; + MPIDI_CH3I_NM_OFI_RC(reqFn(vc, req, &complete)); + continue; +- } +- else { ++ } else { + MPIR_Assert(0); + } +- } +- else { ++ } else { + MPIR_Assert(0); + } +- } +- else if (ret == -FI_EAGAIN) +- ; ++ } else if (ret == -FI_EAGAIN); + else if (ret < 0) { + if (ret == -FI_EAVAIL) { + ret = fi_cq_readerr(gl_data.cq, (void *) &error, 0); +@@ -96,34 +89,32 @@ int MPID_nem_ofi_poll(int in_blocking_poll) + req = context_to_req(error.op_context); + if (req->kind == MPIR_REQUEST_KIND__SEND) { + mpi_errno = REQ_OFI(req)->event_callback(NULL, req); +- } +- else if (req->kind == MPIR_REQUEST_KIND__RECV) { ++ } else if (req->kind == MPIR_REQUEST_KIND__RECV) { + mpi_errno = REQ_OFI(req)->event_callback(&wc, req); + req->status.MPI_ERROR = MPI_ERR_TRUNCATE; + req->status.MPI_TAG = error.tag; +- } +- else { ++ } else { + mpi_errno = MPI_ERR_OTHER; + } ++ } else if (error.err == FI_ECANCELED) { ++ req = context_to_req(error.op_context); ++ MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE); ++ } else if (error.err == FI_ENOMSG) { ++ req = context_to_req(error.op_context); ++ REQ_OFI(req)->match_state = PEEK_NOT_FOUND; ++ } else { ++ mpi_errno = MPI_ERR_OTHER; + } +- else if (error.err == FI_ECANCELED) { +- req = context_to_req(error.op_context); +- MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE); +- } +- else if (error.err == FI_ENOMSG) { +- req = context_to_req(error.op_context); +- REQ_OFI(req)->match_state = PEEK_NOT_FOUND; +- } +- else { +- mpi_errno = MPI_ERR_OTHER; +- } +- } +- else { ++ } else { + MPIR_ERR_CHKANDJUMP4(1, mpi_errno, MPI_ERR_OTHER, "**ofi_poll", + "**ofi_poll %s %d %s %s", __SHORT_FILE__, +- __LINE__, FCNAME, fi_strerror(-ret)); ++ __LINE__, __func__, fi_strerror(-ret)); + } + } + } while (in_blocking_poll && (ret > 0)); +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_POLL); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h +@@ -42,8 +42,8 @@ + static inline uint64_t init_sendtag(MPIR_Context_id_t contextid, int source, int tag, uint64_t type) + { + uint64_t match_bits = 0; +- match_bits |= ((uint64_t)source) << MPIDI_OFI_SOURCE_SHIFT; +- match_bits |= ((uint64_t)contextid) << MPIDI_OFI_CTXID_SHIFT; ++ match_bits |= ((uint64_t) source) << MPIDI_OFI_SOURCE_SHIFT; ++ match_bits |= ((uint64_t) contextid) << MPIDI_OFI_CTXID_SHIFT; + match_bits |= (MPIDI_OFI_TAG_MASK & tag) | type; + return match_bits; + } +@@ -54,13 +54,12 @@ static inline uint64_t init_recvtag(uint64_t * mask_bits, + { + uint64_t match_bits = 0; + *mask_bits = MPIDI_OFI_SYNC_SEND; +- match_bits |= ((uint64_t)contextid) << MPIDI_OFI_CTXID_SHIFT; ++ match_bits |= ((uint64_t) contextid) << MPIDI_OFI_CTXID_SHIFT; + + if (MPI_ANY_SOURCE == source) { + *mask_bits |= MPIDI_OFI_SOURCE_MASK; +- } +- else { +- match_bits |= ((uint64_t)source) << MPIDI_OFI_SOURCE_SHIFT; ++ } else { ++ match_bits |= ((uint64_t) source) << MPIDI_OFI_SOURCE_SHIFT; + } + if (MPI_ANY_TAG == tag) + *mask_bits |= MPIDI_OFI_TAG_MASK; +@@ -115,18 +114,17 @@ static inline int get_port(uint64_t match_bits) + static inline uint64_t init_sendtag_2(MPIR_Context_id_t contextid, int tag, uint64_t type) + { + uint64_t match_bits = 0; +- match_bits |= ((uint64_t)contextid) << MPIDI_OFI_CTXID_SHIFT; ++ match_bits |= ((uint64_t) contextid) << MPIDI_OFI_CTXID_SHIFT; + match_bits |= (MPIDI_OFI_TAG_MASK & tag) | type; + return match_bits; + } + + /* receive posting */ +-static inline uint64_t init_recvtag_2(uint64_t * mask_bits, +- MPIR_Context_id_t contextid, int tag) ++static inline uint64_t init_recvtag_2(uint64_t * mask_bits, MPIR_Context_id_t contextid, int tag) + { + uint64_t match_bits = 0; + *mask_bits = MPIDI_OFI_SYNC_SEND; +- match_bits |= ((uint64_t)contextid) << MPIDI_OFI_CTXID_SHIFT; ++ match_bits |= ((uint64_t) contextid) << MPIDI_OFI_CTXID_SHIFT; + + if (MPI_ANY_TAG == tag) + *mask_bits |= MPIDI_OFI_TAG_MASK; +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c +@@ -15,12 +15,10 @@ + #define MPID_DONT_CREATE_REQ 1 + + static inline int +-MPID_nem_ofi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)), +- MPIR_Request * rreq); ++MPID_nem_ofi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)), MPIR_Request * rreq); + + static inline int +-MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)), +- MPIR_Request * sreq); ++MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)), MPIR_Request * sreq); + + #define ADD_SUFFIX(name) name + #undef API_SET +@@ -35,44 +33,50 @@ MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)), + /* ------------------------------------------------------------------------ */ + /* Receive callback called after sending a syncronous send acknowledgement. */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_sync_recv_callback) + static inline int MPID_nem_ofi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)), + MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; + +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_SYNC_RECV_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_SYNC_RECV_CALLBACK); + + MPIDI_CH3U_Recvq_DP(REQ_OFI(rreq)->parent); + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(REQ_OFI(rreq)->parent)); + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(rreq)); + +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_SYNC_RECV_CALLBACK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + /* ------------------------------------------------------------------------ */ + /* Send done callback */ + /* Free any temporary/pack buffers and complete the send request */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_send_callback) + static inline int MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)), + MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); +- if (REQ_OFI(sreq)->pack_buffer) +- MPL_free(REQ_OFI(sreq)->pack_buffer); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_SEND_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_SEND_CALLBACK); ++ MPL_free(REQ_OFI(sreq)->pack_buffer); + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(sreq)); +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_SEND_CALLBACK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + +-#define DO_CANCEL(req) \ +-({ \ ++/* Use macro as the two functions share common body */ ++#define DO_CANCEL(req, _FCID) \ + int mpi_errno = MPI_SUCCESS; \ + int ret; \ +- BEGIN_FUNC(FCNAME); \ ++ MPIR_FUNC_VERBOSE_STATE_DECL(_FCID); \ ++ MPIR_FUNC_VERBOSE_ENTER(_FCID); \ + MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL); \ + ret = fi_cancel((fid_t)gl_data.endpoint, \ + &(REQ_OFI(req)->ofi_context)); \ +@@ -88,32 +92,26 @@ static inline int MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((u + } else { \ + MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE); \ + } \ +- END_FUNC(FCNAME); \ +- return mpi_errno; \ +-}) ++ MPIR_FUNC_VERBOSE_EXIT(_FCID); \ ++ return mpi_errno; + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_cancel_send) + int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPIR_Request *sreq) + { +- DO_CANCEL(sreq); ++ DO_CANCEL(sreq, MPID_NEM_OFI_CANCEL_SEND); + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_cancel_recv) + int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPIR_Request *rreq) + { +- DO_CANCEL(rreq); ++ DO_CANCEL(rreq, MPID_NEM_OFI_CANCEL_RECV); + } + + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_anysource_matched) + int MPID_nem_ofi_anysource_matched(MPIR_Request * rreq) + { + int matched = FALSE; + int ret; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_MATCHED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_MATCHED); + /* ----------------------------------------------------- */ + /* Netmod has notified us that it has matched an any */ + /* source request on another device. We have the chance */ +@@ -128,16 +126,14 @@ int MPID_nem_ofi_anysource_matched(MPIR_Request * rreq) + * If anysource was posted for non-contig dtype then don't forget + * to clean up tmp space. + */ +- if (REQ_OFI(rreq)->pack_buffer) { +- MPL_free(REQ_OFI(rreq)->pack_buffer); +- } ++ MPL_free(REQ_OFI(rreq)->pack_buffer); + matched = FALSE; +- }else{ ++ } else { + /* Cancel failed. We can only fail in the case of the message + * being already actually received via ofi fabric. return TRUE. + */ + matched = TRUE; + } +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_MATCHED); + return matched; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c +@@ -16,17 +16,15 @@ + /* Receive done callback */ + /* Handle an incoming receive completion event */ + /* ------------------------------------------------------------------------ */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_recv_callback) + static inline +-int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPIR_Request * rreq) +-{ ++ int ADD_SUFFIX(MPID_nem_ofi_recv_callback) (cq_tagged_entry_t * wc, MPIR_Request * rreq) { + int err0, err1, src, mpi_errno = MPI_SUCCESS; + uint64_t ssend_bits; + intptr_t sz; + MPIDI_VC_t *vc; + MPIR_Request *sync_req; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_RECV_CALLBACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_RECV_CALLBACK); + /* ---------------------------------------------------- */ + /* Populate the MPI Status and unpack noncontig buffer */ + /* ---------------------------------------------------- */ +@@ -83,16 +81,13 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPIR_Request + #elif API_SET == API_SET_2 + FI_RC_RETRY(fi_tsenddata(gl_data.endpoint, + #endif +- NULL, +- 0, +- gl_data.mr, ++ NULL, 0, gl_data.mr, + #if API_SET == API_SET_2 +- rreq->comm->rank, ++ rreq->comm->rank, + #endif +- VC_OFI(vc)->direct_addr, +- ssend_bits, &(REQ_OFI(sync_req)->ofi_context)), tsend); +- } +- else { ++ VC_OFI(vc)->direct_addr, ++ ssend_bits, &(REQ_OFI(sync_req)->ofi_context)), tsend); ++ } else { + /* ---------------------------------------------------- */ + /* Non-syncronous send, complete normally */ + /* by removing from the CH3 queue and completing the */ +@@ -101,21 +96,21 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPIR_Request + MPIDI_CH3U_Recvq_DP(rreq); + MPIDI_CH3I_NM_OFI_RC(MPID_Request_complete(rreq)); + } +- END_FUNC_RC(FCNAME); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_RECV_CALLBACK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(send_normal) +-static inline int ADD_SUFFIX(send_normal)(struct MPIDI_VC *vc, +- const void *buf, int count, MPI_Datatype datatype, +- int dest, int tag, MPIR_Comm *comm, +- int context_offset, MPIR_Request **request, +- int dt_contig, +- intptr_t data_sz, +- MPIR_Datatype *dt_ptr, +- MPI_Aint dt_true_lb, +- uint64_t send_type) +-{ ++static inline int ADD_SUFFIX(send_normal) (struct MPIDI_VC * vc, ++ const void *buf, int count, MPI_Datatype datatype, ++ int dest, int tag, MPIR_Comm * comm, ++ int context_offset, MPIR_Request ** request, ++ int dt_contig, ++ intptr_t data_sz, ++ MPIR_Datatype * dt_ptr, ++ MPI_Aint dt_true_lb, uint64_t send_type) { + int err0, err1, mpi_errno = MPI_SUCCESS; + char *send_buffer; + uint64_t match_bits, ssend_match, ssend_mask; +@@ -169,14 +164,14 @@ static inline int ADD_SUFFIX(send_normal)(struct MPIDI_VC *vc, + ssend_match = init_recvtag_2(&ssend_mask, comm->context_id + context_offset, tag); + #endif + ssend_match |= MPIDI_OFI_SYNC_SEND_ACK; +- FI_RC_RETRY(fi_trecv(gl_data.endpoint, /* endpoint */ +- NULL, /* recvbuf */ +- 0, /* data sz */ +- gl_data.mr, /* dynamic mr */ +- VC_OFI(vc)->direct_addr, /* remote proc */ +- ssend_match, /* match bits */ +- 0ULL, /* mask bits */ +- &(REQ_OFI(sync_req)->ofi_context)), trecv); ++ FI_RC_RETRY(fi_trecv(gl_data.endpoint, /* endpoint */ ++ NULL, /* recvbuf */ ++ 0, /* data sz */ ++ gl_data.mr, /* dynamic mr */ ++ VC_OFI(vc)->direct_addr, /* remote proc */ ++ ssend_match, /* match bits */ ++ 0ULL, /* mask bits */ ++ &(REQ_OFI(sync_req)->ofi_context)), trecv); + } + + if (data_sz <= gl_data.max_buffered_send) { +@@ -185,54 +180,46 @@ static inline int ADD_SUFFIX(send_normal)(struct MPIDI_VC *vc, + #elif API_SET == API_SET_2 + FI_RC_RETRY(fi_tinjectdata(gl_data.endpoint, + #endif +- send_buffer, +- data_sz, ++ send_buffer, data_sz, + #if API_SET == API_SET_2 +- comm->rank, ++ comm->rank, + #endif +- VC_OFI(vc)->direct_addr, +- match_bits), tinject); ++ VC_OFI(vc)->direct_addr, match_bits), tinject); + MPID_nem_ofi_send_callback(NULL, sreq); +- } +- else ++ } else + #if API_SET == API_SET_1 +- FI_RC_RETRY(fi_tsend(gl_data.endpoint, /* Endpoint */ ++ FI_RC_RETRY(fi_tsend(gl_data.endpoint, /* Endpoint */ + #elif API_SET == API_SET_2 + FI_RC_RETRY(fi_tsenddata(gl_data.endpoint, /* Endpoint */ + #endif +- send_buffer, /* Send buffer(packed or user) */ +- data_sz, /* Size of the send */ +- gl_data.mr, /* Dynamic memory region */ ++ send_buffer, /* Send buffer(packed or user) */ ++ data_sz, /* Size of the send */ ++ gl_data.mr, /* Dynamic memory region */ + #if API_SET == API_SET_2 +- comm->rank, ++ comm->rank, + #endif +- VC_OFI(vc)->direct_addr, /* Use the address of this VC */ +- match_bits, /* Match bits */ +- &(REQ_OFI(sreq)->ofi_context)), tsend); ++ VC_OFI(vc)->direct_addr, /* Use the address of this VC */ ++ match_bits, /* Match bits */ ++ &(REQ_OFI(sreq)->ofi_context)), tsend); + + *request = sreq; + +-fn_exit: ++ fn_exit: + return mpi_errno; +-fn_fail: ++ fn_fail: + goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(send_lightweight) + static inline int +-ADD_SUFFIX(send_lightweight)(struct MPIDI_VC *vc, +- const void *buf, +- intptr_t data_sz, +- int rank, +- int tag, +- MPIR_Comm *comm, +- int context_offset) +-{ ++ADD_SUFFIX(send_lightweight) (struct MPIDI_VC * vc, ++ const void *buf, ++ intptr_t data_sz, ++ int rank, int tag, MPIR_Comm * comm, int context_offset) { + int mpi_errno = MPI_SUCCESS; + + #if API_SET == API_SET_1 +- uint64_t match_bits = init_sendtag(comm->context_id + context_offset, comm->rank, tag, MPID_NORMAL_SEND); ++ uint64_t match_bits = ++ init_sendtag(comm->context_id + context_offset, comm->rank, tag, MPID_NORMAL_SEND); + #elif API_SET == API_SET_2 + uint64_t match_bits = init_sendtag_2(comm->context_id + context_offset, tag, MPID_NORMAL_SEND); + #endif +@@ -244,13 +231,11 @@ ADD_SUFFIX(send_lightweight)(struct MPIDI_VC *vc, + #elif API_SET == API_SET_2 + FI_RC_RETRY(fi_tinjectdata(gl_data.endpoint, + #endif +- buf, +- data_sz, ++ buf, data_sz, + #if API_SET == API_SET_2 +- comm->rank, ++ comm->rank, + #endif +- VC_OFI(vc)->direct_addr, +- match_bits), tinject); ++ VC_OFI(vc)->direct_addr, match_bits), tinject); + fn_exit: + return mpi_errno; + fn_fail: +@@ -258,26 +243,22 @@ ADD_SUFFIX(send_lightweight)(struct MPIDI_VC *vc, + } + + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(do_isend) + static inline int +-ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc, +- const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int dest, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- struct MPIR_Request **request, +- int should_create_req, +- uint64_t send_type) +-{ ++ADD_SUFFIX(do_isend) (struct MPIDI_VC * vc, ++ const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int dest, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, ++ struct MPIR_Request ** request, int should_create_req, uint64_t send_type) { + int dt_contig, mpi_errno = MPI_SUCCESS; + MPI_Aint dt_true_lb; + intptr_t data_sz; + MPIR_Datatype *dt_ptr; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_DO_ISEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_DO_ISEND); + + VC_READY_CHECK(vc); + *request = NULL; +@@ -285,107 +266,106 @@ ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc, + MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); + + if (likely((send_type != MPIDI_OFI_SYNC_SEND) && +- dt_contig && +- (data_sz <= gl_data.max_buffered_send))) +- { ++ dt_contig && (data_sz <= gl_data.max_buffered_send))) { + if (should_create_req == MPID_CREATE_REQ) + MPID_nem_ofi_create_req_lw(request, 1); + +- mpi_errno = ADD_SUFFIX(send_lightweight)(vc, (char *) buf + dt_true_lb, data_sz, +- dest, tag, comm, context_offset); +- } +- else +- mpi_errno = ADD_SUFFIX(send_normal)(vc, buf, count, datatype, dest, tag, comm, +- context_offset, request, dt_contig, +- data_sz, dt_ptr, dt_true_lb, send_type); ++ mpi_errno = ADD_SUFFIX(send_lightweight) (vc, (char *) buf + dt_true_lb, data_sz, ++ dest, tag, comm, context_offset); ++ } else ++ mpi_errno = ADD_SUFFIX(send_normal) (vc, buf, count, datatype, dest, tag, comm, ++ context_offset, request, dt_contig, ++ data_sz, dt_ptr, dt_true_lb, send_type); + +- END_FUNC_RC(MPID_STATE_DO_ISEND); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_DO_ISEND); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_send) +-int ADD_SUFFIX(MPID_nem_ofi_send)(struct MPIDI_VC *vc, +- const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int dest, +- int tag, MPIR_Comm * comm, int context_offset, struct MPIR_Request **request) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_send) (struct MPIDI_VC * vc, ++ const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int dest, ++ int tag, MPIR_Comm * comm, int context_offset, ++ struct MPIR_Request ** request) { + int mpi_errno = MPI_SUCCESS; + +- BEGIN_FUNC(FCNAME); +- mpi_errno = ADD_SUFFIX(do_isend)(vc, buf, count, datatype, dest, tag, +- comm, context_offset, request, MPID_DONT_CREATE_REQ, MPID_NORMAL_SEND); +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_SEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_SEND); ++ mpi_errno = ADD_SUFFIX(do_isend) (vc, buf, count, datatype, dest, tag, ++ comm, context_offset, request, MPID_DONT_CREATE_REQ, ++ MPID_NORMAL_SEND); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_SEND); + return mpi_errno; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_isend) +-int ADD_SUFFIX(MPID_nem_ofi_isend)(struct MPIDI_VC *vc, +- const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int dest, +- int tag, MPIR_Comm * comm, int context_offset, struct MPIR_Request **request) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_isend) (struct MPIDI_VC * vc, ++ const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int dest, ++ int tag, MPIR_Comm * comm, int context_offset, ++ struct MPIR_Request ** request) { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); +- mpi_errno = ADD_SUFFIX(do_isend)(vc, buf, count, datatype, dest, +- tag, comm, context_offset, request, MPID_CREATE_REQ, MPID_NORMAL_SEND); +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ISEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ISEND); ++ mpi_errno = ADD_SUFFIX(do_isend) (vc, buf, count, datatype, dest, ++ tag, comm, context_offset, request, MPID_CREATE_REQ, ++ MPID_NORMAL_SEND); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ISEND); + return mpi_errno; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_ssend) +-int ADD_SUFFIX(MPID_nem_ofi_ssend)(struct MPIDI_VC *vc, +- const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int dest, +- int tag, MPIR_Comm * comm, int context_offset, struct MPIR_Request **request) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_ssend) (struct MPIDI_VC * vc, ++ const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int dest, ++ int tag, MPIR_Comm * comm, int context_offset, ++ struct MPIR_Request ** request) { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); +- mpi_errno = ADD_SUFFIX(do_isend)(vc, buf, count, datatype, dest, +- tag, comm, context_offset, request, MPID_CREATE_REQ, MPIDI_OFI_SYNC_SEND); +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_SSEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_SSEND); ++ mpi_errno = ADD_SUFFIX(do_isend) (vc, buf, count, datatype, dest, ++ tag, comm, context_offset, request, MPID_CREATE_REQ, ++ MPIDI_OFI_SYNC_SEND); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_SSEND); + return mpi_errno; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_issend) +-int ADD_SUFFIX(MPID_nem_ofi_issend)(struct MPIDI_VC *vc, +- const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int dest, +- int tag, +- MPIR_Comm * comm, int context_offset, struct MPIR_Request **request) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_issend) (struct MPIDI_VC * vc, ++ const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int dest, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ struct MPIR_Request ** request) { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); +- mpi_errno = ADD_SUFFIX(do_isend)(vc, buf, count, datatype, dest, +- tag, comm, context_offset, request, MPID_CREATE_REQ, MPIDI_OFI_SYNC_SEND); +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ISSEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ISSEND); ++ mpi_errno = ADD_SUFFIX(do_isend) (vc, buf, count, datatype, dest, ++ tag, comm, context_offset, request, MPID_CREATE_REQ, ++ MPIDI_OFI_SYNC_SEND); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ISSEND); + return mpi_errno; + } + + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_recv_posted) +-int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPIR_Request *rreq) +-{ ++int ADD_SUFFIX(MPID_nem_ofi_recv_posted) (struct MPIDI_VC * vc, struct MPIR_Request * rreq) { + int mpi_errno = MPI_SUCCESS, dt_contig, src, tag; + uint64_t match_bits = 0, mask_bits = 0; + fi_addr_t remote_proc = 0; + intptr_t data_sz; + MPI_Aint dt_true_lb; +- MPIR_Datatype*dt_ptr; ++ MPIR_Datatype *dt_ptr; + MPIR_Context_id_t context_id; + char *recv_buffer; +- BEGIN_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_RECV_POSTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_RECV_POSTED); + + /* ------------------------ */ + /* Initialize the request */ +@@ -413,8 +393,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPIR_Reques + dt_contig, data_sz, dt_ptr, dt_true_lb); + if (dt_contig) { + recv_buffer = (char *) rreq->dev.user_buf + dt_true_lb; +- } +- else { ++ } else { + recv_buffer = (char *) MPL_malloc(data_sz, MPL_MEM_BUFFER); + MPIR_ERR_CHKANDJUMP1(recv_buffer == NULL, mpi_errno, MPI_ERR_OTHER, + "**nomem", "**nomem %s", "Recv Pack Buffer alloc"); +@@ -424,38 +403,39 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPIR_Reques + /* ---------------- */ + /* Post the receive */ + /* ---------------- */ +- uint64_t msgflags; +- iovec_t iov; ++ uint64_t msgflags; ++ iovec_t iov; + msg_tagged_t msg; + iov.iov_base = recv_buffer; +- iov.iov_len = data_sz; ++ iov.iov_len = data_sz; + if (REQ_OFI(rreq)->match_state == PEEK_FOUND) { + msgflags = FI_CLAIM; + REQ_OFI(rreq)->match_state = PEEK_INIT; +- } +- else ++ } else + msgflags = 0ULL; + +- msg.msg_iov = &iov; +- msg.desc = NULL; ++ msg.msg_iov = &iov; ++ msg.desc = NULL; + msg.iov_count = 1; +- msg.addr = remote_proc; +- msg.tag = match_bits; +- msg.ignore = mask_bits; +- msg.context = (void *) &(REQ_OFI(rreq)->ofi_context); +- msg.data = 0; +- FI_RC_RETRY(fi_trecvmsg(gl_data.endpoint,&msg,msgflags), trecv); +- END_FUNC_RC(FCNAME); ++ msg.addr = remote_proc; ++ msg.tag = match_bits; ++ msg.ignore = mask_bits; ++ msg.context = (void *) &(REQ_OFI(rreq)->ofi_context); ++ msg.data = 0; ++ FI_RC_RETRY(fi_trecvmsg(gl_data.endpoint, &msg, msgflags), trecv); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_RECV_POSTED); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPID_nem_ofi_anysource_posted) +-void ADD_SUFFIX(MPID_nem_ofi_anysource_posted)(MPIR_Request * rreq) +-{ ++void ADD_SUFFIX(MPID_nem_ofi_anysource_posted) (MPIR_Request * rreq) { + int mpi_errno = MPI_SUCCESS; +- BEGIN_FUNC(FCNAME); +- mpi_errno = ADD_SUFFIX(MPID_nem_ofi_recv_posted)(NULL, rreq); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_POSTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_POSTED); ++ mpi_errno = ADD_SUFFIX(MPID_nem_ofi_recv_posted) (NULL, rreq); + MPIR_Assert(mpi_errno == MPI_SUCCESS); +- END_FUNC(FCNAME); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_OFI_ANYSOURCE_POSTED); + } +--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4 ++++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/subconfigure.m4 +@@ -14,7 +14,6 @@ AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ + AM_COND_IF([BUILD_NEMESIS_NETMOD_OFI],[ + AC_MSG_NOTICE([RUNNING CONFIGURE FOR ch3:nemesis:ofi]) + +- PAC_SET_HEADER_LIB_PATH(ofi) + PAC_PUSH_FLAG(LIBS) + PAC_CHECK_HEADER_LIB_FATAL(ofi, rdma/fabric.h, fabric, fi_getinfo) + PAC_APPEND_FLAG([-lfabric],[WRAPPER_LIBS]) +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/Makefile.mk ++++ /dev/null +@@ -1,26 +0,0 @@ +-## -*- Mode: Makefile; -*- +-## vim: set ft=automake : +-## +-## (C) 2012 by Argonne National Laboratory. +-## See COPYRIGHT in top-level directory. +-## +- +-if BUILD_NEMESIS_NETMOD_PORTALS4 +- +-mpi_core_sources += \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/rptl.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/rptl_init.c \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/rptl_op.c +- +-noinst_HEADERS += \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h \ +- src/mpid/ch3/channels/nemesis/netmod/portals4/rptl.h +- +-endif BUILD_NEMESIS_NETMOD_PORTALS4 +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/errnames.txt ++++ /dev/null +@@ -1,38 +0,0 @@ +-**ptlinit:PtlInit() failed +-**ptlinit %s:PtlInit() failed (%s) +-**ptlniinit:PtlNIInit() failed +-**ptlniinit %s:PtlNIInit() failed (%s) +-**ptlgetid:PtlGetId() failed +-**ptlgetid %s:PtlGetId() failed (%s) +-**ptleqalloc:PtlEQAlloc() failed +-**ptleqalloc %s:PtlEQAlloc() failed (%s) +-**ptlptalloc:PtlPTAlloc() failed +-**ptlptalloc %s:PtlPTAlloc() failed (%s) +-**ptlptfree:PtlPTFree() failed +-**ptlptfree %s:PtlPTFree() failed (%s) +-**ptlnifini:PtlNIFini() failed +-**ptlnifini %s:PtlNIFini() failed (%s) +-**ptleqget:PtlEQGet() failed +-**ptleqget %s:PtlEQGet() failed (%s) +-**ptlleappend:PtlLEAppend() failed +-**ptlleappend %s:PtlLEAppend() failed (%s) +-**ptlleunlink:PtlLEUnlink() failed +-**ptlleunlink %s:PtlLEUnlink() failed (%s) +-**ptlmeappend:PtlMEAppend() failed +-**ptlmeappend %s:PtlMEAppend() failed (%s) +-**ptlmeunlink:PtlMEUnlink() failed +-**ptlmeunlink %s:PtlMEUnlink() failed (%s) +-**ptlmesearch:PtlMESearch() failed +-**ptlmesearch %s:PtlMESearch() failed (%s) +-**ptlmdbind:PtlMDBind() failed +-**ptlmdbind %s:PtlMDBind() failed (%s) +-**ptlmdrelease:PtlMDRelease() failed +-**ptlmdrelease %s:PtlMDRelease() failed (%s) +-**ptlput:PtlPut() failed +-**ptlput %s:PtlPut() failed (%s) +-**ptlget:PtlGet() failed +-**ptlget %s:PtlGet() failed (%s) +-**eqdropped:Event queue overflowed +-**badbusinesscard:Invalid business card +-**ptlni_fail:communication failure +-**ptlni_fail %s %s:communication failure event=%s fail_type=%s +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h ++++ /dev/null +@@ -1,258 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2012 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#ifndef PTL_IMPL_H_INCLUDED +-#define PTL_IMPL_H_INCLUDED +- +-#include +-#include +- +-#define PTL_MAX_EAGER (64*1024UL) /* 64K */ +- +-#define PTL_LARGE_THRESHOLD (64*1024UL) /* 64K */ +- +-extern ptl_handle_ni_t MPIDI_nem_ptl_ni; +-extern ptl_pt_index_t MPIDI_nem_ptl_pt; +-extern ptl_pt_index_t MPIDI_nem_ptl_get_pt; /* portal for gets by receiver */ +-extern ptl_pt_index_t MPIDI_nem_ptl_control_pt; /* portal for MPICH control messages */ +-extern ptl_pt_index_t MPIDI_nem_ptl_rpt_pt; /* portal for MPICH control messages */ +-extern ptl_handle_eq_t MPIDI_nem_ptl_origin_eq; +-extern ptl_handle_eq_t MPIDI_nem_ptl_eq; +-extern ptl_handle_eq_t MPIDI_nem_ptl_get_eq; +-extern ptl_handle_eq_t MPIDI_nem_ptl_control_eq; +-extern ptl_handle_eq_t MPIDI_nem_ptl_origin_eq; +-extern ptl_handle_eq_t MPIDI_nem_ptl_rpt_eq; +- +-extern ptl_handle_md_t MPIDI_nem_ptl_global_md; +-extern ptl_ni_limits_t MPIDI_nem_ptl_ni_limits; +- +-/* workaround for NULL operations */ +-extern char dummy; +- +-typedef int (* event_handler_fn)(const ptl_event_t *e); +- +-#define MPID_NEM_PTL_NUM_CHUNK_BUFFERS 2 +- +-typedef struct { +- ptl_handle_md_t md; +- ptl_handle_me_t put_me; +- ptl_handle_me_t *get_me_p; +- int num_gets; +- int put_done; +- void *recv_ptr; /* used for reordering in ptl_nm */ +- void *chunk_buffer[MPID_NEM_PTL_NUM_CHUNK_BUFFERS]; +- intptr_t bytes_put; +- int found; /* used in probes with PtlMESearch() */ +- event_handler_fn event_handler; +-} MPID_nem_ptl_req_area; +- +-/* macro for ptl private in req */ +-static inline MPID_nem_ptl_req_area * REQ_PTL(MPIR_Request *req) { +- return (MPID_nem_ptl_req_area *)req->ch.netmod_area.padding; +-} +- +-#define MPID_nem_ptl_init_req(req_) do { \ +- int i; \ +- for (i = 0; i < MPID_NEM_PTL_NUM_CHUNK_BUFFERS; ++i) { \ +- REQ_PTL(req_)->chunk_buffer[i] = NULL; \ +- } \ +- REQ_PTL(req_)->md = PTL_INVALID_HANDLE; \ +- REQ_PTL(req_)->put_me = PTL_INVALID_HANDLE; \ +- REQ_PTL(req_)->get_me_p = NULL; \ +- REQ_PTL(req_)->num_gets = 0; \ +- REQ_PTL(req_)->put_done = 0; \ +- REQ_PTL(req_)->event_handler = NULL; \ +- } while (0) +- +-#define MPID_nem_ptl_request_create_sreq(sreq_, errno_, comm_) do { \ +- (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); \ +- MPIR_Object_set_ref((sreq_), 2); \ +- MPIR_Comm_add_ref(comm_); \ +- (sreq_)->comm = comm_; \ +- (sreq_)->status.MPI_ERROR = MPI_SUCCESS; \ +- MPID_nem_ptl_init_req(sreq_); \ +- } while (0) +- +-typedef struct { +- ptl_process_t id; +- ptl_pt_index_t pt; +- ptl_pt_index_t ptg; +- ptl_pt_index_t ptc; +- ptl_pt_index_t ptr; +- ptl_pt_index_t ptrg; +- ptl_pt_index_t ptrc; +- int id_initialized; /* TRUE iff id and pt have been initialized */ +- intptr_t num_queued_sends; /* number of reqs for this vc in sendq */ +-} MPID_nem_ptl_vc_area; +- +-/* macro for ptl private in VC */ +-#define VC_PTL(vc) ((MPID_nem_ptl_vc_area *)vc->ch.netmod_area.padding) +- +-/* Header bit fields +- bit field +- ---- ------------------- +- 63 single/multiple +- 62 large/small +- 61 ssend +- 0-60 length +- +- Note: This means we support no more than 2^24 processes. +-*/ +-#define NPTL_SSEND ((ptl_hdr_data_t)1<<61) +-#define NPTL_LARGE ((ptl_hdr_data_t)1<<62) +-#define NPTL_MULTIPLE ((ptl_hdr_data_t)1<<63) +- +-#define NPTL_LENGTH_MASK (((ptl_hdr_data_t)1<<61)-1) +- +-#define NPTL_HEADER(flags_, length_) ((flags_) | (ptl_hdr_data_t)(length_)) +-#define NPTL_HEADER_GET_LENGTH(hdr_) ((hdr_) & NPTL_LENGTH_MASK) +- +-#define NPTL_MAX_LENGTH NPTL_LENGTH_MASK +- +-/* The comm_world rank of the sender is stored in the match_bits, but they are +- ignored when matching. +- bit field +- ---- ------------------- +- 32-63 Tag +- 16-31 Context id +- 0-15 Rank +-*/ +- +-#define NPTL_MATCH_TAG_OFFSET 32 +-#define NPTL_MATCH_CTX_OFFSET 16 +-#define NPTL_MATCH_RANK_MASK (((ptl_match_bits_t)(1) << 16) - 1) +-#define NPTL_MATCH_CTX_MASK ((((ptl_match_bits_t)(1) << 16) - 1) << NPTL_MATCH_CTX_OFFSET) +-#define NPTL_MATCH_TAG_MASK ((((ptl_match_bits_t)(1) << 32) - 1) << NPTL_MATCH_TAG_OFFSET) +-#define NPTL_MATCH(tag_, ctx_, rank_) ((((ptl_match_bits_t)(tag_) << NPTL_MATCH_TAG_OFFSET) & NPTL_MATCH_TAG_MASK) | \ +- (((ptl_match_bits_t)(ctx_) << NPTL_MATCH_CTX_OFFSET) & NPTL_MATCH_CTX_MASK) | \ +- ((ptl_match_bits_t)(rank_) & NPTL_MATCH_RANK_MASK)) +-#define NPTL_MATCH_IGNORE (NPTL_MATCH_RANK_MASK | (ptl_match_bits_t)(MPIR_TAG_ERROR_BIT | MPIR_TAG_PROC_FAILURE_BIT) << 32) +-#define NPTL_MATCH_IGNORE_ANY_TAG (NPTL_MATCH_IGNORE | NPTL_MATCH_TAG_MASK) +- +-#define NPTL_MATCH_GET_RANK(match_bits_) ((match_bits_) & NPTL_MATCH_RANK_MASK) +-#define NPTL_MATCH_GET_CTX(match_bits_) (((match_bits_) & NPTL_MATCH_CTX_MASK) >> NPTL_MATCH_CTX_OFFSET) +-#define NPTL_MATCH_GET_TAG(match_bits_) ((match_bits_) >> NPTL_MATCH_TAG_OFFSET) +- +-int MPID_nem_ptl_nm_init(void); +-int MPID_nem_ptl_nm_finalize(void); +-int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e); +-int MPID_nem_ptl_sendq_complete_with_error(MPIDI_VC_t *vc, int req_errno); +-int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz); +-int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz, +- MPIR_Request **sreq_ptr); +-int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz, +- void *data, intptr_t data_sz); +-int MPID_nem_ptl_poll_init(void); +-int MPID_nem_ptl_poll_finalize(void); +-int MPID_nem_ptl_poll(int is_blocking_poll); +-int MPID_nem_ptl_vc_terminated(MPIDI_VC_t *vc); +-int MPID_nem_ptl_get_id_from_bc(const char *business_card, ptl_process_t *id, ptl_pt_index_t *pt, ptl_pt_index_t *ptg, +- ptl_pt_index_t *ptc, ptl_pt_index_t *ptr, ptl_pt_index_t *ptrg, ptl_pt_index_t *ptrc); +- +-/* comm override functions */ +-int MPID_nem_ptl_recv_posted(struct MPIDI_VC *vc, struct MPIR_Request *req); +-/* isend is also used to implement send, rsend and irsend */ +-int MPID_nem_ptl_isend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, +- MPIR_Comm *comm, int context_offset, struct MPIR_Request **request); +-/* issend is also used to implement ssend */ +-int MPID_nem_ptl_issend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, +- MPIR_Comm *comm, int context_offset, struct MPIR_Request **request); +-int MPID_nem_ptl_cancel_send(struct MPIDI_VC *vc, struct MPIR_Request *sreq); +-int MPID_nem_ptl_cancel_recv(struct MPIDI_VC *vc, struct MPIR_Request *rreq); +-int MPID_nem_ptl_probe(struct MPIDI_VC *vc, int source, int tag, MPIR_Comm *comm, int context_offset, MPI_Status *status); +-int MPID_nem_ptl_iprobe(struct MPIDI_VC *vc, int source, int tag, MPIR_Comm *comm, int context_offset, int *flag, +- MPI_Status *status); +-int MPID_nem_ptl_improbe(struct MPIDI_VC *vc, int source, int tag, MPIR_Comm *comm, int context_offset, int *flag, +- MPIR_Request **message, MPI_Status *status); +-int MPID_nem_ptl_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPI_Status * status); +-int MPID_nem_ptl_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPIR_Request **message, +- MPI_Status * status); +-void MPID_nem_ptl_anysource_posted(MPIR_Request *rreq); +-int MPID_nem_ptl_anysource_matched(MPIR_Request *rreq); +-int MPID_nem_ptl_init_id(MPIDI_VC_t *vc); +-int MPID_nem_ptl_get_ordering(int *ordering); +- +-int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPIR_Request *req); +-int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc, MPIR_Request *rreq, MPL_IOV s_cookie); +-int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV r_cookie); +-int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie); +-int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPIR_Request *req); +-int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPIR_Request *req); +- +-/* packet handlers */ +- +-int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, +- void *data ATTRIBUTE((unused)), +- intptr_t *buflen, MPIR_Request **rreqp); +-int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, +- void *data ATTRIBUTE((unused)), +- intptr_t *buflen, MPIR_Request **rreqp); +- +-/* local packet types */ +- +-typedef enum MPIDI_nem_ptl_pkt_type { +- MPIDI_NEM_PTL_PKT_CANCEL_SEND_REQ, +- MPIDI_NEM_PTL_PKT_CANCEL_SEND_RESP, +- MPIDI_NEM_PTL_PKT_INVALID = -1 /* force signed, to avoid warnings */ +-} MPIDI_nem_ptl_pkt_type_t; +- +-typedef struct MPIDI_nem_ptl_pkt_cancel_send_req +-{ +- MPIDI_CH3_Pkt_type_t type; +- unsigned subtype; +- MPIDI_Message_match match; +- MPI_Request sender_req_id; +-} MPIDI_nem_ptl_pkt_cancel_send_req_t; +- +-typedef struct MPIDI_nem_ptl_pkt_cancel_send_resp +-{ +- MPIDI_CH3_Pkt_type_t type; +- unsigned subtype; +- MPI_Request sender_req_id; +- int ack; +-} MPIDI_nem_ptl_pkt_cancel_send_resp_t; +- +-/* debugging */ +-const char *MPID_nem_ptl_strerror(int ret); +-const char *MPID_nem_ptl_strevent(const ptl_event_t *ev); +-const char *MPID_nem_ptl_strnifail(ptl_ni_fail_t ni_fail); +-const char *MPID_nem_ptl_strlist(ptl_list_t list); +- +-#define DBG_MSG_PUT(md_, data_sz_, pg_rank_, match_, header_) do { \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "MPID_nem_ptl_rptl_put: md=%s data_sz=%lu pg_rank=%d", md_, data_sz_, pg_rank_)); \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, " tag=%#lx ctx=%#lx rank=%ld match=%#lx", \ +- NPTL_MATCH_GET_TAG(match_), NPTL_MATCH_GET_CTX(match_), NPTL_MATCH_GET_RANK(match_), match_)); \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, " flags=%c%c%c data_sz=%ld header=%#lx", \ +- header_ & NPTL_SSEND ? 'S':' ', \ +- header_ & NPTL_LARGE ? 'L':' ', \ +- header_ & NPTL_MULTIPLE ? 'M':' ', \ +- NPTL_HEADER_GET_LENGTH(header_), header_)); \ +- } while(0) +- +-#define DBG_MSG_GET(md_, data_sz_, pg_rank_, match_) do { \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "PtlGet: md=%s data_sz=%lu pg_rank=%d", md_, data_sz_, pg_rank_)); \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, " tag=%#lx ctx=%#lx rank=%ld match=%#lx", \ +- NPTL_MATCH_GET_TAG(match_), NPTL_MATCH_GET_CTX(match_), NPTL_MATCH_GET_RANK(match_), match_)); \ +- } while(0) +- +-#define DBG_MSG_MEAPPEND(pt_, pg_rank_, me_, usr_ptr_) do { \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "PtlMEAppend: pt=%s pg_rank=%d me.start=%p me.length=%lu is_IOV=%d usr_ptr=%p", \ +- pt_, pg_rank_, me_.start, me_.length, me_.options & PTL_IOVEC, usr_ptr_)); \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, " tag=%#lx ctx=%#lx rank=%ld match=%#lx ignore=%#lx", \ +- NPTL_MATCH_GET_TAG(me_.match_bits), NPTL_MATCH_GET_CTX(me_.match_bits), \ +- NPTL_MATCH_GET_RANK(me_.match_bits), me_.match_bits, me_.ignore_bits)); \ +- } while(0) +- +-#define DBG_MSG_MESearch(pt_, pg_rank_, me_, usr_ptr_) do { \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "PtlMESearch: pt=%s pg_rank=%d usr_ptr=%p", pt_, pg_rank_, usr_ptr_)); \ +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, " tag=%#lx ctx=%#lx rank=%ld match=%#lx ignore=%#lx", \ +- NPTL_MATCH_GET_TAG(me_.match_bits), NPTL_MATCH_GET_CTX(me_.match_bits), \ +- NPTL_MATCH_GET_RANK(me_.match_bits), me_.match_bits, me_.ignore_bits)); \ +- } while(0) +- +- +- +-#endif /* PTL_IMPL_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c ++++ /dev/null +@@ -1,740 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2012 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +-#include +-#include "rptl.h" +- +-#ifdef ENABLE_CHECKPOINTING +-#error Checkpointing not implemented +-#endif +- +-#define UNEXPECTED_HDR_COUNT (1024*64) +-#define EVENT_COUNT (1024*64) +-#define LIST_SIZE (1024*64) +-#define MAX_ENTRIES (1024*64) +-#define ENTRY_COUNT (1024*64) +-/* FIXME: turn ORIGIN_EVENTS into a CVAR */ +-#define ORIGIN_EVENTS (500) +-#define NID_KEY "NID" +-#define PID_KEY "PID" +-#define PTI_KEY "PTI" +-#define PTIG_KEY "PTIG" +-#define PTIC_KEY "PTIC" +-#define PTIR_KEY "PTIR" +-#define PTIRG_KEY "PTIRG" +-#define PTIRC_KEY "PTIRC" +- +-ptl_handle_ni_t MPIDI_nem_ptl_ni; +-ptl_pt_index_t MPIDI_nem_ptl_pt; +-ptl_pt_index_t MPIDI_nem_ptl_get_pt; /* portal for gets by receiver */ +-ptl_pt_index_t MPIDI_nem_ptl_control_pt; /* portal for MPICH control messages */ +-ptl_pt_index_t MPIDI_nem_ptl_rpt_pt; /* portal for rportals control messages */ +-ptl_handle_eq_t MPIDI_nem_ptl_eq; +-ptl_handle_eq_t MPIDI_nem_ptl_get_eq; +-ptl_handle_eq_t MPIDI_nem_ptl_control_eq; +-ptl_handle_eq_t MPIDI_nem_ptl_origin_eq; +-ptl_handle_eq_t MPIDI_nem_ptl_rpt_eq; +-ptl_pt_index_t MPIDI_nem_ptl_control_rpt_pt; /* portal for rportals control messages */ +-ptl_pt_index_t MPIDI_nem_ptl_get_rpt_pt; /* portal for rportals control messages */ +-ptl_handle_md_t MPIDI_nem_ptl_global_md; +-ptl_ni_limits_t MPIDI_nem_ptl_ni_limits; +- +-char dummy; +- +-static int ptl_init(MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p); +-static int ptl_finalize(void); +-static int get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p); +-static int connect_to_root(const char *business_card, MPIDI_VC_t *new_vc); +-static int vc_init(MPIDI_VC_t *vc); +-static int vc_destroy(MPIDI_VC_t *vc); +-static int vc_terminate(MPIDI_VC_t *vc); +- +-MPID_nem_netmod_funcs_t MPIDI_nem_portals4_funcs = { +- ptl_init, +- ptl_finalize, +- MPID_nem_ptl_poll, +- get_business_card, +- connect_to_root, +- vc_init, +- vc_destroy, +- vc_terminate, +- MPID_nem_ptl_anysource_iprobe, +- MPID_nem_ptl_anysource_improbe, +- MPID_nem_ptl_get_ordering +-}; +- +-static MPIDI_Comm_ops_t comm_ops = { +- MPID_nem_ptl_recv_posted, /* recv_posted */ +- +- MPID_nem_ptl_isend, /* send */ +- MPID_nem_ptl_isend, /* rsend */ +- MPID_nem_ptl_issend, /* ssend */ +- MPID_nem_ptl_isend, /* isend */ +- MPID_nem_ptl_isend, /* irsend */ +- MPID_nem_ptl_issend, /* issend */ +- +- NULL, /* send_init */ +- NULL, /* bsend_init */ +- NULL, /* rsend_init */ +- NULL, /* ssend_init */ +- NULL, /* startall */ +- +- MPID_nem_ptl_cancel_send, /* cancel_send */ +- MPID_nem_ptl_cancel_recv, /* cancel_recv */ +- +- MPID_nem_ptl_probe, /* probe */ +- MPID_nem_ptl_iprobe, /* iprobe */ +- MPID_nem_ptl_improbe, /* improbe */ +- NULL /* imrecv */ +-}; +- +-static MPIDI_CH3_PktHandler_Fcn *MPID_nem_ptl_pkt_handlers[2]; /* for CANCEL_SEND_REQ and CANCEL_SEND_RESP */ +- +-#undef FUNCNAME +-#define FUNCNAME get_target_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int get_target_info(int rank, ptl_process_t *id, ptl_pt_index_t local_data_pt, ptl_pt_index_t *target_data_pt, +- ptl_pt_index_t *target_control_pt) +-{ +- int mpi_errno = MPI_SUCCESS; +- struct MPIDI_VC *vc; +- MPID_nem_ptl_vc_area *vc_ptl; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_GET_TARGET_INFO); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_GET_TARGET_INFO); +- +- MPIDI_PG_Get_vc(MPIDI_Process.my_pg, rank, &vc); +- vc_ptl = VC_PTL(vc); +- if (!vc_ptl->id_initialized) { +- mpi_errno = MPID_nem_ptl_init_id(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +- *id = vc_ptl->id; +- +- MPIR_Assert(local_data_pt == MPIDI_nem_ptl_pt || local_data_pt == MPIDI_nem_ptl_get_pt || +- local_data_pt == MPIDI_nem_ptl_control_pt); +- +- if (local_data_pt == MPIDI_nem_ptl_pt) { +- *target_data_pt = vc_ptl->pt; +- *target_control_pt = vc_ptl->ptr; +- } +- else if (local_data_pt == MPIDI_nem_ptl_get_pt) { +- *target_data_pt = vc_ptl->ptg; +- *target_control_pt = PTL_PT_ANY; +- } +- else if (local_data_pt == MPIDI_nem_ptl_control_pt) { +- *target_data_pt = vc_ptl->ptc; +- *target_control_pt = vc_ptl->ptrc; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_GET_TARGET_INFO); +- return mpi_errno; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME ptl_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int ptl_init(MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret; +- ptl_md_t md; +- ptl_ni_limits_t desired; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_PTL_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_PTL_INIT); +- +- /* first make sure that our private fields in the vc and req fit into the area provided */ +- MPIR_Assert(sizeof(MPID_nem_ptl_vc_area) <= MPIDI_NEM_VC_NETMOD_AREA_LEN); +- MPIR_Assert(sizeof(MPID_nem_ptl_req_area) <= MPIDI_NEM_REQ_NETMOD_AREA_LEN); +- +- /* Make sure our IOV is the same as portals4's IOV */ +- MPIR_Assert(sizeof(ptl_iovec_t) == sizeof(MPL_IOV)); +- MPIR_Assert(((void*)&(((ptl_iovec_t*)0)->iov_base)) == ((void*)&(((MPL_IOV*)0)->MPL_IOV_BUF))); +- MPIR_Assert(((void*)&(((ptl_iovec_t*)0)->iov_len)) == ((void*)&(((MPL_IOV*)0)->MPL_IOV_LEN))); +- MPIR_Assert(sizeof(((ptl_iovec_t*)0)->iov_len) == sizeof(((MPL_IOV*)0)->MPL_IOV_LEN)); +- +- +- mpi_errno = MPIDI_CH3I_Register_anysource_notification(MPID_nem_ptl_anysource_posted, MPID_nem_ptl_anysource_matched); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- MPIDI_Anysource_improbe_fn = MPID_nem_ptl_anysource_improbe; +- +- /* init portals */ +- ret = PtlInit(); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlinit", "**ptlinit %s", MPID_nem_ptl_strerror(ret)); +- +- /* do an interface pre-init to get the default limits struct */ +- ret = PtlNIInit(PTL_IFACE_DEFAULT, PTL_NI_MATCHING | PTL_NI_PHYSICAL, +- PTL_PID_ANY, NULL, &desired, &MPIDI_nem_ptl_ni); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlniinit", "**ptlniinit %s", MPID_nem_ptl_strerror(ret)); +- +- /* finalize the interface so we can re-init with our desired maximums */ +- ret = PtlNIFini(MPIDI_nem_ptl_ni); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlnifini", "**ptlnifini %s", MPID_nem_ptl_strerror(ret)); +- +- /* set higher limits if they are determined to be too low */ +- if (desired.max_unexpected_headers < UNEXPECTED_HDR_COUNT && getenv("PTL_LIM_MAX_UNEXPECTED_HEADERS") == NULL) +- desired.max_unexpected_headers = UNEXPECTED_HDR_COUNT; +- if (desired.max_list_size < LIST_SIZE && getenv("PTL_LIM_MAX_LIST_SIZE") == NULL) +- desired.max_list_size = LIST_SIZE; +- if (desired.max_entries < ENTRY_COUNT && getenv("PTL_LIM_MAX_ENTRIES") == NULL) +- desired.max_entries = ENTRY_COUNT; +- +- /* do the real init */ +- ret = PtlNIInit(PTL_IFACE_DEFAULT, PTL_NI_MATCHING | PTL_NI_PHYSICAL, +- PTL_PID_ANY, &desired, &MPIDI_nem_ptl_ni_limits, &MPIDI_nem_ptl_ni); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlniinit", "**ptlniinit %s", MPID_nem_ptl_strerror(ret)); +- +- /* allocate EQs for each portal */ +- ret = PtlEQAlloc(MPIDI_nem_ptl_ni, EVENT_COUNT, &MPIDI_nem_ptl_eq); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptleqalloc", "**ptleqalloc %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlEQAlloc(MPIDI_nem_ptl_ni, EVENT_COUNT, &MPIDI_nem_ptl_get_eq); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptleqalloc", "**ptleqalloc %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlEQAlloc(MPIDI_nem_ptl_ni, EVENT_COUNT, &MPIDI_nem_ptl_control_eq); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptleqalloc", "**ptleqalloc %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlEQAlloc(MPIDI_nem_ptl_ni, EVENT_COUNT, &MPIDI_nem_ptl_rpt_eq); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptleqalloc", "**ptleqalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* allocate a separate EQ for origin events. with this, we can implement rate-limit operations +- to prevent a locally triggered flow control even */ +- ret = PtlEQAlloc(MPIDI_nem_ptl_ni, EVENT_COUNT, &MPIDI_nem_ptl_origin_eq); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptleqalloc", "**ptleqalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* allocate portal for matching messages */ +- ret = PtlPTAlloc(MPIDI_nem_ptl_ni, PTL_PT_ONLY_USE_ONCE | PTL_PT_ONLY_TRUNCATE | PTL_PT_FLOWCTRL, MPIDI_nem_ptl_eq, +- PTL_PT_ANY, &MPIDI_nem_ptl_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* allocate portal for large messages where receiver does a get */ +- ret = PtlPTAlloc(MPIDI_nem_ptl_ni, PTL_PT_ONLY_USE_ONCE | PTL_PT_ONLY_TRUNCATE | PTL_PT_FLOWCTRL, MPIDI_nem_ptl_get_eq, +- PTL_PT_ANY, &MPIDI_nem_ptl_get_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* allocate portal for MPICH control messages */ +- ret = PtlPTAlloc(MPIDI_nem_ptl_ni, PTL_PT_ONLY_USE_ONCE | PTL_PT_ONLY_TRUNCATE | PTL_PT_FLOWCTRL, MPIDI_nem_ptl_control_eq, +- PTL_PT_ANY, &MPIDI_nem_ptl_control_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* allocate portal for MPICH control messages */ +- ret = PtlPTAlloc(MPIDI_nem_ptl_ni, PTL_PT_ONLY_USE_ONCE | PTL_PT_ONLY_TRUNCATE | PTL_PT_FLOWCTRL, MPIDI_nem_ptl_rpt_eq, +- PTL_PT_ANY, &MPIDI_nem_ptl_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* allocate portal for MPICH control messages */ +- ret = PtlPTAlloc(MPIDI_nem_ptl_ni, PTL_PT_ONLY_USE_ONCE | PTL_PT_ONLY_TRUNCATE | PTL_PT_FLOWCTRL, MPIDI_nem_ptl_rpt_eq, +- PTL_PT_ANY, &MPIDI_nem_ptl_get_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* allocate portal for MPICH control messages */ +- ret = PtlPTAlloc(MPIDI_nem_ptl_ni, PTL_PT_ONLY_USE_ONCE | PTL_PT_ONLY_TRUNCATE | PTL_PT_FLOWCTRL, MPIDI_nem_ptl_rpt_eq, +- PTL_PT_ANY, &MPIDI_nem_ptl_control_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* create an MD that covers all of memory */ +- md.start = 0; +- md.length = (ptl_size_t)-1; +- md.options = 0x0; +- md.eq_handle = MPIDI_nem_ptl_origin_eq; +- md.ct_handle = PTL_CT_NONE; +- ret = PtlMDBind(MPIDI_nem_ptl_ni, &md, &MPIDI_nem_ptl_global_md); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdbind", "**ptlmdbind %s", MPID_nem_ptl_strerror(ret)); +- +- /* currently, rportlas only works with a single NI and EQ */ +- ret = MPID_nem_ptl_rptl_init(MPIDI_Process.my_pg->size, ORIGIN_EVENTS, get_target_info); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlniinit", "**ptlniinit %s", MPID_nem_ptl_strerror(ret)); +- +- /* allow rportal to manage the primary portal and retransmit if needed */ +- ret = MPID_nem_ptl_rptl_ptinit(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_origin_eq, MPIDI_nem_ptl_pt, MPIDI_nem_ptl_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* allow rportal to manage the get and control portals, but we +- * don't expect retransmission to be needed on the get portal, so +- * we pass PTL_PT_ANY as the dummy portal. unfortunately, portals +- * does not have an "invalid" PT constant, which would have been +- * more appropriate to pass over here. */ +- ret = MPID_nem_ptl_rptl_ptinit(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_origin_eq, MPIDI_nem_ptl_get_pt, MPIDI_nem_ptl_get_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- ret = MPID_nem_ptl_rptl_ptinit(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_origin_eq, MPIDI_nem_ptl_control_pt, MPIDI_nem_ptl_control_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptalloc", "**ptlptalloc %s", MPID_nem_ptl_strerror(ret)); +- +- /* create business card */ +- mpi_errno = get_business_card(pg_rank, bc_val_p, val_max_sz_p); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- /* init other modules */ +- mpi_errno = MPID_nem_ptl_poll_init(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPID_nem_ptl_nm_init(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_PTL_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME ptl_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int ptl_finalize(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret; +- ptl_handle_eq_t eqs[5]; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_PTL_FINALIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_PTL_FINALIZE); +- +- /* shut down other modules */ +- mpi_errno = MPID_nem_ptl_nm_finalize(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPID_nem_ptl_poll_finalize(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- /* shut down portals */ +- eqs[0] = MPIDI_nem_ptl_eq; +- eqs[1] = MPIDI_nem_ptl_get_eq; +- eqs[2] = MPIDI_nem_ptl_control_eq; +- eqs[3] = MPIDI_nem_ptl_origin_eq; +- eqs[4] = MPIDI_nem_ptl_rpt_eq; +- ret = MPID_nem_ptl_rptl_drain_eq(5, eqs); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = MPID_nem_ptl_rptl_ptfini(MPIDI_nem_ptl_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlPTFree(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = MPID_nem_ptl_rptl_ptfini(MPIDI_nem_ptl_get_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlPTFree(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_get_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = MPID_nem_ptl_rptl_ptfini(MPIDI_nem_ptl_control_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlPTFree(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_control_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlPTFree(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlPTFree(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_get_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlPTFree(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_control_rpt_pt); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlptfree", "**ptlptfree %s", MPID_nem_ptl_strerror(ret)); +- +- ret = PtlNIFini(MPIDI_nem_ptl_ni); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlnifini", "**ptlnifini %s", MPID_nem_ptl_strerror(ret)); +- +- PtlFini(); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_PTL_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +- +- +-#undef FUNCNAME +-#define FUNCNAME get_business_card +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- int str_errno = MPL_STR_SUCCESS; +- int ret; +- ptl_process_t my_ptl_id; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_GET_BUSINESS_CARD); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_GET_BUSINESS_CARD); +- +- ret = PtlGetId(MPIDI_nem_ptl_ni, &my_ptl_id); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlgetid", "**ptlgetid %s", MPID_nem_ptl_strerror(ret)); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "Allocated NI and PT id=(%#x,%#x) pt=%#x", +- my_ptl_id.phys.nid, my_ptl_id.phys.pid, MPIDI_nem_ptl_pt)); +- +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, NID_KEY, (char *)&my_ptl_id.phys.nid, sizeof(my_ptl_id.phys.nid)); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, PID_KEY, (char *)&my_ptl_id.phys.pid, sizeof(my_ptl_id.phys.pid)); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, PTI_KEY, (char *)&MPIDI_nem_ptl_pt, sizeof(MPIDI_nem_ptl_pt)); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, PTIG_KEY, (char *)&MPIDI_nem_ptl_get_pt, +- sizeof(MPIDI_nem_ptl_get_pt)); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, PTIC_KEY, (char *)&MPIDI_nem_ptl_control_pt, +- sizeof(MPIDI_nem_ptl_control_pt)); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, PTIR_KEY, (char *)&MPIDI_nem_ptl_rpt_pt, +- sizeof(MPIDI_nem_ptl_rpt_pt)); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, PTIRG_KEY, (char *)&MPIDI_nem_ptl_get_rpt_pt, +- sizeof(MPIDI_nem_ptl_get_rpt_pt)); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- str_errno = MPL_str_add_binary_arg(bc_val_p, val_max_sz_p, PTIRC_KEY, (char *)&MPIDI_nem_ptl_control_rpt_pt, +- sizeof(MPIDI_nem_ptl_control_rpt_pt)); +- if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_GET_BUSINESS_CARD); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME connect_to_root +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int connect_to_root(const char *business_card, MPIDI_VC_t *new_vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CONNECT_TO_ROOT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CONNECT_TO_ROOT); +- +- MPIR_ERR_SETFATAL(mpi_errno, MPI_ERR_OTHER, "**notimpl"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CONNECT_TO_ROOT); +- return mpi_errno; +- +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME vc_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int vc_init(MPIDI_VC_t *vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH3I_VC *const vc_ch = &vc->ch; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_VC_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_VC_INIT); +- +- vc->sendNoncontig_fn = MPID_nem_ptl_SendNoncontig; +- vc_ch->iStartContigMsg = MPID_nem_ptl_iStartContigMsg; +- vc_ch->iSendContig = MPID_nem_ptl_iSendContig; +- +- vc_ch->num_pkt_handlers = 2; +- vc_ch->pkt_handler = MPID_nem_ptl_pkt_handlers; +- MPID_nem_ptl_pkt_handlers[MPIDI_NEM_PTL_PKT_CANCEL_SEND_REQ] = +- MPID_nem_ptl_pkt_cancel_send_req_handler; +- MPID_nem_ptl_pkt_handlers[MPIDI_NEM_PTL_PKT_CANCEL_SEND_RESP] = +- MPID_nem_ptl_pkt_cancel_send_resp_handler; +- +- vc_ch->lmt_initiate_lmt = MPID_nem_ptl_lmt_initiate_lmt; +- vc_ch->lmt_start_recv = MPID_nem_ptl_lmt_start_recv; +- vc_ch->lmt_start_send = MPID_nem_ptl_lmt_start_send; +- vc_ch->lmt_handle_cookie = MPID_nem_ptl_lmt_handle_cookie; +- vc_ch->lmt_done_send = MPID_nem_ptl_lmt_done_send; +- vc_ch->lmt_done_recv = MPID_nem_ptl_lmt_done_recv; +- +- vc->comm_ops = &comm_ops; +- +- vc_ch->next = NULL; +- vc_ch->prev = NULL; +- +- vc_ptl->id_initialized = FALSE; +- vc_ptl->num_queued_sends = 0; +- +- mpi_errno = MPID_nem_ptl_init_id(vc); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_VC_INIT); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME vc_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int vc_destroy(MPIDI_VC_t *vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- /* currently do nothing */ +- +- return mpi_errno; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_get_id_from_bc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_get_id_from_bc(const char *business_card, ptl_process_t *id, ptl_pt_index_t *pt, ptl_pt_index_t *ptg, ptl_pt_index_t *ptc, ptl_pt_index_t *ptr, ptl_pt_index_t *ptrg, ptl_pt_index_t *ptrc) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret; +- int len; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_GET_ID_FROM_BC); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_GET_ID_FROM_BC); +- +- ret = MPL_str_get_binary_arg(business_card, NID_KEY, (char *)&id->phys.nid, sizeof(id->phys.nid), &len); +- MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS || len != sizeof(id->phys.nid), mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); +- +- ret = MPL_str_get_binary_arg(business_card, PID_KEY, (char *)&id->phys.pid, sizeof(id->phys.pid), &len); +- MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS || len != sizeof(id->phys.pid), mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); +- +- ret = MPL_str_get_binary_arg(business_card, PTI_KEY, (char *)pt, sizeof(*pt), &len); +- MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS || len != sizeof(*pt), mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); +- +- ret = MPL_str_get_binary_arg(business_card, PTIG_KEY, (char *)ptg, sizeof(*ptg), &len); +- MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS || len != sizeof(*ptg), mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); +- +- ret = MPL_str_get_binary_arg(business_card, PTIC_KEY, (char *)ptc, sizeof(*ptc), &len); +- MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS || len != sizeof(*ptc), mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); +- +- ret = MPL_str_get_binary_arg(business_card, PTIR_KEY, (char *)ptr, sizeof(*ptr), &len); +- MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS || len != sizeof(*ptr), mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); +- +- ret = MPL_str_get_binary_arg(business_card, PTIRG_KEY, (char *)ptrg, sizeof(*ptrg), &len); +- MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS || len != sizeof(*ptrg), mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); +- +- ret = MPL_str_get_binary_arg(business_card, PTIRC_KEY, (char *)ptrc, sizeof(*ptrc), &len); +- MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS || len != sizeof(*ptrc), mpi_errno, MPI_ERR_OTHER, "**badbusinesscard"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_GET_ID_FROM_BC); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME vc_terminate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int vc_terminate(MPIDI_VC_t *vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- int req_errno = MPI_SUCCESS; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_VC_TERMINATE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_VC_TERMINATE); +- +- if (vc->state != MPIDI_VC_STATE_CLOSED) { +- /* VC is terminated as a result of a fault. Complete +- outstanding sends with an error and terminate +- connection immediately. */ +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- mpi_errno = MPID_nem_ptl_vc_terminated(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } else if (vc_ptl->num_queued_sends == 0) { +- mpi_errno = MPID_nem_ptl_vc_terminated(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } else { +- /* the send_queued function will call vc_terminated if vc->state is +- CLOSED and the last queued send has been sent*/ +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_VC_TERMINATE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_vc_terminated +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_vc_terminated(MPIDI_VC_t *vc) +-{ +- /* This is called when the VC is to be terminated once all queued +- sends have been sent. */ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_NEM_PTL_VC_TERMINATED); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_NEM_PTL_VC_TERMINATED); +- +- mpi_errno = MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED); +- if(mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_NEM_PTL_VC_TERMINATED); +- return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_init_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_init_id(MPIDI_VC_t *vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- char *bc; +- int pmi_errno; +- int val_max_sz; +- MPIR_CHKLMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_INIT_ID); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_INIT_ID); +- +- pmi_errno = PMI_KVS_Get_value_length_max(&val_max_sz); +- MPIR_ERR_CHKANDJUMP1(pmi_errno, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %d", pmi_errno); +- MPIR_CHKLMEM_MALLOC(bc, char *, val_max_sz, mpi_errno, "bc", MPL_MEM_ADDRESS); +- +- mpi_errno = vc->pg->getConnInfo(vc->pg_rank, bc, val_max_sz, vc->pg); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPID_nem_ptl_get_id_from_bc(bc, &vc_ptl->id, &vc_ptl->pt, &vc_ptl->ptg, &vc_ptl->ptc, &vc_ptl->ptr, &vc_ptl->ptrg, &vc_ptl->ptrc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- vc_ptl->id_initialized = TRUE; +- +- MPIDI_CHANGE_VC_STATE(vc, ACTIVE); +- +- fn_exit: +- MPIR_CHKLMEM_FREEALL(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_INIT_ID); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_get_ordering +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_get_ordering(int *ordering) +-{ +- (*ordering) = 1; +- return MPI_SUCCESS; +-} +- +- +-#define CASE_STR(x) case x: return #x +- +-const char *MPID_nem_ptl_strerror(int ret) +-{ +- switch (ret) { +- CASE_STR(PTL_OK); +- CASE_STR(PTL_ARG_INVALID); +- CASE_STR(PTL_CT_NONE_REACHED); +- CASE_STR(PTL_EQ_DROPPED); +- CASE_STR(PTL_EQ_EMPTY); +- CASE_STR(PTL_FAIL); +- CASE_STR(PTL_IN_USE); +- CASE_STR(PTL_INTERRUPTED); +- CASE_STR(PTL_IGNORED); +- CASE_STR(PTL_LIST_TOO_LONG); +- CASE_STR(PTL_NO_INIT); +- CASE_STR(PTL_NO_SPACE); +- CASE_STR(PTL_PID_IN_USE); +- CASE_STR(PTL_PT_FULL); +- CASE_STR(PTL_PT_EQ_NEEDED); +- CASE_STR(PTL_PT_IN_USE); +- default: return "UNKNOWN"; +- } +-} +- +-const char *MPID_nem_ptl_strnifail(ptl_ni_fail_t ni_fail) +-{ +- switch (ni_fail) { +- CASE_STR(PTL_NI_OK); +- CASE_STR(PTL_NI_UNDELIVERABLE); +- CASE_STR(PTL_NI_DROPPED); +- CASE_STR(PTL_NI_PT_DISABLED); +- CASE_STR(PTL_NI_PERM_VIOLATION); +- CASE_STR(PTL_NI_OP_VIOLATION); +- CASE_STR(PTL_NI_NO_MATCH); +- CASE_STR(PTL_NI_SEGV); +- default: return "UNKNOWN"; +- } +-} +- +-const char *MPID_nem_ptl_strevent(const ptl_event_t *ev) +-{ +- switch (ev->type) { +- CASE_STR(PTL_EVENT_GET); +- CASE_STR(PTL_EVENT_GET_OVERFLOW); +- CASE_STR(PTL_EVENT_PUT); +- CASE_STR(PTL_EVENT_PUT_OVERFLOW); +- CASE_STR(PTL_EVENT_ATOMIC); +- CASE_STR(PTL_EVENT_ATOMIC_OVERFLOW); +- CASE_STR(PTL_EVENT_FETCH_ATOMIC); +- CASE_STR(PTL_EVENT_FETCH_ATOMIC_OVERFLOW); +- CASE_STR(PTL_EVENT_REPLY); +- CASE_STR(PTL_EVENT_SEND); +- CASE_STR(PTL_EVENT_ACK); +- CASE_STR(PTL_EVENT_PT_DISABLED); +- CASE_STR(PTL_EVENT_LINK); +- CASE_STR(PTL_EVENT_AUTO_UNLINK); +- CASE_STR(PTL_EVENT_AUTO_FREE); +- CASE_STR(PTL_EVENT_SEARCH); +- default: return "UNKNOWN"; +- } +-} +- +-const char *MPID_nem_ptl_strlist(ptl_list_t pt_list) +-{ +- switch (pt_list) { +- CASE_STR(PTL_OVERFLOW_LIST); +- CASE_STR(PTL_PRIORITY_LIST); +- default: return "UNKNOWN"; +- } +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c ++++ /dev/null +@@ -1,70 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +- +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_lmt_initiate_lmt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPIR_Request *req) +-{ +- /* Nothing to do here, but has to be defined for CH3 to follow the right path to +- MPID_nem_ptl_lmt_start_recv */ +- return MPI_SUCCESS; +-} +- +- +- +-/* The following function is implemented in ptl_recv.c to make use of the handlers defined there */ +-/* int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc, MPIR_Request *rreq, MPL_IOV s_cookie) */ +- +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_lmt_start_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV r_cookie) +-{ +- MPIR_Assertp(0 && "This function shouldn't be called."); +- return MPI_ERR_INTERN; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_lmt_handle_cookie +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie) +-{ +- MPIR_Assertp(0 && "This function shouldn't be called."); +- return MPI_ERR_INTERN; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_lmt_done_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPIR_Request *req) +-{ +- MPIR_Assertp(0 && "This function shouldn't be called."); +- return MPI_ERR_INTERN; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_lmt_done_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPIR_Request *req) +-{ +- MPIR_Assertp(0 && "This function shouldn't be called."); +- return MPI_ERR_INTERN; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c ++++ /dev/null +@@ -1,625 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2012 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +-#include "utlist.h" +-#include "rptl.h" +- +-#define NUM_RECV_BUFS 2 +-#define BUFSIZE (1024*1024*50) +-#define CTL_TAG 0 +-#define GET_TAG 1 +-#define PAYLOAD_SIZE (PTL_MAX_EAGER - sizeof(MPIDI_CH3_Pkt_t)) +-#define SENDBUF_SIZE(sent_sz_) (sizeof(MPIDI_CH3_Pkt_t) + (sent_sz_)) +-#define SENDBUF(req_) REQ_PTL(req_)->chunk_buffer[0] +-#define TMPBUF(req_) REQ_PTL(req_)->chunk_buffer[1] +- +-static char *recvbufs[NUM_RECV_BUFS]; +-static ptl_me_t overflow_me; +-static ptl_me_t get_me; +-static ptl_handle_me_t me_handles[NUM_RECV_BUFS]; +-static ptl_handle_me_t get_me_handle; +- +- +-/* AUX STUFF FOR REORDERING LOGIC */ +-static GENERIC_Q_DECL(struct MPIR_Request) reorder_queue; +-static char *expected_recv_ptr, *max_recv_ptr[NUM_RECV_BUFS]; +-static int expected_recv_idx; +- +-#undef FUNCNAME +-#define FUNCNAME incr_expected_recv_ptr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void incr_expected_recv_ptr(size_t size) +-{ +- expected_recv_ptr += size > PTL_MAX_EAGER ? PTL_MAX_EAGER : size; +- if (expected_recv_ptr > max_recv_ptr[expected_recv_idx]) { +- ++expected_recv_idx; +- if (expected_recv_idx == NUM_RECV_BUFS) +- expected_recv_idx = 0; +- expected_recv_ptr = recvbufs[expected_recv_idx]; +- } +-} +- +-#undef FUNCNAME +-#define FUNCNAME handle_request +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int handle_request(MPIR_Request *req) +-{ +- int mpi_errno = MPID_nem_handle_pkt(req->ch.vc, TMPBUF(req), REQ_PTL(req)->bytes_put); +- incr_expected_recv_ptr(REQ_PTL(req)->bytes_put); +- /* Free resources */ +- MPL_free(TMPBUF(req)); +- MPIR_Request_free(req); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME progress_reorder +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int progress_reorder(void) +-{ +- MPIR_Request *req; +- int mpi_errno = MPI_SUCCESS; +- +- GENERIC_Q_SEARCH_REMOVE(&reorder_queue, +- REQ_PTL(_e)->recv_ptr == expected_recv_ptr, +- &req, MPIR_Request, dev.next); +- while (req) { +- mpi_errno = handle_request(req); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- GENERIC_Q_SEARCH_REMOVE(&reorder_queue, +- REQ_PTL(_e)->recv_ptr == expected_recv_ptr, +- &req, MPIR_Request, dev.next); +- } +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +-/* END AUX STUFF FOR REORDERING LOGIC */ +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_nm_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_nm_init(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i; +- int ret; +- char *tmp_ptr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_NM_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_NM_INIT); +- +- /* init recv */ +- overflow_me.length = BUFSIZE; +- overflow_me.ct_handle = PTL_CT_NONE; +- overflow_me.uid = PTL_UID_ANY; +- overflow_me.options = ( PTL_ME_OP_PUT | PTL_ME_MANAGE_LOCAL | PTL_ME_NO_TRUNCATE | PTL_ME_MAY_ALIGN | +- PTL_ME_IS_ACCESSIBLE | PTL_ME_EVENT_LINK_DISABLE ); +- overflow_me.match_id.phys.pid = PTL_PID_ANY; +- overflow_me.match_id.phys.nid = PTL_NID_ANY; +- overflow_me.match_bits = NPTL_MATCH(MPI_ANY_TAG, CTL_TAG, MPI_ANY_SOURCE); +- overflow_me.ignore_bits = NPTL_MATCH_IGNORE_ANY_TAG; +- overflow_me.min_free = PTL_MAX_EAGER; +- +- /* allocate all overflow space at once */ +- tmp_ptr = MPL_malloc(NUM_RECV_BUFS * BUFSIZE, MPL_MEM_BUFFER); +- expected_recv_ptr = tmp_ptr; +- expected_recv_idx = 0; +- +- for (i = 0; i < NUM_RECV_BUFS; ++i) { +- recvbufs[i] = tmp_ptr; +- overflow_me.start = tmp_ptr; +- ret = PtlMEAppend(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_control_pt, &overflow_me, +- PTL_OVERFLOW_LIST, (void *)(size_t)i, &me_handles[i]); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeappend", "**ptlmeappend %s", +- MPID_nem_ptl_strerror(ret)); +- tmp_ptr += BUFSIZE; +- max_recv_ptr[i] = tmp_ptr - overflow_me.min_free; +- } +- +- /* register persistent ME for GET operations */ +- get_me.start = NULL; +- get_me.length = PTL_SIZE_MAX; +- get_me.ct_handle = PTL_CT_NONE; +- get_me.uid = PTL_UID_ANY; +- get_me.options = ( PTL_ME_OP_GET | PTL_ME_IS_ACCESSIBLE | PTL_ME_NO_TRUNCATE | +- PTL_ME_EVENT_LINK_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE ); +- get_me.match_id.phys.pid = PTL_PID_ANY; +- get_me.match_id.phys.nid = PTL_NID_ANY; +- get_me.match_bits = NPTL_MATCH(MPI_ANY_TAG, GET_TAG, MPI_ANY_SOURCE); +- get_me.ignore_bits = NPTL_MATCH_IGNORE_ANY_TAG; +- get_me.min_free = 0; +- ret = PtlMEAppend(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_control_pt, &get_me, PTL_PRIORITY_LIST, NULL, +- &get_me_handle); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeappend", "**ptlmeappend %s", MPID_nem_ptl_strerror(ret)); +- +- /* init the reorder queue */ +- reorder_queue.head = reorder_queue.tail = NULL; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_NM_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_nm_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_nm_finalize(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret; +- int i; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_NM_FINALIZE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_NM_FINALIZE); +- +- for (i = 0; i < NUM_RECV_BUFS; ++i) { +- ret = PtlMEUnlink(me_handles[i]); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeunlink", "**ptlmeunlink %s", +- MPID_nem_ptl_strerror(ret)); +- } +- +- ret = PtlMEUnlink(get_me_handle); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeunlink", "**ptlmeunlink %s", +- MPID_nem_ptl_strerror(ret)); +- +- /* Freeing first element because the allocation was a single contiguous buffer */ +- MPL_free(recvbufs[0]); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_NM_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME send_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int send_pkt(MPIDI_VC_t *vc, void *hdr_p, void *data_p, intptr_t data_sz, +- MPIR_Request *sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- int ret; +- char *sendbuf, *sendbuf_ptr; +- const size_t sent_sz = data_sz < (PAYLOAD_SIZE-sreq->dev.ext_hdr_sz) ? data_sz : (PAYLOAD_SIZE-sreq->dev.ext_hdr_sz-sizeof(ptl_size_t)); +- const size_t remaining = data_sz - sent_sz; +- const size_t sendbuf_sz = SENDBUF_SIZE(sent_sz+sreq->dev.ext_hdr_sz+(remaining?sizeof(ptl_size_t):0)); +- ptl_match_bits_t match_bits = NPTL_MATCH(sreq->handle, CTL_TAG, MPIDI_Process.my_pg_rank); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SEND_PKT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SEND_PKT); +- +- sendbuf = MPL_malloc(sendbuf_sz, MPL_MEM_BUFFER); +- MPIR_Assert(sendbuf != NULL); +- MPIR_Memcpy(sendbuf, hdr_p, sizeof(MPIDI_CH3_Pkt_t)); +- sendbuf_ptr = sendbuf + sizeof(MPIDI_CH3_Pkt_t); +- +- if (sreq->dev.ext_hdr_sz > 0) { +- /* copy extended packet header to send buf */ +- MPIR_Memcpy(sendbuf_ptr, sreq->dev.ext_hdr_ptr, sreq->dev.ext_hdr_sz); +- sendbuf_ptr += sreq->dev.ext_hdr_sz; +- } +- +- TMPBUF(sreq) = NULL; +- REQ_PTL(sreq)->num_gets = 0; +- REQ_PTL(sreq)->put_done = 0; +- +- if (data_sz) { +- MPIR_Memcpy(sendbuf_ptr, data_p, sent_sz); +- sendbuf_ptr += sent_sz; +- if (remaining) { +- /* The address/offset for the remote side to do the get is last in the buffer */ +- ptl_size_t *offset = (ptl_size_t *)sendbuf_ptr; +- *offset = (ptl_size_t)data_p + sent_sz; +- REQ_PTL(sreq)->num_gets = remaining / MPIDI_nem_ptl_ni_limits.max_msg_size; +- if (remaining % MPIDI_nem_ptl_ni_limits.max_msg_size) REQ_PTL(sreq)->num_gets++; +- } +- } +- +- SENDBUF(sreq) = sendbuf; +- sreq->ch.vc = vc; +- REQ_PTL(sreq)->event_handler = MPID_nem_ptl_nm_ctl_event_handler; +- +- ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)sendbuf, sendbuf_sz, PTL_NO_ACK_REQ, +- vc_ptl->id, vc_ptl->ptc, match_bits, 0, sreq, NPTL_HEADER(0, remaining)); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", +- MPID_nem_ptl_strerror(ret)); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "PtlPut(size=%lu id=(%#x,%#x) pt=%#x)", +- sendbuf_sz, vc_ptl->id.phys.nid, +- vc_ptl->id.phys.pid, vc_ptl->ptc)); +- +- vc_ptl->num_queued_sends++; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SEND_PKT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME send_noncontig_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int send_noncontig_pkt(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- int ret; +- char *sendbuf, *sendbuf_ptr; +- const size_t data_sz = sreq->dev.segment_size - sreq->dev.segment_first; +- const size_t sent_sz = data_sz < (PAYLOAD_SIZE-sreq->dev.ext_hdr_sz) ? data_sz : (PAYLOAD_SIZE-sreq->dev.ext_hdr_sz-sizeof(ptl_size_t)); +- const size_t remaining = data_sz - sent_sz; +- const size_t sendbuf_sz = SENDBUF_SIZE(sent_sz+sreq->dev.ext_hdr_sz+(remaining?sizeof(ptl_size_t):0)); +- ptl_match_bits_t match_bits = NPTL_MATCH(sreq->handle, CTL_TAG, MPIDI_Process.my_pg_rank); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SEND_NONCONTIG_PKT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SEND_NONCONTIG_PKT); +- +- sendbuf = MPL_malloc(sendbuf_sz, MPL_MEM_BUFFER); +- MPIR_Assert(sendbuf != NULL); +- MPIR_Memcpy(sendbuf, hdr_p, sizeof(MPIDI_CH3_Pkt_t)); +- sendbuf_ptr = sendbuf + sizeof(MPIDI_CH3_Pkt_t); +- +- if (sreq->dev.ext_hdr_sz > 0) { +- /* copy extended packet header to send buf */ +- MPIR_Memcpy(sendbuf_ptr, sreq->dev.ext_hdr_ptr, sreq->dev.ext_hdr_sz); +- sendbuf_ptr += sreq->dev.ext_hdr_sz; +- } +- +- TMPBUF(sreq) = NULL; +- REQ_PTL(sreq)->num_gets = 0; +- REQ_PTL(sreq)->put_done = 0; +- +- if (data_sz) { +- intptr_t first = sreq->dev.segment_first; +- intptr_t last = sreq->dev.segment_first + sent_sz; +- MPIR_Segment_pack(sreq->dev.segment_ptr, first, &last, sendbuf_ptr); +- sendbuf_ptr += sent_sz; +- +- if (remaining) { /* Post MEs for the remote gets */ +- ptl_size_t *offset = (ptl_size_t *)sendbuf_ptr; +- TMPBUF(sreq) = MPL_malloc(remaining, MPL_MEM_BUFFER); +- *offset = (ptl_size_t)TMPBUF(sreq); +- first = last; +- last = sreq->dev.segment_size; +- MPIR_Segment_pack(sreq->dev.segment_ptr, first, &last, TMPBUF(sreq)); +- MPIR_Assert(last == sreq->dev.segment_size); +- +- REQ_PTL(sreq)->num_gets = remaining / MPIDI_nem_ptl_ni_limits.max_msg_size; +- if (remaining % MPIDI_nem_ptl_ni_limits.max_msg_size) REQ_PTL(sreq)->num_gets++; +- } +- } +- +- SENDBUF(sreq) = sendbuf; +- sreq->ch.vc = vc; +- REQ_PTL(sreq)->event_handler = MPID_nem_ptl_nm_ctl_event_handler; +- +- ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)sendbuf, sendbuf_sz, PTL_NO_ACK_REQ, +- vc_ptl->id, vc_ptl->ptc, match_bits, 0, sreq, NPTL_HEADER(0, remaining)); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", +- MPID_nem_ptl_strerror(ret)); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "PtlPut(size=%lu id=(%#x,%#x) pt=%#x)", +- sendbuf_sz, vc_ptl->id.phys.nid, +- vc_ptl->id.phys.pid, vc_ptl->ptc)); +- +- vc_ptl->num_queued_sends++; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SEND_NONCONTIG_PKT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_SendNoncontig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_SENDNONCONTIG); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_SENDNONCONTIG); +- +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- mpi_errno = send_noncontig_pkt(vc, sreq, hdr); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_SENDNONCONTIG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_iStartContigMsg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, +- intptr_t data_sz, MPIR_Request **sreq_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISTARTCONTIGMSG); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_ISTARTCONTIGMSG); +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- +- /* create a request */ +- *sreq_ptr = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- MPIR_Assert(*sreq_ptr != NULL); +- MPIR_Object_set_ref(*sreq_ptr, 2); +- (*sreq_ptr)->dev.OnDataAvail = NULL; +- (*sreq_ptr)->dev.user_buf = NULL; +- +- mpi_errno = send_pkt(vc, hdr, data, data_sz, *sreq_ptr); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_ISTARTCONTIGMSG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_iSendContig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz, +- void *data, intptr_t data_sz) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISENDCONTIG); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_ISENDCONTIG); +- MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- +- mpi_errno = send_pkt(vc, hdr, data, data_sz, sreq); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_ISENDCONTIG); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME on_data_avail +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int on_data_avail(MPIR_Request * req) +-{ +- int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); +- MPIDI_VC_t *vc = req->ch.vc; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ON_DATA_AVAIL); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_ON_DATA_AVAIL); +- +- reqFn = req->dev.OnDataAvail; +- if (!reqFn) { +- mpi_errno = MPID_Request_complete(req); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- } +- else { +- int complete; +- reqFn(vc, req, &complete); +- MPIR_Assert(complete == TRUE); +- } +- +- vc_ptl->num_queued_sends--; +- +- if (vc->state == MPIDI_VC_STATE_CLOSED && vc_ptl->num_queued_sends == 0) +- MPID_nem_ptl_vc_terminated(vc); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_ON_DATA_AVAIL); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_nm_ctl_event_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_NM_CTL_EVENT_HANDLER); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_NM_CTL_EVENT_HANDLER); +- +- switch(e->type) { +- +- case PTL_EVENT_PUT: +- { +- int ret; +- const size_t packet_sz = e->mlength; +- MPIDI_VC_t *vc; +- MPID_nem_ptl_vc_area * vc_ptl; +- ptl_size_t remaining = NPTL_HEADER_GET_LENGTH(e->hdr_data); +- ptl_me_t search_me; +- MPI_Request sender_req_id = NPTL_MATCH_GET_TAG(e->match_bits); +- +- MPIDI_PG_Get_vc(MPIDI_Process.my_pg, NPTL_MATCH_GET_RANK(e->match_bits), &vc); +- vc_ptl = VC_PTL(vc); +- +- if (remaining == 0) { +- if (e->start == expected_recv_ptr) { +- incr_expected_recv_ptr(packet_sz); +- mpi_errno = MPID_nem_handle_pkt(vc, e->start, packet_sz); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = progress_reorder(); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- else { +- MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +- /* This request is actually complete; just needs to wait to enforce ordering */ +- TMPBUF(req) = MPL_malloc(packet_sz, MPL_MEM_BUFFER); +- MPIR_Assert(TMPBUF(req)); +- MPIR_Memcpy(TMPBUF(req), e->start, packet_sz); +- REQ_PTL(req)->bytes_put = packet_sz; +- req->ch.vc = vc; +- REQ_PTL(req)->recv_ptr = e->start; +- GENERIC_Q_ENQUEUE(&reorder_queue, req, dev.next); +- } +- } +- else { +- int incomplete; +- size_t size; +- char *buf_ptr; +- ptl_size_t target_offset; +- +- MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +- MPIR_Assert(req != NULL); +- MPIDI_CH3U_Request_decrement_cc(req, &incomplete); /* We'll increment it below */ +- REQ_PTL(req)->event_handler = MPID_nem_ptl_nm_ctl_event_handler; +- REQ_PTL(req)->bytes_put = packet_sz + remaining - sizeof(ptl_size_t); +- TMPBUF(req) = MPL_malloc(REQ_PTL(req)->bytes_put, MPL_MEM_BUFFER); +- MPIR_Assert(TMPBUF(req) != NULL); +- MPIR_Memcpy(TMPBUF(req), e->start, packet_sz); +- REQ_PTL(req)->recv_ptr = e->start; +- req->ch.vc = vc; +- +- buf_ptr = (char *)TMPBUF(req) + packet_sz - sizeof(ptl_size_t); +- target_offset = *((ptl_size_t *)buf_ptr); +- do { +- size = MPL_MIN(remaining, MPIDI_nem_ptl_ni_limits.max_msg_size); +- MPIDI_CH3U_Request_increment_cc(req, &incomplete); /* Will be decremented - and eventually freed in REPLY */ +- ret = MPID_nem_ptl_rptl_get(MPIDI_nem_ptl_global_md, (ptl_size_t)buf_ptr, +- size, vc_ptl->id, vc_ptl->ptc, NPTL_MATCH(sender_req_id, GET_TAG, MPIDI_Process.my_pg_rank), target_offset, req); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlget", "**ptlget %s", +- MPID_nem_ptl_strerror(ret)); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, +- "PtlGet(size=%lu id=(%#x,%#x) pt=%#x tag=%d)", size, +- vc_ptl->id.phys.nid, +- vc_ptl->id.phys.pid, vc_ptl->ptc, sender_req_id)); +- buf_ptr += size; +- remaining -= size; +- target_offset += size; +- } while (remaining); +- } +- +- /* FIXME: this search/delete not be necessary if we set PTL_ME_UNEXPECTED_HDR_DISABLE +- on the overflow list entries. However, doing so leads to PTL_IN_USE errors +- during finalize in rare cases, even though all messages are handled. */ +- memcpy(&search_me, &overflow_me, sizeof(ptl_me_t)); +- search_me.options |= PTL_ME_USE_ONCE; +- /* find and delete the header for this message in the overflow list */ +- PtlMESearch(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_control_pt, &search_me, PTL_SEARCH_DELETE, NULL); +- } +- break; +- +- case PTL_EVENT_GET: +- { +- MPI_Request handle = NPTL_MATCH_GET_TAG(e->match_bits); +- MPIR_Request *req = NULL; +- +- MPIR_Request_get_ptr(handle, req); +- if (--REQ_PTL(req)->num_gets == 0) { +- MPL_free(TMPBUF(req)); +- if (REQ_PTL(req)->put_done) { +- mpi_errno = on_data_avail(req); /* Otherwise we'll do it on the SEND */ +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- } +- } +- break; +- +- case PTL_EVENT_SEND: +- { +- MPIR_Request *const req = e->user_ptr; +- +- MPL_free(SENDBUF(req)); +- REQ_PTL(req)->put_done = 1; +- if (REQ_PTL(req)->num_gets == 0) { /* Otherwise GET will do it */ +- mpi_errno = on_data_avail(req); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- } +- break; +- +- case PTL_EVENT_REPLY: +- { +- int incomplete; +- MPIR_Request *const req = e->user_ptr; +- +- MPIDI_CH3U_Request_decrement_cc(req, &incomplete); +- if (!incomplete) { +- if (REQ_PTL(req)->recv_ptr == expected_recv_ptr) { +- mpi_errno = handle_request(req); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = progress_reorder(); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- else +- GENERIC_Q_ENQUEUE(&reorder_queue, req, dev.next); +- } +- } +- break; +- +- case PTL_EVENT_AUTO_FREE: +- { +- size_t buf_idx = (size_t)e->user_ptr; +- int ret; +- +- overflow_me.start = recvbufs[buf_idx]; +- +- ret = PtlMEAppend(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_control_pt, &overflow_me, +- PTL_OVERFLOW_LIST, e->user_ptr, &me_handles[buf_idx]); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeappend", "**ptlmeappend %s", +- MPID_nem_ptl_strerror(ret)); +- } +- +- case PTL_EVENT_AUTO_UNLINK: +- case PTL_EVENT_PUT_OVERFLOW: +- break; +- +- default: +- MPL_error_printf("Received unexpected event type: %d %s\n", e->type, MPID_nem_ptl_strevent(e)); +- MPIR_ERR_INTERNALANDJUMP(mpi_errno, "Unexpected event type"); +- break; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_NM_CTL_EVENT_HANDLER); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c ++++ /dev/null +@@ -1,217 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2012 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +-#include "rptl.h" +- +-#define OVERFLOW_LENGTH (1024*1024) +-#define NUM_OVERFLOW_ME 8 +- +-static ptl_handle_me_t overflow_me_handle[NUM_OVERFLOW_ME]; +-static void *overflow_buf[NUM_OVERFLOW_ME]; +- +-static int append_overflow(int i); +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_poll_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_poll_init(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i; +- MPIR_CHKPMEM_DECL(NUM_OVERFLOW_ME); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_POLL_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_POLL_INIT); +- +- /* create overflow buffers */ +- for (i = 0; i < NUM_OVERFLOW_ME; ++i) { +- MPIR_CHKPMEM_MALLOC(overflow_buf[i], void *, OVERFLOW_LENGTH, mpi_errno, "overflow buffer", MPL_MEM_BUFFER); +- mpi_errno = append_overflow(i); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- fn_exit2: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_POLL_INIT); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit2; +-} +- +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_poll_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_poll_finalize(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i; +- int ret; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_POLL_FINALIZE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_POLL_FINALIZE); +- +- for (i = 0; i < NUM_OVERFLOW_ME; ++i) { +- if (overflow_me_handle[i] != PTL_INVALID_HANDLE) { +- ret = PtlMEUnlink(overflow_me_handle[i]); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeunlink", "**ptlmeunlink %s", MPID_nem_ptl_strerror(ret)); +- } +- MPL_free(overflow_buf[i]); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_POLL_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME append_overflow +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int append_overflow(int i) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret; +- ptl_me_t me; +- ptl_process_t id_any; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_APPEND_OVERFLOW); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_APPEND_OVERFLOW); +- +- MPIR_Assert(i >= 0 && i < NUM_OVERFLOW_ME); +- +- id_any.phys.pid = PTL_PID_ANY; +- id_any.phys.nid = PTL_NID_ANY; +- +- me.start = overflow_buf[i]; +- me.length = OVERFLOW_LENGTH; +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = ( PTL_ME_OP_PUT | PTL_ME_MANAGE_LOCAL | PTL_ME_NO_TRUNCATE | PTL_ME_MAY_ALIGN | +- PTL_ME_IS_ACCESSIBLE | PTL_ME_EVENT_LINK_DISABLE ); +- me.match_id = id_any; +- me.match_bits = 0; +- me.ignore_bits = ~((ptl_match_bits_t)0); +- me.min_free = PTL_LARGE_THRESHOLD; +- +- /* if there is no space to append the entry, process outstanding events and try again */ +- ret = PtlMEAppend(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_pt, &me, PTL_OVERFLOW_LIST, (void *)(size_t)i, +- &overflow_me_handle[i]); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeappend", "**ptlmeappend %s", MPID_nem_ptl_strerror(ret)); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_APPEND_OVERFLOW); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_poll +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_poll(int is_blocking_poll) +-{ +- int mpi_errno = MPI_SUCCESS; +- ptl_event_t event; +- int ret; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_POLL); +- +- /* MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_POLL); */ +- +- while (1) { +- int ctl_event = FALSE; +- +- /* Check the rptls EQ first. It should never return an event. */ +- ret = MPID_nem_ptl_rptl_eqget(MPIDI_nem_ptl_rpt_eq, &event); +- MPIR_Assert(ret == PTL_EQ_EMPTY); +- +- /* check EQs for events */ +- ret = MPID_nem_ptl_rptl_eqget(MPIDI_nem_ptl_eq, &event); +- MPIR_ERR_CHKANDJUMP(ret == PTL_EQ_DROPPED, mpi_errno, MPI_ERR_OTHER, "**eqdropped"); +- if (ret == PTL_EQ_EMPTY) { +- ret = MPID_nem_ptl_rptl_eqget(MPIDI_nem_ptl_get_eq, &event); +- MPIR_ERR_CHKANDJUMP(ret == PTL_EQ_DROPPED, mpi_errno, MPI_ERR_OTHER, "**eqdropped"); +- +- if (ret == PTL_EQ_EMPTY) { +- ret = MPID_nem_ptl_rptl_eqget(MPIDI_nem_ptl_control_eq, &event); +- MPIR_ERR_CHKANDJUMP(ret == PTL_EQ_DROPPED, mpi_errno, MPI_ERR_OTHER, "**eqdropped"); +- +- if (ret == PTL_EQ_EMPTY) { +- ret = MPID_nem_ptl_rptl_eqget(MPIDI_nem_ptl_origin_eq, &event); +- MPIR_ERR_CHKANDJUMP(ret == PTL_EQ_DROPPED, mpi_errno, MPI_ERR_OTHER, "**eqdropped"); +- } else { +- ctl_event = TRUE; +- } +- +- /* all EQs are empty */ +- if (ret == PTL_EQ_EMPTY) +- break; +- } +- } +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptleqget", "**ptleqget %s", MPID_nem_ptl_strerror(ret)); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "Received event %s pt_idx=%d ni_fail=%s list=%s user_ptr=%p hdr_data=%#lx mlength=%lu rlength=%lu", +- MPID_nem_ptl_strevent(&event), event.pt_index, MPID_nem_ptl_strnifail(event.ni_fail_type), +- MPID_nem_ptl_strlist(event.ptl_list), event.user_ptr, event.hdr_data, event.mlength, event.rlength)); +- MPIR_ERR_CHKANDJUMP2(event.ni_fail_type != PTL_NI_OK && event.ni_fail_type != PTL_NI_NO_MATCH, mpi_errno, MPI_ERR_OTHER, "**ptlni_fail", "**ptlni_fail %s %s", MPID_nem_ptl_strevent(&event), MPID_nem_ptl_strnifail(event.ni_fail_type)); +- +- /* special case for events on the control portal */ +- if (ctl_event) { +- mpi_errno = MPID_nem_ptl_nm_ctl_event_handler(&event); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- continue; +- } +- +- switch (event.type) { +- case PTL_EVENT_PUT: +- if (event.ptl_list == PTL_OVERFLOW_LIST) +- break; +- case PTL_EVENT_PUT_OVERFLOW: +- case PTL_EVENT_GET: +- case PTL_EVENT_SEND: +- case PTL_EVENT_REPLY: +- case PTL_EVENT_SEARCH: { +- MPIR_Request * const req = event.user_ptr; +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "req = %p", req); +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "REQ_PTL(req)->event_handler = %p", REQ_PTL(req)->event_handler); +- if (REQ_PTL(req)->event_handler) { +- mpi_errno = REQ_PTL(req)->event_handler(&event); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- break; +- } +- case PTL_EVENT_AUTO_FREE: +- mpi_errno = append_overflow((size_t)event.user_ptr); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- break; +- case PTL_EVENT_AUTO_UNLINK: +- overflow_me_handle[(size_t)event.user_ptr] = PTL_INVALID_HANDLE; +- break; +- case PTL_EVENT_LINK: +- /* ignore */ +- break; +- case PTL_EVENT_ACK: +- default: +- MPL_error_printf("Received unexpected event type: %d %s", event.type, MPID_nem_ptl_strevent(&event)); +- MPIR_ERR_INTERNALANDJUMP(mpi_errno, "Unexpected event type"); +- } +- } +- +- fn_exit: +- /* MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_POLL); */ +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c ++++ /dev/null +@@ -1,427 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2012 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +- +-#undef FUNCNAME +-#define FUNCNAME handle_probe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handle_probe(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const req = e->user_ptr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLE_PROBE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLE_PROBE); +- +- if (e->ni_fail_type == PTL_NI_NO_MATCH) { +- REQ_PTL(req)->found = FALSE; +- goto finish_probe; +- } +- +- REQ_PTL(req)->found = TRUE; +- req->status.MPI_SOURCE = NPTL_MATCH_GET_RANK(e->match_bits); +- req->status.MPI_TAG = NPTL_MATCH_GET_TAG(e->match_bits); +- MPIR_STATUS_SET_COUNT(req->status, NPTL_HEADER_GET_LENGTH(e->hdr_data)); +- +- finish_probe: +- mpi_errno = MPID_Request_complete(req); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLE_PROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static int handle_mprobe(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const req = e->user_ptr; +- MPIR_CHKPMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLE_PROBE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLE_PROBE); +- +- if (e->ni_fail_type == PTL_NI_NO_MATCH) { +- REQ_PTL(req)->found = FALSE; +- goto finish_mprobe; +- } +- +- REQ_PTL(req)->found = TRUE; +- req->status.MPI_SOURCE = NPTL_MATCH_GET_RANK(e->match_bits); +- req->status.MPI_TAG = NPTL_MATCH_GET_TAG(e->match_bits); +- MPIR_STATUS_SET_COUNT(req->status, NPTL_HEADER_GET_LENGTH(e->hdr_data)); +- MPIDI_Request_set_sync_send_flag(req, e->hdr_data & NPTL_SSEND); +- +- MPIR_CHKPMEM_MALLOC(req->dev.tmpbuf, void *, e->mlength, mpi_errno, "tmpbuf", MPL_MEM_BUFFER); +- MPIR_Memcpy((char *)req->dev.tmpbuf, e->start, e->mlength); +- req->dev.recv_data_sz = e->mlength; +- +- if (!(e->hdr_data & NPTL_LARGE)) { +- MPIDI_Request_set_msg_type(req, MPIDI_REQUEST_EAGER_MSG); +- } +- else { +- MPIR_Assert (e->mlength == PTL_LARGE_THRESHOLD); +- req->dev.match.parts.tag = req->status.MPI_TAG; +- req->dev.match.parts.context_id = NPTL_MATCH_GET_CTX(e->match_bits); +- req->dev.match.parts.rank = req->status.MPI_SOURCE; +- MPIDI_Request_set_msg_type(req, MPIDI_REQUEST_RNDV_MSG); +- } +- +- /* At this point we know the ME is unlinked. Invalidate the handle to +- prevent further accesses, e.g. an attempted cancel. */ +- REQ_PTL(req)->put_me = PTL_INVALID_HANDLE; +- req->dev.recv_pending_count = 1; +- +- finish_mprobe: +- mpi_errno = MPID_Request_complete(req); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLE_PROBE); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_probe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_probe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, int context_offset, MPI_Status *status) +-{ +- MPIR_Assertp(0 && "This function shouldn't be called."); +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_iprobe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, int context_offset, int *flag, MPI_Status *status) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- int ret; +- ptl_process_t id_any; +- ptl_me_t me; +- MPIR_Request *req; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_IPROBE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_IPROBE); +- +- id_any.phys.nid = PTL_NID_ANY; +- id_any.phys.pid = PTL_PID_ANY; +- +- /* create a request */ +- req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +- MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create"); +- MPIR_Object_set_ref(req, 2); /* 1 ref for progress engine and 1 ref for us */ +- REQ_PTL(req)->event_handler = handle_probe; +- +- /* create a dummy ME to use for searching the list */ +- me.start = NULL; +- me.length = 0; +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = ( PTL_ME_OP_PUT | PTL_ME_USE_ONCE ); +- me.min_free = 0; +- me.match_bits = NPTL_MATCH(tag, comm->context_id + context_offset, source); +- +- if (source == MPI_ANY_SOURCE) +- me.match_id = id_any; +- else { +- if (!vc_ptl->id_initialized) { +- mpi_errno = MPID_nem_ptl_init_id(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- me.match_id = vc_ptl->id; +- } +- +- if (tag == MPI_ANY_TAG) +- me.ignore_bits = NPTL_MATCH_IGNORE_ANY_TAG; +- else +- me.ignore_bits = NPTL_MATCH_IGNORE; +- +- /* submit a search request */ +- ret = PtlMESearch(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_pt, &me, PTL_SEARCH_ONLY, req); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmesearch", "**ptlmesearch %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_MESearch("REG", vc ? vc->pg_rank : MPI_ANY_SOURCE, me, req); +- +- /* wait for search request to complete */ +- do { +- mpi_errno = MPID_nem_ptl_poll(FALSE); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } while (!MPIR_Request_is_complete(req)); +- +- *flag = REQ_PTL(req)->found; +- if (status != MPI_STATUS_IGNORE) +- *status = req->status; +- +- MPIR_Request_free(req); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_IPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_improbe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, int context_offset, int *flag, +- MPIR_Request **message, MPI_Status *status) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- int ret; +- ptl_process_t id_any; +- ptl_me_t me; +- MPIR_Request *req; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_IMPROBE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_IMPROBE); +- +- id_any.phys.nid = PTL_NID_ANY; +- id_any.phys.pid = PTL_PID_ANY; +- +- /* create a request */ +- req = MPIR_Request_create(MPIR_REQUEST_KIND__MPROBE); +- MPID_nem_ptl_init_req(req); +- MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create"); +- MPIR_Object_set_ref(req, 2); /* 1 ref for progress engine and 1 ref for us */ +- REQ_PTL(req)->event_handler = handle_mprobe; +- +- /* create a dummy ME to use for searching the list */ +- me.start = NULL; +- me.length = 0; +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = ( PTL_ME_OP_PUT | PTL_ME_USE_ONCE ); +- me.min_free = 0; +- me.match_bits = NPTL_MATCH(tag, comm->context_id + context_offset, source); +- +- if (source == MPI_ANY_SOURCE) +- me.match_id = id_any; +- else { +- if (!vc_ptl->id_initialized) { +- mpi_errno = MPID_nem_ptl_init_id(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- me.match_id = vc_ptl->id; +- } +- +- if (tag == MPI_ANY_TAG) +- me.ignore_bits = NPTL_MATCH_IGNORE_ANY_TAG; +- else +- me.ignore_bits = NPTL_MATCH_IGNORE; +- /* submit a search request */ +- ret = PtlMESearch(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_pt, &me, PTL_SEARCH_DELETE, req); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmesearch", "**ptlmesearch %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_MESearch("REG", vc ? vc->pg_rank : 0, me, req); +- +- /* wait for search request to complete */ +- do { +- mpi_errno = MPID_nem_ptl_poll(FALSE); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } while (!MPIR_Request_is_complete(req)); +- +- *flag = REQ_PTL(req)->found; +- if (*flag) { +- req->comm = comm; +- MPIR_Comm_add_ref(comm); +- MPIR_Request_extract_status(req, status); +- *message = req; +- } +- else { +- MPIR_Request_free(req); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_IMPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_anysource_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPI_Status * status) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_IPROBE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_IPROBE); +- +- return MPID_nem_ptl_iprobe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, status); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_IPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_anysource_improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPIR_Request **message, +- MPI_Status * status) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_IMPROBE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_IMPROBE); +- +- return MPID_nem_ptl_improbe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, message, status); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_IMPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_pkt_cancel_send_req_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, +- void *data ATTRIBUTE((unused)), +- intptr_t *buflen, MPIR_Request **rreqp) +-{ +- int ret, mpi_errno = MPI_SUCCESS; +- MPIDI_nem_ptl_pkt_cancel_send_req_t *req_pkt = (MPIDI_nem_ptl_pkt_cancel_send_req_t *)pkt; +- MPID_PKT_DECL_CAST(upkt, MPIDI_nem_ptl_pkt_cancel_send_resp_t, resp_pkt); +- MPIR_Request *search_req, *resp_req; +- ptl_me_t me; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "received cancel send req pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d", +- req_pkt->sender_req_id, req_pkt->match.parts.rank, +- req_pkt->match.parts.tag, req_pkt->match.parts.context_id)); +- +- /* create a dummy request and search for the message */ +- /* create a request */ +- search_req = MPIR_Request_create(MPIR_REQUEST_KIND__MPROBE); +- MPID_nem_ptl_init_req(search_req); +- MPIR_ERR_CHKANDJUMP1(!search_req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create"); +- MPIR_Object_set_ref(search_req, 2); /* 1 ref for progress engine and 1 ref for us */ +- +- /* create a dummy ME to use for searching the list */ +- me.start = NULL; +- me.length = 0; +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = ( PTL_ME_OP_PUT | PTL_ME_USE_ONCE ); +- me.min_free = 0; +- me.match_bits = NPTL_MATCH(req_pkt->match.parts.tag, req_pkt->match.parts.context_id, req_pkt->match.parts.rank); +- +- me.match_id = vc_ptl->id; +- me.ignore_bits = NPTL_MATCH_IGNORE; +- +- /* FIXME: this should use a custom handler that throws the data away inline */ +- REQ_PTL(search_req)->event_handler = handle_mprobe; +- +- /* submit a search request */ +- ret = PtlMESearch(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_pt, &me, PTL_SEARCH_DELETE, search_req); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmesearch", "**ptlmesearch %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_MESearch("REG", vc ? vc->pg_rank : 0, me, search_req); +- +- /* wait for search request to complete */ +- do { +- mpi_errno = MPID_nem_ptl_poll(FALSE); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } while (!MPIR_Request_is_complete(search_req)); +- +- /* send response */ +- resp_pkt->type = MPIDI_NEM_PKT_NETMOD; +- resp_pkt->subtype = MPIDI_NEM_PTL_PKT_CANCEL_SEND_RESP; +- resp_pkt->ack = REQ_PTL(search_req)->found; +- resp_pkt->sender_req_id = req_pkt->sender_req_id; +- +- MPID_nem_ptl_iStartContigMsg(vc, resp_pkt, sizeof(*resp_pkt), NULL, +- 0, &resp_req); +- +- /* if the message was found, free the temporary buffer used to copy the data */ +- if (REQ_PTL(search_req)->found) +- MPL_free(search_req->dev.tmpbuf); +- +- MPIR_Request_free(search_req); +- if (resp_req != NULL) +- MPIR_Request_free(resp_req); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_pkt_cancel_send_resp_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, +- void *data ATTRIBUTE((unused)), +- intptr_t *buflen, MPIR_Request **rreqp) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq; +- MPIDI_nem_ptl_pkt_cancel_send_resp_t *resp_pkt = (MPIDI_nem_ptl_pkt_cancel_send_resp_t *)pkt; +- int i, ret; +- +- MPIR_Request_get_ptr(resp_pkt->sender_req_id, sreq); +- +- if (resp_pkt->ack) { +- MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE); +- +- /* remove/free any remaining get MEs and handles */ +- for (i = 0; i < REQ_PTL(sreq)->num_gets; i++) { +- ret = PtlMEUnlink(REQ_PTL(sreq)->get_me_p[i]); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeunlink", "**ptlmeunlink %s", MPID_nem_ptl_strerror(ret)); +- mpi_errno = MPID_Request_complete(sreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- if (REQ_PTL(sreq)->get_me_p) +- MPL_free(REQ_PTL(sreq)->get_me_p); +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,TYPICAL,"message cancelled"); +- } else { +- MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE); +- MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,TYPICAL,"unable to cancel message"); +- } +- +- mpi_errno = MPID_Request_complete(sreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- *rreqp = NULL; +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c ++++ /dev/null +@@ -1,783 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2012 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +-#include "rptl.h" +- +-#undef FUNCNAME +-#define FUNCNAME dequeue_req +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static void dequeue_req(const ptl_event_t *e) +-{ +- int found; +- MPIR_Request *const rreq = e->user_ptr; +- MPI_Aint s_len, r_len; +- +- /* At this point we know the ME is unlinked. Invalidate the handle to +- prevent further accesses, e.g. an attempted cancel. */ +- REQ_PTL(rreq)->put_me = PTL_INVALID_HANDLE; +- +- found = MPIDI_CH3U_Recvq_DP(rreq); +- /* an MPI_ANY_SOURCE request may have been previously removed from the +- CH3 queue by an FDP (find and dequeue posted) operation */ +- if (rreq->dev.match.parts.rank != MPI_ANY_SOURCE) +- MPIR_Assert(found); +- +- rreq->status.MPI_ERROR = MPI_SUCCESS; +- rreq->status.MPI_SOURCE = NPTL_MATCH_GET_RANK(e->match_bits); +- rreq->status.MPI_TAG = NPTL_MATCH_GET_TAG(e->match_bits); +- +- MPIR_Datatype_get_size_macro(rreq->dev.datatype, r_len); +- r_len *= rreq->dev.user_count; +- +- s_len = NPTL_HEADER_GET_LENGTH(e->hdr_data); +- +- if (s_len > r_len) { +- /* truncated data */ +- MPIR_STATUS_SET_COUNT(rreq->status, r_len); +- MPIR_ERR_SET2(rreq->status.MPI_ERROR, MPI_ERR_TRUNCATE, "**truncate", "**truncate %d %d", s_len, r_len); +- } else { +- MPIR_STATUS_SET_COUNT(rreq->status, s_len); +- } +-} +- +-#undef FUNCNAME +-#define FUNCNAME handler_recv_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handler_recv_complete(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const rreq = e->user_ptr; +- int ret; +- int i; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_RECV_COMPLETE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_RECV_COMPLETE); +- +- MPIR_Assert(e->type == PTL_EVENT_REPLY || e->type == PTL_EVENT_PUT || e->type == PTL_EVENT_PUT_OVERFLOW); +- +- if (REQ_PTL(rreq)->md != PTL_INVALID_HANDLE) { +- ret = PtlMDRelease(REQ_PTL(rreq)->md); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdrelease", "**ptlmdrelease %s", MPID_nem_ptl_strerror(ret)); +- } +- +- for (i = 0; i < MPID_NEM_PTL_NUM_CHUNK_BUFFERS; ++i) +- if (REQ_PTL(rreq)->chunk_buffer[i]) +- MPL_free(REQ_PTL(rreq)->chunk_buffer[i]); +- +- mpi_errno = MPID_Request_complete(rreq); +- if (mpi_errno) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_RECV_COMPLETE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME handler_recv_dequeue_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handler_recv_dequeue_complete(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const rreq = e->user_ptr; +- int is_contig; +- MPI_Aint last; +- MPI_Aint dt_true_lb; +- intptr_t data_sz; +- MPIR_Datatype*dt_ptr ATTRIBUTE((unused)); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_RECV_DEQUEUE_COMPLETE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_RECV_DEQUEUE_COMPLETE); +- +- MPIR_Assert(e->type == PTL_EVENT_PUT || e->type == PTL_EVENT_PUT_OVERFLOW); +- +- MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype, is_contig, data_sz, dt_ptr, dt_true_lb); +- +- dequeue_req(e); +- +- if (e->type == PTL_EVENT_PUT_OVERFLOW) { +- /* unpack the data from unexpected buffer */ +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "is_contig = %d", is_contig); +- +- if (is_contig) { +- MPIR_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, e->start, e->mlength); +- } else { +- last = e->mlength; +- MPIR_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, e->start); +- if (last != e->mlength) +- MPIR_ERR_SET(rreq->status.MPI_ERROR, MPI_ERR_TYPE, "**dtypemismatch"); +- } +- } else { +- /* Data was placed directly into the user buffer, so datatype mismatch +- is harder to detect. We use a simple check ensuring the received bytes +- are a multiple of a single basic element. Currently, we do not detect +- mismatches with datatypes constructed of more than one basic type */ +- MPI_Datatype dt_basic_type; +- MPIR_Datatype_get_basic_type(rreq->dev.datatype, dt_basic_type); +- if (dt_basic_type != MPI_DATATYPE_NULL && (e->mlength % MPIR_Datatype_get_basic_size(dt_basic_type)) != 0) +- MPIR_ERR_SET(rreq->status.MPI_ERROR, MPI_ERR_TYPE, "**dtypemismatch"); +- } +- +- mpi_errno = handler_recv_complete(e); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_RECV_DEQUEUE_COMPLETE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME handler_recv_big_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handler_recv_big_get(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const rreq = e->user_ptr; +- MPI_Aint last; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_RECV_UNPACK); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_RECV_UNPACK); +- +- MPIR_Assert(e->type == PTL_EVENT_REPLY); +- +- /* decrement the number of remaining gets */ +- REQ_PTL(rreq)->num_gets--; +- if (REQ_PTL(rreq)->num_gets == 0) { +- /* if we used a temporary buffer, unpack the data */ +- if (REQ_PTL(rreq)->chunk_buffer[0]) { +- last = rreq->dev.segment_size; +- MPIR_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, REQ_PTL(rreq)->chunk_buffer[0]); +- MPIR_Assert(last == rreq->dev.segment_size); +- } +- mpi_errno = handler_recv_complete(e); +- } +- +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_RECV_UNPACK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME big_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static void big_get(void *buf, ptl_size_t left_to_get, MPIDI_VC_t *vc, ptl_match_bits_t match_bits, MPIR_Request *rreq) +-{ +- int ret; +- MPID_nem_ptl_vc_area *vc_ptl; +- ptl_size_t start, get_sz; +- +- vc_ptl = VC_PTL(vc); +- start = (ptl_size_t)buf; +- +- /* we need to handle all events */ +- REQ_PTL(rreq)->event_handler = handler_recv_big_get; +- +- while (left_to_get > 0) { +- /* get up to the maximum allowed by the portals interface */ +- get_sz = MPL_MIN(MPIDI_nem_ptl_ni_limits.max_msg_size, left_to_get); +- +- ret = MPID_nem_ptl_rptl_get(MPIDI_nem_ptl_global_md, start, get_sz, vc_ptl->id, vc_ptl->ptg, match_bits, 0, rreq); +- DBG_MSG_GET("global", get_sz, vc->pg_rank, match_bits); +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " buf=%p", (char *)start); +- MPIR_Assert(ret == 0); +- +- /* account for what has been sent */ +- start += get_sz; +- left_to_get -= get_sz; +- REQ_PTL(rreq)->num_gets++; +- } +-} +- +-#undef FUNCNAME +-#define FUNCNAME handler_recv_unpack_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handler_recv_unpack_complete(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const rreq = e->user_ptr; +- void *buf; +- MPI_Aint last; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_RECV_UNPACK_COMPLETE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_RECV_UNPACK_COMPLETE); +- +- MPIR_Assert(e->type == PTL_EVENT_REPLY || e->type == PTL_EVENT_PUT || e->type == PTL_EVENT_PUT_OVERFLOW); +- +- if (e->type == PTL_EVENT_PUT_OVERFLOW) +- buf = e->start; +- else +- buf = REQ_PTL(rreq)->chunk_buffer[0]; +- +- last = rreq->dev.segment_first + e->mlength; +- MPIR_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, buf); +- MPIR_Assert(last == rreq->dev.segment_first + e->mlength); +- +- mpi_errno = handler_recv_complete(e); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_RECV_UNPACK_COMPLETE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME handler_recv_dequeue_unpack_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handler_recv_dequeue_unpack_complete(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_RECV_DEQUEUE_UNPACK_COMPLETE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_RECV_DEQUEUE_UNPACK_COMPLETE); +- +- MPIR_Assert(e->type == PTL_EVENT_PUT || e->type == PTL_EVENT_PUT_OVERFLOW); +- +- dequeue_req(e); +- mpi_errno = handler_recv_unpack_complete(e); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_RECV_DEQUEUE_UNPACK_COMPLETE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME handler_recv_dequeue_large +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handler_recv_dequeue_large(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const rreq = e->user_ptr; +- MPIDI_VC_t *vc; +- MPID_nem_ptl_vc_area *vc_ptl; +- int ret; +- int dt_contig; +- intptr_t data_sz; +- MPIR_Datatype*dt_ptr; +- MPI_Aint dt_true_lb; +- MPI_Aint last; +- MPIR_CHKPMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_RECV_DEQUEUE_LARGE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_RECV_DEQUEUE_LARGE); +- +- MPIR_Assert(e->type == PTL_EVENT_PUT || e->type == PTL_EVENT_PUT_OVERFLOW); +- +- MPIDI_Comm_get_vc(rreq->comm, NPTL_MATCH_GET_RANK(e->match_bits), &vc); +- vc_ptl = VC_PTL(vc); +- +- dequeue_req(e); +- +- MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- /* unpack data from unexpected buffer first */ +- if (e->type == PTL_EVENT_PUT_OVERFLOW) { +- if (dt_contig) { +- MPIR_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, e->start, e->mlength); +- } else { +- last = e->mlength; +- MPIR_Segment_unpack(rreq->dev.segment_ptr, 0, &last, e->start); +- MPIR_Assert(last == e->mlength); +- rreq->dev.segment_first = e->mlength; +- } +- } +- +- if (!(e->hdr_data & NPTL_LARGE)) { +- /* all data has already been received; we're done */ +- mpi_errno = handler_recv_complete(e); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_exit; +- } +- +- MPIR_Assert (e->mlength == PTL_LARGE_THRESHOLD); +- +- /* we need to GET the rest of the data from the sender's buffer */ +- if (dt_contig) { +- big_get((char *)rreq->dev.user_buf + dt_true_lb + PTL_LARGE_THRESHOLD, data_sz - PTL_LARGE_THRESHOLD, +- vc, e->match_bits, rreq); +- goto fn_exit; +- } +- +- /* noncontig recv buffer */ +- +- last = rreq->dev.segment_size; +- rreq->dev.iov_count = MPL_IOV_LIMIT; +- MPIR_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov, &rreq->dev.iov_count); +- +- if (last == rreq->dev.segment_size && rreq->dev.segment_size <= MPIDI_nem_ptl_ni_limits.max_msg_size + PTL_LARGE_THRESHOLD) { +- /* Rest of message fits in one IOV */ +- ptl_md_t md; +- +- md.start = rreq->dev.iov; +- md.length = rreq->dev.iov_count; +- md.options = PTL_IOVEC; +- md.eq_handle = MPIDI_nem_ptl_origin_eq; +- md.ct_handle = PTL_CT_NONE; +- ret = PtlMDBind(MPIDI_nem_ptl_ni, &md, &REQ_PTL(rreq)->md); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdbind", "**ptlmdbind %s", MPID_nem_ptl_strerror(ret)); +- +- REQ_PTL(rreq)->event_handler = handler_recv_complete; +- ret = MPID_nem_ptl_rptl_get(REQ_PTL(rreq)->md, 0, rreq->dev.segment_size - rreq->dev.segment_first, vc_ptl->id, vc_ptl->ptg, +- e->match_bits, 0, rreq); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlget", "**ptlget %s", MPID_nem_ptl_strerror(ret)); +- goto fn_exit; +- } +- +- /* message won't fit in a single IOV, allocate buffer and unpack when received */ +- /* FIXME: For now, allocate a single large buffer to hold entire message */ +- MPIR_CHKPMEM_MALLOC(REQ_PTL(rreq)->chunk_buffer[0], void *, data_sz - PTL_LARGE_THRESHOLD, +- mpi_errno, "chunk_buffer", MPL_MEM_BUFFER); +- big_get(REQ_PTL(rreq)->chunk_buffer[0], data_sz - PTL_LARGE_THRESHOLD, vc, e->match_bits, rreq); +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- fn_exit2: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_RECV_DEQUEUE_LARGE); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit2; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME handler_recv_dequeue_unpack_large +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handler_recv_dequeue_unpack_large(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const rreq = e->user_ptr; +- MPIDI_VC_t *vc; +- MPI_Aint last; +- void *buf; +- MPIR_CHKPMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_RECV_DEQUEUE_UNPACK_LARGE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_RECV_DEQUEUE_UNPACK_LARGE); +- MPIR_Assert(e->type == PTL_EVENT_PUT || e->type == PTL_EVENT_PUT_OVERFLOW); +- +- MPIDI_Comm_get_vc(rreq->comm, NPTL_MATCH_GET_RANK(e->match_bits), &vc); +- +- dequeue_req(e); +- +- if (!(e->hdr_data & NPTL_LARGE)) { +- /* all data has already been received; we're done */ +- mpi_errno = handler_recv_unpack_complete(e); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_exit; +- } +- +- if (e->type == PTL_EVENT_PUT_OVERFLOW) +- buf = e->start; +- else +- buf = REQ_PTL(rreq)->chunk_buffer[0]; +- +- MPIR_Assert(e->mlength == PTL_LARGE_THRESHOLD); +- last = PTL_LARGE_THRESHOLD; +- MPIR_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, buf); +- MPIR_Assert(last == PTL_LARGE_THRESHOLD); +- rreq->dev.segment_first += PTL_LARGE_THRESHOLD; +- MPL_free(REQ_PTL(rreq)->chunk_buffer[0]); +- +- MPIR_CHKPMEM_MALLOC(REQ_PTL(rreq)->chunk_buffer[0], void *, rreq->dev.segment_size - rreq->dev.segment_first, +- mpi_errno, "chunk_buffer", MPL_MEM_BUFFER); +- big_get(REQ_PTL(rreq)->chunk_buffer[0], rreq->dev.segment_size - rreq->dev.segment_first, vc, e->match_bits, rreq); +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- fn_exit2: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_RECV_DEQUEUE_UNPACK_LARGE); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit2; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_recv_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPIR_Request *rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- ptl_me_t me; +- int dt_contig; +- intptr_t data_sz; +- MPIR_Datatype*dt_ptr; +- MPI_Aint dt_true_lb; +- MPI_Aint last; +- ptl_process_t id_any; +- int ret; +- MPIR_CHKPMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_RECV_POSTED); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_RECV_POSTED); +- +- id_any.phys.nid = PTL_NID_ANY; +- id_any.phys.pid = PTL_PID_ANY; +- +- MPID_nem_ptl_init_req(rreq); +- +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = ( PTL_ME_OP_PUT | PTL_ME_IS_ACCESSIBLE | PTL_ME_EVENT_LINK_DISABLE | +- PTL_ME_EVENT_UNLINK_DISABLE | PTL_ME_USE_ONCE ); +- if (vc == NULL) { +- /* MPI_ANY_SOURCE receive */ +- me.match_id = id_any; +- } else { +- if (!vc_ptl->id_initialized) { +- mpi_errno = MPID_nem_ptl_init_id(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- me.match_id = vc_ptl->id; +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "tag=%#x ctx=%#x rank=%#x", rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id, rreq->dev.match.parts.rank)); +- me.match_bits = NPTL_MATCH(rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id, +- rreq->dev.match.parts.rank); +- if (rreq->dev.match.parts.tag == MPI_ANY_TAG) +- me.ignore_bits = NPTL_MATCH_IGNORE_ANY_TAG; +- else +- me.ignore_bits = NPTL_MATCH_IGNORE; +- +- me.min_free = 0; +- +- MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "count="MPI_AINT_FMT_DEC_SPEC" datatype=%#x contig=%d data_sz=%lu", rreq->dev.user_count, rreq->dev.datatype, dt_contig, data_sz)); +- +- if (data_sz <= PTL_LARGE_THRESHOLD) { +- if (dt_contig) { +- /* small contig message */ +- void *start = (char *)rreq->dev.user_buf + dt_true_lb; +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Small contig message"); +- if (start == NULL) +- me.start = &dummy; +- else +- me.start = start; +- me.length = data_sz; +- REQ_PTL(rreq)->event_handler = handler_recv_dequeue_complete; +- } else { +- /* small noncontig */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Small noncontig message"); +- rreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = data_sz; +- +- last = rreq->dev.segment_size; +- rreq->dev.iov_count = MPL_IOV_LIMIT; +- MPIR_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov, &rreq->dev.iov_count); +- +- if (last == rreq->dev.segment_size) { +- /* entire message fits in IOV */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " entire message fits in IOV"); +- me.start = rreq->dev.iov; +- me.length = rreq->dev.iov_count; +- me.options |= PTL_IOVEC; +- REQ_PTL(rreq)->event_handler = handler_recv_dequeue_complete; +- } else { +- /* IOV is not long enough to describe entire message: recv into +- buffer and unpack later */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " IOV too long: using bounce buffer"); +- MPIR_CHKPMEM_MALLOC(REQ_PTL(rreq)->chunk_buffer[0], void *, data_sz, mpi_errno, "chunk_buffer", MPL_MEM_BUFFER); +- me.start = REQ_PTL(rreq)->chunk_buffer[0]; +- me.length = data_sz; +- REQ_PTL(rreq)->event_handler = handler_recv_dequeue_unpack_complete; +- } +- } +- } else { +- /* Large message: Create an ME for the first chunk of data, then do a GET for the rest */ +- if (dt_contig) { +- /* large contig message */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Large contig message"); +- me.start = (char *)rreq->dev.user_buf + dt_true_lb; +- me.length = PTL_LARGE_THRESHOLD; +- REQ_PTL(rreq)->event_handler = handler_recv_dequeue_large; +- } else { +- /* large noncontig */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Large noncontig message"); +- rreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = data_sz; +- +- last = PTL_LARGE_THRESHOLD; +- rreq->dev.iov_count = MPL_IOV_LIMIT; +- MPIR_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov, &rreq->dev.iov_count); +- +- if (last == PTL_LARGE_THRESHOLD) { +- /* first chunk fits in IOV */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " first chunk fits in IOV"); +- rreq->dev.segment_first = last; +- me.start = rreq->dev.iov; +- me.length = rreq->dev.iov_count; +- me.options |= PTL_IOVEC; +- REQ_PTL(rreq)->event_handler = handler_recv_dequeue_large; +- } else { +- /* IOV is not long enough to describe the first chunk: recv into +- buffer and unpack later */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " IOV too long: using bounce buffer for first chunk"); +- MPIR_CHKPMEM_MALLOC(REQ_PTL(rreq)->chunk_buffer[0], void *, PTL_LARGE_THRESHOLD, mpi_errno, "chunk_buffer", MPL_MEM_BUFFER); +- me.start = REQ_PTL(rreq)->chunk_buffer[0]; +- me.length = PTL_LARGE_THRESHOLD; +- REQ_PTL(rreq)->event_handler = handler_recv_dequeue_unpack_large; +- } +- } +- +- } +- +- ret = PtlMEAppend(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_pt, &me, PTL_PRIORITY_LIST, rreq, &REQ_PTL(rreq)->put_me); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeappend", "**ptlmeappend %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_MEAPPEND("REG", vc ? vc->pg_rank : MPI_ANY_SOURCE, me, rreq); +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " buf=%p", me.start); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "MPIDI_nem_ptl_pt = %d", MPIDI_nem_ptl_pt); +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- fn_exit2: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_RECV_POSTED); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit2; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_anysource_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPID_nem_ptl_anysource_posted(MPIR_Request *rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_POSTED); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_POSTED); +- +- mpi_errno = MPID_nem_ptl_recv_posted(NULL, rreq); +- +- /* FIXME: This function is void, so we can't return an error. This function +- cannot return an error because the queue functions (where the posted_recv +- hooks are called) return no error code. */ +- MPIR_Assertp(mpi_errno == MPI_SUCCESS); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_POSTED); +-} +- +-#undef FUNCNAME +-#define FUNCNAME cancel_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int cancel_recv(MPIR_Request *rreq, int *cancelled) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ptl_err = PTL_OK; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CANCEL_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CANCEL_RECV); +- +- *cancelled = FALSE; +- +- /* An invalid handle indicates the operation has been completed +- and the matching list entry unlinked. At that point, the operation +- cannot be cancelled. */ +- if (REQ_PTL(rreq)->put_me == PTL_INVALID_HANDLE) +- goto fn_exit; +- +- ptl_err = PtlMEUnlink(REQ_PTL(rreq)->put_me); +- if (ptl_err == PTL_OK) +- *cancelled = TRUE; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CANCEL_RECV); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_anysource_matched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_anysource_matched(MPIR_Request *rreq) +-{ +- int mpi_errno, cancelled; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_MATCHED); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_MATCHED); +- +- mpi_errno = cancel_recv(rreq, &cancelled); +- /* FIXME: This function is does not return an error because the queue +- functions (where the posted_recv hooks are called) return no error +- code. See also comment on cancel_recv. */ +- MPIR_Assertp(mpi_errno == MPI_SUCCESS); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_MATCHED); +- return !cancelled; +- fn_fail: +- goto fn_exit; +-} +- +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_cancel_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_cancel_recv(MPIDI_VC_t *vc, MPIR_Request *rreq) +-{ +- int mpi_errno, cancelled; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_CANCEL_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_CANCEL_RECV); +- +- mpi_errno = cancel_recv(rreq, &cancelled); +- /* FIXME: This function is does not return an error because the queue +- functions (where the posted_recv hooks are called) return no error +- code. */ +- MPIR_Assertp(mpi_errno == MPI_SUCCESS); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_CANCEL_RECV); +- return !cancelled; +- fn_fail: +- goto fn_exit; +-} +- +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_lmt_start_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc, MPIR_Request *rreq, MPL_IOV s_cookie) +-{ +- /* This function should only be called as a result of an Mrecv because of the CH3 protocol for +- Rendezvous Mrecvs. The regular CH3 protocol is not optimal for portals, since we don't need +- to exchange CTS/RTS. We need this code here because at the time of the Mprobe we don't know +- the target buffer, but we dequeue (and lose) the portals entry. This doesn't happen on +- regular large transfers because we handle them directly on the netmod. */ +- int mpi_errno = MPI_SUCCESS; +- int dt_contig; +- intptr_t data_sz; +- MPIR_Datatype*dt_ptr; +- MPI_Aint dt_true_lb; +- ptl_match_bits_t match_bits; +- int was_incomplete; +- int ret; +- MPID_nem_ptl_vc_area *vc_ptl = VC_PTL(vc); +- MPIR_CHKPMEM_DECL(1); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_LMT_START_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_LMT_START_RECV); +- +- /* This Rendezvous protocol does not do RTS-CTS. Since we have all the data, we limit to get it */ +- /* The following code is inspired on handler_recv_dqueue_large */ +- +- match_bits = NPTL_MATCH(rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id, +- rreq->dev.match.parts.rank); +- MPIDI_CH3U_Request_increment_cc(rreq, &was_incomplete); +- MPIR_Assert(was_incomplete == 0); +- MPIR_Request_add_ref(rreq); +- +- MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype, dt_contig, data_sz, dt_ptr, +- dt_true_lb); +- if (dt_contig) { +- void * real_user_buf = (char *)rreq->dev.user_buf + dt_true_lb; +- +- big_get((char *)real_user_buf + PTL_LARGE_THRESHOLD, data_sz - PTL_LARGE_THRESHOLD, vc, match_bits, rreq); +- +- /* The memcpy is done after the get purposely for overlapping */ +- MPIR_Memcpy(real_user_buf, rreq->dev.tmpbuf, PTL_LARGE_THRESHOLD); +- } +- else { +- MPI_Aint last; +- +- rreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, +- rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = data_sz; +- last = PTL_LARGE_THRESHOLD; +- MPIR_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.tmpbuf); +- MPIR_Assert(last == PTL_LARGE_THRESHOLD); +- rreq->dev.segment_first = PTL_LARGE_THRESHOLD; +- last = rreq->dev.segment_size; +- rreq->dev.iov_count = MPL_IOV_LIMIT; +- MPIR_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov, +- &rreq->dev.iov_count); +- if (last == rreq->dev.segment_size && last <= MPIDI_nem_ptl_ni_limits.max_msg_size + PTL_LARGE_THRESHOLD) { +- /* Rest of message fits in one IOV */ +- ptl_md_t md; +- +- md.start = rreq->dev.iov; +- md.length = rreq->dev.iov_count; +- md.options = PTL_IOVEC; +- md.eq_handle = MPIDI_nem_ptl_origin_eq; +- md.ct_handle = PTL_CT_NONE; +- ret = PtlMDBind(MPIDI_nem_ptl_ni, &md, &REQ_PTL(rreq)->md); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdbind", "**ptlmdbind %s", +- MPID_nem_ptl_strerror(ret)); +- +- REQ_PTL(rreq)->event_handler = handler_recv_complete; +- ret = MPID_nem_ptl_rptl_get(REQ_PTL(rreq)->md, 0, rreq->dev.segment_size - rreq->dev.segment_first, +- vc_ptl->id, vc_ptl->ptg, match_bits, 0, rreq); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlget", "**ptlget %s", +- MPID_nem_ptl_strerror(ret)); +- } +- else { +- /* message won't fit in a single IOV, allocate buffer and unpack when received */ +- /* FIXME: For now, allocate a single large buffer to hold entire message */ +- MPIR_CHKPMEM_MALLOC(REQ_PTL(rreq)->chunk_buffer[0], void *, rreq->dev.segment_size - rreq->dev.segment_first, +- mpi_errno, "chunk_buffer", MPL_MEM_BUFFER); +- big_get(REQ_PTL(rreq)->chunk_buffer[0], rreq->dev.segment_size - rreq->dev.segment_first, vc, match_bits, rreq); +- } +- } +- MPL_free(rreq->dev.tmpbuf); +- rreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0; /* Required for do_cts in mpid_nem_lmt.c */ +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_LMT_START_RECV); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c ++++ /dev/null +@@ -1,415 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2012 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +-#include "rptl.h" +- +-#undef FUNCNAME +-#define FUNCNAME big_meappend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static void big_meappend(void *buf, ptl_size_t left_to_send, MPIDI_VC_t *vc, ptl_match_bits_t match_bits, MPIR_Request *sreq) +-{ +- int i, ret, was_incomplete; +- MPID_nem_ptl_vc_area *vc_ptl; +- ptl_me_t me; +- +- vc_ptl = VC_PTL(vc); +- +- me.start = buf; +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = ( PTL_ME_OP_PUT | PTL_ME_OP_GET | PTL_ME_USE_ONCE | PTL_ME_IS_ACCESSIBLE | PTL_ME_EVENT_LINK_DISABLE | +- PTL_ME_EVENT_UNLINK_DISABLE ); +- me.match_id = vc_ptl->id; +- me.match_bits = match_bits; +- me.ignore_bits = 0; +- me.min_free = 0; +- +- /* allocate enough handles to cover all get operations */ +- REQ_PTL(sreq)->get_me_p = MPL_malloc(sizeof(ptl_handle_me_t) * +- ((left_to_send / MPIDI_nem_ptl_ni_limits.max_msg_size) + 1), MPL_MEM_OTHER); +- +- /* queue up as many entries as necessary to describe the entire message */ +- for (i = 0; left_to_send > 0; i++) { +- /* send up to the maximum allowed by the portals interface */ +- me.length = MPL_MIN(MPIDI_nem_ptl_ni_limits.max_msg_size, left_to_send); +- +- ret = PtlMEAppend(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_get_pt, &me, PTL_PRIORITY_LIST, sreq, +- &REQ_PTL(sreq)->get_me_p[i]); +- DBG_MSG_MEAPPEND("CTL", vc->pg_rank, me, sreq); +- MPIR_Assert(ret == 0); +- /* increment the cc for each get operation */ +- MPIDI_CH3U_Request_increment_cc(sreq, &was_incomplete); +- MPIR_Assert(was_incomplete); +- +- /* account for what has been sent */ +- me.start = (char *)me.start + me.length; +- left_to_send -= me.length; +- } +-} +- +-#undef FUNCNAME +-#define FUNCNAME handler_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int handler_send(const ptl_event_t *e) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *const sreq = e->user_ptr; +- +- int i, ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_HANDLER_SEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_HANDLER_SEND); +- +- MPIR_Assert(e->type == PTL_EVENT_SEND || e->type == PTL_EVENT_GET); +- +- /* if we are done, release all netmod resources */ +- if (MPIR_cc_get(sreq->cc) == 1) { +- if (REQ_PTL(sreq)->md != PTL_INVALID_HANDLE) { +- ret = PtlMDRelease(REQ_PTL(sreq)->md); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdrelease", "**ptlmdrelease %s", MPID_nem_ptl_strerror(ret)); +- } +- +- for (i = 0; i < MPID_NEM_PTL_NUM_CHUNK_BUFFERS; ++i) +- if (REQ_PTL(sreq)->chunk_buffer[i]) +- MPL_free(REQ_PTL(sreq)->chunk_buffer[i]); +- +- if (REQ_PTL(sreq)->get_me_p) +- MPL_free(REQ_PTL(sreq)->get_me_p); +- } +- mpi_errno = MPID_Request_complete(sreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_HANDLER_SEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-/* Send message for either isend or issend */ +-#undef FUNCNAME +-#define FUNCNAME send_msg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, +- int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc); +- int ret; +- intptr_t data_sz; +- int dt_contig; +- MPI_Aint dt_true_lb; +- MPIR_Datatype*dt_ptr; +- MPIR_Request *sreq = NULL; +- ptl_me_t me; +- int initial_iov_count, remaining_iov_count; +- ptl_md_t md; +- MPI_Aint last; +- MPIR_CHKPMEM_DECL(2); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SEND_MSG); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SEND_MSG); +- +- MPID_nem_ptl_request_create_sreq(sreq, mpi_errno, comm); +- sreq->dev.match.parts.rank = dest; +- sreq->dev.match.parts.tag = tag; +- sreq->dev.match.parts.context_id = comm->context_id + context_offset; +- sreq->ch.vc = vc; +- +- if (!vc_ptl->id_initialized) { +- mpi_errno = MPID_nem_ptl_init_id(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "count="MPI_AINT_FMT_DEC_SPEC" datatype=%#x contig=%d data_sz=%lu", count, datatype, dt_contig, data_sz)); +- +- if (data_sz <= PTL_LARGE_THRESHOLD) { +- /* Small message. Send all data eagerly */ +- if (dt_contig) { +- void *start = (char *)buf + dt_true_lb; +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Small contig message"); +- REQ_PTL(sreq)->event_handler = handler_send; +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "&REQ_PTL(sreq)->event_handler = %p", &(REQ_PTL(sreq)->event_handler)); +- if (start == NULL) +- ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)&dummy, data_sz, PTL_NO_ACK_REQ, vc_ptl->id, vc_ptl->pt, +- NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), 0, sreq, +- NPTL_HEADER(ssend_flag, data_sz)); +- else +- ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)start, data_sz, PTL_NO_ACK_REQ, vc_ptl->id, vc_ptl->pt, +- NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), 0, sreq, +- NPTL_HEADER(ssend_flag, data_sz)); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_PUT("global", data_sz, vc->pg_rank, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), NPTL_HEADER(ssend_flag, data_sz)); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "id.nid = %#x", vc_ptl->id.phys.nid); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "id.pid = %#x", vc_ptl->id.phys.pid); +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "sreq = %p", sreq); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "vc_ptl->pt = %d", vc_ptl->pt); +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "REQ_PTL(sreq)->event_handler = %p", REQ_PTL(sreq)->event_handler); +- goto fn_exit; +- } +- +- /* noncontig data */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Small noncontig message"); +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = data_sz; +- +- last = sreq->dev.segment_size; +- sreq->dev.iov_count = MPL_IOV_LIMIT; +- MPIR_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, sreq->dev.iov, &sreq->dev.iov_count); +- +- if (last == sreq->dev.segment_size) { +- /* IOV is able to describe entire message */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " entire message fits in IOV"); +- md.start = sreq->dev.iov; +- md.length = sreq->dev.iov_count; +- md.options = PTL_IOVEC; +- md.eq_handle = MPIDI_nem_ptl_origin_eq; +- md.ct_handle = PTL_CT_NONE; +- ret = PtlMDBind(MPIDI_nem_ptl_ni, &md, &REQ_PTL(sreq)->md); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdbind", "**ptlmdbind %s", MPID_nem_ptl_strerror(ret)); +- +- REQ_PTL(sreq)->event_handler = handler_send; +- ret = MPID_nem_ptl_rptl_put(REQ_PTL(sreq)->md, 0, data_sz, PTL_NO_ACK_REQ, vc_ptl->id, vc_ptl->pt, +- NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), 0, sreq, +- NPTL_HEADER(ssend_flag, data_sz)); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_PUT("sreq", data_sz, vc->pg_rank, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), NPTL_HEADER(ssend_flag, data_sz)); +- goto fn_exit; +- } +- +- /* IOV is not long enough to describe entire message */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " IOV too long: using bounce buffer"); +- MPIR_CHKPMEM_MALLOC(REQ_PTL(sreq)->chunk_buffer[0], void *, data_sz, mpi_errno, "chunk_buffer", MPL_MEM_BUFFER); +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- last = data_sz; +- MPIR_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, REQ_PTL(sreq)->chunk_buffer[0]); +- MPIR_Assert(last == sreq->dev.segment_size); +- REQ_PTL(sreq)->event_handler = handler_send; +- ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)REQ_PTL(sreq)->chunk_buffer[0], data_sz, PTL_NO_ACK_REQ, +- vc_ptl->id, vc_ptl->pt, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), 0, sreq, +- NPTL_HEADER(ssend_flag, data_sz)); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_PUT("global", data_sz, vc->pg_rank, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), NPTL_HEADER(ssend_flag, data_sz)); +- goto fn_exit; +- } +- +- /* Large message. Send first chunk of data and let receiver get the rest */ +- if (dt_contig) { +- /* create ME for buffer so receiver can issue a GET for the data */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Large contig message"); +- big_meappend((char *)buf + dt_true_lb + PTL_LARGE_THRESHOLD, data_sz - PTL_LARGE_THRESHOLD, vc, +- NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), sreq); +- +- REQ_PTL(sreq)->event_handler = handler_send; +- ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)((char *)buf + dt_true_lb), PTL_LARGE_THRESHOLD, PTL_NO_ACK_REQ, vc_ptl->id, vc_ptl->pt, +- NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), 0, sreq, +- NPTL_HEADER(ssend_flag | NPTL_LARGE, data_sz)); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_PUT("global", PTL_LARGE_THRESHOLD, vc->pg_rank, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), NPTL_HEADER(ssend_flag | NPTL_LARGE, data_sz)); +- goto fn_exit; +- } +- +- /* Large noncontig data */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Large noncontig message"); +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = data_sz; +- +- last = PTL_LARGE_THRESHOLD; +- sreq->dev.iov_count = MPL_IOV_LIMIT; +- MPIR_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, sreq->dev.iov, &sreq->dev.iov_count); +- +- initial_iov_count = sreq->dev.iov_count; +- sreq->dev.segment_first = last; +- +- if (last == PTL_LARGE_THRESHOLD) { +- /* first chunk of message fits into IOV */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " first chunk fits in IOV"); +- if (initial_iov_count < MPL_IOV_LIMIT) { +- /* There may be space for the rest of the message in this IOV */ +- sreq->dev.iov_count = MPL_IOV_LIMIT - sreq->dev.iov_count; +- last = sreq->dev.segment_size; +- +- MPIR_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, +- &sreq->dev.iov[initial_iov_count], &sreq->dev.iov_count); +- remaining_iov_count = sreq->dev.iov_count; +- +- if (last == sreq->dev.segment_size && last <= MPIDI_nem_ptl_ni_limits.max_msg_size + PTL_LARGE_THRESHOLD) { +- /* Entire message fit in one IOV */ +- int was_incomplete; +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " rest of message fits in one IOV"); +- /* Create ME for remaining data */ +- me.start = &sreq->dev.iov[initial_iov_count]; +- me.length = remaining_iov_count; +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = ( PTL_ME_OP_PUT | PTL_ME_OP_GET | PTL_ME_USE_ONCE | PTL_ME_IS_ACCESSIBLE | PTL_ME_EVENT_LINK_DISABLE | +- PTL_ME_EVENT_UNLINK_DISABLE | PTL_IOVEC ); +- me.match_id = vc_ptl->id; +- me.match_bits = NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank); +- me.ignore_bits = 0; +- me.min_free = 0; +- +- MPIR_CHKPMEM_MALLOC(REQ_PTL(sreq)->get_me_p, ptl_handle_me_t *, sizeof(ptl_handle_me_t), mpi_errno, "get_me_p", MPL_MEM_BUFFER); +- +- ret = PtlMEAppend(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_get_pt, &me, PTL_PRIORITY_LIST, sreq, +- &REQ_PTL(sreq)->get_me_p[0]); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeappend", "**ptlmeappend %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_MEAPPEND("CTL", vc->pg_rank, me, sreq); +- /* increment the cc for the get operation */ +- MPIDI_CH3U_Request_increment_cc(sreq, &was_incomplete); +- MPIR_Assert(was_incomplete); +- +- /* Create MD for first chunk */ +- md.start = sreq->dev.iov; +- md.length = initial_iov_count; +- md.options = PTL_IOVEC; +- md.eq_handle = MPIDI_nem_ptl_origin_eq; +- md.ct_handle = PTL_CT_NONE; +- ret = PtlMDBind(MPIDI_nem_ptl_ni, &md, &REQ_PTL(sreq)->md); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdbind", "**ptlmdbind %s", MPID_nem_ptl_strerror(ret)); +- +- REQ_PTL(sreq)->event_handler = handler_send; +- ret = MPID_nem_ptl_rptl_put(REQ_PTL(sreq)->md, 0, PTL_LARGE_THRESHOLD, PTL_NO_ACK_REQ, vc_ptl->id, vc_ptl->pt, +- NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), 0, sreq, +- NPTL_HEADER(ssend_flag | NPTL_LARGE, data_sz)); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_PUT("req", PTL_LARGE_THRESHOLD, vc->pg_rank, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), NPTL_HEADER(ssend_flag | NPTL_LARGE, data_sz)); +- goto fn_exit; +- } +- } +- /* First chunk of message fits, but the rest doesn't */ +- /* Don't handle this case separately */ +- } +- +- /* allocate a temporary buffer and copy all the data to send */ +- MPIR_CHKPMEM_MALLOC(REQ_PTL(sreq)->chunk_buffer[0], void *, data_sz, mpi_errno, "tmpbuf", MPL_MEM_BUFFER); +- +- last = data_sz; +- MPIR_Segment_pack(sreq->dev.segment_ptr, 0, &last, REQ_PTL(sreq)->chunk_buffer[0]); +- MPIR_Assert(last == data_sz); +- +- big_meappend((char *)REQ_PTL(sreq)->chunk_buffer[0] + PTL_LARGE_THRESHOLD, data_sz - PTL_LARGE_THRESHOLD, vc, +- NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), sreq); +- +- REQ_PTL(sreq)->event_handler = handler_send; +- ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)REQ_PTL(sreq)->chunk_buffer[0], PTL_LARGE_THRESHOLD, +- PTL_NO_ACK_REQ, vc_ptl->id, vc_ptl->pt, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), +- 0, sreq, NPTL_HEADER(ssend_flag | NPTL_LARGE, data_sz)); +- MPIR_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s", MPID_nem_ptl_strerror(ret)); +- DBG_MSG_PUT("global", PTL_LARGE_THRESHOLD, vc->pg_rank, NPTL_MATCH(tag, comm->context_id + context_offset, comm->rank), NPTL_HEADER(ssend_flag | NPTL_LARGE, data_sz)); +- +- fn_exit: +- *request = sreq; +- MPIR_CHKPMEM_COMMIT(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SEND_MSG); +- return mpi_errno; +- fn_fail: +- if (sreq) { +- MPIR_Request_free(sreq); +- sreq = NULL; +- } +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_isend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, +- MPIR_Comm *comm, int context_offset, struct MPIR_Request **request) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_ISEND); +- +- mpi_errno = send_msg(0, vc, buf, count, datatype, dest, tag, comm, context_offset, request); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_ISEND); +- return mpi_errno; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_issend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, +- MPIR_Comm *comm, int context_offset, struct MPIR_Request **request) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISSEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_ISSEND); +- +- mpi_errno = send_msg(NPTL_SSEND, vc, buf, count, datatype, dest, tag, comm, context_offset, request); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_ISSEND); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_cancel_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_cancel_send(struct MPIDI_VC *vc, struct MPIR_Request *sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_PKT_DECL_CAST(upkt, MPIDI_nem_ptl_pkt_cancel_send_req_t, csr_pkt); +- MPIR_Request *csr_sreq; +- int was_incomplete; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_CANCEL_SEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_CANCEL_SEND); +- +- /* The completion counter and reference count are incremented to keep +- the request around long enough to receive a +- response regardless of what the user does (free the request before +- waiting, etc.). */ +- MPIDI_CH3U_Request_increment_cc(sreq, &was_incomplete); +- if (!was_incomplete) { +- /* The reference count is incremented only if the request was +- complete before the increment. */ +- MPIR_Request_add_ref(sreq); +- } +- +- csr_pkt->type = MPIDI_NEM_PKT_NETMOD; +- csr_pkt->subtype = MPIDI_NEM_PTL_PKT_CANCEL_SEND_REQ; +- csr_pkt->match.parts.rank = sreq->dev.match.parts.rank; +- csr_pkt->match.parts.tag = sreq->dev.match.parts.tag; +- csr_pkt->match.parts.context_id = sreq->dev.match.parts.context_id; +- csr_pkt->sender_req_id = sreq->handle; +- +- MPID_nem_ptl_iStartContigMsg(vc, csr_pkt, sizeof(*csr_pkt), NULL, +- 0, &csr_sreq); +- +- if (csr_sreq != NULL) +- MPIR_Request_free(csr_sreq); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_CANCEL_SEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/rptl.c ++++ /dev/null +@@ -1,925 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +-#include "rptl.h" +- +-/* FIXME: turn this into a CVAR, or fraction of the event limit from +- rptl_init */ +-#define PER_TARGET_THRESHOLD 50 +- +-/* +- * Prereqs: +- * +- * 1. We create an extra control portal that is only used by rportals. +- * +- * 2. All communication operations are logged at the origin process, +- * and their ACKs and NACKs are kept track of. If an operation gets +- * an ACK, it is complete and can be deleted from the logs. If an +- * operation gets a NACK, it will need to be retransmitted once the +- * flow-control protocol described below has completed. +- * +- * +- * Flow control algorithm: +- * +- * 1. When the primary data portal gets disabled, the target sends +- * PAUSE messages to all other processes. +- * +- * 2. Once each process confirms that it has no outstanding packets on +- * the wire (i.e., all packets have either been ACKed or NACKed), it +- * sends a PAUSE-ACK message. +- * +- * 3. When the target receives PAUSE-ACK messages from all processes +- * (thus confirming that the network traffic to itself has been +- * quiesced), it waits till the user has dequeued at least half the +- * messages from the overflow buffer. This is done by keeping track +- * of the number of messages that are injected into the overflow +- * buffer by portals and the number of messages that are dequeued by +- * the user. +- * +- * 4. Once we know that there is enough free space in the overflow +- * buffers, the target reenables the portal and send an UNPAUSE +- * message to all processes. +- * +- * +- * Known issues: +- * +- * 1. None of the error codes specified by portals allow us to return +- * an "OTHER" error, when something bad happens internally. So we +- * arbitrarily return PTL_FAIL when it is an internal error even +- * though that's not a specified error return code for some portals +- * functions. When portals functions are called internally, if they +- * return an error, we funnel them back upstream. This is not an +- * "issue" per se, but is still ugly. +- * +- * 2. None of the pt index types specified by portals allow us to +- * retuen an "INVALID" pt entry, to show that a portal is invalid. So +- * we arbitrarily use PTL_PT_ANY in such cases. Again, this is not an +- * "issue" per se, but is ugly. +- */ +- +-#define IDS_ARE_EQUAL(t1, t2) \ +- (t1.phys.nid == t2.phys.nid && t1.phys.pid == t2.phys.pid) +- +-struct rptl_info rptl_info; +- +- +-#undef FUNCNAME +-#define FUNCNAME find_target +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int find_target(ptl_process_t id, struct rptl_target **target) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret = PTL_OK; +- struct rptl_target *t; +- MPIR_CHKPMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_FIND_TARGET); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_FIND_TARGET); +- +- for (t = rptl_info.target_list; t; t = t->next) +- if (IDS_ARE_EQUAL(t->id, id)) +- break; +- +- /* if the target does not already exist, create one */ +- if (t == NULL) { +- MPIR_CHKPMEM_MALLOC(t, struct rptl_target *, sizeof(struct rptl_target), mpi_errno, "rptl target", MPL_MEM_ADDRESS); +- DL_APPEND(rptl_info.target_list, t); +- +- t->id = id; +- t->state = RPTL_TARGET_STATE_ACTIVE; +- t->rptl = NULL; +- t->op_segment_list = NULL; +- t->op_pool = NULL; +- t->data_op_list = NULL; +- t->control_op_list = NULL; +- t->issued_data_ops = 0; +- } +- +- *target = t; +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_FIND_TARGET); +- return ret; +- +- fn_fail: +- if (mpi_errno) +- ret = PTL_FAIL; +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +- +-static int rptl_put(ptl_handle_md_t md_handle, ptl_size_t local_offset, ptl_size_t length, +- ptl_ack_req_t ack_req, ptl_process_t target_id, ptl_pt_index_t pt_index, +- ptl_match_bits_t match_bits, ptl_size_t remote_offset, void *user_ptr, +- ptl_hdr_data_t hdr_data, enum rptl_pt_type pt_type); +- +-#undef FUNCNAME +-#define FUNCNAME poke_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int poke_progress(void) +-{ +- int ret = PTL_OK; +- struct rptl_target *target; +- struct rptl_op *op; +- struct rptl *rptl; +- int i; +- int mpi_errno = MPI_SUCCESS; +- ptl_process_t id; +- ptl_pt_index_t data_pt, control_pt; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POKE_PROGRESS); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POKE_PROGRESS); +- +- /* make progress on local RPTLs */ +- for (rptl = rptl_info.rptl_list; rptl; rptl = rptl->next) { +- /* if the local state is active, there's nothing to do */ +- if (rptl->local_state == RPTL_LOCAL_STATE_ACTIVE) +- continue; +- +- /* if we are in a local AWAITING PAUSE ACKS state, see if we +- * can send out the unpause message */ +- if (rptl->local_state == RPTL_LOCAL_STATE_AWAITING_PAUSE_ACKS && +- rptl->pause_ack_counter == rptl_info.world_size - 1) { +- /* if we are over the max count limit, do not send an +- * unpause message yet */ +- if (rptl->data.ob_curr_count > rptl->data.ob_max_count) +- continue; +- +- ret = PtlPTEnable(rptl->ni, rptl->data.pt); +- RPTLU_ERR_POP(ret, "Error returned while reenabling PT\n"); +- +- rptl->local_state = RPTL_LOCAL_STATE_ACTIVE; +- +- for (i = 0; i < rptl_info.world_size; i++) { +- if (i == MPIDI_Process.my_pg_rank) +- continue; +- mpi_errno = rptl_info.get_target_info(i, &id, rptl->data.pt, &data_pt, &control_pt); +- if (mpi_errno) { +- ret = PTL_FAIL; +- RPTLU_ERR_POP(ret, "Error getting target info\n"); +- } +- +- /* make sure the user setup a control portal */ +- assert(control_pt != PTL_PT_ANY); +- +- ret = rptl_put(rptl->md, 0, 0, PTL_NO_ACK_REQ, id, control_pt, +- 0, 0, NULL, RPTL_CONTROL_MSG_UNPAUSE, RPTL_PT_CONTROL); +- RPTLU_ERR_POP(ret, "Error sending unpause message\n"); +- } +- } +- } +- +- /* make progress on targets */ +- for (target = rptl_info.target_list; target; target = target->next) { +- if (target->state == RPTL_TARGET_STATE_RECEIVED_PAUSE) { +- for (op = target->data_op_list; op; op = op->next) +- if (op->state == RPTL_OP_STATE_ISSUED) +- break; +- if (op) +- continue; +- +- /* send a pause ack message */ +- assert(target->rptl); +- for (i = 0; i < rptl_info.world_size; i++) { +- if (i == MPIDI_Process.my_pg_rank) +- continue; +- /* find the target that has this target id and get the +- * control portal information for it */ +- mpi_errno = rptl_info.get_target_info(i, &id, target->rptl->data.pt, &data_pt, &control_pt); +- if (mpi_errno) { +- ret = PTL_FAIL; +- RPTLU_ERR_POP(ret, "Error getting target info\n"); +- } +- if (IDS_ARE_EQUAL(id, target->id)) +- break; +- } +- +- /* make sure the user setup a control portal */ +- assert(control_pt != PTL_PT_ANY); +- +- target->state = RPTL_TARGET_STATE_PAUSE_ACKED; +- +- ret = rptl_put(target->rptl->md, 0, 0, PTL_NO_ACK_REQ, id, control_pt, 0, +- 0, NULL, RPTL_CONTROL_MSG_PAUSE_ACK, RPTL_PT_CONTROL); +- RPTLU_ERR_POP(ret, "Error sending pause ack message\n"); +- +- continue; +- } +- +- /* issue out all the control messages first */ +- for (op = target->control_op_list; op; op = op->next) { +- assert(op->op_type == RPTL_OP_PUT); +- +- /* skip all the issued ops */ +- if (op->state == RPTL_OP_STATE_ISSUED) +- continue; +- +- /* we should not get any NACKs on the control portal */ +- assert(op->state != RPTL_OP_STATE_NACKED); +- +- if (rptl_info.origin_events_left < 2 || target->issued_data_ops > PER_TARGET_THRESHOLD) { +- /* too few origin events left. we can't issue this op +- * or any following op to this target in order to +- * maintain ordering */ +- break; +- } +- +- rptl_info.origin_events_left -= 2; +- target->issued_data_ops++; +- +- /* force request for an ACK even if the user didn't ask +- * for it. replace the user pointer with the OP id. */ +- ret = PtlPut(op->u.put.md_handle, op->u.put.local_offset, op->u.put.length, +- PTL_ACK_REQ, op->u.put.target_id, op->u.put.pt_index, +- op->u.put.match_bits, op->u.put.remote_offset, op, +- op->u.put.hdr_data); +- RPTLU_ERR_POP(ret, "Error issuing PUT\n"); +- +- op->state = RPTL_OP_STATE_ISSUED; +- } +- +- if (target->state == RPTL_TARGET_STATE_DISABLED || target->state == RPTL_TARGET_STATE_PAUSE_ACKED) +- continue; +- +- /* then issue out all the data messages */ +- for (op = target->data_op_list; op; op = op->next) { +- if (op->op_type == RPTL_OP_PUT) { +- /* skip all the issued ops */ +- if (op->state == RPTL_OP_STATE_ISSUED) +- continue; +- +- /* if an op has been nacked, don't issue anything else +- * to this target */ +- if (op->state == RPTL_OP_STATE_NACKED) +- break; +- +- if (rptl_info.origin_events_left < 2 || target->issued_data_ops > PER_TARGET_THRESHOLD) { +- /* too few origin events left. we can't issue +- * this op or any following op to this target in +- * order to maintain ordering */ +- break; +- } +- +- rptl_info.origin_events_left -= 2; +- target->issued_data_ops++; +- +- /* force request for an ACK even if the user didn't +- * ask for it. replace the user pointer with the OP +- * id. */ +- ret = PtlPut(op->u.put.md_handle, op->u.put.local_offset, op->u.put.length, +- PTL_ACK_REQ, op->u.put.target_id, op->u.put.pt_index, +- op->u.put.match_bits, op->u.put.remote_offset, op, +- op->u.put.hdr_data); +- RPTLU_ERR_POP(ret, "Error issuing PUT\n"); +- } +- else if (op->op_type == RPTL_OP_GET) { +- /* skip all the issued ops */ +- if (op->state == RPTL_OP_STATE_ISSUED) +- continue; +- +- /* if an op has been nacked, don't issue anything else +- * to this target */ +- if (op->state == RPTL_OP_STATE_NACKED) +- break; +- +- if (rptl_info.origin_events_left < 1 || target->issued_data_ops > PER_TARGET_THRESHOLD) { +- /* too few origin events left. we can't issue +- * this op or any following op to this target in +- * order to maintain ordering */ +- break; +- } +- +- rptl_info.origin_events_left--; +- target->issued_data_ops++; +- +- ret = PtlGet(op->u.get.md_handle, op->u.get.local_offset, op->u.get.length, +- op->u.get.target_id, op->u.get.pt_index, op->u.get.match_bits, +- op->u.get.remote_offset, op); +- RPTLU_ERR_POP(ret, "Error issuing GET\n"); +- } +- +- op->state = RPTL_OP_STATE_ISSUED; +- } +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POKE_PROGRESS); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME rptl_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int rptl_put(ptl_handle_md_t md_handle, ptl_size_t local_offset, ptl_size_t length, +- ptl_ack_req_t ack_req, ptl_process_t target_id, ptl_pt_index_t pt_index, +- ptl_match_bits_t match_bits, ptl_size_t remote_offset, void *user_ptr, +- ptl_hdr_data_t hdr_data, enum rptl_pt_type pt_type) +-{ +- struct rptl_op *op; +- int ret = PTL_OK; +- struct rptl_target *target; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_RPTL_PUT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_RPTL_PUT); +- +- ret = find_target(target_id, &target); +- RPTLU_ERR_POP(ret, "error finding target structure\n"); +- +- ret = rptli_op_alloc(&op, target); +- RPTLU_ERR_POP(ret, "error allocating op\n"); +- +- op->op_type = RPTL_OP_PUT; +- op->state = RPTL_OP_STATE_QUEUED; +- +- /* store the user parameters */ +- op->u.put.md_handle = md_handle; +- op->u.put.local_offset = local_offset; +- op->u.put.length = length; +- op->u.put.ack_req = ack_req; +- op->u.put.target_id = target_id; +- op->u.put.pt_index = pt_index; +- op->u.put.match_bits = match_bits; +- op->u.put.remote_offset = remote_offset; +- op->u.put.user_ptr = user_ptr; +- op->u.put.hdr_data = hdr_data; +- +- /* place to store the send and ack events */ +- op->u.put.send = NULL; +- op->u.put.ack = NULL; +- op->u.put.pt_type = pt_type; +- op->events_ready = 0; +- op->target = target; +- +- if (op->u.put.pt_type == RPTL_PT_DATA) +- DL_APPEND(target->data_op_list, op); +- else +- DL_APPEND(target->control_op_list, op); +- +- ret = poke_progress(); +- RPTLU_ERR_POP(ret, "Error from poke_progress\n"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_RPTL_PUT); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME rptl_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_rptl_put(ptl_handle_md_t md_handle, ptl_size_t local_offset, ptl_size_t length, +- ptl_ack_req_t ack_req, ptl_process_t target_id, ptl_pt_index_t pt_index, +- ptl_match_bits_t match_bits, ptl_size_t remote_offset, void *user_ptr, +- ptl_hdr_data_t hdr_data) +-{ +- return rptl_put(md_handle, local_offset, length, ack_req, target_id, pt_index, match_bits, +- remote_offset, user_ptr, hdr_data, RPTL_PT_DATA); +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_rptl_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_rptl_get(ptl_handle_md_t md_handle, ptl_size_t local_offset, ptl_size_t length, +- ptl_process_t target_id, ptl_pt_index_t pt_index, +- ptl_match_bits_t match_bits, ptl_size_t remote_offset, void *user_ptr) +-{ +- struct rptl_op *op; +- int ret = PTL_OK; +- struct rptl_target *target; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_RPTL_GET); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_RPTL_GET); +- +- ret = find_target(target_id, &target); +- RPTLU_ERR_POP(ret, "error finding target structure\n"); +- +- ret = rptli_op_alloc(&op, target); +- RPTLU_ERR_POP(ret, "error allocating op\n"); +- +- op->op_type = RPTL_OP_GET; +- op->state = RPTL_OP_STATE_QUEUED; +- +- /* store the user parameters */ +- op->u.get.md_handle = md_handle; +- op->u.get.local_offset = local_offset; +- op->u.get.length = length; +- op->u.get.target_id = target_id; +- op->u.get.pt_index = pt_index; +- op->u.get.match_bits = match_bits; +- op->u.get.remote_offset = remote_offset; +- op->u.get.user_ptr = user_ptr; +- +- op->events_ready = 0; +- op->target = target; +- +- DL_APPEND(target->data_op_list, op); +- +- ret = poke_progress(); +- RPTLU_ERR_POP(ret, "Error from poke_progress\n"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_RPTL_GET); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME send_pause_messages +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int send_pause_messages(struct rptl *rptl) +-{ +- int i, mpi_errno = MPI_SUCCESS; +- ptl_process_t id; +- ptl_pt_index_t data_pt, control_pt; +- int ret = PTL_OK; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SEND_PAUSE_MESSAGES); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SEND_PAUSE_MESSAGES); +- +- /* if no control portal is setup for this rptl, we are doomed */ +- assert(rptl->control.pt != PTL_PT_ANY); +- +- /* set the max message count in the overflow buffers we can keep +- * before sending the unpause messages */ +- rptl->data.ob_max_count = rptl->data.ob_curr_count / 2; +- +- for (i = 0; i < rptl_info.world_size; i++) { +- if (i == MPIDI_Process.my_pg_rank) +- continue; +- mpi_errno = rptl_info.get_target_info(i, &id, rptl->data.pt, &data_pt, &control_pt); +- if (mpi_errno) { +- ret = PTL_FAIL; +- RPTLU_ERR_POP(ret, "Error getting target info while sending pause messages\n"); +- } +- +- /* make sure the user setup a control portal */ +- assert(control_pt != PTL_PT_ANY); +- +- ret = rptl_put(rptl->md, 0, 0, PTL_NO_ACK_REQ, id, control_pt, 0, 0, +- NULL, RPTL_CONTROL_MSG_PAUSE, RPTL_PT_CONTROL); +- RPTLU_ERR_POP(ret, "Error sending pause message\n"); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SEND_PAUSE_MESSAGES); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME clear_nacks +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int clear_nacks(ptl_process_t target_id) +-{ +- struct rptl_target *target; +- struct rptl_op *op; +- int ret = PTL_OK; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CLEAR_NACKS); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CLEAR_NACKS); +- +- ret = find_target(target_id, &target); +- RPTLU_ERR_POP(ret, "error finding target\n"); +- +- for (op = target->data_op_list; op; op = op->next) { +- if ((op->op_type == RPTL_OP_PUT && IDS_ARE_EQUAL(op->u.put.target_id, target_id)) || +- (op->op_type == RPTL_OP_GET && IDS_ARE_EQUAL(op->u.get.target_id, target_id))) { +- if (op->state == RPTL_OP_STATE_NACKED) +- op->state = RPTL_OP_STATE_QUEUED; +- } +- } +- target->state = RPTL_TARGET_STATE_ACTIVE; +- +- ret = poke_progress(); +- RPTLU_ERR_POP(ret, "error in poke_progress\n"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CLEAR_NACKS); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME get_event_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int get_event_info(ptl_event_t * event, struct rptl **ret_rptl, struct rptl_op **ret_op) +-{ +- struct rptl *rptl; +- struct rptl_op *op; +- int ret = PTL_OK; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_GET_EVENT_INFO); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_GET_EVENT_INFO); +- +- if (event->type == PTL_EVENT_SEND || event->type == PTL_EVENT_REPLY || +- event->type == PTL_EVENT_ACK) { +- op = (struct rptl_op *) event->user_ptr; +- +- rptl_info.origin_events_left++; +- if (event->type != PTL_EVENT_SEND) +- op->target->issued_data_ops--; +- +- /* see if there are any pending ops to be issued */ +- ret = poke_progress(); +- RPTLU_ERR_POP(ret, "Error returned from poke_progress\n"); +- +- assert(op); +- rptl = NULL; +- } +- else { +- /* for all target-side events, we look up the rptl based on +- * the pt_index */ +- for (rptl = rptl_info.rptl_list; rptl; rptl = rptl->next) +- if (rptl->data.pt == event->pt_index || rptl->control.pt == event->pt_index) +- break; +- +- assert(rptl); +- op = NULL; +- } +- +- *ret_rptl = rptl; +- *ret_op = op; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_GET_EVENT_INFO); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME stash_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int stash_event(struct rptl_op *op, ptl_event_t event) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret = PTL_OK; +- MPIR_CHKPMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_STASH_EVENT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_STASH_EVENT); +- +- /* make sure this is of the event type we know of */ +- assert(event.type == PTL_EVENT_SEND || event.type == PTL_EVENT_ACK); +- +- /* only PUT events are stashed */ +- assert(op->op_type == RPTL_OP_PUT); +- +- /* we should never stash anything when we are in events ready */ +- assert(op->events_ready == 0); +- +- /* only one of send or ack is stashed. if we are in this +- * function, both the events should be NULL at this point. */ +- assert(op->u.put.send == NULL && op->u.put.ack == NULL); +- +- if (event.type == PTL_EVENT_SEND) { +- MPIR_CHKPMEM_MALLOC(op->u.put.send, ptl_event_t *, sizeof(ptl_event_t), mpi_errno, +- "ptl event", MPL_MEM_OTHER); +- memcpy(op->u.put.send, &event, sizeof(ptl_event_t)); +- } +- else { +- MPIR_CHKPMEM_MALLOC(op->u.put.ack, ptl_event_t *, sizeof(ptl_event_t), mpi_errno, +- "ptl event", MPL_MEM_OTHER); +- memcpy(op->u.put.ack, &event, sizeof(ptl_event_t)); +- } +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_STASH_EVENT); +- return ret; +- +- fn_fail: +- if (mpi_errno) +- ret = PTL_FAIL; +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +- +-static ptl_event_t pending_event; +-static int pending_event_valid = 0; +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_rptl_eqget +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_rptl_eqget(ptl_handle_eq_t eq_handle, ptl_event_t * event) +-{ +- struct rptl_op *op = NULL; +- struct rptl *rptl = NULL; +- int ret = PTL_OK, tmp_ret = PTL_OK; +- int mpi_errno = MPI_SUCCESS; +- struct rptl_target *target; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_RPTL_EQGET); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_RPTL_EQGET); +- +- ret = poke_progress(); +- RPTLU_ERR_POP(ret, "error poking progress\n"); +- +- /* before we poll the eq, we need to check if there are any +- * completed operations that need to be returned */ +- if (pending_event_valid) { +- memcpy(event, &pending_event, sizeof(ptl_event_t)); +- pending_event_valid = 0; +- ret = PTL_OK; +- goto fn_exit; +- } +- +- ret = PtlEQGet(eq_handle, event); +- if (ret == PTL_EQ_EMPTY) +- goto fn_exit; +- +- /* find the rptl and op associated with this event */ +- tmp_ret = get_event_info(event, &rptl, &op); +- if (tmp_ret) { +- ret = tmp_ret; +- RPTLU_ERR_POP(ret, "Error returned from get_event_info\n"); +- } +- +- /* PT_DISABLED events only occur on the target */ +- if (event->type == PTL_EVENT_PT_DISABLED) { +- /* we hide PT disabled events from the user */ +- ret = PTL_EQ_EMPTY; +- +- /* we should only receive disable events on the data pt */ +- assert(rptl->data.pt == event->pt_index); +- +- /* if we don't have a control PT, we don't have a way to +- * recover from disable events */ +- assert(rptl->control.pt != PTL_PT_ANY); +- +- if (rptl->local_state == RPTL_LOCAL_STATE_ACTIVE) { +- rptl->local_state = RPTL_LOCAL_STATE_AWAITING_PAUSE_ACKS; +- rptl->pause_ack_counter = 0; +- +- /* send out pause messages */ +- tmp_ret = send_pause_messages(rptl); +- if (tmp_ret) { +- ret = tmp_ret; +- RPTLU_ERR_POP(ret, "Error returned from send_pause_messages\n"); +- } +- } +- } +- +- /* PUT_OVERFLOW events only occur on the target and only for the +- * data portal */ +- else if (event->type == PTL_EVENT_PUT_OVERFLOW || event->type == PTL_EVENT_GET_OVERFLOW) { +- /* something is being pulled out of the overflow buffer, +- * decrement counter */ +- rptl->data.ob_curr_count--; +- +- /* we should only receive disable events on the data pt */ +- assert(rptl->data.pt == event->pt_index); +- } +- +- /* PUT events only occur on the target */ +- else if (event->type == PTL_EVENT_PUT || event->type == PTL_EVENT_GET) { +- if (rptl->data.pt == event->pt_index) { +- /* if the event is in the OVERFLOW list, then it means we +- * just got a match in there */ +- if (event->ptl_list == PTL_OVERFLOW_LIST) +- rptl->data.ob_curr_count++; +- goto fn_exit; +- } +- +- /* control PT should never see a GET event */ +- assert(event->type == PTL_EVENT_PUT); +- +- /* else, this message is on the control PT, so hide this event +- * from the user */ +- ret = PTL_EQ_EMPTY; +- +- /* the message came in on the control PT, repost it */ +- tmp_ret = rptli_post_control_buffer(rptl->ni, rptl->control.pt, +- &rptl->control.me[rptl->control.me_idx]); +- if (tmp_ret) { +- ret = tmp_ret; +- RPTLU_ERR_POP(ret, "Error returned from rptli_post_control_buffer\n"); +- } +- rptl->control.me_idx++; +- if (rptl->control.me_idx >= 2 * rptl_info.world_size) +- rptl->control.me_idx = 0; +- +- if (event->hdr_data == RPTL_CONTROL_MSG_PAUSE) { +- tmp_ret = find_target(event->initiator, &target); +- if (tmp_ret) { +- ret = tmp_ret; +- RPTLU_ERR_POP(ret, "Error finding target\n"); +- } +- assert(target->state < RPTL_TARGET_STATE_RECEIVED_PAUSE); +- target->state = RPTL_TARGET_STATE_RECEIVED_PAUSE; +- target->rptl = rptl; +- } +- else if (event->hdr_data == RPTL_CONTROL_MSG_PAUSE_ACK) { +- rptl->pause_ack_counter++; +- } +- else { /* got an UNPAUSE message */ +- /* clear NACKs from all operations to this target and poke +- * progress */ +- tmp_ret = clear_nacks(event->initiator); +- if (tmp_ret) { +- ret = tmp_ret; +- RPTLU_ERR_POP(ret, "Error returned from clear_nacks\n"); +- } +- } +- } +- +- /* origin side events */ +- else if (event->type == PTL_EVENT_SEND || event->type == PTL_EVENT_ACK || +- event->type == PTL_EVENT_REPLY) { +- +- /* if this is a failed event, we simply drop this event */ +- if (event->ni_fail_type == PTL_NI_PT_DISABLED) { +- /* hide the event from the user */ +- ret = PTL_EQ_EMPTY; +- +- /* we should not get NACKs on the control portal */ +- if (event->type == PTL_EVENT_ACK) +- assert(op->u.put.pt_type == RPTL_PT_DATA); +- +- op->state = RPTL_OP_STATE_NACKED; +- +- if (op->op_type == RPTL_OP_PUT) { +- assert(!(event->type == PTL_EVENT_SEND && op->u.put.send)); +- assert(!(event->type == PTL_EVENT_ACK && op->u.put.ack)); +- +- /* discard pending events, since we will retransmit +- * this op anyway */ +- if (op->u.put.ack) { +- MPL_free(op->u.put.ack); +- op->u.put.ack = NULL; +- } +- if (op->u.put.send) { +- MPL_free(op->u.put.send); +- op->u.put.send = NULL; +- } +- } +- +- if (op->op_type == RPTL_OP_PUT) +- tmp_ret = find_target(op->u.put.target_id, &target); +- else +- tmp_ret = find_target(op->u.get.target_id, &target); +- if (tmp_ret) { +- ret = tmp_ret; +- RPTLU_ERR_POP(ret, "Error finding target\n"); +- } +- +- if (target->state == RPTL_TARGET_STATE_ACTIVE) { +- target->state = RPTL_TARGET_STATE_DISABLED; +- target->rptl = NULL; +- } +- } +- +- /* if this is a REPLY event, we are done with this op */ +- else if (event->type == PTL_EVENT_REPLY) { +- assert(op->op_type == RPTL_OP_GET); +- +- event->user_ptr = op->u.get.user_ptr; +- +- /* GET operations only go into the data op list */ +- DL_DELETE(op->target->data_op_list, op); +- rptli_op_free(op); +- } +- +- else if (event->type == PTL_EVENT_SEND && op->u.put.ack) { +- assert(op->op_type == RPTL_OP_PUT); +- +- /* we already got the other event we needed earlier. mark +- * the op events as ready and return this current event to +- * the user. */ +- op->events_ready = 1; +- event->user_ptr = op->u.put.user_ptr; +- +- /* if the message is over the control portal, ignore both +- * events */ +- if (op->u.put.pt_type == RPTL_PT_CONTROL) { +- /* drop the ack event */ +- MPL_free(op->u.put.ack); +- DL_DELETE(op->target->control_op_list, op); +- rptli_op_free(op); +- +- /* drop the send event */ +- ret = PTL_EQ_EMPTY; +- } +- else { +- /* if the message is over the data portal, we'll +- * return the send event. if the user asked for an +- * ACK, we will enqueue the ack to be returned +- * next. */ +- if (op->u.put.ack_req & PTL_ACK_REQ) { +- /* only one event should be pending */ +- assert(pending_event_valid == 0); +- memcpy(&pending_event, op->u.put.ack, sizeof(ptl_event_t)); +- pending_event_valid = 1; +- } +- MPL_free(op->u.put.ack); +- DL_DELETE(op->target->data_op_list, op); +- rptli_op_free(op); +- } +- } +- +- else if (event->type == PTL_EVENT_ACK && op->u.put.send) { +- assert(op->op_type == RPTL_OP_PUT); +- +- /* we already got the other event we needed earlier. mark +- * the op events as ready and return this current event to +- * the user. */ +- op->events_ready = 1; +- event->user_ptr = op->u.put.user_ptr; +- +- /* if the message is over the control portal, ignore both +- * events */ +- if (op->u.put.pt_type == RPTL_PT_CONTROL) { +- /* drop the send event */ +- MPL_free(op->u.put.send); +- DL_DELETE(op->target->control_op_list, op); +- rptli_op_free(op); +- +- /* drop the ack event */ +- ret = PTL_EQ_EMPTY; +- } +- else { +- /* if the message is over the data portal, we'll +- * return the send event. if the user asked for an +- * ACK, we will enqueue the ack to be returned +- * next. */ +- if (op->u.put.ack_req & PTL_ACK_REQ) { +- /* user asked for an ACK, so return it to the user +- * and queue up the SEND event for next time */ +- memcpy(&pending_event, op->u.put.send, sizeof(ptl_event_t)); +- MPL_free(op->u.put.send); +- assert(pending_event_valid == 0); +- pending_event_valid = 1; +- } +- else { +- /* user didn't ask for an ACK, overwrite the ACK +- * event with the pending send event */ +- memcpy(event, op->u.put.send, sizeof(ptl_event_t)); +- MPL_free(op->u.put.send); +- +- /* set the event user pointer again, since we +- * copied over the original event */ +- event->user_ptr = op->u.put.user_ptr; +- } +- /* we should be in the data op list */ +- DL_DELETE(op->target->data_op_list, op); +- rptli_op_free(op); +- } +- } +- +- else { +- assert(!(event->type == PTL_EVENT_SEND && op->u.put.send)); +- assert(!(event->type == PTL_EVENT_ACK && op->u.put.ack)); +- +- /* stash this event as we need to wait for the buddy event +- * as well before returning to the user */ +- ret = stash_event(op, *event); +- RPTLU_ERR_POP(ret, "error stashing event\n"); +- ret = PTL_EQ_EMPTY; +- } +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_RPTL_EQGET); +- return ret; +- +- fn_fail: +- if (mpi_errno) +- ret = PTL_FAIL; +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/rptl.h ++++ /dev/null +@@ -1,205 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#ifndef RPTL_H_INCLUDED +-#define RPTL_H_INCLUDED +- +-#if !defined HAVE_MACRO_VA_ARGS +-#error "portals requires VA_ARGS support" +-#endif /* HAVE_MACRO_VA_ARGS */ +- +-#if defined HAVE__FUNC__ +-#define RPTLU_FUNC __func__ +-#elif defined HAVE_CAP__FUNC__ +-#define RPTLU_FUNC __FUNC__ +-#elif defined HAVE__FUNCTION__ +-#define RPTLU_FUNC __FUNCTION__ +-#else +-#define RPTLU_FUNC "Unknown" +-#endif +- +-#define RPTLU_ERR_POP(ret, ...) \ +- { \ +- if (ret) { \ +- MPL_error_printf("%s (%d): ", RPTLU_FUNC, __LINE__); \ +- MPL_error_printf(__VA_ARGS__); \ +- goto fn_fail; \ +- } \ +- } +- +-enum rptl_pt_type { +- RPTL_PT_DATA, +- RPTL_PT_CONTROL +-}; +- +-struct rptl_target; +-struct rptl_op { +- enum { +- RPTL_OP_PUT, +- RPTL_OP_GET +- } op_type; +- +- enum { +- RPTL_OP_STATE_QUEUED, +- RPTL_OP_STATE_ISSUED, +- RPTL_OP_STATE_NACKED +- } state; +- +- union { +- struct { +- ptl_handle_md_t md_handle; +- ptl_size_t local_offset; +- ptl_size_t length; +- ptl_ack_req_t ack_req; +- ptl_process_t target_id; +- ptl_pt_index_t pt_index; +- ptl_match_bits_t match_bits; +- ptl_size_t remote_offset; +- void *user_ptr; +- ptl_hdr_data_t hdr_data; +- +- /* internal variables store events */ +- ptl_event_t *send; +- ptl_event_t *ack; +- enum rptl_pt_type pt_type; +- } put; +- struct { +- ptl_handle_md_t md_handle; +- ptl_size_t local_offset; +- ptl_size_t length; +- ptl_process_t target_id; +- ptl_pt_index_t pt_index; +- ptl_match_bits_t match_bits; +- ptl_size_t remote_offset; +- void *user_ptr; +- } get; +- } u; +- +- int events_ready; +- struct rptl_target *target; +- +- struct rptl_op *next; +- struct rptl_op *prev; +-}; +- +-#define RPTL_CONTROL_MSG_PAUSE (0) +-#define RPTL_CONTROL_MSG_PAUSE_ACK (1) +-#define RPTL_CONTROL_MSG_UNPAUSE (2) +- +-struct rptl { +- /* local portal state */ +- enum { +- RPTL_LOCAL_STATE_ACTIVE, +- RPTL_LOCAL_STATE_AWAITING_PAUSE_ACKS +- } local_state; +- uint64_t pause_ack_counter; +- +- struct { +- ptl_handle_eq_t eq; +- ptl_pt_index_t pt; /* primary pt for data exchange */ +- +- /* ob_max_count refers to the number of messages that were in +- * the overflow buffer when the pt was disabled */ +- uint64_t ob_max_count; +- +- /* ob_curr_count refers to the current tally of messages in +- * the overflow buffer. if we are in disabled state, when +- * this count reaches half of the maximum count, we are ready +- * to reenable the PT. */ +- uint64_t ob_curr_count; +- } data; +- +- struct { +- ptl_pt_index_t pt; /* pt for control messages */ +- +- /* the remaining contents of the control structure are only +- * valid when the control.pt field is not PTL_PT_ANY */ +- ptl_handle_me_t *me; +- int me_idx; +- } control; +- +- ptl_handle_ni_t ni; +- ptl_handle_eq_t eq; +- ptl_handle_md_t md; +- +- struct rptl *next; +- struct rptl *prev; +-}; +- +-#define RPTL_OP_POOL_SEGMENT_COUNT (1024) +- +-struct rptl_target { +- ptl_process_t id; +- +- enum rptl_target_state { +- RPTL_TARGET_STATE_ACTIVE, +- RPTL_TARGET_STATE_DISABLED, +- RPTL_TARGET_STATE_RECEIVED_PAUSE, +- RPTL_TARGET_STATE_PAUSE_ACKED +- } state; +- +- /* when we get a pause message, we need to know which rptl it came +- * in on, so we can figure out what the corresponding target +- * portal is. for this, we store the local rptl */ +- struct rptl *rptl; +- +- struct rptl_op_pool_segment { +- struct rptl_op op[RPTL_OP_POOL_SEGMENT_COUNT]; +- struct rptl_op_pool_segment *next; +- struct rptl_op_pool_segment *prev; +- } *op_segment_list; +- struct rptl_op *op_pool; +- +- struct rptl_op *data_op_list; +- struct rptl_op *control_op_list; +- +- struct rptl_target *next; +- struct rptl_target *prev; +- +- int issued_data_ops; +-}; +- +-struct rptl_info { +- struct rptl *rptl_list; +- struct rptl_target *target_list; +- +- int world_size; +- uint64_t origin_events_left; +- int (*get_target_info) (int rank, ptl_process_t * id, ptl_pt_index_t local_data_pt, +- ptl_pt_index_t * target_data_pt, ptl_pt_index_t * target_control_pt); +-}; +- +-extern struct rptl_info rptl_info; +- +- +-/* initialization */ +-int MPID_nem_ptl_rptl_init(int world_size, uint64_t max_origin_events, +- int (*get_target_info) (int rank, ptl_process_t * id, +- ptl_pt_index_t local_data_pt, +- ptl_pt_index_t * target_data_pt, +- ptl_pt_index_t * target_control_pt)); +-int MPID_nem_ptl_rptl_drain_eq(int eq_count, ptl_handle_eq_t *eq); +-int MPID_nem_ptl_rptl_ptinit(ptl_handle_ni_t ni_handle, ptl_handle_eq_t eq_handle, ptl_pt_index_t data_pt, +- ptl_pt_index_t control_pt); +-int MPID_nem_ptl_rptl_ptfini(ptl_pt_index_t pt_index); +-int rptli_post_control_buffer(ptl_handle_ni_t ni_handle, ptl_pt_index_t pt, +- ptl_handle_me_t * me_handle); +- +-/* op management */ +-int rptli_op_alloc(struct rptl_op **op, struct rptl_target *target); +-void rptli_op_free(struct rptl_op *op); +- +-/* communication */ +-int MPID_nem_ptl_rptl_put(ptl_handle_md_t md_handle, ptl_size_t local_offset, ptl_size_t length, +- ptl_ack_req_t ack_req, ptl_process_t target_id, ptl_pt_index_t pt_index, +- ptl_match_bits_t match_bits, ptl_size_t remote_offset, void *user_ptr, +- ptl_hdr_data_t hdr_data); +-int MPID_nem_ptl_rptl_get(ptl_handle_md_t md_handle, ptl_size_t local_offset, ptl_size_t length, +- ptl_process_t target_id, ptl_pt_index_t pt_index, +- ptl_match_bits_t match_bits, ptl_size_t remote_offset, void *user_ptr); +-int MPID_nem_ptl_rptl_eqget(ptl_handle_eq_t eq_handle, ptl_event_t * event); +- +-#endif /* RPTL_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/rptl_init.c ++++ /dev/null +@@ -1,239 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +-#include "rptl.h" +- +-#undef FUNCNAME +-#define FUNCNAME rptli_post_control_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int rptli_post_control_buffer(ptl_handle_ni_t ni_handle, ptl_pt_index_t pt, +- ptl_handle_me_t * me_handle) +-{ +- int ret; +- ptl_me_t me; +- ptl_process_t id; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_RPTLI_POST_CONTROL_BUFFER); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_RPTLI_POST_CONTROL_BUFFER); +- +- id.phys.nid = PTL_NID_ANY; +- id.phys.pid = PTL_PID_ANY; +- +- me.start = NULL; +- me.length = 0; +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = (PTL_ME_OP_PUT | PTL_ME_OP_GET | PTL_ME_USE_ONCE | PTL_ME_IS_ACCESSIBLE | +- PTL_ME_EVENT_LINK_DISABLE | PTL_ME_EVENT_UNLINK_DISABLE); +- me.match_id = id; +- me.match_bits = 0; +- me.ignore_bits = 0; +- me.min_free = 0; +- +- while (1) { +- ret = PtlMEAppend(ni_handle, pt, &me, PTL_PRIORITY_LIST, NULL, me_handle); +- if (ret != PTL_NO_SPACE) +- break; +- } +- RPTLU_ERR_POP(ret, "Error appending empty buffer to priority list\n"); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_RPTLI_POST_CONTROL_BUFFER); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_rptl_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_rptl_init(int world_size, uint64_t max_origin_events, +- int (*get_target_info) (int rank, ptl_process_t * id, +- ptl_pt_index_t local_data_pt, +- ptl_pt_index_t * target_data_pt, +- ptl_pt_index_t * target_control_pt)) +-{ +- int ret = PTL_OK; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_RPTL_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_RPTL_INIT); +- +- rptl_info.rptl_list = NULL; +- rptl_info.target_list = NULL; +- +- rptl_info.world_size = world_size; +- rptl_info.origin_events_left = max_origin_events; +- rptl_info.get_target_info = get_target_info; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_RPTL_INIT); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_rptl_drain_eq +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_rptl_drain_eq(int eq_count, ptl_handle_eq_t *eq) +-{ +- int ret = PTL_OK; +- ptl_event_t event; +- struct rptl_op_pool_segment *op_segment; +- int i; +- struct rptl_target *target, *t; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_RPTL_FINALIZE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_RPTL_FINALIZE); +- +- for (target = rptl_info.target_list; target; target = target->next) { +- while (target->control_op_list || target->data_op_list) { +- for (i = 0; i < eq_count; i++) { +- /* read and ignore all events */ +- ret = MPID_nem_ptl_rptl_eqget(eq[i], &event); +- if (ret == PTL_EQ_EMPTY) +- ret = PTL_OK; +- RPTLU_ERR_POP(ret, "Error calling MPID_nem_ptl_rptl_eqget\n"); +- } +- } +- } +- +- for (target = rptl_info.target_list; target;) { +- assert(target->data_op_list == NULL); +- assert(target->control_op_list == NULL); +- +- while (target->op_segment_list) { +- op_segment = target->op_segment_list; +- DL_DELETE(target->op_segment_list, op_segment); +- MPL_free(op_segment); +- } +- +- t = target->next; +- MPL_free(target); +- target = t; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_RPTL_FINALIZE); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_rptl_ptinit +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_rptl_ptinit(ptl_handle_ni_t ni_handle, ptl_handle_eq_t eq_handle, ptl_pt_index_t data_pt, +- ptl_pt_index_t control_pt) +-{ +- int ret = PTL_OK; +- struct rptl *rptl; +- int mpi_errno = MPI_SUCCESS; +- int i; +- ptl_md_t md; +- MPIR_CHKPMEM_DECL(2); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_RPTL_PTINIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_RPTL_PTINIT); +- +- +- /* setup the parts of rptls that can be done before world size or +- * target information */ +- MPIR_CHKPMEM_MALLOC(rptl, struct rptl *, sizeof(struct rptl), mpi_errno, "rptl", MPL_MEM_ADDRESS); +- DL_APPEND(rptl_info.rptl_list, rptl); +- +- rptl->local_state = RPTL_LOCAL_STATE_ACTIVE; +- rptl->pause_ack_counter = 0; +- +- rptl->data.ob_max_count = 0; +- rptl->data.ob_curr_count = 0; +- +- rptl->data.pt = data_pt; +- rptl->control.pt = control_pt; +- +- rptl->ni = ni_handle; +- rptl->eq = eq_handle; +- +- md.start = 0; +- md.length = (ptl_size_t) (-1); +- md.options = 0x0; +- md.eq_handle = rptl->eq; +- md.ct_handle = PTL_CT_NONE; +- ret = PtlMDBind(rptl->ni, &md, &rptl->md); +- RPTLU_ERR_POP(ret, "Error binding new global MD\n"); +- +- /* post world_size number of empty buffers on the control portal */ +- if (rptl->control.pt != PTL_PT_ANY) { +- MPIR_CHKPMEM_MALLOC(rptl->control.me, ptl_handle_me_t *, +- 2 * rptl_info.world_size * sizeof(ptl_handle_me_t), mpi_errno, +- "rptl target info", MPL_MEM_BUFFER); +- for (i = 0; i < 2 * rptl_info.world_size; i++) { +- ret = rptli_post_control_buffer(rptl->ni, rptl->control.pt, &rptl->control.me[i]); +- RPTLU_ERR_POP(ret, "Error in rptli_post_control_buffer\n"); +- } +- rptl->control.me_idx = 0; +- } +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_RPTL_PTINIT); +- return ret; +- +- fn_fail: +- if (mpi_errno) +- ret = PTL_FAIL; +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ptl_rptl_ptfini +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_ptl_rptl_ptfini(ptl_pt_index_t pt_index) +-{ +- int i; +- int ret = PTL_OK; +- struct rptl *rptl; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_PTL_RPTL_PTFINI); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_PTL_RPTL_PTFINI); +- +- /* find the right rptl */ +- for (rptl = rptl_info.rptl_list; rptl && rptl->data.pt != pt_index; rptl = rptl->next); +- assert(rptl); +- +- /* free control portals that were created */ +- if (rptl->control.pt != PTL_PT_ANY) { +- for (i = 0; i < rptl_info.world_size * 2; i++) { +- ret = PtlMEUnlink(rptl->control.me[i]); +- RPTLU_ERR_POP(ret, "Error unlinking control buffers\n"); +- } +- MPL_free(rptl->control.me); +- } +- +- DL_DELETE(rptl_info.rptl_list, rptl); +- MPL_free(rptl); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_PTL_RPTL_PTFINI); +- return ret; +- +- fn_fail: +- goto fn_exit; +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/rptl_op.c ++++ /dev/null +@@ -1,65 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2014 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "ptl_impl.h" +-#include "rptl.h" +- +-#undef FUNCNAME +-#define FUNCNAME rptli_op_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int rptli_op_alloc(struct rptl_op **op, struct rptl_target *target) +-{ +- int ret = PTL_OK; +- struct rptl_op_pool_segment *op_segment; +- int mpi_errno = MPI_SUCCESS; +- int i; +- MPIR_CHKPMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_RPTLI_OP_ALLOC); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_RPTLI_OP_ALLOC); +- +- assert(target); +- +- if (target->op_pool == NULL) { +- MPIR_CHKPMEM_MALLOC(op_segment, struct rptl_op_pool_segment *, sizeof(struct rptl_op_pool_segment), +- mpi_errno, "op pool segment", MPL_MEM_OTHER); +- DL_APPEND(target->op_segment_list, op_segment); +- +- for (i = 0; i < RPTL_OP_POOL_SEGMENT_COUNT; i++) +- DL_APPEND(target->op_pool, &op_segment->op[i]); +- } +- +- *op = target->op_pool; +- DL_DELETE(target->op_pool, *op); +- +- fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_RPTLI_OP_ALLOC); +- return ret; +- +- fn_fail: +- if (mpi_errno) +- ret = PTL_FAIL; +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME rptli_op_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void rptli_op_free(struct rptl_op *op) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_RPTLI_OP_FREE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_RPTLI_OP_FREE); +- +- DL_APPEND(op->target->op_pool, op); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_RPTLI_OP_FREE); +-} +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/subconfigure.m4 ++++ /dev/null +@@ -1,30 +0,0 @@ +-[#] start of __file__ +-dnl MPICH_SUBCFG_AFTER=src/mpid/ch3/channels/nemesis +- +-AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ +- AM_COND_IF([BUILD_CH3_NEMESIS],[ +- for net in $nemesis_networks ; do +- AS_CASE([$net],[portals4],[build_nemesis_netmod_portals4=yes]) +- done +- ]) +- AM_CONDITIONAL([BUILD_NEMESIS_NETMOD_PORTALS4],[test "X$build_nemesis_netmod_portals4" = "Xyes"]) +-])dnl +- +-AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ +-AM_COND_IF([BUILD_NEMESIS_NETMOD_PORTALS4],[ +- AC_MSG_NOTICE([RUNNING CONFIGURE FOR ch3:nemesis:portals4]) +- +- PAC_CC_FUNCTION_NAME_SYMBOL +- +- PAC_SET_HEADER_LIB_PATH(portals4) +- PAC_PUSH_FLAG(LIBS) +- PAC_CHECK_HEADER_LIB_FATAL(portals4, portals4.h, portals, PtlInit) +- PAC_APPEND_FLAG([-lportals],[WRAPPER_LIBS]) +- PAC_POP_FLAG(LIBS) +- +- AC_DEFINE([ENABLE_COMM_OVERRIDES], 1, [define to add per-vc function pointers to override send and recv functions]) +- +-])dnl end AM_COND_IF(BUILD_NEMESIS_NETMOD_PORTALS4,...) +-])dnl end _BODY +- +-[#] end of __file__ +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c +@@ -18,12 +18,13 @@ + + typedef struct freenode { + int index; +- struct freenode* next; ++ struct freenode *next; + } freenode_t; + + static struct { + freenode_t *head, *tail; +-} freeq = {NULL, NULL}; ++} freeq = { ++NULL, NULL}; + + static int g_tbl_size = 0; + static int g_tbl_capacity = CONN_PLFD_TBL_INIT_SIZE; +@@ -31,8 +32,8 @@ static int g_tbl_capacity = CONN_PLFD_TBL_INIT_SIZE; + static sockconn_t *g_sc_tbl = NULL; + struct pollfd *MPID_nem_tcp_plfd_tbl = NULL; + +-sockconn_t MPID_nem_tcp_g_lstn_sc = {0}; +-struct pollfd MPID_nem_tcp_g_lstn_plfd = {0}; ++sockconn_t MPID_nem_tcp_g_lstn_sc = { 0 }; ++struct pollfd MPID_nem_tcp_g_lstn_plfd = { 0 }; + + /* We define this in order to trick the compiler into including + information about the MPID_nem_tcp_vc_area type. This is +@@ -42,15 +43,15 @@ struct pollfd MPID_nem_tcp_g_lstn_plfd = {0}; + unused */ + static MPID_nem_tcp_vc_area *dummy_vc_area ATTRIBUTE((unused, used)) = NULL; + +-#define MAX_SKIP_POLLS_INACTIVE 512 /* something bigger */ +-#define MAX_SKIP_POLLS_ACTIVE 128 /* something smaller */ ++#define MAX_SKIP_POLLS_INACTIVE 512 /* something bigger */ ++#define MAX_SKIP_POLLS_ACTIVE 128 /* something smaller */ + static int MPID_nem_tcp_skip_polls = MAX_SKIP_POLLS_INACTIVE; + + /* Debug function to dump the sockconn table. This is intended to be + called from a debugger. The 'unused' attribute keeps the compiler + from complaining. The 'used' attribute makes sure the function is + added in the lib, despite the fact that it's unused. */ +-static void dbg_print_sc_tbl(FILE *stream, int print_free_entries) ATTRIBUTE((unused, used)); ++static void dbg_print_sc_tbl(FILE * stream, int print_free_entries) ATTRIBUTE((unused, used)); + + #define MPID_NEM_TCP_RECV_MAX_PKT_LEN 1024 + static char *recv_buf; +@@ -96,7 +97,7 @@ static struct { + g_sc_tbl to the given stream. If print_free_entries is true entries + 0..g_tbl_capacity will be printed. Otherwise, only 0..g_tbl_size will be + shown. */ +-static void dbg_print_sc_tbl(FILE *stream, int print_free_entries) ++static void dbg_print_sc_tbl(FILE * stream, int print_free_entries) + { + int i; + sockconn_t *sc; +@@ -113,18 +114,15 @@ static void dbg_print_sc_tbl(FILE *stream, int print_free_entries) + } + fprintf(stream, "========================================\n"); + } ++ + /* --END ERROR HANDLING-- */ + + static int find_free_entry(int *index); +-static int close_cleanup_and_free_sc_plfd(sockconn_t *const sc); +-static int cleanup_and_free_sc_plfd(sockconn_t *const sc); ++static int close_cleanup_and_free_sc_plfd(sockconn_t * const sc); ++static int cleanup_and_free_sc_plfd(sockconn_t * const sc); + static int error_closed(struct MPIDI_VC *const vc, int req_errno); + +-#undef FUNCNAME +-#define FUNCNAME is_same_connection +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int is_same_connection(sockconn_t *sc1, sockconn_t *sc2) ++static inline int is_same_connection(sockconn_t * sc1, sockconn_t * sc2) + { + + /* Returns TRUE iff sc1 and sc2 connect the same processes */ +@@ -140,64 +138,59 @@ static inline int is_same_connection(sockconn_t *sc1, sockconn_t *sc2) + return !sc1->is_tmpvc && !sc2->is_tmpvc && + sc1->pg_is_set && sc2->pg_is_set && + sc1->pg_rank == sc2->pg_rank && +- (( sc1->is_same_pg && sc2->is_same_pg) || +- (!sc1->is_same_pg && !sc2->is_same_pg && +- IS_SAME_PGID(sc1->pg_id, sc2->pg_id))); ++ ((sc1->is_same_pg && sc2->is_same_pg) || ++ (!sc1->is_same_pg && !sc2->is_same_pg && IS_SAME_PGID(sc1->pg_id, sc2->pg_id))); + } + + +-#undef FUNCNAME +-#define FUNCNAME alloc_sc_plfd_tbls +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int alloc_sc_plfd_tbls (void) ++static int alloc_sc_plfd_tbls(void) + { + int i, mpi_errno = MPI_SUCCESS, idx = -1; +- MPIR_CHKPMEM_DECL (2); ++ MPIR_CHKPMEM_DECL(2); + + MPIR_Assert(g_sc_tbl == NULL); + MPIR_Assert(MPID_nem_tcp_plfd_tbl == NULL); + +- MPIR_CHKPMEM_MALLOC (g_sc_tbl, sockconn_t *, g_tbl_capacity * sizeof(sockconn_t), +- mpi_errno, "connection table", MPL_MEM_ADDRESS); +- MPIR_CHKPMEM_MALLOC (MPID_nem_tcp_plfd_tbl, struct pollfd *, g_tbl_capacity * sizeof(struct pollfd), +- mpi_errno, "pollfd table", MPL_MEM_ADDRESS); ++ MPIR_CHKPMEM_MALLOC(g_sc_tbl, sockconn_t *, g_tbl_capacity * sizeof(sockconn_t), ++ mpi_errno, "connection table", MPL_MEM_ADDRESS); ++ MPIR_CHKPMEM_MALLOC(MPID_nem_tcp_plfd_tbl, struct pollfd *, ++ g_tbl_capacity * sizeof(struct pollfd), mpi_errno, "pollfd table", ++ MPL_MEM_ADDRESS); + #if defined(MPICH_DEBUG_MEMINIT) + /* We initialize the arrays in order to eliminate spurious valgrind errors +- that occur when poll(2) returns 0. See valgrind bugzilla#158425 and +- remove this code if the fix ever gets into a release of valgrind. +- [goodell@ 2007-02-25] */ ++ * that occur when poll(2) returns 0. See valgrind bugzilla#158425 and ++ * remove this code if the fix ever gets into a release of valgrind. ++ * [goodell@ 2007-02-25] */ + memset(MPID_nem_tcp_plfd_tbl, 0, g_tbl_capacity * sizeof(struct pollfd)); + #endif + + for (i = 0; i < g_tbl_capacity; i++) { +- INIT_SC_ENTRY(((sockconn_t *)&g_sc_tbl[i]), i); +- INIT_POLLFD_ENTRY(((struct pollfd *)&MPID_nem_tcp_plfd_tbl[i])); ++ INIT_SC_ENTRY(((sockconn_t *) & g_sc_tbl[i]), i); ++ INIT_POLLFD_ENTRY(((struct pollfd *) &MPID_nem_tcp_plfd_tbl[i])); + } + MPIR_CHKPMEM_COMMIT(); + + mpi_errno = find_free_entry(&idx); +- if (mpi_errno != MPI_SUCCESS) MPIR_ERR_POP (mpi_errno); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + +- MPIR_Assert(0 == idx); /* assumed in other parts of this file */ +- MPIR_Memcpy (&g_sc_tbl[idx], &MPID_nem_tcp_g_lstn_sc, sizeof(MPID_nem_tcp_g_lstn_sc)); +- MPIR_Memcpy (&MPID_nem_tcp_plfd_tbl[idx], &MPID_nem_tcp_g_lstn_plfd, sizeof(MPID_nem_tcp_g_lstn_plfd)); ++ MPIR_Assert(0 == idx); /* assumed in other parts of this file */ ++ MPIR_Memcpy(&g_sc_tbl[idx], &MPID_nem_tcp_g_lstn_sc, sizeof(MPID_nem_tcp_g_lstn_sc)); ++ MPIR_Memcpy(&MPID_nem_tcp_plfd_tbl[idx], &MPID_nem_tcp_g_lstn_plfd, ++ sizeof(MPID_nem_tcp_g_lstn_plfd)); + MPIR_Assert(MPID_nem_tcp_plfd_tbl[idx].fd == g_sc_tbl[idx].fd); + MPIR_Assert(MPID_nem_tcp_plfd_tbl[idx].events == POLLIN); + +- fn_exit: ++ fn_exit: + return mpi_errno; +- fn_fail: ++ fn_fail: + MPIR_CHKPMEM_REAP(); +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME free_sc_plfd_tbls +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int free_sc_plfd_tbls (void) ++static int free_sc_plfd_tbls(void) + { + int mpi_errno = MPI_SUCCESS; + +@@ -213,42 +206,37 @@ static int free_sc_plfd_tbls (void) + the size of the tables. Also, it is not useful to expand one table and leave the other + at the same size, 'coz of memory allocation failures. + */ +-#undef FUNCNAME +-#define FUNCNAME expand_sc_plfd_tbls +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int expand_sc_plfd_tbls (void) ++static int expand_sc_plfd_tbls(void) + { + int mpi_errno = MPI_SUCCESS; + sockconn_t *new_sc_tbl = NULL; + struct pollfd *new_plfd_tbl = NULL; + int new_capacity = g_tbl_capacity + CONN_PLFD_TBL_GROW_SIZE, i; +- MPIR_CHKPMEM_DECL (2); ++ MPIR_CHKPMEM_DECL(2); + + MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "expand_sc_plfd_tbls Entry")); +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "expand_sc_plfd_tbls b4 g_sc_tbl[0].fd=%d", g_sc_tbl[0].fd)); +- MPIR_CHKPMEM_MALLOC (new_sc_tbl, sockconn_t *, new_capacity * sizeof(sockconn_t), +- mpi_errno, "expanded connection table", MPL_MEM_ADDRESS); +- MPIR_CHKPMEM_MALLOC (new_plfd_tbl, struct pollfd *, new_capacity * sizeof(struct pollfd), +- mpi_errno, "expanded pollfd table", MPL_MEM_ADDRESS); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "expand_sc_plfd_tbls b4 g_sc_tbl[0].fd=%d", g_sc_tbl[0].fd)); ++ MPIR_CHKPMEM_MALLOC(new_sc_tbl, sockconn_t *, new_capacity * sizeof(sockconn_t), mpi_errno, ++ "expanded connection table", MPL_MEM_ADDRESS); ++ MPIR_CHKPMEM_MALLOC(new_plfd_tbl, struct pollfd *, new_capacity * sizeof(struct pollfd), ++ mpi_errno, "expanded pollfd table", MPL_MEM_ADDRESS); + +- MPIR_Memcpy (new_sc_tbl, g_sc_tbl, g_tbl_capacity * sizeof(sockconn_t)); +- MPIR_Memcpy (new_plfd_tbl, MPID_nem_tcp_plfd_tbl, g_tbl_capacity * sizeof(struct pollfd)); ++ MPIR_Memcpy(new_sc_tbl, g_sc_tbl, g_tbl_capacity * sizeof(sockconn_t)); ++ MPIR_Memcpy(new_plfd_tbl, MPID_nem_tcp_plfd_tbl, g_tbl_capacity * sizeof(struct pollfd)); + + /* VCs have pointers to entries in the sc table. These +- are updated here after the expand. */ +- for (i = 1; i < g_tbl_capacity; i++) /* i=0 = listening socket fd won't have a VC pointer */ +- { ++ * are updated here after the expand. */ ++ for (i = 1; i < g_tbl_capacity; i++) { /* i=0 = listening socket fd won't have a VC pointer */ + sockconn_t *new_sc = &new_sc_tbl[i]; + sockconn_t *sc = &g_sc_tbl[i]; + MPIDI_VC_t *vc = sc->vc; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); + + /* It's important to only make the assignment if the sc address in the +- vc matches the old sc address, otherwise we can corrupt the vc's +- state in certain head-to-head situations. */ +- if (vc && vc_tcp->sc && vc_tcp->sc == sc) +- { ++ * vc matches the old sc address, otherwise we can corrupt the vc's ++ * state in certain head-to-head situations. */ ++ if (vc && vc_tcp->sc && vc_tcp->sc == sc) { + ASSIGN_SC_TO_VC(vc_tcp, new_sc); + } + } +@@ -258,34 +246,34 @@ static int expand_sc_plfd_tbls (void) + g_sc_tbl = new_sc_tbl; + MPID_nem_tcp_plfd_tbl = new_plfd_tbl; + for (i = g_tbl_capacity; i < new_capacity; i++) { +- INIT_SC_ENTRY(((sockconn_t *)&g_sc_tbl[i]), i); +- INIT_POLLFD_ENTRY(((struct pollfd *)&MPID_nem_tcp_plfd_tbl[i])); ++ INIT_SC_ENTRY(((sockconn_t *) & g_sc_tbl[i]), i); ++ INIT_POLLFD_ENTRY(((struct pollfd *) &MPID_nem_tcp_plfd_tbl[i])); + } + g_tbl_capacity = new_capacity; + +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "expand_sc_plfd_tbls af g_sc_tbl[0].fd=%d", g_sc_tbl[0].fd)); +- for (i = 0; i < g_tbl_capacity; ++i) +- { ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "expand_sc_plfd_tbls af g_sc_tbl[0].fd=%d", g_sc_tbl[0].fd)); ++ for (i = 0; i < g_tbl_capacity; ++i) { + sockconn_t *sc = &g_sc_tbl[i]; + MPIDI_VC_t *vc = sc->vc; +- MPIR_AssertDeclValue(MPID_nem_tcp_vc_area *vc_tcp, VC_TCP(vc)); +- /* sockconn_t *dbg_sc = g_sc_tbl[i].vc ? VC_FIELD(g_sc_tbl[i].vc, sc) : (sockconn_t*)(-1); */ ++ MPIR_AssertDeclValue(MPID_nem_tcp_vc_area * vc_tcp, VC_TCP(vc)); ++ /* sockconn_t *dbg_sc = g_sc_tbl[i].vc ? VC_FIELD(g_sc_tbl[i].vc, sc) : (sockconn_t*)(-1); */ + + /* The state is only valid if the FD is valid. The VC field is only +- valid if the state is valid and COMMRDY. */ ++ * valid if the state is valid and COMMRDY. */ + MPIR_Assert(MPID_nem_tcp_plfd_tbl[i].fd == CONN_INVALID_FD || +- sc->state.cstate != CONN_STATE_TS_COMMRDY || +- vc_tcp->sc == sc); ++ sc->state.cstate != CONN_STATE_TS_COMMRDY || vc_tcp->sc == sc); + } +- +- ++ ++ + MPIR_CHKPMEM_COMMIT(); +- fn_exit: ++ fn_exit: + MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "expand_sc_plfd_tbls Exit")); + return mpi_errno; +- fn_fail: ++ fn_fail: + MPIR_CHKPMEM_REAP(); +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +@@ -300,17 +288,13 @@ static int expand_sc_plfd_tbls (void) + in the tables. If the size of the slot is already full, then this expands the table + and then returns the next available slot + */ +-#undef FUNCNAME +-#define FUNCNAME find_free_entry +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int find_free_entry(int *idx) + { + int mpi_errno = MPI_SUCCESS; + freenode_t *node; + + if (!Q_EMPTY(freeq)) { +- Q_DEQUEUE(&freeq, ((freenode_t **)&node)); ++ Q_DEQUEUE(&freeq, ((freenode_t **) & node)); + *idx = node->index; + MPL_free(node); + goto fn_exit; +@@ -326,15 +310,16 @@ static int find_free_entry(int *idx) + *idx = g_tbl_size; + ++g_tbl_size; + +- fn_exit: ++ fn_exit: + /* This function is the closest thing we have to a constructor, so we throw +- in a couple of initializers here in case the caller is sloppy about his +- assumptions. */ ++ * in a couple of initializers here in case the caller is sloppy about his ++ * assumptions. */ + INIT_SC_ENTRY(&g_sc_tbl[*idx], *idx); + INIT_POLLFD_ENTRY(&MPID_nem_tcp_plfd_tbl[*idx]); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +@@ -342,11 +327,7 @@ static int find_free_entry(int *idx) + fnd_sc is returned only for certain states. If it is not returned for a state, + the handler function can simply pass NULL as the second argument. + */ +-#undef FUNCNAME +-#define FUNCNAME found_better_sc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int found_better_sc(sockconn_t *sc, sockconn_t **fnd_sc) ++static int found_better_sc(sockconn_t * sc, sockconn_t ** fnd_sc) + { + int i, found = FALSE; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_FOUND_BETTER_SC); +@@ -362,75 +343,65 @@ static int found_better_sc(sockconn_t *sc, sockconn_t **fnd_sc) + /* if we don't know our own pg info, how can we look for a better SC? */ + MPIR_Assert(sc->pg_is_set); + +- for(i = 0; i < g_tbl_size && !found; i++) +- { ++ for (i = 0; i < g_tbl_size && !found; i++) { + sockconn_t *iter_sc = &g_sc_tbl[i]; + MPID_nem_tcp_Conn_State_t istate = iter_sc->state.cstate; + +- if (iter_sc != sc && iter_sc->fd != CONN_INVALID_FD +- && is_same_connection(iter_sc, sc)) +- { +- switch (sc->state.cstate) +- { +- case CONN_STATE_TC_C_CNTD: +- MPIR_Assert(fnd_sc == NULL); +- if (istate == CONN_STATE_TS_COMMRDY || +- istate == CONN_STATE_TA_C_RANKRCVD || +- istate == CONN_STATE_TC_C_TMPVCSENT) +- found = TRUE; +- break; +- case CONN_STATE_TA_C_RANKRCVD: +- MPIR_Assert(fnd_sc != NULL); +- if (istate == CONN_STATE_TS_COMMRDY || istate == CONN_STATE_TC_C_RANKSENT) { +- found = TRUE; +- *fnd_sc = iter_sc; +- } +- break; +- case CONN_STATE_TA_C_TMPVCRCVD: +- MPIR_Assert(fnd_sc != NULL); +- if (istate == CONN_STATE_TS_COMMRDY || istate == CONN_STATE_TC_C_TMPVCSENT) { +- found = TRUE; +- *fnd_sc = iter_sc; +- } +- break; +- /* Add code for other states here, if need be. */ +- default: +- /* FIXME: need to handle error condition better */ +- MPIR_Assert (0); +- break; ++ if (iter_sc != sc && iter_sc->fd != CONN_INVALID_FD && is_same_connection(iter_sc, sc)) { ++ switch (sc->state.cstate) { ++ case CONN_STATE_TC_C_CNTD: ++ MPIR_Assert(fnd_sc == NULL); ++ if (istate == CONN_STATE_TS_COMMRDY || ++ istate == CONN_STATE_TA_C_RANKRCVD || istate == CONN_STATE_TC_C_TMPVCSENT) ++ found = TRUE; ++ break; ++ case CONN_STATE_TA_C_RANKRCVD: ++ MPIR_Assert(fnd_sc != NULL); ++ if (istate == CONN_STATE_TS_COMMRDY || istate == CONN_STATE_TC_C_RANKSENT) { ++ found = TRUE; ++ *fnd_sc = iter_sc; ++ } ++ break; ++ case CONN_STATE_TA_C_TMPVCRCVD: ++ MPIR_Assert(fnd_sc != NULL); ++ if (istate == CONN_STATE_TS_COMMRDY || istate == CONN_STATE_TC_C_TMPVCSENT) { ++ found = TRUE; ++ *fnd_sc = iter_sc; ++ } ++ break; ++ /* Add code for other states here, if need be. */ ++ default: ++ /* FIXME: need to handle error condition better */ ++ MPIR_Assert(0); ++ break; + } + } + } + +-fn_exit: ++ fn_exit: + if (found) { + if (fnd_sc) { + MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, +- (MPL_DBG_FDEST, "found_better_sc(sc=%p (%s), *fnd_sc=%p (%s)) found=TRUE", +- sc, CONN_STATE_STR[sc->state.cstate], +- *fnd_sc, (*fnd_sc ? CONN_STATE_STR[(*fnd_sc)->state.cstate] : "N/A"))); +- } +- else { ++ (MPL_DBG_FDEST, ++ "found_better_sc(sc=%p (%s), *fnd_sc=%p (%s)) found=TRUE", sc, ++ CONN_STATE_STR[sc->state.cstate], *fnd_sc, ++ (*fnd_sc ? CONN_STATE_STR[(*fnd_sc)->state.cstate] : "N/A"))); ++ } else { + MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, +- (MPL_DBG_FDEST, "found_better_sc(sc=%p (%s), fnd_sc=(nil)) found=TRUE", +- sc, CONN_STATE_STR[sc->state.cstate])); ++ (MPL_DBG_FDEST, "found_better_sc(sc=%p (%s), fnd_sc=(nil)) found=TRUE", ++ sc, CONN_STATE_STR[sc->state.cstate])); + } +- } +- else { ++ } else { + MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, +- (MPL_DBG_FDEST, "found_better_sc(sc=%p (%s), *fnd_sc=N/A) found=FALSE", +- sc, CONN_STATE_STR[sc->state.cstate])); ++ (MPL_DBG_FDEST, "found_better_sc(sc=%p (%s), *fnd_sc=N/A) found=FALSE", ++ sc, CONN_STATE_STR[sc->state.cstate])); + } + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_FOUND_BETTER_SC); + return found; + } + + +-#undef FUNCNAME +-#define FUNCNAME vc_is_in_shutdown +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int vc_is_in_shutdown(MPIDI_VC_t *vc) ++static int vc_is_in_shutdown(MPIDI_VC_t * vc) + { + int retval = FALSE; + MPIR_Assert(vc != NULL); +@@ -439,21 +410,16 @@ static int vc_is_in_shutdown(MPIDI_VC_t *vc) + vc->state == MPIDI_VC_STATE_CLOSED || + vc->state == MPIDI_VC_STATE_LOCAL_CLOSE || + vc->state == MPIDI_VC_STATE_INACTIVE || +- vc->state == MPIDI_VC_STATE_INACTIVE_CLOSED || +- vc->state == MPIDI_VC_STATE_MORIBUND) +- { ++ vc->state == MPIDI_VC_STATE_INACTIVE_CLOSED || vc->state == MPIDI_VC_STATE_MORIBUND) { + retval = TRUE; + } + +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "vc_is_in_shutdown(%p)=%s", vc, (retval ? "TRUE" : "FALSE"))); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "vc_is_in_shutdown(%p)=%s", vc, (retval ? "TRUE" : "FALSE"))); + return retval; + } + +-#undef FUNCNAME +-#define FUNCNAME send_id_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int send_id_info(const sockconn_t *const sc) ++static int send_id_info(const sockconn_t * const sc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_nem_tcp_idinfo_t id_info; +@@ -466,25 +432,26 @@ static int send_id_info(const sockconn_t *const sc) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SEND_ID_INFO); + +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "my_pg->id=%s my_pg->rank=%d, sc->pg_rank=%d sc->is_same_pg=%s", +- (char *)MPIDI_Process.my_pg->id, MPIDI_Process.my_pg_rank, sc->pg_rank, +- (sc->is_same_pg ? "TRUE" : "FALSE"))); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "my_pg->id=%s my_pg->rank=%d, sc->pg_rank=%d sc->is_same_pg=%s", ++ (char *) MPIDI_Process.my_pg->id, MPIDI_Process.my_pg_rank, sc->pg_rank, ++ (sc->is_same_pg ? "TRUE" : "FALSE"))); + if (!sc->is_same_pg) +- pg_id_len = strlen(MPIDI_Process.my_pg->id) + 1; ++ pg_id_len = strlen(MPIDI_Process.my_pg->id) + 1; + + /* store ending NULL also */ + /* FIXME better keep pg_id_len itself as part of MPIDI_Process.my_pg structure to */ + /* avoid computing the length of string everytime this function is called. */ + + MPL_VG_MEM_INIT(&hdr, sizeof(hdr)); +- ++ + hdr.pkt_type = MPIDI_NEM_TCP_SOCKSM_PKT_ID_INFO; +- hdr.datalen = sizeof(MPIDI_nem_tcp_idinfo_t) + pg_id_len; ++ hdr.datalen = sizeof(MPIDI_nem_tcp_idinfo_t) + pg_id_len; + id_info.pg_rank = MPIDI_Process.my_pg_rank; + +- iov[0].iov_base = (MPL_IOV_BUF_CAST)&hdr; ++ iov[0].iov_base = (MPL_IOV_BUF_CAST) & hdr; + iov[0].iov_len = sizeof(hdr); +- iov[1].iov_base = (MPL_IOV_BUF_CAST)&id_info; ++ iov[1].iov_base = (MPL_IOV_BUF_CAST) & id_info; + iov[1].iov_len = sizeof(id_info); + buf_size = sizeof(hdr) + sizeof(id_info); + +@@ -494,29 +461,30 @@ static int send_id_info(const sockconn_t *const sc) + buf_size += pg_id_len; + ++iov_cnt; + } +- ++ + offset = MPL_large_writev(sc->fd, iov, iov_cnt); +- MPIR_ERR_CHKANDJUMP1(offset == -1 && errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", MPIR_Strerror(errno)); +- MPIR_ERR_CHKANDJUMP1(offset != buf_size, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(offset == -1 && ++ errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", ++ MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(offset != buf_size, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", ++ MPIR_Strerror(errno)); + /* FIXME log appropriate error */ + /* FIXME-Z1 socket is just connected and we are sending a few bytes. So, there should not */ + /* be a problem of partial data only being written to. If partial data written, */ + /* handle this. */ + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SEND_ID_INFO); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d, offset=%lld, errno=%d %s", mpi_errno, (long long)offset, errno, MPIR_Strerror(errno))); +- goto fn_exit; ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d, offset=%lld, errno=%d %s", mpi_errno, ++ (long long) offset, errno, MPIR_Strerror(errno))); ++ goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME send_tmpvc_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int send_tmpvc_info(const sockconn_t *const sc) ++static int send_tmpvc_info(const sockconn_t * const sc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_nem_tcp_portinfo_t port_info; +@@ -528,46 +496,48 @@ static int send_tmpvc_info(const sockconn_t *const sc) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SEND_TMPVC_INFO); + +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "my->pg_rank=%d, sc->pg_rank=%d" +- , MPIDI_Process.my_pg_rank, sc->pg_rank)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "my->pg_rank=%d, sc->pg_rank=%d", MPIDI_Process.my_pg_rank, ++ sc->pg_rank)); + + /* store ending NULL also */ + /* FIXME better keep pg_id_len itself as part of MPIDI_Process.my_pg structure to */ + /* avoid computing the length of string everytime this function is called. */ + + MPL_VG_MEM_INIT(&hdr, sizeof(hdr)); +- ++ + hdr.pkt_type = MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_INFO; + hdr.datalen = sizeof(MPIDI_nem_tcp_portinfo_t); + port_info.port_name_tag = sc->vc->port_name_tag; + +- iov[0].iov_base = (MPL_IOV_BUF_CAST)&hdr; ++ iov[0].iov_base = (MPL_IOV_BUF_CAST) & hdr; + iov[0].iov_len = sizeof(hdr); +- iov[1].iov_base = (MPL_IOV_BUF_CAST)&port_info; ++ iov[1].iov_base = (MPL_IOV_BUF_CAST) & port_info; + iov[1].iov_len = sizeof(port_info); + buf_size = sizeof(hdr) + sizeof(port_info); +- ++ + offset = MPL_large_writev(sc->fd, iov, iov_cnt); +- MPIR_ERR_CHKANDJUMP1(offset == -1 && errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", MPIR_Strerror(errno)); +- MPIR_ERR_CHKANDJUMP1(offset != buf_size, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(offset == -1 && ++ errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", ++ MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(offset != buf_size, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", ++ MPIR_Strerror(errno)); + /* FIXME log appropriate error */ + /* FIXME-Z1 socket is just connected and we are sending a few bytes. So, there should not */ + /* be a problem of partial data only being written to. If partial data written, */ + /* handle this. */ + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SEND_TMPVC_INFO); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d, offset=%lld, errno=%d %s", mpi_errno, (long long)offset, errno, MPIR_Strerror(errno))); +- goto fn_exit; ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d, offset=%lld, errno=%d %s", mpi_errno, ++ (long long) offset, errno, MPIR_Strerror(errno))); ++ goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME recv_id_or_tmpvc_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int recv_id_or_tmpvc_info(sockconn_t *const sc, int *got_sc_eof) ++static int recv_id_or_tmpvc_info(sockconn_t * const sc, int *got_sc_eof) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_nem_tcp_header_t hdr; +@@ -578,90 +548,108 @@ static int recv_id_or_tmpvc_info(sockconn_t *const sc, int *got_sc_eof) + struct iovec iov[2]; + char *pg_id = NULL; + +- MPIR_CHKPMEM_DECL (1); +- MPIR_CHKLMEM_DECL (1); ++ MPIR_CHKPMEM_DECL(1); ++ MPIR_CHKLMEM_DECL(1); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_RECV_ID_OR_TMPVC_INFO); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_RECV_ID_OR_TMPVC_INFO); + + *got_sc_eof = 0; + +- CHECK_EINTR (nread, read(sc->fd, &hdr, hdr_len)); ++ CHECK_EINTR(nread, read(sc->fd, &hdr, hdr_len)); + + /* The other side closed this connection (hopefully as part of a +- head-to-head resolution. */ ++ * head-to-head resolution. */ + if (0 == nread) { + *got_sc_eof = 1; + goto fn_exit; + } +- MPIR_ERR_CHKANDJUMP1(nread == -1 && errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(nread == -1 && ++ errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", ++ MPIR_Strerror(errno)); + MPIR_ERR_CHKANDJUMP(nread != hdr_len, mpi_errno, MPI_ERR_OTHER, "**read"); /* FIXME-Z1 */ + MPIR_Assert(hdr.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_INFO || +- hdr.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_INFO); ++ hdr.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_INFO); + MPIR_Assert(hdr.datalen != 0); +- ++ + if (hdr.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_INFO) { +- iov[0].iov_base = (void *) &(sc->pg_rank); +- iov[0].iov_len = sizeof(sc->pg_rank); +- pg_id_len = hdr.datalen - sizeof(MPIDI_nem_tcp_idinfo_t); +- if (pg_id_len != 0) { +- MPIR_CHKLMEM_MALLOC (pg_id, char *, pg_id_len, mpi_errno, "sockconn pg_id", MPL_MEM_OTHER); +- iov[1].iov_base = (void *)pg_id; +- iov[1].iov_len = pg_id_len; +- ++iov_cnt; +- } +- nread = MPL_large_readv(sc->fd, iov, iov_cnt); +- MPIR_ERR_CHKANDJUMP1(nread == -1 && errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", MPIR_Strerror(errno)); +- MPIR_ERR_CHKANDJUMP(nread != hdr.datalen, mpi_errno, MPI_ERR_OTHER, "**read"); /* FIXME-Z1 */ +- if (pg_id_len == 0) { +- sc->is_same_pg = TRUE; +- mpi_errno = MPID_nem_tcp_get_vc_from_conninfo (MPIDI_Process.my_pg->id, +- sc->pg_rank, &sc->vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- sc->pg_id = NULL; +- } +- else { +- sc->is_same_pg = FALSE; +- mpi_errno = MPID_nem_tcp_get_vc_from_conninfo (pg_id, sc->pg_rank, &sc->vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- sc->pg_id = sc->vc->pg->id; +- } +- +- { /* Added this block sp we can declare pointers to tcp private area of vc */ ++ iov[0].iov_base = (void *) &(sc->pg_rank); ++ iov[0].iov_len = sizeof(sc->pg_rank); ++ pg_id_len = hdr.datalen - sizeof(MPIDI_nem_tcp_idinfo_t); ++ if (pg_id_len != 0) { ++ MPIR_CHKLMEM_MALLOC(pg_id, char *, pg_id_len, mpi_errno, "sockconn pg_id", ++ MPL_MEM_OTHER); ++ iov[1].iov_base = (void *) pg_id; ++ iov[1].iov_len = pg_id_len; ++ ++iov_cnt; ++ } ++ nread = MPL_large_readv(sc->fd, iov, iov_cnt); ++ MPIR_ERR_CHKANDJUMP1(nread == -1 && ++ errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", ++ MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP(nread != hdr.datalen, mpi_errno, MPI_ERR_OTHER, "**read"); /* FIXME-Z1 */ ++ if (pg_id_len == 0) { ++ sc->is_same_pg = TRUE; ++ mpi_errno = MPID_nem_tcp_get_vc_from_conninfo(MPIDI_Process.my_pg->id, ++ sc->pg_rank, &sc->vc); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ sc->pg_id = NULL; ++ } else { ++ sc->is_same_pg = FALSE; ++ mpi_errno = MPID_nem_tcp_get_vc_from_conninfo(pg_id, sc->pg_rank, &sc->vc); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ sc->pg_id = sc->vc->pg->id; ++ } ++ ++ { /* Added this block sp we can declare pointers to tcp private area of vc */ + MPIDI_VC_t *sc_vc = sc->vc; + MPID_nem_tcp_vc_area *sc_vc_tcp = VC_TCP(sc_vc); + + MPIR_Assert(sc_vc != NULL); +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "about to incr sc_ref_count sc=%p sc->vc=%p sc_ref_count=%d", sc, sc_vc, sc_vc_tcp->sc_ref_count)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "about to incr sc_ref_count sc=%p sc->vc=%p sc_ref_count=%d", sc, ++ sc_vc, sc_vc_tcp->sc_ref_count)); + ++sc_vc_tcp->sc_ref_count; + } +- ++ + /* very important, without this is_same_connection() will always fail */ + sc->pg_is_set = TRUE; + MPIR_Assert(!sc->is_tmpvc); +- +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "PKT_ID_INFO: sc->pg_rank=%d sc->is_same_pg=%d sc->fd=%d, sc->vc=%p, sc=%p", sc->pg_rank, sc->is_same_pg, sc->fd, sc->vc, sc)); +- } +- else if (hdr.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_INFO) { ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "PKT_ID_INFO: sc->pg_rank=%d sc->is_same_pg=%d sc->fd=%d, sc->vc=%p, sc=%p", ++ sc->pg_rank, sc->is_same_pg, sc->fd, sc->vc, sc)); ++ } else if (hdr.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_INFO) { + MPIDI_VC_t *vc; + MPID_nem_tcp_vc_area *vc_tcp; + +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "PKT_TMPVC_INFO: sc->fd=%d", sc->fd)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "PKT_TMPVC_INFO: sc->fd=%d", sc->fd)); + /* create a new VC */ +- MPIR_CHKPMEM_MALLOC (vc, MPIDI_VC_t *, sizeof(MPIDI_VC_t), mpi_errno, "real vc from tmp vc", MPL_MEM_ADDRESS); ++ MPIR_CHKPMEM_MALLOC(vc, MPIDI_VC_t *, sizeof(MPIDI_VC_t), mpi_errno, "real vc from tmp vc", ++ MPL_MEM_ADDRESS); + /* --BEGIN ERROR HANDLING-- */ + if (vc == NULL) { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", NULL); ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, ++ "**nomem", NULL); + goto fn_fail; + } + /* --END ERROR HANDLING-- */ + + vc_tcp = VC_TCP(vc); +- ++ + MPIDI_VC_Init(vc, NULL, 0); +- vc_tcp->state = MPID_NEM_TCP_VC_STATE_CONNECTED; /* FIXME: is it needed ? */ ++ vc_tcp->state = MPID_NEM_TCP_VC_STATE_CONNECTED; /* FIXME: is it needed ? */ + sc->vc = vc; +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "about to incr sc_ref_count sc=%p sc->vc=%p sc_ref_count=%d", sc, sc->vc, vc_tcp->sc_ref_count)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "about to incr sc_ref_count sc=%p sc->vc=%p sc_ref_count=%d", sc, sc->vc, ++ vc_tcp->sc_ref_count)); + ++vc_tcp->sc_ref_count; + + ASSIGN_SC_TO_VC(vc_tcp, sc); +@@ -671,26 +659,31 @@ static int recv_id_or_tmpvc_info(sockconn_t *const sc, int *got_sc_eof) + iov[0].iov_len = sizeof(sc->vc->port_name_tag); + + nread = MPL_large_readv(sc->fd, iov, iov_cnt); +- MPIR_ERR_CHKANDJUMP1(nread == -1 && errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", MPIR_Strerror(errno)); +- MPIR_ERR_CHKANDJUMP(nread != hdr.datalen, mpi_errno, MPI_ERR_OTHER, "**read"); /* FIXME-Z1 */ ++ MPIR_ERR_CHKANDJUMP1(nread == -1 && ++ errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", ++ MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP(nread != hdr.datalen, mpi_errno, MPI_ERR_OTHER, "**read"); /* FIXME-Z1 */ + sc->is_same_pg = FALSE; + sc->pg_id = NULL; + sc->is_tmpvc = TRUE; + +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "enqueuing on acceptq vc=%p, sc->fd=%d, tag=%d", vc, sc->fd, sc->vc->port_name_tag)); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "enqueuing on acceptq vc=%p, sc->fd=%d, tag=%d", vc, sc->fd, ++ sc->vc->port_name_tag)); + MPIDI_CH3I_Acceptq_enqueue(vc, sc->vc->port_name_tag); + + MPIR_Assert(!sc->pg_is_set); + } + + MPIR_CHKPMEM_COMMIT(); +- fn_exit: ++ fn_exit: + MPIR_CHKLMEM_FREEALL(); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_RECV_ID_OR_TMPVC_INFO); + return mpi_errno; +- fn_fail: ++ fn_fail: + MPIR_CHKPMEM_REAP(); +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +@@ -698,10 +691,6 @@ static int recv_id_or_tmpvc_info(sockconn_t *const sc, int *got_sc_eof) + This function is used to send commands that don't have data but just only + the header. + */ +-#undef FUNCNAME +-#define FUNCNAME send_cmd_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int send_cmd_pkt(int fd, MPIDI_nem_tcp_socksm_pkt_type_t pkt_type) + { + int mpi_errno = MPI_SUCCESS; +@@ -711,8 +700,8 @@ static int send_cmd_pkt(int fd, MPIDI_nem_tcp_socksm_pkt_type_t pkt_type) + + MPIR_Assert(pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_ACK || + pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK || +- pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_ACK || +- pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_NAK || ++ pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_ACK || ++ pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_NAK || + pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_CLOSED); + + MPL_VG_MEM_INIT(&pkt, sizeof(pkt)); +@@ -720,13 +709,16 @@ static int send_cmd_pkt(int fd, MPIDI_nem_tcp_socksm_pkt_type_t pkt_type) + pkt.pkt_type = pkt_type; + pkt.datalen = 0; + +- CHECK_EINTR (offset, write(fd, &pkt, pkt_len)); +- MPIR_ERR_CHKANDJUMP1(offset == -1 && errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", MPIR_Strerror(errno)); +- MPIR_ERR_CHKANDJUMP1(offset != pkt_len, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", MPIR_Strerror(errno)); /* FIXME-Z1 */ +- fn_exit: ++ CHECK_EINTR(offset, write(fd, &pkt, pkt_len)); ++ MPIR_ERR_CHKANDJUMP1(offset == -1 && ++ errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", ++ MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(offset != pkt_len, mpi_errno, MPI_ERR_OTHER, "**write", "**write %s", MPIR_Strerror(errno)); /* FIXME-Z1 */ ++ fn_exit: + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +@@ -735,11 +727,7 @@ static int send_cmd_pkt(int fd, MPIDI_nem_tcp_socksm_pkt_type_t pkt_type) + This function is used to recv commands that don't have data but just only + the header. + */ +-#undef FUNCNAME +-#define FUNCNAME recv_cmd_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int recv_cmd_pkt(int fd, MPIDI_nem_tcp_socksm_pkt_type_t *pkt_type) ++static int recv_cmd_pkt(int fd, MPIDI_nem_tcp_socksm_pkt_type_t * pkt_type) + { + int mpi_errno = MPI_SUCCESS; + ssize_t nread; +@@ -749,22 +737,25 @@ static int recv_cmd_pkt(int fd, MPIDI_nem_tcp_socksm_pkt_type_t *pkt_type) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_RECV_CMD_PKT); + +- CHECK_EINTR (nread, read(fd, &pkt, pkt_len)); +- MPIR_ERR_CHKANDJUMP1(nread == -1 && errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", MPIR_Strerror(errno)); +- MPIR_ERR_CHKANDJUMP2(nread != pkt_len, mpi_errno, MPI_ERR_OTHER, "**read", "**read %d %s", nread, MPIR_Strerror(errno)); /* FIXME-Z1 */ ++ CHECK_EINTR(nread, read(fd, &pkt, pkt_len)); ++ MPIR_ERR_CHKANDJUMP1(nread == -1 && ++ errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", ++ MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP2(nread != pkt_len, mpi_errno, MPI_ERR_OTHER, "**read", "**read %d %s", nread, MPIR_Strerror(errno)); /* FIXME-Z1 */ + MPIR_Assert(pkt.datalen == 0); + MPIR_Assert(pkt.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_ACK || + pkt.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK || + pkt.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_ACK || + pkt.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_NAK || + pkt.pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_CLOSED); +- ++ + *pkt_type = pkt.pkt_type; +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_RECV_CMD_PKT); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +@@ -772,10 +763,6 @@ static int recv_cmd_pkt(int fd, MPIDI_nem_tcp_socksm_pkt_type_t *pkt_type) + /* Initiates connection protocol to remote process. It's OK to call + this function with the VC in an error state; an appropriate error + code will be returned. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_connect(struct MPIDI_VC *const vc) + { + MPID_nem_tcp_vc_area *const vc_tcp = VC_TCP(vc); +@@ -792,8 +779,7 @@ int MPID_nem_tcp_connect(struct MPIDI_VC *const vc) + MPIR_Assert(vc != NULL); + + /* Handle error case */ +- if (vc_tcp->state == MPID_NEM_TCP_VC_STATE_ERROR || +- vc->state == MPIDI_VC_STATE_MORIBUND) { ++ if (vc_tcp->state == MPID_NEM_TCP_VC_STATE_ERROR || vc->state == MPIDI_VC_STATE_MORIBUND) { + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**vc_in_error_state"); + } + +@@ -808,33 +794,35 @@ int MPID_nem_tcp_connect(struct MPIDI_VC *const vc) + + if (vc_tcp->state == MPID_NEM_TCP_VC_STATE_DISCONNECTED) { + struct sockaddr_in *sock_addr; +- struct in_addr addr; ++ struct in_addr addr; + int rc = 0; + + if (vc_tcp->connect_retry_count > MPIDI_NEM_TCP_MAX_CONNECT_RETRIES) { + MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "exceeded retries, closing sc"); +- MPIR_ERR_SET1(mpi_errno, MPI_ERR_OTHER, "**exceeded_connect_tries", "**exceeded_connect_tries %d", vc->pg_rank); ++ MPIR_ERR_SET1(mpi_errno, MPI_ERR_OTHER, "**exceeded_connect_tries", ++ "**exceeded_connect_tries %d", vc->pg_rank); + mpi_errno = error_closed(vc, mpi_errno); + MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**tcp_cleanup_fail"); + goto fn_fail; + } +- ++ + ++vc_tcp->connect_retry_count; + + MPIR_Assert(vc_tcp->sc == NULL); + mpi_errno = find_free_entry(&idx); +- if (mpi_errno != MPI_SUCCESS) MPIR_ERR_POP (mpi_errno); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + sc = &g_sc_tbl[idx]; + plfd = &MPID_nem_tcp_plfd_tbl[idx]; + + /* FIXME: +- We need to set addr and port using bc. +- If a process is dynamically spawned, vc->pg is NULL. +- In that case, same procedure is done +- in MPID_nem_tcp_connect_to_root() +- */ +- if (vc->pg != NULL) { /* VC is not a temporary one */ ++ * We need to set addr and port using bc. ++ * If a process is dynamically spawned, vc->pg is NULL. ++ * In that case, same procedure is done ++ * in MPID_nem_tcp_connect_to_root() ++ */ ++ if (vc->pg != NULL) { /* VC is not a temporary one */ + char *bc; + int pmi_errno; + int val_max_sz; +@@ -843,20 +831,22 @@ int MPID_nem_tcp_connect(struct MPIDI_VC *const vc) + val_max_sz = PMI2_MAX_VALLEN; + #else + pmi_errno = PMI_KVS_Get_value_length_max(&val_max_sz); +- MPIR_ERR_CHKANDJUMP1(pmi_errno, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %d", pmi_errno); ++ MPIR_ERR_CHKANDJUMP1(pmi_errno, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %d", ++ pmi_errno); + #endif + MPIR_CHKLMEM_MALLOC(bc, char *, val_max_sz, mpi_errno, "bc", MPL_MEM_OTHER); +- ++ + sc->is_tmpvc = FALSE; +- ++ + mpi_errno = vc->pg->getConnInfo(vc->pg_rank, bc, val_max_sz, vc->pg); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + mpi_errno = MPID_nem_tcp_get_addr_port_from_bc(bc, &addr, &(vc_tcp->sock_id.sin_port)); + vc_tcp->sock_id.sin_addr.s_addr = addr.s_addr; +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- else { ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { + sc->is_tmpvc = TRUE; + MPIR_Assert(!sc->pg_is_set); + } +@@ -864,80 +854,84 @@ int MPID_nem_tcp_connect(struct MPIDI_VC *const vc) + sock_addr = &(vc_tcp->sock_id); + + CHECK_EINTR(sc->fd, socket(AF_INET, SOCK_STREAM, 0)); +- MPIR_ERR_CHKANDJUMP2(sc->fd == -1, mpi_errno, MPI_ERR_OTHER, "**sock_create", "**sock_create %s %d", MPIR_Strerror(errno), errno); ++ MPIR_ERR_CHKANDJUMP2(sc->fd == -1, mpi_errno, MPI_ERR_OTHER, "**sock_create", ++ "**sock_create %s %d", MPIR_Strerror(errno), errno); + + plfd->fd = sc->fd; +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "sc->fd=%d, plfd->events=%d, plfd->revents=%d, vc=%p, sc=%p", sc->fd, plfd->events, plfd->revents, vc, sc)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "sc->fd=%d, plfd->events=%d, plfd->revents=%d, vc=%p, sc=%p", sc->fd, ++ plfd->events, plfd->revents, vc, sc)); + mpi_errno = MPID_nem_tcp_set_sockopts(sc->fd); +- if (mpi_errno) MPIR_ERR_POP (mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "connecting to 0x%08X:%d", sock_addr->sin_addr.s_addr, sock_addr->sin_port)); +- rc = connect(sc->fd, (SA*)sock_addr, sizeof(*sock_addr)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "connecting to 0x%08X:%d", sock_addr->sin_addr.s_addr, ++ sock_addr->sin_port)); ++ rc = connect(sc->fd, (SA *) sock_addr, sizeof(*sock_addr)); + /* connect should not be called with CHECK_EINTR macro */ +- MPIR_ERR_CHKANDJUMP2(rc < 0 && errno != EINPROGRESS, mpi_errno, MPI_ERR_OTHER, "**sock_connect", "**sock_connect %d %s", errno, MPIR_Strerror(errno)); +- ++ MPIR_ERR_CHKANDJUMP2(rc < 0 && ++ errno != EINPROGRESS, mpi_errno, MPI_ERR_OTHER, "**sock_connect", ++ "**sock_connect %d %s", errno, MPIR_Strerror(errno)); ++ + if (rc == 0) { + CHANGE_STATE(sc, CONN_STATE_TC_C_CNTD); +- } +- else { ++ } else { + CHANGE_STATE(sc, CONN_STATE_TC_C_CNTING); + } +- ++ + vc_tcp->state = MPID_NEM_TCP_VC_STATE_CONNECTED; + sc->pg_rank = vc->pg_rank; + +- if (vc->pg != NULL) { /* normal (non-dynamic) connection */ ++ if (vc->pg != NULL) { /* normal (non-dynamic) connection */ + if (IS_SAME_PGID(vc->pg->id, MPIDI_Process.my_pg->id)) { + sc->is_same_pg = TRUE; + sc->pg_id = NULL; +- } +- else { ++ } else { + sc->is_same_pg = FALSE; + sc->pg_id = vc->pg->id; + } + /* very important, without this is_same_connection() will always fail */ + sc->pg_is_set = TRUE; + MPIR_Assert(!sc->is_tmpvc); +- } +- else { /* (vc->pg == NULL), dynamic proc connection - temp vc */ ++ } else { /* (vc->pg == NULL), dynamic proc connection - temp vc */ + MPIR_Assert(sc->is_tmpvc); + } + + ASSIGN_SC_TO_VC(vc_tcp, sc); + sc->vc = vc; +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "about to incr sc_ref_count sc=%p sc->vc=%p sc_ref_count=%d", sc, sc->vc, vc_tcp->sc_ref_count)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "about to incr sc_ref_count sc=%p sc->vc=%p sc_ref_count=%d", sc, sc->vc, ++ vc_tcp->sc_ref_count)); + ++vc_tcp->sc_ref_count; +- } +- else if (vc_tcp->state == MPID_NEM_TCP_VC_STATE_CONNECTED) { ++ } else if (vc_tcp->state == MPID_NEM_TCP_VC_STATE_CONNECTED) { + sc = vc_tcp->sc; + MPIR_Assert(sc != NULL); + /* Do nothing here, the caller just needs to wait for the connection +- state machine to work its way through the states. Doing something at +- this point will almost always just mess up any head-to-head +- resolution. */ +- } +- else { ++ * state machine to work its way through the states. Doing something at ++ * this point will almost always just mess up any head-to-head ++ * resolution. */ ++ } else { + /* We already handled the error case at the top of the routine. */ + MPIR_Assertp(0); + } + +- fn_exit: ++ fn_exit: + /* MPID_nem_tcp_connpoll(); FIXME-Imp should be called? */ + MPIR_CHKLMEM_FREEALL(); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CONNECT); + return mpi_errno; +- fn_fail: ++ fn_fail: + if (idx != -1) + close_cleanup_and_free_sc_plfd(&g_sc_tbl[idx]); /* ignore error return */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME cleanup_and_free_sc_plfd +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int cleanup_and_free_sc_plfd(sockconn_t *const sc) ++static int cleanup_and_free_sc_plfd(sockconn_t * const sc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_VC_t *const sc_vc = sc->vc; +@@ -954,13 +948,15 @@ static int cleanup_and_free_sc_plfd(sockconn_t *const sc) + goto fn_exit; + + if (sc_vc) { +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "about to decr sc_ref_count sc=%p sc->vc=%p sc_ref_count=%d", sc, sc_vc, sc_vc_tcp->sc_ref_count)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "about to decr sc_ref_count sc=%p sc->vc=%p sc_ref_count=%d", sc, sc_vc, ++ sc_vc_tcp->sc_ref_count)); + MPIR_Assert(sc_vc_tcp->sc_ref_count > 0); + --sc_vc_tcp->sc_ref_count; + } +- +- if (sc_vc && sc_vc_tcp->sc == sc) /* this vc may be connecting/accepting with another sc e.g., this sc lost the tie-breaker */ +- { ++ ++ if (sc_vc && sc_vc_tcp->sc == sc) { /* this vc may be connecting/accepting with another sc e.g., this sc lost the tie-breaker */ + sc_vc_tcp->state = MPID_NEM_TCP_VC_STATE_DISCONNECTED; + ASSIGN_SC_TO_VC(sc_vc_tcp, NULL); + } +@@ -970,17 +966,19 @@ static int cleanup_and_free_sc_plfd(sockconn_t *const sc) + INIT_SC_ENTRY(sc, idx); + INIT_POLLFD_ENTRY(plfd); + +- MPIR_CHKPMEM_MALLOC(node, freenode_t *, sizeof(freenode_t), mpi_errno, "free node", MPL_MEM_OTHER); ++ MPIR_CHKPMEM_MALLOC(node, freenode_t *, sizeof(freenode_t), mpi_errno, "free node", ++ MPL_MEM_OTHER); + node->index = idx; + Q_ENQUEUE(&freeq, node); + + MPIR_CHKPMEM_COMMIT(); +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CLEANUP_AND_FREE_SC_PLFD); + return mpi_errno; +- fn_fail: ++ fn_fail: + MPIR_CHKPMEM_REAP(); +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +@@ -988,11 +986,7 @@ static int cleanup_and_free_sc_plfd(sockconn_t *const sc) + resources. This might be done as part of a ch3 close protocol, + because the sc lost in a head-to-head connection, or because there + was an error associated with the connection. */ +-#undef FUNCNAME +-#define FUNCNAME close_cleanup_and_free_sc_plfd +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int close_cleanup_and_free_sc_plfd(sockconn_t *const sc) ++int close_cleanup_and_free_sc_plfd(sockconn_t * const sc) + { + int mpi_errno = MPI_SUCCESS; + int mpi_errno2 = MPI_SUCCESS; +@@ -1001,7 +995,8 @@ int close_cleanup_and_free_sc_plfd(sockconn_t *const sc) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CLOSE_CLEANUP_AND_FREE_SC_PLFD); + +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "vc=%p, sc=%p, closing fd=%d", sc->vc, sc, sc->fd)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "vc=%p, sc=%p, closing fd=%d", sc->vc, sc, sc->fd)); + + if (sc == NULL) + goto fn_exit; +@@ -1011,12 +1006,13 @@ int close_cleanup_and_free_sc_plfd(sockconn_t *const sc) + MPIR_ERR_SET1(mpi_errno, MPI_ERR_OTHER, "**close", "**close %s", MPIR_Strerror(errno)); + + mpi_errno2 = cleanup_and_free_sc_plfd(sc); +- if (mpi_errno2) MPIR_ERR_ADD(mpi_errno, mpi_errno2); ++ if (mpi_errno2) ++ MPIR_ERR_ADD(mpi_errno, mpi_errno2); + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CLOSE_CLEANUP_AND_FREE_SC_PLFD); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } + +@@ -1026,11 +1022,7 @@ int close_cleanup_and_free_sc_plfd(sockconn_t *const sc) + /* FIXME XXX DJG do we need to do anything here to ensure that the final + close(TRUE) packet has made it into a writev call? The code might have a + race for queued messages. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_cleanup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_cleanup (struct MPIDI_VC *const vc) ++int MPID_nem_tcp_cleanup(struct MPIDI_VC *const vc) + { + int mpi_errno = MPI_SUCCESS, i; + MPID_nem_tcp_vc_area *const vc_tcp = VC_TCP(vc); +@@ -1040,32 +1032,35 @@ int MPID_nem_tcp_cleanup (struct MPIDI_VC *const vc) + + if (vc_tcp->sc != NULL) { + mpi_errno = close_cleanup_and_free_sc_plfd(vc_tcp->sc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + + i = 0; + while (vc_tcp->sc_ref_count > 0 && i < g_tbl_size) { + if (g_sc_tbl[i].vc == vc) { + /* We've found a proto-connection that doesn't yet have enough +- information to resolve the head-to-head situation. If we don't +- clean him up he'll end up accessing the about-to-be-freed vc. */ ++ * information to resolve the head-to-head situation. If we don't ++ * clean him up he'll end up accessing the about-to-be-freed vc. */ + mpi_errno = close_cleanup_and_free_sc_plfd(&g_sc_tbl[i]); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + MPIR_Assert(g_sc_tbl[i].vc == NULL); + } + ++i; + } + + /* close_cleanup_and_free_sc_plfd can technically cause a reconnect on a per-sc basis, but I +- don't think that it can happen when cleanup is called. Let's +- assert this for now and remove it if we prove that it can happen. */ ++ * don't think that it can happen when cleanup is called. Let's ++ * assert this for now and remove it if we prove that it can happen. */ + MPIR_Assert(vc_tcp->sc_ref_count == 0); + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CLEANUP); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +@@ -1073,10 +1068,6 @@ int MPID_nem_tcp_cleanup (struct MPIDI_VC *const vc) + that we didn't free or close any connections before taking the + checkpoint, so we need to do that on restart (except we don't close + the sockets because they should already be closed). */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_ckpt_cleanup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_ckpt_cleanup(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -1095,65 +1086,56 @@ int MPID_nem_tcp_ckpt_cleanup(void) + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); + if (vc_ch->is_local || vc_tcp->sc == NULL) + continue; +- ++ + /* cleanup vc */ + mpi_errno = cleanup_and_free_sc_plfd(vc_tcp->sc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + } + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CKPT_CLEANUP); + return mpi_errno; +- fn_fail: ++ fn_fail: + + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME state_tc_c_cnting_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int state_tc_c_cnting_handler(struct pollfd *const plfd, sockconn_t *const sc) ++static int state_tc_c_cnting_handler(struct pollfd *const plfd, sockconn_t * const sc) + { + int mpi_errno = MPI_SUCCESS; +- MPID_NEM_TCP_SOCK_STATUS_t status; ++ int status; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_STATE_TC_C_CNTING_HANDLER); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_STATE_TC_C_CNTING_HANDLER); +- ++ + status = MPID_nem_tcp_check_sock_status(plfd); + + if (status == MPID_NEM_TCP_SOCK_CONNECTED) { + CHANGE_STATE(sc, CONN_STATE_TC_C_CNTD); +- } +- else if (status == MPID_NEM_TCP_SOCK_ERROR_EOF) { ++ } else if (status == MPID_NEM_TCP_SOCK_ERROR_EOF) { + MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "state_tc_c_cnting_handler(): closing sc"); + mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ +- } +- else { /* status == MPID_NEM_TCP_SOCK_NOEVENT */ ++ } else { /* status == MPID_NEM_TCP_SOCK_NOEVENT */ + /* +- Still connecting... let it. While still connecting, even if +- a duplicate connection exists and this connection can be closed, it can get +- tricky. close/shutdown on a unconnected fd will fail anyways. So, let it either +- connect or let the connect itself fail on the fd before making a transition +- from this state. However, we are relying on the time taken by connect to +- report an error. If we want control over that time, fix the code to poll for +- that amount of time or change the socket option to control the time-out of +- connect. +- */ ++ * Still connecting... let it. While still connecting, even if ++ * a duplicate connection exists and this connection can be closed, it can get ++ * tricky. close/shutdown on a unconnected fd will fail anyways. So, let it either ++ * connect or let the connect itself fail on the fd before making a transition ++ * from this state. However, we are relying on the time taken by connect to ++ * report an error. If we want control over that time, fix the code to poll for ++ * that amount of time or change the socket option to control the time-out of ++ * connect. ++ */ + } + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_STATE_TC_C_CNTING_HANDLER); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME state_tc_c_cntd_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int state_tc_c_cntd_handler(struct pollfd *const plfd, sockconn_t *const sc) ++static int state_tc_c_cntd_handler(struct pollfd *const plfd, sockconn_t * const sc) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_STATE_TC_C_CNTD_HANDLER); +@@ -1165,44 +1147,41 @@ static int state_tc_c_cntd_handler(struct pollfd *const plfd, sockconn_t *const + mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ + goto fn_exit; + } +- ++ + if (IS_WRITEABLE(plfd)) { + MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "inside if (IS_WRITEABLE(plfd))"); +- if (!sc->is_tmpvc) { /* normal connection */ ++ if (!sc->is_tmpvc) { /* normal connection */ + mpi_errno = send_id_info(sc); + if (mpi_errno) { +- MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "state_tc_c_cntd_handler(): closing sc"); ++ MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ "state_tc_c_cntd_handler(): closing sc"); + mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ +- mpi_errno = MPI_SUCCESS; /* don't return an error if we fail in the connect protocol, just retry. */ ++ mpi_errno = MPI_SUCCESS; /* don't return an error if we fail in the connect protocol, just retry. */ + goto fn_exit; + } + + CHANGE_STATE(sc, CONN_STATE_TC_C_RANKSENT); +- } +- else { /* temp VC */ ++ } else { /* temp VC */ + mpi_errno = send_tmpvc_info(sc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + CHANGE_STATE(sc, CONN_STATE_TC_C_TMPVCSENT); + } +- } +- else { ++ } else { + /* Remain in the same state */ + } +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_STATE_TC_C_CNTD_HANDLER); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME state_c_ranksent_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int state_c_ranksent_handler(struct pollfd *const plfd, sockconn_t *const sc) ++static int state_c_ranksent_handler(struct pollfd *const plfd, sockconn_t * const sc) + { + MPIDI_VC_t *const sc_vc = sc->vc; + MPID_nem_tcp_vc_area *const sc_vc_tcp = VC_TCP(sc_vc); +@@ -1214,51 +1193,53 @@ static int state_c_ranksent_handler(struct pollfd *const plfd, sockconn_t *const + + if (IS_READABLE(plfd)) { + mpi_errno = recv_cmd_pkt(sc->fd, &pkt_type); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + MPIR_Assert(pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_ACK || + pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK || + pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_CLOSED); + + switch (pkt_type) { +- case MPIDI_NEM_TCP_SOCKSM_PKT_ID_ACK: +- CHANGE_STATE(sc, CONN_STATE_TS_COMMRDY); +- ASSIGN_SC_TO_VC(sc_vc_tcp, sc); ++ case MPIDI_NEM_TCP_SOCKSM_PKT_ID_ACK: ++ CHANGE_STATE(sc, CONN_STATE_TS_COMMRDY); ++ ASSIGN_SC_TO_VC(sc_vc_tcp, sc); + +- MPID_nem_tcp_conn_est (sc_vc); +- sc_vc_tcp->connect_retry_count = 0; /* successfully connected, reset connection retry count */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "c_ranksent_handler(): connection established (sc=%p, sc->vc=%p, fd=%d)", sc, sc->vc, sc->fd)); +- break; +- case MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK: +- MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "received NAK, closing sc"); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ +- break; +- case MPIDI_NEM_TCP_SOCKSM_PKT_CLOSED: +- MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "received CLOSED, closing sc"); +- mpi_errno = MPIDI_CH3U_Handle_connection(sc_vc, MPIDI_VC_EVENT_TERMINATED); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ +- break; +- default: +- MPIR_Assert(0); ++ MPID_nem_tcp_conn_est(sc_vc); ++ sc_vc_tcp->connect_retry_count = 0; /* successfully connected, reset connection retry count */ ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "c_ranksent_handler(): connection established (sc=%p, sc->vc=%p, fd=%d)", ++ sc, sc->vc, sc->fd)); ++ break; ++ case MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK: ++ MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "received NAK, closing sc"); ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ break; ++ case MPIDI_NEM_TCP_SOCKSM_PKT_CLOSED: ++ MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "received CLOSED, closing sc"); ++ mpi_errno = MPIDI_CH3U_Handle_connection(sc_vc, MPIDI_VC_EVENT_TERMINATED); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ break; ++ default: ++ MPIR_Assert(0); + } + } + +-fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_STATE_C_RANKSENT_HANDLER); + return mpi_errno; +-fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ +- mpi_errno = MPI_SUCCESS; /* don't return an error if we fail in the connect protocol, just retry. */ ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ mpi_errno = MPI_SUCCESS; /* don't return an error if we fail in the connect protocol, just retry. */ + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME state_c_tmpvcsent_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int state_c_tmpvcsent_handler(struct pollfd *const plfd, sockconn_t *const sc) ++static int state_c_tmpvcsent_handler(struct pollfd *const plfd, sockconn_t * const sc) + { + MPIDI_VC_t *const sc_vc = sc->vc; + MPID_nem_tcp_vc_area *const sc_vc_tcp = VC_TCP(sc_vc); +@@ -1273,28 +1254,31 @@ static int state_c_tmpvcsent_handler(struct pollfd *const plfd, sockconn_t *cons + if (mpi_errno) { + int mpi_errno2 = MPI_SUCCESS; + MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "error sending cmd pkt, closing sc"); +- mpi_errno2 = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ mpi_errno2 = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ + if (mpi_errno2) { + MPIR_ERR_SET(mpi_errno2, MPI_ERR_OTHER, "**tcp_cleanup_fail"); +- if (mpi_errno2) MPIR_ERR_ADD(mpi_errno, mpi_errno2); ++ if (mpi_errno2) ++ MPIR_ERR_ADD(mpi_errno, mpi_errno2); + } + MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**tmpvc_connect_fail"); + /* no head-to-head issues to deal with, if we failed to recv the +- packet then there really was a problem */ +- } +- else { ++ * packet then there really was a problem */ ++ } else { + MPIR_Assert(pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_ACK || + pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_NAK); + + if (pkt_type == MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_ACK) { + CHANGE_STATE(sc, CONN_STATE_TS_COMMRDY); + ASSIGN_SC_TO_VC(sc_vc_tcp, sc); +- MPID_nem_tcp_conn_est (sc_vc); +- sc_vc_tcp->connect_retry_count = 0; /* successfully connected, reset connection retry count */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "c_tmpvcsent_handler(): connection established (fd=%d, sc=%p, sc->vc=%p)", sc->fd, sc, sc_vc)); +- } +- else { /* pkt_type must be MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "state_c_tmpvcsent_handler() 2: closing sc")); ++ MPID_nem_tcp_conn_est(sc_vc); ++ sc_vc_tcp->connect_retry_count = 0; /* successfully connected, reset connection retry count */ ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "c_tmpvcsent_handler(): connection established (fd=%d, sc=%p, sc->vc=%p)", ++ sc->fd, sc, sc_vc)); ++ } else { /* pkt_type must be MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK */ ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "state_c_tmpvcsent_handler() 2: closing sc")); + MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "received NAK, closing sc"); + mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ + } +@@ -1305,14 +1289,10 @@ static int state_c_tmpvcsent_handler(struct pollfd *const plfd, sockconn_t *cons + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME state_l_cntd_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int state_l_cntd_handler(struct pollfd *const plfd, sockconn_t *const sc) ++static int state_l_cntd_handler(struct pollfd *const plfd, sockconn_t * const sc) + { + int mpi_errno = MPI_SUCCESS; +- MPID_NEM_TCP_SOCK_STATUS_t status; ++ int status; + int got_sc_eof = 0; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_STATE_L_CNTD_HANDLER); + +@@ -1330,33 +1310,35 @@ static int state_l_cntd_handler(struct pollfd *const plfd, sockconn_t *const sc) + + if (IS_READABLE(plfd)) { + mpi_errno = recv_id_or_tmpvc_info(sc, &got_sc_eof); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + if (got_sc_eof) { + MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "got eof, closing sc"); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ + goto fn_exit; + } +- ++ + if (!sc->is_tmpvc) { + CHANGE_STATE(sc, CONN_STATE_TA_C_RANKRCVD); +- } +- else { ++ } else { + CHANGE_STATE(sc, CONN_STATE_TA_C_TMPVCRCVD); + } +- } +- else { ++ } else { + /* remain in same state */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "!IS_READABLE(plfd) fd=%d events=%#x revents=%#x", plfd->fd, plfd->events, plfd->revents)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "!IS_READABLE(plfd) fd=%d events=%#x revents=%#x", plfd->fd, ++ plfd->events, plfd->revents)); + } + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_STATE_L_CNTD_HANDLER); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ +- mpi_errno = MPI_SUCCESS; /* don't return an error if we fail in the connect protocol, just retry. */ ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ mpi_errno = MPI_SUCCESS; /* don't return an error if we fail in the connect protocol, just retry. */ + goto fn_exit; + } + +@@ -1364,11 +1346,7 @@ static int state_l_cntd_handler(struct pollfd *const plfd, sockconn_t *const sc) + Returns TRUE, if the process(self) wins against the remote process + FALSE, otherwise + */ +-#undef FUNCNAME +-#define FUNCNAME do_i_win +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int do_i_win(sockconn_t *rmt_sc) ++static int do_i_win(sockconn_t * rmt_sc) + { + int win = FALSE; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_DO_I_WIN); +@@ -1380,31 +1358,27 @@ static int do_i_win(sockconn_t *rmt_sc) + if (rmt_sc->is_same_pg) { + if (MPIDI_Process.my_pg_rank > rmt_sc->pg_rank) + win = TRUE; +- } +- else { ++ } else { + if (strcmp(MPIDI_Process.my_pg->id, rmt_sc->pg_id) > 0) + win = TRUE; + } + + MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, +- (MPL_DBG_FDEST, "do_i_win(rmt_sc=%p (%s)) win=%s is_same_pg=%s my_pg_rank=%d rmt_pg_rank=%d", +- rmt_sc, CONN_STATE_STR[rmt_sc->state.cstate], +- (win ? "TRUE" : "FALSE"),(rmt_sc->is_same_pg ? "TRUE" : "FALSE"), MPIDI_Process.my_pg_rank, +- rmt_sc->pg_rank)); ++ (MPL_DBG_FDEST, ++ "do_i_win(rmt_sc=%p (%s)) win=%s is_same_pg=%s my_pg_rank=%d rmt_pg_rank=%d", ++ rmt_sc, CONN_STATE_STR[rmt_sc->state.cstate], (win ? "TRUE" : "FALSE"), ++ (rmt_sc->is_same_pg ? "TRUE" : "FALSE"), MPIDI_Process.my_pg_rank, ++ rmt_sc->pg_rank)); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_DO_I_WIN); + return win; + } + +-#undef FUNCNAME +-#define FUNCNAME state_l_rankrcvd_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int state_l_rankrcvd_handler(struct pollfd *const plfd, sockconn_t *const sc) ++static int state_l_rankrcvd_handler(struct pollfd *const plfd, sockconn_t * const sc) + { + MPIDI_VC_t *const sc_vc = sc->vc; + MPID_nem_tcp_vc_area *const sc_vc_tcp = VC_TCP(sc_vc); + int mpi_errno = MPI_SUCCESS; +- MPID_NEM_TCP_SOCK_STATUS_t status; ++ int status; + sockconn_t *fnd_sc = NULL; + int snd_nak = FALSE; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_STATE_L_RANKRCVD_HANDLER); +@@ -1419,22 +1393,24 @@ static int state_l_rankrcvd_handler(struct pollfd *const plfd, sockconn_t *const + + if (sc_vc->state == MPIDI_VC_STATE_INACTIVE_CLOSED) { + mpi_errno = send_cmd_pkt(sc->fd, MPIDI_NEM_TCP_SOCKSM_PKT_CLOSED); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ + } +- ++ + if (found_better_sc(sc, &fnd_sc)) { + if (fnd_sc->state.cstate == CONN_STATE_TS_COMMRDY) + snd_nak = TRUE; + else if (fnd_sc->state.cstate == CONN_STATE_TC_C_RANKSENT) + snd_nak = do_i_win(sc); + } +- ++ + if (snd_nak) { + mpi_errno = send_cmd_pkt(sc->fd, MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "lost head-to-head, closing sc"); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ + } else { + /* The following line is _crucial_ to correct operation. We need to + * ensure that all head-to-head resolution has completed before we +@@ -1443,39 +1419,41 @@ static int state_l_rankrcvd_handler(struct pollfd *const plfd, sockconn_t *const + * chance to finish the connect protocol. That can lead to all + * kinds of badness, including zombie connections, segfaults, and + * accessing PG/VC info that is no longer present. */ +- if (sc_vc_tcp->sc_ref_count > 1) goto fn_exit; ++ if (sc_vc_tcp->sc_ref_count > 1) ++ goto fn_exit; + + mpi_errno = send_cmd_pkt(sc->fd, MPIDI_NEM_TCP_SOCKSM_PKT_ID_ACK); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + CHANGE_STATE(sc, CONN_STATE_TS_COMMRDY); + ASSIGN_SC_TO_VC(sc_vc_tcp, sc); +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "connection established: sc=%p, sc->vc=%p, sc->fd=%d, is_same_pg=%s, pg_rank=%d", sc, sc_vc, sc->fd, (sc->is_same_pg ? "TRUE" : "FALSE"), sc->pg_rank)); +- MPID_nem_tcp_conn_est (sc_vc); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "connection established: sc=%p, sc->vc=%p, sc->fd=%d, is_same_pg=%s, pg_rank=%d", ++ sc, sc_vc, sc->fd, (sc->is_same_pg ? "TRUE" : "FALSE"), sc->pg_rank)); ++ MPID_nem_tcp_conn_est(sc_vc); + sc_vc_tcp->connect_retry_count = 0; /* successfully connected, reset connection retry count */ + } + } + +-fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_STATE_L_RANKRCVD_HANDLER); + return mpi_errno; +-fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); +- mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ +- mpi_errno = MPI_SUCCESS; /* don't return an error if we fail in the connect protocol, just retry. */ ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ ++ mpi_errno = MPI_SUCCESS; /* don't return an error if we fail in the connect protocol, just retry. */ + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME state_l_tmpvcrcvd_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int state_l_tmpvcrcvd_handler(struct pollfd *const plfd, sockconn_t *const sc) ++static int state_l_tmpvcrcvd_handler(struct pollfd *const plfd, sockconn_t * const sc) + { + MPIDI_VC_t *const sc_vc = sc->vc; + MPID_nem_tcp_vc_area *const sc_vc_tcp = VC_TCP(sc_vc); + int mpi_errno = MPI_SUCCESS; +- MPID_NEM_TCP_SOCK_STATUS_t status; ++ int status; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_STATE_L_TMPVCRCVD_HANDLER); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_STATE_L_TMPVCRCVD_HANDLER); +@@ -1489,22 +1467,25 @@ static int state_l_tmpvcrcvd_handler(struct pollfd *const plfd, sockconn_t *cons + /* we don't want to perform any h2h resolution for temp vcs */ + if (IS_WRITEABLE(plfd)) { + mpi_errno = send_cmd_pkt(sc->fd, MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_ACK); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + CHANGE_STATE(sc, CONN_STATE_TS_COMMRDY); + ASSIGN_SC_TO_VC(sc_vc_tcp, sc); + MPID_nem_tcp_conn_est(sc_vc); +- sc_vc_tcp->connect_retry_count = 0; /* successfully connected, reset connection retry count */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "fd=%d: TMPVC_ACK sent, connection established!", sc->fd)); ++ sc_vc_tcp->connect_retry_count = 0; /* successfully connected, reset connection retry count */ ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "fd=%d: TMPVC_ACK sent, connection established!", sc->fd)); + } + +-fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_STATE_L_TMPVCRCVD_HANDLER); + return mpi_errno; +- fn_fail: ++ fn_fail: + { + int cleanup_errno = MPI_SUCCESS; +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + mpi_errno = close_cleanup_and_free_sc_plfd(sc); /* QUIESCENT */ + if (cleanup_errno) { + MPIR_ERR_SET(cleanup_errno, MPI_ERR_OTHER, "**tcp_cleanup_fail"); +@@ -1514,120 +1495,114 @@ fn_exit: + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_recv_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPID_nem_tcp_recv_handler(sockconn_t *const sc) ++static int MPID_nem_tcp_recv_handler(sockconn_t * const sc) + { + /* as a result of handling a message, the sc table might get +- expanded making the sc pointer invalid, so we save all the info +- we need from sc here, and don't reference sc directly after +- that. */ ++ * expanded making the sc pointer invalid, so we save all the info ++ * we need from sc here, and don't reference sc directly after ++ * that. */ + const int sc_fd = sc->fd; + MPIDI_VC_t *const sc_vc = sc->vc; +- MPIR_AssertDeclValue(MPID_nem_tcp_vc_area *const sc_vc_tcp, VC_TCP(sc_vc)); ++ MPIR_AssertDeclValue(MPID_nem_tcp_vc_area * const sc_vc_tcp, VC_TCP(sc_vc)); + int mpi_errno = MPI_SUCCESS; + ssize_t bytes_recvd; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_RECV_HANDLER); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_RECV_HANDLER); + +- if (sc_vc->ch.recv_active == NULL) +- { ++ if (sc_vc->ch.recv_active == NULL) { + /* receive a new message */ + CHECK_EINTR(bytes_recvd, recv(sc_fd, recv_buf, MPID_NEM_TCP_RECV_MAX_PKT_LEN, 0)); +- if (bytes_recvd <= 0) +- { +- if (bytes_recvd == -1 && errno == EAGAIN) /* handle this fast */ ++ if (bytes_recvd <= 0) { ++ if (bytes_recvd == -1 && errno == EAGAIN) /* handle this fast */ + goto fn_exit; + +- if (bytes_recvd == 0) +- { ++ if (bytes_recvd == 0) { + MPIR_Assert(sc != NULL); + MPIR_Assert(sc_vc != NULL); + /* sc->vc->sc will be NULL if sc->vc->state == _INACTIVE */ + MPIR_Assert(sc_vc_tcp->sc == NULL || sc_vc_tcp->sc == sc); + +- if (vc_is_in_shutdown(sc_vc)) +- { ++ if (vc_is_in_shutdown(sc_vc)) { + /* there's currently no hook for CH3 to tell nemesis/tcp +- that we are in the middle of a disconnection dance. So +- if we don't check to see if we are currently +- disconnecting, then we end up with a potential race where +- the other side performs a tcp close() before we do and we +- blow up here. */ +- MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "other side closed, but we're shutting down, closing sc"); ++ * that we are in the middle of a disconnection dance. So ++ * if we don't check to see if we are currently ++ * disconnecting, then we end up with a potential race where ++ * the other side performs a tcp close() before we do and we ++ * blow up here. */ ++ MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ "other side closed, but we're shutting down, closing sc"); + /* it's really not an error, but we're calling +- cleanup_on_error because it does what we want it to */ ++ * cleanup_on_error because it does what we want it to */ + mpi_errno = MPID_nem_tcp_cleanup_on_error(sc_vc, MPI_SUCCESS); + goto fn_exit; +- } +- else +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "ERROR: sock (fd=%d) is closed: bytes_recvd == 0", sc->fd ); ++ } else { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "ERROR: sock (fd=%d) is closed: bytes_recvd == 0", sc->fd); + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sock_closed"); + } +- } +- else +- { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", MPIR_Strerror(errno)); ++ } else { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", ++ MPIR_Strerror(errno)); + } + } +- +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "New recv %" PRIdPTR " (fd=%d, vc=%p, sc=%p)", bytes_recvd, sc_fd, sc_vc, sc)); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "New recv %" PRIdPTR " (fd=%d, vc=%p, sc=%p)", bytes_recvd, ++ sc_fd, sc_vc, sc)); + + mpi_errno = MPID_nem_handle_pkt(sc_vc, recv_buf, bytes_recvd); +- if (mpi_errno) MPIR_ERR_POP_LABEL(mpi_errno, fn_noncomm_fail); +- } +- else +- { ++ if (mpi_errno) ++ MPIR_ERR_POP_LABEL(mpi_errno, fn_noncomm_fail); ++ } else { + /* there is a pending receive, receive it directly into the user buffer */ + MPIDI_CH3I_VC *const sc_vc_ch = &sc_vc->ch; + MPIR_Request *const rreq = sc_vc_ch->recv_active; + MPL_IOV *iov = &rreq->dev.iov[rreq->dev.iov_offset]; +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); ++ int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); + + MPIR_Assert(rreq->dev.iov_count > 0); + MPIR_Assert(rreq->dev.iov_count + rreq->dev.iov_offset <= MPL_IOV_LIMIT); + + bytes_recvd = MPL_large_readv(sc_fd, iov, rreq->dev.iov_count); +- if (bytes_recvd <= 0) +- { +- if (bytes_recvd == -1 && errno == EAGAIN) /* handle this fast */ ++ if (bytes_recvd <= 0) { ++ if (bytes_recvd == -1 && errno == EAGAIN) /* handle this fast */ + goto fn_exit; +- ++ + if (bytes_recvd == 0) { + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sock_closed"); + } else { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", MPIR_Strerror(errno)); ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**read", "**read %s", ++ MPIR_Strerror(errno)); + } + } + +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Cont recv %ld", (long int)bytes_recvd); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Cont recv %ld", (long int) bytes_recvd); + + /* update the iov */ +- for (iov = &rreq->dev.iov[rreq->dev.iov_offset]; iov < &rreq->dev.iov[rreq->dev.iov_offset + rreq->dev.iov_count]; ++iov) +- { +- if (bytes_recvd < iov->MPL_IOV_LEN) +- { +- iov->MPL_IOV_BUF = (char *)iov->MPL_IOV_BUF + bytes_recvd; ++ for (iov = &rreq->dev.iov[rreq->dev.iov_offset]; ++ iov < &rreq->dev.iov[rreq->dev.iov_offset + rreq->dev.iov_count]; ++iov) { ++ if (bytes_recvd < iov->MPL_IOV_LEN) { ++ iov->MPL_IOV_BUF = (char *) iov->MPL_IOV_BUF + bytes_recvd; + iov->MPL_IOV_LEN -= bytes_recvd; +- rreq->dev.iov_count = (int)(&rreq->dev.iov[rreq->dev.iov_offset + rreq->dev.iov_count] - iov); ++ rreq->dev.iov_count = ++ (int) (&rreq->dev.iov[rreq->dev.iov_offset + rreq->dev.iov_count] - iov); + rreq->dev.iov_offset = iov - rreq->dev.iov; +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "bytes_recvd = %ld", (long int)bytes_recvd); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov len = %ld", (long int)iov->MPL_IOV_LEN); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_offset = %lld", (long long)rreq->dev.iov_offset); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "bytes_recvd = %ld", ++ (long int) bytes_recvd); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov len = %ld", ++ (long int) iov->MPL_IOV_LEN); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iov_offset = %lld", ++ (long long) rreq->dev.iov_offset); + goto fn_exit; + } + bytes_recvd -= iov->MPL_IOV_LEN; + } +- ++ + /* the whole iov has been received */ + + reqFn = rreq->dev.OnDataAvail; +- if (!reqFn) +- { ++ if (!reqFn) { + MPIR_Assert(MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_GET_RESP); + mpi_errno = MPID_Request_complete(rreq); + if (mpi_errno != MPI_SUCCESS) { +@@ -1635,53 +1610,46 @@ static int MPID_nem_tcp_recv_handler(sockconn_t *const sc) + } + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "...complete"); + sc_vc_ch->recv_active = NULL; +- } +- else +- { ++ } else { + int complete = 0; +- ++ + mpi_errno = reqFn(sc_vc, rreq, &complete); +- if (mpi_errno) MPIR_ERR_POP_LABEL(mpi_errno, fn_noncomm_fail); ++ if (mpi_errno) ++ MPIR_ERR_POP_LABEL(mpi_errno, fn_noncomm_fail); + +- if (complete) +- { ++ if (complete) { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "...complete"); + sc_vc_ch->recv_active = NULL; +- } +- else +- { ++ } else { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "...not complete"); + } + } + } + +-fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_RECV_HANDLER); + return mpi_errno; +-fn_fail: /* comm related failures jump here */ ++ fn_fail: /* comm related failures jump here */ + { + +- MPIR_ERR_SET1(mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", sc_vc->pg_rank); ++ MPIR_ERR_SET1(mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", ++ sc_vc->pg_rank); + mpi_errno = MPID_nem_tcp_cleanup_on_error(sc_vc, mpi_errno); + if (mpi_errno) { + MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**tcp_cleanup_fail"); + } + } +-fn_noncomm_fail: /* NON-comm related failures jump here */ ++ fn_noncomm_fail: /* NON-comm related failures jump here */ + goto fn_exit; +- ++ + } + +-#undef FUNCNAME +-#define FUNCNAME state_commrdy_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int state_commrdy_handler(struct pollfd *const plfd, sockconn_t *const sc) ++static int state_commrdy_handler(struct pollfd *const plfd, sockconn_t * const sc) + { + int mpi_errno = MPI_SUCCESS; + /* save references to sc->vc etc because if the sc table is +- expanded inside recv_handler, this pointer to sc will be +- invalid. */ ++ * expanded inside recv_handler, this pointer to sc will be ++ * invalid. */ + MPIDI_VC_t *sc_vc = sc->vc; + MPID_nem_tcp_vc_area *sc_vc_tcp = VC_TCP(sc_vc); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_STATE_COMMRDY_HANDLER); +@@ -1689,34 +1657,31 @@ static int state_commrdy_handler(struct pollfd *const plfd, sockconn_t *const sc + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_STATE_COMMRDY_HANDLER); + + MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "vc = %p", sc->vc); +- if (IS_READABLE(plfd)) +- { ++ if (IS_READABLE(plfd)) { + mpi_errno = MPID_nem_tcp_recv_handler(sc); +- if (mpi_errno) MPIR_ERR_POP (mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } +- if (IS_WRITEABLE(plfd) && !MPIDI_CH3I_Sendq_empty(sc_vc_tcp->send_queue)) +- { ++ if (IS_WRITEABLE(plfd) && !MPIDI_CH3I_Sendq_empty(sc_vc_tcp->send_queue)) { + mpi_errno = MPID_nem_tcp_send_queued(sc_vc, &sc_vc_tcp->send_queue); +- if (mpi_errno) MPIR_ERR_POP (mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + /* check to see if this VC is waiting for outstanding sends to +- finish in order to terminate */ ++ * finish in order to terminate */ + if (sc_vc->state == MPIDI_VC_STATE_CLOSED && MPIDI_CH3I_Sendq_empty(sc_vc_tcp->send_queue)) { + mpi_errno = MPID_nem_tcp_vc_terminated(sc_vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + } +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_STATE_COMMRDY_HANDLER); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_sm_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_sm_init(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -1749,28 +1714,25 @@ int MPID_nem_tcp_sm_init(void) + g_sc_tbl = NULL; + MPID_nem_tcp_plfd_tbl = NULL; + alloc_sc_plfd_tbls(); +- +- MPIR_CHKPMEM_MALLOC(recv_buf, char*, MPID_NEM_TCP_RECV_MAX_PKT_LEN, mpi_errno, "TCP temporary buffer", MPL_MEM_BUFFER); ++ ++ MPIR_CHKPMEM_MALLOC(recv_buf, char *, MPID_NEM_TCP_RECV_MAX_PKT_LEN, mpi_errno, ++ "TCP temporary buffer", MPL_MEM_BUFFER); + MPIR_CHKPMEM_COMMIT(); + +- fn_exit: ++ fn_exit: + return mpi_errno; +- fn_fail: ++ fn_fail: + MPIR_CHKPMEM_REAP(); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_sm_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_sm_finalize(void) + { + freenode_t *node; + + /* walk the freeq and free all the elements */ + while (!Q_EMPTY(freeq)) { +- Q_DEQUEUE(&freeq, ((freenode_t **)&node)); ++ Q_DEQUEUE(&freeq, ((freenode_t **) & node)); + MPL_free(node); + } + +@@ -1783,22 +1745,18 @@ int MPID_nem_tcp_sm_finalize(void) + + /* + N1: create a new listener fd?? While doing so, if we bind it to the same port used befor, +-then it is ok. Else,the new port number(and thus the business card) has to be communicated +-to the other processes (in same and different pg's), which is not quite simple to do. ++then it is ok. Else,the new port number(and thus the business card) has to be communicated ++to the other processes (in same and different pg's), which is not quite simple to do. + Evaluate the need for it by testing and then do it, if needed. + + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_connpoll +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_connpoll(int in_blocking_poll) + { + int mpi_errno = MPI_SUCCESS, n, i; + static int num_skipped_polls = 0; + + /* num_polled is needed b/c the call to it_sc->handler() can change the +- size of the table, which leads to iterating over invalid revents. */ ++ * size of the table, which leads to iterating over invalid revents. */ + int num_polled = g_tbl_size; + + if (num_polled) { +@@ -1817,15 +1775,14 @@ int MPID_nem_tcp_connpoll(int in_blocking_poll) + num_skipped_polls = 0; + + CHECK_EINTR(n, poll(MPID_nem_tcp_plfd_tbl, num_polled, 0)); +- MPIR_ERR_CHKANDJUMP1(n == -1, mpi_errno, MPI_ERR_OTHER, "**poll", "**poll %s", MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(n == -1, mpi_errno, MPI_ERR_OTHER, "**poll", "**poll %s", ++ MPIR_Strerror(errno)); + /* MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "some sc fd poll event")); */ +- for(i = 0; i < num_polled; i++) +- { ++ for (i = 0; i < num_polled; i++) { + struct pollfd *it_plfd = &MPID_nem_tcp_plfd_tbl[i]; + sockconn_t *it_sc = &g_sc_tbl[i]; + +- if (it_plfd->fd != CONN_INVALID_FD && it_plfd->revents != 0) +- { ++ if (it_plfd->fd != CONN_INVALID_FD && it_plfd->revents != 0) { + /* We could check for POLLHUP here, but HUP/HUP+EOF is not erroneous + * on many platforms, including modern Linux. */ + if (it_plfd->revents & POLLERR || it_plfd->revents & POLLNVAL) { +@@ -1835,36 +1792,41 @@ int MPID_nem_tcp_connpoll(int in_blocking_poll) + const char *err_str ATTRIBUTE((unused)) = "UNKNOWN"; + + /* See if we can get a specific error for this fd +- (Stevens Network Programming Vol 1, pg 184) */ ++ * (Stevens Network Programming Vol 1, pg 184) */ + rc = read(it_plfd->fd, &dummy, 1); + if (rc < 0) + err_str = MPIR_Strerror(errno); +- ++ + MPL_DBG_MSG(MPIDI_NEM_TCP_DBG_DET, VERBOSE, "error polling fd, closing sc"); + if (it_sc->vc) { +- MPIR_ERR_SET2(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d %s", it_sc->vc->pg_rank, err_str); ++ MPIR_ERR_SET2(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", ++ "**comm_fail %d %s", it_sc->vc->pg_rank, err_str); + mpi_errno = MPID_nem_tcp_cleanup_on_error(it_sc->vc, req_errno); + MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**tcp_cleanup_fail"); + } else { +- MPIR_ERR_SET2(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail_conn", "**comm_fail_conn %s %s", CONN_STATE_STR[it_sc->state.cstate], err_str); ++ MPIR_ERR_SET2(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail_conn", ++ "**comm_fail_conn %s %s", CONN_STATE_STR[it_sc->state.cstate], ++ err_str); + mpi_errno = close_cleanup_and_free_sc_plfd(it_sc); + MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**tcp_cleanup_fail"); + } + continue; + } +- ++ + mpi_errno = it_sc->handler(it_plfd, it_sc); +- if (mpi_errno) MPIR_ERR_POP (mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + /* note that g_sc_tbl might have been expanded while +- inside handler, so the it_plfd and it_sc pointers may +- be invalid at this point. */ ++ * inside handler, so the it_plfd and it_sc pointers may ++ * be invalid at this point. */ + } + } +- +- fn_exit: ++ ++ fn_exit: + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +@@ -1877,28 +1839,24 @@ int MPID_nem_tcp_connpoll(int in_blocking_poll) + + N1: There might be a timing window where poll on listen_fd was successful and there was + a connection in the queue. Assume there was only one connection in the listen queue and +- before we called accept, the peer had reset the connection. On receiving a TCP RST, +- some implementations remove the connection from the listen queue. So, accept on ++ before we called accept, the peer had reset the connection. On receiving a TCP RST, ++ some implementations remove the connection from the listen queue. So, accept on + a non-blocking fd would return error with EWOULDBLOCK. + + N2: The peer might have reset or closed the connection. In some implementations, + even if the connection is reset by the peer, accept is successful. By POSIX standard, +- if the connection is closed by the peer, accept will still be successful. So, soon ++ if the connection is closed by the peer, accept will still be successful. So, soon + after accept, check whether the new fd is really connected (i.e neither reset nor + EOF received from peer). + Now, it is decided not to check for this condition at this point. After all, in the next + state, anyhow we can close the socket, if we receive an EOF. + +- N3: find_free_entry is called within the while loop. It may cause the table to expand. So, ++ N3: find_free_entry is called within the while loop. It may cause the table to expand. So, + the arguments passed for this callback function may get invalidated. So, it is imperative + that we obtain sc pointer and plfd pointer everytime within the while loop. + Accordingly, the parameters are named unused1 and unused2 for clarity. + */ +-#undef FUNCNAME +-#define FUNCNAME state_listening_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_state_listening_handler(struct pollfd *const unused_1, sockconn_t *const unused_2) ++int MPID_nem_tcp_state_listening_handler(struct pollfd *const unused_1, sockconn_t * const unused_2) + /* listener fd poll struct and sockconn structure */ + { + int mpi_errno = MPI_SUCCESS; +@@ -1911,29 +1869,33 @@ int MPID_nem_tcp_state_listening_handler(struct pollfd *const unused_1, sockconn + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_STATE_LISTENING_HANDLER); + + while (1) { +- l_sc = &g_sc_tbl[0]; /* N3 Important */ ++ l_sc = &g_sc_tbl[0]; /* N3 Important */ + len = sizeof(SA_IN); + MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "before accept")); +- if ((connfd = accept(l_sc->fd, (SA *) &rmt_addr, &len)) < 0) { +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "after accept, l_sc=%p lstnfd=%d connfd=%d, errno=%d:%s ", l_sc, l_sc->fd, connfd, errno, MPIR_Strerror(errno))); +- if (errno == EINTR) ++ if ((connfd = accept(l_sc->fd, (SA *) & rmt_addr, &len)) < 0) { ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, ++ "after accept, l_sc=%p lstnfd=%d connfd=%d, errno=%d:%s ", l_sc, ++ l_sc->fd, connfd, errno, MPIR_Strerror(errno))); ++ if (errno == EINTR) + continue; + else if (errno == EWOULDBLOCK || errno == EAGAIN) +- break; /* no connection in the listen queue. get out of here.(N1) */ ++ break; /* no connection in the listen queue. get out of here.(N1) */ + +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**sock_accept", "**sock_accept %s", MPIR_Strerror(errno)); +- } +- else { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**sock_accept", "**sock_accept %s", ++ MPIR_Strerror(errno)); ++ } else { + int idx = -1; + struct pollfd *plfd; + sockconn_t *sc; + +- MPID_nem_tcp_set_sockopts(connfd); /* (N2) */ ++ MPID_nem_tcp_set_sockopts(connfd); /* (N2) */ + mpi_errno = find_free_entry(&idx); +- if (mpi_errno != MPI_SUCCESS) MPIR_ERR_POP (mpi_errno); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + sc = &g_sc_tbl[idx]; + plfd = &MPID_nem_tcp_plfd_tbl[idx]; +- ++ + sc->fd = plfd->fd = connfd; + sc->pg_rank = CONN_INVALID_RANK; + sc->pg_is_set = FALSE; +@@ -1945,25 +1907,22 @@ int MPID_nem_tcp_state_listening_handler(struct pollfd *const unused_1, sockconn + } + } + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_STATE_LISTENING_HANDLER); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + + /* This is called whenever a vc has been closed as a result of an + error. The VC is put into an error state and cannot be opened + again. */ +-#undef FUNCNAME +-#define FUNCNAME error_closed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int error_closed(struct MPIDI_VC *const vc, int req_errno) + { + int mpi_errno = MPI_SUCCESS; +- MPID_nem_tcp_vc_area * const vc_tcp = VC_TCP(vc); ++ MPID_nem_tcp_vc_area *const vc_tcp = VC_TCP(vc); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ERROR_CLOSED); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_ERROR_CLOSED); +@@ -1971,26 +1930,24 @@ static int error_closed(struct MPIDI_VC *const vc, int req_errno) + vc_tcp->state = MPID_NEM_TCP_VC_STATE_ERROR; + + mpi_errno = MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + mpi_errno = MPID_nem_tcp_error_out_send_queue(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_ERROR_CLOSED); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } + + /* This is called when an communication error has occurred on a VC to + close the VC and release associated resources. + Any outstanding requests will have MPI_ERROR set to req_errno */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_cleanup_on_error +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_cleanup_on_error(MPIDI_VC_t *const vc, int req_errno) ++int MPID_nem_tcp_cleanup_on_error(MPIDI_VC_t * const vc, int req_errno) + { + int mpi_errno = MPI_SUCCESS; + int mpi_errno2 = MPI_SUCCESS; +@@ -2000,13 +1957,14 @@ int MPID_nem_tcp_cleanup_on_error(MPIDI_VC_t *const vc, int req_errno) + + mpi_errno = MPID_nem_tcp_cleanup(vc); + /* not jumping on error, keep going */ +- ++ + mpi_errno2 = error_closed(vc, req_errno); +- if (mpi_errno2) MPIR_ERR_ADD(mpi_errno, mpi_errno2); ++ if (mpi_errno2) ++ MPIR_ERR_ADD(mpi_errno, mpi_errno2); + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CLEANUP_ON_ERROR); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h +@@ -8,9 +8,9 @@ + #define SOCKSM_H_INCLUDED + + #include +-#include ++#include + +-enum SOCK_CONSTS { /* more type safe than #define's */ ++enum SOCK_CONSTS { /* more type safe than #define's */ + LISTENQLEN = 10, + POLL_CONN_TIME = 2 + }; +@@ -23,16 +23,16 @@ enum CONSTS { + CONN_PLFD_TBL_GROW_SIZE = 10, + CONN_INVALID_FD = -1, + CONN_INVALID_RANK = -1, +- NEGOMSG_DATA_LEN = 4, /* Length of data during negotiation message exchanges. */ ++ NEGOMSG_DATA_LEN = 4, /* Length of data during negotiation message exchanges. */ + SLEEP_INTERVAL = 1500, + PROGSM_TIMES = 20 + }; + + typedef enum { +- MPID_NEM_TCP_SOCK_ERROR_EOF, /* either a socket error or EOF received from peer */ ++ MPID_NEM_TCP_SOCK_ERROR_EOF, /* either a socket error or EOF received from peer */ + MPID_NEM_TCP_SOCK_CONNECTED, +- MPID_NEM_TCP_SOCK_NOEVENT /* No poll event on socket */ +-}MPID_NEM_TCP_SOCK_STATUS_t; ++ MPID_NEM_TCP_SOCK_NOEVENT /* No poll event on socket */ ++} MPID_NEM_TCP_SOCK_STATUS_t; + + #define M_(x) x + #define CONN_TYPE_ M_(TYPE_CONN), M_(TYPE_ACPT) +@@ -69,26 +69,25 @@ typedef enum { + + /* REQ - Request, RSP - Response */ + +-typedef enum CONN_TYPE {CONN_TYPE_, CONN_TYPE_SIZE} Conn_type_t; +-typedef enum MPID_nem_tcp_Listen_State {LISTEN_STATE_INVALID = -1, LISTEN_STATE_, LISTEN_STATE_SIZE} +- MPID_nem_tcp_Listen_State_t ; ++typedef enum CONN_TYPE { CONN_TYPE_, CONN_TYPE_SIZE } Conn_type_t; ++typedef enum MPID_nem_tcp_Listen_State { LISTEN_STATE_INVALID = -1, LISTEN_STATE_, LISTEN_STATE_SIZE ++} MPID_nem_tcp_Listen_State_t; + +-typedef enum MPID_nem_tcp_Conn_State {CONN_STATE_INVALID = -1, CONN_STATE_, CONN_STATE_SIZE} ++typedef enum MPID_nem_tcp_Conn_State { CONN_STATE_INVALID = -1, CONN_STATE_, CONN_STATE_SIZE } + MPID_nem_tcp_Conn_State_t; + + /* + Note: event numbering starts from 1, as 0 is assumed to be the state of all-events cleared + */ +-typedef enum sockconn_event {EVENT_CONNECT = 1, EVENT_DISCONNECT} +- sockconn_event_t; ++typedef enum sockconn_event { EVENT_CONNECT = 1, EVENT_DISCONNECT } sockconn_event_t; + + #undef M_ + #define M_(x) #x + + #if defined(SOCKSM_H_DEFGLOBALS_) +-const char *const CONN_TYPE_STR[CONN_TYPE_SIZE] = {CONN_TYPE_}; +-const char *const LISTEN_STATE_STR[LISTEN_STATE_SIZE] = {LISTEN_STATE_}; +-const char *const CONN_STATE_STR[CONN_STATE_SIZE] = {CONN_STATE_}; ++const char *const CONN_TYPE_STR[CONN_TYPE_SIZE] = { CONN_TYPE_ }; ++const char *const LISTEN_STATE_STR[LISTEN_STATE_SIZE] = { LISTEN_STATE_ }; ++const char *const CONN_STATE_STR[CONN_STATE_SIZE] = { CONN_STATE_ }; + #elif defined(SOCKSM_H_EXTERNS_) + extern const char *const CONN_TYPE_STR[]; + extern const char *const LISTEN_STATE_STR[]; +@@ -98,7 +97,7 @@ extern const char *const CONN_STATE_STR[]; + + #ifdef MPL_USE_DBG_LOGGING + #define CONN_STATE_TO_STRING(_cstate) \ +- (( (_cstate) >= CONN_STATE_TS_CLOSED && (_cstate) < CONN_STATE_SIZE ) ? CONN_STATE_STR[_cstate] : "out_of_range") ++ (((_cstate) >= CONN_STATE_TS_CLOSED && (_cstate) < CONN_STATE_SIZE) ? CONN_STATE_STR[_cstate] : "out_of_range") + + #define DBG_CHANGE_STATE(_sc, _cstate) do { \ + const char *state_str = NULL; \ +@@ -112,8 +111,8 @@ extern const char *const CONN_STATE_STR[]; + } \ + } while (0) + #else +-# define CONN_STATE_TO_STRING(_cstate) "unavailable" +-# define DBG_CHANGE_STATE(_sc, _cstate) do { /*nothing*/ } while (0) ++#define CONN_STATE_TO_STRING(_cstate) "unavailable" ++#define DBG_CHANGE_STATE(_sc, _cstate) do { /*nothing*/ } while (0) + #endif + + #define CHANGE_STATE(_sc, _cstate) do { \ +@@ -121,37 +120,37 @@ extern const char *const CONN_STATE_STR[]; + (_sc)->state.cstate = (_cstate); \ + (_sc)->handler = sc_state_info[_cstate].sc_state_handler; \ + MPID_nem_tcp_plfd_tbl[(_sc)->index].events = sc_state_info[_cstate].sc_state_plfd_events; \ +-} while(0) ++} while (0) + + struct MPID_nem_new_tcp_sockconn; + typedef struct MPID_nem_new_tcp_sockconn sockconn_t; + + /* FIXME: should plfd really be const const? Some handlers may need to change the plfd entry. */ +-typedef int (*handler_func_t) (struct pollfd *const plfd, sockconn_t *const conn); +-struct MPID_nem_new_tcp_sockconn{ ++typedef int (*handler_func_t) (struct pollfd * const plfd, sockconn_t * const conn); ++struct MPID_nem_new_tcp_sockconn { + int fd; + int index; + + /* Used to prevent the usage of uninitialized pg info. is_same_pg, pg_rank, + * and pg_id are _ONLY VALID_ if this (pg_is_set) is true */ +- int pg_is_set; +- int is_same_pg; /* boolean, true if the process on the other end of this sc +- is in the same PG as us (this process) */ ++ int pg_is_set; ++ int is_same_pg; /* boolean, true if the process on the other end of this sc ++ * is in the same PG as us (this process) */ + int is_tmpvc; + +- int pg_rank; /* rank and id cached here to avoid chasing pointers in vc and vc->pg */ +- char *pg_id; /* MUST be used only if is_same_pg == FALSE */ ++ int pg_rank; /* rank and id cached here to avoid chasing pointers in vc and vc->pg */ ++ char *pg_id; /* MUST be used only if is_same_pg == FALSE */ + union { + MPID_nem_tcp_Conn_State_t cstate; +- MPID_nem_tcp_Listen_State_t lstate; +- }state; ++ MPID_nem_tcp_Listen_State_t lstate; ++ } state; + MPIDI_VC_t *vc; + /* Conn_type_t conn_type; Probably useful for debugging/analyzing purposes. */ + handler_func_t handler; + }; + + typedef enum MPIDI_nem_tcp_socksm_pkt_type { +- MPIDI_NEM_TCP_SOCKSM_PKT_ID_INFO, /* ID = rank + pg_id */ ++ MPIDI_NEM_TCP_SOCKSM_PKT_ID_INFO, /* ID = rank + pg_id */ + MPIDI_NEM_TCP_SOCKSM_PKT_ID_ACK, + MPIDI_NEM_TCP_SOCKSM_PKT_ID_NAK, + MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_INFO, +@@ -159,7 +158,7 @@ typedef enum MPIDI_nem_tcp_socksm_pkt_type { + MPIDI_NEM_TCP_SOCKSM_PKT_TMPVC_NAK, + MPIDI_NEM_TCP_SOCKSM_PKT_CLOSED + } MPIDI_nem_tcp_socksm_pkt_type_t; +- ++ + typedef struct MPIDI_nem_tcp_header { + MPIDI_nem_tcp_socksm_pkt_type_t pkt_type; + intptr_t datalen; +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c +@@ -11,11 +11,7 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + + #ifdef ENABLE_CHECKPOINTING + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_ckpt_pause_send_vc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_ckpt_pause_send_vc(MPIDI_VC_t *vc) ++int MPID_nem_tcp_ckpt_pause_send_vc(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); +@@ -24,22 +20,18 @@ int MPID_nem_tcp_ckpt_pause_send_vc(MPIDI_VC_t *vc) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_CKPT_PAUSE_SEND_VC); + + vc_tcp->send_paused = TRUE; +- +-fn_exit: ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CKPT_PAUSE_SEND_VC); + return mpi_errno; +-fn_fail: ++ fn_fail: + + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_ckpt_unpause_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, ++int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + void *data ATTRIBUTE((unused)), +- intptr_t *buflen, MPIR_Request **rreqp) ++ intptr_t * buflen, MPIR_Request ** rreqp) + { + int mpi_errno = MPI_SUCCESS; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); +@@ -52,29 +44,27 @@ int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, + /* There may be a unpause message in the send queue. If so, just enqueue everything on the send queue. */ + if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) + mpi_errno = MPID_nem_tcp_send_queued(vc, &vc_tcp->paused_send_queue); +- ++ + /* if anything is left on the paused queue, put it on the send queue and wait for the reconnect */ + if (!MPIDI_CH3I_Sendq_empty(vc_tcp->paused_send_queue)) { +- +- MPIDI_CH3I_Sendq_enqueue_multiple_no_refcount(&vc_tcp->send_queue, vc_tcp->paused_send_queue.head, vc_tcp->paused_send_queue.tail); ++ ++ MPIDI_CH3I_Sendq_enqueue_multiple_no_refcount(&vc_tcp->send_queue, ++ vc_tcp->paused_send_queue.head, ++ vc_tcp->paused_send_queue.tail); + vc_tcp->paused_send_queue.head = vc_tcp->paused_send_queue.tail = NULL; + } + +-fn_exit: ++ fn_exit: + *buflen = 0; + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CKPT_UNPAUSE_HANDLER); + return mpi_errno; +-fn_fail: ++ fn_fail: + + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_ckpt_continue_vc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_ckpt_continue_vc(MPIDI_VC_t *vc) ++int MPID_nem_tcp_ckpt_continue_vc(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + MPID_PKT_DECL_CAST(upkt, MPIDI_nem_tcp_pkt_unpause_t, unpause_pkt); +@@ -86,33 +76,34 @@ int MPID_nem_tcp_ckpt_continue_vc(MPIDI_VC_t *vc) + unpause_pkt->type = MPIDI_NEM_PKT_NETMOD; + unpause_pkt->subtype = MPIDI_NEM_TCP_PKT_UNPAUSE; + +- mpi_errno = MPID_nem_tcp_iStartContigMsg_paused(vc, &upkt, sizeof(MPIDI_nem_tcp_pkt_unpause_t), NULL, 0, &unpause_req); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ mpi_errno = ++ MPID_nem_tcp_iStartContigMsg_paused(vc, &upkt, sizeof(MPIDI_nem_tcp_pkt_unpause_t), NULL, 0, ++ &unpause_req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + if (unpause_req) { +- if (unpause_req->status.MPI_ERROR) MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail"); ++ if (unpause_req->status.MPI_ERROR) ++ MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail"); + MPIR_Request_free(unpause_req); +- if (mpi_errno) goto fn_fail; ++ if (mpi_errno) ++ goto fn_fail; + } + +-fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CKPT_CONTINUE_VC); + return mpi_errno; +-fn_fail: ++ fn_fail: + + goto fn_exit; + } + + + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_ckpt_restart_vc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_ckpt_restart_vc(MPIDI_VC_t *vc) ++int MPID_nem_tcp_ckpt_restart_vc(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3_Pkt_t upkt; +- MPIDI_nem_tcp_pkt_unpause_t * const pkt = (MPIDI_nem_tcp_pkt_unpause_t *)&upkt; ++ MPIDI_nem_tcp_pkt_unpause_t *const pkt = (MPIDI_nem_tcp_pkt_unpause_t *) & upkt; + MPIR_Request *sreq; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_CKPT_RESTART_VC); + +@@ -122,7 +113,8 @@ int MPID_nem_tcp_ckpt_restart_vc(MPIDI_VC_t *vc) + pkt->subtype = MPIDI_NEM_TCP_PKT_UNPAUSE; + + mpi_errno = MPID_nem_tcp_iStartContigMsg_paused(vc, pkt, sizeof(pkt), NULL, 0, &sreq); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + if (sreq != NULL) { + if (sreq->status.MPI_ERROR != MPI_SUCCESS) { +@@ -132,11 +124,11 @@ int MPID_nem_tcp_ckpt_restart_vc(MPIDI_VC_t *vc) + } + MPIR_Request_free(sreq); + } +- +-fn_exit: ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CKPT_RESTART_VC); + return mpi_errno; +-fn_fail: ++ fn_fail: + + goto fn_exit; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_finalize.c +@@ -6,10 +6,6 @@ + + #include "tcp_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_finalize(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -19,20 +15,21 @@ int MPID_nem_tcp_finalize(void) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_FINALIZE); + + mpi_errno = MPID_nem_tcp_send_finalize(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + mpi_errno = MPID_nem_tcp_sm_finalize(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- if (MPID_nem_tcp_g_lstn_sc.fd) +- { +- CHECK_EINTR (ret, close(MPID_nem_tcp_g_lstn_sc.fd)); +- MPIR_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**closesocket", "**closesocket %s %d", errno, MPIR_Strerror (errno)); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPID_nem_tcp_g_lstn_sc.fd) { ++ CHECK_EINTR(ret, close(MPID_nem_tcp_g_lstn_sc.fd)); ++ MPIR_ERR_CHKANDJUMP2(ret == -1, mpi_errno, MPI_ERR_OTHER, "**closesocket", ++ "**closesocket %s %d", errno, MPIR_Strerror(errno)); + } +- +- fn_exit: ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_FINALIZE); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } +- +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_getip.c +@@ -54,11 +54,7 @@ static int dbg_ifname = 0; + + #define NUM_IFREQS 10 + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_GetIPInterface +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_GetIPInterface( MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found ) ++int MPIDI_GetIPInterface(MPIDI_CH3I_nem_tcp_ifaddr_t * ifaddr, int *found) + { + int mpi_errno = MPI_SUCCESS; + char *buf_ptr = NULL, *ptr; +@@ -78,14 +74,14 @@ int MPIDI_GetIPInterface( MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found ) + + fd = socket(AF_INET, SOCK_DGRAM, 0); + if (fd < 0) { +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sock_create"); ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sock_create"); + } + + /* Use MSB localhost if necessary */ + #ifdef WORDS_BIGENDIAN + localhost = MSBlocalhost; + #endif +- ++ + + /* + * Obtain the interface information from the operating system +@@ -97,36 +93,35 @@ int MPIDI_GetIPInterface( MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found ) + buf_len = NUM_IFREQS * sizeof(struct ifreq); + buf_len_prev = 0; + +- for(;;) +- { +- struct ifconf ifconf; +- int rc; +- +- buf_ptr = (char *) MPL_malloc(buf_len, MPL_MEM_BUFFER); +- if (buf_ptr == NULL) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", buf_len); +- } +- +- ifconf.ifc_buf = buf_ptr; +- ifconf.ifc_len = buf_len; +- +- rc = ioctl(fd, SIOCGIFCONF, &ifconf); +- if (rc < 0) { +- if (errno != EINVAL || buf_len_prev != 0) { +- MPIR_ERR_SETANDJUMP2(mpi_errno, MPI_ERR_OTHER, "**ioctl", "**ioctl %d %s", errno, MPIR_Strerror(errno)); +- } +- } +- else { +- if (ifconf.ifc_len == buf_len_prev) { +- buf_len = ifconf.ifc_len; +- break; +- } +- +- buf_len_prev = ifconf.ifc_len; +- } +- +- MPL_free(buf_ptr); +- buf_len += NUM_IFREQS * sizeof(struct ifreq); ++ for (;;) { ++ struct ifconf ifconf; ++ int rc; ++ ++ buf_ptr = (char *) MPL_malloc(buf_len, MPL_MEM_BUFFER); ++ if (buf_ptr == NULL) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", buf_len); ++ } ++ ++ ifconf.ifc_buf = buf_ptr; ++ ifconf.ifc_len = buf_len; ++ ++ rc = ioctl(fd, SIOCGIFCONF, &ifconf); ++ if (rc < 0) { ++ if (errno != EINVAL || buf_len_prev != 0) { ++ MPIR_ERR_SETANDJUMP2(mpi_errno, MPI_ERR_OTHER, "**ioctl", "**ioctl %d %s", errno, ++ MPIR_Strerror(errno)); ++ } ++ } else { ++ if (ifconf.ifc_len == buf_len_prev) { ++ buf_len = ifconf.ifc_len; ++ break; ++ } ++ ++ buf_len_prev = ifconf.ifc_len; ++ } ++ ++ MPL_free(buf_ptr); ++ buf_len += NUM_IFREQS * sizeof(struct ifreq); + } + + /* +@@ -137,95 +132,90 @@ int MPIDI_GetIPInterface( MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found ) + */ + ptr = buf_ptr; + +- while(ptr < buf_ptr + buf_len) { +- struct ifreq * ifreq; +- +- ifreq = (struct ifreq *) ptr; +- +- if (dbg_ifname) { +- fprintf( stdout, "%10s\t", ifreq->ifr_name ); +- } +- +- if (ifreq->ifr_addr.sa_family == AF_INET) { +- struct in_addr addr; +- +- addr = ((struct sockaddr_in *) &(ifreq->ifr_addr))->sin_addr; +- if (dbg_ifname) { +- fprintf( stdout, "IPv4 address = %08x (%s)\n", addr.s_addr, +- inet_ntoa( addr ) ); +- } +- +- if (addr.s_addr == localhost && dbg_ifname) { +- fprintf( stdout, "Found local host\n" ); +- } +- /* Save localhost if we find it. Let any new interface +- overwrite localhost. However, if we find more than +- one non-localhost interface, then we'll choose none for the +- interfaces */ +- if (addr.s_addr == localhost) { +- foundLocalhost = 1; +- if (nfound == 0) { +- myifaddr.type = AF_INET; +- myifaddr.len = 4; +- MPIR_Memcpy( myifaddr.ifaddr, &addr.s_addr, 4 ); +- } +- } +- else { +- nfound++; +- myifaddr.type = AF_INET; +- myifaddr.len = 4; +- MPIR_Memcpy( myifaddr.ifaddr, &addr.s_addr, 4 ); +- } +- } +- else { +- if (dbg_ifname) { +- fprintf( stdout, "\n" ); +- } +- } +- +- /* +- * Increment pointer to the next ifreq; some adjustment may be +- * required if the address is an IPv6 address +- */ +- /* This is needed for MAX OSX */ ++ while (ptr < buf_ptr + buf_len) { ++ struct ifreq *ifreq; ++ ++ ifreq = (struct ifreq *) ptr; ++ ++ if (dbg_ifname) { ++ fprintf(stdout, "%10s\t", ifreq->ifr_name); ++ } ++ ++ if (ifreq->ifr_addr.sa_family == AF_INET) { ++ struct in_addr addr; ++ ++ addr = ((struct sockaddr_in *) &(ifreq->ifr_addr))->sin_addr; ++ if (dbg_ifname) { ++ fprintf(stdout, "IPv4 address = %08x (%s)\n", addr.s_addr, inet_ntoa(addr)); ++ } ++ ++ if (addr.s_addr == localhost && dbg_ifname) { ++ fprintf(stdout, "Found local host\n"); ++ } ++ /* Save localhost if we find it. Let any new interface ++ * overwrite localhost. However, if we find more than ++ * one non-localhost interface, then we'll choose none for the ++ * interfaces */ ++ if (addr.s_addr == localhost) { ++ foundLocalhost = 1; ++ if (nfound == 0) { ++ myifaddr.type = AF_INET; ++ myifaddr.len = 4; ++ MPIR_Memcpy(myifaddr.ifaddr, &addr.s_addr, 4); ++ } ++ } else { ++ nfound++; ++ myifaddr.type = AF_INET; ++ myifaddr.len = 4; ++ MPIR_Memcpy(myifaddr.ifaddr, &addr.s_addr, 4); ++ } ++ } else { ++ if (dbg_ifname) { ++ fprintf(stdout, "\n"); ++ } ++ } ++ ++ /* ++ * Increment pointer to the next ifreq; some adjustment may be ++ * required if the address is an IPv6 address ++ */ ++ /* This is needed for MAX OSX */ + #ifdef _SIZEOF_ADDR_IFREQ +- ptr += _SIZEOF_ADDR_IFREQ(*ifreq); ++ ptr += _SIZEOF_ADDR_IFREQ(*ifreq); + #else +- ptr += sizeof(struct ifreq); ++ ptr += sizeof(struct ifreq); + + # if defined(AF_INET6) +- { +- if (ifreq->ifr_addr.sa_family == AF_INET6) +- { +- ptr += sizeof(struct sockaddr_in6) - sizeof(struct sockaddr); +- } +- } ++ { ++ if (ifreq->ifr_addr.sa_family == AF_INET6) { ++ ptr += sizeof(struct sockaddr_in6) - sizeof(struct sockaddr); ++ } ++ } + # endif + #endif + } + + /* If we found a unique address, use that */ + if (nfound == 1 || (nfound == 0 && foundLocalhost == 1)) { +- *ifaddr = myifaddr; +- *found = 1; ++ *ifaddr = myifaddr; ++ *found = 1; + } + +-fn_exit: +- if (NULL != buf_ptr) +- MPL_free(buf_ptr); ++ fn_exit: ++ MPL_free(buf_ptr); + if (fd >= 0) + close(fd); +- ++ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GETIPINTERFACE); + return mpi_errno; +-fn_fail: ++ fn_fail: + goto fn_exit; + } + + #else /* things needed to find the interfaces */ + + /* In this case, just return false for interfaces found */ +-int MPIDI_GetIPInterface( MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found ) ++int MPIDI_GetIPInterface(MPIDI_CH3I_nem_tcp_ifaddr_t * ifaddr, int *found) + { + *found = 0; + return MPI_SUCCESS; +@@ -240,11 +230,7 @@ int MPIDI_GetIPInterface( MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found ) + * etc). If that name is detected as a valid interface name then 'ifaddr' will + * be populated with the corresponding address and '*found' will be set to TRUE. + * Otherwise '*found' will be set to FALSE. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Get_IP_for_iface +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_Get_IP_for_iface(const char *ifname, MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found) ++int MPIDI_Get_IP_for_iface(const char *ifname, MPIDI_CH3I_nem_tcp_ifaddr_t * ifaddr, int *found) + { + int mpi_errno = MPI_SUCCESS; + int fd, ret; +@@ -254,36 +240,35 @@ int MPIDI_Get_IP_for_iface(const char *ifname, MPIDI_CH3I_nem_tcp_ifaddr_t *ifad + *found = FALSE; + + fd = socket(AF_INET, SOCK_DGRAM, 0); +- MPIR_ERR_CHKANDJUMP2(fd < 0, mpi_errno, MPI_ERR_OTHER, "**sock_create", "**sock_create %s %d", MPIR_Strerror(errno), errno); +- ifr.ifr_addr.sa_family = AF_INET; /* just IPv4 for now */ +- MPL_strncpy(ifr.ifr_name, ifname, IFNAMSIZ-1); ++ MPIR_ERR_CHKANDJUMP2(fd < 0, mpi_errno, MPI_ERR_OTHER, "**sock_create", "**sock_create %s %d", ++ MPIR_Strerror(errno), errno); ++ ifr.ifr_addr.sa_family = AF_INET; /* just IPv4 for now */ ++ MPL_strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + ret = ioctl(fd, SIOCGIFADDR, &ifr); +- MPIR_ERR_CHKANDJUMP2(ret < 0, mpi_errno, MPI_ERR_OTHER, "**ioctl", "**ioctl %d %s", errno, MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP2(ret < 0, mpi_errno, MPI_ERR_OTHER, "**ioctl", "**ioctl %d %s", errno, ++ MPIR_Strerror(errno)); + + *found = TRUE; +- MPIR_Memcpy(ifaddr->ifaddr, &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr, 4); ++ MPIR_Memcpy(ifaddr->ifaddr, &((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr, 4); + ifaddr->len = 4; + ifaddr->type = AF_INET; + +-fn_exit: ++ fn_exit: + if (fd != -1) { + ret = close(fd); + if (ret < 0) { +- MPIR_ERR_SET2(mpi_errno, MPI_ERR_OTHER, "**sock_close", "**sock_close %s %d", MPIR_Strerror(errno), errno); ++ MPIR_ERR_SET2(mpi_errno, MPI_ERR_OTHER, "**sock_close", "**sock_close %s %d", ++ MPIR_Strerror(errno), errno); + } + } + return mpi_errno; +-fn_fail: ++ fn_fail: + goto fn_exit; + } + + #else /* things needed to determine address for a given interface name */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Get_IP_for_iface +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_Get_IP_for_iface(const char *ifname, MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found) ++int MPIDI_Get_IP_for_iface(const char *ifname, MPIDI_CH3I_nem_tcp_ifaddr_t * ifaddr, int *found) + { + if (found != NULL) + *found = FALSE; +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h +@@ -23,9 +23,9 @@ extern struct pollfd MPID_nem_tcp_g_lstn_plfd; + + extern MPL_dbg_class MPIDI_NEM_TCP_DBG_DET; + +-typedef enum{MPID_NEM_TCP_VC_STATE_DISCONNECTED, +- MPID_NEM_TCP_VC_STATE_CONNECTED, +- MPID_NEM_TCP_VC_STATE_ERROR ++typedef enum { MPID_NEM_TCP_VC_STATE_DISCONNECTED, ++ MPID_NEM_TCP_VC_STATE_CONNECTED, ++ MPID_NEM_TCP_VC_STATE_ERROR + } MPID_nem_tcp_vc_state_t; + + #define MPIDI_NEM_TCP_MAX_CONNECT_RETRIES 100 +@@ -35,8 +35,7 @@ typedef GENERIC_Q_DECL(struct MPIR_Request) MPIDI_nem_tcp_request_queue_t; + /* The vc provides a generic buffer in which network modules can store + private fields This removes all dependencies from the VC struction + on the network module, facilitating dynamic module loading. */ +-typedef struct +-{ ++typedef struct { + struct sockaddr_in sock_id; + MPID_nem_tcp_vc_state_t state; + struct MPID_nem_new_tcp_sockconn *sc; +@@ -45,7 +44,7 @@ typedef struct + MPIDI_nem_tcp_request_queue_t paused_send_queue; + /* this is a count of how many sc objects refer to this vc */ + int sc_ref_count; +- int connect_retry_count; /* number of times we've tried to connect */ ++ int connect_retry_count; /* number of times we've tried to connect */ + } MPID_nem_tcp_vc_area; + + /* macro for tcp private in VC */ +@@ -56,25 +55,25 @@ typedef struct + } while (0) + + /* functions */ +-int MPID_nem_tcp_init (MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p); +-int MPID_nem_tcp_finalize (void); ++int MPID_nem_tcp_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p); ++int MPID_nem_tcp_finalize(void); + + #ifdef ENABLE_CHECKPOINTING +-int MPID_nem_tcp_ckpt_pause_send_vc(MPIDI_VC_t *vc); +-int MPID_nem_tcp_ckpt_continue_vc(MPIDI_VC_t *vc); +-int MPID_nem_tcp_ckpt_restart_vc(MPIDI_VC_t *vc); ++int MPID_nem_tcp_ckpt_pause_send_vc(MPIDI_VC_t * vc); ++int MPID_nem_tcp_ckpt_continue_vc(MPIDI_VC_t * vc); ++int MPID_nem_tcp_ckpt_restart_vc(MPIDI_VC_t * vc); + int MPID_nem_tcp_ckpt_shutdown(void); + #endif + +-int MPID_nem_tcp_get_business_card (int my_rank, char **bc_val_p, int *val_max_sz_p); +-int MPID_nem_tcp_connect_to_root (const char *business_card, MPIDI_VC_t *new_vc); +-int MPID_nem_tcp_vc_init (MPIDI_VC_t *vc); +-int MPID_nem_tcp_vc_destroy(MPIDI_VC_t *vc); +-int MPID_nem_tcp_vc_terminate (MPIDI_VC_t *vc); ++int MPID_nem_tcp_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p); ++int MPID_nem_tcp_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc); ++int MPID_nem_tcp_vc_init(MPIDI_VC_t * vc); ++int MPID_nem_tcp_vc_destroy(MPIDI_VC_t * vc); ++int MPID_nem_tcp_vc_terminate(MPIDI_VC_t * vc); + + /* completion counter is atomically decremented when operation completes */ +-int MPID_nem_tcp_get (void *target_p, void *source_p, int source_node, int len, int *completion_ctr); +-int MPID_nem_tcp_put (void *target_p, int target_node, void *source_p, int len, int *completion_ctr); ++int MPID_nem_tcp_get(void *target_p, void *source_p, int source_node, int len, int *completion_ctr); ++int MPID_nem_tcp_put(void *target_p, int target_node, void *source_p, int len, int *completion_ctr); + + int MPID_nem_tcp_send_init(void); + int MPID_nem_tcp_connect(struct MPIDI_VC *const vc); +@@ -82,47 +81,53 @@ int MPID_nem_tcp_connpoll(int in_blocking_poll); + int MPID_nem_tcp_sm_init(void); + int MPID_nem_tcp_sm_finalize(void); + int MPID_nem_tcp_set_sockopts(int fd); +-MPID_NEM_TCP_SOCK_STATUS_t MPID_nem_tcp_check_sock_status(const struct pollfd *const plfd); ++int MPID_nem_tcp_check_sock_status(const struct pollfd *const plfd); + int MPID_nem_tcp_send_finalize(void); + int MPID_nem_tcp_bind(int sockfd); +-int MPID_nem_tcp_conn_est(MPIDI_VC_t *vc); +-int MPID_nem_tcp_get_conninfo(struct MPIDI_VC *vc, struct sockaddr_in *addr, char **pg_id, int *pg_rank); ++int MPID_nem_tcp_conn_est(MPIDI_VC_t * vc); ++int MPID_nem_tcp_get_conninfo(struct MPIDI_VC *vc, struct sockaddr_in *addr, char **pg_id, ++ int *pg_rank); + int MPID_nem_tcp_get_vc_from_conninfo(char *pg_id, int pg_rank, struct MPIDI_VC **vc); + int MPID_nem_tcp_is_sock_connected(int fd); + int MPID_nem_tcp_disconnect(struct MPIDI_VC *const vc); +-int MPID_nem_tcp_cleanup (struct MPIDI_VC *const vc); +-int MPID_nem_tcp_cleanup_on_error(MPIDI_VC_t *const vc, int req_errno); ++int MPID_nem_tcp_cleanup(struct MPIDI_VC *const vc); ++int MPID_nem_tcp_cleanup_on_error(MPIDI_VC_t * const vc, int req_errno); + int MPID_nem_tcp_error_out_send_queue(struct MPIDI_VC *const vc, int req_errno); + int MPID_nem_tcp_ckpt_cleanup(void); +-int MPID_nem_tcp_state_listening_handler(struct pollfd *const l_plfd, sockconn_t *const l_sc); +-int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send_queue); +- +-int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz); +-int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz, +- MPIR_Request **sreq_ptr); +-int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz, +- MPIR_Request **sreq_ptr); +-int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz); +-int MPID_nem_tcp_get_addr_port_from_bc(const char *business_card, struct in_addr *addr, in_port_t *port); +- +-void MPID_nem_tcp_vc_dbg_print_sendq(FILE *stream, MPIDI_VC_t *vc); ++int MPID_nem_tcp_state_listening_handler(struct pollfd *const l_plfd, sockconn_t * const l_sc); ++int MPID_nem_tcp_send_queued(MPIDI_VC_t * vc, MPIDI_nem_tcp_request_queue_t * send_queue); ++ ++int MPID_nem_tcp_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, ++ void *data, intptr_t data_sz); ++int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data, ++ intptr_t data_sz, MPIR_Request ** sreq_ptr); ++int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data, ++ intptr_t data_sz, MPIR_Request ** sreq_ptr); ++int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *header, intptr_t hdr_sz, ++ MPL_IOV * hdr_iov, int n_hdr_iov); ++int MPID_nem_tcp_iSendIov(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, ++ MPL_IOV * iov, int n_iov); ++int MPID_nem_tcp_get_addr_port_from_bc(const char *business_card, struct in_addr *addr, ++ in_port_t * port); ++ ++void MPID_nem_tcp_vc_dbg_print_sendq(FILE * stream, MPIDI_VC_t * vc); + + int MPID_nem_tcp_socksm_finalize(void); + int MPID_nem_tcp_socksm_init(void); +-int MPID_nem_tcp_vc_terminated(MPIDI_VC_t *vc); ++int MPID_nem_tcp_vc_terminated(MPIDI_VC_t * vc); + int MPID_nem_tcp_get_ordering(int *ordering); + + +-int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, ++int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + void *data ATTRIBUTE((unused)), +- intptr_t *buflen, MPIR_Request **rreqp); ++ intptr_t * buflen, MPIR_Request ** rreqp); + + + /* Macros */ + +-/* system call wrapper -- This retries the syscall each time it is interrupted. +- Example usage: instead of writing "ret = write(fd, buf, len);" +- use: "CHECK_EINTR(ret, write(fd, buf, len)); ++/* system call wrapper -- This retries the syscall each time it is interrupted. ++ Example usage: instead of writing "ret = write(fd, buf, len);" ++ use: "CHECK_EINTR(ret, write(fd, buf, len)); + Caution: + (1) Some of the system calls have value-result parameters. Those system calls + should not be used within CHECK_EINTR macro or should be used with CARE. +@@ -176,8 +181,8 @@ typedef struct MPIDI_CH3I_nem_tcp_ifaddr_t { + int type; + unsigned char ifaddr[16]; + } MPIDI_CH3I_nem_tcp_ifaddr_t; +-int MPIDI_GetIPInterface( MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found ); +-int MPIDI_Get_IP_for_iface(const char *ifname, MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr, int *found); ++int MPIDI_GetIPInterface(MPIDI_CH3I_nem_tcp_ifaddr_t * ifaddr, int *found); ++int MPIDI_Get_IP_for_iface(const char *ifname, MPIDI_CH3I_nem_tcp_ifaddr_t * ifaddr, int *found); + + /* Keys for business cards */ + #define MPIDI_CH3I_PORT_KEY "port" +@@ -193,12 +198,11 @@ typedef enum MPIDI_nem_tcp_pkt_type { + MPIDI_NEM_TCP_PKT_UNPAUSE, + #endif + MPIDI_NEM_TCP_PKT_NUM_TYPES, +- MPIDI_NEM_TCP_PKT_INVALID = -1 /* force signed, to avoid warnings */ ++ MPIDI_NEM_TCP_PKT_INVALID = -1 /* force signed, to avoid warnings */ + } MPIDI_nem_tcp_pkt_type_t; + + #ifdef ENABLE_CHECKPOINTING +-typedef struct MPIDI_nem_tcp_pkt_unpause +-{ ++typedef struct MPIDI_nem_tcp_pkt_unpause { + MPIDI_CH3_Pkt_type_t type; + unsigned subtype; + } MPIDI_nem_tcp_pkt_unpause_t; +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c +@@ -94,9 +94,9 @@ MPID_nem_netmod_funcs_t MPIDI_nem_tcp_funcs = { + MPID_nem_tcp_init, + MPID_nem_tcp_finalize, + #ifdef ENABLE_CHECKPOINTING +- NULL, /* ckpt_precheck */ ++ NULL, /* ckpt_precheck */ + ckpt_restart, +- NULL, /* ckpt_continue */ ++ NULL, /* ckpt_continue */ + #endif + MPID_nem_tcp_connpoll, + MPID_nem_tcp_get_business_card, +@@ -104,20 +104,17 @@ MPID_nem_netmod_funcs_t MPIDI_nem_tcp_funcs = { + MPID_nem_tcp_vc_init, + MPID_nem_tcp_vc_destroy, + MPID_nem_tcp_vc_terminate, +- NULL, /* anysource iprobe */ +- NULL, /* anysource_improbe */ ++ NULL, /* anysource iprobe */ ++ NULL, /* anysource_improbe */ + MPID_nem_tcp_get_ordering + }; + + /* in case there are no packet types defined (e.g., they're ifdef'ed out) make sure the array is not zero length */ +-static MPIDI_CH3_PktHandler_Fcn *pkt_handlers[MPIDI_NEM_TCP_PKT_NUM_TYPES ? MPIDI_NEM_TCP_PKT_NUM_TYPES : 1]; ++static MPIDI_CH3_PktHandler_Fcn *pkt_handlers[MPIDI_NEM_TCP_PKT_NUM_TYPES ? ++ MPIDI_NEM_TCP_PKT_NUM_TYPES : 1]; + + MPL_dbg_class MPIDI_NEM_TCP_DBG_DET; + +-#undef FUNCNAME +-#define FUNCNAME set_up_listener +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int set_up_listener(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -126,34 +123,35 @@ static int set_up_listener(void) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SET_UP_LISTENER); + +- MPID_nem_tcp_g_lstn_plfd.fd = MPID_nem_tcp_g_lstn_sc.fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); +- MPIR_ERR_CHKANDJUMP2(MPID_nem_tcp_g_lstn_sc.fd == -1, mpi_errno, MPI_ERR_OTHER, "**sock_create", "**sock_create %s %d", MPIR_Strerror(errno), errno); ++ MPID_nem_tcp_g_lstn_plfd.fd = MPID_nem_tcp_g_lstn_sc.fd = ++ socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ++ MPIR_ERR_CHKANDJUMP2(MPID_nem_tcp_g_lstn_sc.fd == -1, mpi_errno, MPI_ERR_OTHER, "**sock_create", ++ "**sock_create %s %d", MPIR_Strerror(errno), errno); + + mpi_errno = MPID_nem_tcp_set_sockopts(MPID_nem_tcp_g_lstn_sc.fd); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + MPID_nem_tcp_g_lstn_plfd.events = POLLIN; + mpi_errno = MPID_nem_tcp_bind(MPID_nem_tcp_g_lstn_sc.fd); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + ret = listen(MPID_nem_tcp_g_lstn_sc.fd, SOMAXCONN); +- MPIR_ERR_CHKANDJUMP2(ret == -1, mpi_errno, MPI_ERR_OTHER, "**listen", "**listen %s %d", MPIR_Strerror(errno), errno); ++ MPIR_ERR_CHKANDJUMP2(ret == -1, mpi_errno, MPI_ERR_OTHER, "**listen", "**listen %s %d", ++ MPIR_Strerror(errno), errno); + MPID_nem_tcp_g_lstn_sc.state.lstate = LISTEN_STATE_LISTENING; + MPID_nem_tcp_g_lstn_sc.handler = MPID_nem_tcp_state_listening_handler; + +-fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SET_UP_LISTENER); + return mpi_errno; +-fn_fail: ++ fn_fail: + + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_init (MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p) ++int MPID_nem_tcp_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_INIT); +@@ -171,56 +169,58 @@ int MPID_nem_tcp_init (MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_ + + /* set up listener socket */ + mpi_errno = set_up_listener(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + /* create business card */ + mpi_errno = MPID_nem_tcp_get_business_card(pg_rank, bc_val_p, val_max_sz_p); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + mpi_errno = MPID_nem_tcp_sm_init(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + mpi_errno = MPID_nem_tcp_send_init(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + #ifdef HAVE_SIGNAL + { + /* In order to be able to handle socket errors on our own, we need +- to ignore SIGPIPE. This may cause problems for programs that +- intend to handle SIGPIPE or count on being killed, but I expect +- such programs are very rare, and I'm not sure what the best +- solution would be anyway. */ ++ * to ignore SIGPIPE. This may cause problems for programs that ++ * intend to handle SIGPIPE or count on being killed, but I expect ++ * such programs are very rare, and I'm not sure what the best ++ * solution would be anyway. */ + void *ret; + + ret = signal(SIGPIPE, SIG_IGN); +- MPIR_ERR_CHKANDJUMP1(ret == SIG_ERR, mpi_errno, MPI_ERR_OTHER, "**signal", "**signal %s", MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(ret == SIG_ERR, mpi_errno, MPI_ERR_OTHER, "**signal", "**signal %s", ++ MPIR_Strerror(errno)); + if (ret != SIG_DFL && ret != SIG_IGN) { + /* The app has set its own signal handler. Replace the previous handler. */ + ret = signal(SIGPIPE, ret); +- MPIR_ERR_CHKANDJUMP1(ret == SIG_ERR, mpi_errno, MPI_ERR_OTHER, "**signal", "**signal %s", MPIR_Strerror(errno)); ++ MPIR_ERR_CHKANDJUMP1(ret == SIG_ERR, mpi_errno, MPI_ERR_OTHER, "**signal", ++ "**signal %s", MPIR_Strerror(errno)); + } + } + #endif +- +- fn_exit: ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_INIT); +-/* fprintf(stdout, FCNAME " Exit\n"); fflush(stdout); */ ++/* fprintf(stdout, __func__ " Exit\n"); fflush(stdout); */ + return mpi_errno; +- fn_fail: ++ fn_fail: + /* fprintf(stdout, "failure. mpi_errno = %d\n", mpi_errno); */ + goto fn_exit; + } + + #ifdef ENABLE_CHECKPOINTING + +-#undef FUNCNAME +-#define FUNCNAME ckpt_restart +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int ckpt_restart(void) + { + int mpi_errno = MPI_SUCCESS; + char *publish_bc_orig = NULL; +- char *bc_val = NULL; ++ char *bc_val = NULL; + int val_max_sz; + int i; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CKPT_RESTART); +@@ -228,26 +228,33 @@ static int ckpt_restart(void) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CKPT_RESTART); + + /* First, clean up. We didn't shut anything down before the +- checkpoint, so we need to go close and free any resources */ ++ * checkpoint, so we need to go close and free any resources */ + mpi_errno = MPID_nem_tcp_ckpt_cleanup(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + mpi_errno = MPID_nem_tcp_send_finalize(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + mpi_errno = MPID_nem_tcp_sm_finalize(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + /* Initialize the new business card */ + mpi_errno = MPIDI_CH3I_BCInit(&bc_val, &val_max_sz); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + publish_bc_orig = bc_val; +- ++ + /* Now we can restart */ +- mpi_errno = MPID_nem_tcp_init(MPIDI_Process.my_pg, MPIDI_Process.my_pg_rank, &bc_val, &val_max_sz); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- ++ mpi_errno = ++ MPID_nem_tcp_init(MPIDI_Process.my_pg, MPIDI_Process.my_pg_rank, &bc_val, &val_max_sz); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + /* publish business card */ +- mpi_errno = MPIDI_PG_SetConnInfo(MPIDI_Process.my_pg_rank, (const char *)publish_bc_orig); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ mpi_errno = MPIDI_PG_SetConnInfo(MPIDI_Process.my_pg_rank, (const char *) publish_bc_orig); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + MPL_free(publish_bc_orig); + + for (i = 0; i < MPIDI_Process.my_pg->size; ++i) { +@@ -259,15 +266,16 @@ static int ckpt_restart(void) + vc_ch = &vc->ch; + if (!vc_ch->is_local) { + mpi_errno = vc_ch->ckpt_restart_vc(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + } +- + +-fn_exit: ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CKPT_RESTART); + return mpi_errno; +-fn_fail: ++ fn_fail: + + goto fn_exit; + } +@@ -276,7 +284,7 @@ fn_fail: + /* + * Get a description of the network interface to use for socket communication + * +- * Here are the steps. This order of checks is used to provide the ++ * Here are the steps. This order of checks is used to provide the + * user control over the choice of interface and to avoid, where possible, + * the use of non-scalable services, such as centeralized name servers. + * +@@ -290,12 +298,12 @@ fn_fail: + * ifname - hostname of the interface. This may or may not be the same + * as the name returned by gethostname (in Unix) + * ifaddr - This structure includes the interface IP address (as bytes), +- * and the type (e.g., AF_INET or AF_INET6). Only ++ * and the type (e.g., AF_INET or AF_INET6). Only + * ipv4 (AF_INET) is used so far. + */ + + static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname, +- MPIDI_CH3I_nem_tcp_ifaddr_t *ifaddr) ++ MPIDI_CH3I_nem_tcp_ifaddr_t * ifaddr) + { + const char *ifname_string; + int mpi_errno = MPI_SUCCESS; +@@ -304,111 +312,112 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname, + MPIR_Assert(maxIfname); + ifname[0] = '\0'; + +- MPIR_ERR_CHKANDJUMP(MPIR_CVAR_CH3_INTERFACE_HOSTNAME && MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE, mpi_errno, MPI_ERR_OTHER, "**ifname_and_hostname"); +- ++ MPIR_ERR_CHKANDJUMP(MPIR_CVAR_CH3_INTERFACE_HOSTNAME && ++ MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE, mpi_errno, MPI_ERR_OTHER, ++ "**ifname_and_hostname"); ++ + /* Set "not found" for ifaddr */ + ifaddr->len = 0; + + /* Check if user specified ethernet interface name, e.g., ib0, eth1 */ + if (MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE) { +- int len; +- mpi_errno = MPIDI_Get_IP_for_iface(MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE, ifaddr, &ifaddrFound); +- MPIR_ERR_CHKANDJUMP1(mpi_errno || !ifaddrFound, mpi_errno, MPI_ERR_OTHER, "**iface_notfound", "**iface_notfound %s", MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE); +- ++ int len; ++ mpi_errno = ++ MPIDI_Get_IP_for_iface(MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE, ifaddr, &ifaddrFound); ++ MPIR_ERR_CHKANDJUMP1(mpi_errno || ++ !ifaddrFound, mpi_errno, MPI_ERR_OTHER, "**iface_notfound", ++ "**iface_notfound %s", MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE); ++ + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT, VERBOSE, (MPL_DBG_FDEST, +- "ifaddrFound=TRUE ifaddr->type=%d ifaddr->len=%d ifaddr->ifaddr[0-3]=%d.%d.%d.%d", +- ifaddr->type, ifaddr->len, ifaddr->ifaddr[0], ifaddr->ifaddr[1], ifaddr->ifaddr[2], +- ifaddr->ifaddr[3])); ++ "ifaddrFound=TRUE ifaddr->type=%d ifaddr->len=%d ifaddr->ifaddr[0-3]=%d.%d.%d.%d", ++ ifaddr->type, ifaddr->len, ++ ifaddr->ifaddr[0], ifaddr->ifaddr[1], ++ ifaddr->ifaddr[2], ifaddr->ifaddr[3])); + + /* In this case, ifname is only used for debugging purposes */ +- mpi_errno = MPID_Get_processor_name(ifname, maxIfname, &len ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ mpi_errno = MPID_Get_processor_name(ifname, maxIfname, &len); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + goto fn_exit; + } + + /* Check for a host name supplied through an environment variable */ + ifname_string = MPIR_CVAR_CH3_INTERFACE_HOSTNAME; + if (!ifname_string) { +- /* See if there is a per-process name for the interfaces (e.g., +- the process manager only delievers the same values for the +- environment to each process. There's no way to do this with +- the param interface, so we need to use getenv() here. */ +- char namebuf[1024]; +- MPL_snprintf( namebuf, sizeof(namebuf), +- "MPICH_INTERFACE_HOSTNAME_R%d", myRank ); +- ifname_string = getenv( namebuf ); +- +- if (DBG_IFNAME && ifname_string) { +- fprintf( stdout, "Found interface name %s from %s\n", +- ifname_string, namebuf ); +- fflush( stdout ); +- } +- } +- else if (DBG_IFNAME) { +- fprintf( stdout, +- "Found interface name %s from MPICH_INTERFACE_HOSTNAME\n", +- ifname_string ); +- fflush( stdout ); ++ /* See if there is a per-process name for the interfaces (e.g., ++ * the process manager only delievers the same values for the ++ * environment to each process. There's no way to do this with ++ * the param interface, so we need to use getenv() here. */ ++ char namebuf[1024]; ++ MPL_snprintf(namebuf, sizeof(namebuf), "MPICH_INTERFACE_HOSTNAME_R%d", myRank); ++ ifname_string = getenv(namebuf); ++ ++ if (DBG_IFNAME && ifname_string) { ++ fprintf(stdout, "Found interface name %s from %s\n", ifname_string, namebuf); ++ fflush(stdout); ++ } ++ } else if (DBG_IFNAME) { ++ fprintf(stdout, "Found interface name %s from MPICH_INTERFACE_HOSTNAME\n", ifname_string); ++ fflush(stdout); + } +- +- if (!ifname_string) { +- int len; +- +- /* User did not specify a hostname. Look it up. */ +- mpi_errno = MPID_Get_processor_name(ifname, maxIfname, &len ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); + +- ifname_string = ifname; +- +- /* If we didn't find a specific name, then try to get an IP address +- directly from the available interfaces, if that is supported on +- this platform. Otherwise, we'll drop into the next step that uses +- the ifname */ +- mpi_errno = MPIDI_GetIPInterface( ifaddr, &ifaddrFound ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- else { +- /* Copy this name into the output name */ +- MPL_strncpy( ifname, ifname_string, maxIfname ); ++ if (!ifname_string) { ++ int len; ++ ++ /* User did not specify a hostname. Look it up. */ ++ mpi_errno = MPID_Get_processor_name(ifname, maxIfname, &len); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ ifname_string = ifname; ++ ++ /* If we didn't find a specific name, then try to get an IP address ++ * directly from the available interfaces, if that is supported on ++ * this platform. Otherwise, we'll drop into the next step that uses ++ * the ifname */ ++ mpi_errno = MPIDI_GetIPInterface(ifaddr, &ifaddrFound); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ /* Copy this name into the output name */ ++ MPL_strncpy(ifname, ifname_string, maxIfname); + } + + /* If we don't have an IP address, try to get it from the name */ + if (!ifaddrFound) { + int i; +- struct hostent *info = NULL; ++ struct hostent *info = NULL; + for (i = 0; i < MPIR_CVAR_NEMESIS_TCP_HOST_LOOKUP_RETRIES; ++i) { +- info = gethostbyname( ifname_string ); ++ info = gethostbyname(ifname_string); + if (info || h_errno != TRY_AGAIN) + break; + } +- MPIR_ERR_CHKANDJUMP2(!info || !info->h_addr_list, mpi_errno, MPI_ERR_OTHER, "**gethostbyname", "**gethostbyname %s %d", ifname_string, h_errno); +- ++ MPIR_ERR_CHKANDJUMP2(!info || ++ !info->h_addr_list, mpi_errno, MPI_ERR_OTHER, "**gethostbyname", ++ "**gethostbyname %s %d", ifname_string, h_errno); ++ + /* Use the primary address */ +- ifaddr->len = info->h_length; ++ ifaddr->len = info->h_length; + ifaddr->type = info->h_addrtype; + if (ifaddr->len > sizeof(ifaddr->ifaddr)) { + /* If the address won't fit in the field, reset to +- no address */ ++ * no address */ + ifaddr->len = 0; + ifaddr->type = -1; + MPIR_ERR_INTERNAL(mpi_errno, "Address too long to fit in field"); + } else { +- MPIR_Memcpy( ifaddr->ifaddr, info->h_addr_list[0], ifaddr->len ); +- } ++ MPIR_Memcpy(ifaddr->ifaddr, info->h_addr_list[0], ifaddr->len); ++ } + } + +-fn_exit: ++ fn_exit: + return mpi_errno; +-fn_fail: ++ fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_get_business_card +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_get_business_card (int my_rank, char **bc_val_p, int *val_max_sz_p) ++int MPID_nem_tcp_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p) + { + int mpi_errno = MPI_SUCCESS; + int str_errno = MPL_STR_SUCCESS; +@@ -420,56 +429,56 @@ int MPID_nem_tcp_get_business_card (int my_rank, char **bc_val_p, int *val_max_s + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_GET_BUSINESS_CARD); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_GET_BUSINESS_CARD); +- ++ + mpi_errno = GetSockInterfaceAddr(my_rank, ifname, sizeof(ifname), &ifaddr); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- +- str_errno = MPL_str_add_string_arg(bc_val_p, val_max_sz_p, MPIDI_CH3I_HOST_DESCRIPTION_KEY, ifname); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ ++ str_errno = ++ MPL_str_add_string_arg(bc_val_p, val_max_sz_p, MPIDI_CH3I_HOST_DESCRIPTION_KEY, ifname); + if (str_errno) { + MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); + } + + len = sizeof(sock_id); +- ret = getsockname (MPID_nem_tcp_g_lstn_sc.fd, (struct sockaddr *)&sock_id, &len); +- MPIR_ERR_CHKANDJUMP1 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**getsockname", "**getsockname %s", MPIR_Strerror (errno)); ++ ret = getsockname(MPID_nem_tcp_g_lstn_sc.fd, (struct sockaddr *) &sock_id, &len); ++ MPIR_ERR_CHKANDJUMP1(ret == -1, mpi_errno, MPI_ERR_OTHER, "**getsockname", "**getsockname %s", ++ MPIR_Strerror(errno)); + +- str_errno = MPL_str_add_int_arg (bc_val_p, val_max_sz_p, MPIDI_CH3I_PORT_KEY, ntohs(sock_id.sin_port)); ++ str_errno = ++ MPL_str_add_int_arg(bc_val_p, val_max_sz_p, MPIDI_CH3I_PORT_KEY, ntohs(sock_id.sin_port)); + if (str_errno) { + MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); + } +- +- if (ifaddr.len > 0 && ifaddr.type == AF_INET) +- { ++ ++ if (ifaddr.len > 0 && ifaddr.type == AF_INET) { + unsigned char *p; +- p = (unsigned char *)(ifaddr.ifaddr); +- MPL_snprintf( ifname, sizeof(ifname), "%u.%u.%u.%u", p[0], p[1], p[2], p[3] ); +- MPL_DBG_MSG_S(MPIDI_CH3_DBG_CONNECT,VERBOSE,"ifname = %s",ifname ); ++ p = (unsigned char *) (ifaddr.ifaddr); ++ MPL_snprintf(ifname, sizeof(ifname), "%u.%u.%u.%u", p[0], p[1], p[2], p[3]); ++ MPL_DBG_MSG_S(MPIDI_CH3_DBG_CONNECT, VERBOSE, "ifname = %s", ifname); + str_errno = MPL_str_add_string_arg(bc_val_p, val_max_sz_p, MPIDI_CH3I_IFNAME_KEY, ifname); + if (str_errno) { +- MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); ++ MPIR_ERR_CHKANDJUMP(str_errno == MPL_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, ++ "**buscard_len"); + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); + } + } +- ++ + + /* printf("MPID_nem_tcp_get_business_card. port=%d\n", sock_id.sin_port); */ + +- fn_exit: ++ fn_exit: + /* fprintf(stdout, "MPID_nem_tcp_get_business_card Exit, mpi_errno=%d\n", mpi_errno); fflush(stdout); */ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_GET_BUSINESS_CARD); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_connect_to_root +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_connect_to_root (const char *business_card, MPIDI_VC_t *new_vc) ++int MPID_nem_tcp_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) + { + int mpi_errno = MPI_SUCCESS; + struct in_addr addr; +@@ -482,26 +491,25 @@ int MPID_nem_tcp_connect_to_root (const char *business_card, MPIDI_VC_t *new_vc) + + mpi_errno = MPID_nem_tcp_get_addr_port_from_bc(business_card, &addr, &vc_tcp->sock_id.sin_port); + vc_tcp->sock_id.sin_addr.s_addr = addr.s_addr; +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + mpi_errno = MPIDI_GetTagFromPort(business_card, &new_vc->port_name_tag); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + mpi_errno = MPID_nem_tcp_connect(new_vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CONNECT_TO_ROOT); + return mpi_errno; + +- fn_fail: ++ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_vc_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_vc_init (MPIDI_VC_t *vc) ++int MPID_nem_tcp_vc_init(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3I_VC *vc_ch = &vc->ch; +@@ -511,14 +519,15 @@ int MPID_nem_tcp_vc_init (MPIDI_VC_t *vc) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_VC_INIT); + + vc_tcp->state = MPID_NEM_TCP_VC_STATE_DISCONNECTED; +- +- vc->sendNoncontig_fn = MPID_nem_tcp_SendNoncontig; ++ ++ vc->sendNoncontig_fn = MPID_nem_tcp_SendNoncontig; + vc_ch->iStartContigMsg = MPID_nem_tcp_iStartContigMsg; +- vc_ch->iSendContig = MPID_nem_tcp_iSendContig; ++ vc_ch->iSendContig = MPID_nem_tcp_iSendContig; ++ vc_ch->iSendIov = MPID_nem_tcp_iSendIov; + #ifdef ENABLE_CHECKPOINTING + vc_ch->ckpt_pause_send_vc = MPID_nem_tcp_ckpt_pause_send_vc; +- vc_ch->ckpt_continue_vc = MPID_nem_tcp_ckpt_continue_vc; +- vc_ch->ckpt_restart_vc = MPID_nem_tcp_ckpt_restart_vc; ++ vc_ch->ckpt_continue_vc = MPID_nem_tcp_ckpt_continue_vc; ++ vc_ch->ckpt_restart_vc = MPID_nem_tcp_ckpt_restart_vc; + + pkt_handlers[MPIDI_NEM_TCP_PKT_UNPAUSE] = MPID_nem_tcp_pkt_unpause_handler; + #endif +@@ -539,18 +548,14 @@ int MPID_nem_tcp_vc_init (MPIDI_VC_t *vc) + vc_tcp->paused_send_queue.head = vc_tcp->paused_send_queue.tail = NULL; + + vc_tcp->sc_ref_count = 0; +- ++ + vc_tcp->connect_retry_count = 0; + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_VC_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_vc_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_vc_destroy(MPIDI_VC_t *vc) ++int MPID_nem_tcp_vc_destroy(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + +@@ -560,66 +565,60 @@ int MPID_nem_tcp_vc_destroy(MPIDI_VC_t *vc) + } + + +-/* +- FIXME: this is the same function as in socksm.c ++/* ++ FIXME: this is the same function as in socksm.c + This should be removed and use only one function eventually. + */ +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_get_addr_port_from_bc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_get_addr_port_from_bc(const char *business_card, struct in_addr *addr, in_port_t *port) ++ ++int MPID_nem_tcp_get_addr_port_from_bc(const char *business_card, struct in_addr *addr, ++ in_port_t * port) + { + int mpi_errno = MPI_SUCCESS; + int ret; + int port_int; +- /*char desc_str[256];*/ ++ /*char desc_str[256]; */ + char ifname[256]; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_GET_ADDR_PORT_FROM_BC); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_GET_ADDR_PORT_FROM_BC); +- +- /* fprintf(stdout, FCNAME " Enter\n"); fflush(stdout); */ ++ ++ /* fprintf(stdout, __func__ " Enter\n"); fflush(stdout); */ + /* desc_str is only used for debugging +- ret = MPL_str_get_string_arg (business_card, MPIDI_CH3I_HOST_DESCRIPTION_KEY, desc_str, sizeof(desc_str)); +- MPIR_ERR_CHKANDJUMP (ret != MPL_STR_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**argstr_missinghost"); +- */ ++ * ret = MPL_str_get_string_arg (business_card, MPIDI_CH3I_HOST_DESCRIPTION_KEY, desc_str, sizeof(desc_str)); ++ * MPIR_ERR_CHKANDJUMP (ret != MPL_STR_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**argstr_missinghost"); ++ */ + + /* sizeof(in_port_t) != sizeof(int) on most platforms, so we need to use + * port_int as the arg to MPL_str_get_int_arg. */ +- ret = MPL_str_get_int_arg (business_card, MPIDI_CH3I_PORT_KEY, &port_int); ++ ret = MPL_str_get_int_arg(business_card, MPIDI_CH3I_PORT_KEY, &port_int); + /* MPL_STR_FAIL is not a valid MPI error code so we store the result in ret + * instead of mpi_errno. */ +- MPIR_ERR_CHKANDJUMP (ret != MPL_STR_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**argstr_missingport"); +- MPIR_Assert((port_int >> (8*sizeof(*port))) == 0); /* ensure port_int isn't too large for *port */ +- *port = htons((in_port_t)port_int); ++ MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**argstr_missingport"); ++ MPIR_Assert((port_int >> (8 * sizeof(*port))) == 0); /* ensure port_int isn't too large for *port */ ++ *port = htons((in_port_t) port_int); + + ret = MPL_str_get_string_arg(business_card, MPIDI_CH3I_IFNAME_KEY, ifname, sizeof(ifname)); +- MPIR_ERR_CHKANDJUMP (ret != MPL_STR_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**argstr_missingifname"); ++ MPIR_ERR_CHKANDJUMP(ret != MPL_STR_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**argstr_missingifname"); + +- ret = inet_pton (AF_INET, (const char *)ifname, addr); +- MPIR_ERR_CHKANDJUMP(ret == 0, mpi_errno,MPI_ERR_OTHER,"**ifnameinvalid"); ++ ret = inet_pton(AF_INET, (const char *) ifname, addr); ++ MPIR_ERR_CHKANDJUMP(ret == 0, mpi_errno, MPI_ERR_OTHER, "**ifnameinvalid"); + MPIR_ERR_CHKANDJUMP(ret < 0, mpi_errno, MPI_ERR_OTHER, "**afinetinvalid"); +- +- fn_exit: +-/* fprintf(stdout, FCNAME " Exit\n"); fflush(stdout); */ ++ ++ fn_exit: ++/* fprintf(stdout, __func__ " Exit\n"); fflush(stdout); */ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_GET_ADDR_PORT_FROM_BC); + return mpi_errno; +- fn_fail: ++ fn_fail: + /* fprintf(stdout, "failure. mpi_errno = %d\n", mpi_errno); */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + + /* MPID_nem_tcp_bind -- if MPICH_PORT_RANGE is set, this + binds the socket to an available port number in the range. + Otherwise, it binds it to any addr and any port */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_bind +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_bind (int sockfd) ++int MPID_nem_tcp_bind(int sockfd) + { + int mpi_errno = MPI_SUCCESS; + int ret; +@@ -628,45 +627,46 @@ int MPID_nem_tcp_bind (int sockfd) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_BIND); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_BIND); +- +- MPIR_ERR_CHKANDJUMP(MPIR_CVAR_CH3_PORT_RANGE.low < 0 || MPIR_CVAR_CH3_PORT_RANGE.low > MPIR_CVAR_CH3_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange"); ++ ++ MPIR_ERR_CHKANDJUMP(MPIR_CVAR_CH3_PORT_RANGE.low < 0 || ++ MPIR_CVAR_CH3_PORT_RANGE.low > MPIR_CVAR_CH3_PORT_RANGE.high, mpi_errno, ++ MPI_ERR_OTHER, "**badportrange"); + + /* default MPICH_PORT_RANGE is {0,0} so bind will use any available port */ + ret = 0; +- for (port = MPIR_CVAR_CH3_PORT_RANGE.low; port <= MPIR_CVAR_CH3_PORT_RANGE.high; ++port) +- { +- memset ((void *)&sin, 0, sizeof(sin)); +- sin.sin_family = AF_INET; ++ for (port = MPIR_CVAR_CH3_PORT_RANGE.low; port <= MPIR_CVAR_CH3_PORT_RANGE.high; ++port) { ++ memset((void *) &sin, 0, sizeof(sin)); ++ sin.sin_family = AF_INET; + sin.sin_addr.s_addr = htonl(INADDR_ANY); +- sin.sin_port = htons(port); ++ sin.sin_port = htons(port); + +- ret = bind (sockfd, (struct sockaddr *)&sin, sizeof(sin)); ++ ret = bind(sockfd, (struct sockaddr *) &sin, sizeof(sin)); + if (ret == 0) + break; +- ++ + /* check for real error */ +- MPIR_ERR_CHKANDJUMP3 (errno != EADDRINUSE && errno != EADDRNOTAVAIL, mpi_errno, MPI_ERR_OTHER, "**sock|poll|bind", "**sock|poll|bind %d %d %s", port, errno, MPIR_Strerror (errno)); ++ MPIR_ERR_CHKANDJUMP3(errno != EADDRINUSE && ++ errno != EADDRNOTAVAIL, mpi_errno, MPI_ERR_OTHER, "**sock|poll|bind", ++ "**sock|poll|bind %d %d %s", port, errno, MPIR_Strerror(errno)); + } + /* check if an available port was found */ +- MPIR_ERR_CHKANDJUMP3 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**sock|poll|bind", "**sock|poll|bind %d %d %s", port-1, errno, MPIR_Strerror (errno)); ++ MPIR_ERR_CHKANDJUMP3(ret == -1, mpi_errno, MPI_ERR_OTHER, "**sock|poll|bind", ++ "**sock|poll|bind %d %d %s", port - 1, errno, MPIR_Strerror(errno)); + +- fn_exit: ++ fn_exit: + /* if (ret == 0) */ + /* fprintf(stdout, "sockfd=%d port=%d bound\n", sockfd, port); */ +-/* fprintf(stdout, FCNAME " Exit\n"); fflush(stdout); */ ++/* fprintf(stdout, __func__ " Exit\n"); fflush(stdout); */ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_BIND); + return mpi_errno; +- fn_fail: ++ fn_fail: + /* fprintf(stdout, "failure. mpi_errno = %d\n", mpi_errno); */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_vc_terminate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_vc_terminate(MPIDI_VC_t *vc) ++int MPID_nem_tcp_vc_terminate(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + int req_errno = MPI_SUCCESS; +@@ -676,67 +676,66 @@ int MPID_nem_tcp_vc_terminate(MPIDI_VC_t *vc) + + if (vc->state != MPIDI_VC_STATE_CLOSED) { + /* VC is terminated as a result of a fault. Complete +- outstanding sends with an error and terminate +- connection immediately. */ +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); ++ * outstanding sends with an error and terminate ++ * connection immediately. */ ++ MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", ++ vc->pg_rank); + mpi_errno = MPID_nem_tcp_error_out_send_queue(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + mpi_errno = MPID_nem_tcp_vc_terminated(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } else { + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); + /* VC is terminated as a result of the close protocol. +- Wait for sends to complete, then terminate. */ ++ * Wait for sends to complete, then terminate. */ + + if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { + /* The sendq is empty, so we can immediately terminate +- the connection. */ ++ * the connection. */ + mpi_errno = MPID_nem_tcp_vc_terminated(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + /* else: just return. We'll call vc_terminated() from the +- commrdy_handler once the sendq is empty. */ ++ * commrdy_handler once the sendq is empty. */ + } + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_VC_TERMINATE); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_vc_terminated +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_vc_terminated(MPIDI_VC_t *vc) ++int MPID_nem_tcp_vc_terminated(MPIDI_VC_t * vc) + { + /* This is called when the VC is to be terminated once all queued +- sends have been sent. */ ++ * sends have been sent. */ + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_NEM_TCP_VC_TERMINATED); + + MPIR_FUNC_VERBOSE_ENTER(MPID_NEM_TCP_VC_TERMINATED); + + mpi_errno = MPID_nem_tcp_cleanup(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + mpi_errno = MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED); +- if(mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_NEM_TCP_VC_TERMINATED); + return mpi_errno; +- fn_fail: +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); ++ fn_fail: ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "failure. mpi_errno = %d", mpi_errno)); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_get_ordering +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_get_ordering(int *ordering) + { + (*ordering) = 1; +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_queue.h ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_queue.h +@@ -11,8 +11,8 @@ + the next pointer field in the element (e.g., "ch.tcp_sendq_next") */ + + #define PRINT_QUEUE(qp, next_field) do { \ +- } while(0) +- ++ } while (0) ++ + + #define GENERIC_Q_EMPTY(q) ((q).head == NULL) + +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c +@@ -9,16 +9,18 @@ + #define NUM_PREALLOC_SENDQ 10 + #define MAX_SEND_IOV 10 + +-typedef struct MPID_nem_tcp_send_q_element +-{ ++typedef struct MPID_nem_tcp_send_q_element { + struct MPID_nem_tcp_send_q_element *next; +- size_t len; /* number of bytes left to send */ +- char *start; /* pointer to next byte to send */ ++ size_t len; /* number of bytes left to send */ ++ char *start; /* pointer to next byte to send */ + MPID_nem_cell_ptr_t cell; +- /* char buf[MPID_NEM_MAX_PACKET_LEN];*/ /* data to be sent */ ++ /* char buf[MPID_NEM_MAX_PACKET_LEN]; *//* data to be sent */ + } MPID_nem_tcp_send_q_element_t; + +-static struct {MPID_nem_tcp_send_q_element_t *top;} free_buffers = {0}; ++static struct { ++ MPID_nem_tcp_send_q_element_t *top; ++} free_buffers = { ++0}; + + #define ALLOC_Q_ELEMENT(e) do { \ + if (S_EMPTY (free_buffers)) \ +@@ -36,38 +38,30 @@ static struct {MPID_nem_tcp_send_q_element_t *top;} free_buffers = {0}; + #define FREE_Q_ELEMENTS(e0, e1) S_PUSH_MULTIPLE (&free_buffers, e0, e1) + #define FREE_Q_ELEMENT(e) S_PUSH (&free_buffers, e) + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_send_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_send_init(void) + { + int mpi_errno = MPI_SUCCESS; + int i; +- MPIR_CHKPMEM_DECL (NUM_PREALLOC_SENDQ); +- ++ MPIR_CHKPMEM_DECL(NUM_PREALLOC_SENDQ); ++ + /* preallocate sendq elements */ +- for (i = 0; i < NUM_PREALLOC_SENDQ; ++i) +- { ++ for (i = 0; i < NUM_PREALLOC_SENDQ; ++i) { + MPID_nem_tcp_send_q_element_t *e; +- +- MPIR_CHKPMEM_MALLOC (e, MPID_nem_tcp_send_q_element_t *, +- sizeof(MPID_nem_tcp_send_q_element_t), mpi_errno, "send queue element", MPL_MEM_BUFFER); +- S_PUSH (&free_buffers, e); ++ ++ MPIR_CHKPMEM_MALLOC(e, MPID_nem_tcp_send_q_element_t *, ++ sizeof(MPID_nem_tcp_send_q_element_t), mpi_errno, "send queue element", ++ MPL_MEM_BUFFER); ++ S_PUSH(&free_buffers, e); + } + + MPIR_CHKPMEM_COMMIT(); + return mpi_errno; +- fn_fail: ++ fn_fail: + MPIR_CHKPMEM_REAP(); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_send_queued +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send_queue) ++int MPID_nem_tcp_send_queued(MPIDI_VC_t * vc, MPIDI_nem_tcp_request_queue_t * send_queue) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq; +@@ -83,49 +77,50 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send + MPIR_Assert(vc != NULL); + + if (MPIDI_CH3I_Sendq_empty(*send_queue)) +- goto fn_exit; ++ goto fn_exit; + +- while (!MPIDI_CH3I_Sendq_empty(*send_queue)) +- { ++ while (!MPIDI_CH3I_Sendq_empty(*send_queue)) { + sreq = MPIDI_CH3I_Sendq_head(*send_queue); + MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Sending %p", sreq); + + iov = &sreq->dev.iov[sreq->dev.iov_offset]; +- ++ + offset = MPL_large_writev(vc_tcp->sc->fd, iov, sreq->dev.iov_count); + if (offset == 0) { + int req_errno = MPI_SUCCESS; + + MPIR_ERR_SET(req_errno, MPI_ERR_OTHER, "**sock_closed"); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); ++ MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", ++ vc->pg_rank); + mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_exit; /* this vc is closed now, just bail out */ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; /* this vc is closed now, just bail out */ + } +- if (offset == -1) +- { +- if (errno == EAGAIN) +- { ++ if (offset == -1) { ++ if (errno == EAGAIN) { + offset = 0; + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "EAGAIN"); + break; + } else { + int req_errno = MPI_SUCCESS; +- MPIR_ERR_SET1(req_errno, MPI_ERR_OTHER, "**writev", "**writev %s", MPIR_Strerror(errno)); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); ++ MPIR_ERR_SET1(req_errno, MPI_ERR_OTHER, "**writev", "**writev %s", ++ MPIR_Strerror(errno)); ++ MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", ++ vc->pg_rank); + mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_exit; /* this vc is closed now, just bail out */ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; /* this vc is closed now, just bail out */ + } + } + MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset); + + complete = 1; +- for (iov = &sreq->dev.iov[sreq->dev.iov_offset]; iov < &sreq->dev.iov[sreq->dev.iov_offset + sreq->dev.iov_count]; ++iov) +- { +- if (offset < iov->MPL_IOV_LEN) +- { +- iov->MPL_IOV_BUF = (char *)iov->MPL_IOV_BUF + offset; ++ for (iov = &sreq->dev.iov[sreq->dev.iov_offset]; ++ iov < &sreq->dev.iov[sreq->dev.iov_offset + sreq->dev.iov_count]; ++iov) { ++ if (offset < iov->MPL_IOV_LEN) { ++ iov->MPL_IOV_BUF = (char *) iov->MPL_IOV_BUF + offset; + iov->MPL_IOV_LEN -= offset; + /* iov_count should be equal to the number of iov's remaining */ + sreq->dev.iov_count -= ((iov - sreq->dev.iov) - sreq->dev.iov_offset); +@@ -135,19 +130,15 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send + } + offset -= iov->MPL_IOV_LEN; + } +- if (!complete) +- { ++ if (!complete) { + /* writev couldn't write the entire iov, give up for now */ + break; +- } +- else +- { ++ } else { + /* sent whole message */ +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); ++ int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); + + reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) +- { ++ if (!reqFn) { + MPIR_Assert(MPIDI_Request_get_type(sreq) != MPIDI_REQUEST_TYPE_GET_RESP); + mpi_errno = MPID_Request_complete(sreq); + if (mpi_errno != MPI_SUCCESS) { +@@ -160,10 +151,10 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send + + complete = 0; + mpi_errno = reqFn(vc, sreq, &complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- if (complete) +- { ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (complete) { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); + MPIDI_CH3I_Sendq_dequeue(send_queue, &sreq); + continue; +@@ -174,38 +165,29 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send + + if (MPIDI_CH3I_Sendq_empty(*send_queue)) + UNSET_PLFD(vc_tcp); +- +-fn_exit: ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_SEND_QUEUED); + return mpi_errno; +-fn_fail: ++ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_send_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_send_finalize(void) + { + int mpi_errno = MPI_SUCCESS; + +- while (!S_EMPTY (free_buffers)) +- { ++ while (!S_EMPTY(free_buffers)) { + MPID_nem_tcp_send_q_element_t *e; +- S_POP (&free_buffers, &e); +- MPL_free (e); ++ S_POP(&free_buffers, &e); ++ MPL_free(e); + } + return mpi_errno; + } + + /* MPID_nem_tcp_conn_est -- this function is called when the + connection is finally established to send any pending sends */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_conn_est +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_conn_est (MPIDI_VC_t *vc) ++int MPID_nem_tcp_conn_est(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); +@@ -219,316 +201,315 @@ int MPID_nem_tcp_conn_est (MPIDI_VC_t *vc) + if (vc->state == MPIDI_VC_STATE_INACTIVE) + MPIDI_CHANGE_VC_STATE(vc, ACTIVE); + +- if (!MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) +- { ++ if (!MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { + SET_PLFD(vc_tcp); + mpi_errno = MPID_nem_tcp_send_queued(vc, &vc_tcp->send_queue); +- if (mpi_errno) MPIR_ERR_POP (mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + +- fn_fail: ++ fn_fail: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_CONN_EST); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_iStartContigMsg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz, +- MPIR_Request **sreq_ptr) ++/* Common routine that transfers iovs and handles any failure. ++ * Called by sending functions. */ ++static inline int tcp_large_writev(MPIDI_VC_t * vc, const MPL_IOV * iov, int iov_n, ++ intptr_t * offset_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); ++ ++ *offset_ptr = MPL_large_writev(vc_tcp->sc->fd, iov, iov_n); ++ if (*offset_ptr == 0) { ++ int req_errno = MPI_SUCCESS; ++ MPIR_ERR_SET(req_errno, MPI_ERR_OTHER, "**sock_closed"); ++ MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", ++ vc->pg_rank); ++ mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_fail; ++ } ++ if (*offset_ptr == -1) { ++ if (errno == EAGAIN) ++ *offset_ptr = 0; ++ else { ++ int req_errno = MPI_SUCCESS; ++ MPIR_ERR_SET1(req_errno, MPI_ERR_OTHER, "**writev", "**writev %s", ++ MPIR_Strerror(errno)); ++ MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", ++ "**comm_fail %d", vc->pg_rank); ++ mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_fail; ++ } ++ } ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Common routine that completes finished send request. ++ * Called by sending functions. */ ++static inline int tcp_complete_sreq(MPIDI_VC_t * vc, MPIR_Request * sreq, int *complete_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); ++ ++ reqFn = sreq->dev.OnDataAvail; ++ if (!reqFn) { ++ MPIR_Assert(MPIDI_Request_get_type(sreq) != MPIDI_REQUEST_TYPE_GET_RESP); ++ mpi_errno = MPID_Request_complete(sreq); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ *complete_ptr = 1; ++ } else { ++ *complete_ptr = 0; ++ mpi_errno = reqFn(vc, sreq, complete_ptr); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Common routine that enqueues unfinished send request. ++ * Called by sending functions. If paused_send is true, always enqueue into ++ * send_queue even if the vc is in a paused state. */ ++static inline int tcp_enqueue_sreq(MPIDI_VC_t * vc, MPIR_Request * sreq, bool paused_send) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_Request * sreq = NULL; ++ MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); ++ ++ MPIR_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0); ++ ++ if (!paused_send && MPID_nem_tcp_vc_send_paused(vc_tcp)) { ++ MPIDI_CH3I_Sendq_enqueue(&vc_tcp->paused_send_queue, sreq); ++ } else { ++ if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { ++ if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { ++ /* this will be the first send on the queue: queue it and set the write flag on the pollfd */ ++ MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); ++ SET_PLFD(vc_tcp); ++ } else { ++ /* there are other sends in the queue before this one: try to send from the queue */ ++ MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); ++ mpi_errno = MPID_nem_tcp_send_queued(vc, &vc_tcp->send_queue); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } else { ++ MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); ++ } ++ } ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data, ++ intptr_t data_sz, MPIR_Request ** sreq_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *sreq = NULL; + intptr_t offset = 0; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); +- sockconn_t *sc = vc_tcp->sc; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG); +- ++ + MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- ++ + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "tcp_iStartContigMsg"); +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)hdr); ++ MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr); + + if (!MPID_nem_tcp_vc_send_paused(vc_tcp)) { +- if (MPID_nem_tcp_vc_is_connected(vc_tcp)) +- { +- if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) +- { ++ if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { ++ if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { + MPL_IOV iov[2]; +- ++ + iov[0].MPL_IOV_BUF = hdr; + iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); + iov[1].MPL_IOV_BUF = data; + iov[1].MPL_IOV_LEN = data_sz; +- +- offset = MPL_large_writev(sc->fd, iov, 2); +- if (offset == 0) { +- int req_errno = MPI_SUCCESS; +- +- MPIR_ERR_SET(req_errno, MPI_ERR_OTHER, "**sock_closed"); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_fail; +- } +- if (offset == -1) +- { +- if (errno == EAGAIN) +- offset = 0; +- else { +- int req_errno = MPI_SUCCESS; +- MPIR_ERR_SET1(req_errno, MPI_ERR_OTHER, "**writev", "**writev %s", MPIR_Strerror(errno)); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_fail; +- } +- } ++ ++ mpi_errno = tcp_large_writev(vc, iov, 2, &offset); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset); +- +- if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) +- { ++ ++ if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) { + /* sent whole message */ + *sreq_ptr = NULL; + goto fn_exit; + } + } +- } +- else +- { ++ } else { + /* state may be DISCONNECTED or ERROR. Calling tcp_connect in an ERROR state will return an +- appropriate error code. */ ++ * appropriate error code. */ + mpi_errno = MPID_nem_tcp_connect(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + } + + /* create and enqueue request */ +- MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); + + /* create a request */ + sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- MPIR_Assert (sreq != NULL); +- MPIR_Object_set_ref (sreq, 2); ++ MPIR_Assert(sreq != NULL); ++ MPIR_Object_set_ref(sreq, 2); + + sreq->dev.OnDataAvail = 0; + sreq->ch.vc = vc; + sreq->dev.iov_offset = 0; + +- if (offset < sizeof(MPIDI_CH3_Pkt_t)) +- { +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; +- sreq->dev.iov[0].MPL_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset; +- sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ; +- if (data_sz) +- { ++ if (offset < sizeof(MPIDI_CH3_Pkt_t)) { ++ sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; ++ sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt + offset; ++ sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset; ++ if (data_sz) { + sreq->dev.iov[1].MPL_IOV_BUF = data; + sreq->dev.iov[1].MPL_IOV_LEN = data_sz; + sreq->dev.iov_count = 2; +- } +- else ++ } else + sreq->dev.iov_count = 1; +- } +- else +- { +- sreq->dev.iov[0].MPL_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t)); ++ } else { ++ sreq->dev.iov[0].MPL_IOV_BUF = (char *) data + (offset - sizeof(MPIDI_CH3_Pkt_t)); + sreq->dev.iov[0].MPL_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t)); + sreq->dev.iov_count = 1; + } +- +- MPIR_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0); + +- if (MPID_nem_tcp_vc_send_paused(vc_tcp)) { +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->paused_send_queue, sreq); +- } else { +- if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { +- if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { +- /* this will be the first send on the queue: queue it and set the write flag on the pollfd */ +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- SET_PLFD(vc_tcp); +- } else { +- /* there are other sends in the queue before this one: try to send from the queue */ +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- mpi_errno = MPID_nem_tcp_send_queued(vc, &vc_tcp->send_queue); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- } else { +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- } +- } +- ++ mpi_errno = tcp_enqueue_sreq(vc, sreq, false); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + *sreq_ptr = sreq; +- +-fn_exit: ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG); + return mpi_errno; +-fn_fail: ++ fn_fail: + goto fn_exit; + } + + /* This sends the message even if the vc is in a paused state */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_iStartContigMsg_paused +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz, +- MPIR_Request **sreq_ptr) ++int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data, ++ intptr_t data_sz, MPIR_Request ** sreq_ptr) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_Request * sreq = NULL; ++ MPIR_Request *sreq = NULL; + intptr_t offset = 0; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); +- sockconn_t *sc = vc_tcp->sc; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG_PAUSED); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG_PAUSED); +- ++ + MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- ++ + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "tcp_iStartContigMsg"); +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)hdr); ++ MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr); + +- if (MPID_nem_tcp_vc_is_connected(vc_tcp)) +- { +- if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) +- { ++ if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { ++ if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { + MPL_IOV iov[2]; +- ++ + iov[0].MPL_IOV_BUF = hdr; + iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); + iov[1].MPL_IOV_BUF = data; + iov[1].MPL_IOV_LEN = data_sz; +- +- offset = MPL_large_writev(sc->fd, iov, 2); +- if (offset == 0) { +- int req_errno = MPI_SUCCESS; + +- MPIR_ERR_SET(req_errno, MPI_ERR_OTHER, "**sock_closed"); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_fail; +- } +- if (offset == -1) +- { +- if (errno == EAGAIN) +- offset = 0; +- else { +- int req_errno = MPI_SUCCESS; +- MPIR_ERR_SET1(req_errno, MPI_ERR_OTHER, "**writev", "**writev %s", MPIR_Strerror(errno)); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- +- mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_fail; +- } +- } ++ mpi_errno = tcp_large_writev(vc, iov, 2, &offset); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset); +- +- if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) +- { ++ ++ if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) { + /* sent whole message */ + *sreq_ptr = NULL; + goto fn_exit; + } + } +- } +- else +- { ++ } else { + /* state may be DISCONNECTED or ERROR. Calling tcp_connect in an ERROR state will return an +- appropriate error code. */ ++ * appropriate error code. */ + mpi_errno = MPID_nem_tcp_connect(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + + /* create and enqueue request */ +- MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); + + /* create a request */ + sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- MPIR_Assert (sreq != NULL); +- MPIR_Object_set_ref (sreq, 2); ++ MPIR_Assert(sreq != NULL); ++ MPIR_Object_set_ref(sreq, 2); + + sreq->dev.OnDataAvail = 0; + sreq->ch.vc = vc; + sreq->dev.iov_offset = 0; + +- if (offset < sizeof(MPIDI_CH3_Pkt_t)) +- { +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; +- sreq->dev.iov[0].MPL_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset; +- sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ; +- if (data_sz) +- { ++ if (offset < sizeof(MPIDI_CH3_Pkt_t)) { ++ sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; ++ sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt + offset; ++ sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset; ++ if (data_sz) { + sreq->dev.iov[1].MPL_IOV_BUF = data; + sreq->dev.iov[1].MPL_IOV_LEN = data_sz; + sreq->dev.iov_count = 2; +- } +- else ++ } else + sreq->dev.iov_count = 1; +- } +- else +- { +- sreq->dev.iov[0].MPL_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t)); ++ } else { ++ sreq->dev.iov[0].MPL_IOV_BUF = (char *) data + (offset - sizeof(MPIDI_CH3_Pkt_t)); + sreq->dev.iov[0].MPL_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t)); + sreq->dev.iov_count = 1; + } +- +- MPIR_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0); + +- if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { +- if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { +- /* this will be the first send on the queue: queue it and set the write flag on the pollfd */ +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- SET_PLFD(vc_tcp); +- } else { +- /* there are other sends in the queue before this one: try to send from the queue */ +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- mpi_errno = MPID_nem_tcp_send_queued(vc, &vc_tcp->send_queue); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- } else { +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- } +- ++ mpi_errno = tcp_enqueue_sreq(vc, sreq, true); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ + *sreq_ptr = sreq; +- +-fn_exit: ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG_PAUSED); + return mpi_errno; +-fn_fail: ++ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_iSendContig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz, ++int MPID_nem_tcp_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, + void *data, intptr_t data_sz) + { + int mpi_errno = MPI_SUCCESS; + intptr_t offset = 0; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); +- sockconn_t *sc = vc_tcp->sc; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISENDCONTIGMSG); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_ISENDCONTIGMSG); +- ++ + MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); +- ++ + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "tcp_iSendContig"); + +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)hdr); ++ MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr); + + if (!MPID_nem_tcp_vc_send_paused(vc_tcp)) { +- if (MPID_nem_tcp_vc_is_connected(vc_tcp)) +- { +- if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) +- { ++ if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { ++ if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { + MPL_IOV iov[3]; + int iov_n = 0; + +@@ -536,168 +517,183 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intp + iov[iov_n].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); + iov_n++; + +- if (sreq->dev.ext_hdr_sz != 0) { +- iov[iov_n].MPL_IOV_BUF = sreq->dev.ext_hdr_ptr; +- iov[iov_n].MPL_IOV_LEN = sreq->dev.ext_hdr_sz; +- iov_n++; +- } +- + iov[iov_n].MPL_IOV_BUF = data; + iov[iov_n].MPL_IOV_LEN = data_sz; + iov_n++; +- +- offset = MPL_large_writev(sc->fd, iov, iov_n); +- if (offset == 0) { +- int req_errno = MPI_SUCCESS; +- +- MPIR_ERR_SET(req_errno, MPI_ERR_OTHER, "**sock_closed"); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_fail; +- } +- if (offset == -1) +- { +- if (errno == EAGAIN) +- offset = 0; +- else { +- int req_errno = MPI_SUCCESS; +- MPIR_ERR_SET1(req_errno, MPI_ERR_OTHER, "**writev", "**writev %s", MPIR_Strerror(errno)); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_fail; +- } +- } ++ ++ mpi_errno = tcp_large_writev(vc, iov, iov_n, &offset); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset); +- +- if (offset == sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz + data_sz) +- { +- /* sent whole message */ +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- +- reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) +- { +- MPIR_Assert(MPIDI_Request_get_type(sreq) != MPIDI_REQUEST_TYPE_GET_RESP); +- mpi_errno = MPID_Request_complete(sreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } ++ ++ if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) { ++ /* sent whole message, complete request */ ++ int complete = 0; ++ mpi_errno = tcp_complete_sreq(vc, sreq, &complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ if (complete) { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); + goto fn_exit; +- } +- else +- { +- int complete = 0; +- +- mpi_errno = reqFn(vc, sreq, &complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- if (complete) +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- goto fn_exit; +- } +- +- /* not completed: more to send */ +- goto enqueue_request; +- } ++ } else ++ goto enqueue_request; /* not completed: more to send */ + } + } +- } +- else +- { ++ } else { + /* state may be DISCONNECTED or ERROR. Calling tcp_connect in an ERROR state will return an +- appropriate error code. */ ++ * appropriate error code. */ + mpi_errno = MPID_nem_tcp_connect(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + } + + + /* save iov */ + sreq->dev.iov_count = 0; +- if (offset < sizeof(MPIDI_CH3_Pkt_t)) +- { +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; ++ if (offset < sizeof(MPIDI_CH3_Pkt_t)) { ++ sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; + +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset; ++ sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt + offset; + sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset; + sreq->dev.iov_count++; + +- if (sreq->dev.ext_hdr_sz > 0) { +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = sreq->dev.ext_hdr_ptr; +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = sreq->dev.ext_hdr_sz; +- sreq->dev.iov_count++; +- } +- +- if (data_sz) +- { +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = data; +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = data_sz; +- sreq->dev.iov_count++; +- } +- } +- else if (offset < sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz) { +- MPIR_Assert(sreq->dev.ext_hdr_sz > 0); +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = sreq->dev.ext_hdr_ptr; +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = sreq->dev.ext_hdr_sz; +- sreq->dev.iov_count++; +- + if (data_sz) { + sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = data; + sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = data_sz; + sreq->dev.iov_count++; + } +- } +- else +- { +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t) - sreq->dev.ext_hdr_sz); +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t) - sreq->dev.ext_hdr_sz); ++ } else { ++ sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = ++ (char *) data + (offset - sizeof(MPIDI_CH3_Pkt_t)); ++ sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = ++ data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t)); + sreq->dev.iov_count++; + } + +-enqueue_request: ++ enqueue_request: + /* enqueue request */ +- MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); +- MPIR_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0); +- ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); + sreq->ch.vc = vc; + sreq->dev.iov_offset = 0; + +- if (MPID_nem_tcp_vc_send_paused(vc_tcp)) { +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->paused_send_queue, sreq); +- } else { ++ mpi_errno = tcp_enqueue_sreq(vc, sreq, false); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_ISENDCONTIGMSG); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++int MPID_nem_tcp_iSendIov(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, ++ MPL_IOV * iov, int n_iov) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ intptr_t offset = 0, data_sz = 0; ++ MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISENDIOV); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_ISENDIOV); ++ ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "tcp_iSendIov"); ++ ++ if (!MPID_nem_tcp_vc_send_paused(vc_tcp)) { + if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { + if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { +- /* this will be the first send on the queue: queue it and set the write flag on the pollfd */ +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- SET_PLFD(vc_tcp); +- } else { +- /* there are other sends in the queue before this one: try to send from the queue */ +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- mpi_errno = MPID_nem_tcp_send_queued(vc, &vc_tcp->send_queue); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ MPL_IOV tcp_iov[MPL_IOV_LIMIT]; ++ int tcp_iov_n = 1 + n_iov; ++ ++ MPIR_Assert(tcp_iov_n >= 0 && tcp_iov_n < MPL_IOV_LIMIT); ++ ++ /* Merge header into iov */ ++ tcp_iov[0].MPL_IOV_BUF = hdr; ++ tcp_iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); ++ for (i = 0; i < n_iov; i++) { ++ tcp_iov[i + 1].MPL_IOV_BUF = iov[i].MPL_IOV_BUF; ++ tcp_iov[i + 1].MPL_IOV_LEN = iov[i].MPL_IOV_LEN; ++ data_sz += iov[i].MPL_IOV_LEN; ++ } ++ ++ mpi_errno = tcp_large_writev(vc, tcp_iov, tcp_iov_n, &offset); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset); ++ ++ if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) { ++ /* sent whole message, complete request */ ++ int complete = 0; ++ mpi_errno = tcp_complete_sreq(vc, sreq, &complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ if (complete) { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); ++ goto fn_exit; ++ } else ++ goto enqueue_request; /* not completed: more to send */ ++ } + } + } else { +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); ++ /* state may be DISCONNECTED or ERROR. Calling tcp_connect in an ERROR state will return an ++ * appropriate error code. */ ++ mpi_errno = MPID_nem_tcp_connect(vc); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + } +- +-fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_ISENDCONTIGMSG); ++ ++ if (offset < sizeof(MPIDI_CH3_Pkt_t)) { ++ /* save pending header */ ++ sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; ++ sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt + offset; ++ sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset; ++ sreq->dev.iov_count = 1; ++ ++ /* save whole iov */ ++ if (n_iov > 0) { ++ sreq->dev.iov_count += n_iov; ++ for (i = 0; i < n_iov; i++) { ++ sreq->dev.iov[i + 1].MPL_IOV_BUF = iov[i].MPL_IOV_BUF; ++ sreq->dev.iov[i + 1].MPL_IOV_LEN = iov[i].MPL_IOV_LEN; ++ } ++ } ++ } else { ++ /* header has sent out, save any unsent portion of iov */ ++ sreq->dev.iov_count = 0; ++ offset -= sizeof(MPIDI_CH3_Pkt_t); ++ for (i = 0; i < n_iov; i++) { ++ if (offset < iov[i].MPL_IOV_LEN) { /* unsent iov starts */ ++ sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = ++ (MPL_IOV_BUF_CAST) ((char *) iov[i].MPL_IOV_BUF + offset); ++ sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = iov[i].MPL_IOV_LEN - offset; ++ offset = 0; ++ sreq->dev.iov_count++; ++ } else ++ offset -= iov[i].MPL_IOV_LEN; /* sent iov */ ++ } ++ } ++ ++ enqueue_request: ++ /* enqueue request */ ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); ++ sreq->ch.vc = vc; ++ sreq->dev.iov_offset = 0; ++ ++ mpi_errno = tcp_enqueue_sreq(vc, sreq, false); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_ISENDIOV); + return mpi_errno; +-fn_fail: ++ fn_fail: + goto fn_exit; + } + +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_SendNoncontig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz) ++int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *header, intptr_t hdr_sz, ++ MPL_IOV * hdr_iov, int n_hdr_iov) + { + int mpi_errno = MPI_SUCCESS; + int iov_n; +@@ -719,10 +715,16 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, + iov[iov_n].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); + iov_n++; + +- if (sreq->dev.ext_hdr_ptr != NULL) { +- iov[iov_n].MPL_IOV_BUF = sreq->dev.ext_hdr_ptr; +- iov[iov_n].MPL_IOV_LEN = sreq->dev.ext_hdr_sz; +- iov_n++; ++ if (n_hdr_iov > 0) { ++ int i; ++ /* merge extended header iovs into iov array. ++ * ensure at least 1 iov is left for data. */ ++ MPIR_Assert(MPL_IOV_LIMIT - iov_n - n_hdr_iov > 0); ++ for (i = 0; i < n_hdr_iov; i++) { ++ iov[iov_n].MPL_IOV_BUF = hdr_iov[i].MPL_IOV_BUF; ++ iov[iov_n].MPL_IOV_LEN = hdr_iov[i].MPL_IOV_LEN; ++ iov_n++; ++ } + } + + iov_offset = iov_n; +@@ -734,136 +736,74 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, + offset = 0; + + if (!MPID_nem_tcp_vc_send_paused(vc_tcp)) { +- if (MPID_nem_tcp_vc_is_connected(vc_tcp)) +- { +- if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) +- { +- offset = MPL_large_writev(vc_tcp->sc->fd, iov, iov_n); +- if (offset == 0) { +- int req_errno = MPI_SUCCESS; +- +- MPIR_ERR_SET(req_errno, MPI_ERR_OTHER, "**sock_closed"); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_fail; +- } +- if (offset == -1) +- { +- if (errno == EAGAIN) +- offset = 0; +- else { +- int req_errno = MPI_SUCCESS; +- MPIR_ERR_SET1(req_errno, MPI_ERR_OTHER, "**writev", "**writev %s", MPIR_Strerror(errno)); +- MPIR_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank); +- mpi_errno = MPID_nem_tcp_cleanup_on_error(vc, req_errno); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- goto fn_fail; +- } +- } +- ++ if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { ++ if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { ++ mpi_errno = tcp_large_writev(vc, iov, iov_n, &offset); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write noncontig %" PRIdPTR, offset); + } +- } +- else +- { ++ } else { + /* state may be DISCONNECTED or ERROR. Calling tcp_connect in an ERROR state will return an +- appropriate error code. */ ++ * appropriate error code. */ + mpi_errno = MPID_nem_tcp_connect(vc); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + } +- +- if (offset < iov[0].MPL_IOV_LEN) +- { ++ ++ if (offset < iov[0].MPL_IOV_LEN) { + /* header was not yet sent, save it in req */ +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header; +- iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)&sreq->dev.pending_pkt; ++ sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) header; ++ iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt; + iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); + } + + /* check if whole iov was sent, and save any unsent portion of iov */ + sreq->dev.iov_count = 0; + complete = 1; +- for (iov_p = &iov[0]; iov_p < &iov[iov_n]; ++iov_p) +- { +- if (offset < iov_p->MPL_IOV_LEN) +- { +- sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)((char *)iov_p->MPL_IOV_BUF + offset); ++ for (iov_p = &iov[0]; iov_p < &iov[iov_n]; ++iov_p) { ++ if (offset < iov_p->MPL_IOV_LEN) { ++ sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = ++ (MPL_IOV_BUF_CAST) ((char *) iov_p->MPL_IOV_BUF + offset); + sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = iov_p->MPL_IOV_LEN - offset; + offset = 0; + ++sreq->dev.iov_count; + complete = 0; +- } +- else ++ } else + offset -= iov_p->MPL_IOV_LEN; + } +- +- if (complete) +- { +- /* sent whole iov */ +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- +- reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) +- { +- mpi_errno = MPID_Request_complete(sreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- goto fn_exit; +- } + +- complete = 0; +- mpi_errno = reqFn(vc, sreq, &complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- if (complete) +- { ++ if (complete) { ++ /* sent whole iov, complete request */ ++ int req_complete = 0; ++ mpi_errno = tcp_complete_sreq(vc, sreq, &req_complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (req_complete) { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); + goto fn_exit; + } + } +- ++ + /* enqueue request */ +- MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); +- MPIR_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0); +- ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing"); + sreq->ch.vc = vc; + sreq->dev.iov_offset = 0; +- +- if (MPID_nem_tcp_vc_send_paused(vc_tcp)) { +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->paused_send_queue, sreq); +- } else { +- if (MPID_nem_tcp_vc_is_connected(vc_tcp)) { +- if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { +- /* this will be the first send on the queue: queue it and set the write flag on the pollfd */ +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- SET_PLFD(vc_tcp); +- } else { +- /* there are other sends in the queue before this one: try to send from the queue */ +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- mpi_errno = MPID_nem_tcp_send_queued(vc, &vc_tcp->send_queue); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- } else { +- MPIDI_CH3I_Sendq_enqueue(&vc_tcp->send_queue, sreq); +- } +- } +- +-fn_exit: ++ ++ mpi_errno = tcp_enqueue_sreq(vc, sreq, false); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_SENDNONCONTIG); + return mpi_errno; +-fn_fail: ++ fn_fail: + MPIR_Request_free(sreq); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_error_out_send_queue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_error_out_send_queue(struct MPIDI_VC *const vc, int req_errno) + { + int mpi_errno = MPI_SUCCESS; +@@ -874,7 +814,7 @@ int MPID_nem_tcp_error_out_send_queue(struct MPIDI_VC *const vc, int req_errno) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_ERROR_OUT_SEND_QUEUE); + + /* we don't call onDataAvail or onFinal handlers because this is +- an error condition and we just want to mark them as complete */ ++ * an error condition and we just want to mark them as complete */ + + /* send queue */ + while (!MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) { +@@ -898,9 +838,9 @@ int MPID_nem_tcp_error_out_send_queue(struct MPIDI_VC *const vc, int req_errno) + } + } + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_ERROR_OUT_SEND_QUEUE); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } +--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c ++++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c +@@ -11,29 +11,22 @@ + the remote process associated with this VC. [NOTE: I'm not sure + yet, if the pg_id parameters will be char* or char**. I'd like to + avoid a copy on this.] */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_get_conninfo +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_get_conninfo (struct MPIDI_VC *vc, struct sockaddr_in *addr, char **pg_id, int *pg_rank) ++int MPID_nem_tcp_get_conninfo(struct MPIDI_VC *vc, struct sockaddr_in *addr, char **pg_id, ++ int *pg_rank) + { + int mpi_errno = MPI_SUCCESS; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); + + *addr = vc_tcp->sock_id; +- *pg_id = (char *)vc->pg->id; ++ *pg_id = (char *) vc->pg->id; + *pg_rank = vc->pg_rank; +- ++ + return mpi_errno; + } + + /* MPID_nem_tcp_get_vc_from_conninfo -- This function takes + the pg_id and pg_rank and returns the corresponding VC. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_get_vc_from_conninfo +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_get_vc_from_conninfo (char *pg_id, int pg_rank, struct MPIDI_VC **vc) ++int MPID_nem_tcp_get_vc_from_conninfo(char *pg_id, int pg_rank, struct MPIDI_VC **vc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_PG_t *pg; +@@ -41,58 +34,63 @@ int MPID_nem_tcp_get_vc_from_conninfo (char *pg_id, int pg_rank, struct MPIDI_VC + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_TCP_GET_VC_FROM_CONNINFO); + +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "pg_id=%s pg_rank=%d", pg_id, pg_rank)); +- +- mpi_errno = MPIDI_PG_Find (pg_id, &pg); +- if (mpi_errno) MPIR_ERR_POP (mpi_errno); ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "pg_id=%s pg_rank=%d", pg_id, pg_rank)); ++ ++ mpi_errno = MPIDI_PG_Find(pg_id, &pg); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + + MPIR_ERR_CHKINTERNAL(pg == NULL, mpi_errno, "invalid PG"); +- MPIR_ERR_CHKINTERNAL(pg_rank < 0 || pg_rank > MPIDI_PG_Get_size (pg), mpi_errno, "invalid pg_rank"); +- +- MPIDI_PG_Get_vc_set_active (pg, pg_rank, vc); +- +- fn_exit: ++ MPIR_ERR_CHKINTERNAL(pg_rank < 0 || ++ pg_rank > MPIDI_PG_Get_size(pg), mpi_errno, "invalid pg_rank"); ++ ++ MPIDI_PG_Get_vc_set_active(pg, pg_rank, vc); ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_TCP_GET_VC_FROM_CONNINFO); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME set_sockopts +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_tcp_set_sockopts (int fd) ++int MPID_nem_tcp_set_sockopts(int fd) + { + int mpi_errno = MPI_SUCCESS; + int option, flags; + int ret; + socklen_t len; + +-/* fprintf(stdout, FCNAME " Enter\n"); fflush(stdout); */ ++/* fprintf(stdout, __func__ " Enter\n"); fflush(stdout); */ + /* I heard you have to read the options after setting them in some implementations */ + + option = 1; + len = sizeof(int); +- ret = setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &option, len); +- MPIR_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIR_Strerror (errno), errno); +- ret = getsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &option, &len); +- MPIR_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIR_Strerror (errno), errno); ++ ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &option, len); ++ MPIR_ERR_CHKANDJUMP2(ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", ++ MPIR_Strerror(errno), errno); ++ ret = getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &option, &len); ++ MPIR_ERR_CHKANDJUMP2(ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", ++ MPIR_Strerror(errno), errno); + + flags = fcntl(fd, F_GETFL, 0); +- MPIR_ERR_CHKANDJUMP2 (flags == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIR_Strerror (errno), errno); ++ MPIR_ERR_CHKANDJUMP2(flags == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", ++ MPIR_Strerror(errno), errno); + ret = fcntl(fd, F_SETFL, flags | SO_REUSEADDR); +- MPIR_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIR_Strerror (errno), errno); +- ++ MPIR_ERR_CHKANDJUMP2(ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", ++ MPIR_Strerror(errno), errno); ++ + flags = fcntl(fd, F_GETFL, 0); +- MPIR_ERR_CHKANDJUMP2 (flags == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIR_Strerror (errno), errno); ++ MPIR_ERR_CHKANDJUMP2(flags == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", ++ MPIR_Strerror(errno), errno); + ret = fcntl(fd, F_SETFL, flags | O_NONBLOCK); +- MPIR_ERR_CHKANDJUMP2 (ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", MPIR_Strerror (errno), errno); ++ MPIR_ERR_CHKANDJUMP2(ret == -1, mpi_errno, MPI_ERR_OTHER, "**fail", "**fail %s %d", ++ MPIR_Strerror(errno), errno); + +- fn_exit: +-/* fprintf(stdout, FCNAME " Exit\n"); fflush(stdout); */ ++ fn_exit: ++/* fprintf(stdout, __func__ " Exit\n"); fflush(stdout); */ + return mpi_errno; +- fn_fail: ++ fn_fail: + /* fprintf(stdout, "failure. mpi_errno = %d\n", mpi_errno); */ + goto fn_exit; + } +@@ -113,7 +111,7 @@ there is an error in the socket or whether the peer has closed it (i.e we have r + EOF and hence recv returns 0). Either way, we deccide the socket fd is not usable any + more. So, same return code is used. + A design decision is not to write also, if the peer has closed the socket. Please note that +-write will still be succesful, even if the peer has sent us FIN. Only the subsequent ++write will still be succesful, even if the peer has sent us FIN. Only the subsequent + write will fail. So, this function is made tight enough and this should be called + before doing any read/write at least in the connection establishment state machine code. + +@@ -121,62 +119,53 @@ N3: return code MPID_NEM_TCP_SOCK_NOEVENT is used only by the code that wants to + know whether the connect is still not complete after a non-blocking connect is issued. + + TODO: Make this a macro for performance, if needed based on the usage. +-FIXME : Above comments are inconsistent now with the changes. No check for EOF is ++FIXME : Above comments are inconsistent now with the changes. No check for EOF is + actually done now in this function. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_check_sock_status +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPID_NEM_TCP_SOCK_STATUS_t +-MPID_nem_tcp_check_sock_status(const struct pollfd *const plfd) ++int MPID_nem_tcp_check_sock_status(const struct pollfd *const plfd) + { + int rc = MPID_NEM_TCP_SOCK_NOEVENT; + +- if (plfd->revents & POLLERR) +- { ++ if (plfd->revents & POLLERR) { + rc = MPID_NEM_TCP_SOCK_ERROR_EOF; + MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "POLLERR on socket")); + goto fn_exit; + } +- if (plfd->revents & POLLIN || plfd->revents & POLLOUT) +- { +- int error=0; ++ if (plfd->revents & POLLIN || plfd->revents & POLLOUT) { ++ int error = 0; + socklen_t n = sizeof(error); + + n = sizeof(error); +- if (getsockopt(plfd->fd, SOL_SOCKET, SO_ERROR, &error, &n) < 0 || error != 0) +- { +- rc = MPID_NEM_TCP_SOCK_ERROR_EOF; /* (N1) */ +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "getsockopt failure. error=%d:%s", error, MPIR_Strerror(error))); ++ if (getsockopt(plfd->fd, SOL_SOCKET, SO_ERROR, &error, &n) < 0 || error != 0) { ++ rc = MPID_NEM_TCP_SOCK_ERROR_EOF; /* (N1) */ ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "getsockopt failure. error=%d:%s", error, ++ MPIR_Strerror(error))); + goto fn_exit; + } + rc = MPID_NEM_TCP_SOCK_CONNECTED; + } +- fn_exit: ++ fn_exit: + return rc; + } + + /* + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_tcp_is_sock_connected +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_tcp_is_sock_connected(int fd) + { + int rc = FALSE; + char buf[1]; +- int buf_len = sizeof(buf)/sizeof(buf[0]), error=0; ++ int buf_len = sizeof(buf) / sizeof(buf[0]), error = 0; + size_t ret_recv; + socklen_t n = sizeof(error); + + n = sizeof(error); +- if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &n) < 0 || error != 0) +- { +- MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, (MPL_DBG_FDEST, "getsockopt failure. error=%d:%s", error, MPIR_Strerror(error))); +- rc = FALSE; /* error */ ++ if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &n) < 0 || error != 0) { ++ MPL_DBG_MSG_FMT(MPIDI_NEM_TCP_DBG_DET, VERBOSE, ++ (MPL_DBG_FDEST, "getsockopt failure. error=%d:%s", error, ++ MPIR_Strerror(error))); ++ rc = FALSE; /* error */ + goto fn_exit; + } + +@@ -185,37 +174,32 @@ int MPID_nem_tcp_is_sock_connected(int fd) + rc = FALSE; + else + rc = TRUE; +- fn_exit: ++ fn_exit: + return rc; + } + + + /* --BEGIN ERROR HANDLING-- */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_dbg_print_all_sendq +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPID_nem_tcp_vc_dbg_print_sendq(FILE *stream, MPIDI_VC_t *vc) ++void MPID_nem_tcp_vc_dbg_print_sendq(FILE * stream, MPIDI_VC_t * vc) + { + int i; + MPIR_Request *sreq; + MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc); + +- fprintf(stream, ".. sc=%p fd=%d vc_tcp->state=%d\n", vc_tcp->sc, (vc_tcp->sc ? vc_tcp->sc->fd : -1), vc_tcp->state); ++ fprintf(stream, ".. sc=%p fd=%d vc_tcp->state=%d\n", vc_tcp->sc, ++ (vc_tcp->sc ? vc_tcp->sc->fd : -1), vc_tcp->state); + + /* This function violates any abstraction in the queues, since there's no +- good way to print them without inspecting the internals. */ ++ * good way to print them without inspecting the internals. */ + sreq = vc_tcp->send_queue.head; + i = 0; +- while (sreq) +- { ++ while (sreq) { + fprintf(stream, "....[%d] sreq=%p ctx=%#x rank=%d tag=%d\n", i, sreq, +- sreq->dev.match.parts.context_id, +- sreq->dev.match.parts.rank, +- sreq->dev.match.parts.tag); ++ sreq->dev.match.parts.context_id, ++ sreq->dev.match.parts.rank, sreq->dev.match.parts.tag); + ++i; + sreq = sreq->dev.next; + } + } +-/* --END ERROR HANDLING-- */ + ++/* --END ERROR HANDLING-- */ +--- a/src/mpid/ch3/channels/nemesis/src/Makefile.mk ++++ b/src/mpid/ch3/channels/nemesis/src/Makefile.mk +@@ -26,6 +26,4 @@ mpi_core_sources += \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c \ + src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c \ +- src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c \ +- src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c \ +- src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c ++ src/mpid/ch3/channels/nemesis/src/mpid_nem_net_array.c +--- a/src/mpid/ch3/channels/nemesis/src/ch3_finalize.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_finalize.c +@@ -6,10 +6,6 @@ + + #include "mpid_nem_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Finalize(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/ch3_init.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_init.c +@@ -19,10 +19,6 @@ MPIDI_PG_t *MPIDI_CH3I_my_pg = NULL; + + static int nemesis_initialized = 0; + +-#undef FUNCNAME +-#define FUNCNAME split_type +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int split_type(MPIR_Comm * user_comm_ptr, int stype, int key, + MPIR_Info *info_ptr, MPIR_Comm ** newcomm_ptr) + { +@@ -86,10 +82,6 @@ static MPIR_Commops comm_fns = { + }; + + /* MPIDI_CH3_Init(): Initialize the nemesis channel */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t *pg_p, int pg_rank) + { + int mpi_errno = MPI_SUCCESS; +@@ -142,10 +134,6 @@ int MPIDI_CH3_PortFnsInit( MPIDI_PortFns *portFns ) + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Get_business_card +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Get_business_card(int myRank, char *value, int length) + { + int mpi_errno = MPI_SUCCESS; +@@ -164,10 +152,6 @@ fn_fail: + } + + /* Perform the channel-specific vc initialization */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_VC_Init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_VC_Init( MPIDI_VC_t *vc ) + { + int mpi_errno = MPI_SUCCESS; +@@ -210,10 +194,6 @@ int MPIDI_CH3_VC_Init( MPIDI_VC_t *vc ) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_VC_Destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_VC_Destroy(MPIDI_VC_t *vc ) + { + int mpi_errno = MPI_SUCCESS; +@@ -236,10 +216,6 @@ fn_exit: + } + + /* MPIDI_CH3_Connect_to_root() create a new vc, and connect it to the process listening on port_name */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Connect_to_root +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Connect_to_root (const char *port_name, MPIDI_VC_t **new_vc) + { + int mpi_errno = MPI_SUCCESS; +@@ -322,16 +298,12 @@ typedef struct initcomp_cb + struct initcomp_cb *next; + } initcomp_cb_t; + +-static struct {initcomp_cb_t *top;} initcomp_cb_stack = {0}; ++static struct {initcomp_cb_t *top;} initcomp_cb_stack; + + #define INITCOMP_S_TOP() GENERIC_S_TOP(initcomp_cb_stack) + #define INITCOMP_S_PUSH(ep) GENERIC_S_PUSH(&initcomp_cb_stack, ep, next) + + /* register a function to be called when all initialization is finished */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_register_initcomp_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_register_initcomp_cb(int (* callback)(void)) + { + int mpi_errno = MPI_SUCCESS; +@@ -354,10 +326,6 @@ int MPID_nem_register_initcomp_cb(int (* callback)(void)) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_InitCompleted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_InitCompleted(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c +@@ -11,10 +11,6 @@ + #include "mpid_nem_inline.h" + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_iSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPIR_Request *sreq, void * hdr, intptr_t hdr_sz) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c +@@ -13,10 +13,6 @@ + + extern void *MPIDI_CH3_packet_buffer; + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_iSendv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV *iov, int n_iov) + { + int mpi_errno = MPI_SUCCESS; +@@ -73,7 +69,6 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV *iov, int n_io + + MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "iSendv"); + mpi_errno = MPID_nem_mpich_sendv_header (&remaining_iov, &remaining_n_iov, +- sreq->dev.ext_hdr_ptr, sreq->dev.ext_hdr_sz, + vc, &again); + if (mpi_errno) MPIR_ERR_POP (mpi_errno); + while (!again && remaining_n_iov > 0) +--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c +@@ -20,10 +20,6 @@ + * condition also results in a request be allocated and the errror + * being returned in the status field of the request. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_iStartMsg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPIR_Request **sreq_ptr) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c +@@ -26,10 +26,6 @@ + implies that CH3_iStartMsgv() can only be used when the entire message can be described by a single iovec of size + MPL_IOV_LIMIT. */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_iStartMsgv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request **sreq_ptr) + { + MPIR_Request * sreq = *sreq_ptr = NULL; +@@ -89,8 +85,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request + + MPL_DBG_MSG_D (MPIDI_CH3_DBG_CHANNEL, VERBOSE, " + len=%d ", total); + }); +- mpi_errno = MPID_nem_mpich_sendv_header (&remaining_iov, &remaining_n_iov, +- NULL, 0, vc, &again); ++ mpi_errno = MPID_nem_mpich_sendv_header (&remaining_iov, &remaining_n_iov, vc, &again); + if (mpi_errno) MPIR_ERR_POP (mpi_errno); + while (!again && (remaining_n_iov > 0)) + { +--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c +@@ -105,10 +105,6 @@ static void sigusr1_handler(int sig) + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME check_terminating_vcs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int check_terminating_vcs(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -136,10 +132,6 @@ static int check_terminating_vcs(void) + /* MPIDI_CH3I_Shm_send_progress() this function makes progress sending + queued messages on the shared memory queues. This function is + nonblocking and does not call netmod functions..*/ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Shm_send_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Shm_send_progress(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -183,10 +175,11 @@ int MPIDI_CH3I_Shm_send_progress(void) + { + do + { +- MPID_nem_mpich_send_seg(sreq->dev.segment_ptr, &sreq->dev.segment_first, sreq->dev.segment_size, ++ MPID_nem_mpich_send_seg(sreq->dev.user_buf, sreq->dev.user_count, sreq->dev.datatype, ++ &sreq->dev.msg_offset, sreq->dev.msgsize, + sreq->ch.vc, &again); + } +- while (!again && sreq->dev.segment_first < sreq->dev.segment_size); ++ while (!again && sreq->dev.msg_offset < sreq->dev.msgsize); + + if (again) /* not finished sending */ + goto fn_exit; +@@ -204,8 +197,7 @@ int MPIDI_CH3I_Shm_send_progress(void) + iov = &sreq->dev.iov[sreq->dev.iov_offset]; + n_iov = sreq->dev.iov_count; + +- mpi_errno = MPID_nem_mpich_sendv_header(&iov, &n_iov, sreq->dev.ext_hdr_ptr, +- sreq->dev.ext_hdr_sz, sreq->ch.vc, &again); ++ mpi_errno = MPID_nem_mpich_sendv_header(&iov, &n_iov, sreq->ch.vc, &again); + if (mpi_errno) MPIR_ERR_POP (mpi_errno); + if (!again) + { +@@ -228,15 +220,16 @@ int MPIDI_CH3I_Shm_send_progress(void) + } + else + { +- MPID_nem_mpich_send_seg_header(sreq->dev.segment_ptr, &sreq->dev.segment_first, sreq->dev.segment_size, +- &sreq->dev.pending_pkt, sreq->ch.header_sz, sreq->dev.ext_hdr_ptr, +- sreq->dev.ext_hdr_sz, sreq->ch.vc, &again); ++ MPID_nem_mpich_send_seg_header(sreq->dev.user_buf, sreq->dev.user_count, sreq->dev.datatype, ++ &sreq->dev.msg_offset, sreq->dev.msgsize, ++ &sreq->dev.pending_pkt, sreq->ch.header_sz, sreq->ch.vc, &again); + if (!again) + { + MPIDI_CH3I_shm_active_send = sreq; +- while (!again && sreq->dev.segment_first < sreq->dev.segment_size) ++ while (!again && sreq->dev.msg_offset < sreq->dev.msgsize) + { +- MPID_nem_mpich_send_seg(sreq->dev.segment_ptr, &sreq->dev.segment_first, sreq->dev.segment_size, ++ MPID_nem_mpich_send_seg(sreq->dev.user_buf, sreq->dev.user_count, sreq->dev.datatype, ++ &sreq->dev.msg_offset, sreq->dev.msgsize, + sreq->ch.vc, &again); + } + } +@@ -292,10 +285,6 @@ int MPIDI_CH3I_Shm_send_progress(void) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_register_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id) + { + int mpi_errno = MPI_SUCCESS; +@@ -330,10 +319,6 @@ int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_deregister_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_deregister_hook(int id) + { + int mpi_errno = MPI_SUCCESS; +@@ -357,10 +342,6 @@ int MPIDI_CH3I_Progress_deregister_hook(int id) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_activate_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_activate_hook(int id) + { + int mpi_errno = MPI_SUCCESS; +@@ -383,10 +364,6 @@ int MPIDI_CH3I_Progress_activate_hook(int id) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_deactivate_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_deactivate_hook(int id) + { + int mpi_errno = MPI_SUCCESS; +@@ -411,10 +388,6 @@ int MPIDI_CH3I_Progress_deactivate_hook(int id) + /* NOTE: it appears that this function is sometimes (inadvertently?) recursive. + * Some packet handlers, such as MPIDI_CH3_PktHandler_Close, call iStartMsg, + * which calls MPID_Progress_test. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking) + { + int mpi_errno = MPI_SUCCESS; +@@ -672,10 +645,6 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking) + + /* Note that this routine is only called if threads are enabled; + it does not need to check whether runtime threads are enabled */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_delay +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Progress_delay(unsigned int completion_count) + { + int mpi_errno = MPI_SUCCESS, err; +@@ -695,10 +664,6 @@ static int MPIDI_CH3I_Progress_delay(unsigned int completion_count) + /* end MPIDI_CH3I_Progress_delay() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_continue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Progress_continue(unsigned int completion_count/*unused*/) + { + int mpi_errno = MPI_SUCCESS,err; +@@ -719,10 +684,6 @@ static int MPIDI_CH3I_Progress_continue(unsigned int completion_count/*unused*/) + /* end MPIDI_CH3I_Progress_continue() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_wakeup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIDI_CH3I_Progress_wakeup(void) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_WAKEUP); +@@ -735,10 +696,6 @@ void MPIDI_CH3I_Progress_wakeup(void) + } + #endif /* MPICH_IS_THREADED */ + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_handle_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen) + { + int mpi_errno = MPI_SUCCESS; +@@ -965,10 +922,6 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen) + MPIDI_Request_set_msg_type((rreq_), (msg_type_)); \ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_init(void) + { + int i; +@@ -1033,10 +986,6 @@ int MPIDI_CH3I_Progress_init(void) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_finalize(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -1058,10 +1007,6 @@ int MPIDI_CH3I_Progress_finalize(void) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME shm_connection_terminated +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int shm_connection_terminated(MPIDI_VC_t * vc) + { + /* This function is called after all sends have completed */ +@@ -1092,10 +1037,6 @@ static int shm_connection_terminated(MPIDI_VC_t * vc) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Connection_terminate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Connection_terminate(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; +@@ -1169,10 +1110,6 @@ int MPIDI_CH3_Connection_terminate(MPIDI_VC_t * vc) + } + /* end MPIDI_CH3_Connection_terminate() */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Complete_sendq_with_error +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; +@@ -1217,10 +1154,6 @@ int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc) + + + +-#undef FUNCNAME +-#define FUNCNAME pkt_NETMOD_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, intptr_t *buflen, MPIR_Request **rreqp) + { + int mpi_errno = MPI_SUCCESS; +@@ -1240,10 +1173,6 @@ fn_exit: + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Register_anysource_notification +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Register_anysource_notification(void (*enqueue_fn)(MPIR_Request *rreq), int (*dequeue_fn)(MPIR_Request *rreq)) + { + int mpi_errno = MPI_SUCCESS; +@@ -1265,10 +1194,6 @@ int MPIDI_CH3I_Register_anysource_notification(void (*enqueue_fn)(MPIR_Request * + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Anysource_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void anysource_posted(MPIR_Request *rreq) + { + qn_ent_t *ent = qn_head; +@@ -1284,10 +1209,6 @@ static void anysource_posted(MPIR_Request *rreq) + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Anysource_matched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int anysource_matched(MPIR_Request *rreq) + { + int matched = FALSE; +@@ -1314,10 +1235,6 @@ static int anysource_matched(MPIR_Request *rreq) + return matched; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Posted_recv_enqueued +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIDI_CH3I_Posted_recv_enqueued(MPIR_Request *rreq) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_POSTED_RECV_ENQUEUED); +@@ -1380,10 +1297,6 @@ void MPIDI_CH3I_Posted_recv_enqueued(MPIR_Request *rreq) + } + + /* returns non-zero when req has been matched by channel */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Posted_recv_dequeued +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Posted_recv_dequeued(MPIR_Request *rreq) + { + int local_rank = -1; +--- a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c +@@ -8,10 +8,6 @@ + #include "mpidrma.h" + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Win_shared_query +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_SHM_Win_shared_query(MPIR_Win * win_ptr, int target_rank, MPI_Aint * size, + int *disp_unit, void *baseptr) + { +@@ -71,10 +67,6 @@ int MPIDI_CH3_SHM_Win_shared_query(MPIR_Win * win_ptr, int target_rank, MPI_Aint + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_SHM_Win_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_SHM_Win_free(MPIR_Win ** win_ptr) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c +@@ -11,8 +11,6 @@ + + /* FIXME: get this from OS */ + #define MPIDI_CH3_PAGESIZE ((MPI_Aint)4096) +-#define MPIDI_CH3_PAGESIZE_MASK (~(MPIDI_CH3_PAGESIZE-1)) +-#define MPIDI_CH3_ROUND_UP_PAGESIZE(x) ((((MPI_Aint)x)+(~MPIDI_CH3_PAGESIZE_MASK)) & MPIDI_CH3_PAGESIZE_MASK) + + extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather ATTRIBUTE((unused)); + +@@ -29,10 +27,6 @@ static int MPIDI_CH3I_Win_detect_shm(MPIR_Win ** win_ptr); + static int MPIDI_CH3I_Win_gather_info(void *base, MPI_Aint size, int disp_unit, MPIR_Info * info, + MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Win_fns_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Win_fns_init(MPIDI_CH3U_Win_fns_t * win_fns) + { + int mpi_errno = MPI_SUCCESS; +@@ -52,10 +46,6 @@ int MPIDI_CH3_Win_fns_init(MPIDI_CH3U_Win_fns_t * win_fns) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Win_hooks_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Win_hooks_init(MPIDI_CH3U_Win_hooks_t * win_hooks) + { + int mpi_errno = MPI_SUCCESS; +@@ -74,10 +64,6 @@ int MPIDI_CH3_Win_hooks_init(MPIDI_CH3U_Win_hooks_t * win_hooks) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Win_pkt_orderings_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Win_pkt_orderings_init(MPIDI_CH3U_Win_pkt_ordering_t * win_pkt_orderings) + { + int mpi_errno = MPI_SUCCESS; +@@ -109,10 +95,6 @@ int MPIDI_CH3_Win_pkt_orderings_init(MPIDI_CH3U_Win_pkt_ordering_t * win_pkt_ord + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Win_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Win_init(MPI_Aint size, int disp_unit, int create_flavor, int model, + MPIR_Info * info, MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) + { +@@ -140,10 +122,6 @@ static int MPIDI_CH3I_Win_init(MPI_Aint size, int disp_unit, int create_flavor, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_SHM_Wins_match +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_SHM_Wins_match(MPIR_Win ** win_ptr, MPIR_Win ** matched_win, + MPI_Aint ** base_shm_offs_ptr) + { +@@ -282,10 +260,6 @@ static int MPIDI_CH3I_SHM_Wins_match(MPIR_Win ** win_ptr, MPIR_Win ** matched_wi + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_detect_shm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Win_detect_shm(MPIR_Win ** win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -343,10 +317,6 @@ static int MPIDI_CH3I_Win_detect_shm(MPIR_Win ** win_ptr) + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_gather_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Win_gather_info(void *base, MPI_Aint size, int disp_unit, MPIR_Info * info, + MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) + { +@@ -486,10 +456,6 @@ static int MPIDI_CH3I_Win_gather_info(void *base, MPI_Aint size, int disp_unit, + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_allocate_shm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPIR_Info * info, + MPIR_Comm * comm_ptr, void *base_ptr, MPIR_Win ** win_ptr) + { +@@ -552,7 +518,7 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPIR_Info * + for (i = 0; i < node_size; i++) { + if (noncontig) + /* Round up to next page size */ +- (*win_ptr)->shm_segment_len += MPIDI_CH3_ROUND_UP_PAGESIZE(node_sizes[i]); ++ (*win_ptr)->shm_segment_len += MPL_ROUND_UP_ALIGN(node_sizes[i], MPIDI_CH3_PAGESIZE); + else + (*win_ptr)->shm_segment_len += node_sizes[i]; + } +@@ -724,7 +690,7 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPIR_Info * + * allocated any memory. */ + if (noncontig) { + ((*win_ptr)->shm_base_addrs)[i] = +- cur_base + MPIDI_CH3_ROUND_UP_PAGESIZE(node_sizes[cur_rank]); ++ cur_base + MPL_ROUND_UP_ALIGN(node_sizes[cur_rank], MPIDI_CH3_PAGESIZE); + } + else { + ((*win_ptr)->shm_base_addrs)[i] = cur_base + node_sizes[cur_rank]; +--- a/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c +@@ -11,10 +11,6 @@ + + #define NULL_CONTEXT_ID -1 + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_comm_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_comm_create(MPIR_Comm *comm, void *param) + { + int mpi_errno = MPI_SUCCESS; +@@ -38,10 +34,6 @@ int MPIDI_CH3I_comm_create(MPIR_Comm *comm, void *param) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_comm_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_comm_destroy(MPIR_Comm *comm, void *param) + { + int mpi_errno = MPI_SUCCESS; +@@ -64,10 +56,6 @@ int MPIDI_CH3I_comm_destroy(MPIR_Comm *comm, void *param) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_barrier_vars_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_barrier_vars_init (MPID_nem_barrier_vars_t *barrier_region) + { + int mpi_errno = MPI_SUCCESS; +@@ -89,10 +77,6 @@ int MPID_nem_barrier_vars_init (MPID_nem_barrier_vars_t *barrier_region) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME nem_coll_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int nem_coll_finalize(void *param ATTRIBUTE((unused))) + { + int mpi_errno = MPI_SUCCESS; +@@ -108,10 +92,6 @@ static int nem_coll_finalize(void *param ATTRIBUTE((unused))) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_coll_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_coll_init(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c ++++ b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c +@@ -11,18 +11,15 @@ + #endif + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_SendNoncontig +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* MPIDI_CH3I_SendNoncontig - Sends a message by packing + directly into cells. The caller must initialize sreq->dev.segment +- as well as segment_first and segment_size. */ +-int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz ) ++ as well as msg_offset and msgsize. */ ++int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz, ++ MPL_IOV *hdr_iov, int n_hdr_iov) + { + int mpi_errno = MPI_SUCCESS; + int again = 0; +- intptr_t orig_segment_first = sreq->dev.segment_first; ++ intptr_t orig_msg_offset = sreq->dev.msg_offset; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG); +@@ -31,6 +28,15 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, + + MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + ++ if (n_hdr_iov > 0) { ++ /* translate segments to iovs and combine with the extended header iov. */ ++ mpi_errno = MPIDI_CH3_SendNoncontig_iov(vc, sreq, header, hdr_sz, ++ hdr_iov, n_hdr_iov); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ } ++ + if (!MPIDI_CH3I_Sendq_empty(MPIDI_CH3I_shm_sendq)) /* MT */ + { + /* send queue is not empty, enqueue the request then check to +@@ -50,17 +56,19 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, + } + + /* send as many cells of data as you can */ +- MPID_nem_mpich_send_seg_header(sreq->dev.segment_ptr, &sreq->dev.segment_first, sreq->dev.segment_size, +- header, hdr_sz, sreq->dev.ext_hdr_ptr, sreq->dev.ext_hdr_sz, vc, &again); +- while(!again && sreq->dev.segment_first < sreq->dev.segment_size) +- MPID_nem_mpich_send_seg(sreq->dev.segment_ptr, &sreq->dev.segment_first, sreq->dev.segment_size, vc, &again); ++ MPID_nem_mpich_send_seg_header(sreq->dev.user_buf, sreq->dev.user_count, sreq->dev.datatype, ++ &sreq->dev.msg_offset, sreq->dev.msgsize, ++ header, hdr_sz, vc, &again); ++ while(!again && sreq->dev.msg_offset < sreq->dev.msgsize) ++ MPID_nem_mpich_send_seg(sreq->dev.user_buf, sreq->dev.user_count, sreq->dev.datatype, ++ &sreq->dev.msg_offset, sreq->dev.msgsize, vc, &again); + + if (again) + { + /* we didn't finish sending everything */ + sreq->ch.noncontig = TRUE; + sreq->ch.vc = vc; +- if (sreq->dev.segment_first == orig_segment_first) /* nothing was sent, save header */ ++ if (sreq->dev.msg_offset == orig_msg_offset) /* nothing was sent, save header */ + { + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header; + sreq->ch.header_sz = hdr_sz; +@@ -83,7 +91,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); + } +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete %d bytes", (int) (sreq->dev.segment_size)); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete %d bytes", (int) (sreq->dev.msgsize)); + } + else + { +@@ -92,7 +100,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, + if (mpi_errno) MPIR_ERR_POP(mpi_errno); + MPIR_Assert(complete); /* all data has been sent, we should always complete */ + +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete %d bytes", (int) (sreq->dev.segment_size)); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete %d bytes", (int) (sreq->dev.msgsize)); + } + + fn_exit: +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c +@@ -149,10 +149,6 @@ static int ckpt_cb(void *arg) + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_nem_ckpt_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_nem_ckpt_init(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -187,10 +183,6 @@ int MPIDI_nem_ckpt_init(void) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_nem_ckpt_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_nem_ckpt_finalize(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -211,10 +203,6 @@ int MPIDI_nem_ckpt_finalize(void) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME reinit_pmi +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int reinit_pmi(void) + { + int ret; +@@ -269,10 +257,6 @@ static int reinit_pmi(void) + } + + +-#undef FUNCNAME +-#define FUNCNAME restore_env +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int restore_env(pid_t parent_pid, int rank) + { + FILE *f; +@@ -313,10 +297,6 @@ typedef struct sock_ident { + + #define STDINOUTERR_PORT_NAME "CKPOINT_STDINOUTERR_PORT" + +-#undef FUNCNAME +-#define FUNCNAME open_io_socket +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int open_io_socket(socktype_t socktype, int rank, int dupfd) + { + int fd; +@@ -376,10 +356,6 @@ fn_exit: + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME restore_stdinouterr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int restore_stdinouterr(int rank) + { + int ret; +@@ -401,10 +377,6 @@ static int restore_stdinouterr(int rank) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_nem_ckpt_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_nem_ckpt_start(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -463,10 +435,6 @@ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_nem_ckpt_finish +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_nem_ckpt_finish(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -524,10 +492,6 @@ fn_fail: + } + + +-#undef FUNCNAME +-#define FUNCNAME pkt_ckpt_marker_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int pkt_ckpt_marker_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **req) + { +@@ -568,10 +532,6 @@ fn_fail: + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_ckpt_pkthandler_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_nem_ckpt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int arraySize) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c +@@ -8,10 +8,6 @@ + #include "mpid_nem_debug.h" + + /* --BEGIN ERROR HANDLING-- */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_dbg_dump_cell +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPID_nem_dbg_dump_cell (volatile struct MPID_nem_cell *cell) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_DBG_DUMP_CELL); +@@ -53,10 +49,6 @@ void MPID_nem_dbg_print_vc_sendq(FILE *stream, MPIDI_VC_t *vc); + + /* This function can be called by a debugger to dump the sendq state of the + given vc to the given stream. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_dbg_print_all_sendq +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPID_nem_dbg_print_vc_sendq(FILE *stream, MPIDI_VC_t *vc) + { + MPIR_Request * sreq; +@@ -101,10 +93,6 @@ void MPID_nem_dbg_print_all_sendq(FILE *stream); + + /* This function can be called by a debugger to dump the sendq state for all the + vcs for all the pgs to the given stream. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_dbg_print_all_sendq +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPID_nem_dbg_print_all_sendq(FILE *stream) + { + int i; +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c +@@ -12,10 +12,6 @@ + + #include "mpidi_nem_statistics.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_finalize(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c +@@ -58,7 +58,7 @@ cvars: + #ifdef MEM_REGION_IN_HEAP + MPID_nem_mem_region_t *MPID_nem_mem_region_ptr = 0; + #else /* MEM_REGION_IN_HEAP */ +-MPID_nem_mem_region_t MPID_nem_mem_region = {{0}}; ++MPID_nem_mem_region_t MPID_nem_mem_region; + #endif /* MEM_REGION_IN_HEAP */ + + char MPID_nem_hostname[MAX_HOSTNAME_LEN] = "UNKNOWN"; +@@ -71,10 +71,6 @@ char *MPID_nem_asymm_base_addr = 0; + /* used by mpid_nem_inline.h and mpid_nem_finalize.c */ + unsigned long long *MPID_nem_fbox_fall_back_to_queue_count = NULL; + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_init_stats +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPID_nem_init_stats(int n_local_ranks) + { + int mpi_errno = MPI_SUCCESS; +@@ -103,10 +99,6 @@ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int + MPID_nem_init(int pg_rank, MPIDI_PG_t *pg_p, int has_parent ATTRIBUTE((unused))) + { +@@ -435,10 +427,6 @@ MPID_nem_init(int pg_rank, MPIDI_PG_t *pg_p, int has_parent ATTRIBUTE((unused))) + } + + /* MPID_nem_vc_init initialize nemesis' part of the vc */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_vc_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int + MPID_nem_vc_init (MPIDI_VC_t *vc) + { +@@ -502,6 +490,7 @@ MPID_nem_vc_init (MPIDI_VC_t *vc) + /* local processes use the default method */ + vc_ch->iStartContigMsg = NULL; + vc_ch->iSendContig = NULL; ++ vc_ch->iSendIov = NULL; + + #if MPID_NEM_LOCAL_LMT_IMPL == MPID_NEM_LOCAL_LMT_SHM_COPY + vc_ch->lmt_initiate_lmt = MPID_nem_lmt_shm_initiate_lmt; +@@ -619,10 +608,6 @@ MPID_nem_vc_init (MPIDI_VC_t *vc) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_vc_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int + MPID_nem_vc_destroy(MPIDI_VC_t *vc) + { +@@ -666,10 +651,6 @@ int MPID_nem_connect_to_root (const char *business_card, MPIDI_VC_t *new_vc) + calculates these values for processes MPI_COMM_WORLD, i.e., not for + spawned or attached processes. + */ +-#undef FUNCNAME +-#define FUNCNAME get_local_procs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int get_local_procs(MPIDI_PG_t *pg, int our_pg_rank, int *num_local_p, + int **local_procs_p, int *local_rank_p) + { +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c +@@ -49,10 +49,6 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, int + static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, intptr_t *buflen, MPIR_Request **rreqp); + static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, intptr_t *buflen, MPIR_Request **rreqp); + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_pkthandler_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int arraySize) + { + int mpi_errno = MPI_SUCCESS; +@@ -78,10 +74,6 @@ int MPID_nem_lmt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int array + } + + /* MPID_nem_lmt_RndvSend - Send a request to perform a rendezvous send */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_RndvSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_RndvSend(MPIR_Request **sreq_p, const void * buf, MPI_Aint count, + MPI_Datatype datatype, int dt_contig ATTRIBUTE((unused)), + intptr_t data_sz, MPI_Aint dt_true_lb ATTRIBUTE((unused)), +@@ -142,10 +134,6 @@ int MPID_nem_lmt_RndvSend(MPIR_Request **sreq_p, const void * buf, MPI_Aint coun + * This routine processes a rendezvous message once the message is matched. + * It is used in mpid_recv and mpid_irecv. + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_RndvRecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_RndvRecv(MPIDI_VC_t *vc, MPIR_Request *rreq) + { + int mpi_errno = MPI_SUCCESS; +@@ -176,10 +164,6 @@ int MPID_nem_lmt_RndvRecv(MPIDI_VC_t *vc, MPIR_Request *rreq) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME pkt_RTS_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, intptr_t *buflen, MPIR_Request **rreqp) + { + int mpi_errno = MPI_SUCCESS; +@@ -295,10 +279,6 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME pkt_CTS_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, intptr_t *buflen, MPIR_Request **rreqp) + { + MPID_nem_pkt_lmt_cts_t * const cts_pkt = (MPID_nem_pkt_lmt_cts_t *)pkt; +@@ -391,10 +371,6 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME pkt_DONE_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **rreqp) + { +@@ -438,10 +414,6 @@ static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATT + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME pkt_COOKIE_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, intptr_t *buflen, MPIR_Request **rreqp) + { + int mpi_errno = MPI_SUCCESS; +@@ -523,10 +495,6 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, + } + + +-#undef FUNCNAME +-#define FUNCNAME do_cts +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int do_cts(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; +@@ -572,10 +540,6 @@ static int do_cts(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME do_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int do_send(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; +@@ -605,10 +569,6 @@ static int do_send(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME do_cookie +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int do_cookie(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c ++++ /dev/null +@@ -1,718 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2008 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpid_nem_impl.h" +-#include "mpid_nem_datatypes.h" +- +-/* +-=== BEGIN_MPI_T_CVAR_INFO_BLOCK === +- +-cvars: +- - name : MPIR_CVAR_NEMESIS_LMT_DMA_THRESHOLD +- category : NEMESIS +- type : int +- default : 2097152 +- class : none +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_ALL_EQ +- description : >- +- Messages larger than this size will use the "dma" (knem) +- intranode LMT implementation, if it is enabled and available. +- +-=== END_MPI_T_CVAR_INFO_BLOCK === +-*/ +- +-MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; +- +-#if defined(HAVE_KNEM_IO_H) +- +-#include "knem_io.h" +- +-static int knem_fd = -1; +-static int knem_has_dma = 0; +- +-/* 4096 status index */ +-static volatile knem_status_t *knem_status = MAP_FAILED; +-#define KNEM_STATUS_NR 4096 /* FIXME: randomly chosen */ +- +-/* Values of KNEM_ABI_VERSION less than this are the old interface (pre-0.7), +- * values greater than or equal to this are the newer interface. At some point +- * in the future we should drop support for the old version to keep the code +- * simpler. */ +-#define MPICH_NEW_KNEM_ABI_VERSION (0x0000000c) +- +-/* These are for maintaining a linked-list of outstanding requests on which we +- can make progress. */ +-struct lmt_dma_node { +- struct lmt_dma_node *next; +- MPIDI_VC_t *vc; /* seems like this should be in the request somewhere, but it's not */ +- MPIR_Request *req; /* do we need to store type too? */ +- volatile knem_status_t *status_p; +-}; +- +-/* MT: this stack is not thread-safe */ +-static struct lmt_dma_node *outstanding_head = NULL; +- +-/* MT: this stack is not thread-safe */ +-static int free_idx; /* is always the index of the next free index */ +-static int index_stack[KNEM_STATUS_NR] = {0}; +- +-/* returns an index into knem_status that is available for use */ +-static int alloc_status_index(void) +-{ +- return index_stack[free_idx++]; +-} +- +-/* returns the given index to the pool */ +-static void free_status_index(int index) +-{ +- index_stack[--free_idx] = index; +-} +- +- +-/* Opens the knem device and sets knem_fd accordingly. Uses mpich errhandling +- conventions. */ +-#undef FUNCNAME +-#define FUNCNAME open_knem_dev +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int open_knem_dev(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int err; +- int i; +- struct knem_cmd_info info; +- +- knem_fd = open(KNEM_DEVICE_FILENAME, O_RDWR); +- MPIR_ERR_CHKANDJUMP2(knem_fd < 0, mpi_errno, MPI_ERR_OTHER, "**shm_open", +- "**shm_open %s %d", KNEM_DEVICE_FILENAME, errno); +- err = ioctl(knem_fd, KNEM_CMD_GET_INFO, &info); +- MPIR_ERR_CHKANDJUMP2(err < 0, mpi_errno, MPI_ERR_OTHER, "**ioctl", +- "**ioctl %d %s", errno, MPIR_Strerror(errno)); +- MPIR_ERR_CHKANDJUMP2(info.abi != KNEM_ABI_VERSION, mpi_errno, MPI_ERR_OTHER, +- "**abi_version_mismatch", "**abi_version_mismatch %D %D", +- (unsigned long)KNEM_ABI_VERSION, (unsigned long)info.abi); +- +- knem_has_dma = (info.features & KNEM_FEATURE_DMA); +- +- knem_status = MPL_mmap(NULL, KNEM_STATUS_NR, PROT_READ|PROT_WRITE, MAP_SHARED, knem_fd, KNEM_STATUS_ARRAY_FILE_OFFSET, MPL_MEM_SHM); +- MPIR_ERR_CHKANDJUMP1(knem_status == MAP_FAILED, mpi_errno, MPI_ERR_OTHER, "**mmap", +- "**mmap %d", errno); +- for (i = 0; i < KNEM_STATUS_NR; ++i) { +- index_stack[i] = i; +- } +-fn_fail: +- return mpi_errno; +-} +- +-/* Sends as much data from the request as possible via the knem ioctl. +- s_cookiep is an output parameter */ +-#undef FUNCNAME +-#define FUNCNAME do_dma_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int do_dma_send(MPIDI_VC_t *vc, MPIR_Request *sreq, int send_iov_n, +- MPL_IOV send_iov[], knem_cookie_t *s_cookiep) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i, err; +-#if KNEM_ABI_VERSION < MPICH_NEW_KNEM_ABI_VERSION +- struct knem_cmd_init_send_param sendcmd = {0}; +-#else +- struct knem_cmd_create_region cr; +-#endif +- struct knem_cmd_param_iovec knem_iov[MPL_IOV_LIMIT]; +- +- /* FIXME The knem module iovec is potentially different from the system +- iovec. This causes all sorts of fun if you don't realize it and use the +- system iovec directly instead. Eventually we need to either unify them +- or avoid this extra copy. */ +- for (i = 0; i < send_iov_n; ++i) { +- knem_iov[i].base = (uintptr_t)send_iov[i] .MPL_IOV_BUF; +- knem_iov[i].len = send_iov[i] .MPL_IOV_LEN; +- } +- +-#if KNEM_ABI_VERSION < MPICH_NEW_KNEM_ABI_VERSION +- sendcmd.send_iovec_array = (uintptr_t) &knem_iov[0]; +- sendcmd.send_iovec_nr = send_iov_n; +- sendcmd.flags = 0; +- err = ioctl(knem_fd, KNEM_CMD_INIT_SEND, &sendcmd); +-#else +- cr.iovec_array = (uintptr_t) &knem_iov[0]; +- cr.iovec_nr = send_iov_n; +- cr.flags = KNEM_FLAG_SINGLEUSE; +- cr.protection = PROT_READ; +- err = ioctl(knem_fd, KNEM_CMD_CREATE_REGION, &cr); +-#endif +- MPIR_ERR_CHKANDJUMP2(err < 0, mpi_errno, MPI_ERR_OTHER, "**ioctl", +- "**ioctl %d %s", errno, MPIR_Strerror(errno)); +-#if KNEM_ABI_VERSION < MPICH_NEW_KNEM_ABI_VERSION +- *s_cookiep = sendcmd.send_cookie; +-#else +- *s_cookiep = cr.cookie; +-#endif +- +-fn_fail: +-fn_exit: +- return mpi_errno; +-} +- +-/* s_cookie is an input parameter */ +-#undef FUNCNAME +-#define FUNCNAME do_dma_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int do_dma_recv(int iov_n, MPL_IOV iov[], knem_cookie_t s_cookie, int nodma, volatile knem_status_t **status_p_p, knem_status_t *current_status_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i, err; +- +-#if KNEM_ABI_VERSION < MPICH_NEW_KNEM_ABI_VERSION +- struct knem_cmd_init_async_recv_param recvcmd = {0}; +-#else +- struct knem_cmd_inline_copy icopy; +-#endif +- struct knem_cmd_param_iovec knem_iov[MPL_IOV_LIMIT]; +- +- /* FIXME The knem module iovec is potentially different from the system +- iovec. This causes all sorts of fun if you don't realize it and use the +- system iovec directly instead. Eventually we need to either unify them +- or avoid this extra copy. */ +- for (i = 0; i < iov_n; ++i) { +- knem_iov[i].base = (uintptr_t)iov[i] .MPL_IOV_BUF; +- knem_iov[i].len = iov[i] .MPL_IOV_LEN; +- } +- +-#if KNEM_ABI_VERSION < MPICH_NEW_KNEM_ABI_VERSION +- recvcmd.recv_iovec_array = (uintptr_t) &knem_iov[0]; +- recvcmd.recv_iovec_nr = iov_n; +- recvcmd.status_index = alloc_status_index(); +- recvcmd.send_cookie = s_cookie; +- recvcmd.flags = nodma ? 0 : KNEM_FLAG_DMA | KNEM_FLAG_ASYNCDMACOMPLETE; +- err = ioctl(knem_fd, KNEM_CMD_INIT_ASYNC_RECV, &recvcmd); +-#else +- icopy.local_iovec_array = (uintptr_t) &knem_iov[0]; +- icopy.local_iovec_nr = iov_n; +- icopy.remote_cookie = s_cookie; +- icopy.remote_offset = 0; +- icopy.write = 0; +- icopy.async_status_index = alloc_status_index(); +- icopy.flags = nodma ? 0 : KNEM_FLAG_DMA | KNEM_FLAG_ASYNCDMACOMPLETE; +- err = ioctl(knem_fd, KNEM_CMD_INLINE_COPY, &icopy); +-#endif +- MPIR_ERR_CHKANDJUMP2(err < 0, mpi_errno, MPI_ERR_OTHER, "**ioctl", +- "**ioctl %d %s", errno, MPIR_Strerror(errno)); +- +-#if KNEM_ABI_VERSION < MPICH_NEW_KNEM_ABI_VERSION +- *status_p_p = &knem_status[recvcmd.status_index]; +- *current_status_p = KNEM_STATUS_PENDING; +-#else +- *status_p_p = &knem_status[icopy.async_status_index]; +- *current_status_p = icopy.current_status; +-#endif +- +-fn_exit: +- return mpi_errno; +-fn_fail: +- goto fn_exit; +-} +- +-/* Much like initiate_lmt except it won't send an RTS message. Used to +- implement initiate_lmt and handle_cookie. This will send as much data from +- the request in a single shot as possible. +- +- s_cookiep is an output parameter. */ +-#undef FUNCNAME +-#define FUNCNAME send_sreq_data +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int send_sreq_data(MPIDI_VC_t *vc, MPIR_Request *sreq, knem_cookie_t *s_cookiep) +-{ +- int mpi_errno = MPI_SUCCESS; +- int dt_contig; +- MPI_Aint dt_true_lb; +- intptr_t data_sz; +- MPIR_Datatype* dt_ptr; +- +- /* MT: this code assumes only one thread can be at this point at a time */ +- if (knem_fd < 0) { +- mpi_errno = open_knem_dev(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +- /* find out contig/noncontig, size, and lb for the datatype */ +- MPIDI_Datatype_get_info(sreq->dev.user_count, sreq->dev.datatype, +- dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- if (dt_contig) { +- /* handle the iov creation ourselves */ +- sreq->dev.iov[0].MPL_IOV_BUF = (char *)sreq->dev.user_buf + dt_true_lb; +- sreq->dev.iov[0].MPL_IOV_LEN = data_sz; +- sreq->dev.iov_count = 1; +- } +- else { +- /* use the segment routines to handle the iovec creation */ +- if (sreq->dev.segment_ptr == NULL) { +- sreq->dev.iov_count = MPL_IOV_LIMIT; +- sreq->dev.iov_offset = 0; +- +- /* segment_ptr may be non-null when this is a continuation of a +- many-part message that we couldn't fit in one single flight of +- iovs. */ +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, +- MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(sreq->dev.user_buf, sreq->dev.user_count, +- sreq->dev.datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = data_sz; +- +- +- /* FIXME we should write our own function that isn't dependent on +- the in-request iov array. This will let us use IOVs that are +- larger than MPL_IOV_LIMIT. */ +- mpi_errno = MPIDI_CH3U_Request_load_send_iov(sreq, &sreq->dev.iov[0], +- &sreq->dev.iov_count); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- } +- +- mpi_errno = do_dma_send(vc, sreq, sreq->dev.iov_count, sreq->dev.iov, s_cookiep); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +-fn_exit: +- return mpi_errno; +-fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME check_req_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int check_req_complete(MPIDI_VC_t *vc, MPIR_Request *req, int *complete) +-{ +- int mpi_errno = MPI_SUCCESS; +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- reqFn = req->dev.OnDataAvail; +- if (reqFn) { +- *complete = 0; +- mpi_errno = reqFn(vc, req, complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- else { +- *complete = 1; +- mpi_errno = MPID_Request_complete(req); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- +-fn_fail: +- return mpi_errno; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_dma_initiate_lmt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_dma_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIR_Request *sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt; +- MPIR_CHKPMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_INITIATE_LMT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_INITIATE_LMT); +- +- MPIR_CHKPMEM_MALLOC(sreq->ch.s_cookie, knem_cookie_t *, sizeof(knem_cookie_t), mpi_errno, "s_cookie", MPL_MEM_BUFFER); +- +- mpi_errno = send_sreq_data(vc, sreq, sreq->ch.s_cookie); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- MPID_nem_lmt_send_RTS(vc, rts_pkt, sreq->ch.s_cookie, sizeof(knem_cookie_t)); +- +-fn_exit: +- MPIR_CHKPMEM_COMMIT(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_DMA_INITIATE_LMT); +- return mpi_errno; +-fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +-/* This function is called initially when an RTS message comes in, but may also +- be called by the COOKIE handler in the non-contiguous case to process +- additional IOVs. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_dma_start_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPIR_Request *rreq, MPL_IOV s_cookie) +-{ +- int mpi_errno = MPI_SUCCESS; +- int nodma; +- int dt_contig; +- MPI_Aint dt_true_lb; +- intptr_t data_sz; +- MPIR_Datatype* dt_ptr; +- volatile knem_status_t *status; +- knem_status_t current_status; +- struct lmt_dma_node *node = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_START_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_START_RECV); +- +- /* MT: this code assumes only one thread can be at this point at a time */ +- if (knem_fd < 0) { +- mpi_errno = open_knem_dev(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +- /* find out contig/noncontig, size, and lb for the datatype */ +- MPIDI_Datatype_get_info(rreq->dev.user_count, rreq->dev.datatype, +- dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- nodma = !knem_has_dma || data_sz < MPIR_CVAR_NEMESIS_LMT_DMA_THRESHOLD; +- +- if (dt_contig) { +- /* handle the iov creation ourselves */ +- rreq->dev.iov[0].MPL_IOV_BUF = (char *)rreq->dev.user_buf + dt_true_lb; +- rreq->dev.iov[0].MPL_IOV_LEN = data_sz; +- rreq->dev.iov_count = 1; +- } +- else { +- if (rreq->dev.segment_ptr == NULL) { +- /* segment_ptr may be non-null when this is a continuation of a +- many-part message that we couldn't fit in one single flight of +- iovs. */ +- MPIR_Assert(rreq->dev.segment_ptr == NULL); +- rreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, +- MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, +- rreq->dev.datatype, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = data_sz; +- +- /* see load_send_iov FIXME above */ +- mpi_errno = MPIDI_CH3U_Request_load_recv_iov(rreq); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- } +- +- MPIR_Assert(s_cookie.MPL_IOV_LEN == sizeof(knem_cookie_t)); +- MPIR_Assert(s_cookie.MPL_IOV_BUF != NULL); +- mpi_errno = do_dma_recv(rreq->dev.iov_count, rreq->dev.iov, +- *((knem_cookie_t *)s_cookie.MPL_IOV_BUF), nodma, +- &status, ¤t_status); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- /* TODO refactor this block and MPID_nem_lmt_dma_progress (and anywhere +- * else) to share a common function. This advancement/completion code is +- * duplication. */ +- if (current_status != KNEM_STATUS_PENDING) { +- /* complete the request if all data has been sent, remove it from the list */ +- int complete = 0; +- +- MPIR_ERR_CHKANDJUMP1(current_status == KNEM_STATUS_FAILED, mpi_errno, MPI_ERR_OTHER, +- "**recv_status", "**recv_status %d", current_status); +- +- mpi_errno = check_req_complete(vc, rreq, &complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- free_status_index(status - knem_status); +- +- if (complete) { +- /* request was completed by the OnDataAvail fn */ +- MPID_nem_lmt_send_DONE(vc, rreq); /* tell the other side to complete its request */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- +- } +- else { +- /* There is more data to send. We must inform the sender that we have +- completely received the current batch and that the next batch should +- be sent. */ +- MPID_nem_lmt_send_COOKIE(vc, rreq, NULL, 0); +- } +- } +- +- /* XXX DJG FIXME this looks like it always pushes! */ +- /* push request if not complete for progress checks later */ +- node = MPL_malloc(sizeof(struct lmt_dma_node), MPL_MEM_OTHER); +- node->vc = vc; +- node->req = rreq; +- node->status_p = status; +- node->next = outstanding_head; +- outstanding_head = node; +- ++MPID_nem_local_lmt_pending; +- +-fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_DMA_START_RECV); +- return mpi_errno; +-fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_dma_done_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_dma_done_send(MPIDI_VC_t *vc, MPIR_Request *sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- int complete = 0; +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_DONE_SEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_DONE_SEND); +- +- /* free cookie from RTS packet */ +- MPL_free(sreq->ch.s_cookie); +- +- /* We shouldn't ever need to handle the more IOVs case here. The DONE +- message should only be sent when all of the data is truly transferred. +- However in the interest of robustness, we'll start to handle it and +- assert if it looks like we were supposed to send more data for some +- reason. */ +- reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) { +- mpi_errno = MPID_Request_complete(sreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- goto fn_exit; +- } +- +- complete = 0; +- mpi_errno = reqFn(vc, sreq, &complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- if (complete) { +- /* request was completed by the OnDataAvail fn */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- goto fn_exit; +- } +- else { +- /* There is more data to send. */ +- MPIR_Assert(("should never be incomplete!", 0)); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_DMA_DONE_SEND); +-fn_exit: +- return MPI_SUCCESS; +-fn_fail: +- goto fn_exit; +-} +- +-/* called when a COOKIE message is received */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_dma_handle_cookie +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_HANDLE_COOKIE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_HANDLE_COOKIE); +- +- if (cookie.MPL_IOV_LEN == 0 && cookie.MPL_IOV_BUF == NULL) { +- /* req is a send request, we need to initiate another knem request and +- send a COOKIE message back to the receiver indicating the lid +- returned from the ioctl. */ +- int complete; +- knem_cookie_t s_cookie; +- +- /* This function will invoke the OnDataAvail function to load more data. */ +- mpi_errno = check_req_complete(vc, req, &complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- /* If we were complete we should have received a DONE message instead +- of a COOKIE message. */ +- MPIR_Assert(!complete); +- +- mpi_errno = do_dma_send(vc, req, req->dev.iov_count, &req->dev.iov[0], &s_cookie); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- MPID_nem_lmt_send_COOKIE(vc, req, &s_cookie, sizeof(knem_cookie_t)); +- } +- else { +- /* req is a receive request and we need to continue receiving using the +- lid provided in the cookie iov. */ +- mpi_errno = MPID_nem_lmt_dma_start_recv(vc, req, cookie); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +-fn_fail: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_DMA_HANDLE_COOKIE); +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_dma_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_dma_progress(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- struct lmt_dma_node *prev = NULL; +- struct lmt_dma_node *free_me = NULL; +- struct lmt_dma_node *cur = outstanding_head; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_PROGRESS); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_PROGRESS); +- +- /* Iterate over a linked-list of (req,status_idx)-tuples looking for +- completed/failed requests. Currently knem only provides status to the +- receiver, so all of these requests are recv requests. */ +- while (cur) { +- switch (*cur->status_p) { +- case KNEM_STATUS_SUCCESS: +- { +- /* complete the request if all data has been sent, remove it from the list */ +- int complete = 0; +- mpi_errno = check_req_complete(cur->vc, cur->req, &complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- free_status_index(cur->status_p - knem_status); +- +- if (complete) { +- /* request was completed by the OnDataAvail fn */ +- MPID_nem_lmt_send_DONE(cur->vc, cur->req); /* tell the other side to complete its request */ +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- +- } +- else { +- /* There is more data to send. We must inform the sender that we have +- completely received the current batch and that the next batch should +- be sent. */ +- MPID_nem_lmt_send_COOKIE(cur->vc, cur->req, NULL, 0); +- } +- +- /* Right now we always free the cur element, even if the +- request is incomplete because it simplifies the logic. */ +- if (cur == outstanding_head) { +- outstanding_head = cur->next; +- prev = NULL; +- free_me = cur; +- cur = cur->next; +- } +- else { +- prev->next = cur->next; +- free_me = cur; +- cur = cur->next; +- } +- if (free_me) MPL_free(free_me); +- --MPID_nem_local_lmt_pending; +- continue; +- } +- break; +- case KNEM_STATUS_FAILED: +- /* set the error status for the request, complete it then dequeue the entry */ +- cur->req->status.MPI_ERROR = MPI_SUCCESS; +- MPIR_ERR_SET1(cur->req->status.MPI_ERROR, MPI_ERR_OTHER, "**recv_status", "**recv_status %d", *cur->status_p); +- +- mpi_errno = MPID_Request_complete(cur->req); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- if (cur == outstanding_head) { +- outstanding_head = cur->next; +- prev = NULL; +- free_me = cur; +- cur = cur->next; +- } +- else { +- prev->next = cur->next; +- free_me = cur; +- cur = cur->next; +- } +- +- if (free_me) MPL_free(free_me); +- --MPID_nem_local_lmt_pending; +- continue; +- +- break; +- case KNEM_STATUS_PENDING: +- /* nothing to do here */ +- break; +- default: +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**invalid_knem_status", +- "**invalid_knem_status %d", *cur->status_p); +- break; +- } +- +- prev = cur; +- cur = cur->next; +- } +- +-fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_DMA_PROGRESS); +- return mpi_errno; +-fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_dma_vc_terminated +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_dma_vc_terminated(MPIDI_VC_t *vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_VC_TERMINATED); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_VC_TERMINATED); +- +- /* Do nothing. KNEM should abort any ops with dead processes. */ +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_DMA_VC_TERMINATED); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-/* -------------------------------------------------------------------------- +- The functions below are nops, stubs that might be used in later versions of +- this code. +- -------------------------------------------------------------------------- */ +- +-/* called when a CTS message is received */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_dma_start_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV r_cookie) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_START_SEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_START_SEND); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_DMA_START_SEND); +- return mpi_errno; +-} +- +-/* called when a DONE message is received for a receive request */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_dma_done_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_dma_done_recv(MPIDI_VC_t *vc, MPIR_Request *rreq) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_DONE_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_DONE_RECV); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_DMA_DONE_RECV); +- return MPI_SUCCESS; +-} +- +-#endif /* HAVE_KNEM_IO_H */ +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c +@@ -115,10 +115,6 @@ static int MPID_nem_delete_shm_region(MPID_nem_copy_buf_t **buf, MPL_shm_hnd_t * + /* number of iterations to wait for the other side to process a buffer */ + #define LMT_POLLS_BEFORE_GIVING_UP 5000 + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_initiate_lmt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIR_Request *req) + { + int mpi_errno = MPI_SUCCESS; +@@ -156,10 +152,6 @@ int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIR_Req + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_start_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie) + { + int mpi_errno = MPI_SUCCESS; +@@ -236,10 +228,6 @@ int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_coo + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_start_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV r_cookie) + { + int mpi_errno = MPI_SUCCESS; +@@ -327,17 +315,12 @@ int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV r_coo + goto fn_return; + } + +-#undef FUNCNAME +-#define FUNCNAME get_next_req +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int get_next_req(MPIDI_VC_t *vc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3I_VC *vc_ch = &vc->ch; + MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf; + int prev_owner_rank; +- MPIR_Request *req; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_GET_NEXT_REQ); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_GET_NEXT_REQ); +@@ -407,17 +390,6 @@ static int get_next_req(MPIDI_VC_t *vc) + OPA_store_int(&vc_ch->lmt_copy_buf->owner_info.val.rank, IN_USE); + } + +- req = vc_ch->lmt_active_lmt->req; +- if (req->dev.segment_ptr == NULL) +- { +- /* Check to see if we've already allocated a seg for this req. +- This can happen if both sides allocated copy buffers, and +- we decided to use the remote side's buffer. */ +- req->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((req->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype, req->dev.segment_ptr); +- req->dev.segment_first = 0; +- } + vc_ch->lmt_buf_num = 0; + vc_ch->lmt_surfeit = 0; + +@@ -435,17 +407,12 @@ static int get_next_req(MPIDI_VC_t *vc) + (i.e., won't copy three bytes of an int) we may not fill the entire + buffer each time. */ + +-#undef FUNCNAME +-#define FUNCNAME lmt_shm_send_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3I_VC *vc_ch = &vc->ch; + MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf; + intptr_t first; +- intptr_t last; + int buf_num; + intptr_t data_sz, copy_limit; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_LMT_SHM_SEND_PROGRESS); +@@ -461,7 +428,7 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + + data_sz = req->ch.lmt_data_sz; + buf_num = vc_ch->lmt_buf_num; +- first = req->dev.segment_first; ++ first = req->dev.msg_offset; + + do + { +@@ -472,7 +439,7 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + int p = 0; + + if (!copy_buf->receiver_present.val || p == LMT_POLLS_BEFORE_GIVING_UP) { +- req->dev.segment_first = first; ++ req->dev.msg_offset = first; + vc_ch->lmt_buf_num = buf_num; + *done = FALSE; + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=%" PRIdPTR " data_sz=%" PRIdPTR, first, data_sz)); +@@ -491,17 +458,23 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + copy_limit = PIPELINE_MAX_SIZE; + else + copy_limit = MPID_NEM_COPY_BUF_LEN; +- last = (data_sz - first <= copy_limit) ? data_sz : first + copy_limit; +- MPIR_Segment_pack(req->dev.segment_ptr, first, &last, (void *)copy_buf->buf[buf_num]); /* cast away volatile */ ++ ++ MPI_Aint max_pack_bytes; ++ max_pack_bytes = (data_sz - first <= copy_limit) ? data_sz - first : copy_limit; ++ ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(req->dev.user_buf, req->dev.user_count, req->dev.datatype, first, ++ (void *)copy_buf->buf[buf_num], max_pack_bytes, &actual_pack_bytes); ++ + OPA_write_barrier(); +- MPIR_Assign_trunc(copy_buf->len[buf_num].val, (last - first), volatile int); ++ MPIR_Assign_trunc(copy_buf->len[buf_num].val, actual_pack_bytes, int); + +- first = last; ++ first += actual_pack_bytes; + buf_num = (buf_num+1) % NUM_BUFS; + +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "sent data. last=%" PRIdPTR " data_sz=%" PRIdPTR, last, data_sz)); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "sent data. actual_pack_bytes=%" PRIdPTR " data_sz=%" PRIdPTR, actual_pack_bytes, data_sz)); + } +- while (last < data_sz); ++ while (first < data_sz); + + *done = TRUE; + mpi_errno = MPID_Request_complete(req); +@@ -527,10 +500,6 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + buffer is filled, we start copying where we just copied the + leftover data from last time. */ + +-#undef FUNCNAME +-#define FUNCNAME lmt_shm_recv_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + { + int mpi_errno = MPI_SUCCESS; +@@ -555,7 +524,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + surfeit = vc_ch->lmt_surfeit; + data_sz = req->ch.lmt_data_sz; + buf_num = vc_ch->lmt_buf_num; +- first = req->dev.segment_first; ++ first = req->dev.msg_offset; + + do + { +@@ -566,7 +535,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + int p = 0; + + if (!copy_buf->sender_present.val || p == LMT_POLLS_BEFORE_GIVING_UP) { +- req->dev.segment_first = first; ++ req->dev.msg_offset = first; + vc_ch->lmt_buf_num = buf_num; + vc_ch->lmt_surfeit = surfeit; + *done = FALSE; +@@ -584,7 +553,11 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + src_buf = ((char *)copy_buf->buf[buf_num]) - surfeit; /* cast away volatile */ + last = expected_last = (data_sz - first <= surfeit + len) ? data_sz : first + surfeit + len; + +- MPIR_Segment_unpack(req->dev.segment_ptr, first, &last, src_buf); ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack(src_buf, last - first, ++ req->dev.user_buf, req->dev.user_count, req->dev.datatype, ++ first, &actual_unpack_bytes); ++ last = first + actual_unpack_bytes; + + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "recvd data. last=%" PRIdPTR " data_sz=%" PRIdPTR, last, data_sz)); + +@@ -661,10 +634,6 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_handle_cookie +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_HANDLE_COOKIE); +@@ -675,10 +644,6 @@ int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV co + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_done_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_shm_done_send(MPIDI_VC_t *vc, MPIR_Request *req) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_DONE_SEND); +@@ -689,10 +654,6 @@ int MPID_nem_lmt_shm_done_send(MPIDI_VC_t *vc, MPIR_Request *req) + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_done_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_shm_done_recv(MPIDI_VC_t *vc, MPIR_Request *req) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_DONE_RECV); +@@ -703,10 +664,6 @@ int MPID_nem_lmt_shm_done_recv(MPIDI_VC_t *vc, MPIR_Request *req) + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_progress_vc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int lmt_shm_progress_vc(MPIDI_VC_t *vc, int *done) + { + int mpi_errno = MPI_SUCCESS; +@@ -755,10 +712,6 @@ static inline int lmt_shm_progress_vc(MPIDI_VC_t *vc, int *done) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_shm_progress(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -803,10 +756,6 @@ int MPID_nem_lmt_shm_progress(void) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_shm_vc_terminated +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_lmt_shm_vc_terminated(MPIDI_VC_t *vc) + { + int mpi_errno = MPI_SUCCESS; +@@ -864,10 +813,6 @@ int MPID_nem_lmt_shm_vc_terminated(MPIDI_VC_t *vc) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_allocate_shm_region +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPID_nem_allocate_shm_region(MPID_nem_copy_buf_t **buf_p, MPL_shm_hnd_t handle) + { + int mpi_errno = MPI_SUCCESS; +@@ -891,10 +836,6 @@ static int MPID_nem_allocate_shm_region(MPID_nem_copy_buf_t **buf_p, MPL_shm_hnd + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_attach_shm_region +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPID_nem_attach_shm_region(MPID_nem_copy_buf_t **buf_p, MPL_shm_hnd_t handle) + { + int mpi_errno = MPI_SUCCESS; +@@ -921,10 +862,6 @@ static int MPID_nem_attach_shm_region(MPID_nem_copy_buf_t **buf_p, MPL_shm_hnd_t + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_detach_shm_region +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPID_nem_detach_shm_region(MPID_nem_copy_buf_t **buf_p, MPL_shm_hnd_t handle) + { + int mpi_errno = MPI_SUCCESS; +@@ -942,10 +879,6 @@ static int MPID_nem_detach_shm_region(MPID_nem_copy_buf_t **buf_p, MPL_shm_hnd_t + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_delete_shm_region +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPID_nem_delete_shm_region(MPID_nem_copy_buf_t **buf_p, MPL_shm_hnd_t *handle_p) + { + int mpi_errno = MPI_SUCCESS; +deleted file mode 100644 +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c ++++ /dev/null +@@ -1,505 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2009 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpid_nem_impl.h" +-#include "mpid_nem_datatypes.h" +- +-MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; +- +-#if defined(HAVE_VMSPLICE) +- +-/* must come first for now */ +-#define _GNU_SOURCE +-#include +-#include +- +-#include "mpid_nem_impl.h" +-#include "mpid_nem_datatypes.h" +- +- +-/* These are for maintaining a linked-list of outstanding requests on which we +- can make progress. */ +-struct lmt_vmsplice_node { +- struct lmt_vmsplice_node *next; +- int pipe_fd; +- MPIR_Request *req; +-}; +- +-/* MT: this stack is not thread-safe */ +-static struct lmt_vmsplice_node *outstanding_head = NULL; +- +-/* Returns true if the IOV has been completely xferred, false otherwise. +- +- iov_count and iov_offset are pointers so that this function can manipulate +- them */ +-static int adjust_partially_xferred_iov(MPL_IOV iov[], int *iov_offset, +- int *iov_count, int bytes_xferred) +-{ +- int i; +- int complete = 1; +- +- for (i = *iov_offset; i < (*iov_offset + *iov_count); ++i) +- { +- if (bytes_xferred < iov[i].MPL_IOV_LEN) +- { +- iov[i].MPL_IOV_BUF = (char *)iov[i].MPL_IOV_BUF + bytes_xferred; +- iov[i].MPL_IOV_LEN -= bytes_xferred; +- /* iov_count should be equal to the number of iov's remaining */ +- *iov_count -= (i - *iov_offset); +- *iov_offset = i; +- complete = 0; +- break; +- } +- bytes_xferred -= iov[i].MPL_IOV_LEN; +- } +- +- return complete; +-} +- +-static inline int check_req_complete(MPIDI_VC_t *vc, MPIR_Request *req, int *complete) +-{ +- int mpi_errno = MPI_SUCCESS; +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- reqFn = req->dev.OnDataAvail; +- if (reqFn) { +- *complete = 0; +- +- /* XXX DJG FIXME this feels like a hack */ +- req->dev.iov_count = MPL_IOV_LIMIT; +- req->dev.iov_offset = 0; +- +- mpi_errno = reqFn(vc, req, complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- else { +- *complete = 1; +- mpi_errno = MPID_Request_complete(req); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- +-fn_fail: +- return mpi_errno; +-} +- +-/* fills in req->dev.iov{,_offset,_count} based on the datatype info in the +- request, creating a segment if necessary */ +-static int populate_iov_from_req(MPIR_Request *req) +-{ +- int mpi_errno = MPI_SUCCESS; +- int dt_contig; +- MPI_Aint dt_true_lb; +- intptr_t data_sz; +- MPIR_Datatype* dt_ptr; +- +- /* find out contig/noncontig, size, and lb for the datatype */ +- MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype, +- dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- if (dt_contig) { +- /* handle the iov creation ourselves */ +- req->dev.iov[0].MPL_IOV_BUF = (char *)req->dev.user_buf + dt_true_lb; +- req->dev.iov[0].MPL_IOV_LEN = data_sz; +- req->dev.iov_count = 1; +- } +- else { +- /* use the segment routines to handle the iovec creation */ +- MPIR_Assert(req->dev.segment_ptr == NULL); +- +- req->dev.iov_count = MPL_IOV_LIMIT; +- req->dev.iov_offset = 0; +- +- /* XXX DJG FIXME where is this segment freed? */ +- req->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((req->dev.segment_ptr == NULL), mpi_errno, +- MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(req->dev.user_buf, req->dev.user_count, +- req->dev.datatype, req->dev.segment_ptr); +- req->dev.segment_first = 0; +- req->dev.segment_size = data_sz; +- +- +- /* FIXME we should write our own function that isn't dependent on +- the in-request iov array. This will let us use IOVs that are +- larger than MPL_IOV_LIMIT. */ +- mpi_errno = MPIDI_CH3U_Request_load_send_iov(req, &req->dev.iov[0], +- &req->dev.iov_count); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +-fn_fail: +- return mpi_errno; +-} +- +-static int do_vmsplice(MPIR_Request *sreq, int pipe_fd, MPL_IOV iov[], +- int *iov_offset, int *iov_count, int *complete) +-{ +- int mpi_errno = MPI_SUCCESS; +- ssize_t err; +- +-#if 1 +- err = vmsplice(pipe_fd, &iov[*iov_offset], *iov_count, SPLICE_F_NONBLOCK); +-#else +- err = writev(pipe_fd, &iov[*iov_offset], *iov_count); +-#endif +- +- if (err < 0) { +- if (errno == EAGAIN) goto fn_exit; +- MPIR_ERR_CHKANDJUMP2(errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**vmsplice", +- "**vmsplice %d %s", errno, MPIR_Strerror(errno)); +- } +- +- *complete = adjust_partially_xferred_iov(iov, iov_offset, iov_count, err); +- if (*complete) { +- /* look for additional data to send and reload IOV if there is more */ +- mpi_errno = check_req_complete(sreq->ch.vc, sreq, complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- if (*complete) { +- err = close(pipe_fd); +- MPIR_ERR_CHKANDJUMP(err < 0, mpi_errno, MPI_ERR_OTHER, "**close"); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- } +- } +- +-fn_fail: +-fn_exit: +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_vmsplice_initiate_lmt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_vmsplice_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIR_Request *sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt; +- MPIDI_CH3I_VC *vc_ch = &vc->ch; +- int complete = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_INITIATE_LMT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_INITIATE_LMT); +- +- /* re-use the same pipe per-pair,per-sender */ +- if (vc_ch->lmt_copy_buf_handle == NULL) { +- int err; +- char *pipe_name; +- MPIDI_CH3I_VC *vc_ch = &vc->ch; +- +- pipe_name = tempnam(NULL, "lmt_"); +- MPIR_ERR_CHKANDJUMP2(!pipe_name, mpi_errno, MPI_ERR_OTHER, "**tempnam", +- "**tempnam %d %s", errno, MPIR_Strerror(errno)); +- +- vc_ch->lmt_copy_buf_handle = MPL_strdup(pipe_name); +- /* XXX DJG hack */ +-#undef free +- free(pipe_name); +- +- err = mkfifo(vc_ch->lmt_copy_buf_handle, 0660); +- MPIR_ERR_CHKANDJUMP2(err < 0, mpi_errno, MPI_ERR_OTHER, "**mkfifo", +- "**mkfifo %d %s", errno, MPIR_Strerror(errno)); +- } +- +- /* can't start sending data yet, need full RTS/CTS handshake */ +- +- MPID_nem_lmt_send_RTS(vc, rts_pkt, vc_ch->lmt_copy_buf_handle, +- strlen(vc_ch->lmt_copy_buf_handle)+1); +- +-fn_fail: +-fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_VMSPLICE_INITIATE_LMT); +- return mpi_errno; +-} +- +-static int do_readv(MPIR_Request *rreq, int pipe_fd, MPL_IOV iov[], +- int *iov_offset, int *iov_count, int *complete) +-{ +- int mpi_errno = MPI_SUCCESS; +- ssize_t nread; +- +- nread = readv(pipe_fd, &rreq->dev.iov[rreq->dev.iov_offset], rreq->dev.iov_count); +- MPIR_ERR_CHKANDJUMP2(nread < 0 && errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**read", +- "**readv %d %s", errno, MPIR_Strerror(errno)); +- +- if (nread < 0) { +- if (errno == EAGAIN) goto fn_exit; +- MPIR_ERR_CHKANDJUMP2(errno != EAGAIN, mpi_errno, MPI_ERR_OTHER, "**vmsplice", +- "**vmsplice %d %s", errno, MPIR_Strerror(errno)); +- } +- +- *complete = adjust_partially_xferred_iov(iov, iov_offset, iov_count, nread); +- if (*complete) { +- /* look for additional data to send and reload IOV if there is more */ +- mpi_errno = check_req_complete(rreq->ch.vc, rreq, complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- if (*complete) { +- nread = close(pipe_fd); +- MPIR_ERR_CHKANDJUMP(nread < 0, mpi_errno, MPI_ERR_OTHER, "**close"); +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- } +- } +- +-fn_fail: +-fn_exit: +- return mpi_errno; +-} +- +-/* This function is called when an RTS message comes in. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_vmsplice_start_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPIR_Request *rreq, MPL_IOV s_cookie) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i; +- int complete = 0; +- struct lmt_vmsplice_node *node = NULL; +- MPIDI_CH3I_VC *vc_ch = &vc->ch; +- int pipe_fd; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_RECV); +- +- if (vc_ch->lmt_recv_copy_buf_handle == NULL) { +- MPIR_Assert(s_cookie.MPL_IOV_BUF != NULL); +- vc_ch->lmt_recv_copy_buf_handle = MPL_strdup(s_cookie.MPL_IOV_BUF); +- } +- +- /* XXX DJG FIXME in a real version we would want to cache the fd on the vc +- so that we don't have two open's on the critical path every time. */ +- pipe_fd = open(vc_ch->lmt_recv_copy_buf_handle, O_NONBLOCK|O_RDONLY); +- MPIR_ERR_CHKANDJUMP1(pipe_fd < 0, mpi_errno, MPI_ERR_OTHER, "**open", +- "**open %s", MPIR_Strerror(errno)); +- +- MPID_nem_lmt_send_CTS(vc, rreq, NULL, 0); +- +- mpi_errno = populate_iov_from_req(rreq); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = do_readv(rreq, pipe_fd, rreq->dev.iov, &rreq->dev.iov_offset, +- &rreq->dev.iov_count, &complete); +- +- /* push request if not complete for progress checks later */ +- if (!complete) { +- node = MPL_malloc(sizeof(struct lmt_vmsplice_node), MPL_MEM_OTHER); +- node->pipe_fd = pipe_fd; +- node->req = rreq; +- node->next = outstanding_head; +- outstanding_head = node; +- ++MPID_nem_local_lmt_pending; +- } +- +-fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_RECV); +- return mpi_errno; +-fn_fail: +- goto fn_exit; +-} +- +-/* XXX DJG FIXME at some point this should poll, much like the newtcp module. +- But then we have that whole pollfd array to manage, which we don't really +- need until this proof-of-concept proves itself. */ +-int MPID_nem_lmt_vmsplice_progress(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- struct lmt_vmsplice_node *prev = NULL; +- struct lmt_vmsplice_node *free_me = NULL; +- struct lmt_vmsplice_node *cur = outstanding_head; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_PROGRESS); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_PROGRESS); +- +- while (cur) { +- int complete = 0; +- +- switch (MPIDI_Request_get_type(cur->req)) { +- case MPIDI_REQUEST_TYPE_RECV: +- mpi_errno = do_readv(cur->req, cur->pipe_fd, cur->req->dev.iov, +- &cur->req->dev.iov_offset, +- &cur->req->dev.iov_count, &complete); +- /* FIXME: set the error status of the req and complete it, rather than POP */ +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- break; +- case MPIDI_REQUEST_TYPE_SEND: +- mpi_errno = do_vmsplice(cur->req, cur->pipe_fd, cur->req->dev.iov, +- &cur->req->dev.iov_offset, +- &cur->req->dev.iov_count, &complete); +- /* FIXME: set the error status of the req and complete it, rather than POP */ +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- break; +- default: +- MPIR_ERR_INTERNALANDJUMP(mpi_errno, "unexpected request type"); +- break; +- } +- +- if (complete) { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ".... complete"); +- +- /* remove the node from the list */ +- if (cur == outstanding_head) { +- outstanding_head = cur->next; +- prev = NULL; +- free_me = cur; +- cur = cur->next; +- } +- else { +- prev->next = cur->next; +- prev = cur; +- free_me = cur; +- cur = cur->next; +- } +- if (free_me) MPL_free(free_me); +- --MPID_nem_local_lmt_pending; +- } +- +- if (!cur) break; /* we might have made cur NULL above */ +- +- prev = cur; +- cur = cur->next; +- } +- +-fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_VMSPLICE_PROGRESS); +- return mpi_errno; +-fn_fail: +- goto fn_exit; +-} +- +-/* called when a CTS message is received */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_vmsplice_start_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV r_cookie) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_SEND); +- int pipe_fd; +- int complete; +- struct lmt_vmsplice_node *node = NULL; +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- MPIDI_CH3I_VC *vc_ch = &vc->ch; +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_SEND); +- +- /* Must do this after the other side has opened for reading, otherwise we +- will error out with ENXIO. This will be indicated by the receipt of a +- CTS message. */ +- pipe_fd = open(vc_ch->lmt_copy_buf_handle, O_NONBLOCK|O_WRONLY); +- MPIR_ERR_CHKANDJUMP1(pipe_fd < 0, mpi_errno, MPI_ERR_OTHER, "**open", +- "**open %s", MPIR_Strerror(errno)); +- +- mpi_errno = populate_iov_from_req(sreq); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- /* send the first flight */ +- sreq->ch.vc = vc; /* XXX DJG is this already assigned? */ +- complete = 0; +- mpi_errno = do_vmsplice(sreq, pipe_fd, sreq->dev.iov, +- &sreq->dev.iov_offset, &sreq->dev.iov_count, &complete); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- +- if (!complete) { +- /* push for later progress */ +- node = MPL_malloc(sizeof(struct lmt_vmsplice_node), MPL_MEM_OTHER); +- node->pipe_fd = pipe_fd; +- node->req = sreq; +- node->next = outstanding_head; +- outstanding_head = node; +- ++MPID_nem_local_lmt_pending; +- } +- +-fn_fail: +-fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_SEND); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_MPID_nem_lmt_vmsplice_vc_terminated +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_MPID_nem_lmt_vmsplice_vc_terminated(MPIDI_VC_t *vc) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_MPID_NEM_LMT_VMSPLICE_VC_TERMINATED); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_MPID_NEM_LMT_VMSPLICE_VC_TERMINATED); +- +- /* FIXME: need to handle the case where a VC is terminated due to +- a process failure. We need to remove any outstanding LMT ops +- for this VC. */ +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3_MPID_NEM_LMT_VMSPLICE_VC_TERMINATED); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-/* -------------------------------------------------------------------------- +- The functions below are nops, stubs that might be used in later versions of +- this code. +- -------------------------------------------------------------------------- */ +- +-/* called when a DONE message is received for a receive request */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_vmsplice_done_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_vmsplice_done_recv(MPIDI_VC_t *vc, MPIR_Request *rreq) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_DONE_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_DONE_RECV); +- +- /* nop */ +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_VMSPLICE_DONE_RECV); +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_vmsplice_done_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPIR_Request *sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_DONE_SEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_DONE_SEND); +- +- /* nop */ +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_VMSPLICE_DONE_SEND); +- return MPI_SUCCESS; +-} +- +-/* called when a COOKIE message is received */ +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_lmt_vmsplice_handle_cookie +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_HANDLE_COOKIE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_HANDLE_COOKIE); +- +- /* nop */ +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_NEM_LMT_VMSPLICE_HANDLE_COOKIE); +- return MPI_SUCCESS; +-} +- +-#endif +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c +@@ -23,10 +23,6 @@ MPID_nem_cell_ptr_t MPID_nem_prefetched_cell = 0; + + unsigned short *MPID_nem_recv_seqno = 0; + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_mpich_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int + MPID_nem_mpich_init(void) + { +@@ -75,10 +71,6 @@ fn_fail: + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_send_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_send_iov(MPIDI_VC_t *vc, MPIR_Request **sreq_ptr, MPL_IOV *iov, int n_iov) + { + int mpi_errno = MPI_SUCCESS; +@@ -103,6 +95,19 @@ int MPID_nem_send_iov(MPIDI_VC_t *vc, MPIR_Request **sreq_ptr, MPL_IOV *iov, int + sreq->dev.OnDataAvail = 0; + } + ++ /* directly use the iov-based send API if it is provided */ ++ if (vc->ch.iSendIov) { ++ MPIR_Assert(n_iov >= 1 && n_iov <= MPL_IOV_LIMIT); ++ ++ /* header and remaining iovs */ ++ mpi_errno = vc->ch.iSendIov(vc, sreq, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN, &iov[1], n_iov - 1); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ *sreq_ptr = sreq; ++ goto fn_exit; ++ } ++ + data_sz = 0; + for (i = 0; i < data_n_iov; ++i) + data_sz += data_iov[i].MPL_IOV_LEN; +@@ -116,7 +121,7 @@ int MPID_nem_send_iov(MPIDI_VC_t *vc, MPIR_Request **sreq_ptr, MPL_IOV *iov, int + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,TYPICAL,"SRBuf allocation failure"); + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", 0); ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", 0); + sreq->status.MPI_ERROR = mpi_errno; + goto fn_exit; + } +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c +@@ -33,10 +33,6 @@ int MPID_nem_netmod_id = -1; + + MPID_nem_net_module_vc_dbg_print_sendq_t MPID_nem_net_module_vc_dbg_print_sendq = 0; + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_choose_netmod +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_choose_netmod(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c ++++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_network_poll.c +@@ -7,10 +7,6 @@ + #include "mpid_nem_impl.h" + #include "mpid_nem_nets.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_nem_network_poll +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_nem_network_poll(int in_blocking_progress) + { + return MPID_nem_netmod_func->poll(in_blocking_progress); +--- a/src/mpid/ch3/channels/nemesis/subconfigure.m4 ++++ b/src/mpid/ch3/channels/nemesis/subconfigure.m4 +@@ -246,36 +246,12 @@ if test "$pac_cv_have_struct_ifreq" = "yes" ; then + AC_DEFINE(HAVE_STRUCT_IFREQ,1,[Define if struct ifreq can be used]) + fi + +-# Check for knem options +-AC_ARG_WITH(knem, [--with-knem=path - specify path where knem include directory can be found], +-if test "${with_knem}" != "yes" -a "${with_knem}" != "no" ; then +- CPPFLAGS="$CPPFLAGS -I${with_knem}/include" +-fi,) +-AC_ARG_WITH(knem-include, [--with-knem-include=path - specify path to knem include directory], +-if test "${with_knem_include}" != "yes" -a "${with_knem_include}" != "no" ; then +- CPPFLAGS="$CPPFLAGS -I${with_knem_include}" +-fi,) +- +-AC_CHECK_HEADERS([knem_io.h], pac_cv_have_knem_io_h=yes,pac_cv_have_knem_io_h=no,) +-if test "${pac_cv_have_knem_io_h}" = yes ; then +- AC_DEFINE(HAVE_KNEM_IO_H,1,[Define if you have the header file.]) +-fi +- + # allow the user to select different local LMT implementations +-AC_ARG_WITH(nemesis-local-lmt, [--with-nemesis-local-lmt=method - specify an implementation for local large message transfers (LMT). Method is one of: 'default', 'shm_copy', 'knem', or 'none'. 'default' is the same as 'shm_copy'.],,with_nemesis_local_lmt=default) ++AC_ARG_WITH(nemesis-local-lmt, [--with-nemesis-local-lmt=method - specify an implementation for local large message transfers (LMT). Method is one of: 'default', 'shm_copy', or 'none'. 'default' is the same as 'shm_copy'.],,with_nemesis_local_lmt=default) + case "$with_nemesis_local_lmt" in + shm_copy|default) + local_lmt_impl=MPID_NEM_LOCAL_LMT_SHM_COPY + ;; +- dma|shm_dma|knem) +- if test "${pac_cv_have_knem_io_h}" != yes ; then +- AC_MSG_ERROR([Failed to find knem_io.h for nemesis-local-lmt=knem]) +- fi +- local_lmt_impl=MPID_NEM_LOCAL_LMT_DMA +- ;; +- vmsplice) +- local_lmt_impl=MPID_NEM_LOCAL_LMT_VMSPLICE +- ;; + none) + local_lmt_impl=MPID_NEM_LOCAL_LMT_NONE + ;; +--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h ++++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h +@@ -68,11 +68,11 @@ + /* End of connection-related macros */ + + /* FIXME: Any of these used in the ch3->channel interface should be +- defined in a header file in ch3/include that defines the ++ defined in a header file in ch3/include that defines the + channel interface */ + int MPIDI_CH3I_Progress_init(void); + int MPIDI_CH3I_Progress_finalize(void); +-int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id); ++int MPIDI_CH3I_Progress_register_hook(int (*progress_fn) (int *), int *id); + int MPIDI_CH3I_Progress_deregister_hook(int id); + int MPIDI_CH3I_Progress_activate_hook(int id); + int MPIDI_CH3I_Progress_deactivate_hook(int id); +--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_post.h ++++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_post.h +@@ -7,14 +7,14 @@ + #ifndef MPIDI_CH3_POST_H_INCLUDED + #define MPIDI_CH3_POST_H_INCLUDED + +-/* FIXME: We need to document all of these parameters. There should be no ++/* FIXME: We need to document all of these parameters. There should be no + ifdef that is not documented, other than those set by configure */ + /* +- * MPIDI_CH3_EAGER_MAX_MSG_SIZE - threshold for switch between the eager and ++ * MPIDI_CH3_EAGER_MAX_MSG_SIZE - threshold for switch between the eager and + * rendezvous protocolsa + */ + #if !defined(MPIDI_CH3_EAGER_MAX_MSG_SIZE) +-# define MPIDI_CH3_EAGER_MAX_MSG_SIZE (256 * 1024) ++#define MPIDI_CH3_EAGER_MAX_MSG_SIZE (256 * 1024) + #endif + + +@@ -29,9 +29,8 @@ + #define MPIDI_CH3_Progress_end(progress_state_) MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX) + #define MPIDI_CH3_Progress_poke() (MPIDI_CH3_Progress_test()) + +-int MPIDI_CH3I_Progress(int blocking, MPID_Progress_state *state); ++int MPIDI_CH3I_Progress(int blocking, MPID_Progress_state * state); + #define MPIDI_CH3_Progress_test() MPIDI_CH3I_Progress(FALSE, NULL) + #define MPIDI_CH3_Progress_wait(state) MPIDI_CH3I_Progress(TRUE, state) + + #endif /* MPIDI_CH3_POST_H_INCLUDED */ +- +--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h ++++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h +@@ -28,31 +28,27 @@ MPIDI_CH3I_PKT_SC_OPEN_RESP, \ + MPIDI_CH3I_PKT_SC_CLOSE + + typedef struct { +- int dummy; /* dummy variable to ensure we don't have an empty structure */ ++ int dummy; /* dummy variable to ensure we don't have an empty structure */ + } MPIDI_CH3I_CH_comm_t; + + /* This channel has no special channel data for the process group structure */ + + /* FIXME: Explain these; why is this separate from the VC state? */ +-typedef enum MPIDI_CH3I_VC_state +-{ ++typedef enum MPIDI_CH3I_VC_state { + MPIDI_CH3I_VC_STATE_UNCONNECTED, + MPIDI_CH3I_VC_STATE_CONNECTING, + MPIDI_CH3I_VC_STATE_CONNECTED, + MPIDI_CH3I_VC_STATE_FAILED +-} +-MPIDI_CH3I_VC_state_t; ++} MPIDI_CH3I_VC_state_t; + + /* channel-specific fields for the VC structure */ +-typedef struct MPIDI_CH3I_VC +-{ +- struct MPIR_Request * sendq_head; +- struct MPIR_Request * sendq_tail; ++typedef struct MPIDI_CH3I_VC { ++ struct MPIR_Request *sendq_head; ++ struct MPIR_Request *sendq_tail; + MPIDI_CH3I_VC_state_t state; + struct MPIDI_CH3I_Sock *sock; +- struct MPIDI_CH3I_Connection * conn; +-} +-MPIDI_CH3I_VC; ++ struct MPIDI_CH3I_Connection *conn; ++} MPIDI_CH3I_VC; + + #define MPIDI_CH3_VC_DECL struct MPIDI_CH3I_VC ch; + +@@ -66,11 +62,9 @@ MPIDI_CH3I_VC; + * MPID_Progress_{start,wait,end} + * + */ +-typedef struct MPIDI_CH3I_Progress_state +-{ ++typedef struct MPIDI_CH3I_Progress_state { + int completion_count; +-} +-MPIDI_CH3I_Progress_state; ++} MPIDI_CH3I_Progress_state; + + #define MPIDI_CH3_PROGRESS_STATE_DECL MPIDI_CH3I_Progress_state ch; + +--- a/src/mpid/ch3/channels/sock/include/mpidu_sock.h ++++ b/src/mpid/ch3/channels/sock/include/mpidu_sock.h +@@ -18,7 +18,6 @@ + #endif + + CPLUSPLUS_BEGIN +- + /* Load just the utility definitions that we need */ + #include "mpichconf.h" + #include "mpl.h" +@@ -27,24 +26,22 @@ CPLUSPLUS_BEGIN + #include "mpir_assert.h" + #include "mpir_pointers.h" + #include "mpir_cvars.h" +-/* implementation specific header file */ ++/* implementation specific header file */ + #include "mpidu_socki.h" +- +- + /*D + MPIDI_CH3I_SOCK_ERR - Extended error classes specific to the Sock module + + Notes: +-The actual meaning of these error classes is defined by each function. ++The actual meaning of these error classes is defined by each function. + + Module: + Utility-Sock + D*/ + /* FIXME: This is not the right way to add error values to an MPICH module. + Note that (a) the last class values are not respected by the error handling +- code, (b) the entire point of codes and classes is to provide a +- natural grouping of codes to a class, (c) this approach can only be used +- by one module and hence breaks any component design, and (d) this is ++ code, (b) the entire point of codes and classes is to provide a ++ natural grouping of codes to a class, (c) this approach can only be used ++ by one module and hence breaks any component design, and (d) this is + what the MPI dynamic error codes and classes was designed for. */ + #define MPIDI_CH3I_SOCK_SUCCESS MPI_SUCCESS + #define MPIDI_CH3I_SOCK_ERR_FAIL MPICH_ERR_LAST_CLASS + 1 +@@ -64,8 +61,6 @@ D*/ + #define MPIDI_CH3I_SOCK_ERR_TIMEOUT MPICH_ERR_LAST_CLASS + 15 + #define MPIDI_CH3I_SOCK_ERR_INTR MPICH_ERR_LAST_CLASS + 16 + #define MPIDI_CH3I_SOCK_ERR_NO_NEW_SOCK MPICH_ERR_LAST_CLASS + 17 +- +- + /*E + MPIDI_CH3I_Sock_op_t - enumeration of posted operations that can be completed by the Sock module + +@@ -77,8 +72,7 @@ being formed and that MPIDI_CH3I_Sock_accept() should be called. + Module: + Utility-Sock + E*/ +-typedef enum MPIDI_CH3I_Sock_op +-{ ++ typedef enum MPIDI_CH3I_Sock_op { + MPIDI_CH3I_SOCK_OP_READ, + MPIDI_CH3I_SOCK_OP_WRITE, + MPIDI_CH3I_SOCK_OP_ACCEPT, +@@ -103,11 +97,10 @@ The num_bytes field is only used when a posted read or write operation completes + Module: + Utility-Sock + S*/ +-typedef struct MPIDI_CH3I_Sock_event +-{ ++typedef struct MPIDI_CH3I_Sock_event { + MPIDI_CH3I_Sock_op_t op_type; + size_t num_bytes; +- void * user_ptr; ++ void *user_ptr; + int error; + } MPIDI_CH3I_Sock_event_t; + +@@ -155,7 +148,7 @@ communication capabilities + Input Parameters: + + myRank - Rank of this process in its MPI_COMM_WORLD. This can be used + to find environment variables that are specific for this process. +-. host_description - character array in which the function can store a string ++. host_description - character array in which the function can store a string + describing the communication capabilities of the host + - len - length of the character array + +@@ -169,7 +162,7 @@ Return value: a MPI error code with a Sock extended error class + - MPIDI_CH3I_SOCK_ERR_FAIL - unable to obtain network interface information from OS + + Notes: +-The host description string returned by the function is defined by the ++The host description string returned by the function is defined by the + implementation and should not be interpreted by the + application. This string is to be supplied to MPIDI_CH3I_Sock_post_connect() when + one wishes to form a connection with this host. +@@ -177,7 +170,7 @@ one wishes to form a connection with this host. + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_get_host_description(int myRank, char * host_description, int len); ++int MPIDI_CH3I_Sock_get_host_description(int myRank, char *host_description, int len); + + + /*@ +@@ -205,7 +198,7 @@ specified by hostname. + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_hostname_to_host_description(char *hostname, char * host_description, int len); ++int MPIDI_CH3I_Sock_hostname_to_host_description(char *hostname, char *host_description, int len); + + /*@ + MPIDI_CH3I_Sock_create_set - create a new sock set object +@@ -254,7 +247,7 @@ be called repeatedly, untiluser_ptr == NULL. The reason for this is + that the overlying protocoll may need the user_ptr for further cleanup. + + @*/ +-int MPIDI_CH3I_Sock_close_open_sockets(struct MPIDI_CH3I_Sock_set * sock_set, void** user_ptr ); ++int MPIDI_CH3I_Sock_close_open_sockets(struct MPIDI_CH3I_Sock_set *sock_set, void **user_ptr); + + + /*@ +@@ -310,9 +303,10 @@ function properly. + Thread safety: + The addition of a new sock object to the sock set may occur while other threads are performing operations on the same sock set. + Thread safety of simultaneously operations on the same sock set must be guaranteed by the Sock implementation. +- ++ + @*/ +-int MPIDI_CH3I_Sock_native_to_sock(MPIDI_CH3I_Sock_set_t set, MPIDI_CH3I_SOCK_NATIVE_FD fd, void * user_ptr, MPIDI_CH3I_Sock_t * sock); ++int MPIDI_CH3I_Sock_native_to_sock(MPIDI_CH3I_Sock_set_t set, MPIDI_CH3I_SOCK_NATIVE_FD fd, ++ void *user_ptr, MPIDI_CH3I_Sock_t * sock); + + + /*@ +@@ -349,25 +343,26 @@ unlike the post routine, many MPIDI_CH3I_SOCK_OP_ACCEPT events can + be generated from a listener (typically one per incoming connection attempt). + + The implementation may generate an event as soon it is notified that a +-new connection is forming. In such an implementation, ++new connection is forming. In such an implementation, + MPIDI_CH3I_Sock_accept() may be responsible for finalizing the connection. +-It is also possible that the connection may fail to ++It is also possible that the connection may fail to + complete, causing MPIDI_CH3I_Sock_accept() to be unable to obtain a sock +-despite the event notification. ++despite the event notification. + + The environment variable MPICH_PORT_RANGE=min:max may be used to +-restrict the ports mpich processes listen on. ++restrict the ports mpich processes listen on. + + Thread safety: + The addition of the listener sock object to the sock set may occur +-while other threads are performing operations on the same sock ++while other threads are performing operations on the same sock + set. Thread safety of simultaneously operations on the same sock set +-must be guaranteed by the Sock implementation. ++must be guaranteed by the Sock implementation. + + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_listen(MPIDI_CH3I_Sock_set_t set, void * user_ptr, int * port, MPIDI_CH3I_Sock_t * sock); ++int MPIDI_CH3I_Sock_listen(MPIDI_CH3I_Sock_set_t set, void *user_ptr, int *port, ++ MPIDI_CH3I_Sock_t * sock); + + + /*@ +@@ -405,7 +400,8 @@ depleted. In this case, MPIDI_CH3I_SOCK_ERR_NO_SOCK is returned. + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_accept(MPIDI_CH3I_Sock_t listener_sock, MPIDI_CH3I_Sock_set_t set, void * user_ptr, MPIDI_CH3I_Sock_t * sock); ++int MPIDI_CH3I_Sock_accept(MPIDI_CH3I_Sock_t listener_sock, MPIDI_CH3I_Sock_set_t set, ++ void *user_ptr, MPIDI_CH3I_Sock_t * sock); + + + /*@ +@@ -454,7 +450,8 @@ Thread safety of simultaneously operations on the same sock set must be guarante + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_post_connect(MPIDI_CH3I_Sock_set_t set, void * user_ptr, char * host_description, int port, MPIDI_CH3I_Sock_t * sock); ++int MPIDI_CH3I_Sock_post_connect(MPIDI_CH3I_Sock_set_t set, void *user_ptr, char *host_description, ++ int port, MPIDI_CH3I_Sock_t * sock); + + /*S + MPIDI_CH3I_Sock_ifaddr_t - Structure to hold an Internet address. +@@ -474,10 +471,10 @@ typedef struct MPIDI_CH3I_Sock_ifaddr_t { + This is the basic routine. MPIDI_CH3I_Sock_post_connect converts the + host description into the ifaddr and calls this routine. + @*/ +-int MPIDI_CH3I_Sock_post_connect_ifaddr( MPIDI_CH3I_Sock_set_t sock_set, +- void * user_ptr, +- MPIDI_CH3I_Sock_ifaddr_t *ifaddr, int port, +- MPIDI_CH3I_Sock_t * sockp); ++int MPIDI_CH3I_Sock_post_connect_ifaddr(MPIDI_CH3I_Sock_set_t sock_set, ++ void *user_ptr, ++ MPIDI_CH3I_Sock_ifaddr_t * ifaddr, int port, ++ MPIDI_CH3I_Sock_t * sockp); + + + /*@ +@@ -496,7 +493,7 @@ Return value: a MPI error code with a Sock extended error class + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_set_user_ptr(MPIDI_CH3I_Sock_t sock, void * user_ptr); ++int MPIDI_CH3I_Sock_set_user_ptr(MPIDI_CH3I_Sock_t sock, void *user_ptr); + + + /*@ +@@ -563,7 +560,7 @@ internal progress engine could block on an application routine. + Module: + Utility-Sock + E*/ +-typedef int (* MPIDI_CH3I_Sock_progress_update_func_t)(size_t num_bytes, void * user_ptr); ++typedef int (*MPIDI_CH3I_Sock_progress_update_func_t) (size_t num_bytes, void *user_ptr); + + + /*@ +@@ -622,8 +619,8 @@ one thread is not attempting to post a new operation while another thread is att + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_post_read(MPIDI_CH3I_Sock_t sock, void * buf, size_t minbr, size_t maxbr, +- MPIDI_CH3I_Sock_progress_update_func_t fn); ++int MPIDI_CH3I_Sock_post_read(MPIDI_CH3I_Sock_t sock, void *buf, size_t minbr, size_t maxbr, ++ MPIDI_CH3I_Sock_progress_update_func_t fn); + + + /*@ +@@ -681,7 +678,8 @@ that one thread is not attempting to post a new operation while another thread i + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_post_readv(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, MPIDI_CH3I_Sock_progress_update_func_t fn); ++int MPIDI_CH3I_Sock_post_readv(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, ++ MPIDI_CH3I_Sock_progress_update_func_t fn); + + + /*@ +@@ -741,8 +739,8 @@ need this flexibility? + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_post_write(MPIDI_CH3I_Sock_t sock, void * buf, size_t min, size_t max, +- MPIDI_CH3I_Sock_progress_update_func_t fn); ++int MPIDI_CH3I_Sock_post_write(MPIDI_CH3I_Sock_t sock, void *buf, size_t min, size_t max, ++ MPIDI_CH3I_Sock_progress_update_func_t fn); + + + /*@ +@@ -800,7 +798,8 @@ that one thread is not attempting to post a new operation while another thread i + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_post_writev(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, MPIDI_CH3I_Sock_progress_update_func_t fn); ++int MPIDI_CH3I_Sock_post_writev(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, ++ MPIDI_CH3I_Sock_progress_update_func_t fn); + + + /*@ +@@ -910,7 +909,7 @@ not attempting to perform an immediate read while another thread is attempting t + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_read(MPIDI_CH3I_Sock_t sock, void * buf, size_t len, size_t * num_read); ++int MPIDI_CH3I_Sock_read(MPIDI_CH3I_Sock_t sock, void *buf, size_t len, size_t * num_read); + + + /*@ +@@ -1009,7 +1008,7 @@ not attempting to perform an immediate write while another thread is attempting + Module: + Utility-Sock + @*/ +-int MPIDI_CH3I_Sock_write(MPIDI_CH3I_Sock_t sock, void * buf, size_t len, size_t * num_written); ++int MPIDI_CH3I_Sock_write(MPIDI_CH3I_Sock_t sock, void *buf, size_t len, size_t * num_written); + + + /*@ +@@ -1126,5 +1125,4 @@ int MPIDI_CH3I_Sock_get_error_class_string(int error, char *error_string, size_t + + + CPLUSPLUS_END +- + #endif /* MPIDU_SOCK_H_INCLUDED */ +--- a/src/mpid/ch3/channels/sock/include/mpidu_socki.h ++++ b/src/mpid/ch3/channels/sock/include/mpidu_socki.h +@@ -22,7 +22,7 @@ + + #if defined(HAVE_GETHOSTNAME) && defined(NEEDS_GETHOSTNAME_DECL) && !defined(gethostname) + int gethostname(char *name, size_t len); +-# endif ++#endif + + #ifndef SSIZE_MAX + /* SSIZE_MAX is the maximum amount of data that we expect to be able +@@ -37,8 +37,8 @@ int gethostname(char *name, size_t len); + #define MPIDI_CH3I_SOCK_SIZE_MAX SSIZE_MAX + #define MPIDI_CH3I_SOCK_NATIVE_FD int + +-typedef struct MPIDI_CH3I_Sock_set * MPIDI_CH3I_Sock_set_t; +-typedef struct MPIDI_CH3I_Sock * MPIDI_CH3I_Sock_t; ++typedef struct MPIDI_CH3I_Sock_set *MPIDI_CH3I_Sock_set_t; ++typedef struct MPIDI_CH3I_Sock *MPIDI_CH3I_Sock_t; + typedef size_t MPIDI_CH3I_Sock_size_t; + + #define MPIDI_CH3I_SOCKI_STATE_LIST \ +--- a/src/mpid/ch3/channels/sock/src/ch3_finalize.c ++++ b/src/mpid/ch3/channels/sock/src/ch3_finalize.c +@@ -7,11 +7,7 @@ + #include "mpidi_ch3_impl.h" + + /* This routine is called by MPID_Finalize to finalize the channel. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_Finalize( void ) ++int MPIDI_CH3_Finalize(void) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_CH3_FINALIZE); +@@ -19,9 +15,11 @@ int MPIDI_CH3_Finalize( void ) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CH3_FINALIZE); + + mpi_errno = MPIDI_CH3I_Progress_finalize(); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } + +- fn_fail: ++ fn_fail: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CH3_FINALIZE); + return mpi_errno; + } +--- a/src/mpid/ch3/channels/sock/src/ch3_init.c ++++ b/src/mpid/ch3/channels/sock/src/ch3_init.c +@@ -11,17 +11,13 @@ + char MPIDI_CH3_ABIVersion[] = "1.1"; + + /* +- * MPIDI_CH3_Init - makes socket specific initializations. Most of this +- * functionality is in the MPIDI_CH3U_Init_sock upcall +- * because the same tasks need to be done for the ssh ++ * MPIDI_CH3_Init - makes socket specific initializations. Most of this ++ * functionality is in the MPIDI_CH3U_Init_sock upcall ++ * because the same tasks need to be done for the ssh + * (sock + shm) channel. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t * pg_p, int pg_rank ) ++int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t * pg_p, int pg_rank) + { + int mpi_errno = MPI_SUCCESS; + char *publish_bc_orig = NULL; +@@ -32,95 +28,94 @@ int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t * pg_p, int pg_rank ) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CH3_INIT); + + mpi_errno = MPIDI_CH3I_Progress_init(); +- if (mpi_errno != MPI_SUCCESS) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + /* Initialize the business card */ +- mpi_errno = MPIDI_CH3I_BCInit( &bc_val, &val_max_remaining ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ mpi_errno = MPIDI_CH3I_BCInit(&bc_val, &val_max_remaining); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + publish_bc_orig = bc_val; + + /* initialize aspects specific to sockets */ +- mpi_errno = MPIDI_CH3U_Init_sock(has_parent, pg_p, pg_rank, +- &bc_val, &val_max_remaining); ++ mpi_errno = MPIDI_CH3U_Init_sock(has_parent, pg_p, pg_rank, &bc_val, &val_max_remaining); + +- /* Set the connection information in our process group +- (publish the business card ) */ +- MPIDI_PG_SetConnInfo( pg_rank, (const char *)publish_bc_orig ); ++ /* Set the connection information in our process group ++ * (publish the business card) */ ++ MPIDI_PG_SetConnInfo(pg_rank, (const char *) publish_bc_orig); + + /* Free the business card now that it is published +- (note that publish_bc_orig is the head of bc_val ) */ +- MPIDI_CH3I_BCFree( publish_bc_orig ); ++ * (note that publish_bc_orig is the head of bc_val) */ ++ MPIDI_CH3I_BCFree(publish_bc_orig); + +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CH3_INIT); + return mpi_errno; +- fn_fail: +- if (publish_bc_orig != NULL) { +- MPL_free(publish_bc_orig); +- } ++ fn_fail: ++ MPL_free(publish_bc_orig); + goto fn_exit; + } + +-/* This function simply tells the CH3 device to use the defaults for the ++/* This function simply tells the CH3 device to use the defaults for the + MPI Port functions */ +-int MPIDI_CH3_PortFnsInit( MPIDI_PortFns *portFns ATTRIBUTE((unused)) ) ++int MPIDI_CH3_PortFnsInit(MPIDI_PortFns * portFns ATTRIBUTE((unused))) + { + MPL_UNREFERENCED_ARG(portFns); + return 0; + } + + /* Perform the channel-specific vc initialization */ +-int MPIDI_CH3_VC_Init( MPIDI_VC_t *vc ) { ++int MPIDI_CH3_VC_Init(MPIDI_VC_t * vc) ++{ + MPIDI_CH3I_VC *vcch = &vc->ch; +- vcch->sendq_head = NULL; +- vcch->sendq_tail = NULL; +- vcch->state = MPIDI_CH3I_VC_STATE_UNCONNECTED; +- MPIDI_VC_InitSock( vc ); +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CONNECT,TYPICAL,"vc=%p: Setting state (ch) to VC_STATE_UNCONNECTED (Initialization)", vc ); ++ vcch->sendq_head = NULL; ++ vcch->sendq_tail = NULL; ++ vcch->state = MPIDI_CH3I_VC_STATE_UNCONNECTED; ++ MPIDI_VC_InitSock(vc); ++ MPL_DBG_MSG_P(MPIDI_CH3_DBG_CONNECT, TYPICAL, ++ "vc=%p: Setting state (ch) to VC_STATE_UNCONNECTED (Initialization)", vc); + return 0; + } + +-const char * MPIDI_CH3_VC_GetStateString( struct MPIDI_VC *vc ) +-{ + #ifdef MPL_USE_DBG_LOGGING +- return MPIDI_CH3_VC_SockGetStateString( vc ); +-#else +- return "unknown"; +-#endif ++const char *MPIDI_CH3_VC_GetStateString(struct MPIDI_VC *vc) ++{ ++ return MPIDI_CH3_VC_SockGetStateString(vc); + } ++#endif + + /* Select the routine that uses sockets to connect two communicators + using a socket */ +-int MPIDI_CH3_Connect_to_root(const char * port_name, +- MPIDI_VC_t ** new_vc) ++int MPIDI_CH3_Connect_to_root(const char *port_name, MPIDI_VC_t ** new_vc) + { +- return MPIDI_CH3I_Connect_to_root_sock( port_name, new_vc ); ++ return MPIDI_CH3I_Connect_to_root_sock(port_name, new_vc); + } + + /* This routine is a hook for initializing information for a process + group before the MPIDI_CH3_VC_Init routine is called */ +-int MPIDI_CH3_PG_Init( MPIDI_PG_t *pg ATTRIBUTE((unused)) ) ++int MPIDI_CH3_PG_Init(MPIDI_PG_t * pg ATTRIBUTE((unused))) + { + return MPI_SUCCESS; + } + + /* This routine is a hook for any operations that need to be performed before + freeing a process group */ +-int MPIDI_CH3_PG_Destroy( struct MPIDI_PG *pg ATTRIBUTE((unused)) ) ++int MPIDI_CH3_PG_Destroy(struct MPIDI_PG *pg ATTRIBUTE((unused))) + { + return MPI_SUCCESS; + } + + /* This routine is a hook for any operations that need to be performed before + freeing a virtual connection */ +-int MPIDI_CH3_VC_Destroy( struct MPIDI_VC *vc ATTRIBUTE((unused)) ) ++int MPIDI_CH3_VC_Destroy(struct MPIDI_VC *vc ATTRIBUTE((unused))) + { + return MPI_SUCCESS; + } + +-int MPIDI_CH3_InitCompleted( void ) ++int MPIDI_CH3_InitCompleted(void) + { + return MPI_SUCCESS; + } +--- a/src/mpid/ch3/channels/sock/src/ch3_isend.c ++++ b/src/mpid/ch3/channels/sock/src/ch3_isend.c +@@ -6,198 +6,173 @@ + + #include "mpidi_ch3_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME update_request +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static void update_request(MPIR_Request * sreq, void * hdr, +- intptr_t hdr_sz, size_t nb) ++static void update_request(MPIR_Request * sreq, void *hdr, intptr_t hdr_sz, size_t nb) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_UPDATE_REQUEST); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_UPDATE_REQUEST); + MPIR_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t)); + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; +- sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb); ++ sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) &sreq->dev.pending_pkt + nb); + sreq->dev.iov[0].MPL_IOV_LEN = hdr_sz - nb; + sreq->dev.iov_count = 1; + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_UPDATE_REQUEST); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_iSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPIR_Request * sreq, void * hdr, +- intptr_t hdr_sz) ++int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz) + { + int mpi_errno = MPI_SUCCESS; +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); ++ int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); + MPIDI_CH3I_VC *vcch = &vc->ch; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_ISEND); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_ISEND); + +- MPIR_Assert( hdr_sz <= sizeof(MPIDI_CH3_Pkt_t) ); ++ MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); + +- /* The sock channel uses a fixed length header, the size of which is the +- maximum of all possible packet headers */ ++ /* The sock channel uses a fixed length header, the size of which is the ++ * maximum of all possible packet headers */ + hdr_sz = sizeof(MPIDI_CH3_Pkt_t); +- MPL_DBG_STMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)hdr)); ++ MPL_DBG_STMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr)); + +- if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) /* MT */ +- { +- /* Connection already formed. If send queue is empty attempt to send +- data, queuing any unsent data. */ +- if (MPIDI_CH3I_SendQ_empty(vcch)) /* MT */ +- { +- size_t nb; +- int rc; ++ if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) { /* MT */ ++ /* Connection already formed. If send queue is empty attempt to send ++ * data, queuing any unsent data. */ ++ if (MPIDI_CH3I_SendQ_empty(vcch)) { /* MT */ ++ size_t nb; ++ int rc; + +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "send queue empty, attempting to write"); +- MPL_DBG_PKT(vcch->conn,hdr,"isend"); +- /* MT: need some signalling to lock down our right to use the +- channel, thus insuring that the progress engine does +- also try to write */ +- rc = MPIDI_CH3I_Sock_write(vcch->sock, hdr, hdr_sz, &nb); +- if (rc == MPI_SUCCESS) +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "wrote %ld bytes", (unsigned long) nb); +- +- if (nb == hdr_sz) +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "write complete %" PRIdPTR " bytes, calling OnDataAvail fcn", nb); +- reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) { +- MPIR_Assert(MPIDI_Request_get_type(sreq)!=MPIDI_REQUEST_TYPE_GET_RESP); ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send queue empty, attempting to write"); ++ MPL_DBG_PKT(vcch->conn, hdr, "isend"); ++ /* MT: need some signalling to lock down our right to use the ++ * channel, thus insuring that the progress engine does ++ * also try to write */ ++ rc = MPIDI_CH3I_Sock_write(vcch->sock, hdr, hdr_sz, &nb); ++ if (rc == MPI_SUCCESS) { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "wrote %ld bytes", (unsigned long) nb); ++ ++ if (nb == hdr_sz) { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "write complete %" PRIdPTR " bytes, calling OnDataAvail fcn", nb); ++ reqFn = sreq->dev.OnDataAvail; ++ if (!reqFn) { ++ MPIR_Assert(MPIDI_Request_get_type(sreq) != MPIDI_REQUEST_TYPE_GET_RESP); + mpi_errno = MPID_Request_complete(sreq); + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); + } +- } +- else { +- int complete; +- mpi_errno = reqFn( vc, sreq, &complete ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- if (!complete) { +- MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST, +- "posting writev, vc=0x%p, sreq=0x%08x", vc, sreq->handle)); +- vcch->conn->send_active = sreq; +- mpi_errno = MPIDI_CH3I_Sock_post_writev( +- vcch->conn->sock, sreq->dev.iov, +- sreq->dev.iov_count, NULL); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|postwrite", "ch3|sock|postwrite %p %p %p", +- sreq, vcch->conn, vc); +- } +- /* --END ERROR HANDLING-- */ +- } +- } +- } +- else +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "partial write of %" PRIdPTR " bytes, request enqueued at head", nb); +- update_request(sreq, hdr, hdr_sz, nb); +- MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"posting write, vc=0x%p, sreq=0x%08x", vc, sreq->handle)); +- vcch->conn->send_active = sreq; +- mpi_errno = MPIDI_CH3I_Sock_post_write(vcch->conn->sock, +- sreq->dev.iov[0].MPL_IOV_BUF, +- sreq->dev.iov[0].MPL_IOV_LEN, +- sreq->dev.iov[0].MPL_IOV_LEN, NULL); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|postwrite", "ch3|sock|postwrite %p %p %p", +- sreq, vcch->conn, vc); +- } +- /* --END ERROR HANDLING-- */ +- } +- } +- /* --BEGIN ERROR HANDLING-- */ +- else if (MPIR_ERR_GET_CLASS(rc) == MPIDI_CH3I_SOCK_ERR_NOMEM) +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,TYPICAL, +- "MPIDI_CH3I_Sock_write failed, out of memory"); +- sreq->status.MPI_ERROR = MPIR_ERR_MEMALLOCFAILED; +- } +- else +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL, +- "MPIDI_CH3I_Sock_write failed, rc=%d", rc); +- /* Connection just failed. Mark the request complete and +- return an error. */ +- MPL_DBG_VCCHSTATECHANGE(vc,VC_STATE_FAILED); +- /* FIXME: Shouldn't the vc->state also change? */ +- vcch->state = MPIDI_CH3I_VC_STATE_FAILED; +- sreq->status.MPI_ERROR = MPIR_Err_create_code( rc, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_INTERN, "**ch3|sock|writefailed", +- "**ch3|sock|writefailed %d", rc ); +- /* MT -CH3U_Request_complete() performs write barrier */ +- MPID_Request_complete(sreq); +- /* Make sure that the caller sees this error */ +- mpi_errno = sreq->status.MPI_ERROR; +- } +- /* --END ERROR HANDLING-- */ +- } +- else +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"send queue not empty, enqueuing"); +- update_request(sreq, hdr, hdr_sz, 0); +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- } +- } +- else if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTING) /* MT */ +- { +- /* queuing the data so it can be sent later. */ +- MPL_DBG_VCUSE(vc,"connecting. enqueuing request"); +- update_request(sreq, hdr, hdr_sz, 0); +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- } +- else if (vcch->state == MPIDI_CH3I_VC_STATE_UNCONNECTED) /* MT */ +- { +- /* Form a new connection, queuing the data so it can be sent later. */ +- MPL_DBG_VCUSE(vc,"unconnected. enqueuing request"); +- update_request(sreq, hdr, hdr_sz, 0); +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- mpi_errno = MPIDI_CH3I_VC_post_connect(vc); +- if (mpi_errno) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- else if (vcch->state != MPIDI_CH3I_VC_STATE_FAILED) +- { +- /* Unable to send data at the moment, so queue it for later */ +- MPL_DBG_VCUSE(vc,"still connecting. Enqueuing request"); +- update_request(sreq, hdr, hdr_sz, 0); +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } else { ++ int complete; ++ mpi_errno = reqFn(vc, sreq, &complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ if (!complete) { ++ MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "posting writev, vc=0x%p, sreq=0x%08x", vc, ++ sreq->handle)); ++ vcch->conn->send_active = sreq; ++ mpi_errno = MPIDI_CH3I_Sock_post_writev(vcch->conn->sock, sreq->dev.iov, ++ sreq->dev.iov_count, NULL); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, ++ __LINE__, MPI_ERR_OTHER, ++ "**ch3|sock|postwrite", ++ "ch3|sock|postwrite %p %p %p", sreq, ++ vcch->conn, vc); ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ } ++ } else { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "partial write of %" PRIdPTR " bytes, request enqueued at head", ++ nb); ++ update_request(sreq, hdr, hdr_sz, nb); ++ MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "posting write, vc=0x%p, sreq=0x%08x", vc, ++ sreq->handle)); ++ vcch->conn->send_active = sreq; ++ mpi_errno = MPIDI_CH3I_Sock_post_write(vcch->conn->sock, ++ sreq->dev.iov[0].MPL_IOV_BUF, ++ sreq->dev.iov[0].MPL_IOV_LEN, ++ sreq->dev.iov[0].MPL_IOV_LEN, NULL); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|postwrite", ++ "ch3|sock|postwrite %p %p %p", sreq, vcch->conn, ++ vc); ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else if (MPIR_ERR_GET_CLASS(rc) == MPIDI_CH3I_SOCK_ERR_NOMEM) { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, TYPICAL, ++ "MPIDI_CH3I_Sock_write failed, out of memory"); ++ sreq->status.MPI_ERROR = MPIR_ERR_MEMALLOCFAILED; ++ } else { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, TYPICAL, ++ "MPIDI_CH3I_Sock_write failed, rc=%d", rc); ++ /* Connection just failed. Mark the request complete and ++ * return an error. */ ++ MPL_DBG_VCCHSTATECHANGE(vc, VC_STATE_FAILED); ++ /* FIXME: Shouldn't the vc->state also change? */ ++ vcch->state = MPIDI_CH3I_VC_STATE_FAILED; ++ sreq->status.MPI_ERROR = MPIR_Err_create_code(rc, ++ MPIR_ERR_RECOVERABLE, __func__, ++ __LINE__, MPI_ERR_INTERN, ++ "**ch3|sock|writefailed", ++ "**ch3|sock|writefailed %d", rc); ++ /* MT -CH3U_Request_complete() performs write barrier */ ++ MPID_Request_complete(sreq); ++ /* Make sure that the caller sees this error */ ++ mpi_errno = sreq->status.MPI_ERROR; ++ } ++ /* --END ERROR HANDLING-- */ ++ } else { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send queue not empty, enqueuing"); ++ update_request(sreq, hdr, hdr_sz, 0); ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } ++ } else if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTING) { /* MT */ ++ /* queuing the data so it can be sent later. */ ++ MPL_DBG_VCUSE(vc, "connecting. enqueuing request"); ++ update_request(sreq, hdr, hdr_sz, 0); ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } else if (vcch->state == MPIDI_CH3I_VC_STATE_UNCONNECTED) { /* MT */ ++ /* Form a new connection, queuing the data so it can be sent later. */ ++ MPL_DBG_VCUSE(vc, "unconnected. enqueuing request"); ++ update_request(sreq, hdr, hdr_sz, 0); ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ mpi_errno = MPIDI_CH3I_VC_post_connect(vc); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } else if (vcch->state != MPIDI_CH3I_VC_STATE_FAILED) { ++ /* Unable to send data at the moment, so queue it for later */ ++ MPL_DBG_VCUSE(vc, "still connecting. Enqueuing request"); ++ update_request(sreq, hdr, hdr_sz, 0); ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- /* Connection failed. Mark the request complete and return an error. */ +- /* TODO: Create an appropriate error message */ +- sreq->status.MPI_ERROR = MPI_ERR_INTERN; +- /* MT - CH3U_Request_complete() performs write barrier */ +- MPID_Request_complete(sreq); ++ else { ++ /* Connection failed. Mark the request complete and return an error. */ ++ /* TODO: Create an appropriate error message */ ++ sreq->status.MPI_ERROR = MPI_ERR_INTERN; ++ /* MT - CH3U_Request_complete() performs write barrier */ ++ MPID_Request_complete(sreq); + } + /* --END ERROR HANDLING-- */ + +- fn_fail: ++ fn_fail: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3_ISEND); + return mpi_errno; + } +- +--- a/src/mpid/ch3/channels/sock/src/ch3_isendv.c ++++ b/src/mpid/ch3/channels/sock/src/ch3_isendv.c +@@ -6,242 +6,202 @@ + + #include "mpidi_ch3_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME update_request +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void update_request(MPIR_Request * sreq, MPL_IOV * iov, int iov_count, +- int iov_offset, size_t nb) ++ int iov_offset, size_t nb) + { + int i; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_UPDATE_REQUEST); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_UPDATE_REQUEST); +- +- for (i = 0; i < iov_count; i++) +- { +- sreq->dev.iov[i] = iov[i]; ++ ++ for (i = 0; i < iov_count; i++) { ++ sreq->dev.iov[i] = iov[i]; + } +- if (iov_offset == 0) +- { +- MPIR_Assert(iov[0].MPL_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF; +- sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) &sreq->dev.pending_pkt; ++ if (iov_offset == 0) { ++ MPIR_Assert(iov[0].MPL_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); ++ sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF; ++ sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt; + } +- sreq->dev.iov[iov_offset].MPL_IOV_BUF = +- (MPL_IOV_BUF_CAST)((char *) sreq->dev.iov[iov_offset].MPL_IOV_BUF + nb ); ++ sreq->dev.iov[iov_offset].MPL_IOV_BUF = ++ (MPL_IOV_BUF_CAST) ((char *) sreq->dev.iov[iov_offset].MPL_IOV_BUF + nb); + sreq->dev.iov[iov_offset].MPL_IOV_LEN -= nb; + sreq->dev.iov_count = iov_count; + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_UPDATE_REQUEST); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_iSendv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPIR_Request * sreq, +- MPL_IOV * iov, int n_iov) ++int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPIR_Request * sreq, MPL_IOV * iov, int n_iov) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3I_VC *vcch = &vc->ch; +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); ++ int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_ISENDV); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_ISENDV); + +- if (sreq->dev.ext_hdr_sz > 0) { +- int i; +- for (i = n_iov-1; i >= 1; i--) { +- iov[i+1].MPL_IOV_BUF = iov[i].MPL_IOV_BUF; +- iov[i+1].MPL_IOV_LEN = iov[i].MPL_IOV_LEN; +- } +- iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) sreq->dev.ext_hdr_ptr; +- iov[1].MPL_IOV_LEN = sreq->dev.ext_hdr_sz; +- n_iov++; +- } +- + MPIR_Assert(n_iov <= MPL_IOV_LIMIT); + MPIR_Assert(iov[0].MPL_IOV_LEN <= sizeof(MPIDI_CH3_Pkt_t)); + +- /* The sock channel uses a fixed length header, the size of which is the +- maximum of all possible packet headers */ ++ /* The sock channel uses a fixed length header, the size of which is the ++ * maximum of all possible packet headers */ + iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); +- MPL_DBG_STMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)iov[0].MPL_IOV_BUF)); +- +- if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) /* MT */ +- { +- /* Connection already formed. If send queue is empty attempt to send +- data, queuing any unsent data. */ +- if (MPIDI_CH3I_SendQ_empty(vcch)) /* MT */ +- { +- size_t nb; +- int rc; +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "send queue empty, attempting to write"); +- +- MPL_DBG_PKT(vcch->conn,(MPIDI_CH3_Pkt_t*)iov[0].MPL_IOV_BUF, +- "isendv"); +- /* MT - need some signalling to lock down our right to use the +- channel, thus insuring that the progress engine does +- also try to write */ +- +- /* FIXME: the current code only agressively writes the first IOV. +- Eventually it should be changed to agressively write +- as much as possible. Ideally, the code would be shared between +- the send routines and the progress engine. */ +- rc = MPIDI_CH3I_Sock_writev(vcch->sock, iov, n_iov, &nb); +- if (rc == MPI_SUCCESS) +- { +- int offset = 0; +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "wrote %ld bytes", (unsigned long) nb); +- +- while (offset < n_iov) +- { +- if (iov[offset].MPL_IOV_LEN <= nb) +- { +- nb -= iov[offset].MPL_IOV_LEN; +- offset++; +- } +- else +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "partial write, request enqueued at head"); +- update_request(sreq, iov, n_iov, offset, nb); +- MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"posting writev, vc=0x%p, sreq=0x%08x", vc, sreq->handle)); +- vcch->conn->send_active = sreq; +- mpi_errno = MPIDI_CH3I_Sock_post_writev(vcch->conn->sock, +- sreq->dev.iov + offset, +- sreq->dev.iov_count - offset, NULL); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|postwrite", "ch3|sock|postwrite %p %p %p", +- sreq, vcch->conn, vc); +- } +- /* --END ERROR HANDLING-- */ +- +- break; +- } +- +- } +- if (offset == n_iov) +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "write complete, calling OnDataAvail fcn"); +- reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) { +- MPIR_Assert(MPIDI_Request_get_type(sreq)!=MPIDI_REQUEST_TYPE_GET_RESP); ++ MPL_DBG_STMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF)); ++ ++ if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) { /* MT */ ++ /* Connection already formed. If send queue is empty attempt to send ++ * data, queuing any unsent data. */ ++ if (MPIDI_CH3I_SendQ_empty(vcch)) { /* MT */ ++ size_t nb; ++ int rc; ++ ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send queue empty, attempting to write"); ++ ++ MPL_DBG_PKT(vcch->conn, (MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF, "isendv"); ++ /* MT - need some signalling to lock down our right to use the ++ * channel, thus insuring that the progress engine does ++ * also try to write */ ++ ++ /* FIXME: the current code only agressively writes the first IOV. ++ * Eventually it should be changed to agressively write ++ * as much as possible. Ideally, the code would be shared between ++ * the send routines and the progress engine. */ ++ rc = MPIDI_CH3I_Sock_writev(vcch->sock, iov, n_iov, &nb); ++ if (rc == MPI_SUCCESS) { ++ int offset = 0; ++ ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "wrote %ld bytes", (unsigned long) nb); ++ ++ while (offset < n_iov) { ++ if (iov[offset].MPL_IOV_LEN <= nb) { ++ nb -= iov[offset].MPL_IOV_LEN; ++ offset++; ++ } else { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "partial write, request enqueued at head"); ++ update_request(sreq, iov, n_iov, offset, nb); ++ MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "posting writev, vc=0x%p, sreq=0x%08x", vc, ++ sreq->handle)); ++ vcch->conn->send_active = sreq; ++ mpi_errno = MPIDI_CH3I_Sock_post_writev(vcch->conn->sock, ++ sreq->dev.iov + offset, ++ sreq->dev.iov_count - offset, NULL); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|postwrite", ++ "ch3|sock|postwrite %p %p %p", sreq, ++ vcch->conn, vc); ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ break; ++ } ++ ++ } ++ if (offset == n_iov) { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "write complete, calling OnDataAvail fcn"); ++ reqFn = sreq->dev.OnDataAvail; ++ if (!reqFn) { ++ MPIR_Assert(MPIDI_Request_get_type(sreq) != MPIDI_REQUEST_TYPE_GET_RESP); + mpi_errno = MPID_Request_complete(sreq); + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); + } +- } +- else { +- int complete; +- mpi_errno = reqFn( vc, sreq, &complete ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- if (!complete) { +- MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"posting writev, vc=0x%p, sreq=0x%08x", vc, sreq->handle)); +- vcch->conn->send_active = sreq; +- mpi_errno = MPIDI_CH3I_Sock_post_writev( +- vcch->conn->sock, sreq->dev.iov, +- sreq->dev.iov_count, NULL); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|postwrite", "ch3|sock|postwrite %p %p %p", +- sreq, vcch->conn, vc); +- } +- /* --END ERROR HANDLING-- */ +- } +- } +- } +- } +- /* --BEGIN ERROR HANDLING-- */ +- else if (MPIR_ERR_GET_CLASS(rc) == MPIDI_CH3I_SOCK_ERR_NOMEM) +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,TYPICAL, +- "MPIDI_CH3I_Sock_writev failed, out of memory"); +- sreq->status.MPI_ERROR = MPIR_ERR_MEMALLOCFAILED; +- } +- else +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL, +- "MPIDI_CH3I_Sock_writev failed, rc=%d", rc); +- /* Connection just failed. Mark the request complete and +- return an error. */ +- MPL_DBG_VCCHSTATECHANGE(vc,VC_STATE_FAILED); +- /* FIXME: Shouldn't the vc->state also change? */ +- +- vcch->state = MPIDI_CH3I_VC_STATE_FAILED; +- sreq->status.MPI_ERROR = MPIR_Err_create_code( rc, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_INTERN, "**ch3|sock|writefailed", +- "**ch3|sock|writefailed %d", rc ); +- /* MT - CH3U_Request_complete performs write barrier */ +- MPID_Request_complete(sreq); +- /* Return error to calling routine */ +- mpi_errno = sreq->status.MPI_ERROR; +- } +- /* --END ERROR HANDLING-- */ +- } +- else +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"send queue not empty, enqueuing"); +- update_request(sreq, iov, n_iov, 0, 0); +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- } +- } +- else if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTING) +- { +- /* queuing the data so it can be sent later. */ +- MPL_DBG_VCUSE(vc,"connecting. Enqueuing request"); +- update_request(sreq, iov, n_iov, 0, 0); +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- } +- else if (vcch->state == MPIDI_CH3I_VC_STATE_UNCONNECTED) +- { +- /* Form a new connection, queuing the data so it can be sent later. */ +- MPL_DBG_VCUSE(vc,"unconnected. Enqueuing request"); +- update_request(sreq, iov, n_iov, 0, 0); +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- mpi_errno = MPIDI_CH3I_VC_post_connect(vc); +- if (mpi_errno) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- else if (vcch->state != MPIDI_CH3I_VC_STATE_FAILED) +- { +- /* Unable to send data at the moment, so queue it for later */ +- MPL_DBG_VCUSE(vc,"still connecting. enqueuing request"); +- update_request(sreq, iov, n_iov, 0, 0); +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } else { ++ int complete; ++ mpi_errno = reqFn(vc, sreq, &complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ if (!complete) { ++ MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "posting writev, vc=0x%p, sreq=0x%08x", ++ vc, sreq->handle)); ++ vcch->conn->send_active = sreq; ++ mpi_errno = MPIDI_CH3I_Sock_post_writev(vcch->conn->sock, sreq->dev.iov, ++ sreq->dev.iov_count, NULL); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, ++ __LINE__, MPI_ERR_OTHER, ++ "**ch3|sock|postwrite", ++ "ch3|sock|postwrite %p %p %p", sreq, ++ vcch->conn, vc); ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ } ++ } ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else if (MPIR_ERR_GET_CLASS(rc) == MPIDI_CH3I_SOCK_ERR_NOMEM) { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, TYPICAL, ++ "MPIDI_CH3I_Sock_writev failed, out of memory"); ++ sreq->status.MPI_ERROR = MPIR_ERR_MEMALLOCFAILED; ++ } else { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, TYPICAL, ++ "MPIDI_CH3I_Sock_writev failed, rc=%d", rc); ++ /* Connection just failed. Mark the request complete and ++ * return an error. */ ++ MPL_DBG_VCCHSTATECHANGE(vc, VC_STATE_FAILED); ++ /* FIXME: Shouldn't the vc->state also change? */ ++ ++ vcch->state = MPIDI_CH3I_VC_STATE_FAILED; ++ sreq->status.MPI_ERROR = MPIR_Err_create_code(rc, ++ MPIR_ERR_RECOVERABLE, __func__, ++ __LINE__, MPI_ERR_INTERN, ++ "**ch3|sock|writefailed", ++ "**ch3|sock|writefailed %d", rc); ++ /* MT - CH3U_Request_complete performs write barrier */ ++ MPID_Request_complete(sreq); ++ /* Return error to calling routine */ ++ mpi_errno = sreq->status.MPI_ERROR; ++ } ++ /* --END ERROR HANDLING-- */ ++ } else { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send queue not empty, enqueuing"); ++ update_request(sreq, iov, n_iov, 0, 0); ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } ++ } else if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTING) { ++ /* queuing the data so it can be sent later. */ ++ MPL_DBG_VCUSE(vc, "connecting. Enqueuing request"); ++ update_request(sreq, iov, n_iov, 0, 0); ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } else if (vcch->state == MPIDI_CH3I_VC_STATE_UNCONNECTED) { ++ /* Form a new connection, queuing the data so it can be sent later. */ ++ MPL_DBG_VCUSE(vc, "unconnected. Enqueuing request"); ++ update_request(sreq, iov, n_iov, 0, 0); ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ mpi_errno = MPIDI_CH3I_VC_post_connect(vc); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } else if (vcch->state != MPIDI_CH3I_VC_STATE_FAILED) { ++ /* Unable to send data at the moment, so queue it for later */ ++ MPL_DBG_VCUSE(vc, "still connecting. enqueuing request"); ++ update_request(sreq, iov, n_iov, 0, 0); ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- MPL_DBG_VCUSE(vc,"connection failed"); +- /* Connection failed. Mark the request complete and return an error. */ +- /* TODO: Create an appropriate error message */ +- sreq->status.MPI_ERROR = MPI_ERR_INTERN; +- /* MT - CH3U_Request_complete performs write barrier */ +- MPID_Request_complete(sreq); ++ else { ++ MPL_DBG_VCUSE(vc, "connection failed"); ++ /* Connection failed. Mark the request complete and return an error. */ ++ /* TODO: Create an appropriate error message */ ++ sreq->status.MPI_ERROR = MPI_ERR_INTERN; ++ /* MT - CH3U_Request_complete performs write barrier */ ++ MPID_Request_complete(sreq); + } + /* --END ERROR HANDLING-- */ + +- fn_fail: ++ fn_fail: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3_ISENDV); + return mpi_errno; + } +- +--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c ++++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c +@@ -6,14 +6,9 @@ + + #include "mpidi_ch3_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME create_request +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static MPIR_Request * create_request(void * hdr, intptr_t hdr_sz, +- size_t nb) ++static MPIR_Request *create_request(void *hdr, intptr_t hdr_sz, size_t nb) + { +- MPIR_Request * sreq; ++ MPIR_Request *sreq; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CREATE_REQUEST); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CREATE_REQUEST); +@@ -21,191 +16,171 @@ static MPIR_Request * create_request(void * hdr, intptr_t hdr_sz, + sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); + /* --BEGIN ERROR HANDLING-- */ + if (sreq == NULL) +- return NULL; ++ return NULL; + /* --END ERROR HANDLING-- */ + MPIR_Object_set_ref(sreq, 2); + sreq->kind = MPIR_REQUEST_KIND__SEND; + MPIR_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t)); + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; +- sreq->dev.iov[0].MPL_IOV_BUF = +- (MPL_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb); ++ sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) &sreq->dev.pending_pkt + nb); + sreq->dev.iov[0].MPL_IOV_LEN = hdr_sz - nb; + sreq->dev.iov_count = 1; + sreq->dev.OnDataAvail = 0; +- ++ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CREATE_REQUEST); + return sreq; + } + + /* +- * MPIDI_CH3_iStartMsg() attempts to send the message immediately. If the ++ * MPIDI_CH3_iStartMsg() attempts to send the message immediately. If the + * entire message is successfully sent, then NULL is +- * returned. Otherwise a request is allocated, the header is copied into the ++ * returned. Otherwise a request is allocated, the header is copied into the + * request, and a pointer to the request is returned. +- * An error condition also results in a request be allocated and the errror ++ * An error condition also results in a request be allocated and the errror + * being returned in the status field of the request. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_iStartMsg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz, +- MPIR_Request ** sreq_ptr) ++int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, MPIR_Request ** sreq_ptr) + { +- MPIR_Request * sreq = NULL; ++ MPIR_Request *sreq = NULL; + MPIDI_CH3I_VC *vcch = &vc->ch; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_ISTARTMSG); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_ISTARTMSG); +- +- MPIR_Assert( hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); + +- /* The SOCK channel uses a fixed length header, the size of which is the +- maximum of all possible packet headers */ ++ MPIR_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); ++ ++ /* The SOCK channel uses a fixed length header, the size of which is the ++ * maximum of all possible packet headers */ + hdr_sz = sizeof(MPIDI_CH3_Pkt_t); +- MPL_DBG_STMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)hdr)); +- +- if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) /* MT */ +- { +- /* Connection already formed. If send queue is empty attempt to send +- data, queuing any unsent data. */ +- if (MPIDI_CH3I_SendQ_empty(vcch)) /* MT */ +- { +- size_t nb; +- int rc; +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "send queue empty, attempting to write"); +- +- MPL_DBG_PKT(vcch->conn,hdr,"istartmsg"); +- /* MT: need some signalling to lock down our right to use the +- channel, thus insuring that the progress engine does +- not also try to write */ +- rc = MPIDI_CH3I_Sock_write(vcch->sock, hdr, hdr_sz, &nb); +- if (rc == MPI_SUCCESS) +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "wrote %ld bytes", (unsigned long) nb); +- +- if (nb == hdr_sz) +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "entire write complete, %" PRIdPTR " bytes", nb); +- /* done. get us out of here as quickly as possible. */ +- } +- else +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "partial write of %" PRIdPTR " bytes, request enqueued at head", nb); +- sreq = create_request(hdr, hdr_sz, nb); +- if (!sreq) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- +- MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"posting write, vc=0x%p, sreq=0x%08x", vc, sreq->handle)); +- vcch->conn->send_active = sreq; +- mpi_errno = MPIDI_CH3I_Sock_post_write(vcch->conn->sock, sreq->dev.iov[0].MPL_IOV_BUF, +- sreq->dev.iov[0].MPL_IOV_LEN, sreq->dev.iov[0].MPL_IOV_LEN, NULL); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|postwrite", "ch3|sock|postwrite %p %p %p", +- sreq, vcch->conn, vc); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- } +- } +- /* --BEGIN ERROR HANDLING-- */ +- else +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL, +- "ERROR - MPIDI_CH3I_Sock_write failed, rc=%d", rc); +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +- if (!sreq) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- sreq->kind = MPIR_REQUEST_KIND__SEND; +- MPIR_cc_set(&(sreq->cc), 0); +- sreq->status.MPI_ERROR = MPIR_Err_create_code( rc, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_INTERN, "**ch3|sock|writefailed", +- "**ch3|sock|writefailed %d", rc ); +- /* Make sure that the caller sees this error */ +- mpi_errno = sreq->status.MPI_ERROR; +- } +- /* --END ERROR HANDLING-- */ +- } +- else +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "send in progress, request enqueued"); +- sreq = create_request(hdr, hdr_sz, 0); +- if (!sreq) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- } +- } +- else if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTING) /* MT */ +- { +- MPL_DBG_VCUSE(vc, +- "connecteding. enqueuing request"); +- +- /* queue the data so it can be sent after the connection is formed */ +- sreq = create_request(hdr, hdr_sz, 0); +- if (!sreq) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- } +- else if (vcch->state == MPIDI_CH3I_VC_STATE_UNCONNECTED) /* MT */ +- { +- MPL_DBG_VCUSE(vc, +- "unconnected. posting connect and enqueuing request"); +- +- /* queue the data so it can be sent after the connection is formed */ +- sreq = create_request(hdr, hdr_sz, 0); +- if (!sreq) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- +- /* Form a new connection */ +- MPIDI_CH3I_VC_post_connect(vc); +- } +- else if (vcch->state != MPIDI_CH3I_VC_STATE_FAILED) +- { +- /* Unable to send data at the moment, so queue it for later */ +- MPL_DBG_VCUSE(vc,"forming connection, request enqueued"); +- sreq = create_request(hdr, hdr_sz, 0); +- if (!sreq) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ MPL_DBG_STMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr)); ++ ++ if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) { /* MT */ ++ /* Connection already formed. If send queue is empty attempt to send ++ * data, queuing any unsent data. */ ++ if (MPIDI_CH3I_SendQ_empty(vcch)) { /* MT */ ++ size_t nb; ++ int rc; ++ ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send queue empty, attempting to write"); ++ ++ MPL_DBG_PKT(vcch->conn, hdr, "istartmsg"); ++ /* MT: need some signalling to lock down our right to use the ++ * channel, thus insuring that the progress engine does ++ * not also try to write */ ++ rc = MPIDI_CH3I_Sock_write(vcch->sock, hdr, hdr_sz, &nb); ++ if (rc == MPI_SUCCESS) { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "wrote %ld bytes", (unsigned long) nb); ++ ++ if (nb == hdr_sz) { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "entire write complete, %" PRIdPTR " bytes", nb); ++ /* done. get us out of here as quickly as possible. */ ++ } else { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "partial write of %" PRIdPTR " bytes, request enqueued at head", ++ nb); ++ sreq = create_request(hdr, hdr_sz, nb); ++ if (!sreq) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ ++ MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "posting write, vc=0x%p, sreq=0x%08x", vc, ++ sreq->handle)); ++ vcch->conn->send_active = sreq; ++ mpi_errno = ++ MPIDI_CH3I_Sock_post_write(vcch->conn->sock, sreq->dev.iov[0].MPL_IOV_BUF, ++ sreq->dev.iov[0].MPL_IOV_LEN, ++ sreq->dev.iov[0].MPL_IOV_LEN, NULL); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|postwrite", ++ "ch3|sock|postwrite %p %p %p", sreq, vcch->conn, ++ vc); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, TYPICAL, ++ "ERROR - MPIDI_CH3I_Sock_write failed, rc=%d", rc); ++ sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); ++ if (!sreq) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ sreq->kind = MPIR_REQUEST_KIND__SEND; ++ MPIR_cc_set(&(sreq->cc), 0); ++ sreq->status.MPI_ERROR = MPIR_Err_create_code(rc, ++ MPIR_ERR_RECOVERABLE, __func__, ++ __LINE__, MPI_ERR_INTERN, ++ "**ch3|sock|writefailed", ++ "**ch3|sock|writefailed %d", rc); ++ /* Make sure that the caller sees this error */ ++ mpi_errno = sreq->status.MPI_ERROR; ++ } ++ /* --END ERROR HANDLING-- */ ++ } else { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send in progress, request enqueued"); ++ sreq = create_request(hdr, hdr_sz, 0); ++ if (!sreq) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } ++ } else if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTING) { /* MT */ ++ MPL_DBG_VCUSE(vc, "connecteding. enqueuing request"); ++ ++ /* queue the data so it can be sent after the connection is formed */ ++ sreq = create_request(hdr, hdr_sz, 0); ++ if (!sreq) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } else if (vcch->state == MPIDI_CH3I_VC_STATE_UNCONNECTED) { /* MT */ ++ MPL_DBG_VCUSE(vc, "unconnected. posting connect and enqueuing request"); ++ ++ /* queue the data so it can be sent after the connection is formed */ ++ sreq = create_request(hdr, hdr_sz, 0); ++ if (!sreq) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ ++ /* Form a new connection */ ++ MPIDI_CH3I_VC_post_connect(vc); ++ } else if (vcch->state != MPIDI_CH3I_VC_STATE_FAILED) { ++ /* Unable to send data at the moment, so queue it for later */ ++ MPL_DBG_VCUSE(vc, "forming connection, request enqueued"); ++ sreq = create_request(hdr, hdr_sz, 0); ++ if (!sreq) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- /* Connection failed, so allocate a request and return an error. */ +- MPL_DBG_VCUSE(vc,"ERROR - connection failed"); +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +- if (!sreq) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- sreq->kind = MPIR_REQUEST_KIND__SEND; +- MPIR_cc_set(&sreq->cc, 0); +- +- sreq->status.MPI_ERROR = MPIR_Err_create_code( MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_INTERN, "**ch3|sock|connectionfailed",0 ); +- /* Make sure that the caller sees this error */ +- mpi_errno = sreq->status.MPI_ERROR; ++ else { ++ /* Connection failed, so allocate a request and return an error. */ ++ MPL_DBG_VCUSE(vc, "ERROR - connection failed"); ++ sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); ++ if (!sreq) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ sreq->kind = MPIR_REQUEST_KIND__SEND; ++ MPIR_cc_set(&sreq->cc, 0); ++ ++ sreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_INTERN, "**ch3|sock|connectionfailed", ++ 0); ++ /* Make sure that the caller sees this error */ ++ mpi_errno = sreq->status.MPI_ERROR; + } + /* --END ERROR HANDLING-- */ + +--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c ++++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c +@@ -6,37 +6,31 @@ + + #include "mpidi_ch3_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME create_request +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static MPIR_Request * create_request(MPL_IOV * iov, int iov_count, +- int iov_offset, size_t nb) ++static MPIR_Request *create_request(MPL_IOV * iov, int iov_count, int iov_offset, size_t nb) + { +- MPIR_Request * sreq; ++ MPIR_Request *sreq; + int i; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CREATE_REQUEST); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CREATE_REQUEST); +- ++ + sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); + /* --BEGIN ERROR HANDLING-- */ + if (sreq == NULL) +- return NULL; ++ return NULL; + /* --END ERROR HANDLING-- */ + MPIR_Object_set_ref(sreq, 2); +- +- for (i = 0; i < iov_count; i++) +- { +- sreq->dev.iov[i] = iov[i]; ++ ++ for (i = 0; i < iov_count; i++) { ++ sreq->dev.iov[i] = iov[i]; + } +- if (iov_offset == 0) +- { +- MPIR_Assert(iov[0].MPL_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); +- sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF; +- sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) &sreq->dev.pending_pkt; ++ if (iov_offset == 0) { ++ MPIR_Assert(iov[0].MPL_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); ++ sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF; ++ sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt; + } +- sreq->dev.iov[iov_offset].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)((char *) sreq->dev.iov[iov_offset].MPL_IOV_BUF + nb); ++ sreq->dev.iov[iov_offset].MPL_IOV_BUF = ++ (MPL_IOV_BUF_CAST) ((char *) sreq->dev.iov[iov_offset].MPL_IOV_BUF + nb); + sreq->dev.iov[iov_offset].MPL_IOV_LEN -= nb; + sreq->dev.iov_count = iov_count; + sreq->dev.OnDataAvail = 0; +@@ -46,194 +40,172 @@ static MPIR_Request * create_request(MPL_IOV * iov, int iov_count, + } + + /* +- * MPIDI_CH3_iStartMsgv() attempts to send the message immediately. If the ++ * MPIDI_CH3_iStartMsgv() attempts to send the message immediately. If the + * entire message is successfully sent, then NULL is +- * returned. Otherwise a request is allocated, the iovec and the first buffer ++ * returned. Otherwise a request is allocated, the iovec and the first buffer + * pointed to by the iovec (which is assumed to be a +- * MPIDI_CH3_Pkt_t) are copied into the request, and a pointer to the request ++ * MPIDI_CH3_Pkt_t) are copied into the request, and a pointer to the request + * is returned. An error condition also results in a +- * request be allocated and the errror being returned in the status field of ++ * request be allocated and the errror being returned in the status field of + * the request. + */ + + /* XXX - What do we do if MPIR_Request_create returns NULL??? + If MPIDI_CH3_iStartMsgv() returns NULL, the calling code +- assumes the request completely successfully, but the reality is that we ++ assumes the request completely successfully, but the reality is that we + couldn't allocate the memory for a request. This + seems like a flaw in the CH3 API. */ + +-/* NOTE - The completion action associated with a request created by ++/* NOTE - The completion action associated with a request created by + CH3_iStartMsgv() is alway MPIDI_CH3_CA_COMPLETE. This +- implies that CH3_iStartMsgv() can only be used when the entire message can ++ implies that CH3_iStartMsgv() can only be used when the entire message can + be described by a single iovec of size + MPL_IOV_LIMIT. */ +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_iStartMsgv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov, +- MPIR_Request ** sreq_ptr) ++ ++int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov, MPIR_Request ** sreq_ptr) + { +- MPIR_Request * sreq = NULL; ++ MPIR_Request *sreq = NULL; + MPIDI_CH3I_VC *vcch = &vc->ch; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_ISTARTMSGV); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_ISTARTMSGV); + +- MPIR_Assert( n_iov <= MPL_IOV_LIMIT); ++ MPIR_Assert(n_iov <= MPL_IOV_LIMIT); + +- /* The SOCK channel uses a fixed length header, the size of which is the +- maximum of all possible packet headers */ ++ /* The SOCK channel uses a fixed length header, the size of which is the ++ * maximum of all possible packet headers */ + iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); +- MPL_DBG_STMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)iov[0].MPL_IOV_BUF)); +- +- if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) /* MT */ +- { +- /* Connection already formed. If send queue is empty attempt to send +- data, queuing any unsent data. */ +- if (MPIDI_CH3I_SendQ_empty(vcch)) /* MT */ +- { +- int rc; +- size_t nb; +- +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "send queue empty, attempting to write"); +- MPL_DBG_PKT(vcch->conn,(MPIDI_CH3_Pkt_t*)iov[0].MPL_IOV_BUF,"isend"); +- +- /* MT - need some signalling to lock down our right to use the +- channel, thus insuring that the progress engine does +- also try to write */ +- rc = MPIDI_CH3I_Sock_writev(vcch->sock, iov, n_iov, &nb); +- if (rc == MPI_SUCCESS) +- { +- int offset = 0; +- +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "wrote %ld bytes", (unsigned long) nb); +- +- while (offset < n_iov) +- { +- if (nb >= (int)iov[offset].MPL_IOV_LEN) +- { +- nb -= iov[offset].MPL_IOV_LEN; +- offset++; +- } +- else +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "partial write, request enqueued at head"); +- sreq = create_request(iov, n_iov, offset, nb); +- if (sreq == NULL) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"posting writev, vc=0x%p, sreq=0x%08x", vc, sreq->handle)); +- vcch->conn->send_active = sreq; +- mpi_errno = MPIDI_CH3I_Sock_post_writev(vcch->conn->sock, sreq->dev.iov + offset, +- sreq->dev.iov_count - offset, NULL); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|postwrite", "ch3|sock|postwrite %p %p %p", +- sreq, vcch->conn, vc); +- } +- /* --END ERROR HANDLING-- */ +- break; +- } +- } +- +- if (offset == n_iov) +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"entire write complete"); +- } +- } +- /* --BEGIN ERROR HANDLING-- */ +- else +- { +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL, +- "ERROR - MPIDI_CH3I_Sock_writev failed, rc=%d", rc); +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- if (sreq == NULL) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIR_cc_set(&(sreq->cc), 0); +- sreq->status.MPI_ERROR = MPIR_Err_create_code( rc, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_INTERN, "**ch3|sock|writefailed", +- "**ch3|sock|writefailed %d", rc ); +- /* Make sure that the caller sees this error */ +- mpi_errno = sreq->status.MPI_ERROR; +- } +- /* --END ERROR HANDLING-- */ +- } +- else +- { +- MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- "send in progress, request enqueued"); +- sreq = create_request(iov, n_iov, 0, 0); +- if (sreq == NULL) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- } +- } +- else if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTING) +- { +- MPL_DBG_VCUSE(vc, +- "connecting. enqueuing request"); +- +- /* queue the data so it can be sent after the connection is formed */ +- sreq = create_request(iov, n_iov, 0, 0); +- if (sreq == NULL) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- } +- else if (vcch->state == MPIDI_CH3I_VC_STATE_UNCONNECTED) +- { +- MPL_DBG_VCUSE(vc, +- "unconnected. posting connect and enqueuing request"); +- +- /* queue the data so it can be sent after the connection is formed */ +- sreq = create_request(iov, n_iov, 0, 0); +- if (sreq == NULL) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); +- +- /* Form a new connection */ +- MPIDI_CH3I_VC_post_connect(vc); +- } +- else if (vcch->state != MPIDI_CH3I_VC_STATE_FAILED) +- { +- /* Unable to send data at the moment, so queue it for later */ +- MPL_DBG_VCUSE(vc,"forming connection, request enqueued"); +- sreq = create_request(iov, n_iov, 0, 0); +- if (sreq == NULL) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ MPL_DBG_STMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF)); ++ ++ if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) { /* MT */ ++ /* Connection already formed. If send queue is empty attempt to send ++ * data, queuing any unsent data. */ ++ if (MPIDI_CH3I_SendQ_empty(vcch)) { /* MT */ ++ int rc; ++ size_t nb; ++ ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send queue empty, attempting to write"); ++ MPL_DBG_PKT(vcch->conn, (MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF, "isend"); ++ ++ /* MT - need some signalling to lock down our right to use the ++ * channel, thus insuring that the progress engine does ++ * also try to write */ ++ rc = MPIDI_CH3I_Sock_writev(vcch->sock, iov, n_iov, &nb); ++ if (rc == MPI_SUCCESS) { ++ int offset = 0; ++ ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "wrote %ld bytes", (unsigned long) nb); ++ ++ while (offset < n_iov) { ++ if (nb >= (int) iov[offset].MPL_IOV_LEN) { ++ nb -= iov[offset].MPL_IOV_LEN; ++ offset++; ++ } else { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ "partial write, request enqueued at head"); ++ sreq = create_request(iov, n_iov, offset, nb); ++ if (sreq == NULL) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "posting writev, vc=0x%p, sreq=0x%08x", vc, ++ sreq->handle)); ++ vcch->conn->send_active = sreq; ++ mpi_errno = ++ MPIDI_CH3I_Sock_post_writev(vcch->conn->sock, sreq->dev.iov + offset, ++ sreq->dev.iov_count - offset, NULL); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|postwrite", ++ "ch3|sock|postwrite %p %p %p", sreq, ++ vcch->conn, vc); ++ } ++ /* --END ERROR HANDLING-- */ ++ break; ++ } ++ } ++ ++ if (offset == n_iov) { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "entire write complete"); ++ } ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else { ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, TYPICAL, ++ "ERROR - MPIDI_CH3I_Sock_writev failed, rc=%d", rc); ++ sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); ++ if (sreq == NULL) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIR_cc_set(&(sreq->cc), 0); ++ sreq->status.MPI_ERROR = MPIR_Err_create_code(rc, ++ MPIR_ERR_RECOVERABLE, __func__, ++ __LINE__, MPI_ERR_INTERN, ++ "**ch3|sock|writefailed", ++ "**ch3|sock|writefailed %d", rc); ++ /* Make sure that the caller sees this error */ ++ mpi_errno = sreq->status.MPI_ERROR; ++ } ++ /* --END ERROR HANDLING-- */ ++ } else { ++ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "send in progress, request enqueued"); ++ sreq = create_request(iov, n_iov, 0, 0); ++ if (sreq == NULL) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } ++ } else if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTING) { ++ MPL_DBG_VCUSE(vc, "connecting. enqueuing request"); ++ ++ /* queue the data so it can be sent after the connection is formed */ ++ sreq = create_request(iov, n_iov, 0, 0); ++ if (sreq == NULL) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ } else if (vcch->state == MPIDI_CH3I_VC_STATE_UNCONNECTED) { ++ MPL_DBG_VCUSE(vc, "unconnected. posting connect and enqueuing request"); ++ ++ /* queue the data so it can be sent after the connection is formed */ ++ sreq = create_request(iov, n_iov, 0, 0); ++ if (sreq == NULL) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); ++ ++ /* Form a new connection */ ++ MPIDI_CH3I_VC_post_connect(vc); ++ } else if (vcch->state != MPIDI_CH3I_VC_STATE_FAILED) { ++ /* Unable to send data at the moment, so queue it for later */ ++ MPL_DBG_VCUSE(vc, "forming connection, request enqueued"); ++ sreq = create_request(iov, n_iov, 0, 0); ++ if (sreq == NULL) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_CH3I_SendQ_enqueue(vcch, sreq); + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- /* Connection failed, so allocate a request and return an error. */ +- MPL_DBG_VCUSE(vc,"ERROR - connection failed"); +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- if (sreq == NULL) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem"); +- } +- MPIR_cc_set(&(sreq->cc), 0); +- sreq->status.MPI_ERROR = MPIR_Err_create_code( MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_INTERN, "**ch3|sock|connectionfailed",0 ); +- /* Make sure that the caller sees this error */ +- mpi_errno = sreq->status.MPI_ERROR; ++ else { ++ /* Connection failed, so allocate a request and return an error. */ ++ MPL_DBG_VCUSE(vc, "ERROR - connection failed"); ++ sreq = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); ++ if (sreq == NULL) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIR_cc_set(&(sreq->cc), 0); ++ sreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_INTERN, "**ch3|sock|connectionfailed", ++ 0); ++ /* Make sure that the caller sees this error */ ++ mpi_errno = sreq->status.MPI_ERROR; + } + /* --END ERROR HANDLING-- */ + +--- a/src/mpid/ch3/channels/sock/src/ch3_progress.c ++++ b/src/mpid/ch3/channels/sock/src/ch3_progress.c +@@ -13,11 +13,11 @@ + #include + #endif + +-static MPIDI_CH3_PktHandler_Fcn *pktArray[MPIDI_CH3_PKT_END_CH3+1]; ++static MPIDI_CH3_PktHandler_Fcn *pktArray[MPIDI_CH3_PKT_END_CH3 + 1]; + +-static int ReadMoreData( MPIDI_CH3I_Connection_t *, MPIR_Request * ); ++static int ReadMoreData(MPIDI_CH3I_Connection_t *, MPIR_Request *); + +-static int MPIDI_CH3i_Progress_wait(MPID_Progress_state * ); ++static int MPIDI_CH3i_Progress_wait(MPID_Progress_state *); + static int MPIDI_CH3i_Progress_test(void); + + /* FIXME: Move thread stuff into some set of abstractions in order to remove +@@ -25,15 +25,15 @@ static int MPIDI_CH3i_Progress_test(void); + volatile unsigned int MPIDI_CH3I_progress_completion_count = 0; + + #ifdef MPICH_IS_THREADED +- volatile int MPIDI_CH3I_progress_blocked = FALSE; +- volatile int MPIDI_CH3I_progress_wakeup_signalled = FALSE; ++volatile int MPIDI_CH3I_progress_blocked = FALSE; ++volatile int MPIDI_CH3I_progress_wakeup_signalled = FALSE; + + /* This value must be static so that it isn't an uninitialized +- common symbol */ +- static MPID_Thread_cond_t MPIDI_CH3I_progress_completion_cond; ++ * common symbol */ ++static MPID_Thread_cond_t MPIDI_CH3I_progress_completion_cond; + +- static int MPIDI_CH3I_Progress_delay(unsigned int completion_count); +- static int MPIDI_CH3I_Progress_continue(unsigned int completion_count); ++static int MPIDI_CH3I_Progress_delay(unsigned int completion_count); ++static int MPIDI_CH3I_Progress_continue(unsigned int completion_count); + #endif + + +@@ -43,10 +43,10 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDI_CH3I_Sock_event_t * event + static inline int connection_pop_sendq_req(MPIDI_CH3I_Connection_t * conn); + static inline int connection_post_recv_pkt(MPIDI_CH3I_Connection_t * conn); + +-static int adjust_iov(MPL_IOV ** iovp, int * countp, size_t nb); ++static int adjust_iov(MPL_IOV ** iovp, int *countp, size_t nb); + + #define MAX_PROGRESS_HOOKS 4 +-typedef int (*progress_func_ptr_t) (int* made_progress); ++typedef int (*progress_func_ptr_t) (int *made_progress); + + typedef struct progress_hook_slot { + progress_func_ptr_t func_ptr; +@@ -55,10 +55,6 @@ typedef struct progress_hook_slot { + + static progress_hook_slot_t progress_hooks[MAX_PROGRESS_HOOKS]; + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3i_Progress_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3i_Progress_test(void) + { + MPIDI_CH3I_Sock_event_t event; +@@ -69,73 +65,65 @@ static int MPIDI_CH3i_Progress_test(void) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_TEST); + +-# ifdef MPICH_IS_THREADED ++#ifdef MPICH_IS_THREADED + { +- /* We don't bother testing whether threads are enabled in the +- runtime-checking case because this simple test will always be false +- if threads are not enabled. */ +- if (MPIDI_CH3I_progress_blocked == TRUE) +- { +- /* +- * Another thread is already blocking in the progress engine. +- * We are not going to block waiting for progress, so we +- * simply return. It might make sense to yield before * returning, +- * giving the PE thread a change to make progress. +- * +- * MT: Another thread is already blocking in poll. Right now, +- * calls to the progress routines are effectively +- * serialized by the device. The only way another thread may +- * enter this function is if MPIDI_CH3I_Sock_wait() blocks. If +- * this changes, a flag other than MPIDI_CH3I_Progress_blocked +- * may be required to determine if another thread is in +- * the progress engine. +- */ +- +- goto fn_exit; +- } ++ /* We don't bother testing whether threads are enabled in the ++ * runtime-checking case because this simple test will always be false ++ * if threads are not enabled. */ ++ if (MPIDI_CH3I_progress_blocked == TRUE) { ++ /* ++ * Another thread is already blocking in the progress engine. ++ * We are not going to block waiting for progress, so we ++ * simply return. It might make sense to yield before * returning, ++ * giving the PE thread a change to make progress. ++ * ++ * MT: Another thread is already blocking in poll. Right now, ++ * calls to the progress routines are effectively ++ * serialized by the device. The only way another thread may ++ * enter this function is if MPIDI_CH3I_Sock_wait() blocks. If ++ * this changes, a flag other than MPIDI_CH3I_Progress_blocked ++ * may be required to determine if another thread is in ++ * the progress engine. ++ */ ++ ++ goto fn_exit; ++ } + } +-# endif +- ++#endif ++ + for (i = 0; i < MAX_PROGRESS_HOOKS; i++) { + if (progress_hooks[i].active == TRUE) { + MPIR_Assert(progress_hooks[i].func_ptr != NULL); + mpi_errno = progress_hooks[i].func_ptr(&made_progress); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + } + + mpi_errno = MPIDI_CH3I_Sock_wait(MPIDI_CH3I_sock_set, 0, &event); + +- if (mpi_errno == MPI_SUCCESS) +- { +- mpi_errno = MPIDI_CH3I_Progress_handle_sock_event(&event); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER, +- "**ch3|sock|handle_sock_event"); +- } +- } +- else if (MPIR_ERR_GET_CLASS(mpi_errno) == MPIDI_CH3I_SOCK_ERR_TIMEOUT) +- { +- mpi_errno = MPI_SUCCESS; +- goto fn_exit; +- } +- else { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER, "**progress_sock_wait"); ++ if (mpi_errno == MPI_SUCCESS) { ++ mpi_errno = MPIDI_CH3I_Progress_handle_sock_event(&event); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|sock|handle_sock_event"); ++ } ++ } else if (MPIR_ERR_GET_CLASS(mpi_errno) == MPIDI_CH3I_SOCK_ERR_TIMEOUT) { ++ mpi_errno = MPI_SUCCESS; ++ goto fn_exit; ++ } else { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**progress_sock_wait"); + } + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_TEST); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } ++ + /* end MPIDI_CH3_Progress_test() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3i_Progress_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3i_Progress_wait(MPID_Progress_state * progress_state) + { + MPIDI_CH3I_Sock_event_t event; +@@ -145,51 +133,48 @@ static int MPIDI_CH3i_Progress_wait(MPID_Progress_state * progress_state) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_WAIT); + + /* +- * MT: the following code will be needed if progress can occur between ++ * MT: the following code will be needed if progress can occur between + * MPIDI_CH3_Progress_start() and + * MPIDI_CH3_Progress_wait(), or iterations of MPIDI_CH3_Progress_wait(). + * + * This is presently not possible, and thus the code is commented out. + */ +-# if 0 ++#if 0 + /* FIXME: Was (USE_THREAD_IMPL == MPICH_THREAD_IMPL_NOT_IMPLEMENTED), +- which really meant not-using-global-mutex-thread model . This +- was true for the single threaded case, but was probably not intended +- for that case*/ ++ * which really meant not-using-global-mutex-thread model . This ++ * was true for the single threaded case, but was probably not intended ++ * for that case */ + { +- if (progress_state->ch.completion_count != MPIDI_CH3I_progress_completion_count) +- { +- goto fn_exit; +- } ++ if (progress_state->ch.completion_count != MPIDI_CH3I_progress_completion_count) { ++ goto fn_exit; ++ } + } +-# endif +- +-# ifdef MPICH_IS_THREADED ++#endif ++ ++#ifdef MPICH_IS_THREADED + MPIR_THREAD_CHECK_BEGIN; + { +- if (MPIDI_CH3I_progress_blocked == TRUE) +- { +- /* +- * Another thread is already blocking in the progress engine. +- * +- * MT: Another thread is already blocking in poll. Right now, +- * calls to MPIDI_CH3_Progress_wait() are effectively +- * serialized by the device. The only way another thread may +- * enter this function is if MPIDI_CH3I_Sock_wait() blocks. If +- * this changes, a flag other than MPIDI_CH3I_Progress_blocked +- * may be required to determine if another thread is in +- * the progress engine. +- */ +- MPIDI_CH3I_Progress_delay(MPIDI_CH3I_progress_completion_count); +- +- goto fn_exit; +- } ++ if (MPIDI_CH3I_progress_blocked == TRUE) { ++ /* ++ * Another thread is already blocking in the progress engine. ++ * ++ * MT: Another thread is already blocking in poll. Right now, ++ * calls to MPIDI_CH3_Progress_wait() are effectively ++ * serialized by the device. The only way another thread may ++ * enter this function is if MPIDI_CH3I_Sock_wait() blocks. If ++ * this changes, a flag other than MPIDI_CH3I_Progress_blocked ++ * may be required to determine if another thread is in ++ * the progress engine. ++ */ ++ MPIDI_CH3I_Progress_delay(MPIDI_CH3I_progress_completion_count); ++ ++ goto fn_exit; ++ } + } + MPIR_THREAD_CHECK_END; +-# endif +- +- do +- { ++#endif ++ ++ do { + int made_progress = FALSE; + int i; + +@@ -197,114 +182,107 @@ static int MPIDI_CH3i_Progress_wait(MPID_Progress_state * progress_state) + if (progress_hooks[i].active == TRUE) { + MPIR_Assert(progress_hooks[i].func_ptr != NULL); + mpi_errno = progress_hooks[i].func_ptr(&made_progress); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + if (made_progress) { + MPIDI_CH3_Progress_signal_completion(); +- break; /* break the for loop */ ++ break; /* break the for loop */ + } + } + } +- if (made_progress) break; /* break the do loop */ +- +-# ifdef MPICH_IS_THREADED +- +- /* The logic for this case is just complicated enough that +- we write separate code for each possibility */ +- if (MPIR_ThreadInfo.isThreaded) { +- MPIDI_CH3I_progress_blocked = TRUE; +- mpi_errno = MPIDI_CH3I_Sock_wait(MPIDI_CH3I_sock_set, +- MPIDI_CH3I_SOCK_INFINITE_TIME, &event); +- MPIDI_CH3I_progress_blocked = FALSE; +- MPIDI_CH3I_progress_wakeup_signalled = FALSE; +- } +- else { +- mpi_errno = MPIDI_CH3I_Sock_wait(MPIDI_CH3I_sock_set, +- MPIDI_CH3I_SOCK_INFINITE_TIME, &event); +- } +- +-# else +- mpi_errno = MPIDI_CH3I_Sock_wait(MPIDI_CH3I_sock_set, +- MPIDI_CH3I_SOCK_INFINITE_TIME, &event); ++ if (made_progress) ++ break; /* break the do loop */ ++ ++#ifdef MPICH_IS_THREADED ++ ++ /* The logic for this case is just complicated enough that ++ * we write separate code for each possibility */ ++ if (MPIR_ThreadInfo.isThreaded) { ++ MPIDI_CH3I_progress_blocked = TRUE; ++ mpi_errno = MPIDI_CH3I_Sock_wait(MPIDI_CH3I_sock_set, ++ MPIDI_CH3I_SOCK_INFINITE_TIME, &event); ++ MPIDI_CH3I_progress_blocked = FALSE; ++ MPIDI_CH3I_progress_wakeup_signalled = FALSE; ++ } else { ++ mpi_errno = MPIDI_CH3I_Sock_wait(MPIDI_CH3I_sock_set, ++ MPIDI_CH3I_SOCK_INFINITE_TIME, &event); ++ } ++ ++#else ++ mpi_errno = MPIDI_CH3I_Sock_wait(MPIDI_CH3I_sock_set, ++ MPIDI_CH3I_SOCK_INFINITE_TIME, &event); + # endif + +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- MPIR_Assert(MPIR_ERR_GET_CLASS(mpi_errno) != MPIDI_CH3I_SOCK_ERR_TIMEOUT); +- MPIR_ERR_SET(mpi_errno,MPI_ERR_OTHER,"**progress_sock_wait"); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- mpi_errno = MPIDI_CH3I_Progress_handle_sock_event(&event); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER, +- "**ch3|sock|handle_sock_event"); +- } ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_Assert(MPIR_ERR_GET_CLASS(mpi_errno) != MPIDI_CH3I_SOCK_ERR_TIMEOUT); ++ MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**progress_sock_wait"); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ mpi_errno = MPIDI_CH3I_Progress_handle_sock_event(&event); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|sock|handle_sock_event"); ++ } + } + while (progress_state->ch.completion_count == MPIDI_CH3I_progress_completion_count); + + /* +- * We could continue to call MPIU_Sock_wait in a non-blocking fashion ++ * We could continue to call MPIU_Sock_wait in a non-blocking fashion + * and process any other events; however, this would not +- * give the application a chance to post new receives, and thus could ++ * give the application a chance to post new receives, and thus could + * result in an increased number of unexpected messages + * that would need to be buffered. + */ +- +-# if MPICH_IS_THREADED ++ ++#if MPICH_IS_THREADED + { +- /* +- * Awaken any threads which are waiting for the progress that just +- * occurred +- */ +- MPIDI_CH3I_Progress_continue(MPIDI_CH3I_progress_completion_count); ++ /* ++ * Awaken any threads which are waiting for the progress that just ++ * occurred ++ */ ++ MPIDI_CH3I_Progress_continue(MPIDI_CH3I_progress_completion_count); + } +-# endif +- +- fn_exit: ++#endif ++ ++ fn_exit: + /* + * Reset the progress state so it is fresh for the next iteration + */ + progress_state->ch.completion_count = MPIDI_CH3I_progress_completion_count; +- ++ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_WAIT); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } ++ + /* end MPIDI_CH3_Progress_wait() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Connection_terminate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Connection_terminate(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3I_VC *vcch = &vc->ch; + +- MPL_DBG_CONNSTATECHANGE(vc,vcch->conn,CONN_STATE_CLOSING); ++ MPL_DBG_CONNSTATECHANGE(vc, vcch->conn, CONN_STATE_CLOSING); + vcch->conn->state = CONN_STATE_CLOSING; +- MPL_DBG_MSG(MPIDI_CH3_DBG_DISCONNECT,TYPICAL,"Closing sock (Post_close)"); ++ MPL_DBG_MSG(MPIDI_CH3_DBG_DISCONNECT, TYPICAL, "Closing sock (Post_close)"); + mpi_errno = MPIDI_CH3I_Sock_post_close(vcch->sock); + if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); ++ MPIR_ERR_POP(mpi_errno); + } + +- fn_exit: ++ fn_exit: + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } ++ + /* end MPIDI_CH3_Connection_terminate() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_init(void) + { + int i; +@@ -315,53 +293,54 @@ int MPIDI_CH3I_Progress_init(void) + + MPIR_THREAD_CHECK_BEGIN; + /* FIXME should be appropriately abstracted somehow */ +-# if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) ++#if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) + { + int err; +- MPID_Thread_cond_create(&MPIDI_CH3I_progress_completion_cond, &err); ++ MPID_Thread_cond_create(&MPIDI_CH3I_progress_completion_cond, &err); + MPIR_Assert(err == 0); + } +-# endif ++#endif + MPIR_THREAD_CHECK_END; +- ++ + mpi_errno = MPIDI_CH3I_Sock_init(); + if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); ++ MPIR_ERR_POP(mpi_errno); + } +- ++ + /* create sock set */ + mpi_errno = MPIDI_CH3I_Sock_create_set(&MPIDI_CH3I_sock_set); + if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); ++ MPIR_ERR_POP(mpi_errno); + } +- ++ + /* establish non-blocking listener */ +- mpi_errno = MPIDU_CH3I_SetupListener( MPIDI_CH3I_sock_set ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } ++ mpi_errno = MPIDU_CH3I_SetupListener(MPIDI_CH3I_sock_set); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } + + /* Initialize the code to handle incoming packets */ +- mpi_errno = MPIDI_CH3_PktHandler_Init( pktArray, MPIDI_CH3_PKT_END_CH3+1 ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } ++ mpi_errno = MPIDI_CH3_PktHandler_Init(pktArray, MPIDI_CH3_PKT_END_CH3 + 1); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } + + /* Initialize progress hook slots */ + for (i = 0; i < MAX_PROGRESS_HOOKS; i++) { + progress_hooks[i].func_ptr = NULL; + progress_hooks[i].active = FALSE; + } +- ++ + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_INIT); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } ++ + /* end MIPDI_CH3I_Progress_init() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_finalize(void) + { + int mpi_errno; +@@ -373,24 +352,28 @@ int MPIDI_CH3I_Progress_finalize(void) + + /* Shut down the listener */ + mpi_errno = MPIDU_CH3I_ShutdownListener(); +- if (mpi_errno != MPI_SUCCESS) { MPIR_ERR_POP(mpi_errno); } +- ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ + + /* Close open connections */ +- MPIDI_CH3I_Sock_close_open_sockets(MPIDI_CH3I_sock_set,(void**) &conn); ++ MPIDI_CH3I_Sock_close_open_sockets(MPIDI_CH3I_sock_set, (void **) &conn); + while (conn != NULL) { + conn->state = CONN_STATE_CLOSING; + mpi_errno = MPIDI_CH3_Sockconn_handle_close_event(conn); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } +- MPIDI_CH3I_Sock_close_open_sockets(MPIDI_CH3I_sock_set,(void**) &conn); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ MPIDI_CH3I_Sock_close_open_sockets(MPIDI_CH3I_sock_set, (void **) &conn); + } + + + + /* +- * MT: in a multi-threaded environment, finalize() should signal any ++ * MT: in a multi-threaded environment, finalize() should signal any + * thread(s) blocking on MPIDI_CH3I_Sock_wait() and wait for +- * those * threads to complete before destroying the progress engine ++ * those * threads to complete before destroying the progress engine + * data structures. + */ + +@@ -399,50 +382,39 @@ int MPIDI_CH3I_Progress_finalize(void) + + MPIR_THREAD_CHECK_BEGIN; + /* FIXME should be appropriately abstracted somehow */ +-# if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) ++#if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) + { + int err; +- MPID_Thread_cond_destroy(&MPIDI_CH3I_progress_completion_cond, &err); ++ MPID_Thread_cond_destroy(&MPIDI_CH3I_progress_completion_cond, &err); + MPIR_Assert(err == 0); + } +-# endif ++#endif + MPIR_THREAD_CHECK_END; + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_FINALIZE); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } ++ + /* end MPIDI_CH3I_Progress_finalize() */ + + + #ifdef MPICH_IS_THREADED +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_wakeup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIDI_CH3I_Progress_wakeup(void) + { +- MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,TYPICAL,"progress_wakeup called"); ++ MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER, TYPICAL, "progress_wakeup called"); + MPIDI_CH3I_Sock_wakeup(MPIDI_CH3I_sock_set); + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Get_business_card +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Get_business_card(int myRank, char *value, int length) + { + return MPIDI_CH3U_Get_business_card_sock(myRank, &value, &length); + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_handle_sock_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Progress_handle_sock_event(MPIDI_CH3I_Sock_event_t * event) + { + int mpi_errno = MPI_SUCCESS; +@@ -450,350 +422,337 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDI_CH3I_Sock_event_t * event + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_HANDLE_SOCK_EVENT); + +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE,"Socket event of type %d", event->op_type ); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER, VERBOSE, "Socket event of type %d", event->op_type); ++ ++ switch (event->op_type) { ++ case MPIDI_CH3I_SOCK_OP_READ: ++ { ++ MPIDI_CH3I_Connection_t *conn = (MPIDI_CH3I_Connection_t *) event->user_ptr; ++ /* If we have a READ event on a discarded connection, we probably have ++ * an error on this connection, if the remote side is closed due to ++ * MPI_Finalize. Since the connection is discareded (and therefore not needed) ++ * it can be closed and the error can be ignored */ ++ if (conn->state == CONN_STATE_DISCARD) { ++ MPIDI_CH3_Sockconn_handle_close_event(conn); ++ break; ++ } + +- switch (event->op_type) +- { +- case MPIDI_CH3I_SOCK_OP_READ: +- { +- MPIDI_CH3I_Connection_t * conn = +- (MPIDI_CH3I_Connection_t *) event->user_ptr; +- /* If we have a READ event on a discarded connection, we probably have +- an error on this connection, if the remote side is closed due to +- MPI_Finalize. Since the connection is discareded (and therefore not needed) +- it can be closed and the error can be ignored */ +- if(conn->state == CONN_STATE_DISCARD){ +- MPIDI_CH3_Sockconn_handle_close_event(conn); ++ MPIR_Request *rreq = conn->recv_active; ++ ++ /* --BEGIN ERROR HANDLING-- */ ++ if (event->error != MPI_SUCCESS) { ++ /* FIXME: the following should be handled by the close ++ * protocol */ ++ if (MPIR_ERR_GET_CLASS(event->error) != MPIDI_CH3I_SOCK_ERR_CONN_CLOSED) { ++ mpi_errno = event->error; ++ MPIR_ERR_POP(mpi_errno); ++ } ++ break; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ if (conn->state == CONN_STATE_CONNECTED) { ++ if (conn->recv_active == NULL) { ++ intptr_t buflen = 0; ++ MPIR_Assert(conn->pkt.type < MPIDI_CH3_PKT_END_CH3); ++ ++ /* conn->pkt is always aligned */ ++ mpi_errno = pktArray[conn->pkt.type] (conn->vc, &conn->pkt, NULL, ++ &buflen, &rreq); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ MPIR_Assert(buflen == 0); ++ ++ if (rreq == NULL) { ++ if (conn->state != CONN_STATE_CLOSING) { ++ /* conn->recv_active = NULL; -- ++ * already set to NULL */ ++ mpi_errno = connection_post_recv_pkt(conn); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } ++ } else { ++ mpi_errno = ReadMoreData(conn, rreq); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } ++ } else { /* incoming data */ ++ ++ int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); ++ int complete; ++ ++ reqFn = rreq->dev.OnDataAvail; ++ if (!reqFn) { ++ MPIR_Assert(MPIDI_Request_get_type(rreq) != ++ MPIDI_REQUEST_TYPE_GET_RESP); ++ mpi_errno = MPID_Request_complete(rreq); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ complete = TRUE; ++ } else { ++ mpi_errno = reqFn(conn->vc, rreq, &complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ if (complete) { ++ conn->recv_active = NULL; ++ mpi_errno = connection_post_recv_pkt(conn); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } else { /* more data to be read */ ++ ++ mpi_errno = ReadMoreData(conn, rreq); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } ++ } ++ } else if (conn->state == CONN_STATE_OPEN_LRECV_DATA) { ++ mpi_errno = MPIDI_CH3_Sockconn_handle_connopen_event(conn); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } else { /* Handling some internal connection establishment or ++ * tear down packet */ ++ mpi_errno = MPIDI_CH3_Sockconn_handle_conn_event(conn); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } + break; + } +- +- MPIR_Request * rreq = conn->recv_active; +- +- /* --BEGIN ERROR HANDLING-- */ +- if (event->error != MPI_SUCCESS) +- { +- /* FIXME: the following should be handled by the close +- protocol */ +- if (MPIR_ERR_GET_CLASS(event->error) != MPIDI_CH3I_SOCK_ERR_CONN_CLOSED) { +- mpi_errno = event->error; +- MPIR_ERR_POP(mpi_errno); +- } +- break; +- } +- /* --END ERROR HANDLING-- */ +- +- if (conn->state == CONN_STATE_CONNECTED) +- { +- if (conn->recv_active == NULL) +- { +- intptr_t buflen = 0; +- MPIR_Assert(conn->pkt.type < MPIDI_CH3_PKT_END_CH3); +- +- /* conn->pkt is always aligned */ +- mpi_errno = pktArray[conn->pkt.type]( conn->vc, &conn->pkt, NULL, +- &buflen, &rreq ); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- MPIR_Assert(buflen == 0); +- +- if (rreq == NULL) +- { +- if (conn->state != CONN_STATE_CLOSING) +- { +- /* conn->recv_active = NULL; -- +- already set to NULL */ +- mpi_errno = connection_post_recv_pkt(conn); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- } +- else +- { +- mpi_errno = ReadMoreData( conn, rreq ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } +- } +- } +- else /* incoming data */ +- { +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- int complete; +- +- reqFn = rreq->dev.OnDataAvail; +- if (!reqFn) { +- MPIR_Assert(MPIDI_Request_get_type(rreq)!=MPIDI_REQUEST_TYPE_GET_RESP); +- mpi_errno = MPID_Request_complete(rreq); ++ ++ /* END OF SOCK_OP_READ */ ++ ++ case MPIDI_CH3I_SOCK_OP_WRITE: ++ { ++ MPIDI_CH3I_Connection_t *conn = (MPIDI_CH3I_Connection_t *) event->user_ptr; ++ /* --BEGIN ERROR HANDLING-- */ ++ if (event->error != MPI_SUCCESS) { ++ mpi_errno = event->error; ++ MPIR_ERR_POP(mpi_errno); ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ if (conn->send_active) { ++ MPIR_Request *sreq = conn->send_active; ++ int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); ++ int complete; ++ ++ reqFn = sreq->dev.OnDataAvail; ++ if (!reqFn) { ++ MPIR_Assert(MPIDI_Request_get_type(sreq) != MPIDI_REQUEST_TYPE_GET_RESP); ++ mpi_errno = MPID_Request_complete(sreq); + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); + } +- complete = TRUE; +- } +- else { +- mpi_errno = reqFn( conn->vc, rreq, &complete ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +- if (complete) +- { +- conn->recv_active = NULL; +- mpi_errno = connection_post_recv_pkt(conn); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- else /* more data to be read */ +- { +- mpi_errno = ReadMoreData( conn, rreq ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } +- } +- } +- } +- else if (conn->state == CONN_STATE_OPEN_LRECV_DATA) +- { +- mpi_errno = MPIDI_CH3_Sockconn_handle_connopen_event( conn ); +- if (mpi_errno) { MPIR_ERR_POP( mpi_errno ); } +- } +- else /* Handling some internal connection establishment or +- tear down packet */ +- { +- mpi_errno = MPIDI_CH3_Sockconn_handle_conn_event( conn ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } +- } +- break; +- } +- +- /* END OF SOCK_OP_READ */ +- +- case MPIDI_CH3I_SOCK_OP_WRITE: +- { +- MPIDI_CH3I_Connection_t * conn = +- (MPIDI_CH3I_Connection_t *) event->user_ptr; +- /* --BEGIN ERROR HANDLING-- */ +- if (event->error != MPI_SUCCESS) { +- mpi_errno = event->error; +- MPIR_ERR_POP(mpi_errno); +- } +- /* --END ERROR HANDLING-- */ +- +- if (conn->send_active) +- { +- MPIR_Request * sreq = conn->send_active; +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- int complete; +- +- reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) { +- MPIR_Assert(MPIDI_Request_get_type(sreq)!=MPIDI_REQUEST_TYPE_GET_RESP); +- mpi_errno = MPID_Request_complete(sreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); ++ ++ complete = TRUE; ++ } else { ++ mpi_errno = reqFn(conn->vc, sreq, &complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + } + +- complete = TRUE; +- } +- else { +- mpi_errno = reqFn( conn->vc, sreq, &complete ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +- if (complete) +- { +- mpi_errno = connection_pop_sendq_req(conn); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- } +- else /* more data to send */ +- { +- for(;;) +- { +- MPL_IOV * iovp; +- size_t nb; +- +- iovp = sreq->dev.iov; +- +- mpi_errno = MPIDI_CH3I_Sock_writev(conn->sock, iovp, sreq->dev.iov_count, &nb); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|immedwrite", "ch3|sock|immedwrite %p %p %p", +- sreq, conn, conn->vc); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"immediate writev, vc=%p, sreq=0x%08x, nb=%" PRIdPTR, +- conn->vc, sreq->handle, nb)); +- +- if (nb > 0 && adjust_iov(&iovp, &sreq->dev.iov_count, nb)) +- { +- reqFn = sreq->dev.OnDataAvail; +- if (!reqFn) { +- MPIR_Assert(MPIDI_Request_get_type(sreq)!=MPIDI_REQUEST_TYPE_GET_RESP); +- mpi_errno = MPID_Request_complete(sreq); ++ if (complete) { ++ mpi_errno = connection_pop_sendq_req(conn); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } else { /* more data to send */ ++ ++ for (;;) { ++ MPL_IOV *iovp; ++ size_t nb; ++ ++ iovp = sreq->dev.iov; ++ ++ mpi_errno = ++ MPIDI_CH3I_Sock_writev(conn->sock, iovp, sreq->dev.iov_count, &nb); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, ++ __LINE__, MPI_ERR_OTHER, ++ "**ch3|sock|immedwrite", ++ "ch3|sock|immedwrite %p %p %p", sreq, conn, ++ conn->vc); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "immediate writev, vc=%p, sreq=0x%08x, nb=%" PRIdPTR, ++ conn->vc, sreq->handle, nb)); ++ ++ if (nb > 0 && adjust_iov(&iovp, &sreq->dev.iov_count, nb)) { ++ reqFn = sreq->dev.OnDataAvail; ++ if (!reqFn) { ++ MPIR_Assert(MPIDI_Request_get_type(sreq) != ++ MPIDI_REQUEST_TYPE_GET_RESP); ++ mpi_errno = MPID_Request_complete(sreq); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ complete = TRUE; ++ } else { ++ mpi_errno = reqFn(conn->vc, sreq, &complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ if (complete) { ++ mpi_errno = connection_pop_sendq_req(conn); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ break; ++ } ++ } else { ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "posting writev, vc=%p, conn=%p, sreq=0x%08x", ++ conn->vc, conn, sreq->handle)); ++ mpi_errno = ++ MPIDI_CH3I_Sock_post_writev(conn->sock, iovp, ++ sreq->dev.iov_count, NULL); ++ /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, ++ __LINE__, MPI_ERR_OTHER, ++ "**ch3|sock|postwrite", ++ "ch3|sock|postwrite %p %p %p", sreq, ++ conn, conn->vc); ++ goto fn_fail; + } +- complete = TRUE; +- } +- else { +- mpi_errno = reqFn( conn->vc, sreq, &complete ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- if (complete) +- { +- mpi_errno = connection_pop_sendq_req(conn); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- break; +- } +- } +- else +- { +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"posting writev, vc=%p, conn=%p, sreq=0x%08x", +- conn->vc, conn, sreq->handle)); +- mpi_errno = MPIDI_CH3I_Sock_post_writev(conn->sock, iovp, sreq->dev.iov_count, NULL); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code( +- mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**ch3|sock|postwrite", +- "ch3|sock|postwrite %p %p %p", sreq, conn, conn->vc); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- break; +- } +- } +- } +- } +- else /* finished writing internal packet header */ +- { +- /* the connection is not active yet */ +- mpi_errno = MPIDI_CH3_Sockconn_handle_connwrite( conn ); +- if (mpi_errno) { MPIR_ERR_POP( mpi_errno ); } +- } +- break; +- } +- /* END OF SOCK_OP_WRITE */ +- +- case MPIDI_CH3I_SOCK_OP_ACCEPT: +- { +- mpi_errno = MPIDI_CH3_Sockconn_handle_accept_event(); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } +- break; +- } +- +- case MPIDI_CH3I_SOCK_OP_CONNECT: +- { +- mpi_errno = MPIDI_CH3_Sockconn_handle_connect_event( +- (MPIDI_CH3I_Connection_t *) event->user_ptr, +- event->error ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } +- break; +- } +- +- case MPIDI_CH3I_SOCK_OP_CLOSE: +- { +- mpi_errno = MPIDI_CH3_Sockconn_handle_close_event( +- (MPIDI_CH3I_Connection_t *) event->user_ptr ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } +- break; +- } +- +- case MPIDI_CH3I_SOCK_OP_WAKEUP: +- { +- MPIDI_CH3_Progress_signal_completion(); +- /* MPIDI_CH3I_progress_completion_count++; */ +- break; +- } ++ /* --END ERROR HANDLING-- */ ++ ++ break; ++ } ++ } ++ } ++ } else { /* finished writing internal packet header */ ++ ++ /* the connection is not active yet */ ++ mpi_errno = MPIDI_CH3_Sockconn_handle_connwrite(conn); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } ++ break; ++ } ++ /* END OF SOCK_OP_WRITE */ ++ ++ case MPIDI_CH3I_SOCK_OP_ACCEPT: ++ { ++ mpi_errno = MPIDI_CH3_Sockconn_handle_accept_event(); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ break; ++ } ++ ++ case MPIDI_CH3I_SOCK_OP_CONNECT: ++ { ++ mpi_errno = MPIDI_CH3_Sockconn_handle_connect_event((MPIDI_CH3I_Connection_t *) ++ event->user_ptr, event->error); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ break; ++ } ++ ++ case MPIDI_CH3I_SOCK_OP_CLOSE: ++ { ++ mpi_errno = MPIDI_CH3_Sockconn_handle_close_event((MPIDI_CH3I_Connection_t *) ++ event->user_ptr); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ break; ++ } ++ ++ case MPIDI_CH3I_SOCK_OP_WAKEUP: ++ { ++ MPIDI_CH3_Progress_signal_completion(); ++ /* MPIDI_CH3I_progress_completion_count++; */ ++ break; ++ } + } + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_HANDLE_SOCK_EVENT); + return mpi_errno; +- fn_fail: ++ fn_fail: + goto fn_exit; + } ++ + /* end MPIDI_CH3I_Progress_handle_sock_event() */ + + + #ifdef MPICH_IS_THREADED + +-/* Note that this routine is only called if threads are enabled; ++/* Note that this routine is only called if threads are enabled; + it does not need to check whether runtime threads are enabled */ + /* FIXME: Test for runtime thread level (here or where used) */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_delay +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Progress_delay(unsigned int completion_count) + { + int mpi_errno = MPI_SUCCESS, err; +- ++ + /* FIXME should be appropriately abstracted somehow */ +-# if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) ++#if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) + { +- while (completion_count == MPIDI_CH3I_progress_completion_count) +- { +- MPID_Thread_cond_wait(&MPIDI_CH3I_progress_completion_cond, +- &MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err); +- } ++ while (completion_count == MPIDI_CH3I_progress_completion_count) { ++ MPID_Thread_cond_wait(&MPIDI_CH3I_progress_completion_cond, ++ &MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err); ++ } + } +-# endif +- ++#endif ++ + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Progress_delay() */ + + /* FIXME: Test for runtime thread level */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_continue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Progress_continue(unsigned int completion_count) + { +- int mpi_errno = MPI_SUCCESS,err; ++ int mpi_errno = MPI_SUCCESS, err; + + MPIR_THREAD_CHECK_BEGIN; + /* FIXME should be appropriately abstracted somehow */ +-# if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) ++#if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) + { +- MPID_Thread_cond_broadcast(&MPIDI_CH3I_progress_completion_cond,&err); ++ MPID_Thread_cond_broadcast(&MPIDI_CH3I_progress_completion_cond, &err); + } +-# endif ++#endif + MPIR_THREAD_CHECK_END; + + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Progress_continue() */ + + #endif /* MPICH_IS_THREADED */ + + +-/* FIXME: (a) what does this do and where is it used and (b) ++/* FIXME: (a) what does this do and where is it used and (b) + we could replace it with a #define for the single-method case */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_VC_post_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_VC_post_connect(MPIDI_VC_t * vc) + { +- return MPIDI_CH3I_VC_post_sockconnect( vc ); ++ return MPIDI_CH3I_VC_post_sockconnect(vc); + } ++ + /* end MPIDI_CH3I_VC_post_connect() */ + + /* FIXME: This function also used in ch3u_connect_sock.c */ +-#undef FUNCNAME +-#define FUNCNAME connection_pop_sendq_req +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int connection_pop_sendq_req(MPIDI_CH3I_Connection_t * conn) + { + int mpi_errno = MPI_SUCCESS; +@@ -806,27 +765,25 @@ static inline int connection_pop_sendq_req(MPIDI_CH3I_Connection_t * conn) + + /* FIXME: Is dequeue/get next the operation we really want? */ + MPIDI_CH3I_SendQ_dequeue(vcch); +- conn->send_active = MPIDI_CH3I_SendQ_head(vcch); /* MT */ +- if (conn->send_active != NULL) +- { +- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CONNECT,TYPICAL,"conn=%p: Posting message from connection send queue", conn ); +- mpi_errno = MPIDI_CH3I_Sock_post_writev(conn->sock, conn->send_active->dev.iov, conn->send_active->dev.iov_count, NULL); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } ++ conn->send_active = MPIDI_CH3I_SendQ_head(vcch); /* MT */ ++ if (conn->send_active != NULL) { ++ MPL_DBG_MSG_P(MPIDI_CH3_DBG_CONNECT, TYPICAL, ++ "conn=%p: Posting message from connection send queue", conn); ++ mpi_errno = ++ MPIDI_CH3I_Sock_post_writev(conn->sock, conn->send_active->dev.iov, ++ conn->send_active->dev.iov_count, NULL); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } + } +- +- fn_fail: ++ ++ fn_fail: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CONNECTION_POP_SENDQ_REQ); + return mpi_errno; + } + + + +-#undef FUNCNAME +-#define FUNCNAME connection_post_recv_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int connection_post_recv_pkt(MPIDI_CH3I_Connection_t * conn) + { + int mpi_errno = MPI_SUCCESS; +@@ -834,40 +791,33 @@ static inline int connection_post_recv_pkt(MPIDI_CH3I_Connection_t * conn) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CONNECTION_POST_RECV_PKT); + +- mpi_errno = MPIDI_CH3I_Sock_post_read(conn->sock, &conn->pkt, sizeof(conn->pkt), sizeof(conn->pkt), NULL); ++ mpi_errno = ++ MPIDI_CH3I_Sock_post_read(conn->sock, &conn->pkt, sizeof(conn->pkt), sizeof(conn->pkt), ++ NULL); + if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_SET(mpi_errno,MPI_ERR_OTHER, "**fail"); ++ MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail"); + } +- ++ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CONNECTION_POST_RECV_PKT); + return mpi_errno; + } + + /* FIXME: What is this routine for? */ +-#undef FUNCNAME +-#define FUNCNAME adjust_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int adjust_iov(MPL_IOV ** iovp, int * countp, size_t nb) ++static int adjust_iov(MPL_IOV ** iovp, int *countp, size_t nb) + { +- MPL_IOV * const iov = *iovp; ++ MPL_IOV *const iov = *iovp; + const int count = *countp; + int offset = 0; +- +- while (offset < count) +- { +- if (iov[offset].MPL_IOV_LEN <= nb) +- { +- nb -= iov[offset].MPL_IOV_LEN; +- offset++; +- } +- else +- { +- iov[offset].MPL_IOV_BUF = +- (MPL_IOV_BUF_CAST)((char *) iov[offset].MPL_IOV_BUF + nb); +- iov[offset].MPL_IOV_LEN -= nb; +- break; +- } ++ ++ while (offset < count) { ++ if (iov[offset].MPL_IOV_LEN <= nb) { ++ nb -= iov[offset].MPL_IOV_LEN; ++ offset++; ++ } else { ++ iov[offset].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) iov[offset].MPL_IOV_BUF + nb); ++ iov[offset].MPL_IOV_LEN -= nb; ++ break; ++ } + } + + *iovp += offset; +@@ -875,81 +825,82 @@ static int adjust_iov(MPL_IOV ** iovp, int * countp, size_t nb) + + return (*countp == 0); + } ++ + /* end adjust_iov() */ + + +-static int ReadMoreData( MPIDI_CH3I_Connection_t * conn, MPIR_Request *rreq ) ++static int ReadMoreData(MPIDI_CH3I_Connection_t * conn, MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; +- ++ + while (1) { +- MPL_IOV * iovp; +- size_t nb; +- +- iovp = rreq->dev.iov; +- +- mpi_errno = MPIDI_CH3I_Sock_readv(conn->sock, iovp, +- rreq->dev.iov_count, &nb); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|immedread", "ch3|sock|immedread %p %p %p", +- rreq, conn, conn->vc); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"immediate readv, vc=%p nb=%" PRIdPTR ", rreq=0x%08x", +- conn->vc, nb, rreq->handle)); +- +- if (nb > 0 && adjust_iov(&iovp, &rreq->dev.iov_count, nb)) { +- int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *); +- int complete; +- +- reqFn = rreq->dev.OnDataAvail; +- if (!reqFn) { +- MPIR_Assert(MPIDI_Request_get_type(rreq)!=MPIDI_REQUEST_TYPE_GET_RESP); ++ MPL_IOV *iovp; ++ size_t nb; ++ ++ iovp = rreq->dev.iov; ++ ++ mpi_errno = MPIDI_CH3I_Sock_readv(conn->sock, iovp, rreq->dev.iov_count, &nb); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, ++ "**ch3|sock|immedread", "ch3|sock|immedread %p %p %p", rreq, ++ conn, conn->vc); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "immediate readv, vc=%p nb=%" PRIdPTR ", rreq=0x%08x", ++ conn->vc, nb, rreq->handle)); ++ ++ if (nb > 0 && adjust_iov(&iovp, &rreq->dev.iov_count, nb)) { ++ int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *); ++ int complete; ++ ++ reqFn = rreq->dev.OnDataAvail; ++ if (!reqFn) { ++ MPIR_Assert(MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_GET_RESP); + mpi_errno = MPID_Request_complete(rreq); + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); + } +- complete = TRUE; +- } +- else { +- mpi_errno = reqFn( conn->vc, rreq, &complete ); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- } +- +- if (complete) { +- conn->recv_active = NULL; /* -- already set to NULL */ +- mpi_errno = connection_post_recv_pkt(conn); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- break; +- } +- } +- else { +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE, +- (MPL_DBG_FDEST,"posting readv, vc=%p, rreq=0x%08x", +- conn->vc, rreq->handle)); +- conn->recv_active = rreq; +- mpi_errno = MPIDI_CH3I_Sock_post_readv(conn->sock, iovp, rreq->dev.iov_count, NULL); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) { +- mpi_errno = MPIR_Err_create_code( +- mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**ch3|sock|postread", +- "ch3|sock|postread %p %p %p", rreq, conn, conn->vc); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- break; +- } ++ complete = TRUE; ++ } else { ++ mpi_errno = reqFn(conn->vc, rreq, &complete); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ if (complete) { ++ conn->recv_active = NULL; /* -- already set to NULL */ ++ mpi_errno = connection_post_recv_pkt(conn); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ break; ++ } ++ } else { ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, ++ (MPL_DBG_FDEST, "posting readv, vc=%p, rreq=0x%08x", ++ conn->vc, rreq->handle)); ++ conn->recv_active = rreq; ++ mpi_errno = MPIDI_CH3I_Sock_post_readv(conn->sock, iovp, rreq->dev.iov_count, NULL); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|postread", ++ "ch3|sock|postread %p %p %p", rreq, conn, conn->vc); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ break; ++ } + } + +- fn_fail: ++ fn_fail: + return mpi_errno; + } + +@@ -957,20 +908,18 @@ static int ReadMoreData( MPIDI_CH3I_Connection_t * conn, MPIR_Request *rreq ) + * The dynamic-library interface requires a unified Progress routine. + * This is that routine. + */ +-int MPIDI_CH3I_Progress( int blocking, MPID_Progress_state *state ) ++int MPIDI_CH3I_Progress(int blocking, MPID_Progress_state * state) + { + int mpi_errno; +- if (blocking) mpi_errno = MPIDI_CH3i_Progress_wait(state); +- else mpi_errno = MPIDI_CH3i_Progress_test(); ++ if (blocking) ++ mpi_errno = MPIDI_CH3i_Progress_wait(state); ++ else ++ mpi_errno = MPIDI_CH3i_Progress_test(); + + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_register_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id) ++int MPIDI_CH3I_Progress_register_hook(int (*progress_fn) (int *), int *id) + { + int mpi_errno = MPI_SUCCESS; + int i; +@@ -988,9 +937,9 @@ int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id) + } + + if (i >= MAX_PROGRESS_HOOKS) { +- return MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- "MPIDI_CH3I_Progress_register_hook", __LINE__, +- MPI_ERR_INTERN, "**progresshookstoomany", 0 ); ++ return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ "MPIDI_CH3I_Progress_register_hook", __LINE__, ++ MPI_ERR_INTERN, "**progresshookstoomany", 0); + } + + (*id) = i; +@@ -1004,10 +953,6 @@ int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_deregister_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_deregister_hook(int id) + { + int mpi_errno = MPI_SUCCESS; +@@ -1030,10 +975,6 @@ int MPIDI_CH3I_Progress_deregister_hook(int id) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_activate_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_activate_hook(int id) + { + int mpi_errno = MPI_SUCCESS; +@@ -1056,10 +997,6 @@ int MPIDI_CH3I_Progress_activate_hook(int id) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Progress_deactivate_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Progress_deactivate_hook(int id) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/sock/src/ch3_win_fns.c ++++ b/src/mpid/ch3/channels/sock/src/ch3_win_fns.c +@@ -8,11 +8,7 @@ + #include "mpidrma.h" + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Win_fns_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_Win_fns_init(MPIDI_CH3U_Win_fns_t *win_fns) ++int MPIDI_CH3_Win_fns_init(MPIDI_CH3U_Win_fns_t * win_fns) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_WIN_FNS_INIT); +@@ -26,11 +22,7 @@ int MPIDI_CH3_Win_fns_init(MPIDI_CH3U_Win_fns_t *win_fns) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Win_hooks_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3_Win_hooks_init(MPIDI_CH3U_Win_hooks_t *win_hooks) ++int MPIDI_CH3_Win_hooks_init(MPIDI_CH3U_Win_hooks_t * win_hooks) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_WIN_HOOKS_INIT); +@@ -44,10 +36,6 @@ int MPIDI_CH3_Win_hooks_init(MPIDI_CH3U_Win_hooks_t *win_hooks) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Win_pkt_orderings_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Win_pkt_orderings_init(MPIDI_CH3U_Win_pkt_ordering_t * win_pkt_orderings) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/channels/sock/src/ch3i_errno.c ++++ b/src/mpid/ch3/channels/sock/src/ch3i_errno.c +@@ -6,76 +6,78 @@ + + #include "mpidi_ch3_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_sock_errno_to_mpi_errno +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_sock_errno_to_mpi_errno(char * fcname, int sock_errno) ++int MPIDI_CH3I_sock_errno_to_mpi_errno(char *fcname, int sock_errno) + { + int mpi_errno; +- +- switch(sock_errno) +- { +- case SOCK_EOF: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|connclose", NULL); +- break; +- } +- +- case SOCK_ERR_NOMEM: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_OTHER, "**nomem", NULL); +- break; +- } +- +- case SOCK_ERR_HOST_LOOKUP: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|hostlookup", NULL); +- break; +- } +- +- case SOCK_ERR_CONN_REFUSED: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|connrefused", NULL); +- break; +- }n +- +- case SOCK_ERR_CONN_FAILED: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|connterm", NULL); +- break; +- } +- +- case SOCK_ERR_BAD_SOCK: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_INTERN, +- "**ch3|sock|badsock", NULL); +- break; +- } +- +- case SOCK_ERR_BAD_BUFFER: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_BUFFER, "**buffer", NULL); +- break; +- } +- +- case SOCK_ERR_ADDR_INUSE: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_OTHER, +- "**ch3|sock|addrinuse", NULL); +- break; +- } +- +- default: +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, MPI_ERR_OTHER, "**ch3|sock|failure", +- "**ch3|sock|failure %d", sock_errno); +- break; +- } ++ ++ switch (sock_errno) { ++ case SOCK_EOF: ++ { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|connclose", NULL); ++ break; ++ } ++ ++ case SOCK_ERR_NOMEM: ++ { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_OTHER, "**nomem", NULL); ++ break; ++ } ++ ++ case SOCK_ERR_HOST_LOOKUP: ++ { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|hostlookup", NULL); ++ break; ++ } ++ ++ case SOCK_ERR_CONN_REFUSED: ++ { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|connrefused", NULL); ++ break; ++ } ++ n case SOCK_ERR_CONN_FAILED: { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|connterm", NULL); ++ break; ++ } case SOCK_ERR_BAD_SOCK: { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_INTERN, "**ch3|sock|badsock", NULL); ++ break; ++ } ++ ++ case SOCK_ERR_BAD_BUFFER: ++ { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_BUFFER, "**buffer", NULL); ++ break; ++ } ++ ++ case SOCK_ERR_ADDR_INUSE: ++ { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|addrinuse", NULL); ++ break; ++ } ++ ++ default: ++ { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, __LINE__, ++ MPI_ERR_OTHER, "**ch3|sock|failure", ++ "**ch3|sock|failure %d", sock_errno); ++ break; ++ } + } + + return mpi_errno; +--- a/src/mpid/ch3/channels/sock/src/sock.c ++++ b/src/mpid/ch3/channels/sock/src/sock.c +@@ -41,8 +41,7 @@ + #endif + + +-enum MPIDI_CH3I_Socki_state +-{ ++enum MPIDI_CH3I_Socki_state { + MPIDI_CH3I_SOCKI_STATE_FIRST = 0, + MPIDI_CH3I_SOCKI_STATE_CONNECTING, + MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW, +@@ -52,8 +51,7 @@ enum MPIDI_CH3I_Socki_state + MPIDI_CH3I_SOCKI_STATE_LAST + }; + +-enum MPIDI_CH3I_Socki_type +-{ ++enum MPIDI_CH3I_Socki_type { + MPIDI_CH3I_SOCKI_TYPE_FIRST = 0, + MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION, + MPIDI_CH3I_SOCKI_TYPE_LISTENER, +@@ -63,138 +61,128 @@ enum MPIDI_CH3I_Socki_type + + /* + * struct pollinfo +- * ++ * + * sock_id - an integer id comprised of the sock_set id and the element number + * in the pollfd/info arrays +- * ++ * + * sock_set - a pointer to the sock set to which this connection belongs +- * ++ * + * elem - the element number of this connection in the pollfd/info arrays +- * +- * sock - at present this is only used to free the sock structure when the ++ * ++ * sock - at present this is only used to free the sock structure when the + * close is completed by MPIDIU_Sock_wait() +- * +- * fd - this file descriptor is used whenever the file descriptor is needed. ++ * ++ * fd - this file descriptor is used whenever the file descriptor is needed. + * this descriptor remains open until the sock, and + * thus the socket, are actually closed. the fd in the pollfd structure + * should only be used for telling poll() if it should + * check for events on that descriptor. +- * +- * user_ptr - a user supplied pointer that is included with event associated ++ * ++ * user_ptr - a user supplied pointer that is included with event associated + * with this connection +- * ++ * + * state - state of the connection + * + */ +-struct pollinfo +-{ ++struct pollinfo { + int sock_id; +- struct MPIDI_CH3I_Sock_set * sock_set; ++ struct MPIDI_CH3I_Sock_set *sock_set; + int elem; +- struct MPIDI_CH3I_Sock * sock; ++ struct MPIDI_CH3I_Sock *sock; + int fd; +- void * user_ptr; ++ void *user_ptr; + enum MPIDI_CH3I_Socki_type type; + enum MPIDI_CH3I_Socki_state state; + int os_errno; +-# ifdef MPICH_IS_THREADED ++#ifdef MPICH_IS_THREADED + int pollfd_events; +-# endif +- union +- { +- struct +- { +- MPL_IOV * ptr; +- int count; +- int offset; +- } iov; +- struct +- { +- char * ptr; +- size_t min; +- size_t max; +- } buf; ++#endif ++ union { ++ struct { ++ MPL_IOV *ptr; ++ int count; ++ int offset; ++ } iov; ++ struct { ++ char *ptr; ++ size_t min; ++ size_t max; ++ } buf; + } read; + int read_iov_flag; + size_t read_nb; + MPIDI_CH3I_Sock_progress_update_func_t read_progress_update_fn; +- union +- { +- struct +- { +- MPL_IOV * ptr; +- int count; +- int offset; +- } iov; +- struct +- { +- char * ptr; +- size_t min; +- size_t max; +- } buf; ++ union { ++ struct { ++ MPL_IOV *ptr; ++ int count; ++ int offset; ++ } iov; ++ struct { ++ char *ptr; ++ size_t min; ++ size_t max; ++ } buf; + } write; + int write_iov_flag; + size_t write_nb; + MPIDI_CH3I_Sock_progress_update_func_t write_progress_update_fn; + }; + +-struct MPIDI_CH3I_Socki_eventq_elem +-{ ++struct MPIDI_CH3I_Socki_eventq_elem { + struct MPIDI_CH3I_Sock_event event; + int set_elem; +- struct MPIDI_CH3I_Socki_eventq_elem * next; ++ struct MPIDI_CH3I_Socki_eventq_elem *next; + }; + +-struct MPIDI_CH3I_Sock_set +-{ ++struct MPIDI_CH3I_Sock_set { + int id; + + /* when the pollfds array is scanned for activity, start with this element. +- this is used to prevent favoring a particular +- element, such as the first. */ ++ * this is used to prevent favoring a particular ++ * element, such as the first. */ + int starting_elem; + + /* pointers to the pollfd and pollinfo that make up the logical poll array, +- along with the current size of the array and last +- allocated element */ ++ * along with the current size of the array and last ++ * allocated element */ + int poll_array_sz; + int poll_array_elems; +- struct pollfd * pollfds; +- struct pollinfo * pollinfos; ++ struct pollfd *pollfds; ++ struct pollinfo *pollinfos; + + /* head and tail pointers for the event queue */ +- struct MPIDI_CH3I_Socki_eventq_elem * eventq_head; +- struct MPIDI_CH3I_Socki_eventq_elem * eventq_tail; +- +-# ifdef MPICH_IS_THREADED ++ struct MPIDI_CH3I_Socki_eventq_elem *eventq_head; ++ struct MPIDI_CH3I_Socki_eventq_elem *eventq_tail; ++ ++#ifdef MPICH_IS_THREADED + /* pointer to the pollfds array being actively used by a blocking poll(); +- NULL if not blocking in poll() */ +- struct pollfd * pollfds_active; +- +- /* flag indicating if updates were made to any pollfd entries while a +- thread was blocking in poll() */ ++ * NULL if not blocking in poll() */ ++ struct pollfd *pollfds_active; ++ ++ /* flag indicating if updates were made to any pollfd entries while a ++ * thread was blocking in poll() */ + int pollfds_updated; +- +- /* flag indicating that a wakeup has already been posted on the +- interrupter socket */ ++ ++ /* flag indicating that a wakeup has already been posted on the ++ * interrupter socket */ + int wakeup_posted; +- ++ + /* sock and fds for the interrpter pipe */ +- struct MPIDI_CH3I_Sock * intr_sock; ++ struct MPIDI_CH3I_Sock *intr_sock; + int intr_fds[2]; +-# endif ++#endif + }; + +-struct MPIDI_CH3I_Sock +-{ +- struct MPIDI_CH3I_Sock_set * sock_set; ++struct MPIDI_CH3I_Sock { ++ struct MPIDI_CH3I_Sock_set *sock_set; + int elem; + }; + + /* FIXME: Why aren't these static */ + int MPIDI_CH3I_Socki_initialized = 0; + +-static struct MPIDI_CH3I_Socki_eventq_elem * MPIDI_CH3I_Socki_eventq_pool = NULL; ++static struct MPIDI_CH3I_Socki_eventq_elem *MPIDI_CH3I_Socki_eventq_pool = NULL; + + /* MT: needs to be atomically incremented */ + static int MPIDI_CH3I_Socki_set_next_id = 0; +@@ -204,46 +192,45 @@ static int MPIDI_CH3I_Socki_set_next_id = 0; + /* Set the buffer size on the socket fd from the environment variable + or other option; if "firm" is true, fail if the buffer size is not + successfully set */ +-int MPIDI_CH3I_Sock_SetSockBufferSize( int fd, int firm ); ++int MPIDI_CH3I_Sock_SetSockBufferSize(int fd, int firm); + /* Get a string version of the address in ifaddr*/ +-int MPIDI_CH3I_Sock_AddrToStr( MPIDI_CH3I_Sock_ifaddr_t *ifaddr, char *str, int maxlen ); ++int MPIDI_CH3I_Sock_AddrToStr(MPIDI_CH3I_Sock_ifaddr_t * ifaddr, char *str, int maxlen); + + + + /*********** socki_util.i ***********/ + + #ifdef MPICH_IS_THREADED +-static int MPIDI_CH3I_Socki_wakeup(struct MPIDI_CH3I_Sock_set * sock_set); +-int MPIDI_Sock_update_sock_set( struct MPIDI_CH3I_Sock_set *, int ); ++static int MPIDI_CH3I_Socki_wakeup(struct MPIDI_CH3I_Sock_set *sock_set); ++int MPIDI_Sock_update_sock_set(struct MPIDI_CH3I_Sock_set *, int); + #endif + +-static int MPIDI_CH3I_Socki_os_to_mpi_errno(struct pollinfo * pollinfo, +- int os_errno, const char * fcname, int line, int * conn_failed); ++static int MPIDI_CH3I_Socki_os_to_mpi_errno(struct pollinfo *pollinfo, ++ int os_errno, const char *fcname, int line, ++ int *conn_failed); + + static int MPIDI_CH3I_Socki_adjust_iov(ssize_t nb, MPL_IOV * const iov, +- const int count, int * const offsetp); ++ const int count, int *const offsetp); + +-static int MPIDI_CH3I_Socki_sock_alloc(struct MPIDI_CH3I_Sock_set * sock_set, +- struct MPIDI_CH3I_Sock ** sockp); +-static void MPIDI_CH3I_Socki_sock_free(struct MPIDI_CH3I_Sock * sock); ++static int MPIDI_CH3I_Socki_sock_alloc(struct MPIDI_CH3I_Sock_set *sock_set, ++ struct MPIDI_CH3I_Sock **sockp); ++static void MPIDI_CH3I_Socki_sock_free(struct MPIDI_CH3I_Sock *sock); + +-static int MPIDI_CH3I_Socki_event_enqueue(struct pollinfo * pollinfo, +- enum MPIDI_CH3I_Sock_op op, +- size_t num_bytes, +- void * user_ptr, int error); +-static inline int MPIDI_CH3I_Socki_event_dequeue(struct MPIDI_CH3I_Sock_set * sock_set, +- int * set_elem, +- struct MPIDI_CH3I_Sock_event * eventp); ++static int MPIDI_CH3I_Socki_event_enqueue(struct pollinfo *pollinfo, ++ enum MPIDI_CH3I_Sock_op op, ++ size_t num_bytes, void *user_ptr, int error); ++static inline int MPIDI_CH3I_Socki_event_dequeue(struct MPIDI_CH3I_Sock_set *sock_set, ++ int *set_elem, ++ struct MPIDI_CH3I_Sock_event *eventp); + + static void MPIDI_CH3I_Socki_free_eventq_mem(void); + +-struct MPIDI_CH3I_Socki_eventq_table +-{ ++struct MPIDI_CH3I_Socki_eventq_table { + struct MPIDI_CH3I_Socki_eventq_elem elems[MPIDI_CH3I_SOCK_EVENTQ_POOL_SIZE]; +- struct MPIDI_CH3I_Socki_eventq_table * next; ++ struct MPIDI_CH3I_Socki_eventq_table *next; + }; + +-static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head=NULL; ++static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head = NULL; + + + +@@ -259,7 +246,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + mpi_errno_ = MPIDI_CH3I_Socki_event_enqueue((pollinfo_), (op_), (nb_), (user_ptr_), (event_mpi_errno_)); \ + if (mpi_errno_ != MPI_SUCCESS) \ + { \ +- mpi_errno_ = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, \ ++ mpi_errno_ = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, \ + "**sock|poll|eqfail", "**sock|poll|eqfail %d %d %d", \ + pollinfo->sock_set->id, pollinfo->sock_id, (op_)); \ + goto fail_label_; \ +@@ -274,12 +261,12 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + runtime control of the thread level */ + + #ifndef MPICH_IS_THREADED +-# define MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd_, pollinfo_, op_) \ ++#define MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd_, pollinfo_, op_) \ + { \ + (pollfd_)->events |= (op_); \ + (pollfd_)->fd = (pollinfo_)->fd; \ + } +-# define MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd_, pollinfo_, op_) \ ++#define MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd_, pollinfo_, op_) \ + { \ + (pollfd_)->events &= ~(op_); \ + (pollfd_)->revents &= ~(op_); \ +@@ -290,7 +277,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + } + #else /* MPICH_IS_THREADED */ + /* FIXME: Does this need a runtime check on whether threads are in use? */ +-# define MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd_, pollinfo_, op_) \ ++#define MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd_, pollinfo_, op_) \ + { \ + (pollinfo_)->pollfd_events |= (op_); \ + if ((pollinfo_)->sock_set->pollfds_active == NULL) \ +@@ -304,7 +291,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + MPIDI_CH3I_Socki_wakeup((pollinfo_)->sock_set); \ + } \ + } +-# define MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd_, pollinfo_, op_) \ ++#define MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd_, pollinfo_, op_) \ + { \ + (pollinfo_)->pollfd_events &= ~(op_); \ + if ((pollinfo_)->sock_set->pollfds_active == NULL) \ +@@ -340,13 +327,13 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + if (errno == ENOMEM || errno == ENOBUFS) \ + { \ + mpi_errno_ = MPIR_Err_create_code( \ +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|osnomem", \ ++ MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|osnomem", \ + "**sock|osnomem %s %d %d", "getsockopt", pollinfo->sock_set->id, pollinfo->sock_id); \ + } \ + else \ + { \ + mpi_errno = MPIR_Err_create_code( \ +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|oserror", \ ++ MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|oserror", \ + "**sock|poll|oserror %s %d %d %d %s", "getsockopt", pollinfo->sock_set->id, pollinfo->sock_id, \ + (os_errno_), MPIR_Strerror(os_errno_)); \ + } \ +@@ -366,7 +353,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + { \ + if (MPIDI_CH3I_Socki_initialized <= 0) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_INIT, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_INIT, \ + "**sock|uninit", NULL); \ + goto fail_label_; \ + } \ +@@ -383,7 +370,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + if ((sock_) == NULL || (sock_)->sock_set == NULL || (sock_)->elem < 0 || \ + (sock_)->elem >= (sock_)->sock_set->poll_array_elems) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ + "**sock|badsock", NULL); \ + goto fail_label_; \ + } \ +@@ -393,7 +380,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + if (pollinfo__->type <= MPIDI_CH3I_SOCKI_TYPE_FIRST || pollinfo__->type >= MPIDI_CH3I_SOCKI_TYPE_INTERRUPTER || \ + pollinfo__->state <= MPIDI_CH3I_SOCKI_STATE_FIRST || pollinfo__->state >= MPIDI_CH3I_SOCKI_STATE_LAST) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ + "**sock|badsock", NULL); \ + goto fail_label_; \ + } \ +@@ -407,7 +394,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + if ((pollinfo_)->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING) \ + { \ + (mpi_errno_) = MPIR_Err_create_code( \ +- (mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, "**sock|notconnected", \ ++ (mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, "**sock|notconnected", \ + "**sock|notconnected %d %d", (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + goto fail_label_; \ + } \ +@@ -416,13 +403,13 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + if ((pollinfo_)->os_errno == 0) \ + { \ + (mpi_errno_) = MPIR_Err_create_code( \ +- (mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, "**sock|connclosed", \ ++ (mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, "**sock|connclosed", \ + "**sock|connclosed %d %d", (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + } \ + else \ + { \ + (mpi_errno_) = MPIR_Err_create_code( \ +- (mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, "**sock|connfailed", \ ++ (mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, "**sock|connfailed", \ + "**sock|poll|connfailed %d %d %d %s", (pollinfo_)->sock_set->id, (pollinfo_)->sock_id, \ + (pollinfo_)->os_errno, MPIR_Strerror((pollinfo_)->os_errno)); \ + } \ +@@ -431,14 +418,14 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + else if ((pollinfo_)->state == MPIDI_CH3I_SOCKI_STATE_CLOSING) \ + { \ + (mpi_errno_) = MPIR_Err_create_code( \ +- (mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_INPROGRESS, "**sock|closing", \ ++ (mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_INPROGRESS, "**sock|closing", \ + "**sock|closing %d %d", (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + \ + goto fail_label_; \ + } \ + else if ((pollinfo_)->state != MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW && (pollinfo_)->state != MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ + "**sock|badsock", NULL); \ + goto fail_label_; \ + } \ +@@ -446,7 +433,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + else if ((pollinfo_)->type == MPIDI_CH3I_SOCKI_TYPE_LISTENER) \ + { \ + (mpi_errno_) = MPIR_Err_create_code( \ +- (mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, "**sock|listener_read", \ ++ (mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, "**sock|listener_read", \ + "**sock|listener_read %d %d", (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + \ + goto fail_label_; \ +@@ -460,7 +447,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + { \ + if ((pollinfo_)->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ + "**sock|notconnected", "**sock|notconnected %d %d", \ + (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + goto fail_label_; \ +@@ -470,13 +457,13 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + if ((pollinfo_)->os_errno == 0) \ + { \ + (mpi_errno_) = MPIR_Err_create_code( \ +- (mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, "**sock|connclosed", \ ++ (mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, "**sock|connclosed", \ + "**sock|connclosed %d %d", (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + } \ + else \ + { \ + (mpi_errno_) = MPIR_Err_create_code( \ +- (mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, "**sock|connfailed", \ ++ (mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, "**sock|connfailed", \ + "**sock|poll|connfailed %d %d %d %s", (pollinfo_)->sock_set->id, (pollinfo_)->sock_id, \ + (pollinfo_)->os_errno, MPIR_Strerror((pollinfo_)->os_errno)); \ + } \ +@@ -484,7 +471,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + } \ + else if ((pollinfo_)->state == MPIDI_CH3I_SOCKI_STATE_CLOSING) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_INPROGRESS, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_INPROGRESS, \ + "**sock|closing", "**sock|closing %d %d", \ + (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + \ +@@ -492,14 +479,14 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + } \ + else if ((pollinfo_)->state != MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ + "**sock|badsock", NULL); \ + goto fail_label_; \ + } \ + } \ + else if ((pollinfo_)->type == MPIDI_CH3I_SOCKI_TYPE_LISTENER) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ + "**sock|listener_write", "**sock|listener_write %d %d", \ + (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + \ +@@ -512,7 +499,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + { \ + if ((pollinfo_)->fd < 0) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, \ + "**sock|badhandle", "**sock|poll|badhandle %d %d %d", \ + (pollinfo_)->sock_set->id, (pollinfo_)->sock_id, (pollinfo_)->fd); \ + goto fail_label_; \ +@@ -524,7 +511,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + { \ + if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET((pollfd_), (pollinfo_), POLLIN)) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_INPROGRESS, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_INPROGRESS, \ + "**sock|reads", "**sock|reads %d %d", \ + (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + goto fail_label_; \ +@@ -536,7 +523,7 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + { \ + if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET((pollfd_), (pollinfo_), POLLOUT)) \ + { \ +- (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_INPROGRESS, \ ++ (mpi_errno_) = MPIR_Err_create_code((mpi_errno_), MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_INPROGRESS, \ + "**sock|writes", "**sock|writes %d %d", \ + (pollinfo_)->sock_set->id, (pollinfo_)->sock_id); \ + goto fail_label_; \ +@@ -561,42 +548,31 @@ static struct MPIDI_CH3I_Socki_eventq_table *MPIDI_CH3I_Socki_eventq_table_head= + /* + * MPIDI_CH3I_Socki_wakeup() + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_wakeup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_wakeup(struct MPIDI_CH3I_Sock_set * sock_set) ++static int MPIDI_CH3I_Socki_wakeup(struct MPIDI_CH3I_Sock_set *sock_set) + { + MPIR_THREAD_CHECK_BEGIN; +- if (sock_set->wakeup_posted == FALSE) +- { +- for(;;) +- { +- int nb; +- char c = 0; ++ if (sock_set->wakeup_posted == FALSE) { ++ for (;;) { ++ int nb; ++ char c = 0; + +- nb = write(sock_set->intr_fds[1], &c, 1); +- if (nb == 1) +- { +- break; +- } ++ nb = write(sock_set->intr_fds[1], &c, 1); ++ if (nb == 1) { ++ break; ++ } + +- MPIR_Assertp(nb == 0 || errno == EINTR); +- } ++ MPIR_Assertp(nb == 0 || errno == EINTR); ++ } + +- sock_set->wakeup_posted = TRUE; ++ sock_set->wakeup_posted = TRUE; + } + MPIR_THREAD_CHECK_END; + return MPIDI_CH3I_SOCK_SUCCESS; + } ++ + /* end MPIDI_CH3I_Socki_wakeup() */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Sock_update_sock_set +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_Sock_update_sock_set( struct MPIDI_CH3I_Sock_set *sock_set, +- int pollfds_active_elems ) ++int MPIDI_Sock_update_sock_set(struct MPIDI_CH3I_Sock_set *sock_set, int pollfds_active_elems) + { + int mpi_errno = MPI_SUCCESS; + int elem; +@@ -604,30 +580,28 @@ int MPIDI_Sock_update_sock_set( struct MPIDI_CH3I_Sock_set *sock_set, + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SOCK_UPDATE_SOCK_SET); + for (elem = 0; elem < sock_set->poll_array_elems; elem++) { +- sock_set->pollfds[elem].events = sock_set->pollinfos[elem].pollfd_events; +- if ((sock_set->pollfds[elem].events & (POLLIN | POLLOUT)) != 0) { +- sock_set->pollfds[elem].fd = sock_set->pollinfos[elem].fd; +- } +- else { +- sock_set->pollfds[elem].fd = -1; +- } +- +- if (elem < pollfds_active_elems) { +- if (sock_set->pollfds_active == sock_set->pollfds) { +- sock_set->pollfds[elem].revents &= ~(POLLIN | POLLOUT) | sock_set->pollfds[elem].events; +- } +- else { +- sock_set->pollfds[elem].revents = sock_set->pollfds_active[elem].revents & +- (~(POLLIN | POLLOUT) | sock_set->pollfds[elem].events); +- } +- } +- else { +- sock_set->pollfds[elem].revents = 0; +- } ++ sock_set->pollfds[elem].events = sock_set->pollinfos[elem].pollfd_events; ++ if ((sock_set->pollfds[elem].events & (POLLIN | POLLOUT)) != 0) { ++ sock_set->pollfds[elem].fd = sock_set->pollinfos[elem].fd; ++ } else { ++ sock_set->pollfds[elem].fd = -1; ++ } ++ ++ if (elem < pollfds_active_elems) { ++ if (sock_set->pollfds_active == sock_set->pollfds) { ++ sock_set->pollfds[elem].revents &= ++ ~(POLLIN | POLLOUT) | sock_set->pollfds[elem].events; ++ } else { ++ sock_set->pollfds[elem].revents = sock_set->pollfds_active[elem].revents & ++ (~(POLLIN | POLLOUT) | sock_set->pollfds[elem].events); ++ } ++ } else { ++ sock_set->pollfds[elem].revents = 0; ++ } + } + + if (sock_set->pollfds_active != sock_set->pollfds) { +- MPL_free(sock_set->pollfds_active); ++ MPL_free(sock_set->pollfds_active); + } + + sock_set->pollfds_updated = FALSE; +@@ -646,79 +620,77 @@ int MPIDI_Sock_update_sock_set( struct MPIDI_CH3I_Sock_set *sock_set, + * This routine assumes that no thread can change the state between state check before the nonblocking OS operation and the call + * to this routine. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_os_to_mpi_errno +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* --BEGIN ERROR HANDLING-- */ +-static int MPIDI_CH3I_Socki_os_to_mpi_errno(struct pollinfo * pollinfo, int os_errno, const char * fcname, int line, int * disconnected) ++static int MPIDI_CH3I_Socki_os_to_mpi_errno(struct pollinfo *pollinfo, int os_errno, ++ const char *fcname, int line, int *disconnected) + { + int mpi_errno; + +- if (os_errno == ENOMEM || os_errno == ENOBUFS) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, fcname, line, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|osnomem", "**sock|poll|osnomem %d %d %d %s", +- pollinfo->sock_set->id, pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); +- *disconnected = FALSE; +- } +- else if (os_errno == EFAULT || os_errno == EINVAL) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, fcname, line, MPIDI_CH3I_SOCK_ERR_BAD_BUF, +- "**sock|badbuf", "**sock|poll|badbuf %d %d %d %s", +- pollinfo->sock_set->id, pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); +- *disconnected = FALSE; +- } +- else if (os_errno == EPIPE) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, fcname, line, MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, +- "**sock|connclosed", "**sock|poll|connclosed %d %d %d %s", +- pollinfo->sock_set->id, pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); +- *disconnected = TRUE; +- } +- else if (os_errno == ECONNRESET || os_errno == ENOTCONN || os_errno == ETIMEDOUT) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, fcname, line, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, +- "**sock|connfailed", "**sock|poll|connfailed %d %d %d %s", +- pollinfo->sock_set->id, pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); +- pollinfo->os_errno = os_errno; +- *disconnected = TRUE; +- } +- else if (os_errno == EBADF) +- { +- /* +- * If we have a bad file descriptor, then either the sock was bad to +- * start with and we didn't catch it in the preliminary +- * checks, or a sock closure was finalized after the preliminary +- * checks were performed. The latter should not happen if +- * the thread safety code is correctly implemented. In any case, +- * the data structures associated with the sock are no +- * longer valid and should not be modified. We indicate this by +- * returning a fatal error. +- */ +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, line, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, +- "**sock|badsock", NULL); +- *disconnected = FALSE; +- } +- else +- { +- /* +- * Unexpected OS error. +- * +- * FIXME: technically we should never reach this section of code. +- * What's the right way to handle this situation? Should +- * we print an immediate message asking the user to report the errno +- * so that we can plug the hole? +- */ +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, line, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, +- "**sock|oserror", "**sock|poll|oserror %d %d %d %s", +- pollinfo->sock_set->id, pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); +- pollinfo->os_errno = os_errno; +- *disconnected = TRUE; ++ if (os_errno == ENOMEM || os_errno == ENOBUFS) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, fcname, line, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|osnomem", ++ "**sock|poll|osnomem %d %d %d %s", pollinfo->sock_set->id, ++ pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); ++ *disconnected = FALSE; ++ } else if (os_errno == EFAULT || os_errno == EINVAL) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, fcname, line, ++ MPIDI_CH3I_SOCK_ERR_BAD_BUF, "**sock|badbuf", ++ "**sock|poll|badbuf %d %d %d %s", pollinfo->sock_set->id, ++ pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); ++ *disconnected = FALSE; ++ } else if (os_errno == EPIPE) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, fcname, line, ++ MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, "**sock|connclosed", ++ "**sock|poll|connclosed %d %d %d %s", pollinfo->sock_set->id, ++ pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); ++ *disconnected = TRUE; ++ } else if (os_errno == ECONNRESET || os_errno == ENOTCONN || os_errno == ETIMEDOUT) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, fcname, line, ++ MPIDI_CH3I_SOCK_ERR_CONN_FAILED, "**sock|connfailed", ++ "**sock|poll|connfailed %d %d %d %s", pollinfo->sock_set->id, ++ pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); ++ pollinfo->os_errno = os_errno; ++ *disconnected = TRUE; ++ } else if (os_errno == EBADF) { ++ /* ++ * If we have a bad file descriptor, then either the sock was bad to ++ * start with and we didn't catch it in the preliminary ++ * checks, or a sock closure was finalized after the preliminary ++ * checks were performed. The latter should not happen if ++ * the thread safety code is correctly implemented. In any case, ++ * the data structures associated with the sock are no ++ * longer valid and should not be modified. We indicate this by ++ * returning a fatal error. ++ */ ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, line, ++ MPIDI_CH3I_SOCK_ERR_BAD_SOCK, "**sock|badsock", NULL); ++ *disconnected = FALSE; ++ } else { ++ /* ++ * Unexpected OS error. ++ * ++ * FIXME: technically we should never reach this section of code. ++ * What's the right way to handle this situation? Should ++ * we print an immediate message asking the user to report the errno ++ * so that we can plug the hole? ++ */ ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, fcname, line, ++ MPIDI_CH3I_SOCK_ERR_CONN_FAILED, "**sock|oserror", ++ "**sock|poll|oserror %d %d %d %s", pollinfo->sock_set->id, ++ pollinfo->sock_id, os_errno, MPIR_Strerror(os_errno)); ++ pollinfo->os_errno = os_errno; ++ *disconnected = TRUE; + } + + return mpi_errno; + } ++ + /* --END ERROR HANDLING-- */ + /* end MPIDI_CH3I_Socki_os_to_mpi_errno() */ + +@@ -736,46 +708,37 @@ static int MPIDI_CH3I_Socki_os_to_mpi_errno(struct pollinfo * pollinfo, int os_e + * making a copy to shift down elements when only part of the iov is + * consumed. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_adjust_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_adjust_iov(ssize_t nb, MPL_IOV * const iov, const int count, int * const offsetp) ++static int MPIDI_CH3I_Socki_adjust_iov(ssize_t nb, MPL_IOV * const iov, const int count, ++ int *const offsetp) + { + int offset = *offsetp; + +- while (offset < count) +- { +- if (iov[offset].MPL_IOV_LEN <= nb) +- { +- nb -= iov[offset].MPL_IOV_LEN; +- offset++; +- } +- else +- { +- iov[offset].MPL_IOV_BUF = (char *) iov[offset].MPL_IOV_BUF + nb; +- iov[offset].MPL_IOV_LEN -= nb; +- *offsetp = offset; +- return FALSE; +- } ++ while (offset < count) { ++ if (iov[offset].MPL_IOV_LEN <= nb) { ++ nb -= iov[offset].MPL_IOV_LEN; ++ offset++; ++ } else { ++ iov[offset].MPL_IOV_BUF = (char *) iov[offset].MPL_IOV_BUF + nb; ++ iov[offset].MPL_IOV_LEN -= nb; ++ *offsetp = offset; ++ return FALSE; ++ } + } + + *offsetp = offset; + return TRUE; + } ++ + /* end MPIDI_CH3I_Socki_adjust_iov() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_sock_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_sock_alloc(struct MPIDI_CH3I_Sock_set * sock_set, struct MPIDI_CH3I_Sock ** sockp) ++static int MPIDI_CH3I_Socki_sock_alloc(struct MPIDI_CH3I_Sock_set *sock_set, ++ struct MPIDI_CH3I_Sock **sockp) + { +- struct MPIDI_CH3I_Sock * sock = NULL; ++ struct MPIDI_CH3I_Sock *sock = NULL; + int avail_elem; +- struct pollfd * pollfds = NULL; +- struct pollinfo * pollinfos = NULL; ++ struct pollfd *pollfds = NULL; ++ struct pollinfo *pollinfos = NULL; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCKI_SOCK_ALLOC); + +@@ -784,118 +747,117 @@ static int MPIDI_CH3I_Socki_sock_alloc(struct MPIDI_CH3I_Sock_set * sock_set, st + /* FIXME: Should this use the CHKPMEM macros (perm malloc)? */ + sock = MPL_malloc(sizeof(struct MPIDI_CH3I_Sock), MPL_MEM_ADDRESS); + /* --BEGIN ERROR HANDLING-- */ +- if (sock == NULL) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, "**nomem", 0); +- goto fn_fail; ++ if (sock == NULL) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**nomem", 0); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + + /* + * Check existing poll structures for a free element. + */ +- for (avail_elem = 0; avail_elem < sock_set->poll_array_sz; avail_elem++) +- { +- if (sock_set->pollinfos[avail_elem].sock_id == -1) +- { +- if (avail_elem >= sock_set->poll_array_elems) +- { +- sock_set->poll_array_elems = avail_elem + 1; +- } +- +- break; +- } ++ for (avail_elem = 0; avail_elem < sock_set->poll_array_sz; avail_elem++) { ++ if (sock_set->pollinfos[avail_elem].sock_id == -1) { ++ if (avail_elem >= sock_set->poll_array_elems) { ++ sock_set->poll_array_elems = avail_elem + 1; ++ } ++ ++ break; ++ } + } + + /* + * No free elements were found. Larger pollfd and pollinfo arrays need to + * be allocated and the existing data transfered over. + */ +- if (avail_elem == sock_set->poll_array_sz) +- { +- int elem; +- +- pollfds = MPL_malloc((sock_set->poll_array_sz + MPIDI_CH3I_SOCK_SET_DEFAULT_SIZE) * sizeof(struct pollfd), MPL_MEM_ADDRESS); +- /* --BEGIN ERROR HANDLING-- */ +- if (pollfds == NULL) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**nomem", 0); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- pollinfos = MPL_malloc((sock_set->poll_array_sz + MPIDI_CH3I_SOCK_SET_DEFAULT_SIZE) * sizeof(struct pollinfo), MPL_MEM_ADDRESS); +- /* --BEGIN ERROR HANDLING-- */ +- if (pollinfos == NULL) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**nomem", 0); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- if (sock_set->poll_array_sz > 0) +- { +- /* +- * Copy information from the old arrays and then free them. +- * +- * In the multi-threaded case, the pollfd array can only be copied +- * if another thread is not already blocking in poll() +- * and thus potentially modifying the array. Furthermore, the +- * pollfd array must not be freed if it is the one +- * actively being used by pol(). +- */ ++ if (avail_elem == sock_set->poll_array_sz) { ++ int elem; ++ ++ pollfds = ++ MPL_malloc((sock_set->poll_array_sz + ++ MPIDI_CH3I_SOCK_SET_DEFAULT_SIZE) * sizeof(struct pollfd), MPL_MEM_ADDRESS); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (pollfds == NULL) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**nomem", 0); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ pollinfos = ++ MPL_malloc((sock_set->poll_array_sz + ++ MPIDI_CH3I_SOCK_SET_DEFAULT_SIZE) * sizeof(struct pollinfo), ++ MPL_MEM_ADDRESS); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (pollinfos == NULL) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**nomem", 0); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ if (sock_set->poll_array_sz > 0) { ++ /* ++ * Copy information from the old arrays and then free them. ++ * ++ * In the multi-threaded case, the pollfd array can only be copied ++ * if another thread is not already blocking in poll() ++ * and thus potentially modifying the array. Furthermore, the ++ * pollfd array must not be freed if it is the one ++ * actively being used by pol(). ++ */ + # ifndef MPICH_IS_THREADED +- { +- memcpy(pollfds, sock_set->pollfds, sock_set->poll_array_sz * sizeof(struct pollfd)); +- MPL_free(sock_set->pollfds); +- } ++ { ++ memcpy(pollfds, sock_set->pollfds, sock_set->poll_array_sz * sizeof(struct pollfd)); ++ MPL_free(sock_set->pollfds); ++ } + # else +- { +- if (sock_set->pollfds_active == NULL) +- { +- memcpy(pollfds, sock_set->pollfds, sock_set->poll_array_sz * sizeof(struct pollfd)); +- } +- if (sock_set->pollfds_active != sock_set->pollfds) +- { +- MPL_free(sock_set->pollfds); +- } +- } +-# endif +- +- memcpy(pollinfos, sock_set->pollinfos, sock_set->poll_array_sz * sizeof(struct pollinfo)); +- MPL_free(sock_set->pollinfos); +- } +- +- sock_set->poll_array_elems = avail_elem + 1; +- sock_set->poll_array_sz += MPIDI_CH3I_SOCK_SET_DEFAULT_SIZE; +- sock_set->pollfds = pollfds; +- sock_set->pollinfos = pollinfos; +- +- /* +- * Initialize new elements +- */ +- for (elem = avail_elem; elem < sock_set->poll_array_sz; elem++) +- { +- pollfds[elem].fd = -1; +- pollfds[elem].events = 0; +- pollfds[elem].revents = 0; +- } +- for (elem = avail_elem; elem < sock_set->poll_array_sz; elem++) +- { +- pollinfos[elem].fd = -1; +- pollinfos[elem].sock_set = sock_set; +- pollinfos[elem].elem = elem; +- pollinfos[elem].sock = NULL; +- pollinfos[elem].sock_id = -1; +- pollinfos[elem].type = MPIDI_CH3I_SOCKI_TYPE_FIRST; +- pollinfos[elem].state = MPIDI_CH3I_SOCKI_STATE_FIRST; ++ { ++ if (sock_set->pollfds_active == NULL) { ++ memcpy(pollfds, sock_set->pollfds, ++ sock_set->poll_array_sz * sizeof(struct pollfd)); ++ } ++ if (sock_set->pollfds_active != sock_set->pollfds) { ++ MPL_free(sock_set->pollfds); ++ } ++ } ++#endif ++ ++ memcpy(pollinfos, sock_set->pollinfos, ++ sock_set->poll_array_sz * sizeof(struct pollinfo)); ++ MPL_free(sock_set->pollinfos); ++ } ++ ++ sock_set->poll_array_elems = avail_elem + 1; ++ sock_set->poll_array_sz += MPIDI_CH3I_SOCK_SET_DEFAULT_SIZE; ++ sock_set->pollfds = pollfds; ++ sock_set->pollinfos = pollinfos; ++ ++ /* ++ * Initialize new elements ++ */ ++ for (elem = avail_elem; elem < sock_set->poll_array_sz; elem++) { ++ pollfds[elem].fd = -1; ++ pollfds[elem].events = 0; ++ pollfds[elem].revents = 0; ++ } ++ for (elem = avail_elem; elem < sock_set->poll_array_sz; elem++) { ++ pollinfos[elem].fd = -1; ++ pollinfos[elem].sock_set = sock_set; ++ pollinfos[elem].elem = elem; ++ pollinfos[elem].sock = NULL; ++ pollinfos[elem].sock_id = -1; ++ pollinfos[elem].type = MPIDI_CH3I_SOCKI_TYPE_FIRST; ++ pollinfos[elem].state = MPIDI_CH3I_SOCKI_STATE_FIRST; + # ifdef MPICH_IS_THREADED +- { +- pollinfos[elem].pollfd_events = 0; +- } ++ { ++ pollinfos[elem].pollfd_events = 0; ++ } + # endif +- } ++ } + } + + /* +@@ -908,11 +870,11 @@ static int MPIDI_CH3I_Socki_sock_alloc(struct MPIDI_CH3I_Sock_set * sock_set, st + MPIR_Assert(sock_set->pollinfos[avail_elem].sock_id == -1); + MPIR_Assert(sock_set->pollinfos[avail_elem].type == MPIDI_CH3I_SOCKI_TYPE_FIRST); + MPIR_Assert(sock_set->pollinfos[avail_elem].state == MPIDI_CH3I_SOCKI_STATE_FIRST); +-# ifdef MPICH_IS_THREADED ++#ifdef MPICH_IS_THREADED + { +- MPIR_Assert(sock_set->pollinfos[avail_elem].pollfd_events == 0); ++ MPIR_Assert(sock_set->pollinfos[avail_elem].pollfd_events == 0); + } +-# endif ++#endif + + /* + * Initialize newly allocated sock structure and associated poll structures +@@ -926,16 +888,15 @@ static int MPIDI_CH3I_Socki_sock_alloc(struct MPIDI_CH3I_Sock_set * sock_set, st + sock_set->pollfds[avail_elem].events = 0; + sock_set->pollfds[avail_elem].revents = 0; + +-# ifdef MPICH_IS_THREADED ++#ifdef MPICH_IS_THREADED + { + MPIR_THREAD_CHECK_BEGIN; +- if (sock_set->pollfds_active != NULL) +- { +- sock_set->pollfds_updated = TRUE; +- } ++ if (sock_set->pollfds_active != NULL) { ++ sock_set->pollfds_updated = TRUE; ++ } + MPIR_THREAD_CHECK_END; + } +-# endif ++#endif + + *sockp = sock; + +@@ -945,77 +906,61 @@ static int MPIDI_CH3I_Socki_sock_alloc(struct MPIDI_CH3I_Sock_set * sock_set, st + + /* --BEGIN ERROR HANDLING-- */ + fn_fail: +- if (pollinfos != NULL) +- { +- MPL_free(pollinfos); +- } +- +- if (pollfds != NULL) +- { +- MPL_free(pollfds); +- } +- +- if (sock != NULL) +- { +- MPL_free(sock); +- } ++ MPL_free(pollinfos); ++ MPL_free(pollfds); ++ MPL_free(sock); + + goto fn_exit; + /* --END ERROR HANDLING-- */ + } ++ + /* end MPIDI_CH3I_Socki_sock_alloc() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_sock_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static void MPIDI_CH3I_Socki_sock_free(struct MPIDI_CH3I_Sock * sock) ++static void MPIDI_CH3I_Socki_sock_free(struct MPIDI_CH3I_Sock *sock) + { +- struct pollfd * pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); +- struct pollinfo * pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(sock); +- struct MPIDI_CH3I_Sock_set * sock_set = sock->sock_set; ++ struct pollfd *pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); ++ struct pollinfo *pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(sock); ++ struct MPIDI_CH3I_Sock_set *sock_set = sock->sock_set; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCKI_SOCK_FREE); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCKI_SOCK_FREE); + + /* FIXME: We need an abstraction for the thread sync operations */ +-# ifdef MPICH_IS_THREADED ++#ifdef MPICH_IS_THREADED + { +- /* +- * Freeing a sock while Sock_wait() is blocked in poll() is not supported +- */ +- MPIR_Assert(sock_set->pollfds_active == NULL); ++ /* ++ * Freeing a sock while Sock_wait() is blocked in poll() is not supported ++ */ ++ MPIR_Assert(sock_set->pollfds_active == NULL); + } +-# endif ++#endif + + /* + * Compress poll array + */ +- /* FIXME: move last element into current position and update sock associated with last element. ++ /* FIXME: move last element into current position and update sock associated with last element. + */ +- if (sock->elem + 1 == sock_set->poll_array_elems) +- { +- sock_set->poll_array_elems -= 1; +- if (sock_set->starting_elem >= sock_set->poll_array_elems) +- { +- sock_set->starting_elem = 0; +- } ++ if (sock->elem + 1 == sock_set->poll_array_elems) { ++ sock_set->poll_array_elems -= 1; ++ if (sock_set->starting_elem >= sock_set->poll_array_elems) { ++ sock_set->starting_elem = 0; ++ } + } + + /* + * Remove entry from the poll list and mark the entry as free + */ +- pollinfo->fd = -1; +- pollinfo->sock = NULL; ++ pollinfo->fd = -1; ++ pollinfo->sock = NULL; + pollinfo->sock_id = -1; +- pollinfo->type = MPIDI_CH3I_SOCKI_TYPE_FIRST; +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_FIRST; +-# ifdef MPICH_IS_THREADED ++ pollinfo->type = MPIDI_CH3I_SOCKI_TYPE_FIRST; ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_FIRST; ++#ifdef MPICH_IS_THREADED + { +- pollinfo->pollfd_events = 0; ++ pollinfo->pollfd_events = 0; + } +-# endif ++#endif + + pollfd->fd = -1; + pollfd->events = 0; +@@ -1031,57 +976,49 @@ static void MPIDI_CH3I_Socki_sock_free(struct MPIDI_CH3I_Sock * sock) + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCKI_SOCK_FREE); + } ++ + /* end MPIDI_CH3I_Socki_sock_free() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_event_enqueue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_event_enqueue(struct pollinfo * pollinfo, MPIDI_CH3I_Sock_op_t op, size_t num_bytes, +- void * user_ptr, int error) ++static int MPIDI_CH3I_Socki_event_enqueue(struct pollinfo *pollinfo, MPIDI_CH3I_Sock_op_t op, ++ size_t num_bytes, void *user_ptr, int error) + { +- struct MPIDI_CH3I_Sock_set * sock_set = pollinfo->sock_set; +- struct MPIDI_CH3I_Socki_eventq_elem * eventq_elem; ++ struct MPIDI_CH3I_Sock_set *sock_set = pollinfo->sock_set; ++ struct MPIDI_CH3I_Socki_eventq_elem *eventq_elem; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCKI_EVENT_ENQUEUE); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCKI_EVENT_ENQUEUE); + +- if (MPIDI_CH3I_Socki_eventq_pool != NULL) +- { +- eventq_elem = MPIDI_CH3I_Socki_eventq_pool; +- MPIDI_CH3I_Socki_eventq_pool = MPIDI_CH3I_Socki_eventq_pool->next; +- } +- else +- { +- int i; +- struct MPIDI_CH3I_Socki_eventq_table *eventq_table; +- +- eventq_table = MPL_malloc(sizeof(struct MPIDI_CH3I_Socki_eventq_table), MPL_MEM_OTHER); +- /* --BEGIN ERROR HANDLING-- */ +- if (eventq_table == NULL) +- { +- mpi_errno = MPIR_Err_create_code(errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**sock|poll|eqmalloc", 0); +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ ++ if (MPIDI_CH3I_Socki_eventq_pool != NULL) { ++ eventq_elem = MPIDI_CH3I_Socki_eventq_pool; ++ MPIDI_CH3I_Socki_eventq_pool = MPIDI_CH3I_Socki_eventq_pool->next; ++ } else { ++ int i; ++ struct MPIDI_CH3I_Socki_eventq_table *eventq_table; ++ ++ eventq_table = MPL_malloc(sizeof(struct MPIDI_CH3I_Socki_eventq_table), MPL_MEM_OTHER); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (eventq_table == NULL) { ++ mpi_errno = ++ MPIR_Err_create_code(errno, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, ++ "**sock|poll|eqmalloc", 0); ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ + + eventq_elem = eventq_table->elems; + + eventq_table->next = MPIDI_CH3I_Socki_eventq_table_head; + MPIDI_CH3I_Socki_eventq_table_head = eventq_table; + +- if (MPIDI_CH3I_SOCK_EVENTQ_POOL_SIZE > 1) +- { +- MPIDI_CH3I_Socki_eventq_pool = &eventq_elem[1]; +- for (i = 0; i < MPIDI_CH3I_SOCK_EVENTQ_POOL_SIZE - 2; i++) +- { +- MPIDI_CH3I_Socki_eventq_pool[i].next = &MPIDI_CH3I_Socki_eventq_pool[i+1]; +- } +- MPIDI_CH3I_Socki_eventq_pool[MPIDI_CH3I_SOCK_EVENTQ_POOL_SIZE - 2].next = NULL; +- } ++ if (MPIDI_CH3I_SOCK_EVENTQ_POOL_SIZE > 1) { ++ MPIDI_CH3I_Socki_eventq_pool = &eventq_elem[1]; ++ for (i = 0; i < MPIDI_CH3I_SOCK_EVENTQ_POOL_SIZE - 2; i++) { ++ MPIDI_CH3I_Socki_eventq_pool[i].next = &MPIDI_CH3I_Socki_eventq_pool[i + 1]; ++ } ++ MPIDI_CH3I_Socki_eventq_pool[MPIDI_CH3I_SOCK_EVENTQ_POOL_SIZE - 2].next = NULL; ++ } + } + + eventq_elem->event.op_type = op; +@@ -1091,70 +1028,60 @@ static int MPIDI_CH3I_Socki_event_enqueue(struct pollinfo * pollinfo, MPIDI_CH3I + eventq_elem->set_elem = pollinfo->elem; + eventq_elem->next = NULL; + +- if (sock_set->eventq_head == NULL) +- { +- sock_set->eventq_head = eventq_elem; +- } +- else +- { +- sock_set->eventq_tail->next = eventq_elem; ++ if (sock_set->eventq_head == NULL) { ++ sock_set->eventq_head = eventq_elem; ++ } else { ++ sock_set->eventq_tail->next = eventq_elem; + } + sock_set->eventq_tail = eventq_elem; +-fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCKI_EVENT_ENQUEUE); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Socki_event_enqueue() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_event_dequeue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH3I_Socki_event_dequeue(struct MPIDI_CH3I_Sock_set * sock_set, int * set_elem, struct MPIDI_CH3I_Sock_event * eventp) ++static inline int MPIDI_CH3I_Socki_event_dequeue(struct MPIDI_CH3I_Sock_set *sock_set, ++ int *set_elem, ++ struct MPIDI_CH3I_Sock_event *eventp) + { +- struct MPIDI_CH3I_Socki_eventq_elem * eventq_elem; ++ struct MPIDI_CH3I_Socki_eventq_elem *eventq_elem; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCKI_EVENT_DEQUEUE); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCKI_EVENT_DEQUEUE); + +- if (sock_set->eventq_head != NULL) +- { +- eventq_elem = sock_set->eventq_head; ++ if (sock_set->eventq_head != NULL) { ++ eventq_elem = sock_set->eventq_head; + +- sock_set->eventq_head = eventq_elem->next; +- if (eventq_elem->next == NULL) +- { +- sock_set->eventq_tail = NULL; +- } ++ sock_set->eventq_head = eventq_elem->next; ++ if (eventq_elem->next == NULL) { ++ sock_set->eventq_tail = NULL; ++ } + +- *eventp = eventq_elem->event; +- *set_elem = eventq_elem->set_elem; ++ *eventp = eventq_elem->event; ++ *set_elem = eventq_elem->set_elem; + +- eventq_elem->next = MPIDI_CH3I_Socki_eventq_pool; +- MPIDI_CH3I_Socki_eventq_pool = eventq_elem; ++ eventq_elem->next = MPIDI_CH3I_Socki_eventq_pool; ++ MPIDI_CH3I_Socki_eventq_pool = eventq_elem; + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- /* FIXME: Shouldn't this be an mpi error code? */ +- mpi_errno = MPIDI_CH3I_SOCK_ERR_FAIL; ++ else { ++ /* FIXME: Shouldn't this be an mpi error code? */ ++ mpi_errno = MPIDI_CH3I_SOCK_ERR_FAIL; + } + /* --END ERROR HANDLING-- */ + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCKI_EVENT_DEQUEUE); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Socki_event_dequeue() */ + + + /* FIXME: Who allocates eventq tables? Should there be a check that these + tables are empty first? */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_free_eventq_mem +-#undef FCNAME +-#define FCNAME "MPIDI_CH3I_Socki_free_eventq_mem" + static void MPIDI_CH3I_Socki_free_eventq_mem(void) + { + struct MPIDI_CH3I_Socki_eventq_table *eventq_table, *eventq_table_next; +@@ -1181,86 +1108,90 @@ static int sockBufSize = -1; + /* Set the socket buffer sizes on fd to the standard values (this is controlled + by the parameter MPICH_SOCK_BUFSIZE). If "firm" is true, require that the + sockets actually accept that buffer size. */ +-int MPIDI_CH3I_Sock_SetSockBufferSize( int fd, int firm ) ++int MPIDI_CH3I_Sock_SetSockBufferSize(int fd, int firm) + { + int mpi_errno = MPI_SUCCESS; + int rc; + + /* Get the socket buffer size if we haven't yet acquired it */ + if (sockBufSize < 0) { +- /* FIXME: Is this the name that we want to use (this was chosen +- to match the original, undocumented name) */ +- rc = MPL_env2int( "MPICH_SOCKET_BUFFER_SIZE", &sockBufSize ); +- if (rc <= 0) { +- sockBufSize = 0; +- } +- MPL_DBG_MSG_D(MPIDI_CH3I_DBG_SOCK_CONNECT,TYPICAL,"Sock buf size = %d",sockBufSize); ++ /* FIXME: Is this the name that we want to use (this was chosen ++ * to match the original, undocumented name) */ ++ rc = MPL_env2int("MPICH_SOCKET_BUFFER_SIZE", &sockBufSize); ++ if (rc <= 0) { ++ sockBufSize = 0; ++ } ++ MPL_DBG_MSG_D(MPIDI_CH3I_DBG_SOCK_CONNECT, TYPICAL, "Sock buf size = %d", sockBufSize); + } + + if (sockBufSize > 0) { +- int bufsz; +- socklen_t bufsz_len; +- +- bufsz = sockBufSize; +- bufsz_len = sizeof(bufsz); +- rc = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &bufsz, bufsz_len); +- if (rc == -1) { +- MPIR_ERR_SETANDJUMP3(mpi_errno,MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|setsndbufsz", +- "**sock|poll|setsndbufsz %d %d %s", +- bufsz, errno, MPIR_Strerror(errno)); +- } +- bufsz = sockBufSize; +- bufsz_len = sizeof(bufsz); +- rc = setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsz, bufsz_len); +- if (rc == -1) { +- MPIR_ERR_SETANDJUMP3(mpi_errno,MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|setrcvbufsz", +- "**sock|poll|setrcvbufsz %d %d %s", +- bufsz, errno, MPIR_Strerror(errno)); +- } +- bufsz_len = sizeof(bufsz); +- +- if (firm) { +- rc = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &bufsz, &bufsz_len); +- /* --BEGIN ERROR HANDLING-- */ +- if (rc == 0) { +- if (bufsz < sockBufSize * 0.9) { +- MPL_msg_printf("WARNING: send socket buffer size differs from requested size (requested=%d, actual=%d)\n", +- sockBufSize, bufsz); +- } +- } +- /* --END ERROR HANDLING-- */ +- +- bufsz_len = sizeof(bufsz); +- rc = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsz, &bufsz_len); +- /* --BEGIN ERROR HANDLING-- */ +- if (rc == 0) { +- if (bufsz < sockBufSize * 0.9) { +- MPL_msg_printf("WARNING: receive socket buffer size differs from requested size (requested=%d, actual=%d)\n", +- sockBufSize, bufsz); +- } +- } +- /* --END ERROR HANDLING-- */ +- } ++ int bufsz; ++ socklen_t bufsz_len; ++ ++ bufsz = sockBufSize; ++ bufsz_len = sizeof(bufsz); ++ rc = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &bufsz, bufsz_len); ++ if (rc == -1) { ++ MPIR_ERR_SETANDJUMP3(mpi_errno, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|setsndbufsz", ++ "**sock|poll|setsndbufsz %d %d %s", ++ bufsz, errno, MPIR_Strerror(errno)); ++ } ++ bufsz = sockBufSize; ++ bufsz_len = sizeof(bufsz); ++ rc = setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsz, bufsz_len); ++ if (rc == -1) { ++ MPIR_ERR_SETANDJUMP3(mpi_errno, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|setrcvbufsz", ++ "**sock|poll|setrcvbufsz %d %d %s", ++ bufsz, errno, MPIR_Strerror(errno)); ++ } ++ bufsz_len = sizeof(bufsz); ++ ++ if (firm) { ++ rc = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &bufsz, &bufsz_len); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc == 0) { ++ if (bufsz < sockBufSize * 0.9) { ++ MPL_msg_printf ++ ("WARNING: send socket buffer size differs from requested size (requested=%d, actual=%d)\n", ++ sockBufSize, bufsz); ++ } ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ bufsz_len = sizeof(bufsz); ++ rc = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsz, &bufsz_len); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc == 0) { ++ if (bufsz < sockBufSize * 0.9) { ++ MPL_msg_printf ++ ("WARNING: receive socket buffer size differs from requested size (requested=%d, actual=%d)\n", ++ sockBufSize, bufsz); ++ } ++ } ++ /* --END ERROR HANDLING-- */ ++ } + } +- fn_fail: ++ fn_fail: + return mpi_errno; + } + + /* This routine provides a string version of the address. */ +-int MPIDI_CH3I_Sock_AddrToStr( MPIDI_CH3I_Sock_ifaddr_t *ifaddr, char *str, int maxlen ) ++int MPIDI_CH3I_Sock_AddrToStr(MPIDI_CH3I_Sock_ifaddr_t * ifaddr, char *str, int maxlen) + { + int i; + unsigned char *p = ifaddr->ifaddr; +- for (i=0; ilen && maxlen > 4; i++) { +- snprintf( str, maxlen, "%.3d.", *p++ ); +- str += 4; +- maxlen -= 4; ++ for (i = 0; i < ifaddr->len && maxlen > 4; i++) { ++ snprintf(str, maxlen, "%.3d.", *p++); ++ str += 4; ++ maxlen -= 4; + } + /* Change the last period to a null; but be careful in case len was zero */ +- if (i > 0) *--str = 0; +- else *str = 0; ++ if (i > 0) ++ *--str = 0; ++ else ++ *str = 0; + return 0; + } + +@@ -1274,10 +1205,6 @@ MPL_dbg_class MPIDI_CH3I_DBG_SOCK_CONNECT; + + /* FIXME: The usual missing documentation (what are these routines for? + preconditions? who calls? post conditions? */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Sock_init(void) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_INIT); +@@ -1295,10 +1222,6 @@ int MPIDI_CH3I_Sock_init(void) + } + + /* FIXME: Who calls? When? Should this be a finalize handler instead? */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Sock_finalize(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -1310,11 +1233,9 @@ int MPIDI_CH3I_Sock_finalize(void) + + MPIDI_CH3I_Socki_initialized--; + +- if (MPIDI_CH3I_Socki_initialized == 0) +- { +- MPIDI_CH3I_Socki_free_eventq_mem(); ++ if (MPIDI_CH3I_Socki_initialized == 0) { ++ MPIDI_CH3I_Socki_free_eventq_mem(); + } +- + #ifdef USE_SOCK_VERIFY + fn_exit: + #endif +@@ -1326,13 +1247,9 @@ int MPIDI_CH3I_Sock_finalize(void) + + /*********** sock_set.i *****************/ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_create_set +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_create_set(struct MPIDI_CH3I_Sock_set ** sock_setp) ++int MPIDI_CH3I_Sock_create_set(struct MPIDI_CH3I_Sock_set **sock_setp) + { +- struct MPIDI_CH3I_Sock_set * sock_set = NULL; ++ struct MPIDI_CH3I_Sock_set *sock_set = NULL; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_CREATE_SET); + +@@ -1345,11 +1262,11 @@ int MPIDI_CH3I_Sock_create_set(struct MPIDI_CH3I_Sock_set ** sock_setp) + */ + sock_set = MPL_malloc(sizeof(struct MPIDI_CH3I_Sock_set), MPL_MEM_ADDRESS); + /* --BEGIN ERROR HANDLING-- */ +- if (sock_set == NULL) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|setalloc", 0); +- goto fn_fail; ++ if (sock_set == NULL) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|setalloc", 0); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + +@@ -1362,101 +1279,102 @@ int MPIDI_CH3I_Sock_create_set(struct MPIDI_CH3I_Sock_set ** sock_setp) + sock_set->eventq_head = NULL; + sock_set->eventq_tail = NULL; + /* FIXME: Move the thread-specific operations into thread-specific +- routines (to allow for alternative thread sync models and +- for runtime control of thread level) */ +-# ifdef MPICH_IS_THREADED ++ * routines (to allow for alternative thread sync models and ++ * for runtime control of thread level) */ ++#ifdef MPICH_IS_THREADED + { +- sock_set->pollfds_active = NULL; +- sock_set->pollfds_updated = FALSE; +- sock_set->wakeup_posted = FALSE; +- sock_set->intr_fds[0] = -1; +- sock_set->intr_fds[1] = -1; +- sock_set->intr_sock = NULL; ++ sock_set->pollfds_active = NULL; ++ sock_set->pollfds_updated = FALSE; ++ sock_set->wakeup_posted = FALSE; ++ sock_set->intr_fds[0] = -1; ++ sock_set->intr_fds[1] = -1; ++ sock_set->intr_sock = NULL; + } +-# endif ++#endif + +-# ifdef MPICH_IS_THREADED ++#ifdef MPICH_IS_THREADED + MPIR_THREAD_CHECK_BEGIN; + { +- struct MPIDI_CH3I_Sock * sock = NULL; +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; +- long flags; +- int rc; +- +- /* +- * Acquire a pipe (the interrupter) to wake up a blocking poll should +- * it become necessary. +- * +- * Make the read descriptor nonblocking. The write descriptor is left +- * as a blocking descriptor. The write has to +- * succeed or the system will lock up. Should the blocking descriptor +- * prove to be a problem, then (1) copy the above +- * code, applying it to the write descriptor, and (2) update +- * MPIDI_CH3I_Socki_wakeup() so that it loops while write returns 0, +- * performing a thread yield between iterations. +- */ +- rc = pipe(sock_set->intr_fds); +- /* --BEGIN ERROR HANDLING-- */ +- if (rc != 0) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|pipe", "**sock|poll|pipe %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- flags = fcntl(sock_set->intr_fds[0], F_GETFL, 0); +- /* --BEGIN ERROR HANDLING-- */ +- if (flags == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|pipenonblock", "**sock|poll|pipenonblock %d %s", +- errno, MPIR_Strerror(errno)); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- rc = fcntl(sock_set->intr_fds[0], F_SETFL, flags | O_NONBLOCK); +- /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|pipenonblock", "**sock|poll|pipenonblock %d %s", +- errno, MPIR_Strerror(errno)); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- /* +- * Allocate and initialize a sock structure for the interrupter pipe +- */ +- mpi_errno = MPIDI_CH3I_Socki_sock_alloc(sock_set, &sock); +- /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|sockalloc", NULL); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ +- +- sock_set->intr_sock = sock; +- +- pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); +- pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(sock); +- +- pollfd->fd = sock_set->intr_fds[0]; +- pollinfo->fd = sock_set->intr_fds[0]; +- pollinfo->user_ptr = NULL; +- pollinfo->type = MPIDI_CH3I_SOCKI_TYPE_INTERRUPTER; +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; +- pollinfo->os_errno = 0; +- +- MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd, pollinfo, POLLIN); ++ struct MPIDI_CH3I_Sock *sock = NULL; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; ++ long flags; ++ int rc; ++ ++ /* ++ * Acquire a pipe (the interrupter) to wake up a blocking poll should ++ * it become necessary. ++ * ++ * Make the read descriptor nonblocking. The write descriptor is left ++ * as a blocking descriptor. The write has to ++ * succeed or the system will lock up. Should the blocking descriptor ++ * prove to be a problem, then (1) copy the above ++ * code, applying it to the write descriptor, and (2) update ++ * MPIDI_CH3I_Socki_wakeup() so that it loops while write returns 0, ++ * performing a thread yield between iterations. ++ */ ++ rc = pipe(sock_set->intr_fds); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc != 0) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|pipe", ++ "**sock|poll|pipe %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ flags = fcntl(sock_set->intr_fds[0], F_GETFL, 0); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (flags == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|pipenonblock", ++ "**sock|poll|pipenonblock %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ rc = fcntl(sock_set->intr_fds[0], F_SETFL, flags | O_NONBLOCK); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|pipenonblock", ++ "**sock|poll|pipenonblock %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ /* ++ * Allocate and initialize a sock structure for the interrupter pipe ++ */ ++ mpi_errno = MPIDI_CH3I_Socki_sock_alloc(sock_set, &sock); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|sockalloc", NULL); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ sock_set->intr_sock = sock; ++ ++ pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); ++ pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(sock); ++ ++ pollfd->fd = sock_set->intr_fds[0]; ++ pollinfo->fd = sock_set->intr_fds[0]; ++ pollinfo->user_ptr = NULL; ++ pollinfo->type = MPIDI_CH3I_SOCKI_TYPE_INTERRUPTER; ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; ++ pollinfo->os_errno = 0; ++ ++ MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd, pollinfo, POLLIN); + } + MPIR_THREAD_CHECK_END; +-# endif ++#endif + + *sock_setp = sock_set; + +@@ -1466,40 +1384,34 @@ int MPIDI_CH3I_Sock_create_set(struct MPIDI_CH3I_Sock_set ** sock_setp) + + /* --BEGIN ERROR HANDLING-- */ + fn_fail: +- if (sock_set != NULL) +- { +-# ifdef MPICH_IS_THREADED +- MPIR_THREAD_CHECK_BEGIN; +- { +- if (sock_set->intr_fds[0] != -1) +- { +- close(sock_set->intr_fds[0]); +- } +- +- if (sock_set->intr_fds[1] != -1) +- { +- close(sock_set->intr_fds[1]); +- } +- } +- MPIR_THREAD_CHECK_END; ++ if (sock_set != NULL) { ++#ifdef MPICH_IS_THREADED ++ MPIR_THREAD_CHECK_BEGIN; ++ { ++ if (sock_set->intr_fds[0] != -1) { ++ close(sock_set->intr_fds[0]); ++ } ++ ++ if (sock_set->intr_fds[1] != -1) { ++ close(sock_set->intr_fds[1]); ++ } ++ } ++ MPIR_THREAD_CHECK_END; + # endif + +- MPL_free(sock_set); ++ MPL_free(sock_set); + } + + goto fn_exit; + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_close_open_sockets +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_close_open_sockets(struct MPIDI_CH3I_Sock_set * sock_set, void** user_ptr ){ ++int MPIDI_CH3I_Sock_close_open_sockets(struct MPIDI_CH3I_Sock_set *sock_set, void **user_ptr) ++{ + + int i; + int mpi_errno = MPI_SUCCESS; +- struct pollinfo * pollinfos = NULL; ++ struct pollinfo *pollinfos = NULL; + pollinfos = sock_set->pollinfos; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_CLOSE_OPEN_SOCKETS); + +@@ -1509,11 +1421,11 @@ int MPIDI_CH3I_Sock_close_open_sockets(struct MPIDI_CH3I_Sock_set * sock_set, vo + /* wakeup waiting socket if mullti-threades */ + *user_ptr = NULL; + for (i = 0; i < sock_set->poll_array_elems; i++) { +- if(pollinfos[i].sock != NULL && pollinfos[i].type != MPIDI_CH3I_SOCKI_TYPE_INTERRUPTER){ +- close(pollinfos[i].fd); +- MPIDI_CH3I_Socki_sock_free(pollinfos[i].sock); ++ if (pollinfos[i].sock != NULL && pollinfos[i].type != MPIDI_CH3I_SOCKI_TYPE_INTERRUPTER) { ++ close(pollinfos[i].fd); ++ MPIDI_CH3I_Socki_sock_free(pollinfos[i].sock); + *user_ptr = pollinfos[i].user_ptr; +- break; ++ break; + } + } + #ifdef USE_SOCK_VERIFY +@@ -1524,11 +1436,7 @@ int MPIDI_CH3I_Sock_close_open_sockets(struct MPIDI_CH3I_Sock_set * sock_set, vo + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_destroy_set +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_destroy_set(struct MPIDI_CH3I_Sock_set * sock_set) ++int MPIDI_CH3I_Sock_destroy_set(struct MPIDI_CH3I_Sock_set *sock_set) + { + int elem; + struct MPIDI_CH3I_Sock_event event; +@@ -1551,22 +1459,22 @@ int MPIDI_CH3I_Sock_destroy_set(struct MPIDI_CH3I_Sock_set * sock_set) + /* + * Close pipe for interrupting a blocking poll() + */ +-# ifdef MPICH_IS_THREADED ++#ifdef MPICH_IS_THREADED + MPIR_THREAD_CHECK_BEGIN; + { +- close(sock_set->intr_fds[1]); +- close(sock_set->intr_fds[0]); +- MPIDI_CH3I_Socki_sock_free(sock_set->intr_sock); +- +- sock_set->pollfds_updated = FALSE; +- sock_set->pollfds_active = NULL; +- sock_set->wakeup_posted = FALSE; +- sock_set->intr_fds[0] = -1; +- sock_set->intr_fds[1] = -1; +- sock_set->intr_sock = NULL; ++ close(sock_set->intr_fds[1]); ++ close(sock_set->intr_fds[0]); ++ MPIDI_CH3I_Socki_sock_free(sock_set->intr_sock); ++ ++ sock_set->pollfds_updated = FALSE; ++ sock_set->pollfds_active = NULL; ++ sock_set->wakeup_posted = FALSE; ++ sock_set->intr_fds[0] = -1; ++ sock_set->intr_fds[1] = -1; ++ sock_set->intr_sock = NULL; + } + MPIR_THREAD_CHECK_END; +-# endif ++#endif + + /* + * Clear the event queue to eliminate memory leaks +@@ -1607,10 +1515,6 @@ int MPIDI_CH3I_Sock_destroy_set(struct MPIDI_CH3I_Sock_set * sock_set) + + /*********** sock_post.i *****************/ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_post_connect_ifaddr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* + This routine connects to a particular address (in byte form; for ipv4, + the address is four bytes, typically the value of h_addr_list[0] in +@@ -1629,14 +1533,14 @@ int MPIDI_CH3I_Sock_destroy_set(struct MPIDI_CH3I_Sock_set * sock_set) + compatibility until it is determined that we can always use explicit addrs + needed in setting up the socket instead of character strings. + */ +-int MPIDI_CH3I_Sock_post_connect_ifaddr( struct MPIDI_CH3I_Sock_set * sock_set, +- void * user_ptr, +- MPIDI_CH3I_Sock_ifaddr_t *ifaddr, int port, +- struct MPIDI_CH3I_Sock ** sockp) ++int MPIDI_CH3I_Sock_post_connect_ifaddr(struct MPIDI_CH3I_Sock_set *sock_set, ++ void *user_ptr, ++ MPIDI_CH3I_Sock_ifaddr_t * ifaddr, int port, ++ struct MPIDI_CH3I_Sock **sockp) + { +- struct MPIDI_CH3I_Sock * sock = NULL; +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct MPIDI_CH3I_Sock *sock = NULL; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + int fd = -1; + struct sockaddr_in addr; + long flags; +@@ -1654,36 +1558,34 @@ int MPIDI_CH3I_Sock_post_connect_ifaddr( struct MPIDI_CH3I_Sock_set * sock_set, + */ + fd = socket(PF_INET, SOCK_STREAM, 0); + if (fd == -1) { +- /* FIXME: It would be better to include a special formatting +- clue for system error messages (e.g., %dSE; in the recommended +- revision for error reporting (that is, value (errno) is an int, +- but should be interpreted as an System Error string) */ +- MPIR_ERR_SETANDJUMP2(mpi_errno,MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|socket", +- "**sock|poll|socket %d %s", errno, MPIR_Strerror(errno)); ++ /* FIXME: It would be better to include a special formatting ++ * clue for system error messages (e.g., %dSE; in the recommended ++ * revision for error reporting (that is, value (errno) is an int, ++ * but should be interpreted as an System Error string) */ ++ MPIR_ERR_SETANDJUMP2(mpi_errno, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|socket", ++ "**sock|poll|socket %d %s", errno, MPIR_Strerror(errno)); + } + + flags = fcntl(fd, F_GETFL, 0); + if (flags == -1) { +- MPIR_ERR_SETANDJUMP2(mpi_errno,MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nonblock", +- "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); ++ MPIR_ERR_SETANDJUMP2(mpi_errno, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|nonblock", ++ "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); + } + rc = fcntl(fd, F_SETFL, flags | O_NONBLOCK); + if (rc == -1) { +- MPIR_ERR_SETANDJUMP2( mpi_errno, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nonblock", +- "**sock|poll|nonblock %d %s", +- errno, MPIR_Strerror(errno)); ++ MPIR_ERR_SETANDJUMP2(mpi_errno, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|nonblock", ++ "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); + } + + nodelay = 1; + rc = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay)); + if (rc != 0) { +- MPIR_ERR_SETANDJUMP2(mpi_errno,MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nodelay", +- "**sock|poll|nodelay %d %s", +- errno, MPIR_Strerror(errno)); ++ MPIR_ERR_SETANDJUMP2(mpi_errno, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|nodelay", ++ "**sock|poll|nodelay %d %s", errno, MPIR_Strerror(errno)); + } + + /* +@@ -1697,8 +1599,7 @@ int MPIDI_CH3I_Sock_post_connect_ifaddr( struct MPIDI_CH3I_Sock_set * sock_set, + */ + mpi_errno = MPIDI_CH3I_Socki_sock_alloc(sock_set, &sock); + if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_SETANDJUMP(mpi_errno,MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|sockalloc"); ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|sockalloc"); + } + + pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); +@@ -1712,67 +1613,78 @@ int MPIDI_CH3I_Sock_post_connect_ifaddr( struct MPIDI_CH3I_Sock_set * sock_set, + + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; +- memcpy(&addr.sin_addr.s_addr, ifaddr->ifaddr, +- sizeof(addr.sin_addr.s_addr)); +- addr.sin_port = htons( (unsigned short)port); ++ memcpy(&addr.sin_addr.s_addr, ifaddr->ifaddr, sizeof(addr.sin_addr.s_addr)); ++ addr.sin_port = htons((unsigned short) port); + + /* + * Set and verify the socket buffer size + */ +- mpi_errno = MPIDI_CH3I_Sock_SetSockBufferSize( fd, 1 ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } ++ mpi_errno = MPIDI_CH3I_Sock_SetSockBufferSize(fd, 1); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } + + /* + * Attempt to establish the connection + */ +- MPL_DBG_STMT(MPIDI_CH3I_DBG_SOCK_CONNECT,TYPICAL,{ +- char addrString[64]; +- MPIDI_CH3I_Sock_AddrToStr( ifaddr, addrString, sizeof(addrString) ); +- MPL_DBG_MSG_FMT(MPIDI_CH3I_DBG_SOCK_CONNECT,TYPICAL,(MPL_DBG_FDEST, +- "Connecting to %s:%d", addrString, port )); +- }) +- +- do +- { ++ MPL_DBG_STMT(MPIDI_CH3I_DBG_SOCK_CONNECT, TYPICAL, { ++ char addrString[64]; ++ MPIDI_CH3I_Sock_AddrToStr(ifaddr, addrString, sizeof(addrString)); ++ MPL_DBG_MSG_FMT(MPIDI_CH3I_DBG_SOCK_CONNECT, TYPICAL, (MPL_DBG_FDEST, ++ "Connecting to %s:%d", ++ addrString, port)); ++ } ++) ++ ++ do { + rc = connect(fd, (struct sockaddr *) &addr, sizeof(addr)); + } + while (rc == -1 && errno == EINTR); + +- if (rc == 0) +- { +- /* connection succeeded */ +- MPL_DBG_MSG_P(MPIDI_CH3I_DBG_SOCK_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_CONNECTED_RW for sock %p",sock); +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW; +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, user_ptr, MPI_SUCCESS, mpi_errno, fn_fail); ++ if (rc == 0) { ++ /* connection succeeded */ ++ MPL_DBG_MSG_P(MPIDI_CH3I_DBG_SOCK_CONNECT, TYPICAL, ++ "Setting state to SOCKI_STATE_CONNECTED_RW for sock %p", sock); ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW; ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, user_ptr, ++ MPI_SUCCESS, mpi_errno, fn_fail); + } + /* --BEGIN ERROR HANDLING-- */ +- else if (errno == EINPROGRESS) +- { +- /* connection pending */ +- MPL_DBG_MSG_P(MPIDI_CH3I_DBG_SOCK_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_CONNECTING for sock %p",sock); +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTING; +- MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd, pollinfo, POLLOUT); +- } +- else +- { +- MPL_DBG_MSG_P(MPIDI_CH3I_DBG_SOCK_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_DISCONNECTED (failure in connect) for sock %p",sock); +- pollinfo->os_errno = errno; +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; +- +- if (errno == ECONNREFUSED) +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, user_ptr, MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, +- "**sock|connrefused", "**sock|poll|connrefused %d %d %s", +- pollinfo->sock_set->id, pollinfo->sock_id, ""), mpi_errno, fn_fail); +- } +- else +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, user_ptr, MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, +- "**sock|oserror", "**sock|poll|oserror %d %d %d %s", pollinfo->sock_set->id, pollinfo->sock_id, errno, +- MPIR_Strerror(errno)), mpi_errno, fn_fail); +- } ++ else if (errno == EINPROGRESS) { ++ /* connection pending */ ++ MPL_DBG_MSG_P(MPIDI_CH3I_DBG_SOCK_CONNECT, TYPICAL, ++ "Setting state to SOCKI_STATE_CONNECTING for sock %p", sock); ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTING; ++ MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd, pollinfo, POLLOUT); ++ } else { ++ MPL_DBG_MSG_P(MPIDI_CH3I_DBG_SOCK_CONNECT, TYPICAL, ++ "Setting state to SOCKI_STATE_DISCONNECTED (failure in connect) for sock %p", ++ sock); ++ pollinfo->os_errno = errno; ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; ++ ++ if (errno == ECONNREFUSED) { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, user_ptr, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_CONN_FAILED, ++ "**sock|connrefused", ++ "**sock|poll|connrefused %d %d %s", ++ pollinfo->sock_set->id, ++ pollinfo->sock_id, ""), mpi_errno, ++ fn_fail); ++ } else { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, user_ptr, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_CONN_FAILED, ++ "**sock|oserror", ++ "**sock|poll|oserror %d %d %d %s", ++ pollinfo->sock_set->id, ++ pollinfo->sock_id, errno, ++ MPIR_Strerror(errno)), mpi_errno, ++ fn_fail); ++ } + } + /* --END ERROR HANDLING-- */ + +@@ -1784,14 +1696,12 @@ int MPIDI_CH3I_Sock_post_connect_ifaddr( struct MPIDI_CH3I_Sock_set * sock_set, + + /* --BEGIN ERROR HANDLING-- */ + fn_fail: +- if (fd != -1) +- { +- close(fd); ++ if (fd != -1) { ++ close(fd); + } + +- if (sock != NULL) +- { +- MPIDI_CH3I_Socki_sock_free(sock); ++ if (sock != NULL) { ++ MPIDI_CH3I_Socki_sock_free(sock); + } + + goto fn_exit; +@@ -1800,17 +1710,12 @@ int MPIDI_CH3I_Sock_post_connect_ifaddr( struct MPIDI_CH3I_Sock_set * sock_set, + + /* FIXME: What does this routine do? Why does it take a host description + instead of an interface name or address? */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_post_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_post_connect(struct MPIDI_CH3I_Sock_set * sock_set, void * user_ptr, +- char * host_description, int port, +- struct MPIDI_CH3I_Sock ** sockp) ++int MPIDI_CH3I_Sock_post_connect(struct MPIDI_CH3I_Sock_set *sock_set, void *user_ptr, ++ char *host_description, int port, struct MPIDI_CH3I_Sock **sockp) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3I_Sock_ifaddr_t ifaddr; +- struct hostent * hostent; ++ struct hostent *hostent; + + /* + * Convert hostname to IP address +@@ -1820,42 +1725,38 @@ int MPIDI_CH3I_Sock_post_connect(struct MPIDI_CH3I_Sock_set * sock_set, void * u + * specific interface if one is specified by the user. + */ + /* FIXME: strtok may change the contents of host_description. Shouldn't +- the host description be a const char [] and not modified by this +- routine? */ ++ * the host description be a const char [] and not modified by this ++ * routine? */ + strtok(host_description, " "); + /* FIXME: For ipv6, we should use getaddrinfo */ + hostent = gethostbyname(host_description); + /* --BEGIN ERROR HANDLING-- */ + if (hostent == NULL || hostent->h_addrtype != AF_INET) { +- /* FIXME: Set error */ +- goto fn_exit; ++ /* FIXME: Set error */ ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + /* These are correct for IPv4 */ +- memcpy( ifaddr.ifaddr, (unsigned char *)hostent->h_addr_list[0], 4 ); +- ifaddr.len = 4; ++ memcpy(ifaddr.ifaddr, (unsigned char *) hostent->h_addr_list[0], 4); ++ ifaddr.len = 4; + ifaddr.type = AF_INET; +- mpi_errno = MPIDI_CH3I_Sock_post_connect_ifaddr( sock_set, user_ptr, +- &ifaddr, port, sockp ); +- fn_exit: ++ mpi_errno = MPIDI_CH3I_Sock_post_connect_ifaddr(sock_set, user_ptr, &ifaddr, port, sockp); ++ fn_exit: + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_post_connect() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_listen +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #ifndef USHRT_MAX +-#define USHRT_MAX 65535 /* 2^16-1 */ ++#define USHRT_MAX 65535 /* 2^16-1 */ + #endif +-int MPIDI_CH3I_Sock_listen(struct MPIDI_CH3I_Sock_set * sock_set, void * user_ptr, +- int * port, struct MPIDI_CH3I_Sock ** sockp) ++int MPIDI_CH3I_Sock_listen(struct MPIDI_CH3I_Sock_set *sock_set, void *user_ptr, ++ int *port, struct MPIDI_CH3I_Sock **sockp) + { +- struct MPIDI_CH3I_Sock * sock; +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct MPIDI_CH3I_Sock *sock; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + int fd = -1; + long flags; + int optval; +@@ -1869,11 +1770,12 @@ int MPIDI_CH3I_Sock_listen(struct MPIDI_CH3I_Sock_set * sock_set, void * user_pt + + MPIDI_CH3I_SOCKI_VERIFY_INIT(mpi_errno, fn_exit); + /* --BEGIN ERROR HANDLING-- */ +- if (*port < 0 || *port > USHRT_MAX) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_PORT, +- "**sock|badport", "**sock|badport %d", *port); +- goto fn_exit; ++ if (*port < 0 || *port > USHRT_MAX) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_PORT, "**sock|badport", ++ "**sock|badport %d", *port); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +@@ -1882,46 +1784,49 @@ int MPIDI_CH3I_Sock_listen(struct MPIDI_CH3I_Sock_set * sock_set, void * user_pt + */ + fd = socket(PF_INET, SOCK_STREAM, 0); + /* --BEGIN ERROR HANDLING-- */ +- if (fd == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|socket", "**sock|poll|socket %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (fd == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|socket", ++ "**sock|poll|socket %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + + /* set SO_REUSEADDR to a prevent a fixed service port from being bound to during subsequent invocations */ +- if (*port != 0) +- { +- optval = 1; +- rc = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(int)); +- /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|reuseaddr", "**sock|poll|reuseaddr %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; +- } +- /* --END ERROR HANDLING-- */ ++ if (*port != 0) { ++ optval = 1; ++ rc = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(int)); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|reuseaddr", ++ "**sock|poll|reuseaddr %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; ++ } ++ /* --END ERROR HANDLING-- */ + } + + /* make the socket non-blocking so that accept() will return immediately if no new connection is available */ + flags = fcntl(fd, F_GETFL, 0); + /* --BEGIN ERROR HANDLING-- */ +- if (flags == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nonblock", "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (flags == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|nonblock", ++ "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + rc = fcntl(fd, F_SETFL, flags | O_NONBLOCK); + /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nonblock", "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (rc == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|nonblock", ++ "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + +@@ -1930,61 +1835,66 @@ int MPIDI_CH3I_Sock_listen(struct MPIDI_CH3I_Sock_set * sock_set, void * user_pt + * that the operating system can select an available port in the ephemeral port range. + */ + if (*port == 0) { +- int portnum; +- /* see if we actually want to find values within a range */ ++ int portnum; ++ /* see if we actually want to find values within a range */ + +- MPIR_ERR_CHKANDJUMP(MPIR_CVAR_CH3_PORT_RANGE.low < 0 || MPIR_CVAR_CH3_PORT_RANGE.low > MPIR_CVAR_CH3_PORT_RANGE.high, mpi_errno, MPI_ERR_OTHER, "**badportrange"); ++ MPIR_ERR_CHKANDJUMP(MPIR_CVAR_CH3_PORT_RANGE.low < 0 || ++ MPIR_CVAR_CH3_PORT_RANGE.low > MPIR_CVAR_CH3_PORT_RANGE.high, mpi_errno, ++ MPI_ERR_OTHER, "**badportrange"); + + /* default MPICH_PORT_RANGE is {0,0} so bind will use any available port */ +- for (portnum = MPIR_CVAR_CH3_PORT_RANGE.low; portnum <= MPIR_CVAR_CH3_PORT_RANGE.high; ++portnum) { +- memset( (void *)&addr, 0, sizeof(addr) ); +- addr.sin_family = AF_INET; +- addr.sin_addr.s_addr = htonl(INADDR_ANY); +- addr.sin_port = htons( (unsigned short)portnum ); +- +- rc = bind(fd, (struct sockaddr *) &addr, sizeof(addr)); +- if (rc < 0) { +- if (errno != EADDRINUSE && errno != EADDRNOTAVAIL) { +- close(fd); +- break; +- } +- } +- else +- break; +- } +- } +- else { +- memset(&addr, 0, sizeof(addr)); +- addr.sin_family = AF_INET; +- addr.sin_addr.s_addr = htonl(INADDR_ANY); +- addr.sin_port = htons((unsigned short) *port); +- rc = bind(fd, (struct sockaddr *) &addr, sizeof(addr)); ++ for (portnum = MPIR_CVAR_CH3_PORT_RANGE.low; portnum <= MPIR_CVAR_CH3_PORT_RANGE.high; ++ ++portnum) { ++ memset((void *) &addr, 0, sizeof(addr)); ++ addr.sin_family = AF_INET; ++ addr.sin_addr.s_addr = htonl(INADDR_ANY); ++ addr.sin_port = htons((unsigned short) portnum); ++ ++ rc = bind(fd, (struct sockaddr *) &addr, sizeof(addr)); ++ if (rc < 0) { ++ if (errno != EADDRINUSE && errno != EADDRNOTAVAIL) { ++ close(fd); ++ break; ++ } ++ } else ++ break; ++ } ++ } else { ++ memset(&addr, 0, sizeof(addr)); ++ addr.sin_family = AF_INET; ++ addr.sin_addr.s_addr = htonl(INADDR_ANY); ++ addr.sin_port = htons((unsigned short) *port); ++ rc = bind(fd, (struct sockaddr *) &addr, sizeof(addr)); + } + /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|bind", "**sock|poll|bind %d %d %s", *port, errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (rc == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|bind", ++ "**sock|poll|bind %d %d %s", *port, errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + + /* + * Set and verify the socket buffer size + */ +- mpi_errno = MPIDI_CH3I_Sock_SetSockBufferSize( fd, 1 ); +- if (mpi_errno) { MPIR_ERR_POP( mpi_errno ); } ++ mpi_errno = MPIDI_CH3I_Sock_SetSockBufferSize(fd, 1); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } + + /* + * Start listening for incoming connections... + */ + rc = listen(fd, SOMAXCONN); + /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|listen", "**sock|poll|listen %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (rc == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|listen", ++ "**sock|poll|listen %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + +@@ -1995,11 +1905,12 @@ int MPIDI_CH3I_Sock_listen(struct MPIDI_CH3I_Sock_set * sock_set, void * user_pt + addr_len = sizeof(addr); + rc = getsockname(fd, (struct sockaddr *) &addr, &addr_len); + /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|getport", "**sock|poll|getport %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (rc == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|getport", ++ "**sock|poll|getport %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + *port = (unsigned int) ntohs(addr.sin_port); +@@ -2011,11 +1922,11 @@ int MPIDI_CH3I_Sock_listen(struct MPIDI_CH3I_Sock_set * sock_set, void * user_pt + */ + mpi_errno = MPIDI_CH3I_Socki_sock_alloc(sock_set, &sock); + /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|sockalloc", NULL); +- goto fn_fail; ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|sockalloc", NULL); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + +@@ -2037,27 +1948,23 @@ int MPIDI_CH3I_Sock_listen(struct MPIDI_CH3I_Sock_set * sock_set, void * user_pt + + /* --BEGIN ERROR HANDLING-- */ + fn_fail: +- if (fd != -1) +- { +- close(fd); ++ if (fd != -1) { ++ close(fd); + } + + goto fn_exit; + /* --END ERROR HANDLING-- */ + } ++ + /* end MPIDI_CH3I_Sock_listen() */ + + + /* FIXME: What does this function do? */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_post_read +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_post_read(struct MPIDI_CH3I_Sock * sock, void * buf, size_t minlen, size_t maxlen, +- MPIDI_CH3I_Sock_progress_update_func_t fn) ++int MPIDI_CH3I_Sock_post_read(struct MPIDI_CH3I_Sock *sock, void *buf, size_t minlen, size_t maxlen, ++ MPIDI_CH3I_Sock_progress_update_func_t fn) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_POST_READ); + +@@ -2074,12 +1981,13 @@ int MPIDI_CH3I_Sock_post_read(struct MPIDI_CH3I_Sock * sock, void * buf, size_t + MPIDI_CH3I_SOCKI_VERIFY_NO_POSTED_READ(pollfd, pollinfo, mpi_errno, fn_exit); + + /* --BEGIN ERROR HANDLING-- */ +- if (minlen < 1 || minlen > maxlen) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_LEN, +- "**sock|badlen", "**sock|badlen %d %d %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id, minlen, maxlen); +- goto fn_exit; ++ if (minlen < 1 || minlen > maxlen) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_LEN, "**sock|badlen", ++ "**sock|badlen %d %d %d %d", pollinfo->sock_set->id, ++ pollinfo->sock_id, minlen, maxlen); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +@@ -2096,17 +2004,15 @@ int MPIDI_CH3I_Sock_post_read(struct MPIDI_CH3I_Sock * sock, void * buf, size_t + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_POST_READ); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_post_read() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_post_readv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_post_readv(struct MPIDI_CH3I_Sock * sock, MPL_IOV * iov, int iov_n, MPIDI_CH3I_Sock_progress_update_func_t fn) ++int MPIDI_CH3I_Sock_post_readv(struct MPIDI_CH3I_Sock *sock, MPL_IOV * iov, int iov_n, ++ MPIDI_CH3I_Sock_progress_update_func_t fn) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_POST_READV); + +@@ -2123,12 +2029,13 @@ int MPIDI_CH3I_Sock_post_readv(struct MPIDI_CH3I_Sock * sock, MPL_IOV * iov, int + MPIDI_CH3I_SOCKI_VERIFY_NO_POSTED_READ(pollfd, pollinfo, mpi_errno, fn_exit); + + /* --BEGIN ERROR HANDLING-- */ +- if (iov_n < 1 || iov_n > MPL_IOV_LIMIT) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_LEN, +- "**sock|badiovn", "**sock|badiovn %d %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id, iov_n); +- goto fn_exit; ++ if (iov_n < 1 || iov_n > MPL_IOV_LIMIT) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_LEN, "**sock|badiovn", ++ "**sock|badiovn %d %d %d", pollinfo->sock_set->id, ++ pollinfo->sock_id, iov_n); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +@@ -2145,18 +2052,15 @@ int MPIDI_CH3I_Sock_post_readv(struct MPIDI_CH3I_Sock * sock, MPL_IOV * iov, int + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_POST_READV); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_post_readv() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_post_write +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_post_write(struct MPIDI_CH3I_Sock * sock, void * buf, size_t minlen, size_t maxlen, +- MPIDI_CH3I_Sock_progress_update_func_t fn) ++int MPIDI_CH3I_Sock_post_write(struct MPIDI_CH3I_Sock *sock, void *buf, size_t minlen, ++ size_t maxlen, MPIDI_CH3I_Sock_progress_update_func_t fn) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_POST_WRITE); + +@@ -2173,12 +2077,13 @@ int MPIDI_CH3I_Sock_post_write(struct MPIDI_CH3I_Sock * sock, void * buf, size_t + MPIDI_CH3I_SOCKI_VERIFY_NO_POSTED_WRITE(pollfd, pollinfo, mpi_errno, fn_exit); + + /* --BEGIN ERROR HANDLING-- */ +- if (minlen < 1 || minlen > maxlen) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_LEN, +- "**sock|badlen", "**sock|badlen %d %d %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id, minlen, maxlen); +- goto fn_exit; ++ if (minlen < 1 || minlen > maxlen) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_LEN, "**sock|badlen", ++ "**sock|badlen %d %d %d %d", pollinfo->sock_set->id, ++ pollinfo->sock_id, minlen, maxlen); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +@@ -2195,17 +2100,15 @@ int MPIDI_CH3I_Sock_post_write(struct MPIDI_CH3I_Sock * sock, void * buf, size_t + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_POST_WRITE); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_post_write() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_post_writev +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_post_writev(struct MPIDI_CH3I_Sock * sock, MPL_IOV * iov, int iov_n, MPIDI_CH3I_Sock_progress_update_func_t fn) ++int MPIDI_CH3I_Sock_post_writev(struct MPIDI_CH3I_Sock *sock, MPL_IOV * iov, int iov_n, ++ MPIDI_CH3I_Sock_progress_update_func_t fn) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_POST_WRITEV); + +@@ -2222,12 +2125,13 @@ int MPIDI_CH3I_Sock_post_writev(struct MPIDI_CH3I_Sock * sock, MPL_IOV * iov, in + MPIDI_CH3I_SOCKI_VERIFY_NO_POSTED_WRITE(pollfd, pollinfo, mpi_errno, fn_exit); + + /* --BEGIN ERROR HANDLING-- */ +- if (iov_n < 1 || iov_n > MPL_IOV_LIMIT) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_LEN, +- "**sock|badiovn", "**sock|badiovn %d %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id, iov_n); +- goto fn_exit; ++ if (iov_n < 1 || iov_n > MPL_IOV_LIMIT) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_LEN, "**sock|badiovn", ++ "**sock|badiovn %d %d %d", pollinfo->sock_set->id, ++ pollinfo->sock_id, iov_n); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +@@ -2244,17 +2148,14 @@ int MPIDI_CH3I_Sock_post_writev(struct MPIDI_CH3I_Sock * sock, MPL_IOV * iov, in + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_POST_WRITEV); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_post_writev() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_post_close +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_post_close(struct MPIDI_CH3I_Sock * sock) ++int MPIDI_CH3I_Sock_post_close(struct MPIDI_CH3I_Sock *sock) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_POST_CLOSE); +@@ -2270,55 +2171,47 @@ int MPIDI_CH3I_Sock_post_close(struct MPIDI_CH3I_Sock * sock) + MPIDI_CH3I_SOCKI_VALIDATE_FD(pollinfo, mpi_errno, fn_exit); + + /* --BEGIN ERROR HANDLING-- */ +- if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CLOSING) +- { +- mpi_errno = MPIR_Err_create_code( +- mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, "**sock|closing_already", +- "**sock|closing_already %d %d", pollinfo->sock_set->id, pollinfo->sock_id); +- goto fn_exit; ++ if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CLOSING) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_SOCK, "**sock|closing_already", ++ "**sock|closing_already %d %d", pollinfo->sock_set->id, ++ pollinfo->sock_id); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +- if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION) +- { +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLIN | POLLOUT)) +- { +- /* --BEGIN ERROR HANDLING-- */ +- int event_mpi_errno; +- +- event_mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_SOCK_CLOSED, "**sock|close_cancel", +- "**sock|close_cancel %d %d", pollinfo->sock_set->id, pollinfo->sock_id); +- +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLIN)) +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_READ, pollinfo->read_nb, pollinfo->user_ptr, +- MPI_SUCCESS, mpi_errno, fn_exit); +- } +- +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, pollinfo->user_ptr, +- MPI_SUCCESS, mpi_errno, fn_exit); +- } +- +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN | POLLOUT); +- /* --END ERROR HANDLING-- */ +- } +- } +- else /* if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_LISTENER) */ +- { +- /* +- * The event queue may contain an accept event which means that +- * MPIDI_CH3I_Sock_accept() may be legally called after +- * MPIDI_CH3I_Sock_post_close(). However, MPIDI_CH3I_Sock_accept() must be +- * called before the close event is return by +- * MPIDI_CH3I_Sock_wait(). +- */ +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN); ++ if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION) { ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLIN | POLLOUT)) { ++ /* --BEGIN ERROR HANDLING-- */ ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLIN)) { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_READ, pollinfo->read_nb, ++ pollinfo->user_ptr, MPI_SUCCESS, mpi_errno, fn_exit); ++ } ++ ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, ++ pollinfo->write_nb, pollinfo->user_ptr, MPI_SUCCESS, ++ mpi_errno, fn_exit); ++ } ++ ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN | POLLOUT); ++ /* --END ERROR HANDLING-- */ ++ } ++ } else { /* if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_LISTENER) */ ++ ++ /* ++ * The event queue may contain an accept event which means that ++ * MPIDI_CH3I_Sock_accept() may be legally called after ++ * MPIDI_CH3I_Sock_post_close(). However, MPIDI_CH3I_Sock_accept() must be ++ * called before the close event is return by ++ * MPIDI_CH3I_Sock_wait(). ++ */ ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN); + } + +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CLOSE, 0, pollinfo->user_ptr, MPI_SUCCESS, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CLOSE, 0, pollinfo->user_ptr, ++ MPI_SUCCESS, mpi_errno, fn_exit); + pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CLOSING; + + fn_exit: +@@ -2338,17 +2231,13 @@ int MPIDI_CH3I_Sock_post_close(struct MPIDI_CH3I_Sock * sock) + + /* FIXME: What does this function do? What are its arguments? + It appears to execute a nonblocking accept call */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_accept +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_accept(struct MPIDI_CH3I_Sock * listener, +- struct MPIDI_CH3I_Sock_set * sock_set, void * user_ptr, +- struct MPIDI_CH3I_Sock ** sockp) ++int MPIDI_CH3I_Sock_accept(struct MPIDI_CH3I_Sock *listener, ++ struct MPIDI_CH3I_Sock_set *sock_set, void *user_ptr, ++ struct MPIDI_CH3I_Sock **sockp) + { +- struct MPIDI_CH3I_Sock * sock; +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct MPIDI_CH3I_Sock *sock; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + int fd = -1; + struct sockaddr_in addr; + socklen_t addr_len; +@@ -2368,23 +2257,24 @@ int MPIDI_CH3I_Sock_accept(struct MPIDI_CH3I_Sock * listener, + pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(listener); + + /* --BEGIN ERROR HANDLING-- */ +- if (pollinfo->type != MPIDI_CH3I_SOCKI_TYPE_LISTENER) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, +- "**sock|listener_bad_sock", "**sock|listener_bad_sock %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id); +- goto fn_exit; ++ if (pollinfo->type != MPIDI_CH3I_SOCKI_TYPE_LISTENER) { ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, ++ "**sock|listener_bad_sock", ++ "**sock|listener_bad_sock %d %d", pollinfo->sock_set->id, ++ pollinfo->sock_id); ++ goto fn_exit; + } + + if (pollinfo->state != MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO && +- pollinfo->state != MPIDI_CH3I_SOCKI_STATE_CLOSING) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, +- "**sock|listener_bad_state", "**sock|listener_bad_state %d %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id, pollinfo->state); +- goto fn_exit; ++ pollinfo->state != MPIDI_CH3I_SOCKI_STATE_CLOSING) { ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, ++ "**sock|listener_bad_state", ++ "**sock|listener_bad_state %d %d %d", ++ pollinfo->sock_set->id, pollinfo->sock_id, ++ pollinfo->state); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +@@ -2395,87 +2285,75 @@ int MPIDI_CH3I_Sock_accept(struct MPIDI_CH3I_Sock * listener, + */ + addr_len = sizeof(struct sockaddr_in); + /* FIXME: Either use the syscall macro or correctly wrap this in a +- test for EINTR */ ++ * test for EINTR */ + fd = accept(pollinfo->fd, (struct sockaddr *) &addr, &addr_len); + +- if (pollinfo->state != MPIDI_CH3I_SOCKI_STATE_CLOSING) +- { +- /* +- * Unless the listener sock is being closed, add it back into the +- * poll list so that new connections will be detected. +- */ +- MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd, pollinfo, POLLIN); ++ if (pollinfo->state != MPIDI_CH3I_SOCKI_STATE_CLOSING) { ++ /* ++ * Unless the listener sock is being closed, add it back into the ++ * poll list so that new connections will be detected. ++ */ ++ MPIDI_CH3I_SOCKI_POLLFD_OP_SET(pollfd, pollinfo, POLLIN); + } + + /* --BEGIN ERROR HANDLING-- */ +- if (fd == -1) +- { +- if (errno == EAGAIN || errno == EWOULDBLOCK) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NO_NEW_SOCK, +- "**sock|nosock", NULL); +- } +- else if (errno == ENOBUFS || errno == ENOMEM) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|osnomem", NULL); +- } +- else if (errno == EBADF || errno == ENOTSOCK || errno == EOPNOTSUPP) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, +- "**sock|badhandle", "**sock|poll|badhandle %d %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id, +- pollinfo->fd); +- } +- else +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NO_NEW_SOCK, +- "**sock|poll|accept", "**sock|poll|accept %d %s", +- errno, MPIR_Strerror(errno)); +- } +- +- goto fn_fail; ++ if (fd == -1) { ++ if (errno == EAGAIN || errno == EWOULDBLOCK) { ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_NO_NEW_SOCK, ++ "**sock|nosock", NULL); ++ } else if (errno == ENOBUFS || errno == ENOMEM) { ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, ++ "**sock|osnomem", NULL); ++ } else if (errno == EBADF || errno == ENOTSOCK || errno == EOPNOTSUPP) { ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, ++ "**sock|badhandle", "**sock|poll|badhandle %d %d %d", ++ pollinfo->sock_set->id, pollinfo->sock_id, ++ pollinfo->fd); ++ } else { ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_NO_NEW_SOCK, ++ "**sock|poll|accept", "**sock|poll|accept %d %s", ++ errno, MPIR_Strerror(errno)); ++ } ++ ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + + flags = fcntl(fd, F_GETFL, 0); + /* FIXME: There should be a simpler macro for reporting errno messages */ + /* --BEGIN ERROR HANDLING-- */ +- if (flags == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nonblock", "**sock|poll|nonblock %d %s", +- errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (flags == -1) { ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|nonblock", "**sock|poll|nonblock %d %s", ++ errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + rc = fcntl(fd, F_SETFL, flags | O_NONBLOCK); + /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nonblock", "**sock|poll|nonblock %d %s", +- errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (rc == -1) { ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|nonblock", "**sock|poll|nonblock %d %s", ++ errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + + nodelay = 1; + rc = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay)); + /* --BEGIN ERROR HANDLING-- */ +- if (rc != 0) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nodelay", "**sock|poll|nodelay %d %s", +- errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (rc != 0) { ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|nodelay", "**sock|poll|nodelay %d %s", ++ errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + +@@ -2483,52 +2361,51 @@ int MPIDI_CH3I_Sock_accept(struct MPIDI_CH3I_Sock * listener, + * Verify that the socket buffer size is correct + */ + /* FIXME: Who sets the socket buffer size? Why isn't the test +- made at that time? */ ++ * made at that time? */ + #if 1 +- mpi_errno = MPIDI_CH3I_Sock_SetSockBufferSize( fd, 1 ); +- if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } ++ mpi_errno = MPIDI_CH3I_Sock_SetSockBufferSize(fd, 1); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } + #else +- if (MPIDI_CH3I_Socki_socket_bufsz > 0) +- { +- int bufsz; +- socklen_t bufsz_len; +- +- bufsz_len = sizeof(bufsz); +- rc = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &bufsz, &bufsz_len); +- /* FIXME: There's normally no need to check that the socket buffer +- size was set to the requested size. This should only be part of +- some more verbose diagnostic output, not a general action */ +- /* --BEGIN ERROR HANDLING-- */ +- if (rc == 0) +- { +- if (bufsz < MPIDI_CH3I_Socki_socket_bufsz * 0.9 || +- bufsz < MPIDI_CH3I_Socki_socket_bufsz * 1.0) +- { +- MPL_msg_printf("WARNING: send socket buffer size differs from requested size (requested=%d, actual=%d)\n", +- MPIDI_CH3I_Socki_socket_bufsz, bufsz); +- } +- } +- /* --END ERROR HANDLING-- */ ++ if (MPIDI_CH3I_Socki_socket_bufsz > 0) { ++ int bufsz; ++ socklen_t bufsz_len; + + bufsz_len = sizeof(bufsz); +- rc = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsz, &bufsz_len); +- /* FIXME: There's normally no need to check that the socket buffer +- size was set to the requested size. This should only be part of +- some more verbose diagnostic output, not a general action */ +- /* FIXME: Cut and paste code is a disaster waiting to happen. +- Particularly in any non-performance critical section, +- create a separate routine instead of using cut and paste. */ +- /* --BEGIN ERROR HANDLING-- */ +- if (rc == 0) +- { +- if (bufsz < MPIDI_CH3I_Socki_socket_bufsz * 0.9 || +- bufsz < MPIDI_CH3I_Socki_socket_bufsz * 1.0) +- { +- MPL_msg_printf("WARNING: receive socket buffer size differs from requested size (requested=%d, actual=%d)\n", +- MPIDI_CH3I_Socki_socket_bufsz, bufsz); +- } +- } +- /* --END ERROR HANDLING-- */ ++ rc = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &bufsz, &bufsz_len); ++ /* FIXME: There's normally no need to check that the socket buffer ++ * size was set to the requested size. This should only be part of ++ * some more verbose diagnostic output, not a general action */ ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc == 0) { ++ if (bufsz < MPIDI_CH3I_Socki_socket_bufsz * 0.9 || ++ bufsz < MPIDI_CH3I_Socki_socket_bufsz * 1.0) { ++ MPL_msg_printf ++ ("WARNING: send socket buffer size differs from requested size (requested=%d, actual=%d)\n", ++ MPIDI_CH3I_Socki_socket_bufsz, bufsz); ++ } ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ bufsz_len = sizeof(bufsz); ++ rc = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsz, &bufsz_len); ++ /* FIXME: There's normally no need to check that the socket buffer ++ * size was set to the requested size. This should only be part of ++ * some more verbose diagnostic output, not a general action */ ++ /* FIXME: Cut and paste code is a disaster waiting to happen. ++ * Particularly in any non-performance critical section, ++ * create a separate routine instead of using cut and paste. */ ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc == 0) { ++ if (bufsz < MPIDI_CH3I_Socki_socket_bufsz * 0.9 || ++ bufsz < MPIDI_CH3I_Socki_socket_bufsz * 1.0) { ++ MPL_msg_printf ++ ("WARNING: receive socket buffer size differs from requested size (requested=%d, actual=%d)\n", ++ MPIDI_CH3I_Socki_socket_bufsz, bufsz); ++ } ++ } ++ /* --END ERROR HANDLING-- */ + } + #endif + /* +@@ -2542,11 +2419,11 @@ int MPIDI_CH3I_Sock_accept(struct MPIDI_CH3I_Sock * listener, + */ + mpi_errno = MPIDI_CH3I_Socki_sock_alloc(sock_set, &sock); + /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|sockalloc", NULL); +- goto fn_fail; ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|sockalloc", NULL); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + +@@ -2567,26 +2444,21 @@ int MPIDI_CH3I_Sock_accept(struct MPIDI_CH3I_Sock * listener, + + /* --BEGIN ERROR HANDLING-- */ + fn_fail: +- if (fd != -1) +- { +- close(fd); ++ if (fd != -1) { ++ close(fd); + } + + goto fn_exit; + /* --END ERROR HANDLING-- */ + } ++ + /* end MPIDI_CH3I_Sock_accept() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_read +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_read(MPIDI_CH3I_Sock_t sock, void * buf, size_t len, +- size_t * num_read) ++int MPIDI_CH3I_Sock_read(MPIDI_CH3I_Sock_t sock, void *buf, size_t len, size_t * num_read) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + size_t nb; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_READ); +@@ -2605,88 +2477,75 @@ int MPIDI_CH3I_Sock_read(MPIDI_CH3I_Sock_t sock, void * buf, size_t len, + MPIDI_CH3I_SOCKI_VERIFY_NO_POSTED_READ(pollfd, pollinfo, mpi_errno, fn_exit); + + /* FIXME: multiple passes should be made if +- len > SSIZE_MAX and nb == SSIZE_MAX */ ++ * len > SSIZE_MAX and nb == SSIZE_MAX */ + /* FIXME: This is a scary test/assignment. It needs an explanation +- (presumably that this routine will be called again if len is +- shortened. However, in that case, the description of the routine +- (which is also missing!!!!) needs to be very clear about this +- requirement. */ +- if (len > SSIZE_MAX) +- { +- len = SSIZE_MAX; ++ * (presumably that this routine will be called again if len is ++ * shortened. However, in that case, the description of the routine ++ * (which is also missing!!!!) needs to be very clear about this ++ * requirement. */ ++ if (len > SSIZE_MAX) { ++ len = SSIZE_MAX; + } + +- do +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_READ); +- nb = read(pollinfo->fd, buf, len); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_READ); ++ do { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_READ); ++ nb = read(pollinfo->fd, buf, len); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_READ); + } + while (nb == -1 && errno == EINTR); + +- if (nb > 0) +- { +- *num_read = (size_t) nb; ++ if (nb > 0) { ++ *num_read = (size_t) nb; + } + /* --BEGIN ERROR HANDLING-- */ +- else if (nb == 0) +- { +- *num_read = 0; +- +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, +- "**sock|connclosed", "**sock|connclosed %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id); +- +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) +- { +- /* A write is posted on this connection. Enqueue an event for +- the write indicating the connection is closed. */ +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, +- pollinfo->write_nb, pollinfo->user_ptr, +- mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- } +- +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; +- } +- else if (errno == EAGAIN || errno == EWOULDBLOCK) +- { +- *num_read = 0; +- } +- else +- { +- int disconnected; +- +- *num_read = 0; +- +- mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, +- FCNAME, __LINE__, &disconnected); +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- /* +- * A serious error occurred. There is no guarantee that the +- * data structures are still intact. Therefore, we avoid +- * modifying them. +- */ +- goto fn_exit; +- } +- +- if (disconnected) +- { +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) +- { +- /* A write is posted on this connection. Enqueue an event +- for the write indicating the connection is closed. */ +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, +- pollinfo->write_nb, pollinfo->user_ptr, +- mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- } +- +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; +- } ++ else if (nb == 0) { ++ *num_read = 0; ++ ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, ++ "**sock|connclosed", "**sock|connclosed %d %d", ++ pollinfo->sock_set->id, pollinfo->sock_id); ++ ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) { ++ /* A write is posted on this connection. Enqueue an event for ++ * the write indicating the connection is closed. */ ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, ++ pollinfo->write_nb, pollinfo->user_ptr, ++ mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ } ++ ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; ++ } else if (errno == EAGAIN || errno == EWOULDBLOCK) { ++ *num_read = 0; ++ } else { ++ int disconnected; ++ ++ *num_read = 0; ++ ++ mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, ++ __func__, __LINE__, &disconnected); ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ /* ++ * A serious error occurred. There is no guarantee that the ++ * data structures are still intact. Therefore, we avoid ++ * modifying them. ++ */ ++ goto fn_exit; ++ } ++ ++ if (disconnected) { ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) { ++ /* A write is posted on this connection. Enqueue an event ++ * for the write indicating the connection is closed. */ ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, ++ pollinfo->write_nb, pollinfo->user_ptr, ++ mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ } ++ ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; ++ } + } + /* --END ERROR HANDLING-- */ + +@@ -2694,18 +2553,14 @@ int MPIDI_CH3I_Sock_read(MPIDI_CH3I_Sock_t sock, void * buf, size_t len, + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_READ); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_read() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_readv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_readv(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, +- size_t * num_read) ++int MPIDI_CH3I_Sock_readv(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, size_t * num_read) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + ssize_t nb; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_READV); +@@ -2729,78 +2584,66 @@ int MPIDI_CH3I_Sock_readv(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, + * returned. How do we handle this? Can we place an equivalent + * limitation in the Sock interface? + */ +- do +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_READV); +- nb = MPL_large_readv(pollinfo->fd, iov, iov_n); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_READV); ++ do { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_READV); ++ nb = MPL_large_readv(pollinfo->fd, iov, iov_n); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_READV); + } + while (nb == -1 && errno == EINTR); + +- if (nb > 0) +- { +- *num_read = (size_t) nb; ++ if (nb > 0) { ++ *num_read = (size_t) nb; + } + /* --BEGIN ERROR HANDLING-- */ +- else if (nb == 0) +- { +- *num_read = 0; +- +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, +- "**sock|connclosed", "**sock|connclosed %d %d", +- pollinfo->sock_set->id, pollinfo->sock_id); +- +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) +- { +- +- /* A write is posted on this connection. Enqueue an event +- for the write indicating the connection is closed. */ +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, +- pollinfo->write_nb, pollinfo->user_ptr, +- mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- } +- +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; +- } +- else if (errno == EAGAIN || errno == EWOULDBLOCK) +- { +- *num_read = 0; +- } +- else +- { +- int disconnected; +- +- *num_read = 0; +- +- mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, FCNAME, +- __LINE__, &disconnected); +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- /* +- * A serious error occurred. There is no guarantee that the +- * data structures are still intact. Therefore, we avoid +- * modifying them. +- */ +- goto fn_exit; +- } +- +- if (disconnected) +- { +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) +- { +- /* A write is posted on this connection. Enqueue an event +- for the write indicating the connection is closed. */ +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, +- pollinfo->write_nb, pollinfo->user_ptr, +- mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- } +- +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; +- } ++ else if (nb == 0) { ++ *num_read = 0; ++ ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, ++ "**sock|connclosed", "**sock|connclosed %d %d", ++ pollinfo->sock_set->id, pollinfo->sock_id); ++ ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) { ++ ++ /* A write is posted on this connection. Enqueue an event ++ * for the write indicating the connection is closed. */ ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, ++ pollinfo->write_nb, pollinfo->user_ptr, ++ mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ } ++ ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; ++ } else if (errno == EAGAIN || errno == EWOULDBLOCK) { ++ *num_read = 0; ++ } else { ++ int disconnected; ++ ++ *num_read = 0; ++ ++ mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, __func__, ++ __LINE__, &disconnected); ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ /* ++ * A serious error occurred. There is no guarantee that the ++ * data structures are still intact. Therefore, we avoid ++ * modifying them. ++ */ ++ goto fn_exit; ++ } ++ ++ if (disconnected) { ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) { ++ /* A write is posted on this connection. Enqueue an event ++ * for the write indicating the connection is closed. */ ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, ++ pollinfo->write_nb, pollinfo->user_ptr, ++ mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ } ++ ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; ++ } + } + /* --END ERROR HANDLING-- */ + +@@ -2808,18 +2651,13 @@ int MPIDI_CH3I_Sock_readv(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_READV); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_readv() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_write +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_write(MPIDI_CH3I_Sock_t sock, void * buf, size_t len, +- size_t * num_written) ++int MPIDI_CH3I_Sock_write(MPIDI_CH3I_Sock_t sock, void *buf, size_t len, size_t * num_written) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollinfo *pollinfo; + ssize_t nb; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_WRITE); +@@ -2830,63 +2668,58 @@ int MPIDI_CH3I_Sock_write(MPIDI_CH3I_Sock_t sock, void * buf, size_t len, + MPIDI_CH3I_SOCKI_VERIFY_INIT(mpi_errno, fn_exit); + MPIDI_CH3I_SOCKI_VALIDATE_SOCK(sock, mpi_errno, fn_exit); + +- pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); + pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(sock); + ++#ifdef USE_SOCK_VERIFY /* necessary for -Wunused-but-set-variable */ ++ struct pollfd *pollfd; ++ pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); + MPIDI_CH3I_SOCKI_VERIFY_CONNECTED_WRITABLE(pollinfo, mpi_errno, fn_exit); + MPIDI_CH3I_SOCKI_VALIDATE_FD(pollinfo, mpi_errno, fn_exit); + MPIDI_CH3I_SOCKI_VERIFY_NO_POSTED_WRITE(pollfd, pollinfo, mpi_errno, fn_exit); ++#endif + + /* FIXME: multiple passes should be made if len > SSIZE_MAX and nb == SSIZE_MAX */ +- if (len > SSIZE_MAX) +- { +- len = SSIZE_MAX; ++ if (len > SSIZE_MAX) { ++ len = SSIZE_MAX; + } + +- do +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WRITE); +- nb = write(pollinfo->fd, buf, len); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WRITE); ++ do { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WRITE); ++ nb = write(pollinfo->fd, buf, len); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WRITE); + } + while (nb == -1 && errno == EINTR); + +- if (nb >= 0) +- { +- *num_written = nb; ++ if (nb >= 0) { ++ *num_written = nb; + } + /* --BEGIN ERROR HANDLING-- */ +- else if (errno == EAGAIN || errno == EWOULDBLOCK) +- { +- *num_written = 0; +- } +- else +- { +- int disconnected; +- +- *num_written = 0; +- +- mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, FCNAME, +- __LINE__, &disconnected); +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- /* +- * A serious error occurred. There is no guarantee that the data +- * structures are still intact. Therefore, we avoid +- * modifying them. +- */ +- goto fn_exit; +- } +- +- if (disconnected) +- { +- /* +- * The connection is dead but data may still be in the socket +- * buffer; thus, we change the state and let +- * MPIDI_CH3I_Sock_wait() clean things up. +- */ +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; +- } ++ else if (errno == EAGAIN || errno == EWOULDBLOCK) { ++ *num_written = 0; ++ } else { ++ int disconnected; ++ ++ *num_written = 0; ++ ++ mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, __func__, ++ __LINE__, &disconnected); ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ /* ++ * A serious error occurred. There is no guarantee that the data ++ * structures are still intact. Therefore, we avoid ++ * modifying them. ++ */ ++ goto fn_exit; ++ } ++ ++ if (disconnected) { ++ /* ++ * The connection is dead but data may still be in the socket ++ * buffer; thus, we change the state and let ++ * MPIDI_CH3I_Sock_wait() clean things up. ++ */ ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; ++ } + } + /* --END ERROR HANDLING-- */ + +@@ -2894,17 +2727,13 @@ int MPIDI_CH3I_Sock_write(MPIDI_CH3I_Sock_t sock, void * buf, size_t len, + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_WRITE); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_write() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_writev +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Sock_writev(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, size_t * num_written) + { +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct pollinfo *pollinfo; + ssize_t nb; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_WRITEV); +@@ -2915,12 +2744,15 @@ int MPIDI_CH3I_Sock_writev(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, siz + MPIDI_CH3I_SOCKI_VERIFY_INIT(mpi_errno, fn_exit); + MPIDI_CH3I_SOCKI_VALIDATE_SOCK(sock, mpi_errno, fn_exit); + +- pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); + pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(sock); + ++#ifdef USE_SOCK_VERIFY ++ struct pollfd *pollfd; ++ pollfd = MPIDI_CH3I_Socki_sock_get_pollfd(sock); + MPIDI_CH3I_SOCKI_VALIDATE_FD(pollinfo, mpi_errno, fn_exit); + MPIDI_CH3I_SOCKI_VERIFY_CONNECTED_WRITABLE(pollinfo, mpi_errno, fn_exit); + MPIDI_CH3I_SOCKI_VERIFY_NO_POSTED_WRITE(pollfd, pollinfo, mpi_errno, fn_exit); ++#endif + + /* + * FIXME: The IEEE 1003.1 standard says that if the sum of the iov_len +@@ -2928,50 +2760,43 @@ int MPIDI_CH3I_Sock_writev(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, siz + * returned. How do we handle this? Can we place an equivalent + * limitation in the Sock interface? + */ +- do +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WRITEV); +- nb = MPL_large_writev(pollinfo->fd, iov, iov_n); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WRITEV); ++ do { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WRITEV); ++ nb = MPL_large_writev(pollinfo->fd, iov, iov_n); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WRITEV); + } + while (nb == -1 && errno == EINTR); + +- if (nb >= 0) +- { +- *num_written = (size_t) nb; ++ if (nb >= 0) { ++ *num_written = (size_t) nb; + } + /* --BEGIN ERROR HANDLING-- */ +- else if (errno == EAGAIN || errno == EWOULDBLOCK) +- { +- *num_written = 0; +- } +- else +- { +- int disconnected; +- +- *num_written = 0; +- +- mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, FCNAME, +- __LINE__, &disconnected); +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- /* +- * A serious error occurred. There is no guarantee that the +- * data structures are still intact. Therefore, we avoid +- * modifying them. +- */ +- goto fn_exit; +- } +- +- if (disconnected) +- { +- /* +- * The connection is dead but data may still be in the socket +- * buffer; thus, we change the state and let +- * MPIDI_CH3I_Sock_wait() clean things up. +- */ +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; +- } ++ else if (errno == EAGAIN || errno == EWOULDBLOCK) { ++ *num_written = 0; ++ } else { ++ int disconnected; ++ ++ *num_written = 0; ++ ++ mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, __func__, ++ __LINE__, &disconnected); ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ /* ++ * A serious error occurred. There is no guarantee that the ++ * data structures are still intact. Therefore, we avoid ++ * modifying them. ++ */ ++ goto fn_exit; ++ } ++ ++ if (disconnected) { ++ /* ++ * The connection is dead but data may still be in the socket ++ * buffer; thus, we change the state and let ++ * MPIDI_CH3I_Sock_wait() clean things up. ++ */ ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; ++ } + } + /* --END ERROR HANDLING-- */ + +@@ -2979,14 +2804,11 @@ int MPIDI_CH3I_Sock_writev(MPIDI_CH3I_Sock_t sock, MPL_IOV * iov, int iov_n, siz + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_WRITEV); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_writev() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_wakeup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_wakeup(struct MPIDI_CH3I_Sock_set * sock_set) ++int MPIDI_CH3I_Sock_wakeup(struct MPIDI_CH3I_Sock_set *sock_set) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_WAKEUP); +@@ -2997,33 +2819,35 @@ int MPIDI_CH3I_Sock_wakeup(struct MPIDI_CH3I_Sock_set * sock_set) + MPIDI_CH3I_SOCKI_VALIDATE_SOCK_SET(sock_set, mpi_errno, fn_exit); + + /* FIXME: We need (1) a standardized test for including multithreaded +- code and (2) include support for user requests for a lower-level +- of thread safety. Finally, things like this should probably +- be implemented as an abstraction (e.g., wakeup_progress_threads?) +- rather than this specific code. */ ++ * code and (2) include support for user requests for a lower-level ++ * of thread safety. Finally, things like this should probably ++ * be implemented as an abstraction (e.g., wakeup_progress_threads?) ++ * rather than this specific code. */ + #ifdef MPICH_IS_THREADED + MPIR_THREAD_CHECK_BEGIN; + { +- struct pollinfo * pollinfo; ++ struct pollinfo *pollinfo; + +- pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(sock_set->intr_sock); +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WAKEUP, 0, NULL, +- mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_Socki_wakeup(sock_set); ++ pollinfo = MPIDI_CH3I_Socki_sock_get_pollinfo(sock_set->intr_sock); ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WAKEUP, 0, NULL, ++ mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_Socki_wakeup(sock_set); + } + MPIR_THREAD_CHECK_END; +-# endif ++#endif + + #ifdef MPICH_IS_THREADED +- fn_exit: ++ fn_exit: + #endif + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_WAKEUP); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Sock_wakeup() */ + + /*********** end of sock_immed.i *****************/ + ++ + /*********** sock_misc.i *****************/ + + /* This routine is called in mpid/ch3/util/sock/ch3u_connect_sock.c */ +@@ -3031,14 +2855,9 @@ int MPIDI_CH3I_Sock_wakeup(struct MPIDI_CH3I_Sock_set * sock_set) + case where there are several networks available to the calling process, + this picks one but even in the current code can pick a different + interface if a particular environment variable is set) . */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_get_host_description +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_get_host_description(int myRank, +- char * host_description, int len) ++int MPIDI_CH3I_Sock_get_host_description(int myRank, char *host_description, int len) + { +- char * env_hostname; ++ char *env_hostname; + int rc; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_GET_HOST_DESCRIPTION); +@@ -3047,82 +2866,73 @@ int MPIDI_CH3I_Sock_get_host_description(int myRank, + + MPIDI_CH3I_SOCKI_VERIFY_INIT(mpi_errno, fn_exit); + /* --BEGIN ERROR HANDLING-- */ +- if (len < 0) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_LEN, +- "**sock|badhdmax", NULL); +- goto fn_exit; ++ if (len < 0) { ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ __func__, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_LEN, ++ "**sock|badhdmax", NULL); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + + /* FIXME: Is this documented? How does it work if the process manager +- cannot give each process a different value for an environment +- name? What if a different interface is needed? */ ++ * cannot give each process a different value for an environment ++ * name? What if a different interface is needed? */ + /* Use hostname supplied in environment variable, if it exists */ + env_hostname = getenv("MPICH_INTERFACE_HOSTNAME"); + + if (!env_hostname) { +- /* See if there is a per-process name for the interfaces (e.g., +- the process manager only delievers the same values for the +- environment to each process */ +- char namebuf[1024]; +- MPL_snprintf( namebuf, sizeof(namebuf), +- "MPICH_INTERFACE_HOSTNAME_R_%d", myRank ); +- env_hostname = getenv( namebuf ); +- } +- +- if (env_hostname != NULL) +- { +- rc = MPL_strncpy(host_description, env_hostname, (size_t) len); +- /* --BEGIN ERROR HANDLING-- */ +- if (rc != 0) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_HOST, +- "**sock|badhdlen", NULL); +- } +- /* --END ERROR HANDLING-- */ +- } +- else { +- rc = gethostname(host_description, len); +- /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- if (errno == EINVAL) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_HOST, +- "**sock|badhdlen", NULL); +- } +- else if (errno == EFAULT) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_HOST, +- "**sock|badhdbuf", NULL); +- } +- else +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|oserror", "**sock|poll|oserror %d %s", errno, MPIR_Strerror(errno)); +- } +- } +- /* --END ERROR HANDLING-- */ ++ /* See if there is a per-process name for the interfaces (e.g., ++ * the process manager only delievers the same values for the ++ * environment to each process */ ++ char namebuf[1024]; ++ MPL_snprintf(namebuf, sizeof(namebuf), "MPICH_INTERFACE_HOSTNAME_R_%d", myRank); ++ env_hostname = getenv(namebuf); ++ } ++ ++ if (env_hostname != NULL) { ++ rc = MPL_strncpy(host_description, env_hostname, (size_t) len); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc != 0) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_HOST, "**sock|badhdlen", NULL); ++ } ++ /* --END ERROR HANDLING-- */ ++ } else { ++ rc = gethostname(host_description, len); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (rc == -1) { ++ if (errno == EINVAL) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_HOST, "**sock|badhdlen", NULL); ++ } else if (errno == EFAULT) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_HOST, "**sock|badhdbuf", NULL); ++ } else { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|oserror", ++ "**sock|poll|oserror %d %s", errno, MPIR_Strerror(errno)); ++ } ++ } ++ /* --END ERROR HANDLING-- */ + } + +- fn_exit: ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_GET_HOST_DESCRIPTION); + return mpi_errno; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_native_to_sock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_native_to_sock(struct MPIDI_CH3I_Sock_set * sock_set, MPIDI_CH3I_SOCK_NATIVE_FD fd, void *user_ptr, +- struct MPIDI_CH3I_Sock ** sockp) ++int MPIDI_CH3I_Sock_native_to_sock(struct MPIDI_CH3I_Sock_set *sock_set, ++ MPIDI_CH3I_SOCK_NATIVE_FD fd, void *user_ptr, ++ struct MPIDI_CH3I_Sock **sockp) + { +- struct MPIDI_CH3I_Sock * sock = NULL; +- struct pollfd * pollfd; +- struct pollinfo * pollinfo; ++ struct MPIDI_CH3I_Sock *sock = NULL; ++ struct pollfd *pollfd; ++ struct pollinfo *pollinfo; + int rc; + long flags; + int mpi_errno = MPI_SUCCESS; +@@ -3135,11 +2945,11 @@ int MPIDI_CH3I_Sock_native_to_sock(struct MPIDI_CH3I_Sock_set * sock_set, MPIDI_ + /* allocate sock and poll structures */ + mpi_errno = MPIDI_CH3I_Socki_sock_alloc(sock_set, &sock); + /* --BEGIN ERROR HANDLING-- */ +- if (mpi_errno != MPI_SUCCESS) +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|sockalloc", NULL); +- goto fn_fail; ++ if (mpi_errno != MPI_SUCCESS) { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|sockalloc", NULL); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + +@@ -3149,20 +2959,22 @@ int MPIDI_CH3I_Sock_native_to_sock(struct MPIDI_CH3I_Sock_set * sock_set, MPIDI_ + /* set file descriptor to non-blocking */ + flags = fcntl(fd, F_GETFL, 0); + /* --BEGIN ERROR HANDLING-- */ +- if (flags == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nonblock", "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (flags == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|nonblock", ++ "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + rc = fcntl(fd, F_SETFL, flags | O_NONBLOCK); + /* --BEGIN ERROR HANDLING-- */ +- if (rc == -1) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|poll|nonblock", "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); +- goto fn_fail; ++ if (rc == -1) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|nonblock", ++ "**sock|poll|nonblock %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_fail; + } + /* --END ERROR HANDLING-- */ + +@@ -3184,9 +2996,8 @@ int MPIDI_CH3I_Sock_native_to_sock(struct MPIDI_CH3I_Sock_set * sock_set, MPIDI_ + + /* --BEGIN ERROR HANDLING-- */ + fn_fail: +- if (sock != NULL) +- { +- MPIDI_CH3I_Socki_sock_free(sock); ++ if (sock != NULL) { ++ MPIDI_CH3I_Socki_sock_free(sock); + } + + goto fn_exit; +@@ -3194,11 +3005,7 @@ int MPIDI_CH3I_Sock_native_to_sock(struct MPIDI_CH3I_Sock_set * sock_set, MPIDI_ + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_set_user_ptr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_set_user_ptr(struct MPIDI_CH3I_Sock * sock, void * user_ptr) ++int MPIDI_CH3I_Sock_set_user_ptr(struct MPIDI_CH3I_Sock *sock, void *user_ptr) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_SET_USER_PTR); +@@ -3207,16 +3014,14 @@ int MPIDI_CH3I_Sock_set_user_ptr(struct MPIDI_CH3I_Sock * sock, void * user_ptr) + + MPIDI_CH3I_SOCKI_VERIFY_INIT(mpi_errno, fn_exit); + +- if (sock != MPIDI_CH3I_SOCK_INVALID_SOCK && +- sock->sock_set != MPIDI_CH3I_SOCK_INVALID_SET) +- { +- MPIDI_CH3I_Socki_sock_get_pollinfo(sock)->user_ptr = user_ptr; ++ if (sock != MPIDI_CH3I_SOCK_INVALID_SOCK && sock->sock_set != MPIDI_CH3I_SOCK_INVALID_SET) { ++ MPIDI_CH3I_Socki_sock_get_pollinfo(sock)->user_ptr = user_ptr; + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_BAD_SOCK, +- "**sock|badsock", NULL); ++ else { ++ mpi_errno = ++ MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_BAD_SOCK, "**sock|badsock", NULL); + } + /* --END ERROR HANDLING-- */ + +@@ -3228,55 +3033,38 @@ int MPIDI_CH3I_Sock_set_user_ptr(struct MPIDI_CH3I_Sock * sock, void * user_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_get_sock_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_get_sock_id(struct MPIDI_CH3I_Sock * sock) ++int MPIDI_CH3I_Sock_get_sock_id(struct MPIDI_CH3I_Sock *sock) + { + int id; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_GET_SOCK_ID); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCK_GET_SOCK_ID); + +- if (sock != MPIDI_CH3I_SOCK_INVALID_SOCK) +- { +- if (sock->sock_set != MPIDI_CH3I_SOCK_INVALID_SET) +- { +- id = MPIDI_CH3I_Socki_sock_get_pollinfo(sock)->sock_id; +- } +- else +- { +- id = -1; +- } +- } +- else +- { +- id = -1; ++ if (sock != MPIDI_CH3I_SOCK_INVALID_SOCK) { ++ if (sock->sock_set != MPIDI_CH3I_SOCK_INVALID_SET) { ++ id = MPIDI_CH3I_Socki_sock_get_pollinfo(sock)->sock_id; ++ } else { ++ id = -1; ++ } ++ } else { ++ id = -1; + } + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_GET_SOCK_ID); + return id; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_get_sock_set_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_get_sock_set_id(struct MPIDI_CH3I_Sock_set * sock_set) ++int MPIDI_CH3I_Sock_get_sock_set_id(struct MPIDI_CH3I_Sock_set *sock_set) + { + int id; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_GET_SOCK_SET_ID); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCK_GET_SOCK_SET_ID); + +- if (sock_set != MPIDI_CH3I_SOCK_INVALID_SET) +- { +- id = sock_set->id; +- } +- else +- { +- id = -1; ++ if (sock_set != MPIDI_CH3I_SOCK_INVALID_SET) { ++ id = sock_set->id; ++ } else { ++ id = -1; + } + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_GET_SOCK_SET_ID); +@@ -3292,76 +3080,72 @@ int MPIDI_CH3I_Sock_get_sock_set_id(struct MPIDI_CH3I_Sock_set * sock_set) + /* FIXME: It appears that this function was used instead of making use of the + existing MPI-2 features to extend MPI error classes and code, of to export + messages to non-MPI application */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_get_error_class_string +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* --BEGIN ERROR HANDLING-- */ + int MPIDI_CH3I_Sock_get_error_class_string(int error, char *error_string, size_t length) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_GET_ERROR_CLASS_STRING); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCK_GET_ERROR_CLASS_STRING); +- switch (MPIR_ERR_GET_CLASS(error)) +- { +- case MPIDI_CH3I_SOCK_ERR_FAIL: +- MPL_strncpy(error_string, "generic socket failure", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_INIT: +- MPL_strncpy(error_string, "socket module not initialized", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_NOMEM: +- MPL_strncpy(error_string, "not enough memory to complete the socket operation", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_BAD_SET: +- MPL_strncpy(error_string, "invalid socket set", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_BAD_SOCK: +- MPL_strncpy(error_string, "invalid socket", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_BAD_HOST: +- MPL_strncpy(error_string, "host description buffer not large enough", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_BAD_HOSTNAME: +- MPL_strncpy(error_string, "invalid host name", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_BAD_PORT: +- MPL_strncpy(error_string, "invalid port", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_BAD_BUF: +- MPL_strncpy(error_string, "invalid buffer", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_BAD_LEN: +- MPL_strncpy(error_string, "invalid length", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_SOCK_CLOSED: +- MPL_strncpy(error_string, "socket closed", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_CONN_CLOSED: +- MPL_strncpy(error_string, "socket connection closed", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_CONN_FAILED: +- MPL_strncpy(error_string, "socket connection failed", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_INPROGRESS: +- MPL_strncpy(error_string, "socket operation in progress", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_TIMEOUT: +- MPL_strncpy(error_string, "socket operation timed out", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_INTR: +- MPL_strncpy(error_string, "socket operation interrupted", length); +- break; +- case MPIDI_CH3I_SOCK_ERR_NO_NEW_SOCK: +- MPL_strncpy(error_string, "no new connection available", length); +- break; +- default: +- MPL_snprintf(error_string, length, "unknown socket error %d", error); +- break; ++ switch (MPIR_ERR_GET_CLASS(error)) { ++ case MPIDI_CH3I_SOCK_ERR_FAIL: ++ MPL_strncpy(error_string, "generic socket failure", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_INIT: ++ MPL_strncpy(error_string, "socket module not initialized", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_NOMEM: ++ MPL_strncpy(error_string, "not enough memory to complete the socket operation", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_BAD_SET: ++ MPL_strncpy(error_string, "invalid socket set", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_BAD_SOCK: ++ MPL_strncpy(error_string, "invalid socket", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_BAD_HOST: ++ MPL_strncpy(error_string, "host description buffer not large enough", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_BAD_HOSTNAME: ++ MPL_strncpy(error_string, "invalid host name", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_BAD_PORT: ++ MPL_strncpy(error_string, "invalid port", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_BAD_BUF: ++ MPL_strncpy(error_string, "invalid buffer", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_BAD_LEN: ++ MPL_strncpy(error_string, "invalid length", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_SOCK_CLOSED: ++ MPL_strncpy(error_string, "socket closed", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_CONN_CLOSED: ++ MPL_strncpy(error_string, "socket connection closed", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_CONN_FAILED: ++ MPL_strncpy(error_string, "socket connection failed", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_INPROGRESS: ++ MPL_strncpy(error_string, "socket operation in progress", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_TIMEOUT: ++ MPL_strncpy(error_string, "socket operation timed out", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_INTR: ++ MPL_strncpy(error_string, "socket operation interrupted", length); ++ break; ++ case MPIDI_CH3I_SOCK_ERR_NO_NEW_SOCK: ++ MPL_strncpy(error_string, "no new connection available", length); ++ break; ++ default: ++ MPL_snprintf(error_string, length, "unknown socket error %d", error); ++ break; + } + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCK_GET_ERROR_CLASS_STRING); + return MPI_SUCCESS; + } ++ + /* --END ERROR HANDLING-- */ + + /*********** end of sock_misc.i *****************/ +@@ -3376,16 +3160,16 @@ int MPIDI_CH3I_Sock_get_error_class_string(int error, char *error_string, size_t + #endif + + +-static int MPIDI_CH3I_Socki_handle_pollhup(struct pollfd * const pollfd, +- struct pollinfo * const pollinfo); +-static int MPIDI_CH3I_Socki_handle_pollerr(struct pollfd * const pollfd, +- struct pollinfo * const pollinfo); +-static int MPIDI_CH3I_Socki_handle_read(struct pollfd * const pollfd, +- struct pollinfo * const pollinfo); +-static int MPIDI_CH3I_Socki_handle_write(struct pollfd * const pollfd, +- struct pollinfo * const pollinfo); +-static int MPIDI_CH3I_Socki_handle_connect(struct pollfd * const pollfd, +- struct pollinfo * const pollinfo); ++static int MPIDI_CH3I_Socki_handle_pollhup(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo); ++static int MPIDI_CH3I_Socki_handle_pollerr(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo); ++static int MPIDI_CH3I_Socki_handle_read(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo); ++static int MPIDI_CH3I_Socki_handle_write(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo); ++static int MPIDI_CH3I_Socki_handle_connect(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo); + + /* + * MPIDI_CH3I_Sock_wait() +@@ -3402,12 +3186,8 @@ static int MPIDI_CH3I_Socki_handle_connect(struct pollfd * const pollfd, + * To permit progress by other threads, it will release any global lock or + * coarse-grain critical section. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_CH3I_Sock_wait(struct MPIDI_CH3I_Sock_set * sock_set, int millisecond_timeout, +- struct MPIDI_CH3I_Sock_event * eventp) ++int MPIDI_CH3I_Sock_wait(struct MPIDI_CH3I_Sock_set *sock_set, int millisecond_timeout, ++ struct MPIDI_CH3I_Sock_event *eventp) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_WAIT); +@@ -3415,341 +3195,310 @@ int MPIDI_CH3I_Sock_wait(struct MPIDI_CH3I_Sock_set * sock_set, int millisecond_ + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCK_WAIT); + +- for (;;) +- { +- int elem=0; /* Keep compiler happy */ +- int n_fds; +- int n_elems; +- int found_active_elem = FALSE; +- +- mpi_errno = MPIDI_CH3I_Socki_event_dequeue(sock_set, &elem, eventp); +- if (mpi_errno == MPI_SUCCESS) { +- struct pollinfo * pollinfo; +- int flags; +- +- if (eventp->op_type != MPIDI_CH3I_SOCK_OP_CLOSE) +- { +- break; +- } +- +- pollinfo = &sock_set->pollinfos[elem]; +- +- /* +- * Attempt to set socket back to blocking. This *should* prevent +- * any data in the socket send buffer from being +- * discarded. Instead close() will block until the buffer is +- * flushed or the connection timeouts and is considered +- * lost. Theoretically, this could cause the MPIDI_CH3I_Sock_wait() to +- * hang indefinitely; however, the calling code +- * should ensure this will not happen by going through a shutdown +- * protocol before posting a close operation. +- * +- * FIXME: If the attempt to set the socket back to blocking fails, +- * we presently ignore it. Should we return an +- * error? We need to define acceptible data loss at close time. +- * MS Windows has worse problems with this, so it +- * may not be possible to make any guarantees. +- */ +- flags = fcntl(pollinfo->fd, F_GETFL, 0); +- if (flags != -1) +- { +- fcntl(pollinfo->fd, F_SETFL, flags & ~O_NONBLOCK); +- } +- +- /* FIXME: return code? If an error occurs do we return it +- instead of the error specified in the event? */ +- close(pollinfo->fd); +- +- MPIDI_CH3I_Socki_sock_free(pollinfo->sock); +- +- break; +- } +- +- for(;;) +- { ++ for (;;) { ++ int elem = 0; /* Keep compiler happy */ ++ int n_fds; ++ int n_elems; ++ int found_active_elem = FALSE; ++ ++ mpi_errno = MPIDI_CH3I_Socki_event_dequeue(sock_set, &elem, eventp); ++ if (mpi_errno == MPI_SUCCESS) { ++ struct pollinfo *pollinfo; ++ int flags; ++ ++ if (eventp->op_type != MPIDI_CH3I_SOCK_OP_CLOSE) { ++ break; ++ } ++ ++ pollinfo = &sock_set->pollinfos[elem]; ++ ++ /* ++ * Attempt to set socket back to blocking. This *should* prevent ++ * any data in the socket send buffer from being ++ * discarded. Instead close() will block until the buffer is ++ * flushed or the connection timeouts and is considered ++ * lost. Theoretically, this could cause the MPIDI_CH3I_Sock_wait() to ++ * hang indefinitely; however, the calling code ++ * should ensure this will not happen by going through a shutdown ++ * protocol before posting a close operation. ++ * ++ * FIXME: If the attempt to set the socket back to blocking fails, ++ * we presently ignore it. Should we return an ++ * error? We need to define acceptible data loss at close time. ++ * MS Windows has worse problems with this, so it ++ * may not be possible to make any guarantees. ++ */ ++ flags = fcntl(pollinfo->fd, F_GETFL, 0); ++ if (flags != -1) { ++ fcntl(pollinfo->fd, F_SETFL, flags & ~O_NONBLOCK); ++ } ++ ++ /* FIXME: return code? If an error occurs do we return it ++ * instead of the error specified in the event? */ ++ close(pollinfo->fd); ++ ++ MPIDI_CH3I_Socki_sock_free(pollinfo->sock); ++ ++ break; ++ } ++ ++ for (;;) { + # ifndef MPICH_IS_THREADED +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POLL); +- n_fds = poll(sock_set->pollfds, sock_set->poll_array_elems, +- millisecond_timeout); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POLL); +- } ++ { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POLL); ++ n_fds = poll(sock_set->pollfds, sock_set->poll_array_elems, millisecond_timeout); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POLL); ++ } + # else /* MPICH_IS_THREADED */ +- { +- /* If we've enabled runtime checking of the thread level, +- then test for that and if we are *not* multithreaded, +- just use the same code as above. Otherwise, use +- multithreaded code (and we don't then need the +- MPIR_THREAD_CHECK_BEGIN/END macros) */ +- if (!MPIR_ThreadInfo.isThreaded) { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POLL); +- n_fds = poll(sock_set->pollfds, sock_set->poll_array_elems, +- millisecond_timeout); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POLL); +- } +- else +- { +- /* +- * First try a non-blocking poll to see if any immediate +- * progress can be made. This avoids the lock manipulation +- * overhead. +- */ +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POLL); +- n_fds = poll(sock_set->pollfds, sock_set->poll_array_elems, 0); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POLL); +- +- if (n_fds == 0 && millisecond_timeout != 0) +- { +- int pollfds_active_elems = sock_set->poll_array_elems; +- int err; +- +- /* The abstraction here is a shared (blocking) resource that +- the threads must coordinate. That means not holding +- a lock across the blocking operation but also +- ensuring that only one thread at a time attempts +- to use this resource. +- +- What isn't yet clear in this where the test is made +- to ensure that two threads don't call the poll operation, +- even in a nonblocking sense. +- */ +- sock_set->pollfds_active = sock_set->pollfds; +- +- /* Release the lock so that other threads may make +- progress while this thread waits for something to +- do */ +- MPL_DBG_MSG(MPIR_DBG_OTHER,TYPICAL,"Exit global critical section (sock_wait)"); +- /* MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); +- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); */ +- MPID_thread_mutex_state_t state; +- MPID_THREAD_CS_EXIT_ST(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, state); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POLL); +- n_fds = poll(sock_set->pollfds_active, +- pollfds_active_elems, millisecond_timeout); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POLL); +- +- /* Reaquire the lock before processing any of the +- information returned from poll */ +- MPL_DBG_MSG(MPIR_DBG_OTHER,TYPICAL,"Enter global critical section (sock_wait)"); +- /* MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); +- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); */ +- MPID_THREAD_CS_ENTER_ST(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, state); +- +- /* +- * Update pollfds array if changes were posted while we +- * were blocked in poll +- */ +- if (sock_set->pollfds_updated) { +- mpi_errno = MPIDI_Sock_update_sock_set( +- sock_set, pollfds_active_elems ); +- } +- +- sock_set->pollfds_active = NULL; +- sock_set->wakeup_posted = FALSE; +- } +- } /* else !MPIR_ThreadInfo.isThreaded */ +- } ++ { ++ /* If we've enabled runtime checking of the thread level, ++ * then test for that and if we are *not* multithreaded, ++ * just use the same code as above. Otherwise, use ++ * multithreaded code (and we don't then need the ++ * MPIR_THREAD_CHECK_BEGIN/END macros) */ ++ if (!MPIR_ThreadInfo.isThreaded) { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POLL); ++ n_fds = poll(sock_set->pollfds, sock_set->poll_array_elems, ++ millisecond_timeout); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POLL); ++ } else { ++ /* ++ * First try a non-blocking poll to see if any immediate ++ * progress can be made. This avoids the lock manipulation ++ * overhead. ++ */ ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POLL); ++ n_fds = poll(sock_set->pollfds, sock_set->poll_array_elems, 0); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POLL); ++ ++ if (n_fds == 0 && millisecond_timeout != 0) { ++ int pollfds_active_elems = sock_set->poll_array_elems; ++ ++ /* The abstraction here is a shared (blocking) resource that ++ * the threads must coordinate. That means not holding ++ * a lock across the blocking operation but also ++ * ensuring that only one thread at a time attempts ++ * to use this resource. ++ * ++ * What isn't yet clear in this where the test is made ++ * to ensure that two threads don't call the poll operation, ++ * even in a nonblocking sense. ++ */ ++ sock_set->pollfds_active = sock_set->pollfds; ++ ++ /* Release the lock so that other threads may make ++ * progress while this thread waits for something to ++ * do */ ++ MPL_DBG_MSG(MPIR_DBG_OTHER, TYPICAL, ++ "Exit global critical section (sock_wait)"); ++ /* MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ * MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); */ ++ MPID_thread_mutex_state_t state; ++ MPID_THREAD_CS_EXIT_ST(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, state); ++ ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POLL); ++ n_fds = poll(sock_set->pollfds_active, ++ pollfds_active_elems, millisecond_timeout); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POLL); ++ ++ /* Reaquire the lock before processing any of the ++ * information returned from poll */ ++ MPL_DBG_MSG(MPIR_DBG_OTHER, TYPICAL, ++ "Enter global critical section (sock_wait)"); ++ /* MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ * MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); */ ++ MPID_THREAD_CS_ENTER_ST(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, state); ++ ++ /* ++ * Update pollfds array if changes were posted while we ++ * were blocked in poll ++ */ ++ if (sock_set->pollfds_updated) { ++ mpi_errno = MPIDI_Sock_update_sock_set(sock_set, pollfds_active_elems); ++ } ++ ++ sock_set->pollfds_active = NULL; ++ sock_set->wakeup_posted = FALSE; ++ } ++ } /* else !MPIR_ThreadInfo.isThreaded */ ++ } + # endif /* MPICH_IS_THREADED */ + +- if (n_fds > 0) +- { +- break; +- } +- else if (n_fds == 0) +- { +- mpi_errno = MPIDI_CH3I_SOCK_ERR_TIMEOUT; +- goto fn_exit; +- } +- else if (errno == EINTR) +- { +- if (millisecond_timeout != MPIDI_CH3I_SOCK_INFINITE_TIME) +- { +- mpi_errno = MPIDI_CH3I_SOCK_ERR_TIMEOUT; +- goto fn_exit; +- } +- +- continue; +- } +- /* --BEGIN ERROR HANDLING-- */ +- else if (errno == ENOMEM || errno == EAGAIN) +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_NOMEM, +- "**sock|osnomem", NULL); +- goto fn_exit; +- } +- else +- { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, +- "**sock|oserror", "**sock|poll|oserror %d %s", errno, MPIR_Strerror(errno)); +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- } +- +- elem = sock_set->starting_elem; +- n_elems = sock_set->poll_array_elems; +- while (n_fds > 0 && n_elems > 0) +- { +- /* +- * Acquire pointers to the pollfd and pollinfo structures for the next element +- * +- * NOTE: These pointers could become stale, if a new sock were to be allocated during the processing of the element. +- * At present, none of the handler routines allocate a sock, so the issue does not arise. +- */ +- struct pollfd * const pollfd = &sock_set->pollfds[elem]; +- struct pollinfo * const pollinfo = &sock_set->pollinfos[elem]; +- +- MPIR_Assert((pollfd->events & (POLLIN | POLLOUT)) || pollfd->fd == -1); +- MPIR_Assert(pollfd->fd >= 0 || pollfd->fd == -1); +- +- if (pollfd->fd < 0 || pollfd->revents == 0) +- { +- /* This optimization assumes that most FDs will not have a pending event. */ +- n_elems -= 1; +- elem = (elem + 1 < sock_set->poll_array_elems) ? elem + 1 : 0; +- continue; +- } +- +- if (found_active_elem == FALSE) +- { +- found_active_elem = TRUE; +- sock_set->starting_elem = (elem + 1 < sock_set->poll_array_elems) ? elem + 1 : 0; +- } +- +- if (pollfd->revents & POLLNVAL) +- { +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|badhandle", +- "**sock|poll|badhandle %d %d %d %d", pollinfo->sock_set->id, pollinfo->sock_id, pollfd->fd, pollinfo->fd); +- goto fn_exit; +- } +- +- /* --BEGIN ERROR HANDLING-- */ +- if (pollfd->revents & POLLHUP) +- { +- mpi_errno = MPIDI_CH3I_Socki_handle_pollhup(pollfd, pollinfo); +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- goto fn_exit; +- } +- } +- +- /* According to Stevens, some errors are reported as normal data +- (POLLIN) and some are reported with POLLERR. */ +- if (pollfd->revents & POLLERR) +- { +- mpi_errno = MPIDI_CH3I_Socki_handle_pollerr(pollfd, pollinfo); +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- goto fn_exit; +- } +- } +- /* --END ERROR HANDLING-- */ +- +- if (pollfd->revents & POLLIN) +- { +- if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION) +- { +- if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW || +- pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO) +- { +- mpi_errno = MPIDI_CH3I_Socki_handle_read(pollfd, pollinfo); +- /* --BEGIN ERROR HANDLING-- */ +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- } +- /* --BEGIN ERROR HANDLING-- */ +- else +- { +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledstate", +- "**sock|poll|unhandledstate %d", pollinfo->state); +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- +- } +- else if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_LISTENER) +- { +- pollfd->events &= ~POLLIN; +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_ACCEPT, 0, pollinfo->user_ptr, +- MPI_SUCCESS, mpi_errno, fn_exit); +- } +- else if ((MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE) && pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_INTERRUPTER) +- { +- char c[16]; +- ssize_t nb; +- +- do +- { +- nb = read(pollfd->fd, c, 16); +- } +- while (nb > 0 || (nb < 0 && errno == EINTR)); +- } +- /* --BEGIN ERROR HANDLING-- */ +- else +- { +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledtype", +- "**sock|poll|unhandledtype %d", pollinfo->type); +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- } +- +- if (pollfd->revents & POLLOUT) +- { +- if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION) +- { +- if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW) +- { +- mpi_errno = MPIDI_CH3I_Socki_handle_write(pollfd, pollinfo); +- /* --BEGIN ERROR HANDLING-- */ +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- } +- else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING) +- { +- mpi_errno = MPIDI_CH3I_Socki_handle_connect(pollfd, pollinfo); +- /* --BEGIN ERROR HANDLING-- */ +- if (MPIR_Err_is_fatal(mpi_errno)) +- { +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- } +- /* --BEGIN ERROR HANDLING-- */ +- else +- { +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledstate", +- "**sock|poll|unhandledstate %d", pollinfo->state); +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- } +- /* --BEGIN ERROR HANDLING-- */ +- else +- { +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledtype", +- "**sock|poll|unhandledtype %d", pollinfo->type); +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- } +- +- n_fds -= 1; +- n_elems -= 1; +- elem = (elem + 1 < sock_set->poll_array_elems) ? elem + 1 : 0; +- } ++ if (n_fds > 0) { ++ break; ++ } else if (n_fds == 0) { ++ mpi_errno = MPIDI_CH3I_SOCK_ERR_TIMEOUT; ++ goto fn_exit; ++ } else if (errno == EINTR) { ++ if (millisecond_timeout != MPIDI_CH3I_SOCK_INFINITE_TIME) { ++ mpi_errno = MPIDI_CH3I_SOCK_ERR_TIMEOUT; ++ goto fn_exit; ++ } ++ ++ continue; ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else if (errno == ENOMEM || errno == EAGAIN) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_NOMEM, "**sock|osnomem", NULL); ++ goto fn_exit; ++ } else { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|oserror", ++ "**sock|poll|oserror %d %s", errno, MPIR_Strerror(errno)); ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ ++ elem = sock_set->starting_elem; ++ n_elems = sock_set->poll_array_elems; ++ while (n_fds > 0 && n_elems > 0) { ++ /* ++ * Acquire pointers to the pollfd and pollinfo structures for the next element ++ * ++ * NOTE: These pointers could become stale, if a new sock were to be allocated during the processing of the element. ++ * At present, none of the handler routines allocate a sock, so the issue does not arise. ++ */ ++ struct pollfd *const pollfd = &sock_set->pollfds[elem]; ++ struct pollinfo *const pollinfo = &sock_set->pollinfos[elem]; ++ ++ MPIR_Assert((pollfd->events & (POLLIN | POLLOUT)) || pollfd->fd == -1); ++ MPIR_Assert(pollfd->fd >= 0 || pollfd->fd == -1); ++ ++ if (pollfd->fd < 0 || pollfd->revents == 0) { ++ /* This optimization assumes that most FDs will not have a pending event. */ ++ n_elems -= 1; ++ elem = (elem + 1 < sock_set->poll_array_elems) ? elem + 1 : 0; ++ continue; ++ } ++ ++ if (found_active_elem == FALSE) { ++ found_active_elem = TRUE; ++ sock_set->starting_elem = (elem + 1 < sock_set->poll_array_elems) ? elem + 1 : 0; ++ } ++ ++ if (pollfd->revents & POLLNVAL) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|badhandle", ++ "**sock|poll|badhandle %d %d %d %d", ++ pollinfo->sock_set->id, pollinfo->sock_id, pollfd->fd, ++ pollinfo->fd); ++ goto fn_exit; ++ } ++ ++ /* --BEGIN ERROR HANDLING-- */ ++ if (pollfd->revents & POLLHUP) { ++ mpi_errno = MPIDI_CH3I_Socki_handle_pollhup(pollfd, pollinfo); ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ goto fn_exit; ++ } ++ } ++ ++ /* According to Stevens, some errors are reported as normal data ++ * (POLLIN) and some are reported with POLLERR. */ ++ if (pollfd->revents & POLLERR) { ++ mpi_errno = MPIDI_CH3I_Socki_handle_pollerr(pollfd, pollinfo); ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ goto fn_exit; ++ } ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ if (pollfd->revents & POLLIN) { ++ if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION) { ++ if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW || ++ pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO) { ++ mpi_errno = MPIDI_CH3I_Socki_handle_read(pollfd, pollinfo); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|unhandledstate", ++ "**sock|poll|unhandledstate %d", pollinfo->state); ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ } else if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_LISTENER) { ++ pollfd->events &= ~POLLIN; ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_ACCEPT, 0, ++ pollinfo->user_ptr, MPI_SUCCESS, mpi_errno, ++ fn_exit); ++ } else if ((MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE) && ++ pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_INTERRUPTER) { ++ char c[16]; ++ ssize_t nb; ++ ++ do { ++ nb = read(pollfd->fd, c, 16); ++ } ++ while (nb > 0 || (nb < 0 && errno == EINTR)); ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledtype", ++ "**sock|poll|unhandledtype %d", pollinfo->type); ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ ++ if (pollfd->revents & POLLOUT) { ++ if (pollinfo->type == MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION) { ++ if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW) { ++ mpi_errno = MPIDI_CH3I_Socki_handle_write(pollfd, pollinfo); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ } else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING) { ++ mpi_errno = MPIDI_CH3I_Socki_handle_connect(pollfd, pollinfo); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (MPIR_Err_is_fatal(mpi_errno)) { ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, ++ "**sock|poll|unhandledstate", ++ "**sock|poll|unhandledstate %d", pollinfo->state); ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ /* --BEGIN ERROR HANDLING-- */ ++ else { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledtype", ++ "**sock|poll|unhandledtype %d", pollinfo->type); ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ } ++ ++ n_fds -= 1; ++ n_elems -= 1; ++ elem = (elem + 1 < sock_set->poll_array_elems) ? elem + 1 : 0; ++ } + } + + fn_exit: +@@ -3757,72 +3506,65 @@ int MPIDI_CH3I_Sock_wait(struct MPIDI_CH3I_Sock_set * sock_set, int millisecond_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_handle_pollhup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_handle_pollhup(struct pollfd * const pollfd, struct pollinfo * const pollinfo) ++static int MPIDI_CH3I_Socki_handle_pollhup(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_POLLHUP); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_POLLHUP); + +- if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW) +- { +- /* +- * If a write was posted then cancel it and generate an connection closed event. If a read is posted, it will be handled +- * by the POLLIN handler. +- */ +- /* --BEGIN ERROR HANDLING-- */ +- if (pollfd->events & POLLOUT) +- { +- int event_mpi_errno; +- +- event_mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, +- "**sock|connclosed", "**sock|connclosed %d %d", pollinfo->sock_set->id, pollinfo->sock_id); +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, pollinfo->user_ptr, +- event_mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; +- } +- /* --END ERROR HANDLING-- */ +- } +- else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO) +- { +- /* +- * If we are in the read-only state, then we should only get an error if we are looking to read data. If we are not +- * reading data, then pollfd->fd should be set to -1 and we should not be getting a POLLHUP event. +- * +- * There may still be data in the socket buffer, so we will let the POLLIN handler deal with the error. Once all of the +- * data has been read, the POLLIN handler will change the connection state and remove the connection from the active poll +- * list. +- */ +- MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO && (pollfd->events & POLLIN) && (pollfd->revents & POLLIN)); +- } +- else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_DISCONNECTED) +- { +- /* +- * We should never reach this state because pollfd->fd should be set to -1 if we are in the disconnected state. +- */ +- MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_DISCONNECTED && pollfd->fd == -1); +- } +- else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING) +- { +- /* +- * The process we were connecting to died. Let the POLLOUT handler deal with the error. +- */ +- MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING && (pollfd->events & POLLOUT)); +- pollfd->revents = POLLOUT; ++ if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW) { ++ /* ++ * If a write was posted then cancel it and generate an connection closed event. If a read is posted, it will be handled ++ * by the POLLIN handler. ++ */ ++ /* --BEGIN ERROR HANDLING-- */ ++ if (pollfd->events & POLLOUT) { ++ int event_mpi_errno; ++ ++ event_mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, "**sock|connclosed", ++ "**sock|connclosed %d %d", pollinfo->sock_set->id, ++ pollinfo->sock_id); ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, ++ pollinfo->user_ptr, event_mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; ++ } ++ /* --END ERROR HANDLING-- */ ++ } else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO) { ++ /* ++ * If we are in the read-only state, then we should only get an error if we are looking to read data. If we are not ++ * reading data, then pollfd->fd should be set to -1 and we should not be getting a POLLHUP event. ++ * ++ * There may still be data in the socket buffer, so we will let the POLLIN handler deal with the error. Once all of the ++ * data has been read, the POLLIN handler will change the connection state and remove the connection from the active poll ++ * list. ++ */ ++ MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO && ++ (pollfd->events & POLLIN) && (pollfd->revents & POLLIN)); ++ } else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_DISCONNECTED) { ++ /* ++ * We should never reach this state because pollfd->fd should be set to -1 if we are in the disconnected state. ++ */ ++ MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_DISCONNECTED && pollfd->fd == -1); ++ } else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING) { ++ /* ++ * The process we were connecting to died. Let the POLLOUT handler deal with the error. ++ */ ++ MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING && ++ (pollfd->events & POLLOUT)); ++ pollfd->revents = POLLOUT; + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledstate", +- "**sock|poll|unhandledstate %d", pollinfo->state); +- goto fn_exit; ++ else { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledstate", ++ "**sock|poll|unhandledstate %d", pollinfo->state); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +@@ -3830,14 +3572,12 @@ static int MPIDI_CH3I_Socki_handle_pollhup(struct pollfd * const pollfd, struct + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_POLLHUP); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Socki_handle_pollhup() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_handle_pollerr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_handle_pollerr(struct pollfd * const pollfd, struct pollinfo * const pollinfo) ++static int MPIDI_CH3I_Socki_handle_pollerr(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_POLLERR); +@@ -3845,80 +3585,75 @@ static int MPIDI_CH3I_Socki_handle_pollerr(struct pollfd * const pollfd, struct + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_POLLERR); + + /* --BEGIN ERROR HANDLING-- */ +- if (pollinfo->type != MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION) +- { +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledtype", +- "**sock|poll|unhandledtype %d", pollinfo->type); +- goto fn_exit; ++ if (pollinfo->type != MPIDI_CH3I_SOCKI_TYPE_COMMUNICATION) { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledtype", ++ "**sock|poll|unhandledtype %d", pollinfo->type); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +- if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW) +- { +- /* +- * Stevens suggests that some older version of UNIX did not properly reset so_error, which could allow POLLERR to be +- * continuously triggered. We remove the socket from the poll list (pollfd->fd = 1) in order to prevent this issue. +- * Here, we simple check that things are as we expect them to be. +- */ +- MPIR_Assert((pollfd->events & (POLLIN | POLLOUT)) || pollfd->fd == -1); +- +- /* If a write was posted then cancel it and generate an write completion event */ +- if (pollfd->events & POLLOUT) +- { +- int disconnected; +- int os_errno; +- int event_mpi_errno; +- +- MPIDI_CH3I_SOCKI_GET_SOCKET_ERROR(pollinfo, os_errno, mpi_errno, fn_exit); +- +- event_mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, os_errno, FCNAME, __LINE__, &disconnected); +- /* --BEGIN ERROR HANDLING-- */ +- if (MPIR_Err_is_fatal(event_mpi_errno)) +- { +- mpi_errno = event_mpi_errno; +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, pollinfo->user_ptr, +- event_mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; +- } +- } +- else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO) +- { +- /* +- * If we are in the read-only state, then we should only get an error if we are looking to read data. If we are not +- * reading data, then pollfd->fd should be set to -1 and we should not be getting a POLLERR event. +- * +- * There may still be data in the socket buffer, so we will let the POLLIN handler deal with the error. Once all of the +- * data has been read, the POLLIN handler will change the connection state and remove the connection from the active poll +- * list. +- */ +- MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO && (pollfd->events & POLLIN) && (pollfd->revents & POLLIN)); +- } +- else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING) +- { +- /* +- * The process we were connecting to died. Let the POLLOUT handler deal with the error. +- */ +- MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING && (pollfd->events & POLLOUT)); +- pollfd->revents = POLLOUT; +- } +- else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_DISCONNECTED) +- { +- /* We are already disconnected! Why are we handling an error? */ +- MPIR_Assert(pollfd->fd == -1); ++ if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW) { ++ /* ++ * Stevens suggests that some older version of UNIX did not properly reset so_error, which could allow POLLERR to be ++ * continuously triggered. We remove the socket from the poll list (pollfd->fd = 1) in order to prevent this issue. ++ * Here, we simple check that things are as we expect them to be. ++ */ ++ MPIR_Assert((pollfd->events & (POLLIN | POLLOUT)) || pollfd->fd == -1); ++ ++ /* If a write was posted then cancel it and generate an write completion event */ ++ if (pollfd->events & POLLOUT) { ++ int disconnected; ++ int os_errno; ++ int event_mpi_errno; ++ ++ MPIDI_CH3I_SOCKI_GET_SOCKET_ERROR(pollinfo, os_errno, mpi_errno, fn_exit); ++ ++ event_mpi_errno = ++ MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, os_errno, __func__, __LINE__, ++ &disconnected); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (MPIR_Err_is_fatal(event_mpi_errno)) { ++ mpi_errno = event_mpi_errno; ++ goto fn_exit; ++ } ++ /* --END ERROR HANDLING-- */ ++ ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, ++ pollinfo->user_ptr, event_mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; ++ } ++ } else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO) { ++ /* ++ * If we are in the read-only state, then we should only get an error if we are looking to read data. If we are not ++ * reading data, then pollfd->fd should be set to -1 and we should not be getting a POLLERR event. ++ * ++ * There may still be data in the socket buffer, so we will let the POLLIN handler deal with the error. Once all of the ++ * data has been read, the POLLIN handler will change the connection state and remove the connection from the active poll ++ * list. ++ */ ++ MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO && ++ (pollfd->events & POLLIN) && (pollfd->revents & POLLIN)); ++ } else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING) { ++ /* ++ * The process we were connecting to died. Let the POLLOUT handler deal with the error. ++ */ ++ MPIR_Assert(pollinfo->state == MPIDI_CH3I_SOCKI_STATE_CONNECTING && ++ (pollfd->events & POLLOUT)); ++ pollfd->revents = POLLOUT; ++ } else if (pollinfo->state == MPIDI_CH3I_SOCKI_STATE_DISCONNECTED) { ++ /* We are already disconnected! Why are we handling an error? */ ++ MPIR_Assert(pollfd->fd == -1); + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledstate", +- "**sock|poll|unhandledstate %d", pollinfo->state); +- goto fn_exit; ++ else { ++ mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_FAIL, "**sock|poll|unhandledstate", ++ "**sock|poll|unhandledstate %d", pollinfo->state); ++ goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +@@ -3926,14 +3661,12 @@ static int MPIDI_CH3I_Socki_handle_pollerr(struct pollfd * const pollfd, struct + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_POLLERR); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Socki_handle_pollerr() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_handle_read +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_handle_read(struct pollfd * const pollfd, struct pollinfo * const pollinfo) ++static int MPIDI_CH3I_Socki_handle_read(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo) + { + ssize_t nb; + int mpi_errno = MPI_SUCCESS; +@@ -3943,101 +3676,93 @@ static int MPIDI_CH3I_Socki_handle_read(struct pollfd * const pollfd, struct pol + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_READ); + +- do +- { +- if (pollinfo->read_iov_flag) +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_READV); +- nb = MPL_large_readv(pollinfo->fd, pollinfo->read.iov.ptr + pollinfo->read.iov.offset, +- pollinfo->read.iov.count - pollinfo->read.iov.offset); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_READV); +- } +- else +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_READ); +- nb = read(pollinfo->fd, pollinfo->read.buf.ptr + pollinfo->read_nb, +- pollinfo->read.buf.max - pollinfo->read_nb); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_READ); +- } ++ do { ++ if (pollinfo->read_iov_flag) { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_READV); ++ nb = MPL_large_readv(pollinfo->fd, pollinfo->read.iov.ptr + pollinfo->read.iov.offset, ++ pollinfo->read.iov.count - pollinfo->read.iov.offset); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_READV); ++ } else { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_READ); ++ nb = read(pollinfo->fd, pollinfo->read.buf.ptr + pollinfo->read_nb, ++ pollinfo->read.buf.max - pollinfo->read_nb); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_READ); ++ } + } + while (nb < 0 && errno == EINTR); + +- if (nb > 0) +- { +- int done; ++ if (nb > 0) { ++ int done; + +- pollinfo->read_nb += nb; ++ pollinfo->read_nb += nb; + +- done = pollinfo->read_iov_flag ? +- MPIDI_CH3I_Socki_adjust_iov(nb, pollinfo->read.iov.ptr, pollinfo->read.iov.count, &pollinfo->read.iov.offset) : +- (pollinfo->read_nb >= pollinfo->read.buf.min); ++ done = pollinfo->read_iov_flag ? ++ MPIDI_CH3I_Socki_adjust_iov(nb, pollinfo->read.iov.ptr, pollinfo->read.iov.count, ++ &pollinfo->read.iov.offset) : (pollinfo->read_nb >= ++ pollinfo->read.buf.min); + +- if (done) +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_READ, pollinfo->read_nb, pollinfo->user_ptr, +- MPI_SUCCESS, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN); +- } ++ if (done) { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_READ, pollinfo->read_nb, ++ pollinfo->user_ptr, MPI_SUCCESS, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN); ++ } + } + /* --BEGIN ERROR HANDLING-- */ +- else if (nb == 0) +- { +- int event_mpi_errno; +- +- event_mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, "**sock|connclosed", +- "**sock|connclosed %d %d", pollinfo->sock_set->id, pollinfo->sock_id); +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, pollinfo->user_ptr, +- event_mpi_errno, mpi_errno, fn_exit); +- } +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_READ, pollinfo->read_nb, pollinfo->user_ptr, +- event_mpi_errno, mpi_errno, fn_exit); +- +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN | POLLOUT); +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; ++ else if (nb == 0) { ++ int event_mpi_errno; ++ ++ event_mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_CONN_CLOSED, "**sock|connclosed", ++ "**sock|connclosed %d %d", pollinfo->sock_set->id, ++ pollinfo->sock_id); ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, ++ pollinfo->user_ptr, event_mpi_errno, mpi_errno, fn_exit); ++ } ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_READ, pollinfo->read_nb, ++ pollinfo->user_ptr, event_mpi_errno, mpi_errno, fn_exit); ++ ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN | POLLOUT); ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; + + } + /* --END ERROR HANDLING-- */ +- else if (errno == EAGAIN && errno == EWOULDBLOCK) +- { +- /* do nothing... */ +- goto fn_exit; ++ else if (errno == EAGAIN && errno == EWOULDBLOCK) { ++ /* do nothing... */ ++ goto fn_exit; + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- int disconnected; +- int event_mpi_errno; +- +- event_mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, FCNAME, __LINE__, &disconnected); +- if (MPIR_Err_is_fatal(event_mpi_errno)) +- { +- /* +- * A serious error occurred. There is no guarantee that the data +- * structures are still intact. Therefore, we avoid +- * modifying them. +- */ +- mpi_errno = event_mpi_errno; +- goto fn_exit; +- } +- +- if (disconnected) +- { +- if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, pollinfo->user_ptr, +- event_mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- } +- +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; +- } +- +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_READ, pollinfo->read_nb, pollinfo->user_ptr, +- event_mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN); ++ else { ++ int disconnected; ++ int event_mpi_errno; ++ ++ event_mpi_errno = ++ MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, __func__, __LINE__, &disconnected); ++ if (MPIR_Err_is_fatal(event_mpi_errno)) { ++ /* ++ * A serious error occurred. There is no guarantee that the data ++ * structures are still intact. Therefore, we avoid ++ * modifying them. ++ */ ++ mpi_errno = event_mpi_errno; ++ goto fn_exit; ++ } ++ ++ if (disconnected) { ++ if (MPIDI_CH3I_SOCKI_POLLFD_OP_ISSET(pollfd, pollinfo, POLLOUT)) { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, ++ pollinfo->write_nb, pollinfo->user_ptr, ++ event_mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ } ++ ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; ++ } ++ ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_READ, pollinfo->read_nb, ++ pollinfo->user_ptr, event_mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLIN); + } + /* --END ERROR HANDLING-- */ + +@@ -4045,14 +3770,12 @@ static int MPIDI_CH3I_Socki_handle_read(struct pollfd * const pollfd, struct pol + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_READ); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Socki_handle_read() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_handle_write +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_handle_write(struct pollfd * const pollfd, struct pollinfo * const pollinfo) ++static int MPIDI_CH3I_Socki_handle_write(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo) + { + ssize_t nb; + int mpi_errno = MPI_SUCCESS; +@@ -4062,75 +3785,67 @@ static int MPIDI_CH3I_Socki_handle_write(struct pollfd * const pollfd, struct po + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_WRITE); + +- do +- { +- if (pollinfo->write_iov_flag) +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WRITEV); +- nb = MPL_large_writev(pollinfo->fd, pollinfo->write.iov.ptr + pollinfo->write.iov.offset, +- pollinfo->write.iov.count - pollinfo->write.iov.offset); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WRITEV); +- } +- else +- { +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WRITE); +- nb = write(pollinfo->fd, pollinfo->write.buf.ptr + pollinfo->write_nb, +- pollinfo->write.buf.max - pollinfo->write_nb); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WRITE); +- } ++ do { ++ if (pollinfo->write_iov_flag) { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WRITEV); ++ nb = MPL_large_writev(pollinfo->fd, ++ pollinfo->write.iov.ptr + pollinfo->write.iov.offset, ++ pollinfo->write.iov.count - pollinfo->write.iov.offset); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WRITEV); ++ } else { ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WRITE); ++ nb = write(pollinfo->fd, pollinfo->write.buf.ptr + pollinfo->write_nb, ++ pollinfo->write.buf.max - pollinfo->write_nb); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WRITE); ++ } + } + while (nb < 0 && errno == EINTR); + +- if (nb >= 0) +- { +- int done; ++ if (nb >= 0) { ++ int done; + +- pollinfo->write_nb += nb; ++ pollinfo->write_nb += nb; + +- done = pollinfo->write_iov_flag ? +- MPIDI_CH3I_Socki_adjust_iov(nb, pollinfo->write.iov.ptr, pollinfo->write.iov.count, &pollinfo->write.iov.offset) : +- (pollinfo->write_nb >= pollinfo->write.buf.min); ++ done = pollinfo->write_iov_flag ? ++ MPIDI_CH3I_Socki_adjust_iov(nb, pollinfo->write.iov.ptr, pollinfo->write.iov.count, ++ &pollinfo->write.iov.offset) : (pollinfo->write_nb >= ++ pollinfo->write.buf.min); + +- if (done) +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, pollinfo->user_ptr, +- MPI_SUCCESS, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- } +- } +- else if (errno == EAGAIN || errno == EWOULDBLOCK) +- { +- /* do nothing... */ +- goto fn_exit; ++ if (done) { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, ++ pollinfo->user_ptr, MPI_SUCCESS, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ } ++ } else if (errno == EAGAIN || errno == EWOULDBLOCK) { ++ /* do nothing... */ ++ goto fn_exit; + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- int disconnected; +- int event_mpi_errno; +- +- event_mpi_errno = MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, FCNAME, __LINE__, &disconnected); +- if (MPIR_Err_is_fatal(event_mpi_errno)) +- { +- /* +- * A serious error occurred. There is no guarantee that the data structures are still intact. Therefore, we avoid +- * modifying them. +- */ +- mpi_errno = event_mpi_errno; +- goto fn_exit; +- } +- +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, pollinfo->user_ptr, +- event_mpi_errno, mpi_errno, fn_exit); +- MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); +- if (disconnected) +- { +- /* +- * The connection is dead but data may still be in the socket buffer; thus, we change the state and let +- * MPIDI_CH3I_Sock_wait() clean things up. +- */ +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; +- } ++ else { ++ int disconnected; ++ int event_mpi_errno; ++ ++ event_mpi_errno = ++ MPIDI_CH3I_Socki_os_to_mpi_errno(pollinfo, errno, __func__, __LINE__, &disconnected); ++ if (MPIR_Err_is_fatal(event_mpi_errno)) { ++ /* ++ * A serious error occurred. There is no guarantee that the data structures are still intact. Therefore, we avoid ++ * modifying them. ++ */ ++ mpi_errno = event_mpi_errno; ++ goto fn_exit; ++ } ++ ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_WRITE, pollinfo->write_nb, ++ pollinfo->user_ptr, event_mpi_errno, mpi_errno, fn_exit); ++ MPIDI_CH3I_SOCKI_POLLFD_OP_CLEAR(pollfd, pollinfo, POLLOUT); ++ if (disconnected) { ++ /* ++ * The connection is dead but data may still be in the socket buffer; thus, we change the state and let ++ * MPIDI_CH3I_Sock_wait() clean things up. ++ */ ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RO; ++ } + } + /* --END ERROR HANDLING-- */ + +@@ -4138,14 +3853,12 @@ static int MPIDI_CH3I_Socki_handle_write(struct pollfd * const pollfd, struct po + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_WRITE); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Socki_handle_write() */ + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Socki_handle_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3I_Socki_handle_connect(struct pollfd * const pollfd, struct pollinfo * const pollinfo) ++static int MPIDI_CH3I_Socki_handle_connect(struct pollfd *const pollfd, ++ struct pollinfo *const pollinfo) + { + struct sockaddr_in addr; + socklen_t addr_len; +@@ -4157,23 +3870,25 @@ static int MPIDI_CH3I_Socki_handle_connect(struct pollfd * const pollfd, struct + + addr_len = sizeof(struct sockaddr_in); + rc = getpeername(pollfd->fd, (struct sockaddr *) &addr, &addr_len); +- if (rc == 0) +- { +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, pollinfo->user_ptr, MPI_SUCCESS, mpi_errno, fn_exit); +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW; ++ if (rc == 0) { ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, pollinfo->user_ptr, ++ MPI_SUCCESS, mpi_errno, fn_exit); ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_CONNECTED_RW; + } + /* --BEGIN ERROR HANDLING-- */ +- else +- { +- int event_mpi_errno; +- +- MPIDI_CH3I_SOCKI_GET_SOCKET_ERROR(pollinfo, pollinfo->os_errno, mpi_errno, fn_exit); +- event_mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDI_CH3I_SOCK_ERR_CONN_FAILED, "**sock|connfailed", +- "**sock|poll|connfailed %d %d %d %s", pollinfo->sock_set->id, pollinfo->sock_id, pollinfo->os_errno, +- MPIR_Strerror(pollinfo->os_errno)); +- MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, pollinfo->user_ptr, event_mpi_errno, mpi_errno, fn_exit); +- pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; ++ else { ++ int event_mpi_errno; ++ ++ MPIDI_CH3I_SOCKI_GET_SOCKET_ERROR(pollinfo, pollinfo->os_errno, mpi_errno, fn_exit); ++ event_mpi_errno = ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPIDI_CH3I_SOCK_ERR_CONN_FAILED, "**sock|connfailed", ++ "**sock|poll|connfailed %d %d %d %s", pollinfo->sock_set->id, ++ pollinfo->sock_id, pollinfo->os_errno, ++ MPIR_Strerror(pollinfo->os_errno)); ++ MPIDI_CH3I_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDI_CH3I_SOCK_OP_CONNECT, 0, pollinfo->user_ptr, ++ event_mpi_errno, mpi_errno, fn_exit); ++ pollinfo->state = MPIDI_CH3I_SOCKI_STATE_DISCONNECTED; + } + /* --END ERROR HANDLING-- */ + +@@ -4183,6 +3898,7 @@ static int MPIDI_CH3I_Socki_handle_connect(struct pollfd * const pollfd, struct + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3I_SOCKI_HANDLE_CONNECT); + return mpi_errno; + } ++ + /* end MPIDI_CH3I_Socki_handle_connect() */ + + /*********** end of sock_wait.i *****************/ +--- a/src/mpid/ch3/include/mpid_coll.h ++++ b/src/mpid/ch3/include/mpid_coll.h +@@ -12,10 +12,6 @@ + #include "../../common/hcoll/hcoll.h" + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPID_Barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag) + { + int mpi_errno = MPI_SUCCESS; +@@ -31,10 +27,6 @@ static inline int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm, MPIR_Errflag_t * errflag) + { +@@ -51,10 +43,6 @@ static inline int MPID_Bcast(void *buffer, int count, MPI_Datatype datatype, int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Allreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag) +@@ -73,10 +61,6 @@ static inline int MPID_Allreduce(const void *sendbuf, void *recvbuf, int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Errflag_t * errflag) +@@ -96,10 +80,6 @@ static inline int MPID_Allgather(const void *sendbuf, int sendcount, MPI_Datatyp + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Errflag_t * errflag) +@@ -113,10 +93,6 @@ static inline int MPID_Allgatherv(const void *sendbuf, int sendcount, MPI_Dataty + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag) +@@ -129,10 +105,6 @@ static inline int MPID_Scatter(const void *sendbuf, int sendcount, MPI_Datatype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -147,10 +119,6 @@ static inline int MPID_Scatterv(const void *sendbuf, const int *sendcounts, cons + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag) +@@ -163,10 +131,6 @@ static inline int MPID_Gather(const void *sendbuf, int sendcount, MPI_Datatype s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -181,10 +145,6 @@ static inline int MPID_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Errflag_t * errflag) +@@ -197,10 +157,6 @@ static inline int MPID_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls, + MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, + const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -215,10 +171,6 @@ static inline int MPID_Alltoallv(const void *sendbuf, const int *sendcounts, con + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, + const int recvcounts[], const int rdispls[], +@@ -234,10 +186,6 @@ static inline int MPID_Alltoallw(const void *sendbuf, const int sendcounts[], co + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Reduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm, MPIR_Errflag_t * errflag) +@@ -250,10 +198,6 @@ static inline int MPID_Reduce(const void *sendbuf, void *recvbuf, int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag) +@@ -266,10 +210,6 @@ static inline int MPID_Reduce_scatter(const void *sendbuf, void *recvbuf, const + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -284,10 +224,6 @@ static inline int MPID_Reduce_scatter_block(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Scan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag) +@@ -300,10 +236,6 @@ static inline int MPID_Scan(const void *sendbuf, void *recvbuf, int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Exscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag) +@@ -316,10 +248,6 @@ static inline int MPID_Exscan(const void *sendbuf, void *recvbuf, int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm) +@@ -333,10 +261,6 @@ static inline int MPID_Neighbor_allgather(const void *sendbuf, int sendcount, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Neighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -351,10 +275,6 @@ static inline int MPID_Neighbor_allgatherv(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -370,10 +290,6 @@ static inline int MPID_Neighbor_alltoallv(const void *sendbuf, const int sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -389,10 +305,6 @@ static inline int MPID_Neighbor_alltoallw(const void *sendbuf, const int sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm) +@@ -406,10 +318,6 @@ static inline int MPID_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -424,10 +332,6 @@ static inline int MPID_Ineighbor_allgather(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -443,10 +347,6 @@ static inline int MPID_Ineighbor_allgatherv(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Request **request) +@@ -460,10 +360,6 @@ static inline int MPID_Ineighbor_alltoall(const void *sendbuf, int sendcount, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -480,10 +376,6 @@ static inline int MPID_Ineighbor_alltoallv(const void *sendbuf, const int sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -500,10 +392,6 @@ static inline int MPID_Ineighbor_alltoallw(const void *sendbuf, const int sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ibarrier(MPIR_Comm * comm, MPIR_Request **request) + { + int mpi_errno = MPI_SUCCESS; +@@ -513,10 +401,6 @@ static inline int MPID_Ibarrier(MPIR_Comm * comm, MPIR_Request **request) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm, MPIR_Request **request) + { +@@ -527,10 +411,6 @@ static inline int MPID_Ibcast(void *buffer, int count, MPI_Datatype datatype, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Request **request) +@@ -543,10 +423,6 @@ static inline int MPID_Iallgather(const void *sendbuf, int sendcount, MPI_Dataty + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Request **request) +@@ -560,10 +436,6 @@ static inline int MPID_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datat + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iallreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request **request) +@@ -576,10 +448,6 @@ static inline int MPID_Iallreduce(const void *sendbuf, void *recvbuf, int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Request **request) +@@ -592,10 +460,6 @@ static inline int MPID_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatyp + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ialltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -611,10 +475,6 @@ static inline int MPID_Ialltoallv(const void *sendbuf, const int sendcounts[], + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ialltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -630,10 +490,6 @@ static inline int MPID_Ialltoallw(const void *sendbuf, const int sendcounts[], + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iexscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request **request) +@@ -646,10 +502,6 @@ static inline int MPID_Iexscan(const void *sendbuf, void *recvbuf, int count, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Request **request) +@@ -662,10 +514,6 @@ static inline int MPID_Igather(const void *sendbuf, int sendcount, MPI_Datatype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -680,10 +528,6 @@ static inline int MPID_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request **request) +@@ -696,10 +540,6 @@ static inline int MPID_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request **request) +@@ -712,10 +552,6 @@ static inline int MPID_Ireduce_scatter(const void *sendbuf, void *recvbuf, const + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, int root, MPIR_Comm * comm, MPIR_Request **request) + { +@@ -727,10 +563,6 @@ static inline int MPID_Ireduce(const void *sendbuf, void *recvbuf, int count, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, MPIR_Request **request) + { +@@ -742,10 +574,6 @@ static inline int MPID_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Request **request) +@@ -758,10 +586,6 @@ static inline int MPID_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iscatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -777,10 +601,6 @@ static inline int MPID_Iscatterv(const void *sendbuf, const int *sendcounts, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ibarrier_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; +@@ -791,10 +611,6 @@ static inline int MPID_Ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ibcast_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ibcast_sched(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm, MPIR_Sched_t s) + { +@@ -806,10 +622,6 @@ static inline int MPID_Ibcast_sched(void *buffer, int count, MPI_Datatype dataty + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iallgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iallgather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Sched_t s) +@@ -823,10 +635,6 @@ static inline int MPID_Iallgather_sched(const void *sendbuf, int sendcount, MPI_ + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iallgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iallgatherv_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Sched_t s) +@@ -840,10 +648,6 @@ static inline int MPID_Iallgatherv_sched(const void *sendbuf, int sendcount, MPI + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iallreduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iallreduce_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -856,10 +660,6 @@ static inline int MPID_Iallreduce_sched(const void *sendbuf, void *recvbuf, int + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ialltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ialltoall_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Sched_t s) +@@ -873,10 +673,6 @@ static inline int MPID_Ialltoall_sched(const void *sendbuf, int sendcount, MPI_D + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ialltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ialltoallv_sched(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -892,10 +688,6 @@ static inline int MPID_Ialltoallv_sched(const void *sendbuf, const int sendcount + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ialltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ialltoallw_sched(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -911,10 +703,6 @@ static inline int MPID_Ialltoallw_sched(const void *sendbuf, const int sendcount + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iexscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iexscan_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -927,10 +715,6 @@ static inline int MPID_Iexscan_sched(const void *sendbuf, void *recvbuf, int cou + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Igather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Igather_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Sched_t s) +@@ -944,10 +728,6 @@ static inline int MPID_Igather_sched(const void *sendbuf, int sendcount, MPI_Dat + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Igatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Igatherv_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -962,10 +742,6 @@ static inline int MPID_Igatherv_sched(const void *sendbuf, int sendcount, MPI_Da + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ireduce_scatter_block_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ireduce_scatter_block_sched(const void *sendbuf, void *recvbuf, int recvcount, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -979,10 +755,6 @@ static inline int MPID_Ireduce_scatter_block_sched(const void *sendbuf, void *re + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ireduce_scatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ireduce_scatter_sched(const void *sendbuf, void *recvbuf, const int recvcounts[], + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -996,10 +768,6 @@ static inline int MPID_Ireduce_scatter_sched(const void *sendbuf, void *recvbuf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ireduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ireduce_sched(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, int root, MPIR_Comm * comm, MPIR_Sched_t s) + { +@@ -1011,10 +779,6 @@ static inline int MPID_Ireduce_sched(const void *sendbuf, void *recvbuf, int cou + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iscan_sched(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, MPIR_Sched_t s) + { +@@ -1026,10 +790,6 @@ static inline int MPID_Iscan_sched(const void *sendbuf, void *recvbuf, int count + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iscatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iscatter_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Sched_t s) +@@ -1043,10 +803,6 @@ static inline int MPID_Iscatter_sched(const void *sendbuf, int sendcount, MPI_Da + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iscatterv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Iscatterv_sched(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -1061,10 +817,6 @@ static inline int MPID_Iscatterv_sched(const void *sendbuf, const int *sendcount + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_allgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_allgather_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -1079,10 +831,6 @@ static inline int MPID_Ineighbor_allgather_sched(const void *sendbuf, int sendco + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_allgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_allgatherv_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -1098,10 +846,6 @@ static inline int MPID_Ineighbor_allgatherv_sched(const void *sendbuf, int sendc + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_alltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_alltoall_sched(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Sched_t s) +@@ -1115,10 +859,6 @@ static inline int MPID_Ineighbor_alltoall_sched(const void *sendbuf, int sendcou + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_alltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_alltoallv_sched(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -1134,10 +874,6 @@ static inline int MPID_Ineighbor_alltoallv_sched(const void *sendbuf, const int + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ineighbor_alltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPID_Ineighbor_alltoallw_sched(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +--- a/src/mpid/ch3/include/mpid_port.h ++++ b/src/mpid/ch3/include/mpid_port.h +@@ -64,10 +64,6 @@ typedef struct MPIDI_CH3I_Port_q { + /* Start VC closing protocol -- locally close VC. + * It is the 1st step of VC closing protocol (see ch3u_handle_connection.c): + * local_closed / remote_closed -> close_acked -> closed. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_local_close_vc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Port_local_close_vc(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; +@@ -84,10 +80,6 @@ static inline int MPIDI_CH3I_Port_local_close_vc(MPIDI_VC_t * vc) + + /*** Utility routines for connection request queues ***/ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_connreq_q_enqueue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPIDI_CH3I_Port_connreq_q_enqueue(MPIDI_CH3I_Port_connreq_q_t * connreq_q, + MPIDI_CH3I_Port_connreq_t * connreq) + { +@@ -95,10 +87,6 @@ static inline void MPIDI_CH3I_Port_connreq_q_enqueue(MPIDI_CH3I_Port_connreq_q_t + connreq_q->size++; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_connreq_q_dequeue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPIDI_CH3I_Port_connreq_q_dequeue(MPIDI_CH3I_Port_connreq_q_t * connreq_q, + MPIDI_CH3I_Port_connreq_t ** connreq_ptr) + { +@@ -115,10 +103,6 @@ static inline void MPIDI_CH3I_Port_connreq_q_dequeue(MPIDI_CH3I_Port_connreq_q_t + (*connreq_ptr) = connreq; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_connreq_q_delete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPIDI_CH3I_Port_connreq_q_delete(MPIDI_CH3I_Port_connreq_q_t * connreq_q, + MPIDI_CH3I_Port_connreq_t * connreq) + { +@@ -134,10 +118,6 @@ static inline void MPIDI_CH3I_Port_connreq_q_delete(MPIDI_CH3I_Port_connreq_q_t + * received an accept packet from server. Handled in MPIDI_CH3_PktHandler_AcceptAck. + * ACK - True means client matched with server acceptance; + * ACK - False means client already started revoking, thus acceptance fails. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_issue_accept_ack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Port_issue_accept_ack(MPIDI_VC_t * vc, int ack) + { + int mpi_errno = MPI_SUCCESS; +@@ -168,10 +148,6 @@ static inline int MPIDI_CH3I_Port_issue_accept_ack(MPIDI_VC_t * vc, int ack) + * ACK - True means server started accepting this connection request; + * ACK - False means port does not exist or being closed on server, thus connection + * fails. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_issue_conn_ack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Port_issue_conn_ack(MPIDI_VC_t * vc, int ack) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/include/mpid_rma_issue.h ++++ b/src/mpid/ch3/include/mpid_rma_issue.h +@@ -16,10 +16,6 @@ + + /* immed_copy() copys data from origin buffer to + IMMED packet header. */ +-#undef FUNCNAME +-#define FUNCNAME immed_copy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int immed_copy(void *src, void *dest, size_t len) + { + int mpi_errno = MPI_SUCCESS; +@@ -63,166 +59,77 @@ static inline int immed_copy(void *src, void *dest, size_t len) + /* extended packet functions */ + /* =========================================================== */ + +-/* Copy derived datatype information issued within RMA operation. */ +-#undef FUNCNAME +-#define FUNCNAME fill_in_derived_dtp_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void fill_in_derived_dtp_info(MPIDI_RMA_dtype_info * dtype_info, void *dataloop, +- MPIR_Datatype* dtp) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_FILL_IN_DERIVED_DTP_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_FILL_IN_DERIVED_DTP_INFO); +- +- /* Derived datatype on target, fill derived datatype info. */ +- dtype_info->is_contig = dtp->is_contig; +- dtype_info->max_contig_blocks = dtp->max_contig_blocks; +- dtype_info->size = dtp->size; +- dtype_info->extent = dtp->extent; +- dtype_info->dataloop_size = dtp->dataloop_size; +- dtype_info->dataloop_depth = dtp->dataloop_depth; +- dtype_info->basic_type = dtp->basic_type; +- dtype_info->dataloop = dtp->dataloop; +- dtype_info->ub = dtp->ub; +- dtype_info->lb = dtp->lb; +- dtype_info->true_ub = dtp->true_ub; +- dtype_info->true_lb = dtp->true_lb; +- dtype_info->has_sticky_ub = dtp->has_sticky_ub; +- dtype_info->has_sticky_lb = dtp->has_sticky_lb; +- +- MPIR_Assert(dataloop != NULL); +- MPIR_Memcpy(dataloop, dtp->dataloop, dtp->dataloop_size); +- /* The dataloop can have undefined padding sections, so we need to let +- * valgrind know that it is OK to pass this data to writev later on. */ +- MPL_VG_MAKE_MEM_DEFINED(dataloop, dtp->dataloop_size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_FILL_IN_DERIVED_DTP_INFO); +-} +- + /* Set extended header for ACC operation and return its real size. */ +-#undef FUNCNAME +-#define FUNCNAME init_accum_ext_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int init_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags, ++static int init_stream_dtype_ext_pkt(int pkt_flags, + MPIR_Datatype* target_dtp, intptr_t stream_offset, +- void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz) ++ void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz, int *flattened_type_size) + { +- MPI_Aint _ext_hdr_sz = 0, _total_sz = 0; +- void *dataloop_ptr = NULL; ++ MPI_Aint _total_sz = 0, stream_hdr_sz = 0; ++ void *flattened_type, *total_hdr; + int mpi_errno = MPI_SUCCESS; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_INIT_ACCUM_EXT_PKT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_INIT_ACCUM_EXT_PKT); + +- if ((flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) && target_dtp != NULL) { +- MPIDI_CH3_Ext_pkt_accum_stream_derived_t *_ext_hdr_ptr = NULL; +- +- /* dataloop is behind of extended header on origin. +- * TODO: support extended header array */ +- _ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_accum_stream_derived_t); +- _total_sz = _ext_hdr_sz + target_dtp->dataloop_size; +- +- _ext_hdr_ptr = (MPIDI_CH3_Ext_pkt_accum_stream_derived_t *) MPL_malloc(_total_sz, MPL_MEM_BUFFER); +- MPL_VG_MEM_INIT(_ext_hdr_ptr, _total_sz); +- if (_ext_hdr_ptr == NULL) { ++ /* ++ * The extended header consists of two parts: ++ * ++ * 1. Stream header: if the size of the data is large and needs ++ * to be chunked into multiple pieces. ++ * ++ * 2. Flattened datatype: if the target is a derived datatype. ++ */ ++ ++ if ((pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM)) ++ stream_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_stream_t); ++ else ++ stream_hdr_sz = 0; ++ ++ if (target_dtp != NULL) ++ MPIR_Typerep_flatten_size(target_dtp, flattened_type_size); ++ else ++ *flattened_type_size = 0; ++ ++ _total_sz = stream_hdr_sz + *flattened_type_size; ++ if (_total_sz) { ++ total_hdr = MPL_malloc(_total_sz, MPL_MEM_RMA); ++ if (total_hdr == NULL) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIDI_CH3_Ext_pkt_accum_stream_derived_t"); ++ "**nomem %d", _total_sz); + } +- +- _ext_hdr_ptr->stream_offset = stream_offset; +- +- dataloop_ptr = (void *) ((char *) _ext_hdr_ptr + _ext_hdr_sz); +- fill_in_derived_dtp_info(&_ext_hdr_ptr->dtype_info, dataloop_ptr, target_dtp); +- +- (*ext_hdr_ptr) = _ext_hdr_ptr; ++ MPL_VG_MEM_INIT(total_hdr, _total_sz); + } +- else if (flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { +- MPIDI_CH3_Ext_pkt_accum_stream_t *_ext_hdr_ptr = NULL; +- +- _total_sz = sizeof(MPIDI_CH3_Ext_pkt_accum_stream_t); +- +- _ext_hdr_ptr = (MPIDI_CH3_Ext_pkt_accum_stream_t *) MPL_malloc(_total_sz, MPL_MEM_BUFFER); +- MPL_VG_MEM_INIT(_ext_hdr_ptr, _total_sz); +- if (_ext_hdr_ptr == NULL) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIDI_CH3_Ext_pkt_accum_stream_t"); +- } +- +- _ext_hdr_ptr->stream_offset = stream_offset; +- (*ext_hdr_ptr) = _ext_hdr_ptr; ++ else { ++ total_hdr = NULL; + } +- else if (target_dtp != NULL) { +- MPIDI_CH3_Ext_pkt_accum_derived_t *_ext_hdr_ptr = NULL; + +- /* dataloop is behind of extended header on origin. +- * TODO: support extended header array */ +- _ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_accum_derived_t); +- _total_sz = _ext_hdr_sz + target_dtp->dataloop_size; +- +- _ext_hdr_ptr = (MPIDI_CH3_Ext_pkt_accum_derived_t *) MPL_malloc(_total_sz, MPL_MEM_BUFFER); +- MPL_VG_MEM_INIT(_ext_hdr_ptr, _total_sz); +- if (_ext_hdr_ptr == NULL) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIDI_CH3_Ext_pkt_accum_derived_t"); +- } +- +- dataloop_ptr = (void *) ((char *) _ext_hdr_ptr + _ext_hdr_sz); +- fill_in_derived_dtp_info(&_ext_hdr_ptr->dtype_info, dataloop_ptr, target_dtp); +- +- (*ext_hdr_ptr) = _ext_hdr_ptr; ++ if ((pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM)) { ++ ((MPIDI_CH3_Ext_pkt_stream_t *) total_hdr)->stream_offset = stream_offset; ++ } ++ if (target_dtp != NULL) { ++ flattened_type = (void *) ((char *) total_hdr + stream_hdr_sz); ++ MPIR_Typerep_flatten(target_dtp, flattened_type); + } + ++ (*ext_hdr_ptr) = total_hdr; + (*ext_hdr_sz) = _total_sz; + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_INIT_ACCUM_EXT_PKT); + return mpi_errno; + fn_fail: +- if ((*ext_hdr_ptr)) +- MPL_free((*ext_hdr_ptr)); ++ MPL_free((*ext_hdr_ptr)); + (*ext_hdr_ptr) = NULL; + (*ext_hdr_sz) = 0; + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME init_get_accum_ext_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int init_get_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags, +- MPIR_Datatype* target_dtp, intptr_t stream_offset, +- void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_INIT_GET_ACCUM_EXT_PKT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_INIT_GET_ACCUM_EXT_PKT); +- +- /* Check if get_accum still reuses accum' extended packet header. */ +- MPIR_Assert(sizeof(MPIDI_CH3_Ext_pkt_accum_stream_derived_t) == +- sizeof(MPIDI_CH3_Ext_pkt_get_accum_stream_derived_t)); +- MPIR_Assert(sizeof(MPIDI_CH3_Ext_pkt_accum_derived_t) == +- sizeof(MPIDI_CH3_Ext_pkt_get_accum_derived_t)); +- MPIR_Assert(sizeof(MPIDI_CH3_Ext_pkt_accum_stream_t) == +- sizeof(MPIDI_CH3_Ext_pkt_get_accum_stream_t)); +- +- mpi_errno = init_accum_ext_pkt(flags, target_dtp, stream_offset, ext_hdr_ptr, ext_hdr_sz); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_INIT_GET_ACCUM_EXT_PKT); +- return mpi_errno; +-} +- + /* =========================================================== */ + /* issuinng functions */ + /* =========================================================== */ + + /* issue_from_origin_buffer() issues data from origin + buffer (i.e. non-IMMED operation). */ +-#undef FUNCNAME +-#define FUNCNAME issue_from_origin_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + void *ext_hdr_ptr, MPI_Aint ext_hdr_sz, + intptr_t stream_offset, intptr_t stream_size, +@@ -235,7 +142,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + int iovcnt = 0; + MPIR_Request *req = NULL; + MPI_Aint dt_true_lb; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + int is_empty_origin = FALSE; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_FROM_ORIGIN_BUFFER); +@@ -255,9 +162,6 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE(rma_op->pkt, target_datatype, mpi_errno); + if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) { + MPIR_Datatype_get_ptr(target_datatype, target_dtp); +- +- /* Set dataloop size in pkt header */ +- MPIDI_CH3_PKT_RMA_SET_DATALOOP_SIZE(rma_op->pkt, target_dtp->dataloop_size, mpi_errno); + } + + if (is_empty_origin == FALSE) { +@@ -280,8 +184,8 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + iov[iovcnt].MPL_IOV_LEN = sizeof(rma_op->pkt); + iovcnt++; + +- MPIDI_CH3_PKT_RMA_GET_FLAGS(rma_op->pkt, flags, mpi_errno); +- if (!(flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) && target_dtp == NULL && is_origin_contig) { ++ MPIDI_CH3_PKT_RMA_GET_FLAGS(rma_op->pkt, pkt_flags, mpi_errno); ++ if (!(pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) && target_dtp == NULL && is_origin_contig) { + /* Fast path --- use iStartMsgv() to issue the data, which does not need a request + * to be passed in: + * (1) non-streamed op (do not need to send extended packet header); +@@ -328,6 +232,11 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + if (ext_hdr_sz > 0) { + req->dev.ext_hdr_sz = ext_hdr_sz; + req->dev.ext_hdr_ptr = ext_hdr_ptr; ++ req->dev.flattened_type = NULL; ++ ++ iov[iovcnt].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr; ++ iov[iovcnt].MPL_IOV_LEN = ext_hdr_sz; ++ iovcnt++; + } + + if (origin_dtp != NULL) { +@@ -338,7 +247,6 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + + if (is_origin_contig) { + /* origin data is contiguous */ +- + if (is_empty_origin == FALSE) { + iov[iovcnt].MPL_IOV_BUF = + (MPL_IOV_BUF_CAST) ((char *) rma_op->origin_addr + dt_true_lb + stream_offset); +@@ -353,20 +261,18 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + } + else { + /* origin data is non-contiguous */ +- req->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(req->dev.segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- +- MPIR_Segment_init(rma_op->origin_addr, rma_op->origin_count, +- rma_op->origin_datatype, req->dev.segment_ptr); +- req->dev.segment_first = stream_offset; +- req->dev.segment_size = stream_offset + stream_size; ++ req->dev.user_buf = rma_op->origin_addr; ++ req->dev.user_count = rma_op->origin_count; ++ req->dev.datatype = rma_op->origin_datatype; ++ req->dev.msg_offset = stream_offset; ++ req->dev.msgsize = stream_offset + stream_size; + + req->dev.OnFinal = 0; + req->dev.OnDataAvail = 0; + + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); +- mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN); ++ mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN, ++ &iov[1], iovcnt - 1); + MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); + MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); + } +@@ -383,8 +289,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + if (req) { + if (req->dev.datatype_ptr) + MPIR_Datatype_ptr_release(req->dev.datatype_ptr); +- if (req->dev.ext_hdr_ptr) +- MPL_free(req->dev.ext_hdr_ptr); ++ MPL_free(req->dev.ext_hdr_ptr); + MPIR_Request_free(req); + } + +@@ -394,12 +299,8 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc, + + + /* issue_put_op() issues PUT packet header and data. */ +-#undef FUNCNAME +-#define FUNCNAME issue_put_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, +- MPIDI_RMA_Target_t * target_ptr, MPIDI_CH3_Pkt_flags_t flags) ++ MPIDI_RMA_Target_t * target_ptr, int pkt_flags) + { + MPIDI_VC_t *vc = NULL; + MPIR_Comm *comm_ptr = win_ptr->comm_ptr; +@@ -407,14 +308,12 @@ static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + MPIR_Request *curr_req = NULL; + MPI_Datatype target_datatype; + MPIR_Datatype*target_dtp_ptr = NULL; +- MPIDI_CH3_Ext_pkt_put_derived_t *ext_hdr_ptr = NULL; +- MPI_Aint ext_hdr_sz = 0; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_PUT_OP); + + MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_ISSUE_PUT_OP); + +- put_pkt->flags |= flags; ++ put_pkt->pkt_flags |= pkt_flags; + + MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); + +@@ -427,28 +326,25 @@ static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + } + else { + MPI_Aint origin_type_size; ++ void *ext_hdr_ptr = NULL; ++ MPI_Aint ext_hdr_sz = 0; + MPIR_Datatype_get_size_macro(rma_op->origin_datatype, origin_type_size); + + /* If derived datatype on target, add extended packet header. */ + MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE(rma_op->pkt, target_datatype, mpi_errno); + if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) { + MPIR_Datatype_get_ptr(target_datatype, target_dtp_ptr); ++ MPIR_Typerep_flatten_size(target_dtp_ptr, &put_pkt->info.flattened_type_size); + +- void *dataloop_ptr = NULL; +- +- /* dataloop is behind of extended header on origin. +- * TODO: support extended header array */ +- ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_put_derived_t) + target_dtp_ptr->dataloop_size; +- ext_hdr_ptr = MPL_malloc(ext_hdr_sz, MPL_MEM_BUFFER); +- MPL_VG_MEM_INIT(ext_hdr_ptr, ext_hdr_sz); +- if (!ext_hdr_ptr) { ++ ext_hdr_ptr = MPL_malloc(put_pkt->info.flattened_type_size, MPL_MEM_RMA); ++ if (ext_hdr_ptr == NULL) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIDI_CH3_Ext_pkt_put_derived_t"); ++ "**nomem %d", put_pkt->info.flattened_type_size); + } ++ MPL_VG_MEM_INIT(ext_hdr_ptr, put_pkt->info.flattened_type_size); + +- dataloop_ptr = (void *) ((char *) ext_hdr_ptr + +- sizeof(MPIDI_CH3_Ext_pkt_put_derived_t)); +- fill_in_derived_dtp_info(&ext_hdr_ptr->dtype_info, dataloop_ptr, target_dtp_ptr); ++ MPIR_Typerep_flatten(target_dtp_ptr, ext_hdr_ptr); ++ ext_hdr_sz = put_pkt->info.flattened_type_size; + } + + mpi_errno = issue_from_origin_buffer(rma_op, vc, ext_hdr_ptr, ext_hdr_sz, +@@ -477,12 +373,8 @@ static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + #define ALL_STREAM_UNITS_ISSUED (-1) + + /* issue_acc_op() send ACC packet header and data. */ +-#undef FUNCNAME +-#define FUNCNAME issue_acc_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, +- MPIDI_RMA_Target_t * target_ptr, MPIDI_CH3_Pkt_flags_t flags) ++ MPIDI_RMA_Target_t * target_ptr, int pkt_flags) + { + MPIDI_VC_t *vc = NULL; + MPIR_Comm *comm_ptr = win_ptr->comm_ptr; +@@ -506,7 +398,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + if (rma_op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE_IMMED) { + MPIR_Request *curr_req = NULL; + +- accum_pkt->flags |= flags; ++ accum_pkt->pkt_flags |= pkt_flags; + + /* All origin data is in packet header, issue the header. */ + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); +@@ -551,7 +443,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + /* If there are more than one stream unit, mark the current packet + * as stream packet */ + if (stream_unit_count > 1) +- flags |= MPIDI_CH3_PKT_FLAG_RMA_STREAM; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_STREAM; + + /* Get target datatype */ + if (!MPIR_DATATYPE_IS_PREDEFINED(accum_pkt->datatype)) +@@ -566,16 +458,16 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + if (j < rma_op->issued_stream_count) + continue; + +- accum_pkt->flags |= flags; ++ accum_pkt->pkt_flags |= pkt_flags; + + if (j != 0) { +- accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; +- accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; ++ accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; ++ accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; + } + if (j != stream_unit_count - 1) { +- accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; +- accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH; +- accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER; ++ accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; ++ accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH; ++ accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER; + } + + stream_offset = j * stream_elem_count * predefined_dtp_size; +@@ -583,7 +475,8 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + rest_len -= stream_size; + + /* Set extended packet header if needed. */ +- init_accum_ext_pkt(flags, target_dtp_ptr, stream_offset, &ext_hdr_ptr, &ext_hdr_sz); ++ init_stream_dtype_ext_pkt(pkt_flags, target_dtp_ptr, stream_offset, &ext_hdr_ptr, &ext_hdr_sz, ++ &accum_pkt->info.flattened_type_size); + + mpi_errno = issue_from_origin_buffer(rma_op, vc, ext_hdr_ptr, ext_hdr_sz, + stream_offset, stream_size, &curr_req); +@@ -597,7 +490,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + + if (stream_unit_count > 1) { + rma_op->multi_reqs = +- (MPIR_Request **) MPL_malloc(sizeof(MPIR_Request *) * rma_op->reqs_size, MPL_MEM_BUFFER); ++ (MPIR_Request **) MPL_malloc(sizeof(MPIR_Request *) * rma_op->reqs_size, MPL_MEM_RMA); + for (i = 0; i < rma_op->reqs_size; i++) + rma_op->multi_reqs[i] = NULL; + } +@@ -611,8 +504,8 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + + rma_op->issued_stream_count++; + +- if (accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { ++ if (accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { + /* if piggybacked with LOCK flag, we + * only issue the first streaming unit */ + MPIR_Assert(j == 0); +@@ -633,10 +526,8 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + rma_op->single_req = NULL; + } + else if (rma_op->reqs_size > 1) { +- if (rma_op->multi_reqs != NULL) { +- MPL_free(rma_op->multi_reqs); +- rma_op->multi_reqs = NULL; +- } ++ MPL_free(rma_op->multi_reqs); ++ rma_op->multi_reqs = NULL; + } + rma_op->reqs_size = 0; + goto fn_exit; +@@ -644,12 +535,8 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + + + /* issue_get_acc_op() send GACC packet header and data. */ +-#undef FUNCNAME +-#define FUNCNAME issue_get_acc_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, +- MPIDI_RMA_Target_t * target_ptr, MPIDI_CH3_Pkt_flags_t flags) ++ MPIDI_RMA_Target_t * target_ptr, int pkt_flags) + { + MPIDI_VC_t *vc = NULL; + MPIR_Comm *comm_ptr = win_ptr->comm_ptr; +@@ -673,7 +560,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + MPIR_Request *resp_req = NULL; + MPIR_Request *curr_req = NULL; + +- get_accum_pkt->flags |= flags; ++ get_accum_pkt->pkt_flags |= pkt_flags; + + rma_op->reqs_size = 1; + +@@ -737,7 +624,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + /* If there are more than one stream unit, mark the current packet + * as stream packet */ + if (stream_unit_count > 1) +- flags |= MPIDI_CH3_PKT_FLAG_RMA_STREAM; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_STREAM; + + rest_len = total_len; + +@@ -745,7 +632,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + + if (rma_op->reqs_size > 1) { + rma_op->multi_reqs = +- (MPIR_Request **) MPL_malloc(sizeof(MPIR_Request *) * rma_op->reqs_size, MPL_MEM_BUFFER); ++ (MPIR_Request **) MPL_malloc(sizeof(MPIR_Request *) * rma_op->reqs_size, MPL_MEM_RMA); + for (i = 0; i < rma_op->reqs_size; i++) + rma_op->multi_reqs[i] = NULL; + } +@@ -760,16 +647,16 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + if (j < rma_op->issued_stream_count) + continue; + +- get_accum_pkt->flags |= flags; ++ get_accum_pkt->pkt_flags |= pkt_flags; + + if (j != 0) { +- get_accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; +- get_accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; ++ get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; ++ get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; + } + if (j != stream_unit_count - 1) { +- get_accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; +- get_accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH; +- get_accum_pkt->flags &= ~MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER; ++ get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; ++ get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH; ++ get_accum_pkt->pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER; + } + + /* Create a request for the GACC response. Store the response buf, count, and +@@ -785,7 +672,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + resp_req->dev.datatype = rma_op->result_datatype; + resp_req->dev.target_win_handle = MPI_WIN_NULL; + resp_req->dev.source_win_handle = win_ptr->handle; +- resp_req->dev.flags = flags; ++ resp_req->dev.pkt_flags = pkt_flags; + + if (!MPIR_DATATYPE_IS_PREDEFINED(resp_req->dev.datatype)) { + MPIR_Datatype*result_dtp = NULL; +@@ -803,14 +690,19 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + rest_len -= stream_size; + + /* Set extended packet header if needed. */ +- init_get_accum_ext_pkt(flags, target_dtp_ptr, stream_offset, &ext_hdr_ptr, &ext_hdr_sz); ++ init_stream_dtype_ext_pkt(pkt_flags, target_dtp_ptr, stream_offset, &ext_hdr_ptr, &ext_hdr_sz, ++ &get_accum_pkt->info.flattened_type_size); + + /* Note: here we need to allocate an extended packet header in response request, + * in order to store the stream_offset locally and use it in PktHandler_Get_AccumResp. + * This extended packet header only contains stream_offset and does not contain any + * other information. */ +- init_get_accum_ext_pkt(flags, NULL /* target_dtp_ptr */ , stream_offset, +- &(resp_req->dev.ext_hdr_ptr), &(resp_req->dev.ext_hdr_sz)); ++ { ++ int dummy; ++ init_stream_dtype_ext_pkt(pkt_flags, NULL /* target_dtp_ptr */ , stream_offset, ++ &(resp_req->dev.ext_hdr_ptr), &(resp_req->dev.ext_hdr_sz), ++ &dummy); ++ } + + mpi_errno = issue_from_origin_buffer(rma_op, vc, ext_hdr_ptr, ext_hdr_sz, + stream_offset, stream_size, &curr_req); +@@ -828,8 +720,8 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + + rma_op->issued_stream_count++; + +- if (get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { ++ if (get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { + /* if piggybacked with LOCK flag, we + * only issue the first streaming unit */ + MPIR_Assert(j == 0); +@@ -875,12 +767,8 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + } + + +-#undef FUNCNAME +-#define FUNCNAME issue_get_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, +- MPIDI_RMA_Target_t * target_ptr, MPIDI_CH3_Pkt_flags_t flags) ++ MPIDI_RMA_Target_t * target_ptr, int pkt_flags) + { + MPIDI_CH3_Pkt_get_t *get_pkt = &rma_op->pkt.get; + int mpi_errno = MPI_SUCCESS; +@@ -890,8 +778,6 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + MPI_Datatype target_datatype; + MPIR_Request *req = NULL; + MPIR_Request *curr_req = NULL; +- MPIDI_CH3_Ext_pkt_get_derived_t *ext_hdr_ptr = NULL; +- MPI_Aint ext_hdr_sz = 0; + MPL_IOV iov[MPL_IOV_LIMIT]; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_GET_OP); + +@@ -924,7 +810,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + + get_pkt->request_handle = curr_req->handle; + +- get_pkt->flags |= flags; ++ get_pkt->pkt_flags |= pkt_flags; + + comm_ptr = win_ptr->comm_ptr; + MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); +@@ -938,25 +824,21 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + } + else { + /* derived datatype on target. */ ++ void *ext_hdr_ptr = NULL; ++ MPI_Aint ext_hdr_sz = 0; ++ + MPIR_Datatype_get_ptr(target_datatype, dtp); +- void *dataloop_ptr = NULL; +- +- /* set extended packet header. +- * dataloop is behind of extended header on origin. +- * TODO: support extended header array */ +- ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_get_derived_t) + dtp->dataloop_size; +- ext_hdr_ptr = MPL_malloc(ext_hdr_sz, MPL_MEM_BUFFER); +- MPL_VG_MEM_INIT(ext_hdr_ptr, ext_hdr_sz); +- if (!ext_hdr_ptr) { ++ MPIR_Typerep_flatten_size(dtp, &get_pkt->info.flattened_type_size); ++ ++ ext_hdr_ptr = MPL_malloc(get_pkt->info.flattened_type_size, MPL_MEM_RMA); ++ if (ext_hdr_ptr == NULL) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIDI_CH3_Ext_pkt_get_derived_t"); ++ "**nomem %d", get_pkt->info.flattened_type_size); + } ++ MPL_VG_MEM_INIT(ext_hdr_ptr, get_pkt->info.flattened_type_size); + +- dataloop_ptr = (void *) ((char *) ext_hdr_ptr + sizeof(MPIDI_CH3_Ext_pkt_get_derived_t)); +- fill_in_derived_dtp_info(&ext_hdr_ptr->dtype_info, dataloop_ptr, dtp); +- +- /* Set dataloop size in pkt header */ +- MPIDI_CH3_PKT_RMA_SET_DATALOOP_SIZE(rma_op->pkt, dtp->dataloop_size, mpi_errno); ++ MPIR_Typerep_flatten(dtp, ext_hdr_ptr); ++ ext_hdr_sz = get_pkt->info.flattened_type_size; + + iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_pkt; + iov[0].MPL_IOV_LEN = sizeof(*get_pkt); +@@ -1003,13 +885,9 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr, + } + + +-#undef FUNCNAME +-#define FUNCNAME issue_cas_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int issue_cas_op(MPIDI_RMA_Op_t * rma_op, + MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, +- MPIDI_CH3_Pkt_flags_t flags) ++ int pkt_flags) + { + MPIDI_VC_t *vc = NULL; + MPIR_Comm *comm_ptr = win_ptr->comm_ptr; +@@ -1040,7 +918,7 @@ static int issue_cas_op(MPIDI_RMA_Op_t * rma_op, + curr_req->dev.source_win_handle = win_ptr->handle; + + cas_pkt->request_handle = curr_req->handle; +- cas_pkt->flags |= flags; ++ cas_pkt->pkt_flags |= pkt_flags; + + MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); +@@ -1066,13 +944,9 @@ static int issue_cas_op(MPIDI_RMA_Op_t * rma_op, + } + + +-#undef FUNCNAME +-#define FUNCNAME issue_fop_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int issue_fop_op(MPIDI_RMA_Op_t * rma_op, + MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target_ptr, +- MPIDI_CH3_Pkt_flags_t flags) ++ int pkt_flags) + { + MPIDI_VC_t *vc = NULL; + MPIR_Comm *comm_ptr = win_ptr->comm_ptr; +@@ -1101,7 +975,7 @@ static int issue_fop_op(MPIDI_RMA_Op_t * rma_op, + + fop_pkt->request_handle = resp_req->handle; + +- fop_pkt->flags |= flags; ++ fop_pkt->pkt_flags |= pkt_flags; + + MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc); + +@@ -1141,12 +1015,8 @@ static int issue_fop_op(MPIDI_RMA_Op_t * rma_op, + + /* issue_rma_op() is called by ch3u_rma_progress.c, it triggers + proper issuing functions according to packet type. */ +-#undef FUNCNAME +-#define FUNCNAME issue_rma_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int issue_rma_op(MPIDI_RMA_Op_t * op_ptr, MPIR_Win * win_ptr, +- MPIDI_RMA_Target_t * target_ptr, MPIDI_CH3_Pkt_flags_t flags) ++ MPIDI_RMA_Target_t * target_ptr, int pkt_flags) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_ISSUE_RMA_OP); +@@ -1156,25 +1026,25 @@ static inline int issue_rma_op(MPIDI_RMA_Op_t * op_ptr, MPIR_Win * win_ptr, + switch (op_ptr->pkt.type) { + case (MPIDI_CH3_PKT_PUT): + case (MPIDI_CH3_PKT_PUT_IMMED): +- mpi_errno = issue_put_op(op_ptr, win_ptr, target_ptr, flags); ++ mpi_errno = issue_put_op(op_ptr, win_ptr, target_ptr, pkt_flags); + break; + case (MPIDI_CH3_PKT_ACCUMULATE): + case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): +- mpi_errno = issue_acc_op(op_ptr, win_ptr, target_ptr, flags); ++ mpi_errno = issue_acc_op(op_ptr, win_ptr, target_ptr, pkt_flags); + break; + case (MPIDI_CH3_PKT_GET_ACCUM): + case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): +- mpi_errno = issue_get_acc_op(op_ptr, win_ptr, target_ptr, flags); ++ mpi_errno = issue_get_acc_op(op_ptr, win_ptr, target_ptr, pkt_flags); + break; + case (MPIDI_CH3_PKT_GET): +- mpi_errno = issue_get_op(op_ptr, win_ptr, target_ptr, flags); ++ mpi_errno = issue_get_op(op_ptr, win_ptr, target_ptr, pkt_flags); + break; + case (MPIDI_CH3_PKT_CAS_IMMED): +- mpi_errno = issue_cas_op(op_ptr, win_ptr, target_ptr, flags); ++ mpi_errno = issue_cas_op(op_ptr, win_ptr, target_ptr, pkt_flags); + break; + case (MPIDI_CH3_PKT_FOP): + case (MPIDI_CH3_PKT_FOP_IMMED): +- mpi_errno = issue_fop_op(op_ptr, win_ptr, target_ptr, flags); ++ mpi_errno = issue_fop_op(op_ptr, win_ptr, target_ptr, pkt_flags); + break; + default: + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**winInvalidOp"); +--- a/src/mpid/ch3/include/mpid_rma_lockqueue.h ++++ b/src/mpid/ch3/include/mpid_rma_lockqueue.h +@@ -15,10 +15,6 @@ extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_winlock_getlocallock ATTRIBUTE((unused + + /* MPIDI_CH3I_Win_target_lock_entry_alloc(): return a new lock queue entry and + * initialize it. If we cannot get one, return NULL. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_target_lock_entry_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline MPIDI_RMA_Target_lock_entry_t *MPIDI_CH3I_Win_target_lock_entry_alloc(MPIR_Win * + win_ptr, + MPIDI_CH3_Pkt_t +@@ -45,10 +41,6 @@ static inline MPIDI_RMA_Target_lock_entry_t *MPIDI_CH3I_Win_target_lock_entry_al + + /* MPIDI_CH3I_Win_target_lock_entry_free(): put a lock queue entry back to + * the global pool. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_target_lock_entry_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_target_lock_entry_free(MPIR_Win * win_ptr, + MPIDI_RMA_Target_lock_entry_t * + target_lock_entry) +--- a/src/mpid/ch3/include/mpid_rma_oplist.h ++++ b/src/mpid/ch3/include/mpid_rma_oplist.h +@@ -109,10 +109,6 @@ extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_alloc ATTRIBUTE((unused)); + &(win_ptr_)->slots[(rank_) % (win_ptr_)->num_slots] : \ + &(win_ptr_)->slots[(rank_)]) + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_set_active +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_set_active(MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -136,10 +132,6 @@ static inline int MPIDI_CH3I_Win_set_active(MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_set_inactive +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_set_inactive(MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -164,10 +156,6 @@ static inline int MPIDI_CH3I_Win_set_inactive(MPIR_Win * win_ptr) + + /* MPIDI_CH3I_Win_op_alloc(): get a new op element from op pool and + * initialize it. If we cannot get one, return NULL. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_op_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline MPIDI_RMA_Op_t *MPIDI_CH3I_Win_op_alloc(MPIR_Win * win_ptr) + { + MPIDI_RMA_Op_t *e; +@@ -201,17 +189,11 @@ static inline MPIDI_RMA_Op_t *MPIDI_CH3I_Win_op_alloc(MPIR_Win * win_ptr) + + /* MPIDI_CH3I_Win_op_free(): put an op element back to the op pool which + * it belongs to. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_op_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_op_free(MPIR_Win * win_ptr, MPIDI_RMA_Op_t * e) + { + int mpi_errno = MPI_SUCCESS; + +- if (e->multi_reqs != NULL) { +- MPL_free(e->multi_reqs); +- } ++ MPL_free(e->multi_reqs); + + /* We enqueue elements to the right pool, so when they get freed + * at window free time, they won't conflict with the global pool +@@ -228,10 +210,6 @@ static inline int MPIDI_CH3I_Win_op_free(MPIR_Win * win_ptr, MPIDI_RMA_Op_t * e) + + /* MPIDI_CH3I_Win_target_alloc(): get a target element from the target pool. + * If we cannot get one, return NULL. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_target_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline MPIDI_RMA_Target_t *MPIDI_CH3I_Win_target_alloc(MPIR_Win * win_ptr) + { + MPIDI_RMA_Target_t *e; +@@ -271,10 +249,6 @@ static inline MPIDI_RMA_Target_t *MPIDI_CH3I_Win_target_alloc(MPIR_Win * win_ptr + + /* MPIDI_CH3I_Win_target_free(): put a target element back to the target pool + * it belongs to. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_target_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_target_free(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * e) + { + int mpi_errno = MPI_SUCCESS; +@@ -297,10 +271,6 @@ static inline int MPIDI_CH3I_Win_target_free(MPIR_Win * win_ptr, MPIDI_RMA_Targe + + /* MPIDI_CH3I_Win_create_target(): given a rank, create + * corresponding target in RMA slots. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_create_target +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_create_target(MPIR_Win * win_ptr, int target_rank, + MPIDI_RMA_Target_t ** e) + { +@@ -333,10 +303,6 @@ static inline int MPIDI_CH3I_Win_create_target(MPIR_Win * win_ptr, int target_ra + + /* MPIDI_CH3I_Win_find_target(): given a rank, find + * corresponding target in RMA slots. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_find_target +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_find_target(MPIR_Win * win_ptr, int target_rank, + MPIDI_RMA_Target_t ** e) + { +@@ -364,10 +330,6 @@ static inline int MPIDI_CH3I_Win_find_target(MPIR_Win * win_ptr, int target_rank + /* MPIDI_CH3I_Win_enqueue_op(): given an operation, enqueue it to the + * corresponding operation lists in corresponding target element. This + * routines is only called from operation routines. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_enqueue_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_enqueue_op(MPIR_Win * win_ptr, MPIDI_RMA_Op_t * op) + { + int mpi_errno = MPI_SUCCESS; +@@ -446,10 +408,6 @@ static inline int MPIDI_CH3I_Win_enqueue_op(MPIR_Win * win_ptr, MPIDI_RMA_Op_t * + + /* MPIDI_CH3I_Win_target_dequeue_and_free(): dequeue and free + * the target in RMA slots. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_target_dequeue_and_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_target_dequeue_and_free(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * e) + { + int mpi_errno = MPI_SUCCESS; +@@ -470,10 +428,6 @@ static inline int MPIDI_CH3I_Win_target_dequeue_and_free(MPIR_Win * win_ptr, MPI + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_RMA_Cleanup_targets_win +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_RMA_Cleanup_targets_win(MPIR_Win * win_ptr) + { + MPIDI_RMA_Target_t *target = NULL, *next_target = NULL; +@@ -495,10 +449,6 @@ static inline int MPIDI_CH3I_RMA_Cleanup_targets_win(MPIR_Win * win_ptr) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Win_get_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Win_get_op(MPIR_Win * win_ptr, MPIDI_RMA_Op_t ** e) + { + MPIDI_RMA_Op_t *new_ptr = NULL; +@@ -530,10 +480,6 @@ static inline int MPIDI_CH3I_Win_get_op(MPIR_Win * win_ptr, MPIDI_RMA_Op_t ** e) + * @param IN list Pointer to the RMA ops list + * @param IN curr_ptr Pointer to the element to be freed. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_RMA_Ops_free_elem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPIDI_CH3I_RMA_Ops_free_elem(MPIR_Win * win_ptr, MPIDI_RMA_Ops_list_t * list, + MPIDI_RMA_Op_t * curr_ptr) + { +--- a/src/mpid/ch3/include/mpid_rma_shm.h ++++ b/src/mpid/ch3/include/mpid_rma_shm.h +@@ -12,7 +12,8 @@ + + static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datatype source_dtp, + void *target_buf, int target_count, MPI_Datatype target_dtp, +- MPI_Aint stream_offset, MPI_Op acc_op); ++ MPI_Aint stream_offset, MPI_Op acc_op, ++ MPIDI_RMA_Acc_srcbuf_kind_t srckind); + + #define ASSIGN_COPY(src, dest, count, type) \ + { \ +@@ -247,10 +248,6 @@ static inline int shm_copy(const void *src, int scount, MPI_Datatype stype, + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Shm_put_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Shm_put_op(const void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, +@@ -290,10 +287,6 @@ static inline int MPIDI_CH3I_Shm_put_op(const void *origin_addr, int origin_coun + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Shm_acc_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPI_Op op, +@@ -331,7 +324,8 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun + } + mpi_errno = do_accumulate_op((void *) origin_addr, origin_count, origin_datatype, + (void *) ((char *) base + disp_unit * target_disp), +- target_count, target_datatype, 0, op); ++ target_count, target_datatype, 0, op, ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT); + if (shm_op) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); + } +@@ -360,10 +354,7 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun + + rest_len = total_len; + for (i = 0; i < stream_unit_count; i++) { +- MPIR_Segment *seg = NULL; + void *packed_buf = NULL; +- MPI_Aint first, last; +- int is_predef_contig; + MPI_Aint stream_offset, stream_size, stream_count; + + stream_offset = i * stream_elem_count * predefined_dtp_size; +@@ -371,29 +362,12 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun + stream_count = stream_size / predefined_dtp_size; + rest_len -= stream_size; + +- first = stream_offset; +- last = stream_offset + stream_size; +- + packed_buf = MPL_malloc(stream_size, MPL_MEM_BUFFER); + +- seg = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment"); +- MPIR_Segment_init(origin_addr, origin_count, origin_datatype, seg); +- MPIR_Segment_pack(seg, first, &last, packed_buf); +- MPIR_Segment_free(seg); +- +- MPIR_Datatype_is_contig(basic_type, &is_predef_contig); +- +- if (!is_predef_contig) { +- void *tmpbuf = MPL_malloc(stream_count * predefined_dtp_extent, MPL_MEM_BUFFER); +- mpi_errno = MPIR_Localcopy(tmpbuf, stream_count, basic_type, +- packed_buf, stream_size, MPI_BYTE); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- MPL_free(packed_buf); +- packed_buf = tmpbuf; +- } ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(origin_addr, origin_count, origin_datatype, ++ stream_offset, packed_buf, stream_size, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes == stream_size); + + if (shm_op) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); +@@ -402,7 +376,8 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun + MPIR_Assert(stream_count == (int) stream_count); + mpi_errno = do_accumulate_op((void *) packed_buf, (int) stream_count, basic_type, + (void *) ((char *) base + disp_unit * target_disp), +- target_count, target_datatype, stream_offset, op); ++ target_count, target_datatype, stream_offset, op, ++ MPIDI_RMA_ACC_SRCBUF_PACKED); + + if (shm_op) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); +@@ -424,10 +399,6 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Shm_get_acc_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, void *result_addr, int result_count, + MPI_Datatype result_datatype, int target_rank, MPI_Aint +@@ -478,7 +449,8 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_ + + mpi_errno = do_accumulate_op((void *) origin_addr, origin_count, origin_datatype, + (void *) ((char *) base + disp_unit * target_disp), +- target_count, target_datatype, 0, op); ++ target_count, target_datatype, 0, op, ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT); + if (shm_locked) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); + } +@@ -507,10 +479,7 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_ + + rest_len = total_len; + for (i = 0; i < stream_unit_count; i++) { +- MPIR_Segment *seg = NULL; + void *packed_buf = NULL; +- MPI_Aint first, last; +- int is_predef_contig; + MPI_Aint stream_offset, stream_size, stream_count; + + stream_offset = i * stream_elem_count * predefined_dtp_size; +@@ -518,34 +487,18 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_ + stream_count = stream_size / predefined_dtp_size; + rest_len -= stream_size; + +- first = stream_offset; +- last = stream_offset + stream_size; +- + packed_buf = MPL_malloc(stream_size, MPL_MEM_BUFFER); + +- seg = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment"); +- MPIR_Segment_init(origin_addr, origin_count, origin_datatype, seg); +- MPIR_Segment_pack(seg, first, &last, packed_buf); +- MPIR_Segment_free(seg); +- +- MPIR_Datatype_is_contig(basic_type, &is_predef_contig); +- +- if (!is_predef_contig) { +- void *tmpbuf = MPL_malloc(stream_count * predefined_dtp_extent, MPL_MEM_BUFFER); +- mpi_errno = MPIR_Localcopy(tmpbuf, stream_count, basic_type, +- packed_buf, stream_size, MPI_BYTE); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- MPL_free(packed_buf); +- packed_buf = tmpbuf; +- } ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(origin_addr, origin_count, origin_datatype, ++ stream_offset, packed_buf, stream_size, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes == stream_size); + + MPIR_Assert(stream_count == (int) stream_count); + mpi_errno = do_accumulate_op((void *) packed_buf, (int) stream_count, basic_type, + (void *) ((char *) base + disp_unit * target_disp), +- target_count, target_datatype, stream_offset, op); ++ target_count, target_datatype, stream_offset, op, ++ MPIDI_RMA_ACC_SRCBUF_PACKED); + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); +@@ -571,10 +524,6 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_ + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Shm_get_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Shm_get_op(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -614,10 +563,6 @@ static inline int MPIDI_CH3I_Shm_get_op(void *origin_addr, int origin_count, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Shm_cas_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Shm_cas_op(const void *origin_addr, const void *compare_addr, + void *result_addr, MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp, MPIR_Win * win_ptr) +@@ -672,10 +617,6 @@ static inline int MPIDI_CH3I_Shm_cas_op(const void *origin_addr, const void *com + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Shm_fop_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Shm_fop_op(const void *origin_addr, void *result_addr, + MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp, MPI_Op op, MPIR_Win * win_ptr) +--- a/src/mpid/ch3/include/mpid_rma_types.h ++++ b/src/mpid/ch3/include/mpid_rma_types.h +@@ -28,6 +28,11 @@ typedef enum MPIDI_RMA_Pool_type { + MPIDI_RMA_POOL_GLOBAL = 7 + } MPIDI_RMA_Pool_type_t; + ++typedef enum MPIDI_RMA_Acc_srcbuf_kind { ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT, ++ MPIDI_RMA_ACC_SRCBUF_PACKED ++} MPIDI_RMA_Acc_srcbuf_kind_t; ++ + /* for keeping track of RMA ops, which will be executed at the next sync call */ + typedef struct MPIDI_RMA_Op { + struct MPIDI_RMA_Op *next; /* pointer to next element in list */ +--- a/src/mpid/ch3/include/mpid_thread.h ++++ b/src/mpid/ch3/include/mpid_thread.h +@@ -33,7 +33,7 @@ typedef MPIDU_Thread_func_t MPID_Thread_func_t; + + #define MPID_Thread_mutex_create MPIDU_Thread_mutex_create + #define MPID_Thread_mutex_destroy MPIDU_Thread_mutex_destroy +-#define MPID_Thread_mutex_lock MPIDU_Thread_mutex_lock ++#define MPID_Thread_mutex_lock(mutex, err) MPIDU_Thread_mutex_lock(mutex, err, MPL_THREAD_PRIO_HIGH) + #define MPID_Thread_mutex_unlock MPIDU_Thread_mutex_unlock + + #define MPID_Thread_cond_create MPIDU_Thread_cond_create +deleted file mode 100644 +--- a/src/mpid/ch3/include/mpidftb.h ++++ /dev/null +@@ -1,34 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#ifndef MPIDFTB_H_INCLUDED +-#define MPIDFTB_H_INCLUDED +- +-/* FTB events we can throw */ +-#define MPIDU_FTB_EV_OTHER "FTB_MPICH_OTHER" +-#define MPIDU_FTB_EV_RESOURCES "FTB_MPICH_RESOURCES" +-#define MPIDU_FTB_EV_UNREACHABLE "FTB_MPI_PROCS_UNREACHABLE" +-#define MPIDU_FTB_EV_COMMUNICATION "FTB_MPI_PROCS_COMM_ERROR" +-#define MPIDU_FTB_EV_ABORT "FTB_MPI_PROCS_ABORTED" +- +-#ifdef ENABLE_FTB +-struct MPIDI_VC; +- +-/* prototypes */ +-int MPIDU_Ftb_init(void); +-void MPIDU_Ftb_publish(const char *event_name, const char *event_payload); +-void MPIDU_Ftb_publish_vc(const char *event_name, struct MPIDI_VC *vc); +-void MPIDU_Ftb_publish_me(const char *event_name); +-void MPIDU_Ftb_finalize(void); +-#else /* ENABLE_FTB */ +-#define MPIDU_Ftb_init() (MPI_SUCCESS) +-#define MPIDU_Ftb_publish(event_name, event_payload) do {} while(0) +-#define MPIDU_Ftb_publish_vc(event_name, vc) do {} while(0) +-#define MPIDU_Ftb_publish_me(event_name) do {} while(0) +-#define MPIDU_Ftb_finalize() do {} while(0) +-#endif /* ENABLE_FTB */ +- +-#endif /* MPIDFTB_H_INCLUDED */ +--- a/src/mpid/ch3/include/mpidimpl.h ++++ b/src/mpid/ch3/include/mpidimpl.h +@@ -21,8 +21,6 @@ + + #include "mpiimpl.h" + +-#include "mpidftb.h" +- + /* Add the ch3 packet definitions */ + #include "mpidpkt.h" + +@@ -727,9 +725,13 @@ typedef struct MPIDI_VC + /* noncontiguous send function pointer. Called to send a + noncontiguous message. Caller must initialize + sreq->dev.segment, _first and _size. Contiguous messages are +- called directly from CH3 and cannot be overridden. */ ++ called directly from CH3 and cannot be overridden. ++ The optional hdr_iov and n_hdr_iov input parameters are used for ++ variable-length extended header, specify NULL and zero if unused. ++ n_hdr_iov should not exceed MPL_IOV_LIMIT - 2 (one for header and one ++ for packed data).*/ + int (* sendNoncontig_fn)( struct MPIDI_VC *vc, struct MPIR_Request *sreq, +- void *header, intptr_t hdr_sz ); ++ void *header, intptr_t hdr_sz, MPL_IOV *hdr_iov, int n_hdr_iov); + + #ifdef ENABLE_COMM_OVERRIDES + MPIDI_Comm_ops_t *comm_ops; +@@ -876,7 +878,6 @@ extern MPIDI_CH3U_SRBuf_element_t * MPIDI_CH3U_SRBuf_pool; + #ifdef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS + #define MPIDI_CH3_VC_GetStateString( _c ) "none" + #else +-/* FIXME: This duplicates a value in util/sock/ch3usock.h */ + const char *MPIDI_CH3_VC_GetStateString(struct MPIDI_VC *); + const char *MPIDI_CH3_VC_SockGetStateString(struct MPIDI_VC *); + #endif +@@ -887,6 +888,9 @@ int MPIDI_PrintConnStr( const char *file, int line, + const char *label, const char *str ); + int MPIDI_PrintConnStrToFile( FILE *fd, const char *file, int line, + const char *label, const char *str ); ++ ++/* Defined and used in sock channel. */ ++const char * MPIDI_Conn_GetStateString(int state); + #endif + + /* These macros simplify and unify the debugging of changes in the +@@ -1768,7 +1772,7 @@ int MPIDI_CH3_PktPrint_EagerSyncAck( FILE *fp, MPIDI_CH3_Pkt_t *pkt ); + /* Routines to create packets (used in implementing MPI communications */ + int MPIDI_CH3_EagerNoncontigSend( MPIR_Request **, MPIDI_CH3_Pkt_type_t, + const void *, MPI_Aint, +- MPI_Datatype, intptr_t, int, int, MPIR_Comm *, ++ MPI_Datatype, int, int, MPIR_Comm *, + int ); + int MPIDI_CH3_EagerContigSend( MPIR_Request **, MPIDI_CH3_Pkt_type_t, + const void *, intptr_t, int, +@@ -1790,7 +1794,8 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPIR_Request **, const void *, int, + int MPIDI_CH3_EagerSyncZero(MPIR_Request **, int, int, MPIR_Comm *, int ); + + int MPIDI_CH3_SendNoncontig_iov( struct MPIDI_VC *vc, struct MPIR_Request *sreq, +- void *header, intptr_t hdr_sz ); ++ void *header, intptr_t hdr_sz, ++ MPL_IOV *hdr_iov, int n_hdr_iov); + + /* Routines to ack packets, called in the receive routines when a + message is matched */ +--- a/src/mpid/ch3/include/mpidpkt.h ++++ b/src/mpid/ch3/include/mpidpkt.h +@@ -132,7 +132,7 @@ typedef enum { + MPIDI_CH3_PKT_INVALID = -1 /* forces a signed enum to quash warnings */ + } MPIDI_CH3_Pkt_type_t; + +-/* These flags can be "OR'ed" together */ ++/* These pkt_flags can be "OR'ed" together */ + typedef enum { + MPIDI_CH3_PKT_FLAG_NONE = 0, + MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED = 1, +@@ -325,7 +325,7 @@ MPIDI_CH3_PKT_DEFS + + #define MPIDI_CH3_PKT_RMA_GET_FLAGS(pkt_, flags_, err_) \ + { \ +- /* This macro returns flags in RMA operation packets (PUT, GET, \ ++ /* This macro returns pkt_flags in RMA operation packets (PUT, GET, \ + ACC, GACC, FOP, CAS), RMA operation response packets \ + (GET_RESP, GET_ACCUM_RESP, FOP_RESP, CAS_RESP), RMA control \ + packets (UNLOCK) and RMA control response packets (LOCK_ACK, \ +@@ -334,52 +334,52 @@ MPIDI_CH3_PKT_DEFS + switch((pkt_).type) { \ + case (MPIDI_CH3_PKT_PUT): \ + case (MPIDI_CH3_PKT_PUT_IMMED): \ +- flags_ = (pkt_).put.flags; \ ++ flags_ = (pkt_).put.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_GET): \ +- flags_ = (pkt_).get.flags; \ ++ flags_ = (pkt_).get.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_ACCUMULATE): \ + case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ +- flags_ = (pkt_).accum.flags; \ ++ flags_ = (pkt_).accum.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_GET_ACCUM): \ + case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ +- flags_ = (pkt_).get_accum.flags; \ ++ flags_ = (pkt_).get_accum.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_CAS_IMMED): \ +- flags_ = (pkt_).cas.flags; \ ++ flags_ = (pkt_).cas.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_FOP): \ + case (MPIDI_CH3_PKT_FOP_IMMED): \ +- flags_ = (pkt_).fop.flags; \ ++ flags_ = (pkt_).fop.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_GET_RESP): \ + case (MPIDI_CH3_PKT_GET_RESP_IMMED): \ +- flags_ = (pkt_).get_resp.flags; \ ++ flags_ = (pkt_).get_resp.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_GET_ACCUM_RESP): \ + case (MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED): \ +- flags_ = (pkt_).get_accum_resp.flags; \ ++ flags_ = (pkt_).get_accum_resp.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_FOP_RESP): \ + case (MPIDI_CH3_PKT_FOP_RESP_IMMED): \ +- flags_ = (pkt_).fop_resp.flags; \ ++ flags_ = (pkt_).fop_resp.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_CAS_RESP_IMMED): \ +- flags_ = (pkt_).cas_resp.flags; \ ++ flags_ = (pkt_).cas_resp.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_LOCK): \ +- flags_ = (pkt_).lock.flags; \ ++ flags_ = (pkt_).lock.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_UNLOCK): \ +- flags_ = (pkt_).unlock.flags; \ ++ flags_ = (pkt_).unlock.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_LOCK_ACK): \ +- flags_ = (pkt_).lock_ack.flags; \ ++ flags_ = (pkt_).lock_ack.pkt_flags; \ + break; \ + case (MPIDI_CH3_PKT_LOCK_OP_ACK): \ +- flags_ = (pkt_).lock_op_ack.flags; \ ++ flags_ = (pkt_).lock_op_ack.pkt_flags; \ + break; \ + default: \ + MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ +@@ -411,7 +411,7 @@ MPIDI_CH3_PKT_DEFS + + #define MPIDI_CH3_PKT_RMA_ERASE_FLAGS(pkt_, err_) \ + { \ +- /* This macro erases flags in RMA operation packets (PUT, GET, \ ++ /* This macro erases pkt_flags in RMA operation packets (PUT, GET, \ + ACC, GACC, FOP, CAS), RMA operation response packets \ + (GET_RESP, GET_ACCUM_RESP, FOP_RESP, CAS_RESP), RMA control \ + packets (UNLOCK) and RMA control response packets (LOCK_ACK, \ +@@ -420,52 +420,52 @@ MPIDI_CH3_PKT_DEFS + switch((pkt_).type) { \ + case (MPIDI_CH3_PKT_PUT): \ + case (MPIDI_CH3_PKT_PUT_IMMED): \ +- (pkt_).put.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).put.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_GET): \ +- (pkt_).get.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).get.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_ACCUMULATE): \ + case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ +- (pkt_).accum.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).accum.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_GET_ACCUM): \ + case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ +- (pkt_).get_accum.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).get_accum.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_CAS_IMMED): \ +- (pkt_).cas.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).cas.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_FOP): \ + case (MPIDI_CH3_PKT_FOP_IMMED): \ +- (pkt_).fop.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).fop.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_GET_RESP): \ + case (MPIDI_CH3_PKT_GET_RESP_IMMED): \ +- (pkt_).get_resp.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).get_resp.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_GET_ACCUM_RESP): \ + case (MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED): \ +- (pkt_).get_accum_resp.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).get_accum_resp.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_FOP_RESP): \ + case (MPIDI_CH3_PKT_FOP_RESP_IMMED): \ +- (pkt_).fop_resp.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).fop_resp.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_CAS_RESP_IMMED): \ +- (pkt_).cas_resp.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).cas_resp.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_LOCK): \ +- (pkt_).lock.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).lock.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_UNLOCK): \ +- (pkt_).unlock.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).unlock.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_LOCK_ACK): \ +- (pkt_).lock_ack.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).lock_ack.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + case (MPIDI_CH3_PKT_LOCK_OP_ACK): \ +- (pkt_).lock_op_ack.flags = MPIDI_CH3_PKT_FLAG_NONE; \ ++ (pkt_).lock_op_ack.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; \ + break; \ + default: \ + MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ +@@ -558,29 +558,6 @@ MPIDI_CH3_PKT_DEFS + } \ + } + +-#define MPIDI_CH3_PKT_RMA_SET_DATALOOP_SIZE(pkt_, dataloop_size_, err_) \ +- { \ +- /* This macro sets dataloop_size in RMA operation packets \ +- (PUT, GET, ACC, GACC) */ \ +- err_ = MPI_SUCCESS; \ +- switch((pkt_).type) { \ +- case (MPIDI_CH3_PKT_PUT): \ +- (pkt_).put.info.dataloop_size = (dataloop_size_); \ +- break; \ +- case (MPIDI_CH3_PKT_GET): \ +- (pkt_).get.info.dataloop_size = (dataloop_size_); \ +- break; \ +- case (MPIDI_CH3_PKT_ACCUMULATE): \ +- (pkt_).accum.info.dataloop_size = (dataloop_size_); \ +- break; \ +- case (MPIDI_CH3_PKT_GET_ACCUM): \ +- (pkt_).get_accum.info.dataloop_size = (dataloop_size_); \ +- break; \ +- default: \ +- MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ +- } \ +- } +- + #define MPIDI_CH3_PKT_RMA_GET_REQUEST_HANDLE(pkt_, request_hdl_, err_) \ + { \ + err_ = MPI_SUCCESS; \ +@@ -650,26 +627,26 @@ MPIDI_CH3_PKT_DEFS + + typedef struct MPIDI_CH3_Pkt_put { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + void *addr; + int count; + MPI_Datatype datatype; + MPI_Win target_win_handle; + MPI_Win source_win_handle; + union { +- int dataloop_size; ++ int flattened_type_size; + MPIDI_CH3_RMA_Immed_u data; + } info; + } MPIDI_CH3_Pkt_put_t; + + typedef struct MPIDI_CH3_Pkt_get { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + void *addr; + int count; + MPI_Datatype datatype; + struct { +- int dataloop_size; /* for derived datatypes */ ++ int flattened_type_size; + } info; + MPI_Request request_handle; + MPI_Win target_win_handle; +@@ -680,7 +657,7 @@ typedef struct MPIDI_CH3_Pkt_get_resp { + MPI_Request request_handle; + /* followings are used to decrement ack_counter at origin */ + int target_rank; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + /* Followings are to piggyback IMMED data */ + struct { + /* note that we use struct here in order +@@ -692,7 +669,7 @@ typedef struct MPIDI_CH3_Pkt_get_resp { + + typedef struct MPIDI_CH3_Pkt_accum { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + void *addr; + int count; + MPI_Datatype datatype; +@@ -700,14 +677,14 @@ typedef struct MPIDI_CH3_Pkt_accum { + MPI_Win target_win_handle; + MPI_Win source_win_handle; + union { +- int dataloop_size; ++ int flattened_type_size; + MPIDI_CH3_RMA_Immed_u data; + } info; + } MPIDI_CH3_Pkt_accum_t; + + typedef struct MPIDI_CH3_Pkt_get_accum { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + MPI_Request request_handle; /* For get_accumulate response */ + void *addr; + int count; +@@ -715,7 +692,7 @@ typedef struct MPIDI_CH3_Pkt_get_accum { + MPI_Op op; + MPI_Win target_win_handle; + union { +- int dataloop_size; ++ int flattened_type_size; + MPIDI_CH3_RMA_Immed_u data; + } info; + } MPIDI_CH3_Pkt_get_accum_t; +@@ -725,7 +702,7 @@ typedef struct MPIDI_CH3_Pkt_get_accum_resp { + MPI_Request request_handle; + /* followings are used to decrement ack_counter at origin */ + int target_rank; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + /* Followings are to piggyback IMMED data */ + struct { + /* note that we use struct here in order +@@ -737,7 +714,7 @@ typedef struct MPIDI_CH3_Pkt_get_accum_resp { + + typedef struct MPIDI_CH3_Pkt_cas { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + MPI_Datatype datatype; + void *addr; + MPI_Request request_handle; +@@ -757,12 +734,12 @@ typedef struct MPIDI_CH3_Pkt_cas_resp { + } info; + /* followings are used to decrement ack_counter at orign */ + int target_rank; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + } MPIDI_CH3_Pkt_cas_resp_t; + + typedef struct MPIDI_CH3_Pkt_fop { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + MPI_Datatype datatype; + void *addr; + MPI_Op op; +@@ -787,12 +764,12 @@ typedef struct MPIDI_CH3_Pkt_fop_resp { + } info; + /* followings are used to decrement ack_counter at orign */ + int target_rank; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + } MPIDI_CH3_Pkt_fop_resp_t; + + typedef struct MPIDI_CH3_Pkt_lock { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + MPI_Win target_win_handle; + /* Note that either source_win_handle + * or request_handle will be used. Here +@@ -808,7 +785,7 @@ typedef struct MPIDI_CH3_Pkt_unlock { + MPIDI_CH3_Pkt_type_t type; + MPI_Win target_win_handle; + MPI_Win source_win_handle; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + } MPIDI_CH3_Pkt_unlock_t; + + typedef struct MPIDI_CH3_Pkt_flush { +@@ -819,7 +796,7 @@ typedef struct MPIDI_CH3_Pkt_flush { + + typedef struct MPIDI_CH3_Pkt_lock_ack { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + /* note that either source_win_handle + * or request_handle is used. */ + MPI_Win source_win_handle; +@@ -829,7 +806,7 @@ typedef struct MPIDI_CH3_Pkt_lock_ack { + + typedef struct MPIDI_CH3_Pkt_lock_op_ack { + MPIDI_CH3_Pkt_type_t type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + /* note that either source_win_handle + * or request_handle is used. */ + MPI_Win source_win_handle; +@@ -844,14 +821,14 @@ typedef struct MPIDI_CH3_Pkt_ack { + MPIDI_CH3_Pkt_type_t type; + MPI_Win source_win_handle; + int target_rank; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + } MPIDI_CH3_Pkt_ack_t; + + typedef struct MPIDI_CH3_Pkt_decr_at_counter { + MPIDI_CH3_Pkt_type_t type; + MPI_Win target_win_handle; + MPI_Win source_win_handle; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + } MPIDI_CH3_Pkt_decr_at_counter_t; + + typedef struct MPIDI_CH3_Pkt_close { +@@ -918,59 +895,10 @@ typedef union MPIDI_CH3_Pkt { + + /* Extended header packet types */ + +-/* to send derived datatype across in RMA ops */ +-typedef struct MPIDI_RMA_dtype_info { /* for derived datatypes */ +- int is_contig; +- MPI_Aint max_contig_blocks; +- MPI_Aint size; +- MPI_Aint extent; +- MPI_Aint dataloop_size; /* not needed because this info is sent in +- * packet header. remove it after lock/unlock +- * is implemented in the device */ +- void *dataloop; /* pointer needed to update pointers +- * within dataloop on remote side */ +- int dataloop_depth; +- int basic_type; +- MPI_Aint ub, lb, true_ub, true_lb; +- int has_sticky_ub, has_sticky_lb; +-} MPIDI_RMA_dtype_info; +- + typedef struct MPIDI_CH3_Ext_pkt_stream { + MPI_Aint stream_offset; + } MPIDI_CH3_Ext_pkt_stream_t; + +-typedef struct MPIDI_CH3_Ext_pkt_derived { +- MPIDI_RMA_dtype_info dtype_info; +- /* Follow with variable-length dataloop. +- * On origin we allocate a large buffer including +- * this header and the dataloop; on target we use +- * separate buffer to receive dataloop in order +- * to avoid extra copy.*/ +-} MPIDI_CH3_Ext_pkt_derived_t; +- +-typedef struct MPIDI_CH3_Ext_pkt_stream_derived { +- MPI_Aint stream_offset; +- MPIDI_RMA_dtype_info dtype_info; +- /* follow with variable-length dataloop. */ +-} MPIDI_CH3_Ext_pkt_stream_derived_t; +- +-/* Note that since ACC and GET_ACC contain the same extended attributes, +- * we use generic routines for them in some places (see below). +- * If we add OP-specific attribute in future, we should handle them separately. +- * 1. origin issuing function +- * 2. target packet handler +- * 3. target data receive complete handler. */ +-typedef MPIDI_CH3_Ext_pkt_stream_t MPIDI_CH3_Ext_pkt_accum_stream_t; +-typedef MPIDI_CH3_Ext_pkt_derived_t MPIDI_CH3_Ext_pkt_accum_derived_t; +-typedef MPIDI_CH3_Ext_pkt_stream_derived_t MPIDI_CH3_Ext_pkt_accum_stream_derived_t; +- +-typedef MPIDI_CH3_Ext_pkt_stream_t MPIDI_CH3_Ext_pkt_get_accum_stream_t; +-typedef MPIDI_CH3_Ext_pkt_derived_t MPIDI_CH3_Ext_pkt_get_accum_derived_t; +-typedef MPIDI_CH3_Ext_pkt_stream_derived_t MPIDI_CH3_Ext_pkt_get_accum_stream_derived_t; +- +-typedef MPIDI_CH3_Ext_pkt_derived_t MPIDI_CH3_Ext_pkt_put_derived_t; +-typedef MPIDI_CH3_Ext_pkt_derived_t MPIDI_CH3_Ext_pkt_get_derived_t; +- + #if defined(MPID_USE_SEQUENCE_NUMBERS) + typedef struct MPIDI_CH3_Pkt_send_container { + MPIDI_CH3_Pkt_send_t pkt; +--- a/src/mpid/ch3/include/mpidpost.h ++++ b/src/mpid/ch3/include/mpidpost.h +@@ -162,6 +162,7 @@ int MPIDI_CH3_Comm_connect(char * port_name, int root, MPIR_Comm * comm_ptr, + * Device level request management macros + */ + ++#define MPID_Prequest_free_hook(req_) do {} while(0) + + /* + * Device level progress engine macros +--- a/src/mpid/ch3/include/mpidpre.h ++++ b/src/mpid/ch3/include/mpidpre.h +@@ -383,13 +383,11 @@ typedef struct MPIDI_Request { + MPI_Datatype datatype; + int drop_data; + +- /* segment, segment_first, and segment_size are used when processing ++ /* msg_offset, and msgsize are used when processing + non-contiguous datatypes */ +- /* MPIR_Segment segment; */ +- struct MPIR_Segment *segment_ptr; +- intptr_t segment_first; +- intptr_t segment_size; +- intptr_t orig_segment_first; ++ intptr_t msg_offset; ++ intptr_t msgsize; ++ intptr_t orig_msg_offset; + + /* Pointer to datatype for reference counting purposes */ + struct MPIR_Datatype* datatype_ptr; +@@ -444,13 +442,13 @@ typedef struct MPIDI_Request { + /* For accumulate, since data is first read into a tmp_buf */ + void *real_user_buf; + /* For derived datatypes at target. */ +- void *dataloop; ++ void *flattened_type; + /* req. handle needed to implement derived datatype gets. + * It also used for remembering user request of request-based RMA operations. */ + MPI_Request request_handle; + MPI_Win target_win_handle; + MPI_Win source_win_handle; +- MPIDI_CH3_Pkt_flags_t flags; /* flags that were included in the original RMA packet header */ ++ int pkt_flags; /* pkt_flags that were included in the original RMA packet header */ + struct MPIDI_RMA_Target_lock_entry *target_lock_queue_entry; + MPI_Request resp_request_handle; /* Handle for get_accumulate response */ + +@@ -735,4 +733,9 @@ int MPID_Free_mem( void *ptr ); + int MPID_Get_node_id(MPIR_Comm *comm, int rank, int *id_p); + int MPID_Get_max_node_id(MPIR_Comm *comm, int *max_id_p); + ++int MPID_Type_commit_hook(MPIR_Datatype * type); ++int MPID_Type_free_hook(MPIR_Datatype * type); ++int MPID_Op_commit_hook(MPIR_Op * op); ++int MPID_Op_free_hook(MPIR_Op * op); ++ + #endif /* MPIDPRE_H_INCLUDED */ +--- a/src/mpid/ch3/include/mpidrma.h ++++ b/src/mpid/ch3/include/mpidrma.h +@@ -13,10 +13,6 @@ + #include "mpid_rma_issue.h" + #include "mpid_rma_lockqueue.h" + +-#undef FUNCNAME +-#define FUNCNAME send_lock_msg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int send_lock_msg(int dest, int lock_type, MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -33,12 +29,12 @@ static inline int send_lock_msg(int dest, int lock_type, MPIR_Win * win_ptr) + lock_pkt->target_win_handle = win_ptr->basic_info_table[dest].win_handle; + lock_pkt->source_win_handle = win_ptr->handle; + lock_pkt->request_handle = MPI_REQUEST_NULL; +- lock_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; ++ lock_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + if (lock_type == MPI_LOCK_SHARED) +- lock_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; ++ lock_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; + else { + MPIR_Assert(lock_type == MPI_LOCK_EXCLUSIVE); +- lock_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; ++ lock_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; + } + + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); +@@ -60,11 +56,7 @@ static inline int send_lock_msg(int dest, int lock_type, MPIR_Win * win_ptr) + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME send_unlock_msg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int send_unlock_msg(int dest, MPIR_Win * win_ptr, MPIDI_CH3_Pkt_flags_t flags) ++static inline int send_unlock_msg(int dest, MPIR_Win * win_ptr, int pkt_flags) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_CH3_Pkt_t upkt; +@@ -82,7 +74,7 @@ static inline int send_unlock_msg(int dest, MPIR_Win * win_ptr, MPIDI_CH3_Pkt_fl + MPIDI_Pkt_init(unlock_pkt, MPIDI_CH3_PKT_UNLOCK); + unlock_pkt->target_win_handle = win_ptr->basic_info_table[dest].win_handle; + unlock_pkt->source_win_handle = win_ptr->handle; +- unlock_pkt->flags = flags; ++ unlock_pkt->pkt_flags = pkt_flags; + + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); + mpi_errno = MPIDI_CH3_iStartMsg(vc, unlock_pkt, sizeof(*unlock_pkt), &req); +@@ -104,12 +96,8 @@ static inline int send_unlock_msg(int dest, MPIR_Win * win_ptr, MPIDI_CH3_Pkt_fl + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Send_lock_ack_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Send_lock_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_ptr, +- MPIDI_CH3_Pkt_flags_t flags, ++ int pkt_flags, + MPI_Win source_win_handle, + MPI_Request request_handle) + { +@@ -128,7 +116,7 @@ static inline int MPIDI_CH3I_Send_lock_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_p + lock_ack_pkt->source_win_handle = source_win_handle; + lock_ack_pkt->request_handle = request_handle; + lock_ack_pkt->target_rank = win_ptr->comm_ptr->rank; +- lock_ack_pkt->flags = flags; ++ lock_ack_pkt->pkt_flags = pkt_flags; + + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, VERBOSE, + (MPL_DBG_FDEST, "sending lock ack pkt on vc=%p, source_win_handle=%#08x", +@@ -151,12 +139,8 @@ static inline int MPIDI_CH3I_Send_lock_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_p + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Send_lock_op_ack_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Send_lock_op_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_ptr, +- MPIDI_CH3_Pkt_flags_t flags, ++ int pkt_flags, + MPI_Win source_win_handle, + MPI_Request request_handle) + { +@@ -175,7 +159,7 @@ static inline int MPIDI_CH3I_Send_lock_op_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * wi + lock_op_ack_pkt->source_win_handle = source_win_handle; + lock_op_ack_pkt->request_handle = request_handle; + lock_op_ack_pkt->target_rank = win_ptr->comm_ptr->rank; +- lock_op_ack_pkt->flags = flags; ++ lock_op_ack_pkt->pkt_flags = pkt_flags; + + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, VERBOSE, + (MPL_DBG_FDEST, "sending lock op ack pkt on vc=%p, source_win_handle=%#08x", +@@ -198,10 +182,6 @@ static inline int MPIDI_CH3I_Send_lock_op_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * wi + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Send_ack_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_Send_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_ptr, + MPI_Win source_win_handle) + { +@@ -235,11 +215,7 @@ static inline int MPIDI_CH3I_Send_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_ptr, + } + + +-#undef FUNCNAME +-#define FUNCNAME send_decr_at_cnt_msg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int send_decr_at_cnt_msg(int dst, MPIR_Win * win_ptr, MPIDI_CH3_Pkt_flags_t flags) ++static inline int send_decr_at_cnt_msg(int dst, MPIR_Win * win_ptr, int pkt_flags) + { + MPIDI_CH3_Pkt_t upkt; + MPIDI_CH3_Pkt_decr_at_counter_t *decr_at_cnt_pkt = &upkt.decr_at_cnt; +@@ -252,7 +228,7 @@ static inline int send_decr_at_cnt_msg(int dst, MPIR_Win * win_ptr, MPIDI_CH3_Pk + MPIDI_Pkt_init(decr_at_cnt_pkt, MPIDI_CH3_PKT_DECR_AT_COUNTER); + decr_at_cnt_pkt->target_win_handle = win_ptr->basic_info_table[dst].win_handle; + decr_at_cnt_pkt->source_win_handle = win_ptr->handle; +- decr_at_cnt_pkt->flags = flags; ++ decr_at_cnt_pkt->pkt_flags = pkt_flags; + + MPIDI_Comm_get_vc_set_active(win_ptr->comm_ptr, dst, &vc); + +@@ -277,10 +253,6 @@ static inline int send_decr_at_cnt_msg(int dst, MPIR_Win * win_ptr, MPIDI_CH3_Pk + } + + +-#undef FUNCNAME +-#define FUNCNAME send_flush_msg +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int send_flush_msg(int dest, MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -323,7 +295,7 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + intptr_t * buflen, MPIR_Request ** reqp) + { + MPIDI_RMA_Target_lock_entry_t *new_ptr = NULL; +- MPIDI_CH3_Pkt_flags_t flag; ++ int flag; + MPI_Win source_win_handle; + MPI_Request request_handle; + int lock_discarded = 0, data_discarded = 0; +@@ -362,13 +334,13 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + int target_count; + int complete = 0; + intptr_t data_len; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + + /* This is PUT, ACC, GACC, FOP */ + + MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE((*pkt), target_dtp, mpi_errno); + MPIDI_CH3_PKT_RMA_GET_TARGET_COUNT((*pkt), target_count, mpi_errno); +- MPIDI_CH3_PKT_RMA_GET_FLAGS((*pkt), flags, mpi_errno); ++ MPIDI_CH3_PKT_RMA_GET_FLAGS((*pkt), pkt_flags, mpi_errno); + + MPIR_Datatype_get_extent_macro(target_dtp, type_extent); + MPIR_Datatype_get_size_macro(target_dtp, type_size); +@@ -391,20 +363,12 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + } + } + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { + MPIR_Assert(pkt->type == MPIDI_CH3_PKT_ACCUMULATE || + pkt->type == MPIDI_CH3_PKT_GET_ACCUM); + +- /* Only basic datatype may contain piggyback lock. +- * Thus we do not check extended header type for derived case.*/ +- if (pkt->type == MPIDI_CH3_PKT_ACCUMULATE) { +- recv_data_sz += sizeof(MPIDI_CH3_Ext_pkt_accum_stream_t); +- buf_size += sizeof(MPIDI_CH3_Ext_pkt_accum_stream_t); +- } +- else { +- recv_data_sz += sizeof(MPIDI_CH3_Ext_pkt_get_accum_stream_t); +- buf_size += sizeof(MPIDI_CH3_Ext_pkt_get_accum_stream_t); +- } ++ recv_data_sz += sizeof(MPIDI_CH3_Ext_pkt_stream_t); ++ buf_size += sizeof(MPIDI_CH3_Ext_pkt_stream_t); + } + + if (new_ptr != NULL) { +@@ -439,7 +403,7 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + lock_pkt->target_win_handle = target_win_handle; + lock_pkt->source_win_handle = source_win_handle; + lock_pkt->request_handle = request_handle; +- lock_pkt->flags = flags; ++ lock_pkt->pkt_flags = pkt_flags; + + /* replace original pkt with lock pkt */ + new_ptr->pkt = new_pkt; +@@ -548,7 +512,7 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + } + + +-static inline int handle_lock_ack(MPIR_Win * win_ptr, int target_rank, MPIDI_CH3_Pkt_flags_t flags) ++static inline int handle_lock_ack(MPIR_Win * win_ptr, int target_rank, int pkt_flags) + { + MPIDI_RMA_Target_t *t = NULL; + int mpi_errno = MPI_SUCCESS; +@@ -563,11 +527,11 @@ static inline int handle_lock_ack(MPIR_Win * win_ptr, int target_rank, MPIDI_CH3 + MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc); + if (win_ptr->comm_ptr->rank == target_rank || + (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) { +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { + win_ptr->outstanding_locks--; + MPIR_Assert(win_ptr->outstanding_locks >= 0); + } +- else if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED) { ++ else if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED) { + /* re-send lock request message. */ + mpi_errno = send_lock_msg(target_rank, MPI_LOCK_SHARED, win_ptr); + if (mpi_errno != MPI_SUCCESS) +@@ -577,7 +541,7 @@ static inline int handle_lock_ack(MPIR_Win * win_ptr, int target_rank, MPIDI_CH3 + } + } + else if (win_ptr->states.access_state == MPIDI_RMA_LOCK_ALL_ISSUED) { +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { + win_ptr->outstanding_locks--; + MPIR_Assert(win_ptr->outstanding_locks >= 0); + if (win_ptr->outstanding_locks == 0) { +@@ -591,7 +555,7 @@ static inline int handle_lock_ack(MPIR_Win * win_ptr, int target_rank, MPIDI_CH3 + } + } + } +- else if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED) { ++ else if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED) { + /* re-send lock request message. */ + mpi_errno = send_lock_msg(target_rank, MPI_LOCK_SHARED, win_ptr); + if (mpi_errno != MPI_SUCCESS) +@@ -605,7 +569,7 @@ static inline int handle_lock_ack(MPIR_Win * win_ptr, int target_rank, MPIDI_CH3 + MPIR_ERR_POP(mpi_errno); + MPIR_Assert(t != NULL); + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { + t->access_state = MPIDI_RMA_LOCK_GRANTED; + if (t->pending_net_ops_list_head) + MPIDI_CH3I_Win_set_active(win_ptr); +@@ -623,7 +587,7 @@ static inline int handle_lock_ack(MPIR_Win * win_ptr, int target_rank, MPIDI_CH3 + } + } + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED) ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED) + t->access_state = MPIDI_RMA_LOCK_CALLED; + + fn_exit: +@@ -633,10 +597,6 @@ static inline int handle_lock_ack(MPIR_Win * win_ptr, int target_rank, MPIDI_CH3 + } + + +-#undef FUNCNAME +-#define FUNCNAME check_and_set_req_completion +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int check_and_set_req_completion(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target, + MPIDI_RMA_Op_t * rma_op, int *op_completed) + { +@@ -711,11 +671,11 @@ static inline int check_and_set_req_completion(MPIR_Win * win_ptr, MPIDI_RMA_Tar + + + static inline int handle_lock_ack_with_op(MPIR_Win * win_ptr, +- int target_rank, MPIDI_CH3_Pkt_flags_t flags) ++ int target_rank, int pkt_flags) + { + MPIDI_RMA_Target_t *target = NULL; + MPIDI_RMA_Op_t *op = NULL; +- MPIDI_CH3_Pkt_flags_t op_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ int op_flags = MPIDI_CH3_PKT_FLAG_NONE; + int op_completed ATTRIBUTE((unused)) = FALSE; + int mpi_errno = MPI_SUCCESS; + +@@ -733,7 +693,7 @@ static inline int handle_lock_ack_with_op(MPIR_Win * win_ptr, + MPIR_Assert(op_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || + op_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { + + if ((op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE || op->pkt.type == MPIDI_CH3_PKT_GET_ACCUM) + && op->issued_stream_count != ALL_STREAM_UNITS_ISSUED) { +@@ -759,10 +719,10 @@ static inline int handle_lock_ack_with_op(MPIR_Win * win_ptr, + + check_and_set_req_completion(win_ptr, target, op, &op_completed); + } +- else if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_QUEUED_DATA_DISCARDED || +- flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED) { ++ else if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_QUEUED_DATA_DISCARDED || ++ pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED) { + /* We need to re-transmit this operation, so we destroy +- * the internal request and erase all flags in current ++ * the internal request and erase all pkt_flags in current + * operation. */ + if (op->reqs_size == 1) { + MPIR_Assert(op->single_req != NULL); +@@ -790,10 +750,6 @@ static inline int handle_lock_ack_with_op(MPIR_Win * win_ptr, + } + + +-#undef FUNCNAME +-#define FUNCNAME acquire_local_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int acquire_local_lock(MPIR_Win * win_ptr, int lock_type) + { + int mpi_errno = MPI_SUCCESS; +@@ -818,12 +774,12 @@ static inline int acquire_local_lock(MPIR_Win * win_ptr, int lock_type) + (MPIDI_RMA_Target_lock_entry_t **) (&(win_ptr->target_lock_queue_head)); + + MPIDI_Pkt_init(lock_pkt, MPIDI_CH3_PKT_LOCK); +- lock_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; ++ lock_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + if (lock_type == MPI_LOCK_SHARED) +- lock_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; ++ lock_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; + else { + MPIR_Assert(lock_type == MPI_LOCK_EXCLUSIVE); +- lock_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; ++ lock_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; + } + + new_ptr = MPIDI_CH3I_Win_target_lock_entry_alloc(win_ptr, &pkt); +@@ -852,10 +808,6 @@ static inline int acquire_local_lock(MPIR_Win * win_ptr, int lock_type) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_RMA_Handle_ack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_CH3I_RMA_Handle_ack(MPIR_Win * win_ptr, int target_rank) + { + int mpi_errno = MPI_SUCCESS; +@@ -878,13 +830,10 @@ static inline int MPIDI_CH3I_RMA_Handle_ack(MPIR_Win * win_ptr, int target_rank) + } + + +-#undef FUNCNAME +-#define FUNCNAME do_accumulate_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datatype source_dtp, + void *target_buf, int target_count, MPI_Datatype target_dtp, +- MPI_Aint stream_offset, MPI_Op acc_op) ++ MPI_Aint stream_offset, MPI_Op acc_op, ++ MPIDI_RMA_Acc_srcbuf_kind_t srckind) + { + int mpi_errno = MPI_SUCCESS; + MPI_User_function *uop = NULL; +@@ -911,7 +860,7 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat + else { + /* --BEGIN ERROR HANDLING-- */ + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OP, ++ __func__, __LINE__, MPI_ERR_OP, + "**opnotpredefined", "**opnotpredefined %d", acc_op); + return mpi_errno; + /* --END ERROR HANDLING-- */ +@@ -936,47 +885,34 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat + } + else { + /* derived datatype */ +- MPIR_Segment *segp; +- DLOOP_VECTOR *dloop_vec; +- MPI_Aint first, last; ++ MPL_IOV *typerep_vec; + int vec_len, i, count; +- MPI_Aint type_extent, type_size; ++ MPI_Aint type_extent, type_size, src_type_stride; + MPI_Datatype type; + MPIR_Datatype*dtp; + MPI_Aint curr_len; + void *curr_loc; + int accumulated_count; + +- segp = MPIR_Segment_alloc(); +- /* --BEGIN ERROR HANDLING-- */ +- if (!segp) { +- mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_OTHER, "**nomem", 0); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_DO_ACCUMULATE_OP); +- return mpi_errno; +- } +- /* --END ERROR HANDLING-- */ +- MPIR_Segment_init(NULL, target_count, target_dtp, segp); +- first = stream_offset; +- last = first + source_count * source_dtp_size; +- + MPIR_Datatype_get_ptr(target_dtp, dtp); + vec_len = dtp->max_contig_blocks * target_count + 1; + /* +1 needed because Rob says so */ +- dloop_vec = (DLOOP_VECTOR *) +- MPL_malloc(vec_len * sizeof(DLOOP_VECTOR), MPL_MEM_DATATYPE); ++ typerep_vec = (MPL_IOV *) ++ MPL_malloc(vec_len * sizeof(MPL_IOV), MPL_MEM_DATATYPE); + /* --BEGIN ERROR HANDLING-- */ +- if (!dloop_vec) { ++ if (!typerep_vec) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**nomem", 0); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_DO_ACCUMULATE_OP); + return mpi_errno; + } + /* --END ERROR HANDLING-- */ + +- MPIR_Segment_pack_vector(segp, first, &last, dloop_vec, &vec_len); ++ int max_iov_len = vec_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(NULL, target_count, target_dtp, stream_offset, typerep_vec, max_iov_len, ++ source_count * source_dtp_size, &vec_len, &actual_iov_bytes); + + type = dtp->basic_type; + MPIR_Assert(type != MPI_DATATYPE_NULL); +@@ -984,29 +920,36 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat + MPIR_Assert(type == source_dtp); + type_size = source_dtp_size; + type_extent = source_dtp_extent; ++ /* If the source buffer has been packed by the caller, the distance between ++ * two elements can be smaller than extent. E.g., predefined pairtype may ++ * have larger extent than size.*/ ++ if (srckind == MPIDI_RMA_ACC_SRCBUF_PACKED) ++ src_type_stride = type_size; ++ else ++ src_type_stride = type_extent; + + i = 0; +- curr_loc = dloop_vec[0].DLOOP_VECTOR_BUF; +- curr_len = dloop_vec[0].DLOOP_VECTOR_LEN; ++ curr_loc = typerep_vec[0].MPL_IOV_BUF; ++ curr_len = typerep_vec[0].MPL_IOV_LEN; + accumulated_count = 0; + while (i != vec_len) { + if (curr_len < type_size) { + MPIR_Assert(i != vec_len); + i++; +- curr_len += dloop_vec[i].DLOOP_VECTOR_LEN; ++ curr_len += typerep_vec[i].MPL_IOV_LEN; + continue; + } + + MPIR_Assign_trunc(count, curr_len / type_size, int); + +- (*uop) ((char *) source_buf + type_extent * accumulated_count, ++ (*uop) ((char *) source_buf + src_type_stride * accumulated_count, + (char *) target_buf + MPIR_Ptr_to_aint(curr_loc), &count, &type); + + if (curr_len % type_size == 0) { + i++; + if (i != vec_len) { +- curr_loc = dloop_vec[i].DLOOP_VECTOR_BUF; +- curr_len = dloop_vec[i].DLOOP_VECTOR_LEN; ++ curr_loc = typerep_vec[i].MPL_IOV_BUF; ++ curr_len = typerep_vec[i].MPL_IOV_LEN; + } + } + else { +@@ -1017,8 +960,7 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat + accumulated_count += count; + } + +- MPIR_Segment_free(segp); +- MPL_free(dloop_vec); ++ MPL_free(typerep_vec); + } + + fn_exit: +@@ -1036,19 +978,19 @@ static inline int check_piggyback_lock(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + int *acquire_lock_fail, MPIR_Request ** reqp) + { + int lock_type; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + int mpi_errno = MPI_SUCCESS; + + (*acquire_lock_fail) = 0; + (*reqp) = NULL; + +- MPIDI_CH3_PKT_RMA_GET_FLAGS((*pkt), flags, mpi_errno); +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { ++ MPIDI_CH3_PKT_RMA_GET_FLAGS((*pkt), pkt_flags, mpi_errno); ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED) ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED) + lock_type = MPI_LOCK_SHARED; + else { +- MPIR_Assert(flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); ++ MPIR_Assert(pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); + lock_type = MPI_LOCK_EXCLUSIVE; + } + +@@ -1069,28 +1011,29 @@ static inline int check_piggyback_lock(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + + static inline int finish_op_on_target(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + int has_response_data, +- MPIDI_CH3_Pkt_flags_t flags, MPI_Win source_win_handle) ++ int pkt_flags, MPI_Win source_win_handle) + { + int mpi_errno = MPI_SUCCESS; + + if (!has_response_data) { + /* This is PUT or ACC */ +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { +- MPIDI_CH3_Pkt_flags_t pkt_flags = MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { ++ int flags = MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) { ++ flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ } + MPIR_Assert(source_win_handle != MPI_WIN_NULL); +- mpi_errno = MPIDI_CH3I_Send_lock_op_ack_pkt(vc, win_ptr, +- pkt_flags, ++ mpi_errno = MPIDI_CH3I_Send_lock_op_ack_pkt(vc, win_ptr, flags, + source_win_handle, MPI_REQUEST_NULL); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + MPIDI_CH3_Progress_signal_completion(); + } +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) { +- if (!(flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE)) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) { ++ if (!(pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE)) { + /* If op is piggybacked with both LOCK and FLUSH, + * we only send LOCK ACK back, do not send FLUSH ACK. */ + mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, source_win_handle); +@@ -1099,16 +1042,16 @@ static inline int finish_op_on_target(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + } + MPIDI_CH3_Progress_signal_completion(); + } +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER) { + win_ptr->at_completion_counter--; + MPIR_Assert(win_ptr->at_completion_counter >= 0); + /* Signal the local process when the op counter reaches 0. */ + if (win_ptr->at_completion_counter == 0) + MPIDI_CH3_Progress_signal_completion(); + } +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) { +- if (!(flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE)) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) { ++ if (!(pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE)) { + /* If op is piggybacked with both LOCK and UNLOCK, + * we only send LOCK ACK back, do not send FLUSH (UNLOCK) ACK. */ + mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, source_win_handle); +@@ -1124,14 +1067,14 @@ static inline int finish_op_on_target(MPIR_Win * win_ptr, MPIDI_VC_t * vc, + else { + /* This is GACC / GET / CAS / FOP */ + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) { + mpi_errno = MPIDI_CH3I_Release_lock(win_ptr); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIDI_CH3_Progress_signal_completion(); + } + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER) { + win_ptr->at_completion_counter--; + MPIR_Assert(win_ptr->at_completion_counter >= 0); + /* Signal the local process when the op counter reaches 0. */ +@@ -1223,28 +1166,23 @@ static inline int poke_progress_engine(void) + goto fn_exit; + } + +-static inline void MPIDI_CH3_ExtPkt_Accum_get_stream(MPIDI_CH3_Pkt_flags_t flags, ++static inline void MPIDI_CH3_ExtPkt_Accum_get_stream(int pkt_flags, + int is_derived_dt, void *ext_hdr_ptr, + MPI_Aint * stream_offset) + { +- if ((flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) && is_derived_dt) { +- MPIR_Assert(ext_hdr_ptr != NULL); +- (*stream_offset) = +- ((MPIDI_CH3_Ext_pkt_accum_stream_derived_t *) ext_hdr_ptr)->stream_offset; +- } +- else if (flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { + MPIR_Assert(ext_hdr_ptr != NULL); +- (*stream_offset) = ((MPIDI_CH3_Ext_pkt_accum_stream_t *) ext_hdr_ptr)->stream_offset; ++ (*stream_offset) = ((MPIDI_CH3_Ext_pkt_stream_t *) ext_hdr_ptr)->stream_offset; + } + } + +-static inline void MPIDI_CH3_ExtPkt_Gaccum_get_stream(MPIDI_CH3_Pkt_flags_t flags, ++static inline void MPIDI_CH3_ExtPkt_Gaccum_get_stream(int pkt_flags, + int is_derived_dt, void *ext_hdr_ptr, + MPI_Aint * stream_offset) + { + /* We do not check packet match here, because error must have already been + * reported at header init time (on origin) and at packet receive time (on target). */ +- MPIDI_CH3_ExtPkt_Accum_get_stream(flags, is_derived_dt, ext_hdr_ptr, stream_offset); ++ MPIDI_CH3_ExtPkt_Accum_get_stream(pkt_flags, is_derived_dt, ext_hdr_ptr, stream_offset); + } + + #endif /* MPIDRMA_H_INCLUDED */ +--- a/src/mpid/ch3/src/Makefile.mk ++++ b/src/mpid/ch3/src/Makefile.mk +@@ -28,6 +28,8 @@ mpi_core_sources += \ + src/mpid/ch3/src/ch3u_eagersync.c \ + src/mpid/ch3/src/ch3u_win_fns.c \ + src/mpid/ch3/src/mpid_abort.c \ ++ src/mpid/ch3/src/mpid_datatype.c \ ++ src/mpid/ch3/src/mpid_op.c \ + src/mpid/ch3/src/mpid_cancel_recv.c \ + src/mpid/ch3/src/mpid_cancel_send.c \ + src/mpid/ch3/src/mpid_comm_disconnect.c \ +--- a/src/mpid/ch3/src/ch3u_buffer.c ++++ b/src/mpid/ch3/src/ch3u_buffer.c +@@ -28,10 +28,6 @@ Used indirectly by mpid_irecv, mpid_recv (through MPIDI_CH3_RecvFromSelf) and + and receive from self. We may want to put all of the "from self" routines + into a single file, and make MPIDI_CH3U_Buffer_copy static to this file. */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Buffer_copy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIDI_CH3U_Buffer_copy( + const void * const sbuf, MPI_Aint scount, MPI_Datatype sdt, int * smpi_errno, + void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, intptr_t * rsz, +@@ -61,7 +57,7 @@ void MPIDI_CH3U_Buffer_copy( + "message truncated, sdata_sz=%" PRIdPTR " rdata_sz=%" PRIdPTR, + sdata_sz, rdata_sz)); + sdata_sz = rdata_sz; +- *rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE, "**truncate", "**truncate %d %d", sdata_sz, rdata_sz ); ++ *rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TRUNCATE, "**truncate", "**truncate %d %d", sdata_sz, rdata_sz ); + } + /* --END ERROR HANDLING-- */ + +@@ -80,53 +76,32 @@ void MPIDI_CH3U_Buffer_copy( + } + else if (sdt_contig) + { +- MPIR_Segment seg; +- MPI_Aint last; +- +- MPIR_Segment_init(rbuf, rcount, rdt, &seg); +- last = sdata_sz; +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "pre-unpack last=%" PRIdPTR, last )); +- MPIR_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "pre-unpack last=%" PRIdPTR, last )); +- /* --BEGIN ERROR HANDLING-- */ +- if (last != sdata_sz) +- { +- *rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE, "**dtypemismatch", 0); +- } +- /* --END ERROR HANDLING-- */ +- +- *rsz = last; ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack((char*) sbuf + sdt_true_lb, sdata_sz, rbuf, rcount, rdt, 0, &actual_unpack_bytes); ++ /* --BEGIN ERROR HANDLING-- */ ++ if (actual_unpack_bytes != sdata_sz) ++ { ++ *rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TYPE, "**dtypemismatch", 0); ++ } ++ /* --END ERROR HANDLING-- */ ++ *rsz = actual_unpack_bytes; + } + else if (rdt_contig) + { +- MPIR_Segment seg; +- MPI_Aint last; +- +- MPIR_Segment_init(sbuf, scount, sdt, &seg); +- last = sdata_sz; +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "pre-pack last=%" PRIdPTR, last )); +- MPIR_Segment_pack(&seg, 0, &last, (char*)rbuf + rdt_true_lb); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "post-pack last=%" PRIdPTR, last )); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(sbuf, scount, sdt, 0, (char*)rbuf + rdt_true_lb, sdata_sz, &actual_pack_bytes); + /* --BEGIN ERROR HANDLING-- */ +- if (last != sdata_sz) ++ if (actual_pack_bytes != sdata_sz) + { +- *rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE, "**dtypemismatch", 0); ++ *rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TYPE, "**dtypemismatch", 0); + } + /* --END ERROR HANDLING-- */ +- +- *rsz = last; ++ *rsz = actual_pack_bytes; + } + else + { + char * buf; +- intptr_t buf_off; +- MPIR_Segment sseg; + intptr_t sfirst; +- MPIR_Segment rseg; + intptr_t rfirst; + + buf = MPL_malloc(MPIDI_COPY_BUFFER_SZ, MPL_MEM_BUFFER); +@@ -134,83 +109,50 @@ void MPIDI_CH3U_Buffer_copy( + if (buf == NULL) + { + MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,TYPICAL,"SRBuf allocation failure"); +- *smpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", 0); ++ *smpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, "**nomem", 0); + *rmpi_errno = *smpi_errno; + *rsz = 0; + goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +- MPIR_Segment_init(sbuf, scount, sdt, &sseg); +- MPIR_Segment_init(rbuf, rcount, rdt, &rseg); +- + sfirst = 0; + rfirst = 0; +- buf_off = 0; + + for(;;) + { +- MPI_Aint last; +- char * buf_end; +- +- if (sdata_sz - sfirst > MPIDI_COPY_BUFFER_SZ - buf_off) +- { +- last = sfirst + (MPIDI_COPY_BUFFER_SZ - buf_off); ++ MPI_Aint max_pack_bytes; ++ MPI_Aint actual_pack_bytes; ++ MPI_Aint actual_unpack_bytes; ++ ++ /* rdata_sz is allowed to be larger than sdata_sz, so if ++ * we copied everything from the source buffer to the ++ * receive buffer, we are done */ ++ ++ if (sdata_sz - sfirst > MPIDI_COPY_BUFFER_SZ) { ++ max_pack_bytes = MPIDI_COPY_BUFFER_SZ; ++ } else { ++ max_pack_bytes = sdata_sz - sfirst; + } +- else +- { +- last = sdata_sz; +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "pre-pack first=%" PRIdPTR ", last=%" PRIdPTR, +- sfirst, last )); +- MPIR_Segment_pack(&sseg, sfirst, &last, buf + buf_off); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "post-pack first=%" PRIdPTR ", last=%" PRIdPTR, +- sfirst, last )); +- /* --BEGIN ERROR HANDLING-- */ +- MPIR_Assert(last > sfirst); +- /* --END ERROR HANDLING-- */ +- +- buf_end = buf + buf_off + (last - sfirst); +- sfirst = last; +- +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "pre-unpack first=%" PRIdPTR ", last=%" PRIdPTR, +- rfirst, last )); +- MPIR_Segment_unpack(&rseg, rfirst, &last, buf); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, +- "post-unpack first=%" PRIdPTR ", last=%" PRIdPTR, +- rfirst, last )); +- /* --BEGIN ERROR HANDLING-- */ +- MPIR_Assert(last > rfirst); +- /* --END ERROR HANDLING-- */ +- +- rfirst = last; + +- if (rfirst == sdata_sz) +- { +- /* successful completion */ ++ /* nothing left to copy, break out */ ++ if (max_pack_bytes == 0) + break; +- } ++ ++ MPIR_Typerep_pack(sbuf, scount, sdt, sfirst, buf, max_pack_bytes, &actual_pack_bytes); ++ MPIR_Typerep_unpack(buf, actual_pack_bytes, rbuf, rcount, rdt, rfirst, &actual_unpack_bytes); ++ MPIR_Assert(actual_pack_bytes == actual_unpack_bytes); ++ ++ sfirst += actual_pack_bytes; ++ rfirst += actual_unpack_bytes; + + /* --BEGIN ERROR HANDLING-- */ +- if (sfirst == sdata_sz) +- { ++ if (rfirst == sdata_sz && sfirst != sdata_sz) { + /* datatype mismatch -- remaining bytes could not be unpacked */ +- *rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE, "**dtypemismatch", 0); ++ *rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TYPE, "**dtypemismatch", 0); + break; + } + /* --END ERROR HANDLING-- */ +- +- buf_off = sfirst - rfirst; +- if (buf_off > 0) +- { +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, VERBOSE, (MPL_DBG_FDEST, +- "moved %" PRIdPTR " bytes to the beginning of the tmp buffer", buf_off)); +- memmove(buf, buf_end - buf_off, buf_off); +- } + } + + *rsz = rfirst; +--- a/src/mpid/ch3/src/ch3u_comm.c ++++ b/src/mpid/ch3/src/ch3u_comm.c +@@ -50,10 +50,6 @@ static hook_elt *destroy_hooks_head = NULL; + static hook_elt *create_hooks_tail = NULL; + static hook_elt *destroy_hooks_tail = NULL; + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Comm_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Comm_init(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -178,10 +174,6 @@ static inline int map_size(MPIR_Comm_map_t map) + return map.src_comm->remote_size; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Comm_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm) + { + int mpi_errno = MPI_SUCCESS; +@@ -312,10 +304,6 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Comm_destroy_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Comm_destroy_hook(MPIR_Comm *comm) + { + int mpi_errno = MPI_SUCCESS; +@@ -345,10 +333,6 @@ int MPIDI_CH3I_Comm_destroy_hook(MPIR_Comm *comm) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Comm_register_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Comm_register_create_hook(int (*hook_fn)(struct MPIR_Comm *, void *), void *param) + { + int mpi_errno = MPI_SUCCESS; +@@ -374,10 +358,6 @@ int MPIDI_CH3U_Comm_register_create_hook(int (*hook_fn)(struct MPIR_Comm *, void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Comm_register_destroy_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Comm_register_destroy_hook(int (*hook_fn)(struct MPIR_Comm *, void *), void *param) + { + int mpi_errno = MPI_SUCCESS; +@@ -402,10 +382,6 @@ int MPIDI_CH3U_Comm_register_destroy_hook(int (*hook_fn)(struct MPIR_Comm *, voi + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME register_hook_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int register_hook_finalize(void *param) + { + int mpi_errno = MPI_SUCCESS; +@@ -432,10 +408,6 @@ static int register_hook_finalize(void *param) + } + + +-#undef FUNCNAME +-#define FUNCNAME comm_created +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int comm_created(MPIR_Comm *comm, void *param) + { + int mpi_errno = MPI_SUCCESS; +@@ -460,10 +432,6 @@ int comm_created(MPIR_Comm *comm, void *param) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME comm_destroyed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int comm_destroyed(MPIR_Comm *comm, void *param) + { + int mpi_errno = MPI_SUCCESS; +@@ -484,10 +452,6 @@ int comm_destroyed(MPIR_Comm *comm, void *param) + + + /* flag==TRUE iff a member of group is also a member of comm */ +-#undef FUNCNAME +-#define FUNCNAME nonempty_intersection +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int nonempty_intersection(MPIR_Comm *comm, MPIR_Group *group, int *flag) + { + int mpi_errno = MPI_SUCCESS; +@@ -529,10 +493,6 @@ static int nonempty_intersection(MPIR_Comm *comm, MPIR_Group *group, int *flag) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Comm_handle_failed_procs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Comm_handle_failed_procs(MPIR_Group *new_failed_procs) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c ++++ b/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c +@@ -30,10 +30,6 @@ + MPI info values */ + /* Turn a SINGLE MPI_Info into an array of PMI_keyvals (return the pointer + to the array of PMI keyvals) */ +-#undef FUNCNAME +-#define FUNCNAME mpi_to_pmi_keyvals +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int mpi_to_pmi_keyvals( MPIR_Info *info_ptr, PMI_keyval_t **kv_ptr, + int *nkeys_ptr ) + { +@@ -83,25 +79,16 @@ static void free_pmi_keyvals(PMI_keyval_t **kv, int size, int *counts) + { + for (j=0; jdev.segment as well as segment_first and segment_size. */ ++ sreq->dev.segment as well as msg_offset and msgsize. ++ The optional hdr_iov and n_hdr_iov are used for variable-length extended ++ header, specify NULL and zero if unused. Note that we assume n_hdr_iov is ++ small and does not exceed MPL_IOV_LIMIT - 2 (one for header and one for ++ packed data) at most. */ + int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPIR_Request *sreq, +- void *header, intptr_t hdr_sz ) ++ void *header, intptr_t hdr_sz, ++ MPL_IOV *hdr_iov, int n_hdr_iov) + { + int mpi_errno = MPI_SUCCESS; +- int iov_n; ++ int iov_n, iovcnt = 0; + MPL_IOV iov[MPL_IOV_LIMIT]; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_SENDNONCONTIG_IOV); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_SENDNONCONTIG_IOV); + +- iov[0].MPL_IOV_BUF = header; +- iov[0].MPL_IOV_LEN = hdr_sz; ++ iov[iovcnt].MPL_IOV_BUF = header; ++ iov[iovcnt].MPL_IOV_LEN = hdr_sz; ++ iovcnt++; + + iov_n = MPL_IOV_LIMIT - 1; + +- if (sreq->dev.ext_hdr_sz > 0) { +- /* When extended packet header exists, here we leave one IOV slot +- * before loading data to IOVs, so that there will be enough +- * IOVs for hdr/ext_hdr/data. */ +- iov_n--; ++ /* If extended header iov exists, merge into the iov array. */ ++ if (n_hdr_iov > 0) { ++ int i; ++ MPIR_Assert(iov_n - n_hdr_iov > 0); /* secure at least 1 iov for data */ ++ for (i = 0; i < n_hdr_iov; i++) { ++ iov[iovcnt].MPL_IOV_BUF = hdr_iov[i].MPL_IOV_BUF; ++ iov[iovcnt].MPL_IOV_LEN = hdr_iov[i].MPL_IOV_LEN; ++ iovcnt++; ++ iov_n--; ++ } + } + +- mpi_errno = MPIDI_CH3U_Request_load_send_iov(sreq, &iov[1], &iov_n); ++ mpi_errno = MPIDI_CH3U_Request_load_send_iov(sreq, &iov[iovcnt], &iov_n); + if (mpi_errno == MPI_SUCCESS) + { +- iov_n += 1; ++ iov_n += iovcnt; /* add count of hdr iovs */ + + /* Note this routine is invoked withing a CH3 critical section */ + /* MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); */ +@@ -80,15 +87,11 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPIR_Request *sreq, + + /* This function will allocate a segment. That segment must be freed when + it is no longer needed */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_EagerNoncontigSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* MPIDI_CH3_EagerNoncontigSend - Eagerly send noncontiguous data */ + int MPIDI_CH3_EagerNoncontigSend( MPIR_Request **sreq_p, + MPIDI_CH3_Pkt_type_t reqtype, + const void * buf, MPI_Aint count, +- MPI_Datatype datatype, intptr_t data_sz, ++ MPI_Datatype datatype, + int rank, + int tag, MPIR_Comm * comm, + int context_offset ) +@@ -98,7 +101,12 @@ int MPIDI_CH3_EagerNoncontigSend( MPIR_Request **sreq_p, + MPIR_Request *sreq = *sreq_p; + MPIDI_CH3_Pkt_t upkt; + MPIDI_CH3_Pkt_eager_send_t * const eager_pkt = &upkt.eager_send; +- ++ MPI_Aint data_sz; ++ MPIR_Datatype *dt_ptr; ++ ++ MPIR_Datatype_get_ptr(datatype, dt_ptr); ++ data_sz = count * dt_ptr->size; ++ + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, + "sending non-contiguous eager message, data_sz=%" PRIdPTR, + data_sz)); +@@ -120,17 +128,17 @@ int MPIDI_CH3_EagerNoncontigSend( MPIR_Request **sreq_p, + + MPL_DBG_MSGPKT(vc,tag,eager_pkt->match.parts.context_id,rank,data_sz, + "Eager"); +- +- sreq->dev.segment_ptr = MPIR_Segment_alloc( ); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); + +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = data_sz; ++ sreq->dev.user_buf = (void *) buf; ++ sreq->dev.user_count = count; ++ sreq->dev.datatype = datatype; ++ sreq->dev.msg_offset = 0; ++ sreq->dev.msgsize = data_sz; + + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); + mpi_errno = vc->sendNoncontig_fn(vc, sreq, eager_pkt, +- sizeof(MPIDI_CH3_Pkt_eager_send_t)); ++ sizeof(MPIDI_CH3_Pkt_eager_send_t), ++ NULL, 0); + MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); + if (mpi_errno) MPIR_ERR_POP(mpi_errno); + +@@ -147,10 +155,6 @@ int MPIDI_CH3_EagerNoncontigSend( MPIR_Request **sreq_p, + Make sure that buf is at the beginning of the data to send; + adjust by adding dt_true_lb if necessary + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_EagerContigSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_EagerContigSend( MPIR_Request **sreq_p, + MPIDI_CH3_Pkt_type_t reqtype, + const void * buf, intptr_t data_sz, int rank, +@@ -213,10 +217,6 @@ int MPIDI_CH3_EagerContigSend( MPIR_Request **sreq_p, + We may need a nonblocking (cancellable) version of this, which will + have a smaller payload. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_EagerContigShortSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_EagerContigShortSend( MPIR_Request **sreq_p, + MPIDI_CH3_Pkt_type_t reqtype, + const void * buf, intptr_t data_sz, int rank, +@@ -284,10 +284,6 @@ int MPIDI_CH3_EagerContigShortSend( MPIR_Request **sreq_p, + + /* This is the matching handler for the EagerShort message defined above */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_EagerShortSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **rreqp ) + { +@@ -360,7 +356,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, v + PRIdPTR, + rreq->dev.recv_data_sz, userbuf_sz)); + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TRUNCATE, + "**truncate", "**truncate %d %d %d %d", + rreq->status.MPI_SOURCE, rreq->status.MPI_TAG, + rreq->dev.recv_data_sz, userbuf_sz ); +@@ -397,28 +393,20 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, v + } + else { + intptr_t recv_data_sz; +- MPI_Aint last; +- /* user buffer is not contiguous. Use the segment +- code to unpack it, handling various errors and +- exceptional cases */ +- /* FIXME: The MPICH tests do not exercise this branch */ +- /* printf( "Surprise!\n" ); fflush(stdout);*/ +- rreq->dev.segment_ptr = MPIR_Segment_alloc( ); +- MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- +- MPIR_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, +- rreq->dev.datatype, rreq->dev.segment_ptr); +- ++ /* user buffer is not contiguous. Unpack it, handling ++ various errors and exceptional cases */ + recv_data_sz = rreq->dev.recv_data_sz; +- last = recv_data_sz; +- MPIR_Segment_unpack( rreq->dev.segment_ptr, 0, +- &last, eagershort_pkt->data ); +- if (last != recv_data_sz) { ++ ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack(eagershort_pkt->data, recv_data_sz, rreq->dev.user_buf, ++ rreq->dev.user_count, rreq->dev.datatype, 0, &actual_unpack_bytes); ++ ++ if (actual_unpack_bytes != recv_data_sz) { + /* --BEGIN ERROR HANDLING-- */ + /* There are two cases: a datatype mismatch (could + not consume all data) or a too-short buffer. We + need to distinguish between these two types. */ +- MPIR_STATUS_SET_COUNT(rreq->status, last); ++ MPIR_STATUS_SET_COUNT(rreq->status, actual_unpack_bytes); + if (rreq->dev.recv_data_sz <= userbuf_sz) { + MPIR_ERR_SETSIMPLE(rreq->status.MPI_ERROR,MPI_ERR_TYPE, + "**dtypemismatch"); +@@ -521,10 +509,6 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, v + Make sure that buf is at the beginning of the data to send; + adjust by adding dt_true_lb if necessary + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_EagerContigIsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_EagerContigIsend( MPIR_Request **sreq_p, + MPIDI_CH3_Pkt_type_t reqtype, + const void * buf, intptr_t data_sz, int rank, +@@ -600,10 +584,6 @@ int MPIDI_CH3_EagerContigIsend( MPIR_Request **sreq_p, + /* FIXME: This is not optimized for short messages, which + should have the data in the same packet when the data is + particularly short (e.g., one 8 byte long word) */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_EagerSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, + intptr_t *buflen, MPIR_Request **rreqp ) + { +@@ -688,10 +668,6 @@ int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void * + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_ReadySend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, + intptr_t *buflen, MPIR_Request **rreqp ) + { +@@ -778,7 +754,7 @@ int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void * + mark the request with an error. */ + + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**rsendnomatch", + "**rsendnomatch %d %d", + ready_pkt->match.parts.rank, +@@ -788,8 +764,8 @@ int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void * + { + /* force read of extra data */ + *rreqp = rreq; +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = 0; ++ rreq->dev.msg_offset = 0; ++ rreq->dev.msgsize = 0; + mpi_errno = MPIDI_CH3U_Request_load_recv_iov(rreq); + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER, +--- a/src/mpid/ch3/src/ch3u_eagersync.c ++++ b/src/mpid/ch3/src/ch3u_eagersync.c +@@ -13,10 +13,6 @@ + * MPI_Issend for short messages. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_EagerSyncNoncontigSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* MPIDI_CH3_EagerSyncNoncontigSend - Eagerly send noncontiguous data in + synchronous mode. + +@@ -92,16 +88,16 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPIR_Request **sreq_p, + MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE, + "sending non-contiguous sync eager message, data_sz=%" PRIdPTR, + data_sz); +- +- sreq->dev.segment_ptr = MPIR_Segment_alloc( ); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); + +- MPIR_Segment_init(buf, count, datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = data_sz; ++ sreq->dev.user_buf = (void *) buf; ++ sreq->dev.user_count = count; ++ sreq->dev.datatype = datatype; ++ sreq->dev.msg_offset = 0; ++ sreq->dev.msgsize = data_sz; + + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); +- mpi_errno = vc->sendNoncontig_fn(vc, sreq, es_pkt, sizeof(MPIDI_CH3_Pkt_eager_sync_send_t)); ++ mpi_errno = vc->sendNoncontig_fn(vc, sreq, es_pkt, sizeof(MPIDI_CH3_Pkt_eager_sync_send_t), ++ NULL, 0); + MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); + if (mpi_errno) MPIR_ERR_POP(mpi_errno); + } +@@ -208,10 +204,6 @@ int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *vc, MPIR_Request *rreq ) + MPIDI_Request_set_msg_type((rreq_), (msg_type_)); \ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_EagerSyncSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, + intptr_t *buflen, MPIR_Request **rreqp ) + { +@@ -339,10 +331,6 @@ int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, vo + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_EagerSyncAck +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_EagerSyncAck( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **rreqp ) + { +--- a/src/mpid/ch3/src/ch3u_handle_connection.c ++++ b/src/mpid/ch3/src/ch3u_handle_connection.c +@@ -22,10 +22,6 @@ MPIR_Group *MPIDI_Failed_procs_group = NULL; + int MPIDI_last_known_failed = MPI_PROC_NULL; + char *MPIDI_failed_procs_string = NULL; + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Handle_connection +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIDI_CH3U_Handle_connection - handle connection event + +@@ -102,7 +98,6 @@ int MPIDI_CH3U_Handle_connection(MPIDI_VC_t * vc, MPIDI_VC_Event_t event) + MPIDI_CH3U_Complete_posted_with_error(vc); + ++MPIDI_Failed_vc_count; + +- MPIDU_Ftb_publish_vc(MPIDU_FTB_EV_UNREACHABLE, vc); + MPIDI_CHANGE_VC_STATE(vc, MORIBUND); + + break; +@@ -130,7 +125,6 @@ int MPIDI_CH3U_Handle_connection(MPIDI_VC_t * vc, MPIDI_VC_Event_t event) + MPIDI_CH3U_Complete_posted_with_error(vc); + ++MPIDI_Failed_vc_count; + +- MPIDU_Ftb_publish_vc(MPIDU_FTB_EV_UNREACHABLE, vc); + MPIDI_CHANGE_VC_STATE(vc, MORIBUND); + + /* MT: this is not thread safe */ +@@ -148,7 +142,7 @@ int MPIDI_CH3U_Handle_connection(MPIDI_VC_t * vc, MPIDI_VC_Event_t event) + { + MPL_DBG_MSG_D(MPIDI_CH3_DBG_DISCONNECT,TYPICAL, "Unhandled connection state %d when closing connection",vc->state); + mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, ++ MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, + MPI_ERR_INTERN, "**ch3|unhandled_connection_state", + "**ch3|unhandled_connection_state %p %d", vc, vc->state); + goto fn_fail; +@@ -197,10 +191,6 @@ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_VC_SendClose +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIDI_CH3U_VC_SendClose - Initiate a close on a virtual connection + +@@ -272,10 +262,6 @@ int MPIDI_CH3U_VC_SendClose( MPIDI_VC_t *vc, int rank ) + + /* Here is the matching code that processes a close packet when it is + received */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Close +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Close( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **rreqp ) + { +@@ -360,10 +346,6 @@ int MPIDI_CH3_PktPrint_Close( FILE *fp, MPIDI_CH3_Pkt_t *pkt ) + * (initiated in the SendClose routine above) are completed. It is + * used in MPID_Finalize and MPID_Comm_disconnect. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_VC_WaitForClose +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIDI_CH3U_VC_WaitForClose - Wait for all virtual connections to close + @*/ +@@ -394,10 +376,6 @@ int MPIDI_CH3U_VC_WaitForClose( void ) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME terminate_failed_VCs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int terminate_failed_VCs(MPIR_Group *new_failed_group) + { + int mpi_errno = MPI_SUCCESS; +@@ -439,10 +417,6 @@ static int terminate_failed_VCs(MPIR_Group *new_failed_group) + * >= 0 = The last failure acknowledged. All failures returned will have + * been acknowledged previously. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Get_failed_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Get_failed_group(int last_rank, MPIR_Group **failed_group) + { + char *c; +@@ -507,10 +481,6 @@ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Check_for_failed_procs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Check_for_failed_procs(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -588,10 +558,6 @@ int MPIDI_CH3U_Check_for_failed_procs(void) + + /* for debugging */ + int MPIDI_CH3U_Dump_vc_states(void); +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Dump_vc_states +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Dump_vc_states(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/ch3u_handle_op_req.c ++++ b/src/mpid/ch3/src/ch3u_handle_op_req.c +@@ -8,10 +8,6 @@ + #include "mpidrma.h" + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Req_handler_rma_op_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Req_handler_rma_op_complete(MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c ++++ b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c +@@ -48,10 +48,6 @@ + currently do not support that in the CH3 device. */ + #define MPIDI_CH3U_Handle_ordered_recv_pkt MPIDI_CH3U_Handle_recv_pkt + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Handle_ordered_recv_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Handle_ordered_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t *buflen, MPIR_Request ** rreqp) + { +@@ -98,10 +94,6 @@ int MPIDI_CH3U_Handle_ordered_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + * data for the request has been received. This function does not + * actually complete the request. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Receive_data_found +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Receive_data_found(MPIR_Request *rreq, void *buf, intptr_t *buflen, int *complete) + { + int dt_contig; +@@ -128,7 +120,7 @@ int MPIDI_CH3U_Receive_data_found(MPIR_Request *rreq, void *buf, intptr_t *bufle + PRIdPTR, + rreq->dev.recv_data_sz, userbuf_sz)); + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TRUNCATE, + "**truncate", "**truncate %d %d %d %d", + rreq->status.MPI_SOURCE, rreq->status.MPI_TAG, + rreq->dev.recv_data_sz, userbuf_sz ); +@@ -172,33 +164,28 @@ int MPIDI_CH3U_Receive_data_found(MPIR_Request *rreq, void *buf, intptr_t *bufle + else { + /* user buffer is not contiguous or is too small to hold + the entire message */ +- +- rreq->dev.segment_ptr = MPIR_Segment_alloc( ); +- MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- +- MPIR_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, +- rreq->dev.datatype, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = data_sz; ++ rreq->dev.msg_offset = 0; ++ rreq->dev.msgsize = data_sz; + + /* if all of the data has already been received, and the + message is not truncated, unpack it now, otherwise build an + iov and let the channel unpack */ + if (data_sz == rreq->dev.recv_data_sz && *buflen >= data_sz) + { +- intptr_t last; + MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"Copying noncontiguous data to user buffer"); +- last = data_sz; +- MPIR_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, +- &last, buf); ++ ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack(buf, data_sz, rreq->dev.user_buf, rreq->dev.user_count, ++ rreq->dev.datatype, rreq->dev.msg_offset, &actual_unpack_bytes); ++ + /* --BEGIN ERROR HANDLING-- */ +- if (last != data_sz) ++ if (actual_unpack_bytes != data_sz) + { + /* If the data can't be unpacked, the we have a + mismatch between the datatype and the amount of + data received. Throw away received data. */ + MPIR_ERR_SET(rreq->status.MPI_ERROR, MPI_ERR_TYPE, "**dtypemismatch"); +- MPIR_STATUS_SET_COUNT(rreq->status, rreq->dev.segment_first); ++ MPIR_STATUS_SET_COUNT(rreq->status, rreq->dev.msg_offset); + *buflen = data_sz; + *complete = TRUE; + /* FIXME: Set OnDataAvail to 0? If not, why not? */ +@@ -231,10 +218,6 @@ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Receive_data_unexpected +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Receive_data_unexpected(MPIR_Request * rreq, void *buf, intptr_t *buflen, int *complete) + { + int mpi_errno = MPI_SUCCESS; +@@ -289,10 +272,6 @@ int MPIDI_CH3U_Receive_data_unexpected(MPIR_Request * rreq, void *buf, intptr_t + * next data to arrive. In turn, this request is attached to a virtual + * connection. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Post_data_receive_found +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Post_data_receive_found(MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; +@@ -319,7 +298,7 @@ int MPIDI_CH3U_Post_data_receive_found(MPIR_Request * rreq) + PRIdPTR, + rreq->dev.recv_data_sz, userbuf_sz)); + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TRUNCATE, + "**truncate", "**truncate %d %d %d %d", + rreq->status.MPI_SOURCE, rreq->status.MPI_TAG, + rreq->dev.recv_data_sz, userbuf_sz ); +@@ -346,12 +325,8 @@ int MPIDI_CH3U_Post_data_receive_found(MPIR_Request * rreq) + /* user buffer is not contiguous or is too small to hold + the entire message */ + MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"IOV loaded for non-contiguous read"); +- rreq->dev.segment_ptr = MPIR_Segment_alloc( ); +- MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, +- rreq->dev.datatype, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = data_sz; ++ rreq->dev.msg_offset = 0; ++ rreq->dev.msgsize = data_sz; + mpi_errno = MPIDI_CH3U_Request_load_recv_iov(rreq); + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_SETFATALANDJUMP(mpi_errno,MPI_ERR_OTHER, +@@ -366,10 +341,6 @@ int MPIDI_CH3U_Post_data_receive_found(MPIR_Request * rreq) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Post_data_receive_unexpected +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Post_data_receive_unexpected(MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; +@@ -409,10 +380,6 @@ int MPIDI_CH3U_Post_data_receive_unexpected(MPIR_Request * rreq) + to do the same thing, e.g., the main thread in MPI_Win_lock(source=target) + and another thread in the progress engine. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Try_acquire_win_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Try_acquire_win_lock(MPIR_Win *win_ptr, int requested_lock) + { + int existing_lock; +@@ -480,9 +447,6 @@ int MPIDI_CH3I_Try_acquire_win_lock(MPIR_Win *win_ptr, int requested_lock) + /* FIXME: we still need to implement flow control. As a reminder, + we don't mark these parameters as unused, because a full implementation + of this routine will need to make use of all 4 parameters */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_FlowCntlUpdate +-#undef FCNAME + int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **rreqp) + { +@@ -491,10 +455,6 @@ int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, v + } + + /* This is a dummy handler*/ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_EndCH3 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *vc ATTRIBUTE((unused)), + MPIDI_CH3_Pkt_t *pkt ATTRIBUTE((unused)), + void *data ATTRIBUTE((unused)), +@@ -520,10 +480,6 @@ int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *vc ATTRIBUTE((unused)), + appropriate (this allows the compiler to reduce the cost in + accessing the elements of the array in some cases). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Init( MPIDI_CH3_PktHandler_Fcn *pktArray[], + int arraySize ) + { +--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c ++++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c +@@ -7,13 +7,6 @@ + #include "mpidimpl.h" + #include "mpidrma.h" + +-static int create_derived_datatype(MPIR_Request * req, MPIDI_RMA_dtype_info * dtype_info, +- MPIR_Datatype** dtp); +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Handle_recv_req +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Handle_recv_req(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + static int in_routine ATTRIBUTE((unused)) = FALSE; +@@ -86,16 +79,12 @@ int MPIDI_CH3_ReqHandler_RecvComplete(MPIDI_VC_t * vc ATTRIBUTE((unused)), + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_PutRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_PutRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Win *win_ptr; + MPI_Win source_win_handle = rreq->dev.source_win_handle; +- MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags; ++ int pkt_flags = rreq->dev.pkt_flags; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTRECVCOMPLETE); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTRECVCOMPLETE); +@@ -131,7 +120,7 @@ int MPIDI_CH3_ReqHandler_PutRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + * on the same request again (in release_lock()). Marking this request as + * completed will prevent us from processing the same request twice. */ + mpi_errno = finish_op_on_target(win_ptr, vc, FALSE /* has no response data */ , +- flags, source_win_handle); ++ pkt_flags, source_win_handle); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -148,16 +137,12 @@ int MPIDI_CH3_ReqHandler_PutRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_AccumRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_AccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Win *win_ptr; + MPI_Win source_win_handle = rreq->dev.source_win_handle; +- MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags; ++ int pkt_flags = rreq->dev.pkt_flags; + MPI_Datatype basic_type; + MPI_Aint predef_count, predef_dtp_size; + MPI_Aint stream_offset; +@@ -199,19 +184,21 @@ int MPIDI_CH3_ReqHandler_AccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, + MPIR_Assert(predef_count > 0); + + stream_offset = 0; +- MPIDI_CH3_ExtPkt_Accum_get_stream(flags, ++ MPIDI_CH3_ExtPkt_Accum_get_stream(pkt_flags, + (!MPIR_DATATYPE_IS_PREDEFINED(rreq->dev.datatype)), + rreq->dev.ext_hdr_ptr, &stream_offset); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + /* accumulate data from tmp_buf into user_buf */ + MPIR_Assert(predef_count == (int) predef_count); + mpi_errno = do_accumulate_op(rreq->dev.user_buf, (int) predef_count, basic_type, + rreq->dev.real_user_buf, rreq->dev.user_count, rreq->dev.datatype, +- stream_offset, rreq->dev.op); +- if (win_ptr->shm_allocated == TRUE) ++ stream_offset, rreq->dev.op, MPIDI_RMA_ACC_SRCBUF_DEFAULT); ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + if (mpi_errno) { + MPIR_ERR_POP(mpi_errno); + } +@@ -230,7 +217,7 @@ int MPIDI_CH3_ReqHandler_AccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, + * on the same request again (in release_lock()). Marking this request as + * completed will prevent us from processing the same request twice. */ + mpi_errno = finish_op_on_target(win_ptr, vc, FALSE /* has no response data */ , +- flags, source_win_handle); ++ pkt_flags, source_win_handle); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -247,10 +234,6 @@ int MPIDI_CH3_ReqHandler_AccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_GaccumRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; +@@ -288,7 +271,7 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + MPIR_Assert(basic_type != MPI_DATATYPE_NULL); + + stream_offset = 0; +- MPIDI_CH3_ExtPkt_Gaccum_get_stream(rreq->dev.flags, ++ MPIDI_CH3_ExtPkt_Gaccum_get_stream(rreq->dev.pkt_flags, + (!MPIR_DATATYPE_IS_PREDEFINED(rreq->dev.datatype)), + rreq->dev.ext_hdr_ptr, &stream_offset); + +@@ -306,13 +289,13 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + MPIDI_Pkt_init(get_accum_resp_pkt, MPIDI_CH3_PKT_GET_ACCUM_RESP); + get_accum_resp_pkt->request_handle = rreq->dev.resp_request_handle; + get_accum_resp_pkt->target_rank = win_ptr->comm_ptr->rank; +- get_accum_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ get_accum_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ get_accum_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ get_accum_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + + /* check if data is contiguous and get true lb */ + MPIR_Datatype_is_contig(rreq->dev.datatype, &is_contig); +@@ -328,8 +311,9 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + + /* NOTE: 'copy data + ACC' needs to be atomic */ + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + /* Copy data from target window to temporary buffer */ + +@@ -339,29 +323,21 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + stream_offset), stream_data_len); + } + else { +- MPIR_Segment *seg = MPIR_Segment_alloc(); +- MPI_Aint first = stream_offset; +- MPI_Aint last = first + stream_data_len; +- +- if (seg == NULL) { +- if (win_ptr->shm_allocated == TRUE) +- MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); +- } +- MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment"); +- MPIR_Segment_init(rreq->dev.real_user_buf, rreq->dev.user_count, rreq->dev.datatype, seg); +- MPIR_Segment_pack(seg, first, &last, resp_req->dev.user_buf); +- MPIR_Segment_free(seg); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(rreq->dev.real_user_buf, rreq->dev.user_count, rreq->dev.datatype, ++ stream_offset, resp_req->dev.user_buf, stream_data_len, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes == stream_data_len); + } + + /* accumulate data from tmp_buf into user_buf */ + MPIR_Assert(predef_count == (int) predef_count); + mpi_errno = do_accumulate_op(rreq->dev.user_buf, (int) predef_count, basic_type, + rreq->dev.real_user_buf, rreq->dev.user_count, rreq->dev.datatype, +- stream_offset, rreq->dev.op); ++ stream_offset, rreq->dev.op, MPIDI_RMA_ACC_SRCBUF_DEFAULT); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -369,7 +345,7 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + resp_req->dev.OnFinal = MPIDI_CH3_ReqHandler_GaccumSendComplete; + resp_req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumSendComplete; + resp_req->dev.target_win_handle = rreq->dev.target_win_handle; +- resp_req->dev.flags = rreq->dev.flags; ++ resp_req->dev.pkt_flags = rreq->dev.pkt_flags; + + /* here we increment the Active Target counter to guarantee the GET-like + * operation are completed when counter reaches zero. */ +@@ -419,10 +395,6 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_FOPRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; +@@ -461,7 +433,7 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + resp_req->dev.OnFinal = MPIDI_CH3_ReqHandler_FOPSendComplete; + resp_req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_FOPSendComplete; + resp_req->dev.target_win_handle = rreq->dev.target_win_handle; +- resp_req->dev.flags = rreq->dev.flags; ++ resp_req->dev.pkt_flags = rreq->dev.pkt_flags; + + MPIR_CHKPMEM_MALLOC(resp_req->dev.user_buf, void *, type_size, mpi_errno, "FOP resp. buffer", MPL_MEM_BUFFER); + +@@ -471,34 +443,29 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + + /* NOTE: 'copy data + ACC' needs to be atomic */ + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + /* Copy data into a temporary buffer in response request */ + if (is_contig) { + MPIR_Memcpy(resp_req->dev.user_buf, rreq->dev.real_user_buf, type_size); + } + else { +- MPIR_Segment *seg = MPIR_Segment_alloc(); +- MPI_Aint last = type_size; +- +- if (seg == NULL) { +- if (win_ptr->shm_allocated == TRUE) +- MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); +- } +- MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment"); +- MPIR_Segment_init(rreq->dev.real_user_buf, 1, rreq->dev.datatype, seg); +- MPIR_Segment_pack(seg, 0, &last, resp_req->dev.user_buf); +- MPIR_Segment_free(seg); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(rreq->dev.real_user_buf, 1, rreq->dev.datatype, 0, resp_req->dev.user_buf, ++ type_size, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes == type_size); + } + + /* Perform accumulate computation */ + mpi_errno = do_accumulate_op(rreq->dev.user_buf, 1, rreq->dev.datatype, +- rreq->dev.real_user_buf, 1, rreq->dev.datatype, 0, rreq->dev.op); ++ rreq->dev.real_user_buf, 1, rreq->dev.datatype, 0, rreq->dev.op, ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -507,13 +474,13 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + MPIDI_Pkt_init(fop_resp_pkt, MPIDI_CH3_PKT_FOP_RESP); + fop_resp_pkt->request_handle = rreq->dev.resp_request_handle; + fop_resp_pkt->target_rank = win_ptr->comm_ptr->rank; +- fop_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ fop_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ fop_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ fop_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + + iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) fop_resp_pkt; + iov[0].MPL_IOV_LEN = sizeof(*fop_resp_pkt); +@@ -554,24 +521,24 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Datatype*new_dtp = NULL; +- MPIDI_RMA_dtype_info *dtype_info = NULL; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTDERIVEDDTRECVCOMPLETE); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTDERIVEDDTRECVCOMPLETE); + + /* get data from extended header */ +- dtype_info = &((MPIDI_CH3_Ext_pkt_put_derived_t *) rreq->dev.ext_hdr_ptr)->dtype_info; +- /* create derived datatype */ +- create_derived_datatype(rreq, dtype_info, &new_dtp); ++ new_dtp = (MPIR_Datatype *) MPIR_Handle_obj_alloc(&MPIR_Datatype_mem); ++ if (!new_dtp) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", ++ "MPIR_Datatype_mem"); ++ } ++ /* Note: handle is filled in by MPIR_Handle_obj_alloc() */ ++ MPIR_Object_set_ref(new_dtp, 1); ++ MPIR_Typerep_unflatten(new_dtp, rreq->dev.flattened_type); + + /* update request to get the data */ + MPIDI_Request_set_type(rreq, MPIDI_REQUEST_TYPE_PUT_RECV); +@@ -580,14 +547,8 @@ int MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((unu + + rreq->dev.datatype_ptr = new_dtp; + +- rreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); +- +- MPIR_Segment_init(rreq->dev.user_buf, +- rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = rreq->dev.recv_data_sz; ++ rreq->dev.msg_offset = 0; ++ rreq->dev.msgsize = rreq->dev.recv_data_sz; + + mpi_errno = MPIDI_CH3U_Request_load_recv_iov(rreq); + if (mpi_errno != MPI_SUCCESS) { +@@ -602,16 +563,11 @@ int MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((unu + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Datatype*new_dtp = NULL; +- MPIDI_RMA_dtype_info *dtype_info = NULL; + MPI_Aint basic_type_extent, basic_type_size; + MPI_Aint total_len, rest_len, stream_elem_count; + MPI_Aint stream_offset; +@@ -622,24 +578,24 @@ int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((un + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_ACCUMMETADATARECVCOMPLETE); + + stream_offset = 0; +- MPIR_Assert(rreq->dev.ext_hdr_ptr != NULL); ++ ++ /* get stream offset */ ++ if (rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { ++ MPIDI_CH3_Ext_pkt_stream_t *ext_hdr = NULL; ++ MPIR_Assert(rreq->dev.ext_hdr_ptr != NULL); ++ ext_hdr = ((MPIDI_CH3_Ext_pkt_stream_t *) rreq->dev.ext_hdr_ptr); ++ stream_offset = ext_hdr->stream_offset; ++ } + + if (MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_ACCUM_RECV_DERIVED_DT) { +- /* get data from extended header */ +- if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { +- MPIDI_CH3_Ext_pkt_accum_stream_derived_t *ext_hdr = NULL; +- ext_hdr = ((MPIDI_CH3_Ext_pkt_accum_stream_derived_t *) rreq->dev.ext_hdr_ptr); +- stream_offset = ext_hdr->stream_offset; +- dtype_info = &ext_hdr->dtype_info; ++ new_dtp = (MPIR_Datatype *) MPIR_Handle_obj_alloc(&MPIR_Datatype_mem); ++ if (!new_dtp) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", ++ "MPIR_Datatype_mem"); + } +- else { +- MPIDI_CH3_Ext_pkt_accum_derived_t *ext_hdr = NULL; +- ext_hdr = ((MPIDI_CH3_Ext_pkt_accum_derived_t *) rreq->dev.ext_hdr_ptr); +- dtype_info = &ext_hdr->dtype_info; +- } +- +- /* create derived datatype */ +- create_derived_datatype(rreq, dtype_info, &new_dtp); ++ /* Note: handle is filled in by MPIR_Handle_obj_alloc() */ ++ MPIR_Object_set_ref(new_dtp, 1); ++ MPIR_Typerep_unflatten(new_dtp, rreq->dev.flattened_type); + + /* update new request to get the data */ + MPIDI_Request_set_type(rreq, MPIDI_REQUEST_TYPE_ACCUM_RECV); +@@ -656,13 +612,6 @@ int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((un + MPIR_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_ACCUM_RECV); + MPIR_Assert(rreq->dev.datatype != MPI_DATATYPE_NULL); + +- /* get data from extended header */ +- if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { +- MPIDI_CH3_Ext_pkt_accum_stream_t *ext_hdr = NULL; +- ext_hdr = ((MPIDI_CH3_Ext_pkt_accum_stream_t *) rreq->dev.ext_hdr_ptr); +- stream_offset = ext_hdr->stream_offset; +- } +- + MPIR_Datatype_get_size_macro(rreq->dev.datatype, type_size); + + basic_dtp = rreq->dev.datatype; +@@ -678,7 +627,7 @@ int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((un + if (rreq->dev.tmpbuf_sz == 0) { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, TYPICAL, "SRBuf allocation failure"); + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", + "**nomem %d", MPIDI_CH3U_SRBuf_size); + rreq->status.MPI_ERROR = mpi_errno; + goto fn_fail; +@@ -693,22 +642,16 @@ int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((un + + rreq->dev.recv_data_sz = MPL_MIN(rest_len, stream_elem_count * basic_type_size); + +- rreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); ++ rreq->dev.msg_offset = 0; ++ rreq->dev.msgsize = rreq->dev.recv_data_sz; + +- MPIR_Segment_init(rreq->dev.user_buf, +- (rreq->dev.recv_data_sz / basic_type_size), +- basic_dtp, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = rreq->dev.recv_data_sz; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(rreq->dev.tmpbuf, rreq->dev.recv_data_sz / basic_type_size, basic_dtp, ++ 0, rreq->dev.iov, MPL_IOV_LIMIT, rreq->dev.recv_data_sz, ++ &rreq->dev.iov_count, &actual_iov_bytes); ++ rreq->dev.iov_offset = 0; + +- mpi_errno = MPIDI_CH3U_Request_load_recv_iov(rreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|loadrecviov"); +- } +- if (!rreq->dev.OnDataAvail) +- rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_AccumRecvComplete; ++ rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_AccumRecvComplete; + + *complete = FALSE; + fn_fail: +@@ -717,16 +660,11 @@ int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((un + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc, + MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Datatype*new_dtp = NULL; +- MPIDI_RMA_dtype_info *dtype_info = NULL; + MPI_Aint basic_type_extent, basic_type_size; + MPI_Aint total_len, rest_len, stream_elem_count; + MPI_Aint stream_offset; +@@ -743,24 +681,24 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc, + } + + stream_offset = 0; +- MPIR_Assert(rreq->dev.ext_hdr_ptr != NULL); ++ ++ /* get stream offset */ ++ if (rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { ++ MPIDI_CH3_Ext_pkt_stream_t *ext_hdr = NULL; ++ MPIR_Assert(rreq->dev.ext_hdr_ptr != NULL); ++ ext_hdr = ((MPIDI_CH3_Ext_pkt_stream_t *) rreq->dev.ext_hdr_ptr); ++ stream_offset = ext_hdr->stream_offset; ++ } + + if (MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_GET_ACCUM_RECV_DERIVED_DT) { +- /* get data from extended header */ +- if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { +- MPIDI_CH3_Ext_pkt_get_accum_stream_derived_t *ext_hdr = NULL; +- ext_hdr = ((MPIDI_CH3_Ext_pkt_get_accum_stream_derived_t *) rreq->dev.ext_hdr_ptr); +- stream_offset = ext_hdr->stream_offset; +- dtype_info = &ext_hdr->dtype_info; +- } +- else { +- MPIDI_CH3_Ext_pkt_get_accum_derived_t *ext_hdr = NULL; +- ext_hdr = ((MPIDI_CH3_Ext_pkt_get_accum_derived_t *) rreq->dev.ext_hdr_ptr); +- dtype_info = &ext_hdr->dtype_info; ++ new_dtp = (MPIR_Datatype *) MPIR_Handle_obj_alloc(&MPIR_Datatype_mem); ++ if (!new_dtp) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", ++ "MPIR_Datatype_mem"); + } +- +- /* create derived datatype */ +- create_derived_datatype(rreq, dtype_info, &new_dtp); ++ /* Note: handle is filled in by MPIR_Handle_obj_alloc() */ ++ MPIR_Object_set_ref(new_dtp, 1); ++ MPIR_Typerep_unflatten(new_dtp, rreq->dev.flattened_type); + + /* update new request to get the data */ + MPIDI_Request_set_type(rreq, MPIDI_REQUEST_TYPE_GET_ACCUM_RECV); +@@ -777,13 +715,6 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc, + MPIR_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_GET_ACCUM_RECV); + MPIR_Assert(rreq->dev.datatype != MPI_DATATYPE_NULL); + +- /* get data from extended header */ +- if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { +- MPIDI_CH3_Ext_pkt_get_accum_stream_t *ext_hdr = NULL; +- ext_hdr = ((MPIDI_CH3_Ext_pkt_get_accum_stream_t *) rreq->dev.ext_hdr_ptr); +- stream_offset = ext_hdr->stream_offset; +- } +- + MPIR_Datatype_get_size_macro(rreq->dev.datatype, type_size); + + basic_dtp = rreq->dev.datatype; +@@ -808,7 +739,7 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc, + if (rreq->dev.tmpbuf_sz == 0) { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, TYPICAL, "SRBuf allocation failure"); + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", + "**nomem %d", MPIDI_CH3U_SRBuf_size); + rreq->status.MPI_ERROR = mpi_errno; + goto fn_fail; +@@ -823,22 +754,16 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc, + + rreq->dev.recv_data_sz = MPL_MIN(rest_len, stream_elem_count * basic_type_size); + +- rreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); ++ rreq->dev.msg_offset = 0; ++ rreq->dev.msgsize = rreq->dev.recv_data_sz; + +- MPIR_Segment_init(rreq->dev.user_buf, +- (rreq->dev.recv_data_sz / basic_type_size), +- basic_dtp, rreq->dev.segment_ptr); +- rreq->dev.segment_first = 0; +- rreq->dev.segment_size = rreq->dev.recv_data_sz; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(rreq->dev.tmpbuf, rreq->dev.recv_data_sz / basic_type_size, basic_dtp, ++ 0, rreq->dev.iov, MPL_IOV_LIMIT, rreq->dev.recv_data_sz, ++ &rreq->dev.iov_count, &actual_iov_bytes); ++ rreq->dev.iov_offset = 0; + +- mpi_errno = MPIDI_CH3U_Request_load_recv_iov(rreq); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|loadrecviov"); +- } +- if (!rreq->dev.OnDataAvail) +- rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumRecvComplete; ++ rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumRecvComplete; + + *complete = FALSE; + } +@@ -850,16 +775,11 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc, + + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc, + MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Datatype*new_dtp = NULL; +- MPIDI_RMA_dtype_info *dtype_info = NULL; + MPIDI_CH3_Pkt_t upkt; + MPIDI_CH3_Pkt_get_resp_t *get_resp_pkt = &upkt.get_resp; + MPIR_Request *sreq; +@@ -870,12 +790,17 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc, + + MPIR_Win_get_ptr(rreq->dev.target_win_handle, win_ptr); + +- MPIR_Assert(!(rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP)); ++ MPIR_Assert(!(rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP)); + + /* get data from extended header */ +- dtype_info = &((MPIDI_CH3_Ext_pkt_get_derived_t *) rreq->dev.ext_hdr_ptr)->dtype_info; +- /* create derived datatype */ +- create_derived_datatype(rreq, dtype_info, &new_dtp); ++ new_dtp = (MPIR_Datatype *) MPIR_Handle_obj_alloc(&MPIR_Datatype_mem); ++ if (!new_dtp) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", ++ "MPIR_Datatype_mem"); ++ } ++ /* Note: handle is filled in by MPIR_Handle_obj_alloc() */ ++ MPIR_Object_set_ref(new_dtp, 1); ++ MPIR_Typerep_unflatten(new_dtp, rreq->dev.flattened_type); + + /* create request for sending data */ + sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +@@ -890,31 +815,26 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc, + sreq->dev.datatype = new_dtp->handle; + sreq->dev.datatype_ptr = new_dtp; + sreq->dev.target_win_handle = rreq->dev.target_win_handle; +- sreq->dev.flags = rreq->dev.flags; ++ sreq->dev.pkt_flags = rreq->dev.pkt_flags; + + MPIDI_Pkt_init(get_resp_pkt, MPIDI_CH3_PKT_GET_RESP); + get_resp_pkt->request_handle = rreq->dev.request_handle; + get_resp_pkt->target_rank = win_ptr->comm_ptr->rank; +- get_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; +- +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIR_Segment_alloc"); +- +- MPIR_Segment_init(sreq->dev.user_buf, +- sreq->dev.user_count, sreq->dev.datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = new_dtp->size * sreq->dev.user_count; ++ get_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ get_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (rreq->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ get_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ ++ sreq->dev.msg_offset = 0; ++ sreq->dev.msgsize = new_dtp->size * sreq->dev.user_count; + + /* Because this is in a packet handler, it is already within a critical section */ + /* MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); */ +- mpi_errno = vc->sendNoncontig_fn(vc, sreq, get_resp_pkt, sizeof(*get_resp_pkt)); ++ mpi_errno = vc->sendNoncontig_fn(vc, sreq, get_resp_pkt, sizeof(*get_resp_pkt), ++ NULL, 0); + /* MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); */ + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) { +@@ -941,10 +861,6 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_UnpackUEBufComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_UnpackUEBufComplete(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIR_Request * rreq, int *complete) + { +@@ -982,10 +898,6 @@ int MPIDI_CH3_ReqHandler_UnpackUEBufComplete(MPIDI_VC_t * vc ATTRIBUTE((unused)) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_UnpackSRBufComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_UnpackSRBufComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; +@@ -1024,10 +936,6 @@ int MPIDI_CH3_ReqHandler_UnpackSRBufComplete(MPIDI_VC_t * vc, MPIR_Request * rre + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_UnpackSRBufReloadIOV +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_UnpackSRBufReloadIOV(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIR_Request * rreq, int *complete) + { +@@ -1047,10 +955,6 @@ int MPIDI_CH3_ReqHandler_UnpackSRBufReloadIOV(MPIDI_VC_t * vc ATTRIBUTE((unused) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_ReloadIOV +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_ReloadIOV(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIR_Request * rreq, int *complete) + { +@@ -1072,67 +976,6 @@ int MPIDI_CH3_ReqHandler_ReloadIOV(MPIDI_VC_t * vc ATTRIBUTE((unused)), + /* ----------------------------------------------------------------------- */ + /* ----------------------------------------------------------------------- */ + +-#undef FUNCNAME +-#define FUNCNAME create_derived_datatype +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int create_derived_datatype(MPIR_Request * req, MPIDI_RMA_dtype_info * dtype_info, +- MPIR_Datatype** dtp) +-{ +- MPIR_Datatype*new_dtp; +- int mpi_errno = MPI_SUCCESS; +- MPI_Aint ptrdiff; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CREATE_DERIVED_DATATYPE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CREATE_DERIVED_DATATYPE); +- +- /* allocate new datatype object and handle */ +- new_dtp = (MPIR_Datatype*) MPIR_Handle_obj_alloc(&MPIR_Datatype_mem); +- if (!new_dtp) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Datatype_mem"); +- } +- +- *dtp = new_dtp; +- +- /* Note: handle is filled in by MPIR_Handle_obj_alloc() */ +- MPIR_Object_set_ref(new_dtp, 1); +- new_dtp->is_permanent = 0; +- new_dtp->is_committed = 1; +- new_dtp->attributes = 0; +- new_dtp->cache_id = 0; +- new_dtp->name[0] = 0; +- new_dtp->is_contig = dtype_info->is_contig; +- new_dtp->max_contig_blocks = dtype_info->max_contig_blocks; +- new_dtp->size = dtype_info->size; +- new_dtp->extent = dtype_info->extent; +- new_dtp->dataloop_size = dtype_info->dataloop_size; +- new_dtp->dataloop_depth = dtype_info->dataloop_depth; +- new_dtp->basic_type = dtype_info->basic_type; +- /* set dataloop pointer */ +- new_dtp->dataloop = req->dev.dataloop; +- +- new_dtp->ub = dtype_info->ub; +- new_dtp->lb = dtype_info->lb; +- new_dtp->true_ub = dtype_info->true_ub; +- new_dtp->true_lb = dtype_info->true_lb; +- new_dtp->has_sticky_ub = dtype_info->has_sticky_ub; +- new_dtp->has_sticky_lb = dtype_info->has_sticky_lb; +- /* update pointers in dataloop */ +- ptrdiff = (MPI_Aint) ((char *) (new_dtp->dataloop) - (char *) +- (dtype_info->dataloop)); +- +- MPIR_Dataloop_update(new_dtp->dataloop, ptrdiff); +- +- new_dtp->contents = NULL; +- +- fn_fail: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CREATE_DERIVED_DATATYPE); +- +- return mpi_errno; +-} +- +- + static inline int perform_put_in_lock_queue(MPIR_Win * win_ptr, + MPIDI_RMA_Target_lock_entry_t * target_lock_entry) + { +@@ -1164,7 +1007,7 @@ static inline int perform_put_in_lock_queue(MPIR_Win * win_ptr, + /* do final action */ + mpi_errno = + finish_op_on_target(win_ptr, target_lock_entry->vc, FALSE /* has no response data */ , +- put_pkt->flags, put_pkt->source_win_handle); ++ put_pkt->pkt_flags, put_pkt->source_win_handle); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -1206,26 +1049,26 @@ static inline int perform_get_in_lock_queue(MPIR_Win * win_ptr, + sreq->dev.OnFinal = MPIDI_CH3_ReqHandler_GetSendComplete; + + sreq->dev.target_win_handle = win_ptr->handle; +- sreq->dev.flags = get_pkt->flags; ++ sreq->dev.pkt_flags = get_pkt->pkt_flags; + + /* here we increment the Active Target counter to guarantee the GET-like + * operation are completed when counter reaches zero. */ + win_ptr->at_completion_counter++; + +- if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { ++ if (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { + MPIDI_Pkt_init(get_resp_pkt, MPIDI_CH3_PKT_GET_RESP_IMMED); + } + else { + MPIDI_Pkt_init(get_resp_pkt, MPIDI_CH3_PKT_GET_RESP); + } + get_resp_pkt->request_handle = get_pkt->request_handle; +- get_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ get_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ get_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ get_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + get_resp_pkt->target_rank = win_ptr->comm_ptr->rank; + + /* length of target data */ +@@ -1234,7 +1077,7 @@ static inline int perform_get_in_lock_queue(MPIR_Win * win_ptr, + + MPIR_Datatype_is_contig(get_pkt->datatype, &is_contig); + +- if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { ++ if (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { + void *src = (void *) (get_pkt->addr), *dest = (void *) &get_resp_pkt->info.data; + mpi_errno = immed_copy(src, dest, len); + if (mpi_errno != MPI_SUCCESS) +@@ -1268,17 +1111,15 @@ static inline int perform_get_in_lock_queue(MPIR_Win * win_ptr, + iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt; + iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt); + +- sreq->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- +- MPIR_Segment_init(get_pkt->addr, get_pkt->count, +- get_pkt->datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = get_pkt->count * type_size; ++ sreq->dev.user_buf = get_pkt->addr; ++ sreq->dev.user_count = get_pkt->count; ++ sreq->dev.datatype = get_pkt->datatype; ++ sreq->dev.msg_offset = 0; ++ sreq->dev.msgsize = get_pkt->count * type_size; + + mpi_errno = target_lock_entry->vc->sendNoncontig_fn(target_lock_entry->vc, sreq, +- iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN); ++ iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN, ++ NULL, 0); + MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); + } + +@@ -1300,14 +1141,15 @@ static inline int perform_acc_in_lock_queue(MPIR_Win * win_ptr, + /* Piggyback candidate should have basic datatype for target datatype. */ + MPIR_Assert(MPIR_DATATYPE_IS_PREDEFINED(acc_pkt->datatype)); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + if (acc_pkt->type == MPIDI_CH3_PKT_ACCUMULATE_IMMED) { + /* All data fits in packet header */ + mpi_errno = do_accumulate_op((void *) &acc_pkt->info.data, acc_pkt->count, + acc_pkt->datatype, acc_pkt->addr, acc_pkt->count, +- acc_pkt->datatype, 0, acc_pkt->op); ++ acc_pkt->datatype, 0, acc_pkt->op, MPIDI_RMA_ACC_SRCBUF_DEFAULT); + } + else { + MPIR_Assert(acc_pkt->type == MPIDI_CH3_PKT_ACCUMULATE); +@@ -1326,18 +1168,19 @@ static inline int perform_acc_in_lock_queue(MPIR_Win * win_ptr, + MPIR_Assert(recv_count == (int) recv_count); + mpi_errno = do_accumulate_op(target_lock_entry->data, (int) recv_count, acc_pkt->datatype, + acc_pkt->addr, acc_pkt->count, acc_pkt->datatype, +- 0, acc_pkt->op); ++ 0, acc_pkt->op, MPIDI_RMA_ACC_SRCBUF_DEFAULT); + } + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + + mpi_errno = + finish_op_on_target(win_ptr, target_lock_entry->vc, FALSE /* has no response data */ , +- acc_pkt->flags, acc_pkt->source_win_handle); ++ acc_pkt->pkt_flags, acc_pkt->source_win_handle); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -1382,7 +1225,7 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr, + sreq->dev.OnFinal = MPIDI_CH3_ReqHandler_GaccumSendComplete; + + sreq->dev.target_win_handle = win_ptr->handle; +- sreq->dev.flags = get_accum_pkt->flags; ++ sreq->dev.pkt_flags = get_accum_pkt->pkt_flags; + + /* Copy data into a temporary buffer */ + MPIR_Datatype_get_size_macro(get_accum_pkt->datatype, type_size); +@@ -1393,20 +1236,21 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr, + if (get_accum_pkt->type == MPIDI_CH3_PKT_GET_ACCUM_IMMED) { + MPIDI_Pkt_init(get_accum_resp_pkt, MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED); + get_accum_resp_pkt->request_handle = get_accum_pkt->request_handle; +- get_accum_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ get_accum_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ get_accum_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ get_accum_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + get_accum_resp_pkt->target_rank = win_ptr->comm_ptr->rank; + + + /* NOTE: copy 'data + ACC' needs to be atomic */ + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + /* Copy data from target window to response packet header */ + +@@ -1414,8 +1258,9 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr, + (void *) &(get_accum_resp_pkt->info.data); + mpi_errno = immed_copy(src, dest, len); + if (mpi_errno != MPI_SUCCESS) { +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + MPIR_ERR_POP(mpi_errno); + } + +@@ -1425,10 +1270,12 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr, + mpi_errno = + do_accumulate_op((void *) &get_accum_pkt->info.data, get_accum_pkt->count, + get_accum_pkt->datatype, get_accum_pkt->addr, get_accum_pkt->count, +- get_accum_pkt->datatype, 0, get_accum_pkt->op); ++ get_accum_pkt->datatype, 0, get_accum_pkt->op, ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); +@@ -1465,8 +1312,9 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr, + + /* NOTE: 'copy data + ACC' needs to be atomic */ + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + /* Copy data from target window to temporary buffer */ + +@@ -1477,19 +1325,10 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr, + MPIR_Memcpy(sreq->dev.user_buf, get_accum_pkt->addr, recv_count * type_size); + } + else { +- MPIR_Segment *seg = MPIR_Segment_alloc(); +- MPI_Aint first = 0; +- MPI_Aint last = first + type_size * recv_count; +- +- if (seg == NULL) { +- if (win_ptr->shm_allocated == TRUE) +- MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); +- } +- MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment"); +- MPIR_Segment_init(get_accum_pkt->addr, get_accum_pkt->count, get_accum_pkt->datatype, seg); +- MPIR_Segment_pack(seg, first, &last, sreq->dev.user_buf); +- MPIR_Segment_free(seg); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(get_accum_pkt->addr, get_accum_pkt->count, get_accum_pkt->datatype, ++ 0, sreq->dev.user_buf, type_size * recv_count, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes == type_size * recv_count); + } + + /* Perform ACCUMULATE OP */ +@@ -1497,10 +1336,11 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr, + MPIR_Assert(recv_count == (int) recv_count); + mpi_errno = do_accumulate_op(target_lock_entry->data, (int) recv_count, get_accum_pkt->datatype, + get_accum_pkt->addr, get_accum_pkt->count, get_accum_pkt->datatype, +- 0, get_accum_pkt->op); ++ 0, get_accum_pkt->op, MPIDI_RMA_ACC_SRCBUF_DEFAULT); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); +@@ -1511,13 +1351,13 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr, + + MPIDI_Pkt_init(get_accum_resp_pkt, MPIDI_CH3_PKT_GET_ACCUM_RESP); + get_accum_resp_pkt->request_handle = get_accum_pkt->request_handle; +- get_accum_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ get_accum_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ get_accum_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ get_accum_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + get_accum_resp_pkt->target_rank = win_ptr->comm_ptr->rank; + + iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_accum_resp_pkt; +@@ -1574,13 +1414,13 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr, + + fop_resp_pkt->request_handle = fop_pkt->request_handle; + fop_resp_pkt->target_rank = win_ptr->comm_ptr->rank; +- fop_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ fop_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (fop_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ fop_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ fop_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((fop_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (fop_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ fop_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + + if (fop_pkt->type == MPIDI_CH3_PKT_FOP) { + resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +@@ -1593,7 +1433,7 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr, + resp_req->dev.OnFinal = MPIDI_CH3_ReqHandler_FOPSendComplete; + + resp_req->dev.target_win_handle = win_ptr->handle; +- resp_req->dev.flags = fop_pkt->flags; ++ resp_req->dev.pkt_flags = fop_pkt->pkt_flags; + + resp_req->dev.user_buf = (void *) MPL_malloc(type_size, MPL_MEM_BUFFER); + +@@ -1604,8 +1444,9 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr, + + /* NOTE: 'copy data + ACC' needs to be atomic */ + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + /* Copy data from target window to temporary buffer / response packet header */ + +@@ -1614,8 +1455,9 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr, + void *src = fop_pkt->addr, *dest = (void *) &fop_resp_pkt->info.data; + mpi_errno = immed_copy(src, dest, type_size); + if (mpi_errno != MPI_SUCCESS) { +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + MPIR_ERR_POP(mpi_errno); + } + } +@@ -1623,32 +1465,27 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr, + MPIR_Memcpy(resp_req->dev.user_buf, fop_pkt->addr, type_size); + } + else { +- MPIR_Segment *seg = MPIR_Segment_alloc(); +- MPI_Aint last = type_size; +- +- if (seg == NULL) { +- if (win_ptr->shm_allocated == TRUE) +- MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); +- } +- MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment"); +- MPIR_Segment_init(fop_pkt->addr, 1, fop_pkt->datatype, seg); +- MPIR_Segment_pack(seg, 0, &last, resp_req->dev.user_buf); +- MPIR_Segment_free(seg); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(fop_pkt->addr, 1, fop_pkt->datatype, 0, resp_req->dev.user_buf, ++ type_size, &actual_pack_bytes); ++ MPIR_Assert(actual_pack_bytes == type_size); + } + + /* Apply the op */ + if (fop_pkt->type == MPIDI_CH3_PKT_FOP_IMMED) { + mpi_errno = do_accumulate_op((void *) &fop_pkt->info.data, 1, fop_pkt->datatype, +- fop_pkt->addr, 1, fop_pkt->datatype, 0, fop_pkt->op); ++ fop_pkt->addr, 1, fop_pkt->datatype, 0, fop_pkt->op, ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT); + } + else { + mpi_errno = do_accumulate_op(target_lock_entry->data, 1, fop_pkt->datatype, +- fop_pkt->addr, 1, fop_pkt->datatype, 0, fop_pkt->op); ++ fop_pkt->addr, 1, fop_pkt->datatype, 0, fop_pkt->op, ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT); + } + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); +@@ -1667,7 +1504,7 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr, + /* sending process is not completed, set proper OnDataAvail + * (it is initialized to NULL by lower layer) */ + resp_req->dev.target_win_handle = fop_pkt->target_win_handle; +- resp_req->dev.flags = fop_pkt->flags; ++ resp_req->dev.pkt_flags = fop_pkt->pkt_flags; + resp_req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_FOPSendComplete; + + /* here we increment the Active Target counter to guarantee the GET-like +@@ -1699,7 +1536,7 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr, + + /* do final action */ + mpi_errno = finish_op_on_target(win_ptr, target_lock_entry->vc, TRUE /* has response data */ , +- fop_pkt->flags, MPI_WIN_NULL); ++ fop_pkt->pkt_flags, MPI_WIN_NULL); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -1729,20 +1566,21 @@ static inline int perform_cas_in_lock_queue(MPIR_Win * win_ptr, + MPIDI_Pkt_init(cas_resp_pkt, MPIDI_CH3_PKT_CAS_RESP_IMMED); + cas_resp_pkt->request_handle = cas_pkt->request_handle; + cas_resp_pkt->target_rank = win_ptr->comm_ptr->rank; +- cas_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ cas_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (cas_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ cas_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ cas_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((cas_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (cas_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ cas_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + + /* Copy old value into the response packet */ + MPIR_Datatype_get_size_macro(cas_pkt->datatype, len); + MPIR_Assert(len <= sizeof(MPIDI_CH3_CAS_Immed_u)); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + MPIR_Memcpy((void *) &cas_resp_pkt->info.data, cas_pkt->addr, len); + +@@ -1751,8 +1589,9 @@ static inline int perform_cas_in_lock_queue(MPIR_Win * win_ptr, + MPIR_Memcpy(cas_pkt->addr, &cas_pkt->origin_data, len); + } + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + /* Send the response packet */ + MPID_THREAD_CS_ENTER(POBJ, target_lock_entry->vc->pobj_mutex); +@@ -1767,7 +1606,7 @@ static inline int perform_cas_in_lock_queue(MPIR_Win * win_ptr, + /* sending process is not completed, set proper OnDataAvail + * (it is initialized to NULL by lower layer) */ + send_req->dev.target_win_handle = cas_pkt->target_win_handle; +- send_req->dev.flags = cas_pkt->flags; ++ send_req->dev.pkt_flags = cas_pkt->pkt_flags; + send_req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_CASSendComplete; + + /* here we increment the Active Target counter to guarantee the GET-like +@@ -1783,7 +1622,7 @@ static inline int perform_cas_in_lock_queue(MPIR_Win * win_ptr, + + /* do final action */ + mpi_errno = finish_op_on_target(win_ptr, target_lock_entry->vc, TRUE /* has response data */ , +- cas_pkt->flags, MPI_WIN_NULL); ++ cas_pkt->pkt_flags, MPI_WIN_NULL); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -1878,10 +1717,6 @@ static int entered_count = 0; + + /* Release the current lock on the window and grant the next lock in the + queue if any */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Release_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Release_lock(MPIR_Win * win_ptr) + { + MPIDI_RMA_Target_lock_entry_t *target_lock_entry, *target_lock_entry_next; +@@ -1934,12 +1769,12 @@ int MPIDI_CH3I_Release_lock(MPIR_Win * win_ptr) + target_lock_entry_next = target_lock_entry->next; + + if (target_lock_entry->all_data_recved) { +- MPIDI_CH3_Pkt_flags_t flags; +- MPIDI_CH3_PKT_RMA_GET_FLAGS(target_lock_entry->pkt, flags, mpi_errno); +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED) ++ int pkt_flags; ++ MPIDI_CH3_PKT_RMA_GET_FLAGS(target_lock_entry->pkt, pkt_flags, mpi_errno); ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED) + requested_lock = MPI_LOCK_SHARED; + else { +- MPIR_Assert(flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); ++ MPIR_Assert(pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); + requested_lock = MPI_LOCK_EXCLUSIVE; + } + if (MPIDI_CH3I_Try_acquire_win_lock(win_ptr, requested_lock) == 1) { +@@ -1979,17 +1814,13 @@ int MPIDI_CH3I_Release_lock(MPIR_Win * win_ptr) + + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete(MPIDI_VC_t * vc, + MPIR_Request * rreq, int *complete) + { + int requested_lock; + MPI_Win target_win_handle; + MPIR_Win *win_ptr = NULL; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + MPIDI_RMA_Target_lock_entry_t *target_lock_queue_entry = rreq->dev.target_lock_queue_entry; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_PIGGYBACKLOCKOPRECVCOMPLETE); +@@ -2007,25 +1838,18 @@ int MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete(MPIDI_VC_t * vc, + target_lock_queue_entry->all_data_recved = 1; + + /* try to acquire the lock here */ +- MPIDI_CH3_PKT_RMA_GET_FLAGS(target_lock_queue_entry->pkt, flags, mpi_errno); ++ MPIDI_CH3_PKT_RMA_GET_FLAGS(target_lock_queue_entry->pkt, pkt_flags, mpi_errno); + MPIDI_CH3_PKT_RMA_GET_TARGET_WIN_HANDLE(target_lock_queue_entry->pkt, target_win_handle, + mpi_errno); + MPIR_Win_get_ptr(target_win_handle, win_ptr); + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM && ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM && + (rreq->dev.target_lock_queue_entry)->data != NULL) { + + MPIR_Assert(target_lock_queue_entry->pkt.type == MPIDI_CH3_PKT_ACCUMULATE || + target_lock_queue_entry->pkt.type == MPIDI_CH3_PKT_GET_ACCUM); + +- int ext_hdr_sz; +- +- /* only basic datatype may contain piggyback lock. +- * Thus we do not check extended header type for derived case.*/ +- if (target_lock_queue_entry->pkt.type == MPIDI_CH3_PKT_ACCUMULATE) +- ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_accum_stream_t); +- else +- ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_get_accum_stream_t); ++ int ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_stream_t); + + /* here we drop the stream_offset received, because the stream unit that piggybacked with + * LOCK must be the first stream unit, with stream_offset equals to 0. */ +@@ -2035,11 +1859,11 @@ int MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete(MPIDI_VC_t * vc, + rreq->dev.recv_data_sz); + } + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED) { + requested_lock = MPI_LOCK_SHARED; + } + else { +- MPIR_Assert(flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); ++ MPIR_Assert(pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); + requested_lock = MPI_LOCK_EXCLUSIVE; + } + +--- a/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c ++++ b/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Revoke +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Revoke(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, + void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **rreqp) +--- a/src/mpid/ch3/src/ch3u_handle_send_req.c ++++ b/src/mpid/ch3/src/ch3u_handle_send_req.c +@@ -7,10 +7,6 @@ + #include "mpidimpl.h" + #include "mpidrma.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Handle_send_req +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Handle_send_req(MPIDI_VC_t * vc, MPIR_Request * sreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; +@@ -53,7 +49,7 @@ int MPIDI_CH3_ReqHandler_GetSendComplete(MPIDI_VC_t * vc ATTRIBUTE((unused)), + { + int mpi_errno = MPI_SUCCESS; + MPIR_Win *win_ptr; +- MPIDI_CH3_Pkt_flags_t flags = sreq->dev.flags; ++ int pkt_flags = sreq->dev.pkt_flags; + + /* NOTE: It is possible that this request is already completed before + * entering this handler. This happens when this req handler is called +@@ -91,7 +87,7 @@ int MPIDI_CH3_ReqHandler_GetSendComplete(MPIDI_VC_t * vc ATTRIBUTE((unused)), + * on the same request again (in release_lock()). Marking this request as + * completed will prevent us from processing the same request twice. */ + mpi_errno = finish_op_on_target(win_ptr, vc, TRUE /* has response data */ , +- flags, MPI_WIN_NULL); ++ pkt_flags, MPI_WIN_NULL); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -103,15 +99,11 @@ int MPIDI_CH3_ReqHandler_GetSendComplete(MPIDI_VC_t * vc ATTRIBUTE((unused)), + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_GaccumSendComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_GaccumSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Win *win_ptr; +- MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags; ++ int pkt_flags = rreq->dev.pkt_flags; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_GACCUMSENDCOMPLETE); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_GACCUMSENDCOMPLETE); +@@ -137,8 +129,7 @@ int MPIDI_CH3_ReqHandler_GaccumSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + /* This function is triggered when sending back process of GACC/FOP/CAS + * is finished. Only GACC used user_buf. FOP and CAS can fit all data + * in response packet. */ +- if (rreq->dev.user_buf != NULL) +- MPL_free(rreq->dev.user_buf); ++ MPL_free(rreq->dev.user_buf); + + MPIR_Win_get_ptr(rreq->dev.target_win_handle, win_ptr); + +@@ -157,7 +148,7 @@ int MPIDI_CH3_ReqHandler_GaccumSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + * on the same request again (in release_lock()). Marking this request as + * completed will prevent us from processing the same request twice. */ + mpi_errno = finish_op_on_target(win_ptr, vc, TRUE /* has response data */ , +- flags, MPI_WIN_NULL); ++ pkt_flags, MPI_WIN_NULL); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -172,15 +163,11 @@ int MPIDI_CH3_ReqHandler_GaccumSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_CASSendComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_CASSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Win *win_ptr; +- MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags; ++ int pkt_flags = rreq->dev.pkt_flags; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_CASSENDCOMPLETE); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_CASSENDCOMPLETE); +@@ -206,8 +193,7 @@ int MPIDI_CH3_ReqHandler_CASSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + /* This function is triggered when sending back process of GACC/FOP/CAS + * is finished. Only GACC used user_buf. FOP and CAS can fit all data + * in response packet. */ +- if (rreq->dev.user_buf != NULL) +- MPL_free(rreq->dev.user_buf); ++ MPL_free(rreq->dev.user_buf); + + MPIR_Win_get_ptr(rreq->dev.target_win_handle, win_ptr); + +@@ -226,7 +212,7 @@ int MPIDI_CH3_ReqHandler_CASSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + * on the same request again (in release_lock()). Marking this request as + * completed will prevent us from processing the same request twice. */ + mpi_errno = finish_op_on_target(win_ptr, vc, TRUE /* has response data */ , +- flags, MPI_WIN_NULL); ++ pkt_flags, MPI_WIN_NULL); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -240,15 +226,11 @@ int MPIDI_CH3_ReqHandler_CASSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ReqHandler_FOPSendComplete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_ReqHandler_FOPSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, int *complete) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Win *win_ptr; +- MPIDI_CH3_Pkt_flags_t flags = rreq->dev.flags; ++ int pkt_flags = rreq->dev.pkt_flags; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPSENDCOMPLETE); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPSENDCOMPLETE); +@@ -274,8 +256,7 @@ int MPIDI_CH3_ReqHandler_FOPSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + /* This function is triggered when sending back process of GACC/FOP/CAS + * is finished. Only GACC used user_buf. FOP and CAS can fit all data + * in response packet. */ +- if (rreq->dev.user_buf != NULL) +- MPL_free(rreq->dev.user_buf); ++ MPL_free(rreq->dev.user_buf); + + MPIR_Win_get_ptr(rreq->dev.target_win_handle, win_ptr); + +@@ -294,7 +275,7 @@ int MPIDI_CH3_ReqHandler_FOPSendComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i + * on the same request again (in release_lock()). Marking this request as + * completed will prevent us from processing the same request twice. */ + mpi_errno = finish_op_on_target(win_ptr, vc, TRUE /* has response data */ , +- flags, MPI_WIN_NULL); ++ pkt_flags, MPI_WIN_NULL); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +--- a/src/mpid/ch3/src/ch3u_port.c ++++ b/src/mpid/ch3/src/ch3u_port.c +@@ -247,10 +247,6 @@ static MPIDI_CH3I_Port_connreq_q_t revoked_connreq_q = {NULL, NULL, 0}; + * connect and accept. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Create_inter_root_communicator_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_Create_inter_root_communicator_connect(const char *port_name, + int timeout, MPIR_Comm **comm_pptr, + MPIDI_VC_t **vc_pptr) +@@ -373,10 +369,6 @@ static int MPIDI_Create_inter_root_communicator_connect(const char *port_name, + /* Creates a communicator for the purpose of communicating with one other + process (the root of the other group). It also returns the virtual + connection */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Create_inter_root_communicator_accept +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_Create_inter_root_communicator_accept(const char *port_name, + MPIR_Comm **comm_pptr, + MPIDI_VC_t **vc_pptr) +@@ -504,10 +496,6 @@ fn_fail: + /* This is a utility routine used to initialize temporary communicators + used in connect/accept operations, and is only used in the above two + routines */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Initialize_tmp_comm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Initialize_tmp_comm(MPIR_Comm **comm_pptr, + MPIDI_VC_t *vc_ptr, int is_low_group, int context_id_offset) + { +@@ -603,10 +591,6 @@ fn_fail: + because there can be multiple process groups on each side. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Comm_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_Comm_connect(const char *port_name, MPIR_Info *info, int root, + MPIR_Comm *comm_ptr, MPIR_Comm **newcomm) + { +@@ -864,10 +848,6 @@ int MPIDI_Comm_connect(const char *port_name, MPIR_Info *info, int root, + * all of the process groups that have made up the communicator that + * will define the "remote group". + */ +-#undef FUNCNAME +-#define FUNCNAME ExtractLocalPGInfo +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int ExtractLocalPGInfo( MPIR_Comm *comm_p, + pg_translation local_translation[], + pg_node **pg_list_p, +@@ -971,10 +951,6 @@ static int ExtractLocalPGInfo( MPIR_Comm *comm_p, + process groups and then distributes them to the other processes + in comm_ptr. + See SendPGToPeer for the routine that sends the descriptions */ +-#undef FUNCNAME +-#define FUNCNAME ReceivePGAndDistribute +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int ReceivePGAndDistribute( MPIR_Comm *tmp_comm, MPIR_Comm *comm_ptr, + int root, int *recvtag_p, + int n_remote_pgs, MPIDI_PG_t *remote_pg[] ) +@@ -1050,10 +1026,6 @@ static int ReceivePGAndDistribute( MPIR_Comm *tmp_comm, MPIR_Comm *comm_ptr, + all processes in comm. The process with rank root in comm is the + process in peercomm from which the process groups are taken. This routine + is collective over comm_p . */ +-#undef FUNCNAME +-#define FUNCNAME MPID_PG_BCast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_PG_BCast( MPIR_Comm *peercomm_p, MPIR_Comm *comm_p, int root ) + { + int n_local_pgs=0, mpi_errno = MPI_SUCCESS; +@@ -1138,9 +1110,7 @@ int MPID_PG_BCast( MPIR_Comm *peercomm_p, MPIR_Comm *comm_p, int root ) + while (pg_list) { + pg_next = pg_list->next; + MPL_free( pg_list->str ); +- if (pg_list->pg_id ) { +- MPL_free( pg_list->pg_id ); +- } ++ MPL_free( pg_list->pg_id ); + MPL_free( pg_list ); + pg_list = pg_next; + } +@@ -1154,10 +1124,6 @@ int MPID_PG_BCast( MPIR_Comm *peercomm_p, MPIR_Comm *comm_p, int root ) + + /* Sends the process group information to the peer and frees the + pg_list */ +-#undef FUNCNAME +-#define FUNCNAME SendPGtoPeerAndFree +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int SendPGtoPeerAndFree( MPIR_Comm *tmp_comm, int *sendtag_p, + pg_node *pg_list ) + { +@@ -1216,10 +1182,6 @@ static int SendPGtoPeerAndFree( MPIR_Comm *tmp_comm, int *sendtag_p, + process groups on each side. + + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Comm_accept +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_Comm_accept(const char *port_name, MPIR_Info *info, int root, + MPIR_Comm *comm_ptr, MPIR_Comm **newcomm) + { +@@ -1437,10 +1399,6 @@ Input/Output Parameters: + Note: + This routine performance a barrier over 'comm_ptr'. Why? + */ +-#undef FUNCNAME +-#define FUNCNAME SetupNewIntercomm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int SetupNewIntercomm( MPIR_Comm *comm_ptr, int remote_comm_size, + pg_translation remote_translation[], + MPIDI_PG_t **remote_pg, +@@ -1494,10 +1452,6 @@ static int SetupNewIntercomm( MPIR_Comm *comm_ptr, int remote_comm_size, + + /* Free new_vc. It was explicitly allocated in MPIDI_CH3_Connect_to_root. */ + /* FIXME: The free and the create routines should be in the same file */ +-#undef FUNCNAME +-#define FUNCNAME FreeNewVC +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int FreeNewVC( MPIDI_VC_t *new_vc ) + { + MPID_Progress_state progress_state; +@@ -1549,10 +1503,6 @@ static int FreeNewVC( MPIDI_VC_t *new_vc ) + * enqueue the request to that port's accept queue to wait for an accept call to + * serve it; otherwise, such request should be discarded, thus we immediately send + * nack back to client and start closing. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Acceptq_enqueue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Acceptq_enqueue(MPIDI_VC_t * vc, int port_name_tag ) + { + int mpi_errno=MPI_SUCCESS; +@@ -1613,10 +1563,6 @@ int MPIDI_CH3I_Acceptq_enqueue(MPIDI_VC_t * vc, int port_name_tag ) + + /* Attempt to dequeue a connection request from the accept queue. If the queue + * is empty return a NULL object. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Acceptq_dequeue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Acceptq_dequeue(MPIDI_CH3I_Port_connreq_t ** connreq_ptr, int port_name_tag) + { + int mpi_errno=MPI_SUCCESS; +@@ -1645,10 +1591,6 @@ int MPIDI_CH3I_Acceptq_dequeue(MPIDI_CH3I_Port_connreq_t ** connreq_ptr, int por + * MPIDI_CH3I_Port_destroy(close_port) and MPIDI_Port_finalize (finalize). + * Note that we already deleted port from active_port queue before cleaning up + * its accept queue, thus no new VC can be enqueued concurrently. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Acceptq_cleanup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Acceptq_cleanup(MPIDI_CH3I_Port_connreq_q_t * accept_connreq_q) + { + int mpi_errno = MPI_SUCCESS; +@@ -1690,10 +1632,6 @@ static int MPIDI_CH3I_Acceptq_cleanup(MPIDI_CH3I_Port_connreq_q_t * accept_connr + * We do not want to wait for these VCs being freed in timed out connect, + * because it is blocked till the server calls a matching accept or close_port. + * This routine is called in finalize on client process. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Revokeq_cleanup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Revokeq_cleanup(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -1733,10 +1671,6 @@ static int MPIDI_CH3I_Revokeq_cleanup(void) + /*** Packet handlers exposed to progress engine ***/ + + /* Packet handler to handle response (connection ACK) on client process. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_ConnAck +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_ConnAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -1814,10 +1748,6 @@ int MPIDI_CH3_PktHandler_ConnAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + } + + /* Packet handler to handle response (acceptance ACK) on server process. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_AcceptAck +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_AcceptAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -1861,10 +1791,6 @@ int MPIDI_CH3_PktHandler_AcceptAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + + /*** Routines for connection request creation and freeing ***/ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_connreq_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Port_connreq_create(MPIDI_VC_t * vc, MPIDI_CH3I_Port_connreq_t ** connreq_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -1893,10 +1819,6 @@ static int MPIDI_CH3I_Port_connreq_create(MPIDI_VC_t * vc, MPIDI_CH3I_Port_connr + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_connreq_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_CH3I_Port_connreq_free(MPIDI_CH3I_Port_connreq_t * connreq) + { + int mpi_errno = MPI_SUCCESS; +@@ -1928,10 +1850,6 @@ static int MPIDI_CH3I_Port_connreq_free(MPIDI_CH3I_Port_connreq_t * connreq) + /*** Routines to initialize / destroy dynamic connection ***/ + + /* Initialize port's accept queue. It is called in MPIDI_Open_port. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Port_init(int port_name_tag) + { + int mpi_errno = MPI_SUCCESS; +@@ -1962,10 +1880,6 @@ int MPIDI_CH3I_Port_init(int port_name_tag) + } + + /* Destroy port's accept queue. It is called in MPIDI_Close_port. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Port_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Port_destroy(int port_name_tag) + { + int mpi_errno = MPI_SUCCESS; +@@ -1994,10 +1908,6 @@ int MPIDI_CH3I_Port_destroy(int port_name_tag) + } + + /* This routine is called by MPID_Finalize to clean up dynamic connections. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Port_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_Port_finalize(void) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/ch3u_recvq.c ++++ b/src/mpid/ch3/src/ch3u_recvq.c +@@ -102,10 +102,6 @@ static MPIR_T_pvar_timer_t PVAR_TIMER_time_matching_unexpectedq ATTRIBUTE((unuse + /* used in ch3u_eager.c and ch3u_handle_recv_pkt.c */ + unsigned long long PVAR_LEVEL_unexpected_recvq_buffer_size ATTRIBUTE((unused)); + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Recvq_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Recvq_init(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -207,10 +203,6 @@ fn_fail: + * This routine is used only in mpid_iprobe and mpid_probe + * + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Recvq_FU +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Recvq_FU(int source, int tag, int context_id, MPI_Status *s) + { + MPIR_Request * rreq; +@@ -286,10 +278,6 @@ int MPIDI_CH3U_Recvq_FU(int source, int tag, int context_id, MPI_Status *s) + * This routine is used only in the case of send_cancel. However, it is used both + * within mpid_send_cancel and within a packet handler. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Recvq_FDU +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPIR_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request sreq_id, + MPIDI_Message_match * match) + { +@@ -369,10 +357,6 @@ MPIR_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request sreq_id, + /* This is the routine that you expect to be named "_FDU". It implements the + * behavior needed for improbe; specifically, searching the receive queue for + * the first matching request and dequeueing it. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Recvq_FDU_matchonly +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPIR_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_id, MPIR_Comm *comm, int *foundp) + { + int found = FALSE; +@@ -486,10 +470,6 @@ lock_exit: + * This routine is used in mpid_irecv and mpid_recv. + * + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Recvq_FDU_or_AEP +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPIR_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag, + int context_id, MPIR_Comm *comm, void *user_buf, + MPI_Aint user_count, MPI_Datatype datatype, int * foundp) +@@ -665,10 +645,6 @@ MPIR_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag, + * + * Multithread - This routine is atomic + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Recvq_DP +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Recvq_DP(MPIR_Request * rreq) + { + int found; +@@ -738,10 +714,6 @@ int MPIDI_CH3U_Recvq_DP(MPIR_Request * rreq) + * do not use the MSGQUEUE CS, because in the brief-global mode, that + * simply uses the global_mutex . + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Recvq_FDP_or_AEU +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPIR_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match, + int * foundp) + { +@@ -869,10 +841,6 @@ static inline int req_uses_vc(const MPIR_Request* req, const MPIDI_VC_t *vc) + return vc == vc1; + } + +-#undef FUNCNAME +-#define FUNCNAME dequeue_and_set_error +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* This dequeues req from the posted recv queue, set req's error code to comm_fail, and updates the req pointer. + Note that this creates a new error code if one hasn't already been created (i.e., if *error is MPI_SUCCESS). */ + static inline void dequeue_and_set_error(MPIR_Request **req, MPIR_Request *prev_req, MPIR_Request **head, MPIR_Request **tail, int *error, int rank) +@@ -1119,10 +1087,6 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Complete_posted_with_error +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Complete_posted_with_error(MPIDI_VC_t *vc) + { + int mpi_errno = MPI_SUCCESS; +@@ -1191,10 +1155,6 @@ void MPIDI_CH3U_Dbg_print_recvq(FILE *stream); + + /* This function can be called by a debugger to dump the recvq state to the + * given stream. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Dbg_print_recvq +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIDI_CH3U_Dbg_print_recvq(FILE *stream) + { + MPIR_Request * rreq; +@@ -1245,10 +1205,6 @@ void MPIDI_CH3U_Dbg_print_recvq(FILE *stream) + /* --END DEBUG-- */ + + /* returns the number of elements in the unexpected queue */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Recvq_count_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Recvq_count_unexp(void) + { + int count = 0; +--- a/src/mpid/ch3/src/ch3u_request.c ++++ b/src/mpid/ch3/src/ch3u_request.c +@@ -20,14 +20,10 @@ + + /* Max depth of recursive calls of MPID_Request_complete */ + #define REQUEST_CB_DEPTH 2 +-#define MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET (-1) ++#define MPIDI_LOAD_RECV_IOV_ORIG_MSG_OFFSET_UNSET (-1) + + /* See the comments above about request creation. Some routines will + use macros in mpidimpl.h *instead* of this routine */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Request_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPID_Request_create_hook(MPIR_Request *req) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_REQUEST_INIT); +@@ -35,8 +31,8 @@ void MPID_Request_create_hook(MPIR_Request *req) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_REQUEST_INIT); + + req->dev.datatype_ptr = NULL; +- req->dev.segment_ptr = NULL; +- /* Masks and flags for channel device state in an MPIR_Request */ ++ req->dev.msg_offset = 0; ++ /* Masks and pkt_flags for channel device state in an MPIR_Request */ + req->dev.state = 0; + req->dev.cancel_pending = FALSE; + /* FIXME: RMA ops shouldn't need to be set except when creating a +@@ -44,9 +40,9 @@ void MPID_Request_create_hook(MPIR_Request *req) + req->dev.target_win_handle = MPI_WIN_NULL; + req->dev.source_win_handle = MPI_WIN_NULL; + req->dev.target_lock_queue_entry = NULL; +- req->dev.dataloop = NULL; ++ req->dev.flattened_type = NULL; + req->dev.iov_offset = 0; +- req->dev.flags = MPIDI_CH3_PKT_FLAG_NONE; ++ req->dev.pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + req->dev.resp_request_handle = MPI_REQUEST_NULL; + req->dev.user_buf = NULL; + req->dev.OnDataAvail = NULL; +@@ -58,7 +54,7 @@ void MPID_Request_create_hook(MPIR_Request *req) + req->dev.ext_hdr_sz = 0; + req->dev.rma_target_ptr = NULL; + req->dev.request_handle = MPI_REQUEST_NULL; +- req->dev.orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET; ++ req->dev.orig_msg_offset = MPIDI_LOAD_RECV_IOV_ORIG_MSG_OFFSET_UNSET; + + req->dev.request_completed_cb = NULL; + #ifdef MPIDI_CH3_REQUEST_INIT +@@ -83,10 +79,6 @@ void MPID_Request_create_hook(MPIR_Request *req) + * + * Expects sreq->dev.OnFinal to be initialized (even if it's NULL). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Request_load_send_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq, + MPL_IOV * const iov, int * const iov_n) + { +@@ -95,30 +87,36 @@ int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3U_REQUEST_LOAD_SEND_IOV); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3U_REQUEST_LOAD_SEND_IOV); +- MPIR_Assert(sreq->dev.segment_ptr != NULL); +- last = sreq->dev.segment_size; ++ ++ last = sreq->dev.msgsize; + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST, + "pre-pv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d", +- sreq->dev.segment_first, last, *iov_n)); +- MPIR_Assert(sreq->dev.segment_first < last); ++ sreq->dev.msg_offset, last, *iov_n)); ++ MPIR_Assert(sreq->dev.msg_offset < last); + MPIR_Assert(last > 0); + MPIR_Assert(*iov_n > 0 && *iov_n <= MPL_IOV_LIMIT); +- MPIR_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, +- &last, iov, iov_n); ++ ++ int max_iov_len = *iov_n; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(sreq->dev.user_buf, sreq->dev.user_count, sreq->dev.datatype, ++ sreq->dev.msg_offset, iov, max_iov_len, ++ sreq->dev.msgsize - sreq->dev.msg_offset, iov_n, &actual_iov_bytes); ++ last = sreq->dev.msg_offset + actual_iov_bytes; ++ + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST, + "post-pv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d", +- sreq->dev.segment_first, last, *iov_n)); ++ sreq->dev.msg_offset, last, *iov_n)); + MPIR_Assert(*iov_n > 0 && *iov_n <= MPL_IOV_LIMIT); + +- if (last == sreq->dev.segment_size) ++ if (last == sreq->dev.msgsize) + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"remaining data loaded into IOV"); + sreq->dev.OnDataAvail = sreq->dev.OnFinal; + } +- else if ((last - sreq->dev.segment_first) / *iov_n >= MPIDI_IOV_DENSITY_MIN) ++ else if ((last - sreq->dev.msg_offset) / *iov_n >= MPIDI_IOV_DENSITY_MIN) + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"more data loaded into IOV"); +- sreq->dev.segment_first = last; ++ sreq->dev.msg_offset = last; + sreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_SendReloadIOV; + } + else +@@ -128,7 +126,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq, + + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"low density. using SRBuf."); + +- data_sz = sreq->dev.segment_size - sreq->dev.segment_first; ++ data_sz = sreq->dev.msgsize - sreq->dev.msg_offset; + if (!MPIDI_Request_get_srbuf_flag(sreq)) + { + MPIDI_CH3U_SRBuf_alloc(sreq, data_sz); +@@ -137,7 +135,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq, + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,TYPICAL,"SRBuf allocation failure"); + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", + "**nomem %d", data_sz); + sreq->status.MPI_ERROR = mpi_errno; + goto fn_exit; +@@ -151,23 +149,25 @@ int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq, + iov[i].MPL_IOV_BUF, iov[i].MPL_IOV_LEN); + iov_data_copied += iov[i].MPL_IOV_LEN; + } +- sreq->dev.segment_first = last; ++ sreq->dev.msg_offset = last; ++ ++ MPI_Aint max_pack_bytes; ++ MPI_Aint actual_pack_bytes; ++ ++ if (data_sz > sreq->dev.tmpbuf_sz - iov_data_copied) ++ max_pack_bytes = sreq->dev.tmpbuf_sz - iov_data_copied; ++ else ++ max_pack_bytes = sreq->dev.msgsize - sreq->dev.msg_offset; ++ ++ MPIR_Typerep_pack(sreq->dev.user_buf, sreq->dev.user_count, sreq->dev.datatype, ++ sreq->dev.msg_offset, (char*) sreq->dev.tmpbuf + iov_data_copied, ++ max_pack_bytes, &actual_pack_bytes); ++ last = sreq->dev.msg_offset + actual_pack_bytes; + +- last = (data_sz <= sreq->dev.tmpbuf_sz - iov_data_copied) ? +- sreq->dev.segment_size : +- sreq->dev.segment_first + sreq->dev.tmpbuf_sz - iov_data_copied; +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST, +- "pre-pack: first=%" PRIdPTR ", last=%" PRIdPTR, +- sreq->dev.segment_first, last)); +- MPIR_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, +- &last, (char*) sreq->dev.tmpbuf + iov_data_copied); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST, +- "post-pack: first=%" PRIdPTR ", last=%" PRIdPTR, +- sreq->dev.segment_first, last)); + iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)sreq->dev.tmpbuf; +- iov[0].MPL_IOV_LEN = last - sreq->dev.segment_first + iov_data_copied; ++ iov[0].MPL_IOV_LEN = actual_pack_bytes + iov_data_copied; + *iov_n = 1; +- if (last == sreq->dev.segment_size) ++ if (last == sreq->dev.msgsize) + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"remaining data packed into SRBuf"); + sreq->dev.OnDataAvail = sreq->dev.OnFinal; +@@ -175,14 +175,17 @@ int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq, + else + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"more data packed into SRBuf"); +- sreq->dev.segment_first = last; ++ sreq->dev.msg_offset = last; + sreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_SendReloadIOV; + } + } +- ++ + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3U_REQUEST_LOAD_SEND_IOV); + return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; + } + + +@@ -194,10 +197,6 @@ int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq, + * structure). If the density of IOV is not sufficient, allocate a + * send/receive buffer and point the IOV at the buffer. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Request_load_recv_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + { + MPI_Aint last; +@@ -206,11 +205,11 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3U_REQUEST_LOAD_RECV_IOV); + +- if (rreq->dev.orig_segment_first == MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET) { +- rreq->dev.orig_segment_first = rreq->dev.segment_first; ++ if (rreq->dev.orig_msg_offset == MPIDI_LOAD_RECV_IOV_ORIG_MSG_OFFSET_UNSET) { ++ rreq->dev.orig_msg_offset = rreq->dev.msg_offset; + } + +- if (rreq->dev.segment_first < rreq->dev.segment_size) ++ if (rreq->dev.msg_offset < rreq->dev.msgsize) + { + /* still reading data that needs to go into the user buffer */ + +@@ -228,7 +227,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + could force the use of the SRBuf only + when (rreq->dev.tmpbuf_off > 0)... */ + +- data_sz = rreq->dev.segment_size - rreq->dev.segment_first - ++ data_sz = rreq->dev.msgsize - rreq->dev.msg_offset - + rreq->dev.tmpbuf_off; + MPIR_Assert(data_sz > 0); + tmpbuf_sz = rreq->dev.tmpbuf_sz - rreq->dev.tmpbuf_off; +@@ -242,15 +241,15 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + rreq->dev.iov[0].MPL_IOV_LEN = data_sz; + rreq->dev.iov_offset = 0; + rreq->dev.iov_count = 1; +- MPIR_Assert(rreq->dev.segment_first - rreq->dev.orig_segment_first + data_sz + ++ MPIR_Assert(rreq->dev.msg_offset - rreq->dev.orig_msg_offset + data_sz + + rreq->dev.tmpbuf_off <= rreq->dev.recv_data_sz); +- if (rreq->dev.segment_first - rreq->dev.orig_segment_first + data_sz + rreq->dev.tmpbuf_off == ++ if (rreq->dev.msg_offset - rreq->dev.orig_msg_offset + data_sz + rreq->dev.tmpbuf_off == + rreq->dev.recv_data_sz) + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, + "updating rreq to read the remaining data into the SRBuf"); + rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_UnpackSRBufComplete; +- rreq->dev.orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET; ++ rreq->dev.orig_msg_offset = MPIDI_LOAD_RECV_IOV_ORIG_MSG_OFFSET_UNSET; + } + else + { +@@ -261,20 +260,25 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + goto fn_exit; + } + +- last = rreq->dev.segment_size; ++ last = rreq->dev.msgsize; + rreq->dev.iov_count = MPL_IOV_LIMIT; + rreq->dev.iov_offset = 0; + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST, + "pre-upv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d", +- rreq->dev.segment_first, last, rreq->dev.iov_count)); +- MPIR_Assert(rreq->dev.segment_first < last); ++ rreq->dev.msg_offset, last, rreq->dev.iov_count)); ++ MPIR_Assert(rreq->dev.msg_offset < last); + MPIR_Assert(last > 0); +- MPIR_Segment_unpack_vector(rreq->dev.segment_ptr, +- rreq->dev.segment_first, +- &last, &rreq->dev.iov[0], &rreq->dev.iov_count); ++ ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, ++ rreq->dev.msg_offset, &rreq->dev.iov[0], MPL_IOV_LIMIT, ++ rreq->dev.msgsize - rreq->dev.msg_offset, ++ &rreq->dev.iov_count, &actual_iov_bytes); ++ last = rreq->dev.msg_offset + actual_iov_bytes; ++ + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST, + "post-upv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d, iov_offset=%lld", +- rreq->dev.segment_first, last, rreq->dev.iov_count, (long long)rreq->dev.iov_offset)); ++ rreq->dev.msg_offset, last, rreq->dev.iov_count, (long long)rreq->dev.iov_offset)); + MPIR_Assert(rreq->dev.iov_count >= 0 && rreq->dev.iov_count <= + MPL_IOV_LIMIT); + +@@ -286,10 +290,10 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + the segment info so that the remaining data is received and + thrown away. */ + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TYPE, + "**dtypemismatch", 0); +- MPIR_STATUS_SET_COUNT(rreq->status, rreq->dev.segment_first); +- rreq->dev.segment_size = rreq->dev.segment_first; ++ MPIR_STATUS_SET_COUNT(rreq->status, rreq->dev.msg_offset); ++ rreq->dev.msgsize = rreq->dev.msg_offset; + mpi_errno = MPIDI_CH3U_Request_load_recv_iov(rreq); + goto fn_exit; + } +@@ -299,22 +303,22 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + } + /* --END ERROR HANDLING-- */ + +- if (last == rreq->dev.recv_data_sz + rreq->dev.orig_segment_first) ++ if (last == rreq->dev.recv_data_sz + rreq->dev.orig_msg_offset) + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, + "updating rreq to read the remaining data directly into the user buffer"); + /* Eventually, use OnFinal for this instead */ + rreq->dev.OnDataAvail = rreq->dev.OnFinal; +- rreq->dev.orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET; ++ rreq->dev.orig_msg_offset = MPIDI_LOAD_RECV_IOV_ORIG_MSG_OFFSET_UNSET; + } + else if (MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_ACCUM_RECV || + MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_GET_ACCUM_RECV || +- (last == rreq->dev.segment_size || +- (last - rreq->dev.segment_first) / rreq->dev.iov_count >= MPIDI_IOV_DENSITY_MIN)) ++ (last == rreq->dev.msgsize || ++ (last - rreq->dev.msg_offset) / rreq->dev.iov_count >= MPIDI_IOV_DENSITY_MIN)) + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, + "updating rreq to read more data directly into the user buffer"); +- rreq->dev.segment_first = last; ++ rreq->dev.msg_offset = last; + rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_ReloadIOV; + } + else +@@ -325,7 +329,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + MPIR_Assert(MPIDI_Request_get_srbuf_flag(rreq) == FALSE); + + MPIDI_CH3U_SRBuf_alloc(rreq, +- rreq->dev.segment_size - rreq->dev.segment_first); ++ rreq->dev.msgsize - rreq->dev.msg_offset); + rreq->dev.tmpbuf_off = 0; + /* --BEGIN ERROR HANDLING-- */ + if (rreq->dev.tmpbuf_sz == 0) +@@ -335,9 +339,9 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + a fatal error? */ + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"SRBuf allocation failure"); + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", + "**nomem %d", +- rreq->dev.segment_size - rreq->dev.segment_first); ++ rreq->dev.msgsize - rreq->dev.msg_offset); + rreq->status.MPI_ERROR = mpi_errno; + goto fn_exit; + } +@@ -353,7 +357,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + buffer */ + intptr_t data_sz; + +- data_sz = rreq->dev.recv_data_sz - rreq->dev.segment_first; ++ data_sz = rreq->dev.recv_data_sz - rreq->dev.msg_offset; + if (!MPIDI_Request_get_srbuf_flag(rreq)) + { + MPIDI_CH3U_SRBuf_alloc(rreq, data_sz); +@@ -362,7 +366,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,TYPICAL,"SRBuf allocation failure"); + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", 0); ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", 0); + rreq->status.MPI_ERROR = mpi_errno; + goto fn_exit; + } +@@ -377,14 +381,14 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + MPIR_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_RECV); + /* Eventually, use OnFinal for this instead */ + rreq->dev.OnDataAvail = rreq->dev.OnFinal; +- rreq->dev.orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET; ++ rreq->dev.orig_msg_offset = MPIDI_LOAD_RECV_IOV_ORIG_MSG_OFFSET_UNSET; + } + else + { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE, + "updating rreq to read overflow data into the SRBuf and reload IOV"); + rreq->dev.iov[0].MPL_IOV_LEN = rreq->dev.tmpbuf_sz; +- rreq->dev.segment_first += rreq->dev.tmpbuf_sz; ++ rreq->dev.msg_offset += rreq->dev.tmpbuf_sz; + rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_ReloadIOV; + } + +@@ -402,10 +406,6 @@ int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq) + * + * Unpack data from a send/receive buffer into the user buffer. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Request_unpack_srbuf +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Request_unpack_srbuf(MPIR_Request * rreq) + { + MPI_Aint last; +@@ -415,43 +415,47 @@ int MPIDI_CH3U_Request_unpack_srbuf(MPIR_Request * rreq) + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3U_REQUEST_UNPACK_SRBUF); + +- tmpbuf_last = (int)(rreq->dev.segment_first + rreq->dev.tmpbuf_sz); +- if (rreq->dev.segment_size < tmpbuf_last) ++ tmpbuf_last = (int)(rreq->dev.msg_offset + rreq->dev.tmpbuf_sz); ++ if (rreq->dev.msgsize < tmpbuf_last) + { +- tmpbuf_last = (int)rreq->dev.segment_size; ++ tmpbuf_last = (int)rreq->dev.msgsize; + } +- last = tmpbuf_last; +- MPIR_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, +- &last, rreq->dev.tmpbuf); +- if (last == 0 || last == rreq->dev.segment_first) ++ ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack(rreq->dev.tmpbuf, tmpbuf_last - rreq->dev.msg_offset, ++ rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, ++ rreq->dev.msg_offset, &actual_unpack_bytes); ++ last = rreq->dev.msg_offset + actual_unpack_bytes; ++ ++ if (last == 0 || last == rreq->dev.msg_offset) + { + /* --BEGIN ERROR HANDLING-- */ + /* If no data can be unpacked, then we have a datatype processing + problem. Adjust the segment info so that the remaining + data is received and thrown away. */ +- MPIR_STATUS_SET_COUNT(rreq->status, rreq->dev.segment_first); +- rreq->dev.segment_size = rreq->dev.segment_first; +- rreq->dev.segment_first += tmpbuf_last; ++ MPIR_STATUS_SET_COUNT(rreq->status, rreq->dev.msg_offset); ++ rreq->dev.msgsize = rreq->dev.msg_offset; ++ rreq->dev.msg_offset += tmpbuf_last; + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TYPE, + "**dtypemismatch", 0); + /* --END ERROR HANDLING-- */ + } +- else if (tmpbuf_last == rreq->dev.segment_size) ++ else if (tmpbuf_last == rreq->dev.msgsize) + { + /* --BEGIN ERROR HANDLING-- */ + if (last != tmpbuf_last) + { + /* received data was not entirely consumed by unpack() because too + few bytes remained to fill the next basic datatype. +- Note: the segment_first field is set to segment_last so that if ++ Note: the msg_offset field is set to segment_last so that if + this is a truncated message, extra data will be read + off the pipe. */ + MPIR_STATUS_SET_COUNT(rreq->status, last); +- rreq->dev.segment_size = last; +- rreq->dev.segment_first = tmpbuf_last; ++ rreq->dev.msgsize = last; ++ rreq->dev.msg_offset = tmpbuf_last; + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TYPE, + "**dtypemismatch", 0); + } + /* --END ERROR HANDLING-- */ +@@ -465,9 +469,9 @@ int MPIDI_CH3U_Request_unpack_srbuf(MPIR_Request * rreq) + Note: memmove() is used since the data regions could + overlap. */ + memmove(rreq->dev.tmpbuf, (char *) rreq->dev.tmpbuf + +- (last - rreq->dev.segment_first), rreq->dev.tmpbuf_off); ++ (last - rreq->dev.msg_offset), rreq->dev.tmpbuf_off); + } +- rreq->dev.segment_first = last; ++ rreq->dev.msg_offset = last; + } + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3U_REQUEST_UNPACK_SRBUF); +@@ -479,10 +483,6 @@ int MPIDI_CH3U_Request_unpack_srbuf(MPIR_Request * rreq) + * + * Copy/unpack data from an "unexpected eager buffer" into the user buffer. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Request_unpack_uebuf +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Request_unpack_uebuf(MPIR_Request * rreq) + { + int dt_contig; +@@ -513,7 +513,7 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPIR_Request * rreq) + unpack_sz = userbuf_sz; + MPIR_STATUS_SET_COUNT(rreq->status, userbuf_sz); + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TRUNCATE, + "**truncate", "**truncate %d %d", + rreq->dev.recv_data_sz, userbuf_sz); + /* --END ERROR HANDLING-- */ +@@ -523,10 +523,9 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPIR_Request * rreq) + { + if (dt_contig) + { +- /* TODO - check that amount of data is consistent with datatype. +- In other words, if we were to use Segment_unpack() +- would last = unpack? If not we should return an error +- (unless configured with --enable-fast) */ ++ /* TODO - check that amount of data is consistent with ++ datatype. If not we should return an error (unless ++ configured with --enable-fast) */ + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MEMCPY); + MPIR_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, rreq->dev.tmpbuf, + unpack_sz); +@@ -534,22 +533,20 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPIR_Request * rreq) + } + else + { +- MPIR_Segment seg; +- MPI_Aint last; +- +- MPIR_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, +- rreq->dev.datatype, &seg); +- last = unpack_sz; +- MPIR_Segment_unpack(&seg, 0, &last, rreq->dev.tmpbuf); +- if (last != unpack_sz) ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack(rreq->dev.tmpbuf, unpack_sz, ++ rreq->dev.user_buf, rreq->dev.user_count, ++ rreq->dev.datatype, 0, &actual_unpack_bytes); ++ ++ if (actual_unpack_bytes != unpack_sz) + { + /* --BEGIN ERROR HANDLING-- */ + /* received data was not entirely consumed by unpack() + because too few bytes remained to fill the next basic + datatype */ +- MPIR_STATUS_SET_COUNT(rreq->status, last); ++ MPIR_STATUS_SET_COUNT(rreq->status, actual_unpack_bytes); + rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE, ++ MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_TYPE, + "**dtypemismatch", 0); + /* --END ERROR HANDLING-- */ + } +@@ -605,15 +602,10 @@ void MPID_Request_destroy_hook(MPIR_Request *req) + MPIR_Datatype_ptr_release(req->dev.datatype_ptr); + } + +- if (req->dev.segment_ptr != NULL) { +- MPIR_Segment_free(req->dev.segment_ptr); +- } +- + if (MPIDI_Request_get_srbuf_flag(req)) { + MPIDI_CH3U_SRBuf_free(req); + } + +- if (req->dev.ext_hdr_ptr != NULL) { +- MPL_free(req->dev.ext_hdr_ptr); +- } ++ MPL_free(req->dev.ext_hdr_ptr); ++ MPL_free(req->dev.flattened_type); + } +--- a/src/mpid/ch3/src/ch3u_rma_ops.c ++++ b/src/mpid/ch3/src/ch3u_rma_ops.c +@@ -34,10 +34,6 @@ cvars: + === END_MPI_T_CVAR_INFO_BLOCK === + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr, +@@ -170,10 +166,10 @@ int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype + win_ptr->basic_info_table[target_rank].disp_unit * target_disp; + put_pkt->count = target_count; + put_pkt->datatype = target_datatype; +- put_pkt->info.dataloop_size = 0; ++ put_pkt->info.flattened_type_size = 0; + put_pkt->target_win_handle = win_ptr->basic_info_table[target_rank].win_handle; + put_pkt->source_win_handle = win_ptr->handle; +- put_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; ++ put_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + if (use_immed_pkt) { + void *src = (void *) origin_addr, *dest = (void *) &(put_pkt->info.data); + mpi_errno = immed_copy(src, dest, data_sz); +@@ -211,10 +207,6 @@ int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr, +@@ -344,11 +336,11 @@ int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype + win_ptr->basic_info_table[target_rank].disp_unit * target_disp; + get_pkt->count = target_count; + get_pkt->datatype = target_datatype; +- get_pkt->info.dataloop_size = 0; ++ get_pkt->info.flattened_type_size = 0; + get_pkt->target_win_handle = win_ptr->basic_info_table[target_rank].win_handle; +- get_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; ++ get_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + if (use_immed_resp_pkt) +- get_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP; ++ get_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP; + + MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set); + +@@ -381,10 +373,6 @@ int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPI_Op op, +@@ -549,11 +537,11 @@ int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatyp + win_ptr->basic_info_table[target_rank].disp_unit * target_disp; + accum_pkt->count = target_count; + accum_pkt->datatype = target_datatype; +- accum_pkt->info.dataloop_size = 0; ++ accum_pkt->info.flattened_type_size = 0; + accum_pkt->op = op; + accum_pkt->target_win_handle = win_ptr->basic_info_table[target_rank].win_handle; + accum_pkt->source_win_handle = win_ptr->handle; +- accum_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; ++ accum_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + if (use_immed_pkt) { + void *src = (void *) origin_addr, *dest = (void *) &(accum_pkt->info.data); + mpi_errno = immed_copy(src, dest, data_sz); +@@ -592,10 +580,6 @@ int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatyp + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, void *result_addr, int result_count, + MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, +@@ -802,10 +786,10 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count, + win_ptr->basic_info_table[target_rank].disp_unit * target_disp; + get_accum_pkt->count = target_count; + get_accum_pkt->datatype = target_datatype; +- get_accum_pkt->info.dataloop_size = 0; ++ get_accum_pkt->info.flattened_type_size = 0; + get_accum_pkt->op = op; + get_accum_pkt->target_win_handle = win_ptr->basic_info_table[target_rank].win_handle; +- get_accum_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; ++ get_accum_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + if (use_immed_pkt) { + void *src = (void *) origin_addr, *dest = (void *) &(get_accum_pkt->info.data); + mpi_errno = immed_copy(src, dest, orig_data_sz); +@@ -844,10 +828,6 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Put(const void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr) +@@ -871,10 +851,6 @@ int MPID_Put(const void *origin_addr, int origin_count, MPI_Datatype + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Get(void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr) +@@ -898,10 +874,6 @@ int MPID_Get(void *origin_addr, int origin_count, MPI_Datatype + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype + origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win * win_ptr) +@@ -925,10 +897,6 @@ int MPID_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Get_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, void *result_addr, int result_count, + MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, +@@ -956,10 +924,6 @@ int MPID_Get_accumulate(const void *origin_addr, int origin_count, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Compare_and_swap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr, + void *result_addr, MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp, MPIR_Win * win_ptr) +@@ -1043,7 +1007,7 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr, + win_ptr->basic_info_table[target_rank].disp_unit * target_disp; + cas_pkt->datatype = datatype; + cas_pkt->target_win_handle = win_ptr->basic_info_table[target_rank].win_handle; +- cas_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; ++ cas_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + + /* REQUIRE: All datatype arguments must be of the same, builtin + * type and counts must be 1. */ +@@ -1090,10 +1054,6 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Fetch_and_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Fetch_and_op(const void *origin_addr, void *result_addr, + MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp, MPI_Op op, MPIR_Win * win_ptr) +@@ -1194,7 +1154,7 @@ int MPID_Fetch_and_op(const void *origin_addr, void *result_addr, + fop_pkt->datatype = datatype; + fop_pkt->op = op; + fop_pkt->target_win_handle = win_ptr->basic_info_table[target_rank].win_handle; +- fop_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; ++ fop_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + if (use_immed_pkt) { + void *src = (void *) origin_addr, *dest = (void *) &(fop_pkt->info.data); + mpi_errno = immed_copy(src, dest, type_size); +--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c ++++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c +@@ -178,11 +178,7 @@ void MPIDI_CH3_RMA_Init_pkthandler_pvars(void) + /* extended packet functions */ + /* =========================================================== */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ExtPktHandler_Accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3_ExtPktHandler_Accumulate(MPIDI_CH3_Pkt_flags_t flags, ++static int MPIDI_CH3_ExtPktHandler_Accumulate(int pkt_flags, + int is_derived_dt, void **ext_hdr_ptr, + MPI_Aint * ext_hdr_sz) + { +@@ -191,59 +187,34 @@ static int MPIDI_CH3_ExtPktHandler_Accumulate(MPIDI_CH3_Pkt_flags_t flags, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_EXTPKTHANDLER_ACCUMULATE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3_EXTPKTHANDLER_ACCUMULATE); + +- if ((flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) && is_derived_dt) { +- (*ext_hdr_sz) = sizeof(MPIDI_CH3_Ext_pkt_accum_stream_derived_t); +- (*ext_hdr_ptr) = MPL_malloc(sizeof(MPIDI_CH3_Ext_pkt_accum_stream_derived_t), MPL_MEM_BUFFER); ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { ++ (*ext_hdr_sz) = sizeof(MPIDI_CH3_Ext_pkt_stream_t); ++ (*ext_hdr_ptr) = MPL_malloc(sizeof(MPIDI_CH3_Ext_pkt_stream_t), MPL_MEM_BUFFER); + if ((*ext_hdr_ptr) == NULL) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIDI_CH3_Ext_pkt_accum_stream_derived_t"); +- } +- } +- else if (flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { +- (*ext_hdr_sz) = sizeof(MPIDI_CH3_Ext_pkt_accum_stream_t); +- (*ext_hdr_ptr) = MPL_malloc(sizeof(MPIDI_CH3_Ext_pkt_accum_stream_t), MPL_MEM_BUFFER); +- if ((*ext_hdr_ptr) == NULL) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIDI_CH3_Ext_pkt_accum_stream_t"); ++ "**nomem %s", "MPIDI_CH3_Ext_pkt_stream_t"); + } + } + else if (is_derived_dt) { +- (*ext_hdr_sz) = sizeof(MPIDI_CH3_Ext_pkt_accum_derived_t); +- (*ext_hdr_ptr) = MPL_malloc(sizeof(MPIDI_CH3_Ext_pkt_accum_derived_t), MPL_MEM_BUFFER); +- if ((*ext_hdr_ptr) == NULL) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", +- "**nomem %s", "MPIDI_CH3_Ext_pkt_accum_derived_t"); +- } ++ (*ext_hdr_sz) = 0; ++ (*ext_hdr_ptr) = NULL; + } + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH3_EXTPKTHANDLER_ACCUMULATE); + return mpi_errno; + fn_fail: +- if ((*ext_hdr_ptr) != NULL) +- MPL_free((*ext_hdr_ptr)); ++ MPL_free((*ext_hdr_ptr)); + (*ext_hdr_ptr) = NULL; + (*ext_hdr_sz) = 0; + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_ExtPktHandler_GetAccumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static int MPIDI_CH3_ExtPktHandler_GetAccumulate(MPIDI_CH3_Pkt_flags_t flags, ++static int MPIDI_CH3_ExtPktHandler_GetAccumulate(int pkt_flags, + int is_derived_dt, void **ext_hdr_ptr, + MPI_Aint * ext_hdr_sz) + { +- /* Check if get_accum still reuses accum' extended packet header. */ +- MPIR_Assert(sizeof(MPIDI_CH3_Ext_pkt_accum_stream_derived_t) == +- sizeof(MPIDI_CH3_Ext_pkt_get_accum_stream_derived_t)); +- MPIR_Assert(sizeof(MPIDI_CH3_Ext_pkt_accum_derived_t) == +- sizeof(MPIDI_CH3_Ext_pkt_get_accum_derived_t)); +- MPIR_Assert(sizeof(MPIDI_CH3_Ext_pkt_accum_stream_t) == +- sizeof(MPIDI_CH3_Ext_pkt_get_accum_stream_t)); +- +- return MPIDI_CH3_ExtPktHandler_Accumulate(flags, is_derived_dt, ext_hdr_ptr, ext_hdr_sz); ++ return MPIDI_CH3_ExtPktHandler_Accumulate(pkt_flags, is_derived_dt, ext_hdr_ptr, ext_hdr_sz); + } + + /* ------------------------------------------------------------------------ */ +@@ -253,10 +224,6 @@ static int MPIDI_CH3_ExtPktHandler_GetAccumulate(MPIDI_CH3_Pkt_flags_t flags, + * of messages. + */ + /* ------------------------------------------------------------------------ */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) + { +@@ -301,7 +268,7 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + + /* trigger final action */ + mpi_errno = finish_op_on_target(win_ptr, vc, FALSE /* has no response data */ , +- put_pkt->flags, put_pkt->source_win_handle); ++ put_pkt->pkt_flags, put_pkt->source_win_handle); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -322,7 +289,7 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + req->dev.user_count = put_pkt->count; + req->dev.target_win_handle = put_pkt->target_win_handle; + req->dev.source_win_handle = put_pkt->source_win_handle; +- req->dev.flags = put_pkt->flags; ++ req->dev.pkt_flags = put_pkt->pkt_flags; + req->dev.OnFinal = MPIDI_CH3_ReqHandler_PutRecvComplete; + + if (MPIR_DATATYPE_IS_PREDEFINED(put_pkt->datatype)) { +@@ -354,37 +321,29 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + } + } + else { ++ int flattened_type_size; ++ + /* derived datatype */ + MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_PUT_RECV_DERIVED_DT); + req->dev.datatype = MPI_DATATYPE_NULL; + +- /* allocate extended header in the request, +- * only including fixed-length variables defined in packet type. */ +- req->dev.ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_put_derived_t); +- req->dev.ext_hdr_ptr = MPL_malloc(req->dev.ext_hdr_sz, MPL_MEM_BUFFER); +- if (!req->dev.ext_hdr_ptr) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIDI_CH3_Ext_pkt_put_derived_t"); +- } +- +- /* put dataloop in a separate buffer to be reused in datatype. +- * It will be freed when free datatype. */ +- req->dev.dataloop = MPL_malloc(put_pkt->info.dataloop_size, MPL_MEM_BUFFER); +- if (!req->dev.dataloop) { ++ /* put flattened type in a separate buffer to be reused in ++ * datatype. It will be freed when free datatype. */ ++ flattened_type_size = put_pkt->info.flattened_type_size; ++ req->dev.flattened_type = MPL_malloc(put_pkt->info.flattened_type_size, MPL_MEM_BUFFER); ++ if (!req->dev.flattened_type) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", +- put_pkt->info.dataloop_size); ++ put_pkt->info.flattened_type_size); + } + +- /* if we received all of the dtype_info and dataloop, copy it +- * now and call the handler, otherwise set the iov and let the ++ /* if we received all of the flattened type, copy it now ++ * and call the handler, otherwise set the iov and let the + * channel copy it */ +- if (data_len >= req->dev.ext_hdr_sz + put_pkt->info.dataloop_size) { +- /* Copy extended header */ +- MPIR_Memcpy(req->dev.ext_hdr_ptr, data_buf, req->dev.ext_hdr_sz); +- MPIR_Memcpy(req->dev.dataloop, data_buf + req->dev.ext_hdr_sz, +- put_pkt->info.dataloop_size); ++ if (data_len >= flattened_type_size) { ++ /* Copy flattened type */ ++ MPIR_Memcpy(req->dev.flattened_type, data_buf, flattened_type_size); + +- *buflen = req->dev.ext_hdr_sz + put_pkt->info.dataloop_size; ++ *buflen = flattened_type_size; + + /* All dtype data has been received, call req handler */ + mpi_errno = MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete(vc, req, &complete); +@@ -396,11 +355,9 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + } + } + else { +- req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) req->dev.ext_hdr_ptr); +- req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz; +- req->dev.iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.dataloop; +- req->dev.iov[1].MPL_IOV_LEN = put_pkt->info.dataloop_size; +- req->dev.iov_count = 2; ++ req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.flattened_type; ++ req->dev.iov[0].MPL_IOV_LEN = flattened_type_size; ++ req->dev.iov_count = 1; + + *buflen = 0; + +@@ -426,10 +383,6 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) + { +@@ -465,7 +418,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + + req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); + req->dev.target_win_handle = get_pkt->target_win_handle; +- req->dev.flags = get_pkt->flags; ++ req->dev.pkt_flags = get_pkt->pkt_flags; + + /* get start location of data and length of data */ + data_len = *buflen; +@@ -475,7 +428,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + * operation are completed when counter reaches zero. */ + win_ptr->at_completion_counter++; + +- if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { ++ if (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { + MPIR_Assert(MPIR_DATATYPE_IS_PREDEFINED(get_pkt->datatype)); + } + +@@ -492,20 +445,20 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + req->dev.OnFinal = MPIDI_CH3_ReqHandler_GetSendComplete; + req->kind = MPIR_REQUEST_KIND__SEND; + +- if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { ++ if (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { + MPIDI_Pkt_init(get_resp_pkt, MPIDI_CH3_PKT_GET_RESP_IMMED); + } + else { + MPIDI_Pkt_init(get_resp_pkt, MPIDI_CH3_PKT_GET_RESP); + } + get_resp_pkt->request_handle = get_pkt->request_handle; +- get_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ get_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ get_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ get_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + get_resp_pkt->target_rank = win_ptr->comm_ptr->rank; + + /* length of target data */ +@@ -513,7 +466,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + + MPIR_Datatype_is_contig(get_pkt->datatype, &is_contig); + +- if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { ++ if (get_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) { + MPIR_Assign_trunc(len, get_pkt->count * type_size, size_t); + void *src = (void *) (get_pkt->addr), *dest = (void *) &(get_resp_pkt->info.data); + mpi_errno = immed_copy(src, dest, len); +@@ -555,17 +508,15 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt; + iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt); + +- req->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(req->dev.segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- +- MPIR_Segment_init(get_pkt->addr, get_pkt->count, +- get_pkt->datatype, req->dev.segment_ptr); +- req->dev.segment_first = 0; +- req->dev.segment_size = get_pkt->count * type_size; ++ req->dev.user_buf = get_pkt->addr; ++ req->dev.user_count = get_pkt->count; ++ req->dev.datatype = get_pkt->datatype; ++ req->dev.msg_offset = 0; ++ req->dev.msgsize = get_pkt->count * type_size; + + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); +- mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN); ++ mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN, ++ NULL, 0); + MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); + MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); + } +@@ -574,8 +525,9 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + *rreqp = NULL; + } + else { +- /* derived datatype. first get the dtype_info and dataloop. */ ++ int flattened_type_size; + ++ /* derived datatype. first get the flattened_type. */ + MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_GET_RECV_DERIVED_DT); + req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete; + req->dev.OnFinal = 0; +@@ -584,33 +536,23 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + req->dev.datatype = MPI_DATATYPE_NULL; + req->dev.request_handle = get_pkt->request_handle; + +- /* allocate extended header in the request, +- * only including fixed-length variables defined in packet type. */ +- req->dev.ext_hdr_sz = sizeof(MPIDI_CH3_Ext_pkt_get_derived_t); +- req->dev.ext_hdr_ptr = MPL_malloc(req->dev.ext_hdr_sz, MPL_MEM_BUFFER); +- if (!req->dev.ext_hdr_ptr) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIDI_CH3_Ext_pkt_get_derived_t"); +- } +- +- /* put dataloop in a separate buffer to be reused in datatype. +- * It will be freed when free datatype. */ +- req->dev.dataloop = MPL_malloc(get_pkt->info.dataloop_size, MPL_MEM_BUFFER); +- if (!req->dev.dataloop) { ++ /* put flattened type in a separate buffer to be reused in ++ * datatype. It will be freed when free datatype. */ ++ flattened_type_size = get_pkt->info.flattened_type_size; ++ req->dev.flattened_type = MPL_malloc(get_pkt->info.flattened_type_size, MPL_MEM_BUFFER); ++ if (!req->dev.flattened_type) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", +- get_pkt->info.dataloop_size); ++ get_pkt->info.flattened_type_size); + } + +- /* if we received all of the dtype_info and dataloop, copy it +- * now and call the handler, otherwise set the iov and let the +- * channel copy it */ +- if (data_len >= req->dev.ext_hdr_sz + get_pkt->info.dataloop_size) { +- /* Copy extended header */ +- MPIR_Memcpy(req->dev.ext_hdr_ptr, data_buf, req->dev.ext_hdr_sz); +- MPIR_Memcpy(req->dev.dataloop, data_buf + req->dev.ext_hdr_sz, +- get_pkt->info.dataloop_size); ++ /* if we received all of the flattened type, copy it now and ++ * call the handler, otherwise set the iov and let the channel ++ * copy it */ ++ if (data_len >= get_pkt->info.flattened_type_size) { ++ /* Copy flattened type */ ++ MPIR_Memcpy(req->dev.flattened_type, data_buf, flattened_type_size); + +- *buflen = req->dev.ext_hdr_sz + get_pkt->info.dataloop_size; ++ *buflen = get_pkt->info.flattened_type_size; + + /* All dtype data has been received, call req handler */ + mpi_errno = MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(vc, req, &complete); +@@ -620,11 +562,9 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + *rreqp = NULL; + } + else { +- req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) req->dev.ext_hdr_ptr); +- req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz; +- req->dev.iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.dataloop; +- req->dev.iov[1].MPL_IOV_LEN = get_pkt->info.dataloop_size; +- req->dev.iov_count = 2; ++ req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.flattened_type; ++ req->dev.iov[0].MPL_IOV_LEN = get_pkt->info.flattened_type_size; ++ req->dev.iov_count = 1; + + *buflen = 0; + *rreqp = req; +@@ -639,10 +579,6 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) + { +@@ -681,20 +617,23 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void + /* Immed packet type is used when target datatype is predefined datatype. */ + MPIR_Assert(MPIR_DATATYPE_IS_PREDEFINED(accum_pkt->datatype)); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + mpi_errno = do_accumulate_op((void *) &accum_pkt->info.data, accum_pkt->count, + accum_pkt->datatype, accum_pkt->addr, accum_pkt->count, +- accum_pkt->datatype, 0, accum_pkt->op); +- if (win_ptr->shm_allocated == TRUE) ++ accum_pkt->datatype, 0, accum_pkt->op, ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT); ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + if (mpi_errno) { + MPIR_ERR_POP(mpi_errno); + } + + /* trigger final action */ + mpi_errno = finish_op_on_target(win_ptr, vc, FALSE /* has no response data */ , +- accum_pkt->flags, accum_pkt->source_win_handle); ++ accum_pkt->pkt_flags, accum_pkt->source_win_handle); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -713,7 +652,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void + req->dev.real_user_buf = accum_pkt->addr; + req->dev.target_win_handle = accum_pkt->target_win_handle; + req->dev.source_win_handle = accum_pkt->source_win_handle; +- req->dev.flags = accum_pkt->flags; ++ req->dev.pkt_flags = accum_pkt->pkt_flags; + + req->dev.resp_request_handle = MPI_REQUEST_NULL; + +@@ -723,7 +662,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void + + /* allocate extended header in the request, + * only including fixed-length variables defined in packet type. */ +- mpi_errno = MPIDI_CH3_ExtPktHandler_Accumulate(req->dev.flags, ++ mpi_errno = MPIDI_CH3_ExtPktHandler_Accumulate(req->dev.pkt_flags, + (!MPIR_DATATYPE_IS_PREDEFINED + (accum_pkt->datatype)), + &req->dev.ext_hdr_ptr, &req->dev.ext_hdr_sz); +@@ -734,7 +673,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void + MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_ACCUM_RECV); + req->dev.datatype = accum_pkt->datatype; + +- if (req->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { ++ if (req->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { + req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete; + + /* if this is a streamed op pkt, set iov to receive extended pkt header. */ +@@ -756,7 +695,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void + if (req->dev.tmpbuf_sz == 0) { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, TYPICAL, "SRBuf allocation failure"); + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", + "**nomem %d", MPIDI_CH3U_SRBuf_size); + req->status.MPI_ERROR = mpi_errno; + goto fn_fail; +@@ -796,21 +735,22 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void + req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete; + req->dev.datatype = MPI_DATATYPE_NULL; + +- /* Put dataloop in a separate buffer to be reused in datatype. ++ /* Put flattened_type in a separate buffer to be reused in datatype. + * It will be freed when free datatype. */ +- req->dev.dataloop = MPL_malloc(accum_pkt->info.dataloop_size, MPL_MEM_BUFFER); +- if (!req->dev.dataloop) { ++ req->dev.flattened_type = MPL_malloc(accum_pkt->info.flattened_type_size, MPL_MEM_BUFFER); ++ if (!req->dev.flattened_type) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", +- accum_pkt->info.dataloop_size); ++ accum_pkt->info.flattened_type_size); + } + +- if (data_len >= req->dev.ext_hdr_sz + accum_pkt->info.dataloop_size) { ++ if (data_len >= req->dev.ext_hdr_sz + accum_pkt->info.flattened_type_size) { + /* Copy extended header */ +- MPIR_Memcpy(req->dev.ext_hdr_ptr, data_buf, req->dev.ext_hdr_sz); +- MPIR_Memcpy(req->dev.dataloop, data_buf + req->dev.ext_hdr_sz, +- accum_pkt->info.dataloop_size); ++ if (req->dev.ext_hdr_sz) ++ MPIR_Memcpy(req->dev.ext_hdr_ptr, data_buf, req->dev.ext_hdr_sz); ++ MPIR_Memcpy(req->dev.flattened_type, data_buf + req->dev.ext_hdr_sz, ++ accum_pkt->info.flattened_type_size); + +- *buflen = req->dev.ext_hdr_sz + accum_pkt->info.dataloop_size; ++ *buflen = req->dev.ext_hdr_sz + accum_pkt->info.flattened_type_size; + + /* All extended data has been received, call req handler */ + mpi_errno = MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(vc, req, &complete); +@@ -822,13 +762,19 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void + } + } + else { ++ int idx = 0; + /* Prepare to receive extended header. + * All variable-length data can be received in separate iovs. */ +- req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr; +- req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz; +- req->dev.iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.dataloop; +- req->dev.iov[1].MPL_IOV_LEN = accum_pkt->info.dataloop_size; +- req->dev.iov_count = 2; ++ if (req->dev.ext_hdr_sz) { ++ req->dev.iov[idx].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr; ++ req->dev.iov[idx].MPL_IOV_LEN = req->dev.ext_hdr_sz; ++ idx++; ++ } ++ req->dev.iov[idx].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.flattened_type; ++ req->dev.iov[idx].MPL_IOV_LEN = accum_pkt->info.flattened_type_size; ++ idx++; ++ ++ req->dev.iov_count = idx; + + *buflen = 0; + } +@@ -850,10 +796,6 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void + + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_GetAccumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) + { +@@ -905,7 +847,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + + resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); + resp_req->dev.target_win_handle = get_accum_pkt->target_win_handle; +- resp_req->dev.flags = get_accum_pkt->flags; ++ resp_req->dev.pkt_flags = get_accum_pkt->pkt_flags; + + MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_GET_ACCUM_RESP); + resp_req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumSendComplete; +@@ -923,25 +865,27 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + MPIDI_Pkt_init(get_accum_resp_pkt, MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED); + get_accum_resp_pkt->request_handle = get_accum_pkt->request_handle; + get_accum_resp_pkt->target_rank = win_ptr->comm_ptr->rank; +- get_accum_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (get_accum_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ get_accum_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ get_accum_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (get_accum_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ get_accum_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + + /* NOTE: 'copy data + ACC' needs to be atomic */ + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + /* copy data from target buffer to response packet header */ + src = (void *) (get_accum_pkt->addr), dest = (void *) &(get_accum_resp_pkt->info.data); + mpi_errno = immed_copy(src, dest, len); + if (mpi_errno != MPI_SUCCESS) { +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + MPIR_ERR_POP(mpi_errno); + } + +@@ -949,10 +893,11 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + mpi_errno = + do_accumulate_op((void *) &get_accum_pkt->info.data, get_accum_pkt->count, + get_accum_pkt->datatype, get_accum_pkt->addr, get_accum_pkt->count, +- get_accum_pkt->datatype, 0, get_accum_pkt->op); ++ get_accum_pkt->datatype, 0, get_accum_pkt->op, MPIDI_RMA_ACC_SRCBUF_DEFAULT); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -984,7 +929,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + req->dev.op = get_accum_pkt->op; + req->dev.real_user_buf = get_accum_pkt->addr; + req->dev.target_win_handle = get_accum_pkt->target_win_handle; +- req->dev.flags = get_accum_pkt->flags; ++ req->dev.pkt_flags = get_accum_pkt->pkt_flags; + + req->dev.resp_request_handle = get_accum_pkt->request_handle; + +@@ -995,7 +940,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + /* allocate extended header in the request, + * only including fixed-length variables defined in packet type. */ + is_derived_dt = !MPIR_DATATYPE_IS_PREDEFINED(get_accum_pkt->datatype); +- mpi_errno = MPIDI_CH3_ExtPktHandler_GetAccumulate(req->dev.flags, is_derived_dt, ++ mpi_errno = MPIDI_CH3_ExtPktHandler_GetAccumulate(req->dev.pkt_flags, is_derived_dt, + &req->dev.ext_hdr_ptr, + &req->dev.ext_hdr_sz); + if (mpi_errno != MPI_SUCCESS) +@@ -1007,7 +952,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_GET_ACCUM_RECV); + req->dev.datatype = get_accum_pkt->datatype; + +- if (req->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { ++ if (req->dev.pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) { + req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete; + + /* if this is a streamed op pkt, set iov to receive extended pkt header. */ +@@ -1042,7 +987,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + if (req->dev.tmpbuf_sz == 0) { + MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, TYPICAL, "SRBuf allocation failure"); + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", + "**nomem %d", MPIDI_CH3U_SRBuf_size); + req->status.MPI_ERROR = mpi_errno; + goto fn_fail; +@@ -1082,21 +1027,22 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete; + req->dev.datatype = MPI_DATATYPE_NULL; + +- /* Put dataloop in a separate buffer to be reused in datatype. ++ /* Put flattened_type in a separate buffer to be reused in datatype. + * It will be freed when free datatype. */ +- req->dev.dataloop = MPL_malloc(get_accum_pkt->info.dataloop_size, MPL_MEM_BUFFER); +- if (!req->dev.dataloop) { ++ req->dev.flattened_type = MPL_malloc(get_accum_pkt->info.flattened_type_size, MPL_MEM_BUFFER); ++ if (!req->dev.flattened_type) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", +- get_accum_pkt->info.dataloop_size); ++ get_accum_pkt->info.flattened_type_size); + } + +- if (data_len >= req->dev.ext_hdr_sz + get_accum_pkt->info.dataloop_size) { ++ if (data_len >= req->dev.ext_hdr_sz + get_accum_pkt->info.flattened_type_size) { + /* Copy extended header */ +- MPIR_Memcpy(req->dev.ext_hdr_ptr, data_buf, req->dev.ext_hdr_sz); +- MPIR_Memcpy(req->dev.dataloop, data_buf + req->dev.ext_hdr_sz, +- get_accum_pkt->info.dataloop_size); ++ if (req->dev.ext_hdr_sz) ++ MPIR_Memcpy(req->dev.ext_hdr_ptr, data_buf, req->dev.ext_hdr_sz); ++ MPIR_Memcpy(req->dev.flattened_type, data_buf + req->dev.ext_hdr_sz, ++ get_accum_pkt->info.flattened_type_size); + +- *buflen = req->dev.ext_hdr_sz + get_accum_pkt->info.dataloop_size; ++ *buflen = req->dev.ext_hdr_sz + get_accum_pkt->info.flattened_type_size; + + /* All dtype data has been received, call req handler */ + mpi_errno = MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(vc, req, &complete); +@@ -1108,13 +1054,19 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + } + } + else { ++ int idx = 0; + /* Prepare to receive extended header. + * All variable-length data can be received in separate iovs. */ +- req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr; +- req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz; +- req->dev.iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.dataloop; +- req->dev.iov[1].MPL_IOV_LEN = get_accum_pkt->info.dataloop_size; +- req->dev.iov_count = 2; ++ if (req->dev.ext_hdr_sz) { ++ req->dev.iov[idx].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr; ++ req->dev.iov[idx].MPL_IOV_LEN = req->dev.ext_hdr_sz; ++ idx++; ++ } ++ req->dev.iov[idx].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.flattened_type; ++ req->dev.iov[idx].MPL_IOV_LEN = get_accum_pkt->info.flattened_type_size; ++ idx++; ++ ++ req->dev.iov_count = idx; + + *buflen = 0; + } +@@ -1137,10 +1089,6 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_CAS +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) + { +@@ -1183,20 +1131,21 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + MPIDI_Pkt_init(cas_resp_pkt, MPIDI_CH3_PKT_CAS_RESP_IMMED); + cas_resp_pkt->request_handle = cas_pkt->request_handle; + cas_resp_pkt->target_rank = win_ptr->comm_ptr->rank; +- cas_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (cas_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ cas_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (cas_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ cas_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ cas_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((cas_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (cas_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ cas_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + + /* Copy old value into the response packet */ + MPIR_Datatype_get_size_macro(cas_pkt->datatype, len); + MPIR_Assert(len <= sizeof(MPIDI_CH3_CAS_Immed_u)); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + MPIR_Memcpy((void *) &cas_resp_pkt->info.data, cas_pkt->addr, len); + +@@ -1205,8 +1154,9 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + MPIR_Memcpy(cas_pkt->addr, &cas_pkt->origin_data, len); + } + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + /* Send the response packet */ + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); +@@ -1220,7 +1170,7 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + /* sending process is not completed, set proper OnDataAvail + * (it is initialized to NULL by lower layer) */ + req->dev.target_win_handle = cas_pkt->target_win_handle; +- req->dev.flags = cas_pkt->flags; ++ req->dev.pkt_flags = cas_pkt->pkt_flags; + req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_CASSendComplete; + + /* here we increment the Active Target counter to guarantee the GET-like +@@ -1235,7 +1185,7 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + } + + mpi_errno = finish_op_on_target(win_ptr, vc, TRUE /* has response data */ , +- cas_pkt->flags, MPI_WIN_NULL); ++ cas_pkt->pkt_flags, MPI_WIN_NULL); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -1249,10 +1199,6 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_CASResp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIDI_CH3_Pkt_t * pkt, void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -1275,16 +1221,16 @@ int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIR_Win_get_ptr(req->dev.source_win_handle, win_ptr); + + /* decrement ack_counter on this target */ +- if (cas_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { +- mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, cas_resp_pkt->flags); ++ if (cas_resp_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { ++ mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, cas_resp_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = handle_lock_ack(win_ptr, target_rank, cas_resp_pkt->flags); ++ mpi_errno = handle_lock_ack(win_ptr, target_rank, cas_resp_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +- if (cas_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { ++ if (cas_resp_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { + mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); +@@ -1311,10 +1257,6 @@ int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_FOP +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) + { +@@ -1356,34 +1298,38 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + MPIDI_Pkt_init(fop_resp_pkt, MPIDI_CH3_PKT_FOP_RESP_IMMED); + fop_resp_pkt->request_handle = fop_pkt->request_handle; + fop_resp_pkt->target_rank = win_ptr->comm_ptr->rank; +- fop_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; +- if (fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) +- fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; +- if ((fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || +- (fop_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) +- fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; ++ fop_resp_pkt->pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; ++ if (fop_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ fop_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) ++ fop_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; ++ if ((fop_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || ++ (fop_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) ++ fop_resp_pkt->pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; + + /* NOTE: 'copy data + ACC' needs to be atomic */ + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr); ++ } + + /* copy data to resp pkt header */ + void *src = fop_pkt->addr, *dest = (void *) &fop_resp_pkt->info.data; + mpi_errno = immed_copy(src, dest, type_size); + if (mpi_errno != MPI_SUCCESS) { +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + MPIR_ERR_POP(mpi_errno); + } + + /* Apply the op */ + mpi_errno = do_accumulate_op((void *) &fop_pkt->info.data, 1, fop_pkt->datatype, +- fop_pkt->addr, 1, fop_pkt->datatype, 0, fop_pkt->op); ++ fop_pkt->addr, 1, fop_pkt->datatype, 0, fop_pkt->op, ++ MPIDI_RMA_ACC_SRCBUF_DEFAULT); + +- if (win_ptr->shm_allocated == TRUE) ++ if (win_ptr->shm_allocated == TRUE) { + MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr); ++ } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); +@@ -1399,7 +1345,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + /* sending process is not completed, set proper OnDataAvail + * (it is initialized to NULL by lower layer) */ + resp_req->dev.target_win_handle = fop_pkt->target_win_handle; +- resp_req->dev.flags = fop_pkt->flags; ++ resp_req->dev.pkt_flags = fop_pkt->pkt_flags; + resp_req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_FOPSendComplete; + + /* here we increment the Active Target counter to guarantee the GET-like +@@ -1415,7 +1361,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + } + + mpi_errno = finish_op_on_target(win_ptr, vc, TRUE /* has response data */ , +- fop_pkt->flags, MPI_WIN_NULL); ++ fop_pkt->pkt_flags, MPI_WIN_NULL); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + } +@@ -1440,7 +1386,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + req->dev.op = fop_pkt->op; + req->dev.real_user_buf = fop_pkt->addr; + req->dev.target_win_handle = fop_pkt->target_win_handle; +- req->dev.flags = fop_pkt->flags; ++ req->dev.pkt_flags = fop_pkt->pkt_flags; + req->dev.resp_request_handle = fop_pkt->request_handle; + req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_FOPRecvComplete; + req->dev.OnFinal = MPIDI_CH3_ReqHandler_FOPRecvComplete; +@@ -1459,7 +1405,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + + MPIR_Datatype_get_extent_macro(fop_pkt->datatype, extent); + +- req->dev.user_buf = MPL_malloc(extent, MPL_MEM_BUFFER); ++ req->dev.user_buf = MPL_malloc(extent, MPL_MEM_RMA); + if (!req->dev.user_buf) { + MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %d", extent); + } +@@ -1497,10 +1443,6 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_FOPResp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -1525,16 +1467,16 @@ int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIR_Win_get_ptr(req->dev.source_win_handle, win_ptr); + + /* decrement ack_counter */ +- if (fop_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { +- mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, fop_resp_pkt->flags); ++ if (fop_resp_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { ++ mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, fop_resp_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = handle_lock_ack(win_ptr, target_rank, fop_resp_pkt->flags); ++ mpi_errno = handle_lock_ack(win_ptr, target_rank, fop_resp_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +- if (fop_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { ++ if (fop_resp_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { + mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -1585,10 +1527,6 @@ int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Get_AccumResp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) + { +@@ -1612,15 +1550,15 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + MPIR_Win_get_ptr(req->dev.source_win_handle, win_ptr); + + /* decrement ack_counter on target */ +- if (get_accum_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { +- mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, get_accum_resp_pkt->flags); ++ if (get_accum_resp_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { ++ mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, get_accum_resp_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +- mpi_errno = handle_lock_ack(win_ptr, target_rank, get_accum_resp_pkt->flags); ++ mpi_errno = handle_lock_ack(win_ptr, target_rank, get_accum_resp_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +- if (get_accum_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { ++ if (get_accum_resp_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { + mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -1667,7 +1605,7 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + * Note that this extended packet header only contains stream_offset and + * does not contain datatype info, so here we pass 0 to is_derived_dt + * flag. */ +- MPIDI_CH3_ExtPkt_Gaccum_get_stream(req->dev.flags, 0 /* is_derived_dt */ , ++ MPIDI_CH3_ExtPkt_Gaccum_get_stream(req->dev.pkt_flags, 0 /* is_derived_dt */ , + req->dev.ext_hdr_ptr, &contig_stream_offset); + + total_len = type_size * req->dev.user_count; +@@ -1689,11 +1627,8 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + else { + *buflen = 0; + +- req->dev.segment_ptr = MPIR_Segment_alloc(); +- MPIR_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype, +- req->dev.segment_ptr); +- req->dev.segment_first = contig_stream_offset; +- req->dev.segment_size = contig_stream_offset + req->dev.recv_data_sz; ++ req->dev.msg_offset = contig_stream_offset; ++ req->dev.msgsize = contig_stream_offset + req->dev.recv_data_sz; + + mpi_errno = MPIDI_CH3U_Request_load_recv_iov(req); + if (mpi_errno != MPI_SUCCESS) { +@@ -1722,10 +1657,6 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, v + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Lock(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) + { +@@ -1745,10 +1676,10 @@ int MPIDI_CH3_PktHandler_Lock(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data + + MPIR_Win_get_ptr(lock_pkt->target_win_handle, win_ptr); + +- if (lock_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED) ++ if (lock_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED) + lock_type = MPI_LOCK_SHARED; + else { +- MPIR_Assert(lock_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); ++ MPIR_Assert(lock_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE); + lock_type = MPI_LOCK_EXCLUSIVE; + } + +@@ -1777,10 +1708,6 @@ int MPIDI_CH3_PktHandler_Lock(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, void *data + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_GetResp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIDI_CH3_Pkt_t * pkt, void *data, + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -1805,16 +1732,16 @@ int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIR_Win_get_ptr(req->dev.source_win_handle, win_ptr); + + /* decrement ack_counter on target */ +- if (get_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { +- mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, get_resp_pkt->flags); ++ if (get_resp_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) { ++ mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, get_resp_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = handle_lock_ack(win_ptr, target_rank, get_resp_pkt->flags); ++ mpi_errno = handle_lock_ack(win_ptr, target_rank, get_resp_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +- if (get_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { ++ if (get_resp_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { + mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -1862,10 +1789,6 @@ int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)), + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_LockAck +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_LockAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -1896,7 +1819,7 @@ int MPIDI_CH3_PktHandler_LockAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + MPIR_Win_get_ptr(req_ptr->dev.source_win_handle, win_ptr); + } + +- mpi_errno = handle_lock_ack(win_ptr, target_rank, lock_ack_pkt->flags); ++ mpi_errno = handle_lock_ack(win_ptr, target_rank, lock_ack_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -1911,10 +1834,6 @@ int MPIDI_CH3_PktHandler_LockAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_LockOpAck +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -1922,7 +1841,7 @@ int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + MPIDI_CH3_Pkt_lock_op_ack_t *lock_op_ack_pkt = &pkt->lock_op_ack; + MPIR_Win *win_ptr = NULL; + int target_rank = lock_op_ack_pkt->target_rank; +- MPIDI_CH3_Pkt_flags_t flags = lock_op_ack_pkt->flags; ++ int pkt_flags = lock_op_ack_pkt->pkt_flags; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_LOCKOPACK); + +@@ -1942,16 +1861,16 @@ int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + MPIR_Win_get_ptr(req_ptr->dev.source_win_handle, win_ptr); + } + +- mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, lock_op_ack_pkt->flags); ++ mpi_errno = handle_lock_ack_with_op(win_ptr, target_rank, lock_op_ack_pkt->pkt_flags); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = handle_lock_ack(win_ptr, target_rank, lock_op_ack_pkt->flags); ++ mpi_errno = handle_lock_ack(win_ptr, target_rank, lock_op_ack_pkt->pkt_flags); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { +- MPIR_Assert(flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED); ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_ACK) { ++ MPIR_Assert(pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED); + mpi_errno = MPIDI_CH3I_RMA_Handle_ack(win_ptr, target_rank); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); +@@ -1967,10 +1886,6 @@ int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Ack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Ack(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -2008,10 +1923,6 @@ int MPIDI_CH3_PktHandler_Ack(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_DecrAtCnt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_DecrAtCnt(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIDI_CH3_Pkt_t * pkt, void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -2033,7 +1944,7 @@ int MPIDI_CH3_PktHandler_DecrAtCnt(MPIDI_VC_t * vc ATTRIBUTE((unused)), + *buflen = 0; + *rreqp = NULL; + +- if (decr_at_cnt_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) { ++ if (decr_at_cnt_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) { + mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, decr_at_cnt_pkt->source_win_handle); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -2050,10 +1961,6 @@ int MPIDI_CH3_PktHandler_DecrAtCnt(MPIDI_VC_t * vc ATTRIBUTE((unused)), + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Unlock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Unlock(MPIDI_VC_t * vc ATTRIBUTE((unused)), + MPIDI_CH3_Pkt_t * pkt, void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -2075,7 +1982,7 @@ int MPIDI_CH3_PktHandler_Unlock(MPIDI_VC_t * vc ATTRIBUTE((unused)), + mpi_errno = MPIDI_CH3I_Release_lock(win_ptr); + MPIR_ERR_CHKANDJUMP(mpi_errno != MPI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**ch3|rma_msg"); + +- if (!(unlock_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK_NO_ACK)) { ++ if (!(unlock_pkt->pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK_NO_ACK)) { + mpi_errno = MPIDI_CH3I_Send_ack_pkt(vc, win_ptr, unlock_pkt->source_win_handle); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -2094,10 +2001,6 @@ int MPIDI_CH3_PktHandler_Unlock(MPIDI_VC_t * vc ATTRIBUTE((unused)), + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_Flush +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_Flush(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, + void *data ATTRIBUTE((unused)), + intptr_t * buflen, MPIR_Request ** rreqp) +@@ -2145,7 +2048,7 @@ int MPIDI_CH3_PktPrint_Put(FILE * fp, MPIDI_CH3_Pkt_t * pkt) + MPL_DBG_MSG_P(MPIDI_CH3_DBG_OTHER,TERSE," addr ......... %p\n", pkt->put.addr); + MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,TERSE," count ........ %d\n", pkt->put.count); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," datatype ..... 0x%08X\n", pkt->put.datatype)); +- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," dataloop_size. 0x%08X\n", pkt->put.info.dataloop_size)); ++ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," flattened_type_size. 0x%08X\n", pkt->put.info.flattened_type_size)); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," target ....... 0x%08X\n", pkt->put.target_win_handle)); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," source ....... 0x%08X\n", pkt->put.source_win_handle)); + /*MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," win_ptr ...... 0x%08X\n", pkt->put.win_ptr)); */ +@@ -2158,7 +2061,7 @@ int MPIDI_CH3_PktPrint_Get(FILE * fp, MPIDI_CH3_Pkt_t * pkt) + MPL_DBG_MSG_P(MPIDI_CH3_DBG_OTHER,TERSE," addr ......... %p\n", pkt->get.addr); + MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,TERSE," count ........ %d\n", pkt->get.count); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," datatype ..... 0x%08X\n", pkt->get.datatype)); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,TERSE," dataloop_size. %d\n", pkt->get.info.dataloop_size); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,TERSE," flattened_type_size. %d\n", pkt->get.info.flattened_type_size); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," request ...... 0x%08X\n", pkt->get.request_handle)); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," target ....... 0x%08X\n", pkt->get.target_win_handle)); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," source ....... 0x%08X\n", pkt->get.source_win_handle)); +@@ -2183,7 +2086,7 @@ int MPIDI_CH3_PktPrint_Accumulate(FILE * fp, MPIDI_CH3_Pkt_t * pkt) + MPL_DBG_MSG_P(MPIDI_CH3_DBG_OTHER,TERSE," addr ......... %p\n", pkt->accum.addr); + MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,TERSE," count ........ %d\n", pkt->accum.count); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," datatype ..... 0x%08X\n", pkt->accum.datatype)); +- MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,TERSE," dataloop_size. %d\n", pkt->accum.info.dataloop_size); ++ MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,TERSE," flattened_type_size. %d\n", pkt->accum.info.flattened_type_size); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," op ........... 0x%08X\n", pkt->accum.op)); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," target ....... 0x%08X\n", pkt->accum.target_win_handle)); + MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TERSE,(MPL_DBG_FDEST," source ....... 0x%08X\n", pkt->accum.source_win_handle)); +--- a/src/mpid/ch3/src/ch3u_rma_progress.c ++++ b/src/mpid/ch3/src/ch3u_rma_progress.c +@@ -61,10 +61,6 @@ static inline int issue_ops_win(MPIR_Win * win_ptr, int *made_progress); + (win_)->states.access_state == MPIDI_RMA_LOCK_ALL_GRANTED) + + +-#undef FUNCNAME +-#define FUNCNAME check_and_switch_target_state +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int check_and_switch_target_state(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target, + int *is_able_to_issue, int *made_progress) + { +@@ -148,16 +144,16 @@ static inline int check_and_switch_target_state(MPIR_Win * win_ptr, MPIDI_RMA_Ta + case MPIDI_RMA_NONE: + if (target->win_complete_flag) { + if (target->pending_net_ops_list_head == NULL) { +- MPIDI_CH3_Pkt_flags_t flags = MPIDI_CH3_PKT_FLAG_NONE; ++ int pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + if (target->sync.sync_flag == MPIDI_RMA_SYNC_FLUSH && + target->num_ops_flush_not_issued > 0) { +- flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH; + win_ptr->outstanding_acks++; + target->sync.outstanding_acks++; + target->num_ops_flush_not_issued = 0; + } + +- mpi_errno = send_decr_at_cnt_msg(target->target_rank, win_ptr, flags); ++ mpi_errno = send_decr_at_cnt_msg(target->target_rank, win_ptr, pkt_flags); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -196,7 +192,7 @@ static inline int check_and_switch_target_state(MPIR_Win * win_ptr, MPIDI_RMA_Ta + MPIR_ERR_POP(mpi_errno); + } + else { +- MPIDI_CH3_Pkt_flags_t flag = MPIDI_CH3_PKT_FLAG_NONE; ++ int flag = MPIDI_CH3_PKT_FLAG_NONE; + if (target->num_ops_flush_not_issued == 0) { + flag = MPIDI_CH3_PKT_FLAG_RMA_UNLOCK_NO_ACK; + } +@@ -235,15 +231,11 @@ static inline int check_and_switch_target_state(MPIR_Win * win_ptr, MPIDI_RMA_Ta + + /* Note: we should prevent this function to be re-entrant. It has the risk of + * causing too many re-entrance and using up function stack. */ +-#undef FUNCNAME +-#define FUNCNAME issue_ops_target +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int issue_ops_target(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * target, + int *made_progress) + { + MPIDI_RMA_Op_t *curr_op = NULL; +- MPIDI_CH3_Pkt_flags_t flags; ++ int pkt_flags; + int first_op = 1, mpi_errno = MPI_SUCCESS; + static int fn_reentrance_check = FALSE; + +@@ -272,17 +264,17 @@ static inline int issue_ops_target(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * targ + + target->num_ops_flush_not_issued++; + +- flags = MPIDI_CH3_PKT_FLAG_NONE; ++ pkt_flags = MPIDI_CH3_PKT_FLAG_NONE; + + if (first_op) { + /* piggyback on first OP. */ + if (target->access_state == MPIDI_RMA_LOCK_CALLED) { + MPIR_Assert(curr_op->piggyback_lock_candidate); + if (target->lock_type == MPI_LOCK_SHARED) +- flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED; + else { + MPIR_Assert(target->lock_type == MPI_LOCK_EXCLUSIVE); +- flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE; + } + target->access_state = MPIDI_RMA_LOCK_ISSUED; + } +@@ -295,42 +287,42 @@ static inline int issue_ops_target(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * targ + * (2) operation is a READ op (GET, GACC, FOP, CAS) */ + if ((!MPIDI_CH3U_Win_pkt_orderings.am_flush_ordered) || + MPIDI_CH3I_RMA_PKT_IS_READ_OP(curr_op->pkt)) { +- flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH; + } + + if (curr_op->next == NULL) { + /* piggyback on last OP. */ + if (target->sync.sync_flag == MPIDI_RMA_SYNC_FLUSH) { +- flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH; + } + else if (target->sync.sync_flag == MPIDI_RMA_SYNC_UNLOCK) { +- flags |= MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_UNLOCK; + + /* if piggyback UNLOCK then unset FLUSH (set for every + * operation on out-of-order network). */ +- flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH; ++ pkt_flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH; + } + if (target->win_complete_flag) +- flags |= MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER; ++ pkt_flags |= MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER; + } + + /* only increase ack counter when FLUSH or UNLOCK flag is set, + * but without LOCK piggyback. */ +- if (((flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) +- || (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))) { ++ if (((pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ++ || (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))) { + win_ptr->outstanding_acks++; + target->sync.outstanding_acks++; + target->num_ops_flush_not_issued = 0; + } + +- mpi_errno = issue_rma_op(curr_op, win_ptr, target, flags); ++ mpi_errno = issue_rma_op(curr_op, win_ptr, target, pkt_flags); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + + (*made_progress) = 1; + +- if (flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || +- flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { ++ if (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || ++ pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) { + /* If this operation is piggybacked with LOCK, + * do not move it out of pending list, and do + * not complete the user request, because we +@@ -342,9 +334,9 @@ static inline int issue_ops_target(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * targ + + if (target->next_op_to_issue == NULL) { + if (((target->sync.sync_flag == MPIDI_RMA_SYNC_FLUSH) && +- (flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH)) || ++ (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH)) || + ((target->sync.sync_flag == MPIDI_RMA_SYNC_UNLOCK) && +- (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))) { ++ (pkt_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))) { + /* We are done with ending sync, unset target's sync_flag. */ + target->sync.sync_flag = MPIDI_RMA_SYNC_NONE; + } +@@ -377,10 +369,6 @@ static inline int issue_ops_target(MPIR_Win * win_ptr, MPIDI_RMA_Target_t * targ + } + + +-#undef FUNCNAME +-#define FUNCNAME issue_ops_win +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int issue_ops_win(MPIR_Win * win_ptr, int *made_progress) + { + int mpi_errno = MPI_SUCCESS; +@@ -429,10 +417,6 @@ static inline int issue_ops_win(MPIR_Win * win_ptr, int *made_progress) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_RMA_Cleanup_ops_aggressive +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_RMA_Cleanup_ops_aggressive(MPIR_Win * win_ptr) + { + int i, local_completed = 0, remote_completed ATTRIBUTE((unused)) = 0; +@@ -482,10 +466,6 @@ int MPIDI_CH3I_RMA_Cleanup_ops_aggressive(MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_RMA_Cleanup_target_aggressive +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_RMA_Cleanup_target_aggressive(MPIR_Win * win_ptr, MPIDI_RMA_Target_t ** target) + { + int i, local_completed ATTRIBUTE((unused)) = 0, remote_completed = 0; +@@ -564,10 +544,6 @@ int MPIDI_CH3I_RMA_Cleanup_target_aggressive(MPIR_Win * win_ptr, MPIDI_RMA_Targe + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_RMA_Make_progress_target +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_RMA_Make_progress_target(MPIR_Win * win_ptr, int target_rank, int *made_progress) + { + int temp_progress = 0; +@@ -624,10 +600,6 @@ int MPIDI_CH3I_RMA_Make_progress_target(MPIR_Win * win_ptr, int target_rank, int + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_RMA_Make_progress_win +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_RMA_Make_progress_win(MPIR_Win * win_ptr, int *made_progress) + { + int mpi_errno = MPI_SUCCESS; +@@ -664,10 +636,6 @@ int MPIDI_CH3I_RMA_Make_progress_win(MPIR_Win * win_ptr, int *made_progress) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_RMA_Make_progress_global +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_RMA_Make_progress_global(int *made_progress) + { + MPIR_Win *win_ptr; +--- a/src/mpid/ch3/src/ch3u_rma_reqops.c ++++ b/src/mpid/ch3/src/ch3u_rma_reqops.c +@@ -8,10 +8,6 @@ + #include "mpidi_ch3_impl.h" + #include "mpidrma.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Rput +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Rput(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr, +@@ -70,10 +66,6 @@ int MPID_Rput(const void *origin_addr, int origin_count, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Rget +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Rget(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr, +@@ -132,10 +124,6 @@ int MPID_Rget(void *origin_addr, int origin_count, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Raccumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Raccumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win * win_ptr, +@@ -194,10 +182,6 @@ int MPID_Raccumulate(const void *origin_addr, int origin_count, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Rget_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Rget_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, void *result_addr, int result_count, + MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, +--- a/src/mpid/ch3/src/ch3u_rma_sync.c ++++ b/src/mpid/ch3/src/ch3u_rma_sync.c +@@ -325,10 +325,6 @@ void MPIDI_CH3_RMA_Init_sync_pvars(void) + + #define SYNC_POST_TAG 100 + +-#undef FUNCNAME +-#define FUNCNAME flush_local_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int flush_local_all(MPIR_Win * win_ptr) + { + int i, made_progress = 0; +@@ -376,10 +372,6 @@ static inline int flush_local_all(MPIR_Win * win_ptr) + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME flush_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int flush_all(MPIR_Win * win_ptr) + { + int i, made_progress = 0; +@@ -427,10 +419,6 @@ static inline int flush_all(MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME fence_barrier_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int fence_barrier_complete(MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; +@@ -473,10 +461,6 @@ static int fence_barrier_complete(MPIR_Request * sreq) + /* WIN_COMPLETE, WIN_WAIT, WIN_TEST) */ + /********************************************************************************/ + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_fence +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_fence(int assert, MPIR_Win * win_ptr) + { + int i; +@@ -696,10 +680,6 @@ int MPID_Win_fence(int assert, MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_post +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_post(MPIR_Group * post_grp_ptr, int assert, MPIR_Win * win_ptr) + { + int *post_ranks_in_win_grp; +@@ -793,10 +773,6 @@ int MPID_Win_post(MPIR_Group * post_grp_ptr, int assert, MPIR_Win * win_ptr) + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME start_req_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int start_req_complete(MPIR_Request * req) + { + int mpi_errno = MPI_SUCCESS; +@@ -826,10 +802,6 @@ static int start_req_complete(MPIR_Request * req) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_start(MPIR_Group * group_ptr, int assert, MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -950,10 +922,6 @@ int MPID_Win_start(MPIR_Group * group_ptr, int assert, MPIR_Win * win_ptr) + + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_complete(MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -1038,10 +1006,6 @@ int MPID_Win_complete(MPIR_Win * win_ptr) + + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_wait(MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -1077,10 +1041,6 @@ int MPID_Win_wait(MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_test(MPIR_Win * win_ptr, int *flag) + { + int mpi_errno = MPI_SUCCESS; +@@ -1123,10 +1083,6 @@ int MPID_Win_test(MPIR_Win * win_ptr, int *flag) + /* WIN_FLUSH_LOCAL_ALL, WIN_SYNC) */ + /********************************************************************************/ + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_lock(int lock_type, int dest, int assert, MPIR_Win * win_ptr) + { + int made_progress = 0; +@@ -1233,10 +1189,6 @@ int MPID_Win_lock(int lock_type, int dest, int assert, MPIR_Win * win_ptr) + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_unlock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_unlock(int dest, MPIR_Win * win_ptr) + { + int made_progress = 0; +@@ -1332,10 +1284,6 @@ int MPID_Win_unlock(int dest, MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_flush +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_flush(int dest, MPIR_Win * win_ptr) + { + int made_progress = 0; +@@ -1423,10 +1371,6 @@ int MPID_Win_flush(int dest, MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_flush_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_flush_local(int dest, MPIR_Win * win_ptr) + { + int made_progress = 0; +@@ -1499,10 +1443,6 @@ int MPID_Win_flush_local(int dest, MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_lock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_lock_all(int assert, MPIR_Win * win_ptr) + { + int i, rank = win_ptr->comm_ptr->rank; +@@ -1578,10 +1518,6 @@ int MPID_Win_lock_all(int assert, MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_unlock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_unlock_all(MPIR_Win * win_ptr) + { + int i, made_progress = 0; +@@ -1710,10 +1646,6 @@ int MPID_Win_unlock_all(MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_flush_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_flush_all(MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -1746,10 +1678,6 @@ int MPID_Win_flush_all(MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_flush_local_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_flush_local_all(MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -1782,10 +1710,6 @@ int MPID_Win_flush_local_all(MPIR_Win * win_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_sync +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_sync(MPIR_Win * win_ptr) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/ch3u_rndv.c ++++ b/src/mpid/ch3/src/ch3u_rndv.c +@@ -11,10 +11,6 @@ + * for MPI point-to-point messaging. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_RndvSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* MPIDI_CH3_RndvSend - Send a request to perform a rendezvous send */ + int MPIDI_CH3_RndvSend( MPIR_Request **sreq_p, const void * buf, MPI_Aint count, + MPI_Datatype datatype, int dt_contig, intptr_t data_sz, +@@ -103,10 +99,6 @@ int MPIDI_CH3_RndvSend( MPIR_Request **sreq_p, const void * buf, MPI_Aint count, + MPIDI_Request_set_msg_type((rreq_), (msg_type_)); \ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_RndvReqToSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **rreqp ) + { +@@ -191,10 +183,6 @@ int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, vo + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_RndvClrToSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data ATTRIBUTE((unused)), + intptr_t *buflen, MPIR_Request **rreqp ) + { +@@ -258,15 +246,11 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, vo + } + else + { +- sreq->dev.segment_ptr = MPIR_Segment_alloc( ); +- MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(sreq->dev.user_buf, sreq->dev.user_count, +- sreq->dev.datatype, sreq->dev.segment_ptr); +- sreq->dev.segment_first = 0; +- sreq->dev.segment_size = data_sz; ++ sreq->dev.msg_offset = 0; ++ sreq->dev.msgsize = data_sz; + + MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex); +- mpi_errno = vc->sendNoncontig_fn(vc, sreq, rs_pkt, sizeof(*rs_pkt)); ++ mpi_errno = vc->sendNoncontig_fn(vc, sreq, rs_pkt, sizeof(*rs_pkt), NULL, 0); + MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); + MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|senddata"); + } +@@ -276,10 +260,6 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, vo + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_PktHandler_RndvSend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_PktHandler_RndvSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *data, + intptr_t *buflen, MPIR_Request **rreqp ) + { +@@ -336,10 +316,6 @@ int MPIDI_CH3_PktHandler_RndvSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, void *d + * This routine processes a rendezvous message once the message is matched. + * It is used in mpid_recv and mpid_irecv. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_RecvRndv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_RecvRndv( MPIDI_VC_t * vc, MPIR_Request *rreq ) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/ch3u_win_fns.c ++++ b/src/mpid/ch3/src/ch3u_win_fns.c +@@ -10,10 +10,6 @@ + + extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather ATTRIBUTE((unused)); + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Win_fns_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_Win_fns_init(MPIDI_CH3U_Win_fns_t * win_fns) + { + int mpi_errno = MPI_SUCCESS; +@@ -34,10 +30,6 @@ int MPIDI_Win_fns_init(MPIDI_CH3U_Win_fns_t * win_fns) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Win_gather_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Win_gather_info(void *base, MPI_Aint size, int disp_unit, + MPIR_Info * info, MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) + { +@@ -101,10 +93,6 @@ int MPIDI_CH3U_Win_gather_info(void *base, MPI_Aint size, int disp_unit, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Win_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Win_create(void *base, MPI_Aint size, int disp_unit, MPIR_Info * info, + MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) + { +@@ -136,10 +124,6 @@ int MPIDI_CH3U_Win_create(void *base, MPI_Aint size, int disp_unit, MPIR_Info * + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Win_create_dynamic +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -160,10 +144,6 @@ int MPIDI_CH3U_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm_ptr, MPIR_W + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_attach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_attach(MPIR_Win * win, void *base, MPI_Aint size) + { + int mpi_errno = MPI_SUCCESS; +@@ -183,10 +163,6 @@ int MPID_Win_attach(MPIR_Win * win, void *base, MPI_Aint size) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_detach(MPIR_Win * win, const void *base) + { + int mpi_errno = MPI_SUCCESS; +@@ -206,10 +182,6 @@ int MPID_Win_detach(MPIR_Win * win, const void *base) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Win_allocate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, + MPIR_Comm * comm_ptr, void *baseptr, MPIR_Win ** win_ptr) + { +@@ -240,10 +212,6 @@ int MPIDI_CH3U_Win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Win_allocate_no_shm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Win_allocate_no_shm(MPI_Aint size, int disp_unit, MPIR_Info * info, + MPIR_Comm * comm_ptr, void *baseptr, MPIR_Win ** win_ptr) + { +@@ -283,10 +251,6 @@ int MPIDI_CH3U_Win_allocate_no_shm(MPI_Aint size, int disp_unit, MPIR_Info * inf + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Win_shared_query +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Win_shared_query(MPIR_Win * win_ptr, int target_rank, MPI_Aint * size, + int *disp_unit, void *baseptr) + { +@@ -309,10 +273,6 @@ int MPIDI_CH3U_Win_shared_query(MPIR_Win * win_ptr, int target_rank, MPI_Aint * + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_set_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_set_info(MPIR_Win * win, MPIR_Info * info) + { + int mpi_errno = MPI_SUCCESS; +@@ -442,10 +402,6 @@ int MPID_Win_set_info(MPIR_Win * win, MPIR_Info * info) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_get_info(MPIR_Win * win, MPIR_Info ** info_used) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/mpid_abort.c ++++ b/src/mpid/ch3/src/mpid_abort.c +@@ -15,10 +15,6 @@ + /* FIXME: This routine *or* MPI_Abort should provide abort callbacks, + similar to the support in MPI_Finalize */ + +-#undef FUNCNAME +-#define FUNCNAME MPID_Abort +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Abort(MPIR_Comm * comm, int mpi_errno, int exit_code, + const char *error_msg) + { +@@ -65,9 +61,6 @@ int MPID_Abort(MPIR_Comm * comm, int mpi_errno, int exit_code, + } + } + +- MPIDU_Ftb_publish_me(MPIDU_FTB_EV_ABORT); +- MPIDU_Ftb_finalize(); +- + #ifdef HAVE_DEBUGGER_SUPPORT + MPIR_Debugger_set_aborting( error_msg ); + #endif +--- a/src/mpid/ch3/src/mpid_aint.c ++++ b/src/mpid/ch3/src/mpid_aint.c +@@ -16,10 +16,6 @@ + arguments, where base represents a base address returned by a call + to MPI_GET_ADDRESS and disp represents a signed integer displacement. + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Aint_add +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp) + { + MPI_Aint result; +@@ -27,7 +23,7 @@ MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_AINT_ADD); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_AINT_ADD); + +- result = MPIR_VOID_PTR_CAST_TO_MPI_AINT ((char*)MPIR_AINT_CAST_TO_VOID_PTR(base) + disp); ++ result = (MPI_Aint) ((char *) base + disp); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_AINT_ADD); + return result; +@@ -43,10 +39,6 @@ MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp) + addr2 arguments, where addr1 and addr2 represent addresses returned by calls + to MPI_GET_ADDRESS. + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Aint_diff +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPI_Aint MPID_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) + { + MPI_Aint result; +@@ -54,7 +46,7 @@ MPI_Aint MPID_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_AINT_DIFF); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_AINT_DIFF); + +- result = MPIR_PTR_DISP_CAST_TO_MPI_AINT ((char*)MPIR_AINT_CAST_TO_VOID_PTR(addr1) - (char*)MPIR_AINT_CAST_TO_VOID_PTR(addr2)); ++ result = (MPI_Aint) ((char *) addr1 - (char *) addr2); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_AINT_DIFF); + return result; +--- a/src/mpid/ch3/src/mpid_cancel_recv.c ++++ b/src/mpid/ch3/src/mpid_cancel_recv.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Cancel_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Cancel_recv(MPIR_Request * rreq) + { + int netmod_cancelled = TRUE; +--- a/src/mpid/ch3/src/mpid_cancel_send.c ++++ b/src/mpid/ch3/src/mpid_cancel_send.c +@@ -10,10 +10,6 @@ + cancel message, once the code decides that the request can still + be cancelled */ + +-#undef FUNCNAME +-#define FUNCNAME MPID_Cancel_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Cancel_send(MPIR_Request * sreq) + { + MPIDI_VC_t * vc; +@@ -131,7 +127,7 @@ int MPID_Cancel_send(MPIR_Request * sreq) + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) + { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**ch3|cancelrndv", 0); + goto fn_exit; + } +--- a/src/mpid/ch3/src/mpid_comm_disconnect.c ++++ b/src/mpid/ch3/src/mpid_comm_disconnect.c +@@ -18,10 +18,6 @@ + .N Errors + .N MPI_SUCCESS + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_disconnect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_disconnect(MPIR_Comm *comm_ptr) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/mpid_comm_failure_ack.c ++++ b/src/mpid/ch3/src/mpid_comm_failure_ack.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_failure_ack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_failure_ack(MPIR_Comm *comm_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -38,10 +34,6 @@ fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_failure_get_acked +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_failure_get_acked(MPIR_Comm *comm_ptr, MPIR_Group **group_ptr) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c ++++ b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c +@@ -14,7 +14,7 @@ + /* Generates a bitarray based on orig_comm where all procs in group are marked with 1 */ + static void group_to_bitarray(MPIR_Group *group, MPIR_Comm *orig_comm, int **bitarray, int *bitarray_size) { + int mask; +- int *group_ranks, *comm_ranks, i, index; ++ int *group_ranks, *comm_ranks, i; + + /* Calculate the bitarray size in ints and allocate space */ + *bitarray_size = (orig_comm->local_size / (8 * sizeof(int)) + (orig_comm->local_size % (8 * sizeof(int)) ? 1 : 0)); +@@ -40,9 +40,9 @@ static void group_to_bitarray(MPIR_Group *group, MPIR_Comm *orig_comm, int **bit + * add it to the bitarray. */ + for (i = 0; i < group->size ; i++) { + if (comm_ranks[i] == MPI_UNDEFINED) continue; +- index = comm_ranks[i] / (sizeof(int) * 8); ++ int idx = comm_ranks[i] / (sizeof(int) * 8); + mask = 0x1 << comm_ranks[i] % (sizeof(int) * 8); +- (*bitarray)[index] |= mask; ++ (*bitarray)[idx] |= mask; + } + + MPL_free(group_ranks); +@@ -82,10 +82,6 @@ static MPIR_Group *bitarray_to_group(MPIR_Comm *comm_ptr, int *bitarray) + return ret_group; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_get_all_failed_procs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_get_all_failed_procs(MPIR_Comm *comm_ptr, MPIR_Group **failed_group, int tag) + { + int mpi_errno = MPI_SUCCESS, ret_errno; +--- a/src/mpid/ch3/src/mpid_comm_revoke.c ++++ b/src/mpid/ch3/src/mpid_comm_revoke.c +@@ -15,10 +15,6 @@ + * be set to true. This way we'll know to decrement the counter twice + * (once for our local revocation and once for the remote). + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_revoke +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_revoke(MPIR_Comm *comm_ptr, int is_remote) + { + MPIDI_VC_t *vc; +--- a/src/mpid/ch3/src/mpid_comm_spawn_multiple.c ++++ b/src/mpid/ch3/src/mpid_comm_spawn_multiple.c +@@ -28,10 +28,6 @@ + .N Errors + .N MPI_SUCCESS + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_spawn_multiple +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_spawn_multiple(int count, char *array_of_commands[], + char ** array_of_argv[], const int array_of_maxprocs[], + MPIR_Info * array_of_info_ptrs[], int root, +@@ -59,7 +55,7 @@ int MPID_Comm_spawn_multiple(int count, char *array_of_commands[], + array_of_errcodes); + # else + MPIR_ERR_SET1(mpi_errno,MPI_ERR_OTHER, "**notimpl", +- "**notimpl %s", FCNAME); ++ "**notimpl %s", __func__); + # endif + + fn_fail: +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch3/src/mpid_datatype.c +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++ ++int MPID_Type_commit_hook(MPIR_Datatype * type) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_TYPE_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_TYPE_CREATE_HOOK); ++ ++ return 0; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_TYPE_CREATE_HOOK); ++} ++ ++int MPID_Type_free_hook(MPIR_Datatype * type) ++{ ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_TYPE_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_TYPE_FREE_HOOK); ++ ++ return 0; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_TYPE_FREE_HOOK); ++} +--- a/src/mpid/ch3/src/mpid_finalize.c ++++ b/src/mpid/ch3/src/mpid_finalize.c +@@ -11,10 +11,6 @@ + rather than direct routine calls. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPID_Finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Finalize(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -153,8 +149,6 @@ int MPID_Finalize(void) + + MPL_free(MPIDI_failed_procs_string); + +- MPIDU_Ftb_finalize(); +- + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_FINALIZE); + return mpi_errno; +--- a/src/mpid/ch3/src/mpid_get_universe_size.c ++++ b/src/mpid/ch3/src/mpid_get_universe_size.c +@@ -19,10 +19,6 @@ + * bypass the standard PMI implementations, it is the responsibility of the + * channel to provide an implementation of the PMI routines. + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_universe_size +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Get_universe_size(int * universe_size) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/mpid_getpname.c ++++ b/src/mpid/ch3/src/mpid_getpname.c +@@ -18,10 +18,6 @@ static inline void setupProcessorName( void ); + /* + * MPID_Get_processor_name() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_processor_name +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Get_processor_name(char * name, int namelen, int * resultlen) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/mpid_improbe.c ++++ b/src/mpid/ch3/src/mpid_improbe.c +@@ -10,10 +10,6 @@ int (*MPIDI_Anysource_improbe_fn)(int tag, MPIR_Comm * comm, int context_offset, + int *flag, MPIR_Request **message, + MPI_Status * status) = NULL; + +-#undef FUNCNAME +-#define FUNCNAME MPID_Improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Improbe(int source, int tag, MPIR_Comm *comm, int context_offset, + int *flag, MPIR_Request **message, MPI_Status *status) + { +--- a/src/mpid/ch3/src/mpid_imrecv.c ++++ b/src/mpid/ch3/src/mpid_imrecv.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Imrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype, + MPIR_Request *message, MPIR_Request **rreqp) + { +--- a/src/mpid/ch3/src/mpid_init.c ++++ b/src/mpid/ch3/src/mpid_init.c +@@ -56,10 +56,6 @@ MPL_dbg_class MPIDI_CH3_DBG_VC; + MPL_dbg_class MPIDI_CH3_DBG_REFCOUNT; + #endif /* MPL_USE_DBG_LOGGING */ + +-#undef FUNCNAME +-#define FUNCNAME finalize_failed_procs_group +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int finalize_failed_procs_group(void *param) + { + int mpi_errno = MPI_SUCCESS; +@@ -72,10 +68,6 @@ static int finalize_failed_procs_group(void *param) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME set_eager_threshold +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int set_eager_threshold(MPIR_Comm *comm_ptr, MPIR_Info *info, void *state) + { + int mpi_errno = MPI_SUCCESS; +@@ -98,10 +90,6 @@ static int set_eager_threshold(MPIR_Comm *comm_ptr, MPIR_Info *info, void *state + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Init(int *argc, char ***argv, int requested, int *provided, + int *has_args, int *has_env) + { +@@ -192,10 +180,6 @@ int MPID_Init(int *argc, char ***argv, int requested, int *provided, + mpi_errno = MPIDI_Populate_vc_node_ids(pg, pg_rank); + if (mpi_errno) MPIR_ERR_POP(mpi_errno); + +- /* Initialize FTB after PMI init */ +- mpi_errno = MPIDU_Ftb_init(); +- if (mpi_errno) MPIR_ERR_POP(mpi_errno); +- + /* Initialize Window functions table with defaults, then call the channel's + init function. */ + MPIDI_Win_fns_init(&MPIDI_CH3U_Win_fns); +@@ -615,9 +599,7 @@ int MPIDI_CH3I_BCInit( char **bc_val_p, int *val_max_sz_p ) + int MPIDI_CH3I_BCFree( char *bc_val ) + { + /* */ +- if (bc_val) { +- MPL_free( bc_val ); +- } ++ MPL_free( bc_val ); + + return 0; + } +@@ -632,10 +614,7 @@ static int pg_compare_ids(void * id1, void * id2) + + static int pg_destroy(MPIDI_PG_t * pg) + { +- if (pg->id != NULL) +- { +- MPL_free(pg->id); +- } ++ MPL_free(pg->id); + + return MPI_SUCCESS; + } +--- a/src/mpid/ch3/src/mpid_iprobe.c ++++ b/src/mpid/ch3/src/mpid_iprobe.c +@@ -9,10 +9,6 @@ + int (*MPIDI_Anysource_iprobe_fn)(int tag, MPIR_Comm * comm, int context_offset, int *flag, + MPI_Status * status) = NULL; + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Iprobe(int source, int tag, MPIR_Comm *comm, int context_offset, + int *flag, MPI_Status *status) + { +--- a/src/mpid/ch3/src/mpid_irecv.c ++++ b/src/mpid/ch3/src/mpid_irecv.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Irecv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) +--- a/src/mpid/ch3/src/mpid_irsend.c ++++ b/src/mpid/ch3/src/mpid_irsend.c +@@ -9,10 +9,6 @@ + /* + * MPID_Irsend() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Irsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +@@ -60,14 +56,14 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in + goto fn_exit; + } + #endif +- } +- +- MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit); +- MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_RSEND); +- MPIDI_Request_set_msg_type(sreq, MPIDI_REQUEST_EAGER_MSG); +- +- if (rank == MPI_PROC_NULL) +- { ++ MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit); ++ MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_RSEND); ++ MPIDI_Request_set_msg_type(sreq, MPIDI_REQUEST_EAGER_MSG); ++ } else { ++ /* sreq creation code is duplicated here, but it is better than add separate branch later. */ ++ MPIDI_Request_create_sreq(sreq, mpi_errno, goto fn_exit); ++ MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_RSEND); ++ MPIDI_Request_set_msg_type(sreq, MPIDI_REQUEST_EAGER_MSG); + MPIR_Object_set_ref(sreq, 1); + MPIR_cc_set(&sreq->cc, 0); + goto fn_exit; +@@ -120,7 +116,7 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in + mpi_errno = MPIDI_CH3_EagerNoncontigSend( &sreq, + MPIDI_CH3_PKT_READY_SEND, + buf, count, datatype, +- data_sz, rank, tag, ++ rank, tag, + comm, context_offset ); + /* If we're not complete, then add a reference to the datatype */ + if (sreq) { +--- a/src/mpid/ch3/src/mpid_isend.c ++++ b/src/mpid/ch3/src/mpid_isend.c +@@ -21,10 +21,6 @@ + /* + * MPID_Isend() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, + int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) +@@ -144,7 +140,7 @@ int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank + mpi_errno = MPIDI_CH3_EagerNoncontigSend( &sreq, + MPIDI_CH3_PKT_EAGER_SEND, + buf, count, datatype, +- data_sz, rank, tag, ++ rank, tag, + comm, context_offset ); + /* If we're not complete, then add a reference to the datatype */ + if (sreq) { +--- a/src/mpid/ch3/src/mpid_issend.c ++++ b/src/mpid/ch3/src/mpid_issend.c +@@ -9,10 +9,6 @@ + /* + * MPID_Issend() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +--- a/src/mpid/ch3/src/mpid_mprobe.c ++++ b/src/mpid/ch3/src/mpid_mprobe.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Mprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Mprobe(int source, int tag, MPIR_Comm *comm, int context_offset, + MPIR_Request **message, MPI_Status *status) + { +--- a/src/mpid/ch3/src/mpid_mrecv.c ++++ b/src/mpid/ch3/src/mpid_mrecv.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Imrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Mrecv(void *buf, int count, MPI_Datatype datatype, + MPIR_Request *message, MPI_Status *status, MPIR_Request **rreq) + { +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch3/src/mpid_op.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++ ++int MPID_Op_commit_hook(MPIR_Op * op) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OP_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OP_CREATE_HOOK); ++ ++ return 0; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OP_CREATE_HOOK); ++} ++ ++int MPID_Op_free_hook(MPIR_Op * op) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OP_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OP_FREE_HOOK); ++ ++ return 0; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OP_FREE_HOOK); ++} +--- a/src/mpid/ch3/src/mpid_port.c ++++ b/src/mpid/ch3/src/mpid_port.c +@@ -37,10 +37,6 @@ static MPIDI_PortFns portFns = { 0, 0, 0, 0 }; + .N MPI_SUCCESS + .N MPI_ERR_OTHER + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPID_Open_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Open_port(MPIR_Info *info_ptr, char *port_name) + { + int mpi_errno=MPI_SUCCESS; +@@ -88,10 +84,6 @@ Input Parameters: + .N MPI_ERR_OTHER + + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPID_Close_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Close_port(const char *port_name) + { + int mpi_errno=MPI_SUCCESS; +@@ -124,10 +116,6 @@ int MPID_Close_port(const char *port_name) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_accept +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_accept(const char * port_name, MPIR_Info * info, int root, + MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) + { +@@ -162,10 +150,6 @@ int MPID_Comm_accept(const char * port_name, MPIR_Info * info, int root, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_connect(const char * port_name, MPIR_Info * info, int root, + MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) + { +@@ -277,10 +261,6 @@ static void free_port_name_tag(int tag) + /* + * MPIDI_Open_port() + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Open_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_Open_port(MPIR_Info *info_ptr, char *port_name) + { + int mpi_errno = MPI_SUCCESS; +@@ -324,10 +304,6 @@ fn_fail: + /* + * MPIDI_Close_port() + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Close_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDI_Close_port(const char *port_name) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/mpid_probe.c ++++ b/src/mpid/ch3/src/mpid_probe.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Probe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Probe(int source, int tag, MPIR_Comm * comm, int context_offset, + MPI_Status * status) + { +--- a/src/mpid/ch3/src/mpid_recv.c ++++ b/src/mpid/ch3/src/mpid_recv.c +@@ -6,10 +6,6 @@ + + #include "mpidimpl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Recv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, + MPI_Status * status, MPIR_Request ** request) +--- a/src/mpid/ch3/src/mpid_rma.c ++++ b/src/mpid/ch3/src/mpid_rma.c +@@ -54,10 +54,6 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model, + MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_create(void *base, MPI_Aint size, int disp_unit, MPIR_Info * info, + MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) + { +@@ -89,10 +85,6 @@ int MPID_Win_create(void *base, MPI_Aint size, int disp_unit, MPIR_Info * info, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_allocate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, + MPIR_Comm * comm_ptr, void *baseptr, MPIR_Win ** win_ptr) + { +@@ -119,10 +111,6 @@ int MPID_Win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_create_dynamic +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -152,10 +140,6 @@ int MPID_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm_ptr, MPIR_Win ** + + + /* The memory allocation functions */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Alloc_mem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void *MPID_Alloc_mem(size_t size, MPIR_Info * info_ptr) + { + void *ap = NULL; +@@ -170,10 +154,6 @@ void *MPID_Alloc_mem(size_t size, MPIR_Info * info_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Free_mem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Free_mem(void *ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -189,10 +169,6 @@ int MPID_Free_mem(void *ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_allocate_shared +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm_ptr, + void *base_ptr, MPIR_Win ** win_ptr) + { +@@ -217,10 +193,6 @@ int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info, MPI + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_shared_query +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_shared_query(MPIR_Win * win, int rank, MPI_Aint * size, int *disp_unit, void *baseptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -241,10 +213,6 @@ int MPID_Win_shared_query(MPIR_Win * win, int rank, MPI_Aint * size, int *disp_u + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME win_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model, MPIR_Info * info, + MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) + { +--- a/src/mpid/ch3/src/mpid_rsend.c ++++ b/src/mpid/ch3/src/mpid_rsend.c +@@ -13,10 +13,6 @@ + /* + * MPID_Rsend() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Rsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Rsend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +@@ -91,7 +87,7 @@ int MPID_Rsend(const void * buf, int count, MPI_Datatype datatype, int rank, int + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) + { +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**ch3|eagermsg", 0); ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, "**ch3|eagermsg", 0); + goto fn_exit; + } + /* --END ERROR HANDLING-- */ +@@ -122,7 +118,7 @@ int MPID_Rsend(const void * buf, int count, MPI_Datatype datatype, int rank, int + mpi_errno = MPIDI_CH3_EagerNoncontigSend( &sreq, + MPIDI_CH3_PKT_READY_SEND, + buf, count, datatype, +- data_sz, rank, tag, ++ rank, tag, + comm, context_offset ); + } + } else { +--- a/src/mpid/ch3/src/mpid_send.c ++++ b/src/mpid/ch3/src/mpid_send.c +@@ -9,10 +9,6 @@ + /* + * MPID_Send() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Send(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, + int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) +@@ -152,7 +148,7 @@ int MPID_Send(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, + mpi_errno = MPIDI_CH3_EagerNoncontigSend( &sreq, + MPIDI_CH3_PKT_EAGER_SEND, + buf, count, datatype, +- data_sz, rank, tag, ++ rank, tag, + comm, context_offset ); + } + } +--- a/src/mpid/ch3/src/mpid_ssend.c ++++ b/src/mpid/ch3/src/mpid_ssend.c +@@ -9,10 +9,6 @@ + /* + * MPID_Ssend() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Ssend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +@@ -55,7 +51,7 @@ int MPID_Ssend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank + /* --BEGIN ERROR HANDLING-- */ + if (sreq != NULL && MPIR_cc_get(sreq->cc) != 0) + { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**dev|selfsenddeadlock", 0); + goto fn_exit; + } +--- a/src/mpid/ch3/src/mpid_startall.c ++++ b/src/mpid/ch3/src/mpid_startall.c +@@ -47,10 +47,6 @@ + /* + * MPID_Startall() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Startall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Startall(int count, MPIR_Request * requests[]) + { + int i; +@@ -119,7 +115,7 @@ int MPID_Startall(int count, MPIR_Request * requests[]) + default: + { + /* --BEGIN ERROR HANDLING-- */ +- rc = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_INTERN, "**ch3|badreqtype", ++ rc = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_INTERN, "**ch3|badreqtype", + "**ch3|badreqtype %d", MPIDI_Request_get_type(preq)); + /* --END ERROR HANDLING-- */ + } +@@ -157,10 +153,6 @@ int MPID_Startall(int count, MPIR_Request * requests[]) + /* + * MPID_Send_init() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Send_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Send_init(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +@@ -187,10 +179,6 @@ int MPID_Send_init(const void * buf, int count, MPI_Datatype datatype, int rank, + /* + * MPID_Ssend_init() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Ssend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Ssend_init(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +@@ -217,10 +205,6 @@ int MPID_Ssend_init(const void * buf, int count, MPI_Datatype datatype, int rank + /* + * MPID_Rsend_init() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Rsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Rsend_init(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +@@ -247,10 +231,6 @@ int MPID_Rsend_init(const void * buf, int count, MPI_Datatype datatype, int rank + /* + * MPID_Bsend_init() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Bsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Bsend_init(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +@@ -285,10 +265,6 @@ int MPID_Bsend_init(const void * buf, int count, MPI_Datatype datatype, int rank + /* + * MPID_Recv_init() + */ +-#undef FUNCNAME +-#define FUNCNAME MPID_Recv_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Recv_init(void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +@@ -302,7 +278,7 @@ int MPID_Recv_init(void * buf, int count, MPI_Datatype datatype, int rank, int t + if (rreq == NULL) + { + /* --BEGIN ERROR HANDLING-- */ +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**nomemreq", 0); ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, "**nomemreq", 0); + /* --END ERROR HANDLING-- */ + goto fn_exit; + } +--- a/src/mpid/ch3/src/mpid_vc.c ++++ b/src/mpid/ch3/src/mpid_vc.c +@@ -61,10 +61,6 @@ cvars: + be added by assigning to elements of the vc array within the + 'MPIDI_VCRT' object. + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_VCRT_Create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_VCRT_Create(int size, struct MPIDI_VCRT **vcrt_ptr) + { + MPIDI_VCRT_t * vcrt; +@@ -100,10 +96,6 @@ int MPIDI_VCRT_Create(int size, struct MPIDI_VCRT **vcrt_ptr) + dynamic process operations. It does not change the state of any of the + virtural connections (VCs). + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_VCRT_Add_ref +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_VCRT_Add_ref(struct MPIDI_VCRT *vcrt) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_VCRT_ADD_REF); +@@ -123,10 +115,6 @@ int MPIDI_VCRT_Add_ref(struct MPIDI_VCRT *vcrt) + Notes: + + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_VCRT_Release +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_VCRT_Release(struct MPIDI_VCRT *vcrt, int isDisconnect ) + { + int in_use; +@@ -239,10 +227,6 @@ int MPIDI_VCRT_Release(struct MPIDI_VCRT *vcrt, int isDisconnect ) + or 'MPI_Comm_connect/MPI_Comm_accept'. + + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_VCR_Dup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_VCR_Dup(MPIDI_VCR orig_vcr, MPIDI_VCR * new_vcr) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_VCR_DUP); +@@ -271,10 +255,6 @@ int MPIDI_VCR_Dup(MPIDI_VCR orig_vcr, MPIDI_VCR * new_vcr) + /*@ + MPID_Comm_get_lpid - Get the local process ID for a given VC reference + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_get_lpid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int * lpid_ptr, bool is_remote) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_VCR_GET_LPID); +@@ -298,10 +278,6 @@ int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int * lpid_ptr, bool is_rem + */ + + /* FIXME: These routines belong in a different place */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_GPID_GetAllInComm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_GPID_GetAllInComm( MPIR_Comm *comm_ptr, int local_size, + MPIDI_Gpid local_gpids[], int *singlePG ) + { +@@ -340,10 +316,6 @@ int MPIDI_GPID_GetAllInComm( MPIR_Comm *comm_ptr, int local_size, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_GPID_Get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_GPID_Get( MPIR_Comm *comm_ptr, int rank, MPIDI_Gpid *in_gpid ) + { + int pgid; +@@ -365,10 +337,6 @@ int MPIDI_GPID_Get( MPIR_Comm *comm_ptr, int rank, MPIDI_Gpid *in_gpid ) + * the GPIDs. Note that this code requires that all processes + * have information on the process groups. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_GPID_ToLpidArray +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_GPID_ToLpidArray( int size, MPIDI_Gpid in_gpid[], int lpid[] ) + { + int i, mpi_errno = MPI_SUCCESS; +@@ -424,10 +392,6 @@ int MPIDI_GPID_ToLpidArray( int size, MPIDI_Gpid in_gpid[], int lpid[] ) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_LPID_GetAllInComm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_LPID_GetAllInComm(MPIR_Comm *comm_ptr, int local_size, + int local_lpids[]) + { +@@ -445,10 +409,6 @@ static inline int MPIDI_LPID_GetAllInComm(MPIR_Comm *comm_ptr, int local_size, + /*@ + check_disjoint_lpids - Exchange address mapping for intercomm creation. + @*/ +-#undef FUNCNAME +-#define FUNCNAME check_disjoint_lpids +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int check_disjoint_lpids(int lpids1[], int n1, int lpids2[], int n2) + { + int i, mask_size, idx, bit, maxlpid = -1; +@@ -510,10 +470,6 @@ static int check_disjoint_lpids(int lpids1[], int n1, int lpids2[], int n2) + /*@ + MPID_Intercomm_exchange_map - Exchange address mapping for intercomm creation. + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPID_Intercomm_exchange_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Intercomm_exchange_map(MPIR_Comm *local_comm_ptr, int local_leader, + MPIR_Comm *peer_comm_ptr, int remote_leader, + int *remote_size, int **remote_lpids, +@@ -679,10 +635,6 @@ fn_fail: + existing communicator, for example, in a 'MPI_Comm_spawn' or + 'MPI_Comm_connect/MPI_Comm_accept'. Thus, it is only used for intercommunicators. + @*/ +-#undef FUNCNAME +-#define FUNCNAME MPID_Create_intercomm_from_lpids +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Create_intercomm_from_lpids( MPIR_Comm *newcomm_ptr, + int size, const int lpids[] ) + { +@@ -762,10 +714,6 @@ fn_fail: + information (in the KVS cache that contains information about + contacting any process in the process groups). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_ForwardPGInfo +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_ForwardPGInfo( MPIR_Comm *peer_ptr, MPIR_Comm *comm_ptr, + int nPGids, const MPIDI_Gpid in_gpids[], + int root ) +@@ -880,20 +828,12 @@ static int g_max_node_id = -1; + char MPIU_hostname[MAX_HOSTNAME_LEN] = "_UNKNOWN_"; /* '_' is an illegal char for a hostname so */ + /* this will never match */ + +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_node_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Get_node_id(MPIR_Comm *comm, int rank, int *id_p) + { + *id_p = comm->dev.vcrt->vcr_table[rank]->node_id; + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_max_node_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* Providing a comm argument permits optimization, but this function is always + allowed to return the max for the universe. */ + int MPID_Get_max_node_id(MPIR_Comm *comm, int *max_id_p) +@@ -904,10 +844,6 @@ int MPID_Get_max_node_id(MPIR_Comm *comm, int *max_id_p) + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Populate_vc_node_ids +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_Populate_vc_node_ids(MPIDI_PG_t *pg, int our_pg_rank) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch3/src/mpidi_isend_self.c ++++ b/src/mpid/ch3/src/mpidi_isend_self.c +@@ -12,10 +12,6 @@ + particularly contiguous ones? See also the FIXME about buffering + short messages */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Isend_self +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag, MPIR_Comm * comm, int context_offset, + int type, MPIR_Request ** request) + { +@@ -128,7 +124,7 @@ int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, in + /* --BEGIN ERROR HANDLING-- */ + MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,TYPICAL, + "ready send unable to find matching recv req"); +- sreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ sreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**rsendnomatch", "**rsendnomatch %d %d", rank, tag); + rreq->status.MPI_ERROR = sreq->status.MPI_ERROR; + +--- a/src/mpid/ch3/src/mpidi_pg.c ++++ b/src/mpid/ch3/src/mpidi_pg.c +@@ -30,10 +30,6 @@ static MPIDI_PG_t *pg_world = NULL; + + #define MPIDI_MAX_KVS_KEY_LEN 256 + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Init(int *argc_p, char ***argv_p, + MPIDI_PG_Compare_ids_fn_t compare_ids_fn, + MPIDI_PG_Destroy_fn_t destroy_fn) +@@ -70,10 +66,6 @@ int MPIDI_PG_Init(int *argc_p, char ***argv_p, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIDI_PG_Finalize - Finalize the process groups, including freeing all + process group structures +@@ -149,7 +141,7 @@ int MPIDI_PG_Finalize(void) + { + + /* --BEGIN ERROR HANDLING-- */ +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_INTERN, ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_INTERN, + "**dev|pg_finalize|list_not_empty", NULL); + /* --END ERROR HANDLING-- */ + } +@@ -170,10 +162,6 @@ int MPIDI_PG_Finalize(void) + + The new process group is returned in pg_ptr + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Create(int vct_sz, void * pg_id, MPIDI_PG_t ** pg_ptr) + { + MPIDI_PG_t * pg = NULL, *pgnext; +@@ -259,10 +247,6 @@ int MPIDI_PG_Create(int vct_sz, void * pg_id, MPIDI_PG_t ** pg_ptr) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Destroy(MPIDI_PG_t * pg) + { + MPIDI_PG_t * pg_prev; +@@ -353,10 +337,6 @@ int MPIDI_PG_Destroy(MPIDI_PG_t * pg) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Find +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Find(void * id, MPIDI_PG_t ** pg_ptr) + { + MPIDI_PG_t * pg; +@@ -385,20 +365,12 @@ int MPIDI_PG_Find(void * id, MPIDI_PG_t ** pg_ptr) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Id_compare +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Id_compare(void * id1, void *id2) + { + return MPIDI_PG_Compare_ids_fn(id1, id2); + } + + /* iter always points at the next element */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Get_next +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Get_next(MPIDI_PG_iterator *iter, MPIDI_PG_t ** pg_ptr) + { + *pg_ptr = (*iter); +@@ -409,19 +381,11 @@ int MPIDI_PG_Get_next(MPIDI_PG_iterator *iter, MPIDI_PG_t ** pg_ptr) + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Has_next +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Has_next(MPIDI_PG_iterator *iter) + { + return (*iter != NULL); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Get_iterator +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Get_iterator(MPIDI_PG_iterator *iter) + { + *iter = MPIDI_PG_list; +@@ -437,10 +401,6 @@ int MPIDI_PG_Get_iterator(MPIDI_PG_iterator *iter) + hence in spawn) in ch3u_port.c */ + /* Note: Allocated memory that is returned in str_ptr. The user of + this routine must free that data */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_To_string +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_To_string(MPIDI_PG_t *pg_ptr, char **str_ptr, int *lenStr) + { + int mpi_errno = MPI_SUCCESS; +@@ -472,10 +432,6 @@ fn_fail: + true. In addition, the connection information is set up using the + information in the input string. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Create_from_string +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_Create_from_string(const char * str, MPIDI_PG_t ** pg_pptr, + int *flag) + { +@@ -582,10 +538,6 @@ void MPIDI_PG_IdToNum( MPIDI_PG_t *pg, int *id ) + This is a collective call (for scalability) over all of the processes in + the same MPI_COMM_WORLD. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_SetConnInfo +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_SetConnInfo( int rank, const char *connString ) + { + #ifdef USE_PMI2_API +@@ -672,10 +624,6 @@ int MPIDI_PG_SetConnInfo( int rank, const char *connString ) + /* The "KVS" versions are for the process group to which the calling + process belongs. These use the PMI_KVS routines to access the + process information */ +-#undef FUNCNAME +-#define FUNCNAME getConnInfoKVS +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int getConnInfoKVS( int rank, char *buf, int bufsize, MPIDI_PG_t *pg ) + { + #ifdef USE_PMI2_API +@@ -803,7 +751,7 @@ static int connToStringKVS( char **buf_p, int *slen, MPIDI_PG_t *pg ) + fn_exit: + return mpi_errno; + fn_fail: +- if (string) MPL_free(string); ++ MPL_free(string); + goto fn_exit; + } + static int connFromStringKVS( const char *buf ATTRIBUTE((unused)), +@@ -814,17 +762,11 @@ static int connFromStringKVS( const char *buf ATTRIBUTE((unused)), + } + static int connFreeKVS( MPIDI_PG_t *pg ) + { +- if (pg->connData) { +- MPL_free( pg->connData ); +- } ++ MPL_free( pg->connData ); + return MPI_SUCCESS; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_InitConnKVS +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_InitConnKVS( MPIDI_PG_t *pg ) + { + #ifdef USE_PMI2_API +@@ -868,7 +810,7 @@ int MPIDI_PG_InitConnKVS( MPIDI_PG_t *pg ) + fn_exit: + return mpi_errno; + fn_fail: +- if (pg->connData) { MPL_free(pg->connData); } ++ MPL_free(pg->connData); + goto fn_exit; + } + +@@ -910,10 +852,6 @@ static int getConnInfo( int rank, char *buf, int bufsize, MPIDI_PG_t *pg ) + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME connToString +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int connToString( char **buf_p, int *slen, MPIDI_PG_t *pg ) + { + int mpi_errno = MPI_SUCCESS; +@@ -1093,10 +1031,6 @@ int MPIDI_PG_InitConnString( MPIDI_PG_t *pg ) + } + + /* Temp to get connection value for rank r */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_GetConnString +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_PG_GetConnString( MPIDI_PG_t *pg, int rank, char *val, int vallen ) + { + int mpi_errno = MPI_SUCCESS; +@@ -1112,10 +1046,6 @@ int MPIDI_PG_GetConnString( MPIDI_PG_t *pg, int rank, char *val, int vallen ) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Dup_vcr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIDI_PG_Dup_vcr - Duplicate a virtual connection from a process group + +@@ -1156,10 +1086,6 @@ int MPIDI_PG_Dup_vcr( MPIDI_PG_t *pg, int rank, MPIDI_VC_t **vc_p ) + + /* FIXME: This routine should invoke a close method on the connection, + rather than have all of the code here */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_PG_Close_VCs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /*@ + MPIDI_PG_Close_VCs - Close all virtual connections on all process groups. + +--- a/src/mpid/ch3/src/mpidi_rma.c ++++ b/src/mpid/ch3/src/mpidi_rma.c +@@ -82,10 +82,6 @@ cvars: + MPIDI_RMA_Op_t *global_rma_op_pool_head = NULL, *global_rma_op_pool_start = NULL; + MPIDI_RMA_Target_t *global_rma_target_pool_head = NULL, *global_rma_target_pool_start = NULL; + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_RMA_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_RMA_init(void) + { + int mpi_errno = MPI_SUCCESS; +@@ -122,10 +118,6 @@ int MPIDI_RMA_init(void) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_RMA_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIDI_RMA_finalize(void) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RMA_FINALIZE); +@@ -139,10 +131,6 @@ void MPIDI_RMA_finalize(void) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Win_free(MPIR_Win ** win_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -206,8 +194,7 @@ int MPID_Win_free(MPIR_Win ** win_ptr) + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- if ((*win_ptr)->basic_info_table != NULL) +- MPL_free((*win_ptr)->basic_info_table); ++ MPL_free((*win_ptr)->basic_info_table); + MPL_free((*win_ptr)->op_pool_start); + MPL_free((*win_ptr)->target_pool_start); + MPL_free((*win_ptr)->slots); +--- a/src/mpid/ch3/subconfigure.m4 ++++ b/src/mpid/ch3/subconfigure.m4 +@@ -8,12 +8,6 @@ dnl _PREREQ handles the former role of mpichprereq, setup_device, etc + AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ + AM_CONDITIONAL([BUILD_CH3],[test "$device_name" = "ch3"]) + +-dnl this subconfigure.m4 handles the configure work for the ftb subdir too +-dnl this AM_CONDITIONAL only works because enable_ftb is set very early on by +-dnl autoconf's argument parsing code. The "action-if-given" from the +-dnl AC_ARG_ENABLE has not yet run +-AM_CONDITIONAL([BUILD_CH3_UTIL_FTB],[test "x$enable_ftb" = "xyes"]) +- + AM_COND_IF([BUILD_CH3],[ + + # Set a value for the maximum processor name. +@@ -68,20 +62,6 @@ AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ + AM_COND_IF([BUILD_CH3],[ + AC_MSG_NOTICE([RUNNING CONFIGURE FOR CH3 DEVICE]) + +-# ---------------------------------------------------------------------------- +-# include ftb functionality +-# ---------------------------------------------------------------------------- +-AC_ARG_ENABLE([ftb], +- [AS_HELP_STRING([[--enable-ftb]], +- [Enable FTB support (default is no)])], +- [AC_DEFINE([ENABLE_FTB], 1, [Define if FTB is enabled]) +- PAC_SET_HEADER_LIB_PATH([ftb]) +- PAC_PUSH_FLAG(LIBS) +- PAC_CHECK_HEADER_LIB_FATAL([ftb], [libftb.h], [ftb], [FTB_Connect]) +- PAC_APPEND_FLAG([-lftb],[WRAPPER_LIBS]) +- PAC_POP_FLAG(LIBS)] +-) +- + AC_ARG_WITH(ch3-rank-bits, [--with-ch3-rank-bits=16/32 Number of bits allocated to the rank field (16 or 32)], + [ rankbits=$withval ], + [ rankbits=16 ]) +--- a/src/mpid/ch3/util/Makefile.mk ++++ b/src/mpid/ch3/util/Makefile.mk +@@ -5,8 +5,7 @@ + ## See COPYRIGHT in top-level directory. + ## + +-# conditional includes/builds of "sock" and "ftb" controlled in the past by +-# @ch3subsystems@ and @ftb_dir@ respectively ++# conditional includes/build of "sock" controlled in the past by ++# @ch3subsystems@ + + include $(top_srcdir)/src/mpid/ch3/util/sock/Makefile.mk +-include $(top_srcdir)/src/mpid/ch3/util/ftb/Makefile.mk +deleted file mode 100644 +--- a/src/mpid/ch3/util/ftb/Makefile.mk ++++ /dev/null +@@ -1,15 +0,0 @@ +-## -*- Mode: Makefile; -*- +-## vim: set ft=automake : +-## +-## (C) 2011 by Argonne National Laboratory. +-## See COPYRIGHT in top-level directory. +-## +- +-errnames_txt_files += src/mpid/ch3/util/ftb/errnames.txt +- +-if BUILD_CH3_UTIL_FTB +- +-mpi_core_sources += \ +- src/mpid/ch3/util/ftb/ftb.c +- +-endif BUILD_CH3_UTIL_FTB +deleted file mode 100644 +--- a/src/mpid/ch3/util/ftb/errnames.txt ++++ /dev/null +@@ -1,6 +0,0 @@ +-# Error names for FTB +- +-**ftb_connect:FTB_Connect failed +-**ftb_declare_publishable_events:FTB_Declare_publishable_events failed +-**ftb_disconnect:FTB_Disconnect failed +-**ftb_publish:FTB_Publish failed +deleted file mode 100644 +--- a/src/mpid/ch3/util/ftb/ftb.c ++++ /dev/null +@@ -1,144 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include "mpidimpl.h" +-#include +-#ifndef USE_PMI2_API +-#include "pmi.h" +-#else +-#include "pmi2.h" +-#endif +- +-static FTB_client_handle_t client_handle; +- +-static FTB_event_info_t event_info[] = { +- { MPIDU_FTB_EV_OTHER, "error" }, +- { MPIDU_FTB_EV_RESOURCES, "error" }, +- { MPIDU_FTB_EV_UNREACHABLE, "error" }, +- { MPIDU_FTB_EV_COMMUNICATION, "error" }, +- { MPIDU_FTB_EV_ABORT, "fatal" } +-}; +- +-#ifdef DEBUG_MPIDU_FTB +-#define CHECK_FTB_ERROR(x) do { MPIR_Assertp(x); } while(0) +-#else +-#define CHECK_FTB_ERROR(x) (void)x +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Ftb_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDU_Ftb_init(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret; +- FTB_client_t ci; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDU_FTB_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDU_FTB_INIT); +- +- MPL_strncpy(ci.event_space, "ftb.mpi.mpich", sizeof(ci.event_space)); +- MPL_strncpy(ci.client_name, "mpich " MPICH_VERSION, sizeof(ci.client_name)); +- MPL_strncpy(ci.client_subscription_style, "FTB_SUBSCRIPTION_NONE", sizeof(ci.client_subscription_style)); +- ci.client_polling_queue_len = -1; +- +-#ifdef USE_PMI2_API +- ret = PMI2_Job_GetId(ci.client_jobid, sizeof(ci.client_jobid)); +- MPIR_ERR_CHKANDJUMP(ret, mpi_errno, MPI_ERR_OTHER, "**pmi_jobgetid"); +-#else +- ret = PMI_KVS_Get_my_name(ci.client_jobid, sizeof(ci.client_jobid)); +- MPIR_ERR_CHKANDJUMP(ret, mpi_errno, MPI_ERR_OTHER, "**pmi_get_id"); +-#endif +- +- ret = FTB_Connect(&ci, &client_handle); +- MPIR_ERR_CHKANDJUMP(ret, mpi_errno, MPI_ERR_OTHER, "**ftb_connect"); +- +- ret = FTB_Declare_publishable_events(client_handle, NULL, event_info, sizeof(event_info) / sizeof(event_info[0])); +- MPIR_ERR_CHKANDJUMP(ret, mpi_errno, MPI_ERR_OTHER, "**ftb_declare_publishable_events"); +- +-fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDU_FTB_INIT); +- return mpi_errno; +-fn_fail: +- goto fn_exit; +-} +- +-/* We don't return an error code for MPIDU_Ftb_publish, because if +- we're calling this, we're probably already reporting an error. +- Also, a broken error reporting mechanism should not cause an app +- fail. */ +- +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Ftb_publish +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPIDU_Ftb_publish(const char *event_name, const char *event_payload) +-{ +- FTB_event_properties_t event_prop; +- FTB_event_handle_t event_handle; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDU_FTB_PUBLISH); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDU_FTB_PUBLISH); +- +- event_prop.event_type = 1; +- MPL_strncpy(event_prop.event_payload, event_payload, sizeof(event_prop.event_payload)); +- +- CHECK_FTB_ERROR(FTB_Publish(client_handle, event_name, &event_prop, &event_handle)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDU_FTB_PUBLISH); +- return; +-} +- +-/* convenience function for publishing events associated with a particular vc */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Ftb_publish_vc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPIDU_Ftb_publish_vc(const char *event_name, struct MPIDI_VC *vc) +-{ +- char payload[FTB_MAX_PAYLOAD_DATA] = ""; +- +- if (vc && vc->pg) /* pg can be null for temp VCs (dynamic processes) */ +- MPL_snprintf(payload, sizeof(payload), "[id: {%s:{%d}}]", (char*)vc->pg->id, vc->pg_rank); +- MPIDU_Ftb_publish(event_name, payload); +- return; +-} +- +-/* convenience function for publishing events associated with this process */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Ftb_publish_me +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPIDU_Ftb_publish_me(const char *event_name) +-{ +- char payload[FTB_MAX_PAYLOAD_DATA] = ""; +- +- MPL_snprintf(payload, sizeof(payload), "[id: {%s:{%d}}]", (char *)MPIDI_Process.my_pg->id, MPIDI_Process.my_pg_rank); +- MPIDU_Ftb_publish(event_name, payload); +- return; +-} +- +- +-/* MPIDU_Ftb_finalize has no return code for the same reasons that +- MPIDU_Ftb_publish doesn't. */ +- +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Ftb_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-void MPIDU_Ftb_finalize(void) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDU_FTB_FINALIZE); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDU_FTB_FINALIZE); +- +- CHECK_FTB_ERROR(FTB_Disconnect(client_handle)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDU_FTB_FINALIZE); +- return; +-} +- +--- a/src/mpid/ch3/util/sock/ch3u_connect_sock.c ++++ b/src/mpid/ch3/util/sock/ch3u_connect_sock.c +@@ -90,10 +90,6 @@ static MPIDI_CH3I_Connection_t * MPIDI_CH3I_listener_conn = NULL; + /* Required for (socket version) upcall to Connect_to_root (see FIXME) */ + extern MPIDI_CH3I_Sock_set_t MPIDI_CH3I_sock_set; + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_CH3I_SetupListener +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_CH3I_SetupListener( MPIDI_CH3I_Sock_set_t sock_set ) + { + int mpi_errno = MPI_SUCCESS; +@@ -124,10 +120,6 @@ int MPIDU_CH3I_SetupListener( MPIDI_CH3I_Sock_set_t sock_set ) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_CH3I_ShutdownListener +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_CH3I_ShutdownListener( void ) + { + int mpi_errno; +@@ -155,10 +147,6 @@ int MPIDU_CH3I_ShutdownListener( void ) + Called by routines that create connections, used in this + file and in ch3_progress*.c in various channels. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Connection_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Connection_alloc(MPIDI_CH3I_Connection_t ** connp) + { + int mpi_errno = MPI_SUCCESS; +@@ -201,10 +189,6 @@ int MPIDI_CH3I_Connection_alloc(MPIDI_CH3I_Connection_t ** connp) + /* FIXME: Why does the name include "to_root"? */ + + /* FIXME: Describe the algorithm for the connection logic */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Connect_to_root_sock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Connect_to_root_sock(const char * port_name, + MPIDI_VC_t ** new_vc) + { +@@ -290,13 +274,13 @@ int MPIDI_CH3I_Connect_to_root_sock(const char * port_name, + if (MPIR_ERR_GET_CLASS(mpi_errno) == MPIDI_CH3I_SOCK_ERR_BAD_HOST) + { + mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**ch3|sock|badhost", ++ MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, "**ch3|sock|badhost", + "**ch3|sock|badhost %s %d %s", conn->pg_id, conn->vc->pg_rank, port_name); + } + else if (MPIR_ERR_GET_CLASS(mpi_errno) == MPIDI_CH3I_SOCK_ERR_CONN_FAILED) + { + mpi_errno = MPIR_Err_create_code( +- MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**ch3|sock|connrefused", ++ MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, "**ch3|sock|connrefused", + "**ch3|sock|connrefused %s %d %s", conn->pg_id, conn->vc->pg_rank, port_name); + } + else +@@ -328,10 +312,6 @@ int MPIDI_CH3I_Connect_to_root_sock(const char * port_name, + + /* The host_description should be of length MAX_HOST_DESCRIPTION_LEN */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_get_conninfo_from_bc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Sock_get_conninfo_from_bc( const char *bc, + char *host_description, int maxlen, + int *port, MPIDI_CH3I_Sock_ifaddr_t *ifaddr, +@@ -424,10 +404,6 @@ int MPIDI_CH3I_Sock_get_conninfo_from_bc( const char *bc, + * + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Get_business_card_sock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Get_business_card_sock(int myRank, + char **bc_val_p, int *val_max_sz_p) + { +@@ -435,7 +411,9 @@ int MPIDI_CH3U_Get_business_card_sock(int myRank, + int str_errno = MPL_STR_SUCCESS; + MPIDI_CH3I_Sock_ifaddr_t ifaddr; + char ifnamestr[MAX_HOST_DESCRIPTION_LEN]; ++#ifdef MPL_USE_DBG_LOGGING + char *bc_orig = *bc_val_p; ++#endif + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH3U_GET_BUSINESS_CARD_SOCK); + + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH3U_GET_BUSINESS_CARD_SOCK); +@@ -536,10 +514,6 @@ static void connection_destroy(MPIDI_CH3I_Connection_t * conn); + + /* This routine is called in response to an MPIDI_CH3I_SOCK_OP_ACCEPT event + in ch3_progress */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Sockconn_handle_accept_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Sockconn_handle_accept_event( void ) + { + int mpi_errno = MPI_SUCCESS; +@@ -577,10 +551,6 @@ int MPIDI_CH3_Sockconn_handle_accept_event( void ) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Sockconn_handle_connect_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Sockconn_handle_connect_event( MPIDI_CH3I_Connection_t *conn, + int event_error ) + { +@@ -643,10 +613,6 @@ int MPIDI_CH3_Sockconn_handle_connect_event( MPIDI_CH3I_Connection_t *conn, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Sockconn_handle_close_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Sockconn_handle_close_event( MPIDI_CH3I_Connection_t * conn ) + { + int mpi_errno = MPI_SUCCESS; +@@ -720,10 +686,6 @@ int MPIDI_CH3_Sockconn_handle_close_event( MPIDI_CH3I_Connection_t * conn ) + /* Cycle through the connection setup states */ + /* FIXME: separate out the accept and connect sides to make it easier + to follow the logic */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Sockconn_handle_conn_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Sockconn_handle_conn_event( MPIDI_CH3I_Connection_t * conn ) + { + int mpi_errno = MPI_SUCCESS; +@@ -760,7 +722,7 @@ int MPIDI_CH3_Sockconn_handle_conn_event( MPIDI_CH3I_Connection_t * conn ) + vc = (MPIDI_VC_t *) MPL_malloc(sizeof(MPIDI_VC_t), MPL_MEM_ADDRESS); + /* --BEGIN ERROR HANDLING-- */ + if (vc == NULL) { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, + "**nomem", NULL); + goto fn_fail; + } +@@ -857,7 +819,7 @@ int MPIDI_CH3_Sockconn_handle_conn_event( MPIDI_CH3I_Connection_t * conn ) + /* --BEGIN ERROR HANDLING-- */ + else { + MPL_DBG_STMT(MPIDI_CH3_DBG_CONNECT,VERBOSE,MPIDI_DBG_Print_packet(&conn->pkt)); +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_INTERN, ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_INTERN, + "**ch3|sock|badpacket", "**ch3|sock|badpacket %d", conn->pkt.type); + goto fn_fail; + } +@@ -872,10 +834,6 @@ int MPIDI_CH3_Sockconn_handle_conn_event( MPIDI_CH3I_Connection_t * conn ) + } + + /* FIXME: This should really be combined with handle_conn_event */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Sockconn_handle_connopen_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Sockconn_handle_connopen_event( MPIDI_CH3I_Connection_t * conn ) + { + int mpi_errno = MPI_SUCCESS; +@@ -1006,10 +964,6 @@ int MPIDI_CH3_Sockconn_handle_connopen_event( MPIDI_CH3I_Connection_t * conn ) + } + + /* FIXME: This routine is called when? What is valid in conn? */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3_Sockconn_handle_connwrite +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3_Sockconn_handle_connwrite( MPIDI_CH3I_Connection_t * conn ) + { + int mpi_errno = MPI_SUCCESS; +@@ -1081,10 +1035,6 @@ int MPIDI_CH3_Sockconn_handle_connwrite( MPIDI_CH3I_Connection_t * conn ) + + /* ----------------------------------------------------------------------- */ + /* FIXME: What does this do? */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_VC_post_sockconnect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_VC_post_sockconnect(MPIDI_VC_t * vc) + { + int mpi_errno = MPI_SUCCESS; +@@ -1151,10 +1101,6 @@ int MPIDI_CH3I_VC_post_sockconnect(MPIDI_VC_t * vc) + + vallen = sizeof(val) + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3I_Sock_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3I_Sock_connect( MPIDI_VC_t *vc, const char val[], int vallen ) + { + char host_description[MAX_HOST_DESCRIPTION_LEN]; +@@ -1231,7 +1177,7 @@ int MPIDI_CH3I_Sock_connect( MPIDI_VC_t *vc, const char val[], int vallen ) + { + MPL_DBG_VCCHSTATECHANGE(vc,VC_STATE_FAILED); + vcch->state = MPIDI_CH3I_VC_STATE_FAILED; +- mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**ch3|sock|postconnect", ++ mpi_errno = MPIR_Err_create_code(mpi_errno, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, "**ch3|sock|postconnect", + "**ch3|sock|postconnect %d %d %s", MPIR_Process.comm_world->rank, vc->pg_rank, val); + goto fn_fail; + } +@@ -1258,10 +1204,6 @@ int MPIDI_CH3I_Sock_connect( MPIDI_VC_t *vc, const char val[], int vallen ) + /* Guess: Setup a wait-to-read on the socket that was set after the accept + was handled */ + /* Wrong guess. */ +-#undef FUNCNAME +-#define FUNCNAME connection_post_recv_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int connection_post_recv_pkt(MPIDI_CH3I_Connection_t * conn) + { + int mpi_errno = MPI_SUCCESS; +@@ -1281,10 +1223,6 @@ static int connection_post_recv_pkt(MPIDI_CH3I_Connection_t * conn) + } + + +-#undef FUNCNAME +-#define FUNCNAME connection_post_send_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int connection_post_send_pkt(MPIDI_CH3I_Connection_t * conn) + { + int mpi_errno = MPI_SUCCESS; +@@ -1304,10 +1242,6 @@ static int connection_post_send_pkt(MPIDI_CH3I_Connection_t * conn) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME connection_post_send_pkt_and_pgid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int connection_post_send_pkt_and_pgid(MPIDI_CH3I_Connection_t * conn) + { + int mpi_errno; +@@ -1333,10 +1267,6 @@ static int connection_post_send_pkt_and_pgid(MPIDI_CH3I_Connection_t * conn) + } + + /* FIXME: This function also used in channels/sock/src/ch3_progress.c */ +-#undef FUNCNAME +-#define FUNCNAME connection_post_sendq_req +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int connection_post_sendq_req(MPIDI_CH3I_Connection_t * conn) + { + int mpi_errno = MPI_SUCCESS; +@@ -1369,10 +1299,6 @@ static int connection_post_sendq_req(MPIDI_CH3I_Connection_t * conn) + It is named destroy instead of free because routines with name "free" + should have MPI semantics - free means to + decrement reference count and free if reference count is zero */ +-#undef FUNCNAME +-#define FUNCNAME connection_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void connection_destroy(MPIDI_CH3I_Connection_t * conn) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CONNECTION_DESTROY); +--- a/src/mpid/ch3/util/sock/ch3u_getinterfaces.c ++++ b/src/mpid/ch3/util/sock/ch3u_getinterfaces.c +@@ -59,10 +59,6 @@ static int MPIDI_CH3U_GetIPInterface( MPIDI_CH3I_Sock_ifaddr_t *, int * ); + * ipv4 (AF_INET) is used so far. + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_CH3U_GetSockInterfaceAddr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_CH3U_GetSockInterfaceAddr( int myRank, char *ifname, int maxIfname, + MPIDI_CH3I_Sock_ifaddr_t *ifaddr ) + { +--- a/src/mpid/ch3/util/sock/ch3u_init_sock.c ++++ b/src/mpid/ch3/util/sock/ch3u_init_sock.c +@@ -29,10 +29,6 @@ + * + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Init_sock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Init_sock(int has_parent, MPIDI_PG_t *pg_p, int pg_rank, + char **bc_val_p, int *val_max_sz_p) + { +--- a/src/mpid/ch3/util/sock/ch3usock.h ++++ b/src/mpid/ch3/util/sock/ch3usock.h +@@ -60,12 +60,6 @@ void MPIDI_CH3I_Connection_free(MPIDI_CH3I_Connection_t *); + /* Routines to get the socket address */ + int MPIDU_CH3U_GetSockInterfaceAddr( int, char *, int, MPIDI_CH3I_Sock_ifaddr_t * ); + +-/* Return a string for the connection state */ +-#ifdef MPL_USE_DBG_LOGGING +-const char * MPIDI_Conn_GetStateString(int); +-const char * MPIDI_CH3_VC_GetStateString( struct MPIDI_VC * ); +-#endif +- + int MPIDI_CH3I_Sock_get_conninfo_from_bc( const char *bc, + char *host_description, int maxlen, + int *port, MPIDI_CH3I_Sock_ifaddr_t *ifaddr, +--- a/src/mpid/ch3/util/unordered/unordered.c ++++ b/src/mpid/ch3/util/unordered/unordered.c +@@ -21,10 +21,6 @@ int MPIDI_CH3U_Handle_unordered_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt) + #define MPIDI_CH3U_Pkt_send_container_alloc() (MPL_malloc(sizeof(MPIDI_CH3_Pkt_send_container_t), MPL_MEM_BUFFER)) + #define MPIDI_CH3U_Pkt_send_container_free(pc_) MPL_free(pc_) + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH3U_Handle_unordered_recv_pkt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_CH3U_Handle_unordered_recv_pkt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t * pkt, + MPIR_Request ** rreqp) + { +@@ -76,7 +72,7 @@ int MPIDI_CH3U_Handle_unordered_recv_pkt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t * pkt, + /* --BEGIN ERROR HANDLING-- */ + if (mpi_errno != MPI_SUCCESS) + { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, + "**ch3|pktordered", 0); + goto fn_exit; + } +@@ -97,7 +93,7 @@ int MPIDI_CH3U_Handle_unordered_recv_pkt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t * pkt, + /* --BEGIN ERROR HANDLING-- */ + if (pc_new == NULL) + { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, + "**ch3|nopktcontainermem", 0); + goto fn_exit; + } +@@ -142,7 +138,7 @@ int MPIDI_CH3U_Handle_unordered_recv_pkt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t * pkt, + /* --BEGIN ERROR HANDLING-- */ + /* FIXME: processing send cancel requests requires that we be + aware of pkts in the reorder queue */ +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, MPI_ERR_OTHER, + "**ch3|ooocancelreq", 0); + goto fn_exit; + break; +--- a/src/mpid/ch4/.gitignore ++++ b/src/mpid/ch4/.gitignore +@@ -2,3 +2,8 @@ + src/mpid_ch4_net_array.c + src/ch4_coll_globals_default.c + include/coll_algo_params.h ++include/netmodpre.h ++ ++# shm/posix ++shm/posix/eager/include/posix_eager_pre.h ++shm/posix/posix_eager_array.c +--- a/src/mpid/ch4/Makefile.mk ++++ b/src/mpid/ch4/Makefile.mk +@@ -16,6 +16,8 @@ include $(top_srcdir)/src/mpid/ch4/include/Makefile.mk + include $(top_srcdir)/src/mpid/ch4/src/Makefile.mk + include $(top_srcdir)/src/mpid/ch4/generic/Makefile.mk + include $(top_srcdir)/src/mpid/ch4/netmod/Makefile.mk ++if BUILD_CH4_SHM + include $(top_srcdir)/src/mpid/ch4/shm/Makefile.mk ++endif BUILD_CH4_SHM + + endif BUILD_CH4 +--- a/src/mpid/ch4/errnames.txt ++++ b/src/mpid/ch4/errnames.txt +@@ -35,6 +35,8 @@ + **ch4|pmi_finalize %d:PMI_Finalize failed, error %d + **ch4|invalid_shm:Invalid shm specified + **ch4|invalid_shm %s:Invalid shm specified (%s) ++**ch4|invalid_shm_posix_eager:Invalid shm posix eager module specified ++**ch4|invalid_shm_posix_eager %s:Invalid shm posix eager module specified (%s) + **ch4|invalid_locality:Invalid locality usage + **ch4|invalid_locality %s:Invalid locality usage (%s) + **ch4|invalid_mt_model:Invalid multi-threading model +--- a/src/mpid/ch4/generic/mpidig.h ++++ b/src/mpid/ch4/generic/mpidig.h +@@ -22,7 +22,8 @@ typedef int (*MPIDIG_am_origin_cb) (MPIR_Request * req); + /* for short cases, output arguments are NULL */ + typedef int (*MPIDIG_am_target_msg_cb) + (int handler_id, void *am_hdr, void **data, /* data should be iovs if *is_contig is false */ +- size_t * data_sz, int *is_contig, MPIDIG_am_target_cmpl_cb * target_cmpl_cb, /* completion handler */ ++ size_t * data_sz, int is_local, /* SHM or NM directly specifies locality */ ++ int *is_contig, MPIDIG_am_target_cmpl_cb * target_cmpl_cb, /* completion handler */ + MPIR_Request ** req); /* if allocated, need pointer to completion function */ + + typedef struct MPIDIG_global_t { +@@ -33,7 +34,7 @@ extern MPIDIG_global_t MPIDIG_global; + + int MPIDIG_am_reg_cb(int handler_id, + MPIDIG_am_origin_cb origin_cb, MPIDIG_am_target_msg_cb target_msg_cb); +-int MPIDIG_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self, int n_vnis); ++int MPIDIG_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self, int n_vcis); + void MPIDIG_finalize(void); + + int MPIDIG_comm_abort(MPIR_Comm * comm, int exit_code); +--- a/src/mpid/ch4/generic/mpidig_globals.c ++++ b/src/mpid/ch4/generic/mpidig_globals.c +@@ -17,17 +17,13 @@ + MPIDIG_global_t MPIDIG_global = { {0} + }; + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_comm_abort +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDIG_comm_abort(MPIR_Comm * comm, int exit_code) + { + int mpi_errno = MPI_SUCCESS; + int dest; + int size = 0; + MPIR_Request *sreq = NULL; +- MPIDI_CH4U_hdr_t am_hdr; ++ MPIDIG_hdr_t am_hdr; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_COMM_ABORT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_COMM_ABORT); +@@ -47,10 +43,10 @@ int MPIDIG_comm_abort(MPIR_Comm * comm, int exit_code) + continue; + + mpi_errno = MPI_SUCCESS; +- sreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__SEND, 2); ++ sreq = MPIDIG_request_create(MPIR_REQUEST_KIND__SEND, 2); + MPIR_ERR_CHKANDSTMT((sreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + +- mpi_errno = MPIDI_NM_am_isend(dest, comm, MPIDI_CH4U_COMM_ABORT, &am_hdr, ++ mpi_errno = MPIDI_NM_am_isend(dest, comm, MPIDIG_COMM_ABORT, &am_hdr, + sizeof(am_hdr), NULL, 0, MPI_INT, sreq); + if (mpi_errno) + continue; +--- a/src/mpid/ch4/generic/mpidig_init.c ++++ b/src/mpid/ch4/generic/mpidig_init.c +@@ -13,10 +13,6 @@ + #include "mpidig.h" + #include "mpidch4r.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_am_reg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDIG_am_reg_cb(int handler_id, + MPIDIG_am_origin_cb origin_cb, MPIDIG_am_target_msg_cb target_msg_cb) + { +@@ -31,220 +27,213 @@ int MPIDIG_am_reg_cb(int handler_id, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDIG_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self, int n_vnis) ++int MPIDIG_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self, int n_vcis) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_INIT); + +- MPIDI_CH4_Global.is_ch4u_initialized = 0; ++ MPIDI_global.is_ch4u_initialized = 0; + +- MPIDI_CH4_Global.comm_req_lists = (MPIDI_CH4U_comm_req_list_t *) ++ MPIDI_global.comm_req_lists = (MPIDIG_comm_req_list_t *) + MPL_calloc(MPIR_MAX_CONTEXT_MASK * MPIR_CONTEXT_INT_BITS, +- sizeof(MPIDI_CH4U_comm_req_list_t), MPL_MEM_OTHER); ++ sizeof(MPIDIG_comm_req_list_t), MPL_MEM_OTHER); + #ifndef MPIDI_CH4U_USE_PER_COMM_QUEUE +- MPIDI_CH4_Global.posted_list = NULL; +- MPIDI_CH4_Global.unexp_list = NULL; ++ MPIDI_global.posted_list = NULL; ++ MPIDI_global.unexp_list = NULL; + #endif + +- MPIDI_CH4_Global.cmpl_list = NULL; +- OPA_store_int(&MPIDI_CH4_Global.exp_seq_no, 0); +- OPA_store_int(&MPIDI_CH4_Global.nxt_seq_no, 0); ++ MPIDI_global.cmpl_list = NULL; ++ OPA_store_int(&MPIDI_global.exp_seq_no, 0); ++ OPA_store_int(&MPIDI_global.nxt_seq_no, 0); + +- MPIDI_CH4_Global.buf_pool = MPIDI_CH4U_create_buf_pool(MPIDI_CH4I_BUF_POOL_NUM, +- MPIDI_CH4I_BUF_POOL_SZ); +- MPIR_Assert(MPIDI_CH4_Global.buf_pool); ++ MPIDI_global.buf_pool = MPIDIU_create_buf_pool(MPIDIU_BUF_POOL_NUM, MPIDIU_BUF_POOL_SZ); ++ MPIR_Assert(MPIDI_global.buf_pool); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_SEND, &MPIDI_send_origin_cb, &MPIDI_send_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_SEND, &MPIDIG_send_origin_cb, &MPIDIG_send_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_SEND_LONG_REQ, NULL /* Injection only */ , +- &MPIDI_send_long_req_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_SEND_LONG_REQ, NULL /* Injection only */ , ++ &MPIDIG_send_long_req_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_SEND_LONG_ACK, NULL /* Injection only */ , +- &MPIDI_send_long_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_SEND_LONG_ACK, NULL /* Injection only */ , ++ &MPIDIG_send_long_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_SEND_LONG_LMT, +- &MPIDI_send_long_lmt_origin_cb, +- &MPIDI_send_long_lmt_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_SEND_LONG_LMT, ++ &MPIDIG_send_long_lmt_origin_cb, ++ &MPIDIG_send_long_lmt_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_SSEND_REQ, +- &MPIDI_send_origin_cb, &MPIDI_ssend_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_SSEND_REQ, ++ &MPIDIG_send_origin_cb, &MPIDIG_ssend_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_SSEND_ACK, +- &MPIDI_ssend_ack_origin_cb, &MPIDI_ssend_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_SSEND_ACK, ++ &MPIDIG_ssend_ack_origin_cb, &MPIDIG_ssend_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = +- MPIDIG_am_reg_cb(MPIDI_CH4U_PUT_REQ, &MPIDI_put_origin_cb, &MPIDI_put_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_PUT_REQ, &MPIDIG_put_origin_cb, &MPIDIG_put_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_PUT_ACK, NULL, &MPIDI_put_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_PUT_ACK, NULL, &MPIDIG_put_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = +- MPIDIG_am_reg_cb(MPIDI_CH4U_GET_REQ, &MPIDI_get_origin_cb, &MPIDI_get_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_GET_REQ, &MPIDIG_get_origin_cb, &MPIDIG_get_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_GET_ACK, +- &MPIDI_get_ack_origin_cb, &MPIDI_get_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_GET_ACK, ++ &MPIDIG_get_ack_origin_cb, &MPIDIG_get_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_CSWAP_REQ, +- &MPIDI_cswap_origin_cb, &MPIDI_cswap_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_CSWAP_REQ, ++ &MPIDIG_cswap_origin_cb, &MPIDIG_cswap_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_CSWAP_ACK, +- &MPIDI_cswap_ack_origin_cb, &MPIDI_cswap_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_CSWAP_ACK, ++ &MPIDIG_cswap_ack_origin_cb, &MPIDIG_cswap_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = +- MPIDIG_am_reg_cb(MPIDI_CH4U_ACC_REQ, &MPIDI_acc_origin_cb, &MPIDI_acc_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_ACC_REQ, &MPIDIG_acc_origin_cb, &MPIDIG_acc_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_GET_ACC_REQ, +- &MPIDI_get_acc_origin_cb, &MPIDI_get_acc_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_GET_ACC_REQ, ++ &MPIDIG_get_acc_origin_cb, &MPIDIG_get_acc_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_ACC_ACK, NULL, &MPIDI_acc_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_ACC_ACK, NULL, &MPIDIG_acc_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_GET_ACC_ACK, +- &MPIDI_get_acc_ack_origin_cb, &MPIDI_get_acc_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_GET_ACC_ACK, ++ &MPIDIG_get_acc_ack_origin_cb, &MPIDIG_get_acc_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_COMPLETE, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_COMPLETE, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_POST, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_POST, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_LOCK, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_LOCK, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_LOCK_ACK, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_LOCK_ACK, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_UNLOCK, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_UNLOCK, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_UNLOCK_ACK, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_UNLOCK_ACK, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_LOCKALL, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_LOCKALL, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_LOCKALL_ACK, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_LOCKALL_ACK, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_UNLOCKALL, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_UNLOCKALL, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_WIN_UNLOCKALL_ACK, NULL, &MPIDI_win_ctrl_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_WIN_UNLOCKALL_ACK, NULL, &MPIDIG_win_ctrl_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_PUT_IOV_REQ, +- &MPIDI_put_iov_origin_cb, &MPIDI_put_iov_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_PUT_IOV_REQ, ++ &MPIDIG_put_iov_origin_cb, &MPIDIG_put_iov_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_PUT_IOV_ACK, NULL, &MPIDI_put_iov_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_PUT_IOV_ACK, NULL, &MPIDIG_put_iov_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_PUT_DAT_REQ, +- &MPIDI_put_data_origin_cb, &MPIDI_put_data_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_PUT_DAT_REQ, ++ &MPIDIG_put_data_origin_cb, &MPIDIG_put_data_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_ACC_IOV_REQ, +- &MPIDI_acc_iov_origin_cb, &MPIDI_acc_iov_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_ACC_IOV_REQ, ++ &MPIDIG_acc_iov_origin_cb, &MPIDIG_acc_iov_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_GET_ACC_IOV_REQ, +- &MPIDI_get_acc_iov_origin_cb, &MPIDI_get_acc_iov_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_GET_ACC_IOV_REQ, ++ &MPIDIG_get_acc_iov_origin_cb, &MPIDIG_get_acc_iov_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_ACC_IOV_ACK, NULL, &MPIDI_acc_iov_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_ACC_IOV_ACK, NULL, &MPIDIG_acc_iov_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_GET_ACC_IOV_ACK, +- NULL, &MPIDI_get_acc_iov_ack_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_GET_ACC_IOV_ACK, ++ NULL, &MPIDIG_get_acc_iov_ack_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_ACC_DAT_REQ, +- &MPIDI_acc_data_origin_cb, &MPIDI_acc_data_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_ACC_DAT_REQ, ++ &MPIDIG_acc_data_origin_cb, &MPIDIG_acc_data_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_GET_ACC_DAT_REQ, +- &MPIDI_get_acc_data_origin_cb, &MPIDI_get_acc_data_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_GET_ACC_DAT_REQ, ++ &MPIDIG_get_acc_data_origin_cb, ++ &MPIDIG_get_acc_data_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDIG_am_reg_cb(MPIDI_CH4U_COMM_ABORT, +- &MPIDI_comm_abort_origin_cb, &MPIDI_comm_abort_target_msg_cb); ++ mpi_errno = MPIDIG_am_reg_cb(MPIDIG_COMM_ABORT, ++ &MPIDIG_comm_abort_origin_cb, &MPIDIG_comm_abort_target_msg_cb); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + + +- mpi_errno = MPIDI_CH4U_init_comm(comm_world); ++ mpi_errno = MPIDIG_init_comm(comm_world); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDI_CH4U_init_comm(comm_self); ++ mpi_errno = MPIDIG_init_comm(comm_self); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- MPIDI_CH4U_map_create((void **) &(MPIDI_CH4_Global.win_map), MPL_MEM_RMA); ++ MPIDIU_map_create((void **) &(MPIDI_global.win_map), MPL_MEM_RMA); + +- mpi_errno = MPIDI_CH4R_RMA_Init_sync_pvars(); ++ mpi_errno = MPIDIG_RMA_Init_sync_pvars(); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- mpi_errno = MPIDI_CH4R_RMA_Init_targetcb_pvars(); ++ mpi_errno = MPIDIG_RMA_Init_targetcb_pvars(); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- MPIDI_CH4_Global.is_ch4u_initialized = 1; ++ MPIDI_global.is_ch4u_initialized = 1; + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_INIT); + + fn_exit: +@@ -253,19 +242,15 @@ int MPIDIG_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self, int n_vnis) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void MPIDIG_finalize(void) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_FINALIZE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_FINALIZE); + +- MPIDI_CH4_Global.is_ch4u_initialized = 0; +- MPIDI_CH4U_map_destroy(MPIDI_CH4_Global.win_map); +- MPIDI_CH4R_destroy_buf_pool(MPIDI_CH4_Global.buf_pool); +- MPL_free(MPIDI_CH4_Global.comm_req_lists); ++ MPIDI_global.is_ch4u_initialized = 0; ++ MPIDIU_map_destroy(MPIDI_global.win_map); ++ MPIDIU_destroy_buf_pool(MPIDI_global.buf_pool); ++ MPL_free(MPIDI_global.comm_req_lists); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_FINALIZE); + } +--- a/src/mpid/ch4/generic/mpidig_recv.h ++++ b/src/mpid/ch4/generic/mpidig_recv.h +@@ -16,45 +16,41 @@ + #include "ch4r_proc.h" + #include "ch4r_recv.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_prepare_recv_req +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_prepare_recv_req(void *buf, MPI_Aint count, MPI_Datatype datatype, +- MPIR_Request * rreq) ++static inline int MPIDIG_prepare_recv_req(int rank, int tag, MPIR_Context_id_t context_id, ++ void *buf, MPI_Aint count, MPI_Datatype datatype, ++ MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PREPARE_RECV_REQ); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PREPARE_RECV_REQ); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PREPARE_RECV_REQ); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PREPARE_RECV_REQ); + +- MPIDI_CH4U_REQUEST(rreq, datatype) = datatype; +- MPIDI_CH4U_REQUEST(rreq, buffer) = (char *) buf; +- MPIDI_CH4U_REQUEST(rreq, count) = count; ++ MPIDIG_REQUEST(rreq, rank) = rank; ++ MPIDIG_REQUEST(rreq, tag) = tag; ++ MPIDIG_REQUEST(rreq, context_id) = context_id; ++ MPIDIG_REQUEST(rreq, datatype) = datatype; ++ MPIDIG_REQUEST(rreq, buffer) = (char *) buf; ++ MPIDIG_REQUEST(rreq, count) = count; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PREPARE_RECV_REQ); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PREPARE_RECV_REQ); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_handle_unexpected +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_handle_unexpected(void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- MPIR_Comm * comm, int context_offset, MPIR_Request * rreq) ++static inline int MPIDIG_handle_unexpected(void *buf, MPI_Aint count, MPI_Datatype datatype, ++ MPIR_Comm * comm, int context_offset, ++ MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; + int dt_contig; +- MPI_Aint dt_true_lb, last; ++ MPI_Aint dt_true_lb; + MPIR_Datatype *dt_ptr; + size_t in_data_sz, dt_sz, nbytes; +- MPIR_Segment *segment_ptr; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_HANDLE_UNEXPECTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_HANDLE_UNEXPECTED); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_HANDLE_UNEXPECTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_HANDLE_UNEXPECTED); + +- in_data_sz = MPIDI_CH4U_REQUEST(rreq, count); ++ /* Calculate the size of the data from the active message information and update the request ++ * object. */ ++ in_data_sz = MPIDIG_REQUEST(rreq, count); + MPIR_Datatype_get_size_macro(datatype, dt_sz); + + if (in_data_sz > dt_sz * count) { +@@ -65,95 +61,95 @@ static inline int MPIDI_handle_unexpected(void *buf, + nbytes = in_data_sz; + } + MPIR_STATUS_SET_COUNT(rreq->status, nbytes); +- MPIDI_CH4U_REQUEST(rreq, datatype) = datatype; +- MPIDI_CH4U_REQUEST(rreq, count) = nbytes; ++ MPIDIG_REQUEST(rreq, datatype) = datatype; ++ MPIDIG_REQUEST(rreq, count) = nbytes; + + MPIDI_Datatype_get_info(count, datatype, dt_contig, dt_sz, dt_ptr, dt_true_lb); + ++ /* Copy the data from the message. */ ++ + if (!dt_contig) { +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "Recv MPIR_Segment_alloc"); +- MPIR_Segment_init(buf, count, datatype, segment_ptr); +- +- last = nbytes; +- MPIR_Segment_unpack(segment_ptr, 0, &last, MPIDI_CH4U_REQUEST(rreq, buffer)); +- MPIR_Segment_free(segment_ptr); +- if (last != (MPI_Aint) (nbytes)) { ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack(MPIDIG_REQUEST(rreq, buffer), nbytes, buf, count, datatype, 0, ++ &actual_unpack_bytes); ++ if (actual_unpack_bytes != (MPI_Aint) (nbytes)) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + __FUNCTION__, __LINE__, + MPI_ERR_TYPE, "**dtypemismatch", 0); + rreq->status.MPI_ERROR = mpi_errno; + } + } else { +- MPIR_Memcpy((char *) buf + dt_true_lb, MPIDI_CH4U_REQUEST(rreq, buffer), nbytes); ++ /* Note: buf could be NULL. In one case it is a zero size message such as ++ * the one used in MPI_Barrier. In another case, the datatype can specify ++ * the absolute address of the buffer (e.g. buf == MPI_BOTTOM). ++ */ ++ if (nbytes > 0) { ++ char *addr = (char *) buf + dt_true_lb; ++ assert(addr); /* to supress gcc-8 warning: -Wnonnull */ ++ MPIR_Memcpy(addr, MPIDIG_REQUEST(rreq, buffer), nbytes); ++ } + } + +- MPIDI_CH4U_REQUEST(rreq, req->status) &= ~MPIDI_CH4U_REQ_UNEXPECTED; +- MPL_free(MPIDI_CH4U_REQUEST(rreq, buffer)); ++ MPIDIG_REQUEST(rreq, req->status) &= ~MPIDIG_REQ_UNEXPECTED; ++ MPL_free(MPIDIG_REQUEST(rreq, buffer)); + +- rreq->status.MPI_SOURCE = MPIDI_CH4U_REQUEST(rreq, rank); +- rreq->status.MPI_TAG = MPIDI_CH4U_REQUEST(rreq, tag); ++ rreq->status.MPI_SOURCE = MPIDIG_REQUEST(rreq, rank); ++ rreq->status.MPI_TAG = MPIDIG_REQUEST(rreq, tag); + +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_PEER_SSEND) { +- mpi_errno = MPIDI_reply_ssend(rreq); ++ /* If this is a synchronous send, send back the reply indicating that the message has been ++ * matched. */ ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_PEER_SSEND) { ++ mpi_errno = MPIDIG_reply_ssend(rreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } ++ ++ /* Decrement the refrence counter for the request object (for the reference held by the sending ++ * process). */ + MPID_Request_complete(rreq); + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_HANDLE_UNEXPECTED); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_HANDLE_UNEXPECTED); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_do_irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_do_irecv(void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- MPIR_Request ** request, int alloc_req, uint64_t flags) ++static inline int MPIDIG_do_irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int rank, ++ int tag, MPIR_Comm * comm, int context_offset, ++ MPIR_Request ** request, int alloc_req, uint64_t flags) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *rreq = NULL, *unexp_req = NULL; + MPIR_Context_id_t context_id = comm->recvcontext_id + context_offset; + MPIR_Comm *root_comm; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DO_IRECV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DO_IRECV); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DO_IRECV); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DO_IRECV); + +- root_comm = MPIDI_CH4U_context_id_to_comm(comm->recvcontext_id); +- unexp_req = MPIDI_CH4U_dequeue_unexp(rank, tag, context_id, +- &MPIDI_CH4U_COMM(root_comm, unexp_list)); ++ root_comm = MPIDIG_context_id_to_comm(context_id); ++ unexp_req = MPIDIG_dequeue_unexp(rank, tag, context_id, &MPIDIG_COMM(root_comm, unexp_list)); + + if (unexp_req) { + if (*request != NULL) { +- MPIDI_CH4I_am_request_copy(*request, unexp_req); ++ MPIDIG_request_copy(*request, unexp_req); + MPIR_Request_add_ref(*request); + MPIR_Object_set_ref(unexp_req, 0); + MPIR_Handle_obj_free(&MPIR_Request_mem, unexp_req); + unexp_req = *request; + } + MPIR_Comm_release(root_comm); /* -1 for removing from unexp_list */ +- if (MPIDI_CH4U_REQUEST(unexp_req, req->status) & MPIDI_CH4U_REQ_BUSY) { +- MPIDI_CH4U_REQUEST(unexp_req, req->status) |= MPIDI_CH4U_REQ_MATCHED; +- } else if (MPIDI_CH4U_REQUEST(unexp_req, req->status) & MPIDI_CH4U_REQ_LONG_RTS) { +- /* Matching receive is now posted, tell the netmod */ ++ if (MPIDIG_REQUEST(unexp_req, req->status) & MPIDIG_REQ_BUSY) { ++ MPIDIG_REQUEST(unexp_req, req->status) |= MPIDIG_REQ_MATCHED; ++ } else if (MPIDIG_REQUEST(unexp_req, req->status) & MPIDIG_REQ_LONG_RTS) { ++ /* Matching receive is now posted, tell the netmod/shmmod */ + MPIR_Datatype_add_ref_if_not_builtin(datatype); +- MPIDI_CH4U_REQUEST(unexp_req, datatype) = datatype; +- MPIDI_CH4U_REQUEST(unexp_req, buffer) = (char *) buf; +- MPIDI_CH4U_REQUEST(unexp_req, count) = count; ++ MPIDIG_REQUEST(unexp_req, datatype) = datatype; ++ MPIDIG_REQUEST(unexp_req, buffer) = (char *) buf; ++ MPIDIG_REQUEST(unexp_req, count) = count; + *request = unexp_req; + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_am_recv(unexp_req); + #else +- if (MPIDI_CH4I_REQUEST(unexp_req, is_local)) ++ if (MPIDI_REQUEST(unexp_req, is_local)) + mpi_errno = MPIDI_SHM_am_recv(unexp_req); + else + mpi_errno = MPIDI_NM_am_recv(unexp_req); +@@ -164,7 +160,7 @@ static inline int MPIDI_do_irecv(void *buf, + } else { + *request = unexp_req; + mpi_errno = +- MPIDI_handle_unexpected(buf, count, datatype, root_comm, context_id, unexp_req); ++ MPIDIG_handle_unexpected(buf, count, datatype, root_comm, context_id, unexp_req); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + goto fn_exit; +@@ -173,9 +169,9 @@ static inline int MPIDI_do_irecv(void *buf, + + if (*request != NULL) { + rreq = *request; +- MPIDI_CH4I_am_request_init(rreq, MPIR_REQUEST_KIND__RECV, 2); ++ MPIDIG_request_init(rreq, MPIR_REQUEST_KIND__RECV); + } else if (alloc_req) { +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RECV, 2); ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RECV, 2); + MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + } else { + rreq = *request; +@@ -193,12 +189,7 @@ static inline int MPIDI_do_irecv(void *buf, + } + + MPIR_Datatype_add_ref_if_not_builtin(datatype); +- MPIDI_CH4U_REQUEST(rreq, rank) = rank; +- MPIDI_CH4U_REQUEST(rreq, tag) = tag; +- MPIDI_CH4U_REQUEST(rreq, context_id) = context_id; +- MPIDI_CH4U_REQUEST(rreq, datatype) = datatype; +- +- mpi_errno = MPIDI_prepare_recv_req(buf, count, datatype, rreq); ++ mpi_errno = MPIDIG_prepare_recv_req(rank, tag, context_id, buf, count, datatype, rreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -208,22 +199,19 @@ static inline int MPIDI_do_irecv(void *buf, + /* Increment refcnt for comm before posting rreq to posted_list, + * to make sure comm is alive while holding an entry in the posted_list */ + MPIR_Comm_add_ref(root_comm); +- MPIDI_CH4U_enqueue_posted(rreq, &MPIDI_CH4U_COMM(root_comm, posted_list)); ++ MPIDIG_enqueue_posted(rreq, &MPIDIG_COMM(root_comm, posted_list)); + /* MPIDI_CS_EXIT(); */ + } else { +- MPIDI_CH4U_REQUEST(unexp_req, req->rreq.match_req) = (uint64_t) rreq; ++ MPIDIG_REQUEST(unexp_req, req->rreq.match_req) = (uint64_t) rreq; ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_IN_PROGRESS; + } + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DO_IRECV); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DO_IRECV); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_recv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -238,7 +226,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_recv(void *buf, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_RECV); + + mpi_errno = +- MPIDI_do_irecv(buf, count, datatype, rank, tag, comm, context_offset, request, 1, 0ULL); ++ MPIDIG_do_irecv(buf, count, datatype, rank, tag, comm, context_offset, request, 1, 0ULL); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -249,10 +237,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_recv(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_recv_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_recv_init(void *buf, + int count, + MPI_Datatype datatype, +@@ -266,22 +250,22 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_recv_init(void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_RECV_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_RECV_INIT); + +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__PREQUEST_RECV, 2); ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__PREQUEST_RECV, 2); + MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + + *request = rreq; + rreq->comm = comm; + MPIR_Comm_add_ref(comm); + +- MPIDI_CH4U_REQUEST(rreq, buffer) = (void *) buf; +- MPIDI_CH4U_REQUEST(rreq, count) = count; +- MPIDI_CH4U_REQUEST(rreq, datatype) = datatype; +- MPIDI_CH4U_REQUEST(rreq, rank) = rank; +- MPIDI_CH4U_REQUEST(rreq, tag) = tag; +- MPIDI_CH4U_REQUEST(rreq, context_id) = comm->context_id + context_offset; ++ MPIDIG_REQUEST(rreq, buffer) = (void *) buf; ++ MPIDIG_REQUEST(rreq, count) = count; ++ MPIDIG_REQUEST(rreq, datatype) = datatype; ++ MPIDIG_REQUEST(rreq, rank) = rank; ++ MPIDIG_REQUEST(rreq, tag) = tag; ++ MPIDIG_REQUEST(rreq, context_id) = comm->context_id + context_offset; + rreq->u.persist.real_request = NULL; + MPID_Request_complete(rreq); +- MPIDI_CH4U_REQUEST(rreq, p_type) = MPIDI_PTYPE_RECV; ++ MPIDIG_REQUEST(rreq, p_type) = MPIDI_PTYPE_RECV; + MPIR_Datatype_add_ref_if_not_builtin(datatype); + + fn_exit: +@@ -292,10 +276,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_recv_init(void *buf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_imrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_imrecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, MPIR_Request * message) +@@ -304,29 +284,29 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_imrecv(void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_IMRECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_IMRECV); + +- MPIDI_CH4U_REQUEST(message, req->rreq.mrcv_buffer) = buf; +- MPIDI_CH4U_REQUEST(message, req->rreq.mrcv_count) = count; +- MPIDI_CH4U_REQUEST(message, req->rreq.mrcv_datatype) = datatype; ++ MPIDIG_REQUEST(message, req->rreq.mrcv_buffer) = buf; ++ MPIDIG_REQUEST(message, req->rreq.mrcv_count) = count; ++ MPIDIG_REQUEST(message, req->rreq.mrcv_datatype) = datatype; + + /* MPIDI_CS_ENTER(); */ +- if (MPIDI_CH4U_REQUEST(message, req->status) & MPIDI_CH4U_REQ_BUSY) { +- MPIDI_CH4U_REQUEST(message, req->status) |= MPIDI_CH4U_REQ_UNEXP_CLAIMED; +- } else if (MPIDI_CH4U_REQUEST(message, req->status) & MPIDI_CH4U_REQ_LONG_RTS) { ++ if (MPIDIG_REQUEST(message, req->status) & MPIDIG_REQ_BUSY) { ++ MPIDIG_REQUEST(message, req->status) |= MPIDIG_REQ_UNEXP_CLAIMED; ++ } else if (MPIDIG_REQUEST(message, req->status) & MPIDIG_REQ_LONG_RTS) { + /* Matching receive is now posted, tell the netmod */ + MPIR_Datatype_add_ref_if_not_builtin(datatype); +- MPIDI_CH4U_REQUEST(message, datatype) = datatype; +- MPIDI_CH4U_REQUEST(message, buffer) = (char *) buf; +- MPIDI_CH4U_REQUEST(message, count) = count; ++ MPIDIG_REQUEST(message, datatype) = datatype; ++ MPIDIG_REQUEST(message, buffer) = (char *) buf; ++ MPIDIG_REQUEST(message, count) = count; + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_am_recv(message); + #else +- if (MPIDI_CH4I_REQUEST(message, is_local)) ++ if (MPIDI_REQUEST(message, is_local)) + mpi_errno = MPIDI_SHM_am_recv(message); + else + mpi_errno = MPIDI_NM_am_recv(message); + #endif + } else { +- mpi_errno = MPIDI_handle_unexp_mrecv(message); ++ mpi_errno = MPIDIG_handle_unexp_mrecv(message); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } +@@ -339,10 +319,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_imrecv(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_irecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -356,7 +332,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_irecv(void *buf, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_IRECV); + + mpi_errno = +- MPIDI_do_irecv(buf, count, datatype, rank, tag, comm, context_offset, request, 1, 0ULL); ++ MPIDIG_do_irecv(buf, count, datatype, rank, tag, comm, context_offset, request, 1, 0ULL); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + fn_exit: +@@ -366,10 +342,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_irecv(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_cancel_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_cancel_recv(MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS, found; +@@ -378,22 +350,26 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_cancel_recv(MPIR_Request * rreq) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_CANCEL_RECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_CANCEL_RECV); + +- root_comm = MPIDI_CH4U_context_id_to_comm(MPIDI_CH4U_REQUEST(rreq, context_id)); ++ if (!MPIR_Request_is_complete(rreq) && ++ !MPIR_STATUS_GET_CANCEL_BIT(rreq->status) && !MPIDIG_REQUEST_IN_PROGRESS(rreq)) { ++ root_comm = MPIDIG_context_id_to_comm(MPIDIG_REQUEST(rreq, context_id)); + +- /* MPIDI_CS_ENTER(); */ +- found = +- MPIDI_CH4U_delete_posted(&rreq->dev.ch4.am.req->rreq, +- &MPIDI_CH4U_COMM(root_comm, posted_list)); +- /* MPIDI_CS_EXIT(); */ ++ /* MPIDI_CS_ENTER(); */ ++ found = ++ MPIDIG_delete_posted(&MPIDIG_REQUEST(rreq, req->rreq), ++ &MPIDIG_COMM(root_comm, posted_list)); ++ /* MPIDI_CS_EXIT(); */ ++ ++ if (found) { ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(rreq, datatype)); ++ MPIR_Comm_release(root_comm); /* -1 for posted_list */ ++ } + +- if (found) { + MPIR_STATUS_SET_CANCEL_BIT(rreq->status, TRUE); + MPIR_STATUS_SET_COUNT(rreq->status, 0); +- MPIR_Comm_release(root_comm); /* -1 for posted_list */ + MPID_Request_complete(rreq); +- } else { +- MPIR_STATUS_SET_CANCEL_BIT(rreq->status, FALSE); + } ++ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_CANCEL_RECV); + return mpi_errno; + } +--- a/src/mpid/ch4/generic/mpidig_send.h ++++ b/src/mpid/ch4/generic/mpidig_send.h +@@ -13,38 +13,35 @@ + #define MPIDIG_SEND_H_INCLUDED + + #include "ch4_impl.h" +-#include <../mpi/pt2pt/bsendutil.h> + + #define MPIDI_NONBLOCKING 0 + #define MPIDI_BLOCKING 1 + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_am_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_am_isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, +- int rank, int tag, MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request, +- int is_blocking, int type) ++static inline int MPIDIG_am_isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int rank, ++ int tag, MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request, int is_blocking, ++ int type) + { + int mpi_errno = MPI_SUCCESS, c; + MPIR_Request *sreq = *request; +- MPIDI_CH4U_hdr_t am_hdr; +- MPIDI_CH4U_ssend_req_msg_t ssend_req; ++ MPIDIG_hdr_t am_hdr; ++ MPIDIG_ssend_req_msg_t ssend_req; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_AM_ISEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_AM_ISEND); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_AM_ISEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_AM_ISEND); + ++ /* If the message is going to MPI_PROC_NULL, we still need to create and complete the request so ++ * we have something we can pass back up the call stack to track the request status. */ + if (unlikely(rank == MPI_PROC_NULL)) { + mpi_errno = MPI_SUCCESS; + /* for blocking calls, we directly complete the request */ + if (!is_blocking || sreq != NULL) { + if (sreq == NULL) { +- *request = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__SEND, 2); ++ *request = MPIDIG_request_create(MPIR_REQUEST_KIND__SEND, 2); + MPIR_ERR_CHKANDSTMT((*request) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, + "**nomemreq"); + } else { +- MPIDI_CH4I_am_request_init(sreq, MPIR_REQUEST_KIND__SEND, 2); ++ MPIDIG_request_init(sreq, MPIR_REQUEST_KIND__SEND); + } + MPID_Request_complete((*request)); + } +@@ -52,10 +49,10 @@ static inline int MPIDI_am_isend(const void *buf, MPI_Aint count, MPI_Datatype d + } + + if (sreq == NULL) { +- sreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__SEND, 2); ++ sreq = MPIDIG_request_create(MPIR_REQUEST_KIND__SEND, 2); + MPIR_ERR_CHKANDSTMT((sreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + } else { +- MPIDI_CH4I_am_request_init(sreq, MPIR_REQUEST_KIND__SEND, 2); ++ MPIDIG_request_init(sreq, MPIR_REQUEST_KIND__SEND); + } + + *request = sreq; +@@ -63,9 +60,15 @@ static inline int MPIDI_am_isend(const void *buf, MPI_Aint count, MPI_Datatype d + am_hdr.src_rank = comm->rank; + am_hdr.tag = tag; + am_hdr.context_id = comm->context_id + context_offset; ++ ++ /* Synchronous send requires a special kind of AM header to track the return message so check ++ * for that and fill in the appropriate struct if necessary. */ + #ifdef MPIDI_CH4_DIRECT_NETMOD +- if (type == MPIDI_CH4U_SSEND_REQ) { ++ if (type == MPIDIG_SSEND_REQ) { + ssend_req.hdr = am_hdr; ++ ++ /* Increment the completion counter once to account for the extra message that needs to come ++ * back from the receiver to indicate completion. */ + ssend_req.sreq_ptr = (uint64_t) sreq; + MPIR_cc_incr(sreq->cc_ptr, &c); + +@@ -76,9 +79,12 @@ static inline int MPIDI_am_isend(const void *buf, MPI_Aint count, MPI_Datatype d + &am_hdr, sizeof(am_hdr), buf, count, datatype, sreq); + } + #else +- if (type == MPIDI_CH4U_SSEND_REQ) { ++ if (type == MPIDIG_SSEND_REQ) { + ssend_req.hdr = am_hdr; + ssend_req.sreq_ptr = (uint64_t) sreq; ++ ++ /* Increment the completion counter once to account for the extra message that needs to come ++ * back from the receiver to indicate completion. */ + MPIR_cc_incr(sreq->cc_ptr, &c); + if (MPIDI_av_is_local(addr)) { + mpi_errno = MPIDI_SHM_am_isend(rank, comm, type, +@@ -103,43 +109,36 @@ static inline int MPIDI_am_isend(const void *buf, MPI_Aint count, MPI_Datatype d + MPIR_ERR_POP(mpi_errno); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_AM_ISEND); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_AM_ISEND); + return mpi_errno; + + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_psend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_psend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request) ++static inline int MPIDIG_psend_init(const void *buf, int count, MPI_Datatype datatype, int rank, ++ int tag, MPIR_Comm * comm, int context_offset, ++ MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PSEND_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PSEND_INIT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PSEND_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PSEND_INIT); + +- sreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__PREQUEST_SEND, 2); ++ sreq = MPIDIG_request_create(MPIR_REQUEST_KIND__PREQUEST_SEND, 2); + MPIR_ERR_CHKANDSTMT(sreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + *request = sreq; + + MPIR_Comm_add_ref(comm); + sreq->comm = comm; + +- MPIDI_CH4U_REQUEST(sreq, buffer) = (void *) buf; +- MPIDI_CH4U_REQUEST(sreq, count) = count; +- MPIDI_CH4U_REQUEST(sreq, datatype) = datatype; +- MPIDI_CH4U_REQUEST(sreq, rank) = rank; +- MPIDI_CH4U_REQUEST(sreq, tag) = tag; +- MPIDI_CH4U_REQUEST(sreq, context_id) = comm->context_id + context_offset; ++ MPIDIG_REQUEST(sreq, buffer) = (void *) buf; ++ MPIDIG_REQUEST(sreq, count) = count; ++ MPIDIG_REQUEST(sreq, datatype) = datatype; ++ MPIDIG_REQUEST(sreq, rank) = rank; ++ MPIDIG_REQUEST(sreq, tag) = tag; ++ MPIDIG_REQUEST(sreq, context_id) = comm->context_id + context_offset; + + sreq->u.persist.real_request = NULL; + MPID_Request_complete(sreq); +@@ -147,17 +146,13 @@ static inline int MPIDI_psend_init(const void *buf, + MPIR_Datatype_add_ref_if_not_builtin(datatype); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PSEND_INIT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PSEND_INIT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_send(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -169,18 +164,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_send(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_SEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_SEND); + +- mpi_errno = +- MPIDI_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request, +- MPIDI_BLOCKING, MPIDI_CH4U_SEND); ++ mpi_errno = MPIDIG_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request, MPIDI_BLOCKING, MPIDIG_SEND); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_SEND); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_isend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -192,19 +182,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_isend(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_ISEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_ISEND); + +- mpi_errno = +- MPIDI_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request, +- MPIDI_NONBLOCKING, MPIDI_CH4U_SEND); ++ mpi_errno = MPIDIG_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request, MPIDI_NONBLOCKING, MPIDIG_SEND); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_ISEND); + return mpi_errno; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_rsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_rsend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -216,19 +201,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_rsend(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_RSEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_RSEND); + +- mpi_errno = +- MPIDI_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request, +- MPIDI_BLOCKING, MPIDI_CH4U_SEND); ++ mpi_errno = MPIDIG_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request, MPIDI_BLOCKING, MPIDIG_SEND); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_RSEND); + return mpi_errno; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_irsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_irsend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -240,18 +220,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_irsend(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_IRSEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_IRSEND); + +- mpi_errno = +- MPIDI_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request, +- MPIDI_NONBLOCKING, MPIDI_CH4U_SEND); ++ mpi_errno = MPIDIG_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request, MPIDI_NONBLOCKING, MPIDIG_SEND); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_IRSEND); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_ssend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -263,18 +238,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_ssend(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_SSEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_SSEND); + +- mpi_errno = +- MPIDI_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request, +- MPIDI_BLOCKING, MPIDI_CH4U_SSEND_REQ); ++ mpi_errno = MPIDIG_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request, MPIDI_BLOCKING, MPIDIG_SSEND_REQ); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_SSEND); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_issend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -286,110 +256,89 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_issend(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_ISSEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_ISSEND); + +- mpi_errno = +- MPIDI_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request, +- MPIDI_NONBLOCKING, MPIDI_CH4U_SSEND_REQ); ++ mpi_errno = MPIDIG_am_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request, MPIDI_NONBLOCKING, MPIDIG_SSEND_REQ); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_ISSEND); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_send_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_send_init(const void *buf, + int count, + MPI_Datatype datatype, + int rank, + int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request) ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_SEND_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_SEND_INIT); + +- mpi_errno = MPIDI_psend_init(buf, count, datatype, rank, tag, comm, context_offset, request); +- MPIDI_CH4U_REQUEST((*request), p_type) = MPIDI_PTYPE_SEND; ++ mpi_errno = MPIDIG_psend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDIG_REQUEST((*request), p_type) = MPIDI_PTYPE_SEND; + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_SEND_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_ssend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_ssend_init(const void *buf, + int count, + MPI_Datatype datatype, + int rank, + int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request) ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_SSEND_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_SSEND_INIT); + +- mpi_errno = MPIDI_psend_init(buf, count, datatype, rank, tag, comm, context_offset, request); +- MPIDI_CH4U_REQUEST((*request), p_type) = MPIDI_PTYPE_SSEND; ++ mpi_errno = MPIDIG_psend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDIG_REQUEST((*request), p_type) = MPIDI_PTYPE_SSEND; + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_SSEND_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_bsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_bsend_init(const void *buf, + int count, + MPI_Datatype datatype, + int rank, + int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request) ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_BSEND_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_BSEND_INIT); + +- mpi_errno = MPIDI_psend_init(buf, count, datatype, rank, tag, comm, context_offset, request); +- MPIDI_CH4U_REQUEST((*request), p_type) = MPIDI_PTYPE_BSEND; ++ mpi_errno = MPIDIG_psend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDIG_REQUEST((*request), p_type) = MPIDI_PTYPE_BSEND; + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_BSEND_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_rsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_rsend_init(const void *buf, + int count, + MPI_Datatype datatype, + int rank, + int tag, MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request) ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_RSEND_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_RSEND_INIT); + +- mpi_errno = MPIDI_psend_init(buf, count, datatype, rank, tag, comm, context_offset, request); +- MPIDI_CH4U_REQUEST((*request), p_type) = MPIDI_PTYPE_SEND; ++ mpi_errno = MPIDIG_psend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDIG_REQUEST((*request), p_type) = MPIDI_PTYPE_SEND; + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_RSEND_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_cancel_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_cancel_send(MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/mpid/ch4/generic/mpidig_startall.h ++++ b/src/mpid/ch4/generic/mpidig_startall.h +@@ -15,10 +15,6 @@ + #include "ch4_impl.h" + #include <../mpi/pt2pt/bsendutil.h> + +-#undef FUNCNAME +-#define FUNCNAME MPIDIG_mpi_startall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_startall(int count, MPIR_Request * requests[]) + { + int mpi_errno = MPI_SUCCESS, i; +@@ -29,49 +25,38 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_startall(int count, MPIR_Request * reque + for (i = 0; i < count; i++) { + MPIR_Request *const preq = requests[i]; + +- switch (MPIDI_CH4U_REQUEST(preq, p_type)) { ++ switch (MPIDIG_REQUEST(preq, p_type)) { + + case MPIDI_PTYPE_RECV: +- mpi_errno = MPID_Irecv(MPIDI_CH4U_REQUEST(preq, buffer), +- MPIDI_CH4U_REQUEST(preq, count), +- MPIDI_CH4U_REQUEST(preq, datatype), +- MPIDI_CH4U_REQUEST(preq, rank), +- MPIDI_CH4U_REQUEST(preq, tag), +- preq->comm, +- MPIDI_CH4U_request_get_context_offset(preq), ++ mpi_errno = MPID_Irecv(MPIDIG_REQUEST(preq, buffer), MPIDIG_REQUEST(preq, count), ++ MPIDIG_REQUEST(preq, datatype), MPIDIG_REQUEST(preq, rank), ++ MPIDIG_REQUEST(preq, tag), preq->comm, ++ MPIDIG_request_get_context_offset(preq), + &preq->u.persist.real_request); + break; + + case MPIDI_PTYPE_SEND: +- mpi_errno = MPID_Isend(MPIDI_CH4U_REQUEST(preq, buffer), +- MPIDI_CH4U_REQUEST(preq, count), +- MPIDI_CH4U_REQUEST(preq, datatype), +- MPIDI_CH4U_REQUEST(preq, rank), +- MPIDI_CH4U_REQUEST(preq, tag), +- preq->comm, +- MPIDI_CH4U_request_get_context_offset(preq), ++ mpi_errno = MPID_Isend(MPIDIG_REQUEST(preq, buffer), MPIDIG_REQUEST(preq, count), ++ MPIDIG_REQUEST(preq, datatype), MPIDIG_REQUEST(preq, rank), ++ MPIDIG_REQUEST(preq, tag), preq->comm, ++ MPIDIG_request_get_context_offset(preq), + &preq->u.persist.real_request); + break; + + case MPIDI_PTYPE_SSEND: +- mpi_errno = MPID_Issend(MPIDI_CH4U_REQUEST(preq, buffer), +- MPIDI_CH4U_REQUEST(preq, count), +- MPIDI_CH4U_REQUEST(preq, datatype), +- MPIDI_CH4U_REQUEST(preq, rank), +- MPIDI_CH4U_REQUEST(preq, tag), +- preq->comm, +- MPIDI_CH4U_request_get_context_offset(preq), ++ mpi_errno = MPID_Issend(MPIDIG_REQUEST(preq, buffer), MPIDIG_REQUEST(preq, count), ++ MPIDIG_REQUEST(preq, datatype), MPIDIG_REQUEST(preq, rank), ++ MPIDIG_REQUEST(preq, tag), preq->comm, ++ MPIDIG_request_get_context_offset(preq), + &preq->u.persist.real_request); + break; + + case MPIDI_PTYPE_BSEND:{ + MPI_Request sreq_handle; +- mpi_errno = MPIR_Ibsend_impl(MPIDI_CH4U_REQUEST(preq, buffer), +- MPIDI_CH4U_REQUEST(preq, count), +- MPIDI_CH4U_REQUEST(preq, datatype), +- MPIDI_CH4U_REQUEST(preq, rank), +- MPIDI_CH4U_REQUEST(preq, tag), +- preq->comm, &sreq_handle); ++ mpi_errno = ++ MPIR_Ibsend_impl(MPIDIG_REQUEST(preq, buffer), MPIDIG_REQUEST(preq, count), ++ MPIDIG_REQUEST(preq, datatype), MPIDIG_REQUEST(preq, rank), ++ MPIDIG_REQUEST(preq, tag), preq->comm, &sreq_handle); + if (mpi_errno == MPI_SUCCESS) + MPIR_Request_get_ptr(sreq_handle, preq->u.persist.real_request); + +@@ -81,14 +66,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_startall(int count, MPIR_Request * reque + default: + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __FUNCTION__, + __LINE__, MPI_ERR_INTERN, "**ch3|badreqtype", +- "**ch3|badreqtype %d", MPIDI_CH4U_REQUEST(preq, +- p_type)); ++ "**ch3|badreqtype %d", MPIDIG_REQUEST(preq, ++ p_type)); + } + + if (mpi_errno == MPI_SUCCESS) { + preq->status.MPI_ERROR = MPI_SUCCESS; + +- if (MPIDI_CH4U_REQUEST(preq, p_type) == MPIDI_PTYPE_BSEND) { ++ if (MPIDIG_REQUEST(preq, p_type) == MPIDI_PTYPE_BSEND) { + preq->cc_ptr = &preq->cc; + MPID_Request_set_completed(preq); + } else +@@ -99,11 +84,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_startall(int count, MPIR_Request * reque + preq->cc_ptr = &preq->cc; + MPID_Request_set_completed(preq); + } +- MPIR_Datatype_release_if_not_builtin(MPIDI_CH4U_REQUEST(preq, datatype)); + } + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_STARTALL); + return mpi_errno; + } + ++MPL_STATIC_INLINE_PREFIX void MPIDIG_prequest_free_hook(MPIR_Request * req) ++{ ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(req, datatype)); ++} ++ + #endif /* MPIDIG_STARTALL_H_INCLUDED */ +--- a/src/mpid/ch4/include/mpid_thread.h ++++ b/src/mpid/ch4/include/mpid_thread.h +@@ -20,19 +20,6 @@ typedef MPIDU_Thread_cond_t MPID_Thread_cond_t; + typedef MPIDU_Thread_id_t MPID_Thread_id_t; + typedef MPIDU_Thread_tls_t MPID_Thread_tls_t; + typedef MPIDU_Thread_func_t MPID_Thread_func_t; +- +-#ifdef MPIDI_CH4_USE_TICKET_LOCK +-#include "mpid_ticketlock.h" +-typedef MPIDI_CH4_Ticket_lock MPID_Thread_mutex_t; +-#define MPID_THREAD_CS_ENTER MPIDI_CH4I_THREAD_CS_ENTER +-#define MPID_THREAD_CS_EXIT MPIDI_CH4I_THREAD_CS_EXIT +-#define MPID_THREAD_CS_YIELD MPIDI_CH4I_THREAD_CS_YIELD +-#define MPID_Thread_mutex_create MPIDI_CH4I_Thread_mutex_create +-#define MPID_Thread_mutex_destroy MPIDI_CH4I_Thread_mutex_destroy +-#define MPID_Thread_mutex_lock MPIDI_CH4I_Thread_mutex_lock +-#define MPID_Thread_mutex_unlock MPIDI_CH4I_Thread_mutex_unlock +-#define MPID_Thread_cond_wait MPIDI_CH4I_Thread_cond_wait +-#else + typedef MPIDU_Thread_mutex_t MPID_Thread_mutex_t; + typedef MPIDU_thread_mutex_state_t MPID_Thread_mutex_state_t; + #define MPID_THREAD_CS_ENTER MPIDU_THREAD_CS_ENTER +@@ -63,10 +50,9 @@ do { \ + + #define MPID_Thread_mutex_create MPIDU_Thread_mutex_create + #define MPID_Thread_mutex_destroy MPIDU_Thread_mutex_destroy +-#define MPID_Thread_mutex_lock MPIDU_Thread_mutex_lock ++#define MPID_Thread_mutex_lock(mutex, err) MPIDU_Thread_mutex_lock(mutex, err, MPL_THREAD_PRIO_HIGH) + #define MPID_Thread_mutex_unlock MPIDU_Thread_mutex_unlock + #define MPID_Thread_cond_wait MPIDU_Thread_cond_wait +-#endif /* MPIDI_CH4_USE_TICKET_LOCK */ + + #define MPID_Thread_create MPIDU_Thread_create + #define MPID_Thread_exit MPIDU_Thread_exit +deleted file mode 100644 +--- a/src/mpid/ch4/include/mpid_ticketlock.h ++++ /dev/null +@@ -1,202 +0,0 @@ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef MPID_TICKETLOCK_H_INCLUDED +-#define MPID_TICKETLOCK_H_INCLUDED +- +-#define MPIDI_CH4_CACHELINE_SIZE 64 +- +-typedef union MPIDI_CH4_Ticket_lock { +- unsigned u; +- char cacheline[MPIDI_CH4_CACHELINE_SIZE]; +- struct { +- unsigned short ticket; +- unsigned short clients; +- } s; +-} MPIDI_CH4_Ticket_lock MPL_ATTR_ALIGNED(MPIDI_CH4_CACHELINE_SIZE); +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_Thread_mutex_acquire(MPIDI_CH4_Ticket_lock * m) +-{ +- uint16_t u = __sync_fetch_and_add(&m->s.clients, 1); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_ACQUIRE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_ACQUIRE); +- +- while (m->s.ticket != u) +- asm volatile ("pause\n":::"memory"); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_ACQUIRE); +-} +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_Thread_mutex_release(MPIDI_CH4_Ticket_lock * m) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_RELEASE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_RELEASE); +- +- asm volatile ("":::"memory"); +- m->s.ticket++; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_RELEASE); +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4I_Thread_mutex_try_acquire(MPIDI_CH4_Ticket_lock * m) +-{ +- uint16_t u = m->s.clients; +- uint16_t u2 = u + 1; +- uint32_t val = ((uint32_t) u << 16) + u; +- uint32_t val2 = ((uint32_t) u2 << 16) + u; +- int ret = EBUSY; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_TRY_ACQUIRE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_TRY_ACQUIRE); +- +- if (__sync_val_compare_and_swap(&m->u, val, val2) == val) +- ret = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_TRY_ACQUIRE); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_Thread_mutex_lock(MPIDI_CH4_Ticket_lock * m, +- int *mpi_error) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_LOCK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_LOCK); +- +- MPIDI_CH4I_Thread_mutex_acquire(m); +- *mpi_error = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_LOCK); +-} +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_Thread_mutex_unlock(MPIDI_CH4_Ticket_lock * m, +- int *mpi_error) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_UNLOCK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_UNLOCK); +- +- MPIDI_CH4I_Thread_mutex_release(m); +- *mpi_error = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_UNLOCK); +-} +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_Thread_mutex_create(MPIDI_CH4_Ticket_lock * m, +- int *mpi_error) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_CREATE); +- +- m->u = 0; +- *mpi_error = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_CREATE); +-} +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_Thread_mutex_destroy(MPIDI_CH4_Ticket_lock * m, +- int *mpi_error) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_DESTROY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_DESTROY); +- +- m->u = 0; +- *mpi_error = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_THREAD_MUTEX_DESTROY); +-} +- +-/* For this implementation we have two options */ +-/* 1) Split the typedef for condition variable mutexes and call the utility routines */ +-/* 2) Implement it from scratch */ +-/* Currently only async.c is using condition variables, so we should figure out what */ +-/* we really want from the cv implementations */ +-MPL_STATIC_INLINE_PREFIX void +-MPIDI_CH4I_Thread_cond_wait(MPIDU_Thread_cond_t * cond, MPIDI_CH4_Ticket_lock * m, int *mpi_error) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_THREAD_COND_WAIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_THREAD_COND_WAIT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_THREAD_COND_WAIT); +-} +- +- +-#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL +- +-#define MPIDI_CH4I_THREAD_CS_ENTER_POBJ(mutex) +-#define MPIDI_CH4I_THREAD_CS_EXIT_POBJ(mutex) +-#define MPIDI_CH4I_THREAD_CS_TRY_POBJ(mutex) +-#define MPIDI_CH4I_THREAD_CS_YIELD_POBJ(mutex) +- +-#define MPIDI_CH4I_THREAD_CS_ENTER_GLOBAL(m) do { if (MPIR_ThreadInfo.isThreaded) { MPIDI_CH4I_Thread_mutex_acquire(&m); }} while (0) +-#define MPIDI_CH4I_THREAD_CS_EXIT_GLOBAL(m) do { if (MPIR_ThreadInfo.isThreaded) { MPIDI_CH4I_Thread_mutex_release(&m); }} while (0) +-#define MPIDI_CH4I_THREAD_CS_TRY_GLOBAL(m) do { (0==MPIDI_CH4I_Thread_mutex_try_acquire(&m));}} while (0) +-#define MPIDI_CH4I_THREAD_CS_YIELD_GLOBAL(m) do { if (MPIR_ThreadInfo.isThreaded) { MPIDI_CH4I_Thread_mutex_release(&m); sched_yield(); MPIDI_CH4I_Thread_mutex_acquire(&m); }} while (0) +- +-#define MPIDI_CH4I_THREAD_CS_ENTER_ALLGRAN(mutex) MPIDI_CH4I_THREAD_CS_ENTER_GLOBAL(m) +-#define MPIDI_CH4I_THREAD_CS_EXIT_ALLGRAN(mutex) MPIDI_CH4I_THREAD_CS_EXIT_GLOBAL(m) +-#define MPIDI_CH4I_THREAD_CS_TRY_ALLGRAN(mutex) MPIDI_CH4I_THREAD_CS_TRY_GLOBAL(m) +-#define MPIDI_CH4I_THREAD_CS_YIELD_ALLGRAN(mutex) MPIDI_CH4I_THREAD_CS_YIELD_GLOBAL(m) +- +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ +- +-#define MPIDI_CH4I_THREAD_CS_ENTER_POBJ(m) \ +- do { \ +- if (likely(MPIR_ThreadInfo.isThreaded)) { \ +- MPIDI_CH4I_Thread_mutex_acquire(&m); \ +- } \ +- } while (0) +- +-#define MPIDI_CH4I_THREAD_CS_EXIT_POBJ(m) \ +- do { \ +- if (likely(MPIR_ThreadInfo.isThreaded)) { \ +- MPIDI_CH4I_Thread_mutex_release(&m); \ +- } \ +- } while (0) +- +-#define MPIDI_CH4I_THREAD_CS_TRY_POBJ(m) \ +- do { \ +- if (likely(MPIR_ThreadInfo.isThreaded)) { \ +- MPIDI_CH4I_Thread_mutex_try_acquire(&m); \ +- } \ +- } while (0) +- +-#define MPIDI_CH4I_THREAD_CS_YIELD_POBJ(m) \ +- do { \ +- if (likely(MPIR_ThreadInfo.isThreaded)) { \ +- MPIDI_CH4I_Thread_mutex_release(&m); \ +- sched_yield(); \ +- MPIDI_CH4I_Thread_mutex_acquire(&m); \ +- } \ +- } while (0) +- +-#define MPIDI_CH4I_THREAD_CS_ENTER_ALLGRAN MPIDI_CH4I_THREAD_CS_ENTER_POBJ +-#define MPIDI_CH4I_THREAD_CS_EXIT_ALLGRAN MPIDI_CH4I_THREAD_CS_EXIT_POBJ +-#define MPIDI_CH4I_THREAD_CS_TRY_ALLGRAN MPIDI_CH4I_THREAD_CS_TRY_POBJ +-#define MPIDI_CH4I_THREAD_CS_YIELD_ALLGRAN MPIDI_CH4I_THREAD_CS_YIELD_POBJ +- +-/* GLOBAL locks are all NO-OPs */ +-#define MPIDI_CH4I_THREAD_CS_ENTER_GLOBAL(mutex) +-#define MPIDI_CH4I_THREAD_CS_EXIT_GLOBAL(mutex) +-#define MPIDI_CH4I_THREAD_CS_TRY_GLOBAL(mutex) +-#define MPIDI_CH4I_THREAD_CS_YIELD_GLOBAL(mutex) +- +-#else +- +-#error "Ticket locks are only supported in Global or Per-Object Granularity" +- +-#endif /* MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL */ +- +-#define MPIDI_CH4I_THREAD_CS_ENTER(name, mutex) MPIDI_CH4I_THREAD_CS_ENTER_##name(mutex) +-#define MPIDI_CH4I_THREAD_CS_EXIT(name, mutex) MPIDI_CH4I_THREAD_CS_EXIT_##name(mutex) +-#define MPIDI_CH4I_THREAD_CS_TRY(name, mutex) MPIDI_CH4I_THREAD_CS_TRY_##name(mutex) +-#define MPIDI_CH4I_THREAD_CS_YIELD(name, mutex) MPIDI_CH4I_THREAD_CS_YIELD_##name(mutex) +- +-#endif /* MPID_TICKETLOCK_H_INCLUDED */ +--- a/src/mpid/ch4/include/mpidch4.h ++++ b/src/mpid/ch4/include/mpidch4.h +@@ -18,23 +18,26 @@ + */ + #define MPIDI_CH4I_API(rc,fcnname,...) \ + MPL_STATIC_INLINE_PREFIX rc MPID_##fcnname(__VA_ARGS__) MPL_STATIC_INLINE_SUFFIX ++#define MPIDI_CH4I_API_NOINLINE(rc,fcnname,...) \ ++ rc MPID_##fcnname(__VA_ARGS__) + +-MPIDI_CH4I_API(int, Init, int *, char ***, int, int *, int *, int *); +-MPIDI_CH4I_API(int, InitCompleted, void); ++MPIDI_CH4I_API_NOINLINE(int, Init, int *, char ***, int, int *, int *, int *); ++MPIDI_CH4I_API_NOINLINE(int, InitCompleted, void); + MPIDI_CH4I_API(int, Cancel_recv, MPIR_Request *); + MPIDI_CH4I_API(int, Cancel_send, MPIR_Request *); +-MPIDI_CH4I_API(int, Comm_disconnect, MPIR_Comm *); +-MPIDI_CH4I_API(int, Comm_spawn_multiple, int, char *[], char **[], const int[], MPIR_Info *[], int, +- MPIR_Comm *, MPIR_Comm **, int[]); +-MPIDI_CH4I_API(int, Comm_failure_get_acked, MPIR_Comm *, MPIR_Group **); +-MPIDI_CH4I_API(int, Comm_get_all_failed_procs, MPIR_Comm *, MPIR_Group **, int); +-MPIDI_CH4I_API(int, Comm_revoke, MPIR_Comm *, int); +-MPIDI_CH4I_API(int, Comm_failure_ack, MPIR_Comm *); ++MPIDI_CH4I_API_NOINLINE(int, Comm_disconnect, MPIR_Comm *); ++MPIDI_CH4I_API_NOINLINE(int, Comm_spawn_multiple, int, char *[], char **[], const int[], ++ MPIR_Info *[], int, MPIR_Comm *, MPIR_Comm **, int[]); ++MPIDI_CH4I_API_NOINLINE(int, Comm_failure_get_acked, MPIR_Comm *, MPIR_Group **); ++MPIDI_CH4I_API_NOINLINE(int, Comm_get_all_failed_procs, MPIR_Comm *, MPIR_Group **, int); ++MPIDI_CH4I_API_NOINLINE(int, Comm_revoke, MPIR_Comm *, int); ++MPIDI_CH4I_API_NOINLINE(int, Comm_failure_ack, MPIR_Comm *); + MPIDI_CH4I_API(int, Comm_AS_enabled, MPIR_Comm *); +-MPIDI_CH4I_API(int, Comm_get_lpid, MPIR_Comm *, int, int *, bool); +-MPIDI_CH4I_API(int, Finalize, void); +-MPIDI_CH4I_API(int, Get_universe_size, int *); +-MPIDI_CH4I_API(int, Get_processor_name, char *, int, int *); ++MPIDI_CH4I_API_NOINLINE(int, Comm_get_lpid, MPIR_Comm *, int, int *, bool); ++MPIDI_CH4I_API_NOINLINE(int, CS_finalize, void); ++MPIDI_CH4I_API_NOINLINE(int, Finalize, void); ++MPIDI_CH4I_API_NOINLINE(int, Get_universe_size, int *); ++MPIDI_CH4I_API_NOINLINE(int, Get_processor_name, char *, int, int *); + MPIDI_CH4I_API(int, Iprobe, int, int, MPIR_Comm *, int, int *, MPI_Status *); + MPIDI_CH4I_API(int, Irecv, void *, MPI_Aint, MPI_Datatype, int, int, MPIR_Comm *, int, + MPIR_Request **); +@@ -45,10 +48,12 @@ MPIDI_CH4I_API(int, Issend, const void *, MPI_Aint, MPI_Datatype, int, int, MPIR + MPIDI_CH4I_API(int, Mrecv, void *, MPI_Aint, MPI_Datatype, MPIR_Request *, MPI_Status *, + MPIR_Request **); + MPIDI_CH4I_API(int, Imrecv, void *, MPI_Aint, MPI_Datatype, MPIR_Request *, MPIR_Request **); +-MPIDI_CH4I_API(int, Open_port, MPIR_Info *, char *); +-MPIDI_CH4I_API(int, Close_port, const char *); +-MPIDI_CH4I_API(int, Comm_accept, const char *, MPIR_Info *, int, MPIR_Comm *, MPIR_Comm **); +-MPIDI_CH4I_API(int, Comm_connect, const char *, MPIR_Info *, int, MPIR_Comm *, MPIR_Comm **); ++MPIDI_CH4I_API_NOINLINE(int, Open_port, MPIR_Info *, char *); ++MPIDI_CH4I_API_NOINLINE(int, Close_port, const char *); ++MPIDI_CH4I_API_NOINLINE(int, Comm_accept, const char *, MPIR_Info *, int, MPIR_Comm *, ++ MPIR_Comm **); ++MPIDI_CH4I_API_NOINLINE(int, Comm_connect, const char *, MPIR_Info *, int, MPIR_Comm *, ++ MPIR_Comm **); + MPIDI_CH4I_API(int, Probe, int, int, MPIR_Comm *, int, MPI_Status *); + MPIDI_CH4I_API(int, Mprobe, int, int, MPIR_Comm *, int, MPIR_Request **, MPI_Status *); + MPIDI_CH4I_API(int, Improbe, int, int, MPIR_Comm *, int, int *, MPIR_Request **, MPI_Status *); +@@ -68,6 +73,7 @@ MPIDI_CH4I_API(int, Recv_init, void *, int, MPI_Datatype, int, int, MPIR_Comm *, + MPIDI_CH4I_API(void, Request_set_completed, MPIR_Request *); + MPIDI_CH4I_API(int, Request_complete, MPIR_Request *); + MPIDI_CH4I_API(int, Request_is_anysource, MPIR_Request *); ++MPIDI_CH4I_API(void, Prequest_free_hook, MPIR_Request *); + MPIDI_CH4I_API(int, Send, const void *, MPI_Aint, MPI_Datatype, int, int, MPIR_Comm *, int, + MPIR_Request **); + MPIDI_CH4I_API(int, Ssend, const void *, MPI_Aint, MPI_Datatype, int, int, MPIR_Comm *, int, +@@ -87,11 +93,12 @@ MPIDI_CH4I_API(int, Rsend_init, const void *, int, MPI_Datatype, int, int, MPIR_ + MPIDI_CH4I_API(int, Startall, int, MPIR_Request *[]); + MPIDI_CH4I_API(int, Accumulate, const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, + MPI_Op, MPIR_Win *); +-MPIDI_CH4I_API(int, Win_create, void *, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, MPIR_Win **); ++MPIDI_CH4I_API_NOINLINE(int, Win_create, void *, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, ++ MPIR_Win **); + MPIDI_CH4I_API(int, Win_fence, int, MPIR_Win *); +-MPIDI_CH4I_API(int, Win_free, MPIR_Win **); ++MPIDI_CH4I_API_NOINLINE(int, Win_free, MPIR_Win **); + MPIDI_CH4I_API(int, Get, void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPIR_Win *); +-MPIDI_CH4I_API(int, Win_get_info, MPIR_Win *, MPIR_Info **); ++MPIDI_CH4I_API_NOINLINE(int, Win_get_info, MPIR_Win *, MPIR_Info **); + MPIDI_CH4I_API(int, Win_lock, int, int, int, MPIR_Win *); + MPIDI_CH4I_API(int, Win_unlock, int, MPIR_Win *); + MPIDI_CH4I_API(int, Win_start, MPIR_Group *, int, MPIR_Win *); +@@ -101,17 +108,17 @@ MPIDI_CH4I_API(int, Win_wait, MPIR_Win *); + MPIDI_CH4I_API(int, Win_test, MPIR_Win *, int *); + MPIDI_CH4I_API(int, Put, const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, + MPIR_Win *); +-MPIDI_CH4I_API(int, Win_set_info, MPIR_Win *, MPIR_Info *); +-MPIDI_CH4I_API(int, Comm_reenable_anysource, MPIR_Comm *, MPIR_Group **); +-MPIDI_CH4I_API(int, Comm_remote_group_failed, MPIR_Comm *, MPIR_Group **); +-MPIDI_CH4I_API(int, Comm_group_failed, MPIR_Comm *, MPIR_Group **); +-MPIDI_CH4I_API(int, Win_attach, MPIR_Win *, void *, MPI_Aint); +-MPIDI_CH4I_API(int, Win_allocate_shared, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, void **, +- MPIR_Win **); ++MPIDI_CH4I_API_NOINLINE(int, Win_set_info, MPIR_Win *, MPIR_Info *); ++MPIDI_CH4I_API_NOINLINE(int, Comm_reenable_anysource, MPIR_Comm *, MPIR_Group **); ++MPIDI_CH4I_API_NOINLINE(int, Comm_remote_group_failed, MPIR_Comm *, MPIR_Group **); ++MPIDI_CH4I_API_NOINLINE(int, Comm_group_failed, MPIR_Comm *, MPIR_Group **); ++MPIDI_CH4I_API_NOINLINE(int, Win_attach, MPIR_Win *, void *, MPI_Aint); ++MPIDI_CH4I_API_NOINLINE(int, Win_allocate_shared, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, void **, ++ MPIR_Win **); + MPIDI_CH4I_API(int, Rput, const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, + MPIR_Win *, MPIR_Request **); + MPIDI_CH4I_API(int, Win_flush_local, int, MPIR_Win *); +-MPIDI_CH4I_API(int, Win_detach, MPIR_Win *, const void *); ++MPIDI_CH4I_API_NOINLINE(int, Win_detach, MPIR_Win *, const void *); + MPIDI_CH4I_API(int, Compare_and_swap, const void *, const void *, void *, MPI_Datatype, int, + MPI_Aint, MPIR_Win *); + MPIDI_CH4I_API(int, Raccumulate, const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, +@@ -121,11 +128,12 @@ MPIDI_CH4I_API(int, Rget_accumulate, const void *, int, MPI_Datatype, void *, in + MPIDI_CH4I_API(int, Fetch_and_op, const void *, void *, MPI_Datatype, int, MPI_Aint, MPI_Op, + MPIR_Win *); + MPIDI_CH4I_API(int, Win_shared_query, MPIR_Win *, int, MPI_Aint *, int *, void *); +-MPIDI_CH4I_API(int, Win_allocate, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, void *, MPIR_Win **); ++MPIDI_CH4I_API_NOINLINE(int, Win_allocate, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, void *, ++ MPIR_Win **); + MPIDI_CH4I_API(int, Win_flush, int, MPIR_Win *); + MPIDI_CH4I_API(int, Win_flush_local_all, MPIR_Win *); + MPIDI_CH4I_API(int, Win_unlock_all, MPIR_Win *); +-MPIDI_CH4I_API(int, Win_create_dynamic, MPIR_Info *, MPIR_Comm *, MPIR_Win **); ++MPIDI_CH4I_API_NOINLINE(int, Win_create_dynamic, MPIR_Info *, MPIR_Comm *, MPIR_Win **); + MPIDI_CH4I_API(int, Rget, void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPIR_Win *, + MPIR_Request **); + MPIDI_CH4I_API(int, Win_sync, MPIR_Win *); +@@ -133,18 +141,22 @@ MPIDI_CH4I_API(int, Win_flush_all, MPIR_Win *); + MPIDI_CH4I_API(int, Get_accumulate, const void *, int, MPI_Datatype, void *, int, MPI_Datatype, int, + MPI_Aint, int, MPI_Datatype, MPI_Op, MPIR_Win *); + MPIDI_CH4I_API(int, Win_lock_all, int, MPIR_Win *); +-MPIDI_CH4I_API(void *, Alloc_mem, size_t, MPIR_Info *); +-MPIDI_CH4I_API(int, Free_mem, void *); +-MPIDI_CH4I_API(int, Get_node_id, MPIR_Comm *, int rank, int *); +-MPIDI_CH4I_API(int, Get_max_node_id, MPIR_Comm *, int *); ++MPIDI_CH4I_API_NOINLINE(void *, Alloc_mem, size_t, MPIR_Info *); ++MPIDI_CH4I_API_NOINLINE(int, Free_mem, void *); ++MPIDI_CH4I_API_NOINLINE(int, Get_node_id, MPIR_Comm *, int rank, int *); ++MPIDI_CH4I_API_NOINLINE(int, Get_max_node_id, MPIR_Comm *, int *); + MPIDI_CH4I_API(int, Request_is_pending_failure, MPIR_Request *); +-MPIDI_CH4I_API(MPI_Aint, Aint_add, MPI_Aint, MPI_Aint); +-MPIDI_CH4I_API(MPI_Aint, Aint_diff, MPI_Aint, MPI_Aint); +-MPIDI_CH4I_API(int, Intercomm_exchange_map, MPIR_Comm *, int, MPIR_Comm *, int, int *, int **, +- int *); +-MPIDI_CH4I_API(int, Create_intercomm_from_lpids, MPIR_Comm *, int, const int[]); +-MPIDI_CH4I_API(int, Comm_create_hook, MPIR_Comm *); +-MPIDI_CH4I_API(int, Comm_free_hook, MPIR_Comm *); ++MPIDI_CH4I_API_NOINLINE(MPI_Aint, Aint_add, MPI_Aint, MPI_Aint); ++MPIDI_CH4I_API_NOINLINE(MPI_Aint, Aint_diff, MPI_Aint, MPI_Aint); ++MPIDI_CH4I_API_NOINLINE(int, Type_commit_hook, MPIR_Datatype *); ++MPIDI_CH4I_API_NOINLINE(int, Type_free_hook, MPIR_Datatype *); ++MPIDI_CH4I_API_NOINLINE(int, Op_commit_hook, MPIR_Op *); ++MPIDI_CH4I_API_NOINLINE(int, Op_free_hook, MPIR_Op *); ++MPIDI_CH4I_API_NOINLINE(int, Intercomm_exchange_map, MPIR_Comm *, int, MPIR_Comm *, int, int *, ++ int **, int *); ++MPIDI_CH4I_API_NOINLINE(int, Create_intercomm_from_lpids, MPIR_Comm *, int, const int[]); ++MPIDI_CH4I_API_NOINLINE(int, Comm_create_hook, MPIR_Comm *); ++MPIDI_CH4I_API_NOINLINE(int, Comm_free_hook, MPIR_Comm *); + MPIDI_CH4I_API(int, Barrier, MPIR_Comm *, MPIR_Errflag_t *); + MPIDI_CH4I_API(int, Bcast, void *, int, MPI_Datatype, int, MPIR_Comm *, MPIR_Errflag_t *); + MPIDI_CH4I_API(int, Allreduce, const void *, void *, int, MPI_Datatype, MPI_Op, MPIR_Comm *, +@@ -238,13 +250,15 @@ int MPID_Abort(struct MPIR_Comm *comm, int mpi_errno, int exit_code, const char + /* This function is not exposed to the upper layers but functions in a way + * similar to the functions above. Other CH4-level functions should call this + * function to query locality. This function will determine whether to call the +- * netmod or CH4U locality functions. */ +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4_rank_is_local(int rank, MPIR_Comm * comm); ++ * netmod or MPIDIU locality functions. */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_rank_is_local(int rank, MPIR_Comm * comm); + MPL_STATIC_INLINE_PREFIX int MPIDI_av_is_local(MPIDI_av_entry_t * av); + + /* Include netmod prototypes */ + #include ++#ifndef MPIDI_CH4_DIRECT_NETMOD + #include "shm.h" ++#endif + + /* Declare request functions here so netmods can refer to + them in the NETMOD_INLINE mode */ +@@ -254,11 +268,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_av_is_local(MPIDI_av_entry_t * av); + /* Prototypes are split from impl to avoid */ + /* circular dependencies */ + #include ++#ifndef MPIDI_CH4_DIRECT_NETMOD + #include "shm_impl.h" ++#endif + + #include "ch4i_workq.h" + +-#include "ch4_init.h" + #include "ch4_probe.h" + #include "ch4_send.h" + #include "ch4_startall.h" +@@ -267,7 +282,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_av_is_local(MPIDI_av_entry_t * av); + #include "ch4_win.h" + #include "ch4_rma.h" + #include "ch4_progress.h" +-#include "ch4_spawn.h" + #include "ch4_proc.h" + #include "ch4_coll.h" + +--- a/src/mpid/ch4/include/mpidch4r.h ++++ b/src/mpid/ch4/include/mpidch4r.h +@@ -15,14 +15,18 @@ + #include "ch4r_recvq.h" + #include "ch4r_proc.h" + #include "ch4r_init.h" ++#include "ch4r_callbacks.h" + #include "ch4r_comm.h" + #include "ch4r_probe.h" ++#include "ch4r_proc.h" ++#include "ch4r_request.h" ++#include "ch4r_rma_origin_callbacks.h" ++#include "ch4r_rma_target_callbacks.h" + #include "mpidig_recv.h" + #include "ch4r_rma.h" + #include "mpidig_send.h" + #include "ch4r_win.h" + #include "ch4r_buf.h" +-#include "ch4r_request.h" + #include "mpidig_startall.h" + + #endif /* MPIDCH4R_H_INCLUDED */ +--- a/src/mpid/ch4/include/mpidimpl.h ++++ b/src/mpid/ch4/include/mpidimpl.h +@@ -18,6 +18,14 @@ + #include + #endif + ++#ifdef USE_PMIX_API ++#include ++#elif defined(USE_PMI2_API) ++#include ++#else ++#include ++#endif ++ + #define MPICH_SKIP_MPICXX + #include "mpiimpl.h" + +--- a/src/mpid/ch4/include/mpidpost.h ++++ b/src/mpid/ch4/include/mpidpost.h +@@ -19,9 +19,9 @@ MPL_STATIC_INLINE_PREFIX void MPID_Request_create_hook(MPIR_Request * req) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_REQUEST_CREATE_HOOK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_REQUEST_CREATE_HOOK); + +- MPIDI_CH4U_REQUEST(req, req) = NULL; ++ MPIDIG_REQUEST(req, req) = NULL; + #ifndef MPIDI_CH4_DIRECT_NETMOD +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req) = NULL; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(req) = NULL; + #endif + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_REQUEST_CREATE_HOOK); +@@ -32,11 +32,11 @@ MPL_STATIC_INLINE_PREFIX void MPID_Request_free_hook(MPIR_Request * req) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_REQUEST_FREE_HOOK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_REQUEST_FREE_HOOK); + +- OPA_incr_int(&MPIDI_CH4_Global.progress_count); ++ OPA_incr_int(&MPIDI_global.progress_count); + + if (req->kind == MPIR_REQUEST_KIND__PREQUEST_RECV && +- NULL != MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req)) +- MPIR_Request_free(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req)); ++ NULL != MPIDI_REQUEST_ANYSOURCE_PARTNER(req)) ++ MPIR_Request_free(MPIDI_REQUEST_ANYSOURCE_PARTNER(req)); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_REQUEST_FREE_HOOK); + return; +--- a/src/mpid/ch4/include/mpidpre.h ++++ b/src/mpid/ch4/include/mpidpre.h +@@ -15,7 +15,6 @@ + #include + #endif + +-#include "mpir_dataloop.h" + #ifdef HAVE_LIBHCOLL + #include "hcoll/api/hcoll_dte.h" + #endif +@@ -24,7 +23,9 @@ + #include "mpid_sched.h" + #include "mpid_timers_fallback.h" + #include "netmodpre.h" ++#ifndef MPIDI_CH4_DIRECT_NETMOD + #include "shmpre.h" ++#endif + #include "uthash.h" + #include "ch4_coll_params.h" + #include "ch4i_workq_types.h" +@@ -36,7 +37,7 @@ + #elif defined MPIDI_CH4_USE_MT_TRYLOCK + #define MPIDI_CH4_MT_MODEL MPIDI_CH4_MT_TRYLOCK + #elif defined MPIDI_CH4_USE_MT_RUNTIME +-#define MPIDI_CH4_MT_MODEL MPIDI_CH4_Global.settings.mt_model ++#define MPIDI_CH4_MT_MODEL MPIDI_global.settings.mt_model + #else + #error "Unknown MT model or MT model not defined" + #endif +@@ -54,9 +55,6 @@ typedef struct { + int progress_count; + } MPID_Progress_state; + +-#define CH4_COMPILE_TIME_ASSERT(expr_) \ +- do { switch(0) { case 0: case (expr_): default: break; } } while (0) +- + typedef enum { + MPIDI_PTYPE_RECV, + MPIDI_PTYPE_SEND, +@@ -64,23 +62,24 @@ typedef enum { + MPIDI_PTYPE_SSEND + } MPIDI_ptype; + +-#define MPIDI_CH4U_REQ_BUSY (0x1) +-#define MPIDI_CH4U_REQ_PEER_SSEND (0x1 << 1) +-#define MPIDI_CH4U_REQ_UNEXPECTED (0x1 << 2) +-#define MPIDI_CH4U_REQ_UNEXP_DQUED (0x1 << 3) +-#define MPIDI_CH4U_REQ_UNEXP_CLAIMED (0x1 << 4) +-#define MPIDI_CH4U_REQ_RCV_NON_CONTIG (0x1 << 5) +-#define MPIDI_CH4U_REQ_MATCHED (0x1 << 6) +-#define MPIDI_CH4U_REQ_LONG_RTS (0x1 << 7) ++#define MPIDIG_REQ_BUSY (0x1) ++#define MPIDIG_REQ_PEER_SSEND (0x1 << 1) ++#define MPIDIG_REQ_UNEXPECTED (0x1 << 2) ++#define MPIDIG_REQ_UNEXP_DQUED (0x1 << 3) ++#define MPIDIG_REQ_UNEXP_CLAIMED (0x1 << 4) ++#define MPIDIG_REQ_RCV_NON_CONTIG (0x1 << 5) ++#define MPIDIG_REQ_MATCHED (0x1 << 6) ++#define MPIDIG_REQ_LONG_RTS (0x1 << 7) ++#define MPIDIG_REQ_IN_PROGRESS (0x1 << 8) + + #define MPIDI_PARENT_PORT_KVSKEY "PARENT_ROOT_PORT_NAME" + #define MPIDI_MAX_KVS_VALUE_LEN 4096 + +-typedef struct MPIDI_CH4U_sreq_t { ++typedef struct MPIDIG_sreq_t { + /* persistent send fields */ +-} MPIDI_CH4U_sreq_t; ++} MPIDIG_sreq_t; + +-typedef struct MPIDI_CH4U_lreq_t { ++typedef struct MPIDIG_lreq_t { + /* Long send fields */ + const void *src_buf; + MPI_Count count; +@@ -88,9 +87,9 @@ typedef struct MPIDI_CH4U_lreq_t { + int rank; + int tag; + MPIR_Context_id_t context_id; +-} MPIDI_CH4U_lreq_t; ++} MPIDIG_lreq_t; + +-typedef struct MPIDI_CH4U_rreq_t { ++typedef struct MPIDIG_rreq_t { + /* mrecv fields */ + void *mrcv_buffer; + uint64_t mrcv_count; +@@ -101,10 +100,10 @@ typedef struct MPIDI_CH4U_rreq_t { + uint64_t match_req; + uint64_t request; + +- struct MPIDI_CH4U_rreq_t *prev, *next; +-} MPIDI_CH4U_rreq_t; ++ struct MPIDIG_rreq_t *prev, *next; ++} MPIDIG_rreq_t; + +-typedef struct MPIDI_CH4U_put_req_t { ++typedef struct MPIDIG_put_req_t { + MPIR_Win *win_ptr; + uint64_t preq_ptr; + void *dt_iov; +@@ -112,9 +111,10 @@ typedef struct MPIDI_CH4U_put_req_t { + int origin_count; + MPI_Datatype origin_datatype; + int n_iov; +-} MPIDI_CH4U_put_req_t; ++ void *target_addr; ++} MPIDIG_put_req_t; + +-typedef struct MPIDI_CH4U_get_req_t { ++typedef struct MPIDIG_get_req_t { + MPIR_Win *win_ptr; + uint64_t greq_ptr; + uint64_t addr; +@@ -122,18 +122,18 @@ typedef struct MPIDI_CH4U_get_req_t { + int count; + int n_iov; + void *dt_iov; +-} MPIDI_CH4U_get_req_t; ++} MPIDIG_get_req_t; + +-typedef struct MPIDI_CH4U_cswap_req_t { ++typedef struct MPIDIG_cswap_req_t { + MPIR_Win *win_ptr; + uint64_t creq_ptr; + uint64_t addr; + MPI_Datatype datatype; + void *data; + void *result_addr; +-} MPIDI_CH4U_cswap_req_t; ++} MPIDIG_cswap_req_t; + +-typedef struct MPIDI_CH4U_acc_req_t { ++typedef struct MPIDIG_acc_req_t { + MPIR_Win *win_ptr; + uint64_t req_ptr; + MPI_Datatype origin_datatype; +@@ -150,17 +150,17 @@ typedef struct MPIDI_CH4U_acc_req_t { + int result_count; + void *origin_addr; + MPI_Datatype result_datatype; +-} MPIDI_CH4U_acc_req_t; ++} MPIDIG_acc_req_t; + +-typedef struct MPIDI_CH4U_req_ext_t { ++typedef struct MPIDIG_req_ext_t { + union { +- MPIDI_CH4U_sreq_t sreq; +- MPIDI_CH4U_lreq_t lreq; +- MPIDI_CH4U_rreq_t rreq; +- MPIDI_CH4U_put_req_t preq; +- MPIDI_CH4U_get_req_t greq; +- MPIDI_CH4U_cswap_req_t creq; +- MPIDI_CH4U_acc_req_t areq; ++ MPIDIG_sreq_t sreq; ++ MPIDIG_lreq_t lreq; ++ MPIDIG_rreq_t rreq; ++ MPIDIG_put_req_t preq; ++ MPIDIG_get_req_t greq; ++ MPIDIG_cswap_req_t creq; ++ MPIDIG_acc_req_t areq; + }; + + struct iovec *iov; +@@ -168,14 +168,18 @@ typedef struct MPIDI_CH4U_req_ext_t { + uint64_t seq_no; + uint64_t request; + uint64_t status; +- struct MPIDI_CH4U_req_ext_t *next, *prev; ++ struct MPIDIG_req_ext_t *next, *prev; + +-} MPIDI_CH4U_req_ext_t; ++} MPIDIG_req_ext_t; + +-typedef struct MPIDI_CH4U_req_t { ++typedef struct MPIDIG_req_t { + union { + MPIDI_NM_REQUEST_AM_DECL} netmod_am; +- MPIDI_CH4U_req_ext_t *req; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ union { ++ MPIDI_SHM_REQUEST_AM_DECL} shm_am; ++#endif ++ MPIDIG_req_ext_t *req; + MPIDI_ptype p_type; /* persistent request type */ + void *buffer; + uint64_t count; +@@ -183,29 +187,29 @@ typedef struct MPIDI_CH4U_req_t { + int tag; + MPIR_Context_id_t context_id; + MPI_Datatype datatype; +-} MPIDI_CH4U_req_t; ++} MPIDIG_req_t; + + typedef struct { + #ifndef MPIDI_CH4_DIRECT_NETMOD + int is_local; +-#endif + /* Anysource handling. Netmod and shm specific requests are cross + * referenced. This must be present all of the time to avoid lots of extra + * ifdefs in the code. */ +-#ifndef MPIDI_CH4_DIRECT_NETMOD + struct MPIR_Request *anysource_partner_request; + #endif + + union { +- /* The first fields are used by the CH4U apis */ +- MPIDI_CH4U_req_t am; ++ /* The first fields are used by the MPIDIG apis */ ++ MPIDIG_req_t am; + + /* Used by the netmod direct apis */ + union { + MPIDI_NM_REQUEST_DECL} netmod; + ++#ifndef MPIDI_CH4_DIRECT_NETMOD + union { + MPIDI_SHM_REQUEST_DECL} shm; ++#endif + + #ifdef MPIDI_CH4_USE_WORK_QUEUES + MPIDI_workq_elemt_t command; +@@ -213,65 +217,67 @@ typedef struct { + } ch4; + } MPIDI_Devreq_t; + #define MPIDI_REQUEST_HDR_SIZE offsetof(struct MPIR_Request, dev.ch4.netmod) +-#define MPIDI_CH4I_REQUEST(req,field) (((req)->dev).field) +-#define MPIDI_CH4U_REQUEST(req,field) (((req)->dev.ch4.am).field) ++#define MPIDI_REQUEST(req,field) (((req)->dev).field) ++#define MPIDIG_REQUEST(req,field) (((req)->dev.ch4.am).field) ++#define MPIDIG_REQUEST_IN_PROGRESS(r) ((r)->dev.ch4.am.req->status & MPIDIG_REQ_IN_PROGRESS) + + #ifndef MPIDI_CH4_DIRECT_NETMOD +-#define MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req) (((req)->dev).anysource_partner_request) ++#define MPIDI_REQUEST_ANYSOURCE_PARTNER(req) (((req)->dev).anysource_partner_request) + #else +-#define MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req) NULL ++#define MPIDI_REQUEST_ANYSOURCE_PARTNER(req) NULL + #endif + + MPL_STATIC_INLINE_PREFIX void MPID_Request_create_hook(struct MPIR_Request *req); + MPL_STATIC_INLINE_PREFIX void MPID_Request_free_hook(struct MPIR_Request *req); + MPL_STATIC_INLINE_PREFIX void MPID_Request_destroy_hook(struct MPIR_Request *req); + +-typedef struct MPIDI_CH4U_win_shared_info { ++typedef struct MPIDIG_win_shared_info { + uint32_t disp_unit; + size_t size; + void *shm_base_addr; +-} MPIDI_CH4U_win_shared_info_t; ++} MPIDIG_win_shared_info_t; + +-#define MPIDI_CH4I_ACCU_ORDER_RAR (1) +-#define MPIDI_CH4I_ACCU_ORDER_RAW (1 << 1) +-#define MPIDI_CH4I_ACCU_ORDER_WAR (1 << 2) +-#define MPIDI_CH4I_ACCU_ORDER_WAW (1 << 3) ++#define MPIDIG_ACCU_ORDER_RAR (1) ++#define MPIDIG_ACCU_ORDER_RAW (1 << 1) ++#define MPIDIG_ACCU_ORDER_WAR (1 << 2) ++#define MPIDIG_ACCU_ORDER_WAW (1 << 3) + + typedef enum { +- MPIDI_CH4I_ACCU_SAME_OP, +- MPIDI_CH4I_ACCU_SAME_OP_NO_OP +-} MPIDI_CH4U_win_info_accumulate_ops; ++ MPIDIG_ACCU_SAME_OP, ++ MPIDIG_ACCU_SAME_OP_NO_OP ++} MPIDIG_win_info_accumulate_ops; + + typedef enum { +- MPIDI_CH4I_ACCU_MAX_SHIFT = 0, /* 1<<0 */ +- MPIDI_CH4I_ACCU_MIN_SHIFT = 1, +- MPIDI_CH4I_ACCU_SUM_SHIFT = 2, +- MPIDI_CH4I_ACCU_PROD_SHIFT = 3, +- MPIDI_CH4I_ACCU_MAXLOC_SHIFT = 4, +- MPIDI_CH4I_ACCU_MINLOC_SHIFT = 5, +- MPIDI_CH4I_ACCU_BAND_SHIFT = 6, +- MPIDI_CH4I_ACCU_BOR_SHIFT = 7, +- MPIDI_CH4I_ACCU_BXOR_SHIFT = 8, +- MPIDI_CH4I_ACCU_LAND_SHIFT = 9, +- MPIDI_CH4I_ACCU_LOR_SHIFT = 10, +- MPIDI_CH4I_ACCU_LXOR_SHIFT = 11, +- MPIDI_CH4I_ACCU_REPLACE_SHIFT = 12, +- MPIDI_CH4I_ACCU_NO_OP_SHIFT = 13, /* atomic get */ +- MPIDI_CH4I_ACCU_CSWAP_SHIFT = 14, +- MPIDI_CH4I_ACCU_OP_SHIFT_LAST +-} MPIDI_CH4U_win_info_accu_op_shift_t; +- +-typedef struct MPIDI_CH4U_win_info_args_t { ++ MPIDIG_ACCU_OP_SHIFT_FIRST = 0, ++ MPIDIG_ACCU_MAX_SHIFT = 0, /* 1<<0 */ ++ MPIDIG_ACCU_MIN_SHIFT = 1, ++ MPIDIG_ACCU_SUM_SHIFT = 2, ++ MPIDIG_ACCU_PROD_SHIFT = 3, ++ MPIDIG_ACCU_MAXLOC_SHIFT = 4, ++ MPIDIG_ACCU_MINLOC_SHIFT = 5, ++ MPIDIG_ACCU_BAND_SHIFT = 6, ++ MPIDIG_ACCU_BOR_SHIFT = 7, ++ MPIDIG_ACCU_BXOR_SHIFT = 8, ++ MPIDIG_ACCU_LAND_SHIFT = 9, ++ MPIDIG_ACCU_LOR_SHIFT = 10, ++ MPIDIG_ACCU_LXOR_SHIFT = 11, ++ MPIDIG_ACCU_REPLACE_SHIFT = 12, ++ MPIDIG_ACCU_NO_OP_SHIFT = 13, /* atomic get */ ++ MPIDIG_ACCU_CSWAP_SHIFT = 14, ++ MPIDIG_ACCU_OP_SHIFT_LAST ++} MPIDIG_win_info_accu_op_shift_t; ++ ++typedef struct MPIDIG_win_info_args_t { + int no_locks; + int same_size; + int same_disp_unit; + int accumulate_ordering; + int alloc_shared_noncontig; +- MPIDI_CH4U_win_info_accumulate_ops accumulate_ops; ++ MPIDIG_win_info_accumulate_ops accumulate_ops; + + /* hints to tradeoff atomicity support */ + uint32_t which_accumulate_ops; /* Arbitrary combination of {1<dev.ch4u).field) +-#define MPIDI_CH4U_WINFO(win,rank) (MPIDI_CH4U_win_info_t*) &(MPIDI_CH4U_WIN(win, info_table)[rank]) ++#define MPIDIG_WIN(win,field) (((win)->dev.am).field) + + typedef unsigned MPIDI_locality_t; + +-typedef struct MPIDI_CH4U_comm_t { +- MPIDI_CH4U_rreq_t *posted_list; +- MPIDI_CH4U_rreq_t *unexp_list; ++typedef struct MPIDIG_comm_t { ++ MPIDIG_rreq_t *posted_list; ++ MPIDIG_rreq_t *unexp_list; + uint32_t window_instance; +-} MPIDI_CH4U_comm_t; ++} MPIDIG_comm_t; + + #define MPIDI_CALC_STRIDE(rank, stride, blocksize, offset) \ + ((rank) / (blocksize) * ((stride) - (blocksize)) + (rank) + (offset)) +@@ -472,21 +479,23 @@ typedef struct { + + typedef struct MPIDI_Devcomm_t { + struct { +- /* The first fields are used by the CH4U apis */ +- MPIDI_CH4U_comm_t ch4u; ++ /* The first fields are used by the AM(MPIDIG) apis */ ++ MPIDIG_comm_t am; + + /* Used by the netmod direct apis */ + union { + MPIDI_NM_COMM_DECL} netmod; + ++#ifndef MPIDI_CH4_DIRECT_NETMOD + union { + MPIDI_SHM_COMM_DECL} shm; ++#endif + + MPIDI_rank_map_t map; + MPIDI_rank_map_t local_map; + } ch4; + } MPIDI_Devcomm_t; +-#define MPIDI_CH4U_COMM(comm,field) ((comm)->dev.ch4.ch4u).field ++#define MPIDIG_COMM(comm,field) ((comm)->dev.ch4.am).field + #define MPIDI_COMM(comm,field) ((comm)->dev.ch4).field + + typedef struct { +@@ -519,7 +528,7 @@ extern MPIDI_av_table_t *MPIDI_av_table0; + #define MPIDIU_get_av_table(avtid) (MPIDI_av_table[(avtid)]) + #define MPIDIU_get_av(avtid, lpid) (MPIDI_av_table[(avtid)]->table[(lpid)]) + +-#define MPIDIU_get_node_map(avtid) (MPIDI_CH4_Global.node_map[(avtid)]) ++#define MPIDIU_get_node_map(avtid) (MPIDI_global.node_map[(avtid)]) + + #define MPID_Progress_register_hook(fn_, id_) MPID_Progress_register(fn_, id_) + #define MPID_Progress_deregister_hook(id_) MPID_Progress_deregister(id_) +@@ -527,17 +536,6 @@ extern MPIDI_av_table_t *MPIDI_av_table0; + #define MPID_Progress_deactivate_hook(id_) MPID_Progress_deactivate(id_) + + #define HAVE_DEV_COMM_HOOK +-#define MPID_Comm_create_hook MPIDI_Comm_create_hook +-#define MPID_Comm_free_hook MPIDI_Comm_free_hook +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_Type_commit_hook(MPIR_Datatype * type); +-MPL_STATIC_INLINE_PREFIX int MPIDI_Type_free_hook(MPIR_Datatype * type); +- +-#define MPID_Type_commit_hook MPIDI_Type_commit_hook +-#define MPID_Type_free_hook MPIDI_Type_free_hook +- +-#define MPID_Op_commit_hook MPIDI_Op_commit_hook +-#define MPID_Op_free_hook MPIDI_Op_free_hook + + /* + * operation for (avtid, lpid) to/from "lupid" +--- a/src/mpid/ch4/include/shmpre.h ++++ b/src/mpid/ch4/include/shmpre.h +@@ -15,6 +15,7 @@ + #include "../shm/src/shm_pre.h" + /* *INDENT-ON* */ + ++#define MPIDI_SHM_REQUEST_AM_DECL MPIDI_POSIX_am_request_t posix; + #define MPIDI_SHM_REQUEST_DECL MPIDI_POSIX_request_t posix; + #define MPIDI_SHM_COMM_DECL MPIDI_POSIX_comm_t posix; + #define MPIDI_SHM_WIN_DECL MPIDI_POSIX_win_t posix; +--- a/src/mpid/ch4/netmod/Makefile.mk ++++ b/src/mpid/ch4/netmod/Makefile.mk +@@ -16,7 +16,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/ch4/netmod/include + noinst_HEADERS += src/mpid/ch4/netmod/include/netmod.h + noinst_HEADERS += src/mpid/ch4/netmod/include/netmod_impl.h + ++include $(top_srcdir)/src/mpid/ch4/netmod/src/Makefile.mk + include $(top_srcdir)/src/mpid/ch4/netmod/ofi/Makefile.mk + include $(top_srcdir)/src/mpid/ch4/netmod/ucx/Makefile.mk +-include $(top_srcdir)/src/mpid/ch4/netmod/portals4/Makefile.mk + include $(top_srcdir)/src/mpid/ch4/netmod/stubnm/Makefile.mk +--- a/src/mpid/ch4/netmod/include/netmod.h ++++ b/src/mpid/ch4/netmod/include/netmod.h +@@ -18,10 +18,10 @@ + + typedef int (*MPIDI_NM_mpi_init_t) (int rank, int size, int appnum, int *tag_bits, + MPIR_Comm * comm_world, MPIR_Comm * comm_self, int spawned, +- int *n_vnis_provided); ++ int *n_vcis_provided); + typedef int (*MPIDI_NM_mpi_finalize_t) (void); +-typedef int (*MPIDI_NM_get_vni_attr_t) (int vni); +-typedef int (*MPIDI_NM_progress_t) (int vni, int blocking); ++typedef int (*MPIDI_NM_get_vci_attr_t) (int vci); ++typedef int (*MPIDI_NM_progress_t) (int vci, int blocking); + typedef int (*MPIDI_NM_mpi_comm_connect_t) (const char *port_name, MPIR_Info * info, int root, + int timeout, MPIR_Comm * comm, + MPIR_Comm ** newcomm_ptr); +@@ -69,6 +69,7 @@ typedef int (*MPIDI_NM_rma_target_cmpl_hook_t) (int rank, MPIR_Win * win); + typedef int (*MPIDI_NM_rma_target_local_cmpl_hook_t) (int rank, MPIR_Win * win); + typedef void (*MPIDI_NM_am_request_init_t) (MPIR_Request * req); + typedef void (*MPIDI_NM_am_request_finalize_t) (MPIR_Request * req); ++typedef void (*MPIDI_NM_prequest_free_hook_t) (MPIR_Request * req); + typedef int (*MPIDI_NM_mpi_send_t) (const void *buf, MPI_Aint count, MPI_Datatype datatype, + int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * addr, MPIR_Request ** request); +@@ -474,7 +475,7 @@ typedef int (*MPIDI_NM_mpi_op_free_hook_t) (MPIR_Op * op_p); + typedef struct MPIDI_NM_funcs { + MPIDI_NM_mpi_init_t mpi_init; + MPIDI_NM_mpi_finalize_t mpi_finalize; +- MPIDI_NM_get_vni_attr_t get_vni_attr; ++ MPIDI_NM_get_vci_attr_t get_vci_attr; + MPIDI_NM_progress_t progress; + MPIDI_NM_mpi_comm_connect_t mpi_comm_connect; + MPIDI_NM_mpi_comm_disconnect_t mpi_comm_disconnect; +@@ -504,6 +505,7 @@ typedef struct MPIDI_NM_funcs { + /* Request allocation routines */ + MPIDI_NM_am_request_init_t am_request_init; + MPIDI_NM_am_request_finalize_t am_request_finalize; ++ MPIDI_NM_prequest_free_hook_t prequest_free_hook; + /* Active Message Routines */ + MPIDI_NM_am_send_hdr_t am_send_hdr; + MPIDI_NM_am_isend_t am_isend; +@@ -653,27 +655,18 @@ extern MPIDI_NM_native_funcs_t *MPIDI_NM_native_func; + extern int MPIDI_num_netmods; + extern char MPIDI_NM_strings[][MPIDI_MAX_NETMOD_STRING_LEN]; + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, +- MPIR_Comm * comm_world, MPIR_Comm * comm_self, +- int spawned, int *n_vnis_provided) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_finalize_hook(void) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_get_vni_attr(int vni) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(int vni, int blocking) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_connect(const char *port_name, MPIR_Info * info, +- int root, int timeout, +- MPIR_Comm * comm, MPIR_Comm ** +- newcomm_ptr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_disconnect(MPIR_Comm * +- comm_ptr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_open_port(MPIR_Info * info_ptr, +- char *port_name) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_close_port(const char *port_name) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_accept(const char *port_name, MPIR_Info * info, +- int root, MPIR_Comm * comm, +- MPIR_Comm ** +- newcomm_ptr) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, MPIR_Comm * comm_world, ++ MPIR_Comm * comm_self, int spawned, int *n_vcis_provided); ++int MPIDI_NM_mpi_finalize_hook(void); ++int MPIDI_NM_get_vci_attr(int vci); ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(int vci, int blocking) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr); ++int MPIDI_NM_mpi_comm_disconnect(MPIR_Comm * comm_ptr); ++int MPIDI_NM_mpi_open_port(MPIR_Info * info_ptr, char *port_name); ++int MPIDI_NM_mpi_close_port(const char *port_name); ++int MPIDI_NM_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id, + const void *am_hdr, + size_t am_hdr_sz) MPL_STATIC_INLINE_SUFFIX; +@@ -700,31 +693,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request * req) MPL_STATIC_INL + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx, + int *lpid_ptr, + bool is_remote) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_upids_to_lupids(int size, size_t * remote_upid_size, +- char *remote_upids, +- int **remote_lupids) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, +- const int lpids[]) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_create_hook(MPIR_Comm * +- comm) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_free_hook(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_hook(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_hook(MPIR_Win * +- win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_shared_hook(MPIR_Win * +- win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_dynamic_hook(MPIR_Win * +- win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_attach_hook(MPIR_Win * win, void *base, +- MPI_Aint size) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_detach_hook(MPIR_Win * win, +- const void *base) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_free_hook(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids); ++int MPIDI_NM_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids); ++int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]); ++int MPIDI_NM_mpi_comm_create_hook(MPIR_Comm * comm); ++int MPIDI_NM_mpi_comm_free_hook(MPIR_Comm * comm); ++int MPIDI_NM_mpi_win_create_hook(MPIR_Win * win); ++int MPIDI_NM_mpi_win_allocate_hook(MPIR_Win * win); ++int MPIDI_NM_mpi_win_allocate_shared_hook(MPIR_Win * win); ++int MPIDI_NM_mpi_win_create_dynamic_hook(MPIR_Win * win); ++int MPIDI_NM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_NM_mpi_win_detach_hook(MPIR_Win * win, const void *base); ++int MPIDI_NM_mpi_win_free_hook(MPIR_Win * win); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_cmpl_hook(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_local_cmpl_hook(MPIR_Win * + win) MPL_STATIC_INLINE_SUFFIX; +@@ -736,6 +717,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_target_local_cmpl_hook(int rank, + MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_init(MPIR_Request * req) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_finalize(MPIR_Request * + req) MPL_STATIC_INLINE_SUFFIX; ++MPL_STATIC_INLINE_PREFIX void MPIDI_NM_prequest_free_hook(MPIR_Request * ++ req) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -801,9 +784,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_irecv(void *buf, MPI_Aint count, MPI_D + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_imrecv(void *buf, MPI_Aint count, MPI_Datatype datatype, + MPIR_Request * message) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX void *MPIDI_NM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_free_mem(void *ptr) MPL_STATIC_INLINE_SUFFIX; ++void *MPIDI_NM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDI_NM_mpi_free_mem(void *ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_improbe(int source, int tag, MPIR_Comm * comm, + int context_offset, MPIDI_av_entry_t * addr, + int *flag, MPIR_Request ** message, +@@ -812,8 +794,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iprobe(int source, int tag, MPIR_Comm + int context_offset, MPIDI_av_entry_t * addr, + int *flag, + MPI_Status * status) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_set_info(MPIR_Win * win, +- MPIR_Info * info) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_shared_query(MPIR_Win * win, int rank, + MPI_Aint * size, int *disp_unit, + void *baseptr) MPL_STATIC_INLINE_SUFFIX; +@@ -837,20 +818,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_lock(int lock_type, int rank, int + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_unlock(int rank, MPIR_Win * win, + MPIDI_av_entry_t * + addr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_get_info(MPIR_Win * win, +- MPIR_Info ** +- info_p_p) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_get(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPIR_Win * win, + MPIDI_av_entry_t * addr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_free(MPIR_Win ** win_ptr) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_win_free(MPIR_Win ** win_ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_fence(int assert, + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -858,13 +836,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_accumulate(const void *origin_addr, in + MPIR_Win * win, + MPIDI_av_entry_t * + addr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_attach(MPIR_Win * win, void *base, +- MPI_Aint size) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, void **base_ptr, +- MPIR_Win ** +- win_ptr) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_NM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rput(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -874,8 +848,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rput(const void *origin_addr, int orig + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush_local(int rank, MPIR_Win * win, + MPIDI_av_entry_t * + addr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_detach(MPIR_Win * win, +- const void *base) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_win_detach(MPIR_Win * win, const void *base); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, MPI_Datatype datatype, +@@ -906,19 +879,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, + MPIR_Win * win, + MPIDI_av_entry_t * + addr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate(MPI_Aint size, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm, +- void *baseptr, +- MPIR_Win ** win) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush(int rank, MPIR_Win * win, + MPIDI_av_entry_t * + addr) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush_local_all(MPIR_Win * + win) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_unlock_all(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** +- win) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win); + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rget(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -1341,11 +1310,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoallw_sched(const void * + MPIR_Comm * comm, + MPIR_Sched_t s) + MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_type_commit_hook(MPIR_Datatype * +- datatype_p) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_type_free_hook(MPIR_Datatype * +- datatype_p) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_op_commit_hook(MPIR_Op * op_p) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_NM_mpi_type_commit_hook(MPIR_Datatype * datatype_p); ++int MPIDI_NM_mpi_type_free_hook(MPIR_Datatype * datatype_p); ++int MPIDI_NM_mpi_op_commit_hook(MPIR_Op * op_p); ++int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p); + + #endif /* NETMOD_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/include/netmod_impl.h ++++ b/src/mpid/ch4/netmod/include/netmod_impl.h +@@ -16,130 +16,19 @@ + #ifndef NETMOD_INLINE + #ifndef NETMOD_DISABLE_INLINES + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, +- MPIR_Comm * comm_world, MPIR_Comm * comm_self, +- int spawned, int *n_vnis_provided) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INIT_HOOK); +- +- ret = MPIDI_NM_func->mpi_init(rank, size, appnum, tag_bits, comm_world, comm_self, spawned, +- n_vnis_provided); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INIT_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_finalize_hook(void) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_FINALIZE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_FINALIZE_HOOK); +- +- ret = MPIDI_NM_func->mpi_finalize(); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_FINALIZE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_get_vni_attr(int vni) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_QUERY_VNI); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_QUERY_VNI); +- +- ret = MPIDI_NM_func->get_vni_attr(vni); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_QUERY_VNI); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(int vni, int blocking) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(int vci, int blocking) + { + int ret; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_PROGRESS); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_PROGRESS); + +- ret = MPIDI_NM_func->progress(vni, blocking); ++ ret = MPIDI_NM_func->progress(vci, blocking); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_PROGRESS); + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_connect(const char *port_name, MPIR_Info * info, +- int root, int timeout, MPIR_Comm * comm, +- MPIR_Comm ** newcomm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); +- +- ret = MPIDI_NM_func->mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); +- +- ret = MPIDI_NM_func->mpi_comm_disconnect(comm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); +- +- ret = MPIDI_NM_func->mpi_open_port(info_ptr, port_name); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_close_port(const char *port_name) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); +- +- ret = MPIDI_NM_func->mpi_close_port(port_name); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_accept(const char *port_name, MPIR_Info * info, +- int root, MPIR_Comm * comm, +- MPIR_Comm ** newcomm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); +- +- ret = MPIDI_NM_func->mpi_comm_accept(port_name, info, root, comm, newcomm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id, + const void *am_hdr, size_t am_hdr_sz) + { +@@ -261,165 +150,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int id + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_GET_LOCAL_UPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_GET_LOCAL_UPIDS); +- +- ret = MPIDI_NM_func->get_local_upids(comm, local_upid_size, local_upids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_GET_LOCAL_UPIDS); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_upids_to_lupids(int size, size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_UPIDS_TO_LUPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_UPIDS_TO_LUPIDS); +- +- ret = MPIDI_NM_func->upids_to_lupids(size, remote_upid_size, remote_upids, remote_lupids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_UPIDS_TO_LUPIDS); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_CREATE_INTERCOMM_FROM_LPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_CREATE_INTERCOMM_FROM_LPIDS); +- +- ret = MPIDI_NM_func->create_intercomm_from_lpids(newcomm_ptr, size, lpids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_CREATE_INTERCOMM_FROM_LPIDS); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- +- ret = MPIDI_NM_func->mpi_comm_create_hook(comm); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- +- ret = MPIDI_NM_func->mpi_comm_free_hook(comm); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); +- +- ret = MPIDI_NM_func->mpi_win_create_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); +- +- ret = MPIDI_NM_func->mpi_win_allocate_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_shared_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- +- ret = MPIDI_NM_func->mpi_win_allocate_shared_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_dynamic_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- +- ret = MPIDI_NM_func->mpi_win_create_dynamic_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); +- +- ret = MPIDI_NM_func->mpi_win_attach_hook(win, base, size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_detach_hook(MPIR_Win * win, const void *base) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); +- +- ret = MPIDI_NM_func->mpi_win_detach_hook(win, base); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_free_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); +- +- ret = MPIDI_NM_func->mpi_win_free_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_cmpl_hook(MPIR_Win * win) + { + int ret; +@@ -492,6 +222,16 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_finalize(MPIR_Request * req) + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_AM_REQUEST_FINALIZE); + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_NM_prequest_free_hook(MPIR_Request * req) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_PREQUEST_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_PREQUEST_FREE_HOOK); ++ ++ MPIDI_NM_func->prequest_free_hook(req); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_PREQUEST_FREE_HOOK); ++} ++ + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -742,32 +482,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX void *MPIDI_NM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- void *ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLOC_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ALLOC_MEM); +- +- ret = MPIDI_NM_native_func->mpi_alloc_mem(size, info_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ALLOC_MEM); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_free_mem(void *ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_FREE_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_FREE_MEM); +- +- ret = MPIDI_NM_native_func->mpi_free_mem(ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_FREE_MEM); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_improbe(int source, int tag, MPIR_Comm * comm, + int context_offset, MPIDI_av_entry_t * addr, + int *flag, MPIR_Request ** message, +@@ -800,19 +514,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iprobe(int source, int tag, MPIR_Comm + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); +- +- ret = MPIDI_NM_native_func->mpi_win_set_info(win, info); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_shared_query(MPIR_Win * win, int rank, + MPI_Aint * size, int *disp_unit, + void *baseptr) +@@ -939,19 +640,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_unlock(int rank, MPIR_Win * win, + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); +- +- ret = MPIDI_NM_native_func->mpi_win_get_info(win, info_p_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_get(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -970,19 +658,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_get(void *origin_addr, int origin_coun + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); +- +- ret = MPIDI_NM_native_func->mpi_win_free(win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_fence(int assert, MPIR_Win * win) + { + int ret; +@@ -996,21 +671,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_fence(int assert, MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); +- +- ret = MPIDI_NM_native_func->mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -1030,36 +690,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_accumulate(const void *origin_addr, in + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); +- +- ret = MPIDI_NM_native_func->mpi_win_attach(win, base, size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); +- +- ret = MPIDI_NM_native_func->mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, +- base_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rput(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -1093,19 +723,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush_local(int rank, MPIR_Win * w + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); +- +- ret = MPIDI_NM_native_func->mpi_win_detach(win, base); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, +@@ -1188,21 +805,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate(MPI_Aint size, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm, +- void *baseptr, MPIR_Win ** win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); +- +- ret = MPIDI_NM_native_func->mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush(int rank, MPIR_Win * win, + MPIDI_av_entry_t * addr) + { +@@ -1243,20 +845,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_unlock_all(MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); +- +- ret = MPIDI_NM_native_func->mpi_win_create_dynamic(info, comm, win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rget(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -2566,67 +2154,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoallw_sched(const void * + return ret; + } + +- +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_TYPE_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_TYPE_CREATE_HOOK); +- +- ret = MPIDI_NM_native_func->mpi_type_commit_hook(datatype_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_TYPE_CREATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_type_free_hook(MPIR_Datatype * datatype_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_TYPE_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_TYPE_FREE_HOOK); +- +- ret = MPIDI_NM_native_func->mpi_type_free_hook(datatype_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_TYPE_FREE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_op_commit_hook(MPIR_Op * op_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); +- +- ret = MPIDI_NM_native_func->mpi_op_commit_hook(op_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); +- +- ret = MPIDI_NM_native_func->mpi_op_free_hook(op_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); +- return ret; +-} +- + #endif /* NETMOD_DISABLE_INLINES */ + + #else + #define __netmod_inline_stubnm__ 0 + #define __netmod_inline_ofi__ 1 + #define __netmod_inline_ucx__ 2 +-#define __netmod_inline_portals4__ 3 + + #if NETMOD_INLINE==__netmod_inline_stubnm__ + #include "../stubnm/netmod_inline.h" +@@ -2634,8 +2167,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p) + #include "../ofi/netmod_inline.h" + #elif NETMOD_INLINE==__netmod_inline_ucx__ + #include "../ucx/netmod_inline.h" +-#elif NETMOD_INLINE==__netmod_inline_portals4__ +-#include "../portals4/netmod_inline.h" + #else + #error "No direct netmod included" + #endif +--- a/src/mpid/ch4/netmod/ofi/Makefile.mk ++++ b/src/mpid/ch4/netmod/ofi/Makefile.mk +@@ -13,6 +13,12 @@ if BUILD_CH4_NETMOD_OFI + + noinst_HEADERS += + mpi_core_sources += src/mpid/ch4/netmod/ofi/func_table.c \ ++ src/mpid/ch4/netmod/ofi/ofi_init.c \ ++ src/mpid/ch4/netmod/ofi/ofi_comm.c \ ++ src/mpid/ch4/netmod/ofi/ofi_datatype.c \ ++ src/mpid/ch4/netmod/ofi/ofi_op.c \ ++ src/mpid/ch4/netmod/ofi/ofi_spawn.c \ ++ src/mpid/ch4/netmod/ofi/ofi_win.c \ + src/mpid/ch4/netmod/ofi/globals.c \ + src/mpid/ch4/netmod/ofi/util.c + errnames_txt_files += src/mpid/ch4/netmod/ofi/errnames.txt +--- a/src/mpid/ch4/netmod/ofi/func_table.c ++++ b/src/mpid/ch4/netmod/ofi/func_table.c +@@ -18,29 +18,30 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + #include + #include "netmod_inline.h" + MPIDI_NM_funcs_t MPIDI_NM_ofi_funcs = { +- .mpi_init = MPIDI_NM_mpi_init_hook, +- .mpi_finalize = MPIDI_NM_mpi_finalize_hook, ++ .mpi_init = MPIDI_OFI_mpi_init_hook, ++ .mpi_finalize = MPIDI_OFI_mpi_finalize_hook, + .progress = MPIDI_NM_progress, +- .mpi_comm_connect = MPIDI_NM_mpi_comm_connect, +- .mpi_comm_disconnect = MPIDI_NM_mpi_comm_disconnect, +- .mpi_open_port = MPIDI_NM_mpi_open_port, +- .mpi_close_port = MPIDI_NM_mpi_close_port, +- .mpi_comm_accept = MPIDI_NM_mpi_comm_accept, ++ .mpi_comm_connect = MPIDI_OFI_mpi_comm_connect, ++ .mpi_comm_disconnect = MPIDI_OFI_mpi_comm_disconnect, ++ .mpi_open_port = MPIDI_OFI_mpi_open_port, ++ .mpi_close_port = MPIDI_OFI_mpi_close_port, ++ .mpi_comm_accept = MPIDI_OFI_mpi_comm_accept, + /* Routines that handle addressing */ + .comm_get_lpid = MPIDI_NM_comm_get_lpid, +- .get_local_upids = MPIDI_NM_get_local_upids, +- .upids_to_lupids = MPIDI_NM_upids_to_lupids, +- .create_intercomm_from_lpids = MPIDI_NM_create_intercomm_from_lpids, +- .mpi_comm_create_hook = MPIDI_NM_mpi_comm_create_hook, +- .mpi_comm_free_hook = MPIDI_NM_mpi_comm_free_hook, ++ .get_local_upids = MPIDI_OFI_get_local_upids, ++ .get_vci_attr = MPIDI_OFI_get_vci_attr, ++ .upids_to_lupids = MPIDI_OFI_upids_to_lupids, ++ .create_intercomm_from_lpids = MPIDI_OFI_create_intercomm_from_lpids, ++ .mpi_comm_create_hook = MPIDI_OFI_mpi_comm_create_hook, ++ .mpi_comm_free_hook = MPIDI_OFI_mpi_comm_free_hook, + /* Window initialization/cleanup routines */ +- .mpi_win_create_hook = MPIDI_NM_mpi_win_create_hook, +- .mpi_win_allocate_hook = MPIDI_NM_mpi_win_allocate_hook, +- .mpi_win_allocate_shared_hook = MPIDI_NM_mpi_win_allocate_shared_hook, +- .mpi_win_create_dynamic_hook = MPIDI_NM_mpi_win_create_dynamic_hook, +- .mpi_win_attach_hook = MPIDI_NM_mpi_win_attach_hook, +- .mpi_win_detach_hook = MPIDI_NM_mpi_win_detach_hook, +- .mpi_win_free_hook = MPIDI_NM_mpi_win_free_hook, ++ .mpi_win_create_hook = MPIDI_OFI_mpi_win_create_hook, ++ .mpi_win_allocate_hook = MPIDI_OFI_mpi_win_allocate_hook, ++ .mpi_win_allocate_shared_hook = MPIDI_OFI_mpi_win_allocate_shared_hook, ++ .mpi_win_create_dynamic_hook = MPIDI_OFI_mpi_win_create_dynamic_hook, ++ .mpi_win_attach_hook = MPIDI_OFI_mpi_win_attach_hook, ++ .mpi_win_detach_hook = MPIDI_OFI_mpi_win_detach_hook, ++ .mpi_win_free_hook = MPIDI_OFI_mpi_win_free_hook, + /* RMA synchronization routines */ + .rma_win_cmpl_hook = MPIDI_NM_rma_win_cmpl_hook, + .rma_win_local_cmpl_hook = MPIDI_NM_rma_win_local_cmpl_hook, +@@ -49,6 +50,7 @@ MPIDI_NM_funcs_t MPIDI_NM_ofi_funcs = { + /* Request initialization/cleanup routines */ + .am_request_init = MPIDI_NM_am_request_init, + .am_request_finalize = MPIDI_NM_am_request_finalize, ++ .prequest_free_hook = MPIDI_NM_prequest_free_hook, + /* Active Message Routines */ + .am_send_hdr = MPIDI_NM_am_send_hdr, + .am_isend = MPIDI_NM_am_isend, +@@ -75,11 +77,11 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_ofi_funcs = { + .mpi_irecv = MPIDI_NM_mpi_irecv, + .mpi_imrecv = MPIDI_NM_mpi_imrecv, + .mpi_cancel_recv = MPIDI_NM_mpi_cancel_recv, +- .mpi_alloc_mem = MPIDI_NM_mpi_alloc_mem, +- .mpi_free_mem = MPIDI_NM_mpi_free_mem, ++ .mpi_alloc_mem = MPIDI_OFI_mpi_alloc_mem, ++ .mpi_free_mem = MPIDI_OFI_mpi_free_mem, + .mpi_improbe = MPIDI_NM_mpi_improbe, + .mpi_iprobe = MPIDI_NM_mpi_iprobe, +- .mpi_win_set_info = MPIDI_NM_mpi_win_set_info, ++ .mpi_win_set_info = MPIDI_OFI_mpi_win_set_info, + .mpi_win_shared_query = MPIDI_NM_mpi_win_shared_query, + .mpi_put = MPIDI_NM_mpi_put, + .mpi_win_start = MPIDI_NM_mpi_win_start, +@@ -89,26 +91,26 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_ofi_funcs = { + .mpi_win_test = MPIDI_NM_mpi_win_test, + .mpi_win_lock = MPIDI_NM_mpi_win_lock, + .mpi_win_unlock = MPIDI_NM_mpi_win_unlock, +- .mpi_win_get_info = MPIDI_NM_mpi_win_get_info, ++ .mpi_win_get_info = MPIDI_OFI_mpi_win_get_info, + .mpi_get = MPIDI_NM_mpi_get, +- .mpi_win_free = MPIDI_NM_mpi_win_free, ++ .mpi_win_free = MPIDI_OFI_mpi_win_free, + .mpi_win_fence = MPIDI_NM_mpi_win_fence, +- .mpi_win_create = MPIDI_NM_mpi_win_create, ++ .mpi_win_create = MPIDI_OFI_mpi_win_create, + .mpi_accumulate = MPIDI_NM_mpi_accumulate, +- .mpi_win_attach = MPIDI_NM_mpi_win_attach, +- .mpi_win_allocate_shared = MPIDI_NM_mpi_win_allocate_shared, ++ .mpi_win_attach = MPIDI_OFI_mpi_win_attach, ++ .mpi_win_allocate_shared = MPIDI_OFI_mpi_win_allocate_shared, + .mpi_rput = MPIDI_NM_mpi_rput, + .mpi_win_flush_local = MPIDI_NM_mpi_win_flush_local, +- .mpi_win_detach = MPIDI_NM_mpi_win_detach, ++ .mpi_win_detach = MPIDI_OFI_mpi_win_detach, + .mpi_compare_and_swap = MPIDI_NM_mpi_compare_and_swap, + .mpi_raccumulate = MPIDI_NM_mpi_raccumulate, + .mpi_rget_accumulate = MPIDI_NM_mpi_rget_accumulate, + .mpi_fetch_and_op = MPIDI_NM_mpi_fetch_and_op, +- .mpi_win_allocate = MPIDI_NM_mpi_win_allocate, ++ .mpi_win_allocate = MPIDI_OFI_mpi_win_allocate, + .mpi_win_flush = MPIDI_NM_mpi_win_flush, + .mpi_win_flush_local_all = MPIDI_NM_mpi_win_flush_local_all, + .mpi_win_unlock_all = MPIDI_NM_mpi_win_unlock_all, +- .mpi_win_create_dynamic = MPIDI_NM_mpi_win_create_dynamic, ++ .mpi_win_create_dynamic = MPIDI_OFI_mpi_win_create_dynamic, + .mpi_rget = MPIDI_NM_mpi_rget, + .mpi_win_sync = MPIDI_NM_mpi_win_sync, + .mpi_win_flush_all = MPIDI_NM_mpi_win_flush_all, +@@ -184,10 +186,10 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_ofi_funcs = { + .mpi_ineighbor_alltoallv_sched = MPIDI_NM_mpi_ineighbor_alltoallv_sched, + .mpi_ineighbor_alltoallw_sched = MPIDI_NM_mpi_ineighbor_alltoallw_sched, + /* Datatype hooks */ +- .mpi_type_commit_hook = MPIDI_NM_mpi_type_commit_hook, +- .mpi_type_free_hook = MPIDI_NM_mpi_type_free_hook, ++ .mpi_type_commit_hook = MPIDI_OFI_mpi_type_commit_hook, ++ .mpi_type_free_hook = MPIDI_OFI_mpi_type_free_hook, + /* Op hooks */ +- .mpi_op_commit_hook = MPIDI_NM_mpi_op_commit_hook, +- .mpi_op_free_hook = MPIDI_NM_mpi_op_free_hook, ++ .mpi_op_commit_hook = MPIDI_OFI_mpi_op_commit_hook, ++ .mpi_op_free_hook = MPIDI_OFI_mpi_op_free_hook, + }; + #endif +--- a/src/mpid/ch4/netmod/ofi/globals.c ++++ b/src/mpid/ch4/netmod/ofi/globals.c +@@ -10,7 +10,7 @@ + */ + #include + #include "ofi_impl.h" +-MPIDI_OFI_global_t MPIDI_Global = { 0 }; ++MPIDI_OFI_global_t MPIDI_OFI_global = { 0 }; + + MPIDI_OFI_huge_recv_t *MPIDI_unexp_huge_recv_head = NULL; + MPIDI_OFI_huge_recv_t *MPIDI_unexp_huge_recv_tail = NULL; +@@ -22,8 +22,29 @@ MPIDI_OFI_capabilities_t MPIDI_OFI_caps_list[MPIDI_OFI_NUM_SETS] = + * ofi_capability_sets.h so we can refer to it if we want to preload a + * capability set at runtime */ + { ++ { /* default required capability */ ++ .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_DEFAULT, ++ .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_DEFAULT, ++ .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_DEFAULT, ++ .enable_mr_scalable = MPIDI_OFI_ENABLE_MR_SCALABLE_DEFAULT, ++ .enable_tagged = MPIDI_OFI_ENABLE_TAGGED_DEFAULT, ++ .enable_am = MPIDI_OFI_ENABLE_AM_DEFAULT, ++ .enable_rma = MPIDI_OFI_ENABLE_RMA_DEFAULT, ++ .enable_atomics = MPIDI_OFI_ENABLE_ATOMICS_DEFAULT, ++ .enable_data_auto_progress = MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_DEFAULT, ++ .enable_control_auto_progress = MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_DEFAULT, ++ .enable_pt2pt_nopack = MPIDI_OFI_ENABLE_PT2PT_NOPACK_DEFAULT, ++ .num_am_buffers = MPIDI_OFI_NUM_AM_BUFFERS_DEFAULT, ++ .max_endpoints = MPIDI_OFI_MAX_ENDPOINTS_DEFAULT, ++ .max_endpoints_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS_DEFAULT, ++ .fetch_atomic_iovecs = MPIDI_OFI_FETCH_ATOMIC_IOVECS_DEFAULT, ++ .context_bits = MPIDI_OFI_CONTEXT_BITS_DEFAULT, ++ .source_bits = MPIDI_OFI_SOURCE_BITS_DEFAULT, ++ .tag_bits = MPIDI_OFI_TAG_BITS_DEFAULT, ++ .major_version = MPIDI_OFI_MAJOR_VERSION_DEFAULT, ++ .minor_version = MPIDI_OFI_MINOR_VERSION_DEFAULT} ++ , + { /* minimal required capability */ +- .enable_data = MPIDI_OFI_ENABLE_DATA_MINIMAL, + .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_MINIMAL, + .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_MINIMAL, + .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_MINIMAL, +@@ -45,31 +66,7 @@ MPIDI_OFI_capabilities_t MPIDI_OFI_caps_list[MPIDI_OFI_NUM_SETS] = + .major_version = MPIDI_OFI_MAJOR_VERSION_MINIMAL, + .minor_version = MPIDI_OFI_MINOR_VERSION_MINIMAL} + , +- { /* psm */ +- .enable_data = MPIDI_OFI_ENABLE_DATA_PSM, +- .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_PSM, +- .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_PSM, +- .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_PSM, +- .enable_mr_scalable = MPIDI_OFI_ENABLE_MR_SCALABLE_PSM, +- .enable_tagged = MPIDI_OFI_ENABLE_TAGGED_PSM, +- .enable_am = MPIDI_OFI_ENABLE_AM_PSM, +- .enable_rma = MPIDI_OFI_ENABLE_RMA_PSM, +- .enable_atomics = MPIDI_OFI_ENABLE_ATOMICS_PSM, +- .enable_data_auto_progress = MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_PSM, +- .enable_control_auto_progress = MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_PSM, +- .enable_pt2pt_nopack = MPIDI_OFI_ENABLE_PT2PT_NOPACK_PSM, +- .num_am_buffers = MPIDI_OFI_NUM_AM_BUFFERS_PSM, +- .max_endpoints = MPIDI_OFI_MAX_ENDPOINTS_PSM, +- .max_endpoints_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS_PSM, +- .fetch_atomic_iovecs = MPIDI_OFI_FETCH_ATOMIC_IOVECS_PSM, +- .context_bits = MPIDI_OFI_CONTEXT_BITS_PSM, +- .source_bits = MPIDI_OFI_SOURCE_BITS_PSM, +- .tag_bits = MPIDI_OFI_TAG_BITS_PSM, +- .major_version = MPIDI_OFI_MAJOR_VERSION_MINIMAL, +- .minor_version = MPIDI_OFI_MINOR_VERSION_MINIMAL} +- , + { /* psm2 */ +- .enable_data = MPIDI_OFI_ENABLE_DATA_PSM2, + .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_PSM2, + .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_PSM2, + .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_PSM2, +@@ -91,31 +88,7 @@ MPIDI_OFI_capabilities_t MPIDI_OFI_caps_list[MPIDI_OFI_NUM_SETS] = + .major_version = MPIDI_OFI_MAJOR_VERSION_MINIMAL, + .minor_version = MPIDI_OFI_MINOR_VERSION_MINIMAL} + , +- { /* gni */ +- .enable_data = MPIDI_OFI_ENABLE_DATA_GNI, +- .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_GNI, +- .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_GNI, +- .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_GNI, +- .enable_mr_scalable = MPIDI_OFI_ENABLE_MR_SCALABLE_GNI, +- .enable_tagged = MPIDI_OFI_ENABLE_TAGGED_GNI, +- .enable_am = MPIDI_OFI_ENABLE_AM_GNI, +- .enable_rma = MPIDI_OFI_ENABLE_RMA_GNI, +- .enable_atomics = MPIDI_OFI_ENABLE_ATOMICS_GNI, +- .enable_data_auto_progress = MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_GNI, +- .enable_control_auto_progress = MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_GNI, +- .enable_pt2pt_nopack = MPIDI_OFI_ENABLE_PT2PT_NOPACK_GNI, +- .num_am_buffers = MPIDI_OFI_NUM_AM_BUFFERS_GNI, +- .max_endpoints = MPIDI_OFI_MAX_ENDPOINTS_GNI, +- .max_endpoints_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS_GNI, +- .fetch_atomic_iovecs = MPIDI_OFI_FETCH_ATOMIC_IOVECS_GNI, +- .context_bits = MPIDI_OFI_CONTEXT_BITS_GNI, +- .source_bits = MPIDI_OFI_SOURCE_BITS_GNI, +- .tag_bits = MPIDI_OFI_TAG_BITS_GNI, +- .major_version = MPIDI_OFI_MAJOR_VERSION_MINIMAL, +- .minor_version = MPIDI_OFI_MINOR_VERSION_MINIMAL} +- , + { /* sockets */ +- .enable_data = MPIDI_OFI_ENABLE_DATA_SOCKETS, + .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_SOCKETS, + .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_SOCKETS, + .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_SOCKETS, +@@ -138,7 +111,6 @@ MPIDI_OFI_capabilities_t MPIDI_OFI_caps_list[MPIDI_OFI_NUM_SETS] = + .minor_version = MPIDI_OFI_MINOR_VERSION_MINIMAL} + , + { /* bgq */ +- .enable_data = MPIDI_OFI_ENABLE_DATA_BGQ, + .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_BGQ, + .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_BGQ, + .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_BGQ, +@@ -160,31 +132,7 @@ MPIDI_OFI_capabilities_t MPIDI_OFI_caps_list[MPIDI_OFI_NUM_SETS] = + .major_version = MPIDI_OFI_MAJOR_VERSION_MINIMAL, + .minor_version = MPIDI_OFI_MINOR_VERSION_MINIMAL} + , +- { /* verbs */ +- .enable_data = MPIDI_OFI_ENABLE_DATA_VERBS, +- .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_VERBS, +- .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_VERBS, +- .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_VERBS, +- .enable_mr_scalable = MPIDI_OFI_ENABLE_MR_SCALABLE_VERBS, +- .enable_tagged = MPIDI_OFI_ENABLE_TAGGED_VERBS, +- .enable_am = MPIDI_OFI_ENABLE_AM_VERBS, +- .enable_rma = MPIDI_OFI_ENABLE_RMA_VERBS, +- .enable_atomics = MPIDI_OFI_ENABLE_ATOMICS_VERBS, +- .enable_data_auto_progress = MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_VERBS, +- .enable_control_auto_progress = MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_VERBS, +- .enable_pt2pt_nopack = MPIDI_OFI_ENABLE_PT2PT_NOPACK_VERBS, +- .num_am_buffers = MPIDI_OFI_NUM_AM_BUFFERS_VERBS, +- .max_endpoints = MPIDI_OFI_MAX_ENDPOINTS_VERBS, +- .max_endpoints_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS_VERBS, +- .fetch_atomic_iovecs = MPIDI_OFI_FETCH_ATOMIC_IOVECS_VERBS, +- .context_bits = MPIDI_OFI_CONTEXT_BITS_VERBS, +- .source_bits = MPIDI_OFI_SOURCE_BITS_VERBS, +- .tag_bits = MPIDI_OFI_TAG_BITS_VERBS, +- .major_version = MPIDI_OFI_MAJOR_VERSION_MINIMAL, +- .minor_version = MPIDI_OFI_MINOR_VERSION_MINIMAL} +- , + { /* RxM */ +- .enable_data = MPIDI_OFI_ENABLE_DATA_RXM, + .enable_av_table = MPIDI_OFI_ENABLE_AV_TABLE_RXM, + .enable_scalable_endpoints = MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_RXM, + .enable_shared_contexts = MPIDI_OFI_ENABLE_SHARED_CONTEXTS_RXM, +--- a/src/mpid/ch4/netmod/ofi/netmod_inline.h ++++ b/src/mpid/ch4/netmod/ofi/netmod_inline.h +@@ -13,20 +13,18 @@ + + #include "ofi_am.h" + #include "ofi_events.h" +-#include "ofi_comm.h" + #include "ofi_proc.h" + #include "ofi_progress.h" + #include "ofi_unimpl.h" +-#include "ofi_init.h" + #include "ofi_coll.h" +-#include "ofi_datatype.h" +-#include "ofi_op.h" + #include "ofi_probe.h" + #include "ofi_recv.h" + #include "ofi_send.h" + #include "ofi_win.h" + #include "ofi_rma.h" +-#include "ofi_spawn.h" + #include "ofi_startall.h" + ++/* Not-inlined OFI netmod functions */ ++#include "ofi_noinline.h" ++ + #endif /* NETMOD_INLINE_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ofi/ofi_am.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_am.h +@@ -14,7 +14,7 @@ + #include "ofi_am_impl.h" + #include "ofi_am_events.h" + +-static inline int MPIDI_OFI_progress_do_queue(int vni_idx); ++static inline int MPIDI_OFI_progress_do_queue(int vci_idx); + + static inline void MPIDI_NM_am_request_init(MPIR_Request * req) + { +@@ -26,10 +26,6 @@ static inline void MPIDI_NM_am_request_finalize(MPIR_Request * req) + MPIDI_OFI_am_clear_request(req); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_am_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_am_isend(int rank, + MPIR_Comm * comm, + int handler_id, +@@ -52,10 +48,6 @@ static inline int MPIDI_NM_am_isend(int rank, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_am_isendv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_am_isendv(int rank, + MPIR_Comm * comm, + int handler_id, +@@ -79,7 +71,7 @@ static inline int MPIDI_NM_am_isendv(int rank, + am_hdr_buf = (char *) MPL_malloc(am_hdr_sz, MPL_MEM_BUFFER); + is_allocated = 1; + } else { +- am_hdr_buf = (char *) MPIDI_CH4R_get_buf(MPIDI_Global.am_buf_pool); ++ am_hdr_buf = (char *) MPIDIU_get_buf(MPIDI_OFI_global.am_buf_pool); + is_allocated = 0; + } + +@@ -97,16 +89,12 @@ static inline int MPIDI_NM_am_isendv(int rank, + if (is_allocated) + MPL_free(am_hdr_buf); + else +- MPIDI_CH4R_release_buf(am_hdr_buf); ++ MPIDIU_release_buf(am_hdr_buf); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_SEND_AMV); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_am_isend_reply +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, + int src_rank, + int handler_id, +@@ -120,13 +108,11 @@ static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_REPLY); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_REPLY); + if (count) +- mpi_errno = MPIDI_OFI_do_am_isend(src_rank, +- MPIDI_CH4U_context_id_to_comm(context_id), +- handler_id, +- am_hdr, am_hdr_sz, data, count, datatype, sreq, TRUE); ++ mpi_errno = MPIDI_OFI_do_am_isend(src_rank, MPIDIG_context_id_to_comm(context_id), ++ handler_id, am_hdr, am_hdr_sz, data, count, datatype, ++ sreq, TRUE); + else +- mpi_errno = MPIDI_OFI_do_am_isend_header(src_rank, +- MPIDI_CH4U_context_id_to_comm(context_id), ++ mpi_errno = MPIDI_OFI_do_am_isend_header(src_rank, MPIDIG_context_id_to_comm(context_id), + handler_id, am_hdr, am_hdr_sz, sreq, TRUE); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_REPLY); + return mpi_errno; +@@ -171,8 +157,8 @@ static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_INJECT_AM_HDR_REPLY); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_INJECT_AM_HDR_REPLY); + +- mpi_errno = MPIDI_OFI_do_inject(src_rank, MPIDI_CH4U_context_id_to_comm(context_id), +- handler_id, am_hdr, am_hdr_sz, TRUE, TRUE, FALSE); ++ mpi_errno = MPIDI_OFI_do_inject(src_rank, MPIDIG_context_id_to_comm(context_id), handler_id, ++ am_hdr, am_hdr_sz, TRUE, TRUE, FALSE); + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); +@@ -187,17 +173,17 @@ static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, + static inline int MPIDI_NM_am_recv(MPIR_Request * req) + { + int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_send_long_ack_msg_t msg; ++ MPIDIG_send_long_ack_msg_t msg; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_AM_MATCHED); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_AM_MATCHED); + +- msg.sreq_ptr = (MPIDI_CH4U_REQUEST(req, req->rreq.peer_req_ptr)); ++ msg.sreq_ptr = (MPIDIG_REQUEST(req, req->rreq.peer_req_ptr)); + msg.rreq_ptr = (uint64_t) req; + MPIR_Assert((void *) msg.sreq_ptr != NULL); + mpi_errno = +- MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_REQUEST(req, context_id), +- MPIDI_CH4U_REQUEST(req, rank), MPIDI_CH4U_SEND_LONG_ACK, &msg, ++ MPIDI_NM_am_send_hdr_reply(MPIDIG_REQUEST(req, context_id), ++ MPIDIG_REQUEST(req, rank), MPIDIG_SEND_LONG_ACK, &msg, + sizeof(msg)); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +--- a/src/mpid/ch4/netmod/ofi/ofi_am_events.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_am_events.h +@@ -13,10 +13,83 @@ + + #include "ofi_am_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_handle_short_am +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) ++MPL_STATIC_INLINE_PREFIX uint16_t MPIDI_OFI_am_get_next_recv_seqno(fi_addr_t addr) ++{ ++ uint64_t id = addr; ++ void *r; ++ ++ r = MPIDIU_map_lookup(MPIDI_OFI_global.am_recv_seq_tracker, id); ++ if (r == MPIDIU_MAP_NOT_FOUND) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "First time adding recv seqno addr=%" PRIx64 "\n", addr)); ++ MPIDIU_map_set(MPIDI_OFI_global.am_recv_seq_tracker, id, 0, MPL_MEM_OTHER); ++ return 0; ++ } else { ++ return (uint16_t) (uintptr_t) r; ++ } ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_am_set_next_recv_seqno(fi_addr_t addr, uint16_t seqno) ++{ ++ uint64_t id = addr; ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Next recv seqno=%d addr=%" PRIx64 "\n", seqno, addr)); ++ ++ MPIDIU_map_update(MPIDI_OFI_global.am_recv_seq_tracker, id, (void *) (uintptr_t) seqno, ++ MPL_MEM_OTHER); ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_enqueue_unordered_msg(const MPIDI_OFI_am_header_t * ++ am_hdr) ++{ ++ MPIDI_OFI_am_unordered_msg_t *uo_msg; ++ size_t uo_msg_len, packet_len; ++ /* Essentially, uo_msg_len == packet_len + sizeof(next,prev pointers) */ ++ ++ uo_msg_len = sizeof(*uo_msg) + am_hdr->am_hdr_sz + am_hdr->data_sz; ++ ++ /* Allocate a new memory region to store this unordered message. ++ * We are doing this because the original am_hdr comes from FI_MULTI_RECV ++ * buffer, which may be reused soon by OFI. */ ++ uo_msg = MPL_malloc(uo_msg_len, MPL_MEM_BUFFER); ++ if (uo_msg == NULL) ++ return MPI_ERR_NO_MEM; ++ ++ packet_len = sizeof(*am_hdr) + am_hdr->am_hdr_sz + am_hdr->data_sz; ++ MPIR_Memcpy(&uo_msg->am_hdr, am_hdr, packet_len); ++ ++ DL_APPEND(MPIDI_OFI_global.am_unordered_msgs, uo_msg); ++ ++ return MPI_SUCCESS; ++} ++ ++/* Find and dequeue a message that matches (comm, src_rank, seqno), then return it. ++ * Caller must free the returned pointer. */ ++MPL_STATIC_INLINE_PREFIX MPIDI_OFI_am_unordered_msg_t ++ * MPIDI_OFI_am_claim_unordered_msg(fi_addr_t addr, uint16_t seqno) ++{ ++ MPIDI_OFI_am_unordered_msg_t *uo_msg; ++ ++ /* Future optimization note: ++ * Currently we are doing linear search every time, assuming that the number of items ++ * in the queue is extremely small. ++ * If it's not the case, we should consider using better data structure and algorithm ++ * to look up. */ ++ DL_FOREACH(MPIDI_OFI_global.am_unordered_msgs, uo_msg) { ++ if (uo_msg->am_hdr.fi_src_addr == addr && uo_msg->am_hdr.seqno == seqno) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, TERSE, ++ (MPL_DBG_FDEST, ++ "Found unordered message in the queue: addr=%" PRIx64 ", seqno=%d\n", ++ addr, seqno)); ++ DL_DELETE(MPIDI_OFI_global.am_unordered_msgs, uo_msg); ++ return uo_msg; ++ } ++ } ++ ++ return NULL; ++} ++ + static inline int MPIDI_OFI_handle_short_am(MPIDI_OFI_am_header_t * msg_hdr) + { + int mpi_errno = MPI_SUCCESS; +@@ -37,7 +110,7 @@ static inline int MPIDI_OFI_handle_short_am(MPIDI_OFI_am_header_t * msg_hdr) + in_data_sz = data_sz = msg_hdr->data_sz; + + MPIDIG_global.target_msg_cbs[msg_hdr->handler_id] (msg_hdr->handler_id, msg_hdr->payload, +- &p_data, &data_sz, ++ &p_data, &data_sz, 0 /* is_local */ , + &is_contig, &target_cmpl_cb, &rreq); + + if (!rreq) +@@ -92,10 +165,6 @@ static inline int MPIDI_OFI_handle_short_am(MPIDI_OFI_am_header_t * msg_hdr) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_handle_short_am_hdr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_handle_short_am_hdr(MPIDI_OFI_am_header_t * msg_hdr, void *am_hdr) + { + int mpi_errno = MPI_SUCCESS; +@@ -106,7 +175,8 @@ static inline int MPIDI_OFI_handle_short_am_hdr(MPIDI_OFI_am_header_t * msg_hdr, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_HANDLE_SHORT_AM_HDR); + + MPIDIG_global.target_msg_cbs[msg_hdr->handler_id] (msg_hdr->handler_id, am_hdr, +- NULL, NULL, NULL, &target_cmpl_cb, &rreq); ++ NULL, NULL, 0 /* is_local */ , ++ NULL, &target_cmpl_cb, &rreq); + + if (!rreq) + goto fn_exit; +@@ -121,10 +191,6 @@ static inline int MPIDI_OFI_handle_short_am_hdr(MPIDI_OFI_am_header_t * msg_hdr, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_rdma_read +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_rdma_read(void *dst, + uint64_t src, + size_t data_sz, +@@ -141,15 +207,15 @@ static inline int MPIDI_OFI_do_rdma_read(void *dst, + rem = data_sz; + + while (done != data_sz) { +- curr_len = MPL_MIN(rem, MPIDI_Global.max_send); ++ curr_len = MPL_MIN(rem, MPIDI_OFI_global.max_msg_size); + + MPIR_Assert(sizeof(MPIDI_OFI_am_request_t) <= MPIDI_OFI_BUF_POOL_SIZE); +- am_req = (MPIDI_OFI_am_request_t *) MPIDI_CH4R_get_buf(MPIDI_Global.am_buf_pool); ++ am_req = (MPIDI_OFI_am_request_t *) MPIDIU_get_buf(MPIDI_OFI_global.am_buf_pool); + MPIR_Assert(am_req); + + am_req->req_hdr = MPIDI_OFI_AMREQUEST(rreq, req_hdr); + am_req->event_id = MPIDI_OFI_EVENT_AM_READ; +- comm = MPIDI_CH4U_context_id_to_comm(context_id); ++ comm = MPIDIG_context_id_to_comm(context_id); + MPIR_Assert(comm); + MPIDI_OFI_cntr_incr(); + +@@ -173,7 +239,7 @@ static inline int MPIDI_OFI_do_rdma_read(void *dst, + .data = 0 + }; + +- MPIDI_OFI_CALL_RETRY_AM(fi_readmsg(MPIDI_Global.ctx[0].tx, ++ MPIDI_OFI_CALL_RETRY_AM(fi_readmsg(MPIDI_OFI_global.ctx[0].tx, + &msg, FI_COMPLETION), FALSE /* no lock */ , read); + + done += curr_len; +@@ -187,10 +253,6 @@ static inline int MPIDI_OFI_do_rdma_read(void *dst, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_handle_long_am +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_handle_long_am(MPIDI_OFI_am_header_t * msg_hdr, + MPIDI_OFI_lmt_msg_payload_t * lmt_msg, void *am_hdr) + { +@@ -206,8 +268,8 @@ static inline int MPIDI_OFI_do_handle_long_am(MPIDI_OFI_am_header_t * msg_hdr, + + in_data_sz = data_sz = msg_hdr->data_sz; + MPIDIG_global.target_msg_cbs[msg_hdr->handler_id] (msg_hdr->handler_id, am_hdr, +- &p_data, &data_sz, &is_contig, +- &target_cmpl_cb, &rreq); ++ &p_data, &data_sz, 0 /* is_local */ , ++ &is_contig, &target_cmpl_cb, &rreq); + + if (!rreq) + goto fn_exit; +@@ -240,10 +302,10 @@ static inline int MPIDI_OFI_do_handle_long_am(MPIDI_OFI_am_header_t * msg_hdr, + } + + data_sz = MPL_MIN(data_sz, in_data_sz); +- MPIDI_OFI_AMREQUEST_HDR(rreq, lmt_cntr) = ((data_sz - 1) / MPIDI_Global.max_send) + 1; +- MPIDI_OFI_do_rdma_read(p_data, +- lmt_msg->src_offset, +- data_sz, lmt_msg->context_id, lmt_msg->src_rank, rreq); ++ MPIDI_OFI_AMREQUEST_HDR(rreq, lmt_cntr) = ++ ((data_sz - 1) / MPIDI_OFI_global.max_msg_size) + 1; ++ MPIDI_OFI_do_rdma_read(p_data, lmt_msg->src_offset, data_sz, lmt_msg->context_id, ++ lmt_msg->src_rank, rreq); + MPIR_STATUS_SET_COUNT(rreq->status, data_sz); + } else { + done = 0; +@@ -258,7 +320,7 @@ static inline int MPIDI_OFI_do_handle_long_am(MPIDI_OFI_am_header_t * msg_hdr, + + for (i = 0; i < iov_len && rem > 0; i++) { + curr_len = MPL_MIN(rem, iov[i].iov_len); +- num_reads = ((curr_len - 1) / MPIDI_Global.max_send) + 1; ++ num_reads = ((curr_len - 1) / MPIDI_OFI_global.max_msg_size) + 1; + MPIDI_OFI_AMREQUEST_HDR(rreq, lmt_cntr) += num_reads; + rem -= curr_len; + } +@@ -291,10 +353,6 @@ static inline int MPIDI_OFI_do_handle_long_am(MPIDI_OFI_am_header_t * msg_hdr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_handle_long_am +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_handle_long_am(MPIDI_OFI_am_header_t * msg_hdr) + { + int mpi_errno = MPI_SUCCESS; +@@ -316,10 +374,6 @@ static inline int MPIDI_OFI_handle_long_am(MPIDI_OFI_am_header_t * msg_hdr) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_handle_lmt_ack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_handle_lmt_ack(MPIDI_OFI_am_header_t * msg_hdr) + { + int mpi_errno = MPI_SUCCESS; +@@ -333,22 +387,13 @@ static inline int MPIDI_OFI_handle_lmt_ack(MPIDI_OFI_am_header_t * msg_hdr) + sreq = (MPIR_Request *) ack_msg->sreq_ptr; + + if (MPIDI_OFI_ENABLE_MR_SCALABLE) { +- uint32_t idx_back; +- int key_type; + uint64_t mr_key = fi_mr_key(MPIDI_OFI_AMREQUEST_HDR(sreq, lmt_mr)); +- +- MPIDI_OFI_rma_key_unpack(mr_key, NULL, &key_type, &idx_back); +- MPIR_Assert(MPIDI_OFI_KEY_TYPE_HUGE_RMA == key_type); +- +- MPIDI_OFI_index_allocator_free(MPIDI_OFI_COMM(MPIR_Process.comm_world).rma_id_allocator, +- idx_back); ++ MPIDI_OFI_mr_key_free(mr_key); + } + MPIDI_OFI_CALL_NOLOCK(fi_close(&MPIDI_OFI_AMREQUEST_HDR(sreq, lmt_mr)->fid), mr_unreg); +- OPA_decr_int(&MPIDI_Global.am_inflight_rma_send_mrs); ++ OPA_decr_int(&MPIDI_OFI_global.am_inflight_rma_send_mrs); + +- if (MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer)) { +- MPL_free(MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer)); +- } ++ MPL_free(MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer)); + + handler_id = MPIDI_OFI_AMREQUEST_HDR(sreq, msg_hdr).handler_id; + MPID_Request_complete(sreq); /* FIXME: Should not call MPIDI in NM ? */ +@@ -364,10 +409,6 @@ static inline int MPIDI_OFI_handle_lmt_ack(MPIDI_OFI_am_header_t * msg_hdr) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_dispatch_ack +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_dispatch_ack(int rank, int context_id, uint64_t sreq_ptr, int am_type) + { + int mpi_errno = MPI_SUCCESS; +@@ -377,13 +418,16 @@ static inline int MPIDI_OFI_dispatch_ack(int rank, int context_id, uint64_t sreq + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DISPATCH_ACK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DISPATCH_ACK); + +- comm = MPIDI_CH4U_context_id_to_comm(context_id); ++ comm = MPIDIG_context_id_to_comm(context_id); + + msg.hdr.am_hdr_sz = sizeof(msg.pyld); + msg.hdr.data_sz = 0; + msg.hdr.am_type = am_type; ++ msg.hdr.seqno = MPIDI_OFI_am_fetch_incr_send_seqno(comm, rank); ++ msg.hdr.fi_src_addr ++ = MPIDI_OFI_comm_to_phys(MPIR_Process.comm_world, MPIR_Process.comm_world->rank); + msg.pyld.sreq_ptr = sreq_ptr; +- MPIDI_OFI_CALL_RETRY_AM(fi_inject(MPIDI_Global.ctx[0].tx, &msg, sizeof(msg), ++ MPIDI_OFI_CALL_RETRY_AM(fi_inject(MPIDI_OFI_global.ctx[0].tx, &msg, sizeof(msg), + MPIDI_OFI_comm_to_phys(comm, rank)), + FALSE /* no lock */ , inject); + fn_exit: +--- a/src/mpid/ch4/netmod/ofi/ofi_am_impl.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_am_impl.h +@@ -13,7 +13,36 @@ + + #include "ofi_impl.h" + +-static inline int MPIDI_OFI_progress_do_queue(int vni_idx); ++static inline int MPIDI_OFI_progress_do_queue(int vci_idx); ++ ++/* Acquire a sequence number to send, and record the next number */ ++MPL_STATIC_INLINE_PREFIX uint16_t MPIDI_OFI_am_fetch_incr_send_seqno(MPIR_Comm * comm, ++ int dest_rank) ++{ ++ fi_addr_t addr = MPIDI_OFI_comm_to_phys(comm, dest_rank); ++ uint64_t id = addr; ++ uint16_t seq, old_seq; ++ void *ret; ++ ret = MPIDIU_map_lookup(MPIDI_OFI_global.am_send_seq_tracker, id); ++ if (ret == MPIDIU_MAP_NOT_FOUND) ++ old_seq = 0; ++ else ++ old_seq = (uint16_t) (uintptr_t) ret; ++ ++ seq = old_seq + 1; ++ MPIDIU_map_update(MPIDI_OFI_global.am_send_seq_tracker, id, (void *) (uintptr_t) seq, ++ MPL_MEM_OTHER); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "Generated seqno=%d for dest_rank=%d " ++ "(context_id=0x%08x, src_addr=%" PRIx64 ", dest_addr=%" PRIx64 ")\n", ++ old_seq, dest_rank, comm->context_id, ++ MPIDI_OFI_comm_to_phys(MPIR_Process.comm_world, MPIR_Process.comm_world->rank), ++ addr)); ++ ++ return old_seq; ++} + + /* + Per-object lock for OFI +@@ -29,9 +58,7 @@ static inline int MPIDI_OFI_progress_do_queue(int vni_idx); + do { \ + ssize_t _ret; \ + do { \ +- if (LOCK) MPID_THREAD_CS_ENTER(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + _ret = FUNC; \ +- if (LOCK) MPID_THREAD_CS_EXIT(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + if (likely(_ret==0)) break; \ + MPIR_ERR_##CHKANDJUMP4(_ret != -FI_EAGAIN, \ + mpi_errno, \ +@@ -40,20 +67,14 @@ static inline int MPIDI_OFI_progress_do_queue(int vni_idx); + "**ofi_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + fi_strerror(-_ret)); \ +- if (LOCK) MPID_THREAD_CS_ENTER(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ +- mpi_errno = MPIDI_OFI_progress_do_queue(0 /* vni_idx */); \ +- if (LOCK) MPID_THREAD_CS_EXIT(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ ++ mpi_errno = MPIDI_OFI_progress_do_queue(0 /* vci_idx */); \ + if (mpi_errno != MPI_SUCCESS) \ + MPIR_ERR_POP(mpi_errno); \ + } while (_ret == -FI_EAGAIN); \ + } while (0) + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_am_clear_request +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPIDI_OFI_am_clear_request(MPIR_Request * sreq) + { + MPIDI_OFI_am_request_header_t *req_hdr; +@@ -69,16 +90,12 @@ static inline void MPIDI_OFI_am_clear_request(MPIR_Request * sreq) + MPL_free(req_hdr->am_hdr); + } + +- MPIDI_CH4R_release_buf(req_hdr); ++ MPIDIU_release_buf(req_hdr); + MPIDI_OFI_AMREQUEST(sreq, req_hdr) = NULL; + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_AM_CLEAR_REQUEST); + return; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_am_init_request +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_am_init_request(const void *am_hdr, + size_t am_hdr_sz, MPIR_Request * sreq) + { +@@ -89,7 +106,7 @@ static inline int MPIDI_OFI_am_init_request(const void *am_hdr, + + if (MPIDI_OFI_AMREQUEST(sreq, req_hdr) == NULL) { + req_hdr = (MPIDI_OFI_am_request_header_t *) +- MPIDI_CH4R_get_buf(MPIDI_Global.am_buf_pool); ++ MPIDIU_get_buf(MPIDI_OFI_global.am_buf_pool); + MPIR_Assert(req_hdr); + MPIDI_OFI_AMREQUEST(sreq, req_hdr) = req_hdr; + +@@ -116,10 +133,6 @@ static inline int MPIDI_OFI_am_init_request(const void *am_hdr, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_repost_buffer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_repost_buffer(void *buf, MPIR_Request * req) + { + int mpi_errno = MPI_SUCCESS; +@@ -127,8 +140,8 @@ static inline int MPIDI_OFI_repost_buffer(void *buf, MPIR_Request * req) + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_REPOST_BUFFER); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_REPOST_BUFFER); +- MPIDI_OFI_CALL_RETRY_AM(fi_recvmsg(MPIDI_Global.ctx[0].rx, +- &MPIDI_Global.am_msg[am->index], ++ MPIDI_OFI_CALL_RETRY_AM(fi_recvmsg(MPIDI_OFI_global.ctx[0].rx, ++ &MPIDI_OFI_global.am_msg[am->index], + FI_MULTI_RECV | FI_COMPLETION), FALSE /* lock */ , repost); + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_REPOST_BUFFER); +@@ -137,11 +150,7 @@ static inline int MPIDI_OFI_repost_buffer(void *buf, MPIR_Request * req) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_progress_do_queue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_OFI_progress_do_queue(int vni_idx) ++static inline int MPIDI_OFI_progress_do_queue(int vci_idx) + { + int mpi_errno = MPI_SUCCESS, ret; + struct fi_cq_tagged_entry cq_entry; +@@ -151,47 +160,32 @@ static inline int MPIDI_OFI_progress_do_queue(int vni_idx) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_PROGRESS_DO_QUEUE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_PROGRESS_DO_QUEUE); + +- ret = fi_cq_read(MPIDI_Global.ctx[vni_idx].cq, &cq_entry, 1); ++ ret = fi_cq_read(MPIDI_OFI_global.ctx[vci_idx].cq, &cq_entry, 1); + + if (unlikely(ret == -FI_EAGAIN)) + goto fn_exit; + + if (ret < 0) { +- mpi_errno = MPIDI_OFI_handle_cq_error_util(vni_idx, ret); ++ mpi_errno = MPIDI_OFI_handle_cq_error_util(vci_idx, ret); + goto fn_fail; + } + +- /* If only FI_MULTI_RECV flag bit is provided, the provider is reporting that +- * the multi-recv buffer has been released, and the completion entry is not +- * associated with a received message. */ +- if (cq_entry.flags == FI_MULTI_RECV) +- goto multi_recv; +- + /* If the statically allocated buffered list is full or we've already + * started using the dynamic list, continue using it. */ +- if (((MPIDI_Global.cq_buffered_static_head + 1) % +- MPIDI_OFI_NUM_CQ_BUFFERED == MPIDI_Global.cq_buffered_static_tail) || +- (NULL != MPIDI_Global.cq_buffered_dynamic_head)) { ++ if (((MPIDI_OFI_global.cq_buffered_static_head + 1) % ++ MPIDI_OFI_NUM_CQ_BUFFERED == MPIDI_OFI_global.cq_buffered_static_tail) || ++ (NULL != MPIDI_OFI_global.cq_buffered_dynamic_head)) { + MPIDI_OFI_cq_list_t *list_entry = + (MPIDI_OFI_cq_list_t *) MPL_malloc(sizeof(MPIDI_OFI_cq_list_t), MPL_MEM_BUFFER); + MPIR_Assert(list_entry); + list_entry->cq_entry = cq_entry; +- LL_APPEND(MPIDI_Global.cq_buffered_dynamic_head, MPIDI_Global.cq_buffered_dynamic_tail, +- list_entry); ++ LL_APPEND(MPIDI_OFI_global.cq_buffered_dynamic_head, ++ MPIDI_OFI_global.cq_buffered_dynamic_tail, list_entry); + } else { +- MPIDI_Global.cq_buffered_static_list[MPIDI_Global.cq_buffered_static_head].cq_entry = +- cq_entry; +- MPIDI_Global.cq_buffered_static_head = +- (MPIDI_Global.cq_buffered_static_head + 1) % MPIDI_OFI_NUM_CQ_BUFFERED; +- } +- +- if (cq_entry.flags & FI_MULTI_RECV) { +- multi_recv: +- mpi_errno = MPIDI_OFI_repost_buffer(cq_entry.op_context, +- MPIDI_OFI_context_to_request(cq_entry.op_context)); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); ++ MPIDI_OFI_global.cq_buffered_static_list[MPIDI_OFI_global. ++ cq_buffered_static_head].cq_entry = cq_entry; ++ MPIDI_OFI_global.cq_buffered_static_head = ++ (MPIDI_OFI_global.cq_buffered_static_head + 1) % MPIDI_OFI_NUM_CQ_BUFFERED; + } + + fn_exit: +@@ -201,10 +195,6 @@ static inline int MPIDI_OFI_progress_do_queue(int vni_idx) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_am_isend_header +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_am_isend_header(int rank, + MPIR_Comm * comm, + int handler_id, +@@ -214,7 +204,6 @@ static inline int MPIDI_OFI_do_am_isend_header(int rank, + struct iovec *iov; + MPIDI_OFI_am_header_t *msg_hdr; + int mpi_errno = MPI_SUCCESS, c; +- int need_lock = !is_reply; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DO_AM_ISEND_HEADER); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DO_AM_ISEND_HEADER); +@@ -232,6 +221,9 @@ static inline int MPIDI_OFI_do_am_isend_header(int rank, + msg_hdr->am_hdr_sz = am_hdr_sz; + msg_hdr->data_sz = 0; + msg_hdr->am_type = MPIDI_AMTYPE_SHORT_HDR; ++ msg_hdr->seqno = MPIDI_OFI_am_fetch_incr_send_seqno(comm, rank); ++ msg_hdr->fi_src_addr ++ = MPIDI_OFI_comm_to_phys(MPIR_Process.comm_world, MPIR_Process.comm_world->rank); + + MPIR_Assert((uint64_t) comm->rank < (1ULL << MPIDI_OFI_AM_RANK_BITS)); + +@@ -248,9 +240,9 @@ static inline int MPIDI_OFI_do_am_isend_header(int rank, + iov[1].iov_len = am_hdr_sz; + MPIDI_OFI_AMREQUEST(sreq, event_id) = MPIDI_OFI_EVENT_AM_SEND; + MPIDI_OFI_ASSERT_IOVEC_ALIGN(iov); +- MPIDI_OFI_CALL_RETRY_AM(fi_sendv(MPIDI_Global.ctx[0].tx, iov, NULL, 2, ++ MPIDI_OFI_CALL_RETRY_AM(fi_sendv(MPIDI_OFI_global.ctx[0].tx, iov, NULL, 2, + MPIDI_OFI_comm_to_phys(comm, rank), +- &MPIDI_OFI_AMREQUEST(sreq, context)), need_lock, sendv); ++ &MPIDI_OFI_AMREQUEST(sreq, context)), !is_reply, sendv); + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DO_AM_ISEND_HEADER); + return mpi_errno; +@@ -258,10 +250,6 @@ static inline int MPIDI_OFI_do_am_isend_header(int rank, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_am_isend_long +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_am_isend_long(int rank, + MPIR_Comm * comm, + int handler_id, +@@ -288,6 +276,9 @@ static inline int MPIDI_OFI_am_isend_long(int rank, + msg_hdr->am_hdr_sz = am_hdr_sz; + msg_hdr->data_sz = data_sz; + msg_hdr->am_type = MPIDI_AMTYPE_LMT_REQ; ++ msg_hdr->seqno = MPIDI_OFI_am_fetch_incr_send_seqno(comm, rank); ++ msg_hdr->fi_src_addr ++ = MPIDI_OFI_comm_to_phys(MPIR_Process.comm_world, MPIR_Process.comm_world->rank); + + lmt_info = &MPIDI_OFI_AMREQUEST_HDR(sreq, lmt_info); + lmt_info->context_id = comm->context_id; +@@ -295,15 +286,7 @@ static inline int MPIDI_OFI_am_isend_long(int rank, + lmt_info->src_offset = MPIDI_OFI_ENABLE_MR_SCALABLE ? (uint64_t) 0 /* MR_SCALABLE */ : (uint64_t) data; /* MR_BASIC */ + lmt_info->sreq_ptr = (uint64_t) sreq; + if (MPIDI_OFI_ENABLE_MR_SCALABLE) { +- /* Always allocates RMA ID from COMM_WORLD as the actual associated communicator +- * is not available here */ +- uint64_t index = +- MPIDI_OFI_index_allocator_alloc(MPIDI_OFI_COMM +- (MPIR_Process.comm_world).rma_id_allocator, +- MPL_MEM_RMA); +- MPIR_Assert(index < MPIDI_Global.max_huge_rmas); +- lmt_info->rma_key = MPIDI_OFI_rma_key_pack(comm->context_id, +- MPIDI_OFI_KEY_TYPE_HUGE_RMA, index); ++ lmt_info->rma_key = MPIDI_OFI_mr_key_alloc(); + } else { + lmt_info->rma_key = 0; + } +@@ -313,7 +296,7 @@ static inline int MPIDI_OFI_am_isend_long(int rank, + MPIR_Assert((sizeof(*msg_hdr) + sizeof(*lmt_info) + am_hdr_sz) <= + MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE); + if (need_lock) +- MPIDI_OFI_CALL(fi_mr_reg(MPIDI_Global.domain, ++ MPIDI_OFI_CALL(fi_mr_reg(MPIDI_OFI_global.domain, + data, + data_sz, + FI_REMOTE_READ, +@@ -321,7 +304,7 @@ static inline int MPIDI_OFI_am_isend_long(int rank, + lmt_info->rma_key, + 0ULL, &MPIDI_OFI_AMREQUEST_HDR(sreq, lmt_mr), NULL), mr_reg); + else +- MPIDI_OFI_CALL_NOLOCK(fi_mr_reg(MPIDI_Global.domain, ++ MPIDI_OFI_CALL_NOLOCK(fi_mr_reg(MPIDI_OFI_global.domain, + data, + data_sz, + FI_REMOTE_READ, +@@ -329,7 +312,7 @@ static inline int MPIDI_OFI_am_isend_long(int rank, + lmt_info->rma_key, + 0ULL, + &MPIDI_OFI_AMREQUEST_HDR(sreq, lmt_mr), NULL), mr_reg); +- OPA_incr_int(&MPIDI_Global.am_inflight_rma_send_mrs); ++ OPA_incr_int(&MPIDI_OFI_global.am_inflight_rma_send_mrs); + + if (!MPIDI_OFI_ENABLE_MR_SCALABLE) { + /* MR_BASIC */ +@@ -348,7 +331,7 @@ static inline int MPIDI_OFI_am_isend_long(int rank, + iov[2].iov_len = sizeof(*lmt_info); + MPIDI_OFI_AMREQUEST(sreq, event_id) = MPIDI_OFI_EVENT_AM_SEND; + MPIDI_OFI_ASSERT_IOVEC_ALIGN(iov); +- MPIDI_OFI_CALL_RETRY_AM(fi_sendv(MPIDI_Global.ctx[0].tx, iov, NULL, 3, ++ MPIDI_OFI_CALL_RETRY_AM(fi_sendv(MPIDI_OFI_global.ctx[0].tx, iov, NULL, 3, + MPIDI_OFI_comm_to_phys(comm, rank), + &MPIDI_OFI_AMREQUEST(sreq, context)), need_lock, sendv); + fn_exit: +@@ -358,10 +341,6 @@ static inline int MPIDI_OFI_am_isend_long(int rank, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_am_isend_short +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_am_isend_short(int rank, + MPIR_Comm * comm, + int handler_id, +@@ -387,6 +366,9 @@ static inline int MPIDI_OFI_am_isend_short(int rank, + msg_hdr->am_hdr_sz = am_hdr_sz; + msg_hdr->data_sz = count; + msg_hdr->am_type = MPIDI_AMTYPE_SHORT; ++ msg_hdr->seqno = MPIDI_OFI_am_fetch_incr_send_seqno(comm, rank); ++ msg_hdr->fi_src_addr ++ = MPIDI_OFI_comm_to_phys(MPIR_Process.comm_world, MPIR_Process.comm_world->rank); + + iov = MPIDI_OFI_AMREQUEST_HDR(sreq, iov); + +@@ -402,7 +384,7 @@ static inline int MPIDI_OFI_am_isend_short(int rank, + MPIR_cc_incr(sreq->cc_ptr, &c); + MPIDI_OFI_AMREQUEST(sreq, event_id) = MPIDI_OFI_EVENT_AM_SEND; + MPIDI_OFI_ASSERT_IOVEC_ALIGN(iov); +- MPIDI_OFI_CALL_RETRY_AM(fi_sendv(MPIDI_Global.ctx[0].tx, iov, NULL, 3, ++ MPIDI_OFI_CALL_RETRY_AM(fi_sendv(MPIDI_OFI_global.ctx[0].tx, iov, NULL, 3, + MPIDI_OFI_comm_to_phys(comm, rank), + &MPIDI_OFI_AMREQUEST(sreq, context)), need_lock, sendv); + fn_exit: +@@ -412,10 +394,6 @@ static inline int MPIDI_OFI_am_isend_short(int rank, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_am_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_am_isend(int rank, + MPIR_Comm * comm, + int handler_id, +@@ -438,22 +416,22 @@ static inline int MPIDI_OFI_do_am_isend(int rank, + MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); + send_buf = (char *) buf + dt_true_lb; + +- if (handler_id == MPIDI_CH4U_SEND && ++ if (handler_id == MPIDIG_SEND && + am_hdr_sz + data_sz + sizeof(MPIDI_OFI_am_header_t) > MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE) { +- MPIDI_CH4U_send_long_req_msg_t lreq_hdr; ++ MPIDIG_send_long_req_mst_t lreq_hdr; + + MPIR_Memcpy(&lreq_hdr.hdr, am_hdr, am_hdr_sz); + lreq_hdr.data_sz = data_sz; + lreq_hdr.sreq_ptr = (uint64_t) sreq; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).src_buf = buf; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).count = count; ++ MPIDIG_REQUEST(sreq, req->lreq).src_buf = buf; ++ MPIDIG_REQUEST(sreq, req->lreq).count = count; + MPIR_Datatype_add_ref_if_not_builtin(datatype); +- MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype = datatype; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).tag = lreq_hdr.hdr.tag; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).rank = lreq_hdr.hdr.src_rank; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).context_id = lreq_hdr.hdr.context_id; +- MPIDI_CH4U_REQUEST(sreq, rank) = rank; +- mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ, ++ MPIDIG_REQUEST(sreq, req->lreq).datatype = datatype; ++ MPIDIG_REQUEST(sreq, req->lreq).tag = lreq_hdr.hdr.tag; ++ MPIDIG_REQUEST(sreq, req->lreq).rank = lreq_hdr.hdr.src_rank; ++ MPIDIG_REQUEST(sreq, req->lreq).context_id = lreq_hdr.hdr.context_id; ++ MPIDIG_REQUEST(sreq, rank) = rank; ++ mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, MPIDIG_SEND_LONG_REQ, + &lreq_hdr, sizeof(lreq_hdr)); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -466,21 +444,13 @@ static inline int MPIDI_OFI_do_am_isend(int rank, + MPIR_ERR_POP(mpi_errno); + + if (!dt_contig) { +- size_t segment_first; +- struct MPIR_Segment *segment_ptr; +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "Send MPIR_Segment_alloc"); +- MPIR_Segment_init(buf, count, datatype, segment_ptr); +- segment_first = 0; +- last = data_sz; +- MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer) = (char *) MPL_malloc(data_sz, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP1(MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer) == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "Send Pack buffer alloc"); +- MPIR_Segment_pack(segment_ptr, segment_first, &last, +- MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer)); +- MPIR_Segment_free(segment_ptr); +- send_buf = (char *) MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer); ++ send_buf = (char *) MPL_malloc(data_sz, MPL_MEM_BUFFER); ++ ++ mpi_errno = MPIR_Typerep_pack(buf, count, datatype, 0, send_buf, data_sz, &last); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer) = send_buf; + } else { + MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer) = NULL; + } +@@ -504,10 +474,6 @@ static inline int MPIDI_OFI_do_am_isend(int rank, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_emulated_inject +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_emulated_inject(fi_addr_t addr, + const MPIDI_OFI_am_header_t * msg_hdrp, + const void *am_hdr, +@@ -528,9 +494,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_emulated_inject(fi_addr_t addr, + + MPIDI_OFI_REQUEST(sreq, event_id) = MPIDI_OFI_EVENT_INJECT_EMU; + MPIDI_OFI_REQUEST(sreq, util.inject_buf) = ibuf; +- OPA_incr_int(&MPIDI_Global.am_inflight_inject_emus); ++ OPA_incr_int(&MPIDI_OFI_global.am_inflight_inject_emus); + +- MPIDI_OFI_CALL_RETRY_AM(fi_send(MPIDI_Global.ctx[0].tx, ibuf, len, ++ MPIDI_OFI_CALL_RETRY_AM(fi_send(MPIDI_OFI_global.ctx[0].tx, ibuf, len, + NULL /* desc */ , addr, &(MPIDI_OFI_REQUEST(sreq, context))), + need_lock, send); + fn_exit: +@@ -539,10 +505,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_emulated_inject(fi_addr_t addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_inject +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_inject(int rank, + MPIR_Comm * comm, + int handler_id, +@@ -567,12 +529,15 @@ static inline int MPIDI_OFI_do_inject(int rank, + msg_hdr.am_hdr_sz = am_hdr_sz; + msg_hdr.data_sz = 0; + msg_hdr.am_type = MPIDI_AMTYPE_SHORT_HDR; ++ msg_hdr.seqno = MPIDI_OFI_am_fetch_incr_send_seqno(comm, rank); ++ msg_hdr.fi_src_addr ++ = MPIDI_OFI_comm_to_phys(MPIR_Process.comm_world, MPIR_Process.comm_world->rank); + + MPIR_Assert((uint64_t) comm->rank < (1ULL << MPIDI_OFI_AM_RANK_BITS)); + + addr = use_comm_table ? MPIDI_OFI_comm_to_phys(comm, rank) : MPIDI_OFI_to_phys(rank); + +- if (unlikely(am_hdr_sz + sizeof(msg_hdr) > MPIDI_Global.max_buffered_send)) { ++ if (unlikely(am_hdr_sz + sizeof(msg_hdr) > MPIDI_OFI_global.max_buffered_send)) { + mpi_errno = MPIDI_OFI_do_emulated_inject(addr, &msg_hdr, am_hdr, am_hdr_sz, need_lock); + goto fn_exit; + } +@@ -582,7 +547,7 @@ static inline int MPIDI_OFI_do_inject(int rank, + memcpy(buff, &msg_hdr, sizeof(msg_hdr)); + memcpy(buff + sizeof(msg_hdr), am_hdr, am_hdr_sz); + +- MPIDI_OFI_CALL_RETRY_AM(fi_inject(MPIDI_Global.ctx[0].tx, buff, buff_len, addr), ++ MPIDI_OFI_CALL_RETRY_AM(fi_inject(MPIDI_OFI_global.ctx[0].tx, buff, buff_len, addr), + need_lock, inject); + + fn_exit: +--- a/src/mpid/ch4/netmod/ofi/ofi_capability_sets.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_capability_sets.h +@@ -15,17 +15,18 @@ + #define MPIDI_OFI_ON 1 + + enum { +- MPIDI_OFI_SET_NUMBER_UNKNOWN = 0, +- MPIDI_OFI_SET_NUMBER_PSM, ++ MPIDI_OFI_SET_NUMBER_DEFAULT = 0, ++ MPIDI_OFI_SET_NUMBER_MINIMAL, + MPIDI_OFI_SET_NUMBER_PSM2, +- MPIDI_OFI_SET_NUMBER_GNI, + MPIDI_OFI_SET_NUMBER_SOCKETS, + MPIDI_OFI_SET_NUMBER_BGQ, +- MPIDI_OFI_SET_NUMBER_VERBS, + MPIDI_OFI_SET_NUMBER_RXM, + MPIDI_OFI_NUM_SETS + }; + ++#define MPIDI_OFI_SET_NAME_DEFAULT "default" ++#define MPIDI_OFI_SET_NAME_MINIMAL "minimal" ++ + #define MPIDI_OFI_MAX_ENDPOINTS_SCALABLE 256 + #define MPIDI_OFI_MAX_ENDPOINTS_BITS_SCALABLE 8 + #define MPIDI_OFI_MAX_ENDPOINTS_REGULAR 1 +@@ -35,31 +36,25 @@ enum { + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + { + if (set_name == NULL) { +- return MPIDI_OFI_SET_NUMBER_UNKNOWN; +- } else if (!strcmp("psm", set_name)) { +- return MPIDI_OFI_SET_NUMBER_PSM; ++ return MPIDI_OFI_SET_NUMBER_DEFAULT; + } else if (!strcmp("psm2", set_name)) { + return MPIDI_OFI_SET_NUMBER_PSM2; +- } else if (!strcmp("gni", set_name)) { +- return MPIDI_OFI_SET_NUMBER_GNI; + } else if (!strcmp("sockets", set_name)) { + return MPIDI_OFI_SET_NUMBER_SOCKETS; + } else if (!strcmp("bgq", set_name)) { + return MPIDI_OFI_SET_NUMBER_BGQ; +- } else if (!strcmp("verbs", set_name)) { +- return MPIDI_OFI_SET_NUMBER_VERBS; + } else if (strstr(set_name, "ofi_rxm")) { + return MPIDI_OFI_SET_NUMBER_RXM; ++ } else if (!strcmp(MPIDI_OFI_SET_NAME_MINIMAL, set_name)) { ++ return MPIDI_OFI_SET_NUMBER_MINIMAL; + } else { +- return MPIDI_OFI_SET_NUMBER_UNKNOWN; ++ return MPIDI_OFI_SET_NUMBER_DEFAULT; + } + } + + /* + * The definitions map to these capability sets: + * +- * MPIDI_OFI_ENABLE_DATA fi_tsenddata (and other functions with immediate data) +- * Uses FI_REMOTE_CQ_DATA, FI_DIRECTED_RECV + * MPIDI_OFI_ENABLE_AV_TABLE Use FI_AV_TABLE instead of FI_AV_MAP + * MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS fi_scalable_ep instead of fi_ep + * domain_attr.max_ep_tx_ctx > 1 +@@ -70,7 +65,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + * If using runtime mode, this will be set to FI_MR_UNSPEC + * MPIDI_OFI_ENABLE_TAGGED Use FI_TAGGED interface instead of FI_MSG + * MPIDI_OFI_ENABLE_AM Use FI_MSG and FI_MULTI_RECV for active messages +- * MPIDI_OFI_ENABLE_RMA Use FI_RMA interfaces ++ * MPIDI_OFI_ENABLE_RMA Require FI_DELIVERY_COMPLETE and use the OFI RMA code path ++ * for all RMA operations. With this turned off, we only use ++ * FI_READ in the active message code path (so we still require ++ * FI_RMA either way). + * MPIDI_OFI_ENABLE_ATOMICS Use FI_ATOMICS interfaces + * MPIDI_OFI_FETCH_ATOMIC_IOVECS The maximum number of iovecs that can be used for fetch_atomic operations + * MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS Use a progress thread for normal data messages +@@ -98,70 +96,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + * MPIDI_OFI_CONTEXT_STRUCTS The number of fi_context structs needed for the provider + */ + +-#define MPIDI_OFI_ENABLE_DATA_PSM MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_AV_TABLE_PSM MPIDI_OFI_ON +-#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_PSM MPIDI_OFI_OFF +-#define MPIDI_OFI_MAX_ENDPOINTS_PSM MPIDI_OFI_MAX_ENDPOINTS_REGULAR +-#define MPIDI_OFI_MAX_ENDPOINTS_BITS_PSM MPIDI_OFI_MAX_ENDPOINTS_BITS_REGULAR +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS_PSM MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_MR_SCALABLE_PSM MPIDI_OFI_ON +-#ifdef MPIDI_OFI_FORCE_AM +-#define MPIDI_OFI_ENABLE_TAGGED_PSM MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_RMA_PSM MPIDI_OFI_OFF +-#else +-#define MPIDI_OFI_ENABLE_TAGGED_PSM MPIDI_OFI_ON +-#define MPIDI_OFI_ENABLE_RMA_PSM MPIDI_OFI_ON +-#endif +-#define MPIDI_OFI_ENABLE_AM_PSM MPIDI_OFI_ON +-#define MPIDI_OFI_ENABLE_ATOMICS_PSM MPIDI_OFI_ENABLE_RMA_PSM +-#define MPIDI_OFI_FETCH_ATOMIC_IOVECS_PSM 1 +-#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_PSM MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_PSM MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_PT2PT_NOPACK_PSM MPIDI_OFI_ON +-#define MPIDI_OFI_NUM_AM_BUFFERS_PSM MPIDI_OFI_MAX_NUM_AM_BUFFERS +-#define MPIDI_OFI_CONTEXT_BITS_PSM (16) +-#define MPIDI_OFI_SOURCE_BITS_PSM (24) +-#define MPIDI_OFI_TAG_BITS_PSM (20) +-#define MPIDI_OFI_MAJOR_VERSION_PSM 1 +-#define MPIDI_OFI_MINOR_VERSION_PSM 5 +- +-#ifdef MPIDI_CH4_OFI_USE_SET_PSM +-#define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_PSM +-#define MPIDI_OFI_ENABLE_RUNTIME_CHECKS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_DATA MPIDI_OFI_ENABLE_DATA_PSM +-#define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_OFI_ENABLE_AV_TABLE_PSM +-#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_PSM +-#define MPIDI_OFI_MAX_ENDPOINTS MPIDI_OFI_MAX_ENDPOINTS_PSM +-#define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_OFI_MAX_ENDPOINTS_BITS_PSM +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_ENABLE_SHARED_CONTEXTS_PSM +-#define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_OFI_ENABLE_MR_SCALABLE_PSM +-#define MPIDI_OFI_ENABLE_TAGGED MPIDI_OFI_ENABLE_TAGGED_PSM +-#define MPIDI_OFI_ENABLE_AM MPIDI_OFI_ENABLE_AM_PSM +-#define MPIDI_OFI_ENABLE_RMA MPIDI_OFI_ENABLE_RMA_PSM +-#define MPIDI_OFI_ENABLE_ATOMICS MPIDI_OFI_ENABLE_ATOMICS_PSM +-#define MPIDI_OFI_FETCH_ATOMIC_IOVECS MPIDI_OFI_FETCH_ATOMIC_IOVECS_PSM +-#define MPIDI_OFI_IOVEC_ALIGN (1) +-#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_PSM +-#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_PSM +-#define MPIDI_OFI_ENABLE_PT2PT_NOPACK MPIDI_OFI_ENABLE_PT2PT_NOPACK_PSM +-#define MPIDI_OFI_NUM_AM_BUFFERS MPIDI_OFI_NUM_AM_BUFFERS_PSM +-#define MPIDI_OFI_PROTOCOL_MASK (0xE000000000000000ULL) +-#define MPIDI_OFI_CONTEXT_MASK (0x0FFFF00000000000ULL) +-#define MPIDI_OFI_SOURCE_MASK (0x00000FFFFFF00000ULL) /* PSM does not support immediate data +- * so this field needs to be available */ +-#define MPIDI_OFI_TAG_MASK (0x00000000000FFFFFULL) +-#define MPIDI_OFI_CONTEXT_BITS MPIDI_OFI_CONTEXT_BITS_PSM +-#define MPIDI_OFI_SOURCE_BITS MPIDI_OFI_SOURCE_BITS_PSM +-#define MPIDI_OFI_TAG_BITS MPIDI_OFI_TAG_BITS_PSM +-#define MPIDI_OFI_SYNC_SEND_ACK (0x1000000000000000ULL) +-#define MPIDI_OFI_SYNC_SEND (0x2000000000000000ULL) +-#define MPIDI_OFI_DYNPROC_SEND (0x4000000000000000ULL) +-#define MPIDI_OFI_MAJOR_VERSION MPIDI_OFI_MAJOR_VERSION_PSM +-#define MPIDI_OFI_MINOR_VERSION MPIDI_OFI_MINOR_VERSION_PSM +-#define MPIDI_OFI_CONTEXT_STRUCTS 1 +-#endif +- +-#define MPIDI_OFI_ENABLE_DATA_PSM2 MPIDI_OFI_OFF + #define MPIDI_OFI_ENABLE_AV_TABLE_PSM2 MPIDI_OFI_ON + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_PSM2 MPIDI_OFI_ON + #define MPIDI_OFI_MAX_ENDPOINTS_PSM2 MPIDI_OFI_MAX_ENDPOINTS_SCALABLE +@@ -183,20 +117,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #define MPIDI_OFI_ENABLE_PT2PT_NOPACK_PSM2 MPIDI_OFI_ON + #define MPIDI_OFI_NUM_AM_BUFFERS_PSM2 MPIDI_OFI_MAX_NUM_AM_BUFFERS + #define MPIDI_OFI_CONTEXT_BITS_PSM2 (16) +-#define MPIDI_OFI_SOURCE_BITS_PSM2 (24) +-#define MPIDI_OFI_TAG_BITS_PSM2 (20) ++#define MPIDI_OFI_SOURCE_BITS_PSM2 (0) ++#define MPIDI_OFI_TAG_BITS_PSM2 (31) + #define MPIDI_OFI_MAJOR_VERSION_PSM2 1 +-#define MPIDI_OFI_MINOR_VERSION_PSM2 5 ++#define MPIDI_OFI_MINOR_VERSION_PSM2 6 + + #ifdef MPIDI_CH4_OFI_USE_SET_PSM2 + #define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_PSM2 + #define MPIDI_OFI_ENABLE_RUNTIME_CHECKS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_DATA MPIDI_OFI_ENABLE_DATA_PSM2 + #define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_OFI_ENABLE_AV_TABLE_PSM2 + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_PSM2 + #define MPIDI_OFI_MAX_ENDPOINTS MPIDI_OFI_MAX_ENDPOINTS_PSM2 + #define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_OFI_MAX_ENDPOINTS_BITS_PSM2 +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_ENABLE_SHARED_CONTEXTS_PSM2 ++#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_global.settings.enable_shared_contexts /* Always controlled by CVAR */ + #define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_OFI_ENABLE_MR_SCALABLE_PSM2 + #define MPIDI_OFI_ENABLE_TAGGED MPIDI_OFI_ENABLE_TAGGED_PSM2 + #define MPIDI_OFI_ENABLE_AM MPIDI_OFI_ENABLE_AM_PSM2 +@@ -208,86 +141,22 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_PSM2 + #define MPIDI_OFI_ENABLE_PT2PT_NOPACK MPIDI_OFI_ENABLE_PT2PT_NOPACK_PSM2 + #define MPIDI_OFI_NUM_AM_BUFFERS MPIDI_OFI_NUM_AM_BUFFERS_PSM2 +-#define MPIDI_OFI_PROTOCOL_MASK (0xE000000000000000ULL) +-#define MPIDI_OFI_CONTEXT_MASK (0x0FFFF00000000000ULL) +-#define MPIDI_OFI_SOURCE_MASK (0x00000FFFFFF00000ULL) /* PSM2 does not support immediate data +- * so this field needs to be available */ +-#define MPIDI_OFI_TAG_MASK (0x00000000000FFFFFULL) ++#define MPIDI_OFI_PROTOCOL_MASK (0x0006000000000000ULL) ++#define MPIDI_OFI_CONTEXT_MASK (0x0000FFFF00000000ULL) ++#define MPIDI_OFI_SOURCE_MASK (0x0000000000000000ULL) /* PSM2 does support immediate data ++ * so this field is zeroed */ ++#define MPIDI_OFI_TAG_MASK (0x000000007FFFFFFFULL) + #define MPIDI_OFI_CONTEXT_BITS MPIDI_OFI_CONTEXT_BITS_PSM2 + #define MPIDI_OFI_SOURCE_BITS MPIDI_OFI_SOURCE_BITS_PSM2 + #define MPIDI_OFI_TAG_BITS MPIDI_OFI_TAG_BITS_PSM2 +-#define MPIDI_OFI_SYNC_SEND_ACK (0x1000000000000000ULL) +-#define MPIDI_OFI_SYNC_SEND (0x2000000000000000ULL) +-#define MPIDI_OFI_DYNPROC_SEND (0x4000000000000000ULL) ++#define MPIDI_OFI_SYNC_SEND_ACK (0x0001000000000000ULL) ++#define MPIDI_OFI_SYNC_SEND (0x0002000000000000ULL) ++#define MPIDI_OFI_DYNPROC_SEND (0x0004000000000000ULL) + #define MPIDI_OFI_MAJOR_VERSION MPIDI_OFI_MAJOR_VERSION_PSM2 + #define MPIDI_OFI_MINOR_VERSION MPIDI_OFI_MINOR_VERSION_PSM2 + #define MPIDI_OFI_CONTEXT_STRUCTS 1 + #endif + +-#define MPIDI_OFI_ENABLE_DATA_GNI MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_AV_TABLE_GNI MPIDI_OFI_ON +-#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_GNI MPIDI_OFI_OFF +-#define MPIDI_OFI_MAX_ENDPOINTS_GNI MPIDI_OFI_MAX_ENDPOINTS_REGULAR +-#define MPIDI_OFI_MAX_ENDPOINTS_BITS_GNI MPIDI_OFI_MAX_ENDPOINTS_BITS_REGULAR +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS_GNI MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_MR_SCALABLE_GNI MPIDI_OFI_OFF +-#ifdef MPIDI_OFI_FORCE_AM +-#define MPIDI_OFI_ENABLE_TAGGED_GNI MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_RMA_GNI MPIDI_OFI_OFF +-#else +-#define MPIDI_OFI_ENABLE_TAGGED_GNI MPIDI_OFI_ON +-#define MPIDI_OFI_ENABLE_RMA_GNI MPIDI_OFI_ON +-#endif +-#define MPIDI_OFI_ENABLE_AM_GNI MPIDI_OFI_ON +-#define MPIDI_OFI_ENABLE_ATOMICS_GNI MPIDI_OFI_ENABLE_RMA_GNI +-#define MPIDI_OFI_FETCH_ATOMIC_IOVECS_GNI 1 +-#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_GNI MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_GNI MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_PT2PT_NOPACK_GNI MPIDI_OFI_ON +-#define MPIDI_OFI_NUM_AM_BUFFERS_GNI MPIDI_OFI_MAX_NUM_AM_BUFFERS +-#define MPIDI_OFI_CONTEXT_BITS_GNI (16) +-#define MPIDI_OFI_SOURCE_BITS_GNI (24) +-#define MPIDI_OFI_TAG_BITS_GNI (20) +-#define MPIDI_OFI_MAJOR_VERSION_GNI 1 +-#define MPIDI_OFI_MINOR_VERSION_GNI 5 +- +-#ifdef MPIDI_CH4_OFI_USE_SET_GNI +-#define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_GNI +-#define MPIDI_OFI_ENABLE_RUNTIME_CHECKS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_DATA MPIDI_OFI_ENABLE_DATA_GNI +-#define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_OFI_ENABLE_AV_TABLE_GNI +-#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_GNI +-#define MPIDI_OFI_MAX_ENDPOINTS MPIDI_OFI_MAX_ENDPOINTS_GNI +-#define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_OFI_MAX_ENDPOINTS_BITS_GNI +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_ENABLE_SHARED_CONTEXTS_GNI +-#define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_OFI_ENABLE_MR_SCALABLE_GNI +-#define MPIDI_OFI_ENABLE_TAGGED MPIDI_OFI_ENABLE_TAGGED_GNI +-#define MPIDI_OFI_ENABLE_AM MPIDI_OFI_ENABLE_AM_GNI +-#define MPIDI_OFI_ENABLE_RMA MPIDI_OFI_ENABLE_RMA_GNI +-#define MPIDI_OFI_ENABLE_ATOMICS MPIDI_OFI_ENABLE_ATOMICS_GNI +-#define MPIDI_OFI_FETCH_ATOMIC_IOVECS MPIDI_OFI_FETCH_ATOMIC_IOVECS_GNI +-#define MPIDI_OFI_IOVEC_ALIGN (1) +-#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_GNI +-#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_GNI +-#define MPIDI_OFI_ENABLE_PT2PT_NOPACK MPIDI_OFI_ENABLE_PT2PT_NOPACK_GNI +-#define MPIDI_OFI_NUM_AM_BUFFERS MPIDI_OFI_NUM_AM_BUFFERS_GNI +-#define MPIDI_OFI_PROTOCOL_MASK (0xE000000000000000ULL) +-#define MPIDI_OFI_CONTEXT_MASK (0x0FFFF00000000000ULL) +-#define MPIDI_OFI_SOURCE_MASK (0x00000FFFFFF00000ULL) /* GNI does not support immediate data +- * so this field needs to be available */ +-#define MPIDI_OFI_TAG_MASK (0x00000000000FFFFFULL) +-#define MPIDI_OFI_CONTEXT_BITS MPIDI_OFI_CONTEXT_BITS_GNI +-#define MPIDI_OFI_SOURCE_BITS MPIDI_OFI_SOURCE_BITS_GNI +-#define MPIDI_OFI_TAG_BITS MPIDI_OFI_TAG_BITS_GNI +-#define MPIDI_OFI_SYNC_SEND_ACK (0x1000000000000000ULL) +-#define MPIDI_OFI_SYNC_SEND (0x2000000000000000ULL) +-#define MPIDI_OFI_DYNPROC_SEND (0x4000000000000000ULL) +-#define MPIDI_OFI_MAJOR_VERSION MPIDI_OFI_MAJOR_VERSION_GNI +-#define MPIDI_OFI_MINOR_VERSION MPIDI_OFI_MINOR_VERSION_GNI +-#define MPIDI_OFI_CONTEXT_STRUCTS 1 +-#endif +- +-#define MPIDI_OFI_ENABLE_DATA_SOCKETS MPIDI_OFI_ON + #define MPIDI_OFI_ENABLE_AV_TABLE_SOCKETS MPIDI_OFI_ON + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_SOCKETS MPIDI_OFI_ON + #define MPIDI_OFI_MAX_ENDPOINTS_SOCKETS MPIDI_OFI_MAX_ENDPOINTS_SCALABLE +@@ -317,12 +186,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #ifdef MPIDI_CH4_OFI_USE_SET_SOCKETS + #define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_SOCKETS + #define MPIDI_OFI_ENABLE_RUNTIME_CHECKS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_DATA MPIDI_OFI_ENABLE_DATA_SOCKETS + #define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_OFI_ENABLE_AV_TABLE_SOCKETS + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_SOCKETS + #define MPIDI_OFI_MAX_ENDPOINTS MPIDI_OFI_MAX_ENDPOINTS_SOCKETS + #define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_OFI_MAX_ENDPOINTS_BITS_SOCKETS +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_ENABLE_SHARED_CONTEXTS_SOCKETS ++#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_global.settings.enable_shared_contexts /* Always controlled by CVAR */ + #define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_OFI_ENABLE_MR_SCALABLE_SOCKETS + #define MPIDI_OFI_ENABLE_TAGGED MPIDI_OFI_ENABLE_TAGGED_SOCKETS + #define MPIDI_OFI_ENABLE_AM MPIDI_OFI_ENABLE_AM_SOCKETS +@@ -350,7 +218,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #define MPIDI_OFI_CONTEXT_STRUCTS 1 + #endif + +-#define MPIDI_OFI_ENABLE_DATA_BGQ MPIDI_OFI_ON + #define MPIDI_OFI_ENABLE_AV_TABLE_BGQ MPIDI_OFI_OFF + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_BGQ MPIDI_OFI_OFF + #define MPIDI_OFI_MAX_ENDPOINTS_BGQ MPIDI_OFI_MAX_ENDPOINTS_REGULAR +@@ -380,12 +247,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #ifdef MPIDI_CH4_OFI_USE_SET_BGQ + #define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_BGQ + #define MPIDI_OFI_ENABLE_RUNTIME_CHECKS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_DATA MPIDI_OFI_ENABLE_DATA_BGQ + #define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_OFI_ENABLE_AV_TABLE_BGQ + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_BGQ + #define MPIDI_OFI_MAX_ENDPOINTS MPIDI_OFI_MAX_ENDPOINTS_BGQ + #define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_OFI_MAX_ENDPOINTS_BITS_BGQ +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_ENABLE_SHARED_CONTEXTS_BGQ ++#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_global.settings.enable_shared_contexts /* Always controlled by CVAR */ + #define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_OFI_ENABLE_MR_SCALABLE_BGQ + #define MPIDI_OFI_ENABLE_TAGGED MPIDI_OFI_ENABLE_TAGGED_BGQ + #define MPIDI_OFI_ENABLE_AM MPIDI_OFI_ENABLE_AM_BGQ +@@ -413,70 +279,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #define MPIDI_OFI_CONTEXT_STRUCTS 2 + #endif + +-#define MPIDI_OFI_ENABLE_DATA_VERBS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_AV_TABLE_VERBS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_VERBS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS_VERBS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_MR_SCALABLE_VERBS MPIDI_OFI_OFF +-#ifdef MPIDI_OFI_FORCE_AM +-#define MPIDI_OFI_ENABLE_TAGGED_VERBS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_RMA_VERBS MPIDI_OFI_OFF +-#else +-#define MPIDI_OFI_ENABLE_TAGGED_VERBS MPIDI_OFI_ON +-#define MPIDI_OFI_ENABLE_RMA_VERBS MPIDI_OFI_OFF /* OFI/verbs doesn't support delivery complete */ +-#endif +-#define MPIDI_OFI_ENABLE_AM_VERBS MPIDI_OFI_ON +-#define MPIDI_OFI_ENABLE_ATOMICS_VERBS MPIDI_OFI_OFF +-#define MPIDI_OFI_MAX_ENDPOINTS_VERBS MPIDI_OFI_MAX_ENDPOINTS_REGULAR +-#define MPIDI_OFI_MAX_ENDPOINTS_BITS_VERBS MPIDI_OFI_MAX_ENDPOINTS_BITS_REGULAR +-#define MPIDI_OFI_FETCH_ATOMIC_IOVECS_VERBS 1 +-#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_VERBS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_VERBS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_PT2PT_NOPACK_VERBS MPIDI_OFI_ON +-#define MPIDI_OFI_NUM_AM_BUFFERS_VERBS MPIDI_OFI_MAX_NUM_AM_BUFFERS +-#define MPIDI_OFI_CONTEXT_BITS_VERBS (16) +-#define MPIDI_OFI_SOURCE_BITS_VERBS (24) +-#define MPIDI_OFI_TAG_BITS_VERBS (20) +-#define MPIDI_OFI_MAJOR_VERSION_VERBS 1 +-#define MPIDI_OFI_MINOR_VERSION_VERBS 4 +- +-#ifdef MPIDI_CH4_OFI_USE_SET_VERBS +-#define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_VERBS +-#define MPIDI_OFI_ENABLE_RUNTIME_CHECKS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_DATA MPIDI_OFI_ENABLE_DATA_VERBS +-#define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_OFI_ENABLE_AV_TABLE_VERBS +-#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_VERBS +-#define MPIDI_OFI_MAX_ENDPOINTS MPIDI_OFI_MAX_ENDPOINTS_VERBS +-#define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_OFI_MAX_ENDPOINTS_BITS_VERBS +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_ENABLE_SHARED_CONTEXTS_VERBS +-#define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_OFI_ENABLE_MR_SCALABLE_VERBS +-#define MPIDI_OFI_ENABLE_TAGGED MPIDI_OFI_ENABLE_TAGGED_VERBS +-#define MPIDI_OFI_ENABLE_AM MPIDI_OFI_ENABLE_AM_VERBS +-#define MPIDI_OFI_ENABLE_RMA MPIDI_OFI_ENABLE_RMA_VERBS +-#define MPIDI_OFI_ENABLE_ATOMICS MPIDI_OFI_ENABLE_ATOMICS_VERBS +-#define MPIDI_OFI_FETCH_ATOMIC_IOVECS MPIDI_OFI_FETCH_ATOMIC_IOVECS_VERBS +-#define MPIDI_OFI_IOVEC_ALIGN (1) +-#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_VERBS +-#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_VERBS +-#define MPIDI_OFI_ENABLE_PT2PT_NOPACK MPIDI_OFI_ENABLE_PT2PT_NOPACK_VERBS +-#define MPIDI_OFI_NUM_AM_BUFFERS MPIDI_OFI_NUM_AM_BUFFERS_VERBS +-#define MPIDI_OFI_PROTOCOL_MASK (0xE000000000000000ULL) +-#define MPIDI_OFI_CONTEXT_MASK (0x0FFFF00000000000ULL) +-#define MPIDI_OFI_SOURCE_MASK (0x00000FFFFFF00000ULL) /* Verbs does not support immediate data +- * so this field needs to be available */ +-#define MPIDI_OFI_TAG_MASK (0x00000000000FFFFFULL) +-#define MPIDI_OFI_CONTEXT_BITS MPIDI_OFI_CONTEXT_BITS_VERBS +-#define MPIDI_OFI_SOURCE_BITS MPIDI_OFI_SOURCE_BITS_VERBS +-#define MPIDI_OFI_TAG_BITS MPIDI_OFI_TAG_BITS_VERBS +-#define MPIDI_OFI_SYNC_SEND_ACK (0x1000000000000000ULL) +-#define MPIDI_OFI_SYNC_SEND (0x2000000000000000ULL) +-#define MPIDI_OFI_DYNPROC_SEND (0x4000000000000000ULL) +-#define MPIDI_OFI_MAJOR_VERSION MPIDI_OFI_MAJOR_VERSION_VERBS +-#define MPIDI_OFI_MINOR_VERSION MPIDI_OFI_MINOR_VERSION_VERBS +-#define MPIDI_OFI_CONTEXT_STRUCTS 1 +-#endif +- +-#define MPIDI_OFI_ENABLE_DATA_RXM MPIDI_OFI_OFF + #define MPIDI_OFI_ENABLE_AV_TABLE_RXM MPIDI_OFI_OFF + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_RXM MPIDI_OFI_OFF + #define MPIDI_OFI_ENABLE_SHARED_CONTEXTS_RXM MPIDI_OFI_OFF +@@ -498,20 +300,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #define MPIDI_OFI_ENABLE_PT2PT_NOPACK_RXM MPIDI_OFI_ON + #define MPIDI_OFI_NUM_AM_BUFFERS_RXM MPIDI_OFI_MAX_NUM_AM_BUFFERS + #define MPIDI_OFI_CONTEXT_BITS_RXM (16) +-#define MPIDI_OFI_SOURCE_BITS_RXM (24) +-#define MPIDI_OFI_TAG_BITS_RXM (20) ++#define MPIDI_OFI_SOURCE_BITS_RXM (0) ++#define MPIDI_OFI_TAG_BITS_RXM (31) + #define MPIDI_OFI_MAJOR_VERSION_RXM 1 +-#define MPIDI_OFI_MINOR_VERSION_RXM 5 ++#define MPIDI_OFI_MINOR_VERSION_RXM 6 + + #ifdef MPIDI_CH4_OFI_USE_SET_RXM + #define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_RXM + #define MPIDI_OFI_ENABLE_RUNTIME_CHECKS MPIDI_OFI_OFF +-#define MPIDI_OFI_ENABLE_DATA MPIDI_OFI_ENABLE_DATA_RXM + #define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_OFI_ENABLE_AV_TABLE_RXM + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_RXM + #define MPIDI_OFI_MAX_ENDPOINTS MPIDI_OFI_MAX_ENDPOINTS_RXM + #define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_OFI_MAX_ENDPOINTS_BITS_RXM +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_ENABLE_SHARED_CONTEXTS_RXM ++#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_global.settings.enable_shared_contexts /* Always controlled by CVAR */ + #define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_OFI_ENABLE_MR_SCALABLE_RXM + #define MPIDI_OFI_ENABLE_TAGGED MPIDI_OFI_ENABLE_TAGGED_RXM + #define MPIDI_OFI_ENABLE_AM MPIDI_OFI_ENABLE_AM_RXM +@@ -523,24 +324,55 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_RXM + #define MPIDI_OFI_ENABLE_PT2PT_NOPACK MPIDI_OFI_ENABLE_PT2PT_NOPACK_RXM + #define MPIDI_OFI_NUM_AM_BUFFERS MPIDI_OFI_NUM_AM_BUFFERS_RXM +-#define MPIDI_OFI_PROTOCOL_MASK (0xE000000000000000ULL) +-#define MPIDI_OFI_CONTEXT_MASK (0x0FFFF00000000000ULL) +-#define MPIDI_OFI_SOURCE_MASK (0x00000FFFFFF00000ULL) /* RxM does not support immediate data +- * so this field needs to be available */ +-#define MPIDI_OFI_TAG_MASK (0x00000000000FFFFFULL) ++#define MPIDI_OFI_PROTOCOL_MASK (0x0006000000000000ULL) ++#define MPIDI_OFI_CONTEXT_MASK (0x0000FFFF00000000ULL) ++#define MPIDI_OFI_SOURCE_MASK (0x0000000000000000ULL) /* RxM does support immediate data ++ * so this field is zeroed */ ++#define MPIDI_OFI_TAG_MASK (0x000000007FFFFFFFULL) + #define MPIDI_OFI_CONTEXT_BITS MPIDI_OFI_CONTEXT_BITS_RXM + #define MPIDI_OFI_SOURCE_BITS MPIDI_OFI_SOURCE_BITS_RXM + #define MPIDI_OFI_TAG_BITS MPIDI_OFI_TAG_BITS_RXM +-#define MPIDI_OFI_SYNC_SEND_ACK (0x1000000000000000ULL) +-#define MPIDI_OFI_SYNC_SEND (0x2000000000000000ULL) +-#define MPIDI_OFI_DYNPROC_SEND (0x4000000000000000ULL) ++#define MPIDI_OFI_SYNC_SEND_ACK (0x0001000000000000ULL) ++#define MPIDI_OFI_SYNC_SEND (0x0002000000000000ULL) ++#define MPIDI_OFI_DYNPROC_SEND (0x0004000000000000ULL) + #define MPIDI_OFI_MAJOR_VERSION MPIDI_OFI_MAJOR_VERSION_RXM + #define MPIDI_OFI_MINOR_VERSION MPIDI_OFI_MINOR_VERSION_RXM + #define MPIDI_OFI_CONTEXT_STRUCTS 1 + #endif + +-/* capability set for default provider (to request the minimal supported capability) */ +-#define MPIDI_OFI_ENABLE_DATA_MINIMAL MPIDI_OFI_OFF ++/* capability set to request the default supported capabilities (reasonable performance with a ++ * reasonable set of requirements) */ ++#define MPIDI_OFI_ENABLE_AV_TABLE_DEFAULT MPIDI_OFI_ON ++#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_DEFAULT MPIDI_OFI_OFF ++#define MPIDI_OFI_MAX_ENDPOINTS_DEFAULT MPIDI_OFI_MAX_ENDPOINTS_REGULAR ++#define MPIDI_OFI_MAX_ENDPOINTS_BITS_DEFAULT MPIDI_OFI_MAX_ENDPOINTS_BITS_REGULAR ++#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS_DEFAULT MPIDI_OFI_OFF ++#define MPIDI_OFI_ENABLE_MR_SCALABLE_DEFAULT MPIDI_OFI_OFF ++#define MPIDI_OFI_ENABLE_TAGGED_DEFAULT MPIDI_OFI_ON ++#define MPIDI_OFI_ENABLE_RMA_DEFAULT MPIDI_OFI_ON ++#define MPIDI_OFI_ENABLE_AM_DEFAULT MPIDI_OFI_ON ++#define MPIDI_OFI_ENABLE_ATOMICS_DEFAULT MPIDI_OFI_ENABLE_RMA_DEFAULT ++#define MPIDI_OFI_FETCH_ATOMIC_IOVECS_DEFAULT 1 ++#define MPIDI_OFI_IOVEC_ALIGN_DEFAULT (1) ++#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS_DEFAULT MPIDI_OFI_OFF ++#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS_DEFAULT MPIDI_OFI_OFF ++#define MPIDI_OFI_ENABLE_PT2PT_NOPACK_DEFAULT MPIDI_OFI_ON ++#define MPIDI_OFI_NUM_AM_BUFFERS_DEFAULT MPIDI_OFI_MAX_NUM_AM_BUFFERS ++#define MPIDI_OFI_PROTOCOL_MASK_DEFAULT (0x0006000000000000ULL) ++#define MPIDI_OFI_CONTEXT_MASK_DEFAULT (0x0000FFFF00000000ULL) ++#define MPIDI_OFI_SOURCE_MASK_DEFAULT (0x0000000000000000ULL) /* We require support for immediate data ++ * so this field is zeroed */ ++#define MPIDI_OFI_TAG_MASK_DEFAULT (0x000000007FFFFFFFULL) ++#define MPIDI_OFI_CONTEXT_BITS_DEFAULT (16) ++#define MPIDI_OFI_SOURCE_BITS_DEFAULT (0) ++#define MPIDI_OFI_TAG_BITS_DEFAULT (31) ++#define MPIDI_OFI_SYNC_SEND_ACK_DEFAULT (0x0001000000000000ULL) ++#define MPIDI_OFI_SYNC_SEND_DEFAULT (0x0002000000000000ULL) ++#define MPIDI_OFI_DYNPROC_SEND_DEFAULT (0x0004000000000000ULL) ++#define MPIDI_OFI_MAJOR_VERSION_DEFAULT FI_MAJOR_VERSION ++#define MPIDI_OFI_MINOR_VERSION_DEFAULT FI_MINOR_VERSION ++ ++/* capability set to request the minimal supported capabilities */ + #define MPIDI_OFI_ENABLE_AV_TABLE_MINIMAL MPIDI_OFI_ON + #define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS_MINIMAL MPIDI_OFI_OFF + #define MPIDI_OFI_MAX_ENDPOINTS_MINIMAL MPIDI_OFI_MAX_ENDPOINTS_REGULAR +@@ -572,30 +404,29 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_set_number(const char *set_name) + #define MPIDI_OFI_MINOR_VERSION_MINIMAL FI_MINOR_VERSION + + #ifdef MPIDI_CH4_OFI_USE_SET_RUNTIME +-#define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_UNKNOWN ++#define MPIDI_OFI_SET_NUMBER MPIDI_OFI_SET_NUMBER_DEFAULT + #define MPIDI_OFI_ENABLE_RUNTIME_CHECKS 1 +-#define MPIDI_OFI_ENABLE_DATA MPIDI_Global.settings.enable_data +-#define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_Global.settings.enable_av_table +-#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_Global.settings.enable_scalable_endpoints +-#define MPIDI_OFI_MAX_ENDPOINTS MPIDI_Global.settings.max_endpoints +-#define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_Global.settings.max_endpoints_bits +-#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_Global.settings.enable_shared_contexts +-#define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_Global.settings.enable_mr_scalable +-#define MPIDI_OFI_ENABLE_TAGGED MPIDI_Global.settings.enable_tagged +-#define MPIDI_OFI_ENABLE_AM MPIDI_Global.settings.enable_am +-#define MPIDI_OFI_ENABLE_RMA MPIDI_Global.settings.enable_rma +-#define MPIDI_OFI_ENABLE_ATOMICS MPIDI_Global.settings.enable_atomics +-#define MPIDI_OFI_FETCH_ATOMIC_IOVECS MPIDI_Global.settings.fetch_atomic_iovecs ++#define MPIDI_OFI_ENABLE_AV_TABLE MPIDI_OFI_global.settings.enable_av_table ++#define MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS MPIDI_OFI_global.settings.enable_scalable_endpoints ++#define MPIDI_OFI_MAX_ENDPOINTS MPIDI_OFI_global.settings.max_endpoints ++#define MPIDI_OFI_MAX_ENDPOINTS_BITS MPIDI_OFI_global.settings.max_endpoints_bits ++#define MPIDI_OFI_ENABLE_SHARED_CONTEXTS MPIDI_OFI_global.settings.enable_shared_contexts ++#define MPIDI_OFI_ENABLE_MR_SCALABLE MPIDI_OFI_global.settings.enable_mr_scalable ++#define MPIDI_OFI_ENABLE_TAGGED MPIDI_OFI_global.settings.enable_tagged ++#define MPIDI_OFI_ENABLE_AM MPIDI_OFI_global.settings.enable_am ++#define MPIDI_OFI_ENABLE_RMA MPIDI_OFI_global.settings.enable_rma ++#define MPIDI_OFI_ENABLE_ATOMICS MPIDI_OFI_global.settings.enable_atomics ++#define MPIDI_OFI_FETCH_ATOMIC_IOVECS MPIDI_OFI_global.settings.fetch_atomic_iovecs + #define MPIDI_OFI_IOVEC_ALIGN (1) /* Compile time configuration only */ +-#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS MPIDI_Global.settings.enable_data_auto_progress +-#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS MPIDI_Global.settings.enable_control_auto_progress +-#define MPIDI_OFI_ENABLE_PT2PT_NOPACK MPIDI_Global.settings.enable_pt2pt_nopack +-#define MPIDI_OFI_NUM_AM_BUFFERS MPIDI_Global.settings.num_am_buffers +-#define MPIDI_OFI_CONTEXT_BITS MPIDI_Global.settings.context_bits +-#define MPIDI_OFI_SOURCE_BITS MPIDI_Global.settings.source_bits +-#define MPIDI_OFI_TAG_BITS MPIDI_Global.settings.tag_bits +-#define MPIDI_OFI_MAJOR_VERSION MPIDI_Global.settings.major_version +-#define MPIDI_OFI_MINOR_VERSION MPIDI_Global.settings.minor_version ++#define MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS MPIDI_OFI_global.settings.enable_data_auto_progress ++#define MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS MPIDI_OFI_global.settings.enable_control_auto_progress ++#define MPIDI_OFI_ENABLE_PT2PT_NOPACK MPIDI_OFI_global.settings.enable_pt2pt_nopack ++#define MPIDI_OFI_NUM_AM_BUFFERS MPIDI_OFI_global.settings.num_am_buffers ++#define MPIDI_OFI_CONTEXT_BITS MPIDI_OFI_global.settings.context_bits ++#define MPIDI_OFI_SOURCE_BITS MPIDI_OFI_global.settings.source_bits ++#define MPIDI_OFI_TAG_BITS MPIDI_OFI_global.settings.tag_bits ++#define MPIDI_OFI_MAJOR_VERSION MPIDI_OFI_global.settings.major_version ++#define MPIDI_OFI_MINOR_VERSION MPIDI_OFI_global.settings.minor_version + #define MPIDI_OFI_CONTEXT_STRUCTS 2 /* Compile time configurable only */ + #endif + +--- a/src/mpid/ch4/netmod/ofi/ofi_coll.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_coll.h +@@ -16,10 +16,6 @@ + #include "ch4_coll_params.h" + #include "ofi_coll_select.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag, + const void *ch4_algo_parameters_container_in) + { +@@ -52,10 +48,6 @@ static inline int MPIDI_NM_mpi_barrier(MPIR_Comm * comm, MPIR_Errflag_t * errfla + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_bcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag, + const void *ch4_algo_parameters_container_in) +@@ -100,10 +92,6 @@ static inline int MPIDI_NM_mpi_bcast(void *buffer, int count, MPI_Datatype datat + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag, +@@ -146,10 +134,6 @@ static inline int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Errflag_t * errflag, +@@ -200,10 +184,6 @@ static inline int MPIDI_NM_mpi_allgather(const void *sendbuf, int sendcount, MPI + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -255,10 +235,6 @@ static inline int MPIDI_NM_mpi_allgatherv(const void *sendbuf, int sendcount, MP + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag, +@@ -297,10 +273,6 @@ static inline int MPIDI_NM_mpi_gather(const void *sendbuf, int sendcount, MPI_Da + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -342,10 +314,6 @@ static inline int MPIDI_NM_mpi_gatherv(const void *sendbuf, int sendcount, MPI_D + + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag, +@@ -384,10 +352,6 @@ static inline int MPIDI_NM_mpi_scatter(const void *sendbuf, int sendcount, MPI_D + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_scatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -428,10 +392,6 @@ static inline int MPIDI_NM_mpi_scatterv(const void *sendbuf, const int *sendcoun + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Errflag_t * errflag, +@@ -487,10 +447,6 @@ static inline int MPIDI_NM_mpi_alltoall(const void *sendbuf, int sendcount, MPI_ + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +@@ -541,10 +497,6 @@ static inline int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const int *sendcou + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -595,10 +547,6 @@ static inline int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const int sendcoun + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm, MPIR_Errflag_t * errflag, +@@ -642,10 +590,6 @@ static inline int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, int co + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, +@@ -700,10 +644,6 @@ static inline int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, +@@ -759,10 +699,6 @@ static inline int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *r + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag, +@@ -800,10 +736,6 @@ static inline int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, int coun + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag, +@@ -841,10 +773,6 @@ static inline int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, int co + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -862,10 +790,6 @@ static inline int MPIDI_NM_mpi_neighbor_allgather(const void *sendbuf, int sendc + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -882,10 +806,6 @@ static inline int MPIDI_NM_mpi_neighbor_allgatherv(const void *sendbuf, int send + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -902,10 +822,6 @@ static inline int MPIDI_NM_mpi_neighbor_alltoall(const void *sendbuf, int sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -923,10 +839,6 @@ static inline int MPIDI_NM_mpi_neighbor_alltoallv(const void *sendbuf, const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -944,10 +856,6 @@ static inline int MPIDI_NM_mpi_neighbor_alltoallw(const void *sendbuf, const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -964,10 +872,6 @@ static inline int MPIDI_NM_mpi_ineighbor_allgather(const void *sendbuf, int send + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -985,10 +889,6 @@ static inline int MPIDI_NM_mpi_ineighbor_allgatherv(const void *sendbuf, int sen + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -1005,10 +905,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoall(const void *sendbuf, int sendc + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -1026,10 +922,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallv(const void *sendbuf, const in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -1048,10 +940,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbuf, const in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm, MPIR_Request ** req) + { + int mpi_errno; +@@ -1064,10 +952,6 @@ static inline int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm, MPIR_Request ** req) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ibcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm, MPIR_Request ** req) + { +@@ -1081,10 +965,6 @@ static inline int MPIDI_NM_mpi_ibcast(void *buffer, int count, MPI_Datatype data + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Request ** req) +@@ -1100,10 +980,6 @@ static inline int MPIDI_NM_mpi_iallgather(const void *sendbuf, int sendcount, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -1121,10 +997,6 @@ static inline int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request ** request) +@@ -1139,10 +1011,6 @@ static inline int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm, MPIR_Request ** req) +@@ -1158,10 +1026,6 @@ static inline int MPIDI_NM_mpi_ialltoall(const void *sendbuf, int sendcount, MPI + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +@@ -1179,10 +1043,6 @@ static inline int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const int *sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const int *sendcounts, + const int *sdispls, const MPI_Datatype sendtypes[], + void *recvbuf, const int *recvcounts, +@@ -1200,10 +1060,6 @@ static inline int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const int *sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request ** req) +@@ -1218,10 +1074,6 @@ static inline int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, int c + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Request ** req) +@@ -1237,10 +1089,6 @@ static inline int MPIDI_NM_mpi_igather(const void *sendbuf, int sendcount, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -1257,10 +1105,6 @@ static inline int MPIDI_NM_mpi_igatherv(const void *sendbuf, int sendcount, MPI_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, +@@ -1277,10 +1121,6 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_block(const void *sendbuf, void * + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, MPIR_Request ** req) +@@ -1295,10 +1135,6 @@ static inline int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbu + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm, MPIR_Request ** req) +@@ -1313,10 +1149,6 @@ static inline int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, int c + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request ** req) +@@ -1331,10 +1163,6 @@ static inline int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, int cou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -1351,10 +1179,6 @@ static inline int MPIDI_NM_mpi_iscatter(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, +@@ -1372,10 +1196,6 @@ static inline int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const int *sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibarrier_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno; +@@ -1389,10 +1209,6 @@ static inline int MPIDI_NM_mpi_ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibcast_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ibcast_sched(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm, MPIR_Sched_t s) + { +@@ -1407,10 +1223,6 @@ static inline int MPIDI_NM_mpi_ibcast_sched(void *buffer, int count, MPI_Datatyp + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallgather_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -1428,10 +1240,6 @@ static inline int MPIDI_NM_mpi_iallgather_sched(const void *sendbuf, int sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallgatherv_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -1450,10 +1258,6 @@ static inline int MPIDI_NM_mpi_iallgatherv_sched(const void *sendbuf, int sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallreduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallreduce_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -1469,10 +1273,6 @@ static inline int MPIDI_NM_mpi_iallreduce_sched(const void *sendbuf, void *recvb + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoall_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -1490,10 +1290,6 @@ static inline int MPIDI_NM_mpi_ialltoall_sched(const void *sendbuf, int sendcoun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoallv_sched(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -1512,10 +1308,6 @@ static inline int MPIDI_NM_mpi_ialltoallv_sched(const void *sendbuf, const int s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoallw_sched(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -1534,10 +1326,6 @@ static inline int MPIDI_NM_mpi_ialltoallw_sched(const void *sendbuf, const int s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iexscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iexscan_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -1553,10 +1341,6 @@ static inline int MPIDI_NM_mpi_iexscan_sched(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_igather_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -1574,10 +1358,6 @@ static inline int MPIDI_NM_mpi_igather_sched(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_igatherv_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -1596,10 +1376,6 @@ static inline int MPIDI_NM_mpi_igatherv_sched(const void *sendbuf, int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_block_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_scatter_block_sched(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, +@@ -1617,10 +1393,6 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_block_sched(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_scatter_sched(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, MPIR_Sched_t s) +@@ -1637,10 +1409,6 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_sched(const void *sendbuf, void * + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm, MPIR_Sched_t s) +@@ -1656,10 +1424,6 @@ static inline int MPIDI_NM_mpi_ireduce_sched(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscan_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -1675,10 +1439,6 @@ static inline int MPIDI_NM_mpi_iscan_sched(const void *sendbuf, void *recvbuf, i + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscatter_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -1696,10 +1456,6 @@ static inline int MPIDI_NM_mpi_iscatter_sched(const void *sendbuf, int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatterv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscatterv_sched(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -1717,10 +1473,6 @@ static inline int MPIDI_NM_mpi_iscatterv_sched(const void *sendbuf, const int *s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_allgather_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -1738,10 +1490,6 @@ static inline int MPIDI_NM_mpi_ineighbor_allgather_sched(const void *sendbuf, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_allgatherv_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], +@@ -1761,10 +1509,6 @@ static inline int MPIDI_NM_mpi_ineighbor_allgatherv_sched(const void *sendbuf, i + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoall_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -1782,10 +1526,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoall_sched(const void *sendbuf, int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoallv_sched(const void *sendbuf, + const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, +@@ -1806,10 +1546,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallv_sched(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoallw_sched(const void *sendbuf, + const int sendcounts[], + const MPI_Aint sdispls[], +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/ofi_comm.c +@@ -0,0 +1,90 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ofi_impl.h" ++#include "mpidu_bc.h" ++#include "ofi_noinline.h" ++ ++int MPIDI_OFI_mpi_comm_create_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_CHKLMEM_DECL(1); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_COMM_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_COMM_CREATE_HOOK); ++ ++ MPIDIU_map_create(&MPIDI_OFI_COMM(comm).huge_send_counters, MPL_MEM_COMM); ++ MPIDIU_map_create(&MPIDI_OFI_COMM(comm).huge_recv_counters, MPL_MEM_COMM); ++ ++ mpi_errno = MPIDIG_init_comm(comm); ++ ++ /* no connection for non-dynamic or non-root-rank of intercomm */ ++ MPIDI_OFI_COMM(comm).conn_id = -1; ++ ++ /* eagain defaults to off */ ++ MPIDI_OFI_COMM(comm).eagain = FALSE; ++ ++ /* if this is MPI_COMM_WORLD, finish bc exchange */ ++ if (comm == MPIR_Process.comm_world && MPIR_CVAR_CH4_ROOTS_ONLY_PMI) { ++ void *table; ++ fi_addr_t *mapped_table; ++ size_t rem_bcs, num_nodes = MPIDI_global.max_node_id + 1; ++ int i, curr, node; ++ ++ MPIR_Assert(MPII_Comm_is_node_consecutive(comm)); ++ rem_bcs = MPIR_Comm_size(comm) - num_nodes; ++ MPIDU_bc_allgather(comm, MPIDI_global.node_map[0], &MPIDI_OFI_global.addrname, ++ MPIDI_OFI_global.addrnamelen, TRUE, &table, NULL); ++ MPIR_CHKLMEM_MALLOC(mapped_table, fi_addr_t *, rem_bcs * sizeof(fi_addr_t), ++ mpi_errno, "mapped_table", MPL_MEM_ADDRESS); ++ MPIDI_OFI_CALL(fi_av_insert(MPIDI_OFI_global.av, table, rem_bcs, mapped_table, 0ULL, NULL), ++ avmap); ++ ++ /* insert new addresses, skipping over node roots */ ++ for (i = 1, curr = 0, node = 0; i < MPIR_Comm_size(comm); i++) { ++ if (comm->internode_table[i] == node + 1) { ++ node++; ++ continue; ++ } ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).dest = mapped_table[curr]; ++#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; ++#else ++#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; ++#endif ++#endif ++ curr++; ++ } ++ MPIDU_bc_table_destroy(table); ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_COMM_CREATE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_comm_free_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_COMM_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_COMM_FREE_HOOK); ++ ++ mpi_errno = MPIDIG_destroy_comm(comm); ++ MPIDIU_map_destroy(MPIDI_OFI_COMM(comm).huge_send_counters); ++ MPIDIU_map_destroy(MPIDI_OFI_COMM(comm).huge_recv_counters); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_COMM_FREE_HOOK); ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ofi/ofi_comm.h ++++ /dev/null +@@ -1,106 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef OFI_COMM_H_INCLUDED +-#define OFI_COMM_H_INCLUDED +- +-#include "ofi_impl.h" +-#include "utlist.h" +-#include "mpidu_bc.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_CHKLMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- +- MPIDI_CH4U_map_create(&MPIDI_OFI_COMM(comm).huge_send_counters, MPL_MEM_COMM); +- MPIDI_CH4U_map_create(&MPIDI_OFI_COMM(comm).huge_recv_counters, MPL_MEM_COMM); +- MPIDI_OFI_index_allocator_create(&MPIDI_OFI_COMM(comm).win_id_allocator, 0, MPL_MEM_RMA); +- MPIDI_OFI_index_allocator_create(&MPIDI_OFI_COMM(comm).rma_id_allocator, 1, MPL_MEM_RMA); +- +- mpi_errno = MPIDI_CH4U_init_comm(comm); +- +- /* no connection for non-dynamic or non-root-rank of intercomm */ +- MPIDI_OFI_COMM(comm).conn_id = -1; +- +- /* eagain defaults to off */ +- MPIDI_OFI_COMM(comm).eagain = FALSE; +- +- /* if this is MPI_COMM_WORLD, finish bc exchange */ +- if (comm == MPIR_Process.comm_world && MPIR_CVAR_CH4_ROOTS_ONLY_PMI) { +- void *table; +- fi_addr_t *mapped_table; +- size_t rem_bcs, num_nodes = MPIDI_CH4_Global.max_node_id + 1; +- int i, curr, node; +- +- MPIR_Assert(MPII_Comm_is_node_consecutive(comm)); +- rem_bcs = MPIR_Comm_size(comm) - num_nodes; +- MPIDU_bc_allgather(comm, MPIDI_CH4_Global.node_map[0], &MPIDI_Global.addrname, +- MPIDI_Global.addrnamelen, TRUE, &table, NULL); +- MPIR_CHKLMEM_MALLOC(mapped_table, fi_addr_t *, rem_bcs * sizeof(fi_addr_t), +- mpi_errno, "mapped_table", MPL_MEM_ADDRESS); +- MPIDI_OFI_CALL(fi_av_insert(MPIDI_Global.av, table, rem_bcs, mapped_table, 0ULL, NULL), +- avmap); +- +- /* insert new addresses, skipping over node roots */ +- for (i = 1, curr = 0, node = 0; i < MPIR_Comm_size(comm); i++) { +- if (comm->internode_table[i] == node + 1) { +- node++; +- continue; +- } +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).dest = mapped_table[curr]; +-#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; +-#else +-#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; +-#endif +-#endif +- curr++; +- } +- MPIDU_bc_table_destroy(table); +- } +- +- fn_exit: +- MPIR_CHKLMEM_FREEALL(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- +- mpi_errno = MPIDI_CH4U_destroy_comm(comm); +- MPIDI_CH4U_map_destroy(MPIDI_OFI_COMM(comm).huge_send_counters); +- MPIDI_CH4U_map_destroy(MPIDI_OFI_COMM(comm).huge_recv_counters); +- MPIDI_OFI_index_allocator_destroy(MPIDI_OFI_COMM(comm).win_id_allocator); +- MPIDI_OFI_index_allocator_destroy(MPIDI_OFI_COMM(comm).rma_id_allocator); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- return mpi_errno; +-} +- +- +-#endif /* OFI_COMM_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ofi/ofi_control.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_control.h +@@ -13,10 +13,6 @@ + + #include "ofi_am_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_control_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_control_send(MPIDI_OFI_send_control_t * control, + char *send_buf, + size_t msgsize, +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/ofi_datatype.c +@@ -0,0 +1,24 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ofi_impl.h" ++#include "ofi_noinline.h" ++ ++int MPIDI_OFI_mpi_type_free_hook(MPIR_Datatype * datatype_p) ++{ ++ return 0; ++} ++ ++int MPIDI_OFI_mpi_type_commit_hook(MPIR_Datatype * datatype_p) ++{ ++ return 0; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ofi/ofi_datatype.h ++++ /dev/null +@@ -1,26 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef OFI_DATATYPE_H_INCLUDED +-#define OFI_DATATYPE_H_INCLUDED +- +-#include "ofi_impl.h" +- +-static inline int MPIDI_NM_mpi_type_free_hook(MPIR_Datatype * datatype_p) +-{ +- return 0; +-} +- +-static inline int MPIDI_NM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) +-{ +- return 0; +-} +- +-#endif /* OFI_DATATYPE_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ofi/ofi_events.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_events.h +@@ -22,41 +22,30 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_huge_event(struct fi_cq_tagged_entry + + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_cqe_get_source(struct fi_cq_tagged_entry *wc) + { +- if (MPIDI_OFI_ENABLE_DATA) +- return wc->data; +- else +- return MPIDI_OFI_init_get_source(wc->tag); ++ return wc->data; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_peek_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_peek_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * rreq) + { + size_t count; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_NETMOD_PEEK_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_NETMOD_PEEK_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_PEEK_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_PEEK_EVENT); + MPIDI_OFI_REQUEST(rreq, util_id) = MPIDI_OFI_PEEK_FOUND; + rreq->status.MPI_SOURCE = MPIDI_OFI_cqe_get_source(wc); + rreq->status.MPI_TAG = MPIDI_OFI_init_get_tag(wc->tag); + count = wc->len; + rreq->status.MPI_ERROR = MPI_SUCCESS; + MPIR_STATUS_SET_COUNT(rreq->status, count); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_NETMOD_PEEK_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_PEEK_EVENT); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_peek_empty_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_peek_empty_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * rreq) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_NETMOD_PEEK_EMPTY_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_NETMOD_PEEK_EMPTY_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_PEEK_EMPTY_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_PEEK_EMPTY_EVENT); + MPIDI_OFI_dynamic_process_request_t *ctrl; + + switch (MPIDI_OFI_REQUEST(rreq, event_id)) { +@@ -75,22 +64,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_peek_empty_event(struct fi_cq_tagged_entr + break; + } + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_NETMOD_PEEK_EMPTY_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_PEEK_EMPTY_EVENT); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_recv_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * rreq, int event_id) + { + int mpi_errno = MPI_SUCCESS; +- MPI_Aint last; + size_t count; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_RECV_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_RECV_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_RECV_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_RECV_EVENT); + + rreq->status.MPI_ERROR = MPI_SUCCESS; + rreq->status.MPI_SOURCE = MPIDI_OFI_cqe_get_source(wc); +@@ -100,29 +84,32 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_event(struct fi_cq_tagged_entry *wc, + + #ifndef MPIDI_CH4_DIRECT_NETMOD + +- if (MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq)) { ++ if (MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq)) { + int continue_matching = 1; + +- MPIDI_CH4R_anysource_matched(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq), MPIDI_CH4R_NETMOD, +- &continue_matching); ++ MPIDI_anysource_matched(MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq), MPIDI_NETMOD, ++ &continue_matching); + + /* It is always possible to cancel a request on shm side w/o an aux thread */ + + /* Decouple requests */ +- if (unlikely(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq))) { +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq)) = NULL; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq) = NULL; ++ if (unlikely(MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq))) { ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq)) = NULL; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq) = NULL; + } + MPIR_Request_free(rreq); + } + #endif + if ((event_id == MPIDI_OFI_EVENT_RECV_PACK || event_id == MPIDI_OFI_EVENT_GET_HUGE) && + (MPIDI_OFI_REQUEST(rreq, noncontig.pack))) { +- last = count; +- MPIR_Segment_unpack(&MPIDI_OFI_REQUEST(rreq, noncontig.pack->segment), 0, &last, +- MPIDI_OFI_REQUEST(rreq, noncontig.pack->pack_buffer)); ++ MPI_Aint actual_unpack_bytes; ++ MPIR_Typerep_unpack(MPIDI_OFI_REQUEST(rreq, noncontig.pack->pack_buffer), count, ++ MPIDI_OFI_REQUEST(rreq, noncontig.pack->buf), ++ MPIDI_OFI_REQUEST(rreq, noncontig.pack->count), ++ MPIDI_OFI_REQUEST(rreq, noncontig.pack->datatype), 0, ++ &actual_unpack_bytes); + MPL_free(MPIDI_OFI_REQUEST(rreq, noncontig.pack)); +- if (last != (MPI_Aint) count) { ++ if (actual_unpack_bytes != (MPI_Aint) count) { + rreq->status.MPI_ERROR = + MPIR_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, +@@ -143,7 +130,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_event(struct fi_cq_tagged_entry *wc, + + MPIR_Datatype_release_if_not_builtin(MPIDI_OFI_REQUEST(rreq, datatype)); + +- /* If syncronous, ack and complete when the ack is done */ ++ /* If synchronous, ack and complete when the ack is done */ + if (unlikely(MPIDI_OFI_is_tag_sync(wc->tag))) { + uint64_t ss_bits = MPIDI_OFI_init_sendtag(MPIDI_OFI_REQUEST(rreq, util_id), + MPIDI_OFI_REQUEST(rreq, util_comm->rank), +@@ -151,7 +138,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_event(struct fi_cq_tagged_entry *wc, + MPIDI_OFI_SYNC_SEND_ACK); + MPIR_Comm *c = MPIDI_OFI_REQUEST(rreq, util_comm); + int r = rreq->status.MPI_SOURCE; +- mpi_errno = MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, NULL, 0, NULL, ++ mpi_errno = MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, NULL, 0, NULL, + MPIDI_OFI_REQUEST(rreq, util_comm->rank), + MPIDI_OFI_comm_to_phys(c, r), + ss_bits, NULL, MPIDI_OFI_DO_INJECT, +@@ -160,11 +147,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_event(struct fi_cq_tagged_entry *wc, + MPIR_ERR_POP(mpi_errno); + } + +- MPIDI_CH4U_request_complete(rreq); ++ MPIDIU_request_complete(rreq); + + /* Polling loop will check for truncation */ + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_RECV_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_RECV_EVENT); + return mpi_errno; + fn_fail: + rreq->status.MPI_ERROR = mpi_errno; +@@ -173,22 +160,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_event(struct fi_cq_tagged_entry *wc, + + /* If we posted a huge receive, this event gets called to translate the + * completion queue entry into a get huge event */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_recv_huge_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_huge_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; +- MPIDI_OFI_huge_recv_t *recv = NULL; ++ MPIDI_OFI_huge_recv_t *recv_elem = NULL; + MPIR_Comm *comm_ptr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_RECV_HUGE_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_RECV_HUGE_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_RECV_HUGE_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_RECV_HUGE_EVENT); + + /* Check that the sender didn't underflow the message by sending less than + * the huge message threshold. */ +- if (wc->len < MPIDI_Global.max_send) { ++ if (wc->len < MPIDI_OFI_global.max_msg_size) { + return MPIDI_OFI_recv_event(wc, rreq, MPIDI_OFI_REQUEST(rreq, event_id)); + } + +@@ -215,15 +198,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_huge_event(struct fi_cq_tagged_entry + + LL_DELETE(MPIDI_unexp_huge_recv_head, MPIDI_unexp_huge_recv_tail, list_ptr); + +- recv = list_ptr; +- MPIDI_CH4U_map_set(MPIDI_OFI_COMM(comm_ptr).huge_recv_counters, rreq->handle, recv, +- MPL_MEM_COMM); ++ recv_elem = list_ptr; ++ MPIDIU_map_set(MPIDI_OFI_COMM(comm_ptr).huge_recv_counters, rreq->handle, recv_elem, ++ MPL_MEM_COMM); + break; + } + } + } + +- if (recv == NULL) { ++ if (recv_elem == NULL) { + MPIDI_OFI_huge_recv_list_t *list_ptr; + + MPL_DBG_MSG_FMT(MPIR_DBG_PT2PT, VERBOSE, +@@ -231,10 +214,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_huge_event(struct fi_cq_tagged_entry + comm_ptr->context_id, MPIDI_OFI_cqe_get_source(wc), + (MPIDI_OFI_TAG_MASK & wc->tag))); + +- recv = (MPIDI_OFI_huge_recv_t *) MPL_calloc(sizeof(*recv), 1, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP(recv == NULL, mpi_errno, MPI_ERR_OTHER, "**outofmemory"); +- MPIDI_CH4U_map_set(MPIDI_OFI_COMM(comm_ptr).huge_recv_counters, rreq->handle, recv, +- MPL_MEM_BUFFER); ++ recv_elem = (MPIDI_OFI_huge_recv_t *) MPL_calloc(sizeof(*recv_elem), 1, MPL_MEM_BUFFER); ++ MPIR_ERR_CHKANDJUMP(recv_elem == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ MPIDIU_map_set(MPIDI_OFI_COMM(comm_ptr).huge_recv_counters, rreq->handle, recv_elem, ++ MPL_MEM_BUFFER); + + list_ptr = (MPIDI_OFI_huge_recv_list_t *) MPL_calloc(sizeof(*list_ptr), 1, MPL_MEM_BUFFER); + if (!list_ptr) +@@ -250,59 +233,50 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_huge_event(struct fi_cq_tagged_entry + + /* Plug the information for the huge event into the receive request and go + * to the get_huge_event function. */ +- recv->event_id = MPIDI_OFI_EVENT_GET_HUGE; +- recv->localreq = rreq; +- recv->done_fn = MPIDI_OFI_recv_event; +- recv->wc = *wc; +- MPIDI_OFI_get_huge_event(NULL, (MPIR_Request *) recv); ++ recv_elem->event_id = MPIDI_OFI_EVENT_GET_HUGE; ++ recv_elem->localreq = rreq; ++ recv_elem->done_fn = MPIDI_OFI_recv_event; ++ recv_elem->wc = *wc; ++ MPIDI_OFI_get_huge_event(NULL, (MPIR_Request *) recv_elem); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_RECV_HUGE_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_RECV_HUGE_EVENT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_send_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * sreq, int event_id) + { + int c; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_SEND_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_SEND_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_SEND_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_SEND_EVENT); + + MPIR_cc_decr(sreq->cc_ptr, &c); + + if (c == 0) { +- if ((event_id == MPIDI_OFI_EVENT_SEND_PACK) && (MPIDI_OFI_REQUEST(sreq, noncontig.pack))) ++ if ((event_id == MPIDI_OFI_EVENT_SEND_PACK) && (MPIDI_OFI_REQUEST(sreq, noncontig.pack))) { + MPL_free(MPIDI_OFI_REQUEST(sreq, noncontig.pack)); +- else if (MPIDI_OFI_ENABLE_PT2PT_NOPACK && (event_id == MPIDI_OFI_EVENT_SEND_NOPACK) && +- MPIDI_OFI_REQUEST(sreq, noncontig.nopack)) ++ } else if (MPIDI_OFI_ENABLE_PT2PT_NOPACK && (event_id == MPIDI_OFI_EVENT_SEND_NOPACK)) + MPL_free(MPIDI_OFI_REQUEST(sreq, noncontig.nopack)); + + MPIR_Datatype_release_if_not_builtin(MPIDI_OFI_REQUEST(sreq, datatype)); + MPIR_Request_free(sreq); + } + /* c != 0, ssend */ +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_SEND_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_SEND_EVENT); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_send_huge_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_huge_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; + int c; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_SEND_EVENT_HUGE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_SEND_EVENT_HUGE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_SEND_EVENT_HUGE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_SEND_EVENT_HUGE); + + MPIR_cc_decr(sreq->cc_ptr, &c); + +@@ -314,145 +288,128 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_huge_event(struct fi_cq_tagged_entry + comm = MPIDI_OFI_REQUEST(sreq, util_comm); + + /* Look for the memory region using the sreq handle */ +- ptr = MPIDI_CH4U_map_lookup(MPIDI_OFI_COMM(comm).huge_send_counters, sreq->handle); +- MPIR_Assert(ptr != MPIDI_CH4U_MAP_NOT_FOUND); ++ ptr = MPIDIU_map_lookup(MPIDI_OFI_COMM(comm).huge_send_counters, sreq->handle); ++ MPIR_Assert(ptr != MPIDIU_MAP_NOT_FOUND); + + huge_send_mr = (struct fid_mr *) ptr; + + /* Send a cleanup message to the receivier and clean up local + * resources. */ + /* Clean up the local counter */ +- MPIDI_CH4U_map_erase(MPIDI_OFI_COMM(comm).huge_send_counters, sreq->handle); ++ MPIDIU_map_erase(MPIDI_OFI_COMM(comm).huge_send_counters, sreq->handle); + + /* Clean up the memory region */ + if (MPIDI_OFI_ENABLE_MR_SCALABLE) { +- MPIR_Context_id_t contextid; +- int type; +- uint32_t key_back; + uint64_t key = fi_mr_key(huge_send_mr); +- +- MPIDI_OFI_rma_key_unpack(key, &contextid, &type, &key_back); +- MPIR_Assert(type == MPIDI_OFI_KEY_TYPE_HUGE_RMA); +- MPIR_Assert(contextid == MPIR_CONTEXT_READ_FIELD(PREFIX, comm->context_id)); +- +- MPIDI_OFI_index_allocator_free(MPIDI_OFI_COMM(comm).rma_id_allocator, key_back); ++ MPIDI_OFI_mr_key_free(key); + } + MPIDI_OFI_CALL_NOLOCK(fi_close(&huge_send_mr->fid), mr_unreg); + +- if (MPIDI_OFI_REQUEST(sreq, noncontig.pack)) ++ if (MPIDI_OFI_REQUEST(sreq, noncontig.pack)) { + MPL_free(MPIDI_OFI_REQUEST(sreq, noncontig.pack)); ++ } + + MPIR_Datatype_release_if_not_builtin(MPIDI_OFI_REQUEST(sreq, datatype)); + MPIR_Request_free(sreq); + } + /* c != 0, ssend */ + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_SEND_EVENT_HUGE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_SEND_EVENT_HUGE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_ssend_ack_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_ssend_ack_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * sreq) + { + int mpi_errno; + MPIDI_OFI_ssendack_request_t *req = (MPIDI_OFI_ssendack_request_t *) sreq; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_SSEND_ACK_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_SSEND_ACK_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_SSEND_ACK_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_SSEND_ACK_EVENT); + mpi_errno = + MPIDI_OFI_send_event(NULL, req->signal_req, MPIDI_OFI_REQUEST(req->signal_req, event_id)); + + MPL_free(req); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_SSEND_ACK_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_SSEND_ACK_EVENT); + return mpi_errno; + } + +-MPL_STATIC_INLINE_PREFIX uintptr_t MPIDI_OFI_recv_rbase(MPIDI_OFI_huge_recv_t * recv) ++MPL_STATIC_INLINE_PREFIX uintptr_t MPIDI_OFI_recv_rbase(MPIDI_OFI_huge_recv_t * recv_elem) + { + if (MPIDI_OFI_ENABLE_MR_SCALABLE) { + return 0; + } else { +- return recv->remote_info.send_buf; ++ return recv_elem->remote_info.send_buf; + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_get_huge_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_huge_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * req) + { + int mpi_errno = MPI_SUCCESS; +- MPIDI_OFI_huge_recv_t *recv = (MPIDI_OFI_huge_recv_t *) req; ++ MPIDI_OFI_huge_recv_t *recv_elem = (MPIDI_OFI_huge_recv_t *) req; + uint64_t remote_key; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_GETHUGE_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_GETHUGE_EVENT); +- +- if (recv->localreq && recv->cur_offset != 0) { /* If this is true, then the message has a posted +- * receive already and we'll be able to find the +- * struct describing the transfer. */ +- /* Subtract one max_send because we send the first chunk via a regular message instead of the memory region */ +- size_t bytesSent = recv->cur_offset - MPIDI_Global.max_send; +- size_t bytesLeft = recv->remote_info.msgsize - bytesSent - MPIDI_Global.max_send; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_GETHUGE_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_GETHUGE_EVENT); ++ ++ if (recv_elem->localreq && recv_elem->cur_offset != 0) { /* If this is true, then the message has a posted ++ * receive already and we'll be able to find the ++ * struct describing the transfer. */ ++ /* Subtract one max_msg_size because we send the first chunk via a regular message instead of the memory region */ ++ size_t bytesSent = recv_elem->cur_offset - MPIDI_OFI_global.max_msg_size; ++ size_t bytesLeft = ++ recv_elem->remote_info.msgsize - bytesSent - MPIDI_OFI_global.max_msg_size; + size_t bytesToGet = +- (bytesLeft <= MPIDI_Global.max_send) ? bytesLeft : MPIDI_Global.max_send; ++ (bytesLeft <= ++ MPIDI_OFI_global.max_msg_size) ? bytesLeft : MPIDI_OFI_global.max_msg_size; + + if (bytesToGet == 0ULL) { + MPIDI_OFI_send_control_t ctrl; +- /* recv->localreq may be freed during done_fn. +- * Need to backup the handle here for later use with MPIDI_CH4U_map_erase. */ +- uint64_t key_to_erase = recv->localreq->handle; +- recv->wc.len = recv->cur_offset; +- recv->done_fn(&recv->wc, recv->localreq, recv->event_id); ++ /* recv_elem->localreq may be freed during done_fn. ++ * Need to backup the handle here for later use with MPIDIU_map_erase. */ ++ uint64_t key_to_erase = recv_elem->localreq->handle; ++ recv_elem->wc.len = recv_elem->cur_offset; ++ recv_elem->done_fn(&recv_elem->wc, recv_elem->localreq, recv_elem->event_id); + ctrl.type = MPIDI_OFI_CTRL_HUGEACK; + MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_do_control_send +- (&ctrl, NULL, 0, recv->remote_info.origin_rank, recv->comm_ptr, +- recv->remote_info.ackreq, FALSE)); ++ (&ctrl, NULL, 0, recv_elem->remote_info.origin_rank, ++ recv_elem->comm_ptr, recv_elem->remote_info.ackreq, FALSE)); + +- MPIDI_CH4U_map_erase(MPIDI_OFI_COMM(recv->comm_ptr).huge_recv_counters, key_to_erase); +- MPL_free(recv); ++ MPIDIU_map_erase(MPIDI_OFI_COMM(recv_elem->comm_ptr).huge_recv_counters, key_to_erase); ++ MPL_free(recv_elem); + + goto fn_exit; + } + +- remote_key = recv->remote_info.rma_key; ++ remote_key = recv_elem->remote_info.rma_key; + + MPIDI_OFI_cntr_incr(); +- MPIDI_OFI_CALL_RETRY(fi_read(MPIDI_Global.ctx[0].tx, /* endpoint */ +- (void *) ((uintptr_t) recv->wc.buf + recv->cur_offset), /* local buffer */ ++ MPIDI_OFI_CALL_RETRY(fi_read(MPIDI_OFI_global.ctx[0].tx, /* endpoint */ ++ (void *) ((uintptr_t) recv_elem->wc.buf + recv_elem->cur_offset), /* local buffer */ + bytesToGet, /* bytes */ + NULL, /* descriptor */ +- MPIDI_OFI_comm_to_phys(recv->comm_ptr, recv->remote_info.origin_rank), /* Destination */ +- MPIDI_OFI_recv_rbase(recv) + recv->cur_offset, /* remote maddr */ ++ MPIDI_OFI_comm_to_phys(recv_elem->comm_ptr, recv_elem->remote_info.origin_rank), /* Destination */ ++ MPIDI_OFI_recv_rbase(recv_elem) + recv_elem->cur_offset, /* remote maddr */ + remote_key, /* Key */ +- (void *) &recv->context), rdma_readfrom, /* Context */ ++ (void *) &recv_elem->context), rdma_readfrom, /* Context */ + MPIDI_OFI_CALL_NO_LOCK, FALSE); +- recv->cur_offset += bytesToGet; ++ recv_elem->cur_offset += bytesToGet; + } + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_GETHUGE_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_GETHUGE_EVENT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_chunk_done_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_chunk_done_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * req) + { + int c; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_CHUNK_DONE_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_CHUNK_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CHUNK_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CHUNK_DONE_EVENT); + + MPIDI_OFI_chunk_request *creq = (MPIDI_OFI_chunk_request *) req; + MPIR_cc_decr(creq->parent->cc_ptr, &c); +@@ -461,95 +418,75 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_chunk_done_event(struct fi_cq_tagged_entr + MPIR_Request_free(creq->parent); + + MPL_free(creq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_CHUNK_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CHUNK_DONE_EVENT); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_inject_emu_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_inject_emu_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * req) + { + int incomplete; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_INJECT_EMU_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_INJECT_EMU_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_INJECT_EMU_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_INJECT_EMU_EVENT); + + MPIR_cc_decr(req->cc_ptr, &incomplete); + + if (!incomplete) { + MPL_free(MPIDI_OFI_REQUEST(req, util.inject_buf)); + MPIR_Request_free(req); +- OPA_decr_int(&MPIDI_Global.am_inflight_inject_emus); ++ OPA_decr_int(&MPIDI_OFI_global.am_inflight_inject_emus); + } + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_INJECT_EMU_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_INJECT_EMU_EVENT); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_rma_done_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_rma_done_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * in_req) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_OFI_RMA_DONE_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_OFI_RMA_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_RMA_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_RMA_DONE_EVENT); + + MPIDI_OFI_win_request_t *req = (MPIDI_OFI_win_request_t *) in_req; + MPIDI_OFI_win_request_complete(req); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CH4_OFI_RMA_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_RMA_DONE_EVENT); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_accept_probe_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_accept_probe_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * rreq) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_OFI_ACCEPT_PROBE_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_OFI_ACCEPT_PROBE_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_ACCEPT_PROBE_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_ACCEPT_PROBE_EVENT); + MPIDI_OFI_dynamic_process_request_t *ctrl = (MPIDI_OFI_dynamic_process_request_t *) rreq; + ctrl->source = MPIDI_OFI_cqe_get_source(wc); + ctrl->tag = MPIDI_OFI_init_get_tag(wc->tag); + ctrl->msglen = wc->len; + ctrl->done = MPIDI_OFI_PEEK_FOUND; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CH4_OFI_ACCEPT_PROBE_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_ACCEPT_PROBE_EVENT); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_dynproc_done_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_dynproc_done_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * rreq) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_OFI_DYNPROC_DONE_EVENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_OFI_DYNPROC_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_DONE_EVENT); + MPIDI_OFI_dynamic_process_request_t *ctrl = (MPIDI_OFI_dynamic_process_request_t *) rreq; + ctrl->done++; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CH4_OFI_DYNPROC_DONE_EVENT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_DONE_EVENT); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_am_isend_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_isend_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_OFI_am_header_t *msg_hdr; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_HANDLE_SEND_COMPLETION); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_HANDLE_SEND_COMPLETION); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_AM_ISEND_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_AM_ISEND_EVENT); + + msg_hdr = &MPIDI_OFI_AMREQUEST_HDR(sreq, msg_hdr); + MPID_Request_complete(sreq); /* FIXME: Should not call MPIDI in NM ? */ +@@ -563,10 +500,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_isend_event(struct fi_cq_tagged_entry + break; + } + +- if (MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer)) { +- MPL_free(MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer)); +- MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer) = NULL; +- } ++ MPL_free(MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer)); ++ MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer) = NULL; + + mpi_errno = MPIDIG_global.origin_cbs[msg_hdr->handler_id] (sreq); + +@@ -574,26 +509,44 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_isend_event(struct fi_cq_tagged_entry + MPIR_ERR_POP(mpi_errno); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_HANDLE_SEND_COMPLETION); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_AM_ISEND_EVENT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_am_recv_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_recv_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_OFI_am_header_t *am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_HANDLE_RECV_COMPLETION); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_HANDLE_RECV_COMPLETION); ++ MPIDI_OFI_am_unordered_msg_t *uo_msg = NULL; ++ fi_addr_t fi_src_addr; ++ uint16_t expected_seqno, next_seqno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_AM_RECV_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_AM_RECV_EVENT); + + am_hdr = (MPIDI_OFI_am_header_t *) wc->buf; + ++ expected_seqno = MPIDI_OFI_am_get_next_recv_seqno(am_hdr->fi_src_addr); ++ if (am_hdr->seqno != expected_seqno) { ++ /* This message came earlier than the one that we were expecting. ++ * Put it in the queue to process it later. */ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, TERSE, ++ (MPL_DBG_FDEST, ++ "Expected seqno=%d but got %d (am_type=%d addr=%" PRIx64 "). " ++ "Enqueueing it to the queue.\n", ++ expected_seqno, am_hdr->seqno, am_hdr->am_type, am_hdr->fi_src_addr)); ++ mpi_errno = MPIDI_OFI_am_enqueue_unordered_msg(am_hdr); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ } ++ ++ /* Received an expected message */ ++ repeat: ++ fi_src_addr = am_hdr->fi_src_addr; ++ next_seqno = am_hdr->seqno + 1; + switch (am_hdr->am_type) { + case MPIDI_AMTYPE_SHORT_HDR: + mpi_errno = MPIDI_OFI_handle_short_am_hdr(am_hdr, am_hdr->payload); +@@ -631,17 +584,27 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_recv_event(struct fi_cq_tagged_entry * + MPIR_Assert(0); + } + ++ /* For the first iteration (=in case we can process the message just received ++ * from OFI immediately), uo_msg is NULL, so freeing it is no-op. ++ * Otherwise, free it here before getting another uo_msg. */ ++ MPL_free(uo_msg); ++ ++ /* See if we can process other messages in the queue */ ++ if ((uo_msg = MPIDI_OFI_am_claim_unordered_msg(fi_src_addr, next_seqno)) != NULL) { ++ am_hdr = &uo_msg->am_hdr; ++ goto repeat; ++ } ++ ++ /* Record the next expected sequence number from fi_src_addr */ ++ MPIDI_OFI_am_set_next_recv_seqno(fi_src_addr, next_seqno); ++ + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_HANDLE_RECV_COMPLETION); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_AM_RECV_EVENT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_am_read_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_read_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * dont_use_me) + { +@@ -649,8 +612,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_read_event(struct fi_cq_tagged_entry * + MPIR_Request *rreq; + MPIDI_OFI_am_request_t *ofi_req; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_HANDLE_READ_COMPLETION); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_HANDLE_READ_COMPLETION); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_AM_READ_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_AM_READ_EVENT); + + ofi_req = MPL_container_of(wc->op_context, MPIDI_OFI_am_request_t, context); + ofi_req->req_hdr->lmt_cntr--; +@@ -670,32 +633,28 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_read_event(struct fi_cq_tagged_entry * + MPID_Request_complete(rreq); /* FIXME: Should not call MPIDI in NM ? */ + ofi_req->req_hdr->target_cmpl_cb(rreq); + fn_exit: +- MPIDI_CH4R_release_buf((void *) ofi_req); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_HANDLE_READ_COMPLETION); ++ MPIDIU_release_buf((void *) ofi_req); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_AM_READ_EVENT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_am_repost_event +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_am_repost_event(struct fi_cq_tagged_entry *wc, + MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_REPOST_BUFFER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_REPOST_BUFFER); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_AM_REPOST_EVENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_AM_REPOST_EVENT); + + mpi_errno = MPIDI_OFI_repost_buffer(wc->op_context, rreq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_REPOST_BUFFER); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_AM_REPOST_EVENT); + return mpi_errno; + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_dispatch_function(struct fi_cq_tagged_entry *wc, +- MPIR_Request * req, int buffered) ++ MPIR_Request * req) + { + int mpi_errno = MPI_SUCCESS; + +@@ -719,7 +678,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_dispatch_function(struct fi_cq_tagged_ent + if (wc->flags & FI_RECV) + mpi_errno = MPIDI_OFI_am_recv_event(wc, req); + +- if (unlikely((wc->flags & FI_MULTI_RECV) && !buffered)) ++ if (unlikely(wc->flags & FI_MULTI_RECV)) + mpi_errno = MPIDI_OFI_am_repost_event(wc, req); + + goto fn_exit; +@@ -792,28 +751,25 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_dispatch_function(struct fi_cq_tagged_ent + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_get_buffered +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_buffered(struct fi_cq_tagged_entry *wc, ssize_t num) + { + int rc = 0; + +- if ((MPIDI_Global.cq_buffered_static_head != MPIDI_Global.cq_buffered_static_tail) || +- (NULL != MPIDI_Global.cq_buffered_dynamic_head)) { ++ if ((MPIDI_OFI_global.cq_buffered_static_head != MPIDI_OFI_global.cq_buffered_static_tail) || ++ (NULL != MPIDI_OFI_global.cq_buffered_dynamic_head)) { + /* If the static list isn't empty, do so first */ +- if (MPIDI_Global.cq_buffered_static_head != MPIDI_Global.cq_buffered_static_tail) { ++ if (MPIDI_OFI_global.cq_buffered_static_head != MPIDI_OFI_global.cq_buffered_static_tail) { + wc[0] = +- MPIDI_Global.cq_buffered_static_list[MPIDI_Global.cq_buffered_static_tail].cq_entry; +- MPIDI_Global.cq_buffered_static_tail = +- (MPIDI_Global.cq_buffered_static_tail + 1) % MPIDI_OFI_NUM_CQ_BUFFERED; ++ MPIDI_OFI_global.cq_buffered_static_list[MPIDI_OFI_global. ++ cq_buffered_static_tail].cq_entry; ++ MPIDI_OFI_global.cq_buffered_static_tail = ++ (MPIDI_OFI_global.cq_buffered_static_tail + 1) % MPIDI_OFI_NUM_CQ_BUFFERED; + } + /* If there's anything in the dynamic list, it goes second. */ +- else if (NULL != MPIDI_Global.cq_buffered_dynamic_head) { +- MPIDI_OFI_cq_list_t *cq_list_entry = MPIDI_Global.cq_buffered_dynamic_head; +- LL_DELETE(MPIDI_Global.cq_buffered_dynamic_head, MPIDI_Global.cq_buffered_dynamic_tail, +- cq_list_entry); ++ else if (NULL != MPIDI_OFI_global.cq_buffered_dynamic_head) { ++ MPIDI_OFI_cq_list_t *cq_list_entry = MPIDI_OFI_global.cq_buffered_dynamic_head; ++ LL_DELETE(MPIDI_OFI_global.cq_buffered_dynamic_head, ++ MPIDI_OFI_global.cq_buffered_dynamic_tail, cq_list_entry); + wc[0] = cq_list_entry->cq_entry; + MPL_free(cq_list_entry); + } +@@ -824,45 +780,36 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_buffered(struct fi_cq_tagged_entry *w + return rc; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_handle_cq_entries +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_handle_cq_entries(struct fi_cq_tagged_entry *wc, +- ssize_t num, int buffered) ++MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_handle_cq_entries(struct fi_cq_tagged_entry *wc, ssize_t num) + { + int i, mpi_errno = MPI_SUCCESS; + MPIR_Request *req; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_HANDLE_CQ_ENTRIES); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_HANDLE_CQ_ENTRIES); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_HANDLE_CQ_ENTRIES); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_HANDLE_CQ_ENTRIES); + + for (i = 0; i < num; i++) { + req = MPIDI_OFI_context_to_request(wc[i].op_context); +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dispatch_function(&wc[i], req, buffered)); ++ MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dispatch_function(&wc[i], req)); + } + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_HANDLE_CQ_ENTRIES); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_HANDLE_CQ_ENTRIES); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_handle_cq_error +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_handle_cq_error(int vni_idx, ssize_t ret) ++MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_handle_cq_error(int vci_idx, ssize_t ret) + { + int mpi_errno = MPI_SUCCESS; + struct fi_cq_err_entry e; + MPIR_Request *req; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_HANDLE_CQ_ERROR); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_HANDLE_CQ_ERROR); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_HANDLE_CQ_ERROR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_HANDLE_CQ_ERROR); + + switch (ret) { + case -FI_EAVAIL: +- fi_cq_readerr(MPIDI_Global.ctx[vni_idx].cq, &e, 0); ++ fi_cq_readerr(MPIDI_OFI_global.ctx[vci_idx].cq, &e, 0); + + switch (e.err) { + case FI_ETRUNC: +@@ -870,20 +817,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_handle_cq_error(int vni_idx, ssize_t ret) + + switch (req->kind) { + case MPIR_REQUEST_KIND__SEND: +- mpi_errno = MPIDI_OFI_dispatch_function(NULL, req, 0); ++ mpi_errno = MPIDI_OFI_dispatch_function(NULL, req); + break; + + case MPIR_REQUEST_KIND__RECV: + mpi_errno = +- MPIDI_OFI_dispatch_function((struct fi_cq_tagged_entry *) &e, req, +- 0); ++ MPIDI_OFI_dispatch_function((struct fi_cq_tagged_entry *) &e, req); + req->status.MPI_ERROR = MPI_ERR_TRUNCATE; + break; + + default: + MPIR_ERR_SETFATALANDJUMP4(mpi_errno, MPI_ERR_OTHER, "**ofid_poll", + "**ofid_poll %s %d %s %s", __SHORT_FILE__, +- __LINE__, FCNAME, fi_strerror(e.err)); ++ __LINE__, __func__, fi_strerror(e.err)); + } + + break; +@@ -901,7 +847,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_handle_cq_error(int vni_idx, ssize_t ret) + default: + MPIR_ERR_SETFATALANDJUMP4(mpi_errno, MPI_ERR_OTHER, "**ofid_poll", + "**ofid_poll %s %d %s %s", __SHORT_FILE__, +- __LINE__, FCNAME, fi_strerror(e.err)); ++ __LINE__, __func__, fi_strerror(e.err)); + break; + } + +@@ -910,12 +856,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_handle_cq_error(int vni_idx, ssize_t ret) + default: + MPIR_ERR_SETFATALANDJUMP4(mpi_errno, MPI_ERR_OTHER, "**ofid_poll", + "**ofid_poll %s %d %s %s", __SHORT_FILE__, __LINE__, +- FCNAME, fi_strerror(errno)); ++ __func__, fi_strerror(errno)); + break; + } + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_HANDLE_CQ_ERROR); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_HANDLE_CQ_ERROR); + return mpi_errno; + fn_fail: + goto fn_exit; +--- a/src/mpid/ch4/netmod/ofi/ofi_impl.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_impl.h +@@ -36,10 +36,15 @@ + + /* Get op index. + * TODO: OP_NULL is the oddball. Change configure to table this correctly */ +-#define MPIDI_OFI_MPI_ACCU_OP_INDEX(op, op_index) do { \ +- if (op == MPI_OP_NULL) op_index = 14; \ +- else op_index = (0x000000FFU & op) - 1; \ +-} while (0); ++MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_get_mpi_acc_op_index(int op) ++{ ++ int op_index; ++ if (op == MPI_OP_NULL) ++ op_index = MPIDI_OFI_OP_SIZES - 1; ++ else ++ op_index = (0x000000FFU & op) - 1; ++ return op_index; ++} + + /* + * Helper routines and macros for request completion +@@ -57,9 +62,7 @@ + #define MPIDI_OFI_ERR MPIR_ERR_CHKANDJUMP4 + #define MPIDI_OFI_CALL(FUNC,STR) \ + do { \ +- MPID_THREAD_CS_ENTER(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + ssize_t _ret = FUNC; \ +- MPID_THREAD_CS_EXIT(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + MPIDI_OFI_ERR(_ret<0, \ + mpi_errno, \ + MPI_ERR_OTHER, \ +@@ -67,7 +70,7 @@ + "**ofid_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + fi_strerror(-_ret)); \ + } while (0) + +@@ -81,7 +84,7 @@ + "**ofid_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + fi_strerror(-_ret)); \ + } while (0) + +@@ -92,11 +95,7 @@ + ssize_t _ret; \ + int _retry = MPIR_CVAR_CH4_OFI_MAX_EAGAIN_RETRY; \ + do { \ +- if (LOCK == MPIDI_OFI_CALL_LOCK) \ +- MPID_THREAD_CS_ENTER(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + _ret = FUNC; \ +- if (LOCK == MPIDI_OFI_CALL_LOCK) \ +- MPID_THREAD_CS_EXIT(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + if (likely(_ret==0)) break; \ + MPIDI_OFI_ERR(_ret!=-FI_EAGAIN, \ + mpi_errno, \ +@@ -105,25 +104,21 @@ + "**ofid_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + fi_strerror(-_ret)); \ + MPIR_ERR_CHKANDJUMP(_retry == 0 && EAGAIN, \ + mpi_errno, \ + MPIX_ERR_EAGAIN, \ + "**eagain"); \ +- if (LOCK == MPIDI_OFI_CALL_NO_LOCK) \ +- MPID_THREAD_CS_EXIT(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + /* FIXME: by fixing the recursive locking interface to account + * for recursive locking in more than one lock (currently limited + * to one due to scalar TLS counter), this lock yielding + * operation can be avoided since we are inside a finite loop. */\ +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); \ ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); \ + mpi_errno = MPIDI_OFI_retry_progress(); \ +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); \ ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); \ + if (mpi_errno != MPI_SUCCESS) \ + MPIR_ERR_POP(mpi_errno); \ +- if (LOCK == MPIDI_OFI_CALL_NO_LOCK) \ +- MPID_THREAD_CS_ENTER(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + _retry--; \ + } while (_ret == -FI_EAGAIN); \ + } while (0) +@@ -131,11 +126,9 @@ + #define MPIDI_OFI_CALL_RETRY2(FUNC1,FUNC2,STR) \ + do { \ + ssize_t _ret; \ +- MPID_THREAD_CS_ENTER(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + FUNC1; \ + do { \ + _ret = FUNC2; \ +- MPID_THREAD_CS_EXIT(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + if (likely(_ret==0)) break; \ + MPIDI_OFI_ERR(_ret!=-FI_EAGAIN, \ + mpi_errno, \ +@@ -144,23 +137,20 @@ + "**ofid_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + fi_strerror(-_ret)); \ +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); \ ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); \ + mpi_errno = MPIDI_OFI_retry_progress(); \ +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); \ ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); \ + MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);\ + if (mpi_errno != MPI_SUCCESS) \ + MPIR_ERR_POP(mpi_errno); \ +- MPID_THREAD_CS_ENTER(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + } while (_ret == -FI_EAGAIN); \ + } while (0) + + #define MPIDI_OFI_CALL_RETURN(FUNC, _ret) \ + do { \ +- MPID_THREAD_CS_ENTER(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + (_ret) = FUNC; \ +- MPID_THREAD_CS_EXIT(POBJ,MPIDI_OFI_THREAD_FI_MUTEX); \ + } while (0) + + #define MPIDI_OFI_PMI_CALL_POP(FUNC,STR) \ +@@ -174,7 +164,7 @@ + "**ofid_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + #STR); \ + } while (0) + +@@ -196,7 +186,7 @@ + "**"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + #STR); \ + } while (0) + +@@ -207,21 +197,6 @@ + MPIR_Request_add_ref((req)); \ + } while (0) + +-#ifndef HAVE_DEBUGGER_SUPPORT +-#define MPIDI_OFI_SEND_REQUEST_CREATE_LW(req) \ +- do { \ +- (req) = MPIDI_Global.lw_send_req; \ +- MPIR_Request_add_ref((req)); \ +- } while (0) +-#else +-#define MPIDI_OFI_SEND_REQUEST_CREATE_LW(req) \ +- do { \ +- (req) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); \ +- MPIR_ERR_CHKANDSTMT((req) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); \ +- MPIR_cc_set(&(req)->cc, 0); \ +- } while (0) +-#endif +- + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_need_request_creation(const MPIR_Request * req) + { + if (MPIDI_CH4_MT_MODEL == MPIDI_CH4_MT_TRYLOCK) { +@@ -274,7 +249,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_lw_request_cc_val(void) + #define MPIDI_OFI_SEND_REQUEST_CREATE_LW_CONDITIONAL(req) \ + do { \ + if (MPIDI_CH4_MT_MODEL == MPIDI_CH4_MT_DIRECT) { \ +- MPIDI_OFI_SEND_REQUEST_CREATE_LW(req); \ ++ (req) = MPIR_Request_create_complete(MPIR_REQUEST_KIND__SEND); \ + } else { \ + if (MPIDI_OFI_need_request_creation(req)) { \ + MPIR_Assert((req) == NULL); \ +@@ -301,8 +276,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_lw_request_cc_val(void) + } \ + } while (0) + +-#define WINFO(w,rank) MPIDI_CH4U_WINFO(w,rank) +- + MPL_STATIC_INLINE_PREFIX uintptr_t MPIDI_OFI_winfo_base(MPIR_Win * w, int rank) + { + if (MPIDI_OFI_ENABLE_MR_SCALABLE) +@@ -326,21 +299,21 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_win_cntr_incr(MPIR_Win * win) + + MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_cntr_incr() + { +- MPIDI_Global.rma_issued_cntr++; ++ MPIDI_OFI_global.rma_issued_cntr++; + } + + /* Externs: see util.c for definition */ + int MPIDI_OFI_handle_cq_error_util(int ep_idx, ssize_t ret); + int MPIDI_OFI_retry_progress(void); + int MPIDI_OFI_control_handler(int handler_id, void *am_hdr, +- void **data, size_t * data_sz, int *is_contig, ++ void **data, size_t * data_sz, int is_local, int *is_contig, + MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); + int MPIDI_OFI_control_dispatch(void *buf); + void MPIDI_OFI_index_datatypes(void); +-void MPIDI_OFI_index_allocator_create(void **_indexmap, int start, MPL_memory_class class); +-int MPIDI_OFI_index_allocator_alloc(void *_indexmap, MPL_memory_class class); +-void MPIDI_OFI_index_allocator_free(void *_indexmap, int index); +-void MPIDI_OFI_index_allocator_destroy(void *_indexmap); ++void MPIDI_OFI_mr_key_allocator_init(void); ++uint64_t MPIDI_OFI_mr_key_alloc(void); ++void MPIDI_OFI_mr_key_free(uint64_t index); ++void MPIDI_OFI_mr_key_allocator_destroy(void); + + /* Common Utility functions used by the + * C and C++ components +@@ -349,50 +322,25 @@ void MPIDI_OFI_index_allocator_destroy(void *_indexmap); + MPL_STATIC_INLINE_PREFIX size_t MPIDI_OFI_check_acc_order_size(MPIR_Win * win, size_t max_size) + { + /* Check ordering limit, a value of -1 guarantees ordering for any data size. */ +- if ((MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_WAR) +- && MPIDI_Global.max_order_war != -1) { ++ if ((MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_WAR) ++ && MPIDI_OFI_global.max_order_war != -1) { + /* An order size value of 0 indicates that ordering is not guaranteed. */ +- MPIR_Assert(MPIDI_Global.max_order_war != 0); +- max_size = MPL_MIN(max_size, MPIDI_Global.max_order_war); ++ MPIR_Assert(MPIDI_OFI_global.max_order_war != 0); ++ max_size = MPL_MIN(max_size, MPIDI_OFI_global.max_order_war); + } +- if ((MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_WAW) +- && MPIDI_Global.max_order_waw != -1) { +- MPIR_Assert(MPIDI_Global.max_order_waw != 0); +- max_size = MPL_MIN(max_size, MPIDI_Global.max_order_waw); ++ if ((MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_WAW) ++ && MPIDI_OFI_global.max_order_waw != -1) { ++ MPIR_Assert(MPIDI_OFI_global.max_order_waw != 0); ++ max_size = MPL_MIN(max_size, MPIDI_OFI_global.max_order_waw); + } +- if ((MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_RAW) +- && MPIDI_Global.max_order_raw != -1) { +- MPIR_Assert(MPIDI_Global.max_order_raw != 0); +- max_size = MPL_MIN(max_size, MPIDI_Global.max_order_raw); ++ if ((MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_RAW) ++ && MPIDI_OFI_global.max_order_raw != -1) { ++ MPIR_Assert(MPIDI_OFI_global.max_order_raw != 0); ++ max_size = MPL_MIN(max_size, MPIDI_OFI_global.max_order_raw); + } + return max_size; + } + +-/* Set OFI attributes and capabilities for RMA. */ +-MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_set_rma_fi_info(MPIR_Win * win, struct fi_info *finfo) +-{ +- finfo->caps = FI_RMA | FI_WRITE | FI_READ | FI_ATOMIC; +- finfo->tx_attr->caps = FI_RMA | FI_WRITE | FI_READ | FI_ATOMIC; +- +- /* Update msg_order by accumulate ordering in window info. +- * Accumulate ordering cannot easily be changed once the window has been created. +- * OFI implementation ignores acc ordering hints issued in MPI_WIN_SET_INFO() +- * after window is created. */ +- finfo->tx_attr->msg_order = FI_ORDER_NONE; /* FI_ORDER_NONE is an alias for the value 0 */ +- if ((MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_RAR) == +- MPIDI_CH4I_ACCU_ORDER_RAR) +- finfo->tx_attr->msg_order |= FI_ORDER_RAR; +- if ((MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_RAW) == +- MPIDI_CH4I_ACCU_ORDER_RAW) +- finfo->tx_attr->msg_order |= FI_ORDER_RAW; +- if ((MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_WAR) == +- MPIDI_CH4I_ACCU_ORDER_WAR) +- finfo->tx_attr->msg_order |= FI_ORDER_WAR; +- if ((MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_WAW) == +- MPIDI_CH4I_ACCU_ORDER_WAW) +- finfo->tx_attr->msg_order |= FI_ORDER_WAW; +-} +- + MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_win_request_complete(MPIDI_OFI_win_request_t * req) + { + int in_use; +@@ -448,11 +396,6 @@ MPL_STATIC_INLINE_PREFIX uint64_t MPIDI_OFI_init_sendtag(MPIR_Context_id_t conte + uint64_t match_bits; + match_bits = contextid; + +- if (!MPIDI_OFI_ENABLE_DATA) { +- match_bits = (match_bits << MPIDI_OFI_SOURCE_BITS); +- match_bits |= source; +- } +- + match_bits = (match_bits << MPIDI_OFI_TAG_BITS); + match_bits |= (MPIDI_OFI_TAG_MASK & tag) | type; + return match_bits; +@@ -467,19 +410,7 @@ MPL_STATIC_INLINE_PREFIX uint64_t MPIDI_OFI_init_recvtag(uint64_t * mask_bits, + *mask_bits = MPIDI_OFI_PROTOCOL_MASK; + match_bits = contextid; + +- if (!MPIDI_OFI_ENABLE_DATA) { +- match_bits = (match_bits << MPIDI_OFI_SOURCE_BITS); +- +- if (MPI_ANY_SOURCE == source) { +- match_bits = (match_bits << MPIDI_OFI_TAG_BITS); +- *mask_bits |= MPIDI_OFI_SOURCE_MASK; +- } else { +- match_bits |= source; +- match_bits = (match_bits << MPIDI_OFI_TAG_BITS); +- } +- } else { +- match_bits = (match_bits << MPIDI_OFI_TAG_BITS); +- } ++ match_bits = (match_bits << MPIDI_OFI_TAG_BITS); + + if (MPI_ANY_TAG == tag) + *mask_bits |= MPIDI_OFI_TAG_MASK; +@@ -494,21 +425,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_init_get_tag(uint64_t match_bits) + return ((int) (match_bits & MPIDI_OFI_TAG_MASK)); + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_init_get_source(uint64_t match_bits) +-{ +- return ((int) ((match_bits & MPIDI_OFI_SOURCE_MASK) >> MPIDI_OFI_TAG_BITS)); +-} +- + MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_OFI_context_to_request(void *context) + { + char *base = (char *) context; + return (MPIR_Request *) MPL_container_of(base, MPIR_Request, dev.ch4.netmod); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_send_handler +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_handler(struct fid_ep *ep, const void *buf, size_t len, + void *desc, uint32_t src, fi_addr_t dest_addr, + uint64_t tag, void *context, int is_inject, +@@ -517,19 +439,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_handler(struct fid_ep *ep, const voi + int mpi_errno = MPI_SUCCESS; + + if (is_inject) { +- if (MPIDI_OFI_ENABLE_DATA) +- MPIDI_OFI_CALL_RETRY(fi_tinjectdata(ep, buf, len, src, dest_addr, tag), tinjectdata, +- do_lock, do_eagain); +- else +- MPIDI_OFI_CALL_RETRY(fi_tinject(ep, buf, len, dest_addr, tag), tinject, do_lock, +- do_eagain); ++ MPIDI_OFI_CALL_RETRY(fi_tinjectdata(ep, buf, len, src, dest_addr, tag), tinjectdata, ++ do_lock, do_eagain); + } else { +- if (MPIDI_OFI_ENABLE_DATA) +- MPIDI_OFI_CALL_RETRY(fi_tsenddata(ep, buf, len, desc, src, dest_addr, tag, context), +- tsenddata, do_lock, do_eagain); +- else +- MPIDI_OFI_CALL_RETRY(fi_tsend(ep, buf, len, desc, dest_addr, tag, context), tsend, +- do_lock, do_eagain); ++ MPIDI_OFI_CALL_RETRY(fi_tsenddata(ep, buf, len, desc, src, dest_addr, tag, context), ++ tsenddata, do_lock, do_eagain); + } + + fn_exit: +@@ -538,250 +452,42 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_handler(struct fid_ep *ep, const voi + goto fn_exit; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_conn_manager_insert_conn(fi_addr_t conn, int rank, int state) +-{ +- int conn_id = -1; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INSERT_CONN); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INSERT_CONN); +- +- /* We've run out of space in the connection table. Allocate more. */ +- if (MPIDI_Global.conn_mgr.next_conn_id == -1) { +- int old_max, new_max, i; +- old_max = MPIDI_Global.conn_mgr.max_n_conn; +- new_max = old_max + 1; +- MPIDI_Global.conn_mgr.free_conn_id = +- (int *) MPL_realloc(MPIDI_Global.conn_mgr.free_conn_id, new_max * sizeof(int), +- MPL_MEM_ADDRESS); +- for (i = old_max; i < new_max - 1; ++i) { +- MPIDI_Global.conn_mgr.free_conn_id[i] = i + 1; +- } +- MPIDI_Global.conn_mgr.free_conn_id[new_max - 1] = -1; +- MPIDI_Global.conn_mgr.max_n_conn = new_max; +- MPIDI_Global.conn_mgr.next_conn_id = old_max; +- } +- +- conn_id = MPIDI_Global.conn_mgr.next_conn_id; +- MPIDI_Global.conn_mgr.next_conn_id = MPIDI_Global.conn_mgr.free_conn_id[conn_id]; +- MPIDI_Global.conn_mgr.free_conn_id[conn_id] = -1; +- MPIDI_Global.conn_mgr.n_conn++; +- +- MPIR_Assert(MPIDI_Global.conn_mgr.n_conn <= MPIDI_Global.conn_mgr.max_n_conn); +- +- MPIDI_Global.conn_mgr.conn_list[conn_id].dest = conn; +- MPIDI_Global.conn_mgr.conn_list[conn_id].rank = rank; +- MPIDI_Global.conn_mgr.conn_list[conn_id].state = state; +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, " new_conn_id=%d for conn=%" PRIu64 " rank=%d state=%d", +- conn_id, conn, rank, MPIDI_Global.conn_mgr.conn_list[conn_id].state)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INSERT_CONN); +- return conn_id; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_conn_manager_remove_conn(int conn_id) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CONN_MANAGER_REMOVE_CONN); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CONN_MANAGER_REMOVE_CONN); +- +- MPIR_Assert(MPIDI_Global.conn_mgr.n_conn > 0); +- MPIDI_Global.conn_mgr.free_conn_id[conn_id] = MPIDI_Global.conn_mgr.next_conn_id; +- MPIDI_Global.conn_mgr.next_conn_id = conn_id; +- MPIDI_Global.conn_mgr.n_conn--; +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " free_conn_id=%d", conn_id)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CONN_MANAGER_REMOVE_CONN); +- return mpi_errno; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_dynproc_send_disconnect(int conn_id) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_Context_id_t context_id = 0xF000; +- MPIDI_OFI_dynamic_process_request_t req; +- uint64_t match_bits = 0; +- int close_msg = 0xcccccccc; +- int rank = MPIDI_Global.conn_mgr.conn_list[conn_id].rank; +- struct fi_msg_tagged msg; +- struct iovec msg_iov; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_SEND_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_SEND_DISCONNECT); +- +- if (MPIDI_Global.conn_mgr.conn_list[conn_id].state == MPIDI_OFI_DYNPROC_CONNECTED_CHILD) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, " send disconnect msg conn_id=%d from child side", +- conn_id)); +- match_bits = MPIDI_OFI_init_sendtag(context_id, rank, 1, MPIDI_OFI_DYNPROC_SEND); +- +- /* fi_av_map here is not quite right for some providers */ +- /* we need to get this connection from the sockname */ +- req.done = 0; +- req.event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- msg_iov.iov_base = &close_msg; +- msg_iov.iov_len = sizeof(close_msg); +- msg.msg_iov = &msg_iov; +- msg.desc = NULL; +- msg.iov_count = 0; +- msg.addr = MPIDI_Global.conn_mgr.conn_list[conn_id].dest; +- msg.tag = match_bits; +- msg.ignore = context_id; +- msg.context = (void *) &req.context; +- msg.data = 0; +- MPIDI_OFI_CALL_RETRY(fi_tsendmsg(MPIDI_Global.ctx[0].tx, &msg, +- FI_COMPLETION | FI_TRANSMIT_COMPLETE | +- (MPIDI_OFI_ENABLE_DATA ? FI_REMOTE_CQ_DATA : 0)), tsendmsg, +- MPIDI_OFI_CALL_LOCK, FALSE); +- MPIDI_OFI_PROGRESS_WHILE(!req.done); +- } +- +- switch (MPIDI_Global.conn_mgr.conn_list[conn_id].state) { +- case MPIDI_OFI_DYNPROC_CONNECTED_CHILD: +- MPIDI_Global.conn_mgr.conn_list[conn_id].state = +- MPIDI_OFI_DYNPROC_LOCAL_DISCONNECTED_CHILD; +- break; +- case MPIDI_OFI_DYNPROC_CONNECTED_PARENT: +- MPIDI_Global.conn_mgr.conn_list[conn_id].state = +- MPIDI_OFI_DYNPROC_LOCAL_DISCONNECTED_PARENT; +- break; +- default: +- break; +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, " local_disconnected conn_id=%d state=%d", +- conn_id, MPIDI_Global.conn_mgr.conn_list[conn_id].state)); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_SEND_DISCONNECT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- + struct MPIDI_OFI_contig_blocks_params { + size_t max_pipe; +- DLOOP_Count count; +- DLOOP_Offset last_loc; +- DLOOP_Offset start_loc; ++ MPI_Aint count; ++ MPI_Aint last_loc; ++ MPI_Aint start_loc; + size_t last_chunk; + }; + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_contig_count_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX +- int MPIDI_OFI_contig_count_block(DLOOP_Offset * blocks_p, +- DLOOP_Type el_type, +- DLOOP_Offset rel_off, DLOOP_Buffer bufp, void *v_paramp) +-{ +- DLOOP_Offset size, el_size; +- size_t rem, num; +- struct MPIDI_OFI_contig_blocks_params *paramp = v_paramp; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CONTIG_COUNT_BLOCK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CONTIG_COUNT_BLOCK); +- +- DLOOP_Assert(*blocks_p > 0); +- +- DLOOP_Handle_get_size_macro(el_type, el_size); +- size = *blocks_p * el_size; +- if (paramp->count > 0 && rel_off == paramp->last_loc) { +- /* this region is adjacent to the last */ +- paramp->last_loc += size; +- /* If necessary, recalculate the number of chunks in this block */ +- if (paramp->last_loc - paramp->start_loc > paramp->max_pipe) { +- paramp->count -= paramp->last_chunk; +- num = (paramp->last_loc - paramp->start_loc) / paramp->max_pipe; +- rem = (paramp->last_loc - paramp->start_loc) % paramp->max_pipe; +- if (rem) +- num++; +- paramp->last_chunk = num; +- paramp->count += num; +- } +- } else { +- /* new region */ +- num = size / paramp->max_pipe; +- rem = size % paramp->max_pipe; +- if (rem) +- num++; +- +- paramp->last_chunk = num; +- paramp->last_loc = rel_off + size; +- paramp->start_loc = rel_off; +- paramp->count += num; +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CONTIG_COUNT_BLOCK); +- return 0; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_count_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX +- size_t MPIDI_OFI_count_iov(int dt_count, MPI_Datatype dt_datatype, size_t max_pipe) ++MPL_STATIC_INLINE_PREFIX size_t MPIDI_OFI_count_iov(int dt_count, /* number of data elements in dt_datatype */ ++ MPI_Datatype dt_datatype, size_t total_bytes, /* total byte size, passed in here for reusing */ ++ size_t max_pipe) + { +- struct MPIDI_OFI_contig_blocks_params params; +- MPIR_Segment dt_seg; +- ssize_t dt_size, num, rem; +- size_t dtc, count, count1, count2;; ++ ssize_t rem_size = total_bytes; ++ MPI_Aint num_iov, total_iov = 0; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_COUNT_IOV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_COUNT_IOV); + +- count = 0; +- dtc = MPL_MIN(2, dt_count); +- params.max_pipe = max_pipe; +- MPIDI_Datatype_check_size(dt_datatype, dtc, dt_size); +- if (dtc) { +- params.count = 0; +- params.last_loc = 0; +- params.start_loc = 0; +- params.last_chunk = 0; +- MPIR_Segment_init(NULL, 1, dt_datatype, &dt_seg); +- MPIR_Segment_manipulate(&dt_seg, 0, &dt_size, +- MPIDI_OFI_contig_count_block, +- NULL, NULL, NULL, NULL, (void *) ¶ms); +- count1 = params.count; +- params.count = 0; +- params.last_loc = 0; +- params.start_loc = 0; +- params.last_chunk = 0; +- MPIR_Segment_init(NULL, dtc, dt_datatype, &dt_seg); +- MPIR_Segment_manipulate(&dt_seg, 0, &dt_size, +- MPIDI_OFI_contig_count_block, +- NULL, NULL, NULL, NULL, (void *) ¶ms); +- count2 = params.count; +- if (count2 == 1) { /* Contiguous */ +- num = (dt_size * dt_count) / max_pipe; +- rem = (dt_size * dt_count) % max_pipe; +- if (rem) +- num++; +- count += num; +- } else if (count2 < count1 * 2) +- /* The commented calculation assumes merged blocks */ +- /* The iov processor will not merge adjacent blocks */ +- /* When the iov state machine adds this capability */ +- /* we should switch to use the optimized calcultion */ +- /* count += (count1*dt_count) - (dt_count-1); */ +- count += count1 * dt_count; +- else +- count += count1 * dt_count; +- } ++ if (dt_datatype == MPI_DATATYPE_NULL) ++ goto fn_exit; ++ ++ do { ++ size_t tmp_size = (rem_size > max_pipe) ? max_pipe : rem_size; ++ ++ MPIR_Typerep_iov_len(NULL, dt_count, dt_datatype, 0, tmp_size, &num_iov); ++ total_iov += num_iov; ++ ++ rem_size -= tmp_size; ++ } while (rem_size); ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_COUNT_IOV); +- return count; ++ return total_iov; + } + + /* Find the nearest length of iov that meets alignment requirement */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_align_iov_len +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX size_t MPIDI_OFI_align_iov_len(size_t len) + { + size_t pad = MPIDI_OFI_IOVEC_ALIGN - 1; +@@ -791,22 +497,15 @@ MPL_STATIC_INLINE_PREFIX size_t MPIDI_OFI_align_iov_len(size_t len) + } + + /* Find the minimum address that is >= ptr && meets alignment requirement */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_aligned_next_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX void *MPIDI_OFI_aligned_next_iov(void *ptr) + { +- return (void *) (uintptr_t) MPIDI_OFI_align_iov_len((size_t) ptr); ++ size_t aligned_iov = MPIDI_OFI_align_iov_len((size_t) ptr); ++ return (void *) (uintptr_t) aligned_iov; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_request_util_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX struct iovec *MPIDI_OFI_request_util_iov(MPIR_Request * req) + { +-#if defined (MPL_HAVE_VAR_ATTRIBUTE_ALIGNED) ++#if MPIDI_OFI_IOVEC_ALIGN <= SIZEOF_VOID_P + return &MPIDI_OFI_REQUEST(req, util.iov); + #else + return (struct iovec *) MPIDI_OFI_aligned_next_iov(&MPIDI_OFI_REQUEST(req, util.iov_store)); +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/ofi_init.c +@@ -0,0 +1,1783 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ofi_impl.h" ++#include "mpidu_bc.h" ++#include "ofi_noinline.h" ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++categories : ++ - name : CH4_OFI ++ description : A category for CH4 OFI netmod variables ++ ++cvars: ++ - name : MPIR_CVAR_CH4_OFI_CAPABILITY_SETS_DEBUG ++ category : CH4_OFI ++ type : int ++ default : 0 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Prints out the configuration of each capability selected via the capability sets interface. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_AV_TABLE ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, the OFI addressing information will be stored with an FI_AV_TABLE. ++ If false, an FI_AV_MAP will be used. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, use OFI scalable endpoints. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_SHARED_CONTEXTS ++ category : CH4_OFI ++ type : int ++ default : 0 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If set to false (zero), MPICH does not use OFI shared contexts. ++ If set to -1, it is determined by the OFI capability sets based on the provider. ++ Otherwise, MPICH tries to use OFI shared contexts. If they are unavailable, ++ it'll fall back to the mode without shared contexts. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_MR_SCALABLE ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, MR_SCALABLE for OFI memory regions. ++ If false, MR_BASIC for OFI memory regions. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_TAGGED ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, use tagged message transmission functions in OFI. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_AM ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, enable OFI active message support. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_RMA ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, enable OFI RMA support for MPI RMA operations. OFI support for basic RMA is always ++ required to implement large messgage transfers in the active message code path. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_ATOMICS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, enable OFI Atomics support. ++ ++ - name : MPIR_CVAR_CH4_OFI_FETCH_ATOMIC_IOVECS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Specifies the maximum number of iovecs that can be used by the OFI provider ++ for fetch_atomic operations. The default value is -1, indicating that ++ no value is set. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_DATA_AUTO_PROGRESS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, enable MPI data auto progress. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_CONTROL_AUTO_PROGRESS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, enable MPI control auto progress. ++ ++ - name : MPIR_CVAR_CH4_OFI_ENABLE_PT2PT_NOPACK ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If true, enable iovec for pt2pt. ++ ++ - name : MPIR_CVAR_CH4_OFI_CONTEXT_ID_BITS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Specifies the number of bits that will be used for matching the context ++ ID. The default value is -1, indicating that no value is set and that ++ the default will be defined in the ofi_types.h file. ++ ++ - name : MPIR_CVAR_CH4_OFI_RANK_BITS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Specifies the number of bits that will be used for matching the MPI ++ rank. The default value is -1, indicating that no value is set and that ++ the default will be defined in the ofi_types.h file. ++ ++ - name : MPIR_CVAR_CH4_OFI_TAG_BITS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Specifies the number of bits that will be used for matching the user ++ tag. The default value is -1, indicating that no value is set and that ++ the default will be defined in the ofi_types.h file. ++ ++ - name : MPIR_CVAR_CH4_OFI_MAJOR_VERSION ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Specifies the major version of the OFI library. The default is the ++ major version of the OFI library used with MPICH. If using this CVAR, ++ it is recommended that the user also specifies a specific OFI provider. ++ ++ - name : MPIR_CVAR_CH4_OFI_MINOR_VERSION ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Specifies the major version of the OFI library. The default is the ++ minor version of the OFI library used with MPICH. If using this CVAR, ++ it is recommended that the user also specifies a specific OFI provider. ++ ++ - name : MPIR_CVAR_CH4_OFI_MAX_VCIS ++ category : CH4_OFI ++ type : int ++ default : 1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If set to positive, this CVAR specifies the maximum number of CH4 VCIs ++ that OFI netmod exposes. ++ ++ - name : MPIR_CVAR_CH4_OFI_MAX_RMA_SEP_CTX ++ category : CH4_OFI ++ type : int ++ default : 0 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If set to positive, this CVAR specifies the maximum number of transmit ++ contexts RMA can utilize in a scalable endpoint. ++ This value is effective only when scalable endpoint is available, otherwise ++ it will be ignored. ++ ++ - name : MPIR_CVAR_CH4_OFI_MAX_EAGAIN_RETRY ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ If set to positive, this CVAR specifies the maximum number of retries ++ of an ofi operations before returning MPIX_ERR_EAGAIN. This value is ++ effective only when the communicator has the MPI_OFI_set_eagain info ++ hint set to true. ++ ++ - name : MPIR_CVAR_CH4_OFI_NUM_AM_BUFFERS ++ category : CH4_OFI ++ type : int ++ default : -1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Specifies the number of buffers for receiving active messages. ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++static void dump_providers(struct fi_info *prov); ++static int create_endpoint(struct fi_info *prov_use, struct fid_domain *domain, ++ struct fid_cq *p2p_cq, struct fid_cntr *rma_ctr, struct fid_av *av, ++ struct fid_ep **ep, int index); ++static int application_hints(int rank); ++static int init_global_settings(const char *prov_name); ++static int init_hints(struct fi_info *hints); ++static struct fi_info *pick_provider(struct fi_info *hints, const char *provname, ++ struct fi_info *prov_list); ++static int set_eagain(MPIR_Comm * comm_ptr, MPIR_Info * info, void *state); ++static int conn_manager_init(void); ++static int conn_manager_destroy(void); ++static int dynproc_send_disconnect(int conn_id); ++ ++static int set_eagain(MPIR_Comm * comm_ptr, MPIR_Info * info, void *state) ++{ ++ if (!strncmp(info->value, "true", strlen("true"))) ++ MPIDI_OFI_COMM(comm_ptr).eagain = TRUE; ++ if (!strncmp(info->value, "false", strlen("false"))) ++ MPIDI_OFI_COMM(comm_ptr).eagain = FALSE; ++ ++ return MPI_SUCCESS; ++} ++ ++static int conn_manager_init() ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INIT); ++ ++ MPIDI_OFI_global.conn_mgr.mmapped_size = 8 * 4 * 1024; ++ MPIDI_OFI_global.conn_mgr.max_n_conn = 1; ++ MPIDI_OFI_global.conn_mgr.next_conn_id = 0; ++ MPIDI_OFI_global.conn_mgr.n_conn = 0; ++ ++ MPIDI_OFI_global.conn_mgr.conn_list = ++ (MPIDI_OFI_conn_t *) MPL_mmap(NULL, MPIDI_OFI_global.conn_mgr.mmapped_size, ++ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0, ++ MPL_MEM_ADDRESS); ++ MPIR_ERR_CHKANDSTMT(MPIDI_OFI_global.conn_mgr.conn_list == MAP_FAILED, mpi_errno, ++ MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); ++ ++ MPIDI_OFI_global.conn_mgr.free_conn_id = ++ (int *) MPL_malloc(MPIDI_OFI_global.conn_mgr.max_n_conn * sizeof(int), MPL_MEM_ADDRESS); ++ MPIR_ERR_CHKANDSTMT(MPIDI_OFI_global.conn_mgr.free_conn_id == NULL, mpi_errno, ++ MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); ++ ++ for (i = 0; i < MPIDI_OFI_global.conn_mgr.max_n_conn; ++i) { ++ MPIDI_OFI_global.conn_mgr.free_conn_id[i] = i + 1; ++ } ++ MPIDI_OFI_global.conn_mgr.free_conn_id[MPIDI_OFI_global.conn_mgr.max_n_conn - 1] = -1; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int conn_manager_destroy() ++{ ++ int mpi_errno = MPI_SUCCESS, i, j; ++ MPIDI_OFI_dynamic_process_request_t *req; ++ fi_addr_t *conn; ++ int max_n_conn = MPIDI_OFI_global.conn_mgr.max_n_conn; ++ int *close_msg; ++ uint64_t match_bits = 0; ++ uint64_t mask_bits = 0; ++ MPIR_Context_id_t context_id = 0xF000; ++ MPIR_CHKLMEM_DECL(3); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CONN_MANAGER_DESTROY); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CONN_MANAGER_DESTROY); ++ ++ match_bits = MPIDI_OFI_init_recvtag(&mask_bits, context_id, MPI_ANY_SOURCE, 1); ++ match_bits |= MPIDI_OFI_DYNPROC_SEND; ++ ++ if (max_n_conn > 0) { ++ /* try wait/close connections */ ++ MPIR_CHKLMEM_MALLOC(req, MPIDI_OFI_dynamic_process_request_t *, ++ max_n_conn * sizeof(MPIDI_OFI_dynamic_process_request_t), mpi_errno, ++ "req", MPL_MEM_BUFFER); ++ MPIR_CHKLMEM_MALLOC(conn, fi_addr_t *, max_n_conn * sizeof(fi_addr_t), mpi_errno, "conn", ++ MPL_MEM_BUFFER); ++ MPIR_CHKLMEM_MALLOC(close_msg, int *, max_n_conn * sizeof(int), mpi_errno, "int", ++ MPL_MEM_BUFFER); ++ ++ j = 0; ++ for (i = 0; i < max_n_conn; ++i) { ++ switch (MPIDI_OFI_global.conn_mgr.conn_list[i].state) { ++ case MPIDI_OFI_DYNPROC_CONNECTED_CHILD: ++ dynproc_send_disconnect(i); ++ break; ++ case MPIDI_OFI_DYNPROC_LOCAL_DISCONNECTED_PARENT: ++ case MPIDI_OFI_DYNPROC_CONNECTED_PARENT: ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Wait for close of conn_id=%d", i)); ++ conn[j] = MPIDI_OFI_global.conn_mgr.conn_list[i].dest; ++ req[j].done = 0; ++ req[j].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[0].rx, ++ &close_msg[j], ++ sizeof(int), ++ NULL, ++ conn[j], ++ match_bits, ++ mask_bits, &req[j].context), ++ trecv, MPIDI_OFI_CALL_LOCK, FALSE); ++ j++; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ for (i = 0; i < j; ++i) { ++ MPIDI_OFI_PROGRESS_WHILE(!req[i].done); ++ MPIDI_OFI_global.conn_mgr.conn_list[i].state = MPIDI_OFI_DYNPROC_DISCONNECTED; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "conn_id=%d closed", i)); ++ } ++ ++ MPIR_CHKLMEM_FREEALL(); ++ } ++ ++ MPL_munmap((void *) MPIDI_OFI_global.conn_mgr.conn_list, MPIDI_OFI_global.conn_mgr.mmapped_size, ++ MPL_MEM_ADDRESS); ++ MPL_free(MPIDI_OFI_global.conn_mgr.free_conn_id); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CONN_MANAGER_DESTROY); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int dynproc_send_disconnect(int conn_id) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_Context_id_t context_id = 0xF000; ++ MPIDI_OFI_dynamic_process_request_t req; ++ uint64_t match_bits = 0; ++ int close_msg = 0xcccccccc; ++ int rank = MPIDI_OFI_global.conn_mgr.conn_list[conn_id].rank; ++ struct fi_msg_tagged msg; ++ struct iovec msg_iov; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_SEND_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_SEND_DISCONNECT); ++ ++ if (MPIDI_OFI_global.conn_mgr.conn_list[conn_id].state == MPIDI_OFI_DYNPROC_CONNECTED_CHILD) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, " send disconnect msg conn_id=%d from child side", ++ conn_id)); ++ match_bits = MPIDI_OFI_init_sendtag(context_id, rank, 1, MPIDI_OFI_DYNPROC_SEND); ++ ++ /* fi_av_map here is not quite right for some providers */ ++ /* we need to get this connection from the sockname */ ++ req.done = 0; ++ req.event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ msg_iov.iov_base = &close_msg; ++ msg_iov.iov_len = sizeof(close_msg); ++ msg.msg_iov = &msg_iov; ++ msg.desc = NULL; ++ msg.iov_count = 0; ++ msg.addr = MPIDI_OFI_global.conn_mgr.conn_list[conn_id].dest; ++ msg.tag = match_bits; ++ msg.ignore = context_id; ++ msg.context = (void *) &req.context; ++ msg.data = 0; ++ MPIDI_OFI_CALL_RETRY(fi_tsendmsg(MPIDI_OFI_global.ctx[0].tx, &msg, ++ FI_COMPLETION | FI_TRANSMIT_COMPLETE | FI_REMOTE_CQ_DATA), ++ tsendmsg, MPIDI_OFI_CALL_LOCK, FALSE); ++ MPIDI_OFI_PROGRESS_WHILE(!req.done); ++ } ++ ++ switch (MPIDI_OFI_global.conn_mgr.conn_list[conn_id].state) { ++ case MPIDI_OFI_DYNPROC_CONNECTED_CHILD: ++ MPIDI_OFI_global.conn_mgr.conn_list[conn_id].state = ++ MPIDI_OFI_DYNPROC_LOCAL_DISCONNECTED_CHILD; ++ break; ++ case MPIDI_OFI_DYNPROC_CONNECTED_PARENT: ++ MPIDI_OFI_global.conn_mgr.conn_list[conn_id].state = ++ MPIDI_OFI_DYNPROC_LOCAL_DISCONNECTED_PARENT; ++ break; ++ default: ++ break; ++ } ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, " local_disconnected conn_id=%d state=%d", ++ conn_id, MPIDI_OFI_global.conn_mgr.conn_list[conn_id].state)); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_SEND_DISCONNECT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, MPIR_Comm * comm_world, ++ MPIR_Comm * comm_self, int spawned, int *n_vcis_provided) ++{ ++ int mpi_errno = MPI_SUCCESS, pmi_errno, i, ofi_version; ++ int thr_err = 0; ++ void *table = NULL; ++ const char *provname = NULL; ++ struct fi_info *hints, *prov = NULL, *prov_use; ++ struct fi_cq_attr cq_attr; ++ struct fi_cntr_attr cntr_attr; ++ fi_addr_t *mapped_table; ++ struct fi_av_attr av_attr; ++ size_t optlen; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_INIT); ++ ++ if (!MPIDI_OFI_ENABLE_RUNTIME_CHECKS) { ++ init_global_settings(MPIR_CVAR_OFI_USE_PROVIDER); ++ } else { ++ /* When runtime checks are enabled, and no provider name is set, then try to select the ++ * fastest provider which fits the default requirements. To do this use "default" provider ++ * name to force initialization of global settings by default values. We are assuming that ++ * libfabric returns available provider list sorted by performance (faster - first) */ ++ init_global_settings(MPIR_CVAR_OFI_USE_PROVIDER ? MPIR_CVAR_OFI_USE_PROVIDER : ++ MPIDI_OFI_SET_NAME_DEFAULT); ++ } ++ ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == ++ offsetof(MPIDI_OFI_chunk_request, context)); ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == ++ offsetof(MPIDI_OFI_huge_recv_t, context)); ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == ++ offsetof(MPIDI_OFI_am_repost_request_t, context)); ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == ++ offsetof(MPIDI_OFI_ssendack_request_t, context)); ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == ++ offsetof(MPIDI_OFI_dynamic_process_request_t, context)); ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == ++ offsetof(MPIDI_OFI_win_request_t, context)); ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.am.netmod_am.ofi.context) == ++ offsetof(struct MPIR_Request, dev.ch4.netmod.ofi.context)); ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPIDI_Devreq_t) >= sizeof(MPIDI_OFI_request_t)); ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPIR_Request) >= sizeof(MPIDI_OFI_win_request_t)); ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPIR_Context_id_t) * 8 >= MPIDI_OFI_AM_CONTEXT_ID_BITS); ++ ++ MPID_Thread_mutex_create(&MPIDI_OFI_THREAD_UTIL_MUTEX, &thr_err); ++ MPID_Thread_mutex_create(&MPIDI_OFI_THREAD_PROGRESS_MUTEX, &thr_err); ++ MPID_Thread_mutex_create(&MPIDI_OFI_THREAD_FI_MUTEX, &thr_err); ++ MPID_Thread_mutex_create(&MPIDI_OFI_THREAD_SPAWN_MUTEX, &thr_err); ++ ++ /* ------------------------------------------------------------------------ */ ++ /* fi_allocinfo: allocate and zero an fi_info structure and all related */ ++ /* substructures */ ++ /* ------------------------------------------------------------------------ */ ++ hints = fi_allocinfo(); ++ MPIR_Assert(hints != NULL); ++ ++ /* ------------------------------------------------------------------------ */ ++ /* FI_VERSION provides binary backward and forward compatibility support */ ++ /* Specify the version of OFI is coded to, the provider will select struct */ ++ /* layouts that are compatible with this version. */ ++ /* ------------------------------------------------------------------------ */ ++ if (MPIDI_OFI_MAJOR_VERSION != -1 && MPIDI_OFI_MINOR_VERSION != -1) ++ ofi_version = FI_VERSION(MPIDI_OFI_MAJOR_VERSION, MPIDI_OFI_MINOR_VERSION); ++ else ++ ofi_version = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION); ++ ++ /* ------------------------------------------------------------------------ */ ++ /* fi_getinfo: returns information about fabric services for reaching a */ ++ /* remote node or service. this does not necessarily allocate resources. */ ++ /* Pass NULL for name/service because we want a list of providers supported */ ++ /* ------------------------------------------------------------------------ */ ++ provname = MPIR_CVAR_OFI_USE_PROVIDER ? MPL_strdup(MPIR_CVAR_OFI_USE_PROVIDER) : NULL; ++ hints->fabric_attr->prov_name = (char *) provname; ++ ++ /* If the user picked a particular provider, ignore the checks */ ++ if (MPIDI_OFI_ENABLE_RUNTIME_CHECKS) { ++ /* Ensure that we aren't trying to shove too many bits into the match_bits. ++ * Currently, this needs to fit into a uint64_t and we take 4 bits for protocol. */ ++ MPIR_Assert(MPIDI_OFI_CONTEXT_BITS + MPIDI_OFI_SOURCE_BITS + MPIDI_OFI_TAG_BITS <= 60); ++ ++ MPIDI_OFI_CALL(fi_getinfo(ofi_version, NULL, NULL, 0ULL, NULL, &prov), addrinfo); ++ ++ /* We'll try to pick the best provider three times. ++ * 1 - Check to see if any provider matches an existing capability set (e.g. sockets) ++ * 2 - Check to see if any provider meets the default capability set ++ * 3 - Check to see if any provider meets the minimal capability set ++ * ++ * If we get 1, we'll use that capability set as is. If we get 2, we'll use the default ++ * capability set with the first provider that satisfies it (first should be best) and ++ * supply the default capability set as the hints. If we get 3, we'll use the first provider ++ * that satisfies it and supply the minimal capability set as the hints. ++ */ ++ prov_use = pick_provider(hints, (char *) provname, prov); ++ ++ if (NULL == prov_use) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "1st trial of pick_provider() returned NULL\n")); ++ init_global_settings(MPIDI_OFI_SET_NAME_DEFAULT); ++ prov_use = pick_provider(hints, MPIDI_OFI_SET_NAME_DEFAULT, prov); ++ ++ if (NULL == prov_use) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "2nd trial of pick_provider() returned NULL\n")); ++ init_global_settings(MPIDI_OFI_SET_NAME_MINIMAL); ++ prov_use = pick_provider(hints, MPIDI_OFI_SET_NAME_MINIMAL, prov); ++ } else { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "2nd trial of pick_provider() returned %s\n", ++ prov_use->fabric_attr->prov_name)); ++ } ++ } else { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "1st trial of pick_provider() returned %s\n", ++ prov_use->fabric_attr->prov_name)); ++ } ++ ++ /* If we did not find a provider, return an error */ ++ MPIR_ERR_CHKANDJUMP(prov_use == NULL, mpi_errno, MPI_ERR_OTHER, "**ofid_addrinfo"); ++ ++ fi_freeinfo(prov); ++ } else { ++ /* If runtime checks are disabled, make sure that the hints are initialized to the ++ * compile-time capability set chosen by the user. */ ++ init_hints(hints); ++ ++ /* Make sure that the user-specified provider matches the configure-specified provider. */ ++ MPIR_ERR_CHKANDJUMP(provname != NULL && ++ MPIDI_OFI_SET_NUMBER != MPIDI_OFI_get_set_number(provname), ++ mpi_errno, MPI_ERR_OTHER, "**ofi_provider_mismatch"); ++ } ++ ++ MPIDI_OFI_CALL(fi_getinfo(ofi_version, NULL, NULL, 0ULL, hints, &prov), addrinfo); ++ MPIR_ERR_CHKANDJUMP(prov == NULL, mpi_errno, MPI_ERR_OTHER, "**ofid_addrinfo"); ++ /* When a specific provider is specified at configure time, ++ * make sure it is the one selected by fi_getinfo */ ++ MPIR_ERR_CHKANDJUMP(!MPIDI_OFI_ENABLE_RUNTIME_CHECKS && ++ MPIDI_OFI_SET_NUMBER != ++ MPIDI_OFI_get_set_number(prov->fabric_attr->prov_name), mpi_errno, ++ MPI_ERR_OTHER, "**ofi_provider_mismatch"); ++ prov_use = prov; ++ if (MPIR_CVAR_OFI_DUMP_PROVIDERS) ++ dump_providers(prov); ++ ++ *tag_bits = MPIDI_OFI_TAG_BITS; ++ ++ if (MPIDI_OFI_ENABLE_RUNTIME_CHECKS) { ++ /* ------------------------------------------------------------------------ */ ++ /* Set global attributes attributes based on the provider choice */ ++ /* ------------------------------------------------------------------------ */ ++ MPIDI_OFI_global.settings.enable_av_table = MPIDI_OFI_global.settings.enable_av_table && ++ prov_use->domain_attr->av_type == FI_AV_TABLE; ++ MPIDI_OFI_global.settings.enable_scalable_endpoints = ++ MPIDI_OFI_global.settings.enable_scalable_endpoints && ++ prov_use->domain_attr->max_ep_tx_ctx > 1; ++ MPIDI_OFI_global.settings.enable_mr_scalable = ++ MPIDI_OFI_global.settings.enable_mr_scalable && ++ prov_use->domain_attr->mr_mode == FI_MR_SCALABLE; ++ MPIDI_OFI_global.settings.enable_tagged = MPIDI_OFI_global.settings.enable_tagged && ++ (prov_use->caps & FI_TAGGED) && (prov_use->caps & FI_DIRECTED_RECV) && ++ (prov_use->domain_attr->cq_data_size >= 4); ++ MPIDI_OFI_global.settings.enable_am = MPIDI_OFI_global.settings.enable_am && ++ (prov_use->caps & (FI_MSG | FI_MULTI_RECV | FI_READ)) == ++ (FI_MSG | FI_MULTI_RECV | FI_READ); ++ MPIDI_OFI_global.settings.enable_rma = MPIDI_OFI_global.settings.enable_rma && ++ prov_use->caps & FI_RMA; ++ MPIDI_OFI_global.settings.enable_atomics = MPIDI_OFI_global.settings.enable_atomics && ++ prov_use->caps & FI_ATOMICS; ++ MPIDI_OFI_global.settings.enable_data_auto_progress = ++ MPIDI_OFI_global.settings.enable_data_auto_progress && ++ hints->domain_attr->data_progress & FI_PROGRESS_AUTO; ++ MPIDI_OFI_global.settings.enable_control_auto_progress = ++ MPIDI_OFI_global.settings.enable_control_auto_progress && ++ hints->domain_attr->control_progress & FI_PROGRESS_AUTO; ++ ++ if (MPIDI_OFI_global.settings.enable_scalable_endpoints) { ++ MPIDI_OFI_global.settings.max_endpoints = MPIDI_OFI_MAX_ENDPOINTS_SCALABLE; ++ MPIDI_OFI_global.settings.max_endpoints_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS_SCALABLE; ++ } else { ++ MPIDI_OFI_global.settings.max_endpoints = MPIDI_OFI_MAX_ENDPOINTS_REGULAR; ++ MPIDI_OFI_global.settings.max_endpoints_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS_REGULAR; ++ } ++ } ++ ++ /* Print some debugging output to give the user some hints */ ++ mpi_errno = application_hints(rank); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDI_OFI_global.prov_use = fi_dupinfo(prov_use); ++ MPIR_Assert(MPIDI_OFI_global.prov_use); ++ ++ MPIDI_OFI_global.max_buffered_send = prov_use->tx_attr->inject_size; ++ MPIDI_OFI_global.max_buffered_write = prov_use->tx_attr->inject_size; ++ MPIDI_OFI_global.max_msg_size = prov_use->ep_attr->max_msg_size; ++ MPIDI_OFI_global.max_order_raw = prov_use->ep_attr->max_order_raw_size; ++ MPIDI_OFI_global.max_order_war = prov_use->ep_attr->max_order_war_size; ++ MPIDI_OFI_global.max_order_waw = prov_use->ep_attr->max_order_waw_size; ++ MPIDI_OFI_global.tx_iov_limit = MIN(prov_use->tx_attr->iov_limit, MPIDI_OFI_IOV_MAX); ++ MPIDI_OFI_global.rx_iov_limit = MIN(prov_use->rx_attr->iov_limit, MPIDI_OFI_IOV_MAX); ++ MPIDI_OFI_global.rma_iov_limit = MIN(prov_use->tx_attr->rma_iov_limit, MPIDI_OFI_IOV_MAX); ++ MPIDI_OFI_global.max_mr_key_size = prov_use->domain_attr->mr_key_size; ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Open fabric */ ++ /* The getinfo struct returns a fabric attribute struct that can be used to */ ++ /* instantiate the virtual or physical network. This opens a "fabric */ ++ /* provider". We choose the first available fabric, but getinfo */ ++ /* returns a list. */ ++ /* ------------------------------------------------------------------------ */ ++ MPIDI_OFI_CALL(fi_fabric(prov_use->fabric_attr, &MPIDI_OFI_global.fabric, NULL), fabric); ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Create the access domain, which is the physical or virtual network or */ ++ /* hardware port/collection of ports. Returns a domain object that can be */ ++ /* used to create endpoints. */ ++ /* ------------------------------------------------------------------------ */ ++ MPIDI_OFI_CALL(fi_domain(MPIDI_OFI_global.fabric, prov_use, &MPIDI_OFI_global.domain, NULL), ++ opendomain); ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Create the objects that will be bound to the endpoint. */ ++ /* The objects include: */ ++ /* * dynamic memory-spanning memory region */ ++ /* * completion queues for events */ ++ /* * counters for rma operations */ ++ /* * address vector of other endpoint addresses */ ++ /* ------------------------------------------------------------------------ */ ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Construct: Completion Queues */ ++ /* ------------------------------------------------------------------------ */ ++ memset(&cq_attr, 0, sizeof(cq_attr)); ++ cq_attr.format = FI_CQ_FORMAT_TAGGED; ++ MPIDI_OFI_CALL(fi_cq_open(MPIDI_OFI_global.domain, /* In: Domain Object */ ++ &cq_attr, /* In: Configuration object */ ++ &MPIDI_OFI_global.p2p_cq, /* Out: CQ Object */ ++ NULL), opencq); /* In: Context for cq events */ ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Construct: Counters */ ++ /* ------------------------------------------------------------------------ */ ++ memset(&cntr_attr, 0, sizeof(cntr_attr)); ++ cntr_attr.events = FI_CNTR_EVENTS_COMP; ++ cntr_attr.wait_obj = FI_WAIT_UNSPEC; ++ MPIDI_OFI_CALL(fi_cntr_open(MPIDI_OFI_global.domain, /* In: Domain Object */ ++ &cntr_attr, /* In: Configuration object */ ++ &MPIDI_OFI_global.rma_cmpl_cntr, /* Out: Counter Object */ ++ NULL), openct); /* Context: counter events */ ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Construct: Address Vector */ ++ /* ------------------------------------------------------------------------ */ ++ ++ memset(&av_attr, 0, sizeof(av_attr)); ++ ++ ++ if (MPIDI_OFI_ENABLE_AV_TABLE) { ++ av_attr.type = FI_AV_TABLE; ++ } else { ++ av_attr.type = FI_AV_MAP; ++ } ++ ++ av_attr.rx_ctx_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS; ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Attempt to open a shared address vector read-only. The open will fail if */ ++ /* the address vector does not exist, otherwise the location of the mapped */ ++ /* fi_addr_t array will be returned in the 'map_addr' field of the address */ ++ /* vector attribute structure. */ ++ /* ------------------------------------------------------------------------ */ ++ char av_name[128]; ++ MPL_snprintf(av_name, sizeof(av_name), "FI_NAMED_AV_%d\n", appnum); ++ av_attr.name = av_name; ++ av_attr.flags = FI_READ; ++ av_attr.map_addr = 0; ++ ++ unsigned do_av_insert = 1; ++ if (0 == fi_av_open(MPIDI_OFI_global.domain, /* In: Domain Object */ ++ &av_attr, /* In: Configuration object */ ++ &MPIDI_OFI_global.av, /* Out: AV Object */ ++ NULL)) { /* Context: AV events */ ++ do_av_insert = 0; ++ ++ /* TODO - the copy from the pre-existing av map into the 'MPIDI_OFI_AV' */ ++ /* is wasteful and should be changed so that the 'MPIDI_OFI_AV' object */ ++ /* directly references the mapped fi_addr_t array instead */ ++ mapped_table = (fi_addr_t *) av_attr.map_addr; ++ for (i = 0; i < size; i++) { ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).dest = mapped_table[i]; ++#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; ++#else ++#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; ++#endif ++#endif ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " grank mapped to: rank=%d, av=%p, dest=%" PRIu64, ++ i, (void *) &MPIDIU_get_av(0, i), mapped_table[i])); ++ } ++ mapped_table = NULL; ++ } else { ++ av_attr.name = NULL; ++ av_attr.flags = 0; ++ MPIDI_OFI_CALL(fi_av_open(MPIDI_OFI_global.domain, /* In: Domain Object */ ++ &av_attr, /* In: Configuration object */ ++ &MPIDI_OFI_global.av, /* Out: AV Object */ ++ NULL), avopen); /* Context: AV events */ ++ } ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Construct: Shared TX Context for RMA */ ++ /* ------------------------------------------------------------------------ */ ++ if (MPIDI_OFI_ENABLE_SHARED_CONTEXTS) { ++ int ret; ++ struct fi_tx_attr tx_attr; ++ memset(&tx_attr, 0, sizeof(tx_attr)); ++ /* A shared transmit context’s attributes must be a union of all associated ++ * endpoints' transmit capabilities. */ ++ tx_attr.caps = FI_RMA | FI_WRITE | FI_READ | FI_ATOMIC; ++ tx_attr.msg_order = FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_WAR | FI_ORDER_WAW; ++ tx_attr.op_flags = FI_DELIVERY_COMPLETE | FI_COMPLETION; ++ MPIDI_OFI_CALL_RETURN(fi_stx_context(MPIDI_OFI_global.domain, ++ &tx_attr, ++ &MPIDI_OFI_global.rma_stx_ctx, NULL /* context */), ++ ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to create shared TX context for RMA, " ++ "falling back to global EP/counter scheme"); ++ MPIDI_OFI_global.rma_stx_ctx = NULL; ++ } ++ } ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Create a transport level communication endpoint. To use the endpoint, */ ++ /* it must be bound to completion counters or event queues and enabled, */ ++ /* and the resources consumed by it, such as address vectors, counters, */ ++ /* completion queues, etc. */ ++ /* ------------------------------------------------------------------------ */ ++ ++ MPIDI_OFI_global.max_ch4_vcis = 1; ++ if (MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS) { ++ int max_by_prov = MPL_MIN(prov_use->domain_attr->tx_ctx_cnt, ++ prov_use->domain_attr->rx_ctx_cnt); ++ if (MPIR_CVAR_CH4_OFI_MAX_VCIS > 0) ++ MPIDI_OFI_global.max_ch4_vcis = MPL_MIN(MPIR_CVAR_CH4_OFI_MAX_VCIS, max_by_prov); ++ if (MPIDI_OFI_global.max_ch4_vcis < 1) { ++ MPIR_ERR_SETFATALANDJUMP4(mpi_errno, ++ MPI_ERR_OTHER, ++ "**ofid_ep", ++ "**ofid_ep %s %d %s %s", ++ __SHORT_FILE__, __LINE__, __func__, ++ "Not enough scalable endpoints"); ++ } ++ /* Specify the number of TX/RX contexts we want */ ++ prov_use->ep_attr->tx_ctx_cnt = MPIDI_OFI_global.max_ch4_vcis; ++ prov_use->ep_attr->rx_ctx_cnt = MPIDI_OFI_global.max_ch4_vcis; ++ } ++ ++ for (i = 0; i < MPIDI_OFI_global.max_ch4_vcis; i++) { ++ MPIDI_OFI_MPI_CALL_POP(create_endpoint(prov_use, MPIDI_OFI_global.domain, ++ MPIDI_OFI_global.p2p_cq, ++ MPIDI_OFI_global.rma_cmpl_cntr, ++ MPIDI_OFI_global.av, &MPIDI_OFI_global.ep, i)); ++ } ++ ++ *n_vcis_provided = MPIDI_OFI_global.max_ch4_vcis; ++ ++ if (do_av_insert) { ++ /* ---------------------------------- */ ++ /* Get our endpoint name and publish */ ++ /* the socket to the KVS */ ++ /* ---------------------------------- */ ++ MPIDI_OFI_global.addrnamelen = FI_NAME_MAX; ++ MPIDI_OFI_CALL(fi_getname((fid_t) MPIDI_OFI_global.ep, MPIDI_OFI_global.addrname, ++ &MPIDI_OFI_global.addrnamelen), getname); ++ MPIR_Assert(MPIDI_OFI_global.addrnamelen <= FI_NAME_MAX); ++ ++ mpi_errno = MPIDU_bc_table_create(rank, size, MPIDI_global.node_map[0], ++ &MPIDI_OFI_global.addrname, MPIDI_OFI_global.addrnamelen, ++ TRUE, MPIR_CVAR_CH4_ROOTS_ONLY_PMI, &table, NULL); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* -------------------------------- */ ++ /* Table is constructed. Map it */ ++ /* -------------------------------- */ ++ if (MPIR_CVAR_CH4_ROOTS_ONLY_PMI) { ++ int *node_roots, num_nodes; ++ ++ MPIR_NODEMAP_get_node_roots(MPIDI_global.node_map[0], size, &node_roots, &num_nodes); ++ mapped_table = (fi_addr_t *) MPL_malloc(num_nodes * sizeof(fi_addr_t), MPL_MEM_ADDRESS); ++ MPIDI_OFI_CALL(fi_av_insert ++ (MPIDI_OFI_global.av, table, num_nodes, mapped_table, 0ULL, NULL), ++ avmap); ++ ++ for (i = 0; i < num_nodes; i++) { ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, node_roots[i])).dest = mapped_table[i]; ++#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, node_roots[i])).ep_idx = 0; ++#else ++#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, node_roots[i])).ep_idx = 0; ++#endif ++#endif ++ } ++ MPL_free(mapped_table); ++ MPL_free(node_roots); ++ } else { ++ mapped_table = (fi_addr_t *) MPL_malloc(size * sizeof(fi_addr_t), MPL_MEM_ADDRESS); ++ MPIDI_OFI_CALL(fi_av_insert(MPIDI_OFI_global.av, table, size, mapped_table, 0ULL, NULL), ++ avmap); ++ ++ for (i = 0; i < size; i++) { ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).dest = mapped_table[i]; ++#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; ++#else ++#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS ++ MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; ++#endif ++#endif ++ } ++ MPL_free(mapped_table); ++ MPIDU_bc_table_destroy(table); ++ } ++ } ++ ++ /* -------------------------------- */ ++ /* Create the id to object maps */ ++ /* -------------------------------- */ ++ MPIDIU_map_create(&MPIDI_OFI_global.win_map, MPL_MEM_RMA); ++ ++ /* ---------------------------------- */ ++ /* Initialize Active Message */ ++ /* ---------------------------------- */ ++ mpi_errno = MPIDIG_init(comm_world, comm_self, *n_vcis_provided); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIDI_OFI_ENABLE_AM) { ++ /* Maximum possible message size for short message send (=eager send) ++ * See MPIDI_OFI_do_am_isend for short/long switching logic */ ++ MPIR_Assert(MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE <= MPIDI_OFI_global.max_msg_size); ++ MPIDI_OFI_global.am_buf_pool = ++ MPIDIU_create_buf_pool(MPIDI_OFI_BUF_POOL_NUM, MPIDI_OFI_BUF_POOL_SIZE); ++ ++ MPIDI_OFI_global.cq_buffered_dynamic_head = MPIDI_OFI_global.cq_buffered_dynamic_tail = ++ NULL; ++ MPIDI_OFI_global.cq_buffered_static_head = MPIDI_OFI_global.cq_buffered_static_tail = 0; ++ optlen = MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE; ++ ++ MPIDI_OFI_CALL(fi_setopt(&(MPIDI_OFI_global.ctx[0].rx->fid), ++ FI_OPT_ENDPOINT, ++ FI_OPT_MIN_MULTI_RECV, &optlen, sizeof(optlen)), setopt); ++ ++ MPIDIU_map_create(&MPIDI_OFI_global.am_recv_seq_tracker, MPL_MEM_BUFFER); ++ MPIDIU_map_create(&MPIDI_OFI_global.am_send_seq_tracker, MPL_MEM_BUFFER); ++ MPIDI_OFI_global.am_unordered_msgs = NULL; ++ ++ for (i = 0; i < MPIDI_OFI_NUM_AM_BUFFERS; i++) { ++ MPIDI_OFI_global.am_bufs[i] = MPL_malloc(MPIDI_OFI_AM_BUFF_SZ, MPL_MEM_BUFFER); ++ MPIDI_OFI_global.am_reqs[i].event_id = MPIDI_OFI_EVENT_AM_RECV; ++ MPIDI_OFI_global.am_reqs[i].index = i; ++ MPIR_Assert(MPIDI_OFI_global.am_bufs[i]); ++ MPIDI_OFI_ASSERT_IOVEC_ALIGN(&MPIDI_OFI_global.am_iov[i]); ++ MPIDI_OFI_global.am_iov[i].iov_base = MPIDI_OFI_global.am_bufs[i]; ++ MPIDI_OFI_global.am_iov[i].iov_len = MPIDI_OFI_AM_BUFF_SZ; ++ MPIDI_OFI_global.am_msg[i].msg_iov = &MPIDI_OFI_global.am_iov[i]; ++ MPIDI_OFI_global.am_msg[i].desc = NULL; ++ MPIDI_OFI_global.am_msg[i].addr = FI_ADDR_UNSPEC; ++ MPIDI_OFI_global.am_msg[i].context = &MPIDI_OFI_global.am_reqs[i].context; ++ MPIDI_OFI_global.am_msg[i].iov_count = 1; ++ MPIDI_OFI_CALL_RETRY(fi_recvmsg(MPIDI_OFI_global.ctx[0].rx, ++ &MPIDI_OFI_global.am_msg[i], ++ FI_MULTI_RECV | FI_COMPLETION), prepost, ++ MPIDI_OFI_CALL_LOCK, FALSE); ++ } ++ ++ /* Grow the header handlers down */ ++ MPIDIG_global.target_msg_cbs[MPIDI_OFI_INTERNAL_HANDLER_CONTROL] = ++ MPIDI_OFI_control_handler; ++ MPIDIG_global.origin_cbs[MPIDI_OFI_INTERNAL_HANDLER_CONTROL] = NULL; ++ } ++ OPA_store_int(&MPIDI_OFI_global.am_inflight_inject_emus, 0); ++ OPA_store_int(&MPIDI_OFI_global.am_inflight_rma_send_mrs, 0); ++ ++ /* Initalize RMA keys allocator */ ++ MPIDI_OFI_mr_key_allocator_init(); ++ /* -------------------------------- */ ++ /* Initialize Dynamic Tasking */ ++ /* -------------------------------- */ ++#if !defined(USE_PMIX_API) && !defined(USE_PMI2_API) ++ conn_manager_init(); ++ if (spawned) { ++ char parent_port[MPIDI_MAX_KVS_VALUE_LEN]; ++ MPIDI_OFI_PMI_CALL_POP(PMI_KVS_Get(MPIDI_OFI_global.kvsname, ++ MPIDI_PARENT_PORT_KVSKEY, ++ parent_port, MPIDI_MAX_KVS_VALUE_LEN), pmi); ++ MPIDI_OFI_MPI_CALL_POP(MPID_Comm_connect ++ (parent_port, NULL, 0, comm_world, &MPIR_Process.comm_parent)); ++ MPIR_Assert(MPIR_Process.comm_parent != NULL); ++ MPL_strncpy(MPIR_Process.comm_parent->name, "MPI_COMM_PARENT", MPI_MAX_OBJECT_NAME); ++ } ++#endif ++ ++ mpi_errno = MPIR_Comm_register_hint("eagain", set_eagain, NULL); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ ++ /* -------------------------------- */ ++ /* Free temporary resources */ ++ /* -------------------------------- */ ++ MPL_free((char *) provname); ++ hints->fabric_attr->prov_name = NULL; ++ ++ if (prov) ++ fi_freeinfo(prov); ++ ++ fi_freeinfo(hints); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_finalize_hook(void) ++{ ++ int thr_err = 0, mpi_errno = MPI_SUCCESS; ++ int i = 0; ++ int barrier[2] = { 0 }; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_Comm *comm; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_FINALIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_FINALIZE); ++ ++ /* clean dynamic process connections */ ++ conn_manager_destroy(); ++ ++ /* Progress until we drain all inflight RMA send long buffers */ ++ while (OPA_load_int(&MPIDI_OFI_global.am_inflight_rma_send_mrs) > 0) ++ MPIDI_OFI_PROGRESS(); ++ ++ /* Destroy RMA key allocator */ ++ MPIDI_OFI_mr_key_allocator_destroy(); ++ ++ /* Barrier over allreduce, but force non-immediate send */ ++ MPIDI_OFI_global.max_buffered_send = 0; ++ MPIDI_OFI_MPI_CALL_POP(MPIR_Allreduce(&barrier[0], &barrier[1], 1, MPI_INT, ++ MPI_SUM, MPIR_Process.comm_world, &errflag)); ++ ++ /* Progress until we drain all inflight injection emulation requests */ ++ while (OPA_load_int(&MPIDI_OFI_global.am_inflight_inject_emus) > 0) ++ MPIDI_OFI_PROGRESS(); ++ MPIR_Assert(OPA_load_int(&MPIDI_OFI_global.am_inflight_inject_emus) == 0); ++ ++ if (MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS) { ++ for (i = 0; i < MPIDI_OFI_global.max_ch4_vcis; i++) { ++ MPIDI_OFI_CALL(fi_close((fid_t) MPIDI_OFI_global.ctx[i].tx), epclose); ++ MPIDI_OFI_CALL(fi_close((fid_t) MPIDI_OFI_global.ctx[i].rx), epclose); ++ MPIDI_OFI_CALL(fi_close((fid_t) MPIDI_OFI_global.ctx[i].cq), cqclose); ++ } ++ } ++ ++ /* Close RMA scalable EP. */ ++ if (MPIDI_OFI_global.rma_sep) { ++ /* All transmit contexts on RMA must be closed. */ ++ MPIR_Assert(utarray_len(MPIDI_OFI_global.rma_sep_idx_array) == ++ MPIDI_OFI_global.max_rma_sep_tx_cnt); ++ utarray_free(MPIDI_OFI_global.rma_sep_idx_array); ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_global.rma_sep->fid), epclose); ++ } ++ if (MPIDI_OFI_global.rma_stx_ctx != NULL) ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_global.rma_stx_ctx->fid), stx_ctx_close); ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_global.ep->fid), epclose); ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_global.av->fid), avclose); ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_global.p2p_cq->fid), cqclose); ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_global.rma_cmpl_cntr->fid), cntrclose); ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_global.domain->fid), domainclose); ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_global.fabric->fid), fabricclose); ++ ++ fi_freeinfo(MPIDI_OFI_global.prov_use); ++ ++ /* --------------------------------------- */ ++ /* Free comm world addr table */ ++ /* --------------------------------------- */ ++ comm = MPIR_Process.comm_world; ++ MPIR_Comm_release_always(comm); ++ ++ comm = MPIR_Process.comm_self; ++ MPIR_Comm_release_always(comm); ++ ++ MPIDIG_finalize(); ++ ++ MPIDIU_map_destroy(MPIDI_OFI_global.win_map); ++ ++ if (MPIDI_OFI_ENABLE_AM) { ++ while (MPIDI_OFI_global.am_unordered_msgs) { ++ MPIDI_OFI_am_unordered_msg_t *uo_msg = MPIDI_OFI_global.am_unordered_msgs; ++ DL_DELETE(MPIDI_OFI_global.am_unordered_msgs, uo_msg); ++ } ++ MPIDIU_map_destroy(MPIDI_OFI_global.am_send_seq_tracker); ++ MPIDIU_map_destroy(MPIDI_OFI_global.am_recv_seq_tracker); ++ ++ for (i = 0; i < MPIDI_OFI_NUM_AM_BUFFERS; i++) ++ MPL_free(MPIDI_OFI_global.am_bufs[i]); ++ ++ MPIDIU_destroy_buf_pool(MPIDI_OFI_global.am_buf_pool); ++ ++ MPIR_Assert(MPIDI_OFI_global.cq_buffered_static_head == ++ MPIDI_OFI_global.cq_buffered_static_tail); ++ MPIR_Assert(NULL == MPIDI_OFI_global.cq_buffered_dynamic_head); ++ } ++ ++ MPID_Thread_mutex_destroy(&MPIDI_OFI_THREAD_UTIL_MUTEX, &thr_err); ++ MPID_Thread_mutex_destroy(&MPIDI_OFI_THREAD_PROGRESS_MUTEX, &thr_err); ++ MPID_Thread_mutex_destroy(&MPIDI_OFI_THREAD_FI_MUTEX, &thr_err); ++ MPID_Thread_mutex_destroy(&MPIDI_OFI_THREAD_SPAWN_MUTEX, &thr_err); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_FINALIZE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_get_vci_attr(int vci) ++{ ++ MPIR_Assert(0 <= vci && vci < 1); ++ return MPIDI_VCI_TX | MPIDI_VCI_RX; ++} ++ ++void *MPIDI_OFI_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ ++ void *ap; ++ ap = MPL_malloc(size, MPL_MEM_USER); ++ return ap; ++} ++ ++int MPIDI_OFI_mpi_free_mem(void *ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPL_free(ptr); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i, total_size = 0; ++ char *temp_buf = NULL, *curr_ptr = NULL; ++ ++ MPIR_CHKPMEM_DECL(2); ++ MPIR_CHKLMEM_DECL(1); ++ ++ MPIR_CHKPMEM_MALLOC((*local_upid_size), size_t *, comm->local_size * sizeof(size_t), ++ mpi_errno, "local_upid_size", MPL_MEM_ADDRESS); ++ MPIR_CHKLMEM_MALLOC(temp_buf, char *, comm->local_size * MPIDI_OFI_global.addrnamelen, ++ mpi_errno, "temp_buf", MPL_MEM_BUFFER); ++ ++ for (i = 0; i < comm->local_size; i++) { ++ (*local_upid_size)[i] = MPIDI_OFI_global.addrnamelen; ++ MPIDI_OFI_CALL(fi_av_lookup(MPIDI_OFI_global.av, MPIDI_OFI_COMM_TO_PHYS(comm, i), ++ &temp_buf[i * MPIDI_OFI_global.addrnamelen], ++ &(*local_upid_size)[i]), avlookup); ++ total_size += (*local_upid_size)[i]; ++ } ++ ++ MPIR_CHKPMEM_MALLOC((*local_upids), char *, total_size * sizeof(char), ++ mpi_errno, "local_upids", MPL_MEM_BUFFER); ++ curr_ptr = (*local_upids); ++ for (i = 0; i < comm->local_size; i++) { ++ memcpy(curr_ptr, &temp_buf[i * MPIDI_OFI_global.addrnamelen], (*local_upid_size)[i]); ++ curr_ptr += (*local_upid_size)[i]; ++ } ++ ++ MPIR_CHKPMEM_COMMIT(); ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ return mpi_errno; ++ fn_fail: ++ MPIR_CHKPMEM_REAP(); ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids) ++{ ++ int i, mpi_errno = MPI_SUCCESS; ++ int *new_avt_procs; ++ char **new_upids; ++ int n_new_procs = 0; ++ int max_n_avts; ++ char *curr_upid; ++ new_avt_procs = (int *) MPL_malloc(size * sizeof(int), MPL_MEM_ADDRESS); ++ new_upids = (char **) MPL_malloc(size * sizeof(char *), MPL_MEM_ADDRESS); ++ max_n_avts = MPIDIU_get_max_n_avts(); ++ ++ curr_upid = remote_upids; ++ for (i = 0; i < size; i++) { ++ int j, k; ++ char tbladdr[FI_NAME_MAX]; ++ int found = 0; ++ size_t sz = 0; ++ ++ for (k = 0; k < max_n_avts; k++) { ++ if (MPIDIU_get_av_table(k) == NULL) { ++ continue; ++ } ++ for (j = 0; j < MPIDIU_get_av_table(k)->size; j++) { ++ sz = MPIDI_OFI_global.addrnamelen; ++ MPIDI_OFI_CALL(fi_av_lookup(MPIDI_OFI_global.av, MPIDI_OFI_TO_PHYS(k, j), ++ &tbladdr, &sz), avlookup); ++ if (sz == remote_upid_size[i] ++ && !memcmp(tbladdr, curr_upid, remote_upid_size[i])) { ++ (*remote_lupids)[i] = MPIDIU_LUPID_CREATE(k, j); ++ found = 1; ++ break; ++ } ++ } ++ } ++ ++ if (!found) { ++ new_avt_procs[n_new_procs] = i; ++ new_upids[n_new_procs] = curr_upid; ++ n_new_procs++; ++ } ++ curr_upid += remote_upid_size[i]; ++ } ++ ++ /* create new av_table, insert processes */ ++ if (n_new_procs > 0) { ++ int avtid; ++ MPIDI_OFI_MPI_CALL_POP(MPIDIU_new_avt(n_new_procs, &avtid)); ++ ++ for (i = 0; i < n_new_procs; i++) { ++ MPIDI_OFI_CALL(fi_av_insert(MPIDI_OFI_global.av, new_upids[i], ++ 1, ++ (fi_addr_t *) & ++ MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).dest, 0ULL, ++ NULL), avmap); ++#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS ++ MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).ep_idx = 0; ++#else ++#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS ++ MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).ep_idx = 0; ++#endif ++#endif ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\tupids to lupids avtid %d lpid %d mapped to %" PRIu64, ++ avtid, i, MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).dest)); ++ /* highest bit is marked as 1 to indicate this is a new process */ ++ (*remote_lupids)[new_avt_procs[i]] = MPIDIU_LUPID_CREATE(avtid, i); ++ MPIDIU_LUPID_SET_NEW_AVT_MARK((*remote_lupids)[new_avt_procs[i]]); ++ } ++ } ++ ++ fn_exit: ++ MPL_free(new_avt_procs); ++ MPL_free(new_upids); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ return 0; ++} ++ ++ ++static int create_endpoint(struct fi_info *prov_use, struct fid_domain *domain, ++ struct fid_cq *p2p_cq, struct fid_cntr *rma_ctr, struct fid_av *av, ++ struct fid_ep **ep, int idx) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ struct fi_tx_attr tx_attr; ++ struct fi_rx_attr rx_attr; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CREATE_ENDPOINT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CREATE_ENDPOINT); ++ ++ if (MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS) { ++ struct fi_cq_attr cq_attr; ++ ++ if (*ep == NULL) { ++ /* First call to this function -- set up scalable endpoint */ ++ MPIDI_OFI_CALL(fi_scalable_ep(domain, prov_use, ep, NULL), ep); ++ MPIDI_OFI_CALL(fi_scalable_ep_bind(*ep, &av->fid, 0), bind); ++ } ++ ++ memset(&cq_attr, 0, sizeof(cq_attr)); ++ cq_attr.format = FI_CQ_FORMAT_TAGGED; ++ MPIDI_OFI_CALL(fi_cq_open(MPIDI_OFI_global.domain, ++ &cq_attr, &MPIDI_OFI_global.ctx[idx].cq, NULL), opencq); ++ ++ tx_attr = *prov_use->tx_attr; ++ tx_attr.op_flags = FI_COMPLETION; ++ if (MPIDI_OFI_ENABLE_RMA || MPIDI_OFI_ENABLE_ATOMICS) ++ tx_attr.op_flags |= FI_DELIVERY_COMPLETE; ++ tx_attr.caps = 0; ++ ++ if (MPIDI_OFI_ENABLE_TAGGED) ++ tx_attr.caps = FI_TAGGED; ++ ++ /* RMA */ ++ if (MPIDI_OFI_ENABLE_RMA) ++ tx_attr.caps |= FI_RMA; ++ if (MPIDI_OFI_ENABLE_ATOMICS) ++ tx_attr.caps |= FI_ATOMICS; ++ /* MSG */ ++ tx_attr.caps |= FI_MSG; ++ ++ MPIDI_OFI_CALL(fi_tx_context(*ep, idx, &tx_attr, &MPIDI_OFI_global.ctx[idx].tx, NULL), ep); ++ MPIDI_OFI_CALL(fi_ep_bind ++ (MPIDI_OFI_global.ctx[idx].tx, &MPIDI_OFI_global.ctx[idx].cq->fid, ++ FI_SEND | FI_SELECTIVE_COMPLETION), bind); ++ MPIDI_OFI_CALL(fi_ep_bind ++ (MPIDI_OFI_global.ctx[idx].tx, &rma_ctr->fid, FI_WRITE | FI_READ), bind); ++ ++ rx_attr = *prov_use->rx_attr; ++ rx_attr.caps = 0; ++ ++ if (MPIDI_OFI_ENABLE_TAGGED) { ++ rx_attr.caps |= FI_TAGGED; ++ rx_attr.caps |= FI_DIRECTED_RECV; ++ } ++ ++ if (MPIDI_OFI_ENABLE_RMA) ++ rx_attr.caps |= FI_RMA | FI_REMOTE_READ | FI_REMOTE_WRITE; ++ if (MPIDI_OFI_ENABLE_ATOMICS) ++ rx_attr.caps |= FI_ATOMICS; ++ rx_attr.caps |= FI_MSG; ++ rx_attr.caps |= FI_MULTI_RECV; ++ ++ MPIDI_OFI_CALL(fi_rx_context(*ep, idx, &rx_attr, &MPIDI_OFI_global.ctx[idx].rx, NULL), ep); ++ MPIDI_OFI_CALL(fi_ep_bind ++ (MPIDI_OFI_global.ctx[idx].rx, &MPIDI_OFI_global.ctx[idx].cq->fid, ++ FI_RECV), bind); ++ ++ MPIDI_OFI_CALL(fi_enable(*ep), ep_enable); ++ ++ MPIDI_OFI_CALL(fi_enable(MPIDI_OFI_global.ctx[idx].tx), ep_enable); ++ MPIDI_OFI_CALL(fi_enable(MPIDI_OFI_global.ctx[idx].rx), ep_enable); ++ } else { ++ /* ---------------------------------------------------------- */ ++ /* Bind the CQs, counters, and AV to the endpoint object */ ++ /* ---------------------------------------------------------- */ ++ /* "Normal Endpoint */ ++ MPIDI_OFI_CALL(fi_endpoint(domain, prov_use, ep, NULL), ep); ++ MPIDI_OFI_CALL(fi_ep_bind(*ep, &p2p_cq->fid, FI_SEND | FI_RECV | FI_SELECTIVE_COMPLETION), ++ bind); ++ MPIDI_OFI_CALL(fi_ep_bind(*ep, &rma_ctr->fid, FI_READ | FI_WRITE), bind); ++ MPIDI_OFI_CALL(fi_ep_bind(*ep, &av->fid, 0), bind); ++ MPIDI_OFI_CALL(fi_enable(*ep), ep_enable); ++ ++ /* Copy the normal ep into the first entry for scalable endpoints to ++ * allow compile macros to work */ ++ MPIDI_OFI_global.ctx[0].tx = MPIDI_OFI_global.ctx[0].rx = *ep; ++ MPIDI_OFI_global.ctx[0].cq = p2p_cq; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CREATE_ENDPOINT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static void dump_providers(struct fi_info *prov) ++{ ++ fprintf(stdout, "Dumping Providers(first=%p):\n", prov); ++ while (prov) { ++ fprintf(stdout, "%s", fi_tostr(prov, FI_TYPE_INFO)); ++ prov = prov->next; ++ } ++} ++ ++static int application_hints(int rank) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_AV_TABLE: %d", MPIDI_OFI_ENABLE_AV_TABLE)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS: %d", ++ MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_SHARED_CONTEXTS: %d", ++ MPIDI_OFI_ENABLE_SHARED_CONTEXTS)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_MR_SCALABLE: %d", ++ MPIDI_OFI_ENABLE_MR_SCALABLE)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_TAGGED: %d", MPIDI_OFI_ENABLE_TAGGED)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_AM: %d", MPIDI_OFI_ENABLE_AM)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_RMA: %d", MPIDI_OFI_ENABLE_RMA)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_FETCH_ATOMIC_IOVECS: %d", ++ MPIDI_OFI_FETCH_ATOMIC_IOVECS)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_IOVEC_ALIGN: %d", MPIDI_OFI_IOVEC_ALIGN)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS: %d", ++ MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS: %d", ++ MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_PT2PT_NOPACK: %d", ++ MPIDI_OFI_ENABLE_PT2PT_NOPACK)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_NUM_AM_BUFFERS: %d", MPIDI_OFI_NUM_AM_BUFFERS)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_CONTEXT_BITS: %d", MPIDI_OFI_CONTEXT_BITS)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_SOURCE_BITS: %d", MPIDI_OFI_SOURCE_BITS)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_OFI_TAG_BITS: %d", MPIDI_OFI_TAG_BITS)); ++ ++ if (MPIR_CVAR_CH4_OFI_CAPABILITY_SETS_DEBUG && rank == 0) { ++ fprintf(stdout, "==== Capability set configuration ====\n"); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_AV_TABLE: %d\n", MPIDI_OFI_ENABLE_AV_TABLE); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS: %d\n", ++ MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_SHARED_CONTEXTS: %d\n", MPIDI_OFI_ENABLE_SHARED_CONTEXTS); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_MR_SCALABLE: %d\n", MPIDI_OFI_ENABLE_MR_SCALABLE); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_TAGGED: %d\n", MPIDI_OFI_ENABLE_TAGGED); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_AM: %d\n", MPIDI_OFI_ENABLE_AM); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_RMA: %d\n", MPIDI_OFI_ENABLE_RMA); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_ATOMICS: %d\n", MPIDI_OFI_ENABLE_ATOMICS); ++ fprintf(stdout, "MPIDI_OFI_FETCH_ATOMIC_IOVECS: %d\n", MPIDI_OFI_FETCH_ATOMIC_IOVECS); ++ fprintf(stdout, "MPIDI_OFI_IOVEC_ALIGN: %d\n", MPIDI_OFI_IOVEC_ALIGN); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS: %d\n", ++ MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS: %d\n", ++ MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS); ++ fprintf(stdout, "MPIDI_OFI_ENABLE_PT2PT_NOPACK: %d\n", MPIDI_OFI_ENABLE_PT2PT_NOPACK); ++ fprintf(stdout, "MPIDI_OFI_NUM_AM_BUFFERS: %d\n", MPIDI_OFI_NUM_AM_BUFFERS); ++ fprintf(stdout, "MPIDI_OFI_CONTEXT_BITS: %d\n", MPIDI_OFI_CONTEXT_BITS); ++ fprintf(stdout, "MPIDI_OFI_SOURCE_BITS: %d\n", MPIDI_OFI_SOURCE_BITS); ++ fprintf(stdout, "MPIDI_OFI_TAG_BITS: %d\n", MPIDI_OFI_TAG_BITS); ++ fprintf(stdout, "======================================\n"); ++ ++ /* Discover the maximum number of ranks. If the source shift is not ++ * defined, there are 32 bits in use due to the uint32_t used in ++ * ofi_send.h */ ++ fprintf(stdout, "MAXIMUM SUPPORTED RANKS: %ld\n", (long int) 1 << MPIDI_OFI_MAX_RANK_BITS); ++ ++ /* Discover the tag_ub */ ++ fprintf(stdout, "MAXIMUM TAG: %lu\n", 1UL << MPIDI_OFI_TAG_BITS); ++ fprintf(stdout, "======================================\n"); ++ } ++ ++ /* Check that the desired number of ranks is possible and abort if not */ ++ if (MPIDI_OFI_MAX_RANK_BITS < 32 && ++ MPIR_Comm_size(MPIR_Process.comm_world) > (1 << MPIDI_OFI_MAX_RANK_BITS)) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch4|too_many_ranks"); ++ } ++ ++ fn_fail: ++ return mpi_errno; ++} ++ ++static int init_global_settings(const char *prov_name) ++{ ++ int prov_idx = MPIDI_OFI_get_set_number(prov_name); ++ MPIDI_OFI_capabilities_t *prov_caps = &MPIDI_OFI_caps_list[prov_idx]; ++ ++ /* Seed the global settings values for cases where we are using runtime sets */ ++ MPIDI_OFI_global.settings.enable_av_table = ++ MPIR_CVAR_CH4_OFI_ENABLE_AV_TABLE != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_AV_TABLE : prov_name ? ++ prov_caps->enable_av_table : MPIR_CVAR_CH4_OFI_ENABLE_AV_TABLE; ++ MPIDI_OFI_global.settings.enable_scalable_endpoints = ++ MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS : prov_name ? ++ prov_caps->enable_scalable_endpoints : MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS; ++ /* If the user specifies -1 (=don't care) and the provider supports it, then try to use STX ++ * and fall back if necessary in the RMA init code */ ++ MPIDI_OFI_global.settings.enable_shared_contexts = ++ MPIR_CVAR_CH4_OFI_ENABLE_SHARED_CONTEXTS != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_SHARED_CONTEXTS : prov_name ? ++ prov_caps->enable_shared_contexts : MPIR_CVAR_CH4_OFI_ENABLE_SHARED_CONTEXTS; ++ MPIDI_OFI_global.settings.enable_mr_scalable = ++ MPIR_CVAR_CH4_OFI_ENABLE_MR_SCALABLE != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_MR_SCALABLE : prov_name ? ++ prov_caps->enable_mr_scalable : MPIR_CVAR_CH4_OFI_ENABLE_MR_SCALABLE; ++ MPIDI_OFI_global.settings.enable_tagged = ++ MPIR_CVAR_CH4_OFI_ENABLE_TAGGED != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_TAGGED : prov_name ? ++ prov_caps->enable_tagged : MPIR_CVAR_CH4_OFI_ENABLE_TAGGED; ++ MPIDI_OFI_global.settings.enable_am = ++ MPIR_CVAR_CH4_OFI_ENABLE_AM != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_AM : prov_name ? ++ prov_caps->enable_am : MPIR_CVAR_CH4_OFI_ENABLE_AM; ++ MPIDI_OFI_global.settings.enable_rma = ++ MPIR_CVAR_CH4_OFI_ENABLE_RMA != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_RMA : prov_name ? ++ prov_caps->enable_rma : MPIR_CVAR_CH4_OFI_ENABLE_RMA; ++ /* try to enable atomics only when RMA is enabled */ ++ MPIDI_OFI_global.settings.enable_atomics = ++ MPIDI_OFI_ENABLE_RMA ? (MPIR_CVAR_CH4_OFI_ENABLE_ATOMICS != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_ATOMICS : prov_name ? ++ prov_caps->enable_atomics : MPIR_CVAR_CH4_OFI_ENABLE_ATOMICS) : 0; ++ MPIDI_OFI_global.settings.fetch_atomic_iovecs = ++ MPIR_CVAR_CH4_OFI_FETCH_ATOMIC_IOVECS != ++ -1 ? MPIR_CVAR_CH4_OFI_FETCH_ATOMIC_IOVECS : prov_name ? ++ prov_caps->fetch_atomic_iovecs : MPIR_CVAR_CH4_OFI_FETCH_ATOMIC_IOVECS; ++ MPIDI_OFI_global.settings.enable_data_auto_progress = ++ MPIR_CVAR_CH4_OFI_ENABLE_DATA_AUTO_PROGRESS != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_DATA_AUTO_PROGRESS : prov_name ? ++ prov_caps->enable_data_auto_progress : MPIR_CVAR_CH4_OFI_ENABLE_DATA_AUTO_PROGRESS; ++ MPIDI_OFI_global.settings.enable_control_auto_progress = ++ MPIR_CVAR_CH4_OFI_ENABLE_CONTROL_AUTO_PROGRESS != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_CONTROL_AUTO_PROGRESS : prov_name ? ++ prov_caps->enable_control_auto_progress : MPIR_CVAR_CH4_OFI_ENABLE_CONTROL_AUTO_PROGRESS; ++ MPIDI_OFI_global.settings.enable_pt2pt_nopack = ++ MPIR_CVAR_CH4_OFI_ENABLE_PT2PT_NOPACK != ++ -1 ? MPIR_CVAR_CH4_OFI_ENABLE_PT2PT_NOPACK : prov_name ? ++ prov_caps->enable_pt2pt_nopack : MPIR_CVAR_CH4_OFI_ENABLE_PT2PT_NOPACK; ++ MPIDI_OFI_global.settings.context_bits = ++ MPIR_CVAR_CH4_OFI_CONTEXT_ID_BITS != ++ -1 ? MPIR_CVAR_CH4_OFI_CONTEXT_ID_BITS : prov_name ? ++ prov_caps->context_bits : MPIR_CVAR_CH4_OFI_CONTEXT_ID_BITS; ++ MPIDI_OFI_global.settings.source_bits = ++ MPIR_CVAR_CH4_OFI_RANK_BITS != ++ -1 ? MPIR_CVAR_CH4_OFI_RANK_BITS : prov_name ? ++ prov_caps->source_bits : MPIR_CVAR_CH4_OFI_RANK_BITS; ++ MPIDI_OFI_global.settings.tag_bits = ++ MPIR_CVAR_CH4_OFI_TAG_BITS != ++ -1 ? MPIR_CVAR_CH4_OFI_TAG_BITS : prov_name ? ++ prov_caps->tag_bits : MPIR_CVAR_CH4_OFI_TAG_BITS; ++ MPIDI_OFI_global.settings.major_version = ++ MPIR_CVAR_CH4_OFI_MAJOR_VERSION != ++ -1 ? MPIR_CVAR_CH4_OFI_MAJOR_VERSION : prov_name ? ++ prov_caps->major_version : MPIR_CVAR_CH4_OFI_MAJOR_VERSION; ++ MPIDI_OFI_global.settings.minor_version = ++ MPIR_CVAR_CH4_OFI_MINOR_VERSION != ++ -1 ? MPIR_CVAR_CH4_OFI_MINOR_VERSION : prov_name ? ++ prov_caps->minor_version : MPIR_CVAR_CH4_OFI_MINOR_VERSION; ++ MPIDI_OFI_global.settings.num_am_buffers = ++ MPIR_CVAR_CH4_OFI_NUM_AM_BUFFERS != ++ -1 ? MPIR_CVAR_CH4_OFI_NUM_AM_BUFFERS : prov_name ? ++ prov_caps->num_am_buffers : MPIDI_OFI_NUM_AM_BUFFERS_MINIMAL; ++ if (MPIDI_OFI_global.settings.num_am_buffers < 0) { ++ MPIDI_OFI_global.settings.num_am_buffers = 0; ++ } ++ if (MPIDI_OFI_global.settings.num_am_buffers > MPIDI_OFI_MAX_NUM_AM_BUFFERS) { ++ MPIDI_OFI_global.settings.num_am_buffers = MPIDI_OFI_MAX_NUM_AM_BUFFERS; ++ } ++ return MPI_SUCCESS; ++} ++ ++static int init_hints(struct fi_info *hints) ++{ ++ int ofi_version = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION); ++ MPIR_Assert(hints != NULL); ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Hints to filter providers */ ++ /* See man fi_getinfo for a list */ ++ /* of all filters */ ++ /* mode: Select capabilities that this netmod will support */ ++ /* FI_CONTEXT(2): This netmod will pass in context into communication */ ++ /* to optimize storage locality between MPI requests and OFI opaque */ ++ /* data structures. */ ++ /* FI_ASYNC_IOV: MPICH will provide storage for iovecs on */ ++ /* communication calls, avoiding the OFI provider needing to require */ ++ /* a copy. */ ++ /* FI_LOCAL_MR unset: Note that we do not set FI_LOCAL_MR, */ ++ /* which means this netmod does not support exchange of memory */ ++ /* regions on communication calls. */ ++ /* caps: Capabilities required from the provider. The bits specified */ ++ /* with buffered receive, cancel, and remote complete implements */ ++ /* MPI semantics. */ ++ /* Tagged: used to support tag matching, 2-sided */ ++ /* RMA|Atomics: supports MPI 1-sided */ ++ /* MSG|MULTI_RECV: Supports synchronization protocol for 1-sided */ ++ /* FI_DIRECTED_RECV: Support not putting the source in the match */ ++ /* bits */ ++ /* We expect to register all memory up front for use with this */ ++ /* endpoint, so the netmod requires dynamic memory regions */ ++ /* ------------------------------------------------------------------------ */ ++ hints->mode = FI_CONTEXT | FI_ASYNC_IOV | FI_RX_CQ_DATA; /* We can handle contexts */ ++ ++ if (MPIDI_OFI_MAJOR_VERSION != -1 && MPIDI_OFI_MINOR_VERSION != -1) ++ ofi_version = FI_VERSION(MPIDI_OFI_MAJOR_VERSION, MPIDI_OFI_MINOR_VERSION); ++ ++ if (ofi_version >= FI_VERSION(1, 5)) { ++#ifdef FI_CONTEXT2 ++ hints->mode |= FI_CONTEXT2; ++#endif ++ } ++ hints->caps = 0ULL; ++ ++ /* RMA interface is used in AM and in native modes, ++ * it should be supported by OFI provider in any case */ ++ hints->caps |= FI_RMA; /* RMA(read/write) */ ++ hints->caps |= FI_WRITE; /* We need to specify all of the extra ++ * capabilities because we need to be ++ * specific later when we create tx/rx ++ * contexts. If we leave this off, the ++ * context creation fails because it's not ++ * a subset of this. */ ++ hints->caps |= FI_READ; ++ hints->caps |= FI_REMOTE_WRITE; ++ hints->caps |= FI_REMOTE_READ; ++ ++ if (MPIDI_OFI_ENABLE_ATOMICS) { ++ hints->caps |= FI_ATOMICS; /* Atomics capabilities */ ++ } ++ ++ if (MPIDI_OFI_ENABLE_TAGGED) { ++ hints->caps |= FI_TAGGED; /* Tag matching interface */ ++ hints->caps |= FI_DIRECTED_RECV; /* Match source address */ ++ hints->domain_attr->cq_data_size = 4; /* Minimum size for completion data entry */ ++ } ++ ++ if (MPIDI_OFI_ENABLE_AM) { ++ hints->caps |= FI_MSG; /* Message Queue apis */ ++ hints->caps |= FI_MULTI_RECV; /* Shared receive buffer */ ++ } ++ ++ /* ------------------------------------------------------------------------ */ ++ /* Set object options to be filtered by getinfo */ ++ /* domain_attr: domain attribute requirements */ ++ /* op_flags: persistent flag settings for an endpoint */ ++ /* endpoint type: see FI_EP_RDM */ ++ /* Filters applied (for this netmod, we need providers that can support): */ ++ /* THREAD_DOMAIN: Progress serialization is handled by netmod (locking) */ ++ /* PROGRESS_AUTO: request providers that make progress without requiring */ ++ /* the ADI to dedicate a thread to advance the state */ ++ /* FI_DELIVERY_COMPLETE: RMA operations are visible in remote memory */ ++ /* FI_COMPLETION: Selective completions of RMA ops */ ++ /* FI_EP_RDM: Reliable datagram */ ++ /* ------------------------------------------------------------------------ */ ++ hints->addr_format = FI_FORMAT_UNSPEC; ++ hints->domain_attr->threading = FI_THREAD_DOMAIN; ++ if (MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS) { ++ hints->domain_attr->data_progress = FI_PROGRESS_AUTO; ++ } else { ++ hints->domain_attr->data_progress = FI_PROGRESS_MANUAL; ++ } ++ if (MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS) { ++ hints->domain_attr->control_progress = FI_PROGRESS_AUTO; ++ } else { ++ hints->domain_attr->control_progress = FI_PROGRESS_MANUAL; ++ } ++ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; ++ hints->domain_attr->av_type = MPIDI_OFI_ENABLE_AV_TABLE ? FI_AV_TABLE : FI_AV_MAP; ++ if (MPIDI_OFI_ENABLE_MR_SCALABLE) ++ hints->domain_attr->mr_mode = FI_MR_SCALABLE; ++ else ++ hints->domain_attr->mr_mode = FI_MR_BASIC; ++ if (FI_VERSION(MPIDI_OFI_MAJOR_VERSION, MPIDI_OFI_MINOR_VERSION) >= FI_VERSION(1, 5)) { ++#ifdef FI_RESTRICTED_COMP ++ hints->domain_attr->mode = FI_RESTRICTED_COMP; ++#endif ++ } ++ hints->tx_attr->op_flags = FI_COMPLETION; ++ hints->tx_attr->msg_order = FI_ORDER_SAS; ++ /* direct RMA operations supported only with delivery complete mode, ++ * else (AM mode) delivery complete is not required */ ++ if (MPIDI_OFI_ENABLE_RMA || MPIDI_OFI_ENABLE_ATOMICS) { ++ hints->tx_attr->op_flags |= FI_DELIVERY_COMPLETE; ++ /* Apply most restricted msg order in hints for RMA ATOMICS. */ ++ if (MPIDI_OFI_ENABLE_ATOMICS) ++ hints->tx_attr->msg_order |= FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_WAR | FI_ORDER_WAW; ++ } ++ hints->tx_attr->comp_order = FI_ORDER_NONE; ++ hints->rx_attr->op_flags = FI_COMPLETION; ++ hints->rx_attr->total_buffered_recv = 0; /* FI_RM_ENABLED ensures buffering of unexpected messages */ ++ hints->ep_attr->type = FI_EP_RDM; ++ hints->ep_attr->mem_tag_format = MPIDI_OFI_SOURCE_BITS ? ++ /* PROTOCOL | CONTEXT | SOURCE | TAG */ ++ MPIDI_OFI_PROTOCOL_MASK | 0 | MPIDI_OFI_SOURCE_MASK | 0 /* With source bits */ : ++ MPIDI_OFI_PROTOCOL_MASK | 0 | 0 | MPIDI_OFI_TAG_MASK /* No source bits */ ; ++ ++ return MPI_SUCCESS; ++} ++ ++/* If name is not NULL, we'll use the specified capability set as the selection basis */ ++static struct fi_info *pick_provider(struct fi_info *hints, const char *provname, ++ struct fi_info *prov_list) ++{ ++ struct fi_info *prov, *prov_use = NULL; ++ ++ prov = prov_list; ++ while (NULL != prov) { ++ prov_use = prov; ++ ++ /* If we picked the provider already, make sure we grab the right provider */ ++ if ((NULL != provname) && ++ (0 != strcmp(provname, MPIDI_OFI_SET_NAME_DEFAULT)) && ++ (0 != strcmp(provname, MPIDI_OFI_SET_NAME_MINIMAL)) && ++ (0 != strcmp(provname, prov_use->fabric_attr->prov_name))) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Skipping provider because not selected one")); ++ prov = prov_use->next; ++ continue; ++ } ++ ++ /* Set global settings according to evaluated provider if not already picked */ ++ if (!provname) ++ init_global_settings(prov_use->fabric_attr->prov_name); ++ ++ /* Update hints according to global settings just picked */ ++ init_hints(hints); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, "Provider name: %s", ++ prov_use->fabric_attr->prov_name)); ++ ++ /* Check that this provider meets the minimum requirements for the user */ ++ if (MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS && (prov_use->domain_attr->max_ep_tx_ctx <= 1)) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Provider doesn't support scalable endpoints")); ++ prov = prov_use->next; ++ continue; ++ } else if (MPIDI_OFI_ENABLE_TAGGED && ++ (!(prov_use->caps & FI_TAGGED) || ++ !(prov_use->caps & FI_DIRECTED_RECV) || ++ prov_use->domain_attr->cq_data_size < 4)) { ++ /* From the fi_getinfo manpage: "FI_TAGGED implies the ability to send and receive ++ * tagged messages." Therefore no need to specify FI_SEND|FI_RECV. Moreover FI_SEND ++ * and FI_RECV are mutually exclusive, so they should never be set both at the same ++ * time. */ ++ /* This capability set also requires the ability to receive data in the completion ++ * queue object (at least 32 bits). Previously, this was a separate capability set, ++ * but as more and more providers supported this feature, the decision was made to ++ * require it. */ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Provider doesn't support tagged interfaces")); ++ prov = prov_use->next; ++ continue; ++ } else if (MPIDI_OFI_ENABLE_AM && ++ ((prov_use->caps & (FI_MSG | FI_MULTI_RECV)) != (FI_MSG | FI_MULTI_RECV))) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Provider doesn't support active messages")); ++ prov = prov_use->next; ++ continue; ++ } else if (MPIDI_OFI_ENABLE_RMA && !(prov_use->caps & FI_RMA)) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Provider doesn't support RMA")); ++ prov = prov_use->next; ++ continue; ++ } else if (MPIDI_OFI_ENABLE_ATOMICS) { ++ uint64_t msg_order = FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_WAR | FI_ORDER_WAW; ++ if (!(prov_use->caps & FI_ATOMICS) || ++ (prov_use->tx_attr->msg_order & msg_order) != msg_order) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Provider doesn't support atomics")); ++ prov = prov_use->next; ++ continue; ++ } ++ } else if (MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS && ++ !(prov_use->domain_attr->control_progress & FI_PROGRESS_AUTO)) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Provider doesn't support auto control progress")); ++ prov = prov_use->next; ++ continue; ++ } else if (MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS && ++ !(prov_use->domain_attr->data_progress & FI_PROGRESS_AUTO)) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Provider doesn't support auto data progress")); ++ prov = prov_use->next; ++ continue; ++ ++ /* Check that the provider has all of the requirements of MPICH */ ++ } else if (prov_use->ep_attr->type != FI_EP_RDM) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Provider doesn't support RDM")); ++ prov = prov_use->next; ++ continue; ++ } ++ ++ /* Update hints that correspond to the current globals */ ++ hints->caps = prov_use->caps; ++ ++ /* If the user picked a provider, we want to reset all of the hints to be whatever that ++ * provider actually provides (we might get multiple version of that provider back from ++ * fi_init and we want the best version). */ ++ if ((NULL != provname) && ++ (0 != strcmp(provname, MPIDI_OFI_SET_NAME_DEFAULT)) && ++ (0 != strcmp(provname, MPIDI_OFI_SET_NAME_MINIMAL)) && ++ (0 != strcmp(provname, prov_use->fabric_attr->prov_name))) { ++ ++ /* set provider name to hints to make more accurate selection */ ++ init_hints(hints); ++ ++ hints->fabric_attr->prov_name = MPL_strdup(prov_use->fabric_attr->prov_name); ++ } ++ ++ break; ++ } ++ ++ return prov_use; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ofi/ofi_init.h ++++ /dev/null +@@ -1,1769 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef OFI_INIT_H_INCLUDED +-#define OFI_INIT_H_INCLUDED +- +-#include "ofi_impl.h" +-#include "mpir_cvars.h" +-#include "mpidu_bc.h" +- +-/* +-=== BEGIN_MPI_T_CVAR_INFO_BLOCK === +- +-categories : +- - name : CH4_OFI +- description : A category for CH4 OFI netmod variables +- +-cvars: +- - name : MPIR_CVAR_CH4_OFI_CAPABILITY_SETS_DEBUG +- category : CH4_OFI +- type : int +- default : 0 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Prints out the configuration of each capability selected via the capability sets interface. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_DATA +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Enable immediate data fields in OFI to transmit source rank outside of the match bits +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_AV_TABLE +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, the OFI addressing information will be stored with an FI_AV_TABLE. +- If false, an FI_AV_MAP will be used. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, use OFI scalable endpoints. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_SHARED_CONTEXTS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If set to false (zero), MPICH does not use OFI shared contexts. +- If set to -1, it is determined by the OFI capability sets based on the provider. +- Otherwise, MPICH tries to use OFI shared contexts. If they are unavailable, +- it'll fall back to the mode without shared contexts. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_MR_SCALABLE +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, MR_SCALABLE for OFI memory regions. +- If false, MR_BASIC for OFI memory regions. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_TAGGED +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, use tagged message transmission functions in OFI. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_AM +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, enable OFI active message support. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_RMA +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, enable OFI RMA support. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_ATOMICS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, enable OFI Atomics support. +- +- - name : MPIR_CVAR_CH4_OFI_FETCH_ATOMIC_IOVECS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Specifies the maximum number of iovecs that can be used by the OFI provider +- for fetch_atomic operations. The default value is -1, indicating that +- no value is set. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_DATA_AUTO_PROGRESS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, enable MPI data auto progress. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_CONTROL_AUTO_PROGRESS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, enable MPI control auto progress. +- +- - name : MPIR_CVAR_CH4_OFI_ENABLE_PT2PT_NOPACK +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If true, enable iovec for pt2pt. +- +- - name : MPIR_CVAR_CH4_OFI_CONTEXT_ID_BITS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Specifies the number of bits that will be used for matching the context +- ID. The default value is -1, indicating that no value is set and that +- the default will be defined in the ofi_types.h file. +- +- - name : MPIR_CVAR_CH4_OFI_RANK_BITS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Specifies the number of bits that will be used for matching the MPI +- rank. The default value is -1, indicating that no value is set and that +- the default will be defined in the ofi_types.h file. +- +- - name : MPIR_CVAR_CH4_OFI_TAG_BITS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Specifies the number of bits that will be used for matching the user +- tag. The default value is -1, indicating that no value is set and that +- the default will be defined in the ofi_types.h file. +- +- - name : MPIR_CVAR_CH4_OFI_MAJOR_VERSION +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Specifies the major version of the OFI library. The default is the +- major version of the OFI library used with MPICH. If using this CVAR, +- it is recommended that the user also specifies a specific OFI provider. +- +- - name : MPIR_CVAR_CH4_OFI_MINOR_VERSION +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Specifies the major version of the OFI library. The default is the +- minor version of the OFI library used with MPICH. If using this CVAR, +- it is recommended that the user also specifies a specific OFI provider. +- +- - name : MPIR_CVAR_CH4_OFI_MAX_VNIS +- category : CH4_OFI +- type : int +- default : 1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If set to positive, this CVAR specifies the maximum number of CH4 VNIs +- that OFI netmod exposes. +- +- - name : MPIR_CVAR_CH4_OFI_MAX_RMA_SEP_CTX +- category : CH4_OFI +- type : int +- default : 0 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If set to positive, this CVAR specifies the maximum number of transmit +- contexts RMA can utilize in a scalable endpoint. +- This value is effective only when scalable endpoint is available, otherwise +- it will be ignored. +- +- - name : MPIR_CVAR_CH4_OFI_MAX_EAGAIN_RETRY +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- If set to positive, this CVAR specifies the maximum number of retries +- of an ofi operations before returning MPIX_ERR_EAGAIN. This value is +- effective only when the communicator has the MPI_OFI_set_eagain info +- hint set to true. +- +- - name : MPIR_CVAR_CH4_OFI_NUM_AM_BUFFERS +- category : CH4_OFI +- type : int +- default : -1 +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Specifies the number of buffers for receiving active messages. +- +-=== END_MPI_T_CVAR_INFO_BLOCK === +-*/ +- +-static inline void MPIDI_OFI_dump_providers(struct fi_info *prov); +-static inline int MPIDI_OFI_create_endpoint(struct fi_info *prov_use, +- struct fid_domain *domain, +- struct fid_cq *p2p_cq, +- struct fid_cntr *rma_ctr, +- struct fid_av *av, struct fid_ep **ep, int index); +-static inline int MPIDI_OFI_application_hints(int rank); +-static inline int MPIDI_OFI_init_global_settings(const char *prov_name); +-static inline int MPIDI_OFI_init_hints(struct fi_info *hints); +- +-static inline int MPIDI_OFI_set_eagain(MPIR_Comm * comm_ptr, MPIR_Info * info, void *state) +-{ +- if (!strncmp(info->value, "true", strlen("true"))) +- MPIDI_OFI_COMM(comm_ptr).eagain = TRUE; +- if (!strncmp(info->value, "false", strlen("false"))) +- MPIDI_OFI_COMM(comm_ptr).eagain = FALSE; +- +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_OFI_conn_manager_init() +-{ +- int mpi_errno = MPI_SUCCESS, i; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INIT); +- +- MPIDI_Global.conn_mgr.mmapped_size = 8 * 4 * 1024; +- MPIDI_Global.conn_mgr.max_n_conn = 1; +- MPIDI_Global.conn_mgr.next_conn_id = 0; +- MPIDI_Global.conn_mgr.n_conn = 0; +- +- MPIDI_Global.conn_mgr.conn_list = +- (MPIDI_OFI_conn_t *) MPL_mmap(NULL, MPIDI_Global.conn_mgr.mmapped_size, +- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0, +- MPL_MEM_ADDRESS); +- MPIR_ERR_CHKANDSTMT(MPIDI_Global.conn_mgr.conn_list == MAP_FAILED, mpi_errno, MPI_ERR_NO_MEM, +- goto fn_fail, "**nomem"); +- +- MPIDI_Global.conn_mgr.free_conn_id = +- (int *) MPL_malloc(MPIDI_Global.conn_mgr.max_n_conn * sizeof(int), MPL_MEM_ADDRESS); +- MPIR_ERR_CHKANDSTMT(MPIDI_Global.conn_mgr.free_conn_id == NULL, mpi_errno, +- MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); +- +- for (i = 0; i < MPIDI_Global.conn_mgr.max_n_conn; ++i) { +- MPIDI_Global.conn_mgr.free_conn_id[i] = i + 1; +- } +- MPIDI_Global.conn_mgr.free_conn_id[MPIDI_Global.conn_mgr.max_n_conn - 1] = -1; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_OFI_conn_manager_destroy() +-{ +- int mpi_errno = MPI_SUCCESS, i, j; +- MPIDI_OFI_dynamic_process_request_t *req; +- fi_addr_t *conn; +- int max_n_conn = MPIDI_Global.conn_mgr.max_n_conn; +- int *close_msg; +- uint64_t match_bits = 0; +- uint64_t mask_bits = 0; +- MPIR_Context_id_t context_id = 0xF000; +- MPIR_CHKLMEM_DECL(3); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CONN_MANAGER_DESTROY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CONN_MANAGER_DESTROY); +- +- match_bits = MPIDI_OFI_init_recvtag(&mask_bits, context_id, MPI_ANY_SOURCE, 1); +- match_bits |= MPIDI_OFI_DYNPROC_SEND; +- +- if (max_n_conn > 0) { +- /* try wait/close connections */ +- MPIR_CHKLMEM_MALLOC(req, MPIDI_OFI_dynamic_process_request_t *, +- max_n_conn * sizeof(MPIDI_OFI_dynamic_process_request_t), mpi_errno, +- "req", MPL_MEM_BUFFER); +- MPIR_CHKLMEM_MALLOC(conn, fi_addr_t *, max_n_conn * sizeof(fi_addr_t), mpi_errno, "conn", +- MPL_MEM_BUFFER); +- MPIR_CHKLMEM_MALLOC(close_msg, int *, max_n_conn * sizeof(int), mpi_errno, "int", +- MPL_MEM_BUFFER); +- +- j = 0; +- for (i = 0; i < max_n_conn; ++i) { +- switch (MPIDI_Global.conn_mgr.conn_list[i].state) { +- case MPIDI_OFI_DYNPROC_CONNECTED_CHILD: +- MPIDI_OFI_dynproc_send_disconnect(i); +- break; +- case MPIDI_OFI_DYNPROC_LOCAL_DISCONNECTED_PARENT: +- case MPIDI_OFI_DYNPROC_CONNECTED_PARENT: +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Wait for close of conn_id=%d", i)); +- conn[j] = MPIDI_Global.conn_mgr.conn_list[i].dest; +- req[j].done = 0; +- req[j].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_Global.ctx[0].rx, +- &close_msg[j], +- sizeof(int), +- NULL, +- conn[j], +- match_bits, +- mask_bits, &req[j].context), +- trecv, MPIDI_OFI_CALL_LOCK, FALSE); +- j++; +- break; +- default: +- break; +- } +- } +- +- for (i = 0; i < j; ++i) { +- MPIDI_OFI_PROGRESS_WHILE(!req[i].done); +- MPIDI_Global.conn_mgr.conn_list[i].state = MPIDI_OFI_DYNPROC_DISCONNECTED; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "conn_id=%d closed", i)); +- } +- +- MPIR_CHKLMEM_FREEALL(); +- } +- +- MPL_munmap((void *) MPIDI_Global.conn_mgr.conn_list, MPIDI_Global.conn_mgr.mmapped_size, +- MPL_MEM_ADDRESS); +- MPL_free(MPIDI_Global.conn_mgr.free_conn_id); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CONN_MANAGER_DESTROY); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_init_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_init_hook(int rank, +- int size, +- int appnum, +- int *tag_bits, +- MPIR_Comm * comm_world, +- MPIR_Comm * comm_self, int spawned, int *n_vnis_provided) +-{ +- int mpi_errno = MPI_SUCCESS, pmi_errno, i, fi_version; +- int thr_err = 0; +- void *table = NULL, *provname = NULL; +- struct fi_info *hints, *prov = NULL, *prov_use, *prov_first; +- struct fi_cq_attr cq_attr; +- struct fi_cntr_attr cntr_attr; +- fi_addr_t *mapped_table; +- struct fi_av_attr av_attr; +- size_t optlen; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_INIT); +- +- if (!MPIDI_OFI_ENABLE_RUNTIME_CHECKS) { +- MPIDI_OFI_init_global_settings(MPIR_CVAR_OFI_USE_PROVIDER); +- } else { +- /* when runtime checks are enabled, and no provider name is set, then +- * try to select the fastest provider which fit minimal requirements. +- * to do this use "unknown" fake provider name to force initialization +- * of global settings by default minimal values. We are assuming +- * that libfabric returns available provider list sorted by performance +- * (faster - first) */ +- MPIDI_OFI_init_global_settings(MPIR_CVAR_OFI_USE_PROVIDER ? MPIR_CVAR_OFI_USE_PROVIDER : +- "unknown"); +- } +- +- CH4_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == +- offsetof(MPIDI_OFI_chunk_request, context)); +- CH4_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == +- offsetof(MPIDI_OFI_huge_recv_t, context)); +- CH4_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == +- offsetof(MPIDI_OFI_am_repost_request_t, context)); +- CH4_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == +- offsetof(MPIDI_OFI_ssendack_request_t, context)); +- CH4_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == +- offsetof(MPIDI_OFI_dynamic_process_request_t, context)); +- CH4_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.netmod) == +- offsetof(MPIDI_OFI_win_request_t, context)); +- CH4_COMPILE_TIME_ASSERT(offsetof(struct MPIR_Request, dev.ch4.am.netmod_am.ofi.context) == +- offsetof(struct MPIR_Request, dev.ch4.netmod.ofi.context)); +- CH4_COMPILE_TIME_ASSERT(sizeof(MPIDI_Devreq_t) >= sizeof(MPIDI_OFI_request_t)); +- CH4_COMPILE_TIME_ASSERT(sizeof(MPIR_Request) >= sizeof(MPIDI_OFI_win_request_t)); +- CH4_COMPILE_TIME_ASSERT(sizeof(MPIR_Context_id_t) * 8 >= MPIDI_OFI_AM_CONTEXT_ID_BITS); +- +- MPID_Thread_mutex_create(&MPIDI_OFI_THREAD_UTIL_MUTEX, &thr_err); +- MPID_Thread_mutex_create(&MPIDI_OFI_THREAD_PROGRESS_MUTEX, &thr_err); +- MPID_Thread_mutex_create(&MPIDI_OFI_THREAD_FI_MUTEX, &thr_err); +- MPID_Thread_mutex_create(&MPIDI_OFI_THREAD_SPAWN_MUTEX, &thr_err); +- +- /* ------------------------------------------------------------------------ */ +- /* fi_allocinfo: allocate and zero an fi_info structure and all related */ +- /* substructures */ +- /* ------------------------------------------------------------------------ */ +- hints = fi_allocinfo(); +- MPIR_Assert(hints != NULL); +- +- /* ------------------------------------------------------------------------ */ +- /* FI_VERSION provides binary backward and forward compatibility support */ +- /* Specify the version of OFI is coded to, the provider will select struct */ +- /* layouts that are compatible with this version. */ +- /* ------------------------------------------------------------------------ */ +- if (MPIDI_OFI_MAJOR_VERSION != -1 && MPIDI_OFI_MINOR_VERSION != -1) +- fi_version = FI_VERSION(MPIDI_OFI_MAJOR_VERSION, MPIDI_OFI_MINOR_VERSION); +- else +- fi_version = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION); +- +- MPIDI_OFI_init_hints(hints); +- +- /* ------------------------------------------------------------------------ */ +- /* fi_getinfo: returns information about fabric services for reaching a */ +- /* remote node or service. this does not necessarily allocate resources. */ +- /* Pass NULL for name/service because we want a list of providers supported */ +- /* ------------------------------------------------------------------------ */ +- provname = MPIR_CVAR_OFI_USE_PROVIDER ? (char *) MPL_strdup(MPIR_CVAR_OFI_USE_PROVIDER) : NULL; +- hints->fabric_attr->prov_name = provname; +- +- /* If the user picked a particular provider, ignore the checks */ +- if (MPIDI_OFI_ENABLE_RUNTIME_CHECKS) { +- /* Ensure that we aren't trying to shove too many bits into the match_bits. +- * Currently, this needs to fit into a uint64_t and we take 4 bits for protocol. */ +- MPIR_Assert(MPIDI_OFI_CONTEXT_BITS + MPIDI_OFI_SOURCE_BITS + MPIDI_OFI_TAG_BITS <= 60); +- +- MPIDI_OFI_CALL(fi_getinfo(fi_version, NULL, NULL, 0ULL, NULL, &prov), addrinfo); +- prov_first = prov; +- while (NULL != prov) { +- prov_use = prov; +- +- /* If we picked the provider already, make sure we grab the right provider */ +- if ((NULL != provname) && (0 != strcmp(provname, prov_use->fabric_attr->prov_name))) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Skipping provider because not selected one")); +- prov = prov_use->next; +- continue; +- } +- +- /* set global settings according to evaluated provider */ +- if (!MPIR_CVAR_OFI_USE_PROVIDER) +- MPIDI_OFI_init_global_settings(prov_use->fabric_attr->prov_name); +- +- /* Check that this provider meets the minimum requirements for the user */ +- if (MPIDI_OFI_ENABLE_DATA && (!(prov_use->caps & FI_DIRECTED_RECV) || +- prov_use->domain_attr->cq_data_size < 4)) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support immediate data")); +- prov = prov_use->next; +- continue; +- } else if (MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS && +- (prov_use->domain_attr->max_ep_tx_ctx <= 1)) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support scalable endpoints")); +- prov = prov_use->next; +- continue; +- } else if (MPIDI_OFI_ENABLE_TAGGED && !(prov_use->caps & FI_TAGGED)) { +- /* From the fi_getinfo manpage: "FI_TAGGED implies the +- * ability to send and receive tagged messages." +- * Therefore no need to specify FI_SEND|FI_RECV. +- * Moreover FI_SEND and FI_RECV are mutually +- * exclusive, so they should never be set both at the +- * same time. */ +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support tagged interfaces")); +- prov = prov_use->next; +- continue; +- } else if (MPIDI_OFI_ENABLE_AM && +- ((prov_use->caps & (FI_MSG | FI_MULTI_RECV)) != (FI_MSG | FI_MULTI_RECV))) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support active messages")); +- prov = prov_use->next; +- continue; +- } else if (MPIDI_OFI_ENABLE_RMA && !(prov_use->caps & FI_RMA)) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support RMA")); +- prov = prov_use->next; +- continue; +- } else if (MPIDI_OFI_ENABLE_ATOMICS && !(prov_use->caps & FI_ATOMICS)) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support atomics")); +- prov = prov_use->next; +- continue; +- } else if (MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS && +- !(hints->domain_attr->control_progress & FI_PROGRESS_AUTO)) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support auto control progress")); +- prov = prov_use->next; +- continue; +- } else if (MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS && +- !(hints->domain_attr->data_progress & FI_PROGRESS_AUTO)) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support auto data progress")); +- prov = prov_use->next; +- continue; +- +- /* Check that the provider has all of the requirements of MPICH */ +- } else if (prov_use->ep_attr->type != FI_EP_RDM) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Provider doesn't support RDM")); +- prov = prov_use->next; +- continue; +- } +- +- /* If the provider passed the above tests, then run the selection +- * logic again and make sure to pick this provider again with the +- * hints included this time. */ +- hints->caps = prov_use->caps; +- if (!MPIR_CVAR_OFI_USE_PROVIDER) { +- /* as soon as we updates globals for the provider, let's update +- * hints that corresponds to the current globals */ +- MPIDI_OFI_init_hints(hints); +- /* set provider name to hints to make more accurate selection */ +- provname = MPL_strdup(prov_use->fabric_attr->prov_name); +- hints->fabric_attr->prov_name = provname; +- } +- break; +- } +- +- if (prov_first && !prov && !MPIR_CVAR_OFI_USE_PROVIDER) { +- /* could not find suitable provider. ok, let's try fallback mode */ +- MPIDI_OFI_init_global_settings(prov_first->fabric_attr->prov_name); +- MPIDI_OFI_init_hints(hints); +- MPIDI_OFI_CALL(fi_getinfo(fi_version, NULL, NULL, 0ULL, hints, &prov), addrinfo); +- MPIR_ERR_CHKANDJUMP(prov == NULL, mpi_errno, MPI_ERR_OTHER, "**ofid_addrinfo"); +- prov_use = prov; +- +- if (prov_use) { +- /* If the provider passed the above tests, then run the selection +- * logic again and make sure to pick this provider again with the +- * hints included this time. */ +- hints->caps = prov_use->caps; +- if (!MPIR_CVAR_OFI_USE_PROVIDER) { +- /* set provider name to hints to make more accurate selection */ +- provname = MPL_strdup(prov_use->fabric_attr->prov_name); +- hints->fabric_attr->prov_name = provname; +- } +- } +- if (prov) +- fi_freeinfo(prov); +- } +- +- /* If we did not find a provider, return an error */ +- MPIR_ERR_CHKANDJUMP(prov == NULL, mpi_errno, MPI_ERR_OTHER, "**ofid_addrinfo"); +- +- fi_freeinfo(prov_first); +- } else { +- /* If runtime checks are disabled, make sure that the user-specified +- * provider matches the configure-specified provider. */ +- MPIR_ERR_CHKANDJUMP(provname != NULL && +- MPIDI_OFI_SET_NUMBER != MPIDI_OFI_get_set_number(provname), +- mpi_errno, MPI_ERR_OTHER, "**ofi_provider_mismatch"); +- } +- +- MPIDI_OFI_CALL(fi_getinfo(fi_version, NULL, NULL, 0ULL, hints, &prov), addrinfo); +- MPIR_ERR_CHKANDJUMP(prov == NULL, mpi_errno, MPI_ERR_OTHER, "**ofid_addrinfo"); +- /* When a specific provider is specified at configure time, +- * make sure it is the one selected by fi_getinfo */ +- MPIR_ERR_CHKANDJUMP(!MPIDI_OFI_ENABLE_RUNTIME_CHECKS && +- MPIDI_OFI_SET_NUMBER != +- MPIDI_OFI_get_set_number(prov->fabric_attr->prov_name), mpi_errno, +- MPI_ERR_OTHER, "**ofi_provider_mismatch"); +- prov_use = prov; +- if (MPIR_CVAR_OFI_DUMP_PROVIDERS) +- MPIDI_OFI_dump_providers(prov); +- +- *tag_bits = MPIDI_OFI_TAG_BITS; +- +- if (MPIDI_OFI_ENABLE_RUNTIME_CHECKS) { +- /* ------------------------------------------------------------------------ */ +- /* Set global attributes attributes based on the provider choice */ +- /* ------------------------------------------------------------------------ */ +- MPIDI_Global.settings.enable_data = MPIDI_Global.settings.enable_data && +- (prov_use->caps & FI_DIRECTED_RECV) && prov_use->domain_attr->cq_data_size >= 4; +- MPIDI_Global.settings.enable_av_table = MPIDI_Global.settings.enable_av_table && +- prov_use->domain_attr->av_type == FI_AV_TABLE; +- MPIDI_Global.settings.enable_scalable_endpoints = +- MPIDI_Global.settings.enable_scalable_endpoints && +- prov_use->domain_attr->max_ep_tx_ctx > 1; +- MPIDI_Global.settings.enable_mr_scalable = +- MPIDI_Global.settings.enable_mr_scalable && +- prov_use->domain_attr->mr_mode == FI_MR_SCALABLE; +- MPIDI_Global.settings.enable_tagged = MPIDI_Global.settings.enable_tagged && +- prov_use->caps & FI_TAGGED; +- MPIDI_Global.settings.enable_am = MPIDI_Global.settings.enable_am && +- (prov_use->caps & (FI_MSG | FI_MULTI_RECV | FI_READ)) == +- (FI_MSG | FI_MULTI_RECV | FI_READ); +- MPIDI_Global.settings.enable_rma = MPIDI_Global.settings.enable_rma && +- prov_use->caps & FI_RMA; +- MPIDI_Global.settings.enable_atomics = MPIDI_Global.settings.enable_atomics && +- prov_use->caps & FI_ATOMICS; +- MPIDI_Global.settings.enable_data_auto_progress = +- MPIDI_Global.settings.enable_data_auto_progress && +- hints->domain_attr->data_progress & FI_PROGRESS_AUTO; +- MPIDI_Global.settings.enable_control_auto_progress = +- MPIDI_Global.settings.enable_control_auto_progress && +- hints->domain_attr->control_progress & FI_PROGRESS_AUTO; +- +- if (MPIDI_Global.settings.enable_scalable_endpoints) { +- MPIDI_Global.settings.max_endpoints = MPIDI_OFI_MAX_ENDPOINTS_SCALABLE; +- MPIDI_Global.settings.max_endpoints_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS_SCALABLE; +- } else { +- MPIDI_Global.settings.max_endpoints = MPIDI_OFI_MAX_ENDPOINTS_REGULAR; +- MPIDI_Global.settings.max_endpoints_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS_REGULAR; +- } +- } +- +- /* Print some debugging output to give the user some hints */ +- mpi_errno = MPIDI_OFI_application_hints(rank); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIDI_Global.prov_use = fi_dupinfo(prov_use); +- MPIR_Assert(MPIDI_Global.prov_use); +- +- MPIDI_Global.max_buffered_send = prov_use->tx_attr->inject_size; +- MPIDI_Global.max_buffered_write = prov_use->tx_attr->inject_size; +- MPIDI_Global.max_send = prov_use->ep_attr->max_msg_size; +- MPIDI_Global.max_write = prov_use->ep_attr->max_msg_size; +- MPIDI_Global.max_order_raw = prov_use->ep_attr->max_order_raw_size; +- MPIDI_Global.max_order_war = prov_use->ep_attr->max_order_war_size; +- MPIDI_Global.max_order_waw = prov_use->ep_attr->max_order_waw_size; +- MPIDI_Global.tx_iov_limit = MIN(prov_use->tx_attr->iov_limit, MPIDI_OFI_IOV_MAX); +- MPIDI_Global.rx_iov_limit = MIN(prov_use->rx_attr->iov_limit, MPIDI_OFI_IOV_MAX); +- MPIDI_Global.rma_iov_limit = MIN(prov_use->tx_attr->rma_iov_limit, MPIDI_OFI_IOV_MAX); +- MPIDI_Global.max_mr_key_size = prov_use->domain_attr->mr_key_size; +- +- if (MPIDI_Global.max_mr_key_size >= 8) { +- MPIDI_Global.max_rma_key_bits = MPIDI_OFI_MAX_KEY_BITS_64; +- MPIDI_Global.max_huge_rmas = MPIDI_OFI_MAX_HUGE_RMAS_64; +- MPIDI_Global.context_shift = MPIDI_OFI_CONTEXT_SHIFT_64; +- MPIDI_Global.rma_key_type_bits = MPIDI_OFI_MAX_KEY_TYPE_BITS_64; +- } else if (MPIDI_Global.max_mr_key_size >= 4) { +- MPIDI_Global.max_rma_key_bits = MPIDI_OFI_MAX_KEY_BITS_32; +- MPIDI_Global.max_huge_rmas = MPIDI_OFI_MAX_HUGE_RMAS_32; +- MPIDI_Global.context_shift = MPIDI_OFI_CONTEXT_SHIFT_32; +- MPIDI_Global.rma_key_type_bits = MPIDI_OFI_MAX_KEY_TYPE_BITS_32; +- } else if (MPIDI_Global.max_mr_key_size >= 2) { +- MPIDI_Global.max_rma_key_bits = MPIDI_OFI_MAX_KEY_BITS_16; +- MPIDI_Global.max_huge_rmas = MPIDI_OFI_MAX_HUGE_RMAS_16; +- MPIDI_Global.context_shift = MPIDI_OFI_CONTEXT_SHIFT_16; +- MPIDI_Global.rma_key_type_bits = MPIDI_OFI_MAX_KEY_TYPE_BITS_16; +- } else { +- MPIR_ERR_SETFATALANDJUMP4(mpi_errno, +- MPI_ERR_OTHER, +- "**ofid_rma_init", +- "**ofid_rma_init %s %d %s %s", +- __SHORT_FILE__, __LINE__, FCNAME, "Key space too small"); +- } +- +- /* ------------------------------------------------------------------------ */ +- /* Open fabric */ +- /* The getinfo struct returns a fabric attribute struct that can be used to */ +- /* instantiate the virtual or physical network. This opens a "fabric */ +- /* provider". We choose the first available fabric, but getinfo */ +- /* returns a list. */ +- /* ------------------------------------------------------------------------ */ +- MPIDI_OFI_CALL(fi_fabric(prov_use->fabric_attr, &MPIDI_Global.fabric, NULL), fabric); +- +- /* ------------------------------------------------------------------------ */ +- /* Create the access domain, which is the physical or virtual network or */ +- /* hardware port/collection of ports. Returns a domain object that can be */ +- /* used to create endpoints. */ +- /* ------------------------------------------------------------------------ */ +- MPIDI_OFI_CALL(fi_domain(MPIDI_Global.fabric, prov_use, &MPIDI_Global.domain, NULL), +- opendomain); +- +- /* ------------------------------------------------------------------------ */ +- /* Create the objects that will be bound to the endpoint. */ +- /* The objects include: */ +- /* * dynamic memory-spanning memory region */ +- /* * completion queues for events */ +- /* * counters for rma operations */ +- /* * address vector of other endpoint addresses */ +- /* ------------------------------------------------------------------------ */ +- +- /* ------------------------------------------------------------------------ */ +- /* Construct: Completion Queues */ +- /* ------------------------------------------------------------------------ */ +- memset(&cq_attr, 0, sizeof(cq_attr)); +- cq_attr.format = FI_CQ_FORMAT_TAGGED; +- MPIDI_OFI_CALL(fi_cq_open(MPIDI_Global.domain, /* In: Domain Object */ +- &cq_attr, /* In: Configuration object */ +- &MPIDI_Global.p2p_cq, /* Out: CQ Object */ +- NULL), opencq); /* In: Context for cq events */ +- +- /* ------------------------------------------------------------------------ */ +- /* Construct: Counters */ +- /* ------------------------------------------------------------------------ */ +- memset(&cntr_attr, 0, sizeof(cntr_attr)); +- cntr_attr.events = FI_CNTR_EVENTS_COMP; +- cntr_attr.wait_obj = FI_WAIT_UNSPEC; +- MPIDI_OFI_CALL(fi_cntr_open(MPIDI_Global.domain, /* In: Domain Object */ +- &cntr_attr, /* In: Configuration object */ +- &MPIDI_Global.rma_cmpl_cntr, /* Out: Counter Object */ +- NULL), openct); /* Context: counter events */ +- +- /* ------------------------------------------------------------------------ */ +- /* Construct: Address Vector */ +- /* ------------------------------------------------------------------------ */ +- +- memset(&av_attr, 0, sizeof(av_attr)); +- +- +- if (MPIDI_OFI_ENABLE_AV_TABLE) { +- av_attr.type = FI_AV_TABLE; +- } else { +- av_attr.type = FI_AV_MAP; +- } +- +- av_attr.rx_ctx_bits = MPIDI_OFI_MAX_ENDPOINTS_BITS; +- +- /* ------------------------------------------------------------------------ */ +- /* Attempt to open a shared address vector read-only. The open will fail if */ +- /* the address vector does not exist, otherwise the location of the mapped */ +- /* fi_addr_t array will be returned in the 'map_addr' field of the address */ +- /* vector attribute structure. */ +- /* ------------------------------------------------------------------------ */ +- char av_name[128]; +- MPL_snprintf(av_name, sizeof(av_name), "FI_NAMED_AV_%d\n", appnum); +- av_attr.name = av_name; +- av_attr.flags = FI_READ; +- av_attr.map_addr = 0; +- +- unsigned do_av_insert = 1; +- if (0 == fi_av_open(MPIDI_Global.domain, /* In: Domain Object */ +- &av_attr, /* In: Configuration object */ +- &MPIDI_Global.av, /* Out: AV Object */ +- NULL)) { /* Context: AV events */ +- do_av_insert = 0; +- +- /* TODO - the copy from the pre-existing av map into the 'MPIDI_OFI_AV' */ +- /* is wasteful and should be changed so that the 'MPIDI_OFI_AV' object */ +- /* directly references the mapped fi_addr_t array instead */ +- mapped_table = (fi_addr_t *) av_attr.map_addr; +- for (i = 0; i < size; i++) { +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).dest = mapped_table[i]; +-#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; +-#else +-#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; +-#endif +-#endif +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " grank mapped to: rank=%d, av=%p, dest=%" PRIu64, +- i, (void *) &MPIDIU_get_av(0, i), mapped_table[i])); +- } +- mapped_table = NULL; +- } else { +- av_attr.name = NULL; +- av_attr.flags = 0; +- MPIDI_OFI_CALL(fi_av_open(MPIDI_Global.domain, /* In: Domain Object */ +- &av_attr, /* In: Configuration object */ +- &MPIDI_Global.av, /* Out: AV Object */ +- NULL), avopen); /* Context: AV events */ +- } +- +- /* ------------------------------------------------------------------------ */ +- /* Construct: Shared TX Context for RMA */ +- /* ------------------------------------------------------------------------ */ +- if (MPIDI_OFI_ENABLE_SHARED_CONTEXTS) { +- int ret; +- struct fi_tx_attr tx_attr; +- memset(&tx_attr, 0, sizeof(tx_attr)); +- /* A shared transmit context’s attributes must be a union of all associated +- * endpoints' transmit capabilities. */ +- tx_attr.caps = FI_RMA | FI_WRITE | FI_READ | FI_ATOMIC; +- tx_attr.msg_order = FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_WAR | FI_ORDER_WAW; +- tx_attr.op_flags = FI_DELIVERY_COMPLETE | FI_COMPLETION; +- MPIDI_OFI_CALL_RETURN(fi_stx_context(MPIDI_Global.domain, +- &tx_attr, +- &MPIDI_Global.rma_stx_ctx, NULL /* context */), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to create shared TX context for RMA, " +- "falling back to global EP/counter scheme"); +- MPIDI_Global.rma_stx_ctx = NULL; +- } +- } +- +- /* ------------------------------------------------------------------------ */ +- /* Create a transport level communication endpoint. To use the endpoint, */ +- /* it must be bound to completion counters or event queues and enabled, */ +- /* and the resources consumed by it, such as address vectors, counters, */ +- /* completion queues, etc. */ +- /* ------------------------------------------------------------------------ */ +- +- MPIDI_Global.max_ch4_vnis = 1; +- if (MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS) { +- int max_by_prov = MPL_MIN(prov_use->domain_attr->tx_ctx_cnt, +- prov_use->domain_attr->rx_ctx_cnt); +- if (MPIR_CVAR_CH4_OFI_MAX_VNIS > 0) +- MPIDI_Global.max_ch4_vnis = MPL_MIN(MPIR_CVAR_CH4_OFI_MAX_VNIS, max_by_prov); +- if (MPIDI_Global.max_ch4_vnis < 1) { +- MPIR_ERR_SETFATALANDJUMP4(mpi_errno, +- MPI_ERR_OTHER, +- "**ofid_ep", +- "**ofid_ep %s %d %s %s", +- __SHORT_FILE__, __LINE__, FCNAME, +- "Not enough scalable endpoints"); +- } +- /* Specify the number of TX/RX contexts we want */ +- prov_use->ep_attr->tx_ctx_cnt = MPIDI_Global.max_ch4_vnis; +- prov_use->ep_attr->rx_ctx_cnt = MPIDI_Global.max_ch4_vnis; +- } +- +- for (i = 0; i < MPIDI_Global.max_ch4_vnis; i++) { +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_create_endpoint(prov_use, +- MPIDI_Global.domain, +- MPIDI_Global.p2p_cq, +- MPIDI_Global.rma_cmpl_cntr, +- MPIDI_Global.av, &MPIDI_Global.ep, i)); +- } +- +- *n_vnis_provided = MPIDI_Global.max_ch4_vnis; +- +- if (do_av_insert) { +- /* ---------------------------------- */ +- /* Get our endpoint name and publish */ +- /* the socket to the KVS */ +- /* ---------------------------------- */ +- MPIDI_Global.addrnamelen = FI_NAME_MAX; +- MPIDI_OFI_CALL(fi_getname((fid_t) MPIDI_Global.ep, MPIDI_Global.addrname, +- &MPIDI_Global.addrnamelen), getname); +- MPIR_Assert(MPIDI_Global.addrnamelen <= FI_NAME_MAX); +- +- mpi_errno = MPIDU_bc_table_create(rank, size, MPIDI_CH4_Global.node_map[0], +- &MPIDI_Global.addrname, MPIDI_Global.addrnamelen, TRUE, +- MPIR_CVAR_CH4_ROOTS_ONLY_PMI, &table, NULL); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* -------------------------------- */ +- /* Table is constructed. Map it */ +- /* -------------------------------- */ +- if (MPIR_CVAR_CH4_ROOTS_ONLY_PMI) { +- int *node_roots, num_nodes; +- +- MPIR_NODEMAP_get_node_roots(MPIDI_CH4_Global.node_map[0], size, &node_roots, +- &num_nodes); +- mapped_table = (fi_addr_t *) MPL_malloc(num_nodes * sizeof(fi_addr_t), MPL_MEM_ADDRESS); +- MPIDI_OFI_CALL(fi_av_insert +- (MPIDI_Global.av, table, num_nodes, mapped_table, 0ULL, NULL), avmap); +- +- for (i = 0; i < num_nodes; i++) { +- MPIDI_OFI_AV(&MPIDIU_get_av(0, node_roots[i])).dest = mapped_table[i]; +-#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS +- MPIDI_OFI_AV(&MPIDIU_get_av(0, node_roots[i])).ep_idx = 0; +-#else +-#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS +- MPIDI_OFI_AV(&MPIDIU_get_av(0, node_roots[i])).ep_idx = 0; +-#endif +-#endif +- } +- MPL_free(mapped_table); +- MPL_free(node_roots); +- } else { +- mapped_table = (fi_addr_t *) MPL_malloc(size * sizeof(fi_addr_t), MPL_MEM_ADDRESS); +- MPIDI_OFI_CALL(fi_av_insert(MPIDI_Global.av, table, size, mapped_table, 0ULL, NULL), +- avmap); +- +- for (i = 0; i < size; i++) { +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).dest = mapped_table[i]; +-#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; +-#else +-#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS +- MPIDI_OFI_AV(&MPIDIU_get_av(0, i)).ep_idx = 0; +-#endif +-#endif +- } +- MPL_free(mapped_table); +- MPIDU_bc_table_destroy(table); +- } +- } +- +- /* -------------------------------- */ +- /* Create the id to object maps */ +- /* -------------------------------- */ +- MPIDI_CH4U_map_create(&MPIDI_Global.win_map, MPL_MEM_RMA); +- +- /* ---------------------------------- */ +- /* Initialize Active Message */ +- /* ---------------------------------- */ +- mpi_errno = MPIDIG_init(comm_world, comm_self, *n_vnis_provided); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIDI_OFI_ENABLE_AM) { +- /* Maximum possible message size for short message send (=eager send) +- * See MPIDI_OFI_do_am_isend for short/long switching logic */ +- MPIR_Assert(MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE <= MPIDI_Global.max_send); +- MPIDI_Global.am_buf_pool = +- MPIDI_CH4U_create_buf_pool(MPIDI_OFI_BUF_POOL_NUM, MPIDI_OFI_BUF_POOL_SIZE); +- +- MPIDI_Global.cq_buffered_dynamic_head = MPIDI_Global.cq_buffered_dynamic_tail = NULL; +- MPIDI_Global.cq_buffered_static_head = MPIDI_Global.cq_buffered_static_tail = 0; +- optlen = MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE; +- +- MPIDI_OFI_CALL(fi_setopt(&(MPIDI_Global.ctx[0].rx->fid), +- FI_OPT_ENDPOINT, +- FI_OPT_MIN_MULTI_RECV, &optlen, sizeof(optlen)), setopt); +- +- for (i = 0; i < MPIDI_OFI_NUM_AM_BUFFERS; i++) { +- MPIDI_Global.am_bufs[i] = MPL_malloc(MPIDI_OFI_AM_BUFF_SZ, MPL_MEM_BUFFER); +- MPIDI_Global.am_reqs[i].event_id = MPIDI_OFI_EVENT_AM_RECV; +- MPIDI_Global.am_reqs[i].index = i; +- MPIR_Assert(MPIDI_Global.am_bufs[i]); +- MPIDI_OFI_ASSERT_IOVEC_ALIGN(&MPIDI_Global.am_iov[i]); +- MPIDI_Global.am_iov[i].iov_base = MPIDI_Global.am_bufs[i]; +- MPIDI_Global.am_iov[i].iov_len = MPIDI_OFI_AM_BUFF_SZ; +- MPIDI_Global.am_msg[i].msg_iov = &MPIDI_Global.am_iov[i]; +- MPIDI_Global.am_msg[i].desc = NULL; +- MPIDI_Global.am_msg[i].addr = FI_ADDR_UNSPEC; +- MPIDI_Global.am_msg[i].context = &MPIDI_Global.am_reqs[i].context; +- MPIDI_Global.am_msg[i].iov_count = 1; +- MPIDI_OFI_CALL_RETRY(fi_recvmsg(MPIDI_Global.ctx[0].rx, +- &MPIDI_Global.am_msg[i], +- FI_MULTI_RECV | FI_COMPLETION), prepost, +- MPIDI_OFI_CALL_LOCK, FALSE); +- } +- +- /* Grow the header handlers down */ +- MPIDIG_global.target_msg_cbs[MPIDI_OFI_INTERNAL_HANDLER_CONTROL] = +- MPIDI_OFI_control_handler; +- MPIDIG_global.origin_cbs[MPIDI_OFI_INTERNAL_HANDLER_CONTROL] = NULL; +- } +- OPA_store_int(&MPIDI_Global.am_inflight_inject_emus, 0); +- OPA_store_int(&MPIDI_Global.am_inflight_rma_send_mrs, 0); +- +-#ifndef HAVE_DEBUGGER_SUPPORT +- MPIDI_Global.lw_send_req = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- if (MPIDI_Global.lw_send_req == NULL) { +- MPIR_ERR_SETFATALANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); +- } +- MPIR_cc_set(&MPIDI_Global.lw_send_req->cc, 0); +-#endif +- +- /* -------------------------------- */ +- /* Initialize Dynamic Tasking */ +- /* -------------------------------- */ +-#if !defined(USE_PMIX_API) && !defined(USE_PMI2_API) +- MPIDI_OFI_conn_manager_init(); +- if (spawned) { +- char parent_port[MPIDI_MAX_KVS_VALUE_LEN]; +- MPIDI_OFI_PMI_CALL_POP(PMI_KVS_Get(MPIDI_Global.kvsname, +- MPIDI_PARENT_PORT_KVSKEY, +- parent_port, MPIDI_MAX_KVS_VALUE_LEN), pmi); +- MPIDI_OFI_MPI_CALL_POP(MPID_Comm_connect +- (parent_port, NULL, 0, comm_world, &MPIR_Process.comm_parent)); +- MPIR_Assert(MPIR_Process.comm_parent != NULL); +- MPL_strncpy(MPIR_Process.comm_parent->name, "MPI_COMM_PARENT", MPI_MAX_OBJECT_NAME); +- } +-#endif +- +- mpi_errno = MPIR_Comm_register_hint("eagain", MPIDI_OFI_set_eagain, NULL); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- +- /* -------------------------------- */ +- /* Free temporary resources */ +- /* -------------------------------- */ +- if (provname) { +- MPL_free(provname); +- hints->fabric_attr->prov_name = NULL; +- } +- +- if (prov) +- fi_freeinfo(prov); +- +- fi_freeinfo(hints); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-static inline int MPIDI_NM_mpi_finalize_hook(void) +-{ +- int thr_err = 0, mpi_errno = MPI_SUCCESS; +- int i = 0; +- int barrier[2] = { 0 }; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_Comm *comm; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_FINALIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_FINALIZE); +- +- /* clean dynamic process connections */ +- MPIDI_OFI_conn_manager_destroy(); +- +- /* Progress until we drain all inflight RMA send long buffers */ +- while (OPA_load_int(&MPIDI_Global.am_inflight_rma_send_mrs) > 0) +- MPIDI_OFI_PROGRESS(); +- +- /* Barrier over allreduce, but force non-immediate send */ +- MPIDI_Global.max_buffered_send = 0; +- MPIDI_OFI_MPI_CALL_POP(MPIR_Allreduce(&barrier[0], &barrier[1], 1, MPI_INT, +- MPI_SUM, MPIR_Process.comm_world, &errflag)); +- +- /* Progress until we drain all inflight injection emulation requests */ +- while (OPA_load_int(&MPIDI_Global.am_inflight_inject_emus) > 0) +- MPIDI_OFI_PROGRESS(); +- MPIR_Assert(OPA_load_int(&MPIDI_Global.am_inflight_inject_emus) == 0); +- +- if (MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS) { +- for (i = 0; i < MPIDI_Global.max_ch4_vnis; i++) { +- MPIDI_OFI_CALL(fi_close((fid_t) MPIDI_Global.ctx[i].tx), epclose); +- MPIDI_OFI_CALL(fi_close((fid_t) MPIDI_Global.ctx[i].rx), epclose); +- MPIDI_OFI_CALL(fi_close((fid_t) MPIDI_Global.ctx[i].cq), cqclose); +- } +- } +- +- /* Close RMA scalable EP. */ +- if (MPIDI_Global.rma_sep) { +- /* All transmit contexts on RMA must be closed. */ +- MPIR_Assert(utarray_len(MPIDI_Global.rma_sep_idx_array) == MPIDI_Global.max_rma_sep_tx_cnt); +- utarray_free(MPIDI_Global.rma_sep_idx_array); +- MPIDI_OFI_CALL(fi_close(&MPIDI_Global.rma_sep->fid), epclose); +- } +- if (MPIDI_OFI_ENABLE_SHARED_CONTEXTS && MPIDI_Global.rma_stx_ctx != NULL) +- MPIDI_OFI_CALL(fi_close(&MPIDI_Global.rma_stx_ctx->fid), stx_ctx_close); +- MPIDI_OFI_CALL(fi_close(&MPIDI_Global.ep->fid), epclose); +- MPIDI_OFI_CALL(fi_close(&MPIDI_Global.av->fid), avclose); +- MPIDI_OFI_CALL(fi_close(&MPIDI_Global.p2p_cq->fid), cqclose); +- MPIDI_OFI_CALL(fi_close(&MPIDI_Global.rma_cmpl_cntr->fid), cntrclose); +- MPIDI_OFI_CALL(fi_close(&MPIDI_Global.domain->fid), domainclose); +- MPIDI_OFI_CALL(fi_close(&MPIDI_Global.fabric->fid), fabricclose); +- +- fi_freeinfo(MPIDI_Global.prov_use); +- +- /* --------------------------------------- */ +- /* Free comm world addr table */ +- /* --------------------------------------- */ +- comm = MPIR_Process.comm_world; +- MPIR_Comm_release_always(comm); +- +- comm = MPIR_Process.comm_self; +- MPIR_Comm_release_always(comm); +- +- MPIDIG_finalize(); +- +- MPIDI_CH4U_map_destroy(MPIDI_Global.win_map); +- +- if (MPIDI_OFI_ENABLE_AM) { +- for (i = 0; i < MPIDI_OFI_NUM_AM_BUFFERS; i++) +- MPL_free(MPIDI_Global.am_bufs[i]); +- +- MPIDI_CH4R_destroy_buf_pool(MPIDI_Global.am_buf_pool); +- +- MPIR_Assert(MPIDI_Global.cq_buffered_static_head == MPIDI_Global.cq_buffered_static_tail); +- MPIR_Assert(NULL == MPIDI_Global.cq_buffered_dynamic_head); +- } +- +- MPID_Thread_mutex_destroy(&MPIDI_OFI_THREAD_UTIL_MUTEX, &thr_err); +- MPID_Thread_mutex_destroy(&MPIDI_OFI_THREAD_PROGRESS_MUTEX, &thr_err); +- MPID_Thread_mutex_destroy(&MPIDI_OFI_THREAD_FI_MUTEX, &thr_err); +- MPID_Thread_mutex_destroy(&MPIDI_OFI_THREAD_SPAWN_MUTEX, &thr_err); +- +-#ifndef HAVE_DEBUGGER_SUPPORT +- MPIR_Request_free(MPIDI_Global.lw_send_req); +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_NM_get_vni_attr(int vni) +-{ +- MPIR_Assert(0 <= vni && vni < 1); +- return MPIDI_VNI_TX | MPIDI_VNI_RX; +-} +- +-static inline void *MPIDI_NM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- +- void *ap; +- ap = MPL_malloc(size, MPL_MEM_USER); +- return ap; +-} +- +-static inline int MPIDI_NM_mpi_free_mem(void *ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPL_free(ptr); +- +- return mpi_errno; +-} +- +-static inline int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, +- int idx, int *lpid_ptr, bool is_remote) +-{ +- int avtid = 0, lpid = 0; +- if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) +- MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); +- else if (is_remote) +- MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); +- else { +- MPIDIU_comm_rank_to_pid_local(comm_ptr, idx, &lpid, &avtid); +- } +- +- *lpid_ptr = MPIDIU_LUPID_CREATE(avtid, lpid); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i, total_size = 0; +- char *temp_buf = NULL, *curr_ptr = NULL; +- +- MPIR_CHKPMEM_DECL(2); +- MPIR_CHKLMEM_DECL(1); +- +- MPIR_CHKPMEM_MALLOC((*local_upid_size), size_t *, comm->local_size * sizeof(size_t), +- mpi_errno, "local_upid_size", MPL_MEM_ADDRESS); +- MPIR_CHKLMEM_MALLOC(temp_buf, char *, comm->local_size * MPIDI_Global.addrnamelen, +- mpi_errno, "temp_buf", MPL_MEM_BUFFER); +- +- for (i = 0; i < comm->local_size; i++) { +- (*local_upid_size)[i] = MPIDI_Global.addrnamelen; +- MPIDI_OFI_CALL(fi_av_lookup(MPIDI_Global.av, MPIDI_OFI_COMM_TO_PHYS(comm, i), +- &temp_buf[i * MPIDI_Global.addrnamelen], +- &(*local_upid_size)[i]), avlookup); +- total_size += (*local_upid_size)[i]; +- } +- +- MPIR_CHKPMEM_MALLOC((*local_upids), char *, total_size * sizeof(char), +- mpi_errno, "local_upids", MPL_MEM_BUFFER); +- curr_ptr = (*local_upids); +- for (i = 0; i < comm->local_size; i++) { +- memcpy(curr_ptr, &temp_buf[i * MPIDI_Global.addrnamelen], (*local_upid_size)[i]); +- curr_ptr += (*local_upid_size)[i]; +- } +- +- MPIR_CHKPMEM_COMMIT(); +- fn_exit: +- MPIR_CHKLMEM_FREEALL(); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +-static inline int MPIDI_NM_upids_to_lupids(int size, +- size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- int i, mpi_errno = MPI_SUCCESS; +- int *new_avt_procs; +- char **new_upids; +- int n_new_procs = 0; +- int max_n_avts; +- char *curr_upid; +- new_avt_procs = (int *) MPL_malloc(size * sizeof(int), MPL_MEM_ADDRESS); +- new_upids = (char **) MPL_malloc(size * sizeof(char *), MPL_MEM_ADDRESS); +- max_n_avts = MPIDIU_get_max_n_avts(); +- +- curr_upid = remote_upids; +- for (i = 0; i < size; i++) { +- int j, k; +- char tbladdr[FI_NAME_MAX]; +- int found = 0; +- size_t sz = 0; +- +- for (k = 0; k < max_n_avts; k++) { +- if (MPIDIU_get_av_table(k) == NULL) { +- continue; +- } +- for (j = 0; j < MPIDIU_get_av_table(k)->size; j++) { +- sz = MPIDI_Global.addrnamelen; +- MPIDI_OFI_CALL(fi_av_lookup(MPIDI_Global.av, MPIDI_OFI_TO_PHYS(k, j), +- &tbladdr, &sz), avlookup); +- if (sz == remote_upid_size[i] +- && !memcmp(tbladdr, curr_upid, remote_upid_size[i])) { +- (*remote_lupids)[i] = MPIDIU_LUPID_CREATE(k, j); +- found = 1; +- break; +- } +- } +- } +- +- if (!found) { +- new_avt_procs[n_new_procs] = i; +- new_upids[n_new_procs] = curr_upid; +- n_new_procs++; +- } +- curr_upid += remote_upid_size[i]; +- } +- +- /* create new av_table, insert processes */ +- if (n_new_procs > 0) { +- int avtid; +- MPIDI_OFI_MPI_CALL_POP(MPIDIU_new_avt(n_new_procs, &avtid)); +- +- for (i = 0; i < n_new_procs; i++) { +- MPIDI_OFI_CALL(fi_av_insert(MPIDI_Global.av, new_upids[i], +- 1, +- (fi_addr_t *) & +- MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).dest, 0ULL, +- NULL), avmap); +-#if MPIDI_OFI_ENABLE_RUNTIME_CHECKS +- MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).ep_idx = 0; +-#else +-#if MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS +- MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).ep_idx = 0; +-#endif +-#endif +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\tupids to lupids avtid %d lpid %d mapped to %" PRIu64, +- avtid, i, MPIDI_OFI_AV(&MPIDIU_get_av(avtid, i)).dest)); +- /* highest bit is marked as 1 to indicate this is a new process */ +- (*remote_lupids)[new_avt_procs[i]] = MPIDIU_LUPID_CREATE(avtid, i); +- MPIDIU_LUPID_SET_NEW_AVT_MARK((*remote_lupids)[new_avt_procs[i]]); +- } +- } +- +- fn_exit: +- MPL_free(new_avt_procs); +- MPL_free(new_upids); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- return 0; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_create_endpoint +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_OFI_create_endpoint(struct fi_info *prov_use, +- struct fid_domain *domain, +- struct fid_cq *p2p_cq, +- struct fid_cntr *rma_ctr, +- struct fid_av *av, struct fid_ep **ep, int index) +-{ +- int mpi_errno = MPI_SUCCESS; +- struct fi_tx_attr tx_attr; +- struct fi_rx_attr rx_attr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_CREATE_ENDPOINT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_CREATE_ENDPOINT); +- +- if (MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS) { +- struct fi_cq_attr cq_attr; +- +- if (*ep == NULL) { +- /* First call to this function -- set up scalable endpoint */ +- MPIDI_OFI_CALL(fi_scalable_ep(domain, prov_use, ep, NULL), ep); +- MPIDI_OFI_CALL(fi_scalable_ep_bind(*ep, &av->fid, 0), bind); +- } +- +- memset(&cq_attr, 0, sizeof(cq_attr)); +- cq_attr.format = FI_CQ_FORMAT_TAGGED; +- MPIDI_OFI_CALL(fi_cq_open(MPIDI_Global.domain, +- &cq_attr, &MPIDI_Global.ctx[index].cq, NULL), opencq); +- +- tx_attr = *prov_use->tx_attr; +- tx_attr.op_flags = FI_COMPLETION; +- if (MPIDI_OFI_ENABLE_RMA || MPIDI_OFI_ENABLE_ATOMICS) +- tx_attr.op_flags |= FI_DELIVERY_COMPLETE; +- tx_attr.caps = 0; +- +- if (MPIDI_OFI_ENABLE_TAGGED) +- tx_attr.caps = FI_TAGGED; +- +- /* RMA */ +- if (MPIDI_OFI_ENABLE_RMA) +- tx_attr.caps |= FI_RMA; +- if (MPIDI_OFI_ENABLE_ATOMICS) +- tx_attr.caps |= FI_ATOMICS; +- /* MSG */ +- tx_attr.caps |= FI_MSG; +- +- MPIDI_OFI_CALL(fi_tx_context(*ep, index, &tx_attr, &MPIDI_Global.ctx[index].tx, NULL), ep); +- MPIDI_OFI_CALL(fi_ep_bind(MPIDI_Global.ctx[index].tx, +- &MPIDI_Global.ctx[index].cq->fid, +- FI_SEND | FI_SELECTIVE_COMPLETION), bind); +- MPIDI_OFI_CALL(fi_ep_bind(MPIDI_Global.ctx[index].tx, &rma_ctr->fid, FI_WRITE | FI_READ), +- bind); +- +- rx_attr = *prov_use->rx_attr; +- rx_attr.caps = 0; +- +- if (MPIDI_OFI_ENABLE_TAGGED) +- rx_attr.caps |= FI_TAGGED; +- if (MPIDI_OFI_ENABLE_DATA) +- rx_attr.caps |= FI_DIRECTED_RECV; +- +- if (MPIDI_OFI_ENABLE_RMA) +- rx_attr.caps |= FI_RMA | FI_REMOTE_READ | FI_REMOTE_WRITE; +- if (MPIDI_OFI_ENABLE_ATOMICS) +- rx_attr.caps |= FI_ATOMICS; +- rx_attr.caps |= FI_MSG; +- rx_attr.caps |= FI_MULTI_RECV; +- +- MPIDI_OFI_CALL(fi_rx_context(*ep, index, &rx_attr, &MPIDI_Global.ctx[index].rx, NULL), ep); +- MPIDI_OFI_CALL(fi_ep_bind +- (MPIDI_Global.ctx[index].rx, &MPIDI_Global.ctx[index].cq->fid, FI_RECV), +- bind); +- +- MPIDI_OFI_CALL(fi_enable(*ep), ep_enable); +- +- MPIDI_OFI_CALL(fi_enable(MPIDI_Global.ctx[index].tx), ep_enable); +- MPIDI_OFI_CALL(fi_enable(MPIDI_Global.ctx[index].rx), ep_enable); +- } else { +- /* ---------------------------------------------------------- */ +- /* Bind the CQs, counters, and AV to the endpoint object */ +- /* ---------------------------------------------------------- */ +- /* "Normal Endpoint */ +- MPIDI_OFI_CALL(fi_endpoint(domain, prov_use, ep, NULL), ep); +- MPIDI_OFI_CALL(fi_ep_bind(*ep, &p2p_cq->fid, FI_SEND | FI_RECV | FI_SELECTIVE_COMPLETION), +- bind); +- MPIDI_OFI_CALL(fi_ep_bind(*ep, &rma_ctr->fid, FI_READ | FI_WRITE), bind); +- MPIDI_OFI_CALL(fi_ep_bind(*ep, &av->fid, 0), bind); +- MPIDI_OFI_CALL(fi_enable(*ep), ep_enable); +- +- /* Copy the normal ep into the first entry for scalable endpoints to +- * allow compile macros to work */ +- MPIDI_Global.ctx[0].tx = MPIDI_Global.ctx[0].rx = *ep; +- MPIDI_Global.ctx[0].cq = p2p_cq; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_CREATE_ENDPOINT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline void MPIDI_OFI_dump_providers(struct fi_info *prov) +-{ +- fprintf(stdout, "Dumping Providers(first=%p):\n", prov); +- while (prov) { +- fprintf(stdout, "%s", fi_tostr(prov, FI_TYPE_INFO)); +- prov = prov->next; +- } +-} +- +-static inline int MPIDI_OFI_application_hints(int rank) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_DATA: %d", MPIDI_OFI_ENABLE_DATA)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_AV_TABLE: %d", MPIDI_OFI_ENABLE_AV_TABLE)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS: %d", +- MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_SHARED_CONTEXTS: %d", +- MPIDI_OFI_ENABLE_SHARED_CONTEXTS)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_MR_SCALABLE: %d", +- MPIDI_OFI_ENABLE_MR_SCALABLE)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_TAGGED: %d", MPIDI_OFI_ENABLE_TAGGED)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_AM: %d", MPIDI_OFI_ENABLE_AM)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_RMA: %d", MPIDI_OFI_ENABLE_RMA)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_FETCH_ATOMIC_IOVECS: %d", +- MPIDI_OFI_FETCH_ATOMIC_IOVECS)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_IOVEC_ALIGN: %d", MPIDI_OFI_IOVEC_ALIGN)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS: %d", +- MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS: %d", +- MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_ENABLE_PT2PT_NOPACK: %d", +- MPIDI_OFI_ENABLE_PT2PT_NOPACK)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_NUM_AM_BUFFERS: %d", MPIDI_OFI_NUM_AM_BUFFERS)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_CONTEXT_BITS: %d", MPIDI_OFI_CONTEXT_BITS)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_SOURCE_BITS: %d", MPIDI_OFI_SOURCE_BITS)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_OFI_TAG_BITS: %d", MPIDI_OFI_TAG_BITS)); +- +- if (MPIR_CVAR_CH4_OFI_CAPABILITY_SETS_DEBUG && rank == 0) { +- fprintf(stdout, "==== Capability set configuration ====\n"); +- fprintf(stdout, "MPIDI_OFI_ENABLE_DATA: %d\n", MPIDI_OFI_ENABLE_DATA); +- fprintf(stdout, "MPIDI_OFI_ENABLE_AV_TABLE: %d\n", MPIDI_OFI_ENABLE_AV_TABLE); +- fprintf(stdout, "MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS: %d\n", +- MPIDI_OFI_ENABLE_SCALABLE_ENDPOINTS); +- fprintf(stdout, "MPIDI_OFI_ENABLE_SHARED_CONTEXTS: %d\n", MPIDI_OFI_ENABLE_SHARED_CONTEXTS); +- fprintf(stdout, "MPIDI_OFI_ENABLE_MR_SCALABLE: %d\n", MPIDI_OFI_ENABLE_MR_SCALABLE); +- fprintf(stdout, "MPIDI_OFI_ENABLE_TAGGED: %d\n", MPIDI_OFI_ENABLE_TAGGED); +- fprintf(stdout, "MPIDI_OFI_ENABLE_AM: %d\n", MPIDI_OFI_ENABLE_AM); +- fprintf(stdout, "MPIDI_OFI_ENABLE_RMA: %d\n", MPIDI_OFI_ENABLE_RMA); +- fprintf(stdout, "MPIDI_OFI_ENABLE_ATOMICS: %d\n", MPIDI_OFI_ENABLE_ATOMICS); +- fprintf(stdout, "MPIDI_OFI_FETCH_ATOMIC_IOVECS: %d\n", MPIDI_OFI_FETCH_ATOMIC_IOVECS); +- fprintf(stdout, "MPIDI_OFI_IOVEC_ALIGN: %d\n", MPIDI_OFI_IOVEC_ALIGN); +- fprintf(stdout, "MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS: %d\n", +- MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS); +- fprintf(stdout, "MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS: %d\n", +- MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS); +- fprintf(stdout, "MPIDI_OFI_ENABLE_PT2PT_NOPACK: %d\n", MPIDI_OFI_ENABLE_PT2PT_NOPACK); +- fprintf(stdout, "MPIDI_OFI_NUM_AM_BUFFERS: %d\n", MPIDI_OFI_NUM_AM_BUFFERS); +- fprintf(stdout, "MPIDI_OFI_CONTEXT_BITS: %d\n", MPIDI_OFI_CONTEXT_BITS); +- fprintf(stdout, "MPIDI_OFI_SOURCE_BITS: %d\n", MPIDI_OFI_SOURCE_BITS); +- fprintf(stdout, "MPIDI_OFI_TAG_BITS: %d\n", MPIDI_OFI_TAG_BITS); +- fprintf(stdout, "======================================\n"); +- +- /* Discover the maximum number of ranks. If the source shift is not +- * defined, there are 32 bits in use due to the uint32_t used in +- * ofi_send.h */ +- fprintf(stdout, "MAXIMUM SUPPORTED RANKS: %ld\n", (long int) 1 << MPIDI_OFI_MAX_RANK_BITS); +- +- /* Discover the tag_ub */ +- fprintf(stdout, "MAXIMUM TAG: %lu\n", 1UL << MPIDI_OFI_TAG_BITS); +- fprintf(stdout, "======================================\n"); +- } +- +- /* Check that the desired number of ranks is possible and abort if not */ +- if (MPIDI_OFI_MAX_RANK_BITS < 32 && +- MPIR_Comm_size(MPIR_Process.comm_world) > (1 << MPIDI_OFI_MAX_RANK_BITS)) { +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch4|too_many_ranks"); +- } +- +- fn_fail: +- return mpi_errno; +-} +- +-static inline int MPIDI_OFI_init_global_settings(const char *prov_name) +-{ +- /* Seed the global settings values for cases where we are using runtime sets */ +- MPIDI_Global.settings.enable_data = +- MPIR_CVAR_CH4_OFI_ENABLE_DATA != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_DATA : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_data : +- MPIR_CVAR_CH4_OFI_ENABLE_DATA; +- MPIDI_Global.settings.enable_av_table = +- MPIR_CVAR_CH4_OFI_ENABLE_AV_TABLE != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_AV_TABLE : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_av_table : +- MPIR_CVAR_CH4_OFI_ENABLE_AV_TABLE; +- MPIDI_Global.settings.enable_scalable_endpoints = +- MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_scalable_endpoints : +- MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS; +- /* If the user doesn't care, then try to use them and fall back if necessary in the RMA init code */ +- MPIDI_Global.settings.enable_shared_contexts = +- MPIR_CVAR_CH4_OFI_ENABLE_SHARED_CONTEXTS != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_SHARED_CONTEXTS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_shared_contexts : +- MPIR_CVAR_CH4_OFI_ENABLE_SHARED_CONTEXTS; +- MPIDI_Global.settings.enable_mr_scalable = +- MPIR_CVAR_CH4_OFI_ENABLE_MR_SCALABLE != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_MR_SCALABLE : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_mr_scalable : +- MPIR_CVAR_CH4_OFI_ENABLE_MR_SCALABLE; +- MPIDI_Global.settings.enable_tagged = +- MPIR_CVAR_CH4_OFI_ENABLE_TAGGED != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_TAGGED : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_tagged : +- MPIR_CVAR_CH4_OFI_ENABLE_TAGGED; +- MPIDI_Global.settings.enable_am = +- MPIR_CVAR_CH4_OFI_ENABLE_AM != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_AM : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_am : +- MPIR_CVAR_CH4_OFI_ENABLE_AM; +- MPIDI_Global.settings.enable_rma = +- MPIR_CVAR_CH4_OFI_ENABLE_RMA != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_RMA : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_rma : +- MPIR_CVAR_CH4_OFI_ENABLE_RMA; +- /* try to enable atomics only when RMA is enabled */ +- MPIDI_Global.settings.enable_atomics = +- MPIDI_OFI_ENABLE_RMA ? (MPIR_CVAR_CH4_OFI_ENABLE_ATOMICS != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_ATOMICS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number +- (prov_name)].enable_atomics : +- MPIR_CVAR_CH4_OFI_ENABLE_ATOMICS) : 0; +- MPIDI_Global.settings.fetch_atomic_iovecs = +- MPIR_CVAR_CH4_OFI_FETCH_ATOMIC_IOVECS != +- -1 ? MPIR_CVAR_CH4_OFI_FETCH_ATOMIC_IOVECS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].fetch_atomic_iovecs : +- MPIR_CVAR_CH4_OFI_FETCH_ATOMIC_IOVECS; +- MPIDI_Global.settings.enable_data_auto_progress = +- MPIR_CVAR_CH4_OFI_ENABLE_DATA_AUTO_PROGRESS != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_DATA_AUTO_PROGRESS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_data_auto_progress : +- MPIR_CVAR_CH4_OFI_ENABLE_DATA_AUTO_PROGRESS; +- MPIDI_Global.settings.enable_control_auto_progress = +- MPIR_CVAR_CH4_OFI_ENABLE_CONTROL_AUTO_PROGRESS != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_CONTROL_AUTO_PROGRESS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_control_auto_progress : +- MPIR_CVAR_CH4_OFI_ENABLE_CONTROL_AUTO_PROGRESS; +- MPIDI_Global.settings.enable_pt2pt_nopack = +- MPIR_CVAR_CH4_OFI_ENABLE_PT2PT_NOPACK != +- -1 ? MPIR_CVAR_CH4_OFI_ENABLE_PT2PT_NOPACK : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].enable_pt2pt_nopack : +- MPIR_CVAR_CH4_OFI_ENABLE_PT2PT_NOPACK; +- MPIDI_Global.settings.context_bits = +- MPIR_CVAR_CH4_OFI_CONTEXT_ID_BITS != +- -1 ? MPIR_CVAR_CH4_OFI_CONTEXT_ID_BITS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].context_bits : +- MPIR_CVAR_CH4_OFI_CONTEXT_ID_BITS; +- MPIDI_Global.settings.source_bits = +- MPIR_CVAR_CH4_OFI_RANK_BITS != +- -1 ? MPIR_CVAR_CH4_OFI_RANK_BITS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].source_bits : +- MPIR_CVAR_CH4_OFI_RANK_BITS; +- MPIDI_Global.settings.tag_bits = +- MPIR_CVAR_CH4_OFI_TAG_BITS != +- -1 ? MPIR_CVAR_CH4_OFI_TAG_BITS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].tag_bits : +- MPIR_CVAR_CH4_OFI_TAG_BITS; +- MPIDI_Global.settings.major_version = +- MPIR_CVAR_CH4_OFI_MAJOR_VERSION != +- -1 ? MPIR_CVAR_CH4_OFI_MAJOR_VERSION : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].major_version : +- MPIR_CVAR_CH4_OFI_MAJOR_VERSION; +- MPIDI_Global.settings.minor_version = +- MPIR_CVAR_CH4_OFI_MINOR_VERSION != +- -1 ? MPIR_CVAR_CH4_OFI_MINOR_VERSION : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].minor_version : +- MPIR_CVAR_CH4_OFI_MINOR_VERSION; +- MPIDI_Global.settings.num_am_buffers = +- MPIR_CVAR_CH4_OFI_NUM_AM_BUFFERS != +- -1 ? MPIR_CVAR_CH4_OFI_NUM_AM_BUFFERS : prov_name ? +- MPIDI_OFI_caps_list[MPIDI_OFI_get_set_number(prov_name)].num_am_buffers : +- MPIDI_OFI_NUM_AM_BUFFERS_MINIMAL; +- if (MPIDI_Global.settings.num_am_buffers < 0) { +- MPIDI_Global.settings.num_am_buffers = 0; +- } +- if (MPIDI_Global.settings.num_am_buffers > MPIDI_OFI_MAX_NUM_AM_BUFFERS) { +- MPIDI_Global.settings.num_am_buffers = MPIDI_OFI_MAX_NUM_AM_BUFFERS; +- } +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_OFI_init_hints(struct fi_info *hints) +-{ +- int fi_version = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION); +- MPIR_Assert(hints != NULL); +- +- /* ------------------------------------------------------------------------ */ +- /* Hints to filter providers */ +- /* See man fi_getinfo for a list */ +- /* of all filters */ +- /* mode: Select capabilities that this netmod will support */ +- /* FI_CONTEXT(2): This netmod will pass in context into communication */ +- /* to optimize storage locality between MPI requests and OFI opaque */ +- /* data structures. */ +- /* FI_ASYNC_IOV: MPICH will provide storage for iovecs on */ +- /* communication calls, avoiding the OFI provider needing to require */ +- /* a copy. */ +- /* FI_LOCAL_MR unset: Note that we do not set FI_LOCAL_MR, */ +- /* which means this netmod does not support exchange of memory */ +- /* regions on communication calls. */ +- /* caps: Capabilities required from the provider. The bits specified */ +- /* with buffered receive, cancel, and remote complete implements */ +- /* MPI semantics. */ +- /* Tagged: used to support tag matching, 2-sided */ +- /* RMA|Atomics: supports MPI 1-sided */ +- /* MSG|MULTI_RECV: Supports synchronization protocol for 1-sided */ +- /* FI_DIRECTED_RECV: Support not putting the source in the match */ +- /* bits */ +- /* We expect to register all memory up front for use with this */ +- /* endpoint, so the netmod requires dynamic memory regions */ +- /* ------------------------------------------------------------------------ */ +- hints->mode = FI_CONTEXT | FI_ASYNC_IOV | FI_RX_CQ_DATA; /* We can handle contexts */ +- +- if (MPIDI_OFI_MAJOR_VERSION != -1 && MPIDI_OFI_MINOR_VERSION != -1) +- fi_version = FI_VERSION(MPIDI_OFI_MAJOR_VERSION, MPIDI_OFI_MINOR_VERSION); +- +- if (fi_version >= FI_VERSION(1, 5)) { +-#ifdef FI_CONTEXT2 +- hints->mode |= FI_CONTEXT2; +-#endif +- } +- hints->caps = 0ULL; +- +- /* RMA interface is used in AM and in native modes, +- * it should be supported by OFI provider in any case */ +- hints->caps |= FI_RMA; /* RMA(read/write) */ +- hints->caps |= FI_WRITE; /* We need to specify all of the extra +- * capabilities because we need to be +- * specific later when we create tx/rx +- * contexts. If we leave this off, the +- * context creation fails because it's not +- * a subset of this. */ +- hints->caps |= FI_READ; +- hints->caps |= FI_REMOTE_WRITE; +- hints->caps |= FI_REMOTE_READ; +- +- if (MPIDI_OFI_ENABLE_ATOMICS) { +- hints->caps |= FI_ATOMICS; /* Atomics capabilities */ +- } +- +- if (MPIDI_OFI_ENABLE_TAGGED) { +- hints->caps |= FI_TAGGED; /* Tag matching interface */ +- } +- +- if (MPIDI_OFI_ENABLE_AM) { +- hints->caps |= FI_MSG; /* Message Queue apis */ +- hints->caps |= FI_MULTI_RECV; /* Shared receive buffer */ +- } +- +- if (MPIDI_OFI_ENABLE_DATA) { +- hints->caps |= FI_DIRECTED_RECV; /* Match source address */ +- hints->domain_attr->cq_data_size = 4; /* Minimum size for completion data entry */ +- } +- +- /* ------------------------------------------------------------------------ */ +- /* Set object options to be filtered by getinfo */ +- /* domain_attr: domain attribute requirements */ +- /* op_flags: persistent flag settings for an endpoint */ +- /* endpoint type: see FI_EP_RDM */ +- /* Filters applied (for this netmod, we need providers that can support): */ +- /* THREAD_DOMAIN: Progress serialization is handled by netmod (locking) */ +- /* PROGRESS_AUTO: request providers that make progress without requiring */ +- /* the ADI to dedicate a thread to advance the state */ +- /* FI_DELIVERY_COMPLETE: RMA operations are visible in remote memory */ +- /* FI_COMPLETION: Selective completions of RMA ops */ +- /* FI_EP_RDM: Reliable datagram */ +- /* ------------------------------------------------------------------------ */ +- hints->addr_format = FI_FORMAT_UNSPEC; +- hints->domain_attr->threading = FI_THREAD_DOMAIN; +- if (MPIDI_OFI_ENABLE_DATA_AUTO_PROGRESS) { +- hints->domain_attr->data_progress = FI_PROGRESS_AUTO; +- } else { +- hints->domain_attr->data_progress = FI_PROGRESS_MANUAL; +- } +- if (MPIDI_OFI_ENABLE_CONTROL_AUTO_PROGRESS) { +- hints->domain_attr->control_progress = FI_PROGRESS_AUTO; +- } else { +- hints->domain_attr->control_progress = FI_PROGRESS_MANUAL; +- } +- hints->domain_attr->resource_mgmt = FI_RM_ENABLED; +- hints->domain_attr->av_type = MPIDI_OFI_ENABLE_AV_TABLE ? FI_AV_TABLE : FI_AV_MAP; +- if (MPIDI_OFI_ENABLE_MR_SCALABLE) +- hints->domain_attr->mr_mode = FI_MR_SCALABLE; +- else +- hints->domain_attr->mr_mode = FI_MR_BASIC; +- if (FI_VERSION(MPIDI_OFI_MAJOR_VERSION, MPIDI_OFI_MINOR_VERSION) >= FI_VERSION(1, 5)) { +-#ifdef FI_RESTRICTED_COMP +- hints->domain_attr->mode = FI_RESTRICTED_COMP; +-#endif +- } +- hints->tx_attr->op_flags = FI_COMPLETION; +- hints->tx_attr->msg_order = FI_ORDER_SAS; +- /* direct RMA operations supported only with delivery complete mode, +- * else (AM mode) delivery complete is not required */ +- if (MPIDI_OFI_ENABLE_RMA || MPIDI_OFI_ENABLE_ATOMICS) { +- hints->tx_attr->op_flags |= FI_DELIVERY_COMPLETE; +- /* Apply most restricted msg order in hints for RMA ATOMICS. */ +- if (MPIDI_OFI_ENABLE_ATOMICS) +- hints->tx_attr->msg_order |= FI_ORDER_RAR | FI_ORDER_RAW | FI_ORDER_WAR | FI_ORDER_WAW; +- } +- hints->tx_attr->comp_order = FI_ORDER_NONE; +- hints->rx_attr->op_flags = FI_COMPLETION; +- hints->rx_attr->total_buffered_recv = 0; /* FI_RM_ENABLED ensures buffering of unexpected messages */ +- hints->ep_attr->type = FI_EP_RDM; +- hints->ep_attr->mem_tag_format = MPIDI_OFI_SOURCE_BITS ? +- /* PROTOCOL | CONTEXT | SOURCE | TAG */ +- MPIDI_OFI_PROTOCOL_MASK | 0 | MPIDI_OFI_SOURCE_MASK | 0 /* With source bits */ : +- MPIDI_OFI_PROTOCOL_MASK | 0 | 0 | MPIDI_OFI_TAG_MASK /* No source bits */ ; +- +- return MPI_SUCCESS; +-} +- +-#endif /* OFI_INIT_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ofi/ofi_iovec_util.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_iovec_util.h +@@ -27,7 +27,6 @@ + /* + * Notes: + * Segment processor transforms MPI datatype into OFI datatype as follows: +- * - MPIR_Segment is initialized for MPI datatype. + * - A single OFI call can only take number of iovecs up to origin/target/result_max_iovs, + * MPIDI_OFI_merge_segment/MPIDI_OFI_merge_segment2 generates iovs subject to this limit. + */ +@@ -117,78 +116,114 @@ do { \ + } while (0) + + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_segment_next(MPIDI_OFI_seg_state_t * state, +- DLOOP_VECTOR * out_vector, ++ MPL_IOV * out_vector, + MPIDI_OFI_segment_side_t side) + { +- DLOOP_VECTOR dloop; +- DLOOP_Offset last; +- MPIR_Segment *seg; ++ MPL_IOV typerep_vec; ++ MPI_Aint last; + size_t *cursor; + int num_contig = 1; ++ const void *buf; ++ size_t count; ++ MPI_Datatype type; + + switch (side) { + case MPIDI_OFI_SEGMENT_ORIGIN: + last = state->origin_end; +- seg = &state->origin_seg; + cursor = &state->origin_cursor; ++ buf = state->origin_buf; ++ count = state->origin_count; ++ type = state->origin_type; + break; + case MPIDI_OFI_SEGMENT_TARGET: + last = state->target_end; +- seg = &state->target_seg; + cursor = &state->target_cursor; ++ buf = (const void *) state->target_buf; ++ count = state->target_count; ++ type = state->target_type; + break; + case MPIDI_OFI_SEGMENT_RESULT: + last = state->result_end; +- seg = &state->result_seg; + cursor = &state->result_cursor; ++ buf = state->result_buf; ++ count = state->result_count; ++ type = state->result_type; + break; + default: + MPIR_Assert(0); + break; + } +- if (*cursor >= last) +- return 1; +- /* Pack datatype into iovec during runtime. Everytime only one vector is processed, +- * and we try to pack as much as possible using last byte of datatype. +- * If pack is complete, num_contig returns as 0. */ +- MPIR_Segment_pack_vector(seg, *cursor, &last, &dloop, &num_contig); +- MPIR_Assert(num_contig <= 1); ++ ++ if (*cursor < last) { ++ /* Pack datatype into iovec during runtime. Everytime only one ++ * vector is processed, and we try to pack as much as possible ++ * using last byte of datatype. If pack is complete, ++ * num_contig returns as 0. */ ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(buf, count, type, *cursor, &typerep_vec, 1, last - *cursor, ++ &num_contig, &actual_iov_bytes); ++ MPIR_Assert(num_contig <= 1); ++ last = *cursor + actual_iov_bytes; ++ } else { ++ typerep_vec.iov_base = NULL; ++ typerep_vec.iov_len = 0; ++ num_contig = 0; ++ } ++ + *cursor = last; +- *out_vector = dloop; ++ *out_vector = typerep_vec; + return num_contig == 0 ? 1 : 0; + } + ++/* _count: count of data elements of certain datatype ++ * _type: the datatype ++ * _bytes: total byte size ++ * Note: _bytes is calculated based on _count & _type and passed in here for reusing. */ + MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_init_seg_state(MPIDI_OFI_seg_state_t * seg_state, + const void *origin, + const MPI_Aint target, + size_t origin_count, + size_t target_count, ++ size_t origin_bytes, ++ size_t target_bytes, + size_t buf_limit, + MPI_Datatype origin_type, + MPI_Datatype target_type) + { +- /* `seg_state->buflimit` is `DLOOP_Count` == `MPI_Aint` (typically, long or other signed types) ++ /* `seg_state->buflimit` is `MPI_Aint` == `MPI_Aint` (typically, long or other signed types) + * and its maximum value is likely to be smaller than that of `buf_limit` of `size_t`. + * So round down to the maximum of MPI_Aint if necessary. + * For instance, as of libfabric 1.6.2, sockets provider has (SIZE_MAX-4K) as buf_limit. */ +- CH4_COMPILE_TIME_ASSERT(sizeof(seg_state->buf_limit) == sizeof(MPI_Aint)); ++ MPL_COMPILE_TIME_ASSERT(sizeof(seg_state->buf_limit) == sizeof(MPI_Aint)); + if (likely(buf_limit > MPIR_AINT_MAX)) + buf_limit = MPIR_AINT_MAX; + seg_state->buf_limit = buf_limit; + seg_state->buf_limit_left = buf_limit; + + seg_state->origin_cursor = 0; +- MPIDI_Datatype_check_size(origin_type, origin_count, seg_state->origin_end); +- MPIR_Segment_init(origin, origin_count, origin_type, &seg_state->origin_seg); ++ seg_state->origin_end = origin_bytes; ++ seg_state->origin_buf = origin; ++ seg_state->origin_count = origin_count; ++ seg_state->origin_type = origin_type; + + seg_state->target_cursor = 0; +- MPIDI_Datatype_check_size(target_type, target_count, seg_state->target_end); +- MPIR_Segment_init((const void *) target, target_count, target_type, &seg_state->target_seg); ++ seg_state->target_end = target_bytes; ++ seg_state->target_buf = target; ++ seg_state->target_count = target_count; ++ seg_state->target_type = target_type; + + MPIDI_OFI_INIT_SEG_STATE(target, TARGET); + MPIDI_OFI_INIT_SEG_STATE(origin, ORIGIN); + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_finalize_seg_state(MPIDI_OFI_seg_state_t seg_state) ++{ ++} ++ ++/* _count: count of data elements of certain datatype ++ * _type: the datatype ++ * _bytes: total byte size ++ * Note: _bytes is calculated based on _count & _type and passed in here for reusing. */ + MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_init_seg_state2(MPIDI_OFI_seg_state_t * seg_state, + const void *origin, + const void *result, +@@ -199,35 +234,47 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_init_seg_state2(MPIDI_OFI_seg_state_t * + size_t buf_limit, + MPI_Datatype origin_type, + MPI_Datatype result_type, +- MPI_Datatype target_type) ++ MPI_Datatype target_type, ++ size_t origin_bytes, ++ size_t result_bytes, size_t target_bytes) + { +- /* `seg_state->buflimit` is `DLOOP_Count` == `MPI_Aint` (typically, long or other signed types) ++ /* `seg_state->buflimit` is `MPI_Aint` == `MPI_Aint` (typically, long or other signed types) + * and its maximum value is likely to be smaller than that of `buf_limit` of `size_t`. + * So round down to the maximum of MPI_Aint if necessary. + * For instance, as of libfabric 1.6.2, sockets provider has (SIZE_MAX-4K) as buf_limit. */ +- CH4_COMPILE_TIME_ASSERT(sizeof(seg_state->buf_limit) == sizeof(MPI_Aint)); ++ MPL_COMPILE_TIME_ASSERT(sizeof(seg_state->buf_limit) == sizeof(MPI_Aint)); + if (likely(buf_limit > MPIR_AINT_MAX)) + buf_limit = MPIR_AINT_MAX; + seg_state->buf_limit = buf_limit; + seg_state->buf_limit_left = buf_limit; + + seg_state->origin_cursor = 0; +- MPIDI_Datatype_check_size(origin_type, origin_count, seg_state->origin_end); +- MPIR_Segment_init(origin, origin_count, origin_type, &seg_state->origin_seg); ++ seg_state->origin_end = origin_bytes; ++ seg_state->origin_buf = origin; ++ seg_state->origin_count = origin_count; ++ seg_state->origin_type = origin_type; + + seg_state->target_cursor = 0; +- MPIDI_Datatype_check_size(target_type, target_count, seg_state->target_end); +- MPIR_Segment_init((const void *) target, target_count, target_type, &seg_state->target_seg); ++ seg_state->target_end = target_bytes; ++ seg_state->target_buf = target; ++ seg_state->target_count = target_count; ++ seg_state->target_type = target_type; + + seg_state->result_cursor = 0; +- MPIDI_Datatype_check_size(result_type, result_count, seg_state->result_end); +- MPIR_Segment_init(result, result_count, result_type, &seg_state->result_seg); ++ seg_state->result_end = result_bytes; ++ seg_state->result_buf = result; ++ seg_state->result_count = result_count; ++ seg_state->result_type = result_type; + + MPIDI_OFI_INIT_SEG_STATE(target, TARGET); + MPIDI_OFI_INIT_SEG_STATE(origin, ORIGIN); + MPIDI_OFI_INIT_SEG_STATE(result, RESULT); + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_finalize_seg_state2(MPIDI_OFI_seg_state_t seg_state) ++{ ++} ++ + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_next_seg_state(MPIDI_OFI_seg_state_t * seg_state, + uintptr_t * origin_addr_next, + uintptr_t * target_addr_next, +@@ -337,8 +384,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_merge_segment(MPIDI_OFI_seg_state_t * seg + int origin_idx = 0, target_idx = 0; + size_t len = 0, last_len = 0; + +- CH4_COMPILE_TIME_ASSERT(offsetof(struct iovec, iov_base) == offsetof(struct fi_rma_iov, addr)); +- CH4_COMPILE_TIME_ASSERT(offsetof(struct iovec, iov_len) == offsetof(struct fi_rma_iov, len)); ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct iovec, iov_base) == offsetof(struct fi_rma_iov, addr)); ++ MPL_COMPILE_TIME_ASSERT(offsetof(struct iovec, iov_len) == offsetof(struct fi_rma_iov, len)); + + rc = MPIDI_OFI_next_seg_state(seg_state, &origin_last_addr, &target_last_addr, &last_len); + MPIR_Assert(rc != MPIDI_OFI_SEG_ERROR); +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/ofi_noinline.h +@@ -0,0 +1,117 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef OFI_NOINLINE_H_INCLUDED ++#define OFI_NOINLINE_H_INCLUDED ++ ++#include "ofi_impl.h" ++ ++/* ofi_comm.h */ ++int MPIDI_OFI_mpi_comm_create_hook(MPIR_Comm * comm); ++int MPIDI_OFI_mpi_comm_free_hook(MPIR_Comm * comm); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_comm_create_hook MPIDI_OFI_mpi_comm_create_hook ++#define MPIDI_NM_mpi_comm_free_hook MPIDI_OFI_mpi_comm_free_hook ++#endif ++ ++/* ofi_spawn.h */ ++int MPIDI_OFI_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm); ++int MPIDI_OFI_mpi_comm_disconnect(MPIR_Comm * comm_ptr); ++int MPIDI_OFI_mpi_open_port(MPIR_Info * info_ptr, char *port_name); ++int MPIDI_OFI_mpi_close_port(const char *port_name); ++int MPIDI_OFI_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_comm_connect MPIDI_OFI_mpi_comm_connect ++#define MPIDI_NM_mpi_comm_disconnect MPIDI_OFI_mpi_comm_disconnect ++#define MPIDI_NM_mpi_open_port MPIDI_OFI_mpi_open_port ++#define MPIDI_NM_mpi_close_port MPIDI_OFI_mpi_close_port ++#define MPIDI_NM_mpi_comm_accept MPIDI_OFI_mpi_comm_accept ++#endif ++ ++int MPIDI_OFI_mpi_op_free_hook(MPIR_Op * op_p); ++int MPIDI_OFI_mpi_op_commit_hook(MPIR_Op * op_p); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_op_free_hook MPIDI_OFI_mpi_op_free_hook ++#define MPIDI_NM_mpi_op_commit_hook MPIDI_OFI_mpi_op_commit_hook ++#endif ++ ++/* ofi_win.h */ ++int MPIDI_OFI_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); ++int MPIDI_OFI_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); ++int MPIDI_OFI_mpi_win_free(MPIR_Win ** win_ptr); ++int MPIDI_OFI_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); ++int MPIDI_OFI_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_OFI_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr); ++int MPIDI_OFI_mpi_win_detach(MPIR_Win * win, const void *base); ++int MPIDI_OFI_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win_ptr); ++int MPIDI_OFI_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win_ptr); ++int MPIDI_OFI_mpi_win_create_hook(MPIR_Win * win); ++int MPIDI_OFI_mpi_win_allocate_hook(MPIR_Win * win); ++int MPIDI_OFI_mpi_win_allocate_shared_hook(MPIR_Win * win); ++int MPIDI_OFI_mpi_win_create_dynamic_hook(MPIR_Win * win); ++int MPIDI_OFI_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_OFI_mpi_win_detach_hook(MPIR_Win * win, const void *base); ++int MPIDI_OFI_mpi_win_free_hook(MPIR_Win * win); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_win_set_info MPIDI_OFI_mpi_win_set_info ++#define MPIDI_NM_mpi_win_get_info MPIDI_OFI_mpi_win_get_info ++#define MPIDI_NM_mpi_win_free MPIDI_OFI_mpi_win_free ++#define MPIDI_NM_mpi_win_create MPIDI_OFI_mpi_win_create ++#define MPIDI_NM_mpi_win_attach MPIDI_OFI_mpi_win_attach ++#define MPIDI_NM_mpi_win_allocate_shared MPIDI_OFI_mpi_win_allocate_shared ++#define MPIDI_NM_mpi_win_detach MPIDI_OFI_mpi_win_detach ++#define MPIDI_NM_mpi_win_allocate MPIDI_OFI_mpi_win_allocate ++#define MPIDI_NM_mpi_win_create_dynamic MPIDI_OFI_mpi_win_create_dynamic ++#define MPIDI_NM_mpi_win_create_hook MPIDI_OFI_mpi_win_create_hook ++#define MPIDI_NM_mpi_win_allocate_hook MPIDI_OFI_mpi_win_allocate_hook ++#define MPIDI_NM_mpi_win_allocate_shared_hook MPIDI_OFI_mpi_win_allocate_shared_hook ++#define MPIDI_NM_mpi_win_create_dynamic_hook MPIDI_OFI_mpi_win_create_dynamic_hook ++#define MPIDI_NM_mpi_win_attach_hook MPIDI_OFI_mpi_win_attach_hook ++#define MPIDI_NM_mpi_win_detach_hook MPIDI_OFI_mpi_win_detach_hook ++#define MPIDI_NM_mpi_win_free_hook MPIDI_OFI_mpi_win_free_hook ++#endif ++ ++/* ofi_init.h */ ++int MPIDI_OFI_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, MPIR_Comm * comm_world, ++ MPIR_Comm * comm_self, int spawned, int *n_vcis_provided); ++int MPIDI_OFI_mpi_finalize_hook(void); ++int MPIDI_OFI_get_vci_attr(int vci); ++void *MPIDI_OFI_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDI_OFI_mpi_free_mem(void *ptr); ++int MPIDI_OFI_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids); ++int MPIDI_OFI_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids); ++int MPIDI_OFI_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_init_hook MPIDI_OFI_mpi_init_hook ++#define MPIDI_NM_mpi_finalize_hook MPIDI_OFI_mpi_finalize_hook ++#define MPIDI_NM_get_vci_attr MPIDI_OFI_get_vci_attr ++#define MPIDI_NM_mpi_alloc_mem MPIDI_OFI_mpi_alloc_mem ++#define MPIDI_NM_mpi_free_mem MPIDI_OFI_mpi_free_mem ++#define MPIDI_NM_get_local_upids MPIDI_OFI_get_local_upids ++#define MPIDI_NM_upids_to_lupids MPIDI_OFI_upids_to_lupids ++#define MPIDI_NM_create_intercomm_from_lpids MPIDI_OFI_create_intercomm_from_lpids ++#endif ++ ++int MPIDI_OFI_mpi_type_free_hook(MPIR_Datatype * datatype_p); ++int MPIDI_OFI_mpi_type_commit_hook(MPIR_Datatype * datatype_p); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_type_free_hook MPIDI_OFI_mpi_type_free_hook ++#define MPIDI_NM_mpi_type_commit_hook MPIDI_OFI_mpi_type_commit_hook ++#endif ++ ++#endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/ofi_op.c +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ofi_impl.h" ++#include "ofi_noinline.h" ++ ++int MPIDI_OFI_mpi_op_free_hook(MPIR_Op * op_p) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_OP_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_OP_FREE_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_OP_FREE_HOOK); ++ return 0; ++} ++ ++int MPIDI_OFI_mpi_op_commit_hook(MPIR_Op * op_p) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_OP_COMMIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_OP_COMMIT_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_OP_COMMIT_HOOK); ++ return 0; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ofi/ofi_op.h ++++ /dev/null +@@ -1,35 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef OFI_OP_H_INCLUDED +-#define OFI_OP_H_INCLUDED +- +-#include "ofi_impl.h" +- +-static inline int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); +- return 0; +-} +- +-static inline int MPIDI_NM_mpi_op_commit_hook(MPIR_Op * op_p) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); +- return 0; +-} +- +- +-#endif /* OFI_OP_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ofi/ofi_pre.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_pre.h +@@ -42,8 +42,6 @@ struct MPIR_Request; + typedef struct { + void *huge_send_counters; + void *huge_recv_counters; +- void *win_id_allocator; +- void *rma_id_allocator; + /* support for connection */ + int conn_id; + int eagain; +@@ -76,9 +74,22 @@ typedef struct MPIDI_OFI_am_header_t { + uint64_t am_type:MPIDI_OFI_AM_TYPE_BITS; + uint64_t am_hdr_sz:MPIDI_OFI_AM_HDR_SZ_BITS; + uint64_t data_sz:MPIDI_OFI_AM_DATA_SZ_BITS; ++ uint16_t seqno; /* Sequence number of this message. ++ * Number is unique to (fi_src_addr, fi_dest_addr) pair. */ ++ fi_addr_t fi_src_addr; /* OFI address of the sender */ + uint64_t payload[0]; + } MPIDI_OFI_am_header_t; + ++/* Represents early-arrived active messages. ++ * Queued to MPIDI_OFI_global.am_unordered_msgs */ ++typedef struct MPIDI_OFI_am_unordered_msg { ++ struct MPIDI_OFI_am_unordered_msg *next; ++ struct MPIDI_OFI_am_unordered_msg *prev; ++ MPIDI_OFI_am_header_t am_hdr; ++ /* This is used as a variable-length structure. ++ * Additional memory region may follow. */ ++} MPIDI_OFI_am_unordered_msg_t; ++ + typedef struct { + MPIDI_OFI_am_header_t hdr; + MPIDI_OFI_ack_msg_payload_t pyld; +@@ -102,7 +113,12 @@ typedef struct { + MPIDI_OFI_am_header_t msg_hdr; + uint8_t am_hdr_buf[MPIDI_OFI_MAX_AM_HDR_SIZE]; + /* FI_ASYNC_IOV requires an iov storage to be alive until a request completes */ ++#if MPIDI_OFI_IOVEC_ALIGN <= SIZEOF_VOID_P ++ struct iovec iov[3]; ++#else ++ /* need bigger alignment */ + struct iovec iov[3] MPL_ATTR_ALIGNED(MPIDI_OFI_IOVEC_ALIGN); ++#endif + } MPIDI_OFI_am_request_header_t; + + typedef struct { +@@ -113,7 +129,9 @@ typedef struct { + + + typedef struct { +- struct MPIR_Segment segment; ++ void *buf; ++ size_t count; ++ MPI_Datatype datatype; + char pack_buffer[0]; + } MPIDI_OFI_pack_t; + +@@ -128,9 +146,11 @@ typedef struct { + struct iovec *nopack; + } noncontig; + union { +-#if defined (MPL_HAVE_VAR_ATTRIBUTE_ALIGNED) +- struct iovec iov MPL_ATTR_ALIGNED(MPIDI_OFI_IOVEC_ALIGN); ++#if MPIDI_OFI_IOVEC_ALIGN <= SIZEOF_VOID_P ++ struct iovec iov; + #else ++ /* Enforce larger alignment. */ ++ /* icc complains alignment attribute without packed struct */ + char iov_store[sizeof(struct iovec) + MPIDI_OFI_IOVEC_ALIGN - 1]; + #endif + void *inject_buf; /* Internal buffer for inject emulation */ +--- a/src/mpid/ch4/netmod/ofi/ofi_probe.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_probe.h +@@ -13,10 +13,6 @@ + + #include "ofi_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_iprobe(int source, + int tag, + MPIR_Comm * comm, +@@ -62,10 +58,9 @@ static inline int MPIDI_OFI_do_iprobe(int source, + msg.context = (void *) &(MPIDI_OFI_REQUEST(rreq, context)); + msg.data = 0; + +- MPIDI_OFI_CALL_RETURN(fi_trecvmsg(MPIDI_Global.ctx[0].rx, &msg, +- peek_flags | FI_PEEK | FI_COMPLETION | (MPIDI_OFI_ENABLE_DATA +- ? FI_REMOTE_CQ_DATA : +- 0)), ofi_err); ++ MPIDI_OFI_CALL_RETURN(fi_trecvmsg(MPIDI_OFI_global.ctx[0].rx, &msg, ++ peek_flags | FI_PEEK | FI_COMPLETION | FI_REMOTE_CQ_DATA), ++ ofi_err); + if (ofi_err == -FI_ENOMSG) { + *flag = 0; + if (message) +@@ -108,10 +103,6 @@ static inline int MPIDI_OFI_do_iprobe(int source, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_improbe(int source, + int tag, + MPIR_Comm * comm, +@@ -123,11 +114,12 @@ static inline int MPIDI_NM_mpi_improbe(int source, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IMPROBE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IMPROBE); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { +- mpi_errno = +- MPIDI_CH4U_mpi_improbe(source, tag, comm, context_offset, flag, message, status); ++ mpi_errno = MPIDIG_mpi_improbe(source, tag, comm, context_offset, flag, message, status); + goto fn_exit; + } ++#endif + + /* Set flags for mprobe peek, when ready */ + mpi_errno = MPIDI_OFI_do_iprobe(source, tag, comm, context_offset, addr, +@@ -145,10 +137,6 @@ static inline int MPIDI_NM_mpi_improbe(int source, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iprobe(int source, + int tag, + MPIR_Comm * comm, +@@ -159,15 +147,16 @@ static inline int MPIDI_NM_mpi_iprobe(int source, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IPROBE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IPROBE); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { +- mpi_errno = MPIDI_CH4U_mpi_iprobe(source, tag, comm, context_offset, flag, status); +- goto fn_exit; ++ mpi_errno = MPIDIG_mpi_iprobe(source, tag, comm, context_offset, flag, status); ++ } else ++#endif ++ { ++ mpi_errno = ++ MPIDI_OFI_do_iprobe(source, tag, comm, context_offset, addr, flag, status, NULL, 0ULL); + } + +- mpi_errno = +- MPIDI_OFI_do_iprobe(source, tag, comm, context_offset, addr, flag, status, NULL, 0ULL); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IPROBE); + return mpi_errno; + } +--- a/src/mpid/ch4/netmod/ofi/ofi_proc.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_proc.h +@@ -20,7 +20,7 @@ static inline int MPIDI_NM_rank_is_local(int rank, MPIR_Comm * comm) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); + +- ret = MPIDI_CH4U_rank_is_local(rank, comm); ++ ret = MPIDIU_rank_is_local(rank, comm); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); + return ret; +@@ -33,10 +33,26 @@ static inline int MPIDI_NM_av_is_local(MPIDI_av_entry_t * av) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); + +- ret = MPIDI_CH4U_av_is_local(av); ++ ret = MPIDIU_av_is_local(av); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); + return ret; + } + ++static inline int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, ++ int idx, int *lpid_ptr, bool is_remote) ++{ ++ int avtid = 0, lpid = 0; ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ++ MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); ++ else if (is_remote) ++ MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); ++ else { ++ MPIDIU_comm_rank_to_pid_local(comm_ptr, idx, &lpid, &avtid); ++ } ++ ++ *lpid_ptr = MPIDIU_LUPID_CREATE(avtid, lpid); ++ return MPI_SUCCESS; ++} ++ + #endif /* OFI_PROC_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ofi/ofi_progress.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_progress.h +@@ -15,11 +15,7 @@ + #include "ofi_events.h" + #include "ofi_am_events.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(int vni, int blocking) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(int vci, int blocking) + { + int mpi_errno; + struct fi_cq_tagged_entry wc[MPIDI_OFI_NUM_CQ_ENTRIES]; +@@ -27,23 +23,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(int vni, int blocking) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_PROGRESS); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_PROGRESS); + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); +- + if (unlikely(MPIDI_OFI_get_buffered(wc, 1))) +- mpi_errno = MPIDI_OFI_handle_cq_entries(wc, 1, 1); ++ mpi_errno = MPIDI_OFI_handle_cq_entries(wc, 1); + else if (likely(1)) { +- ret = fi_cq_read(MPIDI_Global.ctx[vni].cq, (void *) wc, MPIDI_OFI_NUM_CQ_ENTRIES); ++ ret = fi_cq_read(MPIDI_OFI_global.ctx[vci].cq, (void *) wc, MPIDI_OFI_NUM_CQ_ENTRIES); + + if (likely(ret > 0)) +- mpi_errno = MPIDI_OFI_handle_cq_entries(wc, ret, 0); ++ mpi_errno = MPIDI_OFI_handle_cq_entries(wc, ret); + else if (ret == -FI_EAGAIN) + mpi_errno = MPI_SUCCESS; + else +- mpi_errno = MPIDI_OFI_handle_cq_error(vni, ret); ++ mpi_errno = MPIDI_OFI_handle_cq_error(vci, ret); + } + +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); +- + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_PROGRESS); + + return mpi_errno; +--- a/src/mpid/ch4/netmod/ofi/ofi_recv.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_recv.h +@@ -26,21 +26,18 @@ + due to limitations with iovec. Needs to fall back to the unpack path. + Other: An error occurred as indicated in the code. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_recv_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_iov(void *buf, MPI_Aint count, ++MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_iov(void *buf, MPI_Aint count, size_t data_sz, /* data_sz passed in here for reusing */ + int rank, uint64_t match_bits, uint64_t mask_bits, + MPIR_Comm * comm, MPIR_Context_id_t context_id, +- MPIR_Request * rreq, MPIR_Datatype * dt_ptr, +- uint64_t flags) ++ MPIDI_av_entry_t * addr, MPIR_Request * rreq, ++ MPIR_Datatype * dt_ptr, uint64_t flags) + { + int mpi_errno = MPI_SUCCESS; + struct iovec *originv = NULL, *originv_huge = NULL; + size_t max_pipe = INT64_MAX; +- size_t omax = MPIDI_Global.rx_iov_limit; +- size_t countp = MPIDI_OFI_count_iov(count, MPIDI_OFI_REQUEST(rreq, datatype), max_pipe); ++ size_t omax = MPIDI_OFI_global.rx_iov_limit; ++ size_t countp = ++ MPIDI_OFI_count_iov(count, MPIDI_OFI_REQUEST(rreq, datatype), data_sz, max_pipe); + size_t o_size = sizeof(struct iovec); + unsigned map_size; + int num_contig, size, j = 0, k = 0, huge = 0, length = 0; +@@ -48,7 +45,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_iov(void *buf, MPI_Aint count, + size_t countp_huge = 0; + size_t oout = 0; + size_t cur_o = 0; +- MPIR_Segment seg; + struct fi_msg_tagged msg; + size_t iov_align = MPL_MAX(MPIDI_OFI_IOVEC_ALIGN, sizeof(void *)); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_RECV_IOV); +@@ -61,21 +57,23 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_iov(void *buf, MPI_Aint count, + } + + if (!flags) { +- flags = FI_COMPLETION | (MPIDI_OFI_ENABLE_DATA ? FI_REMOTE_CQ_DATA : 0); ++ flags = FI_COMPLETION | FI_REMOTE_CQ_DATA; + } + + map_size = dt_ptr->max_contig_blocks * count + 1; + num_contig = map_size; /* map_size is the maximum number of iovecs that can be generated */ +- DLOOP_Offset last = dt_ptr->size * count; + + size = o_size * num_contig + sizeof(*(MPIDI_OFI_REQUEST(rreq, noncontig.nopack))); + + MPIDI_OFI_REQUEST(rreq, noncontig.nopack) = MPL_aligned_alloc(iov_align, size, MPL_MEM_BUFFER); + memset(MPIDI_OFI_REQUEST(rreq, noncontig.nopack), 0, size); + +- MPIR_Segment_init(buf, count, MPIDI_OFI_REQUEST(rreq, datatype), &seg); +- MPIR_Segment_pack_vector(&seg, 0, &last, MPIDI_OFI_REQUEST(rreq, noncontig.nopack), +- &num_contig); ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(buf, count, MPIDI_OFI_REQUEST(rreq, datatype), 0, ++ MPIDI_OFI_REQUEST(rreq, noncontig.nopack), num_contig, dt_ptr->size * count, ++ &actual_iov_len, &actual_iov_bytes); ++ num_contig = actual_iov_len; + + originv = &(MPIDI_OFI_REQUEST(rreq, noncontig.nopack[cur_o])); + oout = num_contig; /* num_contig is the actual number of iovecs returned by the Segment_pack_vector function */ +@@ -88,10 +86,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_iov(void *buf, MPI_Aint count, + /* check if the length of any iovec in the current iovec array exceeds the huge message threshold + * and calculate the total number of iovecs */ + for (j = 0; j < num_contig; j++) { +- if (originv[j].iov_len > MPIDI_Global.max_send) { ++ if (originv[j].iov_len > MPIDI_OFI_global.max_msg_size) { + huge = 1; +- countp_huge += originv[j].iov_len / MPIDI_Global.max_send; +- if (originv[j].iov_len % MPIDI_Global.max_send) { ++ countp_huge += originv[j].iov_len / MPIDI_OFI_global.max_msg_size; ++ if (originv[j].iov_len % MPIDI_OFI_global.max_msg_size) { + countp_huge++; + } + } else { +@@ -110,11 +108,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_iov(void *buf, MPI_Aint count, + MPIR_Assert(originv_huge != NULL); + for (j = 0; j < num_contig; j++) { + l = 0; +- if (originv[j].iov_len > MPIDI_Global.max_send) { ++ if (originv[j].iov_len > MPIDI_OFI_global.max_msg_size) { + while (l < originv[j].iov_len) { + length = originv[j].iov_len - l; +- if (length > MPIDI_Global.max_send) +- length = MPIDI_Global.max_send; ++ if (length > MPIDI_OFI_global.max_msg_size) ++ length = MPIDI_OFI_global.max_msg_size; + originv_huge[k].iov_base = (char *) originv[j].iov_base + l; + originv_huge[k].iov_len = length; + k++; +@@ -155,9 +153,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_iov(void *buf, MPI_Aint count, + msg.ignore = mask_bits; + msg.context = (void *) &(MPIDI_OFI_REQUEST(rreq, context)); + msg.data = 0; +- msg.addr = (MPI_ANY_SOURCE == rank) ? FI_ADDR_UNSPEC : MPIDI_OFI_comm_to_phys(comm, rank); ++ msg.addr = (MPI_ANY_SOURCE == rank) ? FI_ADDR_UNSPEC : MPIDI_OFI_av_to_phys(addr); + +- MPIDI_OFI_CALL_RETRY(fi_trecvmsg(MPIDI_Global.ctx[0].rx, &msg, flags), trecv, ++ MPIDI_OFI_CALL_RETRY(fi_trecvmsg(MPIDI_OFI_global.ctx[0].rx, &msg, flags), trecv, + MPIDI_OFI_CALL_LOCK, FALSE); + + fn_exit: +@@ -172,10 +170,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_recv_iov(void *buf, MPI_Aint count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_irecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -222,10 +216,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_irecv(void *buf, + recv_buf = (char *) buf + dt_true_lb; + + if (!dt_contig) { +- if (MPIDI_OFI_ENABLE_PT2PT_NOPACK && data_sz <= MPIDI_Global.max_send) { ++ if (MPIDI_OFI_ENABLE_PT2PT_NOPACK && data_sz <= MPIDI_OFI_global.max_msg_size) { + mpi_errno = +- MPIDI_OFI_recv_iov(buf, count, rank, match_bits, mask_bits, comm, context_id, rreq, +- dt_ptr, flags); ++ MPIDI_OFI_recv_iov(buf, count, data_sz, rank, match_bits, mask_bits, comm, ++ context_id, addr, rreq, dt_ptr, flags); + if (mpi_errno == MPI_SUCCESS) /* Receive posted using iov */ + goto fn_exit; + else if (mpi_errno != MPIDI_OFI_RECV_NEEDS_UNPACK) +@@ -239,12 +233,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_irecv(void *buf, + /* Unpack */ + MPIDI_OFI_REQUEST(rreq, event_id) = MPIDI_OFI_EVENT_RECV_PACK; + MPIDI_OFI_REQUEST(rreq, noncontig.pack) = +- (MPIDI_OFI_pack_t *) MPL_malloc(data_sz + sizeof(MPIR_Segment), MPL_MEM_BUFFER); ++ (MPIDI_OFI_pack_t *) MPL_malloc(data_sz + sizeof(MPIDI_OFI_pack_t), MPL_MEM_BUFFER); + MPIR_ERR_CHKANDJUMP1(MPIDI_OFI_REQUEST(rreq, noncontig.pack->pack_buffer) == NULL, + mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", + "Recv Pack Buffer alloc"); + recv_buf = MPIDI_OFI_REQUEST(rreq, noncontig.pack->pack_buffer); +- MPIR_Segment_init(buf, count, datatype, &MPIDI_OFI_REQUEST(rreq, noncontig.pack->segment)); ++ MPIDI_OFI_REQUEST(rreq, noncontig.pack->buf) = buf; ++ MPIDI_OFI_REQUEST(rreq, noncontig.pack->count) = count; ++ MPIDI_OFI_REQUEST(rreq, noncontig.pack->datatype) = datatype; + } else { + MPIDI_OFI_REQUEST(rreq, noncontig.pack) = NULL; + MPIDI_OFI_REQUEST(rreq, noncontig.nopack) = NULL; +@@ -253,14 +249,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_irecv(void *buf, + MPIDI_OFI_REQUEST(rreq, util_comm) = comm; + MPIDI_OFI_REQUEST(rreq, util_id) = context_id; + +- if (unlikely(data_sz > MPIDI_Global.max_send)) { ++ if (unlikely(data_sz > MPIDI_OFI_global.max_msg_size)) { + MPIDI_OFI_REQUEST(rreq, event_id) = MPIDI_OFI_EVENT_RECV_HUGE; +- data_sz = MPIDI_Global.max_send; ++ data_sz = MPIDI_OFI_global.max_msg_size; + } else if (MPIDI_OFI_REQUEST(rreq, event_id) != MPIDI_OFI_EVENT_RECV_PACK) + MPIDI_OFI_REQUEST(rreq, event_id) = MPIDI_OFI_EVENT_RECV; + + if (!flags) /* Branch should compile out */ +- MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_Global.ctx[0].rx, ++ MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[0].rx, + recv_buf, + data_sz, + NULL, +@@ -283,7 +279,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_irecv(void *buf, + msg.data = 0; + msg.addr = FI_ADDR_UNSPEC; + +- MPIDI_OFI_CALL_RETRY(fi_trecvmsg(MPIDI_Global.ctx[0].rx, &msg, flags), trecv, ++ MPIDI_OFI_CALL_RETRY(fi_trecvmsg(MPIDI_OFI_global.ctx[0].rx, &msg, flags), trecv, + MPIDI_OFI_CALL_LOCK, FALSE); + } + +@@ -295,10 +291,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_do_irecv(void *buf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_recv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -312,24 +304,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_recv(void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_RECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_RECV); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { + mpi_errno = + MPIDIG_mpi_recv(buf, count, datatype, rank, tag, comm, context_offset, status, request); +- goto fn_exit; ++ } else ++#endif ++ { ++ mpi_errno = MPIDI_OFI_do_irecv(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request, MPIDI_OFI_ON_HEAP, 0ULL); + } + +- mpi_errno = MPIDI_OFI_do_irecv(buf, count, datatype, rank, tag, comm, +- context_offset, addr, request, MPIDI_OFI_ON_HEAP, 0ULL); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_RECV); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_recv_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_recv_init(void *buf, + int count, + MPI_Datatype datatype, +@@ -350,10 +339,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_recv_init(void *buf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_imrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_imrecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, MPIR_Request * message) +@@ -364,27 +349,24 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_imrecv(void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IMRECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IMRECV); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { + mpi_errno = MPIDIG_mpi_imrecv(buf, count, datatype, message); +- goto fn_exit; ++ } else ++#endif ++ { ++ rreq = message; ++ ++ av = MPIDIU_comm_rank_to_av(rreq->comm, message->status.MPI_SOURCE); ++ mpi_errno = MPIDI_OFI_do_irecv(buf, count, datatype, message->status.MPI_SOURCE, ++ message->status.MPI_TAG, rreq->comm, 0, av, ++ &rreq, MPIDI_OFI_USE_EXISTING, FI_CLAIM | FI_COMPLETION); + } + +- rreq = message; +- +- av = MPIDIU_comm_rank_to_av(rreq->comm, message->status.MPI_SOURCE); +- mpi_errno = MPIDI_OFI_do_irecv(buf, count, datatype, message->status.MPI_SOURCE, +- message->status.MPI_TAG, rreq->comm, 0, av, +- &rreq, MPIDI_OFI_USE_EXISTING, FI_CLAIM | FI_COMPLETION); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IMRECV); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_irecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -397,24 +379,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_irecv(void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IRECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IRECV); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { + mpi_errno = + MPIDIG_mpi_irecv(buf, count, datatype, rank, tag, comm, context_offset, request); +- goto fn_exit; ++ } else ++#endif ++ { ++ mpi_errno = MPIDI_OFI_do_irecv(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request, MPIDI_OFI_ON_HEAP, 0ULL); + } + +- mpi_errno = MPIDI_OFI_do_irecv(buf, count, datatype, rank, tag, comm, +- context_offset, addr, request, MPIDI_OFI_ON_HEAP, 0ULL); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IRECV); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_cancel_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) + { + +@@ -423,14 +402,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_CANCEL_RECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_CANCEL_RECV); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { + mpi_errno = MPIDIG_mpi_cancel_recv(rreq); + goto fn_exit; + } ++#endif + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); +- ret = fi_cancel((fid_t) MPIDI_Global.ctx[0].rx, &(MPIDI_OFI_REQUEST(rreq, context))); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); ++ ret = fi_cancel((fid_t) MPIDI_OFI_global.ctx[0].rx, &(MPIDI_OFI_REQUEST(rreq, context))); + + if (ret == 0) { + while ((!MPIR_STATUS_GET_CANCEL_BIT(rreq->status)) && (!MPIR_cc_is_complete(&rreq->cc))) { +@@ -442,7 +421,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) + if (MPIR_STATUS_GET_CANCEL_BIT(rreq->status)) { + MPIR_STATUS_SET_CANCEL_BIT(rreq->status, TRUE); + MPIR_STATUS_SET_COUNT(rreq->status, 0); +- MPIDI_CH4U_request_complete(rreq); ++ MPIDIU_request_complete(rreq); + } + } + +--- a/src/mpid/ch4/netmod/ofi/ofi_rma.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_rma.h +@@ -71,17 +71,20 @@ static inline uint32_t MPIDI_OFI_winfo_disp_unit(MPIR_Win * win, int rank) + return ret; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_count_iovecs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX +- int MPIDI_OFI_count_iovecs(int origin_count, +- int target_count, +- int result_count, +- MPI_Datatype origin_datatype, +- MPI_Datatype target_datatype, +- MPI_Datatype result_datatype, size_t max_pipe, size_t * countp) ++/* _count: count of data elements of certain datatype ++ * _datatype: the datatype ++ * _bytes: total byte size ++ * Note: _bytes is calculated based on _count & _datatype and passed in here for reusing. */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_count_iovecs(int origin_count, ++ int target_count, ++ int result_count, ++ MPI_Datatype origin_datatype, ++ MPI_Datatype target_datatype, ++ MPI_Datatype result_datatype, ++ size_t origin_bytes, ++ size_t target_bytes, ++ size_t result_bytes, ++ size_t max_pipe, size_t * countp) + { + /* Count the max number of iovecs that will be generated, given the iovs */ + /* and maximum data size. The code adds the iovecs from all three lists */ +@@ -90,17 +93,13 @@ MPL_STATIC_INLINE_PREFIX + /* scans two elements of the datatype to make the estimate */ + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_COUNT_IOVECS); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_COUNT_IOVECS); +- *countp = MPIDI_OFI_count_iov(origin_count, origin_datatype, max_pipe); +- *countp += MPIDI_OFI_count_iov(target_count, target_datatype, max_pipe); +- *countp += MPIDI_OFI_count_iov(result_count, result_datatype, max_pipe); ++ *countp = MPIDI_OFI_count_iov(origin_count, origin_datatype, origin_bytes, max_pipe); ++ *countp += MPIDI_OFI_count_iov(target_count, target_datatype, target_bytes, max_pipe); ++ *countp += MPIDI_OFI_count_iov(result_count, result_datatype, result_bytes, max_pipe); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_COUNT_IOVECS); + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_query_acc_atomic_support +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline void MPIDI_OFI_query_acc_atomic_support(MPI_Datatype dt, int query_type, + MPI_Op op, + MPIR_Win * win, +@@ -115,23 +114,26 @@ static inline void MPIDI_OFI_query_acc_atomic_support(MPI_Datatype dt, int query + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_QUERY_ACC_ATOMIC_SUPPORT); + + MPIR_Datatype_get_ptr(dt, dt_ptr); ++ MPIR_Assert(dt_ptr != NULL); + + dt_index = MPIDI_OFI_DATATYPE(dt_ptr).index; +- MPIDI_OFI_MPI_ACCU_OP_INDEX(op, op_index); ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(op); ++ MPIR_Assert(op_index >= 0); ++ MPIR_Assert(op_index < MPIDI_OFI_OP_SIZES); + +- *fi_dt = (enum fi_datatype) MPIDI_Global.win_op_table[dt_index][op_index].dt; +- *fi_op = (enum fi_op) MPIDI_Global.win_op_table[dt_index][op_index].op; +- *dtsize = MPIDI_Global.win_op_table[dt_index][op_index].dtsize; ++ *fi_dt = (enum fi_datatype) MPIDI_OFI_global.win_op_table[dt_index][op_index].dt; ++ *fi_op = (enum fi_op) MPIDI_OFI_global.win_op_table[dt_index][op_index].op; ++ *dtsize = MPIDI_OFI_global.win_op_table[dt_index][op_index].dtsize; + + switch (query_type) { + case MPIDI_OFI_QUERY_ATOMIC_COUNT: +- *count = MPIDI_Global.win_op_table[dt_index][op_index].max_atomic_count; ++ *count = MPIDI_OFI_global.win_op_table[dt_index][op_index].max_atomic_count; + break; + case MPIDI_OFI_QUERY_FETCH_ATOMIC_COUNT: +- *count = MPIDI_Global.win_op_table[dt_index][op_index].max_fetch_atomic_count; ++ *count = MPIDI_OFI_global.win_op_table[dt_index][op_index].max_fetch_atomic_count; + break; + case MPIDI_OFI_QUERY_COMPARE_ATOMIC_COUNT: +- *count = MPIDI_Global.win_op_table[dt_index][op_index].max_compare_atomic_count; ++ *count = MPIDI_OFI_global.win_op_table[dt_index][op_index].max_compare_atomic_count; + break; + default: + MPIR_Assert(*count == MPIDI_OFI_QUERY_ATOMIC_COUNT || +@@ -160,18 +162,24 @@ static inline void MPIDI_OFI_query_acc_atomic_support(MPI_Datatype dt, int query + * all processes as long as the hint correctly contains the local op.*/ + MPIR_Assert(*count >= (size_t) MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[dt_index]); + +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ops == MPIDI_CH4I_ACCU_SAME_OP_NO_OP) ++ if (MPIDIG_WIN(win, info_args).accumulate_ops == MPIDIG_ACCU_SAME_OP_NO_OP) + *count = (size_t) MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[dt_index]; + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_QUERY_ACC_ATOMIC_SUPPORT); + } + ++/* _count: count of data elements of certain datatype ++ * _datatype: the datatype ++ * _bytes: total byte size ++ * Note: _bytes is calculated based on _count & _datatype and passed in here for reusing. */ + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_put_get(MPIR_Win * win, + int origin_count, + int target_count, + int target_rank, + MPI_Datatype origin_datatype, + MPI_Datatype target_datatype, ++ size_t origin_bytes, ++ size_t target_bytes, + size_t max_pipe, + MPIDI_OFI_win_request_t ** + winreq, uint64_t * flags, +@@ -189,7 +197,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_put_get(MPIR_Win * w + t_size = sizeof(struct fi_rma_iov); + /* An upper bound on the iov limit */ + MPIDI_OFI_count_iovecs(origin_count, target_count, 0, origin_datatype, +- target_datatype, MPI_DATATYPE_NULL, max_pipe, &alloc_iovs); ++ target_datatype, MPI_DATATYPE_NULL, origin_bytes, target_bytes, 0, ++ max_pipe, &alloc_iovs); + + alloc_iov_size = MPIDI_OFI_align_iov_len(alloc_iovs * o_size) + + MPIDI_OFI_align_iov_len(alloc_iovs * t_size) +@@ -217,18 +226,23 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_put_get(MPIR_Win * w + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_ALLOCATE_WIN_REQUEST_PUT_GET); + return mpi_errno; + fn_fail: +- if (req) +- MPL_free(req); ++ MPL_free(req); + req = NULL; + goto fn_exit; + } + ++/* _count: count of data elements of certain datatype ++ * _datatype: the datatype ++ * _bytes: total byte size ++ * Note: _bytes is calculated based on _count & _datatype and passed in here for reusing. */ + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_accumulate(MPIR_Win * win, + int origin_count, + int target_count, + int target_rank, + MPI_Datatype origin_datatype, + MPI_Datatype target_datatype, ++ size_t origin_bytes, ++ size_t target_bytes, + size_t max_pipe, + MPIDI_OFI_win_request_t ** + winreq, uint64_t * flags, +@@ -246,7 +260,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_accumulate(MPIR_Win + t_size = sizeof(struct fi_rma_ioc); + /* An upper bound on the iov limit. */ + MPIDI_OFI_count_iovecs(origin_count, target_count, 0, origin_datatype, +- target_datatype, MPI_DATATYPE_NULL, max_pipe, &alloc_iovs); ++ target_datatype, MPI_DATATYPE_NULL, origin_bytes, target_bytes, 0, ++ max_pipe, &alloc_iovs); + + alloc_iov_size = MPIDI_OFI_align_iov_len(alloc_iovs * o_size) + + MPIDI_OFI_align_iov_len(alloc_iovs * t_size) +@@ -274,8 +289,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_accumulate(MPIR_Win + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_ALLOCATE_WIN_REQUEST_ACCUMULATE); + return mpi_errno; + fn_fail: +- if (req) +- MPL_free(req); ++ MPL_free(req); + req = NULL; + goto fn_exit; + } +@@ -292,6 +306,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_get_accumulate(MPIR_ + target_datatype, + MPI_Datatype + result_datatype, ++ size_t origin_bytes, ++ size_t target_bytes, ++ size_t result_bytes, + size_t max_pipe, + MPIDI_OFI_win_request_t + ** winreq, +@@ -312,7 +329,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_get_accumulate(MPIR_ + + /* An upper bound on the iov limit. */ + MPIDI_OFI_count_iovecs(origin_count, target_count, result_count, origin_datatype, +- target_datatype, result_datatype, max_pipe, &alloc_iovs); ++ target_datatype, result_datatype, origin_bytes, target_bytes, ++ result_bytes, max_pipe, &alloc_iovs); + alloc_rma_iovs = alloc_iovs; + + alloc_iov_size = MPIDI_OFI_align_iov_len(alloc_iovs * o_size) +@@ -345,17 +363,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_allocate_win_request_get_accumulate(MPIR_ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_ALLOCATE_WIN_REQUEST_GET_ACCUMULATE); + return mpi_errno; + fn_fail: +- if (req) +- MPL_free(req); ++ MPL_free(req); + req = NULL; + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_put(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -363,7 +376,7 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPIR_Win * win, MPIR_Request ** sigreq) ++ MPIR_Win * win, MPIDI_av_entry_t * addr, MPIR_Request ** sigreq) + { + int rc, mpi_errno = MPI_SUCCESS; + MPIDI_OFI_win_request_t *req = NULL; +@@ -384,14 +397,15 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DO_PUT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DO_PUT); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (unlikely(target_rank == MPI_PROC_NULL)) + goto null_op_exit; + +- MPIDI_Datatype_check_contig_size_lb(target_datatype, target_count, target_contig, target_bytes, +- target_true_lb); +- MPIDI_Datatype_check_contig_size_lb(origin_datatype, origin_count, origin_contig, origin_bytes, +- origin_true_lb); ++ MPIDI_Datatype_check_origin_target_contig_size_lb(origin_datatype, target_datatype, ++ origin_count, target_count, ++ origin_contig, target_contig, ++ origin_bytes, target_bytes, ++ origin_true_lb, target_true_lb); + + MPIR_ERR_CHKANDJUMP((origin_bytes != target_bytes), mpi_errno, MPI_ERR_SIZE, "**rmasize"); + +@@ -407,11 +421,11 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + goto null_op_exit; + } + +- if (origin_contig && target_contig && (origin_bytes <= MPIDI_Global.max_buffered_write)) { ++ if (origin_contig && target_contig && (origin_bytes <= MPIDI_OFI_global.max_buffered_write)) { + MPIDI_OFI_CALL_RETRY2(MPIDI_OFI_win_cntr_incr(win), + fi_inject_write(MPIDI_OFI_WIN(win).ep, + (char *) origin_addr + origin_true_lb, target_bytes, +- MPIDI_OFI_comm_to_phys(win->comm_ptr, target_rank), ++ MPIDI_OFI_av_to_phys(addr), + (uint64_t) MPIDI_OFI_winfo_base(win, target_rank) + + target_disp * MPIDI_OFI_winfo_disp_unit(win, + target_rank) +@@ -423,7 +437,7 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + MPIDI_OFI_INIT_SIGNAL_REQUEST(win, sigreq, &flags); + offset = target_disp * MPIDI_OFI_winfo_disp_unit(win, target_rank); + msg.desc = NULL; +- msg.addr = MPIDI_OFI_comm_to_phys(win->comm_ptr, target_rank); ++ msg.addr = MPIDI_OFI_av_to_phys(addr); + msg.context = NULL; + msg.data = 0; + msg.msg_iov = &iov; +@@ -432,7 +446,7 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + msg.rma_iov_count = 1; + iov.iov_base = (char *) origin_addr + origin_true_lb; + iov.iov_len = target_bytes; +- riov.addr = (uint64_t) (MPIDI_OFI_winfo_base(win, target_rank) + offset); ++ riov.addr = (uint64_t) (MPIDI_OFI_winfo_base(win, target_rank) + offset + target_true_lb); + riov.len = target_bytes; + riov.key = MPIDI_OFI_winfo_mr_key(win, target_rank); + MPIDI_OFI_CALL_RETRY2(MPIDI_OFI_INIT_CHUNK_CONTEXT(win, sigreq), +@@ -446,14 +460,16 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + target_rank, + origin_datatype, + target_datatype, +- MPIDI_Global.max_write, ++ origin_bytes, ++ target_bytes, ++ MPIDI_OFI_global.max_msg_size, + &req, &flags, &ep, sigreq)); + + offset = target_disp * MPIDI_OFI_winfo_disp_unit(win, target_rank); + + req->event_id = MPIDI_OFI_EVENT_ABORT; + msg.desc = NULL; +- msg.addr = MPIDI_OFI_comm_to_phys(win->comm_ptr, req->target_rank); ++ msg.addr = MPIDI_OFI_av_to_phys(addr); + msg.context = NULL; + msg.data = 0; + req->next = MPIDI_OFI_WIN(win).syncQ; +@@ -463,15 +479,17 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + MPIDI_OFI_winfo_base(win, req->target_rank) + offset, + origin_count, + target_count, +- MPIDI_Global.max_write, origin_datatype, target_datatype); ++ origin_bytes, ++ target_bytes, ++ MPIDI_OFI_global.max_msg_size, origin_datatype, target_datatype); + rc = MPIDI_OFI_SEG_EAGAIN; + + size_t cur_o = 0, cur_t = 0; + while (rc == MPIDI_OFI_SEG_EAGAIN) { + originv = &req->noncontig->iov.put_get.originv[cur_o]; + targetv = &req->noncontig->iov.put_get.targetv[cur_t]; +- omax = MPIDI_Global.rma_iov_limit; +- tmax = MPIDI_Global.rma_iov_limit; ++ omax = MPIDI_OFI_global.rma_iov_limit; ++ tmax = MPIDI_OFI_global.rma_iov_limit; + rc = MPIDI_OFI_merge_segment(&p, originv, omax, targetv, tmax, &oout, &tout); + + if (rc == MPIDI_OFI_SEG_DONE) +@@ -491,6 +509,8 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + fi_writemsg(ep, &msg, flags), rdma_write); + } + ++ MPIDI_OFI_finalize_seg_state(p); ++ + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DO_PUT); + return mpi_errno; +@@ -498,37 +518,27 @@ static inline int MPIDI_OFI_do_put(const void *origin_addr, + goto fn_exit; + null_op_exit: + mpi_errno = MPI_SUCCESS; +- if (sigreq) { +- *sigreq = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); +- MPIR_ERR_CHKANDSTMT((*sigreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, +- "**nomemreq"); +- MPIR_Request_add_ref(*sigreq); +- MPIDI_CH4U_request_complete(*sigreq); +- } ++ if (sigreq) ++ *sigreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_put(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, + int target_rank, + MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPIR_Win * win, +- MPIDI_av_entry_t * addr) ++ MPIDI_av_entry_t * av) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_PUT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_PUT); + int mpi_errno = MPI_SUCCESS; + + if (!MPIDI_OFI_ENABLE_RMA) { +- mpi_errno = MPIDI_CH4U_mpi_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, win); ++ mpi_errno = MPIDIG_mpi_put(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win); + goto fn_exit; + } + +@@ -536,19 +546,13 @@ static inline int MPIDI_NM_mpi_put(const void *origin_addr, + origin_count, + origin_datatype, + target_rank, +- target_disp, target_count, target_datatype, win, NULL); ++ target_disp, target_count, target_datatype, win, av, NULL); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_PUT); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_get(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -556,7 +560,7 @@ static inline int MPIDI_OFI_do_get(void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPIR_Win * win, MPIR_Request ** sigreq) ++ MPIR_Win * win, MPIDI_av_entry_t * addr, MPIR_Request ** sigreq) + { + int rc, mpi_errno = MPI_SUCCESS; + MPIDI_OFI_win_request_t *req = NULL; +@@ -577,14 +581,15 @@ static inline int MPIDI_OFI_do_get(void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DO_GET); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DO_GET); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (unlikely(target_rank == MPI_PROC_NULL)) + goto null_op_exit; + +- MPIDI_Datatype_check_contig_size_lb(origin_datatype, origin_count, origin_contig, +- origin_bytes, origin_true_lb); +- MPIDI_Datatype_check_contig_size_lb(target_datatype, target_count, target_contig, +- target_bytes, target_true_lb); ++ MPIDI_Datatype_check_origin_target_contig_size_lb(origin_datatype, target_datatype, ++ origin_count, target_count, ++ origin_contig, target_contig, ++ origin_bytes, target_bytes, ++ origin_true_lb, target_true_lb); + + MPIR_ERR_CHKANDJUMP((origin_bytes != target_bytes), mpi_errno, MPI_ERR_SIZE, "**rmasize"); + +@@ -601,13 +606,15 @@ static inline int MPIDI_OFI_do_get(void *origin_addr, + + if (origin_contig && target_contig) { + offset = target_disp * MPIDI_OFI_winfo_disp_unit(win, target_rank); +- MPIDI_OFI_INIT_SIGNAL_REQUEST(win, sigreq, &flags); +- if (!sigreq) ++ if (sigreq) { ++ MPIDI_OFI_INIT_SIGNAL_REQUEST(win, sigreq, &flags); ++ } else { + flags = 0; ++ } + msg.desc = NULL; + msg.msg_iov = &iov; + msg.iov_count = 1; +- msg.addr = MPIDI_OFI_comm_to_phys(win->comm_ptr, target_rank); ++ msg.addr = MPIDI_OFI_av_to_phys(addr); + msg.rma_iov = &riov; + msg.rma_iov_count = 1; + msg.context = NULL; +@@ -625,13 +632,14 @@ static inline int MPIDI_OFI_do_get(void *origin_addr, + MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_allocate_win_request_put_get(win, origin_count, target_count, + target_rank, + origin_datatype, target_datatype, +- MPIDI_Global.max_write, ++ origin_bytes, target_bytes, ++ MPIDI_OFI_global.max_msg_size, + &req, &flags, &ep, sigreq)); + + offset = target_disp * MPIDI_OFI_winfo_disp_unit(win, target_rank); + req->event_id = MPIDI_OFI_EVENT_ABORT; + msg.desc = NULL; +- msg.addr = MPIDI_OFI_comm_to_phys(win->comm_ptr, req->target_rank); ++ msg.addr = MPIDI_OFI_av_to_phys(addr); + msg.context = NULL; + msg.data = 0; + req->next = MPIDI_OFI_WIN(win).syncQ; +@@ -641,15 +649,17 @@ static inline int MPIDI_OFI_do_get(void *origin_addr, + MPIDI_OFI_winfo_base(win, req->target_rank) + offset, + origin_count, + target_count, +- MPIDI_Global.max_write, origin_datatype, target_datatype); ++ origin_bytes, ++ target_bytes, ++ MPIDI_OFI_global.max_msg_size, origin_datatype, target_datatype); + rc = MPIDI_OFI_SEG_EAGAIN; + + size_t cur_o = 0, cur_t = 0; + while (rc == MPIDI_OFI_SEG_EAGAIN) { + originv = &req->noncontig->iov.put_get.originv[cur_o]; + targetv = &req->noncontig->iov.put_get.targetv[cur_t]; +- omax = MPIDI_Global.rma_iov_limit; +- tmax = MPIDI_Global.rma_iov_limit; ++ omax = MPIDI_OFI_global.rma_iov_limit; ++ tmax = MPIDI_OFI_global.rma_iov_limit; + + rc = MPIDI_OFI_merge_segment(&p, originv, omax, targetv, tmax, &oout, &tout); + +@@ -672,6 +682,8 @@ static inline int MPIDI_OFI_do_get(void *origin_addr, + fi_readmsg(ep, &msg, flags), rdma_write); + } + ++ MPIDI_OFI_finalize_seg_state(p); ++ + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DO_GET); + return mpi_errno; +@@ -679,27 +691,18 @@ static inline int MPIDI_OFI_do_get(void *origin_addr, + goto fn_exit; + null_op_exit: + mpi_errno = MPI_SUCCESS; +- if (sigreq) { +- *sigreq = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); +- MPIR_ERR_CHKANDSTMT((*sigreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, +- "**nomemreq"); +- MPIR_Request_add_ref(*sigreq); +- MPIDI_CH4U_request_complete(*sigreq); +- } ++ if (sigreq) ++ *sigreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_get(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, + int target_rank, + MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPIR_Win * win, +- MPIDI_av_entry_t * addr) ++ MPIDI_av_entry_t * av) + { + int mpi_errno = MPI_SUCCESS; + +@@ -707,9 +710,8 @@ static inline int MPIDI_NM_mpi_get(void *origin_addr, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_GET); + + if (!MPIDI_OFI_ENABLE_RMA) { +- mpi_errno = MPIDI_CH4U_mpi_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, win); ++ mpi_errno = MPIDIG_mpi_get(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win); + goto fn_exit; + } + +@@ -717,19 +719,13 @@ static inline int MPIDI_NM_mpi_get(void *origin_addr, + origin_count, + origin_datatype, + target_rank, +- target_disp, target_count, target_datatype, win, NULL); ++ target_disp, target_count, target_datatype, win, av, NULL); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_GET); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_rput +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_rput(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -737,17 +733,15 @@ static inline int MPIDI_NM_mpi_rput(const void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPIR_Win * win, MPIDI_av_entry_t * addr, +- MPIR_Request ** request) ++ MPIR_Win * win, MPIDI_av_entry_t * av, MPIR_Request ** request) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_RPUT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_RPUT); + int mpi_errno = MPI_SUCCESS; + + if (!MPIDI_OFI_ENABLE_RMA) { +- mpi_errno = MPIDI_CH4U_mpi_rput(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, win, request); ++ mpi_errno = MPIDIG_mpi_rput(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win, request); + goto fn_exit; + } + +@@ -755,26 +749,20 @@ static inline int MPIDI_NM_mpi_rput(const void *origin_addr, + origin_count, + origin_datatype, + target_rank, +- target_disp, target_count, target_datatype, win, request); ++ target_disp, target_count, target_datatype, win, av, request); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_RPUT); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_compare_and_swap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, + MPI_Datatype datatype, + int target_rank, MPI_Aint target_disp, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++ MPIR_Win * win, MPIDI_av_entry_t * av) + { + int mpi_errno = MPI_SUCCESS; + enum fi_op fi_op; +@@ -795,19 +783,18 @@ static inline int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, + * over shared memory, or op issues to process-self. + * If disable_shm_accumulate == TRUE is set, then all above ops are issued + * via network thus we can safely use network-based atomics. */ +- !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate || ++ !MPIDIG_WIN(win, info_args).disable_shm_accumulate || + #endif + !MPIDI_OFI_ENABLE_RMA || !MPIDI_OFI_ENABLE_ATOMICS) { +- mpi_errno = MPIDI_CH4U_mpi_compare_and_swap(origin_addr, compare_addr, +- result_addr, datatype, +- target_rank, target_disp, win); ++ mpi_errno = MPIDIG_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, datatype, ++ target_rank, target_disp, win); + goto fn_exit; + } + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMPARE_AND_SWAP); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMPARE_AND_SWAP); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (unlikely(target_rank == MPI_PROC_NULL)) + goto fn_exit; + +@@ -833,9 +820,8 @@ static inline int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, + if (max_size < dt_size) + goto am_fallback; + /* Compare_and_swap is READ and WRITE. */ +- MPIDI_CH4U_wait_am_acc(win, target_rank, +- (MPIDI_CH4I_ACCU_ORDER_RAW | MPIDI_CH4I_ACCU_ORDER_WAR | +- MPIDI_CH4I_ACCU_ORDER_WAW)); ++ MPIDIG_wait_am_acc(win, target_rank, (MPIDIG_ACCU_ORDER_RAW | MPIDIG_ACCU_ORDER_WAR | ++ MPIDIG_ACCU_ORDER_WAW)); + + originv.addr = (void *) buffer; + originv.count = 1; +@@ -851,7 +837,7 @@ static inline int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, + msg.msg_iov = &originv; + msg.desc = NULL; + msg.iov_count = 1; +- msg.addr = MPIDI_OFI_comm_to_phys(win->comm_ptr, target_rank); ++ msg.addr = MPIDI_OFI_av_to_phys(av); + msg.rma_iov = &targetv; + msg.rma_iov_count = 1; + msg.datatype = fi_dt; +@@ -869,20 +855,16 @@ static inline int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, + fn_fail: + goto fn_exit; + am_fallback: +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & +- (MPIDI_CH4I_ACCU_ORDER_RAW | MPIDI_CH4I_ACCU_ORDER_WAW | MPIDI_CH4I_ACCU_ORDER_WAR)) { ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & ++ (MPIDIG_ACCU_ORDER_RAW | MPIDIG_ACCU_ORDER_WAW | MPIDIG_ACCU_ORDER_WAR)) { + /* Wait for OFI cas to complete. + * For now, there is no FI flag to track atomic only ops, we use RMA level cntr. */ + MPIDI_OFI_win_progress_fence(win); + } +- return MPIDI_CH4U_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, +- datatype, target_rank, target_disp, win); ++ return MPIDIG_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, datatype, ++ target_rank, target_disp, win); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -890,12 +872,13 @@ static inline int MPIDI_OFI_do_accumulate(const void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, MPIR_Request ** sigreq) ++ MPI_Op op, MPIR_Win * win, ++ MPIDI_av_entry_t * addr, MPIR_Request ** sigreq) + { + int rc, mpi_errno = MPI_SUCCESS; + uint64_t flags; + MPIDI_OFI_win_request_t *req = NULL; +- size_t origin_bytes, offset, max_count, max_size, dt_size, omax, tmax, tout, oout; ++ size_t origin_bytes, target_bytes, offset, max_count, max_size, dt_size, omax, tmax, tout, oout; + struct fid_ep *ep = NULL; + MPI_Datatype basic_type; + enum fi_op fi_op; +@@ -909,11 +892,12 @@ static inline int MPIDI_OFI_do_accumulate(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DO_ACCUMULATE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DO_ACCUMULATE); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (unlikely(target_rank == MPI_PROC_NULL)) + goto null_op_exit; + + MPIDI_Datatype_check_size(origin_datatype, origin_count, origin_bytes); ++ MPIDI_Datatype_check_size(target_datatype, target_count, target_bytes); + if (origin_bytes == 0) + goto null_op_exit; + +@@ -928,7 +912,7 @@ static inline int MPIDI_OFI_do_accumulate(const void *origin_addr, + if (max_count == 0) + goto am_fallback; + max_size = MPIDI_OFI_check_acc_order_size(win, max_count * dt_size); +- max_size = MPL_MIN(max_size, MPIDI_Global.max_write); ++ max_size = MPL_MIN(max_size, MPIDI_OFI_global.max_msg_size); + /* round down to multiple of dt_size */ + max_size = max_size / dt_size * dt_size; + /* It's impossible to chunk data if buffer size is smaller than basic datatype size. +@@ -936,11 +920,11 @@ static inline int MPIDI_OFI_do_accumulate(const void *origin_addr, + if (max_size < dt_size) + goto am_fallback; + /* Accumulate is WRITE. */ +- MPIDI_CH4U_wait_am_acc(win, target_rank, +- (MPIDI_CH4I_ACCU_ORDER_WAW | MPIDI_CH4I_ACCU_ORDER_WAR)); ++ MPIDIG_wait_am_acc(win, target_rank, (MPIDIG_ACCU_ORDER_WAW | MPIDIG_ACCU_ORDER_WAR)); + MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_allocate_win_request_accumulate + (win, origin_count, target_count, target_rank, origin_datatype, +- target_datatype, max_size, &req, &flags, &ep, sigreq)); ++ target_datatype, origin_bytes, target_bytes, max_size, &req, &flags, ++ &ep, sigreq)); + + req->event_id = MPIDI_OFI_EVENT_ABORT; + req->next = MPIDI_OFI_WIN(win).syncQ; +@@ -950,10 +934,11 @@ static inline int MPIDI_OFI_do_accumulate(const void *origin_addr, + origin_addr, + MPIDI_OFI_winfo_base(win, req->target_rank) + offset, + origin_count, +- target_count, max_size, origin_datatype, target_datatype); ++ target_count, origin_bytes, target_bytes, max_size, origin_datatype, ++ target_datatype); + + msg.desc = NULL; +- msg.addr = MPIDI_OFI_comm_to_phys(win->comm_ptr, req->target_rank); ++ msg.addr = MPIDI_OFI_av_to_phys(addr); + msg.context = NULL; + msg.data = 0; + msg.datatype = fi_dt; +@@ -964,8 +949,8 @@ static inline int MPIDI_OFI_do_accumulate(const void *origin_addr, + while (rc == MPIDI_OFI_SEG_EAGAIN) { + originv = &req->noncontig->iov.accumulate.originv[cur_o]; + targetv = &req->noncontig->iov.accumulate.targetv[cur_t]; +- omax = MPIDI_Global.rma_iov_limit; +- tmax = MPIDI_Global.rma_iov_limit; ++ omax = MPIDI_OFI_global.rma_iov_limit; ++ tmax = MPIDI_OFI_global.rma_iov_limit; + rc = MPIDI_OFI_merge_segment(&p, (struct iovec *) originv, omax, + (struct fi_rma_iov *) targetv, tmax, &oout, &tout); + +@@ -994,37 +979,29 @@ static inline int MPIDI_OFI_do_accumulate(const void *origin_addr, + fi_atomicmsg(ep, &msg, flags), rdma_atomicto); + } + ++ MPIDI_OFI_finalize_seg_state(p); ++ + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DO_ACCUMULATE); + return mpi_errno; + fn_fail: + goto fn_exit; + am_fallback: +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & +- (MPIDI_CH4I_ACCU_ORDER_WAW | MPIDI_CH4I_ACCU_ORDER_WAR)) { ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & ++ (MPIDIG_ACCU_ORDER_WAW | MPIDIG_ACCU_ORDER_WAR)) { + /* Wait for OFI acc to complete. + * For now, there is no FI flag to track atomic only ops, we use RMA level cntr. */ + MPIDI_OFI_win_progress_fence(win); + } +- return MPIDI_CH4U_mpi_accumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, op, +- win); ++ return MPIDIG_mpi_accumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win); + null_op_exit: + mpi_errno = MPI_SUCCESS; +- if (sigreq) { +- *sigreq = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); +- MPIR_ERR_CHKANDSTMT((*sigreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, +- "**nomemreq"); +- MPIR_Request_add_ref(*sigreq); +- MPIDI_CH4U_request_complete(*sigreq); +- } ++ if (sigreq) ++ *sigreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_do_get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1035,12 +1012,14 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, MPIR_Request ** sigreq) ++ MPI_Op op, MPIR_Win * win, ++ MPIDI_av_entry_t * addr, MPIR_Request ** sigreq) + { + int rc, mpi_errno = MPI_SUCCESS; + uint64_t flags; + MPIDI_OFI_win_request_t *req = NULL; +- size_t target_bytes, offset, max_count, max_size, dt_size, omax, rmax, tmax, tout, rout, oout; ++ size_t target_bytes, origin_bytes, result_bytes, offset, max_count, max_size, dt_size, omax, ++ rmax, tmax, tout, rout, oout; + struct fid_ep *ep = NULL; + MPI_Datatype basic_type; + enum fi_op fi_op; +@@ -1054,11 +1033,13 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DO_GET_ACCUMULATE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DO_GET_ACCUMULATE); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (unlikely(target_rank == MPI_PROC_NULL)) + goto null_op_exit; + + MPIDI_Datatype_check_size(target_datatype, target_count, target_bytes); ++ MPIDI_Datatype_check_size(origin_datatype, origin_count, origin_bytes); ++ MPIDI_Datatype_check_size(result_datatype, result_count, result_bytes); + if (target_bytes == 0) + goto null_op_exit; + +@@ -1074,7 +1055,7 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + goto am_fallback; + + max_size = MPIDI_OFI_check_acc_order_size(win, max_count * dt_size); +- max_size = MPL_MIN(max_size, MPIDI_Global.max_write); ++ max_size = MPL_MIN(max_size, MPIDI_OFI_global.max_msg_size); + /* round down to multiple of dt_size */ + max_size = max_size / dt_size * dt_size; + /* It's impossible to chunk data if buffer size is smaller than basic datatype size. +@@ -1083,16 +1064,15 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + goto am_fallback; + if (unlikely(op == MPI_NO_OP)) { + /* Get_accumulate is READ and WRITE, except NO_OP (it is READ only). */ +- MPIDI_CH4U_wait_am_acc(win, target_rank, MPIDI_CH4I_ACCU_ORDER_RAW); ++ MPIDIG_wait_am_acc(win, target_rank, MPIDIG_ACCU_ORDER_RAW); + } else { +- MPIDI_CH4U_wait_am_acc(win, target_rank, +- (MPIDI_CH4I_ACCU_ORDER_RAW | MPIDI_CH4I_ACCU_ORDER_WAR | +- MPIDI_CH4I_ACCU_ORDER_WAW)); ++ MPIDIG_wait_am_acc(win, target_rank, ++ (MPIDIG_ACCU_ORDER_RAW | MPIDIG_ACCU_ORDER_WAR | MPIDIG_ACCU_ORDER_WAW)); + } + MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_allocate_win_request_get_accumulate + (win, origin_count, target_count, result_count, target_rank, op, +- origin_datatype, target_datatype, result_datatype, max_size, &req, +- &flags, &ep, sigreq)); ++ origin_datatype, target_datatype, result_datatype, origin_bytes, ++ target_bytes, result_bytes, max_size, &req, &flags, &ep, sigreq)); + + req->event_id = MPIDI_OFI_EVENT_RMA_DONE; + req->next = MPIDI_OFI_WIN(win).syncQ; +@@ -1104,15 +1084,21 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + result_addr, + MPIDI_OFI_winfo_base(win, req->target_rank) + offset, + origin_count, result_count, target_count, +- max_size, origin_datatype, result_datatype, target_datatype); +- else ++ max_size, origin_datatype, result_datatype, target_datatype, ++ origin_bytes, result_bytes, target_bytes); ++ else { ++ /* unlikly branch, zero it to prevent gcc-4 about p.result_xxx (-Wmaybe-uninitialized) */ ++ memset(&p, 0, sizeof(p)); + MPIDI_OFI_init_seg_state(&p, + result_addr, + MPIDI_OFI_winfo_base(win, req->target_rank) + offset, + result_count, +- target_count, max_size, result_datatype, target_datatype); ++ target_count, result_bytes, target_bytes, max_size, ++ result_datatype, target_datatype); ++ } ++ + msg.desc = NULL; +- msg.addr = MPIDI_OFI_comm_to_phys(win->comm_ptr, req->target_rank); ++ msg.addr = MPIDI_OFI_av_to_phys(addr); + msg.context = NULL; + msg.data = 0; + msg.datatype = fi_dt; +@@ -1126,10 +1112,10 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + resultv = &req->noncontig->iov.get_accumulate.resultv[cur_r]; + omax = rmax = + MPIDI_OFI_FETCH_ATOMIC_IOVECS < +- 0 ? MPIDI_Global.rma_iov_limit : MPIDI_OFI_FETCH_ATOMIC_IOVECS; ++ 0 ? MPIDI_OFI_global.rma_iov_limit : MPIDI_OFI_FETCH_ATOMIC_IOVECS; + tmax = + MPIDI_OFI_FETCH_ATOMIC_IOVECS < +- 0 ? MPIDI_Global.rma_iov_limit : MPIDI_OFI_FETCH_ATOMIC_IOVECS; ++ 0 ? MPIDI_OFI_global.rma_iov_limit : MPIDI_OFI_FETCH_ATOMIC_IOVECS; + + if (op != MPI_NO_OP) + rc = MPIDI_OFI_merge_segment2(&p, (struct iovec *) originv, +@@ -1171,6 +1157,11 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + NULL, rout, flags), rdma_readfrom); + } + ++ if (op != MPI_NO_OP) ++ MPIDI_OFI_finalize_seg_state2(p); ++ else ++ MPIDI_OFI_finalize_seg_state(p); ++ + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DO_GET_ACCUMULATE); + return mpi_errno; +@@ -1178,21 +1169,20 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + goto fn_exit; + am_fallback: + if (unlikely(op == MPI_NO_OP)) { +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_RAW) { ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_RAW) { + /* Wait for OFI acc to complete. + * For now, there is no FI flag to track atomic only ops, we use RMA level cntr. */ + MPIDI_OFI_win_progress_fence(win); + } + } else { +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & +- (MPIDI_CH4I_ACCU_ORDER_RAW | MPIDI_CH4I_ACCU_ORDER_WAR | MPIDI_CH4I_ACCU_ORDER_WAW)) { ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & ++ (MPIDIG_ACCU_ORDER_RAW | MPIDIG_ACCU_ORDER_WAR | MPIDIG_ACCU_ORDER_WAW)) { + MPIDI_OFI_win_progress_fence(win); + } + } +- return MPIDI_CH4U_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win); ++ return MPIDIG_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, result_addr, ++ result_count, result_datatype, target_rank, target_disp, ++ target_count, target_datatype, op, win); + null_op_exit: + mpi_errno = MPI_SUCCESS; + if (sigreq) { +@@ -1200,16 +1190,12 @@ static inline int MPIDI_OFI_do_get_accumulate(const void *origin_addr, + MPIR_ERR_CHKANDSTMT((*sigreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, + "**nomemreq"); + MPIR_Request_add_ref(*sigreq); +- MPIDI_CH4U_request_complete(*sigreq); ++ MPIDIU_request_complete(*sigreq); + } + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_raccumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_raccumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1217,7 +1203,7 @@ static inline int MPIDI_NM_mpi_raccumulate(const void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, MPIDI_av_entry_t * addr, ++ MPI_Op op, MPIR_Win * win, MPIDI_av_entry_t * av, + MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; +@@ -1231,12 +1217,12 @@ static inline int MPIDI_NM_mpi_raccumulate(const void *origin_addr, + * over shared memory, or op issues to process-self. + * If disable_shm_accumulate == TRUE is set, then all above ops are issued + * via network thus we can safely use network-based atomics. */ +- !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate || ++ !MPIDIG_WIN(win, info_args).disable_shm_accumulate || + #endif + !MPIDI_OFI_ENABLE_RMA || !MPIDI_OFI_ENABLE_ATOMICS) { +- mpi_errno = MPIDI_CH4U_mpi_raccumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); ++ mpi_errno = MPIDIG_mpi_raccumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win, ++ request); + goto fn_exit; + } + +@@ -1245,17 +1231,13 @@ static inline int MPIDI_NM_mpi_raccumulate(const void *origin_addr, + origin_datatype, + target_rank, + target_disp, +- target_count, target_datatype, op, win, request); ++ target_count, target_datatype, op, win, av, request); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_RACCUMULATE); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_rget_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_rget_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1266,7 +1248,7 @@ static inline int MPIDI_NM_mpi_rget_accumulate(const void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, MPIDI_av_entry_t * addr, ++ MPI_Op op, MPIR_Win * win, MPIDI_av_entry_t * av, + MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; +@@ -1280,36 +1262,32 @@ static inline int MPIDI_NM_mpi_rget_accumulate(const void *origin_addr, + * over shared memory, or op issues to process-self. + * If disable_shm_accumulate == TRUE is set, then all above ops are issued + * via network thus we can safely use network-based atomics. */ +- !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate || ++ !MPIDIG_WIN(win, info_args).disable_shm_accumulate || + #endif + !MPIDI_OFI_ENABLE_RMA || !MPIDI_OFI_ENABLE_ATOMICS) { +- mpi_errno = MPIDI_CH4U_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); ++ mpi_errno = MPIDIG_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, ++ result_addr, result_count, result_datatype, ++ target_rank, target_disp, target_count, ++ target_datatype, op, win, request); + goto fn_exit; + } + + mpi_errno = MPIDI_OFI_do_get_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, request); ++ target_datatype, op, win, av, request); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_RGET_ACCUMULATE); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_fetch_and_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, + void *result_addr, + MPI_Datatype datatype, + int target_rank, + MPI_Aint target_disp, MPI_Op op, MPIR_Win * win, +- MPIDI_av_entry_t * addr) ++ MPIDI_av_entry_t * av) + { + int mpi_errno = MPI_SUCCESS; + enum fi_op fi_op; +@@ -1331,15 +1309,15 @@ static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, + * over shared memory, or op issues to process-self. + * If disable_shm_accumulate == TRUE is set, then all above ops are issued + * via network thus we can safely use network-based atomics. */ +- !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate || ++ !MPIDIG_WIN(win, info_args).disable_shm_accumulate || + #endif + !MPIDI_OFI_ENABLE_RMA || !MPIDI_OFI_ENABLE_ATOMICS) { +- mpi_errno = MPIDI_CH4U_mpi_fetch_and_op(origin_addr, result_addr, datatype, +- target_rank, target_disp, op, win); ++ mpi_errno = MPIDIG_mpi_fetch_and_op(origin_addr, result_addr, datatype, target_rank, ++ target_disp, op, win); + goto fn_exit; + } + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (unlikely(target_rank == MPI_PROC_NULL)) + goto fn_exit; + +@@ -1366,11 +1344,10 @@ static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, + + if (unlikely(op == MPI_NO_OP)) { + /* Fetch_and_op is READ and WRITE, except NO_OP (it is READ only). */ +- MPIDI_CH4U_wait_am_acc(win, target_rank, MPIDI_CH4I_ACCU_ORDER_RAW); ++ MPIDIG_wait_am_acc(win, target_rank, MPIDIG_ACCU_ORDER_RAW); + } else { +- MPIDI_CH4U_wait_am_acc(win, target_rank, +- (MPIDI_CH4I_ACCU_ORDER_RAW | MPIDI_CH4I_ACCU_ORDER_WAR | +- MPIDI_CH4I_ACCU_ORDER_WAW)); ++ MPIDIG_wait_am_acc(win, target_rank, ++ (MPIDIG_ACCU_ORDER_RAW | MPIDIG_ACCU_ORDER_WAR | MPIDIG_ACCU_ORDER_WAW)); + } + + originv.addr = (void *) buffer; +@@ -1385,7 +1362,7 @@ static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, + msg.msg_iov = &originv; + msg.desc = NULL; + msg.iov_count = 1; +- msg.addr = MPIDI_OFI_comm_to_phys(win->comm_ptr, target_rank); ++ msg.addr = MPIDI_OFI_av_to_phys(av); + msg.rma_iov = &targetv; + msg.rma_iov_count = 1; + msg.datatype = fi_dt; +@@ -1404,25 +1381,21 @@ static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, + goto fn_exit; + am_fallback: + if (unlikely(op == MPI_NO_OP)) { +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_RAW) { ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_RAW) { + /* Wait for OFI fetch_and_op to complete. + * For now, there is no FI flag to track atomic only ops, we use RMA level cntr. */ + MPIDI_OFI_win_progress_fence(win); + } + } else { +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & +- (MPIDI_CH4I_ACCU_ORDER_RAW | MPIDI_CH4I_ACCU_ORDER_WAR | MPIDI_CH4I_ACCU_ORDER_WAW)) { ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & ++ (MPIDIG_ACCU_ORDER_RAW | MPIDIG_ACCU_ORDER_WAR | MPIDIG_ACCU_ORDER_WAW)) { + MPIDI_OFI_win_progress_fence(win); + } + } +- return MPIDI_CH4U_mpi_fetch_and_op(origin_addr, result_addr, datatype, +- target_rank, target_disp, op, win); ++ return MPIDIG_mpi_fetch_and_op(origin_addr, result_addr, datatype, target_rank, target_disp, op, ++ win); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_rget +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_rget(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1430,17 +1403,15 @@ static inline int MPIDI_NM_mpi_rget(void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPIR_Win * win, MPIDI_av_entry_t * addr, +- MPIR_Request ** request) ++ MPIR_Win * win, MPIDI_av_entry_t * av, MPIR_Request ** request) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_RGET); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_RGET); + int mpi_errno = MPI_SUCCESS; + + if (!MPIDI_OFI_ENABLE_RMA) { +- mpi_errno = MPIDI_CH4U_mpi_rget(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, +- win, request); ++ mpi_errno = MPIDIG_mpi_rget(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win, request); + goto fn_exit; + } + +@@ -1448,20 +1419,14 @@ static inline int MPIDI_NM_mpi_rget(void *origin_addr, + origin_count, + origin_datatype, + target_rank, +- target_disp, target_count, target_datatype, win, request); ++ target_disp, target_count, target_datatype, win, av, request); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_RGET); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_get_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1472,7 +1437,7 @@ static inline int MPIDI_NM_mpi_get_accumulate(const void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, MPI_Op op, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++ MPIR_Win * win, MPIDI_av_entry_t * av) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DO_GET_ACCUMULATE); +@@ -1485,30 +1450,26 @@ static inline int MPIDI_NM_mpi_get_accumulate(const void *origin_addr, + * over shared memory, or op issues to process-self. + * If disable_shm_accumulate == TRUE is set, then all above ops are issued + * via network thus we can safely use network-based atomics. */ +- !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate || ++ !MPIDIG_WIN(win, info_args).disable_shm_accumulate || + #endif + !MPIDI_OFI_ENABLE_RMA || !MPIDI_OFI_ENABLE_ATOMICS) { +- mpi_errno = MPIDI_CH4U_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win); ++ mpi_errno = MPIDIG_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, ++ result_addr, result_count, result_datatype, ++ target_rank, target_disp, target_count, ++ target_datatype, op, win); + goto fn_exit; + } + + mpi_errno = MPIDI_OFI_do_get_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, NULL); ++ target_datatype, op, win, av, NULL); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DO_GET_ACCUMULATE); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1516,7 +1477,7 @@ static inline int MPIDI_NM_mpi_accumulate(const void *origin_addr, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, MPI_Op op, MPIR_Win * win, +- MPIDI_av_entry_t * addr) ++ MPIDI_av_entry_t * av) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ACCUMULATE); +@@ -1529,12 +1490,11 @@ static inline int MPIDI_NM_mpi_accumulate(const void *origin_addr, + * over shared memory, or op issues to process-self. + * If disable_shm_accumulate == TRUE is set, then all above ops are issued + * via network thus we can safely use network-based atomics. */ +- !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate || ++ !MPIDIG_WIN(win, info_args).disable_shm_accumulate || + #endif + !MPIDI_OFI_ENABLE_RMA || !MPIDI_OFI_ENABLE_ATOMICS) { +- mpi_errno = MPIDI_CH4U_mpi_accumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win); ++ mpi_errno = MPIDIG_mpi_accumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win); + goto fn_exit; + } + +@@ -1542,7 +1502,8 @@ static inline int MPIDI_NM_mpi_accumulate(const void *origin_addr, + origin_count, + origin_datatype, + target_rank, +- target_disp, target_count, target_datatype, op, win, NULL); ++ target_disp, target_count, target_datatype, op, win, av, ++ NULL); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ACCUMULATE); +--- a/src/mpid/ch4/netmod/ofi/ofi_send.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_send.h +@@ -14,10 +14,6 @@ + #include "ofi_impl.h" + #include <../mpi/pt2pt/bsendutil.h> + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_send_lightweight +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_lightweight(const void *buf, + size_t data_sz, + int rank, +@@ -30,7 +26,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_lightweight(const void *buf, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_SEND_LIGHTWEIGHT); + match_bits = MPIDI_OFI_init_sendtag(comm->context_id + context_offset, comm->rank, tag, 0); + mpi_errno = +- MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, buf, data_sz, NULL, comm->rank, ++ MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, buf, data_sz, NULL, comm->rank, + MPIDI_OFI_av_to_phys(addr), match_bits, + NULL, MPIDI_OFI_DO_INJECT, MPIDI_OFI_CALL_LOCK, + MPIDI_OFI_COMM(comm).eagain); +@@ -43,10 +39,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_lightweight(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_send_lightweight_request +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_lightweight_request(const void *buf, + size_t data_sz, + int rank, +@@ -63,7 +55,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_lightweight_request(const void *buf, + MPIDI_OFI_SEND_REQUEST_CREATE_LW_CONDITIONAL(*request); + match_bits = MPIDI_OFI_init_sendtag(comm->context_id + context_offset, comm->rank, tag, 0); + mpi_errno = +- MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, buf, data_sz, NULL, comm->rank, ++ MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, buf, data_sz, NULL, comm->rank, + MPIDI_OFI_av_to_phys(addr), match_bits, + NULL, MPIDI_OFI_DO_INJECT, MPIDI_OFI_CALL_LOCK, + MPIDI_OFI_COMM(comm).eagain); +@@ -90,18 +82,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_lightweight_request(const void *buf, + due to limitations with iovec. Needs to fall back to the pack path. + Other: An error occurred as indicated in the code. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_send_iov +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, ++MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, size_t data_sz, /* data_sz is passed in here for reusing */ + int rank, uint64_t match_bits, MPIR_Comm * comm, +- MPIR_Request * sreq, MPIR_Datatype * dt_ptr) ++ MPIDI_av_entry_t * addr, MPIR_Request * sreq, ++ MPIR_Datatype * dt_ptr) + { + int mpi_errno = MPI_SUCCESS; + struct iovec *originv = NULL, *originv_huge = NULL; +- size_t countp = MPIDI_OFI_count_iov(count, MPIDI_OFI_REQUEST(sreq, datatype), INT64_MAX); +- size_t omax = MPIDI_Global.tx_iov_limit; ++ size_t countp = ++ MPIDI_OFI_count_iov(count, MPIDI_OFI_REQUEST(sreq, datatype), data_sz, INT64_MAX); ++ size_t omax = MPIDI_OFI_global.tx_iov_limit; + size_t o_size = sizeof(struct iovec); + size_t cur_o = 0; + struct fi_msg_tagged msg; +@@ -111,8 +101,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, + size_t oout = 0; + size_t l = 0; + size_t countp_huge = 0; +- MPIR_Segment seg; +- DLOOP_Offset last_byte = dt_ptr->size * count; + size_t iov_align = MPL_MAX(MPIDI_OFI_IOVEC_ALIGN, sizeof(void *)); + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_SEND_IOV); +@@ -124,7 +112,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, + goto pack; + } + +- flags = FI_COMPLETION | (MPIDI_OFI_ENABLE_DATA ? FI_REMOTE_CQ_DATA : 0); ++ flags = FI_COMPLETION | FI_REMOTE_CQ_DATA; + MPIDI_OFI_REQUEST(sreq, event_id) = MPIDI_OFI_EVENT_SEND_NOPACK; + + map_size = dt_ptr->max_contig_blocks * count + 1; +@@ -135,9 +123,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, + MPIDI_OFI_REQUEST(sreq, noncontig.nopack) = MPL_aligned_alloc(iov_align, size, MPL_MEM_BUFFER); + memset(MPIDI_OFI_REQUEST(sreq, noncontig.nopack), 0, size); + +- MPIR_Segment_init(buf, count, MPIDI_OFI_REQUEST(sreq, datatype), &seg); +- MPIR_Segment_pack_vector(&seg, 0, &last_byte, MPIDI_OFI_REQUEST(sreq, noncontig.nopack), +- &num_contig); ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(buf, count, MPIDI_OFI_REQUEST(sreq, datatype), 0, ++ MPIDI_OFI_REQUEST(sreq, noncontig.nopack), num_contig, dt_ptr->size * count, ++ &actual_iov_len, &actual_iov_bytes); ++ num_contig = actual_iov_len; + + originv = &(MPIDI_OFI_REQUEST(sreq, noncontig.nopack[cur_o])); + oout = num_contig; /* num_contig is the actual number of iovecs returned by the Segment_pack_vector function */ +@@ -150,10 +141,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, + /* check if the length of any iovec in the current iovec array exceeds the huge message threshold + * and calculate the total number of iovecs */ + for (j = 0; j < num_contig; j++) { +- if (originv[j].iov_len > MPIDI_Global.max_send) { ++ if (originv[j].iov_len > MPIDI_OFI_global.max_msg_size) { + huge = 1; +- countp_huge += originv[j].iov_len / MPIDI_Global.max_send; +- if (originv[j].iov_len % MPIDI_Global.max_send) { ++ countp_huge += originv[j].iov_len / MPIDI_OFI_global.max_msg_size; ++ if (originv[j].iov_len % MPIDI_OFI_global.max_msg_size) { + countp_huge++; + } + } else { +@@ -173,11 +164,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, + + for (j = 0; j < num_contig; j++) { + l = 0; +- if (originv[j].iov_len > MPIDI_Global.max_send) { ++ if (originv[j].iov_len > MPIDI_OFI_global.max_msg_size) { + while (l < originv[j].iov_len) { + length = originv[j].iov_len - l; +- if (length > MPIDI_Global.max_send) +- length = MPIDI_Global.max_send; ++ if (length > MPIDI_OFI_global.max_msg_size) ++ length = MPIDI_OFI_global.max_msg_size; + originv_huge[k].iov_base = (char *) originv[j].iov_base + l; + originv_huge[k].iov_len = length; + k++; +@@ -212,10 +203,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, + msg.tag = match_bits; + msg.ignore = 0ULL; + msg.context = (void *) &(MPIDI_OFI_REQUEST(sreq, context)); +- msg.data = MPIDI_OFI_ENABLE_DATA ? comm->rank : 0; +- msg.addr = MPIDI_OFI_comm_to_phys(comm, rank); ++ msg.data = comm->rank; ++ msg.addr = MPIDI_OFI_av_to_phys(addr); + +- MPIDI_OFI_CALL_RETRY(fi_tsendmsg(MPIDI_Global.ctx[0].tx, &msg, flags), tsendv, ++ MPIDI_OFI_CALL_RETRY(fi_tsendmsg(MPIDI_OFI_global.ctx[0].tx, &msg, flags), tsendv, + MPIDI_OFI_CALL_LOCK, FALSE); + + fn_exit: +@@ -230,10 +221,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_iov(const void *buf, MPI_Aint count, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_send_normal +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -244,7 +231,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = *request; +- MPI_Aint last; + char *send_buf; + uint64_t match_bits; + +@@ -271,7 +257,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + ssend_match = + MPIDI_OFI_init_recvtag(&ssend_mask, comm->context_id + context_offset, rank, tag); + ssend_match |= MPIDI_OFI_SYNC_SEND_ACK; +- MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_Global.ctx[0].rx, /* endpoint */ ++ MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[0].rx, /* endpoint */ + NULL, /* recvbuf */ + 0, /* data sz */ + NULL, /* memregion descr */ +@@ -285,8 +271,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + send_buf = (char *) buf + dt_true_lb; + + if (!dt_contig) { +- if (MPIDI_OFI_ENABLE_PT2PT_NOPACK && data_sz <= MPIDI_Global.max_send) { +- mpi_errno = MPIDI_OFI_send_iov(buf, count, rank, match_bits, comm, sreq, dt_ptr); ++ if (MPIDI_OFI_ENABLE_PT2PT_NOPACK && data_sz <= MPIDI_OFI_global.max_msg_size) { ++ mpi_errno = ++ MPIDI_OFI_send_iov(buf, count, data_sz, rank, match_bits, comm, addr, sreq, dt_ptr); + if (mpi_errno == MPI_SUCCESS) /* Send posted using iov */ + goto fn_exit; + else if (mpi_errno != MPIDI_OFI_SEND_NEEDS_PACK) +@@ -301,34 +288,32 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + MPIDI_OFI_REQUEST(sreq, event_id) = MPIDI_OFI_EVENT_SEND_PACK; + + MPIDI_OFI_REQUEST(sreq, noncontig.pack) = +- (MPIDI_OFI_pack_t *) MPL_malloc(data_sz + sizeof(MPIR_Segment), MPL_MEM_BUFFER); ++ (MPIDI_OFI_pack_t *) MPL_malloc(data_sz + sizeof(MPIDI_OFI_pack_t), MPL_MEM_BUFFER); + MPIR_ERR_CHKANDJUMP1(MPIDI_OFI_REQUEST(sreq, noncontig.pack) == NULL, mpi_errno, + MPI_ERR_OTHER, "**nomem", "**nomem %s", "Send Pack buffer alloc"); +- size_t segment_first; +- segment_first = 0; +- last = data_sz; + +- MPIR_Segment_init(buf, count, datatype, &MPIDI_OFI_REQUEST(sreq, noncontig.pack->segment)); +- MPIR_Segment_pack(&MPIDI_OFI_REQUEST(sreq, noncontig.pack->segment), segment_first, &last, +- MPIDI_OFI_REQUEST(sreq, noncontig.pack->pack_buffer)); ++ MPI_Aint actual_pack_bytes; ++ MPIR_Typerep_pack(buf, count, datatype, 0, ++ MPIDI_OFI_REQUEST(sreq, noncontig.pack->pack_buffer), data_sz, ++ &actual_pack_bytes); + send_buf = MPIDI_OFI_REQUEST(sreq, noncontig.pack->pack_buffer); + } else { + MPIDI_OFI_REQUEST(sreq, noncontig.pack) = NULL; + MPIDI_OFI_REQUEST(sreq, noncontig.nopack) = NULL; + } + +- if (data_sz <= MPIDI_Global.max_buffered_send) { ++ if (data_sz <= MPIDI_OFI_global.max_buffered_send) { + mpi_errno = +- MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, send_buf, data_sz, NULL, comm->rank, ++ MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, send_buf, data_sz, NULL, comm->rank, + MPIDI_OFI_av_to_phys(addr), + match_bits, NULL, MPIDI_OFI_DO_INJECT, MPIDI_OFI_CALL_LOCK, + FALSE); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + MPIDI_OFI_send_event(NULL, sreq, MPIDI_OFI_REQUEST(sreq, event_id)); +- } else if (data_sz <= MPIDI_Global.max_send) { ++ } else if (data_sz <= MPIDI_OFI_global.max_msg_size) { + mpi_errno = +- MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, send_buf, data_sz, NULL, comm->rank, ++ MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, send_buf, data_sz, NULL, comm->rank, + MPIDI_OFI_av_to_phys(addr), + match_bits, (void *) &(MPIDI_OFI_REQUEST(sreq, context)), + MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, FALSE); +@@ -344,19 +329,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + MPIDI_OFI_REQUEST(sreq, event_id) = MPIDI_OFI_EVENT_SEND_HUGE; + MPIR_cc_incr(sreq->cc_ptr, &c); + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); +- + if (MPIDI_OFI_ENABLE_MR_SCALABLE) { + /* Set up a memory region for the lmt data transfer */ +- ctrl.rma_key = +- MPIDI_OFI_index_allocator_alloc(MPIDI_OFI_COMM(comm).rma_id_allocator, MPL_MEM_RMA); +- MPIR_Assert(ctrl.rma_key < MPIDI_Global.max_huge_rmas); +- rma_key = MPIDI_OFI_rma_key_pack(comm->context_id, MPIDI_OFI_KEY_TYPE_HUGE_RMA, +- ctrl.rma_key); +- ctrl.rma_key = rma_key; ++ ctrl.rma_key = MPIDI_OFI_mr_key_alloc(); ++ rma_key = ctrl.rma_key; + } + +- MPIDI_OFI_CALL_NOLOCK(fi_mr_reg(MPIDI_Global.domain, /* In: Domain Object */ ++ MPIDI_OFI_CALL_NOLOCK(fi_mr_reg(MPIDI_OFI_global.domain, /* In: Domain Object */ + send_buf, /* In: Lower memory address */ + data_sz, /* In: Length */ + FI_REMOTE_READ, /* In: Expose MR for read */ +@@ -367,8 +346,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + NULL), mr_reg); /* In: context */ + + /* Create map to the memory region */ +- MPIDI_CH4U_map_set(MPIDI_OFI_COMM(comm).huge_send_counters, sreq->handle, huge_send_mr, +- MPL_MEM_BUFFER); ++ MPIDIU_map_set(MPIDI_OFI_COMM(comm).huge_send_counters, sreq->handle, huge_send_mr, ++ MPL_MEM_BUFFER); + + if (!MPIDI_OFI_ENABLE_MR_SCALABLE) { + /* MR_BASIC */ +@@ -378,11 +357,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + /* Send the maximum amount of data that we can here to get things + * started, then do the rest using the MR below. This can be confirmed + * in the MPIDI_OFI_get_huge code where we start the offset at +- * MPIDI_Global.max_send */ ++ * MPIDI_OFI_global.max_msg_size */ + MPIDI_OFI_REQUEST(sreq, util_comm) = comm; + MPIDI_OFI_REQUEST(sreq, util_id) = rank; +- mpi_errno = MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, send_buf, +- MPIDI_Global.max_send, ++ mpi_errno = MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, send_buf, ++ MPIDI_OFI_global.max_msg_size, + NULL, + comm->rank, + MPIDI_OFI_av_to_phys(addr), +@@ -398,7 +377,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + /* Send information about the memory region here to get the lmt going. */ + MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_do_control_send + (&ctrl, send_buf, data_sz, rank, comm, sreq, FALSE)); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); + } + + fn_exit: +@@ -408,10 +386,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send_normal(const void *buf, MPI_Aint cou + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, + int rank, int tag, MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * addr, MPIR_Request ** request, +@@ -427,7 +401,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send(const void *buf, MPI_Aint count, MPI + + MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); + +- if (likely(!syncflag && dt_contig && (data_sz <= MPIDI_Global.max_buffered_send))) ++ if (likely(!syncflag && dt_contig && (data_sz <= MPIDI_OFI_global.max_buffered_send))) + if (noreq) + mpi_errno = MPIDI_OFI_send_lightweight((char *) buf + dt_true_lb, data_sz, + rank, tag, comm, context_offset, addr); +@@ -444,10 +418,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_send(const void *buf, MPI_Aint count, MPI + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -457,24 +427,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send(const void *buf, MPI_Aint count, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_SEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_SEND); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { + mpi_errno = + MPIDIG_mpi_send(buf, count, datatype, rank, tag, comm, context_offset, addr, request); +- goto fn_exit; ++ } else ++#endif ++ { ++ mpi_errno = MPIDI_OFI_send(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request, (*request == NULL), 0ULL); + } + +- mpi_errno = MPIDI_OFI_send(buf, count, datatype, rank, tag, comm, +- context_offset, addr, request, (*request == NULL), 0ULL); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_SEND); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ssend(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -484,25 +451,22 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ssend(const void *buf, MPI_Aint count, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_SSEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_SSEND); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { + mpi_errno = + MPIDIG_mpi_ssend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); +- goto fn_exit; ++ } else ++#endif ++ { ++ mpi_errno = MPIDI_OFI_send(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request, 0, MPIDI_OFI_SYNC_SEND); + } + +- mpi_errno = MPIDI_OFI_send(buf, count, datatype, rank, tag, comm, +- context_offset, addr, request, 0, MPIDI_OFI_SYNC_SEND); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_SSEND); + return mpi_errno; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_isend(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -512,24 +476,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_isend(const void *buf, MPI_Aint count, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ISEND); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { + mpi_errno = + MPIDIG_mpi_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); +- goto fn_exit; ++ } else ++#endif ++ { ++ mpi_errno = MPIDI_OFI_send(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request, 0, 0ULL); + } + +- mpi_errno = MPIDI_OFI_send(buf, count, datatype, rank, tag, comm, +- context_offset, addr, request, 0, 0ULL); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ISEND); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_issend(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -539,25 +500,22 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_issend(const void *buf, MPI_Aint count + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISSEND); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ISSEND); + ++#ifdef MPIDI_ENABLE_LEGACY_OFI + if (!MPIDI_OFI_ENABLE_TAGGED) { + mpi_errno = + MPIDIG_mpi_issend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); +- goto fn_exit; ++ } else ++#endif ++ { ++ mpi_errno = MPIDI_OFI_send(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request, 0, MPIDI_OFI_SYNC_SEND); + } + +- mpi_errno = MPIDI_OFI_send(buf, count, datatype, rank, tag, comm, +- context_offset, addr, request, 0, MPIDI_OFI_SYNC_SEND); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ISSEND); + return mpi_errno; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_send_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -569,16 +527,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send_init(const void *buf, int count, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_SEND_INIT); + + mpi_errno = +- MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_SEND_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ssend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ssend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -590,16 +544,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ssend_init(const void *buf, int count, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_SSEND_INIT); + + mpi_errno = +- MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_SSEND_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_bsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bsend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -611,16 +561,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bsend_init(const void *buf, int count, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_BSEND_INIT); + + mpi_errno = +- MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_BSEND_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_rsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rsend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -632,15 +578,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rsend_init(const void *buf, int count, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_RSEND_INIT); + + mpi_errno = +- MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_RSEND_INIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_cancel_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_send(MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/ofi_spawn.c +@@ -0,0 +1,818 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ofi_impl.h" ++#include "ofi_noinline.h" ++ ++#define PORT_NAME_TAG_KEY "tag" ++#define CONNENTR_TAG_KEY "connentry" ++ ++#define DYNPROC_RECEIVER 0 ++#define DYNPROC_SENDER 1 ++ ++static void free_port_name_tag(int tag); ++static int get_port_name_tag(int *port_name_tag); ++static int get_tag_from_port(const char *port_name, int *port_name_tag); ++static int get_conn_name_from_port(const char *port_name, char *connname); ++static int dynproc_create_intercomm(const char *port_name, int remote_size, int *remote_lupids, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm, int is_low_group, ++ int get_tag, char *api); ++static int dynproc_handshake(int root, int phase, int timeout, int port_id, fi_addr_t * conn, ++ MPIR_Comm * comm_ptr); ++static int dynproc_exchange_map(int root, int phase, int port_id, fi_addr_t * conn, char *conname, ++ MPIR_Comm * comm_ptr, int *out_root, int *remote_size, ++ size_t ** remote_upid_size, char **remote_upids, ++ int **remote_node_ids); ++static int conn_manager_insert_conn(fi_addr_t conn, int rank, int state); ++ ++static void free_port_name_tag(int tag) ++{ ++ int idx, rem_tag; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_FREE_PORT_NAME_TAG); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_FREE_PORT_NAME_TAG); ++ ++ idx = tag / (sizeof(int) * 8); ++ rem_tag = tag - (idx * sizeof(int) * 8); ++ ++ MPIDI_OFI_global.port_name_tag_mask[idx] &= ~(1 << ((8 * sizeof(int)) - 1 - rem_tag)); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_FREE_PORT_NAME_TAG); ++} ++ ++static int get_port_name_tag(int *port_name_tag) ++{ ++ unsigned i, j; ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_GET_PORT_NAME_TAG); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_GET_PORT_NAME_TAG); ++ ++ for (i = 0; i < MPIR_MAX_CONTEXT_MASK; i++) ++ if (MPIDI_OFI_global.port_name_tag_mask[i] != ~0) ++ break; ++ ++ if (i < MPIR_MAX_CONTEXT_MASK) ++ for (j = 0; j < (8 * sizeof(int)); j++) { ++ if ((MPIDI_OFI_global.port_name_tag_mask[i] | (1 << ((8 * sizeof(int)) - j - 1))) != ++ MPIDI_OFI_global.port_name_tag_mask[i]) { ++ MPIDI_OFI_global.port_name_tag_mask[i] |= (1 << ((8 * sizeof(int)) - j - 1)); ++ *port_name_tag = ((i * 8 * sizeof(int)) + j); ++ goto fn_exit; ++ } ++ } else ++ goto fn_fail; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_GET_PORT_NAME_TAG); ++ return mpi_errno; ++ ++ fn_fail: ++ *port_name_tag = -1; ++ mpi_errno = MPI_ERR_OTHER; ++ goto fn_exit; ++} ++ ++static int get_tag_from_port(const char *port_name, int *port_name_tag) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int str_errno = MPL_STR_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_GET_TAG_FROM_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_GET_TAG_FROM_PORT); ++ ++ if (strlen(port_name) == 0) ++ goto fn_exit; ++ ++ str_errno = MPL_str_get_int_arg(port_name, PORT_NAME_TAG_KEY, port_name_tag); ++ MPIR_ERR_CHKANDJUMP(str_errno, mpi_errno, MPI_ERR_OTHER, "**argstr_no_port_name_tag"); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_GET_TAG_FROM_PORT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int get_conn_name_from_port(const char *port_name, char *connname) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int maxlen = MPIDI_KVSAPPSTRLEN; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_GET_CONN_NAME_FROM_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_GET_CONN_NAME_FROM_PORT); ++ ++ MPL_str_get_binary_arg(port_name, CONNENTR_TAG_KEY, connname, MPIDI_OFI_global.addrnamelen, ++ &maxlen); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_GET_CONN_NAME_FROM_PORT); ++ return mpi_errno; ++} ++ ++static int dynproc_create_intercomm(const char *port_name, int remote_size, int *remote_lupids, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm, int is_low_group, ++ int get_tag, char *api) ++{ ++ int context_id_offset, mpi_errno = MPI_SUCCESS; ++ MPIR_Comm *tmp_comm_ptr = NULL; ++ int i = 0; ++ MPIDI_rank_map_mlut_t *mlut = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_CREATE_INTERCOMM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_CREATE_INTERCOMM); ++ ++ if (get_tag) { ++ MPIDI_OFI_MPI_CALL_POP(get_tag_from_port(port_name, &context_id_offset)); ++ } ++ MPIDI_OFI_MPI_CALL_POP(MPIR_Comm_create(&tmp_comm_ptr)); ++ ++ tmp_comm_ptr->context_id = MPIR_CONTEXT_SET_FIELD(DYNAMIC_PROC, context_id_offset, 1); ++ tmp_comm_ptr->recvcontext_id = tmp_comm_ptr->context_id; ++ tmp_comm_ptr->remote_size = remote_size; ++ tmp_comm_ptr->local_size = comm_ptr->local_size; ++ tmp_comm_ptr->pof2 = comm_ptr->pof2; ++ tmp_comm_ptr->rank = comm_ptr->rank; ++ tmp_comm_ptr->comm_kind = MPIR_COMM_KIND__INTERCOMM; ++ tmp_comm_ptr->local_comm = comm_ptr; ++ tmp_comm_ptr->is_low_group = is_low_group; ++ ++ /* handle local group */ ++ /* No ref changes to LUT/MLUT in this step because the localcomm will not ++ * be released in the normal way */ ++ MPIDI_COMM(tmp_comm_ptr, local_map).mode = MPIDI_COMM(comm_ptr, map).mode; ++ MPIDI_COMM(tmp_comm_ptr, local_map).size = MPIDI_COMM(comm_ptr, map).size; ++ MPIDI_COMM(tmp_comm_ptr, local_map).avtid = MPIDI_COMM(comm_ptr, map).avtid; ++ switch (MPIDI_COMM(comm_ptr, map).mode) { ++ case MPIDI_RANK_MAP_DIRECT: ++ case MPIDI_RANK_MAP_DIRECT_INTRA: ++ break; ++ case MPIDI_RANK_MAP_OFFSET: ++ case MPIDI_RANK_MAP_OFFSET_INTRA: ++ MPIDI_COMM(tmp_comm_ptr, local_map).reg.offset = MPIDI_COMM(comm_ptr, map).reg.offset; ++ break; ++ case MPIDI_RANK_MAP_STRIDE: ++ case MPIDI_RANK_MAP_STRIDE_INTRA: ++ case MPIDI_RANK_MAP_STRIDE_BLOCK: ++ case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: ++ MPIDI_COMM(tmp_comm_ptr, local_map).reg.stride.stride = ++ MPIDI_COMM(comm_ptr, map).reg.stride.stride; ++ MPIDI_COMM(tmp_comm_ptr, local_map).reg.stride.blocksize = ++ MPIDI_COMM(comm_ptr, map).reg.stride.blocksize; ++ MPIDI_COMM(tmp_comm_ptr, local_map).reg.stride.offset = ++ MPIDI_COMM(comm_ptr, map).reg.stride.offset; ++ break; ++ case MPIDI_RANK_MAP_LUT: ++ case MPIDI_RANK_MAP_LUT_INTRA: ++ MPIDI_COMM(tmp_comm_ptr, local_map).irreg.lut.t = MPIDI_COMM(comm_ptr, map).irreg.lut.t; ++ MPIDI_COMM(tmp_comm_ptr, local_map).irreg.lut.lpid = ++ MPIDI_COMM(comm_ptr, map).irreg.lut.lpid; ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ MPIDI_COMM(tmp_comm_ptr, local_map).irreg.mlut.t = ++ MPIDI_COMM(comm_ptr, map).irreg.mlut.t; ++ MPIDI_COMM(tmp_comm_ptr, local_map).irreg.mlut.gpid = ++ MPIDI_COMM(comm_ptr, map).irreg.mlut.gpid; ++ break; ++ case MPIDI_RANK_MAP_NONE: ++ MPIR_Assert(0); ++ break; ++ } ++ ++ /* set mapping for remote group */ ++ mpi_errno = MPIDIU_alloc_mlut(&mlut, remote_size); ++ if (mpi_errno) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ MPIDI_COMM(tmp_comm_ptr, map).mode = MPIDI_RANK_MAP_MLUT; ++ MPIDI_COMM(tmp_comm_ptr, map).size = remote_size; ++ MPIDI_COMM(tmp_comm_ptr, map).avtid = -1; ++ MPIDI_COMM(tmp_comm_ptr, map).irreg.mlut.t = mlut; ++ MPIDI_COMM(tmp_comm_ptr, map).irreg.mlut.gpid = mlut->gpid; ++ for (i = 0; i < remote_size; ++i) { ++ MPIDI_COMM(tmp_comm_ptr, map).irreg.mlut.gpid[i].avtid = ++ MPIDIU_LUPID_GET_AVTID(remote_lupids[i]); ++ MPIDI_COMM(tmp_comm_ptr, map).irreg.mlut.gpid[i].lpid = ++ MPIDIU_LUPID_GET_LPID(remote_lupids[i]); ++ } ++ ++ MPIR_Comm_commit(tmp_comm_ptr); ++ ++ MPIDI_OFI_MPI_CALL_POP(MPIR_Comm_dup_impl(tmp_comm_ptr, newcomm)); ++ ++ tmp_comm_ptr->local_comm = NULL; /* avoid freeing local comm with comm_release */ ++ MPIR_Comm_release(tmp_comm_ptr); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_CREATE_INTERCOMM); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int dynproc_handshake(int root, int phase, int timeout, int port_id, fi_addr_t * conn, ++ MPIR_Comm * comm_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_OFI_dynamic_process_request_t req; ++ uint64_t match_bits = 0; ++ uint64_t mask_bits = 0; ++ struct fi_msg_tagged msg; ++ int buf = 0; ++ MPID_Time_t time_sta, time_now; ++ double time_gap; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_HANDSHAKE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_HANDSHAKE); ++ ++ /* connector */ ++ if (phase == 0) { ++ req.done = MPIDI_OFI_PEEK_START; ++ req.event_id = MPIDI_OFI_EVENT_ACCEPT_PROBE; ++ match_bits = MPIDI_OFI_init_recvtag(&mask_bits, port_id, MPI_ANY_SOURCE, MPI_ANY_TAG); ++ match_bits |= MPIDI_OFI_DYNPROC_SEND; ++ ++ msg.msg_iov = NULL; ++ msg.desc = NULL; ++ msg.iov_count = 0; ++ msg.addr = FI_ADDR_UNSPEC; ++ msg.tag = match_bits; ++ msg.ignore = mask_bits; ++ msg.context = (void *) &req.context; ++ msg.data = 0; ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "connecting port_id %d, conn %" PRIu64 ++ ", waiting for dynproc_handshake", port_id, *conn)); ++ time_gap = 0.0; ++ MPID_Wtime(&time_sta); ++ while (req.done != MPIDI_OFI_PEEK_FOUND) { ++ req.done = MPIDI_OFI_PEEK_START; ++ MPIDI_OFI_CALL(fi_trecvmsg ++ (MPIDI_OFI_global.ctx[0].rx, &msg, ++ FI_PEEK | FI_COMPLETION | FI_REMOTE_CQ_DATA), trecv); ++ do { ++ mpi_errno = MPID_Progress_test(); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPID_Wtime(&time_now); ++ MPID_Wtime_diff(&time_sta, &time_now, &time_gap); ++ } while (req.done == MPIDI_OFI_PEEK_START && (int) time_gap < timeout); ++ if ((int) time_gap >= timeout) { ++ /* connection is timed out */ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "connection to port_id %d, conn %" PRIu64 " ack timed out", ++ port_id, *conn)); ++ mpi_errno = MPI_ERR_PORT; ++ goto fn_fail; ++ } ++ } ++ ++ req.done = 0; ++ req.event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ ++ MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[0].rx, ++ &buf, ++ sizeof(int), ++ NULL, ++ *conn, ++ match_bits, ++ mask_bits, &req.context), trecv, MPIDI_OFI_CALL_LOCK, FALSE); ++ time_gap = 0.0; ++ MPID_Wtime(&time_sta); ++ do { ++ mpi_errno = MPID_Progress_test(); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPID_Wtime(&time_now); ++ MPID_Wtime_diff(&time_sta, &time_now, &time_gap); ++ } while (!req.done && (int) time_gap < timeout); ++ if ((int) time_gap >= timeout) { ++ /* connection is mismatched */ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, ++ "connection to port_id %d, conn %" PRIu64 " ack mismatched", port_id, ++ *conn)); ++ mpi_errno = MPI_ERR_PORT; ++ goto fn_fail; ++ } ++ } ++ ++ /* acceptor */ ++ if (phase == 1) { ++ int tag = root; ++ ++ match_bits = MPIDI_OFI_init_sendtag(port_id, comm_ptr->rank, tag, MPIDI_OFI_DYNPROC_SEND); ++ ++ req.done = 0; ++ req.event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ mpi_errno = MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, ++ &buf, ++ sizeof(int), ++ NULL, ++ comm_ptr->rank, ++ *conn, ++ match_bits, ++ (void *) &req.context, ++ MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, FALSE); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDI_OFI_PROGRESS_WHILE(!req.done); ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_HANDSHAKE); ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int dynproc_exchange_map(int root, int phase, int port_id, fi_addr_t * conn, char *conname, ++ MPIR_Comm * comm_ptr, int *out_root, int *remote_size, ++ size_t ** remote_upid_size, char **remote_upids, ++ int **remote_node_ids) ++{ ++ int i, mpi_errno = MPI_SUCCESS; ++ ++ MPIDI_OFI_dynamic_process_request_t req[3]; ++ uint64_t match_bits = 0; ++ uint64_t mask_bits = 0; ++ struct fi_msg_tagged msg; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_EXCHANGE_MAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_EXCHANGE_MAP); ++ ++ MPIR_CHKPMEM_DECL(3); ++ ++ req[0].done = MPIDI_OFI_PEEK_START; ++ req[0].event_id = MPIDI_OFI_EVENT_ACCEPT_PROBE; ++ match_bits = MPIDI_OFI_init_recvtag(&mask_bits, port_id, MPI_ANY_SOURCE, MPI_ANY_TAG); ++ match_bits |= MPIDI_OFI_DYNPROC_SEND; ++ ++ if (phase == 0) { ++ size_t remote_upid_recvsize = 0; ++ ++ /* Receive the addresses */ ++ /* We don't know the size, so probe for table size */ ++ /* Receive phase updates the connection */ ++ /* With the probed address */ ++ msg.msg_iov = NULL; ++ msg.desc = NULL; ++ msg.iov_count = 0; ++ msg.addr = FI_ADDR_UNSPEC; ++ msg.tag = match_bits; ++ msg.ignore = mask_bits; ++ msg.context = (void *) &req[0].context; ++ msg.data = 0; ++ ++ while (req[0].done != MPIDI_OFI_PEEK_FOUND) { ++ req[0].done = MPIDI_OFI_PEEK_START; ++ MPIDI_OFI_CALL(fi_trecvmsg ++ (MPIDI_OFI_global.ctx[0].rx, &msg, ++ FI_PEEK | FI_COMPLETION | FI_REMOTE_CQ_DATA), trecv); ++ MPIDI_OFI_PROGRESS_WHILE(req[0].done == MPIDI_OFI_PEEK_START); ++ } ++ ++ *remote_size = req[0].msglen / sizeof(size_t); ++ *out_root = req[0].tag; ++ MPIR_CHKPMEM_MALLOC((*remote_upid_size), size_t *, ++ (*remote_size) * sizeof(size_t), mpi_errno, "remote_upid_size", ++ MPL_MEM_ADDRESS); ++ MPIR_CHKPMEM_MALLOC((*remote_node_ids), int *, (*remote_size) * sizeof(int), mpi_errno, ++ "remote_node_ids", MPL_MEM_ADDRESS); ++ ++ req[0].done = 0; ++ req[0].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ req[1].done = 0; ++ req[1].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ req[2].done = 0; ++ req[2].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ ++ MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[0].rx, ++ *remote_upid_size, ++ (*remote_size) * sizeof(size_t), ++ NULL, ++ FI_ADDR_UNSPEC, ++ match_bits, ++ mask_bits, &req[0].context), trecv, MPIDI_OFI_CALL_LOCK, ++ FALSE); ++ MPIDI_OFI_PROGRESS_WHILE(!req[0].done); ++ ++ for (i = 0; i < (*remote_size); i++) ++ remote_upid_recvsize += (*remote_upid_size)[i]; ++ MPIR_CHKPMEM_MALLOC((*remote_upids), char *, remote_upid_recvsize, ++ mpi_errno, "remote_upids", MPL_MEM_ADDRESS); ++ ++ MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[0].rx, ++ *remote_upids, ++ remote_upid_recvsize, ++ NULL, ++ FI_ADDR_UNSPEC, ++ match_bits, ++ mask_bits, &req[1].context), trecv, MPIDI_OFI_CALL_LOCK, ++ FALSE); ++ ++ MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[0].rx, ++ *remote_node_ids, ++ (*remote_size) * sizeof(int), ++ NULL, ++ FI_ADDR_UNSPEC, ++ match_bits, ++ mask_bits, &req[2].context), trecv, MPIDI_OFI_CALL_LOCK, ++ FALSE); ++ ++ MPIDI_OFI_PROGRESS_WHILE(!req[1].done || !req[2].done); ++ size_t disp = 0; ++ for (i = 0; i < req[0].source; i++) ++ disp += (*remote_upid_size)[i]; ++ memcpy(conname, *remote_upids + disp, (*remote_upid_size)[req[0].source]); ++ MPIR_CHKPMEM_COMMIT(); ++ } ++ ++ if (phase == 1) { ++ /* Send our table to the child */ ++ /* Send phase maps the entry */ ++ int tag = root; ++ int local_size = comm_ptr->local_size; ++ size_t *local_upid_size = NULL; ++ size_t local_upid_sendsize = 0; ++ char *local_upids = NULL; ++ int *local_node_ids = NULL; ++ ++ /* Step 1: get local upids (with size) and node ids for sending */ ++ MPIDI_NM_get_local_upids(comm_ptr, &local_upid_size, &local_upids); ++ for (i = 0; i < local_size; i++) ++ local_upid_sendsize += local_upid_size[i]; ++ local_node_ids = (int *) MPL_malloc(local_size * sizeof(int), MPL_MEM_ADDRESS); ++ for (i = 0; i < comm_ptr->local_size; i++) ++ MPIDIU_get_node_id(comm_ptr, i, &local_node_ids[i]); ++ ++ match_bits = MPIDI_OFI_init_sendtag(port_id, comm_ptr->rank, tag, MPIDI_OFI_DYNPROC_SEND); ++ ++ /* fi_av_map here is not quite right for some providers */ ++ /* we need to get this connection from the sockname */ ++ req[0].done = 0; ++ req[0].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ req[1].done = 0; ++ req[1].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ req[2].done = 0; ++ req[2].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; ++ mpi_errno = MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, ++ local_upid_size, ++ local_size * sizeof(size_t), ++ NULL, ++ comm_ptr->rank, ++ *conn, ++ match_bits, ++ (void *) &req[0].context, ++ MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, FALSE); ++ if (mpi_errno) { ++ MPL_free(local_upid_size); ++ MPL_free(local_upids); ++ MPL_free(local_node_ids); ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, ++ local_upids, ++ local_upid_sendsize, ++ NULL, ++ comm_ptr->rank, ++ *conn, ++ match_bits, ++ (void *) &req[1].context, MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, ++ FALSE); ++ MPIDI_OFI_send_handler(MPIDI_OFI_global.ctx[0].tx, local_node_ids, local_size * sizeof(int), ++ NULL, comm_ptr->rank, *conn, match_bits, (void *) &req[2].context, ++ MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, FALSE); ++ ++ MPIDI_OFI_PROGRESS_WHILE(!req[0].done || !req[1].done || !req[2].done); ++ ++ MPL_free(local_upid_size); ++ MPL_free(local_upids); ++ MPL_free(local_node_ids); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_EXCHANGE_MAP); ++ return mpi_errno; ++ fn_fail: ++ MPIR_CHKPMEM_REAP(); ++ goto fn_exit; ++} ++ ++static int conn_manager_insert_conn(fi_addr_t conn, int rank, int state) ++{ ++ int conn_id = -1; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INSERT_CONN); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INSERT_CONN); ++ ++ /* We've run out of space in the connection table. Allocate more. */ ++ if (MPIDI_OFI_global.conn_mgr.next_conn_id == -1) { ++ int old_max, new_max, i; ++ old_max = MPIDI_OFI_global.conn_mgr.max_n_conn; ++ new_max = old_max + 1; ++ MPIDI_OFI_global.conn_mgr.free_conn_id = ++ (int *) MPL_realloc(MPIDI_OFI_global.conn_mgr.free_conn_id, new_max * sizeof(int), ++ MPL_MEM_ADDRESS); ++ for (i = old_max; i < new_max - 1; ++i) { ++ MPIDI_OFI_global.conn_mgr.free_conn_id[i] = i + 1; ++ } ++ MPIDI_OFI_global.conn_mgr.free_conn_id[new_max - 1] = -1; ++ MPIDI_OFI_global.conn_mgr.max_n_conn = new_max; ++ MPIDI_OFI_global.conn_mgr.next_conn_id = old_max; ++ } ++ ++ conn_id = MPIDI_OFI_global.conn_mgr.next_conn_id; ++ MPIDI_OFI_global.conn_mgr.next_conn_id = MPIDI_OFI_global.conn_mgr.free_conn_id[conn_id]; ++ MPIDI_OFI_global.conn_mgr.free_conn_id[conn_id] = -1; ++ MPIDI_OFI_global.conn_mgr.n_conn++; ++ ++ MPIR_Assert(MPIDI_OFI_global.conn_mgr.n_conn <= MPIDI_OFI_global.conn_mgr.max_n_conn); ++ ++ MPIDI_OFI_global.conn_mgr.conn_list[conn_id].dest = conn; ++ MPIDI_OFI_global.conn_mgr.conn_list[conn_id].rank = rank; ++ MPIDI_OFI_global.conn_mgr.conn_list[conn_id].state = state; ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, " new_conn_id=%d for conn=%" PRIu64 " rank=%d state=%d", ++ conn_id, conn, rank, MPIDI_OFI_global.conn_mgr.conn_list[conn_id].state)); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_CONN_MANAGER_INSERT_CONN); ++ return conn_id; ++} ++ ++int MPIDI_OFI_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm) ++{ ++ int mpi_errno = MPI_SUCCESS, root_errno = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ int remote_size = 0; ++ size_t *remote_upid_size = NULL; ++ char *remote_upids = NULL; ++ int *remote_lupids = NULL; ++ int *remote_node_ids = NULL; ++ int is_low_group = -1; ++ int parent_root = -1; ++ int rank = comm_ptr->rank; ++ int port_id; ++ int conn_id; ++ int get_tag = 1; ++ fi_addr_t conn; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_COMM_CONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_COMM_CONNECT); ++ ++ MPIR_CHKLMEM_DECL(1); ++ ++ if (!MPIDI_OFI_ENABLE_TAGGED) { ++ MPIR_Assert(0); ++ goto fn_exit; ++ } ++ ++ MPIDI_OFI_MPI_CALL_POP(get_tag_from_port(port_name, &port_id)); ++ ++ if (rank == root) { ++ char conname[FI_NAME_MAX]; ++ MPIDI_OFI_MPI_CALL_POP(get_conn_name_from_port(port_name, conname)); ++ MPIDI_OFI_CALL(fi_av_insert(MPIDI_OFI_global.av, conname, 1, &conn, 0ULL, NULL), avmap); ++ MPIDI_OFI_MPI_CALL_POP(dynproc_exchange_map ++ (root, DYNPROC_SENDER, port_id, &conn, conname, comm_ptr, ++ &parent_root, &remote_size, &remote_upid_size, &remote_upids, ++ &remote_node_ids)); ++ mpi_errno = dynproc_handshake(root, DYNPROC_RECEIVER, timeout, port_id, &conn, comm_ptr); ++ if (mpi_errno == MPI_ERR_PORT || mpi_errno == MPI_SUCCESS) { ++ root_errno = mpi_errno; ++ mpi_errno = MPIR_Bcast_intra_auto(&root_errno, 1, MPI_INT, root, comm_ptr, &errflag); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ if (root_errno != MPI_SUCCESS) { ++ mpi_errno = root_errno; ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } else { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ MPIDI_OFI_MPI_CALL_POP(dynproc_exchange_map ++ (root, DYNPROC_RECEIVER, port_id, &conn, conname, comm_ptr, ++ &parent_root, &remote_size, &remote_upid_size, &remote_upids, ++ &remote_node_ids)); ++ MPIR_CHKLMEM_MALLOC(remote_lupids, int *, remote_size * sizeof(int), mpi_errno, ++ "remote_lupids", MPL_MEM_ADDRESS); ++ ++ MPIDIU_upids_to_lupids(remote_size, remote_upid_size, remote_upids, &remote_lupids, ++ remote_node_ids); ++ /* the child comm group is alawys the low group */ ++ is_low_group = 0; ++ } ++ ++ if (rank != root) { ++ mpi_errno = MPIR_Bcast_intra_auto(&root_errno, 1, MPI_INT, root, comm_ptr, &errflag); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ if (root_errno != MPI_SUCCESS) { ++ mpi_errno = root_errno; ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } ++ ++ /* broadcast the upids to local groups */ ++ MPIDI_OFI_MPI_CALL_POP(MPIDIU_Intercomm_map_bcast_intra(comm_ptr, root, ++ &remote_size, &is_low_group, 0, ++ remote_upid_size, ++ remote_upids, ++ &remote_lupids, remote_node_ids)); ++ if (rank == root) { ++ MPL_free(remote_upid_size); ++ MPL_free(remote_upids); ++ MPL_free(remote_node_ids); ++ } ++ ++ /* Now Create the New Intercomm */ ++ MPIDI_OFI_MPI_CALL_POP(dynproc_create_intercomm(port_name, remote_size, remote_lupids, ++ comm_ptr, newcomm, is_low_group, ++ get_tag, (char *) "Connect")); ++ if (rank == root) { ++ conn_id = conn_manager_insert_conn(conn, (*newcomm)->rank, ++ MPIDI_OFI_DYNPROC_CONNECTED_CHILD); ++ MPIDI_OFI_COMM(*newcomm).conn_id = conn_id; ++ } ++ MPIDI_OFI_MPI_CALL_POP(MPIR_Barrier_intra_auto(comm_ptr, &errflag)); ++ fn_exit: ++ if (rank == root) { ++ MPIR_CHKLMEM_FREEALL(); ++ } else { ++ MPL_free(remote_lupids); ++ } ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_COMM_CONNECT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_COMM_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_COMM_DISCONNECT); ++ ++ MPIDI_OFI_MPI_CALL_POP(MPIR_Comm_free_impl(comm_ptr)); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_COMM_DISCONNECT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int str_errno = MPL_STR_SUCCESS; ++ int port_name_tag = 0; ++ int len = MPI_MAX_PORT_NAME; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_OPEN_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_OPEN_PORT); ++ ++ if (!MPIDI_OFI_ENABLE_TAGGED) { ++ MPIR_Assert(0); ++ goto fn_exit; ++ } ++ ++ MPIDI_OFI_MPI_CALL_POP(get_port_name_tag(&port_name_tag)); ++ MPIDI_OFI_STR_CALL(MPL_str_add_int_arg(&port_name, &len, PORT_NAME_TAG_KEY, port_name_tag), ++ port_str); ++ MPIDI_OFI_STR_CALL(MPL_str_add_binary_arg(&port_name, &len, CONNENTR_TAG_KEY, ++ MPIDI_OFI_global.addrname, ++ MPIDI_OFI_global.addrnamelen), port_str); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_OPEN_PORT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_close_port(const char *port_name) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int port_name_tag; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_CLOSE_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_CLOSE_PORT); ++ ++ if (!MPIDI_OFI_ENABLE_TAGGED) { ++ MPIR_Assert(0); ++ goto fn_exit; ++ } ++ ++ mpi_errno = get_tag_from_port(port_name, &port_name_tag); ++ free_port_name_tag(port_name_tag); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_CLOSE_PORT); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ int remote_size = 0; ++ size_t *remote_upid_size = 0; ++ char *remote_upids = NULL; ++ int *remote_lupids = NULL; ++ int *remote_node_ids = NULL; ++ int child_root = -1; ++ int is_low_group = -1; ++ int conn_id; ++ fi_addr_t conn = -1; ++ int rank = comm_ptr->rank; ++ int get_tag = -1; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_COMM_ACCEPT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_COMM_ACCEPT); ++ ++ MPIR_CHKLMEM_DECL(1); ++ ++ if (!MPIDI_OFI_ENABLE_TAGGED) { ++ MPIR_Assert(0); ++ goto fn_exit; ++ } ++ ++ if (rank == root) { ++ char conname[FI_NAME_MAX]; ++ int port_id; ++ ++ MPIDI_OFI_MPI_CALL_POP(get_tag_from_port(port_name, &port_id)); ++ MPIDI_OFI_MPI_CALL_POP(dynproc_exchange_map ++ (root, DYNPROC_RECEIVER, port_id, &conn, conname, comm_ptr, ++ &child_root, &remote_size, &remote_upid_size, &remote_upids, ++ &remote_node_ids)); ++ MPIDI_OFI_CALL(fi_av_insert(MPIDI_OFI_global.av, conname, 1, &conn, 0ULL, NULL), avmap); ++ MPIDI_OFI_MPI_CALL_POP(dynproc_handshake ++ (root, DYNPROC_SENDER, 0, port_id, &conn, comm_ptr)); ++ MPIDI_OFI_MPI_CALL_POP(dynproc_exchange_map ++ (root, DYNPROC_SENDER, port_id, &conn, conname, comm_ptr, ++ &child_root, &remote_size, &remote_upid_size, &remote_upids, ++ &remote_node_ids)); ++ MPIR_CHKLMEM_MALLOC(remote_lupids, int *, remote_size * sizeof(int), ++ mpi_errno, "remote_lupids", MPL_MEM_ADDRESS); ++ MPIDIU_upids_to_lupids(remote_size, remote_upid_size, remote_upids, &remote_lupids, ++ remote_node_ids); ++ /* the parent comm group is alawys the low group */ ++ is_low_group = 1; ++ } ++ ++ /* broadcast the upids to local groups */ ++ MPIDI_OFI_MPI_CALL_POP(MPIDIU_Intercomm_map_bcast_intra(comm_ptr, root, ++ &remote_size, &is_low_group, 0, ++ remote_upid_size, ++ remote_upids, ++ &remote_lupids, remote_node_ids)); ++ if (rank == root) { ++ MPL_free(remote_upid_size); ++ MPL_free(remote_upids); ++ MPL_free(remote_node_ids); ++ ++ get_tag = 1; ++ } else { ++ get_tag = 0; ++ } ++ ++ /* Now Create the New Intercomm */ ++ MPIDI_OFI_MPI_CALL_POP(dynproc_create_intercomm(port_name, remote_size, remote_lupids, comm_ptr, ++ newcomm, is_low_group, get_tag, ++ (char *) "Connect")); ++ if (rank == root) { ++ conn_id = conn_manager_insert_conn(conn, (*newcomm)->rank, ++ MPIDI_OFI_DYNPROC_CONNECTED_PARENT); ++ MPIDI_OFI_COMM(*newcomm).conn_id = conn_id; ++ } ++ MPIDI_OFI_MPI_CALL_POP(MPIR_Barrier_intra_auto(comm_ptr, &errflag)); ++ fn_exit: ++ if (rank == root) { ++ MPIR_CHKLMEM_FREEALL(); ++ } else { ++ MPL_free(remote_lupids); ++ } ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_COMM_ACCEPT); ++ return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ofi/ofi_spawn.h ++++ /dev/null +@@ -1,810 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef OFI_SPAWN_H_INCLUDED +-#define OFI_SPAWN_H_INCLUDED +- +-#include "ofi_impl.h" +- +-#define MPIDI_OFI_PORT_NAME_TAG_KEY "tag" +-#define MPIDI_OFI_CONNENTRY_TAG_KEY "connentry" +- +-#define MPIDI_OFI_DYNPROC_RECEIVER 0 +-#define MPIDI_OFI_DYNPROC_SENDER 1 +- +-static inline void MPIDI_OFI_free_port_name_tag(int tag) +-{ +- int index, rem_tag; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_FREE_PORT_NAME_TAG); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_FREE_PORT_NAME_TAG); +- +- index = tag / (sizeof(int) * 8); +- rem_tag = tag - (index * sizeof(int) * 8); +- +- MPIDI_Global.port_name_tag_mask[index] &= ~(1 << ((8 * sizeof(int)) - 1 - rem_tag)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_FREE_PORT_NAME_TAG); +-} +- +- +-static inline int MPIDI_OFI_get_port_name_tag(int *port_name_tag) +-{ +- unsigned i, j; +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_GET_PORT_NAME_TAG); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_GET_PORT_NAME_TAG); +- +- for (i = 0; i < MPIR_MAX_CONTEXT_MASK; i++) +- if (MPIDI_Global.port_name_tag_mask[i] != ~0) +- break; +- +- if (i < MPIR_MAX_CONTEXT_MASK) +- for (j = 0; j < (8 * sizeof(int)); j++) { +- if ((MPIDI_Global.port_name_tag_mask[i] | (1 << ((8 * sizeof(int)) - j - 1))) != +- MPIDI_Global.port_name_tag_mask[i]) { +- MPIDI_Global.port_name_tag_mask[i] |= (1 << ((8 * sizeof(int)) - j - 1)); +- *port_name_tag = ((i * 8 * sizeof(int)) + j); +- goto fn_exit; +- } +- } else +- goto fn_fail; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_GET_PORT_NAME_TAG); +- return mpi_errno; +- +- fn_fail: +- *port_name_tag = -1; +- mpi_errno = MPI_ERR_OTHER; +- goto fn_exit; +-} +- +-static inline int MPIDI_OFI_get_tag_from_port(const char *port_name, int *port_name_tag) +-{ +- int mpi_errno = MPI_SUCCESS; +- int str_errno = MPL_STR_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_GET_TAG_FROM_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_GET_TAG_FROM_PORT); +- +- if (strlen(port_name) == 0) +- goto fn_exit; +- +- str_errno = MPL_str_get_int_arg(port_name, MPIDI_OFI_PORT_NAME_TAG_KEY, port_name_tag); +- MPIR_ERR_CHKANDJUMP(str_errno, mpi_errno, MPI_ERR_OTHER, "**argstr_no_port_name_tag"); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_GET_TAG_FROM_PORT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-static inline int MPIDI_OFI_get_conn_name_from_port(const char *port_name, char *connname) +-{ +- int mpi_errno = MPI_SUCCESS; +- int maxlen = MPIDI_KVSAPPSTRLEN; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_GET_CONN_NAME_FROM_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_GET_CONN_NAME_FROM_PORT); +- +- MPL_str_get_binary_arg(port_name, +- MPIDI_OFI_CONNENTRY_TAG_KEY, +- connname, MPIDI_Global.addrnamelen, &maxlen); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_GET_CONN_NAME_FROM_PORT); +- return mpi_errno; +-} +- +-static inline int MPIDI_OFI_dynproc_create_intercomm(const char *port_name, +- int remote_size, +- int *remote_lupids, +- MPIR_Comm * comm_ptr, +- MPIR_Comm ** newcomm, +- int is_low_group, char *api) +-{ +- int context_id_offset, mpi_errno = MPI_SUCCESS; +- MPIR_Comm *tmp_comm_ptr = NULL; +- int i = 0; +- MPIDI_rank_map_mlut_t *mlut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_CREATE_INTERCOMM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_CREATE_INTERCOMM); +- +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_get_tag_from_port(port_name, &context_id_offset)); +- MPIDI_OFI_MPI_CALL_POP(MPIR_Comm_create(&tmp_comm_ptr)); +- +- tmp_comm_ptr->context_id = MPIR_CONTEXT_SET_FIELD(DYNAMIC_PROC, context_id_offset, 1); +- tmp_comm_ptr->recvcontext_id = tmp_comm_ptr->context_id; +- tmp_comm_ptr->remote_size = remote_size; +- tmp_comm_ptr->local_size = comm_ptr->local_size; +- tmp_comm_ptr->pof2 = comm_ptr->pof2; +- tmp_comm_ptr->rank = comm_ptr->rank; +- tmp_comm_ptr->comm_kind = MPIR_COMM_KIND__INTERCOMM; +- tmp_comm_ptr->local_comm = comm_ptr; +- tmp_comm_ptr->is_low_group = is_low_group; +- +- /* handle local group */ +- /* No ref changes to LUT/MLUT in this step because the localcomm will not +- * be released in the normal way */ +- MPIDI_COMM(tmp_comm_ptr, local_map).mode = MPIDI_COMM(comm_ptr, map).mode; +- MPIDI_COMM(tmp_comm_ptr, local_map).size = MPIDI_COMM(comm_ptr, map).size; +- MPIDI_COMM(tmp_comm_ptr, local_map).avtid = MPIDI_COMM(comm_ptr, map).avtid; +- switch (MPIDI_COMM(comm_ptr, map).mode) { +- case MPIDI_RANK_MAP_DIRECT: +- case MPIDI_RANK_MAP_DIRECT_INTRA: +- break; +- case MPIDI_RANK_MAP_OFFSET: +- case MPIDI_RANK_MAP_OFFSET_INTRA: +- MPIDI_COMM(tmp_comm_ptr, local_map).reg.offset = MPIDI_COMM(comm_ptr, map).reg.offset; +- break; +- case MPIDI_RANK_MAP_STRIDE: +- case MPIDI_RANK_MAP_STRIDE_INTRA: +- case MPIDI_RANK_MAP_STRIDE_BLOCK: +- case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- MPIDI_COMM(tmp_comm_ptr, local_map).reg.stride.stride = +- MPIDI_COMM(comm_ptr, map).reg.stride.stride; +- MPIDI_COMM(tmp_comm_ptr, local_map).reg.stride.blocksize = +- MPIDI_COMM(comm_ptr, map).reg.stride.blocksize; +- MPIDI_COMM(tmp_comm_ptr, local_map).reg.stride.offset = +- MPIDI_COMM(comm_ptr, map).reg.stride.offset; +- break; +- case MPIDI_RANK_MAP_LUT: +- case MPIDI_RANK_MAP_LUT_INTRA: +- MPIDI_COMM(tmp_comm_ptr, local_map).irreg.lut.t = MPIDI_COMM(comm_ptr, map).irreg.lut.t; +- MPIDI_COMM(tmp_comm_ptr, local_map).irreg.lut.lpid = +- MPIDI_COMM(comm_ptr, map).irreg.lut.lpid; +- break; +- case MPIDI_RANK_MAP_MLUT: +- MPIDI_COMM(tmp_comm_ptr, local_map).irreg.mlut.t = +- MPIDI_COMM(comm_ptr, map).irreg.mlut.t; +- MPIDI_COMM(tmp_comm_ptr, local_map).irreg.mlut.gpid = +- MPIDI_COMM(comm_ptr, map).irreg.mlut.gpid; +- break; +- case MPIDI_RANK_MAP_NONE: +- MPIR_Assert(0); +- break; +- } +- +- /* set mapping for remote group */ +- mpi_errno = MPIDIU_alloc_mlut(&mlut, remote_size); +- if (mpi_errno) { +- MPIR_ERR_POP(mpi_errno); +- } +- MPIDI_COMM(tmp_comm_ptr, map).mode = MPIDI_RANK_MAP_MLUT; +- MPIDI_COMM(tmp_comm_ptr, map).size = remote_size; +- MPIDI_COMM(tmp_comm_ptr, map).avtid = -1; +- MPIDI_COMM(tmp_comm_ptr, map).irreg.mlut.t = mlut; +- MPIDI_COMM(tmp_comm_ptr, map).irreg.mlut.gpid = mlut->gpid; +- for (i = 0; i < remote_size; ++i) { +- MPIDI_COMM(tmp_comm_ptr, map).irreg.mlut.gpid[i].avtid = +- MPIDIU_LUPID_GET_AVTID(remote_lupids[i]); +- MPIDI_COMM(tmp_comm_ptr, map).irreg.mlut.gpid[i].lpid = +- MPIDIU_LUPID_GET_LPID(remote_lupids[i]); +- } +- +- MPIR_Comm_commit(tmp_comm_ptr); +- +- MPIDI_OFI_MPI_CALL_POP(MPIR_Comm_dup_impl(tmp_comm_ptr, newcomm)); +- +- tmp_comm_ptr->local_comm = NULL; /* avoid freeing local comm with comm_release */ +- MPIR_Comm_release(tmp_comm_ptr); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_CREATE_INTERCOMM); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_OFI_dynproc_handshake(int root, +- int phase, +- int timeout, +- int port_id, fi_addr_t * conn, MPIR_Comm * comm_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_OFI_dynamic_process_request_t req; +- uint64_t match_bits = 0; +- uint64_t mask_bits = 0; +- struct fi_msg_tagged msg; +- int buf = 0; +- MPID_Time_t time_sta, time_now; +- double time_gap; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_HANDSHAKE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_HANDSHAKE); +- +- /* connector */ +- if (phase == 0) { +- req.done = MPIDI_OFI_PEEK_START; +- req.event_id = MPIDI_OFI_EVENT_ACCEPT_PROBE; +- match_bits = MPIDI_OFI_init_recvtag(&mask_bits, port_id, MPI_ANY_SOURCE, MPI_ANY_TAG); +- match_bits |= MPIDI_OFI_DYNPROC_SEND; +- +- msg.msg_iov = NULL; +- msg.desc = NULL; +- msg.iov_count = 0; +- msg.addr = FI_ADDR_UNSPEC; +- msg.tag = match_bits; +- msg.ignore = mask_bits; +- msg.context = (void *) &req.context; +- msg.data = 0; +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, +- "connecting port_id %d, conn %" PRIu64 +- ", waiting for MPIDI_OFI_dynproc_handshake", port_id, *conn)); +- time_gap = 0.0; +- MPID_Wtime(&time_sta); +- while (req.done != MPIDI_OFI_PEEK_FOUND) { +- req.done = MPIDI_OFI_PEEK_START; +- MPIDI_OFI_CALL(fi_trecvmsg +- (MPIDI_Global.ctx[0].rx, &msg, +- FI_PEEK | FI_COMPLETION | (MPIDI_OFI_ENABLE_DATA ? FI_REMOTE_CQ_DATA : +- 0)), trecv); +- do { +- mpi_errno = MPID_Progress_test(); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +- MPID_Wtime(&time_now); +- MPID_Wtime_diff(&time_sta, &time_now, &time_gap); +- } while (req.done == MPIDI_OFI_PEEK_START && (int) time_gap < timeout); +- if ((int) time_gap >= timeout) { +- /* connection is timed out */ +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, +- "connection to port_id %d, conn %" PRIu64 " ack timed out", +- port_id, *conn)); +- mpi_errno = MPI_ERR_PORT; +- goto fn_fail; +- } +- } +- +- req.done = 0; +- req.event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- +- MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_Global.ctx[0].rx, +- &buf, +- sizeof(int), +- NULL, +- *conn, +- match_bits, +- mask_bits, &req.context), trecv, MPIDI_OFI_CALL_LOCK, FALSE); +- time_gap = 0.0; +- MPID_Wtime(&time_sta); +- do { +- mpi_errno = MPID_Progress_test(); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +- MPID_Wtime(&time_now); +- MPID_Wtime_diff(&time_sta, &time_now, &time_gap); +- } while (!req.done && (int) time_gap < timeout); +- if ((int) time_gap >= timeout) { +- /* connection is mismatched */ +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, +- "connection to port_id %d, conn %" PRIu64 " ack mismatched", port_id, +- *conn)); +- mpi_errno = MPI_ERR_PORT; +- goto fn_fail; +- } +- } +- +- /* acceptor */ +- if (phase == 1) { +- int tag = root; +- +- match_bits = MPIDI_OFI_init_sendtag(port_id, comm_ptr->rank, tag, MPIDI_OFI_DYNPROC_SEND); +- +- req.done = 0; +- req.event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- mpi_errno = MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, +- &buf, +- sizeof(int), +- NULL, +- comm_ptr->rank, +- *conn, +- match_bits, +- (void *) &req.context, +- MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, FALSE); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIDI_OFI_PROGRESS_WHILE(!req.done); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_HANDSHAKE); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_OFI_dynproc_exchange_map(int root, +- int phase, +- int port_id, +- fi_addr_t * conn, +- char *conname, +- MPIR_Comm * comm_ptr, +- int *out_root, +- int *remote_size, +- size_t ** remote_upid_size, +- char **remote_upids, int **remote_node_ids) +-{ +- int i, mpi_errno = MPI_SUCCESS; +- +- MPIDI_OFI_dynamic_process_request_t req[3]; +- uint64_t match_bits = 0; +- uint64_t mask_bits = 0; +- struct fi_msg_tagged msg; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_DYNPROC_EXCHANGE_MAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_DYNPROC_EXCHANGE_MAP); +- +- MPIR_CHKPMEM_DECL(3); +- +- req[0].done = MPIDI_OFI_PEEK_START; +- req[0].event_id = MPIDI_OFI_EVENT_ACCEPT_PROBE; +- match_bits = MPIDI_OFI_init_recvtag(&mask_bits, port_id, MPI_ANY_SOURCE, MPI_ANY_TAG); +- match_bits |= MPIDI_OFI_DYNPROC_SEND; +- +- if (phase == 0) { +- size_t remote_upid_recvsize = 0; +- +- /* Receive the addresses */ +- /* We don't know the size, so probe for table size */ +- /* Receive phase updates the connection */ +- /* With the probed address */ +- msg.msg_iov = NULL; +- msg.desc = NULL; +- msg.iov_count = 0; +- msg.addr = FI_ADDR_UNSPEC; +- msg.tag = match_bits; +- msg.ignore = mask_bits; +- msg.context = (void *) &req[0].context; +- msg.data = 0; +- +- while (req[0].done != MPIDI_OFI_PEEK_FOUND) { +- req[0].done = MPIDI_OFI_PEEK_START; +- MPIDI_OFI_CALL(fi_trecvmsg +- (MPIDI_Global.ctx[0].rx, &msg, +- FI_PEEK | FI_COMPLETION | (MPIDI_OFI_ENABLE_DATA ? FI_REMOTE_CQ_DATA : +- 0)), trecv); +- MPIDI_OFI_PROGRESS_WHILE(req[0].done == MPIDI_OFI_PEEK_START); +- } +- +- *remote_size = req[0].msglen / sizeof(size_t); +- *out_root = req[0].tag; +- MPIR_CHKPMEM_MALLOC((*remote_upid_size), size_t *, +- (*remote_size) * sizeof(size_t), mpi_errno, "remote_upid_size", +- MPL_MEM_ADDRESS); +- MPIR_CHKPMEM_MALLOC((*remote_node_ids), int *, (*remote_size) * sizeof(int), mpi_errno, +- "remote_node_ids", MPL_MEM_ADDRESS); +- +- req[0].done = 0; +- req[0].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- req[1].done = 0; +- req[1].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- req[2].done = 0; +- req[2].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- +- MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_Global.ctx[0].rx, +- *remote_upid_size, +- (*remote_size) * sizeof(size_t), +- NULL, +- FI_ADDR_UNSPEC, +- match_bits, +- mask_bits, &req[0].context), trecv, MPIDI_OFI_CALL_LOCK, +- FALSE); +- MPIDI_OFI_PROGRESS_WHILE(!req[0].done); +- +- for (i = 0; i < (*remote_size); i++) +- remote_upid_recvsize += (*remote_upid_size)[i]; +- MPIR_CHKPMEM_MALLOC((*remote_upids), char *, remote_upid_recvsize, +- mpi_errno, "remote_upids", MPL_MEM_ADDRESS); +- +- MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_Global.ctx[0].rx, +- *remote_upids, +- remote_upid_recvsize, +- NULL, +- FI_ADDR_UNSPEC, +- match_bits, +- mask_bits, &req[1].context), trecv, MPIDI_OFI_CALL_LOCK, +- FALSE); +- +- MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_Global.ctx[0].rx, +- *remote_node_ids, +- (*remote_size) * sizeof(int), +- NULL, +- FI_ADDR_UNSPEC, +- match_bits, +- mask_bits, &req[2].context), trecv, MPIDI_OFI_CALL_LOCK, +- FALSE); +- +- MPIDI_OFI_PROGRESS_WHILE(!req[1].done || !req[2].done); +- size_t disp = 0; +- for (i = 0; i < req[0].source; i++) +- disp += (*remote_upid_size)[i]; +- memcpy(conname, *remote_upids + disp, (*remote_upid_size)[req[0].source]); +- MPIR_CHKPMEM_COMMIT(); +- } +- +- if (phase == 1) { +- /* Send our table to the child */ +- /* Send phase maps the entry */ +- int tag = root; +- int local_size = comm_ptr->local_size; +- size_t *local_upid_size = NULL; +- size_t local_upid_sendsize = 0; +- char *local_upids = NULL; +- int *local_node_ids = NULL; +- +- /* Step 1: get local upids (with size) and node ids for sending */ +- MPIDI_NM_get_local_upids(comm_ptr, &local_upid_size, &local_upids); +- for (i = 0; i < local_size; i++) +- local_upid_sendsize += local_upid_size[i]; +- local_node_ids = (int *) MPL_malloc(local_size * sizeof(int), MPL_MEM_ADDRESS); +- for (i = 0; i < comm_ptr->local_size; i++) +- MPIDI_CH4U_get_node_id(comm_ptr, i, &local_node_ids[i]); +- +- +- match_bits = MPIDI_OFI_init_sendtag(port_id, comm_ptr->rank, tag, MPIDI_OFI_DYNPROC_SEND); +- +- /* fi_av_map here is not quite right for some providers */ +- /* we need to get this connection from the sockname */ +- req[0].done = 0; +- req[0].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- req[1].done = 0; +- req[1].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- req[2].done = 0; +- req[2].event_id = MPIDI_OFI_EVENT_DYNPROC_DONE; +- mpi_errno = MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, +- local_upid_size, +- local_size * sizeof(size_t), +- NULL, +- comm_ptr->rank, +- *conn, +- match_bits, +- (void *) &req[0].context, +- MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, FALSE); +- if (mpi_errno) { +- MPL_free(local_upid_size); +- MPL_free(local_upids); +- MPL_free(local_node_ids); +- MPIR_ERR_POP(mpi_errno); +- } +- +- MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, +- local_upids, +- local_upid_sendsize, +- NULL, +- comm_ptr->rank, +- *conn, +- match_bits, +- (void *) &req[1].context, MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, +- FALSE); +- MPIDI_OFI_send_handler(MPIDI_Global.ctx[0].tx, local_node_ids, local_size * sizeof(int), +- NULL, comm_ptr->rank, *conn, match_bits, (void *) &req[2].context, +- MPIDI_OFI_DO_SEND, MPIDI_OFI_CALL_LOCK, FALSE); +- +- MPIDI_OFI_PROGRESS_WHILE(!req[0].done || !req[1].done || !req[2].done); +- +- MPL_free(local_upid_size); +- MPL_free(local_upids); +- MPL_free(local_node_ids); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_DYNPROC_EXCHANGE_MAP); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_connect(const char *port_name, +- MPIR_Info * info, +- int root, +- int timeout, MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm) +-{ +- int mpi_errno = MPI_SUCCESS, root_errno = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- int remote_size = 0; +- size_t *remote_upid_size = NULL; +- char *remote_upids = NULL; +- int *remote_lupids = NULL; +- int *remote_node_ids = NULL; +- int is_low_group = -1; +- int parent_root = -1; +- int rank = comm_ptr->rank; +- int port_id; +- int conn_id; +- fi_addr_t conn; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); +- +- MPIR_CHKLMEM_DECL(1); +- +- if (!MPIDI_OFI_ENABLE_TAGGED) { +- MPIR_Assert(0); +- goto fn_exit; +- } +- +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_SPAWN_MUTEX); +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_get_tag_from_port(port_name, &port_id)); +- +- if (rank == root) { +- char conname[FI_NAME_MAX]; +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_get_conn_name_from_port(port_name, conname)); +- MPIDI_OFI_CALL(fi_av_insert(MPIDI_Global.av, conname, 1, &conn, 0ULL, NULL), avmap); +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dynproc_exchange_map +- (root, MPIDI_OFI_DYNPROC_SENDER, +- port_id, &conn, conname, comm_ptr, &parent_root, +- &remote_size, &remote_upid_size, &remote_upids, &remote_node_ids)); +- mpi_errno = MPIDI_OFI_dynproc_handshake(root, MPIDI_OFI_DYNPROC_RECEIVER, +- timeout, port_id, &conn, comm_ptr); +- if (mpi_errno == MPI_ERR_PORT || mpi_errno == MPI_SUCCESS) { +- root_errno = mpi_errno; +- mpi_errno = MPIR_Bcast_intra_auto(&root_errno, 1, MPI_INT, root, comm_ptr, &errflag); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- if (root_errno != MPI_SUCCESS) { +- mpi_errno = root_errno; +- MPIR_ERR_POP(mpi_errno); +- } +- } else { +- MPIR_ERR_POP(mpi_errno); +- } +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dynproc_exchange_map +- (root, MPIDI_OFI_DYNPROC_RECEIVER, +- port_id, &conn, conname, comm_ptr, &parent_root, +- &remote_size, &remote_upid_size, &remote_upids, &remote_node_ids)); +- MPIR_CHKLMEM_MALLOC(remote_lupids, int *, remote_size * sizeof(int), +- mpi_errno, "remote_lupids", MPL_MEM_ADDRESS); +- +- MPIDIU_upids_to_lupids(remote_size, remote_upid_size, remote_upids, &remote_lupids, +- remote_node_ids); +- /* the child comm group is alawys the low group */ +- is_low_group = 0; +- } +- +- if (rank != root) { +- mpi_errno = MPIR_Bcast_intra_auto(&root_errno, 1, MPI_INT, root, comm_ptr, &errflag); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- if (root_errno != MPI_SUCCESS) { +- mpi_errno = root_errno; +- MPIR_ERR_POP(mpi_errno); +- } +- } +- +- /* broadcast the upids to local groups */ +- MPIDI_OFI_MPI_CALL_POP(MPIDIU_Intercomm_map_bcast_intra(comm_ptr, root, +- &remote_size, &is_low_group, 0, +- remote_upid_size, +- remote_upids, +- &remote_lupids, remote_node_ids)); +- if (rank == root) { +- MPL_free(remote_upid_size); +- MPL_free(remote_upids); +- MPL_free(remote_node_ids); +- } +- +- /* Now Create the New Intercomm */ +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dynproc_create_intercomm(port_name, +- remote_size, +- remote_lupids, +- comm_ptr, +- newcomm, is_low_group, +- (char *) "Connect")); +- if (rank == root) { +- conn_id = MPIDI_OFI_conn_manager_insert_conn(conn, (*newcomm)->rank, +- MPIDI_OFI_DYNPROC_CONNECTED_CHILD); +- MPIDI_OFI_COMM(*newcomm).conn_id = conn_id; +- } +- MPIDI_OFI_MPI_CALL_POP(MPIR_Barrier_intra_auto(comm_ptr, &errflag)); +- fn_exit: +- if (rank == root) { +- MPIR_CHKLMEM_FREEALL(); +- } else { +- MPL_free(remote_lupids); +- } +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_SPAWN_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_disconnect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); +- +- MPIDI_OFI_MPI_CALL_POP(MPIR_Comm_free_impl(comm_ptr)); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_comm_open_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- int mpi_errno = MPI_SUCCESS; +- int str_errno = MPL_STR_SUCCESS; +- int port_name_tag = 0; +- int len = MPI_MAX_PORT_NAME; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); +- +- if (!MPIDI_OFI_ENABLE_TAGGED) { +- MPIR_Assert(0); +- goto fn_exit; +- } +- +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_get_port_name_tag(&port_name_tag)); +- MPIDI_OFI_STR_CALL(MPL_str_add_int_arg(&port_name, &len, MPIDI_OFI_PORT_NAME_TAG_KEY, +- port_name_tag), port_str); +- MPIDI_OFI_STR_CALL(MPL_str_add_binary_arg(&port_name, &len, MPIDI_OFI_CONNENTRY_TAG_KEY, +- MPIDI_Global.addrname, +- MPIDI_Global.addrnamelen), port_str); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_comm_close_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_close_port(const char *port_name) +-{ +- int mpi_errno = MPI_SUCCESS; +- int port_name_tag; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); +- +- if (!MPIDI_OFI_ENABLE_TAGGED) { +- MPIR_Assert(0); +- goto fn_exit; +- } +- +- mpi_errno = MPIDI_OFI_get_tag_from_port(port_name, &port_name_tag); +- MPIDI_OFI_free_port_name_tag(port_name_tag); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_comm_close_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_accept(const char *port_name, +- MPIR_Info * info, +- int root, MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- int remote_size = 0; +- size_t *remote_upid_size = 0; +- char *remote_upids = NULL; +- int *remote_lupids = NULL; +- int *remote_node_ids = NULL; +- int child_root = -1; +- int is_low_group = -1; +- int conn_id; +- fi_addr_t conn; +- int rank = comm_ptr->rank; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); +- +- MPIR_CHKLMEM_DECL(1); +- +- if (!MPIDI_OFI_ENABLE_TAGGED) { +- MPIR_Assert(0); +- goto fn_exit; +- } +- +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_SPAWN_MUTEX); +- +- if (rank == root) { +- char conname[FI_NAME_MAX]; +- int port_id; +- +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_get_tag_from_port(port_name, &port_id)); +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dynproc_exchange_map +- (root, MPIDI_OFI_DYNPROC_RECEIVER, +- port_id, &conn, conname, comm_ptr, &child_root, +- &remote_size, &remote_upid_size, &remote_upids, &remote_node_ids)); +- MPIDI_OFI_CALL(fi_av_insert(MPIDI_Global.av, conname, 1, &conn, 0ULL, NULL), avmap); +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dynproc_handshake +- (root, MPIDI_OFI_DYNPROC_SENDER, 0, port_id, &conn, comm_ptr)); +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dynproc_exchange_map +- (root, MPIDI_OFI_DYNPROC_SENDER, +- port_id, &conn, conname, comm_ptr, &child_root, +- &remote_size, &remote_upid_size, &remote_upids, &remote_node_ids)); +- MPIR_CHKLMEM_MALLOC(remote_lupids, int *, remote_size * sizeof(int), +- mpi_errno, "remote_lupids", MPL_MEM_ADDRESS); +- MPIDIU_upids_to_lupids(remote_size, remote_upid_size, remote_upids, &remote_lupids, +- remote_node_ids); +- /* the parent comm group is alawys the low group */ +- is_low_group = 1; +- } +- +- /* broadcast the upids to local groups */ +- MPIDI_OFI_MPI_CALL_POP(MPIDIU_Intercomm_map_bcast_intra(comm_ptr, root, +- &remote_size, &is_low_group, 0, +- remote_upid_size, +- remote_upids, +- &remote_lupids, remote_node_ids)); +- if (rank == root) { +- MPL_free(remote_upid_size); +- MPL_free(remote_upids); +- MPL_free(remote_node_ids); +- } +- +- /* Now Create the New Intercomm */ +- MPIDI_OFI_MPI_CALL_POP(MPIDI_OFI_dynproc_create_intercomm(port_name, +- remote_size, +- remote_lupids, +- comm_ptr, +- newcomm, is_low_group, +- (char *) "Connect")); +- if (rank == root) { +- conn_id = MPIDI_OFI_conn_manager_insert_conn(conn, (*newcomm)->rank, +- MPIDI_OFI_DYNPROC_CONNECTED_PARENT); +- MPIDI_OFI_COMM(*newcomm).conn_id = conn_id; +- } +- MPIDI_OFI_MPI_CALL_POP(MPIR_Barrier_intra_auto(comm_ptr, &errflag)); +- fn_exit: +- if (rank == root) { +- MPIR_CHKLMEM_FREEALL(); +- } else { +- MPL_free(remote_lupids); +- } +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_SPAWN_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); +- return mpi_errno; +- +- fn_fail: +- goto fn_exit; +-} +- +-#endif /* OFI_SPAWN_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ofi/ofi_startall.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_startall.h +@@ -14,10 +14,6 @@ + #include "ofi_impl.h" + #include <../mpi/pt2pt/bsendutil.h> + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_startall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_startall(int count, MPIR_Request * requests[]) + { + int mpi_errno = MPI_SUCCESS; +@@ -30,4 +26,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_startall(int count, MPIR_Request * req + return mpi_errno; + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_NM_prequest_free_hook(MPIR_Request * req) ++{ ++ MPIDIG_prequest_free_hook(req); ++} ++ + #endif /* OFI_STARTALL_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ofi/ofi_types.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_types.h +@@ -67,53 +67,6 @@ + #endif + #endif + +-/* RMA Key Space division +- * | | | | +- * ... Context ID | key type flag bit | Key/window instance | +- * | | | | +- */ +-/* 64-bit key space */ +-/* 2147483648 window instances per comm */ +-/* 2147483648 outstanding huge RMAS per comm */ +-/* 4294967296 communicators */ +-#define MPIDI_OFI_MAX_KEY_TYPE_BITS_64 (1) +-#define MPIDI_OFI_MAX_CONTEXT_BITS_64 (32) +-#define MPIDI_OFI_MAX_KEY_BITS_64 (64-(MPIDI_OFI_MAX_KEY_TYPE_BITS_64+MPIDI_OFI_MAX_CONTEXT_BITS_64)) +-#define MPIDI_OFI_MAX_HUGE_RMAS_64 (1<<(MPIDI_OFI_MAX_KEY_BITS_64)) +-#define MPIDI_OFI_MAX_WINDOWS_64 MPIDI_OFI_MAX_HUGE_RMAS_64 +- +-#define MPIDI_OFI_CONTEXT_SHIFT_64 (MPIDI_OFI_MAX_KEY_BITS_64+MPIDI_OFI_MAX_KEY_TYPE_BITS_64) +-#define MPIDI_OFI_MAX_KEY_TYPE_SHIFT_64 (MPIDI_OFI_MAX_KEY_BITS_64) +- +-/* 32-bit key space */ +-/* 32K window instances per comm */ +-/* 32K outstanding huge RMAS per comm */ +-/* 64K communicators */ +-#define MPIDI_OFI_MAX_KEY_TYPE_BITS_32 (1) +-#define MPIDI_OFI_MAX_CONTEXT_BITS_32 (16) +-#define MPIDI_OFI_MAX_KEY_BITS_32 (32-(MPIDI_OFI_MAX_KEY_TYPE_BITS_32+MPIDI_OFI_MAX_CONTEXT_BITS_32)) +-#define MPIDI_OFI_MAX_HUGE_RMAS_32 (1<<(MPIDI_OFI_MAX_KEY_BITS_32)) +-#define MPIDI_OFI_MAX_WINDOWS_32 MPIDI_OFI_MAX_HUGE_RMAS_32 +- +-#define MPIDI_OFI_CONTEXT_SHIFT_32 (MPIDI_OFI_MAX_KEY_BITS_32+MPIDI_OFI_MAX_KEY_TYPE_BITS_32) +-#define MPIDI_OFI_MAX_KEY_TYPE_SHIFT_32 (MPIDI_OFI_MAX_KEY_BITS_32) +- +-/* 16-bit key space */ +-/* 128 window instances per comm */ +-/* 128 outstanding huge RMAS per comm */ +-/* 256 communicators */ +-#define MPIDI_OFI_MAX_KEY_TYPE_BITS_16 (1) +-#define MPIDI_OFI_MAX_CONTEXT_BITS_16 (8) +-#define MPIDI_OFI_MAX_KEY_BITS_16 (16-(MPIDI_OFI_MAX_KEY_TYPE_BITS_16+MPIDI_OFI_MAX_CONTEXT_BITS_16)) +-#define MPIDI_OFI_MAX_HUGE_RMAS_16 (1<<(MPIDI_OFI_MAX_KEY_BITS_16)) +-#define MPIDI_OFI_MAX_WINDOWS_16 MPIDI_OFI_MAX_HUGE_RMAS_16 +- +-#define MPIDI_OFI_CONTEXT_SHIFT_16 (MPIDI_OFI_MAX_KEY_BITS_16+MPIDI_OFI_MAX_KEY_TYPE_BITS_16) +-#define MPIDI_OFI_MAX_KEY_TYPE_SHIFT_16 (MPIDI_OFI_MAX_KEY_BITS_16) +- +-#define MPIDI_OFI_KEY_TYPE_HUGE_RMA (0) +-#define MPIDI_OFI_KEY_TYPE_WINDOW (1) +- + + #ifdef HAVE_FORTRAN_BINDING + #ifdef MPICH_DEFINE_2COMPLEX +@@ -126,10 +79,10 @@ + #endif + #define MPIDI_OFI_OP_SIZES 15 + +-#define MPIDI_OFI_THREAD_UTIL_MUTEX MPIDI_Global.mutexes[0].m +-#define MPIDI_OFI_THREAD_PROGRESS_MUTEX MPIDI_Global.mutexes[1].m +-#define MPIDI_OFI_THREAD_FI_MUTEX MPIDI_Global.mutexes[2].m +-#define MPIDI_OFI_THREAD_SPAWN_MUTEX MPIDI_Global.mutexes[3].m ++#define MPIDI_OFI_THREAD_UTIL_MUTEX MPIDI_OFI_global.mutexes[0].m ++#define MPIDI_OFI_THREAD_PROGRESS_MUTEX MPIDI_OFI_global.mutexes[1].m ++#define MPIDI_OFI_THREAD_FI_MUTEX MPIDI_OFI_global.mutexes[2].m ++#define MPIDI_OFI_THREAD_SPAWN_MUTEX MPIDI_OFI_global.mutexes[3].m + + /* Field accessor macros */ + #define MPIDI_OFI_OBJECT_HEADER_SIZE offsetof(MPIDI_OFI_offset_checker_t, pad) +@@ -300,7 +253,6 @@ typedef struct { + } MPIDI_OFI_cq_buff_entry_t; + + typedef struct { +- unsigned enable_data:1; + unsigned enable_av_table:1; + unsigned enable_scalable_endpoints:1; + unsigned enable_shared_contexts:1; +@@ -361,8 +313,7 @@ typedef struct { + /* Queryable limits */ + uint64_t max_buffered_send; + uint64_t max_buffered_write; +- uint64_t max_send; +- uint64_t max_write; ++ uint64_t max_msg_size; + uint64_t max_short_send; + uint64_t max_mr_key_size; + uint64_t max_rma_key_bits; +@@ -372,7 +323,7 @@ typedef struct { + size_t tx_iov_limit; + size_t rx_iov_limit; + size_t rma_iov_limit; +- int max_ch4_vnis; ++ int max_ch4_vcis; + int max_rma_sep_tx_cnt; /* Max number of transmit context on one RMA scalable EP */ + size_t max_order_raw; + size_t max_order_war; +@@ -395,13 +346,23 @@ typedef struct { + UT_array *rma_sep_idx_array; /* Array of available indexes of transmit contexts on sep */ + + /* Active Message Globals */ ++#if MPIDI_OFI_IOVEC_ALIGN <= SIZEOF_VOID_P ++ struct iovec am_iov[MPIDI_OFI_MAX_NUM_AM_BUFFERS]; ++#else ++ /* need bigger alignment */ + struct iovec am_iov[MPIDI_OFI_MAX_NUM_AM_BUFFERS] MPL_ATTR_ALIGNED(MPIDI_OFI_IOVEC_ALIGN); ++#endif + struct fi_msg am_msg[MPIDI_OFI_MAX_NUM_AM_BUFFERS]; + void *am_bufs[MPIDI_OFI_MAX_NUM_AM_BUFFERS]; + MPIDI_OFI_am_repost_request_t am_reqs[MPIDI_OFI_MAX_NUM_AM_BUFFERS]; +- MPIU_buf_pool_t *am_buf_pool; ++ MPIDIU_buf_pool_t *am_buf_pool; + OPA_int_t am_inflight_inject_emus; + OPA_int_t am_inflight_rma_send_mrs; ++ /* Sequence number trackers for active messages */ ++ void *am_send_seq_tracker; ++ void *am_recv_seq_tracker; ++ /* Queue (utlist) to store early-arrival active messages */ ++ MPIDI_OFI_am_unordered_msg_t *am_unordered_msgs; + + /* Completion queue buffering */ + MPIDI_OFI_cq_buff_entry_t cq_buffered_static_list[MPIDI_OFI_NUM_CQ_BUFFERED]; +@@ -421,9 +382,6 @@ typedef struct { + /* Communication info for dynamic processes */ + MPIDI_OFI_conn_manager_t conn_mgr; + +- /* complete request used for lightweight sends */ +- MPIR_Request *lw_send_req; +- + /* Capability settings */ + #ifdef MPIDI_OFI_ENABLE_RUNTIME_CHECKS + MPIDI_OFI_capabilities_t settings; +@@ -453,29 +411,35 @@ typedef struct { + } MPIDI_OFI_offset_checker_t; + + typedef struct MPIDI_OFI_seg_state { +- DLOOP_Count buf_limit; /* Maximum data size in bytes which a single OFI call can handle. ++ MPI_Aint buf_limit; /* Maximum data size in bytes which a single OFI call can handle. + * This value remains constant once seg_state is initialized. */ +- DLOOP_Count buf_limit_left; /* Buffer length left for a single OFI call */ ++ MPI_Aint buf_limit_left; /* Buffer length left for a single OFI call */ + +- MPIR_Segment origin_seg; /* Segment structure */ + size_t origin_cursor; /* First byte to pack */ + size_t origin_end; /* Last byte to pack */ +- DLOOP_Count origin_iov_len; /* Length of data actually packed */ +- DLOOP_VECTOR origin_iov; /* IOVEC returned after pack */ ++ const void *origin_buf; ++ size_t origin_count; ++ MPI_Datatype origin_type; ++ MPI_Aint origin_iov_len; /* Length of data actually packed */ ++ MPL_IOV origin_iov; /* IOVEC returned after pack */ + uintptr_t origin_addr; /* Address of data actually packed */ + +- MPIR_Segment target_seg; + size_t target_cursor; + size_t target_end; +- DLOOP_Count target_iov_len; +- DLOOP_VECTOR target_iov; ++ MPI_Aint target_buf; ++ size_t target_count; ++ MPI_Datatype target_type; ++ MPI_Aint target_iov_len; ++ MPL_IOV target_iov; + uintptr_t target_addr; + +- MPIR_Segment result_seg; + size_t result_cursor; + size_t result_end; +- DLOOP_Count result_iov_len; +- DLOOP_VECTOR result_iov; ++ const void *result_buf; ++ size_t result_count; ++ MPI_Datatype result_type; ++ MPI_Aint result_iov_len; ++ MPL_IOV result_iov; + uintptr_t result_addr; + } MPIDI_OFI_seg_state_t; + +@@ -489,7 +453,7 @@ typedef struct MPIDI_OFI_win_acc_hint { + uint64_t dtypes_max_count[MPIDI_OFI_DT_SIZES]; /* translate CH4 which_accumulate_ops hints to + * atomicity support of all OFI datatypes. A datatype + * is supported only when all enabled ops are valid atomic +- * provided by the OFI provider (recored in MPIDI_Global.win_op_table). ++ * provided by the OFI provider (recored in MPIDI_OFI_global.win_op_table). + * Invalid defined in MPI standard are excluded. + * This structure is prepared at window creation time. */ + } MPIDI_OFI_win_acc_hint_t; +@@ -566,7 +530,7 @@ typedef struct MPIDI_OFI_huge_recv_list { + } MPIDI_OFI_huge_recv_list_t; + + /* Externs */ +-extern MPIDI_OFI_global_t MPIDI_Global; ++extern MPIDI_OFI_global_t MPIDI_OFI_global; + extern MPIDI_OFI_huge_recv_t *MPIDI_unexp_huge_recv_head; + extern MPIDI_OFI_huge_recv_t *MPIDI_unexp_huge_recv_tail; + extern MPIDI_OFI_huge_recv_list_t *MPIDI_posted_huge_recv_head; +@@ -575,37 +539,4 @@ extern MPIDI_OFI_huge_recv_list_t *MPIDI_posted_huge_recv_tail; + extern int MPIR_Datatype_init_names(void); + extern MPIDI_OFI_capabilities_t MPIDI_OFI_caps_list[MPIDI_OFI_NUM_SETS]; + +-/* Build uniform mr_key using contextid, key type and uniq ID passed */ +-MPL_STATIC_INLINE_PREFIX uint64_t MPIDI_OFI_rma_key_pack(MPIR_Context_id_t ctx, int key_type, +- uint64_t key_id) +-{ +- uint64_t rma_key = 0; +- +- /* place context_id into mr_key */ +- rma_key = ((uint64_t) (MPIR_CONTEXT_READ_FIELD(PREFIX, ctx))) << (MPIDI_Global.context_shift); +- +- /* set key type bits */ +- rma_key |= (((uint64_t) key_type) & (((uint64_t) 1 << MPIDI_Global.rma_key_type_bits) - 1)) +- << MPIDI_Global.max_rma_key_bits; +- +- /* place Key/window instance-ID into mr_key */ +- rma_key |= ((uint64_t) key_id) & (MPIDI_Global.max_huge_rmas - 1); +- +- return rma_key; +-} +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_rma_key_unpack(uint64_t key, MPIR_Context_id_t * ctx, +- int *key_type, uint32_t * key_id) +-{ +- if (ctx) { +- (*ctx) = (MPIR_Context_id_t) (key >> MPIDI_Global.context_shift); +- } +- +- (*key_type) = +- (int) ((key >> MPIDI_Global.max_rma_key_bits) & +- (((uint64_t) 1 << MPIDI_Global.rma_key_type_bits) - 1)); +- +- (*key_id) = (uint32_t) (key & (MPIDI_Global.max_huge_rmas - 1)); +-} +- + #endif /* OFI_TYPES_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ofi/ofi_win.c +@@ -0,0 +1,840 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ofi_impl.h" ++#include "ofi_noinline.h" ++ ++static int accu_op_hint_get_index(MPIDIG_win_info_accu_op_shift_t hint_shift); ++static void load_acc_hint(MPIR_Win * win); ++static void set_rma_fi_info(MPIR_Win * win, struct fi_info *finfo); ++static int win_allgather(MPIR_Win * win, void *base, int disp_unit); ++static int win_set_per_win_sync(MPIR_Win * win); ++static int win_init_sep(MPIR_Win * win); ++static int win_init_stx(MPIR_Win * win); ++static int win_init_global(MPIR_Win * win); ++static int win_init(MPIR_Win * win); ++ ++static int accu_op_hint_get_index(MPIDIG_win_info_accu_op_shift_t hint_shift) ++{ ++ int op_index = 0; ++ switch (hint_shift) { ++ case MPIDIG_ACCU_MAX_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_MAX); ++ break; ++ case MPIDIG_ACCU_MIN_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_MIN); ++ break; ++ case MPIDIG_ACCU_SUM_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_SUM); ++ break; ++ case MPIDIG_ACCU_PROD_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_PROD); ++ break; ++ case MPIDIG_ACCU_MAXLOC_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_MAXLOC); ++ break; ++ case MPIDIG_ACCU_MINLOC_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_MINLOC); ++ break; ++ case MPIDIG_ACCU_BAND_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_BAND); ++ break; ++ case MPIDIG_ACCU_BOR_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_BOR); ++ break; ++ case MPIDIG_ACCU_BXOR_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_BXOR); ++ break; ++ case MPIDIG_ACCU_LAND_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_LAND); ++ break; ++ case MPIDIG_ACCU_LOR_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_LOR); ++ break; ++ case MPIDIG_ACCU_LXOR_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_LXOR); ++ break; ++ case MPIDIG_ACCU_REPLACE_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_REPLACE); ++ break; ++ case MPIDIG_ACCU_NO_OP_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_NO_OP); ++ break; ++ case MPIDIG_ACCU_CSWAP_SHIFT: ++ op_index = MPIDI_OFI_get_mpi_acc_op_index(MPI_OP_NULL); ++ break; ++ default: ++ MPIR_Assert(hint_shift < MPIDIG_ACCU_OP_SHIFT_LAST); ++ break; ++ } ++ return op_index; ++} ++ ++static void load_acc_hint(MPIR_Win * win) ++{ ++ int op_index = 0, i; ++ MPIDIG_win_info_accu_op_shift_t hint_shift = MPIDIG_ACCU_OP_SHIFT_FIRST; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_LOAD_ATOMIC_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_LOAD_ATOMIC_INFO); ++ ++ if (!MPIDI_OFI_WIN(win).acc_hint) ++ MPIDI_OFI_WIN(win).acc_hint = MPL_malloc(sizeof(MPIDI_OFI_win_acc_hint_t), MPL_MEM_RMA); ++ ++ /* TODO: we assume all pes pass the same hint. Allreduce is needed to check ++ * the maximal value or the spec must define it as same value on all pes. ++ * Now we assume the spec requries same value on all pes. */ ++ ++ /* We translate the atomic op hints to max count allowed for all possible atomics with each ++ * datatype. We do not need more specific info (e.g., , because any process may use ++ * the op with accumulate or get_accumulate.*/ ++ for (i = 0; i < MPIDI_OFI_DT_SIZES; i++) { ++ MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[i] = 0; ++ bool first_valid_op = true; ++ ++ for (hint_shift = MPIDIG_ACCU_OP_SHIFT_FIRST; hint_shift < MPIDIG_ACCU_OP_SHIFT_LAST; ++ hint_shift++) { ++ uint64_t max_count = 0; ++ /* Calculate the max count of all possible atomics if this op is enabled. ++ * If the op is disabled for the datatype, the max counts are set to 0 (see util.c).*/ ++ if (MPIDIG_WIN(win, info_args).which_accumulate_ops & (1 << hint_shift)) { ++ op_index = accu_op_hint_get_index(hint_shift); ++ ++ /* Invalid pairs should be excluded as it is never used in a ++ * correct program (e.g., ).*/ ++ if (!MPIDI_OFI_global.win_op_table[i][op_index].mpi_acc_valid) ++ continue; ++ ++ if (hint_shift == MPIDIG_ACCU_NO_OP_SHIFT) /* atomic get */ ++ max_count = MPIDI_OFI_global.win_op_table[i][op_index].max_fetch_atomic_count; ++ else if (hint_shift == MPIDIG_ACCU_CSWAP_SHIFT) /* compare and swap */ ++ max_count = MPIDI_OFI_global.win_op_table[i][op_index].max_compare_atomic_count; ++ else /* atomic write and fetch_and_write */ ++ max_count = MPL_MIN(MPIDI_OFI_global.win_op_table[i][op_index].max_atomic_count, ++ MPIDI_OFI_global. ++ win_op_table[i][op_index].max_fetch_atomic_count); ++ ++ /* calculate the minimal max_count. */ ++ if (first_valid_op) { ++ MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[i] = max_count; ++ first_valid_op = false; ++ } else ++ MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[i] = ++ MPL_MIN(max_count, MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[i]); ++ } ++ } ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_LOAD_ATOMIC_INFO); ++} ++ ++/* Set OFI attributes and capabilities for RMA. */ ++static void set_rma_fi_info(MPIR_Win * win, struct fi_info *finfo) ++{ ++ finfo->caps = FI_RMA | FI_WRITE | FI_READ | FI_ATOMIC; ++ finfo->tx_attr->caps = FI_RMA | FI_WRITE | FI_READ | FI_ATOMIC; ++ ++ /* Update msg_order by accumulate ordering in window info. ++ * Accumulate ordering cannot easily be changed once the window has been created. ++ * OFI implementation ignores acc ordering hints issued in MPI_WIN_SET_INFO() ++ * after window is created. */ ++ finfo->tx_attr->msg_order = FI_ORDER_NONE; /* FI_ORDER_NONE is an alias for the value 0 */ ++ if ((MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_RAR) == ++ MPIDIG_ACCU_ORDER_RAR) ++ finfo->tx_attr->msg_order |= FI_ORDER_RAR; ++ if ((MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_RAW) == ++ MPIDIG_ACCU_ORDER_RAW) ++ finfo->tx_attr->msg_order |= FI_ORDER_RAW; ++ if ((MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_WAR) == ++ MPIDIG_ACCU_ORDER_WAR) ++ finfo->tx_attr->msg_order |= FI_ORDER_WAR; ++ if ((MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_WAW) == ++ MPIDIG_ACCU_ORDER_WAW) ++ finfo->tx_attr->msg_order |= FI_ORDER_WAW; ++} ++ ++static int win_allgather(MPIR_Win * win, void *base, int disp_unit) ++{ ++ int i, same_disp, mpi_errno = MPI_SUCCESS; ++ uint32_t first; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_Comm *comm_ptr = win->comm_ptr; ++ MPIDI_OFI_win_targetinfo_t *winfo; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_ALLGATHER); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_ALLGATHER); ++ ++ if (MPIDI_OFI_ENABLE_MR_SCALABLE) { ++ MPIDI_OFI_WIN(win).mr_key = MPIDI_OFI_WIN(win).win_id; ++ } else { ++ MPIDI_OFI_WIN(win).mr_key = 0; ++ } ++ ++ /* Don't register MR for NULL buffer, because FI_MR_BASIC mode requires ++ * that all registered memory regions must be backed by physical memory ++ * pages at the time the registration call is made. */ ++ if (MPIDI_OFI_ENABLE_MR_SCALABLE || base) { ++ MPIDI_OFI_CALL(fi_mr_reg(MPIDI_OFI_global.domain, /* In: Domain Object */ ++ base, /* In: Lower memory address */ ++ win->size, /* In: Length */ ++ FI_REMOTE_READ | FI_REMOTE_WRITE, /* In: Expose MR for read */ ++ 0ULL, /* In: offset(not used) */ ++ MPIDI_OFI_WIN(win).mr_key, /* In: requested key */ ++ 0ULL, /* In: flags */ ++ &MPIDI_OFI_WIN(win).mr, /* Out: memregion object */ ++ NULL), mr_reg); /* In: context */ ++ } ++ MPIDI_OFI_WIN(win).winfo = MPL_malloc(sizeof(*winfo) * comm_ptr->local_size, MPL_MEM_RMA); ++ ++ winfo = MPIDI_OFI_WIN(win).winfo; ++ winfo[comm_ptr->rank].disp_unit = disp_unit; ++ ++ if (!MPIDI_OFI_ENABLE_MR_SCALABLE && MPIDI_OFI_WIN(win).mr) { ++ /* MR_BASIC */ ++ MPIDI_OFI_WIN(win).mr_key = fi_mr_key(MPIDI_OFI_WIN(win).mr); ++ winfo[comm_ptr->rank].mr_key = MPIDI_OFI_WIN(win).mr_key; ++ winfo[comm_ptr->rank].base = (uintptr_t) base; ++ } ++ ++ mpi_errno = MPIR_Allgather(MPI_IN_PLACE, 0, ++ MPI_DATATYPE_NULL, ++ winfo, sizeof(*winfo), MPI_BYTE, comm_ptr, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIDI_OFI_ENABLE_MR_SCALABLE) { ++ first = winfo[0].disp_unit; ++ same_disp = 1; ++ for (i = 1; i < comm_ptr->local_size; i++) { ++ if (winfo[i].disp_unit != first) { ++ same_disp = 0; ++ break; ++ } ++ } ++ if (same_disp) { ++ MPL_free(MPIDI_OFI_WIN(win).winfo); ++ MPIDI_OFI_WIN(win).winfo = NULL; ++ } ++ } ++ ++ load_acc_hint(win); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_ALLGATHER); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* ++ * Setup per-window sync using independent counter. ++ * ++ * Return value: ++ * MPI_SUCCESS: Endpoint is successfully initialized. ++ * MPIDI_OFI_ENAVAIL: OFI resource is not available. ++ * MPIDI_OFI_EPERROR: OFI endpoint related failures. ++ * MPI_ERR_OTHER: Other error occurs. ++ */ ++static int win_set_per_win_sync(MPIR_Win * win) ++{ ++ int ret, mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_SET_PER_WIN_SYNC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_SET_PER_WIN_SYNC); ++ ++ struct fi_cntr_attr cntr_attr; ++ memset(&cntr_attr, 0, sizeof(cntr_attr)); ++ cntr_attr.events = FI_CNTR_EVENTS_COMP; ++ cntr_attr.wait_obj = FI_WAIT_UNSPEC; ++ MPIDI_OFI_CALL_RETURN(fi_cntr_open(MPIDI_OFI_global.domain, /* In: Domain Object */ ++ &cntr_attr, /* In: Configuration object */ ++ &MPIDI_OFI_WIN(win).cmpl_cntr, /* Out: Counter Object */ ++ NULL), ret); /* Context: counter events */ ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, "Failed to open completion counter.\n"); ++ mpi_errno = MPIDI_OFI_ENAVAIL; ++ goto fn_fail; ++ } ++ ++ MPIDI_OFI_WIN(win).issued_cntr = &MPIDI_OFI_WIN(win).issued_cntr_v; ++ ++ MPIDI_OFI_CALL_RETURN(fi_ep_bind ++ (MPIDI_OFI_WIN(win).ep, &MPIDI_OFI_WIN(win).cmpl_cntr->fid, ++ FI_READ | FI_WRITE), ret); ++ ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to bind completion counter to endpoint.\n"); ++ /* Close and release completion counter resource. */ ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).cmpl_cntr->fid), cntrclose); ++ mpi_errno = MPIDI_OFI_EPERROR; ++ goto fn_fail; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_SET_PER_WIN_SYNC); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* ++ * Initialize endpoint using scalable endpoint. ++ * ++ * Return value: ++ * MPI_SUCCESS: Endpoint is successfully initialized. ++ * MPIDI_OFI_ENAVAIL: OFI resource is not available. ++ * MPIDI_OFI_EPERROR: OFI endpoint related failures. ++ * MPI_ERR_OTHER: Other error occurs. ++ */ ++static int win_init_sep(MPIR_Win * win) ++{ ++ int i, ret, mpi_errno = MPI_SUCCESS; ++ struct fi_info *finfo; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_INIT_SEP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_INIT_SEP); ++ ++ finfo = fi_dupinfo(MPIDI_OFI_global.prov_use); ++ MPIR_Assert(finfo); ++ ++ /* Initialize scalable EP when first window is created. */ ++ if (MPIDI_OFI_global.rma_sep == NULL) { ++ /* Specify number of transmit context according user input and provider limit. */ ++ MPIDI_OFI_global.max_rma_sep_tx_cnt = ++ MPL_MIN(MPIDI_OFI_global.prov_use->domain_attr->max_ep_tx_ctx, ++ MPIR_CVAR_CH4_OFI_MAX_RMA_SEP_CTX); ++ finfo->ep_attr->tx_ctx_cnt = MPIDI_OFI_global.max_rma_sep_tx_cnt; ++ ++ MPIDI_OFI_CALL_RETURN(fi_scalable_ep ++ (MPIDI_OFI_global.domain, finfo, &MPIDI_OFI_global.rma_sep, NULL), ++ ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, "Failed to create scalable endpoint.\n"); ++ MPIDI_OFI_global.rma_sep = NULL; ++ mpi_errno = MPIDI_OFI_ENAVAIL; ++ goto fn_fail; ++ } ++ ++ MPIDI_OFI_CALL_RETURN(fi_scalable_ep_bind ++ (MPIDI_OFI_global.rma_sep, &(MPIDI_OFI_global.av->fid), 0), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to bind scalable endpoint to address vector.\n"); ++ MPIDI_OFI_global.rma_sep = NULL; ++ mpi_errno = MPIDI_OFI_ENAVAIL; ++ goto fn_fail; ++ } ++ ++ /* Allocate and initilize tx index array. */ ++ utarray_new(MPIDI_OFI_global.rma_sep_idx_array, &ut_int_icd, MPL_MEM_RMA); ++ for (i = 0; i < MPIDI_OFI_global.max_rma_sep_tx_cnt; i++) { ++ utarray_push_back(MPIDI_OFI_global.rma_sep_idx_array, &i, MPL_MEM_RMA); ++ } ++ } ++ /* Set per window transmit attributes. */ ++ set_rma_fi_info(win, finfo); ++ /* Get available transmit context index. */ ++ int *idx = (int *) utarray_back(MPIDI_OFI_global.rma_sep_idx_array); ++ if (idx == NULL) { ++ mpi_errno = MPIDI_OFI_ENAVAIL; ++ goto fn_fail; ++ } ++ /* Retrieve transmit context on scalable EP. */ ++ MPIDI_OFI_CALL_RETURN(fi_tx_context ++ (MPIDI_OFI_global.rma_sep, *idx, finfo->tx_attr, ++ &(MPIDI_OFI_WIN(win).ep), NULL), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to retrieve transmit context from scalable endpoint.\n"); ++ mpi_errno = MPIDI_OFI_ENAVAIL; ++ goto fn_fail; ++ } ++ ++ MPIDI_OFI_WIN(win).sep_tx_idx = *idx; ++ /* Pop this index out of reserving array. */ ++ utarray_pop_back(MPIDI_OFI_global.rma_sep_idx_array); ++ ++ MPIDI_OFI_CALL_RETURN(fi_ep_bind(MPIDI_OFI_WIN(win).ep, ++ &MPIDI_OFI_global.ctx[0].cq->fid, ++ FI_TRANSMIT | FI_SELECTIVE_COMPLETION), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to bind endpoint to completion queue.\n"); ++ mpi_errno = MPIDI_OFI_EPERROR; ++ goto fn_fail; ++ } ++ ++ if (win_set_per_win_sync(win) == MPI_SUCCESS) { ++ MPIDI_OFI_CALL_RETURN(fi_enable(MPIDI_OFI_WIN(win).ep), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, "Failed to activate endpoint.\n"); ++ mpi_errno = MPIDI_OFI_EPERROR; ++ /* Close the per-window counter opened by win_set_per_win_sync */ ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).cmpl_cntr->fid), cntrclose); ++ goto fn_fail; ++ } ++ } else { ++ /* Fail in per-window sync initialization, ++ * we are not using scalable endpoint without per-win sync support. */ ++ mpi_errno = MPIDI_OFI_EPERROR; ++ goto fn_fail; ++ } ++ ++ fn_exit: ++ fi_freeinfo(finfo); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_INIT_SEP); ++ return mpi_errno; ++ fn_fail: ++ if (MPIDI_OFI_WIN(win).sep_tx_idx != -1) { ++ /* Push tx idx back into available pool. */ ++ utarray_push_back(MPIDI_OFI_global.rma_sep_idx_array, &MPIDI_OFI_WIN(win).sep_tx_idx, ++ MPL_MEM_RMA); ++ MPIDI_OFI_WIN(win).sep_tx_idx = -1; ++ } ++ if (MPIDI_OFI_WIN(win).ep != NULL) { ++ /* Close an endpoint and release all resources associated with it. */ ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).ep->fid), epclose); ++ MPIDI_OFI_WIN(win).ep = NULL; ++ } ++ goto fn_exit; ++} ++ ++/* ++ * Initialize endpoint using shared transmit context. ++ * ++ * Return value: ++ * MPI_SUCCESS: Endpoint is successfully initialized. ++ * MPIDI_OFI_ENAVAIL: OFI resource is not available. ++ * MPIDI_OFI_EPERROR: OFI endpoint related failures. ++ * MPI_ERR_OTHER: Other error occurs. ++ */ ++static int win_init_stx(MPIR_Win * win) ++{ ++ /* Activate per-window EP/counter using STX */ ++ int ret, mpi_errno = MPI_SUCCESS; ++ struct fi_info *finfo; ++ bool have_per_win_cntr = false; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_INIT_STX); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_INIT_STX); ++ ++ finfo = fi_dupinfo(MPIDI_OFI_global.prov_use); ++ MPIR_Assert(finfo); ++ ++ /* Set per window transmit attributes. */ ++ set_rma_fi_info(win, finfo); ++ /* Still need to take out rx capabilities for shared context. */ ++ finfo->rx_attr->caps = 0ULL; /* RX capabilities not needed */ ++ ++ finfo->ep_attr->tx_ctx_cnt = FI_SHARED_CONTEXT; /* Request a shared context */ ++ finfo->ep_attr->rx_ctx_cnt = 0; /* We don't need RX contexts */ ++ MPIDI_OFI_CALL_RETURN(fi_endpoint(MPIDI_OFI_global.domain, ++ finfo, &MPIDI_OFI_WIN(win).ep, NULL), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to create per-window EP using shared TX context, " ++ "falling back to global EP/counter scheme"); ++ mpi_errno = MPIDI_OFI_ENAVAIL; ++ goto fn_fail; ++ } ++ ++ if (win_set_per_win_sync(win) == MPI_SUCCESS) { ++ have_per_win_cntr = true; ++ MPIDI_OFI_CALL_RETURN(fi_ep_bind ++ (MPIDI_OFI_WIN(win).ep, &MPIDI_OFI_global.rma_stx_ctx->fid, 0), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to bind endpoint to shared transmit contxt.\n"); ++ mpi_errno = MPIDI_OFI_EPERROR; ++ goto fn_fail; ++ } ++ ++ MPIDI_OFI_CALL_RETURN(fi_ep_bind(MPIDI_OFI_WIN(win).ep, ++ &MPIDI_OFI_global.ctx[0].cq->fid, ++ FI_TRANSMIT | FI_SELECTIVE_COMPLETION), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to bind endpoint to completion queue.\n"); ++ mpi_errno = MPIDI_OFI_EPERROR; ++ goto fn_fail; ++ } ++ ++ MPIDI_OFI_CALL_RETURN(fi_ep_bind(MPIDI_OFI_WIN(win).ep, &MPIDI_OFI_global.av->fid, 0), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "Failed to bind endpoint to address vector.\n"); ++ mpi_errno = MPIDI_OFI_EPERROR; ++ goto fn_fail; ++ } ++ ++ MPIDI_OFI_CALL_RETURN(fi_enable(MPIDI_OFI_WIN(win).ep), ret); ++ if (ret < 0) { ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, "Failed to activate endpoint.\n"); ++ mpi_errno = MPIDI_OFI_EPERROR; ++ goto fn_fail; ++ } ++ } else { ++ /* If per-win sync initialization is failed, we are not using shared transmit context. */ ++ mpi_errno = MPIDI_OFI_EPERROR; ++ goto fn_fail; ++ } ++ ++ fn_exit: ++ fi_freeinfo(finfo); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_INIT_STX); ++ return mpi_errno; ++ fn_fail: ++ if (MPIDI_OFI_WIN(win).ep != NULL) { ++ /* Close an endpoint and release all resources associated with it. */ ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).ep->fid), epclose); ++ MPIDI_OFI_WIN(win).ep = NULL; ++ } ++ if (have_per_win_cntr) { ++ /* Close the per-window counter opened by win_set_per_win_sync */ ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).cmpl_cntr->fid), cntrclose); ++ } ++ goto fn_exit; ++} ++ ++static int win_init_global(MPIR_Win * win) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_INIT_GLOBAL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_INIT_GLOBAL); ++ ++ MPIDI_OFI_WIN(win).ep = MPIDI_OFI_global.ctx[0].tx; ++ MPIDI_OFI_WIN(win).cmpl_cntr = MPIDI_OFI_global.rma_cmpl_cntr; ++ MPIDI_OFI_WIN(win).issued_cntr = &MPIDI_OFI_global.rma_issued_cntr; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_INIT_GLOBAL); ++ ++ return 0; ++} ++ ++static int win_init(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_INIT); ++ ++ MPIR_Datatype_init_names(); ++ MPIDI_OFI_index_datatypes(); ++ ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPIDI_Devwin_t) >= sizeof(MPIDI_OFI_win_t)); ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPIDI_Devdt_t) >= sizeof(MPIDI_OFI_datatype_t)); ++ ++ memset(&MPIDI_OFI_WIN(win), 0, sizeof(MPIDI_OFI_win_t)); ++ ++ MPIDI_OFI_WIN(win).win_id = MPIDI_OFI_mr_key_alloc(); ++ ++ MPIDIU_map_set(MPIDI_OFI_global.win_map, MPIDI_OFI_WIN(win).win_id, win, MPL_MEM_RMA); ++ ++ MPIDI_OFI_WIN(win).sep_tx_idx = -1; /* By default, -1 means not using scalable EP. */ ++ ++ /* First, try to enable scalable EP. */ ++ if (MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS && MPIR_CVAR_CH4_OFI_MAX_RMA_SEP_CTX > 0) { ++ /* Create tx based on scalable EP. */ ++ if (win_init_sep(win) == MPI_SUCCESS) { ++ goto fn_exit; ++ } ++ } ++ ++ /* If scalable EP is not available, try shared transmit context next. */ ++ /* Create tx using shared transmit context. */ ++ if (MPIDI_OFI_ENABLE_SHARED_CONTEXTS && win_init_stx(win) == MPI_SUCCESS) { ++ goto fn_exit; ++ } ++ ++ /* Fall back to use global EP, without per-window sync support. */ ++ win_init_global(win); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_INIT); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_SET_INFO); ++ ++ mpi_errno = MPIDIG_mpi_win_set_info(win, info); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_SET_INFO); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_GET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_GET_INFO); ++ ++ mpi_errno = MPIDIG_mpi_win_get_info(win, info_p_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_GET_INFO); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_FREE); ++ ++ mpi_errno = MPIDIG_mpi_win_free(win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_FREE); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE); ++ ++ mpi_errno = MPIDIG_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_ATTACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_ATTACH); ++ ++ mpi_errno = MPIDIG_mpi_win_attach(win, base, size); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_ATTACH); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_SHARED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_SHARED); ++ ++ mpi_errno = MPIDIG_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr, ++ win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_SHARED); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_DETACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_DETACH); ++ ++ mpi_errno = MPIDIG_mpi_win_detach(win, base); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_DETACH); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE); ++ ++ mpi_errno = MPIDIG_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_DYNAMIC); ++ ++ mpi_errno = MPIDIG_mpi_win_create_dynamic(info, comm, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_DYNAMIC); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_create_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_HOOK); ++ ++ /* This hook is called by CH4 generic call after CH4 initialization */ ++ if (MPIDI_OFI_ENABLE_RMA) { ++ mpi_errno = win_init(win); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ mpi_errno = win_allgather(win, win->base, win->disp_unit); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_win_allocate_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_HOOK); ++ ++ /* This hook is called by CH4 generic call after CH4 initialization */ ++ if (MPIDI_OFI_ENABLE_RMA) { ++ mpi_errno = win_init(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = win_allgather(win, win->base, win->disp_unit); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_win_allocate_shared_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ ++ /* This hook is called by CH4 generic call after CH4 initialization */ ++ if (MPIDI_OFI_ENABLE_RMA) { ++ mpi_errno = win_init(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = win_allgather(win, win->base, win->disp_unit); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_win_create_dynamic_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ ++ /* This hook is called by CH4 generic call after CH4 initialization */ ++ if (MPIDI_OFI_ENABLE_RMA) { ++ /* FIXME: should the OFI specific size be stored inside OFI rather ++ * than overwriting CH4 info ? Now we simply followed original ++ * create_dynamic routine.*/ ++ win->size = (uintptr_t) UINTPTR_MAX - (uintptr_t) MPI_BOTTOM; ++ ++ mpi_errno = win_init(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = win_allgather(win, win->base, win->disp_unit); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_OFI_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_ATTACH_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_ATTACH_HOOK); ++ ++ /* Do nothing */ ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_ATTACH_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_detach_hook(MPIR_Win * win, const void *base) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_DETACH_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_DETACH_HOOK); ++ ++ /* Do nothing */ ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_DETACH_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_OFI_mpi_win_free_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_MPI_WIN_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_MPI_WIN_FREE_HOOK); ++ ++ if (MPIDI_OFI_ENABLE_RMA) { ++ MPIDI_OFI_mr_key_free(MPIDI_OFI_WIN(win).win_id); ++ MPIDIU_map_erase(MPIDI_OFI_global.win_map, MPIDI_OFI_WIN(win).win_id); ++ /* For scalable EP: push transmit context index back into available pool. */ ++ if (MPIDI_OFI_WIN(win).sep_tx_idx != -1) { ++ utarray_push_back(MPIDI_OFI_global.rma_sep_idx_array, &(MPIDI_OFI_WIN(win).sep_tx_idx), ++ MPL_MEM_RMA); ++ } ++ if (MPIDI_OFI_WIN(win).ep != MPIDI_OFI_global.ctx[0].tx) ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).ep->fid), epclose); ++ if (MPIDI_OFI_WIN(win).cmpl_cntr != MPIDI_OFI_global.rma_cmpl_cntr) ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).cmpl_cntr->fid), cntrclose); ++ if (MPIDI_OFI_WIN(win).mr) ++ MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).mr->fid), mr_unreg); ++ MPL_free(MPIDI_OFI_WIN(win).winfo); ++ MPIDI_OFI_WIN(win).winfo = NULL; ++ MPL_free(MPIDI_OFI_WIN(win).acc_hint); ++ MPIDI_OFI_WIN(win).acc_hint = NULL; ++ } ++ /* This hook is called by CH4 generic call before CH4 finalization */ ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_MPI_WIN_FREE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpid/ch4/netmod/ofi/ofi_win.h ++++ b/src/mpid/ch4/netmod/ofi/ofi_win.h +@@ -14,560 +14,6 @@ + #include "ofi_impl.h" + #include + +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_accu_op_hint_get_index(MPIDI_CH4U_win_info_accu_op_shift_t +- hint_shift) +-{ +- int op_index = 0; +- switch (hint_shift) { +- case MPIDI_CH4I_ACCU_MAX_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_MAX, op_index); +- break; +- case MPIDI_CH4I_ACCU_MIN_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_MIN, op_index); +- break; +- case MPIDI_CH4I_ACCU_SUM_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_SUM, op_index); +- break; +- case MPIDI_CH4I_ACCU_PROD_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_PROD, op_index); +- break; +- case MPIDI_CH4I_ACCU_MAXLOC_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_MAXLOC, op_index); +- break; +- case MPIDI_CH4I_ACCU_MINLOC_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_MINLOC, op_index); +- break; +- case MPIDI_CH4I_ACCU_BAND_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_BAND, op_index); +- break; +- case MPIDI_CH4I_ACCU_BOR_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_BOR, op_index); +- break; +- case MPIDI_CH4I_ACCU_BXOR_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_BXOR, op_index); +- break; +- case MPIDI_CH4I_ACCU_LAND_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_LAND, op_index); +- break; +- case MPIDI_CH4I_ACCU_LOR_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_LOR, op_index); +- break; +- case MPIDI_CH4I_ACCU_LXOR_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_LXOR, op_index); +- break; +- case MPIDI_CH4I_ACCU_REPLACE_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_REPLACE, op_index); +- break; +- case MPIDI_CH4I_ACCU_NO_OP_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_NO_OP, op_index); +- break; +- case MPIDI_CH4I_ACCU_CSWAP_SHIFT: +- MPIDI_OFI_MPI_ACCU_OP_INDEX(MPI_OP_NULL, op_index); +- break; +- default: +- MPIR_Assert(hint_shift < MPIDI_CH4I_ACCU_OP_SHIFT_LAST); +- break; +- } +- return op_index; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_load_acc_hint +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_load_acc_hint(MPIR_Win * win) +-{ +- int op_index = 0, i; +- MPIDI_CH4U_win_info_accu_op_shift_t hint_shift = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_LOAD_ATOMIC_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_LOAD_ATOMIC_INFO); +- +- if (!MPIDI_OFI_WIN(win).acc_hint) +- MPIDI_OFI_WIN(win).acc_hint = MPL_malloc(sizeof(MPIDI_OFI_win_acc_hint_t), MPL_MEM_RMA); +- +- /* TODO: we assume all pes pass the same hint. Allreduce is needed to check +- * the maximal value or the spec must define it as same value on all pes. +- * Now we assume the spec requries same value on all pes. */ +- +- /* We translate the atomic op hints to max count allowed for all possible atomics with each +- * datatype. We do not need more specific info (e.g., , because any process may use +- * the op with accumulate or get_accumulate.*/ +- for (i = 0; i < MPIDI_OFI_DT_SIZES; i++) { +- MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[i] = 0; +- bool first_valid_op = true; +- +- for (hint_shift = 0; hint_shift < MPIDI_CH4I_ACCU_OP_SHIFT_LAST; hint_shift++) { +- uint64_t max_count = 0; +- /* Calculate the max count of all possible atomics if this op is enabled. +- * If the op is disabled for the datatype, the max counts are set to 0 (see util.c).*/ +- if (MPIDI_CH4U_WIN(win, info_args).which_accumulate_ops & (1 << hint_shift)) { +- op_index = MPIDI_OFI_accu_op_hint_get_index(hint_shift); +- +- /* Invalid pairs should be excluded as it is never used in a +- * correct program (e.g., ).*/ +- if (!MPIDI_Global.win_op_table[i][op_index].mpi_acc_valid) +- continue; +- +- if (hint_shift == MPIDI_CH4I_ACCU_NO_OP_SHIFT) /* atomic get */ +- max_count = MPIDI_Global.win_op_table[i][op_index].max_fetch_atomic_count; +- else if (hint_shift == MPIDI_CH4I_ACCU_CSWAP_SHIFT) /* compare and swap */ +- max_count = MPIDI_Global.win_op_table[i][op_index].max_compare_atomic_count; +- else /* atomic write and fetch_and_write */ +- max_count = MPL_MIN(MPIDI_Global.win_op_table[i][op_index].max_atomic_count, +- MPIDI_Global. +- win_op_table[i][op_index].max_fetch_atomic_count); +- +- /* calculate the minimal max_count. */ +- if (first_valid_op) { +- MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[i] = max_count; +- first_valid_op = false; +- } else +- MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[i] = +- MPL_MIN(max_count, MPIDI_OFI_WIN(win).acc_hint->dtypes_max_count[i]); +- } +- } +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_LOAD_ATOMIC_INFO); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_win_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_OFI_win_allgather(MPIR_Win * win, void *base, int disp_unit) +-{ +- int i, same_disp, mpi_errno = MPI_SUCCESS; +- uint32_t first; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_Comm *comm_ptr = win->comm_ptr; +- MPIDI_OFI_win_targetinfo_t *winfo; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_ALLGATHER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_ALLGATHER); +- +- if (MPIDI_OFI_ENABLE_MR_SCALABLE) { +- MPIDI_OFI_WIN(win).mr_key = MPIDI_OFI_WIN(win).win_id; +- } else { +- MPIDI_OFI_WIN(win).mr_key = 0; +- } +- +- /* Don't register MR for NULL buffer, because FI_MR_BASIC mode requires +- * that all registered memory regions must be backed by physical memory +- * pages at the time the registration call is made. */ +- if (MPIDI_OFI_ENABLE_MR_SCALABLE || base) { +- MPIDI_OFI_CALL(fi_mr_reg(MPIDI_Global.domain, /* In: Domain Object */ +- base, /* In: Lower memory address */ +- win->size, /* In: Length */ +- FI_REMOTE_READ | FI_REMOTE_WRITE, /* In: Expose MR for read */ +- 0ULL, /* In: offset(not used) */ +- MPIDI_OFI_WIN(win).mr_key, /* In: requested key */ +- 0ULL, /* In: flags */ +- &MPIDI_OFI_WIN(win).mr, /* Out: memregion object */ +- NULL), mr_reg); /* In: context */ +- } +- MPIDI_OFI_WIN(win).winfo = MPL_malloc(sizeof(*winfo) * comm_ptr->local_size, MPL_MEM_RMA); +- +- winfo = MPIDI_OFI_WIN(win).winfo; +- winfo[comm_ptr->rank].disp_unit = disp_unit; +- +- if (!MPIDI_OFI_ENABLE_MR_SCALABLE && MPIDI_OFI_WIN(win).mr) { +- /* MR_BASIC */ +- MPIDI_OFI_WIN(win).mr_key = fi_mr_key(MPIDI_OFI_WIN(win).mr); +- winfo[comm_ptr->rank].mr_key = MPIDI_OFI_WIN(win).mr_key; +- winfo[comm_ptr->rank].base = (uintptr_t) base; +- } +- +- mpi_errno = MPIR_Allgather(MPI_IN_PLACE, 0, +- MPI_DATATYPE_NULL, +- winfo, sizeof(*winfo), MPI_BYTE, comm_ptr, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIDI_OFI_ENABLE_MR_SCALABLE) { +- first = winfo[0].disp_unit; +- same_disp = 1; +- for (i = 1; i < comm_ptr->local_size; i++) { +- if (winfo[i].disp_unit != first) { +- same_disp = 0; +- break; +- } +- } +- if (same_disp) { +- MPL_free(MPIDI_OFI_WIN(win).winfo); +- MPIDI_OFI_WIN(win).winfo = NULL; +- } +- } +- +- MPIDI_OFI_load_acc_hint(win); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_ALLGATHER); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-/* +- * Setup per-window sync using independent counter. +- * +- * Return value: +- * MPI_SUCCESS: Endpoint is successfully initialized. +- * MPIDI_OFI_ENAVAIL: OFI resource is not available. +- * MPIDI_OFI_EPERROR: OFI endpoint related failures. +- * MPI_ERR_OTHER: Other error occurs. +- */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_win_set_per_win_sync +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_win_set_per_win_sync(MPIR_Win * win) +-{ +- int ret, mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_SET_PER_WIN_SYNC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_SET_PER_WIN_SYNC); +- +- struct fi_cntr_attr cntr_attr; +- memset(&cntr_attr, 0, sizeof(cntr_attr)); +- cntr_attr.events = FI_CNTR_EVENTS_COMP; +- cntr_attr.wait_obj = FI_WAIT_UNSPEC; +- MPIDI_OFI_CALL_RETURN(fi_cntr_open(MPIDI_Global.domain, /* In: Domain Object */ +- &cntr_attr, /* In: Configuration object */ +- &MPIDI_OFI_WIN(win).cmpl_cntr, /* Out: Counter Object */ +- NULL), ret); /* Context: counter events */ +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, "Failed to open completion counter.\n"); +- mpi_errno = MPIDI_OFI_ENAVAIL; +- goto fn_fail; +- } +- +- MPIDI_OFI_WIN(win).issued_cntr = &MPIDI_OFI_WIN(win).issued_cntr_v; +- +- MPIDI_OFI_CALL_RETURN(fi_ep_bind +- (MPIDI_OFI_WIN(win).ep, &MPIDI_OFI_WIN(win).cmpl_cntr->fid, +- FI_READ | FI_WRITE), ret); +- +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to bind completion counter to endpoint.\n"); +- /* Close and release completion counter resource. */ +- MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).cmpl_cntr->fid), cntrclose); +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_SET_PER_WIN_SYNC); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-/* +- * Initialize endpoint using scalable endpoint. +- * +- * Return value: +- * MPI_SUCCESS: Endpoint is successfully initialized. +- * MPIDI_OFI_ENAVAIL: OFI resource is not available. +- * MPIDI_OFI_EPERROR: OFI endpoint related failures. +- * MPI_ERR_OTHER: Other error occurs. +- */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_win_init_sep +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_win_init_sep(MPIR_Win * win) +-{ +- int i, ret, mpi_errno = MPI_SUCCESS; +- struct fi_info *finfo; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_INIT_SEP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_INIT_SEP); +- +- finfo = fi_dupinfo(MPIDI_Global.prov_use); +- MPIR_Assert(finfo); +- +- /* Initialize scalable EP when first window is created. */ +- if (MPIDI_Global.rma_sep == NULL) { +- /* Specify number of transmit context according user input and provider limit. */ +- MPIDI_Global.max_rma_sep_tx_cnt = MPL_MIN(MPIDI_Global.prov_use->domain_attr->max_ep_tx_ctx, +- MPIR_CVAR_CH4_OFI_MAX_RMA_SEP_CTX); +- finfo->ep_attr->tx_ctx_cnt = MPIDI_Global.max_rma_sep_tx_cnt; +- +- MPIDI_OFI_CALL_RETURN(fi_scalable_ep +- (MPIDI_Global.domain, finfo, &MPIDI_Global.rma_sep, NULL), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, "Failed to create scalable endpoint.\n"); +- MPIDI_Global.rma_sep = NULL; +- mpi_errno = MPIDI_OFI_ENAVAIL; +- goto fn_fail; +- } +- +- MPIDI_OFI_CALL_RETURN(fi_scalable_ep_bind(MPIDI_Global.rma_sep, &(MPIDI_Global.av->fid), 0), +- ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to bind scalable endpoint to address vector.\n"); +- MPIDI_Global.rma_sep = NULL; +- mpi_errno = MPIDI_OFI_ENAVAIL; +- goto fn_fail; +- } +- +- /* Allocate and initilize tx index array. */ +- utarray_new(MPIDI_Global.rma_sep_idx_array, &ut_int_icd, MPL_MEM_RMA); +- for (i = 0; i < MPIDI_Global.max_rma_sep_tx_cnt; i++) { +- utarray_push_back(MPIDI_Global.rma_sep_idx_array, &i, MPL_MEM_RMA); +- } +- } +- /* Set per window transmit attributes. */ +- MPIDI_OFI_set_rma_fi_info(win, finfo); +- /* Get available transmit context index. */ +- int *index = (int *) utarray_back(MPIDI_Global.rma_sep_idx_array); +- if (index == NULL) { +- mpi_errno = MPIDI_OFI_ENAVAIL; +- goto fn_fail; +- } +- /* Retrieve transmit context on scalable EP. */ +- MPIDI_OFI_CALL_RETURN(fi_tx_context +- (MPIDI_Global.rma_sep, *index, finfo->tx_attr, &(MPIDI_OFI_WIN(win).ep), +- NULL), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to retrieve transmit context from scalable endpoint.\n"); +- mpi_errno = MPIDI_OFI_ENAVAIL; +- goto fn_fail; +- } +- +- MPIDI_OFI_WIN(win).sep_tx_idx = *index; +- /* Pop this index out of reserving array. */ +- utarray_pop_back(MPIDI_Global.rma_sep_idx_array); +- +- MPIDI_OFI_CALL_RETURN(fi_ep_bind(MPIDI_OFI_WIN(win).ep, +- &MPIDI_Global.ctx[0].cq->fid, +- FI_TRANSMIT | FI_SELECTIVE_COMPLETION), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to bind endpoint to completion queue.\n"); +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- +- if (MPIDI_OFI_win_set_per_win_sync(win) == MPI_SUCCESS) { +- MPIDI_OFI_CALL_RETURN(fi_enable(MPIDI_OFI_WIN(win).ep), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, "Failed to activate endpoint.\n"); +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- } else { +- /* Fail in per-window sync initialization, +- * we are not using scalable endpoint without per-win sync support. */ +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- +- fn_exit: +- fi_freeinfo(finfo); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_INIT_SEP); +- return mpi_errno; +- fn_fail: +- if (MPIDI_OFI_WIN(win).sep_tx_idx != -1) { +- /* Push tx idx back into available pool. */ +- utarray_push_back(MPIDI_Global.rma_sep_idx_array, &MPIDI_OFI_WIN(win).sep_tx_idx, +- MPL_MEM_RMA); +- MPIDI_OFI_WIN(win).sep_tx_idx = -1; +- } +- if (MPIDI_OFI_WIN(win).ep != NULL) { +- /* Close an endpoint and release all resources associated with it. */ +- MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).ep->fid), epclose); +- MPIDI_OFI_WIN(win).ep = NULL; +- } +- goto fn_exit; +-} +- +-/* +- * Initialize endpoint using shared transmit context. +- * +- * Return value: +- * MPI_SUCCESS: Endpoint is successfully initialized. +- * MPIDI_OFI_ENAVAIL: OFI resource is not available. +- * MPIDI_OFI_EPERROR: OFI endpoint related failures. +- * MPI_ERR_OTHER: Other error occurs. +- */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_win_init_stx +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_OFI_win_init_stx(MPIR_Win * win) +-{ +- /* Activate per-window EP/counter using STX */ +- int ret, mpi_errno = MPI_SUCCESS; +- struct fi_info *finfo; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_INIT_STX); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_INIT_STX); +- +- finfo = fi_dupinfo(MPIDI_Global.prov_use); +- MPIR_Assert(finfo); +- +- /* Set per window transmit attributes. */ +- MPIDI_OFI_set_rma_fi_info(win, finfo); +- /* Still need to take out rx capabilities for shared context. */ +- finfo->rx_attr->caps = 0ULL; /* RX capabilities not needed */ +- +- finfo->ep_attr->tx_ctx_cnt = FI_SHARED_CONTEXT; /* Request a shared context */ +- finfo->ep_attr->rx_ctx_cnt = 0; /* We don't need RX contexts */ +- MPIDI_OFI_CALL_RETURN(fi_endpoint(MPIDI_Global.domain, +- finfo, &MPIDI_OFI_WIN(win).ep, NULL), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to create per-window EP using shared TX context, " +- "falling back to global EP/counter scheme"); +- mpi_errno = MPIDI_OFI_ENAVAIL; +- goto fn_fail; +- } +- +- if (MPIDI_OFI_win_set_per_win_sync(win) == MPI_SUCCESS) { +- MPIDI_OFI_CALL_RETURN(fi_ep_bind(MPIDI_OFI_WIN(win).ep, &MPIDI_Global.rma_stx_ctx->fid, 0), +- ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to bind endpoint to shared transmit contxt.\n"); +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- +- MPIDI_OFI_CALL_RETURN(fi_ep_bind(MPIDI_OFI_WIN(win).ep, +- &MPIDI_Global.ctx[0].cq->fid, +- FI_TRANSMIT | FI_SELECTIVE_COMPLETION), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to bind endpoint to completion queue.\n"); +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- +- MPIDI_OFI_CALL_RETURN(fi_ep_bind(MPIDI_OFI_WIN(win).ep, &MPIDI_Global.av->fid, 0), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "Failed to bind endpoint to address vector.\n"); +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- +- MPIDI_OFI_CALL_RETURN(fi_enable(MPIDI_OFI_WIN(win).ep), ret); +- if (ret < 0) { +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, "Failed to activate endpoint.\n"); +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- } else { +- /* If per-win sync initialization is failed, we are not using shared transmit context. */ +- mpi_errno = MPIDI_OFI_EPERROR; +- goto fn_fail; +- } +- +- fn_exit: +- fi_freeinfo(finfo); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_INIT_STX); +- return mpi_errno; +- fn_fail: +- if (MPIDI_OFI_WIN(win).ep != NULL) { +- /* Close an endpoint and release all resources associated with it. */ +- MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).ep->fid), epclose); +- MPIDI_OFI_WIN(win).ep = NULL; +- } +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_win_init_global +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_OFI_win_init_global(MPIR_Win * win) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_INIT_GLOBAL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_INIT_GLOBAL); +- +- MPIDI_OFI_WIN(win).ep = MPIDI_Global.ctx[0].tx; +- MPIDI_OFI_WIN(win).cmpl_cntr = MPIDI_Global.rma_cmpl_cntr; +- MPIDI_OFI_WIN(win).issued_cntr = &MPIDI_Global.rma_issued_cntr; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_INIT_GLOBAL); +- +- return 0; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_win_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_win_init(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- uint64_t window_instance, max_contexts_allowed; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_INIT); +- +- MPIR_Datatype_init_names(); +- MPIDI_OFI_index_datatypes(); +- +- CH4_COMPILE_TIME_ASSERT(sizeof(MPIDI_Devwin_t) >= sizeof(MPIDI_OFI_win_t)); +- CH4_COMPILE_TIME_ASSERT(sizeof(MPIDI_Devdt_t) >= sizeof(MPIDI_OFI_datatype_t)); +- +- memset(&MPIDI_OFI_WIN(win), 0, sizeof(MPIDI_OFI_win_t)); +- +- /* context id lower bits, window instance upper bits */ +- window_instance = +- MPIDI_OFI_index_allocator_alloc(MPIDI_OFI_COMM(win->comm_ptr).win_id_allocator, +- MPL_MEM_RMA); +- MPIR_ERR_CHKANDSTMT(window_instance >= MPIDI_Global.max_huge_rmas, mpi_errno, +- MPI_ERR_OTHER, goto fn_fail, "**ofid_mr_reg"); +- +- max_contexts_allowed = +- (uint64_t) 1 << (MPIDI_Global.max_rma_key_bits - MPIDI_Global.context_shift); +- MPIR_ERR_CHKANDSTMT(MPIR_CONTEXT_READ_FIELD(PREFIX, win->comm_ptr->context_id) +- >= max_contexts_allowed, mpi_errno, MPI_ERR_OTHER, +- goto fn_fail, "**ofid_mr_reg"); +- +- MPIDI_OFI_WIN(win).win_id = MPIDI_OFI_rma_key_pack(win->comm_ptr->context_id, +- MPIDI_OFI_KEY_TYPE_WINDOW, window_instance); +- +- MPIDI_CH4U_map_set(MPIDI_Global.win_map, MPIDI_OFI_WIN(win).win_id, win, MPL_MEM_RMA); +- +- MPIDI_OFI_WIN(win).sep_tx_idx = -1; /* By default, -1 means not using scalable EP. */ +- +- /* First, try to enable scalable EP. */ +- if (MPIR_CVAR_CH4_OFI_ENABLE_SCALABLE_ENDPOINTS && MPIR_CVAR_CH4_OFI_MAX_RMA_SEP_CTX > 0) { +- /* Create tx based on scalable EP. */ +- if (MPIDI_OFI_win_init_sep(win) == MPI_SUCCESS) { +- goto fn_exit; +- } +- } +- +- /* If scalable EP is not available, try shared transmit context next. */ +- /* Create tx using shared transmit context. */ +- if (MPIDI_OFI_win_init_stx(win) == MPI_SUCCESS) { +- goto fn_exit; +- } +- +- /* Fall back to use global EP, without per-window sync support. */ +- MPIDI_OFI_win_init_global(win); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_win_progress_fence +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_OFI_win_progress_fence(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -579,7 +25,6 @@ static inline int MPIDI_OFI_win_progress_fence(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFI_WIN_PROGRESS_FENCE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFI_WIN_PROGRESS_FENCE); + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); + tcount = *MPIDI_OFI_WIN(win).issued_cntr; + donecount = fi_cntr_read(MPIDI_OFI_WIN(win).cmpl_cntr); + +@@ -587,11 +32,9 @@ static inline int MPIDI_OFI_win_progress_fence(MPIR_Win * win) + + while (tcount > donecount) { + MPIR_Assert(donecount <= tcount); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIDI_OFI_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + donecount = fi_cntr_read(MPIDI_OFI_WIN(win).cmpl_cntr); + itercount++; + +@@ -602,7 +45,7 @@ static inline int MPIDI_OFI_win_progress_fence(MPIR_Win * win) + MPI_ERR_RMA_RANGE, + "**ofid_cntr_wait", + "**ofid_cntr_wait %s %d %s %s", +- __SHORT_FILE__, __LINE__, FCNAME, fi_strerror(-ret)); ++ __SHORT_FILE__, __LINE__, __func__, fi_strerror(-ret)); + itercount = 0; + } + } +@@ -617,33 +60,12 @@ static inline int MPIDI_OFI_win_progress_fence(MPIR_Win * win) + + MPIDI_OFI_WIN(win).syncQ = NULL; + fn_exit: +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_FI_MUTEX); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFI_WIN_PROGRESS_FENCE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_set_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); +- +- mpi_errno = MPIDI_CH4R_mpi_win_set_info(win, info); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -651,16 +73,12 @@ static inline int MPIDI_NM_mpi_win_start(MPIR_Group * group, int assert, MPIR_Wi + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_START); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_START); + +- mpi_errno = MPIDI_CH4R_mpi_win_start(group, assert, win); ++ mpi_errno = MPIDIG_mpi_win_start(group, assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_START); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_complete(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -668,19 +86,12 @@ static inline int MPIDI_NM_mpi_win_complete(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_COMPLETE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_COMPLETE); + +- mpi_errno = MPIDI_CH4R_mpi_win_complete(win); ++ mpi_errno = MPIDIG_mpi_win_complete(win); + +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_COMPLETE); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_post +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_post(MPIR_Group * group, int assert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -688,16 +99,12 @@ static inline int MPIDI_NM_mpi_win_post(MPIR_Group * group, int assert, MPIR_Win + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_POST); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_POST); + +- mpi_errno = MPIDI_CH4R_mpi_win_post(group, assert, win); ++ mpi_errno = MPIDIG_mpi_win_post(group, assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_POST); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_wait(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -705,16 +112,12 @@ static inline int MPIDI_NM_mpi_win_wait(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_WAIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_WAIT); + +- mpi_errno = MPIDI_CH4R_mpi_win_wait(win); ++ mpi_errno = MPIDIG_mpi_win_wait(win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_WAIT); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_test(MPIR_Win * win, int *flag) + { + int mpi_errno = MPI_SUCCESS; +@@ -722,16 +125,12 @@ static inline int MPIDI_NM_mpi_win_test(MPIR_Win * win, int *flag) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_TEST); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_TEST); + +- mpi_errno = MPIDI_CH4R_mpi_win_test(win, flag); ++ mpi_errno = MPIDIG_mpi_win_test(win, flag); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_TEST); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_lock(int lock_type, int rank, int assert, MPIR_Win * win, + MPIDI_av_entry_t * addr) + { +@@ -740,162 +139,37 @@ static inline int MPIDI_NM_mpi_win_lock(int lock_type, int rank, int assert, MPI + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_LOCK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_LOCK); + +- mpi_errno = MPIDI_CH4R_mpi_win_lock(lock_type, rank, assert, win); ++ mpi_errno = MPIDIG_mpi_win_lock(lock_type, rank, assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_LOCK); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_unlock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_unlock(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_UNLOCK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_UNLOCK); + +- mpi_errno = MPIDI_CH4R_mpi_win_unlock(rank, win); ++ mpi_errno = MPIDIG_mpi_win_unlock(rank, win); + +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_UNLOCK); + return mpi_errno; +- fn_fail: +- goto fn_exit; +- +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); +- +- mpi_errno = MPIDI_CH4R_mpi_win_get_info(win, info_p_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); +- return mpi_errno; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); + +- mpi_errno = MPIDI_CH4R_mpi_win_free(win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); +- return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_fence +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_fence(int massert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FENCE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FENCE); + +- mpi_errno = MPIDI_CH4R_mpi_win_fence(massert, win); ++ mpi_errno = MPIDIG_mpi_win_fence(massert, win); + +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FENCE); + return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_create(void *base, +- MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); +- +- mpi_errno = MPIDI_CH4R_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_attach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); +- +- mpi_errno = MPIDI_CH4R_mpi_win_attach(win, base, size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); +- return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_allocate_shared +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_allocate_shared(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); +- +- mpi_errno = MPIDI_CH4R_mpi_win_allocate_shared(size, disp_unit, info_ptr, +- comm_ptr, base_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); +- +- mpi_errno = MPIDI_CH4R_mpi_win_detach(win, base); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_shared_query +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_shared_query(MPIR_Win * win, + int rank, + MPI_Aint * size, int *disp_unit, void *baseptr) +@@ -905,150 +179,79 @@ static inline int MPIDI_NM_mpi_win_shared_query(MPIR_Win * win, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_SHARED_QUERY); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_SHARED_QUERY); + +- mpi_errno = MPIDI_CH4R_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); ++ mpi_errno = MPIDIG_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_SHARED_QUERY); + return mpi_errno; + } + +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_allocate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_allocate(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info, +- MPIR_Comm * comm, void *baseptr, MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); +- +- mpi_errno = MPIDI_CH4R_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_flush +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_flush(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH); + +- mpi_errno = MPIDI_CH4R_mpi_win_flush(rank, win); +- fn_exit: ++ mpi_errno = MPIDIG_mpi_win_flush(rank, win); ++ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_flush_local_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_flush_local_all(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_LOCAL_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_LOCAL_ALL); + +- mpi_errno = MPIDI_CH4R_mpi_win_flush_local_all(win); +- fn_exit: ++ mpi_errno = MPIDIG_mpi_win_flush_local_all(win); ++ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_LOCAL_ALL); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_unlock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_unlock_all(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_UNLOCK_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_UNLOCK_ALL); + +- mpi_errno = MPIDI_CH4R_mpi_win_unlock_all(win); ++ mpi_errno = MPIDIG_mpi_win_unlock_all(win); + +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_UNLOCK_ALL); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_create_dynamic +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_win_create_dynamic(MPIR_Info * info, +- MPIR_Comm * comm, MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); +- +- mpi_errno = MPIDI_CH4R_mpi_win_create_dynamic(info, comm, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_flush_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_flush_local(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_LOCAL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_LOCAL); + +- mpi_errno = MPIDI_CH4R_mpi_win_flush_local(rank, win); +- fn_exit: ++ mpi_errno = MPIDIG_mpi_win_flush_local(rank, win); ++ + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_LOCAL); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_sync +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_sync(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_SYNC); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_SYNC); + +- mpi_errno = MPIDI_CH4R_mpi_win_sync(win); ++ mpi_errno = MPIDIG_mpi_win_sync(win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_SYNC); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_flush_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_flush_all(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_ALL); + +- MPIDI_OFI_MPI_CALL_POP(MPIDI_CH4R_mpi_win_flush_all(win)); ++ MPIDI_OFI_MPI_CALL_POP(MPIDIG_mpi_win_flush_all(win)); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FLUSH_ALL); +@@ -1057,10 +260,6 @@ static inline int MPIDI_NM_mpi_win_flush_all(MPIR_Win * win) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_lock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_win_lock_all(int assert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -1068,215 +267,12 @@ static inline int MPIDI_NM_mpi_win_lock_all(int assert, MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_LOCK_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_LOCK_ALL); + +- mpi_errno = MPIDI_CH4R_mpi_win_lock_all(assert, win); ++ mpi_errno = MPIDIG_mpi_win_lock_all(assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_LOCK_ALL); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); +- +- /* This hook is called by CH4 generic call after CH4 initialization */ +- if (MPIDI_OFI_ENABLE_RMA) { +- mpi_errno = MPIDI_OFI_win_init(win); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- mpi_errno = MPIDI_OFI_win_allgather(win, win->base, win->disp_unit); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_allocate_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); +- +- /* This hook is called by CH4 generic call after CH4 initialization */ +- if (MPIDI_OFI_ENABLE_RMA) { +- mpi_errno = MPIDI_OFI_win_init(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIDI_OFI_win_allgather(win, win->base, win->disp_unit); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_allocate_shared_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_shared_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- +- /* This hook is called by CH4 generic call after CH4 initialization */ +- if (MPIDI_OFI_ENABLE_RMA) { +- mpi_errno = MPIDI_OFI_win_init(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIDI_OFI_win_allgather(win, win->base, win->disp_unit); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_create_dynamic_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_dynamic_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- +- /* This hook is called by CH4 generic call after CH4 initialization */ +- if (MPIDI_OFI_ENABLE_RMA) { +- /* FIXME: should the OFI specific size be stored inside OFI rather +- * than overwriting CH4 info ? Now we simply followed original +- * create_dynamic routine.*/ +- win->size = (uintptr_t) UINTPTR_MAX - (uintptr_t) MPI_BOTTOM; +- +- mpi_errno = MPIDI_OFI_win_init(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIDI_OFI_win_allgather(win, win->base, win->disp_unit); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_attach_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); +- +- /* Do nothing */ +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_detach_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_detach_hook(MPIR_Win * win, const void *base) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); +- +- /* Do nothing */ +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_win_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_free_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- uint32_t window_instance; +- int key_type; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); +- +- if (MPIDI_OFI_ENABLE_RMA) { +- MPIDI_OFI_rma_key_unpack(MPIDI_OFI_WIN(win).win_id, NULL, &key_type, &window_instance); +- MPIR_Assert(key_type == MPIDI_OFI_KEY_TYPE_WINDOW); +- +- MPIDI_OFI_index_allocator_free(MPIDI_OFI_COMM(win->comm_ptr).win_id_allocator, +- window_instance); +- MPIDI_CH4U_map_erase(MPIDI_Global.win_map, MPIDI_OFI_WIN(win).win_id); +- /* For scalable EP: push transmit context index back into available pool. */ +- if (MPIDI_OFI_WIN(win).sep_tx_idx != -1) { +- utarray_push_back(MPIDI_Global.rma_sep_idx_array, &(MPIDI_OFI_WIN(win).sep_tx_idx), +- MPL_MEM_RMA); +- } +- if (MPIDI_OFI_WIN(win).ep != MPIDI_Global.ctx[0].tx) +- MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).ep->fid), epclose); +- if (MPIDI_OFI_WIN(win).cmpl_cntr != MPIDI_Global.rma_cmpl_cntr) +- MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).cmpl_cntr->fid), cntrclose); +- if (MPIDI_OFI_WIN(win).mr) +- MPIDI_OFI_CALL(fi_close(&MPIDI_OFI_WIN(win).mr->fid), mr_unreg); +- if (MPIDI_OFI_WIN(win).winfo) { +- MPL_free(MPIDI_OFI_WIN(win).winfo); +- MPIDI_OFI_WIN(win).winfo = NULL; +- } +- MPL_free(MPIDI_OFI_WIN(win).acc_hint); +- MPIDI_OFI_WIN(win).acc_hint = NULL; +- } +- /* This hook is called by CH4 generic call before CH4 finalization */ +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_rma_win_cmpl_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_cmpl_hook(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -1294,10 +290,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_cmpl_hook(MPIR_Win * win) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_rma_win_local_cmpl_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_local_cmpl_hook(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +@@ -1315,10 +307,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_local_cmpl_hook(MPIR_Win * win) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_rma_target_cmpl_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_target_cmpl_hook(int rank ATTRIBUTE((unused)), + MPIR_Win * win) + { +@@ -1337,10 +325,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_target_cmpl_hook(int rank ATTRIBUTE((u + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_rma_target_local_cmpl_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_target_local_cmpl_hook(int rank ATTRIBUTE((unused)), + MPIR_Win * win) + { +--- a/src/mpid/ch4/netmod/ofi/subconfigure.m4 ++++ b/src/mpid/ch4/netmod/ofi/subconfigure.m4 +@@ -79,6 +79,9 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[ + enable_tcp="no" + enable_shm="no" + enable_mlx="no" ++ enable_perf="no" ++ enable_rstream="no" ++ enable_mrail="no" + else + enable_psm="yes" + enable_psm2="yes" +@@ -93,6 +96,9 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[ + enable_tcp="yes" + enable_shm="yes" + enable_mlx="yes" ++ enable_perf="yes" ++ enable_rstream="yes" ++ enable_mrail="yes" + fi + + for provider in $netmod_args ; do +@@ -160,7 +166,7 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[ + else + case "$netmod_args" in + "psm") +- AC_DEFINE([MPIDI_CH4_OFI_USE_SET_PSM], [1], [Define to use PSM capability set]) ++ AC_DEFINE([MPIDI_CH4_OFI_USE_SET_RUNTIME], [1], [Define to use runtime capability set]) + enable_psm="yes" + ;; + "psm2" | "opa") +@@ -172,7 +178,7 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[ + enable_sockets="yes" + ;; + "gni") +- AC_DEFINE([MPIDI_CH4_OFI_USE_SET_GNI], [1], [Define to use gni capability set]) ++ AC_DEFINE([MPIDI_CH4_OFI_USE_SET_RUNTIME], [1], [Define to use runtime capability set]) + enable_gni="yes" + ;; + "bgq") +@@ -235,6 +241,9 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[ + prov_config+=" --enable-tcp=${enable_tcp}" + prov_config+=" --enable-shm=${enable_shm}" + prov_config+=" --enable-mlx=${enable_mlx}" ++ prov_config+=" --enable-perf=${enable_perf}" ++ prov_config+=" --enable-rstream=${enable_rstream}" ++ prov_config+=" --enable-mrail=${enable_mrail}" + fi + + if test "x${ofi_direct_provider}" != "x" ; then +@@ -272,6 +281,18 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[ + fi + fi + ++ # check for libfabric depedence libs ++ pcdir="" ++ if test "${ofi_embedded}" = "yes" ; then ++ pcdir="${master_top_builddir}/src/mpid/ch4/netmod/ofi/libfabric" ++ elif test -f ${with_libfabric}/lib/pkgconfig/libfabric.pc ; then ++ pcdir="${with_libfabric}/lib/pkgconfig" ++ fi ++ PAC_LIB_DEPS(fabric, $pcdir) ++ if test "x$ac_libfabric_deps" != "x"; then ++ PAC_APPEND_FLAG([${ac_libfabric_deps}],[WRAPPER_LIBS]) ++ fi ++ + # Check for required functions + + # Does MPL provide MPL_aligned_malloc? +@@ -284,6 +305,21 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[ + [], + [AC_MSG_ERROR(MPL_aligned_alloc is required to build OFI netmod)]) + ++ AC_ARG_ENABLE(legacy-ofi, ++ [--enable-legacy-ofi ++ Allows OFI providers which do not support the minimum requirements for tagged communication. ++ Specifically, FI_TAGGED, completion queue data support of at least 4 bytes, FI_DIRECTED_RECV, ++ FI_DELIVERY_COMPLETE, FI_REMOTE_READ, FI_REMOTE_WRITE. Without enabling this, older or less ++ capable providers will have runtime failures. ++ level: ++ yes - Enabled ++ no - Disabled (default) ++ ],,enable_legacy_ofi=no) ++ ++ if test "$enable_legacy_ofi" = "yes"; then ++ AC_DEFINE(MPIDI_ENABLE_LEGACY_OFI, 1, [CH4/OFI should build in support for legacy OFI providers]) ++ fi ++ + ])dnl end AM_COND_IF(BUILD_CH4_NETMOD_OFI,...) + ])dnl end _BODY + +--- a/src/mpid/ch4/netmod/ofi/util.c ++++ b/src/mpid/ch4/netmod/ofi/util.c +@@ -13,17 +13,13 @@ + #include "ofi_impl.h" + #include "ofi_events.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_OFI_handle_cq_error_util +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_OFI_handle_cq_error_util(int vni_idx, ssize_t ret) ++int MPIDI_OFI_handle_cq_error_util(int vci_idx, ssize_t ret) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_HANDLE_CQ_ERROR); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_HANDLE_CQ_ERROR); + +- mpi_errno = MPIDI_OFI_handle_cq_error(vni_idx, ret); ++ mpi_errno = MPIDI_OFI_handle_cq_error(vci_idx, ret); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_HANDLE_CQ_ERROR); + return mpi_errno; +@@ -37,28 +33,23 @@ int MPIDI_OFI_retry_progress() + return MPIDI_Progress_test(MPIDI_PROGRESS_NM | MPIDI_PROGRESS_SHM); + } + +-typedef struct MPIDI_OFI_index_allocator_t { +- int chunk_size; +- int num_ints; +- int start; +- int last_free_index; ++typedef struct MPIDI_OFI_mr_key_allocator_t { ++ uint64_t chunk_size; ++ uint64_t num_ints; ++ uint64_t last_free_mr_key; + uint64_t *bitmask; +-} MPIDI_OFI_index_allocator_t; ++} MPIDI_OFI_mr_key_allocator_t; + +-void MPIDI_OFI_index_allocator_create(void **indexmap, int start, MPL_memory_class class) ++static MPIDI_OFI_mr_key_allocator_t mr_key_allocator; ++ ++void MPIDI_OFI_mr_key_allocator_init() + { +- MPIDI_OFI_index_allocator_t *allocator; +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); +- allocator = MPL_malloc(sizeof(MPIDI_OFI_index_allocator_t), class); +- allocator->chunk_size = 128; +- allocator->num_ints = allocator->chunk_size; +- allocator->start = start; +- allocator->last_free_index = 0; +- allocator->bitmask = MPL_malloc(sizeof(uint64_t) * allocator->num_ints, class); +- memset(allocator->bitmask, 0xFF, sizeof(uint64_t) * allocator->num_ints); +- assert(allocator != NULL); +- *indexmap = allocator; +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); ++ mr_key_allocator.chunk_size = 128; ++ mr_key_allocator.num_ints = mr_key_allocator.chunk_size; ++ mr_key_allocator.last_free_mr_key = 0; ++ mr_key_allocator.bitmask = MPL_malloc(sizeof(uint64_t) * mr_key_allocator.num_ints, ++ MPL_MEM_RMA); ++ memset(mr_key_allocator.bitmask, 0xFF, sizeof(uint64_t) * mr_key_allocator.num_ints); + } + + #define MPIDI_OFI_INDEX_CALC(val,nval,shift,mask) \ +@@ -66,15 +57,13 @@ void MPIDI_OFI_index_allocator_create(void **indexmap, int start, MPL_memory_cla + val >>= shift##ULL; \ + nval += shift; \ + } +-int MPIDI_OFI_index_allocator_alloc(void *indexmap, MPL_memory_class class) ++uint64_t MPIDI_OFI_mr_key_alloc() + { +- int i; +- MPIDI_OFI_index_allocator_t *allocator = indexmap; +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); +- for (i = allocator->last_free_index; i < allocator->num_ints; i++) { +- if (allocator->bitmask[i]) { ++ uint64_t i; ++ for (i = mr_key_allocator.last_free_mr_key; i < mr_key_allocator.num_ints; i++) { ++ if (mr_key_allocator.bitmask[i]) { + register uint64_t val, nval; +- val = allocator->bitmask[i]; ++ val = mr_key_allocator.bitmask[i]; + nval = 2; + MPIDI_OFI_INDEX_CALC(val, nval, 32, 0xFFFFFFFFULL); + MPIDI_OFI_INDEX_CALC(val, nval, 16, 0xFFFFULL); +@@ -82,59 +71,51 @@ int MPIDI_OFI_index_allocator_alloc(void *indexmap, MPL_memory_class class) + MPIDI_OFI_INDEX_CALC(val, nval, 4, 0xFULL); + MPIDI_OFI_INDEX_CALC(val, nval, 2, 0x3ULL); + nval -= val & 0x1ULL; +- allocator->bitmask[i] &= ~(0x1ULL << (nval - 1)); +- allocator->last_free_index = i; +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); +- return i * sizeof(uint64_t) * 8 + (nval - 1) + allocator->start; ++ mr_key_allocator.bitmask[i] &= ~(0x1ULL << (nval - 1)); ++ mr_key_allocator.last_free_mr_key = i; ++ return i * sizeof(uint64_t) * 8 + (nval - 1); + } +- if (i == allocator->num_ints - 1) { +- allocator->num_ints += allocator->chunk_size; +- allocator->bitmask = MPL_realloc(allocator->bitmask, +- sizeof(uint64_t) * allocator->num_ints, class); +- MPIR_Assert(allocator->bitmask); +- memset(&allocator->bitmask[i + 1], 0xFF, sizeof(uint64_t) * allocator->chunk_size); ++ if (i == mr_key_allocator.num_ints - 1) { ++ mr_key_allocator.num_ints += mr_key_allocator.chunk_size; ++ mr_key_allocator.bitmask = MPL_realloc(mr_key_allocator.bitmask, ++ sizeof(uint64_t) * mr_key_allocator.num_ints, ++ MPL_MEM_RMA); ++ MPIR_Assert(mr_key_allocator.bitmask); ++ memset(&mr_key_allocator.bitmask[i + 1], 0xFF, ++ sizeof(uint64_t) * mr_key_allocator.chunk_size); + } + } +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); + return -1; + } + +-void MPIDI_OFI_index_allocator_free(void *indexmap, int index) ++void MPIDI_OFI_mr_key_free(uint64_t idx) + { +- int int_index, bitpos, numbits; +- MPIDI_OFI_index_allocator_t *allocator = indexmap; +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); ++ uint64_t int_index, bitpos, numbits; + numbits = sizeof(uint64_t) * 8; +- int_index = (index + 1 - allocator->start) / numbits; +- bitpos = (index - allocator->start) % numbits; ++ int_index = (idx + 1) / numbits; ++ bitpos = idx % numbits; + +- allocator->last_free_index = MPL_MIN(int_index, allocator->last_free_index); +- allocator->bitmask[int_index] |= (0x1ULL << bitpos); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); ++ mr_key_allocator.last_free_mr_key = MPL_MIN(int_index, mr_key_allocator.last_free_mr_key); ++ mr_key_allocator.bitmask[int_index] |= (0x1ULL << bitpos); + } + +-void MPIDI_OFI_index_allocator_destroy(void *indexmap) ++void MPIDI_OFI_mr_key_allocator_destroy() + { +- MPIDI_OFI_index_allocator_t *allocator; +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); +- allocator = (MPIDI_OFI_index_allocator_t *) indexmap; +- MPL_free(allocator->bitmask); +- MPL_free(allocator); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_OFI_THREAD_UTIL_MUTEX); ++ MPL_free(mr_key_allocator.bitmask); + } + + /* Translate the control message to get a huge message into a request to + * actually perform the data transfer. */ + static inline int MPIDI_OFI_get_huge(MPIDI_OFI_send_control_t * info) + { +- MPIDI_OFI_huge_recv_t *recv = NULL; ++ MPIDI_OFI_huge_recv_t *recv_elem = NULL; + MPIR_Comm *comm_ptr; + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_GET_HUGE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_GET_HUGE); + + /* Look up the communicator */ +- comm_ptr = MPIDI_CH4U_context_id_to_comm(info->comm_id); ++ comm_ptr = MPIDIG_context_id_to_comm(info->comm_id); + + /* If there has been a posted receive, search through the list of unmatched + * receives to find the one that goes with the incoming message. */ +@@ -155,9 +136,9 @@ static inline int MPIDI_OFI_get_huge(MPIDI_OFI_send_control_t * info) + + LL_DELETE(MPIDI_posted_huge_recv_head, MPIDI_posted_huge_recv_tail, list_ptr); + +- recv = (MPIDI_OFI_huge_recv_t *) +- MPIDI_CH4U_map_lookup(MPIDI_OFI_COMM(comm_ptr).huge_recv_counters, +- list_ptr->rreq->handle); ++ recv_elem = (MPIDI_OFI_huge_recv_t *) ++ MPIDIU_map_lookup(MPIDI_OFI_COMM(comm_ptr).huge_recv_counters, ++ list_ptr->rreq->handle); + + MPL_free(list_ptr); + break; +@@ -165,26 +146,26 @@ static inline int MPIDI_OFI_get_huge(MPIDI_OFI_send_control_t * info) + } + } + +- if (recv == NULL) { /* Put the struct describing the transfer on an +- * unexpected list to be retrieved later */ ++ if (recv_elem == NULL) { /* Put the struct describing the transfer on an ++ * unexpected list to be retrieved later */ + MPL_DBG_MSG_FMT(MPIR_DBG_PT2PT, VERBOSE, + (MPL_DBG_FDEST, "CREATING UNEXPECTED HUGE RECV: (%d, %d, %d)", + info->comm_id, info->origin_rank, info->tag)); + + /* If this is unexpected, create a new tracker and put it in the unexpected list. */ +- recv = (MPIDI_OFI_huge_recv_t *) MPL_calloc(sizeof(*recv), 1, MPL_MEM_COMM); +- if (!recv) ++ recv_elem = (MPIDI_OFI_huge_recv_t *) MPL_calloc(sizeof(*recv_elem), 1, MPL_MEM_COMM); ++ if (!recv_elem) + MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); + +- LL_APPEND(MPIDI_unexp_huge_recv_head, MPIDI_unexp_huge_recv_tail, recv); ++ LL_APPEND(MPIDI_unexp_huge_recv_head, MPIDI_unexp_huge_recv_tail, recv_elem); + } + +- recv->event_id = MPIDI_OFI_EVENT_GET_HUGE; +- recv->cur_offset = MPIDI_Global.max_send; +- recv->remote_info = *info; +- recv->comm_ptr = comm_ptr; +- recv->next = NULL; +- MPIDI_OFI_get_huge_event(NULL, (MPIR_Request *) recv); ++ recv_elem->event_id = MPIDI_OFI_EVENT_GET_HUGE; ++ recv_elem->cur_offset = MPIDI_OFI_global.max_msg_size; ++ recv_elem->remote_info = *info; ++ recv_elem->comm_ptr = comm_ptr; ++ recv_elem->next = NULL; ++ MPIDI_OFI_get_huge_event(NULL, (MPIR_Request *) recv_elem); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_GET_HUGE); + +@@ -197,6 +178,7 @@ static inline int MPIDI_OFI_get_huge(MPIDI_OFI_send_control_t * info) + int MPIDI_OFI_control_handler(int handler_id, void *am_hdr, + void **data, + size_t * data_sz, ++ int is_local, + int *is_contig, + MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) + { +@@ -207,7 +189,7 @@ int MPIDI_OFI_control_handler(int handler_id, void *am_hdr, + + switch (ctrlsend->type) { + case MPIDI_OFI_CTRL_HUGEACK:{ +- mpi_errno = MPIDI_OFI_dispatch_function(NULL, ctrlsend->ackreq, 0); ++ mpi_errno = MPIDI_OFI_dispatch_function(NULL, ctrlsend->ackreq); + goto fn_exit; + } + break; +@@ -260,10 +242,6 @@ int MPIDI_OFI_control_handler(int handler_id, void *am_hdr, + #define isDOUBLE_COMPLEX(x) ((x) == MPI_DOUBLE_COMPLEX || (x) == MPI_COMPLEX8 || \ + (x) == MPI_C_DOUBLE_COMPLEX) + +-#undef FUNCNAME +-#define FUNCNAME check_mpi_acc_valid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(check_mpi_acc_valid) + MPL_STATIC_INLINE_PREFIX bool check_mpi_acc_valid(MPI_Datatype dtype, MPI_Op op) + { + bool valid_flag = false; +@@ -287,10 +265,6 @@ MPL_STATIC_INLINE_PREFIX bool check_mpi_acc_valid(MPI_Datatype dtype, MPI_Op op) + return valid_flag; + } + +-#undef FUNCNAME +-#define FUNCNAME mpi_to_ofi +-#undef FCNAME +-#define FCNAME MPL_QUOTE(mpi_to_ofi) + static inline int mpi_to_ofi(MPI_Datatype dt, enum fi_datatype *fi_dt, MPI_Op op, enum fi_op *fi_op) + { + *fi_dt = FI_DATATYPE_LAST; +@@ -453,10 +427,10 @@ static MPI_Op mpi_ops[] = { + MPI_REPLACE, MPI_NO_OP, MPI_OP_NULL, + }; + +-#define _TBL MPIDI_Global.win_op_table[i][j] ++#define _TBL MPIDI_OFI_global.win_op_table[i][j] + #define CHECK_ATOMIC(fcn,field1,field2) \ + atomic_count = 0; \ +- ret = fcn(MPIDI_Global.ctx[0].tx, \ ++ ret = fcn(MPIDI_OFI_global.ctx[0].tx, \ + fi_dt, \ + fi_op, \ + &atomic_count); \ +@@ -516,103 +490,103 @@ static inline void create_dt_map() + } + } + +-static inline void add_index(MPI_Datatype datatype, int *index) ++static inline void add_index(MPI_Datatype datatype, int *idx) + { + MPIR_Datatype *dt_ptr; + MPIR_Datatype_get_ptr(datatype, dt_ptr); +- MPIDI_OFI_DATATYPE(dt_ptr).index = *index; +- (*index)++; ++ MPIDI_OFI_DATATYPE(dt_ptr).index = *idx; ++ (*idx)++; + } + + void MPIDI_OFI_index_datatypes() + { + static bool needs_init = true; +- int index = 0; ++ int idx = 0; + + if (!needs_init) + return; + +- add_index(MPI_CHAR, &index); +- add_index(MPI_UNSIGNED_CHAR, &index); +- add_index(MPI_SIGNED_CHAR, &index); +- add_index(MPI_BYTE, &index); +- add_index(MPI_WCHAR, &index); +- add_index(MPI_SHORT, &index); +- add_index(MPI_UNSIGNED_SHORT, &index); +- add_index(MPI_INT, &index); +- add_index(MPI_UNSIGNED, &index); +- add_index(MPI_LONG, &index); /* count=10 */ +- add_index(MPI_UNSIGNED_LONG, &index); +- add_index(MPI_FLOAT, &index); +- add_index(MPI_DOUBLE, &index); +- add_index(MPI_LONG_DOUBLE, &index); +- add_index(MPI_LONG_LONG, &index); +- add_index(MPI_UNSIGNED_LONG_LONG, &index); +- add_index(MPI_PACKED, &index); +- add_index(MPI_LB, &index); +- add_index(MPI_UB, &index); +- add_index(MPI_2INT, &index); /* count=20 */ ++ add_index(MPI_CHAR, &idx); ++ add_index(MPI_UNSIGNED_CHAR, &idx); ++ add_index(MPI_SIGNED_CHAR, &idx); ++ add_index(MPI_BYTE, &idx); ++ add_index(MPI_WCHAR, &idx); ++ add_index(MPI_SHORT, &idx); ++ add_index(MPI_UNSIGNED_SHORT, &idx); ++ add_index(MPI_INT, &idx); ++ add_index(MPI_UNSIGNED, &idx); ++ add_index(MPI_LONG, &idx); /* count=10 */ ++ add_index(MPI_UNSIGNED_LONG, &idx); ++ add_index(MPI_FLOAT, &idx); ++ add_index(MPI_DOUBLE, &idx); ++ add_index(MPI_LONG_DOUBLE, &idx); ++ add_index(MPI_LONG_LONG, &idx); ++ add_index(MPI_UNSIGNED_LONG_LONG, &idx); ++ add_index(MPI_PACKED, &idx); ++ add_index(MPI_LB, &idx); ++ add_index(MPI_UB, &idx); ++ add_index(MPI_2INT, &idx); /* count=20 */ + + /* C99 types */ +- add_index(MPI_INT8_T, &index); +- add_index(MPI_INT16_T, &index); +- add_index(MPI_INT32_T, &index); +- add_index(MPI_INT64_T, &index); +- add_index(MPI_UINT8_T, &index); +- add_index(MPI_UINT16_T, &index); +- add_index(MPI_UINT32_T, &index); +- add_index(MPI_UINT64_T, &index); +- add_index(MPI_C_BOOL, &index); +- add_index(MPI_C_FLOAT_COMPLEX, &index); /* count=30 */ +- add_index(MPI_C_DOUBLE_COMPLEX, &index); +- add_index(MPI_C_LONG_DOUBLE_COMPLEX, &index); ++ add_index(MPI_INT8_T, &idx); ++ add_index(MPI_INT16_T, &idx); ++ add_index(MPI_INT32_T, &idx); ++ add_index(MPI_INT64_T, &idx); ++ add_index(MPI_UINT8_T, &idx); ++ add_index(MPI_UINT16_T, &idx); ++ add_index(MPI_UINT32_T, &idx); ++ add_index(MPI_UINT64_T, &idx); ++ add_index(MPI_C_BOOL, &idx); ++ add_index(MPI_C_FLOAT_COMPLEX, &idx); /* count=30 */ ++ add_index(MPI_C_DOUBLE_COMPLEX, &idx); ++ add_index(MPI_C_LONG_DOUBLE_COMPLEX, &idx); + + /* address/offset/count types */ +- add_index(MPI_AINT, &index); +- add_index(MPI_OFFSET, &index); +- add_index(MPI_COUNT, &index); /* count=35 */ ++ add_index(MPI_AINT, &idx); ++ add_index(MPI_OFFSET, &idx); ++ add_index(MPI_COUNT, &idx); /* count=35 */ + + /* Fortran types (count=23) */ + #ifdef HAVE_FORTRAN_BINDING +- add_index(MPI_COMPLEX, &index); +- add_index(MPI_DOUBLE_COMPLEX, &index); +- add_index(MPI_LOGICAL, &index); +- add_index(MPI_REAL, &index); +- add_index(MPI_DOUBLE_PRECISION, &index); /* count=40 */ +- add_index(MPI_INTEGER, &index); +- add_index(MPI_2INTEGER, &index); ++ add_index(MPI_COMPLEX, &idx); ++ add_index(MPI_DOUBLE_COMPLEX, &idx); ++ add_index(MPI_LOGICAL, &idx); ++ add_index(MPI_REAL, &idx); ++ add_index(MPI_DOUBLE_PRECISION, &idx); /* count=40 */ ++ add_index(MPI_INTEGER, &idx); ++ add_index(MPI_2INTEGER, &idx); + #ifdef MPICH_DEFINE_2COMPLEX +- add_index(MPI_2COMPLEX, &index); +- add_index(MPI_2DOUBLE_COMPLEX, &index); ++ add_index(MPI_2COMPLEX, &idx); ++ add_index(MPI_2DOUBLE_COMPLEX, &idx); + #endif +- add_index(MPI_2REAL, &index); +- add_index(MPI_2DOUBLE_PRECISION, &index); +- add_index(MPI_CHARACTER, &index); +- add_index(MPI_REAL4, &index); +- add_index(MPI_REAL8, &index); +- add_index(MPI_REAL16, &index); /* count=50 */ +- add_index(MPI_COMPLEX8, &index); +- add_index(MPI_COMPLEX16, &index); +- add_index(MPI_COMPLEX32, &index); +- add_index(MPI_INTEGER1, &index); +- add_index(MPI_INTEGER2, &index); +- add_index(MPI_INTEGER4, &index); +- add_index(MPI_INTEGER8, &index); ++ add_index(MPI_2REAL, &idx); ++ add_index(MPI_2DOUBLE_PRECISION, &idx); ++ add_index(MPI_CHARACTER, &idx); ++ add_index(MPI_REAL4, &idx); ++ add_index(MPI_REAL8, &idx); ++ add_index(MPI_REAL16, &idx); /* count=50 */ ++ add_index(MPI_COMPLEX8, &idx); ++ add_index(MPI_COMPLEX16, &idx); ++ add_index(MPI_COMPLEX32, &idx); ++ add_index(MPI_INTEGER1, &idx); ++ add_index(MPI_INTEGER2, &idx); ++ add_index(MPI_INTEGER4, &idx); ++ add_index(MPI_INTEGER8, &idx); + + if (MPI_INTEGER16 == MPI_DATATYPE_NULL) +- index++; ++ idx++; + else +- add_index(MPI_INTEGER16, &index); ++ add_index(MPI_INTEGER16, &idx); + + #endif +- add_index(MPI_FLOAT_INT, &index); +- add_index(MPI_DOUBLE_INT, &index); /* count=60 */ +- add_index(MPI_LONG_INT, &index); +- add_index(MPI_SHORT_INT, &index); +- add_index(MPI_LONG_DOUBLE_INT, &index); ++ add_index(MPI_FLOAT_INT, &idx); ++ add_index(MPI_DOUBLE_INT, &idx); /* count=60 */ ++ add_index(MPI_LONG_INT, &idx); ++ add_index(MPI_SHORT_INT, &idx); ++ add_index(MPI_LONG_DOUBLE_INT, &idx); + + /* check if static dt_size is correct */ +- MPIR_Assert(MPIDI_OFI_DT_SIZES == index); ++ MPIR_Assert(MPIDI_OFI_DT_SIZES == idx); + + /* do not generate map when atomics are not enabled */ + if (MPIDI_OFI_ENABLE_ATOMICS) +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/Makefile.mk ++++ /dev/null +@@ -1,7 +0,0 @@ +-if BUILD_CH4_NETMOD_PORTALS4 +- +-mpi_core_sources += src/mpid/ch4/netmod/portals4/globals.c \ +- src/mpid/ch4/netmod/portals4/func_table.c +-errnames_txt_files += src/mpid/ch4/netmod/portals4/errnames.txt +- +-endif +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/errnames.txt ++++ /dev/null +@@ -1,10 +0,0 @@ +-**PtlInit:PtlInit failed +-**PtlInit %s %d %s %s:PtlInit failed (%s %d %s %s) +-**PtlNIInit:PtlNIInit failed +-**PtlNIInit %s %d %s %s:PtlNIInit failed (%s %d %s %s) +-**PtlEQAlloc:PtlEQAlloc failed +-**PtlEQAlloc %s %d %s %s:PtlEQAlloc failed (%s %d %s %s) +-**PtlPTAlloc:PtlPTAlloc failed +-**PtlPTAlloc %s %d %s %s:PtlPTAlloc failed (%s %d %s %s) +-**PtlMDBind:PtlMDBind failed +-**PtlMDBind %s %d %s %s:PtlMDBind failed (%s %d %s %s) +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/func_table.c ++++ /dev/null +@@ -1,185 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include "mpl.h" +- +-MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; +- +-#ifndef NETMOD_INLINE +-#define NETMOD_DISABLE_INLINES +-#include "mpidimpl.h" +-#include "netmod_inline.h" +- +-MPIDI_NM_funcs_t MPIDI_NM_portals4_funcs = { +- MPIDI_NM_mpi_init_hook, +- MPIDI_NM_mpi_finalize_hook, +- MPIDI_NM_progress, +- MPIDI_NM_mpi_comm_connect, +- MPIDI_NM_mpi_comm_disconnect, +- MPIDI_NM_mpi_open_port, +- MPIDI_NM_mpi_close_port, +- MPIDI_NM_mpi_comm_accept, +- MPIDI_NM_comm_get_lpid, +- MPIDI_NM_get_local_upids, +- MPIDI_NM_upids_to_lupids, +- MPIDI_NM_create_intercomm_from_lpids, +- MPIDI_NM_mpi_comm_create_hook, +- MPIDI_NM_mpi_comm_free_hook, +- MPIDI_NM_mpi_win_create_hook, +- MPIDI_NM_mpi_win_allocate_hook, +- MPIDI_NM_mpi_win_allocate_shared_hook, +- MPIDI_NM_mpi_win_create_dynamic_hook, +- MPIDI_NM_mpi_win_attach_hook, +- MPIDI_NM_mpi_win_detach_hook, +- MPIDI_NM_mpi_win_free_hook, +- MPIDI_NM_rma_win_cmpl_hook, +- MPIDI_NM_rma_win_local_cmpl_hook, +- MPIDI_NM_rma_target_cmpl_hook, +- MPIDI_NM_rma_target_local_cmpl_hook, +- MPIDI_NM_am_request_init, +- MPIDI_NM_am_request_finalize, +- MPIDI_NM_am_send_hdr, +- MPIDI_NM_am_isend, +- MPIDI_NM_am_isendv, +- MPIDI_NM_am_send_hdr_reply, +- MPIDI_NM_am_isend_reply, +- MPIDI_NM_am_hdr_max_sz, +- MPIDI_NM_am_recv, +-}; +- +-MPIDI_NM_native_funcs_t MPIDI_NM_native_portals4_funcs = { +- MPIDI_NM_mpi_send, +- MPIDI_NM_mpi_ssend, +- MPIDI_NM_mpi_startall, +- MPIDI_NM_mpi_send_init, +- MPIDI_NM_mpi_ssend_init, +- MPIDI_NM_mpi_rsend_init, +- MPIDI_NM_mpi_bsend_init, +- MPIDI_NM_mpi_isend, +- MPIDI_NM_mpi_issend, +- MPIDI_NM_mpi_cancel_send, +- MPIDI_NM_mpi_recv_init, +- MPIDI_NM_mpi_recv, +- MPIDI_NM_mpi_irecv, +- MPIDI_NM_mpi_imrecv, +- MPIDI_NM_mpi_cancel_recv, +- MPIDI_NM_mpi_alloc_mem, +- MPIDI_NM_mpi_free_mem, +- MPIDI_NM_mpi_improbe, +- MPIDI_NM_mpi_iprobe, +- MPIDI_NM_mpi_win_set_info, +- MPIDI_NM_mpi_win_shared_query, +- MPIDI_NM_mpi_put, +- MPIDI_NM_mpi_win_start, +- MPIDI_NM_mpi_win_complete, +- MPIDI_NM_mpi_win_post, +- MPIDI_NM_mpi_win_wait, +- MPIDI_NM_mpi_win_test, +- MPIDI_NM_mpi_win_lock, +- MPIDI_NM_mpi_win_unlock, +- MPIDI_NM_mpi_win_get_info, +- MPIDI_NM_mpi_get, +- MPIDI_NM_mpi_win_free, +- MPIDI_NM_mpi_win_fence, +- MPIDI_NM_mpi_win_create, +- MPIDI_NM_mpi_accumulate, +- MPIDI_NM_mpi_win_attach, +- MPIDI_NM_mpi_win_allocate_shared, +- MPIDI_NM_mpi_rput, +- MPIDI_NM_mpi_win_flush_local, +- MPIDI_NM_mpi_win_detach, +- MPIDI_NM_mpi_compare_and_swap, +- MPIDI_NM_mpi_raccumulate, +- MPIDI_NM_mpi_rget_accumulate, +- MPIDI_NM_mpi_fetch_and_op, +- MPIDI_NM_mpi_win_allocate, +- MPIDI_NM_mpi_win_flush, +- MPIDI_NM_mpi_win_flush_local_all, +- MPIDI_NM_mpi_win_unlock_all, +- MPIDI_NM_mpi_win_create_dynamic, +- MPIDI_NM_mpi_rget, +- MPIDI_NM_mpi_win_sync, +- MPIDI_NM_mpi_win_flush_all, +- MPIDI_NM_mpi_get_accumulate, +- MPIDI_NM_mpi_win_lock_all, +- MPIDI_NM_rank_is_local, +- MPIDI_NM_mpi_barrier, +- MPIDI_NM_mpi_bcast, +- MPIDI_NM_mpi_allreduce, +- MPIDI_NM_mpi_allgather, +- MPIDI_NM_mpi_allgatherv, +- MPIDI_NM_mpi_scatter, +- MPIDI_NM_mpi_scatterv, +- MPIDI_NM_mpi_gather, +- MPIDI_NM_mpi_gatherv, +- MPIDI_NM_mpi_alltoall, +- MPIDI_NM_mpi_alltoallv, +- MPIDI_NM_mpi_alltoallw, +- MPIDI_NM_mpi_reduce, +- MPIDI_NM_mpi_reduce_scatter, +- MPIDI_NM_mpi_reduce_scatter_block, +- MPIDI_NM_mpi_scan, +- MPIDI_NM_mpi_exscan, +- MPIDI_NM_mpi_neighbor_allgather, +- MPIDI_NM_mpi_neighbor_allgatherv, +- MPIDI_NM_mpi_neighbor_alltoall, +- MPIDI_NM_mpi_neighbor_alltoallv, +- MPIDI_NM_mpi_neighbor_alltoallw, +- MPIDI_NM_mpi_ineighbor_allgather, +- MPIDI_NM_mpi_ineighbor_allgatherv, +- MPIDI_NM_mpi_ineighbor_alltoall, +- MPIDI_NM_mpi_ineighbor_alltoallv, +- MPIDI_NM_mpi_ineighbor_alltoallw, +- MPIDI_NM_mpi_ibarrier, +- MPIDI_NM_mpi_ibcast, +- MPIDI_NM_mpi_iallgather, +- MPIDI_NM_mpi_iallgatherv, +- MPIDI_NM_mpi_iallreduce, +- MPIDI_NM_mpi_ialltoall, +- MPIDI_NM_mpi_ialltoallv, +- MPIDI_NM_mpi_ialltoallw, +- MPIDI_NM_mpi_iexscan, +- MPIDI_NM_mpi_igather, +- MPIDI_NM_mpi_igatherv, +- MPIDI_NM_mpi_ireduce_scatter_block, +- MPIDI_NM_mpi_ireduce_scatter, +- MPIDI_NM_mpi_ireduce, +- MPIDI_NM_mpi_iscan, +- MPIDI_NM_mpi_iscatter, +- MPIDI_NM_mpi_iscatterv, +- MPIDI_NM_mpi_ibarrier_sched, +- MPIDI_NM_mpi_ibcast_sched, +- MPIDI_NM_mpi_iallgather_sched, +- MPIDI_NM_mpi_iallgatherv_sched, +- MPIDI_NM_mpi_iallreduce_sched, +- MPIDI_NM_mpi_ialltoall_sched, +- MPIDI_NM_mpi_ialltoallv_sched, +- MPIDI_NM_mpi_ialltoallw_sched, +- MPIDI_NM_mpi_iexscan_sched, +- MPIDI_NM_mpi_igather_sched, +- MPIDI_NM_mpi_igatherv_sched, +- MPIDI_NM_mpi_ireduce_scatter_block_sched, +- MPIDI_NM_mpi_ireduce_scatter_sched, +- MPIDI_NM_mpi_ireduce_sched, +- MPIDI_NM_mpi_iscan_sched, +- MPIDI_NM_mpi_iscatter_sched, +- MPIDI_NM_mpi_iscatterv_sched, +- MPIDI_NM_mpi_ineighbor_allgather_sched, +- MPIDI_NM_mpi_ineighbor_allgatherv_sched, +- MPIDI_NM_mpi_ineighbor_alltoall_sched, +- MPIDI_NM_mpi_ineighbor_alltoallv_sched, +- MPIDI_NM_mpi_ineighbor_alltoallw_sched, +- MPIDI_NM_mpi_type_commit_hook, +- MPIDI_NM_mpi_type_free_hook, +- MPIDI_NM_mpi_op_commit_hook, +- MPIDI_NM_mpi_op_free_hook +-}; +-#endif +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/globals.c ++++ /dev/null +@@ -1,14 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#include "ptl_impl.h" +-#include "ptl_types.h" +- +-MPIDI_PTL_global_t MPIDI_PTL_global = { 0 }; +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/netmod_inline.h ++++ /dev/null +@@ -1,31 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef NETMOD_INLINE_H_INCLUDED +-#define NETMOD_INLINE_H_INCLUDED +-#include "ptl_init.h" +-#include "ptl_types.h" +-#include "ptl_probe.h" +-#include "ptl_progress.h" +-#include "ptl_recv.h" +-#include "ptl_request.h" +-#include "ptl_send.h" +-#include "ptl_startall.h" +-#include "ptl_win.h" +-#include "ptl_rma.h" +-#include "ptl_am.h" +-#include "ptl_spawn.h" +-#include "ptl_comm.h" +-#include "ptl_unimpl.h" +-#include "ptl_proc.h" +-#include "ptl_coll.h" +-#include "ptl_datatype.h" +-#include "ptl_op.h" +-#endif /* NETMOD_INLINE_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/portals4_pre.h ++++ /dev/null +@@ -1,47 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#ifndef PORTALS4_PRE_H_INCLUDED +-#define PORTALS4_PRE_H_INCLUDED +- +-#include "portals4.h" +- +-typedef struct { +- int handler_id; +- char *pack_buffer; +- ptl_handle_md_t md; +-} MPIDI_PORTALS4_am_request_t; +- +-typedef struct { +- int dummy; +-} MPIDI_PORTALS4_request_t; +- +-typedef struct { +- int dummy; +-} MPIDI_PORTALS4_comm_t; +- +-typedef struct { +- int dummy; +-} MPIDI_PORTALS4_dt_t; +- +-typedef struct { +- int dummy; +-} MPIDI_PORTALS4_win_t; +- +-typedef struct { +- int dummy; +-} MPIDI_PORTALS4_addr_t; +- +-typedef struct { +- int dummy; +-} MPIDI_PORTALS4_op_t; +- +-#endif /* PORTALS4_PRE_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_am.h ++++ /dev/null +@@ -1,289 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_AM_H_INCLUDED +-#define PTL_AM_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_am_isend(int rank, +- MPIR_Comm * comm, +- int handler_id, +- const void *am_hdr, +- size_t am_hdr_sz, +- const void *data, +- MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS, ret, c; +- size_t data_sz; +- MPI_Aint dt_true_lb, last; +- MPIR_Datatype *dt_ptr; +- int dt_contig; +- ptl_hdr_data_t ptl_hdr; +- ptl_match_bits_t match_bits; +- char *send_buf = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM); +- +- match_bits = MPIDI_PTL_init_tag(comm->context_id, MPIDI_PTL_AM_TAG); +- sreq->dev.ch4.am.netmod_am.portals4.handler_id = handler_id; +- +- MPIR_cc_incr(sreq->cc_ptr, &c); +- +- /* fast path: there's no data to be sent */ +- if (count == 0) { +- send_buf = MPL_malloc(am_hdr_sz, MPL_MEM_BUFFER); +- MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz); +- sreq->dev.ch4.am.netmod_am.portals4.pack_buffer = send_buf; +- +- ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, 0); +- +- ret = PtlPut(MPIDI_PTL_global.md, (ptl_size_t) send_buf, am_hdr_sz, +- PTL_ACK_REQ, MPIDI_PTL_global.addr_table[rank].process, +- MPIDI_PTL_global.addr_table[rank].pt, match_bits, 0, sreq, ptl_hdr); +- +- goto fn_exit; +- } +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, data_sz); +- +- if (dt_contig) { +- /* create a two element iovec and send */ +- ptl_md_t md; +- ptl_iovec_t iovec[2]; +- +- send_buf = MPL_malloc(am_hdr_sz, MPL_MEM_BUFFER); +- MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz); +- sreq->dev.ch4.am.netmod_am.portals4.pack_buffer = send_buf; +- +- iovec[0].iov_base = send_buf; +- iovec[0].iov_len = am_hdr_sz; +- iovec[1].iov_base = (char *) data + dt_true_lb; +- iovec[1].iov_len = data_sz; +- md.start = iovec; +- md.length = 2; +- md.options = PTL_IOVEC; +- md.eq_handle = MPIDI_PTL_global.eqs[0]; +- md.ct_handle = PTL_CT_NONE; +- +- ret = PtlMDBind(MPIDI_PTL_global.ni, &md, &sreq->dev.ch4.am.netmod_am.portals4.md); +- ret = PtlPut(sreq->dev.ch4.am.netmod_am.portals4.md, 0, am_hdr_sz + data_sz, +- PTL_ACK_REQ, MPIDI_PTL_global.addr_table[rank].process, +- MPIDI_PTL_global.addr_table[rank].pt, match_bits, 0, sreq, ptl_hdr); +- } else { +- /* copy everything into pack_buffer */ +- MPIR_Segment *segment; +- MPI_Aint last; +- +- send_buf = MPL_malloc(am_hdr_sz + data_sz, MPL_MEM_BUFFER); +- MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz); +- segment = MPIR_Segment_alloc(); +- MPIR_Segment_init(data, count, datatype, segment); +- last = data_sz; +- MPIR_Segment_pack(segment, 0, &last, send_buf + am_hdr_sz); +- MPIR_Assert(last == data_sz); +- MPIR_Segment_free(segment); +- sreq->dev.ch4.am.netmod_am.portals4.pack_buffer = send_buf; +- +- ret = PtlPut(MPIDI_PTL_global.md, (ptl_size_t) send_buf, am_hdr_sz + data_sz, +- PTL_ACK_REQ, MPIDI_PTL_global.addr_table[rank].process, +- MPIDI_PTL_global.addr_table[rank].pt, match_bits, 0, sreq, ptl_hdr); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_NM_am_isendv(int rank, +- MPIR_Comm * comm, +- int handler_id, +- struct iovec *am_hdr, +- size_t iov_len, +- const void *data, +- MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, +- int src_rank, +- int handler_id, +- const void *am_hdr, +- size_t am_hdr_sz, +- const void *data, +- MPI_Count count, +- MPI_Datatype datatype, MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS, ret, c; +- size_t data_sz; +- MPI_Aint dt_true_lb, last; +- MPIR_Datatype *dt_ptr; +- int dt_contig; +- ptl_hdr_data_t ptl_hdr; +- ptl_match_bits_t match_bits; +- MPIR_Comm *use_comm; +- char *send_buf = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM); +- +- use_comm = MPIDI_CH4U_context_id_to_comm(context_id); +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- match_bits = MPIDI_PTL_init_tag(use_comm->context_id, MPIDI_PTL_AM_TAG); +- ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, data_sz); +- sreq->dev.ch4.am.netmod_am.portals4.handler_id = handler_id; +- +- MPIR_cc_incr(sreq->cc_ptr, &c); +- +- if (dt_contig) { +- /* create a two element iovec and send */ +- ptl_md_t md; +- ptl_iovec_t iovec[2]; +- +- send_buf = MPL_malloc(am_hdr_sz, MPL_MEM_BUFFER); +- MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz); +- sreq->dev.ch4.am.netmod_am.portals4.pack_buffer = send_buf; +- +- iovec[0].iov_base = send_buf; +- iovec[0].iov_len = am_hdr_sz; +- iovec[1].iov_base = (char *) data + dt_true_lb; +- iovec[1].iov_len = data_sz; +- md.start = iovec; +- md.length = 2; +- md.options = PTL_IOVEC; +- md.eq_handle = MPIDI_PTL_global.eqs[0]; +- md.ct_handle = PTL_CT_NONE; +- +- ret = PtlMDBind(MPIDI_PTL_global.ni, &md, &sreq->dev.ch4.am.netmod_am.portals4.md); +- ret = PtlPut(sreq->dev.ch4.am.netmod_am.portals4.md, 0, am_hdr_sz + data_sz, +- PTL_ACK_REQ, MPIDI_PTL_global.addr_table[src_rank].process, +- MPIDI_PTL_global.addr_table[src_rank].pt, match_bits, 0, sreq, ptl_hdr); +- } else { +- /* copy everything into pack_buffer */ +- MPIR_Segment *segment; +- MPI_Aint last; +- +- send_buf = MPL_malloc(am_hdr_sz + data_sz, MPL_MEM_BUFFER); +- MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz); +- segment = MPIR_Segment_alloc(); +- MPIR_Segment_init(data, count, datatype, segment); +- last = data_sz; +- MPIR_Segment_pack(segment, 0, &last, send_buf + am_hdr_sz); +- MPIR_Assert(last == data_sz); +- MPIR_Segment_free(segment); +- sreq->dev.ch4.am.netmod_am.portals4.pack_buffer = send_buf; +- +- ret = PtlPut(MPIDI_PTL_global.md, (ptl_size_t) send_buf, am_hdr_sz + data_sz, +- PTL_ACK_REQ, MPIDI_PTL_global.addr_table[src_rank].process, +- MPIDI_PTL_global.addr_table[src_rank].pt, match_bits, 0, sreq, ptl_hdr); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline size_t MPIDI_NM_am_hdr_max_sz(void) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +-static inline int MPIDI_NM_am_send_hdr(int rank, +- MPIR_Comm * comm, +- int handler_id, const void *am_hdr, size_t am_hdr_sz) +-{ +- int mpi_errno = MPI_SUCCESS, ret, c; +- ptl_hdr_data_t ptl_hdr; +- ptl_match_bits_t match_bits; +- char *send_buf = NULL; +- MPIR_Request *inject_req; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM); +- +- ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, 0); +- match_bits = MPIDI_PTL_init_tag(comm->context_id, MPIDI_PTL_AM_TAG); +- +- /* create an internal request for the inject */ +- inject_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +- MPIR_ERR_CHKANDSTMT((inject_req) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, +- "**nomemreq"); +- MPIDI_NM_am_request_init(inject_req); +- send_buf = MPL_malloc(am_hdr_sz, MPL_MEM_BUFFER); +- MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz); +- inject_req->dev.ch4.am.netmod_am.portals4.pack_buffer = send_buf; +- +- ret = PtlPut(MPIDI_PTL_global.md, (ptl_size_t) send_buf, am_hdr_sz, +- PTL_ACK_REQ, MPIDI_PTL_global.addr_table[rank].process, +- MPIDI_PTL_global.addr_table[rank].pt, match_bits, 0, inject_req, ptl_hdr); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, +- int src_rank, +- int handler_id, const void *am_hdr, size_t am_hdr_sz) +-{ +- int mpi_errno = MPI_SUCCESS, ret, c; +- ptl_hdr_data_t ptl_hdr; +- ptl_match_bits_t match_bits; +- MPIR_Comm *use_comm; +- char *send_buf = NULL; +- MPIR_Request *inject_req; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM); +- +- use_comm = MPIDI_CH4U_context_id_to_comm(context_id); +- +- ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, 0); +- match_bits = MPIDI_PTL_init_tag(use_comm->context_id, MPIDI_PTL_AM_TAG); +- +- /* create an internal request for the inject */ +- inject_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); +- MPIR_ERR_CHKANDSTMT((inject_req) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, +- "**nomemreq"); +- MPIDI_NM_am_request_init(inject_req); +- send_buf = MPL_malloc(am_hdr_sz, MPL_MEM_BUFFER); +- MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz); +- inject_req->dev.ch4.am.netmod_am.portals4.pack_buffer = send_buf; +- +- ret = PtlPut(MPIDI_PTL_global.md, (ptl_size_t) send_buf, am_hdr_sz, +- PTL_ACK_REQ, MPIDI_PTL_global.addr_table[src_rank].process, +- MPIDI_PTL_global.addr_table[src_rank].pt, match_bits, 0, inject_req, ptl_hdr); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_NM_am_recv(MPIR_Request * req) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +-#endif /* PTL_AM_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_coll.h ++++ /dev/null +@@ -1,1358 +0,0 @@ +- +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_COLL_H_INCLUDED +-#define PTL_COLL_H_INCLUDED +- +-#include "ptl_impl.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_BARRIER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_BARRIER); +- +- mpi_errno = MPIR_Barrier_impl(comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_BARRIER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_bcast(void *buffer, int count, MPI_Datatype datatype, +- int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_BCAST); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_BCAST); +- +- mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_BCAST); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLREDUCE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ALLREDUCE); +- +- mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ALLREDUCE); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLGATHER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ALLGATHER); +- +- mpi_errno = MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ALLGATHER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLGATHERV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ALLGATHERV); +- +- mpi_errno = MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcounts, displs, recvtype, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ALLGATHERV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_GATHER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_GATHER); +- +- mpi_errno = MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, root, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_GATHER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_GATHERV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_GATHERV); +- +- mpi_errno = MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcounts, displs, recvtype, root, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_GATHERV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_SCATTER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_SCATTER); +- +- mpi_errno = MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, root, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_SCATTER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_scatterv(const void *sendbuf, const int *sendcounts, +- const int *displs, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_SCATTERV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_SCATTERV); +- +- mpi_errno = MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, +- recvbuf, recvcount, recvtype, root, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_SCATTERV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLTOALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ALLTOALL); +- +- mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ALLTOALL); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const int *sendcounts, +- const int *sdispls, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, +- const int *rdispls, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLTOALLV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ALLTOALLV); +- +- mpi_errno = MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, +- recvbuf, recvcounts, rdispls, recvtype, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ALLTOALLV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const int sendcounts[], +- const int sdispls[], const MPI_Datatype sendtypes[], +- void *recvbuf, const int recvcounts[], +- const int rdispls[], const MPI_Datatype recvtypes[], +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLTOALLW); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ALLTOALLW); +- +- mpi_errno = MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, +- recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ALLTOALLW); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_REDUCE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_REDUCE); +- +- mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_REDUCE); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, +- const int recvcounts[], MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container +- ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_REDUCE_SCATTER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_REDUCE_SCATTER); +- +- mpi_errno = MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, +- datatype, op, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_REDUCE_SCATTER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, +- int recvcount, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container +- ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_REDUCE_SCATTER_BLOCK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_REDUCE_SCATTER_BLOCK); +- +- mpi_errno = MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, +- datatype, op, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_REDUCE_SCATTER_BLOCK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_SCAN); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_SCAN); +- +- mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_SCAN); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_EXSCAN); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_EXSCAN); +- +- mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_EXSCAN); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_allgather(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLGATHER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLGATHER); +- +- mpi_errno = MPIR_Neighbor_allgather_impl(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, comm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLGATHER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_allgatherv(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int recvcounts[], const int displs[], +- MPI_Datatype recvtype, MPIR_Comm * comm_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLGATHERV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLGATHERV); +- +- mpi_errno = MPIR_Neighbor_allgatherv_impl(sendbuf, sendcount, sendtype, +- recvbuf, recvcounts, displs, recvtype, comm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLGATHERV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_alltoall(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALL); +- +- mpi_errno = MPIR_Neighbor_alltoall_impl(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, comm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALL); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_alltoallv(const void *sendbuf, const int sendcounts[], +- const int sdispls[], MPI_Datatype sendtype, +- void *recvbuf, const int recvcounts[], +- const int rdispls[], MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALLV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALLV); +- +- mpi_errno = MPIR_Neighbor_alltoallv_impl(sendbuf, sendcounts, sdispls, +- sendtype, recvbuf, recvcounts, +- rdispls, recvtype, comm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALLV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_alltoallw(const void *sendbuf, const int sendcounts[], +- const MPI_Aint sdispls[], +- const MPI_Datatype sendtypes[], void *recvbuf, +- const int recvcounts[], const MPI_Aint rdispls[], +- const MPI_Datatype recvtypes[], +- MPIR_Comm * comm_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALLW); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALLW); +- +- mpi_errno = MPIR_Neighbor_alltoallw_impl(sendbuf, sendcounts, sdispls, +- sendtypes, recvbuf, recvcounts, +- rdispls, recvtypes, comm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALLW); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_allgather(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHER); +- +- mpi_errno = MPIR_Ineighbor_allgather_impl(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_allgatherv(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int recvcounts[], const int displs[], +- MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHERV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHERV); +- +- mpi_errno = MPIR_Ineighbor_allgatherv_impl(sendbuf, sendcount, sendtype, +- recvbuf, recvcounts, displs, +- recvtype, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHERV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoall(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALL); +- +- mpi_errno = MPIR_Ineighbor_alltoall_impl(sendbuf, sendcount, sendtype, +- recvbuf, recvcount, recvtype, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALL); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], +- const int sdispls[], MPI_Datatype sendtype, +- void *recvbuf, const int recvcounts[], +- const int rdispls[], MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLV); +- +- mpi_errno = MPIR_Ineighbor_alltoallv_impl(sendbuf, sendcounts, sdispls, +- sendtype, recvbuf, recvcounts, +- rdispls, recvtype, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], +- const MPI_Aint sdispls[], +- const MPI_Datatype sendtypes[], void *recvbuf, +- const int recvcounts[], const MPI_Aint rdispls[], +- const MPI_Datatype recvtypes[], +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLW); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLW); +- +- mpi_errno = MPIR_Ineighbor_alltoallw_impl(sendbuf, sendcounts, sdispls, +- sendtypes, recvbuf, recvcounts, +- rdispls, recvtypes, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLW); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IBARRIER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IBARRIER); +- +- mpi_errno = MPIR_Ibarrier_impl(comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IBARRIER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ibcast(void *buffer, int count, MPI_Datatype datatype, +- int root, MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IBCAST); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IBCAST); +- +- mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IBCAST); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLGATHER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLGATHER); +- +- mpi_errno = MPIR_Iallgather_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLGATHER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLREDUCE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLREDUCE); +- +- mpi_errno = MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLREDUCE); +- return mpi_errno; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLGATHERV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLGATHERV); +- +- mpi_errno = MPIR_Iallgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcounts, displs, recvtype, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLGATHERV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLTOALL); +- +- mpi_errno = MPIR_Ialltoall_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLTOALL); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const int *sendcounts, +- const int *sdispls, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, +- const int *rdispls, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALLV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLTOALLV); +- +- mpi_errno = MPIR_Ialltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, +- recvbuf, recvcounts, rdispls, recvtype, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLTOALLV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const int *sendcounts, +- const int *sdispls, const MPI_Datatype sendtypes[], +- void *recvbuf, const int *recvcounts, +- const int *rdispls, const MPI_Datatype recvtypes[], +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALLW); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLTOALLW); +- +- mpi_errno = MPIR_Ialltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, +- recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLTOALLW); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IEXSCAN); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IEXSCAN); +- +- mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IEXSCAN); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IGATHER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IGATHER); +- +- mpi_errno = MPIR_Igather_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, root, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IGATHER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IGATHERV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IGATHERV); +- +- mpi_errno = MPIR_Igatherv_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcounts, displs, recvtype, root, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IGATHERV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_scatter_block(const void *sendbuf, void *recvbuf, +- int recvcount, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_BLOCK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_BLOCK); +- +- mpi_errno = MPIR_Ireduce_scatter_block_impl(sendbuf, recvbuf, recvcount, +- datatype, op, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_BLOCK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, +- const int recvcounts[], MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER); +- +- mpi_errno = MPIR_Ireduce_scatter_impl(sendbuf, recvbuf, recvcounts, +- datatype, op, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IREDUCE); +- +- mpi_errno = MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IREDUCE); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCAN); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ISCAN); +- +- mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ISCAN); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscatter(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm, MPIR_Request ** request) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCATTER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ISCATTER); +- +- mpi_errno = MPIR_Iscatter_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, root, comm, request); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ISCATTER); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const int *sendcounts, +- const int *displs, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, +- MPI_Datatype recvtype, int root, +- MPIR_Comm * comm, MPIR_Request ** request) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCATTERV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ISCATTERV); +- +- mpi_errno = MPIR_Iscatterv_impl(sendbuf, sendcounts, displs, sendtype, +- recvbuf, recvcount, recvtype, root, comm, request); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ISCATTERV); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibarrier_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IBARRIER_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IBARRIER_SCHED); +- +- mpi_errno = MPIR_Ibarrier_sched_impl(comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IBARRIER_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibcast_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ibcast_sched(void *buffer, int count, MPI_Datatype datatype, +- int root, MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IBCAST_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IBCAST_SCHED); +- +- mpi_errno = MPIR_Ibcast_sched_impl(buffer, count, datatype, root, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IBCAST_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallgather_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLGATHER_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLGATHER_SCHED); +- +- mpi_errno = MPIR_Iallgather_sched_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, +- recvtype, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLGATHER_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallgatherv_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLGATHERV_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLGATHERV_SCHED); +- +- mpi_errno = MPIR_Iallgatherv_sched_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, +- displs, recvtype, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLGATHERV_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallreduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallreduce_sched(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLREDUCE_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLREDUCE_SCHED); +- +- mpi_errno = MPIR_Iallreduce_sched_impl(sendbuf, recvbuf, count, datatype, op, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLREDUCE_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoall_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALL_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLTOALL_SCHED); +- +- mpi_errno = MPIR_Ialltoall_sched_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, +- recvtype, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLTOALL_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoallv_sched(const void *sendbuf, const int sendcounts[], +- const int sdispls[], MPI_Datatype sendtype, +- void *recvbuf, const int recvcounts[], +- const int rdispls[], MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALLV_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLTOALLV_SCHED); +- +- mpi_errno = MPIR_Ialltoallv_sched_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, +- recvcounts, rdispls, recvtype, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLTOALLV_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoallw_sched(const void *sendbuf, const int sendcounts[], +- const int sdispls[], const MPI_Datatype sendtypes[], +- void *recvbuf, const int recvcounts[], +- const int rdispls[], const MPI_Datatype recvtypes[], +- MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALLW_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IALLTOALLW_SCHED); +- +- mpi_errno = MPIR_Ialltoallw_sched_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, +- recvcounts, rdispls, recvtypes, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IALLTOALLW_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iexscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iexscan_sched(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IEXSCAN_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IEXSCAN_SCHED); +- +- mpi_errno = MPIR_Iexscan_sched_impl(sendbuf, recvbuf, count, datatype, op, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IEXSCAN_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_igather_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IGATHER_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IGATHER_SCHED); +- +- mpi_errno = MPIR_Igather_sched_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, +- root, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IGATHER_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_igatherv_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IGATHERV_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IGATHERV_SCHED); +- +- mpi_errno = MPIR_Igatherv_sched_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, +- recvtype, root, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IGATHERV_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_block_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_scatter_block_sched(const void *sendbuf, void *recvbuf, +- int recvcount, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_BLOCK_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_BLOCK_SCHED); +- +- mpi_errno = MPIR_Ireduce_scatter_block_sched_impl(sendbuf, recvbuf, recvcount, datatype, op, +- comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_BLOCK_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_scatter_sched(const void *sendbuf, void *recvbuf, +- const int recvcounts[], MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_SCHED); +- +- mpi_errno = MPIR_Ireduce_scatter_sched_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, +- s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_sched(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, +- MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCHED); +- +- mpi_errno = MPIR_Ireduce_sched_impl(sendbuf, recvbuf, count, datatype, op, root, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscan_sched(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCAN_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ISCAN_SCHED); +- +- mpi_errno = MPIR_Iscan_sched_impl(sendbuf, recvbuf, count, datatype, op, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ISCAN_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscatter_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm, +- MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCATTER_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ISCATTER_SCHED); +- +- mpi_errno = MPIR_Iscatter_sched_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, +- root, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ISCATTER_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatterv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscatterv_sched(const void *sendbuf, const int *sendcounts, +- const int *displs, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCATTERV_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ISCATTERV_SCHED); +- +- mpi_errno = MPIR_Iscatterv_sched_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, +- recvtype, root, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ISCATTERV_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_allgather_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHER_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHER_SCHED); +- +- mpi_errno = MPIR_Ineighbor_allgather_sched_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcount, recvtype, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHER_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_allgatherv_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int recvcounts[], +- const int displs[], MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHERV_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHERV_SCHED); +- +- mpi_errno = MPIR_Ineighbor_allgatherv_sched_impl(sendbuf, sendcount, sendtype, recvbuf, +- recvcounts, displs, recvtype, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHERV_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoall_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALL_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALL_SCHED); +- +- mpi_errno = MPIR_Ineighbor_alltoall_sched_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, +- recvtype, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALL_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoallv_sched(const void *sendbuf, +- const int sendcounts[], +- const int sdispls[], MPI_Datatype sendtype, +- void *recvbuf, const int recvcounts[], +- const int rdispls[], MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLV_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLV_SCHED); +- +- mpi_errno = MPIR_Ineighbor_alltoallv_sched_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, +- recvcounts, rdispls, recvtype, comm, s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLV_SCHED); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoallw_sched(const void *sendbuf, +- const int sendcounts[], +- const MPI_Aint sdispls[], +- const MPI_Datatype sendtypes[], +- void *recvbuf, const int recvcounts[], +- const MPI_Aint rdispls[], +- const MPI_Datatype recvtypes[], +- MPIR_Comm * comm, MPIR_Sched_t s) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLW_SCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLW_SCHED); +- +- mpi_errno = MPIR_Ineighbor_alltoallw_sched_impl(sendbuf, sendcounts, sdispls, sendtypes, +- recvbuf, recvcounts, rdispls, recvtypes, comm, +- s); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLW_SCHED); +- return mpi_errno; +-} +- +-#endif /* PTL_COLL_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_coll_globals_default.c ++++ /dev/null +@@ -1,161 +0,0 @@ +-/* Barrier default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Barrier_intra_dissemination_cnt = { +- .id = MPIDI_PTL_Barrier_intra_dissemination_id +-}; +- +-/* Bcast default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Bcast_intra_binomial_cnt = { +- .id = MPIDI_PTL_Bcast_intra_binomial_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Bcast_intra_scatter_recursive_doubling_allgather_cnt +- = { +- .id = MPIDI_PTL_Bcast_intra_scatter_recursive_doubling_allgather_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Bcast_intra_scatter_ring_allgather_cnt = { +- .id = MPIDI_PTL_Bcast_intra_scatter_ring_allgather_id +-}; +- +-/* Reduce default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_intra_reduce_scatter_gather_cnt = { +- .id = MPIDI_PTL_Reduce_intra_reduce_scatter_gather_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_intra_binomial_cnt = { +- .id = MPIDI_PTL_Reduce_intra_binomial_id +-}; +- +-/* Allreduce default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Allreduce_intra_recursive_doubling_cnt = { +- .id = MPIDI_PTL_Allreduce_intra_recursive_doubling_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Allreduce_intra_reduce_scatter_allgather_cnt = { +- .id = MPIDI_PTL_Allreduce_intra_reduce_scatter_allgather_id +-}; +- +-/* Alltoall default PTL containers initialization */ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Alltoall_intra_pairwise_sendrecv_replace_cnt = { +- .id = MPIDI_PTL_Alltoall_intra_pairwise_sendrecv_replace_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Alltoall_intra_brucks_cnt = { +- .id = MPIDI_PTL_Alltoall_intra_brucks_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Alltoall_intra_scattered_cnt = { +- .id = MPIDI_PTL_Alltoall_intra_scattered_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Alltoall_intra_pairwise_cnt = { +- .id = MPIDI_PTL_Alltoall_intra_pairwise_id +-}; +- +-/* Alltoallv default PTL containers initialization */ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Alltoallv_intra_pairwise_sendrecv_replace_cnt = { +- .id = MPIDI_PTL_Alltoallv_intra_pairwise_sendrecv_replace_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Alltoallv_intra_scattered_cnt = { +- .id = MPIDI_PTL_Alltoallv_intra_scattered_id +-}; +- +-/* Alltoallw default PTL containers initialization */ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Alltoallw_intra_pairwise_sendrecv_replace_cnt = { +- .id = MPIDI_PTL_Alltoallw_intra_pairwise_sendrecv_replace_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Alltoallw_intra_scattered_cnt = { +- .id = MPIDI_PTL_Alltoallw_intra_scattered_id +-}; +- +-/* Allgather default PTL containers initialization */ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Allgather_intra_recursive_doubling_cnt = { +- .id = MPIDI_PTL_Allgather_intra_recursive_doubling_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Allgather_intra_brucks_cnt = { +- .id = MPIDI_PTL_Allgather_intra_brucks_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Allgather_intra_ring_cnt = { +- .id = MPIDI_PTL_Allgather_intra_ring_id +-}; +- +-/* Allgatherv default PTL containers initialization */ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Allgatherv_intra_recursive_doubling_cnt = { +- .id = MPIDI_PTL_Allgatherv_intra_recursive_doubling_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Allgatherv_intra_brucks_cnt = { +- .id = MPIDI_PTL_Allgatherv_intra_brucks_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Allgatherv_intra_ring_cnt = { +- .id = MPIDI_PTL_Allgatherv_intra_ring_id +-}; +- +-/* Gather default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Gather_intra_binomial_cnt = { +- .id = MPIDI_PTL_Gather_intra_binomial_id +-}; +- +-/* Gatherv default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Gatherv_allcomm_linear_cnt = { +- .id = MPIDI_PTL_Gatherv_allcomm_linear_id +-}; +- +-/* Scatter default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Scatter_intra_binomial_cnt = { +- .id = MPIDI_PTL_Scatter_intra_binomial_id +-}; +- +-/* Scatterv default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Scatterv_allcomm_linear_cnt = { +- .id = MPIDI_PTL_Scatterv_allcomm_linear_id +-}; +- +-/* Reduce_scatter default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_scatter_intra_noncommutative_cnt = { +- .id = MPIDI_PTL_Reduce_scatter_intra_noncommutative_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_scatter_intra_pairwise_cnt = { +- .id = MPIDI_PTL_Reduce_scatter_intra_pairwise_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_scatter_intra_recursive_doubling_cnt = { +- .id = MPIDI_PTL_Reduce_scatter_intra_recursive_doubling_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_scatter_intra_recursive_halving_cnt = { +- .id = MPIDI_PTL_Reduce_scatter_intra_recursive_halving_id +-}; +- +-/* Reduce_scatter_block default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_scatter_block_intra_noncommutative_cnt = { +- .id = MPIDI_PTL_Reduce_scatter_block_intra_noncommutative_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_scatter_block_intra_pairwise_cnt = { +- .id = MPIDI_PTL_Reduce_scatter_block_intra_pairwise_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_scatter_block_intra_recursive_doubling_cnt = { +- .id = MPIDI_PTL_Reduce_scatter_block_intra_recursive_doubling_id +-}; +- +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Reduce_scatter_block_intra_recursive_halving_cnt = { +- .id = MPIDI_PTL_Reduce_scatter_block_intra_recursive_halving_id +-}; +- +-/* Scan default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Scan_intra_recursive_doubling_cnt = { +- .id = MPIDI_PTL_Scan_intra_recursive_doubling_id +-}; +- +-/* Exscan default PTL containers initialization*/ +-const MPIDI_PTL_coll_algo_container_t MPIDI_PTL_Exscan_intra_recursive_doubling_cnt = { +- .id = MPIDI_PTL_Exscan_intra_recursive_doubling_id +-}; +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_coll_params.h ++++ /dev/null +@@ -1,257 +0,0 @@ +-#ifndef PTL_COLL_PARAMS_H_INCLUDED +-#define PTL_COLL_PARAMS_H_INCLUDED +- +-typedef enum { +- MPIDI_PTL_Barrier_intra_dissemination_id, +-} MPIDI_PTL_Barrier_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Barrier_empty_parameters { +- int empty; +- } ptl_barrier_empty_parameters; +-} MPIDI_PTL_Barrier_params_t; +- +-typedef enum { +- MPIDI_PTL_Bcast_intra_binomial_id, +- MPIDI_PTL_Bcast_intra_scatter_recursive_doubling_allgather_id, +- MPIDI_PTL_Bcast_intra_scatter_ring_allgather_id, +-} MPIDI_PTL_Bcast_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Bcast_knomial_parameters { +- int radix; +- int block_size; +- } ptl_bcast_knomial_parameters; +- struct MPIDI_PTL_Bcast_empty_parameters { +- int empty; +- } ptl_bcast_empty_parameters; +-} MPIDI_PTL_Bcast_params_t; +- +-typedef enum { +- MPIDI_PTL_Allreduce_intra_recursive_doubling_id, +- MPIDI_PTL_Allreduce_intra_reduce_scatter_allgather_id +-} MPIDI_PTL_Allreduce_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Allreduce_empty_parameters { +- int empty; +- } ptl_allreduce_empty_parameters; +-} MPIDI_PTL_Allreduce_params_t; +- +-typedef enum { +- MPIDI_PTL_Reduce_intra_reduce_scatter_gather_id, +- MPIDI_PTL_Reduce_intra_binomial_id +-} MPIDI_PTL_Reduce_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Reduce_empty_parameters { +- int empty; +- } ptl_reduce_empty_parameters; +-} MPIDI_PTL_Reduce_params_t; +- +-typedef enum { +- MPIDI_PTL_Alltoall_intra_brucks_id, +- MPIDI_PTL_Alltoall_intra_scattered_id, +- MPIDI_PTL_Alltoall_intra_pairwise_id, +- MPIDI_PTL_Alltoall_intra_pairwise_sendrecv_replace_id +-} MPIDI_PTL_Alltoall_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Alltoall_empty_parameters { +- int empty; +- } ptl_alltoall_empty_parameters; +-} MPIDI_PTL_Alltoall_params_t; +- +-typedef enum { +- MPIDI_PTL_Alltoallv_intra_pairwise_sendrecv_replace_id, +- MPIDI_PTL_Alltoallv_intra_scattered_id +-} MPIDI_PTL_Alltoallv_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Alltoallv_empty_parameters { +- int empty; +- } ptl_alltoallv_empty_parameters; +-} MPIDI_PTL_Alltoallv_params_t; +- +-typedef enum { +- MPIDI_PTL_Alltoallw_intra_pairwise_sendrecv_replace_id, +- MPIDI_PTL_Alltoallw_intra_scattered_id +-} MPIDI_PTL_Alltoallw_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Alltoallw_empty_parameters { +- int empty; +- } ptl_alltoallw_empty_parameters; +-} MPIDI_PTL_Alltoallw_params_t; +- +-typedef enum { +- MPIDI_PTL_Allgather_intra_recursive_doubling_id, +- MPIDI_PTL_Allgather_intra_brucks_id, +- MPIDI_PTL_Allgather_intra_ring_id +-} MPIDI_PTL_Allgather_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Allgather_empty_parameters { +- int empty; +- } ptl_allgather_empty_parameters; +-} MPIDI_PTL_Allgather_params_t; +- +-typedef enum { +- MPIDI_PTL_Allgatherv_intra_recursive_doubling_id, +- MPIDI_PTL_Allgatherv_intra_brucks_id, +- MPIDI_PTL_Allgatherv_intra_ring_id +-} MPIDI_PTL_Allgatherv_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Allgatherv_empty_parameters { +- int empty; +- } ptl_allgatherv_empty_parameters; +-} MPIDI_PTL_Allgatherv_params_t; +- +-typedef enum { +- MPIDI_PTL_Gather_intra_binomial_id, +-} MPIDI_PTL_Gather_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Gather_empty_parameters { +- int empty; +- } ptl_gather_empty_parameters; +-} MPIDI_PTL_Gather_params_t; +- +-typedef enum { +- MPIDI_PTL_Gatherv_allcomm_linear_id, +-} MPIDI_PTL_Gatherv_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Gatherv_empty_parameters { +- int empty; +- } ptl_gatherv_empty_parameters; +-} MPIDI_PTL_Gatherv_params_t; +- +-typedef enum { +- MPIDI_PTL_Scatter_intra_binomial_id, +-} MPIDI_PTL_Scatter_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Scatter_empty_parameters { +- int empty; +- } ptl_scatter_empty_parameters; +-} MPIDI_PTL_Scatter_params_t; +- +-typedef enum { +- MPIDI_PTL_Scatterv_allcomm_linear_id, +-} MPIDI_PTL_Scatterv_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Scatterv_empty_parameters { +- int empty; +- } ptl_scatterv_empty_parameters; +-} MPIDI_PTL_Scatterv_params_t; +- +-typedef enum { +- MPIDI_PTL_Reduce_scatter_intra_noncommutative_id, +- MPIDI_PTL_Reduce_scatter_intra_pairwise_id, +- MPIDI_PTL_Reduce_scatter_intra_recursive_doubling_id, +- MPIDI_PTL_Reduce_scatter_intra_recursive_halving_id, +-} MPIDI_PTL_Reduce_scatter_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Reduce_scatter_empty_parameters { +- int empty; +- } ptl_reduce_scatter_empty_parameters; +-} MPIDI_PTL_Reduce_scatter_params_t; +- +-typedef enum { +- MPIDI_PTL_Reduce_scatter_block_intra_noncommutative_id, +- MPIDI_PTL_Reduce_scatter_block_intra_pairwise_id, +- MPIDI_PTL_Reduce_scatter_block_intra_recursive_doubling_id, +- MPIDI_PTL_Reduce_scatter_block_intra_recursive_halving_id, +-} MPIDI_PTL_Reduce_scatter_block_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Reduce_scatter_block_empty_parameters { +- int empty; +- } ptl_reduce_scatter_block_empty_parameters; +-} MPIDI_PTL_Reduce_scatter_block_params_t; +- +-typedef enum { +- MPIDI_PTL_Scan_intra_recursive_doubling_id, +-} MPIDI_PTL_Scan_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Scan_empty_parameters { +- int empty; +- } ptl_scan_empty_parameters; +-} MPIDI_PTL_Scan_params_t; +- +-typedef enum { +- MPIDI_PTL_Exscan_intra_recursive_doubling_id, +-} MPIDI_PTL_Exscan_id_t; +- +-typedef union { +- /* reserved for parameters related to NETMOD specific collectives */ +- struct MPIDI_PTL_Exscan_empty_parameters { +- int empty; +- } ptl_exscan_empty_parameters; +-} MPIDI_PTL_Exscan_params_t; +- +-#define MPIDI_PTL_BARRIER_PARAMS_DECL MPIDI_PTL_Barrier_params_t ptl_barrier_params; +-#define MPIDI_PTL_BCAST_PARAMS_DECL MPIDI_PTL_Bcast_params_t ptl_bcast_params; +-#define MPIDI_PTL_REDUCE_PARAMS_DECL MPIDI_PTL_Reduce_params_t ptl_reduce_params; +-#define MPIDI_PTL_ALLREDUCE_PARAMS_DECL MPIDI_PTL_Allreduce_params_t ptl_allreduce_params; +-#define MPIDI_PTL_ALLTOALL_PARAMS_DECL MPIDI_PTL_Alltoall_params_t ptl_alltoall_params; +-#define MPIDI_PTL_ALLTOALLV_PARAMS_DECL MPIDI_PTL_Alltoallv_params_t ptl_alltoallv_params; +-#define MPIDI_PTL_ALLTOALLW_PARAMS_DECL MPIDI_PTL_Alltoallw_params_t ptl_alltoallw_params; +-#define MPIDI_PTL_ALLGATHER_PARAMS_DECL MPIDI_PTL_Allgather_params_t ptl_allgather_params; +-#define MPIDI_PTL_ALLGATHERV_PARAMS_DECL MPIDI_PTL_Allgatherv_params_t ptl_allgatherv_params; +-#define MPIDI_PTL_GATHER_PARAMS_DECL MPIDI_PTL_Gather_params_t ptl_gather_params; +-#define MPIDI_PTL_GATHERV_PARAMS_DECL MPIDI_PTL_Gatherv_params_t ptl_gatherv_params; +-#define MPIDI_PTL_SCATTER_PARAMS_DECL MPIDI_PTL_Scatter_params_t ptl_scatter_params; +-#define MPIDI_PTL_SCATTERV_PARAMS_DECL MPIDI_PTL_Scatterv_params_t ptl_scatterv_params; +-#define MPIDI_PTL_REDUCE_SCATTER_PARAMS_DECL MPIDI_PTL_Reduce_scatter_params_t ptl_reduce_scatter_params; +-#define MPIDI_PTL_REDUCE_SCATTER_BLOCK_PARAMS_DECL MPIDI_PTL_Reduce_scatter_block_params_t ptl_reduce_scatter_block_params; +-#define MPIDI_PTL_SCAN_PARAMS_DECL MPIDI_PTL_Scan_params_t ptl_scan_params; +-#define MPIDI_PTL_EXSCAN_PARAMS_DECL MPIDI_PTL_Exscan_params_t ptl_exscan_params; +- +-typedef union { +- MPIDI_PTL_BARRIER_PARAMS_DECL; +- MPIDI_PTL_BCAST_PARAMS_DECL; +- MPIDI_PTL_REDUCE_PARAMS_DECL; +- MPIDI_PTL_ALLREDUCE_PARAMS_DECL; +- MPIDI_PTL_ALLTOALL_PARAMS_DECL; +- MPIDI_PTL_ALLTOALLV_PARAMS_DECL; +- MPIDI_PTL_ALLTOALLW_PARAMS_DECL; +- MPIDI_PTL_ALLGATHER_PARAMS_DECL; +- MPIDI_PTL_ALLGATHERV_PARAMS_DECL; +- MPIDI_PTL_GATHER_PARAMS_DECL; +- MPIDI_PTL_GATHERV_PARAMS_DECL; +- MPIDI_PTL_SCATTER_PARAMS_DECL; +- MPIDI_PTL_SCATTERV_PARAMS_DECL; +- MPIDI_PTL_REDUCE_SCATTER_PARAMS_DECL; +- MPIDI_PTL_REDUCE_SCATTER_BLOCK_PARAMS_DECL; +- MPIDI_PTL_SCAN_PARAMS_DECL; +- MPIDI_PTL_EXSCAN_PARAMS_DECL; +-} MPIDI_PTL_coll_params_t; +- +-typedef struct MPIDI_PTL_coll_algo_container { +- int id; +- MPIDI_PTL_coll_params_t params; +-} MPIDI_PTL_coll_algo_container_t; +- +-#endif /* PTL_COLL_PARAMS_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_comm.h ++++ /dev/null +@@ -1,39 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_COMM_H_INCLUDED +-#define PTL_COMM_H_INCLUDED +- +-#include "ptl_impl.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- mpi_errno = MPIDI_CH4U_init_comm(comm); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- mpi_errno = MPIDI_CH4U_destroy_comm(comm); +- return mpi_errno; +-} +- +- +-#endif /* PTL_COMM_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_datatype.h ++++ /dev/null +@@ -1,22 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- */ +-#ifndef PTL_DATATYPE_H_INCLUDED +-#define PTL_DATATYPE_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_type_free_hook(MPIR_Datatype * datatype_p) +-{ +- return 0; +-} +- +-static inline int MPIDI_NM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) +-{ +- return 0; +-} +- +-#endif /* PTL_DATATYPE_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_impl.h ++++ /dev/null +@@ -1,58 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_IMPL_H_INCLUDED +-#define PTL_IMPL_H_INCLUDED +- +-#include +-#include "portals4.h" +- +-#define MPIDI_PTL_CASE_STR(x) case x: return #x +- +-static inline const char *MPIDI_PTL_strerror(int ret) +-{ +- switch (ret) { +- MPIDI_PTL_CASE_STR(PTL_OK); +- MPIDI_PTL_CASE_STR(PTL_ARG_INVALID); +- MPIDI_PTL_CASE_STR(PTL_CT_NONE_REACHED); +- MPIDI_PTL_CASE_STR(PTL_EQ_DROPPED); +- MPIDI_PTL_CASE_STR(PTL_EQ_EMPTY); +- MPIDI_PTL_CASE_STR(PTL_FAIL); +- MPIDI_PTL_CASE_STR(PTL_IN_USE); +- MPIDI_PTL_CASE_STR(PTL_INTERRUPTED); +- MPIDI_PTL_CASE_STR(PTL_IGNORED); +- MPIDI_PTL_CASE_STR(PTL_LIST_TOO_LONG); +- MPIDI_PTL_CASE_STR(PTL_NO_INIT); +- MPIDI_PTL_CASE_STR(PTL_NO_SPACE); +- MPIDI_PTL_CASE_STR(PTL_PID_IN_USE); +- MPIDI_PTL_CASE_STR(PTL_PT_FULL); +- MPIDI_PTL_CASE_STR(PTL_PT_EQ_NEEDED); +- MPIDI_PTL_CASE_STR(PTL_PT_IN_USE); +- default: +- return "UNKNOWN"; +- } +-} +- +-#define MPIDI_PTL_ERR MPIR_ERR_CHKANDJUMP4 +- +-#define MPIDI_PTL_CHK_STATUS(STATUS,STR) \ +- do { \ +- MPIDI_PTL_ERR(STATUS!=PTL_OK, \ +- mpi_errno, \ +- MPI_ERR_OTHER, \ +- "**"#STR, \ +- "**"#STR" %s %d %s %s", \ +- __FILE__, \ +- __LINE__, \ +- FCNAME, \ +- MPIDI_PTL_strerror(STATUS)); \ +- } while (0) +- +-#endif /* PTL_IMPL_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_init.h ++++ /dev/null +@@ -1,263 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_INIT_H_INCLUDED +-#define PTL_INIT_H_INCLUDED +- +-#include "mpidch4r.h" +-#include "ptl_types.h" +-#include "ptl_impl.h" +-#include "portals4.h" +- +-static inline int MPIDI_PTL_append_overflow(size_t i) +-{ +- ptl_me_t me; +- ptl_process_t id_any; +- +- id_any.phys.pid = PTL_PID_ANY; +- id_any.phys.nid = PTL_NID_ANY; +- +- me.start = MPIDI_PTL_global.overflow_bufs[i]; +- me.length = MPIDI_PTL_OVERFLOW_BUFFER_SZ; +- me.ct_handle = PTL_CT_NONE; +- me.uid = PTL_UID_ANY; +- me.options = (PTL_ME_OP_PUT | PTL_ME_MANAGE_LOCAL | PTL_ME_NO_TRUNCATE | PTL_ME_MAY_ALIGN | +- PTL_ME_IS_ACCESSIBLE | PTL_ME_EVENT_LINK_DISABLE); +- me.match_id = id_any; +- me.match_bits = 0; +- me.ignore_bits = ~((ptl_match_bits_t) 0); +- me.min_free = MPIDI_PTL_MAX_AM_EAGER_SZ; +- +- return PtlMEAppend(MPIDI_PTL_global.ni, MPIDI_PTL_global.pt, &me, PTL_OVERFLOW_LIST, (void *) i, +- &MPIDI_PTL_global.overflow_me_handles[i]); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_init_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_init_hook(int rank, +- int size, +- int appnum, +- int *tag_bits, +- MPIR_Comm * comm_world, +- MPIR_Comm * comm_self, int spawned, int *n_vnis_provided) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret; +- ptl_md_t md; +- ptl_ni_limits_t desired; +- ptl_process_t my_ptl_id; +- int key_max_sz; +- int val_max_sz, val_sz_left; +- int name_max_sz; +- int len, i; +- char *keyS, *valS, *buscard; +- +- /* Make sure our IOV is the same as portals4's IOV */ +- MPIR_Assert(sizeof(ptl_iovec_t) == sizeof(MPL_IOV)); +- MPIR_Assert(((void *) &(((ptl_iovec_t *) 0)->iov_base)) == +- ((void *) &(((MPL_IOV *) 0)->MPL_IOV_BUF))); +- MPIR_Assert(((void *) &(((ptl_iovec_t *) 0)->iov_len)) == +- ((void *) &(((MPL_IOV *) 0)->MPL_IOV_LEN))); +- MPIR_Assert(sizeof(((ptl_iovec_t *) 0)->iov_len) == sizeof(((MPL_IOV *) 0)->MPL_IOV_LEN)); +- +- *n_vnis_provided = 1; +- +- /* init portals */ +- ret = PtlInit(); +- MPIDI_PTL_CHK_STATUS(ret, PtlInit); +- +- /* /\* do an interface pre-init to get the default limits struct *\/ */ +- /* ret = PtlNIInit(PTL_IFACE_DEFAULT, PTL_NI_MATCHING | PTL_NI_PHYSICAL, */ +- /* PTL_PID_ANY, NULL, &desired, &MPIDI_PTL_global.ni_handle); */ +- /* MPIDI_PTL_CHK_STATUS(ret, PtlNIInit); */ +- +- /* /\* finalize the interface so we can re-init with our desired maximums *\/ */ +- /* ret = PtlNIFini(MPIDI_PTL_global.ni_handle); */ +- /* MPIDI_PTL_CHK_STATUS(ret, PtlNIFini); */ +- +- /* /\* set higher limits if they are determined to be too low *\/ */ +- /* if (desired.max_unexpected_headers < UNEXPECTED_HDR_COUNT && getenv("PTL_LIM_MAX_UNEXPECTED_HEADERS") == NULL) */ +- /* desired.max_unexpected_headers = UNEXPECTED_HDR_COUNT; */ +- /* if (desired.max_list_size < LIST_SIZE && getenv("PTL_LIM_MAX_LIST_SIZE") == NULL) */ +- /* desired.max_list_size = LIST_SIZE; */ +- /* if (desired.max_entries < ENTRY_COUNT && getenv("PTL_LIM_MAX_ENTRIES") == NULL) */ +- /* desired.max_entries = ENTRY_COUNT; */ +- +- /* do the real init */ +- ret = PtlNIInit(PTL_IFACE_DEFAULT, PTL_NI_MATCHING | PTL_NI_PHYSICAL, +- PTL_PID_ANY, NULL, &MPIDI_PTL_global.ni_limits, &MPIDI_PTL_global.ni); +- MPIDI_PTL_CHK_STATUS(ret, PtlNIInit); +- +- /* allocate EQs: 0 is origin, 1 is target */ +- ret = PtlEQAlloc(MPIDI_PTL_global.ni, MPIDI_PTL_EVENT_COUNT, &MPIDI_PTL_global.eqs[0]); +- MPIDI_PTL_CHK_STATUS(ret, PtlEQAlloc); +- ret = PtlEQAlloc(MPIDI_PTL_global.ni, MPIDI_PTL_EVENT_COUNT, &MPIDI_PTL_global.eqs[1]); +- MPIDI_PTL_CHK_STATUS(ret, PtlEQAlloc); +- +- /* allocate portal */ +- ret = +- PtlPTAlloc(MPIDI_PTL_global.ni, +- PTL_PT_ONLY_USE_ONCE | PTL_PT_ONLY_TRUNCATE | PTL_PT_FLOWCTRL, +- MPIDI_PTL_global.eqs[1], PTL_PT_ANY, &MPIDI_PTL_global.pt); +- MPIDI_PTL_CHK_STATUS(ret, PtlPTAlloc); +- +- /* create an MD that covers all of memory */ +- md.start = NULL; +- md.length = PTL_SIZE_MAX; +- md.options = 0x0; +- md.eq_handle = MPIDI_PTL_global.eqs[0]; +- md.ct_handle = PTL_CT_NONE; +- ret = PtlMDBind(MPIDI_PTL_global.ni, &md, &MPIDI_PTL_global.md); +- MPIDI_PTL_CHK_STATUS(ret, PtlMDBind); +- +- /* create business card */ +- ret = PMI_KVS_Get_key_length_max(&key_max_sz); +- ret = PMI_KVS_Get_value_length_max(&val_max_sz); +- ret = PMI_KVS_Get_name_length_max(&name_max_sz); +- MPIDI_PTL_global.kvsname = MPL_malloc(name_max_sz, MPL_MEM_ADDRESS); +- ret = PMI_KVS_Get_my_name(MPIDI_PTL_global.kvsname, name_max_sz); +- +- keyS = MPL_malloc(key_max_sz, MPL_MEM_ADDRESS); +- valS = MPL_malloc(val_max_sz, MPL_MEM_ADDRES); +- buscard = valS; +- val_sz_left = val_max_sz; +- +- ret = PtlGetId(MPIDI_PTL_global.ni, &my_ptl_id); +- ret = +- MPL_str_add_binary_arg(&buscard, &val_sz_left, "NID", (char *) &my_ptl_id.phys.nid, +- sizeof(my_ptl_id.phys.nid)); +- ret = +- MPL_str_add_binary_arg(&buscard, &val_sz_left, "PID", (char *) &my_ptl_id.phys.pid, +- sizeof(my_ptl_id.phys.pid)); +- ret = +- MPL_str_add_binary_arg(&buscard, &val_sz_left, "PTI", (char *) &MPIDI_PTL_global.pt, +- sizeof(MPIDI_PTL_global.pt)); +- +- MPL_snprintf(keyS, key_max_sz * sizeof(char), "PTL-%d", rank); +- buscard = valS; +- ret = PMI_KVS_Put(MPIDI_PTL_global.kvsname, keyS, buscard); +- ret = PMI_KVS_Commit(MPIDI_PTL_global.kvsname); +- ret = PMI_Barrier(); +- +- /* get and store business cards in address table */ +- MPIDI_PTL_global.addr_table = MPL_malloc(size * sizeof(MPIDI_PTL_addr_t), MPL_MEM_ADDRESS); +- for (i = 0; i < size; i++) { +- MPL_snprintf(keyS, key_max_sz * sizeof(char), "PTL-%d", i); +- ret = PMI_KVS_Get(MPIDI_PTL_global.kvsname, keyS, valS, val_max_sz); +- MPL_str_get_binary_arg(valS, "NID", +- (char *) &MPIDI_PTL_global.addr_table[i].process.phys.nid, +- sizeof(MPIDI_PTL_global.addr_table[i].process.phys.nid), &len); +- MPL_str_get_binary_arg(valS, "PID", +- (char *) &MPIDI_PTL_global.addr_table[i].process.phys.pid, +- sizeof(MPIDI_PTL_global.addr_table[i].process.phys.pid), &len); +- MPL_str_get_binary_arg(valS, "PTI", (char *) &MPIDI_PTL_global.addr_table[i].pt, +- sizeof(MPIDI_PTL_global.addr_table[i].pt), &len); +- } +- +- /* Setup CH4R Active Messages */ +- MPIDIG_init(comm_world, comm_self, *n_vnis_provided); +- for (i = 0; i < MPIDI_PTL_NUM_OVERFLOW_BUFFERS; i++) { +- MPIDI_PTL_global.overflow_bufs[i] = +- MPL_malloc(MPIDI_PTL_OVERFLOW_BUFFER_SZ, MPL_MEM_BUFFER); +- MPIDI_PTL_append_overflow(i); +- } +- +- MPIDI_PTL_global.node_map = +- MPL_malloc(size * sizeof(*MPIDI_PTL_global.node_map), MPL_MEM_ADDRESS); +- mpi_errno = +- MPIDI_CH4U_build_nodemap(rank, comm_world, size, MPIDI_PTL_global.node_map, +- &MPIDI_PTL_global.max_node_id); +- +- fn_exit: +- MPL_free(keyS); +- MPL_free(valS); +- +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDI_NM_mpi_finalize_hook(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- int ret, i; +- +- MPIR_Comm_release(MPIR_Process.comm_world); +- MPIR_Comm_release(MPIR_Process.comm_self); +- +- MPIDIG_finalize(); +- +- for (i = 0; i < MPIDI_PTL_NUM_OVERFLOW_BUFFERS; i++) { +- ret = PtlMEUnlink(MPIDI_PTL_global.overflow_me_handles[i]); +- MPL_free(MPIDI_PTL_global.overflow_bufs[i]); +- } +- ret = PtlMDRelease(MPIDI_PTL_global.md); +- ret = PtlPTFree(MPIDI_PTL_global.ni, MPIDI_PTL_global.pt); +- ret = PtlEQFree(MPIDI_PTL_global.eqs[1]); +- ret = PtlEQFree(MPIDI_PTL_global.eqs[0]); +- ret = PtlNIFini(MPIDI_PTL_global.ni); +- PtlFini(); +- +- MPL_free(MPIDI_PTL_global.node_map); +- MPL_free(MPIDI_PTL_global.addr_table); +- MPL_free(MPIDI_PTL_global.kvsname); +- +- return mpi_errno; +-} +- +-static inline int MPIDI_NM_get_vni_attr(int vni) +-{ +- MPIR_Assert(0 <= vni && vni < 1); +- return MPIDI_VNI_TX | MPIDI_VNI_RX; +-} +- +-static inline int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, +- int idx, int *lpid_ptr, bool is_remote) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_upids_to_lupids(int size, +- size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_free_mem(void *ptr) +-{ +- return MPIDI_CH4U_mpi_free_mem(ptr); +-} +- +-static inline void *MPIDI_NM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- return MPIDI_CH4U_mpi_alloc_mem(size, info_ptr); +-} +- +- +-#endif /* PTL_INIT_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_op.h ++++ /dev/null +@@ -1,24 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- */ +-#ifndef PTL_OP_H_INCLUDED +-#define PTL_OP_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +-static inline int MPIDI_NM_mpi_op_commit_hook(MPIR_Op * op_p) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +-#endif /* PTL_OP_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_probe.h ++++ /dev/null +@@ -1,35 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_PROBE_H_INCLUDED +-#define PTL_PROBE_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_improbe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- MPIDI_av_entry_t * addr, +- int *flag, MPIR_Request ** message, MPI_Status * status) +-{ +- return MPIDI_CH4U_mpi_improbe(source, tag, comm, context_offset, flag, message, status); +-} +- +-static inline int MPIDI_NM_mpi_iprobe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- MPIDI_av_entry_t * addr, int *flag, MPI_Status * status) +-{ +- return MPIDI_CH4U_mpi_iprobe(source, tag, comm, context_offset, flag, status); +-} +- +-#endif /* PTL_PROBE_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_proc.h ++++ /dev/null +@@ -1,42 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_PROC_H_INCLUDED +-#define PTL_PROC_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_rank_is_local(int rank, MPIR_Comm * comm) +-{ +- int ret; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); +- +- MPIR_Assert(0); +- ret = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); +- return ret; +-} +- +-static inline int MPIDI_NM_rank_is_local(MPIDI_av_entry_t * av) +-{ +- int ret; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); +- +- MPIR_Assert(0); +- ret = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); +- return ret; +-} +- +-#endif /* PTL_PROC_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_progress.h ++++ /dev/null +@@ -1,182 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_PROGRESS_H_INCLUDED +-#define PTL_PROGRESS_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_PTL_am_handler(ptl_event_t * e) +-{ +- int mpi_errno; +- MPIR_Request *rreq = NULL; +- void *p_data; +- void *in_data; +- size_t data_sz, in_data_sz; +- MPIDIG_am_target_cmpl_cb target_cmpl_cb = NULL; +- struct iovec *iov; +- int i, is_contig, iov_len; +- size_t done, curr_len, rem; +- +- in_data_sz = data_sz = (e->hdr_data & MPIDI_PTL_MSG_SZ_MASK); +- in_data = p_data = (e->start + (e->mlength - data_sz)); +- int handler_id = e->hdr_data >> 56; +- +- MPIDIG_global.target_msg_cbs[handler_id] (handler_id, e->start, +- &p_data, &data_sz, &is_contig, &target_cmpl_cb, +- &rreq); +- +- if (!rreq) +- goto fn_exit; +- +- if ((!p_data || !data_sz) && target_cmpl_cb) { +- target_cmpl_cb(rreq); +- goto fn_exit; +- } +- +- if (is_contig) { +- if (in_data_sz > data_sz) { +- rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; +- } else { +- rreq->status.MPI_ERROR = MPI_SUCCESS; +- } +- +- data_sz = MPL_MIN(data_sz, in_data_sz); +- MPIR_Memcpy(p_data, in_data, data_sz); +- MPIR_STATUS_SET_COUNT(rreq->status, data_sz); +- } else { +- done = 0; +- rem = in_data_sz; +- iov = (struct iovec *) p_data; +- iov_len = data_sz; +- +- for (i = 0; i < iov_len && rem > 0; i++) { +- curr_len = MPL_MIN(rem, iov[i].iov_len); +- MPIR_Memcpy(iov[i].iov_base, (char *) in_data + done, curr_len); +- rem -= curr_len; +- done += curr_len; +- } +- +- if (rem) { +- rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; +- } else { +- rreq->status.MPI_ERROR = MPI_SUCCESS; +- } +- +- MPIR_STATUS_SET_COUNT(rreq->status, done); +- } +- +- if (target_cmpl_cb) { +- target_cmpl_cb(rreq); +- } +- +- fn_exit: +- return mpi_errno; +-} +- +-static inline int MPIDI_NM_progress(int vni, int blocking) +-{ +- ptl_event_t e; +- unsigned int which; +- +- while (PtlEQPoll(MPIDI_PTL_global.eqs, 2, 0, &e, &which) != PTL_EQ_EMPTY) { +- switch (e.type) { +- case PTL_EVENT_PUT: +- MPIR_Assert(e.ptl_list == PTL_OVERFLOW_LIST); +- MPIDI_PTL_am_handler(&e); +- break; +- case PTL_EVENT_ACK: +- { +- int count; +- MPIR_Request *sreq = (MPIR_Request *) e.user_ptr; +- int handler_id = sreq->dev.ch4.am.netmod_am.portals4.handler_id; +- +- MPIR_cc_decr(sreq->cc_ptr, &count); +- MPIR_Assert(count >= 0); +- +- if (count == 0) { +- MPIR_Request_free(sreq); +- break; +- } +- MPIDIG_global.origin_cbs[handler_id] (sreq); +- } +- break; +- case PTL_EVENT_AUTO_UNLINK: +- MPIDI_PTL_global.overflow_me_handles[(size_t) e.user_ptr] = PTL_INVALID_HANDLE; +- break; +- case PTL_EVENT_AUTO_FREE: +- MPIDI_PTL_append_overflow((size_t) e.user_ptr); +- break; +- case PTL_EVENT_SEND: +- break; +- default: +- printf("ABORT: event = %d\n", e.type); +- abort(); +- } +- } +- +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_progress_test(void) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_progress_poke(void) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline void MPIDI_NM_progress_start(MPID_Progress_state * state) +-{ +- MPIR_Assert(0); +- return; +-} +- +-static inline void MPIDI_NM_progress_end(MPID_Progress_state * state) +-{ +- MPIR_Assert(0); +- return; +-} +- +-static inline int MPIDI_NM_progress_wait(MPID_Progress_state * state) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_progress_register(int (*progress_fn) (int *), int *id) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_progress_deregister(int id) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_progress_activate(int id) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_progress_deactivate(int id) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-#endif /* PTL_PROGRESS_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_recv.h ++++ /dev/null +@@ -1,65 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_RECV_H_INCLUDED +-#define PTL_RECV_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_recv(void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- MPIDI_av_entry_t * addr, +- MPI_Status * status, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_recv(buf, count, datatype, rank, tag, comm, context_offset, status, request); +-} +- +-static inline int MPIDI_NM_mpi_recv_init(void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_imrecv(void *buf, +- int count, MPI_Datatype datatype, MPIR_Request * message) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_irecv(void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_irecv(buf, count, datatype, rank, tag, comm, context_offset, request); +-} +- +-static inline int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-#endif /* PTL_RECV_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_request.h ++++ /dev/null +@@ -1,32 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_REQUEST_H_INCLUDED +-#define PTL_REQUEST_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline void MPIDI_NM_am_request_init(MPIR_Request * req) +-{ +- req->dev.ch4.am.netmod_am.portals4.pack_buffer = NULL; +- req->dev.ch4.am.netmod_am.portals4.md = PTL_INVALID_HANDLE; +-} +- +-static inline void MPIDI_NM_am_request_finalize(MPIR_Request * req) +-{ +- if ((req)->dev.ch4.am.netmod_am.portals4.pack_buffer) { +- MPL_free((req)->dev.ch4.am.netmod_am.portals4.pack_buffer); +- } +- if ((req)->dev.ch4.am.netmod_am.portals4.md != PTL_INVALID_HANDLE) { +- PtlMDRelease((req)->dev.ch4.am.netmod_am.portals4.md); +- } +-} +- +-#endif /* PTL_REQUEST_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_rma.h ++++ /dev/null +@@ -1,161 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_RMA_H_INCLUDED +-#define PTL_RMA_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_put(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, MPI_Datatype target_datatype, +- MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4U_mpi_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); +-} +- +-static inline int MPIDI_NM_mpi_get(void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, MPI_Datatype target_datatype, +- MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4U_mpi_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); +-} +- +-static inline int MPIDI_NM_mpi_rput(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPIR_Win * win, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDI_CH4U_mpi_rput(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, +- request); +-} +- +- +-static inline int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, +- const void *compare_addr, +- void *result_addr, +- MPI_Datatype datatype, +- int target_rank, MPI_Aint target_disp, +- MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4U_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, +- datatype, target_rank, target_disp, win); +-} +- +-static inline int MPIDI_NM_mpi_raccumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDI_CH4U_mpi_raccumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); +-} +- +-static inline int MPIDI_NM_mpi_rget_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- void *result_addr, +- int result_count, +- MPI_Datatype result_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDI_CH4U_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); +-} +- +-static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, +- void *result_addr, +- MPI_Datatype datatype, +- int target_rank, +- MPI_Aint target_disp, MPI_Op op, +- MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4U_mpi_fetch_and_op(origin_addr, result_addr, datatype, +- target_rank, target_disp, op, win); +-} +- +- +-static inline int MPIDI_NM_mpi_rget(void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPIR_Win * win, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDI_CH4U_mpi_rget(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, +- request); +-} +- +- +-static inline int MPIDI_NM_mpi_get_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- void *result_addr, +- int result_count, +- MPI_Datatype result_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, MPI_Op op, +- MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4U_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win); +-} +- +-static inline int MPIDI_NM_mpi_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, MPI_Op op, +- MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4U_mpi_accumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, op, +- win); +-} +- +-#endif /* PTL_RMA_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_send.h ++++ /dev/null +@@ -1,109 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_SEND_H_INCLUDED +-#define PTL_SEND_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_send(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_send(buf, count, datatype, rank, tag, comm, context_offset, addr, request); +-} +- +-static inline int MPIDI_NM_mpi_ssend(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_ssend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); +-} +- +-static inline int MPIDI_NM_mpi_send_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, request); +-} +- +-static inline int MPIDI_NM_mpi_ssend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, request); +-} +- +-static inline int MPIDI_NM_mpi_bsend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); +-} +- +-static inline int MPIDI_NM_mpi_rsend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); +-} +- +-static inline int MPIDI_NM_mpi_isend(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); +-} +- +-static inline int MPIDI_NM_mpi_issend(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDIG_mpi_issend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); +-} +- +-static inline int MPIDI_NM_mpi_cancel_send(MPIR_Request * sreq) +-{ +- return MPIDIG_mpi_cancel_send(sreq); +-} +- +-#endif /* PTL_SEND_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_spawn.h ++++ /dev/null +@@ -1,51 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_SPAWN_H_INCLUDED +-#define PTL_SPAWN_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_comm_connect(const char *port_name, +- MPIR_Info * info, +- int root, int timeout, +- MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_close_port(const char *port_name) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_comm_accept(const char *port_name, +- MPIR_Info * info, +- int root, MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-#endif /* PTL_SPAWN_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_startall.h ++++ /dev/null +@@ -1,22 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#ifndef PTL_STARTALL_H_INCLUDED +-#define PTL_STARTALL_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_startall(int count, MPIR_Request * requests[]) +-{ +- return MPIDIG_mpi_startall(count, requests); +-} +- +-#endif /* PTL_STARTALL_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_types.h ++++ /dev/null +@@ -1,73 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * * (C) 2016 by Argonne National Laboratory. +- * * See COPYRIGHT in top-level directory. +- * * +- * */ +- +-#ifndef PTL_TYPES_H_INCLUDED +-#define PTL_TYPES_H_INCLUDED +- +-#include "mpidimpl.h" +-#include "portals4.h" +- +-/* Portals 4 Limits */ +-#define MPIDI_PTL_EVENT_COUNT (1024*64) +-#define MPIDI_PTL_UNEXPECTED_HDR_COUNT (1024*64) +-#define MPIDI_PTL_LIST_SIZE (1024*64) +- +-/* Active Message Stuff */ +-#define MPIDI_PTL_NUM_OVERFLOW_BUFFERS (8) +-#define MPIDI_PTL_OVERFLOW_BUFFER_SZ (1024*1024) +-#define MPIDI_PTL_MAX_AM_EAGER_SZ (64*1024) +-#define MPIDI_PTL_AM_TAG (1 << 28) +- +-typedef struct { +- ptl_process_t process; +- ptl_pt_index_t pt; +-} MPIDI_PTL_addr_t; +- +-typedef struct { +- MPIDI_PTL_addr_t *addr_table; +- int *node_map; +- int max_node_id; +- char *kvsname; +- char pname[MPI_MAX_PROCESSOR_NAME]; +- void *overflow_bufs[MPIDI_PTL_NUM_OVERFLOW_BUFFERS]; +- ptl_handle_me_t overflow_me_handles[MPIDI_PTL_NUM_OVERFLOW_BUFFERS]; +- ptl_handle_ni_t ni; +- ptl_ni_limits_t ni_limits; +- ptl_handle_eq_t eqs[2]; +- ptl_pt_index_t pt; +- ptl_handle_md_t md; +-} MPIDI_PTL_global_t; +- +-extern MPIDI_PTL_global_t MPIDI_PTL_global; +- +-#define MPIDI_PTL_CONTEXT_ID_BITS 32 +-#define MPIDI_PTL_TAG_BITS 32 +- +-#define MPIDI_PTL_TAG_MASK (0x00000000FFFFFFFFULL) +-#define MPIDI_PTL_CTX_MASK (0xFFFFFFFF00000000ULL) +-#define MPIDI_PTL_TAG_SHIFT (MPIDI_PTL_TAG_BITS) +- +-static inline ptl_match_bits_t MPIDI_PTL_init_tag(MPIR_Context_id_t contextid, int tag) +-{ +- ptl_match_bits_t match_bits = 0; +- match_bits = contextid; +- match_bits <<= MPIDI_PTL_TAG_SHIFT; +- match_bits |= (MPIDI_PTL_TAG_MASK & tag); +- return match_bits; +-} +- +-#define MPIDI_PTL_MSG_SZ_MASK (0x00FFFFFFFFFFFFFFULL) +- +-static inline ptl_hdr_data_t MPIDI_PTL_init_am_hdr(int handler_id, size_t msg_sz) +-{ +- ptl_hdr_data_t hdr = 0; +- hdr = (ptl_hdr_data_t) handler_id << 56; +- hdr |= (MPIDI_PTL_MSG_SZ_MASK & msg_sz); +- return hdr; +-} +- +-#endif /* PTL_TYPES_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_unimpl.h ++++ /dev/null +@@ -1,19 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +- +-#ifdef __cplusplus +-} +-#endif /* PTL_UNIMPL_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/ptl_win.h ++++ /dev/null +@@ -1,218 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef PTL_WIN_H_INCLUDED +-#define PTL_WIN_H_INCLUDED +- +-#include "ptl_impl.h" +- +-static inline int MPIDI_NM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- return MPIDI_CH4R_mpi_win_set_info(win, info); +-} +- +- +-static inline int MPIDI_NM_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_start(group, assert, win); +-} +- +- +-static inline int MPIDI_NM_mpi_win_complete(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_complete(win); +-} +- +-static inline int MPIDI_NM_mpi_win_post(MPIR_Group * group, int assert, MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_post(group, assert, win); +-} +- +- +-static inline int MPIDI_NM_mpi_win_wait(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_wait(win); +-} +- +- +-static inline int MPIDI_NM_mpi_win_test(MPIR_Win * win, int *flag) +-{ +- return MPIDI_CH4R_mpi_win_test(win, flag); +-} +- +-static inline int MPIDI_NM_mpi_win_lock(int lock_type, int rank, int assert, +- MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4R_mpi_win_lock(lock_type, rank, assert, win); +-} +- +- +-static inline int MPIDI_NM_mpi_win_unlock(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4R_mpi_win_unlock(rank, win); +-} +- +-static inline int MPIDI_NM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- return MPIDI_CH4R_mpi_win_get_info(win, info_p_p); +-} +- +- +-static inline int MPIDI_NM_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- return MPIDI_CH4R_mpi_win_free(win_ptr); +-} +- +-static inline int MPIDI_NM_mpi_win_fence(int assert, MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_fence(assert, win); +-} +- +-static inline int MPIDI_NM_mpi_win_create(void *base, +- MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- return MPIDI_CH4R_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +-} +- +-static inline int MPIDI_NM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- return MPIDI_CH4R_mpi_win_attach(win, base, size); +-} +- +-static inline int MPIDI_NM_mpi_win_allocate_shared(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- return MPIDI_CH4R_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr, +- win_ptr); +-} +- +-static inline int MPIDI_NM_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- return MPIDI_CH4R_mpi_win_detach(win, base); +-} +- +-static inline int MPIDI_NM_mpi_win_shared_query(MPIR_Win * win, +- int rank, +- MPI_Aint * size, int *disp_unit, void *baseptr) +-{ +- return MPIDI_CH4R_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); +-} +- +-static inline int MPIDI_NM_mpi_win_allocate(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info, +- MPIR_Comm * comm, void *baseptr, MPIR_Win ** win) +-{ +- return MPIDI_CH4R_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); +-} +- +-static inline int MPIDI_NM_mpi_win_flush(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4R_mpi_win_flush(rank, win); +-} +- +-static inline int MPIDI_NM_mpi_win_flush_local_all(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_flush_local_all(win); +-} +- +-static inline int MPIDI_NM_mpi_win_unlock_all(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_unlock_all(win); +-} +- +-static inline int MPIDI_NM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) +-{ +- return MPIDI_CH4R_mpi_win_create_dynamic(info, comm, win); +-} +- +-static inline int MPIDI_NM_mpi_win_flush_local(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4R_mpi_win_flush_local(rank, win); +-} +- +-static inline int MPIDI_NM_mpi_win_sync(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_sync(win); +-} +- +-static inline int MPIDI_NM_mpi_win_flush_all(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_flush_all(win); +-} +- +-static inline int MPIDI_NM_mpi_win_lock_all(int assert, MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_lock_all(assert, win); +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_shared_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_dynamic_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_detach_hook(MPIR_Win * win, const void *base) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_free_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_cmpl_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_local_cmpl_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_target_cmpl_hook(int rank, MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_target_local_cmpl_hook(int rank, MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-#endif /* PTL_WIN_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/portals4/subconfigure.m4 ++++ /dev/null +@@ -1,33 +0,0 @@ +-[#] start of __file__ +-dnl MPICH_SUBCFG_AFTER=src/mpid/ch4 +- +-AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ +- AM_COND_IF([BUILD_CH4],[ +- for net in $ch4_netmods ; do +- AS_CASE([$net],[portals4],[build_ch4_netmod_portals4=yes]) +- if test $net = "portals4" ; then +- AC_DEFINE(HAVE_CH4_NETMOD_PORTALS4,1,[Portals4 netmod is built]) +- # if test "$build_ch4_locality_info" != "yes" ; then +- # AC_DEFINE(MPIDI_BUILD_CH4_LOCALITY_INFO, 1, [CH4 should build locality info]) +- # build_ch4_locality_info="yes" +- # fi +- fi +- done +- ]) +- AM_CONDITIONAL([BUILD_CH4_NETMOD_PORTALS4],[test "X$build_ch4_netmod_portals4" = "Xyes"]) +-])dnl +- +-AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ +-AM_COND_IF([BUILD_CH4_NETMOD_PORTALS4],[ +- AC_MSG_NOTICE([RUNNING CONFIGURE FOR ch4:portals4]) +- +- PAC_SET_HEADER_LIB_PATH(portals4) +- PAC_PUSH_FLAG(LIBS) +- PAC_CHECK_HEADER_LIB_FATAL(portals4, portals4.h, portals, PtlInit) +- PAC_APPEND_FLAG([-lportals],[WRAPPER_LIBS]) +- PAC_POP_FLAG(LIBS) +- +-])dnl end AM_COND_IF(BUILD_CH4_NETMOD_PORTALS4,...) +-])dnl end _BODY +- +-[#] end of __file__ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/src/Makefile.mk +@@ -0,0 +1,8 @@ ++## -*- Mode: Makefile; -*- ++## vim: set ft=automake : ++## ++## (C) 2019 by Argonne National Laboratory. ++## See COPYRIGHT in top-level directory. ++## ++ ++mpi_core_sources += src/mpid/ch4/netmod/src/netmod_impl.c +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/src/netmod_impl.c +@@ -0,0 +1,481 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpl.h" ++ ++MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; ++ ++#ifndef NETMOD_INLINE ++#ifndef NETMOD_DISABLE_INLINES ++ ++#include "mpidimpl.h" ++ ++int MPIDI_NM_mpi_comm_create_hook(MPIR_Comm * comm) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_comm_create_hook(comm); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_comm_free_hook(MPIR_Comm * comm) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_comm_free_hook(comm); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); ++ ++ ret = MPIDI_NM_func->mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_CONNECT); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); ++ ++ ret = MPIDI_NM_func->mpi_comm_disconnect(comm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_DISCONNECT); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); ++ ++ ret = MPIDI_NM_func->mpi_open_port(info_ptr, port_name); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OPEN_PORT); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_close_port(const char *port_name) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); ++ ++ ret = MPIDI_NM_func->mpi_close_port(port_name); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_CLOSE_PORT); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); ++ ++ ret = MPIDI_NM_func->mpi_comm_accept(port_name, info, root, comm, newcomm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_ACCEPT); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_op_commit_hook(MPIR_Op * op_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); ++ ++ ret = MPIDI_NM_native_func->mpi_op_commit_hook(op_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OP_COMMIT_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); ++ ++ ret = MPIDI_NM_native_func->mpi_op_free_hook(op_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_OP_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_create_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_win_create_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_allocate_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_win_allocate_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_allocate_shared_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_win_allocate_shared_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_create_dynamic_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_win_create_dynamic_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_win_attach_hook(win, base, size); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_detach_hook(MPIR_Win * win, const void *base) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_win_detach_hook(win, base); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_free_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_win_free_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); ++ ++ ret = MPIDI_NM_native_func->mpi_win_set_info(win, info); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_SET_INFO); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); ++ ++ ret = MPIDI_NM_native_func->mpi_win_get_info(win, info_p_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_GET_INFO); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); ++ ++ ret = MPIDI_NM_native_func->mpi_win_free(win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_FREE); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); ++ ++ ret = MPIDI_NM_native_func->mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); ++ ++ ret = MPIDI_NM_native_func->mpi_win_attach(win, base, size); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ATTACH); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); ++ ++ ret = MPIDI_NM_native_func->mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, ++ base_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE_SHARED); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); ++ ++ ret = MPIDI_NM_native_func->mpi_win_detach(win, base); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_DETACH); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); ++ ++ ret = MPIDI_NM_native_func->mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_ALLOCATE); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); ++ ++ ret = MPIDI_NM_native_func->mpi_win_create_dynamic(info, comm, win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_WIN_CREATE_DYNAMIC); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, MPIR_Comm * comm_world, ++ MPIR_Comm * comm_self, int spawned, int *n_vcis_provided) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_INIT_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_init(rank, size, appnum, tag_bits, comm_world, comm_self, spawned, ++ n_vcis_provided); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_INIT_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_finalize_hook(void) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_FINALIZE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_FINALIZE_HOOK); ++ ++ ret = MPIDI_NM_func->mpi_finalize(); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_FINALIZE_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_get_vci_attr(int vci) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_QUERY_VCI); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_QUERY_VCI); ++ ++ ret = MPIDI_NM_func->get_vci_attr(vci); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_QUERY_VCI); ++ return ret; ++} ++ ++void *MPIDI_NM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ void *ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLOC_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_ALLOC_MEM); ++ ++ ret = MPIDI_NM_native_func->mpi_alloc_mem(size, info_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_ALLOC_MEM); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_free_mem(void *ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_FREE_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_FREE_MEM); ++ ++ ret = MPIDI_NM_native_func->mpi_free_mem(ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_FREE_MEM); ++ return ret; ++} ++ ++int MPIDI_NM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_GET_LOCAL_UPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_GET_LOCAL_UPIDS); ++ ++ ret = MPIDI_NM_func->get_local_upids(comm, local_upid_size, local_upids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_GET_LOCAL_UPIDS); ++ return ret; ++} ++ ++int MPIDI_NM_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_UPIDS_TO_LUPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_UPIDS_TO_LUPIDS); ++ ++ ret = MPIDI_NM_func->upids_to_lupids(size, remote_upid_size, remote_upids, remote_lupids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_UPIDS_TO_LUPIDS); ++ return ret; ++} ++ ++int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_CREATE_INTERCOMM_FROM_LPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_CREATE_INTERCOMM_FROM_LPIDS); ++ ++ ret = MPIDI_NM_func->create_intercomm_from_lpids(newcomm_ptr, size, lpids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_CREATE_INTERCOMM_FROM_LPIDS); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_TYPE_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_TYPE_CREATE_HOOK); ++ ++ ret = MPIDI_NM_native_func->mpi_type_commit_hook(datatype_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_TYPE_CREATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_NM_mpi_type_free_hook(MPIR_Datatype * datatype_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_TYPE_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_TYPE_FREE_HOOK); ++ ++ ret = MPIDI_NM_native_func->mpi_type_free_hook(datatype_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_TYPE_FREE_HOOK); ++ return ret; ++} ++ ++#endif ++#endif +--- a/src/mpid/ch4/netmod/stubnm/Makefile.mk ++++ b/src/mpid/ch4/netmod/stubnm/Makefile.mk +@@ -1,6 +1,19 @@ ++## -*- Mode: Makefile; -*- ++## vim: set ft=automake : ++## ++## (C) 2016 by Argonne National Laboratory. ++## See COPYRIGHT in top-level directory. ++## + if BUILD_CH4_NETMOD_STUBNM + +-mpi_core_sources += src/mpid/ch4/netmod/stubnm/globals.c ++mpi_core_sources += src/mpid/ch4/netmod/stubnm/func_table.c\ ++ src/mpid/ch4/netmod/stubnm/stubnm_init.c \ ++ src/mpid/ch4/netmod/stubnm/stubnm_comm.c \ ++ src/mpid/ch4/netmod/stubnm/stubnm_datatype.c \ ++ src/mpid/ch4/netmod/stubnm/stubnm_op.c \ ++ src/mpid/ch4/netmod/stubnm/stubnm_spawn.c \ ++ src/mpid/ch4/netmod/stubnm/stubnm_win.c \ ++ src/mpid/ch4/netmod/stubnm/globals.c + # errnames_txt_files += src/mpid/ch4/netmod/stub/errnames.txt + + endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/stubnm/func_table.c +@@ -0,0 +1,193 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2016 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Mellanox Technologies Ltd. ++ * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED ++ */ ++ ++#include "mpl.h" ++ ++MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; ++ ++#ifndef NETMOD_INLINE ++#define NETMOD_DISABLE_INLINES ++#include ++#include "netmod_inline.h" ++MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = { ++ .mpi_init = MPIDI_STUBNM_mpi_init_hook, ++ .mpi_finalize = MPIDI_STUBNM_mpi_finalize_hook, ++ .progress = MPIDI_NM_progress, ++ .mpi_comm_connect = MPIDI_STUBNM_mpi_comm_connect, ++ .mpi_comm_disconnect = MPIDI_STUBNM_mpi_comm_disconnect, ++ .mpi_open_port = MPIDI_STUBNM_mpi_open_port, ++ .mpi_close_port = MPIDI_STUBNM_mpi_close_port, ++ .mpi_comm_accept = MPIDI_STUBNM_mpi_comm_accept, ++ /* Routines that handle addressing */ ++ .comm_get_lpid = MPIDI_NM_comm_get_lpid, ++ .get_local_upids = MPIDI_STUBNM_get_local_upids, ++ .get_vci_attr = MPIDI_STUBNM_get_vci_attr, ++ .upids_to_lupids = MPIDI_STUBNM_upids_to_lupids, ++ .create_intercomm_from_lpids = MPIDI_STUBNM_create_intercomm_from_lpids, ++ .mpi_comm_create_hook = MPIDI_STUBNM_mpi_comm_create_hook, ++ .mpi_comm_free_hook = MPIDI_STUBNM_mpi_comm_free_hook, ++ /* Window initialization/cleanup routines */ ++ .mpi_win_create_hook = MPIDI_STUBNM_mpi_win_create_hook, ++ .mpi_win_allocate_hook = MPIDI_STUBNM_mpi_win_allocate_hook, ++ .mpi_win_allocate_shared_hook = MPIDI_STUBNM_mpi_win_allocate_shared_hook, ++ .mpi_win_create_dynamic_hook = MPIDI_STUBNM_mpi_win_create_dynamic_hook, ++ .mpi_win_attach_hook = MPIDI_STUBNM_mpi_win_attach_hook, ++ .mpi_win_detach_hook = MPIDI_STUBNM_mpi_win_detach_hook, ++ .mpi_win_free_hook = MPIDI_STUBNM_mpi_win_free_hook, ++ /* RMA synchronization routines */ ++ .rma_win_cmpl_hook = MPIDI_NM_rma_win_cmpl_hook, ++ .rma_win_local_cmpl_hook = MPIDI_NM_rma_win_local_cmpl_hook, ++ .rma_target_cmpl_hook = MPIDI_NM_rma_target_cmpl_hook, ++ .rma_target_local_cmpl_hook = MPIDI_NM_rma_target_local_cmpl_hook, ++ /* Request initialization/cleanup routines */ ++ .am_request_init = MPIDI_NM_am_request_init, ++ .am_request_finalize = MPIDI_NM_am_request_finalize, ++ .prequest_free_hook = MPIDI_NM_prequest_free_hook, ++ /* Active Message Routines */ ++ .am_send_hdr = MPIDI_NM_am_send_hdr, ++ .am_isend = MPIDI_NM_am_isend, ++ .am_isendv = MPIDI_NM_am_isendv, ++ .am_send_hdr_reply = MPIDI_NM_am_send_hdr_reply, ++ .am_isend_reply = MPIDI_NM_am_isend_reply, ++ .am_hdr_max_sz = MPIDI_NM_am_hdr_max_sz, ++ .am_recv = MPIDI_NM_am_recv ++}; ++ ++MPIDI_NM_native_funcs_t MPIDI_NM_native_stubnm_funcs = { ++ .mpi_send = MPIDI_NM_mpi_send, ++ .mpi_ssend = MPIDI_NM_mpi_ssend, ++ .mpi_startall = MPIDI_NM_mpi_startall, ++ .mpi_send_init = MPIDI_NM_mpi_send_init, ++ .mpi_ssend_init = MPIDI_NM_mpi_ssend_init, ++ .mpi_rsend_init = MPIDI_NM_mpi_rsend_init, ++ .mpi_bsend_init = MPIDI_NM_mpi_bsend_init, ++ .mpi_isend = MPIDI_NM_mpi_isend, ++ .mpi_issend = MPIDI_NM_mpi_issend, ++ .mpi_cancel_send = MPIDI_NM_mpi_cancel_send, ++ .mpi_recv_init = MPIDI_NM_mpi_recv_init, ++ .mpi_recv = MPIDI_NM_mpi_recv, ++ .mpi_irecv = MPIDI_NM_mpi_irecv, ++ .mpi_imrecv = MPIDI_NM_mpi_imrecv, ++ .mpi_cancel_recv = MPIDI_NM_mpi_cancel_recv, ++ .mpi_alloc_mem = MPIDI_STUBNM_mpi_alloc_mem, ++ .mpi_free_mem = MPIDI_STUBNM_mpi_free_mem, ++ .mpi_improbe = MPIDI_NM_mpi_improbe, ++ .mpi_iprobe = MPIDI_NM_mpi_iprobe, ++ .mpi_win_set_info = MPIDI_STUBNM_mpi_win_set_info, ++ .mpi_win_shared_query = MPIDI_NM_mpi_win_shared_query, ++ .mpi_put = MPIDI_NM_mpi_put, ++ .mpi_win_start = MPIDI_NM_mpi_win_start, ++ .mpi_win_complete = MPIDI_NM_mpi_win_complete, ++ .mpi_win_post = MPIDI_NM_mpi_win_post, ++ .mpi_win_wait = MPIDI_NM_mpi_win_wait, ++ .mpi_win_test = MPIDI_NM_mpi_win_test, ++ .mpi_win_lock = MPIDI_NM_mpi_win_lock, ++ .mpi_win_unlock = MPIDI_NM_mpi_win_unlock, ++ .mpi_win_get_info = MPIDI_STUBNM_mpi_win_get_info, ++ .mpi_get = MPIDI_NM_mpi_get, ++ .mpi_win_free = MPIDI_STUBNM_mpi_win_free, ++ .mpi_win_fence = MPIDI_NM_mpi_win_fence, ++ .mpi_win_create = MPIDI_STUBNM_mpi_win_create, ++ .mpi_accumulate = MPIDI_NM_mpi_accumulate, ++ .mpi_win_attach = MPIDI_STUBNM_mpi_win_attach, ++ .mpi_win_allocate_shared = MPIDI_STUBNM_mpi_win_allocate_shared, ++ .mpi_rput = MPIDI_NM_mpi_rput, ++ .mpi_win_flush_local = MPIDI_NM_mpi_win_flush_local, ++ .mpi_win_detach = MPIDI_STUBNM_mpi_win_detach, ++ .mpi_compare_and_swap = MPIDI_NM_mpi_compare_and_swap, ++ .mpi_raccumulate = MPIDI_NM_mpi_raccumulate, ++ .mpi_rget_accumulate = MPIDI_NM_mpi_rget_accumulate, ++ .mpi_fetch_and_op = MPIDI_NM_mpi_fetch_and_op, ++ .mpi_win_allocate = MPIDI_STUBNM_mpi_win_allocate, ++ .mpi_win_flush = MPIDI_NM_mpi_win_flush, ++ .mpi_win_flush_local_all = MPIDI_NM_mpi_win_flush_local_all, ++ .mpi_win_unlock_all = MPIDI_NM_mpi_win_unlock_all, ++ .mpi_win_create_dynamic = MPIDI_STUBNM_mpi_win_create_dynamic, ++ .mpi_rget = MPIDI_NM_mpi_rget, ++ .mpi_win_sync = MPIDI_NM_mpi_win_sync, ++ .mpi_win_flush_all = MPIDI_NM_mpi_win_flush_all, ++ .mpi_get_accumulate = MPIDI_NM_mpi_get_accumulate, ++ .mpi_win_lock_all = MPIDI_NM_mpi_win_lock_all, ++ .rank_is_local = MPIDI_NM_rank_is_local, ++ .av_is_local = MPIDI_NM_av_is_local, ++ /* Collectives */ ++ .mpi_barrier = MPIDI_NM_mpi_barrier, ++ .mpi_bcast = MPIDI_NM_mpi_bcast, ++ .mpi_allreduce = MPIDI_NM_mpi_allreduce, ++ .mpi_allgather = MPIDI_NM_mpi_allgather, ++ .mpi_allgatherv = MPIDI_NM_mpi_allgatherv, ++ .mpi_scatter = MPIDI_NM_mpi_scatter, ++ .mpi_scatterv = MPIDI_NM_mpi_scatterv, ++ .mpi_gather = MPIDI_NM_mpi_gather, ++ .mpi_gatherv = MPIDI_NM_mpi_gatherv, ++ .mpi_alltoall = MPIDI_NM_mpi_alltoall, ++ .mpi_alltoallv = MPIDI_NM_mpi_alltoallv, ++ .mpi_alltoallw = MPIDI_NM_mpi_alltoallw, ++ .mpi_reduce = MPIDI_NM_mpi_reduce, ++ .mpi_reduce_scatter = MPIDI_NM_mpi_reduce_scatter, ++ .mpi_reduce_scatter_block = MPIDI_NM_mpi_reduce_scatter_block, ++ .mpi_scan = MPIDI_NM_mpi_scan, ++ .mpi_exscan = MPIDI_NM_mpi_exscan, ++ .mpi_neighbor_allgather = MPIDI_NM_mpi_neighbor_allgather, ++ .mpi_neighbor_allgatherv = MPIDI_NM_mpi_neighbor_allgatherv, ++ .mpi_neighbor_alltoall = MPIDI_NM_mpi_neighbor_alltoall, ++ .mpi_neighbor_alltoallv = MPIDI_NM_mpi_neighbor_alltoallv, ++ .mpi_neighbor_alltoallw = MPIDI_NM_mpi_neighbor_alltoallw, ++ .mpi_ineighbor_allgather = MPIDI_NM_mpi_ineighbor_allgather, ++ .mpi_ineighbor_allgatherv = MPIDI_NM_mpi_ineighbor_allgatherv, ++ .mpi_ineighbor_alltoall = MPIDI_NM_mpi_ineighbor_alltoall, ++ .mpi_ineighbor_alltoallv = MPIDI_NM_mpi_ineighbor_alltoallv, ++ .mpi_ineighbor_alltoallw = MPIDI_NM_mpi_ineighbor_alltoallw, ++ .mpi_ibarrier = MPIDI_NM_mpi_ibarrier, ++ .mpi_ibcast = MPIDI_NM_mpi_ibcast, ++ .mpi_iallgather = MPIDI_NM_mpi_iallgather, ++ .mpi_iallgatherv = MPIDI_NM_mpi_iallgatherv, ++ .mpi_iallreduce = MPIDI_NM_mpi_iallreduce, ++ .mpi_ialltoall = MPIDI_NM_mpi_ialltoall, ++ .mpi_ialltoallv = MPIDI_NM_mpi_ialltoallv, ++ .mpi_ialltoallw = MPIDI_NM_mpi_ialltoallw, ++ .mpi_iexscan = MPIDI_NM_mpi_iexscan, ++ .mpi_igather = MPIDI_NM_mpi_igather, ++ .mpi_igatherv = MPIDI_NM_mpi_igatherv, ++ .mpi_ireduce_scatter_block = MPIDI_NM_mpi_ireduce_scatter_block, ++ .mpi_ireduce_scatter = MPIDI_NM_mpi_ireduce_scatter, ++ .mpi_ireduce = MPIDI_NM_mpi_ireduce, ++ .mpi_iscan = MPIDI_NM_mpi_iscan, ++ .mpi_iscatter = MPIDI_NM_mpi_iscatter, ++ .mpi_iscatterv = MPIDI_NM_mpi_iscatterv, ++ .mpi_ibarrier_sched = MPIDI_NM_mpi_ibarrier_sched, ++ .mpi_ibcast_sched = MPIDI_NM_mpi_ibcast_sched, ++ .mpi_iallgather_sched = MPIDI_NM_mpi_iallgather_sched, ++ .mpi_iallgatherv_sched = MPIDI_NM_mpi_iallgatherv_sched, ++ .mpi_iallreduce_sched = MPIDI_NM_mpi_iallreduce_sched, ++ .mpi_ialltoall_sched = MPIDI_NM_mpi_ialltoall_sched, ++ .mpi_ialltoallv_sched = MPIDI_NM_mpi_ialltoallv_sched, ++ .mpi_ialltoallw_sched = MPIDI_NM_mpi_ialltoallw_sched, ++ .mpi_iexscan_sched = MPIDI_NM_mpi_iexscan_sched, ++ .mpi_igather_sched = MPIDI_NM_mpi_igather_sched, ++ .mpi_igatherv_sched = MPIDI_NM_mpi_igatherv_sched, ++ .mpi_ireduce_scatter_block_sched = MPIDI_NM_mpi_ireduce_scatter_block_sched, ++ .mpi_ireduce_scatter_sched = MPIDI_NM_mpi_ireduce_scatter_sched, ++ .mpi_ireduce_sched = MPIDI_NM_mpi_ireduce_sched, ++ .mpi_iscan_sched = MPIDI_NM_mpi_iscan_sched, ++ .mpi_iscatter_sched = MPIDI_NM_mpi_iscatter_sched, ++ .mpi_iscatterv_sched = MPIDI_NM_mpi_iscatterv_sched, ++ .mpi_ineighbor_allgather_sched = MPIDI_NM_mpi_ineighbor_allgather_sched, ++ .mpi_ineighbor_allgatherv_sched = MPIDI_NM_mpi_ineighbor_allgatherv_sched, ++ .mpi_ineighbor_alltoall_sched = MPIDI_NM_mpi_ineighbor_alltoall_sched, ++ .mpi_ineighbor_alltoallv_sched = MPIDI_NM_mpi_ineighbor_alltoallv_sched, ++ .mpi_ineighbor_alltoallw_sched = MPIDI_NM_mpi_ineighbor_alltoallw_sched, ++ /* Datatype hooks */ ++ .mpi_type_commit_hook = MPIDI_STUBNM_mpi_type_commit_hook, ++ .mpi_type_free_hook = MPIDI_STUBNM_mpi_type_free_hook, ++ /* Op hooks */ ++ .mpi_op_commit_hook = MPIDI_STUBNM_mpi_op_commit_hook, ++ .mpi_op_free_hook = MPIDI_STUBNM_mpi_op_free_hook, ++}; ++#endif +--- a/src/mpid/ch4/netmod/stubnm/globals.c ++++ b/src/mpid/ch4/netmod/stubnm/globals.c +@@ -16,7 +16,7 @@ + MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = { + MPIDI_NM_mpi_init_hook, + MPIDI_NM_mpi_finalize_hook, +- MPIDI_NM_get_vni_attr, ++ MPIDI_NM_get_vci_attr, + MPIDI_NM_progress, + MPIDI_NM_mpi_comm_connect, + MPIDI_NM_mpi_comm_disconnect, +@@ -42,6 +42,7 @@ MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = { + MPIDI_NM_rma_target_local_cmpl_hook, + MPIDI_NM_am_request_init, + MPIDI_NM_am_request_finalize, ++ MPIDI_NM_prequest_free_hook, + MPIDI_NM_am_send_hdr, + MPIDI_NM_am_isend, + MPIDI_NM_am_isendv, +--- a/src/mpid/ch4/netmod/stubnm/netmod_inline.h ++++ b/src/mpid/ch4/netmod/stubnm/netmod_inline.h +@@ -10,7 +10,6 @@ + */ + #ifndef NETMOD_INLINE_H_INCLUDED + #define NETMOD_INLINE_H_INCLUDED +-#include "stubnm_init.h" + #include "stubnm_probe.h" + #include "stubnm_progress.h" + #include "stubnm_recv.h" +@@ -20,11 +19,11 @@ + #include "stubnm_win.h" + #include "stubnm_rma.h" + #include "stubnm_am.h" +-#include "stubnm_spawn.h" +-#include "stubnm_comm.h" + #include "stubnm_unimpl.h" + #include "stubnm_proc.h" + #include "stubnm_coll.h" +-#include "stubnm_datatype.h" +-#include "stubnm_op.h" ++ ++/* Not-inlined STUBNM netmod functions */ ++#include "stubnm_noinline.h" ++ + #endif /* NETMOD_INLINE_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/stubnm/stubnm_coll.h ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_coll.h +@@ -14,10 +14,6 @@ + + #include "stubnm_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, + const void *algo_parameters_container ATTRIBUTE((unused))) + { +@@ -31,10 +27,6 @@ static inline int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * er + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_bcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, + const void *algo_parameters_container ATTRIBUTE((unused))) +@@ -49,10 +41,6 @@ static inline int MPIDI_NM_mpi_bcast(void *buffer, int count, MPI_Datatype datat + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag, +@@ -68,10 +56,6 @@ static inline int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +@@ -88,10 +72,6 @@ static inline int MPIDI_NM_mpi_allgather(const void *sendbuf, int sendcount, MPI + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -109,10 +89,6 @@ static inline int MPIDI_NM_mpi_allgatherv(const void *sendbuf, int sendcount, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, +@@ -130,10 +106,6 @@ static inline int MPIDI_NM_mpi_gather(const void *sendbuf, int sendcount, MPI_Da + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -151,10 +123,6 @@ static inline int MPIDI_NM_mpi_gatherv(const void *sendbuf, int sendcount, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, +@@ -172,10 +140,6 @@ static inline int MPIDI_NM_mpi_scatter(const void *sendbuf, int sendcount, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_scatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -194,10 +158,6 @@ static inline int MPIDI_NM_mpi_scatterv(const void *sendbuf, const int *sendcoun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +@@ -214,10 +174,6 @@ static inline int MPIDI_NM_mpi_alltoall(const void *sendbuf, int sendcount, MPI_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +@@ -236,10 +192,6 @@ static inline int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const int *sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -258,10 +210,6 @@ static inline int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const int sendcoun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +@@ -277,10 +225,6 @@ static inline int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, int co + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -299,10 +243,6 @@ static inline int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -321,10 +261,6 @@ static inline int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *r + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag, +@@ -340,10 +276,6 @@ static inline int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, int coun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag, +@@ -359,10 +291,6 @@ static inline int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, int co + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -379,10 +307,6 @@ static inline int MPIDI_NM_mpi_neighbor_allgather(const void *sendbuf, int sendc + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -399,10 +323,6 @@ static inline int MPIDI_NM_mpi_neighbor_allgatherv(const void *sendbuf, int send + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -419,10 +339,6 @@ static inline int MPIDI_NM_mpi_neighbor_alltoall(const void *sendbuf, int sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -441,10 +357,6 @@ static inline int MPIDI_NM_mpi_neighbor_alltoallv(const void *sendbuf, const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -464,10 +376,6 @@ static inline int MPIDI_NM_mpi_neighbor_alltoallw(const void *sendbuf, const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -484,10 +392,6 @@ static inline int MPIDI_NM_mpi_ineighbor_allgather(const void *sendbuf, int send + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -506,10 +410,6 @@ static inline int MPIDI_NM_mpi_ineighbor_allgatherv(const void *sendbuf, int sen + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -526,10 +426,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoall(const void *sendbuf, int sendc + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -548,10 +444,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallv(const void *sendbuf, const in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -571,10 +463,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbuf, const in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; +@@ -587,10 +475,6 @@ static inline int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** re + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ibcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm_ptr, MPIR_Request ** req) + { +@@ -604,10 +488,6 @@ static inline int MPIDI_NM_mpi_ibcast(void *buffer, int count, MPI_Datatype data + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** req) +@@ -623,10 +503,6 @@ static inline int MPIDI_NM_mpi_iallgather(const void *sendbuf, int sendcount, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Request ** req) +@@ -642,10 +518,6 @@ static inline int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, in + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -663,10 +535,6 @@ static inline int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPIR_Comm * comm_ptr, MPIR_Request ** req) +@@ -682,10 +550,6 @@ static inline int MPIDI_NM_mpi_ialltoall(const void *sendbuf, int sendcount, MPI + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +@@ -703,10 +567,6 @@ static inline int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const int *sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const int *sendcounts, + const int *sdispls, const MPI_Datatype sendtypes[], + void *recvbuf, const int *recvcounts, +@@ -724,10 +584,6 @@ static inline int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const int *sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Request ** req) +@@ -742,10 +598,6 @@ static inline int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, int c + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm_ptr, MPIR_Request ** req) +@@ -761,10 +613,6 @@ static inline int MPIDI_NM_mpi_igather(const void *sendbuf, int sendcount, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -781,10 +629,6 @@ static inline int MPIDI_NM_mpi_igatherv(const void *sendbuf, int sendcount, MPI_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -801,10 +645,6 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_block(const void *sendbuf, void * + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** req) +@@ -820,10 +660,6 @@ static inline int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbu + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Request ** req) +@@ -838,10 +674,6 @@ static inline int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, int c + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Request ** req) +@@ -856,10 +688,6 @@ static inline int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, int cou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -876,10 +704,6 @@ static inline int MPIDI_NM_mpi_iscatter(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, +@@ -897,10 +721,6 @@ static inline int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const int *sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibarrier_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno; +@@ -914,10 +734,6 @@ static inline int MPIDI_NM_mpi_ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibcast_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ibcast_sched(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm, MPIR_Sched_t s) + { +@@ -932,10 +748,6 @@ static inline int MPIDI_NM_mpi_ibcast_sched(void *buffer, int count, MPI_Datatyp + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallgather_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -953,10 +765,6 @@ static inline int MPIDI_NM_mpi_iallgather_sched(const void *sendbuf, int sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallgatherv_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -975,10 +783,6 @@ static inline int MPIDI_NM_mpi_iallgatherv_sched(const void *sendbuf, int sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallreduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iallreduce_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -994,10 +798,6 @@ static inline int MPIDI_NM_mpi_iallreduce_sched(const void *sendbuf, void *recvb + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoall_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -1015,10 +815,6 @@ static inline int MPIDI_NM_mpi_ialltoall_sched(const void *sendbuf, int sendcoun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoallv_sched(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -1037,10 +833,6 @@ static inline int MPIDI_NM_mpi_ialltoallv_sched(const void *sendbuf, const int s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ialltoallw_sched(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -1059,10 +851,6 @@ static inline int MPIDI_NM_mpi_ialltoallw_sched(const void *sendbuf, const int s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iexscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iexscan_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -1078,10 +866,6 @@ static inline int MPIDI_NM_mpi_iexscan_sched(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_igather_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -1099,10 +883,6 @@ static inline int MPIDI_NM_mpi_igather_sched(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_igatherv_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -1121,10 +901,6 @@ static inline int MPIDI_NM_mpi_igatherv_sched(const void *sendbuf, int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_block_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_scatter_block_sched(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, +@@ -1142,10 +918,6 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_block_sched(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_scatter_sched(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, MPIR_Sched_t s) +@@ -1162,10 +934,6 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_sched(const void *sendbuf, void * + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ireduce_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm, MPIR_Sched_t s) +@@ -1181,10 +949,6 @@ static inline int MPIDI_NM_mpi_ireduce_sched(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscan_sched(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Sched_t s) +@@ -1200,10 +964,6 @@ static inline int MPIDI_NM_mpi_iscan_sched(const void *sendbuf, void *recvbuf, i + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscatter_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -1221,10 +981,6 @@ static inline int MPIDI_NM_mpi_iscatter_sched(const void *sendbuf, int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatterv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_iscatterv_sched(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -1242,10 +998,6 @@ static inline int MPIDI_NM_mpi_iscatterv_sched(const void *sendbuf, const int *s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_allgather_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -1263,10 +1015,6 @@ static inline int MPIDI_NM_mpi_ineighbor_allgather_sched(const void *sendbuf, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_allgatherv_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], +@@ -1285,10 +1033,6 @@ static inline int MPIDI_NM_mpi_ineighbor_allgatherv_sched(const void *sendbuf, i + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoall_sched(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -1306,10 +1050,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoall_sched(const void *sendbuf, int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoallv_sched(const void *sendbuf, + const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, +@@ -1329,10 +1069,6 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallv_sched(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_NM_mpi_ineighbor_alltoallw_sched(const void *sendbuf, + const int sendcounts[], + const MPI_Aint sdispls[], +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_comm.c +@@ -0,0 +1,27 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubnm_impl.h" ++#include "mpidimpl.h" ++ ++int MPIDI_STUBNM_mpi_comm_create_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Assert(0); ++ return mpi_errno; ++} ++ ++int MPIDI_STUBNM_mpi_comm_free_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Assert(0); ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/stubnm/stubnm_comm.h ++++ /dev/null +@@ -1,39 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef STUBNM_COMM_H_INCLUDED +-#define STUBNM_COMM_H_INCLUDED +- +-#include "stubnm_impl.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Assert(0); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Assert(0); +- return mpi_errno; +-} +- +- +-#endif /* STUBNM_COMM_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_datatype.c +@@ -0,0 +1,25 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubnm_impl.h" ++#include "mpidimpl.h" ++ ++int MPIDI_STUBNM_mpi_type_free_hook(MPIR_Datatype * datatype_p) ++{ ++ MPIR_Assert(0); ++ return 0; ++} ++ ++int MPIDI_STUBNM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) ++{ ++ MPIR_Assert(0); ++ return 0; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/stubnm/stubnm_datatype.h ++++ /dev/null +@@ -1,28 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef STUBNM_DATATYPE_H_INCLUDED +-#define STUBNM_DATATYPE_H_INCLUDED +- +-#include "stubnm_impl.h" +- +-static inline int MPIDI_NM_mpi_type_free_hook(MPIR_Datatype * datatype_p) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +-static inline int MPIDI_NM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +-#endif /* STUBNM_DATATYPE_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_init.c +@@ -0,0 +1,65 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubnm_impl.h" ++#include "mpidimpl.h" ++ ++int MPIDI_STUBNM_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, ++ MPIR_Comm * comm_world, MPIR_Comm * comm_self, int spawned, ++ int *n_vcis_provided) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_Assert(0); ++ return mpi_errno; ++} ++ ++int MPIDI_STUBNM_mpi_finalize_hook(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Assert(0); ++ return mpi_errno; ++} ++ ++int MPIDI_STUBNM_get_vci_attr(int vci) ++{ ++ MPIR_Assert(0); ++ return 0; ++} ++ ++int MPIDI_STUBNM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_free_mem(void *ptr) ++{ ++ return MPIDIG_mpi_free_mem(ptr); ++} ++ ++void *MPIDI_STUBNM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ return MPIDIG_mpi_alloc_mem(size, info_ptr); ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/stubnm/stubnm_init.h ++++ /dev/null +@@ -1,83 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef STUBNM_INIT_H_INCLUDED +-#define STUBNM_INIT_H_INCLUDED +- +-#include "stubnm_impl.h" +- +-static inline int MPIDI_NM_mpi_init_hook(int rank, +- int size, +- int appnum, +- int *tag_bits, +- MPIR_Comm * comm_world, +- MPIR_Comm * comm_self, int spawned, int *n_vnis_provided) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- +- MPIR_Assert(0); +- return mpi_errno; +-} +- +-static inline int MPIDI_NM_mpi_finalize_hook(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Assert(0); +- return mpi_errno; +-} +- +-static inline int MPIDI_NM_get_vni_attr(int vni) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +-static inline int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, +- int idx, int *lpid_ptr, bool is_remote) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_upids_to_lupids(int size, +- size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_free_mem(void *ptr) +-{ +- return MPIDI_CH4U_mpi_free_mem(ptr); +-} +- +-static inline void *MPIDI_NM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- return MPIDI_CH4U_mpi_alloc_mem(size, info_ptr); +-} +- +- +-#endif /* STUBNM_INIT_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_noinline.h +@@ -0,0 +1,119 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef STUBNM_NOINLINE_H_INCLUDED ++#define STUBNM_NOINLINE_H_INCLUDED ++ ++#include "stubnm_impl.h" ++ ++/* stubnm_comm.h */ ++int MPIDI_STUBNM_mpi_comm_create_hook(MPIR_Comm * comm); ++int MPIDI_STUBNM_mpi_comm_free_hook(MPIR_Comm * comm); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_comm_create_hook MPIDI_STUBNM_mpi_comm_create_hook ++#define MPIDI_NM_mpi_comm_free_hook MPIDI_STUBNM_mpi_comm_free_hook ++#endif ++ ++/* stubnm_spawn.h */ ++int MPIDI_STUBNM_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm); ++int MPIDI_STUBNM_mpi_comm_disconnect(MPIR_Comm * comm_ptr); ++int MPIDI_STUBNM_mpi_open_port(MPIR_Info * info_ptr, char *port_name); ++int MPIDI_STUBNM_mpi_close_port(const char *port_name); ++int MPIDI_STUBNM_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_comm_connect MPIDI_STUBNM_mpi_comm_connect ++#define MPIDI_NM_mpi_comm_disconnect MPIDI_STUBNM_mpi_comm_disconnect ++#define MPIDI_NM_mpi_open_port MPIDI_STUBNM_mpi_open_port ++#define MPIDI_NM_mpi_close_port MPIDI_STUBNM_mpi_close_port ++#define MPIDI_NM_mpi_comm_accept MPIDI_STUBNM_mpi_comm_accept ++#endif ++ ++int MPIDI_STUBNM_mpi_op_free_hook(MPIR_Op * op_p); ++int MPIDI_STUBNM_mpi_op_commit_hook(MPIR_Op * op_p); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_op_free_hook MPIDI_STUBNM_mpi_op_free_hook ++#define MPIDI_NM_mpi_op_commit_hook MPIDI_STUBNM_mpi_op_commit_hook ++#endif ++ ++/* stubnm_win.h */ ++int MPIDI_STUBNM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); ++int MPIDI_STUBNM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); ++int MPIDI_STUBNM_mpi_win_free(MPIR_Win ** win_ptr); ++int MPIDI_STUBNM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); ++int MPIDI_STUBNM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_STUBNM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, ++ MPIR_Win ** win_ptr); ++int MPIDI_STUBNM_mpi_win_detach(MPIR_Win * win, const void *base); ++int MPIDI_STUBNM_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win_ptr); ++int MPIDI_STUBNM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win_ptr); ++int MPIDI_STUBNM_mpi_win_create_hook(MPIR_Win * win); ++int MPIDI_STUBNM_mpi_win_allocate_hook(MPIR_Win * win); ++int MPIDI_STUBNM_mpi_win_allocate_shared_hook(MPIR_Win * win); ++int MPIDI_STUBNM_mpi_win_create_dynamic_hook(MPIR_Win * win); ++int MPIDI_STUBNM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_STUBNM_mpi_win_detach_hook(MPIR_Win * win, const void *base); ++int MPIDI_STUBNM_mpi_win_free_hook(MPIR_Win * win); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_win_set_info MPIDI_STUBNM_mpi_win_set_info ++#define MPIDI_NM_mpi_win_get_info MPIDI_STUBNM_mpi_win_get_info ++#define MPIDI_NM_mpi_win_free MPIDI_STUBNM_mpi_win_free ++#define MPIDI_NM_mpi_win_create MPIDI_STUBNM_mpi_win_create ++#define MPIDI_NM_mpi_win_attach MPIDI_STUBNM_mpi_win_attach ++#define MPIDI_NM_mpi_win_allocate_shared MPIDI_STUBNM_mpi_win_allocate_shared ++#define MPIDI_NM_mpi_win_detach MPIDI_STUBNM_mpi_win_detach ++#define MPIDI_NM_mpi_win_allocate MPIDI_STUBNM_mpi_win_allocate ++#define MPIDI_NM_mpi_win_create_dynamic MPIDI_STUBNM_mpi_win_create_dynamic ++#define MPIDI_NM_mpi_win_create_hook MPIDI_STUBNM_mpi_win_create_hook ++#define MPIDI_NM_mpi_win_allocate_hook MPIDI_STUBNM_mpi_win_allocate_hook ++#define MPIDI_NM_mpi_win_allocate_shared_hook MPIDI_STUBNM_mpi_win_allocate_shared_hook ++#define MPIDI_NM_mpi_win_create_dynamic_hook MPIDI_STUBNM_mpi_win_create_dynamic_hook ++#define MPIDI_NM_mpi_win_attach_hook MPIDI_STUBNM_mpi_win_attach_hook ++#define MPIDI_NM_mpi_win_detach_hook MPIDI_STUBNM_mpi_win_detach_hook ++#define MPIDI_NM_mpi_win_free_hook MPIDI_STUBNM_mpi_win_free_hook ++#endif ++ ++/* stubnm_init.h */ ++int MPIDI_STUBNM_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, ++ MPIR_Comm * comm_world, MPIR_Comm * comm_self, int spawned, ++ int *n_vcis_provided); ++int MPIDI_STUBNM_mpi_finalize_hook(void); ++int MPIDI_STUBNM_get_vci_attr(int vci); ++void *MPIDI_STUBNM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDI_STUBNM_mpi_free_mem(void *ptr); ++int MPIDI_STUBNM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids); ++int MPIDI_STUBNM_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids); ++int MPIDI_STUBNM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_init_hook MPIDI_STUBNM_mpi_init_hook ++#define MPIDI_NM_mpi_finalize_hook MPIDI_STUBNM_mpi_finalize_hook ++#define MPIDI_NM_get_vci_attr MPIDI_STUBNM_get_vci_attr ++#define MPIDI_NM_mpi_alloc_mem MPIDI_STUBNM_mpi_alloc_mem ++#define MPIDI_NM_mpi_free_mem MPIDI_STUBNM_mpi_free_mem ++#define MPIDI_NM_get_local_upids MPIDI_STUBNM_get_local_upids ++#define MPIDI_NM_upids_to_lupids MPIDI_STUBNM_upids_to_lupids ++#define MPIDI_NM_create_intercomm_from_lpids MPIDI_STUBNM_create_intercomm_from_lpids ++#endif ++ ++int MPIDI_STUBNM_mpi_type_free_hook(MPIR_Datatype * datatype_p); ++int MPIDI_STUBNM_mpi_type_commit_hook(MPIR_Datatype * datatype_p); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_type_free_hook MPIDI_STUBNM_mpi_type_free_hook ++#define MPIDI_NM_mpi_type_commit_hook MPIDI_STUBNM_mpi_type_commit_hook ++#endif ++ ++#endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_op.c +@@ -0,0 +1,25 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubnm_impl.h" ++#include "mpidimpl.h" ++ ++int MPIDI_STUBNM_mpi_op_free_hook(MPIR_Op * op_p) ++{ ++ MPIR_Assert(0); ++ return 0; ++} ++ ++int MPIDI_STUBNM_mpi_op_commit_hook(MPIR_Op * op_p) ++{ ++ MPIR_Assert(0); ++ return 0; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/stubnm/stubnm_op.h ++++ /dev/null +@@ -1,29 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2012 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef STUBNM_OP_H_INCLUDED +-#define STUBNM_OP_H_INCLUDED +- +-#include "stubnm_impl.h" +- +-static inline int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +-static inline int MPIDI_NM_mpi_op_commit_hook(MPIR_Op * op_p) +-{ +- MPIR_Assert(0); +- return 0; +-} +- +- +-#endif /* STUBNM_OP_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/stubnm/stubnm_probe.h ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_probe.h +@@ -20,7 +20,7 @@ static inline int MPIDI_NM_mpi_improbe(int source, + MPIDI_av_entry_t * addr, + int *flag, MPIR_Request ** message, MPI_Status * status) + { +- return MPIDI_CH4U_mpi_improbe(source, tag, comm, context_offset, flag, message, status); ++ return MPIDIG_mpi_improbe(source, tag, comm, context_offset, flag, message, status); + } + + static inline int MPIDI_NM_mpi_iprobe(int source, +@@ -29,7 +29,7 @@ static inline int MPIDI_NM_mpi_iprobe(int source, + int context_offset, + MPIDI_av_entry_t * addr, int *flag, MPI_Status * status) + { +- return MPIDI_CH4U_mpi_iprobe(source, tag, comm, context_offset, flag, status); ++ return MPIDIG_mpi_iprobe(source, tag, comm, context_offset, flag, status); + } + + #endif /* STUBNM_PROBE_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/stubnm/stubnm_proc.h ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_proc.h +@@ -38,4 +38,12 @@ static inline int MPIDI_NM_av_is_local(MPIDI_av_entry_t * av) + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); + return ret; + } ++ ++static inline int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx, int *lpid_ptr, ++ bool is_remote) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ + #endif /* STUBNM_PROC_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/stubnm/stubnm_progress.h ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_progress.h +@@ -13,7 +13,7 @@ + + #include "stubnm_impl.h" + +-static inline int MPIDI_NM_progress(int vni, int blocking) ++static inline int MPIDI_NM_progress(int vci, int blocking) + { + MPIR_Assert(0); + return MPI_SUCCESS; +--- a/src/mpid/ch4/netmod/stubnm/stubnm_rma.h ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_rma.h +@@ -21,8 +21,8 @@ static inline int MPIDI_NM_mpi_put(const void *origin_addr, + int target_count, MPI_Datatype target_datatype, + MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); ++ return MPIDIG_mpi_put(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win); + } + + static inline int MPIDI_NM_mpi_get(void *origin_addr, +@@ -33,8 +33,8 @@ static inline int MPIDI_NM_mpi_get(void *origin_addr, + int target_count, MPI_Datatype target_datatype, + MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); ++ return MPIDIG_mpi_get(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win); + } + + static inline int MPIDI_NM_mpi_rput(const void *origin_addr, +@@ -47,9 +47,8 @@ static inline int MPIDI_NM_mpi_rput(const void *origin_addr, + MPIR_Win * win, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- return MPIDI_CH4U_mpi_rput(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, +- request); ++ return MPIDIG_mpi_rput(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win, request); + } + + +@@ -60,8 +59,8 @@ static inline int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, + int target_rank, MPI_Aint target_disp, + MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, +- datatype, target_rank, target_disp, win); ++ return MPIDIG_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, datatype, ++ target_rank, target_disp, win); + } + + static inline int MPIDI_NM_mpi_raccumulate(const void *origin_addr, +@@ -74,9 +73,8 @@ static inline int MPIDI_NM_mpi_raccumulate(const void *origin_addr, + MPI_Op op, MPIR_Win * win, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- return MPIDI_CH4U_mpi_raccumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); ++ return MPIDIG_mpi_raccumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win, request); + } + + static inline int MPIDI_NM_mpi_rget_accumulate(const void *origin_addr, +@@ -92,10 +90,9 @@ static inline int MPIDI_NM_mpi_rget_accumulate(const void *origin_addr, + MPI_Op op, MPIR_Win * win, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- return MPIDI_CH4U_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); ++ return MPIDIG_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, result_addr, ++ result_count, result_datatype, target_rank, target_disp, ++ target_count, target_datatype, op, win, request); + } + + static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, +@@ -105,8 +102,8 @@ static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, + MPI_Aint target_disp, MPI_Op op, + MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_fetch_and_op(origin_addr, result_addr, datatype, +- target_rank, target_disp, op, win); ++ return MPIDIG_mpi_fetch_and_op(origin_addr, result_addr, datatype, target_rank, target_disp, op, ++ win); + } + + +@@ -120,9 +117,8 @@ static inline int MPIDI_NM_mpi_rget(void *origin_addr, + MPIR_Win * win, MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { +- return MPIDI_CH4U_mpi_rget(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, +- request); ++ return MPIDIG_mpi_rget(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win, request); + } + + +@@ -138,10 +134,9 @@ static inline int MPIDI_NM_mpi_get_accumulate(const void *origin_addr, + MPI_Datatype target_datatype, MPI_Op op, + MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win); ++ return MPIDIG_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, result_addr, ++ result_count, result_datatype, target_rank, target_disp, ++ target_count, target_datatype, op, win); + } + + static inline int MPIDI_NM_mpi_accumulate(const void *origin_addr, +@@ -153,9 +148,8 @@ static inline int MPIDI_NM_mpi_accumulate(const void *origin_addr, + MPI_Datatype target_datatype, MPI_Op op, + MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_accumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, op, +- win); ++ return MPIDIG_mpi_accumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win); + } + + #endif /* STUBNM_RMA_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/stubnm/stubnm_send.h ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_send.h +@@ -43,7 +43,8 @@ static inline int MPIDI_NM_mpi_send_init(const void *buf, + MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- return MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + + static inline int MPIDI_NM_mpi_ssend_init(const void *buf, +@@ -54,7 +55,8 @@ static inline int MPIDI_NM_mpi_ssend_init(const void *buf, + MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- return MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + + static inline int MPIDI_NM_mpi_bsend_init(const void *buf, +@@ -65,7 +67,8 @@ static inline int MPIDI_NM_mpi_bsend_init(const void *buf, + MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- return MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + + static inline int MPIDI_NM_mpi_rsend_init(const void *buf, +@@ -76,7 +79,8 @@ static inline int MPIDI_NM_mpi_rsend_init(const void *buf, + MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- return MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + + static inline int MPIDI_NM_mpi_isend(const void *buf, +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_spawn.c +@@ -0,0 +1,45 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubnm_impl.h" ++#include "mpidimpl.h" ++ ++int MPIDI_STUBNM_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_close_port(const char *port_name) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/stubnm/stubnm_spawn.h ++++ /dev/null +@@ -1,51 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef STUBNM_SPAWN_H_INCLUDED +-#define STUBNM_SPAWN_H_INCLUDED +- +-#include "stubnm_impl.h" +- +-static inline int MPIDI_NM_mpi_comm_connect(const char *port_name, +- MPIR_Info * info, +- int root, int timeout, +- MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_close_port(const char *port_name) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_comm_accept(const char *port_name, +- MPIR_Info * info, +- int root, MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-#endif /* STUBNM_SPAWN_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/stubnm/stubnm_startall.h ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_startall.h +@@ -18,4 +18,9 @@ static inline int MPIDI_NM_mpi_startall(int count, MPIR_Request * requests[]) + return MPIDIG_mpi_startall(count, requests); + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_NM_prequest_free_hook(MPIR_Request * req) ++{ ++ MPIDIG_prequest_free_hook(req); ++} ++ + #endif /* STUBNM_STARTALL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_win.c +@@ -0,0 +1,96 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubnm_impl.h" ++#include "mpidimpl.h" ++ ++int MPIDI_STUBNM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ return MPIDIG_mpi_win_set_info(win, info); ++} ++ ++int MPIDI_STUBNM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ return MPIDIG_mpi_win_get_info(win, info_p_p); ++} ++ ++int MPIDI_STUBNM_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ return MPIDIG_mpi_win_free(win_ptr); ++} ++ ++int MPIDI_STUBNM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ return MPIDIG_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++} ++ ++int MPIDI_STUBNM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ return MPIDIG_mpi_win_attach(win, base, size); ++} ++ ++int MPIDI_STUBNM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ return MPIDIG_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr, win_ptr); ++} ++ ++int MPIDI_STUBNM_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ return MPIDIG_mpi_win_detach(win, base); ++} ++ ++int MPIDI_STUBNM_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win) ++{ ++ return MPIDIG_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); ++} ++ ++int MPIDI_STUBNM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win) ++{ ++ return MPIDIG_mpi_win_create_dynamic(info, comm, win); ++} ++ ++int MPIDI_STUBNM_mpi_win_create_hook(MPIR_Win * win) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_win_allocate_hook(MPIR_Win * win) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_win_allocate_shared_hook(MPIR_Win * win) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_win_create_dynamic_hook(MPIR_Win * win) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_win_detach_hook(MPIR_Win * win, const void *base) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBNM_mpi_win_free_hook(MPIR_Win * win) ++{ ++ return MPI_SUCCESS; ++} +--- a/src/mpid/ch4/netmod/stubnm/stubnm_win.h ++++ b/src/mpid/ch4/netmod/stubnm/stubnm_win.h +@@ -13,186 +13,87 @@ + + #include "stubnm_impl.h" + +-static inline int MPIDI_NM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- return MPIDI_CH4R_mpi_win_set_info(win, info); +-} +- +- + static inline int MPIDI_NM_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_start(group, assert, win); ++ return MPIDIG_mpi_win_start(group, assert, win); + } + +- + static inline int MPIDI_NM_mpi_win_complete(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_complete(win); ++ return MPIDIG_mpi_win_complete(win); + } + + static inline int MPIDI_NM_mpi_win_post(MPIR_Group * group, int assert, MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_post(group, assert, win); ++ return MPIDIG_mpi_win_post(group, assert, win); + } + +- + static inline int MPIDI_NM_mpi_win_wait(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_wait(win); ++ return MPIDIG_mpi_win_wait(win); + } + +- + static inline int MPIDI_NM_mpi_win_test(MPIR_Win * win, int *flag) + { +- return MPIDI_CH4R_mpi_win_test(win, flag); ++ return MPIDIG_mpi_win_test(win, flag); + } + + static inline int MPIDI_NM_mpi_win_lock(int lock_type, int rank, int assert, + MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4R_mpi_win_lock(lock_type, rank, assert, win); ++ return MPIDIG_mpi_win_lock(lock_type, rank, assert, win); + } + +- + static inline int MPIDI_NM_mpi_win_unlock(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4R_mpi_win_unlock(rank, win); +-} +- +-static inline int MPIDI_NM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- return MPIDI_CH4R_mpi_win_get_info(win, info_p_p); +-} +- +- +-static inline int MPIDI_NM_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- return MPIDI_CH4R_mpi_win_free(win_ptr); ++ return MPIDIG_mpi_win_unlock(rank, win); + } + + static inline int MPIDI_NM_mpi_win_fence(int assert, MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_fence(assert, win); +-} +- +-static inline int MPIDI_NM_mpi_win_create(void *base, +- MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- return MPIDI_CH4R_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +-} +- +-static inline int MPIDI_NM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- return MPIDI_CH4R_mpi_win_attach(win, base, size); +-} +- +-static inline int MPIDI_NM_mpi_win_allocate_shared(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- return MPIDI_CH4R_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr, +- win_ptr); +-} +- +-static inline int MPIDI_NM_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- return MPIDI_CH4R_mpi_win_detach(win, base); ++ return MPIDIG_mpi_win_fence(assert, win); + } + + static inline int MPIDI_NM_mpi_win_shared_query(MPIR_Win * win, + int rank, + MPI_Aint * size, int *disp_unit, void *baseptr) + { +- return MPIDI_CH4R_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); +-} +- +-static inline int MPIDI_NM_mpi_win_allocate(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info, +- MPIR_Comm * comm, void *baseptr, MPIR_Win ** win) +-{ +- return MPIDI_CH4R_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); ++ return MPIDIG_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); + } + + static inline int MPIDI_NM_mpi_win_flush(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4R_mpi_win_flush(rank, win); ++ return MPIDIG_mpi_win_flush(rank, win); + } + + static inline int MPIDI_NM_mpi_win_flush_local_all(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_flush_local_all(win); ++ return MPIDIG_mpi_win_flush_local_all(win); + } + + static inline int MPIDI_NM_mpi_win_unlock_all(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_unlock_all(win); +-} +- +-static inline int MPIDI_NM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) +-{ +- return MPIDI_CH4R_mpi_win_create_dynamic(info, comm, win); ++ return MPIDIG_mpi_win_unlock_all(win); + } + + static inline int MPIDI_NM_mpi_win_flush_local(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4R_mpi_win_flush_local(rank, win); ++ return MPIDIG_mpi_win_flush_local(rank, win); + } + + static inline int MPIDI_NM_mpi_win_sync(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_sync(win); ++ return MPIDIG_mpi_win_sync(win); + } + + static inline int MPIDI_NM_mpi_win_flush_all(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_flush_all(win); ++ return MPIDIG_mpi_win_flush_all(win); + } + + static inline int MPIDI_NM_mpi_win_lock_all(int assert, MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_lock_all(assert, win); +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_shared_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_dynamic_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_detach_hook(MPIR_Win * win, const void *base) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_free_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; ++ return MPIDIG_mpi_win_lock_all(assert, win); + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_cmpl_hook(MPIR_Win * win) +--- a/src/mpid/ch4/netmod/ucx/Makefile.mk ++++ b/src/mpid/ch4/netmod/ucx/Makefile.mk +@@ -8,6 +8,12 @@ if BUILD_CH4_NETMOD_UCX + + noinst_HEADERS += + mpi_core_sources += src/mpid/ch4/netmod/ucx/func_table.c\ ++ src/mpid/ch4/netmod/ucx/ucx_init.c \ ++ src/mpid/ch4/netmod/ucx/ucx_comm.c \ ++ src/mpid/ch4/netmod/ucx/ucx_datatype.c \ ++ src/mpid/ch4/netmod/ucx/ucx_op.c \ ++ src/mpid/ch4/netmod/ucx/ucx_spawn.c \ ++ src/mpid/ch4/netmod/ucx/ucx_win.c \ + src/mpid/ch4/netmod/ucx/globals.c + + errnames_txt_files += src/mpid/ch4/netmod/ucx/errnames.txt +--- a/src/mpid/ch4/netmod/ucx/func_table.c ++++ b/src/mpid/ch4/netmod/ucx/func_table.c +@@ -16,29 +16,30 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + #include + #include "netmod_inline.h" + MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = { +- .mpi_init = MPIDI_NM_mpi_init_hook, +- .mpi_finalize = MPIDI_NM_mpi_finalize_hook, ++ .mpi_init = MPIDI_UCX_mpi_init_hook, ++ .mpi_finalize = MPIDI_UCX_mpi_finalize_hook, + .progress = MPIDI_NM_progress, +- .mpi_comm_connect = MPIDI_NM_mpi_comm_connect, +- .mpi_comm_disconnect = MPIDI_NM_mpi_comm_disconnect, +- .mpi_open_port = MPIDI_NM_mpi_open_port, +- .mpi_close_port = MPIDI_NM_mpi_close_port, +- .mpi_comm_accept = MPIDI_NM_mpi_comm_accept, ++ .mpi_comm_connect = MPIDI_UCX_mpi_comm_connect, ++ .mpi_comm_disconnect = MPIDI_UCX_mpi_comm_disconnect, ++ .mpi_open_port = MPIDI_UCX_mpi_open_port, ++ .mpi_close_port = MPIDI_UCX_mpi_close_port, ++ .mpi_comm_accept = MPIDI_UCX_mpi_comm_accept, + /* Routines that handle addressing */ + .comm_get_lpid = MPIDI_NM_comm_get_lpid, +- .get_local_upids = MPIDI_NM_get_local_upids, +- .upids_to_lupids = MPIDI_NM_upids_to_lupids, +- .create_intercomm_from_lpids = MPIDI_NM_create_intercomm_from_lpids, +- .mpi_comm_create_hook = MPIDI_NM_mpi_comm_create_hook, +- .mpi_comm_free_hook = MPIDI_NM_mpi_comm_free_hook, ++ .get_local_upids = MPIDI_UCX_get_local_upids, ++ .get_vci_attr = MPIDI_UCX_get_vci_attr, ++ .upids_to_lupids = MPIDI_UCX_upids_to_lupids, ++ .create_intercomm_from_lpids = MPIDI_UCX_create_intercomm_from_lpids, ++ .mpi_comm_create_hook = MPIDI_UCX_mpi_comm_create_hook, ++ .mpi_comm_free_hook = MPIDI_UCX_mpi_comm_free_hook, + /* Window initialization/cleanup routines */ +- .mpi_win_create_hook = MPIDI_NM_mpi_win_create_hook, +- .mpi_win_allocate_hook = MPIDI_NM_mpi_win_allocate_hook, +- .mpi_win_allocate_shared_hook = MPIDI_NM_mpi_win_allocate_shared_hook, +- .mpi_win_create_dynamic_hook = MPIDI_NM_mpi_win_create_dynamic_hook, +- .mpi_win_attach_hook = MPIDI_NM_mpi_win_attach_hook, +- .mpi_win_detach_hook = MPIDI_NM_mpi_win_detach_hook, +- .mpi_win_free_hook = MPIDI_NM_mpi_win_free_hook, ++ .mpi_win_create_hook = MPIDI_UCX_mpi_win_create_hook, ++ .mpi_win_allocate_hook = MPIDI_UCX_mpi_win_allocate_hook, ++ .mpi_win_allocate_shared_hook = MPIDI_UCX_mpi_win_allocate_shared_hook, ++ .mpi_win_create_dynamic_hook = MPIDI_UCX_mpi_win_create_dynamic_hook, ++ .mpi_win_attach_hook = MPIDI_UCX_mpi_win_attach_hook, ++ .mpi_win_detach_hook = MPIDI_UCX_mpi_win_detach_hook, ++ .mpi_win_free_hook = MPIDI_UCX_mpi_win_free_hook, + /* RMA synchronization routines */ + .rma_win_cmpl_hook = MPIDI_NM_rma_win_cmpl_hook, + .rma_win_local_cmpl_hook = MPIDI_NM_rma_win_local_cmpl_hook, +@@ -47,6 +48,7 @@ MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = { + /* Request initialization/cleanup routines */ + .am_request_init = MPIDI_NM_am_request_init, + .am_request_finalize = MPIDI_NM_am_request_finalize, ++ .prequest_free_hook = MPIDI_NM_prequest_free_hook, + /* Active Message Routines */ + .am_send_hdr = MPIDI_NM_am_send_hdr, + .am_isend = MPIDI_NM_am_isend, +@@ -73,11 +75,11 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_ucx_funcs = { + .mpi_irecv = MPIDI_NM_mpi_irecv, + .mpi_imrecv = MPIDI_NM_mpi_imrecv, + .mpi_cancel_recv = MPIDI_NM_mpi_cancel_recv, +- .mpi_alloc_mem = MPIDI_NM_mpi_alloc_mem, +- .mpi_free_mem = MPIDI_NM_mpi_free_mem, ++ .mpi_alloc_mem = MPIDI_UCX_mpi_alloc_mem, ++ .mpi_free_mem = MPIDI_UCX_mpi_free_mem, + .mpi_improbe = MPIDI_NM_mpi_improbe, + .mpi_iprobe = MPIDI_NM_mpi_iprobe, +- .mpi_win_set_info = MPIDI_NM_mpi_win_set_info, ++ .mpi_win_set_info = MPIDI_UCX_mpi_win_set_info, + .mpi_win_shared_query = MPIDI_NM_mpi_win_shared_query, + .mpi_put = MPIDI_NM_mpi_put, + .mpi_win_start = MPIDI_NM_mpi_win_start, +@@ -87,26 +89,26 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_ucx_funcs = { + .mpi_win_test = MPIDI_NM_mpi_win_test, + .mpi_win_lock = MPIDI_NM_mpi_win_lock, + .mpi_win_unlock = MPIDI_NM_mpi_win_unlock, +- .mpi_win_get_info = MPIDI_NM_mpi_win_get_info, ++ .mpi_win_get_info = MPIDI_UCX_mpi_win_get_info, + .mpi_get = MPIDI_NM_mpi_get, +- .mpi_win_free = MPIDI_NM_mpi_win_free, ++ .mpi_win_free = MPIDI_UCX_mpi_win_free, + .mpi_win_fence = MPIDI_NM_mpi_win_fence, +- .mpi_win_create = MPIDI_NM_mpi_win_create, ++ .mpi_win_create = MPIDI_UCX_mpi_win_create, + .mpi_accumulate = MPIDI_NM_mpi_accumulate, +- .mpi_win_attach = MPIDI_NM_mpi_win_attach, +- .mpi_win_allocate_shared = MPIDI_NM_mpi_win_allocate_shared, ++ .mpi_win_attach = MPIDI_UCX_mpi_win_attach, ++ .mpi_win_allocate_shared = MPIDI_UCX_mpi_win_allocate_shared, + .mpi_rput = MPIDI_NM_mpi_rput, + .mpi_win_flush_local = MPIDI_NM_mpi_win_flush_local, +- .mpi_win_detach = MPIDI_NM_mpi_win_detach, ++ .mpi_win_detach = MPIDI_UCX_mpi_win_detach, + .mpi_compare_and_swap = MPIDI_NM_mpi_compare_and_swap, + .mpi_raccumulate = MPIDI_NM_mpi_raccumulate, + .mpi_rget_accumulate = MPIDI_NM_mpi_rget_accumulate, + .mpi_fetch_and_op = MPIDI_NM_mpi_fetch_and_op, +- .mpi_win_allocate = MPIDI_NM_mpi_win_allocate, ++ .mpi_win_allocate = MPIDI_UCX_mpi_win_allocate, + .mpi_win_flush = MPIDI_NM_mpi_win_flush, + .mpi_win_flush_local_all = MPIDI_NM_mpi_win_flush_local_all, + .mpi_win_unlock_all = MPIDI_NM_mpi_win_unlock_all, +- .mpi_win_create_dynamic = MPIDI_NM_mpi_win_create_dynamic, ++ .mpi_win_create_dynamic = MPIDI_UCX_mpi_win_create_dynamic, + .mpi_rget = MPIDI_NM_mpi_rget, + .mpi_win_sync = MPIDI_NM_mpi_win_sync, + .mpi_win_flush_all = MPIDI_NM_mpi_win_flush_all, +@@ -182,10 +184,10 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_ucx_funcs = { + .mpi_ineighbor_alltoallv_sched = MPIDI_NM_mpi_ineighbor_alltoallv_sched, + .mpi_ineighbor_alltoallw_sched = MPIDI_NM_mpi_ineighbor_alltoallw_sched, + /* Datatype hooks */ +- .mpi_type_commit_hook = MPIDI_NM_mpi_type_commit_hook, +- .mpi_type_free_hook = MPIDI_NM_mpi_type_free_hook, ++ .mpi_type_commit_hook = MPIDI_UCX_mpi_type_commit_hook, ++ .mpi_type_free_hook = MPIDI_UCX_mpi_type_free_hook, + /* Op hooks */ +- .mpi_op_commit_hook = MPIDI_NM_mpi_op_commit_hook, +- .mpi_op_free_hook = MPIDI_NM_mpi_op_free_hook, ++ .mpi_op_commit_hook = MPIDI_UCX_mpi_op_commit_hook, ++ .mpi_op_free_hook = MPIDI_UCX_mpi_op_free_hook, + }; + #endif +--- a/src/mpid/ch4/netmod/ucx/globals.c ++++ b/src/mpid/ch4/netmod/ucx/globals.c +@@ -10,4 +10,4 @@ + #include "ucx_impl.h" + #include "ucx_types.h" + +-MPIDI_UCX_global_t MPIDI_UCX_global = { 0 }; ++MPIDI_UCX_global_t MPIDI_UCX_global; +--- a/src/mpid/ch4/netmod/ucx/netmod_inline.h ++++ b/src/mpid/ch4/netmod/ucx/netmod_inline.h +@@ -11,7 +11,6 @@ + + #include "ucx_progress.h" + #include "ucx_request.h" +-#include "ucx_init.h" + #ifdef MPICH_UCX_AM_ONLY + #include "ucx_am_send.h" + #include "ucx_am_startall.h" +@@ -26,10 +25,10 @@ + #include "ucx_win.h" + #include "ucx_rma.h" + #include "ucx_am.h" +-#include "ucx_spawn.h" +-#include "ucx_comm.h" +-#include "ucx_datatype.h" +-#include "ucx_op.h" + #include "ucx_proc.h" + #include "ucx_coll.h" ++ ++/* Not-inlined UCX netmod functions */ ++#include "ucx_noinline.h" ++ + #endif /* NETMOD_INLINE_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/subconfigure.m4 ++++ b/src/mpid/ch4/netmod/ucx/subconfigure.m4 +@@ -18,7 +18,7 @@ AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ + + AC_ARG_WITH(ch4-netmod-ucx-args, + [ --with-ch4-netmod-ucx-args=arg1:arg2:arg3 +- CH4 OFI netmod arguments: ++ CH4 UCX netmod arguments: + am-only - Do not use UCX tagged or RMA communication. + ], + [ucx_netmod_args=$withval], +@@ -29,7 +29,7 @@ dnl Parse the device arguments + IFS=':' + args_array=$ucx_netmod_args + do_am_only=false +- echo "Parsing Arguments for OFI Netmod" ++ echo "Parsing Arguments for UCX Netmod" + for arg in $args_array; do + case ${arg} in + am-only) +@@ -63,11 +63,9 @@ AM_COND_IF([BUILD_CH4_NETMOD_UCX],[ + ucx_embedded="yes" + else + ucx_embedded="no" +- PAC_SET_HEADER_LIB_PATH(ucx) + fi + else + ucx_embedded="no" +- PAC_SET_HEADER_LIB_PATH(ucx) + fi + + if test "${ucx_embedded}" = "yes" ; then +@@ -79,14 +77,28 @@ AM_COND_IF([BUILD_CH4_NETMOD_UCX],[ + + ucxdir="src/mpid/ch4/netmod/ucx/ucx" + ucxlib="src/mpid/ch4/netmod/ucx/ucx/src/ucp/libucp.la" ++ ++ # embedded ucx is 1.4 or higher version, thus always set as defined. ++ have_ucp_put_nb=yes ++ have_ucp_get_nb=yes + else + PAC_PUSH_FLAG(LIBS) + PAC_CHECK_HEADER_LIB_FATAL(ucx, ucp/api/ucp.h, ucp, ucp_config_read) + PAC_POP_FLAG(LIBS) + PAC_APPEND_FLAG([-lucp -lucs],[WRAPPER_LIBS]) ++ ++ # ucp_put_nb and ucp_get_nb are added only from ucx 1.4. ++ PAC_CHECK_HEADER_LIB([ucp/api/ucp.h],[ucp],[ucp_put_nb], [have_ucp_put_nb=yes], [have_ucp_put_nb=no]) ++ PAC_CHECK_HEADER_LIB([ucp/api/ucp.h],[ucp],[ucp_get_nb], [have_ucp_get_nb=yes], [have_ucp_get_nb=no]) + fi + +-])dnl end AM_COND_IF(BUILD_CH4_NETMOD_OFI,...) ++ if test "${have_ucp_put_nb}" = "yes" ; then ++ AC_DEFINE(HAVE_UCP_PUT_NB,1,[Define if ucp_put_nb is defined in ucx]) ++ fi ++ if test "${have_ucp_get_nb}" = "yes" ; then ++ AC_DEFINE(HAVE_UCP_GET_NB,1,[Define if ucp_get_nb is defined in ucx]) ++ fi ++])dnl end AM_COND_IF(BUILD_CH4_NETMOD_UCX,...) + ])dnl end _BODY + + [#] end of __file__ +--- a/src/mpid/ch4/netmod/ucx/ucx_am.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_am.h +@@ -11,7 +11,7 @@ + + #include "ucx_impl.h" + +-static inline void MPIDI_UCX_am_isend_callback(void *request, ucs_status_t status) ++MPL_STATIC_INLINE_PREFIX void MPIDI_UCX_am_isend_callback(void *request, ucs_status_t status) + { + MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; + MPIR_Request *req = ucp_request->req; +@@ -32,7 +32,7 @@ static inline void MPIDI_UCX_am_isend_callback(void *request, ucs_status_t statu + goto fn_exit; + } + +-static inline void MPIDI_UCX_am_send_callback(void *request, ucs_status_t status) ++MPL_STATIC_INLINE_PREFIX void MPIDI_UCX_am_send_callback(void *request, ucs_status_t status) + { + MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; + +@@ -50,18 +50,15 @@ static inline void MPIDI_UCX_am_send_callback(void *request, ucs_status_t status + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_am_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +- +-static inline int MPIDI_NM_am_isend(int rank, +- MPIR_Comm * comm, +- int handler_id, +- const void *am_hdr, +- size_t am_hdr_sz, +- const void *data, +- MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq) ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isend(int rank, ++ MPIR_Comm * comm, ++ int handler_id, ++ const void *am_hdr, ++ size_t am_hdr_sz, ++ const void *data, ++ MPI_Count count, MPI_Datatype datatype, ++ MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_UCX_ucp_request_t *ucp_request; +@@ -69,7 +66,7 @@ static inline int MPIDI_NM_am_isend(int rank, + uint64_t ucx_tag; + char *send_buf; + size_t data_sz; +- MPI_Aint dt_true_lb, last; ++ MPI_Aint dt_true_lb; + MPIR_Datatype *dt_ptr; + int dt_contig; + MPIDI_UCX_am_header_t ucx_hdr; +@@ -78,22 +75,22 @@ static inline int MPIDI_NM_am_isend(int rank, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_AM_ISEND); + + MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- if (handler_id == MPIDI_CH4U_SEND && ++ if (handler_id == MPIDIG_SEND && + am_hdr_sz + sizeof(MPIDI_UCX_am_header_t) + data_sz > MPIDI_UCX_MAX_AM_EAGER_SZ) { +- MPIDI_CH4U_send_long_req_msg_t lreq_hdr; ++ MPIDIG_send_long_req_mst_t lreq_hdr; + + MPIR_Memcpy(&lreq_hdr.hdr, am_hdr, am_hdr_sz); + lreq_hdr.data_sz = data_sz; + lreq_hdr.sreq_ptr = (uint64_t) sreq; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).src_buf = data; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).count = count; ++ MPIDIG_REQUEST(sreq, req->lreq).src_buf = data; ++ MPIDIG_REQUEST(sreq, req->lreq).count = count; + MPIR_Datatype_add_ref_if_not_builtin(datatype); +- MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype = datatype; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).tag = lreq_hdr.hdr.tag; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).rank = lreq_hdr.hdr.src_rank; +- MPIDI_CH4U_REQUEST(sreq, req->lreq).context_id = lreq_hdr.hdr.context_id; +- MPIDI_CH4U_REQUEST(sreq, rank) = rank; +- mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ, ++ MPIDIG_REQUEST(sreq, req->lreq).datatype = datatype; ++ MPIDIG_REQUEST(sreq, req->lreq).tag = lreq_hdr.hdr.tag; ++ MPIDIG_REQUEST(sreq, req->lreq).rank = lreq_hdr.hdr.src_rank; ++ MPIDIG_REQUEST(sreq, req->lreq).context_id = lreq_hdr.hdr.context_id; ++ MPIDIG_REQUEST(sreq, rank) = rank; ++ mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, MPIDIG_SEND_LONG_REQ, + &lreq_hdr, sizeof(lreq_hdr)); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); +@@ -114,21 +111,18 @@ static inline int MPIDI_NM_am_isend(int rank, + MPIR_Memcpy(send_buf + sizeof(ucx_hdr), am_hdr, am_hdr_sz); + MPIR_Memcpy(send_buf + am_hdr_sz + sizeof(ucx_hdr), (char *) data + dt_true_lb, data_sz); + } else { +- size_t segment_first; +- struct MPIR_Segment *segment_ptr; +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "Send MPIR_Segment_alloc"); +- MPIR_Segment_init(data, count, datatype, segment_ptr); +- segment_first = 0; +- last = data_sz; + send_buf = MPL_malloc(data_sz + am_hdr_sz + sizeof(ucx_hdr), MPL_MEM_BUFFER); + + MPIR_Memcpy(send_buf, &ucx_hdr, sizeof(ucx_hdr)); + MPIR_Memcpy(send_buf + sizeof(ucx_hdr), am_hdr, am_hdr_sz); +- MPIR_Segment_pack(segment_ptr, segment_first, &last, +- send_buf + am_hdr_sz + sizeof(ucx_hdr)); +- MPIR_Segment_free(segment_ptr); ++ ++ MPI_Aint actual_pack_bytes; ++ mpi_errno = ++ MPIR_Typerep_pack(data, count, datatype, 0, send_buf + am_hdr_sz + sizeof(ucx_hdr), ++ data_sz, &actual_pack_bytes); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Assert(actual_pack_bytes == data_sz); + } + + ucp_request = (MPIDI_UCX_ucp_request_t *) ucp_tag_send_nb(ep, send_buf, +@@ -158,17 +152,14 @@ static inline int MPIDI_NM_am_isend(int rank, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_am_isendv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_am_isendv(int rank, +- MPIR_Comm * comm, +- int handler_id, +- struct iovec *am_hdr, +- size_t iov_len, +- const void *data, +- MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isendv(int rank, ++ MPIR_Comm * comm, ++ int handler_id, ++ struct iovec *am_hdr, ++ size_t iov_len, ++ const void *data, ++ MPI_Count count, MPI_Datatype datatype, ++ MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; + size_t am_hdr_sz = 0, i; +@@ -177,7 +168,7 @@ static inline int MPIDI_NM_am_isendv(int rank, + uint64_t ucx_tag; + char *send_buf; + size_t data_sz; +- MPI_Aint dt_true_lb, last; ++ MPI_Aint dt_true_lb; + MPIR_Datatype *dt_ptr; + int dt_contig; + MPIDI_UCX_am_header_t ucx_hdr; +@@ -208,17 +199,13 @@ static inline int MPIDI_NM_am_isendv(int rank, + if (dt_contig) { + MPIR_Memcpy(send_buf + am_hdr_sz + sizeof(ucx_hdr), (char *) data + dt_true_lb, data_sz); + } else { +- size_t segment_first; +- struct MPIR_Segment *segment_ptr; +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(data, count, datatype, segment_ptr); +- segment_first = 0; +- last = data_sz; +- MPIR_Segment_pack(segment_ptr, segment_first, &last, +- send_buf + sizeof(ucx_hdr) + am_hdr_sz); +- MPIR_Segment_free(segment_ptr); ++ MPI_Aint actual_pack_bytes; ++ mpi_errno = ++ MPIR_Typerep_pack(data, count, datatype, 0, send_buf + sizeof(ucx_hdr) + am_hdr_sz, ++ data_sz, &actual_pack_bytes); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Assert(actual_pack_bytes == data_sz); + } + ucp_request = (MPIDI_UCX_ucp_request_t *) ucp_tag_send_nb(ep, send_buf, + data_sz + am_hdr_sz + sizeof(ucx_hdr), +@@ -249,17 +236,13 @@ static inline int MPIDI_NM_am_isendv(int rank, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_am_isend_reply +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, +- int src_rank, +- int handler_id, +- const void *am_hdr, +- size_t am_hdr_sz, +- const void *data, MPI_Count count, +- MPI_Datatype datatype, MPIR_Request * sreq) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, ++ int src_rank, ++ int handler_id, ++ const void *am_hdr, ++ size_t am_hdr_sz, ++ const void *data, MPI_Count count, ++ MPI_Datatype datatype, MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_UCX_ucp_request_t *ucp_request; +@@ -276,7 +259,7 @@ static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_AM_ISEND_REPLY); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_AM_ISEND_REPLY); + +- use_comm = MPIDI_CH4U_context_id_to_comm(context_id); ++ use_comm = MPIDIG_context_id_to_comm(context_id); + ep = MPIDI_UCX_COMM_TO_EP(use_comm, src_rank); + ucx_tag = MPIDI_UCX_init_tag(0, MPIR_Process.comm_world->rank, MPIDI_UCX_AM_TAG); + +@@ -293,18 +276,13 @@ static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, + if (dt_contig) { + MPIR_Memcpy(send_buf + am_hdr_sz + sizeof(ucx_hdr), (char *) data + dt_true_lb, data_sz); + } else { +- size_t segment_first; +- struct MPIR_Segment *segment_ptr; +- MPI_Aint last; +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init(data, count, datatype, segment_ptr); +- segment_first = 0; +- last = data_sz; +- MPIR_Segment_pack(segment_ptr, segment_first, &last, +- send_buf + am_hdr_sz + sizeof(ucx_hdr)); +- MPIR_Segment_free(segment_ptr); ++ MPI_Aint actual_pack_bytes; ++ mpi_errno = ++ MPIR_Typerep_pack(data, count, datatype, 0, send_buf + am_hdr_sz + sizeof(ucx_hdr), ++ data_sz, &actual_pack_bytes); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Assert(actual_pack_bytes == data_sz); + } + ucp_request = (MPIDI_UCX_ucp_request_t *) ucp_tag_send_nb(ep, send_buf, + data_sz + am_hdr_sz + +@@ -333,7 +311,7 @@ static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, + goto fn_exit; + } + +-static inline size_t MPIDI_NM_am_hdr_max_sz(void) ++MPL_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void) + { + int ret; + +@@ -346,9 +324,10 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void) + return ret; + } + +-static inline int MPIDI_NM_am_send_hdr(int rank, +- MPIR_Comm * comm, +- int handler_id, const void *am_hdr, size_t am_hdr_sz) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, ++ MPIR_Comm * comm, ++ int handler_id, const void *am_hdr, ++ size_t am_hdr_sz) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_UCX_ucp_request_t *ucp_request; +@@ -392,9 +371,10 @@ static inline int MPIDI_NM_am_send_hdr(int rank, + goto fn_exit; + } + +-static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, +- int src_rank, +- int handler_id, const void *am_hdr, size_t am_hdr_sz) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, ++ int src_rank, ++ int handler_id, const void *am_hdr, ++ size_t am_hdr_sz) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_UCX_ucp_request_t *ucp_request; +@@ -407,7 +387,7 @@ static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_AM_SEND_HDR_REPLY); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_AM_SEND_HDR_REPLY); + +- use_comm = MPIDI_CH4U_context_id_to_comm(context_id); ++ use_comm = MPIDIG_context_id_to_comm(context_id); + ep = MPIDI_UCX_COMM_TO_EP(use_comm, src_rank); + ucx_tag = MPIDI_UCX_init_tag(0, MPIR_Process.comm_world->rank, MPIDI_UCX_AM_TAG); + +@@ -438,21 +418,20 @@ static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, + goto fn_exit; + } + +-static inline int MPIDI_NM_am_recv(MPIR_Request * req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request * req) + { + int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_send_long_ack_msg_t msg; ++ MPIDIG_send_long_ack_msg_t msg; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_AM_RECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_AM_RECV); + +- msg.sreq_ptr = (MPIDI_CH4U_REQUEST(req, req->rreq.peer_req_ptr)); ++ msg.sreq_ptr = (MPIDIG_REQUEST(req, req->rreq.peer_req_ptr)); + msg.rreq_ptr = (uint64_t) req; + MPIR_Assert((void *) msg.sreq_ptr != NULL); +- mpi_errno = +- MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_REQUEST(req, context_id), +- MPIDI_CH4U_REQUEST(req, rank), MPIDI_CH4U_SEND_LONG_ACK, &msg, +- sizeof(msg)); ++ mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDIG_REQUEST(req, context_id), ++ MPIDIG_REQUEST(req, rank), MPIDIG_SEND_LONG_ACK, &msg, ++ sizeof(msg)); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +--- a/src/mpid/ch4/netmod/ucx/ucx_am_probe.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_am_probe.h +@@ -13,34 +13,35 @@ + + #include "ucx_impl.h" + +-static inline int MPIDI_NM_mpi_improbe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, MPIDI_av_entry_t * addr, +- int *flag, MPIR_Request ** message, MPI_Status * status) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_improbe(int source, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, MPIDI_av_entry_t * addr, ++ int *flag, MPIR_Request ** message, ++ MPI_Status * status) + { + int mpi_errno; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IMPROBE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IMPROBE); + +- mpi_errno = MPIDI_CH4U_mpi_improbe(source, tag, comm, context_offset, flag, message, status); ++ mpi_errno = MPIDIG_mpi_improbe(source, tag, comm, context_offset, flag, message, status); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IMPROBE); + return mpi_errno; + } + +-static inline int MPIDI_NM_mpi_iprobe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, MPIDI_av_entry_t * addr, int *flag, +- MPI_Status * status) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iprobe(int source, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, MPIDI_av_entry_t * addr, ++ int *flag, MPI_Status * status) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IPROBE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_IPROBE); + +- mpi_errno = MPIDI_CH4U_mpi_iprobe(source, tag, comm, context_offset, flag, status); ++ mpi_errno = MPIDIG_mpi_iprobe(source, tag, comm, context_offset, flag, status); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_IPROBE); + return mpi_errno; +--- a/src/mpid/ch4/netmod/ucx/ucx_am_recv.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_am_recv.h +@@ -13,14 +13,14 @@ + + #include "ucx_impl.h" + +-static inline int MPIDI_NM_mpi_recv(void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, +- int context_offset, MPIDI_av_entry_t * addr, +- MPI_Status * status, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_recv(void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, MPIDI_av_entry_t * addr, ++ MPI_Status * status, MPIR_Request ** request) + { + int ret; + +@@ -33,13 +33,14 @@ static inline int MPIDI_NM_mpi_recv(void *buf, + return ret; + } + +-static inline int MPIDI_NM_mpi_recv_init(void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_recv_init(void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { + int ret; + +@@ -52,8 +53,9 @@ static inline int MPIDI_NM_mpi_recv_init(void *buf, + return ret; + } + +-static inline int MPIDI_NM_mpi_imrecv(void *buf, +- MPI_Aint count, MPI_Datatype datatype, MPIR_Request * message) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_imrecv(void *buf, ++ MPI_Aint count, MPI_Datatype datatype, ++ MPIR_Request * message) + { + int ret; + +@@ -66,13 +68,13 @@ static inline int MPIDI_NM_mpi_imrecv(void *buf, + return ret; + } + +-static inline int MPIDI_NM_mpi_irecv(void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, MPIDI_av_entry_t * addr, +- MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_irecv(void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + int ret; + +@@ -85,7 +87,7 @@ static inline int MPIDI_NM_mpi_irecv(void *buf, + return ret; + } + +-static inline int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) + { + int ret; + +--- a/src/mpid/ch4/netmod/ucx/ucx_am_send.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_am_send.h +@@ -13,95 +13,103 @@ + + #include "ucx_impl.h" + +-static inline int MPIDI_NM_mpi_send(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, MPIDI_av_entry_t * addr, +- MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + return MPIDIG_mpi_send(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + } + +-static inline int MPIDI_NM_mpi_ssend(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, MPIDI_av_entry_t * addr, +- MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ssend(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + return MPIDIG_mpi_ssend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + } + +-static inline int MPIDI_NM_mpi_send_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send_init(const void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + +-static inline int MPIDI_NM_mpi_ssend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ssend_init(const void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + +-static inline int MPIDI_NM_mpi_bsend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bsend_init(const void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + +-static inline int MPIDI_NM_mpi_rsend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rsend_init(const void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + +-static inline int MPIDI_NM_mpi_isend(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, MPIDI_av_entry_t * addr, +- MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_isend(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + return MPIDIG_mpi_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + } + +-static inline int MPIDI_NM_mpi_issend(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, MPIDI_av_entry_t * addr, +- MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_issend(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + return MPIDIG_mpi_issend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + } + +-static inline int MPIDI_NM_mpi_cancel_send(MPIR_Request * sreq) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_send(MPIR_Request * sreq) + { + return MPIDIG_mpi_cancel_send(sreq); + } +--- a/src/mpid/ch4/netmod/ucx/ucx_am_startall.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_am_startall.h +@@ -13,9 +13,14 @@ + + #include "ucx_impl.h" + +-static inline int MPIDI_NM_mpi_startall(int count, MPIR_Request * requests[]) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_startall(int count, MPIR_Request * requests[]) + { + return MPIDIG_mpi_startall(count, requests); + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_NM_prequest_free_hook(MPIR_Request * req) ++{ ++ MPIDIG_prequest_free_hook(req); ++} ++ + #endif /* UCX_AM_STARTALL_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/ucx_coll.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_coll.h +@@ -14,12 +14,9 @@ + #include "../../../common/hcoll/hcoll.h" + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_BARRIER); +@@ -37,13 +34,11 @@ static inline int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * er + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_bcast(void *buffer, int count, MPI_Datatype datatype, +- int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bcast(void *buffer, int count, MPI_Datatype datatype, ++ int root, MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_BCAST); +@@ -61,14 +56,11 @@ static inline int MPIDI_NM_mpi_bcast(void *buffer, int count, MPI_Datatype datat + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLREDUCE); +@@ -86,14 +78,12 @@ static inline int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgather(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLGATHER); +@@ -113,15 +103,13 @@ static inline int MPIDI_NM_mpi_allgather(const void *sendbuf, int sendcount, MPI + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgatherv(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, const int *displs, ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLGATHERV); +@@ -134,15 +122,12 @@ static inline int MPIDI_NM_mpi_allgatherv(const void *sendbuf, int sendcount, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gather(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_GATHER); +@@ -155,15 +140,13 @@ static inline int MPIDI_NM_mpi_gather(const void *sendbuf, int sendcount, MPI_Da + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gatherv(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, const int *displs, ++ MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_GATHERV); +@@ -176,15 +159,12 @@ static inline int MPIDI_NM_mpi_gatherv(const void *sendbuf, int sendcount, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatter(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_SCATTER); +@@ -197,16 +177,13 @@ static inline int MPIDI_NM_mpi_scatter(const void *sendbuf, int sendcount, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_scatterv(const void *sendbuf, const int *sendcounts, +- const int *displs, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatterv(const void *sendbuf, const int *sendcounts, ++ const int *displs, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_SCATTERV); +@@ -219,14 +196,12 @@ static inline int MPIDI_NM_mpi_scatterv(const void *sendbuf, const int *sendcoun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoall(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLTOALL); +@@ -246,16 +221,13 @@ static inline int MPIDI_NM_mpi_alltoall(const void *sendbuf, int sendcount, MPI_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const int *sendcounts, +- const int *sdispls, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, +- const int *rdispls, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const int *sendcounts, ++ const int *sdispls, MPI_Datatype sendtype, ++ void *recvbuf, const int *recvcounts, ++ const int *rdispls, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLTOALLV); +@@ -275,16 +247,14 @@ static inline int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const int *sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const int sendcounts[], +- const int sdispls[], const MPI_Datatype sendtypes[], +- void *recvbuf, const int recvcounts[], +- const int rdispls[], const MPI_Datatype recvtypes[], +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const int sendcounts[], ++ const int sdispls[], ++ const MPI_Datatype sendtypes[], void *recvbuf, ++ const int recvcounts[], const int rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ALLTOALLW); +@@ -297,14 +267,11 @@ static inline int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const int sendcoun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, +- MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, int root, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_REDUCE); +@@ -322,16 +289,13 @@ static inline int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, int co + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, +- const int recvcounts[], MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container +- ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, ++ const int recvcounts[], ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_REDUCE_SCATTER); +@@ -344,16 +308,12 @@ static inline int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, +- int recvcount, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container +- ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, ++ int recvcount, MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_REDUCE_SCATTER_BLOCK); +@@ -366,14 +326,11 @@ static inline int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *r + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_SCAN); +@@ -385,14 +342,11 @@ static inline int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, int coun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Errflag_t * errflag, +- const void *algo_parameters_container ATTRIBUTE((unused))) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, ++ const void *algo_parameters_container ++ ATTRIBUTE((unused))) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_EXSCAN); +@@ -404,14 +358,10 @@ static inline int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, int co + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_allgather(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_neighbor_allgather(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLGATHER); +@@ -424,14 +374,12 @@ static inline int MPIDI_NM_mpi_neighbor_allgather(const void *sendbuf, int sendc + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_allgatherv(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int recvcounts[], const int displs[], +- MPI_Datatype recvtype, MPIR_Comm * comm_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_neighbor_allgatherv(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], ++ const int displs[], ++ MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLGATHERV); +@@ -444,14 +392,10 @@ static inline int MPIDI_NM_mpi_neighbor_allgatherv(const void *sendbuf, int send + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_alltoall(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_neighbor_alltoall(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALL); +@@ -464,15 +408,14 @@ static inline int MPIDI_NM_mpi_neighbor_alltoall(const void *sendbuf, int sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_alltoallv(const void *sendbuf, const int sendcounts[], +- const int sdispls[], MPI_Datatype sendtype, +- void *recvbuf, const int recvcounts[], +- const int rdispls[], MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_neighbor_alltoallv(const void *sendbuf, ++ const int sendcounts[], ++ const int sdispls[], ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], ++ const int rdispls[], ++ MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALLV); +@@ -486,16 +429,14 @@ static inline int MPIDI_NM_mpi_neighbor_alltoallv(const void *sendbuf, const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_neighbor_alltoallw(const void *sendbuf, const int sendcounts[], +- const MPI_Aint sdispls[], +- const MPI_Datatype sendtypes[], void *recvbuf, +- const int recvcounts[], const MPI_Aint rdispls[], +- const MPI_Datatype recvtypes[], +- MPIR_Comm * comm_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_neighbor_alltoallw(const void *sendbuf, ++ const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], ++ void *recvbuf, const int recvcounts[], ++ const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_NEIGHBOR_ALLTOALLW); +@@ -509,14 +450,11 @@ static inline int MPIDI_NM_mpi_neighbor_alltoallw(const void *sendbuf, const int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_allgather(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_allgather(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHER); +@@ -529,15 +467,13 @@ static inline int MPIDI_NM_mpi_ineighbor_allgather(const void *sendbuf, int send + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_allgatherv(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int recvcounts[], const int displs[], +- MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_allgatherv(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], ++ const int displs[], ++ MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLGATHERV); +@@ -551,14 +487,11 @@ static inline int MPIDI_NM_mpi_ineighbor_allgatherv(const void *sendbuf, int sen + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoall(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoall(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALL); +@@ -571,15 +504,15 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoall(const void *sendbuf, int sendc + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], +- const int sdispls[], MPI_Datatype sendtype, +- void *recvbuf, const int recvcounts[], +- const int rdispls[], MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoallv(const void *sendbuf, ++ const int sendcounts[], ++ const int sdispls[], ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], ++ const int rdispls[], ++ MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLV); +@@ -593,16 +526,15 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallv(const void *sendbuf, const in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], +- const MPI_Aint sdispls[], +- const MPI_Datatype sendtypes[], void *recvbuf, +- const int recvcounts[], const MPI_Aint rdispls[], +- const MPI_Datatype recvtypes[], +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbuf, ++ const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], ++ void *recvbuf, const int recvcounts[], ++ const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_INEIGHBOR_ALLTOALLW); +@@ -616,11 +548,7 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbuf, const in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IBARRIER); +@@ -632,12 +560,9 @@ static inline int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** re + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ibcast(void *buffer, int count, MPI_Datatype datatype, +- int root, MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibcast(void *buffer, int count, MPI_Datatype datatype, ++ int root, MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IBCAST); +@@ -649,13 +574,10 @@ static inline int MPIDI_NM_mpi_ibcast(void *buffer, int count, MPI_Datatype data + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgather(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLGATHER); +@@ -668,15 +590,11 @@ static inline int MPIDI_NM_mpi_iallgather(const void *sendbuf, int sendcount, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, const int *displs, ++ MPI_Datatype recvtype, MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLGATHERV); +@@ -689,13 +607,9 @@ static inline int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, +- MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_Request ** request) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLREDUCE); +@@ -707,13 +621,10 @@ static inline int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoall(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALL); +@@ -726,15 +637,11 @@ static inline int MPIDI_NM_mpi_ialltoall(const void *sendbuf, int sendcount, MPI + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const int *sendcounts, +- const int *sdispls, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, +- const int *rdispls, MPI_Datatype recvtype, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const int *sendcounts, ++ const int *sdispls, MPI_Datatype sendtype, ++ void *recvbuf, const int *recvcounts, ++ const int *rdispls, MPI_Datatype recvtype, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALLV); +@@ -747,15 +654,12 @@ static inline int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const int *sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const int *sendcounts, +- const int *sdispls, const MPI_Datatype sendtypes[], +- void *recvbuf, const int *recvcounts, +- const int *rdispls, const MPI_Datatype recvtypes[], +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const int *sendcounts, ++ const int *sdispls, ++ const MPI_Datatype sendtypes[], void *recvbuf, ++ const int *recvcounts, const int *rdispls, ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IALLTOALLW); +@@ -768,13 +672,9 @@ static inline int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const int *sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IEXSCAN); +@@ -786,13 +686,10 @@ static inline int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, int c + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_igather(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IGATHER); +@@ -805,14 +702,11 @@ static inline int MPIDI_NM_mpi_igather(const void *sendbuf, int sendcount, MPI_D + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, +- void *recvbuf, const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_igatherv(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, const int *displs, ++ MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IGATHERV); +@@ -825,14 +719,11 @@ static inline int MPIDI_NM_mpi_igatherv(const void *sendbuf, int sendcount, MPI_ + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_scatter_block(const void *sendbuf, void *recvbuf, +- int recvcount, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter_block(const void *sendbuf, void *recvbuf, ++ int recvcount, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, ++ MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER_BLOCK); +@@ -845,13 +736,10 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_block(const void *sendbuf, void * + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, +- const int recvcounts[], MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, ++ const int recvcounts[], ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE_SCATTER); +@@ -864,13 +752,9 @@ static inline int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbu + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, +- MPIR_Comm * comm_ptr, MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, int root, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_IREDUCE); +@@ -882,13 +766,9 @@ static inline int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, int c + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, +- MPIR_Request ** req) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm_ptr, MPIR_Request ** req) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCAN); +@@ -900,14 +780,11 @@ static inline int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, int cou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscatter(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscatter(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ int root, MPIR_Comm * comm, ++ MPIR_Request ** request) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCATTER); +@@ -920,15 +797,11 @@ static inline int MPIDI_NM_mpi_iscatter(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const int *sendcounts, +- const int *displs, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, +- MPI_Datatype recvtype, int root, +- MPIR_Comm * comm, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const int *sendcounts, ++ const int *displs, MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm, MPIR_Request ** request) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_ISCATTERV); +@@ -941,11 +814,7 @@ static inline int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const int *sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibarrier_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno; + +@@ -958,12 +827,9 @@ static inline int MPIDI_NM_mpi_ibarrier_sched(MPIR_Comm * comm, MPIR_Sched_t s) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ibcast_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ibcast_sched(void *buffer, int count, MPI_Datatype datatype, +- int root, MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibcast_sched(void *buffer, int count, ++ MPI_Datatype datatype, int root, ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno; + +@@ -976,14 +842,10 @@ static inline int MPIDI_NM_mpi_ibcast_sched(void *buffer, int count, MPI_Datatyp + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallgather_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgather_sched(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -997,15 +859,12 @@ static inline int MPIDI_NM_mpi_iallgather_sched(const void *sendbuf, int sendcou + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallgatherv_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgatherv_sched(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, ++ const int *displs, ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1019,13 +878,10 @@ static inline int MPIDI_NM_mpi_iallgatherv_sched(const void *sendbuf, int sendco + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iallreduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iallreduce_sched(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallreduce_sched(const void *sendbuf, void *recvbuf, ++ int count, MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1038,14 +894,10 @@ static inline int MPIDI_NM_mpi_iallreduce_sched(const void *sendbuf, void *recvb + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoall_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoall_sched(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1059,15 +911,14 @@ static inline int MPIDI_NM_mpi_ialltoall_sched(const void *sendbuf, int sendcoun + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoallv_sched(const void *sendbuf, const int sendcounts[], +- const int sdispls[], MPI_Datatype sendtype, +- void *recvbuf, const int recvcounts[], +- const int rdispls[], MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallv_sched(const void *sendbuf, ++ const int sendcounts[], ++ const int sdispls[], ++ MPI_Datatype sendtype, void *recvbuf, ++ const int recvcounts[], ++ const int rdispls[], ++ MPI_Datatype recvtype, MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1081,15 +932,14 @@ static inline int MPIDI_NM_mpi_ialltoallv_sched(const void *sendbuf, const int s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ialltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ialltoallw_sched(const void *sendbuf, const int sendcounts[], +- const int sdispls[], const MPI_Datatype sendtypes[], +- void *recvbuf, const int recvcounts[], +- const int rdispls[], const MPI_Datatype recvtypes[], +- MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallw_sched(const void *sendbuf, ++ const int sendcounts[], ++ const int sdispls[], ++ const MPI_Datatype sendtypes[], ++ void *recvbuf, const int recvcounts[], ++ const int rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1103,13 +953,9 @@ static inline int MPIDI_NM_mpi_ialltoallw_sched(const void *sendbuf, const int s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iexscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iexscan_sched(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iexscan_sched(const void *sendbuf, void *recvbuf, ++ int count, MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1122,14 +968,10 @@ static inline int MPIDI_NM_mpi_iexscan_sched(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_igather_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_igather_sched(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ int root, MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1143,15 +985,11 @@ static inline int MPIDI_NM_mpi_igather_sched(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_igatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_igatherv_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int *recvcounts, const int *displs, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_igatherv_sched(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ const int *recvcounts, const int *displs, ++ MPI_Datatype recvtype, int root, ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1165,14 +1003,11 @@ static inline int MPIDI_NM_mpi_igatherv_sched(const void *sendbuf, int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_block_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_scatter_block_sched(const void *sendbuf, void *recvbuf, +- int recvcount, MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter_block_sched(const void *sendbuf, ++ void *recvbuf, int recvcount, ++ MPI_Datatype datatype, ++ MPI_Op op, MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1186,13 +1021,10 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_block_sched(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_scatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_scatter_sched(const void *sendbuf, void *recvbuf, +- const int recvcounts[], MPI_Datatype datatype, +- MPI_Op op, MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter_sched(const void *sendbuf, void *recvbuf, ++ const int recvcounts[], ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1206,13 +1038,9 @@ static inline int MPIDI_NM_mpi_ireduce_scatter_sched(const void *sendbuf, void * + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ireduce_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ireduce_sched(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, int root, +- MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_sched(const void *sendbuf, void *recvbuf, ++ int count, MPI_Datatype datatype, MPI_Op op, ++ int root, MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1225,13 +1053,9 @@ static inline int MPIDI_NM_mpi_ireduce_sched(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscan_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscan_sched(const void *sendbuf, void *recvbuf, int count, +- MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscan_sched(const void *sendbuf, void *recvbuf, int count, ++ MPI_Datatype datatype, MPI_Op op, ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1244,14 +1068,10 @@ static inline int MPIDI_NM_mpi_iscan_sched(const void *sendbuf, void *recvbuf, i + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatter_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscatter_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, int recvcount, +- MPI_Datatype recvtype, int root, MPIR_Comm * comm, +- MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscatter_sched(const void *sendbuf, int sendcount, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ int root, MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1265,14 +1085,12 @@ static inline int MPIDI_NM_mpi_iscatter_sched(const void *sendbuf, int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_iscatterv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_iscatterv_sched(const void *sendbuf, const int *sendcounts, +- const int *displs, MPI_Datatype sendtype, +- void *recvbuf, int recvcount, MPI_Datatype recvtype, +- int root, MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscatterv_sched(const void *sendbuf, ++ const int *sendcounts, const int *displs, ++ MPI_Datatype sendtype, void *recvbuf, ++ int recvcount, MPI_Datatype recvtype, ++ int root, MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1286,14 +1104,13 @@ static inline int MPIDI_NM_mpi_iscatterv_sched(const void *sendbuf, const int *s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgather_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_allgather_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_allgather_sched(const void *sendbuf, ++ int sendcount, ++ MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, ++ MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1307,15 +1124,15 @@ static inline int MPIDI_NM_mpi_ineighbor_allgather_sched(const void *sendbuf, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_allgatherv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_allgatherv_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- const int recvcounts[], +- const int displs[], MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_allgatherv_sched(const void *sendbuf, ++ int sendcount, ++ MPI_Datatype sendtype, ++ void *recvbuf, ++ const int recvcounts[], ++ const int displs[], ++ MPI_Datatype recvtype, ++ MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1329,14 +1146,12 @@ static inline int MPIDI_NM_mpi_ineighbor_allgatherv_sched(const void *sendbuf, i + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoall_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoall_sched(const void *sendbuf, int sendcount, +- MPI_Datatype sendtype, void *recvbuf, +- int recvcount, MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoall_sched(const void *sendbuf, ++ int sendcount, ++ MPI_Datatype sendtype, ++ void *recvbuf, int recvcount, ++ MPI_Datatype recvtype, ++ MPIR_Comm * comm, MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1350,16 +1165,16 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoall_sched(const void *sendbuf, int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallv_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoallv_sched(const void *sendbuf, +- const int sendcounts[], +- const int sdispls[], MPI_Datatype sendtype, +- void *recvbuf, const int recvcounts[], +- const int rdispls[], MPI_Datatype recvtype, +- MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoallv_sched(const void *sendbuf, ++ const int sendcounts[], ++ const int sdispls[], ++ MPI_Datatype sendtype, ++ void *recvbuf, ++ const int recvcounts[], ++ const int rdispls[], ++ MPI_Datatype recvtype, ++ MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +@@ -1373,18 +1188,16 @@ static inline int MPIDI_NM_mpi_ineighbor_alltoallv_sched(const void *sendbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ineighbor_alltoallw_sched +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ineighbor_alltoallw_sched(const void *sendbuf, +- const int sendcounts[], +- const MPI_Aint sdispls[], +- const MPI_Datatype sendtypes[], +- void *recvbuf, const int recvcounts[], +- const MPI_Aint rdispls[], +- const MPI_Datatype recvtypes[], +- MPIR_Comm * comm, MPIR_Sched_t s) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoallw_sched(const void *sendbuf, ++ const int sendcounts[], ++ const MPI_Aint sdispls[], ++ const MPI_Datatype sendtypes[], ++ void *recvbuf, ++ const int recvcounts[], ++ const MPI_Aint rdispls[], ++ const MPI_Datatype recvtypes[], ++ MPIR_Comm * comm, ++ MPIR_Sched_t s) + { + int mpi_errno = MPI_SUCCESS; + +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx_comm.c +@@ -0,0 +1,78 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2016 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Mellanox Technologies Ltd. ++ * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED ++ */ ++ ++#include "mpidimpl.h" ++#include "ucx_impl.h" ++#include "mpidu_bc.h" ++#ifdef HAVE_LIBHCOLL ++#include "../../common/hcoll/hcoll.h" ++#endif ++ ++int MPIDI_UCX_mpi_comm_create_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_UCX_MPI_COMM_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_UCX_MPI_COMM_CREATE_HOOK); ++ ++ mpi_errno = MPIDIG_init_comm(comm); ++ ++ /* if this is MPI_COMM_WORLD, finish bc exchange */ ++ if (comm == MPIR_Process.comm_world && MPIR_CVAR_CH4_ROOTS_ONLY_PMI) { ++ ucs_status_t ucx_status; ++ ucp_ep_params_t ep_params; ++ int i, curr, node; ++ size_t *bc_indices; ++ ++ MPIR_Assert(MPII_Comm_is_node_consecutive(comm)); ++ MPIDU_bc_allgather(comm, MPIDI_global.node_map[0], MPIDI_UCX_global.if_address, ++ (int) MPIDI_UCX_global.addrname_len, FALSE, ++ (void **) &MPIDI_UCX_global.pmi_addr_table, &bc_indices); ++ ++ /* insert new addresses, skipping over node roots */ ++ for (i = 1, curr = 0, node = 0; i < MPIR_Comm_size(comm); i++) { ++ if (comm->internode_table[i] == node + 1) { ++ node++; ++ continue; ++ } ++ ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ ep_params.address = ++ (ucp_address_t *) & MPIDI_UCX_global.pmi_addr_table[bc_indices[curr]]; ++ ucx_status = ++ ucp_ep_create(MPIDI_UCX_global.worker, &ep_params, ++ &MPIDI_UCX_AV(&MPIDIU_get_av(0, i)).dest); ++ MPIDI_UCX_CHK_STATUS(ucx_status); ++ curr++; ++ } ++ MPIDU_bc_table_destroy(MPIDI_UCX_global.pmi_addr_table); ++ } ++#if defined HAVE_LIBHCOLL ++ hcoll_comm_create(comm, NULL); ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_UCX_MPI_COMM_CREATE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_UCX_mpi_comm_free_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_UCX_MPI_COMM_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_UCX_MPI_COMM_FREE_HOOK); ++ ++ mpi_errno = MPIDIG_destroy_comm(comm); ++#ifdef HAVE_LIBHCOLL ++ hcoll_comm_destroy(comm, NULL); ++#endif ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_UCX_MPI_COMM_FREE_HOOK); ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx_comm.h ++++ /dev/null +@@ -1,88 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Mellanox Technologies Ltd. +- * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED +- */ +-#ifndef UCX_COMM_H_INCLUDED +-#define UCX_COMM_H_INCLUDED +- +-#include "ucx_impl.h" +-#ifdef HAVE_LIBHCOLL +-#include "../../common/hcoll/hcoll.h" +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- +- mpi_errno = MPIDI_CH4U_init_comm(comm); +- +- /* if this is MPI_COMM_WORLD, finish bc exchange */ +- if (comm == MPIR_Process.comm_world && MPIR_CVAR_CH4_ROOTS_ONLY_PMI) { +- ucs_status_t ucx_status; +- ucp_ep_params_t ep_params; +- int i, curr, node; +- size_t *bc_indices; +- +- MPIR_Assert(MPII_Comm_is_node_consecutive(comm)); +- MPIDU_bc_allgather(comm, MPIDI_CH4_Global.node_map[0], MPIDI_UCX_global.if_address, +- (int) MPIDI_UCX_global.addrname_len, FALSE, +- (void **) &MPIDI_UCX_global.pmi_addr_table, &bc_indices); +- +- /* insert new addresses, skipping over node roots */ +- for (i = 1, curr = 0, node = 0; i < MPIR_Comm_size(comm); i++) { +- if (comm->internode_table[i] == node + 1) { +- node++; +- continue; +- } +- ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- ep_params.address = +- (ucp_address_t *) & MPIDI_UCX_global.pmi_addr_table[bc_indices[curr]]; +- ucx_status = +- ucp_ep_create(MPIDI_UCX_global.worker, &ep_params, +- &MPIDI_UCX_AV(&MPIDIU_get_av(0, i)).dest); +- MPIDI_UCX_CHK_STATUS(ucx_status); +- curr++; +- } +- MPIDU_bc_table_destroy(MPIDI_UCX_global.pmi_addr_table); +- } +-#if defined HAVE_LIBHCOLL +- hcoll_comm_create(comm, NULL); +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_CREATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- +- mpi_errno = MPIDI_CH4U_destroy_comm(comm); +-#ifdef HAVE_LIBHCOLL +- hcoll_comm_destroy(comm, NULL); +-#endif +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_MPI_COMM_FREE_HOOK); +- return mpi_errno; +-} +- +-#endif /* UCX_COMM_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx_datatype.c +@@ -0,0 +1,149 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2016 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Mellanox Technologies Ltd. ++ * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED ++ */ ++ ++#include "mpidimpl.h" ++#include "ucx_impl.h" ++#include ++#ifdef HAVE_LIBHCOLL ++#include "../../../common/hcoll/hcoll.h" ++#endif ++ ++struct pack_state { ++ void *buffer; ++ size_t count; ++ MPI_Datatype datatype; ++}; ++ ++static void *start_pack(void *context, const void *buffer, size_t count); ++static void *start_unpack(void *context, void *buffer, size_t count); ++static size_t pack_size(void *state); ++static size_t pack(void *state, size_t offset, void *dest, size_t max_length); ++static ucs_status_t unpack(void *state, size_t offset, const void *src, size_t count); ++static void finish_pack(void *state); ++ ++static void *start_pack(void *context, const void *buffer, size_t count) ++{ ++ struct pack_state *state; ++ ++ /* Todo: Add error handling */ ++ state = MPL_malloc(sizeof(struct pack_state), MPL_MEM_DATATYPE); ++ ++ state->buffer = (void *) buffer; ++ state->count = count; ++ state->datatype = *((MPI_Datatype *) context); ++ ++ return (void *) state; ++} ++ ++static void *start_unpack(void *context, void *buffer, size_t count) ++{ ++ struct pack_state *state; ++ ++ /* Todo: Add error handling */ ++ state = MPL_malloc(sizeof(struct pack_state), MPL_MEM_DATATYPE); ++ ++ state->buffer = buffer; ++ state->count = count; ++ state->datatype = *((MPI_Datatype *) context); ++ ++ return (void *) state; ++} ++ ++static size_t pack_size(void *state) ++{ ++ struct pack_state *pack_state = (struct pack_state *) state; ++ MPI_Aint packsize; ++ ++ MPIR_Pack_size_impl(pack_state->count, pack_state->datatype, &packsize); ++ ++ return (size_t) packsize; ++} ++ ++static size_t pack(void *state, size_t offset, void *dest, size_t max_length) ++{ ++ struct pack_state *pack_state = (struct pack_state *) state; ++ MPI_Aint actual_pack_bytes; ++ ++ MPIR_Typerep_pack(pack_state->buffer, pack_state->count, pack_state->datatype, offset, ++ dest, max_length, &actual_pack_bytes); ++ ++ return actual_pack_bytes; ++} ++ ++static ucs_status_t unpack(void *state, size_t offset, const void *src, size_t count) ++{ ++ struct pack_state *pack_state = (struct pack_state *) state; ++ MPI_Aint max_unpack_bytes; ++ MPI_Aint actual_unpack_bytes; ++ MPI_Aint packsize; ++ ++ MPIR_Pack_size_impl(pack_state->count, pack_state->datatype, &packsize); ++ max_unpack_bytes = MPL_MIN(packsize, count); ++ ++ MPIR_Typerep_unpack(src, max_unpack_bytes, pack_state->buffer, pack_state->count, ++ pack_state->datatype, offset, &actual_unpack_bytes); ++ if (unlikely(actual_unpack_bytes != max_unpack_bytes)) { ++ return UCS_ERR_MESSAGE_TRUNCATED; ++ } ++ ++ return UCS_OK; ++} ++ ++static void finish_pack(void *state) ++{ ++ MPIR_Datatype *dt_ptr; ++ struct pack_state *pack_state = (struct pack_state *) state; ++ MPIR_Datatype_get_ptr(pack_state->datatype, dt_ptr); ++ MPIR_Datatype_ptr_release(dt_ptr); ++ MPL_free(pack_state); ++} ++ ++int MPIDI_UCX_mpi_type_free_hook(MPIR_Datatype * datatype_p) ++{ ++ if (datatype_p->is_committed && (int) datatype_p->dev.netmod.ucx.ucp_datatype >= 0) { ++ ucp_dt_destroy(datatype_p->dev.netmod.ucx.ucp_datatype); ++ datatype_p->dev.netmod.ucx.ucp_datatype = -1; ++ } ++#ifdef HAVE_LIBHCOLL ++ hcoll_type_free_hook(datatype_p); ++#endif ++ ++ return 0; ++} ++ ++int MPIDI_UCX_mpi_type_commit_hook(MPIR_Datatype * datatype_p) ++{ ++ ucp_datatype_t ucp_datatype; ++ ucs_status_t status; ++ int is_contig; ++ ++ datatype_p->dev.netmod.ucx.ucp_datatype = -1; ++ MPIR_Datatype_is_contig(datatype_p->handle, &is_contig); ++ ++ if (!is_contig) { ++ ++ ucp_generic_dt_ops_t dt_ops = { ++ .start_pack = start_pack, ++ .start_unpack = start_unpack, ++ .packed_size = pack_size, ++ .pack = pack, ++ .unpack = unpack, ++ .finish = finish_pack ++ }; ++ status = ucp_dt_create_generic(&dt_ops, datatype_p, &ucp_datatype); ++ MPIR_Assertp(status == UCS_OK); ++ datatype_p->dev.netmod.ucx.ucp_datatype = ucp_datatype; ++ ++ } ++#ifdef HAVE_LIBHCOLL ++ hcoll_type_commit_hook(datatype_p); ++#endif ++ ++ return 0; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx_datatype.h ++++ /dev/null +@@ -1,146 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Mellanox Technologies Ltd. +- * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED +- */ +-#ifndef UCX_DATATYPE_H_INCLUDED +-#define UCX_DATATYPE_H_INCLUDED +- +-#include "ucx_impl.h" +-#include "ucx_types.h" +-#include +-#ifdef HAVE_LIBHCOLL +-#include "../../../common/hcoll/hcoll.h" +-#endif +- +-struct MPIDI_UCX_pack_state { +- MPIR_Segment *segment_ptr; +- MPI_Aint packsize; +-}; +- +-static inline void *MPIDI_UCX_Start_pack(void *context, const void *buffer, size_t count) +-{ +- MPI_Datatype *datatype = (MPI_Datatype *) context; +- MPIR_Segment *segment_ptr; +- struct MPIDI_UCX_pack_state *state; +- MPI_Aint packsize; +- +- state = MPL_malloc(sizeof(struct MPIDI_UCX_pack_state), MPL_MEM_DATATYPE); +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Pack_size_impl(count, *datatype, &packsize); +- /* Todo: Add error handling */ +- MPIR_Segment_init(buffer, count, *datatype, segment_ptr); +- state->packsize = packsize; +- state->segment_ptr = segment_ptr; +- +- return (void *) state; +-} +- +-static inline void *MPIDI_UCX_Start_unpack(void *context, void *buffer, size_t count) +-{ +- MPI_Datatype *datatype = (MPI_Datatype *) context; +- MPIR_Segment *segment_ptr; +- struct MPIDI_UCX_pack_state *state; +- MPI_Aint packsize; +- +- state = MPL_malloc(sizeof(struct MPIDI_UCX_pack_state), MPL_MEM_DATATYPE); +- MPIR_Pack_size_impl(count, *datatype, &packsize); +- segment_ptr = MPIR_Segment_alloc(); +- /* Todo: Add error handling */ +- MPIR_Segment_init(buffer, count, *datatype, segment_ptr); +- state->packsize = packsize; +- state->segment_ptr = segment_ptr; +- +- return (void *) state; +-} +- +-static inline size_t MPIDI_UCX_Packed_size(void *state) +-{ +- struct MPIDI_UCX_pack_state *pack_state = (struct MPIDI_UCX_pack_state *) state; +- +- return (size_t) pack_state->packsize; +-} +- +-static inline size_t MPIDI_UCX_Pack(void *state, size_t offset, void *dest, size_t max_length) +-{ +- struct MPIDI_UCX_pack_state *pack_state = (struct MPIDI_UCX_pack_state *) state; +- MPI_Aint last = MPL_MIN(pack_state->packsize, offset + max_length); +- +- MPIR_Segment_pack(pack_state->segment_ptr, offset, &last, dest); +- +- return (size_t) last - offset; +-} +- +-static inline ucs_status_t MPIDI_UCX_Unpack(void *state, size_t offset, const void *src, +- size_t count) +-{ +- struct MPIDI_UCX_pack_state *pack_state = (struct MPIDI_UCX_pack_state *) state; +- MPI_Aint last = MPL_MIN(pack_state->packsize, offset + count); +- MPI_Aint last_pack = last; +- +- MPIR_Segment_unpack(pack_state->segment_ptr, offset, &last, (void *) src); +- if (unlikely(last != last_pack)) { +- return UCS_ERR_MESSAGE_TRUNCATED; +- } +- +- return UCS_OK; +-} +- +-static inline void MPIDI_UCX_Finish_pack(void *state) +-{ +- MPIR_Datatype *dt_ptr; +- struct MPIDI_UCX_pack_state *pack_state = (struct MPIDI_UCX_pack_state *) state; +- MPIR_Datatype_get_ptr(pack_state->segment_ptr->handle, dt_ptr); +- MPIR_Segment_free(pack_state->segment_ptr); +- MPIR_Datatype_ptr_release(dt_ptr); +- MPL_free(pack_state); +-} +- +-static inline int MPIDI_NM_mpi_type_free_hook(MPIR_Datatype * datatype_p) +-{ +- if (datatype_p->is_committed && (int) datatype_p->dev.netmod.ucx.ucp_datatype >= 0) { +- ucp_dt_destroy(datatype_p->dev.netmod.ucx.ucp_datatype); +- datatype_p->dev.netmod.ucx.ucp_datatype = -1; +- } +-#if HAVE_LIBHCOLL +- hcoll_type_free_hook(datatype_p); +-#endif +- +- return 0; +-} +- +-static inline int MPIDI_NM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) +-{ +- ucp_datatype_t ucp_datatype; +- ucs_status_t status; +- int is_contig; +- +- datatype_p->dev.netmod.ucx.ucp_datatype = -1; +- MPIR_Datatype_is_contig(datatype_p->handle, &is_contig); +- +- if (!is_contig) { +- +- ucp_generic_dt_ops_t dt_ops = { +- .start_pack = MPIDI_UCX_Start_pack, +- .start_unpack = MPIDI_UCX_Start_unpack, +- .packed_size = MPIDI_UCX_Packed_size, +- .pack = MPIDI_UCX_Pack, +- .unpack = MPIDI_UCX_Unpack, +- .finish = MPIDI_UCX_Finish_pack +- }; +- status = ucp_dt_create_generic(&dt_ops, datatype_p, &ucp_datatype); +- MPIR_Assertp(status == UCS_OK); +- datatype_p->dev.netmod.ucx.ucp_datatype = ucp_datatype; +- +- } +-#if HAVE_LIBHCOLL +- hcoll_type_commit_hook(datatype_p); +-#endif +- +- return 0; +-} +- +-#endif /* UCX_DATATYPE_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/ucx_impl.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_impl.h +@@ -26,7 +26,8 @@ + #define MPIDI_UCX_WIN(win) ((win)->dev.netmod.ucx) + #define MPIDI_UCX_WIN_INFO(win, rank) MPIDI_UCX_WIN(win).info_table[rank] + +-static inline uint64_t MPIDI_UCX_init_tag(MPIR_Context_id_t contextid, int source, uint64_t tag) ++MPL_STATIC_INLINE_PREFIX uint64_t MPIDI_UCX_init_tag(MPIR_Context_id_t contextid, int source, ++ uint64_t tag) + { + uint64_t ucp_tag = 0; + ucp_tag = contextid; +@@ -37,7 +38,7 @@ static inline uint64_t MPIDI_UCX_init_tag(MPIR_Context_id_t contextid, int sourc + return ucp_tag; + } + +-static inline uint64_t MPIDI_UCX_tag_mask(int mpi_tag, int src) ++MPL_STATIC_INLINE_PREFIX uint64_t MPIDI_UCX_tag_mask(int mpi_tag, int src) + { + uint64_t tag_mask = 0xffffffffffffffff; + MPIR_TAG_CLEAR_ERROR_BITS(tag_mask); +@@ -50,7 +51,8 @@ static inline uint64_t MPIDI_UCX_tag_mask(int mpi_tag, int src) + return tag_mask; + } + +-static inline uint64_t MPIDI_UCX_recv_tag(int mpi_tag, int src, MPIR_Context_id_t contextid) ++MPL_STATIC_INLINE_PREFIX uint64_t MPIDI_UCX_recv_tag(int mpi_tag, int src, ++ MPIR_Context_id_t contextid) + { + uint64_t ucp_tag = contextid; + +@@ -63,12 +65,12 @@ static inline uint64_t MPIDI_UCX_recv_tag(int mpi_tag, int src, MPIR_Context_id_ + return ucp_tag; + } + +-static inline int MPIDI_UCX_get_tag(uint64_t match_bits) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_get_tag(uint64_t match_bits) + { + return ((int) (match_bits & MPIDI_UCX_TAG_MASK)); + } + +-static inline int MPIDI_UCX_get_source(uint64_t match_bits) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_get_source(uint64_t match_bits) + { + return ((int) ((match_bits & MPIDI_UCX_SOURCE_MASK) >> MPIDI_UCX_TAG_SHIFT)); + } +@@ -82,7 +84,7 @@ static inline int MPIDI_UCX_get_source(uint64_t match_bits) + "**ucx_nm_status %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + ucs_status_string(STATUS)); \ + } while (0) + +@@ -97,7 +99,7 @@ static inline int MPIDI_UCX_get_source(uint64_t match_bits) + "**ucx_nm_pmi_error %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + "pmi_error"); \ + } while (0) + +@@ -117,7 +119,7 @@ static inline int MPIDI_UCX_get_source(uint64_t match_bits) + "**ucx_nm_str_error %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + "strng_error"); \ + } while (0) + +@@ -132,8 +134,22 @@ static inline int MPIDI_UCX_get_source(uint64_t match_bits) + "**ucx_nm_rq_error %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ +- FCNAME, \ ++ __func__, \ + ucs_status_string(UCS_PTR_STATUS(_req))); \ + } while (0) + ++MPL_STATIC_INLINE_PREFIX bool MPIDI_UCX_is_reachable_win(MPIR_Win * win) ++{ ++ /* UCX only enables HW RMA for create and allocate windows. */ ++ return win->create_flavor == MPI_WIN_FLAVOR_CREATE || ++ win->create_flavor == MPI_WIN_FLAVOR_ALLOCATE; ++} ++ ++MPL_STATIC_INLINE_PREFIX bool MPIDI_UCX_is_reachable_target(int rank, MPIR_Win * win) ++{ ++ /* zero win target does not have rkey. */ ++ return MPIDI_UCX_is_reachable_win(win) && rank != MPI_PROC_NULL && ++ MPIDI_UCX_WIN_INFO(win, rank).rkey != NULL; ++} ++ + #endif /* UCX_IMPL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx_init.c +@@ -0,0 +1,238 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2016 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Mellanox Technologies Ltd. ++ * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED ++ */ ++ ++#include "mpidimpl.h" ++#include "ucx_impl.h" ++#include "mpidu_bc.h" ++#include ++ ++static void request_init_callback(void *request); ++ ++static void request_init_callback(void *request) ++{ ++ ++ MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; ++ ucp_request->req = NULL; ++ ++} ++ ++int MPIDI_UCX_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, MPIR_Comm * comm_world, ++ MPIR_Comm * comm_self, int spawned, int *n_vcis_provided) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ucp_config_t *config; ++ ucs_status_t ucx_status; ++ uint64_t features = 0; ++ int i; ++ ucp_params_t ucp_params; ++ ucp_worker_params_t worker_params; ++ ucp_ep_params_t ep_params; ++ size_t *bc_indices; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_UCX_INIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_UCX_INIT_HOOK); ++ ++ *n_vcis_provided = 1; ++ ++ ucx_status = ucp_config_read(NULL, NULL, &config); ++ MPIDI_UCX_CHK_STATUS(ucx_status); ++ ++ /* For now use only the tag feature */ ++ features = UCP_FEATURE_TAG | UCP_FEATURE_RMA; ++ ucp_params.features = features; ++ ucp_params.request_size = sizeof(MPIDI_UCX_ucp_request_t); ++ ucp_params.request_init = request_init_callback; ++ ucp_params.request_cleanup = NULL; ++ ucp_params.estimated_num_eps = size; ++ ++ ucp_params.field_mask = UCP_PARAM_FIELD_FEATURES | ++ UCP_PARAM_FIELD_REQUEST_SIZE | ++ UCP_PARAM_FIELD_ESTIMATED_NUM_EPS | UCP_PARAM_FIELD_REQUEST_INIT; ++ ++ ucx_status = ucp_init(&ucp_params, config, &MPIDI_UCX_global.context); ++ MPIDI_UCX_CHK_STATUS(ucx_status); ++ ucp_config_release(config); ++ ++ worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE; ++ worker_params.thread_mode = UCS_THREAD_MODE_SERIALIZED; ++ ++ ucx_status = ucp_worker_create(MPIDI_UCX_global.context, &worker_params, ++ &MPIDI_UCX_global.worker); ++ MPIDI_UCX_CHK_STATUS(ucx_status); ++ ucx_status = ++ ucp_worker_get_address(MPIDI_UCX_global.worker, &MPIDI_UCX_global.if_address, ++ &MPIDI_UCX_global.addrname_len); ++ MPIDI_UCX_CHK_STATUS(ucx_status); ++ MPIR_Assert(MPIDI_UCX_global.addrname_len <= INT_MAX); ++ ++ mpi_errno = ++ MPIDU_bc_table_create(rank, size, MPIDI_global.node_map[0], MPIDI_UCX_global.if_address, ++ (int) MPIDI_UCX_global.addrname_len, FALSE, ++ MPIR_CVAR_CH4_ROOTS_ONLY_PMI, ++ (void **) &MPIDI_UCX_global.pmi_addr_table, &bc_indices); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIR_CVAR_CH4_ROOTS_ONLY_PMI) { ++ int *node_roots, num_nodes; ++ ++ MPIR_NODEMAP_get_node_roots(MPIDI_global.node_map[0], size, &node_roots, &num_nodes); ++ for (i = 0; i < num_nodes; i++) { ++ ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ ep_params.address = (ucp_address_t *) & MPIDI_UCX_global.pmi_addr_table[bc_indices[i]]; ++ ucx_status = ++ ucp_ep_create(MPIDI_UCX_global.worker, &ep_params, ++ &MPIDI_UCX_AV(&MPIDIU_get_av(0, node_roots[i])).dest); ++ MPIDI_UCX_CHK_STATUS(ucx_status); ++ } ++ MPL_free(node_roots); ++ } else { ++ for (i = 0; i < size; i++) { ++ ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ++ ep_params.address = (ucp_address_t *) & MPIDI_UCX_global.pmi_addr_table[bc_indices[i]]; ++ ucx_status = ++ ucp_ep_create(MPIDI_UCX_global.worker, &ep_params, ++ &MPIDI_UCX_AV(&MPIDIU_get_av(0, i)).dest); ++ MPIDI_UCX_CHK_STATUS(ucx_status); ++ } ++ MPIDU_bc_table_destroy(MPIDI_UCX_global.pmi_addr_table); ++ } ++ ++ MPIDIG_init(comm_world, comm_self, *n_vcis_provided); ++ ++ *tag_bits = MPIR_TAG_BITS_DEFAULT; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_EXIT); ++ return mpi_errno; ++ fn_fail: ++ if (MPIDI_UCX_global.worker != NULL) ++ ucp_worker_destroy(MPIDI_UCX_global.worker); ++ ++ if (MPIDI_UCX_global.context != NULL) ++ ucp_cleanup(MPIDI_UCX_global.context); ++ ++ goto fn_exit; ++ ++} ++ ++int MPIDI_UCX_mpi_finalize_hook(void) ++{ ++ int mpi_errno = MPI_SUCCESS, pmi_errno; ++ int i, p = 0, completed; ++ MPIR_Comm *comm; ++ ucs_status_ptr_t ucp_request; ++ ucs_status_ptr_t *pending; ++ ++ comm = MPIR_Process.comm_world; ++ pending = MPL_malloc(sizeof(ucs_status_ptr_t) * comm->local_size, MPL_MEM_OTHER); ++ ++ for (i = 0; i < comm->local_size; i++) { ++ ucp_request = ucp_disconnect_nb(MPIDI_UCX_AV(&MPIDIU_get_av(0, i)).dest); ++ MPIDI_UCX_CHK_REQUEST(ucp_request); ++ if (ucp_request != UCS_OK) { ++ pending[p] = ucp_request; ++ p++; ++ } ++ } ++ ++ /* now complete the outstaning requests! Important: call progress inbetween, otherwise we ++ * deadlock! */ ++ completed = p; ++ while (completed != 0) { ++ ucp_worker_progress(MPIDI_UCX_global.worker); ++ completed = p; ++ for (i = 0; i < p; i++) { ++ if (ucp_request_is_completed(pending[i]) != 0) ++ completed -= 1; ++ } ++ } ++ ++ for (i = 0; i < p; i++) { ++ ucp_request_release(pending[i]); ++ } ++ ++#ifdef USE_PMIX_API ++ pmix_value_t value; ++ pmix_info_t *info; ++ int flag = 1; ++ ++ PMIX_INFO_CREATE(info, 1); ++ PMIX_INFO_LOAD(info, PMIX_COLLECT_DATA, &flag, PMIX_BOOL); ++ pmi_errno = PMIx_Fence(&MPIR_Process.pmix_wcproc, 1, info, 1); ++ if (pmi_errno != PMIX_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(pmi_errno, MPI_ERR_OTHER, "**pmix_fence", "**pmix_fence %d", ++ pmi_errno); ++ } ++ PMIX_INFO_FREE(info, 1); ++#elif defined(USE_PMI2_API) ++ pmi_errno = PMI2_KVS_Fence(); ++ if (pmi_errno != PMI2_SUCCESS) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**pmi_kvsfence"); ++ } ++#else ++ pmi_errno = PMI_Barrier(); ++ MPIDI_UCX_PMI_ERROR(pmi_errno); ++#endif ++ ++ ++ if (MPIDI_UCX_global.worker != NULL) ++ ucp_worker_destroy(MPIDI_UCX_global.worker); ++ ++ if (MPIDI_UCX_global.context != NULL) ++ ucp_cleanup(MPIDI_UCX_global.context); ++ ++ MPIR_Comm_release_always(comm); ++ ++ comm = MPIR_Process.comm_self; ++ MPIR_Comm_release_always(comm); ++ ++ MPIDIG_finalize(); ++ ++ fn_exit: ++ MPL_free(pending); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++ ++} ++ ++int MPIDI_UCX_get_vci_attr(int vci) ++{ ++ MPIR_Assert(0 <= vci && vci < 1); ++ return MPIDI_VCI_TX | MPIDI_VCI_RX; ++} ++ ++int MPIDI_UCX_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_UCX_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_UCX_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_UCX_mpi_free_mem(void *ptr) ++{ ++ return MPIDIG_mpi_free_mem(ptr); ++} ++ ++void *MPIDI_UCX_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ return MPIDIG_mpi_alloc_mem(size, info_ptr); ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx_init.h ++++ /dev/null +@@ -1,268 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Mellanox Technologies Ltd. +- * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED +- */ +-#ifndef UCX_INIT_H_INCLUDED +-#define UCX_INIT_H_INCLUDED +- +-#include "ucx_impl.h" +-#include "mpir_cvars.h" +-#include "ucx_types.h" +-#include "mpidu_bc.h" +-#include +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_init_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_init_hook(int rank, +- int size, +- int appnum, +- int *tag_bits, +- MPIR_Comm * comm_world, +- MPIR_Comm * comm_self, int spawned, int *n_vnis_provided) +-{ +- int mpi_errno = MPI_SUCCESS; +- ucp_config_t *config; +- ucs_status_t ucx_status; +- uint64_t features = 0; +- int i; +- ucp_params_t ucp_params; +- ucp_worker_params_t worker_params; +- ucp_ep_params_t ep_params; +- size_t *bc_indices; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_INIT); +- +- *n_vnis_provided = 1; +- +- ucx_status = ucp_config_read(NULL, NULL, &config); +- MPIDI_UCX_CHK_STATUS(ucx_status); +- +- /* For now use only the tag feature */ +- features = UCP_FEATURE_TAG | UCP_FEATURE_RMA; +- ucp_params.features = features; +- ucp_params.request_size = sizeof(MPIDI_UCX_ucp_request_t); +- ucp_params.request_init = MPIDI_UCX_Request_init_callback; +- ucp_params.request_cleanup = NULL; +- ucp_params.estimated_num_eps = size; +- +- ucp_params.field_mask = UCP_PARAM_FIELD_FEATURES | +- UCP_PARAM_FIELD_REQUEST_SIZE | +- UCP_PARAM_FIELD_ESTIMATED_NUM_EPS | UCP_PARAM_FIELD_REQUEST_INIT; +- +- ucx_status = ucp_init(&ucp_params, config, &MPIDI_UCX_global.context); +- MPIDI_UCX_CHK_STATUS(ucx_status); +- ucp_config_release(config); +- +- worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE; +- worker_params.thread_mode = UCS_THREAD_MODE_SERIALIZED; +- +- ucx_status = ucp_worker_create(MPIDI_UCX_global.context, &worker_params, +- &MPIDI_UCX_global.worker); +- MPIDI_UCX_CHK_STATUS(ucx_status); +- ucx_status = +- ucp_worker_get_address(MPIDI_UCX_global.worker, &MPIDI_UCX_global.if_address, +- &MPIDI_UCX_global.addrname_len); +- MPIDI_UCX_CHK_STATUS(ucx_status); +- MPIR_Assert(MPIDI_UCX_global.addrname_len <= INT_MAX); +- +- MPIDU_bc_table_create(rank, size, MPIDI_CH4_Global.node_map[0], MPIDI_UCX_global.if_address, +- (int) MPIDI_UCX_global.addrname_len, FALSE, MPIR_CVAR_CH4_ROOTS_ONLY_PMI, +- (void **) &MPIDI_UCX_global.pmi_addr_table, &bc_indices); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIR_CVAR_CH4_ROOTS_ONLY_PMI) { +- int *node_roots, num_nodes; +- +- MPIR_NODEMAP_get_node_roots(MPIDI_CH4_Global.node_map[0], size, &node_roots, &num_nodes); +- for (i = 0; i < num_nodes; i++) { +- ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- ep_params.address = (ucp_address_t *) & MPIDI_UCX_global.pmi_addr_table[bc_indices[i]]; +- ucx_status = +- ucp_ep_create(MPIDI_UCX_global.worker, &ep_params, +- &MPIDI_UCX_AV(&MPIDIU_get_av(0, node_roots[i])).dest); +- MPIDI_UCX_CHK_STATUS(ucx_status); +- } +- MPL_free(node_roots); +- } else { +- for (i = 0; i < size; i++) { +- ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; +- ep_params.address = (ucp_address_t *) & MPIDI_UCX_global.pmi_addr_table[bc_indices[i]]; +- ucx_status = +- ucp_ep_create(MPIDI_UCX_global.worker, &ep_params, +- &MPIDI_UCX_AV(&MPIDIU_get_av(0, i)).dest); +- MPIDI_UCX_CHK_STATUS(ucx_status); +- } +- MPIDU_bc_table_destroy(MPIDI_UCX_global.pmi_addr_table); +- } +- +- MPIDIG_init(comm_world, comm_self, *n_vnis_provided); +- +-#ifndef HAVE_DEBUGGER_SUPPORT +- MPIDI_UCX_global.lw_send_req = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- if (MPIDI_UCX_global.lw_send_req == NULL) { +- MPIR_ERR_SETFATALANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); +- } +- MPIR_cc_set(&MPIDI_UCX_global.lw_send_req->cc, 0); +-#endif +- +- *tag_bits = MPIR_TAG_BITS_DEFAULT; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_EXIT); +- return mpi_errno; +- fn_fail: +- if (MPIDI_UCX_global.worker != NULL) +- ucp_worker_destroy(MPIDI_UCX_global.worker); +- +- if (MPIDI_UCX_global.context != NULL) +- ucp_cleanup(MPIDI_UCX_global.context); +- +- goto fn_exit; +- +-} +- +-static inline int MPIDI_NM_mpi_finalize_hook(void) +-{ +- int mpi_errno = MPI_SUCCESS, pmi_errno; +- int i, p = 0, completed; +- MPIR_Comm *comm; +- ucs_status_ptr_t ucp_request; +- ucs_status_ptr_t *pending; +- +- comm = MPIR_Process.comm_world; +- pending = MPL_malloc(sizeof(ucs_status_ptr_t) * comm->local_size, MPL_MEM_OTHER); +- +- for (i = 0; i < comm->local_size; i++) { +- ucp_request = ucp_disconnect_nb(MPIDI_UCX_AV(&MPIDIU_get_av(0, i)).dest); +- MPIDI_UCX_CHK_REQUEST(ucp_request); +- if (ucp_request != UCS_OK) { +- pending[p] = ucp_request; +- p++; +- } +- } +- +- /* now complete the outstaning requests! Important: call progress inbetween, otherwise we +- * deadlock! */ +- completed = p; +- while (completed != 0) { +- ucp_worker_progress(MPIDI_UCX_global.worker); +- completed = p; +- for (i = 0; i < p; i++) { +- if (ucp_request_is_completed(pending[i]) != 0) +- completed -= 1; +- } +- } +- +- for (i = 0; i < p; i++) { +- ucp_request_release(pending[i]); +- } +- +-#ifdef USE_PMIX_API +- pmix_value_t value; +- pmix_info_t *info; +- int flag = 1; +- +- PMIX_INFO_CREATE(info, 1); +- PMIX_INFO_LOAD(info, PMIX_COLLECT_DATA, &flag, PMIX_BOOL); +- pmi_errno = PMIx_Fence(&MPIR_Process.pmix_wcproc, 1, info, 1); +- if (pmi_errno != PMIX_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(pmi_errno, MPI_ERR_OTHER, "**pmix_fence", "**pmix_fence %d", +- pmi_errno); +- } +- PMIX_INFO_FREE(info, 1); +-#elif defined(USE_PMI2_API) +- pmi_errno = PMI2_KVS_Fence(); +- if (pmi_errno != PMI2_SUCCESS) { +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**pmi_kvsfence"); +- } +-#else +- pmi_errno = PMI_Barrier(); +- MPIDI_UCX_PMI_ERROR(pmi_errno); +-#endif +- +- +- if (MPIDI_UCX_global.worker != NULL) +- ucp_worker_destroy(MPIDI_UCX_global.worker); +- +- if (MPIDI_UCX_global.context != NULL) +- ucp_cleanup(MPIDI_UCX_global.context); +- +- MPIR_Comm_release_always(comm); +- +- comm = MPIR_Process.comm_self; +- MPIR_Comm_release_always(comm); +- +- MPIDIG_finalize(); +- +-#ifndef HAVE_DEBUGGER_SUPPORT +- MPIR_Request_free(MPIDI_UCX_global.lw_send_req); +-#endif +- +- fn_exit: +- MPL_free(pending); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +- +-} +- +-static inline int MPIDI_NM_get_vni_attr(int vni) +-{ +- MPIR_Assert(0 <= vni && vni < 1); +- return MPIDI_VNI_TX | MPIDI_VNI_RX; +-} +- +-static inline int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, +- int idx, int *lpid_ptr, bool is_remote) +-{ +- int avtid = 0, lpid = 0; +- if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); +- } else if (is_remote) { +- MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); +- } else { +- MPIDIU_comm_rank_to_pid_local(comm_ptr, idx, &lpid, &avtid); +- } +- +- *lpid_ptr = MPIDIU_LUPID_CREATE(avtid, lpid); +- return MPI_SUCCESS; +- +-} +- +-static inline int MPIDI_NM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) +-{ +- MPIR_Assert(0); +-} +- +-static inline int MPIDI_NM_upids_to_lupids(int size, +- size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- MPIR_Assert(0); +-} +- +-static inline int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_NM_mpi_free_mem(void *ptr) +-{ +- return MPIDI_CH4U_mpi_free_mem(ptr); +-} +- +-static inline void *MPIDI_NM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- return MPIDI_CH4U_mpi_alloc_mem(size, info_ptr); +-} +- +-#endif /* UCX_INIT_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx_noinline.h +@@ -0,0 +1,117 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef UCX_NOINLINE_H_INCLUDED ++#define UCX_NOINLINE_H_INCLUDED ++ ++#include "ucx_impl.h" ++ ++/* ucx_comm.h */ ++int MPIDI_UCX_mpi_comm_create_hook(MPIR_Comm * comm); ++int MPIDI_UCX_mpi_comm_free_hook(MPIR_Comm * comm); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_comm_create_hook MPIDI_UCX_mpi_comm_create_hook ++#define MPIDI_NM_mpi_comm_free_hook MPIDI_UCX_mpi_comm_free_hook ++#endif ++ ++/* ucx_spawn.h */ ++int MPIDI_UCX_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm); ++int MPIDI_UCX_mpi_comm_disconnect(MPIR_Comm * comm_ptr); ++int MPIDI_UCX_mpi_open_port(MPIR_Info * info_ptr, char *port_name); ++int MPIDI_UCX_mpi_close_port(const char *port_name); ++int MPIDI_UCX_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_comm_connect MPIDI_UCX_mpi_comm_connect ++#define MPIDI_NM_mpi_comm_disconnect MPIDI_UCX_mpi_comm_disconnect ++#define MPIDI_NM_mpi_open_port MPIDI_UCX_mpi_open_port ++#define MPIDI_NM_mpi_close_port MPIDI_UCX_mpi_close_port ++#define MPIDI_NM_mpi_comm_accept MPIDI_UCX_mpi_comm_accept ++#endif ++ ++int MPIDI_UCX_mpi_op_free_hook(MPIR_Op * op_p); ++int MPIDI_UCX_mpi_op_commit_hook(MPIR_Op * op_p); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_op_free_hook MPIDI_UCX_mpi_op_free_hook ++#define MPIDI_NM_mpi_op_commit_hook MPIDI_UCX_mpi_op_commit_hook ++#endif ++ ++/* ucx_win.h */ ++int MPIDI_UCX_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); ++int MPIDI_UCX_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); ++int MPIDI_UCX_mpi_win_free(MPIR_Win ** win_ptr); ++int MPIDI_UCX_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); ++int MPIDI_UCX_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_UCX_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr); ++int MPIDI_UCX_mpi_win_detach(MPIR_Win * win, const void *base); ++int MPIDI_UCX_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win_ptr); ++int MPIDI_UCX_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win_ptr); ++int MPIDI_UCX_mpi_win_create_hook(MPIR_Win * win); ++int MPIDI_UCX_mpi_win_allocate_hook(MPIR_Win * win); ++int MPIDI_UCX_mpi_win_allocate_shared_hook(MPIR_Win * win); ++int MPIDI_UCX_mpi_win_create_dynamic_hook(MPIR_Win * win); ++int MPIDI_UCX_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_UCX_mpi_win_detach_hook(MPIR_Win * win, const void *base); ++int MPIDI_UCX_mpi_win_free_hook(MPIR_Win * win); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_win_set_info MPIDI_UCX_mpi_win_set_info ++#define MPIDI_NM_mpi_win_get_info MPIDI_UCX_mpi_win_get_info ++#define MPIDI_NM_mpi_win_free MPIDI_UCX_mpi_win_free ++#define MPIDI_NM_mpi_win_create MPIDI_UCX_mpi_win_create ++#define MPIDI_NM_mpi_win_attach MPIDI_UCX_mpi_win_attach ++#define MPIDI_NM_mpi_win_allocate_shared MPIDI_UCX_mpi_win_allocate_shared ++#define MPIDI_NM_mpi_win_detach MPIDI_UCX_mpi_win_detach ++#define MPIDI_NM_mpi_win_allocate MPIDI_UCX_mpi_win_allocate ++#define MPIDI_NM_mpi_win_create_dynamic MPIDI_UCX_mpi_win_create_dynamic ++#define MPIDI_NM_mpi_win_create_hook MPIDI_UCX_mpi_win_create_hook ++#define MPIDI_NM_mpi_win_allocate_hook MPIDI_UCX_mpi_win_allocate_hook ++#define MPIDI_NM_mpi_win_allocate_shared_hook MPIDI_UCX_mpi_win_allocate_shared_hook ++#define MPIDI_NM_mpi_win_create_dynamic_hook MPIDI_UCX_mpi_win_create_dynamic_hook ++#define MPIDI_NM_mpi_win_attach_hook MPIDI_UCX_mpi_win_attach_hook ++#define MPIDI_NM_mpi_win_detach_hook MPIDI_UCX_mpi_win_detach_hook ++#define MPIDI_NM_mpi_win_free_hook MPIDI_UCX_mpi_win_free_hook ++#endif ++ ++/* ucx_init.h */ ++int MPIDI_UCX_mpi_init_hook(int rank, int size, int appnum, int *tag_bits, MPIR_Comm * comm_world, ++ MPIR_Comm * comm_self, int spawned, int *n_vcis_provided); ++int MPIDI_UCX_mpi_finalize_hook(void); ++int MPIDI_UCX_get_vci_attr(int vci); ++void *MPIDI_UCX_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDI_UCX_mpi_free_mem(void *ptr); ++int MPIDI_UCX_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids); ++int MPIDI_UCX_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids); ++int MPIDI_UCX_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_init_hook MPIDI_UCX_mpi_init_hook ++#define MPIDI_NM_mpi_finalize_hook MPIDI_UCX_mpi_finalize_hook ++#define MPIDI_NM_get_vci_attr MPIDI_UCX_get_vci_attr ++#define MPIDI_NM_mpi_alloc_mem MPIDI_UCX_mpi_alloc_mem ++#define MPIDI_NM_mpi_free_mem MPIDI_UCX_mpi_free_mem ++#define MPIDI_NM_get_local_upids MPIDI_UCX_get_local_upids ++#define MPIDI_NM_upids_to_lupids MPIDI_UCX_upids_to_lupids ++#define MPIDI_NM_create_intercomm_from_lpids MPIDI_UCX_create_intercomm_from_lpids ++#endif ++ ++int MPIDI_UCX_mpi_type_free_hook(MPIR_Datatype * datatype_p); ++int MPIDI_UCX_mpi_type_commit_hook(MPIR_Datatype * datatype_p); ++ ++#ifdef NETMOD_INLINE ++#define MPIDI_NM_mpi_type_free_hook MPIDI_UCX_mpi_type_free_hook ++#define MPIDI_NM_mpi_type_commit_hook MPIDI_UCX_mpi_type_commit_hook ++#endif ++ ++#endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx_op.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2016 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Mellanox Technologies Ltd. ++ * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED ++ */ ++ ++#include "mpidimpl.h" ++#include "ucx_impl.h" ++ ++int MPIDI_UCX_mpi_op_free_hook(MPIR_Op * op_p) ++{ ++ return 0; ++} ++ ++int MPIDI_UCX_mpi_op_commit_hook(MPIR_Op * op_p) ++{ ++ return 0; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx_op.h ++++ /dev/null +@@ -1,24 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Mellanox Technologies Ltd. +- * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED +- */ +-#ifndef UCX_OP_H_INCLUDED +-#define UCX_OP_H_INCLUDED +- +-#include "ucx_impl.h" +- +-static inline int MPIDI_NM_mpi_op_free_hook(MPIR_Op * op_p) +-{ +- return 0; +-} +- +-static inline int MPIDI_NM_mpi_op_commit_hook(MPIR_Op * op_p) +-{ +- return 0; +-} +- +-#endif /* UCX_OP_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/ucx_pre.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_pre.h +@@ -43,13 +43,22 @@ typedef struct MPIDI_UCX_win_info { + ucp_rkey_h rkey; + uint64_t addr; + uint32_t disp; +-} __attribute__ ((packed)) MPIDI_UCX_win_info_t; ++} MPIDI_UCX_win_info_t; + ++typedef enum { ++ MPIDI_UCX_WIN_SYNC_UNSET = 0, ++ MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL = 1, /* need both local and remote flush */ ++ MPIDI_UCX_WIN_SYNC_FLUSH = 2 /* need only remote flush */ ++} MPIDI_UCX_win_sync_flag_t; ++ ++typedef struct MPIDI_UCX_win_target_sync { ++ MPIDI_UCX_win_sync_flag_t need_sync; /* flag for op completion */ ++} MPIDI_UCX_win_target_sync_t; + + typedef struct { + MPIDI_UCX_win_info_t *info_table; + ucp_mem_h mem_h; +- int need_local_flush; ++ MPIDI_UCX_win_target_sync_t *target_sync; + } MPIDI_UCX_win_t; + + typedef struct { +--- a/src/mpid/ch4/netmod/ucx/ucx_probe.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_probe.h +@@ -11,12 +11,13 @@ + + #include "ucx_impl.h" + +-static inline int MPIDI_NM_mpi_improbe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- MPIDI_av_entry_t * addr, +- int *flag, MPIR_Request ** message, MPI_Status * status) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_improbe(int source, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, ++ MPIDI_av_entry_t * addr, ++ int *flag, MPIR_Request ** message, ++ MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; + uint64_t ucp_tag, tag_mask; +@@ -55,11 +56,12 @@ static inline int MPIDI_NM_mpi_improbe(int source, + } + + +-static inline int MPIDI_NM_mpi_iprobe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- MPIDI_av_entry_t * addr, int *flag, MPI_Status * status) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iprobe(int source, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, ++ MPIDI_av_entry_t * addr, int *flag, ++ MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; + uint64_t ucp_tag, tag_mask; +--- a/src/mpid/ch4/netmod/ucx/ucx_proc.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_proc.h +@@ -11,28 +11,45 @@ + + #include "ucx_impl.h" + +-static inline int MPIDI_NM_rank_is_local(int rank, MPIR_Comm * comm) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rank_is_local(int rank, MPIR_Comm * comm) + { + int ret; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); + +- ret = MPIDI_CH4U_rank_is_local(rank, comm); ++ ret = MPIDIU_rank_is_local(rank, comm); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_RANK_IS_LOCAL); + return ret; + } + +-static inline int MPIDI_NM_av_is_local(MPIDI_av_entry_t * av) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_av_is_local(MPIDI_av_entry_t * av) + { + int ret; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); + +- ret = MPIDI_CH4U_av_is_local(av); ++ ret = MPIDIU_av_is_local(av); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_NM_AV_IS_LOCAL); + return ret; + } + ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, ++ int idx, int *lpid_ptr, bool is_remote) ++{ ++ int avtid = 0, lpid = 0; ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); ++ } else if (is_remote) { ++ MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); ++ } else { ++ MPIDIU_comm_rank_to_pid_local(comm_ptr, idx, &lpid, &avtid); ++ } ++ ++ *lpid_ptr = MPIDIU_LUPID_CREATE(avtid, lpid); ++ return MPI_SUCCESS; ++ ++} ++ + #endif /* UCX_PROC_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/ucx_progress.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_progress.h +@@ -12,7 +12,7 @@ + #include "ucx_impl.h" + //#include "events.h" + +-static inline int MPIDI_UCX_am_handler(void *msg, size_t msg_sz) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_am_handler(void *msg, size_t msg_sz) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *rreq = NULL; +@@ -29,8 +29,8 @@ static inline int MPIDI_UCX_am_handler(void *msg, size_t msg_sz) + in_data_sz = data_sz = msg_hdr->data_sz; + + MPIDIG_global.target_msg_cbs[msg_hdr->handler_id] (msg_hdr->handler_id, msg_hdr->payload, +- &p_data, &data_sz, &is_contig, +- &target_cmpl_cb, &rreq); ++ &p_data, &data_sz, 0 /* is_local */ , ++ &is_contig, &target_cmpl_cb, &rreq); + + if (!rreq) + goto fn_exit; +@@ -81,20 +81,13 @@ static inline int MPIDI_UCX_am_handler(void *msg, size_t msg_sz) + return mpi_errno; + } + +-static inline void MPIDI_UCX_Handle_am_recv(void *request, ucs_status_t status, +- ucp_tag_recv_info_t * info) ++MPL_STATIC_INLINE_PREFIX void MPIDI_UCX_Handle_am_recv(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t * info) + { +- int mpi_errno = MPI_SUCCESS; +- MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; +- + return; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_progress(int vni, int blocking) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(int vci, int blocking) + { + int mpi_errno = MPI_SUCCESS; + ucp_tag_recv_info_t info; +--- a/src/mpid/ch4/netmod/ucx/ucx_recv.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_recv.h +@@ -11,12 +11,8 @@ + + #include "ucx_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_UCX_recv_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_UCX_recv_cmpl_cb(void *request, ucs_status_t status, +- ucp_tag_recv_info_t * info) ++MPL_STATIC_INLINE_PREFIX void MPIDI_UCX_recv_cmpl_cb(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t * info) + { + MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; + MPIR_Request *rreq = NULL; +@@ -50,7 +46,7 @@ static inline void MPIDI_UCX_recv_cmpl_cb(void *request, ucs_status_t status, + #endif + + if (ucp_request->req) { +- MPIDI_CH4U_request_complete(rreq); ++ MPIDIU_request_complete(rreq); + ucp_request->req = NULL; + ucp_request_release(ucp_request); + } else { +@@ -62,12 +58,8 @@ static inline void MPIDI_UCX_recv_cmpl_cb(void *request, ucs_status_t status, + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_UCX_RECV_CMPL_CB); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_UCX_mrecv_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_UCX_mrecv_cmpl_cb(void *request, ucs_status_t status, +- ucp_tag_recv_info_t * info) ++MPL_STATIC_INLINE_PREFIX void MPIDI_UCX_mrecv_cmpl_cb(void *request, ucs_status_t status, ++ ucp_tag_recv_info_t * info) + { + MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; + +@@ -76,7 +68,7 @@ static inline void MPIDI_UCX_mrecv_cmpl_cb(void *request, ucs_status_t status, + + if (ucp_request->req) { + MPIR_Request *rreq = ucp_request->req; +- MPIDI_CH4U_request_complete(rreq); ++ MPIDIU_request_complete(rreq); + ucp_request->req = NULL; + ucp_request_release(ucp_request); + +@@ -103,17 +95,13 @@ static inline void MPIDI_UCX_mrecv_cmpl_cb(void *request, ucs_status_t status, + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_UCX_MRECV_CMPL_CB); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_UCX_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_UCX_recv(void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, MPIR_Comm * comm, +- int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_recv(void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, MPIR_Comm * comm, ++ int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + size_t data_sz; +@@ -212,7 +200,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_imrecv(void *buf, + MPIDI_UCX_CHK_REQUEST(ucp_request); + + if (ucp_request->req) { +- if (unlikely((ucs_status_t) ucp_request->req == UCS_ERR_MESSAGE_TRUNCATED)) { ++ if (unlikely((uint64_t) ucp_request->req == (uint64_t) UCS_ERR_MESSAGE_TRUNCATED)) { + message->status.MPI_ERROR = MPI_ERR_TRUNCATE; + } else { + ucp_tag_recv_info_t *info = ucp_request->req; +@@ -222,7 +210,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_imrecv(void *buf, + MPIR_STATUS_SET_COUNT(message->status, info->length); + MPL_free(ucp_request->req); + } +- MPIDI_CH4U_request_complete(message); ++ MPIDIU_request_complete(message); + ucp_request->req = NULL; + ucp_request_release(ucp_request); + } else { +@@ -273,7 +261,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_recv_init(void *buf, + return MPIDIG_mpi_recv_init(buf, count, datatype, rank, tag, comm, context_offset, request); + } + +-static inline int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_recv(MPIR_Request * rreq) + { + if (!MPIR_Request_is_complete(rreq)) { + ucp_request_cancel(MPIDI_UCX_global.worker, MPIDI_UCX_REQ(rreq).a.ucp_request); +--- a/src/mpid/ch4/netmod/ucx/ucx_request.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_request.h +@@ -11,29 +11,15 @@ + + #include "ucx_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_am_request_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_NM_am_request_init(MPIR_Request * req) ++MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_init(MPIR_Request * req) + { + req->dev.ch4.am.netmod_am.ucx.pack_buffer = NULL; + } + +-static inline void MPIDI_NM_am_request_finalize(MPIR_Request * req) ++MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_finalize(MPIR_Request * req) + { +- if ((req)->dev.ch4.am.netmod_am.ucx.pack_buffer) { +- MPL_free((req)->dev.ch4.am.netmod_am.ucx.pack_buffer); +- } ++ MPL_free((req)->dev.ch4.am.netmod_am.ucx.pack_buffer); + /* MPIR_Request_free(req); */ + } + +-static inline void MPIDI_UCX_Request_init_callback(void *request) +-{ +- +- MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; +- ucp_request->req = NULL; +- +-} +- + #endif /* UCX_REQUEST_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/ucx_rma.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_rma.h +@@ -11,29 +11,80 @@ + + #include "ucx_impl.h" + +-static inline int MPIDI_UCX_contig_put(const void *origin_addr, +- size_t size, +- int target_rank, +- MPI_Aint target_disp, MPI_Aint true_lb, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX void MPIDI_UCX_rma_cmpl_cb(void *request, ucs_status_t status) ++{ ++ MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; ++ MPIR_Request *req = ucp_request->req; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_UCX_RMA_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_UCX_RMA_CMPL_CB); ++ ++ MPIR_Assert(status == UCS_OK); ++ if (req) { ++ MPID_Request_complete(req); ++ ucp_request->req = NULL; ++ } ++ ucp_request_free(ucp_request); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_UCX_RMA_CMPL_CB); ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_contig_put(const void *origin_addr, ++ size_t size, ++ int target_rank, ++ MPI_Aint target_disp, MPI_Aint true_lb, ++ MPIR_Win * win, MPIDI_av_entry_t * addr, ++ MPIR_Request ** reqptr) + { + + MPIDI_UCX_win_info_t *win_info = &(MPIDI_UCX_WIN_INFO(win, target_rank)); + size_t offset; + uint64_t base; + int mpi_errno = MPI_SUCCESS; +- ucs_status_t status; +- MPIR_Comm *comm = win->comm_ptr; +- ucp_ep_h ep = MPIDI_UCX_COMM_TO_EP(comm, target_rank); ++ MPIDI_UCX_ucp_request_t *ucp_request ATTRIBUTE((unused)) = NULL; ++ ucp_ep_h ep = MPIDI_UCX_AV_TO_EP(addr); + + base = win_info->addr; + offset = target_disp * win_info->disp + true_lb; + +- status = ucp_put_nbi(ep, origin_addr, size, base + offset, win_info->rkey); +- if (status == UCS_INPROGRESS) +- MPIDI_UCX_WIN(win).need_local_flush = 1; +- else +- MPIDI_UCX_CHK_STATUS(status); ++ /* Put without request */ ++ if (likely(!reqptr)) { ++ ucs_status_t status; ++ status = ucp_put_nbi(ep, origin_addr, size, base + offset, win_info->rkey); ++ if (status == UCS_INPROGRESS) ++ MPIDI_UCX_WIN(win).target_sync[target_rank].need_sync = MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL; ++ else if (status == UCS_OK) ++ /* UCX 1.4 spec: completed immediately if returns UCS_OK. ++ * FIXME: is it local completion or remote ? Now we assume local, ++ * so we need flush to ensure remote completion.*/ ++ MPIDI_UCX_WIN(win).target_sync[target_rank].need_sync = MPIDI_UCX_WIN_SYNC_FLUSH; ++ else ++ MPIDI_UCX_CHK_STATUS(status); ++ goto fn_exit; ++ } ++#ifdef HAVE_UCP_PUT_NB /* ucp_put_nb is provided since UCX 1.4 */ ++ /* Put with request */ ++ ucp_request = ucp_put_nb(ep, origin_addr, size, base + offset, win_info->rkey, ++ MPIDI_UCX_rma_cmpl_cb); ++ if (ucp_request == UCS_OK) { ++ /* UCX 1.4 spec: completed immediately if returns UCS_OK. ++ * FIXME: is it local completion or remote ? Now we assume local, ++ * so we need flush to ensure remote completion.*/ ++ MPIDI_UCX_WIN(win).target_sync[target_rank].need_sync = MPIDI_UCX_WIN_SYNC_FLUSH; ++ } else { ++ MPIDI_UCX_CHK_REQUEST(ucp_request); ++ ++ /* Create an MPI request and return. The completion cb will complete ++ * the request and release ucp_request. */ ++ MPIR_Request *req = NULL; ++ req = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); ++ MPIR_ERR_CHKANDSTMT(req == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ MPIR_Request_add_ref(req); ++ ucp_request->req = req; ++ *reqptr = req; ++ ++ MPIDI_UCX_WIN(win).target_sync[target_rank].need_sync = MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL; ++ } ++#endif + + fn_exit: + return mpi_errno; +@@ -41,33 +92,29 @@ static inline int MPIDI_UCX_contig_put(const void *origin_addr, + goto fn_exit; + } + +-static inline int MPIDI_UCX_noncontig_put(const void *origin_addr, +- int origin_count, MPI_Datatype origin_datatype, +- int target_rank, size_t size, +- MPI_Aint target_disp, MPI_Aint true_lb, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_noncontig_put(const void *origin_addr, ++ int origin_count, MPI_Datatype origin_datatype, ++ int target_rank, size_t size, ++ MPI_Aint target_disp, MPI_Aint true_lb, ++ MPIR_Win * win, MPIDI_av_entry_t * addr, ++ MPIR_Request ** reqptr ATTRIBUTE((unused))) + { + MPIDI_UCX_win_info_t *win_info = &(MPIDI_UCX_WIN_INFO(win, target_rank)); +- MPI_Aint segment_first, last; + size_t base, offset; + int mpi_errno = MPI_SUCCESS; + ucs_status_t status; +- struct MPIR_Segment *segment_ptr; + char *buffer = NULL; +- MPIR_Comm *comm = win->comm_ptr; +- ucp_ep_h ep = MPIDI_UCX_COMM_TO_EP(comm, target_rank); +- +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "Send MPIR_Segment_alloc"); +- MPIR_Segment_init(origin_addr, origin_count, origin_datatype, segment_ptr); +- segment_first = 0; +- last = size; ++ ucp_ep_h ep = MPIDI_UCX_AV_TO_EP(addr); + + buffer = MPL_malloc(size, MPL_MEM_BUFFER); + MPIR_Assert(buffer); +- MPIR_Segment_pack(segment_ptr, segment_first, &last, buffer); +- MPIR_Segment_free(segment_ptr); ++ ++ MPI_Aint actual_pack_bytes; ++ mpi_errno = MPIR_Typerep_pack(origin_addr, origin_count, origin_datatype, 0, buffer, size, ++ &actual_pack_bytes); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Assert(actual_pack_bytes == size); + + base = win_info->addr; + offset = target_disp * win_info->disp + true_lb; +@@ -76,6 +123,9 @@ static inline int MPIDI_UCX_noncontig_put(const void *origin_addr, + status = ucp_put(ep, buffer, size, base + offset, win_info->rkey); + MPIDI_UCX_CHK_STATUS(status); + ++ /* Only need remote flush */ ++ MPIDI_UCX_WIN(win).target_sync[target_rank].need_sync = MPIDI_UCX_WIN_SYNC_FLUSH; ++ + fn_exit: + MPL_free(buffer); + return mpi_errno; +@@ -83,291 +133,423 @@ static inline int MPIDI_UCX_noncontig_put(const void *origin_addr, + goto fn_exit; + } + +-static inline int MPIDI_UCX_contig_get(void *origin_addr, +- size_t size, +- int target_rank, +- MPI_Aint target_disp, MPI_Aint true_lb, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_contig_get(void *origin_addr, ++ size_t size, ++ int target_rank, ++ MPI_Aint target_disp, MPI_Aint true_lb, ++ MPIR_Win * win, MPIDI_av_entry_t * addr, ++ MPIR_Request ** reqptr) + { + + MPIDI_UCX_win_info_t *win_info = &(MPIDI_UCX_WIN_INFO(win, target_rank)); + size_t base, offset; + int mpi_errno = MPI_SUCCESS; +- ucs_status_t status; +- MPIR_Comm *comm = win->comm_ptr; +- ucp_ep_h ep = MPIDI_UCX_COMM_TO_EP(comm, target_rank); ++ MPIDI_UCX_ucp_request_t *ucp_request ATTRIBUTE((unused)) = NULL; ++ ucp_ep_h ep = MPIDI_UCX_AV_TO_EP(addr); + + base = win_info->addr; + offset = target_disp * win_info->disp + true_lb; + +- status = ucp_get_nbi(ep, origin_addr, size, base + offset, win_info->rkey); +- if (status == UCS_INPROGRESS) +- MPIDI_UCX_WIN(win).need_local_flush = 1; +- else ++ /* Get without request */ ++ if (likely(!reqptr)) { ++ ucs_status_t status; ++ status = ucp_get_nbi(ep, origin_addr, size, base + offset, win_info->rkey); + MPIDI_UCX_CHK_STATUS(status); + ++ /* UCX 1.4 spec: ucp_get_nbi always returns immediately and does not ++ * guarantee completion */ ++ MPIDI_UCX_WIN(win).target_sync[target_rank].need_sync = MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL; ++ goto fn_exit; ++ } ++#ifdef HAVE_UCP_GET_NB /* ucp_get_nb is provided since UCX 1.4 */ ++ /* Get with request */ ++ ucp_request = ucp_get_nb(ep, origin_addr, size, base + offset, win_info->rkey, ++ MPIDI_UCX_rma_cmpl_cb); ++ if (ucp_request != UCS_OK) { ++ MPIDI_UCX_CHK_REQUEST(ucp_request); ++ ++ /* Create an MPI request and return. The completion cb will complete ++ * the request and release ucp_request. */ ++ MPIR_Request *req = NULL; ++ req = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); ++ MPIR_ERR_CHKANDSTMT(req == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ MPIR_Request_add_ref(req); ++ ucp_request->req = req; ++ *reqptr = req; ++ ++ MPIDI_UCX_WIN(win).target_sync[target_rank].need_sync = MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL; ++ } ++ /* otherwise completed immediately */ ++#endif ++ + fn_exit: + return mpi_errno; + fn_fail: + goto fn_exit; +- +- +- + } + +-static inline int MPIDI_NM_mpi_put(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, MPI_Datatype target_datatype, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_do_put(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, MPI_Datatype target_datatype, ++ MPIR_Win * win, MPIDI_av_entry_t * addr, ++ MPIR_Request ** reqptr) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_PUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_PUT); + int mpi_errno = MPI_SUCCESS; +- +-#ifdef MPICH_UCX_AM_ONLY +- mpi_errno = MPIDI_CH4U_mpi_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); +-#else +- + int target_contig, origin_contig; + size_t target_bytes, origin_bytes; + MPI_Aint origin_true_lb, target_true_lb; + size_t offset; +- if (win->create_flavor == MPI_WIN_FLAVOR_DYNAMIC || win->create_flavor == MPI_WIN_FLAVOR_SHARED +- || MPIDI_UCX_WIN_INFO(win, target_rank).rkey == NULL) +- return MPIDI_CH4U_mpi_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); +- +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); +- if (target_rank == MPI_PROC_NULL) +- goto fn_exit; + +- MPIDI_Datatype_check_contig_size_lb(target_datatype, target_count, +- target_contig, target_bytes, target_true_lb); +- MPIDI_Datatype_check_contig_size_lb(origin_datatype, origin_count, +- origin_contig, origin_bytes, origin_true_lb); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_DO_PUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_DO_PUT); + ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDI_Datatype_check_origin_target_contig_size_lb(origin_datatype, target_datatype, ++ origin_count, target_count, ++ origin_contig, target_contig, ++ origin_bytes, target_bytes, ++ origin_true_lb, target_true_lb); + MPIR_ERR_CHKANDJUMP((origin_bytes != target_bytes), mpi_errno, MPI_ERR_SIZE, "**rmasize"); + + if (unlikely(origin_bytes == 0)) + goto fn_exit; +- if (!target_contig) +- return MPIDI_CH4U_mpi_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); +- +- if (!origin_contig) +- return MPIDI_UCX_noncontig_put(origin_addr, origin_count, origin_datatype, target_rank, +- target_bytes, target_disp, target_true_lb, win, addr); + + if (target_rank == win->comm_ptr->rank) { + offset = win->disp_unit * target_disp; +- return MPIR_Localcopy(origin_addr, +- origin_count, +- origin_datatype, +- (char *) win->base + offset, target_count, target_datatype); ++ mpi_errno = MPIR_Localcopy(origin_addr, ++ origin_count, ++ origin_datatype, ++ (char *) win->base + offset, target_count, target_datatype); ++ goto fn_exit; + } + +- +- mpi_errno = MPIDI_UCX_contig_put((char *) origin_addr + origin_true_lb, origin_bytes, +- target_rank, target_disp, target_true_lb, win, addr); +-#endif ++ if (origin_contig && target_contig) { ++ mpi_errno = MPIDI_UCX_contig_put((char *) origin_addr + origin_true_lb, origin_bytes, ++ target_rank, target_disp, target_true_lb, win, addr, ++ reqptr); ++ } else if (target_contig) { ++ mpi_errno = MPIDI_UCX_noncontig_put(origin_addr, origin_count, origin_datatype, target_rank, ++ target_bytes, target_disp, target_true_lb, win, addr, ++ reqptr); ++ } else { ++ mpi_errno = MPIDIG_mpi_put(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win); ++ } + + fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_DO_PUT); + return mpi_errno; + fn_fail: + goto fn_exit; +- + } + +-static inline int MPIDI_NM_mpi_get(void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, MPI_Datatype target_datatype, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_do_get(void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, MPI_Datatype target_datatype, ++ MPIR_Win * win, MPIDI_av_entry_t * addr, ++ MPIR_Request ** reqptr) + { + int mpi_errno = MPI_SUCCESS; +- +-#ifdef MPICH_UCX_AM_ONLY +- mpi_errno = MPIDI_CH4U_mpi_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); +-#else + int origin_contig, target_contig; +- +- size_t origin_bytes, target_bytes; ++ size_t origin_bytes, target_bytes ATTRIBUTE((unused)); + size_t offset; +- + MPI_Aint origin_true_lb, target_true_lb; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_GET); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_GET); +- +- if (win->create_flavor == MPI_WIN_FLAVOR_DYNAMIC || win->create_flavor == MPI_WIN_FLAVOR_SHARED) +- return MPIDI_CH4U_mpi_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); + +- MPIDI_CH4U_EPOCH_CHECK_SYNC(win, mpi_errno, goto fn_fail); +- MPIDI_CH4U_EPOCH_OP_REFENCE(win); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_DO_GET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_DO_GET); + +- /* Check target sync status for any target_rank except PROC_NULL. */ +- if (target_rank == MPI_PROC_NULL) +- goto fn_exit; +- MPIDI_CH4U_EPOCH_CHECK_TARGET_SYNC(win, target_rank, mpi_errno, goto fn_fail); +- +- MPIDI_Datatype_check_contig_size_lb(target_datatype, target_count, +- target_contig, target_bytes, target_true_lb); +- MPIDI_Datatype_check_contig_size_lb(origin_datatype, origin_count, +- origin_contig, origin_bytes, origin_true_lb); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDI_Datatype_check_origin_target_contig_size_lb(origin_datatype, target_datatype, ++ origin_count, target_count, ++ origin_contig, target_contig, ++ origin_bytes, target_bytes, ++ origin_true_lb, target_true_lb); ++ MPIR_ERR_CHKANDJUMP((origin_bytes != target_bytes), mpi_errno, MPI_ERR_SIZE, "**rmasize"); + + if (unlikely(origin_bytes == 0)) + goto fn_exit; + +- +- if (!origin_contig || !target_contig || MPIDI_UCX_WIN_INFO(win, target_rank).rkey == NULL) +- return MPIDI_CH4U_mpi_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win); +- + if (target_rank == win->comm_ptr->rank) { + offset = target_disp * win->disp_unit; +- return MPIR_Localcopy((char *) win->base + offset, +- target_count, +- target_datatype, origin_addr, origin_count, origin_datatype); ++ mpi_errno = MPIR_Localcopy((char *) win->base + offset, ++ target_count, ++ target_datatype, origin_addr, origin_count, origin_datatype); ++ goto fn_exit; ++ } ++ ++ if (origin_contig && target_contig) { ++ mpi_errno = MPIDI_UCX_contig_get((char *) origin_addr + origin_true_lb, origin_bytes, ++ target_rank, target_disp, target_true_lb, win, addr, ++ reqptr); ++ } else { ++ mpi_errno = MPIDIG_mpi_get(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win); + } + ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_DO_GET); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_put(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, MPI_Datatype target_datatype, ++ MPIR_Win * win, MPIDI_av_entry_t * addr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_PUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_PUT); + +- return MPIDI_UCX_contig_get((char *) origin_addr + origin_true_lb, origin_bytes, +- target_rank, target_disp, target_true_lb, win, addr); ++#ifdef MPICH_UCX_AM_ONLY ++ mpi_errno = MPIDIG_mpi_put(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win); ++#else ++ if (!MPIDI_UCX_is_reachable_target(target_rank, win)) { ++ mpi_errno = MPIDIG_mpi_put(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win); ++ } else { ++ mpi_errno = MPIDI_UCX_do_put(origin_addr, origin_count, origin_datatype, ++ target_rank, target_disp, target_count, target_datatype, ++ win, addr, NULL); ++ } + #endif + + fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_PUT); + return mpi_errno; + fn_fail: + goto fn_exit; + + } + +-static inline int MPIDI_NM_mpi_rput(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPIR_Win * win, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_get(void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, MPI_Datatype target_datatype, ++ MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_rput(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, +- request); +-} ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_GET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_GET); + ++#ifdef MPICH_UCX_AM_ONLY ++ mpi_errno = MPIDIG_mpi_get(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win); ++#else ++ if (!MPIDI_UCX_is_reachable_target(target_rank, win)) { ++ mpi_errno = MPIDIG_mpi_get(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win); ++ } else { ++ mpi_errno = MPIDI_UCX_do_get(origin_addr, origin_count, origin_datatype, ++ target_rank, target_disp, target_count, target_datatype, ++ win, addr, NULL); ++ } ++#endif + +-static inline int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, +- const void *compare_addr, +- void *result_addr, +- MPI_Datatype datatype, +- int target_rank, MPI_Aint target_disp, +- MPIR_Win * win, MPIDI_av_entry_t * addr) +-{ +- return MPIDI_CH4U_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, +- datatype, target_rank, target_disp, win); +-} ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_GET); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + +-static inline int MPIDI_NM_mpi_raccumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- return MPIDI_CH4U_mpi_raccumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); + } + +-static inline int MPIDI_NM_mpi_rget_accumulate(const void *origin_addr, ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rput(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +- void *result_addr, +- int result_count, +- MPI_Datatype result_datatype, + int target_rank, + MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, ++ MPIR_Win * win, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- return MPIDI_CH4U_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_RGET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_RGET); ++ ++ /* request based PUT relies on UCX 1.4 function ucp_put_nb */ ++#if defined(MPICH_UCX_AM_ONLY) || !defined(HAVE_UCP_PUT_NB) ++ mpi_errno = MPIDIG_mpi_rput(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win, request); ++#else ++ if (!MPIDI_UCX_is_reachable_target(target_rank, win)) { ++ mpi_errno = MPIDIG_mpi_rput(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win, request); ++ } else { ++ MPIR_Request *sreq = NULL; ++ ++ mpi_errno = MPIDI_UCX_do_put(origin_addr, origin_count, origin_datatype, ++ target_rank, target_disp, target_count, target_datatype, ++ win, addr, &sreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (sreq == NULL) { ++ /* create a completed request for user if issuing is completed immediately. */ ++ sreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); ++ MPIR_ERR_CHKANDSTMT((sreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, ++ "**nomemreq"); ++ } ++ *request = sreq; ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_RGET); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + +-static inline int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, +- void *result_addr, +- MPI_Datatype datatype, +- int target_rank, +- MPI_Aint target_disp, MPI_Op op, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_compare_and_swap(const void *origin_addr, ++ const void *compare_addr, ++ void *result_addr, ++ MPI_Datatype datatype, ++ int target_rank, MPI_Aint target_disp, ++ MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_fetch_and_op(origin_addr, result_addr, datatype, +- target_rank, target_disp, op, win); ++ return MPIDIG_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, datatype, ++ target_rank, target_disp, win); + } + ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_raccumulate(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, ++ MPI_Datatype target_datatype, ++ MPI_Op op, MPIR_Win * win, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) ++{ ++ return MPIDIG_mpi_raccumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win, request); ++} + +-static inline int MPIDI_NM_mpi_rget(void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPIR_Win * win, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rget_accumulate(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ void *result_addr, ++ int result_count, ++ MPI_Datatype result_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, ++ MPI_Datatype target_datatype, ++ MPI_Op op, MPIR_Win * win, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDI_CH4U_mpi_rget(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, +- request); ++ return MPIDIG_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, result_addr, ++ result_count, result_datatype, target_rank, target_disp, ++ target_count, target_datatype, op, win, request); + } + ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_fetch_and_op(const void *origin_addr, ++ void *result_addr, ++ MPI_Datatype datatype, ++ int target_rank, ++ MPI_Aint target_disp, MPI_Op op, ++ MPIR_Win * win, MPIDI_av_entry_t * addr) ++{ ++ return MPIDIG_mpi_fetch_and_op(origin_addr, result_addr, datatype, target_rank, target_disp, op, ++ win); ++} + +-static inline int MPIDI_NM_mpi_get_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- void *result_addr, +- int result_count, +- MPI_Datatype result_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, MPI_Op op, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rget(void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, ++ MPI_Datatype target_datatype, ++ MPIR_Win * win, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_RGET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_RGET); ++ ++ /* request based GET relies on UCX 1.4 function ucp_get_nb */ ++#if defined(MPICH_UCX_AM_ONLY) || !defined(HAVE_UCP_GET_NB) ++ mpi_errno = MPIDIG_mpi_rget(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win, request); ++#else ++ if (!MPIDI_UCX_is_reachable_target(target_rank, win)) { ++ mpi_errno = MPIDIG_mpi_rget(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win, request); ++ } else { ++ MPIR_Request *sreq = NULL; ++ ++ mpi_errno = MPIDI_UCX_do_get(origin_addr, origin_count, origin_datatype, ++ target_rank, target_disp, target_count, target_datatype, ++ win, addr, &sreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (sreq == NULL) { ++ /* create a completed request for user if issuing is completed immediately. */ ++ sreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); ++ MPIR_ERR_CHKANDSTMT((sreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, ++ "**nomemreq"); ++ } ++ *request = sreq; ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_RGET); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_get_accumulate(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ void *result_addr, ++ int result_count, ++ MPI_Datatype result_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, ++ MPI_Datatype target_datatype, MPI_Op op, ++ MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win); ++ return MPIDIG_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, result_addr, ++ result_count, result_datatype, target_rank, target_disp, ++ target_count, target_datatype, op, win); + } + +-static inline int MPIDI_NM_mpi_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, MPI_Op op, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_accumulate(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, ++ MPI_Datatype target_datatype, MPI_Op op, ++ MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4U_mpi_accumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, op, +- win); ++ return MPIDIG_mpi_accumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win); + } + + #endif /* UCX_RMA_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/ucx_send.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_send.h +@@ -12,11 +12,7 @@ + #include "ucx_impl.h" + #include "ucx_types.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_UCX_send_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_UCX_send_cmpl_cb(void *request, ucs_status_t status) ++MPL_STATIC_INLINE_PREFIX void MPIDI_UCX_send_cmpl_cb(void *request, ucs_status_t status) + { + MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request; + MPIR_Request *req = ucp_request->req; +@@ -26,26 +22,22 @@ static inline void MPIDI_UCX_send_cmpl_cb(void *request, ucs_status_t status) + + if (unlikely(status == UCS_ERR_CANCELED)) + MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE); +- MPIDI_CH4U_request_complete(req); ++ MPIDIU_request_complete(req); + ucp_request->req = NULL; + ucp_request_release(ucp_request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_UCX_SEND_CMPL_CB); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_UCX_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_UCX_send(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- MPIDI_av_entry_t * addr, +- MPIR_Request ** request, int have_request, int is_sync) ++MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_send(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, ++ int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request, int have_request, int is_sync) + { + int dt_contig; + size_t data_sz; +@@ -103,13 +95,7 @@ static inline int MPIDI_UCX_send(const void *buf, + } else if (req != NULL) { + MPIR_cc_set(&req->cc, 0); + } else if (have_request) { +-#ifndef HAVE_DEBUGGER_SUPPORT +- req = MPIDI_UCX_global.lw_send_req; +- MPIR_Request_add_ref(req); +-#else +- req = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +- MPIR_cc_set(&req->cc, 0); +-#endif ++ req = MPIR_Request_create_complete(MPIR_REQUEST_KIND__SEND); + } + *request = req; + +@@ -120,135 +106,107 @@ static inline int MPIDI_UCX_send(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_send(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + return MPIDI_UCX_send(buf, count, datatype, rank, tag, comm, context_offset, + addr, request, 0, 0); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ssend(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ssend(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + return MPIDI_UCX_send(buf, count, datatype, rank, tag, comm, context_offset, + addr, request, 0, 1); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_send_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_send_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_send_init(const void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_ssend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_ssend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ssend_init(const void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_bsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_bsend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bsend_init(const void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_rsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_rsend_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_rsend_init(const void *buf, ++ int count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- return MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ return MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, ++ context_offset, addr, request); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_isend(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_isend(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + return MPIDI_UCX_send(buf, count, datatype, rank, tag, comm, context_offset, + addr, request, 1, 0); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_issend(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_issend(const void *buf, ++ MPI_Aint count, ++ MPI_Datatype datatype, ++ int rank, ++ int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { + return MPIDI_UCX_send(buf, count, datatype, rank, tag, comm, context_offset, + addr, request, 1, 1); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_cancel_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_cancel_send(MPIR_Request * sreq) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_cancel_send(MPIR_Request * sreq) + { + if (!MPIR_Request_is_complete(sreq)) { + ucp_request_cancel(MPIDI_UCX_global.worker, MPIDI_UCX_REQ(sreq).a.ucp_request); +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx_spawn.c +@@ -0,0 +1,78 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2016 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Mellanox Technologies Ltd. ++ * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED ++ */ ++ ++#include "mpidimpl.h" ++#include "ucx_impl.h" ++ ++int MPIDI_UCX_mpi_open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++ ++} ++ ++int MPIDI_UCX_mpi_close_port(const char *port_name) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++ ++} ++ ++int MPIDI_UCX_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++ ++ ++ ++} ++ ++int MPIDI_UCX_mpi_comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_COMM_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_COMM_DISCONNECT); ++ ++ ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_COMM_DISCONNECT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_UCX_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, ++ MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_COMM_ACCEPT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_COMM_ACCEPT); ++ ++ ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_COMM_ACCEPT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/netmod/ucx/ucx_spawn.h ++++ /dev/null +@@ -1,104 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Mellanox Technologies Ltd. +- * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED +- */ +-#ifndef UCX_SPAWN_H_INCLUDED +-#define UCX_SPAWN_H_INCLUDED +- +-#include "ucx_impl.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_netmod_comm_open_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- int mpi_errno = MPI_SUCCESS; +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +- +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_netmod_comm_close_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_close_port(const char *port_name) +-{ +- int mpi_errno = MPI_SUCCESS; +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +- +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_connect(const char *port_name, +- MPIR_Info * info, +- int root, int timeout, +- MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +- +- +- +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_comm_disconnect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_COMM_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_COMM_DISCONNECT); +- +- +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_COMM_DISCONNECT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_netmod_comm_close_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_comm_accept(const char *port_name, +- MPIR_Info * info, +- int root, MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_COMM_ACCEPT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_COMM_ACCEPT); +- +- +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_COMM_ACCEPT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#endif /* UCX_SPAWN_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/ucx_startall.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_startall.h +@@ -13,13 +13,14 @@ + #include "ucx_impl.h" + #include "ucx_types.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_NM_mpi_startall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_NM_mpi_startall(int count, MPIR_Request * requests[]) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_startall(int count, MPIR_Request * requests[]) + { + return MPIDIG_mpi_startall(count, requests); + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_NM_prequest_free_hook(MPIR_Request * req) ++{ ++ MPIDIG_prequest_free_hook(req); ++} ++ + #endif /* UCX_STARTALL_H_INCLUDED */ +--- a/src/mpid/ch4/netmod/ucx/ucx_types.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_types.h +@@ -36,7 +36,6 @@ typedef struct { + char kvsname[MPIDI_UCX_KVSAPPSTRLEN]; + char pname[MPI_MAX_PROCESSOR_NAME]; + int max_addr_len; +- MPIR_Request *lw_send_req; + } MPIDI_UCX_global_t; + + #define MPIDI_UCX_AV(av) ((av)->netmod.ucx) +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/netmod/ucx/ucx_win.c +@@ -0,0 +1,309 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2016 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Mellanox Technologies Ltd. ++ * Copyright (C) Mellanox Technologies Ltd. 2016. ALL RIGHTS RESERVED ++ */ ++ ++#include "mpidimpl.h" ++#include "ucx_impl.h" ++ ++struct ucx_share { ++ int disp; ++ MPI_Aint addr; ++}; ++ ++static int win_allgather(MPIR_Win * win, size_t length, uint32_t disp_unit, void **base_ptr); ++static int win_init(MPIR_Win * win); ++ ++static int win_allgather(MPIR_Win * win, size_t length, uint32_t disp_unit, void **base_ptr) ++{ ++ ++ MPIR_Errflag_t err = MPIR_ERR_NONE; ++ int mpi_errno = MPI_SUCCESS; ++ int rank = 0; ++ ucs_status_t status; ++ ucp_mem_h mem_h; ++ int cntr = 0; ++ size_t rkey_size = 0; ++ int *rkey_sizes = NULL, *recv_disps = NULL, i; ++ char *rkey_buffer = NULL, *rkey_recv_buff = NULL; ++ struct ucx_share *share_data = NULL; ++ ucp_mem_map_params_t mem_map_params; ++ ucp_mem_attr_t mem_attr; ++ MPIR_Comm *comm_ptr = win->comm_ptr; ++ ++ ucp_context_h ucp_context = MPIDI_UCX_global.context; ++ ++ MPIDI_UCX_WIN(win).info_table = ++ MPL_malloc(sizeof(MPIDI_UCX_win_info_t) * comm_ptr->local_size, MPL_MEM_OTHER); ++ ++ /* Only non-zero region maps to device. */ ++ rkey_size = 0; ++ if (length > 0) { ++ mem_map_params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | ++ UCP_MEM_MAP_PARAM_FIELD_LENGTH | UCP_MEM_MAP_PARAM_FIELD_FLAGS; ++ ++ mem_map_params.address = *base_ptr; ++ mem_map_params.length = length; ++ mem_map_params.flags = 0; ++ ++ if (*base_ptr == NULL) ++ mem_map_params.flags |= UCP_MEM_MAP_ALLOCATE; ++ ++ status = ucp_mem_map(MPIDI_UCX_global.context, &mem_map_params, &mem_h); ++ MPIDI_UCX_CHK_STATUS(status); ++ ++ /* query allocated address. */ ++ mem_attr.field_mask = UCP_MEM_ATTR_FIELD_ADDRESS | UCP_MEM_ATTR_FIELD_LENGTH; ++ status = ucp_mem_query(mem_h, &mem_attr); ++ MPIDI_UCX_CHK_STATUS(status); ++ ++ *base_ptr = mem_attr.address; ++ MPIR_Assert(mem_attr.length >= length); ++ ++ MPIDI_UCX_WIN(win).mem_h = mem_h; ++ ++ /* pack the key */ ++ status = ucp_rkey_pack(ucp_context, mem_h, (void **) &rkey_buffer, &rkey_size); ++ ++ MPIDI_UCX_CHK_STATUS(status); ++ } ++ ++ rkey_sizes = (int *) MPL_malloc(sizeof(int) * comm_ptr->local_size, MPL_MEM_OTHER); ++ rkey_sizes[comm_ptr->rank] = (int) rkey_size; ++ mpi_errno = MPIR_Allgather(MPI_IN_PLACE, 1, MPI_INT, rkey_sizes, 1, MPI_INT, comm_ptr, &err); ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ recv_disps = (int *) MPL_malloc(sizeof(int) * comm_ptr->local_size, MPL_MEM_OTHER); ++ ++ ++ for (i = 0; i < comm_ptr->local_size; i++) { ++ recv_disps[i] = cntr; ++ cntr += rkey_sizes[i]; ++ } ++ ++ rkey_recv_buff = MPL_malloc(cntr, MPL_MEM_OTHER); ++ ++ /* allgather */ ++ mpi_errno = MPIR_Allgatherv(rkey_buffer, rkey_size, MPI_BYTE, ++ rkey_recv_buff, rkey_sizes, recv_disps, MPI_BYTE, comm_ptr, &err); ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* If we use the shared memory support in UCX, we have to distinguish between local ++ * and remote windows (at least now). If win_create is used, the key cannot be unpackt - ++ * then we need our fallback-solution */ ++ ++ for (i = 0; i < comm_ptr->local_size; i++) { ++ /* Skip zero-size remote region. */ ++ if (rkey_sizes[i] == 0) { ++ MPIDI_UCX_WIN_INFO(win, i).rkey = NULL; ++ continue; ++ } ++ ++ status = ucp_ep_rkey_unpack(MPIDI_UCX_COMM_TO_EP(comm_ptr, i), ++ &rkey_recv_buff[recv_disps[i]], ++ &(MPIDI_UCX_WIN_INFO(win, i).rkey)); ++ if (status == UCS_ERR_UNREACHABLE) { ++ MPIDI_UCX_WIN_INFO(win, i).rkey = NULL; ++ } else ++ MPIDI_UCX_CHK_STATUS(status); ++ } ++ share_data = MPL_malloc(comm_ptr->local_size * sizeof(struct ucx_share), MPL_MEM_OTHER); ++ ++ share_data[comm_ptr->rank].disp = disp_unit; ++ share_data[comm_ptr->rank].addr = (MPI_Aint) * base_ptr; ++ ++ mpi_errno = ++ MPIR_Allgather(MPI_IN_PLACE, sizeof(struct ucx_share), MPI_BYTE, share_data, ++ sizeof(struct ucx_share), MPI_BYTE, comm_ptr, &err); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ for (i = 0; i < comm_ptr->local_size; i++) { ++ MPIDI_UCX_WIN_INFO(win, i).disp = share_data[i].disp; ++ MPIDI_UCX_WIN_INFO(win, i).addr = share_data[i].addr; ++ } ++ ++ MPIDI_UCX_WIN(win).target_sync = ++ MPL_malloc(sizeof(MPIDI_UCX_win_target_sync_t) * comm_ptr->local_size, MPL_MEM_RMA); ++ MPIR_Assert(MPIDI_UCX_WIN(win).target_sync); ++ for (rank = 0; rank < win->comm_ptr->local_size; rank++) ++ MPIDI_UCX_WIN(win).target_sync[rank].need_sync = MPIDI_UCX_WIN_SYNC_UNSET; ++ ++ fn_exit: ++ /* buffer release */ ++ if (rkey_buffer) ++ ucp_rkey_buffer_release(rkey_buffer); ++ /* free temps */ ++ MPL_free(share_data); ++ MPL_free(rkey_sizes); ++ MPL_free(recv_disps); ++ MPL_free(rkey_recv_buff); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int win_init(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_UCX_WIN_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_UCX_WIN_INIT); ++ ++ memset(&MPIDI_UCX_WIN(win), 0, sizeof(MPIDI_UCX_win_t)); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CH4_UCX_PROGRESS_WIN_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_UCX_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ return MPIDIG_mpi_win_set_info(win, info); ++} ++ ++int MPIDI_UCX_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ return MPIDIG_mpi_win_get_info(win, info_p_p); ++} ++ ++int MPIDI_UCX_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ return MPIDIG_mpi_win_free(win_ptr); ++} ++ ++int MPIDI_UCX_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ return MPIDIG_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++} ++ ++int MPIDI_UCX_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ return MPIDIG_mpi_win_attach(win, base, size); ++} ++ ++int MPIDI_UCX_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ return MPIDIG_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr, win_ptr); ++} ++ ++int MPIDI_UCX_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ return MPIDIG_mpi_win_detach(win, base); ++} ++ ++int MPIDI_UCX_mpi_win_allocate(MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, void *baseptr, MPIR_Win ** win_ptr) ++{ ++ return MPIDIG_mpi_win_allocate(length, disp_unit, info, comm_ptr, baseptr, win_ptr); ++} ++ ++int MPIDI_UCX_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win) ++{ ++ return MPIDIG_mpi_win_create_dynamic(info, comm, win); ++} ++ ++int MPIDI_UCX_mpi_win_create_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_WIN_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_WIN_CREATE_HOOK); ++ ++#ifndef MPICH_UCX_AM_ONLY ++ mpi_errno = win_init(win); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ mpi_errno = win_allgather(win, win->size, win->disp_unit, &win->base); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_WIN_CREATE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_UCX_mpi_win_allocate_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_WIN_ALLOCATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_WIN_ALLOCATE_HOOK); ++ ++#ifndef MPICH_UCX_AM_ONLY ++ mpi_errno = win_init(win); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ mpi_errno = win_allgather(win, win->size, win->disp_unit, &win->base); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_WIN_ALLOCATE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_UCX_mpi_win_allocate_shared_hook(MPIR_Win * win) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_UCX_mpi_win_create_dynamic_hook(MPIR_Win * win) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_UCX_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_UCX_mpi_win_detach_hook(MPIR_Win * win, const void *base) ++{ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_UCX_mpi_win_free_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_WIN_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_WIN_FREE_HOOK); ++ ++#ifndef MPICH_UCX_AM_ONLY ++ if (MPIDI_UCX_is_reachable_win(win)) { ++ int i; ++ for (i = 0; i < win->comm_ptr->local_size; i++) { ++ if (MPIDI_UCX_WIN_INFO(win, i).rkey) { ++ ucp_rkey_destroy(MPIDI_UCX_WIN_INFO(win, i).rkey); ++ } ++ } ++ ++ if (win->size > 0) ++ ucp_mem_unmap(MPIDI_UCX_global.context, MPIDI_UCX_WIN(win).mem_h); ++ MPL_free(MPIDI_UCX_WIN(win).info_table); ++ MPL_free(MPIDI_UCX_WIN(win).target_sync); ++ } ++#endif ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_WIN_FREE_HOOK); ++ return mpi_errno; ++} +--- a/src/mpid/ch4/netmod/ucx/ucx_win.h ++++ b/src/mpid/ch4/netmod/ucx/ucx_win.h +@@ -10,393 +10,121 @@ + #define UCX_WIN_H_INCLUDED + + #include "ucx_impl.h" +-struct _UCX_share { +- int disp; +- MPI_Aint addr; +-}; + +-static inline int MPIDI_UCX_Win_allgather(MPIR_Win * win, size_t length, +- uint32_t disp_unit, void **base_ptr) ++MPL_STATIC_INLINE_PREFIX bool MPIDI_UCX_win_need_flush(MPIR_Win * win) + { +- +- MPIR_Errflag_t err = MPIR_ERR_NONE; +- int mpi_errno = MPI_SUCCESS; +- ucs_status_t status; +- ucp_mem_h mem_h; +- int cntr = 0; +- size_t rkey_size = 0; +- int *rkey_sizes = NULL, *recv_disps = NULL, i; +- char *rkey_buffer = NULL, *rkey_recv_buff = NULL; +- struct _UCX_share *share_data = NULL; +- ucp_mem_map_params_t mem_map_params; +- ucp_mem_attr_t mem_attr; +- MPIR_Comm *comm_ptr = win->comm_ptr; +- +- ucp_context_h ucp_context = MPIDI_UCX_global.context; +- +- MPIDI_UCX_WIN(win).info_table = +- MPL_malloc(sizeof(MPIDI_UCX_win_info_t) * comm_ptr->local_size, MPL_MEM_OTHER); +- +- /* Only non-zero region maps to device. */ +- rkey_size = 0; +- if (length > 0) { +- mem_map_params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | +- UCP_MEM_MAP_PARAM_FIELD_LENGTH | UCP_MEM_MAP_PARAM_FIELD_FLAGS; +- +- mem_map_params.address = *base_ptr; +- mem_map_params.length = length; +- mem_map_params.flags = 0; +- +- if (*base_ptr == NULL) +- mem_map_params.flags |= UCP_MEM_MAP_ALLOCATE; +- +- status = ucp_mem_map(MPIDI_UCX_global.context, &mem_map_params, &mem_h); +- MPIDI_UCX_CHK_STATUS(status); +- +- /* query allocated address. */ +- mem_attr.field_mask = UCP_MEM_ATTR_FIELD_ADDRESS | UCP_MEM_ATTR_FIELD_LENGTH; +- status = ucp_mem_query(mem_h, &mem_attr); +- MPIDI_UCX_CHK_STATUS(status); +- +- *base_ptr = mem_attr.address; +- MPIR_Assert(mem_attr.length >= length); +- +- MPIDI_UCX_WIN(win).mem_h = mem_h; +- +- /* pack the key */ +- status = ucp_rkey_pack(ucp_context, mem_h, (void **) &rkey_buffer, &rkey_size); +- +- MPIDI_UCX_CHK_STATUS(status); +- } +- +- rkey_sizes = (int *) MPL_malloc(sizeof(int) * comm_ptr->local_size, MPL_MEM_OTHER); +- rkey_sizes[comm_ptr->rank] = (int) rkey_size; +- mpi_errno = MPIR_Allgather(MPI_IN_PLACE, 1, MPI_INT, rkey_sizes, 1, MPI_INT, comm_ptr, &err); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- recv_disps = (int *) MPL_malloc(sizeof(int) * comm_ptr->local_size, MPL_MEM_OTHER); +- +- +- for (i = 0; i < comm_ptr->local_size; i++) { +- recv_disps[i] = cntr; +- cntr += rkey_sizes[i]; +- } +- +- rkey_recv_buff = MPL_malloc(cntr, MPL_MEM_OTHER); +- +- /* allgather */ +- mpi_errno = MPIR_Allgatherv(rkey_buffer, rkey_size, MPI_BYTE, +- rkey_recv_buff, rkey_sizes, recv_disps, MPI_BYTE, comm_ptr, &err); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* If we use the shared memory support in UCX, we have to distinguish between local +- * and remote windows (at least now). If win_create is used, the key cannot be unpackt - +- * then we need our fallback-solution */ +- +- for (i = 0; i < comm_ptr->local_size; i++) { +- /* Skip zero-size remote region. */ +- if (rkey_sizes[i] == 0) { +- MPIDI_UCX_WIN_INFO(win, i).rkey = NULL; +- continue; +- } +- +- status = ucp_ep_rkey_unpack(MPIDI_UCX_COMM_TO_EP(comm_ptr, i), +- &rkey_recv_buff[recv_disps[i]], +- &(MPIDI_UCX_WIN_INFO(win, i).rkey)); +- if (status == UCS_ERR_UNREACHABLE) { +- MPIDI_UCX_WIN_INFO(win, i).rkey = NULL; +- } else +- MPIDI_UCX_CHK_STATUS(status); +- } +- share_data = MPL_malloc(comm_ptr->local_size * sizeof(struct _UCX_share), MPL_MEM_OTHER); +- +- share_data[comm_ptr->rank].disp = disp_unit; +- share_data[comm_ptr->rank].addr = (MPI_Aint) * base_ptr; +- +- mpi_errno = +- MPIR_Allgather(MPI_IN_PLACE, sizeof(struct _UCX_share), MPI_BYTE, share_data, +- sizeof(struct _UCX_share), MPI_BYTE, comm_ptr, &err); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- for (i = 0; i < comm_ptr->local_size; i++) { +- MPIDI_UCX_WIN_INFO(win, i).disp = share_data[i].disp; +- MPIDI_UCX_WIN_INFO(win, i).addr = share_data[i].addr; +- } +- MPIDI_UCX_WIN(win).need_local_flush = 0; +- fn_exit: +- /* buffer release */ +- if (rkey_buffer) +- ucp_rkey_buffer_release(rkey_buffer); +- /* free temps */ +- MPL_free(share_data); +- MPL_free(rkey_sizes); +- MPL_free(recv_disps); +- MPL_free(rkey_recv_buff); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +- ++ int rank; ++ bool need_flush = false; ++ /* including cases where FLUSH_LOCAL or FLUSH is set */ ++ for (rank = 0; rank < win->comm_ptr->local_size; rank++) ++ need_flush |= ++ (MPIDI_UCX_WIN(win).target_sync[rank].need_sync >= MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL); ++ return need_flush; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_UCX_Win_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_UCX_Win_init(MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX bool MPIDI_UCX_win_need_flush_local(MPIR_Win * win) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_UCX_WIN_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_UCX_WIN_INIT); +- +- memset(&MPIDI_UCX_WIN(win), 0, sizeof(MPIDI_UCX_win_t)); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CH4_UCX_PROGRESS_WIN_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +- +-} +- +-static inline int MPIDI_NM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- return MPIDI_CH4R_mpi_win_set_info(win, info); +-} +- +- +-static inline int MPIDI_NM_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_start(group, assert, win); +-} +- +- +-static inline int MPIDI_NM_mpi_win_complete(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_complete(win); +-} +- +-static inline int MPIDI_NM_mpi_win_post(MPIR_Group * group, int assert, MPIR_Win * win) +-{ +- +- return MPIDI_CH4R_mpi_win_post(group, assert, win); +-} +- +- +-static inline int MPIDI_NM_mpi_win_wait(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_wait(win); ++ int rank; ++ bool need_flush_local = false; ++ for (rank = 0; rank < win->comm_ptr->local_size; rank++) ++ need_flush_local |= ++ (MPIDI_UCX_WIN(win).target_sync[rank].need_sync == MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL); ++ return need_flush_local; + } + +- +-static inline int MPIDI_NM_mpi_win_test(MPIR_Win * win, int *flag) ++MPL_STATIC_INLINE_PREFIX void MPIDI_UCX_win_unset_sync(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_test(win, flag); ++ int rank; ++ for (rank = 0; rank < win->comm_ptr->local_size; rank++) ++ MPIDI_UCX_WIN(win).target_sync[rank].need_sync = MPIDI_UCX_WIN_SYNC_UNSET; + } + +-static inline int MPIDI_NM_mpi_win_lock(int lock_type, int rank, int assert, +- MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_lock(lock_type, rank, assert, win); ++ return MPIDIG_mpi_win_start(group, assert, win); + } + +- +-static inline int MPIDI_NM_mpi_win_unlock(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_complete(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_unlock(rank, win); ++ return MPIDIG_mpi_win_complete(win); + } + +-static inline int MPIDI_NM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_post(MPIR_Group * group, int assert, MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_get_info(win, info_p_p); ++ return MPIDIG_mpi_win_post(group, assert, win); + } + + +-static inline int MPIDI_NM_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- return MPIDI_CH4R_mpi_win_free(win_ptr); +-} +- +-static inline int MPIDI_NM_mpi_win_fence(int assert, MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_wait(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_fence(assert, win); ++ return MPIDIG_mpi_win_wait(win); + } + +-static inline int MPIDI_NM_mpi_win_create(void *base, +- MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_test(MPIR_Win * win, int *flag) + { +- return MPIDI_CH4R_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++ return MPIDIG_mpi_win_test(win, flag); + } + +-static inline int MPIDI_NM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_lock(int lock_type, int rank, int assert, ++ MPIR_Win * win, MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4R_mpi_win_attach(win, base, size); ++ return MPIDIG_mpi_win_lock(lock_type, rank, assert, win); + } + +-static inline int MPIDI_NM_mpi_win_allocate_shared(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_unlock(int rank, MPIR_Win * win, ++ MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4R_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr, +- win_ptr); ++ return MPIDIG_mpi_win_unlock(rank, win); + } + +-static inline int MPIDI_NM_mpi_win_detach(MPIR_Win * win, const void *base) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_fence(int assert, MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_detach(win, base); ++ return MPIDIG_mpi_win_fence(assert, win); + } + +-static inline int MPIDI_NM_mpi_win_shared_query(MPIR_Win * win, +- int rank, +- MPI_Aint * size, int *disp_unit, void *baseptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_shared_query(MPIR_Win * win, ++ int rank, ++ MPI_Aint * size, int *disp_unit, ++ void *baseptr) + { +- return MPIDI_CH4R_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); ++ return MPIDIG_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); + } + +-static inline int MPIDI_NM_mpi_win_allocate(MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, +- MPIR_Comm * comm_ptr, void *baseptr, +- MPIR_Win ** win_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush(int rank, MPIR_Win * win, ++ MPIDI_av_entry_t * addr) + { +- +- return MPIDI_CH4R_mpi_win_allocate(length, disp_unit, info, comm_ptr, baseptr, win_ptr); ++ return MPIDIG_mpi_win_flush(rank, win); + } + +-static inline int MPIDI_NM_mpi_win_flush(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush_local_all(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_flush(rank, win); ++ return MPIDIG_mpi_win_flush_local_all(win); + } + +-static inline int MPIDI_NM_mpi_win_flush_local_all(MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_unlock_all(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_flush_local_all(win); ++ return MPIDIG_mpi_win_unlock_all(win); + } + +-static inline int MPIDI_NM_mpi_win_unlock_all(MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush_local(int rank, MPIR_Win * win, ++ MPIDI_av_entry_t * addr) + { +- return MPIDI_CH4R_mpi_win_unlock_all(win); ++ return MPIDIG_mpi_win_flush_local(rank, win); + } + +-static inline int MPIDI_NM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_sync(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_create_dynamic(info, comm, win); ++ return MPIDIG_mpi_win_sync(win); + } + +-static inline int MPIDI_NM_mpi_win_flush_local(int rank, MPIR_Win * win, MPIDI_av_entry_t * addr) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_flush_all(MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_flush_local(rank, win); ++ return MPIDIG_mpi_win_flush_all(win); + } + +-static inline int MPIDI_NM_mpi_win_sync(MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_lock_all(int assert, MPIR_Win * win) + { +- return MPIDI_CH4R_mpi_win_sync(win); +-} +- +-static inline int MPIDI_NM_mpi_win_flush_all(MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_flush_all(win); +-} +- +-static inline int MPIDI_NM_mpi_win_lock_all(int assert, MPIR_Win * win) +-{ +- return MPIDI_CH4R_mpi_win_lock_all(assert, win); +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_WIN_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_WIN_CREATE_HOOK); +- +-#ifndef MPICH_UCX_AM_ONLY +- mpi_errno = MPIDI_UCX_Win_init(win); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- mpi_errno = MPIDI_UCX_Win_allgather(win, win->size, win->disp_unit, &win->base); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_WIN_CREATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_WIN_ALLOCATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_WIN_ALLOCATE_HOOK); +- +-#ifndef MPICH_UCX_AM_ONLY +- mpi_errno = MPIDI_UCX_Win_init(win); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- mpi_errno = MPIDI_UCX_Win_allgather(win, win->size, win->disp_unit, &win->base); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_WIN_ALLOCATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_allocate_shared_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_create_dynamic_hook(MPIR_Win * win) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_detach_hook(MPIR_Win * win, const void *base) +-{ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_win_free_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_WIN_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_WIN_FREE_HOOK); +- +-#ifndef MPICH_UCX_AM_ONLY +- if (win->create_flavor != MPI_WIN_FLAVOR_SHARED && win->create_flavor != MPI_WIN_FLAVOR_DYNAMIC) { +- if (win->size > 0) +- ucp_mem_unmap(MPIDI_UCX_global.context, MPIDI_UCX_WIN(win).mem_h); +- MPL_free(MPIDI_UCX_WIN(win).info_table); +- } +-#endif +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_WIN_FREE_HOOK); +- return mpi_errno; ++ return MPIDIG_mpi_win_lock_all(assert, win); + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_cmpl_hook(MPIR_Win * win) +@@ -406,11 +134,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_cmpl_hook(MPIR_Win * win) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_WIN_CMPL_HOOK); + + #ifndef MPICH_UCX_AM_ONLY +- ucs_status_t ucp_status; +- +- /* maybe we just flush all eps here? More efficient for smaller communicators... */ +- ucp_status = ucp_worker_flush(MPIDI_UCX_global.worker); +- MPIDI_UCX_CHK_STATUS(ucp_status); ++ if (MPIDI_UCX_is_reachable_win(win) && MPIDI_UCX_win_need_flush(win)) { ++ ucs_status_t ucp_status; ++ /* maybe we just flush all eps here? More efficient for smaller communicators... */ ++ ucp_status = ucp_worker_flush(MPIDI_UCX_global.worker); ++ MPIDI_UCX_CHK_STATUS(ucp_status); ++ MPIDI_UCX_win_unset_sync(win); ++ } + #endif + + fn_exit: +@@ -427,14 +157,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_win_local_cmpl_hook(MPIR_Win * win) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_WIN_LOCAL_CMPL_HOOK); + + #ifndef MPICH_UCX_AM_ONLY +- ucs_status_t ucp_status; ++ if (MPIDI_UCX_is_reachable_win(win) && MPIDI_UCX_win_need_flush_local(win)) { ++ ucs_status_t ucp_status; + +- /* currently, UCP does not support local flush, so we have to call +- * a global flush. This is not good for performance - but OK for now */ +- if (MPIDI_UCX_WIN(win).need_local_flush == 1) { ++ /* currently, UCP does not support local flush, so we have to call ++ * a global flush. This is not good for performance - but OK for now */ + ucp_status = ucp_worker_flush(MPIDI_UCX_global.worker); + MPIDI_UCX_CHK_STATUS(ucp_status); +- MPIDI_UCX_WIN(win).need_local_flush = 0; ++ ++ /* TODO: should set to FLUSH after replace with real local flush. */ ++ MPIDI_UCX_win_unset_sync(win); + } + #endif + +@@ -452,13 +184,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_target_cmpl_hook(int rank, MPIR_Win * + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_TARGET_CMPL_HOOK); + + #ifndef MPICH_UCX_AM_ONLY +- ucs_status_t ucp_status; ++ if (MPIDI_UCX_is_reachable_target(rank, win) && ++ /* including cases where FLUSH_LOCAL or FLUSH is set */ ++ MPIDI_UCX_WIN(win).target_sync[rank].need_sync >= MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL) { + +- if (rank != MPI_PROC_NULL) { ++ ucs_status_t ucp_status; + ucp_ep_h ep = MPIDI_UCX_COMM_TO_EP(win->comm_ptr, rank); + /* only flush the endpoint */ + ucp_status = ucp_ep_flush(ep); + MPIDI_UCX_CHK_STATUS(ucp_status); ++ MPIDI_UCX_WIN(win).target_sync[rank].need_sync = MPIDI_UCX_WIN_SYNC_UNSET; + } + #endif + +@@ -476,18 +211,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rma_target_local_cmpl_hook(int rank, MPIR_ + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_TARGET_LOCAL_CMPL_HOOK); + + #ifndef MPICH_UCX_AM_ONLY +- ucs_status_t ucp_status; ++ if (MPIDI_UCX_is_reachable_target(rank, win) && ++ MPIDI_UCX_WIN(win).target_sync[rank].need_sync == MPIDI_UCX_WIN_SYNC_FLUSH_LOCAL) { ++ ucs_status_t ucp_status; + +- if (rank != MPI_PROC_NULL) { + ucp_ep_h ep = MPIDI_UCX_COMM_TO_EP(win->comm_ptr, rank); + /* currently, UCP does not support local flush, so we have to call + * a global flush. This is not good for performance - but OK for now */ ++ ucp_status = ucp_ep_flush(ep); ++ MPIDI_UCX_CHK_STATUS(ucp_status); + +- if (MPIDI_UCX_WIN(win).need_local_flush == 1) { +- ucp_status = ucp_ep_flush(ep); +- MPIDI_UCX_CHK_STATUS(ucp_status); +- MPIDI_UCX_WIN(win).need_local_flush = 0; +- } ++ /* TODO: should set to FLUSH after replace with real local flush. */ ++ MPIDI_UCX_WIN(win).target_sync[rank].need_sync = MPIDI_UCX_WIN_SYNC_UNSET; + } + #endif + +--- a/src/mpid/ch4/shm/Makefile.mk ++++ b/src/mpid/ch4/shm/Makefile.mk +@@ -11,7 +11,8 @@ + ## Contributor License Agreement dated February 8, 2012. + ## + +-AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/ch4/shm/include ++AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/ch4/shm/include \ ++ -I$(top_srcdir)/src/mpid/ch4/shm/posix + + noinst_HEADERS += src/mpid/ch4/shm/include/shm.h + +--- a/src/mpid/ch4/shm/include/shm.h ++++ b/src/mpid/ch4/shm/include/shm.h +@@ -16,10 +16,12 @@ + + #define MPIDI_MAX_SHM_STRING_LEN 64 + +-typedef int (*MPIDI_SHM_mpi_init_hook_t) (int rank, int size, int *n_vnis_provided, int *tag_bits); ++/* These typedef function definitions are used when not inlining the shared memory module along ++ * with the struct of function pointers below. */ ++typedef int (*MPIDI_SHM_mpi_init_hook_t) (int rank, int size, int *n_vcis_provided, int *tag_bits); + typedef int (*MPIDI_SHM_mpi_finalize_hook_t) (void); +-typedef int (*MPIDI_SHM_get_vni_attr_t) (int vni); +-typedef int (*MPIDI_SHM_progress_t) (int vni, int blocking); ++typedef int (*MPIDI_SHM_get_vci_attr_t) (int vci); ++typedef int (*MPIDI_SHM_progress_t) (int vci, int blocking); + typedef int (*MPIDI_SHM_mpi_comm_connect_t) (const char *port_name, MPIR_Info * info, + int root, int timeout, MPIR_Comm * comm, + MPIR_Comm ** newcomm_ptr); +@@ -63,6 +65,7 @@ typedef int (*MPIDI_SHM_mpi_op_commit_hook_t) (MPIR_Op * op); + typedef int (*MPIDI_SHM_mpi_op_free_hook_t) (MPIR_Op * op); + typedef void (*MPIDI_SHM_am_request_init_t) (MPIR_Request * req); + typedef void (*MPIDI_SHM_am_request_finalize_t) (MPIR_Request * req); ++typedef void (*MPIDI_SHM_prequest_free_hook_t) (MPIR_Request * req); + typedef int (*MPIDI_SHM_mpi_send_t) (const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -75,19 +78,19 @@ typedef int (*MPIDI_SHM_mpi_startall_t) (int count, MPIR_Request * requests[]); + typedef int (*MPIDI_SHM_mpi_send_init_t) (const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request); ++ MPIDI_av_entry_t * addr, MPIR_Request ** request); + typedef int (*MPIDI_SHM_mpi_ssend_init_t) (const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request); ++ MPIDI_av_entry_t * addr, MPIR_Request ** request); + typedef int (*MPIDI_SHM_mpi_rsend_init_t) (const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request); ++ MPIDI_av_entry_t * addr, MPIR_Request ** request); + typedef int (*MPIDI_SHM_mpi_bsend_init_t) (const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request); ++ MPIDI_av_entry_t * addr, MPIR_Request ** request); + typedef int (*MPIDI_SHM_mpi_isend_t) (const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -108,7 +111,7 @@ typedef int (*MPIDI_SHM_mpi_irecv_t) (void *buf, MPI_Aint count, MPI_Datatype da + int rank, int tag, MPIR_Comm * comm, + int context_offset, MPIR_Request ** request); + typedef int (*MPIDI_SHM_mpi_imrecv_t) (void *buf, MPI_Aint count, MPI_Datatype datatype, +- MPIR_Request * message, MPIR_Request ** rreqp); ++ MPIR_Request * message); + typedef int (*MPIDI_SHM_mpi_cancel_recv_t) (MPIR_Request * rreq); + typedef void *(*MPIDI_SHM_mpi_alloc_mem_t) (size_t size, MPIR_Info * info_ptr); + typedef int (*MPIDI_SHM_mpi_free_mem_t) (void *ptr); +@@ -424,10 +427,12 @@ typedef int (*MPIDI_SHM_mpi_iscatterv_t) (const void *sendbuf, const int *sendco + MPI_Datatype recvtype, int root, + MPIR_Comm * comm_ptr, MPIR_Request ** req); + ++/* These structs are used when inlining is turned off and we call functions pointers for the shared ++ * memory functions instead of directly inlining the functions into the device code. */ + typedef struct MPIDI_SHM_funcs { + MPIDI_SHM_mpi_init_hook_t mpi_init; + MPIDI_SHM_mpi_finalize_hook_t mpi_finalize; +- MPIDI_SHM_get_vni_attr_t get_vni_attr; ++ MPIDI_SHM_get_vci_attr_t get_vci_attr; + MPIDI_SHM_progress_t progress; + MPIDI_SHM_mpi_comm_connect_t mpi_comm_connect; + MPIDI_SHM_mpi_comm_disconnect_t mpi_comm_disconnect; +@@ -459,6 +464,7 @@ typedef struct MPIDI_SHM_funcs { + /* Request allocation routines */ + MPIDI_SHM_am_request_init_t am_request_init; + MPIDI_SHM_am_request_finalize_t am_request_finalize; ++ MPIDI_SHM_prequest_free_hook_t prequest_free_hook; + /* Active Message Routines */ + MPIDI_SHM_am_send_hdr_t am_send_hdr; + MPIDI_SHM_am_isend_t am_isend; +@@ -580,26 +586,17 @@ typedef struct MPIDI_SHM_native_funcs { + extern MPIDI_SHM_funcs_t MPIDI_SHM_src_funcs; + extern MPIDI_SHM_native_funcs_t MPIDI_SHM_native_src_funcs; + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_init_hook(int rank, int size, +- int *n_vnis_provided, +- int *tag_bits) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_finalize_hook(void) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_vni_attr(int vni) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int vni, int blocking) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_connect(const char *port_name, MPIR_Info * info, +- int root, int timeout, MPIR_Comm * comm, +- MPIR_Comm ** +- newcomm_ptr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_disconnect(MPIR_Comm * +- comm_ptr) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_open_port(MPIR_Info * info_ptr, +- char *port_name) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_close_port(const char *port_name) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_accept(const char *port_name, MPIR_Info * info, +- int root, MPIR_Comm * comm, +- MPIR_Comm ** +- newcomm_ptr) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_init_hook(int rank, int size, int *n_vcis_provided, int *tag_bits); ++int MPIDI_SHM_mpi_finalize_hook(void); ++int MPIDI_SHM_get_vci_attr(int vci); ++MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int vci, int blocking) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr); ++int MPIDI_SHM_mpi_comm_disconnect(MPIR_Comm * comm_ptr); ++int MPIDI_SHM_mpi_open_port(MPIR_Info * info_ptr, char *port_name); ++int MPIDI_SHM_mpi_close_port(const char *port_name); ++int MPIDI_SHM_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id, + const void *am_hdr, + size_t am_hdr_sz) MPL_STATIC_INLINE_SUFFIX; +@@ -626,30 +623,22 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_recv(MPIR_Request * req) MPL_STATIC_IN + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx, + int *lpid_ptr, + bool is_remote) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_upids_to_lupids(int size, size_t * remote_upid_size, +- char *remote_upids, +- int **remote_lupids) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, +- const int lpids[]) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_create_hook(MPIR_Comm * +- comm) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_free_hook(MPIR_Comm * +- comm) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_type_commit_hook(MPIR_Datatype * +- type) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_type_free_hook(MPIR_Datatype * +- type) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_op_commit_hook(MPIR_Op * op) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_op_free_hook(MPIR_Op * op) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids); ++int MPIDI_SHM_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids); ++int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]); ++int MPIDI_SHM_mpi_comm_create_hook(MPIR_Comm * comm); ++int MPIDI_SHM_mpi_comm_free_hook(MPIR_Comm * comm); ++int MPIDI_SHM_mpi_type_commit_hook(MPIR_Datatype * type); ++int MPIDI_SHM_mpi_type_free_hook(MPIR_Datatype * type); ++int MPIDI_SHM_mpi_op_commit_hook(MPIR_Op * op); ++int MPIDI_SHM_mpi_op_free_hook(MPIR_Op * op); + MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_init(MPIR_Request * + req) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_finalize(MPIR_Request * + req) MPL_STATIC_INLINE_SUFFIX; ++MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_prequest_free_hook(MPIR_Request * ++ req) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -666,21 +655,25 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_startall(int count, + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** + request) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ssend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** + request) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rsend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** + request) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_bsend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** + request) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_isend(const void *buf, MPI_Aint count, +@@ -709,13 +702,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_irecv(void *buf, MPI_Aint count, MPI_ + int context_offset, + MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_imrecv(void *buf, MPI_Aint count, MPI_Datatype datatype, +- MPIR_Request * message, +- MPIR_Request ** rreqp) MPL_STATIC_INLINE_SUFFIX; ++ MPIR_Request * message) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_cancel_recv(MPIR_Request * + rreq) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX void *MPIDI_SHM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_free_mem(void *ptr) MPL_STATIC_INLINE_SUFFIX; ++void *MPIDI_SHM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDI_SHM_mpi_free_mem(void *ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_improbe(int source, int tag, MPIR_Comm * comm, + int context_offset, int *flag, + MPIR_Request ** message, +@@ -723,19 +714,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_improbe(int source, int tag, MPIR_Com + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iprobe(int source, int tag, MPIR_Comm * comm, + int context_offset, int *flag, + MPI_Status * status) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_hook(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_hook(MPIR_Win * +- win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_shared_hook(MPIR_Win * +- win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_dynamic_hook(MPIR_Win * +- win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_attach_hook(MPIR_Win * win, void *base, +- MPI_Aint size) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_detach_hook(MPIR_Win * win, +- const void *base) +- MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_free_hook(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_create_hook(MPIR_Win * win); ++int MPIDI_SHM_mpi_win_allocate_hook(MPIR_Win * win); ++int MPIDI_SHM_mpi_win_allocate_shared_hook(MPIR_Win * win); ++int MPIDI_SHM_mpi_win_create_dynamic_hook(MPIR_Win * win); ++int MPIDI_SHM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_SHM_mpi_win_detach_hook(MPIR_Win * win, const void *base); ++int MPIDI_SHM_mpi_win_free_hook(MPIR_Win * win); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rma_win_cmpl_hook(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rma_win_local_cmpl_hook(MPIR_Win * + win) MPL_STATIC_INLINE_SUFFIX; +@@ -749,8 +734,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rma_op_cs_enter_hook(MPIR_Win * + win) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rma_op_cs_exit_hook(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_set_info(MPIR_Win * win, +- MPIR_Info * info) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_shared_query(MPIR_Win * win, int rank, + MPI_Aint * size, int *disp_unit, + void *baseptr) MPL_STATIC_INLINE_SUFFIX; +@@ -771,34 +755,26 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_lock(int lock_type, int rank, int + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_unlock(int rank, + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_get_info(MPIR_Win * win, +- MPIR_Info ** +- info_p_p) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_get(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_free(MPIR_Win ** win_ptr) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_free(MPIR_Win ** win_ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_fence(int assert, + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, + int target_rank, MPI_Aint target_disp, + int target_count, + MPI_Datatype target_datatype, MPI_Op op, + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_attach(MPIR_Win * win, void *base, +- MPI_Aint size) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, +- MPIR_Win ** +- win_ptr) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_SHM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rput(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -806,8 +782,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rput(const void *origin_addr, int ori + MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_flush_local(int rank, + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_detach(MPIR_Win * win, +- const void *base) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_detach(MPIR_Win * win, const void *base); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, +@@ -838,18 +813,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_fetch_and_op(const void *origin_addr, + MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp, MPI_Op op, + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate(MPI_Aint size, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm, +- void *baseptr, +- MPIR_Win ** win) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_flush(int rank, + MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_flush_local_all(MPIR_Win * + win) MPL_STATIC_INLINE_SUFFIX; + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_unlock_all(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX; +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** +- win) MPL_STATIC_INLINE_SUFFIX; ++int MPIDI_SHM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win); + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rget(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/.gitignore +@@ -0,0 +1,2 @@ ++eager/include/posix_eager_pre.h ++posix_eager_array.c +--- a/src/mpid/ch4/shm/posix/Makefile.mk ++++ b/src/mpid/ch4/shm/posix/Makefile.mk +@@ -5,34 +5,49 @@ + ## See COPYRIGHT in top-level directory. + ## + ## Portions of this code were written by Intel Corporation. +-## Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++## Copyright (C) 2011-2018 Intel Corporation. Intel provides this material + ## to Argonne National Laboratory subject to Software Grant and Corporate + ## Contributor License Agreement dated February 8, 2012. + ## + + if BUILD_SHM_POSIX + ++if ENABLE_IZEM_ATOMIC ++include $(top_srcdir)/src/mpid/ch4/shm/posix/release_gather/Makefile.mk ++endif ++ + noinst_HEADERS += src/mpid/ch4/shm/posix/posix_am.h \ + src/mpid/ch4/shm/posix/posix_coll.h \ +- src/mpid/ch4/shm/posix/posix_datatypes.h \ + src/mpid/ch4/shm/posix/shm_inline.h \ +- src/mpid/ch4/shm/posix/posix_init.h \ ++ src/mpid/ch4/shm/posix/posix_noinline.h \ + src/mpid/ch4/shm/posix/posix_progress.h \ + src/mpid/ch4/shm/posix/posix_recv.h \ + src/mpid/ch4/shm/posix/posix_rma.h \ +- src/mpid/ch4/shm/posix/posix_spawn.h \ + src/mpid/ch4/shm/posix/posix_win.h \ +- src/mpid/ch4/shm/posix/posix_comm.h \ +- src/mpid/ch4/shm/posix/posix_defs.h \ + src/mpid/ch4/shm/posix/posix_impl.h \ + src/mpid/ch4/shm/posix/posix_probe.h \ +- src/mpid/ch4/shm/posix/posix_queue.h \ + src/mpid/ch4/shm/posix/posix_request.h \ + src/mpid/ch4/shm/posix/posix_send.h \ + src/mpid/ch4/shm/posix/posix_startall.h \ +- src/mpid/ch4/shm/posix/posix_unimpl.h ++ src/mpid/ch4/shm/posix/posix_unimpl.h \ ++ src/mpid/ch4/shm/posix/posix_am_impl.h \ ++ src/mpid/ch4/shm/posix/posix_pre.h \ ++ src/mpid/ch4/shm/posix/posix_proc.h \ ++ src/mpid/ch4/shm/posix/posix_types.h + ++if ENABLE_IZEM_ATOMIC ++noinst_HEADERS += src/mpid/ch4/shm/posix/posix_coll_release_gather.h ++endif + mpi_core_sources += src/mpid/ch4/shm/posix/globals.c \ +- src/mpid/ch4/shm/posix/barrier.c ++ src/mpid/ch4/shm/posix/posix_comm.c \ ++ src/mpid/ch4/shm/posix/posix_init.c \ ++ src/mpid/ch4/shm/posix/posix_op.c \ ++ src/mpid/ch4/shm/posix/posix_datatype.c \ ++ src/mpid/ch4/shm/posix/posix_spawn.c \ ++ src/mpid/ch4/shm/posix/posix_win.c \ ++ src/mpid/ch4/shm/posix/posix_eager_array.c \ ++ src/mpid/ch4/shm/posix/posix_coll_init.c ++ ++include $(top_srcdir)/src/mpid/ch4/shm/posix/eager/Makefile.mk + + endif +deleted file mode 100644 +--- a/src/mpid/ch4/shm/posix/barrier.c ++++ /dev/null +@@ -1,42 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +- +-#include +-#include "posix_impl.h" +- +-/* ------------------------------------------------------- */ +-/* from mpid/ch3/channels/nemesis/src/ch3i_comm.c */ +-/* ------------------------------------------------------- */ +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_barrier_vars_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-int MPIDI_POSIX_barrier_vars_init(MPIDI_POSIX_barrier_vars_t * barrier_region) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_BARRIER_VARS_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_BARRIER_VARS_INIT); +- +- if (MPIDI_POSIX_mem_region.local_rank == 0) +- for (i = 0; i < MPIDI_POSIX_NUM_BARRIER_VARS; ++i) { +- OPA_store_int(&barrier_region[i].context_id, -1); +- OPA_store_int(&barrier_region[i].usage_cnt, 0); +- OPA_store_int(&barrier_region[i].cnt, 0); +- OPA_store_int(&barrier_region[i].sig0, 0); +- OPA_store_int(&barrier_region[i].sig, 0); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_BARRIER_VARS_INIT); +- return mpi_errno; +-} +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/Makefile.mk +@@ -0,0 +1,26 @@ ++## -*- Mode: Makefile; -*- ++## vim: set ft=automake : ++## ++## (C) 2017 by Argonne National Laboratory. ++## See COPYRIGHT in top-level directory. ++## ++## Portions of this code were written by Intel Corporation. ++## Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++## to Argonne National Laboratory subject to Software Grant and Corporate ++## Contributor License Agreement dated February 8, 2012. ++## ++ ++if BUILD_SHM_POSIX ++ ++AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/ch4/shm/posix/eager/include ++AM_CPPFLAGS += -I$(top_builddir)/src/mpid/ch4/shm/posix/eager/include ++ ++noinst_HEADERS += src/mpid/ch4/shm/posix/eager/include/posix_eager.h \ ++ src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h \ ++ src/mpid/ch4/shm/posix/eager/include/posix_eager_transaction.h \ ++ src/mpid/ch4/shm/posix/eager/include/posix_eager_impl.h ++ ++include $(top_srcdir)/src/mpid/ch4/shm/posix/eager/fbox/Makefile.mk ++include $(top_srcdir)/src/mpid/ch4/shm/posix/eager/stub/Makefile.mk ++ ++endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/Makefile.mk +@@ -0,0 +1,23 @@ ++## -*- Mode: Makefile; -*- ++## vim: set ft=automake : ++## ++## (C) 2017 by Argonne National Laboratory. ++## See COPYRIGHT in top-level directory. ++## ++## Portions of this code were written by Intel Corporation. ++## Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++## to Argonne National Laboratory subject to Software Grant and Corporate ++## Contributor License Agreement dated February 8, 2012. ++## ++ ++if BUILD_CH4_SHM_POSIX_EAGER_FBOX ++ ++noinst_HEADERS += src/mpid/ch4/shm/posix/eager/fbox/fbox_init.h \ ++ src/mpid/ch4/shm/posix/eager/fbox/fbox_send.h \ ++ src/mpid/ch4/shm/posix/eager/fbox/fbox_recv.h \ ++ src/mpid/ch4/shm/posix/eager/fbox/posix_eager_inline.h ++ ++mpi_core_sources += src/mpid/ch4/shm/posix/eager/fbox/globals.c \ ++ src/mpid/ch4/shm/posix/eager/fbox/func_table.c ++ ++endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/fbox_impl.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_FBOX_IMPL_H_INCLUDED ++#define POSIX_EAGER_FBOX_IMPL_H_INCLUDED ++ ++#include ++#include "mpidu_shm.h" ++ ++#endif /* POSIX_EAGER_FBOX_IMPL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/fbox_init.h +@@ -0,0 +1,154 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_FBOX_INIT_H_INCLUDED ++#define POSIX_EAGER_FBOX_INIT_H_INCLUDED ++ ++#include "fbox_types.h" ++#include "fbox_impl.h" ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++cvars: ++ - name : MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE ++ category : CH4 ++ type : int ++ default : 3 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ The size of the array to store expected receives to speed up fastbox polling. ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++#define MPIDI_POSIX_MAILBOX_INDEX(sender, receiver) ((MPIDI_POSIX_global.num_local) * (sender) + (receiver)) ++ ++extern MPIDI_POSIX_eager_fbox_control_t MPIDI_POSIX_eager_fbox_control_global; ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_init(int rank, int size) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i; ++ MPIDI_POSIX_fastbox_t *fastboxes_p = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_EAGER_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_EAGER_INIT); ++ ++#ifdef MPL_USE_DBG_LOGGING ++ MPIDI_CH4_SHM_POSIX_FBOX_GENERAL = MPL_dbg_class_alloc("SHM_POSIX_FBOX", "shm_posix_fbox"); ++#endif /* MPL_USE_DBG_LOGGING */ ++ ++ MPIR_CHKPMEM_DECL(3); ++ ++ MPIDI_POSIX_eager_fbox_control_global.num_seg = 1; ++ MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks = ++ MPL_malloc(sizeof(*MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks) * ++ MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE + 1, MPL_MEM_SHM); ++ if (NULL == MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks) ++ MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ ++ /* -1 means we aren't looking for anything in particular. */ ++ for (i = 0; i < MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE; i++) { ++ MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks[i] = -1; ++ } ++ ++ /* The final entry in the cache array is for tracking the fallback place to start looking for ++ * messages if all other entries in the cache are empty. */ ++ MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks[i] = 0; ++ ++ MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_eager_fbox_control_global.seg, ++ MPIDU_shm_seg_info_t *, ++ MPIDI_POSIX_eager_fbox_control_global.num_seg * ++ sizeof(MPIDU_shm_seg_info_t), mpi_errno, "mem_region segments", ++ MPL_MEM_SHM); ++ ++ /* Create region with one fastbox for every pair of local processes. */ ++ mpi_errno = ++ MPIDU_shm_seg_alloc(MPIDI_POSIX_global.num_local * MPIDI_POSIX_global.num_local * ++ sizeof(MPIDI_POSIX_fastbox_t), (void **) &fastboxes_p, MPL_MEM_SHM); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Actually allocate the segment and assign regions to the pointers */ ++ mpi_errno = MPIDU_shm_seg_commit(&MPIDI_POSIX_eager_fbox_control_global.memory, ++ &MPIDI_POSIX_global.barrier, ++ MPIDI_POSIX_global.num_local, MPIDI_POSIX_global.my_local_rank, ++ MPIDI_POSIX_global.local_rank_0, rank, MPL_MEM_SHM); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Allocate table of pointers to fastboxes */ ++ MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_eager_fbox_control_global.mailboxes.in, ++ MPIDI_POSIX_fastbox_t **, ++ MPIDI_POSIX_global.num_local * sizeof(MPIDI_POSIX_fastbox_t *), mpi_errno, ++ "fastboxes", MPL_MEM_SHM); ++ MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_eager_fbox_control_global.mailboxes.out, ++ MPIDI_POSIX_fastbox_t **, ++ MPIDI_POSIX_global.num_local * sizeof(MPIDI_POSIX_fastbox_t *), mpi_errno, ++ "fastboxes", MPL_MEM_SHM); ++ ++ /* Fill in fbox tables */ ++ for (i = 0; i < MPIDI_POSIX_global.num_local; i++) { ++ MPIDI_POSIX_eager_fbox_control_global.mailboxes.in[i] = ++ &fastboxes_p[MPIDI_POSIX_MAILBOX_INDEX(i, MPIDI_POSIX_global.my_local_rank)]; ++ MPIDI_POSIX_eager_fbox_control_global.mailboxes.out[i] = ++ &fastboxes_p[MPIDI_POSIX_MAILBOX_INDEX(MPIDI_POSIX_global.my_local_rank, i)]; ++ ++ memset(MPIDI_POSIX_eager_fbox_control_global.mailboxes.in[i], 0, ++ sizeof(MPIDI_POSIX_fastbox_t)); ++ } ++ ++ mpi_errno = MPIDU_shm_barrier(MPIDI_POSIX_global.barrier, MPIDI_POSIX_global.num_local); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_CHKPMEM_COMMIT(); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_EAGER_INIT); ++ return mpi_errno; ++ fn_fail: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_CHKPMEM_REAP(); ++ goto fn_exit; ++ /* --END ERROR HANDLING-- */ ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_finalize() ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_EAGER_FINALIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_EAGER_FINALIZE); ++ ++ mpi_errno = MPIDU_shm_barrier(MPIDI_POSIX_global.barrier, MPIDI_POSIX_global.num_local); ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPL_free(MPIDI_POSIX_eager_fbox_control_global.seg); ++ MPL_free(MPIDI_POSIX_eager_fbox_control_global.mailboxes.in); ++ MPL_free(MPIDI_POSIX_eager_fbox_control_global.mailboxes.out); ++ MPL_free(MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks); ++ ++ mpi_errno = MPIDU_shm_seg_destroy(&MPIDI_POSIX_eager_fbox_control_global.memory, ++ MPIDI_POSIX_global.num_local); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_EAGER_FINALIZE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++#endif /* POSIX_EAGER_FBOX_INIT_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/fbox_pre.h +@@ -0,0 +1,18 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef POSIX_EAGER_FBOX_PRE_H_INCLUDED ++#define POSIX_EAGER_FBOX_PRE_H_INCLUDED ++ ++typedef struct MPIDI_POSIX_eager_fbox_recv_transaction { ++ void *fbox_ptr; ++} MPIDI_POSIX_eager_fbox_recv_transaction_t; ++ ++#endif /* POSIX_EAGER_FBOX_PRE_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/fbox_recv.h +@@ -0,0 +1,202 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_FBOX_RECV_H_INCLUDED ++#define POSIX_EAGER_FBOX_RECV_H_INCLUDED ++ ++#include "fbox_impl.h" ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++cvars: ++ - name : MPIR_CVAR_CH4_POSIX_EAGER_FBOX_BATCH_SIZE ++ category : CH4 ++ type : int ++ default : 4 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ The number of fastboxes to poll during one iteration of the progress loop. ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++MPL_STATIC_INLINE_PREFIX int ++MPIDI_POSIX_eager_recv_begin(MPIDI_POSIX_eager_recv_transaction_t * transaction) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_BEGIN); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_BEGIN); ++ ++ int j, local_rank, grank; ++ MPIDI_POSIX_fastbox_t *fbox_in; ++ int mpi_errno = MPIDI_POSIX_NOK; ++ ++ /* Rather than polling all of the fastboxes on every loop, do a small number and rely on calling ++ * this function again if needed. */ ++ for (j = 0; j < MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE + ++ MPIR_CVAR_CH4_POSIX_EAGER_FBOX_BATCH_SIZE; j++) { ++ ++ /* Before polling *all* of the fastboxes, poll the ones that are most likely to have messages ++ * (where receives have been preposted). */ ++ if (j < MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE) { ++ /* Get the next fastbox to poll. */ ++ local_rank = MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks[j]; ++ } ++ /* If we have finished the cached fastboxes, continue polling the rest of the fastboxes ++ * where we left off last time. */ ++ else { ++ int16_t last_cache = ++ MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks ++ [MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE]; ++ /* Figure out the next fastbox to poll by incrementing the counter. */ ++ last_cache = (last_cache + 1) % (int16_t) MPIDI_POSIX_global.num_local; ++ local_rank = last_cache; ++ MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks ++ [MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE] = last_cache; ++ } ++ ++ if (local_rank == -1) { ++ continue; ++ } ++ ++ /* Find the correct fastbox and update the pointer for the next time around the loop. */ ++ fbox_in = MPIDI_POSIX_eager_fbox_control_global.mailboxes.in[local_rank]; ++ ++ /* If the data ready flag is set, there is a message waiting. */ ++ if (fbox_in->data_ready) { ++ /* Initialize public transaction part */ ++ grank = MPIDI_POSIX_global.local_procs[local_rank]; ++ ++ if (likely(fbox_in->is_header)) { ++ /* Only received the header for the message */ ++ transaction->msg_hdr = fbox_in->payload; ++ transaction->payload = fbox_in->payload + sizeof(MPIDI_POSIX_am_header_t); ++ transaction->payload_sz = fbox_in->payload_sz - sizeof(MPIDI_POSIX_am_header_t); ++ } else { ++ /* Received a fragment of the message payload */ ++ transaction->msg_hdr = NULL; ++ transaction->payload = fbox_in->payload; ++ transaction->payload_sz = fbox_in->payload_sz; ++ } ++ ++ transaction->src_grank = grank; ++ ++ /* Initialize private transaction part */ ++ transaction->transport.fbox.fbox_ptr = fbox_in; ++ ++#ifdef POSIX_FBOX_DEBUG ++ { ++ int i; ++ ++ POSIX_FBOX_TRACE("FBOX_IN (%s) [", fbox_in->is_header ? "H" : "F"); ++ ++ for (i = 0; i < fbox_in->payload_sz; i++) { ++ POSIX_FBOX_TRACE("%02X", ((uint8_t *) (fbox_in->payload))[i]); ++ ++ if (i == 255) { ++ POSIX_FBOX_TRACE("..."); ++ break; ++ } ++ } ++ ++ POSIX_FBOX_TRACE("]@%d from %d\n", fbox_in->payload_sz, grank); ++ } ++#endif /* POSIX_FBOX_DEBUG */ ++ ++ /* We found a message so return success and stop. */ ++ mpi_errno = MPIDI_POSIX_OK; ++ goto fn_exit; ++ } ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_BEGIN); ++ return mpi_errno; ++} ++ ++MPL_STATIC_INLINE_PREFIX void ++MPIDI_POSIX_eager_recv_memcpy(MPIDI_POSIX_eager_recv_transaction_t * transaction, ++ void *dst, const void *src, size_t size) ++{ ++ MPIR_Memcpy(dst, src, size); ++} ++ ++MPL_STATIC_INLINE_PREFIX void ++MPIDI_POSIX_eager_recv_commit(MPIDI_POSIX_eager_recv_transaction_t * transaction) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_COMMIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_COMMIT); ++ ++ MPIDI_POSIX_fastbox_t *fbox_in = NULL; ++ ++ fbox_in = (MPIDI_POSIX_fastbox_t *) transaction->transport.fbox.fbox_ptr; ++ ++ fbox_in->data_ready = 0; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_COMMIT); ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_posted_hook(int grank) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_POSTED_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_POSTED_HOOK); ++ ++ int local_rank, i; ++ ++ if (grank >= 0) { ++ local_rank = MPIDI_POSIX_global.local_ranks[grank]; ++ ++ /* Put the posted receive in the list of fastboxes to be polled first. If the list is full, ++ * it will get polled after the boxes in the list are polled, which will be slower, but will ++ * still match the message. */ ++ for (i = 0; i < MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE; i++) { ++ if (MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks[i] == -1) { ++ MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks[i] = local_rank; ++ break; ++ } else if (MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks[i] == ++ local_rank) { ++ break; ++ } else { ++ continue; ++ } ++ } ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_POSTED_HOOK); ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_completed_hook(int grank) ++{ ++ int i, local_rank; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_COMPLETED_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_COMPLETED_HOOK); ++ ++ if (grank >= 0) { ++ local_rank = MPIDI_POSIX_global.local_ranks[grank]; ++ ++ /* Remove the posted receive from the list of fastboxes to be polled first now that the ++ * request is done. */ ++ for (i = 0; i < MPIR_CVAR_CH4_POSIX_EAGER_FBOX_POLL_CACHE_SIZE; i++) { ++ if (MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks[i] == local_rank) { ++ MPIDI_POSIX_eager_fbox_control_global.first_poll_local_ranks[i] = -1; ++ break; ++ } else { ++ continue; ++ } ++ } ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_FBOX_EAGER_RECV_COMPLETED_HOOK); ++} ++ ++#endif /* POSIX_EAGER_FBOX_RECV_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/fbox_send.h +@@ -0,0 +1,129 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_FBOX_SEND_H_INCLUDED ++#define POSIX_EAGER_FBOX_SEND_H_INCLUDED ++ ++#include "fbox_impl.h" ++ ++/* This function attempts to send the next chunk of a message via the fastbox. If the fastbox is ++ * already full, this function will return and the caller is expected to queue the message for later ++ * and retry. ++ * ++ * grank - The global rank (the rank in MPI_COMM_WORLD) of the receiving process. Used to look up ++ * the correct fastbox. ++ * msg_hdr - The header of the message to be sent. This can be NULL if there is no header to be sent ++ * (such as if the header was sent in a previous chunk). ++ * iov - The array of iovec entries to be sent. ++ * iov_num - The number of entries in the iovec array. ++ */ ++MPL_STATIC_INLINE_PREFIX int ++MPIDI_POSIX_eager_send(int grank, ++ MPIDI_POSIX_am_header_t ** msg_hdr, struct iovec **iov, size_t * iov_num) ++{ ++ MPIDI_POSIX_fastbox_t *fbox_out; ++ int i; ++ size_t iov_done = 0; ++ uint8_t *fbox_payload_ptr; ++ size_t fbox_payload_size = MPIDI_POSIX_FBOX_DATA_LEN; ++ size_t fbox_payload_size_left = MPIDI_POSIX_FBOX_DATA_LEN; ++ int ret = MPIDI_POSIX_OK; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_EAGER_SEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_EAGER_SEND); ++ ++ fbox_out = ++ MPIDI_POSIX_eager_fbox_control_global.mailboxes.out[MPIDI_POSIX_global.local_ranks[grank]]; ++ ++ /* Check if the fastbox is already full and if so, return to the caller, which will cause this ++ * message to be queued. */ ++ if (fbox_out->data_ready) { ++ ret = MPIDI_POSIX_NOK; ++ goto fn_exit; ++ } ++ ++ fbox_payload_ptr = fbox_out->payload; ++ ++ fbox_out->is_header = 0; ++ ++ /* If there is a header, put that in the fastbox first and account for that in the remaining ++ * size. */ ++ if (*msg_hdr) { ++ *((MPIDI_POSIX_am_header_t *) fbox_payload_ptr) = **msg_hdr; ++ ++ fbox_payload_ptr += sizeof(MPIDI_POSIX_am_header_t); ++ fbox_payload_size_left -= sizeof(MPIDI_POSIX_am_header_t); ++ ++ *msg_hdr = NULL; /* completed header copy */ ++ ++ fbox_out->is_header = 1; ++ } ++ ++ /* Copy all of the user data that will fit into the fastbox. */ ++ for (i = 0; i < *iov_num; i++) { ++ if (unlikely(fbox_payload_size_left < (*iov)[i].iov_len)) { ++ MPIR_Memcpy(fbox_payload_ptr, (*iov)[i].iov_base, fbox_payload_size_left); ++ ++ (*iov)[i].iov_base = (char *) (*iov)[i].iov_base + fbox_payload_size_left; ++ (*iov)[i].iov_len -= fbox_payload_size_left; ++ ++ fbox_payload_size_left = 0; ++ ++ break; ++ } ++ ++ MPIR_Memcpy(fbox_payload_ptr, (*iov)[i].iov_base, (*iov)[i].iov_len); ++ ++ fbox_payload_ptr += (*iov)[i].iov_len; ++ fbox_payload_size_left -= (*iov)[i].iov_len; ++ ++ iov_done++; ++ } ++ ++ fbox_out->payload_sz = fbox_payload_size - fbox_payload_size_left; ++ ++#ifdef POSIX_FBOX_DEBUG ++ { ++ int i; ++ ++ POSIX_FBOX_TRACE("FBOX_OUT (%s) [", fbox_out->is_header ? "H" : "F"); ++ ++ for (i = 0; i < fbox_out->payload_sz; i++) { ++ POSIX_FBOX_TRACE("%02X", ((uint8_t *) (fbox_out->payload))[i]); ++ ++ if (i == 255) { ++ POSIX_FBOX_TRACE("..."); ++ break; ++ } ++ } ++ ++ POSIX_FBOX_TRACE("]@%d to %d\n", fbox_out->payload_sz, grank); ++ } ++#endif /* POSIX_FBOX_DEBUG */ ++ ++ OPA_compiler_barrier(); ++ ++ /* Update the data ready flag to indicate that there is data in the box for the receiver. */ ++ fbox_out->data_ready = 1; ++ ++ /* Update the number of iovecs left and the pointer to the next one. */ ++ *iov_num -= iov_done; ++ if (*iov_num) { ++ *iov = &((*iov)[iov_done]); /* Rewind iov array */ ++ } else { ++ *iov = NULL; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_EAGER_SEND); ++ return ret; ++} ++ ++#endif /* POSIX_EAGER_FBOX_SEND_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/fbox_types.h +@@ -0,0 +1,68 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_FBOX_TYPES_H_INCLUDED ++#define POSIX_EAGER_FBOX_TYPES_H_INCLUDED ++ ++#include ++#include "mpidu_shm.h" ++ ++#define MPIDI_POSIX_FBOX_DATA_LEN (16 * 1024 - sizeof(uint64_t) - 2 * sizeof(int)) ++#define MPIDI_POSIX_FBOX_THRESHOLD (MPIDI_POSIX_FBOX_DATA_LEN) ++ ++typedef struct { ++ ++ volatile uint64_t data_ready; ++ ++ int is_header; ++ size_t payload_sz; ++ ++ uint8_t payload[MPIDI_POSIX_FBOX_DATA_LEN]; ++ ++} MPIDI_POSIX_fastbox_t; ++ ++typedef struct MPIDI_POSIX_fbox_arrays { ++ MPIDI_POSIX_fastbox_t **in; ++ MPIDI_POSIX_fastbox_t **out; ++} MPIDI_POSIX_fbox_arrays_t; ++ ++typedef struct MPIDI_POSIX_eager_fbox_control { ++ ++ MPIDU_shm_seg_t memory; ++ MPIDU_shm_seg_info_t *seg; ++ ++ int num_seg; ++ ++ MPIDI_POSIX_fbox_arrays_t mailboxes; /* The array of buffers that make up the total collection ++ * of mailboxes */ ++ ++ /* A small cache of local ranks that have posted receives that we use to poll fastboxes more ++ * efficiently. The last entry in this array is a counter to keep track of the most recently ++ * checked fastbox so we can make sure we don't starve the fastboxes where receives haven't been ++ * posted (for unexpected messages). Ideally this array should remain small. By default, it has ++ * three entries for the cache and one entry for the counter, which (at 16 bits per entry) ++ * stays under a 64 byte cache line size. 16 bits should be plenty for storing local ranks (2^16 ++ * is much bigger than any currently immaginable single-node without something like wildly ++ * oversubscribed ranks as threads). */ ++ int16_t *first_poll_local_ranks; ++ int next_poll_local_rank; ++ ++} MPIDI_POSIX_eager_fbox_control_t; ++ ++extern MPIDI_POSIX_eager_fbox_control_t MPIDI_POSIX_eager_fbox_control_global; ++ ++#ifdef MPL_USE_DBG_LOGGING ++extern MPL_dbg_class MPIDI_CH4_SHM_POSIX_FBOX_GENERAL; ++#endif ++ ++#define POSIX_FBOX_TRACE(...) \ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_SHM_POSIX_FBOX_GENERAL,VERBOSE,(MPL_DBG_FDEST, __VA_ARGS__)) ++ ++#endif /* POSIX_EAGER_FBOX_TYPES_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/func_table.c +@@ -0,0 +1,33 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef POSIX_EAGER_INLINE ++#define POSIX_EAGER_DISABLE_INLINES ++ ++#include ++#include ++#include "../../posix_types.h" ++#include "posix_eager_inline.h" ++ ++MPIDI_POSIX_eager_funcs_t MPIDI_POSIX_eager_fbox_funcs = { ++ MPIDI_POSIX_eager_init, ++ MPIDI_POSIX_eager_finalize, ++ ++ MPIDI_POSIX_eager_send, ++ ++ MPIDI_POSIX_eager_recv_begin, ++ MPIDI_POSIX_eager_recv_memcpy, ++ MPIDI_POSIX_eager_recv_commit, ++ ++ MPIDI_POSIX_eager_recv_posted_hook, ++ MPIDI_POSIX_eager_recv_completed_hook ++}; ++ ++#endif /* POSIX_EAGER_INLINE */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/globals.c +@@ -0,0 +1,21 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "fbox_impl.h" ++#include "fbox_types.h" ++ ++/* *INDENT-OFF* */ ++MPIDI_POSIX_eager_fbox_control_t MPIDI_POSIX_eager_fbox_control_global; ++/* *INDENT-ON* */ ++ ++#ifdef MPL_USE_DBG_LOGGING ++MPL_dbg_class MPIDI_CH4_SHM_POSIX_FBOX_GENERAL; ++#endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/posix_eager_inline.h +@@ -0,0 +1,18 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_FBOX_DIRECT_H_INCLUDED ++#define POSIX_EAGER_FBOX_DIRECT_H_INCLUDED ++ ++#include "fbox_init.h" ++#include "fbox_send.h" ++#include "fbox_recv.h" ++ ++#endif /* POSIX_EAGER_FBOX_DIRECT_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/fbox/subconfigure.m4 +@@ -0,0 +1,19 @@ ++[#] start of __file__ ++dnl MPICH_SUBCFG_AFTER=src/mpid/ch4 ++ ++AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ ++ AM_COND_IF([BUILD_CH4],[ ++ for eager in $ch4_posix_eager_modules ; do ++ AS_CASE([$eager],[fbox],[build_ch4_shm_posix_eager_fbox=yes]) ++ if test $eager = "fbox" ; then ++ AC_DEFINE(HAVE_CH4_SHM_EAGER_FBOX,1,[FBOX submodule is built]) ++ fi ++ done ++ ]) ++ AM_CONDITIONAL([BUILD_CH4_SHM_POSIX_EAGER_FBOX],[test "X$build_ch4_shm_posix_eager_fbox" = "Xyes"]) ++])dnl ++ ++AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ ++])dnl end _BODY ++ ++[#] end of __file__ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/include/posix_eager.h +@@ -0,0 +1,77 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_H_INCLUDED ++#define POSIX_EAGER_H_INCLUDED ++ ++#include ++ ++#define MPIDI_MAX_POSIX_EAGER_STRING_LEN 64 ++ ++typedef int (*MPIDI_POSIX_eager_init_t) (int rank, int size); ++typedef int (*MPIDI_POSIX_eager_finalize_t) (void); ++ ++typedef int (*MPIDI_POSIX_eager_send_t) (int grank, ++ MPIDI_POSIX_am_header_t ** msg_hdr, ++ struct iovec ** iov, size_t * iov_num); ++ ++typedef int (*MPIDI_POSIX_eager_recv_begin_t) (MPIDI_POSIX_eager_recv_transaction_t * transaction); ++ ++typedef void (*MPIDI_POSIX_eager_recv_memcpy_t) (MPIDI_POSIX_eager_recv_transaction_t * transaction, ++ void *dst, const void *src, size_t size); ++ ++typedef void (*MPIDI_POSIX_eager_recv_commit_t) (MPIDI_POSIX_eager_recv_transaction_t * ++ transaction); ++ ++typedef void (*MPIDI_POSIX_eager_recv_posted_hook_t) (int grank); ++typedef void (*MPIDI_POSIX_eager_recv_completed_hook_t) (int grank); ++ ++typedef struct { ++ MPIDI_POSIX_eager_init_t init; ++ MPIDI_POSIX_eager_finalize_t finalize; ++ ++ MPIDI_POSIX_eager_send_t send; ++ ++ MPIDI_POSIX_eager_recv_begin_t recv_begin; ++ MPIDI_POSIX_eager_recv_memcpy_t recv_memcpy; ++ MPIDI_POSIX_eager_recv_commit_t recv_commit; ++ ++ MPIDI_POSIX_eager_recv_posted_hook_t recv_posted_hook; ++ MPIDI_POSIX_eager_recv_completed_hook_t recv_completed_hook; ++} MPIDI_POSIX_eager_funcs_t; ++ ++extern MPIDI_POSIX_eager_funcs_t *MPIDI_POSIX_eager_funcs[]; ++extern MPIDI_POSIX_eager_funcs_t *MPIDI_POSIX_eager_func; ++extern int MPIDI_num_posix_eager_fabrics; ++extern char MPIDI_POSIX_eager_strings[][MPIDI_MAX_POSIX_EAGER_STRING_LEN]; ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_init(int rank, int size) MPL_STATIC_INLINE_SUFFIX; ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_finalize(void) MPL_STATIC_INLINE_SUFFIX; ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_send(int grank, ++ MPIDI_POSIX_am_header_t ** msg_hdr, ++ struct iovec **iov, ++ size_t * iov_num) MPL_STATIC_INLINE_SUFFIX; ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_recv_begin(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction) MPL_STATIC_INLINE_SUFFIX; ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_memcpy(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction, void *dst, const void *src, ++ size_t size) MPL_STATIC_INLINE_SUFFIX; ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_commit(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction) MPL_STATIC_INLINE_SUFFIX; ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_posted_hook(int grank) ++ MPL_STATIC_INLINE_SUFFIX; ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_completed_hook(int grank) ++ MPL_STATIC_INLINE_SUFFIX; ++ ++#endif /* POSIX_EAGER_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/include/posix_eager_impl.h +@@ -0,0 +1,79 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_IMPL_H_INCLUDED ++#define POSIX_EAGER_IMPL_H_INCLUDED ++ ++#ifndef POSIX_EAGER_INLINE ++#ifndef POSIX_EAGER_DISABLE_INLINES ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_init(int rank, int size) ++{ ++ return MPIDI_POSIX_eager_func->init(rank, size); ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_finalize() ++{ ++ return MPIDI_POSIX_eager_func->finalize(); ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_send(int grank, ++ MPIDI_POSIX_am_header_t ** msg_hdr, ++ struct iovec **iov, size_t * iov_num) ++{ ++ return MPIDI_POSIX_eager_func->send(grank, msg_hdr, iov, iov_num); ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_recv_begin(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction) ++{ ++ return MPIDI_POSIX_eager_func->recv_begin(transaction); ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_memcpy(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction, void *dst, const void *src, ++ size_t size) ++{ ++ return MPIDI_POSIX_eager_func->recv_memcpy(transaction, dst, src, size); ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_commit(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction) ++{ ++ return MPIDI_POSIX_eager_func->recv_commit(transaction); ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_posted_hook(int grank) ++{ ++ return MPIDI_POSIX_eager_func->recv_posted_hook(grank); ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_completed_hook(int grank) ++{ ++ return MPIDI_POSIX_eager_func->recv_completed_hook(grank); ++} ++ ++#endif /* POSIX_EAGER_DISABLE_INLINES */ ++ ++#else /* POSIX_EAGER_INLINE */ ++ ++#define __posix_eager_inline_stub__ 0 ++#define __posix_eager_inline_fbox__ 1 ++ ++#if POSIX_EAGER_INLINE==__posix_eager_inline_stub__ ++#include "../stub/posix_eager_inline.h" ++#elif POSIX_EAGER_INLINE==__posix_eager_inline_fbox__ ++#include "../fbox/posix_eager_inline.h" ++#else ++#error "No direct posix eager included" ++#endif ++ ++#endif /* POSIX_EAGER_INLINE */ ++ ++#endif /* POSIX_EAGER_IMPL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h.in +@@ -0,0 +1,20 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_PRE_H_INCLUDED ++#define POSIX_EAGER_PRE_H_INCLUDED ++ ++/* *INDENT-OFF* */ ++@ch4_posix_eager_pre_include@ ++/* *INDENT-ON* */ ++ ++#define MPIDI_POSIX_EAGER_RECV_TRANSACTION_DECL @ch4_posix_eager_recv_transaction_decl@ ++ ++#endif /* POSIX_EAGER_PRE_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/include/posix_eager_transaction.h +@@ -0,0 +1,33 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_TRANSACTION_H_INCLUDED ++#define POSIX_EAGER_TRANSACTION_H_INCLUDED ++ ++#include "posix_eager_pre.h" ++ ++typedef struct MPIDI_POSIX_eager_recv_transaction { ++ ++ /* Public */ ++ ++ void *msg_hdr; ++ ++ void *payload; ++ size_t payload_sz; /* 2GB limit */ ++ ++ int src_grank; ++ ++ /* Private */ ++ ++ union { ++ MPIDI_POSIX_EAGER_RECV_TRANSACTION_DECL} transport; ++ ++} MPIDI_POSIX_eager_recv_transaction_t; ++ ++#endif /* POSIX_EAGER_TRANSACTION_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/Makefile.mk +@@ -0,0 +1,23 @@ ++## -*- Mode: Makefile; -*- ++## vim: set ft=automake : ++## ++## (C) 2017 by Argonne National Laboratory. ++## See COPYRIGHT in top-level directory. ++## ++## Portions of this code were written by Intel Corporation. ++## Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++## to Argonne National Laboratory subject to Software Grant and Corporate ++## Contributor License Agreement dated February 8, 2012. ++## ++ ++if BUILD_CH4_SHM_POSIX_EAGER_STUB ++ ++noinst_HEADERS += src/mpid/ch4/shm/posix/eager/stub/stub_init.h \ ++ src/mpid/ch4/shm/posix/eager/stub/stub_send.h \ ++ src/mpid/ch4/shm/posix/eager/stub/stub_recv.h \ ++ src/mpid/ch4/shm/posix/eager/stub/posix_eager_inline.h ++ ++mpi_core_sources += src/mpid/ch4/shm/posix/eager/stub/globals.c \ ++ src/mpid/ch4/shm/posix/eager/stub/func_table.c ++ ++endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/func_table.c +@@ -0,0 +1,32 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef POSIX_EAGER_INLINE ++#define POSIX_EAGER_DISABLE_INLINES ++ ++#include ++#include ++#include "posix_eager_inline.h" ++ ++MPIDI_POSIX_eager_funcs_t MPIDI_POSIX_eager_stub_funcs = { ++ MPIDI_POSIX_eager_init, ++ MPIDI_POSIX_eager_finalize, ++ ++ MPIDI_POSIX_eager_send, ++ ++ MPIDI_POSIX_eager_recv_begin, ++ MPIDI_POSIX_eager_recv_memcpy, ++ MPIDI_POSIX_eager_recv_commit, ++ ++ MPIDI_POSIX_eager_recv_posted_hook, ++ MPIDI_POSIX_eager_recv_completed_hook ++}; ++ ++#endif /* POSIX_EAGER_INLINE */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/globals.c +@@ -0,0 +1,12 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++int MPIDI_POSIX_eager_stub_global_dummy = 0; +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/posix_eager_inline.h +@@ -0,0 +1,18 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_STUB_DIRECT_H_INCLUDED ++#define POSIX_EAGER_STUB_DIRECT_H_INCLUDED ++ ++#include "stub_init.h" ++#include "stub_send.h" ++#include "stub_recv.h" ++ ++#endif /* POSIX_EAGER_STUB_DIRECT_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/stub_impl.h +@@ -0,0 +1,17 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_STUB_IMPL_H_INCLUDED ++#define POSIX_EAGER_STUB_IMPL_H_INCLUDED ++ ++#include ++#include ++ ++#endif /* POSIX_EAGER_STUB_IMPL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/stub_init.h +@@ -0,0 +1,28 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_STUB_INIT_H_INCLUDED ++#define POSIX_EAGER_STUB_INIT_H_INCLUDED ++ ++#include "stub_impl.h" ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_init(int rank, int size) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_finalize() ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++#endif /* POSIX_EAGER_STUB_INIT_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/stub_pre.h +@@ -0,0 +1,18 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef POSIX_EAGER_STUB_PRE_H_INCLUDED ++#define POSIX_EAGER_STUB_PRE_H_INCLUDED ++ ++typedef struct MPIDI_POSIX_eager_stub_recv_transaction { ++ int dummy; ++} MPIDI_POSIX_eager_stub_recv_transaction_t; ++ ++#endif /* POSIX_EAGER_STUB_PRE_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/stub_recv.h +@@ -0,0 +1,50 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_STUB_RX_H_INCLUDED ++#define POSIX_EAGER_STUB_RX_H_INCLUDED ++ ++#include "stub_impl.h" ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_recv_begin(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_memcpy(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction, void *dst, const void *src, ++ size_t size) ++{ ++ MPIR_Assert(0); ++ return; ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_commit(MPIDI_POSIX_eager_recv_transaction_t * ++ transaction) ++{ ++ MPIR_Assert(0); ++ return; ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_posted_hook(int grank) ++{ ++ MPIR_Assert(0); ++ return; ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_eager_recv_completed_hook(int grank) ++{ ++ MPIR_Assert(0); ++ return; ++} ++ ++#endif /* POSIX_EAGER_STUB_RX_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/stub_send.h +@@ -0,0 +1,24 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_EAGER_STUB_SEND_H_INCLUDED ++#define POSIX_EAGER_STUB_SEND_H_INCLUDED ++ ++#include "stub_impl.h" ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_eager_send(int grank, ++ MPIDI_POSIX_am_header_t ** msg_hdr, ++ struct iovec **iov, size_t * iov_num) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++#endif /* POSIX_EAGER_STUB_TX_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/eager/stub/subconfigure.m4 +@@ -0,0 +1,19 @@ ++[#] start of __file__ ++dnl MPICH_SUBCFG_AFTER=src/mpid/ch4 ++ ++AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ ++ AM_COND_IF([BUILD_CH4],[ ++ for eager in $ch4_posix_eager_modules ; do ++ AS_CASE([$eager],[stub],[build_ch4_shm_posix_eager_stub=yes]) ++ if test $eager = "stub" ; then ++ AC_DEFINE(HAVE_CH4_SHM_EAGER_STUB,1,[STUB submodule is built]) ++ fi ++ done ++ ]) ++ AM_CONDITIONAL([BUILD_CH4_SHM_POSIX_EAGER_STUB],[test "X$build_ch4_shm_posix_eager_stub" = "Xyes"]) ++])dnl ++ ++AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ ++])dnl end _BODY ++ ++[#] end of __file__ +--- a/src/mpid/ch4/shm/posix/globals.c ++++ b/src/mpid/ch4/shm/posix/globals.c +@@ -4,19 +4,19 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ + +-#include + #include "posix_impl.h" ++#include "posix_types.h" + +-MPIDI_POSIX_request_queue_t MPIDI_POSIX_sendq = { NULL, NULL }; +-MPIDI_POSIX_request_queue_t MPIDI_POSIX_recvq_posted = { NULL, NULL }; +-MPIDI_POSIX_request_queue_t MPIDI_POSIX_recvq_unexpected = { NULL, NULL }; +-MPIDI_POSIX_mem_region_t MPIDI_POSIX_mem_region = { {0} +-}; ++MPIDI_POSIX_global_t MPIDI_POSIX_global = { 0 }; + +-char *MPIDI_POSIX_asym_base_addr = 0; +-MPID_Thread_mutex_t MPID_shm_mutex; ++MPIDI_POSIX_eager_funcs_t *MPIDI_POSIX_eager_func = NULL; ++ ++MPL_dbg_class MPIDI_CH4_SHM_POSIX_GENERAL; ++#ifdef ENABLE_IZEM_ATOMIC ++zm_atomic_uint_t *MPIDI_POSIX_shm_limit_counter = NULL; ++#endif +--- a/src/mpid/ch4/shm/posix/posix_am.h ++++ b/src/mpid/ch4/shm/posix/posix_am.h +@@ -3,7 +3,7 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ +@@ -11,6 +11,75 @@ + #define POSIX_AM_H_INCLUDED + + #include "posix_impl.h" ++#include "posix_am_impl.h" ++ ++/* Enqueue a request header onto the postponed message queue. This is a helper function and most ++ * likely shouldn't be used outside of this file. */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_enqueue_request(const void *am_hdr, size_t am_hdr_sz, ++ int handler_id, const int grank, ++ MPIDI_POSIX_am_header_t msg_hdr, ++ MPIDI_POSIX_am_header_t * msg_hdr_p, ++ struct iovec *iov_left_ptr, ++ size_t iov_num_left, size_t data_sz, ++ MPIR_Request * sreq) ++{ ++ MPIDI_POSIX_am_request_header_t *curr_sreq_hdr = NULL; ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_ENQUEUE_REQUEST); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_ENQUEUE_REQUEST); ++ ++ /* Check to see if we need to create storage for the data to be sent. We did this above only if ++ * we were sending a noncontiguous message, but we need it for all situations now. */ ++ if (!curr_sreq_hdr) { ++ /* Prepare private storage */ ++ ++ mpi_errno = MPIDI_POSIX_am_init_req_hdr(am_hdr, am_hdr_sz, ++ &MPIDI_POSIX_AMREQUEST(sreq, req_hdr), sreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ curr_sreq_hdr = MPIDI_POSIX_AMREQUEST(sreq, req_hdr); ++ } ++ ++ curr_sreq_hdr->handler_id = handler_id; ++ curr_sreq_hdr->dst_grank = grank; ++ curr_sreq_hdr->msg_hdr = NULL; ++ ++ /* If this is true, the header hasn't been sent so we should copy it from stack */ ++ if (msg_hdr_p) { ++ curr_sreq_hdr->msg_hdr = &curr_sreq_hdr->msg_hdr_buf; ++ curr_sreq_hdr->msg_hdr_buf = msg_hdr; ++ } ++ ++ curr_sreq_hdr->iov_num = iov_num_left; ++ curr_sreq_hdr->iov_ptr = curr_sreq_hdr->iov; ++ ++ /* If we haven't made it through the header yet, make sure we include it in the iovec */ ++ if (iov_num_left == 2) { ++ curr_sreq_hdr->iov[0].iov_base = curr_sreq_hdr->am_hdr; ++ curr_sreq_hdr->iov[0].iov_len = curr_sreq_hdr->am_hdr_sz; ++ ++ curr_sreq_hdr->iov[1] = iov_left_ptr[1]; ++ } else if (iov_num_left == 1) { ++ if (data_sz == 0) { ++ curr_sreq_hdr->iov[0].iov_base = curr_sreq_hdr->am_hdr; ++ curr_sreq_hdr->iov[0].iov_len = curr_sreq_hdr->am_hdr_sz; ++ } else { ++ curr_sreq_hdr->iov[0] = iov_left_ptr[0]; ++ } ++ } ++ ++ curr_sreq_hdr->request = sreq; ++ ++ DL_APPEND(MPIDI_POSIX_global.postponed_queue, curr_sreq_hdr); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_AM_ENQUEUE_REQUEST); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_isend(int rank, + MPIR_Comm * comm, +@@ -21,17 +90,134 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_isend(int rank, + MPI_Count count, + MPI_Datatype datatype, MPIR_Request * sreq) + { +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_ISEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_ISEND); +- +- mpi_errno = MPIDI_NM_am_isend(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype, +- sreq); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_ISEND); +- ++ int mpi_errno = MPI_SUCCESS; ++ int result = MPIDI_POSIX_OK; ++ int dt_contig; ++ size_t data_sz; ++ MPIR_Datatype *dt_ptr; ++ MPI_Aint dt_true_lb; ++ MPIDI_POSIX_am_header_t msg_hdr; ++ uint8_t *send_buf = NULL; ++ MPIDI_POSIX_am_header_t *msg_hdr_p = &msg_hdr; ++ MPIDI_POSIX_am_request_header_t *curr_sreq_hdr = NULL; ++ const int grank = MPIDIU_rank_to_lpid(rank, comm); ++ struct iovec iov_left[2]; ++ struct iovec *iov_left_ptr; ++ size_t iov_num_left; ++#ifdef POSIX_AM_DEBUG ++ static int seq_num = 0; ++#endif /* POSIX_AM_DEBUG */ ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_ISEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_ISEND); ++ ++#ifdef POSIX_AM_DEBUG ++ msg_hdr.seq_num = seq_num++; ++#endif /* POSIX_AM_DEBUG */ ++ ++ MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); ++ ++ send_buf = (uint8_t *) data + dt_true_lb; ++ ++ msg_hdr.handler_id = handler_id; ++ msg_hdr.am_hdr_sz = am_hdr_sz; ++ msg_hdr.data_sz = data_sz; ++ ++ /* If the data being sent is not contiguous, pack it into a contiguous buffer using the datatype ++ * engine. */ ++ if (unlikely(!dt_contig && (data_sz > 0))) { ++ MPIDI_POSIX_AMREQUEST(sreq, req_hdr) = NULL; ++ ++ /* Prepare private storage with information about the pack buffer. */ ++ mpi_errno = MPIDI_POSIX_am_init_req_hdr(am_hdr, am_hdr_sz, ++ &MPIDI_POSIX_AMREQUEST(sreq, req_hdr), sreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ curr_sreq_hdr = MPIDI_POSIX_AMREQUEST(sreq, req_hdr); ++ ++ curr_sreq_hdr->pack_buffer = (char *) MPL_malloc(data_sz, MPL_MEM_SHM); ++ ++ MPIR_ERR_CHKANDJUMP1(MPIDI_POSIX_AMREQUEST_HDR(sreq, pack_buffer) == NULL, mpi_errno, ++ MPI_ERR_OTHER, "**nomem", "**nomem %s", "Send Pack buffer alloc"); ++ ++ MPI_Aint actual_pack_bytes; ++ mpi_errno = MPIR_Typerep_pack(data, count, datatype, 0, ++ MPIDI_POSIX_AMREQUEST_HDR(sreq, pack_buffer), ++ data_sz, &actual_pack_bytes); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Assert(actual_pack_bytes == data_sz); ++ ++ send_buf = (uint8_t *) curr_sreq_hdr->pack_buffer; ++ } ++ ++ iov_left[0].iov_base = (void *) am_hdr; ++ iov_left[0].iov_len = am_hdr_sz; ++ iov_left[1].iov_base = (void *) send_buf; ++ iov_left[1].iov_len = data_sz; ++ ++ iov_left_ptr = iov_left; ++ ++ iov_num_left = 2; ++ ++ /* If there's no data to send, the second iov can be empty and doesn't need to be transfered. */ ++ if (data_sz == 0) { ++ iov_num_left = 1; ++ } ++ ++ /* If we already have messages in the postponed queue, this one will probably also end up being ++ * queued so save some cycles and do it now. */ ++ if (unlikely(MPIDI_POSIX_global.postponed_queue)) { ++ mpi_errno = MPIDI_POSIX_am_enqueue_request(am_hdr, am_hdr_sz, handler_id, grank, msg_hdr, ++ msg_hdr_p, iov_left_ptr, iov_num_left, data_sz, ++ sreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ goto fn_exit; ++ } ++ ++ POSIX_TRACE("Direct OUT HDR [ POSIX AM [handler_id %" PRIu64 ", am_hdr_sz %" PRIu64 ++ ", data_sz %" PRIu64 ", seq_num = %d], " "tag = %d, src_rank = %d ] to %d\n", ++ (uint64_t) msg_hdr_p->handler_id, ++ (uint64_t) msg_hdr_p->am_hdr_sz, (uint64_t) msg_hdr_p->data_sz, ++#ifdef POSIX_AM_DEBUG ++ msg_hdr_p->seq_num, ++#else /* POSIX_AM_DEBUG */ ++ -1, ++#endif /* POSIX_AM_DEBUG */ ++ ((MPIDIG_hdr_t *) am_hdr)->tag, ((MPIDIG_hdr_t *) am_hdr)->src_rank, grank); ++ ++ result = MPIDI_POSIX_eager_send(grank, &msg_hdr_p, &iov_left_ptr, &iov_num_left); ++ ++ /* If the message was not completed, queue it to be sent later. */ ++ if (unlikely((MPIDI_POSIX_NOK == result) || iov_num_left)) { ++ mpi_errno = MPIDI_POSIX_am_enqueue_request(am_hdr, am_hdr_sz, handler_id, grank, msg_hdr, ++ msg_hdr_p, iov_left_ptr, iov_num_left, data_sz, ++ sreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ goto fn_exit; ++ } ++ ++ /* If we made it here, the request has been completed and we can clean up the tracking ++ * information and trigger the appropriate callbacks. */ ++ if (unlikely(curr_sreq_hdr)) { ++ MPL_free(curr_sreq_hdr->pack_buffer); ++ curr_sreq_hdr->pack_buffer = NULL; ++ } ++ ++ mpi_errno = MPIDIG_global.origin_cbs[handler_id] (sreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_AM_ISEND); + return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_isendv(int rank, +@@ -43,15 +229,44 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_isendv(int rank, + MPI_Count count, + MPI_Datatype datatype, MPIR_Request * sreq) + { +- int mpi_errno; ++ int mpi_errno = MPI_SUCCESS; ++ int is_allocated; ++ size_t am_hdr_sz = 0; ++ int i; ++ uint8_t *am_hdr_buf = NULL; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_ISENDV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_ISENDV); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_SEND_AMV); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_SEND_AMV); + +- mpi_errno = MPIDI_NM_am_isendv(rank, comm, handler_id, am_hdr, iov_len, data, count, datatype, +- sreq); ++ for (i = 0; i < iov_len; i++) { ++ am_hdr_sz += am_hdr[i].iov_len; ++ } + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_ISENDV); ++ if (am_hdr_sz > MPIDI_POSIX_BUF_POOL_SIZE) { ++ am_hdr_buf = (uint8_t *) MPL_malloc(am_hdr_sz, MPL_MEM_SHM); ++ is_allocated = 1; ++ } else { ++ am_hdr_buf = (uint8_t *) MPIDIU_get_buf(MPIDI_POSIX_global.am_buf_pool); ++ is_allocated = 0; ++ } ++ ++ MPIR_Assert(am_hdr_buf); ++ am_hdr_sz = 0; ++ ++ for (i = 0; i < iov_len; i++) { ++ MPIR_Memcpy(am_hdr_buf + am_hdr_sz, am_hdr[i].iov_base, am_hdr[i].iov_len); ++ am_hdr_sz += am_hdr[i].iov_len; ++ } ++ ++ mpi_errno = MPIDI_POSIX_am_isend(rank, comm, handler_id, am_hdr_buf, am_hdr_sz, ++ data, count, datatype, sreq); ++ ++ if (is_allocated) ++ MPL_free(am_hdr_buf); ++ else ++ MPIDIU_release_buf(am_hdr_buf); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_SEND_AMV); + + return mpi_errno; + } +@@ -64,78 +279,174 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_isend_reply(MPIR_Context_id_t contex + MPI_Count count, + MPI_Datatype datatype, MPIR_Request * sreq) + { +- int mpi_errno; ++ int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_ISEND_REPLY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_ISEND_REPLY); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_ISEND_REPLY); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_ISEND_REPLY); + +- mpi_errno = MPIDI_NM_am_isend_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data, +- count, datatype, sreq); ++ mpi_errno = MPIDI_POSIX_am_isend(src_rank, MPIDIG_context_id_to_comm(context_id), handler_id, ++ am_hdr, am_hdr_sz, data, count, datatype, sreq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_ISEND_REPLY); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_AM_ISEND_REPLY); + + return mpi_errno; + } + + MPL_STATIC_INLINE_PREFIX size_t MPIDI_POSIX_am_hdr_max_sz(void) + { +- size_t val; ++ /* Maximum size that fits in short send */ + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_HDR_MAX_SZ); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_HDR_MAX_SZ); ++ size_t max_shortsend = MPIDI_POSIX_DEFAULT_SHORT_SEND_SIZE - (sizeof(MPIDI_POSIX_am_header_t)); + +- val = MPIDI_NM_am_hdr_max_sz(); ++ /* Maximum payload size representable by MPIDI_POSIX_am_header_t::am_hdr_sz field */ + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_HDR_MAX_SZ); ++ size_t max_representable = (1 << MPIDI_POSIX_AM_HDR_SZ_BITS) - 1; + +- return val; ++ return MPL_MIN(max_shortsend, max_representable); + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_send_hdr(int rank, +- MPIR_Comm * comm, +- int handler_id, +- const void *am_hdr, size_t am_hdr_sz) ++/* Enqueue a request header onto the postponed message queue. This is a helper function and most ++ * likely shouldn't be used outside of this file. */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_enqueue_req_hdr(const void *am_hdr, size_t am_hdr_sz, ++ int handler_id, const int grank, ++ MPIDI_POSIX_am_header_t msg_hdr, ++ size_t iov_num_left) + { +- int mpi_errno; ++ MPIDI_POSIX_am_request_header_t *curr_sreq_hdr = NULL; ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_ENQUEUE_REQ_HDR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_ENQUEUE_REQ_HDR); ++ ++ /* Prepare private storage */ ++ mpi_errno = MPIDI_POSIX_am_init_req_hdr(am_hdr, am_hdr_sz, &curr_sreq_hdr, NULL); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_SEND_HDR); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_SEND_HDR); ++ curr_sreq_hdr->handler_id = handler_id; ++ curr_sreq_hdr->dst_grank = grank; ++ curr_sreq_hdr->msg_hdr = NULL; + +- mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz); ++ /* Header hasn't been sent so we should copy it from stack */ ++ curr_sreq_hdr->msg_hdr = &curr_sreq_hdr->msg_hdr_buf; ++ curr_sreq_hdr->msg_hdr_buf = msg_hdr; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_SEND_HDR); ++ curr_sreq_hdr->iov_num = iov_num_left; ++ curr_sreq_hdr->iov_ptr = curr_sreq_hdr->iov; ++ curr_sreq_hdr->iov[0].iov_base = curr_sreq_hdr->am_hdr; ++ curr_sreq_hdr->iov[0].iov_len = curr_sreq_hdr->am_hdr_sz; + ++ curr_sreq_hdr->request = NULL; ++ DL_APPEND(MPIDI_POSIX_global.postponed_queue, curr_sreq_hdr); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_AM_ENQUEUE_REQ_HDR); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_send_hdr(int rank, ++ MPIR_Comm * comm, ++ int handler_id, ++ const void *am_hdr, size_t am_hdr_sz) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int result = MPIDI_POSIX_OK; ++ MPIDI_POSIX_am_header_t msg_hdr; ++ MPIDI_POSIX_am_header_t *msg_hdr_p = &msg_hdr; ++ struct iovec iov_left[1]; ++ struct iovec *iov_left_ptr = iov_left; ++ size_t iov_num_left = 1; ++ const int grank = MPIDIU_rank_to_lpid(rank, comm); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_SEND_HDR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_SEND_HDR); ++ ++ iov_left[0].iov_base = (void *) am_hdr; ++ iov_left[0].iov_len = am_hdr_sz; ++ ++ msg_hdr.handler_id = handler_id; ++ msg_hdr.am_hdr_sz = am_hdr_sz; ++ msg_hdr.data_sz = 0; ++ ++ if (unlikely(MPIDI_POSIX_global.postponed_queue)) { ++ mpi_errno = MPIDI_POSIX_am_enqueue_req_hdr(am_hdr, am_hdr_sz, handler_id, grank, msg_hdr, ++ iov_num_left); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ ++ POSIX_TRACE("Direct OUT HDR [ POSIX AM HDR [handler_id %" PRIu64 ", am_hdr_sz %" PRIu64 ++ ", data_sz %" PRIu64 ", seq_num = %d]] to %d\n", ++ (uint64_t) msg_hdr_p->handler_id, ++ (uint64_t) msg_hdr_p->am_hdr_sz, (uint64_t) msg_hdr_p->data_sz, ++#ifdef POSIX_AM_DEBUG ++ msg_hdr_p->seq_num, ++#else /* POSIX_AM_DEBUG */ ++ -1, ++#endif /* POSIX_AM_DEBUG */ ++ grank); ++ ++ result = MPIDI_POSIX_eager_send(grank, &msg_hdr_p, &iov_left_ptr, &iov_num_left); ++ if (unlikely((MPIDI_POSIX_NOK == result) || iov_num_left)) { ++ mpi_errno = ++ MPIDI_POSIX_am_enqueue_req_hdr(am_hdr, am_hdr_sz, handler_id, grank, msg_hdr, ++ iov_num_left); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ else ++ goto fn_exit; ++ } ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_AM_SEND_HDR); + return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_send_hdr_reply(MPIR_Context_id_t context_id, + int src_rank, int handler_id, + const void *am_hdr, size_t am_hdr_sz) + { +- int mpi_errno; ++ int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_SEND_HDR_REPLY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_SEND_HDR_REPLY); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_SEND_AM_HDR_REPLY); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_SEND_AM_HDR_REPLY); + +- mpi_errno = MPIDI_NM_am_send_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz); ++ mpi_errno = MPIDI_POSIX_am_send_hdr(src_rank, MPIDIG_context_id_to_comm(context_id), handler_id, ++ am_hdr, am_hdr_sz); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_SEND_HDR_REPLY); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_SEND_AM_HDR_REPLY); + + return mpi_errno; + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_am_recv(MPIR_Request * req) + { +- int mpi_errno; ++ int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_RECV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_RECV); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_RECV); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_RECV); + +- mpi_errno = MPIDI_NM_am_recv(req); ++ MPIDIG_send_long_ack_msg_t msg; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_RECV); ++ msg.sreq_ptr = (MPIDIG_REQUEST(req, req->rreq.peer_req_ptr)); ++ msg.rreq_ptr = (uint64_t) req; ++ MPIR_Assert((void *) msg.sreq_ptr != NULL); ++ mpi_errno = MPIDI_POSIX_am_send_hdr_reply(MPIDIG_REQUEST(req, context_id), ++ MPIDIG_REQUEST(req, rank), MPIDIG_SEND_LONG_ACK, &msg, ++ sizeof(msg)); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_AM_RECV); + return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + #endif /* POSIX_AM_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_am_impl.h +@@ -0,0 +1,87 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef POSIX_AM_IMPL_H_INCLUDED ++#define POSIX_AM_IMPL_H_INCLUDED ++ ++#include "posix_types.h" ++#include "posix_impl.h" ++ ++static inline int MPIDI_POSIX_am_release_req_hdr(MPIDI_POSIX_am_request_header_t ** req_hdr_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_RELEASE_REQ_HDR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_RELEASE_REQ_HDR); ++ ++ if ((*req_hdr_ptr)->am_hdr != &(*req_hdr_ptr)->am_hdr_buf[0]) { ++ MPL_free((*req_hdr_ptr)->am_hdr); ++ } ++#ifndef POSIX_AM_REQUEST_INLINE ++ MPIDIU_release_buf((*req_hdr_ptr)); ++#endif ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_AM_RELEASE_REQ_HDR); ++ return mpi_errno; ++} ++ ++static inline int MPIDI_POSIX_am_init_req_hdr(const void *am_hdr, ++ size_t am_hdr_sz, ++ MPIDI_POSIX_am_request_header_t ** req_hdr_ptr, ++ MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_POSIX_am_request_header_t *req_hdr = *req_hdr_ptr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_INIT_REQ_HDR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_INIT_REQ_HDR); ++ ++#ifdef POSIX_AM_REQUEST_INLINE ++ if (req_hdr == NULL && sreq != NULL) { ++ req_hdr = &MPIDI_POSIX_AMREQUEST(sreq, req_hdr_buffer); ++ } ++#endif /* POSIX_AM_REQUEST_INLINE */ ++ ++ if (req_hdr == NULL) { ++ req_hdr = (MPIDI_POSIX_am_request_header_t *) ++ MPIDIU_get_buf(MPIDI_POSIX_global.am_buf_pool); ++ MPIR_ERR_CHKANDJUMP(!req_hdr, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ ++ req_hdr->am_hdr = (void *) &req_hdr->am_hdr_buf[0]; ++ req_hdr->am_hdr_sz = MPIDI_POSIX_MAX_AM_HDR_SIZE; ++ ++ req_hdr->pack_buffer = NULL; ++ ++ } ++ ++ /* If the header is larger than what we'd preallocated, get rid of the preallocated buffer and ++ * create a new one of the correct size. */ ++ if (am_hdr_sz > req_hdr->am_hdr_sz) { ++ if (req_hdr->am_hdr != &req_hdr->am_hdr_buf[0]) ++ MPL_free(req_hdr->am_hdr); ++ ++ req_hdr->am_hdr = MPL_malloc(am_hdr_sz, MPL_MEM_SHM); ++ MPIR_ERR_CHKANDJUMP(!(req_hdr->am_hdr), mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ ++ if (am_hdr) { ++ MPIR_Memcpy(req_hdr->am_hdr, am_hdr, am_hdr_sz); ++ } ++ ++ req_hdr->am_hdr_sz = am_hdr_sz; ++ *req_hdr_ptr = req_hdr; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_AM_INIT_REQ_HDR); ++ return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++#endif /* POSIX_AM_IMPL_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_coll.h ++++ b/src/mpid/ch4/shm/posix/posix_coll.h +@@ -16,11 +16,10 @@ + #include "ch4_coll_select.h" + #include "posix_coll_params.h" + #include "posix_coll_select.h" ++#ifdef ENABLE_IZEM_ATOMIC ++#include "posix_coll_release_gather.h" ++#endif + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag, + const void *ch4_algo_parameters_container_in) + { +@@ -53,10 +52,6 @@ static inline int MPIDI_POSIX_mpi_barrier(MPIR_Comm * comm, MPIR_Errflag_t * err + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_bcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag, + const void *ch4_algo_parameters_container_in) +@@ -85,6 +80,18 @@ static inline int MPIDI_POSIX_mpi_bcast(void *buffer, int count, MPI_Datatype da + MPIR_Bcast_intra_scatter_ring_allgather(buffer, count, datatype, + root, comm, errflag); + break; ++ case MPIDI_POSIX_Bcast_intra_release_gather_id: ++#ifdef ENABLE_IZEM_ATOMIC ++ mpi_errno = ++ MPIDI_POSIX_mpi_bcast_release_gather(buffer, count, datatype, root, comm, errflag); ++#else ++ /* else block is needed to keep the compiler happy */ ++ /* release_gather based algorithms cannot be used without izem submodule */ ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**noizem"); ++#endif ++ break; ++ case MPIDI_POSIX_Bcast_intra_invalid_id: ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**noizem"); + default: + mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, errflag); + break; +@@ -101,10 +108,6 @@ static inline int MPIDI_POSIX_mpi_bcast(void *buffer, int count, MPI_Datatype da + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_allreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag, +@@ -131,6 +134,17 @@ static inline int MPIDI_POSIX_mpi_allreduce(const void *sendbuf, void *recvbuf, + MPIR_Allreduce_intra_reduce_scatter_allgather(sendbuf, recvbuf, count, + datatype, op, comm, errflag); + break; ++ case MPIDI_POSIX_Allreduce_intra_release_gather_id: ++#ifdef ENABLE_IZEM_ATOMIC ++ mpi_errno = ++ MPIDI_POSIX_mpi_allreduce_release_gather(sendbuf, recvbuf, count, ++ datatype, op, comm, errflag); ++#else ++ /* else block is needed to keep the compiler happy */ ++ /* release_gather based algorithms cannot be used without izem submodule */ ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**noizem"); ++#endif ++ break; + default: + mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + break; +@@ -147,10 +161,6 @@ static inline int MPIDI_POSIX_mpi_allreduce(const void *sendbuf, void *recvbuf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -202,10 +212,6 @@ static inline int MPIDI_POSIX_mpi_allgather(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -258,10 +264,6 @@ static inline int MPIDI_POSIX_mpi_allgatherv(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag, +@@ -300,10 +302,6 @@ static inline int MPIDI_POSIX_mpi_gather(const void *sendbuf, int sendcount, MPI + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, const int *displs, + MPI_Datatype recvtype, int root, MPIR_Comm * comm, +@@ -345,10 +343,6 @@ static inline int MPIDI_POSIX_mpi_gatherv(const void *sendbuf, int sendcount, MP + + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag, +@@ -387,10 +381,6 @@ static inline int MPIDI_POSIX_mpi_scatter(const void *sendbuf, int sendcount, MP + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_scatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -431,10 +421,6 @@ static inline int MPIDI_POSIX_mpi_scatterv(const void *sendbuf, const int *sendc + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -490,10 +476,6 @@ static inline int MPIDI_POSIX_mpi_alltoall(const void *sendbuf, int sendcount, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_alltoallv(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +@@ -544,10 +526,6 @@ static inline int MPIDI_POSIX_mpi_alltoallv(const void *sendbuf, const int *send + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_alltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -599,10 +577,6 @@ static inline int MPIDI_POSIX_mpi_alltoallw(const void *sendbuf, const int sendc + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_reduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm, MPIR_Errflag_t * errflag, +@@ -629,6 +603,19 @@ static inline int MPIDI_POSIX_mpi_reduce(const void *sendbuf, void *recvbuf, int + MPIR_Reduce_intra_binomial(sendbuf, recvbuf, count, datatype, + op, root, comm, errflag); + break; ++ case MPIDI_POSIX_Reduce_intra_release_gather_id: ++#ifdef ENABLE_IZEM_ATOMIC ++ mpi_errno = ++ MPIDI_POSIX_mpi_reduce_release_gather(sendbuf, recvbuf, count, datatype, ++ op, root, comm, errflag); ++#else ++ /* else block is needed to keep the compiler happy */ ++ /* release_gather based algorithms cannot be used without izem submodule */ ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**noizem"); ++#endif ++ break; ++ case MPIDI_POSIX_Reduce_intra_invalid_id: ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**noizem"); + default: + mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, + root, comm, errflag); +@@ -646,10 +633,6 @@ static inline int MPIDI_POSIX_mpi_reduce(const void *sendbuf, void *recvbuf, int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, +@@ -704,10 +687,6 @@ static inline int MPIDI_POSIX_mpi_reduce_scatter(const void *sendbuf, void *recv + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, +@@ -765,10 +744,6 @@ static inline int MPIDI_POSIX_mpi_reduce_scatter_block(const void *sendbuf, void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_scan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag, +@@ -806,10 +781,6 @@ static inline int MPIDI_POSIX_mpi_scan(const void *sendbuf, void *recvbuf, int c + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_exscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Errflag_t * errflag, +@@ -847,10 +818,6 @@ static inline int MPIDI_POSIX_mpi_exscan(const void *sendbuf, void *recvbuf, int + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_neighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -867,10 +834,6 @@ static inline int MPIDI_POSIX_mpi_neighbor_allgather(const void *sendbuf, int se + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_neighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -887,10 +850,6 @@ static inline int MPIDI_POSIX_mpi_neighbor_allgatherv(const void *sendbuf, int s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_neighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -907,10 +866,6 @@ static inline int MPIDI_POSIX_mpi_neighbor_alltoall(const void *sendbuf, int sen + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -928,10 +883,6 @@ static inline int MPIDI_POSIX_mpi_neighbor_alltoallv(const void *sendbuf, const + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -951,10 +902,6 @@ static inline int MPIDI_POSIX_mpi_neighbor_alltoallw(const void *sendbuf, const + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ineighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -971,10 +918,6 @@ static inline int MPIDI_POSIX_mpi_ineighbor_allgather(const void *sendbuf, int s + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -992,10 +935,6 @@ static inline int MPIDI_POSIX_mpi_ineighbor_allgatherv(const void *sendbuf, int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ineighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -1012,10 +951,6 @@ static inline int MPIDI_POSIX_mpi_ineighbor_alltoall(const void *sendbuf, int se + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -1033,10 +968,6 @@ static inline int MPIDI_POSIX_mpi_ineighbor_alltoallv(const void *sendbuf, const + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], void *recvbuf, +@@ -1056,10 +987,6 @@ static inline int MPIDI_POSIX_mpi_ineighbor_alltoallw(const void *sendbuf, const + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ibarrier(MPIR_Comm * comm, MPIR_Request ** req) + { + int mpi_errno; +@@ -1072,10 +999,6 @@ static inline int MPIDI_POSIX_mpi_ibarrier(MPIR_Comm * comm, MPIR_Request ** req + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ibcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm, MPIR_Request ** req) + { +@@ -1089,10 +1012,6 @@ static inline int MPIDI_POSIX_mpi_ibcast(void *buffer, int count, MPI_Datatype d + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_iallgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -1109,10 +1028,6 @@ static inline int MPIDI_POSIX_mpi_iallgather(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_iallgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -1130,10 +1045,6 @@ static inline int MPIDI_POSIX_mpi_iallgatherv(const void *sendbuf, int sendcount + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ialltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm, +@@ -1150,10 +1061,6 @@ static inline int MPIDI_POSIX_mpi_ialltoall(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ialltoallv(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +@@ -1171,10 +1078,6 @@ static inline int MPIDI_POSIX_mpi_ialltoallv(const void *sendbuf, const int *sen + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ialltoallw(const void *sendbuf, const int *sendcounts, + const int *sdispls, const MPI_Datatype sendtypes[], + void *recvbuf, const int *recvcounts, +@@ -1192,10 +1095,6 @@ static inline int MPIDI_POSIX_mpi_ialltoallw(const void *sendbuf, const int *sen + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_iexscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request ** req) +@@ -1210,10 +1109,6 @@ static inline int MPIDI_POSIX_mpi_iexscan(const void *sendbuf, void *recvbuf, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + int root, MPIR_Comm * comm, MPIR_Request ** req) +@@ -1229,10 +1124,6 @@ static inline int MPIDI_POSIX_mpi_igather(const void *sendbuf, int sendcount, MP + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_igatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -1250,10 +1141,6 @@ static inline int MPIDI_POSIX_mpi_igatherv(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, +@@ -1269,10 +1156,6 @@ static inline int MPIDI_POSIX_mpi_ireduce_scatter_block(const void *sendbuf, voi + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm, MPIR_Request ** req) +@@ -1287,10 +1170,6 @@ static inline int MPIDI_POSIX_mpi_ireduce_scatter(const void *sendbuf, void *rec + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_ireduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm, MPIR_Request ** req) +@@ -1305,10 +1184,6 @@ static inline int MPIDI_POSIX_mpi_ireduce(const void *sendbuf, void *recvbuf, in + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_iallreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm, MPIR_Request ** req) +@@ -1323,10 +1198,6 @@ static inline int MPIDI_POSIX_mpi_iallreduce(const void *sendbuf, void *recvbuf, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_iscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + MPIR_Request ** req) +@@ -1341,10 +1212,6 @@ static inline int MPIDI_POSIX_mpi_iscan(const void *sendbuf, void *recvbuf, int + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_iscatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -1361,10 +1228,6 @@ static inline int MPIDI_POSIX_mpi_iscatter(const void *sendbuf, int sendcount, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_POSIX_mpi_iscatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, +--- a/src/mpid/ch4/shm/posix/posix_coll_containers.h ++++ b/src/mpid/ch4/shm/posix/posix_coll_containers.h +@@ -9,15 +9,21 @@ extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Bcast_intra_binomial_ + extern const MPIDI_POSIX_coll_algo_container_t + MPIDI_POSIX_Bcast_intra_scatter_recursive_doubling_allgather_cnt; + extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Bcast_intra_scatter_ring_allgather_cnt; ++extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Bcast_intra_invalid_cnt; ++extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Bcast_intra_release_gather_cnt; + + /* Reduce POSIX containers declaration */ + extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Reduce_intra_binomial_cnt; + extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Reduce_intra_reduce_scatter_gather_cnt; ++extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Reduce_intra_invalid_cnt; ++extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Reduce_intra_release_gather_cnt; + + /* Allreduce POSIX containers declaration */ + extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Allreduce_intra_recursive_doubling_cnt; + extern const MPIDI_POSIX_coll_algo_container_t + MPIDI_POSIX_Allreduce_intra_reduce_scatter_allgather_cnt; ++extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Allreduce_intra_invalid_cnt; ++extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Allreduce_intra_release_gather_cnt; + + /* Alltoall POSIX containers declaration */ + extern const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Alltoall_intra_brucks_cnt; +--- a/src/mpid/ch4/shm/posix/posix_coll_globals_default.c ++++ b/src/mpid/ch4/shm/posix/posix_coll_globals_default.c +@@ -1,3 +1,8 @@ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ + /* Barrier default POSIX containers initialization*/ + const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Barrier_intra_dissemination_cnt = { + .id = MPIDI_POSIX_Barrier_intra_dissemination_id +@@ -17,6 +22,14 @@ const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Bcast_intra_scatter_ring_all + .id = MPIDI_POSIX_Bcast_intra_scatter_ring_allgather_id + }; + ++const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Bcast_intra_invalid_cnt = { ++ .id = MPIDI_POSIX_Bcast_intra_invalid_id ++}; ++ ++const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Bcast_intra_release_gather_cnt = { ++ .id = MPIDI_POSIX_Bcast_intra_release_gather_id ++}; ++ + /* Reduce default POSIX containers initialization*/ + const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Reduce_intra_reduce_scatter_gather_cnt = { + .id = MPIDI_POSIX_Reduce_intra_reduce_scatter_gather_id +@@ -26,6 +39,14 @@ const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Reduce_intra_binomial_cnt = + .id = MPIDI_POSIX_Reduce_intra_binomial_id + }; + ++const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Reduce_intra_invalid_cnt = { ++ .id = MPIDI_POSIX_Reduce_intra_invalid_id ++}; ++ ++const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Reduce_intra_release_gather_cnt = { ++ .id = MPIDI_POSIX_Reduce_intra_release_gather_id ++}; ++ + /* Allreduce default POSIX containers initialization*/ + const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Allreduce_intra_recursive_doubling_cnt = { + .id = MPIDI_POSIX_Allreduce_intra_recursive_doubling_id +@@ -35,6 +56,14 @@ const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Allreduce_intra_reduce_scatt + .id = MPIDI_POSIX_Allreduce_intra_reduce_scatter_allgather_id + }; + ++const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Allreduce_intra_invalid_cnt = { ++ .id = MPIDI_POSIX_Allreduce_intra_invalid_id ++}; ++ ++const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Allreduce_intra_release_gather_cnt = { ++ .id = MPIDI_POSIX_Allreduce_intra_release_gather_id ++}; ++ + /* Alltoall default POSIX containers initialization */ + const MPIDI_POSIX_coll_algo_container_t MPIDI_POSIX_Alltoall_intra_pairwise_sendrecv_replace_cnt = { + .id = MPIDI_POSIX_Alltoall_intra_pairwise_sendrecv_replace_id +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_coll_init.c +@@ -0,0 +1,107 @@ ++ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++cvars: ++ - name : MPIR_CVAR_BCAST_POSIX_INTRA_ALGORITHM ++ category : COLLECTIVE ++ type : string ++ default : auto ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Variable to select algorithm for intra-node bcast ++ auto - Internal algorithm selection from pt2pt based algorithms ++ release_gather - Force shm optimized algo using release, gather primitives ++ (izem submodule should be build and enabled for this) ++ ++ - name : MPIR_CVAR_REDUCE_POSIX_INTRA_ALGORITHM ++ category : COLLECTIVE ++ type : string ++ default : auto ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Variable to select algorithm for intra-node reduce ++ auto - Internal algorithm selection from pt2pt based algorithms ++ release_gather - Force shm optimized algo using release, gather primitives ++ (izem submodule should be build and enabled for this) ++ ++ - name : MPIR_CVAR_ALLREDUCE_POSIX_INTRA_ALGORITHM ++ category : COLLECTIVE ++ type : string ++ default : auto ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Variable to select algorithm for intra-node allreduce ++ auto - Internal algorithm selection from pt2pt based algorithms ++ release_gather - Force shm optimized algo using release, gather primitives ++ (izem submodule should be build and enabled for this) ++ ++ - name : MPIR_CVAR_MAX_POSIX_RELEASE_GATHER_ALLREDUCE_MSG_SIZE ++ category : COLLECTIVE ++ type : int ++ default : 8192 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Maximum message size for which release, gather primivites based allreduce is used when all ++ the ranks in the communicator are on the same node. This CVAR is used only when ++ MPIR_CVAR_ALLREDUCE_POSIX_INTRA_ALGORITHM is set to "release_gather". Default value of this ++ CVAR is same as cellsize of reduce buffers, because beyond that large messages are getting ++ chuncked and performance can be compromised. ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++MPIDI_POSIX_Bcast_id_t MPIDI_POSIX_Bcast_algo_choice = MPIDI_POSIX_Bcast_intra_auto_id; ++MPIDI_POSIX_Reduce_id_t MPIDI_POSIX_Reduce_algo_choice = MPIDI_POSIX_Reduce_intra_auto_id; ++MPIDI_POSIX_Allreduce_id_t MPIDI_POSIX_Allreduce_algo_choice = MPIDI_POSIX_Allreduce_intra_auto_id; ++ ++int collective_cvars_init(void); ++ ++int collective_cvars_init(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ /* Bcast */ ++ if (0 == strcmp(MPIR_CVAR_BCAST_POSIX_INTRA_ALGORITHM, "release_gather")) ++ MPIDI_POSIX_Bcast_algo_choice = MPIDI_POSIX_Bcast_intra_release_gather_id; ++ else ++ MPIDI_POSIX_Bcast_algo_choice = MPIDI_POSIX_Bcast_intra_auto_id; ++ ++ /* Reduce */ ++ if (0 == strcmp(MPIR_CVAR_REDUCE_POSIX_INTRA_ALGORITHM, "release_gather")) ++ MPIDI_POSIX_Reduce_algo_choice = MPIDI_POSIX_Reduce_intra_release_gather_id; ++ else ++ MPIDI_POSIX_Reduce_algo_choice = MPIDI_POSIX_Reduce_intra_auto_id; ++ ++ /* Allreduce */ ++ if (0 == strcmp(MPIR_CVAR_ALLREDUCE_POSIX_INTRA_ALGORITHM, "release_gather")) ++ MPIDI_POSIX_Allreduce_algo_choice = MPIDI_POSIX_Allreduce_intra_release_gather_id; ++ else ++ MPIDI_POSIX_Allreduce_algo_choice = MPIDI_POSIX_Allreduce_intra_auto_id; ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpid/ch4/shm/posix/posix_coll_params.h ++++ b/src/mpid/ch4/shm/posix/posix_coll_params.h +@@ -15,7 +15,10 @@ typedef union { + typedef enum { + MPIDI_POSIX_Bcast_intra_binomial_id, + MPIDI_POSIX_Bcast_intra_scatter_recursive_doubling_allgather_id, +- MPIDI_POSIX_Bcast_intra_scatter_ring_allgather_id ++ MPIDI_POSIX_Bcast_intra_scatter_ring_allgather_id, ++ MPIDI_POSIX_Bcast_intra_auto_id, ++ MPIDI_POSIX_Bcast_intra_invalid_id, ++ MPIDI_POSIX_Bcast_intra_release_gather_id + } MPIDI_POSIX_Bcast_id_t; + + typedef union { +@@ -24,35 +27,65 @@ typedef union { + int radix; + int block_size; + } posix_bcast_knomial_parameters; ++ struct MPIDI_POSIX_Bcast_release_gather_parameters { ++ int radix; ++ int tree_type; ++ int buffer_size; ++ int num_buffers; ++ } posix_bcast_release_gather_parameters; + struct MPIDI_POSIX_Bcast_empty_parameters { + int empty; + } posix_bcast_empty_parameters; + } MPIDI_POSIX_Bcast_params_t; + ++extern MPIDI_POSIX_Bcast_id_t MPIDI_POSIX_Bcast_algo_choice; ++ + typedef enum { + MPIDI_POSIX_Reduce_intra_reduce_scatter_gather_id, +- MPIDI_POSIX_Reduce_intra_binomial_id ++ MPIDI_POSIX_Reduce_intra_binomial_id, ++ MPIDI_POSIX_Reduce_intra_auto_id, ++ MPIDI_POSIX_Reduce_intra_invalid_id, ++ MPIDI_POSIX_Reduce_intra_release_gather_id + } MPIDI_POSIX_Reduce_id_t; + + typedef union { + /* reserved for parameters related to SHM specific collectives */ ++ struct MPIDI_POSIX_Reduce_release_gather_parameters { ++ int radix; ++ int tree_type; ++ int buffer_size; ++ int num_buffers; ++ } posix_reduce_release_gather_parameters; + struct MPIDI_POSIX_Reduce_empty_parameters { + int empty; + } posix_reduce_empty_parameters; + } MPIDI_POSIX_Reduce_params_t; + ++extern MPIDI_POSIX_Reduce_id_t MPIDI_POSIX_Reduce_algo_choice; ++ + typedef enum { + MPIDI_POSIX_Allreduce_intra_recursive_doubling_id, +- MPIDI_POSIX_Allreduce_intra_reduce_scatter_allgather_id ++ MPIDI_POSIX_Allreduce_intra_reduce_scatter_allgather_id, ++ MPIDI_POSIX_Allreduce_intra_auto_id, ++ MPIDI_POSIX_Allreduce_intra_invalid_id, ++ MPIDI_POSIX_Allreduce_intra_release_gather_id + } MPIDI_POSIX_Allreduce_id_t; + + typedef union { + /* reserved for parameters related to SHM specific collectives */ ++ struct MPIDI_POSIX_Allreduce_release_gather_parameters { ++ int radix; ++ int tree_type; ++ int buffer_size; ++ int num_buffers; ++ } posix_allreduce_release_gather_parameters; + struct MPIDI_POSIX_Allreduce_empty_parameters { + int empty; + } posix_allreduce_empty_parameters; + } MPIDI_POSIX_Allreduce_params_t; + ++extern MPIDI_POSIX_Allreduce_id_t MPIDI_POSIX_Allreduce_algo_choice; ++ + typedef enum { + MPIDI_POSIX_Alltoall_intra_brucks_id, + MPIDI_POSIX_Alltoall_intra_scattered_id, +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_coll_release_gather.h +@@ -0,0 +1,384 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef POSIX_COLL_RELEASE_GATHER_H_INCLUDED ++#define POSIX_COLL_RELEASE_GATHER_H_INCLUDED ++ ++#include "mpiimpl.h" ++#include "algo_common.h" ++#include "release_gather.h" ++ ++/* Intra-node bcast is implemented as a release step followed by gather step in release_gather ++ * framework. The actual data movement happens in release step. Gather step makes sure that ++ * the shared bcast buffer can be reused for next bcast call. Release gather framework has ++ * multitple cells in bcast buffer, so that the copying in next cell can be overlapped with ++ * copying out of previous cells (pipelining). ++ */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_bcast_release_gather(void *buffer, ++ int count, ++ MPI_Datatype datatype, ++ int root, MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_MPI_BCAST_RELEASE_GATHER); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_MPI_BCAST_RELEASE_GATHER); ++ ++ int i, my_rank, num_chunks, chunk_count_floor, chunk_count_ceil; ++ int offset = 0, is_contig, ori_count = count; ++ int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; ++ MPI_Aint position; ++ MPI_Aint lb, true_extent, extent, type_size; ++ void *ori_buffer = buffer; ++ MPI_Datatype ori_datatype = datatype; ++ ++ /* If there is only one process or no data, return */ ++ if (count == 0 || (MPIR_Comm_size(comm_ptr) == 1)) { ++ goto fn_exit; ++ } ++ ++ /* Lazy initialization of release_gather specific struct */ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_comm_init(comm_ptr, MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST); ++ if (mpi_errno) { ++ /* Fall back to other algo as release_gather based bcast cannot be used */ ++ mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm_ptr, errflag); ++ goto fn_exit; ++ } ++ ++ my_rank = MPIR_Comm_rank(comm_ptr); ++ MPIR_Type_get_extent_impl(datatype, &lb, &extent); ++ MPIR_Type_get_true_extent_impl(datatype, &lb, &true_extent); ++ extent = MPL_MAX(extent, true_extent); ++ ++ MPIR_Datatype_is_contig(datatype, &is_contig); ++ ++ if (is_contig) { ++ MPIR_Datatype_get_size_macro(datatype, type_size); ++ } else { ++ MPIR_Pack_size_impl(1, datatype, &type_size); ++ } ++ ++ if (!is_contig || type_size >= MPIDI_POSIX_RELEASE_GATHER_BCAST_CELLSIZE) { ++ /* Convert to MPI_BYTE datatype */ ++ count = type_size * count; ++ datatype = MPI_BYTE; ++ type_size = 1; ++ extent = 1; ++ ++ if (!is_contig) { ++ buffer = MPL_malloc(count, MPL_MEM_COLL); ++ if (my_rank == root) { ++ /* Root packs the data before sending, for non contiguous datatypes */ ++ position = 0; ++ mpi_errno = ++ MPIR_Typerep_pack(ori_buffer, ori_count, ori_datatype, buffer, count, ++ &position); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ } ++ } ++ ++ /* Calculate chunking information for pipelining */ ++ MPIR_Algo_calculate_pipeline_chunk_info(MPIDI_POSIX_RELEASE_GATHER_BCAST_CELLSIZE, type_size, ++ count, &num_chunks, &chunk_count_floor, ++ &chunk_count_ceil); ++ /* Print chunking information */ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, ++ "Bcast shmgr pipeline info: segsize=%d count=%d num_chunks=%d chunk_count_floor=%d chunk_count_ceil=%d \n", ++ MPIDI_POSIX_RELEASE_GATHER_BCAST_CELLSIZE, count, ++ num_chunks, chunk_count_floor, chunk_count_ceil)); ++ ++ /* Do pipelined release-gather */ ++ for (i = 0; i < num_chunks; i++) { ++ int chunk_count = (i == 0) ? chunk_count_floor : chunk_count_ceil; ++ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_release((char *) buffer + offset * extent, ++ chunk_count, datatype, root, comm_ptr, ++ errflag, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_gather(NULL, NULL, 0, MPI_DATATYPE_NULL, ++ MPI_OP_NULL, root, comm_ptr, errflag, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ offset += chunk_count; ++ } ++ ++ if (!is_contig) { ++ if (my_rank != root) { ++ /* Non-root unpack the data if expecting non-contiguous datatypes */ ++ position = 0; ++ mpi_errno = ++ MPIR_Typerep_unpack(buffer, count, &position, ori_buffer, ori_count, ori_datatype); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ MPL_free(buffer); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_BCAST_RELEASE_GATHER); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Intra-node reduce is implemented as a release step followed by gather step in release_gather ++ * framework. The actual data movement happens in gather step. Release step makes sure that ++ * the shared reduce buffer can be reused for next reduce call. Release gather framework has ++ * multitple cells in reduce buffer, so that the copying in next cell can be overlapped with ++ * reduction and copying out of previous cells (pipelining). ++ */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce_release_gather(const void *sendbuf, ++ void *recvbuf, int count, ++ MPI_Datatype datatype, ++ MPI_Op op, int root, ++ MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag) ++{ ++ int i, num_chunks, chunk_size_floor, chunk_size_ceil; ++ int offset = 0, is_contig; ++ int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; ++ MPI_Aint lb, true_extent, extent, type_size; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_MPI_REDUCE_RELEASE_GATHER); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_MPI_REDUCE_RELEASE_GATHER); ++ ++ /* If there is no data, return */ ++ if (count == 0) { ++ goto fn_exit; ++ } ++ ++ if ((MPIR_Comm_size(comm_ptr) == 1) && (sendbuf != MPI_IN_PLACE)) { ++ /* Simply copy the data from sendbuf to recvbuf if there is only 1 rank and MPI_IN_PLACE ++ * is not used */ ++ mpi_errno = MPIR_Localcopy(sendbuf, count, datatype, recvbuf, count, datatype); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ goto fn_exit; ++ } ++ ++ /* Lazy initialization of release_gather specific struct */ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_comm_init(comm_ptr, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE); ++ if (mpi_errno) { ++ /* Fall back to other algo as release_gather algo cannot be used */ ++ mpi_errno = ++ MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag); ++ goto fn_exit; ++ } ++ ++ MPIR_Type_get_extent_impl(datatype, &lb, &extent); ++ MPIR_Type_get_true_extent_impl(datatype, &lb, &true_extent); ++ extent = MPL_MAX(extent, true_extent); ++ ++ MPIR_Datatype_is_contig(datatype, &is_contig); ++ ++ if (is_contig) { ++ MPIR_Datatype_get_size_macro(datatype, type_size); ++ } else { ++ MPIR_Pack_size_impl(1, datatype, &type_size); ++ } ++ ++ if (sendbuf == MPI_IN_PLACE) { ++ sendbuf = recvbuf; ++ } ++ ++ /* Calculate chunking information, taking max(extent, type_size) handles contiguous and non-contiguous datatypes both */ ++ MPIR_Algo_calculate_pipeline_chunk_info(MPIDI_POSIX_RELEASE_GATHER_REDUCE_CELLSIZE, ++ MPL_MAX(extent, type_size), count, &num_chunks, ++ &chunk_size_floor, &chunk_size_ceil); ++ ++ /* Print chunking information */ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, ++ "Reduce shmgr pipeline info: segsize=%d count=%d num_chunks=%d chunk_size_floor=%d chunk_size_ceil=%d \n", ++ MPIDI_POSIX_RELEASE_GATHER_REDUCE_CELLSIZE, count, ++ num_chunks, chunk_size_floor, chunk_size_ceil)); ++ ++ /* Do pipelined release-gather */ ++ for (i = 0; i < num_chunks; i++) { ++ int chunk_count = (i == 0) ? chunk_size_floor : chunk_size_ceil; ++ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_release(NULL, 0, MPI_DATATYPE_NULL, root, ++ comm_ptr, errflag, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_gather((char *) sendbuf + offset * extent, ++ (char *) recvbuf + offset * extent, ++ chunk_count, datatype, op, root, comm_ptr, ++ errflag, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ offset += chunk_count; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_MPI_REDUCE_RELEASE_GATHER); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Intra-node allreduce is implemented as a gather step followed by a release step in release_gather ++ * framework. The data reduction happens in gather step. Release step is responsible to broadcast the ++ * reduced data. ++ */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allreduce_release_gather(const void *sendbuf, ++ void *recvbuf, ++ int count, ++ MPI_Datatype datatype, ++ MPI_Op op, ++ MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag) ++{ ++ int i, num_chunks, chunk_size_floor, chunk_size_ceil; ++ int offset = 0, is_contig; ++ int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; ++ MPI_Aint lb, true_extent, extent, type_size; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_MPI_ALLREDUCE_RELEASE_GATHER); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_MPI_ALLREDUCE_RELEASE_GATHER); ++ ++ if ((MPIR_Comm_size(comm_ptr) == 1) && (sendbuf != MPI_IN_PLACE)) { ++ /* Simply copy the data from sendbuf to recvbuf if there is only 1 rank and MPI_IN_PLACE ++ * is not used */ ++ mpi_errno = MPIR_Localcopy(sendbuf, count, datatype, recvbuf, count, datatype); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ goto fn_exit; ++ } ++ ++ /* Lazy initialization of release_gather specific struct */ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_comm_init(comm_ptr, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE); ++ if (mpi_errno) { ++ /* Fall back to other algo as release_gather algo cannot be used */ ++ mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); ++ goto fn_exit; ++ } ++ ++ MPIR_Type_get_extent_impl(datatype, &lb, &extent); ++ MPIR_Type_get_true_extent_impl(datatype, &lb, &true_extent); ++ extent = MPL_MAX(extent, true_extent); ++ ++ MPIR_Datatype_is_contig(datatype, &is_contig); ++ ++ if (is_contig) { ++ MPIR_Datatype_get_size_macro(datatype, type_size); ++ } else { ++ MPIR_Pack_size_impl(1, datatype, &type_size); ++ } ++ ++ if (sendbuf == MPI_IN_PLACE) { ++ sendbuf = recvbuf; ++ } ++ ++ /* Calculate chunking information, taking max(extent, type_size) handles contiguous and non-contiguous datatypes both */ ++ MPIR_Algo_calculate_pipeline_chunk_info(MPIDI_POSIX_RELEASE_GATHER_REDUCE_CELLSIZE, ++ MPL_MAX(extent, type_size), count, &num_chunks, ++ &chunk_size_floor, &chunk_size_ceil); ++ ++ /* Print chunking information */ ++ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, ++ "Reduce shmgr pipeline info: segsize=%d count=%d num_chunks=%d chunk_size_floor=%d chunk_size_ceil=%d \n", ++ MPIDI_POSIX_RELEASE_GATHER_REDUCE_CELLSIZE, count, ++ num_chunks, chunk_size_floor, chunk_size_ceil)); ++ ++ /* Do pipelined release-gather */ ++ for (i = 0; i < num_chunks; i++) { ++ int chunk_count = (i == 0) ? chunk_size_floor : chunk_size_ceil; ++ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_gather((char *) sendbuf + offset * extent, ++ (char *) recvbuf + offset * extent, ++ chunk_count, datatype, op, 0, comm_ptr, ++ errflag, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ mpi_errno = ++ MPIDI_POSIX_mpi_release_gather_release((char *) recvbuf + offset * extent, chunk_count, ++ datatype, 0, ++ comm_ptr, errflag, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ offset += chunk_count; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_MPI_ALLREDUCE_RELEASE_GATHER); ++ return mpi_errno; ++} ++ ++#endif /* POSIX_COLL_RELEASE_GATHER_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_coll_select.h ++++ b/src/mpid/ch4/shm/posix/posix_coll_select.h +@@ -26,8 +26,27 @@ MPIDI_POSIX_coll_algo_container_t *MPIDI_POSIX_Bcast_select(void *buffer, + int nbytes = 0; + MPI_Aint type_size = 0; + +- MPIR_Datatype_get_size_macro(datatype, type_size); ++ if (MPIDI_POSIX_Bcast_algo_choice == MPIDI_POSIX_Bcast_intra_release_gather_id) { ++ /* release_gather based algorithm can be used only if izem submodule is built (and enabled) ++ * and MPICH is not multi-threaded */ ++#ifdef ENABLE_IZEM_ATOMIC ++#ifdef MPICH_IS_THREADED ++ if (!MPIR_ThreadInfo.isThreaded) { ++ /* MPICH configured with threading support but not actually used */ ++ return &MPIDI_POSIX_Bcast_intra_release_gather_cnt; ++ } ++#else ++ /* MPICH not configured with threading support */ ++ return &MPIDI_POSIX_Bcast_intra_release_gather_cnt; ++#endif /* MPICH_IS_THREADED */ ++#else ++ /* release_gather algo is chosen through CVAR but izem is not built */ ++ return &MPIDI_POSIX_Bcast_intra_invalid_cnt; ++#endif /* ENABLE_IZEM_ATOMIC */ ++ } + ++ /* Choose from pt2pt based algorithms */ ++ MPIR_Datatype_get_size_macro(datatype, type_size); + nbytes = type_size * count; + + if ((nbytes < MPIR_CVAR_BCAST_SHORT_MSG_SIZE) || (comm->local_size < MPIR_CVAR_BCAST_MIN_PROCS)) { +@@ -58,6 +77,30 @@ MPIDI_POSIX_coll_algo_container_t *MPIDI_POSIX_Allreduce_select(const void *send + int pof2 = 0; + + MPIR_Datatype_get_size_macro(datatype, type_size); ++ ++ if (MPIDI_POSIX_Allreduce_algo_choice == MPIDI_POSIX_Allreduce_intra_release_gather_id && ++ (count * type_size) <= MPIR_CVAR_MAX_POSIX_RELEASE_GATHER_ALLREDUCE_MSG_SIZE && ++ MPIR_Op_is_commutative(op)) { ++ /* release_gather based algorithm can be used only if izem submodule is built (and enabled) ++ * and MPICH is not multi-threaded. Also when the message size is less than the threshold (for ++ * performance reasons) and op is commutative */ ++#ifdef ENABLE_IZEM_ATOMIC ++#ifdef MPICH_IS_THREADED ++ if (!MPIR_ThreadInfo.isThreaded) { ++ /* MPICH configured with threading support but not actually used */ ++ return &MPIDI_POSIX_Allreduce_intra_release_gather_cnt; ++ } ++#else ++ /* MPICH not configured with threading support */ ++ return &MPIDI_POSIX_Allreduce_intra_release_gather_cnt; ++#endif /* MPICH_IS_THREADED */ ++#else ++ /* release_gather algo is chosen through CVAR but izem is not built */ ++ return &MPIDI_POSIX_Allreduce_intra_invalid_cnt; ++#endif /* ENABLE_IZEM_ATOMIC */ ++ } ++ ++ /* Choose from pt2pt based algorithms */ + pof2 = comm->pof2; + if ((count * type_size <= MPIR_CVAR_ALLREDUCE_SHORT_MSG_SIZE) || + (HANDLE_GET_KIND(op) != HANDLE_KIND_BUILTIN) || (count < pof2)) { +@@ -82,6 +125,27 @@ MPIDI_POSIX_coll_algo_container_t *MPIDI_POSIX_Reduce_select(const void *sendbuf + MPI_Aint type_size = 0; + int pof2 = 0; + ++ if (MPIDI_POSIX_Reduce_algo_choice == MPIDI_POSIX_Reduce_intra_release_gather_id && ++ MPIR_Op_is_commutative(op)) { ++ /* release_gather based algorithm can be used only if izem submodule is built (and enabled) ++ * and MPICH is not multi-threaded. Also when the op is commutative */ ++#ifdef ENABLE_IZEM_ATOMIC ++#ifdef MPICH_IS_THREADED ++ if (!MPIR_ThreadInfo.isThreaded) { ++ /* MPICH configured with threading support but not actually used */ ++ return &MPIDI_POSIX_Reduce_intra_release_gather_cnt; ++ } ++#else ++ /* MPICH not configured with threading support */ ++ return &MPIDI_POSIX_Reduce_intra_release_gather_cnt; ++#endif /* MPICH_IS_THREADED */ ++#else ++ /* release_gather algo is chosen through CVAR but izem is not built */ ++ return &MPIDI_POSIX_Reduce_intra_invalid_cnt; ++#endif /* ENABLE_IZEM_ATOMIC */ ++ } ++ ++ /* Choose from pt2pt based algorithms */ + MPIR_Datatype_get_size_macro(datatype, type_size); + pof2 = comm->pof2; + if ((count * type_size > MPIR_CVAR_REDUCE_SHORT_MSG_SIZE) && +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_comm.c +@@ -0,0 +1,49 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "posix_noinline.h" ++#ifdef ENABLE_IZEM_ATOMIC ++#include "release_gather.h" ++#endif ++ ++int MPIDI_POSIX_mpi_comm_create_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_CREATE_HOOK); ++ ++#ifdef ENABLE_IZEM_ATOMIC ++ /* Release_gather primitives based collective algorithm works for Intra-comms only */ ++ if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ mpi_errno = MPIDI_POSIX_mpi_release_gather_comm_init_null(comm); ++ } ++#endif ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_CREATE_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_comm_free_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_FREE_HOOK); ++ ++#ifdef ENABLE_IZEM_ATOMIC ++ /* Release_gather primitives based collective algorithm works for Intra-comms only */ ++ if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ mpi_errno = MPIDI_POSIX_mpi_release_gather_comm_free(comm); ++ } ++#endif ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_FREE_HOOK); ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/posix/posix_comm.h ++++ /dev/null +@@ -1,45 +0,0 @@ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef POSIX_COMM_H_INCLUDED +-#define POSIX_COMM_H_INCLUDED +- +-#include "posix_impl.h" +-#include "utlist.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_comm_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_POSIX_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_CREATE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_CREATE_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_comm_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_POSIX_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_FREE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_FREE_HOOK); +- return mpi_errno; +-} +- +- +-#endif /* POSIX_COMM_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_datatype.c +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "posix_noinline.h" ++ ++int MPIDI_POSIX_mpi_type_commit_hook(MPIR_Datatype * type) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_TYPE_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_TYPE_CREATE_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_TYPE_CREATE_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_type_free_hook(MPIR_Datatype * type) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_TYPE_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_TYPE_FREE_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_TYPE_FREE_HOOK); ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/posix/posix_datatypes.h ++++ /dev/null +@@ -1,183 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef POSIX_DATATYPES_H_INCLUDED +-#define POSIX_DATATYPES_H_INCLUDED +- +-/* ************************************************************************** */ +-/* from mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h */ +-/* ************************************************************************** */ +- +-#define MPIDI_POSIX_OFFSETOF(struc, field) ((int)(&((struc *)0)->field)) +-#define MPIDI_POSIX_CACHE_LINE_LEN (64) +-#define MPIDI_POSIX_NUM_CELLS (64) +-#define MPIDI_POSIX_CELL_LEN (64*1024) +- +-#if (SIZEOF_OPA_PTR_T > 8) +-#if (SIZEOF_OPA_PTR_T > 16) +-#error unexpected size for OPA_ptr_t +-#endif +-#define MPIDI_POSIX_CELL_HEAD_LEN 16 /* We use this to keep elements 64-bit aligned */ +-#else /* (SIZEOF_OPA_PTR_T <= 8) */ +-#define MPIDI_POSIX_CELL_HEAD_LEN 8 /* We use this to keep elements 64-bit aligned */ +-#endif +- +-/* cell header with matching info now is cache line */ +-#define MPIDI_POSIX_CELL_PAYLOAD_LEN (MPIDI_POSIX_CELL_LEN - MPIDI_POSIX_CACHE_LINE_LEN + MPIDI_POSIX_MPICH_HEAD_LEN) +- +-#define MPIDI_POSIX_CALC_CELL_LEN(cellp) (MPIDI_POSIX_CELL_HEAD_LEN + MPIDI_POSIX_MPICH_HEAD_LEN + MPIDI_POSIX_CELL_DLEN (cell)) +- +-#define MPIDI_POSIX_ALIGNED(addr, bytes) ((((unsigned long)addr) & (((unsigned long)bytes)-1)) == 0) +- +-#define MPIDI_POSIX_PKT_UNKNOWN 0 +-#define MPIDI_POSIX_PKT_MPICH 1 +-#define MPIDI_POSIX_PKT_MPICH_HEAD 2 +- +-#define MPIDI_POSIX_FBOX_SOURCE(cell) (MPIDI_POSIX_mem_region.local_procs[(cell)->pkt.mpich.source]) +-#define MPIDI_POSIX_CELL_SOURCE(cell) ((cell)->pkt.mpich.source) +-#define MPIDI_POSIX_CELL_DEST(cell) ((cell)->pkt.mpich.dest) +-#define MPIDI_POSIX_CELL_DLEN(cell) ((cell)->pkt.mpich.datalen) +-#define MPIDI_POSIX_CELL_SEQN(cell) ((cell)->pkt.mpich.seqno) +- +-#define MPIDI_POSIX_MPICH_HEAD_LEN sizeof(MPIDI_POSIX_pkt_header_t) +-#define MPIDI_POSIX_DATA_LEN (MPIDI_POSIX_CELL_PAYLOAD_LEN - MPIDI_POSIX_MPICH_HEAD_LEN) +- +-#define MPIDI_POSIX_PKT_HEADER_FIELDS \ +- int source; \ +- int dest; \ +- uintptr_t datalen; \ +- unsigned short seqno; \ +- unsigned short type; /* currently used only with checkpointing */ +- +-typedef struct MPIDI_POSIX_pkt_header { +-MPIDI_POSIX_PKT_HEADER_FIELDS} MPIDI_POSIX_pkt_header_t; +- +-typedef struct MPIDI_POSIX_pkt_mpich { +- MPIDI_POSIX_PKT_HEADER_FIELDS union { +- char payload[MPIDI_POSIX_DATA_LEN]; +- double dummy; /* align paylod to double */ +- } p; +-} MPIDI_POSIX_pkt_mpich_t; +- +-typedef union { +- MPIDI_POSIX_pkt_header_t header; +- MPIDI_POSIX_pkt_mpich_t mpich; +-} MPIDI_POSIX_pkt_t; +- +-/* Nemesis cells which are to be used in shared memory need to use +- * "relative pointers" because the absolute pointers to a cell from +- * different processes may be different. Relative pointers are +- * offsets from the beginning of the mmapped region where they live. +- * We use different types for relative and absolute pointers to help +- * catch errors. Use MPIDI_POSIX_REL_TO_ABS and MPIDI_POSIX_ABS_TO_REL to +- * convert between relative and absolute pointers. */ +- +-/* This should always be exactly the size of a pointer */ +-typedef struct MPIDI_POSIX_cell_rel_ptr { +- OPA_ptr_t p; +-} MPIDI_POSIX_cell_rel_ptr_t; +- +-/* MPIDI_POSIX_cell and MPIDI_POSIX_abs_cell must be kept in sync so that we +- * can cast between them. MPIDI_POSIX_abs_cell should only be used when +- * a cell is enqueued on a queue local to a single process (e.g., a +- * queue in a network module) where relative pointers are not +- * needed. */ +- +-typedef struct MPIDI_POSIX_cell { +- MPIDI_POSIX_cell_rel_ptr_t next; +-#if (MPIDI_POSIX_CELL_HEAD_LEN > SIZEOF_OPA_PTR_T) +- char padding[MPIDI_POSIX_CELL_HEAD_LEN - sizeof(MPIDI_POSIX_cell_rel_ptr_t)]; +-#endif +- int my_rank; +- int rank; +- int tag; +- int context_id; +- MPIR_Request *pending; +-#if MPIDI_POSIX_CACHE_LINE_LEN != 0 +- char padding[MPIDI_POSIX_CACHE_LINE_LEN - MPIDI_POSIX_CELL_HEAD_LEN - MPIDI_POSIX_MPICH_HEAD_LEN - 4 * sizeof(int) - sizeof(MPIR_Request *)]; /* should be 64-16-16-16-8 = 8 */ +-#endif +- volatile MPIDI_POSIX_pkt_t pkt; +-} MPIDI_POSIX_cell_t; +-typedef MPIDI_POSIX_cell_t *MPIDI_POSIX_cell_ptr_t; +- +-typedef struct MPIDI_POSIX_abs_cell { +- struct MPIDI_POSIX_abs_cell *next; +-#if (MPIDI_POSIX_CELL_HEAD_LEN > SIZEOF_VOID_P) +- char padding[MPIDI_POSIX_CELL_HEAD_LEN - sizeof(struct MPIDI_POSIX_abs_cell *)]; +-#endif +- volatile MPIDI_POSIX_pkt_t pkt; +-} MPIDI_POSIX_abs_cell_t; +-typedef MPIDI_POSIX_abs_cell_t *MPIDI_POSIX_abs_cell_ptr_t; +- +-#define MPIDI_POSIX_CELL_TO_PACKET(cellp) (&(cellp)->pkt) +-#define MPIDI_POSIX_PACKET_TO_CELL(packetp) \ +- ((MPIDI_POSIX_cell_ptr_t) ((char*)(packetp) - (char *)MPIDI_POSIX_CELL_TO_PACKET((MPIDI_POSIX_cell_ptr_t)0))) +-#define MPIDI_POSIX_MIN_PACKET_LEN (sizeof (MPIDI_POSIX_pkt_header_t)) +-#define MPIDI_POSIX_MAX_PACKET_LEN (sizeof (MPIDI_POSIX_pkt_t)) +-#define MPIDI_POSIX_PACKET_LEN(pkt) ((pkt)->mpich.datalen + MPIDI_POSIX_MPICH_HEAD_LEN) +- +-#define MPIDI_POSIX_OPT_LOAD 16 +-#define MPIDI_POSIX_OPT_SIZE ((sizeof(MPIDI_CH3_Pkt_t)) + (MPIDI_POSIX_OPT_LOAD)) +-#define MPIDI_POSIX_OPT_HEAD_LEN ((MPIDI_POSIX_MPICH_HEAD_LEN) + (MPIDI_POSIX_OPT_SIZE)) +- +-#define MPIDI_POSIX_PACKET_OPT_LEN(pkt) \ +- (((pkt)->mpich.datalen < MPIDI_POSIX_OPT_SIZE) ? (MPIDI_POSIX_OPT_HEAD_LEN) : (MPIDI_POSIX_PACKET_LEN(pkt))) +- +-#define MPIDI_POSIX_PACKET_PAYLOAD(pkt) ((pkt)->mpich.payload) +- +-typedef struct MPIDI_POSIX_queue { +- MPIDI_POSIX_cell_rel_ptr_t head; +- MPIDI_POSIX_cell_rel_ptr_t tail; +-#if (MPIDI_POSIX_CACHE_LINE_LEN > (2 * SIZEOF_OPA_PTR_T)) +- char padding1[MPIDI_POSIX_CACHE_LINE_LEN - 2 * sizeof(MPIDI_POSIX_cell_rel_ptr_t)]; +-#endif +- MPIDI_POSIX_cell_rel_ptr_t my_head; +-#if (MPIDI_POSIX_CACHE_LINE_LEN > SIZEOF_OPA_PTR_T) +- char padding2[MPIDI_POSIX_CACHE_LINE_LEN - sizeof(MPIDI_POSIX_cell_rel_ptr_t)]; +-#endif +-#ifndef MPIDI_POSIX_USE_LOCK_FREE_QUEUES +- /* see FIXME in mpid_nem_queue.h */ +-#define MPIDI_POSIX_queue_mutex_t MPID_Thread_mutex_t +- MPIDI_POSIX_queue_mutex_t lock; +- char padding3[MPIDI_POSIX_CACHE_LINE_LEN - sizeof(MPID_Thread_mutex_t)]; +-#endif +-} +-MPIDI_POSIX_queue_t, *MPIDI_POSIX_queue_ptr_t; +- +-/* Fast Boxes*/ +-typedef union { +- OPA_int_t value; +-#if MPIDI_POSIX_CACHE_LINE_LEN != 0 +- char padding[MPIDI_POSIX_CACHE_LINE_LEN]; +-#endif +-} MPIDI_POSIX_opt_volint_t; +- +-typedef struct MPIDI_POSIX_fbox_common { +- MPIDI_POSIX_opt_volint_t flag; +-} MPIDI_POSIX_fbox_common_t, *MPIDI_POSIX_fbox_common_ptr_t; +- +-typedef struct MPIDI_POSIX_fbox_mpich { +- MPIDI_POSIX_opt_volint_t flag; +- MPIDI_POSIX_cell_t cell; +-} MPIDI_POSIX_fbox_mpich_t; +- +-#define MPIDI_POSIX_FBOX_DATALEN MPIDI_POSIX_DATA_LEN +- +-typedef union { +- MPIDI_POSIX_fbox_common_t common; +- MPIDI_POSIX_fbox_mpich_t mpich; +-} MPIDI_POSIX_fastbox_t; +- +-typedef struct MPIDI_POSIX_fbox_arrays { +- MPIDI_POSIX_fastbox_t **in; +- MPIDI_POSIX_fastbox_t **out; +-} MPIDI_POSIX_fbox_arrays_t; +- +-#endif /* POSIX_DATATYPES_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/shm/posix/posix_defs.h ++++ /dev/null +@@ -1,115 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef POSIX_DEFS_H_INCLUDED +-#define POSIX_DEFS_H_INCLUDED +- +-/* ************************************************************************** */ +-/* from mpid/ch3/channels/nemesis/include/mpid_nem_defs.h */ +-/* ************************************************************************** */ +- +-#include "mpidu_shm.h" +-#define MPIDI_POSIX_MAX_FNAME_LEN 256 +- +-/* FIXME: This definition should be gotten from mpidi_ch3_impl.h */ +-#ifndef MPIDI_POSIX_MAX_HOSTNAME_LEN +-#define MPIDI_POSIX_MAX_HOSTNAME_LEN 256 +-#endif /* MPIDI_POSIX_MAX_HOSTNAME_LEN */ +- +-extern char MPIDI_POSIX_hostname[MPIDI_POSIX_MAX_HOSTNAME_LEN]; +- +-#define MPIDI_POSIX_RET_OK 1 +-#define MPIDI_POSIX_RET_NG -1 +-#define MPIDI_POSIX_KEY 632236 +-#define MPIDI_POSIX_ANY_SOURCE -1 +-#define MPIDI_POSIX_IN 1 +-#define MPIDI_POSIX_OUT 0 +- +-#define MPIDI_POSIX_POLL_IN 0 +-#define MPIDI_POSIX_POLL_OUT 1 +- +-#define MPIDI_POSIX_ASYMM_NULL_VAL 64 +-typedef MPI_Aint MPIDI_POSIX_addr_t; +-extern char *MPIDI_POSIX_asym_base_addr; +- +-#define MPIDI_POSIX_REL_NULL (0x0) +-#define MPIDI_POSIX_IS_REL_NULL(rel_ptr) (OPA_load_ptr(&(rel_ptr).p) == MPIDI_POSIX_REL_NULL) +-#define MPIDI_POSIX_SET_REL_NULL(rel_ptr) (OPA_store_ptr(&((rel_ptr).p), MPIDI_POSIX_REL_NULL)) +-#define MPIDI_POSIX_REL_ARE_EQUAL(rel_ptr1, rel_ptr2) \ +- (OPA_load_ptr(&(rel_ptr1).p) == OPA_load_ptr(&(rel_ptr2).p)) +- +-#ifndef MPIDI_POSIX_SYMMETRIC_QUEUES +- +-static inline MPIDI_POSIX_cell_ptr_t MPIDI_POSIX_REL_TO_ABS(MPIDI_POSIX_cell_rel_ptr_t r) +-{ +- return (MPIDI_POSIX_cell_ptr_t) ((char *) OPA_load_ptr(&r.p) + +- (MPIDI_POSIX_addr_t) MPIDI_POSIX_asym_base_addr); +-} +- +-static inline MPIDI_POSIX_cell_rel_ptr_t MPIDI_POSIX_ABS_TO_REL(MPIDI_POSIX_cell_ptr_t a) +-{ +- MPIDI_POSIX_cell_rel_ptr_t ret; +- OPA_store_ptr(&ret.p, (char *) a - (MPIDI_POSIX_addr_t) MPIDI_POSIX_asym_base_addr); +- return ret; +-} +- +-#else /*MPIDI_POSIX_SYMMETRIC_QUEUES */ +-#define MPIDI_POSIX_REL_TO_ABS(ptr) (ptr) +-#define MPIDI_POSIX_ABS_TO_REL(ptr) (ptr) +-#endif /*MPIDI_POSIX_SYMMETRIC_QUEUES */ +- +-/* NOTE: MPIDI_POSIX_IS_LOCAL should only be used when the process is known to be +- in your comm_world (such as at init time). This will generally not work for +- dynamic processes. Check vc_ch->is_local instead. If that is true, then +- it's safe to use MPIDI_POSIX_LOCAL_RANK. */ +-#define MPIDI_POSIX_NON_LOCAL -1 +-#define MPIDI_POSIX_IS_LOCAL(grank) (MPIDI_POSIX_mem_region.local_ranks[grank] != MPIDI_POSIX_NON_LOCAL) +-#define MPIDI_POSIX_LOCAL_RANK(grank) (MPIDI_POSIX_mem_region.local_ranks[grank]) +-#define MPIDI_POSIX_NUM_BARRIER_VARS 16 +-#define MPIDI_POSIX_SHM_MUTEX MPID_shm_mutex +-typedef struct MPIDI_POSIX_barrier_vars { +- OPA_int_t context_id; +- OPA_int_t usage_cnt; +- OPA_int_t cnt; +-#if MPIDI_POSIX_CACHE_LINE_LEN != SIZEOF_INT +- char padding0[MPIDI_POSIX_CACHE_LINE_LEN - sizeof(int)]; +-#endif +- OPA_int_t sig0; +- OPA_int_t sig; +- char padding1[MPIDI_POSIX_CACHE_LINE_LEN - 2 * sizeof(int)]; +-} MPIDI_POSIX_barrier_vars_t; +- +-typedef struct MPIDI_POSIX_mem_region { +- MPIDU_shm_seg_t memory; +- MPIDU_shm_seg_info_t *seg; +- int num_seg; +- int map_lock; +- int num_local; +- int num_procs; +- int *local_procs; /* local_procs[lrank] gives the global rank of proc with local rank lrank */ +- int local_rank; +- int *local_ranks; /* local_ranks[grank] gives the local rank of proc with global rank grank or MPIDI_POSIX_NON_LOCAL */ +- int ext_procs; /* Number of non-local processes */ +- int *ext_ranks; /* Ranks of non-local processes */ +- MPIDI_POSIX_fbox_arrays_t mailboxes; +- MPIDI_POSIX_cell_ptr_t Elements; +- MPIDI_POSIX_queue_ptr_t *FreeQ; +- MPIDI_POSIX_queue_ptr_t *RecvQ; +- MPIDU_shm_barrier_t *barrier; +- MPIDI_POSIX_queue_ptr_t my_freeQ; +- MPIDI_POSIX_queue_ptr_t my_recvQ; +- MPIDI_POSIX_barrier_vars_t *barrier_vars; +- int rank; +- struct MPIDI_POSIX_mem_region *next; +-} MPIDI_POSIX_mem_region_t, *MPIDI_POSIX_mem_region_ptr_t; +-extern MPIDI_POSIX_mem_region_t MPIDI_POSIX_mem_region; +-extern MPID_Thread_mutex_t MPID_shm_mutex; +- +-#endif /* POSIX_DEFS_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_eager_array.c.in +@@ -0,0 +1,27 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include ++#include "posix_eager.h" ++ ++/* *INDENT-OFF* */ ++/* forward declaration of funcs structs defined in network modules */ ++extern MPIDI_POSIX_eager_funcs_t @ch4_posix_eager_func_decl@; ++ ++#ifndef POSIX_EAGER_INLINE ++MPIDI_POSIX_eager_funcs_t *MPIDI_POSIX_eager_funcs[@ch4_posix_eager_array_sz@] = { @ch4_posix_eager_func_array@ }; ++#else ++MPIDI_POSIX_eager_funcs_t *MPIDI_POSIX_eager_funcs[@ch4_posix_eager_array_sz@] = { 0 }; ++#endif ++int MPIDI_num_posix_eager_fabrics = @ch4_posix_eager_array_sz@; ++char MPIDI_POSIX_eager_strings[@ch4_posix_eager_array_sz@][MPIDI_MAX_POSIX_EAGER_STRING_LEN] = ++ { @ch4_posix_eager_strings@ }; ++/* *INDENT-ON* */ +--- a/src/mpid/ch4/shm/posix/posix_impl.h ++++ b/src/mpid/ch4/shm/posix/posix_impl.h +@@ -4,7 +4,7 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ +@@ -14,221 +14,8 @@ + #include + #include "mpidch4r.h" + +-#include "mpidu_shm.h" +- +-/* ---------------------------------------------------- */ +-/* temp headers */ +-/* ---------------------------------------------------- */ +-#include "posix_datatypes.h" /* MPID_nem datatypes like cell, fastbox defined here */ +-#include "posix_defs.h" /* MPID_nem objects like shared memory region defined here */ +-#include "posix_queue.h" /* MPIDI_POSIX_queue functions defined here */ +- +-/* ---------------------------------------------------- */ +-/* constants */ +-/* ---------------------------------------------------- */ +-#define MPIDI_POSIX_EAGER_THRESHOLD MPIDI_POSIX_DATA_LEN +-#define MPIDI_POSIX_TYPESTANDARD 0 +-#define MPIDI_POSIX_TYPEEAGER 1 +-#define MPIDI_POSIX_TYPELMT 2 +-#define MPIDI_POSIX_TYPESYNC 3 +-#define MPIDI_POSIX_TYPEBUFFERED 4 +-#define MPIDI_POSIX_TYPEREADY 5 +-#define MPIDI_POSIX_TYPEACK 6 +-#define MPIDI_POSIX_REQUEST(req) (&(req)->dev.ch4.shm.posix) +- +-/* ---------------------------------------------------- */ +-/* shm specific object data */ +-/* ---------------------------------------------------- */ +-/* VCR Table Data */ +-typedef struct { +- unsigned int avt_rank; +-} MPIDI_POSIX_vcr_t; +- +-struct MPIDI_POSIX_vcrt_t { +- MPIR_OBJECT_HEADER; +- unsigned size; /**< Number of entries in the table */ +- MPIDI_POSIX_vcr_t vcr_table[0]; /**< Array of virtual connection references */ +-}; +-/* ---------------------------------------------------- */ +-/* general send/recv queue types, macros and objects */ +-/* ---------------------------------------------------- */ +-typedef struct { +- MPIR_Request *head; +- MPIR_Request *tail; +-} MPIDI_POSIX_request_queue_t; +- +-#define MPIDI_POSIX_REQUEST_COMPLETE(req_) \ +- { \ +- int incomplete__; \ +- MPIR_cc_decr((req_)->cc_ptr, &incomplete__); \ +- MPIR_Datatype_release_if_not_builtin(MPIDI_POSIX_REQUEST(req_)->datatype); \ +- if (!incomplete__) \ +- MPIR_Request_free(req_); \ +- } +- +-#define MPIDI_POSIX_REQUEST_ENQUEUE(req,queue) \ +- { \ +- if ((queue).tail != NULL) \ +- MPIDI_POSIX_REQUEST((queue).tail)->next = req; \ +- else \ +- (queue).head = req; \ +- (queue).tail = req; \ +- } +- +-#define MPIDI_POSIX_REQUEST_DEQUEUE(req_p,prev_req,queue) \ +- { \ +- MPIR_Request *next = MPIDI_POSIX_REQUEST(*(req_p))->next; \ +- if ((queue).head == *(req_p)) \ +- (queue).head = next; \ +- else \ +- MPIDI_POSIX_REQUEST(prev_req)->next = next; \ +- if ((queue).tail == *(req_p)) \ +- (queue).tail = prev_req; \ +- MPIDI_POSIX_REQUEST(*(req_p))->next = NULL; \ +- } +- +-#define MPIDI_POSIX_REQUEST_DEQUEUE_AND_SET_ERROR(req_p,prev_req,queue,err) \ +- { \ +- MPIR_Request *next = MPIDI_POSIX_REQUEST(*(req_p))->next; \ +- if ((queue).head == *(req_p)) \ +- (queue).head = next; \ +- else \ +- MPIDI_POSIX_REQUEST(prev_req)->next = next; \ +- if ((queue).tail == *(req_p)) \ +- (queue).tail = prev_req; \ +- (*(req_p))->status.MPI_ERROR = err; \ +- MPIDI_POSIX_REQUEST_COMPLETE(*(req_p)); \ +- *(req_p) = next; \ +- } +- +-#define MPIDI_POSIX_REQUEST_CREATE_SREQ(sreq_) \ +- { \ +- (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); \ +- MPIR_ERR_CHKANDSTMT((sreq_) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); \ +- MPIR_Request_add_ref((sreq_)); \ +- (sreq_)->u.persist.real_request = NULL; \ +- } +- +-#define MPIDI_POSIX_REQUEST_CREATE_COND_SREQ(sreq_) \ +- { \ +- if ((sreq_) == NULL) \ +- (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); \ +- MPIR_ERR_CHKANDSTMT((sreq_) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); \ +- MPIR_Request_add_ref((sreq_)); \ +- (sreq_)->u.persist.real_request = NULL; \ +- } +- +-#define MPIDI_POSIX_REQUEST_COMPLETE_COND_SREQ(sreq_) \ +- { \ +- if ((sreq_) != NULL) { \ +- int c; \ +- MPIR_cc_decr((sreq_)->cc_ptr, &c); \ +- } \ +- } +- +- +-#define MPIDI_POSIX_REQUEST_CREATE_RREQ(rreq_) \ +- { \ +- (rreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__RECV); \ +- MPIR_ERR_CHKANDSTMT((rreq_) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); \ +- MPIR_Request_add_ref((rreq_)); \ +- (rreq_)->u.persist.real_request = NULL; \ +- } +- +-#define MPIDI_POSIX_REQUEST_CREATE_COND_RREQ(rreq_) \ +- { \ +- if ((rreq_) == NULL) \ +- (rreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__RECV); \ +- MPIR_ERR_CHKANDSTMT((rreq_) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); \ +- MPIR_Request_add_ref((rreq_)); \ +- (rreq_)->u.persist.real_request = NULL; \ +- } +- +-/* ---------------------------------------------------- */ +-/* matching macros */ +-/* ---------------------------------------------------- */ +-#define MPIDI_POSIX_ENVELOPE_SET(ptr_,rank_,tag_,context_id_) \ +- { \ +- (ptr_)->rank = rank_; \ +- (ptr_)->tag = tag_; \ +- (ptr_)->context_id = context_id_; \ +- } +- +-#define MPIDI_POSIX_ENVELOPE_GET(ptr_,rank_,tag_,context_id_) \ +- { \ +- rank_ = (ptr_)->rank; \ +- tag_ = (ptr_)->tag; \ +- context_id_ = (ptr_)->context_id; \ +- } +- +-#define MPIDI_POSIX_ENVELOPE_MATCH(ptr_,rank_,tag_,context_id_) \ +- (((ptr_)->rank == (rank_) || (rank_) == MPI_ANY_SOURCE) && \ +- ((ptr_)->tag == (tag_) || (tag_) == MPI_ANY_TAG) && \ +- (ptr_)->context_id == (context_id_)) +- +-/* +- * Helper routines and macros for request completion +- */ +- +-#undef FUNCNAME +-#define FUNCNAME nothing +-#define BEGIN_FUNC(FUNCNAME) \ +- MPIR_FUNC_VERBOSE_STATE_DECL(FUNCNAME); \ +- MPIR_FUNC_VERBOSE_ENTER(FUNCNAME); +-#define END_FUNC(FUNCNAME) \ +- MPIR_FUNC_VERBOSE_EXIT(FUNCNAME); +-#define END_FUNC_RC(FUNCNAME) \ +- fn_exit: \ +- MPIR_FUNC_VERBOSE_EXIT(FUNCNAME); \ +- return mpi_errno; \ +- fn_fail: \ +- goto fn_exit; +- +-#define __SHORT_FILE__ \ +- (strrchr(__FILE__,'/') \ +- ? strrchr(__FILE__,'/')+1 \ +- : __FILE__ \ +-) +- +-int MPIDI_POSIX_barrier_vars_init(MPIDI_POSIX_barrier_vars_t * barrier_region); +-extern MPIDI_POSIX_request_queue_t MPIDI_POSIX_sendq; +-extern MPIDI_POSIX_request_queue_t MPIDI_POSIX_recvq_unexpected; +-extern MPIDI_POSIX_request_queue_t MPIDI_POSIX_recvq_posted; +- +-/* +- * Wrapper routines of process mutex for shared memory RMA. +- * Called by both POSIX RMA and fallback AM handlers through CS hooks. +- */ +-#define MPIDI_POSIX_RMA_MUTEX_INIT(mutex_ptr) do { \ +- int pt_err = MPL_PROC_MUTEX_SUCCESS; \ +- MPL_proc_mutex_create(mutex_ptr, &pt_err); \ +- MPIR_ERR_CHKANDJUMP1(pt_err != MPL_PROC_MUTEX_SUCCESS, mpi_errno, \ +- MPI_ERR_OTHER, "**windows_mutex", \ +- "**windows_mutex %s", "MPL_proc_mutex_create"); \ +-} while (0); +- +-#define MPIDI_POSIX_RMA_MUTEX_DESTROY(mutex_ptr) do { \ +- int pt_err = MPL_PROC_MUTEX_SUCCESS; \ +- MPL_proc_mutex_destroy(mutex_ptr, &pt_err); \ +- MPIR_ERR_CHKANDJUMP1(pt_err != MPL_PROC_MUTEX_SUCCESS, mpi_errno, \ +- MPI_ERR_OTHER, "**windows_mutex", \ +- "**windows_mutex %s", "MPL_proc_mutex_destroy"); \ +-} while (0); +- +-#define MPIDI_POSIX_RMA_MUTEX_LOCK(mutex_ptr) do { \ +- int pt_err = MPL_PROC_MUTEX_SUCCESS; \ +- MPL_proc_mutex_lock(mutex_ptr, &pt_err); \ +- MPIR_ERR_CHKANDJUMP1(pt_err != MPL_PROC_MUTEX_SUCCESS, mpi_errno, \ +- MPI_ERR_OTHER, "**windows_mutex", \ +- "**windows_mutex %s", "MPL_proc_mutex_lock"); \ +-} while (0) +- +-#define MPIDI_POSIX_RMA_MUTEX_UNLOCK(mutex_ptr) do { \ +- int pt_err = MPL_PROC_MUTEX_SUCCESS; \ +- MPL_proc_mutex_unlock(mutex_ptr, &pt_err); \ +- MPIR_ERR_CHKANDJUMP1(pt_err != MPL_PROC_MUTEX_SUCCESS, mpi_errno, \ +- MPI_ERR_OTHER, "**windows_mutex", \ +- "**windows_mutex %s", "MPL_proc_mutex_unlock"); \ +-} while (0) ++#include "posix_types.h" ++#include "posix_eager.h" ++#include "posix_eager_impl.h" + + #endif /* POSIX_IMPL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_init.c +@@ -0,0 +1,269 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++cvars: ++ - name : MPIR_CVAR_CH4_SHM_POSIX_EAGER ++ category : CH4 ++ type : string ++ default : "" ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ If non-empty, this cvar specifies which shm posix eager module to use ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++#include "mpidimpl.h" ++#include "posix_types.h" ++#include "ch4_types.h" ++ ++#include "posix_eager.h" ++#include "posix_noinline.h" ++#ifdef ENABLE_IZEM_ATOMIC ++extern zm_atomic_uint_t *MPIDI_POSIX_shm_limit_counter; ++#endif ++ ++static int choose_posix_eager(void); ++ ++static int choose_posix_eager(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_CHOOSE_POSIX_EAGER); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_CHOOSE_POSIX_EAGER); ++ ++ MPIR_Assert(MPIR_CVAR_CH4_SHM_POSIX_EAGER != NULL); ++ ++ if (strcmp(MPIR_CVAR_CH4_SHM_POSIX_EAGER, "") == 0) { ++ /* posix_eager not specified, using the default */ ++ MPIDI_POSIX_eager_func = MPIDI_POSIX_eager_funcs[0]; ++ goto fn_exit; ++ } ++ ++ for (i = 0; i < MPIDI_num_posix_eager_fabrics; ++i) { ++ /* use MPL variant of strncasecmp if we get one */ ++ if (!strncasecmp ++ (MPIR_CVAR_CH4_SHM_POSIX_EAGER, MPIDI_POSIX_eager_strings[i], ++ MPIDI_MAX_POSIX_EAGER_STRING_LEN)) { ++ MPIDI_POSIX_eager_func = MPIDI_POSIX_eager_funcs[i]; ++ goto fn_exit; ++ } ++ } ++ ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**ch4|invalid_shm_posix_eager", ++ "**ch4|invalid_shm_posix_eager %s", MPIR_CVAR_CH4_SHM_POSIX_EAGER); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CH4_CHOOSE_POSIX_EAGER); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_POSIX_mpi_init_hook(int rank, int size, int *n_vcis_provided, int *tag_bits) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i, num_local = 0, local_rank_0 = -1, my_local_rank = -1; ++ ++#ifdef MPL_USE_DBG_LOGGING ++ MPIDI_CH4_SHM_POSIX_GENERAL = MPL_dbg_class_alloc("SHM_POSIX", "shm_posix"); ++#endif /* MPL_USE_DBG_LOGGING */ ++ ++ MPIDI_POSIX_global.am_buf_pool = ++ MPIDIU_create_buf_pool(MPIDI_POSIX_BUF_POOL_NUM, MPIDI_POSIX_BUF_POOL_SIZE); ++ ++ MPIR_CHKPMEM_DECL(3); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_INIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_INIT_HOOK); ++ ++ /* Populate these values with transformation information about each rank and its original ++ * information in MPI_COMM_WORLD. */ ++ ++ mpi_errno = MPIR_Find_local(MPIR_Process.comm_world, &num_local, &my_local_rank, ++ /* comm_world rank of each local process */ ++ &MPIDI_POSIX_global.local_procs, ++ /* local rank of each process in comm_world if it is on the same node */ ++ &MPIDI_POSIX_global.local_ranks); ++ ++ local_rank_0 = MPIDI_POSIX_global.local_procs[0]; ++ MPIDI_POSIX_global.num_local = num_local; ++ MPIDI_POSIX_global.my_local_rank = my_local_rank; ++ ++ MPIDI_POSIX_global.local_rank_0 = local_rank_0; ++ *n_vcis_provided = 1; ++ ++ /* This is used to track messages that the eager submodule was not ready to send. */ ++ MPIDI_POSIX_global.postponed_queue = NULL; ++ ++ MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_global.active_rreq, ++ MPIR_Request **, ++ size * sizeof(MPIR_Request *), mpi_errno, "active recv req", MPL_MEM_SHM); ++ ++ for (i = 0; i < size; i++) { ++ MPIDI_POSIX_global.active_rreq[i] = NULL; ++ } ++ ++ choose_posix_eager(); ++ ++ mpi_errno = MPIDI_POSIX_eager_init(rank, size); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* There is no restriction on the tag_bits from the posix shmod side */ ++ *tag_bits = MPIR_TAG_BITS_DEFAULT; ++ ++ mpi_errno = MPIDI_POSIX_coll_init(rank, size); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_CHKPMEM_COMMIT(); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_INIT_HOOK); ++ return mpi_errno; ++ fn_fail: ++ /* --BEGIN ERROR HANDLING-- */ ++ MPIR_CHKPMEM_REAP(); ++ goto fn_exit; ++ /* --END ERROR HANDLING-- */ ++} ++ ++int MPIDI_POSIX_mpi_finalize_hook(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_FINALIZE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_FINALIZE_HOOK); ++ ++ mpi_errno = MPIDI_POSIX_eager_finalize(); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDIU_destroy_buf_pool(MPIDI_POSIX_global.am_buf_pool); ++ ++ MPL_free(MPIDI_POSIX_global.active_rreq); ++ ++ mpi_errno = MPIDI_POSIX_coll_finalize(); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPL_free(MPIDI_POSIX_global.local_ranks); ++ MPL_free(MPIDI_POSIX_global.local_procs); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_FINALIZE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_POSIX_coll_init(int rank, int size) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_COLL_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_COLL_INIT); ++ ++#ifdef ENABLE_IZEM_ATOMIC ++ /* Allocate a shared counter to track the amount of shared memory created per node for ++ * intra-node collectives */ ++ mpi_errno = ++ MPIDU_shm_seg_alloc(sizeof(int), (void **) &MPIDI_POSIX_shm_limit_counter, MPL_MEM_SHM); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Actually allocate the segment and assign regions to the pointers */ ++ mpi_errno = ++ MPIDU_shm_seg_commit(&MPIDI_POSIX_global.memory, &MPIDI_POSIX_global.barrier, ++ MPIDI_POSIX_global.num_local, MPIDI_POSIX_global.my_local_rank, ++ MPIDI_POSIX_global.local_rank_0, rank, MPL_MEM_SHM); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = MPIDU_shm_barrier(MPIDI_POSIX_global.barrier, MPIDI_POSIX_global.num_local); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Set the counter to 0 */ ++ zm_atomic_store(MPIDI_POSIX_shm_limit_counter, 0, zm_memord_relaxed); ++#endif ++ ++ mpi_errno = collective_cvars_init(); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_COLL_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_POSIX_coll_finalize(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_COLL_FINALIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_COLL_FINALIZE); ++ ++#ifdef ENABLE_IZEM_ATOMIC ++ /* Destroy the shared counter which was used to track the amount of shared memory created ++ * per node for intra-node collectives */ ++ mpi_errno = MPIDU_shm_seg_destroy(&MPIDI_POSIX_global.memory, MPIDI_POSIX_global.num_local); ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_COLL_FINALIZE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_POSIX_get_vci_attr(int vci) ++{ ++ MPIR_Assert(0 <= vci && vci < 1); ++ return MPIDI_VCI_TX | MPIDI_VCI_RX; ++} ++ ++void *MPIDI_POSIX_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ MPIR_Assert(0); ++ return NULL; ++} ++ ++int MPIDI_POSIX_mpi_free_mem(void *ptr) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/posix/posix_init.h ++++ /dev/null +@@ -1,392 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef POSIX_INIT_H_INCLUDED +-#define POSIX_INIT_H_INCLUDED +- +-#include "posix_impl.h" +-#include "ch4_types.h" +-#include "mpidu_shm.h" +- +-/* ------------------------------------------------------- */ +-/* from mpid/ch3/channels/nemesis/src/mpid_nem_init.c */ +-/* ------------------------------------------------------- */ +-extern MPIDI_POSIX_mem_region_t MPIDI_POSIX_mem_region; +-extern char *MPIDI_POSIX_asym_base_addr; +- +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_mpi_init_hook) +-static inline int MPIDI_POSIX_mpi_init_hook(int rank, int size, int *n_vnis_provided, int *tag_bits) +-{ +- int mpi_errno = MPI_SUCCESS; +- int num_local = 0; +- int local_rank = -1; +- int *local_procs = NULL; +- int *local_ranks = NULL; +- int i; +- int grank; +- MPIDI_POSIX_fastbox_t *fastboxes_p = NULL; +- MPIDI_POSIX_cell_t(*cells_p)[MPIDI_POSIX_NUM_CELLS]; +- MPIDI_POSIX_queue_t *recv_queues_p = NULL; +- MPIDI_POSIX_queue_t *free_queues_p = NULL; +- MPIDI_av_entry_t *av = NULL; +- MPIR_CHKPMEM_DECL(9); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_INIT); +- +- *n_vnis_provided = 1; +- +- MPIDI_POSIX_mem_region.num_seg = 1; +- MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_mem_region.seg, MPIDU_shm_seg_info_t *, +- MPIDI_POSIX_mem_region.num_seg * sizeof(MPIDU_shm_seg_info_t), mpi_errno, +- "mem_region segments", MPL_MEM_SHM); +- MPIR_CHKPMEM_MALLOC(local_procs, int *, size * sizeof(int), mpi_errno, +- "local process index array", MPL_MEM_SHM); +- MPIR_CHKPMEM_MALLOC(local_ranks, int *, size * sizeof(int), mpi_errno, +- "mem_region local ranks", MPL_MEM_SHM); +- +- for (i = 0; i < size; i++) { +- av = MPIDIU_comm_rank_to_av(MPIR_Process.comm_world, i); +- if (MPIDI_av_is_local(av)) { +- if (i == rank) { +- local_rank = num_local; +- } +- +- local_procs[num_local] = i; +- local_ranks[i] = num_local; +- num_local++; +- } +- } +- +- MPIDI_POSIX_mem_region.rank = rank; +- MPIDI_POSIX_mem_region.num_local = num_local; +- MPIDI_POSIX_mem_region.num_procs = size; +- MPIDI_POSIX_mem_region.local_procs = local_procs; +- MPIDI_POSIX_mem_region.local_ranks = local_ranks; +- MPIDI_POSIX_mem_region.local_rank = local_rank; +- MPIDI_POSIX_mem_region.next = NULL; +- +- /* Request fastboxes region */ +- mpi_errno = +- MPIDU_shm_seg_alloc(MAX +- ((num_local * ((num_local - 1) * sizeof(MPIDI_POSIX_fastbox_t))), +- MPIDI_POSIX_ASYMM_NULL_VAL), (void **) &fastboxes_p, MPL_MEM_SHM); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* Request data cells region */ +- mpi_errno = +- MPIDU_shm_seg_alloc(num_local * MPIDI_POSIX_NUM_CELLS * sizeof(MPIDI_POSIX_cell_t), +- (void **) &cells_p, MPL_MEM_SHM); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* Request free q region */ +- mpi_errno = +- MPIDU_shm_seg_alloc(num_local * sizeof(MPIDI_POSIX_queue_t), (void **) &free_queues_p, +- MPL_MEM_SHM); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* Request recv q region */ +- mpi_errno = +- MPIDU_shm_seg_alloc(num_local * sizeof(MPIDI_POSIX_queue_t), (void **) &recv_queues_p, +- MPL_MEM_SHM); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* Request shared collectives barrier vars region */ +- mpi_errno = +- MPIDU_shm_seg_alloc(MPIDI_POSIX_NUM_BARRIER_VARS * sizeof(MPIDI_POSIX_barrier_vars_t), +- (void **) &MPIDI_POSIX_mem_region.barrier_vars, MPL_MEM_SHM); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* Actually allocate the segment and assign regions to the pointers */ +- mpi_errno = +- MPIDU_shm_seg_commit(&MPIDI_POSIX_mem_region.memory, &MPIDI_POSIX_mem_region.barrier, +- num_local, local_rank, MPIDI_POSIX_mem_region.local_procs[0], +- MPIDI_POSIX_mem_region.rank, MPL_MEM_SHM); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* post check_alloc steps */ +- if (MPIDI_POSIX_mem_region.memory.symmetrical == 1) { +- MPIDI_POSIX_asym_base_addr = NULL; +- } else { +- MPIDI_POSIX_asym_base_addr = MPIDI_POSIX_mem_region.memory.base_addr; +-#ifdef MPIDI_POSIX_SYMMETRIC_QUEUES +- MPIR_ERR_INTERNALANDJUMP(mpi_errno, "queues are not symmetrically allocated as expected"); +-#endif +- } +- +- /* init shared collectives barrier region */ +- mpi_errno = MPIDI_POSIX_barrier_vars_init(MPIDI_POSIX_mem_region.barrier_vars); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* local procs barrier */ +- mpi_errno = MPIDU_shm_barrier(MPIDI_POSIX_mem_region.barrier, num_local); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* find our cell region */ +- MPIDI_POSIX_mem_region.Elements = cells_p[local_rank]; +- +- /* Tables of pointers to shared memory Qs */ +- MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_mem_region.FreeQ, MPIDI_POSIX_queue_ptr_t *, +- size * sizeof(MPIDI_POSIX_queue_ptr_t), mpi_errno, "FreeQ", MPL_MEM_SHM); +- MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_mem_region.RecvQ, MPIDI_POSIX_queue_ptr_t *, +- size * sizeof(MPIDI_POSIX_queue_ptr_t), mpi_errno, "RecvQ", MPL_MEM_SHM); +- +- /* Init table entry for our Qs */ +- MPIDI_POSIX_mem_region.FreeQ[rank] = &free_queues_p[local_rank]; +- MPIDI_POSIX_mem_region.RecvQ[rank] = &recv_queues_p[local_rank]; +- +- /* Init our queues */ +- MPIDI_POSIX_queue_init(MPIDI_POSIX_mem_region.RecvQ[rank]); +- MPIDI_POSIX_queue_init(MPIDI_POSIX_mem_region.FreeQ[rank]); +- +- /* Init and enqueue our free cells */ +- for (i = 0; i < MPIDI_POSIX_NUM_CELLS; ++i) { +- MPIDI_POSIX_cell_init(&(MPIDI_POSIX_mem_region.Elements[i]), rank); +- MPIDI_POSIX_queue_enqueue(MPIDI_POSIX_mem_region.FreeQ[rank], +- &(MPIDI_POSIX_mem_region.Elements[i])); +- } +- +- /* set route for local procs through shmem */ +- for (i = 0; i < num_local; i++) { +- grank = local_procs[i]; +- MPIDI_POSIX_mem_region.FreeQ[grank] = &free_queues_p[i]; +- MPIDI_POSIX_mem_region.RecvQ[grank] = &recv_queues_p[i]; +- +- MPIR_Assert(MPIDI_POSIX_ALIGNED +- (MPIDI_POSIX_mem_region.FreeQ[grank], MPIDI_POSIX_CACHE_LINE_LEN)); +- MPIR_Assert(MPIDI_POSIX_ALIGNED +- (MPIDI_POSIX_mem_region.RecvQ[grank], MPIDI_POSIX_CACHE_LINE_LEN)); +- } +- +- /* make pointers to our queues global so we don't have to dereference the array */ +- MPIDI_POSIX_mem_region.my_freeQ = MPIDI_POSIX_mem_region.FreeQ[rank]; +- MPIDI_POSIX_mem_region.my_recvQ = MPIDI_POSIX_mem_region.RecvQ[rank]; +- +- /* local barrier */ +- mpi_errno = MPIDU_shm_barrier(MPIDI_POSIX_mem_region.barrier, num_local); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* Allocate table of pointers to fastboxes */ +- MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_mem_region.mailboxes.in, MPIDI_POSIX_fastbox_t **, +- num_local * sizeof(MPIDI_POSIX_fastbox_t *), mpi_errno, "fastboxes", +- MPL_MEM_SHM); +- MPIR_CHKPMEM_MALLOC(MPIDI_POSIX_mem_region.mailboxes.out, MPIDI_POSIX_fastbox_t **, +- num_local * sizeof(MPIDI_POSIX_fastbox_t *), mpi_errno, "fastboxes", +- MPL_MEM_SHM); +- +- MPIR_Assert(num_local > 0); +- +-#define MPIDI_POSIX_MAILBOX_INDEX(sender, receiver) (((sender) > (receiver)) ? ((num_local-1) * (sender) + (receiver)) : \ +- (((sender) < (receiver)) ? ((num_local-1) * (sender) + ((receiver)-1)) : 0)) +- +- /* fill in tables */ +- for (i = 0; i < num_local; ++i) { +- if (i == local_rank) { +- /* No fastboxs to myself */ +- MPIDI_POSIX_mem_region.mailboxes.in[i] = NULL; +- MPIDI_POSIX_mem_region.mailboxes.out[i] = NULL; +- } else { +- MPIDI_POSIX_mem_region.mailboxes.in[i] = +- &fastboxes_p[MPIDI_POSIX_MAILBOX_INDEX(i, local_rank)]; +- MPIDI_POSIX_mem_region.mailboxes.out[i] = +- &fastboxes_p[MPIDI_POSIX_MAILBOX_INDEX(local_rank, i)]; +- OPA_store_int(&MPIDI_POSIX_mem_region.mailboxes.in[i]->common.flag.value, 0); +- OPA_store_int(&MPIDI_POSIX_mem_region.mailboxes.out[i]->common.flag.value, 0); +- } +- } +- +-#undef MPIDI_POSIX_MAILBOX_INDEX +- +- /* There is no restriction on the tag_bits from the posix shmod side */ +- *tag_bits = MPIR_TAG_BITS_DEFAULT; +- +- MPIR_CHKPMEM_COMMIT(); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_INIT); +- return mpi_errno; +- fn_fail: +- /* --BEGIN ERROR HANDLING-- */ +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +- /* --END ERROR HANDLING-- */ +-} +- +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_mpi_finalize_hook) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_finalize_hook(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_FINALIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_FINALIZE); +- +- /* local barrier */ +- mpi_errno = MPIDU_shm_barrier(MPIDI_POSIX_mem_region.barrier, MPIDI_POSIX_mem_region.num_local); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* from MPIDI_POSIX_init */ +- MPL_free(MPIDI_POSIX_mem_region.FreeQ); +- MPL_free(MPIDI_POSIX_mem_region.RecvQ); +- MPL_free(MPIDI_POSIX_mem_region.local_ranks); +- MPL_free(MPIDI_POSIX_mem_region.seg); +- MPL_free(MPIDI_POSIX_mem_region.mailboxes.out); +- MPL_free(MPIDI_POSIX_mem_region.mailboxes.in); +- MPL_free(MPIDI_POSIX_mem_region.local_procs); +- +- mpi_errno = +- MPIDU_shm_seg_destroy(&MPIDI_POSIX_mem_region.memory, MPIDI_POSIX_mem_region.num_local); +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_get_vni_attr(int vni) +-{ +- MPIR_Assert(0 <= vni && vni < 1); +- return MPIDI_VNI_TX | MPIDI_VNI_RX; +-} +- +-MPL_STATIC_INLINE_PREFIX void *MPIDI_POSIX_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- MPIR_Assert(0); +- return NULL; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_free_mem(void *ptr) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_comm_get_lpid(MPIR_Comm * comm_ptr, +- int idx, int *lpid_ptr, bool is_remote) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_get_node_id(MPIR_Comm * comm, int rank, int *id_p) +-{ +- *id_p = (int) 0; +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_get_max_node_id(MPIR_Comm * comm, int *max_id_p) +-{ +- *max_id_p = (int) 0; +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_get_local_upids(MPIR_Comm * comm, +- size_t ** local_upid_size, +- char **local_upids) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_upids_to_lupids(int size, +- size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- MPIR_Assert(0); +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_type_commit_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_type_commit_hook(MPIR_Datatype * type) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_TYPE_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_TYPE_CREATE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_TYPE_CREATE_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_type_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_type_free_hook(MPIR_Datatype * type) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_TYPE_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_TYPE_FREE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_TYPE_FREE_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_op_commit_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_op_commit_hook(MPIR_Op * op) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_OP_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_OP_CREATE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_OP_CREATE_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_op_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_op_free_hook(MPIR_Op * op) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_OP_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_OP_FREE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_OP_FREE_HOOK); +- return mpi_errno; +-} +- +-#endif /* POSIX_INIT_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_noinline.h +@@ -0,0 +1,62 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef POSIX_NOINLINE_H_INCLUDED ++#define POSIX_NOINLINE_H_INCLUDED ++ ++#include "posix_impl.h" ++ ++int MPIDI_POSIX_mpi_init_hook(int rank, int size, int *n_vcis_provided, int *tag_bits); ++int MPIDI_POSIX_mpi_finalize_hook(void); ++int MPIDI_POSIX_get_vci_attr(int vci); ++ ++int collective_cvars_init(void); ++int MPIDI_POSIX_coll_init(int rank, int size); ++int MPIDI_POSIX_coll_finalize(void); ++ ++int MPIDI_POSIX_mpi_comm_create_hook(MPIR_Comm * comm); ++int MPIDI_POSIX_mpi_comm_free_hook(MPIR_Comm * comm); ++int MPIDI_POSIX_mpi_type_commit_hook(MPIR_Datatype * type); ++int MPIDI_POSIX_mpi_type_free_hook(MPIR_Datatype * type); ++int MPIDI_POSIX_mpi_op_commit_hook(MPIR_Op * op); ++int MPIDI_POSIX_mpi_op_free_hook(MPIR_Op * op); ++int MPIDI_POSIX_mpi_win_create_hook(MPIR_Win * win); ++int MPIDI_POSIX_mpi_win_allocate_hook(MPIR_Win * win); ++int MPIDI_POSIX_mpi_win_allocate_shared_hook(MPIR_Win * win); ++int MPIDI_POSIX_mpi_win_create_dynamic_hook(MPIR_Win * win); ++int MPIDI_POSIX_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_POSIX_mpi_win_detach_hook(MPIR_Win * win, const void *base); ++int MPIDI_POSIX_mpi_win_free_hook(MPIR_Win * win); ++ ++int MPIDI_POSIX_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr); ++int MPIDI_POSIX_mpi_comm_disconnect(MPIR_Comm * comm_ptr); ++int MPIDI_POSIX_mpi_open_port(MPIR_Info * info_ptr, char *port_name); ++int MPIDI_POSIX_mpi_close_port(const char *port_name); ++int MPIDI_POSIX_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr); ++ ++int MPIDI_POSIX_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); ++int MPIDI_POSIX_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); ++int MPIDI_POSIX_mpi_win_free(MPIR_Win ** win_ptr); ++int MPIDI_POSIX_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); ++int MPIDI_POSIX_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_POSIX_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr); ++int MPIDI_POSIX_mpi_win_detach(MPIR_Win * win, const void *base); ++int MPIDI_POSIX_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win); ++int MPIDI_POSIX_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win); ++ ++int MPIDI_POSIX_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids); ++int MPIDI_POSIX_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids); ++int MPIDI_POSIX_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]); ++ ++void *MPIDI_POSIX_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDI_POSIX_mpi_free_mem(void *ptr); ++#endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_op.c +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "posix_noinline.h" ++ ++int MPIDI_POSIX_mpi_op_commit_hook(MPIR_Op * op) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_OP_COMMIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_OP_COMMIT_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_OP_COMMIT_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_op_free_hook(MPIR_Op * op) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_OP_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_OP_FREE_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_OP_FREE_HOOK); ++ return mpi_errno; ++} +--- a/src/mpid/ch4/shm/posix/posix_pre.h ++++ b/src/mpid/ch4/shm/posix/posix_pre.h +@@ -4,7 +4,7 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ +@@ -13,13 +13,91 @@ + #define POSIX_PRE_H_INCLUDED + + #include ++#ifdef ENABLE_IZEM_ATOMIC ++#include "release_gather_types.h" ++#endif ++ ++#define MPIDI_POSIX_MAX_AM_HDR_SIZE (32) ++ ++#define MPIDI_POSIX_AM_HANDLER_ID_BITS (8) ++#define MPIDI_POSIX_AM_HDR_SZ_BITS (8) ++#define MPIDI_POSIX_AM_DATA_SZ_BITS (48) ++ ++#define MPIDI_POSIX_AM_MSG_HEADER_SIZE (sizeof(MPIDI_POSIX_am_header_t)) ++#define MPIDI_POSIX_MAX_IOV_NUM (2) ++ ++typedef enum { ++ MPIDI_POSIX_EAGER_RECV_POSTED_HOOK_STATE_INITIALIZED, ++ MPIDI_POSIX_EAGER_RECV_POSTED_HOOK_STATE_REGISTERED, ++ MPIDI_POSIX_EAGER_RECV_POSTED_HOOK_STATE_FINALIZED ++} MPIDI_POSIX_EAGER_recv_posted_hook_state_t; + + struct MPIR_Request; +-struct MPIR_Segment; ++ ++/* These structs are populated with dummy variables because empty structs are not supported in all ++ * compilers: https://stackoverflow.com/a/755339/491687 */ ++typedef struct { ++#ifdef ENABLE_IZEM_ATOMIC ++ MPIDI_POSIX_release_gather_comm_t *release_gather; ++#else ++ int dummy; ++#endif ++} MPIDI_POSIX_comm_t; ++ ++typedef struct { ++ int dummy; ++} MPIDI_POSIX_dt_t; + + typedef struct { +- struct MPIR_Request *next; +- struct MPIR_Request *pending; ++ int dummy; ++} MPIDI_POSIX_op_t; ++ ++typedef struct { ++ int dummy; ++} MPIDI_POSIX_request_t; ++ ++typedef struct MPIDI_POSIX_am_header { ++ uint64_t handler_id:MPIDI_POSIX_AM_HANDLER_ID_BITS; ++ uint64_t am_hdr_sz:MPIDI_POSIX_AM_HDR_SZ_BITS; ++ uint64_t data_sz:MPIDI_POSIX_AM_DATA_SZ_BITS; ++#ifdef POSIX_AM_DEBUG ++ int seq_num; ++#endif /* POSIX_AM_DEBUG */ ++} MPIDI_POSIX_am_header_t; ++ ++typedef struct MPIDI_POSIX_am_request_header { ++ void *pack_buffer; ++ void *rreq_ptr; ++ void *am_hdr; ++ ++ uint16_t am_hdr_sz; ++ uint8_t pad[6]; ++ ++ MPIDI_POSIX_am_header_t *msg_hdr; ++ MPIDI_POSIX_am_header_t msg_hdr_buf; ++ ++ uint8_t am_hdr_buf[MPIDI_POSIX_MAX_AM_HDR_SIZE]; ++ ++ int (*cmpl_handler_fn) (MPIR_Request * req); ++ ++ int handler_id; ++ int dst_grank; ++ ++ struct iovec *iov_ptr; ++ struct iovec iov[MPIDI_POSIX_MAX_IOV_NUM]; ++ size_t iov_num; ++ size_t iov_num_total; ++ ++ int is_contig; ++ ++ size_t in_total_data_sz; ++ ++ /* Structure used with POSIX postponed_queue */ ++ MPIR_Request *request; /* Store address of MPIR_Request* sreq */ ++ struct MPIDI_POSIX_am_request_header *prev, *next; ++} MPIDI_POSIX_am_request_header_t; ++ ++typedef struct MPIDI_POSIX_am_request { + int dest; + int rank; + int tag; +@@ -29,20 +107,75 @@ typedef struct { + int type; + int user_count; + MPI_Datatype datatype; +- struct MPIR_Segment *segment_ptr; + size_t segment_first; + size_t segment_size; +-} MPIDI_POSIX_request_t; + +-typedef struct { +- int dummy; +-} MPIDI_POSIX_comm_t; ++ int eager_recv_posted_hook_grank; ++ ++ MPIDI_POSIX_am_request_header_t *req_hdr; ++ ++#ifdef POSIX_AM_REQUEST_INLINE ++ MPIDI_POSIX_am_request_header_t req_hdr_buffer; ++#endif /* POSIX_AM_REQUEST_INLINE */ ++} MPIDI_POSIX_am_request_t; ++ ++#define MPIDI_POSIX_EAGER_RECV_INITIALIZE_HOOK(request)\ ++do { \ ++} while (0) ++ ++#define MPIDI_POSIX_EAGER_RECV_POSTED_HOOK(request,rank,communicator)\ ++do { \ ++ int grank_ = ((rank) >= 0) ? MPIDIU_rank_to_lpid((rank), (communicator)) : (rank); \ ++ (request)->dev.ch4.am.shm_am.posix.eager_recv_posted_hook_grank = grank_; \ ++ MPIDI_POSIX_eager_recv_posted_hook(grank_); \ ++} while (0) ++ ++#define MPIDI_POSIX_EAGER_RECV_COMPLETED_HOOK(request)\ ++do { \ ++ MPIDI_POSIX_eager_recv_completed_hook((request)->dev.ch4.am.shm_am.posix.eager_recv_posted_hook_grank); \ ++} while (0) + + typedef struct { + MPL_proc_mutex_t *shm_mutex_ptr; /* interprocess mutex for shm atomic RMA */ + MPL_shm_hnd_t shm_mutex_segment_handle; + } MPIDI_POSIX_win_t; + ++/* ++ * Wrapper routines of process mutex for shared memory RMA. ++ * Called by both POSIX RMA and fallback AM handlers through CS hooks. ++ */ ++#define MPIDI_POSIX_RMA_MUTEX_INIT(mutex_ptr) do { \ ++ int pt_err = MPL_PROC_MUTEX_SUCCESS; \ ++ MPL_proc_mutex_create(mutex_ptr, &pt_err); \ ++ MPIR_ERR_CHKANDJUMP1(pt_err != MPL_PROC_MUTEX_SUCCESS, mpi_errno, \ ++ MPI_ERR_OTHER, "**windows_mutex", \ ++ "**windows_mutex %s", "MPL_proc_mutex_create"); \ ++} while (0); ++ ++#define MPIDI_POSIX_RMA_MUTEX_DESTROY(mutex_ptr) do { \ ++ int pt_err = MPL_PROC_MUTEX_SUCCESS; \ ++ MPL_proc_mutex_destroy(mutex_ptr, &pt_err); \ ++ MPIR_ERR_CHKANDJUMP1(pt_err != MPL_PROC_MUTEX_SUCCESS, mpi_errno, \ ++ MPI_ERR_OTHER, "**windows_mutex", \ ++ "**windows_mutex %s", "MPL_proc_mutex_destroy"); \ ++} while (0); ++ ++#define MPIDI_POSIX_RMA_MUTEX_LOCK(mutex_ptr) do { \ ++ int pt_err = MPL_PROC_MUTEX_SUCCESS; \ ++ MPL_proc_mutex_lock(mutex_ptr, &pt_err); \ ++ MPIR_ERR_CHKANDJUMP1(pt_err != MPL_PROC_MUTEX_SUCCESS, mpi_errno, \ ++ MPI_ERR_OTHER, "**windows_mutex", \ ++ "**windows_mutex %s", "MPL_proc_mutex_lock"); \ ++} while (0) ++ ++#define MPIDI_POSIX_RMA_MUTEX_UNLOCK(mutex_ptr) do { \ ++ int pt_err = MPL_PROC_MUTEX_SUCCESS; \ ++ MPL_proc_mutex_unlock(mutex_ptr, &pt_err); \ ++ MPIR_ERR_CHKANDJUMP1(pt_err != MPL_PROC_MUTEX_SUCCESS, mpi_errno, \ ++ MPI_ERR_OTHER, "**windows_mutex", \ ++ "**windows_mutex %s", "MPL_proc_mutex_unlock"); \ ++} while (0) ++ + #include "posix_coll_params.h" + #include "posix_coll_containers.h" + #endif /* POSIX_PRE_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_probe.h ++++ b/src/mpid/ch4/shm/posix/posix_probe.h +@@ -4,13 +4,14 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ + #ifndef POSIX_PROBE_H_INCLUDED + #define POSIX_PROBE_H_INCLUDED + ++#include "mpidch4r.h" + #include "posix_impl.h" + + +@@ -21,78 +22,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_improbe(int source, + int *flag, MPIR_Request ** message, + MPI_Status * status) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *req, *matched_req = NULL; +- int count = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_IMPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_IMPROBE); +- +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- *message = NULL; +- +- if (unlikely(source == MPI_PROC_NULL)) { +- MPIR_Status_set_procnull(status); +- *flag = true; +- goto fn_exit; +- } +- +- for (req = MPIDI_POSIX_recvq_unexpected.head; req; req = MPIDI_POSIX_REQUEST(req)->next) { +- if (MPIDI_POSIX_ENVELOPE_MATCH +- (MPIDI_POSIX_REQUEST(req), source, tag, comm->recvcontext_id + context_offset)) { +- if (!matched_req) +- matched_req = req; +- +- if (req && MPIDI_POSIX_REQUEST(req)->type == MPIDI_POSIX_TYPEEAGER) { +- *message = matched_req; +- break; +- } +- } +- } +- +- if (*message) { +- MPIDI_POSIX_request_queue_t mqueue = { NULL, NULL }; +- MPIR_Request *prev_req = NULL, *next_req = NULL; +- req = MPIDI_POSIX_recvq_unexpected.head; +- +- while (req) { +- next_req = MPIDI_POSIX_REQUEST(req)->next; +- +- if (MPIDI_POSIX_ENVELOPE_MATCH +- (MPIDI_POSIX_REQUEST(req), source, tag, comm->recvcontext_id + context_offset)) { +- if (mqueue.head == NULL) { +- MPIR_Assert(req == matched_req); +- } +- +- count += MPIR_STATUS_GET_COUNT(req->status); +- MPIDI_POSIX_REQUEST_DEQUEUE(&req, prev_req, MPIDI_POSIX_recvq_unexpected); +- MPIDI_POSIX_REQUEST_ENQUEUE(req, mqueue); +- +- if (req && MPIDI_POSIX_REQUEST(req)->type == MPIDI_POSIX_TYPEEAGER) +- break; +- } else +- prev_req = req; +- +- req = next_req; +- } +- +- *flag = 1; +- matched_req->kind = MPIR_REQUEST_KIND__MPROBE; +- matched_req->comm = comm; +- MPIR_Comm_add_ref(comm); +- status->MPI_TAG = matched_req->status.MPI_TAG; +- status->MPI_SOURCE = matched_req->status.MPI_SOURCE; +- MPIR_STATUS_SET_COUNT(*status, count); +- } else { +- *flag = 0; +- } +- +- fn_exit: +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_IMPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ return MPIDIG_mpi_improbe(source, tag, comm, context_offset, flag, message, status); + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iprobe(int source, +@@ -101,46 +31,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iprobe(int source, + int context_offset, int *flag, + MPI_Status * status) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *req, *matched_req = NULL; +- int count = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_IPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_IPROBE); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- +- if (unlikely(source == MPI_PROC_NULL)) { +- MPIR_Status_set_procnull(status); +- *flag = true; +- goto fn_exit; +- } +- +- for (req = MPIDI_POSIX_recvq_unexpected.head; req; req = MPIDI_POSIX_REQUEST(req)->next) { +- if (MPIDI_POSIX_ENVELOPE_MATCH +- (MPIDI_POSIX_REQUEST(req), source, tag, comm->recvcontext_id + context_offset)) { +- count += MPIR_STATUS_GET_COUNT(req->status); +- +- if (MPIDI_POSIX_REQUEST(req)->type == MPIDI_POSIX_TYPEEAGER) { +- matched_req = req; +- break; +- } +- } +- } +- +- if (matched_req) { +- *flag = 1; +- status->MPI_TAG = matched_req->status.MPI_TAG; +- status->MPI_SOURCE = matched_req->status.MPI_SOURCE; +- MPIR_STATUS_SET_COUNT(*status, count); +- } else { +- *flag = 0; +- } +- +- fn_exit: +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_IPROBE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ return MPIDIG_mpi_iprobe(source, tag, comm, context_offset, flag, status); + } + + #endif /* POSIX_PROBE_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_proc.h +@@ -0,0 +1,24 @@ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef SHM_POSIX_PROC_H_INCLUDED ++#define SHM_POSIX_PROC_H_INCLUDED ++ ++#include "posix_impl.h" ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rank_is_local(int rank, MPIR_Comm * comm) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_comm_get_lpid(MPIR_Comm * comm_ptr, ++ int idx, int *lpid_ptr, bool is_remote) ++{ ++ MPIR_Assert(0); ++ return MPI_SUCCESS; ++} ++ ++#endif /* SHM_POSIX_PROC_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_progress.h ++++ b/src/mpid/ch4/shm/posix/posix_progress.h +@@ -4,7 +4,7 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ +@@ -12,388 +12,306 @@ + #define POSIX_PROGRESS_H_INCLUDED + + #include "posix_impl.h" ++#include "posix_am_impl.h" ++#include + +-/* ----------------------------------------------------- */ +-/* MPIDI_POSIX_progress_recv */ +-/* ----------------------------------------------------- */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_progress_recv) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_progress_recv(int blocking, int *completion_count) ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_progress_recv(int blocking) + { ++ ++ MPIDI_POSIX_eager_recv_transaction_t transaction; + int mpi_errno = MPI_SUCCESS; +- size_t data_sz; +- int in_cell = 0; +- MPIDI_POSIX_cell_ptr_t cell = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_DO_PROGRESS_RECV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_DO_PROGRESS_RECV); +- /* try to match with unexpected */ +- MPIR_Request *sreq = MPIDI_POSIX_recvq_unexpected.head; +- MPIR_Request *prev_sreq = NULL; +- unexpected_l: +- +- if (sreq != NULL) { +- goto match_l; ++ int i; ++ int result = MPIDI_POSIX_OK; ++ MPIR_Request *rreq = NULL; ++ MPIDIG_am_target_cmpl_cb target_cmpl_cb = NULL; ++ MPIDI_POSIX_am_request_header_t *curr_rreq_hdr = NULL; ++ void *p_data = NULL; ++ size_t p_data_sz = 0; ++ size_t recv_data_sz = 0; ++ size_t in_total_data_sz = 0; ++ int iov_done = 0; ++ int is_contig; ++ void *am_hdr = NULL; ++ MPIDI_POSIX_am_header_t *msg_hdr; ++ uint8_t *payload; ++ size_t payload_left; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_PROGRESS_RECV); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_PROGRESS_RECV); ++ ++ /* Check to see if any new messages are ready for processing from the eager submodule. */ ++ result = MPIDI_POSIX_eager_recv_begin(&transaction); ++ ++ if (MPIDI_POSIX_OK != result) { ++ goto fn_exit; + } + +- /* try to receive from recvq */ +- if (MPIDI_POSIX_mem_region.my_recvQ && +- !MPIDI_POSIX_queue_empty(MPIDI_POSIX_mem_region.my_recvQ)) { +- MPIDI_POSIX_queue_dequeue(MPIDI_POSIX_mem_region.my_recvQ, &cell); +- in_cell = 1; +- goto match_l; +- } ++ /* Process the eager message */ ++ msg_hdr = transaction.msg_hdr; ++ ++ payload = transaction.payload; ++ payload_left = transaction.payload_sz; ++ ++ if (msg_hdr) { ++ am_hdr = payload; ++ p_data = payload + msg_hdr->am_hdr_sz; ++ ++ in_total_data_sz = msg_hdr->data_sz; ++ p_data_sz = msg_hdr->data_sz; ++ ++ /* Call the MPIDIG function to handle the initial receipt of the message. This will attempt ++ * to match the message (if appropriate) and return a request if the message was matched. */ ++ MPIDIG_global.target_msg_cbs[msg_hdr->handler_id] (msg_hdr->handler_id, ++ am_hdr, ++ &p_data, ++ &p_data_sz, ++ 1 /* is_local */ , &is_contig, ++ &target_cmpl_cb, &rreq); ++ POSIX_TRACE("POSIX AM target callback: handler_id = %d, am_hdr = %p, p_data = %p " ++ "p_data_sz = %lu, is_contig = %d, target_cmpl_cb = %p rreq = %p\n", ++ msg_hdr->handler_id, am_hdr, p_data, p_data_sz, is_contig, target_cmpl_cb, ++ rreq); ++ payload += msg_hdr->am_hdr_sz; ++ payload_left -= msg_hdr->am_hdr_sz; ++ ++ /* We're receiving a new message here. */ ++ if (rreq) { ++ /* zero message size optimization */ ++ if ((p_data_sz == 0) && (in_total_data_sz == 0)) { ++ ++ MPIR_STATUS_SET_COUNT(rreq->status, 0); ++ rreq->status.MPI_SOURCE = MPIDIG_REQUEST(rreq, rank); ++ rreq->status.MPI_TAG = MPIDIG_REQUEST(rreq, tag); ++ rreq->status.MPI_ERROR = MPI_SUCCESS; ++ ++ if (target_cmpl_cb) { ++ target_cmpl_cb(rreq); ++ } + +- goto fn_exit; +- match_l:{ +- /* traverse posted receive queue */ +- MPIR_Request *req = MPIDI_POSIX_recvq_posted.head; +- MPIR_Request *prev_req = NULL; +- int continue_matching = 1; +- char *send_buffer = +- in_cell ? (char *) cell->pkt.mpich.p.payload : (char *) MPIDI_POSIX_REQUEST(sreq)-> +- user_buf; +- int type = in_cell ? cell->pkt.mpich.type : MPIDI_POSIX_REQUEST(sreq)->type; +- MPIR_Request *pending = in_cell ? cell->pending : MPIDI_POSIX_REQUEST(sreq)->pending; +- +- if (type == MPIDI_POSIX_TYPEACK) { +- /* ACK message doesn't have a matching receive! */ +- int c; +- MPIR_Assert(in_cell); +- MPIR_Assert(pending); +- MPIR_cc_decr(pending->cc_ptr, &c); +- MPIR_Request_free(pending); +- goto release_cell_l; +- } ++ MPIDI_POSIX_eager_recv_commit(&transaction); + +- while (req) { +- int sender_rank, tag, context_id; +- MPI_Count count; +- MPIDI_POSIX_ENVELOPE_GET(MPIDI_POSIX_REQUEST(req), sender_rank, tag, context_id); +- MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, +- (MPL_DBG_FDEST, "Posted from grank %d to %d in progress %d,%d,%d\n", +- MPIDI_CH4U_rank_to_lpid(sender_rank, req->comm), +- MPIDI_POSIX_mem_region.rank, sender_rank, tag, context_id)); +- +- if ((in_cell && MPIDI_POSIX_ENVELOPE_MATCH(cell, sender_rank, tag, context_id)) || +- (sreq && +- MPIDI_POSIX_ENVELOPE_MATCH(MPIDI_POSIX_REQUEST(sreq), sender_rank, tag, +- context_id))) { +- +- /* Request matched */ +- +- continue_matching = 1; +- +- if (MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req)) { +- MPIDI_CH4R_anysource_matched(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req), +- MPIDI_CH4R_SHM, &continue_matching); +- +- /* The request might have been freed during +- * MPIDI_CH4R_anysource_matched. Double check that it still +- * exists. */ +- if (MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req)) { +- MPIR_Request_free(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req)); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- /* Decouple requests */ +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER +- (req)) +- = NULL; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req) = NULL; +-#endif +- } +- +- if (continue_matching) +- break; +- } ++ goto fn_exit; ++ } + +- char *recv_buffer = (char *) MPIDI_POSIX_REQUEST(req)->user_buf; +- +- if (pending) { +- /* we must send ACK */ +- int srank = in_cell ? cell->rank : sreq->status.MPI_SOURCE; +- MPIR_Request *req_ack = NULL; +- MPIDI_POSIX_REQUEST_CREATE_SREQ(req_ack); +- MPIR_Object_set_ref(req_ack, 1); +- req_ack->comm = req->comm; +- MPIR_Comm_add_ref(req->comm); +- +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(req_ack), req->comm->rank, tag, +- context_id); +- MPIDI_POSIX_REQUEST(req_ack)->user_buf = NULL; +- MPIDI_POSIX_REQUEST(req_ack)->user_count = 0; +- MPIDI_POSIX_REQUEST(req_ack)->datatype = MPI_BYTE; +- MPIDI_POSIX_REQUEST(req_ack)->data_sz = 0; +- MPIDI_POSIX_REQUEST(req_ack)->type = MPIDI_POSIX_TYPEACK; +- MPIDI_POSIX_REQUEST(req_ack)->dest = srank; +- MPIDI_POSIX_REQUEST(req_ack)->next = NULL; +- MPIDI_POSIX_REQUEST(req_ack)->segment_ptr = NULL; +- MPIDI_POSIX_REQUEST(req_ack)->pending = pending; +- /* enqueue req_ack */ +- MPIDI_POSIX_REQUEST_ENQUEUE(req_ack, MPIDI_POSIX_sendq); +- } ++ /* Received immediately */ ++ if (is_contig && (in_total_data_sz == payload_left)) { + +- if (type == MPIDI_POSIX_TYPEEAGER) +- /* eager message */ +- data_sz = +- in_cell ? cell->pkt.mpich.datalen : MPIDI_POSIX_REQUEST(sreq)->data_sz; +- else if (type == MPIDI_POSIX_TYPELMT) +- data_sz = MPIDI_POSIX_EAGER_THRESHOLD; +- else { +- data_sz = 0; /* unused warning */ +- MPIR_Assert(0); ++ if (in_total_data_sz > p_data_sz) { ++ rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; ++ } else { ++ rreq->status.MPI_ERROR = MPI_SUCCESS; + } +- /* check for user buffer overflow */ +- size_t user_data_sz = MPIDI_POSIX_REQUEST(req)->data_sz; +- if (user_data_sz < data_sz) { +- req->status.MPI_ERROR = MPI_ERR_TRUNCATE; +- data_sz = user_data_sz; ++ ++ recv_data_sz = MPL_MIN(p_data_sz, in_total_data_sz); ++ ++ MPIR_STATUS_SET_COUNT(rreq->status, recv_data_sz); ++ rreq->status.MPI_SOURCE = MPIDIG_REQUEST(rreq, rank); ++ rreq->status.MPI_TAG = MPIDIG_REQUEST(rreq, tag); ++ ++ MPIDI_POSIX_eager_recv_memcpy(&transaction, p_data, payload, recv_data_sz); ++ ++ /* Call the function to handle the completed receipt of the message. */ ++ if (target_cmpl_cb) { ++ target_cmpl_cb(rreq); + } + +- /* copy to user buffer */ +- if (MPIDI_POSIX_REQUEST(req)->segment_ptr) { +- /* non-contig */ +- size_t last = MPIDI_POSIX_REQUEST(req)->segment_first + data_sz; +- MPIR_Segment_unpack(MPIDI_POSIX_REQUEST(req)->segment_ptr, +- MPIDI_POSIX_REQUEST(req)->segment_first, +- (MPI_Aint *) & last, send_buffer); +- if (last != MPIDI_POSIX_REQUEST(req)->segment_first + data_sz) +- req->status.MPI_ERROR = MPI_ERR_TYPE; +- if (type == MPIDI_POSIX_TYPEEAGER) +- MPIR_Segment_free(MPIDI_POSIX_REQUEST(req)->segment_ptr); +- else +- MPIDI_POSIX_REQUEST(req)->segment_first = last; +- } else +- /* contig */ +- if (send_buffer) +- MPIR_Memcpy(recv_buffer, (void *) send_buffer, data_sz); +- MPIDI_POSIX_REQUEST(req)->data_sz -= data_sz; +- MPIDI_POSIX_REQUEST(req)->user_buf += data_sz; +- +- /* set status and dequeue receive request if done */ +- count = MPIR_STATUS_GET_COUNT(req->status) + (MPI_Count) data_sz; +- MPIR_STATUS_SET_COUNT(req->status, count); +- if (type == MPIDI_POSIX_TYPEEAGER) { +- if (in_cell) { +- req->status.MPI_SOURCE = cell->rank; +- req->status.MPI_TAG = cell->tag; +- } else { +- req->status.MPI_SOURCE = sreq->status.MPI_SOURCE; +- req->status.MPI_TAG = sreq->status.MPI_TAG; +- } +- MPIDI_POSIX_REQUEST_DEQUEUE_AND_SET_ERROR(&req, prev_req, +- MPIDI_POSIX_recvq_posted, +- req->status.MPI_ERROR); ++ MPIDI_POSIX_eager_recv_commit(&transaction); ++ ++ MPIDI_POSIX_EAGER_RECV_COMPLETED_HOOK(rreq); ++ ++ goto fn_exit; ++ } ++ ++ /* Allocate aux data */ ++ ++ MPIDI_POSIX_am_init_req_hdr(NULL, 0, &MPIDI_POSIX_AMREQUEST(rreq, req_hdr), rreq); ++ ++ curr_rreq_hdr = MPIDI_POSIX_AMREQUEST(rreq, req_hdr); ++ ++ curr_rreq_hdr->cmpl_handler_fn = target_cmpl_cb; ++ curr_rreq_hdr->dst_grank = transaction.src_grank; ++ ++ if (is_contig) { ++ curr_rreq_hdr->iov_ptr = curr_rreq_hdr->iov; ++ ++ curr_rreq_hdr->iov_ptr[0].iov_base = p_data; ++ curr_rreq_hdr->iov_ptr[0].iov_len = p_data_sz; ++ ++ curr_rreq_hdr->iov_num = 1; ++ ++ recv_data_sz = p_data_sz; ++ } else { ++ curr_rreq_hdr->iov_ptr = ((struct iovec *) p_data); ++ ++ for (i = 0; i < p_data_sz; i++) { ++ recv_data_sz += curr_rreq_hdr->iov_ptr[i].iov_len; + } + +- goto release_cell_l; ++ curr_rreq_hdr->iov_num = p_data_sz; + } +- /* if matched */ +- prev_req = req; +- req = MPIDI_POSIX_REQUEST(req)->next; +- } + +- /* unexpected message, no posted matching req */ +- if (in_cell) { +- /* free the cell, move to unexpected queue */ +- MPIR_Request *rreq; +- MPIDI_POSIX_REQUEST_CREATE_RREQ(rreq); +- MPIR_Object_set_ref(rreq, 1); +- /* set status */ +- rreq->status.MPI_SOURCE = cell->rank; +- rreq->status.MPI_TAG = cell->tag; +- MPIR_STATUS_SET_COUNT(rreq->status, cell->pkt.mpich.datalen); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(rreq), cell->rank, cell->tag, +- cell->context_id); +- data_sz = cell->pkt.mpich.datalen; +- MPIDI_POSIX_REQUEST(rreq)->data_sz = data_sz; +- MPIDI_POSIX_REQUEST(rreq)->type = cell->pkt.mpich.type; +- +- if (data_sz > 0) { +- MPIDI_POSIX_REQUEST(rreq)->user_buf = (char *) MPL_malloc(data_sz, MPL_MEM_SHM); +- MPIR_Memcpy(MPIDI_POSIX_REQUEST(rreq)->user_buf, (void *) cell->pkt.mpich.p.payload, +- data_sz); ++ /* Set final request status */ ++ ++ if (in_total_data_sz > recv_data_sz) { ++ rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; + } else { +- MPIDI_POSIX_REQUEST(rreq)->user_buf = NULL; ++ rreq->status.MPI_ERROR = MPI_SUCCESS; + } + +- MPIDI_POSIX_REQUEST(rreq)->datatype = MPI_BYTE; +- MPIDI_POSIX_REQUEST(rreq)->next = NULL; +- MPIDI_POSIX_REQUEST(rreq)->pending = cell->pending; +- /* enqueue rreq */ +- MPIDI_POSIX_REQUEST_ENQUEUE(rreq, MPIDI_POSIX_recvq_unexpected); +- MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, +- (MPL_DBG_FDEST, "Unexpected from grank %d to %d in progress %d,%d,%d\n", +- cell->my_rank, MPIDI_POSIX_mem_region.rank, +- cell->rank, cell->tag, cell->context_id)); ++ recv_data_sz = MPL_MIN(recv_data_sz, in_total_data_sz); ++ ++ MPIR_STATUS_SET_COUNT(rreq->status, recv_data_sz); ++ rreq->status.MPI_SOURCE = MPIDIG_REQUEST(rreq, rank); ++ rreq->status.MPI_TAG = MPIDIG_REQUEST(rreq, tag); ++ ++ curr_rreq_hdr->is_contig = is_contig; ++ curr_rreq_hdr->in_total_data_sz = in_total_data_sz; ++ ++ /* Make it active */ ++ ++ MPIR_Assert(MPIDI_POSIX_global.active_rreq[transaction.src_grank] == NULL); ++ ++ MPIDI_POSIX_global.active_rreq[transaction.src_grank] = rreq; + } else { +- /* examine another message in unexpected queue */ +- prev_sreq = sreq; +- sreq = MPIDI_POSIX_REQUEST(sreq)->next; +- goto unexpected_l; ++ MPIDI_POSIX_eager_recv_commit(&transaction); ++ ++ goto fn_exit; ++ } ++ } else { ++ /* Fragment handling. Set currently active recv request */ ++ ++ rreq = MPIDI_POSIX_global.active_rreq[transaction.src_grank]; ++ ++ curr_rreq_hdr = MPIDI_POSIX_AMREQUEST(rreq, req_hdr); ++ } ++ ++ curr_rreq_hdr->in_total_data_sz -= payload_left; ++ ++ /* Generic handling for contig and non contig data */ ++ for (i = 0; i < curr_rreq_hdr->iov_num; i++) { ++ if (payload_left < curr_rreq_hdr->iov_ptr[i].iov_len) { ++ MPIDI_POSIX_eager_recv_memcpy(&transaction, ++ curr_rreq_hdr->iov_ptr[i].iov_base, payload, ++ payload_left); ++ ++ curr_rreq_hdr->iov_ptr[i].iov_base = ++ (char *) curr_rreq_hdr->iov_ptr[i].iov_base + payload_left; ++ curr_rreq_hdr->iov_ptr[i].iov_len -= payload_left; ++ ++ break; + } ++ ++ MPIDI_POSIX_eager_recv_memcpy(&transaction, ++ curr_rreq_hdr->iov_ptr[i].iov_base, ++ payload, curr_rreq_hdr->iov_ptr[i].iov_len); ++ ++ payload += curr_rreq_hdr->iov_ptr[i].iov_len; ++ payload_left -= curr_rreq_hdr->iov_ptr[i].iov_len; ++ ++ iov_done++; ++ } ++ ++ if (curr_rreq_hdr->iov_num) { ++ curr_rreq_hdr->iov_num -= iov_done; ++ curr_rreq_hdr->iov_ptr += iov_done; + } +- release_cell_l: +- +- if (in_cell) { +- /* release cell */ +- MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, +- (MPL_DBG_FDEST, "Received from grank %d to %d in progress %d,%d,%d\n", +- cell->my_rank, MPIDI_POSIX_mem_region.rank, cell->rank, cell->tag, +- cell->context_id)); +- cell->pending = NULL; +- { +- MPIDI_POSIX_queue_enqueue(MPIDI_POSIX_mem_region.FreeQ[cell->my_rank], cell); ++ ++ if (curr_rreq_hdr->in_total_data_sz == 0) { ++ /* All fragments have been received */ ++ ++ MPIDI_POSIX_global.active_rreq[transaction.src_grank] = NULL; ++ ++ if (curr_rreq_hdr->cmpl_handler_fn) { ++ curr_rreq_hdr->cmpl_handler_fn(rreq); + } +- } else { +- /* destroy unexpected req */ +- MPIDI_POSIX_REQUEST(sreq)->pending = NULL; +- MPL_free(MPIDI_POSIX_REQUEST(sreq)->user_buf); +- MPIDI_POSIX_REQUEST_DEQUEUE_AND_SET_ERROR(&sreq, prev_sreq, MPIDI_POSIX_recvq_unexpected, +- mpi_errno); + } + +- (*completion_count)++; ++ MPIDI_POSIX_eager_recv_commit(&transaction); ++ + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_DO_PROGRESS_RECV); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_PROGRESS_RECV); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-/* ----------------------------------------------------- */ +-/* MPIDI_POSIX_progress_send */ +-/* ----------------------------------------------------- */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_progress_send) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_progress_send(int blocking, int *completion_count) ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_progress_send(int blocking) + { +- int mpi_errno = MPI_SUCCESS; +- int dest; +- MPIDI_POSIX_cell_ptr_t cell = NULL; +- MPIR_Request *sreq = MPIDI_POSIX_sendq.head; +- MPIR_Request *prev_sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_DO_PROGRESS_SEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_DO_PROGRESS_SEND); +- +- if (sreq == NULL) +- goto fn_exit; + +- /* try to send via freeq */ +- if (!MPIDI_POSIX_queue_empty(MPIDI_POSIX_mem_region.my_freeQ)) { +- MPIDI_POSIX_queue_dequeue(MPIDI_POSIX_mem_region.my_freeQ, &cell); +- MPIDI_POSIX_ENVELOPE_GET(MPIDI_POSIX_REQUEST(sreq), cell->rank, cell->tag, +- cell->context_id); +- dest = MPIDI_POSIX_REQUEST(sreq)->dest; +- char *recv_buffer = (char *) cell->pkt.mpich.p.payload; +- size_t data_sz = MPIDI_POSIX_REQUEST(sreq)->data_sz; +- /* +- * TODO: make request field dest_lpid (or even recvQ[dest_lpid]) instead of dest - no need to do rank_to_lpid each time +- */ +- int grank = MPIDI_CH4U_rank_to_lpid(dest, sreq->comm); +- cell->pending = NULL; +- +- if (MPIDI_POSIX_REQUEST(sreq)->type == MPIDI_POSIX_TYPESYNC) { +- /* increase req cc in order to release req only after ACK, do it once per SYNC request */ +- /* non-NULL pending req signal receiver about sending ACK back */ +- /* the pending req should be sent back for sender to decrease cc, for it is dequeued already */ +- int c; +- cell->pending = sreq; +- MPIR_cc_incr(sreq->cc_ptr, &c); +- MPIDI_POSIX_REQUEST(sreq)->type = MPIDI_POSIX_TYPESTANDARD; ++ int mpi_errno = MPI_SUCCESS; ++ int result = MPIDI_POSIX_OK; ++ MPIR_Request *sreq = NULL; ++ MPIDI_POSIX_am_request_header_t *curr_sreq_hdr = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_PROGRESS_SEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_PROGRESS_SEND); ++ ++ if (MPIDI_POSIX_global.postponed_queue) { ++ /* Drain postponed queue */ ++ curr_sreq_hdr = MPIDI_POSIX_global.postponed_queue; ++ ++ POSIX_TRACE("Queue OUT HDR [ POSIX AM [handler_id %" PRIu64 ", am_hdr_sz %" PRIu64 ++ ", data_sz %" PRIu64 ", seq_num = %d], request=%p] to %d\n", ++ curr_sreq_hdr->msg_hdr ? curr_sreq_hdr->msg_hdr->handler_id : (uint64_t) - 1, ++ curr_sreq_hdr->msg_hdr ? curr_sreq_hdr->msg_hdr->am_hdr_sz : (uint64_t) - 1, ++ curr_sreq_hdr->msg_hdr ? curr_sreq_hdr->msg_hdr->data_sz : (uint64_t) - 1, ++#ifdef POSIX_AM_DEBUG ++ curr_sreq_hdr->msg_hdr ? curr_sreq_hdr->msg_hdr->seq_num : -1, ++#else /* POSIX_AM_DEBUG */ ++ -1, ++#endif /* POSIX_AM_DEBUG */ ++ curr_sreq_hdr->request, curr_sreq_hdr->dst_grank); ++ ++ result = MPIDI_POSIX_eager_send(curr_sreq_hdr->dst_grank, ++ &curr_sreq_hdr->msg_hdr, ++ &curr_sreq_hdr->iov_ptr, &curr_sreq_hdr->iov_num); ++ ++ if ((MPIDI_POSIX_NOK == result) || curr_sreq_hdr->iov_num) { ++ goto fn_exit; + } + +- if (data_sz <= MPIDI_POSIX_EAGER_THRESHOLD) { +- cell->pkt.mpich.datalen = data_sz; ++ /* Remove element from postponed queue */ + +- if (MPIDI_POSIX_REQUEST(sreq)->type == MPIDI_POSIX_TYPEACK) { +- cell->pkt.mpich.type = MPIDI_POSIX_TYPEACK; +- cell->pending = MPIDI_POSIX_REQUEST(sreq)->pending; +- } else { +- /* eager message */ +- if (MPIDI_POSIX_REQUEST(sreq)->segment_ptr) { +- /* non-contig */ +- MPIR_Segment_pack(MPIDI_POSIX_REQUEST(sreq)->segment_ptr, +- MPIDI_POSIX_REQUEST(sreq)->segment_first, +- (MPI_Aint *) & MPIDI_POSIX_REQUEST(sreq)->segment_size, +- recv_buffer); +- MPIR_Segment_free(MPIDI_POSIX_REQUEST(sreq)->segment_ptr); +- } else { +- /* contig */ +- MPIR_Memcpy((void *) recv_buffer, MPIDI_POSIX_REQUEST(sreq)->user_buf, data_sz); +- } ++ DL_DELETE(MPIDI_POSIX_global.postponed_queue, curr_sreq_hdr); + +- cell->pkt.mpich.type = MPIDI_POSIX_TYPEEAGER; +- /* set status */ +- /* +- * TODO: incorrect count for LMT - set to a last chunk of data +- * is send status required? +- */ +- sreq->status.MPI_SOURCE = cell->rank; +- sreq->status.MPI_TAG = cell->tag; +- MPIR_STATUS_SET_COUNT(sreq->status, data_sz); +- } ++ /* Request has been completed. ++ * If associated with a device-layer sreq, call origin callback and cleanup. ++ * Otherwise this is a POSIX internal queued sreq_hdr, simply release. */ ++ if (curr_sreq_hdr->request) { ++ sreq = curr_sreq_hdr->request; + +- /* dequeue sreq */ +- MPIDI_POSIX_REQUEST_DEQUEUE_AND_SET_ERROR(&sreq, prev_sreq, MPIDI_POSIX_sendq, +- mpi_errno); +- } else { +- /* long message */ +- if (MPIDI_POSIX_REQUEST(sreq)->segment_ptr) { +- /* non-contig */ +- size_t last = +- MPIDI_POSIX_REQUEST(sreq)->segment_first + MPIDI_POSIX_EAGER_THRESHOLD; +- MPIR_Segment_pack(MPIDI_POSIX_REQUEST(sreq)->segment_ptr, +- MPIDI_POSIX_REQUEST(sreq)->segment_first, (MPI_Aint *) & last, +- recv_buffer); +- MPIDI_POSIX_REQUEST(sreq)->segment_first = last; +- } else { +- /* contig */ +- MPIR_Memcpy((void *) recv_buffer, MPIDI_POSIX_REQUEST(sreq)->user_buf, +- MPIDI_POSIX_EAGER_THRESHOLD); +- MPIDI_POSIX_REQUEST(sreq)->user_buf += MPIDI_POSIX_EAGER_THRESHOLD; +- } ++ MPL_free(MPIDI_POSIX_AMREQUEST_HDR(sreq, pack_buffer)); ++ MPIDI_POSIX_AMREQUEST_HDR(sreq, pack_buffer) = NULL; + +- cell->pkt.mpich.datalen = MPIDI_POSIX_EAGER_THRESHOLD; +- MPIDI_POSIX_REQUEST(sreq)->data_sz -= MPIDI_POSIX_EAGER_THRESHOLD; +- cell->pkt.mpich.type = MPIDI_POSIX_TYPELMT; ++ MPIDIG_global.origin_cbs[curr_sreq_hdr->handler_id] (sreq); ++ } else { ++ MPIDI_POSIX_am_release_req_hdr(&curr_sreq_hdr); + } +- +- MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, +- (MPL_DBG_FDEST, "Sent to grank %d from %d in progress %d,%d,%d\n", grank, +- cell->my_rank, cell->rank, cell->tag, cell->context_id)); +- MPIDI_POSIX_queue_enqueue(MPIDI_POSIX_mem_region.RecvQ[grank], cell); +- (*completion_count)++; + } + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_DO_PROGRESS_SEND); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_PROGRESS_SEND); + return mpi_errno; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_progress) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_progress(int blocking) + { +- int complete = 0; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_PROGRESS); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_PROGRESS); + +- do { +- /* Receieve progress */ +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIDI_POSIX_progress_recv(blocking, &complete); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- /* Send progress */ +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIDI_POSIX_progress_send(blocking, &complete); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- +- if (complete > 0) +- break; +- } while (blocking); ++ int mpi_errno = MPI_SUCCESS; ++ ++ mpi_errno = MPIDI_POSIX_progress_recv(blocking); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); + ++ mpi_errno = MPIDI_POSIX_progress_send(blocking); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_PROGRESS); +- return MPI_SUCCESS; ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_progress_test(void) +deleted file mode 100644 +--- a/src/mpid/ch4/shm/posix/posix_queue.h ++++ /dev/null +@@ -1,337 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2016 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef POSIX_QUEUE_H_INCLUDED +-#define POSIX_QUEUE_H_INCLUDED +- +-/* ------------------------------------------------------- */ +-/* from mpid/ch3/channels/nemesis/include/mpid_nem_debug.h */ +-/* ------------------------------------------------------- */ +- +-/*#define MPIDI_POSIX_YIELD_IN_SKIP*/ +-#ifdef MPIDI_POSIX_YIELD_IN_SKIP +-#define MPIDI_POSIX_SKIP MPL_sched_yield() +-#warning "MPIDI_POSIX_SKIP is yield" +-#else /* MPIDI_POSIX_YIELD_IN_SKIP */ +-#define MPIDI_POSIX_SKIP do {} while (0) +-/*#warning "MPIDI_POSIX_SKIP is do ...while" */ +-#endif /* MPIDI_POSIX_YIELD_IN_SKIP */ +- +-/* ------------------------------------------------------- */ +-/* from mpid/ch3/channels/nemesis/include/mpid_nem_queue.h */ +-/* ------------------------------------------------------- */ +- +-/* Assertion macros for nemesis queues. We don't use the normal +- * assertion macros because we don't usually want to assert several +- * times per queue operation. These assertions serve more as structured +- * comments that can easily transformed into being real assertions */ +-#define MPIDI_POSIX_Q_assert(a_) \ +- do {/*nothing*/} while (0) +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_cell_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_POSIX_cell_init(MPIDI_POSIX_cell_ptr_t cell, int rank) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_CELL_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_CELL_INIT); +- +- MPIDI_POSIX_SET_REL_NULL(cell->next); +- memset((void *) &cell->pkt, 0, sizeof(MPIDI_POSIX_pkt_header_t)); +- cell->my_rank = rank; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_CELL_INIT); +-} +- +-#ifdef MPIDI_POSIX_USE_LOCK_FREE_QUEUES +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_queue_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_POSIX_queue_init(MPIDI_POSIX_queue_ptr_t qhead) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_QUEUE_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_QUEUE_INIT); +- +- MPIDI_POSIX_SET_REL_NULL(qhead->head); +- MPIDI_POSIX_SET_REL_NULL(qhead->my_head); +- MPIDI_POSIX_SET_REL_NULL(qhead->tail); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_QUEUE_INIT); +-} +- +-#define MPIDI_POSIX_USE_SHADOW_HEAD +- +-static inline MPIDI_POSIX_cell_rel_ptr_t MPIDI_POSIX_SWAP_REL(MPIDI_POSIX_cell_rel_ptr_t * ptr, +- MPIDI_POSIX_cell_rel_ptr_t val) +-{ +- MPIDI_POSIX_cell_rel_ptr_t ret; +- OPA_store_ptr(&ret.p, OPA_swap_ptr(&(ptr->p), OPA_load_ptr(&val.p))); +- return ret; +-} +- +-/* do a compare-and-swap with MPIDI_POSIX_RELNULL */ +-static inline MPIDI_POSIX_cell_rel_ptr_t MPIDI_POSIX_CAS_REL_NULL(MPIDI_POSIX_cell_rel_ptr_t * ptr, +- MPIDI_POSIX_cell_rel_ptr_t oldv) +-{ +- MPIDI_POSIX_cell_rel_ptr_t ret; +- OPA_store_ptr(&ret.p, OPA_cas_ptr(&(ptr->p), OPA_load_ptr(&oldv.p), MPIDI_POSIX_REL_NULL)); +- return ret; +-} +- +-static inline void MPIDI_POSIX_queue_enqueue(MPIDI_POSIX_queue_ptr_t qhead, +- MPIDI_POSIX_cell_ptr_t element) +-{ +- MPIDI_POSIX_cell_rel_ptr_t r_prev; +- MPIDI_POSIX_cell_rel_ptr_t r_element = MPIDI_POSIX_ABS_TO_REL(element); +- +- /* the _dequeue can break if this does not hold */ +- MPIDI_POSIX_Q_assert(MPIDI_POSIX_IS_REL_NULL(element->next)); +- +- /* Orders payload and e->next=NULL w.r.t. the SWAP, updating head, and +- * updating prev->next. We assert e->next==NULL above, but it may have been +- * done by us in the preceding _dequeue operation. +- * +- * The SWAP itself does not need to be ordered w.r.t. the payload because +- * the consumer does not directly inspect the tail. But the subsequent +- * update to the head or e->next field does need to be ordered w.r.t. the +- * payload or the consumer may read incorrect data. */ +- OPA_write_barrier(); +- +- /* enqueue at tail */ +- r_prev = MPIDI_POSIX_SWAP_REL(&(qhead->tail), r_element); +- +- if (MPIDI_POSIX_IS_REL_NULL(r_prev)) { +- /* queue was empty, element is the new head too */ +- +- /* no write barrier needed, we believe atomic SWAP with a control +- * dependence (if) will enforce ordering between the SWAP and the head +- * assignment */ +- qhead->head = r_element; +- } else { +- /* queue was not empty, swing old tail's next field to point to +- * our element */ +- MPIDI_POSIX_Q_assert(MPIDI_POSIX_IS_REL_NULL(MPIDI_POSIX_REL_TO_ABS(r_prev)->next)); +- +- /* no write barrier needed, we believe atomic SWAP with a control +- * dependence (if/else) will enforce ordering between the SWAP and the +- * prev->next assignment */ +- MPIDI_POSIX_REL_TO_ABS(r_prev)->next = r_element; +- } +-} +- +-/* This operation is only safe because this is a single-dequeuer queue impl. +- Assumes that MPIDI_POSIX_queue_empty was called immediately prior to fix up any +- shadow head issues. */ +-static inline MPIDI_POSIX_cell_ptr_t MPIDI_POSIX_queue_head(MPIDI_POSIX_queue_ptr_t qhead) +-{ +- MPIDI_POSIX_Q_assert(MPIDI_POSIX_IS_REL_NULL(qhead->head)); +- return MPIDI_POSIX_REL_TO_ABS(qhead->my_head); +-} +- +-static inline int MPIDI_POSIX_queue_empty(MPIDI_POSIX_queue_ptr_t qhead) +-{ +- /* outside of this routine my_head and head should never both +- * contain a non-null value */ +- MPIDI_POSIX_Q_assert(MPIDI_POSIX_IS_REL_NULL(qhead->my_head) || +- MPIDI_POSIX_IS_REL_NULL(qhead->head)); +- +- if (MPIDI_POSIX_IS_REL_NULL(qhead->my_head)) { +- /* the order of comparison between my_head and head does not +- * matter, no read barrier needed here */ +- if (MPIDI_POSIX_IS_REL_NULL(qhead->head)) { +- /* both null, nothing in queue */ +- return 1; +- } else { +- /* shadow head null and head has value, move the value to +- * our private shadow head and zero the real head */ +- qhead->my_head = qhead->head; +- /* no barrier needed, my_head is entirely private to consumer */ +- MPIDI_POSIX_SET_REL_NULL(qhead->head); +- } +- } +- +- /* the following assertions are present at the beginning of _dequeue: +- * MPIDI_POSIX_Q_assert(!MPIDI_POSIX_IS_REL_NULL(qhead->my_head)); +- * MPIDI_POSIX_Q_assert(MPIDI_POSIX_IS_REL_NULL(qhead->head)); +- */ +- return 0; +-} +- +- +-/* Gets the head */ +-static inline void MPIDI_POSIX_queue_dequeue(MPIDI_POSIX_queue_ptr_t qhead, +- MPIDI_POSIX_cell_ptr_t * e) +-{ +- MPIDI_POSIX_cell_ptr_t _e; +- MPIDI_POSIX_cell_rel_ptr_t _r_e; +- +- /* _empty always called first, moving head-->my_head */ +- MPIDI_POSIX_Q_assert(!MPIDI_POSIX_IS_REL_NULL(qhead->my_head)); +- MPIDI_POSIX_Q_assert(MPIDI_POSIX_IS_REL_NULL(qhead->head)); +- +- _r_e = qhead->my_head; +- _e = MPIDI_POSIX_REL_TO_ABS(_r_e); +- +- /* no barrier needed, my_head is private to consumer, plus +- * head/my_head and _e->next are ordered by a data dependency */ +- if (!MPIDI_POSIX_IS_REL_NULL(_e->next)) { +- qhead->my_head = _e->next; +- } else { +- /* we've reached the end (tail) of the queue */ +- MPIDI_POSIX_cell_rel_ptr_t old_tail; +- +- MPIDI_POSIX_SET_REL_NULL(qhead->my_head); +- /* no barrier needed, the caller doesn't need any ordering w.r.t. +- * my_head or the tail */ +- old_tail = MPIDI_POSIX_CAS_REL_NULL(&(qhead->tail), _r_e); +- +- if (!MPIDI_POSIX_REL_ARE_EQUAL(old_tail, _r_e)) { +- /* FIXME is a barrier needed here because of the control-only dependency? */ +- while (MPIDI_POSIX_IS_REL_NULL(_e->next)) { +- MPIDI_POSIX_SKIP; +- } +- +- /* no read barrier needed between loads from the same location */ +- qhead->my_head = _e->next; +- } +- } +- +- MPIDI_POSIX_SET_REL_NULL(_e->next); +- +- /* Conservative read barrier here to ensure loads from head are ordered +- * w.r.t. payload reads by the caller. The McKenney "whymb" document's +- * Figure 11 indicates that we don't need a barrier, but we are currently +- * unconvinced of this. Further work, ideally using more formal methods, +- * should justify removing this. (note that this barrier won't cost us +- * anything on many platforms, esp. x86) */ +- OPA_read_barrier(); +- +- *e = _e; +-} +- +-#else /* !defined(MPIDI_POSIX_USE_LOCK_FREE_QUEUES) */ +- +-/* FIXME We shouldn't really be using the MPID_Thread_mutex_* code but the +- * MPIDU_Process_locks code is a total mess right now. In the long term we need +- to resolve this, but in the short run it should be safe on most (all?) +- platforms to use these instead. Usually they will both boil down to a +- pthread_mutex_t and and associated functions. */ +-#define MPIDI_POSIX_queue_mutex_create MPID_Thread_mutex_create +-#define MPIDI_POSIX_queue_mutex_lock MPID_Thread_mutex_lock +-#define MPIDI_POSIX_queue_mutex_unlock MPID_Thread_mutex_unlock +- +-/* must be called by exactly one process per queue */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_queue_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_POSIX_queue_init(MPIDI_POSIX_queue_ptr_t qhead) +-{ +- int err = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_QUEUE_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_QUEUE_INIT); +- +- MPIDI_POSIX_SET_REL_NULL(qhead->head); +- MPIDI_POSIX_SET_REL_NULL(qhead->my_head); +- MPIDI_POSIX_SET_REL_NULL(qhead->tail); +- MPIDI_POSIX_queue_mutex_create(&qhead->lock, &err); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_QUEUE_INIT); +-} +- +-static inline void MPIDI_POSIX_queue_enqueue(MPIDI_POSIX_queue_ptr_t qhead, +- MPIDI_POSIX_cell_ptr_t element) +-{ +- int err = 0; +- MPIDI_POSIX_cell_rel_ptr_t r_prev; +- MPIDI_POSIX_cell_rel_ptr_t r_element = MPIDI_POSIX_ABS_TO_REL(element); +- +- MPIDI_POSIX_queue_mutex_lock(&qhead->lock, &err); +- +- r_prev = qhead->tail; +- qhead->tail = r_element; +- +- if (MPIDI_POSIX_IS_REL_NULL(r_prev)) { +- qhead->head = r_element; +- } else { +- MPIDI_POSIX_REL_TO_ABS(r_prev)->next = r_element; +- } +- +- MPIDI_POSIX_queue_mutex_unlock(&qhead->lock, &err); +-} +- +-/* This operation is only safe because this is a single-dequeuer queue impl. */ +-static inline MPIDI_POSIX_cell_ptr_t MPIDI_POSIX_queue_head(MPIDI_POSIX_queue_ptr_t qhead) +-{ +- return MPIDI_POSIX_REL_TO_ABS(qhead->my_head); +-} +- +-/* Assumption: regular loads & stores are atomic. This may not be univerally +- true, but it's not uncommon. We often need to use these "lock-ful" queues on +- platforms where atomics are not yet implemented, so we can't rely on the +- atomics to provide atomic load/store operations for us. */ +-static inline int MPIDI_POSIX_queue_empty(MPIDI_POSIX_queue_ptr_t qhead) +-{ +- if (MPIDI_POSIX_IS_REL_NULL(qhead->my_head)) { +- if (MPIDI_POSIX_IS_REL_NULL(qhead->head)) { +- return 1; +- } else { +- qhead->my_head = qhead->head; +- MPIDI_POSIX_SET_REL_NULL(qhead->head); /* reset it for next time */ +- } +- } +- +- return 0; +-} +- +-static inline void MPIDI_POSIX_queue_dequeue(MPIDI_POSIX_queue_ptr_t qhead, +- MPIDI_POSIX_cell_ptr_t * e) +-{ +- int err = 0; +- MPIDI_POSIX_cell_ptr_t _e; +- MPIDI_POSIX_cell_rel_ptr_t _r_e; +- +- _r_e = qhead->my_head; +- _e = MPIDI_POSIX_REL_TO_ABS(_r_e); +- +- +- if (MPIDI_POSIX_IS_REL_NULL(_e->next)) { +- /* a REL_NULL _e->next or writing qhead->tail both require locking */ +- MPIDI_POSIX_queue_mutex_lock(&qhead->lock, &err); +- qhead->my_head = _e->next; +- +- /* We have to check _e->next again because it may have changed between +- * the time we checked it without the lock and the time that we acquired +- * the lock. */ +- if (MPIDI_POSIX_IS_REL_NULL(_e->next)) { +- MPIDI_POSIX_SET_REL_NULL(qhead->tail); +- } +- +- MPIDI_POSIX_queue_mutex_unlock(&qhead->lock, &err); +- } else { /* !MPIDI_POSIX_IS_REL_NULL(_e->next) */ +- /* We don't need to lock because a non-null _e->next can't be changed by +- * anyone but us (the dequeuer) and we don't need to modify qhead->tail +- * because we aren't removing the last element from the queue. */ +- qhead->my_head = _e->next; +- } +- +- MPIDI_POSIX_SET_REL_NULL(_e->next); +- *e = _e; +-} +- +-#endif /* !defined(MPIDI_POSIX_USE_LOCK_FREE_QUEUES) */ +- +-#endif /* POSIX_QUEUE_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_recv.h ++++ b/src/mpid/ch4/shm/posix/posix_recv.h +@@ -4,7 +4,7 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ +@@ -14,87 +14,18 @@ + #include "posix_impl.h" + #include "ch4_impl.h" + +-/* ---------------------------------------------------- */ +-/* general queues */ +-/* ---------------------------------------------------- */ +-extern MPIDI_POSIX_request_queue_t MPIDI_POSIX_recvq_posted; +-extern MPIDI_POSIX_request_queue_t MPIDI_POSIX_recvq_unexpected; +- +-/* ---------------------------------------------------- */ +-/* MPIDI_POSIX_do_irecv */ +-/* ---------------------------------------------------- */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_do_irecv) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_irecv(void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request) ++/* Hook triggered after posting a SHM receive request. ++ * It hints the SHM/POSIX internal transport that the user is expecting ++ * an incoming message from a specific rank, thus allowing the transport ++ * to optimize progress polling (i.e., in POSIX/eager/fbox, the polling ++ * will start from this rank at the next progress polling, see ++ * MPIDI_POSIX_eager_recv_begin). */ ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_recv_posted_hook(MPIR_Request * request, int rank, ++ MPIR_Comm * comm) + { +- int mpi_errno = MPI_SUCCESS, dt_contig; +- size_t data_sz; +- MPI_Aint dt_true_lb; +- MPIR_Datatype *dt_ptr; +- MPIR_Request *rreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_DO_IRECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_DO_IRECV); +- +- MPIDI_POSIX_REQUEST_CREATE_COND_RREQ(*request); +- rreq = *request; +- +- if (unlikely(rank == MPI_PROC_NULL)) { +- MPIR_Status_set_procnull(&(rreq->status)); +- goto fn_exit; +- } +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(rreq), rank, tag, +- comm->recvcontext_id + context_offset); +- rreq->comm = comm; +- MPIR_Comm_add_ref(comm); +- MPIDI_POSIX_REQUEST(rreq)->user_buf = (char *) buf + dt_true_lb; +- MPIDI_POSIX_REQUEST(rreq)->user_count = count; +- MPIDI_POSIX_REQUEST(rreq)->datatype = datatype; +- MPIDI_POSIX_REQUEST(rreq)->data_sz = data_sz; +- MPIDI_POSIX_REQUEST(rreq)->next = NULL; +- MPIDI_POSIX_REQUEST(rreq)->segment_ptr = NULL; +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq) = NULL; +-#endif +- MPIR_STATUS_SET_COUNT(rreq->status, 0); +- +- if (!dt_contig) { +- MPIDI_POSIX_REQUEST(rreq)->segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((MPIDI_POSIX_REQUEST(rreq)->segment_ptr == NULL), mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init((char *) buf, MPIDI_POSIX_REQUEST(rreq)->user_count, +- MPIDI_POSIX_REQUEST(rreq)->datatype, +- MPIDI_POSIX_REQUEST(rreq)->segment_ptr); +- MPIDI_POSIX_REQUEST(rreq)->segment_first = 0; +- MPIDI_POSIX_REQUEST(rreq)->segment_size = data_sz; +- } +- +- MPIR_Datatype_add_ref_if_not_builtin(datatype); +- /* enqueue rreq */ +- MPIDI_POSIX_REQUEST_ENQUEUE(rreq, MPIDI_POSIX_recvq_posted); +- MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, +- (MPL_DBG_FDEST, +- "Enqueued from grank %d to %d (comm_kind %d) in recv %d,%d,%d\n", +- MPIDI_CH4U_rank_to_lpid(rank, comm), MPIDI_POSIX_mem_region.rank, +- (int) comm->comm_kind, rank, tag, comm->recvcontext_id + context_offset)); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_DO_IRECV); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ MPIDI_POSIX_EAGER_RECV_POSTED_HOOK(request, rank, comm); + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_mpi_recv) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_recv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -104,192 +35,29 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_recv(void *buf, + int context_offset, MPI_Status * status, + MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS, dt_contig __attribute__ ((__unused__)); +- size_t data_sz __attribute__ ((__unused__)); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_RECV); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_RECV); +- +- /* create a request */ +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- mpi_errno = +- MPIDI_POSIX_do_irecv(buf, count, datatype, rank, tag, comm, context_offset, request); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_RECV); ++ int mpi_errno = ++ MPIDIG_mpi_recv(buf, count, datatype, rank, tag, comm, context_offset, status, request); ++ MPIDI_POSIX_recv_posted_hook(*request, rank, comm); + return mpi_errno; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_mpi_recv) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_recv_init(void *buf, +- int count, ++ MPI_Aint count, + MPI_Datatype datatype, + int rank, + int tag, + MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_RECV_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_RECV_INIT); +- +- MPIDI_POSIX_REQUEST_CREATE_RREQ(rreq); +- MPIR_Object_set_ref(rreq, 1); +- MPIR_cc_set(&rreq->cc, 0); +- rreq->kind = MPIR_REQUEST_KIND__PREQUEST_RECV; +- rreq->comm = comm; +- MPIR_Comm_add_ref(comm); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(rreq), rank, tag, +- comm->recvcontext_id + context_offset); +- MPIDI_POSIX_REQUEST(rreq)->user_buf = (char *) buf; +- MPIDI_POSIX_REQUEST(rreq)->user_count = count; +- MPIDI_POSIX_REQUEST(rreq)->datatype = datatype; +- *request = rreq; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_RECV_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ return MPIDIG_mpi_recv_init(buf, count, datatype, rank, tag, comm, context_offset, request); + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_imrecv(void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- MPIR_Request * message, MPIR_Request ** rreqp) ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_imrecv(void *buf, MPI_Aint count, ++ MPI_Datatype datatype, MPIR_Request * message) + { +- int mpi_errno = MPI_SUCCESS; +- int dt_contig; +- size_t data_sz; +- MPI_Aint dt_true_lb; +- MPIR_Datatype *dt_ptr; +- MPIR_Request *rreq = NULL, *sreq = NULL; +- int rank, tag, context_id; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_IMRECV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_IMRECV); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- +- MPIR_Assert(message != NULL); +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- MPIDI_POSIX_REQUEST_CREATE_COND_RREQ(*rreqp); +- rreq = *rreqp; +- MPIR_Object_set_ref(rreq, 1); +- MPIR_cc_set(&rreq->cc, 0); +- MPIDI_POSIX_ENVELOPE_GET(MPIDI_POSIX_REQUEST(message), rank, tag, context_id); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(rreq), rank, tag, context_id); +- rreq->comm = message->comm; +- MPIR_Comm_add_ref(message->comm); +- MPIDI_POSIX_REQUEST(rreq)->user_buf = (char *) buf + dt_true_lb; +- MPIDI_POSIX_REQUEST(rreq)->user_count = count; +- MPIDI_POSIX_REQUEST(rreq)->datatype = datatype; +- MPIDI_POSIX_REQUEST(rreq)->next = NULL; +- MPIDI_POSIX_REQUEST(rreq)->segment_ptr = NULL; +- MPIR_STATUS_SET_COUNT(rreq->status, 0); +- +- if (!dt_contig) { +- MPIDI_POSIX_REQUEST(rreq)->segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((MPIDI_POSIX_REQUEST(rreq)->segment_ptr == NULL), mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init((char *) buf, MPIDI_POSIX_REQUEST(rreq)->user_count, +- MPIDI_POSIX_REQUEST(rreq)->datatype, +- MPIDI_POSIX_REQUEST(rreq)->segment_ptr); +- MPIDI_POSIX_REQUEST(rreq)->segment_first = 0; +- MPIDI_POSIX_REQUEST(rreq)->segment_size = data_sz; +- } +- +- if (MPIDI_POSIX_REQUEST(message)->pending) { +- /* Sync send - we must send ACK */ +- int srank = message->status.MPI_SOURCE; +- MPIR_Request *req_ack = NULL; +- MPIDI_POSIX_REQUEST_CREATE_SREQ(req_ack); +- MPIR_Object_set_ref(req_ack, 1); +- req_ack->comm = message->comm; +- MPIR_Comm_add_ref(message->comm); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(req_ack), message->comm->rank, tag, +- context_id); +- MPIDI_POSIX_REQUEST(req_ack)->user_buf = NULL; +- MPIDI_POSIX_REQUEST(req_ack)->user_count = 0; +- MPIDI_POSIX_REQUEST(req_ack)->datatype = MPI_BYTE; +- MPIDI_POSIX_REQUEST(req_ack)->data_sz = 0; +- MPIDI_POSIX_REQUEST(req_ack)->type = MPIDI_POSIX_TYPEACK; +- MPIDI_POSIX_REQUEST(req_ack)->dest = srank; +- MPIDI_POSIX_REQUEST(req_ack)->next = NULL; +- MPIDI_POSIX_REQUEST(req_ack)->segment_ptr = NULL; +- MPIDI_POSIX_REQUEST(req_ack)->pending = MPIDI_POSIX_REQUEST(message)->pending; +- /* enqueue req_ack */ +- MPIDI_POSIX_REQUEST_ENQUEUE(req_ack, MPIDI_POSIX_sendq); +- } +- +- for (sreq = message; sreq;) { +- MPIR_Request *next_req = NULL; +- char *send_buffer = MPIDI_POSIX_REQUEST(sreq)->user_buf; +- char *recv_buffer = (char *) MPIDI_POSIX_REQUEST(rreq)->user_buf; +- +- if (MPIDI_POSIX_REQUEST(sreq)->type == MPIDI_POSIX_TYPEEAGER) { +- /* eager message */ +- data_sz = MPIDI_POSIX_REQUEST(sreq)->data_sz; +- +- if (MPIDI_POSIX_REQUEST(rreq)->segment_ptr) { +- /* non-contig */ +- size_t last = MPIDI_POSIX_REQUEST(rreq)->segment_first + data_sz; +- MPIR_Segment_unpack(MPIDI_POSIX_REQUEST(rreq)->segment_ptr, +- MPIDI_POSIX_REQUEST(rreq)->segment_first, (MPI_Aint *) & last, +- send_buffer); +- MPIR_Segment_free(MPIDI_POSIX_REQUEST(rreq)->segment_ptr); +- } else +- /* contig */ +- if (send_buffer) +- MPIR_Memcpy(recv_buffer, (void *) send_buffer, data_sz); +- +- /* set status */ +- rreq->status.MPI_SOURCE = sreq->status.MPI_SOURCE; +- rreq->status.MPI_TAG = sreq->status.MPI_TAG; +- count = MPIR_STATUS_GET_COUNT(rreq->status) + (MPI_Count) data_sz; +- MPIR_STATUS_SET_COUNT(rreq->status, count); +- } else if (MPIDI_POSIX_REQUEST(sreq)->type == MPIDI_POSIX_TYPELMT) { +- /* long message */ +- if (MPIDI_POSIX_REQUEST(rreq)->segment_ptr) { +- /* non-contig */ +- size_t last = +- MPIDI_POSIX_REQUEST(rreq)->segment_first + MPIDI_POSIX_EAGER_THRESHOLD; +- MPIR_Segment_unpack(MPIDI_POSIX_REQUEST(rreq)->segment_ptr, +- MPIDI_POSIX_REQUEST(rreq)->segment_first, (MPI_Aint *) & last, +- send_buffer); +- MPIDI_POSIX_REQUEST(rreq)->segment_first = last; +- } else +- /* contig */ +- if (send_buffer) +- MPIR_Memcpy(recv_buffer, (void *) send_buffer, MPIDI_POSIX_EAGER_THRESHOLD); +- +- MPIDI_POSIX_REQUEST(rreq)->data_sz -= MPIDI_POSIX_EAGER_THRESHOLD; +- MPIDI_POSIX_REQUEST(rreq)->user_buf += MPIDI_POSIX_EAGER_THRESHOLD; +- count = MPIR_STATUS_GET_COUNT(rreq->status) + (MPI_Count) MPIDI_POSIX_EAGER_THRESHOLD; +- MPIR_STATUS_SET_COUNT(rreq->status, count); +- } +- +- /* destroy unexpected req */ +- MPIDI_POSIX_REQUEST(sreq)->pending = NULL; +- MPL_free(MPIDI_POSIX_REQUEST(sreq)->user_buf); +- next_req = MPIDI_POSIX_REQUEST(sreq)->next; +- MPIDI_POSIX_REQUEST_COMPLETE(sreq); +- sreq = next_req; +- } +- +- +- fn_exit: +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_IMRECV); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ return MPIDIG_mpi_imrecv(buf, count, datatype, message); + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_mpi_irecv) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_irecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -298,60 +66,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_irecv(void *buf, + MPIR_Comm * comm, int context_offset, + MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_IRECV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_IRECV); +- +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- +- mpi_errno = +- MPIDI_POSIX_do_irecv(buf, count, datatype, rank, tag, comm, context_offset, request); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_IRECV); ++ int mpi_errno = ++ MPIDIG_mpi_irecv(buf, count, datatype, rank, tag, comm, context_offset, request); ++ MPIDI_POSIX_recv_posted_hook(*request, rank, comm); + return mpi_errno; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_mpi_cancel_recv) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_cancel_recv(MPIR_Request * rreq) + { +- MPIR_Request *req = MPIDI_POSIX_recvq_posted.head; +- MPIR_Request *prev_req = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_CANCEL_RECV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_CANCEL_RECV); +- +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- +- while (req) { +- if (req == rreq) { +- /* Remove request from shm posted receive queue */ +- +- if (prev_req) { +- MPIDI_POSIX_REQUEST(prev_req)->next = MPIDI_POSIX_REQUEST(req)->next; +- } else { +- MPIDI_POSIX_recvq_posted.head = MPIDI_POSIX_REQUEST(req)->next; +- } +- +- if (req == MPIDI_POSIX_recvq_posted.tail) { +- MPIDI_POSIX_recvq_posted.tail = prev_req; +- } +- +- MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE); +- MPIR_STATUS_SET_COUNT(req->status, 0); +- MPIDI_POSIX_REQUEST_COMPLETE(req); +- +- break; +- } +- +- prev_req = req; +- req = MPIDI_POSIX_REQUEST(req)->next; +- } +- +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_CANCEL_RECV); +- return MPI_SUCCESS; ++ return MPIDIG_mpi_cancel_recv(rreq); + } + + #endif /* POSIX_RECV_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_request.h ++++ b/src/mpid/ch4/shm/posix/posix_request.h +@@ -4,7 +4,7 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ +@@ -12,25 +12,37 @@ + #define POSIX_REQUEST_H_INCLUDED + + #include "posix_impl.h" ++#include "posix_am_impl.h" + + MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_am_request_init(MPIR_Request * req) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_REQUEST_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_REQUEST_INIT); ++ MPIDI_POSIX_AMREQUEST(req, req_hdr) = NULL; + +- MPIR_Assert(0); ++ MPIDI_POSIX_EAGER_RECV_INITIALIZE_HOOK(req); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_REQUEST_INIT); ++ POSIX_TRACE("Created request %d\n", req->kind); + } + + MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_am_request_finalize(MPIR_Request * req) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_AM_REQUEST_FINALIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_AM_REQUEST_FINALIZE); ++ MPIDI_POSIX_am_request_header_t *req_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_AM_OFI_CLEAR_REQ); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_AM_OFI_CLEAR_REQ); + +- MPIR_Assert(0); ++ MPIDI_POSIX_EAGER_RECV_COMPLETED_HOOK(req); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_AM_REQUEST_FINALIZE); ++ req_hdr = MPIDI_POSIX_AMREQUEST(req, req_hdr); ++ ++ if (!req_hdr) ++ return; ++ ++ POSIX_TRACE("Completed request %d (%d)\n", req->kind, req_hdr->dst_grank); ++ ++ MPIDI_POSIX_am_release_req_hdr(&req_hdr); ++ MPIDI_POSIX_AMREQUEST(req, req_hdr) = NULL; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_AM_OFI_CLEAR_REQ); ++ return; + } + + #endif /* POSIX_REQUEST_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_rma.h ++++ b/src/mpid/ch4/shm/posix/posix_rma.h +@@ -14,10 +14,6 @@ + #include "ch4_impl.h" + #include "posix_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_compute_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_compute_accumulate(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -31,16 +27,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_compute_accumulate(void *origin_addr, + MPI_Aint total_len = 0; + MPI_Aint origin_dtp_size = 0; + MPIR_Datatype *origin_dtp_ptr = NULL; +- MPIR_Segment *seg = NULL; + void *packed_buf = NULL; +- MPI_Aint first = 0, last = 0; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_COMPUTE_ACCUMULATE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_COMPUTE_ACCUMULATE); + + /* Handle contig origin datatype */ + if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) { +- mpi_errno = MPIDI_CH4U_compute_acc_op(origin_addr, origin_count, origin_datatype, +- target_addr, target_count, target_datatype, op); ++ mpi_errno = MPIDIG_compute_acc_op(origin_addr, origin_count, origin_datatype, target_addr, ++ target_count, target_datatype, op, ++ MPIDIG_ACC_SRCBUF_DEFAULT); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -64,26 +59,25 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_compute_accumulate(void *origin_addr, + predefined_dtp_count = total_len / predefined_dtp_size; + + #if defined(HAVE_ERROR_CHECKING) +- MPI_Aint predefined_dtp_extent = 0; ++ MPI_Aint predefined_dtp_extent ATTRIBUTE((unused)) = 0; + MPIR_Datatype_get_extent_macro(basic_type, predefined_dtp_extent); + MPIR_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 && predefined_dtp_extent > 0); + #endif + + /* Pack origin data into a contig buffer */ +- last = total_len; + packed_buf = MPL_malloc(total_len, MPL_MEM_BUFFER); + MPIR_ERR_CHKANDJUMP(packed_buf == NULL, mpi_errno, MPI_ERR_NO_MEM, "**nomem"); + +- seg = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", +- "MPIR_Segment"); +- MPIR_Segment_init(origin_addr, origin_count, origin_datatype, seg); +- MPIR_Segment_pack(seg, first, &last, packed_buf); +- MPIR_Segment_free(seg); ++ MPI_Aint actual_pack_bytes; ++ mpi_errno = MPIR_Typerep_pack(origin_addr, origin_count, origin_datatype, 0, ++ packed_buf, total_len, &actual_pack_bytes); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Assert(actual_pack_bytes == total_len); + +- mpi_errno = MPIDI_CH4U_compute_acc_op((void *) packed_buf, (int) predefined_dtp_count, +- basic_type, target_addr, target_count, target_datatype, +- op); ++ mpi_errno = MPIDIG_compute_acc_op((void *) packed_buf, (int) predefined_dtp_count, basic_type, ++ target_addr, target_count, target_datatype, op, ++ MPIDIG_ACC_SRCBUF_PACKED); + + fn_exit: + MPL_free(packed_buf); +@@ -93,10 +87,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_compute_accumulate(void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_do_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_put(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -112,12 +102,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_put(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_DO_PUT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_DO_PUT); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +- MPIDI_Datatype_check_size(origin_datatype, origin_count, origin_data_sz); +- MPIDI_Datatype_check_size(target_datatype, target_count, target_data_sz); ++ MPIDI_Datatype_check_origin_target_size(origin_datatype, target_datatype, ++ origin_count, target_count, ++ origin_data_sz, target_data_sz); + if (origin_data_sz == 0 || target_data_sz == 0) + goto fn_exit; + +@@ -125,7 +116,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_put(const void *origin_addr, + base = win->base; + disp_unit = win->disp_unit; + } else { +- MPIDI_CH4U_win_shared_info_t *shared_table = MPIDI_CH4U_WIN(win, shared_table); ++ MPIDIG_win_shared_info_t *shared_table = MPIDIG_WIN(win, shared_table); + int local_target_rank = win->comm_ptr->intranode_table[target_rank]; + disp_unit = shared_table[local_target_rank].disp_unit; + base = shared_table[local_target_rank].shm_base_addr; +@@ -142,10 +133,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_put(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_do_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_get(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -161,12 +148,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_get(void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_DO_GET); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_DO_GET); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +- MPIDI_Datatype_check_size(origin_datatype, origin_count, origin_data_sz); +- MPIDI_Datatype_check_size(target_datatype, target_count, target_data_sz); ++ MPIDI_Datatype_check_origin_target_size(origin_datatype, target_datatype, ++ origin_count, target_count, ++ origin_data_sz, target_data_sz); + if (origin_data_sz == 0 || target_data_sz == 0) + goto fn_exit; + +@@ -174,7 +162,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_get(void *origin_addr, + base = win->base; + disp_unit = win->disp_unit; + } else { +- MPIDI_CH4U_win_shared_info_t *shared_table = MPIDI_CH4U_WIN(win, shared_table); ++ MPIDIG_win_shared_info_t *shared_table = MPIDIG_WIN(win, shared_table); + int local_target_rank = win->comm_ptr->intranode_table[target_rank]; + disp_unit = shared_table[local_target_rank].disp_unit; + base = shared_table[local_target_rank].shm_base_addr; +@@ -190,10 +178,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_get(void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_do_get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_get_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -214,7 +198,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_get_accumulate(const void *origin_ad + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_DO_GET_ACCUMULATE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_DO_GET_ACCUMULATE); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -228,13 +212,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_get_accumulate(const void *origin_ad + base = win->base; + disp_unit = win->disp_unit; + } else { +- MPIDI_CH4U_win_shared_info_t *shared_table = MPIDI_CH4U_WIN(win, shared_table); ++ MPIDIG_win_shared_info_t *shared_table = MPIDIG_WIN(win, shared_table); + int local_target_rank = win->comm_ptr->intranode_table[target_rank]; + disp_unit = shared_table[local_target_rank].disp_unit; + base = shared_table[local_target_rank].shm_base_addr; + } + +- if (MPIDI_CH4U_WIN(win, shm_allocated)) { ++ if (MPIDIG_WIN(win, shm_allocated)) { + MPIDI_POSIX_RMA_MUTEX_LOCK(posix_win->shm_mutex_ptr); + shm_locked = 1; + } +@@ -263,10 +247,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_get_accumulate(const void *origin_ad + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_do_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -284,7 +264,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_accumulate(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_DO_ACCUMULATE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_DO_ACCUMULATE); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -297,19 +277,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_accumulate(const void *origin_addr, + base = win->base; + disp_unit = win->disp_unit; + } else { +- MPIDI_CH4U_win_shared_info_t *shared_table = MPIDI_CH4U_WIN(win, shared_table); ++ MPIDIG_win_shared_info_t *shared_table = MPIDIG_WIN(win, shared_table); + int local_target_rank = win->comm_ptr->intranode_table[target_rank]; + disp_unit = shared_table[local_target_rank].disp_unit; + base = shared_table[local_target_rank].shm_base_addr; + } + +- if (MPIDI_CH4U_WIN(win, shm_allocated)) ++ if (MPIDIG_WIN(win, shm_allocated)) + MPIDI_POSIX_RMA_MUTEX_LOCK(posix_win->shm_mutex_ptr); + + mpi_errno = MPIDI_POSIX_compute_accumulate((void *) origin_addr, origin_count, origin_datatype, + (char *) base + disp_unit * target_disp, + target_count, target_datatype, op); +- if (MPIDI_CH4U_WIN(win, shm_allocated)) ++ if (MPIDIG_WIN(win, shm_allocated)) + MPIDI_POSIX_RMA_MUTEX_UNLOCK(posix_win->shm_mutex_ptr); + + fn_exit: +@@ -319,10 +299,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_accumulate(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_put(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -337,27 +313,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_put(const void *origin_addr, + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, win); +- goto fn_exit; +- } +- +- mpi_errno = MPIDI_POSIX_do_put(origin_addr, origin_count, origin_datatype, ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_put(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win); ++ } else { ++ mpi_errno = MPIDI_POSIX_do_put(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win); ++ } + +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_PUT); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_get(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -372,27 +339,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_get(void *origin_addr, + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, win); +- goto fn_exit; +- } +- +- mpi_errno = MPIDI_POSIX_do_get(origin_addr, origin_count, origin_datatype, ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_get(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win); ++ } else { ++ mpi_errno = MPIDI_POSIX_do_get(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, win); ++ } + +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_GET); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_rput +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rput(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -409,10 +367,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rput(const void *origin_addr, + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_rput(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, win, request); ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_rput(origin_addr, origin_count, origin_datatype, ++ target_rank, target_disp, target_count, ++ target_datatype, win, request); + goto fn_exit; + } + +@@ -436,10 +394,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rput(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_compare_and_swap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, +@@ -458,13 +412,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_compare_and_swap(const void *origin + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, +- datatype, target_rank, target_disp, win); ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, ++ datatype, target_rank, target_disp, win); + goto fn_exit; + } + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -476,7 +430,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_compare_and_swap(const void *origin + base = win->base; + disp_unit = win->disp_unit; + } else { +- MPIDI_CH4U_win_shared_info_t *shared_table = MPIDI_CH4U_WIN(win, shared_table); ++ MPIDIG_win_shared_info_t *shared_table = MPIDIG_WIN(win, shared_table); + int local_target_rank = win->comm_ptr->intranode_table[target_rank]; + disp_unit = shared_table[local_target_rank].disp_unit; + base = shared_table[local_target_rank].shm_base_addr; +@@ -485,7 +439,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_compare_and_swap(const void *origin + target_addr = (char *) base + disp_unit * target_disp; + MPIR_Datatype_get_size_macro(datatype, dtype_sz); + +- if (MPIDI_CH4U_WIN(win, shm_allocated)) ++ if (MPIDIG_WIN(win, shm_allocated)) + MPIDI_POSIX_RMA_MUTEX_LOCK(posix_win->shm_mutex_ptr); + + MPIR_Memcpy(result_addr, target_addr, dtype_sz); +@@ -493,7 +447,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_compare_and_swap(const void *origin + MPIR_Memcpy(target_addr, origin_addr, dtype_sz); + } + +- if (MPIDI_CH4U_WIN(win, shm_allocated)) ++ if (MPIDIG_WIN(win, shm_allocated)) + MPIDI_POSIX_RMA_MUTEX_UNLOCK(posix_win->shm_mutex_ptr); + + fn_exit: +@@ -503,10 +457,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_compare_and_swap(const void *origin + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_raccumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_raccumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -524,10 +474,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_raccumulate(const void *origin_addr + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_raccumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_raccumulate(origin_addr, origin_count, origin_datatype, ++ target_rank, target_disp, target_count, ++ target_datatype, op, win, request); + goto fn_exit; + } + +@@ -552,10 +502,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_raccumulate(const void *origin_addr + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_rget_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rget_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -576,11 +522,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rget_accumulate(const void *origin_ + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win, request); ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, ++ result_addr, result_count, result_datatype, ++ target_rank, target_disp, target_count, ++ target_datatype, op, win, request); + goto fn_exit; + } + +@@ -606,10 +552,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rget_accumulate(const void *origin_ + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_fetch_and_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_fetch_and_op(const void *origin_addr, + void *result_addr, + MPI_Datatype datatype, +@@ -628,13 +570,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_fetch_and_op(const void *origin_add + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_fetch_and_op(origin_addr, result_addr, datatype, +- target_rank, target_disp, op, win); ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_fetch_and_op(origin_addr, result_addr, datatype, ++ target_rank, target_disp, op, win); + goto fn_exit; + } + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -646,7 +588,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_fetch_and_op(const void *origin_add + base = win->base; + disp_unit = win->disp_unit; + } else { +- MPIDI_CH4U_win_shared_info_t *shared_table = MPIDI_CH4U_WIN(win, shared_table); ++ MPIDIG_win_shared_info_t *shared_table = MPIDIG_WIN(win, shared_table); + int local_target_rank = win->comm_ptr->intranode_table[target_rank]; + disp_unit = shared_table[local_target_rank].disp_unit; + base = shared_table[local_target_rank].shm_base_addr; +@@ -655,7 +597,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_fetch_and_op(const void *origin_add + target_addr = (char *) base + disp_unit * target_disp; + MPIR_Datatype_get_size_macro(datatype, dtype_sz); + +- if (MPIDI_CH4U_WIN(win, shm_allocated)) ++ if (MPIDIG_WIN(win, shm_allocated)) + MPIDI_POSIX_RMA_MUTEX_LOCK(posix_win->shm_mutex_ptr); + + MPIR_Memcpy(result_addr, target_addr, dtype_sz); +@@ -671,7 +613,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_fetch_and_op(const void *origin_add + (*uop) ((void *) origin_addr, target_addr, &one, &datatype); + } + +- if (MPIDI_CH4U_WIN(win, shm_allocated)) ++ if (MPIDIG_WIN(win, shm_allocated)) + MPIDI_POSIX_RMA_MUTEX_UNLOCK(posix_win->shm_mutex_ptr); + + fn_exit: +@@ -681,10 +623,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_fetch_and_op(const void *origin_add + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_rget +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rget(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -701,10 +639,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rget(void *origin_addr, + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_rget(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, win, request); ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_rget(origin_addr, origin_count, origin_datatype, ++ target_rank, target_disp, target_count, ++ target_datatype, win, request); + goto fn_exit; + } + +@@ -728,10 +666,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rget(void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_get_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -750,30 +684,22 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_get_accumulate(const void *origin_a + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, ++ result_addr, result_count, result_datatype, ++ target_rank, target_disp, target_count, ++ target_datatype, op, win); ++ } else { ++ mpi_errno = MPIDI_POSIX_do_get_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, + target_datatype, op, win); +- goto fn_exit; + } + +- mpi_errno = MPIDI_POSIX_do_get_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_GET_ACCUMULATE); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -789,22 +715,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_accumulate(const void *origin_addr, + + /* CH4 schedules operation only based on process locality. + * Thus the target might not be in shared memory of the window.*/ +- if (!MPIDI_CH4U_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { +- mpi_errno = MPIDI_CH4U_mpi_accumulate(origin_addr, origin_count, origin_datatype, ++ if (!MPIDIG_WIN(win, shm_allocated) && target_rank != win->comm_ptr->rank) { ++ mpi_errno = MPIDIG_mpi_accumulate(origin_addr, origin_count, origin_datatype, ++ target_rank, target_disp, target_count, ++ target_datatype, op, win); ++ } else { ++ mpi_errno = MPIDI_POSIX_do_accumulate(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, op, win); +- goto fn_exit; + } + +- mpi_errno = MPIDI_POSIX_do_accumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, +- target_datatype, op, win); +- +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_ACCUMULATE); + return mpi_errno; +- fn_fail: +- goto fn_exit; + } + + #endif /* POSIX_RMA_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_send.h ++++ b/src/mpid/ch4/shm/posix/posix_send.h +@@ -4,251 +4,62 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ ++ ++/* ++ * The POSIX shared memory module uses the CH4-fallback active message implementation for tracking ++ * requests and performing message matching. This is because these functions are always implemented ++ * in software, therefore duplicating the code to perform the matching is a bad idea. In all of ++ * these functions, we call back up to the fallback code to start the process of sending the ++ * message. ++ */ ++ + #ifndef POSIX_SEND_H_INCLUDED + #define POSIX_SEND_H_INCLUDED + + #include "posix_impl.h" +-#include "ch4_impl.h" +-#include <../mpi/pt2pt/bsendutil.h> +-/* ---------------------------------------------------- */ +-/* from mpid/ch3/channels/nemesis/include/mpid_nem_impl.h */ +-/* ---------------------------------------------------- */ +-/* assumes value!=0 means the fbox is full. Contains acquire barrier to +- * ensure that later operations that are dependent on this check don't +- * escape earlier than this check. */ +-#define MPIDI_POSIX_fbox_is_full(pbox_) (OPA_load_acquire_int(&(pbox_)->flag.value)) +- +-/* ---------------------------------------------------- */ +-/* MPIDI_POSIX_do_isend */ +-/* ---------------------------------------------------- */ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_do_isend) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_do_isend(const void *buf, +- MPI_Aint count, +- MPI_Datatype datatype, +- int rank, +- int tag, +- MPIR_Comm * comm, int context_offset, +- MPIR_Request ** request, int type) +-{ +- int dt_contig, mpi_errno = MPI_SUCCESS; +- MPI_Aint dt_true_lb; +- MPIR_Request *sreq = NULL; +- size_t data_sz; +- MPIR_Datatype *dt_ptr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_DO_ISEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_DO_ISEND); +- +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- MPIDI_POSIX_REQUEST_CREATE_COND_SREQ(*request); +- sreq = *request; +- sreq->comm = comm; +- MPIR_Comm_add_ref(comm); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(sreq), comm->rank, tag, +- comm->context_id + context_offset); +- MPIDI_POSIX_REQUEST(sreq)->user_buf = (char *) buf + dt_true_lb; +- MPIDI_POSIX_REQUEST(sreq)->user_count = count; +- MPIDI_POSIX_REQUEST(sreq)->datatype = datatype; +- MPIDI_POSIX_REQUEST(sreq)->data_sz = data_sz; +- MPIDI_POSIX_REQUEST(sreq)->type = type; +- MPIDI_POSIX_REQUEST(sreq)->dest = rank; +- MPIDI_POSIX_REQUEST(sreq)->next = NULL; +- MPIDI_POSIX_REQUEST(sreq)->pending = NULL; +- MPIDI_POSIX_REQUEST(sreq)->segment_ptr = NULL; +- +- if (!dt_contig) { +- MPIDI_POSIX_REQUEST(sreq)->segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1((MPIDI_POSIX_REQUEST(sreq)->segment_ptr == NULL), mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Segment_alloc"); +- MPIR_Segment_init((char *) buf, MPIDI_POSIX_REQUEST(sreq)->user_count, +- MPIDI_POSIX_REQUEST(sreq)->datatype, +- MPIDI_POSIX_REQUEST(sreq)->segment_ptr); +- MPIDI_POSIX_REQUEST(sreq)->segment_first = 0; +- MPIDI_POSIX_REQUEST(sreq)->segment_size = data_sz; +- } +- +- MPIR_Datatype_add_ref_if_not_builtin(datatype); +- /* enqueue sreq */ +- MPIDI_POSIX_REQUEST_ENQUEUE(sreq, MPIDI_POSIX_sendq); +- MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, +- (MPL_DBG_FDEST, +- "Enqueued to grank %d from %d (comm_kind %d) in recv %d,%d,%d\n", +- MPIDI_CH4U_rank_to_lpid(rank, comm), MPIDI_POSIX_mem_region.rank, +- (int) comm->comm_kind, comm->rank, tag, comm->context_id + context_offset)); + +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_DO_ISEND); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_SEND) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_send(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- int dt_contig __attribute__ ((__unused__)), mpi_errno = MPI_SUCCESS; +- MPI_Aint dt_true_lb; +- size_t data_sz; +- MPIR_Datatype *dt_ptr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_SEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_SEND); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- /* try to send immediately, contig, short message */ +- if (dt_contig && data_sz <= MPIDI_POSIX_EAGER_THRESHOLD) { +- /* eager message */ +- int grank = MPIDI_CH4U_rank_to_lpid(rank, comm); +- +- /* Try freeQ */ +- if (!MPIDI_POSIX_queue_empty(MPIDI_POSIX_mem_region.my_freeQ)) { +- MPIDI_POSIX_cell_ptr_t cell; +- MPIDI_POSIX_queue_dequeue(MPIDI_POSIX_mem_region.my_freeQ, &cell); +- MPIDI_POSIX_ENVELOPE_SET(cell, comm->rank, tag, comm->context_id + context_offset); +- cell->pkt.mpich.datalen = data_sz; +- cell->pkt.mpich.type = MPIDI_POSIX_TYPEEAGER; +- MPIR_Memcpy((void *) cell->pkt.mpich.p.payload, (char *) buf + dt_true_lb, data_sz); +- cell->pending = NULL; +- MPIDI_POSIX_queue_enqueue(MPIDI_POSIX_mem_region.RecvQ[grank], cell); +- MPIDI_POSIX_REQUEST_COMPLETE_COND_SREQ(*request); +- MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, +- (MPL_DBG_FDEST, "Sent to grank %d from %d in send %d,%d,%d\n", grank, +- cell->my_rank, cell->rank, cell->tag, cell->context_id)); +- goto fn_exit; +- } +- } +- +- /* Long message or */ +- /* Failed to send immediately - create and return request */ +- mpi_errno = +- MPIDI_POSIX_do_isend(buf, count, datatype, rank, tag, comm, context_offset, request, +- MPIDI_POSIX_TYPESTANDARD); +- +- fn_exit: +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_SEND); +- return mpi_errno; ++ return MPIDIG_mpi_send(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_irsend(const void *buf, MPI_Aint count, +- MPI_Datatype datatype, int rank, int tag, +- MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * addr, MPIR_Request ** request) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_IRSEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_IRSEND); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- mpi_errno = +- MPIDI_POSIX_do_isend(buf, count, datatype, rank, tag, comm, context_offset, request, +- MPIDI_POSIX_TYPEREADY); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_IRSEND); +- return mpi_errno; +-} +- +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_SSEND) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ssend(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_SSEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_SSEND); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- mpi_errno = +- MPIDI_POSIX_do_isend(buf, count, datatype, rank, tag, comm, context_offset, request, +- MPIDI_POSIX_TYPESYNC); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_SSEND); +- return mpi_errno; ++ return MPIDIG_mpi_ssend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_SEND_INIT) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_send_init(const void *buf, +- int count, +- MPI_Datatype datatype, +- int rank, +- int tag, ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_send_init(const void *buf, MPI_Aint count, ++ MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_SEND_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_SEND_INIT); +- MPIDI_POSIX_REQUEST_CREATE_SREQ(sreq); +- MPIR_Object_set_ref(sreq, 1); +- MPIR_cc_set(&(sreq)->cc, 0); +- sreq->kind = MPIR_REQUEST_KIND__PREQUEST_SEND; +- sreq->comm = comm; +- MPIR_Comm_add_ref(comm); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(sreq), comm->rank, tag, +- comm->context_id + context_offset); +- MPIDI_POSIX_REQUEST(sreq)->user_buf = (char *) buf; +- MPIDI_POSIX_REQUEST(sreq)->user_count = count; +- MPIDI_POSIX_REQUEST(sreq)->dest = rank; +- MPIDI_POSIX_REQUEST(sreq)->datatype = datatype; +- MPIDI_POSIX_REQUEST(sreq)->type = MPIDI_POSIX_TYPESTANDARD; +- *request = sreq; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_SEND_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ return MPIDIG_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_SSEND_INIT) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ssend_init(const void *buf, + int count, + MPI_Datatype datatype, + int rank, + int tag, + MPIR_Comm * comm, +- int context_offset, MPIR_Request ** request) ++ int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_SSEND_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_SSEND_INIT); +- MPIDI_POSIX_REQUEST_CREATE_SREQ(sreq); +- MPIR_Object_set_ref(sreq, 1); +- sreq->kind = MPIR_REQUEST_KIND__PREQUEST_SEND; +- sreq->comm = comm; +- MPIR_Comm_add_ref(comm); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(sreq), comm->rank, tag, +- comm->context_id + context_offset); +- MPIDI_POSIX_REQUEST(sreq)->user_buf = (char *) buf; +- MPIDI_POSIX_REQUEST(sreq)->user_count = count; +- MPIDI_POSIX_REQUEST(sreq)->dest = rank; +- MPIDI_POSIX_REQUEST(sreq)->datatype = datatype; +- MPIDI_POSIX_REQUEST(sreq)->type = MPIDI_POSIX_TYPESYNC; +- *request = sreq; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_SSEND_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ return MPIDIG_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_bsend_init(const void *buf, +@@ -257,32 +68,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_bsend_init(const void *buf, + int rank, + int tag, + MPIR_Comm * comm, +- int context_offset, MPIR_Request ** request) ++ int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_BSEND_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_BSEND_INIT); +- MPIDI_POSIX_REQUEST_CREATE_SREQ(sreq); +- MPIR_Object_set_ref(sreq, 1); +- sreq->kind = MPIR_REQUEST_KIND__PREQUEST_SEND; +- sreq->comm = comm; +- MPIR_Comm_add_ref(comm); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(sreq), comm->rank, tag, +- comm->context_id + context_offset); +- MPIDI_POSIX_REQUEST(sreq)->user_buf = (char *) buf; +- MPIDI_POSIX_REQUEST(sreq)->user_count = count; +- MPIDI_POSIX_REQUEST(sreq)->dest = rank; +- MPIDI_POSIX_REQUEST(sreq)->datatype = datatype; +- MPIDI_POSIX_REQUEST(sreq)->type = MPIDI_POSIX_TYPEBUFFERED; +- *request = sreq; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_BSEND_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ return MPIDIG_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rsend_init(const void *buf, +@@ -291,104 +82,34 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_rsend_init(const void *buf, + int rank, + int tag, + MPIR_Comm * comm, +- int context_offset, MPIR_Request ** request) ++ int context_offset, ++ MPIDI_av_entry_t * addr, ++ MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_RSEND_INIT); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_RSEND_INIT); +- MPIDI_POSIX_REQUEST_CREATE_SREQ(sreq); +- MPIR_Object_set_ref(sreq, 1); +- MPIR_cc_set(&(sreq)->cc, 0); +- sreq->kind = MPIR_REQUEST_KIND__PREQUEST_SEND; +- sreq->comm = comm; +- MPIR_Comm_add_ref(comm); +- MPIDI_POSIX_ENVELOPE_SET(MPIDI_POSIX_REQUEST(sreq), comm->rank, tag, +- comm->context_id + context_offset); +- MPIDI_POSIX_REQUEST(sreq)->user_buf = (char *) buf; +- MPIDI_POSIX_REQUEST(sreq)->user_count = count; +- MPIDI_POSIX_REQUEST(sreq)->dest = rank; +- MPIDI_POSIX_REQUEST(sreq)->datatype = datatype; +- MPIDI_POSIX_REQUEST(sreq)->type = MPIDI_POSIX_TYPEREADY; +- *request = sreq; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_RSEND_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ return MPIDIG_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_POSIX_mpi_isend) + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_isend(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +- MPIDI_av_entry_t * av, MPIR_Request ** request) ++ MPIDI_av_entry_t * addr, MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_ISEND); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_ISEND); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- mpi_errno = +- MPIDI_POSIX_do_isend(buf, count, datatype, rank, tag, comm, context_offset, request, +- MPIDI_POSIX_TYPESTANDARD); +- +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_ISEND); +- return mpi_errno; ++ return MPIDIG_mpi_isend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_issend(const void *buf, MPI_Aint count, +- MPI_Datatype datatype, int rank, +- int tag, MPIR_Comm * comm, +- int context_offset, MPIDI_av_entry_t * av, ++ MPI_Datatype datatype, int rank, int tag, ++ MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_ISSEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_ISSEND); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- +- mpi_errno = +- MPIDI_POSIX_do_isend(buf, count, datatype, rank, tag, comm, context_offset, request, +- MPIDI_POSIX_TYPESYNC); +- +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_ISSEND); +- return mpi_errno; ++ return MPIDIG_mpi_issend(buf, count, datatype, rank, tag, comm, context_offset, addr, request); + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_cancel_send(MPIR_Request * sreq) + { +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_Request *req = MPIDI_POSIX_sendq.head; +- MPIR_Request *prev_req = NULL; +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_CANCEL_SEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_CANCEL_SEND); +- +- while (req) { +- if (req == sreq) { +- MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE); +- MPIR_STATUS_SET_COUNT(sreq->status, 0); +- MPIDI_POSIX_REQUEST_COMPLETE(sreq); +- MPIDI_POSIX_REQUEST_DEQUEUE_AND_SET_ERROR(&sreq, prev_req, MPIDI_POSIX_sendq, +- mpi_errno); +- break; +- } +- +- prev_req = req; +- req = MPIDI_POSIX_REQUEST(req)->next; +- } +- +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_CANCEL_SEND); +- return mpi_errno; ++ return MPIDIG_mpi_cancel_send(sreq); + } + + #endif /* POSIX_SEND_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_spawn.c +@@ -0,0 +1,70 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "posix_noinline.h" ++ ++int MPIDI_POSIX_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_CONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_CONNECT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_CONNECT); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_mpi_comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_DISCONNECT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_DISCONNECT); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_mpi_open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_OPEN_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_OPEN_PORT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_OPEN_PORT); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_mpi_close_port(const char *port_name) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_CLOSE_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_CLOSE_PORT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_CLOSE_PORT); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_ACCEPT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_ACCEPT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_ACCEPT); ++ return MPI_SUCCESS; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/posix/posix_spawn.h ++++ /dev/null +@@ -1,76 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef POSIX_SPAWN_H_INCLUDED +-#define POSIX_SPAWN_H_INCLUDED +- +-#include "posix_impl.h" +- +-static inline int MPIDI_POSIX_mpi_comm_connect(const char *port_name, +- MPIR_Info * info, +- int root, int timeout, +- MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_CONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_CONNECT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_CONNECT); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_POSIX_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_DISCONNECT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_DISCONNECT); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_POSIX_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_OPEN_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_OPEN_PORT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_OPEN_PORT); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_POSIX_mpi_close_port(const char *port_name) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_CLOSE_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_CLOSE_PORT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_CLOSE_PORT); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_POSIX_mpi_comm_accept(const char *port_name, +- MPIR_Info * info, +- int root, MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_COMM_ACCEPT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_COMM_ACCEPT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_COMM_ACCEPT); +- return MPI_SUCCESS; +-} +- +-#endif /* POSIX_SPAWN_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/posix_startall.h ++++ b/src/mpid/ch4/shm/posix/posix_startall.h +@@ -14,82 +14,14 @@ + #include "posix_impl.h" + #include "ch4_impl.h" + +-#undef FCNAME +-#define FCNAME DECL_FUNC(MPIDI_POSIX_STARTALL) + static inline int MPIDI_POSIX_mpi_startall(int count, MPIR_Request * requests[]) + { +- int i, mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_STARTALL); +- +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_STARTALL); +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_POSIX_SHM_MUTEX); +- +- for (i = 0; i < count; i++) { +- MPIR_Request *preq = requests[i]; +- +- switch (preq->kind) { +- case MPIR_REQUEST_KIND__PREQUEST_SEND: +- if (MPIDI_POSIX_REQUEST(preq)->type != MPIDI_POSIX_TYPEBUFFERED) { +- mpi_errno = +- MPIDI_POSIX_do_isend(MPIDI_POSIX_REQUEST(preq)->user_buf, +- MPIDI_POSIX_REQUEST(preq)->user_count, +- MPIDI_POSIX_REQUEST(preq)->datatype, +- MPIDI_POSIX_REQUEST(preq)->dest, +- MPIDI_POSIX_REQUEST(preq)->tag, preq->comm, +- MPIDI_POSIX_REQUEST(preq)->context_id - +- preq->comm->context_id, &preq->u.persist.real_request, +- MPIDI_POSIX_REQUEST(preq)->type); +- } else { +- MPI_Request sreq_handle; +- mpi_errno = +- MPIR_Ibsend_impl(MPIDI_POSIX_REQUEST(preq)->user_buf, +- MPIDI_POSIX_REQUEST(preq)->user_count, +- MPIDI_POSIX_REQUEST(preq)->datatype, +- MPIDI_POSIX_REQUEST(preq)->dest, +- MPIDI_POSIX_REQUEST(preq)->tag, preq->comm, &sreq_handle); +- +- if (mpi_errno == MPI_SUCCESS) +- MPIR_Request_get_ptr(sreq_handle, preq->u.persist.real_request); +- } +- +- break; +- +- case MPIR_REQUEST_KIND__PREQUEST_RECV: +- mpi_errno = +- MPIDI_POSIX_do_irecv(MPIDI_POSIX_REQUEST(preq)->user_buf, +- MPIDI_POSIX_REQUEST(preq)->user_count, +- MPIDI_POSIX_REQUEST(preq)->datatype, +- MPIDI_POSIX_REQUEST(preq)->rank, +- MPIDI_POSIX_REQUEST(preq)->tag, preq->comm, +- MPIDI_POSIX_REQUEST(preq)->context_id - +- preq->comm->context_id, &preq->u.persist.real_request); +- +- break; +- +- default: +- MPIR_Assert(0); +- break; +- } +- +- if (mpi_errno == MPI_SUCCESS) { +- preq->status.MPI_ERROR = MPI_SUCCESS; +- +- if (MPIDI_POSIX_REQUEST(preq)->type == MPIDI_POSIX_TYPEBUFFERED) { +- preq->cc_ptr = &preq->cc; +- MPIR_cc_set(&preq->cc, 0); +- } else +- preq->cc_ptr = &preq->u.persist.real_request->cc; +- } else { +- preq->u.persist.real_request = NULL; +- preq->status.MPI_ERROR = mpi_errno; +- preq->cc_ptr = &preq->cc; +- MPIR_cc_set(&preq->cc, 0); +- } +- } ++ return MPIDIG_mpi_startall(count, requests); ++} + +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_POSIX_SHM_MUTEX); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_STARTALL); +- return mpi_errno; ++MPL_STATIC_INLINE_PREFIX void MPIDI_POSIX_prequest_free_hook(MPIR_Request * req) ++{ ++ MPIDIG_prequest_free_hook(req); + } + + #endif /* POSIX_STARTALL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_types.h +@@ -0,0 +1,60 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef POSIX_TYPES_H_INCLUDED ++#define POSIX_TYPES_H_INCLUDED ++ ++#include "mpidu_shm.h" ++ ++enum { ++ MPIDI_POSIX_OK, ++ MPIDI_POSIX_NOK ++}; ++ ++#define MPIDI_POSIX_DEFAULT_SHORT_SEND_SIZE (64 * 1024) ++#define MPIDI_POSIX_AM_BUFF_SZ (1 * 1024 * 1024) ++#define MPIDI_POSIX_BUF_POOL_SIZE (1024) ++#define MPIDI_POSIX_BUF_POOL_NUM (1024) ++ ++#define MPIDI_POSIX_AMREQUEST(req,field) ((req)->dev.ch4.am.shm_am.posix.field) ++#define MPIDI_POSIX_AMREQUEST_HDR(req, field) ((req)->dev.ch4.am.shm_am.posix.req_hdr->field) ++#define MPIDI_POSIX_AMREQUEST_HDR_PTR(req) ((req)->dev.ch4.am.shm_am.posix.req_hdr) ++#define MPIDI_POSIX_REQUEST(req, field) ((req)->dev.ch4.shm.posix.field) ++#define MPIDI_POSIX_COMM(comm) (&(comm)->dev.ch4.shm.posix) ++ ++typedef struct { ++ MPIDIU_buf_pool_t *am_buf_pool; ++ ++ /* Postponed queue */ ++ MPIDI_POSIX_am_request_header_t *postponed_queue; ++ ++ /* Active recv requests array */ ++ MPIR_Request **active_rreq; ++ ++ MPIDU_shm_seg_t memory; ++ MPIDU_shm_barrier_t *barrier; ++ ++ /* Keep track of all of the local processes in MPI_COMM_WORLD and what their original rank was ++ * in that communicator. */ ++ int num_local; ++ int my_local_rank; ++ int *local_ranks; ++ int *local_procs; ++ int local_rank_0; ++} MPIDI_POSIX_global_t; ++ ++extern MPIDI_POSIX_global_t MPIDI_POSIX_global; ++extern MPL_dbg_class MPIDI_CH4_SHM_POSIX_GENERAL; ++ ++#define POSIX_TRACE(...) \ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_SHM_POSIX_GENERAL,VERBOSE,(MPL_DBG_FDEST, __VA_ARGS__)) ++ ++#endif /* POSIX_TYPES_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/posix_win.c +@@ -0,0 +1,295 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "posix_noinline.h" ++ ++int MPIDI_POSIX_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_SET_INFO); ++ ++ mpi_errno = MPIDIG_mpi_win_set_info(win, info); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_SET_INFO); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_GET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_GET_INFO); ++ ++ mpi_errno = MPIDIG_mpi_win_get_info(win, info_p_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_GET_INFO); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE); ++ ++ mpi_errno = MPIDIG_mpi_win_free(win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE); ++ ++ mpi_errno = MPIDIG_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ATTACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ATTACH); ++ ++ mpi_errno = MPIDIG_mpi_win_attach(win, base, size); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ATTACH); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED); ++ ++ mpi_errno = MPIDIG_mpi_win_allocate_shared(size, disp_unit, info_ptr, ++ comm_ptr, base_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_DETACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_DETACH); ++ ++ mpi_errno = MPIDIG_mpi_win_detach(win, base); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_DETACH); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE); ++ ++ mpi_errno = MPIDIG_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC); ++ ++ mpi_errno = MPIDIG_mpi_win_create_dynamic(info, comm, win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC); ++ ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_create_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_POSIX_win_t *posix_win ATTRIBUTE((unused)) = NULL; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_HOOK); ++ ++ posix_win = &win->dev.shm.posix; ++ posix_win->shm_mutex_ptr = NULL; ++ ++ /* No optimization */ ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_allocate_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_POSIX_win_t *posix_win ATTRIBUTE((unused)) = NULL; ++ MPIR_Comm *shm_comm_ptr = win->comm_ptr->node_comm; ++ bool mapfail_flag = false; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_HOOK); ++ ++ posix_win = &win->dev.shm.posix; ++ posix_win->shm_mutex_ptr = NULL; ++ ++ /* Enable shm RMA only when interprocess mutex is supported, ++ * more than 1 processes exist on the node, and shm buffer has been successfully allocated. */ ++ if (shm_comm_ptr == NULL || !MPL_proc_mutex_enabled() || !MPIDIG_WIN(win, mmap_addr)) ++ goto fn_exit; ++ ++ posix_win = &win->dev.shm.posix; ++ ++ /* allocate interprocess mutex for RMA atomics over shared memory */ ++ mpi_errno = MPIDIU_allocate_shm_segment(shm_comm_ptr, sizeof(MPL_proc_mutex_t), ++ &posix_win->shm_mutex_segment_handle, ++ (void **) &posix_win->shm_mutex_ptr, &mapfail_flag); ++ ++ /* disable shm_allocated optimization if mutex allocation fails */ ++ if (!mapfail_flag) { ++ if (shm_comm_ptr->rank == 0) ++ MPIDI_POSIX_RMA_MUTEX_INIT(posix_win->shm_mutex_ptr); ++ MPIDIG_WIN(win, shm_allocated) = 1; ++ } ++ ++ /* No barrier is needed here, because the CH4 generic routine does it */ ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_POSIX_mpi_win_allocate_shared_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_POSIX_win_t *posix_win = NULL; ++ MPIR_Comm *shm_comm_ptr = win->comm_ptr->node_comm; ++ bool mapfail_flag = false; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ ++ /* Enable shm RMA only when interprocess mutex is supported and ++ * more than 1 processes exist on the node. */ ++ if (!shm_comm_ptr || !MPL_proc_mutex_enabled()) ++ goto fn_exit; ++ ++ posix_win = &win->dev.shm.posix; ++ ++ /* allocate interprocess mutex for RMA atomics over shared memory */ ++ mpi_errno = MPIDIU_allocate_shm_segment(win->comm_ptr, sizeof(MPL_proc_mutex_t), ++ &posix_win->shm_mutex_segment_handle, ++ (void **) &posix_win->shm_mutex_ptr, &mapfail_flag); ++ ++ /* disable shm_allocated optimization if mutex allocation fails */ ++ if (!mapfail_flag) { ++ if (win->comm_ptr->rank == 0) ++ MPIDI_POSIX_RMA_MUTEX_INIT(posix_win->shm_mutex_ptr); ++ MPIDIG_WIN(win, shm_allocated) = 1; ++ } ++ ++ /* No barrier is needed here, because the CH4 generic routine does it */ ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDI_POSIX_mpi_win_create_dynamic_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_POSIX_win_t *posix_win ATTRIBUTE((unused)) = NULL; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ ++ posix_win = &win->dev.shm.posix; ++ posix_win->shm_mutex_ptr = NULL; ++ ++ /* No optimization */ ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_POSIX_mpi_win_attach_hook(MPIR_Win * win ATTRIBUTE((unused)), ++ void *base ATTRIBUTE((unused)), ++ MPI_Aint size ATTRIBUTE((unused))) ++{ ++ /* No optimization */ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_mpi_win_detach_hook(MPIR_Win * win ATTRIBUTE((unused)), ++ const void *base ATTRIBUTE((unused))) ++{ ++ /* No optimization */ ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_POSIX_mpi_win_free_hook(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE_HOOK); ++ ++ if (MPIDIG_WIN(win, shm_allocated)) { ++ MPIDI_POSIX_win_t *posix_win = &win->dev.shm.posix; ++ MPIR_Assert(posix_win->shm_mutex_ptr != NULL); ++ ++ /* destroy and detach shared mutex */ ++ if (win->comm_ptr->rank == 0) ++ MPIDI_POSIX_RMA_MUTEX_DESTROY(posix_win->shm_mutex_ptr); ++ ++ mpi_errno = MPIDIU_destroy_shm_segment(sizeof(MPL_proc_mutex_t), ++ &posix_win->shm_mutex_segment_handle, ++ (void **) &posix_win->shm_mutex_ptr); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpid/ch4/shm/posix/posix_win.h ++++ b/src/mpid/ch4/shm/posix/posix_win.h +@@ -13,21 +13,6 @@ + + #include "posix_impl.h" + +-static inline int MPIDI_POSIX_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_SET_INFO); +- +- mpi_errno = MPIDI_CH4R_mpi_win_set_info(win, info); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_SET_INFO); +- +- return mpi_errno; +-} +- +- + static inline int MPIDI_POSIX_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) + { + int mpi_errno; +@@ -35,14 +20,13 @@ static inline int MPIDI_POSIX_mpi_win_start(MPIR_Group * group, int assert, MPIR + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_START); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_START); + +- mpi_errno = MPIDI_CH4R_mpi_win_start(group, assert, win); ++ mpi_errno = MPIDIG_mpi_win_start(group, assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_START); + + return mpi_errno; + } + +- + static inline int MPIDI_POSIX_mpi_win_complete(MPIR_Win * win) + { + int mpi_errno; +@@ -50,7 +34,7 @@ static inline int MPIDI_POSIX_mpi_win_complete(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_COMPLETE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_COMPLETE); + +- mpi_errno = MPIDI_CH4R_mpi_win_complete(win); ++ mpi_errno = MPIDIG_mpi_win_complete(win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_COMPLETE); + +@@ -64,14 +48,13 @@ static inline int MPIDI_POSIX_mpi_win_post(MPIR_Group * group, int assert, MPIR_ + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_POST); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_POST); + +- mpi_errno = MPIDI_CH4R_mpi_win_post(group, assert, win); ++ mpi_errno = MPIDIG_mpi_win_post(group, assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_POST); + + return mpi_errno; + } + +- + static inline int MPIDI_POSIX_mpi_win_wait(MPIR_Win * win) + { + int mpi_errno; +@@ -79,14 +62,13 @@ static inline int MPIDI_POSIX_mpi_win_wait(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_WAIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_WAIT); + +- mpi_errno = MPIDI_CH4R_mpi_win_wait(win); ++ mpi_errno = MPIDIG_mpi_win_wait(win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_WAIT); + + return mpi_errno; + } + +- + static inline int MPIDI_POSIX_mpi_win_test(MPIR_Win * win, int *flag) + { + int mpi_errno; +@@ -94,7 +76,7 @@ static inline int MPIDI_POSIX_mpi_win_test(MPIR_Win * win, int *flag) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_TEST); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_TEST); + +- mpi_errno = MPIDI_CH4R_mpi_win_test(win, flag); ++ mpi_errno = MPIDIG_mpi_win_test(win, flag); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_TEST); + +@@ -108,14 +90,13 @@ static inline int MPIDI_POSIX_mpi_win_lock(int lock_type, int rank, int assert, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_LOCK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_LOCK); + +- mpi_errno = MPIDI_CH4R_mpi_win_lock(lock_type, rank, assert, win); ++ mpi_errno = MPIDIG_mpi_win_lock(lock_type, rank, assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_LOCK); + + return mpi_errno; + } + +- + static inline int MPIDI_POSIX_mpi_win_unlock(int rank, MPIR_Win * win) + { + int mpi_errno; +@@ -123,42 +104,13 @@ static inline int MPIDI_POSIX_mpi_win_unlock(int rank, MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_UNLOCK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_UNLOCK); + +- mpi_errno = MPIDI_CH4R_mpi_win_unlock(rank, win); ++ mpi_errno = MPIDIG_mpi_win_unlock(rank, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_UNLOCK); + + return mpi_errno; + } + +-static inline int MPIDI_POSIX_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_GET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_GET_INFO); +- +- mpi_errno = MPIDI_CH4R_mpi_win_get_info(win, info_p_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_GET_INFO); +- +- return mpi_errno; +-} +- +- +-static inline int MPIDI_POSIX_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE); +- +- mpi_errno = MPIDI_CH4R_mpi_win_free(win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE); +- +- return mpi_errno; +-} +- + static inline int MPIDI_POSIX_mpi_win_fence(int assert, MPIR_Win * win) + { + int mpi_errno; +@@ -166,78 +118,13 @@ static inline int MPIDI_POSIX_mpi_win_fence(int assert, MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FENCE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FENCE); + +- mpi_errno = MPIDI_CH4R_mpi_win_fence(assert, win); ++ mpi_errno = MPIDIG_mpi_win_fence(assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FENCE); + + return mpi_errno; + } + +-static inline int MPIDI_POSIX_mpi_win_create(void *base, +- MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE); +- +- mpi_errno = MPIDI_CH4R_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE); +- +- return mpi_errno; +-} +- +-static inline int MPIDI_POSIX_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ATTACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ATTACH); +- +- mpi_errno = MPIDI_CH4R_mpi_win_attach(win, base, size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ATTACH); +- +- return mpi_errno; +-} +- +-static inline int MPIDI_POSIX_mpi_win_allocate_shared(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED); +- +- mpi_errno = MPIDI_CH4R_mpi_win_allocate_shared(size, disp_unit, info_ptr, +- comm_ptr, base_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED); +- +- return mpi_errno; +-} +- +-static inline int MPIDI_POSIX_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_DETACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_DETACH); +- +- mpi_errno = MPIDI_CH4R_mpi_win_detach(win, base); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_DETACH); +- +- return mpi_errno; +-} +- + static inline int MPIDI_POSIX_mpi_win_shared_query(MPIR_Win * win, + int rank, + MPI_Aint * size, int *disp_unit, void *baseptr) +@@ -247,30 +134,13 @@ static inline int MPIDI_POSIX_mpi_win_shared_query(MPIR_Win * win, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_SHARED_QUERY); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_SHARED_QUERY); + +- mpi_errno = MPIDI_CH4R_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); ++ mpi_errno = MPIDIG_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_SHARED_QUERY); + + return mpi_errno; + } + +-static inline int MPIDI_POSIX_mpi_win_allocate(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info, +- MPIR_Comm * comm, void *baseptr, MPIR_Win ** win) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE); +- +- mpi_errno = MPIDI_CH4R_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE); +- +- return mpi_errno; +-} +- + static inline int MPIDI_POSIX_mpi_win_flush(int rank, MPIR_Win * win) + { + int mpi_errno; +@@ -278,7 +148,7 @@ static inline int MPIDI_POSIX_mpi_win_flush(int rank, MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH); + +- mpi_errno = MPIDI_CH4R_mpi_win_flush(rank, win); ++ mpi_errno = MPIDIG_mpi_win_flush(rank, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH); + +@@ -292,7 +162,7 @@ static inline int MPIDI_POSIX_mpi_win_flush_local_all(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_LOCAL_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_LOCAL_ALL); + +- mpi_errno = MPIDI_CH4R_mpi_win_flush_local_all(win); ++ mpi_errno = MPIDIG_mpi_win_flush_local_all(win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_LOCAL_ALL); + +@@ -306,28 +176,13 @@ static inline int MPIDI_POSIX_mpi_win_unlock_all(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_UNLOCK_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_UNLOCK_ALL); + +- mpi_errno = MPIDI_CH4R_mpi_win_unlock_all(win); ++ mpi_errno = MPIDIG_mpi_win_unlock_all(win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_UNLOCK_ALL); + + return mpi_errno; + } + +-static inline int MPIDI_POSIX_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC); +- +- mpi_errno = MPIDI_CH4R_mpi_win_create_dynamic(info, comm, win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC); +- +- return mpi_errno; +-} +- + static inline int MPIDI_POSIX_mpi_win_flush_local(int rank, MPIR_Win * win) + { + int mpi_errno; +@@ -335,7 +190,7 @@ static inline int MPIDI_POSIX_mpi_win_flush_local(int rank, MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_LOCAL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_LOCAL); + +- mpi_errno = MPIDI_CH4R_mpi_win_flush_local(rank, win); ++ mpi_errno = MPIDIG_mpi_win_flush_local(rank, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_LOCAL); + +@@ -349,7 +204,7 @@ static inline int MPIDI_POSIX_mpi_win_sync(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_SYNC); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_SYNC); + +- mpi_errno = MPIDI_CH4R_mpi_win_sync(win); ++ mpi_errno = MPIDIG_mpi_win_sync(win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_SYNC); + +@@ -363,7 +218,7 @@ static inline int MPIDI_POSIX_mpi_win_flush_all(MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_ALL); + +- mpi_errno = MPIDI_CH4R_mpi_win_flush_all(win); ++ mpi_errno = MPIDIG_mpi_win_flush_all(win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FLUSH_ALL); + +@@ -377,171 +232,13 @@ static inline int MPIDI_POSIX_mpi_win_lock_all(int assert, MPIR_Win * win) + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_LOCK_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_LOCK_ALL); + +- mpi_errno = MPIDI_CH4R_mpi_win_lock_all(assert, win); ++ mpi_errno = MPIDIG_mpi_win_lock_all(assert, win); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_LOCK_ALL); + + return mpi_errno; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_win_create_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_POSIX_win_t *posix_win ATTRIBUTE((unused)) = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_HOOK); +- +- posix_win = &win->dev.shm.posix; +- posix_win->shm_mutex_ptr = NULL; +- +- /* No optimization */ +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_win_allocate_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_win_allocate_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_POSIX_win_t *posix_win ATTRIBUTE((unused)) = NULL; +- MPIR_Comm *shm_comm_ptr = win->comm_ptr->node_comm; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_HOOK); +- +- posix_win = &win->dev.shm.posix; +- posix_win->shm_mutex_ptr = NULL; +- +- /* Enable shm RMA only when interprocess mutex is supported and +- * more than 1 processes exist on the node. */ +- if (shm_comm_ptr == NULL || !MPL_proc_mutex_enabled()) +- goto fn_exit; +- +- posix_win = &win->dev.shm.posix; +- MPIDI_CH4U_WIN(win, shm_allocated) = 1; +- +- /* allocate interprocess mutex for RMA atomics over shared memory */ +- mpi_errno = MPIDI_CH4U_allocate_shm_segment(shm_comm_ptr, sizeof(MPL_proc_mutex_t), +- &posix_win->shm_mutex_segment_handle, +- (void **) &posix_win->shm_mutex_ptr); +- +- if (shm_comm_ptr->rank == 0) +- MPIDI_POSIX_RMA_MUTEX_INIT(posix_win->shm_mutex_ptr); +- +- /* No barrier is needed here, because the CH4 generic routine does it */ +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_win_allocate_shared_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_win_allocate_shared_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_POSIX_win_t *posix_win = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED_HOOK); +- +- /* Enable shm RMA only when interprocess mutex is supported */ +- if (!MPL_proc_mutex_enabled()) +- goto fn_exit; +- +- posix_win = &win->dev.shm.posix; +- MPIDI_CH4U_WIN(win, shm_allocated) = 1; +- +- /* allocate interprocess mutex for RMA atomics over shared memory */ +- mpi_errno = MPIDI_CH4U_allocate_shm_segment(win->comm_ptr, sizeof(MPL_proc_mutex_t), +- &posix_win->shm_mutex_segment_handle, +- (void **) &posix_win->shm_mutex_ptr); +- +- if (win->comm_ptr->rank == 0) +- MPIDI_POSIX_RMA_MUTEX_INIT(posix_win->shm_mutex_ptr); +- +- /* No barrier is needed here, because the CH4 generic routine does it */ +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_ALLOCATE_SHARED_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_win_create_dynamic_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_win_create_dynamic_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_POSIX_win_t *posix_win ATTRIBUTE((unused)) = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC_HOOK); +- +- posix_win = &win->dev.shm.posix; +- posix_win->shm_mutex_ptr = NULL; +- +- /* No optimization */ +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_CREATE_DYNAMIC_HOOK); +- return mpi_errno; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_win_attach_hook(MPIR_Win * win ATTRIBUTE((unused)), +- void *base ATTRIBUTE((unused)), +- MPI_Aint size ATTRIBUTE((unused))) +-{ +- /* No optimization */ +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_win_detach_hook(MPIR_Win * win ATTRIBUTE((unused)), +- const void *base ATTRIBUTE((unused))) +-{ +- /* No optimization */ +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_POSIX_mpi_win_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_win_free_hook(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE_HOOK); +- +- if (MPIDI_CH4U_WIN(win, shm_allocated)) { +- MPIDI_POSIX_win_t *posix_win = &win->dev.shm.posix; +- MPIR_Assert(posix_win->shm_mutex_ptr != NULL); +- +- /* destroy and detach shared mutex */ +- if (win->comm_ptr->rank == 0) +- MPIDI_POSIX_RMA_MUTEX_DESTROY(posix_win->shm_mutex_ptr); +- +- mpi_errno = MPIDI_CH4U_destroy_shm_segment(sizeof(MPL_proc_mutex_t), +- &posix_win->shm_mutex_segment_handle, +- (void **) &posix_win->shm_mutex_ptr); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_POSIX_MPI_WIN_FREE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_rma_win_cmpl_hook(MPIR_Win * win ATTRIBUTE((unused))) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_POSIX_RMA_WIN_CMPL_HOOK); +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/release_gather/Makefile.mk +@@ -0,0 +1,14 @@ ++## (C) 2018 by Argonne National Laboratory. ++## See COPYRIGHT in top-level directory. ++## ++## Portions of this code were written by Intel Corporation. ++## Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++## to Argonne National Laboratory subject to Software Grant and Corporate ++## Contributor License Agreement dated February 8, 2012. ++ ++AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/ch4/shm/posix/release_gather ++ ++noinst_HEADERS += src/mpid/ch4/shm/posix/release_gather/release_gather_types.h \ ++ src/mpid/ch4/shm/posix/release_gather/release_gather.h ++ ++mpi_core_sources += src/mpid/ch4/shm/posix/release_gather/release_gather.c +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/release_gather/release_gather.c +@@ -0,0 +1,577 @@ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++cvars: ++ - name : MPIR_CVAR_COLL_SHM_LIMIT_PER_NODE ++ category : COLLECTIVE ++ type : int ++ default : 65536 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Maximum shared memory created per node for optimized intra-node collectives (in KB) ++ ++ - name : MPIR_CVAR_BCAST_INTRANODE_BUFFER_TOTAL_SIZE ++ category : COLLECTIVE ++ type : int ++ default : 32768 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Total size of the bcast buffer (in bytes) ++ ++ - name : MPIR_CVAR_BCAST_INTRANODE_NUM_CELLS ++ category : COLLECTIVE ++ type : int ++ default : 4 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Number of cells the bcast buffer is divided into ++ ++ - name : MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE ++ category : COLLECTIVE ++ type : int ++ default : 32768 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Total size of the reduce buffer per rank (in bytes) ++ ++ - name : MPIR_CVAR_REDUCE_INTRANODE_NUM_CELLS ++ category : COLLECTIVE ++ type : int ++ default : 4 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Number of cells the reduce buffer is divided into, for each rank ++ ++ - name : MPIR_CVAR_BCAST_INTRANODE_TREE_KVAL ++ category : COLLECTIVE ++ type : int ++ default : 64 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ K value for the kary/knomial tree for intra-node bcast ++ ++ - name : MPIR_CVAR_BCAST_INTRANODE_TREE_TYPE ++ category : COLLECTIVE ++ type : string ++ default : kary ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Tree type for intra-node bcast tree ++ kary - kary tree type ++ knomial_1 - knomial_1 tree type (ranks are added in order from the left side) ++ knomial_2 - knomial_2 tree type (ranks are added in order from the right side) ++ ++ - name : MPIR_CVAR_REDUCE_INTRANODE_TREE_KVAL ++ category : COLLECTIVE ++ type : int ++ default : 4 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ K value for the kary/knomial tree for intra-node reduce ++ ++ - name : MPIR_CVAR_REDUCE_INTRANODE_TREE_TYPE ++ category : COLLECTIVE ++ type : string ++ default : kary ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Tree type for intra-node reduce tree ++ kary - kary tree type ++ knomial_1 - knomial_1 tree type (ranks are added in order from the left side) ++ knomial_2 - knomial_2 tree type (ranks are added in order from the right side) ++ ++ - name : MPIR_CVAR_ENABLE_INTRANODE_TOPOLOGY_AWARE_TREES ++ category : COLLECTIVE ++ type : int ++ default : 1 ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Enable collective specific intra-node trees which leverage the memory hierarchy of a machine. ++ Depends on hwloc to extract the binding information of each rank. Pick a leader rank per ++ package (socket), then create a per_package tree for ranks on a same package, package leaders ++ tree for package leaders. ++ For Bcast - Assemble the per_package and package_leaders tree in such a way that leaders ++ interact among themselves first before interacting with package local ranks. Both the ++ package_leaders and per_package trees are left skewed (children are added from left to right, ++ first child to be added is the first one to be processed in traversal) ++ For Reduce - Assemble the per_package and package_leaders tree in such a way that a leader ++ rank interacts with its package local ranks first, then with the other package leaders. Both ++ the per_package and package_leaders tree is right skewed (children are added in reverse ++ order, first child to be added is the last one to be processed in traversal) ++ The tree radix and tree type of package_leaders and per_package tree is ++ MPIR_CVAR_BCAST{REDUCE}_INTRANODE_TREE_KVAL and MPIR_CVAR_BCAST{REDUCE}_INTRANODE_TREE_TYPE ++ respectively for bast and reduce. But of as now topology aware trees are only kary. knomial ++ is to be implemented. ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++#include "mpiimpl.h" ++#include "release_gather.h" ++#ifdef BUILD_TOPOTREES ++#include "topotree.h" ++#include "topotree_util.h" ++#endif ++ ++#define COMM_FIELD(comm, field) \ ++ MPIDI_POSIX_COMM(comm)->release_gather->field ++ ++ ++MPIDI_POSIX_release_gather_tree_type_t MPIDI_POSIX_Bcast_tree_type, MPIDI_POSIX_Reduce_tree_type; ++ ++/* Initialize the release_gather struct to NULL */ ++int MPIDI_POSIX_mpi_release_gather_comm_init_null(MPIR_Comm * comm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_INIT_NULL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_INIT_NULL); ++ ++ MPIDI_POSIX_COMM(comm_ptr)->release_gather = NULL; ++ ++ if (0 == strcmp(MPIR_CVAR_BCAST_INTRANODE_TREE_TYPE, "kary")) ++ MPIDI_POSIX_Bcast_tree_type = MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KARY; ++ else if (0 == strcmp(MPIR_CVAR_BCAST_INTRANODE_TREE_TYPE, "knomial_1")) ++ MPIDI_POSIX_Bcast_tree_type = MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KNOMIAL_1; ++ else if (0 == strcmp(MPIR_CVAR_BCAST_INTRANODE_TREE_TYPE, "knomial_2")) ++ MPIDI_POSIX_Bcast_tree_type = MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KNOMIAL_2; ++ else ++ MPIDI_POSIX_Bcast_tree_type = MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KARY; ++ ++ if (0 == strcmp(MPIR_CVAR_REDUCE_INTRANODE_TREE_TYPE, "kary")) ++ MPIDI_POSIX_Reduce_tree_type = MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KARY; ++ else if (0 == strcmp(MPIR_CVAR_REDUCE_INTRANODE_TREE_TYPE, "knomial_1")) ++ MPIDI_POSIX_Reduce_tree_type = MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KNOMIAL_1; ++ else if (0 == strcmp(MPIR_CVAR_REDUCE_INTRANODE_TREE_TYPE, "knomial_2")) ++ MPIDI_POSIX_Reduce_tree_type = MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KNOMIAL_2; ++ else ++ MPIDI_POSIX_Reduce_tree_type = MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KARY; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_INIT_NULL); ++ return MPI_SUCCESS; ++} ++ ++/* Initialize the data structures and allocate the shared memory (flags, bcast buffer and reduce ++ * buffer) */ ++int MPIDI_POSIX_mpi_release_gather_comm_init(MPIR_Comm * comm_ptr, ++ const MPIDI_POSIX_release_gather_opcode_t operation) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_INIT); ++ ++ int mpi_errno = MPI_SUCCESS; ++ int mpi_errno_ret = MPI_SUCCESS; ++ int rank, num_ranks; ++ bool initialize_flags = false, initialize_bcast_buf = false, initialize_reduce_buf = false; ++ int flags_num_pages, fallback = 0; ++ size_t flags_shm_size = 0; ++ const long pg_sz = sysconf(_SC_PAGESIZE); ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ bool mapfail_flag = false; ++ int topotree_fail[2] = { -1, -1 }; /* -1 means topo trees not created due to reasons like not ++ * specifying binding, no hwloc etc. 0 means topo trees were ++ * created successfully. 1 means topo trees were created ++ * but there was a failure, so the tree needs to be freed ++ * before creating the non-topo tree */ ++ ++ rank = MPIR_Comm_rank(comm_ptr); ++ num_ranks = MPIR_Comm_size(comm_ptr); ++ /* Layout of the shm region: 1 gather and release flag each per rank, followed by ++ * bcast buffer (divided into multiple cells), followed by ++ * reduce buffer (divided into multiple cells) per rank. */ ++ ++ if (MPIDI_POSIX_COMM(comm_ptr)->release_gather == NULL) { ++ /* release_gather based collectives have not been used before on this comm */ ++ initialize_flags = true; ++ if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST) { ++ initialize_bcast_buf = true; ++ } else if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE || ++ operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE) { ++ /* For allreduce, we initialize only reduce buffers and use reduce buffer of rank 0 ++ * to broadcast the reduced data in release step */ ++ initialize_reduce_buf = true; ++ } ++ } else { ++ /* at least one release_gather based collective was used on this comm */ ++ if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST && ++ COMM_FIELD(comm_ptr, bcast_buf_addr) == NULL) { ++ initialize_bcast_buf = true; ++ } else if ((operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE || ++ operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE) && ++ COMM_FIELD(comm_ptr, reduce_buf_addr) == NULL) { ++ /* When op is either reduce or allreduce and reduce buffers are not initialized for each ++ * rank */ ++ initialize_reduce_buf = true; ++ } ++ } ++ ++ if (initialize_flags || initialize_bcast_buf || initialize_reduce_buf) { ++ /* Calculate the amount of shm to be created */ ++ size_t tmp_shm_counter; ++ size_t memory_to_be_allocated = 0; ++ if (initialize_flags) { ++ /* Calculate the amount of memory that would be allocated for flags */ ++ flags_shm_size = MPIDI_POSIX_RELEASE_GATHER_FLAG_SPACE_PER_RANK * num_ranks; ++ /* Reset flags_shm_size so that the data buffers are aligned to the system pages */ ++ flags_num_pages = flags_shm_size / (int) (pg_sz); ++ if (flags_shm_size % pg_sz != 0) { ++ flags_num_pages++; ++ } ++ flags_shm_size = flags_num_pages * pg_sz; ++ ++ /* Update the amount of memory to be allocated */ ++ memory_to_be_allocated += flags_shm_size; ++ } ++ ++ if (initialize_bcast_buf) { ++ memory_to_be_allocated += MPIR_CVAR_BCAST_INTRANODE_BUFFER_TOTAL_SIZE; ++ } ++ if (initialize_reduce_buf) { ++ memory_to_be_allocated += (num_ranks * MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE); ++ } ++ ++ if (rank == 0) { ++ /* rank 0 decides if more memory can be created and broadcasts the decision to other ranks */ ++ tmp_shm_counter = zm_atomic_load(MPIDI_POSIX_shm_limit_counter, zm_memord_acquire); ++ ++ /* Check if it is allowed to create more shm on this node */ ++ if ((tmp_shm_counter + memory_to_be_allocated) > ++ (MPIR_CVAR_COLL_SHM_LIMIT_PER_NODE * 1024)) { ++ /* cannot create more shm, fallback to MPIR level algorithms, and broadcast the decision to other ranks */ ++ fallback = 1; ++ MPIR_Bcast_impl(&fallback, 1, MPI_INT, 0, comm_ptr, &errflag); ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_NO_MEM, "**nomem"); ++ } else { ++ /* More shm can be created, update the shared counter */ ++ zm_atomic_fetch_add(MPIDI_POSIX_shm_limit_counter, memory_to_be_allocated, ++ zm_memord_seq_cst); ++ fallback = 0; ++ mpi_errno = MPIR_Bcast_impl(&fallback, 1, MPI_INT, 0, comm_ptr, &errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ } else { ++ mpi_errno = MPIR_Bcast_impl(&fallback, 1, MPI_INT, 0, comm_ptr, &errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ if (fallback) { ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_NO_MEM, "**nomem"); ++ } ++ } ++ } ++ ++ if (initialize_flags) { ++ /* Initialize the release_gather struct and allocate shm for flags */ ++ MPIDI_POSIX_release_gather_comm_t *release_gather_info_ptr; ++ release_gather_info_ptr = ++ MPL_malloc(sizeof(struct MPIDI_POSIX_release_gather_comm_t), MPL_MEM_COLL); ++ MPIR_ERR_CHKANDJUMP(!release_gather_info_ptr, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ ++ release_gather_info_ptr->flags_shm_size = flags_shm_size; ++ ++#ifdef BUILD_TOPOTREES ++ /* Create bcast_tree and reduce_tree with root of the tree as 0 */ ++ if (MPIR_CVAR_ENABLE_INTRANODE_TOPOLOGY_AWARE_TREES && ++ getenv("HYDRA_USER_PROVIDED_BINDING")) { ++ /* Topology aware trees are created only when the user has specified process binding */ ++ if (hwloc_topology_load(MPIR_Process.hwloc_topology) == 0) { ++ mpi_errno = ++ MPIDI_SHM_topology_tree_init(comm_ptr, 0, MPIR_CVAR_BCAST_INTRANODE_TREE_KVAL, ++ &release_gather_info_ptr->bcast_tree, ++ &topotree_fail[0], ++ MPIR_CVAR_REDUCE_INTRANODE_TREE_KVAL, ++ &release_gather_info_ptr->reduce_tree, ++ &topotree_fail[1], &errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } else { ++ /* Finalize was already called and MPIR_Process.hwloc_topology has been destroyed */ ++ topotree_fail[0] = -1; ++ topotree_fail[1] = -1; ++ } ++ mpi_errno = MPIR_Allreduce_impl(MPI_IN_PLACE, topotree_fail, 2, MPI_INT, ++ MPI_MAX, comm_ptr, &errflag); ++ } else { ++ topotree_fail[0] = -1; ++ topotree_fail[1] = -1; ++ } ++#endif ++ /* Non-topology aware trees */ ++ if (topotree_fail[0] != 0) { ++ if (topotree_fail[0] == 1) ++ MPIR_Treealgo_tree_free(&release_gather_info_ptr->bcast_tree); ++ mpi_errno = ++ MPIR_Treealgo_tree_create(rank, num_ranks, MPIDI_POSIX_Bcast_tree_type, ++ MPIR_CVAR_BCAST_INTRANODE_TREE_KVAL, 0, ++ &release_gather_info_ptr->bcast_tree); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ ++ if (topotree_fail[1] != 0) { ++ if (topotree_fail[1] == 1) ++ MPIR_Treealgo_tree_free(&release_gather_info_ptr->reduce_tree); ++ mpi_errno = ++ MPIR_Treealgo_tree_create(rank, num_ranks, MPIDI_POSIX_Reduce_tree_type, ++ MPIR_CVAR_REDUCE_INTRANODE_TREE_KVAL, 0, ++ &release_gather_info_ptr->reduce_tree); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ ++ release_gather_info_ptr->gather_state = release_gather_info_ptr->release_state ++ = MPIR_CVAR_BCAST_INTRANODE_NUM_CELLS + MPIR_CVAR_REDUCE_INTRANODE_NUM_CELLS; ++ ++ release_gather_info_ptr->bcast_buf_addr = NULL; ++ release_gather_info_ptr->reduce_buf_addr = NULL; ++ release_gather_info_ptr->child_reduce_buf_addr = NULL; ++ ++ mpi_errno = MPIDIU_allocate_shm_segment(comm_ptr, flags_shm_size, ++ &(release_gather_info_ptr->shm_flags_handle), ++ (void **) ++ &(release_gather_info_ptr->flags_addr), ++ &mapfail_flag); ++ if (mpi_errno || mapfail_flag) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ /* Calculate gather and release flag address and initialize to the gather and release states */ ++ release_gather_info_ptr->gather_flag_addr = ++ MPIDI_POSIX_RELEASE_GATHER_GATHER_FLAG_ADDR(rank); ++ release_gather_info_ptr->release_flag_addr = ++ MPIDI_POSIX_RELEASE_GATHER_RELEASE_FLAG_ADDR(rank); ++ *(release_gather_info_ptr->gather_flag_addr) = (release_gather_info_ptr->gather_state); ++ *(release_gather_info_ptr->release_flag_addr) = (release_gather_info_ptr->release_state); ++ ++ /* Make sure all the flags are set before ranks start reading each other's flags from shm */ ++ mpi_errno = MPIR_Barrier_impl(comm_ptr, &errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ MPIDI_POSIX_COMM(comm_ptr)->release_gather = release_gather_info_ptr; ++ } ++ ++ if (initialize_bcast_buf) { ++ /* Allocate the shared memory for bcast buffer */ ++ mpi_errno = ++ MPIDIU_allocate_shm_segment(comm_ptr, MPIR_CVAR_BCAST_INTRANODE_BUFFER_TOTAL_SIZE, ++ &(COMM_FIELD(comm_ptr, shm_bcast_buf_handle)), ++ (void **) &(COMM_FIELD(comm_ptr, bcast_buf_addr)), ++ &mapfail_flag); ++ if (mpi_errno || mapfail_flag) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ ++ if (initialize_reduce_buf) { ++ /* Allocate the shared memory for a reduce buffer per rank */ ++ int i; ++ COMM_FIELD(comm_ptr, child_reduce_buf_addr) = ++ MPL_malloc(num_ranks * sizeof(void *), MPL_MEM_COLL); ++ ++ mpi_errno = ++ MPIDIU_allocate_shm_segment(comm_ptr, ++ num_ranks * ++ MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE, ++ &(COMM_FIELD(comm_ptr, shm_reduce_buf_handle)), ++ (void **) &(COMM_FIELD(comm_ptr, reduce_buf_addr)), ++ &mapfail_flag); ++ if (mpi_errno || mapfail_flag) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ /* Store address of each of the children's reduce buffer */ ++ for (i = 0; i < COMM_FIELD(comm_ptr, reduce_tree.num_children); i++) { ++ MPIR_ERR_CHKANDJUMP(!utarray_eltptr(COMM_FIELD(comm_ptr, reduce_tree.children), i), ++ mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ COMM_FIELD(comm_ptr, child_reduce_buf_addr[i]) = ++ (char *) COMM_FIELD(comm_ptr, reduce_buf_addr) + ++ ((*utarray_eltptr(COMM_FIELD(comm_ptr, reduce_tree.children), i)) ++ * MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE); ++ } ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Cleanup the release_gather data structures and free the allocated memory */ ++int MPIDI_POSIX_mpi_release_gather_comm_free(MPIR_Comm * comm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_FREE); ++ ++ int mpi_errno = MPI_SUCCESS; ++ int mpi_errno_ret = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ ++ /* Clean up is not required for NULL struct */ ++ if (MPIDI_POSIX_COMM(comm_ptr)->release_gather == NULL) { ++ goto fn_exit; ++ } ++ ++ /* destroy and detach shared memory used for flags */ ++ mpi_errno = MPL_shm_seg_detach(COMM_FIELD(comm_ptr, shm_flags_handle), ++ (void **) &COMM_FIELD(comm_ptr, flags_addr), ++ COMM_FIELD(comm_ptr, flags_shm_size)); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ mpi_errno = MPL_shm_hnd_finalize(&COMM_FIELD(comm_ptr, shm_flags_handle)); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ if (COMM_FIELD(comm_ptr, bcast_buf_addr) != NULL) { ++ /* destroy and detach shared memory used for bcast buffer */ ++ mpi_errno = MPL_shm_seg_detach(COMM_FIELD(comm_ptr, shm_bcast_buf_handle), ++ (void **) &COMM_FIELD(comm_ptr, bcast_buf_addr), ++ MPIR_CVAR_BCAST_INTRANODE_BUFFER_TOTAL_SIZE); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ mpi_errno = MPL_shm_hnd_finalize(&COMM_FIELD(comm_ptr, shm_bcast_buf_handle)); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ ++ if (COMM_FIELD(comm_ptr, reduce_buf_addr) != NULL) { ++ /* destroy and detach shared memory used for reduce buffers */ ++ mpi_errno = MPL_shm_seg_detach(COMM_FIELD(comm_ptr, shm_reduce_buf_handle), ++ (void **) &COMM_FIELD(comm_ptr, reduce_buf_addr), ++ MPIR_Comm_size(comm_ptr) ++ * MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ mpi_errno = MPL_shm_hnd_finalize(&COMM_FIELD(comm_ptr, shm_reduce_buf_handle)); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ MPL_free(COMM_FIELD(comm_ptr, child_reduce_buf_addr)); ++ } ++ ++ MPIR_Treealgo_tree_free(&(COMM_FIELD(comm_ptr, bcast_tree))); ++ MPIR_Treealgo_tree_free(&(COMM_FIELD(comm_ptr, reduce_tree))); ++ MPL_free(MPIDI_POSIX_COMM(comm_ptr)->release_gather); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_MPI_RELEASE_GATHER_COMM_FREE); ++ return mpi_errno; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/release_gather/release_gather.h +@@ -0,0 +1,348 @@ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef RELEASE_GATHER_H_INCLUDED ++#define RELEASE_GATHER_H_INCLUDED ++ ++extern zm_atomic_uint_t *MPIDI_POSIX_shm_limit_counter; ++extern MPL_shm_hnd_t shm_limit_handle; ++extern MPIDI_POSIX_release_gather_tree_type_t MPIDI_POSIX_Bcast_tree_type, ++ MPIDI_POSIX_Reduce_tree_type; ++ ++/*Blocking wait implementation*/ ++/* zm_memord_acquire makes sure no writes/reads are reordered before this load */ ++#define MPIDI_POSIX_RELEASE_GATHER_WAIT_WHILE_LESS_THAN(ptr, value) \ ++ do { \ ++ int spin_count = 0; \ ++ while (zm_atomic_load(ptr, zm_memord_acquire) < (value)) { \ ++ if (++spin_count >= 10000) { \ ++ /* Call progress only after waiting for a while */ \ ++ MPID_Progress_test(); \ ++ spin_count = 0; \ ++ } \ ++ } \ ++ } \ ++ while (0) ++#define MPIDI_POSIX_RELEASE_GATHER_FLAG_SIZE (sizeof(zm_atomic_uint_t)) ++/* 1 cache_line each for gather and release flag */ ++#define MPIDI_POSIX_RELEASE_GATHER_FLAG_SPACE_PER_RANK (MPIDU_SHM_CACHE_LINE_LEN * 2) ++#define MPIDI_POSIX_RELEASE_GATHER_GATHER_FLAG_OFFSET (0) ++#define MPIDI_POSIX_RELEASE_GATHER_RELEASE_FLAG_OFFSET (MPIDU_SHM_CACHE_LINE_LEN) ++#define MPIDI_POSIX_RELEASE_GATHER_GATHER_FLAG_ADDR(rank) \ ++ (((zm_atomic_uint_t *)release_gather_info_ptr->flags_addr) + \ ++ ((rank * MPIDI_POSIX_RELEASE_GATHER_FLAG_SPACE_PER_RANK + MPIDI_POSIX_RELEASE_GATHER_GATHER_FLAG_OFFSET)/(MPIDI_POSIX_RELEASE_GATHER_FLAG_SIZE))) ++#define MPIDI_POSIX_RELEASE_GATHER_RELEASE_FLAG_ADDR(rank) \ ++ (((zm_atomic_uint_t *)release_gather_info_ptr->flags_addr) + \ ++ ((rank * MPIDI_POSIX_RELEASE_GATHER_FLAG_SPACE_PER_RANK + MPIDI_POSIX_RELEASE_GATHER_RELEASE_FLAG_OFFSET)/(MPIDI_POSIX_RELEASE_GATHER_FLAG_SIZE))) ++#define MPIDI_POSIX_RELEASE_GATHER_BCAST_DATA_ADDR(buf) \ ++ (char *) release_gather_info_ptr->bcast_buf_addr + \ ++ (buf * MPIDI_POSIX_RELEASE_GATHER_BCAST_CELLSIZE) ++#define MPIDI_POSIX_RELEASE_GATHER_REDUCE_DATA_ADDR(rank, buf) \ ++ (((char *) release_gather_info_ptr->reduce_buf_addr) + \ ++ (rank * MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE) + \ ++ (buf * MPIDI_POSIX_RELEASE_GATHER_REDUCE_CELLSIZE)) ++#define MPIDI_POSIX_RELEASE_GATHER_BCAST_CELLSIZE \ ++ (MPIR_CVAR_BCAST_INTRANODE_BUFFER_TOTAL_SIZE / MPIR_CVAR_BCAST_INTRANODE_NUM_CELLS) ++#define MPIDI_POSIX_RELEASE_GATHER_REDUCE_CELLSIZE \ ++ (MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE / MPIR_CVAR_REDUCE_INTRANODE_NUM_CELLS) ++ ++int MPIDI_POSIX_mpi_release_gather_comm_init_null(MPIR_Comm * comm_ptr); ++int MPIDI_POSIX_mpi_release_gather_comm_init(MPIR_Comm * comm_ptr, ++ const MPIDI_POSIX_release_gather_opcode_t operation); ++int MPIDI_POSIX_mpi_release_gather_comm_free(MPIR_Comm * comm_ptr); ++ ++/* Release step of the release_gather framework. This is top-down step in the release_tree. ++ * Parent notifies the children to go, once it arrives. In case of Bcast, root places the data in ++ * shm bcast buffer before notifying the children. Children copy the data out of shm buffer when ++ * notified by the parent */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_buf, ++ const int count, ++ MPI_Datatype datatype, ++ const int root, ++ MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag, ++ const ++ MPIDI_POSIX_release_gather_opcode_t ++ operation) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_MPI_RELEASE_GATHER_RELEASE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_MPI_RELEASE_GATHER_RELEASE); ++ ++ int mpi_errno = MPI_SUCCESS; ++ int mpi_errno_ret = MPI_SUCCESS; ++ MPIDI_POSIX_release_gather_comm_t *release_gather_info_ptr; ++ int segment, rank; ++ void *bcast_data_addr = NULL; ++ volatile zm_atomic_uint_t *parent_flag_addr; ++ /* Set the relaxation to 0 because in Bcast, gather step is "relaxed" to make sure multiple ++ * buffers can be used to pipeline the copying in and out of shared memory, and data is not ++ * overwritten */ ++ const int relaxation = ++ (operation == ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE) ? MPIR_CVAR_REDUCE_INTRANODE_NUM_CELLS - 1 : 0; ++ ++ rank = MPIR_Comm_rank(comm_ptr); ++ release_gather_info_ptr = MPIDI_POSIX_COMM(comm_ptr)->release_gather; ++ release_gather_info_ptr->release_state++; ++ ++ if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST) { ++ segment = release_gather_info_ptr->release_state % MPIR_CVAR_BCAST_INTRANODE_NUM_CELLS; ++ bcast_data_addr = MPIDI_POSIX_RELEASE_GATHER_BCAST_DATA_ADDR(segment); ++ ++ if (root != 0) { ++ /* Root sends data to rank 0 */ ++ if (rank == root) { ++ mpi_errno = ++ MPIC_Send(local_buf, count, datatype, 0, MPIR_BCAST_TAG, comm_ptr, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } else if (rank == 0) { ++ mpi_errno = ++ MPIC_Recv(bcast_data_addr, count, datatype, root, MPIR_BCAST_TAG, comm_ptr, ++ MPI_STATUS_IGNORE, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ } else if (rank == 0) { ++ mpi_errno = MPIR_Localcopy(local_buf, count, datatype, ++ bcast_data_addr, count, datatype); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ } ++ ++ if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE) { ++ /* For allreduce, ranks directly copy the data from the reduce buffer of rank 0 */ ++ segment = release_gather_info_ptr->release_state % MPIR_CVAR_REDUCE_INTRANODE_NUM_CELLS; ++ bcast_data_addr = MPIDI_POSIX_RELEASE_GATHER_REDUCE_DATA_ADDR(0, segment); ++ } ++ ++ if (rank == 0) { ++ /* Rank 0 updates its flag when it arrives and data is ready in shm buffer (if bcast) */ ++ /* zm_memord_release makes sure that the write of data does not get reordered after this ++ * store */ ++ zm_atomic_store((release_gather_info_ptr->release_flag_addr), ++ release_gather_info_ptr->release_state, zm_memord_release); ++ } else { ++ if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE) { ++ parent_flag_addr = ++ MPIDI_POSIX_RELEASE_GATHER_RELEASE_FLAG_ADDR(release_gather_info_ptr-> ++ reduce_tree.parent); ++ } else { ++ parent_flag_addr = ++ MPIDI_POSIX_RELEASE_GATHER_RELEASE_FLAG_ADDR(release_gather_info_ptr-> ++ bcast_tree.parent); ++ } ++ ++ /* Wait until the parent has updated its flag */ ++ MPIDI_POSIX_RELEASE_GATHER_WAIT_WHILE_LESS_THAN(parent_flag_addr, ++ release_gather_info_ptr->release_state - ++ relaxation); ++ /* Update its own flag */ ++ /* zm_memord_release makes sure that the read of parent's flag does not get reordered after ++ * this store */ ++ zm_atomic_store((release_gather_info_ptr->release_flag_addr), ++ release_gather_info_ptr->release_state, zm_memord_release); ++ } ++ ++ if (((operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST) && (rank != root)) || ++ (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE)) { ++ /* For bcast only non-root ranks copy data from shm buffer to user buffer and in case of ++ * allreduce all ranks copy data from shm buffer to their user buffer */ ++ MPIR_ERR_CHKANDJUMP(!bcast_data_addr, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ mpi_errno = MPIR_Localcopy(bcast_data_addr, count, datatype, local_buf, count, datatype); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_MPI_RELEASE_GATHER_RELEASE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Gather step of the release_gather framework. This is bottom-up step in the gather_tree. ++ * Children notify the parent when it arrives. In case of Reduce, each rank places its data in shm ++ * reduce buffer. A parent reduces all its children data with its own before notifying its parent. */ ++MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_gather(const void *inbuf, void *outbuf, ++ const int count, ++ MPI_Datatype datatype, MPI_Op op, ++ const int root, ++ MPIR_Comm * comm_ptr, ++ MPIR_Errflag_t * errflag, ++ const ++ MPIDI_POSIX_release_gather_opcode_t ++ operation) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_POSIX_MPI_RELEASE_GATHER_GATHER); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_POSIX_MPI_RELEASE_GATHER_GATHER); ++ ++ MPIDI_POSIX_release_gather_comm_t *release_gather_info_ptr; ++ int segment, rank, num_children; ++ volatile void *child_data_addr; ++ volatile zm_atomic_uint_t child_gather_flag, *child_flag_addr; ++ volatile void *reduce_data_addr = NULL; ++ int i, mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; ++ bool skip_checking = false; ++ /* Set the relaxation to 0 because in Reduce, release step is "relaxed" to make sure multiple ++ * buffers can be used to pipeline the copying in and out of shared memory, and data is not ++ * overwritten */ ++ const int relaxation = ++ (operation == ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST) ? MPIR_CVAR_BCAST_INTRANODE_NUM_CELLS - 1 : 0; ++ zm_atomic_uint_t min_gather; ++ UT_array *children; ++ ++ release_gather_info_ptr = MPIDI_POSIX_COMM(comm_ptr)->release_gather; ++ children = release_gather_info_ptr->bcast_tree.children; ++ num_children = release_gather_info_ptr->bcast_tree.num_children; ++ rank = MPIR_Comm_rank(comm_ptr); ++ ++ release_gather_info_ptr->gather_state++; ++ min_gather = release_gather_info_ptr->gather_state; ++ segment = release_gather_info_ptr->gather_state % MPIR_CVAR_REDUCE_INTRANODE_NUM_CELLS; ++ ++ if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE || ++ operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE) { ++ if (rank == 0 && operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE) { ++ /* Rank 0 reduces the data directly in its outbuf. Copy the data from inbuf to outbuf ++ * if needed */ ++ if (inbuf != outbuf) { ++ mpi_errno = MPIR_Localcopy(inbuf, count, datatype, outbuf, count, datatype); ++ } ++ reduce_data_addr = outbuf; ++ } else { ++ reduce_data_addr = MPIDI_POSIX_RELEASE_GATHER_REDUCE_DATA_ADDR(rank, segment); ++ /* Copy data from user buffer to shared buffer */ ++ mpi_errno = ++ MPIR_Localcopy(inbuf, count, datatype, (void *) reduce_data_addr, count, datatype); ++ } ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ num_children = release_gather_info_ptr->reduce_tree.num_children; ++ children = release_gather_info_ptr->reduce_tree.children; ++ } ++ ++ /* Avoid checking for availabilty of next buffer if it is guaranteed to be available */ ++ /* zm_memord_acquire makes sure no writes/reads are reordered before this load */ ++ if ((operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST) && ++ (zm_atomic_load(release_gather_info_ptr->gather_flag_addr, zm_memord_acquire)) >= ++ (release_gather_info_ptr->gather_state - relaxation)) { ++ skip_checking = true; ++ } ++ ++ /* Leaf nodes never skip checking */ ++ if (num_children == 0 || !skip_checking) { ++ for (i = 0; i < num_children; i++) { ++ MPIR_ERR_CHKANDJUMP(!utarray_eltptr(children, i), mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ child_flag_addr = ++ MPIDI_POSIX_RELEASE_GATHER_GATHER_FLAG_ADDR(*utarray_eltptr(children, i)); ++ /* Wait until the child has arrived */ ++ MPIDI_POSIX_RELEASE_GATHER_WAIT_WHILE_LESS_THAN(child_flag_addr, ++ release_gather_info_ptr->gather_state - ++ relaxation); ++ ++ if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE || ++ operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE) { ++ child_data_addr = ++ (char *) release_gather_info_ptr->child_reduce_buf_addr[i] + ++ segment * MPIDI_POSIX_RELEASE_GATHER_REDUCE_CELLSIZE; ++ /* zm_memord_acquire in MPIDI_POSIX_RELEASE_GATHER_WAIT_WHILE_LESS_THAN makes sure ++ * that the reduce_local call does not get reordered before read of children's flag ++ * in MPIDI_POSIX_RELEASE_GATHER_WAIT_WHILE_LESS_THAN */ ++ mpi_errno = ++ MPIR_Reduce_local((void *) child_data_addr, (void *) reduce_data_addr, ++ count, datatype, op); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ /* Read child_flag_addr which 'may' be larger than the strongest waiting condition ++ * so, it is safe */ ++ child_gather_flag = *child_flag_addr; ++ min_gather = MPL_MIN(child_gather_flag, min_gather); ++ } ++ /* zm_memord_release makes sure that the write of data (reduce_local) does not get ++ * reordered after this store */ ++ zm_atomic_store((release_gather_info_ptr->gather_flag_addr), min_gather, zm_memord_release); ++ } ++ ++ if (operation == MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE) { ++ if (root != 0) { ++ /* send-recv between root and rank 0 */ ++ if (rank == root) { ++ mpi_errno = ++ MPIC_Recv(outbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm_ptr, ++ MPI_STATUS_IGNORE, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } else if (rank == 0) { ++ MPIR_ERR_CHKANDJUMP(!reduce_data_addr, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ mpi_errno = ++ MPIC_Send((void *) reduce_data_addr, count, datatype, root, MPIR_REDUCE_TAG, ++ comm_ptr, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ } ++ /* No data copy is required if root was rank 0, because it reduced the data directly in its ++ * outbuf */ ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_POSIX_MPI_RELEASE_GATHER_GATHER); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++#endif /* RELEASE_GATHER_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/posix/release_gather/release_gather_types.h +@@ -0,0 +1,41 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2017 Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef RELEASE_GATHER_TYPES_H_INCLUDED ++#define RELEASE_GATHER_TYPES_H_INCLUDED ++ ++#include "treealgo_types.h" ++#include "common/zm_common.h" ++ ++typedef enum { ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_BCAST, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_REDUCE, ++ MPIDI_POSIX_RELEASE_GATHER_OPCODE_ALLREDUCE, ++} MPIDI_POSIX_release_gather_opcode_t; ++ ++typedef enum MPIDI_POSIX_release_gather_tree_type_t { ++ MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KARY, ++ MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KNOMIAL_1, ++ MPIDI_POSIX_RELEASE_GATHER_TREE_TYPE_KNOMIAL_2, ++} MPIDI_POSIX_release_gather_tree_type_t; ++ ++typedef struct MPIDI_POSIX_release_gather_comm_t { ++ MPIR_Treealgo_tree_t bcast_tree, reduce_tree; ++ MPL_shm_hnd_t shm_flags_handle, shm_bcast_buf_handle, shm_reduce_buf_handle; ++ int flags_shm_size; ++ uint64_t gather_state, release_state; ++ ++ volatile void *flags_addr, *bcast_buf_addr, *reduce_buf_addr; ++ volatile void **child_reduce_buf_addr; ++ volatile zm_atomic_uint_t *release_flag_addr, *gather_flag_addr; ++} MPIDI_POSIX_release_gather_comm_t; ++ ++#endif /* RELEASE_GATHER_TYPES_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/shm_inline.h ++++ b/src/mpid/ch4/shm/posix/shm_inline.h +@@ -3,14 +3,13 @@ + * See COPYRIGHT in top-level directory. + * + * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * Copyright (C) 2011-2017 Intel Corporation. Intel provides this material + * to Argonne National Laboratory subject to Software Grant and Corporate + * Contributor License Agreement dated February 8, 2012. + */ + #ifndef POSIX_INLINE_H_INCLUDED + #define POSIX_INLINE_H_INCLUDED + +-#include "posix_init.h" + #include "posix_probe.h" + #include "posix_progress.h" + #include "posix_recv.h" +@@ -20,9 +19,11 @@ + #include "posix_win.h" + #include "posix_rma.h" + #include "posix_am.h" +-#include "posix_spawn.h" +-#include "posix_comm.h" + #include "posix_coll.h" + #include "posix_unimpl.h" ++#include "posix_proc.h" ++ ++/* Not-inlined shm functions */ ++#include "posix_noinline.h" + + #endif /* POSIX_INLINE_H_INCLUDED */ +--- a/src/mpid/ch4/shm/posix/subconfigure.m4 ++++ b/src/mpid/ch4/shm/posix/subconfigure.m4 +@@ -3,44 +3,110 @@ dnl MPICH_SUBCFG_BEFORE=src/mpid/common/shm + dnl MPICH_SUBCFG_AFTER=src/mpid/ch4 + + AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ +- AM_COND_IF([BUILD_CH4],[ +- for shm in $ch4_shm ; do +- AS_CASE([$shm],[posix],[build_ch4_shm_posix=yes]) +- done +- +- AC_ARG_WITH(ch4-shmmod-posix-args, +- [ --with-ch4-shmmod-posix-args=arg1:arg2:arg3 +- CH4 POSIX shmmod arguments: +- disable-lock-free-queues - Disable atomics and lock-free queues +- ], +- [posix_shmmod_args=$withval], +- [posix_shmmod_args=]) +- +-dnl Parse the shmmod arguments +- SAVE_IFS=$IFS +- IFS=':' +- args_array=$posix_shmmod_args +- do_disable_lock_free_queues=false +- echo "Parsing Arguments for POSIX shmmod" +- for arg in $args_array; do +- case ${arg} in +- disable-lock-free-queues) +- do_disable_lock_free_queues=true +- echo " ---> CH4::SHM::POSIX : $arg" +- ;; +- esac +- done +- IFS=$SAVE_IFS +- +- if [test "$do_disable_lock_free_queues" = "true"]; then +- AC_MSG_NOTICE([Disabling POSIX shared memory lock free queues]) ++ # always enable POSIX ++ build_ch4_shm_posix=yes ++ ++ AC_ARG_WITH(ch4-posix-eager-modules, ++ [ --with-ch4-posix-eager-modules=module-list ++ CH4 POSIX eager arguments: ++ fbox - Use Fast Box module for eager transport ++ ], ++ [posix_eager_modules=$withval], ++ [posix_eager_modules=]) ++ ++ if test -z "${posix_eager_modules}" ; then ++ ch4_posix_eager_modules="fbox" ++ else ++ ch4_posix_eager_modules=`echo ${posix_eager_modules} | sed -e 's/,/ /g'` ++ fi ++ ++ export ch4_posix_eager_modules ++ ++ ch4_posix_eager_func_decl="" ++ ch4_posix_eager_func_array="" ++ ch4_posix_eager_strings="" ++ ch4_posix_eager_pre_include="" ++ ch4_posix_eager_recv_transaction_decl="" ++ ++ posix_eager_index=0 ++ ++ echo "Parsing POSIX eager arguments" ++ ++ for posix_eager in $ch4_posix_eager_modules; do ++ ++ if test ! -d $srcdir/src/mpid/ch4/shm/posix/eager/${posix_eager} ; then ++ AC_MSG_ERROR([POSIX eager module ${posix_eager} is unknown "$srcdir/src/mpid/ch4/shm/posix/eager/${posix_eager}"]) ++ fi ++ ++ posix_eager_macro=`echo $posix_eager | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ posix_eager_macro="MPIDI_POSIX_${posix_eager_macro}" ++ ++ if test -z "$ch4_posix_eager_array" ; then ++ ch4_posix_eager_array="$posix_eager_macro" ++ else ++ ch4_posix_eager_array="$ch4_posix_eager_array, $posix_eager_macro" ++ fi ++ ++ if test -z "$ch4_posix_eager_func_decl" ; then ++ ch4_posix_eager_func_decl="MPIDI_POSIX_eager_${posix_eager}_funcs" + else +- AC_MSG_NOTICE([Enabling POSIX shared memory lock free queues]) +- PAC_APPEND_FLAG([-DMPIDI_POSIX_USE_LOCK_FREE_QUEUES],[CPPFLAGS]) ++ ch4_posix_eager_func_decl="${ch4_posix_eager_func_decl}, MPIDI_POSIX_eager_${posix_eager}_funcs" + fi +- # the POSIX shmmod depends on the common shm code +- build_mpid_common_shm=yes ++ ++ if test -z "$ch4_posix_eager_func_array" ; then ++ ch4_posix_eager_func_array="&MPIDI_POSIX_eager_${posix_eager}_funcs" ++ else ++ ch4_posix_eager_func_array="${ch4_posix_eager_func_array}, &MPIDI_POSIX_eager_${posix_eager}_funcs" ++ fi ++ ++ if test -z "$ch4_posix_eager_strings" ; then ++ ch4_posix_eager_strings="\"$posix_eager\"" ++ else ++ ch4_posix_eager_strings="$ch4_posix_eager_strings, \"$posix_eager\"" ++ fi ++ ++ if test -z "$ch4_posix_eager_pre_include" ; then ++ ch4_posix_eager_pre_include="#include \"../${posix_eager}/${posix_eager}_pre.h\"" ++ else ++ ch4_posix_eager_pre_include="${ch4_posix_eager_pre_include} ++#include \"../${posix_eager}/${posix_eager}_pre.h\"" ++ fi ++ ++ if test -z "$ch4_posix_eager_recv_transaction_decl" ; then ++ ch4_posix_eager_recv_transaction_decl="MPIDI_POSIX_eager_${posix_eager}_recv_transaction_t ${posix_eager};" ++ else ++ ch4_posix_eager_recv_transaction_decl="${ch4_posix_eager_recv_transaction_decl} \\ ++MPIDI_POSIX_eager_${posix_eager}_recv_transaction_t ${posix_eager};" ++ fi ++ ++ posix_eager_index=`expr $posix_eager_index + 1` ++ ++ done ++ ++ ch4_posix_eager_array_sz=$posix_eager_index ++ ++ echo "There are $ch4_posix_eager_array_sz POSIX eager modules (${ch4_posix_eager_modules})" ++ ++ AC_SUBST(ch4_posix_eager_modules) ++ AC_SUBST(ch4_posix_eager_array) ++ AC_SUBST(ch4_posix_eager_array_sz) ++ AC_SUBST(ch4_posix_eager_strings) ++ AC_SUBST(ch4_posix_eager_func_decl) ++ AC_SUBST(ch4_posix_eager_func_array) ++ AC_SUBST(ch4_posix_eager_pre_include) ++ AC_SUBST(ch4_posix_eager_recv_transaction_decl) ++ ++ if test "$ch4_posix_eager_array_sz" = "1" && (test "$enable_ch4_shm_inline" = "yes" || test "$enable_ch4_shm_direct" = "yes") ; then ++ PAC_APPEND_FLAG([-DPOSIX_EAGER_INLINE=__posix_eager_inline_${ch4_posix_eager_modules}__], [CPPFLAGS]) ++ fi ++ ++ AC_CONFIG_FILES([ ++ src/mpid/ch4/shm/posix/posix_eager_array.c ++ src/mpid/ch4/shm/posix/eager/include/posix_eager_pre.h + ]) ++ ++ # the POSIX shmmod depends on the common shm code ++ build_mpid_common_shm=yes + AM_CONDITIONAL([BUILD_SHM_POSIX],[test "X$build_ch4_shm_posix" = "Xyes"]) + ])dnl + +--- a/src/mpid/ch4/shm/src/Makefile.mk ++++ b/src/mpid/ch4/shm/src/Makefile.mk +@@ -10,13 +10,28 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/ch4/shm/src + noinst_HEADERS += src/mpid/ch4/shm/src/shm_impl.h \ + src/mpid/ch4/shm/src/shm_am.h \ + src/mpid/ch4/shm/src/shm_coll.h \ +- src/mpid/ch4/shm/src/shm_dpm.h \ + src/mpid/ch4/shm/src/shm_hooks.h \ + src/mpid/ch4/shm/src/shm_init.h \ +- src/mpid/ch4/shm/src/shm_mem.h \ + src/mpid/ch4/shm/src/shm_misc.h \ + src/mpid/ch4/shm/src/shm_p2p.h \ + src/mpid/ch4/shm/src/shm_startall.h\ ++ src/mpid/ch4/shm/src/shm_noinline.h\ + src/mpid/ch4/shm/src/shm_rma.h + +-mpi_core_sources += src/mpid/ch4/shm/src/func_table.c ++mpi_core_sources += src/mpid/ch4/shm/src/func_table.c \ ++ src/mpid/ch4/shm/src/shm_init.c \ ++ src/mpid/ch4/shm/src/shm_hooks.c \ ++ src/mpid/ch4/shm/src/shm_dpm.c \ ++ src/mpid/ch4/shm/src/shm_mem.c \ ++ src/mpid/ch4/shm/src/shm_misc.c \ ++ src/mpid/ch4/shm/src/shm_rma.c \ ++ src/mpid/ch4/shm/src/shm_impl.c ++ ++if BUILD_TOPOTREES ++noinst_HEADERS += src/mpid/ch4/shm/src/topotree_util.h \ ++ src/mpid/ch4/shm/src/topotree_types.h\ ++ src/mpid/ch4/shm/src/topotree.h ++ ++mpi_core_sources += src/mpid/ch4/shm/src/topotree.c \ ++ src/mpid/ch4/shm/src/topotree_util.c ++endif +--- a/src/mpid/ch4/shm/src/func_table.c ++++ b/src/mpid/ch4/shm/src/func_table.c +@@ -18,30 +18,30 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + #include + #include "shm_inline.h" + MPIDI_SHM_funcs_t MPIDI_SHM_src_funcs = { +- .mpi_init = MPIDI_SHM_mpi_init_hook, +- .mpi_finalize = MPIDI_SHM_mpi_finalize_hook, +- .get_vni_attr = MPIDI_SHM_get_vni_attr, ++ .mpi_init = MPIDI_SHMI_mpi_init_hook, ++ .mpi_finalize = MPIDI_SHMI_mpi_finalize_hook, ++ .get_vci_attr = MPIDI_SHMI_get_vci_attr, + .progress = MPIDI_SHM_progress, +- .mpi_comm_connect = MPIDI_SHM_mpi_comm_connect, +- .mpi_comm_disconnect = MPIDI_SHM_mpi_comm_disconnect, +- .mpi_open_port = MPIDI_SHM_mpi_open_port, +- .mpi_close_port = MPIDI_SHM_mpi_close_port, +- .mpi_comm_accept = MPIDI_SHM_mpi_comm_accept, ++ .mpi_comm_connect = MPIDI_SHMI_mpi_comm_connect, ++ .mpi_comm_disconnect = MPIDI_SHMI_mpi_comm_disconnect, ++ .mpi_open_port = MPIDI_SHMI_mpi_open_port, ++ .mpi_close_port = MPIDI_SHMI_mpi_close_port, ++ .mpi_comm_accept = MPIDI_SHMI_mpi_comm_accept, + /* Routines that handle addressing */ + .comm_get_lpid = MPIDI_SHM_comm_get_lpid, +- .get_local_upids = MPIDI_SHM_get_local_upids, +- .upids_to_lupids = MPIDI_SHM_upids_to_lupids, ++ .get_local_upids = MPIDI_SHMI_get_local_upids, ++ .upids_to_lupids = MPIDI_SHMI_upids_to_lupids, + .create_intercomm_from_lpids = MPIDI_SHM_create_intercomm_from_lpids, +- .mpi_comm_create_hook = MPIDI_SHM_mpi_comm_create_hook, +- .mpi_comm_free_hook = MPIDI_SHM_mpi_comm_free_hook, ++ .mpi_comm_create_hook = MPIDI_SHMI_mpi_comm_create_hook, ++ .mpi_comm_free_hook = MPIDI_SHMI_mpi_comm_free_hook, + /* Window initialization/cleanup routines */ +- .mpi_win_create_hook = MPIDI_SHM_mpi_win_create_hook, +- .mpi_win_allocate_hook = MPIDI_SHM_mpi_win_allocate_hook, +- .mpi_win_allocate_shared_hook = MPIDI_SHM_mpi_win_allocate_shared_hook, +- .mpi_win_create_dynamic_hook = MPIDI_SHM_mpi_win_create_dynamic_hook, +- .mpi_win_attach_hook = MPIDI_SHM_mpi_win_attach_hook, +- .mpi_win_detach_hook = MPIDI_SHM_mpi_win_detach_hook, +- .mpi_win_free_hook = MPIDI_SHM_mpi_win_free_hook, ++ .mpi_win_create_hook = MPIDI_SHMI_mpi_win_create_hook, ++ .mpi_win_allocate_hook = MPIDI_SHMI_mpi_win_allocate_hook, ++ .mpi_win_allocate_shared_hook = MPIDI_SHMI_mpi_win_allocate_shared_hook, ++ .mpi_win_create_dynamic_hook = MPIDI_SHMI_mpi_win_create_dynamic_hook, ++ .mpi_win_attach_hook = MPIDI_SHMI_mpi_win_attach_hook, ++ .mpi_win_detach_hook = MPIDI_SHMI_mpi_win_detach_hook, ++ .mpi_win_free_hook = MPIDI_SHMI_mpi_win_free_hook, + /* RMA synchronization routines */ + .rma_win_cmpl_hook = MPIDI_SHM_rma_win_cmpl_hook, + .rma_win_local_cmpl_hook = MPIDI_SHM_rma_win_local_cmpl_hook, +@@ -52,6 +52,7 @@ MPIDI_SHM_funcs_t MPIDI_SHM_src_funcs = { + /* Request initialization/cleanup routines */ + .am_request_init = MPIDI_SHM_am_request_init, + .am_request_finalize = MPIDI_SHM_am_request_finalize, ++ .prequest_free_hook = MPIDI_SHM_prequest_free_hook, + /* Active Message Routines */ + .am_send_hdr = MPIDI_SHM_am_send_hdr, + .am_isend = MPIDI_SHM_am_isend, +@@ -78,11 +79,11 @@ MPIDI_SHM_native_funcs_t MPIDI_SHM_native_src_funcs = { + .mpi_irecv = MPIDI_SHM_mpi_irecv, + .mpi_imrecv = MPIDI_SHM_mpi_imrecv, + .mpi_cancel_recv = MPIDI_SHM_mpi_cancel_recv, +- .mpi_alloc_mem = MPIDI_SHM_mpi_alloc_mem, +- .mpi_free_mem = MPIDI_SHM_mpi_free_mem, ++ .mpi_alloc_mem = MPIDI_SHMI_mpi_alloc_mem, ++ .mpi_free_mem = MPIDI_SHMI_mpi_free_mem, + .mpi_improbe = MPIDI_SHM_mpi_improbe, + .mpi_iprobe = MPIDI_SHM_mpi_iprobe, +- .mpi_win_set_info = MPIDI_SHM_mpi_win_set_info, ++ .mpi_win_set_info = MPIDI_SHMI_mpi_win_set_info, + .mpi_win_shared_query = MPIDI_SHM_mpi_win_shared_query, + .mpi_put = MPIDI_SHM_mpi_put, + .mpi_win_start = MPIDI_SHM_mpi_win_start, +@@ -92,26 +93,26 @@ MPIDI_SHM_native_funcs_t MPIDI_SHM_native_src_funcs = { + .mpi_win_test = MPIDI_SHM_mpi_win_test, + .mpi_win_lock = MPIDI_SHM_mpi_win_lock, + .mpi_win_unlock = MPIDI_SHM_mpi_win_unlock, +- .mpi_win_get_info = MPIDI_SHM_mpi_win_get_info, ++ .mpi_win_get_info = MPIDI_SHMI_mpi_win_get_info, + .mpi_get = MPIDI_SHM_mpi_get, + .mpi_win_free = MPIDI_SHM_mpi_win_free, + .mpi_win_fence = MPIDI_SHM_mpi_win_fence, +- .mpi_win_create = MPIDI_SHM_mpi_win_create, ++ .mpi_win_create = MPIDI_SHMI_mpi_win_create, + .mpi_accumulate = MPIDI_SHM_mpi_accumulate, +- .mpi_win_attach = MPIDI_SHM_mpi_win_attach, +- .mpi_win_allocate_shared = MPIDI_SHM_mpi_win_allocate_shared, ++ .mpi_win_attach = MPIDI_SHMI_mpi_win_attach, ++ .mpi_win_allocate_shared = MPIDI_SHMI_mpi_win_allocate_shared, + .mpi_rput = MPIDI_SHM_mpi_rput, + .mpi_win_flush_local = MPIDI_SHM_mpi_win_flush_local, +- .mpi_win_detach = MPIDI_SHM_mpi_win_detach, ++ .mpi_win_detach = MPIDI_SHMI_mpi_win_detach, + .mpi_compare_and_swap = MPIDI_SHM_mpi_compare_and_swap, + .mpi_raccumulate = MPIDI_SHM_mpi_raccumulate, + .mpi_rget_accumulate = MPIDI_SHM_mpi_rget_accumulate, + .mpi_fetch_and_op = MPIDI_SHM_mpi_fetch_and_op, +- .mpi_win_allocate = MPIDI_SHM_mpi_win_allocate, ++ .mpi_win_allocate = MPIDI_SHMI_mpi_win_allocate, + .mpi_win_flush = MPIDI_SHM_mpi_win_flush, + .mpi_win_flush_local_all = MPIDI_SHM_mpi_win_flush_local_all, + .mpi_win_unlock_all = MPIDI_SHM_mpi_win_unlock_all, +- .mpi_win_create_dynamic = MPIDI_SHM_mpi_win_create_dynamic, ++ .mpi_win_create_dynamic = MPIDI_SHMI_mpi_win_create_dynamic, + .mpi_rget = MPIDI_SHM_mpi_rget, + .mpi_win_sync = MPIDI_SHM_mpi_win_sync, + .mpi_win_flush_all = MPIDI_SHM_mpi_win_flush_all, +@@ -163,10 +164,10 @@ MPIDI_SHM_native_funcs_t MPIDI_SHM_native_src_funcs = { + .mpi_iscatter = MPIDI_SHM_mpi_iscatter, + .mpi_iscatterv = MPIDI_SHM_mpi_iscatterv, + /* Datatype hooks */ +- .mpi_type_commit_hook = MPIDI_SHM_mpi_type_commit_hook, +- .mpi_type_free_hook = MPIDI_SHM_mpi_type_free_hook, ++ .mpi_type_commit_hook = MPIDI_SHMI_mpi_type_commit_hook, ++ .mpi_type_free_hook = MPIDI_SHMI_mpi_type_free_hook, + /* Op hooks */ +- .mpi_op_commit_hook = MPIDI_SHM_mpi_op_commit_hook, +- .mpi_op_free_hook = MPIDI_SHM_mpi_op_free_hook, ++ .mpi_op_commit_hook = MPIDI_SHMI_mpi_op_commit_hook, ++ .mpi_op_free_hook = MPIDI_SHMI_mpi_op_free_hook, + }; + #endif +--- a/src/mpid/ch4/shm/src/shm_am.h ++++ b/src/mpid/ch4/shm/src/shm_am.h +@@ -5,6 +5,12 @@ + * + */ + ++/* ++ * In this file, we directly call the POSIX shared memory module all the time. In the future, this ++ * code could have some logic to call other modules in certain circumstances (e.g. XPMEM for large ++ * messages and POSIX for small messages). ++ */ ++ + #ifndef SHM_AM_H_INCLUDED + #define SHM_AM_H_INCLUDED + +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/shm_dpm.c +@@ -0,0 +1,77 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ */ ++ ++#include "mpidimpl.h" ++#include "shm_noinline.h" ++#include "../posix/posix_noinline.h" ++ ++int MPIDI_SHMI_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_COMM_CONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_COMM_CONNECT); ++ ++ ret = MPIDI_POSIX_mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_COMM_CONNECT); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_COMM_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_COMM_DISCONNECT); ++ ++ ret = MPIDI_POSIX_mpi_comm_disconnect(comm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_COMM_DISCONNECT); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_OPEN_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_OPEN_PORT); ++ ++ ret = MPIDI_POSIX_mpi_open_port(info_ptr, port_name); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_OPEN_PORT); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_close_port(const char *port_name) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_CLOSE_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_CLOSE_PORT); ++ ++ ret = MPIDI_POSIX_mpi_close_port(port_name); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_CLOSE_PORT); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_COMM_ACCEPT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_COMM_ACCEPT); ++ ++ ret = MPIDI_POSIX_mpi_comm_accept(port_name, info, root, comm, newcomm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_COMM_ACCEPT); ++ return ret; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/src/shm_dpm.h ++++ /dev/null +@@ -1,83 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- */ +- +-#ifndef SHM_DPM_H_INCLUDED +-#define SHM_DPM_H_INCLUDED +- +-#include +-#include "../posix/shm_inline.h" +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_connect(const char *port_name, MPIR_Info * info, +- int root, int timeout, MPIR_Comm * comm, +- MPIR_Comm ** newcomm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); +- +- ret = MPIDI_POSIX_mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); +- +- ret = MPIDI_POSIX_mpi_comm_disconnect(comm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); +- +- ret = MPIDI_POSIX_mpi_open_port(info_ptr, port_name); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_close_port(const char *port_name) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); +- +- ret = MPIDI_POSIX_mpi_close_port(port_name); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_accept(const char *port_name, MPIR_Info * info, +- int root, MPIR_Comm * comm, +- MPIR_Comm ** newcomm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); +- +- ret = MPIDI_POSIX_mpi_comm_accept(port_name, info, root, comm, newcomm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); +- return ret; +-} +- +-#endif /* SHM_DPM_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/shm_hooks.c +@@ -0,0 +1,179 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ */ ++ ++#include "mpidimpl.h" ++#include "shm_noinline.h" ++#include "../posix/posix_noinline.h" ++ ++int MPIDI_SHMI_mpi_comm_create_hook(MPIR_Comm * comm) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_COMM_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_COMM_CREATE_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_comm_create_hook(comm); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_COMM_CREATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_comm_free_hook(MPIR_Comm * comm) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_COMM_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_COMM_FREE_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_comm_free_hook(comm); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_COMM_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_type_commit_hook(MPIR_Datatype * type) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_TYPE_COMMIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_TYPE_COMMIT_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_type_commit_hook(type); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_TYPE_COMMIT_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_type_free_hook(MPIR_Datatype * type) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_TYPE_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_TYPE_FREE_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_type_free_hook(type); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_TYPE_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_op_commit_hook(MPIR_Op * op) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_OP_COMMIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_OP_COMMIT_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_op_commit_hook(op); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_OP_COMMIT_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_op_free_hook(MPIR_Op * op) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_OP_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_OP_FREE_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_op_free_hook(op); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_OP_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_create_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_win_create_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_allocate_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_win_allocate_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_allocate_shared_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_win_allocate_shared_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_create_dynamic_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_win_create_dynamic_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_ATTACH_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_ATTACH_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_win_attach_hook(win, base, size); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_ATTACH_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_detach_hook(MPIR_Win * win, const void *base) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_DETACH_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_DETACH_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_win_detach_hook(win, base); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_DETACH_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_free_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_FREE_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_win_free_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_FREE_HOOK); ++ return ret; ++} +--- a/src/mpid/ch4/shm/src/shm_hooks.h ++++ b/src/mpid/ch4/shm/src/shm_hooks.h +@@ -11,176 +11,6 @@ + #include + #include "../posix/shm_inline.h" + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); +- +- ret = MPIDI_POSIX_mpi_comm_create_hook(comm); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); +- +- ret = MPIDI_POSIX_mpi_comm_free_hook(comm); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_type_commit_hook(MPIR_Datatype * type) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_TYPE_COMMIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_TYPE_COMMIT_HOOK); +- +- ret = MPIDI_POSIX_mpi_type_commit_hook(type); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_TYPE_COMMIT_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_type_free_hook(MPIR_Datatype * type) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); +- +- ret = MPIDI_POSIX_mpi_type_free_hook(type); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_op_commit_hook(MPIR_Op * op) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); +- +- ret = MPIDI_POSIX_mpi_op_commit_hook(op); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_op_free_hook(MPIR_Op * op) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); +- +- ret = MPIDI_POSIX_mpi_op_free_hook(op); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); +- +- ret = MPIDI_POSIX_mpi_win_create_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); +- +- ret = MPIDI_POSIX_mpi_win_allocate_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_shared_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- +- ret = MPIDI_POSIX_mpi_win_allocate_shared_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_dynamic_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- +- ret = MPIDI_POSIX_mpi_win_create_dynamic_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_attach_hook(MPIR_Win * win, void *base, +- MPI_Aint size) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); +- +- ret = MPIDI_POSIX_mpi_win_attach_hook(win, base, size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_detach_hook(MPIR_Win * win, const void *base) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); +- +- ret = MPIDI_POSIX_mpi_win_detach_hook(win, base); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_free_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); +- +- ret = MPIDI_POSIX_mpi_win_free_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rma_win_cmpl_hook(MPIR_Win * win) + { + int ret; +@@ -256,4 +86,5 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rma_op_cs_exit_hook(MPIR_Win * win) + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_RMA_OP_CS_EXIT_HOOK); + return ret; + } ++ + #endif /* SHM_HOOKS_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/shm_impl.c +@@ -0,0 +1,480 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpl.h" ++ ++MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; ++ ++#include "posix_impl.h" ++ ++#ifndef SHM_INLINE ++#ifndef SHM_DISABLE_INLINES ++ ++int MPIDI_SHM_mpi_init_hook(int rank, int size, int *n_vcis_provided, int *tag_bits) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_init(rank, size, n_vcis_provided, tag_bits); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_finalize_hook(void) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_finalize(); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_get_vci_attr(int vci) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_QUERY_VCI); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_QUERY_VCI); ++ ++ ret = MPIDI_SHM_src_funcs.get_vci_attr(vci); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_QUERY_VCI); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_comm_create_hook(MPIR_Comm * comm) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_comm_create_hook(comm); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_comm_free_hook(MPIR_Comm * comm) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_comm_free_hook(comm); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_create_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_win_create_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_allocate_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_win_allocate_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_allocate_shared_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_win_allocate_shared_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_create_dynamic_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_win_create_dynamic_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_win_attach_hook(win, base, size); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_detach_hook(MPIR_Win * win, const void *base) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_win_detach_hook(win, base); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_free_hook(MPIR_Win * win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_win_free_hook(win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_comm_disconnect(comm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_open_port(info_ptr, port_name); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_close_port(const char *port_name) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_close_port(port_name); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); ++ ++ ret = MPIDI_SHM_src_funcs.mpi_comm_accept(port_name, info, root, comm, newcomm_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_win_set_info(win, info); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_win_get_info(win, info_p_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_win_free(win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); ++ ++ ret = ++ MPIDI_SHM_native_src_funcs.mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_win_attach(win, base, size); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, ++ base_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_win_detach(win, base); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_win_create_dynamic(info, comm, win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); ++ return ret; ++} ++ ++int MPIDI_SHM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); ++ ++ ret = MPIDI_SHM_src_funcs.get_local_upids(comm, local_upid_size, local_upids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); ++ return ret; ++} ++ ++int MPIDI_SHM_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); ++ ++ ret = MPIDI_SHM_src_funcs.upids_to_lupids(size, remote_upid_size, remote_upids, remote_lupids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); ++ return ret; ++} ++ ++int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); ++ ++ ret = MPIDI_SHM_src_funcs.create_intercomm_from_lpids(newcomm_ptr, size, lpids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); ++ return ret; ++} ++ ++void *MPIDI_SHM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ void *ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_alloc_mem(size, info_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_free_mem(void *ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_free_mem(ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_TYPE_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_TYPE_CREATE_HOOK); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_type_commit_hook(datatype_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_TYPE_CREATE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_type_free_hook(MPIR_Datatype * datatype_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_type_free_hook(datatype_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_op_commit_hook(MPIR_Op * op_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_op_commit_hook(op_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHM_mpi_op_free_hook(MPIR_Op * op_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); ++ ++ ret = MPIDI_SHM_native_src_funcs.mpi_op_free_hook(op_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); ++ return ret; ++} ++ ++#endif ++#endif +--- a/src/mpid/ch4/shm/src/shm_impl.h ++++ b/src/mpid/ch4/shm/src/shm_impl.h +@@ -5,134 +5,33 @@ + * + */ + ++/* ++ * If inlining is turned off, this file will be used to call into the shared memory module. It will ++ * use the function pointer structure to call the appropriate functions rather than directly ++ * inlining them. ++ */ ++ + #ifndef SHM_IMPL_H_INCLUDED + #define SHM_IMPL_H_INCLUDED + ++#include "posix_impl.h" ++ + #ifndef SHM_INLINE + #ifndef SHM_DISABLE_INLINES + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_init_hook(int rank, int size, int *n_vnis_provided, +- int *tag_bits) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_init(rank, size, n_vnis_provided, tag_bits); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_finalize_hook(void) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_finalize(); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_vni_attr(int vni) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_QUERY_VNI); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_QUERY_VNI); +- +- ret = MPIDI_SHM_src_funcs.get_vni_attr(vni); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_QUERY_VNI); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int vni, int blocking) ++MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int vci, int blocking) + { + int ret; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_PROGRESS); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_PROGRESS); + +- ret = MPIDI_SHM_src_funcs.progress(vni, blocking); ++ ret = MPIDI_SHM_src_funcs.progress(vci, blocking); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_PROGRESS); + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_connect(const char *port_name, MPIR_Info * info, +- int root, int timeout, MPIR_Comm * comm, +- MPIR_Comm ** newcomm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); +- +- ret = MPIDI_SHM_src_funcs.mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_CONNECT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); +- +- ret = MPIDI_SHM_src_funcs.mpi_comm_disconnect(comm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_DISCONNECT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); +- +- ret = MPIDI_SHM_src_funcs.mpi_open_port(info_ptr, port_name); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OPEN_PORT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_close_port(const char *port_name) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); +- +- ret = MPIDI_SHM_src_funcs.mpi_close_port(port_name); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_CLOSE_PORT); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_accept(const char *port_name, MPIR_Info * info, +- int root, MPIR_Comm * comm, +- MPIR_Comm ** newcomm_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); +- +- ret = MPIDI_SHM_src_funcs.mpi_comm_accept(port_name, info, root, comm, newcomm_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_ACCEPT); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id, + const void *am_hdr, size_t am_hdr_sz) + { +@@ -258,74 +157,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_get_lpid(MPIR_Comm * comm_ptr, int i + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); +- +- ret = MPIDI_SHM_src_funcs.get_local_upids(comm, local_upid_size, local_upids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_upids_to_lupids(int size, size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); +- +- ret = MPIDI_SHM_src_funcs.upids_to_lupids(size, remote_upid_size, remote_upids, remote_lupids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); +- +- ret = MPIDI_SHM_src_funcs.create_intercomm_from_lpids(newcomm_ptr, size, lpids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_comm_create_hook(comm); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_CREATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_comm_free_hook(comm); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_COMM_FREE_HOOK); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_init(MPIR_Request * req) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_AM_REQUEST_INIT); +@@ -346,6 +177,16 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_finalize(MPIR_Request * req) + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_AM_REQUEST_FINALIZE); + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_prequest_free_hook(MPIR_Request * req) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_PREQUEST_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_PREQUEST_FREE_HOOK); ++ ++ MPIDI_SHM_src_funcs.prequest_free_hook(req); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_PREQUEST_FREE_HOOK); ++} ++ + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send(const void *buf, MPI_Aint count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, +@@ -398,6 +239,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_startall(int count, MPIR_Request * re + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { + int ret; +@@ -406,7 +248,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send_init(const void *buf, int count, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_SEND_INIT); + + ret = MPIDI_SHM_native_src_funcs.mpi_send_init(buf, count, datatype, rank, tag, comm, +- context_offset, request); ++ context_offset, addr, request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_SEND_INIT); + return ret; +@@ -415,6 +257,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send_init(const void *buf, int count, + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ssend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { + int ret; +@@ -423,7 +266,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ssend_init(const void *buf, int count + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_SSEND_INIT); + + ret = MPIDI_SHM_native_src_funcs.mpi_ssend_init(buf, count, datatype, rank, tag, comm, +- context_offset, request); ++ context_offset, addr, request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_SSEND_INIT); + return ret; +@@ -432,6 +275,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ssend_init(const void *buf, int count + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rsend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { + int ret; +@@ -440,7 +284,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rsend_init(const void *buf, int count + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_RSEND_INIT); + + ret = MPIDI_SHM_native_src_funcs.mpi_rsend_init(buf, count, datatype, rank, tag, comm, +- context_offset, request); ++ context_offset, addr, request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_RSEND_INIT); + return ret; +@@ -449,6 +293,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rsend_init(const void *buf, int count + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_bsend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { + int ret; +@@ -457,7 +302,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_bsend_init(const void *buf, int count + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_BSEND_INIT); + + ret = MPIDI_SHM_native_src_funcs.mpi_bsend_init(buf, count, datatype, rank, tag, comm, +- context_offset, request); ++ context_offset, addr, request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_BSEND_INIT); + return ret; +@@ -564,14 +409,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_irecv(void *buf, MPI_Aint count, MPI_ + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_imrecv(void *buf, MPI_Aint count, MPI_Datatype datatype, +- MPIR_Request * message, MPIR_Request ** rreqp) ++ MPIR_Request * message) + { + int ret; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_IMRECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_IMRECV); + +- ret = MPIDI_SHM_native_src_funcs.mpi_imrecv(buf, count, datatype, message, rreqp); ++ ret = MPIDI_SHM_native_src_funcs.mpi_imrecv(buf, count, datatype, message); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_IMRECV); + return ret; +@@ -590,32 +435,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_cancel_recv(MPIR_Request * rreq) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX void *MPIDI_SHM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- void *ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_alloc_mem(size, info_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_free_mem(void *ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_free_mem(ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_improbe(int source, int tag, MPIR_Comm * comm, + int context_offset, + int *flag, MPIR_Request ** message, +@@ -648,98 +467,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iprobe(int source, int tag, MPIR_Comm + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_win_create_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_win_allocate_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_shared_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_win_allocate_shared_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_dynamic_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_win_create_dynamic_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_attach_hook(MPIR_Win * win, void *base, +- MPI_Aint size) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_win_attach_hook(win, base, size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_detach_hook(MPIR_Win * win, const void *base) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_win_detach_hook(win, base); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_free_hook(MPIR_Win * win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); +- +- ret = MPIDI_SHM_src_funcs.mpi_win_free_hook(win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE_HOOK); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rma_win_cmpl_hook(MPIR_Win * win) + { + int ret; +@@ -816,19 +543,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rma_op_cs_exit_hook(MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_win_set_info(win, info); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_shared_query(MPIR_Win * win, int rank, + MPI_Aint * size, int *disp_unit, + void *baseptr) +@@ -954,19 +668,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_unlock(int rank, MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_win_get_info(win, info_p_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_get(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -985,19 +686,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_get(void *origin_addr, int origin_cou + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_win_free(win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_fence(int assert, MPIR_Win * win) + { + int ret; +@@ -1011,22 +699,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_fence(int assert, MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); +- +- ret = +- MPIDI_SHM_native_src_funcs.mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -1046,36 +718,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_accumulate(const void *origin_addr, i + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_win_attach(win, base, size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, +- base_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rput(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -1109,19 +751,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_flush_local(int rank, MPIR_Win * + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_win_detach(win, base); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, +@@ -1202,21 +831,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_fetch_and_op(const void *origin_addr, + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate(MPI_Aint size, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm, +- void *baseptr, MPIR_Win ** win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_flush(int rank, MPIR_Win * win) + { + int ret; +@@ -1256,20 +870,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_unlock_all(MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_win_create_dynamic(info, comm, win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rget(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -2164,58 +1764,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iscatterv(const void *sendbuf, const + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_type_commit_hook(MPIR_Datatype * datatype_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_TYPE_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_TYPE_CREATE_HOOK); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_type_commit_hook(datatype_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_TYPE_CREATE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_type_free_hook(MPIR_Datatype * datatype_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_type_free_hook(datatype_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_TYPE_FREE_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_op_commit_hook(MPIR_Op * op_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_op_commit_hook(op_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OP_COMMIT_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_op_free_hook(MPIR_Op * op_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); +- +- ret = MPIDI_SHM_native_src_funcs.mpi_op_free_hook(op_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_OP_FREE_HOOK); +- return ret; +-} +- + #endif /* SHM_DISABLE_INLINES */ + + #else +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/shm_init.c +@@ -0,0 +1,49 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ */ ++ ++#include "mpidimpl.h" ++#include "shm_noinline.h" ++#include "../posix/posix_noinline.h" ++ ++int MPIDI_SHMI_mpi_init_hook(int rank, int size, int *n_vcis_provided, int *tag_bits) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_INIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_INIT_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_init_hook(rank, size, n_vcis_provided, tag_bits); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_INIT_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_finalize_hook(void) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_FINALIZE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_FINALIZE_HOOK); ++ ++ ret = MPIDI_POSIX_mpi_finalize_hook(); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_FINALIZE_HOOK); ++ return ret; ++} ++ ++int MPIDI_SHMI_get_vci_attr(int vci) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_QUERY_VCI); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_QUERY_VCI); ++ ++ ret = MPIDI_POSIX_get_vci_attr(vci); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_QUERY_VCI); ++ return ret; ++} +--- a/src/mpid/ch4/shm/src/shm_init.h ++++ b/src/mpid/ch4/shm/src/shm_init.h +@@ -11,47 +11,7 @@ + #include + #include "../posix/shm_inline.h" + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_init_hook(int rank, int size, int *n_vnis_provided, +- int *tag_bits) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); +- +- ret = MPIDI_POSIX_mpi_init_hook(rank, size, n_vnis_provided, tag_bits); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_INIT_HOOK); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_finalize_hook(void) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); +- +- ret = MPIDI_POSIX_mpi_finalize_hook(); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_FINALIZE_HOOK); +- return ret; +-} +- +-static inline int MPIDI_SHM_get_vni_attr(int vni) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_QUERY_VNI); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_QUERY_VNI); +- +- ret = MPIDI_POSIX_get_vni_attr(vni); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_QUERY_VNI); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int vni, int blocking) ++MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int vci, int blocking) + { + int ret; + +--- a/src/mpid/ch4/shm/src/shm_inline.h ++++ b/src/mpid/ch4/shm/src/shm_inline.h +@@ -13,13 +13,14 @@ + + #include "shm_am.h" + #include "shm_coll.h" +-#include "shm_dpm.h" + #include "shm_hooks.h" + #include "shm_init.h" +-#include "shm_mem.h" + #include "shm_misc.h" + #include "shm_p2p.h" + #include "shm_startall.h" + #include "shm_rma.h" + ++/* Not-inlined shm functions */ ++#include "shm_noinline.h" ++ + #endif /* SHM_INLINE_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/shm_mem.c +@@ -0,0 +1,36 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ */ ++ ++#include "mpidimpl.h" ++#include "shm_noinline.h" ++#include "../posix/posix_noinline.h" ++ ++void *MPIDI_SHMI_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ void *ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_ALLOC_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_ALLOC_MEM); ++ ++ ret = MPIDI_POSIX_mpi_alloc_mem(size, info_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_ALLOC_MEM); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_free_mem(void *ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_FREE_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_FREE_MEM); ++ ++ ret = MPIDI_POSIX_mpi_free_mem(ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_FREE_MEM); ++ return ret; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/src/shm_mem.h ++++ /dev/null +@@ -1,40 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- */ +- +-#ifndef SHM_MEM_H_INCLUDED +-#define SHM_MEM_H_INCLUDED +- +-#include +-#include "../posix/shm_inline.h" +- +-MPL_STATIC_INLINE_PREFIX void *MPIDI_SHM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- void *ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); +- +- ret = MPIDI_POSIX_mpi_alloc_mem(size, info_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_ALLOC_MEM); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_free_mem(void *ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); +- +- ret = MPIDI_POSIX_mpi_free_mem(ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_FREE_MEM); +- return ret; +-} +- +-#endif /* SHM_MEM_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/shm_misc.c +@@ -0,0 +1,50 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ */ ++ ++#include "mpidimpl.h" ++#include "shm_noinline.h" ++#include "../posix/posix_noinline.h" ++ ++int MPIDI_SHMI_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_GET_LOCAL_UPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_GET_LOCAL_UPIDS); ++ ++ ret = MPIDI_POSIX_get_local_upids(comm, local_upid_size, local_upids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_GET_LOCAL_UPIDS); ++ return ret; ++} ++ ++int MPIDI_SHMI_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_UPIDS_TO_LUPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_UPIDS_TO_LUPIDS); ++ ++ ret = MPIDI_POSIX_upids_to_lupids(size, remote_upid_size, remote_upids, remote_lupids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_UPIDS_TO_LUPIDS); ++ return ret; ++} ++ ++int MPIDI_SHMI_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_CREATE_INTERCOMM_FROM_LPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_CREATE_INTERCOMM_FROM_LPIDS); ++ ++ ret = MPIDI_POSIX_create_intercomm_from_lpids(newcomm_ptr, size, lpids); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_CREATE_INTERCOMM_FROM_LPIDS); ++ return ret; ++} +--- a/src/mpid/ch4/shm/src/shm_misc.h ++++ b/src/mpid/ch4/shm/src/shm_misc.h +@@ -25,72 +25,4 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_get_lpid(MPIR_Comm * comm_ptr, int i + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_node_id(MPIR_Comm * comm, int rank, int *id_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_GET_NODE_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_GET_NODE_ID); +- +- ret = MPIDI_POSIX_get_node_id(comm, rank, id_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_GET_NODE_ID); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_max_node_id(MPIR_Comm * comm, int *max_id_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_GET_MAX_NODE_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_GET_MAX_NODE_ID); +- +- ret = MPIDI_POSIX_get_max_node_id(comm, max_id_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_GET_MAX_NODE_ID); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); +- +- ret = MPIDI_POSIX_get_local_upids(comm, local_upid_size, local_upids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_GET_LOCAL_UPIDS); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_upids_to_lupids(int size, size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); +- +- ret = MPIDI_POSIX_upids_to_lupids(size, remote_upid_size, remote_upids, remote_lupids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_UPIDS_TO_LUPIDS); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); +- +- ret = MPIDI_POSIX_create_intercomm_from_lpids(newcomm_ptr, size, lpids); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_CREATE_INTERCOMM_FROM_LPIDS); +- return ret; +-} +- + #endif /* SHM_MISC_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/shm_noinline.h +@@ -0,0 +1,97 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef SHM_NOINLINE_H_INCLUDED ++#define SHM_NOINLINE_H_INCLUDED ++ ++#include "shm_impl.h" ++ ++int MPIDI_SHMI_mpi_init_hook(int rank, int size, int *n_vcis_provided, int *tag_bits); ++int MPIDI_SHMI_mpi_finalize_hook(void); ++int MPIDI_SHMI_get_vci_attr(int vci); ++ ++int MPIDI_SHMI_mpi_comm_create_hook(MPIR_Comm * comm); ++int MPIDI_SHMI_mpi_comm_free_hook(MPIR_Comm * comm); ++int MPIDI_SHMI_mpi_type_commit_hook(MPIR_Datatype * type); ++int MPIDI_SHMI_mpi_type_free_hook(MPIR_Datatype * type); ++int MPIDI_SHMI_mpi_op_commit_hook(MPIR_Op * op); ++int MPIDI_SHMI_mpi_op_free_hook(MPIR_Op * op); ++int MPIDI_SHMI_mpi_win_create_hook(MPIR_Win * win); ++int MPIDI_SHMI_mpi_win_allocate_hook(MPIR_Win * win); ++int MPIDI_SHMI_mpi_win_allocate_shared_hook(MPIR_Win * win); ++int MPIDI_SHMI_mpi_win_create_dynamic_hook(MPIR_Win * win); ++int MPIDI_SHMI_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_SHMI_mpi_win_detach_hook(MPIR_Win * win, const void *base); ++int MPIDI_SHMI_mpi_win_free_hook(MPIR_Win * win); ++ ++int MPIDI_SHMI_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr); ++int MPIDI_SHMI_mpi_comm_disconnect(MPIR_Comm * comm_ptr); ++int MPIDI_SHMI_mpi_open_port(MPIR_Info * info_ptr, char *port_name); ++int MPIDI_SHMI_mpi_close_port(const char *port_name); ++int MPIDI_SHMI_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr); ++ ++int MPIDI_SHMI_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); ++int MPIDI_SHMI_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); ++int MPIDI_SHMI_mpi_win_free(MPIR_Win ** win_ptr); ++int MPIDI_SHMI_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); ++int MPIDI_SHMI_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_SHMI_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr); ++int MPIDI_SHMI_mpi_win_detach(MPIR_Win * win, const void *base); ++int MPIDI_SHMI_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win); ++int MPIDI_SHMI_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win); ++ ++int MPIDI_SHMI_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids); ++int MPIDI_SHMI_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids); ++int MPIDI_SHMI_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]); ++ ++void *MPIDI_SHMI_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDI_SHMI_mpi_free_mem(void *ptr); ++ ++#ifdef SHM_INLINE ++#define MPIDI_SHM_mpi_init_hook MPIDI_SHMI_mpi_init_hook ++#define MPIDI_SHM_mpi_finalize_hook MPIDI_SHMI_mpi_finalize_hook ++#define MPIDI_SHM_get_vci_attr MPIDI_SHMI_get_vci_attr ++#define MPIDI_SHM_mpi_comm_create_hook MPIDI_SHMI_mpi_comm_create_hook ++#define MPIDI_SHM_mpi_comm_free_hook MPIDI_SHMI_mpi_comm_free_hook ++#define MPIDI_SHM_mpi_type_commit_hook MPIDI_SHMI_mpi_type_commit_hook ++#define MPIDI_SHM_mpi_type_free_hook MPIDI_SHMI_mpi_type_free_hook ++#define MPIDI_SHM_mpi_op_commit_hook MPIDI_SHMI_mpi_op_commit_hook ++#define MPIDI_SHM_mpi_op_free_hook MPIDI_SHMI_mpi_op_free_hook ++#define MPIDI_SHM_mpi_win_create_hook MPIDI_SHMI_mpi_win_create_hook ++#define MPIDI_SHM_mpi_win_allocate_hook MPIDI_SHMI_mpi_win_allocate_hook ++#define MPIDI_SHM_mpi_win_allocate_shared_hook MPIDI_SHMI_mpi_win_allocate_shared_hook ++#define MPIDI_SHM_mpi_win_create_dynamic_hook MPIDI_SHMI_mpi_win_create_dynamic_hook ++#define MPIDI_SHM_mpi_win_attach_hook MPIDI_SHMI_mpi_win_attach_hook ++#define MPIDI_SHM_mpi_win_detach_hook MPIDI_SHMI_mpi_win_detach_hook ++#define MPIDI_SHM_mpi_win_free_hook MPIDI_SHMI_mpi_win_free_hook ++#define MPIDI_SHM_mpi_comm_connect MPIDI_SHMI_mpi_comm_connect ++#define MPIDI_SHM_mpi_comm_disconnect MPIDI_SHMI_mpi_comm_disconnect ++#define MPIDI_SHM_mpi_open_port MPIDI_SHMI_mpi_open_port ++#define MPIDI_SHM_mpi_close_port MPIDI_SHMI_mpi_close_port ++#define MPIDI_SHM_mpi_comm_accept MPIDI_SHMI_mpi_comm_accept ++#define MPIDI_SHM_mpi_win_set_info MPIDI_SHMI_mpi_win_set_info ++#define MPIDI_SHM_mpi_win_get_info MPIDI_SHMI_mpi_win_get_info ++#define MPIDI_SHM_mpi_win_free MPIDI_SHMI_mpi_win_free ++#define MPIDI_SHM_mpi_win_create MPIDI_SHMI_mpi_win_create ++#define MPIDI_SHM_mpi_win_attach MPIDI_SHMI_mpi_win_attach ++#define MPIDI_SHM_mpi_win_allocate_shared MPIDI_SHMI_mpi_win_allocate_shared ++#define MPIDI_SHM_mpi_win_detach MPIDI_SHMI_mpi_win_detach ++#define MPIDI_SHM_mpi_win_allocate MPIDI_SHMI_mpi_win_allocate ++#define MPIDI_SHM_mpi_win_create_dynamic MPIDI_SHMI_mpi_win_create_dynamic ++#define MPIDI_SHM_get_local_upids MPIDI_SHMI_get_local_upids ++#define MPIDI_SHM_upids_to_lupids MPIDI_SHMI_upids_to_lupids ++#define MPIDI_SHM_create_intercomm_from_lpids MPIDI_SHMI_create_intercomm_from_lpids ++#define MPIDI_SHM_mpi_alloc_mem MPIDI_SHMI_mpi_alloc_mem ++#define MPIDI_SHM_mpi_free_mem MPIDI_SHMI_mpi_free_mem ++#endif ++ ++#endif +--- a/src/mpid/ch4/shm/src/shm_p2p.h ++++ b/src/mpid/ch4/shm/src/shm_p2p.h +@@ -5,6 +5,12 @@ + * + */ + ++/* ++ * In this file, we directly call the POSIX shared memory module all the time. In the future, this ++ * code could have some logic to call other modules in certain circumstances (e.g. XPMEM for large ++ * messages and POSIX for small messages). ++ */ ++ + #ifndef SHM_P2P_H_INCLUDED + #define SHM_P2P_H_INCLUDED + +@@ -48,6 +54,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ssend(const void *buf, MPI_Aint count + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { + int ret; +@@ -55,7 +62,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send_init(const void *buf, int count, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_SEND_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_SEND_INIT); + +- ret = MPIDI_POSIX_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, request); ++ ret = MPIDI_POSIX_mpi_send_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_SEND_INIT); + return ret; +@@ -64,6 +72,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_send_init(const void *buf, int count, + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ssend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { + int ret; +@@ -71,8 +80,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ssend_init(const void *buf, int count + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_SSEND_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_SSEND_INIT); + +- ret = MPIDI_POSIX_mpi_ssend_init(buf, count, datatype, rank, tag, comm, +- context_offset, request); ++ ret = MPIDI_POSIX_mpi_ssend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_SSEND_INIT); + return ret; +@@ -81,6 +90,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ssend_init(const void *buf, int count + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rsend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { + int ret; +@@ -88,8 +98,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rsend_init(const void *buf, int count + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_RSEND_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_RSEND_INIT); + +- ret = MPIDI_POSIX_mpi_rsend_init(buf, count, datatype, rank, tag, comm, +- context_offset, request); ++ ret = MPIDI_POSIX_mpi_rsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_RSEND_INIT); + return ret; +@@ -98,6 +108,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rsend_init(const void *buf, int count + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_bsend_init(const void *buf, int count, + MPI_Datatype datatype, int rank, int tag, + MPIR_Comm * comm, int context_offset, ++ MPIDI_av_entry_t * addr, + MPIR_Request ** request) + { + int ret; +@@ -105,8 +116,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_bsend_init(const void *buf, int count + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_BSEND_INIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_BSEND_INIT); + +- ret = MPIDI_POSIX_mpi_bsend_init(buf, count, datatype, rank, tag, comm, +- context_offset, request); ++ ret = MPIDI_POSIX_mpi_bsend_init(buf, count, datatype, rank, tag, comm, context_offset, addr, ++ request); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_BSEND_INIT); + return ret; +@@ -208,14 +219,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_irecv(void *buf, MPI_Aint count, MPI_ + } + + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_imrecv(void *buf, MPI_Aint count, MPI_Datatype datatype, +- MPIR_Request * message, MPIR_Request ** rreqp) ++ MPIR_Request * message) + { + int ret; + + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_IMRECV); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_IMRECV); + +- ret = MPIDI_POSIX_mpi_imrecv(buf, count, datatype, message, rreqp); ++ ret = MPIDI_POSIX_mpi_imrecv(buf, count, datatype, message); + + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_IMRECV); + return ret; +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/shm_rma.c +@@ -0,0 +1,130 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpidimpl.h" ++#include "shm_noinline.h" ++#include "../posix/posix_noinline.h" ++ ++int MPIDI_SHMI_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_SET_INFO); ++ ++ ret = MPIDI_POSIX_mpi_win_set_info(win, info); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_SET_INFO); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_GET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_GET_INFO); ++ ++ ret = MPIDI_POSIX_mpi_win_get_info(win, info_p_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_GET_INFO); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_FREE); ++ ++ ret = MPIDI_POSIX_mpi_win_free(win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_FREE); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE); ++ ++ ret = MPIDI_POSIX_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_ATTACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_ATTACH); ++ ++ ret = MPIDI_POSIX_mpi_win_attach(win, base, size); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_ATTACH); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_SHARED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_SHARED); ++ ++ ret = MPIDI_POSIX_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, ++ base_ptr, win_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE_SHARED); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_DETACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_DETACH); ++ ++ ret = MPIDI_POSIX_mpi_win_detach(win, base); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_DETACH); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE); ++ ++ ret = MPIDI_POSIX_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_ALLOCATE); ++ return ret; ++} ++ ++int MPIDI_SHMI_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_DYNAMIC); ++ ++ ret = MPIDI_POSIX_mpi_win_create_dynamic(info, comm, win); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHMI_MPI_WIN_CREATE_DYNAMIC); ++ return ret; ++} +--- a/src/mpid/ch4/shm/src/shm_rma.h ++++ b/src/mpid/ch4/shm/src/shm_rma.h +@@ -11,19 +11,6 @@ + #include + #include "../posix/shm_inline.h" + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); +- +- ret = MPIDI_POSIX_mpi_win_set_info(win, info); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_SET_INFO); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_shared_query(MPIR_Win * win, int rank, + MPI_Aint * size, int *disp_unit, + void *baseptr) +@@ -148,19 +135,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_unlock(int rank, MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); +- +- ret = MPIDI_POSIX_mpi_win_get_info(win, info_p_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_GET_INFO); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_get(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -178,19 +152,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_get(void *origin_addr, int origin_cou + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); +- +- ret = MPIDI_POSIX_mpi_win_free(win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_FREE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_fence(int assert, MPIR_Win * win) + { + int ret; +@@ -204,21 +165,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_fence(int assert, MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); +- +- ret = MPIDI_POSIX_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_accumulate(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -238,36 +184,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_accumulate(const void *origin_addr, i + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); +- +- ret = MPIDI_POSIX_mpi_win_attach(win, base, size); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ATTACH); +- return ret; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); +- +- ret = MPIDI_POSIX_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, +- base_ptr, win_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE_SHARED); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rput(const void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +@@ -299,19 +215,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_flush_local(int rank, MPIR_Win * + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); +- +- ret = MPIDI_POSIX_mpi_win_detach(win, base); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_DETACH); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, +@@ -392,21 +295,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_fetch_and_op(const void *origin_addr, + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_allocate(MPI_Aint size, int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm, +- void *baseptr, MPIR_Win ** win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); +- +- ret = MPIDI_POSIX_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_ALLOCATE); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_flush(int rank, MPIR_Win * win) + { + int ret; +@@ -446,20 +334,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_unlock_all(MPIR_Win * win) + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); +- +- ret = MPIDI_POSIX_mpi_win_create_dynamic(info, comm, win); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_MPI_WIN_CREATE_DYNAMIC); +- return ret; +-} +- + MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_rget(void *origin_addr, int origin_count, + MPI_Datatype origin_datatype, int target_rank, + MPI_Aint target_disp, int target_count, +--- a/src/mpid/ch4/shm/src/shm_startall.h ++++ b/src/mpid/ch4/shm/src/shm_startall.h +@@ -27,4 +27,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_startall(int count, MPIR_Request * re + return ret; + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_prequest_free_hook(MPIR_Request * request) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SHM_PREQUEST_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SHM_PREQUEST_FREE_HOOK); ++ ++ MPIDI_POSIX_prequest_free_hook(request); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SHM_PREQUEST_FREE_HOOK); ++} ++ + #endif /* SHM_STARTALL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/topotree.c +@@ -0,0 +1,655 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++#include "treealgo.h" ++#include "topotree_types.h" ++#include "topotree_util.h" ++#include "topotree.h" ++ ++#include ++#include ++#include ++ ++/* This function allocates and generates a template_tree based on k_val and right_skewed for ++ * max_ranks. ++ * */ ++int MPIDI_SHM_create_template_tree(MPIDI_SHM_topotree_t * template_tree, int k_val, ++ bool right_skewed, int max_ranks, MPIR_Errflag_t * errflag) ++{ ++ int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; ++ int i, j, child_id, child_idx; ++ ++ mpi_errno = MPIDI_SHM_topotree_allocate(template_tree, max_ranks, k_val); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ for (i = 0; i < max_ranks; ++i) { ++ MPIDI_SHM_TOPOTREE_PARENT(template_tree, i) = ceilf(i / (float) (k_val)) - 1; ++ MPIDI_SHM_TOPOTREE_NUM_CHILD(template_tree, i) = 0; ++ if (!right_skewed) { ++ for (j = 0; j < k_val; ++j) { ++ child_id = i * k_val + 1 + j; ++ if (child_id < max_ranks) { ++ child_idx = MPIDI_SHM_TOPOTREE_NUM_CHILD(template_tree, i)++; ++ MPIDI_SHM_TOPOTREE_CHILD(template_tree, i, child_idx) = child_id; ++ } ++ } ++ } else if (right_skewed) { ++ for (j = k_val - 1; j >= 0; --j) { ++ child_id = i * k_val + 1 + j; ++ if (child_id < max_ranks) { ++ child_idx = MPIDI_SHM_TOPOTREE_NUM_CHILD(template_tree, i)++; ++ MPIDI_SHM_TOPOTREE_CHILD(template_tree, i, child_idx) = child_id; ++ } ++ } ++ } ++ } ++ MPIDI_SHM_TOPOTREE_PARENT(template_tree, 0) = -1; ++ ++ if (MPIDI_SHM_TOPOTREE_DEBUG) { ++ fprintf(stderr, "TemplateTree, %d\n", max_ranks); ++ MPIDI_SHM_print_topotree("TemplateTree", template_tree); ++ for (i = 0; i < max_ranks; ++i) { ++ fprintf(stderr, "TemplateR, %d, P=%d, C=%d, [", i, ++ MPIDI_SHM_TOPOTREE_PARENT(template_tree, i), ++ MPIDI_SHM_TOPOTREE_NUM_CHILD(template_tree, i)); ++ for (j = 0; j < MPIDI_SHM_TOPOTREE_NUM_CHILD(template_tree, i); ++j) { ++ fprintf(stderr, "%d, ", MPIDI_SHM_TOPOTREE_CHILD(template_tree, i, j)); ++ } ++ fprintf(stderr, "]\n"); ++ } ++ } ++ /* template tree is ready here */ ++ return mpi_errno; ++} ++ ++/* This function initializes the bind_map data structure with the binding information from all ++ * the ranks that have copied their cpu-affinity information into the shared memory region. ++ * */ ++void MPIDI_SHM_hwloc_init_bindmap(int num_ranks, int topo_depth, int *shared_region, int **bind_map) ++{ ++ int i, level; ++ unsigned int num_obj, curr_obj; ++ ++ hwloc_cpuset_t hwloc_cpuset = hwloc_bitmap_alloc(); ++ /* STEP 3.1. Collect the binding information from hwloc for all ranks */ ++ for (i = 0; i < num_ranks; ++i) { ++ cpu_set_t t = ((cpu_set_t *) (shared_region))[i]; ++ hwloc_cpuset_from_glibc_sched_affinity(MPIR_Process.hwloc_topology, hwloc_cpuset, &t, ++ sizeof(t)); ++ /* HWLOC_OBJ_PU is the smallest unit of computation. We would like to get all the ++ * affinity information for each rank */ ++ num_obj = ++ hwloc_get_nbobjs_inside_cpuset_by_type(MPIR_Process.hwloc_topology, hwloc_cpuset, ++ HWLOC_OBJ_PU); ++ /* Go over all objects, and if it is bound to more than one PU at that level, set it ++ * to -1, otherwise update to the binding*/ ++ for (curr_obj = 0; curr_obj < num_obj; ++curr_obj) { ++ hwloc_obj_t obj = ++ hwloc_get_obj_inside_cpuset_by_type(MPIR_Process.hwloc_topology, hwloc_cpuset, ++ HWLOC_OBJ_PU, curr_obj); ++ level = 0; ++ do { ++ /* If binding was not set, or is same as previous binding, update. ++ * Note that we use logical indices from hwloc instead of physical indices ++ * because logical indices are more portable - see hwloc documentation*/ ++ if (bind_map[i][level] == 0 || bind_map[i][level] == obj->logical_index) { ++ bind_map[i][level] = obj->logical_index; ++ } else { ++ /* If rank is bound to different PUs at that level, we set to -1 */ ++ bind_map[i][level] = -1; ++ } ++ level++; ++ } while ((obj = obj->parent)); ++ } ++ } ++ hwloc_bitmap_free(hwloc_cpuset); ++} ++ ++/* This function copies the tree present in shared_region into the my_tree data structure for rank. ++ * Doesn't perform any direct allocation, but utarray_new is called to allocate space for children ++ * in my_tree. ++ * */ ++void MPIDI_SHM_copy_tree(int *shared_region, int num_ranks, int rank, ++ MPIR_Treealgo_tree_t * my_tree, int *topotree_fail) ++{ ++ int c; ++ int *parent_ptr = shared_region; ++ int *child_ctr = &shared_region[num_ranks]; ++ int *children = &shared_region[num_ranks + num_ranks + 1]; ++ int parent = parent_ptr[rank]; ++ int num_children = child_ctr[rank + 1] - child_ctr[rank]; ++ int *my_children = &children[child_ctr[rank]]; ++ ++ my_tree->parent = parent; ++ my_tree->num_children = 0; ++ my_tree->rank = rank; ++ my_tree->nranks = num_ranks; ++ utarray_new(my_tree->children, &ut_int_icd, MPL_MEM_COLL); ++ utarray_reserve(my_tree->children, num_children, MPL_MEM_COLL); ++ char str[1024], tmp[128]; ++ sprintf(str, "----**Rank %d, Parent, %d, Child(%d)[", rank, parent, num_children); ++ for (c = 0; c < num_children; ++c) { ++ utarray_push_back(my_tree->children, &my_children[c], MPL_MEM_COLL); ++ if (my_children[c] == 0) { ++ *topotree_fail = 1; ++ } ++ sprintf(tmp, "%d, ", my_children[c]); ++ strcat(str, tmp); ++ my_tree->num_children++; ++ } ++ if (MPIDI_SHM_TOPOTREE_DEBUG) ++ fprintf(stderr, "%s]\n", str); ++} ++ ++/* This function returns the topology level where we will break the tree into a package_leaders ++ * and a per_package tree. If needed MPIDI_SHM_TOPOTREE_CUTOFF can be modified to the level where this cutoff ++ * should happen. Note, this function also fills out max_entries_per_level, which is needed in other ++ * functions. ++ * */ ++int MPIDI_SHM_topotree_get_package_level(int topo_depth, int *max_entries_per_level, int num_ranks, ++ int **bind_map) ++{ ++ int lvl, i, socket_level; ++ ++ for (lvl = 0; lvl < topo_depth; ++lvl) { ++ max_entries_per_level[lvl] = -1; ++ for (i = 0; i < num_ranks; ++i) { ++ max_entries_per_level[lvl] = ++ (max_entries_per_level[lvl] > ++ bind_map[i][lvl] + 1) ? max_entries_per_level[lvl] : bind_map[i][lvl] + 1; ++ } ++ } ++ /* STEP 3.3. Determine the package level based on first level (top-down) with #nodes >1 */ ++ socket_level = topo_depth; ++ { ++ for (i = topo_depth - 1; i >= 0; --i) { ++ if (max_entries_per_level[i] > 1) { ++ socket_level = i; ++ break; ++ } ++ } ++ ++ } ++ /* indicates the package level in topology */ ++ if (MPIDI_SHM_TOPOTREE_DEBUG) ++ fprintf(stderr, "Max entries per level :: %d\n", max_entries_per_level[socket_level]); ++ ++ return (MPIDI_SHM_TOPOTREE_CUTOFF == -1) ? socket_level : MPIDI_SHM_TOPOTREE_CUTOFF; ++} ++ ++/* This function generates a package level tree using the package leaders and k_val. ++ * */ ++void MPIDI_SHM_gen_package_tree(int num_packages, int k_val, MPIDI_SHM_topotree_t * package_tree, ++ int *package_leaders) ++{ ++ int i, j, parent_idx, child_id, idx; ++ if (MPIDI_SHM_TOPOTREE_DEBUG) { ++ fprintf(stderr, "Package_leaders:["); ++ for (i = 0; i < num_packages; ++i) { ++ fprintf(stderr, "%d, ", package_leaders[i]); ++ } ++ fprintf(stderr, "]\n"); ++ } ++ /* Generate a package (top-level) tree */ ++ for (i = 0; i < num_packages; ++i) { ++ if (i == 0) { ++ MPIDI_SHM_TOPOTREE_PARENT(package_tree, i) = -1; ++ } else { ++ parent_idx = floor((i - 1) / (float) (k_val)); ++ MPIDI_SHM_TOPOTREE_PARENT(package_tree, i) = package_leaders[parent_idx]; ++ } ++ MPIDI_SHM_TOPOTREE_NUM_CHILD(package_tree, i) = 0; ++ for (j = 0; j < k_val; ++j) { ++ child_id = i * k_val + 1 + j; ++ if (child_id < num_packages && package_leaders[child_id] != -1) { ++ idx = MPIDI_SHM_TOPOTREE_NUM_CHILD(package_tree, i)++; ++ MPIDI_SHM_TOPOTREE_CHILD(package_tree, i, idx) = package_leaders[child_id]; ++ } ++ } ++ } ++ if (MPIDI_SHM_TOPOTREE_DEBUG) { ++ fprintf(stderr, "PackageTree for %d packages\n", num_packages); ++ MPIDI_SHM_print_topotree("Package", package_tree); ++ } ++} ++ ++/* This function assembles the package leaders tree and per package tree into a single tree in ++ * shared memory. ++ * */ ++void MPIDI_SHM_gen_tree_sharedmemory(int *shared_region, MPIDI_SHM_topotree_t * tree, ++ MPIDI_SHM_topotree_t * package_tree, int *package_leaders, ++ int num_packages, int num_ranks, int k_val, ++ bool package_leaders_first) ++{ ++ int i, pm, j, is_package_leader; ++ int *parent_ptr = shared_region; ++ int *child_ctr = &shared_region[num_ranks]; ++ int *children = &shared_region[num_ranks + num_ranks + 1]; ++ memset(shared_region, 0, sizeof(int) * (3 * num_ranks) + 1); ++ child_ctr[0] = 0; ++ ++ for (i = 0; i < num_ranks; ++i) { ++ parent_ptr[i] = i == 0 ? -1 : MPIDI_SHM_TOPOTREE_PARENT(tree, i); ++ child_ctr[i + 1] = child_ctr[i]; ++ /* Package last as 0 means package leaders are added first before adding the per-package ++ * tree */ ++ if (package_leaders_first) { ++ /* Add children for package leaders */ ++ is_package_leader = -1; ++ for (pm = 0; pm < num_packages; ++pm) { ++ if (i == package_leaders[pm]) { ++ is_package_leader = pm; ++ } ++ } ++ if (is_package_leader != -1) { ++ for (j = 0; j < MPIDI_SHM_TOPOTREE_NUM_CHILD(package_tree, is_package_leader); ++j) { ++ children[child_ctr[i + 1]] = ++ MPIDI_SHM_TOPOTREE_CHILD(package_tree, is_package_leader, j); ++ child_ctr[i + 1]++; ++ } ++ parent_ptr[i] = MPIDI_SHM_TOPOTREE_PARENT(package_tree, is_package_leader); ++ } ++ } ++ ++ for (j = 0; j < MPIDI_SHM_TOPOTREE_NUM_CHILD(tree, i); ++j) { ++ children[child_ctr[i + 1]] = MPIDI_SHM_TOPOTREE_CHILD(tree, i, j); ++ child_ctr[i + 1]++; ++ } ++ ++ /* Package last as non-zero means package leaders are added after adding the per-package ++ * tree */ ++ if (!package_leaders_first) { ++ /* Add children for package leaders */ ++ is_package_leader = -1; ++ for (pm = 0; pm < num_packages; ++pm) { ++ if (i == package_leaders[pm]) { ++ is_package_leader = pm; ++ } ++ } ++ if (is_package_leader != -1) { ++ for (j = 0; j < MPIDI_SHM_TOPOTREE_NUM_CHILD(package_tree, is_package_leader); ++j) { ++ children[child_ctr[i + 1]] = ++ MPIDI_SHM_TOPOTREE_CHILD(package_tree, is_package_leader, j); ++ child_ctr[i + 1]++; ++ } ++ parent_ptr[i] = MPIDI_SHM_TOPOTREE_PARENT(package_tree, is_package_leader); ++ } ++ } ++ } ++ ++ if (MPIDI_SHM_TOPOTREE_DEBUG) { ++ for (i = 0; i < num_ranks; ++i) { ++ fprintf(stderr, "SRank, %d, Parent, %d, Children(%d)[", i, parent_ptr[i], ++ child_ctr[i + 1] - child_ctr[i]); ++ for (j = child_ctr[i]; j < child_ctr[i + 1]; ++j) { ++ fprintf(stderr, "%d, ", children[j]); ++ } ++ fprintf(stderr, "]\n"); ++ } ++ } ++} ++ ++/* This is the main function which generates a tree in shared memory. The tree is parameterized ++ * over the different data-structures: ++ * k_val : the tree K-value ++ * shared_region : the shared memory region where the tree will be generated ++ * max_entries_per_level : the maximum number of ranks per level ++ * ranks_per_package : the different ranks at each level ++ * max_ranks_per_package : the maximum ranks in any package ++ * package_ctr : number of ranks in each package ++ * package_level : the topology level where we cutoff the tree ++ * num_ranks : the number of ranks ++ * */ ++int MPIDI_SHM_gen_tree(int k_val, int *shared_region, int *max_entries_per_level, ++ int **ranks_per_package, int max_ranks_per_package, int *package_ctr, ++ int package_level, int num_ranks, bool package_leaders_first, ++ bool right_skewed, MPIR_Errflag_t * errflag) ++{ ++ int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; ++ int i, j, p, r, rank, idx; ++ int num_packages = max_entries_per_level[package_level]; ++ int package_count = 0; ++ MPIDI_SHM_topotree_t package_tree, tree, template_tree; ++ const int package_tree_sz = num_packages > num_ranks ? num_packages : num_ranks; ++ int *package_leaders = NULL; ++ ++ MPIR_CHKPMEM_DECL(1); ++ ++ mpi_errno = MPIDI_SHM_topotree_allocate(&tree, num_ranks, k_val); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ mpi_errno = MPIDI_SHM_topotree_allocate(&package_tree, package_tree_sz, k_val); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ MPIR_CHKPMEM_CALLOC(package_leaders, int *, num_packages * sizeof(int), mpi_errno, ++ "intra_node_package_leaders", MPL_MEM_OTHER); ++ ++ /* We pick package leaders as the first rank in each package */ ++ for (p = 0; p < max_entries_per_level[package_level]; ++p) { ++ package_leaders[p] = -1; ++ if (package_ctr[p] > 0) { ++ package_leaders[package_count++] = ranks_per_package[p][0]; ++ } ++ } ++ num_packages = package_count; ++ ++ /* STEP 4. Now use the template tree to generate the top level tree */ ++ MPIDI_SHM_gen_package_tree(num_packages, k_val, &package_tree, package_leaders); ++ /* STEP 5. Create a template tree for the ranks */ ++ mpi_errno = ++ MPIDI_SHM_create_template_tree(&template_tree, k_val, right_skewed, ++ max_ranks_per_package, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ if (MPIDI_SHM_TOPOTREE_DEBUG) { ++ for (i = 0; i < max_entries_per_level[package_level]; ++i) { ++ fprintf(stderr, "pre-Rank %d, parent %d, children=%d [", i, ++ MPIDI_SHM_TOPOTREE_PARENT(&tree, i), MPIDI_SHM_TOPOTREE_NUM_CHILD(&tree, i)); ++ for (j = 0; j < MPIDI_SHM_TOPOTREE_NUM_CHILD(&tree, i); ++j) { ++ fprintf(stderr, "%d, ", MPIDI_SHM_TOPOTREE_CHILD(&tree, i, j)); ++ } ++ fprintf(stderr, "]\n"); ++ } ++ } ++ ++ /* use the template tree to generate the tree for each rank */ ++ for (p = 0; p < max_entries_per_level[package_level]; ++p) { ++ for (r = 0; r < package_ctr[p]; ++r) { ++ rank = ranks_per_package[p][r]; ++ if (MPIDI_SHM_TOPOTREE_DEBUG) ++ fprintf(stderr, "Rank=%d, p=%d, r=%d, opt1=%d, opt2=%d\n", rank, p, r, ++ MPIDI_SHM_TOPOTREE_PARENT(&template_tree, r), ++ ranks_per_package[p][MPIDI_SHM_TOPOTREE_PARENT(&template_tree, r)]); ++ if (MPIDI_SHM_TOPOTREE_PARENT(&template_tree, r) == -1) { ++ MPIDI_SHM_TOPOTREE_PARENT(&tree, rank) = -1; ++ } else { ++ MPIDI_SHM_TOPOTREE_PARENT(&tree, rank) = ++ ranks_per_package[p][MPIDI_SHM_TOPOTREE_PARENT(&template_tree, r)]; ++ } ++ for (j = 0; j < MPIDI_SHM_TOPOTREE_NUM_CHILD(&template_tree, r); ++j) { ++ idx = MPIDI_SHM_TOPOTREE_NUM_CHILD(&tree, rank); ++ if (MPIDI_SHM_TOPOTREE_CHILD(&template_tree, r, j) < package_ctr[p]) { ++ MPIDI_SHM_TOPOTREE_NUM_CHILD(&tree, rank)++; ++ MPIDI_SHM_TOPOTREE_CHILD(&tree, rank, idx) = ++ ranks_per_package[p][MPIDI_SHM_TOPOTREE_CHILD(&template_tree, r, j)]; ++ } ++ } ++ } ++ } ++ if (MPIDI_SHM_TOPOTREE_DEBUG) { ++ char str[1024], tmp[128]; ++ for (i = 0; i < num_ranks; ++i) { ++ sprintf(str, "*BaseTreeRank %d, parent %d, children=%d [", i, ++ MPIDI_SHM_TOPOTREE_PARENT(&tree, i), MPIDI_SHM_TOPOTREE_NUM_CHILD(&tree, i)); ++ for (j = 0; j < MPIDI_SHM_TOPOTREE_NUM_CHILD(&tree, i); ++j) { ++ sprintf(tmp, "%d, ", MPIDI_SHM_TOPOTREE_CHILD(&tree, i, j)); ++ strcat(str, tmp); ++ } ++ fprintf(stderr, "%s]\n", str); ++ } ++ } ++ /* Assemble the per package tree package leaders tree and copy it to shared memory region */ ++ MPIDI_SHM_gen_tree_sharedmemory(shared_region, &tree, &package_tree, package_leaders, ++ num_packages, num_ranks, k_val, package_leaders_first); ++ MPL_free(tree.base); ++ MPL_free(package_tree.base); ++ MPL_free(template_tree.base); ++ ++ fn_exit: ++ MPIR_CHKPMEM_REAP(); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* This function produces topology aware trees for reduction and broadcasts, with different ++ * K values. This is a heavy-weight function as it allocates shared memory, generates topology ++ * information, builds a package-level tree (for package leaders), and a per-package tree. ++ * These are combined in shared memory for other ranks to read out from. ++ * */ ++int MPIDI_SHM_topology_tree_init(MPIR_Comm * comm_ptr, int root, int bcast_k, ++ MPIR_Treealgo_tree_t * bcast_tree, int *bcast_topotree_fail, ++ int reduce_k, MPIR_Treealgo_tree_t * reduce_tree, ++ int *reduce_topotree_fail, MPIR_Errflag_t * errflag) ++{ ++ int *shared_region; ++ MPL_shm_hnd_t fd; ++ int num_ranks, rank; ++ int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; ++ size_t shm_size; ++ int **bind_map = NULL; ++ int *max_entries_per_level = NULL; ++ int **ranks_per_package = NULL; ++ int *package_ctr = NULL; ++ size_t topo_depth = 0; ++ int package_level = 0, i, max_ranks_per_package = 0; ++ bool mapfail_flag = false; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_TOPOLOGY_TREE_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_TOPOLOGY_TREE_INIT); ++ ++ num_ranks = MPIR_Comm_size(comm_ptr); ++ rank = MPIR_Comm_rank(comm_ptr); ++ ++ /* Calculate the size of shared memory that would be needed */ ++ shm_size = sizeof(int) * 5 * num_ranks + num_ranks * sizeof(cpu_set_t); ++ ++ /* STEP 1. Create shared memory region for exchanging topology information (root only) */ ++ mpi_errno = MPIDIU_allocate_shm_segment(comm_ptr, shm_size, &fd, (void **) &shared_region, ++ &mapfail_flag); ++ if (mpi_errno || mapfail_flag) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ /* STEP 2. Collect cpu_sets for each rank at the root */ ++ cpu_set_t my_cpu_set; ++ CPU_ZERO(&my_cpu_set); ++ sched_getaffinity(0, sizeof(my_cpu_set), &my_cpu_set); ++ ((cpu_set_t *) (shared_region))[rank] = my_cpu_set; ++ mpi_errno = MPIR_Barrier_impl(comm_ptr, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ /* STEP 3. Root has all the cpu_set information, now build tree */ ++ if (rank == root) { ++ topo_depth = hwloc_topology_get_depth(MPIR_Process.hwloc_topology); ++ bind_map = (int **) MPL_malloc(num_ranks * sizeof(int *), MPL_MEM_OTHER); ++ MPIR_ERR_CHKANDJUMP(!bind_map, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ for (i = 0; i < num_ranks; ++i) { ++ bind_map[i] = (int *) MPL_calloc(topo_depth, sizeof(int), MPL_MEM_OTHER); ++ MPIR_ERR_CHKANDJUMP(!bind_map[i], mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ MPIDI_SHM_hwloc_init_bindmap(num_ranks, topo_depth, shared_region, bind_map); ++ /* Done building the topology information */ ++ ++ /* STEP 3.1. Count the maximum entries at each level - used for breaking the tree into ++ * intra/inter socket */ ++ max_entries_per_level = (int *) MPL_calloc(topo_depth, sizeof(size_t), MPL_MEM_OTHER); ++ MPIR_ERR_CHKANDJUMP(!max_entries_per_level, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ package_level = ++ MPIDI_SHM_topotree_get_package_level(topo_depth, max_entries_per_level, num_ranks, ++ bind_map); ++ if (MPIDI_SHM_TOPOTREE_DEBUG) ++ fprintf(stderr, "Breaking topology at :: %d (default= %d)\n", package_level, ++ MPIDI_SHM_TOPOTREE_CUTOFF); ++ ++ /* STEP 3.2. allocate space for the entries that go in each package based on hwloc info */ ++ ranks_per_package = ++ (int ++ **) MPL_malloc(max_entries_per_level[package_level] * sizeof(int *), MPL_MEM_OTHER); ++ MPIR_ERR_CHKANDJUMP(!ranks_per_package, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ package_ctr = ++ (int *) MPL_calloc(max_entries_per_level[package_level], sizeof(int), MPL_MEM_OTHER); ++ MPIR_ERR_CHKANDJUMP(!package_ctr, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ for (i = 0; i < max_entries_per_level[package_level]; ++i) { ++ package_ctr[i] = 0; ++ ranks_per_package[i] = (int *) MPL_calloc(num_ranks, sizeof(int), MPL_MEM_OTHER); ++ MPIR_ERR_CHKANDJUMP(!ranks_per_package[i], mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ /* sort the ranks into packages based on the binding information */ ++ for (i = 0; i < num_ranks; ++i) { ++ int package = bind_map[i][package_level]; ++ ranks_per_package[package][package_ctr[package]++] = i; ++ } ++ max_ranks_per_package = 0; ++ for (i = 0; i < max_entries_per_level[package_level]; ++i) { ++ max_ranks_per_package = MPL_MAX(max_ranks_per_package, package_ctr[i]); ++ } ++ /* At this point we have done the common work in extracting topology information ++ * and restructuring it to our needs. Now we generate the tree. */ ++ ++ /* For Bcast, package leaders are added before the package local ranks, and the per_package ++ * tree is left_skewed */ ++ mpi_errno = MPIDI_SHM_gen_tree(bcast_k, shared_region, max_entries_per_level, ++ ranks_per_package, max_ranks_per_package, package_ctr, ++ package_level, num_ranks, 1 /*package_leaders_first */ , ++ 0 /*left_skewed */ , errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ mpi_errno = MPIR_Barrier_impl(comm_ptr, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ ++ /* Every rank copies their tree out from shared memory */ ++ MPIDI_SHM_copy_tree(shared_region, num_ranks, rank, bcast_tree, bcast_topotree_fail); ++ if (MPIDI_SHM_TOPOTREE_DEBUG) ++ MPIDI_SHM_print_topotree_file("BCAST", comm_ptr->context_id, rank, bcast_tree); ++ ++ /* Wait until shared memory is available */ ++ mpi_errno = MPIR_Barrier_impl(comm_ptr, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ /* Generate the reduce tree */ ++ /* For Reduce, package leaders are added after the package local ranks, and the per_package ++ * tree is right_skewed (children are added in the reverse order */ ++ if (rank == root) { ++ memset(shared_region, 0, shm_size); ++ mpi_errno = MPIDI_SHM_gen_tree(reduce_k, shared_region, max_entries_per_level, ++ ranks_per_package, max_ranks_per_package, package_ctr, ++ package_level, num_ranks, 0 /*package_leaders_last */ , ++ 1 /*right_skewed */ , errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ ++ mpi_errno = MPIR_Barrier_impl(comm_ptr, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ /* each rank copy the reduce tree out */ ++ MPIDI_SHM_copy_tree(shared_region, num_ranks, rank, reduce_tree, reduce_topotree_fail); ++ ++ if (MPIDI_SHM_TOPOTREE_DEBUG) ++ MPIDI_SHM_print_topotree_file("REDUCE", comm_ptr->context_id, rank, reduce_tree); ++ /* Wait for all ranks to copy out the tree */ ++ mpi_errno = MPIR_Barrier_impl(comm_ptr, errflag); ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ /* Cleanup */ ++ if (rank == root) { ++ for (i = 0; i < max_entries_per_level[package_level]; ++i) { ++ MPL_free(ranks_per_package[i]); ++ } ++ MPL_free(ranks_per_package); ++ MPL_free(package_ctr); ++ if (MPIDI_SHM_TOPOTREE_DEBUG) ++ for (i = 0; i < topo_depth; ++i) { ++ fprintf(stderr, "Level :: %d, Max :: %d\n", i, max_entries_per_level[i]); ++ } ++ for (i = 0; i < num_ranks; ++i) { ++ MPL_free(bind_map[i]); ++ } ++ MPL_free(max_entries_per_level); ++ MPL_free(bind_map); ++ } ++ MPIDIU_destroy_shm_segment(shm_size, &fd, (void **) &shared_region); ++ ++ fn_exit: ++ if (rank == root && MPIDI_SHM_TOPOTREE_DEBUG) ++ fprintf(stderr, "Done creating tree for %d\n", num_ranks); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_TOPOLOGY_TREE_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/topotree.h +@@ -0,0 +1,46 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++#ifndef TOPOTREE_H_INCLUDED ++#define TOPOTREE_H_INCLUDED ++ ++#include "topotree_types.h" ++ ++int MPIDI_SHM_create_template_tree(MPIDI_SHM_topotree_t * template_tree, int k_val, ++ bool right_skewed, int max_ranks, MPIR_Errflag_t * eflag); ++ ++void MPIDI_SHM_hwloc_init_bindmap(int num_ranks, int topo_depth, int *shared_region, ++ int **bind_map); ++ ++void MPIDI_SHM_copy_tree(int *shared_region, int num_ranks, int rank, ++ MPIR_Treealgo_tree_t * my_tree, int *topotree_fail); ++ ++int MPIDI_SHM_topotree_get_package_level(int topo_depth, int *max_entries_per_level, int num_ranks, ++ int **bind_map); ++ ++void MPIDI_SHM_gen_package_tree(int num_packages, int k_val, MPIDI_SHM_topotree_t * package_tree, ++ int *package_leaders); ++ ++void MPIDI_SHM_gen_tree_sharedmemory(int *shared_region, MPIDI_SHM_topotree_t * tree, ++ MPIDI_SHM_topotree_t * package_tree, int *package_leaders, ++ int num_packages, int num_ranks, int k_val, ++ bool package_leaders_first); ++ ++int MPIDI_SHM_gen_tree(int k_val, int *shared_region, int *max_entries_per_level, ++ int **ranks_per_package, int max_ranks_per_package, int *package_ctr, ++ int package_level, int num_ranks, bool package_leaders_first, ++ bool right_skewed, MPIR_Errflag_t * eflag); ++ ++int MPIDI_SHM_topology_tree_init(MPIR_Comm * comm_ptr, int root, int bcast_k, ++ MPIR_Treealgo_tree_t * bcast_tree, int *bcast_topotree_fail, ++ int reduce_k, MPIR_Treealgo_tree_t * reduce_tree, ++ int *reduce_topotree_fail, MPIR_Errflag_t * eflag); ++ ++#endif /* TOPOTREE_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/topotree_types.h +@@ -0,0 +1,33 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef TOPOTREE_TYPES_H_INCLUDED ++#define TOPOTREE_TYPES_H_INCLUDED ++ ++/* Calculate tree information (parent, child) etc since it is a K-ary tree */ ++#define MPIDI_SHM_TOPOTREE_PARENT(X,i) ((X)->base[i*((X)->k+2)]) ++#define MPIDI_SHM_TOPOTREE_NUM_CHILD(X,i) ((X)->base[i*((X)->k+2)+1]) ++#define MPIDI_SHM_TOPOTREE_CHILD(X,i,c) ((X)->base[i*((X)->k+2)+2+c]) ++ ++/* -1 means that topology trees breaks as package_leaders (socket_leaders) and per_package (per ++ * socket). Tune this value if the topology aware tree needs to have the split at something other ++ * than package level. Could be needed for future machines. ++ * */ ++#define MPIDI_SHM_TOPOTREE_CUTOFF -1 ++#define MPIDI_SHM_TOPOTREE_DEBUG 0 /* Enable the logging information as well as the tree file per rank */ ++ ++typedef struct MPIDI_SHM_topotree_t { ++ int *base; ++ int k; ++ int n; ++} MPIDI_SHM_topotree_t; ++ ++#endif /* TOPOTREE_TYPES_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/topotree_util.c +@@ -0,0 +1,69 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpiimpl.h" ++#include "topotree_types.h" ++#include "topotree_util.h" ++ ++/* ++ * Utility function to print the tree structure to the console. ++ * */ ++void MPIDI_SHM_print_topotree(const char *s, MPIDI_SHM_topotree_t * t) ++{ ++ int i, j; ++ for (i = 0; i < t->n; ++i) { ++ fprintf(stderr, "%s,Tree,%d,Parent,%d,#Child,%d[", s, i, MPIDI_SHM_TOPOTREE_PARENT(t, i), ++ MPIDI_SHM_TOPOTREE_NUM_CHILD(t, i)); ++ for (j = 0; j < MPIDI_SHM_TOPOTREE_NUM_CHILD(t, i); ++j) { ++ fprintf(stderr, ",%d", MPIDI_SHM_TOPOTREE_CHILD(t, i, j)); ++ } ++ fprintf(stderr, "]\n"); ++ } ++} ++ ++/* ++ * This code generates a file per rank for the tree, which is then accumulated by the tree-vis ++ * utilit (external) and generates a single tree for visualization/debugging. ++ * */ ++void MPIDI_SHM_print_topotree_file(const char *s, int rand_val, int rank, ++ MPIR_Treealgo_tree_t * my_tree) ++{ ++ FILE *file; ++ char fname[256]; ++ int c; ++ ++ sprintf(fname, "FILE_%s_%d__%d_%d_.tree", s, rand_val, getpid(), rank); ++ file = fopen(fname, "w"); ++ if (file) { ++ fprintf(file, "Children:: "); ++ int *cptr = (int *) utarray_eltptr(my_tree->children, 0); ++ for (c = 0; c < my_tree->num_children; ++c) { ++ fprintf(file, " %d", cptr[c]); ++ } ++ fprintf(file, "\nParent:: %d", my_tree->parent); ++ fclose(file); ++ } ++} ++ ++int MPIDI_SHM_topotree_allocate(MPIDI_SHM_topotree_t * t, int n, int k) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ t->k = k; ++ t->n = n; ++ ++ t->base = (int *) (MPL_calloc((k + 2) * n, sizeof(int), MPL_MEM_OTHER)); ++ MPIR_ERR_CHKANDJUMP(!t->base, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/src/topotree_util.h +@@ -0,0 +1,20 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifndef TOPOTREE_UTIL_H_INCLUDED ++#define TOPOTREE_UTIL_H_INCLUDED ++ ++void MPIDI_SHM_print_topotree(const char *s, MPIDI_SHM_topotree_t * t); ++void MPIDI_SHM_print_topotree_file(const char *s, int rand_val, int rank, ++ MPIR_Treealgo_tree_t * my_tree); ++int MPIDI_SHM_topotree_allocate(MPIDI_SHM_topotree_t * t, int n, int k); ++ ++#endif /* TOPOTREE_UTIL_H_INCLUDED */ +--- a/src/mpid/ch4/shm/stubshm/Makefile.mk ++++ b/src/mpid/ch4/shm/stubshm/Makefile.mk +@@ -1,6 +1,10 @@ + if BUILD_SHM_STUBSHM + +-mpi_core_sources += src/mpid/ch4/shm/stubshm/globals.c ++mpi_core_sources += src/mpid/ch4/shm/stubshm/globals.c \ ++ src/mpid/ch4/shm/stubshm/stubshm_comm.c \ ++ src/mpid/ch4/shm/stubshm/stubshm_init.c \ ++ src/mpid/ch4/shm/stubshm/stubshm_spawn.c \ ++ src/mpid/ch4/shm/stubshm/stubshm_win.c + # errnames_txt_files += src/mpid/ch4/shm/stub/errnames.txt + + endif +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/stubshm/shm_noinline.h +@@ -0,0 +1,60 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef STUBSHM_NOINLINE_H_INCLUDED ++#define STUBSHM_NOINLINE_H_INCLUDED ++ ++#include "shm_impl.h" ++ ++int MPIDI_STUBSHM_mpi_init_hook(int rank, int size, int *n_vcis_provided, int *tag_bits); ++int MPIDI_STUBSHM_mpi_finalize_hook(void); ++int MPIDI_STUBSHM_get_vci_attr(int vci); ++ ++int MPIDI_STUBSHM_mpi_comm_create_hook(MPIR_Comm * comm); ++int MPIDI_STUBSHM_mpi_comm_free_hook(MPIR_Comm * comm); ++int MPIDI_STUBSHM_mpi_type_commit_hook(MPIR_Datatype * type); ++int MPIDI_STUBSHM_mpi_type_free_hook(MPIR_Datatype * type); ++int MPIDI_STUBSHM_mpi_op_commit_hook(MPIR_Op * op); ++int MPIDI_STUBSHM_mpi_op_free_hook(MPIR_Op * op); ++int MPIDI_STUBSHM_mpi_win_create_hook(MPIR_Win * win); ++int MPIDI_STUBSHM_mpi_win_allocate_hook(MPIR_Win * win); ++int MPIDI_STUBSHM_mpi_win_allocate_shared_hook(MPIR_Win * win); ++int MPIDI_STUBSHM_mpi_win_create_dynamic_hook(MPIR_Win * win); ++int MPIDI_STUBSHM_mpi_win_attach_hook(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_STUBSHM_mpi_win_detach_hook(MPIR_Win * win, const void *base); ++int MPIDI_STUBSHM_mpi_win_free_hook(MPIR_Win * win); ++ ++int MPIDI_STUBSHM_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr); ++int MPIDI_STUBSHM_mpi_comm_disconnect(MPIR_Comm * comm_ptr); ++int MPIDI_STUBSHM_mpi_open_port(MPIR_Info * info_ptr, char *port_name); ++int MPIDI_STUBSHM_mpi_close_port(const char *port_name); ++int MPIDI_STUBSHM_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr); ++ ++int MPIDI_STUBSHM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); ++int MPIDI_STUBSHM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); ++int MPIDI_STUBSHM_mpi_win_free(MPIR_Win ** win_ptr); ++int MPIDI_STUBSHM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); ++int MPIDI_STUBSHM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDI_STUBSHM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, ++ MPIR_Win ** win_ptr); ++int MPIDI_STUBSHM_mpi_win_detach(MPIR_Win * win, const void *base); ++int MPIDI_STUBSHM_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win); ++int MPIDI_STUBSHM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win); ++ ++int MPIDI_STUBSHM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids); ++int MPIDI_STUBSHM_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids); ++int MPIDI_STUBSHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]); ++ ++void *MPIDI_STUBSHM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDI_STUBSHM_mpi_free_mem(void *ptr); ++ ++#endif +--- a/src/mpid/ch4/shm/stubshm/stubshm_coll.h ++++ b/src/mpid/ch4/shm/stubshm/stubshm_coll.h +@@ -14,10 +14,6 @@ + #include "stubshm_impl.h" + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, + const void *algo_parameters_container + ATTRIBUTE((unused))) +@@ -31,10 +27,6 @@ static inline int MPIDI_STUBSHM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_bcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, + const void *algo_parameters_container ATTRIBUTE((unused))) +@@ -48,10 +40,6 @@ static inline int MPIDI_STUBSHM_mpi_bcast(void *buffer, int count, MPI_Datatype + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_allreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +@@ -67,10 +55,6 @@ static inline int MPIDI_STUBSHM_mpi_allreduce(const void *sendbuf, void *recvbuf + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -87,10 +71,6 @@ static inline int MPIDI_STUBSHM_mpi_allgather(const void *sendbuf, int sendcount + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -108,10 +88,6 @@ static inline int MPIDI_STUBSHM_mpi_allgatherv(const void *sendbuf, int sendcoun + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_gather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_gather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -128,10 +104,6 @@ static inline int MPIDI_STUBSHM_mpi_gather(const void *sendbuf, int sendcount, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_gatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_gatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -149,10 +121,6 @@ static inline int MPIDI_STUBSHM_mpi_gatherv(const void *sendbuf, int sendcount, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_scatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -169,10 +137,6 @@ static inline int MPIDI_STUBSHM_mpi_scatter(const void *sendbuf, int sendcount, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_scatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_scatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, +@@ -190,10 +154,6 @@ static inline int MPIDI_STUBSHM_mpi_scatterv(const void *sendbuf, const int *sen + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -210,10 +170,6 @@ static inline int MPIDI_STUBSHM_mpi_alltoall(const void *sendbuf, int sendcount, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_alltoallv(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +@@ -231,10 +187,6 @@ static inline int MPIDI_STUBSHM_mpi_alltoallv(const void *sendbuf, const int *se + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_alltoallw(const void *sendbuf, const int sendcounts[], + const int sdispls[], const MPI_Datatype sendtypes[], + void *recvbuf, const int recvcounts[], +@@ -252,10 +204,6 @@ static inline int MPIDI_STUBSHM_mpi_alltoallw(const void *sendbuf, const int sen + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_reduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag, +@@ -271,10 +219,6 @@ static inline int MPIDI_STUBSHM_mpi_reduce(const void *sendbuf, void *recvbuf, i + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_reduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -291,10 +235,6 @@ static inline int MPIDI_STUBSHM_mpi_reduce_scatter(const void *sendbuf, void *re + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_reduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -311,10 +251,6 @@ static inline int MPIDI_STUBSHM_mpi_reduce_scatter_block(const void *sendbuf, vo + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_scan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_scan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag, +@@ -329,10 +265,6 @@ static inline int MPIDI_STUBSHM_mpi_scan(const void *sendbuf, void *recvbuf, int + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_exscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_exscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * errflag, +@@ -348,10 +280,6 @@ static inline int MPIDI_STUBSHM_mpi_exscan(const void *sendbuf, void *recvbuf, i + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_neighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_neighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -367,10 +295,6 @@ static inline int MPIDI_STUBSHM_mpi_neighbor_allgather(const void *sendbuf, int + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_neighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_neighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -386,10 +310,6 @@ static inline int MPIDI_STUBSHM_mpi_neighbor_allgatherv(const void *sendbuf, int + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_neighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_neighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -405,10 +325,6 @@ static inline int MPIDI_STUBSHM_mpi_neighbor_alltoall(const void *sendbuf, int s + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_neighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_neighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -425,10 +341,6 @@ static inline int MPIDI_STUBSHM_mpi_neighbor_alltoallv(const void *sendbuf, cons + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_neighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_neighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], +@@ -447,10 +359,6 @@ static inline int MPIDI_STUBSHM_mpi_neighbor_alltoallw(const void *sendbuf, cons + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ineighbor_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ineighbor_allgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -465,10 +373,6 @@ static inline int MPIDI_STUBSHM_mpi_ineighbor_allgather(const void *sendbuf, int + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ineighbor_allgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ineighbor_allgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int recvcounts[], const int displs[], +@@ -484,10 +388,6 @@ static inline int MPIDI_STUBSHM_mpi_ineighbor_allgatherv(const void *sendbuf, in + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ineighbor_alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ineighbor_alltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -502,10 +402,6 @@ static inline int MPIDI_STUBSHM_mpi_ineighbor_alltoall(const void *sendbuf, int + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ineighbor_alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], + const int sdispls[], MPI_Datatype sendtype, + void *recvbuf, const int recvcounts[], +@@ -521,10 +417,6 @@ static inline int MPIDI_STUBSHM_mpi_ineighbor_alltoallv(const void *sendbuf, con + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ineighbor_alltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], + const MPI_Aint sdispls[], + const MPI_Datatype sendtypes[], +@@ -542,10 +434,6 @@ static inline int MPIDI_STUBSHM_mpi_ineighbor_alltoallw(const void *sendbuf, con + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ibarrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPI_Request * req) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_IBARRIER); +@@ -557,10 +445,6 @@ static inline int MPIDI_STUBSHM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPI_Request * + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ibcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ibcast(void *buffer, int count, MPI_Datatype datatype, + int root, MPIR_Comm * comm_ptr, MPI_Request * req) + { +@@ -573,10 +457,6 @@ static inline int MPIDI_STUBSHM_mpi_ibcast(void *buffer, int count, MPI_Datatype + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_iallgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_iallgather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -591,10 +471,6 @@ static inline int MPIDI_STUBSHM_mpi_iallgather(const void *sendbuf, int sendcoun + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_iallgatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_iallgatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -610,10 +486,6 @@ static inline int MPIDI_STUBSHM_mpi_iallgatherv(const void *sendbuf, int sendcou + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ialltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ialltoall(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, +@@ -628,10 +500,6 @@ static inline int MPIDI_STUBSHM_mpi_ialltoall(const void *sendbuf, int sendcount + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ialltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ialltoallv(const void *sendbuf, const int *sendcounts, + const int *sdispls, MPI_Datatype sendtype, + void *recvbuf, const int *recvcounts, +@@ -647,10 +515,6 @@ static inline int MPIDI_STUBSHM_mpi_ialltoallv(const void *sendbuf, const int *s + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ialltoallw +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ialltoallw(const void *sendbuf, const int *sendcounts, + const int *sdispls, const MPI_Datatype sendtypes[], + void *recvbuf, const int *recvcounts, +@@ -666,10 +530,6 @@ static inline int MPIDI_STUBSHM_mpi_ialltoallw(const void *sendbuf, const int *s + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_iexscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_iexscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPI_Request * req) +@@ -683,10 +543,6 @@ static inline int MPIDI_STUBSHM_mpi_iexscan(const void *sendbuf, void *recvbuf, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_igather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_igather(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, int recvcount, + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, +@@ -701,10 +557,6 @@ static inline int MPIDI_STUBSHM_mpi_igather(const void *sendbuf, int sendcount, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_igatherv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_igatherv(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + const int *recvcounts, const int *displs, +@@ -720,10 +572,6 @@ static inline int MPIDI_STUBSHM_mpi_igatherv(const void *sendbuf, int sendcount, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ireduce_scatter_block +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ireduce_scatter_block(const void *sendbuf, void *recvbuf, + int recvcount, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -738,10 +586,6 @@ static inline int MPIDI_STUBSHM_mpi_ireduce_scatter_block(const void *sendbuf, v + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ireduce_scatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, + const int recvcounts[], MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, +@@ -756,10 +600,6 @@ static inline int MPIDI_STUBSHM_mpi_ireduce_scatter(const void *sendbuf, void *r + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_ireduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_ireduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, int root, + MPIR_Comm * comm_ptr, MPI_Request * req) +@@ -773,10 +613,6 @@ static inline int MPIDI_STUBSHM_mpi_ireduce(const void *sendbuf, void *recvbuf, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_iallreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_iallreduce(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, + MPIR_Comm * comm_ptr, MPI_Request * req) +@@ -790,10 +626,6 @@ static inline int MPIDI_STUBSHM_mpi_iallreduce(const void *sendbuf, void *recvbu + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_iscan +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_iscan(const void *sendbuf, void *recvbuf, int count, + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + MPI_Request * req) +@@ -807,10 +639,6 @@ static inline int MPIDI_STUBSHM_mpi_iscan(const void *sendbuf, void *recvbuf, in + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_iscatter +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_iscatter(const void *sendbuf, int sendcount, + MPI_Datatype sendtype, void *recvbuf, + int recvcount, MPI_Datatype recvtype, +@@ -825,10 +653,6 @@ static inline int MPIDI_STUBSHM_mpi_iscatter(const void *sendbuf, int sendcount, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_iscatterv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIDI_STUBSHM_mpi_iscatterv(const void *sendbuf, const int *sendcounts, + const int *displs, MPI_Datatype sendtype, + void *recvbuf, int recvcount, +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/stubshm/stubshm_comm.c +@@ -0,0 +1,33 @@ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubshm_impl.h" ++ ++int MPIDI_STUBSHM_mpi_comm_create_hook(MPIR_Comm * comm) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CREATE_HOOK); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CREATE_HOOK); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_comm_free_hook(MPIR_Comm * comm) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_FREE_HOOK); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_FREE_HOOK); ++ return MPI_SUCCESS; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/stubshm/stubshm_comm.h ++++ /dev/null +@@ -1,38 +0,0 @@ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef STUBSHM_COMM_H_INCLUDED +-#define STUBSHM_COMM_H_INCLUDED +- +-#include "stubshm_impl.h" +- +-static inline int MPIDI_STUBSHM_mpi_comm_create_hook(MPIR_Comm * comm) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CREATE_HOOK); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CREATE_HOOK); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_mpi_comm_free_hook(MPIR_Comm * comm) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_FREE_HOOK); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_FREE_HOOK); +- return MPI_SUCCESS; +-} +- +- +-#endif /* STUBSHM_COMM_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/stubshm/stubshm_init.c +@@ -0,0 +1,165 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubshm_impl.h" ++ ++int MPIDI_STUBSHM_mpi_init_hook(int rank, int size, int *n_vcis_provided) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_INIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_INIT_HOOK); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_INIT_HOOK); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_get_vci_attr(int vci) ++{ ++ int ret = 0; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_QUERY_VCI); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_QUERY_VCI); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_QUERY_VCI); ++ return ret; ++} ++ ++int MPIDI_STUBSHM_mpi_finalize_hook(void) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_FINALIZE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_FINALIZE_HOOK); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_FINALIZE_HOOK); ++ return MPI_SUCCESS; ++} ++ ++void *MPIDI_STUBSHM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_ALLOC_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_ALLOC_MEM); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_ALLOC_MEM); ++ return NULL; ++} ++ ++int MPIDI_STUBSHM_mpi_free_mem(void *ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_FREE_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_FREE_MEM); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_FREE_MEM); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_get_node_id(MPIR_Comm * comm, int rank, int *id_p) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_GET_NODE_ID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_GET_NODE_ID); ++ ++ *id_p = 0; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_GET_NODE_ID); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_get_max_node_id(MPIR_Comm * comm, int *max_id_p) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_GET_MAX_NODE_ID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_GET_MAX_NODE_ID); ++ ++ *max_id_p = 0; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_GET_MAX_NODE_ID); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, char **local_upids) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_GET_LOCAL_UPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_GET_LOCAL_UPIDS); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_GET_LOCAL_UPIDS); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_UPIDS_TO_LUPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_UPIDS_TO_LUPIDS); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_UPIDS_TO_LUPIDS); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_CREATE_INTERCOMM_FROM_LPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_CREATE_INTERCOMM_FROM_LPIDS); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_CREATE_INTERCOMM_FROM_LPIDS); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_type_commit_hook(MPIR_Datatype * type) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_CREATE_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_CREATE_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_STUBSHM_mpi_type_free_hook(MPIR_Datatype * type) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_FREE_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_FREE_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_STUBSHM_mpi_op_commit_hook(MPIR_Op * op) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_OP_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_OP_CREATE_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_OP_CREATE_HOOK); ++ return mpi_errno; ++} ++ ++int MPIDI_STUBSHM_mpi_op_free_hook(MPIR_Op * op) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_OP_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_OP_FREE_HOOK); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_OP_FREE_HOOK); ++ return mpi_errno; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/stubshm/stubshm_init.h ++++ /dev/null +@@ -1,200 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef STUBSHM_INIT_H_INCLUDED +-#define STUBSHM_INIT_H_INCLUDED +- +-#include "stubshm_impl.h" +- +-static inline int MPIDI_STUBSHM_mpi_init_hook(int rank, int size, int *n_vnis_provided) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_INIT_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_INIT_HOOK); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_INIT_HOOK); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_get_vni_attr(int vni) +-{ +- int ret = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_QUERY_VNI); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_QUERY_VNI); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_QUERY_VNI); +- return ret; +-} +- +-static inline int MPIDI_STUBSHM_mpi_finalize_hook(void) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_FINALIZE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_FINALIZE_HOOK); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_FINALIZE_HOOK); +- return MPI_SUCCESS; +-} +- +-static inline void *MPIDI_STUBSHM_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_ALLOC_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_ALLOC_MEM); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_ALLOC_MEM); +- return NULL; +-} +- +-static inline int MPIDI_STUBSHM_mpi_free_mem(void *ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_FREE_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_FREE_MEM); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_FREE_MEM); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_comm_get_lpid(MPIR_Comm * comm_ptr, +- int idx, int *lpid_ptr, bool is_remote) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_COMM_GET_LPID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_COMM_GET_LPID); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_COMM_GET_LPID); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_get_node_id(MPIR_Comm * comm, int rank, int *id_p) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_GET_NODE_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_GET_NODE_ID); +- +- *id_p = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_GET_NODE_ID); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_get_max_node_id(MPIR_Comm * comm, int *max_id_p) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_GET_MAX_NODE_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_GET_MAX_NODE_ID); +- +- *max_id_p = 0; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_GET_MAX_NODE_ID); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_get_local_upids(MPIR_Comm * comm, size_t ** local_upid_size, +- char **local_upids) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_GET_LOCAL_UPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_GET_LOCAL_UPIDS); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_GET_LOCAL_UPIDS); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_upids_to_lupids(int size, +- size_t * remote_upid_size, +- char *remote_upids, int **remote_lupids) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_UPIDS_TO_LUPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_UPIDS_TO_LUPIDS); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_UPIDS_TO_LUPIDS); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_CREATE_INTERCOMM_FROM_LPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_CREATE_INTERCOMM_FROM_LPIDS); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_CREATE_INTERCOMM_FROM_LPIDS); +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_type_commit_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_STUBSHM_mpi_type_commit_hook(MPIR_Datatype * type) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_CREATE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_CREATE_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_type_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_STUBSHM_mpi_type_free_hook(MPIR_Datatype * type) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_FREE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_TYPE_FREE_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_op_commit_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_STUBSHM_mpi_op_commit_hook(MPIR_Op * op) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_OP_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_OP_CREATE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_OP_CREATE_HOOK); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_STUBSHM_mpi_op_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_STUBSHM_mpi_op_free_hook(MPIR_Op * op) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_OP_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_OP_FREE_HOOK); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_OP_FREE_HOOK); +- return mpi_errno; +-} +- +-#endif /* STUBSHM_INIT_H_INCLUDED */ +--- a/src/mpid/ch4/shm/stubshm/stubshm_pre.h ++++ b/src/mpid/ch4/shm/stubshm/stubshm_pre.h +@@ -14,11 +14,11 @@ + + typedef struct { + int dummy; +-} MPIDI_STUBSHM_am_request_t; ++} MPIDI_STUBSHM_request_t; + + typedef struct { + int dummy; +-} MPIDI_STUBSHM_request_t; ++} MPIDI_STUBSHM_am_request_t; + + typedef struct MPIDI_STUBSHM_comm_t { + int dummy; +--- a/src/mpid/ch4/shm/stubshm/stubshm_proc.h ++++ b/src/mpid/ch4/shm/stubshm/stubshm_proc.h +@@ -34,4 +34,17 @@ static inline int MPIDI_STUBSHM_av_is_local(MPIDI_av_entry_t * av) + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_AV_IS_LOCAL); + return MPI_SUCCESS; + } ++ ++static inline int MPIDI_STUBSHM_comm_get_lpid(MPIR_Comm * comm_ptr, ++ int idx, int *lpid_ptr, bool is_remote) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_COMM_GET_LPID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_COMM_GET_LPID); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_COMM_GET_LPID); ++ return MPI_SUCCESS; ++} ++ + #endif /* STUBSHM_PROC_H_INCLUDED */ +--- a/src/mpid/ch4/shm/stubshm/stubshm_progress.h ++++ b/src/mpid/ch4/shm/stubshm/stubshm_progress.h +@@ -35,7 +35,7 @@ static inline int MPIDI_STUBSHM_do_progress_send(int blocking, int *completion_c + return MPI_SUCCESS; + } + +-static inline int MPIDI_STUBSHM_progress(int vni, int blocking) ++static inline int MPIDI_STUBSHM_progress(int vci, int blocking) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_PROGRESS); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_PROGRESS); +--- a/src/mpid/ch4/shm/stubshm/stubshm_recv.h ++++ b/src/mpid/ch4/shm/stubshm/stubshm_recv.h +@@ -13,8 +13,6 @@ + + #include "stubshm_impl.h" + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_STUBSHM_mpi_recv) + static inline int MPIDI_STUBSHM_mpi_recv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -65,8 +63,6 @@ static inline int MPIDI_STUBSHM_mpi_imrecv(void *buf, + return MPI_SUCCESS; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_STUBSHM_mpi_irecv) + static inline int MPIDI_STUBSHM_mpi_irecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +--- a/src/mpid/ch4/shm/stubshm/stubshm_send.h ++++ b/src/mpid/ch4/shm/stubshm/stubshm_send.h +@@ -135,8 +135,6 @@ static inline int MPIDI_STUBSHM_mpi_rsend_init(const void *buf, + return MPI_SUCCESS; + } + +-#undef FCNAME +-#define FCNAME MPL_QUOTE(MPIDI_STUBSHM_mpi_isend) + static inline int MPIDI_STUBSHM_mpi_isend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/stubshm/stubshm_spawn.c +@@ -0,0 +1,69 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "stubshm_impl.h" ++ ++int MPIDI_STUBSHM_mpi_comm_connect(const char *port_name, MPIR_Info * info, int root, int timeout, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CONNECT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CONNECT); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_DISCONNECT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_DISCONNECT); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_OPEN_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_OPEN_PORT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_OPEN_PORT); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_close_port(const char *port_name) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_CLOSE_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_CLOSE_PORT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_CLOSE_PORT); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_comm_accept(const char *port_name, MPIR_Info * info, int root, ++ MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_ACCEPT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_ACCEPT); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_ACCEPT); ++ return MPI_SUCCESS; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/shm/stubshm/stubshm_spawn.h ++++ /dev/null +@@ -1,77 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef STUBSHM_SPAWN_H_INCLUDED +-#define STUBSHM_SPAWN_H_INCLUDED +- +-#include "stubshm_impl.h" +- +-static inline int MPIDI_STUBSHM_mpi_comm_connect(const char *port_name, +- MPIR_Info * info, +- int root, int timeout, +- MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CONNECT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_CONNECT); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_mpi_comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_DISCONNECT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_DISCONNECT); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_mpi_open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_OPEN_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_OPEN_PORT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_OPEN_PORT); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_mpi_close_port(const char *port_name) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_CLOSE_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_CLOSE_PORT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_CLOSE_PORT); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_mpi_comm_accept(const char *port_name, +- MPIR_Info * info, +- int root, MPIR_Comm * comm, +- MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_ACCEPT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_ACCEPT); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_COMM_ACCEPT); +- return MPI_SUCCESS; +-} +- +-#endif /* STUBSHM_SPAWN_H_INCLUDED */ +--- a/src/mpid/ch4/shm/stubshm/stubshm_startall.h ++++ b/src/mpid/ch4/shm/stubshm/stubshm_startall.h +@@ -25,4 +25,14 @@ static inline int MPIDI_STUBSHM_mpi_startall(int count, MPIR_Request * requests[ + return MPI_SUCCESS; + } + ++MPL_STATIC_INLINE_PREFIX void MPIDI_STUBSHM_prequest_free_hook(MPIR_Request * request) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_PREQUEST_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_PREQUEST_FREE_HOOK); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_PREQUEST_FREE_HOOK); ++} ++ + #endif /* STUBSHM_STARTALL_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/shm/stubshm/stubshm_win.c +@@ -0,0 +1,116 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2006 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++ ++int MPIDI_STUBSHM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_SET_INFO); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_SET_INFO); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_GET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_GET_INFO); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_GET_INFO); ++ return MPI_SUCCESS; ++} ++ ++ ++int MPIDI_STUBSHM_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FREE); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FREE); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ATTACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ATTACH); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ATTACH); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, ++ MPIR_Win ** win_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE_SHARED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE_SHARED); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE_SHARED); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_DETACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_DETACH); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_DETACH); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE); ++ return MPI_SUCCESS; ++} ++ ++int MPIDI_STUBSHM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE_DYNAMIC); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE_DYNAMIC); ++ return MPI_SUCCESS; ++} +--- a/src/mpid/ch4/shm/stubshm/stubshm_win.h ++++ b/src/mpid/ch4/shm/stubshm/stubshm_win.h +@@ -13,17 +13,6 @@ + + #include "stubshm_impl.h" + +-static inline int MPIDI_STUBSHM_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_SET_INFO); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_SET_INFO); +- return MPI_SUCCESS; +-} +- + + static inline int MPIDI_STUBSHM_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) + { +@@ -106,29 +95,6 @@ static inline int MPIDI_STUBSHM_mpi_win_unlock(int rank, MPIR_Win * win) + return MPI_SUCCESS; + } + +-static inline int MPIDI_STUBSHM_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_GET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_GET_INFO); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_GET_INFO); +- return MPI_SUCCESS; +-} +- +- +-static inline int MPIDI_STUBSHM_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FREE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FREE); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FREE); +- return MPI_SUCCESS; +-} +- + static inline int MPIDI_STUBSHM_mpi_win_fence(int assert, MPIR_Win * win) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FENCE); +@@ -140,58 +106,6 @@ static inline int MPIDI_STUBSHM_mpi_win_fence(int assert, MPIR_Win * win) + return MPI_SUCCESS; + } + +-static inline int MPIDI_STUBSHM_mpi_win_create(void *base, +- MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ATTACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ATTACH); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ATTACH); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_mpi_win_allocate_shared(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE_SHARED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE_SHARED); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE_SHARED); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDI_STUBSHM_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_DETACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_DETACH); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_DETACH); +- return MPI_SUCCESS; +-} +- + static inline int MPIDI_STUBSHM_mpi_win_shared_query(MPIR_Win * win, + int rank, + MPI_Aint * size, int *disp_unit, void *baseptr) +@@ -205,20 +119,6 @@ static inline int MPIDI_STUBSHM_mpi_win_shared_query(MPIR_Win * win, + return MPI_SUCCESS; + } + +-static inline int MPIDI_STUBSHM_mpi_win_allocate(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info, +- MPIR_Comm * comm, void *baseptr, MPIR_Win ** win) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_ALLOCATE); +- return MPI_SUCCESS; +-} +- + static inline int MPIDI_STUBSHM_mpi_win_flush(int rank, MPIR_Win * win) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FLUSH); +@@ -252,18 +152,6 @@ static inline int MPIDI_STUBSHM_mpi_win_unlock_all(MPIR_Win * win) + return MPI_SUCCESS; + } + +-static inline int MPIDI_STUBSHM_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE_DYNAMIC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE_DYNAMIC); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_CREATE_DYNAMIC); +- return MPI_SUCCESS; +-} +- + static inline int MPIDI_STUBSHM_mpi_win_flush_local(int rank, MPIR_Win * win) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STUBSHM_MPI_WIN_FLUSH_LOCAL); +--- a/src/mpid/ch4/src/Makefile.mk ++++ b/src/mpid/ch4/src/Makefile.mk +@@ -13,7 +13,6 @@ + AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/ch4/src + + noinst_HEADERS += src/mpid/ch4/src/ch4_comm.h \ +- src/mpid/ch4/src/ch4_init.h \ + src/mpid/ch4/src/ch4_progress.h \ + src/mpid/ch4/src/ch4_request.h \ + src/mpid/ch4/src/ch4_send.h \ +@@ -24,7 +23,6 @@ noinst_HEADERS += src/mpid/ch4/src/ch4_comm.h \ + src/mpid/ch4/src/ch4_proc.h \ + src/mpid/ch4/src/ch4_recv.h \ + src/mpid/ch4/src/ch4_rma.h \ +- src/mpid/ch4/src/ch4_spawn.h \ + src/mpid/ch4/src/ch4_win.h \ + src/mpid/ch4/src/ch4r_probe.h \ + src/mpid/ch4/src/ch4r_rma.h \ +@@ -34,12 +32,30 @@ noinst_HEADERS += src/mpid/ch4/src/ch4_comm.h \ + src/mpid/ch4/src/ch4i_comm.h \ + src/mpid/ch4/src/ch4r_recvq.h \ + src/mpid/ch4/src/ch4r_recv.h \ +- src/mpid/ch4/src/ch4i_util.h \ + src/mpid/ch4/src/ch4r_symheap.h \ + src/mpid/ch4/src/ch4r_buf.h \ ++ src/mpid/ch4/src/ch4r_callbacks.h \ ++ src/mpid/ch4/src/ch4r_rma_origin_callbacks.h \ ++ src/mpid/ch4/src/ch4r_rma_target_callbacks.h \ + src/mpid/ch4/src/ch4r_request.h + + mpi_core_sources += src/mpid/ch4/src/ch4_globals.c \ ++ src/mpid/ch4/src/ch4_impl.c \ ++ src/mpid/ch4/src/ch4_init.c \ ++ src/mpid/ch4/src/ch4_comm.c \ ++ src/mpid/ch4/src/ch4_spawn.c \ ++ src/mpid/ch4/src/ch4_win.c \ ++ src/mpid/ch4/src/ch4i_comm.c \ ++ src/mpid/ch4/src/ch4r_buf.c \ ++ src/mpid/ch4/src/ch4r_init.c \ ++ src/mpid/ch4/src/ch4r_comm.c \ ++ src/mpid/ch4/src/ch4r_proc.c \ ++ src/mpid/ch4/src/ch4r_recvq.c \ ++ src/mpid/ch4/src/ch4r_callbacks.c \ ++ src/mpid/ch4/src/ch4r_rma_origin_callbacks.c \ ++ src/mpid/ch4/src/ch4r_rma_target_callbacks.c \ ++ src/mpid/ch4/src/ch4r_symheap.c \ ++ src/mpid/ch4/src/ch4r_win.c \ + src/mpid/ch4/src/mpid_ch4_net_array.c + + if BUILD_CH4_COLL_TUNING +--- a/src/mpid/ch4/src/ch4_coll.h ++++ b/src/mpid/ch4/src/ch4_coll.h +@@ -115,6 +115,12 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allreduce(const void *sendbuf, void *recvbuf, + comm, errflag, + ch4_algo_parameters_container); + break; ++ case MPIDI_Allreduce_intra_composition_gamma_id: ++ mpi_errno = ++ MPIDI_Allreduce_intra_composition_gamma(sendbuf, recvbuf, count, datatype, op, ++ comm, errflag, ++ ch4_algo_parameters_container); ++ break; + case MPIDI_Allreduce_inter_composition_alpha_id: + mpi_errno = + MPIDI_Allreduce_inter_composition_alpha(sendbuf, recvbuf, count, datatype, op, +@@ -517,6 +523,12 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce(const void *sendbuf, void *recvbuf, + root, comm, errflag, + ch4_algo_parameters_container); + break; ++ case MPIDI_Reduce_intra_composition_gamma_id: ++ mpi_errno = ++ MPIDI_Reduce_intra_composition_gamma(sendbuf, recvbuf, count, datatype, op, ++ root, comm, errflag, ++ ch4_algo_parameters_container); ++ break; + case MPIDI_Reduce_inter_composition_alpha_id: + mpi_errno = + MPIDI_Reduce_inter_composition_alpha(sendbuf, recvbuf, count, datatype, op, +--- a/src/mpid/ch4/src/ch4_coll_containers.h ++++ b/src/mpid/ch4/src/ch4_coll_containers.h +@@ -15,6 +15,7 @@ extern const MPIDI_coll_algo_container_t MPIDI_Bcast_inter_composition_alpha_cnt + /* Reduce CH4 level containers declaration */ + extern const MPIDI_coll_algo_container_t MPIDI_Reduce_intra_composition_alpha_cnt; + extern const MPIDI_coll_algo_container_t MPIDI_Reduce_intra_composition_beta_cnt; ++extern const MPIDI_coll_algo_container_t MPIDI_Reduce_intra_composition_gamma_cnt; + extern const MPIDI_coll_algo_container_t MPIDI_Reduce_inter_composition_alpha_cnt; + + /* Allreduce CH4 level containers declaration */ +--- a/src/mpid/ch4/src/ch4_coll_globals_default.c.in ++++ b/src/mpid/ch4/src/ch4_coll_globals_default.c.in +@@ -66,7 +66,14 @@ const MPIDI_coll_algo_container_t MPIDI_Reduce_intra_composition_alpha_cnt = { + const MPIDI_coll_algo_container_t MPIDI_Reduce_intra_composition_beta_cnt = { + .id = MPIDI_Reduce_intra_composition_beta_id, + .params.ch4_reduce_params.ch4_reduce_beta = { +- .reduce = MPIDI_COLL_AUTO_SELECT} ++ .roots_reduce = MPIDI_COLL_AUTO_SELECT, ++ .node_reduce = MPIDI_COLL_AUTO_SELECT} ++}; ++ ++const MPIDI_coll_algo_container_t MPIDI_Reduce_intra_composition_gamma_cnt = { ++ .id = MPIDI_Reduce_intra_composition_gamma_id, ++ .params.ch4_reduce_params.ch4_reduce_gamma = { ++ .reduce = MPIDI_COLL_AUTO_SELECT} + }; + + const MPIDI_coll_algo_container_t MPIDI_Reduce_inter_composition_alpha_cnt = { +@@ -88,6 +95,12 @@ const MPIDI_coll_algo_container_t MPIDI_Allreduce_intra_composition_beta_cnt = { + .allreduce = MPIDI_COLL_AUTO_SELECT} + }; + ++const MPIDI_coll_algo_container_t MPIDI_Allreduce_intra_composition_gamma_cnt = { ++ .id = MPIDI_Allreduce_intra_composition_gamma_id, ++ .params.ch4_allreduce_params.ch4_allreduce_gamma = { ++ .allreduce = MPIDI_COLL_AUTO_SELECT} ++}; ++ + const MPIDI_coll_algo_container_t MPIDI_Allreduce_inter_composition_alpha_cnt = { + .id = MPIDI_Allreduce_inter_composition_alpha_id + }; +@@ -240,5 +253,7 @@ const MPIDI_coll_algo_container_t MPIDI_Exscan_intra_composition_alpha_cnt = { + + /* *INDENT-OFF* */ + @ch4_netmod_coll_globals_default@ ++#ifndef MPIDI_CH4_DIRECT_NETMOD + #include "../shm/posix/posix_coll_globals_default.c" ++#endif + /* *INDENT-ON* */ +--- a/src/mpid/ch4/src/ch4_coll_impl.h ++++ b/src/mpid/ch4/src/ch4_coll_impl.h +@@ -14,10 +14,6 @@ + #include "ch4_coll_params.h" + #include "coll_algo_params.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Barrier_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_alpha(MPIR_Comm * comm, + MPIR_Errflag_t * errflag, + const +@@ -74,10 +70,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_alpha(MPIR_Comm * c + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Barrier_intra_composition_beta +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_beta(MPIR_Comm * comm, + MPIR_Errflag_t * errflag, + const +@@ -97,10 +89,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_beta(MPIR_Comm * co + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Barrier_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_inter_composition_alpha(MPIR_Comm * comm, + MPIR_Errflag_t * errflag, + const +@@ -121,10 +109,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_inter_composition_alpha(MPIR_Comm * c + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Bcast_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_alpha(void *buffer, int count, + MPI_Datatype datatype, + int root, MPIR_Comm * comm, +@@ -178,10 +162,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_alpha(void *buffer, i + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Bcast_intra_composition_beta +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_beta(void *buffer, int count, + MPI_Datatype datatype, + int root, MPIR_Comm * comm, +@@ -242,10 +222,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_beta(void *buffer, in + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Bcast_intra_composition_gamma +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_gamma(void *buffer, int count, + MPI_Datatype datatype, + int root, MPIR_Comm * comm, +@@ -267,10 +243,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_gamma(void *buffer, i + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Bcast_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_inter_composition_alpha(void *buffer, int count, + MPI_Datatype datatype, + int root, MPIR_Comm * comm, +@@ -293,10 +265,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_inter_composition_alpha(void *buffer, i + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Allreduce_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_alpha(const void *sendbuf, + void *recvbuf, int count, + MPI_Datatype datatype, +@@ -380,10 +348,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Allreduce_intra_composition_gamma +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_beta(const void *sendbuf, + void *recvbuf, int count, + MPI_Datatype datatype, +@@ -409,10 +373,38 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_beta(const void * + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Allreduce_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) ++MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_gamma(const void *sendbuf, ++ void *recvbuf, int count, ++ MPI_Datatype datatype, ++ MPI_Op op, ++ MPIR_Comm * comm, ++ MPIR_Errflag_t * errflag, ++ const ++ MPIDI_coll_algo_container_t ++ * ++ ch4_algo_parameters_container) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ const void *allred_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = ++ MPIDI_SHM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag, ++ allred_container); ++#else ++ mpi_errno = ++ MPIDI_NM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag, ++ allred_container); ++#endif ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ + MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_inter_composition_alpha(const void *sendbuf, + void *recvbuf, int count, + MPI_Datatype datatype, +@@ -437,10 +429,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_inter_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Reduce_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *sendbuf, + void *recvbuf, int count, + MPI_Datatype datatype, +@@ -459,6 +447,100 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *se + const void *reduce_roots_container = + MPIDI_coll_get_next_container(ch4_algo_parameters_container); + const void *reduce_node_container = MPIDI_coll_get_next_container(reduce_roots_container); ++ const void *inter_sendbuf; ++ void *ori_recvbuf = recvbuf; ++ ++ MPIR_CHKLMEM_DECL(1); ++ ++ /* Create a temporary buffer on local roots of all nodes, ++ * except for root if it is also a local root */ ++ if (comm->node_roots_comm != NULL && comm->rank != root) { ++ ++ MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); ++ MPIR_Datatype_get_extent_macro(datatype, extent); ++ ++ MPIR_CHKLMEM_MALLOC(recvbuf, void *, count * (MPL_MAX(extent, true_extent)), ++ mpi_errno, "temporary buffer", MPL_MEM_BUFFER); ++ /* adjust for potential negative lower bound in datatype */ ++ recvbuf = (void *) ((char *) recvbuf - true_lb); ++ } ++ ++ /* intranode reduce on all nodes */ ++ if (comm->node_comm != NULL) { ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, 0, comm->node_comm, ++ errflag, reduce_node_container); ++#else ++ mpi_errno = MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, 0, comm->node_comm, ++ errflag, reduce_node_container); ++#endif /* MPIDI_CH4_DIRECT_NETMOD */ ++ ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ /* recvbuf becomes the sendbuf for internode reduce */ ++ inter_sendbuf = recvbuf; ++ } else { ++ inter_sendbuf = (sendbuf == MPI_IN_PLACE) ? recvbuf : sendbuf; ++ } ++ ++ /* internode reduce with rank 0 in node_roots_comm as the root */ ++ if (comm->node_roots_comm != NULL) { ++ mpi_errno = ++ MPIDI_NM_mpi_reduce(comm->node_roots_comm->rank == 0 ? MPI_IN_PLACE : inter_sendbuf, ++ recvbuf, count, datatype, op, 0, comm->node_roots_comm, errflag, ++ reduce_roots_container); ++ ++ if (mpi_errno) { ++ /* for communication errors, just record the error but continue */ ++ *errflag = ++ MPIX_ERR_PROC_FAILED == ++ MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER; ++ MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); ++ MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); ++ } ++ } ++ ++ /* Send data to root via point-to-point message if root is not rank 0 in comm */ ++ if (root != 0) { ++ if (comm->rank == 0) { ++ MPIC_Send(recvbuf, count, datatype, root, MPIR_REDUCE_TAG, comm, errflag); ++ } else if (comm->rank == root) { ++ MPIC_Recv(ori_recvbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm, MPI_STATUS_IGNORE, ++ errflag); ++ } ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sendbuf, ++ void *recvbuf, int count, ++ MPI_Datatype datatype, ++ MPI_Op op, int root, ++ MPIR_Comm * comm, ++ MPIR_Errflag_t * errflag, ++ const ++ MPIDI_coll_algo_container_t ++ * ch4_algo_parameters_container) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int mpi_errno_ret = MPI_SUCCESS; ++ MPI_Aint true_lb = 0; ++ MPI_Aint true_extent = 0; ++ MPI_Aint extent = 0; ++ const void *reduce_roots_container = ++ MPIDI_coll_get_next_container(ch4_algo_parameters_container); ++ const void *reduce_node_container = MPIDI_coll_get_next_container(reduce_roots_container); + + MPIR_CHKLMEM_DECL(1); + +@@ -470,8 +552,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *se + MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + /* adjust for potential negative lower bound in datatype */ +@@ -591,19 +671,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *se + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Reduce_intra_composition_beta +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sendbuf, +- void *recvbuf, int count, +- MPI_Datatype datatype, +- MPI_Op op, int root, +- MPIR_Comm * comm, +- MPIR_Errflag_t * errflag, +- const +- MPIDI_coll_algo_container_t +- * ch4_algo_parameters_container) ++MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_gamma(const void *sendbuf, ++ void *recvbuf, int count, ++ MPI_Datatype datatype, ++ MPI_Op op, int root, ++ MPIR_Comm * comm, ++ MPIR_Errflag_t * errflag, ++ const ++ MPIDI_coll_algo_container_t ++ * ch4_algo_parameters_container) + { + int mpi_errno = MPI_SUCCESS; + const void *reduce_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container); +@@ -620,10 +696,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sen + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Reduce_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_inter_composition_alpha(const void *sendbuf, + void *recvbuf, int count, + MPI_Datatype datatype, +@@ -648,10 +720,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_inter_composition_alpha(const void *se + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Alltoall_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -679,10 +747,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_alpha(const void * + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Alltoall_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_inter_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -710,10 +774,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_inter_composition_alpha(const void * + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Alltoallv_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallv_intra_composition_alpha(const void *sendbuf, + const int *sendcounts, + const int *sdispls, +@@ -745,10 +805,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallv_intra_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Alltoallv_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallv_inter_composition_alpha(const void *sendbuf, + const int *sendcounts, + const int *sdispls, +@@ -779,10 +835,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallv_inter_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Alltoallw_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallw_intra_composition_alpha(const void *sendbuf, + const int sendcounts[], + const int sdispls[], +@@ -816,10 +868,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallw_intra_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Alltoallw_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallw_inter_composition_alpha(const void *sendbuf, + const int sendcounts[], + const int sdispls[], +@@ -852,10 +900,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallw_inter_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Allgather_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -885,10 +929,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Allgather_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_inter_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -916,10 +956,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_inter_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Allgatherv_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Allgatherv_intra_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -950,10 +986,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgatherv_intra_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Allgatherv_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Allgatherv_inter_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -983,10 +1015,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgatherv_inter_composition_alpha(const void + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Gather_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Gather_intra_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -1013,10 +1041,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Gather_intra_composition_alpha(const void *se + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Gather_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Gather_inter_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -1043,10 +1067,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Gather_inter_composition_alpha(const void *se + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Gatherv_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Gatherv_intra_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -1075,10 +1095,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Gatherv_intra_composition_alpha(const void *s + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Gatherv_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Gatherv_inter_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -1107,10 +1123,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Gatherv_inter_composition_alpha(const void *s + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Scatter_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Scatter_intra_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -1138,10 +1150,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scatter_intra_composition_alpha(const void *s + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Scatter_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Scatter_inter_composition_alpha(const void *sendbuf, + int sendcount, + MPI_Datatype sendtype, +@@ -1170,10 +1178,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scatter_inter_composition_alpha(const void *s + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Scatterv_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Scatterv_intra_composition_alpha(const void *sendbuf, + const int *sendcounts, + const int *displs, +@@ -1202,10 +1206,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scatterv_intra_composition_alpha(const void * + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Scatterv_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Scatterv_inter_composition_alpha(const void *sendbuf, + const int *sendcounts, + const int *displs, +@@ -1234,10 +1234,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scatterv_inter_composition_alpha(const void * + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Reduce_scatter_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_inter_composition_alpha(const void *sendbuf, + void *recvbuf, + const int +@@ -1266,10 +1262,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_inter_composition_alpha(const + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Reduce_scatter_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_intra_composition_alpha(const void *sendbuf, + void *recvbuf, + const int +@@ -1300,10 +1292,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_intra_composition_alpha(const + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Reduce_scatter_block_inter_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_block_inter_composition_alpha(const void + *sendbuf, + void *recvbuf, +@@ -1334,10 +1322,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_block_inter_composition_alpha( + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Reduce_scatter_block_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_block_intra_composition_alpha(const void + *sendbuf, + void *recvbuf, +@@ -1370,10 +1354,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_block_intra_composition_alpha( + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Scan_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *sendbuf, + void *recvbuf, + int count, +@@ -1406,8 +1386,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send + + MPIR_Datatype_get_extent_macro(datatype, extent); + +- MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent)); +- + MPIR_CHKLMEM_MALLOC(tempbuf, void *, count * (MPL_MAX(extent, true_extent)), + mpi_errno, "temporary buffer", MPL_MEM_BUFFER); + tempbuf = (void *) ((char *) tempbuf - true_lb); +@@ -1545,10 +1523,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Scan_intra_composition_beta +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_beta(const void *sendbuf, + void *recvbuf, + int count, +@@ -1574,10 +1548,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_beta(const void *sendb + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Exscan_intra_composition_alpha +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Exscan_intra_composition_alpha(const void *sendbuf, + void *recvbuf, + int count, +--- a/src/mpid/ch4/src/ch4_coll_params.h ++++ b/src/mpid/ch4/src/ch4_coll_params.h +@@ -43,6 +43,7 @@ typedef union { + typedef enum { + MPIDI_Reduce_intra_composition_alpha_id, + MPIDI_Reduce_intra_composition_beta_id, ++ MPIDI_Reduce_intra_composition_gamma_id, + MPIDI_Reduce_inter_composition_alpha_id, + } MPIDI_Reduce_id_t; + +@@ -52,13 +53,18 @@ typedef union { + int roots_reduce; + } ch4_reduce_alpha; + struct MPIDI_Reduce_beta { +- int reduce; ++ int node_reduce; ++ int roots_reduce; + } ch4_reduce_beta; ++ struct MPIDI_Reduce_gamma { ++ int reduce; ++ } ch4_reduce_gamma; + } MPIDI_Reduce_params_t; + + typedef enum { + MPIDI_Allreduce_intra_composition_alpha_id, + MPIDI_Allreduce_intra_composition_beta_id, ++ MPIDI_Allreduce_intra_composition_gamma_id, + MPIDI_Allreduce_inter_composition_alpha_id, + } MPIDI_Allreduce_id_t; + +@@ -71,6 +77,9 @@ typedef union { + struct MPIDI_Allreduce_beta { + int allreduce; + } ch4_allreduce_beta; ++ struct MPIDI_Allreduce_gamma { ++ int allreduce; ++ } ch4_allreduce_gamma; + } MPIDI_Allreduce_params_t; + + typedef enum { +--- a/src/mpid/ch4/src/ch4_coll_select.h ++++ b/src/mpid/ch4/src/ch4_coll_select.h +@@ -15,8 +15,9 @@ + #include "ch4r_proc.h" + #include "ch4_coll_impl.h" + ++#ifndef MPIDI_CH4_DIRECT_NETMOD + #include "../shm/include/shm.h" +- ++#endif + + MPL_STATIC_INLINE_PREFIX const + MPIDI_coll_algo_container_t *MPIDI_Barrier_select(MPIR_Comm * comm, MPIR_Errflag_t * errflag) +@@ -77,14 +78,27 @@ MPIDI_coll_algo_container_t *MPIDI_Allreduce_select(const void *sendbuf, + int nbytes = 0; + int is_commutative = -1; + ++ /* is the op commutative? We do SMP optimizations only if it is. */ + is_commutative = MPIR_Op_is_commutative(op); ++ MPIR_Datatype_get_size_macro(datatype, type_size); ++ + if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) { + return &MPIDI_Allreduce_inter_composition_alpha_cnt; + } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (comm->node_comm != NULL && MPIR_Comm_size(comm) == MPIR_Comm_size(comm->node_comm)) { ++ /* All the ranks in comm are on the same node */ ++ if (!((count * type_size) > MPIR_CVAR_MAX_POSIX_RELEASE_GATHER_ALLREDUCE_MSG_SIZE && ++ MPIDI_POSIX_Bcast_algo_choice == MPIDI_POSIX_Bcast_intra_release_gather_id && ++ MPIDI_POSIX_Reduce_algo_choice == MPIDI_POSIX_Reduce_intra_release_gather_id)) { ++ /* gamma is selected if the msg size is less than threshold or release_gather based ++ * shm_bcast and shm_reduce is not chosen for msg sizes larger than threshold */ ++ return &MPIDI_Allreduce_intra_composition_gamma_cnt; ++ } ++ } ++#endif + + if (MPIR_CVAR_ENABLE_SMP_COLLECTIVES && MPIR_CVAR_ENABLE_SMP_ALLREDUCE) { +- /* is the op commutative? We do SMP optimizations only if it is. */ +- MPIR_Datatype_get_size_macro(datatype, type_size); + nbytes = MPIR_CVAR_MAX_SMP_ALLREDUCE_MSG_SIZE ? type_size * count : 0; + if (MPIR_Comm_is_node_aware(comm) && is_commutative && + nbytes <= MPIR_CVAR_MAX_SMP_ALLREDUCE_MSG_SIZE) { +@@ -118,10 +132,14 @@ MPIDI_coll_algo_container_t *MPIDI_Reduce_select(const void *sendbuf, + nbytes = MPIR_CVAR_MAX_SMP_REDUCE_MSG_SIZE ? type_size * count : 0; + if (MPIR_Comm_is_node_aware(comm) && is_commutative && + nbytes <= MPIR_CVAR_MAX_SMP_REDUCE_MSG_SIZE) { +- return &MPIDI_Reduce_intra_composition_alpha_cnt; ++ if (nbytes <= MPIR_CVAR_REDUCE_SHORT_MSG_SIZE) { ++ return &MPIDI_Reduce_intra_composition_beta_cnt; ++ } else { ++ return &MPIDI_Reduce_intra_composition_alpha_cnt; ++ } + } + } +- return &MPIDI_Reduce_intra_composition_beta_cnt; ++ return &MPIDI_Reduce_intra_composition_gamma_cnt; + } + + MPL_STATIC_INLINE_PREFIX const +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4_comm.c +@@ -0,0 +1,508 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "mpidch4r.h" ++#include "ch4_comm.h" ++#include "ch4i_comm.h" ++ ++int MPID_Comm_reenable_anysource(MPIR_Comm * comm, MPIR_Group ** failed_group_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_REENABLE_ANYSOURCE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_REENABLE_ANYSOURCE); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_REENABLE_ANYSOURCE); ++ return MPI_SUCCESS; ++} ++ ++int MPID_Comm_remote_group_failed(MPIR_Comm * comm, MPIR_Group ** failed_group_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_REMOTE_GROUP_FAILED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_REMOTE_GROUP_FAILED); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_REMOTE_GROUP_FAILED); ++ return MPI_SUCCESS; ++} ++ ++int MPID_Comm_group_failed(MPIR_Comm * comm_ptr, MPIR_Group ** failed_group_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_GROUP_FAILED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_GROUP_FAILED); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_GROUP_FAILED); ++ return MPI_SUCCESS; ++} ++ ++int MPID_Comm_failure_ack(MPIR_Comm * comm_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_FAILURE_ACK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_FAILURE_ACK); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_FAILURE_ACK); ++ return 0; ++} ++ ++int MPID_Comm_failure_get_acked(MPIR_Comm * comm_ptr, MPIR_Group ** failed_group_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_FAILURE_GET_ACKED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_FAILURE_GET_ACKED); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_FAILURE_GET_ACKED); ++ return 0; ++} ++ ++int MPID_Comm_revoke(MPIR_Comm * comm_ptr, int is_remote) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_REVOKE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_REVOKE); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_REVOKE); ++ return 0; ++} ++ ++int MPID_Comm_get_all_failed_procs(MPIR_Comm * comm_ptr, MPIR_Group ** failed_group, int tag) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_GET_ALL_FAILED_PROCS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_GET_ALL_FAILED_PROCS); ++ ++ MPIR_Assert(0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_GET_ALL_FAILED_PROCS); ++ return 0; ++} ++ ++int MPIDI_Comm_split_type(MPIR_Comm * user_comm_ptr, int split_type, int key, MPIR_Info * info_ptr, ++ MPIR_Comm ** newcomm_ptr) ++{ ++ MPIR_Comm *comm_ptr = NULL; ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMM_SPLIT_TYPE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMM_SPLIT_TYPE); ++ ++ mpi_errno = MPIR_Comm_split_impl(user_comm_ptr, split_type == MPI_UNDEFINED ? MPI_UNDEFINED : 0, ++ key, &comm_ptr); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (split_type == MPI_UNDEFINED) { ++ *newcomm_ptr = NULL; ++ goto fn_exit; ++ } ++ ++ if (split_type != MPI_COMM_TYPE_SHARED) { ++ /* we don't know how to handle other split types; hand it back ++ * to the upper layer */ ++ mpi_errno = MPIR_Comm_split_type(comm_ptr, split_type, key, info_ptr, newcomm_ptr); ++ goto fn_exit; ++ } ++ ++ mpi_errno = MPIR_Comm_split_type_node_topo(comm_ptr, split_type, key, info_ptr, newcomm_ptr); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ if (comm_ptr) ++ MPIR_Comm_free_impl(comm_ptr); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMM_SPLIT_TYPE); ++ return mpi_errno; ++ ++ /* --BEGIN ERROR HANDLING-- */ ++ fn_fail: ++ goto fn_exit; ++ /* --END ERROR HANDLING-- */ ++} ++ ++int MPID_Comm_create_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno; ++ int i, *uniq_avtids; ++ int max_n_avts; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_COMM_CREATE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_COMM_CREATE_HOOK); ++ ++ /* comm_world and comm_self are already initialized */ ++ if (comm != MPIR_Process.comm_world && comm != MPIR_Process.comm_self) { ++ MPIDI_comm_create_rank_map(comm); ++ /* add ref to avts */ ++ switch (MPIDI_COMM(comm, map).mode) { ++ case MPIDI_RANK_MAP_NONE: ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ max_n_avts = MPIDIU_get_max_n_avts(); ++ uniq_avtids = (int *) MPL_malloc(max_n_avts * sizeof(int), MPL_MEM_ADDRESS); ++ memset(uniq_avtids, 0, max_n_avts * sizeof(int)); ++ for (i = 0; i < MPIDI_COMM(comm, map).size; i++) { ++ if (uniq_avtids[MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid] == 0) { ++ uniq_avtids[MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid] = 1; ++ MPIDIU_avt_add_ref(MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid); ++ } ++ } ++ MPL_free(uniq_avtids); ++ break; ++ default: ++ MPIDIU_avt_add_ref(MPIDI_COMM(comm, map).avtid); ++ } ++ ++ switch (MPIDI_COMM(comm, local_map).mode) { ++ case MPIDI_RANK_MAP_NONE: ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ max_n_avts = MPIDIU_get_max_n_avts(); ++ uniq_avtids = (int *) MPL_malloc(max_n_avts * sizeof(int), MPL_MEM_ADDRESS); ++ memset(uniq_avtids, 0, max_n_avts * sizeof(int)); ++ for (i = 0; i < MPIDI_COMM(comm, local_map).size; i++) { ++ if (uniq_avtids[MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid] == 0) { ++ uniq_avtids[MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid] = 1; ++ MPIDIU_avt_add_ref(MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid); ++ } ++ } ++ MPL_free(uniq_avtids); ++ break; ++ default: ++ MPIDIU_avt_add_ref(MPIDI_COMM(comm, local_map).avtid); ++ } ++ } ++ ++ mpi_errno = MPIDI_NM_mpi_comm_create_hook(comm); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_comm_create_hook(comm); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_COMM_CREATE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Comm_free_hook(MPIR_Comm * comm) ++{ ++ int mpi_errno; ++ int i, *uniq_avtids; ++ int max_n_avts; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_COMM_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_COMM_FREE_HOOK); ++ /* release ref to avts */ ++ switch (MPIDI_COMM(comm, map).mode) { ++ case MPIDI_RANK_MAP_NONE: ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ max_n_avts = MPIDIU_get_max_n_avts(); ++ uniq_avtids = (int *) MPL_malloc(max_n_avts * sizeof(int), MPL_MEM_ADDRESS); ++ memset(uniq_avtids, 0, max_n_avts * sizeof(int)); ++ for (i = 0; i < MPIDI_COMM(comm, map).size; i++) { ++ if (uniq_avtids[MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid] == 0) { ++ uniq_avtids[MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid] = 1; ++ MPIDIU_avt_release_ref(MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid); ++ } ++ } ++ MPL_free(uniq_avtids); ++ break; ++ default: ++ MPIDIU_avt_release_ref(MPIDI_COMM(comm, map).avtid); ++ } ++ ++ switch (MPIDI_COMM(comm, local_map).mode) { ++ case MPIDI_RANK_MAP_NONE: ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ max_n_avts = MPIDIU_get_max_n_avts(); ++ uniq_avtids = (int *) MPL_malloc(max_n_avts * sizeof(int), MPL_MEM_ADDRESS); ++ memset(uniq_avtids, 0, max_n_avts * sizeof(int)); ++ for (i = 0; i < MPIDI_COMM(comm, local_map).size; i++) { ++ if (uniq_avtids[MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid] == 0) { ++ uniq_avtids[MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid] = 1; ++ MPIDIU_avt_release_ref(MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid); ++ } ++ } ++ MPL_free(uniq_avtids); ++ break; ++ default: ++ MPIDIU_avt_release_ref(MPIDI_COMM(comm, local_map).avtid); ++ } ++ ++ if (MPIDI_COMM(comm, map).mode == MPIDI_RANK_MAP_LUT ++ || MPIDI_COMM(comm, map).mode == MPIDI_RANK_MAP_LUT_INTRA) { ++ MPIDIU_release_lut(MPIDI_COMM(comm, map).irreg.lut.t); ++ } ++ if (MPIDI_COMM(comm, local_map).mode == MPIDI_RANK_MAP_LUT ++ || MPIDI_COMM(comm, local_map).mode == MPIDI_RANK_MAP_LUT_INTRA) { ++ MPIDIU_release_lut(MPIDI_COMM(comm, local_map).irreg.lut.t); ++ } ++ if (MPIDI_COMM(comm, map).mode == MPIDI_RANK_MAP_MLUT) { ++ MPIDIU_release_mlut(MPIDI_COMM(comm, map).irreg.mlut.t); ++ } ++ if (MPIDI_COMM(comm, local_map).mode == MPIDI_RANK_MAP_MLUT) { ++ MPIDIU_release_mlut(MPIDI_COMM(comm, local_map).irreg.mlut.t); ++ } ++ ++ mpi_errno = MPIDI_NM_mpi_comm_free_hook(comm); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_comm_free_hook(comm); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_COMM_FREE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Intercomm_exchange_map(MPIR_Comm * local_comm, int local_leader, MPIR_Comm * peer_comm, ++ int remote_leader, int *remote_size, int **remote_lupids, ++ int *is_low_group) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i; ++ int avtid = 0, lpid = -1; ++ int local_avtid = 0, remote_avtid = 0; ++ int local_size_send = 0, remote_size_recv = 0; ++ int cts_tag = 0; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ int pure_intracomm = 1; ++ int local_size = 0; ++ int *local_node_ids = NULL, *remote_node_ids = NULL; ++ int *local_lupids = NULL; ++ size_t *local_upid_size = NULL, *remote_upid_size = NULL; ++ int upid_send_size = 0, upid_recv_size = 0; ++ char *local_upids = NULL, *remote_upids = NULL; ++ ++ /* ++ * CH4 only cares about LUPID. GUPID extraction and exchange should be done ++ * by netmod ++ */ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_INTERCOMM_EXCHANGE_MAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_INTERCOMM_EXCHANGE_MAP); ++ ++ MPIR_CHKPMEM_DECL(1); ++ MPIR_CHKLMEM_DECL(5); ++ ++ cts_tag = 0 | MPIR_TAG_COLL_BIT; ++ local_size = local_comm->local_size; ++ ++ /* ++ * Stage 1: UPID exchange and LUPID conversion in leaders ++ */ ++ if (local_comm->rank == local_leader) { ++ /* We need to check all processes in local group to decide there ++ * is no dynamic spawned process. */ ++ for (i = 0; i < local_size; i++) { ++ MPIDIU_comm_rank_to_pid(local_comm, i, &lpid, &local_avtid); ++ if (local_avtid > 0) { ++ pure_intracomm = 0; ++ break; ++ } ++ } ++ if (pure_intracomm) { ++ /* check if remote leader is dynamic spawned process */ ++ MPIDIU_comm_rank_to_pid(peer_comm, remote_leader, &lpid, &remote_avtid); ++ if (remote_avtid > 0) ++ pure_intracomm = 0; ++ } ++ local_size_send = local_size; ++ if (!pure_intracomm) { ++ /* embedded dynamic process info in size */ ++ local_size_send |= MPIDI_DYNPROC_MASK; ++ } ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_COMM, VERBOSE, ++ (MPL_DBG_FDEST, "rank %d sendrecv to rank %d", ++ peer_comm->rank, remote_leader)); ++ mpi_errno = MPIC_Sendrecv(&local_size_send, 1, MPI_INT, ++ remote_leader, cts_tag, ++ &remote_size_recv, 1, MPI_INT, ++ remote_leader, cts_tag, peer_comm, MPI_STATUS_IGNORE, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (remote_size_recv & MPIDI_DYNPROC_MASK) ++ pure_intracomm = 0; ++ (*remote_size) = remote_size_recv & (~MPIDI_DYNPROC_MASK); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_COMM, VERBOSE, ++ (MPL_DBG_FDEST, "local size = %d, remote size = %d, pure_intracomm = %d", ++ local_size, *remote_size, pure_intracomm)); ++ ++ MPIR_CHKPMEM_MALLOC((*remote_lupids), int *, (*remote_size) * sizeof(int), ++ mpi_errno, "remote_lupids", MPL_MEM_ADDRESS); ++ MPIR_CHKLMEM_MALLOC(local_lupids, int *, local_size * sizeof(int), ++ mpi_errno, "local_lupids", MPL_MEM_ADDRESS); ++ for (i = 0; i < local_size; i++) { ++ MPIDIU_comm_rank_to_pid(local_comm, i, &lpid, &avtid); ++ local_lupids[i] = MPIDIU_LUPID_CREATE(avtid, lpid); ++ } ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_COMM, VERBOSE, ++ (MPL_DBG_FDEST, "Intercomm map exchange stage 1: leaders")); ++ if (!pure_intracomm) { ++ /* Stage 1.1 UPID exchange between leaders */ ++ MPIR_CHKLMEM_MALLOC(remote_upid_size, size_t *, (*remote_size) * sizeof(size_t), ++ mpi_errno, "remote_upid_size", MPL_MEM_ADDRESS); ++ ++ mpi_errno = MPIDI_NM_get_local_upids(local_comm, &local_upid_size, &local_upids); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = MPIC_Sendrecv(local_upid_size, local_size, MPI_UNSIGNED_LONG, ++ remote_leader, cts_tag, ++ remote_upid_size, *remote_size, MPI_UNSIGNED_LONG, ++ remote_leader, cts_tag, ++ peer_comm, MPI_STATUS_IGNORE, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ upid_send_size = 0; ++ for (i = 0; i < local_size; i++) ++ upid_send_size += local_upid_size[i]; ++ upid_recv_size = 0; ++ for (i = 0; i < *remote_size; i++) ++ upid_recv_size += remote_upid_size[i]; ++ MPIR_CHKLMEM_MALLOC(remote_upids, char *, upid_recv_size * sizeof(char), ++ mpi_errno, "remote_upids", MPL_MEM_ADDRESS); ++ mpi_errno = MPIC_Sendrecv(local_upids, upid_send_size, MPI_BYTE, ++ remote_leader, cts_tag, ++ remote_upids, upid_recv_size, MPI_BYTE, ++ remote_leader, cts_tag, ++ peer_comm, MPI_STATUS_IGNORE, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_CHKLMEM_MALLOC(local_node_ids, int *, ++ local_size * sizeof(int), mpi_errno, "local_node_ids", ++ MPL_MEM_ADDRESS); ++ MPIR_CHKLMEM_MALLOC(remote_node_ids, int *, (*remote_size) * sizeof(int), mpi_errno, ++ "remote_node_ids", MPL_MEM_ADDRESS); ++ for (i = 0; i < local_size; i++) { ++ MPIDIU_get_node_id(local_comm, i, &local_node_ids[i]); ++ } ++ mpi_errno = MPIC_Sendrecv(local_node_ids, local_size * sizeof(int), MPI_BYTE, ++ remote_leader, cts_tag, ++ remote_node_ids, (*remote_size) * sizeof(int), ++ MPI_BYTE, remote_leader, cts_tag, peer_comm, ++ MPI_STATUS_IGNORE, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* Stage 1.2 convert remote UPID to LUPID and get LUPID for local group */ ++ MPIDIU_upids_to_lupids(*remote_size, remote_upid_size, remote_upids, ++ remote_lupids, remote_node_ids); ++ } else { ++ /* Stage 1.1f only exchange LUPIDS if no dynamic process involved */ ++ mpi_errno = MPIC_Sendrecv(local_lupids, local_size, MPI_INT, ++ remote_leader, cts_tag, ++ *remote_lupids, *remote_size, MPI_INT, ++ remote_leader, cts_tag, ++ peer_comm, MPI_STATUS_IGNORE, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ /* Stage 1.3 check if local/remote groups are disjoint */ ++ ++ /* ++ * Error checking for this routine requires care. Because this ++ * routine is collective over two different sets of processes, ++ * it is relatively easy for the user to try to create an ++ * intercommunicator from two overlapping groups of processes. ++ * This is made more likely by inconsistencies in the MPI-1 ++ * specification (clarified in MPI-2) that seemed to allow ++ * the groups to overlap. Because of that, we first check that the ++ * groups are in fact disjoint before performing any collective ++ * operations. ++ */ ++ ++#ifdef HAVE_ERROR_CHECKING ++ { ++ MPID_BEGIN_ERROR_CHECKS; ++ { ++ /* Now that we have both the local and remote processes, ++ * check for any overlap */ ++ mpi_errno = MPIDI_check_disjoint_lupids(local_lupids, local_size, ++ *remote_lupids, *remote_size); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ MPID_END_ERROR_CHECKS; ++ } ++#endif /* HAVE_ERROR_CHECKING */ ++ ++ /* ++ * Make an arbitrary decision about which group of processs is ++ * the low group. The LEADERS do this by comparing the ++ * local process ids of the 0th member of the two groups ++ * LUPID itself is not enough for determine is_low_group because both ++ * local group is always smaller than remote ++ */ ++ if (pure_intracomm) { ++ *is_low_group = local_lupids[0] < (*remote_lupids)[0]; ++ } else { ++ if (local_upid_size[0] == remote_upid_size[0]) { ++ *is_low_group = memcmp(local_upids, remote_upids, local_upid_size[0]); ++ MPIR_Assert(*is_low_group != 0); ++ if (*is_low_group < 0) ++ *is_low_group = 0; ++ else ++ *is_low_group = 1; ++ } else { ++ *is_low_group = local_upid_size[0] < remote_upid_size[0]; ++ } ++ } ++ ++ /* At this point, we're done with the local lpids; they'll ++ * be freed with the other local memory on exit */ ++ local_lupids = NULL; ++ } ++ ++ /* ++ * Stage 2. Bcast UPID to non-leaders (intra-group) ++ */ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_COMM, VERBOSE, ++ (MPL_DBG_FDEST, "Intercomm map exchange stage 2: intra-group")); ++ mpi_errno = MPIDIU_Intercomm_map_bcast_intra(local_comm, local_leader, ++ remote_size, is_low_group, pure_intracomm, ++ remote_upid_size, remote_upids, ++ remote_lupids, remote_node_ids); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_CHKPMEM_COMMIT(); ++ fn_exit: ++ MPL_free(local_upid_size); ++ MPL_free(local_upids); ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_INTERCOMM_EXCHANGE_MAP); ++ return mpi_errno; ++ fn_fail: ++ MPIR_CHKPMEM_REAP(); ++ goto fn_exit; ++} +--- a/src/mpid/ch4/src/ch4_comm.h ++++ b/src/mpid/ch4/src/ch4_comm.h +@@ -12,8 +12,9 @@ + #define CH4_COMM_H_INCLUDED + + #include "ch4_impl.h" +-#include "ch4r_comm.h" +-#include "ch4i_comm.h" ++ ++int MPIDI_Comm_split_type(MPIR_Comm * user_comm_ptr, int split_type, int key, MPIR_Info * info_ptr, ++ MPIR_Comm ** newcomm_ptr); + + MPL_STATIC_INLINE_PREFIX int MPID_Comm_AS_enabled(MPIR_Comm * comm) + { +@@ -26,524 +27,4 @@ MPL_STATIC_INLINE_PREFIX int MPID_Comm_AS_enabled(MPIR_Comm * comm) + return MPI_SUCCESS; + } + +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_reenable_anysource(MPIR_Comm * comm, +- MPIR_Group ** failed_group_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_REENABLE_ANYSOURCE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_REENABLE_ANYSOURCE); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_REENABLE_ANYSOURCE); +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_remote_group_failed(MPIR_Comm * comm, +- MPIR_Group ** failed_group_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_REMOTE_GROUP_FAILED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_REMOTE_GROUP_FAILED); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_REMOTE_GROUP_FAILED); +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_group_failed(MPIR_Comm * comm_ptr, +- MPIR_Group ** failed_group_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_GROUP_FAILED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_GROUP_FAILED); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_GROUP_FAILED); +- return MPI_SUCCESS; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_failure_ack(MPIR_Comm * comm_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_FAILURE_ACK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_FAILURE_ACK); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_FAILURE_ACK); +- return 0; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_failure_get_acked(MPIR_Comm * comm_ptr, +- MPIR_Group ** failed_group_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_FAILURE_GET_ACKED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_FAILURE_GET_ACKED); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_FAILURE_GET_ACKED); +- return 0; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_revoke(MPIR_Comm * comm_ptr, int is_remote) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_REVOKE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_REVOKE); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_REVOKE); +- return 0; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_get_all_failed_procs(MPIR_Comm * comm_ptr, +- MPIR_Group ** failed_group, int tag) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_GET_ALL_FAILED_PROCS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_GET_ALL_FAILED_PROCS); +- +- MPIR_Assert(0); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_GET_ALL_FAILED_PROCS); +- return 0; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Comm_split_type +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_split_type(MPIR_Comm * user_comm_ptr, +- int split_type, +- int key, MPIR_Info * info_ptr, +- MPIR_Comm ** newcomm_ptr) +-{ +- MPIR_Comm *comm_ptr = NULL; +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMM_SPLIT_TYPE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMM_SPLIT_TYPE); +- +- mpi_errno = MPIR_Comm_split_impl(user_comm_ptr, split_type == MPI_UNDEFINED ? MPI_UNDEFINED : 0, +- key, &comm_ptr); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (split_type == MPI_UNDEFINED) { +- *newcomm_ptr = NULL; +- goto fn_exit; +- } +- +- if (split_type != MPI_COMM_TYPE_SHARED) { +- /* we don't know how to handle other split types; hand it back +- * to the upper layer */ +- mpi_errno = MPIR_Comm_split_type(comm_ptr, split_type, key, info_ptr, newcomm_ptr); +- goto fn_exit; +- } +- +- mpi_errno = MPIR_Comm_split_type_node_topo(comm_ptr, split_type, key, info_ptr, newcomm_ptr); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- if (comm_ptr) +- MPIR_Comm_free_impl(comm_ptr); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMM_SPLIT_TYPE); +- return mpi_errno; +- +- /* --BEGIN ERROR HANDLING-- */ +- fn_fail: +- goto fn_exit; +- /* --END ERROR HANDLING-- */ +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Comm_create_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_create_hook(MPIR_Comm * comm) +-{ +- int mpi_errno; +- int i, *uniq_avtids; +- int max_n_avts; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMM_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMM_CREATE_HOOK); +- +- /* comm_world and comm_self are already initialized */ +- if (comm != MPIR_Process.comm_world && comm != MPIR_Process.comm_self) { +- MPIDI_comm_create_rank_map(comm); +- /* add ref to avts */ +- switch (MPIDI_COMM(comm, map).mode) { +- case MPIDI_RANK_MAP_NONE: +- break; +- case MPIDI_RANK_MAP_MLUT: +- max_n_avts = MPIDIU_get_max_n_avts(); +- uniq_avtids = (int *) MPL_malloc(max_n_avts * sizeof(int), MPL_MEM_ADDRESS); +- memset(uniq_avtids, 0, max_n_avts * sizeof(int)); +- for (i = 0; i < MPIDI_COMM(comm, map).size; i++) { +- if (uniq_avtids[MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid] == 0) { +- uniq_avtids[MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid] = 1; +- MPIDIU_avt_add_ref(MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid); +- } +- } +- MPL_free(uniq_avtids); +- break; +- default: +- MPIDIU_avt_add_ref(MPIDI_COMM(comm, map).avtid); +- } +- +- switch (MPIDI_COMM(comm, local_map).mode) { +- case MPIDI_RANK_MAP_NONE: +- break; +- case MPIDI_RANK_MAP_MLUT: +- max_n_avts = MPIDIU_get_max_n_avts(); +- uniq_avtids = (int *) MPL_malloc(max_n_avts * sizeof(int), MPL_MEM_ADDRESS); +- memset(uniq_avtids, 0, max_n_avts * sizeof(int)); +- for (i = 0; i < MPIDI_COMM(comm, local_map).size; i++) { +- if (uniq_avtids[MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid] == 0) { +- uniq_avtids[MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid] = 1; +- MPIDIU_avt_add_ref(MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid); +- } +- } +- MPL_free(uniq_avtids); +- break; +- default: +- MPIDIU_avt_add_ref(MPIDI_COMM(comm, local_map).avtid); +- } +- } +- +- mpi_errno = MPIDI_NM_mpi_comm_create_hook(comm); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_comm_create_hook(comm); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMM_CREATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Comm_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_free_hook(MPIR_Comm * comm) +-{ +- int mpi_errno; +- int i, *uniq_avtids; +- int max_n_avts; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMM_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMM_FREE_HOOK); +- /* release ref to avts */ +- switch (MPIDI_COMM(comm, map).mode) { +- case MPIDI_RANK_MAP_NONE: +- break; +- case MPIDI_RANK_MAP_MLUT: +- max_n_avts = MPIDIU_get_max_n_avts(); +- uniq_avtids = (int *) MPL_malloc(max_n_avts * sizeof(int), MPL_MEM_ADDRESS); +- memset(uniq_avtids, 0, max_n_avts * sizeof(int)); +- for (i = 0; i < MPIDI_COMM(comm, map).size; i++) { +- if (uniq_avtids[MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid] == 0) { +- uniq_avtids[MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid] = 1; +- MPIDIU_avt_release_ref(MPIDI_COMM(comm, map).irreg.mlut.gpid[i].avtid); +- } +- } +- MPL_free(uniq_avtids); +- break; +- default: +- MPIDIU_avt_release_ref(MPIDI_COMM(comm, map).avtid); +- } +- +- switch (MPIDI_COMM(comm, local_map).mode) { +- case MPIDI_RANK_MAP_NONE: +- break; +- case MPIDI_RANK_MAP_MLUT: +- max_n_avts = MPIDIU_get_max_n_avts(); +- uniq_avtids = (int *) MPL_malloc(max_n_avts * sizeof(int), MPL_MEM_ADDRESS); +- memset(uniq_avtids, 0, max_n_avts * sizeof(int)); +- for (i = 0; i < MPIDI_COMM(comm, local_map).size; i++) { +- if (uniq_avtids[MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid] == 0) { +- uniq_avtids[MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid] = 1; +- MPIDIU_avt_release_ref(MPIDI_COMM(comm, local_map).irreg.mlut.gpid[i].avtid); +- } +- } +- MPL_free(uniq_avtids); +- break; +- default: +- MPIDIU_avt_release_ref(MPIDI_COMM(comm, local_map).avtid); +- } +- +- if (MPIDI_COMM(comm, map).mode == MPIDI_RANK_MAP_LUT +- || MPIDI_COMM(comm, map).mode == MPIDI_RANK_MAP_LUT_INTRA) { +- MPIDIU_release_lut(MPIDI_COMM(comm, map).irreg.lut.t); +- } +- if (MPIDI_COMM(comm, local_map).mode == MPIDI_RANK_MAP_LUT +- || MPIDI_COMM(comm, local_map).mode == MPIDI_RANK_MAP_LUT_INTRA) { +- MPIDIU_release_lut(MPIDI_COMM(comm, local_map).irreg.lut.t); +- } +- if (MPIDI_COMM(comm, map).mode == MPIDI_RANK_MAP_MLUT) { +- MPIDIU_release_mlut(MPIDI_COMM(comm, map).irreg.mlut.t); +- } +- if (MPIDI_COMM(comm, local_map).mode == MPIDI_RANK_MAP_MLUT) { +- MPIDIU_release_mlut(MPIDI_COMM(comm, local_map).irreg.mlut.t); +- } +- +- mpi_errno = MPIDI_NM_mpi_comm_free_hook(comm); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_comm_free_hook(comm); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMM_FREE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Intercomm_exchange_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Intercomm_exchange_map(MPIR_Comm * local_comm, +- int local_leader, +- MPIR_Comm * peer_comm, +- int remote_leader, +- int *remote_size, +- int **remote_lupids, int *is_low_group) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i; +- int avtid = 0, lpid = -1; +- int local_avtid = 0, remote_avtid = 0; +- int local_size_send = 0, remote_size_recv = 0; +- int cts_tag = 0; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- int pure_intracomm = 1; +- int local_size = 0; +- int *local_node_ids = NULL, *remote_node_ids = NULL; +- int *local_lupids = NULL; +- size_t *local_upid_size = NULL, *remote_upid_size = NULL; +- int upid_send_size = 0, upid_recv_size = 0; +- char *local_upids = NULL, *remote_upids = NULL; +- +- /* +- * CH4 only cares about LUPID. GUPID extraction and exchange should be done +- * by netmod +- */ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_INTERCOMM_EXCHANGE_MAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_INTERCOMM_EXCHANGE_MAP); +- +- MPIR_CHKPMEM_DECL(1); +- MPIR_CHKLMEM_DECL(5); +- +- cts_tag = 0 | MPIR_TAG_COLL_BIT; +- local_size = local_comm->local_size; +- +- /* +- * Stage 1: UPID exchange and LUPID conversion in leaders +- */ +- if (local_comm->rank == local_leader) { +- /* We need to check all processes in local group to decide there +- * is no dynamic spawned process. */ +- for (i = 0; i < local_size; i++) { +- MPIDIU_comm_rank_to_pid(local_comm, i, &lpid, &local_avtid); +- if (local_avtid > 0) { +- pure_intracomm = 0; +- break; +- } +- } +- if (pure_intracomm) { +- /* check if remote leader is dynamic spawned process */ +- MPIDIU_comm_rank_to_pid(peer_comm, remote_leader, &lpid, &remote_avtid); +- if (remote_avtid > 0) +- pure_intracomm = 0; +- } +- local_size_send = local_size; +- if (!pure_intracomm) { +- /* embedded dynamic process info in size */ +- local_size_send |= MPIDI_DYNPROC_MASK; +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_COMM, VERBOSE, +- (MPL_DBG_FDEST, "rank %d sendrecv to rank %d", +- peer_comm->rank, remote_leader)); +- mpi_errno = MPIC_Sendrecv(&local_size_send, 1, MPI_INT, +- remote_leader, cts_tag, +- &remote_size_recv, 1, MPI_INT, +- remote_leader, cts_tag, peer_comm, MPI_STATUS_IGNORE, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (remote_size_recv & MPIDI_DYNPROC_MASK) +- pure_intracomm = 0; +- (*remote_size) = remote_size_recv & (~MPIDI_DYNPROC_MASK); +- +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_COMM, VERBOSE, +- (MPL_DBG_FDEST, "local size = %d, remote size = %d, pure_intracomm = %d", +- local_size, *remote_size, pure_intracomm)); +- +- MPIR_CHKPMEM_MALLOC((*remote_lupids), int *, (*remote_size) * sizeof(int), +- mpi_errno, "remote_lupids", MPL_MEM_ADDRESS); +- MPIR_CHKLMEM_MALLOC(local_lupids, int *, local_size * sizeof(int), +- mpi_errno, "local_lupids", MPL_MEM_ADDRESS); +- for (i = 0; i < local_size; i++) { +- MPIDIU_comm_rank_to_pid(local_comm, i, &lpid, &avtid); +- local_lupids[i] = MPIDIU_LUPID_CREATE(avtid, lpid); +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_COMM, VERBOSE, +- (MPL_DBG_FDEST, "Intercomm map exchange stage 1: leaders")); +- if (!pure_intracomm) { +- /* Stage 1.1 UPID exchange between leaders */ +- MPIR_CHKLMEM_MALLOC(remote_upid_size, size_t *, (*remote_size) * sizeof(size_t), +- mpi_errno, "remote_upid_size", MPL_MEM_ADDRESS); +- +- mpi_errno = MPIDI_NM_get_local_upids(local_comm, &local_upid_size, &local_upids); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = MPIC_Sendrecv(local_upid_size, local_size, MPI_UNSIGNED_LONG, +- remote_leader, cts_tag, +- remote_upid_size, *remote_size, MPI_UNSIGNED_LONG, +- remote_leader, cts_tag, +- peer_comm, MPI_STATUS_IGNORE, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- upid_send_size = 0; +- for (i = 0; i < local_size; i++) +- upid_send_size += local_upid_size[i]; +- upid_recv_size = 0; +- for (i = 0; i < *remote_size; i++) +- upid_recv_size += remote_upid_size[i]; +- MPIR_CHKLMEM_MALLOC(remote_upids, char *, upid_recv_size * sizeof(char), +- mpi_errno, "remote_upids", MPL_MEM_ADDRESS); +- mpi_errno = MPIC_Sendrecv(local_upids, upid_send_size, MPI_BYTE, +- remote_leader, cts_tag, +- remote_upids, upid_recv_size, MPI_BYTE, +- remote_leader, cts_tag, +- peer_comm, MPI_STATUS_IGNORE, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIR_CHKLMEM_MALLOC(local_node_ids, int *, +- local_size * sizeof(int), mpi_errno, "local_node_ids", +- MPL_MEM_ADDRESS); +- MPIR_CHKLMEM_MALLOC(remote_node_ids, int *, (*remote_size) * sizeof(int), mpi_errno, +- "remote_node_ids", MPL_MEM_ADDRESS); +- for (i = 0; i < local_size; i++) { +- MPIDI_CH4U_get_node_id(local_comm, i, &local_node_ids[i]); +- } +- mpi_errno = MPIC_Sendrecv(local_node_ids, local_size * sizeof(int), MPI_BYTE, +- remote_leader, cts_tag, +- remote_node_ids, (*remote_size) * sizeof(int), +- MPI_BYTE, remote_leader, cts_tag, peer_comm, +- MPI_STATUS_IGNORE, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* Stage 1.2 convert remote UPID to LUPID and get LUPID for local group */ +- MPIDIU_upids_to_lupids(*remote_size, remote_upid_size, remote_upids, +- remote_lupids, remote_node_ids); +- } else { +- /* Stage 1.1f only exchange LUPIDS if no dynamic process involved */ +- mpi_errno = MPIC_Sendrecv(local_lupids, local_size, MPI_INT, +- remote_leader, cts_tag, +- *remote_lupids, *remote_size, MPI_INT, +- remote_leader, cts_tag, +- peer_comm, MPI_STATUS_IGNORE, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- /* Stage 1.3 check if local/remote groups are disjoint */ +- +- /* +- * Error checking for this routine requires care. Because this +- * routine is collective over two different sets of processes, +- * it is relatively easy for the user to try to create an +- * intercommunicator from two overlapping groups of processes. +- * This is made more likely by inconsistencies in the MPI-1 +- * specification (clarified in MPI-2) that seemed to allow +- * the groups to overlap. Because of that, we first check that the +- * groups are in fact disjoint before performing any collective +- * operations. +- */ +- +-#ifdef HAVE_ERROR_CHECKING +- { +- MPID_BEGIN_ERROR_CHECKS; +- { +- /* Now that we have both the local and remote processes, +- * check for any overlap */ +- mpi_errno = MPIDI_check_disjoint_lupids(local_lupids, local_size, +- *remote_lupids, *remote_size); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- MPID_END_ERROR_CHECKS; +- } +-#endif /* HAVE_ERROR_CHECKING */ +- +- /* +- * Make an arbitrary decision about which group of processs is +- * the low group. The LEADERS do this by comparing the +- * local process ids of the 0th member of the two groups +- * LUPID itself is not enough for determine is_low_group because both +- * local group is always smaller than remote +- */ +- if (pure_intracomm) { +- *is_low_group = local_lupids[0] < (*remote_lupids)[0]; +- } else { +- if (local_upid_size[0] == remote_upid_size[0]) { +- *is_low_group = memcmp(local_upids, remote_upids, local_upid_size[0]); +- MPIR_Assert(*is_low_group != 0); +- if (*is_low_group < 0) +- *is_low_group = 0; +- else +- *is_low_group = 1; +- } else { +- *is_low_group = local_upid_size[0] < remote_upid_size[0]; +- } +- } +- +- /* At this point, we're done with the local lpids; they'll +- * be freed with the other local memory on exit */ +- local_lupids = NULL; +- } +- +- /* +- * Stage 2. Bcast UPID to non-leaders (intra-group) +- */ +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_COMM, VERBOSE, +- (MPL_DBG_FDEST, "Intercomm map exchange stage 2: intra-group")); +- mpi_errno = MPIDIU_Intercomm_map_bcast_intra(local_comm, local_leader, +- remote_size, is_low_group, pure_intracomm, +- remote_upid_size, remote_upids, +- remote_lupids, remote_node_ids); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIR_CHKPMEM_COMMIT(); +- fn_exit: +- MPL_free(local_upid_size); +- MPL_free(local_upids); +- MPIR_CHKLMEM_FREEALL(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_INTERCOMM_EXCHANGE_MAP); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- + #endif /* CH4_COMM_H_INCLUDED */ +--- a/src/mpid/ch4/src/ch4_globals.c ++++ b/src/mpid/ch4/src/ch4_globals.c +@@ -15,7 +15,7 @@ + #include + #include "ch4_impl.h" + +-MPIDI_CH4_Global_t MPIDI_CH4_Global; ++MPIDI_CH4_Global_t MPIDI_global; + MPIDI_av_table_t **MPIDI_av_table; + MPIDI_av_table_t *MPIDI_av_table0; + +@@ -23,8 +23,7 @@ MPIDI_NM_funcs_t *MPIDI_NM_func; + MPIDI_NM_native_funcs_t *MPIDI_NM_native_func; + + #if defined(MPIDI_CH4_USE_WORK_QUEUES) +-struct MPIDI_workq_elemt MPIDI_workq_elemt_direct[MPIDI_WORKQ_ELEMT_PREALLOC] = { {0} +-}; ++struct MPIDI_workq_elemt MPIDI_workq_elemt_direct[MPIDI_WORKQ_ELEMT_PREALLOC]; + + MPIR_Object_alloc_t MPIDI_workq_elemt_mem = { + 0, 0, 0, 0, MPIR_WORKQ_ELEM, sizeof(struct MPIDI_workq_elemt), MPIDI_workq_elemt_direct, +@@ -69,30 +68,24 @@ pthread_mutex_t MPIDI_Mutex_lock[MPIDI_NUM_LOCKS]; + #ifdef HAVE_SIGNAL + void MPIDI_sigusr1_handler(int sig) + { +- MPIDI_CH4_Global.sigusr1_count++; +- if (MPIDI_CH4_Global.prev_sighandler) +- MPIDI_CH4_Global.prev_sighandler(sig); ++ MPIDI_global.sigusr1_count++; ++ if (MPIDI_global.prev_sighandler) ++ MPIDI_global.prev_sighandler(sig); + } + #endif + +-#undef FUNCNAME +-#define FUNCNAME MPID_Abort +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_Abort(MPIR_Comm * comm, int mpi_errno, int exit_code, const char *error_msg) + { +- char sys_str[MPI_MAX_ERROR_STRING + 5] = ""; +- char comm_str[MPI_MAX_ERROR_STRING] = ""; +- char world_str[MPI_MAX_ERROR_STRING] = ""; +- char error_str[2 * MPI_MAX_ERROR_STRING + 128]; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ABORT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ABORT); + ++ char world_str[MPI_MAX_ERROR_STRING] = ""; + if (MPIR_Process.comm_world) { + int rank = MPIR_Process.comm_world->rank; + snprintf(world_str, sizeof(world_str), " on node %d", rank); + } + ++ char comm_str[MPI_MAX_ERROR_STRING] = ""; + if (comm) { + int rank = comm->rank; + int context_id = comm->context_id; +@@ -102,11 +95,14 @@ int MPID_Abort(MPIR_Comm * comm, int mpi_errno, int exit_code, const char *error + if (!error_msg) + error_msg = "Internal error"; + ++ char sys_str[MPI_MAX_ERROR_STRING + 5] = ""; + if (mpi_errno != MPI_SUCCESS) { + char msg[MPI_MAX_ERROR_STRING] = ""; + MPIR_Err_get_string(mpi_errno, msg, MPI_MAX_ERROR_STRING, NULL); +- snprintf(sys_str, sizeof(msg), " (%s)", msg); ++ snprintf(sys_str, sizeof(sys_str), " (%s)", msg); + } ++ ++ char error_str[3 * MPI_MAX_ERROR_STRING + 128]; + MPL_snprintf(error_str, sizeof(error_str), "Abort(%d)%s%s: %s%s\n", + exit_code, world_str, comm_str, error_msg, sys_str); + MPL_error_printf("%s", error_str); +@@ -131,16 +127,12 @@ int MPID_Abort(MPIR_Comm * comm, int mpi_errno, int exit_code, const char *error + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_check_for_failed_procs +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDI_check_for_failed_procs(void) + { + int mpi_errno = MPI_SUCCESS; + int pmi_errno; + int len; +- char *kvsname = MPIDI_CH4_Global.jobid; ++ char *kvsname = MPIDI_global.jobid; + char *failed_procs_string = NULL; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHECK_FOR_FAILED_PROCS); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHECK_FOR_FAILED_PROCS); +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4_impl.c +@@ -0,0 +1,182 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ch4_impl.h" ++ ++int MPIDIG_get_context_index(uint64_t context_id) ++{ ++ int raw_prefix, idx, bitpos, gen_id; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_CONTEXT_INDEX); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_CONTEXT_INDEX); ++ ++ raw_prefix = MPIR_CONTEXT_READ_FIELD(PREFIX, context_id); ++ idx = raw_prefix / MPIR_CONTEXT_INT_BITS; ++ bitpos = raw_prefix % MPIR_CONTEXT_INT_BITS; ++ gen_id = (idx * MPIR_CONTEXT_INT_BITS) + (31 - bitpos); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_CONTEXT_INDEX); ++ return gen_id; ++} ++ ++uint64_t MPIDIG_generate_win_id(MPIR_Comm * comm_ptr) ++{ ++ uint64_t ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GENERATE_WIN_ID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GENERATE_WIN_ID); ++ ++ /* context id lower bits, window instance upper bits */ ++ ret = 1 + (((uint64_t) comm_ptr->context_id) | ++ ((uint64_t) ((MPIDIG_COMM(comm_ptr, window_instance))++) << 32)); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GENERATE_WIN_ID); ++ return ret; ++} ++ ++/* Collectively allocate shared memory region. ++ * MPL_shm routines and MPI collectives are internally used. ++ * The parameter *mapfail_flag_ptr is set to true and MPI_SUCCESS is returned ++ * if mapping fails (e.g., no memory resource, or opened too many files), thus the ++ * caller can choose fallback if exists. If communication fails it returns an MPI error.*/ ++int MPIDIU_allocate_shm_segment(MPIR_Comm * shm_comm_ptr, MPI_Aint shm_segment_len, ++ MPL_shm_hnd_t * shm_segment_hdl_ptr, void **base_ptr, ++ bool * mapfail_flag_ptr) ++{ ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ int mpi_errno = MPI_SUCCESS, mpl_err = 0; ++ bool any_shm_fail_flag = false, shm_fail_flag = false, mapped_flag = false; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_ALLOCATE_SHM_SEGMENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_ALLOCATE_SHM_SEGMENT); ++ ++ mpl_err = MPL_shm_hnd_init(shm_segment_hdl_ptr); ++ MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); ++ ++ *mapfail_flag_ptr = false; ++ *base_ptr = NULL; ++ if (shm_comm_ptr->rank == 0) { ++ char *serialized_hnd_ptr = NULL; ++ char mpl_err_hnd[MPL_SHM_GHND_SZ] = { 0 }; ++ ++ /* create shared memory region for all processes in win and map */ ++ mpl_err = MPL_shm_seg_create_and_attach(*shm_segment_hdl_ptr, shm_segment_len, base_ptr, 0); ++ if (mpl_err != MPL_SHM_SUCCESS) { ++ shm_fail_flag = true; ++ goto hnd_sync; ++ } else ++ mapped_flag = true; ++ ++ /* serialize handle and broadcast it to the other processes in win */ ++ mpl_err = MPL_shm_hnd_get_serialized_by_ref(*shm_segment_hdl_ptr, &serialized_hnd_ptr); ++ if (mpl_err != MPL_SHM_SUCCESS) ++ shm_fail_flag = true; ++ ++ hnd_sync: ++ /* bcast empty hnd as error reporting */ ++ if (shm_fail_flag) ++ serialized_hnd_ptr = &mpl_err_hnd[0]; ++ mpi_errno = MPIR_Bcast_impl(serialized_hnd_ptr, MPL_SHM_GHND_SZ, MPI_CHAR, 0, ++ shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ if (shm_fail_flag) ++ goto map_fail; ++ ++ /* ensure all other processes have mapped successfully */ ++ mpi_errno = MPIR_Allreduce_impl(&shm_fail_flag, &any_shm_fail_flag, 1, MPI_C_BOOL, ++ MPI_LOR, shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ /* unlink shared memory region so it gets deleted when all processes exit */ ++ mpl_err = MPL_shm_seg_remove(*shm_segment_hdl_ptr); ++ MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**remove_shar_mem"); ++ ++ if (any_shm_fail_flag) ++ goto map_fail; ++ ++ } else { ++ char serialized_hnd[MPL_SHM_GHND_SZ] = { 0 }; ++ ++ /* get serialized handle from rank 0 and deserialize it */ ++ mpi_errno = MPIR_Bcast_impl(serialized_hnd, MPL_SHM_GHND_SZ, MPI_CHAR, 0, ++ shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ /* empty handler means root fails */ ++ if (strlen(serialized_hnd) == 0) ++ goto map_fail; ++ ++ mpl_err = MPL_shm_hnd_deserialize(*shm_segment_hdl_ptr, serialized_hnd, ++ strlen(serialized_hnd)); ++ if (mpl_err != MPL_SHM_SUCCESS) { ++ shm_fail_flag = true; ++ goto result_sync; ++ } ++ ++ /* attach to shared memory region created by rank 0 */ ++ mpl_err = MPL_shm_seg_attach(*shm_segment_hdl_ptr, shm_segment_len, base_ptr, 0); ++ if (mpl_err != MPL_SHM_SUCCESS) { ++ shm_fail_flag = true; ++ goto result_sync; ++ } else ++ mapped_flag = true; ++ ++ result_sync: ++ mpi_errno = MPIR_Allreduce_impl(&shm_fail_flag, &any_shm_fail_flag, 1, MPI_C_BOOL, ++ MPI_LOR, shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ if (any_shm_fail_flag) ++ goto map_fail; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_ALLOCATE_SHM_SEGMENT); ++ return mpi_errno; ++ map_fail: ++ /* clean up shm mapping resource */ ++ if (mapped_flag) { ++ mpl_err = MPL_shm_seg_detach(*shm_segment_hdl_ptr, base_ptr, shm_segment_len); ++ MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**detach_shar_mem"); ++ *base_ptr = NULL; ++ } ++ mpl_err = MPL_shm_hnd_finalize(shm_segment_hdl_ptr); ++ MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**remove_shar_mem"); ++ *mapfail_flag_ptr = true; ++ goto fn_exit; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Destroy shared memory region on the local process. ++ * MPL_shm routines are internally used. */ ++int MPIDIU_destroy_shm_segment(MPI_Aint shm_segment_len, MPL_shm_hnd_t * shm_segment_hdl_ptr, ++ void **base_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS, mpl_err = 0; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DESTROY_SHM_SEGMENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DESTROY_SHM_SEGMENT); ++ ++ mpl_err = MPL_shm_seg_detach(*shm_segment_hdl_ptr, base_ptr, shm_segment_len); ++ MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**detach_shar_mem"); ++ ++ mpl_err = MPL_shm_hnd_finalize(shm_segment_hdl_ptr); ++ MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**remove_shar_mem"); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DESTROY_SHM_SEGMENT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpid/ch4/src/ch4_impl.h ++++ b/src/mpid/ch4/src/ch4_impl.h +@@ -12,398 +12,356 @@ + #define CH4_IMPL_H_INCLUDED + + #include "ch4_types.h" +-#include + #include "mpidig.h" + + MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_test(int flags); ++int MPIDIG_get_context_index(uint64_t context_id); ++uint64_t MPIDIG_generate_win_id(MPIR_Comm * comm_ptr); ++/* Collectively allocate shared memory region. ++ * MPL_shm routines and MPI collectives are internally used. */ ++int MPIDIU_allocate_shm_segment(MPIR_Comm * shm_comm_ptr, MPI_Aint shm_segment_len, ++ MPL_shm_hnd_t * shm_segment_hdl_ptr, void **base_ptr, ++ bool * mapfail_flag_ptr); ++/* Destroy shared memory region on the local process. ++ * MPL_shm routines are internally used. */ ++int MPIDIU_destroy_shm_segment(MPI_Aint shm_segment_len, MPL_shm_hnd_t * shm_segment_hdl_ptr, ++ void **base_ptr); + +-/* Static inlines */ +-static inline int MPIDI_CH4U_get_context_index(uint64_t context_id) +-{ +- int raw_prefix, idx, bitpos, gen_id; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_GET_CONTEXT_INDEX); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_GET_CONTEXT_INDEX); +- +- raw_prefix = MPIR_CONTEXT_READ_FIELD(PREFIX, context_id); +- idx = raw_prefix / MPIR_CONTEXT_INT_BITS; +- bitpos = raw_prefix % MPIR_CONTEXT_INT_BITS; +- gen_id = (idx * MPIR_CONTEXT_INT_BITS) + (31 - bitpos); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_GET_CONTEXT_INDEX); +- return gen_id; +-} + +-static inline int MPIDI_CH4U_request_get_context_offset(MPIR_Request * req) ++/* Static inlines */ ++static inline int MPIDIG_request_get_context_offset(MPIR_Request * req) + { + int context_offset; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_REQUEST_GET_CONTEXT_OFFSET); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_REQUEST_GET_CONTEXT_OFFSET); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_REQUEST_GET_CONTEXT_OFFSET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_REQUEST_GET_CONTEXT_OFFSET); + +- context_offset = MPIDI_CH4U_REQUEST(req, context_id) - req->comm->context_id; ++ context_offset = MPIDIG_REQUEST(req, context_id) - req->comm->context_id; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_REQUEST_GET_CONTEXT_OFFSET); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_REQUEST_GET_CONTEXT_OFFSET); + + return context_offset; + } + +-static inline MPIR_Comm *MPIDI_CH4U_context_id_to_comm(uint64_t context_id) ++static inline MPIR_Comm *MPIDIG_context_id_to_comm(uint64_t context_id) + { +- int comm_idx = MPIDI_CH4U_get_context_index(context_id); ++ int comm_idx = MPIDIG_get_context_index(context_id); + int subcomm_type = MPIR_CONTEXT_READ_FIELD(SUBCOMM, context_id); + int is_localcomm = MPIR_CONTEXT_READ_FIELD(IS_LOCALCOMM, context_id); + MPIR_Comm *ret; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_CONTEXT_ID_TO_COMM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_CONTEXT_ID_TO_COMM); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CONTEXT_ID_TO_COMM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CONTEXT_ID_TO_COMM); + + MPIR_Assert(subcomm_type <= 3); + MPIR_Assert(is_localcomm <= 2); +- ret = MPIDI_CH4_Global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type]; ++ ret = MPIDI_global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type]; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_CONTEXT_ID_TO_COMM); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CONTEXT_ID_TO_COMM); + return ret; + } + +-static inline MPIDI_CH4U_rreq_t **MPIDI_CH4U_context_id_to_uelist(uint64_t context_id) ++static inline MPIDIG_rreq_t **MPIDIG_context_id_to_uelist(uint64_t context_id) + { +- int comm_idx = MPIDI_CH4U_get_context_index(context_id); ++ int comm_idx = MPIDIG_get_context_index(context_id); + int subcomm_type = MPIR_CONTEXT_READ_FIELD(SUBCOMM, context_id); + int is_localcomm = MPIR_CONTEXT_READ_FIELD(IS_LOCALCOMM, context_id); +- MPIDI_CH4U_rreq_t **ret; ++ MPIDIG_rreq_t **ret; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_CONTEXT_ID_TO_UELIST); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_CONTEXT_ID_TO_UELIST); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CONTEXT_ID_TO_UELIST); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CONTEXT_ID_TO_UELIST); + + MPIR_Assert(subcomm_type <= 3); + MPIR_Assert(is_localcomm <= 2); + +- ret = &MPIDI_CH4_Global.comm_req_lists[comm_idx].uelist[is_localcomm][subcomm_type]; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_CONTEXT_ID_TO_UELIST); +- return ret; +-} +- +-static inline uint64_t MPIDI_CH4U_generate_win_id(MPIR_Comm * comm_ptr) +-{ +- uint64_t ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_GENERATE_WIN_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_GENERATE_WIN_ID); ++ ret = &MPIDI_global.comm_req_lists[comm_idx].uelist[is_localcomm][subcomm_type]; + +- /* context id lower bits, window instance upper bits */ +- ret = 1 + (((uint64_t) comm_ptr->context_id) | +- ((uint64_t) ((MPIDI_CH4U_COMM(comm_ptr, window_instance))++) << 32)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_GENERATE_WIN_ID); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CONTEXT_ID_TO_UELIST); + return ret; + } + +-static inline MPIR_Context_id_t MPIDI_CH4U_win_id_to_context(uint64_t win_id) ++static inline MPIR_Context_id_t MPIDIG_win_id_to_context(uint64_t win_id) + { + MPIR_Context_id_t ret; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_WIN_ID_TO_CONTEXT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_WIN_ID_TO_CONTEXT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_ID_TO_CONTEXT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_ID_TO_CONTEXT); + + /* pick the lower 32-bit to extract context id */ + ret = (win_id - 1) & 0xffffffff; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_WIN_ID_TO_CONTEXT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_ID_TO_CONTEXT); + return ret; + } + +-static inline MPIR_Context_id_t MPIDI_CH4U_win_to_context(const MPIR_Win * win) ++static inline MPIR_Context_id_t MPIDIG_win_to_context(const MPIR_Win * win) + { + MPIR_Context_id_t ret; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_WIN_TO_CONTEXT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_WIN_TO_CONTEXT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_TO_CONTEXT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_TO_CONTEXT); + +- ret = MPIDI_CH4U_win_id_to_context(MPIDI_CH4U_WIN(win, win_id)); ++ ret = MPIDIG_win_id_to_context(MPIDIG_WIN(win, win_id)); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_WIN_TO_CONTEXT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_TO_CONTEXT); + return ret; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_request_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_request_complete(MPIR_Request * req) ++MPL_STATIC_INLINE_PREFIX void MPIDIU_request_complete(MPIR_Request * req) + { + int incomplete; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_REQUEST_COMPLETE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_REQUEST_COMPLETE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_REQUEST_COMPLETE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_REQUEST_COMPLETE); + + MPIR_cc_decr(req->cc_ptr, &incomplete); + if (!incomplete) + MPIR_Request_free(req); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_REQUEST_COMPLETE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_REQUEST_COMPLETE); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_win_target_add +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIDI_CH4U_win_target_t *MPIDI_CH4U_win_target_add(MPIR_Win * win, +- int rank) ++MPL_STATIC_INLINE_PREFIX MPIDIG_win_target_t *MPIDIG_win_target_add(MPIR_Win * win, int rank) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_WIN_TARGET_ADD); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_WIN_TARGET_ADD); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_TARGET_ADD); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_TARGET_ADD); + +- MPIDI_CH4U_win_target_t *target_ptr = NULL; +- target_ptr = +- (MPIDI_CH4U_win_target_t *) MPL_malloc(sizeof(MPIDI_CH4U_win_target_t), MPL_MEM_RMA); ++ MPIDIG_win_target_t *target_ptr = NULL; ++ target_ptr = (MPIDIG_win_target_t *) MPL_malloc(sizeof(MPIDIG_win_target_t), MPL_MEM_RMA); ++ MPIR_Assert(target_ptr); + target_ptr->rank = rank; + MPIR_cc_set(&target_ptr->local_cmpl_cnts, 0); + MPIR_cc_set(&target_ptr->remote_cmpl_cnts, 0); + MPIR_cc_set(&target_ptr->remote_acc_cmpl_cnts, 0); + target_ptr->sync.lock.locked = 0; +- target_ptr->sync.access_epoch_type = MPIDI_CH4U_EPOTYPE_NONE; ++ target_ptr->sync.access_epoch_type = MPIDIG_EPOTYPE_NONE; + target_ptr->sync.assert_mode = 0; + +- HASH_ADD(hash_handle, MPIDI_CH4U_WIN(win, targets), rank, sizeof(int), target_ptr, MPL_MEM_RMA); ++ HASH_ADD(hash_handle, MPIDIG_WIN(win, targets), rank, sizeof(int), target_ptr, MPL_MEM_RMA); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_WIN_TARGET_ADD); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_TARGET_ADD); + return target_ptr; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_win_target_find +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIDI_CH4U_win_target_t *MPIDI_CH4U_win_target_find(MPIR_Win * win, +- int rank) ++MPL_STATIC_INLINE_PREFIX MPIDIG_win_target_t *MPIDIG_win_target_find(MPIR_Win * win, int rank) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_WIN_TARGET_FIND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_WIN_TARGET_FIND); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_TARGET_FIND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_TARGET_FIND); + +- MPIDI_CH4U_win_target_t *target_ptr = NULL; +- HASH_FIND(hash_handle, MPIDI_CH4U_WIN(win, targets), &rank, sizeof(int), target_ptr); ++ MPIDIG_win_target_t *target_ptr = NULL; ++ HASH_FIND(hash_handle, MPIDIG_WIN(win, targets), &rank, sizeof(int), target_ptr); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_WIN_TARGET_FIND); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_TARGET_FIND); + return target_ptr; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_win_target_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIDI_CH4U_win_target_t *MPIDI_CH4U_win_target_get(MPIR_Win * win, +- int rank) ++MPL_STATIC_INLINE_PREFIX MPIDIG_win_target_t *MPIDIG_win_target_get(MPIR_Win * win, int rank) + { +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, rank); + if (!target_ptr) +- target_ptr = MPIDI_CH4U_win_target_add(win, rank); ++ target_ptr = MPIDIG_win_target_add(win, rank); + return target_ptr; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_win_target_delete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_win_target_delete(MPIR_Win * win, +- MPIDI_CH4U_win_target_t * target_ptr) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_win_target_delete(MPIR_Win * win, ++ MPIDIG_win_target_t * target_ptr) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_WIN_TARGET_DELETE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_WIN_TARGET_DELETE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_TARGET_DELETE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_TARGET_DELETE); + +- HASH_DELETE(hash_handle, MPIDI_CH4U_WIN(win, targets), target_ptr); ++ HASH_DELETE(hash_handle, MPIDIG_WIN(win, targets), target_ptr); + MPL_free(target_ptr); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_WIN_TARGET_DELETE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_TARGET_DELETE); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_win_target_cleanall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_win_target_cleanall(MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_win_target_cleanall(MPIR_Win * win) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_WIN_TARGET_CLEANALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_WIN_TARGET_CLEANALL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_TARGET_CLEANALL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_TARGET_CLEANALL); + +- MPIDI_CH4U_win_target_t *target_ptr, *tmp; +- HASH_ITER(hash_handle, MPIDI_CH4U_WIN(win, targets), target_ptr, tmp) { +- HASH_DELETE(hash_handle, MPIDI_CH4U_WIN(win, targets), target_ptr); ++ MPIDIG_win_target_t *target_ptr, *tmp; ++ HASH_ITER(hash_handle, MPIDIG_WIN(win, targets), target_ptr, tmp) { ++ HASH_DELETE(hash_handle, MPIDIG_WIN(win, targets), target_ptr); + MPL_free(target_ptr); + } + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_WIN_TARGET_CLEANALL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_TARGET_CLEANALL); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_win_hash_clear +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_win_hash_clear(MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_win_hash_clear(MPIR_Win * win) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_WIN_HASH_CLEAR); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_WIN_HASH_CLEAR); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_HASH_CLEAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_HASH_CLEAR); + +- HASH_CLEAR(hash_handle, MPIDI_CH4U_WIN(win, targets)); ++ HASH_CLEAR(hash_handle, MPIDIG_WIN(win, targets)); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_WIN_HASH_CLEAR); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_HASH_CLEAR); + } + +-#define MPIDI_Datatype_get_info(_count, _datatype, \ +- _dt_contig_out, _data_sz_out, \ +- _dt_ptr, _dt_true_lb) \ ++#define MPIDI_Datatype_get_info(count_, datatype_, \ ++ dt_contig_out_, data_sz_out_, \ ++ dt_ptr_, dt_true_lb_) \ + do { \ +- if (IS_BUILTIN(_datatype)) \ +- { \ +- (_dt_ptr) = NULL; \ +- (_dt_contig_out) = TRUE; \ +- (_dt_true_lb) = 0; \ +- (_data_sz_out) = (size_t)(_count) * \ +- MPIR_Datatype_get_basic_size(_datatype); \ +- } \ +- else \ +- { \ +- MPIR_Datatype_get_ptr((_datatype), (_dt_ptr)); \ +- if (_dt_ptr) \ ++ if (IS_BUILTIN(datatype_)) { \ ++ (dt_ptr_) = NULL; \ ++ (dt_contig_out_) = TRUE; \ ++ (dt_true_lb_) = 0; \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ MPIR_Datatype_get_basic_size(datatype_); \ ++ } else { \ ++ MPIR_Datatype_get_ptr((datatype_), (dt_ptr_)); \ ++ if (dt_ptr_) \ + { \ +- (_dt_contig_out) = (_dt_ptr)->is_contig; \ +- (_dt_true_lb) = (_dt_ptr)->true_lb; \ +- (_data_sz_out) = (size_t)(_count) * \ +- (_dt_ptr)->size; \ ++ (dt_contig_out_) = (dt_ptr_)->is_contig; \ ++ (dt_true_lb_) = (dt_ptr_)->true_lb; \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ (dt_ptr_)->size; \ + } \ + else \ + { \ +- (_dt_contig_out) = 1; \ +- (_dt_true_lb) = 0; \ +- (_data_sz_out) = 0; \ ++ (dt_contig_out_) = 1; \ ++ (dt_true_lb_) = 0; \ ++ (data_sz_out_) = 0; \ + } \ + } \ + } while (0) + +-#define MPIDI_Datatype_get_size_dt_ptr(_count, _datatype, \ +- _data_sz_out, _dt_ptr) \ ++#define MPIDI_Datatype_get_size_dt_ptr(count_, datatype_, \ ++ data_sz_out_, dt_ptr_) \ + do { \ +- if (IS_BUILTIN(_datatype)) \ +- { \ +- (_dt_ptr) = NULL; \ +- (_data_sz_out) = (size_t)(_count) * \ +- MPIR_Datatype_get_basic_size(_datatype); \ +- } \ +- else \ +- { \ +- MPIR_Datatype_get_ptr((_datatype), (_dt_ptr)); \ +- (_data_sz_out) = (_dt_ptr) ? (size_t)(_count) * \ +- (_dt_ptr)->size : 0; \ ++ if (IS_BUILTIN(datatype_)) { \ ++ (dt_ptr_) = NULL; \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ MPIR_Datatype_get_basic_size(datatype_); \ ++ } else { \ ++ MPIR_Datatype_get_ptr((datatype_), (dt_ptr_)); \ ++ (data_sz_out_) = (dt_ptr_) ? (size_t)(count_) * \ ++ (dt_ptr_)->size : 0; \ + } \ + } while (0) + +-#define MPIDI_Datatype_check_contig(_datatype,_dt_contig_out) \ ++#define MPIDI_Datatype_check_contig(datatype_,dt_contig_out_) \ + do { \ +- if (IS_BUILTIN(_datatype)) \ +- { \ +- (_dt_contig_out) = TRUE; \ +- } \ +- else \ +- { \ +- MPIR_Datatype *_dt_ptr; \ +- MPIR_Datatype_get_ptr((_datatype), (_dt_ptr)); \ +- (_dt_contig_out) = (_dt_ptr) ? (_dt_ptr)->is_contig : 1; \ ++ if (IS_BUILTIN(datatype_)) { \ ++ (dt_contig_out_) = TRUE; \ ++ } else { \ ++ MPIR_Datatype *dt_ptr_; \ ++ MPIR_Datatype_get_ptr((datatype_), (dt_ptr_)); \ ++ (dt_contig_out_) = (dt_ptr_) ? (dt_ptr_)->is_contig : 1; \ + } \ + } while (0) + +-#define MPIDI_Datatype_check_contig_size(_datatype,_count, \ +- _dt_contig_out, \ +- _data_sz_out) \ ++#define MPIDI_Datatype_check_contig_size(datatype_,count_, \ ++ dt_contig_out_, \ ++ data_sz_out_) \ + do { \ +- if (IS_BUILTIN(_datatype)) \ +- { \ +- (_dt_contig_out) = TRUE; \ +- (_data_sz_out) = (size_t)(_count) * \ +- MPIR_Datatype_get_basic_size(_datatype); \ +- } \ +- else \ +- { \ +- MPIR_Datatype *_dt_ptr; \ +- MPIR_Datatype_get_ptr((_datatype), (_dt_ptr)); \ +- if (_dt_ptr) \ +- { \ +- (_dt_contig_out) = (_dt_ptr)->is_contig; \ +- (_data_sz_out) = (size_t)(_count) * \ +- (_dt_ptr)->size; \ +- } \ +- else \ +- { \ +- (_dt_contig_out) = 1; \ +- (_data_sz_out) = 0; \ ++ if (IS_BUILTIN(datatype_)) { \ ++ (dt_contig_out_) = TRUE; \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ MPIR_Datatype_get_basic_size(datatype_); \ ++ } else { \ ++ MPIR_Datatype *dt_ptr_; \ ++ MPIR_Datatype_get_ptr((datatype_), (dt_ptr_)); \ ++ if (dt_ptr_) { \ ++ (dt_contig_out_) = (dt_ptr_)->is_contig; \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ (dt_ptr_)->size; \ ++ } else { \ ++ (dt_contig_out_) = 1; \ ++ (data_sz_out_) = 0; \ + } \ + } \ + } while (0) + +-#define MPIDI_Datatype_check_size(_datatype,_count,_data_sz_out) \ ++#define MPIDI_Datatype_check_size(datatype_,count_,data_sz_out_) \ + do { \ +- if (IS_BUILTIN(_datatype)) \ +- { \ +- (_data_sz_out) = (size_t)(_count) * \ +- MPIR_Datatype_get_basic_size(_datatype); \ +- } \ +- else \ +- { \ +- MPIR_Datatype *_dt_ptr; \ +- MPIR_Datatype_get_ptr((_datatype), (_dt_ptr)); \ +- (_data_sz_out) = (_dt_ptr) ? (size_t)(_count) * \ +- (_dt_ptr)->size : 0; \ ++ if (IS_BUILTIN(datatype_)) { \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ MPIR_Datatype_get_basic_size(datatype_); \ ++ } else { \ ++ MPIR_Datatype *dt_ptr_; \ ++ MPIR_Datatype_get_ptr((datatype_), (dt_ptr_)); \ ++ (data_sz_out_) = (dt_ptr_) ? (size_t)(count_) * \ ++ (dt_ptr_)->size : 0; \ + } \ + } while (0) + +-#define MPIDI_Datatype_check_size_lb(_datatype,_count,_data_sz_out, \ +- _dt_true_lb) \ ++#define MPIDI_Datatype_check_size_lb(datatype_,count_,data_sz_out_, \ ++ dt_true_lb_) \ + do { \ +- if (IS_BUILTIN(_datatype)) { \ +- (_data_sz_out) = (size_t)(_count) * \ +- MPIR_Datatype_get_basic_size(_datatype); \ +- (_dt_true_lb) = 0; \ ++ if (IS_BUILTIN(datatype_)) { \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ MPIR_Datatype_get_basic_size(datatype_); \ ++ (dt_true_lb_) = 0; \ + } else { \ +- MPIR_Datatype *_dt_ptr; \ +- MPIR_Datatype_get_ptr((_datatype), (_dt_ptr)); \ +- (_data_sz_out) = (_dt_ptr) ? (size_t)(_count) * \ +- (_dt_ptr)->size : 0; \ +- (_dt_true_lb) = (_dt_ptr) ? (_dt_ptr)->true_lb : 0; \ ++ MPIR_Datatype *dt_ptr_; \ ++ MPIR_Datatype_get_ptr((datatype_), (dt_ptr_)); \ ++ (data_sz_out_) = (dt_ptr_) ? (size_t)(count_) * \ ++ (dt_ptr_)->size : 0; \ ++ (dt_true_lb_) = (dt_ptr_) ? (dt_ptr_)->true_lb : 0; \ + } \ + } while (0) + +-#define MPIDI_Datatype_check_contig_size_lb(_datatype,_count, \ +- _dt_contig_out, \ +- _data_sz_out, \ +- _dt_true_lb) \ ++#define MPIDI_Datatype_check_contig_size_lb(datatype_,count_, \ ++ dt_contig_out_, \ ++ data_sz_out_, \ ++ dt_true_lb_) \ + do { \ +- if (IS_BUILTIN(_datatype)) \ +- { \ +- (_dt_contig_out) = TRUE; \ +- (_data_sz_out) = (size_t)(_count) * \ +- MPIR_Datatype_get_basic_size(_datatype); \ +- (_dt_true_lb) = 0; \ +- } \ +- else \ +- { \ +- MPIR_Datatype *_dt_ptr; \ +- MPIR_Datatype_get_ptr((_datatype), (_dt_ptr)); \ +- if (_dt_ptr) \ +- { \ +- (_dt_contig_out) = (_dt_ptr)->is_contig; \ +- (_data_sz_out) = (size_t)(_count) * \ +- (_dt_ptr)->size; \ +- (_dt_true_lb) = (_dt_ptr)->true_lb; \ +- } \ +- else \ +- { \ +- (_dt_contig_out) = 1; \ +- (_data_sz_out) = 0; \ +- (_dt_true_lb) = 0; \ ++ if (IS_BUILTIN(datatype_)) { \ ++ (dt_contig_out_) = TRUE; \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ MPIR_Datatype_get_basic_size(datatype_); \ ++ (dt_true_lb_) = 0; \ ++ } else { \ ++ MPIR_Datatype *dt_ptr_; \ ++ MPIR_Datatype_get_ptr((datatype_), (dt_ptr_)); \ ++ if (dt_ptr_) { \ ++ (dt_contig_out_) = (dt_ptr_)->is_contig; \ ++ (data_sz_out_) = (size_t)(count_) * \ ++ (dt_ptr_)->size; \ ++ (dt_true_lb_) = (dt_ptr_)->true_lb; \ ++ } else { \ ++ (dt_contig_out_) = 1; \ ++ (data_sz_out_) = 0; \ ++ (dt_true_lb_) = 0; \ + } \ + } \ + } while (0) + ++/* Check both origin|target buffers' size. */ ++#define MPIDI_Datatype_check_origin_target_size(o_datatype_, t_datatype_, \ ++ o_count_, t_count_, \ ++ o_data_sz_out_, t_data_sz_out_) \ ++ do { \ ++ MPIDI_Datatype_check_size(o_datatype_, o_count_, o_data_sz_out_); \ ++ if (t_datatype_ == o_datatype_ && t_count_ == o_count_) { \ ++ t_data_sz_out_ = o_data_sz_out_; \ ++ } else { \ ++ MPIDI_Datatype_check_size(t_datatype_, t_count_, t_data_sz_out_); \ ++ } \ ++ } while (0) ++ ++/* Check both origin|target buffers' size, contig and lb. */ ++#define MPIDI_Datatype_check_origin_target_contig_size_lb(o_datatype_, t_datatype_, \ ++ o_count_, t_count_, \ ++ o_dt_contig_out_, t_dt_contig_out_, \ ++ o_data_sz_out_, t_data_sz_out_, \ ++ o_dt_true_lb_, t_dt_true_lb_) \ ++ do { \ ++ MPIDI_Datatype_check_contig_size_lb(o_datatype_, o_count_, o_dt_contig_out_, \ ++ o_data_sz_out_, o_dt_true_lb_); \ ++ if (t_datatype_ == o_datatype_ && t_count_ == o_count_) { \ ++ t_dt_contig_out_ = o_dt_contig_out_; \ ++ t_data_sz_out_ = o_data_sz_out_; \ ++ t_dt_true_lb_ = o_dt_true_lb_; \ ++ } \ ++ else { \ ++ MPIDI_Datatype_check_contig_size_lb(t_datatype_, t_count_, t_dt_contig_out_, \ ++ t_data_sz_out_, t_dt_true_lb_); \ ++ } \ ++ } while (0) ++ + #define MPIDI_Request_create_null_rreq(rreq_, mpi_errno_, FAIL_) \ + do { \ + (rreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__RECV); \ +@@ -419,19 +377,15 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_win_hash_clear(MPIR_Win * win) + #define IS_BUILTIN(_datatype) \ + (HANDLE_GET_KIND(_datatype) == HANDLE_KIND_BUILTIN) + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4I_valid_group_rank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4I_valid_group_rank(MPIR_Comm * comm, int rank, MPIR_Group * grp) ++static inline int MPIDIU_valid_group_rank(MPIR_Comm * comm, int rank, MPIR_Group * grp) + { + int lpid; + int size = grp->size; + int z; + int ret; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_VALID_GROUP_RANK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_VALID_GROUP_RANK); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_VALID_GROUP_RANK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_VALID_GROUP_RANK); + + if (unlikely(rank == MPI_PROC_NULL)) { + /* Treat PROC_NULL as always valid */ +@@ -447,7 +401,7 @@ static inline int MPIDI_CH4I_valid_group_rank(MPIR_Comm * comm, int rank, MPIR_G + ret = (z < size); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_VALID_GROUP_RANK); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_VALID_GROUP_RANK); + return ret; + } + +@@ -456,41 +410,41 @@ static inline int MPIDI_CH4I_valid_group_rank(MPIR_Comm * comm, int rank, MPIR_G + * insert it here for simplicity, but this might not be the best place. One + * needs to investigate the appropriate place to yield the lock. */ + +-#define MPIDI_CH4R_PROGRESS() \ ++#define MPIDIU_PROGRESS() \ + do { \ + mpi_errno = MPID_Progress_test(); \ + if (mpi_errno != MPI_SUCCESS) MPIR_ERR_POP(mpi_errno); \ + MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); \ + } while (0) + +-#define MPIDI_CH4R_PROGRESS_WHILE(cond) \ ++#define MPIDIU_PROGRESS_WHILE(cond) \ + do { \ + while (cond) \ +- MPIDI_CH4R_PROGRESS(); \ ++ MPIDIU_PROGRESS(); \ + } while (0) + + #ifdef HAVE_ERROR_CHECKING +-#define MPIDI_CH4U_EPOCH_CHECK_SYNC(win, mpi_errno, stmt) \ ++#define MPIDIG_EPOCH_CHECK_SYNC(win, mpi_errno, stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- if (MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_NONE || \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_POST) \ ++ if (MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_NONE || \ ++ MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_POST) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ + stmt, "**rmasync"); \ + MPID_END_ERROR_CHECKS; \ + } while (0) + + /* Checking per-target sync status for pscw or lock epoch. */ +-#define MPIDI_CH4U_EPOCH_CHECK_TARGET_SYNC(win,target_rank,mpi_errno,stmt) \ ++#define MPIDIG_EPOCH_CHECK_TARGET_SYNC(win,target_rank,mpi_errno,stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, target_rank); \ +- if ((MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_START && \ +- !MPIDI_CH4I_valid_group_rank(win->comm_ptr, target_rank, \ +- MPIDI_CH4U_WIN(win, sync).sc.group)) || \ ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, target_rank); \ ++ if ((MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_START && \ ++ !MPIDIU_valid_group_rank(win->comm_ptr, target_rank, \ ++ MPIDIG_WIN(win, sync).sc.group)) || \ + (target_ptr != NULL && \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_LOCK && \ +- target_ptr->sync.access_epoch_type != MPIDI_CH4U_EPOTYPE_LOCK)) \ ++ MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_LOCK && \ ++ target_ptr->sync.access_epoch_type != MPIDIG_EPOTYPE_LOCK)) \ + MPIR_ERR_SETANDSTMT(mpi_errno, \ + MPI_ERR_RMA_SYNC, \ + stmt, \ +@@ -498,41 +452,41 @@ static inline int MPIDI_CH4I_valid_group_rank(MPIR_Comm * comm, int rank, MPIR_G + MPID_END_ERROR_CHECKS; \ + } while (0) + +-#define MPIDI_CH4U_EPOCH_CHECK_PASSIVE(win,mpi_errno,stmt) \ ++#define MPIDIG_EPOCH_CHECK_PASSIVE(win,mpi_errno,stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- if ((MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_LOCK) && \ +- (MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_LOCK_ALL)) \ ++ if ((MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_LOCK) && \ ++ (MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_LOCK_ALL)) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ + stmt, "**rmasync"); \ + MPID_END_ERROR_CHECKS; \ + } while (0) + + /* NOTE: unlock/flush/flush_local needs to check per-target passive epoch (lock) */ +-#define MPIDI_CH4U_EPOCH_CHECK_TARGET_LOCK(target_ptr,mpi_errno,stmt) \ ++#define MPIDIG_EPOCH_CHECK_TARGET_LOCK(target_ptr,mpi_errno,stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- if (target_ptr->sync.access_epoch_type != MPIDI_CH4U_EPOTYPE_LOCK) \ ++ if (target_ptr->sync.access_epoch_type != MPIDIG_EPOTYPE_LOCK) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ + stmt, "**rmasync"); \ + MPID_END_ERROR_CHECKS; \ + } while (0) + +-#define MPIDI_CH4U_ACCESS_EPOCH_CHECK_NONE(win,mpi_errno,stmt) \ ++#define MPIDIG_ACCESS_EPOCH_CHECK_NONE(win,mpi_errno,stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- if (MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_NONE && \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_REFENCE) \ ++ if (MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_NONE && \ ++ MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_REFENCE) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ + stmt, "**rmasync"); \ + MPID_END_ERROR_CHECKS; \ + } while (0) + +-#define MPIDI_CH4U_EXPOSURE_EPOCH_CHECK_NONE(win,mpi_errno,stmt) \ ++#define MPIDIG_EXPOSURE_EPOCH_CHECK_NONE(win,mpi_errno,stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- if (MPIDI_CH4U_WIN(win, sync).exposure_epoch_type != MPIDI_CH4U_EPOTYPE_NONE && \ +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type != MPIDI_CH4U_EPOTYPE_REFENCE) \ ++ if (MPIDIG_WIN(win, sync).exposure_epoch_type != MPIDIG_EPOTYPE_NONE && \ ++ MPIDIG_WIN(win, sync).exposure_epoch_type != MPIDIG_EPOTYPE_REFENCE) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ + stmt, "**rmasync"); \ + MPID_END_ERROR_CHECKS; \ +@@ -540,13 +494,13 @@ static inline int MPIDI_CH4I_valid_group_rank(MPIR_Comm * comm, int rank, MPIR_G + + /* NOTE: multiple lock access epochs can occur simultaneously, as long as + * target to different processes */ +-#define MPIDI_CH4U_LOCK_EPOCH_CHECK_NONE(win,rank,mpi_errno,stmt) \ ++#define MPIDIG_LOCK_EPOCH_CHECK_NONE(win,rank,mpi_errno,stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, rank); \ +- if (MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_NONE && \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_REFENCE && \ +- !(MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_LOCK && \ ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, rank); \ ++ if (MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_NONE && \ ++ MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_REFENCE && \ ++ !(MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_LOCK && \ + (target_ptr == NULL || (!MPIR_CVAR_CH4_RMA_MEM_EFFICIENT && \ + target_ptr->sync.lock.locked == 0)))) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ +@@ -554,84 +508,83 @@ static inline int MPIDI_CH4I_valid_group_rank(MPIR_Comm * comm, int rank, MPIR_G + MPID_END_ERROR_CHECKS; \ + } while (0) + +-#define MPIDI_CH4U_FENCE_EPOCH_CHECK(win,mpi_errno,stmt) \ ++#define MPIDIG_FENCE_EPOCH_CHECK(win,mpi_errno,stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- if ((MPIDI_CH4U_WIN(win, sync).exposure_epoch_type != MPIDI_CH4U_EPOTYPE_FENCE && \ +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type != MPIDI_CH4U_EPOTYPE_REFENCE && \ +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type != MPIDI_CH4U_EPOTYPE_NONE) || \ +- (MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_FENCE && \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_REFENCE && \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type != MPIDI_CH4U_EPOTYPE_NONE)) \ ++ if ((MPIDIG_WIN(win, sync).exposure_epoch_type != MPIDIG_EPOTYPE_FENCE && \ ++ MPIDIG_WIN(win, sync).exposure_epoch_type != MPIDIG_EPOTYPE_REFENCE && \ ++ MPIDIG_WIN(win, sync).exposure_epoch_type != MPIDIG_EPOTYPE_NONE) || \ ++ (MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_FENCE && \ ++ MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_REFENCE && \ ++ MPIDIG_WIN(win, sync).access_epoch_type != MPIDIG_EPOTYPE_NONE)) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ + stmt, "**rmasync"); \ + MPID_END_ERROR_CHECKS; \ + } while (0) + +-#define MPIDI_CH4U_ACCESS_EPOCH_CHECK(win, epoch_type, mpi_errno, stmt) \ ++#define MPIDIG_ACCESS_EPOCH_CHECK(win, epoch_type, mpi_errno, stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- if (MPIDI_CH4U_WIN(win, sync).access_epoch_type != epoch_type) \ ++ if (MPIDIG_WIN(win, sync).access_epoch_type != epoch_type) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ + stmt, "**rmasync"); \ + MPID_END_ERROR_CHECKS; \ + } while (0) + +-#define MPIDI_CH4U_EXPOSURE_EPOCH_CHECK(win, epoch_type, mpi_errno, stmt) \ ++#define MPIDIG_EXPOSURE_EPOCH_CHECK(win, epoch_type, mpi_errno, stmt) \ + do { \ + MPID_BEGIN_ERROR_CHECKS; \ +- if (MPIDI_CH4U_WIN(win, sync).exposure_epoch_type != epoch_type) \ ++ if (MPIDIG_WIN(win, sync).exposure_epoch_type != epoch_type) \ + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, \ + stmt, "**rmasync"); \ + MPID_END_ERROR_CHECKS; \ + } while (0) + + #else /* HAVE_ERROR_CHECKING */ +-#define MPIDI_CH4U_EPOCH_CHECK_SYNC(win, mpi_errno, stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_EPOCH_CHECK_TARGET_SYNC(win, target_rank, mpi_errno, stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_EPOCH_CHECK_PASSIVE(win, mpi_errno, stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_EPOCH_CHECK_TARGET_LOCK(target_ptr, mpi_errno, stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_ACCESS_EPOCH_CHECK_NONE(win, mpi_errno, stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_EXPOSURE_EPOCH_CHECK_NONE(win, mpi_errno, stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_LOCK_EPOCH_CHECK_NONE(win,rank,mpi_errno,stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_FENCE_EPOCH_CHECK(win, mpi_errno, stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_ACCESS_EPOCH_CHECK(win, epoch_type, mpi_errno, stmt) if (0) goto fn_fail; +-#define MPIDI_CH4U_EXPOSURE_EPOCH_CHECK(win, epoch_type, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_EPOCH_CHECK_SYNC(win, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_EPOCH_CHECK_TARGET_SYNC(win, target_rank, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_EPOCH_CHECK_PASSIVE(win, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_EPOCH_CHECK_TARGET_LOCK(target_ptr, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_ACCESS_EPOCH_CHECK_NONE(win, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_EXPOSURE_EPOCH_CHECK_NONE(win, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_LOCK_EPOCH_CHECK_NONE(win,rank,mpi_errno,stmt) if (0) goto fn_fail; ++#define MPIDIG_FENCE_EPOCH_CHECK(win, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_ACCESS_EPOCH_CHECK(win, epoch_type, mpi_errno, stmt) if (0) goto fn_fail; ++#define MPIDIG_EXPOSURE_EPOCH_CHECK(win, epoch_type, mpi_errno, stmt) if (0) goto fn_fail; + #endif /* HAVE_ERROR_CHECKING */ + +-#define MPIDI_CH4U_EPOCH_FENCE_EVENT(win, massert) \ ++#define MPIDIG_EPOCH_FENCE_EVENT(win, massert) \ + do { \ + if (massert & MPI_MODE_NOSUCCEED) \ + { \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_NONE; \ +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type = MPIDI_CH4U_EPOTYPE_NONE; \ ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_NONE; \ ++ MPIDIG_WIN(win, sync).exposure_epoch_type = MPIDIG_EPOTYPE_NONE; \ + } \ + else \ + { \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_REFENCE; \ +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type = MPIDI_CH4U_EPOTYPE_REFENCE; \ ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_REFENCE; \ ++ MPIDIG_WIN(win, sync).exposure_epoch_type = MPIDIG_EPOTYPE_REFENCE; \ + } \ + } while (0) + +-#define MPIDI_CH4U_EPOCH_OP_REFENCE(win) \ ++#define MPIDIG_EPOCH_OP_REFENCE(win) \ + do { \ +- if (MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_REFENCE && \ +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type == MPIDI_CH4U_EPOTYPE_REFENCE) \ ++ if (MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_REFENCE && \ ++ MPIDIG_WIN(win, sync).exposure_epoch_type == MPIDIG_EPOTYPE_REFENCE) \ + { \ +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_FENCE; \ +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type = MPIDI_CH4U_EPOTYPE_FENCE; \ ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_FENCE; \ ++ MPIDIG_WIN(win, sync).exposure_epoch_type = MPIDIG_EPOTYPE_FENCE; \ + } \ + } while (0) + + /* Generic routine for checking synchronization at every RMA operation.*/ +-#define MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win) \ ++#define MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win) \ + do { \ +- MPIDI_CH4U_EPOCH_CHECK_SYNC(win, mpi_errno, goto fn_fail); \ +- MPIDI_CH4U_EPOCH_OP_REFENCE(win); \ ++ MPIDIG_EPOCH_CHECK_SYNC(win, mpi_errno, goto fn_fail); \ ++ MPIDIG_EPOCH_OP_REFENCE(win); \ + /* Check target sync status for any target_rank except PROC_NULL. */ \ + if (target_rank != MPI_PROC_NULL) \ +- MPIDI_CH4U_EPOCH_CHECK_TARGET_SYNC(win, target_rank, mpi_errno, \ +- goto fn_fail); \ ++ MPIDIG_EPOCH_CHECK_TARGET_SYNC(win, target_rank, mpi_errno, goto fn_fail); \ + } while (0); + + /* +@@ -639,57 +592,53 @@ static inline int MPIDI_CH4I_valid_group_rank(MPIR_Comm * comm, int rank, MPIR_G + Return zero to let the target side calculate the actual address + (only offset from window base is given to the target in this case) + */ +-static inline uintptr_t MPIDI_CH4I_win_base_at_origin(const MPIR_Win * win, int target_rank) ++static inline uintptr_t MPIDIG_win_base_at_origin(const MPIR_Win * win, int target_rank) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_WIN_BASE_AT_ORIGIN); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_WIN_BASE_AT_ORIGIN); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_WIN_BASE_AT_ORIGIN); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_WIN_BASE_AT_ORIGIN); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_WIN_BASE_AT_ORIGIN); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_WIN_BASE_AT_ORIGIN); + + /* TODO: In future we may want to calculate the full virtual address + * in the target at the origin side. It can be done by looking at +- * MPIDI_CH4U_WINFO(win, target_rank)->base_addr */ ++ * MPIDIG_WINFO(win, target_rank)->base_addr */ + return 0; + } + + /* + Calculate base address of the window at the target side +- If MPIDI_CH4I_win_base_at_origin calculates the full virtual address ++ If MPIDIG_win_base_at_origin calculates the full virtual address + this function must return zero + */ +-static inline uintptr_t MPIDI_CH4I_win_base_at_target(const MPIR_Win * win) ++static inline uintptr_t MPIDIG_win_base_at_target(const MPIR_Win * win) + { + uintptr_t ret; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_WIN_BASE_AT_TARGET); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_WIN_BASE_AT_TARGET); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_BASE_AT_TARGET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_BASE_AT_TARGET); + + ret = (uintptr_t) win->base; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_WIN_BASE_AT_TARGET); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_BASE_AT_TARGET); + return ret; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_cmpl_cnts_incr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_cmpl_cnts_incr(MPIR_Win * win, int target_rank, +- MPIR_cc_t ** local_cmpl_cnts_ptr) ++static inline void MPIDIG_win_cmpl_cnts_incr(MPIR_Win * win, int target_rank, ++ MPIR_cc_t ** local_cmpl_cnts_ptr) + { + int c = 0; + + /* Increase per-window counters for fence, and per-target counters for + * all other synchronization. */ +- switch (MPIDI_CH4U_WIN(win, sync).access_epoch_type) { +- case MPIDI_CH4U_EPOTYPE_LOCK: ++ switch (MPIDIG_WIN(win, sync).access_epoch_type) { ++ case MPIDIG_EPOTYPE_LOCK: + /* FIXME: now we simply set per-target counters for lockall in case + * user flushes per target, but this should be optimized. */ +- case MPIDI_CH4U_EPOTYPE_LOCK_ALL: ++ case MPIDIG_EPOTYPE_LOCK_ALL: + /* FIXME: now we simply set per-target counters for PSCW, can it be optimized ? */ +- case MPIDI_CH4U_EPOTYPE_START: ++ case MPIDIG_EPOTYPE_START: + { +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_get(win, target_rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_get(win, target_rank); + + MPIR_cc_incr(&target_ptr->local_cmpl_cnts, &c); + MPIR_cc_incr(&target_ptr->remote_cmpl_cnts, &c); +@@ -698,100 +647,84 @@ static inline void MPIDI_win_cmpl_cnts_incr(MPIR_Win * win, int target_rank, + break; + } + default: +- MPIR_cc_incr(&MPIDI_CH4U_WIN(win, local_cmpl_cnts), &c); +- MPIR_cc_incr(&MPIDI_CH4U_WIN(win, remote_cmpl_cnts), &c); ++ MPIR_cc_incr(&MPIDIG_WIN(win, local_cmpl_cnts), &c); ++ MPIR_cc_incr(&MPIDIG_WIN(win, remote_cmpl_cnts), &c); + +- *local_cmpl_cnts_ptr = &MPIDI_CH4U_WIN(win, local_cmpl_cnts); ++ *local_cmpl_cnts_ptr = &MPIDIG_WIN(win, local_cmpl_cnts); + break; + } + } + + /* Increase counter for active message acc ops. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_remote_acc_cmpl_cnt_incr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_win_remote_acc_cmpl_cnt_incr(MPIR_Win * win, int target_rank) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_win_remote_acc_cmpl_cnt_incr(MPIR_Win * win, int target_rank) + { + int c = 0; +- switch (MPIDI_CH4U_WIN(win, sync).access_epoch_type) { +- case MPIDI_CH4U_EPOTYPE_LOCK: +- case MPIDI_CH4U_EPOTYPE_LOCK_ALL: +- case MPIDI_CH4U_EPOTYPE_START: ++ switch (MPIDIG_WIN(win, sync).access_epoch_type) { ++ case MPIDIG_EPOTYPE_LOCK: ++ case MPIDIG_EPOTYPE_LOCK_ALL: ++ case MPIDIG_EPOTYPE_START: + { +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_get(win, target_rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_get(win, target_rank); + MPIR_cc_incr(&target_ptr->remote_acc_cmpl_cnts, &c); + break; + } + default: +- MPIR_cc_incr(&MPIDI_CH4U_WIN(win, remote_acc_cmpl_cnts), &c); ++ MPIR_cc_incr(&MPIDIG_WIN(win, remote_acc_cmpl_cnts), &c); + break; + } + } + + /* Decrease counter for active message acc ops. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_remote_acc_cmpl_cnt_decr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_win_remote_acc_cmpl_cnt_decr(MPIR_Win * win, int target_rank) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_win_remote_acc_cmpl_cnt_decr(MPIR_Win * win, int target_rank) + { + int c = 0; +- switch (MPIDI_CH4U_WIN(win, sync).access_epoch_type) { +- case MPIDI_CH4U_EPOTYPE_LOCK: +- case MPIDI_CH4U_EPOTYPE_LOCK_ALL: +- case MPIDI_CH4U_EPOTYPE_START: ++ switch (MPIDIG_WIN(win, sync).access_epoch_type) { ++ case MPIDIG_EPOTYPE_LOCK: ++ case MPIDIG_EPOTYPE_LOCK_ALL: ++ case MPIDIG_EPOTYPE_START: + { +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, target_rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, target_rank); + MPIR_Assert(target_ptr); + MPIR_cc_decr(&target_ptr->remote_acc_cmpl_cnts, &c); + break; + } + default: +- MPIR_cc_decr(&MPIDI_CH4U_WIN(win, remote_acc_cmpl_cnts), &c); ++ MPIR_cc_decr(&MPIDIG_WIN(win, remote_acc_cmpl_cnts), &c); + break; + } + + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_remote_cmpl_cnt_decr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_remote_cmpl_cnt_decr(MPIR_Win * win, int target_rank) ++static inline void MPIDIG_win_remote_cmpl_cnt_decr(MPIR_Win * win, int target_rank) + { + int c = 0; + + /* Decrease per-window counter for fence, and per-target counters for + * all other synchronization. */ +- switch (MPIDI_CH4U_WIN(win, sync).access_epoch_type) { +- case MPIDI_CH4U_EPOTYPE_LOCK: +- case MPIDI_CH4U_EPOTYPE_LOCK_ALL: +- case MPIDI_CH4U_EPOTYPE_START: ++ switch (MPIDIG_WIN(win, sync).access_epoch_type) { ++ case MPIDIG_EPOTYPE_LOCK: ++ case MPIDIG_EPOTYPE_LOCK_ALL: ++ case MPIDIG_EPOTYPE_START: + { +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, target_rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, target_rank); + MPIR_Assert(target_ptr); + MPIR_cc_decr(&target_ptr->remote_cmpl_cnts, &c); + break; + } + default: +- MPIR_cc_decr(&MPIDI_CH4U_WIN(win, remote_cmpl_cnts), &c); ++ MPIR_cc_decr(&MPIDIG_WIN(win, remote_cmpl_cnts), &c); + break; + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_check_all_targets_remote_completed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_check_all_targets_remote_completed(MPIR_Win * win, int *allcompleted) ++static inline void MPIDIG_win_check_all_targets_remote_completed(MPIR_Win * win, int *allcompleted) + { + int rank = 0; + + *allcompleted = 1; +- MPIDI_CH4U_win_target_t *target_ptr = NULL; ++ MPIDIG_win_target_t *target_ptr = NULL; + for (rank = 0; rank < win->comm_ptr->local_size; rank++) { +- target_ptr = MPIDI_CH4U_win_target_find(win, rank); ++ target_ptr = MPIDIG_win_target_find(win, rank); + if (!target_ptr) + continue; + if (MPIR_cc_get(target_ptr->remote_cmpl_cnts) != 0) { +@@ -801,18 +734,14 @@ static inline void MPIDI_win_check_all_targets_remote_completed(MPIR_Win * win, + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_check_all_targets_local_completed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_check_all_targets_local_completed(MPIR_Win * win, int *allcompleted) ++static inline void MPIDIG_win_check_all_targets_local_completed(MPIR_Win * win, int *allcompleted) + { + int rank = 0; + + *allcompleted = 1; +- MPIDI_CH4U_win_target_t *target_ptr = NULL; ++ MPIDIG_win_target_t *target_ptr = NULL; + for (rank = 0; rank < win->comm_ptr->local_size; rank++) { +- target_ptr = MPIDI_CH4U_win_target_find(win, rank); ++ target_ptr = MPIDIG_win_target_find(win, rank); + if (!target_ptr) + continue; + if (MPIR_cc_get(target_ptr->local_cmpl_cnts) != 0) { +@@ -822,21 +751,17 @@ static inline void MPIDI_win_check_all_targets_local_completed(MPIR_Win * win, i + } + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_check_group_local_completed +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_check_group_local_completed(MPIR_Win * win, +- int *ranks_in_win_grp, +- int grp_siz, int *allcompleted) ++static inline void MPIDIG_win_check_group_local_completed(MPIR_Win * win, ++ int *ranks_in_win_grp, ++ int grp_siz, int *allcompleted) + { + int i = 0; + + *allcompleted = 1; +- MPIDI_CH4U_win_target_t *target_ptr = NULL; ++ MPIDIG_win_target_t *target_ptr = NULL; + for (i = 0; i < grp_siz; i++) { + int rank = ranks_in_win_grp[i]; +- target_ptr = MPIDI_CH4U_win_target_find(win, rank); ++ target_ptr = MPIDIG_win_target_find(win, rank); + if (!target_ptr) + continue; + if (MPIR_cc_get(target_ptr->local_cmpl_cnts) != 0) { +@@ -847,228 +772,135 @@ static inline void MPIDI_win_check_group_local_completed(MPIR_Win * win, + } + + /* Map function interfaces in CH4 level */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_map_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_map_create(void **out_map, MPL_memory_class class) ++MPL_STATIC_INLINE_PREFIX void MPIDIU_map_create(void **out_map, MPL_memory_class class) + { +- MPIDI_CH4U_map_t *map; +- map = MPL_malloc(sizeof(MPIDI_CH4U_map_t), class); ++ MPIDIU_map_t *map; ++ map = MPL_malloc(sizeof(MPIDIU_map_t), class); + MPIR_Assert(map != NULL); + map->head = NULL; + *out_map = map; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_map_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_map_destroy(void *in_map) ++MPL_STATIC_INLINE_PREFIX void MPIDIU_map_destroy(void *in_map) + { +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_UTIL_MUTEX); +- MPIDI_CH4U_map_t *map = in_map; ++ MPIDIU_map_t *map = in_map; ++ MPIDIU_map_entry_t *e, *etmp; ++ HASH_ITER(hh, map->head, e, etmp) { ++ /* Free all remaining entries in the hash */ ++ HASH_DELETE(hh, map->head, e); ++ MPL_free(e); ++ } + HASH_CLEAR(hh, map->head); + MPL_free(map); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_UTIL_MUTEX); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_map_set +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_map_set(void *in_map, uint64_t id, void *val, +- MPL_memory_class class) ++MPL_STATIC_INLINE_PREFIX void MPIDIU_map_set_unsafe(void *in_map, uint64_t id, void *val, ++ MPL_memory_class class) + { +- MPIDI_CH4U_map_t *map; +- MPIDI_CH4U_map_entry_t *map_entry; +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_UTIL_MUTEX); +- map = (MPIDI_CH4U_map_t *) in_map; +- map_entry = MPL_malloc(sizeof(MPIDI_CH4U_map_entry_t), class); ++ MPIDIU_map_t *map; ++ MPIDIU_map_entry_t *map_entry; ++ /* MPIDIU_MAP_NOT_FOUND may be used as a special value to indicate an error. */ ++ MPIR_Assert(val != MPIDIU_MAP_NOT_FOUND); ++ map = (MPIDIU_map_t *) in_map; ++ map_entry = MPL_malloc(sizeof(MPIDIU_map_entry_t), class); + MPIR_Assert(map_entry != NULL); + map_entry->key = id; + map_entry->value = val; + HASH_ADD(hh, map->head, key, sizeof(uint64_t), map_entry, class); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_UTIL_MUTEX); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_map_erase +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_map_erase(void *in_map, uint64_t id) ++/* Sets a (id -> val) pair into the map, assuming there's no entry with `id`. */ ++MPL_STATIC_INLINE_PREFIX void MPIDIU_map_set(void *in_map, uint64_t id, void *val, ++ MPL_memory_class class) + { +- MPIDI_CH4U_map_t *map; +- MPIDI_CH4U_map_entry_t *map_entry; +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_UTIL_MUTEX); +- map = (MPIDI_CH4U_map_t *) in_map; ++ MPID_THREAD_CS_ENTER(POBJ, MPIDIU_THREAD_UTIL_MUTEX); ++ MPIDIU_map_set_unsafe(in_map, id, val, class); ++ MPID_THREAD_CS_EXIT(POBJ, MPIDIU_THREAD_UTIL_MUTEX); ++} ++ ++MPL_STATIC_INLINE_PREFIX void MPIDIU_map_erase(void *in_map, uint64_t id) ++{ ++ MPIDIU_map_t *map; ++ MPIDIU_map_entry_t *map_entry; ++ map = (MPIDIU_map_t *) in_map; + HASH_FIND(hh, map->head, &id, sizeof(uint64_t), map_entry); + MPIR_Assert(map_entry != NULL); + HASH_DELETE(hh, map->head, map_entry); + MPL_free(map_entry); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_UTIL_MUTEX); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_map_lookup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void *MPIDI_CH4U_map_lookup(void *in_map, uint64_t id) ++MPL_STATIC_INLINE_PREFIX void *MPIDIU_map_lookup(void *in_map, uint64_t id) + { + void *rc; +- MPIDI_CH4U_map_t *map; +- MPIDI_CH4U_map_entry_t *map_entry; ++ MPIDIU_map_t *map; ++ MPIDIU_map_entry_t *map_entry; + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_UTIL_MUTEX); +- map = (MPIDI_CH4U_map_t *) in_map; ++ map = (MPIDIU_map_t *) in_map; + HASH_FIND(hh, map->head, &id, sizeof(uint64_t), map_entry); + if (map_entry == NULL) +- rc = MPIDI_CH4U_MAP_NOT_FOUND; ++ rc = MPIDIU_MAP_NOT_FOUND; + else + rc = map_entry->value; +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_UTIL_MUTEX); + return rc; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_map_lookup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-/* Wait until active message acc ops are done. */ +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_wait_am_acc(MPIR_Win * win, int target_rank, +- int order_needed) +-{ +- int mpi_errno = MPI_SUCCESS; +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & order_needed) { +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, target_rank); +- while ((target_ptr && MPIR_cc_get(target_ptr->remote_acc_cmpl_cnts) != 0) || +- MPIR_cc_get(MPIDI_CH4U_WIN(win, remote_acc_cmpl_cnts)) != 0) { +- MPIDI_CH4R_PROGRESS(); +- } +- } +- fn_exit: +- return mpi_errno; +- +- fn_fail: +- goto fn_exit; +-} +- +-/* Collectively allocate shared memory region. +- * MPL_shm routines and MPI collectives are internally used. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_allocate_shm_segment +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4U_allocate_shm_segment(MPIR_Comm * shm_comm_ptr, +- MPI_Aint shm_segment_len, +- MPL_shm_hnd_t * shm_segment_hdl_ptr, +- void **base_ptr) ++/* Updates a value in the map which has `id` as a key. ++ If `id` does not exist in the map, it will be added. Returns the old value. */ ++MPL_STATIC_INLINE_PREFIX void *MPIDIU_map_update(void *in_map, uint64_t id, void *new_val, ++ MPL_memory_class class) + { +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- int mpi_errno = MPI_SUCCESS, mpl_err = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_ALLOCATE_SHM_SEGMENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_ALLOCATE_SHM_SEGMENT); +- +- mpl_err = MPL_shm_hnd_init(shm_segment_hdl_ptr); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); +- +- if (shm_comm_ptr->rank == 0) { +- char *serialized_hnd_ptr = NULL; +- +- /* create shared memory region for all processes in win and map */ +- mpl_err = MPL_shm_seg_create_and_attach(*shm_segment_hdl_ptr, shm_segment_len, base_ptr, 0); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); +- +- /* serialize handle and broadcast it to the other processes in win */ +- mpl_err = MPL_shm_hnd_get_serialized_by_ref(*shm_segment_hdl_ptr, &serialized_hnd_ptr); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); +- +- mpi_errno = MPIR_Bcast(serialized_hnd_ptr, MPL_SHM_GHND_SZ, MPI_CHAR, 0, +- shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- +- /* wait for other processes to attach to win */ +- mpi_errno = MPIR_Barrier(shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ void *rc; ++ MPIDIU_map_t *map; ++ MPIDIU_map_entry_t *map_entry; + +- /* unlink shared memory region so it gets deleted when all processes exit */ +- mpl_err = MPL_shm_seg_remove(*shm_segment_hdl_ptr); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**remove_shar_mem"); ++ MPID_THREAD_CS_ENTER(POBJ, MPIDI_THREAD_UTIL_MUTEX); ++ map = (MPIDIU_map_t *) in_map; ++ HASH_FIND(hh, map->head, &id, sizeof(uint64_t), map_entry); ++ if (map_entry == NULL) { ++ rc = MPIDIU_MAP_NOT_FOUND; ++ MPIDIU_map_set_unsafe(in_map, id, new_val, class); + } else { +- char serialized_hnd[MPL_SHM_GHND_SZ] = { 0 }; +- +- /* get serialized handle from rank 0 and deserialize it */ +- mpi_errno = MPIR_Bcast(serialized_hnd, MPL_SHM_GHND_SZ, MPI_CHAR, 0, +- shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- +- mpl_err = MPL_shm_hnd_deserialize(*shm_segment_hdl_ptr, serialized_hnd, +- strlen(serialized_hnd)); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); +- +- /* attach to shared memory region created by rank 0 */ +- mpl_err = MPL_shm_seg_attach(*shm_segment_hdl_ptr, shm_segment_len, base_ptr, 0); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**attach_shar_mem"); +- +- mpi_errno = MPIR_Barrier(shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ rc = map_entry->value; ++ map_entry->value = new_val; + } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_ALLOCATE_SHM_SEGMENT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; ++ MPID_THREAD_CS_EXIT(POBJ, MPIDI_THREAD_UTIL_MUTEX); ++ return rc; + } + +-/* Destroy shared memory region on the local process. +- * MPL_shm routines are internally used. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_destroy_shm_segment +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4U_destroy_shm_segment(MPI_Aint shm_segment_len, +- MPL_shm_hnd_t * shm_segment_hdl_ptr, +- void **base_ptr) ++/* Wait until active message acc ops are done. */ ++MPL_STATIC_INLINE_PREFIX int MPIDIG_wait_am_acc(MPIR_Win * win, int target_rank, int order_needed) + { +- int mpi_errno = MPI_SUCCESS, mpl_err = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_DESTROY_SHM_SEGMENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_DESTROY_SHM_SEGMENT); +- +- mpl_err = MPL_shm_seg_detach(*shm_segment_hdl_ptr, base_ptr, shm_segment_len); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**detach_shar_mem"); +- +- mpl_err = MPL_shm_hnd_finalize(shm_segment_hdl_ptr); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**remove_shar_mem"); +- ++ int mpi_errno = MPI_SUCCESS; ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & order_needed) { ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, target_rank); ++ while ((target_ptr && MPIR_cc_get(target_ptr->remote_acc_cmpl_cnts) != 0) || ++ MPIR_cc_get(MPIDIG_WIN(win, remote_acc_cmpl_cnts)) != 0) { ++ MPIDIU_PROGRESS(); ++ } ++ } + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_DESTROY_SHM_SEGMENT); + return mpi_errno; ++ + fn_fail: + goto fn_exit; + } + + /* Compute accumulate operation. + * The source datatype can be only predefined; the target datatype can be +- * predefined or derived. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_compute_acc_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_compute_acc_op(void *source_buf, int source_count, +- MPI_Datatype source_dtp, void *target_buf, +- int target_count, MPI_Datatype target_dtp, +- MPI_Op acc_op) ++ * predefined or derived. If the source buffer has been packed by the caller, ++ * src_kind must be set to MPIDIG_ACC_SRCBUF_PACKED.*/ ++MPL_STATIC_INLINE_PREFIX int MPIDIG_compute_acc_op(void *source_buf, int source_count, ++ MPI_Datatype source_dtp, void *target_buf, ++ int target_count, MPI_Datatype target_dtp, ++ MPI_Op acc_op, int src_kind) + { + int mpi_errno = MPI_SUCCESS; + MPI_User_function *uop = NULL; + MPI_Aint source_dtp_size = 0, source_dtp_extent = 0; + int is_empty_source = FALSE; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_COMPUTE_ACC_OP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_COMPUTE_ACC_OP); + +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_COMPUTE_ACC_OP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_COMPUTE_ACC_OP); + + /* first Judge if source buffer is empty */ + if (acc_op == MPI_NO_OP) +@@ -1086,7 +918,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_compute_acc_op(void *source_buf, int sou + } else { + /* --BEGIN ERROR HANDLING-- */ + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OP, ++ __func__, __LINE__, MPI_ERR_OP, + "**opnotpredefined", "**opnotpredefined %d", acc_op); + return mpi_errno; + /* --END ERROR HANDLING-- */ +@@ -1098,46 +930,35 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_compute_acc_op(void *source_buf, int sou + (*uop) (source_buf, target_buf, &source_count, &source_dtp); + } else { + /* derived datatype */ +- MPIR_Segment *segp; +- DLOOP_VECTOR *dloop_vec; +- MPI_Aint first, last; ++ MPL_IOV *typerep_vec; + int vec_len, i, count; +- MPI_Aint type_extent, type_size; ++ MPI_Aint type_extent, type_size, src_type_stride; + MPI_Datatype type; + MPIR_Datatype *dtp; + MPI_Aint curr_len; + void *curr_loc; + int accumulated_count; + +- segp = MPIR_Segment_alloc(); +- /* --BEGIN ERROR HANDLING-- */ +- if (!segp) { +- mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, +- MPI_ERR_OTHER, "**nomem", 0); +- goto fn_exit; +- } +- /* --END ERROR HANDLING-- */ +- MPIR_Segment_init(NULL, target_count, target_dtp, segp); +- first = 0; +- last = first + source_count * source_dtp_size; +- + MPIR_Datatype_get_ptr(target_dtp, dtp); + MPIR_Assert(dtp != NULL); + vec_len = dtp->max_contig_blocks * target_count + 1; + /* +1 needed because Rob says so */ +- dloop_vec = (DLOOP_VECTOR *) +- MPL_malloc(vec_len * sizeof(DLOOP_VECTOR), MPL_MEM_RMA); ++ typerep_vec = (MPL_IOV *) ++ MPL_malloc(vec_len * sizeof(MPL_IOV), MPL_MEM_RMA); + /* --BEGIN ERROR HANDLING-- */ +- if (!dloop_vec) { ++ if (!typerep_vec) { + mpi_errno = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**nomem", 0); + goto fn_exit; + } + /* --END ERROR HANDLING-- */ + +- MPIR_Segment_pack_vector(segp, first, &last, dloop_vec, &vec_len); ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(NULL, target_count, target_dtp, 0, typerep_vec, vec_len, ++ source_count * source_dtp_size, &actual_iov_len, &actual_iov_bytes); ++ vec_len = actual_iov_len; + + type = dtp->basic_type; + MPIR_Assert(type != MPI_DATATYPE_NULL); +@@ -1145,29 +966,36 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_compute_acc_op(void *source_buf, int sou + MPIR_Assert(type == source_dtp); + type_size = source_dtp_size; + type_extent = source_dtp_extent; ++ /* If the source buffer has been packed by the caller, the distance between ++ * two elements can be smaller than extent. E.g., predefined pairtype may ++ * have larger extent than size.*/ ++ if (src_kind == MPIDIG_ACC_SRCBUF_PACKED) ++ src_type_stride = source_dtp_size; ++ else ++ src_type_stride = source_dtp_extent; + + i = 0; +- curr_loc = dloop_vec[0].DLOOP_VECTOR_BUF; +- curr_len = dloop_vec[0].DLOOP_VECTOR_LEN; ++ curr_loc = typerep_vec[0].MPL_IOV_BUF; ++ curr_len = typerep_vec[0].MPL_IOV_LEN; + accumulated_count = 0; + while (i != vec_len) { + if (curr_len < type_size) { + MPIR_Assert(i != vec_len); + i++; +- curr_len += dloop_vec[i].DLOOP_VECTOR_LEN; ++ curr_len += typerep_vec[i].MPL_IOV_LEN; + continue; + } + + MPIR_Assign_trunc(count, curr_len / type_size, int); + +- (*uop) ((char *) source_buf + type_extent * accumulated_count, ++ (*uop) ((char *) source_buf + src_type_stride * accumulated_count, + (char *) target_buf + MPIR_Ptr_to_aint(curr_loc), &count, &type); + + if (curr_len % type_size == 0) { + i++; + if (i != vec_len) { +- curr_loc = dloop_vec[i].DLOOP_VECTOR_BUF; +- curr_len = dloop_vec[i].DLOOP_VECTOR_LEN; ++ curr_loc = typerep_vec[i].MPL_IOV_BUF; ++ curr_len = typerep_vec[i].MPL_IOV_LEN; + } + } else { + curr_loc = (void *) ((char *) curr_loc + type_extent * count); +@@ -1177,12 +1005,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_compute_acc_op(void *source_buf, int sou + accumulated_count += count; + } + +- MPIR_Segment_free(segp); +- MPL_free(dloop_vec); ++ MPL_free(typerep_vec); + } + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_COMPUTE_ACC_OP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_COMPUTE_ACC_OP); + return mpi_errno; + } + +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4_init.c +@@ -0,0 +1,886 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "mpidch4r.h" ++#include "datatype.h" ++ ++#ifdef HAVE_SIGNAL_H ++#include ++#endif ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++categories: ++ - name : CH4 ++ description : cvars that control behavior of the CH4 device ++ ++cvars: ++ - name : MPIR_CVAR_CH4_NETMOD ++ category : CH4 ++ type : string ++ default : "" ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ If non-empty, this cvar specifies which network module to use ++ ++ - name : MPIR_CVAR_CH4_SHM ++ category : CH4 ++ type : string ++ default : "" ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ If non-empty, this cvar specifies which shm module to use ++ ++ - name : MPIR_CVAR_CH4_ROOTS_ONLY_PMI ++ category : CH4 ++ type : boolean ++ default : false ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_LOCAL ++ description : >- ++ Enables an optimized business card exchange over PMI for node root processes only. ++ ++ - name : MPIR_CVAR_CH4_RUNTIME_CONF_DEBUG ++ category : CH4 ++ type : boolean ++ default : false ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ If enabled, CH4-level runtime configurations are printed out ++ ++ - name : MPIR_CVAR_CH4_MT_MODEL ++ category : CH4 ++ type : string ++ default : "" ++ class : device ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_ALL_EQ ++ description : >- ++ Specifies the CH4 multi-threading model. Possible values are: ++ direct (default) ++ handoff ++ trylock ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++#ifdef USE_PMI2_API ++/* PMI does not specify a max size for jobid_size in PMI2_Job_GetId. ++ CH3 uses jobid_size=MAX_JOBID_LEN=1024 when calling ++ PMI2_Job_GetId. */ ++#define MPIDI_MAX_JOBID_LEN PMI2_MAX_VALLEN ++#endif ++ ++static int choose_netmod(void); ++static const char *get_mt_model_name(int mt); ++static void print_runtime_configurations(void); ++#ifdef MPIDI_CH4_USE_MT_RUNTIME ++static int parse_mt_model(const char *name); ++#endif /* #ifdef MPIDI_CH4_USE_MT_RUNTIME */ ++static int set_runtime_configurations(void); ++ ++static int choose_netmod(void) ++{ ++ int i, mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHOOSE_NETMOD); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHOOSE_NETMOD); ++ ++ MPIR_Assert(MPIR_CVAR_CH4_NETMOD != NULL); ++ ++ if (strcmp(MPIR_CVAR_CH4_NETMOD, "") == 0) { ++ /* netmod not specified, using the default */ ++ MPIDI_NM_func = MPIDI_NM_funcs[0]; ++ MPIDI_NM_native_func = MPIDI_NM_native_funcs[0]; ++ goto fn_exit; ++ } ++ ++ for (i = 0; i < MPIDI_num_netmods; ++i) { ++ /* use MPL variant of strncasecmp if we get one */ ++ if (!strncasecmp(MPIR_CVAR_CH4_NETMOD, MPIDI_NM_strings[i], MPIDI_MAX_NETMOD_STRING_LEN)) { ++ MPIDI_NM_func = MPIDI_NM_funcs[i]; ++ MPIDI_NM_native_func = MPIDI_NM_native_funcs[i]; ++ goto fn_exit; ++ } ++ } ++ ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**invalid_netmod", "**invalid_netmod %s", ++ MPIR_CVAR_CH4_NETMOD); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHOOSE_NETMOD); ++ return mpi_errno; ++ fn_fail: ++ ++ goto fn_exit; ++} ++ ++#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ) ++#define MAX_THREAD_MODE MPI_THREAD_MULTIPLE ++#elif (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI) ++#define MAX_THREAD_MODE MPI_THREAD_MULTIPLE ++#elif (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) ++#define MAX_THREAD_MODE MPI_THREAD_MULTIPLE ++#elif (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__SINGLE) ++#define MAX_THREAD_MODE MPI_THREAD_SERIALIZED ++#elif (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__LOCKFREE) ++#define MAX_THREAD_MODE MPI_THREAD_SERIALIZED ++#else ++#error "Thread Granularity: Invalid" ++#endif ++ ++static const char *mt_model_names[MPIDI_CH4_NUM_MT_MODELS] = { ++ "direct", ++ "handoff", ++ "trylock", ++}; ++ ++static const char *get_mt_model_name(int mt) ++{ ++ if (mt < 0 || mt >= MPIDI_CH4_NUM_MT_MODELS) ++ return "(invalid)"; ++ ++ return mt_model_names[mt]; ++} ++ ++static void print_runtime_configurations(void) ++{ ++ printf("==== CH4 runtime configurations ====\n"); ++ printf("MPIDI_CH4_MT_MODEL: %d (%s)\n", ++ MPIDI_CH4_MT_MODEL, get_mt_model_name(MPIDI_CH4_MT_MODEL)); ++ printf("================================\n"); ++} ++ ++#ifdef MPIDI_CH4_USE_MT_RUNTIME ++static int parse_mt_model(const char *name) ++{ ++ int i; ++ ++ if (!strcmp("", name)) ++ return 0; /* default */ ++ ++ for (i = 0; i < MPIDI_CH4_NUM_MT_MODELS; i++) { ++ if (!strcasecmp(name, mt_model_names[i])) ++ return i; ++ } ++ return -1; ++} ++#endif /* #ifdef MPIDI_CH4_USE_MT_RUNTIME */ ++ ++static int set_runtime_configurations(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++#ifdef MPIDI_CH4_USE_MT_RUNTIME ++ int mt = parse_mt_model(MPIR_CVAR_CH4_MT_MODEL); ++ if (mt < 0) ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, ++ "**ch4|invalid_mt_model", "**ch4|invalid_mt_model %s", ++ MPIR_CVAR_CH4_MT_MODEL); ++ MPIDI_global.settings.mt_model = mt; ++#else ++ /* Static configuration - no runtime selection */ ++ if (strcmp(MPIR_CVAR_CH4_MT_MODEL, "") != 0) ++ printf("Warning: MPIR_CVAR_CH4_MT_MODEL will be ignored " ++ "unless --enable-ch4-mt=runtime is given at the configure time.\n"); ++#endif /* #ifdef MPIDI_CH4_USE_MT_RUNTIME */ ++ ++#ifdef MPIDI_CH4_USE_MT_RUNTIME ++ fn_fail: ++#endif ++ return mpi_errno; ++} ++ ++int MPID_Init(int *argc, char ***argv, int requested, int *provided, int *has_args, int *has_env) ++{ ++ int pmi_errno, mpi_errno = MPI_SUCCESS, rank, has_parent, size, appnum, thr_err; ++ int avtid; ++ int n_nm_vcis_provided; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ int n_shm_vcis_provided; ++#endif ++#ifndef USE_PMI2_API ++ int max_pmi_name_length; ++#endif ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_INIT); ++ ++ mpi_errno = set_runtime_configurations(); ++ if (mpi_errno != MPI_SUCCESS) ++ return mpi_errno; ++ ++#ifdef MPL_USE_DBG_LOGGING ++ MPIDI_CH4_DBG_GENERAL = MPL_dbg_class_alloc("CH4", "ch4"); ++ MPIDI_CH4_DBG_MAP = MPL_dbg_class_alloc("CH4_MAP", "ch4_map"); ++ MPIDI_CH4_DBG_COMM = MPL_dbg_class_alloc("CH4_COMM", "ch4_comm"); ++ MPIDI_CH4_DBG_MEMORY = MPL_dbg_class_alloc("CH4_MEMORY", "ch4_memory"); ++#endif ++ ++#ifdef HAVE_SIGNAL ++ /* install signal handler for process failure notifications from hydra */ ++ MPIDI_global.sigusr1_count = 0; ++ MPIDI_global.my_sigusr1_count = 0; ++ MPIDI_global.prev_sighandler = signal(SIGUSR1, MPIDI_sigusr1_handler); ++ MPIR_ERR_CHKANDJUMP1(MPIDI_global.prev_sighandler == SIG_ERR, mpi_errno, MPI_ERR_OTHER, ++ "**signal", "**signal %s", MPIR_Strerror(errno)); ++ if (MPIDI_global.prev_sighandler == SIG_IGN || MPIDI_global.prev_sighandler == SIG_DFL) ++ MPIDI_global.prev_sighandler = NULL; ++#endif ++ ++ choose_netmod(); ++#ifdef USE_PMI2_API ++ pmi_errno = PMI2_Init(&has_parent, &size, &rank, &appnum); ++ ++ if (pmi_errno != PMI2_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_init", "**pmi_init %d", pmi_errno); ++ } ++ ++ MPIDI_global.jobid = (char *) MPL_malloc(MPIDI_MAX_JOBID_LEN, MPL_MEM_OTHER); ++ pmi_errno = PMI2_Job_GetId(MPIDI_global.jobid, MPIDI_MAX_JOBID_LEN); ++ if (pmi_errno != PMI2_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_job_getid", ++ "**pmi_job_getid %d", pmi_errno); ++ } ++#elif defined(USE_PMIX_API) ++ { ++ pmix_value_t *pvalue = NULL; ++ ++ pmi_errno = PMIx_Init(&MPIR_Process.pmix_proc, NULL, 0); ++ if (pmi_errno != PMIX_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmix_init", "**pmix_init %d", ++ pmi_errno); ++ } ++ rank = MPIR_Process.pmix_proc.rank; ++ ++ PMIX_PROC_CONSTRUCT(&MPIR_Process.pmix_wcproc); ++ MPL_strncpy(MPIR_Process.pmix_wcproc.nspace, MPIR_Process.pmix_proc.nspace, PMIX_MAX_NSLEN); ++ MPIR_Process.pmix_wcproc.rank = PMIX_RANK_WILDCARD; ++ ++ pmi_errno = PMIx_Get(&MPIR_Process.pmix_wcproc, PMIX_JOB_SIZE, NULL, 0, &pvalue); ++ if (pmi_errno != PMIX_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmix_get", "**pmix_get %d", ++ pmi_errno); ++ } ++ size = pvalue->data.uint32; ++ PMIX_VALUE_RELEASE(pvalue); ++ ++ /* appnum, has_parent is not set for now */ ++ appnum = 0; ++ has_parent = 0; ++ } ++#else ++ pmi_errno = PMI_Init(&has_parent); ++ ++ if (pmi_errno != PMI_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_init", "**pmi_init %d", pmi_errno); ++ } ++ ++ pmi_errno = PMI_Get_rank(&rank); ++ ++ if (pmi_errno != PMI_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_get_rank", ++ "**pmi_get_rank %d", pmi_errno); ++ } ++ ++ pmi_errno = PMI_Get_size(&size); ++ ++ if (pmi_errno != 0) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_get_size", ++ "**pmi_get_size %d", pmi_errno); ++ } ++ ++ pmi_errno = PMI_Get_appnum(&appnum); ++ ++ if (pmi_errno != PMI_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_get_appnum", ++ "**pmi_get_appnum %d", pmi_errno); ++ } ++ ++ pmi_errno = PMI_KVS_Get_name_length_max(&max_pmi_name_length); ++ if (pmi_errno != PMI_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_get_name_length_max", ++ "**pmi_kvs_get_name_length_max %d", pmi_errno); ++ } ++ ++ MPIDI_global.jobid = (char *) MPL_malloc(max_pmi_name_length, MPL_MEM_OTHER); ++ pmi_errno = PMI_KVS_Get_my_name(MPIDI_global.jobid, max_pmi_name_length); ++ if (pmi_errno != PMI_SUCCESS) { ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_get_my_name", ++ "**pmi_kvs_get_my_name %d", pmi_errno); ++ } ++#endif ++ ++ MPID_Thread_mutex_create(&MPIDIU_THREAD_PROGRESS_MUTEX, &thr_err); ++ MPID_Thread_mutex_create(&MPIDIU_THREAD_PROGRESS_HOOK_MUTEX, &thr_err); ++ MPID_Thread_mutex_create(&MPIDIU_THREAD_UTIL_MUTEX, &thr_err); ++ ++ MPID_Thread_mutex_create(&MPIDI_global.vci_lock, &mpi_errno); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POPFATAL(mpi_errno); ++ } ++#if defined(MPIDI_CH4_USE_WORK_QUEUES) ++ MPIDI_workq_init(&MPIDI_global.workqueue); ++#endif /* #if defined(MPIDI_CH4_USE_WORK_QUEUES) */ ++ ++ if (MPIR_CVAR_CH4_RUNTIME_CONF_DEBUG && rank == 0) ++ print_runtime_configurations(); ++ ++ /* ---------------------------------- */ ++ /* Initialize MPI_COMM_SELF */ ++ /* ---------------------------------- */ ++ MPIR_Process.comm_self->rank = 0; ++ MPIR_Process.comm_self->remote_size = 1; ++ MPIR_Process.comm_self->local_size = 1; ++ MPIR_Process.comm_self->pof2 = 0; ++ ++ /* ---------------------------------- */ ++ /* Initialize MPI_COMM_WORLD */ ++ /* ---------------------------------- */ ++ MPIR_Process.comm_world->rank = rank; ++ MPIR_Process.comm_world->remote_size = size; ++ MPIR_Process.comm_world->local_size = size; ++ MPIR_Process.comm_world->pof2 = MPL_pof2(size); ++ ++ MPIDIU_avt_init(); ++ MPIDIU_get_next_avtid(&avtid); ++ MPIR_Assert(avtid == 0); ++ ++ MPIDI_av_table[0] = (MPIDI_av_table_t *) ++ MPL_malloc(size * sizeof(MPIDI_av_entry_t) ++ + sizeof(MPIDI_av_table_t), MPL_MEM_ADDRESS); ++ ++ MPIDI_av_table[0]->size = size; ++ MPIR_Object_set_ref(MPIDI_av_table[0], 1); ++ ++ MPIDIU_alloc_globals_for_avtid(avtid); ++ ++ MPIDI_av_table0 = MPIDI_av_table[0]; ++ ++ /* initialize rank_map */ ++ MPIDI_COMM(MPIR_Process.comm_world, map).mode = MPIDI_RANK_MAP_DIRECT_INTRA; ++ MPIDI_COMM(MPIR_Process.comm_world, map).avtid = 0; ++ MPIDI_COMM(MPIR_Process.comm_world, map).size = size; ++ MPIDI_COMM(MPIR_Process.comm_world, local_map).mode = MPIDI_RANK_MAP_NONE; ++ MPIDIU_avt_add_ref(0); ++ ++ MPIDI_COMM(MPIR_Process.comm_self, map).mode = MPIDI_RANK_MAP_OFFSET_INTRA; ++ MPIDI_COMM(MPIR_Process.comm_self, map).avtid = 0; ++ MPIDI_COMM(MPIR_Process.comm_self, map).size = 1; ++ MPIDI_COMM(MPIR_Process.comm_self, map).reg.offset = rank; ++ MPIDI_COMM(MPIR_Process.comm_self, local_map).mode = MPIDI_RANK_MAP_NONE; ++ MPIDIU_avt_add_ref(0); ++ ++#ifdef MPL_USE_DBG_LOGGING ++ int counter_; ++ if (size < 16) { ++ for (counter_ = 0; counter_ < size; ++counter_) { ++ MPIDIU_comm_rank_to_av(MPIR_Process.comm_world, counter_); ++ } ++ } ++#endif ++ ++ /* setup receive queue statistics */ ++ mpi_errno = MPIDIG_recvq_init(); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifdef MPIDI_BUILD_CH4_LOCALITY_INFO ++ int i; ++ for (i = 0; i < MPIR_Process.comm_world->local_size; i++) { ++ MPIDI_av_table0->table[i].is_local = 0; ++ } ++ mpi_errno = MPIDIU_build_nodemap(MPIR_Process.comm_world->rank, MPIR_Process.comm_world, ++ MPIR_Process.comm_world->local_size, ++ MPIDI_global.node_map[0], &MPIDI_global.max_node_id); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "MPIDI_global.max_node_id = %d", MPIDI_global.max_node_id)); ++ ++ for (i = 0; i < MPIR_Process.comm_world->local_size; i++) { ++ MPIDI_av_table0->table[i].is_local = ++ (MPIDI_global.node_map[0][i] == ++ MPIDI_global.node_map[0][MPIR_Process.comm_world->rank]) ? 1 : 0; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "WORLD RANK %d %s local", i, ++ MPIDI_av_table0->table[i].is_local ? "is" : "is not")); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ (MPL_DBG_FDEST, "Node id (i) (me) %d %d", MPIDI_global.node_map[0][i], ++ MPIDI_global.node_map[0][MPIR_Process.comm_world->rank])); ++ } ++#endif ++ ++ { ++ int shm_tag_bits = MPIR_TAG_BITS_DEFAULT, nm_tag_bits = MPIR_TAG_BITS_DEFAULT; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_init_hook(rank, size, &n_shm_vcis_provided, &shm_tag_bits); ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POPFATAL(mpi_errno); ++ } ++#endif ++ ++ mpi_errno = MPIDI_NM_mpi_init_hook(rank, size, appnum, &nm_tag_bits, ++ MPIR_Process.comm_world, ++ MPIR_Process.comm_self, has_parent, &n_nm_vcis_provided); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POPFATAL(mpi_errno); ++ } ++ ++ /* Use the minimum tag_bits from the netmod and shmod */ ++ MPIR_Process.tag_bits = MPL_MIN(shm_tag_bits, nm_tag_bits); ++ } ++ ++ /* Call any and all MPID_Init type functions */ ++ MPIR_Err_init(); ++ MPIR_Datatype_init(); ++ MPIR_Group_init(); ++ ++ /* Override split_type */ ++ MPIDI_global.MPIR_Comm_fns_store.split_type = MPIDI_Comm_split_type; ++ MPIR_Comm_fns = &MPIDI_global.MPIR_Comm_fns_store; ++ ++ MPIR_Process.attrs.appnum = appnum; ++ MPIR_Process.attrs.wtime_is_global = 1; ++ MPIR_Process.attrs.io = MPI_ANY_SOURCE; ++ ++ mpi_errno = MPIR_Comm_commit(MPIR_Process.comm_self); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = MPIR_Comm_commit(MPIR_Process.comm_world); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* -------------------------------- */ ++ /* Return MPICH Parameters */ ++ /* -------------------------------- */ ++ switch (requested) { ++ case MPI_THREAD_SINGLE: ++ case MPI_THREAD_SERIALIZED: ++ case MPI_THREAD_FUNNELED: ++ *provided = requested; ++ break; ++ ++ case MPI_THREAD_MULTIPLE: ++ *provided = MAX_THREAD_MODE; ++ break; ++ } ++ ++ *has_args = TRUE; ++ *has_env = TRUE; ++ MPIDI_global.is_initialized = 0; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_InitCompleted(void) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_INITCOMPLETED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_INITCOMPLETED); ++ MPIDI_global.is_initialized = 1; ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_INITCOMPLETED); ++ return MPI_SUCCESS; ++} ++ ++int MPID_Finalize(void) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_FINALIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_FINALIZE); ++ ++ mpi_errno = MPIDI_NM_mpi_finalize_hook(); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_finalize_hook(); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ int i; ++ int max_n_avts; ++ max_n_avts = MPIDIU_get_max_n_avts(); ++ for (i = 0; i < max_n_avts; i++) { ++ if (MPIDI_av_table[i] != NULL) { ++ MPIDIU_avt_release_ref(i); ++ } ++ } ++ ++ MPIDIU_avt_destroy(); ++ MPL_free(MPIDI_global.jobid); ++ ++#ifdef USE_PMIX_API ++ PMIx_Finalize(NULL, 0); ++#elif defined(USE_PMI2_API) ++ PMI2_Finalize(); ++#else ++ PMI_Finalize(); ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_FINALIZE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_CS_finalize(void) ++{ ++ int mpi_errno = MPI_SUCCESS, thr_err; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_CS_FINALIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CS_FINALIZE); ++ ++ MPID_Thread_mutex_destroy(&MPIDI_global.vci_lock, &thr_err); ++ MPIR_Assert(thr_err == 0); ++ MPID_Thread_mutex_destroy(&MPIDIU_THREAD_PROGRESS_MUTEX, &thr_err); ++ MPIR_Assert(thr_err == 0); ++ MPID_Thread_mutex_destroy(&MPIDIU_THREAD_PROGRESS_HOOK_MUTEX, &thr_err); ++ MPIR_Assert(thr_err == 0); ++ MPID_Thread_mutex_destroy(&MPIDIU_THREAD_UTIL_MUTEX, &thr_err); ++ MPIR_Assert(thr_err == 0); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CS_FINALIZE); ++ return mpi_errno; ++} ++ ++int MPID_Get_universe_size(int *universe_size) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int pmi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_GET_UNIVERSE_SIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_GET_UNIVERSE_SIZE); ++ ++#ifdef USE_PMIX_API ++ { ++ pmix_value_t *pvalue = NULL; ++ ++ pmi_errno = PMIx_Get(&MPIR_Process.pmix_wcproc, PMIX_UNIV_SIZE, NULL, 0, &pvalue); ++ if (pmi_errno != PMIX_SUCCESS) ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, ++ "**pmix_get", "**pmix_get %d", pmi_errno); ++ *universe_size = pvalue->data.uint32; ++ PMIX_VALUE_RELEASE(pvalue); ++ } ++#elif defined(USE_PMI2_API) ++ { ++ char val[PMI2_MAX_VALLEN]; ++ int found = 0; ++ char *endptr; ++ ++ pmi_errno = PMI2_Info_GetJobAttr("universeSize", val, sizeof(val), &found); ++ if (pmi_errno) ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**pmi_getjobattr"); ++ ++ if (!found) { ++ *universe_size = MPIR_UNIVERSE_SIZE_NOT_AVAILABLE; ++ } else { ++ *universe_size = strtol(val, &endptr, 0); ++ MPIR_ERR_CHKINTERNAL(endptr - val != strlen(val), mpi_errno, ++ "can't parse universe size"); ++ } ++ } ++#else ++ pmi_errno = PMI_Get_universe_size(universe_size); ++ ++ if (pmi_errno) ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, ++ "**pmi_get_universe_size", "**pmi_get_universe_size %d", pmi_errno); ++#endif ++ ++ if (*universe_size < 0) ++ *universe_size = MPIR_UNIVERSE_SIZE_NOT_AVAILABLE; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_GET_UNIVERSE_SIZE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Get_processor_name(char *name, int namelen, int *resultlen) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_GET_PROCESSOR_NAME); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_GET_PROCESSOR_NAME); ++ ++ if (!MPIDI_global.pname_set) { ++#ifdef HAVE_GETHOSTNAME ++ ++ if (gethostname(MPIDI_global.pname, MPI_MAX_PROCESSOR_NAME) == 0) ++ MPIDI_global.pname_len = (int) strlen(MPIDI_global.pname); ++ ++#elif defined(HAVE_SYSINFO) ++ ++ if (sysinfo(SI_HOSTNAME, MPIDI_global.pname, MPI_MAX_PROCESSOR_NAME) == 0) ++ MPIDI_global.pname_len = (int) strlen(MPIDI_global.pname); ++ ++#else ++ MPL_snprintf(MPIDI_global.pname, MPI_MAX_PROCESSOR_NAME, "%d", ++ MPIR_Process.comm_world->rank); ++ MPIDI_global.pname_len = (int) strlen(MPIDI_global.pname); ++#endif ++ MPIDI_global.pname_set = 1; ++ } ++ ++ MPIR_ERR_CHKANDJUMP(MPIDI_global.pname_len <= 0, mpi_errno, MPI_ERR_OTHER, "**procnamefailed"); ++ MPL_strncpy(name, MPIDI_global.pname, namelen); ++ ++ if (resultlen) ++ *resultlen = MPIDI_global.pname_len; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_GET_PROCESSOR_NAME); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++void *MPID_Alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ void *p; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_ALLOC_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_ALLOC_MEM); ++ ++ p = MPIDI_NM_mpi_alloc_mem(size, info_ptr); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_ALLOC_MEM); ++ return p; ++} ++ ++int MPID_Free_mem(void *ptr) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_FREE_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_FREE_MEM); ++ mpi_errno = MPIDI_NM_mpi_free_mem(ptr); ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_FREE_MEM); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Comm_get_lpid(MPIR_Comm * comm_ptr, int idx, int *lpid_ptr, bool is_remote) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int avtid = 0, lpid = 0; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_GET_LPID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_GET_LPID); ++ ++ if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ++ MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); ++ else if (is_remote) ++ MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); ++ else { ++ MPIDIU_comm_rank_to_pid_local(comm_ptr, idx, &lpid, &avtid); ++ } ++ ++ *lpid_ptr = MPIDIU_LUPID_CREATE(avtid, lpid); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_GET_LPID); ++ return mpi_errno; ++} ++ ++int MPID_Get_node_id(MPIR_Comm * comm, int rank, int *id_p) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_GET_NODE_ID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_GET_NODE_ID); ++ ++ MPIDIU_get_node_id(comm, rank, id_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_GET_NODE_ID); ++ return mpi_errno; ++} ++ ++int MPID_Get_max_node_id(MPIR_Comm * comm, int *max_id_p) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_GET_MAX_NODE_ID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_GET_MAX_NODE_ID); ++ ++ MPIDIU_get_max_node_id(comm, max_id_p); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_GET_MAX_NODE_ID); ++ return mpi_errno; ++} ++ ++int MPID_Create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const int lpids[]) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_CREATE_INTERCOMM_FROM_LPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CREATE_INTERCOMM_FROM_LPIDS); ++ ++ MPIDI_rank_map_mlut_t *mlut = NULL; ++ MPIDI_COMM(newcomm_ptr, map).mode = MPIDI_RANK_MAP_MLUT; ++ MPIDI_COMM(newcomm_ptr, map).avtid = -1; ++ mpi_errno = MPIDIU_alloc_mlut(&mlut, size); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ MPIDI_COMM(newcomm_ptr, map).size = size; ++ MPIDI_COMM(newcomm_ptr, map).irreg.mlut.t = mlut; ++ MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid = mlut->gpid; ++ ++ for (i = 0; i < size; i++) { ++ MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid[i].avtid = MPIDIU_LUPID_GET_AVTID(lpids[i]); ++ MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid[i].lpid = MPIDIU_LUPID_GET_LPID(lpids[i]); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " remote rank=%d, avtid=%d, lpid=%d", i, ++ MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid[i].avtid, ++ MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid[i].lpid)); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CREATE_INTERCOMM_FROM_LPIDS); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp) ++{ ++ MPI_Aint result; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_AINT_ADD); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_AINT_ADD); ++ result = (MPI_Aint) ((char *) base + disp); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_AINT_ADD); ++ return result; ++} ++ ++MPI_Aint MPID_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) ++{ ++ MPI_Aint result; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_AINT_DIFF); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_AINT_DIFF); ++ ++ result = (MPI_Aint) ((char *) addr1 - (char *) addr2); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_AINT_DIFF); ++ return result; ++} ++ ++int MPID_Type_commit_hook(MPIR_Datatype * type) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_TYPE_COMMIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_TYPE_COMMIT_HOOK); ++ ++ mpi_errno = MPIDI_NM_mpi_type_commit_hook(type); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_type_commit_hook(type); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_TYPE_COMMIT_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Type_free_hook(MPIR_Datatype * type) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_TYPE_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_TYPE_FREE_HOOK); ++ ++ mpi_errno = MPIDI_NM_mpi_type_free_hook(type); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_type_free_hook(type); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_TYPE_FREE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Op_commit_hook(MPIR_Op * op) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_OP_COMMIT_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_OP_COMMIT_HOOK); ++ ++ mpi_errno = MPIDI_NM_mpi_op_commit_hook(op); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_op_commit_hook(op); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_OP_COMMIT_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Op_free_hook(MPIR_Op * op) ++{ ++ int mpi_errno; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_OP_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_OP_FREE_HOOK); ++ ++ mpi_errno = MPIDI_NM_mpi_op_free_hook(op); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_op_free_hook(op); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_OP_FREE_HOOK); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/src/ch4_init.h ++++ /dev/null +@@ -1,967 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef CH4_INIT_H_INCLUDED +-#define CH4_INIT_H_INCLUDED +- +-#include "ch4_impl.h" +-#include "ch4r_proc.h" +-#include "ch4i_comm.h" +-#include "ch4_comm.h" +-#include "strings.h" +-#include "datatype.h" +-#include "ch4r_recvq.h" +- +-#ifdef HAVE_SIGNAL_H +-#include +-#endif +- +-#ifdef USE_PMI2_API +-/* PMI does not specify a max size for jobid_size in PMI2_Job_GetId. +- CH3 uses jobid_size=MAX_JOBID_LEN=1024 when calling +- PMI2_Job_GetId. */ +-#define MPIDI_MAX_JOBID_LEN PMI2_MAX_VALLEN +-#endif +- +-/* +-=== BEGIN_MPI_T_CVAR_INFO_BLOCK === +- +-categories: +- - name : CH4 +- description : cvars that control behavior of the CH4 device +- +-cvars: +- - name : MPIR_CVAR_CH4_NETMOD +- category : CH4 +- type : string +- default : "" +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_ALL_EQ +- description : >- +- If non-empty, this cvar specifies which network module to use +- +- - name : MPIR_CVAR_CH4_SHM +- category : CH4 +- type : string +- default : "" +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_ALL_EQ +- description : >- +- If non-empty, this cvar specifies which shm module to use +- +- - name : MPIR_CVAR_CH4_ROOTS_ONLY_PMI +- category : CH4 +- type : boolean +- default : false +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_LOCAL +- description : >- +- Enables an optimized business card exchange over PMI for node root processes only. +- +- - name : MPIR_CVAR_CH4_RUNTIME_CONF_DEBUG +- category : CH4 +- type : boolean +- default : false +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_ALL_EQ +- description : >- +- If enabled, CH4-level runtime configurations are printed out +- +- - name : MPIR_CVAR_CH4_MT_MODEL +- category : CH4 +- type : string +- default : "" +- class : device +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_ALL_EQ +- description : >- +- Specifies the CH4 multi-threading model. Possible values are: +- direct (default) +- handoff +- trylock +- +-=== END_MPI_T_CVAR_INFO_BLOCK === +-*/ +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_choose_netmod +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_choose_netmod(void) +-{ +- int i, mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHOOSE_NETMOD); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHOOSE_NETMOD); +- +- MPIR_Assert(MPIR_CVAR_CH4_NETMOD != NULL); +- +- if (strcmp(MPIR_CVAR_CH4_NETMOD, "") == 0) { +- /* netmod not specified, using the default */ +- MPIDI_NM_func = MPIDI_NM_funcs[0]; +- MPIDI_NM_native_func = MPIDI_NM_native_funcs[0]; +- goto fn_exit; +- } +- +- for (i = 0; i < MPIDI_num_netmods; ++i) { +- /* use MPL variant of strncasecmp if we get one */ +- if (!strncasecmp(MPIR_CVAR_CH4_NETMOD, MPIDI_NM_strings[i], MPIDI_MAX_NETMOD_STRING_LEN)) { +- MPIDI_NM_func = MPIDI_NM_funcs[i]; +- MPIDI_NM_native_func = MPIDI_NM_native_funcs[i]; +- goto fn_exit; +- } +- } +- +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**invalid_netmod", "**invalid_netmod %s", +- MPIR_CVAR_CH4_NETMOD); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHOOSE_NETMOD); +- return mpi_errno; +- fn_fail: +- +- goto fn_exit; +-} +- +-#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ) +-#define MAX_THREAD_MODE MPI_THREAD_MULTIPLE +-#elif (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI) +-#define MAX_THREAD_MODE MPI_THREAD_MULTIPLE +-#elif (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL) +-#define MAX_THREAD_MODE MPI_THREAD_MULTIPLE +-#elif (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__SINGLE) +-#define MAX_THREAD_MODE MPI_THREAD_SERIALIZED +-#elif (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__LOCKFREE) +-#define MAX_THREAD_MODE MPI_THREAD_SERIALIZED +-#else +-#error "Thread Granularity: Invalid" +-#endif +- +-MPL_STATIC_INLINE_PREFIX const char *MPIDI_get_mt_model_name(int mt) +-{ +- if (mt < 0 || mt >= MPIDI_CH4_NUM_MT_MODELS) +- return "(invalid)"; +- +- return MPIDI_CH4_mt_model_names[mt]; +-} +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_print_runtime_configurations(void) +-{ +- printf("==== CH4 runtime configurations ====\n"); +- printf("MPIDI_CH4_MT_MODEL: %d (%s)\n", +- MPIDI_CH4_MT_MODEL, MPIDI_get_mt_model_name(MPIDI_CH4_MT_MODEL)); +- printf("================================\n"); +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_parse_mt_model(const char *name) +-{ +- int i; +- +- if (!strcmp("", name)) +- return 0; /* default */ +- +- for (i = 0; i < MPIDI_CH4_NUM_MT_MODELS; i++) { +- if (!strcasecmp(name, MPIDI_CH4_mt_model_names[i])) +- return i; +- } +- return -1; +-} +- +-MPL_STATIC_INLINE_PREFIX int MPIDI_set_runtime_configurations(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- +-#ifdef MPIDI_CH4_USE_MT_RUNTIME +- int mt = MPIDI_parse_mt_model(MPIR_CVAR_CH4_MT_MODEL); +- if (mt < 0) +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, +- "**ch4|invalid_mt_model", "**ch4|invalid_mt_model %s", +- MPIR_CVAR_CH4_MT_MODEL); +- MPIDI_CH4_Global.settings.mt_model = mt; +-#else +- /* Static configuration - no runtime selection */ +- if (strcmp(MPIR_CVAR_CH4_MT_MODEL, "") != 0) +- printf("Warning: MPIR_CVAR_CH4_MT_MODEL will be ignored " +- "unless --enable-ch4-mt=runtime is given at the configure time.\n"); +-#endif /* #ifdef MPIDI_CH4_USE_MT_RUNTIME */ +- +- fn_fail: +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Init(int *argc, +- char ***argv, +- int requested, int *provided, int *has_args, int *has_env) +-{ +- int pmi_errno, mpi_errno = MPI_SUCCESS, rank, has_parent, size, appnum, thr_err; +- int avtid; +- int n_nm_vnis_provided; +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- int n_shm_vnis_provided; +-#endif +-#ifndef USE_PMI2_API +- int max_pmi_name_length; +-#endif +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_INIT); +- +- mpi_errno = MPIDI_set_runtime_configurations(); +- if (mpi_errno != MPI_SUCCESS) +- return mpi_errno; +- +-#ifdef MPL_USE_DBG_LOGGING +- MPIDI_CH4_DBG_GENERAL = MPL_dbg_class_alloc("CH4", "ch4"); +- MPIDI_CH4_DBG_MAP = MPL_dbg_class_alloc("CH4_MAP", "ch4_map"); +- MPIDI_CH4_DBG_COMM = MPL_dbg_class_alloc("CH4_COMM", "ch4_comm"); +- MPIDI_CH4_DBG_MEMORY = MPL_dbg_class_alloc("CH4_MEMORY", "ch4_memory"); +-#endif +- +-#ifdef HAVE_SIGNAL +- /* install signal handler for process failure notifications from hydra */ +- MPIDI_CH4_Global.sigusr1_count = 0; +- MPIDI_CH4_Global.my_sigusr1_count = 0; +- MPIDI_CH4_Global.prev_sighandler = signal(SIGUSR1, MPIDI_sigusr1_handler); +- MPIR_ERR_CHKANDJUMP1(MPIDI_CH4_Global.prev_sighandler == SIG_ERR, mpi_errno, MPI_ERR_OTHER, +- "**signal", "**signal %s", MPIR_Strerror(errno)); +- if (MPIDI_CH4_Global.prev_sighandler == SIG_IGN || MPIDI_CH4_Global.prev_sighandler == SIG_DFL) +- MPIDI_CH4_Global.prev_sighandler = NULL; +-#endif +- +- MPIDI_choose_netmod(); +-#ifdef USE_PMI2_API +- pmi_errno = PMI2_Init(&has_parent, &size, &rank, &appnum); +- +- if (pmi_errno != PMI2_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_init", "**pmi_init %d", pmi_errno); +- } +- +- MPIDI_CH4_Global.jobid = (char *) MPL_malloc(MPIDI_MAX_JOBID_LEN, MPL_MEM_OTHER); +- pmi_errno = PMI2_Job_GetId(MPIDI_CH4_Global.jobid, MPIDI_MAX_JOBID_LEN); +- if (pmi_errno != PMI2_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_job_getid", +- "**pmi_job_getid %d", pmi_errno); +- } +-#elif defined(USE_PMIX_API) +- { +- pmix_value_t *pvalue = NULL; +- +- pmi_errno = PMIx_Init(&MPIR_Process.pmix_proc, NULL, 0); +- if (pmi_errno != PMIX_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmix_init", "**pmix_init %d", +- pmi_errno); +- } +- rank = MPIR_Process.pmix_proc.rank; +- +- PMIX_PROC_CONSTRUCT(&MPIR_Process.pmix_wcproc); +- MPL_strncpy(MPIR_Process.pmix_wcproc.nspace, MPIR_Process.pmix_proc.nspace, PMIX_MAX_NSLEN); +- MPIR_Process.pmix_wcproc.rank = PMIX_RANK_WILDCARD; +- +- pmi_errno = PMIx_Get(&MPIR_Process.pmix_wcproc, PMIX_JOB_SIZE, NULL, 0, &pvalue); +- if (pmi_errno != PMIX_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmix_get", "**pmix_get %d", +- pmi_errno); +- } +- size = pvalue->data.uint32; +- PMIX_VALUE_RELEASE(pvalue); +- +- /* appnum, has_parent is not set for now */ +- appnum = 0; +- has_parent = 0; +- } +-#else +- pmi_errno = PMI_Init(&has_parent); +- +- if (pmi_errno != PMI_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_init", "**pmi_init %d", pmi_errno); +- } +- +- pmi_errno = PMI_Get_rank(&rank); +- +- if (pmi_errno != PMI_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_get_rank", +- "**pmi_get_rank %d", pmi_errno); +- } +- +- pmi_errno = PMI_Get_size(&size); +- +- if (pmi_errno != 0) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_get_size", +- "**pmi_get_size %d", pmi_errno); +- } +- +- pmi_errno = PMI_Get_appnum(&appnum); +- +- if (pmi_errno != PMI_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_get_appnum", +- "**pmi_get_appnum %d", pmi_errno); +- } +- +- pmi_errno = PMI_KVS_Get_name_length_max(&max_pmi_name_length); +- if (pmi_errno != PMI_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_get_name_length_max", +- "**pmi_kvs_get_name_length_max %d", pmi_errno); +- } +- +- MPIDI_CH4_Global.jobid = (char *) MPL_malloc(max_pmi_name_length, MPL_MEM_OTHER); +- pmi_errno = PMI_KVS_Get_my_name(MPIDI_CH4_Global.jobid, max_pmi_name_length); +- if (pmi_errno != PMI_SUCCESS) { +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_get_my_name", +- "**pmi_kvs_get_my_name %d", pmi_errno); +- } +-#endif +- +- MPID_Thread_mutex_create(&MPIDI_CH4I_THREAD_PROGRESS_MUTEX, &thr_err); +- MPID_Thread_mutex_create(&MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX, &thr_err); +- MPID_Thread_mutex_create(&MPIDI_CH4I_THREAD_UTIL_MUTEX, &thr_err); +- +- MPID_Thread_mutex_create(&MPIDI_CH4_Global.vni_lock, &mpi_errno); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POPFATAL(mpi_errno); +- } +-#if defined(MPIDI_CH4_USE_WORK_QUEUES) +- MPIDI_workq_init(&MPIDI_CH4_Global.workqueue); +-#endif /* #if defined(MPIDI_CH4_USE_WORK_QUEUES) */ +- +- +- if (MPIR_CVAR_CH4_RUNTIME_CONF_DEBUG && rank == 0) +- MPIDI_print_runtime_configurations(); +- +- /* ---------------------------------- */ +- /* Initialize MPI_COMM_SELF */ +- /* ---------------------------------- */ +- MPIR_Process.comm_self->rank = 0; +- MPIR_Process.comm_self->remote_size = 1; +- MPIR_Process.comm_self->local_size = 1; +- MPIR_Process.comm_self->pof2 = 0; +- +- /* ---------------------------------- */ +- /* Initialize MPI_COMM_WORLD */ +- /* ---------------------------------- */ +- MPIR_Process.comm_world->rank = rank; +- MPIR_Process.comm_world->remote_size = size; +- MPIR_Process.comm_world->local_size = size; +- MPIR_Process.comm_world->pof2 = MPL_pof2(size); +- +- MPIDIU_avt_init(); +- MPIDIU_get_next_avtid(&avtid); +- MPIR_Assert(avtid == 0); +- +- MPIDI_av_table[0] = (MPIDI_av_table_t *) +- MPL_malloc(size * sizeof(MPIDI_av_entry_t) +- + sizeof(MPIDI_av_table_t), MPL_MEM_ADDRESS); +- +- MPIDI_av_table[0]->size = size; +- MPIR_Object_set_ref(MPIDI_av_table[0], 1); +- +- MPIDIU_alloc_globals_for_avtid(avtid); +- +- MPIDI_av_table0 = MPIDI_av_table[0]; +- +- /* initialize rank_map */ +- MPIDI_COMM(MPIR_Process.comm_world, map).mode = MPIDI_RANK_MAP_DIRECT_INTRA; +- MPIDI_COMM(MPIR_Process.comm_world, map).avtid = 0; +- MPIDI_COMM(MPIR_Process.comm_world, map).size = size; +- MPIDI_COMM(MPIR_Process.comm_world, local_map).mode = MPIDI_RANK_MAP_NONE; +- MPIDIU_avt_add_ref(0); +- +- MPIDI_COMM(MPIR_Process.comm_self, map).mode = MPIDI_RANK_MAP_OFFSET_INTRA; +- MPIDI_COMM(MPIR_Process.comm_self, map).avtid = 0; +- MPIDI_COMM(MPIR_Process.comm_self, map).size = 1; +- MPIDI_COMM(MPIR_Process.comm_self, map).reg.offset = rank; +- MPIDI_COMM(MPIR_Process.comm_self, local_map).mode = MPIDI_RANK_MAP_NONE; +- MPIDIU_avt_add_ref(0); +- +-#ifdef MPL_USE_DBG_LOGGING +- int counter_; +- if (size < 16) { +- for (counter_ = 0; counter_ < size; ++counter_) { +- MPIDIU_comm_rank_to_av(MPIR_Process.comm_world, counter_); +- } +- } +-#endif +- +- /* setup receive queue statistics */ +- mpi_errno = MPIDI_CH4U_Recvq_init(); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- +-#ifdef MPIDI_BUILD_CH4_LOCALITY_INFO +- int i; +- for (i = 0; i < MPIR_Process.comm_world->local_size; i++) { +- MPIDI_av_table0->table[i].is_local = 0; +- } +- mpi_errno = MPIDI_CH4U_build_nodemap(MPIR_Process.comm_world->rank, +- MPIR_Process.comm_world, +- MPIR_Process.comm_world->local_size, +- MPIDI_CH4_Global.node_map[0], +- &MPIDI_CH4_Global.max_node_id); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "MPIDI_CH4_Global.max_node_id = %d", +- MPIDI_CH4_Global.max_node_id)); +- +- for (i = 0; i < MPIR_Process.comm_world->local_size; i++) { +- MPIDI_av_table0->table[i].is_local = +- (MPIDI_CH4_Global.node_map[0][i] == +- MPIDI_CH4_Global.node_map[0][MPIR_Process.comm_world->rank]) ? 1 : 0; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "WORLD RANK %d %s local", i, +- MPIDI_av_table0->table[i].is_local ? "is" : "is not")); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- (MPL_DBG_FDEST, "Node id (i) (me) %d %d", MPIDI_CH4_Global.node_map[0][i], +- MPIDI_CH4_Global.node_map[0][MPIR_Process.comm_world->rank])); +- } +-#endif +- +- { +- int shm_tag_bits = MPIR_TAG_BITS_DEFAULT, nm_tag_bits = MPIR_TAG_BITS_DEFAULT; +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_init_hook(rank, size, &n_shm_vnis_provided, &shm_tag_bits); +- +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POPFATAL(mpi_errno); +- } +-#endif +- +- mpi_errno = MPIDI_NM_mpi_init_hook(rank, size, appnum, &nm_tag_bits, +- MPIR_Process.comm_world, +- MPIR_Process.comm_self, has_parent, &n_nm_vnis_provided); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POPFATAL(mpi_errno); +- } +- +- /* Use the minimum tag_bits from the netmod and shmod */ +- MPIR_Process.tag_bits = MPL_MIN(shm_tag_bits, nm_tag_bits); +- } +- +- /* Call any and all MPID_Init type functions */ +- MPIR_Err_init(); +- MPIR_Datatype_init(); +- MPIR_Group_init(); +- +- /* Override split_type */ +- MPIDI_CH4_Global.MPIR_Comm_fns_store.split_type = MPIDI_Comm_split_type; +- MPIR_Comm_fns = &MPIDI_CH4_Global.MPIR_Comm_fns_store; +- +- MPIR_Process.attrs.appnum = appnum; +- MPIR_Process.attrs.wtime_is_global = 1; +- MPIR_Process.attrs.io = MPI_ANY_SOURCE; +- +- mpi_errno = MPIR_Comm_commit(MPIR_Process.comm_self); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = MPIR_Comm_commit(MPIR_Process.comm_world); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- /* -------------------------------- */ +- /* Return MPICH Parameters */ +- /* -------------------------------- */ +- switch (requested) { +- case MPI_THREAD_SINGLE: +- case MPI_THREAD_SERIALIZED: +- case MPI_THREAD_FUNNELED: +- *provided = requested; +- break; +- +- case MPI_THREAD_MULTIPLE: +- *provided = MAX_THREAD_MODE; +- break; +- } +- +- *has_args = TRUE; +- *has_env = TRUE; +- MPIDI_CH4_Global.is_initialized = 0; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_InitCompleted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_InitCompleted(void) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_INITCOMPLETED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_INITCOMPLETED); +- MPIDI_CH4_Global.is_initialized = 1; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_INITCOMPLETED); +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Finalize(void) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_FINALIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_FINALIZE); +- +- mpi_errno = MPIDI_NM_mpi_finalize_hook(); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_finalize_hook(); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- int i; +- int max_n_avts; +- max_n_avts = MPIDIU_get_max_n_avts(); +- for (i = 0; i < max_n_avts; i++) { +- if (MPIDI_av_table[i] != NULL) { +- MPIDIU_avt_release_ref(i); +- } +- } +- +- MPIDIU_avt_destroy(); +- MPL_free(MPIDI_CH4_Global.jobid); +- +-#ifdef USE_PMIX_API +- PMIx_Finalize(NULL, 0); +-#elif defined(USE_PMI2_API) +- PMI2_Finalize(); +-#else +- PMI_Finalize(); +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_CS_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_CS_finalize(void) +-{ +- int mpi_errno = MPI_SUCCESS, thr_err; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_CS_FINALIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CS_FINALIZE); +- +- MPID_Thread_mutex_destroy(&MPIDI_CH4_Global.vni_lock, &thr_err); +- MPIR_Assert(thr_err == 0); +- MPID_Thread_mutex_destroy(&MPIDI_CH4I_THREAD_PROGRESS_MUTEX, &thr_err); +- MPIR_Assert(thr_err == 0); +- MPID_Thread_mutex_destroy(&MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX, &thr_err); +- MPIR_Assert(thr_err == 0); +- MPID_Thread_mutex_destroy(&MPIDI_CH4I_THREAD_UTIL_MUTEX, &thr_err); +- MPIR_Assert(thr_err == 0); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CS_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_universe_size +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Get_universe_size(int *universe_size) +-{ +- int mpi_errno = MPI_SUCCESS; +- int pmi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_GET_UNIVERSE_SIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_GET_UNIVERSE_SIZE); +- +- +-#ifdef USE_PMIX_API +- { +- pmix_value_t *pvalue = NULL; +- +- pmi_errno = PMIx_Get(&MPIR_Process.pmix_wcproc, PMIX_UNIV_SIZE, NULL, 0, &pvalue); +- if (pmi_errno != PMIX_SUCCESS) +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, +- "**pmix_get", "**pmix_get %d", pmi_errno); +- *universe_size = pvalue->data.uint32; +- PMIX_VALUE_RELEASE(pvalue); +- } +-#elif defined(USE_PMI2_API) +- { +- char val[PMI2_MAX_VALLEN]; +- int found = 0; +- char *endptr; +- +- pmi_errno = PMI2_Info_GetJobAttr("universeSize", val, sizeof(val), &found); +- if (pmi_errno) +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**pmi_getjobattr"); +- +- if (!found) { +- *universe_size = MPIR_UNIVERSE_SIZE_NOT_AVAILABLE; +- } else { +- *universe_size = strtol(val, &endptr, 0); +- MPIR_ERR_CHKINTERNAL(endptr - val != strlen(val), mpi_errno, +- "can't parse universe size"); +- } +- } +-#else +- pmi_errno = PMI_Get_universe_size(universe_size); +- +- if (pmi_errno) +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, +- "**pmi_get_universe_size", "**pmi_get_universe_size %d", pmi_errno); +-#endif +- +- if (*universe_size < 0) +- *universe_size = MPIR_UNIVERSE_SIZE_NOT_AVAILABLE; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_GET_UNIVERSE_SIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_processor_name +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Get_processor_name(char *name, int namelen, int *resultlen) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_GET_PROCESSOR_NAME); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_GET_PROCESSOR_NAME); +- +- if (!MPIDI_CH4_Global.pname_set) { +-#ifdef HAVE_GETHOSTNAME +- +- if (gethostname(MPIDI_CH4_Global.pname, MPI_MAX_PROCESSOR_NAME) == 0) +- MPIDI_CH4_Global.pname_len = (int) strlen(MPIDI_CH4_Global.pname); +- +-#elif defined(HAVE_SYSINFO) +- +- if (sysinfo(SI_HOSTNAME, MPIDI_CH4_Global.pname, MPI_MAX_PROCESSOR_NAME) == 0) +- MPIDI_CH4_Global.pname_len = (int) strlen(MPIDI_CH4_Global.pname); +- +-#else +- MPL_snprintf(MPIDI_CH4_Global.pname, MPI_MAX_PROCESSOR_NAME, "%d", +- MPIR_Process.comm_world->rank); +- MPIDI_CH4_Global.pname_len = (int) strlen(MPIDI_CH4_Global.pname); +-#endif +- MPIDI_CH4_Global.pname_set = 1; +- } +- +- MPIR_ERR_CHKANDJUMP(MPIDI_CH4_Global.pname_len <= 0, +- mpi_errno, MPI_ERR_OTHER, "**procnamefailed"); +- MPL_strncpy(name, MPIDI_CH4_Global.pname, namelen); +- +- if (resultlen) +- *resultlen = MPIDI_CH4_Global.pname_len; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_GET_PROCESSOR_NAME); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Alloc_mem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void *MPID_Alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- void *p; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_ALLOC_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_ALLOC_MEM); +- +- p = MPIDI_NM_mpi_alloc_mem(size, info_ptr); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_ALLOC_MEM); +- return p; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Free_mem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Free_mem(void *ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_FREE_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_FREE_MEM); +- mpi_errno = MPIDI_NM_mpi_free_mem(ptr); +- +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_FREE_MEM); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_get_lpid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_get_lpid(MPIR_Comm * comm_ptr, +- int idx, int *lpid_ptr, bool is_remote) +-{ +- int mpi_errno = MPI_SUCCESS; +- int avtid = 0, lpid = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_GET_LPID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_GET_LPID); +- +- if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) +- MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); +- else if (is_remote) +- MPIDIU_comm_rank_to_pid(comm_ptr, idx, &lpid, &avtid); +- else { +- MPIDIU_comm_rank_to_pid_local(comm_ptr, idx, &lpid, &avtid); +- } +- +- *lpid_ptr = MPIDIU_LUPID_CREATE(avtid, lpid); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_GET_LPID); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_node_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Get_node_id(MPIR_Comm * comm, int rank, int *id_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_GET_NODE_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_GET_NODE_ID); +- +- MPIDI_CH4U_get_node_id(comm, rank, id_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_GET_NODE_ID); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_max_node_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Get_max_node_id(MPIR_Comm * comm, int *max_id_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_GET_MAX_NODE_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_GET_MAX_NODE_ID); +- +- MPIDI_CH4U_get_max_node_id(comm, max_id_p); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_GET_MAX_NODE_ID); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Create_intercomm_from_lpids +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, +- int size, const int lpids[]) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_CREATE_INTERCOMM_FROM_LPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CREATE_INTERCOMM_FROM_LPIDS); +- +- MPIDI_rank_map_mlut_t *mlut = NULL; +- MPIDI_COMM(newcomm_ptr, map).mode = MPIDI_RANK_MAP_MLUT; +- MPIDI_COMM(newcomm_ptr, map).avtid = -1; +- mpi_errno = MPIDIU_alloc_mlut(&mlut, size); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- MPIDI_COMM(newcomm_ptr, map).size = size; +- MPIDI_COMM(newcomm_ptr, map).irreg.mlut.t = mlut; +- MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid = mlut->gpid; +- +- for (i = 0; i < size; i++) { +- MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid[i].avtid = MPIDIU_LUPID_GET_AVTID(lpids[i]); +- MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid[i].lpid = MPIDIU_LUPID_GET_LPID(lpids[i]); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " remote rank=%d, avtid=%d, lpid=%d", i, +- MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid[i].avtid, +- MPIDI_COMM(newcomm_ptr, map).irreg.mlut.gpid[i].lpid)); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CREATE_INTERCOMM_FROM_LPIDS); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Aint_add +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp) +-{ +- MPI_Aint result; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_AINT_ADD); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_AINT_ADD); +- result = MPIR_VOID_PTR_CAST_TO_MPI_AINT((char *) MPIR_AINT_CAST_TO_VOID_PTR(base) + disp); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_AINT_ADD); +- return result; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Aint_diff +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPI_Aint MPID_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) +-{ +- MPI_Aint result; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_AINT_DIFF); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_AINT_DIFF); +- +- result = MPIR_PTR_DISP_CAST_TO_MPI_AINT((char *) MPIR_AINT_CAST_TO_VOID_PTR(addr1) +- - (char *) MPIR_AINT_CAST_TO_VOID_PTR(addr2)); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_AINT_DIFF); +- return result; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Type_commit_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_Type_commit_hook(MPIR_Datatype * type) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_TYPE_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_TYPE_CREATE_HOOK); +- +- mpi_errno = MPIDI_NM_mpi_type_commit_hook(type); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_type_commit_hook(type); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_TYPE_CREATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Type_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_Type_free_hook(MPIR_Datatype * type) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_TYPE_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_TYPE_FREE_HOOK); +- +- mpi_errno = MPIDI_NM_mpi_type_free_hook(type); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_type_free_hook(type); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_TYPE_FREE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Op_commit_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_Op_commit_hook(MPIR_Op * op) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OP_CREATE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OP_CREATE_HOOK); +- +- mpi_errno = MPIDI_NM_mpi_op_commit_hook(op); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_op_commit_hook(op); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OP_CREATE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Op_free_hook +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_Op_free_hook(MPIR_Op * op) +-{ +- int mpi_errno; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OP_FREE_HOOK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OP_FREE_HOOK); +- +- mpi_errno = MPIDI_NM_mpi_op_free_hook(op); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_op_free_hook(op); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OP_FREE_HOOK); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#endif /* CH4_INIT_H_INCLUDED */ +--- a/src/mpid/ch4/src/ch4_probe.h ++++ b/src/mpid/ch4/src/ch4_probe.h +@@ -11,12 +11,9 @@ + #ifndef CH4_PROBE_H_INCLUDED + #define CH4_PROBE_H_INCLUDED + ++#include "ch4r_proc.h" + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_iprobe_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_iprobe_unsafe(int source, + int tag, MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * av, int *flag, +@@ -31,9 +28,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_iprobe_unsafe(int source, + #else + if (unlikely(source == MPI_ANY_SOURCE)) { + mpi_errno = MPIDI_SHM_mpi_iprobe(source, tag, comm, context_offset, flag, status); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } + if (!*flag) + mpi_errno = MPIDI_NM_mpi_iprobe(source, tag, comm, context_offset, av, flag, status); +- } else if (MPIDI_CH4_rank_is_local(source, comm)) { ++ } else if (MPIDI_rank_is_local(source, comm)) { + mpi_errno = MPIDI_SHM_mpi_iprobe(source, tag, comm, context_offset, flag, status); + } else { + mpi_errno = MPIDI_NM_mpi_iprobe(source, tag, comm, context_offset, av, flag, status); +@@ -50,10 +50,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_iprobe_unsafe(int source, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_improbe_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_improbe_unsafe(int source, + int tag, MPIR_Comm * comm, + int context_offset, +@@ -70,24 +66,32 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_improbe_unsafe(int source, + #else + if (unlikely(source == MPI_ANY_SOURCE)) { + mpi_errno = MPIDI_SHM_mpi_improbe(source, tag, comm, context_offset, flag, message, status); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + if (*flag) { +- MPIDI_CH4I_REQUEST(*message, is_local) = 1; ++ MPIDI_REQUEST(*message, is_local) = 1; + } else { + mpi_errno = + MPIDI_NM_mpi_improbe(source, tag, comm, context_offset, av, flag, message, status); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + if (*flag) { +- MPIDI_CH4I_REQUEST(*message, is_local) = 0; ++ MPIDI_REQUEST(*message, is_local) = 0; + } + } + } else if (MPIDI_av_is_local(av)) { + mpi_errno = MPIDI_SHM_mpi_improbe(source, tag, comm, context_offset, flag, message, status); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + if (*flag) +- MPIDI_CH4I_REQUEST(*message, is_local) = 1; ++ MPIDI_REQUEST(*message, is_local) = 1; + } else { + mpi_errno = + MPIDI_NM_mpi_improbe(source, tag, comm, context_offset, av, flag, message, status); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + if (*flag) +- MPIDI_CH4I_REQUEST(*message, is_local) = 0; ++ MPIDI_REQUEST(*message, is_local) = 0; + } + #endif + +@@ -99,10 +103,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_improbe_unsafe(int source, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_iprobe_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_iprobe_safe(int source, + int tag, MPIR_Comm * comm, int context_offset, + MPIDI_av_entry_t * av, int *flag, +@@ -112,12 +112,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_iprobe_safe(int source, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_IPROBE_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_IPROBE_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = MPIDI_iprobe_unsafe(source, tag, comm, context_offset, av, flag, status); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_IPROBE_SAFE); +@@ -127,10 +130,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_iprobe_safe(int source, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_improbe_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_improbe_safe(int source, + int tag, MPIR_Comm * comm, + int context_offset, +@@ -142,12 +141,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_improbe_safe(int source, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_IMPROBE_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_IMPROBE_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = MPIDI_improbe_unsafe(source, tag, comm, context_offset, av, flag, message, status); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_IMPROBE_SAFE); +@@ -157,10 +159,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_improbe_safe(int source, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Probe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Probe(int source, + int tag, MPIR_Comm * comm, int context_offset, + MPI_Status * status) +@@ -198,10 +196,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Probe(int source, + + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Mprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Mprobe(int source, + int tag, + MPIR_Comm * comm, +@@ -241,10 +235,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Mprobe(int source, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Improbe(int source, + int tag, + MPIR_Comm * comm, +@@ -286,10 +276,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Improbe(int source, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Iprobe(int source, + int tag, + MPIR_Comm * comm, +--- a/src/mpid/ch4/src/ch4_proc.h ++++ b/src/mpid/ch4/src/ch4_proc.h +@@ -13,48 +13,40 @@ + + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4_rank_is_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4_rank_is_local(int rank, MPIR_Comm * comm) ++MPL_STATIC_INLINE_PREFIX int MPIDI_rank_is_local(int rank, MPIR_Comm * comm) + { + int ret; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4_RANK_IS_LOCAL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4_RANK_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RANK_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RANK_IS_LOCAL); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + /* Ask the netmod for locality information. If it decided not to build it, +- * it will call back up to the CH4U function to get the infomration. */ ++ * it will call back up to the MPIDIU function to get the infomration. */ + ret = MPIDI_NM_rank_is_local(rank, comm); + #else +- ret = MPIDI_CH4U_rank_is_local(rank, comm); ++ ret = MPIDIU_rank_is_local(rank, comm); + #endif + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4_RANK_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_RANK_IS_LOCAL); + return ret; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_av_is_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_av_is_local(MPIDI_av_entry_t * av) + { + int ret; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4_AV_IS_LOCAL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4_AV_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_AV_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_AV_IS_LOCAL); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + /* Ask the netmod for locality information. If it decided not to build it, +- * it will call back up to the CH4U function to get the infomration. */ ++ * it will call back up to the MPIDIU function to get the infomration. */ + ret = MPIDI_NM_av_is_local(av); + #else +- ret = MPIDI_CH4U_av_is_local(av); ++ ret = MPIDIU_av_is_local(av); + #endif + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4_AV_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_AV_IS_LOCAL); + return ret; + } + +--- a/src/mpid/ch4/src/ch4_progress.h ++++ b/src/mpid/ch4/src/ch4_progress.h +@@ -13,10 +13,6 @@ + + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Progress_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_test(int flags) + { + int mpi_errno, made_progress, i; +@@ -26,46 +22,43 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_test(int flags) + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PROGRESS_TEST); + + #ifdef HAVE_SIGNAL +- if (MPIDI_CH4_Global.sigusr1_count > MPIDI_CH4_Global.my_sigusr1_count) { +- MPIDI_CH4_Global.my_sigusr1_count = MPIDI_CH4_Global.sigusr1_count; ++ if (MPIDI_global.sigusr1_count > MPIDI_global.my_sigusr1_count) { ++ MPIDI_global.my_sigusr1_count = MPIDI_global.sigusr1_count; + mpi_errno = MPIDI_check_for_failed_procs(); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } + #endif + +- if (OPA_load_int(&MPIDI_CH4_Global.active_progress_hooks) && (flags & MPIDI_PROGRESS_HOOKS)) { +- for (i = 0; i < MAX_PROGRESS_HOOKS; i++) { ++ if (flags & MPIDI_PROGRESS_HOOKS) { ++ for (i = 0; i < MPIDI_global.registered_progress_hooks; i++) { + progress_func_ptr_t func_ptr = NULL; +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- if (MPIDI_CH4_Global.progress_hooks[i].active == TRUE) { +- func_ptr = MPIDI_CH4_Global.progress_hooks[i].func_ptr; +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI, MPIDIU_THREAD_PROGRESS_HOOK_MUTEX); ++ if (MPIDI_global.progress_hooks[i].active == TRUE) { ++ MPID_THREAD_CS_EXIT(VCI, MPIDIU_THREAD_PROGRESS_HOOK_MUTEX); ++ func_ptr = MPIDI_global.progress_hooks[i].func_ptr; + MPIR_Assert(func_ptr != NULL); + mpi_errno = func_ptr(&made_progress); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + + } else { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI, MPIDIU_THREAD_PROGRESS_HOOK_MUTEX); + } +- + } + } + /* todo: progress unexp_list */ + +- mpi_errno = MPIDI_workq_vni_progress(); ++ mpi_errno = MPIDI_workq_vci_progress(); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + + if (flags & MPIDI_PROGRESS_NM) { + mpi_errno = MPIDI_NM_progress(0, 0); + if (mpi_errno != MPI_SUCCESS) { ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_ERR_POP(mpi_errno); + } + } +@@ -73,22 +66,20 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_test(int flags) + if (flags & MPIDI_PROGRESS_SHM) { + mpi_errno = MPIDI_SHM_progress(0, 0); + if (mpi_errno != MPI_SUCCESS) { ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_ERR_POP(mpi_errno); + } + } + #endif ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PROGRESS_TEST); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Progress_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Progress_test(void) + { + return MPIDI_Progress_test(MPIDI_PROGRESS_ALL); +@@ -140,12 +131,12 @@ MPL_STATIC_INLINE_PREFIX int MPID_Progress_wait(MPID_Progress_state * state) + goto fn_exit; + } + +- state->progress_count = OPA_load_int(&MPIDI_CH4_Global.progress_count); ++ state->progress_count = OPA_load_int(&MPIDI_global.progress_count); + do { + ret = MPID_Progress_test(); + if (unlikely(ret)) + MPIR_ERR_POP(ret); +- if (state->progress_count != OPA_load_int(&MPIDI_CH4_Global.progress_count)) ++ if (state->progress_count != OPA_load_int(&MPIDI_global.progress_count)) + break; + MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + } while (1); +@@ -160,10 +151,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Progress_wait(MPID_Progress_state * state) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Progress_register +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Progress_register(int (*progress_fn) (int *), int *id) + { + int mpi_errno = MPI_SUCCESS; +@@ -171,12 +158,10 @@ MPL_STATIC_INLINE_PREFIX int MPID_Progress_register(int (*progress_fn) (int *), + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_PROGRESS_REGISTER); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_PROGRESS_REGISTER); + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); + for (i = 0; i < MAX_PROGRESS_HOOKS; i++) { +- if (MPIDI_CH4_Global.progress_hooks[i].func_ptr == NULL) { +- MPIDI_CH4_Global.progress_hooks[i].func_ptr = progress_fn; +- MPIDI_CH4_Global.progress_hooks[i].active = FALSE; ++ if (MPIDI_global.progress_hooks[i].func_ptr == NULL) { ++ MPIDI_global.progress_hooks[i].func_ptr = progress_fn; ++ MPIDI_global.progress_hooks[i].active = FALSE; + break; + } + } +@@ -184,13 +169,11 @@ MPL_STATIC_INLINE_PREFIX int MPID_Progress_register(int (*progress_fn) (int *), + if (i >= MAX_PROGRESS_HOOKS) + goto fn_fail; + +- OPA_incr_int(&MPIDI_CH4_Global.active_progress_hooks); ++ MPIDI_global.registered_progress_hooks++; + + (*id) = i; + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_PROGRESS_REGISTER); + return mpi_errno; + fn_fail: +@@ -200,43 +183,31 @@ MPL_STATIC_INLINE_PREFIX int MPID_Progress_register(int (*progress_fn) (int *), + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Progress_deregister +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Progress_deregister(int id) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_PROGRESS_DEREGISTER); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_PROGRESS_DEREGISTER); + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); + MPIR_Assert(id >= 0); + MPIR_Assert(id < MAX_PROGRESS_HOOKS); +- MPIR_Assert(MPIDI_CH4_Global.progress_hooks[id].func_ptr != NULL); +- MPIDI_CH4_Global.progress_hooks[id].func_ptr = NULL; +- MPIDI_CH4_Global.progress_hooks[id].active = FALSE; ++ MPIR_Assert(MPIDI_global.progress_hooks[id].func_ptr != NULL); ++ MPIDI_global.progress_hooks[id].func_ptr = NULL; ++ MPIDI_global.progress_hooks[id].active = FALSE; ++ ++ MPIDI_global.registered_progress_hooks--; + +- OPA_decr_int(&MPIDI_CH4_Global.active_progress_hooks); +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_PROGRESS_DEREGISTER); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Progress_activate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Progress_activate(int id) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_PROGRESS_ACTIVATE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_PROGRESS_ACTIVATE); + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI, MPIDIU_THREAD_PROGRESS_HOOK_MUTEX); + MPIR_Assert(id >= 0); + MPIR_Assert(id < MAX_PROGRESS_HOOKS); + /* Asserting that active == FALSE shouldn't be done outside the global lock +@@ -244,41 +215,34 @@ MPL_STATIC_INLINE_PREFIX int MPID_Progress_activate(int id) + * hook concurrently, in which case one of them will correctly detect that + * active == TRUE because the other thread set it.*/ + +- if (MPIDI_CH4_Global.progress_hooks[id].active == FALSE) { +- MPIR_Assert(MPIDI_CH4_Global.progress_hooks[id].func_ptr != NULL); +- MPIDI_CH4_Global.progress_hooks[id].active = TRUE; ++ if (MPIDI_global.progress_hooks[id].active == FALSE) { ++ MPIR_Assert(MPIDI_global.progress_hooks[id].func_ptr != NULL); ++ MPIDI_global.progress_hooks[id].active = TRUE; + } + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI, MPIDIU_THREAD_PROGRESS_HOOK_MUTEX); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_PROGRESS_ACTIVATE); + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Progress_deactivate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Progress_deactivate(int id) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_PROGRESS_DEACTIVATE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_PROGRESS_DEACTIVATE); + +- MPID_THREAD_CS_ENTER(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI, MPIDIU_THREAD_PROGRESS_HOOK_MUTEX); + MPIR_Assert(id >= 0); + MPIR_Assert(id < MAX_PROGRESS_HOOKS); + /* We shouldn't assert that active == TRUE here for the same reasons + * as not asserting active == FALSE in Progress_activate */ + +- if (MPIDI_CH4_Global.progress_hooks[id].active == TRUE) { +- MPIR_Assert(MPIDI_CH4_Global.progress_hooks[id].func_ptr != NULL); +- MPIDI_CH4_Global.progress_hooks[id].active = FALSE; ++ if (MPIDI_global.progress_hooks[id].active == TRUE) { ++ MPIR_Assert(MPIDI_global.progress_hooks[id].func_ptr != NULL); ++ MPIDI_global.progress_hooks[id].active = FALSE; + } + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); +- MPID_THREAD_CS_EXIT(POBJ, MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI, MPIDIU_THREAD_PROGRESS_HOOK_MUTEX); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_PROGRESS_DEACTIVATE); + return mpi_errno; + } +--- a/src/mpid/ch4/src/ch4_recv.h ++++ b/src/mpid/ch4/src/ch4_recv.h +@@ -13,10 +13,6 @@ + + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_recv_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_recv_unsafe(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -43,26 +39,30 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_recv_unsafe(void *buf, + MPIR_ERR_POP(mpi_errno); + } + +- mpi_errno = MPIDI_NM_mpi_irecv(buf, count, datatype, rank, tag, comm, context_offset, av, +- &(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request))); ++ MPIDI_REQUEST(*request, is_local) = 1; + +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- /* cancel the shm request if netmod/am handles the request from unexpected queue. */ +- if (MPIR_Request_is_complete(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request))) { +- mpi_errno = MPIDI_SHM_mpi_cancel_recv(*request); +- if (MPIR_STATUS_GET_CANCEL_BIT((*request)->status)) { +- (*request)->status = MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request)->status; ++ if (!MPIR_Request_is_complete(*request) && !MPIDIG_REQUEST_IN_PROGRESS(*request)) { ++ mpi_errno = MPIDI_NM_mpi_irecv(buf, count, datatype, rank, tag, comm, context_offset, ++ av, &(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request))); ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ MPIDI_REQUEST(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request), is_local) = 0; ++ ++ /* cancel the shm request if netmod/am handles the request from unexpected queue. */ ++ if (MPIR_Request_is_complete(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request))) { ++ mpi_errno = MPIDI_SHM_mpi_cancel_recv(*request); ++ if (MPIR_STATUS_GET_CANCEL_BIT((*request)->status)) { ++ (*request)->status = MPIDI_REQUEST_ANYSOURCE_PARTNER(*request)->status; ++ } ++ MPIR_Request_free(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request)); ++ goto fn_exit; + } +- MPIR_Request_free(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request)); +- goto fn_exit; +- } +- MPIDI_CH4I_REQUEST(*request, is_local) = 1; +- MPIDI_CH4I_REQUEST(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request), is_local) = 0; + +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request)) = +- *request; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request)) = *request; ++ } + } else { + int r; + if ((r = MPIDI_av_is_local(av))) +@@ -74,8 +74,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_recv_unsafe(void *buf, + MPIDI_NM_mpi_recv(buf, count, datatype, rank, tag, comm, context_offset, av, status, + request); + if (mpi_errno == MPI_SUCCESS && *request) { +- MPIDI_CH4I_REQUEST(*request, is_local) = r; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; ++ MPIDI_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; + } + } + #endif +@@ -90,10 +90,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_recv_unsafe(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_irecv_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_unsafe(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -119,18 +115,30 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_unsafe(void *buf, + MPIR_ERR_POP(mpi_errno); + } + +- mpi_errno = MPIDI_NM_mpi_irecv(buf, count, datatype, rank, tag, comm, context_offset, av, +- &(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request))); ++ MPIR_Assert(*request); ++ if (!MPIR_Request_is_complete(*request) && !MPIDIG_REQUEST_IN_PROGRESS(*request)) { ++ mpi_errno = MPIDI_NM_mpi_irecv(buf, count, datatype, rank, tag, comm, context_offset, ++ av, &(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request))); + +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } else if (*request) { +- MPIDI_CH4I_REQUEST(*request, is_local) = 1; +- MPIDI_CH4I_REQUEST(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request), is_local) = 0; +- } ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ MPIDI_REQUEST(*request, is_local) = 1; ++ MPIDI_REQUEST(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request), is_local) = 0; ++ ++ /* cancel the shm request if netmod/am handles the request from unexpected queue. */ ++ if (MPIR_Request_is_complete(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request))) { ++ mpi_errno = MPIDI_SHM_mpi_cancel_recv(*request); ++ if (MPIR_STATUS_GET_CANCEL_BIT((*request)->status)) { ++ (*request)->status = MPIDI_REQUEST_ANYSOURCE_PARTNER(*request)->status; ++ } ++ MPIR_Request_free(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request)); ++ goto fn_exit; ++ } + +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request)) = +- *request; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request)) = *request; ++ } + } else { + int r; + if ((r = MPIDI_av_is_local(av))) +@@ -140,9 +148,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_unsafe(void *buf, + mpi_errno = + MPIDI_NM_mpi_irecv(buf, count, datatype, rank, tag, comm, context_offset, av, + request); +- if (mpi_errno == MPI_SUCCESS && *request) { +- MPIDI_CH4I_REQUEST(*request, is_local) = r; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; ++ if (mpi_errno == MPI_SUCCESS) { ++ MPIR_Assert(*request); ++ MPIDI_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; + } + } + #endif +@@ -157,13 +166,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_unsafe(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_imrecv_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_imrecv_unsafe(void *buf, + MPI_Aint count, MPI_Datatype datatype, +- MPIR_Request * message, MPIR_Request ** rreqp) ++ MPIR_Request * message) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_IMRECV_UNSAFE); +@@ -172,24 +177,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_imrecv_unsafe(void *buf, + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_imrecv(buf, count, datatype, message); + #else +- if (MPIDI_CH4I_REQUEST(message, is_local)) +- mpi_errno = MPIDI_SHM_mpi_imrecv(buf, count, datatype, message, rreqp); ++ if (MPIDI_REQUEST(message, is_local)) ++ mpi_errno = MPIDI_SHM_mpi_imrecv(buf, count, datatype, message); + else + mpi_errno = MPIDI_NM_mpi_imrecv(buf, count, datatype, message); + #endif + +- fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_IMRECV_UNSAFE); + return mpi_errno; +- +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_cancel_recv_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_cancel_recv_unsafe(MPIR_Request * rreq) + { + int mpi_errno; +@@ -199,11 +196,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_cancel_recv_unsafe(MPIR_Request * rreq) + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_cancel_recv(rreq); + #else +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) ++ if (MPIDI_REQUEST(rreq, is_local)) + mpi_errno = MPIDI_SHM_mpi_cancel_recv(rreq); + else + mpi_errno = MPIDI_NM_mpi_cancel_recv(rreq); + #endif ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CANCEL_RECV_UNSAFE); +@@ -212,10 +211,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_cancel_recv_unsafe(MPIR_Request * rreq) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_recv_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_recv_safe(void *buf, + int count, + MPI_Datatype datatype, +@@ -229,7 +224,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_recv_safe(void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RECV_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RECV_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + *(req) = MPIR_Request_create(MPIR_REQUEST_KIND__RECV); +@@ -241,14 +236,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_recv_safe(void *buf, + NULL /*processed */); + } else { + *(req) = NULL; +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = + MPIDI_recv_unsafe(buf, count, datatype, rank, tag, comm, context_offset, av, status, + req); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_RECV_SAFE); + return mpi_errno; + +@@ -256,10 +251,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_recv_safe(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_irecv_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_safe(void *buf, + int count, + MPI_Datatype datatype, +@@ -273,7 +264,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_safe(void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_IRECV_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_IRECV_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + *(req) = MPIR_Request_create(MPIR_REQUEST_KIND__RECV); +@@ -285,13 +276,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_safe(void *buf, + NULL /*processed */); + } else { + *(req) = NULL; +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = + MPIDI_irecv_unsafe(buf, count, datatype, rank, tag, comm, context_offset, av, req); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_IRECV_SAFE); + return mpi_errno; + +@@ -299,25 +290,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_safe(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_imrecv_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_imrecv_safe(void *buf, + MPI_Aint count, MPI_Datatype datatype, +- MPIR_Request * message, MPIR_Request ** rreqp) ++ MPIR_Request * message) + { + int mpi_errno = MPI_SUCCESS, cs_acq = 0; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_IMRECV_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_IMRECV_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + MPIR_Request *request = MPIR_Request_create(MPIR_REQUEST_KIND__RECV); +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- *rreqp = request; +-#endif + MPIR_ERR_CHKANDSTMT(request == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + MPIR_Datatype_add_ref_if_not_builtin(datatype); + MPIDI_workq_pt2pt_enqueue(IMRECV, NULL /*send_buf */ , buf, count, datatype, +@@ -326,16 +310,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_imrecv_safe(void *buf, + NULL /*status */ , request, NULL /*flag */ , + &message, NULL /*processed */); + } else { +- MPIDI_workq_vni_progress_unsafe(); +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(message, is_local)) +- *rreqp = NULL; +-#endif +- mpi_errno = MPIDI_imrecv_unsafe(buf, count, datatype, message, rreqp); ++ MPIDI_workq_vci_progress_unsafe(); ++ mpi_errno = MPIDI_imrecv_unsafe(buf, count, datatype, message); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_IMRECV_SAFE); + return mpi_errno; + +@@ -343,21 +323,20 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_imrecv_safe(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_cancel_recv_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_cancel_recv_safe(MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_IRECV_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_IRECV_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + + mpi_errno = MPIDI_cancel_recv_unsafe(rreq); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_IRECV_SAFE); +@@ -368,10 +347,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_cancel_recv_safe(MPIR_Request * rreq) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Recv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -392,8 +367,9 @@ MPL_STATIC_INLINE_PREFIX int MPID_Recv(void *buf, + *request = rreq; + MPIR_Request_add_ref(rreq); + rreq->status.MPI_SOURCE = rank; +- rreq->status.MPI_TAG = tag; +- MPIDI_CH4U_request_complete(rreq); ++ rreq->status.MPI_TAG = MPI_ANY_TAG; ++ MPIR_STATUS_SET_COUNT(rreq->status, 0); ++ MPIDIU_request_complete(rreq); + mpi_errno = MPI_SUCCESS; + goto fn_exit; + } +@@ -412,10 +388,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Recv(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Recv_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Recv_init(void *buf, + int count, + MPI_Datatype datatype, +@@ -442,19 +414,19 @@ MPL_STATIC_INLINE_PREFIX int MPID_Recv_init(void *buf, + MPIR_ERR_POP(mpi_errno); + } + ++ MPIDI_REQUEST(*request, is_local) = 1; ++ + mpi_errno = + MPIDI_NM_mpi_recv_init(buf, count, datatype, rank, tag, comm, context_offset, av, +- &(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request))); ++ &(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request))); + + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); + } + +- MPIDI_CH4I_REQUEST(*request, is_local) = 1; +- MPIDI_CH4I_REQUEST(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request), is_local) = 0; ++ MPIDI_REQUEST(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request), is_local) = 0; + +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request)) = +- *request; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(MPIDI_REQUEST_ANYSOURCE_PARTNER(*request)) = *request; + } else { + int r; + if ((r = MPIDI_av_is_local(av))) +@@ -464,8 +436,8 @@ MPL_STATIC_INLINE_PREFIX int MPID_Recv_init(void *buf, + mpi_errno = MPIDI_NM_mpi_recv_init(buf, count, datatype, rank, tag, + comm, context_offset, av, request); + if (mpi_errno == MPI_SUCCESS) { +- MPIDI_CH4I_REQUEST(*request, is_local) = r; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; ++ MPIDI_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; + } + } + fn_exit: +@@ -481,10 +453,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Recv_init(void *buf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Mrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Mrecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, MPIR_Request * message, +@@ -505,9 +473,9 @@ MPL_STATIC_INLINE_PREFIX int MPID_Mrecv(void *buf, + + MPIR_Assert(message->kind == MPIR_REQUEST_KIND__MPROBE); + message->kind = MPIR_REQUEST_KIND__RECV; +- *rreq = message; /* SHM will override this pointer */ ++ *rreq = message; + +- mpi_errno = MPIDI_imrecv_safe(buf, count, datatype, message, rreq); ++ mpi_errno = MPIDI_imrecv_safe(buf, count, datatype, message); + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); + } +@@ -519,10 +487,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Mrecv(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Imrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Imrecv(void *buf, MPI_Aint count, MPI_Datatype datatype, + MPIR_Request * message, MPIR_Request ** rreqp) + { +@@ -538,9 +502,9 @@ MPL_STATIC_INLINE_PREFIX int MPID_Imrecv(void *buf, MPI_Aint count, MPI_Datatype + + MPIR_Assert(message->kind == MPIR_REQUEST_KIND__MPROBE); + message->kind = MPIR_REQUEST_KIND__RECV; +- *rreqp = message; /* SHM will override this pointer */ ++ *rreqp = message; + +- mpi_errno = MPIDI_imrecv_safe(buf, count, datatype, message, rreqp); ++ mpi_errno = MPIDI_imrecv_safe(buf, count, datatype, message); + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); + } +@@ -551,10 +515,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Imrecv(void *buf, MPI_Aint count, MPI_Datatype + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Irecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Irecv(void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -574,8 +534,9 @@ MPL_STATIC_INLINE_PREFIX int MPID_Irecv(void *buf, + *request = rreq; + MPIR_Request_add_ref(rreq); + rreq->status.MPI_SOURCE = rank; +- rreq->status.MPI_TAG = tag; +- MPIDI_CH4U_request_complete(rreq); ++ rreq->status.MPI_TAG = MPI_ANY_TAG; ++ MPIR_STATUS_SET_COUNT(rreq->status, 0); ++ MPIDIU_request_complete(rreq); + mpi_errno = MPI_SUCCESS; + goto fn_exit; + } +@@ -594,10 +555,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Irecv(void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_Cancel_Recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Cancel_recv(MPIR_Request * rreq) + { + int mpi_errno; +--- a/src/mpid/ch4/src/ch4_request.h ++++ b/src/mpid/ch4/src/ch4_request.h +@@ -78,10 +78,6 @@ MPL_STATIC_INLINE_PREFIX void MPID_Request_set_completed(MPIR_Request * req) + the request because it does not know about the internals of + the ch4r/netmod/shmmod fields of the request. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_request_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Request_complete(MPIR_Request * req) + { + int incomplete, notify_counter; +@@ -98,10 +94,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Request_complete(MPIR_Request * req) + if (req->completion_notification) + MPIR_cc_decr(req->completion_notification, ¬ify_counter); + +- if (MPIDI_CH4U_REQUEST(req, req)) { +- MPIDI_CH4R_release_buf(MPIDI_CH4U_REQUEST(req, req)); +- MPIDI_CH4U_REQUEST(req, req) = NULL; ++ if (MPIDIG_REQUEST(req, req)) { ++ MPIDIU_release_buf(MPIDIG_REQUEST(req, req)); ++ MPIDIG_REQUEST(req, req) = NULL; + MPIDI_NM_am_request_finalize(req); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_SHM_am_request_finalize(req); ++#endif + } + MPIR_Request_free(req); + } +@@ -110,4 +109,34 @@ MPL_STATIC_INLINE_PREFIX int MPID_Request_complete(MPIR_Request * req) + return MPI_SUCCESS; + } + ++MPL_STATIC_INLINE_PREFIX void MPID_Prequest_free_hook(MPIR_Request * req) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_PREQUEST_FREE_HOOK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_PREQUEST_FREE_HOOK); ++ ++ /* If a user passed a derived datatype for this persistent communication, ++ * free it. ++ * We could have done this cleanup in more general request cleanup functions, ++ * like MPID_Request_destroy_hook. However, that would always add a few ++ * instructions for any kind of request object, even if it's no a request ++ * from persistent communications. */ ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_NM_prequest_free_hook(req); ++#else ++ if (unlikely(NULL != MPIDI_REQUEST_ANYSOURCE_PARTNER(req))) { ++ /* `req` is created by Recv_init(MPI_ANY_SOURCE). ++ * Need to clean up both shmmod and netmod. */ ++ MPIDI_SHM_prequest_free_hook(req); ++ MPIDI_NM_prequest_free_hook(MPIDI_REQUEST_ANYSOURCE_PARTNER(req)); ++ } else { ++ if (MPIDI_REQUEST(req, is_local)) ++ MPIDI_SHM_prequest_free_hook(req); ++ else ++ MPIDI_NM_prequest_free_hook(req); ++ } ++#endif ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_PREQUEST_FREE_HOOK); ++} ++ + #endif /* CH4_REQUEST_H_INCLUDED */ +--- a/src/mpid/ch4/src/ch4_rma.h ++++ b/src/mpid/ch4/src/ch4_rma.h +@@ -13,10 +13,6 @@ + + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_put_unsafe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -26,30 +22,28 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_put_unsafe(const void *origin_addr, + MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_UNSAFE); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, +- NULL); ++ target_rank, target_disp, target_count, target_datatype, win, av); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + mpi_errno = MPI_SUCCESS; + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + if ((r = MPIDI_av_is_local(av))) + mpi_errno = MPIDI_SHM_mpi_put(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win); + else + mpi_errno = MPIDI_NM_mpi_put(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win, +- NULL); ++ av); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -61,10 +55,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_put_unsafe(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_get_unsafe(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -74,30 +64,28 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_unsafe(void *origin_addr, + MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_UNSAFE); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, +- NULL); ++ target_rank, target_disp, target_count, target_datatype, win, av); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + mpi_errno = MPI_SUCCESS; + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + if ((r = MPIDI_av_is_local(av))) + mpi_errno = MPIDI_SHM_mpi_get(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win); + else + mpi_errno = MPIDI_NM_mpi_get(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win, +- NULL); ++ av); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -109,10 +97,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_unsafe(void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_accumulate_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_accumulate_unsafe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -123,31 +107,30 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_accumulate_unsafe(const void *origin_addr, + MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACCUMULATE_UNSAFE); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_accumulate(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, NULL); ++ target_datatype, op, win, av); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + mpi_errno = MPI_SUCCESS; + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); +- if ((r = MPIDI_av_is_local(av)) && !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate) ++ if ((r = MPIDI_av_is_local(av)) && !MPIDIG_WIN(win, info_args).disable_shm_accumulate) + mpi_errno = MPIDI_SHM_mpi_accumulate(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, op, win); + else + mpi_errno = MPIDI_NM_mpi_accumulate(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, NULL); ++ target_datatype, op, win, av); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -159,10 +142,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_accumulate_unsafe(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_compare_and_swap_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_compare_and_swap_unsafe(const void *origin_addr, + const void *compare_addr, + void *result_addr, +@@ -171,28 +150,27 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_compare_and_swap_unsafe(const void *origin_ad + MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMPARE_AND_SWAP_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMPARE_AND_SWAP_UNSAFE); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, +- datatype, target_rank, target_disp, win, NULL); ++ datatype, target_rank, target_disp, win, av); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + mpi_errno = MPI_SUCCESS; + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); +- if ((r = MPIDI_av_is_local(av)) && !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate) ++ if ((r = MPIDI_av_is_local(av)) && !MPIDIG_WIN(win, info_args).disable_shm_accumulate) + mpi_errno = MPIDI_SHM_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, + datatype, target_rank, target_disp, win); + else + mpi_errno = MPIDI_NM_mpi_compare_and_swap(origin_addr, compare_addr, result_addr, +- datatype, target_rank, target_disp, win, NULL); ++ datatype, target_rank, target_disp, win, av); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -205,10 +183,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_compare_and_swap_unsafe(const void *origin_ad + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_raccumulate_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_raccumulate_unsafe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -220,16 +194,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_raccumulate_unsafe(const void *origin_addr, + MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RACCUMULATE_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RACCUMULATE_UNSAFE); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_raccumulate(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, NULL, request); ++ target_datatype, op, win, av, request); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + /* create a completed request for user. */ +@@ -239,15 +213,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_raccumulate_unsafe(const void *origin_addr, + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); +- if ((r = MPIDI_av_is_local(av)) && !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate) ++ if ((r = MPIDI_av_is_local(av)) && !MPIDIG_WIN(win, info_args).disable_shm_accumulate) + mpi_errno = MPIDI_SHM_mpi_raccumulate(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, + target_datatype, op, win, request); + else + mpi_errno = MPIDI_NM_mpi_raccumulate(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, NULL, request); ++ target_datatype, op, win, av, request); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -259,10 +232,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_raccumulate_unsafe(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_rget_accumulate_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_unsafe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -277,6 +246,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_unsafe(const void *origin_add + MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RGET_ACCUMULATE_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RGET_ACCUMULATE_UNSAFE); + +@@ -284,10 +254,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_unsafe(const void *origin_add + mpi_errno = MPIDI_NM_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, NULL, request); ++ target_datatype, op, win, av, request); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + /* create a completed request for user. */ +@@ -297,8 +266,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_unsafe(const void *origin_add + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); +- if ((r = MPIDI_av_is_local(av)) && !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate) ++ if ((r = MPIDI_av_is_local(av)) && !MPIDIG_WIN(win, info_args).disable_shm_accumulate) + mpi_errno = MPIDI_SHM_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, +@@ -307,7 +275,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_unsafe(const void *origin_add + mpi_errno = MPIDI_NM_mpi_rget_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, NULL, request); ++ target_datatype, op, win, av, request); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -319,10 +287,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_unsafe(const void *origin_add + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_fetch_and_op_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_fetch_and_op_unsafe(const void *origin_addr, + void *result_addr, + MPI_Datatype datatype, +@@ -331,28 +295,27 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_fetch_and_op_unsafe(const void *origin_addr, + MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_FETCH_AND_OP_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_FETCH_AND_OP_UNSAFE); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_fetch_and_op(origin_addr, result_addr, +- datatype, target_rank, target_disp, op, win, NULL); ++ datatype, target_rank, target_disp, op, win, av); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + mpi_errno = MPI_SUCCESS; + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); +- if ((r = MPIDI_av_is_local(av)) && !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate) ++ if ((r = MPIDI_av_is_local(av)) && !MPIDIG_WIN(win, info_args).disable_shm_accumulate) + mpi_errno = MPIDI_SHM_mpi_fetch_and_op(origin_addr, result_addr, + datatype, target_rank, target_disp, op, win); + else + mpi_errno = MPIDI_NM_mpi_fetch_and_op(origin_addr, result_addr, +- datatype, target_rank, target_disp, op, win, NULL); ++ datatype, target_rank, target_disp, op, win, av); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -364,10 +327,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_fetch_and_op_unsafe(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_rget_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_rget_unsafe(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -378,16 +337,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_unsafe(void *origin_addr, + MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RGET_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RGET_UNSAFE); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_rget(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +- target_datatype, win, NULL, request); ++ target_datatype, win, av, request); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + /* create a completed request for user. */ +@@ -397,7 +356,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_unsafe(void *origin_addr, + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + if ((r = MPIDI_av_is_local(av))) + mpi_errno = MPIDI_SHM_mpi_rget(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +@@ -405,7 +363,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_unsafe(void *origin_addr, + else + mpi_errno = MPIDI_NM_mpi_rget(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +- target_datatype, win, NULL, request); ++ target_datatype, win, av, request); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -417,10 +375,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_unsafe(void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_rput_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_rput_unsafe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -431,16 +385,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rput_unsafe(const void *origin_addr, + MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RPUT_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RPUT_UNSAFE); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_rput(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +- target_datatype, win, NULL, request); ++ target_datatype, win, av, request); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + /* create a completed request for user. */ +@@ -450,7 +404,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rput_unsafe(const void *origin_addr, + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + if ((r = MPIDI_av_is_local(av))) + mpi_errno = MPIDI_SHM_mpi_rput(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +@@ -458,7 +411,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rput_unsafe(const void *origin_addr, + else + mpi_errno = MPIDI_NM_mpi_rput(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, +- target_datatype, win, NULL, request); ++ target_datatype, win, av, request); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -470,10 +423,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rput_unsafe(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_accumulate_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_get_accumulate_unsafe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -487,6 +436,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_accumulate_unsafe(const void *origin_addr + MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_entry_t *av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE_UNSAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE_UNSAFE); + +@@ -494,18 +444,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_accumulate_unsafe(const void *origin_addr + mpi_errno = MPIDI_NM_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, target_datatype, +- op, win, NULL); ++ op, win, av); + #else + int r; +- MPIDI_av_entry_t *av = NULL; + + if (unlikely(target_rank == MPI_PROC_NULL)) { + mpi_errno = MPI_SUCCESS; + goto fn_exit; + } + +- av = MPIDIU_comm_rank_to_av(win->comm_ptr, target_rank); +- if ((r = MPIDI_av_is_local(av)) && !MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate) ++ if ((r = MPIDI_av_is_local(av)) && !MPIDIG_WIN(win, info_args).disable_shm_accumulate) + mpi_errno = MPIDI_SHM_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, +@@ -514,7 +462,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_accumulate_unsafe(const void *origin_addr + mpi_errno = MPIDI_NM_mpi_get_accumulate(origin_addr, origin_count, origin_datatype, + result_addr, result_count, result_datatype, + target_rank, target_disp, target_count, +- target_datatype, op, win, NULL); ++ target_datatype, op, win, av); + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -526,10 +474,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_accumulate_unsafe(const void *origin_addr + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_put_safe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -542,7 +486,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_put_safe(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + MPIR_Datatype_add_ref_if_not_builtin(origin_datatype); +@@ -551,23 +495,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_put_safe(const void *origin_addr, + MPI_DATATYPE_NULL, target_rank, target_disp, target_count, + target_datatype, MPI_OP_NULL, win, NULL, NULL); + } else { +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = MPIDI_put_unsafe(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_SAFE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_get_safe(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -580,7 +522,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_safe(void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + MPIR_Datatype_add_ref_if_not_builtin(origin_datatype); +@@ -591,23 +533,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_safe(void *origin_addr, + MPI_DATATYPE_NULL, target_rank, target_disp, target_count, + target_datatype, MPI_OP_NULL, win, NULL, NULL); + } else { +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = MPIDI_get_unsafe(origin_addr, origin_count, origin_datatype, + target_rank, target_disp, target_count, target_datatype, win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_SAFE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_accumulate_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_accumulate_safe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -621,26 +561,25 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_accumulate_safe(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACCUMULATE_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + mpi_errno = MPIDI_accumulate_unsafe(origin_addr, origin_count, origin_datatype, target_rank, + target_disp, target_count, target_datatype, op, win); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACCUMULATE_SAFE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_compare_and_swap_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_compare_and_swap_safe(const void *origin_addr, + const void *compare_addr, + void *result_addr, +@@ -652,17 +591,20 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_compare_and_swap_safe(const void *origin_addr + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMPARE_AND_SWAP_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMPARE_AND_SWAP_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + mpi_errno = + MPIDI_compare_and_swap_unsafe(origin_addr, compare_addr, result_addr, datatype, + target_rank, target_disp, win); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMPARE_AND_SWAP_SAFE); + return mpi_errno; + fn_fail: +@@ -670,10 +612,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_compare_and_swap_safe(const void *origin_addr + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_raccumulate_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_raccumulate_safe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -688,14 +626,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_raccumulate_safe(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RACCUMULATE_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RACCUMULATE_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + mpi_errno = MPIDI_raccumulate_unsafe(origin_addr, origin_count, origin_datatype, target_rank, + target_disp, target_count, target_datatype, op, win, + request); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -707,10 +645,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_raccumulate_safe(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_rget_accumulate_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_safe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -728,15 +662,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_safe(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RGET_ACCUMULATE_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RGET_ACCUMULATE_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + mpi_errno = + MPIDI_rget_accumulate_unsafe(origin_addr, origin_count, origin_datatype, result_addr, + result_count, result_datatype, target_rank, target_disp, + target_count, target_datatype, op, win, request); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_RGET_ACCUMULATE_SAFE); +@@ -745,10 +682,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_accumulate_safe(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_fetch_and_op_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_fetch_and_op_safe(const void *origin_addr, + void *result_addr, + MPI_Datatype datatype, +@@ -760,26 +693,25 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_fetch_and_op_safe(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_FETCH_AND_OP_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_FETCH_AND_OP_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + mpi_errno = MPIDI_fetch_and_op_unsafe(origin_addr, result_addr, datatype, target_rank, + target_disp, op, win); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_FETCH_AND_OP_SAFE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_rget_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_rget_safe(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -793,14 +725,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_safe(void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RGET_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RGET_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + mpi_errno = + MPIDI_rget_unsafe(origin_addr, origin_count, origin_datatype, target_rank, target_disp, + target_count, target_datatype, win, request); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_RGET_SAFE); +@@ -809,10 +744,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rget_safe(void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_rput_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_rput_safe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -826,14 +757,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rput_safe(const void *origin_addr, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RPUT_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RPUT_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + mpi_errno = + MPIDI_rput_unsafe(origin_addr, origin_count, origin_datatype, target_rank, target_disp, + target_count, target_datatype, win, request); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_RPUT_SAFE); +@@ -842,10 +776,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_rput_safe(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_accumulate_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_get_accumulate_safe(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -858,21 +788,23 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_accumulate_safe(const void *origin_addr, + MPI_Datatype target_datatype, MPI_Op op, + MPIR_Win * win) + { +- int mpi_errno = MPI_SUCCESS, cs_acq = 0; ++ int mpi_errno = MPI_SUCCESS; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE_SAFE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + mpi_errno = MPIDI_get_accumulate_unsafe(origin_addr, origin_count, origin_datatype, result_addr, + result_count, result_datatype, target_rank, target_disp, + target_count, target_datatype, op, win); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACCUMULATE_SAFE); + return mpi_errno; + fn_fail: +@@ -880,10 +812,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_get_accumulate_safe(const void *origin_addr, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Put(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -908,10 +836,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Put(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Get(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -936,10 +860,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Get(void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -965,10 +885,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Accumulate(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Compare_and_swap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Compare_and_swap(const void *origin_addr, + const void *compare_addr, + void *result_addr, +@@ -992,10 +908,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Compare_and_swap(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Raccumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Raccumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1023,10 +935,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Raccumulate(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Rget_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Rget_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1057,10 +965,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Rget_accumulate(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Fetch_and_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Fetch_and_op(const void *origin_addr, + void *result_addr, + MPI_Datatype datatype, +@@ -1084,10 +988,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Fetch_and_op(const void *origin_addr, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Rget +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Rget(void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1113,10 +1013,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Rget(void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Rput +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Rput(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +@@ -1143,10 +1039,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Rput(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Get_accumulate(const void *origin_addr, + int origin_count, + MPI_Datatype origin_datatype, +--- a/src/mpid/ch4/src/ch4_send.h ++++ b/src/mpid/ch4/src/ch4_send.h +@@ -14,10 +14,6 @@ + #include "ch4_impl.h" + #include "ch4r_proc.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_send_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_send_unsafe(const void *buf, + int count, + MPI_Datatype datatype, +@@ -42,7 +38,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_send_unsafe(const void *buf, + mpi_errno = + MPIDI_NM_mpi_send(buf, count, datatype, rank, tag, comm, context_offset, av, request); + if (mpi_errno == MPI_SUCCESS && *request) +- MPIDI_CH4I_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST(*request, is_local) = r; + #endif + + if (mpi_errno != MPI_SUCCESS) { +@@ -57,10 +53,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_send_unsafe(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_isend_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_isend_unsafe(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -85,7 +77,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_isend_unsafe(const void *buf, + mpi_errno = + MPIDI_NM_mpi_isend(buf, count, datatype, rank, tag, comm, context_offset, av, request); + if (mpi_errno == MPI_SUCCESS) +- MPIDI_CH4I_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST(*request, is_local) = r; + #endif + + if (mpi_errno != MPI_SUCCESS) { +@@ -98,10 +90,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_isend_unsafe(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ssend_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_ssend_unsafe(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -127,7 +115,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_ssend_unsafe(const void *buf, + MPIDI_NM_mpi_ssend(buf, count, datatype, rank, tag, comm, context_offset, av, req); + + if (mpi_errno == MPI_SUCCESS && *req) +- MPIDI_CH4I_REQUEST(*req, is_local) = r; ++ MPIDI_REQUEST(*req, is_local) = r; + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -139,10 +127,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_ssend_unsafe(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_issend_unsafe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_issend_unsafe(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -167,7 +151,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_issend_unsafe(const void *buf, + MPIDI_NM_mpi_issend(buf, count, datatype, rank, tag, comm, context_offset, av, req); + + if (mpi_errno == MPI_SUCCESS) +- MPIDI_CH4I_REQUEST(*req, is_local) = r; ++ MPIDI_REQUEST(*req, is_local) = r; + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -179,10 +163,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_issend_unsafe(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_send_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_send_safe(const void *buf, + int count, + MPI_Datatype datatype, +@@ -195,7 +175,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_send_safe(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SEND_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SEND_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + *(req) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +@@ -207,13 +187,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_send_safe(const void *buf, + NULL /*message */ , NULL /*processed */); + } else { + *(req) = NULL; +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = + MPIDI_send_unsafe(buf, count, datatype, rank, tag, comm, context_offset, av, req); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SEND_SAFE); + return mpi_errno; + +@@ -221,10 +201,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_send_safe(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_isend_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_isend_safe(const void *buf, + int count, + MPI_Datatype datatype, +@@ -237,7 +213,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_isend_safe(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ISEND_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ISEND_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + *(req) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +@@ -249,13 +225,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_isend_safe(const void *buf, + NULL /*message */ , NULL /*processed */); + } else { + *(req) = NULL; +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = + MPIDI_isend_unsafe(buf, count, datatype, rank, tag, comm, context_offset, av, req); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ISEND_SAFE); + return mpi_errno; + +@@ -263,10 +239,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_isend_safe(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ssend_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_ssend_safe(const void *buf, + int count, + MPI_Datatype datatype, +@@ -279,7 +251,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_ssend_safe(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SSEND_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SSEND_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + *(req) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +@@ -291,13 +263,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_ssend_safe(const void *buf, + NULL /*message */ , NULL /*processed */); + } else { + *(req) = NULL; +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = + MPIDI_ssend_unsafe(buf, count, datatype, rank, tag, comm, context_offset, av, req); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SSEND_SAFE); + return mpi_errno; + +@@ -305,10 +277,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_ssend_safe(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_issend_safe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPIDI_issend_safe(const void *buf, + int count, + MPI_Datatype datatype, +@@ -321,7 +289,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_issend_safe(const void *buf, + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ISSEND_SAFE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ISSEND_SAFE); + +- MPID_THREAD_SAFE_BEGIN(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_BEGIN(VCI, MPIDI_global.vci_lock, cs_acq); + + if (!cs_acq) { + *(req) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); +@@ -333,13 +301,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_issend_safe(const void *buf, + NULL /*message */ , NULL /*processed */); + } else { + *(req) = NULL; +- MPIDI_workq_vni_progress_unsafe(); ++ MPIDI_workq_vci_progress_unsafe(); + mpi_errno = + MPIDI_issend_unsafe(buf, count, datatype, rank, tag, comm, context_offset, av, req); + } + + fn_exit: +- MPID_THREAD_SAFE_END(VNI, MPIDI_CH4_Global.vni_lock, cs_acq); ++ MPID_THREAD_SAFE_END(VCI, MPIDI_global.vci_lock, cs_acq); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ISSEND_SAFE); + return mpi_errno; + +@@ -347,10 +315,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_issend_safe(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Send(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -384,10 +348,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Send(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Isend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Isend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -423,10 +383,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Isend(const void *buf, + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Rsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Rsend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -466,10 +422,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Rsend(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Irsend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Irsend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -510,10 +462,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Irsend(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Ssend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -548,10 +496,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ssend(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Issend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Issend(const void *buf, + MPI_Aint count, + MPI_Datatype datatype, +@@ -586,10 +530,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Issend(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Send_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Send_init(const void *buf, + int count, + MPI_Datatype datatype, +@@ -610,13 +550,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Send_init(const void *buf, + int r; + if ((r = MPIDI_av_is_local(av))) + mpi_errno = MPIDI_SHM_mpi_send_init(buf, count, datatype, rank, tag, +- comm, context_offset, request); ++ comm, context_offset, av, request); + else + mpi_errno = MPIDI_NM_mpi_send_init(buf, count, datatype, rank, tag, + comm, context_offset, av, request); + if (mpi_errno == MPI_SUCCESS) +- MPIDI_CH4I_REQUEST(*request, is_local) = r; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; ++ MPIDI_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; + #endif + if (mpi_errno != MPI_SUCCESS) { + MPIR_ERR_POP(mpi_errno); +@@ -628,10 +568,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Send_init(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Ssend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Ssend_init(const void *buf, + int count, + MPI_Datatype datatype, +@@ -652,13 +588,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ssend_init(const void *buf, + int r; + if ((r = MPIDI_av_is_local(av))) + mpi_errno = MPIDI_SHM_mpi_ssend_init(buf, count, datatype, rank, tag, +- comm, context_offset, request); ++ comm, context_offset, av, request); + else + mpi_errno = MPIDI_NM_mpi_ssend_init(buf, count, datatype, rank, tag, + comm, context_offset, av, request); + if (mpi_errno == MPI_SUCCESS && *request) { +- MPIDI_CH4I_REQUEST(*request, is_local) = r; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; ++ MPIDI_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; + } + #endif + if (mpi_errno != MPI_SUCCESS) { +@@ -671,10 +607,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ssend_init(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Bsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Bsend_init(const void *buf, + int count, + MPI_Datatype datatype, +@@ -695,13 +627,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Bsend_init(const void *buf, + int r; + if ((r = MPIDI_av_is_local(av))) + mpi_errno = MPIDI_SHM_mpi_bsend_init(buf, count, datatype, rank, tag, +- comm, context_offset, request); ++ comm, context_offset, av, request); + else + mpi_errno = MPIDI_NM_mpi_bsend_init(buf, count, datatype, rank, tag, + comm, context_offset, av, request); + if (mpi_errno == MPI_SUCCESS && *request) { +- MPIDI_CH4I_REQUEST(*request, is_local) = r; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; ++ MPIDI_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; + } + #endif + if (mpi_errno != MPI_SUCCESS) { +@@ -714,10 +646,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Bsend_init(const void *buf, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Rsend_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Rsend_init(const void *buf, + int count, + MPI_Datatype datatype, +@@ -738,13 +666,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Rsend_init(const void *buf, + int r; + if ((r = MPIDI_av_is_local(av))) + mpi_errno = MPIDI_SHM_mpi_rsend_init(buf, count, datatype, rank, tag, +- comm, context_offset, request); ++ comm, context_offset, av, request); + else + mpi_errno = MPIDI_NM_mpi_rsend_init(buf, count, datatype, rank, tag, + comm, context_offset, av, request); + if (mpi_errno == MPI_SUCCESS && *request) { +- MPIDI_CH4I_REQUEST(*request, is_local) = r; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; ++ MPIDI_REQUEST(*request, is_local) = r; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(*request) = NULL; + } + #endif + if (mpi_errno != MPI_SUCCESS) { +@@ -758,10 +686,6 @@ MPL_STATIC_INLINE_PREFIX int MPID_Rsend_init(const void *buf, + + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Cancel_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Cancel_send(MPIR_Request * sreq) + { + int mpi_errno = MPI_SUCCESS; +@@ -770,7 +694,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Cancel_send(MPIR_Request * sreq) + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_cancel_send(sreq); + #else +- if (MPIDI_CH4I_REQUEST(sreq, is_local)) ++ if (MPIDI_REQUEST(sreq, is_local)) + mpi_errno = MPIDI_SHM_mpi_cancel_send(sreq); + else + mpi_errno = MPIDI_NM_mpi_cancel_send(sreq); +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4_spawn.c +@@ -0,0 +1,327 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++ ++/* ++=== BEGIN_MPI_T_CVAR_INFO_BLOCK === ++ ++cvars: ++ - name : MPIR_CVAR_CH4_COMM_CONNECT_TIMEOUT ++ category : CH4 ++ type : int ++ default : 180 ++ class : none ++ verbosity : MPI_T_VERBOSITY_USER_BASIC ++ scope : MPI_T_SCOPE_GROUP_EQ ++ description : >- ++ The default time out period in seconds for a connection attempt to the ++ server communicator where the named port exists but no pending accept. ++ User can change the value for a specified connection through its info ++ argument. ++ ++=== END_MPI_T_CVAR_INFO_BLOCK === ++*/ ++ ++#if defined(USE_PMIX_API) || defined(USE_PMI2_API) ++int MPID_Comm_spawn_multiple(int count, char *commands[], char **argvs[], const int maxprocs[], ++ MPIR_Info * info_ptrs[], int root, MPIR_Comm * comm_ptr, ++ MPIR_Comm ** intercomm, int errcodes[]) ++{ ++ MPIR_Assert(0); ++} ++#else ++static int mpi_to_pmi_keyvals(MPIR_Info * info_ptr, PMI_keyval_t ** kv_ptr, int *nkeys_ptr); ++static void free_pmi_keyvals(PMI_keyval_t ** kv, int size, int *counts); ++ ++static int mpi_to_pmi_keyvals(MPIR_Info * info_ptr, PMI_keyval_t ** kv_ptr, int *nkeys_ptr) ++{ ++ char key[MPI_MAX_INFO_KEY]; ++ PMI_keyval_t *kv = 0; ++ int i, nkeys = 0, vallen, flag, mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_MPI_TO_PMI_KEYVALS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_MPI_TO_PMI_KEYVALS); ++ ++ if (!info_ptr || info_ptr->handle == MPI_INFO_NULL) ++ goto fn_exit; ++ ++ MPIR_Info_get_nkeys_impl(info_ptr, &nkeys); ++ ++ if (nkeys == 0) ++ goto fn_exit; ++ ++ kv = (PMI_keyval_t *) MPL_malloc(nkeys * sizeof(PMI_keyval_t), MPL_MEM_BUFFER); ++ ++ for (i = 0; i < nkeys; i++) { ++ mpi_errno = MPIR_Info_get_nthkey_impl(info_ptr, i, key); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Info_get_valuelen_impl(info_ptr, key, &vallen, &flag); ++ kv[i].key = (const char *) MPL_strdup(key); ++ kv[i].val = (char *) MPL_malloc(vallen + 1, MPL_MEM_BUFFER); ++ MPIR_Info_get_impl(info_ptr, key, vallen + 1, kv[i].val, &flag); ++ } ++ ++ fn_exit: ++ *kv_ptr = kv; ++ *nkeys_ptr = nkeys; ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_MPI_TO_PMI_KEYVALS); ++ return mpi_errno; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static void free_pmi_keyvals(PMI_keyval_t ** kv, int size, int *counts) ++{ ++ int i, j; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_FREE_PMI_KEYVALS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_FREE_PMI_KEYVALS); ++ ++ for (i = 0; i < size; i++) { ++ for (j = 0; j < counts[i]; j++) { ++ MPL_free((char *) kv[i][j].key); ++ MPL_free(kv[i][j].val); ++ } ++ MPL_free(kv[i]); ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_FREE_PMI_KEYVALS); ++} ++ ++int MPID_Comm_spawn_multiple(int count, char *commands[], char **argvs[], const int maxprocs[], ++ MPIR_Info * info_ptrs[], int root, MPIR_Comm * comm_ptr, ++ MPIR_Comm ** intercomm, int errcodes[]) ++{ ++ char port_name[MPI_MAX_PORT_NAME]; ++ int *info_keyval_sizes = 0, i, mpi_errno = MPI_SUCCESS; ++ PMI_keyval_t **info_keyval_vectors = 0, preput_keyval_vector; ++ int *pmi_errcodes = 0, pmi_errno = 0; ++ int total_num_processes, should_accept = 1; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_SPAWN_MULTIPLE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_SPAWN_MULTIPLE); ++ ++ memset(port_name, 0, sizeof(port_name)); ++ ++ if (comm_ptr->rank == root) { ++ total_num_processes = 0; ++ ++ for (i = 0; i < count; i++) ++ total_num_processes += maxprocs[i]; ++ ++ pmi_errcodes = (int *) MPL_malloc(sizeof(int) * total_num_processes, MPL_MEM_BUFFER); ++ MPIR_ERR_CHKANDJUMP(!pmi_errcodes, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ ++ for (i = 0; i < total_num_processes; i++) ++ pmi_errcodes[i] = 0; ++ ++ mpi_errno = MPID_Open_port(NULL, port_name); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ info_keyval_sizes = (int *) MPL_malloc(count * sizeof(int), MPL_MEM_BUFFER); ++ MPIR_ERR_CHKANDJUMP(!info_keyval_sizes, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ info_keyval_vectors = ++ (PMI_keyval_t **) MPL_malloc(count * sizeof(PMI_keyval_t *), MPL_MEM_BUFFER); ++ MPIR_ERR_CHKANDJUMP(!info_keyval_vectors, mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ ++ if (!info_ptrs) ++ for (i = 0; i < count; i++) { ++ info_keyval_vectors[i] = 0; ++ info_keyval_sizes[i] = 0; ++ } else ++ for (i = 0; i < count; i++) { ++ mpi_errno = mpi_to_pmi_keyvals(info_ptrs[i], &info_keyval_vectors[i], ++ &info_keyval_sizes[i]); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ preput_keyval_vector.key = MPIDI_PARENT_PORT_KVSKEY; ++ preput_keyval_vector.val = port_name; ++ pmi_errno = PMI_Spawn_multiple(count, (const char **) ++ commands, ++ (const char ***) argvs, ++ maxprocs, info_keyval_sizes, (const PMI_keyval_t **) ++ info_keyval_vectors, 1, &preput_keyval_vector, pmi_errcodes); ++ ++ if (pmi_errno != PMI_SUCCESS) ++ MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, ++ "**pmi_spawn_multiple", "**pmi_spawn_multiple %d", pmi_errno); ++ ++ if (errcodes != MPI_ERRCODES_IGNORE) { ++ for (i = 0; i < total_num_processes; i++) { ++ errcodes[i] = pmi_errcodes[0]; ++ should_accept = should_accept && errcodes[i]; ++ } ++ ++ should_accept = !should_accept; ++ } ++ } ++ ++ if (errcodes != MPI_ERRCODES_IGNORE) { ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ mpi_errno = MPIR_Bcast(&should_accept, 1, MPI_INT, root, comm_ptr, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = MPIR_Bcast(&pmi_errno, 1, MPI_INT, root, comm_ptr, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = MPIR_Bcast(&total_num_processes, 1, MPI_INT, root, comm_ptr, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = MPIR_Bcast(errcodes, total_num_processes, MPI_INT, root, comm_ptr, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ if (should_accept) { ++ mpi_errno = MPID_Comm_accept(port_name, NULL, root, comm_ptr, intercomm); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ if ((pmi_errno == PMI_SUCCESS) && (errcodes[0] != 0)) { ++ mpi_errno = MPIR_Comm_create(intercomm); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ } ++ ++ if (comm_ptr->rank == root) { ++ mpi_errno = MPID_Close_port(port_name); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ ++ if (info_keyval_vectors) { ++ free_pmi_keyvals(info_keyval_vectors, count, info_keyval_sizes); ++ MPL_free(info_keyval_vectors); ++ } ++ ++ MPL_free(info_keyval_sizes); ++ MPL_free(pmi_errcodes); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_SPAWN_MULTIPLE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++#endif ++ ++int MPID_Comm_connect(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int timeout = MPIR_CVAR_CH4_COMM_CONNECT_TIMEOUT; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_CONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_CONNECT); ++ ++ if (info != NULL) { ++ int info_flag = 0; ++ char info_value[MPI_MAX_INFO_VAL + 1]; ++ MPIR_Info_get_impl(info, "timeout", MPI_MAX_INFO_VAL, info_value, &info_flag); ++ if (info_flag) { ++ timeout = atoi(info_value); ++ } ++ } ++ mpi_errno = MPIDI_NM_mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr); ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_CONNECT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Comm_disconnect(MPIR_Comm * comm_ptr) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_DISCONNECT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_DISCONNECT); ++ mpi_errno = MPIDI_NM_mpi_comm_disconnect(comm_ptr); ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_DISCONNECT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Open_port(MPIR_Info * info_ptr, char *port_name) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_OPEN_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_OPEN_PORT); ++ mpi_errno = MPIDI_NM_mpi_open_port(info_ptr, port_name); ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_OPEN_PORT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Close_port(const char *port_name) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_CLOSE_PORT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CLOSE_PORT); ++ mpi_errno = MPIDI_NM_mpi_close_port(port_name); ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CLOSE_PORT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Comm_accept(const char *port_name, MPIR_Info * info, int root, MPIR_Comm * comm, ++ MPIR_Comm ** newcomm_ptr) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_ACCEPT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_ACCEPT); ++ mpi_errno = MPIDI_NM_mpi_comm_accept(port_name, info, root, comm, newcomm_ptr); ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_ACCEPT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +deleted file mode 100644 +--- a/src/mpid/ch4/src/ch4_spawn.h ++++ /dev/null +@@ -1,378 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef CH4_SPAWN_H_INCLUDED +-#define CH4_SPAWN_H_INCLUDED +- +-#include "ch4_impl.h" +- +-/* +-=== BEGIN_MPI_T_CVAR_INFO_BLOCK === +- +-cvars: +- - name : MPIR_CVAR_CH4_COMM_CONNECT_TIMEOUT +- category : CH4 +- type : int +- default : 180 +- class : none +- verbosity : MPI_T_VERBOSITY_USER_BASIC +- scope : MPI_T_SCOPE_GROUP_EQ +- description : >- +- The default time out period in seconds for a connection attempt to the +- server communicator where the named port exists but no pending accept. +- User can change the value for a specified connection through its info +- argument. +- +-=== END_MPI_T_CVAR_INFO_BLOCK === +-*/ +- +-#if defined(USE_PMIX_API) || defined(USE_PMI2_API) +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_spawn_multiple +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_spawn_multiple(int count, +- char *commands[], +- char **argvs[], +- const int maxprocs[], +- MPIR_Info * info_ptrs[], +- int root, +- MPIR_Comm * comm_ptr, +- MPIR_Comm ** intercomm, int errcodes[]) +-{ +- MPIR_Assert(0); +-} +-#else +-static inline int MPIDI_mpi_to_pmi_keyvals(MPIR_Info * info_ptr, +- PMI_keyval_t ** kv_ptr, int *nkeys_ptr) +-{ +- char key[MPI_MAX_INFO_KEY]; +- PMI_keyval_t *kv = 0; +- int i, nkeys = 0, vallen, flag, mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_MPI_TO_PMI_KEYVALS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_MPI_TO_PMI_KEYVALS); +- +- if (!info_ptr || info_ptr->handle == MPI_INFO_NULL) +- goto fn_exit; +- +- MPIR_Info_get_nkeys_impl(info_ptr, &nkeys); +- +- if (nkeys == 0) +- goto fn_exit; +- +- kv = (PMI_keyval_t *) MPL_malloc(nkeys * sizeof(PMI_keyval_t), MPL_MEM_BUFFER); +- +- for (i = 0; i < nkeys; i++) { +- mpi_errno = MPIR_Info_get_nthkey_impl(info_ptr, i, key); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_Info_get_valuelen_impl(info_ptr, key, &vallen, &flag); +- kv[i].key = (const char *) MPL_strdup(key); +- kv[i].val = (char *) MPL_malloc(vallen + 1, MPL_MEM_BUFFER); +- MPIR_Info_get_impl(info_ptr, key, vallen + 1, kv[i].val, &flag); +- } +- +- fn_exit: +- *kv_ptr = kv; +- *nkeys_ptr = nkeys; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_MPI_TO_PMI_KEYVALS); +- return mpi_errno; +- +- fn_fail: +- goto fn_exit; +-} +- +-static inline void MPIDI_free_pmi_keyvals(PMI_keyval_t ** kv, int size, int *counts) +-{ +- int i, j; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_FREE_PMI_KEYVALS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_FREE_PMI_KEYVALS); +- +- for (i = 0; i < size; i++) { +- for (j = 0; j < counts[i]; j++) { +- if (kv[i][j].key != NULL) +- MPL_free((char *) kv[i][j].key); +- +- if (kv[i][j].val != NULL) +- MPL_free(kv[i][j].val); +- } +- +- if (kv[i] != NULL) +- MPL_free(kv[i]); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_FREE_PMI_KEYVALS); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_spawn_multiple +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_spawn_multiple(int count, +- char *commands[], +- char **argvs[], +- const int maxprocs[], +- MPIR_Info * info_ptrs[], +- int root, +- MPIR_Comm * comm_ptr, +- MPIR_Comm ** intercomm, int errcodes[]) +-{ +- char port_name[MPI_MAX_PORT_NAME]; +- int *info_keyval_sizes = 0, i, mpi_errno = MPI_SUCCESS; +- PMI_keyval_t **info_keyval_vectors = 0, preput_keyval_vector; +- int *pmi_errcodes = 0, pmi_errno = 0; +- int total_num_processes, should_accept = 1; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_SPAWN_MULTIPLE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_SPAWN_MULTIPLE); +- +- memset(port_name, 0, sizeof(port_name)); +- +- if (comm_ptr->rank == root) { +- total_num_processes = 0; +- +- for (i = 0; i < count; i++) +- total_num_processes += maxprocs[i]; +- +- pmi_errcodes = (int *) MPL_malloc(sizeof(int) * total_num_processes, MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP(!pmi_errcodes, mpi_errno, MPI_ERR_OTHER, "**nomem"); +- +- for (i = 0; i < total_num_processes; i++) +- pmi_errcodes[i] = 0; +- +- mpi_errno = MPID_Open_port(NULL, port_name); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- info_keyval_sizes = (int *) MPL_malloc(count * sizeof(int), MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP(!info_keyval_sizes, mpi_errno, MPI_ERR_OTHER, "**nomem"); +- info_keyval_vectors = +- (PMI_keyval_t **) MPL_malloc(count * sizeof(PMI_keyval_t *), MPL_MEM_BUFFER); +- MPIR_ERR_CHKANDJUMP(!info_keyval_vectors, mpi_errno, MPI_ERR_OTHER, "**nomem"); +- +- if (!info_ptrs) +- for (i = 0; i < count; i++) { +- info_keyval_vectors[i] = 0; +- info_keyval_sizes[i] = 0; +- } else +- for (i = 0; i < count; i++) { +- mpi_errno = MPIDI_mpi_to_pmi_keyvals(info_ptrs[i], +- &info_keyval_vectors[i], +- &info_keyval_sizes[i]); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- preput_keyval_vector.key = MPIDI_PARENT_PORT_KVSKEY; +- preput_keyval_vector.val = port_name; +- pmi_errno = PMI_Spawn_multiple(count, (const char **) +- commands, +- (const char ***) argvs, +- maxprocs, info_keyval_sizes, (const PMI_keyval_t **) +- info_keyval_vectors, 1, &preput_keyval_vector, pmi_errcodes); +- +- if (pmi_errno != PMI_SUCCESS) +- MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, +- "**pmi_spawn_multiple", "**pmi_spawn_multiple %d", pmi_errno); +- +- if (errcodes != MPI_ERRCODES_IGNORE) { +- for (i = 0; i < total_num_processes; i++) { +- errcodes[i] = pmi_errcodes[0]; +- should_accept = should_accept && errcodes[i]; +- } +- +- should_accept = !should_accept; +- } +- } +- +- if (errcodes != MPI_ERRCODES_IGNORE) { +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- mpi_errno = MPIR_Bcast(&should_accept, 1, MPI_INT, root, comm_ptr, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIR_Bcast(&pmi_errno, 1, MPI_INT, root, comm_ptr, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIR_Bcast(&total_num_processes, 1, MPI_INT, root, comm_ptr, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIR_Bcast(errcodes, total_num_processes, MPI_INT, root, comm_ptr, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- if (should_accept) { +- mpi_errno = MPID_Comm_accept(port_name, NULL, root, comm_ptr, intercomm); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } else { +- if ((pmi_errno == PMI_SUCCESS) && (errcodes[0] != 0)) { +- mpi_errno = MPIR_Comm_create(intercomm); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- } +- +- if (comm_ptr->rank == root) { +- mpi_errno = MPID_Close_port(port_name); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- +- if (info_keyval_vectors) { +- MPIDI_free_pmi_keyvals(info_keyval_vectors, count, info_keyval_sizes); +- MPL_free(info_keyval_vectors); +- } +- +- if (info_keyval_sizes) +- MPL_free(info_keyval_sizes); +- +- if (pmi_errcodes) +- MPL_free(pmi_errcodes); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_SPAWN_MULTIPLE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_connect(const char *port_name, +- MPIR_Info * info, +- int root, MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- int timeout = MPIR_CVAR_CH4_COMM_CONNECT_TIMEOUT; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_CONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_CONNECT); +- +- if (info != NULL) { +- int info_flag = 0; +- char info_value[MPI_MAX_INFO_VAL + 1]; +- MPIR_Info_get_impl(info, "timeout", MPI_MAX_INFO_VAL, info_value, &info_flag); +- if (info_flag) { +- timeout = atoi(info_value); +- } +- } +- mpi_errno = MPIDI_NM_mpi_comm_connect(port_name, info, root, timeout, comm, newcomm_ptr); +- +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_CONNECT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_disconnect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_disconnect(MPIR_Comm * comm_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_DISCONNECT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_DISCONNECT); +- mpi_errno = MPIDI_NM_mpi_comm_disconnect(comm_ptr); +- +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_DISCONNECT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Open_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Open_port(MPIR_Info * info_ptr, char *port_name) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_OPEN_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_OPEN_PORT); +- mpi_errno = MPIDI_NM_mpi_open_port(info_ptr, port_name); +- +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_OPEN_PORT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Close_port +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Close_port(const char *port_name) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_CLOSE_PORT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_CLOSE_PORT); +- mpi_errno = MPIDI_NM_mpi_close_port(port_name); +- +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_CLOSE_PORT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Comm_accept +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Comm_accept(const char *port_name, +- MPIR_Info * info, +- int root, MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_COMM_ACCEPT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_COMM_ACCEPT); +- mpi_errno = MPIDI_NM_mpi_comm_accept(port_name, info, root, comm, newcomm_ptr); +- +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_COMM_ACCEPT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#endif /* CH4_SPAWN_H_INCLUDED */ +--- a/src/mpid/ch4/src/ch4_startall.h ++++ b/src/mpid/ch4/src/ch4_startall.h +@@ -13,10 +13,6 @@ + + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Startall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Startall(int count, MPIR_Request * requests[]) + { + int mpi_errno = MPI_SUCCESS; +@@ -29,17 +25,17 @@ MPL_STATIC_INLINE_PREFIX int MPID_Startall(int count, MPIR_Request * requests[]) + for (i = 0; i < count; i++) { + MPIR_Request *req = requests[i]; + /* This is sub-optimal, can we do better? */ +- if (MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req)) { ++ if (MPIDI_REQUEST_ANYSOURCE_PARTNER(req)) { + mpi_errno = MPIDI_SHM_mpi_startall(1, &req); + if (mpi_errno == MPI_SUCCESS) { +- mpi_errno = MPIDI_NM_mpi_startall(1, &MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req)); +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req->u.persist.real_request) = +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(req)->u.persist.real_request; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER +- (req)->u.persist.real_request) = ++ mpi_errno = MPIDI_NM_mpi_startall(1, &MPIDI_REQUEST_ANYSOURCE_PARTNER(req)); ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(req->u.persist.real_request) = ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(req)->u.persist.real_request; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(MPIDI_REQUEST_ANYSOURCE_PARTNER ++ (req)->u.persist.real_request) = + req->u.persist.real_request; + } +- } else if (MPIDI_CH4I_REQUEST(req, is_local)) ++ } else if (MPIDI_REQUEST(req, is_local)) + mpi_errno = MPIDI_SHM_mpi_startall(1, &req); + else + mpi_errno = MPIDI_NM_mpi_startall(1, &req); +--- a/src/mpid/ch4/src/ch4_types.h ++++ b/src/mpid/ch4/src/ch4_types.h +@@ -17,18 +17,18 @@ + #include "ch4i_workq_types.h" + + /* Macros and inlines */ +-#define MPIDI_CH4U_MAP_NOT_FOUND ((void*)(-1UL)) ++#define MPIDIU_MAP_NOT_FOUND ((void*)(-1UL)) + + #define MAX_PROGRESS_HOOKS 4 + +-/* VNI attributes */ ++/* VCI attributes */ + enum { +- MPIDI_VNI_TX = 0x1, /* Can send */ +- MPIDI_VNI_RX = 0x2, /* Can receive */ ++ MPIDI_VCI_TX = 0x1, /* Can send */ ++ MPIDI_VCI_RX = 0x2, /* Can receive */ + }; + +-#define MPIDI_CH4I_BUF_POOL_NUM (1024) +-#define MPIDI_CH4I_BUF_POOL_SZ (256) ++#define MPIDIU_BUF_POOL_NUM (1024) ++#define MPIDIU_BUF_POOL_SZ (256) + + typedef int (*progress_func_ptr_t) (int *made_progress); + typedef struct progress_hook_slot { +@@ -52,107 +52,113 @@ typedef struct progress_hook_slot { + #define MPIDI_PROGRESS_ALL (MPIDI_PROGRESS_HOOKS|MPIDI_PROGRESS_NM|MPIDI_PROGRESS_SHM) + + enum { +- MPIDI_CH4U_SEND = 0, /* Eager send */ +- +- MPIDI_CH4U_SEND_LONG_REQ, /* Rendezvous send RTS (request to send) */ +- MPIDI_CH4U_SEND_LONG_ACK, /* Rendezvous send CTS (clear to send) */ +- MPIDI_CH4U_SEND_LONG_LMT, /* Rendezvous send LMT */ +- +- MPIDI_CH4U_SSEND_REQ, +- MPIDI_CH4U_SSEND_ACK, +- +- MPIDI_CH4U_PUT_REQ, +- MPIDI_CH4U_PUT_ACK, +- MPIDI_CH4U_PUT_IOV_REQ, +- MPIDI_CH4U_PUT_DAT_REQ, +- MPIDI_CH4U_PUT_IOV_ACK, +- +- MPIDI_CH4U_GET_REQ, +- MPIDI_CH4U_GET_ACK, +- +- MPIDI_CH4U_ACC_REQ, +- MPIDI_CH4U_ACC_ACK, +- MPIDI_CH4U_ACC_IOV_REQ, +- MPIDI_CH4U_ACC_DAT_REQ, +- MPIDI_CH4U_ACC_IOV_ACK, +- +- MPIDI_CH4U_GET_ACC_REQ, +- MPIDI_CH4U_GET_ACC_ACK, +- MPIDI_CH4U_GET_ACC_IOV_REQ, +- MPIDI_CH4U_GET_ACC_DAT_REQ, +- MPIDI_CH4U_GET_ACC_IOV_ACK, +- +- MPIDI_CH4U_CSWAP_REQ, +- MPIDI_CH4U_CSWAP_ACK, +- MPIDI_CH4U_FETCH_OP, +- +- MPIDI_CH4U_WIN_COMPLETE, +- MPIDI_CH4U_WIN_POST, +- MPIDI_CH4U_WIN_LOCK, +- MPIDI_CH4U_WIN_LOCK_ACK, +- MPIDI_CH4U_WIN_UNLOCK, +- MPIDI_CH4U_WIN_UNLOCK_ACK, +- MPIDI_CH4U_WIN_LOCKALL, +- MPIDI_CH4U_WIN_LOCKALL_ACK, +- MPIDI_CH4U_WIN_UNLOCKALL, +- MPIDI_CH4U_WIN_UNLOCKALL_ACK, +- +- MPIDI_CH4U_COMM_ABORT ++ MPIDIG_SEND = 0, /* Eager send */ ++ ++ MPIDIG_SEND_LONG_REQ, /* Rendezvous send RTS (request to send) */ ++ MPIDIG_SEND_LONG_ACK, /* Rendezvous send CTS (clear to send) */ ++ MPIDIG_SEND_LONG_LMT, /* Rendezvous send LMT */ ++ ++ MPIDIG_SSEND_REQ, ++ MPIDIG_SSEND_ACK, ++ ++ MPIDIG_PUT_REQ, ++ MPIDIG_PUT_ACK, ++ MPIDIG_PUT_IOV_REQ, ++ MPIDIG_PUT_DAT_REQ, ++ MPIDIG_PUT_IOV_ACK, ++ ++ MPIDIG_GET_REQ, ++ MPIDIG_GET_ACK, ++ ++ MPIDIG_ACC_REQ, ++ MPIDIG_ACC_ACK, ++ MPIDIG_ACC_IOV_REQ, ++ MPIDIG_ACC_DAT_REQ, ++ MPIDIG_ACC_IOV_ACK, ++ ++ MPIDIG_GET_ACC_REQ, ++ MPIDIG_GET_ACC_ACK, ++ MPIDIG_GET_ACC_IOV_REQ, ++ MPIDIG_GET_ACC_DAT_REQ, ++ MPIDIG_GET_ACC_IOV_ACK, ++ ++ MPIDIG_CSWAP_REQ, ++ MPIDIG_CSWAP_ACK, ++ MPIDIG_FETCH_OP, ++ ++ MPIDIG_WIN_COMPLETE, ++ MPIDIG_WIN_POST, ++ MPIDIG_WIN_LOCK, ++ MPIDIG_WIN_LOCK_ACK, ++ MPIDIG_WIN_UNLOCK, ++ MPIDIG_WIN_UNLOCK_ACK, ++ MPIDIG_WIN_LOCKALL, ++ MPIDIG_WIN_LOCKALL_ACK, ++ MPIDIG_WIN_UNLOCKALL, ++ MPIDIG_WIN_UNLOCKALL_ACK, ++ ++ MPIDIG_COMM_ABORT + }; + + enum { +- MPIDI_CH4U_EPOTYPE_NONE = 0, /**< No epoch in affect */ +- MPIDI_CH4U_EPOTYPE_LOCK = 1, /**< MPI_Win_lock access epoch */ +- MPIDI_CH4U_EPOTYPE_START = 2, /**< MPI_Win_start access epoch */ +- MPIDI_CH4U_EPOTYPE_POST = 3, /**< MPI_Win_post exposure epoch */ +- MPIDI_CH4U_EPOTYPE_FENCE = 4, /**< MPI_Win_fence access/exposure epoch */ +- MPIDI_CH4U_EPOTYPE_REFENCE = 5, /**< MPI_Win_fence possible access/exposure epoch */ +- MPIDI_CH4U_EPOTYPE_LOCK_ALL = 6 /**< MPI_Win_lock_all access epoch */ ++ MPIDIG_EPOTYPE_NONE = 0, /**< No epoch in affect */ ++ MPIDIG_EPOTYPE_LOCK = 1, /**< MPI_Win_lock access epoch */ ++ MPIDIG_EPOTYPE_START = 2, /**< MPI_Win_start access epoch */ ++ MPIDIG_EPOTYPE_POST = 3, /**< MPI_Win_post exposure epoch */ ++ MPIDIG_EPOTYPE_FENCE = 4, /**< MPI_Win_fence access/exposure epoch */ ++ MPIDIG_EPOTYPE_REFENCE = 5, /**< MPI_Win_fence possible access/exposure epoch */ ++ MPIDIG_EPOTYPE_LOCK_ALL = 6 /**< MPI_Win_lock_all access epoch */ + }; + + /* Enum for calling types between netmod and shm */ + enum { +- MPIDI_CH4R_NETMOD = 0, +- MPIDI_CH4R_SHM = 1 ++ MPIDI_NETMOD = 0, ++ MPIDI_SHM = 1 + }; + +-typedef struct MPIDI_CH4U_hdr_t { ++/* Enum for src buffer kind when computing accumulate op */ ++enum { ++ MPIDIG_ACC_SRCBUF_DEFAULT = 0, ++ MPIDIG_ACC_SRCBUF_PACKED = 1 ++}; ++ ++typedef struct MPIDIG_hdr_t { + int src_rank; + int tag; + MPIR_Context_id_t context_id; +-} MPIDI_CH4U_hdr_t; ++} MPIDIG_hdr_t; + +-typedef struct MPIDI_CH4U_send_long_req_msg_t { +- MPIDI_CH4U_hdr_t hdr; ++typedef struct MPIDIG_send_long_req_mst_t { ++ MPIDIG_hdr_t hdr; + size_t data_sz; /* Message size in bytes */ + uint64_t sreq_ptr; /* Pointer value of the request object at the sender side */ +-} MPIDI_CH4U_send_long_req_msg_t; ++} MPIDIG_send_long_req_mst_t; + +-typedef struct MPIDI_CH4U_send_long_ack_msg_t { ++typedef struct MPIDIG_send_long_ack_msg_t { + uint64_t sreq_ptr; + uint64_t rreq_ptr; +-} MPIDI_CH4U_send_long_ack_msg_t; ++} MPIDIG_send_long_ack_msg_t; + +-typedef struct MPIDI_CH4U_send_long_lmt_msg_t { ++typedef struct MPIDIG_send_long_lmt_msg_t { + uint64_t rreq_ptr; +-} MPIDI_CH4U_send_long_lmt_msg_t; ++} MPIDIG_send_long_lmt_msg_t; + +-typedef struct MPIDI_CH4U_ssend_req_msg_t { +- MPIDI_CH4U_hdr_t hdr; ++typedef struct MPIDIG_ssend_req_msg_t { ++ MPIDIG_hdr_t hdr; + uint64_t sreq_ptr; +-} MPIDI_CH4U_ssend_req_msg_t; ++} MPIDIG_ssend_req_msg_t; + +-typedef struct MPIDI_CH4U_ssend_ack_msg_t { ++typedef struct MPIDIG_ssend_ack_msg_t { + uint64_t sreq_ptr; +-} MPIDI_CH4U_ssend_ack_msg_t; ++} MPIDIG_ssend_ack_msg_t; + +-typedef struct MPIDI_CH4U_win_cntrl_msg_t { ++typedef struct MPIDIG_win_cntrl_msg_t { + uint64_t win_id; + uint32_t origin_rank; + int16_t lock_type; +-} MPIDI_CH4U_win_cntrl_msg_t; ++} MPIDIG_win_cntrl_msg_t; + +-typedef struct MPIDI_CH4U_put_msg_t { ++typedef struct MPIDIG_put_msg_t { + int src_rank; + uint64_t win_id; + uint64_t preq_ptr; +@@ -160,27 +166,27 @@ typedef struct MPIDI_CH4U_put_msg_t { + uint64_t count; + MPI_Datatype datatype; + int n_iov; +-} MPIDI_CH4U_put_msg_t; ++} MPIDIG_put_msg_t; + +-typedef struct MPIDI_CH4U_put_iov_ack_msg_t { ++typedef struct MPIDIG_put_iov_ack_msg_t { + int src_rank; + uint64_t target_preq_ptr; + uint64_t origin_preq_ptr; +-} MPIDI_CH4U_put_iov_ack_msg_t; +-typedef MPIDI_CH4U_put_iov_ack_msg_t MPIDI_CH4U_acc_iov_ack_msg_t; +-typedef MPIDI_CH4U_put_iov_ack_msg_t MPIDI_CH4U_get_acc_iov_ack_msg_t; ++} MPIDIG_put_iov_ack_msg_t; ++typedef MPIDIG_put_iov_ack_msg_t MPIDIG_acc_iov_ack_msg_t; ++typedef MPIDIG_put_iov_ack_msg_t MPIDIG_get_acc_iov_ack_msg_t; + +-typedef struct MPIDI_CH4U_put_dat_msg_t { ++typedef struct MPIDIG_put_dat_msg_t { + uint64_t preq_ptr; +-} MPIDI_CH4U_put_dat_msg_t; +-typedef MPIDI_CH4U_put_dat_msg_t MPIDI_CH4U_acc_dat_msg_t; +-typedef MPIDI_CH4U_put_dat_msg_t MPIDI_CH4U_get_acc_dat_msg_t; ++} MPIDIG_put_dat_msg_t; ++typedef MPIDIG_put_dat_msg_t MPIDIG_acc_dat_msg_t; ++typedef MPIDIG_put_dat_msg_t MPIDIG_get_acc_dat_msg_t; + +-typedef struct MPIDI_CH4U_put_ack_msg_t { ++typedef struct MPIDIG_put_ack_msg_t { + uint64_t preq_ptr; +-} MPIDI_CH4U_put_ack_msg_t; ++} MPIDIG_put_ack_msg_t; + +-typedef struct MPIDI_CH4U_get_req_msg_t { ++typedef struct MPIDIG_get_msg_t { + int src_rank; + uint64_t win_id; + uint64_t greq_ptr; +@@ -188,25 +194,25 @@ typedef struct MPIDI_CH4U_get_req_msg_t { + uint64_t count; + MPI_Datatype datatype; + int n_iov; +-} MPIDI_CH4U_get_req_msg_t; ++} MPIDIG_get_msg_t; + +-typedef struct MPIDI_CH4U_get_ack_msg_t { ++typedef struct MPIDIG_get_ack_msg_t { + uint64_t greq_ptr; +-} MPIDI_CH4U_get_ack_msg_t; ++} MPIDIG_get_ack_msg_t; + +-typedef struct MPIDI_CH4U_cswap_req_msg_t { ++typedef struct MPIDIG_cswap_req_msg_t { + int src_rank; + uint64_t win_id; + uint64_t req_ptr; + MPI_Aint target_disp; + MPI_Datatype datatype; +-} MPIDI_CH4U_cswap_req_msg_t; ++} MPIDIG_cswap_req_msg_t; + +-typedef struct MPIDI_CH4U_cswap_ack_msg_t { ++typedef struct MPIDIG_cswap_ack_msg_t { + uint64_t req_ptr; +-} MPIDI_CH4U_cswap_ack_msg_t; ++} MPIDIG_cswap_ack_msg_t; + +-typedef struct MPIDI_CH4U_acc_req_msg_t { ++typedef struct MPIDIG_acc_req_msg_t { + int src_rank; + uint64_t win_id; + uint64_t req_ptr; +@@ -218,35 +224,35 @@ typedef struct MPIDI_CH4U_acc_req_msg_t { + MPI_Aint target_disp; + uint64_t result_data_sz; + int n_iov; +-} MPIDI_CH4U_acc_req_msg_t; ++} MPIDIG_acc_req_msg_t; + +-typedef struct MPIDI_CH4U_acc_req_msg_t MPIDI_CH4U_get_acc_req_msg_t; ++typedef struct MPIDIG_acc_req_msg_t MPIDIG_get_acc_req_msg_t; + +-typedef struct MPIDI_CH4U_acc_ack_msg_t { ++typedef struct MPIDIG_acc_ack_msg_t { + uint64_t req_ptr; +-} MPIDI_CH4U_acc_ack_msg_t; ++} MPIDIG_acc_ack_msg_t; + +-typedef MPIDI_CH4U_acc_ack_msg_t MPIDI_CH4U_get_acc_ack_msg_t; ++typedef MPIDIG_acc_ack_msg_t MPIDIG_get_acc_ack_msg_t; + +-typedef struct MPIDI_CH4U_comm_req_list_t { ++typedef struct MPIDIG_comm_req_list_t { + MPIR_Comm *comm[2][4]; +- MPIDI_CH4U_rreq_t *uelist[2][4]; +-} MPIDI_CH4U_comm_req_list_t; ++ MPIDIG_rreq_t *uelist[2][4]; ++} MPIDIG_comm_req_list_t; + +-typedef struct MPIU_buf_pool_t { ++typedef struct MPIDIU_buf_pool_t { + int size; + int num; + void *memory_region; +- struct MPIU_buf_pool_t *next; +- struct MPIU_buf_t *head; ++ struct MPIDIU_buf_pool_t *next; ++ struct MPIDIU_buf_t *head; + MPID_Thread_mutex_t lock; +-} MPIU_buf_pool_t; ++} MPIDIU_buf_pool_t; + +-typedef struct MPIU_buf_t { +- struct MPIU_buf_t *next; +- MPIU_buf_pool_t *pool; ++typedef struct MPIDIU_buf_t { ++ struct MPIDIU_buf_t *next; ++ MPIDIU_buf_pool_t *pool; + char data[]; +-} MPIU_buf_t; ++} MPIDIU_buf_t; + + typedef struct { + int mmapped_size; +@@ -254,17 +260,17 @@ typedef struct { + int n_avts; + int next_avtid; + int *free_avtid; +-} MPIDI_CH4_avt_manager; ++} MPIDIU_avt_manager; + + typedef struct { + uint64_t key; + void *value; + UT_hash_handle hh; /* makes this structure hashable */ +-} MPIDI_CH4U_map_entry_t; ++} MPIDIU_map_entry_t; + +-typedef struct MPIDI_CH4U_map_t { +- MPIDI_CH4U_map_entry_t *head; +-} MPIDI_CH4U_map_t; ++typedef struct MPIDIU_map_t { ++ MPIDIU_map_entry_t *head; ++} MPIDIU_map_t; + + typedef struct { + unsigned mt_model; +@@ -277,24 +283,24 @@ typedef struct MPIDI_CH4_Global_t { + int pname_len; + char pname[MPI_MAX_PROCESSOR_NAME]; + int is_initialized; +- MPIDI_CH4_avt_manager avt_mgr; ++ MPIDIU_avt_manager avt_mgr; + int is_ch4u_initialized; + int **node_map, max_node_id; +- MPIDI_CH4U_comm_req_list_t *comm_req_lists; +- OPA_int_t active_progress_hooks; ++ MPIDIG_comm_req_list_t *comm_req_lists; ++ int registered_progress_hooks; + MPIR_Commops MPIR_Comm_fns_store; + progress_hook_slot_t progress_hooks[MAX_PROGRESS_HOOKS]; + MPID_Thread_mutex_t m[3]; +- MPIDI_CH4U_map_t *win_map; ++ MPIDIU_map_t *win_map; + char *jobid; + #ifndef MPIDI_CH4U_USE_PER_COMM_QUEUE +- MPIDI_CH4U_rreq_t *posted_list; +- MPIDI_CH4U_rreq_t *unexp_list; ++ MPIDIG_rreq_t *posted_list; ++ MPIDIG_rreq_t *unexp_list; + #endif +- MPIDI_CH4U_req_ext_t *cmpl_list; ++ MPIDIG_req_ext_t *cmpl_list; + OPA_int_t exp_seq_no; + OPA_int_t nxt_seq_no; +- MPIU_buf_pool_t *buf_pool; ++ MPIDIU_buf_pool_t *buf_pool; + #ifdef HAVE_SIGNAL + void (*prev_sighandler) (int); + volatile int sigusr1_count; +@@ -302,21 +308,21 @@ typedef struct MPIDI_CH4_Global_t { + #endif + OPA_int_t progress_count; + +- MPID_Thread_mutex_t vni_lock; ++ MPID_Thread_mutex_t vci_lock; + #if defined(MPIDI_CH4_USE_WORK_QUEUES) + MPIDI_workq_t workqueue; + #endif + MPIDI_CH4_configurations_t settings; + } MPIDI_CH4_Global_t; +-extern MPIDI_CH4_Global_t MPIDI_CH4_Global; ++extern MPIDI_CH4_Global_t MPIDI_global; + #ifdef MPL_USE_DBG_LOGGING + extern MPL_dbg_class MPIDI_CH4_DBG_GENERAL; + extern MPL_dbg_class MPIDI_CH4_DBG_MAP; + extern MPL_dbg_class MPIDI_CH4_DBG_COMM; + extern MPL_dbg_class MPIDI_CH4_DBG_MEMORY; + #endif +-#define MPIDI_CH4I_THREAD_PROGRESS_MUTEX MPIDI_CH4_Global.m[0] +-#define MPIDI_CH4I_THREAD_PROGRESS_HOOK_MUTEX MPIDI_CH4_Global.m[1] +-#define MPIDI_CH4I_THREAD_UTIL_MUTEX MPIDI_CH4_Global.m[2] ++#define MPIDIU_THREAD_PROGRESS_MUTEX MPIDI_global.m[0] ++#define MPIDIU_THREAD_PROGRESS_HOOK_MUTEX MPIDI_global.m[1] ++#define MPIDIU_THREAD_UTIL_MUTEX MPIDI_global.m[2] + + #endif /* CH4_TYPES_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4_win.c +@@ -0,0 +1,228 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ch4_win.h" ++ ++int MPID_Win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_SET_INFO); ++ ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_set_info(win, info); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_set_info(win, info); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_SET_INFO); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_GET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_GET_INFO); ++ ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_get_info(win, info_p_p); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_get_info(win, info_p_p); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_GET_INFO); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Win_free(MPIR_Win ** win_ptr) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_FREE); ++ ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_free(win_ptr); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_free(win_ptr); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_FREE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_CREATE); ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_CREATE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_ATTACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_ATTACH); ++ ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_attach(win, base, size); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_attach(win, base, size); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_ATTACH); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_ALLOCATE_SHARED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_ALLOCATE_SHARED); ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_allocate_shared(size, disp_unit, ++ info_ptr, comm_ptr, base_ptr, win_ptr); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr, ++ win_ptr); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_ALLOCATE_SHARED); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Win_detach(MPIR_Win * win, const void *base) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_DETACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_DETACH); ++ ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_detach(win, base); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_detach(win, base); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_DETACH); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_ALLOCATE); ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_ALLOCATE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPID_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win) ++{ ++ int mpi_errno; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_CREATE_DYNAMIC); ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_NM_mpi_win_create_dynamic(info, comm, win); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++#else ++ mpi_errno = MPIDIG_mpi_win_create_dynamic(info, comm, win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_CREATE_DYNAMIC); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpid/ch4/src/ch4_win.h ++++ b/src/mpid/ch4/src/ch4_win.h +@@ -14,47 +14,14 @@ + #include "ch4_impl.h" + #include "ch4r_win.h" + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_set_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_SET_INFO); +- +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_set_info(win, info); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_set_info(win, info); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_SET_INFO); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_start(MPIR_Group * group, int assert, MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_START); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_START); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_start(group, assert, win); +@@ -62,31 +29,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_start(MPIR_Group * group, int assert, MPIR + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_start(group, assert, win); ++ mpi_errno = MPIDIG_mpi_win_start(group, assert, win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_START); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_complete(MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_COMPLETE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_COMPLETE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_complete(win); +@@ -94,31 +57,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_complete(MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_complete(win); ++ mpi_errno = MPIDIG_mpi_win_complete(win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_COMPLETE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_post +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_post(MPIR_Group * group, int assert, MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_POST); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_POST); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_post(group, assert, win); +@@ -126,31 +85,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_post(MPIR_Group * group, int assert, MPIR_ + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_post(group, assert, win); ++ mpi_errno = MPIDIG_mpi_win_post(group, assert, win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_POST); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_wait(MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_WAIT); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_WAIT); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_wait(win); +@@ -158,13 +113,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_wait(MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_wait(win); ++ mpi_errno = MPIDIG_mpi_win_wait(win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_WAIT); + return mpi_errno; + fn_fail: +@@ -172,18 +127,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_wait(MPIR_Win * win) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_test(MPIR_Win * win, int *flag) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_TEST); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_TEST); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_test(win, flag); +@@ -191,31 +142,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_test(MPIR_Win * win, int *flag) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_test(win, flag); ++ mpi_errno = MPIDIG_mpi_win_test(win, flag); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_TEST); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_lock(int lock_type, int rank, int assert, MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_LOCK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_LOCK); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_lock(lock_type, rank, assert, win, NULL); +@@ -223,31 +170,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_lock(int lock_type, int rank, int assert, + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_lock(lock_type, rank, assert, win); ++ mpi_errno = MPIDIG_mpi_win_lock(lock_type, rank, assert, win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_LOCK); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_unlock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_unlock(int rank, MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_UNLOCK); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_UNLOCK); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_unlock(rank, win, NULL); +@@ -255,88 +198,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_unlock(int rank, MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_unlock(rank, win); ++ mpi_errno = MPIDIG_mpi_win_unlock(rank, win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_UNLOCK); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_GET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_GET_INFO); +- +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_get_info(win, info_p_p); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_get_info(win, info_p_p); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_GET_INFO); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_free(MPIR_Win ** win_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_FREE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_FREE); +- +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_free(win_ptr); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_free(win_ptr); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_FREE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_fence +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_fence(int assert, MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_FENCE); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_FENCE); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_fence(assert, win); +@@ -344,122 +226,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_fence(int assert, MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_fence(assert, win); ++ mpi_errno = MPIDIG_mpi_win_fence(assert, win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_FENCE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_create(void *base, +- MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_CREATE); +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_create(base, length, disp_unit, info, comm_ptr, win_ptr); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_CREATE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_attach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_ATTACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_ATTACH); +- +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_attach(win, base, size); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_attach(win, base, size); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_ATTACH); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_allocate_shared +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_allocate_shared(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_ALLOCATE_SHARED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_ALLOCATE_SHARED); +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_allocate_shared(size, disp_unit, +- info_ptr, comm_ptr, base_ptr, win_ptr); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_allocate_shared(size, disp_unit, info_ptr, +- comm_ptr, base_ptr, win_ptr); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_ALLOCATE_SHARED); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_flush_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_flush_local(int rank, MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_FLUSH_LOCAL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_FLUSH_LOCAL); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_flush_local(rank, win, NULL); +@@ -467,51 +254,19 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_flush_local(int rank, MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_flush_local(rank, win); ++ mpi_errno = MPIDIG_mpi_win_flush_local(rank, win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_FLUSH_LOCAL); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_detach(MPIR_Win * win, const void *base) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_DETACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_DETACH); +- +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_detach(win, base); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_detach(win, base); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_DETACH); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_shared_query +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_shared_query(MPIR_Win * win, + int rank, MPI_Aint * size, int *disp_unit, + void *baseptr) +@@ -525,7 +280,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_shared_query(MPIR_Win * win, + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); ++ mpi_errno = MPIDIG_mpi_win_shared_query(win, rank, size, disp_unit, baseptr); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif +@@ -537,47 +292,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_shared_query(MPIR_Win * win, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_allocate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_allocate(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info, +- MPIR_Comm * comm, void *baseptr, MPIR_Win ** win) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_ALLOCATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_ALLOCATE); +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_allocate(size, disp_unit, info, comm, baseptr, win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_ALLOCATE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_flush +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_flush(int rank, MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_FLUSH); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_FLUSH); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_flush(rank, win, NULL); +@@ -585,31 +307,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_flush(int rank, MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_flush(rank, win); ++ mpi_errno = MPIDIG_mpi_win_flush(rank, win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_FLUSH); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_flush_local_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_flush_local_all(MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_FLUSH_LOCAL_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_FLUSH_LOCAL_ALL); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_flush_local_all(win); +@@ -617,31 +335,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_flush_local_all(MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_flush_local_all(win); ++ mpi_errno = MPIDIG_mpi_win_flush_local_all(win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_FLUSH_LOCAL_ALL); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_unlock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_unlock_all(MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_UNLOCK_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_UNLOCK_ALL); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_unlock_all(win); +@@ -649,58 +363,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_unlock_all(MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_unlock_all(win); ++ mpi_errno = MPIDIG_mpi_win_unlock_all(win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_UNLOCK_ALL); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_create_dynamic +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPID_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, +- MPIR_Win ** win) +-{ +- int mpi_errno; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_CREATE_DYNAMIC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_CREATE_DYNAMIC); +-#ifdef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_NM_mpi_win_create_dynamic(info, comm, win); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +-#else +- mpi_errno = MPIDI_CH4R_mpi_win_create_dynamic(info, comm, win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_CREATE_DYNAMIC); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_sync +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_sync(MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_SYNC); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_SYNC); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_sync(win); +@@ -708,31 +391,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_sync(MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_sync(win); ++ mpi_errno = MPIDIG_mpi_win_sync(win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_SYNC); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_flush_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_flush_all(MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_FLUSH_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_FLUSH_ALL); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_flush_all(win); +@@ -740,31 +419,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_flush_all(MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_flush_all(win); ++ mpi_errno = MPIDIG_mpi_win_flush_all(win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_FLUSH_ALL); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_Win_lock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX int MPID_Win_lock_all(int assert, MPIR_Win * win) + { + int mpi_errno; + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPID_WIN_LOCK_ALL); + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPID_WIN_LOCK_ALL); + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_workq_vni_progress_unsafe(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDI_workq_vci_progress_unsafe(); + + #ifdef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_NM_mpi_win_lock_all(assert, win); +@@ -772,13 +447,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Win_lock_all(int assert, MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + } + #else +- mpi_errno = MPIDI_CH4R_mpi_win_lock_all(assert, win); ++ mpi_errno = MPIDIG_mpi_win_lock_all(assert, win); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + #endif + + fn_exit: +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPID_WIN_LOCK_ALL); + return mpi_errno; + fn_fail: +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4i_comm.c +@@ -0,0 +1,994 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "mpidimpl.h" ++#include "mpidch4r.h" ++#include "ch4i_comm.h" ++ ++enum MPIDI_src_mapper_models { ++ MPIDI_SRC_MAPPER_IRREGULAR = 0, ++ MPIDI_SRC_MAPPER_DIRECT = 1, ++ MPIDI_SRC_MAPPER_OFFSET = 2, ++ MPIDI_SRC_MAPPER_STRIDE = 3 ++}; ++ ++static int map_size(MPIR_Comm_map_t map); ++static int detect_regular_model(int *lpid, int size, int *offset, int *blocksize, int *stride); ++static int src_comm_to_mlut(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, int size, ++ int total_mapper_size, int mapper_offset); ++static int src_mlut_to_mlut(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, ++ MPIR_Comm_map_t * mapper, int total_mapper_size, int mapper_offset); ++static int src_map_to_lut(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, MPIR_Comm_map_t * mapper, ++ int total_mapper_size, int mapper_offset); ++static void direct_of_src_rmap(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, ++ MPIR_Comm_map_t * mapper); ++static void offset_of_src_rmap(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, ++ MPIR_Comm_map_t * mapper, int offset); ++static void stride_of_src_rmap(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, ++ MPIR_Comm_map_t * mapper, int stride, int blocksize, int offset); ++static int check_convert_mlut_to_lut(MPIDI_rank_map_t * src); ++static int check_convert_lut_to_regular(MPIDI_rank_map_t * src); ++static int set_map(MPIDI_rank_map_t * src_rmap, MPIDI_rank_map_t * dest_rmap, ++ MPIR_Comm_map_t * mapper, int src_comm_size, int total_mapper_size, ++ int mapper_offset); ++ ++static int map_size(MPIR_Comm_map_t map) ++{ ++ int ret = 0; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_MAP_SIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_MAP_SIZE); ++ ++ if (map.type == MPIR_COMM_MAP_TYPE__IRREGULAR) ++ ret = map.src_mapping_size; ++ else if (map.dir == MPIR_COMM_MAP_DIR__L2L || map.dir == MPIR_COMM_MAP_DIR__L2R) ++ ret = map.src_comm->local_size; ++ else ++ ret = map.src_comm->remote_size; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_MAP_SIZE); ++ return ret; ++} ++ ++static int detect_regular_model(int *lpid, int size, int *offset, int *blocksize, int *stride) ++{ ++ int off = 0, bs = 0, st = 0; ++ int i; ++ int ret = MPIDI_SRC_MAPPER_IRREGULAR; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DETECT_REGULAR_MODEL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DETECT_REGULAR_MODEL); ++ ++ off = lpid[0]; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tdetect model: offset %d", off)); ++ ++ for (i = 0; i < size; i++) { ++ if (lpid[i] != i + off) { ++ break; ++ } ++ bs++; ++ } ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\tdetect model: blocksize %d", bs)); ++ if (bs == size) { ++ if (off == 0) { ++ ret = MPIDI_SRC_MAPPER_DIRECT; ++ goto fn_exit; ++ } else { ++ *offset = off; ++ ret = MPIDI_SRC_MAPPER_OFFSET; ++ goto fn_exit; ++ } ++ } ++ ++ /* blocksize less than total size, try if this is stride */ ++ st = lpid[bs] - lpid[0]; ++ if (st < 0 || st <= bs) { ++ ret = MPIDI_SRC_MAPPER_IRREGULAR; ++ goto fn_exit; ++ } ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tdetect model: stride %d", st)); ++ for (i = bs; i < size; i++) { ++ if (lpid[i] != MPIDI_CALC_STRIDE(i, st, bs, off)) { ++ ret = MPIDI_SRC_MAPPER_IRREGULAR; ++ goto fn_exit; ++ } ++ } ++ *offset = off; ++ *blocksize = bs; ++ *stride = st; ++ ret = MPIDI_SRC_MAPPER_STRIDE; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DETECT_REGULAR_MODEL); ++ return ret; ++} ++ ++static int src_comm_to_mlut(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, int size, ++ int total_mapper_size, int mapper_offset) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ MPIDI_rank_map_mlut_t *mlut = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SRC_COMM_TO_MLUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SRC_COMM_TO_MLUT); ++ ++ if (!mapper_offset) { ++ mpi_errno = MPIDIU_alloc_mlut(&mlut, total_mapper_size); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ dest->size = total_mapper_size; ++ dest->mode = MPIDI_RANK_MAP_MLUT; ++ dest->avtid = -1; ++ dest->irreg.mlut.t = mlut; ++ dest->irreg.mlut.gpid = mlut->gpid; ++ } ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, " size %d", size)); ++ switch (src->mode) { ++ case MPIDI_RANK_MAP_DIRECT: ++ case MPIDI_RANK_MAP_DIRECT_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.mlut.gpid[i + mapper_offset].lpid = i; ++ dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; ++ } ++ break; ++ case MPIDI_RANK_MAP_OFFSET: ++ case MPIDI_RANK_MAP_OFFSET_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.mlut.gpid[i + mapper_offset].lpid = i + src->reg.offset; ++ dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; ++ } ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source offset %d", src->reg.offset)); ++ break; ++ case MPIDI_RANK_MAP_STRIDE: ++ case MPIDI_RANK_MAP_STRIDE_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.mlut.gpid[i + mapper_offset].lpid = MPIDI_CALC_STRIDE_SIMPLE(i, ++ src->reg. ++ stride.stride, ++ src->reg. ++ stride.offset); ++ dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; ++ } ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", ++ src->reg.stride.stride, src->reg.stride.blocksize, ++ src->reg.stride.offset)); ++ break; ++ case MPIDI_RANK_MAP_STRIDE_BLOCK: ++ case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.mlut.gpid[i + mapper_offset].lpid = MPIDI_CALC_STRIDE(i, ++ src->reg.stride. ++ stride, ++ src->reg.stride. ++ blocksize, ++ src->reg.stride. ++ offset); ++ dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; ++ } ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", ++ src->reg.stride.stride, src->reg.stride.blocksize, ++ src->reg.stride.offset)); ++ break; ++ case MPIDI_RANK_MAP_LUT: ++ case MPIDI_RANK_MAP_LUT_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.mlut.gpid[i + mapper_offset].lpid = src->irreg.lut.lpid[i]; ++ dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; ++ } ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ for (i = 0; i < size; i++) { ++ dest->irreg.mlut.gpid[i + mapper_offset].lpid = src->irreg.mlut.gpid[i].lpid; ++ dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->irreg.mlut.gpid[i].avtid; ++ } ++ break; ++ case MPIDI_RANK_MAP_NONE: ++ MPIR_Assert(0); ++ break; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SRC_COMM_TO_MLUT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int src_mlut_to_mlut(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, ++ MPIR_Comm_map_t * mapper, int total_mapper_size, int mapper_offset) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ int size = map_size(*mapper); ++ MPIDI_rank_map_mlut_t *mlut = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SRC_MLUT_TO_MLUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SRC_MLUT_TO_MLUT); ++ ++ if (!mapper_offset) { ++ mpi_errno = MPIDIU_alloc_mlut(&mlut, total_mapper_size); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ dest->size = total_mapper_size; ++ } ++ ++ dest->mode = src->mode; ++ dest->irreg.mlut.t = mlut; ++ dest->irreg.mlut.gpid = mlut->gpid; ++ for (i = 0; i < size; i++) { ++ dest->irreg.mlut.gpid[i + mapper_offset].avtid = ++ src->irreg.mlut.gpid[mapper->src_mapping[i]].avtid; ++ dest->irreg.mlut.gpid[i + mapper_offset].lpid = ++ src->irreg.mlut.gpid[mapper->src_mapping[i]].lpid; ++ } ++ fn_exit: ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " src mode %d, dest mode %d", ++ (int) src->mode, (int) dest->mode)); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SRC_MLUT_TO_MLUT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int src_map_to_lut(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, MPIR_Comm_map_t * mapper, ++ int total_mapper_size, int mapper_offset) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ int size = map_size(*mapper); ++ MPIDI_rank_map_lut_t *lut = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SRC_MAP_TO_LUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SRC_MAP_TO_LUT); ++ ++ if (!mapper_offset) { ++ mpi_errno = MPIDIU_alloc_lut(&lut, total_mapper_size); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ dest->size = total_mapper_size; ++ } ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " size %d, mapper->src_mapping_size %d", ++ size, mapper->src_mapping_size)); ++ dest->mode = MPIDI_RANK_MAP_LUT; ++ dest->avtid = src->avtid; ++ dest->irreg.lut.t = lut; ++ dest->irreg.lut.lpid = lut->lpid; ++ switch (src->mode) { ++ case MPIDI_RANK_MAP_DIRECT: ++ case MPIDI_RANK_MAP_DIRECT_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.lut.lpid[i + mapper_offset] = mapper->src_mapping[i]; ++ } ++ break; ++ case MPIDI_RANK_MAP_OFFSET: ++ case MPIDI_RANK_MAP_OFFSET_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.lut.lpid[i + mapper_offset] = mapper->src_mapping[i] + src->reg.offset; ++ } ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source offset %d", src->reg.offset)); ++ break; ++ case MPIDI_RANK_MAP_STRIDE: ++ case MPIDI_RANK_MAP_STRIDE_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.lut.lpid[i + mapper_offset] = ++ MPIDI_CALC_STRIDE_SIMPLE(mapper->src_mapping[i], src->reg.stride.stride, ++ src->reg.stride.offset); ++ } ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", ++ src->reg.stride.stride, src->reg.stride.blocksize, ++ src->reg.stride.offset)); ++ break; ++ case MPIDI_RANK_MAP_STRIDE_BLOCK: ++ case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.lut.lpid[i + mapper_offset] = MPIDI_CALC_STRIDE(mapper->src_mapping[i], ++ src->reg.stride.stride, ++ src->reg. ++ stride.blocksize, ++ src->reg.stride.offset); ++ } ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", ++ src->reg.stride.stride, src->reg.stride.blocksize, ++ src->reg.stride.offset)); ++ break; ++ case MPIDI_RANK_MAP_LUT: ++ case MPIDI_RANK_MAP_LUT_INTRA: ++ for (i = 0; i < size; i++) { ++ dest->irreg.lut.lpid[i + mapper_offset] = ++ src->irreg.lut.lpid[mapper->src_mapping[i]]; ++ } ++ break; ++ default: ++ mpi_errno = 1; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " cannot convert mode %d to lut", (int) src->mode)); ++ goto fn_fail; ++ } ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SRC_MAP_TO_LUT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static void direct_of_src_rmap(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, ++ MPIR_Comm_map_t * mapper) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DIRECT_OF_SRC_RMAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DIRECT_OF_SRC_RMAP); ++ dest->mode = src->mode; ++ if (mapper) { ++ dest->size = map_size(*mapper); ++ } else { ++ dest->size = src->size; ++ } ++ dest->avtid = src->avtid; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); ++ switch (src->mode) { ++ case MPIDI_RANK_MAP_DIRECT: ++ case MPIDI_RANK_MAP_DIRECT_INTRA: ++ break; ++ case MPIDI_RANK_MAP_OFFSET: ++ case MPIDI_RANK_MAP_OFFSET_INTRA: ++ dest->reg.offset = src->reg.offset; ++ break; ++ case MPIDI_RANK_MAP_STRIDE: ++ case MPIDI_RANK_MAP_STRIDE_INTRA: ++ case MPIDI_RANK_MAP_STRIDE_BLOCK: ++ case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: ++ dest->reg.stride.stride = src->reg.stride.stride; ++ dest->reg.stride.blocksize = src->reg.stride.blocksize; ++ dest->reg.stride.offset = src->reg.stride.offset; ++ break; ++ case MPIDI_RANK_MAP_LUT: ++ case MPIDI_RANK_MAP_LUT_INTRA: ++ dest->irreg.lut.t = src->irreg.lut.t; ++ dest->irreg.lut.lpid = src->irreg.lut.lpid; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\tref count %d", ++ MPIR_Object_get_ref(src->irreg.lut.t))); ++ MPIR_Object_add_ref(src->irreg.lut.t); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tadd ref to src lut")); ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ dest->irreg.mlut.t = src->irreg.mlut.t; ++ dest->irreg.mlut.gpid = src->irreg.mlut.gpid; ++ MPIR_Object_add_ref(src->irreg.mlut.t); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tadd ref to src mlut")); ++ break; ++ case MPIDI_RANK_MAP_NONE: ++ MPIR_Assert(0); ++ break; ++ } ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DIRECT_OF_SRC_RMAP); ++} ++ ++static void offset_of_src_rmap(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, ++ MPIR_Comm_map_t * mapper, int offset) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFFSET_OF_SRC_RMAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFFSET_OF_SRC_RMAP); ++ dest->avtid = src->avtid; ++ dest->size = map_size(*mapper); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); ++ switch (src->mode) { ++ case MPIDI_RANK_MAP_DIRECT_INTRA: ++ dest->mode = MPIDI_RANK_MAP_OFFSET_INTRA; ++ dest->reg.offset = offset; ++ break; ++ case MPIDI_RANK_MAP_DIRECT: ++ dest->mode = MPIDI_RANK_MAP_OFFSET; ++ dest->reg.offset = offset; ++ break; ++ case MPIDI_RANK_MAP_OFFSET: ++ dest->mode = MPIDI_RANK_MAP_OFFSET; ++ dest->reg.offset = src->reg.offset + offset; ++ break; ++ case MPIDI_RANK_MAP_OFFSET_INTRA: ++ dest->mode = MPIDI_RANK_MAP_OFFSET_INTRA; ++ dest->reg.offset = src->reg.offset + offset; ++ break; ++ case MPIDI_RANK_MAP_STRIDE: ++ dest->mode = MPIDI_RANK_MAP_STRIDE; ++ dest->reg.stride.stride = src->reg.stride.stride; ++ dest->reg.stride.blocksize = src->reg.stride.blocksize; ++ dest->reg.stride.offset = src->reg.stride.offset + offset * src->reg.stride.stride; ++ break; ++ case MPIDI_RANK_MAP_STRIDE_INTRA: ++ dest->mode = MPIDI_RANK_MAP_STRIDE_INTRA; ++ dest->reg.stride.stride = src->reg.stride.stride; ++ dest->reg.stride.blocksize = src->reg.stride.blocksize; ++ dest->reg.stride.offset = src->reg.stride.offset + offset * src->reg.stride.stride; ++ break; ++ case MPIDI_RANK_MAP_STRIDE_BLOCK: ++ case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: ++ src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); ++ break; ++ case MPIDI_RANK_MAP_LUT: ++ case MPIDI_RANK_MAP_LUT_INTRA: ++ dest->mode = src->mode; ++ dest->irreg.lut.t = src->irreg.lut.t; ++ dest->irreg.lut.lpid = &src->irreg.lut.lpid[offset]; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\tref count %d", ++ MPIR_Object_get_ref(src->irreg.lut.t))); ++ MPIR_Object_add_ref(src->irreg.lut.t); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tadd ref to src lut")); ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ dest->mode = src->mode; ++ dest->irreg.mlut.t = src->irreg.mlut.t; ++ dest->irreg.mlut.gpid = &src->irreg.mlut.gpid[offset]; ++ MPIR_Object_add_ref(src->irreg.mlut.t); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tadd ref to src mlut")); ++ break; ++ case MPIDI_RANK_MAP_NONE: ++ MPIR_Assert(0); ++ break; ++ } ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFFSET_OF_SRC_RMAP); ++} ++ ++static void stride_of_src_rmap(MPIDI_rank_map_t * src, MPIDI_rank_map_t * dest, ++ MPIR_Comm_map_t * mapper, int stride, int blocksize, int offset) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STRIDE_OF_SRC_RMAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STRIDE_OF_SRC_RMAP); ++ dest->avtid = src->avtid; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); ++ switch (src->mode) { ++ case MPIDI_RANK_MAP_DIRECT_INTRA: ++ if (blocksize == 1) { ++ dest->mode = MPIDI_RANK_MAP_STRIDE_INTRA; ++ } else { ++ dest->mode = MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA; ++ } ++ dest->size = map_size(*mapper); ++ dest->reg.stride.stride = stride; ++ dest->reg.stride.blocksize = blocksize; ++ dest->reg.stride.offset = offset; ++ MPIR_Assert(stride > 0); ++ MPIR_Assert(blocksize > 0); ++ break; ++ case MPIDI_RANK_MAP_DIRECT: ++ if (blocksize == 1) { ++ dest->mode = MPIDI_RANK_MAP_STRIDE; ++ } else { ++ dest->mode = MPIDI_RANK_MAP_STRIDE_BLOCK; ++ } ++ dest->size = map_size(*mapper); ++ dest->reg.stride.stride = stride; ++ dest->reg.stride.blocksize = blocksize; ++ dest->reg.stride.offset = offset; ++ MPIR_Assert(stride > 0); ++ MPIR_Assert(blocksize > 0); ++ break; ++ case MPIDI_RANK_MAP_OFFSET: ++ if (blocksize == 1) { ++ dest->mode = MPIDI_RANK_MAP_STRIDE; ++ } else { ++ dest->mode = MPIDI_RANK_MAP_STRIDE_BLOCK; ++ } ++ dest->size = map_size(*mapper); ++ dest->reg.stride.stride = stride; ++ dest->reg.stride.blocksize = blocksize; ++ dest->reg.stride.offset = offset + src->reg.offset; ++ break; ++ case MPIDI_RANK_MAP_OFFSET_INTRA: ++ if (blocksize == 1) { ++ dest->mode = MPIDI_RANK_MAP_STRIDE_INTRA; ++ } else { ++ dest->mode = MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA; ++ } ++ dest->size = map_size(*mapper); ++ dest->reg.stride.stride = stride; ++ dest->reg.stride.blocksize = blocksize; ++ dest->reg.stride.offset = offset + src->reg.offset; ++ break; ++ case MPIDI_RANK_MAP_STRIDE: ++ if (blocksize == 1) { ++ dest->mode = MPIDI_RANK_MAP_STRIDE; ++ dest->reg.stride.stride = src->reg.stride.stride * stride; ++ dest->reg.stride.blocksize = blocksize; ++ dest->reg.stride.offset = src->reg.stride.stride * offset + src->reg.stride.offset; ++ } else { ++ src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); ++ } ++ break; ++ case MPIDI_RANK_MAP_STRIDE_INTRA: ++ if (blocksize == 1) { ++ dest->mode = MPIDI_RANK_MAP_STRIDE_INTRA; ++ dest->reg.stride.stride = src->reg.stride.stride * stride; ++ dest->reg.stride.blocksize = blocksize; ++ dest->reg.stride.offset = src->reg.stride.stride * offset + src->reg.stride.offset; ++ } else { ++ src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); ++ } ++ break; ++ case MPIDI_RANK_MAP_STRIDE_BLOCK: ++ case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: ++ src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); ++ break; ++ case MPIDI_RANK_MAP_LUT: ++ case MPIDI_RANK_MAP_LUT_INTRA: ++ src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); ++ break; ++ case MPIDI_RANK_MAP_MLUT: ++ src_mlut_to_mlut(src, dest, mapper, mapper->src_mapping_size, 0); ++ break; ++ case MPIDI_RANK_MAP_NONE: ++ MPIR_Assert(0); ++ break; ++ } ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STRIDE_OF_SRC_RMAP); ++} ++ ++static int check_convert_mlut_to_lut(MPIDI_rank_map_t * src) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ int flag = 1; ++ int avtid; ++ MPIDI_rank_map_lut_t *lut = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHECK_CONVERT_MLUT_TO_LUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHECK_CONVERT_MLUT_TO_LUT); ++ ++ if (src->mode != MPIDI_RANK_MAP_MLUT) { ++ goto fn_exit; ++ } ++ ++ /* check if all mlut item has the same avtid */ ++ avtid = src->irreg.mlut.gpid[0].avtid; ++ for (i = 1; i < src->size; i++) { ++ if (src->irreg.mlut.gpid[i].avtid != avtid) { ++ flag = 0; ++ break; ++ } ++ } ++ if (!flag) { /* multiple avtid */ ++ goto fn_exit; ++ } ++ ++ src->avtid = avtid; ++ if (avtid == 0) { ++ src->mode = MPIDI_RANK_MAP_LUT_INTRA; ++ } else { ++ src->mode = MPIDI_RANK_MAP_LUT; ++ } ++ mpi_errno = MPIDIU_alloc_lut(&lut, src->size); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ for (i = 0; i < src->size; i++) { ++ lut->lpid[i] = src->irreg.mlut.gpid[i].lpid; ++ } ++ MPIDIU_release_mlut(src->irreg.mlut.t); ++ src->irreg.lut.t = lut; ++ src->irreg.lut.lpid = src->irreg.lut.t->lpid; ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, " avtid %d", src->avtid)); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHECK_CONVERT_MLUT_TO_LUT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int check_convert_lut_to_regular(MPIDI_rank_map_t * src) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int mode_detected, offset, blocksize, stride; ++ MPIDI_rank_map_lut_t *lut = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHECK_CONVERT_LUT_TO_REGULAR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHECK_CONVERT_LUT_TO_REGULAR); ++ ++ if (src->mode != MPIDI_RANK_MAP_LUT && src->mode != MPIDI_RANK_MAP_LUT_INTRA) { ++ goto fn_exit; ++ } ++ ++ lut = src->irreg.lut.t; ++ mode_detected = detect_regular_model(src->irreg.lut.lpid, src->size, &offset, &blocksize, ++ &stride); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " detected mode: %d", mode_detected)); ++ ++ ++ switch (mode_detected) { ++ case MPIDI_SRC_MAPPER_DIRECT: ++ src->mode = MPIDI_RANK_MAP_DIRECT; ++ if (src->avtid == 0) { ++ src->mode = MPIDI_RANK_MAP_DIRECT_INTRA; ++ } ++ src->irreg.lut.t = NULL; ++ src->irreg.lut.lpid = NULL; ++ MPIDIU_release_lut(lut); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\tlut to mode %d", (int) src->mode)); ++ break; ++ case MPIDI_SRC_MAPPER_OFFSET: ++ src->mode = MPIDI_RANK_MAP_OFFSET; ++ if (src->avtid == 0) { ++ src->mode = MPIDI_RANK_MAP_OFFSET_INTRA; ++ } ++ src->reg.offset = offset; ++ src->irreg.lut.t = NULL; ++ src->irreg.lut.lpid = NULL; ++ MPIDIU_release_lut(lut); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " lut to mode %d", (int) src->mode)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\toffset: %d", src->reg.offset)); ++ break; ++ case MPIDI_SRC_MAPPER_STRIDE: ++ if (blocksize == 1) { ++ src->mode = MPIDI_RANK_MAP_STRIDE; ++ if (src->avtid == 0) { ++ src->mode = MPIDI_RANK_MAP_STRIDE_INTRA; ++ } ++ } else { ++ src->mode = MPIDI_RANK_MAP_STRIDE_BLOCK; ++ if (src->avtid == 0) { ++ src->mode = MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA; ++ } ++ } ++ src->reg.stride.stride = stride; ++ src->reg.stride.blocksize = blocksize; ++ src->reg.stride.offset = offset; ++ src->irreg.lut.t = NULL; ++ src->irreg.lut.lpid = NULL; ++ MPIDIU_release_lut(lut); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " lut to mode %d", (int) src->mode)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\toffset: %d", src->reg.stride.offset)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\tblocksize: %d", src->reg.stride.blocksize)); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\tstride: %d", src->reg.stride.stride)); ++ break; ++ } ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHECK_CONVERT_LUT_TO_REGULAR); ++ return mpi_errno; ++} ++ ++static int set_map(MPIDI_rank_map_t * src_rmap, MPIDI_rank_map_t * dest_rmap, ++ MPIR_Comm_map_t * mapper, int src_comm_size, int total_mapper_size, ++ int mapper_offset) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SET_MAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SET_MAP); ++ ++ /* Simplest case: MAP_DUP, exact duplication of src_comm */ ++ if (mapper->type == MPIR_COMM_MAP_TYPE__DUP && src_comm_size == total_mapper_size) { ++ direct_of_src_rmap(src_rmap, dest_rmap, mapper); ++ goto fn_exit; ++ } ++ /* single src_comm, newcomm is smaller than src_comm, only one mapper */ ++ else if (mapper->type == MPIR_COMM_MAP_TYPE__IRREGULAR && ++ mapper->src_mapping_size == total_mapper_size) { ++ /* check if new comm has the same mapping as src_comm */ ++ /* detect src_mapping_offset for direct_to_direct and offset_to_offset */ ++ int mode_detected, offset = 0, blocksize, stride; ++ mode_detected = detect_regular_model(mapper->src_mapping, mapper->src_mapping_size, &offset, ++ &blocksize, &stride); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\tdetected mode: %d", mode_detected)); ++ ++ switch (mode_detected) { ++ case MPIDI_SRC_MAPPER_DIRECT: ++ direct_of_src_rmap(src_rmap, dest_rmap, mapper); ++ break; ++ case MPIDI_SRC_MAPPER_OFFSET: ++ offset_of_src_rmap(src_rmap, dest_rmap, mapper, offset); ++ break; ++ case MPIDI_SRC_MAPPER_STRIDE: ++ stride_of_src_rmap(src_rmap, dest_rmap, mapper, stride, blocksize, offset); ++ break; ++ default: ++ if (src_rmap->mode == MPIDI_RANK_MAP_MLUT) { ++ src_mlut_to_mlut(src_rmap, dest_rmap, mapper, total_mapper_size, mapper_offset); ++ } else { ++ src_map_to_lut(src_rmap, dest_rmap, mapper, mapper->src_mapping_size, ++ mapper_offset); ++ } ++ } ++ goto fn_exit; ++ } ++ ++ /* more complex case: multiple mappers ++ * We always alloc lut (or mlut is src_rmap is mlut). We will check if a ++ * lut mapping can be converted to something simpler after all the mapper ++ * are processed ++ */ ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, " multiple mapper")); ++ if (mapper->type == MPIR_COMM_MAP_TYPE__DUP) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, " check map_size %d, src_comm_size %d", ++ map_size(*mapper), src_comm_size)); ++ src_comm_to_mlut(src_rmap, dest_rmap, src_comm_size, total_mapper_size, mapper_offset); ++ } else { /* mapper->type == MPIR_COMM_MAP_TYPE__IRREGULAR */ ++ src_mlut_to_mlut(src_rmap, dest_rmap, mapper, total_mapper_size, mapper_offset); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SET_MAP); ++ return mpi_errno; ++} ++ ++int MPIDI_comm_create_rank_map(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Comm_map_t *mapper; ++ MPIR_Comm *src_comm; ++ int total_mapper_size, mapper_offset; ++ ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMM_CREATE_RANK_MAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMM_CREATE_RANK_MAP); ++ ++ /* do some sanity checks */ ++ LL_FOREACH(comm->mapper_head, mapper) { ++ if (mapper->src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ MPIR_Assert(mapper->dir == MPIR_COMM_MAP_DIR__L2L || ++ mapper->dir == MPIR_COMM_MAP_DIR__L2R); ++ } ++ ++ if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ MPIR_Assert(mapper->dir == MPIR_COMM_MAP_DIR__L2L || ++ mapper->dir == MPIR_COMM_MAP_DIR__R2L); ++ } ++ } ++ ++ /* First, handle all the mappers that contribute to the local part ++ * of the comm */ ++ total_mapper_size = 0; ++ LL_FOREACH(comm->mapper_head, mapper) { ++ if (mapper->dir == MPIR_COMM_MAP_DIR__L2R || mapper->dir == MPIR_COMM_MAP_DIR__R2R) ++ continue; ++ ++ total_mapper_size += map_size(*mapper); ++ } ++ mapper_offset = 0; ++ LL_FOREACH(comm->mapper_head, mapper) { ++ src_comm = mapper->src_comm; ++ ++ if (mapper->dir == MPIR_COMM_MAP_DIR__L2R || mapper->dir == MPIR_COMM_MAP_DIR__R2R) ++ continue; ++ ++ if (mapper->dir == MPIR_COMM_MAP_DIR__L2L) { ++ if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM && ++ comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " intra->intra, L2L, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->local_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, map), mapper, ++ src_comm->local_size, total_mapper_size, mapper_offset); ++ } else if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM && ++ comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " intra->inter, L2L, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->local_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, local_map), mapper, ++ src_comm->local_size, total_mapper_size, mapper_offset); ++ } else if (src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM && ++ comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " inter->intra, L2L, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->local_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, local_map), &MPIDI_COMM(comm, map), mapper, ++ src_comm->local_size, total_mapper_size, mapper_offset); ++ } else { /* src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM && comm->comm_kind == MPIR_COMM_KIND__INTERCOMM */ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " inter->inter, L2L, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->local_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, local_map), &MPIDI_COMM(comm, local_map), ++ mapper, src_comm->local_size, total_mapper_size, mapper_offset); ++ } ++ } else { /* mapper->dir == MPIR_COMM_MAP_DIR__R2L */ ++ MPIR_Assert(src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM); ++ ++ if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " ->intra, R2L, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->remote_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, map), mapper, ++ src_comm->remote_size, total_mapper_size, mapper_offset); ++ } else { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " ->inter, R2L, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->remote_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, local_map), mapper, ++ src_comm->remote_size, total_mapper_size, mapper_offset); ++ } ++ } ++ ++ mapper_offset += map_size(*mapper); ++ } ++ ++ /* Next, handle all the mappers that contribute to the remote part ++ * of the comm (only valid for intercomms) ++ */ ++ total_mapper_size = 0; ++ LL_FOREACH(comm->mapper_head, mapper) { ++ if (mapper->dir == MPIR_COMM_MAP_DIR__L2L || mapper->dir == MPIR_COMM_MAP_DIR__R2L) ++ continue; ++ ++ total_mapper_size += map_size(*mapper); ++ } ++ mapper_offset = 0; ++ LL_FOREACH(comm->mapper_head, mapper) { ++ src_comm = mapper->src_comm; ++ ++ if (mapper->dir == MPIR_COMM_MAP_DIR__L2L || mapper->dir == MPIR_COMM_MAP_DIR__R2L) ++ continue; ++ ++ MPIR_Assert(comm->comm_kind == MPIR_COMM_KIND__INTERCOMM); ++ ++ if (mapper->dir == MPIR_COMM_MAP_DIR__L2R) { ++ if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " intra->, L2R, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->local_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, map), mapper, ++ src_comm->local_size, total_mapper_size, mapper_offset); ++ } else { /* src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM */ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " inter->, L2R, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->local_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, local_map), &MPIDI_COMM(comm, map), mapper, ++ src_comm->local_size, total_mapper_size, mapper_offset); ++ } ++ } else { /* mapper->dir == MPIR_COMM_MAP_DIR__R2R */ ++ MPIR_Assert(src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, ++ " inter->, R2R, size=%d, total_mapper_size=%d, mapper_offset=%d", ++ src_comm->remote_size, total_mapper_size, mapper_offset)); ++ set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, map), mapper, ++ src_comm->remote_size, total_mapper_size, mapper_offset); ++ } ++ ++ mapper_offset += map_size(*mapper); ++ } ++ ++ /* check before finishing ++ * 1. if mlut can be converted to lut: all avtids are the same ++ * 2. if lut can be converted to regular modes: direct, offset, and more ++ */ ++ check_convert_mlut_to_lut(&MPIDI_COMM(comm, map)); ++ check_convert_lut_to_regular(&MPIDI_COMM(comm, map)); ++ if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) { ++ check_convert_mlut_to_lut(&MPIDI_COMM(comm, local_map)); ++ check_convert_lut_to_regular(&MPIDI_COMM(comm, local_map)); ++ } ++ ++ if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) { ++ /* setup the lut for the local_comm in the intercomm */ ++ if (comm->local_comm) { ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, ++ (MPL_DBG_FDEST, "\t create local_comm using src_comm")); ++ direct_of_src_rmap(&MPIDI_COMM(comm, local_map), ++ &MPIDI_COMM(comm->local_comm, map), NULL); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, ++ (MPL_DBG_FDEST, "create local_comm using src_comm")); ++ } ++ } ++ ++ if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { ++ MPIDI_COMM(comm, local_map).mode = MPIDI_RANK_MAP_NONE; ++ } ++#ifdef MPL_USE_DBG_LOGGING ++ int rank_; ++ int avtid_, lpid_ = -1; ++ if (comm->remote_size < 16) { ++ for (rank_ = 0; rank_ < comm->remote_size; ++rank_) { ++ MPIDIU_comm_rank_to_pid(comm, rank_, &lpid_, &avtid_); ++ MPIDIU_comm_rank_to_av(comm, rank_); ++ } ++ } ++ if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM && comm->local_size < 16) { ++ for (rank_ = 0; rank_ < comm->local_size; ++rank_) { ++ MPIDIU_comm_rank_to_pid_local(comm, rank_, &lpid_, &avtid_); ++ } ++ } ++#endif ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMM_CREATE_RANK_MAP); ++ return mpi_errno; ++} ++ ++int MPIDI_check_disjoint_lupids(int lupids1[], int n1, int lupids2[], int n2) ++{ ++ int i, mask_size, idx, bit, maxlupid = -1; ++ int mpi_errno = MPI_SUCCESS; ++ uint32_t lupidmaskPrealloc[128]; ++ uint32_t *lupidmask; ++ MPIR_CHKLMEM_DECL(1); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHECK_DISJOINT_LUPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHECK_DISJOINT_LUPIDS); ++ ++ /* Find the max lupid */ ++ for (i = 0; i < n1; i++) { ++ if (lupids1[i] > maxlupid) ++ maxlupid = lupids1[i]; ++ } ++ for (i = 0; i < n2; i++) { ++ if (lupids2[i] > maxlupid) ++ maxlupid = lupids2[i]; ++ } ++ ++ mask_size = (maxlupid / 32) + 1; ++ ++ if (mask_size > 128) { ++ MPIR_CHKLMEM_MALLOC(lupidmask, uint32_t *, mask_size * sizeof(uint32_t), ++ mpi_errno, "lupidmask", MPL_MEM_COMM); ++ } else { ++ lupidmask = lupidmaskPrealloc; ++ } ++ ++ /* zero the bitvector array */ ++ memset(lupidmask, 0x00, mask_size * sizeof(*lupidmask)); ++ ++ /* Set the bits for the first array */ ++ for (i = 0; i < n1; i++) { ++ idx = lupids1[i] / 32; ++ bit = lupids1[i] % 32; ++ lupidmask[idx] = lupidmask[idx] | (1 << bit); ++ MPIR_Assert(idx < mask_size); ++ } ++ ++ /* Look for any duplicates in the second array */ ++ for (i = 0; i < n2; i++) { ++ idx = lupids2[i] / 32; ++ bit = lupids2[i] % 32; ++ if (lupidmask[idx] & (1 << bit)) { ++ MPIR_ERR_SET1(mpi_errno, MPI_ERR_COMM, ++ "**dupprocesses", "**dupprocesses %d", lupids2[i]); ++ goto fn_fail; ++ } ++ /* Add a check on duplicates *within* group 2 */ ++ lupidmask[idx] = lupidmask[idx] | (1 << bit); ++ MPIR_Assert(idx < mask_size); ++ } ++ ++ /* Also fall through for normal return */ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHECK_DISJOINT_LUPIDS); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpid/ch4/src/ch4i_comm.h ++++ b/src/mpid/ch4/src/ch4i_comm.h +@@ -7,1129 +7,8 @@ + #define CH4I_COMM_H_INCLUDED + + #include "ch4_types.h" +-#include "ch4r_comm.h" +-#include "utlist.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_map_size +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_map_size(MPIR_Comm_map_t map) +-{ +- int ret = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_MAP_SIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_MAP_SIZE); +- +- if (map.type == MPIR_COMM_MAP_TYPE__IRREGULAR) +- ret = map.src_mapping_size; +- else if (map.dir == MPIR_COMM_MAP_DIR__L2L || map.dir == MPIR_COMM_MAP_DIR__L2R) +- ret = map.src_comm->local_size; +- else +- ret = map.src_comm->remote_size; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_MAP_SIZE); +- return ret; +-} +- +-/* +- * This enum is used exclusively in this header file +- */ +-enum MPIDI_src_mapper_models { +- MPIDI_SRC_MAPPER_IRREGULAR = 0, +- MPIDI_SRC_MAPPER_DIRECT = 1, +- MPIDI_SRC_MAPPER_OFFSET = 2, +- MPIDI_SRC_MAPPER_STRIDE = 3 +-}; +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_detect_regular_model +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_detect_regular_model(int *lpid, int size, +- int *offset, int *blocksize, int *stride) +-{ +- int off = 0, bs = 0, st = 0; +- int i; +- int ret = MPIDI_SRC_MAPPER_IRREGULAR; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DETECT_REGULAR_MODEL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DETECT_REGULAR_MODEL); +- +- off = lpid[0]; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tdetect model: offset %d", off)); +- +- for (i = 0; i < size; i++) { +- if (lpid[i] != i + off) { +- break; +- } +- bs++; +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\tdetect model: blocksize %d", bs)); +- if (bs == size) { +- if (off == 0) { +- ret = MPIDI_SRC_MAPPER_DIRECT; +- goto fn_exit; +- } else { +- *offset = off; +- ret = MPIDI_SRC_MAPPER_OFFSET; +- goto fn_exit; +- } +- } +- +- /* blocksize less than total size, try if this is stride */ +- st = lpid[bs] - lpid[0]; +- if (st < 0 || st <= bs) { +- ret = MPIDI_SRC_MAPPER_IRREGULAR; +- goto fn_exit; +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tdetect model: stride %d", st)); +- for (i = bs; i < size; i++) { +- if (lpid[i] != MPIDI_CALC_STRIDE(i, st, bs, off)) { +- ret = MPIDI_SRC_MAPPER_IRREGULAR; +- goto fn_exit; +- } +- } +- *offset = off; +- *blocksize = bs; +- *stride = st; +- ret = MPIDI_SRC_MAPPER_STRIDE; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DETECT_REGULAR_MODEL); +- return ret; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_src_comm_to_lut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_src_comm_to_lut(MPIDI_rank_map_t * src, +- MPIDI_rank_map_t * dest, +- int size, int total_mapper_size, int mapper_offset) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- MPIDI_rank_map_lut_t *lut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SRC_COMM_TO_LUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SRC_COMM_TO_LUT); +- +- if (!mapper_offset) { +- mpi_errno = MPIDIU_alloc_lut(&lut, total_mapper_size); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- dest->size = total_mapper_size; +- dest->mode = MPIDI_RANK_MAP_LUT; +- dest->avtid = src->avtid; +- dest->irreg.lut.t = lut; +- dest->irreg.lut.lpid = lut->lpid; +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, " size %d", size)); +- switch (src->mode) { +- case MPIDI_RANK_MAP_DIRECT: +- case MPIDI_RANK_MAP_DIRECT_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = i; +- } +- break; +- case MPIDI_RANK_MAP_OFFSET: +- case MPIDI_RANK_MAP_OFFSET_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = i + src->reg.offset; +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source offset %d", src->reg.offset)); +- break; +- case MPIDI_RANK_MAP_STRIDE: +- case MPIDI_RANK_MAP_STRIDE_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = MPIDI_CALC_STRIDE_SIMPLE(i, +- src->reg.stride. +- stride, +- src->reg.stride. +- offset); +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", +- src->reg.stride.stride, src->reg.stride.blocksize, +- src->reg.stride.offset)); +- break; +- case MPIDI_RANK_MAP_STRIDE_BLOCK: +- case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = MPIDI_CALC_STRIDE(i, +- src->reg.stride.stride, +- src->reg. +- stride.blocksize, +- src->reg.stride.offset); +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", +- src->reg.stride.stride, src->reg.stride.blocksize, +- src->reg.stride.offset)); +- break; +- case MPIDI_RANK_MAP_LUT: +- case MPIDI_RANK_MAP_LUT_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = src->irreg.lut.lpid[i]; +- } +- break; +- case MPIDI_RANK_MAP_MLUT: +- case MPIDI_RANK_MAP_NONE: +- MPIR_Assert(0); +- break; +- } +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SRC_COMM_TO_LUT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_src_comm_to_mlut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_src_comm_to_mlut(MPIDI_rank_map_t * src, +- MPIDI_rank_map_t * dest, +- int size, int total_mapper_size, int mapper_offset) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- MPIDI_rank_map_mlut_t *mlut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SRC_COMM_TO_MLUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SRC_COMM_TO_MLUT); +- +- if (!mapper_offset) { +- mpi_errno = MPIDIU_alloc_mlut(&mlut, total_mapper_size); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- dest->size = total_mapper_size; +- dest->mode = MPIDI_RANK_MAP_MLUT; +- dest->avtid = -1; +- dest->irreg.mlut.t = mlut; +- dest->irreg.mlut.gpid = mlut->gpid; +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, " size %d", size)); +- switch (src->mode) { +- case MPIDI_RANK_MAP_DIRECT: +- case MPIDI_RANK_MAP_DIRECT_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.mlut.gpid[i + mapper_offset].lpid = i; +- dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; +- } +- break; +- case MPIDI_RANK_MAP_OFFSET: +- case MPIDI_RANK_MAP_OFFSET_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.mlut.gpid[i + mapper_offset].lpid = i + src->reg.offset; +- dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source offset %d", src->reg.offset)); +- break; +- case MPIDI_RANK_MAP_STRIDE: +- case MPIDI_RANK_MAP_STRIDE_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.mlut.gpid[i + mapper_offset].lpid = MPIDI_CALC_STRIDE_SIMPLE(i, +- src->reg. +- stride.stride, +- src->reg. +- stride.offset); +- dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", +- src->reg.stride.stride, src->reg.stride.blocksize, +- src->reg.stride.offset)); +- break; +- case MPIDI_RANK_MAP_STRIDE_BLOCK: +- case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.mlut.gpid[i + mapper_offset].lpid = MPIDI_CALC_STRIDE(i, +- src->reg.stride. +- stride, +- src->reg.stride. +- blocksize, +- src->reg.stride. +- offset); +- dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", +- src->reg.stride.stride, src->reg.stride.blocksize, +- src->reg.stride.offset)); +- break; +- case MPIDI_RANK_MAP_LUT: +- case MPIDI_RANK_MAP_LUT_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.mlut.gpid[i + mapper_offset].lpid = src->irreg.lut.lpid[i]; +- dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->avtid; +- } +- break; +- case MPIDI_RANK_MAP_MLUT: +- for (i = 0; i < size; i++) { +- dest->irreg.mlut.gpid[i + mapper_offset].lpid = src->irreg.mlut.gpid[i].lpid; +- dest->irreg.mlut.gpid[i + mapper_offset].avtid = src->irreg.mlut.gpid[i].avtid; +- } +- break; +- case MPIDI_RANK_MAP_NONE: +- MPIR_Assert(0); +- break; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SRC_COMM_TO_MLUT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_src_mlut_to_mlut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_src_mlut_to_mlut(MPIDI_rank_map_t * src, +- MPIDI_rank_map_t * dest, +- MPIR_Comm_map_t * mapper, +- int total_mapper_size, int mapper_offset) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- int size = MPIDI_map_size(*mapper); +- MPIDI_rank_map_mlut_t *mlut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SRC_MLUT_TO_MLUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SRC_MLUT_TO_MLUT); +- +- if (!mapper_offset) { +- mpi_errno = MPIDIU_alloc_mlut(&mlut, total_mapper_size); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- dest->size = total_mapper_size; +- } +- +- dest->mode = src->mode; +- dest->irreg.mlut.t = mlut; +- dest->irreg.mlut.gpid = mlut->gpid; +- for (i = 0; i < size; i++) { +- dest->irreg.mlut.gpid[i + mapper_offset].avtid = +- src->irreg.mlut.gpid[mapper->src_mapping[i]].avtid; +- dest->irreg.mlut.gpid[i + mapper_offset].lpid = +- src->irreg.mlut.gpid[mapper->src_mapping[i]].lpid; +- } +- fn_exit: +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " src mode %d, dest mode %d", +- (int) src->mode, (int) dest->mode)); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SRC_MLUT_TO_MLUT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_src_map_to_lut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_src_map_to_lut(MPIDI_rank_map_t * src, +- MPIDI_rank_map_t * dest, +- MPIR_Comm_map_t * mapper, +- int total_mapper_size, int mapper_offset) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- int size = MPIDI_map_size(*mapper); +- MPIDI_rank_map_lut_t *lut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SRC_MAP_TO_LUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SRC_MAP_TO_LUT); +- +- if (!mapper_offset) { +- mpi_errno = MPIDIU_alloc_lut(&lut, total_mapper_size); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- dest->size = total_mapper_size; +- } +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " size %d, mapper->src_mapping_size %d", +- size, mapper->src_mapping_size)); +- dest->mode = MPIDI_RANK_MAP_LUT; +- dest->avtid = src->avtid; +- dest->irreg.lut.t = lut; +- dest->irreg.lut.lpid = lut->lpid; +- switch (src->mode) { +- case MPIDI_RANK_MAP_DIRECT: +- case MPIDI_RANK_MAP_DIRECT_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = mapper->src_mapping[i]; +- } +- break; +- case MPIDI_RANK_MAP_OFFSET: +- case MPIDI_RANK_MAP_OFFSET_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = mapper->src_mapping[i] + src->reg.offset; +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source offset %d", src->reg.offset)); +- break; +- case MPIDI_RANK_MAP_STRIDE: +- case MPIDI_RANK_MAP_STRIDE_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = +- MPIDI_CALC_STRIDE_SIMPLE(mapper->src_mapping[i], src->reg.stride.stride, +- src->reg.stride.offset); +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", +- src->reg.stride.stride, src->reg.stride.blocksize, +- src->reg.stride.offset)); +- break; +- case MPIDI_RANK_MAP_STRIDE_BLOCK: +- case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = MPIDI_CALC_STRIDE(mapper->src_mapping[i], +- src->reg.stride.stride, +- src->reg. +- stride.blocksize, +- src->reg.stride.offset); +- } +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source stride %d blocksize %d offset %d", +- src->reg.stride.stride, src->reg.stride.blocksize, +- src->reg.stride.offset)); +- break; +- case MPIDI_RANK_MAP_LUT: +- case MPIDI_RANK_MAP_LUT_INTRA: +- for (i = 0; i < size; i++) { +- dest->irreg.lut.lpid[i + mapper_offset] = +- src->irreg.lut.lpid[mapper->src_mapping[i]]; +- } +- break; +- default: +- mpi_errno = 1; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " cannot convert mode %d to lut", (int) src->mode)); +- goto fn_fail; +- } +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SRC_MAP_TO_LUT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_direct_of_src_rmap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_direct_of_src_rmap(MPIDI_rank_map_t * src, +- MPIDI_rank_map_t * dest, MPIR_Comm_map_t * mapper) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DIRECT_OF_SRC_RMAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DIRECT_OF_SRC_RMAP); +- dest->mode = src->mode; +- if (mapper) { +- dest->size = MPIDI_map_size(*mapper); +- } else { +- dest->size = src->size; +- } +- dest->avtid = src->avtid; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); +- switch (src->mode) { +- case MPIDI_RANK_MAP_DIRECT: +- case MPIDI_RANK_MAP_DIRECT_INTRA: +- break; +- case MPIDI_RANK_MAP_OFFSET: +- case MPIDI_RANK_MAP_OFFSET_INTRA: +- dest->reg.offset = src->reg.offset; +- break; +- case MPIDI_RANK_MAP_STRIDE: +- case MPIDI_RANK_MAP_STRIDE_INTRA: +- case MPIDI_RANK_MAP_STRIDE_BLOCK: +- case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- dest->reg.stride.stride = src->reg.stride.stride; +- dest->reg.stride.blocksize = src->reg.stride.blocksize; +- dest->reg.stride.offset = src->reg.stride.offset; +- break; +- case MPIDI_RANK_MAP_LUT: +- case MPIDI_RANK_MAP_LUT_INTRA: +- dest->irreg.lut.t = src->irreg.lut.t; +- dest->irreg.lut.lpid = src->irreg.lut.lpid; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\tref count %d", +- MPIR_Object_get_ref(src->irreg.lut.t))); +- MPIR_Object_add_ref(src->irreg.lut.t); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tadd ref to src lut")); +- break; +- case MPIDI_RANK_MAP_MLUT: +- dest->irreg.mlut.t = src->irreg.mlut.t; +- dest->irreg.mlut.gpid = src->irreg.mlut.gpid; +- MPIR_Object_add_ref(src->irreg.mlut.t); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tadd ref to src mlut")); +- break; +- case MPIDI_RANK_MAP_NONE: +- MPIR_Assert(0); +- break; +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DIRECT_OF_SRC_RMAP); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_offset_of_src_rmap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_offset_of_src_rmap(MPIDI_rank_map_t * src, +- MPIDI_rank_map_t * dest, +- MPIR_Comm_map_t * mapper, int offset) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OFFSET_OF_SRC_RMAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OFFSET_OF_SRC_RMAP); +- dest->avtid = src->avtid; +- dest->size = MPIDI_map_size(*mapper); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); +- switch (src->mode) { +- case MPIDI_RANK_MAP_DIRECT_INTRA: +- dest->mode = MPIDI_RANK_MAP_OFFSET_INTRA; +- dest->reg.offset = offset; +- break; +- case MPIDI_RANK_MAP_DIRECT: +- dest->mode = MPIDI_RANK_MAP_OFFSET; +- dest->reg.offset = offset; +- break; +- case MPIDI_RANK_MAP_OFFSET: +- dest->mode = MPIDI_RANK_MAP_OFFSET; +- dest->reg.offset = src->reg.offset + offset; +- break; +- case MPIDI_RANK_MAP_OFFSET_INTRA: +- dest->mode = MPIDI_RANK_MAP_OFFSET_INTRA; +- dest->reg.offset = src->reg.offset + offset; +- break; +- case MPIDI_RANK_MAP_STRIDE: +- dest->mode = MPIDI_RANK_MAP_STRIDE; +- dest->reg.stride.stride = src->reg.stride.stride; +- dest->reg.stride.blocksize = src->reg.stride.blocksize; +- dest->reg.stride.offset = src->reg.stride.offset + offset * src->reg.stride.stride; +- break; +- case MPIDI_RANK_MAP_STRIDE_INTRA: +- dest->mode = MPIDI_RANK_MAP_STRIDE_INTRA; +- dest->reg.stride.stride = src->reg.stride.stride; +- dest->reg.stride.blocksize = src->reg.stride.blocksize; +- dest->reg.stride.offset = src->reg.stride.offset + offset * src->reg.stride.stride; +- break; +- case MPIDI_RANK_MAP_STRIDE_BLOCK: +- case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- MPIDI_src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); +- break; +- case MPIDI_RANK_MAP_LUT: +- case MPIDI_RANK_MAP_LUT_INTRA: +- dest->mode = src->mode; +- dest->irreg.lut.t = src->irreg.lut.t; +- dest->irreg.lut.lpid = &src->irreg.lut.lpid[offset]; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\tref count %d", +- MPIR_Object_get_ref(src->irreg.lut.t))); +- MPIR_Object_add_ref(src->irreg.lut.t); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tadd ref to src lut")); +- break; +- case MPIDI_RANK_MAP_MLUT: +- dest->mode = src->mode; +- dest->irreg.mlut.t = src->irreg.mlut.t; +- dest->irreg.mlut.gpid = &src->irreg.mlut.gpid[offset]; +- MPIR_Object_add_ref(src->irreg.mlut.t); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, "\tadd ref to src mlut")); +- break; +- case MPIDI_RANK_MAP_NONE: +- MPIR_Assert(0); +- break; +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OFFSET_OF_SRC_RMAP); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_stride_of_src_rmap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_stride_of_src_rmap(MPIDI_rank_map_t * src, +- MPIDI_rank_map_t * dest, +- MPIR_Comm_map_t * mapper, +- int stride, int blocksize, int offset) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_STRIDE_OF_SRC_RMAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_STRIDE_OF_SRC_RMAP); +- dest->avtid = src->avtid; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " source mode %d", (int) src->mode)); +- switch (src->mode) { +- case MPIDI_RANK_MAP_DIRECT_INTRA: +- if (blocksize == 1) { +- dest->mode = MPIDI_RANK_MAP_STRIDE_INTRA; +- } else { +- dest->mode = MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA; +- } +- dest->size = MPIDI_map_size(*mapper); +- dest->reg.stride.stride = stride; +- dest->reg.stride.blocksize = blocksize; +- dest->reg.stride.offset = offset; +- MPIR_Assert(stride > 0); +- MPIR_Assert(blocksize > 0); +- break; +- case MPIDI_RANK_MAP_DIRECT: +- if (blocksize == 1) { +- dest->mode = MPIDI_RANK_MAP_STRIDE; +- } else { +- dest->mode = MPIDI_RANK_MAP_STRIDE_BLOCK; +- } +- dest->size = MPIDI_map_size(*mapper); +- dest->reg.stride.stride = stride; +- dest->reg.stride.blocksize = blocksize; +- dest->reg.stride.offset = offset; +- MPIR_Assert(stride > 0); +- MPIR_Assert(blocksize > 0); +- break; +- case MPIDI_RANK_MAP_OFFSET: +- if (blocksize == 1) { +- dest->mode = MPIDI_RANK_MAP_STRIDE; +- } else { +- dest->mode = MPIDI_RANK_MAP_STRIDE_BLOCK; +- } +- dest->size = MPIDI_map_size(*mapper); +- dest->reg.stride.stride = stride; +- dest->reg.stride.blocksize = blocksize; +- dest->reg.stride.offset = offset + src->reg.offset; +- break; +- case MPIDI_RANK_MAP_OFFSET_INTRA: +- if (blocksize == 1) { +- dest->mode = MPIDI_RANK_MAP_STRIDE_INTRA; +- } else { +- dest->mode = MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA; +- } +- dest->size = MPIDI_map_size(*mapper); +- dest->reg.stride.stride = stride; +- dest->reg.stride.blocksize = blocksize; +- dest->reg.stride.offset = offset + src->reg.offset; +- break; +- case MPIDI_RANK_MAP_STRIDE: +- if (blocksize == 1) { +- dest->mode = MPIDI_RANK_MAP_STRIDE; +- dest->reg.stride.stride = src->reg.stride.stride * stride; +- dest->reg.stride.blocksize = blocksize; +- dest->reg.stride.offset = src->reg.stride.stride * offset + src->reg.stride.offset; +- } else { +- MPIDI_src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); +- } +- break; +- case MPIDI_RANK_MAP_STRIDE_INTRA: +- if (blocksize == 1) { +- dest->mode = MPIDI_RANK_MAP_STRIDE_INTRA; +- dest->reg.stride.stride = src->reg.stride.stride * stride; +- dest->reg.stride.blocksize = blocksize; +- dest->reg.stride.offset = src->reg.stride.stride * offset + src->reg.stride.offset; +- } else { +- MPIDI_src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); +- } +- break; +- case MPIDI_RANK_MAP_STRIDE_BLOCK: +- case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- MPIDI_src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); +- break; +- case MPIDI_RANK_MAP_LUT: +- case MPIDI_RANK_MAP_LUT_INTRA: +- MPIDI_src_map_to_lut(src, dest, mapper, mapper->src_mapping_size, 0); +- break; +- case MPIDI_RANK_MAP_MLUT: +- MPIDI_src_mlut_to_mlut(src, dest, mapper, mapper->src_mapping_size, 0); +- break; +- case MPIDI_RANK_MAP_NONE: +- MPIR_Assert(0); +- break; +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_STRIDE_OF_SRC_RMAP); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_check_convert_mlut_to_lut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_check_convert_mlut_to_lut(MPIDI_rank_map_t * src) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- int flag = 1; +- int avtid; +- MPIDI_rank_map_lut_t *lut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHECK_CONVERT_MLUT_TO_LUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHECK_CONVERT_MLUT_TO_LUT); +- +- if (src->mode != MPIDI_RANK_MAP_MLUT) { +- goto fn_exit; +- } +- +- /* check if all mlut item has the same avtid */ +- avtid = src->irreg.mlut.gpid[0].avtid; +- for (i = 1; i < src->size; i++) { +- if (src->irreg.mlut.gpid[i].avtid != avtid) { +- flag = 0; +- break; +- } +- } +- if (!flag) { /* multiple avtid */ +- goto fn_exit; +- } +- +- src->avtid = avtid; +- if (avtid == 0) { +- src->mode = MPIDI_RANK_MAP_LUT_INTRA; +- } else { +- src->mode = MPIDI_RANK_MAP_LUT; +- } +- mpi_errno = MPIDIU_alloc_lut(&lut, src->size); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- for (i = 0; i < src->size; i++) { +- lut->lpid[i] = src->irreg.mlut.gpid[i].lpid; +- } +- MPIDIU_release_mlut(src->irreg.mlut.t); +- src->irreg.lut.t = lut; +- src->irreg.lut.lpid = src->irreg.lut.t->lpid; +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, " avtid %d", src->avtid)); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHECK_CONVERT_MLUT_TO_LUT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_check_convert_lut_to_regular +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_check_convert_lut_to_regular(MPIDI_rank_map_t * src) +-{ +- int mpi_errno = MPI_SUCCESS; +- int mode_detected, offset, blocksize, stride; +- MPIDI_rank_map_lut_t *lut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHECK_CONVERT_LUT_TO_REGULAR); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHECK_CONVERT_LUT_TO_REGULAR); +- +- if (src->mode != MPIDI_RANK_MAP_LUT && src->mode != MPIDI_RANK_MAP_LUT_INTRA) { +- goto fn_exit; +- } +- +- lut = src->irreg.lut.t; +- mode_detected = MPIDI_detect_regular_model(src->irreg.lut.lpid, src->size, +- &offset, &blocksize, &stride); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " detected mode: %d", mode_detected)); +- +- +- switch (mode_detected) { +- case MPIDI_SRC_MAPPER_DIRECT: +- src->mode = MPIDI_RANK_MAP_DIRECT; +- if (src->avtid == 0) { +- src->mode = MPIDI_RANK_MAP_DIRECT_INTRA; +- } +- src->irreg.lut.t = NULL; +- src->irreg.lut.lpid = NULL; +- MPIDIU_release_lut(lut); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\tlut to mode %d", (int) src->mode)); +- break; +- case MPIDI_SRC_MAPPER_OFFSET: +- src->mode = MPIDI_RANK_MAP_OFFSET; +- if (src->avtid == 0) { +- src->mode = MPIDI_RANK_MAP_OFFSET_INTRA; +- } +- src->reg.offset = offset; +- src->irreg.lut.t = NULL; +- src->irreg.lut.lpid = NULL; +- MPIDIU_release_lut(lut); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " lut to mode %d", (int) src->mode)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\toffset: %d", src->reg.offset)); +- break; +- case MPIDI_SRC_MAPPER_STRIDE: +- if (blocksize == 1) { +- src->mode = MPIDI_RANK_MAP_STRIDE; +- if (src->avtid == 0) { +- src->mode = MPIDI_RANK_MAP_STRIDE_INTRA; +- } +- } else { +- src->mode = MPIDI_RANK_MAP_STRIDE_BLOCK; +- if (src->avtid == 0) { +- src->mode = MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA; +- } +- } +- src->reg.stride.stride = stride; +- src->reg.stride.blocksize = blocksize; +- src->reg.stride.offset = offset; +- src->irreg.lut.t = NULL; +- src->irreg.lut.lpid = NULL; +- MPIDIU_release_lut(lut); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " lut to mode %d", (int) src->mode)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\toffset: %d", src->reg.stride.offset)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\tblocksize: %d", src->reg.stride.blocksize)); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\tstride: %d", src->reg.stride.stride)); +- break; +- } +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHECK_CONVERT_LUT_TO_REGULAR); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_set_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_set_map(MPIDI_rank_map_t * src_rmap, +- MPIDI_rank_map_t * dest_rmap, +- MPIR_Comm_map_t * mapper, +- int src_comm_size, int total_mapper_size, int mapper_offset) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SET_MAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SET_MAP); +- +- /* Simplest case: MAP_DUP, exact duplication of src_comm */ +- if (mapper->type == MPIR_COMM_MAP_TYPE__DUP && src_comm_size == total_mapper_size) { +- MPIDI_direct_of_src_rmap(src_rmap, dest_rmap, mapper); +- goto fn_exit; +- } +- /* single src_comm, newcomm is smaller than src_comm, only one mapper */ +- else if (mapper->type == MPIR_COMM_MAP_TYPE__IRREGULAR && +- mapper->src_mapping_size == total_mapper_size) { +- /* check if new comm has the same mapping as src_comm */ +- /* detect src_mapping_offset for direct_to_direct and offset_to_offset */ +- int mode_detected, offset = 0, blocksize, stride; +- mode_detected = MPIDI_detect_regular_model(mapper->src_mapping, mapper->src_mapping_size, +- &offset, &blocksize, &stride); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\tdetected mode: %d", mode_detected)); +- +- switch (mode_detected) { +- case MPIDI_SRC_MAPPER_DIRECT: +- MPIDI_direct_of_src_rmap(src_rmap, dest_rmap, mapper); +- break; +- case MPIDI_SRC_MAPPER_OFFSET: +- MPIDI_offset_of_src_rmap(src_rmap, dest_rmap, mapper, offset); +- break; +- case MPIDI_SRC_MAPPER_STRIDE: +- MPIDI_stride_of_src_rmap(src_rmap, dest_rmap, mapper, stride, blocksize, offset); +- break; +- default: +- if (src_rmap->mode == MPIDI_RANK_MAP_MLUT) { +- MPIDI_src_mlut_to_mlut(src_rmap, dest_rmap, mapper, total_mapper_size, +- mapper_offset); +- } else { +- MPIDI_src_map_to_lut(src_rmap, dest_rmap, mapper, mapper->src_mapping_size, +- mapper_offset); +- } +- } +- goto fn_exit; +- } +- +- /* more complex case: multiple mappers +- * We always alloc lut (or mlut is src_rmap is mlut). We will check if a +- * lut mapping can be converted to something simpler after all the mapper +- * are processed +- */ +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, (MPL_DBG_FDEST, " multiple mapper")); +- if (mapper->type == MPIR_COMM_MAP_TYPE__DUP) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " check map_size %d, src_comm_size %d", +- MPIDI_map_size(*mapper), src_comm_size)); +- MPIDI_src_comm_to_mlut(src_rmap, dest_rmap, src_comm_size, +- total_mapper_size, mapper_offset); +- } else { /* mapper->type == MPIR_COMM_MAP_TYPE__IRREGULAR */ +- MPIDI_src_mlut_to_mlut(src_rmap, dest_rmap, mapper, total_mapper_size, mapper_offset); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SET_MAP); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_comm_create_rank_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_comm_create_rank_map(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Comm_map_t *mapper; +- MPIR_Comm *src_comm; +- int total_mapper_size, mapper_offset; +- +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMM_CREATE_RANK_MAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMM_CREATE_RANK_MAP); +- +- /* do some sanity checks */ +- LL_FOREACH(comm->mapper_head, mapper) { +- if (mapper->src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- MPIR_Assert(mapper->dir == MPIR_COMM_MAP_DIR__L2L || +- mapper->dir == MPIR_COMM_MAP_DIR__L2R); +- } +- +- if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- MPIR_Assert(mapper->dir == MPIR_COMM_MAP_DIR__L2L || +- mapper->dir == MPIR_COMM_MAP_DIR__R2L); +- } +- } +- +- /* First, handle all the mappers that contribute to the local part +- * of the comm */ +- total_mapper_size = 0; +- LL_FOREACH(comm->mapper_head, mapper) { +- if (mapper->dir == MPIR_COMM_MAP_DIR__L2R || mapper->dir == MPIR_COMM_MAP_DIR__R2R) +- continue; +- +- total_mapper_size += MPIDI_map_size(*mapper); +- } +- mapper_offset = 0; +- LL_FOREACH(comm->mapper_head, mapper) { +- src_comm = mapper->src_comm; +- +- if (mapper->dir == MPIR_COMM_MAP_DIR__L2R || mapper->dir == MPIR_COMM_MAP_DIR__R2R) +- continue; +- +- if (mapper->dir == MPIR_COMM_MAP_DIR__L2L) { +- if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM && +- comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " intra->intra, L2L, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->local_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, map), mapper, +- src_comm->local_size, total_mapper_size, mapper_offset); +- } else if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM && +- comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " intra->inter, L2L, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->local_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, local_map), mapper, +- src_comm->local_size, total_mapper_size, mapper_offset); +- } else if (src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM && +- comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " inter->intra, L2L, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->local_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, local_map), &MPIDI_COMM(comm, map), mapper, +- src_comm->local_size, total_mapper_size, mapper_offset); +- } else { /* src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM && comm->comm_kind == MPIR_COMM_KIND__INTERCOMM */ +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " inter->inter, L2L, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->local_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, local_map), &MPIDI_COMM(comm, local_map), +- mapper, src_comm->local_size, total_mapper_size, mapper_offset); +- } +- } else { /* mapper->dir == MPIR_COMM_MAP_DIR__R2L */ +- MPIR_Assert(src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM); +- +- if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " ->intra, R2L, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->remote_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, map), mapper, +- src_comm->remote_size, total_mapper_size, mapper_offset); +- } else { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " ->inter, R2L, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->remote_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, local_map), mapper, +- src_comm->remote_size, total_mapper_size, mapper_offset); +- } +- } +- +- mapper_offset += MPIDI_map_size(*mapper); +- } +- +- /* Next, handle all the mappers that contribute to the remote part +- * of the comm (only valid for intercomms) +- */ +- total_mapper_size = 0; +- LL_FOREACH(comm->mapper_head, mapper) { +- if (mapper->dir == MPIR_COMM_MAP_DIR__L2L || mapper->dir == MPIR_COMM_MAP_DIR__R2L) +- continue; +- +- total_mapper_size += MPIDI_map_size(*mapper); +- } +- mapper_offset = 0; +- LL_FOREACH(comm->mapper_head, mapper) { +- src_comm = mapper->src_comm; +- +- if (mapper->dir == MPIR_COMM_MAP_DIR__L2L || mapper->dir == MPIR_COMM_MAP_DIR__R2L) +- continue; +- +- MPIR_Assert(comm->comm_kind == MPIR_COMM_KIND__INTERCOMM); +- +- if (mapper->dir == MPIR_COMM_MAP_DIR__L2R) { +- if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " intra->, L2R, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->local_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, map), mapper, +- src_comm->local_size, total_mapper_size, mapper_offset); +- } else { /* src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM */ +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " inter->, L2R, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->local_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, local_map), &MPIDI_COMM(comm, map), mapper, +- src_comm->local_size, total_mapper_size, mapper_offset); +- } +- } else { /* mapper->dir == MPIR_COMM_MAP_DIR__R2R */ +- MPIR_Assert(src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, +- " inter->, R2R, size=%d, total_mapper_size=%d, mapper_offset=%d", +- src_comm->remote_size, total_mapper_size, mapper_offset)); +- MPIDI_set_map(&MPIDI_COMM(src_comm, map), &MPIDI_COMM(comm, map), mapper, +- src_comm->remote_size, total_mapper_size, mapper_offset); +- } +- +- mapper_offset += MPIDI_map_size(*mapper); +- } +- +- /* check before finishing +- * 1. if mlut can be converted to lut: all avtids are the same +- * 2. if lut can be converted to regular modes: direct, offset, and more +- */ +- MPIDI_check_convert_mlut_to_lut(&MPIDI_COMM(comm, map)); +- MPIDI_check_convert_lut_to_regular(&MPIDI_COMM(comm, map)); +- if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) { +- MPIDI_check_convert_mlut_to_lut(&MPIDI_COMM(comm, local_map)); +- MPIDI_check_convert_lut_to_regular(&MPIDI_COMM(comm, local_map)); +- } +- +- if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) { +- /* setup the lut for the local_comm in the intercomm */ +- if (comm->local_comm) { +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, "\t create local_comm using src_comm")); +- MPIDI_direct_of_src_rmap(&MPIDI_COMM(comm, local_map), +- &MPIDI_COMM(comm->local_comm, map), NULL); +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, +- (MPL_DBG_FDEST, "create local_comm using src_comm")); +- } +- } +- +- if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { +- MPIDI_COMM(comm, local_map).mode = MPIDI_RANK_MAP_NONE; +- } +-#ifdef MPL_USE_DBG_LOGGING +- int rank_; +- int avtid_, lpid_ = -1; +- if (comm->remote_size < 16) { +- for (rank_ = 0; rank_ < comm->remote_size; ++rank_) { +- MPIDIU_comm_rank_to_pid(comm, rank_, &lpid_, &avtid_); +- MPIDIU_comm_rank_to_av(comm, rank_); +- } +- } +- if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM && comm->local_size < 16) { +- for (rank_ = 0; rank_ < comm->local_size; ++rank_) { +- MPIDIU_comm_rank_to_pid_local(comm, rank_, &lpid_, &avtid_); +- } +- } +-#endif +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMM_CREATE_RANK_MAP); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_check_disjoint_lupids +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_check_disjoint_lupids(int lupids1[], int n1, +- int lupids2[], int n2) +-{ +- int i, mask_size, idx, bit, maxlupid = -1; +- int mpi_errno = MPI_SUCCESS; +- uint32_t lupidmaskPrealloc[128]; +- uint32_t *lupidmask; +- MPIR_CHKLMEM_DECL(1); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHECK_DISJOINT_LUPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHECK_DISJOINT_LUPIDS); +- +- /* Find the max lupid */ +- for (i = 0; i < n1; i++) { +- if (lupids1[i] > maxlupid) +- maxlupid = lupids1[i]; +- } +- for (i = 0; i < n2; i++) { +- if (lupids2[i] > maxlupid) +- maxlupid = lupids2[i]; +- } +- +- mask_size = (maxlupid / 32) + 1; +- +- if (mask_size > 128) { +- MPIR_CHKLMEM_MALLOC(lupidmask, uint32_t *, mask_size * sizeof(uint32_t), +- mpi_errno, "lupidmask", MPL_MEM_COMM); +- } else { +- lupidmask = lupidmaskPrealloc; +- } +- +- /* zero the bitvector array */ +- memset(lupidmask, 0x00, mask_size * sizeof(*lupidmask)); +- +- /* Set the bits for the first array */ +- for (i = 0; i < n1; i++) { +- idx = lupids1[i] / 32; +- bit = lupids1[i] % 32; +- lupidmask[idx] = lupidmask[idx] | (1 << bit); +- MPIR_Assert(idx < mask_size); +- } +- +- /* Look for any duplicates in the second array */ +- for (i = 0; i < n2; i++) { +- idx = lupids2[i] / 32; +- bit = lupids2[i] % 32; +- if (lupidmask[idx] & (1 << bit)) { +- MPIR_ERR_SET1(mpi_errno, MPI_ERR_COMM, +- "**dupprocesses", "**dupprocesses %d", lupids2[i]); +- goto fn_fail; +- } +- /* Add a check on duplicates *within* group 2 */ +- lupidmask[idx] = lupidmask[idx] | (1 << bit); +- MPIR_Assert(idx < mask_size); +- } +- +- /* Also fall through for normal return */ +- fn_exit: +- MPIR_CHKLMEM_FREEALL(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHECK_DISJOINT_LUPIDS); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} ++int MPIDI_comm_create_rank_map(MPIR_Comm * comm); ++int MPIDI_check_disjoint_lupids(int lupids1[], int n1, int lupids2[], int n2); + + #endif /* CH4I_COMM_H_INCLUDED */ +deleted file mode 100644 +--- a/src/mpid/ch4/src/ch4i_util.h ++++ /dev/null +@@ -1,20 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2006 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- * +- * Portions of this code were written by Intel Corporation. +- * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material +- * to Argonne National Laboratory subject to Software Grant and Corporate +- * Contributor License Agreement dated February 8, 2012. +- */ +-#ifndef CH4I_UTIL_H_INCLUDED +-#define CH4I_UTIL_H_INCLUDED +- +-void MPIDI_CH4I_map_create(void **_map); +-void MPIDI_CH4I_map_destroy(void *_map); +-void MPIDI_CH4I_map_set(void *_map, uint64_t id, void *val); +-void MPIDI_CH4I_map_erase(void *_map, uint64_t id); +-void *MPIDI_CH4I_map_lookup(void *_map, uint64_t id); +- +-#endif /* CH4I_UTIL_H_INCLUDED */ +--- a/src/mpid/ch4/src/ch4i_workq.h ++++ b/src/mpid/ch4/src/ch4i_workq.h +@@ -39,8 +39,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_recv_unsafe(void *, MPI_Aint, MPI_Datatype, i + MPL_STATIC_INLINE_PREFIX int MPIDI_irecv_unsafe(void *, MPI_Aint, MPI_Datatype, int, int, + MPIR_Comm *, int, MPIDI_av_entry_t *, + MPIR_Request **); +-MPL_STATIC_INLINE_PREFIX int MPIDI_imrecv_unsafe(void *, MPI_Aint, MPI_Datatype, MPIR_Request *, +- MPIR_Request **); ++MPL_STATIC_INLINE_PREFIX int MPIDI_imrecv_unsafe(void *, MPI_Aint, MPI_Datatype, MPIR_Request *); + MPL_STATIC_INLINE_PREFIX int MPIDI_put_unsafe(const void *, int, MPI_Datatype, int, MPI_Aint, int, + MPI_Datatype, MPIR_Win *); + MPL_STATIC_INLINE_PREFIX int MPIDI_get_unsafe(void *, int, MPI_Datatype, int, MPI_Aint, int, +@@ -135,8 +134,6 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_workq_pt2pt_enqueue(MPIDI_workq_op_t op, + case IPROBE: + { + struct MPIDI_workq_iprobe *wd = &pt2pt_elemt->params.pt2pt.iprobe; +- wd->count = count; +- wd->datatype = datatype; + wd->rank = rank; + wd->tag = tag; + wd->comm_ptr = comm_ptr; +@@ -150,8 +147,6 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_workq_pt2pt_enqueue(MPIDI_workq_op_t op, + case IMPROBE: + { + struct MPIDI_workq_improbe *wd = &pt2pt_elemt->params.pt2pt.improbe; +- wd->count = count; +- wd->datatype = datatype; + wd->rank = rank; + wd->tag = tag; + wd->comm_ptr = comm_ptr; +@@ -177,7 +172,7 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_workq_pt2pt_enqueue(MPIDI_workq_op_t op, + MPIR_Assert(0); + } + +- MPIDI_workq_enqueue(&MPIDI_CH4_Global.workqueue, pt2pt_elemt); ++ MPIDI_workq_enqueue(&MPIDI_global.workqueue, pt2pt_elemt); + } + + MPL_STATIC_INLINE_PREFIX void MPIDI_workq_rma_enqueue(MPIDI_workq_op_t op, +@@ -217,7 +212,6 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_workq_rma_enqueue(MPIDI_workq_op_t op, + wd->target_count = target_count; + wd->target_datatype = target_datatype; + wd->win_ptr = win_ptr; +- wd->addr = addr; + break; + } + case GET: +@@ -231,13 +225,12 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_workq_rma_enqueue(MPIDI_workq_op_t op, + wd->target_count = target_count; + wd->target_datatype = target_datatype; + wd->win_ptr = win_ptr; +- wd->addr = addr; + break; + } + default: + MPIR_Assert(0); + } +- MPIDI_workq_enqueue(&MPIDI_CH4_Global.workqueue, rma_elemt); ++ MPIDI_workq_enqueue(&MPIDI_global.workqueue, rma_elemt); + } + + MPL_STATIC_INLINE_PREFIX void MPIDI_workq_release_pt2pt_elemt(MPIDI_workq_elemt_t * workq_elemt) +@@ -318,12 +311,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_workq_dispatch(MPIDI_workq_elemt_t * workq_el + } + case IMRECV:{ + struct MPIDI_workq_imrecv *wd = &workq_elemt->params.pt2pt.imrecv; +- req = wd->request; + datatype = wd->datatype; +- MPIDI_imrecv_unsafe(wd->buf, wd->count, wd->datatype, *wd->message, &req); ++ MPIDI_imrecv_unsafe(wd->buf, wd->count, wd->datatype, *wd->message); + MPIR_Datatype_release_if_not_builtin(datatype); + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (!MPIDI_CH4I_REQUEST(*wd->message, is_local)) ++ if (!MPIDI_REQUEST(*wd->message, is_local)) + #endif + MPIDI_workq_release_pt2pt_elemt(workq_elemt); + MPIDI_workq_release_pt2pt_elemt(workq_elemt); +@@ -362,32 +354,32 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_workq_dispatch(MPIDI_workq_elemt_t * workq_el + return mpi_errno; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vni_progress_unsafe(void) ++MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vci_progress_unsafe(void) + { + int mpi_errno = MPI_SUCCESS; + MPIDI_workq_elemt_t *workq_elemt = NULL; + +- MPIDI_workq_dequeue(&MPIDI_CH4_Global.workqueue, (void **) &workq_elemt); ++ MPIDI_workq_dequeue(&MPIDI_global.workqueue, (void **) &workq_elemt); + while (workq_elemt != NULL) { + mpi_errno = MPIDI_workq_dispatch(workq_elemt); + if (mpi_errno != MPI_SUCCESS) + goto fn_fail; +- MPIDI_workq_dequeue(&MPIDI_CH4_Global.workqueue, (void **) &workq_elemt); ++ MPIDI_workq_dequeue(&MPIDI_global.workqueue, (void **) &workq_elemt); + } + + fn_fail: + return mpi_errno; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vni_progress(void) ++MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vci_progress(void) + { + int mpi_errno = MPI_SUCCESS; + +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + +- mpi_errno = MPIDI_workq_vni_progress_unsafe(); ++ mpi_errno = MPIDI_workq_vci_progress_unsafe(); + +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + fn_fail: + return mpi_errno; + } +@@ -396,12 +388,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vni_progress(void) + #define MPIDI_workq_pt2pt_enqueue(...) + #define MPIDI_workq_rma_enqueue(...) + +-MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vni_progress_unsafe(void) ++MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vci_progress_unsafe(void) + { + return MPI_SUCCESS; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vni_progress(void) ++MPL_STATIC_INLINE_PREFIX int MPIDI_workq_vci_progress(void) + { + return MPI_SUCCESS; + } +--- a/src/mpid/ch4/src/ch4i_workq_types.h ++++ b/src/mpid/ch4/src/ch4i_workq_types.h +@@ -29,12 +29,6 @@ enum { + #define MPIDI_CH4_USE_WORK_QUEUES + #endif + +-static const char *MPIDI_CH4_mt_model_names[MPIDI_CH4_NUM_MT_MODELS] = { +- "direct", +- "handoff", +- "trylock", +-}; +- + /* Define the work queue implementation type */ + #if defined(ENABLE_IZEM_QUEUE) + #include +@@ -76,14 +70,11 @@ enum MPIDI_workq_op { SEND, ISEND, SSEND, ISSEND, RSEND, IRSEND, RECV, IRECV, IM + IMPROBE, PUT, GET, ACC, CAS, FAO, GACC + }; + +-typedef struct MPIDI_workq_elemt MPIDI_workq_elemt_t; +-typedef struct MPIDI_workq_list MPIDI_workq_list_t; +- +-typedef struct MPIDI_av_entry MPIDI_av_entry_t; ++struct MPIDI_av_entry; + + /* Structure to encapsulate MPI operations that are delegated to another thread + * Can be allocated from an MPI object pool or embedded in another object (e.g. request) */ +-struct MPIDI_workq_elemt { ++typedef struct MPIDI_workq_elemt { + MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ + MPIDI_workq_op_t op; + OPA_int_t *processed; /* set to true by the progress thread when +@@ -98,7 +89,7 @@ struct MPIDI_workq_elemt { + int tag; + MPIR_Comm *comm_ptr; + int context_offset; +- MPIDI_av_entry_t *addr; ++ struct MPIDI_av_entry *addr; + MPIR_Request *request; + } send; /* also for ISEND SSEND ISSEND RSEND IRSEND */ + struct MPIDI_workq_recv { +@@ -109,7 +100,7 @@ struct MPIDI_workq_elemt { + int tag; + MPIR_Comm *comm_ptr; + int context_offset; +- MPIDI_av_entry_t *addr; ++ struct MPIDI_av_entry *addr; + MPI_Status *status; + MPIR_Request *request; + } recv; +@@ -121,29 +112,25 @@ struct MPIDI_workq_elemt { + int tag; + MPIR_Comm *comm_ptr; + int context_offset; +- MPIDI_av_entry_t *addr; ++ struct MPIDI_av_entry *addr; + MPIR_Request *request; + } irecv; + struct MPIDI_workq_iprobe { +- MPI_Aint count; +- MPI_Datatype datatype; + int rank; + int tag; + MPIR_Comm *comm_ptr; + int context_offset; +- MPIDI_av_entry_t *addr; ++ struct MPIDI_av_entry *addr; + MPI_Status *status; + MPIR_Request *request; + int *flag; + } iprobe; + struct MPIDI_workq_improbe { +- MPI_Aint count; +- MPI_Datatype datatype; + int rank; + int tag; + MPIR_Comm *comm_ptr; + int context_offset; +- MPIDI_av_entry_t *addr; ++ struct MPIDI_av_entry *addr; + MPI_Status *status; + MPIR_Request *request; + int *flag; +@@ -167,7 +154,6 @@ struct MPIDI_workq_elemt { + int target_count; + MPI_Datatype target_datatype; + MPIR_Win *win_ptr; +- MPIDI_av_entry_t *addr; + } put; + struct MPIDI_workq_get { + void *origin_addr; +@@ -178,16 +164,9 @@ struct MPIDI_workq_elemt { + int target_count; + MPI_Datatype target_datatype; + MPIR_Win *win_ptr; +- MPIDI_av_entry_t *addr; + } get; + } rma; + } params; +-}; +- +-/* List structure to implement per-object (e.g. per-communicator, per-window) work queues */ +-struct MPIDI_workq_list { +- MPIDI_workq_t pend_ops; +- MPIDI_workq_list_t *next, *prev; +-}; ++} MPIDI_workq_elemt_t; + + #endif /* CH4I_WORKQ_TYPES_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_buf.c +@@ -0,0 +1,42 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ch4r_buf.h" ++ ++MPIDIU_buf_pool_t *MPIDIU_create_buf_pool(int num, int size) ++{ ++ MPIDIU_buf_pool_t *buf_pool; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_CREATE_BUF_POOL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_CREATE_BUF_POOL); ++ ++ buf_pool = MPIDIU_create_buf_pool_internal(num, size, NULL); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_CREATE_BUF_POOL); ++ return buf_pool; ++} ++ ++void MPIDIU_destroy_buf_pool(MPIDIU_buf_pool_t * pool) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_DESTROY_BUF_POOL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_DESTROY_BUF_POOL); ++ ++ if (pool->next) ++ MPIDIU_destroy_buf_pool(pool->next); ++ ++ MPID_Thread_mutex_destroy(&pool->lock, &ret); ++ MPL_free(pool->memory_region); ++ MPL_free(pool); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_DESTROY_BUF_POOL); ++} +--- a/src/mpid/ch4/src/ch4r_buf.h ++++ b/src/mpid/ch4/src/ch4r_buf.h +@@ -12,7 +12,6 @@ + #define CH4R_BUF_H_INCLUDED + + #include "ch4_impl.h" +-#include "ch4i_util.h" + #include + + /* +@@ -24,77 +23,68 @@ + - use huge pages + */ + +-static inline MPIU_buf_pool_t *MPIDI_create_buf_pool(int num, int size, +- MPIU_buf_pool_t * parent_pool) ++MPIDIU_buf_pool_t *MPIDIU_create_buf_pool(int num, int size); ++void MPIDIU_destroy_buf_pool(MPIDIU_buf_pool_t * pool); ++ ++static inline MPIDIU_buf_pool_t *MPIDIU_create_buf_pool_internal(int num, int size, ++ MPIDIU_buf_pool_t * parent_pool) + { + int i, ret; +- MPIU_buf_pool_t *buf_pool; +- MPIU_buf_t *curr, *next; ++ MPIDIU_buf_pool_t *buf_pool; ++ MPIDIU_buf_t *curr, *next; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CREATE_BUF_POOL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CREATE_BUF_POOL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_CREATE_BUF_POOL_INTERNAL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_CREATE_BUF_POOL_INTERNAL); + +- buf_pool = (MPIU_buf_pool_t *) MPL_malloc(sizeof(*buf_pool), MPL_MEM_BUFFER); ++ buf_pool = (MPIDIU_buf_pool_t *) MPL_malloc(sizeof(*buf_pool), MPL_MEM_BUFFER); + MPIR_Assert(buf_pool); + MPID_Thread_mutex_create(&buf_pool->lock, &ret); + + buf_pool->size = size; + buf_pool->num = num; + buf_pool->next = NULL; +- buf_pool->memory_region = MPL_malloc(num * (sizeof(MPIU_buf_t) + size), MPL_MEM_BUFFER); ++ buf_pool->memory_region = MPL_malloc(num * (sizeof(MPIDIU_buf_t) + size), MPL_MEM_BUFFER); + MPIR_Assert(buf_pool->memory_region); + +- curr = (MPIU_buf_t *) buf_pool->memory_region; ++ curr = (MPIDIU_buf_t *) buf_pool->memory_region; + buf_pool->head = curr; + for (i = 0; i < num - 1; i++) { +- next = (MPIU_buf_t *) ((char *) curr + size + sizeof(MPIU_buf_t)); ++ next = (MPIDIU_buf_t *) ((char *) curr + size + sizeof(MPIDIU_buf_t)); + curr->next = next; + curr->pool = parent_pool ? parent_pool : buf_pool; + curr = curr->next; + } + curr->next = NULL; + curr->pool = parent_pool ? parent_pool : buf_pool; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CREATE_BUF_POOL); +- return buf_pool; +-} +- +-static inline MPIU_buf_pool_t *MPIDI_CH4U_create_buf_pool(int num, int size) +-{ +- MPIU_buf_pool_t *buf_pool; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_CREATE_BUF_POOL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_CREATE_BUF_POOL); +- +- buf_pool = MPIDI_create_buf_pool(num, size, NULL); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_CREATE_BUF_POOL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_CREATE_BUF_POOL_INTERNAL); + return buf_pool; + } + +-static inline void *MPIDI_CH4U_get_head_buf(MPIU_buf_pool_t * pool) ++static inline void *MPIDIU_get_head_buf(MPIDIU_buf_pool_t * pool) + { + void *buf; +- MPIU_buf_t *curr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_GET_HEAD_BUF); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_GET_HEAD_BUF); ++ MPIDIU_buf_t *curr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_HEAD_BUF); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_HEAD_BUF); + + curr = pool->head; + pool->head = curr->next; + buf = curr->data; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_GET_HEAD_BUF); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_HEAD_BUF); + return buf; + } + +-static inline void *MPIDI_CH4R_get_buf_safe(MPIU_buf_pool_t * pool) ++static inline void *MPIDIU_get_buf_safe(MPIDIU_buf_pool_t * pool) + { + void *buf; +- MPIU_buf_pool_t *curr_pool; ++ MPIDIU_buf_pool_t *curr_pool; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_GET_BUF_SAFE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_GET_BUF_SAFE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_BUF_SAFE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_BUF_SAFE); + + if (pool->head) { +- buf = MPIDI_CH4U_get_head_buf(pool); ++ buf = MPIDIU_get_head_buf(pool); + goto fn_exit; + } + +@@ -102,80 +92,57 @@ static inline void *MPIDI_CH4R_get_buf_safe(MPIU_buf_pool_t * pool) + while (curr_pool->next) + curr_pool = curr_pool->next; + +- curr_pool->next = MPIDI_create_buf_pool(pool->num, pool->size, pool); ++ curr_pool->next = MPIDIU_create_buf_pool_internal(pool->num, pool->size, pool); + MPIR_Assert(curr_pool->next); + pool->head = curr_pool->next->head; +- buf = MPIDI_CH4U_get_head_buf(pool); ++ buf = MPIDIU_get_head_buf(pool); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_GET_BUF_SAFE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_BUF_SAFE); + return buf; + } + +- +-static inline void *MPIDI_CH4R_get_buf(MPIU_buf_pool_t * pool) ++static inline void *MPIDIU_get_buf(MPIDIU_buf_pool_t * pool) + { + void *buf; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_GET_BUF); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_GET_BUF); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_BUF); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_BUF); + +- MPID_THREAD_CS_ENTER(POBJ, pool->lock); +- MPID_THREAD_CS_ENTER(VNI, pool->lock); +- buf = MPIDI_CH4R_get_buf_safe(pool); +- MPID_THREAD_CS_EXIT(VNI, pool->lock); +- MPID_THREAD_CS_EXIT(POBJ, pool->lock); ++ MPID_THREAD_CS_ENTER(VCI, pool->lock); ++ buf = MPIDIU_get_buf_safe(pool); ++ MPID_THREAD_CS_EXIT(VCI, pool->lock); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_GET_BUF); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_BUF); + return buf; + } + +-static inline void MPIDI_CH4R_release_buf_safe(void *buf) ++static inline void MPIDIU_release_buf_safe(void *buf) + { +- MPIU_buf_t *curr_buf; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_RELEASE_BUF_SAFE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_RELEASE_BUF_SAFE); ++ MPIDIU_buf_t *curr_buf; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_RELEASE_BUF_SAFE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_RELEASE_BUF_SAFE); + +- curr_buf = MPL_container_of(buf, MPIU_buf_t, data); ++ curr_buf = MPL_container_of(buf, MPIDIU_buf_t, data); + curr_buf->next = curr_buf->pool->head; + curr_buf->pool->head = curr_buf; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_RELEASE_BUF_SAFE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_RELEASE_BUF_SAFE); + } + +-static inline void MPIDI_CH4R_release_buf(void *buf) ++static inline void MPIDIU_release_buf(void *buf) + { +- MPIU_buf_t *curr_buf; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_RELEASE_BUF); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_RELEASE_BUF); ++ MPIDIU_buf_t *curr_buf; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_RELEASE_BUF); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_RELEASE_BUF); + +- curr_buf = MPL_container_of(buf, MPIU_buf_t, data); +- MPID_THREAD_CS_ENTER(POBJ, &curr_buf->pool->lock); +- MPID_THREAD_CS_ENTER(VNI, curr_buf->pool->lock); ++ curr_buf = MPL_container_of(buf, MPIDIU_buf_t, data); ++ MPID_THREAD_CS_ENTER(VCI, curr_buf->pool->lock); + curr_buf->next = curr_buf->pool->head; + curr_buf->pool->head = curr_buf; +- MPID_THREAD_CS_EXIT(VNI, curr_buf->pool->lock); +- MPID_THREAD_CS_EXIT(POBJ, &curr_buf->pool->lock); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_RELEASE_BUF); +-} +- +- +-static inline void MPIDI_CH4R_destroy_buf_pool(MPIU_buf_pool_t * pool) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_DESTROY_BUF_POOL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_DESTROY_BUF_POOL); +- +- if (pool->next) +- MPIDI_CH4R_destroy_buf_pool(pool->next); +- +- MPID_Thread_mutex_destroy(&pool->lock, &ret); +- MPL_free(pool->memory_region); +- MPL_free(pool); ++ MPID_THREAD_CS_EXIT(VCI, curr_buf->pool->lock); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_DESTROY_BUF_POOL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_RELEASE_BUF); + } + + #endif /* CH4R_BUF_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_callbacks.c +@@ -0,0 +1,764 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "mpidch4r.h" ++#include "ch4r_callbacks.h" ++ ++static int handle_unexp_cmpl(MPIR_Request * rreq); ++static int do_send_target(void **data, size_t * p_data_sz, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request * rreq); ++static int recv_target_cmpl_cb(MPIR_Request * rreq); ++ ++/* Checks to make sure that the specified request is the next one expected to finish. If it isn't ++ * supposed to finish next, it is appended to a list of requests to be retrieved later. */ ++int MPIDIG_check_cmpl_order(MPIR_Request * req, MPIDIG_am_target_cmpl_cb target_cmpl_cb) ++{ ++ int ret = 0; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CHECK_CMPL_ORDER); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CHECK_CMPL_ORDER); ++ ++ if (MPIDIG_REQUEST(req, req->seq_no) == (uint64_t) OPA_load_int(&MPIDI_global.exp_seq_no)) { ++ OPA_incr_int(&MPIDI_global.exp_seq_no); ++ ret = 1; ++ goto fn_exit; ++ } ++ ++ MPIDIG_REQUEST(req, req->target_cmpl_cb) = (void *) target_cmpl_cb; ++ MPIDIG_REQUEST(req, req->request) = (uint64_t) req; ++ /* MPIDI_CS_ENTER(); */ ++ DL_APPEND(MPIDI_global.cmpl_list, req->dev.ch4.am.req); ++ /* MPIDI_CS_EXIT(); */ ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CHECK_CMPL_ORDER); ++ return ret; ++} ++ ++void MPIDIG_progress_compl_list(void) ++{ ++ MPIR_Request *req; ++ MPIDIG_req_ext_t *curr, *tmp; ++ MPIDIG_am_target_cmpl_cb target_cmpl_cb; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PROGRESS_CMPL_LIST); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PROGRESS_CMPL_LIST); ++ ++ /* MPIDI_CS_ENTER(); */ ++ do_check_again: ++ DL_FOREACH_SAFE(MPIDI_global.cmpl_list, curr, tmp) { ++ if (curr->seq_no == (uint64_t) OPA_load_int(&MPIDI_global.exp_seq_no)) { ++ DL_DELETE(MPIDI_global.cmpl_list, curr); ++ req = (MPIR_Request *) curr->request; ++ target_cmpl_cb = (MPIDIG_am_target_cmpl_cb) curr->target_cmpl_cb; ++ target_cmpl_cb(req); ++ goto do_check_again; ++ } ++ } ++ /* MPIDI_CS_EXIT(); */ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PROGRESS_CMPL_LIST); ++} ++ ++static int handle_unexp_cmpl(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS, in_use; ++ MPIR_Comm *root_comm; ++ MPIR_Request *match_req = NULL; ++ size_t nbytes; ++ int dt_contig; ++ MPI_Aint dt_true_lb; ++ MPIR_Datatype *dt_ptr; ++ size_t dt_sz; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIR_Request *anysource_partner = NULL; ++#endif ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_HANDLE_UNEXP_CMPL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_HANDLE_UNEXP_CMPL); ++ ++ /* Check if this message has already been claimed by a probe. */ ++ /* MPIDI_CS_ENTER(); */ ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_UNEXP_DQUED) { ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_UNEXP_CLAIMED) { ++ MPIDIG_handle_unexp_mrecv(rreq); ++ } ++ /* MPIDI_CS_EXIT(); */ ++ goto fn_exit; ++ } ++ /* MPIDI_CS_EXIT(); */ ++ ++ root_comm = MPIDIG_context_id_to_comm(MPIDIG_REQUEST(rreq, context_id)); ++ ++ /* If this request was previously matched, but not handled */ ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_MATCHED) { ++ match_req = (MPIR_Request *) MPIDIG_REQUEST(rreq, req->rreq.match_req); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (unlikely(match_req && MPIDI_REQUEST_ANYSOURCE_PARTNER(match_req))) { ++ anysource_partner = MPIDI_REQUEST_ANYSOURCE_PARTNER(match_req); ++ if (!MPIR_STATUS_GET_CANCEL_BIT(anysource_partner->status)) { ++ mpi_errno = MPID_Cancel_recv(anysource_partner); ++ if (mpi_errno != MPI_SUCCESS) { ++ goto fn_fail; ++ } ++ /* What should we do if the anysource partner request is not canceled? */ ++ MPIR_Assertp(MPIR_STATUS_GET_CANCEL_BIT(anysource_partner->status)); ++ } ++ MPIR_Request_free(MPIDI_REQUEST_ANYSOURCE_PARTNER(match_req)); ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(match_req) = NULL; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(anysource_partner) = NULL; ++ } ++#endif /* MPIDI_CH4_DIRECT_NETMOD */ ++ ++ } else { ++ /* If this message hasn't been matched yet, look for it in the posted queue. */ ++ /* MPIDI_CS_ENTER(); */ ++ if (root_comm) { ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ match_req = ++ MPIDIG_dequeue_posted(MPIDIG_REQUEST(rreq, rank), ++ MPIDIG_REQUEST(rreq, tag), ++ MPIDIG_REQUEST(rreq, context_id), ++ &MPIDIG_COMM(root_comm, posted_list)); ++#else /* MPIDI_CH4_DIRECT_NETMOD */ ++ int continue_matching = 1; ++ while (continue_matching) { ++ match_req = ++ MPIDIG_dequeue_posted(MPIDIG_REQUEST(rreq, rank), ++ MPIDIG_REQUEST(rreq, tag), ++ MPIDIG_REQUEST(rreq, context_id), ++ &MPIDIG_COMM(root_comm, posted_list)); ++ ++ if (match_req && MPIDI_REQUEST_ANYSOURCE_PARTNER(match_req)) { ++ anysource_partner = MPIDI_REQUEST_ANYSOURCE_PARTNER(match_req); ++ ++ mpi_errno = MPIDI_anysource_matched(anysource_partner, ++ MPIDI_REQUEST(rreq, is_local) ? ++ MPIDI_SHM : MPIDI_NETMOD, ++ &continue_matching); ++ ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_Request_free(MPIDI_REQUEST_ANYSOURCE_PARTNER(match_req)); ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(match_req) = NULL; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(anysource_partner) = NULL; ++ } ++ ++ break; ++ } ++#endif /* MPIDI_CH4_DIRECT_NETMOD */ ++ } ++ ++ /* If we found a matching request, remove it from the unexpected queue and clean things up ++ * before we move the data around. */ ++ if (match_req) { ++ MPIDIG_delete_unexp(rreq, &MPIDIG_COMM(root_comm, unexp_list)); ++ /* Decrement the counter twice, one for posted_list and the other for unexp_list */ ++ MPIR_Comm_release(root_comm); ++ MPIR_Comm_release(root_comm); ++ } ++ /* MPIDI_CS_EXIT(); */ ++ } ++ ++ /* If we didn't match the request, unmark the busy bit and skip the data movement below. */ ++ if (!match_req) { ++ MPIDIG_REQUEST(rreq, req->status) &= ~MPIDIG_REQ_BUSY; ++ goto fn_exit; ++ } ++ ++ match_req->status.MPI_SOURCE = MPIDIG_REQUEST(rreq, rank); ++ match_req->status.MPI_TAG = MPIDIG_REQUEST(rreq, tag); ++ ++ /* Figure out how much data needs to be moved. */ ++ MPIDI_Datatype_get_info(MPIDIG_REQUEST(match_req, count), ++ MPIDIG_REQUEST(match_req, datatype), ++ dt_contig, dt_sz, dt_ptr, dt_true_lb); ++ MPIR_Datatype_get_size_macro(MPIDIG_REQUEST(match_req, datatype), dt_sz); ++ ++ /* Make sure this request has the right amount of data in it. */ ++ if (MPIDIG_REQUEST(rreq, count) > dt_sz * MPIDIG_REQUEST(match_req, count)) { ++ rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; ++ nbytes = dt_sz * MPIDIG_REQUEST(match_req, count); ++ } else { ++ rreq->status.MPI_ERROR = MPI_SUCCESS; ++ nbytes = MPIDIG_REQUEST(rreq, count); /* incoming message is always count of bytes. */ ++ } ++ ++ MPIR_STATUS_SET_COUNT(match_req->status, nbytes); ++ MPIDIG_REQUEST(rreq, count) = dt_sz > 0 ? nbytes / dt_sz : 0; ++ ++ /* Perform the data copy (using the datatype engine if necessary for non-contig transfers) */ ++ if (!dt_contig) { ++ MPI_Aint actual_unpack_bytes; ++ mpi_errno = MPIR_Typerep_unpack(MPIDIG_REQUEST(rreq, buffer), nbytes, ++ MPIDIG_REQUEST(match_req, buffer), ++ MPIDIG_REQUEST(match_req, count), ++ MPIDIG_REQUEST(match_req, datatype), 0, ++ &actual_unpack_bytes); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (actual_unpack_bytes != (MPI_Aint) nbytes) { ++ mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, ++ __FUNCTION__, __LINE__, ++ MPI_ERR_TYPE, "**dtypemismatch", 0); ++ match_req->status.MPI_ERROR = mpi_errno; ++ } ++ } else { ++ MPIR_Memcpy((char *) MPIDIG_REQUEST(match_req, buffer) + dt_true_lb, ++ MPIDIG_REQUEST(rreq, buffer), nbytes); ++ } ++ ++ /* Now that the unexpected message has been completed, unset the status bit. */ ++ MPIDIG_REQUEST(rreq, req->status) &= ~MPIDIG_REQ_UNEXPECTED; ++ ++ /* If this is a synchronous send, send the reply back to the sender to unlock them. */ ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_PEER_SSEND) { ++ mpi_errno = MPIDIG_reply_ssend(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (unlikely(anysource_partner)) { ++ anysource_partner->status = match_req->status; ++ } ++#endif /* MPIDI_CH4_DIRECT_NETMOD */ ++ ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(match_req, datatype)); ++ MPL_free(MPIDIG_REQUEST(rreq, buffer)); ++ MPIR_Object_release_ref(rreq, &in_use); ++ MPID_Request_complete(rreq); ++ MPID_Request_complete(match_req); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_HANDLE_UNEXP_CMPL); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++static int do_send_target(void **data, size_t * p_data_sz, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request * rreq) ++{ ++ int dt_contig; ++ MPI_Aint dt_true_lb, num_iov; ++ MPIR_Datatype *dt_ptr; ++ size_t data_sz; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DO_SEND_TARGET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DO_SEND_TARGET); ++ ++ *target_cmpl_cb = recv_target_cmpl_cb; ++ MPIDIG_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_global.nxt_seq_no, 1); ++ ++ if (p_data_sz == NULL || 0 == MPIDIG_REQUEST(rreq, count)) ++ return MPI_SUCCESS; ++ ++ MPIDI_Datatype_get_info(MPIDIG_REQUEST(rreq, count), MPIDIG_REQUEST(rreq, datatype), dt_contig, ++ data_sz, dt_ptr, dt_true_lb); ++ *is_contig = dt_contig; ++ ++ if (dt_contig) { ++ *p_data_sz = data_sz; ++ *data = (char *) MPIDIG_REQUEST(rreq, buffer) + dt_true_lb; ++ } else { ++ if (*p_data_sz > data_sz) { ++ rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; ++ *p_data_sz = data_sz; ++ } ++ ++ MPIR_Typerep_iov_len(MPIDIG_REQUEST(rreq, buffer), MPIDIG_REQUEST(rreq, count), ++ MPIDIG_REQUEST(rreq, datatype), 0, data_sz, &num_iov); ++ ++ MPIR_Assert(num_iov > 0); ++ MPIDIG_REQUEST(rreq, req->iov) = ++ (struct iovec *) MPL_malloc(num_iov * sizeof(struct iovec), MPL_MEM_BUFFER); ++ MPIR_Assert(MPIDIG_REQUEST(rreq, req->iov)); ++ ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(MPIDIG_REQUEST(rreq, buffer), MPIDIG_REQUEST(rreq, count), ++ MPIDIG_REQUEST(rreq, datatype), 0, MPIDIG_REQUEST(rreq, req->iov), ++ (int) num_iov, *p_data_sz, &actual_iov_len, &actual_iov_bytes); ++ ++ if (actual_iov_bytes != (MPI_Aint) * p_data_sz) { ++ rreq->status.MPI_ERROR = MPI_ERR_TYPE; ++ } ++ *data = MPIDIG_REQUEST(rreq, req->iov); ++ *p_data_sz = actual_iov_len; ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_RCV_NON_CONTIG; ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DO_SEND_TARGET); ++ return MPI_SUCCESS; ++} ++ ++/* This function is called when a receive has completed on the receiver side. The input is the ++ * request that has been completed. */ ++static int recv_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_RECV_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_RECV_TARGET_CMPL_CB); ++ ++ /* Check if this request is supposed to complete next or if it should be delayed. */ ++ if (!MPIDIG_check_cmpl_order(rreq, recv_target_cmpl_cb)) ++ return mpi_errno; ++ ++ /* If the request contained noncontiguous data, free the iov array that described it. */ ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_RCV_NON_CONTIG) { ++ MPL_free(MPIDIG_REQUEST(rreq, req->iov)); ++ } ++ ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_UNEXPECTED) { ++ mpi_errno = handle_unexp_cmpl(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ } ++ ++ rreq->status.MPI_SOURCE = MPIDIG_REQUEST(rreq, rank); ++ rreq->status.MPI_TAG = MPIDIG_REQUEST(rreq, tag); ++ ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_PEER_SSEND) { ++ mpi_errno = MPIDIG_reply_ssend(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq)) { ++ int continue_matching = 1; ++ if (MPIDI_REQUEST(rreq, is_local)) { ++ MPIDI_anysource_matched(MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq), MPIDI_SHM, ++ &continue_matching); ++ } else { ++ MPIDI_anysource_matched(MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq), ++ MPIDI_NETMOD, &continue_matching); ++ } ++ ++ MPIR_Request_free(MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq)); ++ if (unlikely(MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq))) { ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq)) = NULL; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq) = NULL; ++ } ++ } ++#endif ++ ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(rreq, datatype)); ++ MPID_Request_complete(rreq); ++ fn_exit: ++ MPIDIG_progress_compl_list(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_RECV_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_send_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SEND_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SEND_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SEND_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_send_long_lmt_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SEND_LONG_LMT_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SEND_LONG_LMT_ORIGIN_CB); ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(sreq, req->lreq).datatype); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SEND_LONG_LMT_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_ssend_ack_origin_cb(MPIR_Request * req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SSEND_ACK_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SSEND_ACK_ORIGIN_CB); ++ MPID_Request_complete(req); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SSEND_ACK_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++ ++int MPIDIG_send_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq = NULL; ++ MPIR_Comm *root_comm; ++ MPIDIG_hdr_t *hdr = (MPIDIG_hdr_t *) am_hdr; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIR_Request *anysource_partner = NULL; ++#endif ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SEND_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SEND_TARGET_MSG_CB); ++ root_comm = MPIDIG_context_id_to_comm(hdr->context_id); ++ if (root_comm) { ++ /* MPIDI_CS_ENTER(); */ ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ rreq = MPIDIG_dequeue_posted(hdr->src_rank, hdr->tag, hdr->context_id, ++ &MPIDIG_COMM(root_comm, posted_list)); ++#else /* MPIDI_CH4_DIRECT_NETMOD */ ++ while (TRUE) { ++ rreq = MPIDIG_dequeue_posted(hdr->src_rank, hdr->tag, hdr->context_id, ++ &MPIDIG_COMM(root_comm, posted_list)); ++ ++ if (rreq && MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq)) { ++ anysource_partner = MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq); ++ if (!MPIR_STATUS_GET_CANCEL_BIT(anysource_partner->status)) { ++ mpi_errno = MPID_Cancel_recv(anysource_partner); ++ if (mpi_errno != MPI_SUCCESS) { ++ goto fn_fail; ++ } ++ if (!MPIR_STATUS_GET_CANCEL_BIT(anysource_partner->status)) { ++ anysource_partner = NULL; ++ MPIR_Comm_release(root_comm); /* -1 for posted_list */ ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(rreq, datatype)); ++ continue; ++ } ++ } ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq) = NULL; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(anysource_partner) = NULL; ++ ++ MPIR_Request_free(anysource_partner); ++ } ++ ++ break; ++ } ++#endif /* MPIDI_CH4_DIRECT_NETMOD */ ++ /* MPIDI_CS_EXIT(); */ ++ } ++ ++ if (rreq == NULL) { ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RECV, 2); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ MPIDIG_REQUEST(rreq, datatype) = MPI_BYTE; ++ if (p_data_sz) { ++ MPIDIG_REQUEST(rreq, buffer) = (char *) MPL_malloc(*p_data_sz, MPL_MEM_BUFFER); ++ MPIDIG_REQUEST(rreq, count) = *p_data_sz; ++ } else { ++ MPIDIG_REQUEST(rreq, buffer) = NULL; ++ MPIDIG_REQUEST(rreq, count) = 0; ++ } ++ MPIDIG_REQUEST(rreq, rank) = hdr->src_rank; ++ MPIDIG_REQUEST(rreq, tag) = hdr->tag; ++ MPIDIG_REQUEST(rreq, context_id) = hdr->context_id; ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_BUSY; ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_UNEXPECTED; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(rreq, is_local) = is_local; ++#endif ++ /* MPIDI_CS_ENTER(); */ ++ if (root_comm) { ++ MPIR_Comm_add_ref(root_comm); ++ MPIDIG_enqueue_unexp(rreq, &MPIDIG_COMM(root_comm, unexp_list)); ++ } else { ++ MPIDIG_enqueue_unexp(rreq, MPIDIG_context_id_to_uelist(hdr->context_id)); ++ } ++ /* MPIDI_CS_EXIT(); */ ++ } else { ++ /* rreq != NULL <=> root_comm != NULL */ ++ MPIR_Assert(root_comm); ++ /* Decrement the refcnt when popping a request out from posted_list */ ++ MPIR_Comm_release(root_comm); ++ MPIDIG_REQUEST(rreq, rank) = hdr->src_rank; ++ MPIDIG_REQUEST(rreq, tag) = hdr->tag; ++ MPIDIG_REQUEST(rreq, context_id) = hdr->context_id; ++ } ++ ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_IN_PROGRESS; ++ ++ *req = rreq; ++ ++ mpi_errno = do_send_target(data, p_data_sz, is_contig, target_cmpl_cb, rreq); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (unlikely(anysource_partner)) { ++ anysource_partner->status = rreq->status; ++ } ++#endif /* MPIDI_CH4_DIRECT_NETMOD */ ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SEND_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_send_long_req_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq = NULL; ++ MPIR_Comm *root_comm; ++ MPIDIG_hdr_t *hdr = (MPIDIG_hdr_t *) am_hdr; ++ MPIDIG_send_long_req_mst_t *lreq_hdr = (MPIDIG_send_long_req_mst_t *) am_hdr; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIR_Request *anysource_partner = NULL; ++#endif ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SEND_LONG_REQ_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SEND_LONG_REQ_TARGET_MSG_CB); ++ ++ root_comm = MPIDIG_context_id_to_comm(hdr->context_id); ++ if (root_comm) { ++ /* MPIDI_CS_ENTER(); */ ++#ifdef MPIDI_CH4_DIRECT_NETMOD ++ rreq = MPIDIG_dequeue_posted(hdr->src_rank, hdr->tag, hdr->context_id, ++ &MPIDIG_COMM(root_comm, posted_list)); ++#else /* MPIDI_CH4_DIRECT_NETMOD */ ++ int continue_matching = 1; ++ while (continue_matching) { ++ rreq = MPIDIG_dequeue_posted(hdr->src_rank, hdr->tag, hdr->context_id, ++ &MPIDIG_COMM(root_comm, posted_list)); ++ ++ if (rreq && MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq)) { ++ anysource_partner = MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq); ++ ++ mpi_errno = MPIDI_anysource_matched(anysource_partner, ++ MPIDI_REQUEST(rreq, is_local) ? ++ MPIDI_SHM : MPIDI_NETMOD, &continue_matching); ++ ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq) = NULL; ++ MPIDI_REQUEST_ANYSOURCE_PARTNER(anysource_partner) = NULL; ++ } ++ ++ break; ++ } ++#endif /* MPIDI_CH4_DIRECT_NETMOD */ ++ /* MPIDI_CS_EXIT(); */ ++ } ++ ++ if (rreq == NULL) { ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RECV, 2); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ ++ MPIDIG_REQUEST(rreq, buffer) = NULL; ++ MPIDIG_REQUEST(rreq, datatype) = MPI_BYTE; ++ MPIDIG_REQUEST(rreq, count) = lreq_hdr->data_sz; ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_LONG_RTS; ++ MPIDIG_REQUEST(rreq, req->rreq.peer_req_ptr) = lreq_hdr->sreq_ptr; ++ MPIDIG_REQUEST(rreq, rank) = hdr->src_rank; ++ MPIDIG_REQUEST(rreq, tag) = hdr->tag; ++ MPIDIG_REQUEST(rreq, context_id) = hdr->context_id; ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_IN_PROGRESS; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(rreq, is_local) = is_local; ++#endif ++ ++ /* MPIDI_CS_ENTER(); */ ++ if (root_comm) { ++ MPIR_Comm_add_ref(root_comm); ++ MPIDIG_enqueue_unexp(rreq, &MPIDIG_COMM(root_comm, unexp_list)); ++ } else { ++ MPIDIG_enqueue_unexp(rreq, ++ MPIDIG_context_id_to_uelist(MPIDIG_REQUEST(rreq, context_id))); ++ } ++ /* MPIDI_CS_EXIT(); */ ++ } else { ++ /* Matching receive was posted, tell the netmod */ ++ MPIR_Comm_release(root_comm); /* -1 for posted_list */ ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_LONG_RTS; ++ MPIDIG_REQUEST(rreq, req->rreq.peer_req_ptr) = lreq_hdr->sreq_ptr; ++ MPIDIG_REQUEST(rreq, rank) = hdr->src_rank; ++ MPIDIG_REQUEST(rreq, tag) = hdr->tag; ++ MPIDIG_REQUEST(rreq, context_id) = hdr->context_id; ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_IN_PROGRESS; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(rreq, is_local)) ++ mpi_errno = MPIDI_SHM_am_recv(rreq); ++ else ++#endif ++ { ++ mpi_errno = MPIDI_NM_am_recv(rreq); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (unlikely(anysource_partner)) { ++ anysource_partner->status = rreq->status; ++ } ++#endif /* MPIDI_CH4_DIRECT_NETMOD */ ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SEND_LONG_REQ_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_send_long_lmt_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req) ++{ ++ int mpi_errno; ++ MPIR_Request *rreq; ++ MPIDIG_send_long_lmt_msg_t *lmt_hdr = (MPIDIG_send_long_lmt_msg_t *) am_hdr; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SEND_LONG_LMT_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SEND_LONG_LMT_TARGET_MSG_CB); ++ ++ rreq = (MPIR_Request *) lmt_hdr->rreq_ptr; ++ MPIR_Assert(rreq); ++ mpi_errno = do_send_target(data, p_data_sz, is_contig, target_cmpl_cb, rreq); ++ *req = rreq; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SEND_LONG_LMT_TARGET_MSG_CB); ++ ++ return mpi_errno; ++} ++ ++int MPIDIG_ssend_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIDIG_ssend_req_msg_t *msg_hdr = (MPIDIG_ssend_req_msg_t *) am_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SSEND_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SSEND_TARGET_MSG_CB); ++ ++ mpi_errno = ++ MPIDIG_send_target_msg_cb(handler_id, am_hdr, data, p_data_sz, is_local, is_contig, ++ target_cmpl_cb, req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIR_Assert(req); ++ MPIDIG_REQUEST(*req, req->rreq.peer_req_ptr) = msg_hdr->sreq_ptr; ++ MPIDIG_REQUEST(*req, req->status) |= MPIDIG_REQ_PEER_SSEND; ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SSEND_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_ssend_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *sreq; ++ MPIDIG_ssend_ack_msg_t *msg_hdr = (MPIDIG_ssend_ack_msg_t *) am_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SSEND_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SSEND_ACK_TARGET_MSG_CB); ++ ++ sreq = (MPIR_Request *) msg_hdr->sreq_ptr; ++ MPID_Request_complete(sreq); ++ ++ if (req) ++ *req = NULL; ++ if (target_cmpl_cb) ++ *target_cmpl_cb = NULL; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SSEND_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_send_long_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *sreq; ++ MPIDIG_send_long_ack_msg_t *msg_hdr = (MPIDIG_send_long_ack_msg_t *) am_hdr; ++ MPIDIG_send_long_lmt_msg_t send_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_SEND_LONG_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_SEND_LONG_ACK_TARGET_MSG_CB); ++ ++ sreq = (MPIR_Request *) msg_hdr->sreq_ptr; ++ MPIR_Assert(sreq != NULL); ++ ++ /* Start the main data transfer */ ++ send_hdr.rreq_ptr = msg_hdr->rreq_ptr; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(sreq, is_local)) ++ mpi_errno = ++ MPIDI_SHM_am_isend_reply(MPIDIG_REQUEST(sreq, req->lreq).context_id, ++ MPIDIG_REQUEST(sreq, rank), MPIDIG_SEND_LONG_LMT, ++ &send_hdr, sizeof(send_hdr), ++ MPIDIG_REQUEST(sreq, req->lreq).src_buf, ++ MPIDIG_REQUEST(sreq, req->lreq).count, ++ MPIDIG_REQUEST(sreq, req->lreq).datatype, sreq); ++ else ++#endif ++ { ++ mpi_errno = ++ MPIDI_NM_am_isend_reply(MPIDIG_REQUEST(sreq, req->lreq).context_id, ++ MPIDIG_REQUEST(sreq, rank), MPIDIG_SEND_LONG_LMT, ++ &send_hdr, sizeof(send_hdr), ++ MPIDIG_REQUEST(sreq, req->lreq).src_buf, ++ MPIDIG_REQUEST(sreq, req->lreq).count, ++ MPIDIG_REQUEST(sreq, req->lreq).datatype, sreq); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (target_cmpl_cb) ++ *target_cmpl_cb = MPIDIG_send_origin_cb; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_SEND_LONG_ACK_TARGET_MSG_CB); ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_comm_abort_origin_cb(MPIR_Request * sreq) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_COMM_ABORT_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_COMM_ABORT_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_COMM_ABORT_ORIGIN_CB); ++ return MPI_SUCCESS; ++} ++ ++int MPIDIG_comm_abort_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ MPIDIG_hdr_t *hdr = (MPIDIG_hdr_t *) am_hdr; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_COMM_ABORT_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_COMM_ABORT_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_COMM_ABORT_TARGET_MSG_CB); ++ MPL_exit(hdr->tag); ++ return MPI_SUCCESS; ++} +--- a/src/mpid/ch4/src/ch4r_callbacks.h ++++ b/src/mpid/ch4/src/ch4r_callbacks.h +@@ -17,681 +17,36 @@ + * packet receiving side are named with "_target_msg_cb". */ + + #include "mpidig.h" +-#include "ch4r_request.h" +-#include "ch4r_recv.h" + +-static inline int MPIDI_recv_target_cmpl_cb(MPIR_Request * rreq); +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_check_cmpl_order +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_check_cmpl_order(MPIR_Request * req, +- MPIDIG_am_target_cmpl_cb target_cmpl_cb) +-{ +- int ret = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CHECK_CMPL_ORDER); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CHECK_CMPL_ORDER); +- +- if (MPIDI_CH4U_REQUEST(req, req->seq_no) == +- (uint64_t) OPA_load_int(&MPIDI_CH4_Global.exp_seq_no)) { +- OPA_incr_int(&MPIDI_CH4_Global.exp_seq_no); +- ret = 1; +- goto fn_exit; +- } +- +- MPIDI_CH4U_REQUEST(req, req->target_cmpl_cb) = (void *) target_cmpl_cb; +- MPIDI_CH4U_REQUEST(req, req->request) = (uint64_t) req; +- /* MPIDI_CS_ENTER(); */ +- DL_APPEND(MPIDI_CH4_Global.cmpl_list, req->dev.ch4.am.req); +- /* MPIDI_CS_EXIT(); */ +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CHECK_CMPL_ORDER); +- return ret; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_progress_cmpl_list +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_progress_cmpl_list(void) +-{ +- MPIR_Request *req; +- MPIDI_CH4U_req_ext_t *curr, *tmp; +- MPIDIG_am_target_cmpl_cb target_cmpl_cb; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PROGRESS_CMPL_LIST); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PROGRESS_CMPL_LIST); +- +- /* MPIDI_CS_ENTER(); */ +- do_check_again: +- DL_FOREACH_SAFE(MPIDI_CH4_Global.cmpl_list, curr, tmp) { +- if (curr->seq_no == (uint64_t) OPA_load_int(&MPIDI_CH4_Global.exp_seq_no)) { +- DL_DELETE(MPIDI_CH4_Global.cmpl_list, curr); +- req = (MPIR_Request *) curr->request; +- target_cmpl_cb = (MPIDIG_am_target_cmpl_cb) curr->target_cmpl_cb; +- target_cmpl_cb(req); +- goto do_check_again; +- } +- } +- /* MPIDI_CS_EXIT(); */ +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PROGRESS_CMPL_LIST); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_handle_unexp_cmpl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_handle_unexp_cmpl(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS, in_use; +- MPIR_Comm *root_comm; +- MPIR_Request *match_req = NULL; +- size_t count; +- MPI_Aint last; +- int dt_contig; +- MPI_Aint dt_true_lb; +- MPIR_Datatype *dt_ptr; +- size_t dt_sz; +- MPIR_Segment *segment_ptr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_HANDLE_UNEXP_CMPL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_HANDLE_UNEXP_CMPL); +- +- /* MPIDI_CS_ENTER(); */ +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_UNEXP_DQUED) { +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_UNEXP_CLAIMED) { +- MPIDI_handle_unexp_mrecv(rreq); +- } +- /* MPIDI_CS_EXIT(); */ +- goto fn_exit; +- } +- /* MPIDI_CS_EXIT(); */ +- +- root_comm = MPIDI_CH4U_context_id_to_comm(MPIDI_CH4U_REQUEST(rreq, context_id)); +- +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_MATCHED) { +- match_req = (MPIR_Request *) MPIDI_CH4U_REQUEST(rreq, req->rreq.match_req); +- } else { +- /* MPIDI_CS_ENTER(); */ +- if (root_comm) +- match_req = +- MPIDI_CH4U_dequeue_posted(MPIDI_CH4U_REQUEST(rreq, rank), +- MPIDI_CH4U_REQUEST(rreq, tag), +- MPIDI_CH4U_REQUEST(rreq, context_id), +- &MPIDI_CH4U_COMM(root_comm, posted_list)); +- +- if (match_req) { +- MPIDI_CH4U_delete_unexp(rreq, &MPIDI_CH4U_COMM(root_comm, unexp_list)); +- /* Decrement the counter twice, one for posted_list and the other for unexp_list */ +- MPIR_Comm_release(root_comm); +- MPIR_Comm_release(root_comm); +- } +- /* MPIDI_CS_EXIT(); */ +- } +- +- if (!match_req) { +- MPIDI_CH4U_REQUEST(rreq, req->status) &= ~MPIDI_CH4U_REQ_BUSY; +- goto fn_exit; +- } +- +- match_req->status.MPI_SOURCE = MPIDI_CH4U_REQUEST(rreq, rank); +- match_req->status.MPI_TAG = MPIDI_CH4U_REQUEST(rreq, tag); +- +- MPIDI_Datatype_get_info(MPIDI_CH4U_REQUEST(match_req, count), +- MPIDI_CH4U_REQUEST(match_req, datatype), +- dt_contig, dt_sz, dt_ptr, dt_true_lb); +- MPIR_Datatype_get_size_macro(MPIDI_CH4U_REQUEST(match_req, datatype), dt_sz); +- MPIR_ERR_CHKANDJUMP(dt_sz == 0, mpi_errno, MPI_ERR_OTHER, "**dtype"); +- +- if (MPIDI_CH4U_REQUEST(rreq, count) > dt_sz * MPIDI_CH4U_REQUEST(match_req, count)) { +- rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; +- count = MPIDI_CH4U_REQUEST(match_req, count); +- } else { +- rreq->status.MPI_ERROR = MPI_SUCCESS; +- count = MPIDI_CH4U_REQUEST(rreq, count) / dt_sz; +- } +- +- MPIR_STATUS_SET_COUNT(match_req->status, count * dt_sz); +- MPIDI_CH4U_REQUEST(rreq, count) = count; +- +- if (!dt_contig) { +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "Recv MPIR_Segment_alloc"); +- MPIR_Segment_init(MPIDI_CH4U_REQUEST(match_req, buffer), count, +- MPIDI_CH4U_REQUEST(match_req, datatype), segment_ptr); +- +- last = count * dt_sz; +- MPIR_Segment_unpack(segment_ptr, 0, &last, MPIDI_CH4U_REQUEST(rreq, buffer)); +- MPIR_Segment_free(segment_ptr); +- if (last != (MPI_Aint) (count * dt_sz)) { +- mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- __FUNCTION__, __LINE__, +- MPI_ERR_TYPE, "**dtypemismatch", 0); +- match_req->status.MPI_ERROR = mpi_errno; +- } +- } else { +- MPIR_Memcpy((char *) MPIDI_CH4U_REQUEST(match_req, buffer) + dt_true_lb, +- MPIDI_CH4U_REQUEST(rreq, buffer), count * dt_sz); +- } +- +- MPIDI_CH4U_REQUEST(rreq, req->status) &= ~MPIDI_CH4U_REQ_UNEXPECTED; +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_PEER_SSEND) { +- mpi_errno = MPIDI_reply_ssend(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- MPIR_Datatype_release_if_not_builtin(MPIDI_CH4U_REQUEST(match_req, datatype)); +- MPL_free(MPIDI_CH4U_REQUEST(rreq, buffer)); +- MPIR_Object_release_ref(rreq, &in_use); +- MPID_Request_complete(rreq); +- MPID_Request_complete(match_req); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_HANDLE_UNEXP_CMPL); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_do_send_target +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_do_send_target(void **data, +- size_t * p_data_sz, +- int *is_contig, ++int MPIDIG_check_cmpl_order(MPIR_Request * req, MPIDIG_am_target_cmpl_cb target_cmpl_cb); ++void MPIDIG_progress_compl_list(void); ++int MPIDIG_send_origin_cb(MPIR_Request * sreq); ++int MPIDIG_send_long_lmt_origin_cb(MPIR_Request * sreq); ++int MPIDIG_ssend_ack_origin_cb(MPIR_Request * req); ++int MPIDIG_send_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_send_long_req_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, + MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request * rreq) +-{ +- int dt_contig, n_iov; +- MPI_Aint dt_true_lb, last, num_iov; +- MPIR_Datatype *dt_ptr; +- MPIR_Segment *segment_ptr; +- size_t data_sz; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DO_SEND_TARGET); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DO_SEND_TARGET); +- +- *target_cmpl_cb = MPIDI_recv_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- if (p_data_sz == NULL) +- return MPI_SUCCESS; +- +- MPIDI_Datatype_get_info(MPIDI_CH4U_REQUEST(rreq, count), +- MPIDI_CH4U_REQUEST(rreq, datatype), +- dt_contig, data_sz, dt_ptr, dt_true_lb); +- *is_contig = dt_contig; +- +- if (dt_contig) { +- *p_data_sz = data_sz; +- *data = (char *) MPIDI_CH4U_REQUEST(rreq, buffer) + dt_true_lb; +- } else { +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Assert(segment_ptr); +- +- MPIR_Segment_init(MPIDI_CH4U_REQUEST(rreq, buffer), +- MPIDI_CH4U_REQUEST(rreq, count), +- MPIDI_CH4U_REQUEST(rreq, datatype), segment_ptr); +- +- if (*p_data_sz > data_sz) { +- rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; +- *p_data_sz = data_sz; +- } +- last = data_sz; +- MPIR_Segment_count_contig_blocks(segment_ptr, 0, &last, &num_iov); +- n_iov = (int) num_iov; +- MPIR_Assert(n_iov > 0); +- MPIDI_CH4U_REQUEST(rreq, req->iov) = +- (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_BUFFER); +- MPIR_Assert(MPIDI_CH4U_REQUEST(rreq, req->iov)); +- +- last = *p_data_sz; +- MPIR_Segment_pack_vector(segment_ptr, 0, &last, MPIDI_CH4U_REQUEST(rreq, req->iov), &n_iov); +- if (last != (MPI_Aint) * p_data_sz) { +- rreq->status.MPI_ERROR = MPI_ERR_TYPE; +- } +- *data = MPIDI_CH4U_REQUEST(rreq, req->iov); +- *p_data_sz = n_iov; +- MPIDI_CH4U_REQUEST(rreq, req->status) |= MPIDI_CH4U_REQ_RCV_NON_CONTIG; +- MPL_free(segment_ptr); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DO_SEND_TARGET); +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_recv_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_recv_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RECV_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RECV_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(rreq, MPIDI_recv_target_cmpl_cb)) +- return mpi_errno; +- +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_RCV_NON_CONTIG) { +- MPL_free(MPIDI_CH4U_REQUEST(rreq, req->iov)); +- } +- +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_UNEXPECTED) { +- mpi_errno = MPIDI_handle_unexp_cmpl(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- goto fn_exit; +- } +- +- rreq->status.MPI_SOURCE = MPIDI_CH4U_REQUEST(rreq, rank); +- rreq->status.MPI_TAG = MPIDI_CH4U_REQUEST(rreq, tag); +- +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_PEER_SSEND) { +- mpi_errno = MPIDI_reply_ssend(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq)) { +- int continue_matching = 1; +- MPIDI_CH4R_anysource_matched(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq), MPIDI_CH4R_NETMOD, +- &continue_matching); +- if (unlikely(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq))) { +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq)) = NULL; +- MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq) = NULL; +- } +- } +-#endif +- +- MPIR_Datatype_release_if_not_builtin(MPIDI_CH4U_REQUEST(rreq, datatype)); +- MPID_Request_complete(rreq); +- fn_exit: +- MPIDI_progress_cmpl_list(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_RECV_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_send_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_send_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SEND_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SEND_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SEND_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_send_long_lmt_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_send_long_lmt_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SEND_LONG_LMT_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SEND_LONG_LMT_ORIGIN_CB); +- MPIR_Datatype_release_if_not_builtin(MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SEND_LONG_LMT_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ssend_ack_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_ssend_ack_origin_cb(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SSEND_ACK_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SSEND_ACK_ORIGIN_CB); +- MPID_Request_complete(req); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SSEND_ACK_ORIGIN_CB); +- return mpi_errno; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_send_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_send_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- MPIR_Comm *root_comm; +- MPIDI_CH4U_hdr_t *hdr = (MPIDI_CH4U_hdr_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SEND_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SEND_TARGET_MSG_CB); +- root_comm = MPIDI_CH4U_context_id_to_comm(hdr->context_id); +- if (root_comm) { +- /* MPIDI_CS_ENTER(); */ +- rreq = MPIDI_CH4U_dequeue_posted(hdr->src_rank, hdr->tag, hdr->context_id, +- &MPIDI_CH4U_COMM(root_comm, posted_list)); +- /* MPIDI_CS_EXIT(); */ +- } +- +- if (rreq == NULL) { +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RECV, 2); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- MPIDI_CH4U_REQUEST(rreq, datatype) = MPI_BYTE; +- if (p_data_sz) { +- MPIDI_CH4U_REQUEST(rreq, buffer) = (char *) MPL_malloc(*p_data_sz, MPL_MEM_BUFFER); +- MPIDI_CH4U_REQUEST(rreq, count) = *p_data_sz; +- } else { +- MPIDI_CH4U_REQUEST(rreq, buffer) = NULL; +- MPIDI_CH4U_REQUEST(rreq, count) = 0; +- } +- MPIDI_CH4U_REQUEST(rreq, rank) = hdr->src_rank; +- MPIDI_CH4U_REQUEST(rreq, tag) = hdr->tag; +- MPIDI_CH4U_REQUEST(rreq, context_id) = hdr->context_id; +- MPIDI_CH4U_REQUEST(rreq, req->status) |= MPIDI_CH4U_REQ_BUSY; +- MPIDI_CH4U_REQUEST(rreq, req->status) |= MPIDI_CH4U_REQ_UNEXPECTED; +- /* MPIDI_CS_ENTER(); */ +- if (root_comm) { +- MPIR_Comm_add_ref(root_comm); +- MPIDI_CH4U_enqueue_unexp(rreq, &MPIDI_CH4U_COMM(root_comm, unexp_list)); +- } else { +- MPIDI_CH4U_enqueue_unexp(rreq, MPIDI_CH4U_context_id_to_uelist(hdr->context_id)); +- } +- /* MPIDI_CS_EXIT(); */ +- } else { +- /* rreq != NULL <=> root_comm != NULL */ +- MPIR_Assert(root_comm); +- /* Decrement the refcnt when popping a request out from posted_list */ +- MPIR_Comm_release(root_comm); +- MPIDI_CH4U_REQUEST(rreq, rank) = hdr->src_rank; +- MPIDI_CH4U_REQUEST(rreq, tag) = hdr->tag; +- MPIDI_CH4U_REQUEST(rreq, context_id) = hdr->context_id; +- } +- +- *req = rreq; +- +- mpi_errno = MPIDI_do_send_target(data, p_data_sz, is_contig, target_cmpl_cb, rreq); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SEND_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_send_long_req_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_send_long_req_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- MPIR_Comm *root_comm; +- MPIDI_CH4U_hdr_t *hdr = (MPIDI_CH4U_hdr_t *) am_hdr; +- MPIDI_CH4U_send_long_req_msg_t *lreq_hdr = (MPIDI_CH4U_send_long_req_msg_t *) am_hdr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SEND_LONG_REQ_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SEND_LONG_REQ_TARGET_MSG_CB); +- +- root_comm = MPIDI_CH4U_context_id_to_comm(hdr->context_id); +- if (root_comm) { +- /* MPIDI_CS_ENTER(); */ +- rreq = MPIDI_CH4U_dequeue_posted(hdr->src_rank, hdr->tag, hdr->context_id, +- &MPIDI_CH4U_COMM(root_comm, posted_list)); +- /* MPIDI_CS_EXIT(); */ +- } +- +- if (rreq == NULL) { +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RECV, 2); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- MPIDI_CH4U_REQUEST(rreq, buffer) = NULL; +- MPIDI_CH4U_REQUEST(rreq, datatype) = MPI_BYTE; +- MPIDI_CH4U_REQUEST(rreq, count) = lreq_hdr->data_sz; +- MPIDI_CH4U_REQUEST(rreq, req->status) |= MPIDI_CH4U_REQ_LONG_RTS; +- MPIDI_CH4U_REQUEST(rreq, req->rreq.peer_req_ptr) = lreq_hdr->sreq_ptr; +- MPIDI_CH4U_REQUEST(rreq, rank) = hdr->src_rank; +- MPIDI_CH4U_REQUEST(rreq, tag) = hdr->tag; +- MPIDI_CH4U_REQUEST(rreq, context_id) = hdr->context_id; +- +- /* MPIDI_CS_ENTER(); */ +- if (root_comm) { +- MPIR_Comm_add_ref(root_comm); +- MPIDI_CH4U_enqueue_unexp(rreq, &MPIDI_CH4U_COMM(root_comm, unexp_list)); +- } else { +- MPIDI_CH4U_enqueue_unexp(rreq, +- MPIDI_CH4U_context_id_to_uelist(MPIDI_CH4U_REQUEST +- (rreq, context_id))); +- } +- /* MPIDI_CS_EXIT(); */ +- } else { +- /* Matching receive was posted, tell the netmod */ +- MPIR_Comm_release(root_comm); /* -1 for posted_list */ +- MPIDI_CH4U_REQUEST(rreq, req->status) |= MPIDI_CH4U_REQ_LONG_RTS; +- MPIDI_CH4U_REQUEST(rreq, req->rreq.peer_req_ptr) = lreq_hdr->sreq_ptr; +- MPIDI_CH4U_REQUEST(rreq, rank) = hdr->src_rank; +- MPIDI_CH4U_REQUEST(rreq, tag) = hdr->tag; +- MPIDI_CH4U_REQUEST(rreq, context_id) = hdr->context_id; +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) +- mpi_errno = MPIDI_SHM_am_recv(rreq); +- else +-#endif +- { +- mpi_errno = MPIDI_NM_am_recv(rreq); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SEND_LONG_REQ_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_send_long_lmt_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_send_long_lmt_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno; +- MPIR_Request *rreq; +- MPIDI_CH4U_send_long_lmt_msg_t *lmt_hdr = (MPIDI_CH4U_send_long_lmt_msg_t *) am_hdr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SEND_LONG_LMT_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SEND_LONG_LMT_TARGET_MSG_CB); +- +- rreq = (MPIR_Request *) lmt_hdr->rreq_ptr; +- MPIR_Assert(rreq); +- mpi_errno = MPIDI_do_send_target(data, p_data_sz, is_contig, target_cmpl_cb, rreq); +- *req = rreq; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SEND_LONG_LMT_TARGET_MSG_CB); +- +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ssend_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_ssend_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIDI_CH4U_ssend_req_msg_t *msg_hdr = (MPIDI_CH4U_ssend_req_msg_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SSEND_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SSEND_TARGET_MSG_CB); +- +- mpi_errno = +- MPIDI_send_target_msg_cb(handler_id, am_hdr, data, p_data_sz, is_contig, target_cmpl_cb, +- req); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIR_Assert(req); +- MPIDI_CH4U_REQUEST(*req, req->rreq.peer_req_ptr) = msg_hdr->sreq_ptr; +- MPIDI_CH4U_REQUEST(*req, req->status) |= MPIDI_CH4U_REQ_PEER_SSEND; +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SSEND_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ssend_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_ssend_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq; +- MPIDI_CH4U_ssend_ack_msg_t *msg_hdr = (MPIDI_CH4U_ssend_ack_msg_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SSEND_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SSEND_ACK_TARGET_MSG_CB); +- +- sreq = (MPIR_Request *) msg_hdr->sreq_ptr; +- MPID_Request_complete(sreq); +- +- if (req) +- *req = NULL; +- if (target_cmpl_cb) +- *target_cmpl_cb = NULL; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SSEND_ACK_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_send_long_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_send_long_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *sreq; +- MPIDI_CH4U_send_long_ack_msg_t *msg_hdr = (MPIDI_CH4U_send_long_ack_msg_t *) am_hdr; +- MPIDI_CH4U_send_long_lmt_msg_t send_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_SEND_LONG_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_SEND_LONG_ACK_TARGET_MSG_CB); +- +- sreq = (MPIR_Request *) msg_hdr->sreq_ptr; +- MPIR_Assert(sreq != NULL); +- +- /* Start the main data transfer */ +- send_hdr.rreq_ptr = msg_hdr->rreq_ptr; +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(sreq, is_local)) +- mpi_errno = +- MPIDI_SHM_am_isend_reply(MPIDI_CH4U_REQUEST(sreq, req->lreq).context_id, +- MPIDI_CH4U_REQUEST(sreq, rank), MPIDI_CH4U_SEND_LONG_LMT, +- &send_hdr, sizeof(send_hdr), +- MPIDI_CH4U_REQUEST(sreq, req->lreq).src_buf, +- MPIDI_CH4U_REQUEST(sreq, req->lreq).count, +- MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype, sreq); +- else +-#endif +- { +- mpi_errno = +- MPIDI_NM_am_isend_reply(MPIDI_CH4U_REQUEST(sreq, req->lreq).context_id, +- MPIDI_CH4U_REQUEST(sreq, rank), MPIDI_CH4U_SEND_LONG_LMT, +- &send_hdr, sizeof(send_hdr), +- MPIDI_CH4U_REQUEST(sreq, req->lreq).src_buf, +- MPIDI_CH4U_REQUEST(sreq, req->lreq).count, +- MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype, sreq); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (target_cmpl_cb) +- *target_cmpl_cb = MPIDI_send_origin_cb; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_SEND_LONG_ACK_TARGET_MSG_CB); +- +- fn_exit: +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_comm_abort_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_comm_abort_origin_cb(MPIR_Request * sreq) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMM_ABORT_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMM_ABORT_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMM_ABORT_ORIGIN_CB); +- return MPI_SUCCESS; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_comm_abort_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_comm_abort_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- MPIDI_CH4U_hdr_t *hdr = (MPIDI_CH4U_hdr_t *) am_hdr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_COMM_ABORT_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_COMM_ABORT_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_COMM_ABORT_TARGET_MSG_CB); +- MPL_exit(hdr->tag); +- return MPI_SUCCESS; +-} ++ MPIR_Request ** req); ++int MPIDIG_send_long_lmt_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req); ++int MPIDIG_ssend_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_ssend_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_send_long_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req); ++int MPIDIG_comm_abort_origin_cb(MPIR_Request * sreq); ++int MPIDIG_comm_abort_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); + + #endif /* CH4R_CALLBACKS_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_comm.c +@@ -0,0 +1,256 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ch4r_comm.h" ++ ++int MPIDIU_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids, int *remote_node_ids) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_UPIDS_TO_LUPIDS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_UPIDS_TO_LUPIDS); ++ ++ mpi_errno = MPIDI_NM_upids_to_lupids(size, remote_upid_size, remote_upids, remote_lupids); ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ /* update node_map */ ++ for (i = 0; i < size; i++) { ++ int _avtid = 0, _lpid = 0; ++ /* if this is a new process, update node_map and locality */ ++ if (MPIDIU_LUPID_IS_NEW_AVT((*remote_lupids)[i])) { ++ MPIDIU_LUPID_CLEAR_NEW_AVT_MARK((*remote_lupids)[i]); ++ _avtid = MPIDIU_LUPID_GET_AVTID((*remote_lupids)[i]); ++ _lpid = MPIDIU_LUPID_GET_LPID((*remote_lupids)[i]); ++ if (_avtid != 0) { ++ /* ++ * new process groups are always assumed to be remote, ++ * so CH4 don't care what node they are on ++ */ ++ MPIDI_global.node_map[_avtid][_lpid] = remote_node_ids[i]; ++ if (remote_node_ids[i] > MPIDI_global.max_node_id) { ++ MPIDI_global.max_node_id = remote_node_ids[i]; ++ } ++#ifdef MPIDI_BUILD_CH4_LOCALITY_INFO ++ MPIDI_av_table[_avtid]->table[_lpid].is_local = 0; ++#endif ++ } ++ } ++ } ++ ++ if (mpi_errno != MPI_SUCCESS) { ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_UPIDS_TO_LUPIDS); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIU_Intercomm_map_bcast_intra(MPIR_Comm * local_comm, int local_leader, int *remote_size, ++ int *is_low_group, int pure_intracomm, ++ size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids, int *remote_node_ids) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i; ++ int upid_recv_size = 0; ++ int map_info[4]; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ size_t *_remote_upid_size = NULL; ++ char *_remote_upids = NULL; ++ int *_remote_node_ids = NULL; ++ ++ MPIR_CHKPMEM_DECL(1); ++ MPIR_CHKLMEM_DECL(3); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_INTERCOMM_MAP_BCAST_INTRA); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_INTERCOMM_MAP_BCAST_INTRA); ++ ++ if (local_comm->rank == local_leader) { ++ if (!pure_intracomm) { ++ for (i = 0; i < (*remote_size); i++) { ++ upid_recv_size += remote_upid_size[i]; ++ } ++ } ++ map_info[0] = *remote_size; ++ map_info[1] = upid_recv_size; ++ map_info[2] = *is_low_group; ++ map_info[3] = pure_intracomm; ++ mpi_errno = MPIR_Bcast_intra_auto(map_info, 4, MPI_INT, local_leader, local_comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (!pure_intracomm) { ++ mpi_errno = MPIR_Bcast_intra_auto(remote_upid_size, *remote_size, MPI_UNSIGNED_LONG, ++ local_leader, local_comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = MPIR_Bcast_intra_auto(remote_upids, upid_recv_size, MPI_BYTE, ++ local_leader, local_comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = ++ MPIR_Bcast_intra_auto(remote_node_ids, (*remote_size) * sizeof(int), MPI_BYTE, ++ local_leader, local_comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ mpi_errno = MPIR_Bcast_intra_auto(*remote_lupids, *remote_size, MPI_INT, ++ local_leader, local_comm, &errflag); ++ } ++ } else { ++ mpi_errno = MPIR_Bcast_intra_auto(map_info, 4, MPI_INT, local_leader, local_comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ *remote_size = map_info[0]; ++ upid_recv_size = map_info[1]; ++ *is_low_group = map_info[2]; ++ pure_intracomm = map_info[3]; ++ ++ MPIR_CHKPMEM_MALLOC((*remote_lupids), int *, (*remote_size) * sizeof(int), ++ mpi_errno, "remote_lupids", MPL_MEM_COMM); ++ if (!pure_intracomm) { ++ MPIR_CHKLMEM_MALLOC(_remote_upid_size, size_t *, (*remote_size) * sizeof(size_t), ++ mpi_errno, "_remote_upid_size", MPL_MEM_COMM); ++ mpi_errno = MPIR_Bcast_intra_auto(_remote_upid_size, *remote_size, MPI_UNSIGNED_LONG, ++ local_leader, local_comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_CHKLMEM_MALLOC(_remote_upids, char *, upid_recv_size * sizeof(char), ++ mpi_errno, "_remote_upids", MPL_MEM_COMM); ++ mpi_errno = MPIR_Bcast_intra_auto(_remote_upids, upid_recv_size, MPI_BYTE, ++ local_leader, local_comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_CHKLMEM_MALLOC(_remote_node_ids, int *, ++ (*remote_size) * sizeof(int), ++ mpi_errno, "_remote_node_ids", MPL_MEM_COMM); ++ mpi_errno = ++ MPIR_Bcast_intra_auto(_remote_node_ids, (*remote_size) * sizeof(int), MPI_BYTE, ++ local_leader, local_comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDIU_upids_to_lupids(*remote_size, _remote_upid_size, _remote_upids, ++ remote_lupids, _remote_node_ids); ++ } else { ++ mpi_errno = MPIR_Bcast_intra_auto(*remote_lupids, *remote_size, MPI_INT, ++ local_leader, local_comm, &errflag); ++ } ++ } ++ ++ MPIR_CHKPMEM_COMMIT(); ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_INTERCOMM_MAP_BCAST_INTRA); ++ return mpi_errno; ++ fn_fail: ++ MPIR_CHKPMEM_REAP(); ++ goto fn_exit; ++} ++ ++int MPIDIU_alloc_lut(MPIDI_rank_map_lut_t ** lut, int size) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_rank_map_lut_t *new_lut = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ALLOC_LUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ALLOC_LUT); ++ ++ new_lut = (MPIDI_rank_map_lut_t *) MPL_malloc(sizeof(MPIDI_rank_map_lut_t) ++ + size * sizeof(MPIDI_lpid_t), MPL_MEM_ADDRESS); ++ if (new_lut == NULL) { ++ *lut = NULL; ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ ++ MPIR_Object_set_ref(new_lut, 1); ++ *lut = new_lut; ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, ++ (MPL_DBG_FDEST, "alloc lut %p, size %lu, refcount=%d", ++ new_lut, size * sizeof(MPIDI_lpid_t), MPIR_Object_get_ref(new_lut))); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ALLOC_LUT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIU_release_lut(MPIDI_rank_map_lut_t * lut) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int in_use = 0; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_RELEASE_LUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_RELEASE_LUT); ++ ++ MPIR_Object_release_ref(lut, &in_use); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, (MPL_DBG_FDEST, "dec ref to lut %p", lut)); ++ if (!in_use) { ++ MPL_free(lut); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, (MPL_DBG_FDEST, "free lut %p", lut)); ++ } ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_RELEASE_LUT); ++ return mpi_errno; ++} ++ ++int MPIDIU_alloc_mlut(MPIDI_rank_map_mlut_t ** mlut, int size) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_rank_map_mlut_t *new_mlut = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_ALLOC_MLUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_ALLOC_MLUT); ++ ++ new_mlut = (MPIDI_rank_map_mlut_t *) MPL_malloc(sizeof(MPIDI_rank_map_mlut_t) ++ + size * sizeof(MPIDI_gpid_t), MPL_MEM_ADDRESS); ++ if (new_mlut == NULL) { ++ *mlut = NULL; ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); ++ } ++ ++ MPIR_Object_set_ref(new_mlut, 1); ++ *mlut = new_mlut; ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, ++ (MPL_DBG_FDEST, "alloc mlut %p, size %lu, refcount=%d", ++ new_mlut, size * sizeof(MPIDI_gpid_t), MPIR_Object_get_ref(new_mlut))); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_ALLOC_MLUT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIU_release_mlut(MPIDI_rank_map_mlut_t * mlut) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int in_use = 0; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_RELEASE_MLUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_RELEASE_MLUT); ++ ++ MPIR_Object_release_ref(mlut, &in_use); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, (MPL_DBG_FDEST, "dec ref to mlut %p", mlut)); ++ if (!in_use) { ++ MPL_free(mlut); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, (MPL_DBG_FDEST, "free mlut %p", mlut)); ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_RELEASE_MLUT); ++ return mpi_errno; ++} +--- a/src/mpid/ch4/src/ch4r_comm.h ++++ b/src/mpid/ch4/src/ch4r_comm.h +@@ -12,280 +12,15 @@ + #ifndef CH4R_COMM_H_INCLUDED + #define CH4R_COMM_H_INCLUDED + +-#include "ch4_types.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_upids_to_lupids +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDIU_upids_to_lupids(int size, +- size_t * remote_upid_size, +- char *remote_upids, +- int **remote_lupids, int *remote_node_ids) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_UPIDS_TO_LUPIDS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_UPIDS_TO_LUPIDS); +- +- mpi_errno = MPIDI_NM_upids_to_lupids(size, remote_upid_size, remote_upids, remote_lupids); +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- /* update node_map */ +- for (i = 0; i < size; i++) { +- int _avtid = 0, _lpid = 0; +- /* if this is a new process, update node_map and locality */ +- if (MPIDIU_LUPID_IS_NEW_AVT((*remote_lupids)[i])) { +- MPIDIU_LUPID_CLEAR_NEW_AVT_MARK((*remote_lupids)[i]); +- _avtid = MPIDIU_LUPID_GET_AVTID((*remote_lupids)[i]); +- _lpid = MPIDIU_LUPID_GET_LPID((*remote_lupids)[i]); +- if (_avtid != 0) { +- /* +- * new process groups are always assumed to be remote, +- * so CH4 don't care what node they are on +- */ +- MPIDI_CH4_Global.node_map[_avtid][_lpid] = remote_node_ids[i]; +- if (remote_node_ids[i] > MPIDI_CH4_Global.max_node_id) { +- MPIDI_CH4_Global.max_node_id = remote_node_ids[i]; +- } +-#ifdef MPIDI_BUILD_CH4_LOCALITY_INFO +- MPIDI_av_table[_avtid]->table[_lpid].is_local = 0; +-#endif +- } +- } +- } +- +- if (mpi_errno != MPI_SUCCESS) { +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_UPIDS_TO_LUPIDS); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_Intercomm_map_bcast_intra +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDIU_Intercomm_map_bcast_intra(MPIR_Comm * local_comm, +- int local_leader, +- int *remote_size, +- int *is_low_group, +- int pure_intracomm, +- size_t * remote_upid_size, +- char *remote_upids, +- int **remote_lupids, +- int *remote_node_ids) +-{ +- int mpi_errno = MPI_SUCCESS; +- int i; +- int upid_recv_size = 0; +- int map_info[4]; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- size_t *_remote_upid_size = NULL; +- char *_remote_upids = NULL; +- int *_remote_node_ids = NULL; +- +- MPIR_CHKPMEM_DECL(1); +- MPIR_CHKLMEM_DECL(3); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_INTERCOMM_MAP_BCAST_INTRA); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_INTERCOMM_MAP_BCAST_INTRA); +- +- if (local_comm->rank == local_leader) { +- if (!pure_intracomm) { +- for (i = 0; i < (*remote_size); i++) { +- upid_recv_size += remote_upid_size[i]; +- } +- } +- map_info[0] = *remote_size; +- map_info[1] = upid_recv_size; +- map_info[2] = *is_low_group; +- map_info[3] = pure_intracomm; +- mpi_errno = MPIR_Bcast_intra_auto(map_info, 4, MPI_INT, local_leader, local_comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (!pure_intracomm) { +- mpi_errno = MPIR_Bcast_intra_auto(remote_upid_size, *remote_size, MPI_UNSIGNED_LONG, +- local_leader, local_comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = MPIR_Bcast_intra_auto(remote_upids, upid_recv_size, MPI_BYTE, +- local_leader, local_comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = +- MPIR_Bcast_intra_auto(remote_node_ids, (*remote_size) * sizeof(int), MPI_BYTE, +- local_leader, local_comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } else { +- mpi_errno = MPIR_Bcast_intra_auto(*remote_lupids, *remote_size, MPI_INT, +- local_leader, local_comm, &errflag); +- } +- } else { +- mpi_errno = MPIR_Bcast_intra_auto(map_info, 4, MPI_INT, local_leader, local_comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- *remote_size = map_info[0]; +- upid_recv_size = map_info[1]; +- *is_low_group = map_info[2]; +- pure_intracomm = map_info[3]; +- +- MPIR_CHKPMEM_MALLOC((*remote_lupids), int *, (*remote_size) * sizeof(int), +- mpi_errno, "remote_lupids", MPL_MEM_COMM); +- if (!pure_intracomm) { +- MPIR_CHKLMEM_MALLOC(_remote_upid_size, size_t *, (*remote_size) * sizeof(size_t), +- mpi_errno, "_remote_upid_size", MPL_MEM_COMM); +- mpi_errno = MPIR_Bcast_intra_auto(_remote_upid_size, *remote_size, MPI_UNSIGNED_LONG, +- local_leader, local_comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_CHKLMEM_MALLOC(_remote_upids, char *, upid_recv_size * sizeof(char), +- mpi_errno, "_remote_upids", MPL_MEM_COMM); +- mpi_errno = MPIR_Bcast_intra_auto(_remote_upids, upid_recv_size, MPI_BYTE, +- local_leader, local_comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_CHKLMEM_MALLOC(_remote_node_ids, int *, +- (*remote_size) * sizeof(int), +- mpi_errno, "_remote_node_ids", MPL_MEM_COMM); +- mpi_errno = +- MPIR_Bcast_intra_auto(_remote_node_ids, (*remote_size) * sizeof(int), MPI_BYTE, +- local_leader, local_comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIDIU_upids_to_lupids(*remote_size, _remote_upid_size, _remote_upids, +- remote_lupids, _remote_node_ids); +- } else { +- mpi_errno = MPIR_Bcast_intra_auto(*remote_lupids, *remote_size, MPI_INT, +- local_leader, local_comm, &errflag); +- } +- } +- +- MPIR_CHKPMEM_COMMIT(); +- fn_exit: +- MPIR_CHKLMEM_FREEALL(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_INTERCOMM_MAP_BCAST_INTRA); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_alloc_lut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDIU_alloc_lut(MPIDI_rank_map_lut_t ** lut, int size) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_rank_map_lut_t *new_lut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ALLOC_LUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ALLOC_LUT); +- +- new_lut = (MPIDI_rank_map_lut_t *) MPL_malloc(sizeof(MPIDI_rank_map_lut_t) +- + size * sizeof(MPIDI_lpid_t), MPL_MEM_ADDRESS); +- if (new_lut == NULL) { +- *lut = NULL; +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); +- } +- +- MPIR_Object_set_ref(new_lut, 1); +- *lut = new_lut; +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, +- (MPL_DBG_FDEST, "alloc lut %p, size %lu, refcount=%d", +- new_lut, size * sizeof(MPIDI_lpid_t), MPIR_Object_get_ref(new_lut))); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ALLOC_LUT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_release_lut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDIU_release_lut(MPIDI_rank_map_lut_t * lut) +-{ +- int mpi_errno = MPI_SUCCESS; +- int in_use = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_RELEASE_LUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_RELEASE_LUT); +- +- MPIR_Object_release_ref(lut, &in_use); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, (MPL_DBG_FDEST, "dec ref to lut %p", lut)); +- if (!in_use) { +- MPL_free(lut); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, (MPL_DBG_FDEST, "free lut %p", lut)); +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_RELEASE_LUT); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_alloc_mlut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDIU_alloc_mlut(MPIDI_rank_map_mlut_t ** mlut, int size) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_rank_map_mlut_t *new_mlut = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_ALLOC_MLUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_ALLOC_MLUT); +- +- new_mlut = (MPIDI_rank_map_mlut_t *) MPL_malloc(sizeof(MPIDI_rank_map_mlut_t) +- + size * sizeof(MPIDI_gpid_t), MPL_MEM_ADDRESS); +- if (new_mlut == NULL) { +- *mlut = NULL; +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem"); +- } +- +- MPIR_Object_set_ref(new_mlut, 1); +- *mlut = new_mlut; +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, +- (MPL_DBG_FDEST, "alloc mlut %p, size %lu, refcount=%d", +- new_mlut, size * sizeof(MPIDI_gpid_t), MPIR_Object_get_ref(new_mlut))); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_ALLOC_MLUT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_release_mlut +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDIU_release_mlut(MPIDI_rank_map_mlut_t * mlut) +-{ +- int mpi_errno = MPI_SUCCESS; +- int in_use = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_RELEASE_MLUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_RELEASE_MLUT); +- +- MPIR_Object_release_ref(mlut, &in_use); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, (MPL_DBG_FDEST, "dec ref to mlut %p", mlut)); +- if (!in_use) { +- MPL_free(mlut); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MEMORY, VERBOSE, (MPL_DBG_FDEST, "free mlut %p", mlut)); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_RELEASE_MLUT); +- return mpi_errno; +-} ++int MPIDIU_upids_to_lupids(int size, size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids, int *remote_node_ids); ++int MPIDIU_Intercomm_map_bcast_intra(MPIR_Comm * local_comm, int local_leader, int *remote_size, ++ int *is_low_group, int pure_intracomm, ++ size_t * remote_upid_size, char *remote_upids, ++ int **remote_lupids, int *remote_node_ids); ++int MPIDIU_alloc_lut(MPIDI_rank_map_lut_t ** lut, int size); ++int MPIDIU_release_lut(MPIDI_rank_map_lut_t * lut); ++int MPIDIU_alloc_mlut(MPIDI_rank_map_mlut_t ** mlut, int size); ++int MPIDIU_release_mlut(MPIDI_rank_map_mlut_t * mlut); + + #endif /* CH4R_COMM_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_init.c +@@ -0,0 +1,113 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ch4r_init.h" ++ ++int MPIDIG_init_comm(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS, comm_idx, subcomm_type, is_localcomm; ++ MPIDIG_rreq_t **uelist; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_INIT_COMM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_INIT_COMM); ++ ++ /* ++ * Prevents double initialization of some special communicators. ++ * ++ * comm_world and comm_self may exhibit this function twice, first during MPIDIG_init ++ * and the second during MPIR_Comm_commit in MPID_Init. ++ * If there is an early arrival of an unexpected message before the second visit, ++ * the following code will wipe out the unexpected queue andthe message is lost forever. ++ */ ++ if (unlikely(MPIDI_global.is_ch4u_initialized && ++ (comm == MPIR_Process.comm_world || comm == MPIR_Process.comm_self))) ++ goto fn_exit; ++ if (MPIR_CONTEXT_READ_FIELD(DYNAMIC_PROC, comm->recvcontext_id)) ++ goto fn_exit; ++ ++ comm_idx = MPIDIG_get_context_index(comm->recvcontext_id); ++ subcomm_type = MPIR_CONTEXT_READ_FIELD(SUBCOMM, comm->recvcontext_id); ++ is_localcomm = MPIR_CONTEXT_READ_FIELD(IS_LOCALCOMM, comm->recvcontext_id); ++ ++ MPIR_Assert(subcomm_type <= 3); ++ MPIR_Assert(is_localcomm <= 1); ++ MPIDI_global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type] = comm; ++ MPIDIG_COMM(comm, posted_list) = NULL; ++ MPIDIG_COMM(comm, unexp_list) = NULL; ++ ++ uelist = MPIDIG_context_id_to_uelist(comm->context_id); ++ if (*uelist) { ++ MPIDIG_rreq_t *curr, *tmp; ++ DL_FOREACH_SAFE(*uelist, curr, tmp) { ++ DL_DELETE(*uelist, curr); ++ MPIR_Comm_add_ref(comm); /* +1 for each entry in unexp_list */ ++ DL_APPEND(MPIDIG_COMM(comm, unexp_list), curr); ++ } ++ *uelist = NULL; ++ } ++ ++ MPIDIG_COMM(comm, window_instance) = 0; ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_INIT_COMM); ++ return mpi_errno; ++} ++ ++int MPIDIG_destroy_comm(MPIR_Comm * comm) ++{ ++ int mpi_errno = MPI_SUCCESS, comm_idx, subcomm_type, is_localcomm; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DESTROY_COMM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DESTROY_COMM); ++ ++ if (MPIR_CONTEXT_READ_FIELD(DYNAMIC_PROC, comm->recvcontext_id)) ++ goto fn_exit; ++ comm_idx = MPIDIG_get_context_index(comm->recvcontext_id); ++ subcomm_type = MPIR_CONTEXT_READ_FIELD(SUBCOMM, comm->recvcontext_id); ++ is_localcomm = MPIR_CONTEXT_READ_FIELD(IS_LOCALCOMM, comm->recvcontext_id); ++ ++ MPIR_Assert(subcomm_type <= 3); ++ MPIR_Assert(is_localcomm <= 1); ++ MPIR_Assert(MPIDI_global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type] != NULL); ++ ++ if (MPIDI_global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type]) { ++ MPIR_Assert(MPIDIG_COMM ++ (MPIDI_global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type], ++ posted_list) == NULL); ++ MPIR_Assert(MPIDIG_COMM ++ (MPIDI_global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type], ++ unexp_list) == NULL); ++ } ++ MPIDI_global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type] = NULL; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DESTROY_COMM); ++ return mpi_errno; ++} ++ ++void *MPIDIG_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_ALLOC_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_ALLOC_MEM); ++ void *p; ++ p = MPL_malloc(size, MPL_MEM_USER); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_ALLOC_MEM); ++ return p; ++} ++ ++int MPIDIG_mpi_free_mem(void *ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_FREE_MEM); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_FREE_MEM); ++ MPL_free(ptr); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_FREE_MEM); ++ return mpi_errno; ++} +--- a/src/mpid/ch4/src/ch4r_init.h ++++ b/src/mpid/ch4/src/ch4r_init.h +@@ -11,143 +11,9 @@ + #ifndef CH4R_INIT_H_INCLUDED + #define CH4R_INIT_H_INCLUDED + +-#include "ch4_impl.h" +-#include "ch4i_util.h" +-#include "ch4r_buf.h" +-#include "ch4r_callbacks.h" +-#include "ch4r_rma_target_callbacks.h" +-#include "ch4r_rma_origin_callbacks.h" +-#include "mpidig.h" +-#include "uthash.h" +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_init_comm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_init_comm(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS, comm_idx, subcomm_type, is_localcomm; +- MPIDI_CH4U_rreq_t **uelist; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_INIT_COMM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_INIT_COMM); +- +- /* +- * Prevents double initialization of some special communicators. +- * +- * comm_world and comm_self may exhibit this function twice, first during MPIDI_CH4U_mpi_init +- * and the second during MPIR_Comm_commit in MPID_Init. +- * If there is an early arrival of an unexpected message before the second visit, +- * the following code will wipe out the unexpected queue andthe message is lost forever. +- */ +- if (unlikely(MPIDI_CH4_Global.is_ch4u_initialized && +- (comm == MPIR_Process.comm_world || comm == MPIR_Process.comm_self))) +- goto fn_exit; +- if (MPIR_CONTEXT_READ_FIELD(DYNAMIC_PROC, comm->recvcontext_id)) +- goto fn_exit; +- +- comm_idx = MPIDI_CH4U_get_context_index(comm->recvcontext_id); +- subcomm_type = MPIR_CONTEXT_READ_FIELD(SUBCOMM, comm->recvcontext_id); +- is_localcomm = MPIR_CONTEXT_READ_FIELD(IS_LOCALCOMM, comm->recvcontext_id); +- +- MPIR_Assert(subcomm_type <= 3); +- MPIR_Assert(is_localcomm <= 1); +- MPIDI_CH4_Global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type] = comm; +- MPIDI_CH4U_COMM(comm, posted_list) = NULL; +- MPIDI_CH4U_COMM(comm, unexp_list) = NULL; +- +- uelist = MPIDI_CH4U_context_id_to_uelist(comm->context_id); +- if (*uelist) { +- MPIDI_CH4U_rreq_t *curr, *tmp; +- DL_FOREACH_SAFE(*uelist, curr, tmp) { +- DL_DELETE(*uelist, curr); +- MPIR_Comm_add_ref(comm); /* +1 for each entry in unexp_list */ +- DL_APPEND(MPIDI_CH4U_COMM(comm, unexp_list), curr); +- } +- *uelist = NULL; +- } +- +- MPIDI_CH4U_COMM(comm, window_instance) = 0; +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_INIT_COMM); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_destroy_comm +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_destroy_comm(MPIR_Comm * comm) +-{ +- int mpi_errno = MPI_SUCCESS, comm_idx, subcomm_type, is_localcomm; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DESTROY_COMM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DESTROY_COMM); +- +- if (MPIR_CONTEXT_READ_FIELD(DYNAMIC_PROC, comm->recvcontext_id)) +- goto fn_exit; +- comm_idx = MPIDI_CH4U_get_context_index(comm->recvcontext_id); +- subcomm_type = MPIR_CONTEXT_READ_FIELD(SUBCOMM, comm->recvcontext_id); +- is_localcomm = MPIR_CONTEXT_READ_FIELD(IS_LOCALCOMM, comm->recvcontext_id); +- +- MPIR_Assert(subcomm_type <= 3); +- MPIR_Assert(is_localcomm <= 1); +- MPIR_Assert(MPIDI_CH4_Global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type] != NULL); +- +- if (MPIDI_CH4_Global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type]) { +- MPIR_Assert(MPIDI_CH4_Global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type]->dev. +- ch4.ch4u.posted_list == NULL); +- MPIR_Assert(MPIDI_CH4_Global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type]->dev. +- ch4.ch4u.unexp_list == NULL); +- } +- MPIDI_CH4_Global.comm_req_lists[comm_idx].comm[is_localcomm][subcomm_type] = NULL; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DESTROY_COMM); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_alloc_mem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void *MPIDI_CH4U_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_ALLOC_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_ALLOC_MEM); +- void *p; +- p = MPL_malloc(size, MPL_MEM_USER); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_ALLOC_MEM); +- return p; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_free_mem +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_free_mem(void *ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_FREE_MEM); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_FREE_MEM); +- MPL_free(ptr); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_FREE_MEM); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_update_node_map +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDIU_update_node_map(int avtid, int size, int node_map[]) +-{ +- int i; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_UPDATE_NODE_MAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_UPDATE_NODE_MAP); +- for (i = 0; i < size; i++) { +- MPIDI_CH4_Global.node_map[avtid][i] = node_map[i]; +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_UPDATE_NODE_MAP); +- return MPI_SUCCESS; +-} ++int MPIDIG_init_comm(MPIR_Comm * comm); ++int MPIDIG_destroy_comm(MPIR_Comm * comm); ++void *MPIDIG_mpi_alloc_mem(size_t size, MPIR_Info * info_ptr); ++int MPIDIG_mpi_free_mem(void *ptr); + + #endif /* CH4R_INIT_H_INCLUDED */ +--- a/src/mpid/ch4/src/ch4r_probe.h ++++ b/src/mpid/ch4/src/ch4r_probe.h +@@ -13,21 +13,14 @@ + + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_iprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_iprobe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, int *flag, +- MPI_Status * status) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_iprobe(int source, int tag, MPIR_Comm * comm, ++ int context_offset, int *flag, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Comm *root_comm; + MPIR_Request *unexp_req; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_IPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_IPROBE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_IPROBE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_IPROBE); + + if (unlikely(source == MPI_PROC_NULL)) { + MPIR_Status_set_procnull(status); +@@ -35,59 +28,42 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_iprobe(int source, + goto fn_exit; + } + +- root_comm = MPIDI_CH4U_context_id_to_comm(comm->context_id); ++ root_comm = MPIDIG_context_id_to_comm(comm->context_id); + + /* MPIDI_CS_ENTER(); */ +- unexp_req = MPIDI_CH4U_find_unexp(source, tag, root_comm->recvcontext_id + context_offset, +- &MPIDI_CH4U_COMM(root_comm, unexp_list)); ++ unexp_req = MPIDIG_find_unexp(source, tag, root_comm->recvcontext_id + context_offset, ++ &MPIDIG_COMM(root_comm, unexp_list)); + + if (unexp_req) { + *flag = 1; + unexp_req->status.MPI_ERROR = MPI_SUCCESS; +- unexp_req->status.MPI_SOURCE = MPIDI_CH4U_REQUEST(unexp_req, rank); +- unexp_req->status.MPI_TAG = MPIDI_CH4U_REQUEST(unexp_req, tag); +- MPIR_STATUS_SET_COUNT(unexp_req->status, MPIDI_CH4U_REQUEST(unexp_req, count)); ++ unexp_req->status.MPI_SOURCE = MPIDIG_REQUEST(unexp_req, rank); ++ unexp_req->status.MPI_TAG = MPIDIG_REQUEST(unexp_req, tag); ++ MPIR_STATUS_SET_COUNT(unexp_req->status, MPIDIG_REQUEST(unexp_req, count)); + + status->MPI_TAG = unexp_req->status.MPI_TAG; + status->MPI_SOURCE = unexp_req->status.MPI_SOURCE; +- MPIR_STATUS_SET_COUNT(*status, MPIDI_CH4U_REQUEST(unexp_req, count)); ++ MPIR_STATUS_SET_COUNT(*status, MPIDIG_REQUEST(unexp_req, count)); + } else { + *flag = 0; +- /* FIXME: we do this because vni_lock is not a recursive lock that can +- * be yielded easily. Recursive locking currently only works for the global +- * lock. One way to improve this is to fix the lock yielding API to avoid this +- * constraint.*/ +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); + } + /* MPIDI_CS_EXIT(); */ + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_IPROBE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_IPROBE); + return mpi_errno; +- +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_improbe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_improbe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- int *flag, MPIR_Request ** message, +- MPI_Status * status) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_improbe(int source, int tag, MPIR_Comm * comm, ++ int context_offset, int *flag, ++ MPIR_Request ** message, MPI_Status * status) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Comm *root_comm; + MPIR_Request *unexp_req; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_IMPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_IMPROBE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_IMPROBE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_IMPROBE); + + if (unlikely(source == MPI_PROC_NULL)) { + MPIR_Status_set_procnull(status); +@@ -95,11 +71,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_improbe(int source, + goto fn_exit; + } + +- root_comm = MPIDI_CH4U_context_id_to_comm(comm->context_id); ++ root_comm = MPIDIG_context_id_to_comm(comm->context_id); + + /* MPIDI_CS_ENTER(); */ +- unexp_req = MPIDI_CH4U_dequeue_unexp(source, tag, root_comm->recvcontext_id + context_offset, +- &MPIDI_CH4U_COMM(root_comm, unexp_list)); ++ unexp_req = MPIDIG_dequeue_unexp(source, tag, root_comm->recvcontext_id + context_offset, ++ &MPIDIG_COMM(root_comm, unexp_list)); + + if (unexp_req) { + *flag = 1; +@@ -112,48 +88,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_improbe(int source, + * is -1 for dequeue(unexp_list) and +1 for (*message)->comm */ + + unexp_req->status.MPI_ERROR = MPI_SUCCESS; +- unexp_req->status.MPI_SOURCE = MPIDI_CH4U_REQUEST(unexp_req, rank); +- unexp_req->status.MPI_TAG = MPIDI_CH4U_REQUEST(unexp_req, tag); +- MPIR_STATUS_SET_COUNT(unexp_req->status, MPIDI_CH4U_REQUEST(unexp_req, count)); +- MPIDI_CH4U_REQUEST(unexp_req, req->status) |= MPIDI_CH4U_REQ_UNEXP_DQUED; ++ unexp_req->status.MPI_SOURCE = MPIDIG_REQUEST(unexp_req, rank); ++ unexp_req->status.MPI_TAG = MPIDIG_REQUEST(unexp_req, tag); ++ MPIR_STATUS_SET_COUNT(unexp_req->status, MPIDIG_REQUEST(unexp_req, count)); ++ MPIDIG_REQUEST(unexp_req, req->status) |= MPIDIG_REQ_UNEXP_DQUED; + + status->MPI_TAG = unexp_req->status.MPI_TAG; + status->MPI_SOURCE = unexp_req->status.MPI_SOURCE; +- MPIR_STATUS_SET_COUNT(*status, MPIDI_CH4U_REQUEST(unexp_req, count)); ++ MPIR_STATUS_SET_COUNT(*status, MPIDIG_REQUEST(unexp_req, count)); + } else { + *flag = 0; +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); + } + /* MPIDI_CS_EXIT(); */ + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_IMPROBE); +- return mpi_errno; +- +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mprobe +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mprobe(int source, +- int tag, +- MPIR_Comm * comm, +- int context_offset, +- MPIR_Request ** message, MPI_Status * status) +-{ +- int mpi_errno, flag = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPROBE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPROBE); +- while (!flag) { +- mpi_errno = +- MPIDI_CH4U_mpi_improbe(source, tag, comm, context_offset, &flag, message, status); +- } +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPROBE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_IMPROBE); + return mpi_errno; + } + +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_proc.c +@@ -0,0 +1,312 @@ ++/* -*- Mode: C; c-basic-offset:4 ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ch4r_proc.h" ++#include "build_nodemap.h" ++ ++int MPIDIU_get_node_id(MPIR_Comm * comm, int rank, int *id_p) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int avtid = 0, lpid = 0; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_NODE_ID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_NODE_ID); ++ ++ MPIDIU_comm_rank_to_pid(comm, rank, &lpid, &avtid); ++ *id_p = MPIDI_global.node_map[avtid][lpid]; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_NODE_ID); ++ return mpi_errno; ++} ++ ++int MPIDIU_get_max_node_id(MPIR_Comm * comm, int *max_id_p) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_MAX_NODE_ID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_MAX_NODE_ID); ++ ++ *max_id_p = MPIDI_global.max_node_id; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_MAX_NODE_ID); ++ return mpi_errno; ++} ++ ++int MPIDIU_build_nodemap(int myrank, MPIR_Comm * comm, int sz, int *out_nodemap, int *sz_out) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_BUILD_NODEMAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_BUILD_NODEMAP); ++ ++ ret = MPIR_NODEMAP_build_nodemap(sz, myrank, out_nodemap, sz_out); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_BUILD_NODEMAP); ++ return ret; ++} ++ ++int MPIDIU_get_n_avts(void) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_N_AVTS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_N_AVTS); ++ ++ ret = MPIDI_global.avt_mgr.n_avts; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_N_AVTS); ++ return ret; ++} ++ ++int MPIDIU_get_max_n_avts(void) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_MAX_N_AVTS); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_MAX_N_AVTS); ++ ++ ret = MPIDI_global.avt_mgr.max_n_avts; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_MAX_N_AVTS); ++ return ret; ++} ++ ++int MPIDIU_get_avt_size(int avtid) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_AVT_SIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_AVT_SIZE); ++ ++ ret = MPIDI_av_table[avtid]->size; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_AVT_SIZE); ++ return ret; ++} ++ ++int MPIDIU_alloc_globals_for_avtid(int avtid) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int *new_node_map = NULL; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_ALLOC_GLOBALS_FOR_AVTID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_ALLOC_GLOBALS_FOR_AVTID); ++ ++ new_node_map = (int *) MPL_malloc(MPIDI_av_table[avtid]->size * sizeof(int), MPL_MEM_ADDRESS); ++ MPIR_ERR_CHKANDJUMP(new_node_map == NULL, mpi_errno, MPI_ERR_NO_MEM, "**nomem"); ++ MPIDI_global.node_map[avtid] = new_node_map; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_ALLOC_GLOBALS_FOR_AVTID); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIU_free_globals_for_avtid(int avtid) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_FREE_GLOBALS_FOR_AVTID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_FREE_GLOBALS_FOR_AVTID); ++ MPL_free(MPIDI_global.node_map[avtid]); ++ MPIDI_global.node_map[avtid] = NULL; ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_FREE_GLOBALS_FOR_AVTID); ++ return MPI_SUCCESS; ++} ++ ++int MPIDIU_get_next_avtid(int *avtid) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_NEXT_AVTID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_NEXT_AVTID); ++ ++ if (MPIDI_global.avt_mgr.next_avtid == -1) { /* out of free avtids */ ++ int old_max, new_max, i; ++ old_max = MPIDI_global.avt_mgr.max_n_avts; ++ new_max = old_max + 1; ++ MPIDI_global.avt_mgr.free_avtid = ++ (int *) MPL_realloc(MPIDI_global.avt_mgr.free_avtid, new_max * sizeof(int), ++ MPL_MEM_ADDRESS); ++ for (i = old_max; i < new_max - 1; i++) { ++ MPIDI_global.avt_mgr.free_avtid[i] = i + 1; ++ } ++ MPIDI_global.avt_mgr.free_avtid[new_max - 1] = -1; ++ MPIDI_global.avt_mgr.max_n_avts = new_max; ++ MPIDI_global.avt_mgr.next_avtid = old_max; ++ } ++ ++ *avtid = MPIDI_global.avt_mgr.next_avtid; ++ MPIDI_global.avt_mgr.next_avtid = MPIDI_global.avt_mgr.free_avtid[*avtid]; ++ MPIDI_global.avt_mgr.free_avtid[*avtid] = -1; ++ MPIDI_global.avt_mgr.n_avts++; ++ MPIR_Assert(MPIDI_global.avt_mgr.n_avts <= MPIDI_global.avt_mgr.max_n_avts); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " new_avtid=%d", *avtid)); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_NEXT_AVTID); ++ return *avtid; ++} ++ ++int MPIDIU_free_avtid(int avtid) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_FREE_AVTID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_FREE_AVTID); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " free_avtid=%d", avtid)); ++ MPIR_Assert(MPIDI_global.avt_mgr.n_avts > 0); ++ MPIDI_global.avt_mgr.free_avtid[avtid] = MPIDI_global.avt_mgr.next_avtid; ++ MPIDI_global.avt_mgr.next_avtid = avtid; ++ MPIDI_global.avt_mgr.n_avts--; ++ /* ++ * TODO: ++ * If the allowed number of process groups are very large ++ * We need to return unsed pages back to OS. ++ * madvise(addr, len, MADV_DONTNEED); ++ * We need tracking wich page can be returned ++ */ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_FREE_AVTID); ++ return 0; ++} ++ ++int MPIDIU_new_avt(int size, int *avtid) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDI_av_table_t *new_av_table; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_NEW_AVT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_NEW_AVT); ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " new_avt: size=%d", size)); ++ ++ MPIDIU_get_next_avtid(avtid); ++ ++ new_av_table = (MPIDI_av_table_t *) MPL_malloc(size * sizeof(MPIDI_av_entry_t) ++ + sizeof(MPIDI_av_table_t), MPL_MEM_ADDRESS); ++ new_av_table->size = size; ++ MPIDI_av_table[*avtid] = new_av_table; ++ ++ MPIR_Object_set_ref(MPIDI_av_table[*avtid], 0); ++ ++ MPIDIU_alloc_globals_for_avtid(*avtid); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_NEW_AVT); ++ return mpi_errno; ++} ++ ++int MPIDIU_free_avt(int avtid) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_FREE_AVT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_FREE_AVT); ++ ++ MPIDIU_free_globals_for_avtid(avtid); ++ MPL_free(MPIDI_av_table[avtid]); ++ MPIDI_av_table[avtid] = NULL; ++ MPIDIU_free_avtid(avtid); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_FREE_AVT); ++ return mpi_errno; ++} ++ ++int MPIDIU_avt_add_ref(int avtid) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AVT_ADD_REF); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AVT_ADD_REF); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " incr avtid=%d", avtid)); ++ MPIR_Object_add_ref(MPIDI_av_table[avtid]); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AVT_ADD_REF); ++ return MPI_SUCCESS; ++} ++ ++int MPIDIU_avt_release_ref(int avtid) ++{ ++ int in_use; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AVT_RELEASE_REF); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AVT_RELEASE_REF); ++ ++ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " decr avtid=%d", avtid)); ++ MPIR_Object_release_ref(MPIDIU_get_av_table(avtid), &in_use); ++ if (!in_use) { ++ MPIDIU_free_avt(avtid); ++ MPIDIU_free_globals_for_avtid(avtid); ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AVT_RELEASE_REF); ++ return MPI_SUCCESS; ++} ++ ++int MPIDIU_avt_init(void) ++{ ++ int i, mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AVT_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AVT_INIT); ++ ++ MPIDI_global.avt_mgr.mmapped_size = 8 * 4 * 1024; ++ MPIDI_global.avt_mgr.max_n_avts = 1; ++ MPIDI_global.avt_mgr.next_avtid = 0; ++ MPIDI_global.avt_mgr.n_avts = 0; ++ ++ MPIDI_av_table = (MPIDI_av_table_t **) ++ MPL_mmap(NULL, MPIDI_global.avt_mgr.mmapped_size, ++ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0, MPL_MEM_ADDRESS); ++ MPIR_ERR_CHKANDSTMT(MPIDI_av_table == MAP_FAILED, mpi_errno, MPI_ERR_NO_MEM, ++ goto fn_fail, "**nomem"); ++ ++ MPIDI_global.node_map = (int **) ++ MPL_mmap(NULL, MPIDI_global.avt_mgr.mmapped_size, ++ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0, MPL_MEM_ADDRESS); ++ MPIR_ERR_CHKANDSTMT(MPIDI_global.node_map == MAP_FAILED, mpi_errno, ++ MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); ++ ++ MPIDI_global.avt_mgr.free_avtid = ++ (int *) MPL_malloc(MPIDI_global.avt_mgr.max_n_avts * sizeof(int), MPL_MEM_ADDRESS); ++ MPIR_ERR_CHKANDSTMT(MPIDI_global.avt_mgr.free_avtid == NULL, mpi_errno, ++ MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); ++ ++ for (i = 0; i < MPIDI_global.avt_mgr.max_n_avts - 1; i++) { ++ MPIDI_global.avt_mgr.free_avtid[i] = i + 1; ++ } ++ MPIDI_global.avt_mgr.free_avtid[MPIDI_global.avt_mgr.max_n_avts - 1] = -1; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AVT_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIU_avt_destroy(void) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AVT_DESTROY); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AVT_DESTROY); ++ ++ MPL_munmap((void *) MPIDI_global.node_map, MPIDI_global.avt_mgr.mmapped_size, MPL_MEM_ADDRESS); ++ MPL_munmap((void *) MPIDI_av_table, MPIDI_global.avt_mgr.mmapped_size, MPL_MEM_ADDRESS); ++ MPL_free(MPIDI_global.avt_mgr.free_avtid); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AVT_DESTROY); ++ return MPI_SUCCESS; ++} ++ ++int MPIDIU_build_nodemap_avtid(int myrank, MPIR_Comm * comm, int sz, int avtid) ++{ ++ int ret; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_BUILD_NODEMAP_AVTID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_BUILD_NODEMAP_AVTID); ++ ret = MPIDIU_build_nodemap(myrank, comm, sz, MPIDI_global.node_map[avtid], ++ &MPIDI_global.max_node_id); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_BUILD_NODEMAP_AVTID); ++ return ret; ++} +--- a/src/mpid/ch4/src/ch4r_proc.h ++++ b/src/mpid/ch4/src/ch4r_proc.h +@@ -11,18 +11,27 @@ + #ifndef CH4R_PROC_H_INCLUDED + #define CH4R_PROC_H_INCLUDED + +-#ifdef HAVE_SYS_MMAN_H +-#include +-#endif +- + #include "ch4_types.h" +-#include "build_nodemap.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_comm_rank_to_pid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDIU_comm_rank_to_pid(MPIR_Comm * comm, int rank, int *index, ++int MPIDIU_get_n_avts(void); ++int MPIDIU_get_max_n_avts(void); ++int MPIDIU_get_avt_size(int avtid); ++int MPIDIU_alloc_globals_for_avtid(int avtid); ++int MPIDIU_free_globals_for_avtid(int avtid); ++int MPIDIU_get_next_avtid(int *avtid); ++int MPIDIU_free_avtid(int avtid); ++int MPIDIU_new_avt(int size, int *avtid); ++int MPIDIU_free_avt(int avtid); ++int MPIDIU_avt_add_ref(int avtid); ++int MPIDIU_avt_release_ref(int avtid); ++int MPIDIU_avt_init(void); ++int MPIDIU_avt_destroy(void); ++int MPIDIU_get_node_id(MPIR_Comm * comm, int rank, int *id_p); ++int MPIDIU_get_max_node_id(MPIR_Comm * comm, int *max_id_p); ++int MPIDIU_build_nodemap(int myrank, MPIR_Comm * comm, int sz, int *out_nodemap, int *sz_out); ++int MPIDIU_build_nodemap_avtid(int myrank, MPIR_Comm * comm, int sz, int avtid); ++ ++MPL_STATIC_INLINE_PREFIX int MPIDIU_comm_rank_to_pid(MPIR_Comm * comm, int rank, int *idx, + int *avtid) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_COMM_RANK_TO_PID); +@@ -33,47 +42,47 @@ MPL_STATIC_INLINE_PREFIX int MPIDIU_comm_rank_to_pid(MPIR_Comm * comm, int rank, + switch (MPIDI_COMM(comm, map).mode) { + case MPIDI_RANK_MAP_DIRECT: + *avtid = MPIDI_COMM(comm, map).avtid; +- *index = rank; ++ *idx = rank; + break; + case MPIDI_RANK_MAP_DIRECT_INTRA: +- *index = rank; ++ *idx = rank; + break; + case MPIDI_RANK_MAP_OFFSET: + *avtid = MPIDI_COMM(comm, map).avtid; +- *index = rank + MPIDI_COMM(comm, map).reg.offset; ++ *idx = rank + MPIDI_COMM(comm, map).reg.offset; + break; + case MPIDI_RANK_MAP_OFFSET_INTRA: +- *index = rank + MPIDI_COMM(comm, map).reg.offset; ++ *idx = rank + MPIDI_COMM(comm, map).reg.offset; + break; + case MPIDI_RANK_MAP_STRIDE: + *avtid = MPIDI_COMM(comm, map).avtid; +- *index = MPIDI_CALC_STRIDE_SIMPLE(rank, MPIDI_COMM(comm, map).reg.stride.stride, +- MPIDI_COMM(comm, map).reg.stride.offset); ++ *idx = MPIDI_CALC_STRIDE_SIMPLE(rank, MPIDI_COMM(comm, map).reg.stride.stride, ++ MPIDI_COMM(comm, map).reg.stride.offset); + break; + case MPIDI_RANK_MAP_STRIDE_INTRA: +- *index = MPIDI_CALC_STRIDE_SIMPLE(rank, MPIDI_COMM(comm, map).reg.stride.stride, +- MPIDI_COMM(comm, map).reg.stride.offset); ++ *idx = MPIDI_CALC_STRIDE_SIMPLE(rank, MPIDI_COMM(comm, map).reg.stride.stride, ++ MPIDI_COMM(comm, map).reg.stride.offset); + break; + case MPIDI_RANK_MAP_STRIDE_BLOCK: + *avtid = MPIDI_COMM(comm, map).avtid; +- *index = MPIDI_CALC_STRIDE(rank, MPIDI_COMM(comm, map).reg.stride.stride, +- MPIDI_COMM(comm, map).reg.stride.blocksize, +- MPIDI_COMM(comm, map).reg.stride.offset); ++ *idx = MPIDI_CALC_STRIDE(rank, MPIDI_COMM(comm, map).reg.stride.stride, ++ MPIDI_COMM(comm, map).reg.stride.blocksize, ++ MPIDI_COMM(comm, map).reg.stride.offset); + break; + case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- *index = MPIDI_CALC_STRIDE(rank, MPIDI_COMM(comm, map).reg.stride.stride, +- MPIDI_COMM(comm, map).reg.stride.blocksize, +- MPIDI_COMM(comm, map).reg.stride.offset); ++ *idx = MPIDI_CALC_STRIDE(rank, MPIDI_COMM(comm, map).reg.stride.stride, ++ MPIDI_COMM(comm, map).reg.stride.blocksize, ++ MPIDI_COMM(comm, map).reg.stride.offset); + break; + case MPIDI_RANK_MAP_LUT: + *avtid = MPIDI_COMM(comm, map).avtid; +- *index = MPIDI_COMM(comm, map).irreg.lut.lpid[rank]; ++ *idx = MPIDI_COMM(comm, map).irreg.lut.lpid[rank]; + break; + case MPIDI_RANK_MAP_LUT_INTRA: +- *index = MPIDI_COMM(comm, map).irreg.lut.lpid[rank]; ++ *idx = MPIDI_COMM(comm, map).irreg.lut.lpid[rank]; + break; + case MPIDI_RANK_MAP_MLUT: +- *index = MPIDI_COMM(comm, map).irreg.mlut.gpid[rank].lpid; ++ *idx = MPIDI_COMM(comm, map).irreg.mlut.gpid[rank].lpid; + *avtid = MPIDI_COMM(comm, map).irreg.mlut.gpid[rank].avtid; + break; + case MPIDI_RANK_MAP_NONE: +@@ -81,16 +90,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDIU_comm_rank_to_pid(MPIR_Comm * comm, int rank, + break; + } + MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " comm_to_pid: rank=%d, avtid=%d index=%d", +- rank, *avtid, *index)); ++ (MPL_DBG_FDEST, " comm_to_pid: rank=%d, avtid=%d idx=%d", rank, *avtid, *idx)); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_COMM_RANK_TO_PID); +- return *index; ++ return *idx; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_comm_rank_to_av +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + MPL_STATIC_INLINE_PREFIX MPIDI_av_entry_t *MPIDIU_comm_rank_to_av(MPIR_Comm * comm, int rank) + { + MPIDI_av_entry_t *ret = NULL; +@@ -162,11 +166,7 @@ MPL_STATIC_INLINE_PREFIX MPIDI_av_entry_t *MPIDIU_comm_rank_to_av(MPIR_Comm * co + return ret; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_comm_rank_to_pid_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDIU_comm_rank_to_pid_local(MPIR_Comm * comm, int rank, int *index, ++MPL_STATIC_INLINE_PREFIX int MPIDIU_comm_rank_to_pid_local(MPIR_Comm * comm, int rank, int *idx, + int *avtid) + { + MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_COMM_RANK_TO_PID_LOCAL); +@@ -176,29 +176,29 @@ MPL_STATIC_INLINE_PREFIX int MPIDIU_comm_rank_to_pid_local(MPIR_Comm * comm, int + switch (MPIDI_COMM(comm, local_map).mode) { + case MPIDI_RANK_MAP_DIRECT: + case MPIDI_RANK_MAP_DIRECT_INTRA: +- *index = rank; ++ *idx = rank; + break; + case MPIDI_RANK_MAP_OFFSET: + case MPIDI_RANK_MAP_OFFSET_INTRA: +- *index = rank + MPIDI_COMM(comm, local_map).reg.offset; ++ *idx = rank + MPIDI_COMM(comm, local_map).reg.offset; + break; + case MPIDI_RANK_MAP_STRIDE: + case MPIDI_RANK_MAP_STRIDE_INTRA: +- *index = MPIDI_CALC_STRIDE_SIMPLE(rank, MPIDI_COMM(comm, local_map).reg.stride.stride, +- MPIDI_COMM(comm, local_map).reg.stride.offset); ++ *idx = MPIDI_CALC_STRIDE_SIMPLE(rank, MPIDI_COMM(comm, local_map).reg.stride.stride, ++ MPIDI_COMM(comm, local_map).reg.stride.offset); + break; + case MPIDI_RANK_MAP_STRIDE_BLOCK: + case MPIDI_RANK_MAP_STRIDE_BLOCK_INTRA: +- *index = MPIDI_CALC_STRIDE(rank, MPIDI_COMM(comm, local_map).reg.stride.stride, +- MPIDI_COMM(comm, local_map).reg.stride.blocksize, +- MPIDI_COMM(comm, local_map).reg.stride.offset); ++ *idx = MPIDI_CALC_STRIDE(rank, MPIDI_COMM(comm, local_map).reg.stride.stride, ++ MPIDI_COMM(comm, local_map).reg.stride.blocksize, ++ MPIDI_COMM(comm, local_map).reg.stride.offset); + break; + case MPIDI_RANK_MAP_LUT: + case MPIDI_RANK_MAP_LUT_INTRA: +- *index = MPIDI_COMM(comm, local_map).irreg.lut.lpid[rank]; ++ *idx = MPIDI_COMM(comm, local_map).irreg.lut.lpid[rank]; + break; + case MPIDI_RANK_MAP_MLUT: +- *index = MPIDI_COMM(comm, local_map).irreg.mlut.gpid[rank].lpid; ++ *idx = MPIDI_COMM(comm, local_map).irreg.mlut.gpid[rank].lpid; + *avtid = MPIDI_COMM(comm, local_map).irreg.mlut.gpid[rank].avtid; + break; + case MPIDI_RANK_MAP_NONE: +@@ -206,17 +206,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDIU_comm_rank_to_pid_local(MPIR_Comm * comm, int + break; + } + MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_MAP, VERBOSE, +- (MPL_DBG_FDEST, " comm_to_pid_local: rank=%d, avtid=%d index=%d", +- rank, *avtid, *index)); ++ (MPL_DBG_FDEST, " comm_to_pid_local: rank=%d, avtid=%d idx=%d", ++ rank, *avtid, *idx)); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_COMM_RANK_TO_PID_LOCAL); +- return *index; ++ return *idx; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_rank_is_local(int rank, MPIR_Comm * comm) ++MPL_STATIC_INLINE_PREFIX int MPIDIU_rank_is_local(int rank, MPIR_Comm * comm) + { + int ret = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_RANK_IS_LOCAL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_RANK_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_RANK_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_RANK_IS_LOCAL); + + #ifdef MPIDI_BUILD_CH4_LOCALITY_INFO + ret = MPIDIU_comm_rank_to_av(comm, rank)->is_local; +@@ -224,15 +224,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_rank_is_local(int rank, MPIR_Comm * comm + (MPL_DBG_FDEST, " is_local=%d, rank=%d", ret, rank)); + #endif + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_RANK_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_RANK_IS_LOCAL); + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_av_is_local(MPIDI_av_entry_t * av) ++MPL_STATIC_INLINE_PREFIX int MPIDIU_av_is_local(MPIDI_av_entry_t * av) + { + int ret = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_AV_IS_LOCAL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_AV_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AV_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AV_IS_LOCAL); + + #ifdef MPIDI_BUILD_CH4_LOCALITY_INFO + ret = av->is_local; +@@ -240,15 +240,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_av_is_local(MPIDI_av_entry_t * av) + (MPL_DBG_FDEST, " is_local=%d, av=%p", ret, (void *) av)); + #endif + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_AV_IS_LOCAL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AV_IS_LOCAL); + return ret; + } + +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_rank_to_lpid(int rank, MPIR_Comm * comm) ++MPL_STATIC_INLINE_PREFIX int MPIDIU_rank_to_lpid(int rank, MPIR_Comm * comm) + { + int ret; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_RANK_TO_LPID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_RANK_TO_LPID); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_RANK_TO_LPID); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_RANK_TO_LPID); + + int avtid = 0, lpid = 0; + MPIDIU_comm_rank_to_pid(comm, rank, &lpid, &avtid); +@@ -258,319 +258,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_rank_to_lpid(int rank, MPIR_Comm * comm) + ret = -1; + } + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_RANK_TO_LPID); +- return ret; +-} +- +-static inline int MPIDI_CH4U_get_node_id(MPIR_Comm * comm, int rank, int *id_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- int avtid = 0, lpid = 0; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_GET_NODE_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_GET_NODE_ID); +- +- MPIDIU_comm_rank_to_pid(comm, rank, &lpid, &avtid); +- *id_p = MPIDI_CH4_Global.node_map[avtid][lpid]; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_GET_NODE_ID); +- return mpi_errno; +-} +- +-static inline int MPIDI_CH4U_get_max_node_id(MPIR_Comm * comm, int *max_id_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_GET_MAX_NODE_ID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_GET_MAX_NODE_ID); +- +- *max_id_p = MPIDI_CH4_Global.max_node_id; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_GET_MAX_NODE_ID); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_build_nodemap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4U_build_nodemap(int myrank, +- MPIR_Comm * comm, int sz, int *out_nodemap, int *sz_out) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_BUILD_NODEMAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_BUILD_NODEMAP); +- +- ret = MPIR_NODEMAP_build_nodemap(sz, myrank, out_nodemap, sz_out); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_BUILD_NODEMAP); +- return ret; +-} +- +-static inline int MPIDIU_get_n_avts() +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_N_AVTS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_N_AVTS); +- +- ret = MPIDI_CH4_Global.avt_mgr.n_avts; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_N_AVTS); +- return ret; +-} +- +-static inline int MPIDIU_get_max_n_avts() +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_MAX_N_AVTS); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_MAX_N_AVTS); +- +- ret = MPIDI_CH4_Global.avt_mgr.max_n_avts; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_MAX_N_AVTS); +- return ret; +-} +- +-static inline int MPIDIU_get_avt_size(int avtid) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_AVT_SIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_AVT_SIZE); +- +- ret = MPIDI_av_table[avtid]->size; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_AVT_SIZE); +- return ret; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_alloc_globals_for_avtid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDIU_alloc_globals_for_avtid(int avtid) +-{ +- int mpi_errno = MPI_SUCCESS; +- int *new_node_map = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_ALLOC_GLOBALS_FOR_AVTID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_ALLOC_GLOBALS_FOR_AVTID); +- +- new_node_map = (int *) MPL_malloc(MPIDI_av_table[avtid]->size * sizeof(int), MPL_MEM_ADDRESS); +- MPIR_ERR_CHKANDJUMP(new_node_map == NULL, mpi_errno, MPI_ERR_NO_MEM, "**nomem"); +- MPIDI_CH4_Global.node_map[avtid] = new_node_map; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_ALLOC_GLOBALS_FOR_AVTID); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDIU_free_globals_for_avtid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDIU_free_globals_for_avtid(int avtid) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_FREE_GLOBALS_FOR_AVTID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_FREE_GLOBALS_FOR_AVTID); +- MPL_free(MPIDI_CH4_Global.node_map[avtid]); +- MPIDI_CH4_Global.node_map[avtid] = NULL; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_FREE_GLOBALS_FOR_AVTID); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDIU_get_next_avtid(int *avtid) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_NEXT_AVTID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_NEXT_AVTID); +- +- if (MPIDI_CH4_Global.avt_mgr.next_avtid == -1) { /* out of free avtids */ +- int old_max, new_max, i; +- old_max = MPIDI_CH4_Global.avt_mgr.max_n_avts; +- new_max = old_max + 1; +- MPIDI_CH4_Global.avt_mgr.free_avtid = +- (int *) MPL_realloc(MPIDI_CH4_Global.avt_mgr.free_avtid, new_max * sizeof(int), +- MPL_MEM_ADDRESS); +- for (i = old_max; i < new_max - 1; i++) { +- MPIDI_CH4_Global.avt_mgr.free_avtid[i] = i + 1; +- } +- MPIDI_CH4_Global.avt_mgr.free_avtid[new_max - 1] = -1; +- MPIDI_CH4_Global.avt_mgr.max_n_avts = new_max; +- MPIDI_CH4_Global.avt_mgr.next_avtid = old_max; +- } +- +- *avtid = MPIDI_CH4_Global.avt_mgr.next_avtid; +- MPIDI_CH4_Global.avt_mgr.next_avtid = MPIDI_CH4_Global.avt_mgr.free_avtid[*avtid]; +- MPIDI_CH4_Global.avt_mgr.free_avtid[*avtid] = -1; +- MPIDI_CH4_Global.avt_mgr.n_avts++; +- MPIR_Assert(MPIDI_CH4_Global.avt_mgr.n_avts <= MPIDI_CH4_Global.avt_mgr.max_n_avts); +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " new_avtid=%d", *avtid)); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_NEXT_AVTID); +- return *avtid; +-} +- +-static inline int MPIDIU_free_avtid(int avtid) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_FREE_AVTID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_FREE_AVTID); +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " free_avtid=%d", avtid)); +- MPIR_Assert(MPIDI_CH4_Global.avt_mgr.n_avts > 0); +- MPIDI_CH4_Global.avt_mgr.free_avtid[avtid] = MPIDI_CH4_Global.avt_mgr.next_avtid; +- MPIDI_CH4_Global.avt_mgr.next_avtid = avtid; +- MPIDI_CH4_Global.avt_mgr.n_avts--; +- /* +- * TODO: +- * If the allowed number of process groups are very large +- * We need to return unsed pages back to OS. +- * madvise(addr, len, MADV_DONTNEED); +- * We need tracking wich page can be returned +- */ +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_FREE_AVTID); +- return 0; +-} +- +-static inline int MPIDIU_new_avt(int size, int *avtid) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_av_table_t *new_av_table; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_NEW_AVT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_NEW_AVT); +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " new_avt: size=%d", size)); +- +- MPIDIU_get_next_avtid(avtid); +- +- new_av_table = (MPIDI_av_table_t *) MPL_malloc(size * sizeof(MPIDI_av_entry_t) +- + sizeof(MPIDI_av_table_t), MPL_MEM_ADDRESS); +- new_av_table->size = size; +- MPIDI_av_table[*avtid] = new_av_table; +- +- MPIR_Object_set_ref(MPIDI_av_table[*avtid], 0); +- +- MPIDIU_alloc_globals_for_avtid(*avtid); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_NEW_AVT); +- return mpi_errno; +-} +- +-static inline int MPIDIU_free_avt(int avtid) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_FREE_AVT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_FREE_AVT); +- +- MPIDIU_free_globals_for_avtid(avtid); +- MPL_free(MPIDI_av_table[avtid]); +- MPIDI_av_table[avtid] = NULL; +- MPIDIU_free_avtid(avtid); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_FREE_AVT); +- return mpi_errno; +-} +- +-static inline int MPIDIU_avt_add_ref(int avtid) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AVT_ADD_REF); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AVT_ADD_REF); +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " incr avtid=%d", avtid)); +- MPIR_Object_add_ref(MPIDI_av_table[avtid]); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AVT_ADD_REF); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDIU_avt_release_ref(int avtid) +-{ +- int in_use; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AVT_RELEASE_REF); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AVT_RELEASE_REF); +- +- MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL, VERBOSE, (MPL_DBG_FDEST, " decr avtid=%d", avtid)); +- MPIR_Object_release_ref(MPIDIU_get_av_table(avtid), &in_use); +- if (!in_use) { +- MPIDIU_free_avt(avtid); +- MPIDIU_free_globals_for_avtid(avtid); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AVT_RELEASE_REF); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDIU_avt_init() +-{ +- int i, mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AVT_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AVT_INIT); +- +- MPIDI_CH4_Global.avt_mgr.mmapped_size = 8 * 4 * 1024; +- MPIDI_CH4_Global.avt_mgr.max_n_avts = 1; +- MPIDI_CH4_Global.avt_mgr.next_avtid = 0; +- MPIDI_CH4_Global.avt_mgr.n_avts = 0; +- +- MPIDI_av_table = (MPIDI_av_table_t **) +- MPL_mmap(NULL, MPIDI_CH4_Global.avt_mgr.mmapped_size, +- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0, MPL_MEM_ADDRESS); +- MPIR_ERR_CHKANDSTMT(MPIDI_av_table == MAP_FAILED, mpi_errno, MPI_ERR_NO_MEM, +- goto fn_fail, "**nomem"); +- +- MPIDI_CH4_Global.node_map = (int **) +- MPL_mmap(NULL, MPIDI_CH4_Global.avt_mgr.mmapped_size, +- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0, MPL_MEM_ADDRESS); +- MPIR_ERR_CHKANDSTMT(MPIDI_CH4_Global.node_map == MAP_FAILED, mpi_errno, +- MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); +- +- MPIDI_CH4_Global.avt_mgr.free_avtid = +- (int *) MPL_malloc(MPIDI_CH4_Global.avt_mgr.max_n_avts * sizeof(int), MPL_MEM_ADDRESS); +- MPIR_ERR_CHKANDSTMT(MPIDI_CH4_Global.avt_mgr.free_avtid == NULL, mpi_errno, +- MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); +- +- for (i = 0; i < MPIDI_CH4_Global.avt_mgr.max_n_avts - 1; i++) { +- MPIDI_CH4_Global.avt_mgr.free_avtid[i] = i + 1; +- } +- MPIDI_CH4_Global.avt_mgr.free_avtid[MPIDI_CH4_Global.avt_mgr.max_n_avts - 1] = -1; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AVT_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-static inline int MPIDIU_avt_destroy() +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_AVT_DESTROY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_AVT_DESTROY); +- +- MPL_munmap((void *) MPIDI_CH4_Global.node_map, MPIDI_CH4_Global.avt_mgr.mmapped_size, +- MPL_MEM_ADDRESS); +- MPL_munmap((void *) MPIDI_av_table, MPIDI_CH4_Global.avt_mgr.mmapped_size, MPL_MEM_ADDRESS); +- MPL_free(MPIDI_CH4_Global.avt_mgr.free_avtid); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_AVT_DESTROY); +- return MPI_SUCCESS; +-} +- +-static inline int MPIDIU_build_nodemap_avtid(int myrank, MPIR_Comm * comm, int sz, int avtid) +-{ +- int ret; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_BUILD_NODEMAP_AVTID); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_BUILD_NODEMAP_AVTID); +- ret = MPIDI_CH4U_build_nodemap(myrank, comm, sz, +- MPIDI_CH4_Global.node_map[avtid], &MPIDI_CH4_Global.max_node_id); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_BUILD_NODEMAP_AVTID); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_RANK_TO_LPID); + return ret; + } + +--- a/src/mpid/ch4/src/ch4r_recv.h ++++ b/src/mpid/ch4/src/ch4r_recv.h +@@ -14,117 +14,105 @@ + + #include "ch4_impl.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_reply_ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_reply_ssend(MPIR_Request * rreq) ++static inline int MPIDIG_reply_ssend(MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS, c; +- MPIDI_CH4U_ssend_ack_msg_t ack_msg; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_REPLY_SSEND); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_REPLY_SSEND); ++ MPIDIG_ssend_ack_msg_t ack_msg; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_REPLY_SSEND); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_REPLY_SSEND); + MPIR_cc_incr(rreq->cc_ptr, &c); +- ack_msg.sreq_ptr = MPIDI_CH4U_REQUEST(rreq, req->rreq.peer_req_ptr); ++ ack_msg.sreq_ptr = MPIDIG_REQUEST(rreq, req->rreq.peer_req_ptr); + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) ++ if (MPIDI_REQUEST(rreq, is_local)) + mpi_errno = +- MPIDI_SHM_am_isend_reply(MPIDI_CH4U_REQUEST(rreq, context_id), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_SSEND_ACK, &ack_msg, ++ MPIDI_SHM_am_isend_reply(MPIDIG_REQUEST(rreq, context_id), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_SSEND_ACK, &ack_msg, + sizeof(ack_msg), NULL, 0, MPI_DATATYPE_NULL, rreq); + else + #endif + { + mpi_errno = +- MPIDI_NM_am_isend_reply(MPIDI_CH4U_REQUEST(rreq, context_id), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_SSEND_ACK, &ack_msg, ++ MPIDI_NM_am_isend_reply(MPIDIG_REQUEST(rreq, context_id), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_SSEND_ACK, &ack_msg, + sizeof(ack_msg), NULL, 0, MPI_DATATYPE_NULL, rreq); + } + + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_REPLY_SSEND); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_REPLY_SSEND); + return mpi_errno; + fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_handle_unexp_mrecv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_handle_unexp_mrecv(MPIR_Request * rreq) ++static inline int MPIDIG_handle_unexp_mrecv(MPIR_Request * rreq) + { + int mpi_errno = MPI_SUCCESS; + size_t message_sz; +- MPI_Aint last; + int dt_contig; + MPI_Aint dt_true_lb; + MPIR_Datatype *dt_ptr; +- size_t data_sz, dt_sz; +- MPIR_Segment *segment_ptr; ++ size_t data_sz ATTRIBUTE((unused)), dt_sz, nbytes; + void *buf; + MPI_Aint count; + MPI_Datatype datatype; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_HANDLE_UNEXP_MRECV); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_HANDLE_UNEXP_MRECV); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_HANDLE_UNEXP_MRECV); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_HANDLE_UNEXP_MRECV); + +- rreq->status.MPI_SOURCE = MPIDI_CH4U_REQUEST(rreq, rank); +- rreq->status.MPI_TAG = MPIDI_CH4U_REQUEST(rreq, tag); ++ rreq->status.MPI_SOURCE = MPIDIG_REQUEST(rreq, rank); ++ rreq->status.MPI_TAG = MPIDIG_REQUEST(rreq, tag); + +- buf = MPIDI_CH4U_REQUEST(rreq, req->rreq.mrcv_buffer); +- count = MPIDI_CH4U_REQUEST(rreq, req->rreq.mrcv_count); +- datatype = MPIDI_CH4U_REQUEST(rreq, req->rreq.mrcv_datatype); ++ buf = MPIDIG_REQUEST(rreq, req->rreq.mrcv_buffer); ++ count = MPIDIG_REQUEST(rreq, req->rreq.mrcv_count); ++ datatype = MPIDIG_REQUEST(rreq, req->rreq.mrcv_datatype); + +- message_sz = MPIDI_CH4U_REQUEST(rreq, count); ++ message_sz = MPIDIG_REQUEST(rreq, count); + MPIR_Datatype_get_size_macro(datatype, dt_sz); +- MPIR_ERR_CHKANDJUMP(dt_sz == 0, mpi_errno, MPI_ERR_OTHER, "**dtype"); + + if (message_sz > count * dt_sz) { + rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE; ++ nbytes = dt_sz * count; + } else { + rreq->status.MPI_ERROR = MPI_SUCCESS; +- count = message_sz / dt_sz; ++ nbytes = message_sz; + } + +- MPIR_STATUS_SET_COUNT(rreq->status, count * dt_sz); ++ MPIR_STATUS_SET_COUNT(rreq->status, nbytes); + MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb); + + if (!dt_contig) { +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_ERR_CHKANDJUMP1(segment_ptr == NULL, mpi_errno, +- MPI_ERR_OTHER, "**nomem", "**nomem %s", "Recv MPIR_Segment_alloc"); +- MPIR_Segment_init(buf, count, datatype, segment_ptr); +- +- last = count * dt_sz; +- MPIR_Segment_unpack(segment_ptr, 0, &last, MPIDI_CH4U_REQUEST(rreq, buffer)); +- MPIR_Segment_free(segment_ptr); +- if (last != (MPI_Aint) (count * dt_sz)) { ++ MPI_Aint actual_unpack_bytes; ++ mpi_errno = MPIR_Typerep_unpack(MPIDIG_REQUEST(rreq, buffer), nbytes, buf, ++ count, datatype, 0, &actual_unpack_bytes); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (actual_unpack_bytes != (MPI_Aint) nbytes) { + mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + __FUNCTION__, __LINE__, + MPI_ERR_TYPE, "**dtypemismatch", 0); + rreq->status.MPI_ERROR = mpi_errno; + } + } else { +- MPIR_Memcpy((char *) buf + dt_true_lb, MPIDI_CH4U_REQUEST(rreq, buffer), data_sz); ++ MPIR_Memcpy((char *) buf + dt_true_lb, MPIDIG_REQUEST(rreq, buffer), nbytes); + } + +- MPL_free(MPIDI_CH4U_REQUEST(rreq, buffer)); ++ MPL_free(MPIDIG_REQUEST(rreq, buffer)); + rreq->kind = MPIR_REQUEST_KIND__RECV; + +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_PEER_SSEND) { +- mpi_errno = MPIDI_reply_ssend(rreq); ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_PEER_SSEND) { ++ mpi_errno = MPIDIG_reply_ssend(rreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + } + MPID_Request_complete(rreq); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_HANDLE_UNEXP_MRECV); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_HANDLE_UNEXP_MRECV); + return mpi_errno; + fn_fail: + goto fn_exit; +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_recvq.c +@@ -0,0 +1,45 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ch4r_recvq.h" ++ ++int MPIDIG_recvq_init(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_T_PVAR_LEVEL_REGISTER_STATIC(RECVQ, MPI_UNSIGNED, posted_recvq_length, 0, /* init value */ ++ MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ ++ "length of the posted message receive queue"); ++ ++ MPIR_T_PVAR_LEVEL_REGISTER_STATIC(RECVQ, MPI_UNSIGNED, unexpected_recvq_length, 0, /* init value */ ++ MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ ++ "length of the unexpected message receive queue"); ++ ++ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(RECVQ, MPI_UNSIGNED_LONG_LONG, posted_recvq_match_attempts, MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ ++ "number of search passes on the posted message receive queue"); ++ ++ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(RECVQ, ++ MPI_UNSIGNED_LONG_LONG, ++ unexpected_recvq_match_attempts, ++ MPI_T_VERBOSITY_USER_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), ++ "CH4", ++ "number of search passes on the unexpected message receive queue"); ++ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RECVQ, MPI_DOUBLE, time_failed_matching_postedq, MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ ++ "total time spent on unsuccessful search passes on the posted receives queue"); ++ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RECVQ, MPI_DOUBLE, time_matching_unexpectedq, MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ ++ "total time spent on search passes on the unexpected receive queue"); ++ ++ return mpi_errno; ++} +--- a/src/mpid/ch4/src/ch4r_recvq.h ++++ b/src/mpid/ch4/src/ch4r_recvq.h +@@ -23,124 +23,69 @@ extern unsigned long long PVAR_COUNTER_unexpected_recvq_match_attempts ATTRIBUTE + extern MPIR_T_pvar_timer_t PVAR_TIMER_time_failed_matching_postedq ATTRIBUTE((unused)); + extern MPIR_T_pvar_timer_t PVAR_TIMER_time_matching_unexpectedq ATTRIBUTE((unused)); + ++int MPIDIG_recvq_init(void); ++ + MPL_STATIC_INLINE_PREFIX int MPIDIG_match_posted(int rank, int tag, + MPIR_Context_id_t context_id, MPIR_Request * req) + { +- return (rank == MPIDI_CH4U_REQUEST(req, rank) || +- MPIDI_CH4U_REQUEST(req, rank) == MPI_ANY_SOURCE) && +- (tag == MPIR_TAG_MASK_ERROR_BITS(MPIDI_CH4U_REQUEST(req, tag)) || +- MPIDI_CH4U_REQUEST(req, tag) == MPI_ANY_TAG) && +- context_id == MPIDI_CH4U_REQUEST(req, context_id); ++ return (rank == MPIDIG_REQUEST(req, rank) || MPIDIG_REQUEST(req, rank) == MPI_ANY_SOURCE) && ++ (tag == MPIR_TAG_MASK_ERROR_BITS(MPIDIG_REQUEST(req, tag)) || ++ MPIDIG_REQUEST(req, tag) == MPI_ANY_TAG) && context_id == MPIDIG_REQUEST(req, context_id); + } + + MPL_STATIC_INLINE_PREFIX int MPIDIG_match_unexp(int rank, int tag, + MPIR_Context_id_t context_id, MPIR_Request * req) + { +- return (rank == MPIDI_CH4U_REQUEST(req, rank) || rank == MPI_ANY_SOURCE) && +- (tag == MPIR_TAG_MASK_ERROR_BITS(MPIDI_CH4U_REQUEST(req, tag)) || +- tag == MPI_ANY_TAG) && context_id == MPIDI_CH4U_REQUEST(req, context_id); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_Recvq_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_Recvq_init(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_T_PVAR_LEVEL_REGISTER_STATIC(RECVQ, MPI_UNSIGNED, posted_recvq_length, 0, /* init value */ +- MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ +- "length of the posted message receive queue"); +- +- MPIR_T_PVAR_LEVEL_REGISTER_STATIC(RECVQ, MPI_UNSIGNED, unexpected_recvq_length, 0, /* init value */ +- MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ +- "length of the unexpected message receive queue"); +- +- MPIR_T_PVAR_COUNTER_REGISTER_STATIC(RECVQ, MPI_UNSIGNED_LONG_LONG, posted_recvq_match_attempts, MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ +- "number of search passes on the posted message receive queue"); +- +- MPIR_T_PVAR_COUNTER_REGISTER_STATIC(RECVQ, +- MPI_UNSIGNED_LONG_LONG, +- unexpected_recvq_match_attempts, +- MPI_T_VERBOSITY_USER_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), +- "CH4", +- "number of search passes on the unexpected message receive queue"); +- +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RECVQ, MPI_DOUBLE, time_failed_matching_postedq, MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ +- "total time spent on unsuccessful search passes on the posted receives queue"); +- +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RECVQ, MPI_DOUBLE, time_matching_unexpectedq, MPI_T_VERBOSITY_USER_DETAIL, MPI_T_BIND_NO_OBJECT, (MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS), "CH4", /* category name */ +- "total time spent on search passes on the unexpected receive queue"); +- +- return mpi_errno; ++ return (rank == MPIDIG_REQUEST(req, rank) || rank == MPI_ANY_SOURCE) && ++ (tag == MPIR_TAG_MASK_ERROR_BITS(MPIDIG_REQUEST(req, tag)) || ++ tag == MPI_ANY_TAG) && context_id == MPIDIG_REQUEST(req, context_id); + } + + #ifdef MPIDI_CH4U_USE_PER_COMM_QUEUE + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_enqueue_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_enqueue_posted(MPIR_Request * req, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_enqueue_posted(MPIR_Request * req, MPIDIG_rreq_t ** list) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_ENQUEUE_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_ENQUEUE_POSTED); +- MPIDI_CH4U_REQUEST(req, req->rreq.request) = (uint64_t) req; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ENQUEUE_POSTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ENQUEUE_POSTED); ++ MPIDIG_REQUEST(req, req->rreq.request) = (uint64_t) req; + DL_APPEND(*list, &req->dev.ch4.am.req->rreq); + MPIR_T_PVAR_LEVEL_INC(RECVQ, posted_recvq_length, 1); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_ENQUEUE_POSTED); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ENQUEUE_POSTED); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_enqueue_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_enqueue_unexp(MPIR_Request * req, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_enqueue_unexp(MPIR_Request * req, MPIDIG_rreq_t ** list) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_ENQUEUE_UNEXP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_ENQUEUE_UNEXP); +- MPIDI_CH4U_REQUEST(req, req->rreq.request) = (uint64_t) req; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ENQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ENQUEUE_UNEXP); ++ MPIDIG_REQUEST(req, req->rreq.request) = (uint64_t) req; + DL_APPEND(*list, &req->dev.ch4.am.req->rreq); + MPIR_T_PVAR_LEVEL_INC(RECVQ, unexpected_recvq_length, 1); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_ENQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ENQUEUE_UNEXP); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_delete_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_delete_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_delete_unexp(MPIR_Request * req, MPIDIG_rreq_t ** list) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DELETE_UNEXP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DELETE_UNEXP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DELETE_UNEXP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DELETE_UNEXP); + DL_DELETE(*list, &req->dev.ch4.am.req->rreq); + MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_length, 1); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DELETE_UNEXP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DELETE_UNEXP); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_dequeue_unexp_strict +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(int rank, +- int tag, +- MPIR_Context_id_t context_id, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_dequeue_unexp_strict(int rank, int tag, ++ MPIR_Context_id_t context_id, ++ MPIDIG_rreq_t ** list) + { +- MPIDI_CH4U_rreq_t *curr, *tmp; ++ MPIDIG_rreq_t *curr, *tmp; + MPIR_Request *req = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP_STRICT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP_STRICT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DEQUEUE_UNEXP_STRICT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DEQUEUE_UNEXP_STRICT); + + MPIR_T_PVAR_TIMER_START(RECVQ, time_matching_unexpectedq); + DL_FOREACH_SAFE(*list, curr, tmp) { + MPIR_T_PVAR_COUNTER_INC(RECVQ, unexpected_recvq_match_attempts, 1); + req = (MPIR_Request *) curr->request; +- if (!(MPIDI_CH4U_REQUEST(req, req->status) & MPIDI_CH4U_REQ_BUSY) && ++ if (!(MPIDIG_REQUEST(req, req->status) & MPIDIG_REQ_BUSY) && + MPIDIG_match_unexp(rank, tag, context_id, req)) { + DL_DELETE(*list, curr); + MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_length, 1); +@@ -149,23 +94,18 @@ MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(int rank, + req = NULL; + } + MPIR_T_PVAR_TIMER_END(RECVQ, time_matching_unexpectedq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP_STRICT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DEQUEUE_UNEXP_STRICT); + return req; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_dequeue_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp(int rank, +- int tag, +- MPIR_Context_id_t context_id, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_dequeue_unexp(int rank, int tag, ++ MPIR_Context_id_t context_id, ++ MPIDIG_rreq_t ** list) + { +- MPIDI_CH4U_rreq_t *curr, *tmp; ++ MPIDIG_rreq_t *curr, *tmp; + MPIR_Request *req = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DEQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DEQUEUE_UNEXP); + + MPIR_T_PVAR_TIMER_START(RECVQ, time_matching_unexpectedq); + DL_FOREACH_SAFE(*list, curr, tmp) { +@@ -179,23 +119,18 @@ MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp(int rank, + req = NULL; + } + MPIR_T_PVAR_TIMER_END(RECVQ, time_matching_unexpectedq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DEQUEUE_UNEXP); + return req; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_find_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_find_unexp(int rank, +- int tag, +- MPIR_Context_id_t context_id, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_find_unexp(int rank, int tag, ++ MPIR_Context_id_t context_id, ++ MPIDIG_rreq_t ** list) + { +- MPIDI_CH4U_rreq_t *curr, *tmp; ++ MPIDIG_rreq_t *curr, *tmp; + MPIR_Request *req = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_FIND_UNEXP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_FIND_UNEXP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_FIND_UNEXP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_FIND_UNEXP); + + MPIR_T_PVAR_TIMER_START(RECVQ, time_matching_unexpectedq); + DL_FOREACH_SAFE(*list, curr, tmp) { +@@ -207,23 +142,18 @@ MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_find_unexp(int rank, + req = NULL; + } + MPIR_T_PVAR_TIMER_END(RECVQ, time_matching_unexpectedq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_FIND_UNEXP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_FIND_UNEXP); + return req; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_dequeue_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_posted(int rank, +- int tag, +- MPIR_Context_id_t context_id, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_dequeue_posted(int rank, int tag, ++ MPIR_Context_id_t context_id, ++ MPIDIG_rreq_t ** list) + { + MPIR_Request *req = NULL; +- MPIDI_CH4U_rreq_t *curr, *tmp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DEQUEUE_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DEQUEUE_POSTED); ++ MPIDIG_rreq_t *curr, *tmp; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DEQUEUE_POSTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DEQUEUE_POSTED); + + MPIR_T_PVAR_TIMER_START(RECVQ, time_failed_matching_postedq); + DL_FOREACH_SAFE(*list, curr, tmp) { +@@ -239,21 +169,16 @@ MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_posted(int rank, + if (!req) + MPIR_T_PVAR_TIMER_END(RECVQ, time_failed_matching_postedq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DEQUEUE_POSTED); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DEQUEUE_POSTED); + return req; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_delete_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_delete_posted(MPIDIG_rreq_t * req, MPIDIG_rreq_t ** list) + { + int found = 0; +- MPIDI_CH4U_rreq_t *curr, *tmp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DELETE_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DELETE_POSTED); ++ MPIDIG_rreq_t *curr, *tmp; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DELETE_POSTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DELETE_POSTED); + MPIR_T_PVAR_TIMER_START(RECVQ, time_failed_matching_postedq); + DL_FOREACH_SAFE(*list, curr, tmp) { + MPIR_T_PVAR_COUNTER_INC(RECVQ, posted_recvq_match_attempts, 1); +@@ -267,7 +192,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req, + if (!found) + MPIR_T_PVAR_TIMER_END(RECVQ, time_failed_matching_postedq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DELETE_POSTED); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DELETE_POSTED); + return found; + } + +@@ -275,126 +200,97 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req, + + /* Use global queue */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_enqueue_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_enqueue_posted(MPIR_Request * req, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_enqueue_posted(MPIR_Request * req, MPIDIG_rreq_t ** list) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_ENQUEUE_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_ENQUEUE_POSTED); +- MPIDI_CH4U_REQUEST(req, req->rreq.request) = (uint64_t) req; +- DL_APPEND(MPIDI_CH4_Global.posted_list, &req->dev.ch4.am.req->rreq); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ENQUEUE_POSTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ENQUEUE_POSTED); ++ MPIDIG_REQUEST(req, req->rreq.request) = (uint64_t) req; ++ DL_APPEND(MPIDI_global.posted_list, &req->dev.ch4.am.req->rreq); + MPIR_T_PVAR_LEVEL_INC(RECVQ, posted_recvq_length, 1); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_ENQUEUE_POSTED); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ENQUEUE_POSTED); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_enqueue_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_enqueue_unexp(MPIR_Request * req, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_enqueue_unexp(MPIR_Request * req, MPIDIG_rreq_t ** list) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_ENQUEUE_UNEXP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_ENQUEUE_UNEXP); +- MPIDI_CH4U_REQUEST(req, req->rreq.request) = (uint64_t) req; +- DL_APPEND(MPIDI_CH4_Global.unexp_list, &req->dev.ch4.am.req->rreq); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ENQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ENQUEUE_UNEXP); ++ MPIDIG_REQUEST(req, req->rreq.request) = (uint64_t) req; ++ DL_APPEND(MPIDI_global.unexp_list, &req->dev.ch4.am.req->rreq); + MPIR_T_PVAR_LEVEL_INC(RECVQ, unexpected_recvq_length, 1); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_ENQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ENQUEUE_UNEXP); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_delete_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_delete_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_delete_unexp(MPIR_Request * req, MPIDIG_rreq_t ** list) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DELETE_UNEXP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DELETE_UNEXP); +- DL_DELETE(MPIDI_CH4_Global.unexp_list, &req->dev.ch4.am.req->rreq); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DELETE_UNEXP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DELETE_UNEXP); ++ DL_DELETE(MPIDI_global.unexp_list, &req->dev.ch4.am.req->rreq); + MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_length, 1); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DELETE_UNEXP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DELETE_UNEXP); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_dequeue_unexp_strict +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(int rank, +- int tag, +- MPIR_Context_id_t context_id, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_dequeue_unexp_strict(int rank, int tag, ++ MPIR_Context_id_t context_id, ++ MPIDIG_rreq_t ** list) + { +- MPIDI_CH4U_rreq_t *curr, *tmp; ++ MPIDIG_rreq_t *curr, *tmp; + MPIR_Request *req = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP_STRICT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP_STRICT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DEQUEUE_UNEXP_STRICT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DEQUEUE_UNEXP_STRICT); + + MPIR_T_PVAR_TIMER_START(RECVQ, time_matching_unexpectedq); +- DL_FOREACH_SAFE(MPIDI_CH4_Global.unexp_list, curr, tmp) { ++ DL_FOREACH_SAFE(MPIDI_global.unexp_list, curr, tmp) { + MPIR_T_PVAR_COUNTER_INC(RECVQ, unexpected_recvq_match_attempts, 1); + req = (MPIR_Request *) curr->request; +- if (!(MPIDI_CH4U_REQUEST(req, req->status) & MPIDI_CH4U_REQ_BUSY) && ++ if (!(MPIDIG_REQUEST(req, req->status) & MPIDIG_REQ_BUSY) && + MPIDIG_match_unexp(rank, tag, context_id, req)) { +- DL_DELETE(MPIDI_CH4_Global.unexp_list, curr); ++ DL_DELETE(MPIDI_global.unexp_list, curr); + MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_length, 1); + break; + } + req = NULL; + } + MPIR_T_PVAR_TIMER_END(RECVQ, time_matching_unexpectedq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP_STRICT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DEQUEUE_UNEXP_STRICT); + return req; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_dequeue_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp(int rank, +- int tag, +- MPIR_Context_id_t context_id, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_dequeue_unexp(int rank, int tag, ++ MPIR_Context_id_t context_id, ++ MPIDIG_rreq_t ** list) + { +- MPIDI_CH4U_rreq_t *curr, *tmp; ++ MPIDIG_rreq_t *curr, *tmp; + MPIR_Request *req = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DEQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DEQUEUE_UNEXP); + + MPIR_T_PVAR_TIMER_START(RECVQ, time_matching_unexpectedq); +- DL_FOREACH_SAFE(MPIDI_CH4_Global.unexp_list, curr, tmp) { ++ DL_FOREACH_SAFE(MPIDI_global.unexp_list, curr, tmp) { + MPIR_T_PVAR_COUNTER_INC(RECVQ, unexpected_recvq_match_attempts, 1); + req = (MPIR_Request *) curr->request; + if (MPIDIG_match_unexp(rank, tag, context_id, req)) { +- DL_DELETE(MPIDI_CH4_Global.unexp_list, curr); ++ DL_DELETE(MPIDI_global.unexp_list, curr); + MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_length, 1); + break; + } + req = NULL; + } + MPIR_T_PVAR_TIMER_END(RECVQ, time_matching_unexpectedq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DEQUEUE_UNEXP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DEQUEUE_UNEXP); + return req; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_find_unexp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_find_unexp(int rank, +- int tag, +- MPIR_Context_id_t context_id, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_find_unexp(int rank, int tag, ++ MPIR_Context_id_t context_id, ++ MPIDIG_rreq_t ** list) + { +- MPIDI_CH4U_rreq_t *curr, *tmp; ++ MPIDIG_rreq_t *curr, *tmp; + MPIR_Request *req = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_FIND_UNEXP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_FIND_UNEXP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_FIND_UNEXP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_FIND_UNEXP); + + MPIR_T_PVAR_TIMER_START(RECVQ, time_matching_unexpectedq); +- DL_FOREACH_SAFE(MPIDI_CH4_Global.unexp_list, curr, tmp) { ++ DL_FOREACH_SAFE(MPIDI_global.unexp_list, curr, tmp) { + MPIR_T_PVAR_COUNTER_INC(RECVQ, unexpected_recvq_match_attempts, 1); + req = (MPIR_Request *) curr->request; + if (MPIDIG_match_unexp(rank, tag, context_id, req)) { +@@ -403,30 +299,25 @@ MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_find_unexp(int rank, + req = NULL; + } + MPIR_T_PVAR_TIMER_END(RECVQ, time_matching_unexpectedq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_FIND_UNEXP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_FIND_UNEXP); + return req; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_dequeue_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_posted(int rank, +- int tag, +- MPIR_Context_id_t context_id, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_dequeue_posted(int rank, int tag, ++ MPIR_Context_id_t context_id, ++ MPIDIG_rreq_t ** list) + { + MPIR_Request *req = NULL; +- MPIDI_CH4U_rreq_t *curr, *tmp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DEQUEUE_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DEQUEUE_POSTED); ++ MPIDIG_rreq_t *curr, *tmp; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DEQUEUE_POSTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DEQUEUE_POSTED); + + MPIR_T_PVAR_TIMER_START(RECVQ, time_failed_matching_postedq); +- DL_FOREACH_SAFE(MPIDI_CH4_Global.posted_list, curr, tmp) { ++ DL_FOREACH_SAFE(MPIDI_global.posted_list, curr, tmp) { + MPIR_T_PVAR_COUNTER_INC(RECVQ, posted_recvq_match_attempts, 1); + req = (MPIR_Request *) curr->request; + if (MPIDIG_match_posted(rank, tag, context_id, req)) { +- DL_DELETE(MPIDI_CH4_Global.posted_list, curr); ++ DL_DELETE(MPIDI_global.posted_list, curr); + MPIR_T_PVAR_LEVEL_DEC(RECVQ, posted_recvq_length, 1); + break; + } +@@ -435,26 +326,21 @@ MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_posted(int rank, + if (!req) + MPIR_T_PVAR_TIMER_END(RECVQ, time_failed_matching_postedq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DEQUEUE_POSTED); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DEQUEUE_POSTED); + return req; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_delete_posted +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req, +- MPIDI_CH4U_rreq_t ** list) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_delete_posted(MPIDIG_rreq_t * req, MPIDIG_rreq_t ** list) + { + int found = 0; +- MPIDI_CH4U_rreq_t *curr, *tmp; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_DELETE_POSTED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_DELETE_POSTED); ++ MPIDIG_rreq_t *curr, *tmp; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DELETE_POSTED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DELETE_POSTED); + MPIR_T_PVAR_TIMER_START(RECVQ, time_failed_matching_postedq); +- DL_FOREACH_SAFE(MPIDI_CH4_Global.posted_list, curr, tmp) { ++ DL_FOREACH_SAFE(MPIDI_global.posted_list, curr, tmp) { + MPIR_T_PVAR_COUNTER_INC(RECVQ, posted_recvq_match_attempts, 1); + if (curr == req) { +- DL_DELETE(MPIDI_CH4_Global.posted_list, curr); ++ DL_DELETE(MPIDI_global.posted_list, curr); + found = 1; + MPIR_T_PVAR_LEVEL_DEC(RECVQ, posted_recvq_length, 1); + break; +@@ -463,7 +349,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req, + if (!found) + MPIR_T_PVAR_TIMER_END(RECVQ, time_failed_matching_postedq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_DELETE_POSTED); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DELETE_POSTED); + return found; + } + +--- a/src/mpid/ch4/src/ch4r_request.h ++++ b/src/mpid/ch4/src/ch4r_request.h +@@ -14,17 +14,13 @@ + #include "ch4_types.h" + #include "ch4r_buf.h" + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4I_am_request_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline MPIR_Request *MPIDI_CH4I_am_request_create(MPIR_Request_kind_t kind, int ref_count) ++static inline MPIR_Request *MPIDIG_request_create(MPIR_Request_kind_t kind, int ref_count) + { + MPIR_Request *req; + int i; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_AM_REQUEST_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_AM_REQUEST_CREATE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_REQUEST_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_REQUEST_CREATE); + + req = MPIR_Request_create(kind); + if (req == NULL) +@@ -43,96 +39,85 @@ static inline MPIR_Request *MPIDI_CH4I_am_request_create(MPIR_Request_kind_t kin + MPIR_Request_add_ref(req); + + MPIDI_NM_am_request_init(req); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_SHM_am_request_init(req); ++#endif + +- CH4_COMPILE_TIME_ASSERT(sizeof(MPIDI_CH4U_req_ext_t) <= MPIDI_CH4I_BUF_POOL_SZ); +- MPIDI_CH4U_REQUEST(req, req) = +- (MPIDI_CH4U_req_ext_t *) MPIDI_CH4R_get_buf(MPIDI_CH4_Global.buf_pool); +- MPIR_Assert(MPIDI_CH4U_REQUEST(req, req)); +- MPIDI_CH4U_REQUEST(req, req->status) = 0; ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPIDIG_req_ext_t) <= MPIDIU_BUF_POOL_SZ); ++ MPIDIG_REQUEST(req, req) = (MPIDIG_req_ext_t *) MPIDIU_get_buf(MPIDI_global.buf_pool); ++ MPIR_Assert(MPIDIG_REQUEST(req, req)); ++ MPIDIG_REQUEST(req, req->status) = 0; + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_AM_REQUEST_CREATE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_REQUEST_CREATE); + return req; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4I_am_request_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4I_am_request_init(MPIR_Request * req, +- MPIR_Request_kind_t kind, +- int ref_increment) ++MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDIG_request_init(MPIR_Request * req, ++ MPIR_Request_kind_t kind) + { +- int i; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_AM_REQUEST_INIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_AM_REQUEST_INIT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_REQUEST_INIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_REQUEST_INIT); + + MPIR_Assert(req != NULL); +- for (i = 0; i < ref_increment - 1; i++) +- MPIR_Request_add_ref(req); ++ /* Increment the refcount by one to account for the MPIDIG layer */ ++ MPIR_Request_add_ref(req); + + MPIDI_NM_am_request_init(req); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_SHM_am_request_init(req); ++#endif + +- CH4_COMPILE_TIME_ASSERT(sizeof(MPIDI_CH4U_req_ext_t) <= MPIDI_CH4I_BUF_POOL_SZ); +- MPIDI_CH4U_REQUEST(req, req) = +- (MPIDI_CH4U_req_ext_t *) MPIDI_CH4R_get_buf(MPIDI_CH4_Global.buf_pool); +- MPIR_Assert(MPIDI_CH4U_REQUEST(req, req)); +- MPIDI_CH4U_REQUEST(req, req->status) = 0; ++ MPL_COMPILE_TIME_ASSERT(sizeof(MPIDIG_req_ext_t) <= MPIDIU_BUF_POOL_SZ); ++ MPIDIG_REQUEST(req, req) = (MPIDIG_req_ext_t *) MPIDIU_get_buf(MPIDI_global.buf_pool); ++ MPIR_Assert(MPIDIG_REQUEST(req, req)); ++ MPIDIG_REQUEST(req, req->status) = 0; + +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_AM_REQUEST_INIT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_REQUEST_INIT); + return req; +- fn_fail: +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4I_am_request_copy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_am_request_copy(MPIR_Request * dest, MPIR_Request * src) ++MPL_STATIC_INLINE_PREFIX void MPIDIG_request_copy(MPIR_Request * dest, MPIR_Request * src) + { +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_AM_REQUEST_COPY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_AM_REQUEST_COPY); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_REQUEST_COPY); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_REQUEST_COPY); + + MPIR_Assert(dest != NULL && src != NULL); + MPIDI_NM_am_request_init(dest); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_SHM_am_request_init(dest); ++#endif + +- MPIDI_CH4U_REQUEST(dest, req) = MPIDI_CH4U_REQUEST(src, req);; +- MPIDI_CH4U_REQUEST(dest, req->rreq.request) = (uint64_t) dest; +- MPIDI_CH4U_REQUEST(dest, datatype) = MPIDI_CH4U_REQUEST(src, datatype); +- MPIDI_CH4U_REQUEST(dest, buffer) = MPIDI_CH4U_REQUEST(src, buffer); +- MPIDI_CH4U_REQUEST(dest, count) = MPIDI_CH4U_REQUEST(src, count); +- MPIDI_CH4U_REQUEST(dest, rank) = MPIDI_CH4U_REQUEST(src, rank); +- MPIDI_CH4U_REQUEST(dest, tag) = MPIDI_CH4U_REQUEST(src, tag); +- MPIDI_CH4U_REQUEST(dest, context_id) = MPIDI_CH4U_REQUEST(src, context_id); +- MPIDI_CH4U_REQUEST(dest, req->status) = MPIDI_CH4U_REQUEST(src, req->status); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_AM_REQUEST_COPY); ++ MPIDIG_REQUEST(dest, req) = MPIDIG_REQUEST(src, req);; ++ MPIDIG_REQUEST(dest, req->rreq.request) = (uint64_t) dest; ++ MPIDIG_REQUEST(dest, datatype) = MPIDIG_REQUEST(src, datatype); ++ MPIDIG_REQUEST(dest, buffer) = MPIDIG_REQUEST(src, buffer); ++ MPIDIG_REQUEST(dest, count) = MPIDIG_REQUEST(src, count); ++ MPIDIG_REQUEST(dest, rank) = MPIDIG_REQUEST(src, rank); ++ MPIDIG_REQUEST(dest, tag) = MPIDIG_REQUEST(src, tag); ++ MPIDIG_REQUEST(dest, context_id) = MPIDIG_REQUEST(src, context_id); ++ MPIDIG_REQUEST(dest, req->status) = MPIDIG_REQUEST(src, req->status); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_REQUEST_COPY); + return; +- fn_fail: +- goto fn_exit; + } + + /* This function should be called any time an anysource request is matched so + * the upper layer will have a chance to arbitrate who wins the race between + * the netmod and the shmod. This will cancel the request of the other side and + * take care of copying any relevant data. */ +-static inline int MPIDI_CH4R_anysource_matched(MPIR_Request * rreq, int caller, +- int *continue_matching) ++static inline int MPIDI_anysource_matched(MPIR_Request * rreq, int caller, int *continue_matching) + { + int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_ANYSOURCE_MATCHED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_ANYSOURCE_MATCHED); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ANYSOURCE_MATCHED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ANYSOURCE_MATCHED); + +- MPIR_Assert(MPIDI_CH4R_NETMOD == caller || MPIDI_CH4R_SHM == caller); ++ MPIR_Assert(MPIDI_NETMOD == caller || MPIDI_SHM == caller); + +- if (MPIDI_CH4R_NETMOD == caller) { ++ if (MPIDI_NETMOD == caller) { + #ifndef MPIDI_CH4_DIRECT_NETMOD + mpi_errno = MPIDI_SHM_mpi_cancel_recv(rreq); + +@@ -142,11 +127,11 @@ static inline int MPIDI_CH4R_anysource_matched(MPIR_Request * rreq, int caller, + if (MPIR_STATUS_GET_CANCEL_BIT(rreq->status)) { + /* If the request is cancelled, copy the status object from the + * partner request */ +- rreq->status = MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(rreq)->status; ++ rreq->status = MPIDI_REQUEST_ANYSOURCE_PARTNER(rreq)->status; + } + #endif + *continue_matching = 0; +- } else if (MPIDI_CH4R_SHM == caller) { ++ } else if (MPIDI_SHM == caller) { + mpi_errno = MPIDI_NM_mpi_cancel_recv(rreq); + + /* If the netmod has already matched this request, shared memory will +@@ -154,7 +139,7 @@ static inline int MPIDI_CH4R_anysource_matched(MPIR_Request * rreq, int caller, + *continue_matching = !MPIR_STATUS_GET_CANCEL_BIT(rreq->status); + } + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_ANYSOURCE_MATCHED); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ANYSOURCE_MATCHED); + return mpi_errno; + } + +--- a/src/mpid/ch4/src/ch4r_rma.h ++++ b/src/mpid/ch4/src/ch4r_rma.h +@@ -15,40 +15,32 @@ + + extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_amhdr_set ATTRIBUTE((unused)); + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_do_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_do_put(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, MPIR_Win * win, +- MPIR_Request ** sreq_ptr) ++static inline int MPIDIG_do_put(const void *origin_addr, int origin_count, ++ MPI_Datatype origin_datatype, int target_rank, ++ MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, MPIR_Win * win, ++ MPIR_Request ** sreq_ptr) + { + int mpi_errno = MPI_SUCCESS, n_iov, c; + MPIR_Request *sreq = NULL; +- MPIDI_CH4U_put_msg_t am_hdr; ++ MPIDIG_put_msg_t am_hdr; + uint64_t offset; + size_t data_sz; +- MPI_Aint last, num_iov; +- MPIR_Segment *segment_ptr; ++ MPI_Aint num_iov; + struct iovec *dt_iov, am_iov[2]; + size_t am_hdr_max_size; + #ifndef MPIDI_CH4_DIRECT_NETMOD + int is_local; + #endif + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DO_PUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DO_PUT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DO_PUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DO_PUT); + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- is_local = MPIDI_CH4_rank_is_local(target_rank, win->comm_ptr); ++ is_local = MPIDI_rank_is_local(target_rank, win->comm_ptr); + #endif + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -70,9 +62,9 @@ static inline int MPIDI_do_put(const void *origin_addr, + /* Only create request when issuing is not completed. + * We initialize two ref_count for progress engine and request-based OP, + * then put needs to free the second ref_count.*/ +- sreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 2); ++ sreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 2); + MPIR_ERR_CHKANDSTMT(sreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- MPIDI_CH4U_REQUEST(sreq, req->preq.win_ptr) = win; ++ MPIDIG_REQUEST(sreq, req->preq.win_ptr) = win; + + MPIR_cc_incr(sreq->cc_ptr, &c); + MPIR_T_PVAR_TIMER_START(RMA, rma_amhdr_set); +@@ -81,27 +73,27 @@ static inline int MPIDI_do_put(const void *origin_addr, + am_hdr.count = target_count; + am_hdr.datatype = target_datatype; + am_hdr.preq_ptr = (uint64_t) sreq; +- am_hdr.win_id = MPIDI_CH4U_WIN(win, win_id); ++ am_hdr.win_id = MPIDIG_WIN(win, win_id); + + /* Increase local and remote completion counters and set the local completion + * counter in request, thus it can be decreased at request completion. */ +- MPIDI_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); +- MPIDI_CH4U_REQUEST(sreq, rank) = target_rank; ++ MPIDIG_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); ++ MPIDIG_REQUEST(sreq, rank) = target_rank; + + if (HANDLE_GET_KIND(target_datatype) == HANDLE_KIND_BUILTIN) { + am_hdr.n_iov = 0; + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); +- MPIDI_CH4U_REQUEST(sreq, req->preq.dt_iov) = NULL; ++ MPIDIG_REQUEST(sreq, req->preq.dt_iov) = NULL; + + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ, ++ mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDIG_PUT_REQ, + &am_hdr, sizeof(am_hdr), origin_addr, + origin_count, origin_datatype, sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ, ++ mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDIG_PUT_REQ, + &am_hdr, sizeof(am_hdr), origin_addr, + origin_count, origin_datatype, sreq); + } +@@ -111,22 +103,20 @@ static inline int MPIDI_do_put(const void *origin_addr, + goto fn_exit; + } + +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Assert(segment_ptr); +- +- MPIR_Segment_init(NULL, target_count, target_datatype, segment_ptr); +- last = data_sz; +- MPIR_Segment_count_contig_blocks(segment_ptr, 0, &last, &num_iov); ++ MPIR_Typerep_iov_len(NULL, target_count, target_datatype, 0, data_sz, &num_iov); + n_iov = (int) num_iov; + MPIR_Assert(n_iov > 0); + am_hdr.n_iov = n_iov; + dt_iov = (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_BUFFER); + MPIR_Assert(dt_iov); + +- last = data_sz; +- MPIR_Segment_pack_vector(segment_ptr, 0, &last, dt_iov, &n_iov); +- MPIR_Assert(last == (MPI_Aint) data_sz); +- MPL_free(segment_ptr); ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(NULL, target_count, target_datatype, 0, dt_iov, n_iov, data_sz, ++ &actual_iov_len, &actual_iov_bytes); ++ n_iov = actual_iov_len; ++ ++ MPIR_Assert(actual_iov_bytes == (MPI_Aint) data_sz); + + am_iov[0].iov_base = &am_hdr; + am_iov[0].iov_len = sizeof(am_hdr); +@@ -134,7 +124,7 @@ static inline int MPIDI_do_put(const void *origin_addr, + am_iov[1].iov_len = sizeof(struct iovec) * am_hdr.n_iov; + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); + +- MPIDI_CH4U_REQUEST(sreq, req->preq.dt_iov) = dt_iov; ++ MPIDIG_REQUEST(sreq, req->preq.dt_iov) = dt_iov; + + #ifndef MPIDI_CH4_DIRECT_NETMOD + am_hdr_max_size = is_local ? MPIDI_SHM_am_hdr_max_sz() : MPIDI_NM_am_hdr_max_sz(); +@@ -145,31 +135,31 @@ static inline int MPIDI_do_put(const void *origin_addr, + if ((am_iov[0].iov_len + am_iov[1].iov_len) <= am_hdr_max_size) { + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isendv(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ, ++ mpi_errno = MPIDI_SHM_am_isendv(target_rank, win->comm_ptr, MPIDIG_PUT_REQ, + &am_iov[0], 2, origin_addr, origin_count, + origin_datatype, sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isendv(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ, ++ mpi_errno = MPIDI_NM_am_isendv(target_rank, win->comm_ptr, MPIDIG_PUT_REQ, + &am_iov[0], 2, origin_addr, origin_count, + origin_datatype, sreq); + } + } else { +- MPIDI_CH4U_REQUEST(sreq, req->preq.origin_addr) = (void *) origin_addr; +- MPIDI_CH4U_REQUEST(sreq, req->preq.origin_count) = origin_count; +- MPIDI_CH4U_REQUEST(sreq, req->preq.origin_datatype) = origin_datatype; ++ MPIDIG_REQUEST(sreq, req->preq.origin_addr) = (void *) origin_addr; ++ MPIDIG_REQUEST(sreq, req->preq.origin_count) = origin_count; ++ MPIDIG_REQUEST(sreq, req->preq.origin_datatype) = origin_datatype; + MPIR_Datatype_add_ref_if_not_builtin(origin_datatype); + + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_IOV_REQ, ++ mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDIG_PUT_IOV_REQ, + &am_hdr, sizeof(am_hdr), am_iov[1].iov_base, + am_iov[1].iov_len, MPI_BYTE, sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_IOV_REQ, ++ mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDIG_PUT_IOV_REQ, + &am_hdr, sizeof(am_hdr), am_iov[1].iov_base, + am_iov[1].iov_len, MPI_BYTE, sreq); + } +@@ -180,45 +170,36 @@ static inline int MPIDI_do_put(const void *origin_addr, + fn_exit: + *sreq_ptr = sreq; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DO_PUT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DO_PUT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_do_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_do_get(void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, MPIR_Win * win, +- MPIR_Request ** sreq_ptr) ++static inline int MPIDIG_do_get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, ++ int target_rank, MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, MPIR_Win * win, ++ MPIR_Request ** sreq_ptr) + { + int mpi_errno = MPI_SUCCESS, n_iov, c; + size_t offset; + MPIR_Request *sreq = NULL; +- MPIDI_CH4U_get_req_msg_t am_hdr; ++ MPIDIG_get_msg_t am_hdr; + size_t data_sz; +- MPI_Aint last, num_iov; +- MPIR_Segment *segment_ptr; ++ MPI_Aint num_iov; + struct iovec *dt_iov; + #ifndef MPIDI_CH4_DIRECT_NETMOD + int is_local; + #endif + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DO_GET); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DO_GET); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DO_GET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DO_GET); + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- is_local = MPIDI_CH4_rank_is_local(target_rank, win->comm_ptr); ++ is_local = MPIDI_rank_is_local(target_rank, win->comm_ptr); + #endif + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -239,14 +220,15 @@ static inline int MPIDI_do_get(void *origin_addr, + /* Only create request when issuing is not completed. + * We initialize two ref_count for progress engine and request-based OP, + * then get needs to free the second ref_count.*/ +- sreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 2); ++ sreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 2); + MPIR_ERR_CHKANDSTMT(sreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + +- MPIDI_CH4U_REQUEST(sreq, req->greq.win_ptr) = win; +- MPIDI_CH4U_REQUEST(sreq, req->greq.addr) = (uint64_t) ((char *) origin_addr); +- MPIDI_CH4U_REQUEST(sreq, req->greq.count) = origin_count; +- MPIDI_CH4U_REQUEST(sreq, req->greq.datatype) = origin_datatype; +- MPIDI_CH4U_REQUEST(sreq, rank) = target_rank; ++ MPIDIG_REQUEST(sreq, req->greq.win_ptr) = win; ++ MPIDIG_REQUEST(sreq, req->greq.addr) = (uint64_t) ((char *) origin_addr); ++ MPIDIG_REQUEST(sreq, req->greq.count) = origin_count; ++ MPIDIG_REQUEST(sreq, req->greq.datatype) = origin_datatype; ++ MPIDIG_REQUEST(sreq, rank) = target_rank; ++ MPIR_Datatype_add_ref_if_not_builtin(origin_datatype); + + MPIR_cc_incr(sreq->cc_ptr, &c); + MPIR_T_PVAR_TIMER_START(RMA, rma_amhdr_set); +@@ -254,28 +236,28 @@ static inline int MPIDI_do_get(void *origin_addr, + am_hdr.count = target_count; + am_hdr.datatype = target_datatype; + am_hdr.greq_ptr = (uint64_t) sreq; +- am_hdr.win_id = MPIDI_CH4U_WIN(win, win_id); ++ am_hdr.win_id = MPIDIG_WIN(win, win_id); + am_hdr.src_rank = win->comm_ptr->rank; + + /* Increase local and remote completion counters and set the local completion + * counter in request, thus it can be decreased at request completion. */ +- MPIDI_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); ++ MPIDIG_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); + + if (HANDLE_GET_KIND(target_datatype) == HANDLE_KIND_BUILTIN) { + am_hdr.n_iov = 0; + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); +- MPIDI_CH4U_REQUEST(sreq, req->greq.dt_iov) = NULL; ++ MPIDIG_REQUEST(sreq, req->greq.dt_iov) = NULL; + + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) + mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, +- MPIDI_CH4U_GET_REQ, &am_hdr, sizeof(am_hdr), ++ MPIDIG_GET_REQ, &am_hdr, sizeof(am_hdr), + NULL, 0, MPI_DATATYPE_NULL, sreq); + else + #endif + { + mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, +- MPIDI_CH4U_GET_REQ, &am_hdr, sizeof(am_hdr), ++ MPIDIG_GET_REQ, &am_hdr, sizeof(am_hdr), + NULL, 0, MPI_DATATYPE_NULL, sreq); + } + +@@ -284,35 +266,33 @@ static inline int MPIDI_do_get(void *origin_addr, + goto fn_exit; + } + +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Assert(segment_ptr); +- +- MPIR_Segment_init(NULL, target_count, target_datatype, segment_ptr); +- last = data_sz; +- MPIR_Segment_count_contig_blocks(segment_ptr, 0, &last, &num_iov); ++ MPIR_Typerep_iov_len(NULL, target_count, target_datatype, 0, data_sz, &num_iov); + n_iov = (int) num_iov; + MPIR_Assert(n_iov > 0); + am_hdr.n_iov = n_iov; + dt_iov = (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_BUFFER); + MPIR_Assert(dt_iov); + +- last = data_sz; +- MPIR_Segment_pack_vector(segment_ptr, 0, &last, dt_iov, &n_iov); +- MPIR_Assert(last == (MPI_Aint) data_sz); +- MPL_free(segment_ptr); ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(NULL, target_count, target_datatype, 0, dt_iov, n_iov, data_sz, ++ &actual_iov_len, &actual_iov_bytes); ++ n_iov = actual_iov_len; ++ ++ MPIR_Assert(actual_iov_bytes == (MPI_Aint) data_sz); + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); + +- MPIDI_CH4U_REQUEST(sreq, req->greq.dt_iov) = dt_iov; ++ MPIDIG_REQUEST(sreq, req->greq.dt_iov) = dt_iov; + + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_GET_REQ, ++ mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDIG_GET_REQ, + &am_hdr, sizeof(am_hdr), dt_iov, + sizeof(struct iovec) * am_hdr.n_iov, MPI_BYTE, sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_GET_REQ, ++ mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDIG_GET_REQ, + &am_hdr, sizeof(am_hdr), dt_iov, + sizeof(struct iovec) * am_hdr.n_iov, MPI_BYTE, sreq); + } +@@ -323,34 +303,26 @@ static inline int MPIDI_do_get(void *origin_addr, + fn_exit: + *sreq_ptr = sreq; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DO_GET); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DO_GET); + return mpi_errno; + fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_do_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_do_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, +- MPIR_Request ** sreq_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_do_accumulate(const void *origin_addr, int origin_count, ++ MPI_Datatype origin_datatype, int target_rank, ++ MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, ++ MPI_Op op, MPIR_Win * win, ++ MPIR_Request ** sreq_ptr) + { + int mpi_errno = MPI_SUCCESS, c, n_iov; + MPIR_Request *sreq = NULL; + size_t basic_type_size; +- MPIDI_CH4U_acc_req_msg_t am_hdr; ++ MPIDIG_acc_req_msg_t am_hdr; + uint64_t data_sz, target_data_sz; +- MPI_Aint last, num_iov; +- MPIR_Segment *segment_ptr; ++ MPI_Aint num_iov; + struct iovec *dt_iov, am_iov[2]; + MPIR_Datatype *dt_ptr; + int am_hdr_max_sz; +@@ -362,10 +334,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_accumulate(const void *origin_addr, + MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DO_ACCUMULATE); + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- is_local = MPIDI_CH4_rank_is_local(target_rank, win->comm_ptr); ++ is_local = MPIDI_rank_is_local(target_rank, win->comm_ptr); + #endif + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -378,9 +350,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_accumulate(const void *origin_addr, + /* Only create request when issuing is not completed. + * We initialize two ref_count for progress engine and request-based OP, + * then acc needs to free the second ref_count.*/ +- sreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 2); ++ sreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 2); + MPIR_ERR_CHKANDSTMT(sreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- MPIDI_CH4U_REQUEST(sreq, req->areq.win_ptr) = win; ++ MPIDIG_REQUEST(sreq, req->areq.win_ptr) = win; + MPIR_cc_incr(sreq->cc_ptr, &c); + + MPIR_T_PVAR_TIMER_START(RMA, rma_amhdr_set); +@@ -399,32 +371,32 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_accumulate(const void *origin_addr, + am_hdr.target_datatype = target_datatype; + am_hdr.target_disp = target_disp; + am_hdr.op = op; +- am_hdr.win_id = MPIDI_CH4U_WIN(win, win_id); ++ am_hdr.win_id = MPIDIG_WIN(win, win_id); + am_hdr.src_rank = win->comm_ptr->rank; + + /* Increase local and remote completion counters and set the local completion + * counter in request, thus it can be decreased at request completion. */ +- MPIDI_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); ++ MPIDIG_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); + /* Increase remote completion counter for acc. */ +- MPIDI_win_remote_acc_cmpl_cnt_incr(win, target_rank); ++ MPIDIG_win_remote_acc_cmpl_cnt_incr(win, target_rank); + +- MPIDI_CH4U_REQUEST(sreq, rank) = target_rank; +- MPIDI_CH4U_REQUEST(sreq, req->areq.data_sz) = data_sz; ++ MPIDIG_REQUEST(sreq, rank) = target_rank; ++ MPIDIG_REQUEST(sreq, req->areq.data_sz) = data_sz; + if (HANDLE_GET_KIND(target_datatype) == HANDLE_KIND_BUILTIN) { + am_hdr.n_iov = 0; + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); +- MPIDI_CH4U_REQUEST(sreq, req->areq.dt_iov) = NULL; ++ MPIDIG_REQUEST(sreq, req->areq.dt_iov) = NULL; + + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ, ++ mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDIG_ACC_REQ, + &am_hdr, sizeof(am_hdr), origin_addr, + (op == MPI_NO_OP) ? 0 : origin_count, origin_datatype, + sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ, ++ mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDIG_ACC_REQ, + &am_hdr, sizeof(am_hdr), origin_addr, + (op == MPI_NO_OP) ? 0 : origin_count, origin_datatype, + sreq); +@@ -439,30 +411,27 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_accumulate(const void *origin_addr, + am_hdr.target_datatype = dt_ptr->basic_type; + am_hdr.target_count = dt_ptr->n_builtin_elements; + +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Assert(segment_ptr); +- +- +- MPIR_Segment_init(NULL, target_count, target_datatype, segment_ptr); +- last = data_sz; +- MPIR_Segment_count_contig_blocks(segment_ptr, 0, &last, &num_iov); ++ MPIR_Typerep_iov_len(NULL, target_count, target_datatype, 0, data_sz, &num_iov); + n_iov = (int) num_iov; + MPIR_Assert(n_iov > 0); + am_hdr.n_iov = n_iov; + dt_iov = (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_BUFFER); + MPIR_Assert(dt_iov); + +- last = data_sz; +- MPIR_Segment_pack_vector(segment_ptr, 0, &last, dt_iov, &n_iov); +- MPIR_Assert(last == (MPI_Aint) data_sz); +- MPL_free(segment_ptr); ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(NULL, target_count, target_datatype, 0, dt_iov, n_iov, data_sz, ++ &actual_iov_len, &actual_iov_bytes); ++ n_iov = actual_iov_len; ++ ++ MPIR_Assert(actual_iov_bytes == (MPI_Aint) data_sz); + + am_iov[0].iov_base = &am_hdr; + am_iov[0].iov_len = sizeof(am_hdr); + am_iov[1].iov_base = dt_iov; + am_iov[1].iov_len = sizeof(struct iovec) * am_hdr.n_iov; + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); +- MPIDI_CH4U_REQUEST(sreq, req->areq.dt_iov) = dt_iov; ++ MPIDIG_REQUEST(sreq, req->areq.dt_iov) = dt_iov; + + #ifndef MPIDI_CH4_DIRECT_NETMOD + am_hdr_max_sz = is_local ? MPIDI_SHM_am_hdr_max_sz() : MPIDI_NM_am_hdr_max_sz(); +@@ -473,33 +442,33 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_accumulate(const void *origin_addr, + if ((am_iov[0].iov_len + am_iov[1].iov_len) <= am_hdr_max_sz) { + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isendv(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ, ++ mpi_errno = MPIDI_SHM_am_isendv(target_rank, win->comm_ptr, MPIDIG_ACC_REQ, + &am_iov[0], 2, origin_addr, + (op == MPI_NO_OP) ? 0 : origin_count, origin_datatype, + sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isendv(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ, ++ mpi_errno = MPIDI_NM_am_isendv(target_rank, win->comm_ptr, MPIDIG_ACC_REQ, + &am_iov[0], 2, origin_addr, + (op == MPI_NO_OP) ? 0 : origin_count, origin_datatype, + sreq); + } + } else { +- MPIDI_CH4U_REQUEST(sreq, req->areq.origin_addr) = (void *) origin_addr; +- MPIDI_CH4U_REQUEST(sreq, req->areq.origin_count) = origin_count; +- MPIDI_CH4U_REQUEST(sreq, req->areq.origin_datatype) = origin_datatype; ++ MPIDIG_REQUEST(sreq, req->areq.origin_addr) = (void *) origin_addr; ++ MPIDIG_REQUEST(sreq, req->areq.origin_count) = origin_count; ++ MPIDIG_REQUEST(sreq, req->areq.origin_datatype) = origin_datatype; + MPIR_Datatype_add_ref_if_not_builtin(origin_datatype); + + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_IOV_REQ, ++ mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDIG_ACC_IOV_REQ, + &am_hdr, sizeof(am_hdr), am_iov[1].iov_base, + am_iov[1].iov_len, MPI_BYTE, sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_IOV_REQ, ++ mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDIG_ACC_IOV_REQ, + &am_hdr, sizeof(am_hdr), am_iov[1].iov_base, + am_iov[1].iov_len, MPI_BYTE, sreq); + } +@@ -516,30 +485,25 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_accumulate(const void *origin_addr, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_do_get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_do_get_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- void *result_addr, +- int result_count, +- MPI_Datatype result_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, +- MPIR_Request ** sreq_ptr) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_do_get_accumulate(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ void *result_addr, ++ int result_count, ++ MPI_Datatype result_datatype, ++ int target_rank, ++ MPI_Aint target_disp, ++ int target_count, ++ MPI_Datatype target_datatype, ++ MPI_Op op, MPIR_Win * win, ++ MPIR_Request ** sreq_ptr) + { + int mpi_errno = MPI_SUCCESS, c, n_iov; + MPIR_Request *sreq = NULL; + size_t basic_type_size; +- MPIDI_CH4U_get_acc_req_msg_t am_hdr; ++ MPIDIG_get_acc_req_msg_t am_hdr; + uint64_t data_sz, result_data_sz, target_data_sz; +- MPI_Aint last, num_iov; +- MPIR_Segment *segment_ptr; ++ MPI_Aint num_iov; + struct iovec *dt_iov, am_iov[2]; + MPIR_Datatype *dt_ptr; + int am_hdr_max_sz; +@@ -547,14 +511,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_get_accumulate(const void *origin_addr, + int is_local; + #endif + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_DO_GET_ACCUMULATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_DO_GET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_DO_GET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_DO_GET_ACCUMULATE); + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- is_local = MPIDI_CH4_rank_is_local(target_rank, win->comm_ptr); ++ is_local = MPIDI_rank_is_local(target_rank, win->comm_ptr); + #endif + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -569,13 +533,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_get_accumulate(const void *origin_addr, + /* Only create request when issuing is not completed. + * We initialize two ref_count for progress engine and request-based OP, + * then get_acc needs to free the second ref_count.*/ +- sreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 2); ++ sreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 2); + MPIR_ERR_CHKANDSTMT(sreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + +- MPIDI_CH4U_REQUEST(sreq, req->areq.win_ptr) = win; +- MPIDI_CH4U_REQUEST(sreq, req->areq.result_addr) = result_addr; +- MPIDI_CH4U_REQUEST(sreq, req->areq.result_count) = result_count; +- MPIDI_CH4U_REQUEST(sreq, req->areq.result_datatype) = result_datatype; ++ MPIDIG_REQUEST(sreq, req->areq.win_ptr) = win; ++ MPIDIG_REQUEST(sreq, req->areq.result_addr) = result_addr; ++ MPIDIG_REQUEST(sreq, req->areq.result_count) = result_count; ++ MPIDIG_REQUEST(sreq, req->areq.result_datatype) = result_datatype; + MPIR_Datatype_add_ref_if_not_builtin(result_datatype); + MPIR_cc_incr(sreq->cc_ptr, &c); + +@@ -596,34 +560,34 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_get_accumulate(const void *origin_addr, + am_hdr.target_datatype = target_datatype; + am_hdr.target_disp = target_disp; + am_hdr.op = op; +- am_hdr.win_id = MPIDI_CH4U_WIN(win, win_id); ++ am_hdr.win_id = MPIDIG_WIN(win, win_id); + am_hdr.src_rank = win->comm_ptr->rank; + + am_hdr.result_data_sz = result_data_sz; + + /* Increase local and remote completion counters and set the local completion + * counter in request, thus it can be decreased at request completion. */ +- MPIDI_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); ++ MPIDIG_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); + /* Increase remote completion counter for acc. */ +- MPIDI_win_remote_acc_cmpl_cnt_incr(win, target_rank); ++ MPIDIG_win_remote_acc_cmpl_cnt_incr(win, target_rank); + +- MPIDI_CH4U_REQUEST(sreq, rank) = target_rank; +- MPIDI_CH4U_REQUEST(sreq, req->areq.data_sz) = data_sz; ++ MPIDIG_REQUEST(sreq, rank) = target_rank; ++ MPIDIG_REQUEST(sreq, req->areq.data_sz) = data_sz; + if (HANDLE_GET_KIND(target_datatype) == HANDLE_KIND_BUILTIN) { + am_hdr.n_iov = 0; + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); +- MPIDI_CH4U_REQUEST(sreq, req->areq.dt_iov) = NULL; ++ MPIDIG_REQUEST(sreq, req->areq.dt_iov) = NULL; + + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_GET_ACC_REQ, ++ mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDIG_GET_ACC_REQ, + &am_hdr, sizeof(am_hdr), origin_addr, + (op == MPI_NO_OP) ? 0 : origin_count, origin_datatype, + sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_GET_ACC_REQ, ++ mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDIG_GET_ACC_REQ, + &am_hdr, sizeof(am_hdr), origin_addr, + (op == MPI_NO_OP) ? 0 : origin_count, origin_datatype, + sreq); +@@ -638,30 +602,27 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_get_accumulate(const void *origin_addr, + am_hdr.target_datatype = dt_ptr->basic_type; + am_hdr.target_count = dt_ptr->n_builtin_elements; + +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Assert(segment_ptr); +- +- +- MPIR_Segment_init(NULL, target_count, target_datatype, segment_ptr); +- last = data_sz; +- MPIR_Segment_count_contig_blocks(segment_ptr, 0, &last, &num_iov); ++ MPIR_Typerep_iov_len(NULL, target_count, target_datatype, 0, data_sz, &num_iov); + n_iov = (int) num_iov; + MPIR_Assert(n_iov > 0); + am_hdr.n_iov = n_iov; + dt_iov = (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_BUFFER); + MPIR_Assert(dt_iov); + +- last = data_sz; +- MPIR_Segment_pack_vector(segment_ptr, 0, &last, dt_iov, &n_iov); +- MPIR_Assert(last == (MPI_Aint) data_sz); +- MPL_free(segment_ptr); ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(NULL, target_count, target_datatype, 0, dt_iov, n_iov, data_sz, ++ &actual_iov_len, &actual_iov_bytes); ++ n_iov = actual_iov_len; ++ ++ MPIR_Assert(actual_iov_bytes == (MPI_Aint) data_sz); + + am_iov[0].iov_base = &am_hdr; + am_iov[0].iov_len = sizeof(am_hdr); + am_iov[1].iov_base = dt_iov; + am_iov[1].iov_len = sizeof(struct iovec) * am_hdr.n_iov; + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); +- MPIDI_CH4U_REQUEST(sreq, req->areq.dt_iov) = dt_iov; ++ MPIDIG_REQUEST(sreq, req->areq.dt_iov) = dt_iov; + + #ifndef MPIDI_CH4_DIRECT_NETMOD + am_hdr_max_sz = is_local ? MPIDI_SHM_am_hdr_max_sz() : MPIDI_NM_am_hdr_max_sz(); +@@ -672,33 +633,33 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_get_accumulate(const void *origin_addr, + if ((am_iov[0].iov_len + am_iov[1].iov_len) <= am_hdr_max_sz) { + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isendv(target_rank, win->comm_ptr, MPIDI_CH4U_GET_ACC_REQ, ++ mpi_errno = MPIDI_SHM_am_isendv(target_rank, win->comm_ptr, MPIDIG_GET_ACC_REQ, + &am_iov[0], 2, origin_addr, + (op == MPI_NO_OP) ? 0 : origin_count, origin_datatype, + sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isendv(target_rank, win->comm_ptr, MPIDI_CH4U_GET_ACC_REQ, ++ mpi_errno = MPIDI_NM_am_isendv(target_rank, win->comm_ptr, MPIDIG_GET_ACC_REQ, + &am_iov[0], 2, origin_addr, + (op == MPI_NO_OP) ? 0 : origin_count, origin_datatype, + sreq); + } + } else { +- MPIDI_CH4U_REQUEST(sreq, req->areq.origin_addr) = (void *) origin_addr; +- MPIDI_CH4U_REQUEST(sreq, req->areq.origin_count) = origin_count; +- MPIDI_CH4U_REQUEST(sreq, req->areq.origin_datatype) = origin_datatype; ++ MPIDIG_REQUEST(sreq, req->areq.origin_addr) = (void *) origin_addr; ++ MPIDIG_REQUEST(sreq, req->areq.origin_count) = origin_count; ++ MPIDIG_REQUEST(sreq, req->areq.origin_datatype) = origin_datatype; + MPIR_Datatype_add_ref_if_not_builtin(origin_datatype); + + #ifndef MPIDI_CH4_DIRECT_NETMOD + if (is_local) +- mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_GET_ACC_IOV_REQ, ++ mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDIG_GET_ACC_IOV_REQ, + &am_hdr, sizeof(am_hdr), am_iov[1].iov_base, + am_iov[1].iov_len, MPI_BYTE, sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_GET_ACC_IOV_REQ, ++ mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDIG_GET_ACC_IOV_REQ, + &am_hdr, sizeof(am_hdr), am_iov[1].iov_base, + am_iov[1].iov_len, MPI_BYTE, sreq); + } +@@ -709,31 +670,24 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_do_get_accumulate(const void *origin_addr, + fn_exit: + *sreq_ptr = sreq; + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_DO_GET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_DO_GET_ACCUMULATE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_put(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, MPI_Datatype target_datatype, +- MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_put(const void *origin_addr, int origin_count, ++ MPI_Datatype origin_datatype, int target_rank, ++ MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_PUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_PUT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_PUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_PUT); + +- mpi_errno = MPIDI_do_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, &sreq); ++ mpi_errno = MPIDIG_do_put(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win, &sreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -742,72 +696,53 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_put(const void *origin_addr, + if (sreq != NULL) + MPIR_Request_free(sreq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_PUT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_PUT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_rput +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_rput(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPIR_Win * win, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_rput(const void *origin_addr, int origin_count, ++ MPI_Datatype origin_datatype, int target_rank, ++ MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, MPIR_Win * win, ++ MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_RPUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_RPUT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_RPUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_RPUT); + +- mpi_errno = MPIDI_do_put(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, &sreq); ++ mpi_errno = MPIDIG_do_put(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win, &sreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- if (sreq == NULL) { ++ if (sreq == NULL) + /* create a completed request for user if issuing is completed immediately. */ +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); +- MPIR_ERR_CHKANDSTMT((sreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- MPIR_Request_add_ref(sreq); +- MPID_Request_complete(sreq); +- } ++ sreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); + + fn_exit: + *request = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_RPUT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_RPUT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_get +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_get(void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, MPI_Datatype target_datatype, +- MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_get(void *origin_addr, int origin_count, ++ MPI_Datatype origin_datatype, int target_rank, ++ MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_GET); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_GET); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_GET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_GET); + +- mpi_errno = MPIDI_do_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, &sreq); ++ mpi_errno = MPIDIG_do_get(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win, &sreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -816,116 +751,82 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_get(void *origin_addr, + if (sreq != NULL) + MPIR_Request_free(sreq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_GET); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_GET); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_rget +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_rget(void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPIR_Win * win, MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_rget(void *origin_addr, int origin_count, ++ MPI_Datatype origin_datatype, int target_rank, ++ MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, MPIR_Win * win, ++ MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_RGET); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_RGET); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_RGET); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_RGET); + +- mpi_errno = MPIDI_do_get(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, win, &sreq); ++ mpi_errno = MPIDIG_do_get(origin_addr, origin_count, origin_datatype, target_rank, target_disp, ++ target_count, target_datatype, win, &sreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- if (sreq == NULL) { ++ if (sreq == NULL) + /* create a completed request for user if issuing is completed immediately. */ +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); +- MPIR_ERR_CHKANDSTMT((sreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- MPIR_Request_add_ref(sreq); +- MPID_Request_complete(sreq); +- } ++ sreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); + + fn_exit: + *request = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_RGET); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_RGET); + return mpi_errno; + fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_raccumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_raccumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, +- MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_raccumulate(const void *origin_addr, int origin_count, ++ MPI_Datatype origin_datatype, int target_rank, ++ MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, MPI_Op op, ++ MPIR_Win * win, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_RACCUMULATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_RACCUMULATE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_RACCUMULATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_RACCUMULATE); + +- mpi_errno = MPIDI_do_accumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, op, +- win, &sreq); ++ mpi_errno = MPIDIG_do_accumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win, &sreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- if (sreq == NULL) { ++ if (sreq == NULL) + /* create a completed request for user if issuing is completed immediately. */ +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); +- MPIR_ERR_CHKANDSTMT((sreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- MPIR_Request_add_ref(sreq); +- MPID_Request_complete(sreq); +- } ++ sreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); + + fn_exit: + *request = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_RACCUMULATE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_RACCUMULATE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, MPI_Op op, +- MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_accumulate(const void *origin_addr, int origin_count, ++ MPI_Datatype origin_datatype, int target_rank, ++ MPI_Aint target_disp, int target_count, ++ MPI_Datatype target_datatype, MPI_Op op, ++ MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_ACCUMULATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_ACCUMULATE); + +- mpi_errno = MPIDI_do_accumulate(origin_addr, origin_count, origin_datatype, +- target_rank, target_disp, target_count, target_datatype, op, +- win, &sreq); ++ mpi_errno = MPIDIG_do_accumulate(origin_addr, origin_count, origin_datatype, target_rank, ++ target_disp, target_count, target_datatype, op, win, &sreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -934,84 +835,64 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_accumulate(const void *origin_addr, + if (sreq != NULL) + MPIR_Request_free(sreq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_ACCUMULATE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_rget_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_rget_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- void *result_addr, +- int result_count, +- MPI_Datatype result_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win, +- MPIR_Request ** request) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_rget_accumulate(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ void *result_addr, int result_count, ++ MPI_Datatype result_datatype, ++ int target_rank, MPI_Aint target_disp, ++ int target_count, ++ MPI_Datatype target_datatype, MPI_Op op, ++ MPIR_Win * win, MPIR_Request ** request) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_RGET_ACCUMULATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_RGET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_RGET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_RGET_ACCUMULATE); + +- mpi_errno = MPIDI_do_get_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, target_datatype, op, +- win, &sreq); ++ mpi_errno = MPIDIG_do_get_accumulate(origin_addr, origin_count, origin_datatype, result_addr, ++ result_count, result_datatype, target_rank, target_disp, ++ target_count, target_datatype, op, win, &sreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +- if (sreq == NULL) { ++ if (sreq == NULL) + /* create a completed request for user if issuing is completed immediately. */ +- sreq = MPIR_Request_create(MPIR_REQUEST_KIND__RMA); +- MPIR_ERR_CHKANDSTMT((sreq) == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- MPIR_Request_add_ref(sreq); +- MPID_Request_complete(sreq); +- } ++ sreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__RMA); + + fn_exit: + *request = sreq; +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_RGET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_RGET_ACCUMULATE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_get_accumulate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_get_accumulate(const void *origin_addr, +- int origin_count, +- MPI_Datatype origin_datatype, +- void *result_addr, +- int result_count, +- MPI_Datatype result_datatype, +- int target_rank, +- MPI_Aint target_disp, +- int target_count, +- MPI_Datatype target_datatype, +- MPI_Op op, MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_get_accumulate(const void *origin_addr, ++ int origin_count, ++ MPI_Datatype origin_datatype, ++ void *result_addr, int result_count, ++ MPI_Datatype result_datatype, ++ int target_rank, MPI_Aint target_disp, ++ int target_count, ++ MPI_Datatype target_datatype, ++ MPI_Op op, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Request *sreq = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_GET_ACCUMULATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_GET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_GET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_GET_ACCUMULATE); + +- mpi_errno = MPIDI_do_get_accumulate(origin_addr, origin_count, origin_datatype, +- result_addr, result_count, result_datatype, +- target_rank, target_disp, target_count, target_datatype, op, +- win, &sreq); ++ mpi_errno = MPIDIG_do_get_accumulate(origin_addr, origin_count, origin_datatype, result_addr, ++ result_count, result_datatype, target_rank, target_disp, ++ target_count, target_datatype, op, win, &sreq); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + +@@ -1020,33 +901,28 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_get_accumulate(const void *origin_ad + if (sreq != NULL) + MPIR_Request_free(sreq); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_GET_ACCUMULATE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_GET_ACCUMULATE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_compare_and_swap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_compare_and_swap(const void *origin_addr, +- const void *compare_addr, +- void *result_addr, +- MPI_Datatype datatype, +- int target_rank, +- MPI_Aint target_disp, MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_compare_and_swap(const void *origin_addr, ++ const void *compare_addr, ++ void *result_addr, MPI_Datatype datatype, ++ int target_rank, MPI_Aint target_disp, ++ MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS, c; + MPIR_Request *sreq = NULL; +- MPIDI_CH4U_cswap_req_msg_t am_hdr; ++ MPIDIG_cswap_req_msg_t am_hdr; + size_t data_sz; + void *p_data; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_COMPARE_AND_SWAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_COMPARE_AND_SWAP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_COMPARE_AND_SWAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_COMPARE_AND_SWAP); + +- MPIDI_CH4U_RMA_OP_CHECK_SYNC(target_rank, win); ++ MPIDIG_RMA_OP_CHECK_SYNC(target_rank, win); + if (target_rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -1059,70 +935,63 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_compare_and_swap(const void *origin_ + MPIR_Memcpy(p_data, (char *) origin_addr, data_sz); + MPIR_Memcpy((char *) p_data + data_sz, (char *) compare_addr, data_sz); + +- sreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ sreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); + MPIR_ERR_CHKANDSTMT(sreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); + +- MPIDI_CH4U_REQUEST(sreq, req->creq.win_ptr) = win; +- MPIDI_CH4U_REQUEST(sreq, req->creq.addr) = (uint64_t) ((char *) result_addr); +- MPIDI_CH4U_REQUEST(sreq, req->creq.datatype) = datatype; +- MPIDI_CH4U_REQUEST(sreq, req->creq.result_addr) = result_addr; +- MPIDI_CH4U_REQUEST(sreq, req->creq.data) = p_data; +- MPIDI_CH4U_REQUEST(sreq, rank) = target_rank; ++ MPIDIG_REQUEST(sreq, req->creq.win_ptr) = win; ++ MPIDIG_REQUEST(sreq, req->creq.addr) = (uint64_t) ((char *) result_addr); ++ MPIDIG_REQUEST(sreq, req->creq.datatype) = datatype; ++ MPIDIG_REQUEST(sreq, req->creq.result_addr) = result_addr; ++ MPIDIG_REQUEST(sreq, req->creq.data) = p_data; ++ MPIDIG_REQUEST(sreq, rank) = target_rank; + MPIR_cc_incr(sreq->cc_ptr, &c); + + MPIR_T_PVAR_TIMER_START(RMA, rma_amhdr_set); + am_hdr.target_disp = target_disp; + am_hdr.datatype = datatype; + am_hdr.req_ptr = (uint64_t) sreq; +- am_hdr.win_id = MPIDI_CH4U_WIN(win, win_id); ++ am_hdr.win_id = MPIDIG_WIN(win, win_id); + am_hdr.src_rank = win->comm_ptr->rank; + MPIR_T_PVAR_TIMER_END(RMA, rma_amhdr_set); + +- MPIDI_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); ++ MPIDIG_win_cmpl_cnts_incr(win, target_rank, &sreq->completion_notification); + /* Increase remote completion counter for acc. */ +- MPIDI_win_remote_acc_cmpl_cnt_incr(win, target_rank); ++ MPIDIG_win_remote_acc_cmpl_cnt_incr(win, target_rank); + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(target_rank, win->comm_ptr)) +- mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_CSWAP_REQ, ++ if (MPIDI_rank_is_local(target_rank, win->comm_ptr)) ++ mpi_errno = MPIDI_SHM_am_isend(target_rank, win->comm_ptr, MPIDIG_CSWAP_REQ, + &am_hdr, sizeof(am_hdr), (char *) p_data, 2, datatype, sreq); + else + #endif + { +- mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_CSWAP_REQ, ++ mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDIG_CSWAP_REQ, + &am_hdr, sizeof(am_hdr), (char *) p_data, 2, datatype, sreq); + } + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_COMPARE_AND_SWAP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_COMPARE_AND_SWAP); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_mpi_fetch_and_op +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mpi_fetch_and_op(const void *origin_addr, +- void *result_addr, +- MPI_Datatype datatype, +- int target_rank, +- MPI_Aint target_disp, MPI_Op op, +- MPIR_Win * win) ++MPL_STATIC_INLINE_PREFIX int MPIDIG_mpi_fetch_and_op(const void *origin_addr, void *result_addr, ++ MPI_Datatype datatype, int target_rank, ++ MPI_Aint target_disp, MPI_Op op, ++ MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4U_MPI_FETCH_AND_OP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4U_MPI_FETCH_AND_OP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_FETCH_AND_OP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_FETCH_AND_OP); + +- mpi_errno = MPIDI_CH4U_mpi_get_accumulate(origin_addr, 1, datatype, +- result_addr, 1, datatype, +- target_rank, target_disp, 1, datatype, op, win); ++ mpi_errno = MPIDIG_mpi_get_accumulate(origin_addr, 1, datatype, result_addr, 1, datatype, ++ target_rank, target_disp, 1, datatype, op, win); + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4U_MPI_FETCH_AND_OP); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_FETCH_AND_OP); + return mpi_errno; + fn_fail: + goto fn_exit; +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_rma_origin_callbacks.c +@@ -0,0 +1,187 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "ch4r_rma_origin_callbacks.h" ++ ++/* This file includes all RMA callback routines on the packet issuing side. ++ * All handler functions are named with suffix "_origin_cb". */ ++ ++int MPIDIG_put_ack_origin_cb(MPIR_Request * req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_ACK_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_ACK_ORIGIN_CB); ++ MPID_Request_complete(req); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_ACK_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_acc_ack_origin_cb(MPIR_Request * req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_ACK_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_ACK_ORIGIN_CB); ++ MPID_Request_complete(req); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_ACK_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_acc_ack_origin_cb(MPIR_Request * req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_ACK_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_ACK_ORIGIN_CB); ++ MPL_free(MPIDIG_REQUEST(req, req->areq.data)); ++ ++ MPID_Request_complete(req); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_ACK_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_cswap_ack_origin_cb(MPIR_Request * req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CSWAP_ACK_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CSWAP_ACK_ORIGIN_CB); ++ ++ MPL_free(MPIDIG_REQUEST(req, req->creq.data)); ++ MPID_Request_complete(req); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CSWAP_ACK_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_ack_origin_cb(MPIR_Request * req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACK_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACK_ORIGIN_CB); ++ ++ MPL_free(MPIDIG_REQUEST(req, req->greq.dt_iov)); ++ ++ MPID_Request_complete(req); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACK_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_put_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_cswap_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CSWAP_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CSWAP_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CSWAP_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_acc_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_acc_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_put_data_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_DATA_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_DATA_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_DATA_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_acc_data_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_DATA_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_DATA_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_DATA_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_acc_data_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_DATA_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_DATA_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_DATA_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_put_iov_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_IOV_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_IOV_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_IOV_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_acc_iov_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_IOV_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_IOV_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_IOV_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_acc_iov_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_IOV_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_IOV_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_IOV_ORIGIN_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_origin_cb(MPIR_Request * sreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ORIGIN_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ORIGIN_CB); ++ MPID_Request_complete(sreq); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ORIGIN_CB); ++ return mpi_errno; ++} +--- a/src/mpid/ch4/src/ch4r_rma_origin_callbacks.h ++++ b/src/mpid/ch4/src/ch4r_rma_origin_callbacks.h +@@ -11,246 +11,24 @@ + #ifndef CH4R_RMA_ORIGIN_CALLBACKS_H_INCLUDED + #define CH4R_RMA_ORIGIN_CALLBACKS_H_INCLUDED + +-#include "ch4r_request.h" +- + /* This file includes all RMA callback routines on the packet issuing side. + * All handler functions are named with suffix "_origin_cb". */ + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_ack_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_ack_origin_cb(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_ACK_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_ACK_ORIGIN_CB); +- MPID_Request_complete(req); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_ACK_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_ack_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_ack_origin_cb(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_ACK_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_ACK_ORIGIN_CB); +- MPID_Request_complete(req); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_ACK_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_ack_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_ack_origin_cb(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_ACK_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_ACK_ORIGIN_CB); +- MPL_free(MPIDI_CH4U_REQUEST(req, req->areq.data)); +- +- MPID_Request_complete(req); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_ACK_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_cswap_ack_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_cswap_ack_origin_cb(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CSWAP_ACK_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CSWAP_ACK_ORIGIN_CB); +- +- MPL_free(MPIDI_CH4U_REQUEST(req, req->creq.data)); +- MPID_Request_complete(req); +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CSWAP_ACK_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_ack_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_ack_origin_cb(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACK_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACK_ORIGIN_CB); +- +- if (MPIDI_CH4U_REQUEST(req, req->greq.dt_iov)) { +- MPL_free(MPIDI_CH4U_REQUEST(req, req->greq.dt_iov)); +- } +- +- MPID_Request_complete(req); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACK_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_cswap_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_cswap_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CSWAP_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CSWAP_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CSWAP_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_data_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_data_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_DATA_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_DATA_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_DATA_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_data_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_data_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_DATA_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_DATA_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_DATA_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_data_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_data_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_DATA_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_DATA_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_DATA_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_iov_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_iov_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_IOV_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_IOV_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_IOV_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_iov_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_iov_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_IOV_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_IOV_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_IOV_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_iov_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_iov_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_IOV_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_IOV_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_IOV_ORIGIN_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_origin_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_origin_cb(MPIR_Request * sreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ORIGIN_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ORIGIN_CB); +- MPID_Request_complete(sreq); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ORIGIN_CB); +- return mpi_errno; +-} ++int MPIDIG_put_ack_origin_cb(MPIR_Request * req); ++int MPIDIG_acc_ack_origin_cb(MPIR_Request * req); ++int MPIDIG_get_acc_ack_origin_cb(MPIR_Request * req); ++int MPIDIG_cswap_ack_origin_cb(MPIR_Request * req); ++int MPIDIG_get_ack_origin_cb(MPIR_Request * req); ++int MPIDIG_put_origin_cb(MPIR_Request * sreq); ++int MPIDIG_cswap_origin_cb(MPIR_Request * sreq); ++int MPIDIG_acc_origin_cb(MPIR_Request * sreq); ++int MPIDIG_get_acc_origin_cb(MPIR_Request * sreq); ++int MPIDIG_put_data_origin_cb(MPIR_Request * sreq); ++int MPIDIG_acc_data_origin_cb(MPIR_Request * sreq); ++int MPIDIG_get_acc_data_origin_cb(MPIR_Request * sreq); ++int MPIDIG_put_iov_origin_cb(MPIR_Request * sreq); ++int MPIDIG_acc_iov_origin_cb(MPIR_Request * sreq); ++int MPIDIG_get_acc_iov_origin_cb(MPIR_Request * sreq); ++int MPIDIG_get_origin_cb(MPIR_Request * sreq); + + #endif /* CH4R_RMA_ORIGIN_CALLBACKS_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_rma_target_callbacks.c +@@ -0,0 +1,2208 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "mpidch4r.h" ++#include "ch4r_rma_target_callbacks.h" ++ ++static int ack_put(MPIR_Request * rreq); ++static int ack_cswap(MPIR_Request * rreq); ++static int ack_acc(MPIR_Request * rreq); ++static int ack_get_acc(MPIR_Request * rreq); ++static int win_lock_advance(MPIR_Win * win); ++static void win_lock_req_proc(int handler_id, const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win); ++static void win_lock_ack_proc(int handler_id, const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win); ++static void win_unlock_proc(const MPIDIG_win_cntrl_msg_t * info, int is_local, MPIR_Win * win); ++static void win_complete_proc(const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win); ++static void win_post_proc(const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win); ++static void win_unlock_done(const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win); ++static int handle_acc_cmpl(MPIR_Request * rreq); ++static int handle_get_acc_cmpl(MPIR_Request * rreq); ++static void handle_acc_data(void **data, size_t * p_data_sz, int *is_contig, MPIR_Request * rreq); ++static int get_target_cmpl_cb(MPIR_Request * req); ++static int put_target_cmpl_cb(MPIR_Request * rreq); ++static int put_iov_target_cmpl_cb(MPIR_Request * rreq); ++static int acc_iov_target_cmpl_cb(MPIR_Request * rreq); ++static int get_acc_iov_target_cmpl_cb(MPIR_Request * rreq); ++static int cswap_target_cmpl_cb(MPIR_Request * rreq); ++static int acc_target_cmpl_cb(MPIR_Request * rreq); ++static int get_acc_target_cmpl_cb(MPIR_Request * rreq); ++static int get_ack_target_cmpl_cb(MPIR_Request * get_req); ++static int get_acc_ack_target_cmpl_cb(MPIR_Request * areq); ++static int cswap_ack_target_cmpl_cb(MPIR_Request * rreq); ++ ++int MPIDIG_RMA_Init_targetcb_pvars(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ /* rma_targetcb_put */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_put, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Put (in seconds)"); ++ ++ /* rma_targetcb_put_ack */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_put_ack, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Put ACK (in seconds)"); ++ ++ /* rma_targetcb_get */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_get, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Get (in seconds)"); ++ ++ /* rma_targetcb_get_ack */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_get_ack, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Get ACK (in seconds)"); ++ ++ /* rma_targetcb_cas */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_cas, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Compare-and-swap (in seconds)"); ++ ++ /* rma_targetcb_cas_ack */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_cas_ack, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Compare-and-swap ACK (in seconds)"); ++ ++ /* rma_targetcb_acc */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_acc, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Accumulate (in seconds)"); ++ ++ /* rma_targetcb_get_acc */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_get_acc, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Get-Accumulate (in seconds)"); ++ ++ /* rma_targetcb_acc_ack */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_acc_ack, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Accumulate ACK (in seconds)"); ++ ++ /* rma_targetcb_get_acc_ack */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_get_acc_ack, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for Get-Accumulate ACK (in seconds)"); ++ ++ /* rma_targetcb_win_ctrl */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_win_ctrl, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for WIN CTRL (in seconds)"); ++ ++ /* rma_targetcb_put_iov */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_put_iov, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for PUT IOV (in seconds)"); ++ ++ /* rma_targetcb_put_iov_ack */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_put_iov_ack, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for PUT IOV ACK (in seconds)"); ++ ++ /* rma_targetcb_put_data */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_put_data, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for PUT DATA (in seconds)"); ++ ++ /* rma_targetcb_acc_iov */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_acc_iov, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for ACC IOV (in seconds)"); ++ ++ /* rma_targetcb_get_acc_iov */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_get_acc_iov, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for GET ACC IOV (in seconds)"); ++ ++ /* rma_targetcb_acc_iov_ack */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_acc_iov_ack, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for ACC IOV ACK (in seconds)"); ++ ++ /* rma_targetcb_get_acc_iov_ack */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_get_acc_iov_ack, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for GET ACC IOV ACK (in seconds)"); ++ ++ /* rma_targetcb_acc_data */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_acc_data, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for ACC DATA (in seconds)"); ++ ++ /* rma_targetcb_get_acc_data */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_targetcb_get_acc_data, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "RMA:TARGETCB for GET ACC DATA (in seconds)"); ++ ++ return mpi_errno; ++} ++ ++static int ack_put(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_put_ack_msg_t ack_msg; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACK_PUT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACK_PUT); ++ ++ ack_msg.preq_ptr = MPIDIG_REQUEST(rreq, req->preq.preq_ptr); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(rreq, is_local)) ++ mpi_errno = ++ MPIDI_SHM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->preq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_PUT_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ else ++#endif ++ { ++ mpi_errno = ++ MPIDI_NM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->preq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_PUT_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACK_PUT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int ack_cswap(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS, c; ++ MPIDIG_cswap_ack_msg_t ack_msg; ++ void *result_addr; ++ size_t data_sz; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACK_CSWAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACK_CSWAP); ++ ++ MPIDI_Datatype_check_size(MPIDIG_REQUEST(rreq, req->creq.datatype), 1, data_sz); ++ result_addr = ((char *) MPIDIG_REQUEST(rreq, req->creq.data)) + data_sz; ++ ++ MPIR_cc_incr(rreq->cc_ptr, &c); ++ ack_msg.req_ptr = MPIDIG_REQUEST(rreq, req->creq.creq_ptr); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(rreq, is_local)) ++ mpi_errno = ++ MPIDI_SHM_am_isend_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->creq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_CSWAP_ACK, &ack_msg, ++ sizeof(ack_msg), result_addr, 1, ++ MPIDIG_REQUEST(rreq, req->creq.datatype), rreq); ++ else ++#endif ++ { ++ mpi_errno = ++ MPIDI_NM_am_isend_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->creq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_CSWAP_ACK, &ack_msg, ++ sizeof(ack_msg), result_addr, 1, ++ MPIDIG_REQUEST(rreq, req->creq.datatype), rreq); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACK_CSWAP); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int ack_acc(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_acc_ack_msg_t ack_msg; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACK_ACC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACK_ACC); ++ ++ ack_msg.req_ptr = MPIDIG_REQUEST(rreq, req->areq.req_ptr); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(rreq, is_local)) ++ mpi_errno = ++ MPIDI_SHM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->areq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_ACC_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ else ++#endif ++ { ++ mpi_errno = ++ MPIDI_NM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->areq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_ACC_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACK_ACC); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int ack_get_acc(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS, c; ++ MPIDIG_acc_ack_msg_t ack_msg; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACK_GET_ACC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACK_GET_ACC); ++ ++ MPIR_cc_incr(rreq->cc_ptr, &c); ++ ack_msg.req_ptr = MPIDIG_REQUEST(rreq, req->areq.req_ptr); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(rreq, is_local)) ++ mpi_errno = ++ MPIDI_SHM_am_isend_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->areq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_GET_ACC_ACK, ++ &ack_msg, sizeof(ack_msg), ++ MPIDIG_REQUEST(rreq, req->areq.data), ++ MPIDIG_REQUEST(rreq, req->areq.data_sz), MPI_BYTE, rreq); ++ else ++#endif ++ { ++ mpi_errno = ++ MPIDI_NM_am_isend_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->areq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_GET_ACC_ACK, ++ &ack_msg, sizeof(ack_msg), ++ MPIDIG_REQUEST(rreq, req->areq.data), ++ MPIDIG_REQUEST(rreq, req->areq.data_sz), MPI_BYTE, rreq); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACK_GET_ACC); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++static int win_lock_advance(MPIR_Win * win) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_win_lock_recvd_t *lock_recvd_q = &MPIDIG_WIN(win, sync).lock_recvd; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_LOCK_ADVANCE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_LOCK_ADVANCE); ++ ++ if ((lock_recvd_q->head != NULL) && ((lock_recvd_q->count == 0) || ++ ((lock_recvd_q->type == MPI_LOCK_SHARED) && ++ (lock_recvd_q->head->type == MPI_LOCK_SHARED)))) { ++ struct MPIDIG_win_lock *lock = lock_recvd_q->head; ++ lock_recvd_q->head = lock->next; ++ ++ if (lock_recvd_q->head == NULL) ++ lock_recvd_q->tail = NULL; ++ ++ ++lock_recvd_q->count; ++ lock_recvd_q->type = lock->type; ++ ++ MPIDIG_win_cntrl_msg_t msg; ++ int handler_id; ++ msg.win_id = MPIDIG_WIN(win, win_id); ++ msg.origin_rank = win->comm_ptr->rank; ++ ++ if (lock->mtype == MPIDIG_WIN_LOCK) ++ handler_id = MPIDIG_WIN_LOCK_ACK; ++ else if (lock->mtype == MPIDIG_WIN_LOCKALL) ++ handler_id = MPIDIG_WIN_LOCKALL_ACK; ++ else ++ MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**rmasync"); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_rank_is_local(lock->rank, win->comm_ptr)) ++ mpi_errno = MPIDI_SHM_am_send_hdr_reply(MPIDIG_win_to_context(win), ++ lock->rank, handler_id, &msg, sizeof(msg)); ++ else ++#endif ++ { ++ mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDIG_win_to_context(win), ++ lock->rank, handler_id, &msg, sizeof(msg)); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPL_free(lock); ++ ++ mpi_errno = win_lock_advance(win); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_LOCK_ADVANCE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static void win_lock_req_proc(int handler_id, const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_LOCK_REQ_PROC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_LOCK_REQ_PROC); ++ ++ MPIR_T_PVAR_TIMER_START(RMA, rma_winlock_getlocallock); ++ struct MPIDIG_win_lock *lock = (struct MPIDIG_win_lock *) ++ MPL_calloc(1, sizeof(struct MPIDIG_win_lock), MPL_MEM_RMA); ++ ++ lock->mtype = handler_id; ++ lock->rank = info->origin_rank; ++ lock->type = info->lock_type; ++ MPIDIG_win_lock_recvd_t *lock_recvd_q = &MPIDIG_WIN(win, sync).lock_recvd; ++ MPIR_Assert((lock_recvd_q->head != NULL) ^ (lock_recvd_q->tail == NULL)); ++ ++ if (lock_recvd_q->tail == NULL) ++ lock_recvd_q->head = lock; ++ else ++ lock_recvd_q->tail->next = lock; ++ ++ lock_recvd_q->tail = lock; ++ ++ win_lock_advance(win); ++ MPIR_T_PVAR_TIMER_END(RMA, rma_winlock_getlocallock); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_LOCK_REQ_PROC); ++ return; ++} ++ ++static void win_lock_ack_proc(int handler_id, const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_LOCK_ACK_PROC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_LOCK_ACK_PROC); ++ ++ if (handler_id == MPIDIG_WIN_LOCK_ACK) { ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, info->origin_rank); ++ MPIR_Assert(target_ptr); ++ ++ MPIR_Assert((int) target_ptr->sync.lock.locked == 0); ++ target_ptr->sync.lock.locked = 1; ++ } else if (handler_id == MPIDIG_WIN_LOCKALL_ACK) { ++ MPIDIG_WIN(win, sync).lockall.allLocked += 1; ++ } else { ++ MPIR_Assert(0); ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_LOCK_ACK_PROC); ++} ++ ++static void win_unlock_proc(const MPIDIG_win_cntrl_msg_t * info, int is_local, MPIR_Win * win) ++{ ++ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_UNLOCK_PROC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_UNLOCK_PROC); ++ ++ /* NOTE: origin blocking waits in lock or lockall call till lock granted. */ ++ --MPIDIG_WIN(win, sync).lock_recvd.count; ++ MPIR_Assert((int) MPIDIG_WIN(win, sync).lock_recvd.count >= 0); ++ win_lock_advance(win); ++ ++ MPIDIG_win_cntrl_msg_t msg; ++ msg.win_id = MPIDIG_WIN(win, win_id); ++ msg.origin_rank = win->comm_ptr->rank; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (is_local) ++ mpi_errno = MPIDI_SHM_am_send_hdr_reply(MPIDIG_win_to_context(win), ++ info->origin_rank, ++ MPIDIG_WIN_UNLOCK_ACK, &msg, sizeof(msg)); ++ else ++#endif ++ { ++ mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDIG_win_to_context(win), ++ info->origin_rank, ++ MPIDIG_WIN_UNLOCK_ACK, &msg, sizeof(msg)); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_UNLOCK_PROC); ++ return; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static void win_complete_proc(const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_COMPLETE_PROC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_COMPLETE_PROC); ++ ++ ++MPIDIG_WIN(win, sync).sc.count; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_COMPLETE_PROC); ++} ++ ++static void win_post_proc(const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_POST_PROC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_POST_PROC); ++ ++ ++MPIDIG_WIN(win, sync).pw.count; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_POST_PROC); ++} ++ ++ ++static void win_unlock_done(const MPIDIG_win_cntrl_msg_t * info, MPIR_Win * win) ++{ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_UNLOCK_DONE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_UNLOCK_DONE); ++ ++ if (MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_LOCK) { ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, info->origin_rank); ++ MPIR_Assert(target_ptr); ++ ++ MPIR_Assert((int) target_ptr->sync.lock.locked == 1); ++ target_ptr->sync.lock.locked = 0; ++ } else if (MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_LOCK_ALL) { ++ MPIR_Assert((int) MPIDIG_WIN(win, sync).lockall.allLocked > 0); ++ MPIDIG_WIN(win, sync).lockall.allLocked -= 1; ++ } else { ++ MPIR_Assert(0); ++ } ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_UNLOCK_DONE); ++} ++ ++static int handle_acc_cmpl(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ MPI_Aint basic_sz, count; ++ struct iovec *iov; ++ char *src_ptr; ++ size_t data_sz; ++ int shm_locked ATTRIBUTE((unused)) = 0; ++ MPIR_Win *win ATTRIBUTE((unused)) = MPIDIG_REQUEST(rreq, req->areq.win_ptr); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_HANDLE_ACC_CMPL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_HANDLE_ACC_CMPL); ++ ++ MPIR_Datatype_get_size_macro(MPIDIG_REQUEST(rreq, req->areq.target_datatype), basic_sz); ++ MPIR_ERR_CHKANDJUMP(basic_sz == 0, mpi_errno, MPI_ERR_OTHER, "**dtype"); ++ data_sz = MPIDIG_REQUEST(rreq, req->areq.data_sz); ++ ++ /* MPIDI_CS_ENTER(); */ ++ ++ if (MPIDIG_REQUEST(rreq, req->areq.op) == MPI_NO_OP) { ++ MPIDIG_REQUEST(rreq, req->areq.origin_count) = MPIDIG_REQUEST(rreq, req->areq.target_count); ++ MPIDIG_REQUEST(rreq, req->areq.data_sz) = data_sz; ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDIG_WIN(win, shm_allocated)) { ++ mpi_errno = MPIDI_SHM_rma_op_cs_enter_hook(win); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ shm_locked = 1; ++ } ++#endif ++ ++ if (MPIDIG_REQUEST(rreq, req->areq.dt_iov) == NULL) { ++ mpi_errno = MPIDIG_compute_acc_op(MPIDIG_REQUEST(rreq, req->areq.data), ++ MPIDIG_REQUEST(rreq, req->areq.origin_count), ++ MPIDIG_REQUEST(rreq, req->areq.origin_datatype), ++ MPIDIG_REQUEST(rreq, req->areq.target_addr), ++ MPIDIG_REQUEST(rreq, req->areq.target_count), ++ MPIDIG_REQUEST(rreq, req->areq.target_datatype), ++ MPIDIG_REQUEST(rreq, req->areq.op), ++ MPIDIG_ACC_SRCBUF_DEFAULT); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ iov = (struct iovec *) MPIDIG_REQUEST(rreq, req->areq.dt_iov); ++ src_ptr = (char *) MPIDIG_REQUEST(rreq, req->areq.data); ++ for (i = 0; i < MPIDIG_REQUEST(rreq, req->areq.n_iov); i++) { ++ count = iov[i].iov_len / basic_sz; ++ MPIR_Assert(count > 0); ++ ++ mpi_errno = MPIDIG_compute_acc_op(src_ptr, count, ++ MPIDIG_REQUEST(rreq, req->areq.origin_datatype), ++ iov[i].iov_base, count, ++ MPIDIG_REQUEST(rreq, req->areq.target_datatype), ++ MPIDIG_REQUEST(rreq, req->areq.op), ++ MPIDIG_ACC_SRCBUF_DEFAULT); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ src_ptr += count * basic_sz; ++ } ++ MPL_free(iov); ++ } ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDIG_WIN(win, shm_allocated)) { ++ mpi_errno = MPIDI_SHM_rma_op_cs_exit_hook(win); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ /* MPIDI_CS_EXIT(); */ ++ MPL_free(MPIDIG_REQUEST(rreq, req->areq.data)); ++ ++ MPIDIG_REQUEST(rreq, req->areq.data) = NULL; ++ mpi_errno = ack_acc(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPID_Request_complete(rreq); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_HANDLE_ACC_CMPL); ++ return mpi_errno; ++ fn_fail: ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ /* release lock if error is reported inside CS. */ ++ if (shm_locked) ++ MPIDI_SHM_rma_op_cs_exit_hook(win); ++#endif ++ goto fn_exit; ++} ++ ++static int handle_get_acc_cmpl(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS, i; ++ MPI_Aint basic_sz, count, offset = 0; ++ struct iovec *iov; ++ char *src_ptr, *original = NULL; ++ size_t data_sz; ++ int shm_locked ATTRIBUTE((unused)) = 0; ++ MPIR_Win *win ATTRIBUTE((unused)) = MPIDIG_REQUEST(rreq, req->areq.win_ptr); ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_HANDLE_GET_ACC_CMPL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_HANDLE_GET_ACC_CMPL); ++ ++ MPIR_Datatype_get_size_macro(MPIDIG_REQUEST(rreq, req->areq.target_datatype), basic_sz); ++ MPIR_Assert(basic_sz); ++ data_sz = MPIDIG_REQUEST(rreq, req->areq.data_sz); ++ ++ /* MPIDI_CS_ENTER(); */ ++ ++ original = (char *) MPL_malloc(data_sz, MPL_MEM_RMA); ++ MPIR_Assert(original); ++ ++ if (MPIDIG_REQUEST(rreq, req->areq.op) == MPI_NO_OP) { ++ MPIDIG_REQUEST(rreq, req->areq.origin_count) = MPIDIG_REQUEST(rreq, req->areq.target_count); ++ MPIDIG_REQUEST(rreq, req->areq.data_sz) = data_sz; ++ } ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDIG_WIN(win, shm_allocated)) { ++ mpi_errno = MPIDI_SHM_rma_op_cs_enter_hook(win); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ shm_locked = 1; ++ } ++#endif ++ ++ if (MPIDIG_REQUEST(rreq, req->areq.dt_iov) == NULL) { ++ ++ MPIR_Memcpy(original, MPIDIG_REQUEST(rreq, req->areq.target_addr), ++ basic_sz * MPIDIG_REQUEST(rreq, req->areq.target_count)); ++ ++ mpi_errno = MPIDIG_compute_acc_op(MPIDIG_REQUEST(rreq, req->areq.data), ++ MPIDIG_REQUEST(rreq, req->areq.origin_count), ++ MPIDIG_REQUEST(rreq, req->areq.origin_datatype), ++ MPIDIG_REQUEST(rreq, req->areq.target_addr), ++ MPIDIG_REQUEST(rreq, req->areq.target_count), ++ MPIDIG_REQUEST(rreq, req->areq.target_datatype), ++ MPIDIG_REQUEST(rreq, req->areq.op), ++ MPIDIG_ACC_SRCBUF_DEFAULT); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else { ++ iov = (struct iovec *) MPIDIG_REQUEST(rreq, req->areq.dt_iov); ++ src_ptr = (char *) MPIDIG_REQUEST(rreq, req->areq.data); ++ for (i = 0; i < MPIDIG_REQUEST(rreq, req->areq.n_iov); i++) { ++ count = iov[i].iov_len / basic_sz; ++ MPIR_Assert(count > 0); ++ ++ MPIR_Memcpy(original + offset, iov[i].iov_base, count * basic_sz); ++ offset += count * basic_sz; ++ ++ mpi_errno = MPIDIG_compute_acc_op(src_ptr, count, ++ MPIDIG_REQUEST(rreq, req->areq.origin_datatype), ++ iov[i].iov_base, count, ++ MPIDIG_REQUEST(rreq, req->areq.target_datatype), ++ MPIDIG_REQUEST(rreq, req->areq.op), ++ MPIDIG_ACC_SRCBUF_DEFAULT); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ src_ptr += count * basic_sz; ++ } ++ MPL_free(iov); ++ } ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDIG_WIN(win, shm_allocated)) { ++ mpi_errno = MPIDI_SHM_rma_op_cs_exit_hook(win); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ /* MPIDI_CS_EXIT(); */ ++ MPL_free(MPIDIG_REQUEST(rreq, req->areq.data)); ++ ++ MPIDIG_REQUEST(rreq, req->areq.data) = original; ++ mpi_errno = ack_get_acc(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPID_Request_complete(rreq); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_HANDLE_GET_ACC_CMPL); ++ return mpi_errno; ++ fn_fail: ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ /* release lock if error is reported inside CS. */ ++ if (shm_locked) ++ MPIDI_SHM_rma_op_cs_exit_hook(win); ++#endif ++ goto fn_exit; ++} ++ ++static void handle_acc_data(void **data, size_t * p_data_sz, int *is_contig, MPIR_Request * rreq) ++{ ++ void *p_data = NULL; ++ size_t data_sz; ++ uintptr_t base; ++ int i; ++ struct iovec *iov; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_HANDLE_ACC_DATA); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_HANDLE_ACC_DATA); ++ ++ base = (uintptr_t) MPIDIG_REQUEST(rreq, req->areq.target_addr); ++ MPIDI_Datatype_check_size(MPIDIG_REQUEST(rreq, req->areq.origin_datatype), ++ MPIDIG_REQUEST(rreq, req->areq.origin_count), data_sz); ++ ++ /* The origin_data can be NULL only with no-op. ++ * TODO: when no-op is set, we do not need send origin_data at all. */ ++ if (data_sz) { ++ p_data = MPL_malloc(data_sz, MPL_MEM_RMA); ++ MPIR_Assert(p_data); ++ } else { ++ MPIR_Assert(MPIDIG_REQUEST(rreq, req->areq.op) == MPI_NO_OP); ++ } ++ ++ MPIDIG_REQUEST(rreq, req->areq.data) = p_data; ++ ++ /* Adjust the target iov addresses using the base address ++ * (window base + target_disp) */ ++ iov = (struct iovec *) MPIDIG_REQUEST(rreq, req->areq.dt_iov); ++ for (i = 0; i < MPIDIG_REQUEST(rreq, req->areq.n_iov); i++) ++ iov[i].iov_base = (char *) iov[i].iov_base + base; ++ ++ /* Progress engine may pass NULL here if received data sizeis zero */ ++ if (data) ++ *data = p_data; ++ if (is_contig) ++ *is_contig = 1; ++ if (p_data_sz) ++ *p_data_sz = data_sz; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_HANDLE_ACC_DATA); ++} ++ ++static int get_target_cmpl_cb(MPIR_Request * req) ++{ ++ int mpi_errno = MPI_SUCCESS, i, c; ++ size_t data_sz, offset; ++ MPIDIG_get_ack_msg_t get_ack; ++ struct iovec *iov; ++ char *p_data; ++ uintptr_t base; ++ MPIR_Win *win; ++ MPIR_Context_id_t context_id; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_TARGET_CMPL_CB); ++ ++ base = MPIDIG_REQUEST(req, req->greq.addr); ++ ++ MPIR_cc_incr(req->cc_ptr, &c); ++ get_ack.greq_ptr = MPIDIG_REQUEST(req, req->greq.greq_ptr); ++ win = MPIDIG_REQUEST(req, req->greq.win_ptr); ++ context_id = MPIDIG_win_to_context(win); ++ ++ if (MPIDIG_REQUEST(req, req->greq.n_iov) == 0) { ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(req, is_local)) ++ mpi_errno = MPIDI_SHM_am_isend_reply(context_id, MPIDIG_REQUEST(req, rank), ++ MPIDIG_GET_ACK, &get_ack, sizeof(get_ack), ++ (void *) MPIDIG_REQUEST(req, req->greq.addr), ++ MPIDIG_REQUEST(req, req->greq.count), ++ MPIDIG_REQUEST(req, req->greq.datatype), req); ++ else ++#endif ++ { ++ mpi_errno = MPIDI_NM_am_isend_reply(context_id, MPIDIG_REQUEST(req, rank), ++ MPIDIG_GET_ACK, &get_ack, sizeof(get_ack), ++ (void *) MPIDIG_REQUEST(req, req->greq.addr), ++ MPIDIG_REQUEST(req, req->greq.count), ++ MPIDIG_REQUEST(req, req->greq.datatype), req); ++ } ++ ++ MPID_Request_complete(req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ goto fn_exit; ++ } ++ ++ iov = (struct iovec *) MPIDIG_REQUEST(req, req->greq.dt_iov); ++ ++ data_sz = 0; ++ for (i = 0; i < MPIDIG_REQUEST(req, req->greq.n_iov); i++) { ++ data_sz += iov[i].iov_len; ++ } ++ ++ p_data = (char *) MPL_malloc(data_sz, MPL_MEM_RMA); ++ MPIR_Assert(p_data); ++ ++ offset = 0; ++ for (i = 0; i < MPIDIG_REQUEST(req, req->greq.n_iov); i++) { ++ /* Adjust a window base address */ ++ iov[i].iov_base = (char *) iov[i].iov_base + base; ++ MPIR_Memcpy(p_data + offset, iov[i].iov_base, iov[i].iov_len); ++ offset += iov[i].iov_len; ++ } ++ ++ MPL_free(MPIDIG_REQUEST(req, req->greq.dt_iov)); ++ MPIDIG_REQUEST(req, req->greq.dt_iov) = (void *) p_data; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(req, is_local)) ++ mpi_errno = MPIDI_SHM_am_isend_reply(context_id, MPIDIG_REQUEST(req, rank), ++ MPIDIG_GET_ACK, &get_ack, sizeof(get_ack), p_data, ++ data_sz, MPI_BYTE, req); ++ else ++#endif ++ { ++ mpi_errno = MPIDI_NM_am_isend_reply(context_id, MPIDIG_REQUEST(req, rank), ++ MPIDIG_GET_ACK, &get_ack, sizeof(get_ack), p_data, ++ data_sz, MPI_BYTE, req); ++ } ++ ++ MPID_Request_complete(req); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int put_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_TARGET_CMPL_CB); ++ ++ if (MPIDIG_REQUEST(rreq, req->status) & MPIDIG_REQ_RCV_NON_CONTIG) { ++ MPL_free(MPIDIG_REQUEST(rreq, req->iov)); ++ } ++ ++ MPL_free(MPIDIG_REQUEST(rreq, req->preq.dt_iov)); ++ ++ mpi_errno = ack_put(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPID_Request_complete(rreq); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int put_iov_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_put_iov_ack_msg_t ack_msg; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_IOV_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_IOV_TARGET_CMPL_CB); ++ ++ ack_msg.src_rank = MPIDIG_REQUEST(rreq, rank); ++ ack_msg.origin_preq_ptr = (uint64_t) MPIDIG_REQUEST(rreq, req->preq.preq_ptr); ++ ack_msg.target_preq_ptr = (uint64_t) rreq; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(rreq, is_local)) ++ mpi_errno = ++ MPIDI_SHM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->preq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_PUT_IOV_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ else ++#endif ++ { ++ mpi_errno = ++ MPIDI_NM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->preq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_PUT_IOV_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_IOV_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int acc_iov_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_acc_iov_ack_msg_t ack_msg; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_IOV_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_IOV_TARGET_CMPL_CB); ++ ++ ack_msg.origin_preq_ptr = (uint64_t) MPIDIG_REQUEST(rreq, req->areq.req_ptr); ++ ack_msg.target_preq_ptr = (uint64_t) rreq; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(rreq, is_local)) ++ mpi_errno = ++ MPIDI_SHM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->areq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_ACC_IOV_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ else ++#endif ++ { ++ mpi_errno = ++ MPIDI_NM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->areq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_ACC_IOV_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_IOV_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int get_acc_iov_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_get_acc_iov_ack_msg_t ack_msg; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_IOV_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_IOV_TARGET_CMPL_CB); ++ ++ ack_msg.origin_preq_ptr = (uint64_t) MPIDIG_REQUEST(rreq, req->areq.req_ptr); ++ ack_msg.target_preq_ptr = (uint64_t) rreq; ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDI_REQUEST(rreq, is_local)) ++ mpi_errno = ++ MPIDI_SHM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->areq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_GET_ACC_IOV_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ else ++#endif ++ { ++ mpi_errno = ++ MPIDI_NM_am_send_hdr_reply(MPIDIG_win_to_context ++ (MPIDIG_REQUEST(rreq, req->areq.win_ptr)), ++ MPIDIG_REQUEST(rreq, rank), MPIDIG_GET_ACC_IOV_ACK, ++ &ack_msg, sizeof(ack_msg)); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_IOV_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int cswap_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ void *compare_addr; ++ void *origin_addr; ++ size_t data_sz; ++ MPIR_Win *win ATTRIBUTE((unused)) = NULL; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CSWAP_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CSWAP_TARGET_CMPL_CB); ++ ++ if (!MPIDIG_check_cmpl_order(rreq, cswap_target_cmpl_cb)) ++ return mpi_errno; ++ ++ MPIDI_Datatype_check_size(MPIDIG_REQUEST(rreq, req->creq.datatype), 1, data_sz); ++ origin_addr = MPIDIG_REQUEST(rreq, req->creq.data); ++ compare_addr = ((char *) MPIDIG_REQUEST(rreq, req->creq.data)) + data_sz; ++ ++ /* MPIDI_CS_ENTER(); */ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ win = MPIDIG_REQUEST(rreq, req->creq.win_ptr); ++ if (MPIDIG_WIN(win, shm_allocated)) { ++ mpi_errno = MPIDI_SHM_rma_op_cs_enter_hook(win); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ ++ if (MPIR_Compare_equal((void *) MPIDIG_REQUEST(rreq, req->creq.addr), compare_addr, ++ MPIDIG_REQUEST(rreq, req->creq.datatype))) { ++ MPIR_Memcpy(compare_addr, (void *) MPIDIG_REQUEST(rreq, req->creq.addr), data_sz); ++ MPIR_Memcpy((void *) MPIDIG_REQUEST(rreq, req->creq.addr), origin_addr, data_sz); ++ } else { ++ MPIR_Memcpy(compare_addr, (void *) MPIDIG_REQUEST(rreq, req->creq.addr), data_sz); ++ } ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (MPIDIG_WIN(win, shm_allocated)) { ++ mpi_errno = MPIDI_SHM_rma_op_cs_exit_hook(win); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++#endif ++ /* MPIDI_CS_EXIT(); */ ++ ++ mpi_errno = ack_cswap(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPID_Request_complete(rreq); ++ MPIDIG_progress_compl_list(); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CSWAP_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++ ++static int acc_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_TARGET_CMPL_CB); ++ ++ if (!MPIDIG_check_cmpl_order(rreq, acc_target_cmpl_cb)) ++ return mpi_errno; ++ ++ mpi_errno = handle_acc_cmpl(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDIG_progress_compl_list(); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int get_acc_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_TARGET_CMPL_CB); ++ ++ if (!MPIDIG_check_cmpl_order(rreq, get_acc_target_cmpl_cb)) ++ return mpi_errno; ++ ++ mpi_errno = handle_get_acc_cmpl(rreq); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDIG_progress_compl_list(); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_TARGET_CMPL_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int get_ack_target_cmpl_cb(MPIR_Request * get_req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Win *win; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACK_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACK_TARGET_CMPL_CB); ++ ++ if (MPIDIG_REQUEST(get_req, req->status) & MPIDIG_REQ_RCV_NON_CONTIG) { ++ MPL_free(MPIDIG_REQUEST(get_req, req->iov)); ++ } ++ ++ win = MPIDIG_REQUEST(get_req, req->greq.win_ptr); ++ MPIDIG_win_remote_cmpl_cnt_decr(win, MPIDIG_REQUEST(get_req, rank)); ++ ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(get_req, req->greq.datatype)); ++ MPID_Request_complete(get_req); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACK_TARGET_CMPL_CB); ++ return mpi_errno; ++} ++ ++ ++static int get_acc_ack_target_cmpl_cb(MPIR_Request * areq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Win *win; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_ACK_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_ACK_TARGET_CMPL_CB); ++ ++ if (MPIDIG_REQUEST(areq, req->status) & MPIDIG_REQ_RCV_NON_CONTIG) { ++ MPL_free(MPIDIG_REQUEST(areq, req->iov)); ++ } ++ ++ win = MPIDIG_REQUEST(areq, req->areq.win_ptr); ++ MPIDIG_win_remote_cmpl_cnt_decr(win, MPIDIG_REQUEST(areq, rank)); ++ MPIDIG_win_remote_acc_cmpl_cnt_decr(win, MPIDIG_REQUEST(areq, rank)); ++ ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(areq, req->areq.result_datatype)); ++ MPID_Request_complete(areq); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_ACK_TARGET_CMPL_CB); ++ return mpi_errno; ++} ++ ++static int cswap_ack_target_cmpl_cb(MPIR_Request * rreq) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Win *win; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CSWAP_ACK_TARGET_CMPL_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CSWAP_ACK_TARGET_CMPL_CB); ++ ++ win = MPIDIG_REQUEST(rreq, req->creq.win_ptr); ++ MPIDIG_win_remote_cmpl_cnt_decr(win, MPIDIG_REQUEST(rreq, rank)); ++ MPIDIG_win_remote_acc_cmpl_cnt_decr(win, MPIDIG_REQUEST(rreq, rank)); ++ ++ MPL_free(MPIDIG_REQUEST(rreq, req->creq.data)); ++ MPID_Request_complete(rreq); ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CSWAP_ACK_TARGET_CMPL_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_put_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_put_ack_msg_t *msg_hdr = (MPIDIG_put_ack_msg_t *) am_hdr; ++ MPIR_Win *win; ++ MPIR_Request *preq; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_ACK_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put_ack); ++ ++ preq = (MPIR_Request *) msg_hdr->preq_ptr; ++ win = MPIDIG_REQUEST(preq, req->preq.win_ptr); ++ ++ MPL_free(MPIDIG_REQUEST(preq, req->preq.dt_iov)); ++ ++ MPIDIG_win_remote_cmpl_cnt_decr(win, MPIDIG_REQUEST(preq, rank)); ++ ++ MPID_Request_complete(preq); ++ ++ if (req) ++ *req = NULL; ++ if (target_cmpl_cb) ++ *target_cmpl_cb = NULL; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put_ack); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_acc_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_acc_ack_msg_t *msg_hdr = (MPIDIG_acc_ack_msg_t *) am_hdr; ++ MPIR_Win *win; ++ MPIR_Request *areq; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_ACK_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc_ack); ++ ++ areq = (MPIR_Request *) msg_hdr->req_ptr; ++ win = MPIDIG_REQUEST(areq, req->areq.win_ptr); ++ ++ MPL_free(MPIDIG_REQUEST(areq, req->areq.dt_iov)); ++ ++ MPIDIG_win_remote_cmpl_cnt_decr(win, MPIDIG_REQUEST(areq, rank)); ++ MPIDIG_win_remote_acc_cmpl_cnt_decr(win, MPIDIG_REQUEST(areq, rank)); ++ ++ MPID_Request_complete(areq); ++ ++ if (req) ++ *req = NULL; ++ if (target_cmpl_cb) ++ *target_cmpl_cb = NULL; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc_ack); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_acc_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_get_acc_ack_msg_t *msg_hdr = (MPIDIG_get_acc_ack_msg_t *) am_hdr; ++ MPIR_Request *areq; ++ ++ size_t data_sz; ++ int dt_contig, n_iov; ++ MPI_Aint dt_true_lb, num_iov; ++ MPIR_Datatype *dt_ptr; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_ACK_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc_ack); ++ ++ areq = (MPIR_Request *) msg_hdr->req_ptr; ++ ++ MPL_free(MPIDIG_REQUEST(areq, req->areq.dt_iov)); ++ ++ MPIDI_Datatype_get_info(MPIDIG_REQUEST(areq, req->areq.result_count), ++ MPIDIG_REQUEST(areq, req->areq.result_datatype), ++ dt_contig, data_sz, dt_ptr, dt_true_lb); ++ *is_contig = dt_contig; ++ ++ if (dt_contig) { ++ *p_data_sz = data_sz; ++ *data = (char *) MPIDIG_REQUEST(areq, req->areq.result_addr) + dt_true_lb; ++ } else { ++ MPIR_Typerep_iov_len(MPIDIG_REQUEST(areq, req->areq.result_addr), ++ MPIDIG_REQUEST(areq, req->areq.result_count), ++ MPIDIG_REQUEST(areq, req->areq.result_datatype), 0, data_sz, &num_iov); ++ n_iov = (int) num_iov; ++ MPIR_Assert(n_iov > 0); ++ MPIDIG_REQUEST(areq, req->iov) = ++ (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_RMA); ++ MPIR_Assert(MPIDIG_REQUEST(areq, req->iov)); ++ ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov(MPIDIG_REQUEST(areq, req->areq.result_addr), ++ MPIDIG_REQUEST(areq, req->areq.result_count), ++ MPIDIG_REQUEST(areq, req->areq.result_datatype), ++ 0, MPIDIG_REQUEST(areq, req->iov), n_iov, data_sz, ++ &actual_iov_len, &actual_iov_bytes); ++ n_iov = actual_iov_len; ++ ++ MPIR_Assert(actual_iov_bytes == (MPI_Aint) data_sz); ++ *data = MPIDIG_REQUEST(areq, req->iov); ++ *p_data_sz = n_iov; ++ MPIDIG_REQUEST(areq, req->status) |= MPIDIG_REQ_RCV_NON_CONTIG; ++ } ++ ++ *req = areq; ++ *target_cmpl_cb = get_acc_ack_target_cmpl_cb; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc_ack); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_cswap_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_cswap_ack_msg_t *msg_hdr = (MPIDIG_cswap_ack_msg_t *) am_hdr; ++ MPIR_Request *creq; ++ uint64_t data_sz; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CSWAP_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CSWAP_ACK_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_cas_ack); ++ ++ creq = (MPIR_Request *) msg_hdr->req_ptr; ++ MPIDI_Datatype_check_size(MPIDIG_REQUEST(creq, req->creq.datatype), 1, data_sz); ++ *data = MPIDIG_REQUEST(creq, req->creq.result_addr); ++ *p_data_sz = data_sz; ++ *is_contig = 1; ++ ++ *req = creq; ++ *target_cmpl_cb = cswap_ack_target_cmpl_cb; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_cas_ack); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CSWAP_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++ ++int MPIDIG_win_ctrl_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIDIG_win_cntrl_msg_t *msg_hdr = (MPIDIG_win_cntrl_msg_t *) am_hdr; ++ MPIR_Win *win; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_CTRL_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_CTRL_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_win_ctrl); ++ ++ win = (MPIR_Win *) MPIDIU_map_lookup(MPIDI_global.win_map, msg_hdr->win_id); ++ /* TODO: check output win ptr */ ++ ++ switch (handler_id) { ++ char buff[32]; ++ ++ case MPIDIG_WIN_LOCK: ++ case MPIDIG_WIN_LOCKALL: ++ win_lock_req_proc(handler_id, msg_hdr, win); ++ break; ++ ++ case MPIDIG_WIN_LOCK_ACK: ++ case MPIDIG_WIN_LOCKALL_ACK: ++ win_lock_ack_proc(handler_id, msg_hdr, win); ++ break; ++ ++ case MPIDIG_WIN_UNLOCK: ++ case MPIDIG_WIN_UNLOCKALL: ++ win_unlock_proc(msg_hdr, is_local, win); ++ break; ++ ++ case MPIDIG_WIN_UNLOCK_ACK: ++ case MPIDIG_WIN_UNLOCKALL_ACK: ++ win_unlock_done(msg_hdr, win); ++ break; ++ ++ case MPIDIG_WIN_COMPLETE: ++ win_complete_proc(msg_hdr, win); ++ break; ++ ++ case MPIDIG_WIN_POST: ++ win_post_proc(msg_hdr, win); ++ break; ++ ++ default: ++ MPL_snprintf(buff, sizeof(buff), "Invalid message type: %d\n", handler_id); ++ MPID_Abort(NULL, MPI_ERR_INTERN, 1, buff); ++ } ++ ++ if (req) ++ *req = NULL; ++ if (target_cmpl_cb) ++ *target_cmpl_cb = NULL; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_win_ctrl); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_CTRL_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_put_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq = NULL; ++ size_t data_sz; ++ struct iovec *iov, *dt_iov; ++ uintptr_t base; /* Base address of the window */ ++ size_t offset; ++ ++ int dt_contig, n_iov; ++ MPI_Aint dt_true_lb, num_iov; ++ MPIR_Datatype *dt_ptr; ++ MPIR_Win *win; ++ MPIDIG_put_msg_t *msg_hdr = (MPIDIG_put_msg_t *) am_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ *req = rreq; ++ ++ MPIDIG_REQUEST(*req, req->preq.preq_ptr) = msg_hdr->preq_ptr; ++ MPIDIG_REQUEST(*req, rank) = msg_hdr->src_rank; ++ ++ win = (MPIR_Win *) MPIDIU_map_lookup(MPIDI_global.win_map, msg_hdr->win_id); ++ MPIR_Assert(win); ++ ++ base = MPIDIG_win_base_at_target(win); ++ ++ MPIDIG_REQUEST(rreq, req->preq.win_ptr) = win; ++ ++ *target_cmpl_cb = put_target_cmpl_cb; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(rreq, is_local) = is_local; ++#endif ++ ++ offset = win->disp_unit * msg_hdr->target_disp; ++ if (msg_hdr->n_iov) { ++ int i; ++ dt_iov = (struct iovec *) MPL_malloc(sizeof(struct iovec) * msg_hdr->n_iov, MPL_MEM_RMA); ++ MPIR_Assert(dt_iov); ++ ++ iov = (struct iovec *) ((char *) am_hdr + sizeof(*msg_hdr)); ++ for (i = 0; i < msg_hdr->n_iov; i++) { ++ dt_iov[i].iov_base = (char *) iov[i].iov_base + base + offset; ++ dt_iov[i].iov_len = iov[i].iov_len; ++ } ++ ++ MPIDIG_REQUEST(rreq, req->preq.dt_iov) = dt_iov; ++ MPIDIG_REQUEST(rreq, req->preq.n_iov) = msg_hdr->n_iov; ++ *is_contig = 0; ++ *data = dt_iov; ++ *p_data_sz = msg_hdr->n_iov; ++ goto fn_exit; ++ } ++ ++ MPIDIG_REQUEST(rreq, req->preq.dt_iov) = NULL; ++ MPIDI_Datatype_get_info(msg_hdr->count, msg_hdr->datatype, ++ dt_contig, data_sz, dt_ptr, dt_true_lb); ++ *is_contig = dt_contig; ++ ++ if (dt_contig) { ++ *p_data_sz = data_sz; ++ *data = (char *) (offset + base + dt_true_lb); ++ } else { ++ MPIR_Typerep_iov_len((void *) (offset + base), msg_hdr->count, msg_hdr->datatype, ++ 0, data_sz, &num_iov); ++ n_iov = (int) num_iov; ++ MPIR_Assert(n_iov > 0); ++ MPIDIG_REQUEST(rreq, req->iov) = ++ (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_RMA); ++ MPIR_Assert(MPIDIG_REQUEST(rreq, req->iov)); ++ ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov((void *) (offset + base), msg_hdr->count, msg_hdr->datatype, ++ 0, MPIDIG_REQUEST(rreq, req->iov), n_iov, data_sz, ++ &actual_iov_len, &actual_iov_bytes); ++ n_iov = actual_iov_len; ++ ++ MPIR_Assert(actual_iov_bytes == (MPI_Aint) data_sz); ++ *data = MPIDIG_REQUEST(rreq, req->iov); ++ *p_data_sz = n_iov; ++ MPIDIG_REQUEST(rreq, req->status) |= MPIDIG_REQ_RCV_NON_CONTIG; ++ } ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_put_iov_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq = NULL; ++ struct iovec *dt_iov; ++ uintptr_t base; ++ size_t offset; ++ ++ MPIR_Win *win; ++ MPIDIG_put_msg_t *msg_hdr = (MPIDIG_put_msg_t *) am_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_IOV_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_IOV_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put_iov); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ *req = rreq; ++ ++ MPIDIG_REQUEST(*req, req->preq.preq_ptr) = msg_hdr->preq_ptr; ++ MPIDIG_REQUEST(*req, rank) = msg_hdr->src_rank; ++ ++ win = (MPIR_Win *) MPIDIU_map_lookup(MPIDI_global.win_map, msg_hdr->win_id); ++ MPIR_Assert(win); ++ ++ MPIDIG_REQUEST(rreq, req->preq.win_ptr) = win; ++ ++ offset = win->disp_unit * msg_hdr->target_disp; ++ base = MPIDIG_win_base_at_target(win); ++ ++ *target_cmpl_cb = put_iov_target_cmpl_cb; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(rreq, is_local) = is_local; ++#endif ++ ++ /* Base adjustment for iov will be done after we get the entire iovs, ++ * at MPIDIG_put_data_target_msg_cb */ ++ MPIR_Assert(msg_hdr->n_iov); ++ dt_iov = (struct iovec *) MPL_malloc(sizeof(struct iovec) * msg_hdr->n_iov, MPL_MEM_RMA); ++ MPIR_Assert(dt_iov); ++ ++ MPIDIG_REQUEST(rreq, req->preq.dt_iov) = dt_iov; ++ MPIDIG_REQUEST(rreq, req->preq.n_iov) = msg_hdr->n_iov; ++ MPIDIG_REQUEST(*req, req->preq.target_addr) = (void *) (offset + base); ++ *is_contig = 1; ++ *data = dt_iov; ++ *p_data_sz = msg_hdr->n_iov * sizeof(struct iovec); ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put_iov); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_IOV_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_put_iov_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq, *origin_req; ++ MPIDIG_put_iov_ack_msg_t *msg_hdr = (MPIDIG_put_iov_ack_msg_t *) am_hdr; ++ MPIDIG_put_dat_msg_t dat_msg; ++ MPIR_Win *win; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_IOV_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_IOV_ACK_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put_iov_ack); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ ++ origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr; ++ dat_msg.preq_ptr = msg_hdr->target_preq_ptr; ++ win = MPIDIG_REQUEST(origin_req, req->preq.win_ptr); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (is_local) ++ mpi_errno = MPIDI_SHM_am_isend_reply(MPIDIG_win_to_context(win), ++ MPIDIG_REQUEST(origin_req, rank), ++ MPIDIG_PUT_DAT_REQ, &dat_msg, sizeof(dat_msg), ++ MPIDIG_REQUEST(origin_req, req->preq.origin_addr), ++ MPIDIG_REQUEST(origin_req, req->preq.origin_count), ++ MPIDIG_REQUEST(origin_req, req->preq.origin_datatype), ++ rreq); ++ else ++#endif ++ { ++ mpi_errno = MPIDI_NM_am_isend_reply(MPIDIG_win_to_context(win), ++ MPIDIG_REQUEST(origin_req, rank), ++ MPIDIG_PUT_DAT_REQ, &dat_msg, sizeof(dat_msg), ++ MPIDIG_REQUEST(origin_req, req->preq.origin_addr), ++ MPIDIG_REQUEST(origin_req, req->preq.origin_count), ++ MPIDIG_REQUEST(origin_req, req->preq.origin_datatype), ++ rreq); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(origin_req, req->preq.origin_datatype)); ++ ++ *target_cmpl_cb = NULL; ++ *req = NULL; ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put_iov_ack); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_IOV_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_acc_iov_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq, *origin_req; ++ MPIDIG_acc_iov_ack_msg_t *msg_hdr = (MPIDIG_acc_iov_ack_msg_t *) am_hdr; ++ MPIDIG_acc_dat_msg_t dat_msg; ++ MPIR_Win *win; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_IOV_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_IOV_ACK_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc_iov_ack); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ ++ origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr; ++ dat_msg.preq_ptr = msg_hdr->target_preq_ptr; ++ win = MPIDIG_REQUEST(origin_req, req->areq.win_ptr); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (is_local) ++ mpi_errno = MPIDI_SHM_am_isend_reply(MPIDIG_win_to_context(win), ++ MPIDIG_REQUEST(origin_req, rank), ++ MPIDIG_ACC_DAT_REQ, ++ &dat_msg, sizeof(dat_msg), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_addr), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_count), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_datatype), ++ rreq); ++ else ++#endif ++ { ++ mpi_errno = MPIDI_NM_am_isend_reply(MPIDIG_win_to_context(win), ++ MPIDIG_REQUEST(origin_req, rank), ++ MPIDIG_ACC_DAT_REQ, ++ &dat_msg, sizeof(dat_msg), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_addr), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_count), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_datatype), ++ rreq); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(origin_req, req->areq.origin_datatype)); ++ ++ *target_cmpl_cb = NULL; ++ *req = NULL; ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc_iov_ack); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_IOV_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_get_acc_iov_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq, *origin_req; ++ MPIDIG_get_acc_iov_ack_msg_t *msg_hdr = (MPIDIG_get_acc_iov_ack_msg_t *) am_hdr; ++ MPIDIG_get_acc_dat_msg_t dat_msg; ++ MPIR_Win *win; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_IOV_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_IOV_ACK_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc_iov_ack); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ ++ origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr; ++ dat_msg.preq_ptr = msg_hdr->target_preq_ptr; ++ win = MPIDIG_REQUEST(origin_req, req->areq.win_ptr); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ if (is_local) ++ mpi_errno = MPIDI_SHM_am_isend_reply(MPIDIG_win_to_context(win), ++ MPIDIG_REQUEST(origin_req, rank), ++ MPIDIG_GET_ACC_DAT_REQ, ++ &dat_msg, sizeof(dat_msg), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_addr), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_count), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_datatype), ++ rreq); ++ else ++#endif ++ { ++ mpi_errno = MPIDI_NM_am_isend_reply(MPIDIG_win_to_context(win), ++ MPIDIG_REQUEST(origin_req, rank), ++ MPIDIG_GET_ACC_DAT_REQ, ++ &dat_msg, sizeof(dat_msg), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_addr), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_count), ++ MPIDIG_REQUEST(origin_req, req->areq.origin_datatype), ++ rreq); ++ } ++ ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Datatype_release_if_not_builtin(MPIDIG_REQUEST(origin_req, req->areq.origin_datatype)); ++ ++ *target_cmpl_cb = NULL; ++ *req = NULL; ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc_iov_ack); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_IOV_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_put_data_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq; ++ MPIDIG_put_dat_msg_t *msg_hdr = (MPIDIG_put_dat_msg_t *) am_hdr; ++ struct iovec *iov; ++ uintptr_t base; ++ int i; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_PUT_DATA_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_PUT_DATA_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put_data); ++ ++ rreq = (MPIR_Request *) msg_hdr->preq_ptr; ++ base = (uintptr_t) MPIDIG_REQUEST(rreq, req->preq.target_addr); ++ ++ /* Adjust the target iov addresses using the base address ++ * (window base + target_disp) */ ++ iov = (struct iovec *) MPIDIG_REQUEST(rreq, req->preq.dt_iov); ++ for (i = 0; i < MPIDIG_REQUEST(rreq, req->preq.n_iov); i++) ++ iov[i].iov_base = (char *) iov[i].iov_base + base; ++ ++ *data = MPIDIG_REQUEST(rreq, req->preq.dt_iov); ++ *is_contig = 0; ++ *p_data_sz = MPIDIG_REQUEST(rreq, req->preq.n_iov); ++ *req = rreq; ++ *target_cmpl_cb = put_target_cmpl_cb; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put_data); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_PUT_DATA_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_acc_data_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq; ++ MPIDIG_acc_dat_msg_t *msg_hdr = (MPIDIG_acc_dat_msg_t *) am_hdr; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_DATA_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_DATA_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc_data); ++ ++ rreq = (MPIR_Request *) msg_hdr->preq_ptr; ++ handle_acc_data(data, p_data_sz, is_contig, rreq); ++ ++ *req = rreq; ++ *target_cmpl_cb = acc_target_cmpl_cb; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc_data); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_DATA_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_acc_data_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq; ++ MPIDIG_get_acc_dat_msg_t *msg_hdr = (MPIDIG_get_acc_dat_msg_t *) am_hdr; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_DATA_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_DATA_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc_data); ++ ++ rreq = (MPIR_Request *) msg_hdr->preq_ptr; ++ handle_acc_data(data, p_data_sz, is_contig, rreq); ++ ++ *req = rreq; ++ *target_cmpl_cb = get_acc_target_cmpl_cb; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc_data); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_DATA_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_cswap_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq = NULL; ++ size_t data_sz; ++ MPIR_Win *win; ++ uintptr_t base; ++ size_t offset; ++ ++ int dt_contig; ++ void *p_data; ++ ++ MPIDIG_cswap_req_msg_t *msg_hdr = (MPIDIG_cswap_req_msg_t *) am_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_CSWAP_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_CSWAP_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_cas); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ *req = rreq; ++ ++ *target_cmpl_cb = cswap_target_cmpl_cb; ++ MPIDIG_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_global.nxt_seq_no, 1); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(rreq, is_local) = is_local; ++#endif ++ ++ MPIDI_Datatype_check_contig_size(msg_hdr->datatype, 1, dt_contig, data_sz); ++ *is_contig = dt_contig; ++ ++ win = (MPIR_Win *) MPIDIU_map_lookup(MPIDI_global.win_map, msg_hdr->win_id); ++ MPIR_Assert(win); ++ ++ base = MPIDIG_win_base_at_target(win); ++ offset = win->disp_unit * msg_hdr->target_disp; ++ ++ MPIDIG_REQUEST(*req, req->creq.win_ptr) = win; ++ MPIDIG_REQUEST(*req, req->creq.creq_ptr) = msg_hdr->req_ptr; ++ MPIDIG_REQUEST(*req, req->creq.datatype) = msg_hdr->datatype; ++ MPIDIG_REQUEST(*req, req->creq.addr) = offset + base; ++ MPIDIG_REQUEST(*req, rank) = msg_hdr->src_rank; ++ ++ MPIR_Assert(dt_contig == 1); ++ p_data = MPL_malloc(data_sz * 2, MPL_MEM_RMA); ++ MPIR_Assert(p_data); ++ ++ *p_data_sz = data_sz * 2; ++ *data = p_data; ++ MPIDIG_REQUEST(*req, req->creq.data) = p_data; ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_cas); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_CSWAP_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_acc_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq = NULL; ++ size_t data_sz; ++ void *p_data = NULL; ++ struct iovec *iov, *dt_iov; ++ MPIR_Win *win; ++ uintptr_t base; ++ size_t offset; ++ int i; ++ ++ MPIDIG_acc_req_msg_t *msg_hdr = (MPIDIG_acc_req_msg_t *) am_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ *req = rreq; ++ ++ MPIDI_Datatype_check_size(msg_hdr->origin_datatype, msg_hdr->origin_count, data_sz); ++ if (data_sz) { ++ p_data = MPL_malloc(data_sz, MPL_MEM_RMA); ++ MPIR_Assert(p_data); ++ } ++ ++ *target_cmpl_cb = acc_target_cmpl_cb; ++ MPIDIG_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_global.nxt_seq_no, 1); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(rreq, is_local) = is_local; ++#endif ++ ++ if (is_contig) { ++ *is_contig = 1; ++ *p_data_sz = data_sz; ++ *data = p_data; ++ } ++ ++ win = (MPIR_Win *) MPIDIU_map_lookup(MPIDI_global.win_map, msg_hdr->win_id); ++ MPIR_Assert(win); ++ ++ base = MPIDIG_win_base_at_target(win); ++ offset = win->disp_unit * msg_hdr->target_disp; ++ ++ MPIDIG_REQUEST(*req, req->areq.win_ptr) = win; ++ MPIDIG_REQUEST(*req, req->areq.req_ptr) = msg_hdr->req_ptr; ++ MPIDIG_REQUEST(*req, req->areq.origin_datatype) = msg_hdr->origin_datatype; ++ MPIDIG_REQUEST(*req, req->areq.target_datatype) = msg_hdr->target_datatype; ++ MPIDIG_REQUEST(*req, req->areq.origin_count) = msg_hdr->origin_count; ++ MPIDIG_REQUEST(*req, req->areq.target_count) = msg_hdr->target_count; ++ MPIDIG_REQUEST(*req, req->areq.target_addr) = (void *) (offset + base); ++ MPIDIG_REQUEST(*req, req->areq.op) = msg_hdr->op; ++ MPIDIG_REQUEST(*req, req->areq.data) = p_data; ++ MPIDIG_REQUEST(*req, req->areq.n_iov) = msg_hdr->n_iov; ++ MPIDIG_REQUEST(*req, req->areq.data_sz) = msg_hdr->result_data_sz; ++ MPIDIG_REQUEST(*req, rank) = msg_hdr->src_rank; ++ ++ if (!msg_hdr->n_iov) { ++ MPIDIG_REQUEST(rreq, req->areq.dt_iov) = NULL; ++ goto fn_exit; ++ } ++ ++ dt_iov = (struct iovec *) MPL_malloc(sizeof(struct iovec) * msg_hdr->n_iov, MPL_MEM_RMA); ++ MPIR_Assert(dt_iov); ++ ++ iov = (struct iovec *) ((char *) msg_hdr + sizeof(*msg_hdr)); ++ for (i = 0; i < msg_hdr->n_iov; i++) { ++ dt_iov[i].iov_base = (char *) iov[i].iov_base + base + offset; ++ dt_iov[i].iov_len = iov[i].iov_len; ++ } ++ MPIDIG_REQUEST(rreq, req->areq.dt_iov) = dt_iov; ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++ ++int MPIDIG_get_acc_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc); ++ ++ /* the same handling processing as ACC except the completion handler function. */ ++ mpi_errno = ++ MPIDIG_acc_target_msg_cb(handler_id, am_hdr, data, p_data_sz, is_local, is_contig, ++ target_cmpl_cb, req); ++ ++ *target_cmpl_cb = get_acc_target_cmpl_cb; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_acc_iov_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq = NULL; ++ struct iovec *dt_iov; ++ MPIR_Win *win; ++ uintptr_t base; ++ size_t offset; ++ ++ MPIDIG_acc_req_msg_t *msg_hdr = (MPIDIG_acc_req_msg_t *) am_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_ACC_IOV_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_ACC_IOV_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc_iov); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ *req = rreq; ++ ++ win = (MPIR_Win *) MPIDIU_map_lookup(MPIDI_global.win_map, msg_hdr->win_id); ++ MPIR_Assert(win); ++ ++ base = MPIDIG_win_base_at_target(win); ++ offset = win->disp_unit * msg_hdr->target_disp; ++ ++ MPIDIG_REQUEST(*req, req->areq.win_ptr) = win; ++ MPIDIG_REQUEST(*req, req->areq.req_ptr) = msg_hdr->req_ptr; ++ MPIDIG_REQUEST(*req, req->areq.origin_datatype) = msg_hdr->origin_datatype; ++ MPIDIG_REQUEST(*req, req->areq.target_datatype) = msg_hdr->target_datatype; ++ MPIDIG_REQUEST(*req, req->areq.origin_count) = msg_hdr->origin_count; ++ MPIDIG_REQUEST(*req, req->areq.target_count) = msg_hdr->target_count; ++ MPIDIG_REQUEST(*req, req->areq.target_addr) = (void *) (offset + base); ++ MPIDIG_REQUEST(*req, req->areq.op) = msg_hdr->op; ++ MPIDIG_REQUEST(*req, req->areq.n_iov) = msg_hdr->n_iov; ++ MPIDIG_REQUEST(*req, req->areq.data_sz) = msg_hdr->result_data_sz; ++ MPIDIG_REQUEST(*req, rank) = msg_hdr->src_rank; ++ ++ dt_iov = (struct iovec *) MPL_malloc(sizeof(struct iovec) * msg_hdr->n_iov, MPL_MEM_RMA); ++ MPIDIG_REQUEST(rreq, req->areq.dt_iov) = dt_iov; ++ MPIR_Assert(dt_iov); ++ ++ /* Base adjustment for iov will be done after we get the entire iovs, ++ * at MPIDIG_acc_data_target_msg_cb */ ++ *is_contig = 1; ++ *p_data_sz = sizeof(struct iovec) * msg_hdr->n_iov; ++ *data = (void *) dt_iov; ++ ++ *target_cmpl_cb = acc_iov_target_cmpl_cb; ++ MPIDIG_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_global.nxt_seq_no, 1); ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(rreq, is_local) = is_local; ++#endif ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc_iov); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_ACC_IOV_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_get_acc_iov_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACC_IOV_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACC_IOV_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc_iov); ++ ++ /* the same handling processing as ACC except the completion handler function. */ ++ mpi_errno = MPIDIG_acc_iov_target_msg_cb(handler_id, am_hdr, data, ++ p_data_sz, is_local, is_contig, target_cmpl_cb, req); ++ ++ *target_cmpl_cb = get_acc_iov_target_cmpl_cb; ++ ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc_iov); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACC_IOV_TARGET_MSG_CB); ++ return mpi_errno; ++} ++ ++int MPIDIG_get_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *rreq = NULL; ++ MPIDIG_get_msg_t *msg_hdr = (MPIDIG_get_msg_t *) am_hdr; ++ struct iovec *iov; ++ MPIR_Win *win; ++ uintptr_t base; ++ size_t offset; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get); ++ ++ rreq = MPIDIG_request_create(MPIR_REQUEST_KIND__RMA, 1); ++ MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); ++ ++ *req = rreq; ++ *target_cmpl_cb = get_target_cmpl_cb; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(rreq, is_local) = is_local; ++#endif ++ ++ win = (MPIR_Win *) MPIDIU_map_lookup(MPIDI_global.win_map, msg_hdr->win_id); ++ MPIR_Assert(win); ++ ++ base = MPIDIG_win_base_at_target(win); ++ ++ offset = win->disp_unit * msg_hdr->target_disp; ++ MPIDIG_REQUEST(rreq, req->greq.win_ptr) = win; ++ MPIDIG_REQUEST(rreq, req->greq.n_iov) = msg_hdr->n_iov; ++ MPIDIG_REQUEST(rreq, req->greq.addr) = offset + base; ++ MPIDIG_REQUEST(rreq, req->greq.count) = msg_hdr->count; ++ MPIDIG_REQUEST(rreq, req->greq.datatype) = msg_hdr->datatype; ++ MPIDIG_REQUEST(rreq, req->greq.dt_iov) = NULL; ++ MPIDIG_REQUEST(rreq, req->greq.greq_ptr) = msg_hdr->greq_ptr; ++ MPIDIG_REQUEST(rreq, rank) = msg_hdr->src_rank; ++ ++ if (msg_hdr->n_iov) { ++ iov = (struct iovec *) MPL_malloc(msg_hdr->n_iov * sizeof(*iov), MPL_MEM_RMA); ++ MPIR_Assert(iov); ++ ++ *data = (void *) iov; ++ *is_contig = 1; ++ *p_data_sz = msg_hdr->n_iov * sizeof(*iov); ++ MPIDIG_REQUEST(rreq, req->greq.dt_iov) = iov; ++ } ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_get_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Request *get_req; ++ size_t data_sz; ++ ++ int dt_contig, n_iov; ++ MPI_Aint dt_true_lb, num_iov; ++ MPIR_Datatype *dt_ptr; ++ ++ MPIDIG_get_ack_msg_t *msg_hdr = (MPIDIG_get_ack_msg_t *) am_hdr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_GET_ACK_TARGET_MSG_CB); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_GET_ACK_TARGET_MSG_CB); ++ MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_ack); ++ ++ get_req = (MPIR_Request *) msg_hdr->greq_ptr; ++ MPIR_Assert(get_req->kind == MPIR_REQUEST_KIND__RMA); ++ *req = get_req; ++ ++ MPL_free(MPIDIG_REQUEST(get_req, req->greq.dt_iov)); ++ ++ *target_cmpl_cb = get_ack_target_cmpl_cb; ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ MPIDI_REQUEST(get_req, is_local) = is_local; ++#endif ++ ++ MPIDI_Datatype_get_info(MPIDIG_REQUEST(get_req, req->greq.count), ++ MPIDIG_REQUEST(get_req, req->greq.datatype), ++ dt_contig, data_sz, dt_ptr, dt_true_lb); ++ ++ *is_contig = dt_contig; ++ ++ if (dt_contig) { ++ *p_data_sz = data_sz; ++ *data = (char *) (MPIDIG_REQUEST(get_req, req->greq.addr) + dt_true_lb); ++ } else { ++ MPIR_Typerep_iov_len((void *) MPIDIG_REQUEST(get_req, req->greq.addr), ++ MPIDIG_REQUEST(get_req, req->greq.count), ++ MPIDIG_REQUEST(get_req, req->greq.datatype), 0, data_sz, &num_iov); ++ n_iov = (int) num_iov; ++ MPIR_Assert(n_iov > 0); ++ MPIDIG_REQUEST(get_req, req->iov) = ++ (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_RMA); ++ MPIR_Assert(MPIDIG_REQUEST(get_req, req->iov)); ++ ++ int actual_iov_len; ++ MPI_Aint actual_iov_bytes; ++ MPIR_Typerep_to_iov((void *) MPIDIG_REQUEST(get_req, req->greq.addr), ++ MPIDIG_REQUEST(get_req, req->greq.count), ++ MPIDIG_REQUEST(get_req, req->greq.datatype), ++ 0, MPIDIG_REQUEST(get_req, req->iov), n_iov, data_sz, ++ &actual_iov_len, &actual_iov_bytes); ++ n_iov = actual_iov_len; ++ ++ MPIR_Assert(actual_iov_bytes == (MPI_Aint) data_sz); ++ *data = MPIDIG_REQUEST(get_req, req->iov); ++ *p_data_sz = n_iov; ++ MPIDIG_REQUEST(get_req, req->status) |= MPIDIG_REQ_RCV_NON_CONTIG; ++ } ++ ++ fn_exit: ++ MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_ack); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_GET_ACK_TARGET_MSG_CB); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpid/ch4/src/ch4r_rma_target_callbacks.h ++++ b/src/mpid/ch4/src/ch4r_rma_target_callbacks.h +@@ -11,9 +11,6 @@ + #ifndef CH4R_RMA_TARGET_CALLBACKS_H_INCLUDED + #define CH4R_RMA_TARGET_CALLBACKS_H_INCLUDED + +-#include "ch4r_request.h" +-#include "ch4r_callbacks.h" +- + /* This file includes all RMA callback routines and the completion function of + * each callback (e.g., received all data) on the packet receiving side. All handler + * functions are named with suffix "_target_msg_cb", and all handler completion +@@ -41,2428 +38,72 @@ extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_targetcb_get_acc_iov_ack ATTRIBUTE((un + extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_targetcb_acc_data ATTRIBUTE((unused)); + extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_targetcb_get_acc_data ATTRIBUTE((unused)); + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4_RMA_Init_targetcb_pvars +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_RMA_Init_targetcb_pvars(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- /* rma_targetcb_put */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_put, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Put (in seconds)"); +- +- /* rma_targetcb_put_ack */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_put_ack, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Put ACK (in seconds)"); +- +- /* rma_targetcb_get */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_get, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Get (in seconds)"); +- +- /* rma_targetcb_get_ack */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_get_ack, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Get ACK (in seconds)"); +- +- /* rma_targetcb_cas */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_cas, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Compare-and-swap (in seconds)"); +- +- /* rma_targetcb_cas_ack */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_cas_ack, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Compare-and-swap ACK (in seconds)"); +- +- /* rma_targetcb_acc */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_acc, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Accumulate (in seconds)"); +- +- /* rma_targetcb_get_acc */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_get_acc, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Get-Accumulate (in seconds)"); +- +- /* rma_targetcb_acc_ack */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_acc_ack, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Accumulate ACK (in seconds)"); +- +- /* rma_targetcb_get_acc_ack */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_get_acc_ack, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for Get-Accumulate ACK (in seconds)"); +- +- /* rma_targetcb_win_ctrl */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_win_ctrl, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for WIN CTRL (in seconds)"); +- +- /* rma_targetcb_put_iov */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_put_iov, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for PUT IOV (in seconds)"); +- +- /* rma_targetcb_put_iov_ack */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_put_iov_ack, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for PUT IOV ACK (in seconds)"); +- +- /* rma_targetcb_put_data */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_put_data, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for PUT DATA (in seconds)"); +- +- /* rma_targetcb_acc_iov */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_acc_iov, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for ACC IOV (in seconds)"); +- +- /* rma_targetcb_get_acc_iov */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_get_acc_iov, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for GET ACC IOV (in seconds)"); +- +- /* rma_targetcb_acc_iov_ack */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_acc_iov_ack, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for ACC IOV ACK (in seconds)"); +- +- /* rma_targetcb_get_acc_iov_ack */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_get_acc_iov_ack, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for GET ACC IOV ACK (in seconds)"); +- +- /* rma_targetcb_acc_data */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_acc_data, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for ACC DATA (in seconds)"); +- +- /* rma_targetcb_get_acc_data */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_targetcb_get_acc_data, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "RMA:TARGETCB for GET ACC DATA (in seconds)"); +- +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ack_put +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_ack_put(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_put_ack_msg_t ack_msg; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACK_PUT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACK_PUT); +- +- ack_msg.preq_ptr = MPIDI_CH4U_REQUEST(rreq, req->preq.preq_ptr); +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) +- mpi_errno = +- MPIDI_SHM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_PUT_ACK, +- &ack_msg, sizeof(ack_msg)); +- else +-#endif +- { +- mpi_errno = +- MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_PUT_ACK, +- &ack_msg, sizeof(ack_msg)); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACK_PUT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ack_cswap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_ack_cswap(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS, c; +- MPIDI_CH4U_cswap_ack_msg_t ack_msg; +- void *result_addr; +- size_t data_sz; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACK_CSWAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACK_CSWAP); +- +- MPIDI_Datatype_check_size(MPIDI_CH4U_REQUEST(rreq, req->creq.datatype), 1, data_sz); +- result_addr = ((char *) MPIDI_CH4U_REQUEST(rreq, req->creq.data)) + data_sz; +- +- MPIR_cc_incr(rreq->cc_ptr, &c); +- ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->creq.creq_ptr); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) +- mpi_errno = +- MPIDI_SHM_am_isend_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->creq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_CSWAP_ACK, &ack_msg, +- sizeof(ack_msg), result_addr, 1, +- MPIDI_CH4U_REQUEST(rreq, req->creq.datatype), rreq); +- else +-#endif +- { +- mpi_errno = +- MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->creq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_CSWAP_ACK, &ack_msg, +- sizeof(ack_msg), result_addr, 1, +- MPIDI_CH4U_REQUEST(rreq, req->creq.datatype), rreq); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACK_CSWAP); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ack_acc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_ack_acc(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_acc_ack_msg_t ack_msg; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACK_ACC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACK_ACC); +- +- ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->areq.req_ptr); +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) +- mpi_errno = +- MPIDI_SHM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_ACC_ACK, +- &ack_msg, sizeof(ack_msg)); +- else +-#endif +- { +- mpi_errno = +- MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_ACC_ACK, +- &ack_msg, sizeof(ack_msg)); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACK_ACC); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_ack_get_acc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_ack_get_acc(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS, c; +- MPIDI_CH4U_acc_ack_msg_t ack_msg; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACK_GET_ACC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACK_GET_ACC); +- +- MPIR_cc_incr(rreq->cc_ptr, &c); +- ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->areq.req_ptr); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) +- mpi_errno = +- MPIDI_SHM_am_isend_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_GET_ACC_ACK, +- &ack_msg, sizeof(ack_msg), +- MPIDI_CH4U_REQUEST(rreq, req->areq.data), +- MPIDI_CH4U_REQUEST(rreq, req->areq.data_sz), MPI_BYTE, rreq); +- else +-#endif +- { +- mpi_errno = +- MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_GET_ACC_ACK, +- &ack_msg, sizeof(ack_msg), +- MPIDI_CH4U_REQUEST(rreq, req->areq.data), +- MPIDI_CH4U_REQUEST(rreq, req->areq.data_sz), MPI_BYTE, rreq); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACK_GET_ACC); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_lock_advance +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_win_lock_advance(MPIR_Win * win) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_win_lock_recvd_t *lock_recvd_q = &MPIDI_CH4U_WIN(win, sync).lock_recvd; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_WIN_LOCK_ADVANCE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_WIN_LOCK_ADVANCE); +- +- if ((lock_recvd_q->head != NULL) && ((lock_recvd_q->count == 0) || +- ((lock_recvd_q->type == MPI_LOCK_SHARED) && +- (lock_recvd_q->head->type == MPI_LOCK_SHARED)))) { +- struct MPIDI_CH4U_win_lock *lock = lock_recvd_q->head; +- lock_recvd_q->head = lock->next; +- +- if (lock_recvd_q->head == NULL) +- lock_recvd_q->tail = NULL; +- +- ++lock_recvd_q->count; +- lock_recvd_q->type = lock->type; +- +- MPIDI_CH4U_win_cntrl_msg_t msg; +- int handler_id; +- msg.win_id = MPIDI_CH4U_WIN(win, win_id); +- msg.origin_rank = win->comm_ptr->rank; +- +- if (lock->mtype == MPIDI_CH4U_WIN_LOCK) +- handler_id = MPIDI_CH4U_WIN_LOCK_ACK; +- else if (lock->mtype == MPIDI_CH4U_WIN_LOCKALL) +- handler_id = MPIDI_CH4U_WIN_LOCKALL_ACK; +- else +- MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**rmasync"); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(lock->rank, win->comm_ptr)) +- mpi_errno = MPIDI_SHM_am_send_hdr_reply(MPIDI_CH4U_win_to_context(win), +- lock->rank, handler_id, &msg, sizeof(msg)); +- else +-#endif +- { +- mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context(win), +- lock->rank, handler_id, &msg, sizeof(msg)); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPL_free(lock); +- +- mpi_errno = MPIDI_win_lock_advance(win); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_WIN_LOCK_ADVANCE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_lock_req_proc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_lock_req_proc(int handler_id, +- const MPIDI_CH4U_win_cntrl_msg_t * info, MPIR_Win * win) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_WIN_LOCK_REQ_PROC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_WIN_LOCK_REQ_PROC); +- +- MPIR_T_PVAR_TIMER_START(RMA, rma_winlock_getlocallock); +- struct MPIDI_CH4U_win_lock *lock = (struct MPIDI_CH4U_win_lock *) +- MPL_calloc(1, sizeof(struct MPIDI_CH4U_win_lock), MPL_MEM_RMA); +- +- lock->mtype = handler_id; +- lock->rank = info->origin_rank; +- lock->type = info->lock_type; +- MPIDI_CH4U_win_lock_recvd_t *lock_recvd_q = &MPIDI_CH4U_WIN(win, sync).lock_recvd; +- MPIR_Assert((lock_recvd_q->head != NULL) ^ (lock_recvd_q->tail == NULL)); +- +- if (lock_recvd_q->tail == NULL) +- lock_recvd_q->head = lock; +- else +- lock_recvd_q->tail->next = lock; +- +- lock_recvd_q->tail = lock; +- +- MPIDI_win_lock_advance(win); +- MPIR_T_PVAR_TIMER_END(RMA, rma_winlock_getlocallock); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_WIN_LOCK_REQ_PROC); +- return; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_lock_ack_proc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_lock_ack_proc(int handler_id, +- const MPIDI_CH4U_win_cntrl_msg_t * info, MPIR_Win * win) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_WIN_LOCK_ACK_PROC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_WIN_LOCK_ACK_PROC); +- +- if (handler_id == MPIDI_CH4U_WIN_LOCK_ACK) { +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, info->origin_rank); +- MPIR_Assert(target_ptr); +- +- MPIR_Assert((int) target_ptr->sync.lock.locked == 0); +- target_ptr->sync.lock.locked = 1; +- } else if (handler_id == MPIDI_CH4U_WIN_LOCKALL_ACK) { +- MPIDI_CH4U_WIN(win, sync).lockall.allLocked += 1; +- } else { +- MPIR_Assert(0); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_WIN_LOCK_ACK_PROC); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_win_unlock_ack_proc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_unlock_proc(const MPIDI_CH4U_win_cntrl_msg_t * info, MPIR_Win * win) +-{ +- +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_WIN_UNLOCK_PROC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_WIN_UNLOCK_PROC); +- +- /* NOTE: origin blocking waits in lock or lockall call till lock granted. */ +- --MPIDI_CH4U_WIN(win, sync).lock_recvd.count; +- MPIR_Assert((int) MPIDI_CH4U_WIN(win, sync).lock_recvd.count >= 0); +- MPIDI_win_lock_advance(win); +- +- MPIDI_CH4U_win_cntrl_msg_t msg; +- msg.win_id = MPIDI_CH4U_WIN(win, win_id); +- msg.origin_rank = win->comm_ptr->rank; +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(info->origin_rank, win->comm_ptr)) +- mpi_errno = MPIDI_SHM_am_send_hdr_reply(MPIDI_CH4U_win_to_context(win), +- info->origin_rank, +- MPIDI_CH4U_WIN_UNLOCK_ACK, &msg, sizeof(msg)); +- else +-#endif +- { +- mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context(win), +- info->origin_rank, +- MPIDI_CH4U_WIN_UNLOCK_ACK, &msg, sizeof(msg)); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_WIN_UNLOCK_PROC); +- return; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_complete_proc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_complete_proc(const MPIDI_CH4U_win_cntrl_msg_t * info, MPIR_Win * win) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_WIN_COMPLETE_PROC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_WIN_COMPLETE_PROC); +- +- ++MPIDI_CH4U_WIN(win, sync).sc.count; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_WIN_COMPLETE_PROC); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_post_proc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_post_proc(const MPIDI_CH4U_win_cntrl_msg_t * info, MPIR_Win * win) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_WIN_POST_PROC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_WIN_POST_PROC); +- +- ++MPIDI_CH4U_WIN(win, sync).pw.count; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_WIN_POST_PROC); +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_unlock_done +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_win_unlock_done(const MPIDI_CH4U_win_cntrl_msg_t * info, MPIR_Win * win) +-{ +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_WIN_UNLOCK_DONE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_WIN_UNLOCK_DONE); +- +- if (MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_LOCK) { +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, info->origin_rank); +- MPIR_Assert(target_ptr); +- +- MPIR_Assert((int) target_ptr->sync.lock.locked == 1); +- target_ptr->sync.lock.locked = 0; +- } else if (MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_LOCK_ALL) { +- MPIR_Assert((int) MPIDI_CH4U_WIN(win, sync).lockall.allLocked > 0); +- MPIDI_CH4U_WIN(win, sync).lockall.allLocked -= 1; +- } else { +- MPIR_Assert(0); +- } +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_WIN_UNLOCK_DONE); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_handle_acc_cmpl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_handle_acc_cmpl(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- MPI_Aint basic_sz, count; +- struct iovec *iov; +- char *src_ptr; +- size_t data_sz; +- int shm_locked ATTRIBUTE((unused)) = 0; +- MPIR_Win *win ATTRIBUTE((unused)) = MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_HANDLE_ACC_CMPL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_HANDLE_ACC_CMPL); +- +- MPIR_Datatype_get_size_macro(MPIDI_CH4U_REQUEST(rreq, req->areq.target_datatype), basic_sz); +- MPIR_ERR_CHKANDJUMP(basic_sz == 0, mpi_errno, MPI_ERR_OTHER, "**dtype"); +- data_sz = MPIDI_CH4U_REQUEST(rreq, req->areq.data_sz); +- +- /* MPIDI_CS_ENTER(); */ +- +- if (MPIDI_CH4U_REQUEST(rreq, req->areq.op) == MPI_NO_OP) { +- MPIDI_CH4U_REQUEST(rreq, req->areq.origin_count) = +- MPIDI_CH4U_REQUEST(rreq, req->areq.target_count); +- MPIDI_CH4U_REQUEST(rreq, req->areq.data_sz) = data_sz; +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4U_WIN(win, shm_allocated)) { +- mpi_errno = MPIDI_SHM_rma_op_cs_enter_hook(win); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- shm_locked = 1; +- } +-#endif +- +- if (MPIDI_CH4U_REQUEST(rreq, req->areq.dt_iov) == NULL) { +- mpi_errno = MPIDI_CH4U_compute_acc_op(MPIDI_CH4U_REQUEST(rreq, req->areq.data), +- MPIDI_CH4U_REQUEST(rreq, req->areq.origin_count), +- MPIDI_CH4U_REQUEST(rreq, req->areq.origin_datatype), +- MPIDI_CH4U_REQUEST(rreq, req->areq.target_addr), +- MPIDI_CH4U_REQUEST(rreq, req->areq.target_count), +- MPIDI_CH4U_REQUEST(rreq, req->areq.target_datatype), +- MPIDI_CH4U_REQUEST(rreq, req->areq.op)); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } else { +- iov = (struct iovec *) MPIDI_CH4U_REQUEST(rreq, req->areq.dt_iov); +- src_ptr = (char *) MPIDI_CH4U_REQUEST(rreq, req->areq.data); +- for (i = 0; i < MPIDI_CH4U_REQUEST(rreq, req->areq.n_iov); i++) { +- count = iov[i].iov_len / basic_sz; +- MPIR_Assert(count > 0); +- +- mpi_errno = MPIDI_CH4U_compute_acc_op(src_ptr, count, +- MPIDI_CH4U_REQUEST(rreq, +- req->areq.origin_datatype), +- iov[i].iov_base, count, +- MPIDI_CH4U_REQUEST(rreq, +- req->areq.target_datatype), +- MPIDI_CH4U_REQUEST(rreq, req->areq.op)); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- src_ptr += count * basic_sz; +- } +- MPL_free(iov); +- } +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4U_WIN(win, shm_allocated)) { +- mpi_errno = MPIDI_SHM_rma_op_cs_exit_hook(win); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- /* MPIDI_CS_EXIT(); */ +- if (MPIDI_CH4U_REQUEST(rreq, req->areq.data)) +- MPL_free(MPIDI_CH4U_REQUEST(rreq, req->areq.data)); +- +- MPIDI_CH4U_REQUEST(rreq, req->areq.data) = NULL; +- mpi_errno = MPIDI_ack_acc(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPID_Request_complete(rreq); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_HANDLE_ACC_CMPL); +- return mpi_errno; +- fn_fail: +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- /* release lock if error is reported inside CS. */ +- if (shm_locked) +- MPIDI_SHM_rma_op_cs_exit_hook(win); +-#endif +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_handle_get_acc_cmpl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_handle_get_acc_cmpl(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS, i; +- MPI_Aint basic_sz, count, offset = 0; +- struct iovec *iov; +- char *src_ptr, *original = NULL; +- size_t data_sz; +- int shm_locked ATTRIBUTE((unused)) = 0; +- MPIR_Win *win ATTRIBUTE((unused)) = MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr); +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_HANDLE_GET_ACC_CMPL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_HANDLE_GET_ACC_CMPL); +- +- MPIR_Datatype_get_size_macro(MPIDI_CH4U_REQUEST(rreq, req->areq.target_datatype), basic_sz); +- MPIR_Assert(basic_sz); +- data_sz = MPIDI_CH4U_REQUEST(rreq, req->areq.data_sz); +- +- /* MPIDI_CS_ENTER(); */ +- +- original = (char *) MPL_malloc(data_sz, MPL_MEM_RMA); +- MPIR_Assert(original); +- +- if (MPIDI_CH4U_REQUEST(rreq, req->areq.op) == MPI_NO_OP) { +- MPIDI_CH4U_REQUEST(rreq, req->areq.origin_count) = +- MPIDI_CH4U_REQUEST(rreq, req->areq.target_count); +- MPIDI_CH4U_REQUEST(rreq, req->areq.data_sz) = data_sz; +- } +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4U_WIN(win, shm_allocated)) { +- mpi_errno = MPIDI_SHM_rma_op_cs_enter_hook(win); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- shm_locked = 1; +- } +-#endif +- +- if (MPIDI_CH4U_REQUEST(rreq, req->areq.dt_iov) == NULL) { +- +- MPIR_Memcpy(original, MPIDI_CH4U_REQUEST(rreq, req->areq.target_addr), +- basic_sz * MPIDI_CH4U_REQUEST(rreq, req->areq.target_count)); +- +- mpi_errno = MPIDI_CH4U_compute_acc_op(MPIDI_CH4U_REQUEST(rreq, req->areq.data), +- MPIDI_CH4U_REQUEST(rreq, req->areq.origin_count), +- MPIDI_CH4U_REQUEST(rreq, req->areq.origin_datatype), +- MPIDI_CH4U_REQUEST(rreq, req->areq.target_addr), +- MPIDI_CH4U_REQUEST(rreq, req->areq.target_count), +- MPIDI_CH4U_REQUEST(rreq, req->areq.target_datatype), +- MPIDI_CH4U_REQUEST(rreq, req->areq.op)); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } else { +- iov = (struct iovec *) MPIDI_CH4U_REQUEST(rreq, req->areq.dt_iov); +- src_ptr = (char *) MPIDI_CH4U_REQUEST(rreq, req->areq.data); +- for (i = 0; i < MPIDI_CH4U_REQUEST(rreq, req->areq.n_iov); i++) { +- count = iov[i].iov_len / basic_sz; +- MPIR_Assert(count > 0); +- +- MPIR_Memcpy(original + offset, iov[i].iov_base, count * basic_sz); +- offset += count * basic_sz; +- +- mpi_errno = MPIDI_CH4U_compute_acc_op(src_ptr, count, +- MPIDI_CH4U_REQUEST(rreq, +- req->areq.origin_datatype), +- iov[i].iov_base, count, +- MPIDI_CH4U_REQUEST(rreq, +- req->areq.target_datatype), +- MPIDI_CH4U_REQUEST(rreq, req->areq.op)); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- src_ptr += count * basic_sz; +- } +- MPL_free(iov); +- } +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4U_WIN(win, shm_allocated)) { +- mpi_errno = MPIDI_SHM_rma_op_cs_exit_hook(win); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- /* MPIDI_CS_EXIT(); */ +- if (MPIDI_CH4U_REQUEST(rreq, req->areq.data)) +- MPL_free(MPIDI_CH4U_REQUEST(rreq, req->areq.data)); +- +- MPIDI_CH4U_REQUEST(rreq, req->areq.data) = original; +- mpi_errno = MPIDI_ack_get_acc(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPID_Request_complete(rreq); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_HANDLE_GET_ACC_CMPL); +- return mpi_errno; +- fn_fail: +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- /* release lock if error is reported inside CS. */ +- if (shm_locked) +- MPIDI_SHM_rma_op_cs_exit_hook(win); +-#endif +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_handle_acc_data +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void MPIDI_handle_acc_data(void **data, size_t * p_data_sz, int *is_contig, +- MPIR_Request * rreq) +-{ +- void *p_data = NULL; +- size_t data_sz; +- uintptr_t base; +- int i; +- struct iovec *iov; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_HANDLE_ACC_DATA); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_HANDLE_ACC_DATA); +- +- base = (uintptr_t) MPIDI_CH4U_REQUEST(rreq, req->areq.target_addr); +- MPIDI_Datatype_check_size(MPIDI_CH4U_REQUEST(rreq, req->areq.origin_datatype), +- MPIDI_CH4U_REQUEST(rreq, req->areq.origin_count), data_sz); +- if (data_sz) { +- p_data = MPL_malloc(data_sz, MPL_MEM_RMA); +- MPIR_Assert(p_data); +- } +- +- MPIDI_CH4U_REQUEST(rreq, req->areq.data) = p_data; +- +- /* Adjust the target addresses using the window base address */ +- iov = (struct iovec *) MPIDI_CH4U_REQUEST(rreq, req->areq.dt_iov); +- for (i = 0; i < MPIDI_CH4U_REQUEST(rreq, req->areq.n_iov); i++) +- iov[i].iov_base = (char *) iov[i].iov_base + base; +- +- *data = p_data; +- *is_contig = 1; +- *p_data_sz = data_sz; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_HANDLE_ACC_DATA); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_target_cmpl_cb(MPIR_Request * req) +-{ +- int mpi_errno = MPI_SUCCESS, i, c; +- size_t data_sz, offset; +- MPIDI_CH4U_get_ack_msg_t get_ack; +- struct iovec *iov; +- char *p_data; +- uintptr_t base; +- MPIR_Win *win; +- MPIR_Context_id_t context_id; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(req, MPIDI_get_target_cmpl_cb)) +- return mpi_errno; +- +- base = MPIDI_CH4U_REQUEST(req, req->greq.addr); +- +- MPIR_cc_incr(req->cc_ptr, &c); +- get_ack.greq_ptr = MPIDI_CH4U_REQUEST(req, req->greq.greq_ptr); +- win = MPIDI_CH4U_REQUEST(req, req->greq.win_ptr); +- context_id = MPIDI_CH4U_win_to_context(win); +- +- if (MPIDI_CH4U_REQUEST(req, req->greq.n_iov) == 0) { +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(MPIDI_CH4U_REQUEST(req, rank), win->comm_ptr)) +- mpi_errno = MPIDI_SHM_am_isend_reply(context_id, +- MPIDI_CH4U_REQUEST(req, rank), +- MPIDI_CH4U_GET_ACK, +- &get_ack, sizeof(get_ack), +- (void *) MPIDI_CH4U_REQUEST(req, req->greq.addr), +- MPIDI_CH4U_REQUEST(req, req->greq.count), +- MPIDI_CH4U_REQUEST(req, req->greq.datatype), req); +- else +-#endif +- { +- mpi_errno = MPIDI_NM_am_isend_reply(context_id, +- MPIDI_CH4U_REQUEST(req, rank), +- MPIDI_CH4U_GET_ACK, +- &get_ack, sizeof(get_ack), +- (void *) MPIDI_CH4U_REQUEST(req, req->greq.addr), +- MPIDI_CH4U_REQUEST(req, req->greq.count), +- MPIDI_CH4U_REQUEST(req, req->greq.datatype), req); +- } +- +- MPID_Request_complete(req); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- goto fn_exit; +- } +- +- iov = (struct iovec *) MPIDI_CH4U_REQUEST(req, req->greq.dt_iov); +- +- data_sz = 0; +- for (i = 0; i < MPIDI_CH4U_REQUEST(req, req->greq.n_iov); i++) { +- data_sz += iov[i].iov_len; +- } +- +- p_data = (char *) MPL_malloc(data_sz, MPL_MEM_RMA); +- MPIR_Assert(p_data); +- +- offset = 0; +- for (i = 0; i < MPIDI_CH4U_REQUEST(req, req->greq.n_iov); i++) { +- /* Adjust a window base address */ +- iov[i].iov_base = (char *) iov[i].iov_base + base; +- MPIR_Memcpy(p_data + offset, iov[i].iov_base, iov[i].iov_len); +- offset += iov[i].iov_len; +- } +- +- MPL_free(MPIDI_CH4U_REQUEST(req, req->greq.dt_iov)); +- MPIDI_CH4U_REQUEST(req, req->greq.dt_iov) = (void *) p_data; +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(MPIDI_CH4U_REQUEST(req, rank), win->comm_ptr)) +- mpi_errno = MPIDI_SHM_am_isend_reply(context_id, MPIDI_CH4U_REQUEST(req, rank), +- MPIDI_CH4U_GET_ACK, &get_ack, sizeof(get_ack), p_data, +- data_sz, MPI_BYTE, req); +- else +-#endif +- { +- mpi_errno = MPIDI_NM_am_isend_reply(context_id, MPIDI_CH4U_REQUEST(req, rank), +- MPIDI_CH4U_GET_ACK, &get_ack, sizeof(get_ack), p_data, +- data_sz, MPI_BYTE, req); +- } +- +- MPID_Request_complete(req); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIDI_progress_cmpl_list(); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(rreq, MPIDI_put_target_cmpl_cb)) +- return mpi_errno; +- +- if (MPIDI_CH4U_REQUEST(rreq, req->status) & MPIDI_CH4U_REQ_RCV_NON_CONTIG) { +- MPL_free(MPIDI_CH4U_REQUEST(rreq, req->iov)); +- } +- +- if (MPIDI_CH4U_REQUEST(rreq, req->preq.dt_iov)) { +- MPL_free(MPIDI_CH4U_REQUEST(rreq, req->preq.dt_iov)); +- } +- +- mpi_errno = MPIDI_ack_put(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPID_Request_complete(rreq); +- MPIDI_progress_cmpl_list(); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_iov_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_iov_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_put_iov_ack_msg_t ack_msg; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_IOV_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_IOV_TARGET_CMPL_CB); +- +- ack_msg.src_rank = MPIDI_CH4U_REQUEST(rreq, rank); +- ack_msg.origin_preq_ptr = (uint64_t) MPIDI_CH4U_REQUEST(rreq, req->preq.preq_ptr); +- ack_msg.target_preq_ptr = (uint64_t) rreq; +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) +- mpi_errno = +- MPIDI_SHM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_PUT_IOV_ACK, +- &ack_msg, sizeof(ack_msg)); +- else +-#endif +- { +- mpi_errno = +- MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_PUT_IOV_ACK, +- &ack_msg, sizeof(ack_msg)); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_IOV_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_iov_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_iov_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_acc_iov_ack_msg_t ack_msg; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_IOV_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_IOV_TARGET_CMPL_CB); +- +- ack_msg.origin_preq_ptr = (uint64_t) MPIDI_CH4U_REQUEST(rreq, req->areq.req_ptr); +- ack_msg.target_preq_ptr = (uint64_t) rreq; +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) +- mpi_errno = +- MPIDI_SHM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_ACC_IOV_ACK, +- &ack_msg, sizeof(ack_msg)); +- else +-#endif +- { +- mpi_errno = +- MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_ACC_IOV_ACK, +- &ack_msg, sizeof(ack_msg)); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_IOV_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_iov_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_iov_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_get_acc_iov_ack_msg_t ack_msg; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_IOV_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_IOV_TARGET_CMPL_CB); +- +- ack_msg.origin_preq_ptr = (uint64_t) MPIDI_CH4U_REQUEST(rreq, req->areq.req_ptr); +- ack_msg.target_preq_ptr = (uint64_t) rreq; +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4I_REQUEST(rreq, is_local)) +- mpi_errno = +- MPIDI_SHM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_GET_ACC_IOV_ACK, +- &ack_msg, sizeof(ack_msg)); +- else +-#endif +- { +- mpi_errno = +- MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context +- (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)), +- MPIDI_CH4U_REQUEST(rreq, rank), MPIDI_CH4U_GET_ACC_IOV_ACK, +- &ack_msg, sizeof(ack_msg)); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_IOV_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_cswap_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_cswap_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- void *compare_addr; +- void *origin_addr; +- size_t data_sz; +- MPIR_Win *win ATTRIBUTE((unused)) = NULL; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CSWAP_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CSWAP_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(rreq, MPIDI_cswap_target_cmpl_cb)) +- return mpi_errno; +- +- MPIDI_Datatype_check_size(MPIDI_CH4U_REQUEST(rreq, req->creq.datatype), 1, data_sz); +- origin_addr = MPIDI_CH4U_REQUEST(rreq, req->creq.data); +- compare_addr = ((char *) MPIDI_CH4U_REQUEST(rreq, req->creq.data)) + data_sz; +- +- /* MPIDI_CS_ENTER(); */ +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- win = MPIDI_CH4U_REQUEST(rreq, req->creq.win_ptr); +- if (MPIDI_CH4U_WIN(win, shm_allocated)) { +- mpi_errno = MPIDI_SHM_rma_op_cs_enter_hook(win); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- +- if (MPIR_Compare_equal((void *) MPIDI_CH4U_REQUEST(rreq, req->creq.addr), compare_addr, +- MPIDI_CH4U_REQUEST(rreq, req->creq.datatype))) { +- MPIR_Memcpy(compare_addr, (void *) MPIDI_CH4U_REQUEST(rreq, req->creq.addr), data_sz); +- MPIR_Memcpy((void *) MPIDI_CH4U_REQUEST(rreq, req->creq.addr), origin_addr, data_sz); +- } else { +- MPIR_Memcpy(compare_addr, (void *) MPIDI_CH4U_REQUEST(rreq, req->creq.addr), data_sz); +- } +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4U_WIN(win, shm_allocated)) { +- mpi_errno = MPIDI_SHM_rma_op_cs_exit_hook(win); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +-#endif +- /* MPIDI_CS_EXIT(); */ +- +- mpi_errno = MPIDI_ack_cswap(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPID_Request_complete(rreq); +- MPIDI_progress_cmpl_list(); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CSWAP_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(rreq, MPIDI_acc_target_cmpl_cb)) +- return mpi_errno; +- +- mpi_errno = MPIDI_handle_acc_cmpl(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIDI_progress_cmpl_list(); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(rreq, MPIDI_get_acc_target_cmpl_cb)) +- return mpi_errno; +- +- mpi_errno = MPIDI_handle_get_acc_cmpl(rreq); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIDI_progress_cmpl_list(); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_TARGET_CMPL_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_ack_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_ack_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *greq; +- MPIR_Win *win; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACK_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACK_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(rreq, MPIDI_get_ack_target_cmpl_cb)) +- return mpi_errno; +- +- greq = (MPIR_Request *) MPIDI_CH4U_REQUEST(rreq, req->greq.greq_ptr); +- if (MPIDI_CH4U_REQUEST(greq, req->status) & MPIDI_CH4U_REQ_RCV_NON_CONTIG) { +- MPL_free(MPIDI_CH4U_REQUEST(greq, req->iov)); +- } +- +- win = MPIDI_CH4U_REQUEST(greq, req->greq.win_ptr); +- MPIDI_win_remote_cmpl_cnt_decr(win, MPIDI_CH4U_REQUEST(greq, rank)); +- +- MPID_Request_complete(greq); +- MPID_Request_complete(rreq); +- MPIDI_progress_cmpl_list(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACK_TARGET_CMPL_CB); +- return mpi_errno; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_ack_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_ack_target_cmpl_cb(MPIR_Request * areq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Win *win; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_ACK_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_ACK_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(areq, MPIDI_get_acc_ack_target_cmpl_cb)) +- return mpi_errno; +- +- if (MPIDI_CH4U_REQUEST(areq, req->status) & MPIDI_CH4U_REQ_RCV_NON_CONTIG) { +- MPL_free(MPIDI_CH4U_REQUEST(areq, req->iov)); +- } +- +- win = MPIDI_CH4U_REQUEST(areq, req->areq.win_ptr); +- MPIDI_win_remote_cmpl_cnt_decr(win, MPIDI_CH4U_REQUEST(areq, rank)); +- MPIDI_win_remote_acc_cmpl_cnt_decr(win, MPIDI_CH4U_REQUEST(areq, rank)); +- +- MPIR_Datatype_release_if_not_builtin(MPIDI_CH4U_REQUEST(areq, req->areq.result_datatype)); +- MPID_Request_complete(areq); +- +- MPIDI_progress_cmpl_list(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_ACK_TARGET_CMPL_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_cswap_ack_target_cmpl_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_cswap_ack_target_cmpl_cb(MPIR_Request * rreq) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Win *win; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CSWAP_ACK_TARGET_CMPL_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CSWAP_ACK_TARGET_CMPL_CB); +- +- if (!MPIDI_check_cmpl_order(rreq, MPIDI_cswap_ack_target_cmpl_cb)) +- return mpi_errno; +- +- win = MPIDI_CH4U_REQUEST(rreq, req->creq.win_ptr); +- MPIDI_win_remote_cmpl_cnt_decr(win, MPIDI_CH4U_REQUEST(rreq, rank)); +- MPIDI_win_remote_acc_cmpl_cnt_decr(win, MPIDI_CH4U_REQUEST(rreq, rank)); +- +- MPL_free(MPIDI_CH4U_REQUEST(rreq, req->creq.data)); +- MPID_Request_complete(rreq); +- +- MPIDI_progress_cmpl_list(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CSWAP_ACK_TARGET_CMPL_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_put_ack_msg_t *msg_hdr = (MPIDI_CH4U_put_ack_msg_t *) am_hdr; +- MPIR_Win *win; +- MPIR_Request *preq; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_ACK_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put_ack); +- +- preq = (MPIR_Request *) msg_hdr->preq_ptr; +- win = MPIDI_CH4U_REQUEST(preq, req->preq.win_ptr); +- +- if (MPIDI_CH4U_REQUEST(preq, req->preq.dt_iov)) { +- MPL_free(MPIDI_CH4U_REQUEST(preq, req->preq.dt_iov)); +- } +- +- MPIDI_win_remote_cmpl_cnt_decr(win, MPIDI_CH4U_REQUEST(preq, rank)); +- +- MPID_Request_complete(preq); +- +- if (req) +- *req = NULL; +- if (target_cmpl_cb) +- *target_cmpl_cb = NULL; +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put_ack); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_ACK_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_acc_ack_msg_t *msg_hdr = (MPIDI_CH4U_acc_ack_msg_t *) am_hdr; +- MPIR_Win *win; +- MPIR_Request *areq; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_ACK_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc_ack); +- +- areq = (MPIR_Request *) msg_hdr->req_ptr; +- win = MPIDI_CH4U_REQUEST(areq, req->areq.win_ptr); +- +- if (MPIDI_CH4U_REQUEST(areq, req->areq.dt_iov)) { +- MPL_free(MPIDI_CH4U_REQUEST(areq, req->areq.dt_iov)); +- } +- +- MPIDI_win_remote_cmpl_cnt_decr(win, MPIDI_CH4U_REQUEST(areq, rank)); +- MPIDI_win_remote_acc_cmpl_cnt_decr(win, MPIDI_CH4U_REQUEST(areq, rank)); +- +- MPID_Request_complete(areq); +- +- if (req) +- *req = NULL; +- if (target_cmpl_cb) +- *target_cmpl_cb = NULL; +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc_ack); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_ACK_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_get_acc_ack_msg_t *msg_hdr = (MPIDI_CH4U_get_acc_ack_msg_t *) am_hdr; +- MPIR_Request *areq; +- +- size_t data_sz; +- int dt_contig, n_iov; +- MPI_Aint dt_true_lb, last, num_iov; +- MPIR_Datatype *dt_ptr; +- MPIR_Segment *segment_ptr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_ACK_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc_ack); +- +- areq = (MPIR_Request *) msg_hdr->req_ptr; +- +- if (MPIDI_CH4U_REQUEST(areq, req->areq.dt_iov)) { +- MPL_free(MPIDI_CH4U_REQUEST(areq, req->areq.dt_iov)); +- } +- +- MPIDI_Datatype_get_info(MPIDI_CH4U_REQUEST(areq, req->areq.result_count), +- MPIDI_CH4U_REQUEST(areq, req->areq.result_datatype), +- dt_contig, data_sz, dt_ptr, dt_true_lb); +- *is_contig = dt_contig; +- +- if (dt_contig) { +- *p_data_sz = data_sz; +- *data = (char *) MPIDI_CH4U_REQUEST(areq, req->areq.result_addr) + dt_true_lb; +- } else { +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Assert(segment_ptr); +- +- MPIR_Segment_init(MPIDI_CH4U_REQUEST(areq, req->areq.result_addr), +- MPIDI_CH4U_REQUEST(areq, req->areq.result_count), +- MPIDI_CH4U_REQUEST(areq, req->areq.result_datatype), segment_ptr); +- +- last = data_sz; +- MPIR_Segment_count_contig_blocks(segment_ptr, 0, &last, &num_iov); +- n_iov = (int) num_iov; +- MPIR_Assert(n_iov > 0); +- MPIDI_CH4U_REQUEST(areq, req->iov) = +- (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_RMA); +- MPIR_Assert(MPIDI_CH4U_REQUEST(areq, req->iov)); +- +- last = data_sz; +- MPIR_Segment_pack_vector(segment_ptr, 0, &last, MPIDI_CH4U_REQUEST(areq, req->iov), &n_iov); +- MPIR_Assert(last == (MPI_Aint) data_sz); +- *data = MPIDI_CH4U_REQUEST(areq, req->iov); +- *p_data_sz = n_iov; +- MPIDI_CH4U_REQUEST(areq, req->status) |= MPIDI_CH4U_REQ_RCV_NON_CONTIG; +- MPL_free(segment_ptr); +- } +- +- *req = areq; +- *target_cmpl_cb = MPIDI_get_acc_ack_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(areq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc_ack); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_ACK_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_cswap_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_cswap_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_cswap_ack_msg_t *msg_hdr = (MPIDI_CH4U_cswap_ack_msg_t *) am_hdr; +- MPIR_Request *creq; +- uint64_t data_sz; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CSWAP_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CSWAP_ACK_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_cas_ack); +- +- creq = (MPIR_Request *) msg_hdr->req_ptr; +- MPIDI_Datatype_check_size(MPIDI_CH4U_REQUEST(creq, req->creq.datatype), 1, data_sz); +- *data = MPIDI_CH4U_REQUEST(creq, req->creq.result_addr); +- *p_data_sz = data_sz; +- *is_contig = 1; +- +- *req = creq; +- *target_cmpl_cb = MPIDI_cswap_ack_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(creq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_cas_ack); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CSWAP_ACK_TARGET_MSG_CB); +- return mpi_errno; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_win_ctrl_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_win_ctrl_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_win_cntrl_msg_t *msg_hdr = (MPIDI_CH4U_win_cntrl_msg_t *) am_hdr; +- MPIR_Win *win; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_WIN_CTRL_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_WIN_CTRL_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_win_ctrl); +- +- win = (MPIR_Win *) MPIDI_CH4U_map_lookup(MPIDI_CH4_Global.win_map, msg_hdr->win_id); +- /* TODO: check output win ptr */ +- +- switch (handler_id) { +- char buff[32]; +- +- case MPIDI_CH4U_WIN_LOCK: +- case MPIDI_CH4U_WIN_LOCKALL: +- MPIDI_win_lock_req_proc(handler_id, msg_hdr, win); +- break; +- +- case MPIDI_CH4U_WIN_LOCK_ACK: +- case MPIDI_CH4U_WIN_LOCKALL_ACK: +- MPIDI_win_lock_ack_proc(handler_id, msg_hdr, win); +- break; +- +- case MPIDI_CH4U_WIN_UNLOCK: +- case MPIDI_CH4U_WIN_UNLOCKALL: +- MPIDI_win_unlock_proc(msg_hdr, win); +- break; +- +- case MPIDI_CH4U_WIN_UNLOCK_ACK: +- case MPIDI_CH4U_WIN_UNLOCKALL_ACK: +- MPIDI_win_unlock_done(msg_hdr, win); +- break; +- +- case MPIDI_CH4U_WIN_COMPLETE: +- MPIDI_win_complete_proc(msg_hdr, win); +- break; +- +- case MPIDI_CH4U_WIN_POST: +- MPIDI_win_post_proc(msg_hdr, win); +- break; +- +- default: +- MPL_snprintf(buff, sizeof(buff), "Invalid message type: %d\n", handler_id); +- MPID_Abort(NULL, MPI_ERR_INTERN, 1, buff); +- } +- +- if (req) +- *req = NULL; +- if (target_cmpl_cb) +- *target_cmpl_cb = NULL; +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_win_ctrl); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_WIN_CTRL_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- size_t data_sz; +- struct iovec *iov, *dt_iov; +- uintptr_t base; /* Base address of the window */ +- size_t offset; +- +- int dt_contig, n_iov; +- MPI_Aint dt_true_lb, last, num_iov; +- MPIR_Datatype *dt_ptr; +- MPIR_Segment *segment_ptr; +- MPIR_Win *win; +- MPIDI_CH4U_put_msg_t *msg_hdr = (MPIDI_CH4U_put_msg_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- *req = rreq; +- +- MPIDI_CH4U_REQUEST(*req, req->preq.preq_ptr) = msg_hdr->preq_ptr; +- MPIDI_CH4U_REQUEST(*req, rank) = msg_hdr->src_rank; +- +- win = (MPIR_Win *) MPIDI_CH4U_map_lookup(MPIDI_CH4_Global.win_map, msg_hdr->win_id); +- MPIR_Assert(win); +- +- base = MPIDI_CH4I_win_base_at_target(win); +- +- MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr) = win; +- +- *target_cmpl_cb = MPIDI_put_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- offset = win->disp_unit * msg_hdr->target_disp; +- if (msg_hdr->n_iov) { +- int i; +- dt_iov = (struct iovec *) MPL_malloc(sizeof(struct iovec) * msg_hdr->n_iov, MPL_MEM_RMA); +- MPIR_Assert(dt_iov); +- +- iov = (struct iovec *) ((char *) am_hdr + sizeof(*msg_hdr)); +- for (i = 0; i < msg_hdr->n_iov; i++) +- iov[i].iov_base = (char *) iov[i].iov_base + base + offset; +- MPIR_Memcpy(dt_iov, iov, sizeof(struct iovec) * msg_hdr->n_iov); +- MPIDI_CH4U_REQUEST(rreq, req->preq.dt_iov) = dt_iov; +- MPIDI_CH4U_REQUEST(rreq, req->preq.n_iov) = msg_hdr->n_iov; +- *is_contig = 0; +- *data = iov; +- *p_data_sz = msg_hdr->n_iov; +- goto fn_exit; +- } +- +- MPIDI_CH4U_REQUEST(rreq, req->preq.dt_iov) = NULL; +- MPIDI_Datatype_get_info(msg_hdr->count, msg_hdr->datatype, +- dt_contig, data_sz, dt_ptr, dt_true_lb); +- *is_contig = dt_contig; +- +- if (dt_contig) { +- *p_data_sz = data_sz; +- *data = (char *) (offset + base + dt_true_lb); +- } else { +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Assert(segment_ptr); +- +- MPIR_Segment_init((void *) (offset + base), msg_hdr->count, msg_hdr->datatype, segment_ptr); +- last = data_sz; +- MPIR_Segment_count_contig_blocks(segment_ptr, 0, &last, &num_iov); +- n_iov = (int) num_iov; +- MPIR_Assert(n_iov > 0); +- MPIDI_CH4U_REQUEST(rreq, req->iov) = +- (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_RMA); +- MPIR_Assert(MPIDI_CH4U_REQUEST(rreq, req->iov)); +- +- last = data_sz; +- MPIR_Segment_pack_vector(segment_ptr, 0, &last, MPIDI_CH4U_REQUEST(rreq, req->iov), &n_iov); +- MPIR_Assert(last == (MPI_Aint) data_sz); +- *data = MPIDI_CH4U_REQUEST(rreq, req->iov); +- *p_data_sz = n_iov; +- MPIDI_CH4U_REQUEST(rreq, req->status) |= MPIDI_CH4U_REQ_RCV_NON_CONTIG; +- MPL_free(segment_ptr); +- } +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_iov_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_iov_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- struct iovec *dt_iov; +- +- MPIR_Win *win; +- MPIDI_CH4U_put_msg_t *msg_hdr = (MPIDI_CH4U_put_msg_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_IOV_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_IOV_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put_iov); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- *req = rreq; +- +- MPIDI_CH4U_REQUEST(*req, req->preq.preq_ptr) = msg_hdr->preq_ptr; +- MPIDI_CH4U_REQUEST(*req, rank) = msg_hdr->src_rank; +- +- win = (MPIR_Win *) MPIDI_CH4U_map_lookup(MPIDI_CH4_Global.win_map, msg_hdr->win_id); +- MPIR_Assert(win); +- +- MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr) = win; +- +- *target_cmpl_cb = MPIDI_put_iov_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- /* Base adjustment for iov will be done after we get the entire iovs, +- * at MPIDI_CH4U_put_data_target_msg_cb */ +- MPIR_Assert(msg_hdr->n_iov); +- dt_iov = (struct iovec *) MPL_malloc(sizeof(struct iovec) * msg_hdr->n_iov, MPL_MEM_RMA); +- MPIR_Assert(dt_iov); +- +- MPIDI_CH4U_REQUEST(rreq, req->preq.dt_iov) = dt_iov; +- MPIDI_CH4U_REQUEST(rreq, req->preq.n_iov) = msg_hdr->n_iov; +- *is_contig = 1; +- *data = dt_iov; +- *p_data_sz = msg_hdr->n_iov * sizeof(struct iovec); +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put_iov); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_IOV_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_iov_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_iov_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq, *origin_req; +- MPIDI_CH4U_put_iov_ack_msg_t *msg_hdr = (MPIDI_CH4U_put_iov_ack_msg_t *) am_hdr; +- MPIDI_CH4U_put_dat_msg_t dat_msg; +- MPIR_Win *win; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_IOV_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_IOV_ACK_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put_iov_ack); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr; +- dat_msg.preq_ptr = msg_hdr->target_preq_ptr; +- win = MPIDI_CH4U_REQUEST(origin_req, req->preq.win_ptr); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(MPIDI_CH4U_REQUEST(origin_req, rank), win->comm_ptr)) +- mpi_errno = MPIDI_SHM_am_isend_reply(MPIDI_CH4U_win_to_context(win), +- MPIDI_CH4U_REQUEST(origin_req, rank), +- MPIDI_CH4U_PUT_DAT_REQ, +- &dat_msg, sizeof(dat_msg), +- MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_addr), +- MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_count), +- MPIDI_CH4U_REQUEST(origin_req, +- req->preq.origin_datatype), rreq); +- else +-#endif +- { +- mpi_errno = MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context(win), +- MPIDI_CH4U_REQUEST(origin_req, rank), +- MPIDI_CH4U_PUT_DAT_REQ, +- &dat_msg, sizeof(dat_msg), +- MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_addr), +- MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_count), +- MPIDI_CH4U_REQUEST(origin_req, +- req->preq.origin_datatype), rreq); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_Datatype_release_if_not_builtin(MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_datatype)); +- +- *target_cmpl_cb = NULL; +- *req = NULL; +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put_iov_ack); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_IOV_ACK_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_iov_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_iov_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq, *origin_req; +- MPIDI_CH4U_acc_iov_ack_msg_t *msg_hdr = (MPIDI_CH4U_acc_iov_ack_msg_t *) am_hdr; +- MPIDI_CH4U_acc_dat_msg_t dat_msg; +- MPIR_Win *win; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_IOV_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_IOV_ACK_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc_iov_ack); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr; +- dat_msg.preq_ptr = msg_hdr->target_preq_ptr; +- win = MPIDI_CH4U_REQUEST(origin_req, req->areq.win_ptr); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(MPIDI_CH4U_REQUEST(origin_req, rank), win->comm_ptr)) +- mpi_errno = MPIDI_SHM_am_isend_reply(MPIDI_CH4U_win_to_context(win), +- MPIDI_CH4U_REQUEST(origin_req, rank), +- MPIDI_CH4U_ACC_DAT_REQ, +- &dat_msg, sizeof(dat_msg), +- MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_addr), +- MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_count), +- MPIDI_CH4U_REQUEST(origin_req, +- req->areq.origin_datatype), rreq); +- else +-#endif +- { +- mpi_errno = MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context(win), +- MPIDI_CH4U_REQUEST(origin_req, rank), +- MPIDI_CH4U_ACC_DAT_REQ, +- &dat_msg, sizeof(dat_msg), +- MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_addr), +- MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_count), +- MPIDI_CH4U_REQUEST(origin_req, +- req->areq.origin_datatype), rreq); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_Datatype_release_if_not_builtin(MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_datatype)); +- +- *target_cmpl_cb = NULL; +- *req = NULL; +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc_iov_ack); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_IOV_ACK_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_iov_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_iov_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * +- target_cmpl_cb, MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq, *origin_req; +- MPIDI_CH4U_get_acc_iov_ack_msg_t *msg_hdr = (MPIDI_CH4U_get_acc_iov_ack_msg_t *) am_hdr; +- MPIDI_CH4U_get_acc_dat_msg_t dat_msg; +- MPIR_Win *win; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_IOV_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_IOV_ACK_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc_iov_ack); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr; +- dat_msg.preq_ptr = msg_hdr->target_preq_ptr; +- win = MPIDI_CH4U_REQUEST(origin_req, req->areq.win_ptr); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(MPIDI_CH4U_REQUEST(origin_req, rank), win->comm_ptr)) +- mpi_errno = MPIDI_SHM_am_isend_reply(MPIDI_CH4U_win_to_context(win), +- MPIDI_CH4U_REQUEST(origin_req, rank), +- MPIDI_CH4U_GET_ACC_DAT_REQ, +- &dat_msg, sizeof(dat_msg), +- MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_addr), +- MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_count), +- MPIDI_CH4U_REQUEST(origin_req, +- req->areq.origin_datatype), rreq); +- else +-#endif +- { +- mpi_errno = MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context(win), +- MPIDI_CH4U_REQUEST(origin_req, rank), +- MPIDI_CH4U_GET_ACC_DAT_REQ, +- &dat_msg, sizeof(dat_msg), +- MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_addr), +- MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_count), +- MPIDI_CH4U_REQUEST(origin_req, +- req->areq.origin_datatype), rreq); +- } +- +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_Datatype_release_if_not_builtin(MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_datatype)); +- +- *target_cmpl_cb = NULL; +- *req = NULL; +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc_iov_ack); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_IOV_ACK_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_put_data_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_put_data_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq; +- MPIDI_CH4U_put_dat_msg_t *msg_hdr = (MPIDI_CH4U_put_dat_msg_t *) am_hdr; +- MPIR_Win *win; +- struct iovec *iov; +- uintptr_t base; +- int i; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PUT_DATA_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_PUT_DATA_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_put_data); +- +- rreq = (MPIR_Request *) msg_hdr->preq_ptr; +- win = MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr); +- base = MPIDI_CH4I_win_base_at_target(win); +- +- /* Adjust the target addresses using the window base address */ +- iov = (struct iovec *) MPIDI_CH4U_REQUEST(rreq, req->preq.dt_iov); +- for (i = 0; i < MPIDI_CH4U_REQUEST(rreq, req->preq.n_iov); i++) +- iov[i].iov_base = (char *) iov[i].iov_base + base; +- +- *data = MPIDI_CH4U_REQUEST(rreq, req->preq.dt_iov); +- *is_contig = 0; +- *p_data_sz = MPIDI_CH4U_REQUEST(rreq, req->preq.n_iov); +- *req = rreq; +- *target_cmpl_cb = MPIDI_put_target_cmpl_cb; +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_put_data); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_PUT_DATA_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_data_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_data_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq; +- MPIDI_CH4U_acc_dat_msg_t *msg_hdr = (MPIDI_CH4U_acc_dat_msg_t *) am_hdr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_DATA_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_DATA_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc_data); +- +- rreq = (MPIR_Request *) msg_hdr->preq_ptr; +- MPIDI_handle_acc_data(data, p_data_sz, is_contig, rreq); +- +- *req = rreq; +- *target_cmpl_cb = MPIDI_acc_target_cmpl_cb; +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc_data); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_DATA_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_data_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_data_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq; +- MPIDI_CH4U_get_acc_dat_msg_t *msg_hdr = (MPIDI_CH4U_get_acc_dat_msg_t *) am_hdr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_DATA_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_DATA_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc_data); +- +- rreq = (MPIR_Request *) msg_hdr->preq_ptr; +- MPIDI_handle_acc_data(data, p_data_sz, is_contig, rreq); +- +- *req = rreq; +- *target_cmpl_cb = MPIDI_get_acc_target_cmpl_cb; +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc_data); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_DATA_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_cswap_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_cswap_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- size_t data_sz; +- MPIR_Win *win; +- uintptr_t base; +- size_t offset; +- +- int dt_contig; +- void *p_data; +- +- MPIDI_CH4U_cswap_req_msg_t *msg_hdr = (MPIDI_CH4U_cswap_req_msg_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CSWAP_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CSWAP_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_cas); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- *req = rreq; +- +- *target_cmpl_cb = MPIDI_cswap_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- MPIDI_Datatype_check_contig_size(msg_hdr->datatype, 1, dt_contig, data_sz); +- *is_contig = dt_contig; +- +- win = (MPIR_Win *) MPIDI_CH4U_map_lookup(MPIDI_CH4_Global.win_map, msg_hdr->win_id); +- MPIR_Assert(win); +- +- base = MPIDI_CH4I_win_base_at_target(win); +- offset = win->disp_unit * msg_hdr->target_disp; +- +- MPIDI_CH4U_REQUEST(*req, req->creq.win_ptr) = win; +- MPIDI_CH4U_REQUEST(*req, req->creq.creq_ptr) = msg_hdr->req_ptr; +- MPIDI_CH4U_REQUEST(*req, req->creq.datatype) = msg_hdr->datatype; +- MPIDI_CH4U_REQUEST(*req, req->creq.addr) = offset + base; +- MPIDI_CH4U_REQUEST(*req, rank) = msg_hdr->src_rank; +- +- MPIR_Assert(dt_contig == 1); +- p_data = MPL_malloc(data_sz * 2, MPL_MEM_RMA); +- MPIR_Assert(p_data); +- +- *p_data_sz = data_sz * 2; +- *data = p_data; +- MPIDI_CH4U_REQUEST(*req, req->creq.data) = p_data; +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_cas); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CSWAP_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- size_t data_sz; +- void *p_data = NULL; +- struct iovec *iov, *dt_iov; +- MPIR_Win *win; +- uintptr_t base; +- size_t offset; +- int i; +- +- MPIDI_CH4U_acc_req_msg_t *msg_hdr = (MPIDI_CH4U_acc_req_msg_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- *req = rreq; +- +- MPIDI_Datatype_check_size(msg_hdr->origin_datatype, msg_hdr->origin_count, data_sz); +- if (data_sz) { +- p_data = MPL_malloc(data_sz, MPL_MEM_RMA); +- MPIR_Assert(p_data); +- } +- +- *target_cmpl_cb = MPIDI_acc_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- if (is_contig) { +- *is_contig = 1; +- *p_data_sz = data_sz; +- *data = p_data; +- } +- +- win = (MPIR_Win *) MPIDI_CH4U_map_lookup(MPIDI_CH4_Global.win_map, msg_hdr->win_id); +- MPIR_Assert(win); +- +- base = MPIDI_CH4I_win_base_at_target(win); +- offset = win->disp_unit * msg_hdr->target_disp; +- +- MPIDI_CH4U_REQUEST(*req, req->areq.win_ptr) = win; +- MPIDI_CH4U_REQUEST(*req, req->areq.req_ptr) = msg_hdr->req_ptr; +- MPIDI_CH4U_REQUEST(*req, req->areq.origin_datatype) = msg_hdr->origin_datatype; +- MPIDI_CH4U_REQUEST(*req, req->areq.target_datatype) = msg_hdr->target_datatype; +- MPIDI_CH4U_REQUEST(*req, req->areq.origin_count) = msg_hdr->origin_count; +- MPIDI_CH4U_REQUEST(*req, req->areq.target_count) = msg_hdr->target_count; +- MPIDI_CH4U_REQUEST(*req, req->areq.target_addr) = (void *) (offset + base); +- MPIDI_CH4U_REQUEST(*req, req->areq.op) = msg_hdr->op; +- MPIDI_CH4U_REQUEST(*req, req->areq.data) = p_data; +- MPIDI_CH4U_REQUEST(*req, req->areq.n_iov) = msg_hdr->n_iov; +- MPIDI_CH4U_REQUEST(*req, req->areq.data_sz) = msg_hdr->result_data_sz; +- MPIDI_CH4U_REQUEST(*req, rank) = msg_hdr->src_rank; +- +- if (!msg_hdr->n_iov) { +- MPIDI_CH4U_REQUEST(rreq, req->areq.dt_iov) = NULL; +- goto fn_exit; +- } +- +- dt_iov = (struct iovec *) MPL_malloc(sizeof(struct iovec) * msg_hdr->n_iov, MPL_MEM_RMA); +- MPIR_Assert(dt_iov); +- +- iov = (struct iovec *) ((char *) msg_hdr + sizeof(*msg_hdr)); +- for (i = 0; i < msg_hdr->n_iov; i++) { +- dt_iov[i].iov_base = (char *) iov[i].iov_base + base + offset; +- dt_iov[i].iov_len = iov[i].iov_len; +- } +- MPIDI_CH4U_REQUEST(rreq, req->areq.dt_iov) = dt_iov; +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_acc_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc); +- +- /* the same handling processing as ACC except the completion handler function. */ +- mpi_errno = +- MPIDI_acc_target_msg_cb(handler_id, am_hdr, data, p_data_sz, is_contig, target_cmpl_cb, +- req); +- +- *target_cmpl_cb = MPIDI_get_acc_target_cmpl_cb; +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_iov_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_acc_iov_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- struct iovec *dt_iov; +- MPIR_Win *win; +- uintptr_t base; +- size_t offset; +- +- MPIDI_CH4U_acc_req_msg_t *msg_hdr = (MPIDI_CH4U_acc_req_msg_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_ACC_IOV_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_ACC_IOV_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_acc_iov); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- *req = rreq; +- +- win = (MPIR_Win *) MPIDI_CH4U_map_lookup(MPIDI_CH4_Global.win_map, msg_hdr->win_id); +- MPIR_Assert(win); +- +- base = MPIDI_CH4I_win_base_at_target(win); +- offset = win->disp_unit * msg_hdr->target_disp; +- +- MPIDI_CH4U_REQUEST(*req, req->areq.win_ptr) = win; +- MPIDI_CH4U_REQUEST(*req, req->areq.req_ptr) = msg_hdr->req_ptr; +- MPIDI_CH4U_REQUEST(*req, req->areq.origin_datatype) = msg_hdr->origin_datatype; +- MPIDI_CH4U_REQUEST(*req, req->areq.target_datatype) = msg_hdr->target_datatype; +- MPIDI_CH4U_REQUEST(*req, req->areq.origin_count) = msg_hdr->origin_count; +- MPIDI_CH4U_REQUEST(*req, req->areq.target_count) = msg_hdr->target_count; +- MPIDI_CH4U_REQUEST(*req, req->areq.target_addr) = (void *) (offset + base); +- MPIDI_CH4U_REQUEST(*req, req->areq.op) = msg_hdr->op; +- MPIDI_CH4U_REQUEST(*req, req->areq.n_iov) = msg_hdr->n_iov; +- MPIDI_CH4U_REQUEST(*req, req->areq.data_sz) = msg_hdr->result_data_sz; +- MPIDI_CH4U_REQUEST(*req, rank) = msg_hdr->src_rank; +- +- dt_iov = (struct iovec *) MPL_malloc(sizeof(struct iovec) * msg_hdr->n_iov, MPL_MEM_RMA); +- MPIDI_CH4U_REQUEST(rreq, req->areq.dt_iov) = dt_iov; +- MPIR_Assert(dt_iov); +- +- /* Base adjustment for iov will be done after we get the entire iovs, +- * at MPIDI_CH4U_acc_data_target_msg_cb */ +- *is_contig = 1; +- *p_data_sz = sizeof(struct iovec) * msg_hdr->n_iov; +- *data = (void *) dt_iov; +- +- *target_cmpl_cb = MPIDI_acc_iov_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_acc_iov); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_ACC_IOV_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_acc_iov_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_acc_iov_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACC_IOV_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACC_IOV_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_acc_iov); +- +- /* the same handling processing as ACC except the completion handler function. */ +- mpi_errno = MPIDI_acc_iov_target_msg_cb(handler_id, am_hdr, data, +- p_data_sz, is_contig, target_cmpl_cb, req); +- +- *target_cmpl_cb = MPIDI_get_acc_iov_target_cmpl_cb; +- +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_acc_iov); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACC_IOV_TARGET_MSG_CB); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL; +- MPIDI_CH4U_get_req_msg_t *msg_hdr = (MPIDI_CH4U_get_req_msg_t *) am_hdr; +- struct iovec *iov; +- MPIR_Win *win; +- uintptr_t base; +- size_t offset; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get); +- +- rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(rreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- +- *req = rreq; +- *target_cmpl_cb = MPIDI_get_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- win = (MPIR_Win *) MPIDI_CH4U_map_lookup(MPIDI_CH4_Global.win_map, msg_hdr->win_id); +- MPIR_Assert(win); +- +- base = MPIDI_CH4I_win_base_at_target(win); +- +- offset = win->disp_unit * msg_hdr->target_disp; +- MPIDI_CH4U_REQUEST(rreq, req->greq.win_ptr) = win; +- MPIDI_CH4U_REQUEST(rreq, req->greq.n_iov) = msg_hdr->n_iov; +- MPIDI_CH4U_REQUEST(rreq, req->greq.addr) = offset + base; +- MPIDI_CH4U_REQUEST(rreq, req->greq.count) = msg_hdr->count; +- MPIDI_CH4U_REQUEST(rreq, req->greq.datatype) = msg_hdr->datatype; +- MPIDI_CH4U_REQUEST(rreq, req->greq.dt_iov) = NULL; +- MPIDI_CH4U_REQUEST(rreq, req->greq.greq_ptr) = msg_hdr->greq_ptr; +- MPIDI_CH4U_REQUEST(rreq, rank) = msg_hdr->src_rank; +- +- if (msg_hdr->n_iov) { +- iov = (struct iovec *) MPL_malloc(msg_hdr->n_iov * sizeof(*iov), MPL_MEM_RMA); +- MPIR_Assert(iov); +- +- *data = (void *) iov; +- *is_contig = 1; +- *p_data_sz = msg_hdr->n_iov * sizeof(*iov); +- MPIDI_CH4U_REQUEST(rreq, req->greq.dt_iov) = iov; +- } +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_get_ack_target_msg_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_get_ack_target_msg_cb(int handler_id, void *am_hdr, +- void **data, +- size_t * p_data_sz, +- int *is_contig, +- MPIDIG_am_target_cmpl_cb * target_cmpl_cb, +- MPIR_Request ** req) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Request *rreq = NULL, *greq; +- size_t data_sz; +- +- int dt_contig, n_iov; +- MPI_Aint dt_true_lb, last, num_iov; +- MPIR_Datatype *dt_ptr; +- MPIR_Segment *segment_ptr; +- +- MPIDI_CH4U_get_ack_msg_t *msg_hdr = (MPIDI_CH4U_get_ack_msg_t *) am_hdr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_GET_ACK_TARGET_MSG_CB); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_GET_ACK_TARGET_MSG_CB); +- MPIR_T_PVAR_TIMER_START(RMA, rma_targetcb_get_ack); +- +- greq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RMA, 1); +- MPIR_ERR_CHKANDSTMT(greq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); +- *req = greq; +- +- rreq = (MPIR_Request *) msg_hdr->greq_ptr; +- MPIR_Assert(rreq->kind == MPIR_REQUEST_KIND__RMA); +- MPIDI_CH4U_REQUEST(greq, req->greq.greq_ptr) = (uint64_t) rreq; +- +- if (MPIDI_CH4U_REQUEST(rreq, req->greq.dt_iov)) { +- MPL_free(MPIDI_CH4U_REQUEST(rreq, req->greq.dt_iov)); +- } +- +- *target_cmpl_cb = MPIDI_get_ack_target_cmpl_cb; +- MPIDI_CH4U_REQUEST(greq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1); +- +- MPIDI_Datatype_get_info(MPIDI_CH4U_REQUEST(rreq, req->greq.count), +- MPIDI_CH4U_REQUEST(rreq, req->greq.datatype), +- dt_contig, data_sz, dt_ptr, dt_true_lb); +- +- *is_contig = dt_contig; +- +- if (dt_contig) { +- *p_data_sz = data_sz; +- *data = (char *) (MPIDI_CH4U_REQUEST(rreq, req->greq.addr) + dt_true_lb); +- } else { +- segment_ptr = MPIR_Segment_alloc(); +- MPIR_Assert(segment_ptr); +- +- MPIR_Segment_init((void *) MPIDI_CH4U_REQUEST(rreq, req->greq.addr), +- MPIDI_CH4U_REQUEST(rreq, req->greq.count), +- MPIDI_CH4U_REQUEST(rreq, req->greq.datatype), segment_ptr); +- last = data_sz; +- MPIR_Segment_count_contig_blocks(segment_ptr, 0, &last, &num_iov); +- n_iov = (int) num_iov; +- MPIR_Assert(n_iov > 0); +- MPIDI_CH4U_REQUEST(rreq, req->iov) = +- (struct iovec *) MPL_malloc(n_iov * sizeof(struct iovec), MPL_MEM_RMA); +- MPIR_Assert(MPIDI_CH4U_REQUEST(rreq, req->iov)); +- +- last = data_sz; +- MPIR_Segment_pack_vector(segment_ptr, 0, &last, MPIDI_CH4U_REQUEST(rreq, req->iov), &n_iov); +- MPIR_Assert(last == (MPI_Aint) data_sz); +- *data = MPIDI_CH4U_REQUEST(rreq, req->iov); +- *p_data_sz = n_iov; +- MPIDI_CH4U_REQUEST(rreq, req->status) |= MPIDI_CH4U_REQ_RCV_NON_CONTIG; +- MPL_free(segment_ptr); +- } +- +- fn_exit: +- MPIR_T_PVAR_TIMER_END(RMA, rma_targetcb_get_ack); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_GET_ACK_TARGET_MSG_CB); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} ++int MPIDIG_RMA_Init_targetcb_pvars(void); ++int MPIDIG_put_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_acc_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_get_acc_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req); ++int MPIDIG_cswap_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_win_ctrl_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_put_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_put_iov_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_put_iov_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req); ++int MPIDIG_acc_iov_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req); ++int MPIDIG_get_acc_iov_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, ++ size_t * p_data_sz, int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req); ++int MPIDIG_put_data_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_acc_data_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_get_acc_data_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req); ++int MPIDIG_cswap_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_acc_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_get_acc_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_acc_iov_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_get_acc_iov_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, ++ MPIR_Request ** req); ++int MPIDIG_get_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); ++int MPIDIG_get_ack_target_msg_cb(int handler_id, void *am_hdr, void **data, size_t * p_data_sz, ++ int is_local, int *is_contig, ++ MPIDIG_am_target_cmpl_cb * target_cmpl_cb, MPIR_Request ** req); + + #endif /* CH4R_RMA_TARGET_CALLBACKS_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_symheap.c +@@ -0,0 +1,479 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#ifdef HAVE_SYS_TIME_H ++#include ++#endif /* HAVE_SYS_TIME_H */ ++ ++#include "mpidimpl.h" ++#include "ch4r_symheap.h" ++ ++enum { ++ MPIDIU_SYMSHM_SUCCESS, ++ MPIDIU_SYMSHM_MAP_FAIL, /* mapping failure when specified with a fixed start addr */ ++ MPIDIU_SYMSHM_OTHER_FAIL /* other failure reported by MPL shm */ ++}; ++ ++#ifdef USE_SYM_HEAP ++static inline int check_maprange_ok(void *start, size_t size); ++static void *generate_random_addr(size_t size); ++static int allocate_symshm_segment(MPIR_Comm * shm_comm_ptr, MPI_Aint shm_segment_len, ++ MPL_shm_hnd_t * shm_segment_hdl_ptr, void **base_ptr, ++ int *map_result_ptr); ++static void ull_maxloc_op_func(void *invec, void *inoutvec, int *len, MPI_Datatype * datatype); ++static int allreduce_maxloc(size_t mysz, int myloc, MPIR_Comm * comm, size_t * maxsz, ++ int *maxsz_loc); ++#endif ++ ++/* Returns aligned size and the page size. The page size parameter must ++ * be always initialized to 0 or a previously returned value. If page size ++ * is set, we can reuse the value and skip sysconf. */ ++size_t MPIDIU_get_mapsize(size_t size, size_t * psz) ++{ ++ size_t page_sz, mapsize; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_MAPSIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_MAPSIZE); ++ ++ if (*psz == 0) ++ page_sz = (size_t) sysconf(_SC_PAGESIZE); ++ else ++ page_sz = *psz; ++ ++ mapsize = (size + (page_sz - 1)) & (~(page_sz - 1)); ++ *psz = page_sz; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_MAPSIZE); ++ return mapsize; ++} ++ ++#ifdef USE_SYM_HEAP ++static int check_maprange_ok(void *start, size_t size) ++{ ++ int rc = 0; ++ int ret = 0; ++ size_t page_sz = 0; ++ size_t mapsize = MPIDIU_get_mapsize(size, &page_sz); ++ size_t i, num_pages = mapsize / page_sz; ++ char *ptr = (char *) start; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_CHECK_MAPRANGE_OK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_CHECK_MAPRANGE_OK); ++ ++ for (i = 0; i < num_pages; i++) { ++ rc = msync(ptr, page_sz, 0); ++ ++ if (rc == -1) { ++ if (errno != ENOMEM) ++ goto fn_fail; ++ ptr += page_sz; ++ } else ++ goto fn_exit; ++ } ++ ++ fn_fail: ++ ret = 1; ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_CHECK_MAPRANGE_OK); ++ return ret; ++} ++ ++static void *generate_random_addr(size_t size) ++{ ++ /* starting position for pointer to map ++ * This is not generic, probably only works properly on Linux ++ * but it's not fatal since we bail after a fixed number of iterations ++ */ ++#define MPIDIU_MAP_POINTER ((random_unsigned&((0x00006FFFFFFFFFFF&(~(page_sz-1)))|0x0000600000000000))) ++ uintptr_t map_pointer; ++ char random_state[256]; ++ size_t page_sz = 0; ++ uint64_t random_unsigned; ++ size_t mapsize = MPIDIU_get_mapsize(size, &page_sz); ++ MPL_time_t ts; ++ unsigned int ts_32 = 0; ++ int iter = MPIR_CVAR_CH4_RANDOM_ADDR_RETRY; ++ int32_t rh, rl; ++ struct random_data rbuf; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GENERATE_RANDOM_ADDR); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GENERATE_RANDOM_ADDR); ++ ++ /* rbuf must be zero-cleared otherwise it results in SIGSEGV in glibc ++ * (http://stackoverflow.com/questions/4167034/c-initstate-r-crashing) */ ++ memset(&rbuf, 0, sizeof(rbuf)); ++ ++ MPL_wtime(&ts); ++ MPL_wtime_touint(&ts, &ts_32); ++ ++ initstate_r(ts_32, random_state, sizeof(random_state), &rbuf); ++ random_r(&rbuf, &rh); ++ random_r(&rbuf, &rl); ++ random_unsigned = ((uint64_t) rh) << 32 | (uint64_t) rl; ++ map_pointer = MPIDIU_MAP_POINTER; ++ ++ while (check_maprange_ok((void *) map_pointer, mapsize) == 0) { ++ random_r(&rbuf, &rh); ++ random_r(&rbuf, &rl); ++ random_unsigned = ((uint64_t) rh) << 32 | (uint64_t) rl; ++ map_pointer = MPIDIU_MAP_POINTER; ++ iter--; ++ ++ if (iter == 0) { ++ map_pointer = -1ULL; ++ goto fn_exit; ++ } ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GENERATE_RANDOM_ADDR); ++ return (void *) map_pointer; ++} ++ ++/* Collectively allocate symmetric shared memory region with address ++ * defined by base_ptr. MPL_shm routines and MPI collectives are internally used. ++ * ++ * The caller should ensure shm_segment_len is page aligned and base_ptr ++ * is a symmetric non-NULL address on all processes. ++ * ++ * map_result indicates the mapping result of the node. It can be ++ * MPIDIU_SYMSHM_SUCCESS, MPIDIU_SYMSHM_MAP_FAIL or MPIDIU_SYMSHM_OTHER_FAIL. ++ * If it is MPIDIU_SYMSHM_MAP_FAIL, the caller can try it again with a different ++ * start address; if it is MPIDIU_SYMSHM_OTHER_FAIL, it usually means no more shm ++ * segment can be allocated, thus the caller should stop retrying. */ ++static int allocate_symshm_segment(MPIR_Comm * shm_comm_ptr, MPI_Aint shm_segment_len, ++ MPL_shm_hnd_t * shm_segment_hdl_ptr, void **base_ptr, ++ int *map_result_ptr) ++{ ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ int mpi_errno = MPI_SUCCESS, mpl_err = MPL_SHM_SUCCESS; ++ bool mapped_flag = false; ++ int all_map_result = MPIDIU_SYMSHM_SUCCESS, map_result = MPIDIU_SYMSHM_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_ALLOCATE_SYMSHM_SEGMENT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_ALLOCATE_SYMSHM_SEGMENT); ++ ++ *map_result_ptr = MPIDIU_SYMSHM_SUCCESS; ++ ++ mpl_err = MPL_shm_hnd_init(shm_segment_hdl_ptr); ++ MPIR_ERR_CHKANDJUMP(mpl_err != MPL_SHM_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); ++ ++ /* rank 0 initializes shared memory segment */ ++ if (shm_comm_ptr->rank == 0) { ++ char *serialized_hnd_ptr = NULL; ++ ++ /* try to map with specified symmetric address. */ ++ mpl_err = ++ MPL_shm_fixed_seg_create_and_attach(*shm_segment_hdl_ptr, shm_segment_len, base_ptr, 0); ++ if (mpl_err != MPL_SHM_SUCCESS) { ++ all_map_result = map_result = (mpl_err == MPL_SHM_EINVAL) ? ++ MPIDIU_SYMSHM_MAP_FAIL : MPIDIU_SYMSHM_OTHER_FAIL; ++ goto root_sync; ++ } else ++ mapped_flag = true; ++ ++ mpl_err = MPL_shm_hnd_get_serialized_by_ref(*shm_segment_hdl_ptr, &serialized_hnd_ptr); ++ if (mpl_err != MPL_SHM_SUCCESS) ++ all_map_result = map_result = MPIDIU_SYMSHM_OTHER_FAIL; ++ ++ root_sync: ++ /* broadcast the mapping result on rank 0 */ ++ mpi_errno = MPIR_Bcast(&map_result, 1, MPI_INT, 0, shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ /* broadcast handle to the others if mapping is successful, otherwise stop */ ++ if (map_result != MPIDIU_SYMSHM_SUCCESS) ++ goto map_fail; ++ ++ mpi_errno = MPIR_Bcast(serialized_hnd_ptr, MPL_SHM_GHND_SZ, MPI_CHAR, 0, ++ shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ /* ensure all other processes have mapped successfully */ ++ mpi_errno = MPIR_Allreduce(&map_result, &all_map_result, 1, MPI_INT, ++ MPI_MAX, shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ /* unlink shared memory region so it gets deleted when all processes exit */ ++ mpl_err = MPL_shm_seg_remove(*shm_segment_hdl_ptr); ++ MPIR_ERR_CHKANDJUMP(mpl_err != MPL_SHM_SUCCESS, mpi_errno, MPI_ERR_OTHER, ++ "**remove_shar_mem"); ++ ++ if (all_map_result != MPIDIU_SYMSHM_SUCCESS) ++ goto map_fail; ++ } else { ++ char serialized_hnd[MPL_SHM_GHND_SZ] = { 0 }; ++ ++ /* receive the mapping result of rank 0 */ ++ mpi_errno = MPIR_Bcast(&map_result, 1, MPI_INT, 0, shm_comm_ptr, &errflag); ++ if (map_result != MPIDIU_SYMSHM_SUCCESS) { ++ all_map_result = map_result; ++ goto map_fail; ++ } ++ ++ /* if rank 0 mapped successfully, others on the node attach shared memory region */ ++ ++ /* get serialized handle from rank 0 and deserialize it */ ++ mpi_errno = MPIR_Bcast(serialized_hnd, MPL_SHM_GHND_SZ, MPI_CHAR, 0, ++ shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ mpl_err = MPL_shm_hnd_deserialize(*shm_segment_hdl_ptr, serialized_hnd, ++ strlen(serialized_hnd)); ++ if (mpl_err != MPL_SHM_SUCCESS) { ++ map_result = MPIDIU_SYMSHM_OTHER_FAIL; ++ goto result_sync; ++ } ++ ++ /* try to attach with specified symmetric address */ ++ mpl_err = MPL_shm_fixed_seg_attach(*shm_segment_hdl_ptr, shm_segment_len, base_ptr, 0); ++ if (mpl_err != MPL_SHM_SUCCESS) { ++ map_result = (mpl_err == MPL_SHM_EINVAL) ? ++ MPIDIU_SYMSHM_MAP_FAIL : MPIDIU_SYMSHM_OTHER_FAIL; ++ goto result_sync; ++ } else ++ mapped_flag = true; ++ ++ result_sync: ++ /* check results of all processes. If any failure happens (max result > 0), ++ * return MPIDIU_SYMSHM_OTHER_FAIL if anyone reports it (max result == 2). ++ * Otherwise return MPIDIU_SYMSHM_MAP_FAIL (max result == 1). */ ++ mpi_errno = MPIR_Allreduce(&map_result, &all_map_result, 1, MPI_INT, ++ MPI_MAX, shm_comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ if (all_map_result != MPIDIU_SYMSHM_SUCCESS) ++ goto map_fail; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_ALLOCATE_SYMSHM_SEGMENT); ++ return mpi_errno; ++ map_fail: ++ /* clean up shm mapping resource */ ++ if (mapped_flag) { ++ mpl_err = MPL_shm_seg_detach(*shm_segment_hdl_ptr, base_ptr, shm_segment_len); ++ MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**detach_shar_mem"); ++ *base_ptr = NULL; ++ } ++ mpl_err = MPL_shm_hnd_finalize(shm_segment_hdl_ptr); ++ MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**remove_shar_mem"); ++ *map_result_ptr = all_map_result; ++ goto fn_exit; ++ fn_fail: ++ goto fn_exit; ++} ++ ++typedef struct { ++ unsigned long long sz; ++ int loc; ++} ull_maxloc_t; ++ ++/* Compute maxloc for unsigned long long type. ++ * If more than one max value exists, the loc with lower rank is returned. */ ++static void ull_maxloc_op_func(void *invec, void *inoutvec, int *len, MPI_Datatype * datatype) ++{ ++ ull_maxloc_t *inmaxloc = (ull_maxloc_t *) invec; ++ ull_maxloc_t *outmaxloc = (ull_maxloc_t *) inoutvec; ++ int i; ++ for (i = 0; i < *len; i++) { ++ if (inmaxloc->sz > outmaxloc->sz) { ++ outmaxloc->sz = inmaxloc->sz; ++ outmaxloc->loc = inmaxloc->loc; ++ } else if (inmaxloc->sz == outmaxloc->sz && inmaxloc->loc < outmaxloc->loc) ++ outmaxloc->loc = inmaxloc->loc; ++ } ++} ++ ++/* Allreduce MAXLOC for unsigned size type by using user defined operator ++ * and derived datatype. We have to customize it because standard MAXLOC ++ * supports only pairtypes with signed {short, int, long}. We internally ++ * cast size_t to unsigned long long which is large enough to hold size type ++ * and matches an MPI basic datatype. */ ++static int allreduce_maxloc(size_t mysz, int myloc, MPIR_Comm * comm, size_t * maxsz, ++ int *maxsz_loc) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int blocks[2] = { 1, 1 }; ++ MPI_Aint disps[2]; ++ MPI_Datatype types[2], maxloc_type = MPI_DATATYPE_NULL; ++ MPI_Op maxloc_op = MPI_OP_NULL; ++ ull_maxloc_t maxloc, maxloc_result; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_ALLREDUCE_MAXLOC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_ALLREDUCE_MAXLOC); ++ ++ types[0] = MPI_UNSIGNED_LONG_LONG; ++ types[1] = MPI_INT; ++ disps[0] = 0; ++ disps[1] = (MPI_Aint) ((uintptr_t) & maxloc.loc - (uintptr_t) & maxloc.sz); ++ ++ mpi_errno = MPIR_Type_create_struct_impl(2, blocks, disps, types, &maxloc_type); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = MPIR_Type_commit_impl(&maxloc_type); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = MPIR_Op_create_impl(ull_maxloc_op_func, 0, &maxloc_op); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ maxloc.sz = (unsigned long long) mysz; ++ maxloc.loc = myloc; ++ ++ mpi_errno = MPIR_Allreduce(&maxloc, &maxloc_result, 1, maxloc_type, maxloc_op, comm, &errflag); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ *maxsz_loc = maxloc_result.loc; ++ *maxsz = (size_t) maxloc_result.sz; ++ ++ fn_exit: ++ if (maxloc_type != MPI_DATATYPE_NULL) ++ MPIR_Type_free_impl(&maxloc_type); ++ if (maxloc_op != MPI_OP_NULL) ++ MPIR_Op_free_impl(&maxloc_op); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_ALLREDUCE_MAXLOC); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++#endif /* end of USE_SYM_HEAP */ ++ ++/* Allocate a symmetric heap over a communicator with same starting address ++ * on each process and shared memory over processes of each node. The MPL_shm ++ * routines are internally used on node with multiple processes, and MPL_mmap ++ * is used on node with single process. It tries MPIR_CVAR_CH4_SHM_SYMHEAP_RETRY ++ * times before giving up, and returns with fail_flag=1 if mapping fails. ++ * ++ * Input shm_size is the total mapping size of shared memory on local node, and ++ * shm_offsets presents the expected offset of local process's start address in ++ * the mapped shared memory. */ ++int MPIDIU_get_shm_symheap(MPI_Aint shm_size, MPI_Aint * shm_offsets, MPIR_Comm * comm, ++ MPIR_Win * win, bool * fail_flag) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIU_GET_SHM_SYMHEAP); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIU_GET_SHM_SYMHEAP); ++ ++#ifdef USE_SYM_HEAP ++ int iter = MPIR_CVAR_CH4_SHM_SYMHEAP_RETRY; ++ MPL_shm_hnd_t *shm_segment_hdl_ptr = &MPIDIG_WIN(win, shm_segment_handle); ++ void **base_ptr = &MPIDIG_WIN(win, mmap_addr); ++ int all_map_result = MPIDIU_SYMSHM_MAP_FAIL; ++ ++ size_t mapsize = 0, page_sz = 0, maxsz = 0; ++ int maxsz_loc = 0; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_Comm *shm_comm_ptr = comm->node_comm; ++ ++ *fail_flag = false; ++ mapsize = MPIDIU_get_mapsize(shm_size, &page_sz); ++ ++ /* figure out leading process in win */ ++ mpi_errno = allreduce_maxloc(mapsize, comm->rank, comm, &maxsz, &maxsz_loc); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ /* zero size window, simply return */ ++ if (maxsz == 0) ++ goto fn_exit; ++ ++ /* try symheap multiple times if it is a fixed address mapping failure, ++ * otherwise stop. */ ++ while (all_map_result == MPIDIU_SYMSHM_MAP_FAIL && iter-- > 0) { ++ void *map_pointer = NULL; ++ int map_result = MPIDIU_SYMSHM_SUCCESS; ++ ++ /* the leading process in win get a random address */ ++ if (comm->rank == maxsz_loc) ++ map_pointer = generate_random_addr(mapsize); ++ ++ /* broadcast fixed address to the other processes in win */ ++ mpi_errno = MPIR_Bcast(&map_pointer, sizeof(map_pointer), ++ MPI_CHAR, maxsz_loc, comm, &errflag); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ /* each shm node try to create shm segment with the fixed address, ++ * if single process on the node then simply mmap */ ++ if (mapsize > 0) { ++ if (shm_comm_ptr != NULL) { ++ /* calculate local start address */ ++ ++ /* Some static analyzer doesn't understand the relationship ++ * that shm_comm_ptr != NULL => shm_offsets != NULL. ++ * This assertion is to make it easier to understand not only ++ * for static analyzers but also humans. */ ++ MPIR_Assert(shm_offsets != NULL); ++ ++ *base_ptr = (void *) ((char *) map_pointer - shm_offsets[shm_comm_ptr->rank]); ++ mpi_errno = allocate_symshm_segment(shm_comm_ptr, mapsize, shm_segment_hdl_ptr, ++ base_ptr, &map_result); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ } else { ++ int rc = check_maprange_ok(map_pointer, mapsize); ++ if (rc) { ++ *base_ptr = MPL_mmap(map_pointer, mapsize, ++ PROT_READ | PROT_WRITE, ++ MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0, MPL_MEM_RMA); ++ } else ++ *base_ptr = (void *) MAP_FAILED; ++ map_result = (*base_ptr == (void *) MAP_FAILED) ? ++ MPIDIU_SYMSHM_MAP_FAIL : MPIDIU_SYMSHM_SUCCESS; ++ } ++ } ++ ++ /* check if any mapping failure occurs */ ++ mpi_errno = MPIR_Allreduce(&map_result, &all_map_result, 1, MPI_INT, ++ MPI_MAX, comm, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ ++ /* cleanup local shm segment if mapping failed on other process */ ++ if (all_map_result != MPIDIU_SYMSHM_SUCCESS && mapsize > 0 && ++ map_result == MPIDIU_SYMSHM_SUCCESS) { ++ if (shm_comm_ptr != NULL) { ++ /* destroy successful shm segment */ ++ mpi_errno = MPIDIU_destroy_shm_segment(mapsize, shm_segment_hdl_ptr, base_ptr); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } else ++ MPL_munmap(base_ptr, mapsize, MPL_MEM_RMA); ++ } ++ } ++ ++ if (all_map_result != MPIDIU_SYMSHM_SUCCESS) { ++ /* if fail to allocate, return and let the caller choose another method */ ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "WARNING: Win_allocate: Unable to allocate global symmetric heap\n"); ++ *fail_flag = true; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_SHM_SYMHEAP); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++#else ++ ++ /* always fail, return and let the caller choose another method */ ++ MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, ++ "WARNING: Win_allocate: Unable to allocate global symmetric heap\n"); ++ *fail_flag = true; ++ ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIU_GET_SHM_SYMHEAP); ++ return mpi_errno; ++#endif ++} +--- a/src/mpid/ch4/src/ch4r_symheap.h ++++ b/src/mpid/ch4/src/ch4r_symheap.h +@@ -11,24 +11,7 @@ + #ifndef CH4R_SYMHEAP_H_INCLUDED + #define CH4R_SYMHEAP_H_INCLUDED + +-#include +- +-#include +-#ifdef HAVE_SYS_MMAN_H +-#include +-#endif /* HAVE_SYS_MMAN_H */ +-#ifdef HAVE_SYS_TIME_H +-#include +-#endif /* HAVE_SYS_TIME_H */ +-#ifdef HAVE_SYS_STAT_H +-#include +-#endif /* HAVE_SYS_STAT_H */ +-#ifdef HAVE_FCNTL_H +-#include +-#endif /* HAVE_FCNTL_H */ +-#ifdef HAVE_STDINT_H +-#include +-#endif /* HAVE_STDINT_H */ ++#include + + /* + === BEGIN_MPI_T_CVAR_INFO_BLOCK === +@@ -59,440 +42,8 @@ cvars: + === END_MPI_T_CVAR_INFO_BLOCK === + */ + +-/* Returns aligned size and the page size. The page size parameter must +- * be always initialized to 0 or a previously returned value. If page size +- * is set, we can reuse the value and skip sysconf. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_get_mapsize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline size_t MPIDI_CH4R_get_mapsize(size_t size, size_t * psz) +-{ +- size_t page_sz, mapsize; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_GET_MAPSIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_GET_MAPSIZE); +- +- if (*psz == 0) +- page_sz = (size_t) sysconf(_SC_PAGESIZE); +- else +- page_sz = *psz; +- +- mapsize = (size + (page_sz - 1)) & (~(page_sz - 1)); +- *psz = page_sz; +- +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_GET_MAPSIZE); +- return mapsize; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_is_valid_mapaddr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_is_valid_mapaddr(void *start) +-{ +- return ((uintptr_t) start == -1ULL) ? 0 : 1; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_check_maprange_ok +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_check_maprange_ok(void *start, size_t size) +-{ +- int rc = 0; +- int ret = 0; +- size_t page_sz = 0; +- size_t mapsize = MPIDI_CH4R_get_mapsize(size, &page_sz); +- size_t i, num_pages = mapsize / page_sz; +- char *ptr = (char *) start; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_CHECK_MAPRANGE_OK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_CHECK_MAPRANGE_OK); +- +- for (i = 0; i < num_pages; i++) { +- rc = msync(ptr, page_sz, 0); +- +- if (rc == -1) { +- if (errno != ENOMEM) +- goto fn_fail; +- ptr += page_sz; +- } else +- goto fn_exit; +- } +- +- fn_fail: +- ret = 1; +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_CHECK_MAPRANGE_OK); +- return ret; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_generate_random_addr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline void *MPIDI_CH4R_generate_random_addr(size_t size) +-{ +- /* starting position for pointer to map +- * This is not generic, probably only works properly on Linux +- * but it's not fatal since we bail after a fixed number of iterations +- */ +-#define MPIDI_CH4I_MAP_POINTER ((random_unsigned&((0x00006FFFFFFFFFFF&(~(page_sz-1)))|0x0000600000000000))) +- uintptr_t map_pointer; +-#ifdef USE_SYM_HEAP +- char random_state[256]; +- size_t page_sz = 0; +- uint64_t random_unsigned; +- size_t mapsize = MPIDI_CH4R_get_mapsize(size, &page_sz); +- struct timeval ts; +- int iter = MPIR_CVAR_CH4_RANDOM_ADDR_RETRY; +- int32_t rh, rl; +- struct random_data rbuf; +-#endif +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_GENERATE_RANDOM_ADDR); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_GENERATE_RANDOM_ADDR); +- +-#ifndef USE_SYM_HEAP +- map_pointer = -1ULL; +- goto fn_exit; +-#else +- +- /* rbuf must be zero-cleared otherwise it results in SIGSEGV in glibc +- * (http://stackoverflow.com/questions/4167034/c-initstate-r-crashing) */ +- memset(&rbuf, 0, sizeof(rbuf)); +- +- gettimeofday(&ts, NULL); +- +- initstate_r(ts.tv_usec, random_state, sizeof(random_state), &rbuf); +- random_r(&rbuf, &rh); +- random_r(&rbuf, &rl); +- random_unsigned = ((uint64_t) rh) << 32 | (uint64_t) rl; +- map_pointer = MPIDI_CH4I_MAP_POINTER; +- +- while (MPIDI_CH4R_check_maprange_ok((void *) map_pointer, mapsize) == 0) { +- random_r(&rbuf, &rh); +- random_r(&rbuf, &rl); +- random_unsigned = ((uint64_t) rh) << 32 | (uint64_t) rl; +- map_pointer = MPIDI_CH4I_MAP_POINTER; +- iter--; +- +- if (iter == 0) { +- map_pointer = -1ULL; +- goto fn_exit; +- } +- } +- +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_GENERATE_RANDOM_ADDR); +- return (void *) map_pointer; +-} +- +-/* Collectively allocate symmetric shared memory region with address +- * defined by base_ptr. MPL_shm routines and MPI collectives are internally used. +- * +- * The caller should ensure shm_segment_len is page aligned and base_ptr +- * is a symmetric non-NULL address on all processes. +- * +- * mapfail_flag is set to 1 if it is a mapping failure, otherwise it is 0. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4U_allocate_symshm_segment +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4I_allocate_symshm_segment(MPIR_Comm * shm_comm_ptr, +- MPI_Aint shm_segment_len, +- MPL_shm_hnd_t * shm_segment_hdl_ptr, +- void **base_ptr, int *mapfail_flag) +-{ +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- int mpi_errno = MPI_SUCCESS, mpl_err = MPL_SHM_SUCCESS; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_ALLOCATE_SYMSHM_SEGMENT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_ALLOCATE_SYMSHM_SEGMENT); +- +- mpl_err = MPL_shm_hnd_init(shm_segment_hdl_ptr); +- MPIR_ERR_CHKANDJUMP(mpl_err != MPL_SHM_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); +- +- /* rank 0 initializes shared memory segment */ +- if (shm_comm_ptr->rank == 0) { +- char *serialized_hnd_ptr = NULL; +- +- /* try to map with specified symmetric address. */ +- mpl_err = +- MPL_shm_fixed_seg_create_and_attach(*shm_segment_hdl_ptr, shm_segment_len, base_ptr, 0); +- if (mpl_err == MPL_SHM_EINVAL) +- *mapfail_flag = 1; +- +- /* handle mapping failure separately, caller may retry predefined times before giving up */ +- MPIR_ERR_CHKANDJUMP((mpl_err != MPL_SHM_EINVAL && mpl_err != MPL_SHM_SUCCESS), +- mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); +- +- /* broadcast the mapping result on rank 0 */ +- mpi_errno = MPIR_Bcast(mapfail_flag, 1, MPI_INT, 0, shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- +- /* broadcast handle to the others if mapping is successful */ +- if (!*mapfail_flag) { +- mpl_err = MPL_shm_hnd_get_serialized_by_ref(*shm_segment_hdl_ptr, &serialized_hnd_ptr); +- MPIR_ERR_CHKANDJUMP(mpl_err != MPL_SHM_SUCCESS, mpi_errno, MPI_ERR_OTHER, +- "**alloc_shar_mem"); +- +- mpi_errno = MPIR_Bcast(serialized_hnd_ptr, MPL_SHM_GHND_SZ, MPI_CHAR, 0, +- shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- +- /* wait for other processes to attach to win */ +- mpi_errno = MPIR_Barrier(shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- } +- +- /* unlink shared memory region so it gets deleted when all processes exit */ +- mpl_err = MPL_shm_seg_remove(*shm_segment_hdl_ptr); +- MPIR_ERR_CHKANDJUMP(mpl_err != MPL_SHM_SUCCESS, mpi_errno, MPI_ERR_OTHER, +- "**remove_shar_mem"); +- } else { +- /* receive the mapping result of rank 0 */ +- mpi_errno = MPIR_Bcast(mapfail_flag, 1, MPI_INT, 0, shm_comm_ptr, &errflag); +- +- /* if rank 0 mapped successfully, others on the node attach shared memory region */ +- if (!*mapfail_flag) { +- char serialized_hnd[MPL_SHM_GHND_SZ] = { 0 }; +- +- /* get serialized handle from rank 0 and deserialize it */ +- mpi_errno = MPIR_Bcast(serialized_hnd, MPL_SHM_GHND_SZ, MPI_CHAR, 0, +- shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- +- mpl_err = MPL_shm_hnd_deserialize(*shm_segment_hdl_ptr, serialized_hnd, +- strlen(serialized_hnd)); +- MPIR_ERR_CHKANDJUMP(mpl_err != MPL_SHM_SUCCESS, mpi_errno, MPI_ERR_OTHER, +- "**alloc_shar_mem"); +- +- /* try to attach with specified symmetric address */ +- mpl_err = MPL_shm_fixed_seg_attach(*shm_segment_hdl_ptr, shm_segment_len, base_ptr, 0); +- if (mpl_err == MPL_SHM_EINVAL) +- *mapfail_flag = 1; +- +- /* handle mapping failure separately, caller may retry predefined times before giving up */ +- MPIR_ERR_CHKANDJUMP((mpl_err != MPL_SHM_EINVAL && mpl_err != MPL_SHM_SUCCESS), +- mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); +- +- mpi_errno = MPIR_Barrier(shm_comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- } +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_ALLOCATE_SYMSHM_SEGMENT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-typedef struct { +- unsigned long long sz; +- int loc; +-} MPIDI_CH4I_ull_maxloc_t; +- +-/* Compute maxloc for unsigned long long type. +- * If more than one max value exists, the loc with lower rank is returned. */ +-static inline void MPIDI_CH4I_ull_maxloc_op_func(void *invec, void *inoutvec, +- int *len, MPI_Datatype * datatype) +-{ +- MPIDI_CH4I_ull_maxloc_t *inmaxloc = (MPIDI_CH4I_ull_maxloc_t *) invec; +- MPIDI_CH4I_ull_maxloc_t *outmaxloc = (MPIDI_CH4I_ull_maxloc_t *) inoutvec; +- int i; +- for (i = 0; i < *len; i++) { +- if (inmaxloc->sz > outmaxloc->sz) { +- outmaxloc->sz = inmaxloc->sz; +- outmaxloc->loc = inmaxloc->loc; +- } else if (inmaxloc->sz == outmaxloc->sz && inmaxloc->loc < outmaxloc->loc) +- outmaxloc->loc = inmaxloc->loc; +- } +-} +- +-/* Allreduce MAXLOC for unsigned size type by using user defined operator +- * and derived datatype. We have to customize it because standard MAXLOC +- * supports only pairtypes with signed {short, int, long}. We internally +- * cast size_t to unsigned long long which is large enough to hold size type +- * and matches an MPI basic datatype. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4I_allreduce_maxloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4I_allreduce_maxloc(size_t mysz, int myloc, MPIR_Comm * comm, +- size_t * maxsz, int *maxsz_loc) +-{ +- int mpi_errno = MPI_SUCCESS; +- int blocks[2] = { 1, 1 }; +- MPI_Aint disps[2]; +- MPI_Datatype types[2], maxloc_type = MPI_DATATYPE_NULL; +- MPI_Op maxloc_op = MPI_OP_NULL; +- MPIDI_CH4I_ull_maxloc_t maxloc, maxloc_result; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_ALLREDUCE_MAXLOC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_ALLREDUCE_MAXLOC); +- +- types[0] = MPI_UNSIGNED_LONG_LONG; +- types[1] = MPI_INT; +- disps[0] = 0; +- disps[1] = (MPI_Aint) ((uintptr_t) & maxloc.loc - (uintptr_t) & maxloc.sz); +- +- mpi_errno = MPIR_Type_create_struct_impl(2, blocks, disps, types, &maxloc_type); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIR_Type_commit_impl(&maxloc_type); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIR_Op_create_impl(MPIDI_CH4I_ull_maxloc_op_func, 0, &maxloc_op); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- maxloc.sz = (unsigned long long) mysz; +- maxloc.loc = myloc; +- +- mpi_errno = MPIR_Allreduce(&maxloc, &maxloc_result, 1, maxloc_type, maxloc_op, comm, &errflag); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- *maxsz_loc = maxloc_result.loc; +- *maxsz = (size_t) maxloc_result.sz; +- +- fn_exit: +- if (maxloc_type != MPI_DATATYPE_NULL) +- MPIR_Type_free_impl(&maxloc_type); +- if (maxloc_op != MPI_OP_NULL) +- MPIR_Op_free_impl(&maxloc_op); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_ALLREDUCE_MAXLOC); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-/* Allocate a symmetric heap over a communicator with same starting address +- * on each process and shared memory over processes of each node. The MPL_shm +- * routines are internally used on node with multiple processes, and MPL_mmap +- * is used on node with single process. It tries MPIR_CVAR_CH4_SHM_SYMHEAP_RETRY +- * times before giving up, and returns with fail_flag=1 if mapping fails. +- * +- * Input shm_size is the total mapping size of shared memory on local node, and +- * shm_offsets presents the expected offset of local process's start address in +- * the mapped shared memory. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_get_shm_symheap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_get_shm_symheap(MPI_Aint shm_size, MPI_Aint * shm_offsets, +- MPIR_Comm * comm, MPIR_Win * win, int *fail_flag) +-{ +- int mpi_errno = MPI_SUCCESS; +- int iter = MPIR_CVAR_CH4_SHM_SYMHEAP_RETRY; +- unsigned any_mapfail_flag = 1; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_GET_SHM_SYMHEAP); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_GET_SHM_SYMHEAP); +- +-#ifdef USE_SYM_HEAP +- MPL_shm_hnd_t *shm_segment_hdl_ptr = &MPIDI_CH4U_WIN(win, shm_segment_handle); +- void **base_ptr = &MPIDI_CH4U_WIN(win, mmap_addr); +- +- size_t mapsize = 0, page_sz = 0, maxsz = 0; +- int maxsz_loc = 0; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_Comm *shm_comm_ptr = comm->node_comm; +- +- *fail_flag = 0; +- mapsize = MPIDI_CH4R_get_mapsize(shm_size, &page_sz); +- +- /* figure out leading process in win */ +- mpi_errno = MPIDI_CH4I_allreduce_maxloc(mapsize, comm->rank, comm, &maxsz, &maxsz_loc); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- /* zero size window, simply return */ +- if (maxsz == 0) +- goto fn_exit; +- +- while (any_mapfail_flag && iter-- > 0) { +- void *map_pointer = NULL; +- unsigned mapfail_flag = 0; +- +- /* the leading process in win get a random address */ +- if (comm->rank == maxsz_loc) +- map_pointer = MPIDI_CH4R_generate_random_addr(mapsize); +- +- /* broadcast fixed address to the other processes in win */ +- mpi_errno = MPIR_Bcast(&map_pointer, sizeof(map_pointer), +- MPI_CHAR, maxsz_loc, comm, &errflag); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- /* each shm node try to create shm segment with the fixed address, +- * if single process on the node then simply mmap */ +- if (mapsize > 0) { +- if (shm_comm_ptr != NULL) { +- /* calculate local start address */ +- *base_ptr = (void *) ((char *) map_pointer - shm_offsets[shm_comm_ptr->rank]); +- mpi_errno = MPIDI_CH4I_allocate_symshm_segment(shm_comm_ptr, mapsize, +- shm_segment_hdl_ptr, base_ptr, +- &mapfail_flag); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- } else { +- int rc = MPIDI_CH4R_check_maprange_ok(map_pointer, mapsize); +- if (rc) { +- *base_ptr = MPL_mmap(map_pointer, mapsize, +- PROT_READ | PROT_WRITE, +- MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0, MPL_MEM_RMA); +- } else +- *base_ptr = (void *) MAP_FAILED; +- mapfail_flag = (*base_ptr == (void *) MAP_FAILED) ? 1 : 0; +- } +- } +- +- /* check if any mapping failure occurs */ +- mpi_errno = MPIR_Allreduce(&mapfail_flag, &any_mapfail_flag, 1, MPI_UNSIGNED, +- MPI_BOR, comm, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- +- /* cleanup local shm segment if mapping failed */ +- if (any_mapfail_flag && mapsize > 0) { +- if (shm_comm_ptr != NULL) { +- if (mapfail_flag) { +- /* if locally map failed, only release handle */ +- int mpl_err = MPL_SHM_SUCCESS; +- mpl_err = MPL_shm_hnd_finalize(shm_segment_hdl_ptr); +- MPIR_ERR_CHKANDJUMP(mpl_err, mpi_errno, MPI_ERR_OTHER, "**remove_shar_mem"); +- } else { +- /* destroy successful shm segment */ +- mpi_errno = MPIDI_CH4U_destroy_shm_segment(mapsize, shm_segment_hdl_ptr, +- base_ptr); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- } else if (!mapfail_flag) { +- MPL_munmap(base_ptr, mapsize, MPL_MEM_RMA); +- } +- } +- } +-#endif +- +- if (any_mapfail_flag) { +- /* if fail to allocate, return and let the caller choose another method */ +- MPL_DBG_MSG(MPIDI_CH4_DBG_GENERAL, VERBOSE, +- "WARNING: Win_allocate: Unable to allocate global symmetric heap\n"); +- *fail_flag = 1; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_GET_SHM_SYMHEAP); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} ++size_t MPIDIU_get_mapsize(size_t size, size_t * psz); ++int MPIDIU_get_shm_symheap(MPI_Aint shm_size, MPI_Aint * shm_offsets, MPIR_Comm * comm, ++ MPIR_Win * win, bool * fail_flag); + + #endif /* CH4R_SYMHEAP_H_INCLUDED */ +new file mode 100644 +--- /dev/null ++++ b/src/mpid/ch4/src/ch4r_win.c +@@ -0,0 +1,1028 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2016 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ */ ++ ++#include "mpidimpl.h" ++#include "mpidch4r.h" ++#include "ch4r_win.h" ++ ++enum { ++ SHM_WIN_OPTIONAL, ++ SHM_WIN_REQUIRED, ++}; ++ ++static void parse_info_accu_ops_str(const char *str, uint32_t * ops_ptr); ++static void get_info_accu_ops_str(uint32_t val, char *buf, size_t maxlen); ++static int win_set_info(MPIR_Win * win, MPIR_Info * info, bool is_init); ++static int win_init(MPI_Aint length, int disp_unit, MPIR_Win ** win_ptr, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, int create_flavor, int model); ++static int win_finalize(MPIR_Win ** win_ptr); ++static int win_shm_alloc_impl(MPI_Aint size, int disp_unit, MPIR_Comm * comm_ptr, void **base_ptr, ++ MPIR_Win ** win_ptr, int shm_option); ++ ++static void parse_info_accu_ops_str(const char *str, uint32_t * ops_ptr) ++{ ++ uint32_t ops = 0; ++ char *value, *token, *savePtr = NULL; ++ ++ value = (char *) str; ++ /* str can never be NULL. */ ++ MPIR_Assert(value); ++ ++ /* handle special value */ ++ if (!strncmp(value, "none", strlen("none"))) { ++ *ops_ptr = 0; ++ return; ++ } else if (!strncmp(value, "any_op", strlen("any_op"))) { ++ MPIDIG_win_info_accu_op_shift_t op_shift; ++ /* add all ops */ ++ for (op_shift = MPIDIG_ACCU_OP_SHIFT_FIRST; op_shift < MPIDIG_ACCU_OP_SHIFT_LAST; ++ op_shift++) ++ ops |= (1 << op_shift); ++ *ops_ptr = ops; ++ return; ++ } ++ ++ token = (char *) strtok_r(value, ",", &savePtr); ++ while (token != NULL) { ++ ++ /* traverse op list (exclude null and last) and add the op if set */ ++ if (!strncmp(token, "max", strlen("max"))) ++ ops |= (1 << MPIDIG_ACCU_MAX_SHIFT); ++ else if (!strncmp(token, "min", strlen("min"))) ++ ops |= (1 << MPIDIG_ACCU_MIN_SHIFT); ++ else if (!strncmp(token, "sum", strlen("sum"))) ++ ops |= (1 << MPIDIG_ACCU_SUM_SHIFT); ++ else if (!strncmp(token, "prod", strlen("prod"))) ++ ops |= (1 << MPIDIG_ACCU_PROD_SHIFT); ++ else if (!strncmp(token, "maxloc", strlen("maxloc"))) ++ ops |= (1 << MPIDIG_ACCU_MAXLOC_SHIFT); ++ else if (!strncmp(token, "minloc", strlen("minloc"))) ++ ops |= (1 << MPIDIG_ACCU_MINLOC_SHIFT); ++ else if (!strncmp(token, "band", strlen("band"))) ++ ops |= (1 << MPIDIG_ACCU_BAND_SHIFT); ++ else if (!strncmp(token, "bor", strlen("bor"))) ++ ops |= (1 << MPIDIG_ACCU_BOR_SHIFT); ++ else if (!strncmp(token, "bxor", strlen("bxor"))) ++ ops |= (1 << MPIDIG_ACCU_BXOR_SHIFT); ++ else if (!strncmp(token, "land", strlen("land"))) ++ ops |= (1 << MPIDIG_ACCU_LAND_SHIFT); ++ else if (!strncmp(token, "lor", strlen("lor"))) ++ ops |= (1 << MPIDIG_ACCU_LOR_SHIFT); ++ else if (!strncmp(token, "lxor", strlen("lxor"))) ++ ops |= (1 << MPIDIG_ACCU_LXOR_SHIFT); ++ else if (!strncmp(token, "replace", strlen("replace"))) ++ ops |= (1 << MPIDIG_ACCU_REPLACE_SHIFT); ++ else if (!strncmp(token, "no_op", strlen("no_op"))) ++ ops |= (1 << MPIDIG_ACCU_NO_OP_SHIFT); ++ else if (!strncmp(token, "cswap", strlen("cswap")) || ++ !strncmp(token, "compare_and_swap", strlen("compare_and_swap"))) ++ ops |= (1 << MPIDIG_ACCU_CSWAP_SHIFT); ++ ++ token = (char *) strtok_r(NULL, ",", &savePtr); ++ } ++ ++ /* update info only when any valid value is set */ ++ if (ops) ++ *ops_ptr = ops; ++} ++ ++static void get_info_accu_ops_str(uint32_t val, char *buf, size_t maxlen) ++{ ++ int c = 0; ++ ++ MPIR_Assert(maxlen >= strlen("max,min,sum,prod,maxloc,minloc,band,bor," ++ "bxor,land,lor,lxor,replace,no_op,cswap") + 1); ++ ++ if (val & (1 << MPIDIG_ACCU_MAX_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "max"); ++ if (val & (1 << MPIDIG_ACCU_MIN_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%smin", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_SUM_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%ssum", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_PROD_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%sprod", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_MAXLOC_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%smaxloc", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_MINLOC_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%sminloc", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_BAND_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%sband", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_BOR_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%sbor", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_BXOR_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%sbxor", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_LAND_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%sland", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_LOR_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%slor", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_LXOR_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%slxor", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_REPLACE_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%sreplace", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_NO_OP_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%sno_op", (c > 0) ? "," : ""); ++ if (val & (1 << MPIDIG_ACCU_CSWAP_SHIFT)) ++ c += snprintf(buf + c, maxlen - c, "%scswap", (c > 0) ? "," : ""); ++ ++ if (c == 0) ++ strncpy(buf, "none", maxlen); ++} ++ ++static int win_set_info(MPIR_Win * win, MPIR_Info * info, bool is_init) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_SET_INFO); ++ ++ MPIR_Info *curr_ptr; ++ char *value, *token, *savePtr = NULL; ++ int save_ordering; ++ ++ curr_ptr = info->next; ++ ++ while (curr_ptr) { ++ if (!strcmp(curr_ptr->key, "no_locks")) { ++ if (!strcmp(curr_ptr->value, "true")) ++ MPIDIG_WIN(win, info_args).no_locks = 1; ++ else if (!strcmp(curr_ptr->value, "false")) ++ MPIDIG_WIN(win, info_args).no_locks = 0; ++ } else if (!strcmp(curr_ptr->key, "accumulate_ordering")) { ++ save_ordering = MPIDIG_WIN(win, info_args).accumulate_ordering; ++ MPIDIG_WIN(win, info_args).accumulate_ordering = 0; ++ if (!strcmp(curr_ptr->value, "none")) { ++ /* For MPI-3, "none" means no ordering and is not default. */ ++ goto next; ++ } ++ ++ /* value can never be NULL. */ ++ MPIR_Assert(curr_ptr->value); ++ ++ value = curr_ptr->value; ++ token = (char *) strtok_r(value, ",", &savePtr); ++ ++ while (token) { ++ if (!memcmp(token, "rar", 3)) ++ MPIDIG_WIN(win, info_args).accumulate_ordering = ++ (MPIDIG_WIN(win, info_args).accumulate_ordering | MPIDIG_ACCU_ORDER_RAR); ++ else if (!memcmp(token, "raw", 3)) ++ MPIDIG_WIN(win, info_args).accumulate_ordering = ++ (MPIDIG_WIN(win, info_args).accumulate_ordering | MPIDIG_ACCU_ORDER_RAW); ++ else if (!memcmp(token, "war", 3)) ++ MPIDIG_WIN(win, info_args).accumulate_ordering = ++ (MPIDIG_WIN(win, info_args).accumulate_ordering | MPIDIG_ACCU_ORDER_WAR); ++ else if (!memcmp(token, "waw", 3)) ++ MPIDIG_WIN(win, info_args).accumulate_ordering = ++ (MPIDIG_WIN(win, info_args).accumulate_ordering | MPIDIG_ACCU_ORDER_WAW); ++ else ++ MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_ARG, goto fn_fail, "**info"); ++ ++ token = (char *) strtok_r(NULL, ",", &savePtr); ++ } ++ ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering == 0) ++ MPIDIG_WIN(win, info_args).accumulate_ordering = save_ordering; ++ } else if (!strcmp(curr_ptr->key, "accumulate_ops")) { ++ if (!strcmp(curr_ptr->value, "same_op")) ++ MPIDIG_WIN(win, info_args).accumulate_ops = MPIDIG_ACCU_SAME_OP; ++ else if (!strcmp(curr_ptr->value, "same_op_no_op")) ++ MPIDIG_WIN(win, info_args).accumulate_ops = MPIDIG_ACCU_SAME_OP_NO_OP; ++ } else if (!strcmp(curr_ptr->key, "same_disp_unit")) { ++ if (!strcmp(curr_ptr->value, "true")) ++ MPIDIG_WIN(win, info_args).same_disp_unit = 1; ++ else if (!strcmp(curr_ptr->value, "false")) ++ MPIDIG_WIN(win, info_args).same_disp_unit = 0; ++ } else if (!strcmp(curr_ptr->key, "same_size")) { ++ if (!strcmp(curr_ptr->value, "true")) ++ MPIDIG_WIN(win, info_args).same_size = 1; ++ else if (!strcmp(curr_ptr->value, "false")) ++ MPIDIG_WIN(win, info_args).same_size = 0; ++ } else if (!strcmp(curr_ptr->key, "alloc_shared_noncontig")) { ++ if (!strcmp(curr_ptr->value, "true")) ++ MPIDIG_WIN(win, info_args).alloc_shared_noncontig = 1; ++ else if (!strcmp(curr_ptr->value, "false")) ++ MPIDIG_WIN(win, info_args).alloc_shared_noncontig = 0; ++ } else if (!strcmp(curr_ptr->key, "alloc_shm")) { ++ if (!strcmp(curr_ptr->value, "true")) ++ MPIDIG_WIN(win, info_args).alloc_shm = 1; ++ else if (!strcmp(curr_ptr->value, "false")) ++ MPIDIG_WIN(win, info_args).alloc_shm = 0; ++ } ++ /* We allow the user to set the following atomics hint only at window init time, ++ * all future updates by win_set_info are ignored. This is because we do not ++ * have a good way to ensure all outstanding atomic ops have been completed ++ * on all processes especially in passive-target epochs. */ ++ else if (is_init && !strcmp(curr_ptr->key, "which_accumulate_ops")) { ++ parse_info_accu_ops_str(curr_ptr->value, ++ &MPIDIG_WIN(win, info_args).which_accumulate_ops); ++ } else if (is_init && !strcmp(curr_ptr->key, "accumulate_noncontig_dtype")) { ++ if (!strcmp(curr_ptr->value, "true")) ++ MPIDIG_WIN(win, info_args).accumulate_noncontig_dtype = true; ++ else if (!strcmp(curr_ptr->value, "false")) ++ MPIDIG_WIN(win, info_args).accumulate_noncontig_dtype = false; ++ } else if (is_init && !strcmp(curr_ptr->key, "accumulate_max_bytes")) { ++ if (!strcmp(curr_ptr->value, "unlimited") || !strcmp(curr_ptr->value, "-1")) ++ MPIDIG_WIN(win, info_args).accumulate_max_bytes = -1; ++ else { ++ long max_bytes = atol(curr_ptr->value); ++ if (max_bytes >= 0) ++ MPIDIG_WIN(win, info_args).accumulate_max_bytes = max_bytes; ++ } ++ } else if (is_init && !strcmp(curr_ptr->key, "disable_shm_accumulate")) { ++ if (!strcmp(curr_ptr->value, "true")) ++ MPIDIG_WIN(win, info_args).disable_shm_accumulate = true; ++ else ++ MPIDIG_WIN(win, info_args).disable_shm_accumulate = false; ++ } ++ next: ++ curr_ptr = curr_ptr->next; ++ } ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_SET_INFO); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int win_init(MPI_Aint length, int disp_unit, MPIR_Win ** win_ptr, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, int create_flavor, int model) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Win *win = (MPIR_Win *) MPIR_Handle_obj_alloc(&MPIR_Win_mem); ++ MPIDIG_win_target_t *targets = NULL; ++ MPIR_Comm *win_comm_ptr; ++ MPIDIG_win_info_accu_op_shift_t op_shift; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_INIT); ++ MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_MPIDIG_WIN_INIT); ++ ++ MPIR_ERR_CHKANDSTMT(win == NULL, mpi_errno, MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); ++ *win_ptr = win; ++ ++ memset(&win->dev.am, 0, sizeof(MPIDIG_win_t)); ++ ++ /* Duplicate the original communicator here to avoid having collisions ++ * between internal collectives */ ++ mpi_errno = MPIR_Comm_dup_impl(comm_ptr, &win_comm_ptr); ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ MPIDIG_WIN(win, targets) = targets; ++ ++ win->errhandler = NULL; ++ win->base = NULL; ++ win->size = length; ++ win->disp_unit = disp_unit; ++ win->create_flavor = create_flavor; ++ win->model = model; ++ win->copyCreateFlavor = 0; ++ win->copyModel = 0; ++ win->attributes = NULL; ++ win->comm_ptr = win_comm_ptr; ++ win->copyDispUnit = 0; ++ win->copySize = 0; ++ MPIDIG_WIN(win, shared_table) = NULL; ++ MPIDIG_WIN(win, sync).assert_mode = 0; ++ MPIDIG_WIN(win, shm_allocated) = 0; ++ ++ /* Initialize the info (hint) flags per window */ ++ MPIDIG_WIN(win, info_args).no_locks = 0; ++ MPIDIG_WIN(win, info_args).accumulate_ordering = (MPIDIG_ACCU_ORDER_RAR | ++ MPIDIG_ACCU_ORDER_RAW | ++ MPIDIG_ACCU_ORDER_WAR | ++ MPIDIG_ACCU_ORDER_WAW); ++ MPIDIG_WIN(win, info_args).accumulate_ops = MPIDIG_ACCU_SAME_OP_NO_OP; ++ MPIDIG_WIN(win, info_args).same_size = 0; ++ MPIDIG_WIN(win, info_args).same_disp_unit = 0; ++ MPIDIG_WIN(win, info_args).alloc_shared_noncontig = 0; ++ if (win->create_flavor == MPI_WIN_FLAVOR_ALLOCATE ++ || win->create_flavor == MPI_WIN_FLAVOR_SHARED) { ++ MPIDIG_WIN(win, info_args).alloc_shm = 1; ++ } else { ++ MPIDIG_WIN(win, info_args).alloc_shm = 0; ++ } ++ ++ /* default any op */ ++ MPIDIG_WIN(win, info_args).which_accumulate_ops = 0; ++ for (op_shift = MPIDIG_ACCU_OP_SHIFT_FIRST; op_shift < MPIDIG_ACCU_OP_SHIFT_LAST; op_shift++) ++ MPIDIG_WIN(win, info_args).which_accumulate_ops |= (1 << op_shift); ++ MPIDIG_WIN(win, info_args).accumulate_noncontig_dtype = true; ++ MPIDIG_WIN(win, info_args).accumulate_max_bytes = -1; ++ MPIDIG_WIN(win, info_args).disable_shm_accumulate = false; ++ ++ if ((info != NULL) && ((int *) info != (int *) MPI_INFO_NULL)) { ++ mpi_errno = win_set_info(win, info, TRUE /* is_init */); ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ ++ MPIDIG_WIN(win, mmap_sz) = 0; ++ MPIDIG_WIN(win, mmap_addr) = NULL; ++ ++ MPIR_cc_set(&MPIDIG_WIN(win, local_cmpl_cnts), 0); ++ MPIR_cc_set(&MPIDIG_WIN(win, remote_cmpl_cnts), 0); ++ MPIR_cc_set(&MPIDIG_WIN(win, remote_acc_cmpl_cnts), 0); ++ ++ MPIDIG_WIN(win, win_id) = MPIDIG_generate_win_id(comm_ptr); ++ MPIDIU_map_set(MPIDI_global.win_map, MPIDIG_WIN(win, win_id), win, MPL_MEM_RMA); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_MPIDIG_WIN_INIT); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int win_finalize(MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int all_completed = 0; ++ MPIR_Win *win = *win_ptr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_FINALIZE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_FINALIZE); ++ ++ /* All local outstanding OPs should have been completed. */ ++ MPIR_Assert(MPIR_cc_get(MPIDIG_WIN(win, local_cmpl_cnts)) == 0); ++ MPIR_Assert(MPIR_cc_get(MPIDIG_WIN(win, remote_cmpl_cnts)) == 0); ++ ++ /* Make progress till all OPs have been completed */ ++ do { ++ int all_local_completed = 0, all_remote_completed = 0; ++ ++ MPIDIU_PROGRESS(); ++ ++ MPIDIG_win_check_all_targets_local_completed(win, &all_local_completed); ++ MPIDIG_win_check_all_targets_remote_completed(win, &all_remote_completed); ++ ++ /* Local completion counter might be updated later than remote completion ++ * (at request completion), so we need to check it before release entire ++ * window. */ ++ all_completed = (MPIR_cc_get(MPIDIG_WIN(win, local_cmpl_cnts)) == 0) && ++ (MPIR_cc_get(MPIDIG_WIN(win, remote_cmpl_cnts)) == 0) && ++ all_local_completed && all_remote_completed; ++ } while (all_completed != 1); ++ ++ mpi_errno = MPIDI_NM_mpi_win_free_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_win_free_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ MPIDIG_win_target_cleanall(win); ++ MPIDIG_win_hash_clear(win); ++ ++ if (win->create_flavor == MPI_WIN_FLAVOR_ALLOCATE || ++ win->create_flavor == MPI_WIN_FLAVOR_SHARED) { ++ /* if more than one process on a node, we use shared memory by default */ ++ if (win->comm_ptr->node_comm != NULL && MPIDIG_WIN(win, mmap_addr)) { ++ if (MPIDIG_WIN(win, mmap_sz) > 0) { ++ /* destroy shared window memory */ ++ mpi_errno = MPIDIU_destroy_shm_segment(MPIDIG_WIN(win, mmap_sz), ++ &MPIDIG_WIN(win, shm_segment_handle), ++ &MPIDIG_WIN(win, mmap_addr)); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ /* if shared memory allocation fails or zero size window, free the table at allocation. */ ++ MPL_free(MPIDIG_WIN(win, shared_table)); ++ } else if (MPIDIG_WIN(win, mmap_sz) > 0) { ++ /* if single process on the node, we use mmap with symm heap */ ++ MPL_munmap(MPIDIG_WIN(win, mmap_addr), MPIDIG_WIN(win, mmap_sz), MPL_MEM_RMA); ++ } else ++ MPL_free(win->base); ++ } ++ ++ MPIDIU_map_erase(MPIDI_global.win_map, MPIDIG_WIN(win, win_id)); ++ ++ MPIR_Comm_release(win->comm_ptr); ++ MPIR_Handle_obj_free(&MPIR_Win_mem, win); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_FINALIZE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++/* Allocate RMA window over shared memory region. Used by both win_allocate ++ * and win_allocate_shared. ++ * ++ * This routine allocates window memory region on each node from shared ++ * memory, and initializes the shared_table structure that stores each ++ * node process's size, disp_unit, and start address for shm RMA operations ++ * and query routine.*/ ++static int win_shm_alloc_impl(MPI_Aint size, int disp_unit, MPIR_Comm * comm_ptr, void **base_ptr, ++ MPIR_Win ** win_ptr, int shm_option) ++{ ++ int i, mpi_errno = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_Win *win = NULL; ++ size_t total_shm_size = 0LL; ++ MPIDIG_win_shared_info_t *shared_table = NULL; ++ MPI_Aint *shm_offsets = NULL; ++ MPIR_Comm *shm_comm_ptr = comm_ptr->node_comm; ++ size_t page_sz = 0, mapsize; ++ bool symheap_mapfail_flag = false, shm_mapfail_flag = false; ++ bool symheap_flag = true, global_symheap_flag = false; ++ ++ MPIR_CHKPMEM_DECL(2); ++ MPIR_CHKLMEM_DECL(1); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_WIN_SHM_ALLOC_IMPL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_WIN_SHM_ALLOC_IMPL); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ win = *win_ptr; ++ *base_ptr = NULL; ++ ++ /* Check whether multiple processes exist on the local node. If so, ++ * we need to count the total size on a node for shared memory allocation. */ ++ if (shm_comm_ptr != NULL) { ++ MPIR_T_PVAR_TIMER_START(RMA, rma_wincreate_allgather); ++ MPIR_CHKPMEM_MALLOC(MPIDIG_WIN(win, shared_table), MPIDIG_win_shared_info_t *, ++ sizeof(MPIDIG_win_shared_info_t) * shm_comm_ptr->local_size, ++ mpi_errno, "shared table", MPL_MEM_RMA); ++ shared_table = MPIDIG_WIN(win, shared_table); ++ shared_table[shm_comm_ptr->rank].size = size; ++ shared_table[shm_comm_ptr->rank].disp_unit = disp_unit; ++ shared_table[shm_comm_ptr->rank].shm_base_addr = NULL; ++ ++ mpi_errno = MPIR_Allgather(MPI_IN_PLACE, ++ 0, ++ MPI_DATATYPE_NULL, ++ shared_table, ++ sizeof(MPIDIG_win_shared_info_t), MPI_BYTE, shm_comm_ptr, ++ &errflag); ++ MPIR_T_PVAR_TIMER_END(RMA, rma_wincreate_allgather); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ MPIR_CHKLMEM_MALLOC(shm_offsets, MPI_Aint *, shm_comm_ptr->local_size * sizeof(MPI_Aint), ++ mpi_errno, "shm offset", MPL_MEM_RMA); ++ ++ /* No allreduce here because this is a shared memory domain ++ * and should be a relatively small number of processes ++ * and a non performance sensitive API. ++ */ ++ for (i = 0; i < shm_comm_ptr->local_size; i++) { ++ shm_offsets[i] = (MPI_Aint) total_shm_size; ++ if (MPIDIG_WIN(win, info_args).alloc_shared_noncontig) ++ total_shm_size += MPIDIU_get_mapsize(shared_table[i].size, &page_sz); ++ else ++ total_shm_size += shared_table[i].size; ++ } ++ ++ /* if all processes give zero size on a single node window, simply return. */ ++ if (total_shm_size == 0 && shm_comm_ptr->local_size == comm_ptr->local_size) ++ goto fn_no_shm; ++ ++ /* if my size is not page aligned and noncontig is disabled, skip global symheap. */ ++ if (size != MPIDIU_get_mapsize(size, &page_sz) && ++ !MPIDIG_WIN(win, info_args).alloc_shared_noncontig) ++ symheap_flag = false; ++ } else ++ total_shm_size = size; ++ ++ /* try global symm heap only when multiple processes exist */ ++ if (comm_ptr->local_size > 1) { ++ /* global symm heap can be successful only when any of the following conditions meet. ++ * Thus, we can skip unnecessary global symm heap retry based on condition check. ++ * - no shared memory node (i.e., single process per node) ++ * - size of each process on the shared memory node is page aligned, ++ * thus all process can be assigned to a page aligned start address. ++ * - user sets alloc_shared_noncontig=true, thus we can internally make ++ * the size aligned on each process. */ ++ mpi_errno = MPIR_Allreduce(&symheap_flag, &global_symheap_flag, 1, MPI_C_BOOL, ++ MPI_LAND, comm_ptr, &errflag); ++ MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); ++ } else ++ global_symheap_flag = false; ++ ++ /* because MPI_shm follows a create & attach mode, we need to set the ++ * size of entire shared memory segment on each node as the size of ++ * each process. */ ++ mapsize = MPIDIU_get_mapsize(total_shm_size, &page_sz); ++ ++ /* first try global symmetric heap segment allocation */ ++ if (global_symheap_flag) { ++ MPIDIG_WIN(win, mmap_sz) = mapsize; ++ mpi_errno = MPIDIU_get_shm_symheap(mapsize, shm_offsets, comm_ptr, ++ win, &symheap_mapfail_flag); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ if (symheap_mapfail_flag) { ++ MPIDIG_WIN(win, mmap_sz) = 0; ++ MPIDIG_WIN(win, mmap_addr) = NULL; ++ } ++ } ++ ++ /* if symmetric heap is disabled or fails, try normal shm segment allocation */ ++ if (!global_symheap_flag || symheap_mapfail_flag) { ++ if (shm_comm_ptr != NULL && mapsize) { ++ MPIDIG_WIN(win, mmap_sz) = mapsize; ++ mpi_errno = MPIDIU_allocate_shm_segment(shm_comm_ptr, mapsize, ++ &MPIDIG_WIN(win, shm_segment_handle), ++ &MPIDIG_WIN(win, mmap_addr), &shm_mapfail_flag); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ if (shm_mapfail_flag) { ++ MPIDIG_WIN(win, mmap_sz) = 0; ++ MPIDIG_WIN(win, mmap_addr) = NULL; ++ } ++ ++ /* throw error here if shm allocation is required but fails */ ++ if (shm_option == SHM_WIN_REQUIRED) ++ MPIR_ERR_CHKANDJUMP(shm_mapfail_flag, mpi_errno, MPI_ERR_OTHER, "**alloc_shar_mem"); ++ } ++ ++ /* If only single process on a node or shm segment allocation fails, try malloc. */ ++ if ((shm_comm_ptr == NULL || shm_mapfail_flag) && size > 0) { ++ MPIR_CHKPMEM_MALLOC(*base_ptr, void *, size, mpi_errno, "(*win_ptr)->base", ++ MPL_MEM_RMA); ++ MPL_VG_MEM_INIT(*base_ptr, size); ++ } ++ } ++ ++ /* compute the base addresses of each process within the shared memory segment */ ++ if (shm_comm_ptr != NULL && MPIDIG_WIN(win, mmap_addr)) { ++ char *cur_base = (char *) MPIDIG_WIN(win, mmap_addr); ++ for (i = 0; i < shm_comm_ptr->local_size; i++) { ++ if (shared_table[i].size) ++ shared_table[i].shm_base_addr = cur_base; ++ else ++ shared_table[i].shm_base_addr = NULL; ++ ++ if (MPIDIG_WIN(win, info_args).alloc_shared_noncontig) ++ cur_base += MPIDIU_get_mapsize(shared_table[i].size, &page_sz); ++ else ++ cur_base += shared_table[i].size; ++ } ++ ++ *base_ptr = shared_table[shm_comm_ptr->rank].shm_base_addr; ++ } else if (MPIDIG_WIN(win, mmap_sz) > 0) { ++ /* if symm heap is allocated without shared memory, use the mapping address */ ++ *base_ptr = MPIDIG_WIN(win, mmap_addr); ++ } ++ /* otherwise, it has already be assigned with a local memory region or NULL (zero size). */ ++ ++ fn_no_shm: ++ /* free shared_table if no shm segment allocated */ ++ if (shared_table && !MPIDIG_WIN(win, mmap_addr)) { ++ MPL_free(MPIDIG_WIN(win, shared_table)); ++ MPIDIG_WIN(win, shared_table) = NULL; ++ } ++ ++ fn_exit: ++ MPIR_CHKLMEM_FREEALL(); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_WIN_SHM_ALLOC_IMPL); ++ return mpi_errno; ++ fn_fail: ++ MPIR_CHKPMEM_REAP(); ++ goto fn_exit; ++} ++ ++int MPIDIG_RMA_Init_sync_pvars(void) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ /* rma_winlock_getlocallock */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_winlock_getlocallock, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "WIN_LOCK:Get local lock (in seconds)"); ++ ++ /* rma_wincreate_allgather */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_wincreate_allgather, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "WIN_CREATE:Allgather (in seconds)"); ++ ++ /* rma_amhdr_set */ ++ MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, ++ MPI_DOUBLE, ++ rma_amhdr_set, ++ MPI_T_VERBOSITY_MPIDEV_DETAIL, ++ MPI_T_BIND_NO_OBJECT, ++ MPIR_T_PVAR_FLAG_READONLY, ++ "RMA", "Set fields in AM Handler (in seconds)"); ++ ++ return mpi_errno; ++} ++ ++int MPIDIG_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_SET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_SET_INFO); ++ ++ mpi_errno = win_set_info(win, info, FALSE /* is_init */); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = MPIR_Barrier(win->comm_ptr, &errflag); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_SET_INFO); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_GET_INFO); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_GET_INFO); ++ ++ mpi_errno = MPIR_Info_alloc(info_p_p); ++ if (MPI_SUCCESS != mpi_errno) { ++ *info_p_p = NULL; ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ if (MPIDIG_WIN(win, info_args).no_locks) ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "no_locks", "true"); ++ else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "no_locks", "false"); ++ ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ { ++#define BUFSIZE 32 ++ char buf[BUFSIZE]; ++ int c = 0; ++ ++ MPL_COMPILE_TIME_ASSERT(BUFSIZE >= 16); /* maximum: strlen("rar,raw,war,waw") + 1 */ ++ ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_RAR) ++ c += snprintf(buf, BUFSIZE, "rar"); ++ ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_RAW) ++ c += snprintf(buf + c, BUFSIZE - c, "%sraw", (c > 0) ? "," : ""); ++ ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_WAR) ++ c += snprintf(buf + c, BUFSIZE - c, "%swar", (c > 0) ? "," : ""); ++ ++ if (MPIDIG_WIN(win, info_args).accumulate_ordering & MPIDIG_ACCU_ORDER_WAW) ++ c += snprintf(buf + c, BUFSIZE - c, "%swaw", (c > 0) ? "," : ""); ++ ++ if (c == 0) { ++ strncpy(buf, "none", BUFSIZE); ++ } ++ ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_ordering", buf); ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++#undef BUFSIZE ++ } ++ ++ if (MPIDIG_WIN(win, info_args).accumulate_ops == MPIDIG_ACCU_SAME_OP) ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_ops", "same_op"); ++ else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_ops", "same_op_no_op"); ++ ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIDIG_WIN(win, info_args).alloc_shared_noncontig) ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "alloc_shared_noncontig", "true"); ++ else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "alloc_shared_noncontig", "false"); ++ ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIDIG_WIN(win, info_args).same_size) ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "same_size", "true"); ++ else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "same_size", "false"); ++ ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIDIG_WIN(win, info_args).same_disp_unit) ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "same_disp_unit", "true"); ++ else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "same_disp_unit", "false"); ++ ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIDIG_WIN(win, info_args).alloc_shm) ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "alloc_shm", "true"); ++ else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "alloc_shm", "false"); ++ ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ { /* Keep buf as a local variable for which_accumulate_ops key. */ ++ char buf[128]; ++ get_info_accu_ops_str(MPIDIG_WIN(win, info_args).which_accumulate_ops, &buf[0], ++ sizeof(buf)); ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "which_accumulate_ops", buf); ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ } ++ ++ if (MPIDIG_WIN(win, info_args).accumulate_noncontig_dtype) ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_noncontig_dtype", "true"); ++ else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_noncontig_dtype", "false"); ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIDIG_WIN(win, info_args).accumulate_max_bytes >= 0) { ++ char buf[32]; /* make sure 64-bit integer can fit */ ++ snprintf(buf, sizeof(buf), "%ld", (long) MPIDIG_WIN(win, info_args).accumulate_max_bytes); ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_max_bytes", buf); ++ } else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_max_bytes", "unlimited"); ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (MPIDIG_WIN(win, info_args).disable_shm_accumulate) ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "disable_shm_accumulate", "true"); ++ else ++ mpi_errno = MPIR_Info_set_impl(*info_p_p, "disable_shm_accumulate", "false"); ++ if (MPI_SUCCESS != mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_GET_INFO); ++ return mpi_errno; ++ fn_fail: ++ if (*info_p_p != NULL) { ++ MPIR_Info_free(*info_p_p); ++ *info_p_p = NULL; ++ } ++ goto fn_exit; ++} ++ ++int MPIDIG_mpi_win_free(MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_Win *win = *win_ptr; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_FREE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_FREE); ++ ++ MPIDIG_ACCESS_EPOCH_CHECK_NONE(win, mpi_errno, return mpi_errno); ++ MPIDIG_EXPOSURE_EPOCH_CHECK_NONE(win, mpi_errno, return mpi_errno); ++ ++ mpi_errno = MPIR_Barrier(win->comm_ptr, &errflag); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ win_finalize(win_ptr); ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_FREE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_Win *win; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_CREATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_CREATE); ++ ++ mpi_errno = win_init(length, disp_unit, win_ptr, info, comm_ptr, MPI_WIN_FLAVOR_CREATE, ++ MPI_WIN_UNIFIED); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ win = *win_ptr; ++ win->base = base; ++ ++ mpi_errno = MPIDI_NM_mpi_win_create_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_win_create_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ mpi_errno = MPIR_Barrier(win->comm_ptr, &errflag); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_CREATE); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_ATTACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_ATTACH); ++ ++ MPIR_ERR_CHKANDSTMT((win->create_flavor != MPI_WIN_FLAVOR_DYNAMIC), mpi_errno, ++ MPI_ERR_RMA_FLAVOR, goto fn_fail, "**rmaflavor"); ++ ++ mpi_errno = MPIDI_NM_mpi_win_attach_hook(win, base, size); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_win_attach_hook(win, base, size); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_ATTACH); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_Win *win = NULL; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_ALLOCATE_SHARED); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_ALLOCATE_SHARED); ++ ++ mpi_errno = win_init(size, disp_unit, win_ptr, info_ptr, comm_ptr, MPI_WIN_FLAVOR_SHARED, ++ MPI_WIN_UNIFIED); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++ mpi_errno = win_shm_alloc_impl(size, disp_unit, comm_ptr, base_ptr, win_ptr, SHM_WIN_REQUIRED); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++ win = *win_ptr; ++ win->base = *base_ptr; ++ win->size = size; ++ ++ mpi_errno = MPIDI_NM_mpi_win_allocate_shared_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_win_allocate_shared_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ mpi_errno = MPIR_Barrier(comm_ptr, &errflag); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_ALLOCATE_SHARED); ++ return mpi_errno; ++ fn_fail: ++ if (win_ptr) ++ win_finalize(win_ptr); ++ goto fn_exit; ++} ++ ++int MPIDIG_mpi_win_detach(MPIR_Win * win, const void *base) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_DETACH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_DETACH); ++ MPIR_ERR_CHKANDSTMT((win->create_flavor != MPI_WIN_FLAVOR_DYNAMIC), mpi_errno, ++ MPI_ERR_RMA_FLAVOR, goto fn_fail, "**rmaflavor"); ++ ++ mpi_errno = MPIDI_NM_mpi_win_detach_hook(win, base); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_win_detach_hook(win, base); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_DETACH); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} ++ ++int MPIDIG_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, MPIR_Comm * comm, ++ void *baseptr, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ MPIR_Win *win; ++ void **base_ptr = (void **) baseptr; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_ALLOCATE); ++ ++ mpi_errno = win_init(size, disp_unit, win_ptr, info, comm, MPI_WIN_FLAVOR_ALLOCATE, ++ MPI_WIN_UNIFIED); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ mpi_errno = win_shm_alloc_impl(size, disp_unit, comm, base_ptr, win_ptr, SHM_WIN_OPTIONAL); ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ win = *win_ptr; ++ win->base = *(void **) baseptr; ++ win->size = size; ++ ++ mpi_errno = MPIDI_NM_mpi_win_allocate_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_win_allocate_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ mpi_errno = MPIR_Barrier(comm, &errflag); ++ ++ if (mpi_errno != MPI_SUCCESS) ++ goto fn_fail; ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_ALLOCATE); ++ return mpi_errno; ++ fn_fail: ++ if (win_ptr) ++ win_finalize(win_ptr); ++ goto fn_exit; ++} ++ ++int MPIDIG_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win_ptr) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int rc = MPI_SUCCESS; ++ MPIR_Errflag_t errflag = MPIR_ERR_NONE; ++ ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_CREATE_DYNAMIC); ++ ++ MPIR_Win *win; ++ ++ rc = win_init(0, 1, win_ptr, info, comm, MPI_WIN_FLAVOR_DYNAMIC, MPI_WIN_UNIFIED); ++ ++ if (rc != MPI_SUCCESS) ++ goto fn_fail; ++ ++ win = *win_ptr; ++ win->base = MPI_BOTTOM; ++ ++ mpi_errno = MPIDI_NM_mpi_win_create_dynamic_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++ ++#ifndef MPIDI_CH4_DIRECT_NETMOD ++ mpi_errno = MPIDI_SHM_mpi_win_create_dynamic_hook(win); ++ if (mpi_errno != MPI_SUCCESS) ++ MPIR_ERR_POP(mpi_errno); ++#endif ++ ++ mpi_errno = MPIR_Barrier(comm, &errflag); ++ ++ fn_exit: ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_CREATE_DYNAMIC); ++ return mpi_errno; ++ fn_fail: ++ goto fn_exit; ++} +--- a/src/mpid/ch4/src/ch4r_win.h ++++ b/src/mpid/ch4/src/ch4r_win.h +@@ -11,15 +11,7 @@ + #ifndef CH4R_WIN_H_INCLUDED + #define CH4R_WIN_H_INCLUDED + +-#include "ch4_impl.h" +-#include "ch4i_util.h" +-#include +-#include "mpir_info.h" +-#include "ch4r_symheap.h" +-#include "uthash.h" +-#ifdef HAVE_SYS_MMAN_H +-#include +-#endif /* HAVE_SYS_MMAN_H */ ++#include "ch4_types.h" + + /* + === BEGIN_MPI_T_CVAR_INFO_BLOCK === +@@ -45,411 +37,29 @@ extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_winlock_getlocallock ATTRIBUTE((unused + extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather ATTRIBUTE((unused)); + extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_amhdr_set ATTRIBUTE((unused)); + +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_parse_info_accu_ops_str(const char *str, +- uint32_t * ops_ptr) +-{ +- uint32_t ops = 0; +- char *value, *token, *savePtr = NULL; +- +- value = (char *) str; +- /* str can never be NULL. */ +- MPIR_Assert(value); +- +- /* handle special value */ +- if (!strncmp(value, "none", strlen("none"))) { +- *ops_ptr = 0; +- return; +- } else if (!strncmp(value, "any_op", strlen("any_op"))) { +- MPIDI_CH4U_win_info_accu_op_shift_t op_shift; +- /* add all ops */ +- for (op_shift = 0; op_shift < MPIDI_CH4I_ACCU_OP_SHIFT_LAST; op_shift++) +- ops |= (1 << op_shift); +- *ops_ptr = ops; +- return; +- } +- +- token = (char *) strtok_r(value, ",", &savePtr); +- while (token != NULL) { +- +- /* traverse op list (exclude null and last) and add the op if set */ +- if (!strncmp(token, "max", strlen("max"))) +- ops |= (1 << MPIDI_CH4I_ACCU_MAX_SHIFT); +- else if (!strncmp(token, "min", strlen("min"))) +- ops |= (1 << MPIDI_CH4I_ACCU_MIN_SHIFT); +- else if (!strncmp(token, "sum", strlen("sum"))) +- ops |= (1 << MPIDI_CH4I_ACCU_SUM_SHIFT); +- else if (!strncmp(token, "prod", strlen("prod"))) +- ops |= (1 << MPIDI_CH4I_ACCU_PROD_SHIFT); +- else if (!strncmp(token, "maxloc", strlen("maxloc"))) +- ops |= (1 << MPIDI_CH4I_ACCU_MAXLOC_SHIFT); +- else if (!strncmp(token, "minloc", strlen("minloc"))) +- ops |= (1 << MPIDI_CH4I_ACCU_MINLOC_SHIFT); +- else if (!strncmp(token, "band", strlen("band"))) +- ops |= (1 << MPIDI_CH4I_ACCU_BAND_SHIFT); +- else if (!strncmp(token, "bor", strlen("bor"))) +- ops |= (1 << MPIDI_CH4I_ACCU_BOR_SHIFT); +- else if (!strncmp(token, "bxor", strlen("bxor"))) +- ops |= (1 << MPIDI_CH4I_ACCU_BXOR_SHIFT); +- else if (!strncmp(token, "land", strlen("land"))) +- ops |= (1 << MPIDI_CH4I_ACCU_LAND_SHIFT); +- else if (!strncmp(token, "lor", strlen("lor"))) +- ops |= (1 << MPIDI_CH4I_ACCU_LOR_SHIFT); +- else if (!strncmp(token, "lxor", strlen("lxor"))) +- ops |= (1 << MPIDI_CH4I_ACCU_LXOR_SHIFT); +- else if (!strncmp(token, "replace", strlen("replace"))) +- ops |= (1 << MPIDI_CH4I_ACCU_REPLACE_SHIFT); +- else if (!strncmp(token, "no_op", strlen("no_op"))) +- ops |= (1 << MPIDI_CH4I_ACCU_NO_OP_SHIFT); +- else if (!strncmp(token, "cswap", strlen("cswap")) || +- !strncmp(token, "compare_and_swap", strlen("compare_and_swap"))) +- ops |= (1 << MPIDI_CH4I_ACCU_CSWAP_SHIFT); +- +- token = (char *) strtok_r(NULL, ",", &savePtr); +- } +- +- /* update info only when any valid value is set */ +- if (ops) +- *ops_ptr = ops; +-} +- +-MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_get_info_accu_ops_str(uint32_t val, char *buf, +- size_t maxlen) +-{ +- int c = 0; +- +- MPIR_Assert(maxlen >= strlen("max,min,sum,prod,maxloc,minloc,band,bor," +- "bxor,land,lor,lxor,replace,no_op,cswap") + 1); +- +- if (val & (1 << MPIDI_CH4I_ACCU_MAX_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "max"); +- if (val & (1 << MPIDI_CH4I_ACCU_MIN_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%smin", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_SUM_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%ssum", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_PROD_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%sprod", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_MAXLOC_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%smaxloc", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_MINLOC_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%sminloc", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_BAND_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%sband", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_BOR_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%sbor", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_BXOR_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%sbxor", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_LAND_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%sland", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_LOR_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%slor", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_LXOR_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%slxor", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_REPLACE_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%sreplace", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_NO_OP_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%sno_op", (c > 0) ? "," : ""); +- if (val & (1 << MPIDI_CH4I_ACCU_CSWAP_SHIFT)) +- c += snprintf(buf + c, maxlen - c, "%scswap", (c > 0) ? "," : ""); +- +- if (c == 0) +- strncpy(buf, "none", maxlen); +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4_RMA_Init_sync_pvars +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_RMA_Init_sync_pvars(void) +-{ +- int mpi_errno = MPI_SUCCESS; +- /* rma_winlock_getlocallock */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_winlock_getlocallock, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "WIN_LOCK:Get local lock (in seconds)"); +- +- /* rma_wincreate_allgather */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_wincreate_allgather, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "WIN_CREATE:Allgather (in seconds)"); +- +- /* rma_amhdr_set */ +- MPIR_T_PVAR_TIMER_REGISTER_STATIC(RMA, +- MPI_DOUBLE, +- rma_amhdr_set, +- MPI_T_VERBOSITY_MPIDEV_DETAIL, +- MPI_T_BIND_NO_OBJECT, +- MPIR_T_PVAR_FLAG_READONLY, +- "RMA", "Set fields in AM Handler (in seconds)"); +- +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4I_win_set_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-MPL_STATIC_INLINE_PREFIX int MPIDI_CH4I_win_set_info(MPIR_Win * win, MPIR_Info * info, bool is_init) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_WIN_SET_INFO); +- +- MPIR_Info *curr_ptr; +- char *value, *token, *savePtr = NULL; +- int save_ordering; +- +- curr_ptr = info->next; +- +- while (curr_ptr) { +- if (!strcmp(curr_ptr->key, "no_locks")) { +- if (!strcmp(curr_ptr->value, "true")) +- MPIDI_CH4U_WIN(win, info_args).no_locks = 1; +- else if (!strcmp(curr_ptr->value, "false")) +- MPIDI_CH4U_WIN(win, info_args).no_locks = 0; +- } else if (!strcmp(curr_ptr->key, "accumulate_ordering")) { +- save_ordering = MPIDI_CH4U_WIN(win, info_args).accumulate_ordering; +- MPIDI_CH4U_WIN(win, info_args).accumulate_ordering = 0; +- if (!strcmp(curr_ptr->value, "none")) { +- /* For MPI-3, "none" means no ordering and is not default. */ +- goto next; +- } +- +- /* value can never be NULL. */ +- MPIR_Assert(curr_ptr->value); +- +- value = curr_ptr->value; +- token = (char *) strtok_r(value, ",", &savePtr); +- +- while (token) { +- if (!memcmp(token, "rar", 3)) +- MPIDI_CH4U_WIN(win, info_args).accumulate_ordering = +- (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering | +- MPIDI_CH4I_ACCU_ORDER_RAR); +- else if (!memcmp(token, "raw", 3)) +- MPIDI_CH4U_WIN(win, info_args).accumulate_ordering = +- (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering | +- MPIDI_CH4I_ACCU_ORDER_RAW); +- else if (!memcmp(token, "war", 3)) +- MPIDI_CH4U_WIN(win, info_args).accumulate_ordering = +- (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering | +- MPIDI_CH4I_ACCU_ORDER_WAR); +- else if (!memcmp(token, "waw", 3)) +- MPIDI_CH4U_WIN(win, info_args).accumulate_ordering = +- (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering | +- MPIDI_CH4I_ACCU_ORDER_WAW); +- else +- MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_ARG, goto fn_fail, "**info"); +- +- token = (char *) strtok_r(NULL, ",", &savePtr); +- } +- +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering == 0) +- MPIDI_CH4U_WIN(win, info_args).accumulate_ordering = save_ordering; +- } else if (!strcmp(curr_ptr->key, "accumulate_ops")) { +- if (!strcmp(curr_ptr->value, "same_op")) +- MPIDI_CH4U_WIN(win, info_args).accumulate_ops = MPIDI_CH4I_ACCU_SAME_OP; +- else if (!strcmp(curr_ptr->value, "same_op_no_op")) +- MPIDI_CH4U_WIN(win, info_args).accumulate_ops = MPIDI_CH4I_ACCU_SAME_OP_NO_OP; +- } else if (!strcmp(curr_ptr->key, "same_disp_unit")) { +- if (!strcmp(curr_ptr->value, "true")) +- MPIDI_CH4U_WIN(win, info_args).same_disp_unit = 1; +- else if (!strcmp(curr_ptr->value, "false")) +- MPIDI_CH4U_WIN(win, info_args).same_disp_unit = 0; +- } else if (!strcmp(curr_ptr->key, "same_size")) { +- if (!strcmp(curr_ptr->value, "true")) +- MPIDI_CH4U_WIN(win, info_args).same_size = 1; +- else if (!strcmp(curr_ptr->value, "false")) +- MPIDI_CH4U_WIN(win, info_args).same_size = 0; +- } else if (!strcmp(curr_ptr->key, "alloc_shared_noncontig")) { +- if (!strcmp(curr_ptr->value, "true")) +- MPIDI_CH4U_WIN(win, info_args).alloc_shared_noncontig = 1; +- else if (!strcmp(curr_ptr->value, "false")) +- MPIDI_CH4U_WIN(win, info_args).alloc_shared_noncontig = 0; +- } else if (!strcmp(curr_ptr->key, "alloc_shm")) { +- if (!strcmp(curr_ptr->value, "true")) +- MPIDI_CH4U_WIN(win, info_args).alloc_shm = 1; +- else if (!strcmp(curr_ptr->value, "false")) +- MPIDI_CH4U_WIN(win, info_args).alloc_shm = 0; +- } +- /* We allow the user to set the following atomics hint only at window init time, +- * all future updates by win_set_info are ignored. This is because we do not +- * have a good way to ensure all outstanding atomic ops have been completed +- * on all processes especially in passive-target epochs. */ +- else if (is_init && !strcmp(curr_ptr->key, "which_accumulate_ops")) { +- MPIDI_CH4I_parse_info_accu_ops_str(curr_ptr->value, +- &MPIDI_CH4U_WIN(win, +- info_args).which_accumulate_ops); +- } else if (is_init && !strcmp(curr_ptr->key, "accumulate_noncontig_dtype")) { +- if (!strcmp(curr_ptr->value, "true")) +- MPIDI_CH4U_WIN(win, info_args).accumulate_noncontig_dtype = true; +- else if (!strcmp(curr_ptr->value, "false")) +- MPIDI_CH4U_WIN(win, info_args).accumulate_noncontig_dtype = false; +- } else if (is_init && !strcmp(curr_ptr->key, "accumulate_max_bytes")) { +- if (!strcmp(curr_ptr->value, "unlimited") || !strcmp(curr_ptr->value, "-1")) +- MPIDI_CH4U_WIN(win, info_args).accumulate_max_bytes = -1; +- else { +- long max_bytes = atol(curr_ptr->value); +- if (max_bytes >= 0) +- MPIDI_CH4U_WIN(win, info_args).accumulate_max_bytes = max_bytes; +- } +- } else if (is_init && !strcmp(curr_ptr->key, "disable_shm_accumulate")) { +- if (!strcmp(curr_ptr->value, "true")) +- MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate = true; +- else +- MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate = false; +- } +- next: +- curr_ptr = curr_ptr->next; +- } +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_WIN_SET_INFO); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_set_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_SET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_SET_INFO); +- +- mpi_errno = MPIDI_CH4I_win_set_info(win, info, FALSE /* is_init */); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIR_Barrier(win->comm_ptr, &errflag); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_SET_INFO); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_win_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_win_init(MPI_Aint length, +- int disp_unit, +- MPIR_Win ** win_ptr, +- MPIR_Info * info, +- MPIR_Comm * comm_ptr, int create_flavor, int model) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Win *win = (MPIR_Win *) MPIR_Handle_obj_alloc(&MPIR_Win_mem); +- MPIDI_CH4U_win_target_t *targets = NULL; +- MPIR_Comm *win_comm_ptr; +- MPIDI_CH4U_win_info_accu_op_shift_t op_shift; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_WIN_INIT); +- MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_MPIDI_CH4R_WIN_INIT); +- +- MPIR_ERR_CHKANDSTMT(win == NULL, mpi_errno, MPI_ERR_NO_MEM, goto fn_fail, "**nomem"); +- *win_ptr = win; +- +- memset(&win->dev.ch4u, 0, sizeof(MPIDI_CH4U_win_t)); +- +- /* Duplicate the original communicator here to avoid having collisions +- * between internal collectives */ +- mpi_errno = MPIR_Comm_dup_impl(comm_ptr, &win_comm_ptr); +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- MPIDI_CH4U_WIN(win, targets) = targets; +- +- win->errhandler = NULL; +- win->base = NULL; +- win->size = length; +- win->disp_unit = disp_unit; +- win->create_flavor = (MPIR_Win_flavor_t) create_flavor; +- win->model = (MPIR_Win_model_t) model; +- win->copyCreateFlavor = (MPIR_Win_flavor_t) 0; +- win->copyModel = (MPIR_Win_model_t) 0; +- win->attributes = NULL; +- win->comm_ptr = win_comm_ptr; +- win->copyDispUnit = 0; +- win->copySize = 0; +- MPIDI_CH4U_WIN(win, shared_table) = NULL; +- MPIDI_CH4U_WIN(win, sync).assert_mode = 0; +- MPIDI_CH4U_WIN(win, shm_allocated) = 0; +- +- /* Initialize the info (hint) flags per window */ +- MPIDI_CH4U_WIN(win, info_args).no_locks = 0; +- MPIDI_CH4U_WIN(win, info_args).accumulate_ordering = (MPIDI_CH4I_ACCU_ORDER_RAR | +- MPIDI_CH4I_ACCU_ORDER_RAW | +- MPIDI_CH4I_ACCU_ORDER_WAR | +- MPIDI_CH4I_ACCU_ORDER_WAW); +- MPIDI_CH4U_WIN(win, info_args).accumulate_ops = MPIDI_CH4I_ACCU_SAME_OP_NO_OP; +- MPIDI_CH4U_WIN(win, info_args).same_size = 0; +- MPIDI_CH4U_WIN(win, info_args).same_disp_unit = 0; +- MPIDI_CH4U_WIN(win, info_args).alloc_shared_noncontig = 0; +- if (win->create_flavor == MPI_WIN_FLAVOR_ALLOCATE +- || win->create_flavor == MPI_WIN_FLAVOR_SHARED) { +- MPIDI_CH4U_WIN(win, info_args).alloc_shm = 1; +- } else { +- MPIDI_CH4U_WIN(win, info_args).alloc_shm = 0; +- } +- +- /* default any op */ +- MPIDI_CH4U_WIN(win, info_args).which_accumulate_ops = 0; +- for (op_shift = 0; op_shift < MPIDI_CH4I_ACCU_OP_SHIFT_LAST; op_shift++) +- MPIDI_CH4U_WIN(win, info_args).which_accumulate_ops |= (1 << op_shift); +- MPIDI_CH4U_WIN(win, info_args).accumulate_noncontig_dtype = true; +- MPIDI_CH4U_WIN(win, info_args).accumulate_max_bytes = -1; +- MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate = false; +- +- if ((info != NULL) && ((int *) info != (int *) MPI_INFO_NULL)) { +- mpi_errno = MPIDI_CH4I_win_set_info(win, info, TRUE /* is_init */); +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- +- MPIDI_CH4U_WIN(win, mmap_sz) = 0; +- MPIDI_CH4U_WIN(win, mmap_addr) = NULL; +- +- MPIR_cc_set(&MPIDI_CH4U_WIN(win, local_cmpl_cnts), 0); +- MPIR_cc_set(&MPIDI_CH4U_WIN(win, remote_cmpl_cnts), 0); +- MPIR_cc_set(&MPIDI_CH4U_WIN(win, remote_acc_cmpl_cnts), 0); +- +- MPIDI_CH4U_WIN(win, win_id) = MPIDI_CH4U_generate_win_id(comm_ptr); +- MPIDI_CH4U_map_set(MPIDI_CH4_Global.win_map, MPIDI_CH4U_WIN(win, win_id), win, MPL_MEM_RMA); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_MPIDI_CH4R_WIN_INIT); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4I_fill_ranks_in_win_grp +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4I_fill_ranks_in_win_grp(MPIR_Win * win_ptr, MPIR_Group * group_ptr, +- int *ranks_in_win_grp) ++int MPIDIG_RMA_Init_sync_pvars(void); ++int MPIDIG_mpi_win_set_info(MPIR_Win * win, MPIR_Info * info); ++int MPIDIG_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p); ++int MPIDIG_mpi_win_free(MPIR_Win ** win_ptr); ++int MPIDIG_mpi_win_create(void *base, MPI_Aint length, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr); ++int MPIDIG_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size); ++int MPIDIG_mpi_win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info * info_ptr, ++ MPIR_Comm * comm_ptr, void **base_ptr, MPIR_Win ** win_ptr); ++int MPIDIG_mpi_win_detach(MPIR_Win * win, const void *base); ++int MPIDIG_mpi_win_allocate(MPI_Aint size, int disp_unit, MPIR_Info * info, ++ MPIR_Comm * comm, void *baseptr, MPIR_Win ** win_ptr); ++int MPIDIG_mpi_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win_ptr); ++ ++static inline int MPIDIG_fill_ranks_in_win_grp(MPIR_Win * win_ptr, MPIR_Group * group_ptr, ++ int *ranks_in_win_grp) + { + int mpi_errno = MPI_SUCCESS; + int i, *ranks_in_grp = NULL; + MPIR_Group *win_grp_ptr; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_FILL_RANKS_IN_WIN_GRP); +- MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_MPIDI_CH4I_FILL_RANKS_IN_WIN_GRP); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_FILL_RANKS_IN_WIN_GRP); ++ MPIR_FUNC_VERBOSE_RMA_ENTER(MPID_STATE_MPIDIG_FILL_RANKS_IN_WIN_GRP); + + ranks_in_grp = (int *) MPL_malloc(group_ptr->size * sizeof(int), MPL_MEM_RMA); + MPIR_Assert(ranks_in_grp); +@@ -472,65 +82,57 @@ static inline int MPIDI_CH4I_fill_ranks_in_win_grp(MPIR_Win * win_ptr, MPIR_Grou + fn_exit: + MPL_free(ranks_in_grp); + +- MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_MPIDI_CH4I_FILL_RANKS_IN_WIN_GRP); ++ MPIR_FUNC_VERBOSE_RMA_EXIT(MPID_STATE_MPIDIG_FILL_RANKS_IN_WIN_GRP); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) ++static inline int MPIDIG_mpi_win_start(MPIR_Group * group, int assert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_START); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_START); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_START); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_START); + +- MPIDI_CH4U_ACCESS_EPOCH_CHECK_NONE(win, mpi_errno, goto fn_fail); ++ MPIDIG_ACCESS_EPOCH_CHECK_NONE(win, mpi_errno, goto fn_fail); + + MPIR_Group_add_ref(group); + if (assert & MPI_MODE_NOCHECK) { + goto no_check; + } + +- MPIDI_CH4R_PROGRESS_WHILE(group->size != (int) MPIDI_CH4U_WIN(win, sync).pw.count); ++ MPIDIU_PROGRESS_WHILE(group->size != (int) MPIDIG_WIN(win, sync).pw.count); + no_check: +- MPIDI_CH4U_WIN(win, sync).pw.count = 0; ++ MPIDIG_WIN(win, sync).pw.count = 0; + +- MPIR_ERR_CHKANDJUMP((MPIDI_CH4U_WIN(win, sync).sc.group != NULL), ++ MPIR_ERR_CHKANDJUMP((MPIDIG_WIN(win, sync).sc.group != NULL), + mpi_errno, MPI_ERR_GROUP, "**group"); +- MPIDI_CH4U_WIN(win, sync).sc.group = group; +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_START; ++ MPIDIG_WIN(win, sync).sc.group = group; ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_START; + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_START); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_START); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_complete(MPIR_Win * win) ++static inline int MPIDIG_mpi_win_complete(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_win_cntrl_msg_t msg; ++ MPIDIG_win_cntrl_msg_t msg; + int win_grp_idx, peer; + MPIR_Group *group; + int *ranks_in_win_grp = NULL; + int all_local_completed = 0; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_COMPLETE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_COMPLETE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_COMPLETE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_COMPLETE); + +- MPIDI_CH4U_ACCESS_EPOCH_CHECK(win, MPIDI_CH4U_EPOTYPE_START, mpi_errno, return mpi_errno); ++ MPIDIG_ACCESS_EPOCH_CHECK(win, MPIDIG_EPOTYPE_START, mpi_errno, return mpi_errno); + +- group = MPIDI_CH4U_WIN(win, sync).sc.group; ++ group = MPIDIG_WIN(win, sync).sc.group; + MPIR_Assert(group != NULL); + + /* Ensure op completion in netmod and shmmod */ +@@ -544,38 +146,38 @@ static inline int MPIDI_CH4R_mpi_win_complete(MPIR_Win * win) + MPIR_ERR_POP(mpi_errno); + #endif + +- msg.win_id = MPIDI_CH4U_WIN(win, win_id); ++ msg.win_id = MPIDIG_WIN(win, win_id); + msg.origin_rank = win->comm_ptr->rank; + + /* Ensure completion of AM operations */ + ranks_in_win_grp = (int *) MPL_malloc(sizeof(int) * group->size, MPL_MEM_RMA); + MPIR_Assert(ranks_in_win_grp); + +- mpi_errno = MPIDI_CH4I_fill_ranks_in_win_grp(win, group, ranks_in_win_grp); ++ mpi_errno = MPIDIG_fill_ranks_in_win_grp(win, group, ranks_in_win_grp); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + + /* FIXME: now we simply set per-target counters for PSCW, can it be optimized ? */ + do { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_win_check_group_local_completed(win, ranks_in_win_grp, group->size, +- &all_local_completed); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDIG_win_check_group_local_completed(win, ranks_in_win_grp, group->size, ++ &all_local_completed); + } while (all_local_completed != 1); + + for (win_grp_idx = 0; win_grp_idx < group->size; ++win_grp_idx) { + peer = ranks_in_win_grp[win_grp_idx]; + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(peer, win->comm_ptr)) ++ if (MPIDI_rank_is_local(peer, win->comm_ptr)) + mpi_errno = MPIDI_SHM_am_send_hdr(peer, win->comm_ptr, +- MPIDI_CH4U_WIN_COMPLETE, &msg, sizeof(msg)); ++ MPIDIG_WIN_COMPLETE, &msg, sizeof(msg)); + else + #endif + { + mpi_errno = MPIDI_NM_am_send_hdr(peer, win->comm_ptr, +- MPIDI_CH4U_WIN_COMPLETE, &msg, sizeof(msg)); ++ MPIDIG_WIN_COMPLETE, &msg, sizeof(msg)); + } + + if (mpi_errno != MPI_SUCCESS) +@@ -584,53 +186,49 @@ static inline int MPIDI_CH4R_mpi_win_complete(MPIR_Win * win) + + /* In performance-efficient mode, all allocated targets are freed at win_finalize. */ + if (MPIR_CVAR_CH4_RMA_MEM_EFFICIENT) +- MPIDI_CH4U_win_target_cleanall(win); +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_NONE; +- MPIR_Group_release(MPIDI_CH4U_WIN(win, sync).sc.group); +- MPIDI_CH4U_WIN(win, sync).sc.group = NULL; ++ MPIDIG_win_target_cleanall(win); ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_NONE; ++ MPIR_Group_release(MPIDIG_WIN(win, sync).sc.group); ++ MPIDIG_WIN(win, sync).sc.group = NULL; + + fn_exit: + MPL_free(ranks_in_win_grp); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_COMPLETE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_COMPLETE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_post +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_post(MPIR_Group * group, int assert, MPIR_Win * win) ++static inline int MPIDIG_mpi_win_post(MPIR_Group * group, int assert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +- MPIDI_CH4U_win_cntrl_msg_t msg; ++ MPIDIG_win_cntrl_msg_t msg; + int win_grp_idx, peer; + int *ranks_in_win_grp = NULL; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_POST); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_POST); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_POST); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_POST); + +- MPIDI_CH4U_EXPOSURE_EPOCH_CHECK_NONE(win, mpi_errno, goto fn_fail); ++ MPIDIG_EXPOSURE_EPOCH_CHECK_NONE(win, mpi_errno, goto fn_fail); + + MPIR_Group_add_ref(group); +- MPIR_ERR_CHKANDJUMP((MPIDI_CH4U_WIN(win, sync).pw.group != NULL), ++ MPIR_ERR_CHKANDJUMP((MPIDIG_WIN(win, sync).pw.group != NULL), + mpi_errno, MPI_ERR_GROUP, "**group"); + +- MPIDI_CH4U_WIN(win, sync).pw.group = group; ++ MPIDIG_WIN(win, sync).pw.group = group; + MPIR_Assert(group != NULL); + if (assert & MPI_MODE_NOCHECK) { + goto no_check; + } + +- msg.win_id = MPIDI_CH4U_WIN(win, win_id); ++ msg.win_id = MPIDIG_WIN(win, win_id); + msg.origin_rank = win->comm_ptr->rank; + + ranks_in_win_grp = (int *) MPL_malloc(sizeof(int) * group->size, MPL_MEM_RMA); + MPIR_Assert(ranks_in_win_grp); + +- mpi_errno = MPIDI_CH4I_fill_ranks_in_win_grp(win, group, ranks_in_win_grp); ++ mpi_errno = MPIDIG_fill_ranks_in_win_grp(win, group, ranks_in_win_grp); + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_POP(mpi_errno); + +@@ -638,14 +236,14 @@ static inline int MPIDI_CH4R_mpi_win_post(MPIR_Group * group, int assert, MPIR_W + peer = ranks_in_win_grp[win_grp_idx]; + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(peer, win->comm_ptr)) ++ if (MPIDI_rank_is_local(peer, win->comm_ptr)) + mpi_errno = MPIDI_SHM_am_send_hdr(peer, win->comm_ptr, +- MPIDI_CH4U_WIN_POST, &msg, sizeof(msg)); ++ MPIDIG_WIN_POST, &msg, sizeof(msg)); + else + #endif + { + mpi_errno = MPIDI_NM_am_send_hdr(peer, win->comm_ptr, +- MPIDI_CH4U_WIN_POST, &msg, sizeof(msg)); ++ MPIDIG_WIN_POST, &msg, sizeof(msg)); + } + + if (mpi_errno != MPI_SUCCESS) +@@ -653,100 +251,88 @@ static inline int MPIDI_CH4R_mpi_win_post(MPIR_Group * group, int assert, MPIR_W + } + + no_check: +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type = MPIDI_CH4U_EPOTYPE_POST; ++ MPIDIG_WIN(win, sync).exposure_epoch_type = MPIDIG_EPOTYPE_POST; + fn_exit: + MPL_free(ranks_in_win_grp); + +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_POST); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_POST); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_wait(MPIR_Win * win) ++static inline int MPIDIG_mpi_win_wait(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Group *group; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_WAIT); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_WAIT); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_WAIT); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_WAIT); + +- MPIDI_CH4U_EXPOSURE_EPOCH_CHECK(win, MPIDI_CH4U_EPOTYPE_POST, mpi_errno, goto fn_fail); +- group = MPIDI_CH4U_WIN(win, sync).pw.group; +- MPIDI_CH4R_PROGRESS_WHILE(group->size != (int) MPIDI_CH4U_WIN(win, sync).sc.count); ++ MPIDIG_EXPOSURE_EPOCH_CHECK(win, MPIDIG_EPOTYPE_POST, mpi_errno, goto fn_fail); ++ group = MPIDIG_WIN(win, sync).pw.group; ++ MPIDIU_PROGRESS_WHILE(group->size != (int) MPIDIG_WIN(win, sync).sc.count); + +- MPIDI_CH4U_WIN(win, sync).sc.count = 0; +- MPIDI_CH4U_WIN(win, sync).pw.group = NULL; ++ MPIDIG_WIN(win, sync).sc.count = 0; ++ MPIDIG_WIN(win, sync).pw.group = NULL; + MPIR_Group_release(group); +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type = MPIDI_CH4U_EPOTYPE_NONE; ++ MPIDIG_WIN(win, sync).exposure_epoch_type = MPIDIG_EPOTYPE_NONE; + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_WAIT); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_WAIT); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_test(MPIR_Win * win, int *flag) ++static inline int MPIDIG_mpi_win_test(MPIR_Win * win, int *flag) + { + int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_TEST); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_TEST); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_TEST); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_TEST); + +- MPIDI_CH4U_EXPOSURE_EPOCH_CHECK(win, MPIDI_CH4U_EPOTYPE_POST, mpi_errno, goto fn_fail); ++ MPIDIG_EXPOSURE_EPOCH_CHECK(win, MPIDIG_EPOTYPE_POST, mpi_errno, goto fn_fail); + + MPIR_Group *group; +- group = MPIDI_CH4U_WIN(win, sync).pw.group; ++ group = MPIDIG_WIN(win, sync).pw.group; + +- if (group->size == (int) MPIDI_CH4U_WIN(win, sync).sc.count) { +- MPIDI_CH4U_WIN(win, sync).sc.count = 0; +- MPIDI_CH4U_WIN(win, sync).pw.group = NULL; ++ if (group->size == (int) MPIDIG_WIN(win, sync).sc.count) { ++ MPIDIG_WIN(win, sync).sc.count = 0; ++ MPIDIG_WIN(win, sync).pw.group = NULL; + *flag = 1; + MPIR_Group_release(group); +- MPIDI_CH4U_WIN(win, sync).exposure_epoch_type = MPIDI_CH4U_EPOTYPE_NONE; ++ MPIDIG_WIN(win, sync).exposure_epoch_type = MPIDIG_EPOTYPE_NONE; + } else { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + *flag = 0; + } + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_TEST); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_TEST); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_lock(int lock_type, int rank, int assert, MPIR_Win * win) ++static inline int MPIDIG_mpi_win_lock(int lock_type, int rank, int assert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + unsigned locked; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_LOCK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_LOCK); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_LOCK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_LOCK); + + if (rank == MPI_PROC_NULL) + goto fn_exit0; + +- MPIDI_CH4U_LOCK_EPOCH_CHECK_NONE(win, rank, mpi_errno, goto fn_fail); ++ MPIDIG_LOCK_EPOCH_CHECK_NONE(win, rank, mpi_errno, goto fn_fail); + +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_get(win, rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_get(win, rank); + +- MPIDI_CH4U_win_target_sync_lock_t *slock = &target_ptr->sync.lock; ++ MPIDIG_win_target_sync_lock_t *slock = &target_ptr->sync.lock; + MPIR_Assert(slock->locked == 0); + if (assert & MPI_MODE_NOCHECK) { + target_ptr->sync.assert_mode |= MPI_MODE_NOCHECK; +@@ -754,67 +340,61 @@ static inline int MPIDI_CH4R_mpi_win_lock(int lock_type, int rank, int assert, M + goto no_check; + } + +- MPIDI_CH4U_win_cntrl_msg_t msg; +- msg.win_id = MPIDI_CH4U_WIN(win, win_id); ++ MPIDIG_win_cntrl_msg_t msg; ++ msg.win_id = MPIDIG_WIN(win, win_id); + msg.origin_rank = win->comm_ptr->rank; + msg.lock_type = lock_type; + + locked = slock->locked + 1; + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(rank, win->comm_ptr)) +- mpi_errno = +- MPIDI_SHM_am_send_hdr(rank, win->comm_ptr, MPIDI_CH4U_WIN_LOCK, &msg, sizeof(msg)); ++ if (MPIDI_rank_is_local(rank, win->comm_ptr)) ++ mpi_errno = MPIDI_SHM_am_send_hdr(rank, win->comm_ptr, MPIDIG_WIN_LOCK, &msg, sizeof(msg)); + else + #endif + { +- mpi_errno = +- MPIDI_NM_am_send_hdr(rank, win->comm_ptr, MPIDI_CH4U_WIN_LOCK, &msg, sizeof(msg)); ++ mpi_errno = MPIDI_NM_am_send_hdr(rank, win->comm_ptr, MPIDIG_WIN_LOCK, &msg, sizeof(msg)); + } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync"); + +- MPIDI_CH4R_PROGRESS_WHILE(slock->locked != locked); ++ MPIDIU_PROGRESS_WHILE(slock->locked != locked); + no_check: +- target_ptr->sync.access_epoch_type = MPIDI_CH4U_EPOTYPE_LOCK; ++ target_ptr->sync.access_epoch_type = MPIDIG_EPOTYPE_LOCK; + + fn_exit0: +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_LOCK; +- MPIDI_CH4U_WIN(win, sync).lock.count++; ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_LOCK; ++ MPIDIG_WIN(win, sync).lock.count++; + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_LOCK); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_LOCK); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_unlock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_unlock(int rank, MPIR_Win * win) ++static inline int MPIDIG_mpi_win_unlock(int rank, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + unsigned unlocked; +- MPIDI_CH4U_win_cntrl_msg_t msg; ++ MPIDIG_win_cntrl_msg_t msg; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_UNLOCK); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_UNLOCK); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_UNLOCK); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_UNLOCK); + + /* Check window lock epoch. + * PROC_NULL does not update per-target epoch. */ +- MPIDI_CH4U_ACCESS_EPOCH_CHECK(win, MPIDI_CH4U_EPOTYPE_LOCK, mpi_errno, return mpi_errno); ++ MPIDIG_ACCESS_EPOCH_CHECK(win, MPIDIG_EPOTYPE_LOCK, mpi_errno, return mpi_errno); + if (rank == MPI_PROC_NULL) + goto fn_exit0; + +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, rank); + MPIR_Assert(target_ptr); + + /* Check per-target lock epoch */ +- MPIDI_CH4U_EPOCH_CHECK_TARGET_LOCK(target_ptr, mpi_errno, return mpi_errno); ++ MPIDIG_EPOCH_CHECK_TARGET_LOCK(target_ptr, mpi_errno, return mpi_errno); + +- MPIDI_CH4U_win_target_sync_lock_t *slock = &target_ptr->sync.lock; ++ MPIDIG_win_target_sync_lock_t *slock = &target_ptr->sync.lock; + /* NOTE: lock blocking waits till granted */ + MPIR_Assert(slock->locked == 1); + +@@ -831,9 +411,9 @@ static inline int MPIDI_CH4R_mpi_win_unlock(int rank, MPIR_Win * win) + + /* Ensure completion of AM operations */ + do { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + } while (MPIR_cc_get(target_ptr->remote_cmpl_cnts) != 0); + + if (target_ptr->sync.assert_mode & MPI_MODE_NOCHECK) { +@@ -841,302 +421,54 @@ static inline int MPIDI_CH4R_mpi_win_unlock(int rank, MPIR_Win * win) + goto no_check; + } + +- msg.win_id = MPIDI_CH4U_WIN(win, win_id); ++ msg.win_id = MPIDIG_WIN(win, win_id); + msg.origin_rank = win->comm_ptr->rank; + unlocked = slock->locked - 1; + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(rank, win->comm_ptr)) ++ if (MPIDI_rank_is_local(rank, win->comm_ptr)) + mpi_errno = +- MPIDI_SHM_am_send_hdr(rank, win->comm_ptr, MPIDI_CH4U_WIN_UNLOCK, &msg, sizeof(msg)); ++ MPIDI_SHM_am_send_hdr(rank, win->comm_ptr, MPIDIG_WIN_UNLOCK, &msg, sizeof(msg)); + else + #endif + { +- mpi_errno = +- MPIDI_NM_am_send_hdr(rank, win->comm_ptr, MPIDI_CH4U_WIN_UNLOCK, &msg, sizeof(msg)); ++ mpi_errno = MPIDI_NM_am_send_hdr(rank, win->comm_ptr, MPIDIG_WIN_UNLOCK, &msg, sizeof(msg)); + } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync"); + +- MPIDI_CH4R_PROGRESS_WHILE(slock->locked != unlocked); ++ MPIDIU_PROGRESS_WHILE(slock->locked != unlocked); + no_check: + /* In performance-efficient mode, all allocated targets are freed at win_finalize. */ + if (MPIR_CVAR_CH4_RMA_MEM_EFFICIENT) +- MPIDI_CH4U_win_target_delete(win, target_ptr); ++ MPIDIG_win_target_delete(win, target_ptr); + + fn_exit0: +- MPIR_Assert(MPIDI_CH4U_WIN(win, sync).lock.count > 0); +- MPIDI_CH4U_WIN(win, sync).lock.count--; ++ MPIR_Assert(MPIDIG_WIN(win, sync).lock.count > 0); ++ MPIDIG_WIN(win, sync).lock.count--; + + /* Reset window epoch only when all per-target lock epochs are closed. */ +- if (MPIDI_CH4U_WIN(win, sync).lock.count == 0) { +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_NONE; ++ if (MPIDIG_WIN(win, sync).lock.count == 0) { ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_NONE; + } + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_UNLOCK); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_UNLOCK); + return mpi_errno; + fn_fail: + goto fn_exit; + + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_get_info +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_GET_INFO); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_GET_INFO); +- +- mpi_errno = MPIR_Info_alloc(info_p_p); +- if (MPI_SUCCESS != mpi_errno) { +- *info_p_p = NULL; +- MPIR_ERR_POP(mpi_errno); +- } +- +- if (MPIDI_CH4U_WIN(win, info_args).no_locks) +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "no_locks", "true"); +- else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "no_locks", "false"); +- +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- { +-#define BUFSIZE 32 +- char buf[BUFSIZE]; +- int c = 0; +- +- CH4_COMPILE_TIME_ASSERT(BUFSIZE >= 16); /* maximum: strlen("rar,raw,war,waw") + 1 */ +- +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_RAR) +- c += snprintf(buf, BUFSIZE, "rar"); +- +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_RAW) +- c += snprintf(buf + c, BUFSIZE - c, "%sraw", (c > 0) ? "," : ""); +- +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_WAR) +- c += snprintf(buf + c, BUFSIZE - c, "%swar", (c > 0) ? "," : ""); +- +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering & MPIDI_CH4I_ACCU_ORDER_WAW) +- c += snprintf(buf + c, BUFSIZE - c, "%swaw", (c > 0) ? "," : ""); +- +- if (c == 0) { +- strncpy(buf, "none", BUFSIZE); +- } +- +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_ordering", buf); +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +-#undef BUFSIZE +- } +- +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_ops == MPIDI_CH4I_ACCU_SAME_OP) +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_ops", "same_op"); +- else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_ops", "same_op_no_op"); +- +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIDI_CH4U_WIN(win, info_args).alloc_shared_noncontig) +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "alloc_shared_noncontig", "true"); +- else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "alloc_shared_noncontig", "false"); +- +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIDI_CH4U_WIN(win, info_args).same_size) +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "same_size", "true"); +- else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "same_size", "false"); +- +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIDI_CH4U_WIN(win, info_args).same_disp_unit) +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "same_disp_unit", "true"); +- else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "same_disp_unit", "false"); +- +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIDI_CH4U_WIN(win, info_args).alloc_shm) +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "alloc_shm", "true"); +- else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "alloc_shm", "false"); +- +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- { /* Keep buf as a local variable for which_accumulate_ops key. */ +- char buf[128]; +- MPIDI_CH4I_get_info_accu_ops_str(MPIDI_CH4U_WIN(win, info_args).which_accumulate_ops, +- &buf[0], sizeof(buf)); +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "which_accumulate_ops", buf); +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_noncontig_dtype) +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_noncontig_dtype", "true"); +- else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_noncontig_dtype", "false"); +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIDI_CH4U_WIN(win, info_args).accumulate_max_bytes >= 0) { +- char buf[32]; /* make sure 64-bit integer can fit */ +- snprintf(buf, sizeof(buf), "%ld", +- (long) MPIDI_CH4U_WIN(win, info_args).accumulate_max_bytes); +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_max_bytes", buf); +- } else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "accumulate_max_bytes", "unlimited"); +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- if (MPIDI_CH4U_WIN(win, info_args).disable_shm_accumulate) +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "disable_shm_accumulate", "true"); +- else +- mpi_errno = MPIR_Info_set_impl(*info_p_p, "disable_shm_accumulate", "false"); +- if (MPI_SUCCESS != mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_GET_INFO); +- return mpi_errno; +- fn_fail: +- if (*info_p_p != NULL) { +- MPIR_Info_free(*info_p_p); +- *info_p_p = NULL; +- } +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_win_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_win_finalize(MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- int all_completed = 0; +- MPIR_Win *win = *win_ptr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_WIN_FINALIZE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_WIN_FINALIZE); +- +- /* All local outstanding OPs should have been completed. */ +- MPIR_Assert(MPIR_cc_get(MPIDI_CH4U_WIN(win, local_cmpl_cnts)) == 0); +- MPIR_Assert(MPIR_cc_get(MPIDI_CH4U_WIN(win, remote_cmpl_cnts)) == 0); +- +- /* Make progress till all OPs have been completed */ +- do { +- int all_local_completed = 0, all_remote_completed = 0; +- +- MPIDI_CH4R_PROGRESS(); +- +- MPIDI_win_check_all_targets_local_completed(win, &all_local_completed); +- MPIDI_win_check_all_targets_remote_completed(win, &all_remote_completed); +- +- /* Local completion counter might be updated later than remote completion +- * (at request completion), so we need to check it before release entire +- * window. */ +- all_completed = (MPIR_cc_get(MPIDI_CH4U_WIN(win, local_cmpl_cnts)) == 0) && +- (MPIR_cc_get(MPIDI_CH4U_WIN(win, remote_cmpl_cnts)) == 0) && +- all_local_completed && all_remote_completed; +- } while (all_completed != 1); +- +- mpi_errno = MPIDI_NM_mpi_win_free_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_win_free_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- MPIDI_CH4U_win_target_cleanall(win); +- MPIDI_CH4U_win_hash_clear(win); +- +- if (win->create_flavor == MPI_WIN_FLAVOR_ALLOCATE || +- win->create_flavor == MPI_WIN_FLAVOR_SHARED) { +- /* if more than one process on a node, we always use shared memory */ +- if (win->comm_ptr->node_comm != NULL) { +- if (MPIDI_CH4U_WIN(win, mmap_sz) > 0) { +- /* destroy shared window memory */ +- mpi_errno = MPIDI_CH4U_destroy_shm_segment(MPIDI_CH4U_WIN(win, mmap_sz), +- &MPIDI_CH4U_WIN(win, shm_segment_handle), +- &MPIDI_CH4U_WIN(win, mmap_addr)); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- } +- +- MPL_free(MPIDI_CH4U_WIN(win, shared_table)); +- } else if (MPIDI_CH4U_WIN(win, mmap_sz) > 0) { +- /* if single process on the node, we use mmap with symm heap */ +- MPL_munmap(MPIDI_CH4U_WIN(win, mmap_addr), MPIDI_CH4U_WIN(win, mmap_sz), MPL_MEM_RMA); +- } else +- MPL_free(win->base); +- } +- +- MPIDI_CH4U_map_erase(MPIDI_CH4_Global.win_map, MPIDI_CH4U_WIN(win, win_id)); +- +- MPIR_Comm_release(win->comm_ptr); +- MPIR_Handle_obj_free(&MPIR_Win_mem, win); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_WIN_FINALIZE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_free(MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_Win *win = *win_ptr; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_FREE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_FREE); +- +- MPIDI_CH4U_ACCESS_EPOCH_CHECK_NONE(win, mpi_errno, return mpi_errno); +- MPIDI_CH4U_EXPOSURE_EPOCH_CHECK_NONE(win, mpi_errno, return mpi_errno); +- +- mpi_errno = MPIR_Barrier(win->comm_ptr, &errflag); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- MPIDI_CH4R_win_finalize(win_ptr); +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_FREE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_fence +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_fence(int massert, MPIR_Win * win) ++static inline int MPIDIG_mpi_win_fence(int massert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_FENCE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_FENCE); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_FENCE); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_FENCE); + +- MPIDI_CH4U_FENCE_EPOCH_CHECK(win, mpi_errno, goto fn_fail); ++ MPIDIG_FENCE_EPOCH_CHECK(win, mpi_errno, goto fn_fail); + + /* Ensure op completion in netmod and shmmod */ + mpi_errno = MPIDI_NM_rma_win_cmpl_hook(win); +@@ -1151,11 +483,11 @@ static inline int MPIDI_CH4R_mpi_win_fence(int massert, MPIR_Win * win) + + /* Ensure completion of AM operations */ + do { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- } while (MPIR_cc_get(MPIDI_CH4U_WIN(win, local_cmpl_cnts)) != 0); +- MPIDI_CH4U_EPOCH_FENCE_EVENT(win, massert); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ } while (MPIR_cc_get(MPIDIG_WIN(win, local_cmpl_cnts)) != 0); ++ MPIDIG_EPOCH_FENCE_EVENT(win, massert); + + /* + * We always make a barrier even if MPI_MODE_NOPRECEDE is specified. +@@ -1170,357 +502,32 @@ static inline int MPIDI_CH4R_mpi_win_fence(int massert, MPIR_Win * win) + * MPI_Get(from rank 1) + */ + /* MPIR_Barrier's state is protected by ALLFUNC_MUTEX. +- * In VNI granularity, individual send/recv/wait operations will take +- * the VNI lock internally. */ +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); ++ * In VCI granularity, individual send/recv/wait operations will take ++ * the VCI lock internally. */ ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); + mpi_errno = MPIR_Barrier(win->comm_ptr, &errflag); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_FENCE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_FENCE); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_create(void *base, +- MPI_Aint length, +- int disp_unit, +- MPIR_Info * info, MPIR_Comm * comm_ptr, +- MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_Win *win; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_CREATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_CREATE); +- +- mpi_errno = MPIDI_CH4R_win_init(length, +- disp_unit, +- win_ptr, +- info, comm_ptr, MPI_WIN_FLAVOR_CREATE, MPI_WIN_UNIFIED); +- +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- win = *win_ptr; +- win->base = base; +- +- mpi_errno = MPIDI_NM_mpi_win_create_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_win_create_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- mpi_errno = MPIR_Barrier(win->comm_ptr, &errflag); +- +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_CREATE); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_attach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_attach(MPIR_Win * win, void *base, MPI_Aint size) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_ATTACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_ATTACH); +- +- MPIR_ERR_CHKANDSTMT((win->create_flavor != MPI_WIN_FLAVOR_DYNAMIC), mpi_errno, +- MPI_ERR_RMA_FLAVOR, goto fn_fail, "**rmaflavor"); +- +- mpi_errno = MPIDI_NM_mpi_win_attach_hook(win, base, size); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_win_attach_hook(win, base, size); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_ATTACH); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-/* Allocate RMA window over shared memory region. Used by both win_allocate +- * and win_allocate_shared. +- * +- * This routine allocates window memory region on each node from shared +- * memory, and initializes the shared_table structure that stores each +- * node process's size, disp_unit, and start address for shm RMA operations +- * and query routine.*/ +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4I_win_shm_alloc_impl +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4I_win_shm_alloc_impl(MPI_Aint size, +- int disp_unit, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- int i, mpi_errno = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_Win *win = NULL; +- size_t total_shm_size = 0LL; +- MPIDI_CH4U_win_shared_info_t *shared_table = NULL; +- MPI_Aint *shm_offsets = NULL; +- MPIR_Comm *shm_comm_ptr = comm_ptr->node_comm; +- size_t page_sz = 0, mapsize; +- int mapfail_flag = 0; +- unsigned symheap_flag = 1, global_symheap_flag = 0; +- +- MPIR_CHKPMEM_DECL(1); +- MPIR_CHKLMEM_DECL(1); +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4I_WIN_SHM_ALLOC_IMPL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4I_WIN_SHM_ALLOC_IMPL); +- +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- win = *win_ptr; +- *base_ptr = NULL; +- +- /* Check whether multiple processes exist on the local node. If so, +- * we need to count the total size on a node for shared memory allocation. */ +- if (shm_comm_ptr != NULL) { +- MPIR_T_PVAR_TIMER_START(RMA, rma_wincreate_allgather); +- MPIDI_CH4U_WIN(win, shared_table) = +- (MPIDI_CH4U_win_shared_info_t *) MPL_malloc(sizeof(MPIDI_CH4U_win_shared_info_t) * +- shm_comm_ptr->local_size, MPL_MEM_RMA); +- shared_table = MPIDI_CH4U_WIN(win, shared_table); +- shared_table[shm_comm_ptr->rank].size = size; +- shared_table[shm_comm_ptr->rank].disp_unit = disp_unit; +- shared_table[shm_comm_ptr->rank].shm_base_addr = NULL; +- +- mpi_errno = MPIR_Allgather(MPI_IN_PLACE, +- 0, +- MPI_DATATYPE_NULL, +- shared_table, +- sizeof(MPIDI_CH4U_win_shared_info_t), MPI_BYTE, shm_comm_ptr, +- &errflag); +- MPIR_T_PVAR_TIMER_END(RMA, rma_wincreate_allgather); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- MPIR_CHKLMEM_MALLOC(shm_offsets, MPI_Aint *, shm_comm_ptr->local_size * sizeof(MPI_Aint), +- mpi_errno, "shm offset", MPL_MEM_RMA); +- +- /* No allreduce here because this is a shared memory domain +- * and should be a relatively small number of processes +- * and a non performance sensitive API. +- */ +- for (i = 0; i < shm_comm_ptr->local_size; i++) { +- shm_offsets[i] = (MPI_Aint) total_shm_size; +- if (MPIDI_CH4U_WIN(win, info_args).alloc_shared_noncontig) +- total_shm_size += MPIDI_CH4R_get_mapsize(shared_table[i].size, &page_sz); +- else +- total_shm_size += shared_table[i].size; +- } +- +- /* if all processes give zero size on a single node window, simply return. */ +- if (total_shm_size == 0 && shm_comm_ptr->local_size == comm_ptr->local_size) +- goto fn_exit; +- +- /* if my size is not page aligned and noncontig is disabled, skip global symheap. */ +- if (size != MPIDI_CH4R_get_mapsize(size, &page_sz) && +- !MPIDI_CH4U_WIN(win, info_args).alloc_shared_noncontig) +- symheap_flag = 0; +- } else +- total_shm_size = size; +- +- /* try global symm heap only when multiple processes exist */ +- if (comm_ptr->local_size > 1) { +- /* global symm heap can be successful only when any of the following conditions meet. +- * Thus, we can skip unnecessary global symm heap retry based on condition check. +- * - no shared memory node (i.e., single process per node) +- * - size of each process on the shared memory node is page aligned, +- * thus all process can be assigned to a page aligned start address. +- * - user sets alloc_shared_noncontig=true, thus we can internally make +- * the size aligned on each process. */ +- mpi_errno = MPIR_Allreduce(&symheap_flag, &global_symheap_flag, 1, MPI_UNSIGNED, +- MPI_BAND, comm_ptr, &errflag); +- MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail"); +- } else +- global_symheap_flag = 0; +- +- /* because MPI_shm follows a create & attach mode, we need to set the +- * size of entire shared memory segment on each node as the size of +- * each process. */ +- mapsize = MPIDI_CH4R_get_mapsize(total_shm_size, &page_sz); +- MPIDI_CH4U_WIN(win, mmap_sz) = mapsize; +- +- /* first try global symmetric heap segment allocation */ +- if (global_symheap_flag) { +- mpi_errno = MPIDI_CH4R_get_shm_symheap(mapsize, shm_offsets, comm_ptr, win, &mapfail_flag); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- } +- +- /* if fails, try normal shm segment allocation or malloc */ +- if (!global_symheap_flag || mapfail_flag) { +- if (shm_comm_ptr != NULL && mapsize) { +- mpi_errno = MPIDI_CH4U_allocate_shm_segment(shm_comm_ptr, mapsize, +- &MPIDI_CH4U_WIN(win, shm_segment_handle), +- &MPIDI_CH4U_WIN(win, mmap_addr)); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- } else if (size > 0) { +- MPIR_CHKPMEM_MALLOC(*base_ptr, void *, size, mpi_errno, "(*win_ptr)->base", +- MPL_MEM_RMA); +- MPL_VG_MEM_INIT(*base_ptr, size); +- MPIDI_CH4U_WIN(win, mmap_sz) = 0; /* reset mmap_sz if use malloc */ +- } +- } +- +- /* compute the base addresses of each process within the shared memory segment */ +- if (shm_comm_ptr != NULL) { +- char *cur_base = (char *) MPIDI_CH4U_WIN(win, mmap_addr); +- for (i = 0; i < shm_comm_ptr->local_size; i++) { +- if (shared_table[i].size) +- shared_table[i].shm_base_addr = cur_base; +- else +- shared_table[i].shm_base_addr = NULL; +- +- if (MPIDI_CH4U_WIN(win, info_args).alloc_shared_noncontig) +- cur_base += MPIDI_CH4R_get_mapsize(shared_table[i].size, &page_sz); +- else +- cur_base += shared_table[i].size; +- } +- +- *base_ptr = shared_table[shm_comm_ptr->rank].shm_base_addr; +- } else if (MPIDI_CH4U_WIN(win, mmap_sz) > 0) { +- /* if symm heap is allocated without shared memory, use the mapping address */ +- *base_ptr = MPIDI_CH4U_WIN(win, mmap_addr); +- } +- /* otherwise, it has already be assigned with a local memory region or NULL (zero size). */ +- +- fn_exit: +- MPIR_CHKLMEM_FREEALL(); +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4I_WIN_SHM_ALLOC_IMPL); +- return mpi_errno; +- fn_fail: +- MPIR_CHKPMEM_REAP(); +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_allocate_shared +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_allocate_shared(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info_ptr, +- MPIR_Comm * comm_ptr, +- void **base_ptr, MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_Win *win = NULL; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_ALLOCATE_SHARED); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_ALLOCATE_SHARED); +- +- mpi_errno = MPIDI_CH4R_win_init(size, disp_unit, win_ptr, info_ptr, comm_ptr, +- MPI_WIN_FLAVOR_SHARED, MPI_WIN_UNIFIED); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +- mpi_errno = MPIDI_CH4I_win_shm_alloc_impl(size, disp_unit, comm_ptr, base_ptr, win_ptr); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +- win = *win_ptr; +- win->base = *base_ptr; +- win->size = size; +- +- mpi_errno = MPIDI_NM_mpi_win_allocate_shared_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_win_allocate_shared_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- mpi_errno = MPIR_Barrier(comm_ptr, &errflag); +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_ALLOCATE_SHARED); +- return mpi_errno; +- fn_fail: +- if (win_ptr) +- MPIDI_CH4R_win_finalize(win_ptr); +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_detach(MPIR_Win * win, const void *base) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_DETACH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_DETACH); +- MPIR_ERR_CHKANDSTMT((win->create_flavor != MPI_WIN_FLAVOR_DYNAMIC), mpi_errno, +- MPI_ERR_RMA_FLAVOR, goto fn_fail, "**rmaflavor"); +- +- mpi_errno = MPIDI_NM_mpi_win_detach_hook(win, base); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_win_detach_hook(win, base); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_DETACH); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_shared_query +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_shared_query(MPIR_Win * win, +- int rank, +- MPI_Aint * size, int *disp_unit, void *baseptr) ++static inline int MPIDIG_mpi_win_shared_query(MPIR_Win * win, int rank, MPI_Aint * size, ++ int *disp_unit, void *baseptr) + { + int mpi_errno = MPI_SUCCESS; + int offset = rank; +- MPIDI_CH4U_win_shared_info_t *shared_table = MPIDI_CH4U_WIN(win, shared_table); ++ MPIDIG_win_shared_info_t *shared_table = MPIDIG_WIN(win, shared_table); + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_SHARED_QUERY); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_SHARED_QUERY); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_SHARED_QUERY); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_SHARED_QUERY); + +- /* When only single process exists on the node, should only query +- * MPI_PROC_NULL or local process. Thus, return local window's info. */ +- if (win->comm_ptr->node_comm == NULL) { ++ /* When only single process exists on the node or shared memory allocation fails, ++ * should only query MPI_PROC_NULL or local process. Thus, return local window's info. */ ++ if (win->comm_ptr->node_comm == NULL || !shared_table) { + *size = win->size; + *disp_unit = win->disp_unit; + *((void **) baseptr) = win->base; +@@ -1550,78 +557,19 @@ static inline int MPIDI_CH4R_mpi_win_shared_query(MPIR_Win * win, + } + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_SHARED_QUERY); +- return mpi_errno; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_allocate +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_allocate(MPI_Aint size, +- int disp_unit, +- MPIR_Info * info, +- MPIR_Comm * comm, void *baseptr, MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- MPIR_Win *win; +- void **base_ptr = (void **) baseptr; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_ALLOCATE); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_ALLOCATE); +- +- mpi_errno = MPIDI_CH4R_win_init(size, disp_unit, win_ptr, info, comm, +- MPI_WIN_FLAVOR_ALLOCATE, MPI_WIN_UNIFIED); +- +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- mpi_errno = MPIDI_CH4I_win_shm_alloc_impl(size, disp_unit, comm, base_ptr, win_ptr); +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- win = *win_ptr; +- win->base = *(void **) baseptr; +- win->size = size; +- +- mpi_errno = MPIDI_NM_mpi_win_allocate_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_win_allocate_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- mpi_errno = MPIR_Barrier(comm, &errflag); +- +- if (mpi_errno != MPI_SUCCESS) +- goto fn_fail; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_ALLOCATE); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_SHARED_QUERY); + return mpi_errno; +- fn_fail: +- if (win_ptr) +- MPIDI_CH4R_win_finalize(win_ptr); +- goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_flush +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_flush(int rank, MPIR_Win * win) ++static inline int MPIDIG_mpi_win_flush(int rank, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_FLUSH); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_FLUSH); + + /* Check window lock epoch. + * PROC_NULL does not update per-target epoch. */ +- MPIDI_CH4U_EPOCH_CHECK_PASSIVE(win, mpi_errno, return mpi_errno); ++ MPIDIG_EPOCH_CHECK_PASSIVE(win, mpi_errno, return mpi_errno); + if (rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -1640,37 +588,33 @@ static inline int MPIDI_CH4R_mpi_win_flush(int rank, MPIR_Win * win) + * If target object is not created (e.g., when all operations issued + * to the target were via shm and in lockall), we also need trigger + * progress once to handle remote AM. */ +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, rank); + if (target_ptr) { +- if (MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_LOCK) +- MPIDI_CH4U_EPOCH_CHECK_TARGET_LOCK(target_ptr, mpi_errno, goto fn_fail); ++ if (MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_LOCK) ++ MPIDIG_EPOCH_CHECK_TARGET_LOCK(target_ptr, mpi_errno, goto fn_fail); + } + + do { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + } while (target_ptr && MPIR_cc_get(target_ptr->remote_cmpl_cnts) != 0); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_FLUSH); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_flush_local_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_flush_local_all(MPIR_Win * win) ++static inline int MPIDIG_mpi_win_flush_local_all(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + int all_local_completed = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_LOCAL_ALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_LOCAL_ALL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_LOCAL_ALL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_LOCAL_ALL); + +- MPIDI_CH4U_EPOCH_CHECK_PASSIVE(win, mpi_errno, goto fn_fail); ++ MPIDIG_EPOCH_CHECK_PASSIVE(win, mpi_errno, goto fn_fail); + + /* Ensure op local completion in netmod and shmmod */ + mpi_errno = MPIDI_NM_rma_win_local_cmpl_hook(win); +@@ -1688,35 +632,31 @@ static inline int MPIDI_CH4R_mpi_win_flush_local_all(MPIR_Win * win) + /* FIXME: now we simply set per-target counters for lockall in case + * user flushes per target, but this should be optimized. */ + do { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_win_check_all_targets_local_completed(win, &all_local_completed); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDIG_win_check_all_targets_local_completed(win, &all_local_completed); + } while (all_local_completed != 1); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_LOCAL_ALL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_LOCAL_ALL); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_unlock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_unlock_all(MPIR_Win * win) ++static inline int MPIDIG_mpi_win_unlock_all(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_UNLOCK_ALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_UNLOCK_ALL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_UNLOCK_ALL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_UNLOCK_ALL); + int i; + + int all_remote_completed = 0; + +- MPIDI_CH4U_ACCESS_EPOCH_CHECK(win, MPIDI_CH4U_EPOTYPE_LOCK_ALL, mpi_errno, return mpi_errno); ++ MPIDIG_ACCESS_EPOCH_CHECK(win, MPIDIG_EPOTYPE_LOCK_ALL, mpi_errno, return mpi_errno); + /* NOTE: lockall blocking waits till all locks granted */ +- MPIR_Assert(MPIDI_CH4U_WIN(win, sync).lockall.allLocked == win->comm_ptr->local_size); ++ MPIR_Assert(MPIDIG_WIN(win, sync).lockall.allLocked == win->comm_ptr->local_size); + + /* Ensure op completion in netmod and shmmod */ + mpi_errno = MPIDI_NM_rma_win_cmpl_hook(win); +@@ -1734,107 +674,60 @@ static inline int MPIDI_CH4R_mpi_win_unlock_all(MPIR_Win * win) + /* FIXME: now we simply set per-target counters for lockall in case + * user flushes per target, but this should be optimized. */ + do { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_win_check_all_targets_remote_completed(win, &all_remote_completed); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); ++ MPIDIG_win_check_all_targets_remote_completed(win, &all_remote_completed); + } while (all_remote_completed != 1); + +- if (MPIDI_CH4U_WIN(win, sync).assert_mode & MPI_MODE_NOCHECK) { +- MPIDI_CH4U_WIN(win, sync).lockall.allLocked = 0; ++ if (MPIDIG_WIN(win, sync).assert_mode & MPI_MODE_NOCHECK) { ++ MPIDIG_WIN(win, sync).lockall.allLocked = 0; + goto no_check; + } + for (i = 0; i < win->comm_ptr->local_size; i++) { +- MPIDI_CH4U_win_cntrl_msg_t msg; +- msg.win_id = MPIDI_CH4U_WIN(win, win_id); ++ MPIDIG_win_cntrl_msg_t msg; ++ msg.win_id = MPIDIG_WIN(win, win_id); + msg.origin_rank = win->comm_ptr->rank; + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(i, win->comm_ptr)) ++ if (MPIDI_rank_is_local(i, win->comm_ptr)) + mpi_errno = MPIDI_SHM_am_send_hdr(i, win->comm_ptr, +- MPIDI_CH4U_WIN_UNLOCKALL, &msg, sizeof(msg)); ++ MPIDIG_WIN_UNLOCKALL, &msg, sizeof(msg)); + else + #endif + { + mpi_errno = MPIDI_NM_am_send_hdr(i, win->comm_ptr, +- MPIDI_CH4U_WIN_UNLOCKALL, &msg, sizeof(msg)); ++ MPIDIG_WIN_UNLOCKALL, &msg, sizeof(msg)); + } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync"); + } + +- MPIDI_CH4R_PROGRESS_WHILE(MPIDI_CH4U_WIN(win, sync).lockall.allLocked); ++ MPIDIU_PROGRESS_WHILE(MPIDIG_WIN(win, sync).lockall.allLocked); + no_check: + /* In performance-efficient mode, all allocated targets are freed at win_finalize. */ + if (MPIR_CVAR_CH4_RMA_MEM_EFFICIENT) +- MPIDI_CH4U_win_target_cleanall(win); +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_NONE; +- MPIDI_CH4U_WIN(win, sync).assert_mode = 0; +- +- fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_UNLOCK_ALL); +- return mpi_errno; +- fn_fail: +- goto fn_exit; +-} +- +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_create_dynamic +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_create_dynamic(MPIR_Info * info, +- MPIR_Comm * comm, MPIR_Win ** win_ptr) +-{ +- int mpi_errno = MPI_SUCCESS; +- int rc = MPI_SUCCESS; +- MPIR_Errflag_t errflag = MPIR_ERR_NONE; +- +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_CREATE_DYNAMIC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_CREATE_DYNAMIC); +- +- MPIR_Win *win; +- +- rc = MPIDI_CH4R_win_init(0, 1, win_ptr, info, comm, MPI_WIN_FLAVOR_DYNAMIC, MPI_WIN_UNIFIED); +- +- if (rc != MPI_SUCCESS) +- goto fn_fail; +- +- win = *win_ptr; +- win->base = MPI_BOTTOM; +- +- mpi_errno = MPIDI_NM_mpi_win_create_dynamic_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +- +-#ifndef MPIDI_CH4_DIRECT_NETMOD +- mpi_errno = MPIDI_SHM_mpi_win_create_dynamic_hook(win); +- if (mpi_errno != MPI_SUCCESS) +- MPIR_ERR_POP(mpi_errno); +-#endif +- +- mpi_errno = MPIR_Barrier(comm, &errflag); ++ MPIDIG_win_target_cleanall(win); ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_NONE; ++ MPIDIG_WIN(win, sync).assert_mode = 0; + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_CREATE_DYNAMIC); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_UNLOCK_ALL); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_flush_local +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_flush_local(int rank, MPIR_Win * win) ++static inline int MPIDIG_mpi_win_flush_local(int rank, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_LOCAL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_LOCAL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_LOCAL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_LOCAL); + + /* Check window lock epoch. + * PROC_NULL does not update per-target epoch. */ +- MPIDI_CH4U_EPOCH_CHECK_PASSIVE(win, mpi_errno, return mpi_errno); ++ MPIDIG_EPOCH_CHECK_PASSIVE(win, mpi_errno, return mpi_errno); + if (rank == MPI_PROC_NULL) + goto fn_exit; + +@@ -1853,57 +746,49 @@ static inline int MPIDI_CH4R_mpi_win_flush_local(int rank, MPIR_Win * win) + * If target object is not created (e.g., when all operations issued + * to the target were via shm and in lockall), we also need trigger + * progress once to handle remote AM. */ +- MPIDI_CH4U_win_target_t *target_ptr = MPIDI_CH4U_win_target_find(win, rank); ++ MPIDIG_win_target_t *target_ptr = MPIDIG_win_target_find(win, rank); + if (target_ptr) { +- if (MPIDI_CH4U_WIN(win, sync).access_epoch_type == MPIDI_CH4U_EPOTYPE_LOCK) +- MPIDI_CH4U_EPOCH_CHECK_TARGET_LOCK(target_ptr, mpi_errno, goto fn_fail); ++ if (MPIDIG_WIN(win, sync).access_epoch_type == MPIDIG_EPOTYPE_LOCK) ++ MPIDIG_EPOCH_CHECK_TARGET_LOCK(target_ptr, mpi_errno, goto fn_fail); + } + + do { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + } while (target_ptr && MPIR_cc_get(target_ptr->local_cmpl_cnts) != 0); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_LOCAL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_LOCAL); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_sync +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_sync(MPIR_Win * win) ++static inline int MPIDIG_mpi_win_sync(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_SYNC); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_SYNC); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_SYNC); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_SYNC); + +- MPIDI_CH4U_EPOCH_CHECK_PASSIVE(win, mpi_errno, goto fn_fail); ++ MPIDIG_EPOCH_CHECK_PASSIVE(win, mpi_errno, goto fn_fail); + OPA_read_write_barrier(); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_SYNC); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_SYNC); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_flush_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_flush_all(MPIR_Win * win) ++static inline int MPIDIG_mpi_win_flush_all(MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + int all_remote_completed = 0; +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_ALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_ALL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_ALL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_ALL); + +- MPIDI_CH4U_EPOCH_CHECK_PASSIVE(win, mpi_errno, goto fn_fail); ++ MPIDIG_EPOCH_CHECK_PASSIVE(win, mpi_errno, goto fn_fail); + + /* Ensure op completion in netmod and shmmod */ + mpi_errno = MPIDI_NM_rma_win_cmpl_hook(win); +@@ -1918,73 +803,69 @@ static inline int MPIDI_CH4R_mpi_win_flush_all(MPIR_Win * win) + + /* Ensure completion of AM operations */ + do { +- MPID_THREAD_CS_EXIT(VNI, MPIDI_CH4_Global.vni_lock); +- MPIDI_CH4R_PROGRESS(); +- MPID_THREAD_CS_ENTER(VNI, MPIDI_CH4_Global.vni_lock); ++ MPID_THREAD_CS_EXIT(VCI, MPIDI_global.vci_lock); ++ MPIDIU_PROGRESS(); ++ MPID_THREAD_CS_ENTER(VCI, MPIDI_global.vci_lock); + + /* FIXME: now we simply set per-target counters for lockall in case + * user flushes per target, but this should be optimized. */ +- MPIDI_win_check_all_targets_remote_completed(win, &all_remote_completed); ++ MPIDIG_win_check_all_targets_remote_completed(win, &all_remote_completed); + } while (all_remote_completed != 1); + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_FLUSH_ALL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_FLUSH_ALL); + return mpi_errno; + fn_fail: + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDI_CH4R_mpi_win_lock_all +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +-static inline int MPIDI_CH4R_mpi_win_lock_all(int assert, MPIR_Win * win) ++static inline int MPIDIG_mpi_win_lock_all(int assert, MPIR_Win * win) + { + int mpi_errno = MPI_SUCCESS; + +- MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_CH4R_MPI_WIN_LOCK_ALL); +- MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_CH4R_MPI_WIN_LOCK_ALL); ++ MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDIG_MPI_WIN_LOCK_ALL); ++ MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDIG_MPI_WIN_LOCK_ALL); + +- MPIDI_CH4U_ACCESS_EPOCH_CHECK_NONE(win, mpi_errno, goto fn_fail); ++ MPIDIG_ACCESS_EPOCH_CHECK_NONE(win, mpi_errno, goto fn_fail); + +- MPIR_Assert(MPIDI_CH4U_WIN(win, sync).lockall.allLocked == 0); ++ MPIR_Assert(MPIDIG_WIN(win, sync).lockall.allLocked == 0); + + int size; + size = win->comm_ptr->local_size; + if (assert & MPI_MODE_NOCHECK) { +- MPIDI_CH4U_WIN(win, sync).assert_mode |= MPI_MODE_NOCHECK; +- MPIDI_CH4U_WIN(win, sync).lockall.allLocked = size; ++ MPIDIG_WIN(win, sync).assert_mode |= MPI_MODE_NOCHECK; ++ MPIDIG_WIN(win, sync).lockall.allLocked = size; + goto no_check; + } + + int i; + for (i = 0; i < size; i++) { +- MPIDI_CH4U_win_cntrl_msg_t msg; +- msg.win_id = MPIDI_CH4U_WIN(win, win_id); ++ MPIDIG_win_cntrl_msg_t msg; ++ msg.win_id = MPIDIG_WIN(win, win_id); + msg.origin_rank = win->comm_ptr->rank; + msg.lock_type = MPI_LOCK_SHARED; + + #ifndef MPIDI_CH4_DIRECT_NETMOD +- if (MPIDI_CH4_rank_is_local(i, win->comm_ptr)) ++ if (MPIDI_rank_is_local(i, win->comm_ptr)) + mpi_errno = MPIDI_SHM_am_send_hdr(i, win->comm_ptr, +- MPIDI_CH4U_WIN_LOCKALL, &msg, sizeof(msg)); ++ MPIDIG_WIN_LOCKALL, &msg, sizeof(msg)); + else + #endif + { + mpi_errno = MPIDI_NM_am_send_hdr(i, win->comm_ptr, +- MPIDI_CH4U_WIN_LOCKALL, &msg, sizeof(msg)); ++ MPIDIG_WIN_LOCKALL, &msg, sizeof(msg)); + } + + if (mpi_errno != MPI_SUCCESS) + MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync"); + } + +- MPIDI_CH4R_PROGRESS_WHILE(size != (int) MPIDI_CH4U_WIN(win, sync).lockall.allLocked); ++ MPIDIU_PROGRESS_WHILE(size != (int) MPIDIG_WIN(win, sync).lockall.allLocked); + no_check: +- MPIDI_CH4U_WIN(win, sync).access_epoch_type = MPIDI_CH4U_EPOTYPE_LOCK_ALL; ++ MPIDIG_WIN(win, sync).access_epoch_type = MPIDIG_EPOTYPE_LOCK_ALL; + + fn_exit: +- MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_CH4R_MPI_WIN_LOCK_ALL); ++ MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDIG_MPI_WIN_LOCK_ALL); + return mpi_errno; + fn_fail: + goto fn_exit; +--- a/src/mpid/ch4/subconfigure.m4 ++++ b/src/mpid/ch4/subconfigure.m4 +@@ -471,13 +471,13 @@ esac + # Dependency checks for CH4 MT modes + # Currently, "handoff", "trylock", and "runtime" require the followings: + # - izem linked in (--with-zm-prefix) +-# - enable-thread-cs=per-vni ++# - enable-thread-cs=per-vci + # + if test "$enable_ch4_mt" != "direct"; then + if test "${with_zm_prefix}" == "no" -o "${with_zm_prefix}" == "none" -o "${izem_queue}" != "yes" ; then + AC_MSG_ERROR([Multi-threading model `${enable_ch4_mt}` requires izem queue. Set `--enable-izem={queue|all} --with-zm-prefix` and retry.]) +- elif test "${enable_thread_cs}" != "per-vni" -a "${enable_thread_cs}" != "per_vni"; then +- AC_MSG_ERROR([Multi-threading model `${enable_ch4_mt}` requires `--enable-thread-cs=per-vni`.]) ++ elif test "${enable_thread_cs}" != "per-vci" -a "${enable_thread_cs}" != "per_vci"; then ++ AC_MSG_ERROR([Multi-threading model `${enable_ch4_mt}` requires `--enable-thread-cs=per-vci`.]) + fi + fi + +@@ -510,8 +510,20 @@ src/mpid/ch4/src/ch4_coll_globals_default.c + ]) + ])dnl end AM_COND_IF(BUILD_CH4,...) + ++# we have to define it here to cover ch3 build ++AM_CONDITIONAL([BUILD_CH4_SHM],[test "$enable_ch4_direct" = "auto"]) + AM_CONDITIONAL([BUILD_CH4_COLL_TUNING],[test -e "$srcdir/src/mpid/ch4/src/ch4_coll_globals.c"]) + ++# Test for the cpu process set type ++AC_CACHE_CHECK([whether cpu_set_t available],pac_cv_have_cpu_set_t,[ ++ AC_TRY_COMPILE( [ ++ #include ],[ cpu_set_t t; ],pac_cv_have_cpu_set_t=yes,pac_cv_have_cpu_set_t=no)]) ++if test "${have_hwloc}" = "yes" -a "${pac_cv_have_cpu_set_t}" = "yes" ; then ++ AC_DEFINE(BUILD_TOPOTREES,1,[Define if hwloc, cpu_set and GNU extensions are available]) ++fi ++ ++AM_CONDITIONAL([BUILD_TOPOTREES], [test x${have_hwloc} = x"yes" -a x${pac_cv_have_cpu_set_t} = x"yes" ]) ++ + ])dnl end _BODY + + [#] end of __file__ +--- a/src/mpid/common/bc/mpidu_bc.c ++++ b/src/mpid/common/bc/mpidu_bc.c +@@ -16,10 +16,6 @@ static size_t *indices; + static int local_size; + static char *segment; + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_bc_table_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_bc_table_destroy(void *bc_table) + { + int mpi_errno = MPI_SUCCESS; +@@ -40,10 +36,6 @@ int MPIDU_bc_table_destroy(void *bc_table) + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_bc_allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_bc_allgather(MPIR_Comm * comm, int *nodemap, void *bc, int bc_len, int same_len, + void **bc_table, size_t ** bc_indices) + { +@@ -97,42 +89,52 @@ int MPIDU_bc_allgather(MPIR_Comm * comm, int *nodemap, void *bc, int bc_len, int + #define VALLEN 1024 + #define KEYLEN 64 + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_bc_table_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len, int same_len, + int roots_only, void **bc_table, size_t ** bc_indices) + { + int rc, mpi_errno = MPI_SUCCESS; + int start, end, i; +- char *key, *val, *val_p; ++ char *val = NULL, *val_p; + int out_len, val_len, rem, flag; + pmix_value_t value, *pvalue; + pmix_info_t *info; + pmix_proc_t proc; + int local_rank, local_leader; ++ size_t my_bc_len = bc_len; + + MPIR_NODEMAP_get_local_info(rank, size, nodemap, &local_size, &local_rank, &local_leader); + ++ /* if business cards can be different length, use the max value length */ ++ if (!same_len) ++ bc_len = VALLEN; ++ mpi_errno = MPIDU_shm_seg_alloc(bc_len * size, (void **) &segment, MPL_MEM_ADDRESS); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = ++ MPIDU_shm_seg_commit(&memory, &barrier, local_size, local_rank, local_leader, rank, ++ MPL_MEM_ADDRESS); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (size == 1) { ++ memcpy(segment, bc, my_bc_len); ++ goto single; ++ } ++ + val = MPL_malloc(VALLEN, MPL_MEM_ADDRESS); + memset(val, 0, VALLEN); + val_p = val; + rem = VALLEN; +- rc = MPL_str_add_binary_arg(&val_p, &rem, "mpi", (char *) bc, bc_len); ++ rc = MPL_str_add_binary_arg(&val_p, &rem, "mpi", (char *) bc, my_bc_len); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**buscard"); + MPIR_Assert(rem >= 0); + +- key = MPL_malloc(KEYLEN, MPL_MEM_ADDRESS); +- MPIR_Assert(key); +- sprintf(key, "bc-%d", rank); +- + if (!roots_only || rank == local_leader) { + value.type = PMIX_STRING; + value.data.string = val; +- rc = PMIx_Put(PMIX_LOCAL, key, &value); ++ rc = PMIx_Put(PMIX_LOCAL, "bc", &value); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmix_put"); +- rc = PMIx_Put(PMIX_REMOTE, key, &value); ++ rc = PMIx_Put(PMIX_REMOTE, "bc", &value); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmix_put"); + rc = PMIx_Commit(); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmix_commit"); +@@ -144,30 +146,16 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmix_fence"); + PMIX_INFO_FREE(info, 1); + +- MPIR_NODEMAP_get_local_info(rank, size, nodemap, &local_size, &local_rank, &local_leader); +- /* if business cards can be different length, allocate 2x the space */ +- if (!same_len) +- bc_len = VALLEN; +- mpi_errno = MPIDU_shm_seg_alloc(bc_len * size, (void **) &segment, MPL_MEM_ADDRESS); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = +- MPIDU_shm_seg_commit(&memory, &barrier, local_size, local_rank, local_leader, rank, +- MPL_MEM_ADDRESS); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- + if (!roots_only) { + start = local_rank * (size / local_size); + end = start + (size / local_size); + if (local_rank == local_size - 1) + end += size % local_size; + for (i = start; i < end; i++) { +- sprintf(key, "bc-%d", i); + PMIX_PROC_CONSTRUCT(&proc); + MPL_strncpy(proc.nspace, MPIR_Process.pmix_proc.nspace, PMIX_MAX_NSLEN); + proc.rank = i; +- rc = PMIx_Get(&proc, key, NULL, 0, &pvalue); ++ rc = PMIx_Get(&proc, "bc", NULL, 0, &pvalue); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmix_get"); + rc = MPL_str_get_binary_arg(val, "mpi", &segment[i * bc_len], bc_len, &out_len); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**argstr_missinghost"); +@@ -182,11 +170,10 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + if (local_rank == local_size - 1) + end += num_nodes % local_size; + for (i = start; i < end; i++) { +- sprintf(key, "bc-%d", i); + PMIX_PROC_CONSTRUCT(&proc); + MPL_strncpy(proc.nspace, MPIR_Process.pmix_proc.nspace, PMIX_MAX_NSLEN); + proc.rank = i; +- rc = PMIx_Get(&proc, key, NULL, 0, &pvalue); ++ rc = PMIx_Get(&proc, "bc", NULL, 0, &pvalue); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmix_get"); + rc = MPL_str_get_binary_arg(val, "mpi", &segment[i * bc_len], bc_len, &out_len); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**argstr_missinghost"); +@@ -197,6 +184,7 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + ++ single: + if (!same_len) { + indices = MPL_malloc(size * sizeof(size_t), MPL_MEM_ADDRESS); + for (i = 0; i < size; i++) +@@ -205,7 +193,6 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + } + + fn_exit: +- MPL_free(key); + MPL_free(val); + *bc_table = segment; + +@@ -217,10 +204,6 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + #elif defined(USE_PMI2_API) + #include + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_bc_table_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len, int same_len, + int roots_only, void **bc_table, size_t ** bc_indices) + { +@@ -229,14 +212,32 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + int out_len, val_len, rem; + char *key = NULL, *val = NULL, *val_p; + int local_rank, local_leader; ++ size_t my_bc_len = bc_len; + + MPIR_NODEMAP_get_local_info(rank, size, nodemap, &local_size, &local_rank, &local_leader); + ++ /* if business cards can be different length, use the max value length */ ++ if (!same_len) ++ bc_len = PMI2_MAX_VALLEN; ++ mpi_errno = MPIDU_shm_seg_alloc(bc_len * size, (void **) &segment, MPL_MEM_ADDRESS); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = ++ MPIDU_shm_seg_commit(&memory, &barrier, local_size, local_rank, local_leader, rank, ++ MPL_MEM_ADDRESS); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (size == 1) { ++ memcpy(segment, bc, my_bc_len); ++ goto single; ++ } ++ + val = MPL_malloc(PMI2_MAX_VALLEN, MPL_MEM_ADDRESS); + memset(val, 0, PMI2_MAX_VALLEN); + val_p = val; + rem = PMI2_MAX_VALLEN; +- rc = MPL_str_add_binary_arg(&val_p, &rem, "mpi", (char *) bc, bc_len); ++ rc = MPL_str_add_binary_arg(&val_p, &rem, "mpi", (char *) bc, my_bc_len); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**buscard"); + MPIR_Assert(rem >= 0); + +@@ -250,19 +251,6 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + rc = PMI2_KVS_Fence(); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmi_kvsfence"); + +- MPIR_NODEMAP_get_local_info(rank, size, nodemap, &local_size, &local_rank, &local_leader); +- /* if business cards can be different length, allocate 2x the space */ +- if (!same_len) +- bc_len = PMI2_MAX_VALLEN; +- mpi_errno = MPIDU_shm_seg_alloc(bc_len * size, (void **) &segment, MPL_MEM_ADDRESS); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = +- MPIDU_shm_seg_commit(&memory, &barrier, local_size, local_rank, local_leader, rank, +- MPL_MEM_ADDRESS); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- + if (!roots_only) { + start = local_rank * (size / local_size); + end = start + (size / local_size); +@@ -296,6 +284,7 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + ++ single: + if (!same_len) { + indices = MPL_malloc(size * sizeof(size_t), MPL_MEM_ADDRESS); + for (i = 0; i < size; i++) +@@ -316,10 +305,6 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + #else + #include + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_bc_table_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len, int same_len, + int roots_only, void **bc_table, size_t ** bc_indices) + { +@@ -328,6 +313,7 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + int key_max, val_max, name_max, out_len, rem; + char *kvsname = NULL, *key = NULL, *val = NULL, *val_p; + int local_rank = -1, local_leader = -1; ++ size_t my_bc_len = bc_len; + + MPIR_NODEMAP_get_local_info(rank, size, nodemap, &local_size, &local_rank, &local_leader); + +@@ -338,6 +324,23 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + rc = PMI_KVS_Get_value_length_max(&val_max); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_get_value_length_max"); + ++ /* if business cards can be different length, use the max value length */ ++ if (!same_len) ++ bc_len = val_max; ++ mpi_errno = MPIDU_shm_seg_alloc(bc_len * size, (void **) &segment, MPL_MEM_ADDRESS); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ mpi_errno = ++ MPIDU_shm_seg_commit(&memory, &barrier, local_size, local_rank, local_leader, rank, ++ MPL_MEM_ADDRESS); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ if (size == 1) { ++ memcpy(segment, bc, my_bc_len); ++ goto single; ++ } ++ + kvsname = MPL_malloc(name_max, MPL_MEM_ADDRESS); + MPIR_Assert(kvsname); + rc = PMI_KVS_Get_my_name(kvsname, name_max); +@@ -347,7 +350,7 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + memset(val, 0, val_max); + val_p = val; + rem = val_max; +- rc = MPL_str_add_binary_arg(&val_p, &rem, "mpi", (char *) bc, bc_len); ++ rc = MPL_str_add_binary_arg(&val_p, &rem, "mpi", (char *) bc, my_bc_len); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**buscard"); + MPIR_Assert(rem >= 0); + +@@ -360,19 +363,8 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + rc = PMI_KVS_Commit(kvsname); + MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_commit"); + } +- +- MPIR_NODEMAP_get_local_info(rank, size, nodemap, &local_size, &local_rank, &local_leader); +- /* if business cards can be different length, allocate 2x the space */ +- if (!same_len) +- bc_len = val_max; +- mpi_errno = MPIDU_shm_seg_alloc(bc_len * size, (void **) &segment, MPL_MEM_ADDRESS); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- mpi_errno = +- MPIDU_shm_seg_commit(&memory, &barrier, local_size, local_rank, local_leader, rank, +- MPL_MEM_ADDRESS); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); ++ rc = PMI_Barrier(); ++ MPIR_ERR_CHKANDJUMP(rc, mpi_errno, MPI_ERR_OTHER, "**pmi_barrier"); + + if (!roots_only) { + start = local_rank * (size / local_size); +@@ -407,6 +399,7 @@ int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len + if (mpi_errno) + MPIR_ERR_POP(mpi_errno); + ++ single: + if (!same_len) { + indices = MPL_malloc(size * sizeof(size_t), MPL_MEM_ADDRESS); + MPIR_Assert(indices); +--- a/src/mpid/common/bc/mpidu_bc.h ++++ b/src/mpid/common/bc/mpidu_bc.h +@@ -8,6 +8,8 @@ + #ifndef MPIDU_BC_H_INCLUDED + #define MPIDU_BC_H_INCLUDED + ++#include "build_nodemap.h" ++ + int MPIDU_bc_table_create(int rank, int size, int *nodemap, void *bc, int bc_len, int same_len, + int roots_only, void **bc_table, size_t ** bc_indices); + int MPIDU_bc_table_destroy(void *bc_table); +--- a/src/mpid/common/hcoll/hcoll_init.c ++++ b/src/mpid/common/hcoll/hcoll_init.c +@@ -48,10 +48,6 @@ MPL_dbg_class MPIR_DBG_HCOLL; + + void hcoll_rte_fns_setup(void); + +-#undef FUNCNAME +-#define FUNCNAME hcoll_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + + int hcoll_destroy(void *param ATTRIBUTE((unused))) + { +@@ -73,10 +69,6 @@ int hcoll_destroy(void *param ATTRIBUTE((unused))) + } \ + } while (0) + +-#undef FUNCNAME +-#define FUNCNAME hcoll_initialize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_initialize(void) + { + int mpi_errno; +@@ -137,10 +129,6 @@ int hcoll_initialize(void) + } + + +-#undef FUNCNAME +-#define FUNCNAME hcoll_comm_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_comm_create(MPIR_Comm * comm_ptr, void *param) + { + int mpi_errno; +@@ -186,10 +174,6 @@ int hcoll_comm_create(MPIR_Comm * comm_ptr, void *param) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME hcoll_comm_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_comm_destroy(MPIR_Comm * comm_ptr, void *param) + { + int mpi_errno; +--- a/src/mpid/common/hcoll/hcoll_ops.c ++++ b/src/mpid/common/hcoll/hcoll_ops.c +@@ -7,10 +7,6 @@ + #include "mpiimpl.h" + #include "hcoll.h" + +-#undef FUNCNAME +-#define FUNCNAME hcoll_Barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_Barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * err) + { + int rc = -1; +@@ -24,10 +20,6 @@ int hcoll_Barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t * err) + return rc; + } + +-#undef FUNCNAME +-#define FUNCNAME hcoll_Bcast +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * err) + { +@@ -53,10 +45,6 @@ int hcoll_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, + return rc; + } + +-#undef FUNCNAME +-#define FUNCNAME hcoll_Reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, + int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * err) + { +@@ -86,10 +74,6 @@ int hcoll_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dat + return rc; + } + +-#undef FUNCNAME +-#define FUNCNAME hcoll_Allreduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, + MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * err) + { +@@ -118,10 +102,6 @@ int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype + return rc; + } + +-#undef FUNCNAME +-#define FUNCNAME hcoll_Allgather +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_Allgather(const void *sbuf, int scount, MPI_Datatype sdtype, + void *rbuf, int rcount, MPI_Datatype rdtype, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * err) +@@ -154,10 +134,6 @@ int hcoll_Allgather(const void *sbuf, int scount, MPI_Datatype sdtype, + return rc; + } + +-#undef FUNCNAME +-#define FUNCNAME hcoll_Alltoall +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_Alltoall(const void *sbuf, int scount, MPI_Datatype sdtype, + void *rbuf, int rcount, MPI_Datatype rdtype, MPIR_Comm * comm_ptr, + MPIR_Errflag_t * err) +@@ -190,10 +166,6 @@ int hcoll_Alltoall(const void *sbuf, int scount, MPI_Datatype sdtype, + return rc; + } + +-#undef FUNCNAME +-#define FUNCNAME hcoll_Alltoallv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int hcoll_Alltoallv(const void *sbuf, const int *scounts, const int *sdispls, MPI_Datatype sdtype, + void *rbuf, const int *rcounts, const int *rdispls, MPI_Datatype rdtype, + MPIR_Comm * comm_ptr, MPIR_Errflag_t * err) +--- a/src/mpid/common/hcoll/hcoll_rte.c ++++ b/src/mpid/common/hcoll/hcoll_rte.c +@@ -45,10 +45,6 @@ static int group_id(rte_grp_handle_t group); + + static int world_rank(rte_grp_handle_t grp_h, rte_ec_handle_t ec); + +-#undef FUNCNAME +-#define FUNCNAME progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void progress(void) + { + int ret; +@@ -81,10 +77,6 @@ static int get_mpi_constants(size_t * mpi_datatype_size, + int *mpi_distribute_none, int *mpi_distribute_dflt_darg); + #endif + +-#undef FUNCNAME +-#define FUNCNAME init_module_fns +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void init_module_fns(void) + { + hcoll_rte_functions.send_fn = send_nb; +@@ -113,19 +105,11 @@ static void init_module_fns(void) + #endif + } + +-#undef FUNCNAME +-#define FUNCNAME hcoll_rte_fns_setup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + void hcoll_rte_fns_setup(void) + { + init_module_fns(); + } + +-#undef FUNCNAME +-#define FUNCNAME recv_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int recv_nb(struct dte_data_representation_t data, + uint32_t count, + void *buffer, +@@ -161,10 +145,6 @@ static int recv_nb(struct dte_data_representation_t data, + return HCOLL_ERROR; + } + +-#undef FUNCNAME +-#define FUNCNAME send_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int send_nb(dte_data_representation_t data, + uint32_t count, + void *buffer, +@@ -201,10 +181,6 @@ static int send_nb(dte_data_representation_t data, + return HCOLL_ERROR; + } + +-#undef FUNCNAME +-#define FUNCNAME test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int test(rte_request_handle_t * request, int *completed) + { + MPIR_Request *req; +@@ -223,10 +199,6 @@ static int test(rte_request_handle_t * request, int *completed) + return HCOLL_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME ec_handle_compare +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int ec_handle_compare(rte_ec_handle_t handle_1, + rte_grp_handle_t + group_handle_1, +@@ -235,10 +207,6 @@ static int ec_handle_compare(rte_ec_handle_t handle_1, + return handle_1.handle == handle_2.handle; + } + +-#undef FUNCNAME +-#define FUNCNAME get_ec_handles +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int get_ec_handles(int num_ec, + int *ec_indexes, rte_grp_handle_t grp_h, rte_ec_handle_t * ec_handles) + { +@@ -256,28 +224,16 @@ static int get_ec_handles(int num_ec, + return HCOLL_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME group_size +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int group_size(rte_grp_handle_t grp_h) + { + return MPIR_Comm_size((MPIR_Comm *) grp_h); + } + +-#undef FUNCNAME +-#define FUNCNAME my_rank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int my_rank(rte_grp_handle_t grp_h) + { + return MPIR_Comm_rank((MPIR_Comm *) grp_h); + } + +-#undef FUNCNAME +-#define FUNCNAME ec_on_local_node +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int ec_on_local_node(rte_ec_handle_t ec, rte_grp_handle_t group) + { + MPIR_Comm *comm; +@@ -291,29 +247,17 @@ static int ec_on_local_node(rte_ec_handle_t ec, rte_grp_handle_t group) + } + + +-#undef FUNCNAME +-#define FUNCNAME get_world_group_handle +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static rte_grp_handle_t get_world_group_handle(void) + { + return (rte_grp_handle_t) (MPIR_Process.comm_world); + } + +-#undef FUNCNAME +-#define FUNCNAME jobid +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static uint32_t jobid(void) + { + /* not used currently */ + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME group_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int group_id(rte_grp_handle_t group) + { + MPIR_Comm *comm; +@@ -321,10 +265,6 @@ static int group_id(rte_grp_handle_t group) + return comm->context_id; + } + +-#undef FUNCNAME +-#define FUNCNAME get_coll_handle +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void *get_coll_handle(void) + { + MPIR_Request *req; +@@ -333,10 +273,6 @@ static void *get_coll_handle(void) + return (void *) req; + } + +-#undef FUNCNAME +-#define FUNCNAME coll_handle_test +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int coll_handle_test(void *handle) + { + int completed; +@@ -346,10 +282,6 @@ static int coll_handle_test(void *handle) + return completed; + } + +-#undef FUNCNAME +-#define FUNCNAME coll_handle_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void coll_handle_free(void *handle) + { + MPIR_Request *req; +@@ -359,10 +291,6 @@ static void coll_handle_free(void *handle) + } + } + +-#undef FUNCNAME +-#define FUNCNAME coll_handle_complete +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static void coll_handle_complete(void *handle) + { + MPIR_Request *req; +@@ -372,14 +300,10 @@ static void coll_handle_complete(void *handle) + } + } + +-#undef FUNCNAME +-#define FUNCNAME world_rank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int world_rank(rte_grp_handle_t grp_h, rte_ec_handle_t ec) + { + #ifdef MPIDCH4_H_INCLUDED +- return MPIDI_CH4U_rank_to_lpid(ec.rank, (MPIR_Comm *) grp_h); ++ return MPIDIU_rank_to_lpid(ec.rank, (MPIR_Comm *) grp_h); + #else + return ((struct MPIDI_VC *) ec.handle)->pg_rank; + #endif +--- a/src/mpid/common/sched/mpidu_sched.c ++++ b/src/mpid/common/sched/mpidu_sched.c +@@ -48,12 +48,63 @@ static const char *entry_to_str(enum MPIDU_Sched_entry_type type) + } + } + ++static void entry_dump(FILE * fh, struct MPIDU_Sched_entry *e) ++{ ++ switch (e->type) { ++ case MPIDU_SCHED_ENTRY_SEND: ++ { ++ struct MPIDU_Sched_send *s = &(e->u.send); ++ fprintf(fh, "\t\tSend: " MPI_AINT_FMT_DEC_SPEC " of type %x from %d\n", s->count, ++ s->datatype, s->dest); ++ fprintf(fh, "\t\t from buff: %p\n", s->buf); ++ } ++ break; ++ case MPIDU_SCHED_ENTRY_RECV: ++ { ++ struct MPIDU_Sched_recv *r = &(e->u.recv); ++ fprintf(fh, "\t\tRecv: " MPI_AINT_FMT_DEC_SPEC " of type %x from %d\n", r->count, ++ r->datatype, r->src); ++ fprintf(fh, "\t\t Into buff: %p\n", r->buf); ++ } ++ break; ++ case MPIDU_SCHED_ENTRY_REDUCE: ++ { ++ struct MPIDU_Sched_reduce *rd = &(e->u.reduce); ++ fprintf(fh, "\t\tReduce: %p -> %p\n", rd->inbuf, rd->inoutbuf); ++ fprintf(fh, "\t\t " MPI_AINT_FMT_DEC_SPEC " elements of type %x\n", rd->count, ++ rd->datatype); ++ fprintf(fh, "\t\t Op: %x\n", rd->op); ++ } ++ break; ++ case MPIDU_SCHED_ENTRY_COPY: ++ { ++ struct MPIDU_Sched_copy *cp = &(e->u.copy); ++ fprintf(fh, "\t\tFrom: %p " MPI_AINT_FMT_DEC_SPEC " of type %x\n", cp->inbuf, ++ cp->incount, cp->intype); ++ fprintf(fh, "\t\tTo: %p " MPI_AINT_FMT_DEC_SPEC " of type %x\n", cp->outbuf, ++ cp->outcount, cp->outtype); ++ } ++ break; ++ case MPIDU_SCHED_ENTRY_NOP: ++ break; ++ case MPIDU_SCHED_ENTRY_CB: ++ { ++ struct MPIDU_Sched_cb *cb = &(e->u.cb); ++ fprintf(fh, "\t\tcb_type=%d\n", cb->cb_type); ++ fprintf(fh, "\t\tcb_addr: %p\n", cb->u.cb_p); ++ } ++ break; ++ default: ++ break; ++ } ++} ++ + /* utility function for debugging, dumps the given schedule object to fh */ + static void sched_dump(struct MPIDU_Sched *s, FILE * fh) + { + int i; + +- fprintf(fh, "--------------------------------\n"); ++ fprintf(fh, "================================\n"); + fprintf(fh, "s=%p\n", s); + if (s) { + fprintf(fh, "s->size=%zd\n", s->size); +@@ -63,14 +114,16 @@ static void sched_dump(struct MPIDU_Sched *s, FILE * fh) + fprintf(fh, "s->req=%p\n", s->req); + fprintf(fh, "s->entries=%p\n", s->entries); + for (i = 0; i < s->num_entries; ++i) { ++ fprintf(fh, "--------------------------------\n"); + fprintf(fh, "&s->entries[%d]=%p\n", i, &s->entries[i]); +- fprintf(fh, "s->entries[%d].type=%s\n", i, entry_to_str(s->entries[i].type)); +- fprintf(fh, "s->entries[%d].status=%d\n", i, s->entries[i].status); +- fprintf(fh, "s->entries[%d].is_barrier=%s\n", i, ++ fprintf(fh, "\ts->entries[%d].type=%s\n", i, entry_to_str(s->entries[i].type)); ++ fprintf(fh, "\ts->entries[%d].status=%d\n", i, s->entries[i].status); ++ fprintf(fh, "\ts->entries[%d].is_barrier=%s\n", i, + (s->entries[i].is_barrier ? "TRUE" : "FALSE")); ++ entry_dump(fh, &(s->entries[i])); + } + } +- fprintf(fh, "--------------------------------\n"); ++ fprintf(fh, "================================\n"); + /* + * fprintf(fh, "s->next=%p\n", s->next); + * fprintf(fh, "s->prev=%p\n", s->prev); +@@ -87,19 +140,11 @@ struct MPIDU_Sched_state all_schedules = { NULL }; + + /* returns TRUE if any schedules are currently pending completion by the + * progress engine, FALSE otherwise */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_are_pending +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_Sched_are_pending(void) + { + return (all_schedules.head != NULL); + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_next_tag +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_Sched_next_tag(MPIR_Comm * comm_ptr, int *tag) + { + int mpi_errno = MPI_SUCCESS; +@@ -149,10 +194,6 @@ int MPIDU_Sched_next_tag(MPIR_Comm * comm_ptr, int *tag) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_start_entry +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* initiates the schedule entry "e" in the NBC described by "s", where + * "e" is at "idx" in "s". This means posting nonblocking sends/recvs, + * performing reductions, calling callbacks, etc. */ +@@ -313,10 +354,6 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI + /* Posts or performs any NOT_STARTED operations in the given schedule that are + * permitted to be started. That is, this routine will respect schedule + * barriers appropriately. */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_continue +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDU_Sched_continue(struct MPIDU_Sched *s) + { + int mpi_errno = MPI_SUCCESS; +@@ -356,10 +393,6 @@ static int MPIDU_Sched_continue(struct MPIDU_Sched *s) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* creates a new opaque schedule object and returns a handle to it in (*sp) */ + int MPIDU_Sched_create(MPIR_Sched_t * sp) + { +@@ -402,10 +435,6 @@ int MPIDU_Sched_create(MPIR_Sched_t * sp) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_clone +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* clones orig and returns a handle to the new schedule in (*cloned) */ + int MPIDU_Sched_clone(MPIR_Sched_t orig, MPIR_Sched_t * cloned) + { +@@ -416,10 +445,6 @@ int MPIDU_Sched_clone(MPIR_Sched_t orig, MPIR_Sched_t * cloned) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_start +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* sets (*sp) to MPIR_SCHED_NULL and gives you back a request pointer in (*req). + * The caller is giving up ownership of the opaque schedule object. */ + int MPIDU_Sched_start(MPIR_Sched_t * sp, MPIR_Comm * comm, int tag, MPIR_Request ** req) +@@ -491,10 +516,6 @@ int MPIDU_Sched_start(MPIR_Sched_t * sp, MPIR_Comm * comm, int tag, MPIR_Request + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_add_entry +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* idx and e are permitted to be NULL */ + static int MPIDU_Sched_add_entry(struct MPIDU_Sched *s, int *idx, struct MPIDU_Sched_entry **e) + { +@@ -527,10 +548,6 @@ static int MPIDU_Sched_add_entry(struct MPIDU_Sched *s, int *idx, struct MPIDU_S + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_send +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* do these ops need an entry handle returned? */ + int MPIDU_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, + MPIR_Comm * comm, MPIR_Sched_t s) +@@ -568,10 +585,6 @@ int MPIDU_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_ssend +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_Sched_ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, + MPIR_Comm * comm, MPIR_Sched_t s) + { +@@ -608,10 +621,6 @@ int MPIDU_Sched_ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, in + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_send_defer +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_Sched_send_defer(const void *buf, const MPI_Aint * count, MPI_Datatype datatype, int dest, + MPIR_Comm * comm, MPIR_Sched_t s) + { +@@ -647,10 +656,6 @@ int MPIDU_Sched_send_defer(const void *buf, const MPI_Aint * count, MPI_Datatype + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_recv_status +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_Sched_recv_status(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, + MPIR_Comm * comm, MPI_Status * status, MPIR_Sched_t s) + { +@@ -682,10 +687,6 @@ int MPIDU_Sched_recv_status(void *buf, MPI_Aint count, MPI_Datatype datatype, in + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_recv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_Sched_recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, MPIR_Comm * comm, + MPIR_Sched_t s) + { +@@ -717,10 +718,6 @@ int MPIDU_Sched_recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_reduce +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_Sched_reduce(const void *inbuf, void *inoutbuf, MPI_Aint count, MPI_Datatype datatype, + MPI_Op op, MPIR_Sched_t s) + { +@@ -752,10 +749,6 @@ int MPIDU_Sched_reduce(const void *inbuf, void *inoutbuf, MPI_Aint count, MPI_Da + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_copy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* Schedules a copy of "incount" copies of "intype" from "inbuf" to "outbuf" as + * specified by "outcount" and "outtype". It is erroneous to attempt to copy + * more data than will fit into the (outbuf,outcount,outtype)-triple. This +@@ -810,10 +803,6 @@ int MPIDU_Sched_copy(const void *inbuf, MPI_Aint incount, MPI_Datatype intype, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* require that all previously added ops are complete before subsequent ops + * may begin to execute */ + int MPIDU_Sched_barrier(MPIR_Sched_t s) +@@ -829,10 +818,6 @@ int MPIDU_Sched_barrier(MPIR_Sched_t s) + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_cb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* buffer management, fancy reductions, etc */ + int MPIDU_Sched_cb(MPIR_Sched_cb_t * cb_p, void *cb_state, MPIR_Sched_t s) + { +@@ -860,10 +845,6 @@ int MPIDU_Sched_cb(MPIR_Sched_cb_t * cb_p, void *cb_state, MPIR_Sched_t s) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_cb2 +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* buffer management, fancy reductions, etc */ + int MPIDU_Sched_cb2(MPIR_Sched_cb2_t * cb_p, void *cb_state, void *cb_state2, MPIR_Sched_t s) + { +@@ -893,10 +874,6 @@ int MPIDU_Sched_cb2(MPIR_Sched_cb2_t * cb_p, void *cb_state, void *cb_state2, MP + + + /* returns TRUE in (*made_progress) if any of the outstanding schedules in state completed */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_progress_state +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int MPIDU_Sched_progress_state(struct MPIDU_Sched_state *state, int *made_progress) + { + int mpi_errno = MPI_SUCCESS; +@@ -1013,21 +990,17 @@ static int MPIDU_Sched_progress_state(struct MPIDU_Sched_state *state, int *made + } + + /* returns TRUE in (*made_progress) if any of the outstanding schedules completed */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_Sched_progress +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_Sched_progress(int *made_progress) + { + int mpi_errno; + +- MPID_THREAD_CS_ENTER(VNI, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_ENTER(VCI, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + + mpi_errno = MPIDU_Sched_progress_state(&all_schedules, made_progress); + if (!mpi_errno && all_schedules.head == NULL) + MPID_Progress_deactivate_hook(MPIR_Nbc_progress_hook_id); + +- MPID_THREAD_CS_EXIT(VNI, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); ++ MPID_THREAD_CS_EXIT(VCI, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); + + return mpi_errno; + } +--- a/src/mpid/common/shm/mpidu_shm_alloc.c ++++ b/src/mpid/common/shm/mpidu_shm_alloc.c +@@ -51,8 +51,6 @@ static int check_alloc(MPIDU_shm_seg_t * memory, MPIDU_shm_barrier_t * barrier, + #define ALLOCQ_ENQUEUE(ep) GENERIC_Q_ENQUEUE(&allocq, ep, next) + #define ALLOCQ_DEQUEUE(epp) GENERIC_Q_DEQUEUE(&allocq, epp, next) + +-#define ROUND_UP_8(x) (((x) + (size_t)7) & ~(size_t)7) /* rounds up to multiple of 8 */ +- + static size_t segment_len = 0; + + static int num_segments = 0; +@@ -76,10 +74,6 @@ static asym_check_region *asym_check_region_p = NULL; + and the *ptr_p pointer will be valid only after + MPIDU_SHM_Seg_commit() is called. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_shm_seg_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_shm_seg_alloc(size_t len, void **ptr_p, MPL_memory_class class) + { + int mpi_errno = MPI_SUCCESS; +@@ -91,8 +85,7 @@ int MPIDU_shm_seg_alloc(size_t len, void **ptr_p, MPL_memory_class class) + + /* round up to multiple of 8 to ensure the start of the next + * region is 64-bit aligned. */ +- len = ROUND_UP_8(len); +- ++ len = MPL_ROUND_UP_ALIGN(len, (size_t) 8); + MPIR_Assert(len); + MPIR_Assert(ptr_p); + +@@ -129,10 +122,6 @@ int MPIDU_shm_seg_alloc(size_t len, void **ptr_p, MPL_memory_class class) + At least one call to MPIDU_SHM_Seg_alloc() must be made before + calling MPIDU_SHM_Seg_commit(). + */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_shm_seg_commit +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_shm_seg_commit(MPIDU_shm_seg_t * memory, MPIDU_shm_barrier_t ** barrier, + int num_local, int local_rank, int local_procs_0, int rank, + MPL_memory_class class) +@@ -619,6 +608,9 @@ int MPIDU_shm_seg_commit(MPIDU_shm_seg_t * memory, MPIDU_shm_barrier_t ** barrie + + MPIR_CHKPMEM_COMMIT(); + fn_exit: ++ /* reset segment_len to zero */ ++ segment_len = 0; ++ + MPIR_CHKLMEM_FREEALL(); + MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDU_SHM_SEG_COMMIT); + return mpi_errno; +@@ -632,10 +624,6 @@ int MPIDU_shm_seg_commit(MPIDU_shm_seg_t * memory, MPIDU_shm_barrier_t ** barrie + } + + /* MPIDU_SHM_Seg_destroy() free the shared memory segment */ +-#undef FUNCNAME +-#define FUNCNAME MPIDU_shm_seg_destroy +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_shm_seg_destroy(MPIDU_shm_seg_t * memory, int num_local) + { + int mpi_errno = MPI_SUCCESS, mpl_err = 0; +@@ -662,10 +650,6 @@ int MPIDU_shm_seg_destroy(MPIDU_shm_seg_t * memory, int num_local) + /* check_alloc() checks to see whether the shared memory segment is + allocated at the same virtual memory address at each process. + */ +-#undef FUNCNAME +-#define FUNCNAME check_alloc +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int check_alloc(MPIDU_shm_seg_t * memory, MPIDU_shm_barrier_t * barrier, + int num_local, int local_rank) + { +--- a/src/mpid/common/shm/mpidu_shm_barrier.c ++++ b/src/mpid/common/shm/mpidu_shm_barrier.c +@@ -9,10 +9,6 @@ + static int sense; + static int barrier_init = 0; + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_shm_barrier_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIDU_shm_barrier_init(MPIDU_shm_barrier_t * barrier_region, + MPIDU_shm_barrier_t ** barrier, int init_values) + { +@@ -34,10 +30,6 @@ int MPIDU_shm_barrier_init(MPIDU_shm_barrier_t * barrier_region, + return MPI_SUCCESS; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIDU_shm_barrier +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + /* FIXME: this is not a scalable algorithm because everyone is polling on the same cacheline */ + int MPIDU_shm_barrier(MPIDU_shm_barrier_t * barrier, int num_local) + { +--- a/src/mpid/common/thread/mpidu_thread_fallback.h ++++ b/src/mpid/common/thread/mpidu_thread_fallback.h +@@ -107,7 +107,7 @@ M*/ + int err_ = 0; \ + MPL_DBG_MSG(MPIR_DBG_THREAD, TYPICAL, "non-recursive locking POBJ mutex"); \ + MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPIDU_Thread_mutex_lock %p", &mutex); \ +- MPIDU_Thread_mutex_lock(&mutex, &err_); \ ++ MPIDU_Thread_mutex_lock(&mutex, &err_, MPL_THREAD_PRIO_HIGH); \ + MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPIDU_Thread_mutex_lock %p", &mutex); \ + MPIR_Assert(err_ == 0); \ + } \ +@@ -123,7 +123,7 @@ M*/ + MPL_thread_same(&self_, &owner_, &equal_); \ + if (!equal_) { \ + int err_ = 0; \ +- MPIDU_Thread_mutex_lock(&mutex, &err_); \ ++ MPIDU_Thread_mutex_lock(&mutex, &err_, MPL_THREAD_PRIO_HIGH);\ + MPIR_Assert(err_ == 0); \ + MPIR_Assert(mutex.count == 0); \ + MPL_thread_self(&mutex.owner); \ +@@ -136,22 +136,22 @@ M*/ + + #define MPIDUI_THREAD_CS_ENTER_GLOBAL MPIDUI_THREAD_CS_ENTER_REC + #define MPIDUI_THREAD_CS_ENTER_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_VNI_GLOBAL MPIDUI_THREAD_CS_ENTER_GLOBAL +-#define MPIDUI_THREAD_CS_ENTER_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_VCI_GLOBAL MPIDUI_THREAD_CS_ENTER_GLOBAL ++#define MPIDUI_THREAD_CS_ENTER_VCI(mutex) do {} while (0) + + #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ + + #define MPIDUI_THREAD_CS_ENTER_POBJ(mutex) MPIDUI_THREAD_CS_ENTER_NREC(mutex) + #define MPIDUI_THREAD_CS_ENTER_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_VCI(mutex) do {} while (0) + +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + + #define MPIDUI_THREAD_CS_ENTER_GLOBAL MPIDUI_THREAD_CS_ENTER_REC + #define MPIDUI_THREAD_CS_ENTER_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_VNI(mutex) MPIDUI_THREAD_CS_ENTER_REC(mutex) ++#define MPIDUI_THREAD_CS_ENTER_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_VCI(mutex) MPIDUI_THREAD_CS_ENTER_REC(mutex) + + #endif /* MPICH_THREAD_GRANULARITY */ + +@@ -159,8 +159,8 @@ M*/ + + #define MPIDUI_THREAD_CS_ENTER_GLOBAL(mutex) do {} while (0) + #define MPIDUI_THREAD_CS_ENTER_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_VCI(mutex) do {} while (0) + + #endif /* MPICH_IS_THREADED */ + +@@ -178,7 +178,7 @@ M*/ + int err_; \ + MPIR_Assert(st.owner != 0); \ + MPIR_Assert(st.count > 0); \ +- MPIDU_Thread_mutex_lock(&mutex, &err_); \ ++ MPIDU_Thread_mutex_lock(&mutex, &err_, MPL_THREAD_PRIO_HIGH);\ + MPIR_Assert(err_ == 0); \ + MPIR_Assert(mutex.count == 0); \ + /* restore mutex state */ \ +@@ -191,22 +191,22 @@ M*/ + + #define MPIDUI_THREAD_CS_ENTER_ST_GLOBAL MPIDUI_THREAD_CS_ENTER_ST + #define MPIDUI_THREAD_CS_ENTER_ST_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI_GLOBAL MPIDUI_THREAD_CS_ENTER_GLOBAL +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI_GLOBAL MPIDUI_THREAD_CS_ENTER_GLOBAL ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI(mutex) do {} while (0) + + #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ + + #define MPIDUI_THREAD_CS_ENTER_ST_POBJ(mutex) MPIDUI_THREAD_CS_ENTER_ST(mutex) + #define MPIDUI_THREAD_CS_ENTER_ST_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI(mutex) do {} while (0) + +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + + #define MPIDUI_THREAD_CS_ENTER_ST_GLOBAL MPIDUI_THREAD_CS_ENTER_ST + #define MPIDUI_THREAD_CS_ENTER_ST_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI(mutex) MPIDUI_THREAD_CS_ENTER_ST(mutex) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI(mutex) MPIDUI_THREAD_CS_ENTER_ST(mutex) + + #endif /* MPICH_THREAD_GRANULARITY */ + +@@ -214,8 +214,8 @@ M*/ + + #define MPIDUI_THREAD_CS_ENTER_ST_GLOBAL(mutex) do {} while (0) + #define MPIDUI_THREAD_CS_ENTER_ST_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI(mutex) do {} while (0) + + #endif /* MPICH_IS_THREADED */ + +@@ -237,9 +237,9 @@ M*/ + if (MPIR_ThreadInfo.isThreaded) { \ + int err_ = 0; \ + MPL_DBG_MSG(MPIR_DBG_THREAD, TYPICAL, "non-recursive try locking mutex"); \ +- MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPIDU_Thread_mutex_lock %p", &mutex); \ ++ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPIDU_Thread_mutex_trylock %p", &mutex); \ + MPIDU_Thread_mutex_trylock(&mutex, &err_, &cs_acq); \ +- MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPIDU_Thread_mutex_lock %p", &mutex); \ ++ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPIDU_Thread_mutex_trylock %p", &mutex); \ + MPIR_Assert(err_ == 0); \ + } \ + } while (0) +@@ -271,22 +271,22 @@ M*/ + + #define MPIDUI_THREAD_CS_TRYENTER_GLOBAL(mutex,cs_acq) + #define MPIDUI_THREAD_CS_TRYENTER_POBJ(mutex,cs_acq) +-#define MPIDUI_THREAD_CS_TRYENTER_VNI_GLOBAL(mutex,cs_acq) +-#define MPIDUI_THREAD_CS_TRYENTER_VNI(mutex,cs_acq) ++#define MPIDUI_THREAD_CS_TRYENTER_VCI_GLOBAL(mutex,cs_acq) ++#define MPIDUI_THREAD_CS_TRYENTER_VCI(mutex,cs_acq) + + #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ + + #define MPIDUI_THREAD_CS_TRYENTER_POBJ(mutex,cs_acq) + #define MPIDUI_THREAD_CS_TRYENTER_GLOBAL(mutex,cs_acq) +-#define MPIDUI_THREAD_CS_TRYENTER_VNI_GLOBAL(mutex,cs_acq) +-#define MPIDUI_THREAD_CS_TRYENTER_VNI(mutex,cs_acq) ++#define MPIDUI_THREAD_CS_TRYENTER_VCI_GLOBAL(mutex,cs_acq) ++#define MPIDUI_THREAD_CS_TRYENTER_VCI(mutex,cs_acq) + +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + + #define MPIDUI_THREAD_CS_TRYENTER_GLOBAL(mutex,cs_acq) + #define MPIDUI_THREAD_CS_TRYENTER_POBJ(mutex,cs_acq) +-#define MPIDUI_THREAD_CS_TRYENTER_VNI_GLOBAL(mutex, cs_acq) +-#define MPIDUI_THREAD_CS_TRYENTER_VNI(mutex,cs_acq) MPIDUI_THREAD_CS_TRYENTER_REC(mutex,cs_acq) ++#define MPIDUI_THREAD_CS_TRYENTER_VCI_GLOBAL(mutex, cs_acq) ++#define MPIDUI_THREAD_CS_TRYENTER_VCI(mutex,cs_acq) MPIDUI_THREAD_CS_TRYENTER_REC(mutex,cs_acq) + + #endif /* MPICH_THREAD_GRANULARITY */ + +@@ -294,8 +294,8 @@ M*/ + + #define MPIDUI_THREAD_CS_TRYENTER_GLOBAL(mutex, cs_acq) + #define MPIDUI_THREAD_CS_TRYENTER_POBJ(mutex, cs_acq) +-#define MPIDUI_THREAD_CS_TRYENTER_VNI_GLOBAL(mutex, cs_acq) +-#define MPIDUI_THREAD_CS_TRYENTER_VNI(mutex, cs_acq) ++#define MPIDUI_THREAD_CS_TRYENTER_VCI_GLOBAL(mutex, cs_acq) ++#define MPIDUI_THREAD_CS_TRYENTER_VCI(mutex, cs_acq) + + #endif /* MPICH_IS_THREADED */ + +@@ -343,22 +343,22 @@ M*/ + + #define MPIDUI_THREAD_CS_EXIT_GLOBAL MPIDUI_THREAD_CS_EXIT_REC + #define MPIDUI_THREAD_CS_EXIT_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_VNI_GLOBAL MPIDUI_THREAD_CS_EXIT_GLOBAL +-#define MPIDUI_THREAD_CS_EXIT_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_VCI_GLOBAL MPIDUI_THREAD_CS_EXIT_GLOBAL ++#define MPIDUI_THREAD_CS_EXIT_VCI(mutex) do {} while (0) + + #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ + + #define MPIDUI_THREAD_CS_EXIT_POBJ MPIDUI_THREAD_CS_EXIT_NREC + #define MPIDUI_THREAD_CS_EXIT_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_VCI(mutex) do {} while (0) + +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + + #define MPIDUI_THREAD_CS_EXIT_GLOBAL MPIDUI_THREAD_CS_EXIT_REC + #define MPIDUI_THREAD_CS_EXIT_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_VNI(mutex) MPIDUI_THREAD_CS_EXIT_REC(mutex) ++#define MPIDUI_THREAD_CS_EXIT_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_VCI(mutex) MPIDUI_THREAD_CS_EXIT_REC(mutex) + + #endif /* MPICH_THREAD_GRANULARITY */ + +@@ -366,13 +366,13 @@ M*/ + + #define MPIDUI_THREAD_CS_EXIT_GLOBAL(mutex) do {} while (0) + #define MPIDUI_THREAD_CS_EXIT_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_VCI(mutex) do {} while (0) + + #endif /* MPICH_IS_THREADED */ + + /* Stateful non-recursive version of CS_EXIT. +- * It takes a MPIDU_thread_state_t variable to pass the state between ++ * It takes a MPIDU_thread_mutex_state_t variable to pass the state between + * ENTER and EXIT. */ + + #define MPIDU_THREAD_CS_EXIT_ST(name, mutex, st) MPIDUI_THREAD_CS_EXIT_ST_##name(mutex,st) +@@ -392,29 +392,33 @@ M*/ + mutex.count = 0; \ + MPIDU_Thread_mutex_unlock(&mutex, &err_); \ + MPIR_Assert(err_ == 0); \ +- } \ ++ } else { \ ++ /* silence warnings: -Wmaybe-uninitialized */ \ ++ st.owner = 0; \ ++ st.count = 0; \ ++ } \ + } while (0) + + #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL + + #define MPIDUI_THREAD_CS_EXIT_ST_GLOBAL MPIDUI_THREAD_CS_EXIT_ST + #define MPIDUI_THREAD_CS_EXIT_ST_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_ST_VNI_GLOBAL MPIDUI_THREAD_CS_EXIT_GLOBAL +-#define MPIDUI_THREAD_CS_EXIT_ST_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_ST_VCI_GLOBAL MPIDUI_THREAD_CS_EXIT_GLOBAL ++#define MPIDUI_THREAD_CS_EXIT_ST_VCI(mutex) do {} while (0) + + #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ + + #define MPIDUI_THREAD_CS_EXIT_ST_POBJ(mutex) MPIDUI_THREAD_CS_EXIT_ST(mutex) + #define MPIDUI_THREAD_CS_EXIT_ST_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_ST_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_ST_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_ST_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_ST_VCI(mutex) do {} while (0) + +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + + #define MPIDUI_THREAD_CS_EXIT_ST_GLOBAL MPIDUI_THREAD_CS_EXIT_ST + #define MPIDUI_THREAD_CS_EXIT_ST_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_ST_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_EXIT_ST_VNI(mutex) MPIDUI_THREAD_CS_EXIT_ST(mutex) ++#define MPIDUI_THREAD_CS_EXIT_ST_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_EXIT_ST_VCI(mutex) MPIDUI_THREAD_CS_EXIT_ST(mutex) + + #endif /* MPICH_THREAD_GRANULARITY */ + +@@ -422,8 +426,8 @@ M*/ + + #define MPIDUI_THREAD_CS_ENTER_ST_GLOBAL(mutex) do {} while (0) + #define MPIDUI_THREAD_CS_ENTER_ST_POBJ(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI_GLOBAL(mutex) do {} while (0) +-#define MPIDUI_THREAD_CS_ENTER_ST_VNI(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_ENTER_ST_VCI(mutex) do {} while (0) + + #endif /* MPICH_IS_THREADED */ + +@@ -453,7 +457,7 @@ M*/ + } \ + } while (0) + +-#define MPIDUI_THREAD_CS_YIELD_VNI_GLOBAL(mutex) MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) ++#define MPIDUI_THREAD_CS_YIELD_VCI_GLOBAL(mutex) MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) + #define MPIDUI_THREAD_CS_YIELD_POBJ(mutex) do {} while (0) + + #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ +@@ -469,7 +473,7 @@ M*/ + } while (0) + #define MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) do {} while (0) + +-#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VNI ++#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__VCI + + #define MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) \ + do { \ +@@ -487,8 +491,8 @@ M*/ + } \ + } \ + } while (0) +-#define MPIDUI_THREAD_CS_YIELD_VNI(mutex) MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) +-#define MPIDUI_THREAD_CS_YIELD_VNI_GLOBAL(mutex) do {} while (0) ++#define MPIDUI_THREAD_CS_YIELD_VCI(mutex) MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) ++#define MPIDUI_THREAD_CS_YIELD_VCI_GLOBAL(mutex) do {} while (0) + #define MPIDUI_THREAD_CS_YIELD_POBJ(mutex) do {} while (0) + + #endif /* MPICH_THREAD_GRANULARITY */ +@@ -564,7 +568,7 @@ M*/ + MPIDU_Thread_mutex_unlock(mutex_ptr_, err_ptr_); \ + MPIR_Assert(*err_ptr_ == 0); \ + MPL_thread_yield(); \ +- MPIDU_Thread_mutex_lock_l(mutex_ptr_, err_ptr_); \ ++ MPIDU_Thread_mutex_lock(mutex_ptr_, err_ptr_, MPL_THREAD_PRIO_LOW);\ + MPIR_Assert((mutex_ptr_)->count == 0); \ + (mutex_ptr_)->count = saved_count_; \ + (mutex_ptr_)->owner = saved_owner_; \ +@@ -579,10 +583,8 @@ M*/ + MPL_thread_mutex_create(mutex_ptr_, err_ptr_) + #define MPIDUI_thread_mutex_destroy(mutex_ptr_, err_ptr_) \ + MPL_thread_mutex_destroy(mutex_ptr_, err_ptr_) +-#define MPIDUI_thread_mutex_lock(mutex_ptr_, err_ptr_) \ +- MPL_thread_mutex_lock(mutex_ptr_, err_ptr_) +-#define MPIDUI_thread_mutex_lock_l(mutex_ptr_, err_ptr_) \ +- MPL_thread_mutex_lock(mutex_ptr_, err_ptr_) ++#define MPIDUI_thread_mutex_lock(mutex_ptr_, err_ptr_, prio_) \ ++ MPL_thread_mutex_lock(mutex_ptr_, err_ptr_, prio_) + #define MPIDUI_thread_mutex_trylock(mutex_ptr_, err_ptr_, cs_acq_ptr_) \ + MPL_thread_mutex_trylock(mutex_ptr_, err_ptr_, cs_acq_ptr_) + #define MPIDUI_thread_mutex_unlock(mutex_ptr_, err_ptr_) \ +@@ -608,18 +610,20 @@ do { \ + do { \ + *err_ptr_ = zm_lock_destroy(mutex_ptr_); \ + } while (0) +-#define MPIDUI_thread_mutex_lock(mutex_ptr_, err_ptr_) \ ++#define MPIDUI_thread_mutex_lock(mutex_ptr_, err_ptr_, prio_) \ + do { \ +- *err_ptr_ = zm_lock_acquire(mutex_ptr_); \ ++ if (prio_ == MPL_THREAD_PRIO_HIGH) { \ ++ *err_ptr_ = zm_lock_acquire(mutex_ptr_); \ ++ } else { \ ++ MPIR_Assert(prio_ == MPL_THREAD_PRIO_LOW) \ ++ *err_ptr_ = zm_lock_acquire_l(mutex_ptr_); \ ++ } + } while (0) ++ + #define MPIDUI_thread_mutex_trylock(mutex_ptr_, err_ptr_, cs_acq_ptr_) \ + do { \ + *err_ptr_ = zm_lock_tryacq(mutex_ptr_, cs_acq_ptr_); \ + } while (0) +-#define MPIDUI_thread_mutex_lock_l(mutex_ptr_, err_ptr_) \ +-do { \ +- *err_ptr_ = zm_lock_acquire_l(mutex_ptr_); \ +-} while (0) + #define MPIDUI_thread_mutex_unlock(mutex_ptr_, err_ptr_) \ + do { \ + *err_ptr_ = zm_lock_release(mutex_ptr_); \ +@@ -690,39 +694,22 @@ do { \ + Input Parameter: + . mutex - mutex + @*/ +-#define MPIDU_Thread_mutex_lock(mutex_ptr_, err_ptr_) \ ++#define MPIDU_Thread_mutex_lock(mutex_ptr_, err_ptr_, prio_) \ + do { \ + OPA_incr_int(&(mutex_ptr_)->num_queued_threads); \ + MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPIDUI_thread_mutex_lock %p", &(mutex_ptr_)->mutex); \ +- MPIDUI_thread_mutex_lock(&(mutex_ptr_)->mutex, err_ptr_); \ ++ MPIDUI_thread_mutex_lock(&(mutex_ptr_)->mutex, err_ptr_, prio_);\ + MPIR_Assert(*err_ptr_ == 0); \ + MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPIDUI_thread_mutex_lock %p", &(mutex_ptr_)->mutex); \ + OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \ + } while (0) + +-/*@ +- MPIDU_Thread_lock_l - acquire a mutex with a low priority +- +- Input Parameter: +-. mutex - mutex +-@*/ +- +-#define MPIDU_Thread_mutex_lock_l(mutex_ptr_, err_ptr_) \ +- do { \ +- OPA_incr_int(&(mutex_ptr_)->num_queued_threads); \ +- MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPIDUI_thread_mutex_lock_l %p", &(mutex_ptr_)->mutex); \ +- MPIDUI_thread_mutex_lock_l(&(mutex_ptr_)->mutex, err_ptr_); \ +- MPIR_Assert(*err_ptr_ == 0); \ +- MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPIDUI_thread_mutex_lock_l %p", &(mutex_ptr_)->mutex); \ +- OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \ +- } while (0) +- + #define MPIDU_Thread_mutex_trylock(mutex_ptr_, err_ptr_, cs_acq_ptr) \ + do { \ +- MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPL_thread_mutex_lock %p", &(mutex_ptr_)->mutex); \ ++ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPIDUI_thread_mutex_trylock %p", &(mutex_ptr_)->mutex); \ + MPIDUI_thread_mutex_trylock(&(mutex_ptr_)->mutex, err_ptr_, cs_acq_ptr);\ + MPIR_Assert(*err_ptr_ == 0); \ +- MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPL_thread_mutex_lock %p", &(mutex_ptr_)->mutex); \ ++ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPIDUI_thread_mutex_trylock %p", &(mutex_ptr_)->mutex); \ + } while (0) + + /*@ +--- a/src/mpl/Makefile.am ++++ b/src/mpl/Makefile.am +@@ -10,6 +10,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include + lib@MPLLIBNAME@_la_SOURCES = + lib@MPLLIBNAME@_la_LDFLAGS = ${lib@MPLLIBNAME@_so_versionflags} + ++noinst_HEADERS = + include src/Makefile.mk + + MPL_TESTS = strsep +@@ -35,7 +36,7 @@ mpl_headers = \ + include/mpl_shm.h + + if MPL_EMBEDDED_MODE +-noinst_HEADERS = $(mpl_headers) ++noinst_HEADERS += $(mpl_headers) + noinst_LTLIBRARIES = lib@MPLLIBNAME@.la + else !MPL_EMBEDDED_MODE + include_HEADERS = $(mpl_headers) +--- a/src/mpl/configure.ac ++++ b/src/mpl/configure.ac +@@ -14,7 +14,8 @@ AC_CONFIG_MACRO_DIR(confdb) + AM_INIT_AUTOMAKE([subdir-objects] [-Wall -Werror foreign 1.12.3]) + + dnl must come before LT_INIT, which AC_REQUIREs AC_PROG_CC +-PAC_PROG_CC ++AC_PROG_CC ++AC_PROG_CC_C99 + AM_PROG_CC_C_O + + AC_USE_SYSTEM_EXTENSIONS +@@ -54,6 +55,7 @@ AC_C_INLINE + + PAC_C_MACRO_VA_ARGS + PAC_C_BUILTIN_EXPECT ++PAC_C_STATIC_ASSERT + + AC_ARG_ENABLE(embedded, + AC_HELP_STRING([--enable-embedded], [Build MPL in embedded mode (default is no)]), +@@ -71,7 +73,7 @@ AC_ARG_ENABLE(g, + none|no - No debugging + log - Enable debug event logging + mem - Enable memory tracing +- yes|all - All of the above choices (except "none", obviously) ++ most|yes|all - All of the above choices (except "none", obviously) + ]),,[enable_g=none]) + + # enable-g +@@ -84,11 +86,11 @@ for option in $enable_g ; do + enable_g_log=yes + ;; + +- mem) ++ mem|memarena) + enable_g_mem=yes + ;; + +- all|yes) ++ most|yes|all) + enable_g_log=yes + enable_g_mem=yes + ;; +@@ -614,36 +616,12 @@ AS_CASE([$enable_yield], + ####################################################################### + ## START OF THREADS CODE + ####################################################################### +-PAC_SET_HEADER_LIB_PATH(uti) + +-AC_ARG_WITH([thread-package], +-[ --with-thread-package=package Thread package to use. Supported thread packages include: +- posix or pthreads - POSIX threads (default, if required) +- solaris - Solaris threads (Solaris OS only) +- abt or argobots - Argobots threads +- win - windows threads +- uti - POSIX threads plus Utility Thread Offloading library +- none - no threads +-],,with_thread_package=posix) +- +-if test "${thread_pkg_required}" = "no" -o "${with_thread_package}" = "no" ; then +- with_thread_package=none +-fi +- +-if test "${with_thread_package}" = "yes" ; then +- with_thread_package=posix +-fi +- +-if test "${thread_pkg_required}" = "yes" -a "${with_thread_package}" = "none" ; then +- AC_ERROR([if no thread package is available, use --enable-threads=single or funneled]) +-fi ++PAC_ARG_THREAD_PACKAGE + + THREAD_PACKAGE_NAME=MPL_THREAD_PACKAGE_INVALID + case $with_thread_package in +- posix|pthreads|uti) +- if test "${with_thread_package}" = "pthreads" ; then +- with_thread_package=posix +- fi ++ yes|posix|pthreads|uti) + AC_CHECK_HEADERS(pthread.h) + + # If pthreads library is found, just include it on the link line. We don't try +@@ -663,37 +641,8 @@ case $with_thread_package in + # this check should come after the AC_CHECK_LIB for -lpthread + AC_CHECK_FUNC([pthread_key_create],[],[AC_MSG_ERROR([unable to find pthreads library])]) + +- # Check for a routine that specify a routine to call on +- # thread exit. We can use this to release memory that may +- # be allocated by the MPL library in the thread. +- # A complication: pthread_cleanup_push may be a macro; in that +- # case, check_funcs will fail to find it. +- # Under OSX, pthread_cleanup_push and pop are macros that must +- # appear together in the same lexical scope, and hence are +- # really useless in libraries that may allocate data within +- # a user-managed thread. +- AC_CHECK_FUNCS(pthread_cleanup_push) +- if test "$ac_cv_func_pthread_cleanup_push" = "no" ; then +- AC_CACHE_CHECK([whether pthread_cleanup_push is available (may be a macro in pthread.h)],pac_cv_func_pthread_cleanup_push,[ +- AC_TRY_LINK([ +-#include +-void f1(void *a) { return; }], +-[pthread_cleanup_push( f1, (void *)0 );], +- pac_cv_func_pthread_cleanup_push=yes, +- pac_cv_func_pthread_cleanup_push=no)]) +- if test "$pac_cv_func_pthread_cleanup_push" = yes ; then +- AC_DEFINE(HAVE_PTHREAD_CLEANUP_PUSH_MACRO,1,[Define if pthread_cleanup_push is available, even as a macro]) +- fi +- +- fi +- + if test "${with_thread_package}" = "uti" ; then +- PAC_CHECK_HEADER_LIB(uti.h,uti,uti_attr_init,have_uti=yes,have_uti=no) +- if test "${have_uti}" = "yes" ; then +- AC_MSG_NOTICE([Using POSIX and Utility Thread Offloading library for thread package]) +- else +- AC_MSG_ERROR([Unable to find Utility Thread Offloading library]) +- fi ++ PAC_CHECK_HEADER_LIB_FATAL(uti,uti.h,uti,uti_attr_init) + THREAD_PACKAGE_NAME=MPL_THREAD_PACKAGE_UTI + else + AC_MSG_NOTICE([POSIX will be used for thread package.]) +@@ -717,14 +666,7 @@ void f1(void *a) { return; }], + ;; + abt|argobots) + with_thread_package=argobots +- AC_CHECK_HEADERS(abt.h) +- AC_CHECK_LIB([abt],[abt_key_create],have_abt=yes) +- if test "$have_abt" = "yes"; then +- PAC_PREPEND_FLAG([-labt],[LIBS]) +- fi +- AC_CHECK_FUNCS(ABT_thread_yield) +- AC_CHECK_FUNC([abt_key_create],[],[AC_MSG_ERROR([unable to find Argobots library])]) +- AC_CHECK_FUNCS(abt_cleanup_push) ++ PAC_CHECK_HEADER_LIB_FATAL([argobots], [abt.h], [abt], [ABT_key_create]) + THREAD_PACKAGE_NAME=MPL_THREAD_PACKAGE_ARGOBOTS + ;; + no|none) +@@ -740,9 +682,9 @@ esac + # know what's used in MPL + AC_DEFINE_UNQUOTED([THREAD_PACKAGE_NAME],[$THREAD_PACKAGE_NAME],[set to the name of the thread package]) + +-# check for compiler-support for thread-local storage (MPL_TLS_SPECIFIER) ++# check for compiler-support for thread-local storage (MPL_TLS) + if test "${with_thread_package}" != "argobots" ; then +- AX_TLS ++ AX_TLS([], AC_MSG_WARN([thread-local storage not supported by the compiler.])) + fi + + ####################################################################### +@@ -791,9 +733,6 @@ case $with_proc_mutex_package in + AC_CHECK_FUNC([pthread_mutex_init],[],[AC_MSG_ERROR([unable to find pthreads library])]) + # pthread_mutexattr_setpshared is first released in Issue 5 + AC_CHECK_FUNCS(pthread_mutexattr_setpshared) +- if test "$ac_cv_func_pthread_mutexattr_setpshared" = "no" ; then +- AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_SETPSHARED,1, [Define if pthread_mutexattr_setpshared is available.]) +- fi + + AC_MSG_NOTICE([POSIX will be used for interprocess mutex package.]) + PROC_MUTEX_PACKAGE_NAME=MPL_PROC_MUTEX_PACKAGE_POSIX +@@ -833,7 +772,7 @@ if test "${with_thread_package}" = "pthreads" -o "${with_proc_mutex_package}" = + pac_cv_has_pthread_mutex_errorcheck=no)]) + + if test "$pac_cv_has_pthread_mutex_errorcheck" = yes ; then +- AC_DEFINE(PTHREAD_MUTEX_ERRORCHECK_VALUE,PTHREAD_MUTEX_ERRORCHECK_NPRRORCHECK, ++ AC_DEFINE(PTHREAD_MUTEX_ERRORCHECK_VALUE,PTHREAD_MUTEX_ERRORCHECK, + [Define to an expression that will result in an error checking mutex type.]) + elif test "$pac_cv_has_pthread_mutex_errorcheck_np" = yes ; then + AC_DEFINE(PTHREAD_MUTEX_ERRORCHECK_VALUE,PTHREAD_MUTEX_ERRORCHECK_NP, +@@ -955,47 +894,8 @@ if test "$ac_cv_func_posix_memalign" = "yes" -o "$ac_cv_func_aligned_alloc" = "y + AC_DEFINE([DEFINE_ALIGNED_ALLOC],[1],[Define to 1 if MPL enables MPL_aligned_alloc.]) + fi + +-AC_CHECK_FUNCS(backtrace_symbols) +- +-# Check for libbacktrace support +-PAC_PUSH_FLAG([LIBS]) +-PAC_PREPEND_FLAG([-lbacktrace],[LIBS]) +-AC_LINK_IFELSE([ +- AC_LANG_PROGRAM([ +-#include +-],[ +-backtrace_create_state(0, 0, 0, 0); +-backtrace_print(0, 0, 0); +-])], +- [ac_cv_lib_backtrace=yes], +- [ac_cv_lib_backtrace=no] +-) +-PAC_POP_FLAG([LIBS]) +- +-if test "$ac_cv_lib_backtrace" = "yes" ; then +- AC_DEFINE([HAVE_LIBBACKTRACE],[1],[Define to 1 if you have the backtrace header (backtrace.h) and library (-lbacktrace)]) +- PAC_PREPEND_FLAG([-lbacktrace],[LIBS]) +-fi +-AC_CHECK_DECLS([backtrace_create_state, backtrace_print]) +- +-# Check for libunwind support +-PAC_PUSH_FLAG([LIBS]) +-PAC_PREPEND_FLAG([-lunwind],[LIBS]) +-AC_LINK_IFELSE([ +- AC_LANG_PROGRAM([ +-#include +-],[ +-unw_backtrace(0, 0); +-])], +- [ac_cv_lib_libunwind=yes], +- [ac_cv_lib_libunwind=no] +-) +-PAC_POP_FLAG([LIBS]) +- +-if test "$ac_cv_lib_libunwind" = "yes" ; then +- AC_DEFINE([HAVE_LIBUNWIND],[1],[Define to 1 if you have the libunwind header (libunwind.h) and library (-lunwind)]) +- PAC_PREPEND_FLAG([-lunwind],[LIBS]) +-fi ++# Check for execinfo backtrace support ++AX_EXECINFO + + AX_LIB_SOCKET_NSL + AC_CHECK_HEADERS(ifaddrs.h arpa/inet.h) +--- a/src/mpl/include/mpl_base.h ++++ b/src/mpl/include/mpl_base.h +@@ -104,6 +104,20 @@ + #define likely(x_) (x_) + #endif + ++#ifdef MPL_HAVE_C11__STATIC_ASSERT ++#define MPL_static_assert(cond_,msg_) _Static_assert(cond_,msg_) ++#else ++/* A hack: ++ When cond_ is false, result in compile-time duplicated case error. ++ When cond_ is true, compiler should optimize it away. ++ Since it is compile time error, we don't care (much) about how the error message look. ++ */ ++#define MPL_static_assert(cond_,msg_) \ ++ do { switch(0) { case 0: case (cond_): default: break; } } while (0) ++#endif ++ ++#define MPL_COMPILE_TIME_ASSERT(cond_) MPL_static_assert(cond_, "MPL_COMPILE_TIME_ASSERT failure") ++ + #define MPL_QUOTE(A) MPL_QUOTE2(A) + #define MPL_QUOTE2(A) #A + +@@ -157,4 +171,7 @@ typedef bool _Bool; + #define __bool_true_false_are_defined 1 + #endif + ++#define MPL_ROUND_UP_ALIGN(a, alignment) (((a) + ((alignment) - 1)) & (~((alignment) - 1))) ++#define MPL_ROUND_DOWN_ALIGN(a, alignment) ((a) & (~((alignment) - 1))) ++ + #endif /* MPL_BASE_H_INCLUDED */ +--- a/src/mpl/include/mpl_bt.h ++++ b/src/mpl/include/mpl_bt.h +@@ -13,20 +13,6 @@ + extern "C" { + #endif + +-#if !MPL_HAVE_DECL_BACKTRACE_CREATE_STATE +- struct backtrace_state; +- typedef void (*backtrace_error_callback) (void *data, const char *msg, int errnum); +- +- extern struct backtrace_state *backtrace_create_state(const char *filename, int threaded, +- backtrace_error_callback error_callback, +- void *data); +-#endif +-#if !MPL_HAVE_DECL_BACKTRACE_PRINT +- extern void backtrace_print(struct backtrace_state *state, int skip, FILE *); +-#endif +- +-#define MPL_BACKTRACE_BUFFER_LEN 1024 +-#define MPL_MAX_TRACE_DEPTH 32 + void MPL_backtrace_show(FILE * output); + + #if defined(__cplusplus) +--- a/src/mpl/include/mpl_dbg.h ++++ b/src/mpl/include/mpl_dbg.h +@@ -8,6 +8,7 @@ + #define MPL_DBG_H_INCLUDED + + #include "mplconfig.h" ++#include + + /* + * Multilevel debugging and tracing macros. +@@ -70,7 +71,9 @@ + { \ + if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \ + char _s[MPL_DBG_MAXLINE]; \ +- MPL_snprintf _fmatargs ; \ ++ int _ret = MPL_snprintf _fmatargs ; \ ++ /* by checking _ret, we supress -Wformat-trunction in gcc-8 */ \ ++ assert(_ret >= 0); \ + MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _s); \ + } \ + } +--- a/src/mpl/include/mpl_shm_mmap.h ++++ b/src/mpl/include/mpl_shm_mmap.h +@@ -7,6 +7,12 @@ + #ifndef MPL_SHM_MMAP_H_INCLUDED + #define MPL_SHM_MMAP_H_INCLUDED + ++#include ++ ++#ifdef MPL_HAVE_SYS_MMAN_H ++#include ++#endif ++ + typedef intptr_t MPLI_shm_lhnd_t; + + typedef char *MPLI_shm_ghnd_t; +--- a/src/mpl/include/mpl_shm_sysv.h ++++ b/src/mpl/include/mpl_shm_sysv.h +@@ -7,6 +7,10 @@ + #ifndef MPL_SHM_SYSV_H_INCLUDED + #define MPL_SHM_SYSV_H_INCLUDED + ++#include ++#include ++#include ++ + typedef int MPLI_shm_lhnd_t; + + typedef char *MPLI_shm_ghnd_t; +--- a/src/mpl/include/mpl_shm_win.h ++++ b/src/mpl/include/mpl_shm_win.h +@@ -7,7 +7,10 @@ + #ifndef MPL_SHM_WIN_H_INCLUDED + #define MPL_SHM_WIN_H_INCLUDED + +-typedef HANDLE MPL_shm_lhnd_t; ++#include ++#include ++ ++typedef HANDLE MPLI_shm_lhnd_t; + + typedef char *MPLI_shm_ghnd_t; + /* The local handle, lhnd, is valid only for the current process, +--- a/src/mpl/include/mpl_thread.h ++++ b/src/mpl/include/mpl_thread.h +@@ -18,6 +18,9 @@ + #define MPL_THREAD_PACKAGE_UTI 5 + #define MPL_THREAD_PACKAGE_ARGOBOTS 6 + ++#define MPL_THREAD_PRIO_HIGH 0 ++#define MPL_THREAD_PRIO_LOW 1 ++ + #if defined(MPL_THREAD_PACKAGE_NAME) && (MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_POSIX || MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_UTI) + #include "mpl_thread_posix.h" + #elif defined(MPL_THREAD_PACKAGE_NAME) && (MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_SOLARIS) +--- a/src/mpl/include/mpl_thread_argobots.h ++++ b/src/mpl/include/mpl_thread_argobots.h +@@ -14,6 +14,7 @@ + #include "abt.h" + + #include ++#include + + typedef ABT_mutex MPL_thread_mutex_t; + typedef ABT_cond MPL_thread_cond_t; +@@ -24,19 +25,39 @@ typedef ABT_key MPL_thread_tls_t; + * Creation and misc + * ======================================================================*/ + ++#define MPL_thread_init(err_ptr_) \ ++ do { \ ++ int err__; \ ++ err__ = ABT_init(0, NULL); \ ++ if (unlikely(err__)) \ ++ MPL_internal_sys_error_printf("ABT_init", err__, \ ++ " %s:%d\n", __FILE__, __LINE__); \ ++ *(int *)(err_ptr_) = err__; \ ++ } while (0) ++ ++#define MPL_thread_finalize(err_ptr_) \ ++ do { \ ++ int err__; \ ++ err__ = ABT_finalize(); \ ++ if (unlikely(err__)) \ ++ MPL_internal_sys_error_printf("ABT_finalize", err__, \ ++ " %s:%d\n", __FILE__, __LINE__); \ ++ *(int *)(err_ptr_) = err__; \ ++ } while (0) ++ + /* MPL_thread_create() defined in mpiu_thread_argobots.c */ + typedef void (*MPL_thread_func_t) (void *data); + void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * idp, int *errp); + + #define MPL_thread_exit() +-#define MPL_thread_self(id_) +-#define MPL_thread_same(id1_, id2_, same_) ++#define MPL_thread_self(id_) ABT_thread_self_id(id_) ++#define MPL_thread_same(id1_, id2_, same_) ABT_thread_equal(id1_, id2_, same_) + + /* ====================================================================== + * Scheduling + * ======================================================================*/ + +-#define MPL_thread_yield MPL_sched_yield ++#define MPL_thread_yield ABT_thread_yield + + /* ====================================================================== + * Mutexes +@@ -61,27 +82,39 @@ void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * idp + *(int *)(err_ptr_) = err__; \ + } while (0) + +-#define MPL_thread_mutex_lock(mutex_ptr_, err_ptr_) \ ++#define MPL_thread_mutex_lock(mutex_ptr_, err_ptr_, prio_) \ + do { \ + int err__; \ +- err__ = ABT_mutex_lock(*mutex_ptr_); \ ++ if (prio_ == MPL_THREAD_PRIO_HIGH) { \ ++ err__ = ABT_mutex_lock(*mutex_ptr_); \ ++ } else { \ ++ assert(prio_ == MPL_THREAD_PRIO_LOW); \ ++ err__ = ABT_mutex_lock_low(*mutex_ptr_); \ ++ } \ + if (unlikely(err__)) \ + MPL_internal_sys_error_printf("ABT_mutex_lock", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ + *(int *)(err_ptr_) = err__; \ + } while (0) + +-#define MPL_thread_mutex_lock_low(mutex_ptr_, err_ptr_) \ +- do { \ +- int err__; \ +- err__ = ABT_mutex_lock_low(*mutex_ptr_); \ +- if (unlikely(err__)) \ +- MPL_internal_sys_error_printf("ABT_mutex_lock_low", err__, \ ++#define MPL_thread_mutex_trylock(mutex_ptr_, err_ptr_, cs_acq_ptr) \ ++ do { \ ++ int err__; \ ++ *(int*)cs_acq_ptr = 1; \ ++ err__ = ABT_mutex_trylock(mutex_ptr_); \ ++ if (unlikely(err__ != ABT_SUCCESS && err__ != ABT_ERR_MUTEX_LOCKED)) { \ ++ *(int*)cs_acq_ptr = 0; \ ++ MPL_internal_sys_error_printf("ABT_mutex_trylock", err__, \ + " %s:%d\n", __FILE__, __LINE__); \ +- *(int *)(err_ptr_) = err__; \ ++ } \ ++ else { \ ++ if (unlikely(err__ != 0)) \ ++ *(int*)cs_acq_ptr = 0; \ ++ err__ = 0; \ ++ } \ ++ *(int *)(err_ptr_) = err__; \ + } while (0) + +- + #define MPL_thread_mutex_unlock(mutex_ptr_, err_ptr_) \ + do { \ + int err__; \ +@@ -138,10 +171,9 @@ void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * idp + } while (err__ == EINTR); \ + *(int *)(err_ptr_) = err__; \ + if (unlikely(err__)) \ +- MPL_internal_sys_err_printf("ABT_cond_free", err__, \ ++ MPL_internal_sys_error_printf("ABT_cond_free", err__, \ + " %s:%d error in cond_wait on cond=%p mutex=%p err__=%d", \ +- __FILE__, __LINE__, (cond_ptr_),(mutex_ptr_), err__)); \ +- } \ ++ __FILE__, __LINE__); \ + MPL_DBG_MSG_FMT(THREAD,TYPICAL,(MPL_DBG_FDEST, \ + "Exit cond_wait on cond=%p mutex=%p", \ + (cond_ptr_),(mutex_ptr_))); \ +--- a/src/mpl/include/mpl_thread_posix.h ++++ b/src/mpl/include/mpl_thread_posix.h +@@ -28,6 +28,16 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); + typedef void (*MPL_thread_func_t) (void *data); + void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * id, int *err); + ++#define MPL_thread_init(err_ptr_) \ ++ do { \ ++ *(int *)(err_ptr_) = 0; \ ++ } while (0) ++ ++#define MPL_thread_finalize(err_ptr_) \ ++ do { \ ++ *(int *)(err_ptr_) = 0; \ ++ } while (0) ++ + #define MPL_thread_exit() \ + do { \ + pthread_exit(NULL); \ +@@ -103,7 +113,7 @@ void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * id, + } while (0) + + +-#define MPL_thread_mutex_lock(mutex_ptr_, err_ptr_) \ ++#define MPL_thread_mutex_lock(mutex_ptr_, err_ptr_, prio_) \ + do { \ + int err__; \ + err__ = pthread_mutex_lock(mutex_ptr_); \ +--- a/src/mpl/include/mpl_thread_priv.h ++++ b/src/mpl/include/mpl_thread_priv.h +@@ -7,7 +7,7 @@ + #ifndef MPL_THREAD_PRIV_H_INCLUDED + #define MPL_THREAD_PRIV_H_INCLUDED + +-#if MPL_THREAD_PACKAGE_NAME != MPL_THREAD_PACKAGE_NONE && !defined(MPL_TLS_SPECIFIER) ++#if MPL_THREAD_PACKAGE_NAME != MPL_THREAD_PACKAGE_NONE && !defined(MPL_TLS) + /* We need to provide a function that will cleanup the storage attached + * to the key. */ + void MPLI_cleanup_tls(void *a); +@@ -71,8 +71,7 @@ void MPLI_cleanup_tls(void *a); + if (unlikely(*((int *) err_ptr_))) \ + break; \ + \ +- if (thread_ptr) \ +- MPL_free(thread_ptr); \ ++ MPL_free(thread_ptr); \ + \ + MPL_thread_tls_set(&(key), NULL, err_ptr_); \ + if (unlikely(*((int *) err_ptr_))) \ +@@ -81,7 +80,7 @@ void MPLI_cleanup_tls(void *a); + MPL_thread_tls_destroy(&(key), err_ptr_); \ + } while (0) + +-#else /* MPL_THREAD_PACKAGE_NAME != MPL_THREAD_PACKAGE_NONE || defined(MPL_TLS_SPECIFIER) */ ++#else /* MPL_THREAD_PACKAGE_NAME != MPL_THREAD_PACKAGE_NONE || defined(MPL_TLS) */ + + /* We have proper thread-local storage (TLS) support from the compiler, which + * should yield the best performance and simplest code, so we'll use that. */ +--- a/src/mpl/include/mpl_thread_solaris.h ++++ b/src/mpl/include/mpl_thread_solaris.h +@@ -22,6 +22,16 @@ void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * id, + * Threads + */ + ++#define MPL_thread_init(err_ptr_) \ ++ do { \ ++ *(int *)(err_ptr_) = 0; \ ++ } while (0) ++ ++#define MPL_thread_finalize(err_ptr_) \ ++ do { \ ++ *(int *)(err_ptr_) = 0; \ ++ } while (0) ++ + #define MPL_thread_exit() \ + do { \ + thr_exit(NULL); \ +@@ -66,7 +76,7 @@ void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * id, + } \ + } while (0) + +-#define MPL_thread_mutex_lock(mutex_ptr_, err_ptr_) \ ++#define MPL_thread_mutex_lock(mutex_ptr_, err_ptr_, prio_) \ + do { \ + if ((err_ptr_) == NULL) { \ + mutex_lock(mutex_ptr_); \ +@@ -77,6 +87,23 @@ void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * id, + } \ + } while (0) + ++#define MPL_thread_mutex_trylock(mutex_ptr_, err_ptr_, cs_acq_ptr) \ ++ do { \ ++ int err__; \ ++ *(int*)cs_acq_ptr = 1; \ ++ err__ = mutex_trylock(mutex_ptr_); \ ++ if (unlikely(err__ != 0 && err__ != EBUSY)) { \ ++ *(int*)cs_acq_ptr = 0; \ ++ } \ ++ else { \ ++ if (unlikely(err__ != 0)) \ ++ *(int*)cs_acq_ptr = 0; \ ++ err__ = 0; \ ++ } \ ++ if (err_ptr_ != NULL) \ ++ *(int *)(err_ptr_) = err__; \ ++ } while (0) ++ + #define MPL_thread_mutex_unlock(mutex_ptr_, err_ptr_) \ + do { \ + if ((err_ptr_) == NULL) { \ +--- a/src/mpl/include/mpl_thread_win.h ++++ b/src/mpl/include/mpl_thread_win.h +@@ -28,6 +28,16 @@ typedef struct MPL_thread_cond_t { + + typedef void (*MPL_thread_func_t) (void *data); + ++#define MPL_thread_init(err_ptr_) \ ++ do { \ ++ *(int *)(err_ptr_) = 0; \ ++ } while (0) ++ ++#define MPL_thread_finalize(err_ptr_) \ ++ do { \ ++ *(int *)(err_ptr_) = 0; \ ++ } while (0) ++ + void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * id, int *err); + void MPL_thread_exit(void); + void MPL_thread_self(MPL_thread_id_t * id); +@@ -36,7 +46,7 @@ void MPL_thread_yield(); + + void MPL_thread_mutex_create(MPL_thread_mutex_t * mutex, int *err); + void MPL_thread_mutex_destroy(MPL_thread_mutex_t * mutex, int *err); +-void MPL_thread_mutex_lock(MPL_thread_mutex_t * mutex, int *err); ++void MPL_thread_mutex_lock(MPL_thread_mutex_t * mutex, int *err, int prio); + void MPL_thread_mutex_unlock(MPL_thread_mutex_t * mutex, int *err); + + void MPL_thread_cond_create(MPL_thread_cond_t * cond, int *err); +--- a/src/mpl/include/mpl_timer.h.in ++++ b/src/mpl/include/mpl_timer.h.in +@@ -166,6 +166,22 @@ int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff); + int MPL_wtime_acc(MPL_time_t * t1, MPL_time_t * t2, MPL_time_t * t3); + + /*@ ++ MPL_wtime_touint - Converts a timestamp to an unsigned int. ++ Input Parameter: ++. timeval - 'MPL_time_t' time stamp ++ ++ Output Parameter: ++. val - unsigned int generated from the timestamp. ++ ++ Notes: ++ This routine may be used for initializing random seeds. The value is not ++ necessary a timestamp if 64-bit to 32-bit conversion happened. ++ ++ ++ @*/ ++int MPL_wtime_touint(MPL_time_t * timeval, unsigned int *val); ++ ++/*@ + MPL_wtime_todouble - Converts a timestamp to a double + + Input Parameter: +@@ -214,36 +230,4 @@ int MPL_wtick(double *); + @*/ + int MPL_wtime_init(void); + +-/* +- * For timers that do not have defined resolutions, compute the resolution +- * by sampling the clock itself. +- * +- */ +-static double tickval = -1.0; +- +-static void init_wtick(void) ATTRIBUTE((unused)); +-static void init_wtick(void) +-{ +- double timediff; +- MPL_time_t t1, t2; +- int cnt; +- int icnt; +- +- tickval = 1.0e6; +- for (icnt = 0; icnt < 10; icnt++) { +- cnt = 1000; +- MPL_wtime(&t1); +- do { +- MPL_wtime(&t2); +- MPL_wtime_diff(&t1, &t2, &timediff); +- if (timediff > 0) +- break; +- } +- while (cnt--); +- if (cnt && timediff > 0.0 && timediff < tickval) { +- MPL_wtime_diff(&t1, &t2, &tickval); +- } +- } +-} +- + #endif /* !defined(MPL_TIMER_H_INCLUDED) */ +--- a/src/mpl/include/mpl_trmem.h ++++ b/src/mpl/include/mpl_trmem.h +@@ -54,8 +54,6 @@ typedef struct { + long num_allocations; /* The total number of alloations */ + } MPL_memory_allocation_t; + +-#ifdef MPL_USE_MEMORY_TRACING +- + /*M + MPL_malloc - Allocate memory + +@@ -86,7 +84,6 @@ typedef struct { + Module: + Utility + M*/ +-#define MPL_malloc(a,b) MPL_trmalloc((a),(b),__LINE__,__FILE__) + + /*M + MPL_calloc - Allocate memory that is initialized to zero. +@@ -108,7 +105,6 @@ typedef struct { + Module: + Utility + M*/ +-#define MPL_calloc(a,b,c) MPL_trcalloc((a),(b),(c),__LINE__,__FILE__) + + /*M + MPL_free - Free memory +@@ -137,9 +133,6 @@ typedef struct { + Module: + Utility + M*/ +-#define MPL_free(a) MPL_trfree(a,__LINE__,__FILE__) +- +-#define MPL_realloc(a,b,c) MPL_trrealloc((a),(b),(c),__LINE__,__FILE__) + + /*M + MPL_mmap - Map memory +@@ -175,7 +168,6 @@ typedef struct { + Module: + Utility + M*/ +-#define MPL_mmap(a,b,c,d,e,f,g) MPL_trmmap((a),(b),(c),(d),(e),(f),(g),__LINE__,__FILE__) + + /*M + MPL_munmap - Unmapmemory +@@ -204,9 +196,7 @@ typedef struct { + Module: + Utility + M*/ +-#define MPL_munmap(a,b,c) MPL_trmunmap((a),(b),(c),__LINE__,__FILE__) + +-#ifdef MPL_DEFINE_ALIGNED_ALLOC + /*M + MPL_aligned_alloc - Allocate aligned memory + +@@ -232,6 +222,34 @@ typedef struct { + Module: + Utility + M*/ ++ ++#ifdef MPL_USE_MEMORY_TRACING ++ ++/* Define these as invalid C to catch their use in the code. ++ * The ::: should cause the compiler to choke; the string will give the explanation ++ */ ++#define malloc(a) 'Error use MPL_malloc' ::: ++#define calloc(a,b) 'Error use MPL_calloc' ::: ++#define free(a) 'Error use MPL_free' ::: ++#define realloc(a) 'Error use MPL_realloc' ::: ++/* These two functions can't be guarded because we use #include ++ * throughout the code to be able to use other symbols in that header file. ++ * Because we include that header directly, we bypass this guard and cause ++ * compile problems. ++ * #define mmap(a,b,c,d,e,f) 'Error use MPL_mmap' ::: ++ * #define munmap(a,b) 'Error use MPL_munmap' ::: ++ */ ++#undef strdup /* in case strdup is a macro */ ++#define strdup(a) 'Error use MPL_strdup' ::: ++ ++#define MPL_malloc(a,b) MPL_trmalloc((a),(b),__LINE__,__FILE__) ++#define MPL_calloc(a,b,c) MPL_trcalloc((a),(b),(c),__LINE__,__FILE__) ++#define MPL_free(a) MPL_trfree(a,__LINE__,__FILE__) ++#define MPL_realloc(a,b,c) MPL_trrealloc((a),(b),(c),__LINE__,__FILE__) ++#define MPL_mmap(a,b,c,d,e,f,g) MPL_trmmap((a),(b),(c),(d),(e),(f),(g),__LINE__,__FILE__) ++#define MPL_munmap(a,b,c) MPL_trmunmap((a),(b),(c),__LINE__,__FILE__) ++ ++#ifdef MPL_DEFINE_ALIGNED_ALLOC + #define MPL_aligned_alloc(a,b,c) MPL_traligned_alloc((a),(b),(c),__LINE__,__FILE__) + #endif /* #ifdef MPL_DEFINE_ALIGNED_ALLOC */ + +--- a/src/mpl/include/uthash.h ++++ b/src/mpl/include/uthash.h +@@ -3,6 +3,7 @@ + * - some configure-time checking for __typeof() support was added + * - intentionally omitted from "mpl.h" in order to require using code to opt-in + * - override malloc/free/realloc to call MPL routines ++ * - check head first before calculating HASH_VALUE in HASH_FIND + */ + /* + Copyright (c) 2003-2017, Troy D. Hanson http://troydhanson.github.com/uthash/ +@@ -142,8 +143,11 @@ do { + #define HASH_FIND(hh,head,keyptr,keylen,out) \ + do { \ + unsigned _hf_hashv; \ +- HASH_VALUE(keyptr, keylen, _hf_hashv); \ +- HASH_FIND_BYHASHVALUE(hh, head, keyptr, keylen, _hf_hashv, out); \ ++ (out) = NULL; \ ++ if (head) { \ ++ HASH_VALUE(keyptr, keylen, _hf_hashv); \ ++ HASH_FIND_BYHASHVALUE(hh, head, keyptr, keylen, _hf_hashv, out); \ ++ } \ + } while (0) + + #ifdef HASH_BLOOM +--- a/src/mpl/src/bt/mpl_bt.c ++++ b/src/mpl/src/bt/mpl_bt.c +@@ -5,128 +5,26 @@ + */ + + #include "mpl.h" +-#ifdef MPL_HAVE_EXECINFO_H ++#ifdef MPL_HAVE_BACKTRACE + #include +-#endif +- +-#ifdef MPL_HAVE_LIBBACKTRACE +-#include +-#endif +- +-#ifdef MPL_HAVE_LIBUNWIND +-#define UNW_LOCAL_ONLY +-#include +-#endif +- +- +-/* freebsd and linux have slightly different backtrace routines. +- * solaris uses something totally different: a 'walkcontext' routine +- * which takes a function pointer. solaris 'walkcontext' is simliar to +- * libbacktrace, shipped with gcc-4.8 and newer. both share features +- * with libunwind. +- * +- * For the case of "display the call stack to this point" the various +- * approaches share a common pattern: +- * - initialize the library +- * - get the stack +- * - decode the stack +- * +- * but for now we'll simply dispatch to one of several appraoches +- * depending on what configure found +- * +- */ +- +-#ifdef MPL_HAVE_LIBBACKTRACE +- +-static inline void backtrace_libback(FILE * output) +-{ +- struct backtrace_state *btstate; +- btstate = backtrace_create_state(NULL, 1, NULL, NULL); +- backtrace_print(btstate, 0, output); +-} + +-/* we need not only the symbols but the header file too (for the cursor and +- * context), so tighten up when we take the libunwind path. Thanks +- * Siegmar.Gross@informatik.hs-fulda.de for the bug report about systems with +- * libunwind libraries but no libunwind development headers */ +-#elif defined MPL_HAVE_LIBUNWIND +-static inline void backtrace_libunwind(FILE * output) +-{ +- unw_cursor_t cursor; +- unw_context_t uc; +- unw_word_t ip, offset; +- int ret, chars = 0; +- char buffer[MPL_BACKTRACE_BUFFER_LEN]; +- char backtrace_buffer[MPL_BACKTRACE_BUFFER_LEN]; +- +- unw_getcontext(&uc); +- unw_init_local(&cursor, &uc); +- while (unw_step(&cursor) > 0) { +- unw_get_reg(&cursor, UNW_REG_IP, &ip); +- unw_get_proc_name(&cursor, buffer, MPL_BACKTRACE_BUFFER_LEN, &offset); +- ret = MPL_snprintf(backtrace_buffer + chars, +- MPL_BACKTRACE_BUFFER_LEN - chars, +- "0x%lx %s() + 0x%lx\n", (long) ip, buffer, (long) offset); +- if (ret + chars >= MPL_BACKTRACE_BUFFER_LEN) { +- /* the extra new line will be more readable than a merely +- * truncated string */ +- backtrace_buffer[MPL_BACKTRACE_BUFFER_LEN - 2] = '\n'; +- backtrace_buffer[MPL_BACKTRACE_BUFFER_LEN - 1] = '\0'; +- break; +- } +- chars += ret; +- } +- fprintf(output, "%s", backtrace_buffer); +-} ++#define MAX_TRACE_DEPTH 32 + +-#elif defined MPL_HAVE_BACKTRACE_SYMBOLS +-static inline void backtrace_libc(FILE * output) ++void MPL_backtrace_show(FILE * output) + { +-#ifndef MPL_MAX_TRACE_DEPTH +-#define MPL_MAX_TRACE_DEPTH 32 +-#endif +- void *trace[MPL_MAX_TRACE_DEPTH]; +- char **stack_strs; +- char backtrace_buffer[MPL_BACKTRACE_BUFFER_LEN]; +- int frames, i, ret, chars = 0; ++ void *trace[MAX_TRACE_DEPTH]; ++ _mpl_backtrace_size_t frames; + +- frames = backtrace(trace, MPL_MAX_TRACE_DEPTH); +- stack_strs = backtrace_symbols(trace, frames); ++ frames = backtrace(trace, MAX_TRACE_DEPTH); ++ char **strs = backtrace_symbols(trace, frames); ++ for (_mpl_backtrace_size_t i = 0; i < frames; i++) ++ fprintf(output, "%s\n", strs[i]); + +- for (i = 0; i < frames; i++) { +- ret = MPL_snprintf(backtrace_buffer + chars, +- MPL_BACKTRACE_BUFFER_LEN - chars, "%s\n", stack_strs[i]); +- if (ret + chars >= MPL_BACKTRACE_BUFFER_LEN) { +- /* the extra new line will be more readable than a merely +- * truncated string */ +- backtrace_buffer[MPL_BACKTRACE_BUFFER_LEN - 2] = '\n'; +- backtrace_buffer[MPL_BACKTRACE_BUFFER_LEN - 1] = '\0'; +- break; +- } +- chars += ret; +- } +- fprintf(output, "%s", backtrace_buffer); +- free(stack_strs); ++ MPL_free(strs); + } + #else +-static inline void backtrace_unsupported(FILE * output) ++void MPL_backtrace_show(FILE * output) + { + fprintf(output, "No backtrace info available\n"); + } + #endif +- +-/* Pick one of the many ways one could dump out a call stack*/ +-void MPL_backtrace_show(FILE * output) +-{ +-#ifdef MPL_HAVE_LIBBACKTRACE +- backtrace_libback(output); +-#elif defined MPL_HAVE_LIBUNWIND +- /* libunwind is not able to get line numbers without forking off to +- * addr2line (?)*/ +- backtrace_libunwind(output); +-#elif defined MPL_HAVE_BACKTRACE_SYMBOLS +- backtrace_libc(output); +-#else +- backtrace_unsupported(output); +-#endif +-} +--- a/src/mpl/src/dbg/mpl_dbg.c ++++ b/src/mpl/src/dbg/mpl_dbg.c +@@ -613,10 +613,6 @@ Environment variables\n\ + + /* creates a temporary file in the same directory the user specified + * for the log file */ +-#undef FUNCNAME +-#define FUNCNAME dbg_open_tmpfile +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int dbg_open_tmpfile(FILE ** dbg_fp) + { + int mpl_errno = MPL_DBG_SUCCESS; +@@ -658,10 +654,6 @@ static int dbg_open_tmpfile(FILE ** dbg_fp) + + /* creates a temporary file in the same directory the user specified + * for the log file */ +-#undef FUNCNAME +-#define FUNCNAME dbg_open_tmpfile +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int dbg_open_tmpfile(FILE ** dbg_fp) + { + int mpl_errno = MPL_DBG_SUCCESS; +@@ -709,10 +701,6 @@ static int dbg_open_tmpfile(FILE ** dbg_fp) + * Note that this is not safe: By the time we call fopen(), another + * file with the same name may exist. That file would get clobbered. + */ +-#undef FUNCNAME +-#define FUNCNAME dbg_open_tmpfile +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static int dbg_open_tmpfile(FILE ** dbg_fp) + { + int mpl_errno = MPL_DBG_SUCCESS; +--- a/src/mpl/src/mem/mpl_trmem.c ++++ b/src/mpl/src/mem/mpl_trmem.c +@@ -139,7 +139,7 @@ static MPL_thread_mutex_t memalloc_mutex; + do { \ + if (TR_is_threaded) { \ + int err_; \ +- MPL_thread_mutex_lock(&memalloc_mutex, &err_); \ ++ MPL_thread_mutex_lock(&memalloc_mutex, &err_, MPL_THREAD_PRIO_HIGH);\ + if (err_) \ + MPL_error_printf("Error acquiring memalloc mutex lock\n"); \ + } \ +--- a/src/mpl/src/shm/mpl_shm_mmap.c ++++ b/src/mpl/src/shm/mpl_shm_mmap.c +@@ -64,10 +64,6 @@ static inline int check_valid_fixed_mmap_range(void *shm_addr, intptr_t seg_sz) + /* A template function which creates/attaches shm seg handle + * to the shared memory. Used by user-exposed functions below + */ +-#undef FUNCNAME +-#define FUNCNAME MPL_shm_seg_create_attach_templ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPL_shm_seg_create_attach_templ(MPL_shm_hnd_t hnd, intptr_t seg_sz, + void **shm_addr_ptr, int offset, int flag, + MPL_memory_class class) +@@ -231,10 +227,6 @@ int MPL_shm_fixed_seg_attach(MPL_shm_hnd_t hnd, intptr_t seg_sz, void **shm_addr + } + + /* Detach from an attached SHM segment */ +-#undef FUNCNAME +-#define FUNCNAME MPL_shm_seg_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPL_shm_seg_detach(MPL_shm_hnd_t hnd, void **shm_addr_ptr, intptr_t seg_sz) + { + int rc = -1; +@@ -246,10 +238,6 @@ int MPL_shm_seg_detach(MPL_shm_hnd_t hnd, void **shm_addr_ptr, intptr_t seg_sz) + } + + /* Remove an existing SHM segment */ +-#undef FUNCNAME +-#define FUNCNAME MPL_shm_seg_remove +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPL_shm_seg_remove(MPL_shm_hnd_t hnd) + { + int rc = -1; +--- a/src/mpl/src/shm/mpl_shm_sysv.c ++++ b/src/mpl/src/shm/mpl_shm_sysv.c +@@ -18,10 +18,6 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + /* A template function which creates/attaches shm seg handle + * to the shared memory. Used by user-exposed functions below + */ +-#undef FUNCNAME +-#define FUNCNAME MPL_shm_seg_create_attach_templ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPL_shm_seg_create_attach_templ(MPL_shm_hnd_t hnd, intptr_t seg_sz, + void **shm_addr_ptr, int offset, int flag) + { +@@ -147,10 +143,6 @@ int MPL_shm_fixed_seg_attach(MPL_shm_hnd_t hnd, intptr_t seg_sz, void **shm_addr + * shm_addr_ptr : Pointer to the shm address to detach + * seg_sz : Size of shm segment + */ +-#undef FUNCNAME +-#define FUNCNAME MPL_shm_seg_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPL_shm_seg_detach(MPL_shm_hnd_t hnd, void **shm_addr_ptr, intptr_t seg_sz) + { + int rc = -1; +@@ -164,10 +156,6 @@ int MPL_shm_seg_detach(MPL_shm_hnd_t hnd, void **shm_addr_ptr, intptr_t seg_sz) + /* Remove a shared memory segment + * hnd : Handle to the shared memory segment to be removed + */ +-#undef FUNCNAME +-#define FUNCNAME MPL_shm_seg_remove +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPL_shm_seg_remove(MPL_shm_hnd_t hnd) + { + struct shmid_ds ds; +--- a/src/mpl/src/shm/mpl_shm_win.c ++++ b/src/mpl/src/shm/mpl_shm_win.c +@@ -11,16 +11,12 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + + #ifdef MPL_USE_NT_SHM + +-#include +-#include ++#include ++#include + + /* A template function which creates/attaches shm seg handle + * to the shared memory. Used by user-exposed functions below + */ +-#undef FUNCNAME +-#define FUNCNAME MPL_shm_seg_create_attach_templ +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPL_shm_seg_create_attach_templ(MPL_shm_hnd_t hnd, intptr_t seg_sz, + void **shm_addr_ptr, int offset, int flag) + { +@@ -155,10 +151,6 @@ int MPL_shm_fixed_seg_attach(MPL_shm_hnd_t hnd, intptr_t seg_sz, void **shm_addr + } + + /* Detach from an attached SHM segment */ +-#undef FUNCNAME +-#define FUNCNAME MPL_shm_seg_detach +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPL_shm_seg_detach(MPL_shm_hnd_t hnd, void **shm_addr_ptr, intptr_t seg_sz) + { + int rc = -1; +--- a/src/mpl/src/str/mpl_str.c ++++ b/src/mpl/src/str/mpl_str.c +@@ -407,14 +407,13 @@ void MPL_create_pathname(char *dest_filename, const char *dirname, + const char *prefix, const int is_dir) + { + /* Generate a random number which doesn't interfere with user application */ +- const unsigned int random = xorshift_rand(); ++ const unsigned int rdm = xorshift_rand(); + const unsigned int pid = (unsigned int) getpid(); + + if (dirname) { + MPL_snprintf(dest_filename, PATH_MAX, "%s/%s.%u.%u%c", dirname, prefix, +- random, pid, is_dir ? '/' : '\0'); ++ rdm, pid, is_dir ? '/' : '\0'); + } else { +- MPL_snprintf(dest_filename, PATH_MAX, "%s.%u.%u%c", prefix, +- random, pid, is_dir ? '/' : '\0'); ++ MPL_snprintf(dest_filename, PATH_MAX, "%s.%u.%u%c", prefix, rdm, pid, is_dir ? '/' : '\0'); + } + } +--- a/src/mpl/src/thread/mpl_thread.c ++++ b/src/mpl/src/thread/mpl_thread.c +@@ -8,15 +8,14 @@ + + MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + +-#if (MPL_THREAD_PACKAGE_NAME != MPL_THREAD_PACKAGE_NONE) && !defined(MPL_TLS_SPECIFIER) ++#if (MPL_THREAD_PACKAGE_NAME != MPL_THREAD_PACKAGE_NONE) && !defined(MPL_TLS) + + /* This routine is called when a thread exits; it is passed the value + * associated with the key. In our case, this is simply storage + * allocated with MPL_calloc */ + void MPLI_cleanup_tls(void *a) + { +- if (a) +- MPL_free(a); ++ MPL_free(a); + } + + #endif +--- a/src/mpl/src/thread/mpl_thread_posix.c ++++ b/src/mpl/src/thread/mpl_thread_posix.c +@@ -59,33 +59,33 @@ void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * idp + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + + #if MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_UTI +- uti_attr_t *uti_attr = NULL; +- err = uti_attr_init(uti_attr); ++ uti_attr_t uti_attr; ++ err = uti_attr_init(&uti_attr); + if (err) { + goto uti_exit; + } + + /* Give a hint that it's beneficial to put the thread + * on the same NUMA-node as the creator */ +- err = UTI_ATTR_SAME_NUMA_DOMAIN(uti_attr); ++ err = UTI_ATTR_SAME_NUMA_DOMAIN(&uti_attr); + if (err) { + goto uti_destroy_and_exit; + } + + /* Give a hint that the thread repeatedly monitors a device + * using CPU. */ +- err = UTI_ATTR_CPU_INTENSIVE(uti_attr); ++ err = UTI_ATTR_CPU_INTENSIVE(&uti_attr); + if (err) { + goto uti_destroy_and_exit; + } + +- err = uti_pthread_create(idp, &attr, MPLI_thread_start, thread_info, uti_attr); ++ err = uti_pthread_create(idp, &attr, MPLI_thread_start, thread_info, &uti_attr); + if (err) { + goto uti_destroy_and_exit; + } + + uti_destroy_and_exit: +- err = uti_attr_destroy(uti_attr); ++ err = uti_attr_destroy(&uti_attr); + if (err) { + goto uti_exit; + } +--- a/src/mpl/src/thread/mpl_thread_win.c ++++ b/src/mpl/src/thread/mpl_thread_win.c +@@ -129,7 +129,7 @@ void MPL_thread_mutex_destroy(MPL_thread_mutex_t * mutex, int *err) + } + } + +-void MPL_thread_mutex_lock(MPL_thread_mutex_t * mutex, int *err) ++void MPL_thread_mutex_lock(MPL_thread_mutex_t * mutex, int *err, int prio __attribute__ ((unused))) + { + DWORD result; + +@@ -229,7 +229,7 @@ void MPL_thread_cond_wait(MPL_thread_cond_t * cond, MPL_thread_mutex_t * mutex, + return; + } + } +- MPL_thread_mutex_lock(&cond->fifo_mutex, err); ++ MPL_thread_mutex_lock(&cond->fifo_mutex, err, MPL_THREAD_PRIO_HIGH); + if (err != NULL && *err != MPL_THREAD_SUCCESS) { + return; + } +@@ -276,7 +276,7 @@ void MPL_thread_cond_wait(MPL_thread_cond_t * cond, MPL_thread_mutex_t * mutex, + *err = GetLastError(); + return; + } +- MPL_thread_mutex_lock(mutex, err); ++ MPL_thread_mutex_lock(mutex, err, MPL_THREAD_PRIO_HIGH); + /* + * if (err != NULL) + * { +@@ -288,7 +288,7 @@ void MPL_thread_cond_wait(MPL_thread_cond_t * cond, MPL_thread_mutex_t * mutex, + void MPL_thread_cond_broadcast(MPL_thread_cond_t * cond, int *err) + { + MPLI_win_thread_cond_fifo_t *fifo, *temp; +- MPL_thread_mutex_lock(&cond->fifo_mutex, err); ++ MPL_thread_mutex_lock(&cond->fifo_mutex, err, MPL_THREAD_PRIO_HIGH); + if (err != NULL && *err != MPL_THREAD_SUCCESS) { + return; + } +@@ -318,7 +318,7 @@ void MPL_thread_cond_broadcast(MPL_thread_cond_t * cond, int *err) + void MPL_thread_cond_signal(MPL_thread_cond_t * cond, int *err) + { + MPLI_win_thread_cond_fifo_t *fifo; +- MPL_thread_mutex_lock(&cond->fifo_mutex, err); ++ MPL_thread_mutex_lock(&cond->fifo_mutex, err, MPL_THREAD_PRIO_HIGH); + if (err != NULL && *err != MPL_THREAD_SUCCESS) { + return; + } +--- a/src/mpl/src/timer/Makefile.mk ++++ b/src/mpl/src/timer/Makefile.mk +@@ -5,6 +5,8 @@ + ## See COPYRIGHT in top-level directory. + ## + ++noinst_HEADERS += src/timer/mpl_timer_common.h ++ + lib@MPLLIBNAME@_la_SOURCES += \ + src/timer/mpl_timer_clock_gettime.c \ + src/timer/mpl_timer_gcc_ia64_cycle.c \ +--- a/src/mpl/src/timer/mpl_timer_clock_gettime.c ++++ b/src/mpl/src/timer/mpl_timer_clock_gettime.c +@@ -10,6 +10,9 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + + #if MPL_TIMER_KIND == MPL_TIMER_KIND__CLOCK_GETTIME + ++#include "mpl_timer_common.h" ++static time_t time_epoch; ++ + int MPL_wtime(MPL_time_t * timeval) + { + /* POSIX timer (14.2.1, page 311) */ +@@ -25,9 +28,16 @@ int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff) + return MPL_TIMER_SUCCESS; + } + ++int MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ *val = (unsigned int) t->tv_nsec; ++ ++ return MPL_TIMER_SUCCESS; ++} ++ + int MPL_wtime_todouble(MPL_time_t * t, double *val) + { +- *val = ((double) t->tv_sec + 1.0e-9 * (double) t->tv_nsec); ++ *val = ((double) (t->tv_sec - time_epoch) + 1.0e-9 * (double) (t->tv_nsec)); + + return MPL_TIMER_SUCCESS; + } +@@ -68,6 +78,12 @@ int MPL_wtick(double *wtick) + + int MPL_wtime_init(void) + { ++ /* set a closer time_epoch so MPL_wtime_todouble retain ns resolution */ ++ /* time across process are still relavant within 1 hour */ ++ MPL_time_t t; ++ MPL_wtime(&t); ++ time_epoch = t.tv_sec - t.tv_sec % (3600); ++ + init_wtick(); + + return MPL_TIMER_SUCCESS; +new file mode 100644 +--- /dev/null ++++ b/src/mpl/src/timer/mpl_timer_common.h +@@ -0,0 +1,43 @@ ++/* -*- Mode: C; c-basic-offset:4 ; -*- */ ++/* ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#ifndef MPL_TIMER_COMMON_H_INCLUDED ++#define MPL_TIMER_COMMON_H_INCLUDED ++ ++#include "mpl_timer.h" ++ ++static double tickval = -1.0; ++ ++/* ++ * For timers that do not have defined resolutions, compute the resolution ++ * by sampling the clock itself. ++ * ++ */ ++static void init_wtick(void) ++{ ++ double timediff; ++ MPL_time_t t1, t2; ++ int cnt; ++ int icnt; ++ ++ tickval = 1.0e6; ++ for (icnt = 0; icnt < 10; icnt++) { ++ cnt = 1000; ++ MPL_wtime(&t1); ++ do { ++ MPL_wtime(&t2); ++ MPL_wtime_diff(&t1, &t2, &timediff); ++ if (timediff > 0) ++ break; ++ } ++ while (cnt--); ++ if (cnt && timediff > 0.0 && timediff < tickval) { ++ MPL_wtime_diff(&t1, &t2, &tickval); ++ } ++ } ++} ++ ++#endif /* MPL_TIMER_COMMON_H_INCLUDED */ +--- a/src/mpl/src/timer/mpl_timer_device.c ++++ b/src/mpl/src/timer/mpl_timer_device.c +@@ -13,6 +13,7 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + int (*MPL_wtime_fn) (MPL_time_t * timeval) = NULL; + int (*MPL_wtime_diff_fn) (MPL_time_t * t1, MPL_time_t * t2, double *diff) = NULL; + int (*MPL_wtime_acc_fn) (MPL_time_t * t1, MPL_time_t * t2, MPL_time_t * t3) = NULL; ++int (*MPL_wtime_touint_fn) (MPL_time_t * timeval, unsigned int *val) = NULL; + int (*MPL_wtime_todouble_fn) (MPL_time_t * timeval, double *seconds) = NULL; + int (*MPL_wtick_fn) (double *tick) = NULL; + +@@ -30,6 +31,13 @@ int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff) + return MPL_wtime_diff_fn(t1, t2, diff); + } + ++int MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ if (MPL_wtime_touint_fn == NULL) ++ return MPL_TIMER_ERR_NOT_INITIALIZED; ++ return MPL_wtime_touint_fn(t, val); ++} ++ + int MPL_wtime_todouble(MPL_time_t * t, double *val) + { + if (MPL_wtime_todouble_fn == NULL) +--- a/src/mpl/src/timer/mpl_timer_gcc_ia64_cycle.c ++++ b/src/mpl/src/timer/mpl_timer_gcc_ia64_cycle.c +@@ -49,6 +49,16 @@ int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff) + return MPL_TIMER_SUCCESS; + } + ++int MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ /* This returns the number of cycles as the "time". This isn't correct ++ * for implementing MPI_Wtime, but it does allow us to insert cycle ++ * counters into test programs */ ++ *val = (unsigned int) *t; ++ ++ return MPL_TIMER_SUCCESS; ++} ++ + int MPL_wtime_todouble(MPL_time_t * t, double *val) + { + /* This returns the number of cycles as the "time". This isn't correct +--- a/src/mpl/src/timer/mpl_timer_gethrtime.c ++++ b/src/mpl/src/timer/mpl_timer_gethrtime.c +@@ -38,6 +38,13 @@ int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff) + return MPL_TIMER_SUCCESS; + } + ++int MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ *val = (unsigned int) (*t & 0xffffffffUL); ++ ++ return MPL_TIMER_SUCCESS; ++} ++ + int MPL_wtime_todouble(MPL_time_t * t, double *val) + { + *val = 1.0e-9 * (*t); +--- a/src/mpl/src/timer/mpl_timer_gettimeofday.c ++++ b/src/mpl/src/timer/mpl_timer_gettimeofday.c +@@ -17,6 +17,8 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + #include + #endif + ++#include "mpl_timer_common.h" ++ + int MPL_wtime(MPL_time_t * tval) + { + gettimeofday(tval, NULL); +@@ -31,6 +33,13 @@ int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff) + return MPL_TIMER_SUCCESS; + } + ++int MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ *val = (unsigned int) t->tv_usec; ++ ++ return MPL_TIMER_SUCCESS; ++} ++ + int MPL_wtime_todouble(MPL_time_t * t, double *val) + { + *val = (double) t->tv_sec + .000001 * (double) t->tv_usec; +--- a/src/mpl/src/timer/mpl_timer_linux86_cycle.c ++++ b/src/mpl/src/timer/mpl_timer_linux86_cycle.c +@@ -49,6 +49,13 @@ int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff) + return MPL_TIMER_SUCCESS; + } + ++int MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ *val = (unsigned int) (*t & 0xffffffffUL); ++ ++ return MPL_TIMER_SUCCESS; ++} ++ + int MPL_wtime_todouble(MPL_time_t * t, double *val) + { + /* This returns the number of cycles as the "time". This isn't correct +--- a/src/mpl/src/timer/mpl_timer_mach_absolute_time.c ++++ b/src/mpl/src/timer/mpl_timer_mach_absolute_time.c +@@ -10,13 +10,15 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING; + + #if MPL_TIMER_KIND == MPL_TIMER_KIND__MACH_ABSOLUTE_TIME + +-static double MPIR_Wtime_mult; ++#include "mpl_timer_common.h" ++ ++static double wtime_mult; + + int MPL_wtime_init(void) + { + mach_timebase_info_data_t info; + mach_timebase_info(&info); +- MPIR_Wtime_mult = 1.0e-9 * ((double) info.numer / (double) info.denom); ++ wtime_mult = 1.0e-9 * ((double) info.numer / (double) info.denom); + init_wtick(); + + return MPL_TIMER_SUCCESS; +@@ -31,14 +33,21 @@ int MPL_wtime(MPL_time_t * timeval) + + int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff) + { +- *diff = (*t2 - *t1) * MPIR_Wtime_mult; ++ *diff = (*t2 - *t1) * wtime_mult; ++ ++ return MPL_TIMER_SUCCESS; ++} ++ ++int MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ *val = (unsigned int) (*t & 0xffffffffUL); + + return MPL_TIMER_SUCCESS; + } + + int MPL_wtime_todouble(MPL_time_t * t, double *val) + { +- *val = *t * MPIR_Wtime_mult; ++ *val = *t * wtime_mult; + + return MPL_TIMER_SUCCESS; + } +--- a/src/mpl/src/timer/mpl_timer_ppc64_cycle.c ++++ b/src/mpl/src/timer/mpl_timer_ppc64_cycle.c +@@ -103,6 +103,13 @@ int MPL_wtime_diff(MPL_time_t * t1, MPL_time_t * t2, double *diff) + return MPL_TIMER_SUCCESS; + } + ++int MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ *val = (unsigned int) (*t & 0xffffffffUL); ++ ++ return MPL_TIMER_SUCCESS; ++} ++ + int MPL_wtime_todouble(MPL_time_t * t, double *val) + { + *val = (double) *t * seconds_per_tick; +--- a/src/mpl/src/timer/mpl_timer_query_performance_counter.c ++++ b/src/mpl/src/timer/mpl_timer_query_performance_counter.c +@@ -25,6 +25,12 @@ double MPL_wtick(void) + return seconds_per_tick; + } + ++void MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ *val = (unsigned int) (t->QuadPart & 0xffffffffUL); ++} ++ ++ + void MPL_wtime_todouble(MPL_time_t * t, double *val) + { + *val = (double) t->QuadPart * seconds_per_tick; +--- a/src/mpl/src/timer/mpl_timer_win86_cycle.c ++++ b/src/mpl/src/timer/mpl_timer_win86_cycle.c +@@ -17,6 +17,11 @@ double MPL_wtick(void) + return seconds_per_tick; + } + ++void MPL_wtime_touint(MPL_time_t * t, unsigned int *val) ++{ ++ *d = (unsigned int) (*t & 0xffffffffUL); ++} ++ + void MPL_wtime_todouble(MPL_time_t * t, double *d) + { + *d = (double) (__int64) * t * seconds_per_tick; +deleted file mode 100644 +--- a/src/mutex/Makefile.mk ++++ /dev/null +@@ -1,12 +0,0 @@ +-## -*- Mode: Makefile; -*- +-## vim: set ft=automake : +-## +-## (C) 2011 by Argonne National Laboratory. +-## See COPYRIGHT in top-level directory. +-## +- +-mpi_sources += \ +- src/mutex/mutex_create.c \ +- src/mutex/mutex_free.c \ +- src/mutex/mutex_lock.c \ +- src/mutex/mutex_unlock.c +deleted file mode 100644 +--- a/src/mutex/mutex_create.c ++++ /dev/null +@@ -1,99 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include "muteximpl.h" +- +- +-/* -- Begin Profiling Symbol Block for routine MPIX_Mutex_create */ +-#if defined(HAVE_PRAGMA_WEAK) +-#pragma weak MPIX_Mutex_create = PMPIX_Mutex_create +-#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +-#pragma _HP_SECONDARY_DEF PMPIX_Mutex_create MPIX_Mutex_create +-#elif defined(HAVE_PRAGMA_CRI_DUP) +-#pragma _CRI duplicate MPIX_Mutex_create as PMPIX_Mutex_create +-#elif defined(HAVE_WEAK_ATTRIBUTE) +-int MPIX_Mutex_create(int my_count, MPI_Comm comm, MPIX_Mutex * hdl_out) +- __attribute__ ((weak, alias("PMPIX_Mutex_create"))); +-#endif +-/* -- End Profiling Symbol Block */ +- +-/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build +- the MPI routines */ +-#ifndef MPICH_MPI_FROM_PMPI +-#undef MPIX_Mutex_create +-#define MPIX_Mutex_create PMPIX_Mutex_create +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPIX_Mutex_create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +- +-/** Create a group of MPI mutexes. Collective on the given communicator. +- * +- * @param[in] count Number of mutexes on the local process. +- * @param[in] comm MPI communicator on which to create mutexes +- * @param[out] hdl_out Handle to the mutex group +- * @return MPI status +- */ +-int MPIX_Mutex_create(int my_count, MPI_Comm comm, MPIX_Mutex * hdl_out) +-{ +- int rank, nproc, max_count, i; +- MPIX_Mutex hdl; +- +- hdl = malloc(sizeof(struct mpixi_mutex_s)); +- assert(hdl != NULL); +- +- MPI_Comm_dup(comm, &hdl->comm); +- +- MPI_Comm_rank(hdl->comm, &rank); +- MPI_Comm_size(hdl->comm, &nproc); +- +- hdl->my_count = my_count; +- +- /* Find the max. count to determine how many windows we need. */ +- MPI_Allreduce(&my_count, &max_count, 1, MPI_INT, MPI_MAX, hdl->comm); +- assert(max_count > 0); +- +- hdl->max_count = max_count; +- hdl->windows = malloc(sizeof(MPI_Win) * max_count); +- assert(hdl->windows != NULL); +- +- if (my_count > 0) { +- hdl->bases = malloc(sizeof(uint8_t *) * my_count); +- assert(hdl->bases != NULL); +- } else { +- hdl->bases = NULL; +- } +- +- /* We need multiple windows here: one for each mutex. Otherwise +- * performance will suffer due to exclusive access epochs. */ +- for (i = 0; i < max_count; i++) { +- int size = 0; +- void *base = NULL; +- +- if (i < my_count) { +- MPI_Alloc_mem(nproc, MPI_INFO_NULL, &hdl->bases[i]); +- assert(hdl->bases[i] != NULL); +- memset(hdl->bases[i], 0, nproc); +- +- base = hdl->bases[i]; +- size = nproc; +- } +- +- MPI_Win_create(base, size, sizeof(uint8_t), MPI_INFO_NULL, hdl->comm, &hdl->windows[i]); +- } +- +- *hdl_out = hdl; +- return MPI_SUCCESS; +-} +deleted file mode 100644 +--- a/src/mutex/mutex_free.c ++++ /dev/null +@@ -1,66 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include +-#include +-#include +-#include +- +-#include "muteximpl.h" +- +- +-/* -- Begin Profiling Symbol Block for routine MPIX_Mutex_free */ +-#if defined(HAVE_PRAGMA_WEAK) +-#pragma weak MPIX_Mutex_free = PMPIX_Mutex_free +-#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +-#pragma _HP_SECONDARY_DEF PMPIX_Mutex_free MPIX_Mutex_free +-#elif defined(HAVE_PRAGMA_CRI_DUP) +-#pragma _CRI duplicate MPIX_Mutex_free as PMPIX_Mutex_free +-#elif defined(HAVE_WEAK_ATTRIBUTE) +-int MPIX_Mutex_free(MPIX_Mutex * hdl_ptr) __attribute__ ((weak, alias("PMPIX_Mutex_free"))); +-#endif +-/* -- End Profiling Symbol Block */ +- +-/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build +- the MPI routines */ +-#ifndef MPICH_MPI_FROM_PMPI +-#undef MPIX_Mutex_free +-#define MPIX_Mutex_free PMPIX_Mutex_free +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPIX_Mutex_free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +- +-/** Free a group of MPI mutexes. Collective on communicator used at the +- * time of creation. +- * +- * @param[in] hdl Handle to the group that will be freed +- * @return MPI status +- */ +-int MPIX_Mutex_free(MPIX_Mutex * hdl_ptr) +-{ +- MPIX_Mutex hdl = *hdl_ptr; +- int i; +- +- for (i = 0; i < hdl->max_count; i++) { +- MPI_Win_free(&hdl->windows[i]); +- } +- +- if (hdl->bases != NULL) { +- for (i = 0; i < hdl->my_count; i++) +- MPI_Free_mem(hdl->bases[i]); +- +- free(hdl->bases); +- } +- +- MPI_Comm_free(&hdl->comm); +- free(hdl); +- hdl_ptr = NULL; +- +- return MPI_SUCCESS; +-} +deleted file mode 100644 +--- a/src/mutex/mutex_lock.c ++++ /dev/null +@@ -1,101 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include +-#include +-#include +-#include +- +-#include +-#include "muteximpl.h" +- +- +-/* -- Begin Profiling Symbol Block for routine MPIX_Mutex_lock */ +-#if defined(HAVE_PRAGMA_WEAK) +-#pragma weak MPIX_Mutex_lock = PMPIX_Mutex_lock +-#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +-#pragma _HP_SECONDARY_DEF PMPIX_Mutex_lock MPIX_Mutex_lock +-#elif defined(HAVE_PRAGMA_CRI_DUP) +-#pragma _CRI duplicate MPIX_Mutex_lock as PMPIX_Mutex_lock +-#elif defined(HAVE_WEAK_ATTRIBUTE) +-int MPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc) +- __attribute__ ((weak, alias("PMPIX_Mutex_lock"))); +-#endif +-/* -- End Profiling Symbol Block */ +- +-/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build +- the MPI routines */ +-#ifndef MPICH_MPI_FROM_PMPI +-#undef MPIX_Mutex_lock +-#define MPIX_Mutex_lock PMPIX_Mutex_lock +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPIX_Mutex_lock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +- +-/** Lock a mutex. +- * +- * @param[in] hdl Mutex group that the mutex belongs to +- * @param[in] mutex Desired mutex number [0..count-1] +- * @param[in] proc Rank of process where the mutex lives +- * @return MPI status +- */ +-int MPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc) +-{ +- int rank, nproc, already_locked, i; +- uint8_t *buf; +- +- assert(mutex >= 0 && mutex < hdl->max_count); +- +- MPI_Comm_rank(hdl->comm, &rank); +- MPI_Comm_size(hdl->comm, &nproc); +- +- assert(proc >= 0 && proc < nproc); +- +- buf = malloc(nproc * sizeof(uint8_t)); +- assert(buf != NULL); +- +- buf[rank] = 1; +- +- /* Get all data from the lock_buf, except the byte belonging to +- * me. Set the byte belonging to me to 1. */ +- MPI_Win_lock(MPI_LOCK_EXCLUSIVE, proc, 0, hdl->windows[mutex]); +- +- MPI_Put(&buf[rank], 1, MPI_BYTE, proc, rank, 1, MPI_BYTE, hdl->windows[mutex]); +- +- /* Get data to the left of rank */ +- if (rank > 0) { +- MPI_Get(buf, rank, MPI_BYTE, proc, 0, rank, MPI_BYTE, hdl->windows[mutex]); +- } +- +- /* Get data to the right of rank */ +- if (rank < nproc - 1) { +- MPI_Get(&buf[rank + 1], nproc - 1 - rank, MPI_BYTE, proc, rank + 1, nproc - 1 - rank, +- MPI_BYTE, hdl->windows[mutex]); +- } +- +- MPI_Win_unlock(proc, hdl->windows[mutex]); +- +- assert(buf[rank] == 1); +- +- for (i = already_locked = 0; i < nproc; i++) +- if (buf[i] && i != rank) +- already_locked = 1; +- +- /* Wait for notification */ +- if (already_locked) { +- MPI_Status status; +- debug_print("waiting for notification [proc = %d, mutex = %d]\n", proc, mutex); +- MPI_Recv(NULL, 0, MPI_BYTE, MPI_ANY_SOURCE, MPIX_MUTEX_TAG + mutex, hdl->comm, &status); +- } +- +- debug_print("lock acquired [proc = %d, mutex = %d]\n", proc, mutex); +- free(buf); +- +- return MPI_SUCCESS; +-} +deleted file mode 100644 +--- a/src/mutex/mutex_unlock.c ++++ /dev/null +@@ -1,100 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include +-#include +-#include +-#include +- +-#include +-#include "muteximpl.h" +- +- +-/* -- Begin Profiling Symbol Block for routine MPIX_Mutex_unlock */ +-#if defined(HAVE_PRAGMA_WEAK) +-#pragma weak MPIX_Mutex_unlock = PMPIX_Mutex_unlock +-#elif defined(HAVE_PRAGMA_HP_SEC_DEF) +-#pragma _HP_SECONDARY_DEF PMPIX_Mutex_unlock MPIX_Mutex_unlock +-#elif defined(HAVE_PRAGMA_CRI_DUP) +-#pragma _CRI duplicate MPIX_Mutex_unlock as PMPIX_Mutex_unlock +-#elif defined(HAVE_WEAK_ATTRIBUTE) +-int MPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc) +- __attribute__ ((weak, alias("PMPIX_Mutex_unlock"))); +-#endif +-/* -- End Profiling Symbol Block */ +- +-/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build +- the MPI routines */ +-#ifndef MPICH_MPI_FROM_PMPI +-#undef MPIX_Mutex_unlock +-#define MPIX_Mutex_unlock PMPIX_Mutex_unlock +-#endif +- +-#undef FUNCNAME +-#define FUNCNAME MPIX_Mutex_unlock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +- +-/** Unlock a mutex. +- * +- * @param[in] hdl Mutex group that the mutex belongs to. +- * @param[in] mutex Desired mutex number [0..count-1] +- * @param[in] proc Rank of process where the mutex lives +- * @return MPI status +- */ +-int MPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc) +-{ +- int rank, nproc, i; +- uint8_t *buf; +- +- assert(mutex >= 0 && mutex < hdl->max_count); +- +- MPI_Comm_rank(hdl->comm, &rank); +- MPI_Comm_size(hdl->comm, &nproc); +- +- assert(proc >= 0 && proc < nproc); +- +- buf = malloc(nproc * sizeof(uint8_t)); +- assert(buf != NULL); +- +- buf[rank] = 0; +- +- /* Get all data from the lock_buf, except the byte belonging to +- * me. Set the byte belonging to me to 0. */ +- MPI_Win_lock(MPI_LOCK_EXCLUSIVE, proc, 0, hdl->windows[mutex]); +- +- MPI_Put(&buf[rank], 1, MPI_BYTE, proc, rank, 1, MPI_BYTE, hdl->windows[mutex]); +- +- /* Get data to the left of rank */ +- if (rank > 0) { +- MPI_Get(buf, rank, MPI_BYTE, proc, 0, rank, MPI_BYTE, hdl->windows[mutex]); +- } +- +- /* Get data to the right of rank */ +- if (rank < nproc - 1) { +- MPI_Get(&buf[rank + 1], nproc - 1 - rank, MPI_BYTE, proc, rank + 1, nproc - 1 - rank, +- MPI_BYTE, hdl->windows[mutex]); +- } +- +- MPI_Win_unlock(proc, hdl->windows[mutex]); +- +- assert(buf[rank] == 0); +- +- /* Notify the next waiting process, starting to my right for fairness */ +- for (i = 1; i < nproc; i++) { +- int p = (rank + i) % nproc; +- if (buf[p] == 1) { +- debug_print("notifying %d [proc = %d, mutex = %d]\n", p, proc, mutex); +- MPI_Send(NULL, 0, MPI_BYTE, p, MPIX_MUTEX_TAG + mutex, hdl->comm); +- break; +- } +- } +- +- debug_print("lock released [proc = %d, mutex = %d]\n", proc, mutex); +- free(buf); +- +- return MPI_SUCCESS; +-} +deleted file mode 100644 +--- a/src/mutex/muteximpl.h ++++ /dev/null +@@ -1,30 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#ifndef MUTEXIMPL_H_INCLUDED +-#define MUTEXIMPL_H_INCLUDED +- +-#include +-#include +-#define MPIX_MUTEX_TAG 100 +- +-#ifdef ENABLE_DEBUG +-#define debug_print(...) do { printf(__VA_ARGS__); } while (0) +-#else +-#define debug_print(...) +-#endif +- +-struct mpixi_mutex_s { +- int my_count; +- int max_count; +- MPI_Comm comm; +- MPI_Win *windows; +- uint8_t **bases; +-}; +- +-/* TODO: Make these mutex operations no-ops for sequential runs */ +- +-#endif /* MUTEXIMPL_H_INCLUDED */ +--- a/src/nameserv/file/file_nameserv.c ++++ b/src/nameserv/file/file_nameserv.c +@@ -62,10 +62,6 @@ struct MPID_NS_Handle { + + /* Create a structure that we will use to remember files created for + publishing. */ +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + { + const char *dirname; +@@ -76,8 +72,8 @@ int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + /* --BEGIN ERROR HANDLING-- */ + if (!*handle_ptr) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**nomem", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**nomem", 0); + return err; + } + /* --END ERROR HANDLING-- */ +@@ -113,10 +109,6 @@ int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Publish +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + const char service_name[], const char port[]) + { +@@ -136,7 +128,7 @@ int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + } else { + /* --BEGIN ERROR HANDLING-- */ + err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", 0); ++ __func__, __LINE__, MPI_ERR_OTHER, "**nomem", 0); + return err; + /* --END ERROR HANDLING-- */ + } +@@ -181,7 +173,7 @@ int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + MPL_snprintf(rstr, sizeof(rstr), "errno = %d", errno); + } + #endif +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**namepubfile", + "**namepubfile %s %s %s", service_name, filename, reason); + return err; +@@ -194,10 +186,6 @@ int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Lookup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Lookup(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + const char service_name[], char port[]) + { +@@ -240,10 +228,6 @@ int MPID_NS_Lookup(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Unpublish +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const char service_name[]) + { + char filename[MAXPATHLEN]; +@@ -270,7 +254,7 @@ int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const c + if (i == handle->nactive) { + /* --BEGIN ERROR HANDLING-- */ + /* Error: this name was not found */ +- err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_SERVICE, "**namepubnotpub", + "**namepubnotpub %s", service_name); + return err; +@@ -282,10 +266,6 @@ int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const c + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Free(MPID_NS_Handle * handle_ptr) + { + int i; +--- a/src/nameserv/pmi/pmi_nameserv.c ++++ b/src/nameserv/pmi/pmi_nameserv.c +@@ -27,10 +27,6 @@ struct MPID_NS_Handle { + int dummy; + }; /* unused for now */ + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + { + static struct MPID_NS_Handle nsHandleWithNoData; +@@ -41,10 +37,6 @@ int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Publish +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + const char service_name[], const char port[]) + { +@@ -70,10 +62,6 @@ int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Lookup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Lookup(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + const char service_name[], char port[]) + { +@@ -99,10 +87,6 @@ int MPID_NS_Lookup(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Unpublish +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const char service_name[]) + { + int mpi_errno = MPI_SUCCESS; +@@ -127,10 +111,6 @@ int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const c + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Free(MPID_NS_Handle * handle_ptr) + { + /* MPID_NS_Handle is Null */ +@@ -160,10 +140,6 @@ struct MPID_NS_Handle { + char *kvsname; + }; + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Create +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + { + int err; +@@ -174,8 +150,8 @@ int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + /* --BEGIN ERROR HANDLING-- */ + if (!*handle_ptr) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**nomem", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**nomem", 0); + return err; + } + /* --END ERROR HANDLING-- */ +@@ -184,8 +160,8 @@ int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + /* --BEGIN ERROR HANDLING-- */ + if (err != PMI_SUCCESS) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**fail", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**fail", 0); + } + /* --END ERROR HANDLING-- */ + +@@ -193,8 +169,8 @@ int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + /* --BEGIN ERROR HANDLING-- */ + if (!(*handle_ptr)->kvsname) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**nomem", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**nomem", 0); + return err; + } + /* --END ERROR HANDLING-- */ +@@ -207,7 +183,7 @@ int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + /* --BEGIN ERROR HANDLING-- */ + if (err != PMI_SUCCESS) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, + MPI_ERR_OTHER, "**fail", 0); + } + /* --END ERROR HANDLING-- */ +@@ -217,10 +193,6 @@ int MPID_NS_Create(const MPIR_Info * info_ptr, MPID_NS_Handle * handle_ptr) + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Publish +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + const char service_name[], const char port[]) + { +@@ -231,8 +203,8 @@ int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + /* --BEGIN ERROR HANDLING-- */ + if (err != PMI_SUCCESS) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**pmi_kvs_put", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**pmi_kvs_put", 0); + return err; + } + /* --END ERROR HANDLING-- */ +@@ -240,8 +212,8 @@ int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + /* --BEGIN ERROR HANDLING-- */ + if (err != PMI_SUCCESS) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**pmi_kvs_commit", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**pmi_kvs_commit", 0); + return err; + } + /* --END ERROR HANDLING-- */ +@@ -249,10 +221,6 @@ int MPID_NS_Publish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Lookup +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Lookup(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + const char service_name[], char port[]) + { +@@ -263,8 +231,8 @@ int MPID_NS_Lookup(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + /* --BEGIN ERROR HANDLING-- */ + if (err != PMI_SUCCESS) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_NAME, +- "**pmi_kvs_get", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_NAME, "**pmi_kvs_get", 0); + return err; + } + /* --END ERROR HANDLING-- */ +@@ -275,10 +243,6 @@ int MPID_NS_Lookup(MPID_NS_Handle handle, const MPIR_Info * info_ptr, + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Unpublish +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const char service_name[]) + { + int err; +@@ -289,8 +253,8 @@ int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const c + /* --BEGIN ERROR HANDLING-- */ + if (err != PMI_SUCCESS) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**pmi_kvs_put", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**pmi_kvs_put", 0); + return err; + } + /* --END ERROR HANDLING-- */ +@@ -298,8 +262,8 @@ int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const c + /* --BEGIN ERROR HANDLING-- */ + if (err != PMI_SUCCESS) { + err = +- MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, +- "**pmi_kvs_commit", 0); ++ MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, __func__, __LINE__, ++ MPI_ERR_OTHER, "**pmi_kvs_commit", 0); + return err; + } + /* --END ERROR HANDLING-- */ +@@ -307,10 +271,6 @@ int MPID_NS_Unpublish(MPID_NS_Handle handle, const MPIR_Info * info_ptr, const c + return 0; + } + +-#undef FUNCNAME +-#define FUNCNAME MPID_NS_Free +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPID_NS_Free(MPID_NS_Handle * handle_ptr) + { + int err; +--- a/src/openpa/configure.ac ++++ b/src/openpa/configure.ac +@@ -72,6 +72,7 @@ else + fi + + AC_PROG_CC ++AC_PROG_CC_C99 + AM_PROG_CC_C_O + + AC_HEADER_ASSERT +--- a/src/openpa/src/opa_util.h ++++ b/src/openpa/src/opa_util.h +@@ -16,6 +16,7 @@ + #define OPA_ATTRIBUTE(x_) + #endif + ++/* FIXME: The following can use something similar to MPL_Static_assert. */ + /* FIXME this just needs a total rework in general with an OPA_NDEBUG or similar. */ + #define OPA_assert(expr_) do {} while (0) + #define OPA_assertp(expr_) do { if (!(expr_)) ++((int *)NULL) } while (0) /* SEGV intentionally */ +--- a/src/packaging/pkgconfig/mpich.pc.in ++++ b/src/packaging/pkgconfig/mpich.pc.in +@@ -9,7 +9,7 @@ Description: High Performance and portable MPI + Version: @MPICH_VERSION@ + URL: http://www.mcs.anl.gov/research/projects/mpich + Requires: +-Libs: @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ -L${libdir} -l@MPILIBNAME@ @LPMPILIBNAME@ @WRAPPER_LIBS@ ++Libs: @WRAPPER_C_DYNAMIC_LOADING_FLAGS@ @WRAPPER_LDFLAGS@ -L${libdir} -l@MPILIBNAME@ @LPMPILIBNAME@ @WRAPPER_LIBS@ + Cflags: @WRAPPER_CPPFLAGS@ @WRAPPER_CFLAGS@ -I${includedir} + + # pkg-config does not understand Cxxflags, etc. So we allow users to +--- a/src/pm/hydra/configure.ac ++++ b/src/pm/hydra/configure.ac +@@ -17,7 +17,8 @@ AC_ARG_PROGRAM + + dnl must come before LT_INIT, which AC_REQUIREs AC_PROG_CC + dnl must also come before AC_USE_SYSTEM_EXTENSIONS +-PAC_PROG_CC ++AC_PROG_CC ++AC_PROG_CC_C99 + AM_PROG_CC_C_O + + # also needed by hwloc in embedded mode, must also come early for expansion +@@ -488,8 +489,8 @@ else + fi + + HWLOC_DO_AM_CONDITIONALS +-AM_CONDITIONAL([hydra_have_hwloc], [test "${have_hwloc}" = "yes"]) +-AM_CONDITIONAL([hydra_use_embedded_hwloc], [test "${hydra_use_embedded_hwloc}" = "yes"]) ++AM_CONDITIONAL([HYDRA_HAVE_HWLOC], [test "${have_hwloc}" = "yes"]) ++AM_CONDITIONAL([HYDRA_USE_EMBEDDED_HWLOC], [test "${hydra_use_embedded_hwloc}" = "yes"]) + + AC_MSG_CHECKING([available processor topology libraries]) + AC_MSG_RESULT([$available_topolibs]) +--- a/src/pm/hydra/pm/pmiserv/common.c ++++ b/src/pm/hydra/pm/pmiserv/common.c +@@ -59,8 +59,7 @@ HYD_status HYD_pmcd_pmi_parse_pmi_cmd(char *obuf, int pmi_version, char **pmi_cm + + fn_exit: + MPL_free(buf); +- if (str1) +- MPL_free(str1); ++ MPL_free(str1); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/pm/pmiserv/pmip.c ++++ b/src/pm/hydra/pm/pmiserv/pmip.c +@@ -66,50 +66,28 @@ static void cleanup_params(void) + HYDU_finalize_user_global(&HYD_pmcd_pmip.user_global); + + /* System global */ +- if (HYD_pmcd_pmip.system_global.pmi_fd) +- MPL_free(HYD_pmcd_pmip.system_global.pmi_fd); +- +- if (HYD_pmcd_pmip.system_global.pmi_process_mapping) +- MPL_free(HYD_pmcd_pmip.system_global.pmi_process_mapping); ++ MPL_free(HYD_pmcd_pmip.system_global.pmi_fd); ++ MPL_free(HYD_pmcd_pmip.system_global.pmi_process_mapping); + + + /* Upstream */ +- if (HYD_pmcd_pmip.upstream.server_name) +- MPL_free(HYD_pmcd_pmip.upstream.server_name); ++ MPL_free(HYD_pmcd_pmip.upstream.server_name); + + + /* Downstream */ +- if (HYD_pmcd_pmip.downstream.out) +- MPL_free(HYD_pmcd_pmip.downstream.out); +- +- if (HYD_pmcd_pmip.downstream.err) +- MPL_free(HYD_pmcd_pmip.downstream.err); +- +- if (HYD_pmcd_pmip.downstream.pid) +- MPL_free(HYD_pmcd_pmip.downstream.pid); +- +- if (HYD_pmcd_pmip.downstream.exit_status) +- MPL_free(HYD_pmcd_pmip.downstream.exit_status); +- +- if (HYD_pmcd_pmip.downstream.pmi_rank) +- MPL_free(HYD_pmcd_pmip.downstream.pmi_rank); +- +- if (HYD_pmcd_pmip.downstream.pmi_fd) +- MPL_free(HYD_pmcd_pmip.downstream.pmi_fd); +- +- if (HYD_pmcd_pmip.downstream.pmi_fd_active) +- MPL_free(HYD_pmcd_pmip.downstream.pmi_fd_active); ++ MPL_free(HYD_pmcd_pmip.downstream.out); ++ MPL_free(HYD_pmcd_pmip.downstream.err); ++ MPL_free(HYD_pmcd_pmip.downstream.pid); ++ MPL_free(HYD_pmcd_pmip.downstream.exit_status); ++ MPL_free(HYD_pmcd_pmip.downstream.pmi_rank); ++ MPL_free(HYD_pmcd_pmip.downstream.pmi_fd); ++ MPL_free(HYD_pmcd_pmip.downstream.pmi_fd_active); + + + /* Local */ +- if (HYD_pmcd_pmip.local.iface_ip_env_name) +- MPL_free(HYD_pmcd_pmip.local.iface_ip_env_name); +- +- if (HYD_pmcd_pmip.local.hostname) +- MPL_free(HYD_pmcd_pmip.local.hostname); +- +- if (HYD_pmcd_pmip.local.spawner_kvsname) +- MPL_free(HYD_pmcd_pmip.local.spawner_kvsname); ++ MPL_free(HYD_pmcd_pmip.local.iface_ip_env_name); ++ MPL_free(HYD_pmcd_pmip.local.hostname); ++ MPL_free(HYD_pmcd_pmip.local.spawner_kvsname); + + if (HYD_pmcd_pmip.local.ckpoint_prefix_list) { + for (i = 0; HYD_pmcd_pmip.local.ckpoint_prefix_list[i]; i++) +--- a/src/pm/hydra/pm/pmiserv/pmip_cb.c ++++ b/src/pm/hydra/pm/pmiserv/pmip_cb.c +@@ -340,14 +340,12 @@ static HYD_status pmi_cb(int fd, HYD_event_t events, void *userp) + goto check_cmd; + + fn_exit: +- if (pmi_cmd) +- MPL_free(pmi_cmd); ++ MPL_free(pmi_cmd); + if (args) { + HYDU_free_strlist(args); + MPL_free(args); + } +- if (buf) +- MPL_free(buf); ++ MPL_free(buf); + HYDU_FUNC_EXIT(); + return status; + +@@ -403,14 +401,12 @@ static HYD_status handle_pmi_response(int fd, struct HYD_pmcd_hdr hdr) + } + + fn_exit: +- if (pmi_cmd) +- MPL_free(pmi_cmd); ++ MPL_free(pmi_cmd); + if (args) { + HYDU_free_strlist(args); + MPL_free(args); + } +- if (buf) +- MPL_free(buf); ++ MPL_free(buf); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/pm/pmiserv/pmip_pmi_v2.c ++++ b/src/pm/hydra/pm/pmiserv/pmip_pmi_v2.c +@@ -56,8 +56,7 @@ static HYD_status send_cmd_upstream(const char *start, int fd, char *args[]) + HYDU_ASSERT(!closed, status); + + fn_exit: +- if (buf) +- MPL_free(buf); ++ MPL_free(buf); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/pm/pmiserv/pmip_utils.c ++++ b/src/pm/hydra/pm/pmiserv/pmip_utils.c +@@ -50,8 +50,7 @@ static HYD_status control_port_fn(char *arg, char ***argv) + (*argv)++; + + fn_exit: +- if (port) +- MPL_free(port); ++ MPL_free(port); + return status; + + fn_fail: +@@ -343,9 +342,13 @@ static HYD_status global_env_fn(char *arg, char ***argv) + str[strlen(str) - 1] = 0; + } + +- if (!strcmp(arg, "global-inherited-env")) ++ if (!strcmp(arg, "global-inherited-env")) { + HYDU_append_env_str_to_list(str, &HYD_pmcd_pmip.user_global.global_env.inherited); +- else if (!strcmp(arg, "global-system-env")) ++ /* Make sure to let proxy aware of HYDRA related variables */ ++ if (!strncmp(str, "HYDRA_", 6)) { ++ MPL_putenv(str); ++ } ++ } else if (!strcmp(arg, "global-system-env")) + HYDU_append_env_str_to_list(str, &HYD_pmcd_pmip.user_global.global_env.system); + else if (!strcmp(arg, "global-user-env")) + HYDU_append_env_str_to_list(str, &HYD_pmcd_pmip.user_global.global_env.user); +--- a/src/pm/hydra/pm/pmiserv/pmiserv_cb.c ++++ b/src/pm/hydra/pm/pmiserv/pmiserv_cb.c +@@ -58,8 +58,7 @@ static HYD_status handle_pmi_cmd(int fd, int pgid, int pid, char *buf, int pmi_v + } + + fn_exit: +- if (cmd) +- MPL_free(cmd); ++ MPL_free(cmd); + if (args) { + HYDU_free_strlist(args); + MPL_free(args); +--- a/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c ++++ b/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c +@@ -145,8 +145,7 @@ HYD_status HYD_pmci_launch_procs(void) + MPL_free(control_fd); + + fn_exit: +- if (control_port) +- MPL_free(control_port); ++ MPL_free(control_port); + HYD_STRING_STASH_FREE(proxy_stash); + HYDU_FUNC_EXIT(); + return status; +--- a/src/pm/hydra/pm/pmiserv/pmiserv_pmi.c ++++ b/src/pm/hydra/pm/pmiserv/pmiserv_pmi.c +@@ -45,8 +45,7 @@ HYD_status HYD_pmcd_pmi_free_publish(struct HYD_pmcd_pmi_publish * publish) + MPL_free(publish->info_keys[i].key); + MPL_free(publish->info_keys[i].val); + } +- if (publish->info_keys) +- MPL_free(publish->info_keys); ++ MPL_free(publish->info_keys); + + HYDU_FUNC_EXIT(); + return status; +--- a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c ++++ b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c +@@ -728,8 +728,7 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[]) + fn_exit: + HYD_pmcd_pmi_free_tokens(tokens, token_count); + HYD_STRING_STASH_FREE(proxy_stash); +- if (segment_list) +- MPL_free(segment_list); ++ MPL_free(segment_list); + HYDU_FUNC_EXIT(); + return status; + +@@ -787,10 +786,8 @@ static HYD_status fn_name_publish(int fd, int pid, int pgid, char *args[]) + fn_exit: + if (tokens) + HYD_pmcd_pmi_free_tokens(tokens, token_count); +- if (name) +- MPL_free(name); +- if (port) +- MPL_free(port); ++ MPL_free(name); ++ MPL_free(port); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/pm/pmiserv/pmiserv_utils.c ++++ b/src/pm/hydra/pm/pmiserv/pmiserv_utils.c +@@ -495,8 +495,7 @@ HYD_status HYD_pmcd_pmi_fill_in_exec_launch_info(struct HYD_pg *pg) + } + + fn_exit: +- if (mapping) +- MPL_free(mapping); ++ MPL_free(mapping); + MPL_free(filler_pmi_ids); + MPL_free(nonfiller_pmi_ids); + return status; +@@ -555,11 +554,8 @@ HYD_status HYD_pmcd_pmi_free_pg_scratch(struct HYD_pg *pg) + if (pg->pg_scratch) { + pg_scratch = pg->pg_scratch; + +- if (pg_scratch->ecount) +- MPL_free(pg_scratch->ecount); +- +- if (pg_scratch->dead_processes) +- MPL_free(pg_scratch->dead_processes); ++ MPL_free(pg_scratch->ecount); ++ MPL_free(pg_scratch->dead_processes); + + HYD_pmcd_free_pmi_kvs_list(pg_scratch->kvs); + +--- a/src/pm/hydra/tools/bootstrap/external/external_common_launch.c ++++ b/src/pm/hydra/tools/bootstrap/external/external_common_launch.c +@@ -202,8 +202,7 @@ HYD_status HYDT_bscd_common_launch_procs(char **args, struct HYD_proxy *proxy_li + targs[idx] = NULL; + for (proxy = proxy_list; proxy; proxy = proxy->next) { + +- if (targs[host_idx]) +- MPL_free(targs[host_idx]); ++ MPL_free(targs[host_idx]); + if (proxy->node->user == NULL) { + targs[host_idx] = MPL_strdup(proxy->node->hostname); + } else { +@@ -214,8 +213,7 @@ HYD_status HYDT_bscd_common_launch_procs(char **args, struct HYD_proxy *proxy_li + } + + /* append proxy ID */ +- if (targs[idx]) +- MPL_free(targs[idx]); ++ MPL_free(targs[idx]); + targs[idx] = HYDU_int_to_str(proxy->proxy_id); + targs[idx + 1] = NULL; + +@@ -322,8 +320,7 @@ HYD_status HYDT_bscd_common_launch_procs(char **args, struct HYD_proxy *proxy_li + + fn_exit: + HYDU_free_strlist(targs); +- if (path) +- MPL_free(path); ++ MPL_free(path); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/tools/bootstrap/external/ll_launch.c ++++ b/src/pm/hydra/tools/bootstrap/external/ll_launch.c +@@ -111,11 +111,9 @@ HYD_status HYDT_bscd_ll_launch_procs(char **args, struct HYD_proxy *proxy_list, + HYDU_ERR_POP(status, "demux returned error registering fd\n"); + + fn_exit: +- if (node_list_str) +- MPL_free(node_list_str); ++ MPL_free(node_list_str); + HYDU_free_strlist(targs); +- if (path) +- MPL_free(path); ++ MPL_free(path); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/tools/bootstrap/external/lsf_query_node_list.c ++++ b/src/pm/hydra/tools/bootstrap/external/lsf_query_node_list.c +@@ -45,8 +45,7 @@ HYD_status HYDT_bscd_lsf_query_node_list(struct HYD_node **node_list) + hostname = strtok(NULL, " "); + } + +- if (thosts) +- MPL_free(thosts); ++ MPL_free(thosts); + } + + fn_exit: +--- a/src/pm/hydra/tools/bootstrap/external/pbs_finalize.c ++++ b/src/pm/hydra/tools/bootstrap/external/pbs_finalize.c +@@ -21,10 +21,8 @@ HYD_status HYDT_bscd_pbs_launcher_finalize(void) + #endif /* HAVE_TM_H */ + + if (HYDT_bscd_pbs_sys) { +- if (HYDT_bscd_pbs_sys->task_id) +- MPL_free(HYDT_bscd_pbs_sys->task_id); +- if (HYDT_bscd_pbs_sys->spawn_events) +- MPL_free(HYDT_bscd_pbs_sys->spawn_events); ++ MPL_free(HYDT_bscd_pbs_sys->task_id); ++ MPL_free(HYDT_bscd_pbs_sys->spawn_events); + MPL_free(HYDT_bscd_pbs_sys); + } + +--- a/src/pm/hydra/tools/bootstrap/external/slurm_launch.c ++++ b/src/pm/hydra/tools/bootstrap/external/slurm_launch.c +@@ -50,8 +50,7 @@ static HYD_status proxy_list_to_node_str(struct HYD_proxy *proxy_list, char **no + + fn_exit: + HYDU_free_strlist(tmp); +- if (foo) +- MPL_free(foo); ++ MPL_free(foo); + HYDU_FUNC_EXIT(); + return status; + +@@ -163,11 +162,9 @@ HYD_status HYDT_bscd_slurm_launch_procs(char **args, struct HYD_proxy *proxy_lis + HYDU_ERR_POP(status, "demux returned error registering fd\n"); + + fn_exit: +- if (node_list_str) +- MPL_free(node_list_str); ++ MPL_free(node_list_str); + HYDU_free_strlist(targs); +- if (path) +- MPL_free(path); ++ MPL_free(path); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c ++++ b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c +@@ -92,17 +92,17 @@ static HYD_status list_to_nodes(char *str) + /* compile element regex for old format: "h14" */ + regcomp(&ematch_old, "([a-zA-Z]+[0-9]+)", REG_EXTENDED); + +- /* compile group-0 regex for new format: "h-[00-12,14] | h-14" */ +- regcomp(&gmatch_new[0], "(,|^)([a-zA-Z]+[0-9]*-)(\\[[-,0-9]+\\]|[0-9]+)(,|$)", REG_EXTENDED); ++ /* compile group-0 regex for new format: "h00-[00-12,14] | h00[00-12,14] | h00-14 | h0014" */ ++ regcomp(&gmatch_new[0], "(,|^)([a-zA-Z0-9]+-?)(\\[[-,0-9]+\\]|[0-9]*)(,|$)", REG_EXTENDED); + +- /* compile group-1 regex for new format: "00-12 | 14" */ +- regcomp(&gmatch_new[1], "([[,]|^)([0-9]+-[0-9]+|[0-9]+)([],]|$)", REG_EXTENDED); ++ /* compile group-1 regex for new format: "00-12 | 14 | " */ ++ regcomp(&gmatch_new[1], "([[,]|^)([0-9]+-[0-9]+|[0-9]*)([],]|$)", REG_EXTENDED); + + /* compile range regex for new format: "00-12" */ + regcomp(&rmatch_new, "([0-9]+)-([0-9]+)", REG_EXTENDED); + +- /* compile element regex for new format: "14" */ +- regcomp(&ematch_new, "([0-9]+)", REG_EXTENDED); ++ /* compile element regex for new format: "14 | " */ ++ regcomp(&ematch_new, "([0-9]*)", REG_EXTENDED); + + gpattern[0] = string; + +@@ -127,31 +127,27 @@ static HYD_status list_to_nodes(char *str) + + if (regexec(&rmatch_old, rpattern, MAX_RMATCH, rmatch, 0) == 0) { + /* matched range: (h)(00)-(h)(12) */ +- snprintf(basename, MAX_HOSTNAME_LEN, "%.*s%c", +- (int) (rmatch[1].rm_eo - rmatch[1].rm_so), rpattern + rmatch[1].rm_so, +- '\0'); +- snprintf(rbegin, MAX_NNODES_STRLEN, "%.*s%c", +- (int) (rmatch[2].rm_eo - rmatch[2].rm_so), rpattern + rmatch[2].rm_so, +- '\0'); +- snprintf(rend, MAX_NNODES_STRLEN, "%.*s%c", +- (int) (rmatch[4].rm_eo - rmatch[4].rm_so), rpattern + rmatch[4].rm_so, +- '\0'); ++ snprintf(basename, MAX_HOSTNAME_LEN, "%.*s", ++ (int) (rmatch[1].rm_eo - rmatch[1].rm_so), rpattern + rmatch[1].rm_so); ++ snprintf(rbegin, MAX_NNODES_STRLEN, "%.*s", ++ (int) (rmatch[2].rm_eo - rmatch[2].rm_so), rpattern + rmatch[2].rm_so); ++ snprintf(rend, MAX_NNODES_STRLEN, "%.*s", ++ (int) (rmatch[4].rm_eo - rmatch[4].rm_so), rpattern + rmatch[4].rm_so); + begin = atoi(rbegin); + end = atoi(rend); + + /* expand range and add nodes to global node list */ + for (j = begin; j <= end; j++) { +- snprintf(hostname, MAX_HOSTNAME_LEN, "%s%.*d%c", +- basename, (int) (rmatch[2].rm_eo - rmatch[2].rm_so), j, '\0'); ++ snprintf(hostname, MAX_HOSTNAME_LEN, "%s%.*d", ++ basename, (int) (rmatch[2].rm_eo - rmatch[2].rm_so), j); + status = + HYDU_add_to_node_list(hostname, tasks_per_node[k++], &global_node_list); + HYDU_ERR_POP(status, "unable to add to node list\n"); + } + } else if (regexec(&ematch_old, epattern, MAX_EMATCH, ematch, 0) == 0) { + /* matched element: (h14) */ +- snprintf(hostname, MAX_HOSTNAME_LEN, "%.*s%c", +- (int) (ematch[1].rm_eo - ematch[1].rm_so), epattern + ematch[1].rm_so, +- '\0'); ++ snprintf(hostname, MAX_HOSTNAME_LEN, "%.*s", ++ (int) (ematch[1].rm_eo - ematch[1].rm_so), epattern + ematch[1].rm_so); + status = HYDU_add_to_node_list(hostname, tasks_per_node[k++], &global_node_list); + HYDU_ERR_POP(status, "unable to add to node list\n"); + } +@@ -166,16 +162,15 @@ static HYD_status list_to_nodes(char *str) + gpattern[0] += gmatch[0][0].rm_eo; + } + +- /* match new group-0 pattern: (,|^)(h-)([00-12,14] | 00-12 | 14)(,|$) */ ++ /* match new group-0 pattern: (,|^)(h|h-)([00-12,14] | 00-12 | 14)(,|$) */ + while (*gpattern[0] && regexec(&gmatch_new[0], gpattern[0], MAX_GMATCH, gmatch[0], 0) == 0) { + /* bound group-0 for group-1 matching: h-[00-h12,14],... -> h-[00-12,14]\0... */ + tmp[0] = *(gpattern[0] + gmatch[0][0].rm_eo); + *(gpattern[0] + gmatch[0][0].rm_eo) = 0; + + /* extranct basename from atom 2 in group-0 */ +- sprintf(basename, "%.*s%c", +- (int) (gmatch[0][2].rm_eo - gmatch[0][2].rm_so), gpattern[0] + gmatch[0][2].rm_so, +- '\0'); ++ snprintf(basename, MAX_HOSTNAME_LEN, "%.*s", ++ (int) (gmatch[0][2].rm_eo - gmatch[0][2].rm_so), gpattern[0] + gmatch[0][2].rm_so); + + /* select third atom in group-0 */ + gpattern[1] = gpattern[0] + gmatch[0][3].rm_so; +@@ -192,29 +187,26 @@ static HYD_status list_to_nodes(char *str) + + if (regexec(&rmatch_new, rpattern, MAX_RMATCH, rmatch, 0) == 0) { + /* matched range: (00)-(10) */ +- snprintf(rbegin, MAX_NNODES_STRLEN, "%.*s%c", +- (int) (rmatch[1].rm_eo - rmatch[1].rm_so), rpattern + rmatch[1].rm_so, +- '\0'); +- snprintf(rend, MAX_NNODES_STRLEN, "%.*s%c", +- (int) (rmatch[2].rm_eo - rmatch[2].rm_so), rpattern + rmatch[2].rm_so, +- '\0'); ++ snprintf(rbegin, MAX_NNODES_STRLEN, "%.*s", ++ (int) (rmatch[1].rm_eo - rmatch[1].rm_so), rpattern + rmatch[1].rm_so); ++ snprintf(rend, MAX_NNODES_STRLEN, "%.*s", ++ (int) (rmatch[2].rm_eo - rmatch[2].rm_so), rpattern + rmatch[2].rm_so); + begin = atoi(rbegin); + end = atoi(rend); + + /* expand range and add nodes to global node list */ + for (j = begin; j <= end; j++) { +- sprintf(hostname, "%s%.*d%c", +- basename, (int) (rmatch[1].rm_eo - rmatch[1].rm_so), j, '\0'); ++ snprintf(hostname, MAX_HOSTNAME_LEN, "%s%.*d", ++ basename, (int) (rmatch[1].rm_eo - rmatch[1].rm_so), j); + status = + HYDU_add_to_node_list(hostname, tasks_per_node[k++], &global_node_list); + HYDU_ERR_POP(status, "unable to add to node list\n"); + } + } else if (regexec(&ematch_new, epattern, MAX_EMATCH, ematch, 0) == 0) { + /* matched element: (14) */ +- sprintf(rbegin, "%.*s%c", +- (int) (ematch[1].rm_eo - ematch[1].rm_so), epattern + ematch[1].rm_so, +- '\0'); +- sprintf(hostname, "%s%s%c", basename, rbegin, '\0'); ++ snprintf(rbegin, MAX_NNODES_STRLEN, "%.*s", ++ (int) (ematch[1].rm_eo - ematch[1].rm_so), epattern + ematch[1].rm_so); ++ snprintf(hostname, MAX_HOSTNAME_LEN, "%s%s", basename, rbegin); + status = HYDU_add_to_node_list(hostname, tasks_per_node[k++], &global_node_list); + HYDU_ERR_POP(status, "unable to add to node list\n"); + } +@@ -229,6 +221,14 @@ static HYD_status list_to_nodes(char *str) + gpattern[0] += gmatch[0][0].rm_eo; + } + ++ /* if nodelist format not recognized throw an error message and abort */ ++ if (global_node_list == NULL) { ++ fprintf(stdout, ++ "Error: node list format not recognized. Try using '-hosts='.\n"); ++ fflush(stdout); ++ abort(); ++ } ++ + /* clean up match patterns */ + regfree(&gmatch_old[0]); + regfree(&gmatch_new[0]); +--- a/src/pm/hydra/tools/bootstrap/utils/bscu_wait.c ++++ b/src/pm/hydra/tools/bootstrap/utils/bscu_wait.c +@@ -107,17 +107,13 @@ HYD_status HYDT_bscu_wait_for_completion(int timeout) + } + } + +- if (HYD_bscu_pid_list) { +- MPL_free(HYD_bscu_pid_list); +- HYD_bscu_pid_list = NULL; +- HYD_bscu_pid_count = 0; +- } ++ MPL_free(HYD_bscu_pid_list); ++ HYD_bscu_pid_list = NULL; ++ HYD_bscu_pid_count = 0; + +- if (HYD_bscu_fd_list) { +- MPL_free(HYD_bscu_fd_list); +- HYD_bscu_fd_list = NULL; +- HYD_bscu_fd_count = 0; +- } ++ MPL_free(HYD_bscu_fd_list); ++ HYD_bscu_fd_list = NULL; ++ HYD_bscu_fd_count = 0; + + fn_exit: + HYDU_FUNC_EXIT(); +--- a/src/pm/hydra/tools/demux/demux.c ++++ b/src/pm/hydra/tools/demux/demux.c +@@ -203,8 +203,7 @@ HYD_status HYDT_dmx_finalize(void) + run1 = HYDT_dmxu_cb_list; + while (run1) { + run2 = run1->next; +- if (run1->fd) +- MPL_free(run1->fd); ++ MPL_free(run1->fd); + MPL_free(run1); + run1 = run2; + } +--- a/src/pm/hydra/tools/demux/demux_poll.c ++++ b/src/pm/hydra/tools/demux/demux_poll.c +@@ -91,8 +91,7 @@ HYD_status HYDT_dmxu_poll_wait_for_event(int wtime) + status = HYD_TIMED_OUT; + + fn_exit: +- if (pollfds) +- MPL_free(pollfds); ++ MPL_free(pollfds); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/tools/nameserver/hydra_nameserver.c ++++ b/src/pm/hydra/tools/nameserver/hydra_nameserver.c +@@ -84,12 +84,8 @@ static void free_publish_element(struct HYDT_ns_publish *publish) + if (publish == NULL) + return; + +- if (publish->name) +- MPL_free(publish->name); +- +- if (publish->info) +- MPL_free(publish->info); +- ++ MPL_free(publish->name); ++ MPL_free(publish->info); + MPL_free(publish); + } + +--- a/src/pm/hydra/tools/topo/Makefile.mk ++++ b/src/pm/hydra/tools/topo/Makefile.mk +@@ -10,6 +10,6 @@ noinst_HEADERS += tools/topo/topo.h + + libhydra_la_SOURCES += tools/topo/topo.c + +-if hydra_have_hwloc ++if HYDRA_HAVE_HWLOC + include tools/topo/hwloc/Makefile.mk + endif +--- a/src/pm/hydra/tools/topo/hwloc/Makefile.mk ++++ b/src/pm/hydra/tools/topo/hwloc/Makefile.mk +@@ -8,7 +8,7 @@ libhydra_la_SOURCES += tools/topo/hwloc/topo_hwloc.c + + noinst_HEADERS += tools/topo/hwloc/topo_hwloc.h + +-if hydra_use_embedded_hwloc ++if HYDRA_USE_EMBEDDED_HWLOC + AM_CPPFLAGS += @HWLOC_EMBEDDED_CPPFLAGS@ + AM_CFLAGS += @HWLOC_EMBEDDED_CFLAGS@ + +--- a/src/pm/hydra/tools/topo/topo.c ++++ b/src/pm/hydra/tools/topo/topo.c +@@ -55,6 +55,8 @@ HYD_status HYDT_topo_init(char *user_topolib, char *user_binding, char *user_map + goto fn_exit; + } + ++ /* Reaching here means that user specified some binding */ ++ setenv("HYDRA_USER_PROVIDED_BINDING", "1", 1); + /* Initialize the topology library requested by the user */ + #if defined HAVE_HWLOC + if (!strcmp(HYDT_topo_info.topolib, "hwloc")) { +@@ -112,8 +114,7 @@ HYD_status HYDT_topo_finalize(void) + } + #endif /* HAVE_HWLOC */ + +- if (HYDT_topo_info.topolib) +- MPL_free(HYDT_topo_info.topolib); ++ MPL_free(HYDT_topo_info.topolib); + + fn_exit: + HYDU_FUNC_EXIT(); +--- a/src/pm/hydra/ui/mpich/mpiexec.c ++++ b/src/pm/hydra/ui/mpich/mpiexec.c +@@ -13,7 +13,7 @@ + #include "ui.h" + #include "uiu.h" + +-struct HYD_server_info_s HYD_server_info = { {0} }; ++struct HYD_server_info_s HYD_server_info; + + struct HYD_exec *HYD_uii_mpx_exec_list = NULL; + struct HYD_ui_info_s HYD_ui_info; +--- a/src/pm/hydra/ui/mpich/utils.c ++++ b/src/pm/hydra/ui/mpich/utils.c +@@ -209,14 +209,10 @@ static HYD_status genv_fn(char *arg, char ***argv) + + HYDU_append_env_to_list(env_name, env_value, &HYD_server_info.user_global.global_env.user); + +- if (str[0]) +- MPL_free(str[0]); +- if (str[1]) +- MPL_free(str[1]); +- if (env_name) +- MPL_free(env_name); +- if (env_value) +- MPL_free(env_value); ++ MPL_free(str[0]); ++ MPL_free(str[1]); ++ MPL_free(env_name); ++ MPL_free(env_value); + + fn_exit: + return status; +@@ -653,14 +649,10 @@ static HYD_status env_fn(char *arg, char ***argv) + + HYDU_append_env_to_list(env_name, env_value, &exec->user_env); + +- if (str[0]) +- MPL_free(str[0]); +- if (str[1]) +- MPL_free(str[1]); +- if (env_name) +- MPL_free(env_name); +- if (env_value) +- MPL_free(env_value); ++ MPL_free(str[0]); ++ MPL_free(str[1]); ++ MPL_free(env_name); ++ MPL_free(env_value); + + fn_exit: + return status; +--- a/src/pm/hydra/ui/utils/uiu.c ++++ b/src/pm/hydra/ui/utils/uiu.c +@@ -55,38 +55,17 @@ void HYD_uiu_free_params(void) + + HYDU_finalize_user_global(&HYD_server_info.user_global); + +- if (HYD_server_info.base_path) +- MPL_free(HYD_server_info.base_path); +- +- if (HYD_server_info.port_range) +- MPL_free(HYD_server_info.port_range); +- +- if (HYD_server_info.iface_ip_env_name) +- MPL_free(HYD_server_info.iface_ip_env_name); +- +- if (HYD_server_info.nameserver) +- MPL_free(HYD_server_info.nameserver); +- +- if (HYD_server_info.localhost) +- MPL_free(HYD_server_info.localhost); +- +- if (HYD_server_info.node_list) +- HYDU_free_node_list(HYD_server_info.node_list); +- +- if (HYD_server_info.pg_list.proxy_list) +- HYDU_free_proxy_list(HYD_server_info.pg_list.proxy_list); +- +- if (HYD_server_info.pg_list.next) +- HYDU_free_pg_list(HYD_server_info.pg_list.next); +- +- if (HYD_ui_info.prepend_pattern) +- MPL_free(HYD_ui_info.prepend_pattern); +- +- if (HYD_ui_info.outfile_pattern) +- MPL_free(HYD_ui_info.outfile_pattern); +- +- if (HYD_ui_info.errfile_pattern) +- MPL_free(HYD_ui_info.errfile_pattern); ++ MPL_free(HYD_server_info.base_path); ++ MPL_free(HYD_server_info.port_range); ++ MPL_free(HYD_server_info.iface_ip_env_name); ++ MPL_free(HYD_server_info.nameserver); ++ MPL_free(HYD_server_info.localhost); ++ HYDU_free_node_list(HYD_server_info.node_list); ++ HYDU_free_proxy_list(HYD_server_info.pg_list.proxy_list); ++ HYDU_free_pg_list(HYD_server_info.pg_list.next); ++ MPL_free(HYD_ui_info.prepend_pattern); ++ MPL_free(HYD_ui_info.outfile_pattern); ++ MPL_free(HYD_ui_info.errfile_pattern); + + for (run = stdoe_fd_list; run;) { + close(run->fd); +--- a/src/pm/hydra/utils/alloc/alloc.c ++++ b/src/pm/hydra/utils/alloc/alloc.c +@@ -33,32 +33,15 @@ void HYDU_init_user_global(struct HYD_user_global *user_global) + + void HYDU_finalize_user_global(struct HYD_user_global *user_global) + { +- if (user_global->rmk) +- MPL_free(user_global->rmk); +- +- if (user_global->launcher) +- MPL_free(user_global->launcher); +- +- if (user_global->launcher_exec) +- MPL_free(user_global->launcher_exec); +- +- if (user_global->binding) +- MPL_free(user_global->binding); +- +- if (user_global->topolib) +- MPL_free(user_global->topolib); +- +- if (user_global->ckpointlib) +- MPL_free(user_global->ckpointlib); +- +- if (user_global->ckpoint_prefix) +- MPL_free(user_global->ckpoint_prefix); +- +- if (user_global->demux) +- MPL_free(user_global->demux); +- +- if (user_global->iface) +- MPL_free(user_global->iface); ++ MPL_free(user_global->rmk); ++ MPL_free(user_global->launcher); ++ MPL_free(user_global->launcher_exec); ++ MPL_free(user_global->binding); ++ MPL_free(user_global->topolib); ++ MPL_free(user_global->ckpointlib); ++ MPL_free(user_global->ckpoint_prefix); ++ MPL_free(user_global->demux); ++ MPL_free(user_global->iface); + + HYDU_finalize_global_env(&user_global->global_env); + } +@@ -82,8 +65,7 @@ void HYDU_finalize_global_env(struct HYD_env_global *global_env) + if (global_env->inherited) + HYDU_env_free_list(global_env->inherited); + +- if (global_env->prop) +- MPL_free(global_env->prop); ++ MPL_free(global_env->prop); + } + + HYD_status HYDU_alloc_node(struct HYD_node **node) +@@ -117,15 +99,9 @@ void HYDU_free_node_list(struct HYD_node *node_list) + while (node) { + tnode = node->next; + +- if (node->hostname) +- MPL_free(node->hostname); +- +- if (node->user) +- MPL_free(node->user); +- +- if (node->local_binding) +- MPL_free(node->local_binding); +- ++ MPL_free(node->hostname); ++ MPL_free(node->user); ++ MPL_free(node->local_binding); + MPL_free(node); + + node = tnode; +@@ -233,11 +209,8 @@ void HYDU_free_proxy_list(struct HYD_proxy *proxy_list) + MPL_free(proxy->exec_launch_info); + } + +- if (proxy->pid) +- MPL_free(proxy->pid); +- +- if (proxy->exit_status) +- MPL_free(proxy->exit_status); ++ MPL_free(proxy->pid); ++ MPL_free(proxy->exit_status); + + HYDU_free_exec_list(proxy->exec_list); + +@@ -282,11 +255,8 @@ void HYDU_free_exec_list(struct HYD_exec *exec_list) + run = exec->next; + HYDU_free_strlist(exec->exec); + +- if (exec->wdir) +- MPL_free(exec->wdir); +- +- if (exec->env_prop) +- MPL_free(exec->env_prop); ++ MPL_free(exec->wdir); ++ MPL_free(exec->env_prop); + + HYDU_env_free_list(exec->user_env); + exec->user_env = NULL; +--- a/src/pm/hydra/utils/args/args.c ++++ b/src/pm/hydra/utils/args/args.c +@@ -105,10 +105,8 @@ HYD_status HYDU_find_in_path(const char *execname, char **path) + *path = MPL_strdup(""); + + fn_exit: +- if (user_path) +- MPL_free(user_path); +- if (path_loc) +- MPL_free(path_loc); ++ MPL_free(user_path); ++ MPL_free(path_loc); + HYDU_FUNC_EXIT(); + return status; + +@@ -381,8 +379,7 @@ char *HYDU_find_full_path(const char *execname) + + fn_exit: + HYDU_free_strlist(tmp); +- if (test_path) +- MPL_free(test_path); ++ MPL_free(test_path); + HYDU_FUNC_EXIT(); + return path; + +--- a/src/pm/hydra/utils/env/env.c ++++ b/src/pm/hydra/utils/env/env.c +@@ -70,8 +70,7 @@ HYD_status HYDU_list_inherited_env(struct HYD_env **env_list) + } + + fn_exit: +- if (env_str) +- MPL_free(env_str); ++ MPL_free(env_str); + HYDU_FUNC_EXIT(); + return status; + +@@ -131,10 +130,8 @@ HYD_status HYDU_env_free(struct HYD_env *env) + + HYDU_FUNC_ENTER(); + +- if (env->env_name) +- MPL_free(env->env_name); +- if (env->env_value) +- MPL_free(env->env_value); ++ MPL_free(env->env_name); ++ MPL_free(env->env_value); + MPL_free(env); + + HYDU_FUNC_EXIT(); +@@ -202,19 +199,15 @@ HYD_status HYDU_append_env_to_list(const char *env_name, const char *env_value, + while (1) { + if (!strcmp(run->env_name, env_name)) { + /* If we found an entry for this environment variable, just update it */ +- if (run->env_value != NULL && tenv->env_value != NULL) { +- MPL_free(run->env_value); ++ MPL_free(run->env_value); ++ if (tenv->env_value != NULL) { + run->env_value = MPL_strdup(tenv->env_value); +- } else if (run->env_value != NULL) { +- MPL_free(run->env_value); ++ } else { + run->env_value = NULL; +- } else if (env_value != NULL) { +- run->env_value = MPL_strdup(tenv->env_value); + } + + MPL_free(tenv->env_name); +- if (tenv->env_value) +- MPL_free(tenv->env_value); ++ MPL_free(tenv->env_value); + MPL_free(tenv); + + break; +@@ -251,8 +244,7 @@ HYD_status HYDU_append_env_str_to_list(const char *str, struct HYD_env **env_lis + HYDU_ERR_POP(status, "unable to append env to list\n"); + + fn_exit: +- if (my_str) +- MPL_free(my_str); ++ MPL_free(my_str); + HYDU_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra/utils/sock/sock.c ++++ b/src/pm/hydra/utils/sock/sock.c +@@ -568,8 +568,7 @@ HYDU_sock_create_and_listen_portstr(char *iface, char *hostname, char *port_rang + MPL_free(sport); + + fn_exit: +- if (ip) +- MPL_free(ip); ++ MPL_free(ip); + return status; + + fn_fail: +--- a/src/pm/hydra/utils/string/string.c ++++ b/src/pm/hydra/utils/string/string.c +@@ -260,8 +260,7 @@ char **HYDU_str_to_strlist(char *str) + argc++; + } + } +- if (strlist[argc]) +- MPL_free(strlist[argc]); ++ MPL_free(strlist[argc]); + strlist[argc] = NULL; + + fn_exit: +--- a/src/pm/hydra2/configure.ac ++++ b/src/pm/hydra2/configure.ac +@@ -17,7 +17,8 @@ AC_ARG_PROGRAM + + dnl must come before LT_INIT, which AC_REQUIREs AC_PROG_CC + dnl must also come before AC_USE_SYSTEM_EXTENSIONS +-PAC_PROG_CC ++AC_PROG_CC ++AC_PROG_CC_C99 + AM_PROG_CC_C_O + + # also needed by hwloc in embedded mode, must also come early for expansion +@@ -359,8 +360,8 @@ if test "$have_hwloc" = "yes" ; then + fi + + HWLOC_DO_AM_CONDITIONALS +-AM_CONDITIONAL([hydra_have_hwloc], [test "${have_hwloc}" = "yes"]) +-AM_CONDITIONAL([hydra_use_embedded_hwloc], [test "${hydra_use_embedded_hwloc}" = "yes"]) ++AM_CONDITIONAL([HYDRA_HAVE_HWLOC], [test "${have_hwloc}" = "yes"]) ++AM_CONDITIONAL([HYDRA_USE_EMBEDDED_HWLOC], [test "${hydra_use_embedded_hwloc}" = "yes"]) + + + +--- a/src/pm/hydra2/libhydra/bstrap/ll/ll_launch.c ++++ b/src/pm/hydra2/libhydra/bstrap/ll/ll_launch.c +@@ -49,8 +49,7 @@ HYD_status HYDI_bstrap_ll_launch(const char *hostname, const char *launch_exec, + + fn_exit: + HYD_str_free_list(targs); +- if (lexec) +- MPL_free(lexec); ++ MPL_free(lexec); + HYD_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra2/libhydra/bstrap/rsh/rsh_launch.c ++++ b/src/pm/hydra2/libhydra/bstrap/rsh/rsh_launch.c +@@ -54,8 +54,7 @@ HYD_status HYDI_bstrap_rsh_launch(const char *hostname, const char *launch_exec, + + fn_exit: + HYD_str_free_list(targs); +- if (lexec) +- MPL_free(lexec); ++ MPL_free(lexec); + HYD_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra2/libhydra/bstrap/sge/sge_launch.c ++++ b/src/pm/hydra2/libhydra/bstrap/sge/sge_launch.c +@@ -55,8 +55,7 @@ HYD_status HYDI_bstrap_sge_launch(const char *hostname, const char *launch_exec, + + fn_exit: + HYD_str_free_list(targs); +- if (lexec) +- MPL_free(lexec); ++ MPL_free(lexec); + HYD_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra2/libhydra/bstrap/slurm/slurm_launch.c ++++ b/src/pm/hydra2/libhydra/bstrap/slurm/slurm_launch.c +@@ -66,8 +66,7 @@ HYD_status HYDI_bstrap_slurm_launch(const char *hostname, const char *launch_exe + + fn_exit: + HYD_str_free_list(targs); +- if (lexec) +- MPL_free(lexec); ++ MPL_free(lexec); + HYD_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra2/libhydra/bstrap/ssh/ssh_launch.c ++++ b/src/pm/hydra2/libhydra/bstrap/ssh/ssh_launch.c +@@ -64,8 +64,7 @@ HYD_status HYDI_bstrap_ssh_launch(const char *hostname, const char *launch_exec, + + fn_exit: + HYD_str_free_list(targs); +- if (lexec) +- MPL_free(lexec); ++ MPL_free(lexec); + HYD_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra2/libhydra/demux/hydra_demux_poll.c ++++ b/src/pm/hydra2/libhydra/demux/hydra_demux_poll.c +@@ -82,8 +82,7 @@ HYD_status HYDI_dmx_poll_wait_for_event(int wtime) + status = HYD_ERR_TIMED_OUT; + + fn_exit: +- if (pollfds) +- MPL_free(pollfds); ++ MPL_free(pollfds); + HYD_FUNC_EXIT(); + return status; + +--- a/src/pm/hydra2/libhydra/env/hydra_env.c ++++ b/src/pm/hydra2/libhydra/env/hydra_env.c +@@ -90,10 +90,8 @@ HYD_status HYD_env_free(struct HYD_env *env) + + HYD_FUNC_ENTER(); + +- if (env->env_name) +- MPL_free(env->env_name); +- if (env->env_value) +- MPL_free(env->env_value); ++ MPL_free(env->env_name); ++ MPL_free(env->env_value); + MPL_free(env); + + HYD_FUNC_EXIT(); +@@ -123,19 +121,15 @@ HYD_status HYD_env_append_to_list(const char *env_name, const char *env_value, + while (1) { + if (!strcmp(run->env_name, env_name)) { + /* If we found an entry for this environment variable, just update it */ +- if (run->env_value != NULL && tenv->env_value != NULL) { +- MPL_free(run->env_value); ++ MPL_free(run->env_value); ++ if (tenv->env_value != NULL) { + run->env_value = MPL_strdup(tenv->env_value); +- } else if (run->env_value != NULL) { +- MPL_free(run->env_value); ++ } else { + run->env_value = NULL; +- } else if (env_value != NULL) { +- run->env_value = MPL_strdup(tenv->env_value); + } + + MPL_free(tenv->env_name); +- if (tenv->env_value) +- MPL_free(tenv->env_value); ++ MPL_free(tenv->env_value); + MPL_free(tenv); + + break; +--- a/src/pm/hydra2/libhydra/fs/hydra_fs.c ++++ b/src/pm/hydra2/libhydra/fs/hydra_fs.c +@@ -102,10 +102,8 @@ HYD_status HYD_find_in_path(const char *execname, char **path) + *path = MPL_strdup(""); + + fn_exit: +- if (user_path) +- MPL_free(user_path); +- if (path_loc) +- MPL_free(path_loc); ++ MPL_free(user_path); ++ MPL_free(path_loc); + HYD_FUNC_EXIT(); + return status; + +@@ -171,8 +169,7 @@ char *HYD_find_full_path(const char *execname) + + fn_exit: + HYD_str_free_list(tmp); +- if (test_path) +- MPL_free(test_path); ++ MPL_free(test_path); + HYD_FUNC_EXIT(); + return path; + +--- a/src/pm/hydra2/libhydra/rmk/lsf/lsf_query_node_list.c ++++ b/src/pm/hydra2/libhydra/rmk/lsf/lsf_query_node_list.c +@@ -55,8 +55,7 @@ HYD_status HYDI_rmk_lsf_query_node_list(int *node_count, struct HYD_node **nodes + hostname = strtok(NULL, " "); + } + +- if (thosts) +- MPL_free(thosts); ++ MPL_free(thosts); + } + + fn_exit: +--- a/src/pm/hydra2/libhydra/str/hydra_str.c ++++ b/src/pm/hydra2/libhydra/str/hydra_str.c +@@ -180,8 +180,7 @@ char **HYD_str_to_strlist(char *str) + argc++; + } + } +- if (strlist[argc]) +- MPL_free(strlist[argc]); ++ MPL_free(strlist[argc]); + strlist[argc] = NULL; + + fn_exit: +--- a/src/pm/hydra2/libhydra/topo/Makefile.mk ++++ b/src/pm/hydra2/libhydra/topo/Makefile.mk +@@ -11,6 +11,6 @@ noinst_HEADERS += libhydra/topo/hydra_topo.h \ + + libhydra_la_SOURCES += libhydra/topo/hydra_topo.c + +-if hydra_have_hwloc ++if HYDRA_HAVE_HWLOC + include libhydra/topo/hwloc/Makefile.mk + endif +--- a/src/pm/hydra2/libhydra/topo/hwloc/Makefile.mk ++++ b/src/pm/hydra2/libhydra/topo/hwloc/Makefile.mk +@@ -8,7 +8,7 @@ libhydra_la_SOURCES += libhydra/topo/hwloc/hydra_topo_hwloc.c + + noinst_HEADERS += libhydra/topo/hwloc/hydra_topo_hwloc.h + +-if hydra_use_embedded_hwloc ++if HYDRA_USE_EMBEDDED_HWLOC + AM_CPPFLAGS += @HWLOC_EMBEDDED_CPPFLAGS@ + AM_CFLAGS += @HWLOC_EMBEDDED_CFLAGS@ + +--- a/src/pm/hydra2/mpiexec/mpiexec.c ++++ b/src/pm/hydra2/mpiexec/mpiexec.c +@@ -999,15 +999,12 @@ int main(int argc, char **argv) + + HASH_DEL(mpiexec_pg_hash, pg); + +- if (pg->node_list) +- MPL_free(pg->node_list); ++ MPL_free(pg->node_list); + if (pg->exec_list) + HYD_exec_free_list(pg->exec_list); + +- if (pg->downstream.proxy_id) +- MPL_free(pg->downstream.proxy_id); +- if (pg->downstream.pid) +- MPL_free(pg->downstream.pid); ++ MPL_free(pg->downstream.proxy_id); ++ MPL_free(pg->downstream.pid); + + HASH_ITER(hh, pg->downstream.fd_control_hash, hash, thash) { + HASH_DEL(pg->downstream.fd_control_hash, hash); +@@ -1015,73 +1012,48 @@ int main(int argc, char **argv) + } + + for (i = 0; i < pg->num_downstream; i++) +- if (pg->downstream.kvcache[i]) +- MPL_free(pg->downstream.kvcache[i]); +- if (pg->downstream.kvcache) +- MPL_free(pg->downstream.kvcache); +- if (pg->downstream.kvcache_size) +- MPL_free(pg->downstream.kvcache_size); +- if (pg->downstream.kvcache_num_blocks) +- MPL_free(pg->downstream.kvcache_num_blocks); +- +- if (pg->pmi_process_mapping) +- MPL_free(pg->pmi_process_mapping); +- ++ MPL_free(pg->downstream.kvcache[i]); ++ MPL_free(pg->downstream.kvcache); ++ MPL_free(pg->downstream.kvcache_size); ++ MPL_free(pg->downstream.kvcache_num_blocks); ++ MPL_free(pg->pmi_process_mapping); + MPL_free(pg); + +- if (mpiexec_params.rmk) +- MPL_free(mpiexec_params.rmk); +- if (mpiexec_params.launcher) +- MPL_free(mpiexec_params.launcher); +- if (mpiexec_params.launcher_exec) +- MPL_free(mpiexec_params.launcher_exec); +- if (mpiexec_params.binding) +- MPL_free(mpiexec_params.binding); +- if (mpiexec_params.mapping) +- MPL_free(mpiexec_params.mapping); +- if (mpiexec_params.membind) +- MPL_free(mpiexec_params.membind); +- if (mpiexec_params.base_path) +- MPL_free(mpiexec_params.base_path); +- if (mpiexec_params.port_range) +- MPL_free(mpiexec_params.port_range); +- if (mpiexec_params.nameserver) +- MPL_free(mpiexec_params.nameserver); +- if (mpiexec_params.localhost) +- MPL_free(mpiexec_params.localhost); +- +- if (mpiexec_params.global_node_list) +- MPL_free(mpiexec_params.global_node_list); +- if (mpiexec_params.global_active_processes) +- MPL_free(mpiexec_params.global_active_processes); ++ MPL_free(mpiexec_params.rmk); ++ MPL_free(mpiexec_params.launcher); ++ MPL_free(mpiexec_params.launcher_exec); ++ MPL_free(mpiexec_params.binding); ++ MPL_free(mpiexec_params.mapping); ++ MPL_free(mpiexec_params.membind); ++ MPL_free(mpiexec_params.base_path); ++ MPL_free(mpiexec_params.port_range); ++ MPL_free(mpiexec_params.nameserver); ++ MPL_free(mpiexec_params.localhost); ++ ++ MPL_free(mpiexec_params.global_node_list); ++ MPL_free(mpiexec_params.global_active_processes); + + for (i = 0; i < mpiexec_params.envlist_count; i++) + MPL_free(mpiexec_params.envlist[i]); +- if (mpiexec_params.envlist) +- MPL_free(mpiexec_params.envlist); ++ MPL_free(mpiexec_params.envlist); + + for (i = 0; i < mpiexec_params.primary.envcount; i++) + MPL_free(mpiexec_params.primary.env[i]); + if (mpiexec_params.primary.envcount) + MPL_free(mpiexec_params.primary.env); + +- if (mpiexec_params.primary.serialized_buf) +- MPL_free(mpiexec_params.primary.serialized_buf); ++ MPL_free(mpiexec_params.primary.serialized_buf); + + for (i = 0; i < mpiexec_params.secondary.envcount; i++) + MPL_free(mpiexec_params.secondary.env[i]); + if (mpiexec_params.secondary.envcount) + MPL_free(mpiexec_params.secondary.env); + +- if (mpiexec_params.secondary.serialized_buf) +- MPL_free(mpiexec_params.secondary.serialized_buf); ++ MPL_free(mpiexec_params.secondary.serialized_buf); + +- if (mpiexec_params.prepend_pattern) +- MPL_free(mpiexec_params.prepend_pattern); +- if (mpiexec_params.outfile_pattern) +- MPL_free(mpiexec_params.outfile_pattern); +- if (mpiexec_params.errfile_pattern) +- MPL_free(mpiexec_params.errfile_pattern); ++ MPL_free(mpiexec_params.prepend_pattern); ++ MPL_free(mpiexec_params.outfile_pattern); ++ MPL_free(mpiexec_params.errfile_pattern); + + fn_exit: + HYD_FUNC_EXIT(); +--- a/src/pm/hydra2/mpiexec/mpiexec_params.c ++++ b/src/pm/hydra2/mpiexec/mpiexec_params.c +@@ -172,14 +172,10 @@ static HYD_status genv_fn(char *arg, char ***argv) + HYD_ERR_POP(status, "error converting env to string\n"); + mpiexec_params.primary.envcount++; + +- if (str[0]) +- MPL_free(str[0]); +- if (str[1]) +- MPL_free(str[1]); +- if (env_name) +- MPL_free(env_name); +- if (env_value) +- MPL_free(env_value); ++ MPL_free(str[0]); ++ MPL_free(str[1]); ++ MPL_free(env_name); ++ MPL_free(env_value); + + fn_exit: + return status; +--- a/src/pm/hydra2/mpiexec/mpiexec_utils.c ++++ b/src/pm/hydra2/mpiexec/mpiexec_utils.c +@@ -58,26 +58,13 @@ void mpiexec_free_params(void) + { + struct stdoe_fd *tmp, *run; + +- if (mpiexec_params.base_path) +- MPL_free(mpiexec_params.base_path); +- +- if (mpiexec_params.port_range) +- MPL_free(mpiexec_params.port_range); +- +- if (mpiexec_params.nameserver) +- MPL_free(mpiexec_params.nameserver); +- +- if (mpiexec_params.localhost) +- MPL_free(mpiexec_params.localhost); +- +- if (mpiexec_params.prepend_pattern) +- MPL_free(mpiexec_params.prepend_pattern); +- +- if (mpiexec_params.outfile_pattern) +- MPL_free(mpiexec_params.outfile_pattern); +- +- if (mpiexec_params.errfile_pattern) +- MPL_free(mpiexec_params.errfile_pattern); ++ MPL_free(mpiexec_params.base_path); ++ MPL_free(mpiexec_params.port_range); ++ MPL_free(mpiexec_params.nameserver); ++ MPL_free(mpiexec_params.localhost); ++ MPL_free(mpiexec_params.prepend_pattern); ++ MPL_free(mpiexec_params.outfile_pattern); ++ MPL_free(mpiexec_params.errfile_pattern); + + for (run = stdoe_fd_list; run;) { + close(run->fd); +@@ -86,17 +73,10 @@ void mpiexec_free_params(void) + run = tmp; + } + +- if (mpiexec_params.rmk) +- MPL_free(mpiexec_params.rmk); +- +- if (mpiexec_params.launcher) +- MPL_free(mpiexec_params.launcher); +- +- if (mpiexec_params.launcher_exec) +- MPL_free(mpiexec_params.launcher_exec); +- +- if (mpiexec_params.binding) +- MPL_free(mpiexec_params.binding); ++ MPL_free(mpiexec_params.rmk); ++ MPL_free(mpiexec_params.launcher); ++ MPL_free(mpiexec_params.launcher_exec); ++ MPL_free(mpiexec_params.binding); + } + + void mpiexec_print_params(void) +--- a/src/pm/hydra2/nameserver/hydra_nameserver.c ++++ b/src/pm/hydra2/nameserver/hydra_nameserver.c +@@ -63,12 +63,8 @@ static void free_publish_element(struct nameserv_publish *publish) + if (publish == NULL) + return; + +- if (publish->name) +- MPL_free(publish->name); +- +- if (publish->info) +- MPL_free(publish->info); +- ++ MPL_free(publish->name); ++ MPL_free(publish->info); + MPL_free(publish); + } + +--- a/src/pm/hydra2/proxy/proxy.c ++++ b/src/pm/hydra2/proxy/proxy.c +@@ -806,11 +806,8 @@ int main(int argc, char **argv) + MPL_free(hash); + } + +- if (proxy_params.cwd) +- MPL_free(proxy_params.cwd); +- +- if (proxy_params.root.hostname) +- MPL_free(proxy_params.root.hostname); ++ MPL_free(proxy_params.cwd); ++ MPL_free(proxy_params.root.hostname); + + HYD_ASSERT(proxy_params.immediate.proxy.fd_control_hash == NULL, status); + HYD_ASSERT(proxy_params.immediate.proxy.fd_stdin_hash == NULL, status); +@@ -818,15 +815,12 @@ int main(int argc, char **argv) + HYD_ASSERT(proxy_params.immediate.proxy.fd_stderr_hash == NULL, status); + HYD_ASSERT(proxy_params.immediate.proxy.pid_hash == NULL, status); + +- if (proxy_params.immediate.proxy.block_start) +- MPL_free(proxy_params.immediate.proxy.block_start); +- if (proxy_params.immediate.proxy.block_size) +- MPL_free(proxy_params.immediate.proxy.block_size); ++ MPL_free(proxy_params.immediate.proxy.block_start); ++ MPL_free(proxy_params.immediate.proxy.block_size); + + if (proxy_params.immediate.proxy.num_children) { + for (i = 0; i < proxy_params.immediate.proxy.num_children; i++) +- if (proxy_params.immediate.proxy.kvcache[i]) +- MPL_free(proxy_params.immediate.proxy.kvcache[i]); ++ MPL_free(proxy_params.immediate.proxy.kvcache[i]); + MPL_free(proxy_params.immediate.proxy.kvcache); + MPL_free(proxy_params.immediate.proxy.kvcache_size); + MPL_free(proxy_params.immediate.proxy.kvcache_num_blocks); +@@ -837,32 +831,27 @@ int main(int argc, char **argv) + HYD_ASSERT(proxy_params.immediate.process.fd_pmi_hash == NULL, status); + HYD_ASSERT(proxy_params.immediate.process.pid_hash == NULL, status); + +- if (proxy_params.immediate.process.pmi_id) +- MPL_free(proxy_params.immediate.process.pmi_id); ++ MPL_free(proxy_params.immediate.process.pmi_id); + +- if (proxy_params.all.kvsname) +- MPL_free(proxy_params.all.kvsname); ++ MPL_free(proxy_params.all.kvsname); + if (proxy_params.all.complete_exec_list) + HYD_exec_free_list(proxy_params.all.complete_exec_list); + +- if (proxy_params.all.primary_env.serial_buf) +- MPL_free(proxy_params.all.primary_env.serial_buf); ++ MPL_free(proxy_params.all.primary_env.serial_buf); + if (proxy_params.all.primary_env.argc) { + for (i = 0; i < proxy_params.all.primary_env.argc; i++) + MPL_free(proxy_params.all.primary_env.argv[i]); + MPL_free(proxy_params.all.primary_env.argv); + } + +- if (proxy_params.all.secondary_env.serial_buf) +- MPL_free(proxy_params.all.secondary_env.serial_buf); ++ MPL_free(proxy_params.all.secondary_env.serial_buf); + if (proxy_params.all.secondary_env.argc) { + for (i = 0; i < proxy_params.all.secondary_env.argc; i++) + MPL_free(proxy_params.all.secondary_env.argv[i]); + MPL_free(proxy_params.all.secondary_env.argv); + } + +- if (proxy_params.all.pmi_process_mapping) +- MPL_free(proxy_params.all.pmi_process_mapping); ++ MPL_free(proxy_params.all.pmi_process_mapping); + + fn_exit: + return status; +--- a/src/pm/hydra2/proxy/proxy_pmi_cb.c ++++ b/src/pm/hydra2/proxy/proxy_pmi_cb.c +@@ -153,10 +153,8 @@ static HYD_status flush_put_cache(void) + } + } + +- if (lengths) +- MPL_free(lengths); +- if (buf) +- MPL_free(buf); ++ MPL_free(lengths); ++ MPL_free(buf); + + fn_exit: + return status; +--- a/src/pm/util/dbgiface.c ++++ b/src/pm/util/dbgiface.c +@@ -124,9 +124,7 @@ int MPIE_InitForDebugger(ProcessWorld * pWorld) + /* This routine is provided to free memory allocated in this routine */ + int MPIE_FreeFromDebugger(void) + { +- if (MPIR_proctable) { +- MPL_free(MPIR_proctable); +- } ++ MPL_free(MPIR_proctable); + return 0; + } + +--- a/src/pm/util/rm.c ++++ b/src/pm/util/rm.c +@@ -403,12 +403,8 @@ int MPIE_FreeMachineTable(MachineTable * mt) + int i; + for (i = 0; i < mt->nHosts; i++) { + MPL_free(mt->desc[i].hostname); +- if (mt->desc[i].login) { +- MPL_free(mt->desc[i].login); +- } +- if (mt->desc[i].netname) { +- MPL_free(mt->desc[i].netname); +- } ++ MPL_free(mt->desc[i].login); ++ MPL_free(mt->desc[i].netname); + } + MPL_free(mt->desc); + MPL_free(mt); +--- a/src/pm/util/simple_pmiutil2.c ++++ b/src/pm/util/simple_pmiutil2.c +@@ -41,7 +41,7 @@ struct PMIU_keyval_pairs { + char key[MAXKEYLEN]; + char value[MAXVALLEN]; + }; +-static struct PMIU_keyval_pairs PMIU_keyval_tab[64] = { {{0}, {0}} }; ++static struct PMIU_keyval_pairs PMIU_keyval_tab[64]; + + static int PMIU_keyval_tab_idx = 0; + +--- a/src/pmi/pmi2/simple/simple2pmi.c ++++ b/src/pmi/pmi2/simple/simple2pmi.c +@@ -602,10 +602,6 @@ int PMI2_Job_GetId(char jobid[], int jobid_size) + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME PMI2_Job_Connect +-#undef FCNAME +-#define FCNAME PMI2DI_QUOTE(FUNCNAME) + int PMI2_Job_Connect(const char jobid[], PMI2_Connect_comm_t * conn) + { + int pmi2_errno = PMI2_SUCCESS; +@@ -1325,7 +1321,7 @@ int PMIi_ReadCommand(int fd, PMI2_Command * cmd) + #ifdef MPICH_IS_THREADED + MPIR_THREAD_CHECK_BEGIN; + { +- MPL_thread_mutex_lock(&mutex, &err); ++ MPL_thread_mutex_lock(&mutex, &err, MPL_THREAD_PRIO_HIGH); + + while (blocked && !cmd->complete) + MPL_thread_cond_wait(&cond, &mutex, &err); +@@ -1468,7 +1464,7 @@ int PMIi_ReadCommand(int fd, PMI2_Command * cmd) + #ifdef MPICH_IS_THREADED + MPIR_THREAD_CHECK_BEGIN; + { +- MPL_thread_mutex_lock(&mutex, &err); ++ MPL_thread_mutex_lock(&mutex, &err, MPL_THREAD_PRIO_HIGH); + blocked = FALSE; + MPL_thread_cond_broadcast(&cond, &err); + MPL_thread_mutex_unlock(&mutex, &err); +@@ -1482,8 +1478,7 @@ int PMIi_ReadCommand(int fd, PMI2_Command * cmd) + fn_exit: + return pmi2_errno; + fn_fail: +- if (cmd_buf) +- PMI2U_Free(cmd_buf); ++ PMI2U_Free(cmd_buf); + goto fn_exit; + } + +@@ -1605,7 +1600,7 @@ int PMIi_WriteSimpleCommand(int fd, PMI2_Command * resp, const char cmd[], + #ifdef MPICH_IS_THREADED + MPIR_THREAD_CHECK_BEGIN; + { +- MPL_thread_mutex_lock(&mutex, &err); ++ MPL_thread_mutex_lock(&mutex, &err, MPL_THREAD_PRIO_HIGH); + + while (blocked) + MPL_thread_cond_wait(&cond, &mutex, &err); +@@ -1633,7 +1628,7 @@ int PMIi_WriteSimpleCommand(int fd, PMI2_Command * resp, const char cmd[], + #ifdef MPICH_IS_THREADED + MPIR_THREAD_CHECK_BEGIN; + { +- MPL_thread_mutex_lock(&mutex, &err); ++ MPL_thread_mutex_lock(&mutex, &err, MPL_THREAD_PRIO_HIGH); + blocked = FALSE; + MPL_thread_cond_broadcast(&cond, &err); + MPL_thread_mutex_unlock(&mutex, &err); +--- a/src/pmi/pmi2/simple/simple_pmiutil.c ++++ b/src/pmi/pmi2/simple/simple_pmiutil.c +@@ -42,7 +42,7 @@ struct PMI2U_keyval_pairs { + char key[MAXKEYLEN]; + char value[MAXVALLEN]; + }; +-static struct PMI2U_keyval_pairs PMI2U_keyval_tab[64] = { {{0}, {0}} }; ++static struct PMI2U_keyval_pairs PMI2U_keyval_tab[64]; + + static int PMI2U_keyval_tab_idx = 0; + +--- a/src/pmi/simple/simple_pmi.c ++++ b/src/pmi/simple/simple_pmi.c +@@ -724,7 +724,7 @@ int PMI_Spawn_multiple(int count, + /* FIXME: This mixes init with get maxes */ + static int PMII_getmaxes(int *kvsname_max, int *keylen_max, int *vallen_max) + { +- char buf[PMIU_MAXLINE], cmd[PMIU_MAXLINE], errmsg[PMIU_MAXLINE]; ++ char buf[PMIU_MAXLINE], cmd[PMIU_MAXLINE]; + int err, rc; + + rc = MPL_snprintf(buf, PMIU_MAXLINE, +@@ -748,8 +748,10 @@ static int PMII_getmaxes(int *kvsname_max, int *keylen_max, int *vallen_max) + PMIU_parse_keyvals(buf); + cmd[0] = 0; + PMIU_getval("cmd", cmd, PMIU_MAXLINE); ++ + if (strncmp(cmd, "response_to_init", PMIU_MAXLINE) != 0) { +- MPL_snprintf(errmsg, PMIU_MAXLINE, ++ char errmsg[PMIU_MAXLINE * 2 + 100]; ++ MPL_snprintf(errmsg, sizeof(errmsg), + "got unexpected response to init :%s: (full line = %s)", cmd, buf); + PMI_Abort(-1, errmsg); + } else { +@@ -758,7 +760,9 @@ static int PMII_getmaxes(int *kvsname_max, int *keylen_max, int *vallen_max) + if (strncmp(buf, "0", PMIU_MAXLINE) != 0) { + PMIU_getval("pmi_version", buf, PMIU_MAXLINE); + PMIU_getval("pmi_subversion", buf1, PMIU_MAXLINE); +- MPL_snprintf(errmsg, PMIU_MAXLINE, ++ ++ char errmsg[PMIU_MAXLINE * 2 + 100]; ++ MPL_snprintf(errmsg, sizeof(errmsg), + "pmi_version mismatch; client=%d.%d mgr=%s.%s", + PMI_VERSION, PMI_SUBVERSION, buf, buf1); + PMI_Abort(-1, errmsg); +--- a/src/pmi/simple/simple_pmiutil.c ++++ b/src/pmi/simple/simple_pmiutil.c +@@ -46,7 +46,7 @@ struct PMIU_keyval_pairs { + char key[MAXKEYLEN]; + char value[MAXVALLEN]; + }; +-static struct PMIU_keyval_pairs PMIU_keyval_tab[64] = { {{0}, {0}} }; ++static struct PMIU_keyval_pairs PMIU_keyval_tab[64]; + + static int PMIU_keyval_tab_idx = 0; + +--- a/src/util/Makefile.mk ++++ b/src/util/Makefile.mk +@@ -5,7 +5,7 @@ + ## See COPYRIGHT in top-level directory. + ## + +-include $(top_srcdir)/src/util/logging/Makefile.mk ++# include $(top_srcdir)/src/util/logging/Makefile.mk + include $(top_srcdir)/src/util/mem/Makefile.mk + include $(top_srcdir)/src/util/cvar/Makefile.mk + include $(top_srcdir)/src/util/procmap/Makefile.mk +--- a/src/util/logging/rlog/TraceInput/logformat_trace_InputLog.c ++++ b/src/util/logging/rlog/TraceInput/logformat_trace_InputLog.c +@@ -248,11 +248,11 @@ JNIEXPORT jobject JNICALL Java_logformat_trace_InputLog_getNextCategory(JNIEnv * + if (ierr != 0 || legend_pos <= 0) { + fprintf(errfile, "%s\n", TRACE_Get_err_string(ierr)); + fflush(errfile); +- if (legend_base != NULL && legend_base != slegend_base) ++ if (legend_base != slegend_base) + MPL_free(legend_base); +- if (label_base != NULL && label_base != slabel_base) ++ if (label_base != slabel_base) + MPL_free(label_base); +- if (methods_base != NULL && methods_base != smethods_base) ++ if (methods_base != smethods_base) + MPL_free(methods_base); + return NULL; + } +@@ -296,17 +296,17 @@ JNIEXPORT jobject JNICALL Java_logformat_trace_InputLog_getNextCategory(JNIEnv * + /* Clean up the unused reference and free local memory */ + if (jlegend != NULL) + (*env)->DeleteLocalRef(env, jlegend); +- if (legend_base != NULL && legend_base != slegend_base) ++ if (legend_base != slegend_base) + MPL_free(legend_base); + + if (jlabel != NULL) + (*env)->DeleteLocalRef(env, jlabel); +- if (label_base != NULL && label_base != slabel_base) ++ if (label_base != slabel_base) + MPL_free(label_base); + + if (jmethods != NULL) + (*env)->DeleteLocalRef(env, jmethods); +- if (methods_base != NULL && methods_base != smethods_base) ++ if (methods_base != smethods_base) + MPL_free(methods_base); + + return objdef; +@@ -381,18 +381,14 @@ JNIEXPORT jobject JNICALL Java_logformat_trace_InputLog_getNextYCoordMap(JNIEnv + if (ierr != 0) { + fprintf(errfile, "Error: %s\n", TRACE_Get_err_string(ierr)); + fflush(errfile); +- if (coordmap_base != NULL) +- MPL_free(coordmap_base); +- if (title_name != NULL) +- MPL_free(title_name); ++ MPL_free(coordmap_base); ++ MPL_free(title_name); + if (column_names != NULL) { + for (icol = 0; icol < ncolumns - 1; icol++) +- if (column_names[icol] != NULL) +- MPL_free(column_names[icol]); ++ MPL_free(column_names[icol]); + MPL_free(column_names); + } +- if (methods_base != NULL) +- MPL_free(methods_base); ++ MPL_free(methods_base); + return NULL; + } + +@@ -446,22 +442,18 @@ JNIEXPORT jobject JNICALL Java_logformat_trace_InputLog_getNextYCoordMap(JNIEnv + /* Clean up the unused reference and free local memory */ + if (coordmap_pos > 0) + (*env)->DeleteLocalRef(env, j_coordmap_elems); +- if (coordmap_base != NULL) +- MPL_free(coordmap_base); ++ MPL_free(coordmap_base); + +- if (title_name != NULL) +- MPL_free(title_name); ++ MPL_free(title_name); + if (column_names != NULL) { + for (icol = 0; icol < ncolumns - 1; icol++) +- if (column_names[icol] != NULL) +- MPL_free(column_names[icol]); ++ MPL_free(column_names[icol]); + MPL_free(column_names); + } + + if (jmethods != NULL) + (*env)->DeleteLocalRef(env, jmethods); +- if (methods_base != NULL) +- MPL_free(methods_base); ++ MPL_free(methods_base); + + return ycoordmap; + } +@@ -534,11 +526,11 @@ JNIEXPORT jobject JNICALL Java_logformat_trace_InputLog_getNextPrimitive(JNIEnv + if (ierr != 0 || (tcoord_pos <= 0 || ycoord_pos <= 0)) { + fprintf(errfile, "%s\n", TRACE_Get_err_string(ierr)); + fflush(errfile); +- if (tcoord_base != NULL && tcoord_base != stcoord_base) ++ if (tcoord_base != stcoord_base) + MPL_free(tcoord_base); +- if (ycoord_base != NULL && ycoord_base != sycoord_base) ++ if (ycoord_base != sycoord_base) + MPL_free(ycoord_base); +- if (info_base != NULL && info_base != sinfo_base) ++ if (info_base != sinfo_base) + MPL_free(info_base); + return NULL; + } +@@ -578,17 +570,17 @@ JNIEXPORT jobject JNICALL Java_logformat_trace_InputLog_getNextPrimitive(JNIEnv + /* Clean up the unused reference and free local memory */ + if (tcoord_pos > 0) + (*env)->DeleteLocalRef(env, j_tcoords); +- if (tcoord_base != NULL && tcoord_base != stcoord_base) ++ if (tcoord_base != stcoord_base) + MPL_free(tcoord_base); + + if (ycoord_pos > 0) + (*env)->DeleteLocalRef(env, j_ycoords); +- if (ycoord_base != NULL && ycoord_base != sycoord_base) ++ if (ycoord_base != sycoord_base) + MPL_free(ycoord_base); + + if (info_pos > 0) + (*env)->DeleteLocalRef(env, j_infos); +- if (info_base != NULL && info_base != sinfo_base) ++ if (info_base != sinfo_base) + MPL_free(info_base); + + return prime; +@@ -690,8 +682,7 @@ JNIEXPORT jobject JNICALL Java_logformat_trace_InputLog_getNextComposite(JNIEnv + /* Clean up the unused reference and free local memory */ + if (cm_info_sz > 0 && cm_info_pos > 0) + (*env)->DeleteLocalRef(env, j_cm_infos); +- if (cm_info_base != NULL) +- MPL_free(cm_info_base); ++ MPL_free(cm_info_base); + + return cmplx; + } +--- a/src/util/logging/rlog/TraceInput/trace_input.c ++++ b/src/util/logging/rlog/TraceInput/trace_input.c +@@ -131,17 +131,13 @@ TRACE_EXPORT int TRACE_Close(TRACE_file * fp) + + if ((*fp)->pInput) { + for (i = 0; i < (*fp)->pInput->nNumRanks; i++) { +- if ((*fp)->ppEvent[i]) +- MPL_free((*fp)->ppEvent[i]); +- if ((*fp)->ppEventAvail[i]) +- MPL_free((*fp)->ppEventAvail[i]); ++ MPL_free((*fp)->ppEvent[i]); ++ MPL_free((*fp)->ppEventAvail[i]); + } + RLOG_CloseInputStruct(&(*fp)->pInput); + } +- if ((*fp)->ppEvent) +- MPL_free((*fp)->ppEvent); +- if ((*fp)->ppEventAvail) +- MPL_free((*fp)->ppEventAvail); ++ MPL_free((*fp)->ppEvent); ++ MPL_free((*fp)->ppEventAvail); + MPL_free((*fp)); + *fp = NULL; + +--- a/src/util/logging/rlog/configure.ac ++++ b/src/util/logging/rlog/configure.ac +@@ -56,18 +56,14 @@ export master_top_builddir + AC_SUBST(master_top_builddir) + + dnl Find a C compiler +-PAC_PROG_CC ++AC_PROG_CC ++AC_PROG_CC_C99 + AC_PATH_PROG(AR,ar) + AC_SUBST(AR_FLAGS) +-# Note that we set RANLIB to true if we don't find it (some systems neither +-# need it nor provide it) +-AC_CHECK_PROGS(RANLIB,ranlib,true) + dnl + dnl AC_PROG_MAKE_SET + AC_PROG_INSTALL + PAC_PROG_CHECK_INSTALL_WORKS +-dnl On Mac OS/X, install breaks libraries unless used with the -p switch +-PAC_PROG_INSTALL_BREAKS_LIBS + dnl We also need mkdir -p. + PAC_PROG_MKDIR_P + PAC_PROG_MAKE +--- a/src/util/logging/rlog/rlogutil.c ++++ b/src/util/logging/rlog/rlogutil.c +@@ -503,31 +503,19 @@ int RLOG_CloseInputStruct(RLOG_IOStruct ** ppInput) + return -1; + fclose((*ppInput)->f); + for (i = 0; i < (*ppInput)->nNumRanks; i++) { +- if ((*ppInput)->ppCurEvent[i]) +- MPL_free((*ppInput)->ppCurEvent[i]); +- if ((*ppInput)->ppCurGlobalEvent[i]) +- MPL_free((*ppInput)->ppCurGlobalEvent[i]); +- if ((*ppInput)->gppCurEvent[i]) +- MPL_free((*ppInput)->gppCurEvent[i]); +- if ((*ppInput)->gppPrevEvent[i]) +- MPL_free((*ppInput)->gppPrevEvent[i]); +- if ((*ppInput)->ppEventOffset[i]) +- MPL_free((*ppInput)->ppEventOffset[i]); +- if ((*ppInput)->ppNumEvents[i]) +- MPL_free((*ppInput)->ppNumEvents[i]); ++ MPL_free((*ppInput)->ppCurEvent[i]); ++ MPL_free((*ppInput)->ppCurGlobalEvent[i]); ++ MPL_free((*ppInput)->gppCurEvent[i]); ++ MPL_free((*ppInput)->gppPrevEvent[i]); ++ MPL_free((*ppInput)->ppEventOffset[i]); ++ MPL_free((*ppInput)->ppNumEvents[i]); + } +- if ((*ppInput)->ppCurEvent) +- MPL_free((*ppInput)->ppCurEvent); +- if ((*ppInput)->ppCurGlobalEvent) +- MPL_free((*ppInput)->ppCurGlobalEvent); +- if ((*ppInput)->gppCurEvent) +- MPL_free((*ppInput)->gppCurEvent); +- if ((*ppInput)->gppPrevEvent) +- MPL_free((*ppInput)->gppPrevEvent); +- if ((*ppInput)->ppEventOffset) +- MPL_free((*ppInput)->ppEventOffset); +- if ((*ppInput)->ppNumEvents) +- MPL_free((*ppInput)->ppNumEvents); ++ MPL_free((*ppInput)->ppCurEvent); ++ MPL_free((*ppInput)->ppCurGlobalEvent); ++ MPL_free((*ppInput)->gppCurEvent); ++ MPL_free((*ppInput)->gppPrevEvent); ++ MPL_free((*ppInput)->ppEventOffset); ++ MPL_free((*ppInput)->ppNumEvents); + MPL_free(*ppInput); + *ppInput = NULL; + return 0; +new file mode 100644 +--- /dev/null ++++ b/src/util/logging/subconfigure.m4 +@@ -0,0 +1,188 @@ ++[#] start of __file__ ++ ++AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[ ++]) ++AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[ ++]) ++ ++dnl The following code is migrated from configure.ac ++dnl The rlog is currently broken, therefore it is parked here. ++dnl FIXME: ++dnl 1. fix maint/genstates.in. It cannot rely on FUNCNAME macros as they are being removed. ++dnl 2. fix rlog build. ++dnl 3. move the following macros into PAC_SUBCFG_BODY_ ++ ++dnl parking. PAC_CFG_LOGGING is not being used. ++AC_DEFUN([PAC_CFG_LOGGING], [ ++# ---------------------------------------------------------------------------- ++# enable-timing and with-logging ++# ++# Still to do: add subsets: e.g., class=pt2pt,class=coll. See mpich doc ++# ++# Logging and timing are intertwined. If you select logging, you ++# may also need to select a timing level. If no timing is selected ++# but logging with rlog is selected, make "all" the default timing level. ++# ++# FIXME: make timing and logging options work more cleanly together, ++# particularly when other logging options are selected (e.g., logging is not ++# rlog). ++# ---------------------------------------------------------------------------- ++AM_CONDITIONAL([BUILD_LOGGING_RLOG],[test "X$with_logging" = "Xrlog"]) ++collect_stats=false ++logging_required=false ++if test "$enable_timing" = "default" ; then ++ if test "$with_logging" = "rlog" ; then ++ enable_timing=all ++ fi ++fi ++timing_name=$enable_timing ++case "$enable_timing" in ++ no) ++ timing_name=none ++ ;; ++ time) ++ collect_stats=true ++ ;; ++ log|log_detailed) ++ logging_required=true ++ ;; ++ yes) ++ timing_name=all ++ collect_stats=true ++ logging_required=true ++ ;; ++ all|runtime) ++ collect_stats=true ++ logging_required=true ++ ;; ++ none|default) ++ timing_name=none ++ ;; ++ *) ++ AC_MSG_WARN([Unknown value $enable_timing for enable-timing]) ++ enable_timing=no ++ timing_name=none ++ ;; ++esac ++# ++# The default logging package is rlog; you can get it by ++# specifying --with-logging or --with-logging=rlog ++# ++case $with_logging in ++ yes) ++ logging_name=rlog ++ ;; ++ no|none) ++ logging_name=none ++ ;; ++ default) ++ if test "$logging_required" = "true" ; then ++ logging_name=rlog ++ else ++ logging_name=none ++ fi ++ ;; ++ *) ++ logging_name=$with_logging ++ ;; ++esac ++# ++# Include the selected logging subsystem ++# ++# Choices: ++# 1) A subdir of src/util/logging ++# This directory must contain a configure which will be executed ++# to build the ++# 2) An external directory ++# This directory must contain ++# a mpilogging.h file ++# It may contain ++# a setup_logging script ++# a configure ++# ++# ++logging_subsystems= ++if test "$logging_name" != "none" ; then ++ # Check for an external name (directory containing a /) ++ hasSlash=`echo A$logging_name | sed -e 's%[[^/]]%%g'` ++ if test -n "$hasSlash" ; then ++ # Check that the external logging system is complete. ++ # Any failure will cause configure to abort ++ if test ! -d $logging_name ; then ++ AC_MSG_ERROR([External logging directory $logging_name not found. Configure aborted]) ++ logging_name=none ++ elif test ! -s $logging_name/mpilogging.h ; then ++ AC_MSG_ERROR([External logging header $logging_name/mpilogging.h not found. Configure aborted]) ++ logging_name=none ++ fi ++ ++ logdir=$logging_name ++ # Force the logdir to be absolute ++ logdir=`cd $logdir && pwd` ++ # Switch name to "external" because that is how the MPICH ++ # code will know it ++ logging_name=external ++ # Add the dir to the include paths ++ #CPPFLAGS="$CPPFLAGS -I$logdir" ++ CPPFLAGS="$CPPFLAGS -I$logdir" ++ # Add to the list of external modules to setup ++ if test -x $logdir/setup_logging ; then ++ EXTERNAL_SETUPS="$EXTERNAL_SETUPS $logdir/setup_logging" ++ fi ++ else ++ logdir=$srcdir/src/util/logging ++ logreldir=src/util/logging/$logging_name ++ logging_subsystems="$logging_subsystems $logreldir" ++ for dir in $logging_name ; do ++ if test ! -d $logdir/$dir ; then ++ AC_MSG_ERROR([$logdir/$dir does not exist. Configure aborted]) ++ logging_name=none ++ fi ++ done ++ for dir in $logging_subsystems ; do ++ if test ! -x $srcdir/$dir/configure ; then ++ AC_MSG_ERROR([$srcdir/$dir has no configure (required). Configure aborted]) ++ logging_name=none ++ fi ++ done ++ fi ++fi ++# ++# FIXME: Logging doesn't necessarily require timing (e.g., simply logging the ++# sequence of routines). ++if test "$logging_name" != "none" ; then ++ if test "$enable_timing" != "no" ; then ++ if test "$enable_timing" = "default" -o "$enable_timing" = "none" ; then ++ enable_timing=log ++ timing_name=log ++ fi ++ subsystems="$subsystems $logging_subsystems" ++ else ++ AC_MSG_WARN([Timing was disabled. Logging has been disabled as well.]) ++ with_logging=no ++ logging_name=none ++ fi ++else ++ if test "$logging_required" = "true" ; then ++ AC_MSG_WARN([Timing was enabled with log option but no logging library is available. Timing has been disabled.]) ++ enable_timing=no ++ timing_name=none ++ fi ++fi ++if test "$timing_name" != "none" ; then ++ timing_kind=`echo $timing_name | \ ++ tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ timing_kind=MPICH_TIMING_KIND__$timing_kind ++ AC_DEFINE_UNQUOTED(HAVE_TIMING,$timing_kind,[define to enable timing collection]) ++ if test "$collect_stats" = "true" ; then ++ AC_DEFINE(COLLECT_STATS,1,[define to enable collection of statistics]) ++ fi ++fi ++ ++use_logging_variable="MPICH_LOGGING__`echo $logging_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`" ++AC_DEFINE_UNQUOTED(USE_LOGGING,$use_logging_variable,[define to choose logging library]) ++# ---------------------------------------------------------------------------- ++# End of logging tests ++# ---------------------------------------------------------------------------- ++ ++]) +--- a/src/util/mem/handlemem.c ++++ b/src/util/mem/handlemem.c +@@ -132,9 +132,7 @@ int MPIR_check_handles_on_finalize(void *objmem_ptr) + } + } + +- if (nIndirect) { +- MPL_free(nIndirect); +- } ++ MPL_free(nIndirect); + + if (leaked_handles && MPIR_CVAR_ABORT_ON_LEAKED_HANDLES) { + /* comm_world has been (or should have been) destroyed by this point, +--- a/src/util/nodemap/build_nodemap.h ++++ b/src/util/nodemap/build_nodemap.h +@@ -68,10 +68,6 @@ cvars: + + #if !defined(USE_PMI2_API) && !defined(USE_PMIX_API) + /* this function is not used in pmi2 or pmix */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_NODEMAP_publish_node_id +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIR_NODEMAP_publish_node_id(int sz, int myrank) + { + int mpi_errno = MPI_SUCCESS; +@@ -152,10 +148,6 @@ typedef struct map_block { + int size; + } MPIR_NODEMAP_map_block_t; + +-#undef FUNCNAME +-#define FUNCNAME MPIR_NODEMAP_parse_mapping +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIR_NODEMAP_parse_mapping(char *map_str, + MPIR_NODEMAP_mapping_type_t * type, + MPIR_NODEMAP_map_block_t ** map, int *nblocks) +@@ -254,10 +246,6 @@ static inline int MPIR_NODEMAP_parse_mapping(char *map_str, + /* --END ERROR HANDLING-- */ + } + +-#undef FUNCNAME +-#define FUNCNAME MPIR_NODEMAP_populate_ids_from_mapping +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIR_NODEMAP_populate_ids_from_mapping(char *mapping, + int sz, + int *out_nodemap, +@@ -349,10 +337,6 @@ static inline int MPIR_NODEMAP_populate_ids_from_mapping(char *mapping, + is recorded for that matching process. Otherwise, the hostname is + added to the list of node names. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_NODEMAP_build_nodemap +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIR_NODEMAP_build_nodemap(int sz, + int myrank, int *out_nodemap, int *out_max_node_id) + { +--- a/src/util/procmap/local_proc.c ++++ b/src/util/procmap/local_proc.c +@@ -16,64 +16,138 @@ + #include + #endif + +-/* MPIR_Find_local_and_external -- from the list of processes in comm, +- builds a list of local processes, i.e., processes on this same +- node, and a list of external processes, i.e., one process from each +- node. +- +- Note that this will not work correctly for spawned or attached +- processes. +- +- external processes: For a communicator, there is one external +- process per node. You can think of this as the +- root or master process for that node. +- +- OUT: +- local_size_p - number of processes on this node +- local_rank_p - rank of this processes among local processes +- local_ranks_p - (*local_ranks_p)[i] = the rank in comm +- of the process with local rank i. +- This is of size (*local_size_p) +- external_size_p - number of external processes +- external_rank_p - rank of this process among the external +- processes, or -1 if this process is not external +- external_ranks_p - (*external_ranks_p)[i] = the rank in comm +- of the process with external rank i. +- This is of size (*external_size_p) +- intranode_table_p - (*internode_table_p)[i] gives the rank in +- *local_ranks_p of rank i in comm or -1 if not +- applicable. It is of size comm->remote_size. +- internode_table_p - (*internode_table_p)[i] gives the rank in +- *external_ranks_p of the root of the node +- containing rank i in comm. It is of size +- comm->remote_size. +-*/ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Find_local_and_external +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) +- +-int MPIR_Find_local_and_external(MPIR_Comm * comm, int *local_size_p, int *local_rank_p, +- int **local_ranks_p, int *external_size_p, int *external_rank_p, +- int **external_ranks_p, int **intranode_table_p, +- int **internode_table_p) ++/* MPIR_Find_local -- from the list of processes in comm, ++ * builds a list of local processes, i.e., processes on this same node. ++ * ++ * Note that this will not work correctly for spawned or attached ++ * processes. ++ * ++ * OUT: ++ * local_size_p - number of processes on this node. ++ * local_rank_p - rank of this processes among local processes. ++ * local_ranks_p - (*local_ranks_p)[i] = the rank in comm ++ * of the process with local rank i. ++ * This is of size (*local_size_p). ++ * intranode_table_p - (*intranode_table_p)[i] = the rank in ++ * (optional) *local_ranks_p of rank i in comm or -1 if not ++ * applicable. It is of size comm->remote_size. ++ * No return if NULL is specified. ++ */ ++int MPIR_Find_local(MPIR_Comm * comm, int *local_size_p, int *local_rank_p, ++ int **local_ranks_p, int **intranode_table_p) ++{ ++ int mpi_errno = MPI_SUCCESS; ++ int i, local_size, local_rank; ++ int *local_ranks = NULL, *intranode_table = NULL; ++ int node_id = -1, my_node_id = -1; ++ ++ MPIR_CHKPMEM_DECL(2); ++ ++ /* local_ranks will be realloc'ed later to the appropriate size (currently unknown) */ ++ /* FIXME: realloc doesn't guarantee that the allocated area will be ++ * shrunk - so using realloc is not an appropriate strategy. */ ++ MPIR_CHKPMEM_MALLOC(local_ranks, int *, sizeof(int) * comm->remote_size, mpi_errno, ++ "local_ranks", MPL_MEM_COMM); ++ MPIR_CHKPMEM_MALLOC(intranode_table, int *, sizeof(int) * comm->remote_size, mpi_errno, ++ "intranode_table", MPL_MEM_COMM); ++ ++ for (i = 0; i < comm->remote_size; ++i) ++ intranode_table[i] = -1; ++ ++ mpi_errno = MPID_Get_node_id(comm, comm->rank, &my_node_id); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ MPIR_Assert(my_node_id >= 0); ++ ++ local_size = 0; ++ local_rank = -1; ++ ++ /* Scan through the list of processes in comm. */ ++ for (i = 0; i < comm->remote_size; ++i) { ++ mpi_errno = MPID_Get_node_id(comm, i, &node_id); ++ if (mpi_errno) ++ MPIR_ERR_POP(mpi_errno); ++ ++ /* The upper level can catch this non-fatal error and should be ++ * able to recover gracefully. */ ++ MPIR_ERR_CHKANDJUMP(node_id < 0, mpi_errno, MPI_ERR_OTHER, "**dynamic_node_ids"); ++ ++ /* build list of local processes */ ++ if (node_id == my_node_id) { ++ if (i == comm->rank) ++ local_rank = local_size; ++ ++ intranode_table[i] = local_size; ++ local_ranks[local_size] = i; ++ ++local_size; ++ } ++ } ++ ++#ifdef ENABLE_DEBUG ++ printf("------------------------------------------------------------------------\n"); ++ printf("[%d]comm = %p\n", comm->rank, comm); ++ printf("[%d]comm->size = %d\n", comm->rank, comm->remote_size); ++ printf("[%d]comm->rank = %d\n", comm->rank, comm->rank); ++ printf("[%d]local_size = %d\n", comm->rank, local_size); ++ printf("[%d]local_rank = %d\n", comm->rank, local_rank); ++ printf("[%d]local_ranks = %p\n", comm->rank, local_ranks); ++ for (i = 0; i < local_size; ++i) ++ printf("[%d] local_ranks[%d] = %d\n", comm->rank, i, local_ranks[i]); ++ printf("[%d]intranode_table = %p\n", comm->rank, intranode_table); ++ for (i = 0; i < comm->remote_size; ++i) ++ printf("[%d] intranode_table[%d] = %d\n", comm->rank, i, intranode_table[i]); ++#endif ++ ++ MPIR_CHKPMEM_COMMIT(); ++ ++ *local_size_p = local_size; ++ *local_rank_p = local_rank; ++ ++ *local_ranks_p = MPL_realloc(local_ranks, sizeof(int) * local_size, MPL_MEM_COMM); ++ MPIR_ERR_CHKANDJUMP(*local_ranks_p == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem2"); ++ ++ if (intranode_table_p) ++ *intranode_table_p = intranode_table; /* no need to realloc */ ++ else ++ MPL_free(intranode_table); /* free internally if caller passes NULL */ ++ ++ fn_exit: ++ return mpi_errno; ++ fn_fail: ++ MPIR_CHKPMEM_REAP(); ++ goto fn_exit; ++} ++ ++/* MPIR_Find_external -- from the list of processes in comm, ++ * builds a list of external processes, i.e., one process from each node. ++ * You can think of this as the root or master process for each node. ++ * ++ * Note that this will not work correctly for spawned or attached ++ * processes. ++ * ++ * OUT: ++ * external_size_p - number of external processes ++ * external_rank_p - rank of this process among the external ++ * processes, or -1 if this process is not external ++ * external_ranks_p - (*external_ranks_p)[i] = the rank in comm ++ * of the process with external rank i. ++ * This is of size (*external_size_p) ++ * internode_table_p - (*internode_table_p)[i] = the rank in ++ * (optional) *external_ranks_p of the root of the node ++ * containing rank i in comm. It is of size ++ * comm->remote_size. No return if NULL is specified. ++ */ ++int MPIR_Find_external(MPIR_Comm * comm, int *external_size_p, int *external_rank_p, ++ int **external_ranks_p, int **internode_table_p) + { + int mpi_errno = MPI_SUCCESS; + int *nodes; +- int external_size; +- int external_rank; +- int *external_ranks; +- int local_size; +- int local_rank; +- int *local_ranks; +- int *internode_table; +- int *intranode_table; +- int i; +- int max_node_id; +- int node_id; +- int my_node_id; ++ int i, external_size, external_rank; ++ int *external_ranks, *internode_table; ++ int max_node_id, node_id; ++ + MPIR_CHKLMEM_DECL(1); +- MPIR_CHKPMEM_DECL(4); ++ MPIR_CHKPMEM_DECL(2); + + /* Scan through the list of processes in comm and add one + * process from each node to the list of "external" processes. We +@@ -81,18 +155,13 @@ int MPIR_Find_local_and_external(MPIR_Comm * comm, int *local_size_p, int *local + * array where we keep track of whether we have already added that + * node to the list. */ + +- /* these two will be realloc'ed later to the appropriate size (currently unknown) */ ++ /* external_ranks will be realloc'ed later to the appropriate size (currently unknown) */ + /* FIXME: realloc doesn't guarantee that the allocated area will be + * shrunk - so using realloc is not an appropriate strategy. */ + MPIR_CHKPMEM_MALLOC(external_ranks, int *, sizeof(int) * comm->remote_size, mpi_errno, + "external_ranks", MPL_MEM_COMM); +- MPIR_CHKPMEM_MALLOC(local_ranks, int *, sizeof(int) * comm->remote_size, mpi_errno, +- "local_ranks", MPL_MEM_COMM); +- + MPIR_CHKPMEM_MALLOC(internode_table, int *, sizeof(int) * comm->remote_size, mpi_errno, + "internode_table", MPL_MEM_COMM); +- MPIR_CHKPMEM_MALLOC(intranode_table, int *, sizeof(int) * comm->remote_size, mpi_errno, +- "intranode_table", MPL_MEM_COMM); + + mpi_errno = MPID_Get_max_node_id(comm, &max_node_id); + if (mpi_errno) +@@ -105,19 +174,7 @@ int MPIR_Find_local_and_external(MPIR_Comm * comm, int *local_size_p, int *local + for (i = 0; i < (max_node_id + 1); ++i) + nodes[i] = -1; + +- for (i = 0; i < comm->remote_size; ++i) +- intranode_table[i] = -1; +- + external_size = 0; +- +- mpi_errno = MPID_Get_node_id(comm, comm->rank, &my_node_id); +- if (mpi_errno) +- MPIR_ERR_POP(mpi_errno); +- MPIR_Assert(my_node_id >= 0); +- MPIR_Assert(my_node_id <= max_node_id); +- +- local_size = 0; +- local_rank = -1; + external_rank = -1; + + for (i = 0; i < comm->remote_size; ++i) { +@@ -142,61 +199,37 @@ int MPIR_Find_local_and_external(MPIR_Comm * comm, int *local_size_p, int *local + + /* build the map from rank in comm to rank in external_ranks */ + internode_table[i] = nodes[node_id]; +- +- /* build list of local processes */ +- if (node_id == my_node_id) { +- if (i == comm->rank) +- local_rank = local_size; +- +- intranode_table[i] = local_size; +- local_ranks[local_size] = i; +- ++local_size; +- } + } + +- /* +- * printf("------------------------------------------------------------------------\n"); +- * printf("comm = %p\n", comm); +- * printf("comm->size = %d\n", comm->remote_size); +- * printf("comm->rank = %d\n", comm->rank); +- * printf("local_size = %d\n", local_size); +- * printf("local_rank = %d\n", local_rank); +- * printf("local_ranks = %p\n", local_ranks); +- * for (i = 0; i < local_size; ++i) +- * printf(" local_ranks[%d] = %d\n", i, local_ranks[i]); +- * printf("external_size = %d\n", external_size); +- * printf("external_rank = %d\n", external_rank); +- * printf("external_ranks = %p\n", external_ranks); +- * for (i = 0; i < external_size; ++i) +- * printf(" external_ranks[%d] = %d\n", i, external_ranks[i]); +- * printf("intranode_table = %p\n", intranode_table); +- * for (i = 0; i < comm->remote_size; ++i) +- * printf(" intranode_table[%d] = %d\n", i, intranode_table[i]); +- * printf("internode_table = %p\n", internode_table); +- * for (i = 0; i < comm->remote_size; ++i) +- * printf(" internode_table[%d] = %d\n", i, internode_table[i]); +- * printf("nodes = %p\n", nodes); +- * for (i = 0; i < (max_node_id + 1); ++i) +- * printf(" nodes[%d] = %d\n", i, nodes[i]); +- */ ++#ifdef ENABLE_DEBUG ++ printf("------------------------------------------------------------------------\n"); ++ printf("[%d]comm = %p\n", comm->rank, comm); ++ printf("[%d]comm->size = %d\n", comm->rank, comm->remote_size); ++ printf("[%d]comm->rank = %d\n", comm->rank, comm->rank); ++ printf("[%d]external_size = %d\n", comm->rank, external_size); ++ printf("[%d]external_rank = %d\n", comm->rank, external_rank); ++ printf("[%d]external_ranks = %p\n", comm->rank, external_ranks); ++ for (i = 0; i < external_size; ++i) ++ printf("[%d] external_ranks[%d] = %d\n", comm->rank, i, external_ranks[i]); ++ printf("[%d]internode_table = %p\n", comm->rank, internode_table); ++ for (i = 0; i < comm->remote_size; ++i) ++ printf("[%d] internode_table[%d] = %d\n", comm->rank, i, internode_table[i]); ++ printf("[%d]nodes = %p\n", comm->rank, nodes); ++ for (i = 0; i < (max_node_id + 1); ++i) ++ printf("[%d] nodes[%d] = %d\n", comm->rank, i, nodes[i]); ++#endif + +- *local_size_p = local_size; +- *local_rank_p = local_rank; +- *local_ranks_p = MPL_realloc(local_ranks, sizeof(int) * local_size, MPL_MEM_COMM); +- MPIR_ERR_CHKANDJUMP(*local_ranks_p == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem2"); ++ MPIR_CHKPMEM_COMMIT(); + + *external_size_p = external_size; + *external_rank_p = external_rank; + *external_ranks_p = MPL_realloc(external_ranks, sizeof(int) * external_size, MPL_MEM_COMM); + MPIR_ERR_CHKANDJUMP(*external_ranks_p == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem2"); + +- /* no need to realloc */ +- if (intranode_table_p) +- *intranode_table_p = intranode_table; + if (internode_table_p) +- *internode_table_p = internode_table; +- +- MPIR_CHKPMEM_COMMIT(); ++ *internode_table_p = internode_table; /* no need to realloc */ ++ else ++ MPL_free(internode_table); /* free internally if caller passes NULL */ + + fn_exit: + MPIR_CHKLMEM_FREEALL(); +@@ -211,10 +244,6 @@ int MPIR_Find_local_and_external(MPIR_Comm * comm, int *local_size_p, int *local + + This function does NOT use mpich error handling. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_internode_rank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Get_internode_rank(MPIR_Comm * comm_ptr, int r) + { + int mpi_errno = MPI_SUCCESS; +@@ -232,10 +261,6 @@ int MPIR_Get_internode_rank(MPIR_Comm * comm_ptr, int r) + + This function does NOT use mpich error handling. + */ +-#undef FUNCNAME +-#define FUNCNAME MPIR_Get_intranode_rank +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + int MPIR_Get_intranode_rank(MPIR_Comm * comm_ptr, int r) + { + int mpi_errno = MPI_SUCCESS; +--- a/src/util/wrappers/mpiu_sock_wrappers.h ++++ b/src/util/wrappers/mpiu_sock_wrappers.h +@@ -36,25 +36,17 @@ typedef int ssize_t; + #define MPIU_SOCKW_SOCKFD_INVALID INVALID_SOCKET + #define MPIU_SOCKW_EINTR WSAEINTR + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Inet_addr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Inet_addr(ipv4_dd_str, inaddr) (\ + ((*(inaddr) = inet_addr(ipv4_dd_str)) \ + != INADDR_NONE) \ + ? MPI_SUCCESS \ + : MPIR_Err_create_code(MPI_SUCCESS, \ +- MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, \ ++ MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, \ + "**inet_addr", "**inet_addr %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Init(void) + { + WSADATA wsaData; +@@ -63,7 +55,7 @@ static inline int MPIU_SOCKW_Init(void) + int err; + err = MPIU_OSW_Get_errno(); + return MPIR_Err_create_code(MPI_SUCCESS, +- MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, ++ MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, + "**wsastartup", "**wsastartup %s %d", + MPIU_OSW_Strerror(err), err); + } else { +@@ -75,58 +67,42 @@ static inline int MPIU_SOCKW_Init(void) + ((sockfd) != INVALID_SOCKET) ? 1 : 0 \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Finalize() (\ + (WSACleanup() == 0) \ + ? MPI_SUCCESS \ + : MPIR_Err_create_code(MPI_SUCCESS, \ +- MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, \ ++ MPIR_ERR_FATAL, __func__, __LINE__, MPI_ERR_OTHER, \ + "**wsacleanup", "**wsacleanup %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Sock_open +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Sock_open(domain, type, protocol, sock_ptr) (\ + ((*sock_ptr = WSASocket(domain, type, protocol, NULL, 0, \ + WSA_FLAG_OVERLAPPED)) != INVALID_SOCKET) \ + ? MPI_SUCCESS \ +- : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, \ ++ : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, \ + __LINE__, MPI_ERR_OTHER, "**sock_create", \ + "**sock_create %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Sock_close +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Sock_close(sock) (\ + (closesocket(sock) != SOCKET_ERROR) \ + ? MPI_SUCCESS \ +- : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, \ ++ : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, \ + __LINE__, MPI_ERR_OTHER, "**sock_close", \ + "**sock_close %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Bind +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Bind(sock, addr, addr_len) (\ + (bind(sock, (struct sockaddr *)addr, addr_len) \ + != SOCKET_ERROR) \ + ? MPI_SUCCESS \ +- : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, \ ++ : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, \ + __LINE__, MPI_ERR_OTHER, "**bind", \ + "**bind %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ +@@ -134,10 +110,6 @@ static inline int MPIU_SOCKW_Init(void) + ) + + /* Bind to 1st port available in the range [low_port, high_port] */ +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Bind_port_range +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Bind_port_range(MPIU_SOCKW_Sockfd_t sock, struct sockaddr_in *sin, + unsigned short int low_port, + unsigned short int high_port) +@@ -170,24 +142,16 @@ static inline int MPIU_SOCKW_Bind_port_range(MPIU_SOCKW_Sockfd_t sock, struct so + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Listen +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Listen(sock, backlog) (\ + (listen(sock, backlog) != SOCKET_ERROR) \ + ? MPI_SUCCESS \ +- : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, \ ++ : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, \ + __LINE__, MPI_ERR_OTHER, "**listen", \ + "**listen %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Accept +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Accept(sock, addr, addr_len, \ + new_sock_ptr)(\ + ((*new_sock_ptr = accept(sock, addr, addr_len)) \ +@@ -197,17 +161,13 @@ static inline int MPIU_SOCKW_Bind_port_range(MPIU_SOCKW_Sockfd_t sock, struct so + (MPIU_OSW_Get_errno() == WSAEWOULDBLOCK) \ + ? MPI_SUCCESS \ + : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, \ +- FCNAME, __LINE__, MPI_ERR_OTHER, "**sock_accept", \ ++ __func__, __LINE__, MPI_ERR_OTHER, "**sock_accept", \ + "**sock_accept %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Connect +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Connect(MPIU_SOCKW_Sockfd_t sockfd, struct sockaddr *addr, + int addr_len, int *is_pending) + { +@@ -230,10 +190,6 @@ static inline int MPIU_SOCKW_Connect(MPIU_SOCKW_Sockfd_t sockfd, struct sockaddr + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Read +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Read(sock, buf, buf_len, nb_rd_ptr)(\ + ((*nb_rd_ptr = recv(sock, buf, buf_len, 0x0)) \ + != SOCKET_ERROR) \ +@@ -243,17 +199,13 @@ static inline int MPIU_SOCKW_Connect(MPIU_SOCKW_Sockfd_t sockfd, struct sockaddr + || (MPIU_OSW_Get_errno() == WSAEINTR)) \ + ? MPI_SUCCESS \ + : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, \ +- FCNAME, __LINE__, MPI_ERR_OTHER, \ ++ __func__, __LINE__, MPI_ERR_OTHER, \ + "**sock_read", "**sock_read %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Readv +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Readv(MPIU_SOCKW_Sockfd_t sock, + MPL_IOV * iov, int iov_cnt, int *nb_rd_ptr) + { +@@ -279,10 +231,6 @@ static inline int MPIU_SOCKW_Readv(MPIU_SOCKW_Sockfd_t sock, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Write +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Write(sock, buf, buf_len, nb_wr_ptr)(\ + ((*nb_wr_ptr = send(sock, buf, buf_len, 0x0)) \ + != SOCKET_ERROR) \ +@@ -292,7 +240,7 @@ static inline int MPIU_SOCKW_Readv(MPIU_SOCKW_Sockfd_t sock, + || (MPIU_OSW_Get_errno() == WSAEINTR)) \ + ? MPI_SUCCESS \ + : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, \ +- FCNAME, __LINE__, MPI_ERR_OTHER, \ ++ __func__, __LINE__, MPI_ERR_OTHER, \ + "**sock_write", "**sock_write %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ +@@ -300,10 +248,6 @@ static inline int MPIU_SOCKW_Readv(MPIU_SOCKW_Sockfd_t sock, + ) + + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Writev +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Writev(sock, iov, iov_cnt, nb_wr_ptr)(\ + (WSASend(sock, iov, iov_cnt, nb_wr_ptr, 0x0, NULL, NULL) \ + != SOCKET_ERROR) \ +@@ -313,65 +257,49 @@ static inline int MPIU_SOCKW_Readv(MPIU_SOCKW_Sockfd_t sock, + || (MPIU_OSW_Get_errno() == WSAEINTR)) \ + ? MPI_SUCCESS \ + : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, \ +- FCNAME, __LINE__, MPI_ERR_OTHER, \ ++ __func__, __LINE__, MPI_ERR_OTHER, \ + "**sock_write", "**sock_write %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Sock_cntrl_nb +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Sock_cntrl_nb(sock, is_nb)(\ + (ioctlsocket(sock, FIONBIO, (u_long *)&is_nb) \ + != SOCKET_ERROR) \ + ? MPI_SUCCESS \ +- : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, \ ++ : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, \ + __LINE__, MPI_ERR_OTHER, "**ioctlsocket", \ + "**ioctlsocket %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Sock_setopt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Sock_setopt(sock, level, opt_name,opt_val_ptr,\ + opt_len) (\ + (setsockopt(sock, level, opt_name, \ + (const char *)opt_val_ptr, opt_len) \ + != SOCKET_ERROR) \ + ? MPI_SUCCESS \ +- : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, \ ++ : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, \ + __LINE__, MPI_ERR_OTHER, "**setsockopt", \ + "**setsockopt %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Sock_getopt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Sock_getopt(sock, level, opt_name,opt_val_ptr,\ + opt_len_ptr) (\ + (getsockopt(sock, level, opt_name, opt_val_ptr, opt_len_ptr)\ + != SOCKET_ERROR) \ + ? MPI_SUCCESS \ +- : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, \ ++ : MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, __func__, \ + __LINE__, MPI_ERR_OTHER, "**getsockopt", \ + "**getsockopt %s %d", \ + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), \ + MPIU_OSW_Get_errno()) \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Sock_has_error +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Sock_has_error(MPIU_SOCKW_Sockfd_t sock) + { + int has_error = 0; +@@ -380,7 +308,7 @@ static inline int MPIU_SOCKW_Sock_has_error(MPIU_SOCKW_Sockfd_t sock) + return MPI_SUCCESS; + } else { + return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- FCNAME, __LINE__, MPI_ERR_OTHER, "**getsockopt", ++ __func__, __LINE__, MPI_ERR_OTHER, "**getsockopt", + "**getsockopt %s %d", + MPIU_OSW_Strerror(MPIU_OSW_Get_errno()), MPIU_OSW_Get_errno()); + } +@@ -467,10 +395,6 @@ typedef MPIU_SOCKW_Timeval_t_ *MPIU_SOCKW_Timeval_hnd_t; + #define MPIU_SOCKW_Waitset_hnd_is_init_(hnd) ((hnd) ? 1 : 0) + #define MPIU_SOCKW_Waitset_sock_hnd_is_init_(hnd) ((hnd) ? 1 : 0) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Timeval_hnd_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Timeval_hnd_init(MPIU_SOCKW_Timeval_hnd_t * hnd_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -491,10 +415,6 @@ static inline int MPIU_SOCKW_Timeval_hnd_init(MPIU_SOCKW_Timeval_hnd_t * hnd_ptr + /* For portability with poll() timeval now has a milli sec + * time resolution - instead of a micro sec resolution + */ +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Timeval_hnd_set +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Timeval_hnd_set(MPIU_SOCKW_Timeval_hnd_t hnd, int tv_msec) + { + int mpi_errno = MPI_SUCCESS; +@@ -507,10 +427,6 @@ static inline int MPIU_SOCKW_Timeval_hnd_set(MPIU_SOCKW_Timeval_hnd_t hnd, int t + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Timeval_hnd_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Timeval_hnd_finalize(MPIU_SOCKW_Timeval_hnd_t * hnd_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -540,10 +456,6 @@ static inline int MPIU_SOCKW_Timeval_hnd_finalize(MPIU_SOCKW_Timeval_hnd_t * hnd + static inline int MPIU_SOCKW_Waitset_hndArr_create() + */ + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_hnd_init +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_hnd_init(MPIU_SOCKW_Waitset_hnd_t * hnd_ptr, int nfds) + { + int mpi_errno = MPI_SUCCESS; +@@ -584,10 +496,6 @@ static inline int MPIU_SOCKW_Waitset_hnd_init(MPIU_SOCKW_Waitset_hnd_t * hnd_ptr + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_hnd_finalize +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_hnd_finalize(MPIU_SOCKW_Waitset_hnd_t * hnd_ptr) + { + int mpi_errno = MPI_SUCCESS; +@@ -603,18 +511,10 @@ static inline int MPIU_SOCKW_Waitset_hnd_finalize(MPIU_SOCKW_Waitset_hnd_t * hnd + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_has_more_evnts +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Waitset_has_more_evnts(waitset_hnd) (\ + waitset_hnd->nevents \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_wait +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_wait(MPIU_SOCKW_Waitset_hnd_t hnd, + MPIU_SOCKW_Timeval_hnd_t timeout) + { +@@ -650,10 +550,6 @@ static inline int MPIU_SOCKW_Waitset_wait(MPIU_SOCKW_Waitset_hnd_t hnd, + goto fn_exit; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_get_sock_evnts +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_get_sock_evnts_(MPIU_SOCKW_Waitset_hnd_t waitset_hnd, + MPIU_SOCKW_Sockfd_t sock, int *flag_ptr) + { +@@ -661,12 +557,12 @@ static inline int MPIU_SOCKW_Waitset_get_sock_evnts_(MPIU_SOCKW_Waitset_hnd_t wa + /* + * if (!MPIU_SOCKW_Waitset_hnd_is_init_(waitset_hnd)){ + * return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- * FCNAME, __LINE__, MPI_ERR_OTHER, "**arg", ++ * __func__, __LINE__, MPI_ERR_OTHER, "**arg", + * "**arg %s", "waitSet handle"); + * } + * if (!flag_ptr){ + * return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, +- * FCNAME, __LINE__, MPI_ERR_OTHER, "**arg", ++ * __func__, __LINE__, MPI_ERR_OTHER, "**arg", + * "**arg %s", "pointer to event flag"); + * } + */ +@@ -691,10 +587,6 @@ static inline int MPIU_SOCKW_Waitset_get_sock_evnts_(MPIU_SOCKW_Waitset_hnd_t wa + return has_events; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_get_nxt_sock_with_evnt +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_get_nxt_sock_with_evnt(MPIU_SOCKW_Waitset_hnd_t waitset_hnd, + MPIU_SOCKW_Waitset_sock_hnd_t * + sock_hnd_ptr) +@@ -725,10 +617,6 @@ static inline int MPIU_SOCKW_Waitset_get_nxt_sock_with_evnt(MPIU_SOCKW_Waitset_h + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_add_sock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_add_sock(MPIU_SOCKW_Waitset_hnd_t waitset_hnd, + MPIU_SOCKW_Sockfd_t sock, int flag, void *user_ptr, + MPIU_SOCKW_Waitset_sock_hnd_t * sock_hnd_ptr) +@@ -772,10 +660,6 @@ static inline int MPIU_SOCKW_Waitset_add_sock(MPIU_SOCKW_Waitset_hnd_t waitset_h + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_set_sock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_set_sock(MPIU_SOCKW_Waitset_hnd_t waitset_hnd, + MPIU_SOCKW_Waitset_sock_hnd_t sock_hnd, int flag) + { +@@ -802,10 +686,6 @@ static inline int MPIU_SOCKW_Waitset_set_sock(MPIU_SOCKW_Waitset_hnd_t waitset_h + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_clr_sock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_clr_sock(MPIU_SOCKW_Waitset_hnd_t waitset_hnd, + MPIU_SOCKW_Waitset_sock_hnd_t sock_hnd, int flag) + { +@@ -833,10 +713,6 @@ static inline int MPIU_SOCKW_Waitset_clr_sock(MPIU_SOCKW_Waitset_hnd_t waitset_h + } + + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_rem_sock +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_rem_sock(MPIU_SOCKW_Waitset_hnd_t waitset_hnd, + MPIU_SOCKW_Waitset_sock_hnd_t * sock_hnd_ptr) + { +@@ -869,10 +745,6 @@ static inline int MPIU_SOCKW_Waitset_rem_sock(MPIU_SOCKW_Waitset_hnd_t waitset_h + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_sock_hnd_get_sockfd +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_sock_hnd_get_sockfd(MPIU_SOCKW_Waitset_sock_hnd_t sock_hnd, + MPIU_SOCKW_Sockfd_t * sockfd_ptr) + { +@@ -886,10 +758,6 @@ static inline int MPIU_SOCKW_Waitset_sock_hnd_get_sockfd(MPIU_SOCKW_Waitset_sock + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_sock_hnd_get_user_ptr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_sock_hnd_get_user_ptr(MPIU_SOCKW_Waitset_sock_hnd_t sock_hnd, + void **userp_ptr) + { +@@ -903,10 +771,6 @@ static inline int MPIU_SOCKW_Waitset_sock_hnd_get_user_ptr(MPIU_SOCKW_Waitset_so + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_sock_hnd_set_user_ptr +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + static inline int MPIU_SOCKW_Waitset_sock_hnd_set_user_ptr(MPIU_SOCKW_Waitset_sock_hnd_t sock_hnd, + void *user_ptr) + { +@@ -919,20 +783,12 @@ static inline int MPIU_SOCKW_Waitset_sock_hnd_set_user_ptr(MPIU_SOCKW_Waitset_so + return mpi_errno; + } + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_is_sock_readable +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Waitset_is_sock_readable(sock_hnd)(\ + (MPIU_SOCKW_Waitset_sock_hnd_is_init_(sock_hnd)) \ + ? (sock_hnd->event_flag & MPIU_SOCKW_FLAG_SOCK_IS_READABLE_) \ + : 0 \ + ) + +-#undef FUNCNAME +-#define FUNCNAME MPIU_SOCKW_Waitset_is_sock_writeable +-#undef FCNAME +-#define FCNAME MPL_QUOTE(FUNCNAME) + #define MPIU_SOCKW_Waitset_is_sock_writeable(sock_hnd)(\ + (MPIU_SOCKW_Waitset_sock_hnd_is_init_(sock_hnd)) \ + ? (sock_hnd->event_flag & MPIU_SOCKW_FLAG_SOCK_IS_WRITEABLE_)\ +@@ -946,6 +802,4 @@ typedef int MPIU_SOCKW_Sockfd_t; + + #endif /* USE_NT_SOCK */ + +-#undef FUNCNAME +-#undef FCNAME + #endif /* MPIU_SOCK_WRAPPERS_H_INCLUDED */ +--- a/test/mpi/.gitignore ++++ b/test/mpi/.gitignore +@@ -115,7 +115,11 @@ + /coll/nbredscat + /coll/nbredscat3 + /coll/nbredscatinter +-/coll/neighb_coll ++/coll/neighb_allgather ++/coll/neighb_allgatherv ++/coll/neighb_alltoall ++/coll/neighb_alltoallv ++/coll/neighb_alltoallw + /coll/nonblocking + /coll/nonblocking2 + /coll/nonblocking3 +@@ -1110,6 +1114,7 @@ + /pt2pt/greq1 + /pt2pt/huge_anysrc + /pt2pt/huge_dupcomm ++/pt2pt/huge_ssend + /pt2pt/huge_underflow + /pt2pt/icsend + /pt2pt/inactivereq +@@ -1122,6 +1127,7 @@ + /pt2pt/many_isend + /pt2pt/manylmt + /pt2pt/mprobe ++/pt2pt/multi_psend_derived + /pt2pt/pingping + /pt2pt/probe_unexp + /pt2pt/probenull +@@ -1145,6 +1151,7 @@ + /results.txt + /rma/acc_loc + /rma/acc_pairtype ++/rma/acc_pairtype_shm + /rma/acc_flush_get + /rma/acc_ordering + /rma/accfence1 +@@ -1194,6 +1201,8 @@ + /rma/get_accumulate_long_derived + /rma/get_accumulate_short + /rma/get_accumulate_short_derived ++/rma/get_flushlocal ++/rma/get_flushlocal_shm + /rma/getfence1 + /rma/getgroup + /rma/ircpi +@@ -1308,6 +1317,8 @@ + /rma/win_zero + /rma/wincall + /rma/window_creation ++/rma/window_allocation ++/rma/window_noncontig_allocation + /rma/winname + /rma/wintest + /rma/wintest_shm +@@ -1392,22 +1403,10 @@ + /topo/graphmap1 + /topo/topodup + /topo/topotest +-/attr/Makefile.dtp + /attr/testlist +-/attr/testlist.in +-/coll/Makefile.dtp +-/coll/testlist.in +-/rma/Makefile.dtp +-/rma/testlist.in +-/pt2pt/Makefile.dtp + /pt2pt/testlist +-/pt2pt/testlist.in +-/cxx/attr/Makefile.dtp + /cxx/attr/testlist +-/cxx/attr/testlist.in + /cxx/datatype/testlist +-/cxx/datatype/Makefile.dtp +-/cxx/datatype/testlist.in + /dtpools/basictypelist.txt + /dtpools/aclocal.m4 + /dtpools/ar-lib +--- a/test/mpi/Makefile.mtest ++++ b/test/mpi/Makefile.mtest +@@ -16,27 +16,25 @@ + + # AM_CPPFLAGS are used for C++ code as well + AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include +-LDADD = $(top_builddir)/util/mtest.o ++LDADD = $(top_builddir)/util/mtest.$(OBJEXT) $(top_builddir)/util/mtest_common.$(OBJEXT) + + # Add libdtpools support +-AM_CPPFLAGS += -I$(top_builddir)/dtpoos/include -I$(top_srcdir)/dtpools/include ++AM_CPPFLAGS += -I$(top_srcdir)/dtpools/include + LDADD += $(top_builddir)/dtpools/src/.libs/libdtpools.a + +-## FIXME "DEPADD" is a simplemake concept, which we can handle on a per-target +-## prog_DEPENDENCIES variable, but it would be better to figure out the right +-## way to do this +-##DEPADD = @MPILIBLOC@ $(top_builddir)/util/mtest.o +- + $(top_builddir)/util/mtest.$(OBJEXT): $(top_srcdir)/util/mtest.c + (cd $(top_builddir)/util && $(MAKE) mtest.$(OBJEXT)) + ++$(top_builddir)/util/mtest_common.$(OBJEXT): $(top_srcdir)/util/mtest_common.c ++ (cd $(top_builddir)/util && $(MAKE) mtest_common.$(OBJEXT)) ++ + $(top_builddir)/dtpools/src/.libs/libdtpools.a: $(top_srcdir)/dtpools/src/*.c + (cd $(top_builddir)/dtpools && $(MAKE)) + + SUMMARY_BASENAME ?= summary + + testing: +- $(top_builddir)/runtests -srcdir=$(srcdir) -tests=testlist \ ++ $(top_builddir)/runtests -srcdir=$(srcdir) -tests=testlist,testlist.dtp \ + -mpiexec="${MPIEXEC}" -xmlfile=$(SUMMARY_BASENAME).xml \ + -tapfile=$(SUMMARY_BASENAME).tap -junitfile=$(SUMMARY_BASENAME).junit.xml + +--- a/test/mpi/Makefile_cxx.mtest ++++ b/test/mpi/Makefile_cxx.mtest +@@ -12,25 +12,23 @@ + ## see Makefile.mtest for a description why this file exists, but for C++ + + AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include +-LDADD = $(top_builddir)/cxx/util/mtest.o ++LDADD = $(top_builddir)/util/mtest_cxx.$(OBJEXT) $(top_builddir)/util/mtest_common.$(OBJEXT) + + # Add libdtpools support +-AM_CPPFLAGS += -I$(top_builddir)/dtpoos/include -I$(top_srcdir)/dtpools/include ++AM_CPPFLAGS += -I$(top_srcdir)/dtpools/include + LDADD += $(top_builddir)/dtpools/src/.libs/libdtpools.a + +-## FIXME "DEPADD" is a simplemake concept, which we can handle on a per-target +-## prog_DEPENDENCIES variable, but it would be better to figure out the right +-## way to do this +-##DEPADD = @MPILIBLOC@ ../util/cxx/mtest.o ++$(top_builddir)/util/mtest_cxx.$(OBJEXT): $(top_srcdir)/util/mtest_cxx.cxx ++ (cd $(top_builddir)/util && $(MAKE) mtest_cxx.$(OBJEXT)) + +-$(top_builddir)/cxx/util/mtest.o: $(top_srcdir)/cxx/util/mtest.cxx +- (cd $(top_builddir)/cxx/util && $(MAKE) mtest.o) ++$(top_builddir)/util/mtest_common.$(OBJEXT): $(top_srcdir)/util/mtest_common.c ++ (cd $(top_builddir)/util && $(MAKE) mtest_common.$(OBJEXT)) + + $(top_builddir)/dtpools/src/.libs/libdtpools.a: $(top_srcdir)/dtpools/src/*.c + (cd $(top_builddir)/dtpools && $(MAKE)) + + testing: +- $(top_builddir)/runtests -srcdir=$(srcdir) -tests=testlist \ ++ $(top_builddir)/runtests -srcdir=$(srcdir) -tests=testlist,testlist.dtp \ + -mpiexec=${MPIEXEC} -xmlfile=summary.xml + + CLEANFILES = summary.xml summary.tap +--- a/test/mpi/README ++++ b/test/mpi/README +@@ -213,13 +213,13 @@ type" and "count" command line parameters is sufficient. + + Starting from the basic test, many different tests for different signatures + can be generated automatically by adding a corresponding entry for the test in +-the file: "basictypetest.txt," following the format defined by the file itself. ++the file: "dtp-test-config.txt," following the format defined by the file itself. + Then the tests can be generated by just running the main autogen.sh script. + + In case the user wants to run a subset of all the possible tests that will be + generated, he/she can use the "DTP_RUNTIME_TYPES" environment variable to limit the + number of basic types tested by the "runtest" script. If the user further wishes +-to reduce the length of the tests, he/she can also use the "DTP_NUM_OBJS" environment ++to reduce the length of the tests, he/she can also use the "DTP_MAX_OBJ_ID" environment + variable to limit the number of datatypes tested from each pool (please refer to + the DTPools README and wiki for more information: https://wiki.mpich.org/mpich/index.php/DTPools). + +--- a/test/mpi/attr/Makefile.am ++++ b/test/mpi/attr/Makefile.am +@@ -30,8 +30,10 @@ noinst_PROGRAMS = \ + keyval_double_free \ + keyval_double_free_comm \ + keyval_double_free_type \ +- keyval_double_free_win ++ keyval_double_free_win \ ++ fkeyvaltype + + EXTRA_DIST = testlist.in + +-include Makefile.dtp ++fkeyvaltype_CPPFLAGS = $(AM_CPPFLAGS) ++fkeyvaltype_SOURCES = fkeyvaltype.c +--- a/test/mpi/attr/fkeyvaltype.c ++++ b/test/mpi/attr/fkeyvaltype.c +@@ -16,47 +16,7 @@ a datatype, then make sure that the keyval delete and copy code are still \ + executed"; + */ + +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; + +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; + + /* Copy increments the attribute value */ + int copy_fn(MPI_Datatype oldtype, int keyval, void *extra_state, +@@ -87,112 +47,41 @@ int main(int argc, char *argv[]) + int err, errs = 0; + int attrval; + int i, j, key[32], keyval, saveKeyval; ++ int seed, testsize; + int obj_idx; +- int count; ++ MPI_Aint count, maxbufsize; + int tnlen; + MPI_Datatype type, duptype; +- DTP_t dtp; +- char typename[MPI_MAX_OBJECT_NAME]; ++ DTP_pool_s dtp; ++ DTP_obj_s obj; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count, &dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, typename, &tnlen); +- fprintf(stdout, "Error while creating pool (%s,%d)\n", typename, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int basic_type_num; +- int *basic_type_counts = NULL; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &dtp); ++ err = DTP_pool_create(basic_type, count, seed, &dtp); + if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); ++ fprintf(stderr, "Error while creating pool (%s,%ld)\n", basic_type, count); ++ fflush(stderr); + } + +- count = 0; +-#endif ++ MTestArgListDestroy(head); + +- for (obj_idx = 0; obj_idx < dtp->DTP_num_objs; obj_idx++) { +- err = DTP_obj_create(dtp, obj_idx, 0, 0, 0); ++ for (obj_idx = 0; obj_idx < testsize; obj_idx++) { ++ err = DTP_obj_create(dtp, &obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- type = dtp->DTP_obj_array[obj_idx].DTP_obj_type; ++ type = obj.DTP_datatype; + MPI_Type_create_keyval(copy_fn, delete_fn, &keyval, (void *) 0); + saveKeyval = keyval; /* in case we need to free explicitly */ + attrval = 1; +@@ -209,29 +98,35 @@ int main(int argc, char *argv[]) + + if (attrval != 1) { + errs++; +- MPI_Type_get_name(type, typename, &tnlen); +- printf("attrval is %d, should be 1, before dup in type %s\n", attrval, typename); ++ printf("attrval is %d, should be 1, before dup in type %s\n", attrval, ++ obj.DTP_description); + } + MPI_Type_dup(type, &duptype); + /* Check that the attribute was copied */ + if (attrval != 2) { + errs++; +- MPI_Type_get_name(type, typename, &tnlen); +- printf("Attribute not incremented when type dup'ed (%s)\n", typename); ++ printf("Attribute not incremented when type dup'ed (%s)\n", obj.DTP_description); ++ MPI_Abort(MPI_COMM_WORLD, 1); + } + MPI_Type_free(&duptype); + if (attrval != 1) { + errs++; +- MPI_Type_get_name(type, typename, &tnlen); +- printf("Attribute not decremented when duptype %s freed\n", typename); ++ printf("Attribute not decremented when duptype %s freed\n", obj.DTP_description); ++ MPI_Abort(MPI_COMM_WORLD, 1); + } + /* Check that the attribute was freed in the duptype */ + +- DTP_obj_free(dtp, obj_idx); +- if (attrval != 0) { +- errs++; +- MPI_Type_get_name(type, typename, &tnlen); +- fprintf(stdout, "Attribute not decremented when type %s freed\n", typename); ++ if (obj.DTP_datatype != dtp.DTP_base_type) { ++ DTP_obj_free(obj); ++ if (attrval != 0) { ++ errs++; ++ fprintf(stderr, "Attribute not decremented when type %s freed\n", ++ obj.DTP_description); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++ } ++ } else { ++ MPI_Type_delete_attr(type, saveKeyval); ++ DTP_obj_free(obj); + } + + /* Free those other keyvals */ +@@ -242,16 +137,6 @@ int main(int argc, char *argv[]) + + DTP_pool_free(dtp); + +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- + MTest_Finalize(errs); + + return MTestReturnValue(errs); +deleted file mode 100644 +--- a/test/mpi/attr/testlist.def ++++ /dev/null +@@ -1,22 +0,0 @@ +-attrt 2 +-attric 4 +-attrerr 1 +-attrend 1 +-attrend 4 +-attrend2 1 +-attrend2 5 +-attrerrcomm 1 +-attrerrtype 1 +-attrdeleteget 1 +-attr2type 1 +-attrorder 1 +-attrordercomm 1 +-attrordertype 1 +-baseattr2 1 +-baseattrcomm 1 +-fkeyval 1 +-fkeyvalcomm 1 +-keyval_double_free 1 +-keyval_double_free_comm 1 +-keyval_double_free_type 1 +-keyval_double_free_win 1 +new file mode 100644 +--- /dev/null ++++ b/test/mpi/attr/testlist.in +@@ -0,0 +1,22 @@ ++attrt 2 ++attric 4 ++attrerr 1 ++attrend 1 ++attrend 4 ++attrend2 1 ++attrend2 5 ++attrerrcomm 1 ++attrerrtype 1 ++attrdeleteget 1 ++attr2type 1 ++attrorder 1 ++attrordercomm 1 ++attrordertype 1 ++baseattr2 1 ++baseattrcomm 1 ++fkeyval 1 ++fkeyvalcomm 1 ++keyval_double_free 1 ++keyval_double_free_comm 1 ++keyval_double_free_type 1 ++keyval_double_free_win 1 +--- a/test/mpi/autogen.sh ++++ b/test/mpi/autogen.sh +@@ -3,183 +3,6 @@ + # (C) 2018 by Argonne National Laboratory. + # See COPYRIGHT in top-level directory. + # +-# Generate datatype testing build instructions for every line in +-# configuration file basictypetest.txt and structtypetest.txt +- +-types="" # basic MPI datatypes for type signature +-counts="" # counts for type signature +-pathname="" # source file pathname +-source="" # base name of source file - extension +-ext="" # extension of source file +-dir="" # directory in which source is located +-dirs="" # all directories containing DTPools tests +-macros="" # additional control macros (user defined) +-timelimit="" # time limit for testlist.in +-procs="" # number of processes to use in testlist.in +-other_macros="" +- +-# Read basic MPI datatypes +-while read -r line +-do +- if [ ! `echo $line | head -c 1` = "#" ] ; then +- types="$types $line " +- fi +-done < basictypelist.txt +- +-ln=1 # line number +-while read -r line +-do +- if [ ! `echo $line | head -c 1` = "#" ] ; then +- # the line is not a comment +- pathname=`echo $line | sed -E 's|(.+):(.*):(.+):(.*):(.+)|\1|'` +- macros=`echo $line | sed -E 's|(.+):(.*):(.+):(.*):(.+)|\2|'` +- counts=`echo $line | sed -E 's|(.+):(.*):(.+):(.*):(.+)|\3|'` +- timelimit=`echo $line | sed -E 's|(.+):(.*):(.+):(.*):(.+)|\4|'` +- procs=`echo $line | sed -E 's|(.+):(.*):(.+):(.*):(.+)|\5|'` +- other_macros="" +- else +- # the line is a comment +- pathname=`echo $line | sed -E 's|(.+):(.*):(.+):(.*):(.+)|\1|'` +- ln=$((ln+1)) # increment line number +- continue +- fi +- +- dir=`dirname $pathname` +- source=`echo $(basename $pathname) | sed -E "s|(.+)\.c[xx]*|\1|"` +- ext=`echo $(basename $pathname) | sed -E "s|.+\.(c[xx]*)|\1|"` +- +- # check whether .dtp and .in files already exist in dir ... +- exists=0 +- for i in $dirs +- do +- if [ $i = $dir ] ; then +- exists=1 +- fi +- done +- +- # ... if not create them +- if [ $exists = 0 ] ; then +- printf "" > ${dir}/Makefile.dtp +- printf "" > ${dir}/testlist.dtp +- printf "" > ${dir}/testlist.in +- dirs="$dirs $dir " +- fi +- +- # prepare user defined macros +- for macro in $macros +- do +- other_macros="$other_macros -D$macro " +- done +- +- printf "basictypetest.txt:${ln}: Generate tests for: ${source}.${ext} ... " +- +- # generate Makefile.dtp +- echo "noinst_PROGRAMS += ${source}__BASIC__L${ln}" >> ${dir}/Makefile.dtp +- echo "${source}__BASIC__L${ln}_CPPFLAGS = $other_macros \$(AM_CPPFLAGS)" >> ${dir}/Makefile.dtp +- echo "${source}__BASIC__L${ln}_SOURCES = ${source}.${ext}" >> ${dir}/Makefile.dtp +- +- sendcounts=$counts +- +- for type in $types +- do +- recvcounts=$sendcounts # reset recv counts to send counts +- +- for sendcount in $sendcounts +- do +- if [ $dir = "pt2pt" ] ; then # only send/recv comm can use types from different pools +- # do combination of different send recv count where recv count >= send count +- for recvcount in $recvcounts +- do +- echo "${source}__BASIC__L${ln} $procs arg=-type=${type} arg=-sendcnt=${sendcount} arg=-recvcnt=${recvcount} $timelimit" >> ${dir}/testlist.dtp +- # limit the mixed pool case to only one +- # TODO: this should be defined in the config file +- if [ $recvcount -gt $sendcount ]; then +- break +- fi +- done +- recvcounts=`echo $recvcounts | sed -e "s|$sendcount||"` # update recv counts +- else +- echo "${source}__BASIC__L${ln} $procs arg=-type=${type} arg=-count=${sendcount} $timelimit" >> ${dir}/testlist.dtp +- fi +- done +- done +- ln=$((ln+1)) # increment line count +- printf "done\n" +-done < basictypetest.txt +- +-ln=1 # line number +-while read -r line +-do +- if [ ! `echo $line | head -c 1` = "#" ] ; then +- # the line is not a comment +- pathname=`echo $line | sed -E 's|(.+):(.*):(.+):(.+):(.+):(.*):(.+)|\1|'` +- macros=`echo $line | sed -E 's|(.+):(.*):(.+):(.+):(.+):(.*):(.+)|\2|'` +- numtypes=`echo $line | sed -E 's|(.+):(.*):(.+):(.+):(.+):(.*):(.+)|\3|'` +- types=`echo $line | sed -E 's|(.+):(.*):(.+):(.+):(.+):(.*):(.+)|\4|'` +- counts=`echo $line | sed -E 's|(.+):(.*):(.+):(.+):(.+):(.*):(.+)|\5|'` +- timelimit=`echo $line | sed -E 's|(.+):(.*):(.+):(.+):(.+):(.*):(.+)|\6|'` +- procs=`echo $line | sed -E 's|(.+):(.*):(.+):(.+):(.+):(.*):(.+)|\7|'` +- other_macros="" +- else +- # the line is a comment +- ln=$((ln+1)) # increment line number +- continue +- fi +- +- dir=`dirname $pathname` +- source=`echo $(basename $pathname) | sed -E "s|(.+)\.c[xx]*|\1|"` +- ext=`echo $(basename $pathname) | sed -E "s|.+\.(c[xx]*)|\1|"` +- +- # NOTE: .dtp and .in files should already exist at this point ... +- exists=0 +- for i in $dirs +- do +- if [ $i = $dir ] ; then +- exists=1 +- fi +- done +- +- # ... if they don't create them +- if [ $exists = 0 ] ; then +- printf "" > ${dir}/Makefile.dtp +- printf "" > ${dir}/testlist.dtp +- printf "" > ${dir}/testlist.in +- dirs="$dirs $dir " +- fi +- +- # prepare user defined macros +- for macro in $macros +- do +- other_macros="$other_macros -D$macro " +- done +- +- printf "structtypetest.txt:${ln}: Generate tests for: ${source}.${ext} ... " +- echo "noinst_PROGRAMS += ${source}__STRUCT__L${ln}" >> ${dir}/Makefile.dtp +- echo "${source}__STRUCT__L${ln}_CPPFLAGS = $other_macros \$(AM_CPPFLAGS)" >> ${dir}/Makefile.dtp +- echo "${source}__STRUCT__L${ln}_SOURCES = ${source}.${ext}" >> ${dir}/Makefile.dtp +- echo "${source}__STRUCT__L${ln} $procs arg=-numtypes=$numtypes arg=-types=$types arg=-counts=$counts $timelimit" >> ${dir}/testlist.dtp +- printf "done\n" +- ln=$((ln+1)) +-done < structtypetest.txt +- +-for dir in $dirs +-do +- printf "Generate testlist in dir: ${dir} ... " +- cat ${dir}/testlist.def >> ${dir}/testlist.in +- cat ${dir}/testlist.dtp >> ${dir}/testlist.in +- rm -f ${dir}/testlist.dtp +- printf "done\n" +-done +- +-printf "Generate basictypelist.txt for dtpools ... " +-printf "" > dtpools/basictypelist.txt +-while read -r line; do +- if [ ! `echo $line | head -c 1` = "#" ]; then +- echo "$line," >> dtpools/basictypelist.txt +- fi +-done < basictypelist.txt +-echo "MPI_DATATYPE_NULL" >> dtpools/basictypelist.txt +-printf "done\n" + + # Create and/or update the f90 tests + printf "Create or update the Fortran 90 tests derived from the Fortran 77 tests... " +deleted file mode 100644 +--- a/test/mpi/basictypelist.txt ++++ /dev/null +@@ -1,33 +0,0 @@ +-MPI_CHAR +-MPI_BYTE +-MPI_WCHAR +-MPI_SHORT +-MPI_INT +-MPI_LONG +-MPI_LONG_LONG_INT +-MPI_UNSIGNED_CHAR +-MPI_UNSIGNED_SHORT +-MPI_UNSIGNED +-MPI_UNSIGNED_LONG +-MPI_UNSIGNED_LONG_LONG +-MPI_FLOAT +-MPI_DOUBLE +-MPI_LONG_DOUBLE +-MPI_INT8_T +-MPI_INT16_T +-MPI_INT32_T +-MPI_INT64_T +-MPI_UINT8_T +-MPI_UINT16_T +-MPI_UINT32_T +-MPI_UINT64_T +-MPI_C_COMPLEX +-MPI_C_FLOAT_COMPLEX +-MPI_C_DOUBLE_COMPLEX +-MPI_C_LONG_DOUBLE_COMPLEX +-MPI_FLOAT_INT +-MPI_DOUBLE_INT +-MPI_LONG_INT +-MPI_2INT +-MPI_SHORT_INT +-MPI_LONG_DOUBLE_INT +deleted file mode 100644 +--- a/test/mpi/basictypetest.txt ++++ /dev/null +@@ -1,47 +0,0 @@ +-# (C) 2018 by Argonne National Laboratory. +-# See COPYRIGHT in top-level directory. +-# +-# This file is used by autogen.sh to generate multiple binary files for datatype testing. +-# Every line must have the format: +-# +-# :::timeLimit=: +-# +-# The autogen.sh script generates a single binary for every line. Each binary will appear in +-# the testlist file multiple times, corresponding to different combinations of basic datatypes +-# (a list of which is defined in basictypelist.txt) and counts. Each binary will be built +-# using the additional user defined macros (e.g., BCAST_COMM_WORLD_ONLY). +-# Naming of produced binaries will be in the form: where 'k' is the line +-# number in this file (this is only used to differentiate between binaries generated with +-# different user defined macros while keeping the filename length reasonable). +-# The BASIC component in the name states this is a basic test, as opposite to the STRUCT tests. +-# BASIC is also used in the runtest.in script to limit the number of basic types to test for +-# the basic tests (there is no need to limit these for STRUCT tests). +-# +-# NOTE: the first, third, and fifth fields are mandatory (i.e., there must be a valid file pathname, +-# count, and number of processes to run the test). +- +-attr/fkeyvaltype.c::1::1 +-coll/bcast.c::1 8 64 512 32768 262144:timeLimit=1200:4 +-coll/bcast.c:BCAST_COMM_WORLD_ONLY:1 8 64 512 32768 262144:timeLimit=1200:10 +-cxx/attr/fkeyvaltypex.cxx::1::1 +-cxx/datatype/packsizex.cxx::1::1 +-pt2pt/pingping.c::1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144:timeLimit=1200:2 +-pt2pt/sendrecv1.c::1 8 64 512 32768 262144::4 +-pt2pt/sendself.c::1 8 64 512 32768 262144::1 +-rma/accfence1.c::1 8 64 512 32768 262144:timeLimit=900:4 +-rma/accpscw1.c::1 8 64 512 32768 262144:timeLimit=900:4 +-rma/epochtest.c::1 8 64 512 32768 262144:timeLimit=900:4 +-rma/getfence1.c::1 8 64 512 32768 262144::2 +-rma/getfence1.c::16000000:timeLimit=1800:2 +-rma/lock_contention_dt.c::1 8 64 512 32768 262144:timeLimit=600:4 +-rma/lock_dt.c::1 8 64 512 32768 262144::2 +-rma/lock_dt_flush.c::1 8 64 512 32768 262144::2 +-rma/lock_dt_flushlocal.c::1 8 64 512 32768 262144::2 +-rma/lockall_dt.c::1 8 64 512 32768 262144:timeLimit=1800:4 +-rma/lockall_dt_flush.c::1 8 64 512 32768 262144:timeLimit=1800:4 +-rma/lockall_dt_flushall.c::1 8 64 512 32768 262144:timeLimit=1800:4 +-rma/lockall_dt_flushlocal.c::1 8 64 512 32768 262144:timeLimit=1800:4 +-rma/lockall_dt_flushlocalall.c::1 8 64 512 32768 262144:timeLimit=1800:4 +-rma/putfence1.c::1 8 64 512 32768 262144::2 +-rma/putfence1.c::16000000:timeLimit=1800:2 +-rma/putpscw1.c::1 8 64 512 32768 262144:timeLimit=900:4 +--- a/test/mpi/coll/Makefile.am ++++ b/test/mpi/coll/Makefile.am +@@ -119,7 +119,14 @@ noinst_PROGRAMS = \ + nbicreduce \ + nbicscatter \ + nbicscatterv \ +- neighb_coll ++ neighb_allgather \ ++ neighb_allgatherv \ ++ neighb_alltoall \ ++ neighb_alltoallv \ ++ neighb_alltoallw \ ++ bcast \ ++ bcast_comm_world_only ++ + allgatherv4_LDADD = $(LDADD) -lm + + # Generate tests of the nonblocking collectives by reusing the blocking tests. +@@ -168,4 +175,8 @@ nbicscatter_CPPFLAGS = -DUSE_MTEST_NBC $(AM_CPPFLAGS) + nbicscatterv_SOURCES = icscatterv.c + nbicscatterv_CPPFLAGS = -DUSE_MTEST_NBC $(AM_CPPFLAGS) + +-include Makefile.dtp ++bcast_CPPFLAGS = $(AM_CPPFLAGS) ++bcast_SOURCES = bcast.c ++ ++bcast_comm_world_only_CPPFLAGS = -DBCAST_COMM_WORLD_ONLY $(AM_CPPFLAGS) ++bcast_comm_world_only_SOURCES = bcast.c +--- a/test/mpi/coll/bcast.c ++++ b/test/mpi/coll/bcast.c +@@ -14,177 +14,48 @@ + static char MTEST_Descrip[] = "Test of broadcast with various roots and datatypes"; + */ + +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; + +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; + + int main(int argc, char *argv[]) + { + int errs = 0, err; + int rank, size, root; +- int minsize = 2, count; +- int i, j, len; +- MPI_Aint sendcount, recvcount; ++ int minsize = 2; ++ int i, j, seed, testsize; ++ MPI_Aint count; ++ MPI_Aint maxbufsize; + MPI_Comm comm; +- MPI_Datatype sendtype, recvtype; +- DTP_t send_dtp, recv_dtp; +- char send_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char recv_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- void *sendbuf, *recvbuf; ++ MPI_Datatype type; ++ DTP_pool_s dtp; ++ DTP_obj_s obj; ++ void *buf; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count, &send_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating send pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &recv_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating recv pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } ++ MPI_Comm_rank(MPI_COMM_WORLD, &rank); + +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &send_dtp); ++ err = DTP_pool_create(basic_type, count, seed + rank, &dtp); + if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); ++ fprintf(stderr, "Error while creating send pool (%s,%ld)\n", basic_type, count); ++ fflush(stderr); + } + +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &recv_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif ++ MTestArgListDestroy(head); + + /* The following illustrates the use of the routines to + * run through a selection of communicators and datatypes. + * Use subsets of these for tests that do not involve combinations + * of communicators, datatypes, and counts of datatypes */ + while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- + #if defined BCAST_COMM_WORLD_ONLY + if (comm != MPI_COMM_WORLD) { + MTestFreeComm(&comm); +@@ -192,6 +63,9 @@ int main(int argc, char *argv[]) + } + #endif /* BCAST_COMM_WORLD_ONLY */ + ++ if (comm == MPI_COMM_NULL) ++ continue; ++ + /* Determine the sender and receiver */ + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); +@@ -201,77 +75,60 @@ int main(int argc, char *argv[]) + MPI_Errhandler_set(comm, MPI_ERRORS_RETURN); + + for (root = 0; root < size; root++) { +- for (i = 0; i < send_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(send_dtp, i, 0, 1, count); ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- sendcount = send_dtp->DTP_obj_array[i].DTP_obj_count; +- sendtype = send_dtp->DTP_obj_array[i].DTP_obj_type; +- sendbuf = send_dtp->DTP_obj_array[i].DTP_obj_buf; ++ buf = malloc(obj.DTP_bufsize); ++ if (buf == NULL) { ++ errs++; ++ break; ++ } + +- for (j = 0; j < recv_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(recv_dtp, j, 0, 0, 0); ++ if (rank == root) { ++ err = DTP_obj_buf_init(obj, buf, 0, 1, count); + if (err != DTP_SUCCESS) { + errs++; + break; + } ++ } else { ++ err = DTP_obj_buf_init(obj, buf, -1, -1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ } + +- recvcount = recv_dtp->DTP_obj_array[j].DTP_obj_count; +- recvtype = recv_dtp->DTP_obj_array[j].DTP_obj_type; +- recvbuf = recv_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == root) { +- err = MPI_Bcast(sendbuf, sendcount, sendtype, root, comm); +- if (err) { +- errs++; +- MTestPrintError(err); +- } +- } else { +- err = MPI_Bcast(recvbuf, recvcount, recvtype, root, comm); +- if (err) { +- errs++; +- MPI_Type_get_name(recvtype, recv_name, &len); +- fprintf(stderr, "Error with communicator %s and datatype %s\n", +- MTestGetIntracommName(), recv_name); +- MTestPrintError(err); +- } ++ err = ++ MPI_Bcast(buf + obj.DTP_buf_offset, obj.DTP_type_count, obj.DTP_datatype, root, ++ comm); ++ if (err) { ++ errs++; ++ MTestPrintError(err); ++ } + +- err = DTP_obj_buf_check(recv_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- if (errs < 10) { +- MPI_Type_get_name(sendtype, send_name, &len); +- MPI_Type_get_name(recvtype, recv_name, &len); +- fprintf(stdout, +- "Data received with type %s does not match data sent with type %s\n", +- recv_name, send_name); +- fflush(stdout); +- } +- } ++ err = DTP_obj_buf_check(obj, buf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ if (errs < 10) { ++ fprintf(stderr, ++ "Data received with type %s does not match data sent\n", ++ obj.DTP_description); ++ fflush(stderr); + } +- DTP_obj_free(recv_dtp, j); + } +- DTP_obj_free(send_dtp, i); ++ ++ free(buf); ++ DTP_obj_free(obj); + } + } + MTestFreeComm(&comm); + } + +- DTP_pool_free(send_dtp); +- DTP_pool_free(recv_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif ++ DTP_pool_free(dtp); + + MTest_Finalize(errs); + return MTestReturnValue(errs); +new file mode 100644 +--- /dev/null ++++ b/test/mpi/coll/neighb_allgather.c +@@ -0,0 +1,66 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2012 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include ++#include ++#include ++ ++#include ++#include "mpitest.h" ++ ++#if !defined(USE_STRICT_MPI) && defined(MPICH) ++#define TEST_NEIGHB_COLL 1 ++#endif ++ ++/* assert-like macro that bumps the err count and emits a message */ ++#define check(x_) \ ++ do { \ ++ if (!(x_)) { \ ++ ++errs; \ ++ if (errs < 10) { \ ++ fprintf(stderr, "check failed: (%s), line %d\n", #x_, __LINE__); \ ++ } \ ++ } \ ++ } while (0) ++ ++int main(int argc, char *argv[]) ++{ ++ int errs = 0; ++ int wrank, wsize; ++ int periods[1] = { 0 }; ++ int sendbuf[1]; ++ int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; ++ MPI_Comm cart, dgraph, graph; ++ ++ MTest_Init(&argc, &argv); ++ MPI_Comm_rank(MPI_COMM_WORLD, &wrank); ++ MPI_Comm_size(MPI_COMM_WORLD, &wsize); ++ ++#if defined(TEST_NEIGHB_COLL) ++ /* (wrap)--> 0 <--> 1 <--> ... <--> p-1 <--(wrap) */ ++ MPI_Cart_create(MPI_COMM_WORLD, 1, &wsize, periods, /*reorder= */ 0, &cart); ++ sendbuf[0] = wrank; ++ ++ /* should see one send to each neighbor (rank-1 and rank+1) and one receive ++ * each from same */ ++ MPI_Neighbor_allgather(sendbuf, 1, MPI_INT, recvbuf, 1, MPI_INT, cart); ++ ++ if (wrank == 0) ++ check(recvbuf[0] == 0xdeadbeef); ++ else ++ check(recvbuf[0] == wrank - 1); ++ ++ if (wrank == wsize - 1) ++ check(recvbuf[1] == 0xdeadbeef); ++ else ++ check(recvbuf[1] == wrank + 1); ++ ++ MPI_Comm_free(&cart); ++#endif /* defined(TEST_NEIGHB_COLL) */ ++ ++ MTest_Finalize(errs); ++ ++ return MTestReturnValue(errs); ++} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/coll/neighb_allgatherv.c +@@ -0,0 +1,69 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2012 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include ++#include ++#include ++ ++#include ++#include "mpitest.h" ++ ++#if !defined(USE_STRICT_MPI) && defined(MPICH) ++#define TEST_NEIGHB_COLL 1 ++#endif ++ ++/* assert-like macro that bumps the err count and emits a message */ ++#define check(x_) \ ++ do { \ ++ if (!(x_)) { \ ++ ++errs; \ ++ if (errs < 10) { \ ++ fprintf(stderr, "check failed: (%s), line %d\n", #x_, __LINE__); \ ++ } \ ++ } \ ++ } while (0) ++ ++int main(int argc, char *argv[]) ++{ ++ int errs = 0; ++ int wrank, wsize; ++ int periods[1] = { 0 }; ++ MPI_Comm cart, dgraph, graph; ++ int sendbuf[1]; ++ int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; ++ int recvcounts[2] = { 1, 1 }; ++ int displs[2] = { 1, 0 }; ++ ++ ++ MTest_Init(&argc, &argv); ++ MPI_Comm_rank(MPI_COMM_WORLD, &wrank); ++ MPI_Comm_size(MPI_COMM_WORLD, &wsize); ++ ++#if defined(TEST_NEIGHB_COLL) ++ /* (wrap)--> 0 <--> 1 <--> ... <--> p-1 <--(wrap) */ ++ MPI_Cart_create(MPI_COMM_WORLD, 1, &wsize, periods, /*reorder= */ 0, &cart); ++ sendbuf[0] = wrank; ++ ++ /* should see one send to each neighbor (rank-1 and rank+1) and one receive ++ * each from same, but put them in opposite slots in the buffer */ ++ MPI_Neighbor_allgatherv(sendbuf, 1, MPI_INT, recvbuf, recvcounts, displs, MPI_INT, cart); ++ ++ if (wrank == 0) ++ check(recvbuf[1] == 0xdeadbeef); ++ else ++ check(recvbuf[1] == wrank - 1); ++ ++ if (wrank == wsize - 1) ++ check(recvbuf[0] == 0xdeadbeef); ++ else ++ check(recvbuf[0] == wrank + 1); ++ ++ MPI_Comm_free(&cart); ++#endif /* defined(TEST_NEIGHB_COLL) */ ++ ++ MTest_Finalize(errs); ++ ++ return MTestReturnValue(errs); ++} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/coll/neighb_alltoall.c +@@ -0,0 +1,67 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2012 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include ++#include ++#include ++ ++#include ++#include "mpitest.h" ++ ++#if !defined(USE_STRICT_MPI) && defined(MPICH) ++#define TEST_NEIGHB_COLL 1 ++#endif ++ ++/* assert-like macro that bumps the err count and emits a message */ ++#define check(x_) \ ++ do { \ ++ if (!(x_)) { \ ++ ++errs; \ ++ if (errs < 10) { \ ++ fprintf(stderr, "check failed: (%s), line %d\n", #x_, __LINE__); \ ++ } \ ++ } \ ++ } while (0) ++ ++int main(int argc, char *argv[]) ++{ ++ int errs = 0; ++ int wrank, wsize; ++ int periods[1] = { 0 }; ++ MPI_Comm cart, dgraph, graph; ++ int sendbuf[2] = { -(wrank + 1), wrank + 1 }; ++ int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; ++ ++ MTest_Init(&argc, &argv); ++ MPI_Comm_rank(MPI_COMM_WORLD, &wrank); ++ MPI_Comm_size(MPI_COMM_WORLD, &wsize); ++ ++#if defined(TEST_NEIGHB_COLL) ++ /* (wrap)--> 0 <--> 1 <--> ... <--> p-1 <--(wrap) */ ++ MPI_Cart_create(MPI_COMM_WORLD, 1, &wsize, periods, /*reorder= */ 0, &cart); ++ sendbuf[0] = -(wrank + 1); ++ sendbuf[1] = wrank + 1; ++ ++ /* should see one send to each neighbor (rank-1 and rank+1) and one ++ * receive each from same */ ++ MPI_Neighbor_alltoall(sendbuf, 1, MPI_INT, recvbuf, 1, MPI_INT, cart); ++ ++ if (wrank == 0) ++ check(recvbuf[0] == 0xdeadbeef); ++ else ++ check(recvbuf[0] == wrank); ++ ++ if (wrank == wsize - 1) ++ check(recvbuf[1] == 0xdeadbeef); ++ else ++ check(recvbuf[1] == -(wrank + 2)); ++ ++ MPI_Comm_free(&cart); ++#endif /* defined(TEST_NEIGHB_COLL) */ ++ ++ MTest_Finalize(errs); ++ ++ return MTestReturnValue(errs); ++} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/coll/neighb_alltoallv.c +@@ -0,0 +1,73 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2012 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include ++#include ++#include ++ ++#include ++#include "mpitest.h" ++ ++#if !defined(USE_STRICT_MPI) && defined(MPICH) ++#define TEST_NEIGHB_COLL 1 ++#endif ++ ++/* assert-like macro that bumps the err count and emits a message */ ++#define check(x_) \ ++ do { \ ++ if (!(x_)) { \ ++ ++errs; \ ++ if (errs < 10) { \ ++ fprintf(stderr, "check failed: (%s), line %d\n", #x_, __LINE__); \ ++ } \ ++ } \ ++ } while (0) ++ ++int main(int argc, char *argv[]) ++{ ++ int errs = 0; ++ int wrank, wsize; ++ int periods[1] = { 0 }; ++ int sendbuf[2]; ++ int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; ++ int sendcounts[2] = { 1, 1 }; ++ int recvcounts[2] = { 1, 1 }; ++ int sdispls[2] = { 0, 1 }; ++ int rdispls[2] = { 1, 0 }; ++ MPI_Comm cart, dgraph, graph; ++ ++ MTest_Init(&argc, &argv); ++ MPI_Comm_rank(MPI_COMM_WORLD, &wrank); ++ MPI_Comm_size(MPI_COMM_WORLD, &wsize); ++ ++#if defined(TEST_NEIGHB_COLL) ++ /* (wrap)--> 0 <--> 1 <--> ... <--> p-1 <--(wrap) */ ++ MPI_Cart_create(MPI_COMM_WORLD, 1, &wsize, periods, /*reorder= */ 0, &cart); ++ ++ sendbuf[0] = -(wrank + 1); ++ sendbuf[1] = wrank + 1; ++ ++ /* should see one send to each neighbor (rank-1 and rank+1) and one receive ++ * each from same, but put them in opposite slots in the buffer */ ++ MPI_Neighbor_alltoallv(sendbuf, sendcounts, sdispls, MPI_INT, ++ recvbuf, recvcounts, rdispls, MPI_INT, cart); ++ ++ if (wrank == 0) ++ check(recvbuf[1] == 0xdeadbeef); ++ else ++ check(recvbuf[1] == wrank); ++ ++ if (wrank == wsize - 1) ++ check(recvbuf[0] == 0xdeadbeef); ++ else ++ check(recvbuf[0] == -(wrank + 2)); ++ ++ MPI_Comm_free(&cart); ++#endif /* defined(TEST_NEIGHB_COLL) */ ++ ++ MTest_Finalize(errs); ++ ++ return MTestReturnValue(errs); ++} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/coll/neighb_alltoallw.c +@@ -0,0 +1,75 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * (C) 2012 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include ++#include ++#include ++ ++#include ++#include "mpitest.h" ++ ++#if !defined(USE_STRICT_MPI) && defined(MPICH) ++#define TEST_NEIGHB_COLL 1 ++#endif ++ ++/* assert-like macro that bumps the err count and emits a message */ ++#define check(x_) \ ++ do { \ ++ if (!(x_)) { \ ++ ++errs; \ ++ if (errs < 10) { \ ++ fprintf(stderr, "check failed: (%s), line %d\n", #x_, __LINE__); \ ++ } \ ++ } \ ++ } while (0) ++ ++int main(int argc, char *argv[]) ++{ ++ int errs = 0; ++ int wrank, wsize; ++ int periods[1] = { 0 }; ++ MPI_Comm cart, dgraph, graph; ++ int sendbuf[2]; ++ int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; ++ int sendcounts[2] = { 1, 1 }; ++ int recvcounts[2] = { 1, 1 }; ++ MPI_Aint sdispls[2] = { 0, sizeof(int) }; ++ MPI_Aint rdispls[2] = { sizeof(int), 0 }; ++ MPI_Datatype sendtypes[2] = { MPI_INT, MPI_INT }; ++ MPI_Datatype recvtypes[2] = { MPI_INT, MPI_INT }; ++ ++ MTest_Init(&argc, &argv); ++ MPI_Comm_rank(MPI_COMM_WORLD, &wrank); ++ MPI_Comm_size(MPI_COMM_WORLD, &wsize); ++ ++#if defined(TEST_NEIGHB_COLL) ++ /* (wrap)--> 0 <--> 1 <--> ... <--> p-1 <--(wrap) */ ++ MPI_Cart_create(MPI_COMM_WORLD, 1, &wsize, periods, /*reorder= */ 0, &cart); ++ sendbuf[0] = -(wrank + 1); ++ sendbuf[1] = wrank + 1; ++ ++ ++ /* should see one send to each neighbor (rank-1 and rank+1) and one receive ++ * each from same, but put them in opposite slots in the buffer */ ++ MPI_Neighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, ++ recvbuf, recvcounts, rdispls, recvtypes, cart); ++ ++ if (wrank == 0) ++ check(recvbuf[1] == 0xdeadbeef); ++ else ++ check(recvbuf[1] == wrank); ++ ++ if (wrank == wsize - 1) ++ check(recvbuf[0] == 0xdeadbeef); ++ else ++ check(recvbuf[0] == -(wrank + 2)); ++ ++ MPI_Comm_free(&cart); ++#endif /* defined(TEST_NEIGHB_COLL) */ ++ ++ MTest_Finalize(errs); ++ ++ return MTestReturnValue(errs); ++} +deleted file mode 100644 +--- a/test/mpi/coll/neighb_coll.c ++++ /dev/null +@@ -1,167 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2012 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include +-#include +-#include +- +-#include +-#include "mpitest.h" +- +-#if !defined(USE_STRICT_MPI) && defined(MPICH) +-#define TEST_NEIGHB_COLL 1 +-#endif +- +-/* assert-like macro that bumps the err count and emits a message */ +-#define check(x_) \ +- do { \ +- if (!(x_)) { \ +- ++errs; \ +- if (errs < 10) { \ +- fprintf(stderr, "check failed: (%s), line %d\n", #x_, __LINE__); \ +- } \ +- } \ +- } while (0) +- +-int main(int argc, char *argv[]) +-{ +- int errs = 0; +- int wrank, wsize; +- int periods[1] = { 0 }; +- MPI_Comm cart, dgraph, graph; +- +- MTest_Init(&argc, &argv); +- MPI_Comm_rank(MPI_COMM_WORLD, &wrank); +- MPI_Comm_size(MPI_COMM_WORLD, &wsize); +- +-#if defined(TEST_NEIGHB_COLL) +- /* a basic test for the 10 (5 patterns x {blocking,nonblocking}) MPI-3 +- * neighborhood collective routines */ +- +- /* (wrap)--> 0 <--> 1 <--> ... <--> p-1 <--(wrap) */ +- MPI_Cart_create(MPI_COMM_WORLD, 1, &wsize, periods, /*reorder= */ 0, &cart); +- +- /* allgather */ +- { +- int sendbuf[1] = { wrank }; +- int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; +- +- /* should see one send to each neighbor (rank-1 and rank+1) and one receive +- * each from same */ +- MPI_Neighbor_allgather(sendbuf, 1, MPI_INT, recvbuf, 1, MPI_INT, cart); +- +- if (wrank == 0) +- check(recvbuf[0] == 0xdeadbeef); +- else +- check(recvbuf[0] == wrank - 1); +- +- if (wrank == wsize - 1) +- check(recvbuf[1] == 0xdeadbeef); +- else +- check(recvbuf[1] == wrank + 1); +- } +- +- /* allgatherv */ +- { +- int sendbuf[1] = { wrank }; +- int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; +- int recvcounts[2] = { 1, 1 }; +- int displs[2] = { 1, 0 }; +- +- /* should see one send to each neighbor (rank-1 and rank+1) and one receive +- * each from same, but put them in opposite slots in the buffer */ +- MPI_Neighbor_allgatherv(sendbuf, 1, MPI_INT, recvbuf, recvcounts, displs, MPI_INT, cart); +- +- if (wrank == 0) +- check(recvbuf[1] == 0xdeadbeef); +- else +- check(recvbuf[1] == wrank - 1); +- +- if (wrank == wsize - 1) +- check(recvbuf[0] == 0xdeadbeef); +- else +- check(recvbuf[0] == wrank + 1); +- } +- +- /* alltoall */ +- { +- int sendbuf[2] = { -(wrank + 1), wrank + 1 }; +- int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; +- +- /* should see one send to each neighbor (rank-1 and rank+1) and one +- * receive each from same */ +- MPI_Neighbor_alltoall(sendbuf, 1, MPI_INT, recvbuf, 1, MPI_INT, cart); +- +- if (wrank == 0) +- check(recvbuf[0] == 0xdeadbeef); +- else +- check(recvbuf[0] == wrank); +- +- if (wrank == wsize - 1) +- check(recvbuf[1] == 0xdeadbeef); +- else +- check(recvbuf[1] == -(wrank + 2)); +- } +- +- /* alltoallv */ +- { +- int sendbuf[2] = { -(wrank + 1), wrank + 1 }; +- int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; +- int sendcounts[2] = { 1, 1 }; +- int recvcounts[2] = { 1, 1 }; +- int sdispls[2] = { 0, 1 }; +- int rdispls[2] = { 1, 0 }; +- +- /* should see one send to each neighbor (rank-1 and rank+1) and one receive +- * each from same, but put them in opposite slots in the buffer */ +- MPI_Neighbor_alltoallv(sendbuf, sendcounts, sdispls, MPI_INT, +- recvbuf, recvcounts, rdispls, MPI_INT, cart); +- +- if (wrank == 0) +- check(recvbuf[1] == 0xdeadbeef); +- else +- check(recvbuf[1] == wrank); +- +- if (wrank == wsize - 1) +- check(recvbuf[0] == 0xdeadbeef); +- else +- check(recvbuf[0] == -(wrank + 2)); +- } +- +- /* alltoallw */ +- { +- int sendbuf[2] = { -(wrank + 1), wrank + 1 }; +- int recvbuf[2] = { 0xdeadbeef, 0xdeadbeef }; +- int sendcounts[2] = { 1, 1 }; +- int recvcounts[2] = { 1, 1 }; +- MPI_Aint sdispls[2] = { 0, sizeof(int) }; +- MPI_Aint rdispls[2] = { sizeof(int), 0 }; +- MPI_Datatype sendtypes[2] = { MPI_INT, MPI_INT }; +- MPI_Datatype recvtypes[2] = { MPI_INT, MPI_INT }; +- +- /* should see one send to each neighbor (rank-1 and rank+1) and one receive +- * each from same, but put them in opposite slots in the buffer */ +- MPI_Neighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, +- recvbuf, recvcounts, rdispls, recvtypes, cart); +- +- if (wrank == 0) +- check(recvbuf[1] == 0xdeadbeef); +- else +- check(recvbuf[1] == wrank); +- +- if (wrank == wsize - 1) +- check(recvbuf[0] == 0xdeadbeef); +- else +- check(recvbuf[0] == -(wrank + 2)); +- } +- +- +- MPI_Comm_free(&cart); +-#endif /* defined(TEST_NEIGHB_COLL) */ +- +- MTest_Finalize(errs); +- +- return MTestReturnValue(errs); +-} +--- a/test/mpi/coll/opland.c ++++ b/test/mpi/coll/opland.c +@@ -132,107 +132,6 @@ int main(int argc, char *argv[]) + } + } + +-#ifndef USE_STRICT_MPI +- /* float */ +- MTestPrintfMsg(10, "Reduce of MPI_FLOAT\n"); +- finbuf[0] = 1; +- finbuf[1] = 0; +- finbuf[2] = (rank > 0); +- +- foutbuf[0] = 0; +- foutbuf[1] = 1; +- foutbuf[2] = 1; +- rc = MPI_Reduce(finbuf, foutbuf, 3, MPI_FLOAT, MPI_LAND, 0, comm); +- if (rc) { +- MTestPrintErrorMsg("MPI_LAND and MPI_FLOAT", rc); +- errs++; +- } else { +- if (rank == 0) { +- if (!foutbuf[0]) { +- errs++; +- fprintf(stderr, "float AND(1) test failed\n"); +- } +- if (foutbuf[1]) { +- errs++; +- fprintf(stderr, "float AND(0) test failed\n"); +- } +- if (foutbuf[2] && size > 1) { +- errs++; +- fprintf(stderr, "float AND(>) test failed\n"); +- } +- } +- } +- +- MTestPrintfMsg(10, "Reduce of MPI_DOUBLE\n"); +- /* double */ +- dinbuf[0] = 1; +- dinbuf[1] = 0; +- dinbuf[2] = (rank > 0); +- +- doutbuf[0] = 0; +- doutbuf[1] = 1; +- doutbuf[2] = 1; +- rc = MPI_Reduce(dinbuf, doutbuf, 3, MPI_DOUBLE, MPI_LAND, 0, comm); +- if (rc) { +- MTestPrintErrorMsg("MPI_LAND and MPI_DOUBLE", rc); +- errs++; +- } else { +- if (rank == 0) { +- if (!doutbuf[0]) { +- errs++; +- fprintf(stderr, "double AND(1) test failed\n"); +- } +- if (doutbuf[1]) { +- errs++; +- fprintf(stderr, "double AND(0) test failed\n"); +- } +- if (doutbuf[2] && size > 1) { +- errs++; +- fprintf(stderr, "double AND(>) test failed\n"); +- } +- } +- } +- +-#ifdef HAVE_LONG_DOUBLE +- { +- long double ldinbuf[3], ldoutbuf[3]; +- /* long double */ +- MTEST_VG_MEM_INIT(ldinbuf, 3 * sizeof(ldinbuf[0])); +- ldinbuf[0] = 1; +- ldinbuf[1] = 0; +- ldinbuf[2] = (rank > 0); +- +- ldoutbuf[0] = 0; +- ldoutbuf[1] = 1; +- ldoutbuf[2] = 1; +- if (MPI_LONG_DOUBLE != MPI_DATATYPE_NULL) { +- MTestPrintfMsg(10, "Reduce of MPI_LONG_DOUBLE\n"); +- rc = MPI_Reduce(ldinbuf, ldoutbuf, 3, MPI_LONG_DOUBLE, MPI_LAND, 0, comm); +- if (rc) { +- MTestPrintErrorMsg("MPI_LAND and MPI_LONG_DOUBLE", rc); +- errs++; +- } else { +- if (rank == 0) { +- if (!ldoutbuf[0]) { +- errs++; +- fprintf(stderr, "long double AND(1) test failed\n"); +- } +- if (ldoutbuf[1]) { +- errs++; +- fprintf(stderr, "long double AND(0) test failed\n"); +- } +- if (ldoutbuf[2] && size > 1) { +- errs++; +- fprintf(stderr, "long double AND(>) test failed\n"); +- } +- } +- } +- } +- } +-#endif /* HAVE_LONG_DOUBLE */ +-#endif /* USE_STRICT_MPI */ +- +- + #ifdef HAVE_LONG_LONG + { + long long llinbuf[3], lloutbuf[3]; +--- a/test/mpi/coll/oplor.c ++++ b/test/mpi/coll/oplor.c +@@ -135,106 +135,6 @@ int main(int argc, char *argv[]) + } + } + +-#ifndef USE_STRICT_MPI +- /* float */ +- MTestPrintfMsg(10, "Reduce of MPI_FLOAT\n"); +- finbuf[0] = 1; +- finbuf[1] = 0; +- finbuf[2] = (rank > 0); +- +- foutbuf[0] = 0; +- foutbuf[1] = 1; +- foutbuf[2] = 1; +- err = MPI_Reduce(finbuf, foutbuf, 3, MPI_FLOAT, MPI_LOR, 0, comm); +- if (err) { +- errs++; +- MTestPrintErrorMsg("MPI_LOR and MPI_FLOAT", err); +- } else { +- if (rank == 0) { +- if (!foutbuf[0]) { +- errs++; +- fprintf(stderr, "float OR(1) test failed\n"); +- } +- if (foutbuf[1]) { +- errs++; +- fprintf(stderr, "float OR(0) test failed\n"); +- } +- if (!foutbuf[2] && size > 1) { +- errs++; +- fprintf(stderr, "float OR(>) test failed\n"); +- } +- } +- } +- +- /* double */ +- MTestPrintfMsg(10, "Reduce of MPI_DOUBLE\n"); +- dinbuf[0] = 1; +- dinbuf[1] = 0; +- dinbuf[2] = (rank > 0); +- +- doutbuf[0] = 0; +- doutbuf[1] = 1; +- doutbuf[2] = 1; +- err = MPI_Reduce(dinbuf, doutbuf, 3, MPI_DOUBLE, MPI_LOR, 0, comm); +- if (err) { +- errs++; +- MTestPrintErrorMsg("MPI_LOR and MPI_DOUBLE", err); +- } else { +- if (rank == 0) { +- if (!doutbuf[0]) { +- errs++; +- fprintf(stderr, "double OR(1) test failed\n"); +- } +- if (doutbuf[1]) { +- errs++; +- fprintf(stderr, "double OR(0) test failed\n"); +- } +- if (!doutbuf[2] && size > 1) { +- errs++; +- fprintf(stderr, "double OR(>) test failed\n"); +- } +- } +- } +- +-#ifdef HAVE_LONG_DOUBLE +- { +- long double ldinbuf[3], ldoutbuf[3]; +- /* long double */ +- MTEST_VG_MEM_INIT(ldinbuf, 3 * sizeof(ldinbuf[0])); +- ldinbuf[0] = 1; +- ldinbuf[1] = 0; +- ldinbuf[2] = (rank > 0); +- +- ldoutbuf[0] = 0; +- ldoutbuf[1] = 1; +- ldoutbuf[2] = 1; +- if (MPI_LONG_DOUBLE != MPI_DATATYPE_NULL) { +- MTestPrintfMsg(10, "Reduce of MPI_LONG_DOUBLE\n"); +- err = MPI_Reduce(ldinbuf, ldoutbuf, 3, MPI_LONG_DOUBLE, MPI_LOR, 0, comm); +- if (err) { +- errs++; +- MTestPrintErrorMsg("MPI_LOR and MPI_LONG_DOUBLE", err); +- } else { +- if (rank == 0) { +- if (!ldoutbuf[0]) { +- errs++; +- fprintf(stderr, "long double OR(1) test failed\n"); +- } +- if (ldoutbuf[1]) { +- errs++; +- fprintf(stderr, "long double OR(0) test failed\n"); +- } +- if (!ldoutbuf[2] && size > 1) { +- errs++; +- fprintf(stderr, "long double OR(>) test failed\n"); +- } +- } +- } +- } +- } +-#endif /* HAVE_LONG_DOUBLE */ +-#endif /* USE_STRICT_MPI */ +- + #ifdef HAVE_LONG_LONG + { + long long llinbuf[3], lloutbuf[3]; +--- a/test/mpi/coll/test_coll_algos.sh ++++ b/test/mpi/coll/test_coll_algos.sh +@@ -16,13 +16,13 @@ testing_env="env=MPIR_CVAR_BCAST_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_BCAST_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_IBCAST_DEVICE_COLLECTIVE=0 " +-algo_names="tree scatter_recexch_allgather ring" ++algo_names="gentran_tree gentran_scatter_recexch_allgather gentran_ring" + tree_types="kary knomial_1 knomial_2" + kvalues="3" + + for algo_name in ${algo_names}; do + for kval in ${kvalues}; do +- if [ ${algo_name} -eq "tree" ]; then ++ if [ ${algo_name} = "gentran_tree" ]; then + for tree_type in ${tree_types}; do + #set the environment + env="${testing_env} env=MPIR_CVAR_IBCAST_INTRA_ALGORITHM=${algo_name} " +@@ -52,12 +52,12 @@ testing_env="env=MPIR_CVAR_REDUCE_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_REDUCE_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_IREDUCE_DEVICE_COLLECTIVE=0 " +-algo_names="tree ring" ++algo_names="gentran_tree gentran_ring" + tree_types="kary knomial_1 knomial_2" + kvalues="3" + + for algo_name in ${algo_names}; do +- if [ ${algo_name} -eq "tree" ]; then ++ if [ ${algo_name} = "tree" ]; then + for tree_type in ${tree_types}; do + for kval in ${kvalues}; do + #set the environment +@@ -90,24 +90,44 @@ testing_env="env=MPIR_CVAR_ALLREDUCE_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_ALLREDUCE_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_IALLREDUCE_DEVICE_COLLECTIVE=0 " +-algo_names="recexch_single_buffer recexch_multiple_buffer tree_kary tree_knomial" ++algo_names="gentran_recexch_single_buffer gentran_recexch_multiple_buffer tree" ++tree_types="kary knomial_1 knomial_2" + kvalues="2 3 4" + + for algo_name in ${algo_names}; do + for kval in ${kvalues}; do +- #set the environment +- env="${testing_env} env=MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM=${algo_name} " +- env+="env=MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL=${kval} env=MPIR_CVAR_IALLREDUCE_TREE_PIPELINE_CHUNK_SIZE=4096 " +- +- coll_algo_tests+="allred 4 arg=100 ${env}${nl}" +- coll_algo_tests+="allred 7 ${env}${nl}" +- coll_algo_tests+="allredmany 4 ${env}${nl}" +- coll_algo_tests+="allred2 4 ${env}${nl}" +- coll_algo_tests+="allred3 10 ${env}${nl}" +- coll_algo_tests+="allred4 4 ${env}${nl}" +- coll_algo_tests+="allred5 5 ${env}${nl}" +- coll_algo_tests+="allred6 4 ${env}${nl}" +- coll_algo_tests+="allred6 7 ${env}${nl}" ++ if [ "${algo_name}" = "tree" ]; then ++ for tree_type in ${tree_types}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM=${algo_name} " ++ env+="env=MPIR_CVAR_IALLREDUCE_TREE_TYPE=${tree_type} env=MPIR_CVAR_IALLREDUCE_TREE_PIPELINE_CHUNK_SIZE=4096 " ++ env+="env=MPIR_CVAR_IALLREDUCE_TREE_KVAL=${kval} " ++ ++ coll_algo_tests+="allred 4 arg=100 ${env}${nl}" ++ coll_algo_tests+="allred 7 ${env}${nl}" ++ coll_algo_tests+="allredmany 4 ${env}${nl}" ++ coll_algo_tests+="allred2 4 ${env}${nl}" ++ coll_algo_tests+="allred3 10 ${env}${nl}" ++ coll_algo_tests+="allred4 4 ${env}${nl}" ++ coll_algo_tests+="allred5 5 ${env}${nl}" ++ coll_algo_tests+="allred6 4 ${env}${nl}" ++ coll_algo_tests+="allred6 7 ${env}${nl}" ++ done ++ else ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM=${algo_name} " ++ env+="env=MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL=${kval} " ++ ++ coll_algo_tests+="allred 4 arg=100 ${env}${nl}" ++ coll_algo_tests+="allred 7 ${env}${nl}" ++ coll_algo_tests+="allredmany 4 ${env}${nl}" ++ coll_algo_tests+="allred2 4 ${env}${nl}" ++ coll_algo_tests+="allred3 10 ${env}${nl}" ++ coll_algo_tests+="allred4 4 ${env}${nl}" ++ coll_algo_tests+="allred5 5 ${env}${nl}" ++ coll_algo_tests+="allred6 4 ${env}${nl}" ++ coll_algo_tests+="allred6 7 ${env}${nl}" ++ fi + done + done + +@@ -119,7 +139,7 @@ testing_env="env=MPIR_CVAR_ALLGATHER_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_ALLGATHER_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_IALLGATHER_DEVICE_COLLECTIVE=0 " +-algo_names="recexch_distance_doubling recexch_distance_halving gentran_brucks" ++algo_names="gentran_recexch_doubling gentran_recexch_halving gentran_brucks gentran_ring" + kvalues="2 3 4" + + for algo_name in ${algo_names}; do +@@ -142,14 +162,18 @@ testing_env="env=MPIR_CVAR_ALLGATHERV_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_ALLGATHERV_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_IALLGATHERV_DEVICE_COLLECTIVE=0 " +-algo_names="recexch_distance_doubling recexch_distance_halving gentran_ring" ++algo_names="gentran_recexch_doubling gentran_recexch_halving gentran_ring gentran_brucks" + kvalues="2 3 4" + + for algo_name in ${algo_names}; do + if [ "${algo_name}" != "gentran_ring" ]; then + for kval in ${kvalues}; do + env="${testing_env} env=MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM=${algo_name} " +- env+="env=MPIR_CVAR_IALLGATHERV_RECEXCH_KVAL=${kval}" ++ if [ "${algo_name}" != "gentran_brucks" ]; then ++ env+="env=MPIR_CVAR_IALLGATHERV_BRUCKS_KVAL=${kval}" ++ else ++ env+="env=MPIR_CVAR_IALLGATHERV_RECEXCH_KVAL=${kval}" ++ fi + + coll_algo_tests+="allgatherv2 10 ${env}${nl}" + coll_algo_tests+="allgatherv3 10 ${env}${nl}" +@@ -171,7 +195,7 @@ testing_env="env=MPIR_CVAR_REDUCE_SCATTER_BLOCK_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_REDUCE_SCATTER_BLOCK_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_IREDUCE_SCATTER_BLOCK_DEVICE_COLLECTIVE=0 " +-algo_names="recexch" ++algo_names="gentran_recexch" + kvalues="2 3 4" + + for algo_name in ${algo_names}; do +@@ -199,7 +223,7 @@ testing_env="env=MPIR_CVAR_REDUCE_SCATTER_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_REDUCE_SCATTER_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_IREDUCE_SCATTER_DEVICE_COLLECTIVE=0 " +-algo_names="recexch" ++algo_names="gentran_recexch" + kvalues="2 3 4" + + for algo_name in ${algo_names}; do +@@ -225,7 +249,7 @@ testing_env="env=MPIR_CVAR_SCATTER_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_SCATTER_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_ISCATTER_DEVICE_COLLECTIVE=0 " +-algo_names="tree" ++algo_names="gentran_tree" + kvalues="2 3 4" + + for algo_name in ${algo_names}; do +@@ -248,7 +272,7 @@ testing_env="env=MPIR_CVAR_GATHER_DEVICE_COLLECTIVE=0 " + #test nb algorithms + testing_env+="env=MPIR_CVAR_GATHER_INTRA_ALGORITHM=nb " + testing_env+="env=MPIR_CVAR_IGATHER_DEVICE_COLLECTIVE=0 " +-algo_names="tree" ++algo_names="gentran_tree" + kvalues="2 3 4" + + for algo_name in ${algo_names}; do +@@ -262,4 +286,239 @@ for algo_name in ${algo_names}; do + done + done + ++######### Add tests for Alltoall algorithms ########### ++ ++#disable device collectives for allgather to test MPIR algorithms ++testing_env="env=MPIR_CVAR_ALLTOALL_DEVICE_COLLECTIVE=0 " ++ ++#test nb algorithms ++testing_env+="env=MPIR_CVAR_ALLTOALL_INTRA_ALGORITHM=nb " ++testing_env+="env=MPIR_CVAR_IALLTOALL_DEVICE_COLLECTIVE=0 " ++algo_names="gentran_ring" ++ ++for algo_name in ${algo_names}; do ++ env="${testing_env} env=MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM=${algo_name} " ++ ++ coll_algo_tests+="alltoall1 8 ${env}${nl}" ++done ++ ++algo_names="gentran_brucks" ++kvalues="2 3 4" ++ ++for algo_name in ${algo_names}; do ++ for kval in ${kvalues}; do ++ env="${testing_env} env=MPIR_CVAR_IALLTOALL_INTRA_ALGORITHM=${algo_name} " ++ env+="env=MPIR_CVAR_IALLTOALL_BRUCKS_KVAL=${kval} " ++ ++ coll_algo_tests+="alltoall1 8 ${env} env=MPIR_CVAR_IALLTOALL_BRUCKS_BUFFER_PER_NBR=0${nl}" ++ coll_algo_tests+="alltoall1 8 ${env} env=MPIR_CVAR_IALLTOALL_BRUCKS_BUFFER_PER_NBR=1${nl}" ++ done ++done ++ ++########## Add tests for scan algorithms ############ ++ ++#disable device collectives for scan to test MPIR algorithms ++testing_env="env=MPIR_CVAR_SCAN_DEVICE_COLLECTIVE=0 " ++ ++#test nb algorithms ++testing_env+="env=MPIR_CVAR_SCAN_INTRA_ALGORITHM=nb " ++testing_env+="env=MPIR_CVAR_ISCAN_DEVICE_COLLECTIVE=0 " ++algo_names="gentran_recursive_doubling" ++ ++for algo_name in ${algo_names}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_ISCAN_INTRA_ALGORITHM=${algo_name} " ++ ++ coll_algo_tests+="scantst 4" ++done ++ ++######### Add tests for ineighbor_alltoallw algorithms ########### ++ ++#disable device collectives for neighbor_alltoallw to test mpir algorithms ++testing_env="env=MPIR_CVAR_NEIGHBOR_ALLTOALLW_DEVICE_COLLECTIVE=0 " ++ ++#test nb algorithms ++testing_env+="env=MPIR_CVAR_NEIGHBOR_ALLTOALLW_INTRA_ALGORITHM=nb " ++testing_env+="env=MPIR_CVAR_INEIGHBOR_ALLTOALLW_DEVICE_COLLECTIVE=0 " ++algo_names="gentran_linear" ++ ++for algo_name in ${algo_names}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_INEIGHBOR_ALLTOALLW_INTRA_ALGORITHM=${algo_name} " ++ ++ coll_algo_tests+="neighb_alltoallw 4 mpiversion=3.0 ${env}${nl}" ++done ++ ++######### Add tests for Alltoallv algorithms ########### ++ ++#disable device collectives for alltoallv to test MPIR algorithms ++testing_env="env=MPIR_CVAR_ALLTOALLV_DEVICE_COLLECTIVE=0 " ++ ++#test nb algorithms ++testing_env+="env=MPIR_CVAR_ALLTOALLV_INTRA_ALGORITHM=nb " ++testing_env+="env=MPIR_CVAR_IALLTOALLV_DEVICE_COLLECTIVE=0 " ++algo_names="gentran_scattered" ++batchsizes="1 2 4" ++outstandingtasks="4 8" ++for algo_name in ${algo_names}; do ++ env="${testing_env} env=MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM=${algo_name} " ++ if [ ${algo_name} = "gentran_scattered" ]; then ++ for task in ${outstandingtasks}; do ++ for batchsize in ${batchsizes}; do ++ env="${testing_env} env=MPIR_CVAR_IALLTOALLV_INTRA_ALGORITHM=${algo_name} " ++ env+="env=MPIR_CVAR_IALLTOALLV_SCATTERED_BATCH_SIZE=${batchsize} " ++ env+="env=MPIR_CVAR_IALLTOALLV_SCATTERED_OUTSTANDING_TASKS=${task} " ++ coll_algo_tests+="alltoallv 8 ${env}${nl}" ++ coll_algo_tests+="alltoallv0 10 ${env}${nl}" ++ done ++ done ++ fi ++done ++ ++######### Add tests for Ineighbor_allgather algorithms ########### ++ ++#disable device collectives for neighbor_allgather to test MPIR algorithms ++testing_env="env=MPIR_CVAR_NEIGHBOR_ALLGATHER_DEVICE_COLLECTIVE=0 " ++ ++#test nb algorithms ++testing_env+="env=MPIR_CVAR_NEIGHBOR_ALLGATHER_INTRA_ALGORITHM=nb " ++testing_env+="env=MPIR_CVAR_INEIGHBOR_ALLGATHER_DEVICE_COLLECTIVE=0 " ++algo_names="gentran_linear" ++ ++for algo_name in ${algo_names}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_INEIGHBOR_ALLGATHER_INTRA_ALGORITHM=${algo_name} " ++ ++ coll_algo_tests+="neighb_allgather 4 mpiversion=3.0 ${env}${nl}" ++done ++ ++######### Add tests for Ineighbor_allgatherv algorithms ########### ++ ++#disable device collectives for neighbor_allgatherv to test MPIR algorithms ++testing_env="env=MPIR_CVAR_NEIGHBOR_ALLGATHERV_DEVICE_COLLECTIVE=0 " ++ ++#test nb algorithms ++testing_env+="env=MPIR_CVAR_NEIGHBOR_ALLGATHERV_INTRA_ALGORITHM=nb " ++testing_env+="env=MPIR_CVAR_INEIGHBOR_ALLGATHERV_DEVICE_COLLECTIVE=0 " ++algo_names="gentran_linear" ++ ++for algo_name in ${algo_names}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_INEIGHBOR_ALLGATHERV_INTRA_ALGORITHM=${algo_name} " ++ ++ coll_algo_tests+="neighb_allgatherv 4 mpiversion=3.0 ${env}${nl}" ++done ++ ++######### Add tests for Ineighbor_alltoall algorithms ########### ++ ++#disable device collectives for neighbor_alltoall to test MPIR algorithms ++testing_env="env=MPIR_CVAR_NEIGHBOR_ALLTOALL_DEVICE_COLLECTIVE=0 " ++ ++#test nb algorithms ++testing_env+="env=MPIR_CVAR_NEIGHBOR_ALLTOALL_INTRA_ALGORITHM=nb " ++testing_env+="env=MPIR_CVAR_INEIGHBOR_ALLTOALL_DEVICE_COLLECTIVE=0 " ++algo_names="gentran_linear" ++ ++for algo_name in ${algo_names}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_INEIGHBOR_ALLTOALL_INTRA_ALGORITHM=${algo_name} " ++ ++ coll_algo_tests+="neighb_alltoall 4 mpiversion=3.0 ${env}${nl}" ++done ++ ++######### Add tests for Ineighbor_alltoallv algorithms ########### ++ ++#disable device collectives for neighbor_alltoallv to test MPIR algorithms ++testing_env="env=MPIR_CVAR_NEIGHBOR_ALLTOALLV_DEVICE_COLLECTIVE=0 " ++ ++#test nb algorithms ++testing_env+="env=MPIR_CVAR_NEIGHBOR_ALLTOALLV_INTRA_ALGORITHM=nb " ++testing_env+="env=MPIR_CVAR_INEIGHBOR_ALLTOALLV_DEVICE_COLLECTIVE=0 " ++algo_names="gentran_linear" ++ ++for algo_name in ${algo_names}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_INEIGHBOR_ALLTOALLV_INTRA_ALGORITHM=${algo_name} " ++ ++ coll_algo_tests+="neighb_alltoallv 4 mpiversion=3.0 ${env}${nl}" ++done ++ ++########## Add tests for intra-node bcast algorithms ############ ++ ++#use release gather based intra-node bcast ++testing_env="env=MPIR_CVAR_BCAST_POSIX_INTRA_ALGORITHM=release_gather " ++ ++testing_env+="env=MPIR_CVAR_COLL_SHM_LIMIT_PER_NODE=131072 " #128MB ++buffer_sizes="16384 32768" ++num_cells="2 4" ++tree_types="knomial_1 knomial_2" ++kvalues="8 64" ++ ++for buf_size in ${buffer_sizes}; do ++ for num_cell in ${num_cells}; do ++ for kval in ${kvalues}; do ++ for tree_type in ${tree_types}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_BCAST_INTRANODE_BUFFER_TOTAL_SIZE=${buf_size} " ++ env+="env=MPIR_CVAR_BCAST_INTRANODE_NUM_CELLS=${num_cell} " ++ env+="env=MPIR_CVAR_BCAST_INTRANODE_TREE_KVAL=${kval} " ++ env+="env=MPIR_CVAR_BCAST_INTRANODE_TREE_TYPE=${tree_type} " ++ ++ coll_algo_tests+="bcasttest 10 ${env}${nl}" ++ coll_algo_tests+="bcastzerotype 5 ${env}${nl}" ++ done ++ done ++ done ++done ++ ++########## Add tests for intra-node reduce algorithms ############ ++ ++#use release gather based intra-node reduce ++testing_env="env=MPIR_CVAR_REDUCE_POSIX_INTRA_ALGORITHM=release_gather " ++ ++testing_env+="env=MPIR_CVAR_COLL_SHM_LIMIT_PER_NODE=131072 " #128MB ++buffer_sizes="16384 32768" ++num_cells="2 4" ++tree_types="knomial_1 knomial_2" ++kvalues="4 8" ++ ++for buf_size in ${buffer_sizes}; do ++ for num_cell in ${num_cells}; do ++ for kval in ${kvalues}; do ++ for tree_type in ${tree_types}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE=${buf_size} " ++ env+="env=MPIR_CVAR_REDUCE_INTRANODE_NUM_CELLS=${num_cell} " ++ env+="env=MPIR_CVAR_REDUCE_INTRANODE_TREE_KVAL=${kval} " ++ env+="env=MPIR_CVAR_REDUCE_INTRANODE_TREE_TYPE=${tree_type} " ++ ++ coll_algo_tests+="reduce 5 ${env}${nl}" ++ coll_algo_tests+="reduce 10 ${env}${nl}" ++ coll_algo_tests+="red3 10 ${env}${nl}" ++ coll_algo_tests+="red4 10 ${env}${nl}" ++ done ++ done ++ done ++done ++ ++########## Add tests for intra-node allreduce algorithms ############ ++ ++#use release gather based intra-node allreduce ++testing_env="env=MPIR_CVAR_ALLREDUCE_POSIX_INTRA_ALGORITHM=release_gather " ++ ++testing_env+="env=MPIR_CVAR_COLL_SHM_LIMIT_PER_NODE=131072 " #128MB ++buffer_sizes="16384" ++kvalues="4 8" ++ ++for buf_size in ${buffer_sizes}; do ++ for kval in ${kvalues}; do ++ #set the environment ++ env="${testing_env} env=MPIR_CVAR_REDUCE_INTRANODE_BUFFER_TOTAL_SIZE=${buf_size} " ++ env+="env=MPIR_CVAR_REDUCE_INTRANODE_TREE_KVAL=${kval} " ++ ++ coll_algo_tests+="allred 4 ${env}${nl}" ++ coll_algo_tests+="allred2 4 ${env}${nl}" ++ done ++done ++ + export coll_algo_tests +deleted file mode 100644 +--- a/test/mpi/coll/testlist.def ++++ /dev/null +@@ -1,168 +0,0 @@ +-allred 4 +-allred 7 +-allred 4 arg=100 +-allredmany 4 +-allred2 4 +-allred3 10 +-allred4 4 +-allred5 5 +-allred5 10 +-allred6 4 +-allred6 7 +-reduce 5 +-reduce 10 +-reduce_local 2 mpiversion=2.2 +-op_commutative 2 +-red3 10 +-red4 10 +-alltoall1 8 +-alltoallv 10 +-alltoallv0 10 +-alltoallw1 10 +-alltoallw2 10 +-alltoallw_zeros 1 +-alltoallw_zeros 2 +-alltoallw_zeros 5 +-alltoallw_zeros 8 +-allgather2 10 +-allgather3 10 +-allgatherv2 10 +-allgatherv3 10 +-allgatherv4 4 timeLimit=600 +-allgather_struct 10 +-bcasttest 4 +-bcasttest 8 +-bcasttest 10 +-bcastzerotype 1 +-bcastzerotype 4 +-bcastzerotype 5 +-bcastzerotype 10 +-coll2 5 +-coll3 5 +-coll4 4 +-coll5 4 +-coll6 5 +-coll7 1 +-coll7 2 +-coll7 5 +-coll8 4 +-coll9 4 +-coll10 4 +-coll11 4 +-coll12 4 +-coll13 4 +-longuser 4 +-redscat 4 +-redscat 6 +-redscat2 4 +-redscat2 5 +-redscat2 10 +-redscat3 8 +-redscatinter 8 +-red_scat_block 4 mpiversion=2.2 +-red_scat_block 5 mpiversion=2.2 +-red_scat_block 8 mpiversion=2.2 +-red_scat_block2 4 mpiversion=2.2 +-red_scat_block2 5 mpiversion=2.2 +-red_scat_block2 10 mpiversion=2.2 +-redscatblk3 8 mpiversion=2.2 +-redscatblk3 10 mpiversion=2.2 +-redscatbkinter 8 mpiversion=2.2 +-redscatbkinter 10 mpiversion=2.2 +-scantst 4 +-exscan 10 +-exscan2 5 +-gather 4 +-gather2 4 +-@largetest@gather_big 8 +-scattern 4 +-scatter2 4 +-scatter3 4 +-scatterv 4 +-icbcast 4 +-icbcast 10 +-icallreduce 5 +-icallreduce 7 +-icreduce 5 +-icreduce 7 +-icscatter 5 +-icscatter 7 +-icgather 5 +-icgather 7 +-icallgather 5 +-icallgather 7 +-icbarrier 5 +-icbarrier 7 +-icallgatherv 5 +-icallgatherv 7 +-icgatherv 5 +-icgatherv 7 +-icscatterv 5 +-icscatterv 7 +-icalltoall 5 +-icalltoall 7 +-icalltoallv 5 +-icalltoallv 7 +-icalltoallw 5 +-icalltoallw 7 +-# the opxxx tests look at optional types, and are included for MPICH testing. +-# MPI implementations may instead signal errors for these types +-opland 4 +-oplor 4 +-oplxor 4 +-oplxor 5 +-opband 4 +-opbor 4 +-opbxor 4 +-opbxor 5 +-opprod 5 +-opprod 6 +-opsum 4 +-opmin 4 +-opminloc 4 +-opmax 5 +-opmaxloc 5 +-uoplong 4 +-uoplong 11 +-uoplong 16 +-nonblocking 4 mpiversion=3.0 +-nonblocking 5 mpiversion=3.0 +-nonblocking 10 mpiversion=3.0 +-nonblocking2 1 mpiversion=3.0 +-nonblocking2 4 mpiversion=3.0 +-nonblocking2 5 mpiversion=3.0 +-nonblocking2 10 timeLimit=420 mpiversion=3.0 +-nonblocking3 1 mpiversion=3.0 +-nonblocking3 4 mpiversion=3.0 +-nonblocking3 5 mpiversion=3.0 +-nonblocking3 10 timeLimit=600 mpiversion=3.0 +-iallred 2 mpiversion=3.0 +-# ibarrier will hang forever if it fails, but will complete quickly if it +-# succeeds +-ibarrier 2 mpiversion=3.0 timeLimit=30 +- +-# run some of the tests, relinked with the nbc_pmpi_adaptor.o file +-nballtoall1 8 mpiversion=3.0 +-nbcoll2 5 mpiversion=3.0 +-nbredscat 4 mpiversion=3.0 +-nbredscat 8 mpiversion=3.0 +-nbredscat3 8 mpiversion=3.0 +-nbredscatinter 8 mpiversion=3.0 +- +-nbicbcast 8 mpiversion=3.0 +-nbicallreduce 8 mpiversion=3.0 +-nbicreduce 8 mpiversion=3.0 +-nbicscatter 8 mpiversion=3.0 +-nbicgather 8 mpiversion=3.0 +-nbicallgather 8 mpiversion=3.0 +-nbicbarrier 8 mpiversion=3.0 +-nbicallgatherv 8 mpiversion=3.0 +-nbicgatherv 8 mpiversion=3.0 +-nbicscatterv 8 mpiversion=3.0 +-nbicalltoall 8 mpiversion=3.0 +-nbicalltoallv 8 mpiversion=3.0 +-nbicalltoallw 8 mpiversion=3.0 +- +-neighb_coll 4 mpiversion=3.0 +- +-@coll_algo_tests@ +new file mode 100644 +--- /dev/null ++++ b/test/mpi/coll/testlist.in +@@ -0,0 +1,172 @@ ++allred 4 ++allred 7 ++allred 4 arg=100 ++allredmany 4 ++allred2 4 ++allred3 10 ++allred4 4 ++allred5 5 ++allred5 10 ++allred6 4 ++allred6 7 ++reduce 5 ++reduce 10 ++reduce_local 2 mpiversion=2.2 ++op_commutative 2 ++red3 10 ++red4 10 ++alltoall1 8 ++alltoallv 10 ++alltoallv0 10 ++alltoallw1 10 ++alltoallw2 10 ++alltoallw_zeros 1 ++alltoallw_zeros 2 ++alltoallw_zeros 5 ++alltoallw_zeros 8 ++allgather2 10 ++allgather3 10 ++allgatherv2 10 ++allgatherv3 10 ++allgatherv4 4 timeLimit=600 ++allgather_struct 10 ++bcasttest 4 ++bcasttest 8 ++bcasttest 10 ++bcastzerotype 1 ++bcastzerotype 4 ++bcastzerotype 5 ++bcastzerotype 10 ++coll2 5 ++coll3 5 ++coll4 4 ++coll5 4 ++coll6 5 ++coll7 1 ++coll7 2 ++coll7 5 ++coll8 4 ++coll9 4 ++coll10 4 ++coll11 4 ++coll12 4 ++coll13 4 ++longuser 4 ++redscat 4 ++redscat 6 ++redscat2 4 ++redscat2 5 ++redscat2 10 ++redscat3 8 ++redscatinter 8 ++red_scat_block 4 mpiversion=2.2 ++red_scat_block 5 mpiversion=2.2 ++red_scat_block 8 mpiversion=2.2 ++red_scat_block2 4 mpiversion=2.2 ++red_scat_block2 5 mpiversion=2.2 ++red_scat_block2 10 mpiversion=2.2 ++redscatblk3 8 mpiversion=2.2 ++redscatblk3 10 mpiversion=2.2 ++redscatbkinter 8 mpiversion=2.2 ++redscatbkinter 10 mpiversion=2.2 ++scantst 4 ++exscan 10 ++exscan2 5 ++gather 4 ++gather2 4 ++@largetest@gather_big 8 ++scattern 4 ++scatter2 4 ++scatter3 4 ++scatterv 4 ++icbcast 4 ++icbcast 10 ++icallreduce 5 ++icallreduce 7 ++icreduce 5 ++icreduce 7 ++icscatter 5 ++icscatter 7 ++icgather 5 ++icgather 7 ++icallgather 5 ++icallgather 7 ++icbarrier 5 ++icbarrier 7 ++icallgatherv 5 ++icallgatherv 7 ++icgatherv 5 ++icgatherv 7 ++icscatterv 5 ++icscatterv 7 ++icalltoall 5 ++icalltoall 7 ++icalltoallv 5 ++icalltoallv 7 ++icalltoallw 5 ++icalltoallw 7 ++# the opxxx tests look at optional types, and are included for MPICH testing. ++# MPI implementations may instead signal errors for these types ++opland 4 ++oplor 4 ++oplxor 4 ++oplxor 5 ++opband 4 ++opbor 4 ++opbxor 4 ++opbxor 5 ++opprod 5 ++opprod 6 ++opsum 4 ++opmin 4 ++opminloc 4 ++opmax 5 ++opmaxloc 5 ++uoplong 4 ++uoplong 11 ++uoplong 16 ++nonblocking 4 mpiversion=3.0 ++nonblocking 5 mpiversion=3.0 ++nonblocking 10 mpiversion=3.0 ++nonblocking2 1 mpiversion=3.0 ++nonblocking2 4 mpiversion=3.0 ++nonblocking2 5 mpiversion=3.0 ++nonblocking2 10 timeLimit=420 mpiversion=3.0 ++nonblocking3 1 mpiversion=3.0 ++nonblocking3 4 mpiversion=3.0 ++nonblocking3 5 mpiversion=3.0 ++nonblocking3 10 timeLimit=600 mpiversion=3.0 ++iallred 2 mpiversion=3.0 ++# ibarrier will hang forever if it fails, but will complete quickly if it ++# succeeds ++ibarrier 2 mpiversion=3.0 timeLimit=30 ++ ++# run some of the tests, relinked with the nbc_pmpi_adaptor.o file ++nballtoall1 8 mpiversion=3.0 ++nbcoll2 5 mpiversion=3.0 ++nbredscat 4 mpiversion=3.0 ++nbredscat 8 mpiversion=3.0 ++nbredscat3 8 mpiversion=3.0 ++nbredscatinter 8 mpiversion=3.0 ++ ++nbicbcast 8 mpiversion=3.0 ++nbicallreduce 8 mpiversion=3.0 ++nbicreduce 8 mpiversion=3.0 ++nbicscatter 8 mpiversion=3.0 ++nbicgather 8 mpiversion=3.0 ++nbicallgather 8 mpiversion=3.0 ++nbicbarrier 8 mpiversion=3.0 ++nbicallgatherv 8 mpiversion=3.0 ++nbicgatherv 8 mpiversion=3.0 ++nbicscatterv 8 mpiversion=3.0 ++nbicalltoall 8 mpiversion=3.0 ++nbicalltoallv 8 mpiversion=3.0 ++nbicalltoallw 8 mpiversion=3.0 ++ ++neighb_allgather 4 mpiversion=3.0 ++neighb_allgatherv 4 mpiversion=3.0 ++neighb_alltoall 4 mpiversion=3.0 ++neighb_alltoallv 4 mpiversion=3.0 ++neighb_alltoallw 4 mpiversion=3.0 ++ ++@coll_algo_tests@ +--- a/test/mpi/configure.ac ++++ b/test/mpi/configure.ac +@@ -251,6 +251,19 @@ AC_ARG_ENABLE(collalgo-tests, + [Run extended collective algorithm tests])],, + [enable_collalgo_tests=no]) + ++# DTPools test generation ++AC_ARG_WITH(dtpools-datatypes, ++ [AC_HELP_STRING([--with-dtpools-datatypes=typelist], ++ [Comma separated list of MPI datatypes to use for DTPools tests ++ generation. Typelist can be of the form: 'MPI_INT,MPI_DOUBLE,...', ++ for single element types, 'MPI_INT:4+MPI_DOUBLE:8,...', for multiple ++ element types, or a combination of both.])],,[with_dtpools_datatypes=MPI_INT,MPI_INT:4+MPI_DOUBLE:8]) ++ ++# parse args for typegen.sh script ++dtp_args="--with-dtpools-datatypes=${with_dtpools_datatypes}" ++ ++AC_CONFIG_COMMANDS([gentests],[$srcdir/maint/gentests_dtp.sh $dtp_args],[dtp_args="$dtp_args"]) ++ + AC_ARG_WITH(mpi, + [AC_HELP_STRING([--with-mpi=dir], + [Use the selected MPI; compilation scripts for mpicc, +@@ -617,7 +630,8 @@ export CC + AC_CONFIG_SUBDIRS([dtpools]) + + # Running C compiler tests +-PAC_PROG_CC ++AC_PROG_CC ++AC_PROG_CC_C99 + AM_PROG_CC_C_O + + # Note that some versions of autoconf will insist that the compiler +@@ -679,18 +693,8 @@ AC_C_RESTRICT + AC_PROG_RANLIB + AM_PROG_AR + +-# Enable STRICT CFLAGS +-AC_ARG_ENABLE(stricttest, +-AC_HELP_STRING([--enable-stricttest], [Turn on strict GCC compilation])) +-dnl Initialize enable_strict_done so PAC_CC_STRICT won't exit right away +-dnl When it is configuring from within MPICH, because enable_strict_done=yes +-dnl is set in the environment by MPICH. +-enable_strict_done=no +-PAC_CC_STRICT($enable_stricttest) +-# -Wfloat-equal isn't meaningful in testsuite, +-# remove it if it is in strict flags. +-pac_cc_strict_flags="`echo $pac_cc_strict_flags | sed -e 's|-Wfloat-equal||g'`" +-CFLAGS="$CFLAGS $pac_cc_strict_flags" ++# Check for --enable-strict ++PAC_ARG_STRICT + + # General headers + AC_HEADER_STDC +@@ -720,7 +724,9 @@ AC_SUBST(largetest) + + # Extended collectives test + if test "$enable_collalgo_tests" = "yes" ; then +- source $srcdir/coll/test_coll_algos.sh ++ AC_MSG_NOTICE([running $srcdir/coll/test_coll_algos.sh]) ++ . $srcdir/coll/test_coll_algos.sh ++ test $? != 0 && AC_MSG_ERROR([$srcdir/coll/test_coll_algos.sh failed.]) + else + coll_algo_tests="" + fi +@@ -747,23 +753,39 @@ if test "$spawndir" = "spawn" ; then + AC_SUBST(nslib) + fi + ++PAC_ARG_THREAD_PACKAGE ++ ++THREAD_PACKAGE_NAME=THREAD_PACKAGE_INVALID + threadlib="" +-# Headers needed for threads tests +-if test "$threadsdir" = "threads" ; then +- # Check for needed threads headers and needed and optional routines +- AC_CHECK_HEADERS(pthread.h) +- +- # we shouldn't actually need to do this, but we are dodging the chicken/egg +- # problem b/c we don't have a working mpicc yet and we temporarily discarded +- # the MPICH-set LIBS (probably the wrong thing to do) +- AC_SEARCH_LIBS([pthread_create],[pthread],[threadlib="-lpthread"]) +- AC_SEARCH_LIBS([pthread_barrier_init],[pthread]) +- +- AC_CHECK_FUNCS(pthread_create pthread_yield pthread_barrier_init pthread_barrier_wait) +- if test "$FROM_MPICH" != yes ; then +- AC_CHECK_FUNCS(MPI_Init_thread) +- fi +-fi ++case $with_thread_package in ++ yes|posix|pthreads|solaris|uti) ++ AC_CHECK_HEADERS(pthread.h) ++ AC_CHECK_LIB([pthread],[pthread_key_create],[threadlib="-lpthread"]) ++ THREAD_PACKAGE_NAME=THREAD_PACKAGE_POSIX ++ ;; ++ win|windows) ++ with_thread_package=win ++ THREAD_PACKAGE_NAME=THREAD_PACKAGE_WIN ++ AC_MSG_ERROR([The 'win' thread package is not supported via autoconf builds at this time.]) ++ ;; ++ abt|argobots) ++ with_thread_package=argobots ++ PAC_CHECK_HEADER_LIB_FATAL([argobots], [abt.h], [abt], [ABT_key_create]) ++ threadlib="-labt" ++ THREAD_PACKAGE_NAME=THREAD_PACKAGE_ARGOBOTS ++ ;; ++ no|none) ++ with_thread_package=none ++ THREAD_PACKAGE_NAME=THREAD_PACKAGE_NONE ++ ;; ++ *) ++ AC_MSG_ERROR([The specified thread package, $with_thread_package, is not supported.]) ++ ;; ++esac ++ ++# Define and export the selected thread library so that other packages ++# know what's used ++AC_DEFINE_UNQUOTED([THREAD_PACKAGE_NAME],[$THREAD_PACKAGE_NAME],[set to the name of the thread package]) + AC_SUBST(threadlib) + + # Check for h_addr or h_addr_list. This is needed for the singjoin test +@@ -1662,7 +1684,6 @@ AC_OUTPUT(maint/testmerge \ + f08/misc/Makefile \ + f08/profile/Makefile \ + cxx/Makefile \ +- cxx/util/Makefile \ + cxx/attr/Makefile \ + cxx/attr/testlist \ + cxx/pt2pt/Makefile \ +--- a/test/mpi/cxx/Makefile.am ++++ b/test/mpi/cxx/Makefile.am +@@ -9,6 +9,6 @@ include $(top_srcdir)/Makefile_cxx.mtest + + EXTRA_DIST = testlist.in + +-static_subdirs = util attr pt2pt init info comm coll datatype errhan topo ++static_subdirs = attr pt2pt init info comm coll datatype errhan topo + SUBDIRS = $(static_subdirs) $(iodir) $(rmadir) $(spawndir) + DIST_SUBDIRS = $(static_subdirs) io rma spawn +--- a/test/mpi/cxx/attr/Makefile.am ++++ b/test/mpi/cxx/attr/Makefile.am +@@ -9,7 +9,7 @@ include $(top_srcdir)/Makefile_cxx.mtest + + EXTRA_DIST = testlist.in + +-noinst_PROGRAMS = attrtx attricx baseattrcommx fkeyvalcommx ++noinst_PROGRAMS = attrtx attricx baseattrcommx fkeyvalcommx fkeyvaltypex + ## the following entries were disabled in the simplemake version: + ##noinst_PROGRAMS += attrerrx attrerrcommx attrerrtypex attrorderx attrordercommx \ + ## attrordertypex attrorderwinx baseattr2x baseattrwinx +@@ -27,5 +27,4 @@ attricx_SOURCES = attricx.cxx + baseattrcommx_SOURCES = baseattrcommx.cxx + #baseattrwinx_SOURCES = baseattrwinx.cxx + fkeyvalcommx_SOURCES = fkeyvalcommx.cxx +- +-include Makefile.dtp ++fkeyvaltypex_SOURCES = fkeyvaltypex.cxx +--- a/test/mpi/cxx/attr/fkeyvaltypex.cxx ++++ b/test/mpi/cxx/attr/fkeyvaltypex.cxx +@@ -12,7 +12,7 @@ + // Not all C++ compilers have iostream instead of iostream.h + #include + #ifdef HAVE_NAMESPACE_STD +-// Those that do often need the std namespace; otherwise, a bare "cout" ++// Those that do often need the std namespace; otherwise, a bare "cerr" + // is likely to fail to compile + using namespace std; + #endif +@@ -30,47 +30,6 @@ static char MTestDescrip[] = "Test freeing keyvals while still attached to \ + a datatype, then make sure that the keyval delete and copy code are still \ + executed"; + +-typedef struct { +- string type_name; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; + + /* Copy increments the attribute value */ + int copy_fn(const MPI::Datatype & oldtype, int keyval, void *extra_state, +@@ -99,57 +58,40 @@ int main(int argc, char *argv[]) + int attrval; + int i, j, key[32], keyval, saveKeyval; + int obj_idx; +- int count; ++ int seed, testsize; ++ MPI_Aint count, maxbufsize; + MPI::Datatype type, duptype; +- MPI::Datatype basic_type; +- DTP_t dtp; +- char dtypename[MPI_MAX_OBJECT_NAME]; ++ char *basic_type; ++ DTP_pool_s dtp; ++ DTP_obj_s obj; + int tnlen; + MPI_Comm comm = MPI_COMM_WORLD; + + MTest_Init(); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- cout << "Usage: " << argv[0] << "-type=[TYPE] -count=[COUNT]\n"; +- return 0; +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].type_name.c_str(), "MPI_DATATYPE_NULL") && +- strcmp(argv[i]+strlen("-type="), typelist[j].type_name.c_str())) { +- j++; +- } +- +- if (strcmp(typelist[j].type_name.c_str(), "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- cout << "Error: datatype not recognized\n"; +- return 0; +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i]+strlen("-count=")); +- } +- } +- } ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: struct types are currently not supported for C++ */ ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- err = DTP_pool_create(basic_type, count, &dtp); ++ err = DTP_pool_create(basic_type, count, seed, &dtp); + if (err != DTP_SUCCESS) { +- basic_type.Get_name(dtypename, tnlen); +- cout << "Error while creating pool (" << dtypename << "," << count << ")\n"; ++ cerr << "Error while creating pool (" << basic_type << "," << count << ")\n"; + } + +- for (obj_idx = 0; obj_idx < dtp->DTP_num_objs; obj_idx++) { +- err = DTP_obj_create(dtp, obj_idx, 0, 0, 0); ++ MTestArgListDestroy(head); ++ ++ for (obj_idx = 0; obj_idx < testsize; obj_idx++) { ++ err = DTP_obj_create(dtp, &obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- type = dtp->DTP_obj_array[obj_idx].DTP_obj_type; ++ type = obj.DTP_datatype; + keyval = MPI::Datatype::Create_keyval(copy_fn, delete_fn, (void *) 0); + saveKeyval = keyval; /* in case we need to free explicitly */ + attrval = 1; +@@ -168,30 +110,31 @@ int main(int argc, char *argv[]) + + if (attrval != 1) { + errs++; +- type.Get_name(dtypename, tnlen); +- cout << "attrval is " << attrval << ", should be 1, before dup in type " << dtypename << +- "\n"; ++ cerr << "attrval is " << attrval << ", should be 1, before dup in type " << obj.DTP_description ++ << "\n"; + } + duptype = type.Dup(); + /* Check that the attribute was copied */ + if (attrval != 2) { + errs++; +- type.Get_name(dtypename, tnlen); +- cout << "Attribute not incremented when type dup'ed (" << dtypename << ")\n"; ++ cerr << "Attribute not incremented when type dup'ed (" << obj.DTP_description << ")\n"; + } + duptype.Free(); + if (attrval != 1) { + errs++; +- type.Get_name(dtypename, tnlen); +- cout << "Attribute not decremented when duptype " << dtypename << " freed\n"; ++ cerr << "Attribute not decremented when duptype " << obj.DTP_description << " freed\n"; + } + /* Check that the attribute was freed in the duptype */ + +- DTP_obj_free(dtp, obj_idx); +- if (attrval != 0) { +- errs++; +- type.Get_name(dtypename, tnlen); +- cout << "Attribute not decremented when type " << dtypename << "reed\n"; ++ if (obj.DTP_datatype != dtp.DTP_base_type) { ++ DTP_obj_free(obj); ++ if (attrval != 0) { ++ errs++; ++ cerr << "Attribute not decremented when type " << obj.DTP_description << "reed\n"; ++ } ++ } else { ++ MPI_Type_delete_attr(type, saveKeyval); ++ DTP_obj_free(obj); + } + + /* Free those other keyvals */ +deleted file mode 100644 +--- a/test/mpi/cxx/attr/testlist.def ++++ /dev/null +@@ -1,4 +0,0 @@ +-attrtx 2 +-attricx 4 +-baseattrcommx 1 +-fkeyvalcommx 1 +new file mode 100644 +--- /dev/null ++++ b/test/mpi/cxx/attr/testlist.in +@@ -0,0 +1,4 @@ ++attrtx 2 ++attricx 4 ++baseattrcommx 1 ++fkeyvalcommx 1 +--- a/test/mpi/cxx/datatype/Makefile.am ++++ b/test/mpi/cxx/datatype/Makefile.am +@@ -9,10 +9,9 @@ include $(top_srcdir)/Makefile_cxx.mtest + + EXTRA_DIST = testlist.in + +-noinst_PROGRAMS = typecntsx typenamex typemiscx ++noinst_PROGRAMS = typecntsx typenamex typemiscx packsizex + + typecntsx_SOURCES = typecntsx.cxx + typenamex_SOURCES = typenamex.cxx + typemiscx_SOURCES = typemiscx.cxx +- +-include Makefile.dtp ++packsizex_SOURCES = packsizex.cxx +--- a/test/mpi/cxx/datatype/packsizex.cxx ++++ b/test/mpi/cxx/datatype/packsizex.cxx +@@ -10,7 +10,7 @@ + // Not all C++ compilers have iostream instead of iostream.h + #include + #ifdef HAVE_NAMESPACE_STD +-// Those that do often need the std namespace; otherwise, a bare "cout" ++// Those that do often need the std namespace; otherwise, a bare "cerr" + // is likely to fail to compile + using namespace std; + #endif +@@ -22,119 +22,70 @@ extern "C" { + #include "dtpools.h" + } + #include +- +-typedef struct { +- string type_name; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- + int main(int argc, char *argv[]) + { + int err, errs = 0; + int i, j; +- int count; ++ MPI_Aint count, maxbufsize; + MPI::Datatype type; +- MPI::Datatype basic_type; ++ char *basic_type; + MPI::Intracomm comm; +- DTP_t mstype, mrtype; +- char dtypename[MPI_MAX_OBJECT_NAME]; ++ DTP_pool_s dtp; ++ DTP_obj_s msobj, mrobj; + int size1, size2, tnlen; ++ int seed, testsize; + + MTest_Init(); + + comm = MPI::COMM_WORLD; + +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- cout << "Usage: " << argv[0] << "-type=[TYPE] -count=[COUNT]\n"; +- return 0; +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].type_name.c_str(), "MPI_DATATYPE_NULL") && +- strcmp(argv[i]+strlen("-type="), typelist[j].type_name.c_str())) { +- j++; +- } +- +- if (strcmp(typelist[j].type_name.c_str(), "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- cout << "Error: datatype not recognized\n"; +- return 0; +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i]+strlen("-count=")); +- } +- } +- } ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: struct types are currently not supported for C++ */ ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- err = DTP_pool_create(basic_type, count, &mstype); ++ err = DTP_pool_create(basic_type, count, seed, &dtp); + if (err != DTP_SUCCESS) { +- basic_type.Get_name(dtypename, tnlen); +- cout << "Error while creating mstype pool (" << dtypename << ",1)\n"; ++ cerr << "Error while creating dtp pool (" << basic_type << ",1)\n"; + } + +- err = DTP_pool_create(basic_type, count, &mrtype); +- if (err != DTP_SUCCESS) { +- basic_type.Get_name(dtypename, tnlen); +- cout << "Error while creating mrtype pool (" << dtypename << ",1)\n"; +- } ++ MTestArgListDestroy(head); + +- for (i = 0; i < mstype->DTP_num_objs; i++) { +- err = DTP_obj_create(mstype, i, 0, 1, count); ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &msobj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- for (j = 0; j < mrtype->DTP_num_objs; j++) { +- err = DTP_obj_create(mrtype, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } ++ err += DTP_obj_create(dtp, &mrobj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ type = msobj.DTP_datatype; ++ ++ // Testing the pack size is tricky, since this is the ++ // size that is stored when packed with type.Pack, and ++ // is not easily defined. We look for consistency ++ size1 = type.Pack_size(1, comm); ++ size2 = type.Pack_size(2, comm); ++ if (size1 <= 0 || size2 <= 0) { ++ errs++; ++ cerr << "Pack size of datatype " << msobj.DTP_description << " is not positive\n"; ++ } ++ if (size1 >= size2) { ++ errs++; ++ cerr << "Pack size of 2 of " << msobj.DTP_description << ++ " is smaller or the same as the pack size of 1 instance\n"; ++ } + +- type = mstype->DTP_obj_array[i].DTP_obj_type; ++ if (mrobj.DTP_datatype != msobj.DTP_datatype) { ++ type = mrobj.DTP_datatype; + + // Testing the pack size is tricky, since this is the + // size that is stored when packed with type.Pack, and +@@ -143,43 +94,19 @@ int main(int argc, char *argv[]) + size2 = type.Pack_size(2, comm); + if (size1 <= 0 || size2 <= 0) { + errs++; +- type.Get_name(dtypename, tnlen); +- cout << "Pack size of datatype " << dtypename << " is not positive\n"; ++ cerr << "Pack size of datatype " << mrobj.DTP_description << " is not positive\n"; + } + if (size1 >= size2) { + errs++; +- type.Get_name(dtypename, tnlen); +- cout << "Pack size of 2 of " << dtypename << ++ cerr << "Pack size of 2 of " << mrobj.DTP_description << + " is smaller or the same as the pack size of 1 instance\n"; + } +- +- if (mrtype->DTP_obj_array[j].DTP_obj_type != mstype->DTP_obj_array[i].DTP_obj_type) { +- type = mrtype->DTP_obj_array[j].DTP_obj_type; +- +- // Testing the pack size is tricky, since this is the +- // size that is stored when packed with type.Pack, and +- // is not easily defined. We look for consistency +- size1 = type.Pack_size(1, comm); +- size2 = type.Pack_size(2, comm); +- if (size1 <= 0 || size2 <= 0) { +- errs++; +- type.Get_name(dtypename, tnlen); +- cout << "Pack size of datatype " << dtypename << " is not positive\n"; +- } +- if (size1 >= size2) { +- errs++; +- type.Get_name(dtypename, tnlen); +- cout << "Pack size of 2 of " << dtypename << +- " is smaller or the same as the pack size of 1 instance\n"; +- } +- } +- DTP_obj_free(mrtype, j); + } +- DTP_obj_free(mstype, i); ++ DTP_obj_free(mrobj); ++ DTP_obj_free(msobj); + } + +- DTP_pool_free(mstype); +- DTP_pool_free(mrtype); ++ DTP_pool_free(dtp); + + MTest_Finalize(errs); + +deleted file mode 100644 +--- a/test/mpi/cxx/datatype/testlist.def ++++ /dev/null +@@ -1,3 +0,0 @@ +-typecntsx 1 +-typenamex 1 +-typemiscx 1 +new file mode 100644 +--- /dev/null ++++ b/test/mpi/cxx/datatype/testlist.in +@@ -0,0 +1,3 @@ ++typecntsx 1 ++typenamex 1 ++typemiscx 1 +--- a/test/mpi/cxx/datatype/typenamex.cxx ++++ b/test/mpi/cxx/datatype/typenamex.cxx +@@ -53,13 +53,13 @@ int main(int argc, char **argv) + MPI::DOUBLE.Get_name(name, namelen); + if (strncmp(name, "MPI_DOUBLE", MPI::MAX_OBJECT_NAME)) { + errs++; +- cout << "Expected MPI_DOUBLE but got :" << name << ":\n"; ++ cout << "Expected MPI_DOUBLE but got :" << name << ": namelen " << namelen << "\n"; + } + + MPI::INT.Get_name(name, namelen); + if (strncmp(name, "MPI_INT", MPI::MAX_OBJECT_NAME)) { + errs++; +- cout << "Expected MPI_INT but got :" << name << ":\n"; ++ cout << "Expected MPI_INT but got :" << name << ": namelen " << namelen << "\n"; + } + + /* Now we try them ALL */ +@@ -70,9 +70,13 @@ int main(int argc, char **argv) + continue; + name[0] = 0; + mpi_names[i].dtype.Get_name(name, namelen); +- if (strncmp(name, mpi_names[i].name, namelen)) { ++ if (strncmp(name, mpi_names[i].name, MPI::MAX_OBJECT_NAME) && ++ /* LONG_LONG is a synonym of LONG_LONG_INT, thus LONG_LONG_INT is also a vaild name */ ++ (mpi_names[i].dtype != MPI::LONG_LONG || ++ strncmp(name, "MPI_LONG_LONG_INT", MPI::MAX_OBJECT_NAME))) { + errs++; +- cout << "Expected " << mpi_names[i].name << " but got " << name << "\n"; ++ cout << "Expected " << mpi_names[i].name << " but got :" << name << ": namelen " << ++ namelen << "\n"; + } + } + +@@ -82,7 +86,7 @@ int main(int argc, char **argv) + MPI::INT.Get_name(name, namelen); + if (strncmp(name, "int", MPI::MAX_OBJECT_NAME)) { + errs++; +- cout << "Expected int but got :" << name << ":\n"; ++ cout << "Expected int but got :" << name << ": namelen " << namelen << "\n"; + } + + delete[]name; +@@ -116,7 +120,7 @@ void InitMPINames(void) + {MPI::FLOAT, "MPI_FLOAT"}, + {MPI::DOUBLE, "MPI_DOUBLE"}, + {MPI::LONG_DOUBLE, "MPI_LONG_DOUBLE"}, +- /* { MPI::LONG_LONG_INT, "MPI_LONG_LONG_INT" }, */ ++ {MPI::LONG_LONG_INT, "MPI_LONG_LONG_INT"}, + {MPI::LONG_LONG, "MPI_LONG_LONG"}, + {MPI::UNSIGNED_LONG_LONG, "MPI_UNSIGNED_LONG_LONG"}, + {MPI::PACKED, "MPI_PACKED"}, +--- a/test/mpi/cxx/io/testlist ++++ b/test/mpi/cxx/io/testlist +@@ -26,4 +26,4 @@ fileerrx 1 + fileinfox 3 + filemiscx 4 + shpositionx 4 +-seekavail 1 +\ No newline at end of file ++seekavail 1 +--- a/test/mpi/cxx/pt2pt/testlist ++++ b/test/mpi/cxx/pt2pt/testlist +@@ -1,2 +1,2 @@ + bsend1cxx 2 +-sendrecvx 2 +\ No newline at end of file ++sendrecvx 2 +deleted file mode 100644 +--- a/test/mpi/cxx/util/Makefile.am ++++ /dev/null +@@ -1,18 +0,0 @@ +-# -*- Mode: Makefile; -*- +-# vim: set ft=automake : +-# +-# (C) 2011 by Argonne National Laboratory. +-# See COPYRIGHT in top-level directory. +-# +- +-## the simplemake version also included the following bits that seem wrong: +-## -I../../../src/include -I${top_srcdir}/src/include +-AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include +- +-## list a dummy library that we don't actually build in order to cause automake +-## to emit a rule for building mtest.o from mtest.cxx +-EXTRA_LIBRARIES = libmtest_dummy.a +-libmtest_dummy_a_SOURCES = mtest.cxx +- +-all-local: mtest.$(OBJEXT) +- +deleted file mode 100644 +--- a/test/mpi/cxx/util/mtest.cxx ++++ /dev/null +@@ -1,571 +0,0 @@ +-/* -*- Mode: C++; c-basic-offset:4 ; -*- */ +-/* +- * +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include "mpitestconf.h" +-#ifdef HAVE_IOSTREAM +-// Not all C++ compilers have iostream instead of iostream.h +-#include +-#ifdef HAVE_NAMESPACE_STD +-// Those that do often need the std namespace; otherwise, a bare "cout" +-// is likely to fail to compile +-using namespace std; +-#endif +-#else +-#include +-#endif +-#include "mpitestcxx.h" +-#include +-#include +- +-static int dbgflag = 0; /* Flag used for debugging */ +-static int wrank = -1; /* World rank */ +-static int verbose = 0; /* Message level (0 is none) */ +- +-static void MTestRMACleanup(void); +- +-/* +- * Initialize and Finalize MTest +- */ +- +-/* +- Initialize MTest, initializing MPI if necessary. +- +- Environment Variables: +-+ MPITEST_DEBUG - If set (to any value), turns on debugging output +-- MPITEST_VERBOSE - If set to a numeric value, turns on that level of +- verbose output. +- +- */ +-void MTest_Init(void) +-{ +- bool flag; +- const char *envval = 0; +- int threadLevel, provided; +- +- threadLevel = MPI::THREAD_SINGLE; +- envval = getenv("MTEST_THREADLEVEL_DEFAULT"); +- if (envval && *envval) { +- if (strcmp(envval, "MULTIPLE") == 0 || strcmp(envval, "multiple") == 0) { +- threadLevel = MPI::THREAD_MULTIPLE; +- } else if (strcmp(envval, "SERIALIZED") == 0 || strcmp(envval, "serialized") == 0) { +- threadLevel = MPI::THREAD_SERIALIZED; +- } else if (strcmp(envval, "FUNNELED") == 0 || strcmp(envval, "funneled") == 0) { +- threadLevel = MPI::THREAD_FUNNELED; +- } else if (strcmp(envval, "SINGLE") == 0 || strcmp(envval, "single") == 0) { +- threadLevel = MPI::THREAD_SINGLE; +- } else { +- cerr << "Unrecognized thread level " << envval << "\n"; +- cerr.flush(); +- /* Use exit since MPI_Init/Init_thread has not been called. */ +- exit(1); +- } +- } +- +- flag = MPI::Is_initialized(); +- if (!flag) { +- provided = MPI::Init_thread(threadLevel); +- } +-#if defined(HAVE_MPI_IO) +- MPI::FILE_NULL.Set_errhandler(MPI::ERRORS_THROW_EXCEPTIONS); +-#endif +- +- /* Check for debugging control */ +- if (getenv("MPITEST_DEBUG")) { +- dbgflag = 1; +- wrank = MPI::COMM_WORLD.Get_rank(); +- } +- +- /* Check for verbose control */ +- envval = getenv("MPITEST_VERBOSE"); +- if (envval) { +- char *s; +- long val = strtol(envval, &s, 0); +- if (s == envval) { +- /* This is the error case for strtol */ +- cerr << "Warning: " << envval << " not valid for MPITEST_VERBOSE\n"; +- cerr.flush(); +- } else { +- if (val >= 0) { +- verbose = val; +- } else { +- cerr << "Warning: " << envval << " not valid for MPITEST_VERBOSE\n"; +- cerr.flush(); +- } +- } +- } +-} +- +-/* +- Finalize MTest. errs is the number of errors on the calling process; +- this routine will write the total number of errors over all of MPI_COMM_WORLD +- to the process with rank zero, or " No Errors". +- */ +-void MTest_Finalize(int errs) +-{ +- int rank, toterrs; +- +- rank = MPI::COMM_WORLD.Get_rank(); +- +- MPI::COMM_WORLD.Allreduce(&errs, &toterrs, 1, MPI::INT, MPI::SUM); +- if (rank == 0) { +- if (toterrs) { +- cout << " Found " << toterrs << " errors\n"; +- } else { +- cout << " No Errors\n"; +- } +- cout.flush(); +- } +- // Clean up any persistent objects that we allocated +- MTestRMACleanup(); +- +- MPI::Finalize(); +-} +- +-/* ----------------------------------------------------------------------- */ +- +-/* +- * Create communicators. Use separate routines for inter and intra +- * communicators (there is a routine to give both) +- * Note that the routines may return MPI::COMM_NULL, so code should test for +- * that return value as well. +- * +- */ +-static int interCommIdx = 0; +-static int intraCommIdx = 0; +-static const char *intraCommName = 0; +-static const char *interCommName = 0; +- +-/* +- * Get an intracommunicator with at least min_size members. If "allowSmaller" +- * is true, allow the communicator to be smaller than MPI::COMM_WORLD and +- * for this routine to return MPI::COMM_NULL for some values. Returns 0 if +- * no more communicators are available. +- */ +-int MTestGetIntracommGeneral(MPI::Intracomm & comm, int min_size, bool allowSmaller) +-{ +- int size, rank; +- bool done = false; +- bool isBasic = false; +- +- /* The while loop allows us to skip communicators that are too small. +- * MPI::COMM_NULL is always considered large enough */ +- while (!done) { +- switch (intraCommIdx) { +- case 0: +- comm = MPI::COMM_WORLD; +- isBasic = true; +- intraCommName = "MPI::COMM_WORLD"; +- break; +- case 1: +- /* dup of world */ +- comm = MPI::COMM_WORLD.Dup(); +- intraCommName = "Dup of MPI::COMM_WORLD"; +- break; +- case 2: +- /* reverse ranks */ +- size = MPI::COMM_WORLD.Get_size(); +- rank = MPI::COMM_WORLD.Get_rank(); +- comm = MPI::COMM_WORLD.Split(0, size - rank); +- intraCommName = "Rank reverse of MPI::COMM_WORLD"; +- break; +- case 3: +- /* subset of world, with reversed ranks */ +- size = MPI::COMM_WORLD.Get_size(); +- rank = MPI::COMM_WORLD.Get_rank(); +- comm = MPI::COMM_WORLD.Split((rank < size / 2), size - rank); +- intraCommName = "Rank reverse of half of MPI::COMM_WORLD"; +- break; +- case 4: +- comm = MPI::COMM_SELF; +- isBasic = true; +- intraCommName = "MPI::COMM_SELF"; +- break; +- +- /* These next cases are communicators that include some +- * but not all of the processes */ +- case 5: +- case 6: +- case 7: +- case 8: +- { +- int newsize; +- size = MPI::COMM_WORLD.Get_size(); +- newsize = size - (intraCommIdx - 4); +- +- if (allowSmaller && newsize >= min_size) { +- rank = MPI::COMM_WORLD.Get_rank(); +- comm = MPI::COMM_WORLD.Split(rank < newsize, rank); +- if (rank >= newsize) { +- comm.Free(); +- comm = MPI::COMM_NULL; +- } +- } else { +- /* Act like default */ +- comm = MPI::COMM_NULL; +- isBasic = true; +- intraCommName = "MPI::COMM_NULL"; +- intraCommIdx = -1; +- } +- } +- break; +- +- /* Other ideas: dup of self, cart comm, graph comm */ +- default: +- comm = MPI::COMM_NULL; +- isBasic = true; +- intraCommName = "MPI::COMM_NULL"; +- intraCommIdx = -1; +- break; +- } +- +- if (comm != MPI::COMM_NULL) { +- size = comm.Get_size(); +- if (size >= min_size) +- done = true; +- else { +- /* Try again */ +- if (!isBasic) +- comm.Free(); +- intraCommIdx++; +- } +- } else +- done = true; +- } +- +- intraCommIdx++; +- return intraCommIdx; +-} +- +-/* +- * Get an intracommunicator with at least min_size members. +- */ +-int MTestGetIntracomm(MPI::Intracomm & comm, int min_size) +-{ +- return MTestGetIntracommGeneral(comm, min_size, false); +-} +- +-/* Return the name of an intra communicator */ +-const char *MTestGetIntracommName(void) +-{ +- return intraCommName; +-} +- +-/* +- * Return an intercomm; set isLeftGroup to 1 if the calling process is +- * a member of the "left" group. +- */ +-int MTestGetIntercomm(MPI::Intercomm & comm, int &isLeftGroup, int min_size) +-{ +- int size, rank, remsize; +- bool done = false; +- MPI::Intracomm mcomm; +- int rleader; +- +- /* The while loop allows us to skip communicators that are too small. +- * MPI::COMM_NULL is always considered large enough. The size is +- * the sum of the sizes of the local and remote groups */ +- while (!done) { +- comm = MPI::COMM_NULL; +- isLeftGroup = 0; +- interCommName = "MPI_COMM_NULL"; +- +- switch (interCommIdx) { +- case 0: +- /* Split comm world in half */ +- rank = MPI::COMM_WORLD.Get_rank(); +- size = MPI::COMM_WORLD.Get_size(); +- if (size > 1) { +- mcomm = MPI::COMM_WORLD.Split((rank < size / 2), rank); +- if (rank == 0) { +- rleader = size / 2; +- } else if (rank == size / 2) { +- rleader = 0; +- } else { +- /* Remote leader is signficant only for the processes +- * designated local leaders */ +- rleader = -1; +- } +- isLeftGroup = rank < size / 2; +- comm = mcomm.Create_intercomm(0, MPI::COMM_WORLD, rleader, 12345); +- mcomm.Free(); +- interCommName = "Intercomm by splitting MPI::COMM_WORLD"; +- } else { +- comm = MPI::COMM_NULL; +- } +- break; +- case 1: +- /* Split comm world in to 1 and the rest */ +- rank = MPI::COMM_WORLD.Get_rank(); +- size = MPI::COMM_WORLD.Get_size(); +- if (size > 1) { +- mcomm = MPI::COMM_WORLD.Split(rank == 0, rank); +- if (rank == 0) { +- rleader = 1; +- } else if (rank == 1) { +- rleader = 0; +- } else { +- /* Remote leader is signficant only for the processes +- * designated local leaders */ +- rleader = -1; +- } +- isLeftGroup = rank == 0; +- comm = mcomm.Create_intercomm(0, MPI::COMM_WORLD, rleader, 12346); +- mcomm.Free(); +- interCommName = "Intercomm by splitting MPI::COMM_WORLD into 1, rest"; +- } else { +- comm = MPI::COMM_NULL; +- } +- break; +- +- case 2: +- /* Split comm world in to 2 and the rest */ +- rank = MPI::COMM_WORLD.Get_rank(); +- size = MPI::COMM_WORLD.Get_size(); +- if (size > 3) { +- mcomm = MPI::COMM_WORLD.Split(rank < 2, rank); +- if (rank == 0) { +- rleader = 2; +- } else if (rank == 2) { +- rleader = 0; +- } else { +- /* Remote leader is signficant only for the processes +- * designated local leaders */ +- rleader = -1; +- } +- isLeftGroup = rank < 2; +- comm = mcomm.Create_intercomm(0, MPI::COMM_WORLD, rleader, 12347); +- mcomm.Free(); +- interCommName = "Intercomm by splitting MPI::COMM_WORLD into 2, rest"; +- } else { +- comm = MPI::COMM_NULL; +- } +- break; +- +- default: +- comm = MPI::COMM_NULL; +- interCommName = "MPI::COMM_NULL"; +- interCommIdx = -1; +- break; +- } +- if (comm != MPI::COMM_NULL) { +- size = comm.Get_size(); +- remsize = comm.Get_remote_size(); +- if (size + remsize >= min_size) +- done = true; +- } else +- done = true; +- +- /* we are only done if all processes are done */ +- MPI::COMM_WORLD.Allreduce(MPI_IN_PLACE, &done, 1, MPI::BOOL, MPI::LAND); +- +- /* Advance the comm index whether we are done or not, otherwise we could +- * spin forever trying to allocate a too-small communicator over and +- * over again. */ +- interCommIdx++; +- +- if (!done && comm != MPI::COMM_NULL) { +- comm.Free(); +- } +- } +- +- return interCommIdx; +-} +- +-/* Return the name of an intercommunicator */ +-const char *MTestGetIntercommName(void) +-{ +- return interCommName; +-} +- +-/* Get a communicator of a given minimum size. Both intra and inter +- communicators are provided +- Because Comm is an abstract base class, you can only have references +- to a Comm.*/ +-int MTestGetComm(MPI::Comm ** comm, int min_size) +-{ +- int idx; +- static int getinter = 0; +- +- if (!getinter) { +- MPI::Intracomm rcomm; +- idx = MTestGetIntracomm(rcomm, min_size); +- if (idx == 0) { +- getinter = 1; +- } else { +- MPI::Intracomm * ncomm = new MPI::Intracomm(rcomm); +- *comm = ncomm; +- } +- } +- if (getinter) { +- MPI::Intercomm icomm; +- int isLeft; +- idx = MTestGetIntercomm(icomm, isLeft, min_size); +- if (idx == 0) { +- getinter = 0; +- } else { +- MPI::Intercomm * ncomm = new MPI::Intercomm(icomm); +- *comm = ncomm; +- } +- } +- +- return idx; +-} +- +-/* Free a communicator. It may be called with a predefined communicator +- or MPI_COMM_NULL */ +-void MTestFreeComm(MPI::Comm & comm) +-{ +- if (comm != MPI::COMM_WORLD && comm != MPI::COMM_SELF && comm != MPI::COMM_NULL) { +- comm.Free(); +- } +-} +- +-/* ------------------------------------------------------------------------ */ +-void MTestPrintError(int errcode) +-{ +- int errclass, slen; +- char string[MPI_MAX_ERROR_STRING]; +- +- errclass = MPI::Get_error_class(errcode); +- MPI::Get_error_string(errcode, string, slen); +- cout << "Error class " << errclass << "(" << string << ")\n"; +- cout.flush(); +-} +- +-void MTestPrintErrorMsg(const char msg[], int errcode) +-{ +- int errclass, slen; +- char string[MPI_MAX_ERROR_STRING]; +- +- errclass = MPI::Get_error_class(errcode); +- MPI::Get_error_string(errcode, string, slen); +- cout << msg << ": Error class " << errclass << " (" << string << ")\n"; +- cout.flush(); +-} +- +-/* ------------------------------------------------------------------------ */ +-/* Fatal error. Report and exit */ +-void MTestError(const char *msg) +-{ +- cerr << msg << "\n"; +- cerr.flush(); +- MPI::COMM_WORLD.Abort(1); +-} +- +-#ifdef HAVE_MPI_WIN_CREATE +-/* +- * Create MPI Windows +- */ +-static int win_index = 0; +-static const char *winName; +-/* Use an attribute to remember the type of memory allocation (static, +- malloc, or MPI_Alloc_mem) */ +-static int mem_keyval = MPI::KEYVAL_INVALID; +-int MTestGetWin(MPI::Win & win, bool mustBePassive) +-{ +- static char actbuf[1024]; +- static char *pasbuf; +- char *buf; +- int n, rank; +- MPI::Info info; +- +- if (mem_keyval == MPI::KEYVAL_INVALID) { +- /* Create the keyval */ +- mem_keyval = MPI::Win::Create_keyval(MPI::Win::NULL_COPY_FN, MPI::Win::NULL_DELETE_FN, 0); +- } +- +- switch (win_index) { +- case 0: +- /* Active target window */ +- win = MPI::Win::Create(actbuf, 1024, 1, MPI::INFO_NULL, MPI::COMM_WORLD); +- winName = "active-window"; +- win.Set_attr(mem_keyval, (void *) 0); +- break; +- case 1: +- /* Passive target window */ +- pasbuf = (char *) MPI::Alloc_mem(1024, MPI::INFO_NULL); +- win = MPI::Win::Create(pasbuf, 1024, 1, MPI::INFO_NULL, MPI::COMM_WORLD); +- winName = "passive-window"; +- win.Set_attr(mem_keyval, (void *) 2); +- break; +- case 2: +- /* Active target; all windows different sizes */ +- rank = MPI::COMM_WORLD.Get_rank(); +- n = rank * 64; +- if (n) +- buf = (char *) malloc(n); +- else +- buf = 0; +- win = MPI::Win::Create(buf, n, 1, MPI::INFO_NULL, MPI::COMM_WORLD); +- winName = "active-all-different-win"; +- win.Set_attr(mem_keyval, (void *) 1); +- break; +- case 3: +- /* Active target, no locks set */ +- rank = MPI::COMM_WORLD.Get_rank(); +- n = rank * 64; +- if (n) +- buf = (char *) malloc(n); +- else +- buf = 0; +- info = MPI::Info::Create(); +- info.Set("nolocks", "true"); +- win = MPI::Win::Create(buf, n, 1, info, MPI::COMM_WORLD); +- info.Free(); +- winName = "active-nolocks-all-different-win"; +- win.Set_attr(mem_keyval, (void *) 1); +- break; +- default: +- win_index = -1; +- } +- win_index++; +- return win_index; +-} +- +-/* Return a pointer to the name associated with a window object */ +-const char *MTestGetWinName(void) +-{ +- +- return winName; +-} +- +-/* Free the storage associated with a window object */ +-void MTestFreeWin(MPI::Win & win) +-{ +- void *addr; +- bool flag; +- +- flag = win.Get_attr(MPI_WIN_BASE, &addr); +- if (!flag) { +- MTestError("Could not get WIN_BASE from window"); +- } +- if (addr) { +- void *val; +- flag = win.Get_attr(mem_keyval, &val); +- if (flag) { +- if (val == (void *) 1) { +- free(addr); +- } else if (val == (void *) 2) { +- MPI::Free_mem(addr); +- } +- /* if val == (void *)0, then static data that must not be freed */ +- } +- } +- win.Free(); +-} +- +-static void MTestRMACleanup(void) +-{ +- if (mem_keyval != MPI::KEYVAL_INVALID) { +- MPI::Win::Free_keyval(mem_keyval); +- } +-} +-#else +-static void MTestRMACleanup(void) +-{ +-} +-#endif +--- a/test/mpi/datatype/Makefile.am ++++ b/test/mpi/datatype/Makefile.am +@@ -9,11 +9,6 @@ include $(top_srcdir)/Makefile.mtest + + EXTRA_DIST = testlist.in + +-## For some reason, these tests were missing from both the simplemakefile and +-## the testlist. Leaving them disabled for now. +-##segtest +-##zero_blklen_vector +- + ## for all programs that are just built from the single corresponding source + ## file, we don't need per-target _SOURCES rules, automake will infer them + ## correctly +--- a/test/mpi/datatype/hvecblklen.c ++++ b/test/mpi/datatype/hvecblklen.c +@@ -10,7 +10,7 @@ + #include "mpitest.h" + + /* Inspired by the Intel MPI_Type_hvector_blklen test. +- Added to include a test of a dataloop optimization that failed. ++ Added to include a test of a typerep optimization that failed. + */ + int main(int argc, char *argv[]) + { +--- a/test/mpi/datatype/indexed_misc.c ++++ b/test/mpi/datatype/indexed_misc.c +@@ -301,8 +301,7 @@ int indexed_contig_test(void) + } + + /* very similar to indexed_zeroblock_first_test, but only has a single contig in +- * order to catch a particular optimization path in MPICH's +- * Dataloop_create_indexed routine */ ++ * order to catch a particular optimization path in MPICH */ + int indexed_contig_leading_zero_test(void) + { + int err, errs = 0; +@@ -348,8 +347,7 @@ int indexed_contig_leading_zero_test(void) + + /* -------------------------------------------------------------------- */ + /* A more rigorous test of the indexed type. Use a hard-to-optimize struct +- * type to force a more complicated datatype processing path +- * (MPIR_Segment_manipulate in MPICH) */ ++ * type to force a more complicated datatype processing path */ + len[0] = 1; + len[1] = 1; + adisp[0] = 0; +@@ -438,8 +436,7 @@ int indexed_contig_leading_zero_test(void) + + /* -------------------------------------------------------------------- */ + /* A more rigorous test of the hindexed type. Use a hard-to-optimize struct +- * type to force a more complicated datatype processing path +- * (MPIR_Segment_manipulate in MPICH) */ ++ * type to force a more complicated datatype processing path */ + len[0] = 1; + len[1] = 1; + adisp[0] = 0; +deleted file mode 100644 +--- a/test/mpi/datatype/segtest.c ++++ /dev/null +@@ -1,210 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * (C) 2001 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include "mpiimpl.h" +-#include +- +-/* +- * Simple segment test, including timing code +- */ +- +-/* +- * Build datatype structures +- * +- * Contiguous +- * n = 1, 4, 16, 64, 128, 512, 2048, 8196 ints +- * Vector +- * blocksize = 1, 4, 64 ints +- * stride = 1, 64, 127 +- * Block Indexed +- * blocksize = 1, 4 ints +- * offsets = i*24 for i = 0 to n, n = 0, 64, 512 +- * Indexed +- * blocksizes = 1, 2, 4, 3, 7, 5, 6 +- * offsets = i*24 for i = 0 to n, n = 0, 4, 7, 64, 512 +- * (Wrap blocksizes to match offsets) +- * +- * Also need a few nested datatypes, such as vector of vectors +- * Do the versions in Using MPI +- * +- */ +- +-/* +- * Routines to create dataloops for basic dataloops +- */ +-/* +- * Contig +- */ +-MPIR_Dataloop *MPIR_Dataloop_init_contig(int count) +-{ +- MPIR_Dataloop *ct; +- +- ct = (MPIR_Dataloop *) MPL_malloc(sizeof(MPIR_Dataloop), MPL_MEM_OTHER); +- ct->kind = MPID_DTYPE_CONTIG | DATALOOP_FINAL_MASK; +- ct->loop_params.c_t.count = count; +- ct->loop_params.c_t.dataloop = 0; +- ct->extent = count; +- ct->handle = 0; +- +- return ct; +-} +- +-/* +- * Vector +- */ +-MPIR_Dataloop *MPIR_Dataloop_init_vector(int count, int blocksize, int stride) +-{ +- MPIR_Dataloop *v; +- +- v = (MPIR_Dataloop *) MPL_malloc(sizeof(MPIR_Dataloop), MPL_MEM_OTHER); +- v->kind = MPID_DTYPE_VECTOR | DATALOOP_FINAL_MASK; +- v->loop_params.v_t.count = count; +- v->loop_params.v_t.blocksize = blocksize; +- v->loop_params.v_t.stride = stride; +- v->loop_params.v_t.dataloop = 0; +- v->extent = (count - 1) * stride + blocksize; +- v->handle = 0; +- +- return v; +-} +- +-/* +- * Block indexed +- */ +-MPIR_Dataloop *MPIR_Dataloop_init_blockindexed(int count, int blocksize, MPI_Aint * offset) +-{ +- MPIR_Dataloop *bi; +- MPI_Aint extent; +- int i; +- +- bi = (MPIR_Dataloop *) MPL_malloc(sizeof(MPIR_Dataloop), MPL_MEM_OTHER); +- bi->kind = MPID_DTYPE_BLOCKINDEXED | DATALOOP_FINAL_MASK; +- bi->loop_params.bi_t.count = count; +- bi->loop_params.bi_t.blocksize = blocksize; +- bi->loop_params.bi_t.offset = (MPI_Aint *) MPL_malloc(sizeof(MPI_Aint) * count, MPL_MEM_OTHER); +- for (i = 0; i < count; i++) { +- bi->loop_params.bi_t.offset[i] = offset[i]; +- if (offset[i] + blocksize > extent) +- extent = offset[i] + blocksize; +- } +- bi->loop_params.bi_t.dataloop = 0; +- bi->extent = extent; +- bi->handle = 0; +- +- return bi; +-} +- +-/* +- * Indexed +- */ +-MPIR_Dataloop *MPIR_Dataloop_init_indexed(int count, int *blocksize, MPI_Aint * offset) +-{ +- MPIR_Dataloop *it; +- MPI_Aint extent = 0; +- int i; +- +- it = (MPIR_Dataloop *) MPL_malloc(sizeof(MPIR_Dataloop), MPL_MEM_OTHER); +- it->kind = MPID_DTYPE_INDEXED | DATALOOP_FINAL_MASK; +- it->loop_params.i_t.count = count; +- it->loop_params.i_t.blocksize = (int *) MPL_malloc(sizeof(int) * count, MPL_MEM_OTHER); +- it->loop_params.i_t.offset = (MPI_Aint *) MPL_malloc(sizeof(MPI_Aint) * count, MPL_MEM_OTHER); +- for (i = 0; i < count; i++) { +- it->loop_params.i_t.offset[i] = offset[i]; +- it->loop_params.i_t.blocksize[i] = blocksize[i]; +- if (offset[i] + blocksize[i] > extent) +- extent = offset[i] + blocksize[i]; +- } +- it->loop_params.i_t.dataloop = 0; +- it->extent = extent; +- it->handle = 0; +- +- return it; +-} +- +-int main(int argc, char **argv) +-{ +- /* MPIR_Dataloop *vecloop; */ +- MPI_Datatype vectype; +- int count = 200, blocksize = 4, stride = 7 * 4; +- char *src_buf, *dest_buf; +- int i, j, k; +- double r1, r2; +- +- MPI_Init(&argc, &argv); +- +-/* vecloop = MPIR_Dataloop_init_vector(count, blocksize, stride); */ +- +- MPI_Type_vector(count, 1, 7, MPI_INT, &vectype); +- +- /* Initialize the data */ +- src_buf = (char *) MPL_malloc((count - 1) * stride + blocksize, MPL_MEM_OTHER); +- for (i = 0; i < (count - 1) * stride + blocksize; i++) +- src_buf[i] = -i; +- for (i = 0; i < count; i++) { +- for (j = 0; j < blocksize; j++) +- src_buf[i * stride + j] = i * blocksize + j; +- } +- dest_buf = (char *) MPL_malloc(count * blocksize, MPL_MEM_OTHER); +- for (i = 0; i < count * blocksize; i++) { +- dest_buf[i] = -i; +- } +- r1 = MPI_Wtime(); +- for (i = 0; i < 100; i++) { +- int position = 0; +- /*MPIR_Segment_pack(vecloop, src_buf, dest_buf); */ +- MPI_Pack(src_buf, count, vectype, dest_buf, count * blocksize, &position, MPI_COMM_WORLD); +- } +- r2 = MPI_Wtime(); +- printf("Timer for vector pack is %e\n", (r2 - r1) / 100); +- for (i = 0; i < count * blocksize; i++) { +- if (dest_buf[i] != (char) i) { +- printf("Error at location %d\n", i); +- } +- } +- r1 = MPI_Wtime(); +- for (k = 0; k < 100; k++) { +- char *dest = dest_buf, *src = src_buf; +- for (i = 0; i < count; i++) { +- for (j = 0; j < blocksize; j++) +- *dest++ = src[j]; +- src += stride; +- } +- } +- r2 = MPI_Wtime(); +- printf("Timer for hand vector pack is %e\n", (r2 - r1) / 100); +- +- r1 = MPI_Wtime(); +- for (k = 0; k < 100; k++) { +- int *dest = (int *) dest_buf, *src = (int *) src_buf; +- int bsize = blocksize >> 2; +- int istride = stride >> 2; +- if (bsize == 1) { +- for (i = 0; i < count; i++) { +- *dest++ = *src; +- src += istride; +- } +- } else { +- for (i = 0; i < count; i++) { +- for (j = 0; j < bsize; j++) +- *dest++ = src[j]; +- src += istride; +- } +- } +- } +- r2 = MPI_Wtime(); +- printf("Timer for hand vector pack (int) is %e\n", (r2 - r1) / 100); +- +- MPI_Finalize(); +- return MTestReturnValue(errs); +-} +- +-/* +- * Nested vector. +- * The y-z subface is +- * Type_vector(ey-sy+1, 1, nx, MPI_DOUBLE, &newx1); +- * Type_hvector(ez-sz+1, 1, nx*ny_sizeof(double), newx1, &newx); +- * This gives the a(i,sy:ey,sz:ez) of a(nx,ny,nz) (in Fortran notation) +- */ +--- a/test/mpi/datatype/typename.c ++++ b/test/mpi/datatype/typename.c +@@ -79,6 +79,7 @@ static mpi_names_t mpi_names[] = { + {MPI_UINT32_T, "MPI_UINT32_T"}, + {MPI_UINT64_T, "MPI_UINT64_T"}, + {MPI_C_BOOL, "MPI_C_BOOL"}, ++ {MPI_C_COMPLEX, "MPI_C_COMPLEX"}, + {MPI_C_FLOAT_COMPLEX, "MPI_C_FLOAT_COMPLEX"}, + {MPI_C_DOUBLE_COMPLEX, "MPI_C_DOUBLE_COMPLEX"}, + {MPI_AINT, "MPI_AINT"}, +@@ -130,7 +131,7 @@ static mpi_names_t mpi_names[] = { + int main(int argc, char **argv) + { + char name[MPI_MAX_OBJECT_NAME]; +- int namelen, i, inOptional; ++ int namelen, i, inOptional, isSynonymName; + int errs = 0; + + MTest_Init(&argc, &argv); +@@ -141,17 +142,18 @@ int main(int argc, char **argv) + MPI_Type_get_name(MPI_DOUBLE, name, &namelen); + if (strncmp(name, "MPI_DOUBLE", MPI_MAX_OBJECT_NAME)) { + errs++; +- fprintf(stderr, "Expected MPI_DOUBLE but got :%s:\n", name); ++ fprintf(stderr, "Expected MPI_DOUBLE but got :%s:, namelen %d\n", name, namelen); + } + + MPI_Type_get_name(MPI_INT, name, &namelen); + if (strncmp(name, "MPI_INT", MPI_MAX_OBJECT_NAME)) { + errs++; +- fprintf(stderr, "Expected MPI_INT but got :%s:\n", name); ++ fprintf(stderr, "Expected MPI_INT but got :%s:, namelen %d\n", name, namelen); + } + + /* Now we try them ALL */ + inOptional = 0; ++ isSynonymName = 0; + for (i = 0; mpi_names[i].name != 0; i++) { + /* Are we in the optional types? */ + if (strcmp(mpi_names[i].name, "MPI_REAL4") == 0) +@@ -169,9 +171,20 @@ int main(int argc, char **argv) + MTestPrintfMsg(10, "Checking type %s\n", mpi_names[i].name); + name[0] = 0; + MPI_Type_get_name(mpi_names[i].dtype, name, &namelen); +- if (strncmp(name, mpi_names[i].name, namelen)) { ++ ++ /* LONG_LONG is a synonym of LONG_LONG_INT, thus LONG_LONG_INT is a vaild name */ ++ isSynonymName = (mpi_names[i].dtype == MPI_LONG_LONG && ++ !strncmp(name, "MPI_LONG_LONG_INT", MPI_MAX_OBJECT_NAME)); ++#if MTEST_HAVE_MIN_MPI_VERSION(2,2) ++ /* C_FLOAT_COMPLEX is a synonym of C_COMPLEX, thus C_COMPLEX is a vaild name */ ++ isSynonymName = isSynonymName || (mpi_names[i].dtype == MPI_C_FLOAT_COMPLEX && ++ !strncmp(name, "MPI_C_COMPLEX", MPI_MAX_OBJECT_NAME)); ++#endif ++ ++ if (strncmp(name, mpi_names[i].name, MPI_MAX_OBJECT_NAME) && !isSynonymName) { + errs++; +- fprintf(stderr, "Expected %s but got %s\n", mpi_names[i].name, name); ++ fprintf(stderr, "Expected %s but got :%s:, namelen %d\n", mpi_names[i].name, name, ++ namelen); + } + } + +@@ -181,7 +194,7 @@ int main(int argc, char **argv) + MPI_Type_get_name(MPI_INT, name, &namelen); + if (strncmp(name, "int", MPI_MAX_OBJECT_NAME)) { + errs++; +- fprintf(stderr, "Expected int but got :%s:\n", name); ++ fprintf(stderr, "Expected int but got :%s:, namelen %d\n", name, namelen); + } + #ifndef HAVE_MPI_INTEGER16 + errs++; +--- a/test/mpi/datatype/unusual_noncontigs.c ++++ b/test/mpi/datatype/unusual_noncontigs.c +@@ -563,7 +563,7 @@ static int pack_and_check_expected(MPI_Datatype type, const char *name, + } + + /* regression for tt#1030, checks for bad offset math in the +- * blockindexed and indexed dataloop flattening code */ ++ * blockindexed and indexed typerep flattening code */ + int flatten_test(void) + { + int err, errs = 0; +--- a/test/mpi/datatype/vecblklen.c ++++ b/test/mpi/datatype/vecblklen.c +@@ -10,7 +10,7 @@ + #include "mpitest.h" + + /* Inspired by the Intel MPI_Type_vector_blklen test. +- Added to include a test of a dataloop optimization that failed. ++ Added to include a test of a typerep optimization that failed. + */ + int main(int argc, char *argv[]) + { +deleted file mode 100644 +--- a/test/mpi/datatype/zero_blklen_vector.c ++++ /dev/null +@@ -1,35 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2003 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include +-#include +-int main(int argc, char *argv[]) +-{ +- int iam, np; +- int m = 2, n = 0, lda = 1; +- double A[2]; +- MPI_Comm comm = MPI_COMM_WORLD; +- MPI_Datatype type = MPI_DOUBLE, vtype; +- +- MPI_Init(&argc, &argv); +- MPI_Comm_size(comm, &np); +- MPI_Comm_rank(comm, &iam); +- if (np < 2) { +- printf("Should be at least 2 processes for the test\n"); +- } else { +- MPI_Type_vector(n, m, lda, type, &vtype); +- MPI_Type_commit(&vtype); +- A[0] = -1.0 - 0.1 * iam; +- A[1] = 0.5 + 0.1 * iam; +- printf("In process %i of %i before Bcast: A = %f,%f\n", iam, np, A[0], A[1]); +- MPI_Bcast(A, 1, vtype, 0, comm); +- printf("In process %i of %i after Bcast: A = %f,%f\n", iam, np, A[0], A[1]); +- MPI_Type_free(&vtype); +- } +- +- MPI_Finalize(); +-} +deleted file mode 100644 +deleted file mode 100644 +--- a/test/mpi/dtpools/README ++++ b/test/mpi/dtpools/README +@@ -1,4 +1,4 @@ +- DTPools Release 0.0 ++ DTPools Release 2.0 + + DTPools is a datatype library used to test MPI communication routines with + different datatype combinations. DTPools' interface is used to create pools +@@ -11,10 +11,8 @@ This README is organized as follows: + + 1. DTPools API + 2. Testing with DTPools +-3. Supported Derived Datatypes +-4. Supported Derived Datatype layouts +-5. Extending DTPools +-6. TODOs ++3. TODOs ++4. Environment variables + + ---------------------------------------------------------------------------- + +@@ -23,41 +21,43 @@ This README is organized as follows: + + Follows a list of DTPools interfaces used for datatype testing: + +-* int DTP_pool_create(MPI_Datatype basic_type, int basic_count, DTP_t *dtp) ++* int DTP_pool_create(const char *base_type_str, int base_type_count, int seed, DTP_pool_s *dtp) + Create a new basic pool with defined datatype signature. +- - basic_type: native datatype part of signature +- - basic_count: native datatype count part of signature +- - dtp: datatype pool object ++ - base_type_str: base type to use (e.g., MPI_INT or MPI_INT:4,MPI_FLOAT:2) ++ - base_type_count: number of base type elements in the pool signature ++ - seed: seed for randomly generating objects ++ - dtp: datatype pool object + +-* int DTP_pool_create_struct(int basic_type_count, MPI_Datatype *basic_types, int *basic_counts, DTP_t *dtp) +- Create a new struct pool with defined signature. +- - basic_type_count: number of native datatypes in struct +- - basic_type: array of native datatypes +- - basic_counts: array of native datatype counts +- - dtp: datatype pool object +- +-* int DTP_pool_free(DTP_t dtp) ++* int DTP_pool_free(DTP_pool_s dtp) + Free a previously created datatype pool. + - dtp: datatype pool object + +-* int DTP_obj_create(DTP_t dtp, int obj_idx, int val_start, int val_stride, int val_count) +- Create a datatype object (at index obj_idx) inside the specified pool. Also initialize +- the buffer elements using start, stride and count. ++* int DTP_obj_create(DTP_pool_s dtp, DTP_obj_s *obj, MPI_Aint maxbufsizee) ++ Create a datatype object inside the specified pool. + - dtp: datatype pool object +- - obj_idx: number of datatype inside the pool to be created +- - val_start: start of initialization value for buffer at index obj_idx +- - val_stride: increment for next element in buffer +- - val_count: total number of elements to be initialized in buffer ++ - obj: Created object ++ - maxbufsize: Maximum buffer size that an object can use + +-* int DTP_obj_free(DTP_t dtp, int obj_idx) ++* int DTP_obj_free(DTP_obj_s obj) + Free a previously created datatype object inside the specified pool. +- - dtp: datatype pool object +- - obj_idx: number of datatype inside the pool to be freed ++ - obj: object to be freed ++ ++* int DTP_obj_buf_alloc(DTP_obj_s obj) ++ - obj: object for which the buffer needs to be allocated ++ ++* int DTP_obj_buf_free(DTP_obj_s obj) ++ - obj: object for which the buffer needs to be freed ++ ++* int DTP_obj_buf_init(DTP_obj_s obj, int val_start, int val_stride, int val_count) ++ Initialize the buffer elements using start, stride and count. ++ - obj: DTP object ++ - val_start: start of initialization value for buffer ++ - val_stride: increment for next element in buffer ++ - val_count: total number of elements to be initialized in buffer + +-* int DTP_obj_buf_check(DTP_t dtp, int obj_idx, int val_start, int val_stride, int val_count) ++* int DTP_obj_buf_check(DTP_obj_s obj, int val_start, int val_stride, int val_count) + Checks whether the received buffer (used in communication routine) matches the sent buffer. +- - dtp: datatype pool object +- - obj_idx: number of datatype inside the pool to be checked ++ - obj: object to be checked + - val_start: start of checking value for buffer at index obj_idx + - val_stride: increment for next checked element in buffer + - val_count: total number of elements to be checked in buffer +@@ -65,262 +65,20 @@ Follows a list of DTPools interfaces used for datatype testing: + + ---------------------------------------------------------------------------- + +-2. Testing with DTPools +-======================= +- +-Follows a simple test application that uses DTPools: +- +-#include +-#include +-#include +-#include "mpi.h" +-#include "dtpools.h" +- +-#define BASIC_TYPE_MAX_COUNT (1024) +- +-int main(int argc, char *argv[]) { +- int i, j, err; +- int num_err = 0; +- int basic_type_count; +- int myrank = 0; +- MPI_Request req; +- DTP_t send_dtp, recv_dtp; +- +- MPI_Init(NULL, NULL); +- +- basic_type_count = BASIC_TYPE_MAX_COUNT; +- +- err = DTP_pool_create(MPI_INT, basic_type_count, &send_dtp); +- if (err != DTP_SUCCESS) { +- /* error hanling */; +- } +- +- err = DTP_pool_create(MPI_INT, basic_type_count * 2, &recv_dtp); +- if (err != DTP_SUCCESS) { +- /* error hanling */; +- } +- +- for (i = 0; i < send_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(send_dtp, i, 0, 2, basic_type_count); +- if (err != DTP_SUCCESS) { +- /* error handling */; +- } +- +- for (j = 0; j < recv_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(recv_dtp, j, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- /* error handling */; +- } +- +- MPI_Irecv(recv_dtp->DTP_obj_array[j].DTP_obj_buf, +- recv_dtp->DTP_obj_array[j].DTP_obj_count, +- recv_dtp->DTP_obj_array[j].DTP_obj_type, +- myrank, 0, MPI_COMM_WORLD, &req); +- +- MPI_Send(send_dtp->DTP_obj_array[i].DTP_obj_buf, +- send_dtp->DTP_obj_array[i].DTP_obj_count, +- send_dtp->DTP_obj_array[i].DTP_obj_type, +- myrank, 0, MPI_COMM_WORLD); +- +- MPI_Wait(&req, MPI_STATUS_IGNORE); +- +- if (DTP_obj_buf_check(recv_dtp, j, 0, 2, basic_type_count) != DTP_SUCCESS) { +- num_err++; +- } +- DTP_obj_free(recv_dtp, j); +- } +- DTP_obj_free(send_dtp, i); +- } +- +- DTP_pool_free(send_dtp); +- DTP_pool_free(recv_dtp); +- +- if (num_err > 0) { +- fprintf(stdout, " No Errors\n"); +- fflush(stdout); +- } +- +- MPI_Finalize(); +- +- return err; +-} +- +- +----------------------------------------------------------------------------- +- +-3. Supported Derived Datatypes +-============================== +- +-Currently the following derived datatype are supported: +- +-* MPI_Type_contiguous +-* MPI_Type_vector +-* MPI_Type_create_hvector +-* MPI_Type_indexed +-* MPI_Type_create_hindexed +-* MPI_Type_create_indexed_block +-* MPI_Type_create_hindexed_block +-* MPI_Type_create_subarray +-* MPI_Type_create_struct +- +-The following native datatypes are also supported: +- +-* MPI_CHAR, +-* MPI_WCHAR, +-* MPI_SHORT, +-* MPI_INT, +-* MPI_LONG, +-* MPI_LONG_LONG_INT, +-* MPI_UNSIGNED_CHAR, +-* MPI_UNSIGNED_SHORT, +-* MPI_UNSIGNED, +-* MPI_UNSIGNED_LONG, +-* MPI_UNSIGNED_LONG_LONG, +-* MPI_FLOAT, +-* MPI_DOUBLE, +-* MPI_LONG_DOUBLE, +-* MPI_INT8_T, +-* MPI_INT16_T, +-* MPI_INT32_T, +-* MPI_INT64_T, +-* MPI_UINT8_T, +-* MPI_UINT16_T, +-* MPI_UINT32_T, +-* MPI_UINT64_T, +-* MPI_C_COMPLEX, +-* MPI_C_FLOAT_COMPLEX, +-* MPI_C_DOUBLE_COMPLEX, +-* MPI_C_LONG_DOUBLE_COMPLEX, +-* MPI_FLOAT_INT, +-* MPI_DOUBLE_INT, +-* MPI_LONG_INT, +-* MPI_2INT, +-* MPI_SHORT_INT, +-* MPI_LONG_DOUBLE_INT +- +- +----------------------------------------------------------------------------- +- +-4. Supported Derived Datatype layouts +-===================================== +- +-The following layouts for derived datatypes are currently supported: +- +-* Simple layout +- - DTPI_OBJ_LAYOUT_SIMPLE__CONTIG: type_count = 1; type_stride = -; type_blklen = basic_type_count; +- - DTPI_OBJ_LAYOUT_SIMPLE__VECTOR: type_count = basic_type_count; type_stride = 2; type_blklen = 1; +- - DTPI_OBJ_LAYOUT_SIMPLE__HVECTOR: type_count = basic_type_count; type_stride = 2; type_blklen = 1; +- - DTPI_OBJ_LAYOUT_SIMPLE__INDEXED: type_count = basic_type_count; type_stride = 2; type_blklen = 1; +- - DTPI_OBJ_LAYOUT_SIMPLE__HINDEXED: type_count = basic_type_count; type_stride = 2; type_blklen = 1; +- - DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_INDEXED: type_count = basic_type_count; type_stride = 2; type_blklen = 1; +- - DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_HINDEXED: type_count = basic_type_count; type_stride = 2; type_blklen = 1; +- +-* Complex layout +- - DTPI_OBJ_LAYOUT_LARGE_BLK__VECTOR: type_count = small; type_blklen = large; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_BLK__HVECTOR: type_count = small; type_blklen = large; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_BLK__INDEXED: type_count = small; type_blklen = large; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_BLK__HINDEXED: type_count = small; type_blklen = large; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_INDEXED: type_count = small; type_blklen = large; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_HINDEXED: type_count = small; type_blklen = large; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_C: type_count = small; type_blklen = large; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_F: type_count = small; type_blklen = large; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_CNT__VECTOR: type_count = large; type_blklen = small; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_CNT__HVECTOR: type_count = large; type_blklen = small; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_CNT__INDEXED: type_count = large; type_blklen = small; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_CNT__HINDEXED: type_count = large; type_blklen = small; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_INDEXED: type_count = large; type_blklen = small; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_HINDEXED: type_count = large; type_blklen = small; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_C: type_count = large; type_blklen = small; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_F: type_count = large; type_blklen = small; type_stride = type_blklen + 1; +- - DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__VECTOR: type_count = small; type_blklen = large; type_stride = type_blklen * 2; +- - DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HVECTOR: type_count = small; type_blklen = large; type_stride = type_blklen * 2; +- - DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__INDEXED: type_count = small; type_blklen = large; type_stride = type_blklen * 2; +- - DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HINDEXED: type_count = small; type_blklen = large; type_stride = type_blklen * 2; +- - DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_INDEXED: type_count = small; type_blklen = large; type_stride = type_blklen * 2; +- - DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_HINDEXED: type_count = small; type_blklen = large; type_stride = type_blklen * 2; +- - DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_C: type_count = small; type_blklen = large; type_stride = type_blklen * 2; +- - DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_F: type_count = small; type_blklen = large; type_stride = type_blklen * 2; +- - DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__VECTOR: type_count = large; type_blklen = small; type_stride = type_count * 2; +- - DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HVECTOR: type_count = large; type_blklen = small; type_stride = type_count * 2; +- - DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__INDEXED: type_count = large; type_blklen = small; type_stride = type_count * 2; +- - DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HINDEXED: type_count = large; type_blklen = small; type_stride = type_count * 2; +- - DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_INDEXED: type_count = large; type_blklen = small; type_stride = type_count * 2; +- - DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_HINDEXED: type_count = large; type_blklen = small; type_stride = type_count * 2; +- - DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_C: type_count = large; type_blklen = small; type_stride = type_count * 2; +- - DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_F: type_count = large; type_blklen = small; type_stride = type_count * 2; +- +- +----------------------------------------------------------------------------- +- +-5. Extending DTPools +-==================== +- +-Extending DTPools with new datatype layouts is as simple as adding the +-type descriptor in `test/mpi/dtpools/include/dtpools_internal.h`, the +-corresponding type create and buf check functions in +-`test/mpi/dtpools/src/dtpools_internal.c`, and including the new layout to +-the pool create function in `test/mpi/dtpools/src/dtpools.c`. +-Additionally the type create function should also be added to creators +-function vector `DTPI_Init_creators`. +- +-Example: +-/* dtpools_internal.h */ +-enum { +- ..., +- DTPI_OBJ_LAYOUT_MYLAYOUT__NESTED_VECTOR, +- ... +-}; +- +-int DTPI_Nested_vector_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Nested_vector_check_buf(struct DTPI_Par *par, DTP_t dtp); +- +-/* dtpools_internal.c */ +-void DTPI_Init_creators(DTPI_Creator * creators) { +- ... +- creators[DTPI_OBJ_LAYOUT_MYLAYOUT__NESTED_VECTOR] = DTPI_Nested_vector_create; +-} +- +-int DTPI_Nested_vector_create(struct DTPI_Par *par, DTP_t dtp) { +- ... +-} +- +-int DTPI_Nested_vector_check_buf(struct DTPI_Par *par, DTP_t dtp) { +- ... +-} +- +-/* dtpools.c */ +-int DTP_obj_create(DTP_t dtp, int obj_idx, int val_start, int var_stride, int val_count) { +- ... +- +- switch(obj_idx) { +- case XXX: +- ... +- break; +- case DTPI_OBJ_LAYOUT_MYLAYOUT__NESTED_VECTOR: +- /* set up parameters for create function */ +- par.core.type_count = X(count); /* signature count */ +- par.core.type_blklen = Y(count); +- par.core.type_stride = Z(count); +- break; +- default:; +- } +- ... +-} ++2. TODOs ++======== + ++1. Allow a tree for structures, not just a linear list + + ---------------------------------------------------------------------------- + +-6. TODOs +-======== ++3. Environment Variables ++======================== + +-Follows a list of known issues that should be fixed in a future release: ++1. DTP_MAX_BUFSIZE: Sets the maximum buffer size that can be allocated ++for an object. DTPools will search for an object with a smaller ++buffer size for a few iterations, and give up if it cannot find such ++an object. + +-1. Resized datatypes (using MPI_TYPE_CREATE_RESIZED) are not currently supported. +-2. The framework does not provide an interface to reset the type buffer: +- `DTP_obj_reset(DTP_t dtp, int obj_idx, int val_start, int val_stride, int val_count)` +-3. The interface should return an object handle that can be used to directly +- reference the created datatype, its count, and buffer instead of accessing +- directly the object array: +- `DTP_obj_create(DTP_t dtp, int obj_idx, int val_start, int val_stride, int val_count, DTP_Obj_t *obj)` +-4. Currently datatypes in the pools have count of 1. The framework should be extended +- to support counts > 1. ++2. DTP_MAX_TREE_DEPTH: Sets the maximum datatype tree depth that an ++object can have. +--- a/test/mpi/dtpools/configure.ac ++++ b/test/mpi/dtpools/configure.ac +@@ -23,6 +23,9 @@ AH_BOTTOM([ + #endif /* !defined(DTPOOLSCONF_H_INCLUDED) */ + ]) + ++AC_CONFIG_AUX_DIR([../confdb]) ++AC_CONFIG_MACRO_DIR([../confdb]) ++ + # Ensure we have an MPI compiler wrapper + if test -n "$MPICC" ; then + CC=$MPICC +@@ -31,6 +34,7 @@ fi + # Checks for programs. + AC_PROG_AWK + AC_PROG_CC ++AC_PROG_CC_C99 + AC_PROG_CPP + AC_PROG_INSTALL + AC_PROG_LN_S +@@ -44,24 +48,6 @@ AM_PROG_AR + LT_PREREQ([2.2.6]) + LT_INIT + +-AC_ARG_VAR([DTP_NUM_OBJS], +- [used to limit the number of objects to test from each pool]) +- +-# begin framework MPI datatype initialization +-AC_ARG_VAR([DTP_DATATYPE_FILE], +- [used to pass MPI datatypes to the DTPools framework (default: "basictypelist.txt")]) +- +-# we must have a valid file containing MPI datatypes for framework initialization +-DTP_DATATYPE_FILE=${DTP_DATATYPE_FILE:-$srcdir/basictypelist.txt} +-if test ! -f "$DTP_DATATYPE_FILE" ; then +- AC_MSG_ERROR([Need a valid file for MPI datatypes.]) +-fi +- +-# get comma separated list of MPI datatypes for static datatype array initialization in src/dtpools.c +-DTP_DATATYPES=$(types=""; while read -r line; do types+="$line"; done < $DTP_DATATYPE_FILE; echo "$types") +-AC_SUBST([DTP_DATATYPES]) +-# end of framework initialization +- + # Checks for header files. + AC_CHECK_HEADERS([stdlib.h string.h limits.h stdint.h sys/types.h],, + [AC_MSG_ERROR([Cannot find headers.])],) +@@ -70,6 +56,12 @@ AC_CHECK_HEADERS([stdlib.h string.h limits.h stdint.h sys/types.h],, + MPI_H_INCLUDE="-I${master_top_builddir}/src/include" + AC_SUBST([MPI_H_INCLUDE]) + ++# check if we need declarations ++AC_CHECK_FUNCS(strdup) ++if test "$ac_cv_func_strdup" = "yes" ; then ++ PAC_FUNC_NEEDS_DECL([#include ],strdup) ++fi ++ + # Checks for typedefs, structures, and compiler characteristics. + + # Checks for library functions. +--- a/test/mpi/dtpools/include/dtpools.h ++++ b/test/mpi/dtpools/include/dtpools.h +@@ -9,53 +9,40 @@ + #define DTPOOLS_H_INCLUDED + + /* errors */ +-#define DTP_SUCCESS (0) +-#define DTP_ERR_OTHER (1) ++#define DTP_SUCCESS (0) ++#define DTP_ERR_ARG (-1) ++#define DTP_ERR_OUT_OF_RESOURCES (-2) ++#define DTP_ERR_MPI (-3) ++#define DTP_ERR_OTHER (-4) + +-typedef enum { +- DTP_POOL_TYPE__BASIC, /* basic type pool */ +- DTP_POOL_TYPE__STRUCT, /* struct type pool */ +-} DTP_pool_type; ++typedef struct { ++ MPI_Datatype DTP_datatype; ++ MPI_Aint DTP_type_count; + +-/* MPI_DATATYPE_NULL terminated list of datatypes */ +-extern MPI_Datatype DTP_Basic_type[]; ++ MPI_Aint DTP_bufsize; ++ MPI_Aint DTP_buf_offset; + +-struct DTP_obj_array_s { +- MPI_Datatype DTP_obj_type; +- MPI_Aint DTP_obj_count; +- void *DTP_obj_buf; ++ /* datatype description for debugging purposes */ ++ char *DTP_description; + +- /* internal private structure to store datatype specific +- * information */ +- void *private_info; +-}; ++ void *priv; ++} DTP_obj_s; + +-/* main DTP object */ + typedef struct { +- DTP_pool_type DTP_pool_type; +- union { +- struct { +- MPI_Datatype DTP_basic_type; +- MPI_Aint DTP_basic_type_count; +- } DTP_pool_basic; +- struct { +- int DTP_num_types; +- MPI_Datatype *DTP_basic_type; +- int *DTP_basic_type_count; +- } DTP_pool_struct; +- } DTP_type_signature; +- +- int DTP_num_objs; +- struct DTP_obj_array_s *DTP_obj_array; +-} *DTP_t; ++ MPI_Datatype DTP_base_type; ++ ++ void *priv; ++} DTP_pool_s; + + /* DTP manipulation functions */ +-int DTP_pool_create(MPI_Datatype basic_type, MPI_Aint basic_type_count, DTP_t * dtp); +-int DTP_pool_create_struct(int num_types, MPI_Datatype * basic_types, int *basic_type_counts, +- DTP_t * dtp); +-int DTP_pool_free(DTP_t dtp); +-int DTP_obj_create(DTP_t dtp, int obj_idx, int val_start, int val_stride, MPI_Aint val_count); +-int DTP_obj_free(DTP_t dtp, int obj_idx); +-int DTP_obj_buf_check(DTP_t dtp, int obj_idx, int val_start, int val_stride, MPI_Aint val_count); ++int DTP_pool_create(const char *basic_type_str, MPI_Aint basic_type_count, int seed, ++ DTP_pool_s * dtp); ++int DTP_pool_free(DTP_pool_s dtp); ++ ++int DTP_obj_create(DTP_pool_s dtp, DTP_obj_s * obj, MPI_Aint maxbufsize); ++int DTP_obj_free(DTP_obj_s obj); ++ ++int DTP_obj_buf_init(DTP_obj_s obj, void *buf, int val_start, int val_stride, MPI_Aint val_count); ++int DTP_obj_buf_check(DTP_obj_s obj, void *buf, int val_start, int val_stride, MPI_Aint val_count); + + #endif /* DTPOOLS_H_INCLUDED */ +--- a/test/mpi/dtpools/include/dtpools_internal.h ++++ b/test/mpi/dtpools/include/dtpools_internal.h +@@ -13,222 +13,442 @@ + #include + #include "mpi.h" + #include "dtpools.h" ++#include "../dtpoolsconf.h" + +-#define ERR_STRING_MAX_LEN (512) ++extern int DTPI_func_nesting; + ++/* Error checking macros */ ++#define DTPI_ERR_SETANDJUMP(rc_, errcode_) \ ++ do { \ ++ rc_ = errcode_; \ ++ goto fn_fail; \ ++ } while (0) ++ ++#define DTPI_ERR_CHKANDJUMP(check_, rc_, errcode_) \ ++ do { \ ++ if (check_) { \ ++ DTPI_ERR_SETANDJUMP(rc_, errcode_); \ ++ } \ ++ } while (0) ++ ++#define DTPI_ERR_CHK_RC(rc_) \ ++ do { \ ++ if (rc_) { \ ++ goto fn_fail; \ ++ } \ ++ } while (0) ++ ++#define DTPI_ERR_CHK_MPI_RC(rc_) \ ++ do { \ ++ if (rc_) { \ ++ fprintf(stderr, "MPI function returned error in function %s, line %d\n", __func__, __LINE__); \ ++ DTPI_ERR_SETANDJUMP(rc_, DTP_ERR_MPI); \ ++ } \ ++ } while (0) ++ ++#define DTPI_ERR_ARG_CHECK(check_, rc_) \ ++ do { \ ++ if (check_) { \ ++ fprintf(stderr, "argument check failed in function %s, line %d\n", __func__, __LINE__); \ ++ DTPI_ERR_SETANDJUMP(rc_, DTP_ERR_ARG); \ ++ } \ ++ } while (0) ++ ++#define DTPI_ERR_ASSERT(assertion_, rc_) \ ++ do { \ ++ if (!(assertion_)) { \ ++ fprintf(stderr, "assertion %s failed in function %s, line %d\n", #assertion_, __func__, __LINE__); \ ++ DTPI_ERR_SETANDJUMP(rc_, DTP_ERR_OTHER); \ ++ } \ ++ } while (0) ++ ++ ++/* #define DEBUG_DTPOOLS */ + #ifdef DEBUG_DTPOOLS +-#define FPRINTF(fd,...) \ +- do { \ +- fprintf(fd,__VA_ARGS__);\ +- fflush(fd); \ ++#define DTPI_debug(...) \ ++ do { \ ++ for (int i_ = 0; i_ < DTPI_func_nesting; i_++) \ ++ printf(" "); \ ++ printf("[%s,%d] ", __func__, __LINE__); \ ++ printf(__VA_ARGS__); \ + } while (0) + #else +-#define FPRINTF(...) ++#define DTPI_debug(...) + #endif + +-#define DTPI_OBJ_ALLOC_OR_FAIL(obj, size) \ +- do { \ +- obj = malloc(size); \ +- if (!obj) { \ +- err = DTP_ERR_OTHER; \ +- fprintf(stdout, "Out of memory in %s\n", __FUNCTION__); \ +- fflush(stdout); \ +- goto fn_fail; \ +- } \ +- memset(obj, 0, size); \ ++#define DTPI_FUNC_ENTER() \ ++ do { \ ++ DTPI_func_nesting++; \ ++ DTPI_debug("entering function\n"); \ + } while (0) + +-/* +- * Simple derived datatype layouts: +- * - block length = 1 +- * - stride = 2 +- * - count = N +- */ ++#define DTPI_FUNC_EXIT() \ ++ do { \ ++ DTPI_debug("exiting function\n"); \ ++ DTPI_func_nesting--; \ ++ } while (0) ++ ++#define TMP_STR_LEN (1024) ++#define DTPI_snprintf(rc_, tstr, cur_len, max_len, ...) \ ++ do { \ ++ char tmp_[TMP_STR_LEN]; \ ++ snprintf(tmp_, TMP_STR_LEN, __VA_ARGS__); \ ++ while (strlen(tmp_) >= max_len - cur_len - 1) { \ ++ char *t_, *t2_; \ ++ max_len *= 2; \ ++ DTPI_ALLOC_OR_FAIL(t_, max_len, rc_); \ ++ strncpy(t_, tstr, cur_len + 1); \ ++ t2_ = tstr; \ ++ tstr = t_; \ ++ DTPI_FREE(t2_); \ ++ } \ ++ DTPI_ERR_ASSERT(strlen(tmp_) < max_len - cur_len - 1, rc_); \ ++ strncpy(tstr + cur_len, tmp_, strlen(tmp_) + 1); \ ++ cur_len += strlen(tmp_); \ ++ } while (0) ++ ++#define DTPI_ALLOC_OR_FAIL(obj, size, rc_) \ ++ do { \ ++ obj = malloc(size); \ ++ DTPI_ERR_CHKANDJUMP(!obj, rc_, DTP_ERR_OUT_OF_RESOURCES); \ ++ memset(obj, 0, size); \ ++ } while (0) ++ ++#define DTPI_FREE(obj) \ ++ do { \ ++ free(obj); \ ++ } while (0) ++ ++#define DTPI_RAND_LIST_SIZE (1024) ++ ++typedef struct { ++ int seed; ++ int rand_count; ++ int rand_idx; ++ int rand_list[DTPI_RAND_LIST_SIZE]; ++ ++ char *base_type_str; ++ MPI_Aint base_type_count; ++ MPI_Aint base_type_extent; ++ ++ /* in case the base type is a struct */ ++ int base_type_is_struct; ++ struct { ++ int numblks; ++ int *array_of_blklens; ++ MPI_Aint *array_of_displs; ++ MPI_Datatype *array_of_types; ++ } base_type_attrs; ++} DTPI_pool_s; ++ ++typedef enum { ++ DTPI_DATATYPE_KIND__CONTIG = 0, ++ DTPI_DATATYPE_KIND__DUP, ++ DTPI_DATATYPE_KIND__RESIZED, ++ DTPI_DATATYPE_KIND__VECTOR, ++ DTPI_DATATYPE_KIND__HVECTOR, ++ DTPI_DATATYPE_KIND__BLKINDX, ++ DTPI_DATATYPE_KIND__BLKHINDX, ++ DTPI_DATATYPE_KIND__INDEXED, ++ DTPI_DATATYPE_KIND__HINDEXED, ++ DTPI_DATATYPE_KIND__SUBARRAY, ++ DTPI_DATATYPE_KIND__STRUCT, ++ DTPI_DATATYPE_KIND__LAST, ++} DTPI_Datatype_kind_e; ++ ++ ++/* contig attributes */ + enum { +- DTPI_OBJ_LAYOUT_SIMPLE__BASIC, +- DTPI_OBJ_LAYOUT_SIMPLE__CONTIG, +- DTPI_OBJ_LAYOUT_SIMPLE__VECTOR, +- DTPI_OBJ_LAYOUT_SIMPLE__INDEXED, +- DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_INDEXED, +- DTPI_OBJ_LAYOUT_SIMPLE__HVECTOR, +- DTPI_OBJ_LAYOUT_SIMPLE__HINDEXED, +- DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_HINDEXED, +- DTPI_OBJ_LAYOUT_SIMPLE__NUM ++ DTPI_ATTR_CONTIG_BLKLEN__ONE = 0, ++ DTPI_ATTR_CONTIG_BLKLEN__SMALL, ++ DTPI_ATTR_CONTIG_BLKLEN__LARGE, ++ DTPI_ATTR_CONTIG_BLKLEN__LAST, + }; + +-/* +- * Complex derived datatype layouts: +- * - block length = implementation defined +- * - stride = implementation defined +- * - count = implementation defined +- */ ++ ++/* resized attributes */ + enum { +- DTPI_OBJ_LAYOUT_LARGE_BLK__VECTOR = DTPI_OBJ_LAYOUT_SIMPLE__NUM, +- DTPI_OBJ_LAYOUT_LARGE_BLK__INDEXED, +- DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_INDEXED, +- DTPI_OBJ_LAYOUT_LARGE_BLK__HVECTOR, +- DTPI_OBJ_LAYOUT_LARGE_BLK__HINDEXED, +- DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_HINDEXED, +- DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_C, +- DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_F, +- DTPI_OBJ_LAYOUT_LARGE_CNT__VECTOR, +- DTPI_OBJ_LAYOUT_LARGE_CNT__INDEXED, +- DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_INDEXED, +- DTPI_OBJ_LAYOUT_LARGE_CNT__HVECTOR, +- DTPI_OBJ_LAYOUT_LARGE_CNT__HINDEXED, +- DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_HINDEXED, +- DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_C, +- DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_F, +- DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__VECTOR, +- DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__INDEXED, +- DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_INDEXED, +- DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HVECTOR, +- DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HINDEXED, +- DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_HINDEXED, +- DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_C, +- DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_F, +- DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__VECTOR, +- DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__INDEXED, +- DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_INDEXED, +- DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HVECTOR, +- DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HINDEXED, +- DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_HINDEXED, +- DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_C, +- DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_F, +- /* TODO: add LOWER BOUND use case */ +- DTPI_OBJ_LAYOUT_LARGE__NUM ++ DTPI_ATTR_RESIZED_LB__PACKED = 0, ++ DTPI_ATTR_RESIZED_LB__LOW, ++ DTPI_ATTR_RESIZED_LB__VERY_LOW, ++ DTPI_ATTR_RESIZED_LB__HIGH, ++ DTPI_ATTR_RESIZED_LB__VERY_HIGH, ++ DTPI_ATTR_RESIZED_LB__LAST, ++}; ++enum { ++ DTPI_ATTR_RESIZED_EXTENT__PACKED = 0, ++ DTPI_ATTR_RESIZED_EXTENT__HIGH, ++ DTPI_ATTR_RESIZED_EXTENT__VERY_HIGH, ++ DTPI_ATTR_RESIZED_EXTENT__LAST, + }; + +-/* +- * Only one layouts for struct datatype. +- * TODO: extend struct with multiple +- * additional layouts ... ? +- */ ++ ++/* vector attributes */ ++enum { ++ DTPI_ATTR_VECTOR_NUMBLKS__ONE = 0, ++ DTPI_ATTR_VECTOR_NUMBLKS__SMALL, ++ DTPI_ATTR_VECTOR_NUMBLKS__LARGE, ++ DTPI_ATTR_VECTOR_NUMBLKS__LAST, ++}; ++enum { ++ DTPI_ATTR_VECTOR_BLKLEN__ONE = 0, ++ DTPI_ATTR_VECTOR_BLKLEN__SMALL, ++ DTPI_ATTR_VECTOR_BLKLEN__LARGE, ++ DTPI_ATTR_VECTOR_BLKLEN__LAST, ++}; + enum { +- DTPI_OBJ_LAYOUT_SIMPLE__STRUCT, +- DTPI_OBJ_LAYOUT__STRUCT_NUM ++ DTPI_ATTR_VECTOR_STRIDE__SMALL = 0, ++ DTPI_ATTR_VECTOR_STRIDE__LARGE, ++ DTPI_ATTR_VECTOR_STRIDE__NEGATIVE, ++ DTPI_ATTR_VECTOR_STRIDE__LAST, + }; + +-typedef enum { +- DTPI_OBJ_TYPE__BASIC, +- DTPI_OBJ_TYPE__CONTIG, +- DTPI_OBJ_TYPE__VECTOR, +- DTPI_OBJ_TYPE__HVECTOR, +- DTPI_OBJ_TYPE__BLOCK_INDEXED, +- DTPI_OBJ_TYPE__BLOCK_HINDEXED, +- DTPI_OBJ_TYPE__INDEXED, +- DTPI_OBJ_TYPE__HINDEXED, +- DTPI_OBJ_TYPE__SUBARRAY_C, +- DTPI_OBJ_TYPE__SUBARRAY_F, +- DTPI_OBJ_TYPE__STRUCT, +- DTPI_OBJ_TYPE__NUM +-} DTPI_obj_type_e; + +-/* +- * Internal object information +- */ +-typedef struct { +- DTPI_obj_type_e obj_type; ++/* hvector attributes */ ++enum { ++ DTPI_ATTR_HVECTOR_NUMBLKS__ONE = 0, ++ DTPI_ATTR_HVECTOR_NUMBLKS__SMALL, ++ DTPI_ATTR_HVECTOR_NUMBLKS__LARGE, ++ DTPI_ATTR_HVECTOR_NUMBLKS__LAST, ++}; ++enum { ++ DTPI_ATTR_HVECTOR_BLKLEN__ONE = 0, ++ DTPI_ATTR_HVECTOR_BLKLEN__SMALL, ++ DTPI_ATTR_HVECTOR_BLKLEN__LARGE, ++ DTPI_ATTR_HVECTOR_BLKLEN__LAST, ++}; ++enum { ++ DTPI_ATTR_HVECTOR_STRIDE__SMALL = 0, ++ DTPI_ATTR_HVECTOR_STRIDE__LARGE, ++ DTPI_ATTR_HVECTOR_STRIDE__NEGATIVE, ++ DTPI_ATTR_HVECTOR_STRIDE__LAST, ++}; ++ + +- MPI_Aint type_basic_size; /* e.g., sizeof(int) */ +- MPI_Aint type_extent; /* total extent of type in bytes */ +- MPI_Aint type_lb; /* lower bound in bytes */ +- MPI_Aint type_ub; /* upper bound in bytes */ ++/* block indexed attributes */ ++enum { ++ DTPI_ATTR_BLKINDX_NUMBLKS__ONE = 0, ++ DTPI_ATTR_BLKINDX_NUMBLKS__SMALL, ++ DTPI_ATTR_BLKINDX_NUMBLKS__LARGE, ++ DTPI_ATTR_BLKINDX_NUMBLKS__LAST, ++}; ++enum { ++ DTPI_ATTR_BLKINDX_BLKLEN__ONE = 0, ++ DTPI_ATTR_BLKINDX_BLKLEN__SMALL, ++ DTPI_ATTR_BLKINDX_BLKLEN__LARGE, ++ DTPI_ATTR_BLKINDX_BLKLEN__LAST, ++}; ++enum { ++ DTPI_ATTR_BLKINDX_DISPLS__SMALL = 0, ++ DTPI_ATTR_BLKINDX_DISPLS__LARGE, ++ DTPI_ATTR_BLKINDX_DISPLS__REDUCING, ++ DTPI_ATTR_BLKINDX_DISPLS__UNEVEN, ++ DTPI_ATTR_BLKINDX_DISPLS__LAST, ++}; ++ ++ ++/* block hindexed attributes */ ++enum { ++ DTPI_ATTR_BLKHINDX_NUMBLKS__ONE = 0, ++ DTPI_ATTR_BLKHINDX_NUMBLKS__SMALL, ++ DTPI_ATTR_BLKHINDX_NUMBLKS__LARGE, ++ DTPI_ATTR_BLKHINDX_NUMBLKS__LAST, ++}; ++enum { ++ DTPI_ATTR_BLKHINDX_BLKLEN__ONE = 0, ++ DTPI_ATTR_BLKHINDX_BLKLEN__SMALL, ++ DTPI_ATTR_BLKHINDX_BLKLEN__LARGE, ++ DTPI_ATTR_BLKHINDX_BLKLEN__LAST, ++}; ++enum { ++ DTPI_ATTR_BLKHINDX_DISPLS__SMALL = 0, ++ DTPI_ATTR_BLKHINDX_DISPLS__LARGE, ++ DTPI_ATTR_BLKHINDX_DISPLS__REDUCING, ++ DTPI_ATTR_BLKHINDX_DISPLS__UNEVEN, ++ DTPI_ATTR_BLKHINDX_DISPLS__LAST, ++}; ++ ++ ++/* indexed attributes */ ++enum { ++ DTPI_ATTR_INDEXED_NUMBLKS__ONE = 0, ++ DTPI_ATTR_INDEXED_NUMBLKS__SMALL, ++ DTPI_ATTR_INDEXED_NUMBLKS__LARGE, ++ DTPI_ATTR_INDEXED_NUMBLKS__LAST, ++}; ++enum { ++ DTPI_ATTR_INDEXED_BLKLEN__ONE = 0, ++ DTPI_ATTR_INDEXED_BLKLEN__SMALL, ++ DTPI_ATTR_INDEXED_BLKLEN__LARGE, ++ DTPI_ATTR_INDEXED_BLKLEN__UNEVEN, ++ DTPI_ATTR_INDEXED_BLKLEN__LAST, ++}; ++enum { ++ DTPI_ATTR_INDEXED_DISPLS__SMALL = 0, ++ DTPI_ATTR_INDEXED_DISPLS__LARGE, ++ DTPI_ATTR_INDEXED_DISPLS__REDUCING, ++ DTPI_ATTR_INDEXED_DISPLS__UNEVEN, ++ DTPI_ATTR_INDEXED_DISPLS__LAST, ++}; ++ ++ ++/* hindexed attributes */ ++enum { ++ DTPI_ATTR_HINDEXED_NUMBLKS__ONE = 0, ++ DTPI_ATTR_HINDEXED_NUMBLKS__SMALL, ++ DTPI_ATTR_HINDEXED_NUMBLKS__LARGE, ++ DTPI_ATTR_HINDEXED_NUMBLKS__LAST, ++}; ++enum { ++ DTPI_ATTR_HINDEXED_BLKLEN__ONE = 0, ++ DTPI_ATTR_HINDEXED_BLKLEN__SMALL, ++ DTPI_ATTR_HINDEXED_BLKLEN__LARGE, ++ DTPI_ATTR_HINDEXED_BLKLEN__UNEVEN, ++ DTPI_ATTR_HINDEXED_BLKLEN__LAST, ++}; ++enum { ++ DTPI_ATTR_HINDEXED_DISPLS__SMALL = 0, ++ DTPI_ATTR_HINDEXED_DISPLS__LARGE, ++ DTPI_ATTR_HINDEXED_DISPLS__REDUCING, ++ DTPI_ATTR_HINDEXED_DISPLS__UNEVEN, ++ DTPI_ATTR_HINDEXED_DISPLS__LAST, ++}; ++ ++ ++/* subarray attributes */ ++enum { ++ DTPI_ATTR_SUBARRAY_NDIMS__SMALL = 0, ++ DTPI_ATTR_SUBARRAY_NDIMS__LARGE, ++ DTPI_ATTR_SUBARRAY_NDIMS__LAST ++}; ++enum { ++ DTPI_ATTR_SUBARRAY_SUBSIZES__ONE = 0, ++ DTPI_ATTR_SUBARRAY_SUBSIZES__SMALL, ++ DTPI_ATTR_SUBARRAY_SUBSIZES__LARGE, ++ DTPI_ATTR_SUBARRAY_SUBSIZES__LAST, ++}; ++enum { ++ DTPI_ATTR_SUBARRAY_SIZES__ONE = 0, ++ DTPI_ATTR_SUBARRAY_SIZES__SMALL, ++ DTPI_ATTR_SUBARRAY_SIZES__LARGE, ++ DTPI_ATTR_SUBARRAY_SIZES__LAST, ++}; ++enum { ++ DTPI_ATTR_SUBARRAY_ORDER__C = 0, ++ DTPI_ATTR_SUBARRAY_ORDER__FORTRAN, ++ DTPI_ATTR_SUBARRAY_ORDER__LAST, ++}; ++ ++ ++/* struct attributes */ ++/* TODO: add an attribute for multiple child types */ ++enum { ++ DTPI_ATTR_STRUCTURE_NUMBLKS__ONE = 0, ++ DTPI_ATTR_STRUCTURE_NUMBLKS__SMALL, ++ DTPI_ATTR_STRUCTURE_NUMBLKS__LARGE, ++ DTPI_ATTR_STRUCTURE_NUMBLKS__LAST, ++}; ++enum { ++ DTPI_ATTR_STRUCTURE_BLKLEN__ONE = 0, ++ DTPI_ATTR_STRUCTURE_BLKLEN__SMALL, ++ DTPI_ATTR_STRUCTURE_BLKLEN__LARGE, ++ DTPI_ATTR_STRUCTURE_BLKLEN__UNEVEN, ++ DTPI_ATTR_STRUCTURE_BLKLEN__LAST, ++}; ++enum { ++ DTPI_ATTR_STRUCTURE_DISPLS__SMALL = 0, ++ DTPI_ATTR_STRUCTURE_DISPLS__LARGE, ++ DTPI_ATTR_STRUCTURE_DISPLS__REDUCING, ++ DTPI_ATTR_STRUCTURE_DISPLS__UNEVEN, ++ DTPI_ATTR_STRUCTURE_DISPLS__LAST, ++}; ++ ++ ++/* This is a linear list of datatype attributes; this could ++ * evolve into a tree in the future, but we don't need that right ++ * now */ ++typedef struct DTPI_Attr { ++ DTPI_Datatype_kind_e kind; ++ MPI_Aint child_type_extent; ++ struct DTPI_Attr *child; + + union { + struct { +- int stride; + int blklen; + } contig; ++ + struct { +- int stride; /* stride in basic types */ +- int blklen; /* # of blocks in stride */ ++ MPI_Aint lb; ++ MPI_Aint extent; ++ } resized; ++ ++ struct { ++ int numblks; ++ int blklen; ++ int stride; + } vector; ++ + struct { +- MPI_Aint stride; ++ int numblks; + int blklen; ++ MPI_Aint stride; + } hvector; ++ + struct { +- int stride; ++ int numblks; + int blklen; +- } indexed; ++ int *array_of_displs; ++ } blkindx; ++ + struct { +- MPI_Aint stride; ++ int numblks; + int blklen; +- } hindexed; ++ MPI_Aint *array_of_displs; ++ } blkhindx; ++ + struct { +- int stride; +- int blklen; +- } block_indexed; ++ int numblks; ++ int *array_of_blklens; ++ int *array_of_displs; ++ } indexed; ++ + struct { +- MPI_Aint stride; +- int blklen; +- } block_hindexed; ++ int numblks; ++ int *array_of_blklens; ++ MPI_Aint *array_of_displs; ++ } hindexed; ++ + struct { ++ int ndims; ++ int *array_of_sizes; ++ int *array_of_subsizes; ++ int *array_of_starts; + int order; +- int arr_sizes[2]; +- int arr_subsizes[2]; +- int arr_starts[2]; + } subarray; ++ + struct { +- MPI_Aint *displs; /* displacement addresses in buf */ ++ int numblks; ++ int *array_of_blklens; ++ MPI_Aint *array_of_displs; + } structure; + } u; +-} DTPI_t; ++} DTPI_Attr_s; + +-/* +- * Internal parameter structure used to pass +- * data around. Two types of parameters: +- * - User defined object information +- * - Implementation (core) defined object information +- * +- * NOTE: for pools created with `DTP_pool_create_struct` +- * user defined count is disregarded and reset +- * internally to `DTP_basic_type_count`. +- */ +-struct DTPI_Par { +- struct { +- int val_start; /* start value to fill buf with */ +- int val_stride; /* increment between values */ +- int val_count; /* number of elements to init in buf */ +- int obj_idx; /* index of object in pool */ +- } user; +- struct { +- MPI_Aint type_count; /* # of elements */ +- MPI_Aint type_blklen; /* length of a block in # of basic types */ +- MPI_Aint type_stride; /* # of basic types between start of each block */ +- MPI_Aint type_totlen; /* tot # of basic types in datatype */ +- MPI_Aint type_displ; /* displ of first elem in buffer in bytes */ +- } core; +-}; +- +-typedef int (*DTPI_Creator) (struct DTPI_Par * par, DTP_t dtp); +- +-int DTPI_Struct_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Basic_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Contig_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Vector_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Hvector_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Indexed_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Hindexed_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Block_indexed_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Block_hindexed_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Subarray_c_create(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Subarray_f_create(struct DTPI_Par *par, DTP_t dtp); +- +-int DTPI_Struct_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Basic_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Contig_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Vector_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Hvector_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Indexed_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Hindexed_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Block_indexed_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Block_hindexed_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Subarray_c_check_buf(struct DTPI_Par *par, DTP_t dtp); +-int DTPI_Subarray_f_check_buf(struct DTPI_Par *par, DTP_t dtp); +- +-void DTPI_Print_error(int errcode); +-void DTPI_Init_creators(DTPI_Creator * creators); ++typedef struct { ++ DTP_pool_s dtp; ++ DTPI_Attr_s *attr_tree; ++} DTPI_obj_s; ++ ++int DTPI_obj_free(DTPI_obj_s * obj_priv); ++int DTPI_parse_base_type_str(DTP_pool_s * dtp, const char *str); ++unsigned int DTPI_low_count(unsigned int count); ++unsigned int DTPI_high_count(unsigned int count); ++int DTPI_construct_datatype(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s ** attr_tree, ++ MPI_Datatype * newtype, MPI_Aint * new_count); ++int DTPI_populate_dtp_desc(DTPI_obj_s * obj_priv, DTPI_pool_s * dtpi, char **desc); ++int DTPI_rand(DTPI_pool_s * dtpi); ++int DTPI_init_verify(DTP_pool_s dtp, DTP_obj_s obj, void *buf, DTPI_Attr_s * attr_tree, ++ size_t buf_offset, int *val_start, int val_stride, int *rem_val_count, ++ int verify); + + #endif /* DTPOOLS_INTERNAL_H_INCLUDED */ +--- a/test/mpi/dtpools/src/Makefile.am ++++ b/test/mpi/dtpools/src/Makefile.am +@@ -7,6 +7,6 @@ AM_CPPFLAGS = $(MPI_H_INCLUDE) + AM_CPPFLAGS += -DDTP_MPI_DATATYPE=@DTP_DATATYPES@ # Coma separated list of MPI datatypes + + pkglib_LTLIBRARIES = libdtpools.la +-libdtpools_la_SOURCES = dtpools.c dtpools_internal.c ++libdtpools_la_SOURCES = dtpools.c dtpools_misc.c dtpools_init_verify.c dtpools_desc.c dtpools_attr.c + libdtpools_la_LDFLAGS = -version-info 0:0:0 + libdtpools_la_CPPFLAGS = -I$(top_srcdir)/include -I../include $(AM_CPPFLAGS) +--- a/test/mpi/dtpools/src/dtpools.c ++++ b/test/mpi/dtpools/src/dtpools.c +@@ -5,482 +5,255 @@ + * See COPYRIGHT in top-level directory. + */ + +-#include + #include "dtpools_internal.h" + +-#define DTPI_MAX_FACTOR (64) + +-/* get list of MPI datatypes at compilation time */ +-MPI_Datatype DTP_Basic_type[] = { DTP_MPI_DATATYPE }; ++/* ++ * DTP_pool_create - create a new datatype pool with specified signature ++ * ++ * base_type_str: signature's base datatype string ++ * base_type_count: signature's base datatype count ++ * dtp: returned datatype pool object ++ */ ++int DTP_pool_create(const char *base_type_str, MPI_Aint base_type_count, int seed, DTP_pool_s * dtp) ++{ ++ int rc = DTP_SUCCESS; + +-/* pointer to create functions for datatypes */ +-static DTPI_Creator creators[DTPI_OBJ_LAYOUT_LARGE__NUM]; ++ DTPI_FUNC_ENTER(); + +-/* return factor of count */ +-static int DTPI_Get_max_fact(int count) +-{ +- int i = 2; ++ DTPI_ERR_ARG_CHECK(!dtp, rc); ++ DTPI_ERR_ARG_CHECK(base_type_count <= 0, rc); + +- if ((count / 2) < DTPI_MAX_FACTOR && (count / 2) > 0) { +- i = (count / 2) + 1; +- } else if ((count / 2) >= DTPI_MAX_FACTOR) { +- i = DTPI_MAX_FACTOR + 1; +- } ++ DTPI_ALLOC_OR_FAIL(dtp->priv, sizeof(DTPI_pool_s), rc); ++ DTPI_pool_s *dtpi = dtp->priv; ++ ++ rc = DTPI_parse_base_type_str(dtp, base_type_str); ++ DTPI_ERR_CHK_RC(rc); + +- while ((count % --i) != 0 && i > 1); ++ /* setup the random number generation parameters */ ++ dtpi->seed = seed; ++ dtpi->rand_count = 0; ++ dtpi->rand_idx = DTPI_RAND_LIST_SIZE; + +- return i; ++ dtpi->base_type_count = base_type_count; ++ ++ fn_exit: ++ DTPI_FUNC_EXIT(); ++ return rc; ++ ++ fn_fail: ++ if (dtp) { ++ DTPI_FREE(dtp); ++ dtp = NULL; ++ } ++ goto fn_exit; + } + ++ + /* +- * DTP_pool_create - create a new datatype pool with specified signature +- * +- * basic_type: signature's basic datatype +- * basic_type_count: signature's basic datatype count +- * dtp: returned datatype pool object ++ * DTP_pool_free - free previously created pool + */ +-int DTP_pool_create(MPI_Datatype basic_type, MPI_Aint basic_type_count, DTP_t * dtp) ++int DTP_pool_free(DTP_pool_s dtp) + { +- int i, err = DTP_SUCCESS; +- int num_objs; +- int env_num_objs = INT_MAX; +- char *env_num_objs_str = NULL; +- struct DTP_obj_array_s *obj_array = NULL; +- +- DTPI_OBJ_ALLOC_OR_FAIL(*dtp, sizeof(**dtp)); ++ int rc = DTP_SUCCESS; ++ DTPI_pool_s *dtpi = dtp.priv; + +- (*dtp)->DTP_pool_type = DTP_POOL_TYPE__BASIC; ++ DTPI_FUNC_ENTER(); + +- /* get number of objects from environment */ +- if ((env_num_objs_str = getenv("DTP_NUM_OBJS"))) { +- env_num_objs = atoi(env_num_objs_str); +- } ++ DTPI_ERR_ARG_CHECK(!dtpi, rc); + +- if (basic_type_count == 1) { +- num_objs = +- (env_num_objs < DTPI_OBJ_LAYOUT_SIMPLE__NUM && +- env_num_objs > 0) ? env_num_objs : DTPI_OBJ_LAYOUT_SIMPLE__NUM; +- } else { +- num_objs = +- (env_num_objs < DTPI_OBJ_LAYOUT_LARGE__NUM && +- env_num_objs > 0) ? env_num_objs : DTPI_OBJ_LAYOUT_LARGE__NUM; ++ DTPI_FREE(dtpi->base_type_str); ++ if (dtpi->base_type_is_struct) { ++ rc = MPI_Type_free(&dtp.DTP_base_type); ++ DTPI_ERR_CHK_MPI_RC(rc); + } ++ DTPI_FREE(dtpi); + +- DTPI_OBJ_ALLOC_OR_FAIL(obj_array, sizeof(*obj_array) * num_objs); +- +- for (i = 0; i < num_objs; i++) { +- obj_array[i].DTP_obj_type = MPI_DATATYPE_NULL; +- obj_array[i].DTP_obj_count = 0; +- obj_array[i].DTP_obj_buf = NULL; +- obj_array[i].private_info = NULL; +- } +- +- (*dtp)->DTP_num_objs = num_objs; +- (*dtp)->DTP_pool_type = DTP_POOL_TYPE__BASIC; +- (*dtp)->DTP_type_signature.DTP_pool_basic.DTP_basic_type = basic_type; +- (*dtp)->DTP_type_signature.DTP_pool_basic.DTP_basic_type_count = basic_type_count; +- (*dtp)->DTP_obj_array = (struct DTP_obj_array_s *) obj_array; +- +- DTPI_Init_creators(creators); ++ DTPI_FUNC_EXIT(); + + fn_exit: +- return err; ++ return rc; + + fn_fail: +- if (*dtp) { +- free(*dtp); +- } +- if (obj_array) { +- free(obj_array); +- } + goto fn_exit; + } + ++#define DTPI_DEFAULT_MAX_TREE_DEPTH (3) ++#define DTPI_DEFAULT_MAX_BUFSIZE (1024 * 1024 * 1024) ++ + /* +- * DTP_pool_create_struct - create a new struct pool with specified signature ++ * DTP_obj_create - create dtp object inside the pool + * +- * num_types: number of basic datatypes in struct +- * basic_types: array of basic datatypes in struct +- * basic_type_counts: array of counts for each of the +- * basic datatypes in struct +- * dtp: returned datatype pool object ++ * dtp: datatype pool handle ++ * obj: created object handle + */ +-int DTP_pool_create_struct(int num_types, MPI_Datatype * basic_types, int *basic_type_counts, +- DTP_t * dtp) ++int DTP_obj_create(DTP_pool_s dtp, DTP_obj_s * obj, MPI_Aint maxbufsize) + { +- int i, err = DTP_SUCCESS; +- int num_objs; +- int env_num_objs = INT_MAX; +- char *env_num_objs_str = NULL; +- struct DTP_obj_array_s *obj_array = NULL; ++ int rc = DTP_SUCCESS; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int max_tree_depth; ++ DTPI_obj_s *obj_priv = NULL; + +- DTPI_OBJ_ALLOC_OR_FAIL(*dtp, sizeof(**dtp)); ++ DTPI_FUNC_ENTER(); + +- (*dtp)->DTP_pool_type = DTP_POOL_TYPE__STRUCT; ++ DTPI_ERR_ARG_CHECK(!dtpi, rc); + +- /* get number of objects from environment */ +- if ((env_num_objs_str = getenv("DTP_NUM_OBJS"))) { +- env_num_objs = atoi(env_num_objs_str); +- } ++ /* find number of nestings */ ++ if (getenv("DTP_MAX_TREE_DEPTH")) ++ max_tree_depth = atoi(getenv("DTP_MAX_TREE_DEPTH")); ++ else ++ max_tree_depth = DTPI_DEFAULT_MAX_TREE_DEPTH; + +- num_objs = (env_num_objs < DTPI_OBJ_LAYOUT__STRUCT_NUM && env_num_objs > 0) ? +- env_num_objs : DTPI_OBJ_LAYOUT__STRUCT_NUM; ++ int attr_tree_depth = DTPI_rand(dtpi) % (max_tree_depth + 1); + +- DTPI_OBJ_ALLOC_OR_FAIL(obj_array, sizeof(*obj_array) * num_objs); ++ while (1) { ++ DTPI_ALLOC_OR_FAIL(obj->priv, sizeof(DTPI_obj_s), rc); ++ obj_priv = obj->priv; + +- for (i = 0; i < num_objs; i++) { +- obj_array[i].DTP_obj_type = MPI_DATATYPE_NULL; +- obj_array[i].DTP_obj_count = 0; +- obj_array[i].DTP_obj_buf = NULL; +- obj_array[i].private_info = NULL; +- } ++ obj_priv->dtp = dtp; ++ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth, &obj_priv->attr_tree, ++ &obj->DTP_datatype, &obj->DTP_type_count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ if (attr_tree_depth) { ++ rc = MPI_Type_commit(&obj->DTP_datatype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ ++ rc = DTPI_populate_dtp_desc(obj_priv, dtpi, &obj->DTP_description); ++ DTPI_ERR_CHK_RC(rc); ++ ++ /* find the buffer size that we need */ ++ MPI_Aint true_lb, true_extent; ++ MPI_Aint lb, extent; ++ ++ rc = MPI_Type_get_true_extent(obj->DTP_datatype, &true_lb, &true_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ rc = MPI_Type_get_extent(obj->DTP_datatype, &lb, &extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ obj->DTP_bufsize = (extent * obj->DTP_type_count) + true_extent - extent; + +- (*dtp)->DTP_num_objs = num_objs; +- (*dtp)->DTP_pool_type = DTP_POOL_TYPE__STRUCT; +- (*dtp)->DTP_type_signature.DTP_pool_struct.DTP_num_types = num_types; +- (*dtp)->DTP_type_signature.DTP_pool_struct.DTP_basic_type = basic_types; +- (*dtp)->DTP_type_signature.DTP_pool_struct.DTP_basic_type_count = basic_type_counts; +- (*dtp)->DTP_obj_array = (struct DTP_obj_array_s *) obj_array; ++ /* if the true_lb occurs after the actual buffer start, make ++ * sure we allocate some additional bytes to accommodate for ++ * the data. if the true_lb occurs before the actual buffer ++ * start, we need to give an offset to the user to start ++ * sending or receiving from. */ ++ if (true_lb > 0) { ++ obj->DTP_bufsize += true_lb; ++ obj->DTP_buf_offset = 0; ++ } else { ++ obj->DTP_buf_offset = -true_lb; ++ } ++ ++ if (obj->DTP_bufsize <= maxbufsize) { ++ break; ++ } else { ++ rc = DTP_obj_free(*obj); ++ DTPI_ERR_CHK_RC(rc); ++ } ++ } + + fn_exit: +- return err; ++ DTPI_FUNC_EXIT(); ++ return rc; + + fn_fail: +- if (*dtp) { +- free(*dtp); +- } +- if (obj_array) { +- free(obj_array); +- } + goto fn_exit; + } + + /* +- * DTP_pool_free - free previously created pool ++ * DTP_obj_free - free previously created datatype idx + */ +-int DTP_pool_free(DTP_t dtp) ++int DTP_obj_free(DTP_obj_s obj) + { +- int err = DTP_SUCCESS; ++ DTPI_obj_s *obj_priv = (DTPI_obj_s *) obj.priv; ++ int rc = DTP_SUCCESS; ++ ++ DTPI_FUNC_ENTER(); + +- if (!dtp) { +- return DTP_ERR_OTHER; ++ if (obj_priv->dtp.DTP_base_type != obj.DTP_datatype) { ++ rc = MPI_Type_free(&obj.DTP_datatype); ++ DTPI_ERR_CHK_MPI_RC(rc); + } +- free(dtp->DTP_obj_array); +- free(dtp); + +- return err; ++ DTPI_obj_free(obj_priv); ++ DTPI_FREE(obj.priv); ++ DTPI_FREE(obj.DTP_description); ++ ++ DTPI_FUNC_EXIT(); ++ ++ fn_exit: ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; + } + + /* +- * DTP_obj_create - create obj_idx datatype inside the pool ++ * DTP_obj_buf_init - initialize buffer pattern + * +- * dtp: datatype pool handle +- * obj_idx: index of the created datatype inside the pool +- * val_start: start value for initialization of buffer ++ * obj: dtpool object handle ++ * val_start: start value for checking of buffer + * val_stride: increment between one buffer element and the following +- * val_count: number of elements to initialize in buffer +- * +- * NOTE1: for pools created with `DTP_pool_create_struct` `val_count` is +- * disregarded, `basic_type_counts` passed to the pool create +- * function is used instead for buffer initialization. +- * NOTE2: for receive datatypes 'val_count' can be set to 0. Every buffer +- * element in any case is initialized to 0 using 'memset'. +- * 'val_count' should be set to > 0 only for send datatypes. +- * ++ * val_count: number of elements to check in buffer + */ +-int DTP_obj_create(DTP_t dtp, int obj_idx, int val_start, int val_stride, MPI_Aint val_count) ++int DTP_obj_buf_init(DTP_obj_s obj, void *buf, int val_start, int val_stride, MPI_Aint val_count) + { +- int err = DTP_SUCCESS; +- int basic_type_count; +- int factor; +- struct DTPI_Par par; +- +- /* init user defined params */ +- par.user.val_start = val_start; +- par.user.val_stride = val_stride; +- par.user.val_count = val_count; +- par.user.obj_idx = obj_idx; +- +- if (dtp->DTP_pool_type == DTP_POOL_TYPE__BASIC) { +- /* get type signature for pool */ +- basic_type_count = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type_count; +- +- /* get biggest factor for count */ +- factor = DTPI_Get_max_fact(basic_type_count); +- +- switch (obj_idx) { +- case DTPI_OBJ_LAYOUT_SIMPLE__BASIC: +- case DTPI_OBJ_LAYOUT_SIMPLE__CONTIG: +- par.core.type_count = basic_type_count; +- par.core.type_blklen = 1; +- par.core.type_stride = 1; +- break; +- case DTPI_OBJ_LAYOUT_SIMPLE__VECTOR: +- case DTPI_OBJ_LAYOUT_SIMPLE__HVECTOR: +- case DTPI_OBJ_LAYOUT_SIMPLE__INDEXED: +- case DTPI_OBJ_LAYOUT_SIMPLE__HINDEXED: +- case DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_HINDEXED: +- par.core.type_count = basic_type_count; +- par.core.type_blklen = 1; +- par.core.type_stride = 2; +- break; +- case DTPI_OBJ_LAYOUT_LARGE_BLK__VECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__HVECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_C: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_F: +- if (factor > (basic_type_count / factor)) { +- par.core.type_count = basic_type_count / factor; +- par.core.type_blklen = factor; +- } else { +- par.core.type_count = factor; +- par.core.type_blklen = basic_type_count / factor; +- } +- par.core.type_stride = par.core.type_blklen + 1; +- break; +- case DTPI_OBJ_LAYOUT_LARGE_CNT__VECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__HVECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_C: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_F: +- if (factor > (basic_type_count / factor)) { +- par.core.type_count = factor; +- par.core.type_blklen = basic_type_count / factor; +- } else { +- par.core.type_count = basic_type_count / factor; +- par.core.type_blklen = factor; +- } +- par.core.type_stride = par.core.type_blklen + 1; +- break; +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__VECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HVECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_C: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_F: +- if (factor > (basic_type_count / factor)) { +- par.core.type_count = basic_type_count / factor; +- par.core.type_blklen = factor; +- } else { +- par.core.type_count = factor; +- par.core.type_blklen = basic_type_count / factor; +- } +- par.core.type_stride = par.core.type_blklen * 4; +- break; +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__VECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HVECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_C: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_F: +- if (factor > (basic_type_count / factor)) { +- par.core.type_count = factor; +- par.core.type_blklen = basic_type_count / factor; +- } else { +- par.core.type_count = basic_type_count / factor; +- par.core.type_blklen = factor; +- } +- par.core.type_stride = par.core.type_blklen * 4; +- break; +- default: +- err = DTP_ERR_OTHER; +- fprintf(stdout, "Type layout %d is not defined\n", obj_idx); +- fflush(stdout); +- goto fn_exit; +- } +- err = creators[obj_idx] (&par, dtp); +- } else { +- switch (obj_idx) { +- case DTPI_OBJ_LAYOUT_SIMPLE__STRUCT: +- /* TODO: add other struct layouts here */ +- break; +- default: +- err = DTP_ERR_OTHER; +- fprintf(stdout, "Type layout %d is not defined\n", obj_idx); +- fflush(stdout); +- goto fn_exit; +- } +- err = DTPI_Struct_create(&par, dtp); ++ MPI_Aint lb, extent; ++ int val = val_start; ++ int rem_val_count = val_count; ++ DTPI_obj_s *obj_priv = obj.priv; ++ int rc = DTP_SUCCESS; ++ ++ DTPI_FUNC_ENTER(); ++ ++ MPI_Type_get_extent(obj.DTP_datatype, &lb, &extent); ++ for (int i = 0; i < obj.DTP_type_count; i++) { ++ rc = DTPI_init_verify(obj_priv->dtp, obj, buf, obj_priv->attr_tree, ++ obj.DTP_buf_offset + i * extent, &val, val_stride, &rem_val_count, 0); ++ DTPI_ERR_CHK_RC(rc); + } + + fn_exit: +- return err; +-} +- +-/* +- * DTP_obj_free - free previously created datatype obj_idx +- */ +-int DTP_obj_free(DTP_t dtp, int obj_idx) +-{ +- int err = DTP_SUCCESS; +- DTPI_t *dtpi; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- +- if (dtp->DTP_pool_type == DTP_POOL_TYPE__BASIC) { +- switch (obj_idx) { +- case DTPI_OBJ_LAYOUT_SIMPLE__BASIC: +- case DTPI_OBJ_LAYOUT_SIMPLE__CONTIG: +- case DTPI_OBJ_LAYOUT_SIMPLE__VECTOR: +- case DTPI_OBJ_LAYOUT_SIMPLE__HVECTOR: +- case DTPI_OBJ_LAYOUT_SIMPLE__INDEXED: +- case DTPI_OBJ_LAYOUT_SIMPLE__HINDEXED: +- case DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__VECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__HVECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_C: +- case DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_F: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__VECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__HVECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_C: +- case DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_F: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__VECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HVECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_C: +- case DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_F: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__VECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HVECTOR: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_INDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_HINDEXED: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_C: +- case DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_F: +- err = MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- } +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 0; +- free(dtp->DTP_obj_array[obj_idx].DTP_obj_buf); +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = NULL; +- free(dtp->DTP_obj_array[obj_idx].private_info); +- dtp->DTP_obj_array[obj_idx].private_info = NULL; +- break; +- default: +- err = DTP_ERR_OTHER; +- fprintf(stdout, "Type structure %d is not defined\n", obj_idx); +- fflush(stdout); +- } +- } else { +- switch (obj_idx) { +- case DTPI_OBJ_LAYOUT_SIMPLE__STRUCT: +- if (dtpi) { +- free(dtpi->u.structure.displs); +- } +- err = MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- } +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 0; +- free(dtp->DTP_obj_array[obj_idx].DTP_obj_buf); +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = NULL; +- free(dtp->DTP_obj_array[obj_idx].private_info); +- dtp->DTP_obj_array[obj_idx].private_info = NULL; +- break; +- default: +- err = DTP_ERR_OTHER; +- fprintf(stdout, "Type structure %d is not defined\n", obj_idx); +- fflush(stdout); +- } +- } ++ DTPI_FUNC_EXIT(); ++ return rc; + +- return err; ++ fn_fail: ++ goto fn_exit; + } + + /* +- * DTP_obj_buf_check - check receive buffer to very correctness ++ * DTP_obj_buf_check - check buffer pattern + * +- * dtp: datatype pool handle +- * obj_idx: index of the datatype buffer to be checked ++ * obj: dtpool object handle + * val_start: start value for checking of buffer + * val_stride: increment between one buffer element and the following + * val_count: number of elements to check in buffer +- * +- * NOTE: for pools created with `DTP_pool_create_struct` `val_count` is +- * disregarded, `basic_type_counts` passed to the pool create +- * function is used instead to check buffer. + */ +-int DTP_obj_buf_check(DTP_t dtp, int obj_idx, int val_start, int val_stride, MPI_Aint val_count) ++int DTP_obj_buf_check(DTP_obj_s obj, void *buf, int val_start, int val_stride, MPI_Aint val_count) + { +- int err = DTP_SUCCESS; +- struct DTPI_Par par; +- DTPI_t *dtpi; +- DTP_pool_type pool_type; +- DTPI_obj_type_e obj_type; +- +- par.user.val_start = val_start; +- par.user.val_count = val_count; +- par.user.val_stride = val_stride; +- par.user.obj_idx = obj_idx; +- +- pool_type = dtp->DTP_pool_type; +- if (pool_type == DTP_POOL_TYPE__BASIC) { +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- obj_type = dtpi->obj_type; +- +- switch (obj_type) { +- case DTPI_OBJ_TYPE__BASIC: +- err = DTPI_Basic_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__CONTIG: +- err = DTPI_Contig_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__VECTOR: +- err = DTPI_Vector_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__HVECTOR: +- err = DTPI_Hvector_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__INDEXED: +- err = DTPI_Indexed_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__HINDEXED: +- err = DTPI_Hindexed_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__BLOCK_INDEXED: +- err = DTPI_Block_indexed_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__BLOCK_HINDEXED: +- err = DTPI_Block_hindexed_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__SUBARRAY_C: +- err = DTPI_Subarray_c_check_buf(&par, dtp); +- break; +- case DTPI_OBJ_TYPE__SUBARRAY_F: +- err = DTPI_Subarray_f_check_buf(&par, dtp); +- break; +- default: +- err = DTP_ERR_OTHER; +- fprintf(stdout, "No object at index %d\n", obj_idx); +- fflush(stdout); +- } +- } else { +- err = DTPI_Struct_check_buf(&par, dtp); ++ MPI_Aint lb, extent; ++ int val = val_start; ++ int rem_val_count = val_count; ++ DTPI_obj_s *obj_priv = obj.priv; ++ int rc = DTP_SUCCESS; ++ ++ DTPI_FUNC_ENTER(); ++ ++ MPI_Type_get_extent(obj.DTP_datatype, &lb, &extent); ++ for (int i = 0; i < obj.DTP_type_count; i++) { ++ rc = DTPI_init_verify(obj_priv->dtp, obj, buf, obj_priv->attr_tree, ++ obj.DTP_buf_offset + i * extent, &val, val_stride, &rem_val_count, 1); ++ DTPI_ERR_CHK_RC(rc); + } + +- return err; ++ fn_exit: ++ DTPI_FUNC_EXIT(); ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; + } +new file mode 100644 +--- /dev/null ++++ b/test/mpi/dtpools/src/dtpools_attr.c +@@ -0,0 +1,1489 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "dtpools_internal.h" ++#include ++#include ++#include ++ ++#define VALUE_FITS_IN_INT(val) ((val) <= INT_MAX) ++#define VALUE_FITS_IN_AINT(val) ((val) <= (((uint64_t) 1 << (sizeof(MPI_Aint) * 8 - 1)) - 1)) ++ ++#define confirm_extent(type, extent) \ ++ do { \ ++ MPI_Aint type_extent; \ ++ MPI_Type_extent(type, &type_extent); \ ++ if (type_extent != extent) { \ ++ fprintf(stderr, "expected extent of %" PRIu64 ", but got %zd\n", extent, type_extent); \ ++ fflush(stderr); \ ++ assert(0); \ ++ } \ ++ } while (0) ++ ++static int construct_contig(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ while (1) { ++ extent = attr->child_type_extent; ++ ++ int blklen_attr = DTPI_rand(dtpi) % DTPI_ATTR_CONTIG_BLKLEN__LAST; ++ if (blklen_attr == DTPI_ATTR_CONTIG_BLKLEN__ONE) ++ attr->u.contig.blklen = 1; ++ else if (blklen_attr == DTPI_ATTR_CONTIG_BLKLEN__SMALL) ++ attr->u.contig.blklen = DTPI_low_count(count); ++ else if (blklen_attr == DTPI_ATTR_CONTIG_BLKLEN__LARGE) ++ attr->u.contig.blklen = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ extent *= attr->u.contig.blklen; ++ ++ count /= attr->u.contig.blklen; ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ rc = MPI_Type_contiguous(attr->u.contig.blklen, type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_dup(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ int rc = DTP_SUCCESS; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ rc = MPI_Type_dup(type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_resized(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Aint true_lb, true_extent, lb, extent; ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ rc = MPI_Type_get_extent(type, &lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ extent = attr->child_type_extent; ++ ++ rc = MPI_Type_get_true_extent(type, &true_lb, &true_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ int64_t e; ++ while (1) { ++ /* initialize to original values */ ++ attr->u.resized.lb = lb; ++ attr->u.resized.extent = extent; ++ ++ int lb_attr = DTPI_rand(dtpi) % DTPI_ATTR_RESIZED_LB__LAST; ++ if (lb_attr == DTPI_ATTR_RESIZED_LB__PACKED) { ++ attr->u.resized.lb = true_lb; ++ } else if (lb_attr == DTPI_ATTR_RESIZED_LB__LOW) { ++ attr->u.resized.lb = lb - 2 * extent; ++ } else if (lb_attr == DTPI_ATTR_RESIZED_LB__VERY_LOW) { ++ attr->u.resized.lb = lb - 10 * extent; ++ } else if (lb_attr == DTPI_ATTR_RESIZED_LB__HIGH) { ++ attr->u.resized.lb = lb + 2 * extent; ++ } else if (lb_attr == DTPI_ATTR_RESIZED_LB__VERY_HIGH) { ++ attr->u.resized.lb = lb + 10 * extent; ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ int extent_attr = DTPI_rand(dtpi) % DTPI_ATTR_RESIZED_EXTENT__LAST; ++ if (extent_attr == DTPI_ATTR_RESIZED_EXTENT__PACKED) { ++ e = (int64_t) true_extent; ++ } else if (extent_attr == DTPI_ATTR_RESIZED_EXTENT__HIGH) { ++ e = ((int64_t) 2) * extent; ++ } else if (extent_attr == DTPI_ATTR_RESIZED_EXTENT__VERY_HIGH) { ++ e = ((int64_t) 10) * extent; ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ if (!VALUE_FITS_IN_AINT(e * count)) ++ continue; ++ ++ attr->u.resized.extent = (MPI_Aint) e; ++ break; ++ } ++ ++ rc = MPI_Type_create_resized(type, attr->u.resized.lb, attr->u.resized.extent, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_vector(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ MPI_Aint tmp_count = count; ++ while (1) { ++ retry: ++ extent = attr->child_type_extent; ++ ++ /* reset necessary variables in each iteration, in case we ++ * need to go through this loop more than once */ ++ count = tmp_count; ++ ++ int numblks_attr = DTPI_rand(dtpi) % DTPI_ATTR_VECTOR_NUMBLKS__LAST; ++ if (numblks_attr == DTPI_ATTR_VECTOR_NUMBLKS__ONE) ++ attr->u.vector.numblks = 1; ++ else if (numblks_attr == DTPI_ATTR_VECTOR_NUMBLKS__SMALL) ++ attr->u.vector.numblks = DTPI_low_count(count); ++ else if (numblks_attr == DTPI_ATTR_VECTOR_NUMBLKS__LARGE) ++ attr->u.vector.numblks = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.vector.numblks; ++ ++ int blklen_attr = DTPI_rand(dtpi) % DTPI_ATTR_VECTOR_BLKLEN__LAST; ++ if (blklen_attr == DTPI_ATTR_VECTOR_BLKLEN__ONE) ++ attr->u.vector.blklen = 1; ++ else if (blklen_attr == DTPI_ATTR_VECTOR_BLKLEN__SMALL) ++ attr->u.vector.blklen = DTPI_low_count(count); ++ else if (blklen_attr == DTPI_ATTR_VECTOR_BLKLEN__LARGE) ++ attr->u.vector.blklen = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.vector.blklen; ++ ++ int stride_attr = DTPI_rand(dtpi) % DTPI_ATTR_VECTOR_STRIDE__LAST; ++ int64_t stride; ++ if (stride_attr == DTPI_ATTR_VECTOR_STRIDE__SMALL) ++ stride = (int64_t) attr->u.vector.blklen + 1; ++ else if (stride_attr == DTPI_ATTR_VECTOR_STRIDE__LARGE) ++ stride = (int64_t) attr->u.vector.blklen * 4; ++ else if (stride_attr == DTPI_ATTR_VECTOR_STRIDE__NEGATIVE) ++ stride = ((int64_t) (-2)) * attr->u.vector.blklen; ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ if (!VALUE_FITS_IN_INT(stride)) ++ goto retry; ++ attr->u.vector.stride = (int) stride; ++ ++ /* calculate the extent for our datatype, to decide whether we ++ * want to use this or try again */ ++ int max_displ_idx = -1; ++ int min_displ_idx = -1; ++ for (int i = 0; i < attr->u.vector.numblks; i++) { ++ if (max_displ_idx == -1) ++ max_displ_idx = i; ++ else if (attr->u.vector.stride > 0) ++ max_displ_idx = i; ++ ++ if (min_displ_idx == -1) ++ min_displ_idx = i; ++ else if (attr->u.vector.stride < 0) ++ min_displ_idx = i; ++ } ++ ++ extent *= attr->u.vector.stride * max_displ_idx - ++ attr->u.vector.stride * min_displ_idx + attr->u.vector.blklen; ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ rc = MPI_Type_vector(attr->u.vector.numblks, ++ attr->u.vector.blklen, attr->u.vector.stride, type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_hvector(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ MPI_Aint tmp_count = count; ++ while (1) { ++ retry: ++ extent = attr->child_type_extent; ++ ++ /* reset necessary variables in each iteration, in case we ++ * need to go through this loop more than once */ ++ count = tmp_count; ++ ++ int numblks_attr = DTPI_rand(dtpi) % DTPI_ATTR_HVECTOR_NUMBLKS__LAST; ++ if (numblks_attr == DTPI_ATTR_HVECTOR_NUMBLKS__ONE) ++ attr->u.hvector.numblks = 1; ++ else if (numblks_attr == DTPI_ATTR_HVECTOR_NUMBLKS__SMALL) ++ attr->u.hvector.numblks = DTPI_low_count(count); ++ else if (numblks_attr == DTPI_ATTR_HVECTOR_NUMBLKS__LARGE) ++ attr->u.hvector.numblks = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.hvector.numblks; ++ ++ int blklen_attr = DTPI_rand(dtpi) % DTPI_ATTR_HVECTOR_BLKLEN__LAST; ++ if (blklen_attr == DTPI_ATTR_HVECTOR_BLKLEN__ONE) ++ attr->u.hvector.blklen = 1; ++ else if (blklen_attr == DTPI_ATTR_HVECTOR_BLKLEN__SMALL) ++ attr->u.hvector.blklen = DTPI_low_count(count); ++ else if (blklen_attr == DTPI_ATTR_HVECTOR_BLKLEN__LARGE) ++ attr->u.hvector.blklen = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.hvector.blklen; ++ ++ /* FIXME: we should detect the maximum alignment needed by the ++ * compiler instead of arbitrarily incrementing the stride by ++ * a constant value. */ ++ int stride_attr = DTPI_rand(dtpi) % DTPI_ATTR_HVECTOR_STRIDE__LAST; ++ int64_t stride; ++ if (stride_attr == DTPI_ATTR_HVECTOR_STRIDE__SMALL) { ++ stride = (int64_t) attr->u.hvector.blklen * attr->child_type_extent + 8; ++ } else if (stride_attr == DTPI_ATTR_HVECTOR_STRIDE__LARGE) { ++ stride = (int64_t) attr->u.hvector.blklen * attr->child_type_extent * 4 + 8; ++ } else if (stride_attr == DTPI_ATTR_HVECTOR_STRIDE__NEGATIVE) { ++ stride = ((int64_t) (-2)) * attr->u.hvector.blklen * attr->child_type_extent * 4 - 8; ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ if (!VALUE_FITS_IN_AINT(stride)) ++ goto retry; ++ attr->u.hvector.stride = (MPI_Aint) stride; ++ ++ /* calculate the extent for our datatype, to decide whether we ++ * want to use this or try again */ ++ int max_displ_idx = -1; ++ int min_displ_idx = -1; ++ for (int i = 0; i < attr->u.hvector.numblks; i++) { ++ if (max_displ_idx == -1) ++ max_displ_idx = i; ++ else if (attr->u.hvector.stride > 0) ++ max_displ_idx = i; ++ ++ if (min_displ_idx == -1) ++ min_displ_idx = i; ++ else if (attr->u.hvector.stride < 0) ++ min_displ_idx = i; ++ } ++ ++ extent = attr->u.hvector.stride * max_displ_idx - ++ attr->u.hvector.stride * min_displ_idx + ++ attr->u.hvector.blklen * attr->child_type_extent; ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ rc = MPI_Type_hvector(attr->u.hvector.numblks, ++ attr->u.hvector.blklen, attr->u.hvector.stride, type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_blkindx(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ MPI_Aint tmp_count = count; ++ attr->u.blkindx.array_of_displs = NULL; ++ while (1) { ++ retry: ++ extent = attr->child_type_extent; ++ ++ /* reset necessary variables in each iteration, in case we ++ * need to go through this loop more than once */ ++ count = tmp_count; ++ if (attr->u.blkindx.array_of_displs) ++ DTPI_FREE(attr->u.blkindx.array_of_displs); ++ ++ int numblks_attr = DTPI_rand(dtpi) % DTPI_ATTR_BLKINDX_NUMBLKS__LAST; ++ if (numblks_attr == DTPI_ATTR_BLKINDX_NUMBLKS__ONE) ++ attr->u.blkindx.numblks = 1; ++ else if (numblks_attr == DTPI_ATTR_BLKINDX_NUMBLKS__SMALL) ++ attr->u.blkindx.numblks = DTPI_low_count(count); ++ else if (numblks_attr == DTPI_ATTR_BLKINDX_NUMBLKS__LARGE) ++ attr->u.blkindx.numblks = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.blkindx.numblks; ++ ++ int blklen_attr = DTPI_rand(dtpi) % DTPI_ATTR_BLKINDX_BLKLEN__LAST; ++ if (blklen_attr == DTPI_ATTR_BLKINDX_BLKLEN__ONE) ++ attr->u.blkindx.blklen = 1; ++ else if (blklen_attr == DTPI_ATTR_BLKINDX_BLKLEN__SMALL) ++ attr->u.blkindx.blklen = DTPI_low_count(count); ++ else if (blklen_attr == DTPI_ATTR_BLKINDX_BLKLEN__LARGE) ++ attr->u.blkindx.blklen = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.blkindx.blklen; ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.blkindx.array_of_displs, attr->u.blkindx.numblks * sizeof(int), ++ rc); ++ ++ uint64_t total_displ = 0; ++ int displs_attr = DTPI_rand(dtpi) % DTPI_ATTR_BLKINDX_DISPLS__LAST; ++ if (displs_attr == DTPI_ATTR_BLKINDX_DISPLS__SMALL) { ++ for (int i = 0; i < attr->u.blkindx.numblks; i++) { ++ attr->u.blkindx.array_of_displs[i] = (int) total_displ; ++ total_displ += attr->u.blkindx.blklen + 1; ++ if (!VALUE_FITS_IN_INT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_BLKINDX_DISPLS__LARGE) { ++ for (int i = 0; i < attr->u.blkindx.numblks; i++) { ++ attr->u.blkindx.array_of_displs[i] = (int) total_displ; ++ total_displ += attr->u.blkindx.blklen * 4; ++ if (!VALUE_FITS_IN_INT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_BLKINDX_DISPLS__REDUCING) { ++ for (int i = 0; i < attr->u.blkindx.numblks; i++) { ++ int idx = attr->u.blkindx.numblks - i - 1; ++ attr->u.blkindx.array_of_displs[idx] = (int) total_displ; ++ total_displ += attr->u.blkindx.blklen + 1; ++ if (!VALUE_FITS_IN_INT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_BLKINDX_DISPLS__UNEVEN) { ++ for (int i = 0; i < attr->u.blkindx.numblks; i++) { ++ attr->u.blkindx.array_of_displs[i] = (int) total_displ; ++ total_displ += attr->u.blkindx.blklen + i; ++ if (!VALUE_FITS_IN_INT(total_displ)) ++ goto retry; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ /* calculate the extent for our datatype, to decide whether we ++ * want to use this or try again */ ++ int max_displ_idx = -1; ++ int min_displ_idx = -1; ++ for (int i = 0; i < attr->u.blkindx.numblks; i++) { ++ if (max_displ_idx == -1) ++ max_displ_idx = i; ++ else if (attr->u.blkindx.array_of_displs[i] > ++ attr->u.blkindx.array_of_displs[max_displ_idx]) ++ max_displ_idx = i; ++ ++ if (min_displ_idx == -1) ++ min_displ_idx = i; ++ else if (attr->u.blkindx.array_of_displs[i] < ++ attr->u.blkindx.array_of_displs[min_displ_idx]) ++ min_displ_idx = i; ++ } ++ ++ extent *= attr->u.blkindx.array_of_displs[max_displ_idx] - ++ attr->u.blkindx.array_of_displs[min_displ_idx] + attr->u.blkindx.blklen; ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ rc = MPI_Type_create_indexed_block(attr->u.blkindx.numblks, ++ attr->u.blkindx.blklen, ++ attr->u.blkindx.array_of_displs, type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_blkhindx(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ MPI_Aint tmp_count = count; ++ while (1) { ++ retry: ++ extent = attr->child_type_extent; ++ ++ /* reset necessary variables in each iteration, in case we ++ * need to go through this loop more than once */ ++ count = tmp_count; ++ if (attr->u.blkhindx.array_of_displs) ++ DTPI_FREE(attr->u.blkhindx.array_of_displs); ++ ++ int numblks_attr = DTPI_rand(dtpi) % DTPI_ATTR_BLKHINDX_NUMBLKS__LAST; ++ if (numblks_attr == DTPI_ATTR_BLKHINDX_NUMBLKS__ONE) ++ attr->u.blkhindx.numblks = 1; ++ else if (numblks_attr == DTPI_ATTR_BLKHINDX_NUMBLKS__SMALL) ++ attr->u.blkhindx.numblks = DTPI_low_count(count); ++ else if (numblks_attr == DTPI_ATTR_BLKHINDX_NUMBLKS__LARGE) ++ attr->u.blkhindx.numblks = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.blkhindx.numblks; ++ ++ int blklen_attr = DTPI_rand(dtpi) % DTPI_ATTR_BLKHINDX_BLKLEN__LAST; ++ if (blklen_attr == DTPI_ATTR_BLKHINDX_BLKLEN__ONE) ++ attr->u.blkhindx.blklen = 1; ++ else if (blklen_attr == DTPI_ATTR_BLKHINDX_BLKLEN__SMALL) ++ attr->u.blkhindx.blklen = DTPI_low_count(count); ++ else if (blklen_attr == DTPI_ATTR_BLKHINDX_BLKLEN__LARGE) ++ attr->u.blkhindx.blklen = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.blkhindx.blklen; ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.blkhindx.array_of_displs, ++ attr->u.blkhindx.numblks * sizeof(MPI_Aint), rc); ++ ++ /* FIXME: we should detect the maximum alignment needed by the ++ * compiler instead of arbitrarily incrementing the stride by ++ * a constant value. */ ++ uint64_t total_displ = 8; ++ int displs_attr = DTPI_rand(dtpi) % DTPI_ATTR_BLKHINDX_DISPLS__LAST; ++ if (displs_attr == DTPI_ATTR_BLKHINDX_DISPLS__SMALL) { ++ for (int i = 0; i < attr->u.blkhindx.numblks; i++) { ++ attr->u.blkhindx.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += (attr->u.blkhindx.blklen + 1) * attr->child_type_extent; ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_BLKHINDX_DISPLS__LARGE) { ++ for (int i = 0; i < attr->u.blkhindx.numblks; i++) { ++ attr->u.blkhindx.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += (attr->u.blkhindx.blklen * 4) * attr->child_type_extent; ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_BLKHINDX_DISPLS__REDUCING) { ++ for (int i = 0; i < attr->u.blkhindx.numblks; i++) { ++ int idx = attr->u.blkhindx.numblks - i - 1; ++ attr->u.blkhindx.array_of_displs[idx] = (MPI_Aint) total_displ; ++ total_displ += (attr->u.blkhindx.blklen + 1) * attr->child_type_extent; ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_BLKHINDX_DISPLS__UNEVEN) { ++ for (int i = 0; i < attr->u.blkhindx.numblks; i++) { ++ attr->u.blkhindx.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += (attr->u.blkhindx.blklen + i) * attr->child_type_extent; ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ /* calculate the extent for our datatype, to decide whether we ++ * want to use this or try again */ ++ int max_displ_idx = -1; ++ int min_displ_idx = -1; ++ for (int i = 0; i < attr->u.blkhindx.numblks; i++) { ++ if (max_displ_idx == -1) ++ max_displ_idx = i; ++ else if (attr->u.blkhindx.array_of_displs[i] > ++ attr->u.blkhindx.array_of_displs[max_displ_idx]) ++ max_displ_idx = i; ++ ++ if (min_displ_idx == -1) ++ min_displ_idx = i; ++ else if (attr->u.blkhindx.array_of_displs[i] < ++ attr->u.blkhindx.array_of_displs[min_displ_idx]) ++ min_displ_idx = i; ++ } ++ ++ extent = attr->u.blkhindx.array_of_displs[max_displ_idx] - ++ attr->u.blkhindx.array_of_displs[min_displ_idx] + ++ attr->u.blkindx.blklen * attr->child_type_extent; ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ rc = MPI_Type_create_hindexed_block(attr->u.blkhindx.numblks, ++ attr->u.blkhindx.blklen, ++ attr->u.blkhindx.array_of_displs, type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_indexed(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ MPI_Aint tmp_count = count; ++ attr->u.indexed.array_of_blklens = NULL; ++ attr->u.indexed.array_of_displs = NULL; ++ while (1) { ++ retry: ++ extent = attr->child_type_extent; ++ ++ /* reset necessary variables in each iteration, in case we ++ * need to go through this loop more than once */ ++ count = tmp_count; ++ if (attr->u.indexed.array_of_blklens) ++ DTPI_FREE(attr->u.indexed.array_of_blklens); ++ if (attr->u.indexed.array_of_displs) ++ DTPI_FREE(attr->u.indexed.array_of_displs); ++ ++ int numblks_attr = DTPI_rand(dtpi) % DTPI_ATTR_INDEXED_NUMBLKS__LAST; ++ if (numblks_attr == DTPI_ATTR_INDEXED_NUMBLKS__ONE) ++ attr->u.indexed.numblks = 1; ++ else if (numblks_attr == DTPI_ATTR_INDEXED_NUMBLKS__SMALL) ++ attr->u.indexed.numblks = DTPI_low_count(count); ++ else if (numblks_attr == DTPI_ATTR_INDEXED_NUMBLKS__LARGE) ++ attr->u.indexed.numblks = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.indexed.numblks; ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.indexed.array_of_blklens, attr->u.indexed.numblks * sizeof(int), ++ rc); ++ ++ int total_blklen = 0; ++ int blklen_attr = DTPI_rand(dtpi) % DTPI_ATTR_INDEXED_BLKLEN__LAST; ++ if (blklen_attr == DTPI_ATTR_INDEXED_BLKLEN__ONE) { ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ attr->u.indexed.array_of_blklens[i] = 1; ++ total_blklen += attr->u.indexed.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_INDEXED_BLKLEN__SMALL) { ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ attr->u.indexed.array_of_blklens[i] = DTPI_low_count(count); ++ total_blklen += attr->u.indexed.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_INDEXED_BLKLEN__LARGE) { ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ attr->u.indexed.array_of_blklens[i] = DTPI_high_count(count); ++ total_blklen += attr->u.indexed.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_INDEXED_BLKLEN__UNEVEN) { ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ if (i % 2 == 0) ++ attr->u.indexed.array_of_blklens[i] = DTPI_low_count(count) + 1; ++ else ++ attr->u.indexed.array_of_blklens[i] = DTPI_low_count(count) - 1; ++ total_blklen += attr->u.indexed.array_of_blklens[i]; ++ } ++ if (attr->u.indexed.numblks % 2) { ++ /* if we have an odd number of blocks, adjust the counts */ ++ int idx = attr->u.indexed.numblks - 1; ++ attr->u.indexed.array_of_blklens[idx]--; ++ total_blklen--; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count *= attr->u.indexed.numblks; ++ count /= total_blklen; ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.indexed.array_of_displs, attr->u.indexed.numblks * sizeof(int), ++ rc); ++ ++ uint64_t total_displ = 0; ++ int displs_attr = DTPI_rand(dtpi) % DTPI_ATTR_INDEXED_DISPLS__LAST; ++ if (displs_attr == DTPI_ATTR_INDEXED_DISPLS__SMALL) { ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ attr->u.indexed.array_of_displs[i] = (int) total_displ; ++ total_displ += attr->u.indexed.array_of_blklens[i] + 1; ++ if (!VALUE_FITS_IN_INT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_INDEXED_DISPLS__LARGE) { ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ attr->u.indexed.array_of_displs[i] = (int) total_displ; ++ total_displ += attr->u.indexed.array_of_blklens[i] * 4; ++ if (!VALUE_FITS_IN_INT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_INDEXED_DISPLS__REDUCING) { ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ int idx = attr->u.indexed.numblks - i - 1; ++ attr->u.indexed.array_of_displs[idx] = (int) total_displ; ++ total_displ += attr->u.indexed.array_of_blklens[idx] + 1; ++ if (!VALUE_FITS_IN_INT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_INDEXED_DISPLS__UNEVEN) { ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ attr->u.indexed.array_of_displs[i] = (int) total_displ; ++ total_displ += attr->u.indexed.array_of_blklens[i] + i; ++ if (!VALUE_FITS_IN_INT(total_displ)) ++ goto retry; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ /* calculate the extent for our datatype, to decide whether we ++ * want to use this or try again */ ++ int max_displ_idx = -1; ++ int min_displ_idx = -1; ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ if (attr->u.indexed.array_of_blklens[i]) { ++ if (max_displ_idx == -1) ++ max_displ_idx = i; ++ else if (attr->u.indexed.array_of_displs[i] > ++ attr->u.indexed.array_of_displs[max_displ_idx]) ++ max_displ_idx = i; ++ ++ if (min_displ_idx == -1) ++ min_displ_idx = i; ++ else if (attr->u.indexed.array_of_displs[i] < ++ attr->u.indexed.array_of_displs[min_displ_idx]) ++ min_displ_idx = i; ++ } ++ } ++ ++ extent *= attr->u.indexed.array_of_displs[max_displ_idx] - ++ attr->u.indexed.array_of_displs[min_displ_idx] + ++ attr->u.indexed.array_of_blklens[max_displ_idx]; ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ rc = MPI_Type_indexed(attr->u.indexed.numblks, ++ attr->u.indexed.array_of_blklens, ++ attr->u.indexed.array_of_displs, type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_hindexed(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ MPI_Aint tmp_count = count; ++ attr->u.hindexed.array_of_blklens = NULL; ++ attr->u.hindexed.array_of_displs = NULL; ++ while (1) { ++ retry: ++ extent = attr->child_type_extent; ++ ++ /* reset necessary variables in each iteration, in case we ++ * need to go through this loop more than once */ ++ count = tmp_count; ++ if (attr->u.hindexed.array_of_blklens) ++ DTPI_FREE(attr->u.hindexed.array_of_blklens); ++ if (attr->u.hindexed.array_of_displs) ++ DTPI_FREE(attr->u.hindexed.array_of_displs); ++ ++ int numblks_attr = DTPI_rand(dtpi) % DTPI_ATTR_HINDEXED_NUMBLKS__LAST; ++ if (numblks_attr == DTPI_ATTR_HINDEXED_NUMBLKS__ONE) ++ attr->u.hindexed.numblks = 1; ++ else if (numblks_attr == DTPI_ATTR_HINDEXED_NUMBLKS__SMALL) ++ attr->u.hindexed.numblks = DTPI_low_count(count); ++ else if (numblks_attr == DTPI_ATTR_HINDEXED_NUMBLKS__LARGE) ++ attr->u.hindexed.numblks = DTPI_high_count(count); ++ else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.hindexed.numblks; ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.hindexed.array_of_blklens, ++ attr->u.hindexed.numblks * sizeof(int), rc); ++ ++ int total_blklen = 0; ++ int blklen_attr = DTPI_rand(dtpi) % DTPI_ATTR_HINDEXED_BLKLEN__LAST; ++ if (blklen_attr == DTPI_ATTR_HINDEXED_BLKLEN__ONE) { ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ attr->u.hindexed.array_of_blklens[i] = 1; ++ total_blklen += attr->u.hindexed.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_HINDEXED_BLKLEN__SMALL) { ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ attr->u.hindexed.array_of_blklens[i] = DTPI_low_count(count); ++ total_blklen += attr->u.hindexed.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_HINDEXED_BLKLEN__LARGE) { ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ attr->u.hindexed.array_of_blklens[i] = DTPI_high_count(count); ++ total_blklen += attr->u.hindexed.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_HINDEXED_BLKLEN__UNEVEN) { ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ if (i % 2 == 0) ++ attr->u.hindexed.array_of_blklens[i] = DTPI_low_count(count) + 1; ++ else ++ attr->u.hindexed.array_of_blklens[i] = DTPI_low_count(count) - 1; ++ total_blklen += attr->u.hindexed.array_of_blklens[i]; ++ } ++ if (attr->u.hindexed.numblks % 2) { ++ /* if we have an odd number of blocks, adjust the counts */ ++ int idx = attr->u.hindexed.numblks - 1; ++ attr->u.hindexed.array_of_blklens[idx]--; ++ total_blklen--; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count *= attr->u.hindexed.numblks; ++ count /= total_blklen; ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.hindexed.array_of_displs, ++ attr->u.hindexed.numblks * sizeof(MPI_Aint), rc); ++ ++ /* FIXME: we should detect the maximum alignment needed by the ++ * compiler instead of arbitrarily incrementing the stride by ++ * a constant value. */ ++ uint64_t total_displ = 8; ++ int displs_attr = DTPI_rand(dtpi) % DTPI_ATTR_HINDEXED_DISPLS__LAST; ++ if (displs_attr == DTPI_ATTR_HINDEXED_DISPLS__SMALL) { ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ attr->u.hindexed.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += attr->child_type_extent * (attr->u.hindexed.array_of_blklens[i] + 1); ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_HINDEXED_DISPLS__LARGE) { ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ attr->u.hindexed.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += attr->child_type_extent * (attr->u.hindexed.array_of_blklens[i] * 4); ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_HINDEXED_DISPLS__REDUCING) { ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ int idx = attr->u.hindexed.numblks - i - 1; ++ attr->u.hindexed.array_of_displs[idx] = (MPI_Aint) total_displ; ++ total_displ += ++ attr->child_type_extent * (attr->u.hindexed.array_of_blklens[idx] + 1); ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_HINDEXED_DISPLS__UNEVEN) { ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ attr->u.hindexed.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += attr->child_type_extent * (attr->u.hindexed.array_of_blklens[i] + i); ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ /* calculate the extent for our datatype, to decide whether we ++ * want to use this or try again */ ++ int max_displ_idx = -1; ++ int min_displ_idx = -1; ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ if (attr->u.hindexed.array_of_blklens[i]) { ++ if (max_displ_idx == -1) ++ max_displ_idx = i; ++ else if (attr->u.hindexed.array_of_displs[i] > ++ attr->u.hindexed.array_of_displs[max_displ_idx]) ++ max_displ_idx = i; ++ ++ if (min_displ_idx == -1) ++ min_displ_idx = i; ++ else if (attr->u.hindexed.array_of_displs[i] < ++ attr->u.hindexed.array_of_displs[min_displ_idx]) ++ min_displ_idx = i; ++ } ++ } ++ ++ extent = attr->u.hindexed.array_of_displs[max_displ_idx] - ++ attr->u.hindexed.array_of_displs[min_displ_idx] + ++ attr->u.hindexed.array_of_blklens[max_displ_idx] * extent; ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ rc = MPI_Type_hindexed(attr->u.hindexed.numblks, ++ attr->u.hindexed.array_of_blklens, ++ attr->u.hindexed.array_of_displs, type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_subarray(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ int ndims_attr = DTPI_rand(dtpi) % DTPI_ATTR_SUBARRAY_NDIMS__LAST; ++ ++ if (ndims_attr == DTPI_ATTR_SUBARRAY_NDIMS__SMALL) { ++ attr->u.subarray.ndims = 2; ++ } else if (ndims_attr == DTPI_ATTR_SUBARRAY_NDIMS__LARGE) { ++ attr->u.subarray.ndims = 4; ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.subarray.array_of_sizes, attr->u.subarray.ndims * sizeof(int), rc); ++ DTPI_ALLOC_OR_FAIL(attr->u.subarray.array_of_subsizes, ++ attr->u.subarray.ndims * sizeof(int), rc); ++ DTPI_ALLOC_OR_FAIL(attr->u.subarray.array_of_starts, attr->u.subarray.ndims * sizeof(int), rc); ++ ++ MPI_Aint tmp_count = count; ++ while (1) { ++ extent = attr->child_type_extent; ++ ++ /* reset necessary variables in each iteration, in case we ++ * need to go through this loop more than once */ ++ count = tmp_count; ++ ++ int subsizes_attr = DTPI_rand(dtpi) % DTPI_ATTR_SUBARRAY_SUBSIZES__LAST; ++ if (subsizes_attr == DTPI_ATTR_SUBARRAY_SUBSIZES__ONE) { ++ for (int i = 0; i < attr->u.subarray.ndims; i++) { ++ attr->u.subarray.array_of_subsizes[i] = 1; ++ count /= attr->u.subarray.array_of_subsizes[i]; ++ } ++ } else if (subsizes_attr == DTPI_ATTR_SUBARRAY_SUBSIZES__SMALL) { ++ for (int i = 0; i < attr->u.subarray.ndims; i++) { ++ attr->u.subarray.array_of_subsizes[i] = DTPI_low_count(count); ++ count /= attr->u.subarray.array_of_subsizes[i]; ++ } ++ } else if (subsizes_attr == DTPI_ATTR_SUBARRAY_SUBSIZES__LARGE) { ++ for (int i = 0; i < attr->u.subarray.ndims; i++) { ++ attr->u.subarray.array_of_subsizes[i] = DTPI_high_count(count); ++ count /= attr->u.subarray.array_of_subsizes[i]; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ int sizes_attr = DTPI_rand(dtpi) % DTPI_ATTR_SUBARRAY_SIZES__LAST; ++ if (sizes_attr == DTPI_ATTR_SUBARRAY_SIZES__ONE) { ++ for (int i = 0; i < attr->u.subarray.ndims; i++) { ++ attr->u.subarray.array_of_sizes[i] = attr->u.subarray.array_of_subsizes[i]; ++ attr->u.subarray.array_of_starts[i] = 0; ++ extent *= attr->u.subarray.array_of_sizes[i]; ++ } ++ } else if (sizes_attr == DTPI_ATTR_SUBARRAY_SIZES__SMALL) { ++ for (int i = 0; i < attr->u.subarray.ndims; i++) { ++ attr->u.subarray.array_of_sizes[i] = attr->u.subarray.array_of_subsizes[i] + 1; ++ attr->u.subarray.array_of_starts[i] = 1; ++ extent *= attr->u.subarray.array_of_sizes[i]; ++ } ++ } else if (sizes_attr == DTPI_ATTR_SUBARRAY_SIZES__LARGE) { ++ for (int i = 0; i < attr->u.subarray.ndims; i++) { ++ attr->u.subarray.array_of_sizes[i] = attr->u.subarray.array_of_subsizes[i] * 4; ++ attr->u.subarray.array_of_starts[i] = attr->u.subarray.array_of_subsizes[i]; ++ extent *= attr->u.subarray.array_of_sizes[i]; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ int order_attr = DTPI_rand(dtpi) % DTPI_ATTR_SUBARRAY_ORDER__LAST; ++ if (order_attr == DTPI_ATTR_SUBARRAY_ORDER__C) { ++ attr->u.subarray.order = MPI_ORDER_C; ++ } else if (order_attr == DTPI_ATTR_SUBARRAY_ORDER__FORTRAN) { ++ attr->u.subarray.order = MPI_ORDER_FORTRAN; ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ rc = MPI_Type_create_subarray(attr->u.subarray.ndims, ++ attr->u.subarray.array_of_sizes, ++ attr->u.subarray.array_of_subsizes, ++ attr->u.subarray.array_of_starts, ++ attr->u.subarray.order, type, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = (MPI_Aint) count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int construct_struct(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s * attr, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ MPI_Datatype type; ++ MPI_Aint count = 0; ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ uint64_t extent; ++ ++ /* setup the child type first */ ++ rc = DTPI_construct_datatype(dtp, attr_tree_depth - 1, &attr->child, &type, &count); ++ DTPI_ERR_CHK_RC(rc); ++ ++ MPI_Aint tmp_lb; ++ rc = MPI_Type_get_extent(type, &tmp_lb, &attr->child_type_extent); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ MPI_Aint tmp_count = count; ++ attr->u.structure.array_of_blklens = NULL; ++ attr->u.structure.array_of_displs = NULL; ++ while (1) { ++ retry: ++ extent = attr->child_type_extent; ++ ++ /* reset necessary variables in each iteration, in case we ++ * need to go through this loop more than once */ ++ count = tmp_count; ++ if (attr->u.structure.array_of_blklens) ++ DTPI_FREE(attr->u.structure.array_of_blklens); ++ if (attr->u.structure.array_of_displs) ++ DTPI_FREE(attr->u.structure.array_of_displs); ++ ++ int numblks_attr = DTPI_rand(dtpi) % DTPI_ATTR_STRUCTURE_NUMBLKS__LAST; ++ if (numblks_attr == DTPI_ATTR_STRUCTURE_NUMBLKS__ONE) { ++ attr->u.structure.numblks = 1; ++ } else if (numblks_attr == DTPI_ATTR_STRUCTURE_NUMBLKS__SMALL) { ++ attr->u.structure.numblks = DTPI_low_count(count); ++ } else if (numblks_attr == DTPI_ATTR_STRUCTURE_NUMBLKS__LARGE) { ++ attr->u.structure.numblks = DTPI_high_count(count); ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count /= attr->u.structure.numblks; ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.structure.array_of_blklens, ++ attr->u.structure.numblks * sizeof(int), rc); ++ ++ int total_blklen = 0; ++ int blklen_attr = DTPI_rand(dtpi) % DTPI_ATTR_STRUCTURE_BLKLEN__LAST; ++ if (blklen_attr == DTPI_ATTR_STRUCTURE_BLKLEN__ONE) { ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ attr->u.structure.array_of_blklens[i] = 1; ++ total_blklen += attr->u.structure.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_STRUCTURE_BLKLEN__SMALL) { ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ attr->u.structure.array_of_blklens[i] = DTPI_low_count(count); ++ total_blklen += attr->u.structure.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_STRUCTURE_BLKLEN__LARGE) { ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ attr->u.structure.array_of_blklens[i] = DTPI_high_count(count); ++ total_blklen += attr->u.structure.array_of_blklens[i]; ++ } ++ } else if (blklen_attr == DTPI_ATTR_STRUCTURE_BLKLEN__UNEVEN) { ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ if (i % 2 == 0) ++ attr->u.structure.array_of_blklens[i] = DTPI_low_count(count) + 1; ++ else ++ attr->u.structure.array_of_blklens[i] = DTPI_low_count(count) - 1; ++ total_blklen += attr->u.structure.array_of_blklens[i]; ++ } ++ if (attr->u.structure.numblks % 2) { ++ /* if we have an odd number of blocks, adjust the counts */ ++ int idx = attr->u.structure.numblks - 1; ++ attr->u.structure.array_of_blklens[idx]--; ++ total_blklen--; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ count *= attr->u.structure.numblks; ++ count /= total_blklen; ++ ++ DTPI_ALLOC_OR_FAIL(attr->u.structure.array_of_displs, ++ attr->u.structure.numblks * sizeof(MPI_Aint), rc); ++ ++ /* FIXME: we should detect the maximum alignment needed by the ++ * compiler instead of arbitrarily incrementing the stride by ++ * a constant value. */ ++ uint64_t total_displ = 8; ++ int displs_attr = DTPI_rand(dtpi) % DTPI_ATTR_STRUCTURE_DISPLS__LAST; ++ if (displs_attr == DTPI_ATTR_STRUCTURE_DISPLS__SMALL) { ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ attr->u.structure.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += ++ attr->child_type_extent * (attr->u.structure.array_of_blklens[i] + 1); ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_STRUCTURE_DISPLS__LARGE) { ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ attr->u.structure.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += ++ attr->child_type_extent * (attr->u.structure.array_of_blklens[i] * 4); ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_STRUCTURE_DISPLS__REDUCING) { ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ int idx = attr->u.structure.numblks - i - 1; ++ attr->u.structure.array_of_displs[idx] = (MPI_Aint) total_displ; ++ total_displ += ++ attr->child_type_extent * (attr->u.structure.array_of_blklens[idx] + 1); ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else if (displs_attr == DTPI_ATTR_STRUCTURE_DISPLS__UNEVEN) { ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ attr->u.structure.array_of_displs[i] = (MPI_Aint) total_displ; ++ total_displ += ++ attr->child_type_extent * (attr->u.structure.array_of_blklens[i] + i); ++ if (!VALUE_FITS_IN_AINT(total_displ)) ++ goto retry; ++ } ++ } else { ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ /* calculate the extent for our datatype, to decide whether we ++ * want to use this or try again */ ++ int max_displ_idx = -1; ++ int min_displ_idx = -1; ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ if (attr->u.structure.array_of_blklens[i]) { ++ if (max_displ_idx == -1) ++ max_displ_idx = i; ++ else if (attr->u.structure.array_of_displs[i] > ++ attr->u.structure.array_of_displs[max_displ_idx]) ++ max_displ_idx = i; ++ ++ if (min_displ_idx == -1) ++ min_displ_idx = i; ++ else if (attr->u.structure.array_of_displs[i] < ++ attr->u.structure.array_of_displs[min_displ_idx]) ++ min_displ_idx = i; ++ } ++ } ++ ++ extent = ++ attr->u.structure.array_of_displs[max_displ_idx] - ++ attr->u.structure.array_of_displs[min_displ_idx] + ++ attr->u.structure.array_of_blklens[max_displ_idx] * extent; ++ ++ if (VALUE_FITS_IN_AINT(extent * count)) ++ break; ++ } ++ ++ { ++ MPI_Datatype *array_of_types; ++ ++ DTPI_ALLOC_OR_FAIL(array_of_types, attr->u.structure.numblks * sizeof(MPI_Datatype), rc); ++ for (int i = 0; i < attr->u.structure.numblks; i++) ++ array_of_types[i] = type; ++ ++ rc = MPI_Type_create_struct(attr->u.structure.numblks, ++ attr->u.structure.array_of_blklens, ++ attr->u.structure.array_of_displs, array_of_types, newtype); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ DTPI_FREE(array_of_types); ++ } ++ ++ confirm_extent(*newtype, extent); ++ ++ fn_exit: ++ *new_count = count; ++ if (attr_tree_depth > 1) { ++ rc = MPI_Type_free(&type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ } ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++int DTPI_construct_datatype(DTP_pool_s dtp, int attr_tree_depth, DTPI_Attr_s ** attr_tree, ++ MPI_Datatype * newtype, MPI_Aint * new_count) ++{ ++ DTPI_pool_s *dtpi = dtp.priv; ++ int rc = DTP_SUCCESS; ++ ++ if (attr_tree_depth == 0) { ++ *attr_tree = NULL; ++ *newtype = dtp.DTP_base_type; ++ *new_count = dtpi->base_type_count; ++ goto fn_exit; ++ } ++ ++ DTPI_Attr_s *attr; ++ ++ DTPI_ALLOC_OR_FAIL(attr, sizeof(DTPI_Attr_s), rc); ++ *attr_tree = attr; ++ ++ attr->kind = DTPI_rand(dtpi) % DTPI_DATATYPE_KIND__LAST; ++ ++ switch (attr->kind) { ++ case DTPI_DATATYPE_KIND__CONTIG: ++ rc = construct_contig(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__DUP: ++ rc = construct_dup(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__RESIZED: ++ rc = construct_resized(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__VECTOR: ++ rc = construct_vector(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__HVECTOR: ++ rc = construct_hvector(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__BLKINDX: ++ rc = construct_blkindx(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__BLKHINDX: ++ rc = construct_blkhindx(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__INDEXED: ++ rc = construct_indexed(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__HINDEXED: ++ rc = construct_hindexed(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__SUBARRAY: ++ rc = construct_subarray(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ case DTPI_DATATYPE_KIND__STRUCT: ++ rc = construct_struct(dtp, attr_tree_depth, attr, newtype, new_count); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ ++ default: ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ fn_exit: ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int attr_tree_free(DTPI_Attr_s * attr) ++{ ++ int rc = DTP_SUCCESS; ++ ++ if (attr->child) { ++ rc = attr_tree_free(attr->child); ++ DTPI_ERR_CHK_RC(rc); ++ } ++ DTPI_FREE(attr->child); ++ ++ switch (attr->kind) { ++ case DTPI_DATATYPE_KIND__BLKINDX: ++ DTPI_FREE(attr->u.blkindx.array_of_displs); ++ break; ++ ++ case DTPI_DATATYPE_KIND__BLKHINDX: ++ DTPI_FREE(attr->u.blkhindx.array_of_displs); ++ break; ++ ++ case DTPI_DATATYPE_KIND__INDEXED: ++ DTPI_FREE(attr->u.indexed.array_of_blklens); ++ DTPI_FREE(attr->u.indexed.array_of_displs); ++ break; ++ ++ case DTPI_DATATYPE_KIND__HINDEXED: ++ DTPI_FREE(attr->u.hindexed.array_of_blklens); ++ DTPI_FREE(attr->u.hindexed.array_of_displs); ++ break; ++ ++ case DTPI_DATATYPE_KIND__SUBARRAY: ++ DTPI_FREE(attr->u.subarray.array_of_sizes); ++ DTPI_FREE(attr->u.subarray.array_of_subsizes); ++ DTPI_FREE(attr->u.subarray.array_of_starts); ++ break; ++ ++ case DTPI_DATATYPE_KIND__STRUCT: ++ DTPI_FREE(attr->u.structure.array_of_blklens); ++ DTPI_FREE(attr->u.structure.array_of_displs); ++ break; ++ ++ default: ++ break; ++ } ++ ++ fn_exit: ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++int DTPI_obj_free(DTPI_obj_s * obj_priv) ++{ ++ int rc = DTP_SUCCESS; ++ ++ if (obj_priv->attr_tree) { ++ rc = attr_tree_free(obj_priv->attr_tree); ++ DTPI_ERR_CHK_RC(rc); ++ } ++ ++ fn_exit: ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/dtpools/src/dtpools_desc.c +@@ -0,0 +1,228 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "dtpools_internal.h" ++ ++static const char *kind_to_name(DTPI_Datatype_kind_e kind) ++{ ++ const char *ret; ++ ++ switch (kind) { ++ case DTPI_DATATYPE_KIND__CONTIG: ++ ret = "contig"; ++ break; ++ case DTPI_DATATYPE_KIND__DUP: ++ ret = "dup"; ++ break; ++ case DTPI_DATATYPE_KIND__RESIZED: ++ ret = "resized"; ++ break; ++ case DTPI_DATATYPE_KIND__VECTOR: ++ ret = "vector"; ++ break; ++ case DTPI_DATATYPE_KIND__HVECTOR: ++ ret = "hvector"; ++ break; ++ case DTPI_DATATYPE_KIND__BLKINDX: ++ ret = "blkindx"; ++ break; ++ case DTPI_DATATYPE_KIND__BLKHINDX: ++ ret = "blkhindx"; ++ break; ++ case DTPI_DATATYPE_KIND__INDEXED: ++ ret = "indexed"; ++ break; ++ case DTPI_DATATYPE_KIND__HINDEXED: ++ ret = "hindexed"; ++ break; ++ case DTPI_DATATYPE_KIND__SUBARRAY: ++ ret = "subarray"; ++ break; ++ case DTPI_DATATYPE_KIND__STRUCT: ++ ret = "structure"; ++ break; ++ default: ++ ret = NULL; ++ } ++ ++ return ret; ++} ++ ++int DTPI_populate_dtp_desc(DTPI_obj_s * obj_priv, DTPI_pool_s * dtp, char **desc_) ++{ ++ char *desc; ++ int desclen = 0, maxlen = 16384; ++ int depth = 0; ++ int tree_depth = 0; ++ int rc = DTP_SUCCESS; ++ ++ DTPI_FUNC_ENTER(); ++ ++ for (DTPI_Attr_s * attr = obj_priv->attr_tree; attr; attr = attr->child) ++ tree_depth++; ++ ++ DTPI_ALLOC_OR_FAIL(desc, maxlen, rc); ++ DTPI_snprintf(rc, desc, desclen, maxlen, "nesting levels: %d\n", tree_depth); ++ ++ for (DTPI_Attr_s * attr = obj_priv->attr_tree; attr; attr = attr->child, depth++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d: %s [", depth, kind_to_name(attr->kind)); ++ ++ switch (attr->kind) { ++ case DTPI_DATATYPE_KIND__CONTIG: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "blklen %d", attr->u.contig.blklen); ++ break; ++ ++ case DTPI_DATATYPE_KIND__DUP: ++ break; ++ ++ case DTPI_DATATYPE_KIND__RESIZED: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "lb %zd, extent %zd", ++ attr->u.resized.lb, attr->u.resized.extent); ++ break; ++ ++ case DTPI_DATATYPE_KIND__VECTOR: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "numblks %d, blklen %d, stride %d", ++ attr->u.vector.numblks, attr->u.vector.blklen, attr->u.vector.stride); ++ break; ++ ++ case DTPI_DATATYPE_KIND__HVECTOR: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "numblks %d, blklen %d, stride %zd", ++ attr->u.hvector.numblks, ++ attr->u.hvector.blklen, attr->u.hvector.stride); ++ break; ++ ++ case DTPI_DATATYPE_KIND__BLKINDX: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "numblks %d, blklen %d, displs (", ++ attr->u.blkindx.numblks, attr->u.blkindx.blklen); ++ for (int j = 0; j < attr->u.blkindx.numblks; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d", ++ attr->u.blkindx.array_of_displs[j]); ++ if (j < attr->u.blkindx.numblks - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, ")"); ++ break; ++ ++ case DTPI_DATATYPE_KIND__BLKHINDX: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "numblks %d, blklen %d, displs (", ++ attr->u.blkhindx.numblks, attr->u.blkhindx.blklen); ++ for (int j = 0; j < attr->u.blkhindx.numblks; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%zd", ++ attr->u.blkhindx.array_of_displs[j]); ++ if (j < attr->u.blkhindx.numblks - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, ")"); ++ break; ++ ++ case DTPI_DATATYPE_KIND__INDEXED: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "numblks %d, blklens (", ++ attr->u.indexed.numblks); ++ for (int j = 0; j < attr->u.indexed.numblks; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d", ++ attr->u.indexed.array_of_blklens[j]); ++ if (j < attr->u.indexed.numblks - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, "), displs ("); ++ for (int j = 0; j < attr->u.indexed.numblks; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d", ++ attr->u.indexed.array_of_displs[j]); ++ if (j < attr->u.indexed.numblks - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, ")"); ++ break; ++ ++ case DTPI_DATATYPE_KIND__HINDEXED: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "numblks %d, blklens (", ++ attr->u.hindexed.numblks); ++ for (int j = 0; j < attr->u.hindexed.numblks; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d", ++ attr->u.hindexed.array_of_blklens[j]); ++ if (j < attr->u.hindexed.numblks - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, "), displs ("); ++ for (int j = 0; j < attr->u.hindexed.numblks; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%zd", ++ attr->u.hindexed.array_of_displs[j]); ++ if (j < attr->u.hindexed.numblks - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, ")"); ++ break; ++ ++ case DTPI_DATATYPE_KIND__SUBARRAY: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "ndims %d, sizes (", ++ attr->u.subarray.ndims); ++ for (int j = 0; j < attr->u.subarray.ndims; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d", ++ attr->u.subarray.array_of_sizes[j]); ++ if (j < attr->u.subarray.ndims - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, "), subsizes ("); ++ for (int j = 0; j < attr->u.subarray.ndims; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d", ++ attr->u.subarray.array_of_subsizes[j]); ++ if (j < attr->u.subarray.ndims - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, "), starts ("); ++ for (int j = 0; j < attr->u.subarray.ndims; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d", ++ attr->u.subarray.array_of_starts[j]); ++ if (j < attr->u.subarray.ndims - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, "), order "); ++ if (attr->u.subarray.order == MPI_ORDER_C) ++ DTPI_snprintf(rc, desc, desclen, maxlen, "MPI_ORDER_C"); ++ else ++ DTPI_snprintf(rc, desc, desclen, maxlen, "MPI_ORDER_FORTRAN"); ++ break; ++ ++ case DTPI_DATATYPE_KIND__STRUCT: ++ DTPI_snprintf(rc, desc, desclen, maxlen, "numblks %d, blklen (", ++ attr->u.structure.numblks); ++ for (int j = 0; j < attr->u.structure.numblks; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%d", ++ attr->u.structure.array_of_blklens[j]); ++ if (j < attr->u.structure.numblks - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, "), displs ("); ++ for (int j = 0; j < attr->u.structure.numblks; j++) { ++ DTPI_snprintf(rc, desc, desclen, maxlen, "%zd", ++ attr->u.structure.array_of_displs[j]); ++ if (j < attr->u.structure.numblks - 1) ++ DTPI_snprintf(rc, desc, desclen, maxlen, ","); ++ } ++ DTPI_snprintf(rc, desc, desclen, maxlen, ")"); ++ break; ++ ++ default: ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ DTPI_snprintf(rc, desc, desclen, maxlen, "]\n"); ++ } ++ ++ if (dtp->base_type_is_struct) ++ DTPI_snprintf(rc, desc, desclen, maxlen, "base: struct of %s\n", dtp->base_type_str); ++ else ++ DTPI_snprintf(rc, desc, desclen, maxlen, "base: %s\n", dtp->base_type_str); ++ ++ fn_exit: ++ *desc_ = desc; ++ DTPI_FUNC_EXIT(); ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/dtpools/src/dtpools_init_verify.c +@@ -0,0 +1,472 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "dtpools_internal.h" ++ ++#define MAX_ERRCOUNT 10 ++ ++static int errcount = 0; ++ ++/* FIXME: the print format used is always converted to %d below */ ++#define INIT_VERIFY_SINGLE_VAL(rc_, buf_, val_, verify_, c_type) \ ++ do { \ ++ c_type *b_ = (c_type *) (buf_); \ ++ if (verify_) { \ ++ if (*b_ != (c_type) val_) { \ ++ errcount++; \ ++ if (errcount < MAX_ERRCOUNT) \ ++ printf("expected %d at %p, but found %d\n", \ ++ (int) val_, buf_, (int) b_[0]); \ ++ DTPI_ERR_SETANDJUMP(rc_, DTP_ERR_OTHER); \ ++ } \ ++ } else { \ ++ *b_ = (c_type) val_; \ ++ } \ ++ } while (0) ++ ++#define INIT_VERIFY_DOUBLE_VAL(rc_, buf_, val_1, val_2, verify_, c_type1, c_type2) \ ++ do { \ ++ struct c_type3 { \ ++ c_type1 a; \ ++ c_type2 b; \ ++ }; \ ++ struct c_type3 *b_ = (struct c_type3 *) (buf_); \ ++ if (verify_) { \ ++ if (b_->a != (c_type1) val_1 || b_->b != (c_type2) val_2) { \ ++ errcount++; \ ++ if (errcount < MAX_ERRCOUNT) \ ++ printf("expected (%d,%d) at %p, but found (%d,%d)\n", \ ++ (int) val_1, (int) val_2, buf_, (int) b_[0].a, (int) b_[0].b); \ ++ DTPI_ERR_SETANDJUMP(rc_, DTP_ERR_OTHER); \ ++ } \ ++ } else { \ ++ b_[0].a = (c_type1) val_1; \ ++ b_[0].b = (c_type2) val_2; \ ++ } \ ++ } while (0) ++ ++static int init_verify_basic_datatype(MPI_Datatype type_, char *buf, int val, int val_stride, ++ int verify) ++{ ++ MPI_Datatype type = type_; ++ int rc = DTP_SUCCESS; ++ ++ /* some types have duplicate names; we cannot simply put them in ++ * the below switch statement because some MPI implementations ++ * (such as MPICH) define one to the other, which causes the ++ * compiler to complain that we have duplicate case statements. */ ++ if (type == MPI_C_FLOAT_COMPLEX) ++ type = MPI_C_COMPLEX; ++ else if (type == MPI_LONG_LONG) ++ type = MPI_LONG_LONG_INT; ++ ++ switch (type) { ++ case MPI_CHAR: ++ case MPI_BYTE: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, char); ++ val += val_stride; ++ break; ++ case MPI_WCHAR: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, wchar_t); ++ val += val_stride; ++ break; ++ case MPI_SHORT: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, short); ++ val += val_stride; ++ break; ++ case MPI_INT: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, int); ++ val += val_stride; ++ break; ++ case MPI_LONG: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, long); ++ val += val_stride; ++ break; ++ case MPI_LONG_LONG_INT: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, long long); ++ val += val_stride; ++ break; ++ case MPI_UNSIGNED_CHAR: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, unsigned char); ++ val += val_stride; ++ break; ++ case MPI_UNSIGNED: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, unsigned); ++ val += val_stride; ++ break; ++ case MPI_UNSIGNED_LONG: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, unsigned long); ++ val += val_stride; ++ break; ++ case MPI_UNSIGNED_LONG_LONG: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, unsigned long long); ++ val += val_stride; ++ break; ++ case MPI_FLOAT: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, float); ++ val += val_stride; ++ break; ++ case MPI_DOUBLE: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, double); ++ val += val_stride; ++ break; ++ case MPI_LONG_DOUBLE: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, long double); ++ val += val_stride; ++ break; ++ case MPI_INT8_T: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, int8_t); ++ val += val_stride; ++ break; ++ case MPI_INT16_T: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, int16_t); ++ val += val_stride; ++ break; ++ case MPI_INT32_T: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, int32_t); ++ val += val_stride; ++ break; ++ case MPI_INT64_T: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, int64_t); ++ val += val_stride; ++ break; ++ case MPI_UINT8_T: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, uint8_t); ++ val += val_stride; ++ break; ++ case MPI_UINT16_T: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, uint16_t); ++ val += val_stride; ++ break; ++ case MPI_UINT32_T: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, uint32_t); ++ val += val_stride; ++ break; ++ case MPI_UINT64_T: ++ INIT_VERIFY_SINGLE_VAL(rc, buf, val, verify, uint64_t); ++ val += val_stride; ++ break; ++ ++ case MPI_C_COMPLEX: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, float, float); ++ val += (2 * val_stride); ++ break; ++ case MPI_C_DOUBLE_COMPLEX: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, double, double); ++ val += (2 * val_stride); ++ break; ++ case MPI_C_LONG_DOUBLE_COMPLEX: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, long double, ++ long double); ++ val += (2 * val_stride); ++ break; ++ case MPI_FLOAT_INT: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, float, int); ++ val += (2 * val_stride); ++ break; ++ case MPI_DOUBLE_INT: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, double, int); ++ val += (2 * val_stride); ++ break; ++ case MPI_LONG_INT: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, long, int); ++ val += (2 * val_stride); ++ break; ++ case MPI_2INT: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, int, int); ++ val += (2 * val_stride); ++ break; ++ case MPI_SHORT_INT: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, short, int); ++ val += (2 * val_stride); ++ break; ++ case MPI_LONG_DOUBLE_INT: ++ INIT_VERIFY_DOUBLE_VAL(rc, buf, val, val + val_stride, verify, long double, int); ++ val += (2 * val_stride); ++ break; ++ ++ default: ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ fn_exit: ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int init_verify_base_type(DTP_pool_s dtp, DTP_obj_s obj, void *buf_, ++ size_t buf_offset, int *val_start, int val_stride, int verify) ++{ ++ DTPI_pool_s *dtpi = dtp.priv; ++ int val = *val_start; ++ char *buf = (char *) buf_ + buf_offset; ++ int rc = DTP_SUCCESS; ++ ++ DTPI_FUNC_ENTER(); ++ ++ if (dtpi->base_type_is_struct) { ++ for (int i = 0; i < dtpi->base_type_attrs.numblks; i++) { ++ MPI_Aint offset = dtpi->base_type_attrs.array_of_displs[i]; ++ for (int j = 0; j < dtpi->base_type_attrs.array_of_blklens[i]; j++) { ++ rc = init_verify_basic_datatype(dtpi->base_type_attrs.array_of_types[i], ++ buf + offset, val, val_stride, verify); ++ DTPI_ERR_CHK_RC(rc); ++ ++ int size; ++ rc = MPI_Type_size(dtpi->base_type_attrs.array_of_types[i], &size); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ offset += size; ++ val += val_stride; ++ } ++ } ++ } else { ++ rc = init_verify_basic_datatype(dtp.DTP_base_type, buf, val, val_stride, verify); ++ DTPI_ERR_CHK_RC(rc); ++ val += val_stride; ++ } ++ ++ fn_exit: ++ *val_start = val; ++ DTPI_FUNC_EXIT(); ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++static int init_verify_subarray(DTP_pool_s dtp, DTP_obj_s obj, void *buf, DTPI_Attr_s * attr_tree, ++ int ndims, size_t buf_offset, int *val_start, int val_stride, ++ int *rem_val_count, int verify) ++{ ++ int rc = DTP_SUCCESS; ++ DTPI_Attr_s *attr = attr_tree; ++ ++ DTPI_FUNC_ENTER(); ++ ++ DTPI_ERR_ASSERT(attr->kind == DTPI_DATATYPE_KIND__SUBARRAY, rc); ++ ++ if (ndims == 0) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, buf_offset, val_start, val_stride, ++ rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ goto fn_exit; ++ } ++ ++ if (attr->u.subarray.order == MPI_ORDER_C) { ++ int dims_offset = attr->u.subarray.ndims - ndims; ++ ++ MPI_Aint base_offset = 1; ++ for (int i = dims_offset + 1; i < attr->u.subarray.ndims; i++) ++ base_offset *= attr->u.subarray.array_of_sizes[i]; ++ base_offset *= attr->child_type_extent; ++ ++ MPI_Aint offset = buf_offset + base_offset * attr->u.subarray.array_of_starts[dims_offset]; ++ for (int i = 0; i < attr->u.subarray.array_of_subsizes[dims_offset]; i++) { ++ rc = init_verify_subarray(dtp, obj, buf, attr, ndims - 1, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += base_offset; ++ } ++ } else { ++ MPI_Aint base_offset = 1; ++ for (int i = 0; i < ndims - 1; i++) ++ base_offset *= attr->u.subarray.array_of_sizes[i]; ++ base_offset *= attr->child_type_extent; ++ ++ MPI_Aint offset = buf_offset + base_offset * attr->u.subarray.array_of_starts[ndims - 1]; ++ for (int i = 0; i < attr->u.subarray.array_of_subsizes[ndims - 1]; i++) { ++ rc = init_verify_subarray(dtp, obj, buf, attr, ndims - 1, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += base_offset; ++ } ++ } ++ ++ fn_exit: ++ DTPI_FUNC_EXIT(); ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} ++ ++int DTPI_init_verify(DTP_pool_s dtp, DTP_obj_s obj, void *buf, DTPI_Attr_s * attr_tree, ++ size_t buf_offset, int *val_start, int val_stride, int *rem_val_count, ++ int verify) ++{ ++ int rc = DTP_SUCCESS; ++ ++ DTPI_FUNC_ENTER(); ++ ++ if (*rem_val_count == 0) ++ goto fn_exit; ++ ++ if (attr_tree == NULL) { ++ rc = init_verify_base_type(dtp, obj, buf, buf_offset, val_start, val_stride, verify); ++ DTPI_ERR_CHK_RC(rc); ++ (*rem_val_count)--; ++ goto fn_exit; ++ } ++ ++ DTPI_Attr_s *attr = attr_tree; ++ ++ /* attr_idx is not at the end of the array */ ++ switch (attr->kind) { ++ case DTPI_DATATYPE_KIND__CONTIG: ++ { ++ size_t offset = buf_offset; ++ for (int i = 0; i < attr->u.contig.blklen; i++) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += attr->child_type_extent; ++ } ++ break; ++ } ++ case DTPI_DATATYPE_KIND__DUP: ++ { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, buf_offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ } ++ case DTPI_DATATYPE_KIND__RESIZED: ++ { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, buf_offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ } ++ case DTPI_DATATYPE_KIND__VECTOR: ++ { ++ size_t offset = buf_offset; ++ for (int i = 0; i < attr->u.vector.numblks; i++) { ++ size_t base_offset = offset; ++ for (int j = 0; j < attr->u.vector.blklen; j++) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += attr->child_type_extent; ++ } ++ offset = base_offset + attr->u.vector.stride * attr->child_type_extent; ++ } ++ break; ++ } ++ case DTPI_DATATYPE_KIND__HVECTOR: ++ { ++ size_t offset = buf_offset; ++ for (int i = 0; i < attr->u.hvector.numblks; i++) { ++ size_t base_offset = offset; ++ for (int j = 0; j < attr->u.hvector.blklen; j++) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += attr->child_type_extent; ++ } ++ offset = base_offset + attr->u.hvector.stride; ++ } ++ break; ++ } ++ case DTPI_DATATYPE_KIND__BLKINDX: ++ { ++ size_t offset = buf_offset; ++ for (int i = 0; i < attr->u.blkindx.numblks; i++) { ++ size_t base_offset = offset; ++ offset += attr->u.blkindx.array_of_displs[i] * attr->child_type_extent; ++ for (int j = 0; j < attr->u.blkindx.blklen; j++) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += attr->child_type_extent; ++ } ++ offset = base_offset; ++ } ++ break; ++ } ++ case DTPI_DATATYPE_KIND__BLKHINDX: ++ { ++ size_t offset = buf_offset; ++ for (int i = 0; i < attr->u.blkhindx.numblks; i++) { ++ size_t base_offset = offset; ++ offset += attr->u.blkhindx.array_of_displs[i]; ++ for (int j = 0; j < attr->u.blkhindx.blklen; j++) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += attr->child_type_extent; ++ } ++ offset = base_offset; ++ } ++ break; ++ } ++ case DTPI_DATATYPE_KIND__INDEXED: ++ { ++ size_t offset = buf_offset; ++ for (int i = 0; i < attr->u.indexed.numblks; i++) { ++ size_t base_offset = offset; ++ offset += attr->u.indexed.array_of_displs[i] * attr->child_type_extent; ++ for (int j = 0; j < attr->u.indexed.array_of_blklens[i]; j++) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += attr->child_type_extent; ++ } ++ offset = base_offset; ++ } ++ break; ++ } ++ case DTPI_DATATYPE_KIND__HINDEXED: ++ { ++ size_t offset = buf_offset; ++ for (int i = 0; i < attr->u.hindexed.numblks; i++) { ++ size_t base_offset = offset; ++ offset += attr->u.hindexed.array_of_displs[i]; ++ for (int j = 0; j < attr->u.hindexed.array_of_blklens[i]; j++) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += attr->child_type_extent; ++ } ++ offset = base_offset; ++ } ++ break; ++ } ++ case DTPI_DATATYPE_KIND__SUBARRAY: ++ rc = init_verify_subarray(dtp, obj, buf, attr, ++ attr->u.subarray.ndims, buf_offset, ++ val_start, val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ break; ++ case DTPI_DATATYPE_KIND__STRUCT: ++ { ++ size_t offset = buf_offset; ++ for (int i = 0; i < attr->u.structure.numblks; i++) { ++ size_t base_offset = offset; ++ offset += attr->u.structure.array_of_displs[i]; ++ for (int j = 0; j < attr->u.structure.array_of_blklens[i]; j++) { ++ rc = DTPI_init_verify(dtp, obj, buf, attr->child, offset, val_start, ++ val_stride, rem_val_count, verify); ++ DTPI_ERR_CHK_RC(rc); ++ offset += attr->child_type_extent; ++ } ++ offset = base_offset; ++ } ++ break; ++ } ++ default: ++ DTPI_ERR_ASSERT(0, rc); ++ } ++ ++ fn_exit: ++ DTPI_FUNC_EXIT(); ++ return rc; ++ ++ fn_fail: ++ goto fn_exit; ++} +deleted file mode 100644 +--- a/test/mpi/dtpools/src/dtpools_internal.c ++++ /dev/null +@@ -1,1934 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2018 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-#include +-#include +-#include "dtpools_internal.h" +-#include "dtpoolsconf.h" +- +-#define TYPE_NAME_MAXLEN (256) +-#define BASIC_TYPE_NAME_MAXLEN (64) +- +-#define DTPI_OBJ_INIT_BUF(c_type, type_ptr) \ +- do { \ +- type_ptr = (c_type *) buf_ptr; \ +- k = par->user.val_start; \ +- for (i = 0; i < par->core.type_totlen; i += par->core.type_stride) { \ +- for (j = 0; j < par->core.type_blklen; j++) { \ +- type_ptr[i+j] = (c_type) k; \ +- k += par->user.val_stride; \ +- if (--count == 0) { \ +- return; \ +- } \ +- } \ +- } \ +- } while (0) +- +-#define DTPI_OBJ_INIT_COMP_BUF(c_type, a_type, b_type, type_ptr) \ +- do { \ +- type_ptr = (c_type *) buf_ptr; \ +- k = par->user.val_start; \ +- for (i = 0; i < par->core.type_totlen; i += par->core.type_stride) { \ +- for (j = 0; j < par->core.type_blklen; j++) { \ +- type_ptr[i+j].a = (a_type) k; \ +- type_ptr[i+j].b = (b_type) k; \ +- k += par->user.val_stride; \ +- if (--count == 0) { \ +- return; \ +- } \ +- } \ +- } \ +- } while (0) +- +-#define DTPI_OBJ_CHECK_BUF_AND_JUMP(c_type, type_ptr) \ +- do { \ +- type_ptr = (c_type *) buf_ptr; \ +- k = par->user.val_start; \ +- for (i = 0; i < par->core.type_totlen; i += par->core.type_stride) { \ +- for (j = 0; j < par->core.type_blklen; j++) { \ +- if (type_ptr[i+j] != (c_type) k) { \ +- FPRINTF(stdout, "recv buf[%d]=%d != %d\n", \ +- i+j, (int) type_ptr[i+j], k); \ +- goto fn_fail; \ +- } \ +- k += par->user.val_stride; \ +- if (--count == 0) { \ +- goto fn_exit; \ +- } \ +- } \ +- } \ +- } while (0) +- +-#define DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(c_type, a_type, b_type, type_ptr) \ +- do { \ +- type_ptr = (c_type *) buf_ptr; \ +- k = par->user.val_start; \ +- for (i = 0; i < par->core.type_totlen; i += par->core.type_stride) { \ +- for (j = 0; j < par->core.type_blklen; j++) { \ +- if (type_ptr[i+j].a != (a_type) k || \ +- type_ptr[i+j].b != (b_type) k) { \ +- FPRINTF(stdout, "recv buf[%d].{a=%d,b=%d} != %d\n", i+j, \ +- (int) type_ptr[i+j].a, (int) type_ptr[i+j].b, k);\ +- goto fn_fail; \ +- } \ +- k += par->user.val_stride; \ +- if (--count == 0) { \ +- goto fn_exit; \ +- } \ +- } \ +- } \ +- } while (0) +- +-/* +- * Composite types +- */ +-typedef struct { +- float a; +- float b; +-} dtp_c_complex; +- +-typedef dtp_c_complex dtp_c_float_complex; +- +-typedef struct { +- double a; +- double b; +-} dtp_c_double_complex; +- +-typedef struct { +- long double a; +- long double b; +-} dtp_c_long_double_complex; +- +-typedef struct { +- float a; +- int b; +-} dtp_float_int; +- +-typedef struct { +- double a; +- int b; +-} dtp_double_int; +- +-typedef struct { +- long a; +- int b; +-} dtp_long_int; +- +-typedef struct { +- int a; +- int b; +-} dtp_2int; +- +-typedef struct { +- short a; +- int b; +-} dtp_short_int; +- +-typedef struct { +- long double a; +- int b; +-} dtp_long_double_int; +- +-/* +- * Casting pointers +- */ +-union DTPI_Cast_ptr { +- char *char_ptr; +- wchar_t *wchar_ptr; +- short int *short_ptr; +- int *int_ptr; +- long int *long_ptr; +- long long int *long_long_ptr; +- unsigned char *uchar_ptr; +- unsigned short int *ushort_ptr; +- unsigned int *uint_ptr; +- unsigned long int *ulong_ptr; +- unsigned long long int *ulong_long_ptr; +- float *float_ptr; +- double *double_ptr; +- long double *long_double_ptr; +- int8_t *int8_ptr; +- int16_t *int16_ptr; +- int32_t *int32_ptr; +- int64_t *int64_ptr; +- uint8_t *uint8_ptr; +- uint16_t *uint16_ptr; +- uint32_t *uint32_ptr; +- uint64_t *uint64_ptr; +- /* composite types */ +- dtp_c_complex *c_complex_ptr; +- dtp_c_float_complex *c_float_complex_ptr; +- dtp_c_double_complex *c_double_complex_ptr; +- dtp_c_long_double_complex *c_long_double_complex_ptr; +- dtp_float_int *float_int_ptr; +- dtp_double_int *double_int_ptr; +- dtp_long_int *long_int_ptr; +- dtp_2int *int_int_ptr; +- dtp_short_int *short_int_ptr; +- dtp_long_double_int *long_double_int_ptr; +- /* TODO: add remaining types */ +-}; +- +-/* --------------------------------------------------------- */ +-/* Utility Functions */ +-/* --------------------------------------------------------- */ +- +-void DTPI_Print_error(int errcode) +-{ +- int errclass, slen; +- char string[ERR_STRING_MAX_LEN]; +- +- MPI_Error_class(errcode, &errclass); +- MPI_Error_string(errcode, string, &slen); +- +- fprintf(stdout, "Error class %d (%s)\n", errclass, string); +- fflush(stdout); +-} +- +-void DTPI_Init_creators(DTPI_Creator * creators) +-{ +- memset(creators, 0, sizeof(*creators)); +- creators[DTPI_OBJ_LAYOUT_SIMPLE__BASIC] = DTPI_Basic_create; +- creators[DTPI_OBJ_LAYOUT_SIMPLE__CONTIG] = DTPI_Contig_create; +- creators[DTPI_OBJ_LAYOUT_SIMPLE__VECTOR] = DTPI_Vector_create; +- creators[DTPI_OBJ_LAYOUT_SIMPLE__HVECTOR] = DTPI_Hvector_create; +- creators[DTPI_OBJ_LAYOUT_SIMPLE__INDEXED] = DTPI_Indexed_create; +- creators[DTPI_OBJ_LAYOUT_SIMPLE__HINDEXED] = DTPI_Hindexed_create; +- creators[DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_INDEXED] = DTPI_Block_indexed_create; +- creators[DTPI_OBJ_LAYOUT_SIMPLE__BLOCK_HINDEXED] = DTPI_Block_hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK__VECTOR] = DTPI_Vector_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK__HVECTOR] = DTPI_Hvector_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK__INDEXED] = DTPI_Indexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK__HINDEXED] = DTPI_Hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_INDEXED] = DTPI_Block_indexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK__BLOCK_HINDEXED] = DTPI_Block_hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_C] = DTPI_Subarray_c_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK__SUBARRAY_F] = DTPI_Subarray_f_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT__VECTOR] = DTPI_Vector_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT__HVECTOR] = DTPI_Hvector_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT__INDEXED] = DTPI_Indexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT__HINDEXED] = DTPI_Hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_INDEXED] = DTPI_Block_indexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT__BLOCK_HINDEXED] = DTPI_Block_hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_C] = DTPI_Subarray_c_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT__SUBARRAY_F] = DTPI_Subarray_f_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__VECTOR] = DTPI_Vector_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HVECTOR] = DTPI_Hvector_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__INDEXED] = DTPI_Indexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__HINDEXED] = DTPI_Hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_INDEXED] = DTPI_Block_indexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__BLOCK_HINDEXED] = DTPI_Block_hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_C] = DTPI_Subarray_c_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_BLK_STRD__SUBARRAY_F] = DTPI_Subarray_f_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__VECTOR] = DTPI_Vector_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HVECTOR] = DTPI_Hvector_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__INDEXED] = DTPI_Indexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__HINDEXED] = DTPI_Hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_INDEXED] = DTPI_Block_indexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__BLOCK_HINDEXED] = DTPI_Block_hindexed_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_C] = DTPI_Subarray_c_create; +- creators[DTPI_OBJ_LAYOUT_LARGE_CNT_STRD__SUBARRAY_F] = DTPI_Subarray_f_create; +-} +- +-static void DTPI_Type_init_buf(struct DTPI_Par *par, MPI_Datatype basic_type, void *buf) +-{ +- int i, j, k; +- int count; +- char *buf_ptr; +- union DTPI_Cast_ptr ptrs; +- +- FPRINTF(stdout, "init type_displ=%li\n", par->core.type_displ); +- FPRINTF(stdout, "init type_totlen=%li\n", par->core.type_totlen); +- FPRINTF(stdout, "init type_stride=%li\n", par->core.type_stride); +- FPRINTF(stdout, "init type_blklen=%li\n", par->core.type_blklen); +- FPRINTF(stdout, "init user count=%d\n", par->user.val_count); +- +- if (par->user.val_count <= 0) { +- return; +- } +- +- count = par->user.val_count; +- +- buf_ptr = (char *) buf + par->core.type_displ; +- if (basic_type == MPI_CHAR || basic_type == MPI_BYTE) { +- DTPI_OBJ_INIT_BUF(char, ptrs.char_ptr); +- } else if (basic_type == MPI_WCHAR) { +- DTPI_OBJ_INIT_BUF(wchar_t, ptrs.wchar_ptr); +- } else if (basic_type == MPI_SHORT) { +- DTPI_OBJ_INIT_BUF(short int, ptrs.short_ptr); +- } else if (basic_type == MPI_INT) { +- DTPI_OBJ_INIT_BUF(int, ptrs.int_ptr); +- } else if (basic_type == MPI_LONG) { +- DTPI_OBJ_INIT_BUF(long int, ptrs.long_ptr); +- } else if (basic_type == MPI_LONG_LONG_INT) { +- DTPI_OBJ_INIT_BUF(long long int, ptrs.long_long_ptr); +- } else if (basic_type == MPI_UNSIGNED_CHAR) { +- DTPI_OBJ_INIT_BUF(unsigned char, ptrs.uchar_ptr); +- } else if (basic_type == MPI_UNSIGNED_SHORT) { +- DTPI_OBJ_INIT_BUF(unsigned short int, ptrs.ushort_ptr); +- } else if (basic_type == MPI_UNSIGNED) { +- DTPI_OBJ_INIT_BUF(unsigned int, ptrs.uint_ptr); +- } else if (basic_type == MPI_UNSIGNED_LONG) { +- DTPI_OBJ_INIT_BUF(unsigned long int, ptrs.ulong_ptr); +- } else if (basic_type == MPI_UNSIGNED_LONG_LONG) { +- DTPI_OBJ_INIT_BUF(unsigned long long int, ptrs.ulong_long_ptr); +- } else if (basic_type == MPI_FLOAT) { +- DTPI_OBJ_INIT_BUF(float, ptrs.float_ptr); +- } else if (basic_type == MPI_DOUBLE) { +- DTPI_OBJ_INIT_BUF(double, ptrs.double_ptr); +- } else if (basic_type == MPI_LONG_DOUBLE) { +- DTPI_OBJ_INIT_BUF(long double, ptrs.long_double_ptr); +- } else if (basic_type == MPI_INT8_T) { +- DTPI_OBJ_INIT_BUF(int8_t, ptrs.int8_ptr); +- } else if (basic_type == MPI_INT16_T) { +- DTPI_OBJ_INIT_BUF(int16_t, ptrs.int16_ptr); +- } else if (basic_type == MPI_INT32_T) { +- DTPI_OBJ_INIT_BUF(int32_t, ptrs.int32_ptr); +- } else if (basic_type == MPI_INT64_T) { +- DTPI_OBJ_INIT_BUF(int64_t, ptrs.int64_ptr); +- } else if (basic_type == MPI_UINT8_T) { +- DTPI_OBJ_INIT_BUF(uint8_t, ptrs.uint8_ptr); +- } else if (basic_type == MPI_UINT16_T) { +- DTPI_OBJ_INIT_BUF(uint16_t, ptrs.uint16_ptr); +- } else if (basic_type == MPI_UINT32_T) { +- DTPI_OBJ_INIT_BUF(uint32_t, ptrs.uint32_ptr); +- } else if (basic_type == MPI_UINT64_T) { +- DTPI_OBJ_INIT_BUF(uint64_t, ptrs.uint64_ptr); +- } else if (basic_type == MPI_C_COMPLEX) { /* composite types */ +- DTPI_OBJ_INIT_COMP_BUF(dtp_c_complex, float, float, ptrs.c_complex_ptr); +- } else if (basic_type == MPI_C_FLOAT_COMPLEX) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_c_float_complex, float, float, ptrs.c_float_complex_ptr); +- } else if (basic_type == MPI_C_DOUBLE_COMPLEX) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_c_double_complex, double, double, ptrs.c_double_complex_ptr); +- } else if (basic_type == MPI_C_LONG_DOUBLE_COMPLEX) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_c_long_double_complex, long double, long double, +- ptrs.c_long_double_complex_ptr); +- } else if (basic_type == MPI_FLOAT_INT) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_float_int, float, int, ptrs.float_int_ptr); +- } else if (basic_type == MPI_DOUBLE_INT) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_double_int, double, int, ptrs.double_int_ptr); +- } else if (basic_type == MPI_LONG_INT) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_long_int, long, int, ptrs.long_int_ptr); +- } else if (basic_type == MPI_2INT) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_2int, int, int, ptrs.int_int_ptr); +- } else if (basic_type == MPI_SHORT_INT) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_short_int, short, int, ptrs.short_int_ptr); +- } else if (basic_type == MPI_LONG_DOUBLE_INT) { +- DTPI_OBJ_INIT_COMP_BUF(dtp_long_double_int, long double, int, ptrs.long_double_int_ptr); +- } +-} +- +-static int DTPI_Type_check_buf(struct DTPI_Par *par, MPI_Datatype basic_type, void *buf) +-{ +- int i, j, k, err = DTP_SUCCESS; +- int count; +- char *buf_ptr; +- union DTPI_Cast_ptr ptrs; +- +- FPRINTF(stdout, "check type_displ=%li\n", par->core.type_displ); +- FPRINTF(stdout, "check type_totlen=%li\n", par->core.type_totlen); +- FPRINTF(stdout, "check type_stride=%li\n", par->core.type_stride); +- FPRINTF(stdout, "check type_blklen=%li\n", par->core.type_blklen); +- FPRINTF(stdout, "check user count=%d\n", par->user.val_count); +- +- count = par->user.val_count; +- +- buf_ptr = (char *) buf + par->core.type_displ; +- if (basic_type == MPI_CHAR || basic_type == MPI_BYTE) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(char, ptrs.char_ptr); +- } else if (basic_type == MPI_WCHAR) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(wchar_t, ptrs.wchar_ptr); +- } else if (basic_type == MPI_SHORT) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(short int, ptrs.short_ptr); +- } else if (basic_type == MPI_INT) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(int, ptrs.int_ptr); +- } else if (basic_type == MPI_LONG) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(long int, ptrs.long_ptr); +- } else if (basic_type == MPI_LONG_LONG_INT) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(long long int, ptrs.long_long_ptr); +- } else if (basic_type == MPI_UNSIGNED_CHAR) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(unsigned char, ptrs.uchar_ptr); +- } else if (basic_type == MPI_UNSIGNED_SHORT) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(unsigned short int, ptrs.ushort_ptr); +- } else if (basic_type == MPI_UNSIGNED) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(unsigned int, ptrs.uint_ptr); +- } else if (basic_type == MPI_UNSIGNED_LONG) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(unsigned long int, ptrs.ulong_ptr); +- } else if (basic_type == MPI_UNSIGNED_LONG_LONG) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(unsigned long long int, ptrs.ulong_long_ptr); +- } else if (basic_type == MPI_FLOAT) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(float, ptrs.float_ptr); +- } else if (basic_type == MPI_DOUBLE) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(double, ptrs.double_ptr); +- } else if (basic_type == MPI_LONG_DOUBLE) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(long double, ptrs.long_double_ptr); +- } else if (basic_type == MPI_INT8_T) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(int8_t, ptrs.int8_ptr); +- } else if (basic_type == MPI_INT16_T) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(int16_t, ptrs.int16_ptr); +- } else if (basic_type == MPI_INT32_T) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(int32_t, ptrs.int32_ptr); +- } else if (basic_type == MPI_INT64_T) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(int64_t, ptrs.int64_ptr); +- } else if (basic_type == MPI_UINT8_T) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(uint8_t, ptrs.uint8_ptr); +- } else if (basic_type == MPI_UINT16_T) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(uint16_t, ptrs.uint16_ptr); +- } else if (basic_type == MPI_UINT32_T) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(uint32_t, ptrs.uint32_ptr); +- } else if (basic_type == MPI_UINT64_T) { +- DTPI_OBJ_CHECK_BUF_AND_JUMP(uint64_t, ptrs.uint64_ptr); +- } else if (basic_type == MPI_C_COMPLEX) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_c_complex, float, float, ptrs.c_complex_ptr); +- } else if (basic_type == MPI_C_FLOAT_COMPLEX) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_c_float_complex, float, float, +- ptrs.c_float_complex_ptr); +- } else if (basic_type == MPI_C_DOUBLE_COMPLEX) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_c_double_complex, double, double, +- ptrs.c_double_complex_ptr); +- } else if (basic_type == MPI_C_LONG_DOUBLE_COMPLEX) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_c_long_double_complex, long double, long double, +- ptrs.c_long_double_complex_ptr); +- } else if (basic_type == MPI_FLOAT_INT) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_float_int, float, int, ptrs.float_int_ptr); +- } else if (basic_type == MPI_DOUBLE_INT) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_double_int, double, int, ptrs.double_int_ptr); +- } else if (basic_type == MPI_LONG_INT) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_long_int, long, int, ptrs.long_int_ptr); +- } else if (basic_type == MPI_2INT) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_2int, int, int, ptrs.int_int_ptr); +- } else if (basic_type == MPI_SHORT_INT) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_short_int, short, int, ptrs.short_int_ptr); +- } else if (basic_type == MPI_LONG_DOUBLE_INT) { +- DTPI_OBJ_CHECK_COMP_BUF_AND_JUMP(dtp_long_double_int, long double, int, +- ptrs.long_double_int_ptr); +- } +- +- fn_exit: +- return err; +- +- fn_fail: +- err = DTP_ERR_OTHER; +- goto fn_exit; +-} +- +-/* --------------------------------------------------------- */ +-/* Datatype Pool Object Create Functions */ +-/* --------------------------------------------------------- */ +- +-int DTPI_Struct_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int i; +- int err = DTP_SUCCESS; +- int num_types = 0; +- int obj_idx; +- int *basic_type_counts; +- MPI_Aint *basic_type_sizes = NULL; +- MPI_Aint lb, extent; +- MPI_Aint displs = 0; +- MPI_Aint *basic_type_displs = NULL; +- MPI_Datatype *basic_types; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get object index */ +- obj_idx = par->user.obj_idx; +- +- num_types = dtp->DTP_type_signature.DTP_pool_struct.DTP_num_types; +- DTPI_OBJ_ALLOC_OR_FAIL(basic_type_sizes, sizeof(*basic_type_sizes) * num_types); +- DTPI_OBJ_ALLOC_OR_FAIL(basic_type_displs, sizeof(*basic_type_displs) * num_types); +- +- /* compute struct size */ +- basic_types = dtp->DTP_type_signature.DTP_pool_struct.DTP_basic_type; +- basic_type_counts = dtp->DTP_type_signature.DTP_pool_struct.DTP_basic_type_count; +- for (i = 0; i < num_types; i++) { +- err = MPI_Type_get_extent(basic_types[i], &lb, &basic_type_sizes[i]); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- basic_type_displs[i] = displs; +- displs += (basic_type_sizes[i] * basic_type_counts[i]); +- } +- +- /* create struct datatype */ +- err = +- MPI_Type_create_struct(num_types, basic_type_counts, basic_type_displs, basic_types, +- &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- /* get type extent */ +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* initialize every elem in struct separately */ +- for (i = 0; i < num_types; i++) { +- /* user count is ignored */ +- par->user.val_count = basic_type_counts[i]; +- +- /* contiguous arrays */ +- par->core.type_stride = 1; +- par->core.type_blklen = 1; +- par->core.type_totlen = (MPI_Aint) basic_type_counts[i]; +- par->core.type_displ = basic_type_displs[i]; +- DTPI_Type_init_buf(par, basic_types[i], buf); +- } +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__STRUCT; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- dtpi->u.structure.displs = basic_type_displs; /* freed in DTP_obj_free() */ +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- memset(type_name, 0, sizeof(type_name)); +- sprintf(type_name, "%s (%d elements)", "struct", num_types); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- if (basic_type_sizes) { +- free(basic_type_sizes); +- } +- +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Basic_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int err = DTP_SUCCESS; +- int obj_idx; +- int len; +- MPI_Aint lb, basic_type_size, basic_type_count; +- MPI_Datatype basic_type; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get type signature for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- basic_type_count = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type_count; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* make a copy of the basic datatype passed by the user */ +- err = MPI_Type_dup(basic_type, &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = basic_type_count; +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, basic_type_size * basic_type_count); +- +- /* initialize totlen and displ for buf init */ +- par->core.type_totlen = basic_type_count; +- par->core.type_displ = 0; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__BASIC; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = basic_type_size; +- dtpi->type_lb = 0; +- dtpi->type_ub = basic_type_size; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type %li count)", "basic", basic_type_name, basic_type_count); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Contig_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- MPI_Aint basic_type_count; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get type signature for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- basic_type_count = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type_count; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* create contiguous datatype */ +- err = MPI_Type_contiguous(basic_type_count, basic_type, +- &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* initialize totlen and displ for buf init */ +- /* NOTE: rounding to ceiling is needed for composed types */ +- par->core.type_totlen = (extent + basic_type_size - 1) / basic_type_size; +- par->core.type_displ = 0; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__CONTIG; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- dtpi->u.contig.stride = par->core.type_stride; +- dtpi->u.contig.blklen = par->core.type_blklen; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type %li count)", "contig", basic_type_name, basic_type_count); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Vector_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get basic type for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* create vector datatype */ +- err = +- MPI_Type_vector(par->core.type_count, par->core.type_blklen, +- par->core.type_stride, basic_type, +- &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* initialize totlen and displ for buf init */ +- par->core.type_totlen = (extent + basic_type_size - 1) / basic_type_size; +- par->core.type_displ = 0; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__VECTOR; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- dtpi->u.vector.stride = par->core.type_stride; +- dtpi->u.vector.blklen = par->core.type_blklen; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type %li count %li blocklen %li stride)", "vector", +- basic_type_name, par->core.type_count, par->core.type_blklen, par->core.type_stride); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* clean up buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Hvector_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get basic type for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* create hvector datatype */ +- err = +- MPI_Type_create_hvector(par->core.type_count, par->core.type_blklen, +- par->core.type_stride * basic_type_size, basic_type, +- &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- /* get type true extent */ +- err = MPI_Type_get_true_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- FPRINTF(stdout, "hvector basic type size = %ld", basic_type_size); +- FPRINTF(stdout, "hvector extent = %ld\n", extent); +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* initialize totlen and displ for buf init */ +- par->core.type_totlen = (extent + basic_type_size - 1) / basic_type_size; +- par->core.type_displ = 0; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__HVECTOR; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- dtpi->u.hvector.stride = par->core.type_stride * basic_type_size; +- dtpi->u.hvector.blklen = par->core.type_blklen; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type %li count %li blocklen %li stride)", "hvector", +- basic_type_name, par->core.type_count, par->core.type_blklen, par->core.type_stride); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* clean up buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Indexed_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int i; +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- int *type_displs = NULL, *type_blklens = NULL; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get basic type for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- DTPI_OBJ_ALLOC_OR_FAIL(type_displs, sizeof(*type_displs) * par->core.type_count); +- DTPI_OBJ_ALLOC_OR_FAIL(type_blklens, sizeof(*type_blklens) * par->core.type_count); +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- for (i = 0; i < par->core.type_count; i++) { +- type_blklens[i] = par->core.type_blklen; +- type_displs[i] = par->core.type_stride * i; +- } +- +- /* create indexed datatype */ +- err = +- MPI_Type_indexed(par->core.type_count, type_blklens, type_displs, basic_type, +- &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- /* get type extent */ +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* initialize totlen and displ for buf init */ +- par->core.type_totlen = (extent + basic_type_size - 1) / basic_type_size; +- par->core.type_displ = 0; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__INDEXED; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- dtpi->u.indexed.stride = par->core.type_stride; +- dtpi->u.indexed.blklen = par->core.type_blklen; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type %li count %li blocklen %li stride)", "indexed", +- basic_type_name, par->core.type_count, par->core.type_blklen, par->core.type_stride); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- if (type_displs) { +- free(type_displs); +- } +- if (type_blklens) { +- free(type_blklens); +- } +- +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Hindexed_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int i; +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- int *type_blklens = NULL; +- MPI_Aint *type_displs = NULL; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get basic type for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- DTPI_OBJ_ALLOC_OR_FAIL(type_displs, sizeof(*type_displs) * par->core.type_count); +- DTPI_OBJ_ALLOC_OR_FAIL(type_blklens, sizeof(*type_blklens) * par->core.type_count); +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- for (i = 0; i < par->core.type_count; i++) { +- type_blklens[i] = par->core.type_blklen; +- type_displs[i] = par->core.type_stride * basic_type_size * i; +- } +- +- /* create indexed datatype */ +- err = +- MPI_Type_create_hindexed(par->core.type_count, type_blklens, type_displs, +- basic_type, &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- /* get type extent */ +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* initialize totlen and displ for buf init */ +- par->core.type_totlen = (extent + basic_type_size - 1) / basic_type_size; +- par->core.type_displ = 0; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__HINDEXED; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- dtpi->u.hindexed.stride = par->core.type_stride * basic_type_size; +- dtpi->u.hindexed.blklen = par->core.type_blklen; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type %li count %li blocklen %li stride)", "hindexed", +- basic_type_name, par->core.type_count, par->core.type_blklen, par->core.type_stride); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- if (type_displs) { +- free(type_displs); +- } +- if (type_blklens) { +- free(type_blklens); +- } +- +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Block_indexed_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int i; +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- int *type_displs = NULL; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get type signature for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- DTPI_OBJ_ALLOC_OR_FAIL(type_displs, sizeof(*type_displs) * par->core.type_count); +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- for (i = 0; i < par->core.type_count; i++) { +- type_displs[i] = par->core.type_stride * i; +- } +- +- /* create block indexed datatype */ +- err = +- MPI_Type_create_indexed_block(par->core.type_count, par->core.type_blklen, type_displs, +- basic_type, &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- /* get type extent */ +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* initialize totlen and displ for buf init */ +- par->core.type_totlen = (extent + basic_type_size - 1) / basic_type_size; +- par->core.type_displ = 0; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__BLOCK_INDEXED; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- dtpi->u.block_indexed.stride = par->core.type_stride; +- dtpi->u.block_indexed.blklen = par->core.type_blklen; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type %li count %li blocklen %li stride)", +- "block_indexed", basic_type_name, par->core.type_count, +- par->core.type_blklen, par->core.type_stride); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- if (type_displs) { +- free(type_displs); +- } +- +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Block_hindexed_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int i; +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- MPI_Aint *type_displs = NULL; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- DTPI_t *dtpi = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- +- /* get type signature for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- DTPI_OBJ_ALLOC_OR_FAIL(type_displs, sizeof(*type_displs) * par->core.type_count); +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- for (i = 0; i < par->core.type_count; i++) { +- type_displs[i] = par->core.type_stride * basic_type_size * i; +- } +- +- /* create block indexed datatype */ +- err = +- MPI_Type_create_hindexed_block(par->core.type_count, par->core.type_blklen, type_displs, +- basic_type, &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- /* get type extent */ +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* initialize totlen and displ for buf init */ +- par->core.type_totlen = (extent + basic_type_size - 1) / basic_type_size; +- par->core.type_displ = 0; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__BLOCK_HINDEXED; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- dtpi->u.block_hindexed.stride = par->core.type_stride * basic_type_size; +- dtpi->u.block_hindexed.blklen = par->core.type_blklen; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type %li count %li blocklen %li stride)", +- "block_hindexed", basic_type_name, par->core.type_count, +- par->core.type_blklen, par->core.type_stride); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- if (type_displs) { +- free(type_displs); +- } +- +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Subarray_c_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- DTPI_t *dtpi = NULL; +- +- /* get type signature for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- dtpi->u.subarray.arr_starts[0] = par->core.type_count / 8; /* use fix offset along x */ +- dtpi->u.subarray.arr_starts[1] = par->core.type_stride - par->core.type_blklen; +- dtpi->u.subarray.arr_sizes[0] = par->core.type_count + dtpi->u.subarray.arr_starts[0]; +- dtpi->u.subarray.arr_sizes[1] = par->core.type_stride; +- dtpi->u.subarray.arr_subsizes[0] = par->core.type_count; +- dtpi->u.subarray.arr_subsizes[1] = par->core.type_blklen; +- dtpi->u.subarray.order = MPI_ORDER_C; +- +- err = MPI_Type_create_subarray(2, +- dtpi->u.subarray.arr_sizes, +- dtpi->u.subarray.arr_subsizes, +- dtpi->u.subarray.arr_starts, +- dtpi->u.subarray.order, +- basic_type, &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* recompute stride and displacement info for buffer initialization */ +- par->core.type_displ = +- ((dtpi->u.subarray.arr_sizes[1] * dtpi->u.subarray.arr_starts[0]) + +- dtpi->u.subarray.arr_starts[1]) * basic_type_size; +- par->core.type_totlen = (extent - par->core.type_displ) / basic_type_size; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__SUBARRAY_C; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type full{%d,%d} sub{%d,%d} start{%d,%d})", +- "subarray-c", basic_type_name, dtpi->u.subarray.arr_sizes[0], +- dtpi->u.subarray.arr_sizes[1], dtpi->u.subarray.arr_subsizes[0], +- dtpi->u.subarray.arr_subsizes[1], dtpi->u.subarray.arr_starts[0], +- dtpi->u.subarray.arr_starts[1]); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +-int DTPI_Subarray_f_create(struct DTPI_Par *par, DTP_t dtp) +-{ +- int err = DTP_SUCCESS; +- int len; +- int obj_idx; +- MPI_Aint lb, extent, basic_type_size; +- MPI_Datatype basic_type; +- void *buf = NULL; +- char type_name[TYPE_NAME_MAXLEN] = { 0 }; +- char basic_type_name[BASIC_TYPE_NAME_MAXLEN] = { 0 }; +- DTPI_t *dtpi = NULL; +- +- /* get type signature for pool */ +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- /* get object index in the pool */ +- obj_idx = par->user.obj_idx; +- +- err = MPI_Type_get_extent(basic_type, &lb, &basic_type_size); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate space for private datatype info */ +- DTPI_OBJ_ALLOC_OR_FAIL(dtpi, sizeof(*dtpi)); +- +- dtpi->u.subarray.arr_starts[0] = par->core.type_count / 8; /* use fix offset along x */ +- dtpi->u.subarray.arr_starts[1] = par->core.type_stride - par->core.type_blklen; +- dtpi->u.subarray.arr_sizes[0] = par->core.type_count + dtpi->u.subarray.arr_starts[0]; +- dtpi->u.subarray.arr_sizes[1] = par->core.type_stride; +- dtpi->u.subarray.arr_subsizes[0] = par->core.type_count; +- dtpi->u.subarray.arr_subsizes[1] = par->core.type_blklen; +- dtpi->u.subarray.order = MPI_ORDER_FORTRAN; +- +- err = MPI_Type_create_subarray(2, +- dtpi->u.subarray.arr_sizes, +- dtpi->u.subarray.arr_subsizes, +- dtpi->u.subarray.arr_starts, +- dtpi->u.subarray.order, +- basic_type, &dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- err = MPI_Type_commit(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_count = 1; +- +- err = MPI_Type_get_extent(dtp->DTP_obj_array[obj_idx].DTP_obj_type, &lb, &extent); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- /* allocate buffer */ +- DTPI_OBJ_ALLOC_OR_FAIL(buf, lb + extent); +- +- /* recompute stride and displacement info for buffer initialization */ +- par->core.type_displ = +- ((dtpi->u.subarray.arr_sizes[0] * dtpi->u.subarray.arr_starts[1]) + +- dtpi->u.subarray.arr_starts[0]) * basic_type_size; +- par->core.type_stride = dtpi->u.subarray.arr_sizes[0]; +- par->core.type_blklen = dtpi->u.subarray.arr_subsizes[0]; +- par->core.type_totlen = (extent - par->core.type_displ) / basic_type_size; +- +- /* initialize buffer with requested DTPI_Par */ +- DTPI_Type_init_buf(par, basic_type, buf); +- +- /* initialize private datatype info data */ +- dtpi->obj_type = DTPI_OBJ_TYPE__SUBARRAY_F; +- dtpi->type_basic_size = basic_type_size; +- dtpi->type_extent = extent; +- dtpi->type_lb = lb; +- dtpi->type_ub = lb + extent; +- +- dtp->DTP_obj_array[obj_idx].DTP_obj_buf = buf; +- dtp->DTP_obj_array[obj_idx].private_info = dtpi; +- +- /* set type name for debug information */ +- err = MPI_Type_get_name(basic_type, basic_type_name, &len); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- sprintf(type_name, "%s (%s basic_type full{%d,%d} sub{%d,%d} start{%d,%d})", +- "subarray-f", basic_type_name, dtpi->u.subarray.arr_sizes[0], +- dtpi->u.subarray.arr_sizes[1], dtpi->u.subarray.arr_subsizes[0], +- dtpi->u.subarray.arr_subsizes[1], dtpi->u.subarray.arr_starts[0], +- dtpi->u.subarray.arr_starts[1]); +- err = MPI_Type_set_name(dtp->DTP_obj_array[obj_idx].DTP_obj_type, (char *) type_name); +- if (err) { +- DTPI_Print_error(err); +- goto fn_fail; +- } +- +- fn_exit: +- return err; +- +- fn_fail: +- /* cleanup datatype */ +- if (dtp->DTP_obj_array[obj_idx].DTP_obj_type != MPI_DATATYPE_NULL) { +- MPI_Type_free(&dtp->DTP_obj_array[obj_idx].DTP_obj_type); +- } +- +- /* cleanup buffers */ +- if (dtpi) { +- free(dtpi); +- } +- if (buf) { +- free(buf); +- } +- +- goto fn_exit; +-} +- +- +-/* --------------------------------------------------------- */ +-/* Datatype Pool Buffer Check Functions */ +-/* --------------------------------------------------------- */ +- +-int DTPI_Struct_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int i, err = DTP_SUCCESS; +- int obj_idx; +- int num_types; +- int *basic_type_counts; +- MPI_Aint *basic_type_displs; +- MPI_Datatype *basic_types; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- num_types = dtp->DTP_type_signature.DTP_pool_struct.DTP_num_types; +- basic_types = dtp->DTP_type_signature.DTP_pool_struct.DTP_basic_type; +- basic_type_counts = dtp->DTP_type_signature.DTP_pool_struct.DTP_basic_type_count; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- basic_type_displs = dtpi->u.structure.displs; +- +- /* check every elem in struct separately */ +- for (i = 0; i < num_types; i++) { +- /* user count is ignored */ +- par->user.val_count = basic_type_counts[i]; +- +- /* contiguous arrays */ +- par->core.type_stride = 1; +- par->core.type_blklen = 1; +- par->core.type_totlen = (MPI_Aint) basic_type_counts[i]; +- par->core.type_displ = basic_type_displs[i]; +- err = DTPI_Type_check_buf(par, basic_types[i], buf); +- if (err != DTP_SUCCESS) { +- break; +- } +- } +- +- return err; +-} +- +-int DTPI_Basic_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- int basic_type_count; +- MPI_Datatype basic_type; +- void *buf; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- basic_type_count = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type_count; +- +- par->core.type_stride = 1; +- par->core.type_blklen = 1; +- par->core.type_totlen = basic_type_count; +- par->core.type_displ = 0; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Contig_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_stride = dtpi->u.contig.stride; +- par->core.type_blklen = dtpi->u.contig.blklen; +- par->core.type_totlen = dtpi->type_extent / dtpi->type_basic_size; +- par->core.type_displ = 0; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Vector_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_stride = dtpi->u.vector.stride; +- par->core.type_blklen = dtpi->u.vector.blklen; +- par->core.type_totlen = dtpi->type_extent / dtpi->type_basic_size; +- par->core.type_displ = 0; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Hvector_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_stride = dtpi->u.hvector.stride / dtpi->type_basic_size; +- par->core.type_blklen = dtpi->u.hvector.blklen; +- par->core.type_totlen = dtpi->type_extent / dtpi->type_basic_size; +- par->core.type_displ = 0; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Indexed_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_stride = dtpi->u.indexed.stride; +- par->core.type_blklen = dtpi->u.indexed.blklen; +- par->core.type_totlen = dtpi->type_extent / dtpi->type_basic_size; +- par->core.type_displ = 0; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Hindexed_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_stride = dtpi->u.hindexed.stride / dtpi->type_basic_size; +- par->core.type_blklen = dtpi->u.hindexed.blklen; +- par->core.type_totlen = dtpi->type_extent / dtpi->type_basic_size; +- par->core.type_displ = 0; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Block_indexed_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_stride = dtpi->u.block_indexed.stride; +- par->core.type_blklen = dtpi->u.block_indexed.blklen; +- par->core.type_totlen = dtpi->type_extent / dtpi->type_basic_size; +- par->core.type_displ = 0; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Block_hindexed_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_stride = dtpi->u.block_hindexed.stride / dtpi->type_basic_size; +- par->core.type_blklen = dtpi->u.block_hindexed.blklen; +- par->core.type_totlen = dtpi->type_extent / dtpi->type_basic_size; +- par->core.type_displ = 0; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Subarray_c_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_displ = +- ((dtpi->u.subarray.arr_sizes[1] * dtpi->u.subarray.arr_starts[0]) + +- dtpi->u.subarray.arr_starts[1]) * dtpi->type_basic_size; +- par->core.type_totlen = (dtpi->type_extent - par->core.type_displ) / dtpi->type_basic_size; +- par->core.type_stride = dtpi->u.subarray.arr_sizes[1]; +- par->core.type_blklen = dtpi->u.subarray.arr_subsizes[1]; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +- +-int DTPI_Subarray_f_check_buf(struct DTPI_Par *par, DTP_t dtp) +-{ +- int obj_idx; +- MPI_Datatype basic_type; +- void *buf; +- DTPI_t *dtpi; +- +- obj_idx = par->user.obj_idx; +- buf = dtp->DTP_obj_array[obj_idx].DTP_obj_buf; +- basic_type = dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type; +- +- dtpi = (DTPI_t *) dtp->DTP_obj_array[obj_idx].private_info; +- par->core.type_displ = +- ((dtpi->u.subarray.arr_sizes[0] * dtpi->u.subarray.arr_starts[1]) + +- dtpi->u.subarray.arr_starts[0]) * dtpi->type_basic_size; +- par->core.type_totlen = (dtpi->type_extent - par->core.type_displ) / dtpi->type_basic_size; +- par->core.type_stride = dtpi->u.subarray.arr_sizes[0]; +- par->core.type_blklen = dtpi->u.subarray.arr_subsizes[0]; +- +- return DTPI_Type_check_buf(par, basic_type, buf); +-} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/dtpools/src/dtpools_misc.c +@@ -0,0 +1,251 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++ ++#include "dtpools_internal.h" ++#include ++#include ++ ++#define MAX_TYPES (10) ++#define MAX_TYPE_LEN (64) ++ ++#if defined NEEDS_STRDUP_DECL && !defined strdup ++extern char *strdup(const char *); ++#endif /* MPL_NEEDS_STRDUP_DECL */ ++ ++int DTPI_func_nesting = -1; ++ ++static struct { ++ const char *name; ++ MPI_Datatype type; ++} DTPI_type_list[] = { ++ { ++ "MPI_CHAR", MPI_CHAR}, { ++ "MPI_BYTE", MPI_BYTE}, { ++ "MPI_WCHAR", MPI_WCHAR}, { ++ "MPI_SHORT", MPI_SHORT}, { ++ "MPI_INT", MPI_INT}, { ++ "MPI_LONG", MPI_LONG}, { ++ "MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, { ++ "MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, { ++ "MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, { ++ "MPI_UNSIGNED", MPI_UNSIGNED}, { ++ "MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, { ++ "MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, { ++ "MPI_FLOAT", MPI_FLOAT}, { ++ "MPI_DOUBLE", MPI_DOUBLE}, { ++ "MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, { ++ "MPI_INT8_T", MPI_INT8_T}, { ++ "MPI_INT16_T", MPI_INT16_T}, { ++ "MPI_INT32_T", MPI_INT32_T}, { ++ "MPI_INT64_T", MPI_INT64_T}, { ++ "MPI_UINT8_T", MPI_UINT8_T}, { ++ "MPI_UINT16_T", MPI_UINT16_T}, { ++ "MPI_UINT32_T", MPI_UINT32_T}, { ++ "MPI_UINT64_T", MPI_UINT64_T}, { ++ "MPI_C_COMPLEX", MPI_C_COMPLEX}, { ++ "MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, { ++ "MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, { ++ "MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, { ++ "MPI_FLOAT_INT", MPI_FLOAT_INT}, { ++ "MPI_DOUBLE_INT", MPI_DOUBLE_INT}, { ++ "MPI_LONG_INT", MPI_LONG_INT}, { ++ "MPI_2INT", MPI_2INT}, { ++ "MPI_SHORT_INT", MPI_SHORT_INT}, { ++ "MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, { ++ "MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} ++}; ++ ++int DTPI_parse_base_type_str(DTP_pool_s * dtp, const char *str) ++{ ++ MPI_Datatype *array_of_types = NULL; ++ int *array_of_blklens = NULL; ++ char **typestr = NULL; ++ char **countstr = NULL; ++ int num_types = 0; ++ int i; ++ MPI_Aint lb; ++ DTPI_pool_s *dtpi = dtp->priv; ++ int rc = DTP_SUCCESS; ++ ++ DTPI_FUNC_ENTER(); ++ ++ DTPI_ERR_ASSERT(str, rc); ++ ++ dtpi->base_type_str = strdup(str); ++ ++ DTPI_ALLOC_OR_FAIL(typestr, MAX_TYPES * sizeof(char *), rc); ++ DTPI_ALLOC_OR_FAIL(countstr, MAX_TYPES * sizeof(char *), rc); ++ ++ int stridx = 0; ++ for (num_types = 0; num_types < MAX_TYPES; num_types++) { ++ if (str[stridx] == '\0') ++ break; ++ ++ DTPI_ALLOC_OR_FAIL(typestr[num_types], MAX_TYPE_LEN, rc); ++ DTPI_ALLOC_OR_FAIL(countstr[num_types], MAX_TYPE_LEN, rc); ++ ++ for (i = 0; str[stridx] != '\0' && str[stridx] != ':' && str[stridx] != '+'; i++, stridx++) ++ typestr[num_types][i] = str[stridx]; ++ typestr[num_types][i] = '\0'; ++ ++ if (str[stridx] == ':') { ++ stridx++; ++ ++ for (i = 0; str[stridx] != '\0' && str[stridx] != '+'; i++, stridx++) ++ countstr[num_types][i] = str[stridx]; ++ countstr[num_types][i] = '\0'; ++ } else { ++ countstr[num_types][0] = '\0'; ++ } ++ ++ if (str[stridx] == '+') ++ stridx++; ++ } ++ DTPI_ERR_ASSERT(str[stridx] == '\0', rc); ++ DTPI_ERR_ASSERT(num_types >= 1, rc); ++ DTPI_ERR_ASSERT(num_types < MAX_TYPES, rc); ++ ++ DTPI_ALLOC_OR_FAIL(array_of_types, num_types * sizeof(MPI_Datatype), rc); ++ DTPI_ALLOC_OR_FAIL(array_of_blklens, num_types * sizeof(int), rc); ++ ++ for (i = 0; i < num_types; i++) { ++ array_of_types[i] = MPI_DATATYPE_NULL; ++ for (int j = 0; strcmp(DTPI_type_list[j].name, "MPI_DATATYPE_NULL"); j++) { ++ if (!strcmp(typestr[i], DTPI_type_list[j].name)) { ++ array_of_types[i] = DTPI_type_list[j].type; ++ break; ++ } ++ } ++ DTPI_ERR_ASSERT(array_of_types[i] != MPI_DATATYPE_NULL, rc); ++ ++ if (strlen(countstr[i]) == 0) ++ array_of_blklens[i] = 1; ++ else ++ array_of_blklens[i] = atoi(countstr[i]); ++ } ++ ++ /* if it's a single basic datatype, just return it */ ++ if (num_types == 1 && array_of_blklens[0] == 1) { ++ dtp->DTP_base_type = array_of_types[0]; ++ dtpi->base_type_is_struct = 0; ++ DTPI_FREE(array_of_types); ++ DTPI_FREE(array_of_blklens); ++ goto fn_exit; ++ } ++ ++ /* non-basic type, create a struct */ ++ MPI_Aint *array_of_displs; ++ DTPI_ALLOC_OR_FAIL(array_of_displs, num_types * sizeof(MPI_Aint), rc); ++ MPI_Aint displ = 0; ++ ++ for (i = 0; i < num_types; i++) { ++ int size; ++ rc = MPI_Type_size(array_of_types[i], &size); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ array_of_displs[i] = displ; ++ displ += (array_of_blklens[i] * size); ++ } ++ ++ rc = MPI_Type_create_struct(num_types, array_of_blklens, array_of_displs, array_of_types, ++ &dtp->DTP_base_type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ rc = MPI_Type_commit(&dtp->DTP_base_type); ++ DTPI_ERR_CHK_MPI_RC(rc); ++ ++ dtpi->base_type_is_struct = 1; ++ dtpi->base_type_attrs.numblks = num_types; ++ dtpi->base_type_attrs.array_of_blklens = array_of_blklens; ++ dtpi->base_type_attrs.array_of_displs = array_of_displs; ++ dtpi->base_type_attrs.array_of_types = array_of_types; ++ ++ fn_exit: ++ MPI_Type_get_extent(dtp->DTP_base_type, &lb, &dtpi->base_type_extent); ++ for (i = 0; i < num_types; i++) { ++ DTPI_FREE(typestr[i]); ++ DTPI_FREE(countstr[i]); ++ } ++ if (typestr) ++ DTPI_FREE(typestr); ++ if (countstr) ++ DTPI_FREE(countstr); ++ DTPI_FUNC_EXIT(); ++ return rc; ++ ++ fn_fail: ++ if (array_of_types) ++ DTPI_FREE(array_of_types); ++ if (array_of_blklens) ++ DTPI_FREE(array_of_blklens); ++ goto fn_exit; ++} ++ ++unsigned int DTPI_low_count(unsigned int count) ++{ ++ int ret; ++ ++ DTPI_FUNC_ENTER(); ++ ++ if (count == 1) { ++ ret = count; ++ goto fn_exit; ++ } ++ ++ /* if 'count' is a prime number, return 1; else return the lowest ++ * prime factor of 'count' */ ++ for (ret = 2; ret < count; ret++) { ++ if (count % ret == 0) ++ break; ++ } ++ ++ fn_exit: ++ DTPI_FUNC_EXIT(); ++ return ret == count ? 1 : ret; ++} ++ ++unsigned int DTPI_high_count(unsigned int count) ++{ ++ DTPI_FUNC_ENTER(); ++ ++ DTPI_FUNC_EXIT(); ++ return count / DTPI_low_count(count); ++} ++ ++int DTPI_rand(DTPI_pool_s * dtpi) ++{ ++ int ret; ++ int rc = DTP_SUCCESS; ++ ++ DTPI_FUNC_ENTER(); ++ ++ DTPI_ERR_ASSERT(dtpi->rand_idx <= DTPI_RAND_LIST_SIZE, rc); ++ ++ if (dtpi->rand_idx == DTPI_RAND_LIST_SIZE) { ++ dtpi->rand_idx = 0; ++ ++ srand(dtpi->seed); ++ for (int i = 0; i < dtpi->rand_count; i++) ++ rand(); ++ ++ for (int i = 0; i < DTPI_RAND_LIST_SIZE; i++) { ++ dtpi->rand_count++; ++ dtpi->rand_list[i] = rand(); ++ } ++ } ++ ++ ret = dtpi->rand_list[dtpi->rand_idx]; ++ dtpi->rand_idx++; ++ ++ fn_exit: ++ DTPI_FUNC_EXIT(); ++ assert(rc == DTP_SUCCESS); ++ return ret; ++ ++ fn_fail: ++ goto fn_exit; ++} +--- a/test/mpi/errors/faults/testlist ++++ b/test/mpi/errors/faults/testlist +@@ -1,4 +1,4 @@ + pt2ptf1 4 env=MPIEXEC_ALLOW_FAULT=YES + collf1 4 env=MPIEXEC_ALLOW_FAULT=YES + pt2ptf2 4 env=MPIEXEC_ALLOW_FAULT=YES +-collf2 4 env=MPIEXEC_ALLOW_FAULT=YES +\ No newline at end of file ++collf2 4 env=MPIEXEC_ALLOW_FAULT=YES +--- a/test/mpi/f08/datatype/allctypesf08.f90 ++++ b/test/mpi/f08/datatype/allctypesf08.f90 +@@ -71,10 +71,9 @@ + call checkdtype( MPI_UINT64_T, "MPI_UINT64_T", ierr ) + ! other C99 types + call checkdtype( MPI_C_BOOL, "MPI_C_BOOL", ierr ) +- call checkdtype( MPI_C_FLOAT_COMPLEX, "MPI_C_FLOAT_COMPLEX", & +- & ierr) +- call checkdtype2( MPI_C_COMPLEX, "MPI_C_COMPLEX", & +- & "MPI_C_FLOAT_COMPLEX", ierr ) ++ call checkdtype2( MPI_C_FLOAT_COMPLEX, "MPI_C_COMPLEX", & ++ & "MPI_C_FLOAT_COMPLEX", ierr) ++ call checkdtype( MPI_C_COMPLEX, "MPI_C_COMPLEX", ierr ) + call checkdtype( MPI_C_DOUBLE_COMPLEX, "MPI_C_DOUBLE_COMPLEX", & + & ierr ) + if (MPI_C_LONG_DOUBLE_COMPLEX .ne. MPI_DATATYPE_NULL) then +--- a/test/mpi/f08/topo/cart_subf90.f90 ++++ b/test/mpi/f08/topo/cart_subf90.f90 +@@ -16,7 +16,7 @@ integer rank, size + type(MPI_Comm) :: comm_cart, comm_new + integer dims(2), coords(2) + logical periods(2), reorder, remain_dims(2) +-integer errs ++integer errs, ierr + + dims(1:2) = 0 + periods(1) = .TRUE. +@@ -26,7 +26,7 @@ remain_dims(1) = .TRUE. + remain_dims(2) = .FALSE. + errs = 0 + +-call MTEST_Init() ++call MTEST_Init(ierr) + call MPI_Comm_rank(MPI_COMM_WORLD, rank) + call MPI_Comm_size(MPI_COMM_WORLD, size) + call MPI_Dims_create(size, 2, dims) +--- a/test/mpi/f77/datatype/allctypesf.f ++++ b/test/mpi/f77/datatype/allctypesf.f +@@ -70,10 +70,9 @@ C + call checkdtype( MPI_UINT64_T, "MPI_UINT64_T", ierr ) + C other C99 types + call checkdtype( MPI_C_BOOL, "MPI_C_BOOL", ierr ) +- call checkdtype( MPI_C_FLOAT_COMPLEX, "MPI_C_FLOAT_COMPLEX", +- * ierr) +- call checkdtype2( MPI_C_COMPLEX, "MPI_C_COMPLEX", +- * "MPI_C_FLOAT_COMPLEX", ierr ) ++ call checkdtype2( MPI_C_FLOAT_COMPLEX, "MPI_C_COMPLEX", ++ * "MPI_C_FLOAT_COMPLEX", ierr) ++ call checkdtype( MPI_C_COMPLEX, "MPI_C_COMPLEX", ierr ) + call checkdtype( MPI_C_DOUBLE_COMPLEX, "MPI_C_DOUBLE_COMPLEX", + * ierr ) + if (MPI_C_LONG_DOUBLE_COMPLEX .ne. MPI_DATATYPE_NULL) then +--- a/test/mpi/f77/ext/ctypesfromc.c ++++ b/test/mpi/f77/ext/ctypesfromc.c +@@ -110,7 +110,9 @@ int f2ctype_(MPI_Fint * fhandle, MPI_Fint * typeidx) + * corresponding C version of the MPI Datatype bit-for-bit. But + * if *must* act like it - e.g., the datatype name must be the same */ + MPI_Type_get_name(ctype, mytypename, &mytypenamelen); +- if (strcmp(mytypename, mpi_names[*typeidx].name) != 0) { ++ if (strcmp(mytypename, mpi_names[*typeidx].name) != 0 && ++ /* LONG_LONG is a synonym of LONG_LONG_INT, thus LONG_LONG_INT is also a vaild name */ ++ (ctype != MPI_LONG_LONG || strcmp(mytypename, "MPI_LONG_LONG_INT") != 0)) { + errs++; + printf("C and Fortran types for %s (c name is %s) do not match f=%d, ctof=%d.\n", + mpi_names[*typeidx].name, mytypename, *fhandle, MPI_Type_c2f(ctype)); +--- a/test/mpi/f77/ext/testlist.in ++++ b/test/mpi/f77/ext/testlist.in +@@ -1,4 +1,4 @@ + c2f2cf 1 + c2fmult 1 + ctypesinf 1 +-@ALLOCMEMF@ +\ No newline at end of file ++@ALLOCMEMF@ +--- a/test/mpi/impls/mpich/mpi_t/testlist ++++ b/test/mpi/impls/mpich/mpi_t/testlist +@@ -1 +1 @@ +-collparmt 16 +\ No newline at end of file ++collparmt 16 +--- a/test/mpi/impls/testlist.in ++++ b/test/mpi/impls/testlist.in +@@ -1 +1 @@ +-@impldir@ +\ No newline at end of file ++@impldir@ +--- a/test/mpi/include/mpitest.h ++++ b/test/mpi/include/mpitest.h +@@ -8,7 +8,10 @@ + #define MPITEST_H_INCLUDED + + #include ++#include + #include "mpitestconf.h" ++#include "mpithreadtest.h" ++#include "mtest_common.h" + + /* + * Init and finalize test +@@ -28,61 +31,6 @@ int MTestReturnValue(int); + void MTestSleep(int); + void MTestGetDbgInfo(int *dbgflag, int *verbose); + +-/* +- * This structure contains the information used to test datatypes +- * buf is set to null when an MTestDatatype is created; the +- * InitBuf routine will allocate (if necessary) and initialize +- * the data. InitBuf may be called multiple times (this is particularly +- * important for recv bufs), in which case the buffer will only +- * be allocated if it has not already been created. +- */ +-typedef struct _MTestDatatype { +- MPI_Datatype datatype; +- void *buf; /* buffer to use in communication */ +- MPI_Aint count; /* count to use for this datatype */ +- int isBasic; /* true if the type is predefined */ +- int printErrors; /* true if errors should be printed +- * (used by the CheckBuf routines) */ +- /* The following is optional data that is used by some of +- * the derived datatypes */ +- int nblock, *index; +- /* stride, and blksize are in bytes */ +- MPI_Aint stride, blksize, *displ_in_bytes; +- int *displs, basesize; +- MPI_Datatype *old_datatypes; +- /* used in subarray */ +- int arr_sizes[2], arr_subsizes[2], arr_starts[2], order; +- +- void *(*InitBuf) (struct _MTestDatatype *); +- void *(*FreeBuf) (struct _MTestDatatype *); +- int (*CheckBuf) (struct _MTestDatatype *); +-} MTestDatatype; +- +-/* The max value of count must be very large to ensure that we +- * reach the long message algorithms. (The maximal count or block length +- * can be generated by 256K count is 4K or 32Kbytes respectively) */ +-#define MTEST_DATATYPE_FOR_EACH_COUNT(count) \ +- for (count = 1; count <= 262144; count *= 8) +- +-/* Setup the full version of datatype tests. +- * It generate tests for all basic datatypes and all derived datatypes except darray. */ +-void MTestInitFullDatatypes(void); +- +-/* Setup the minimum version of datatype tests. +- * It generate tests for all basic datatypes, vector and indexed. */ +-void MTestInitMinDatatypes(void); +- +-/* Setup the basic version of datatype tests. +- * It generate tests for all basic datatypes. */ +-void MTestInitBasicDatatypes(void); +- +-int MTestCheckRecv(MPI_Status *, MTestDatatype *); +-int MTestGetDatatypes(MTestDatatype *, MTestDatatype *, MPI_Aint); +-void MTestResetDatatypes(void); +-void MTestFreeDatatype(MTestDatatype *); +-const char *MTestGetDatatypeName(MTestDatatype *); +-int MTestGetDatatypeIndex(void); +- + int MTestGetIntracomm(MPI_Comm *, int); + int MTestGetIntracommGeneral(MPI_Comm *, int, int); + int MTestGetIntercomm(MPI_Comm *, int *, int); +@@ -102,6 +50,8 @@ const char *MTestGetWinName(void); + void MTestFreeWin(MPI_Win *); + #endif + ++int MTestIsBasicDtype(MPI_Datatype type); ++ + /* These macros permit overrides via: + * make CPPFLAGS='-DMTEST_MPI_VERSION=X -DMTEST_MPI_SUBVERSION=Y' + * where X and Y are the major and minor versions of the MPI standard that is +@@ -134,4 +84,20 @@ do { \ + memset(addr_, 0, size_); \ + } while (0) + ++#define MTEST_CREATE_AND_FREE_DTP_OBJS(dtp_, maxbufsize_, testsize_) ({ \ ++ int errs_ = 0; \ ++ do { \ ++ int i_, err_; \ ++ DTP_obj_s obj_; \ ++ for(i_ = 0; i_ < testsize_; i_++) { \ ++ err_ = DTP_obj_create(dtp_, &obj_, maxbufsize_); \ ++ if (err_ != DTP_SUCCESS) { \ ++ errs_++; \ ++ break; \ ++ } \ ++ DTP_obj_free(obj_); \ ++ } \ ++ } while (0); \ ++ errs_; }) ++ + #endif /* MPITEST_H_INCLUDED */ +--- a/test/mpi/include/mpitestcxx.h ++++ b/test/mpi/include/mpitestcxx.h +@@ -8,14 +8,26 @@ + #ifndef MPITESTCXX_H_INCLUDED + #define MPITESTCXX_H_INCLUDED + +-#ifndef MPITESTCONF_H_INCLUDED +-#error Required mpitestconf.h file not included first! ++#include "mpi.h" ++#include "mpitestconf.h" ++ ++/* *INDENT-OFF* */ ++extern "C" { ++#include "mtest_common.h" ++} ++/* *INDENT-ON* */ ++ ++#ifdef HAVE_IOSTREAM ++#include ++#ifdef HAVE_NAMESPACE_STD ++using namespace std; ++#endif ++#else ++#include + #endif +- + #include +-/* +- * Init and finalize test +- */ ++ ++/* Init and finalize test */ + void MTest_Init(void); + void MTest_Finalize(int); + void MTestPrintError(int); +@@ -23,34 +35,6 @@ void MTestPrintErrorMsg(const char[], int); + void MTestPrintfMsg(int, const char[], ...); + void MTestError(const char[]); + +-/* +- * This structure contains the information used to test datatypes +- */ +-typedef struct _MTestDatatype { +- MPI::Datatype datatype; +- void *buf; /* buffer to use in communication */ +- int count; /* count to use for this datatype */ +- int isBasic; /* true if the type is predefined */ +- int printErrors; /* true if errors should be printed +- * (used by the CheckBuf routines) */ +- /* The following is optional data that is used by some of +- * the derived datatypes */ +- int stride, nelm, blksize, *index; +- /* stride, nelm, and blksize are in bytes */ +- int *displs, basesize; +- /* displacements are in multiples of base type; basesize is the +- * size of that type */ +- void *(*InitBuf) (struct _MTestDatatype *); +- void *(*FreeBuf) (struct _MTestDatatype *); +- int (*CheckBuf) (struct _MTestDatatype *); +-} MTestDatatype; +- +-int MTestCheckRecv(MPI::Status &, MTestDatatype *); +-int MTestGetDatatypes(MTestDatatype *, MTestDatatype *, int); +-void MTestResetDatatypes(void); +-void MTestFreeDatatype(MTestDatatype *); +-const char *MTestGetDatatypeName(MTestDatatype *); +- + int MTestGetIntracomm(MPI::Intracomm &, int); + int MTestGetIntracommGeneral(MPI::Intracomm &, int, bool); + int MTestGetIntercomm(MPI::Intercomm &, int &, int); +--- a/test/mpi/include/mpithreadtest.h ++++ b/test/mpi/include/mpithreadtest.h +@@ -17,23 +17,84 @@ + MTEST_THREAD_RETURN_TYPE + */ + +-#ifdef HAVE_WINDOWS_H ++#define THREAD_PACKAGE_INVALID 0 ++#define THREAD_PACKAGE_NONE 1 ++#define THREAD_PACKAGE_POSIX 2 ++#define THREAD_PACKAGE_SOLARIS 3 ++#define THREAD_PACKAGE_WIN 4 ++#define THREAD_PACKAGE_UTI 5 ++#define THREAD_PACKAGE_ARGOBOTS 6 ++ ++#if defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_WIN) + #include + #define MTEST_THREAD_RETURN_TYPE DWORD + #define MTEST_THREAD_HANDLE HANDLE + #define MTEST_THREAD_LOCK_TYPE HANDLE +-#elif defined(HAVE_PTHREAD_H) ++ ++/* FIXME: We currently assume Solaris threads and Pthreads are interoperable. ++ * We need to use Solaris threads explicitly to avoid potential interoperability issues.*/ ++#elif defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_POSIX || \ ++ THREAD_PACKAGE_NAME == THREAD_PACKAGE_SOLARIS) + #include + #define MTEST_THREAD_RETURN_TYPE void * + #define MTEST_THREAD_HANDLE pthread_t + #define MTEST_THREAD_LOCK_TYPE pthread_mutex_t +-#else +-#error Unknown Thread Package +-#endif + + /* A dummy retval that is ignored */ + #define MTEST_THREAD_RETVAL_IGN 0 + ++#elif defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_ARGOBOTS) ++#include ++#include ++ ++#define MTEST_THREAD_RETURN_TYPE void ++#define MTEST_THREAD_HANDLE ABT_thread ++#define MTEST_THREAD_LOCK_TYPE ABT_mutex ++ ++/* Error handling */ ++ ++static void MTest_abt_error(int err, const char *msg, const char *file, int line) ++{ ++ char *err_str; ++ size_t len; ++ int ret; ++ ++ if (err == ABT_SUCCESS) ++ return; ++ ++ ret = ABT_error_get_str(err, NULL, &len); ++ if (ret != ABT_SUCCESS) { ++ fprintf(stderr, "Error %d at ABT_error_get_str\n", ret); ++ exit(EXIT_FAILURE); ++ } ++ err_str = (char *) malloc(sizeof(char) * len + 1); ++ if (ret != ABT_SUCCESS) { ++ fprintf(stderr, "Error %d at malloc\n", ret); ++ exit(EXIT_FAILURE); ++ } ++ ret = ABT_error_get_str(err, err_str, NULL); ++ if (ret != ABT_SUCCESS) { ++ fprintf(stderr, "Error %d at ABT_error_get_str\n", ret); ++ exit(EXIT_FAILURE); ++ } ++ ++ fprintf(stderr, "%s (%d): %s (%s:%d)\n", err_str, err, msg, file, line); ++ ++ free(err_str); ++ ++ exit(EXIT_FAILURE); ++} ++ ++#define MTEST_ABT_ERROR(e,m) MTest_abt_error(e,m,__FILE__,__LINE__) ++ ++#define MTEST_NUM_XSTREAMS 2 ++ ++#define MTEST_THREAD_RETVAL_IGN ++ ++#else ++#error "thread package (THREAD_PACKAGE_NAME) not defined or unknown" ++#endif ++ + int MTest_Start_thread(MTEST_THREAD_RETURN_TYPE(*fn) (void *p), void *arg); + int MTest_Join_threads(void); + int MTest_thread_lock_create(MTEST_THREAD_LOCK_TYPE *); +new file mode 100644 +--- /dev/null ++++ b/test/mpi/include/mtest_common.h +@@ -0,0 +1,23 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#ifndef MTEST_COMMON_H_INCLUDED ++#define MTEST_COMMON_H_INCLUDED ++ ++#include ++#include ++#include ++ ++MPI_Aint MTestDefaultMaxBufferSize(); ++ ++typedef void MTestArgList; ++MTestArgList *MTestArgListCreate(int argc, char *argv[]); ++char *MTestArgListGetString(MTestArgList * head, const char *arg); ++int MTestArgListGetInt(MTestArgList * head, const char *arg); ++long MTestArgListGetLong(MTestArgList * head, const char *arg); ++void MTestArgListDestroy(MTestArgList * head); ++ ++#endif +new file mode 100644 +--- /dev/null ++++ b/test/mpi/maint/dtp-test-config.txt +@@ -0,0 +1,39 @@ ++# (C) 2018 by Argonne National Laboratory. ++# See COPYRIGHT in top-level directory. ++# ++# This file is used by autogen.sh to generate multiple binary files for datatype testing. ++# Every line must have the format: ++# ++# :::timeLimit=:::: ++# ++# The autogen.sh script generates a single binary for every line. Each binary will appear in ++# the testlist file multiple times, corresponding to different combinations of basic datatypes ++# (a list of which is defined in basictypelist.txt) and counts. ++# ++# NOTE: the second (ssv args), fourth (timeLimit) and seventh (maxtestsize) fields are optional. ++ ++attr/fkeyvaltype::1::1:1024: ++coll/bcast::1 512 262144:timeLimit=420:4:16:1024 ++coll/bcast_comm_world_only::1 512 262144:timeLimit=360:10:16:1024 ++cxx/attr/fkeyvaltypex::1::1:1024: ++cxx/datatype/packsizex::1::1:1024: ++pt2pt/pingping::1 512 262144::2:8:32 ++pt2pt/sendrecv1::1 512 262144::2:32:1024 ++pt2pt/sendself::1 512 262144::1:32:1024 ++rma/accfence1::1 512 262144::4:16:1024 ++rma/accpscw1::1 512 262144::4:16:1024 ++rma/epochtest::1 512 262144:timeLimit=300:4:16:1024 ++rma/getfence1::1 512 262144::2:16:1024 ++rma/getfence1::16000000:timeLimit=1800:2:4: ++rma/lock_contention_dt::1 512 262144:timeLimit=600:4:16:1024 ++rma/lock_dt::1 512 262144::2:16:1024 ++rma/lock_dt_flush::1 512 262144::2:16:1024 ++rma/lock_dt_flushlocal::1 512 262144::2:16:1024 ++rma/lockall_dt::1 512 262144::4:16:1024 ++rma/lockall_dt_flush::1 512 262144::4:16:1024 ++rma/lockall_dt_flushall::1 512 262144::4:16:1024 ++rma/lockall_dt_flushlocal::1 512 262144::4:16:1024 ++rma/lockall_dt_flushlocalall::1 512 262144::4:16:1024 ++rma/putfence1::1 512 262144::2:16:1024 ++rma/putfence1::16000000:timeLimit=1800:2:4: ++rma/putpscw1::1 512 262144::4:16:1024 +new file mode 100755 +--- /dev/null ++++ b/test/mpi/maint/gentests_dtp.sh +@@ -0,0 +1,154 @@ ++#!/bin/sh ++# ++# (C) 2018 by Argonne National Laboratory. ++# See COPYRIGHT in top-level directory. ++# ++# Generate datatype testing build instructions for every line in ++# configuration file dtp-test-config.txt ++ ++types="" # basic MPI datatypes for type signature ++counts="" # counts for type signature ++pathname="" # test file pathname ++testdir="" # name of test directory ++testname="" # name of test ++builddir="" # directory in which executable will be located ++dirs="" # all directories containing DTPools tests ++args="" # extra args ++timelimit="" # time limit for testlist.in ++procs="" # number of processes to use in testlist.in ++srcdir="" # relative directory in which this script is located ++other_args="" ++ ++# help message ++show_help() { ++cat << EOF ++Usage: $0 [options] ++options: ++ --help show this message and exit ++ --with-dtpools-datatypes=[typelist] ++ comma separated list of MPI Datatypes to use for ++ generating DTPools tests ++EOF ++} ++ ++while [ true ] ; do ++ if test -z "$1" ; then break ; fi ++ case $(echo $1 | cut -d= -f1) in ++ --help) ++ show_help ++ exit 1 ++ ;; ++ --with-dtpools-datatypes) ++ types=$(echo $1 | cut -d= -f2) ++ shift ++ ;; ++ *) ++ echo Unrecognized option [$1] ++ exit 1 ++ ;; ++ esac ++done ++ ++# get source and build directories ++srcdir=`dirname $0` ++builddir=$PWD ++ ++# reformat type list ++types=$(echo $types | tr "," " ") ++ ++# NOTE: generate seeds for tests starting from '1' ++# as srand() considers 'seed=0' and 'seed=1' ++# equivalent: http://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/random_r.c;h=51a2e8c812aee78783bd6d38c1b6269d41c8e47e;hb=HEAD#l181 ++seed=1 ++ ++while read -r line ; do ++ if [ ! `echo $line | head -c 1` = "#" ] ; then ++ # the line is not a comment ++ pathname=`echo $line | cut -f1 -d':'` ++ args=`echo $line | cut -f2 -d':'` ++ counts=`echo $line | cut -f3 -d':'` ++ timelimit=`echo $line | cut -f4 -d':'` ++ procs=`echo $line | cut -f5 -d':'` ++ mintestsize=`echo $line | cut -f6 -d':'` ++ maxtestsize=`echo $line | cut -f7 -d':'` ++ other_args="" ++ else ++ # the line is a comment ++ continue ++ fi ++ ++ if [ -z "$pathname" ] ; then ++ echo "No pathname found" ++ exit 1 ++ elif [ -z "$counts" ] ; then ++ echo "$pathname has no counts specified" ++ exit 1 ++ elif [ -z "$procs" ] ; then ++ echo "$pathname has no proc count specified" ++ exit 1 ++ elif [ -z "$mintestsize" ] ; then ++ echo "$pathname has no minimum test size specified" ++ exit 1 ++ fi ++ ++ # set default maxtestsize ++ if [ -z $maxtestsize ] ; then ++ maxtestsize=$mintestsize ++ fi ++ ++ # get test directory and name ++ testdir=`dirname $pathname` ++ testname=`basename $pathname` ++ ++ # if this is the first test in this directory, create a new ++ # testlist.dtp ++ found=0 ++ for dir in $dirs ; do ++ if test "$testdir" = "$dir" ; then ++ found=1 ++ fi ++ done ++ if test "$found" = "0" ; then ++ dirs="$dirs $testdir" ++ printf "" > ${builddir}/${testdir}/testlist.dtp ++ fi ++ ++ # prepare extra args ++ for arg in $args ; do ++ other_args="$other_args arg=$arg" ++ done ++ ++ printf "generating tests for: ${testname}... " ++ ++ sendcounts=$counts ++ ++ for type in $types ; do ++ testsize=0 ++ count=0 ++ for sendcount in $sendcounts ; do ++ # decrease the testsize by the amount the count went up ++ # by, but make sure it doesn't fall below 8 ++ if test "$testsize" = "0" ; then ++ testsize=$maxtestsize ++ count=$sendcount ++ else ++ testsize=$((testsize * count / sendcount)) ++ if [ $testsize -lt $mintestsize ] ; then testsize=$mintestsize; fi ++ fi ++ ++ if [ $testdir = "pt2pt" ] ; then # only send/recv comm can use types from different pools ++ # do combination of different send recv count where recv count >= send count ++ # limit the mixed pool case to only one ++ # TODO: this should be defined in the config file ++ for recvcount in $sendcount $((sendcount * 2)) ; do ++ echo "${testname} $procs arg=-type=${type} arg=-sendcnt=${sendcount} arg=-recvcnt=${recvcount} arg=-seed=$seed arg=-testsize=${testsize} ${other_args} $timelimit" >> ${builddir}/${testdir}/testlist.dtp ++ seed=$((seed + 1)) ++ done ++ else ++ echo "${testname} $procs arg=-type=${type} arg=-count=${sendcount} arg=-seed=$seed arg=-testsize=${testsize} ${other_args} $timelimit" >> ${builddir}/${testdir}/testlist.dtp ++ seed=$((seed + 1)) ++ fi ++ done ++ done ++ printf "done\n" ++done < ${srcdir}/dtp-test-config.txt +new file mode 100755 +--- /dev/null ++++ b/test/mpi/maint/jenkins/set-xfail.sh +@@ -0,0 +1,113 @@ ++#!/usr/bin/env zsh ++# ++# (C) 2015 by Argonne National Laboratory. ++# See COPYRIGHT in top-level directory. ++# ++ ++jobname="" ++compiler="" ++jenkins_configure="" ++queue="" ++netmod="" ++ ++XFAIL_CONF="jenkins-scripts/xfail.conf" ++ ++##################################################################### ++## Initialization ++##################################################################### ++ ++while getopts ":f:j:c:o:q:m:" opt; do ++ case "$opt" in ++ j) ++ jobname=$OPTARG ;; ++ c) ++ compiler=$OPTARG ;; ++ o) ++ jenkins_configure=$OPTARG ;; ++ q) ++ queue=$OPTARG ;; ++ m) ++ netmod=$OPTARG ;; ++ f) ++ XFAIL_CONF=$OPTARG ;; ++ \?) ++ echo "Invalid option: -$OPTARG" >&2 ++ exit 1 ++ esac ++done ++ ++##################################################################### ++## Main ( ++##################################################################### ++ ++if test ! -f "$XFAIL_CONF" ; then ++ echo "Cannot find $XFAIL_CONF. No XFAIL will be applied" ++ exit 0 ++fi ++ ++XFAILCond() { ++ local job="$1" ++ local comp="$2" ++ local option="$3" ++ local nmod="$4" ++ local q="$5" ++ ++ local state=0 ++ ++ if [[ ! "$job" == "*" ]]; then ++ # clean up jobname and do substring match ++ if [[ ! "${jobname%%,*}" == *$job* ]]; then state=1; fi ++ fi ++ ++ if [[ ! "$comp" == "*" ]]; then ++ if [[ ! "$compiler" == "$comp" ]]; then state=1; fi ++ fi ++ ++ if [[ ! "$option" == "*" ]]; then ++ if [[ ! "$jenkins_configure" == "$option" ]]; then state=1; fi ++ fi ++ ++ if [[ ! "$nmod" == "*" ]]; then ++ if [[ ! "${netmod%%,*}" == "$nmod" ]]; then state=1; fi ++ fi ++ ++ if [[ ! "$q" == "*" ]]; then ++ if [[ ! "$queue" == "$q" ]]; then state=1; fi ++ fi ++ ++ echo "$state" ++} ++ ++SCRIPT="apply-xfail.sh" ++if [[ -f $SCRIPT ]]; then ++ rm $SCRIPT ++fi ++ ++while read -r line; do ++ #clean leading whitespaces ++ line=$(echo "$line" | sed "s/^ *//g") ++ line=$(echo "$line" | sed "s/ *$//g") ++ echo $line ++ # skip comment line ++ if test -x "$line" -o "${line:1}" = "#" ; then ++ continue ++ fi ++ ++ arr=( $(echo $line) ) ++ if [[ "0" == $(XFAILCond "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[4]}" "${arr[5]}") ]]; then ++ case "$queue" in ++ osx | freebsd64 | freebsd32 | solaris) ++ echo "${arr[@]:5}" | sed "s/sed/gsed/g" >> $SCRIPT ++ ;; ++ *) ++ echo "${arr[@]:5}" >> $SCRIPT ++ ;; ++ esac ++ fi ++done < "$XFAIL_CONF" ++ ++if [[ -f $SCRIPT ]]; then ++ source $SCRIPT ++fi ++ ++exit 0 +new file mode 100644 +--- /dev/null ++++ b/test/mpi/maint/jenkins/xfail.conf +@@ -0,0 +1,176 @@ ++# Contitional XFAIL settings ++# ++# Syntax (similar to a cron file): ++# [jobname] [compiler] [jenkins_configure] [netmod] [queue] [sed of XFAIL] ++# Note that the [jobname] allows partial matches (see examples). Other ++# conditions only allows exact matches. ++# The actual allowed combinations are depending on the Jenkins job. For ++# example, ++# ofi * * tcp * sed -i "..." ++# will have no effect since none of the ofi jobs has tcp netmod in the ++# configuration. ++# ++# Examples: ++# tcp gnu debug * * sed -i "..." ++# This will apply the set the XFAIL when the job is "mpich-master-tcp" or ++# "mpich-review-tcp", the compiler is "gnu", and the jenkins_configure is ++# "debug". ++# ++# master-ubuntu * * * ubuntu32 sed -i "..." ++# This will apply the set the XFAIL when the job is "mpich-master-ubuntu" and ++# the running queue is "ubuntu32". ++# ++# Important note: ++# Always use `sed` in this configuration. The `set-xfail.sh` script will ++# replace `sed` with `gsed`. ++# ++# For each build, all applied XFAILS will be summaried in ++# ${SOURCE}/apply-xfail.sh ++# ++ ++################################################################################ ++ ++# gather_big uses around 16GB of memory for the user buffers. That ++# already puts the test outside of the memory capacity of our FreeBSD ++# nodes. It is technically with the memory capacity of our remaining ++# nodes, but the MPICH algorithm for large Gathers allocates too much ++# temporary buffer space causing the remaining configurations to ++# intermittently fail too (see issue 3770 for more details). ++* * * * * sed -i "s+\(^gather_big .*\)+\1 xfail=issue3770+g" test/mpi/coll/testlist ++ ++################################################################################ ++# other failures on FreeBSD because of memory limits in our jenkins ++# infrastructure ++* * * * freebsd64 sed -i "s+\(^large_type_sendrec .*\)+\1 xfail=ticket0+g" test/mpi/datatype/testlist ++################################################################################ ++# xfail ch4 bugs ++ch4 * * * * sed -i "s+\(^idup_comm_gen .*\)+\1 xfail=ticket3794+g" test/mpi/threads/comm/testlist ++ch4 * * * * sed -i "s+\(^idup_nb .*\)+\1 xfail=ticket3794+g" test/mpi/threads/comm/testlist ++################################################################################ ++# xfail known failures of UCX build for Hackathon ++* * * ch4:ucx * sed -i "s+\(^win_large_shm .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++* * * ch4:ucx * sed -i "s+\(^strided_putget_indexed_shared .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++* * * ch4:ucx * sed -i "s+\(^bcastlength .*\)+\1 xfail=ticket0+g" test/mpi/errors/coll/testlist ++# am-only failures ++* * am-only ch4:ucx * sed -i "s+\(^ibcastlength .*\)+\1 xfail=ticket0+g" test/mpi/errors/coll/testlist ++* * am-only ch4:ucx * sed -i "s+\(^large_type_sendrec .*\)+\1 xfail=ticket0+g" test/mpi/datatype/testlist ++################################################################################ ++# xfail known failures of OFI build for Hackathon ++* * * ch4:ofi * sed -i "s+\(^bcastlength .*\)+\1 xfail=ticket0+g" test/mpi/errors/coll/testlist ++* * * ch4:ofi * sed -i "s+\(^ibcastlength .*\)+\1 xfail=ticket0+g" test/mpi/errors/coll/testlist ++* * * ch4:ofi * sed -i "s+\(^ibsend .*\)+\1 xfail=ticket0+g" test/mpi/threads/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^large-acc-flush_local .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++# xfail known failures of OFI build in fortran bindings ++* * * ch4:ofi * sed -i "s+\(^psendf .*\)+\1 xfail=issue3821+g" test/mpi/f77/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^prsendf .*\)+\1 xfail=issue3821+g" test/mpi/f77/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^pssendf .*\)+\1 xfail=issue3821+g" test/mpi/f77/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^psendf90 .*\)+\1 xfail=issue3821+g" test/mpi/f90/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^prsendf90 .*\)+\1 xfail=issue3821+g" test/mpi/f90/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^pssendf90 .*\)+\1 xfail=issue3821+g" test/mpi/f90/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^psendf08 .*\)+\1 xfail=issue3821+g" test/mpi/f08/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^prsendf08 .*\)+\1 xfail=issue3821+g" test/mpi/f08/pt2pt/testlist ++* * * ch4:ofi * sed -i "s+\(^pssendf08 .*\)+\1 xfail=issue3821+g" test/mpi/f08/pt2pt/testlist ++# the below tests timeout with the ofi/sockets provider ++* * * ch4:ofi * sed -i "s+\(^many_isend .*\)+\1 xfail=ticket0+g" test/mpi/pt2pt/testlist ++# debug ++* * debug ch4:ofi * sed -i "s+\(^cancelanysrc .*\)+\1 xfail=ticket0+g" test/mpi/pt2pt/testlist ++* * debug ch4:ofi * sed -i "s+\(^c2f2cf .*\)+\1 xfail=ticket0+g" test/mpi/f77/ext/testlist ++* * debug ch4:ofi * sed -i "s+\(^c2f2cf90 .*\)+\1 xfail=ticket0+g" test/mpi/f90/ext/testlist ++# am-only failures ++* * am-only ch4:ofi * sed -i "s+\(^ssendf .*\)+\1 xfail=ticket0+g" test/mpi/f77/pt2pt/testlist ++* * am-only ch4:ofi * sed -i "s+\(^ssendf90 .*\)+\1 xfail=ticket0+g" test/mpi/f90/pt2pt/testlist ++* * am-only ch4:ofi * sed -i "s+\(^issendf .*\)+\1 xfail=ticket0+g" test/mpi/f77/pt2pt/testlist ++* * am-only ch4:ofi * sed -i "s+\(^issendf90 .*\)+\1 xfail=ticket0+g" test/mpi/f90/pt2pt/testlist ++* * am-only ch4:ofi * sed -i "s+\(^cancelanysrc .*\)+\1 xfail=ticket0+g" test/mpi/pt2pt/testlist ++* * am-only ch4:ofi * sed -i "s+\(^huge_anysrc .*\)+\1 xfail=ticket0+g" test/mpi/pt2pt/testlist ++* * am-only ch4:ofi * sed -i "s+\(^idup_nb .*\)+\1 xfail=ticket0+g" test/mpi/threads/comm/testlist ++* * am-only ch4:ofi * sed -i "s+\(^allgatherv4 .*\)+\1 xfail=ticket0+g" test/mpi/coll/testlist ++* * am-only ch4:ofi * sed -i "s+\(^large_vec .*\)+\1 xfail=ticket0+g" test/mpi/datatype/testlist ++################################################################################ ++#ch3:ofi ++ofi * * ch3:ofi * sed -i "s+\(^ibcastlength .*\)+\1 xfail=ticket0+g" test/mpi/errors/coll/testlist ++ofi * * ch3:ofi * sed -i "s+\(^manyget .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++ofi * * ch3:ofi * sed -i "s+\(^manyrma2 .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++ofi * * ch3:ofi * sed -i "s+\(^manyrma2_shm .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++################################################################################ ++# f08 related problems xfail them for easy testing ++* intel * * * sed -i "s+\(^commattrf08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/attr/testlist ++* intel * * * sed -i "s+\(^commattr2f08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/attr/testlist ++* intel * * * sed -i "s+\(^commattr3f08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/attr/testlist ++* intel * * * sed -i "s+\(^typeattrf08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/attr/testlist ++* intel * * * sed -i "s+\(^typeattr2f08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/attr/testlist ++* intel * * * sed -i "s+\(^typeattr3f08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/attr/testlist ++* intel * * * sed -i "s+\(^fandcattrf08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/attr/testlist ++* intel * * * sed -i "s+\(^attrlangf08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/attr/testlist ++* intel * * * sed -i "s+\(^winattr2f08 .*\)+\1 xfail=issue3820+g" test/mpi/f08/rma/testlist ++* intel * * * sed -i "s+\(^dgraph_unwgtf90 .*\)+\1 xfail=issue3820+g" test/mpi/f08/topo/testlist ++* intel * * * sed -i "s+\(^greqf08 .*\)+\1 xfail=ticket0+g" test/mpi/f08/pt2pt/testlist ++* intel * * * sed -i "s+\(^statusesf08 .*\)+\1 xfail=ticket0+g" test/mpi/f08/pt2pt/testlist ++* intel * * * sed -i "s+\(^nonblockingf08 .*\)+\1 xfail=ticket0+g" test/mpi/f08/coll/testlist ++* intel * * * sed -i "s+\(^nonblocking_inpf08 .*\)+\1 xfail=ticket0+g" test/mpi/f08/coll/testlist ++* intel * * * sed -i "s+\(^typesubf08 .*\)+\1 xfail=ticket0+g" test/mpi/f08/datatype/testlist ++* intel * * * sed -i "s+\(^cart_subf90 .*\)+\1 xfail=ticket0+g" test/mpi/f08/topo/testlist ++* intel * * * sed -i "s+\(^c2f2cf90 .*\)+\1 xfail=ticket0+g" test/mpi/f08/ext/testlist ++* intel * * * sed -i "s+\(^iwriteshf90 .*\)+\1 xfail=ticket0+g" test/mpi/f08/io/testlist ++* intel * * * sed -i "s+\(^writeshf90 .*\)+\1 xfail=ticket0+g" test/mpi/f08/io/testlist ++* intel * * * sed -i "s+\(^ring .*\)+\1 xfail=ticket0+g" test/mpi/f08/misc/testlist ++* intel * * * sed -i "s+\(^profile1f90 .*\)+\1 xfail=ticket0+g" test/mpi/f08/profile/testlist ++################################################################################ ++* * * * osx sed -i "s+\(^throwtest .*\)+\1 xfail=ticket0+g" test/mpi/errors/cxx/errhan/testlist ++* * * * osx sed -i "s+\(^commerrx .*\)+\1 xfail=ticket0+g" test/mpi/errors/cxx/errhan/testlist ++* * * * osx sed -i "s+\(^fileerrretx .*\)+\1 xfail=ticket0+g" test/mpi/errors/cxx/io/testlist ++* * * * osx sed -i "s+\(^throwtestfilex .*\)+\1 xfail=ticket0+g" test/mpi/errors/cxx/io/testlist ++################################################################################ ++# xfail active message accumulates with short_int (only CH4 fails) ++* * * * * sed -i "s+\(^atomic_get_short_int .*\)+\1 xfail=ticket3380+g" test/mpi/rma/testlist ++################################################################################ ++# xfail large count tests on 32 bit architectures (cannot allocate such large memory) ++* * * * freebsd32 sed -i "s|\(^getfence1 [0-9]* arg=-type=.* arg=-count=16000000 .*\)|\1 xfail=ticket0|g" test/mpi/rma/testlist.dtp ++* * * * freebsd32 sed -i "s|\(^putfence1 [0-9]* arg=-type=.* arg=-count=16000000 .*\)|\1 xfail=ticket0|g" test/mpi/rma/testlist.dtp ++* * * * ubuntu32 sed -i "s|\(^getfence1 [0-9]* arg=-type=.* arg=-count=16000000 .*\)|\1 xfail=ticket0|g" test/mpi/rma/testlist.dtp ++* * * * ubuntu32 sed -i "s|\(^putfence1 [0-9]* arg=-type=.* arg=-count=16000000 .*\)|\1 xfail=ticket0|g" test/mpi/rma/testlist.dtp ++# xfail all the tests that are taking too long because of performance bug on OFI (not using SHM) ++* * * ch4:ofi * sed -i "s|\(^getfence1 [0-9]* arg=-type=.* arg=-count=16000000 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^putfence1 [0-9]* arg=-type=.* arg=-count=16000000 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^lock_contention_dt [0-9]* arg=-type=.* arg=-count=262144 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^lock_dt.* [0-9]* arg=-type=.* arg=-count=262144 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^lockall_dt.* [0-9]* arg=-type=.* arg=-count=262144 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^epochtest [0-9]* arg=-type=.* arg=-count=262144 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^lock_contention_dt [0-9]* arg=-type=.* arg=-count=32768 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^lock_dt.* [0-9]* arg=-type=.* arg=-count=32768 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^lockall_dt.* [0-9]* arg=-type=.* arg=-count=32768 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^accfence1 [0-9]* arg=-type=.* arg=-count=262144 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^accpscw1 [0-9]* arg=-type=.* arg=-count=262144 .*\)|\1 xfail=ticket2965|g" test/mpi/rma/testlist.dtp ++* * * ch4:ofi * sed -i "s|\(^pingping [0-9]* arg=-type=.* arg=-sendcnt=262144 .*\)|\1 xfail=ticket2965|g" test/mpi/pt2pt/testlist.dtp ++# intercomm abort test are expected to fail since MPI_Finalize will try to perform Allreduce on all process (includeing the aborted ones) ++* * * * * sed -i "s+\(^intercomm_abort .*\)+\1 xfail=ticket0+g" test/mpi/errors/comm/testlist ++# disable large datatype test for valgrind as it dies with valgrind running out of memory. ++valgrind * * * * sed -i "s+\(^large_type_sendrec .*\)+\1 xfail=ticket0+g" test/mpi/datatype/testlist ++valgrind * * * * sed -i "s+\(^large_vec .*\)+\1 xfail=ticket0+g" test/mpi/datatype/testlist ++valgrind * * * * sed -i "s+\(^bcast .*\)+\1 xfail=ticket0+g" test/mpi/coll/testlist ++valgrind * * * * sed -i "s+\(^fkeyvaltype .*\)+\1 xfail=ticket0+g" test/mpi/attr/testlist ++valgrind * * * * sed -i "s+\(^sendself .*\)+\1 xfail=ticket0+g" test/mpi/pt2pt/testlist ++valgrind * * * * sed -i "s+\(^pingping .*\)+\1 xfail=ticket0+g" test/mpi/pt2pt/testlist ++valgrind * * * * sed -i "s+\(^sendrecv1 .*\)+\1 xfail=ticket0+g" test/mpi/pt2pt/testlist ++valgrind * * * * sed -i "s+\(^lock_dt .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^lock_dt_flush .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^lock_dt_flushlocal .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^lockall_dt .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^lockall_dt_flush .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^lockall_dt_flushall .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^lockall_dt_flushlocal .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^lockall_dt_flushlocalall .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^putpscw1 .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^accpscw1 .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^epochtest .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^putfence1 .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^getfence1 .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++valgrind * * * * sed -i "s+\(^accfence1 .*\)+\1 xfail=ticket0+g" test/mpi/rma/testlist ++# Bug - Github Issue https://github.com/pmodels/mpich/issues/3469 ++* * debug ch4:ucx * sed -i "s+\(^rqfreeb .*\)+\1 xfail=ticket0+g" test/mpi/pt2pt/testlist ++# Bug - Github Issue https://github.com/pmodels/mpich/issues/3618 ++* * * ch4:ucx * sed -i "s+\(^darray_pack .*\)+\1 xfail=ticket0+g" test/mpi/datatype/testlist ++# release_gather intra-node coll algorithms relies on izem which is not default. ++* * * * * sed -i "s+\(env=MPIR_CVAR_BCAST_POSIX_INTRA_ALGORITHM=release_gather .*\)+xfail=ticket0+g" test/mpi/coll/testlist ++* * * * * sed -i "s+\(env=MPIR_CVAR_REDUCE_POSIX_INTRA_ALGORITHM=release_gather .*\)+xfail=ticket0+g" test/mpi/coll/testlist ++* * * * * sed -i "s+\(env=MPIR_CVAR_ALLREDUCE_POSIX_INTRA_ALGORITHM=release_gather .*\)+xfail=ticket0+g" test/mpi/coll/testlist +--- a/test/mpi/pt2pt/Makefile.am ++++ b/test/mpi/pt2pt/Makefile.am +@@ -56,12 +56,24 @@ noinst_PROGRAMS = \ + huge_underflow \ + huge_anysrc \ + huge_dupcomm \ ++ huge_ssend \ ++ multi_psend_derived \ + dtype_send \ + recv_any \ + irecv_any \ +- large_tag ++ large_tag \ ++ pingping \ ++ sendrecv1 \ ++ sendself + + irecv_any_CPPFLAGS = -DTEST_NB $(AM_CPPFLAGS) + irecv_any_SOURCES = recv_any.c + +-include Makefile.dtp ++pingping_CPPFLAGS = $(AM_CPPFLAGS) ++pingping_SOURCES = pingping.c ++ ++sendrecv1_CPPFLAGS = $(AM_CPPFLAGS) ++sendrecv1_SOURCES = sendrecv1.c ++ ++sendself_CPPFLAGS = $(AM_CPPFLAGS) ++sendself_SOURCES = sendself.c +new file mode 100644 +--- /dev/null ++++ b/test/mpi/pt2pt/huge_ssend.c +@@ -0,0 +1,49 @@ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ * ++ * This program checks if MPICH can correctly handle huge synchronous sends ++ * ++ */ ++ ++#include ++#include ++#include ++ ++#include "mpitest.h" ++ ++#define COUNT (4*1024*1024) ++ ++int main(int argc, char *argv[]) ++{ ++ int *buff; ++ int size, rank; ++ ++ MTest_Init(&argc, &argv); ++ ++ MPI_Comm_rank(MPI_COMM_WORLD, &rank); ++ MPI_Comm_size(MPI_COMM_WORLD, &size); ++ ++ if (size != 2) { ++ fprintf(stderr, "Launch with two processes\n"); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++ } ++ ++ buff = malloc(COUNT * sizeof(int)); ++ ++ if (rank == 0) ++ MPI_Ssend(buff, COUNT, MPI_INT, 1, 0, MPI_COMM_WORLD); ++ else ++ MPI_Recv(buff, COUNT, MPI_INT, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); ++ ++ free(buff); ++ ++ MTest_Finalize(0); ++ ++ return 0; ++} +--- a/test/mpi/pt2pt/mprobe.c ++++ b/test/mpi/pt2pt/mprobe.c +@@ -559,6 +559,85 @@ int main(int argc, char **argv) + check(msg == MPI_MESSAGE_NULL); + } + ++ /* test 13: simple send & mprobe+mrecv with zero count */ ++ if (rank == 0) { ++ MPI_Send(sendbuf, 0, MPI_INT, 1, 13, MPI_COMM_WORLD); ++ } else { ++ memset(&s1, 0xab, sizeof(MPI_Status)); ++ memset(&s2, 0xab, sizeof(MPI_Status)); ++ /* the error field should remain unmodified */ ++ s1.MPI_ERROR = MPI_ERR_DIMS; ++ s2.MPI_ERROR = MPI_ERR_TOPOLOGY; ++ ++ msg = MPI_MESSAGE_NULL; ++ MPI_Mprobe(0, 13, MPI_COMM_WORLD, &msg, &s1); ++ check(s1.MPI_SOURCE == 0); ++ check(s1.MPI_TAG == 13); ++ check(s1.MPI_ERROR == MPI_ERR_DIMS); ++ check(msg != MPI_MESSAGE_NULL); ++ ++ count = -1; ++ MPI_Get_count(&s1, MPI_INT, &count); ++ check(count == 0); ++ ++ recvbuf[0] = 0x01234567; ++ recvbuf[1] = 0x89abcdef; ++ MPI_Mrecv(recvbuf, 0, MPI_INT, &msg, &s2); ++ /* recvbuf should remain unmodified */ ++ check(recvbuf[0] == 0x01234567); ++ check(recvbuf[1] == 0x89abcdef); ++ check(s2.MPI_SOURCE == 0); ++ check(s2.MPI_TAG == 13); ++ check(s2.MPI_ERROR == MPI_ERR_TOPOLOGY); ++ check(msg == MPI_MESSAGE_NULL); ++ count = -1; ++ MPI_Get_count(&s2, MPI_INT, &count); ++ check(count == 0); ++ } ++ ++ /* test 14: simple send & mprobe+mrecv with zero-size datatype */ ++ if (rank == 0) { ++ MPI_Send(sendbuf, 0, MPI_BYTE, 1, 14, MPI_COMM_WORLD); ++ } else { ++ MPI_Datatype zero_dtype; ++ ++ MPI_Type_contiguous(0, MPI_INT, &zero_dtype); ++ MPI_Type_commit(&zero_dtype); ++ ++ memset(&s1, 0xab, sizeof(MPI_Status)); ++ memset(&s2, 0xab, sizeof(MPI_Status)); ++ /* the error field should remain unmodified */ ++ s1.MPI_ERROR = MPI_ERR_DIMS; ++ s2.MPI_ERROR = MPI_ERR_TOPOLOGY; ++ ++ msg = MPI_MESSAGE_NULL; ++ MPI_Mprobe(0, 14, MPI_COMM_WORLD, &msg, &s1); ++ check(s1.MPI_SOURCE == 0); ++ check(s1.MPI_TAG == 14); ++ check(s1.MPI_ERROR == MPI_ERR_DIMS); ++ check(msg != MPI_MESSAGE_NULL); ++ ++ count = -1; ++ MPI_Get_count(&s1, zero_dtype, &count); ++ check(count == 0); ++ ++ recvbuf[0] = 0x01234567; ++ recvbuf[1] = 0x89abcdef; ++ MPI_Mrecv(recvbuf, 1, zero_dtype, &msg, &s2); ++ /* recvbuf should remain unmodified */ ++ check(recvbuf[0] == 0x01234567); ++ check(recvbuf[1] == 0x89abcdef); ++ check(s2.MPI_SOURCE == 0); ++ check(s2.MPI_TAG == 14); ++ check(s2.MPI_ERROR == MPI_ERR_TOPOLOGY); ++ check(msg == MPI_MESSAGE_NULL); ++ count = -1; ++ MPI_Get_count(&s2, zero_dtype, &count); ++ check(count == 0); ++ ++ MPI_Type_free(&zero_dtype); ++ } ++ + free(sendbuf); + free(recvbuf); + +new file mode 100644 +--- /dev/null ++++ b/test/mpi/pt2pt/multi_psend_derived.c +@@ -0,0 +1,64 @@ ++/* ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ * ++ * Portions of this code were written by Intel Corporation. ++ * Copyright (C) 2011-2018 Intel Corporation. Intel provides this material ++ * to Argonne National Laboratory subject to Software Grant and Corporate ++ * Contributor License Agreement dated February 8, 2012. ++ * ++ * This program checks if MPICH can correctly handle multiple persistent ++ * communication calls with a derived datatype ++ * ++ */ ++ ++#include ++#include ++#include ++#include "mpitest.h" ++ ++#define ITER 16 ++ ++int main(int argc, char *argv[]) ++{ ++ int size, rank; ++ int i; ++ MPI_Request req; ++ MPI_Datatype int_dup; ++ int v = 1, errs = 0; ++ ++ MTest_Init(&argc, &argv); ++ ++ MPI_Comm_rank(MPI_COMM_WORLD, &rank); ++ MPI_Comm_size(MPI_COMM_WORLD, &size); ++ ++ if (size != 2) { ++ fprintf(stderr, "Launch with two processes\n"); ++ MPI_Abort(MPI_COMM_WORLD, 1); ++ } ++ ++ if (rank == 0) { ++ MPI_Type_dup(MPI_INT, &int_dup); ++ v = 42; ++ MPI_Send_init(&v, 1, int_dup, 1, 0, MPI_COMM_WORLD, &req); ++ MPI_Type_free(&int_dup); ++ for (i = 0; i < ITER; i++) { ++ MPI_Status s; ++ MPI_Start(&req); ++ MPI_Wait(&req, &s); ++ } ++ MPI_Request_free(&req); ++ } else { ++ for (i = 0; i < ITER; i++) { ++ v = -1; ++ MPI_Recv(&v, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); ++ if (v != 42) { ++ errs++; ++ fprintf(stderr, "Psend-recv iteration %d: Expected 42 but got %d\n", i, v); ++ } ++ } ++ } ++ ++ MTest_Finalize(errs); ++ return MTestReturnValue(errs); ++} +--- a/test/mpi/pt2pt/pingping.c ++++ b/test/mpi/pt2pt/pingping.c +@@ -14,181 +14,57 @@ + static char MTEST_Descrip[] = "Send flood test"; + */ + +-#define MAX_MSG_SIZE 40000000 +-#define MAX_COUNT 4000 +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; ++#define MAX_TOTAL_MSG_SIZE (32 * 1024 * 1024) ++#define MAXMSG (4096) + + int main(int argc, char *argv[]) + { + int errs = 0, err; + int rank, size, source, dest; +- int minsize = 2, count[2], nmsg, maxmsg; +- int i, j, len; +- MPI_Aint sendcount, recvcount; ++ int minsize = 2, nmsg, maxmsg; ++ int i, j, len, seed, testsize; ++ MPI_Aint sendcount, recvcount, count[2]; ++ MPI_Aint maxbufsize; + MPI_Comm comm; + MPI_Datatype sendtype, recvtype; +- DTP_t send_dtp, recv_dtp; +- char send_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char recv_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ DTP_pool_s dtp; ++ DTP_obj_s send_obj, recv_obj; + void *sendbuf, *recvbuf; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -sendcnt=[COUNT] -recvcnt=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-sendcnt=", strlen("-sendcnt="))) { +- count[0] = atoi(argv[i] + strlen("-sendcnt=")); +- } else if (!strncmp(argv[i], "-recvcnt=", strlen("-recvcnt="))) { +- count[1] = atoi(argv[i] + strlen("-recvcnt=")); +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count[0], &send_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating send pool (%s,%d)\n", type_name, count[0]); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count[1], &recv_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating recv pool (%s,%d)\n", type_name, count[1]); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count[0] = MTestArgListGetLong(head, "sendcnt"); ++ count[1] = MTestArgListGetLong(head, "recvcnt"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &send_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &recv_dtp); ++ err = DTP_pool_create(basic_type, count[0], seed, &dtp); + if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); ++ fprintf(stderr, "Error while creating send pool (%s,%ld)\n", basic_type, count[0]); ++ fflush(stderr); + } + +- /* these are ignored */ +- count[0] = 0; +- count[1] = 0; +-#endif ++ MTestArgListDestroy(head); + + /* The following illustrates the use of the routines to + * run through a selection of communicators and datatypes. + * Use subsets of these for tests that do not involve combinations + * of communicators, datatypes, and counts of datatypes */ + while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) ++ if (comm == MPI_COMM_NULL) { ++ /* for NULL comms, make sure these processes create the ++ * same number of objects, so the target knows what ++ * datatype layout to check for */ ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); + continue; ++ } ++ + /* Determine the sender and receiver */ + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); +@@ -199,96 +75,108 @@ int main(int argc, char *argv[]) + * change the error handler to errors return */ + MPI_Comm_set_errhandler(comm, MPI_ERRORS_RETURN); + +- for (i = 0; i < send_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(send_dtp, i, 0, 1, count[0]); ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &send_obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- sendcount = send_dtp->DTP_obj_array[i].DTP_obj_count; +- sendtype = send_dtp->DTP_obj_array[i].DTP_obj_type; +- sendbuf = send_dtp->DTP_obj_array[i].DTP_obj_buf; ++ err += DTP_obj_create(dtp, &recv_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- for (j = 0; j < recv_dtp->DTP_num_objs; j++) { +- int nbytes; +- MPI_Type_size(sendtype, &nbytes); +- maxmsg = MAX_COUNT - count[0]; ++ int nbytes; ++ MPI_Type_size(send_obj.DTP_datatype, &nbytes); ++ nbytes *= send_obj.DTP_type_count; + +- err = DTP_obj_create(recv_dtp, j, 0, 0, 0); ++ maxmsg = MAX_TOTAL_MSG_SIZE / nbytes; ++ if (maxmsg > MAXMSG) ++ maxmsg = MAXMSG; ++ ++ if (rank == source) { ++ sendbuf = malloc(send_obj.DTP_bufsize); ++ if (sendbuf == NULL) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_buf_init(send_obj, sendbuf, 0, 1, count[0]); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- recvcount = recv_dtp->DTP_obj_array[j].DTP_obj_count; +- recvtype = recv_dtp->DTP_obj_array[j].DTP_obj_type; +- recvbuf = recv_dtp->DTP_obj_array[j].DTP_obj_buf; ++ sendcount = send_obj.DTP_type_count; ++ sendtype = send_obj.DTP_datatype; ++ ++ MTestPrintfMsg(1, "Sending count = %d of sendtype %s of total size %d bytes\n", ++ count[0], send_obj.DTP_description, nbytes * count[0]); + +- /* We may want to limit the total message size sent */ +- if (nbytes > MAX_MSG_SIZE) { +- continue; ++ for (nmsg = 1; nmsg < maxmsg; nmsg++) { ++ err = ++ MPI_Send(sendbuf + send_obj.DTP_buf_offset, sendcount, sendtype, dest, 0, ++ comm); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); ++ } ++ } + } + +- if (rank == source) { +- MPI_Type_get_name(sendtype, send_name, &len); +- MTestPrintfMsg(1, "Sending count = %d of sendtype %s of total size %d bytes\n", +- count[0], send_name, nbytes * count[0]); ++ free(sendbuf); ++ } else if (rank == dest) { ++ recvbuf = malloc(recv_obj.DTP_bufsize); ++ if (recvbuf == NULL) { ++ errs++; ++ break; ++ } + +- for (nmsg = 1; nmsg < maxmsg; nmsg++) { +- err = MPI_Send(sendbuf, sendcount, sendtype, dest, 0, comm); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } +- } ++ recvcount = recv_obj.DTP_type_count; ++ recvtype = recv_obj.DTP_datatype; ++ ++ for (nmsg = 1; nmsg < maxmsg; nmsg++) { ++ err = DTP_obj_buf_init(recv_obj, recvbuf, -1, -1, count[0]); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; + } +- } else if (rank == dest) { +- for (nmsg = 1; nmsg < maxmsg; nmsg++) { +- err = +- MPI_Recv(recvbuf, recvcount, recvtype, source, 0, comm, +- MPI_STATUS_IGNORE); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ ++ err = ++ MPI_Recv(recvbuf + recv_obj.DTP_buf_offset, recvcount, recvtype, source, 0, ++ comm, MPI_STATUS_IGNORE); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } ++ } + +- err = DTP_obj_buf_check(recv_dtp, j, 0, 1, count[0]); +- if (err != DTP_SUCCESS) { +- if (errs < 10) { +- MPI_Type_get_name(sendtype, send_name, &len); +- MPI_Type_get_name(recvtype, recv_name, &len); +- fprintf(stdout, +- "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %d, message iteration %d of %d\n", +- recv_name, send_name, count[0], nmsg, maxmsg); +- fflush(stdout); +- } +- errs++; ++ err = DTP_obj_buf_check(recv_obj, recvbuf, 0, 1, count[0]); ++ if (err != DTP_SUCCESS) { ++ if (errs < 10) { ++ fprintf(stderr, ++ "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %ld, message iteration %d of %d\n", ++ recv_obj.DTP_description, send_obj.DTP_description, ++ count[0], nmsg, maxmsg); ++ fflush(stderr); + } ++ errs++; + } + } +- DTP_obj_free(recv_dtp, j); ++ ++ free(recvbuf); + } +- DTP_obj_free(send_dtp, i); ++ DTP_obj_free(recv_obj); ++ DTP_obj_free(send_obj); + } + MTestFreeComm(&comm); + } + +- DTP_pool_free(send_dtp); +- DTP_pool_free(recv_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif ++ DTP_pool_free(dtp); + + MTest_Finalize(errs); + return MTestReturnValue(errs); +--- a/test/mpi/pt2pt/sendrecv1.c ++++ b/test/mpi/pt2pt/sendrecv1.c +@@ -13,178 +13,55 @@ + /* + static char MTEST_Descrip[] = "Send-Recv"; + */ +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; + +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; + + int main(int argc, char *argv[]) + { + int errs = 0, err; + int rank, size, source, dest; +- int minsize = 2, count[2]; +- int i, j, len; +- MPI_Aint sendcount, recvcount; ++ int minsize = 2; ++ int i, j, len, seed, testsize; ++ MPI_Aint sendcount, recvcount, count[2]; ++ MPI_Aint maxbufsize; + MPI_Comm comm; + MPI_Datatype sendtype, recvtype; +- DTP_t send_dtp, recv_dtp; ++ DTP_pool_s dtp; ++ DTP_obj_s send_obj, recv_obj; + void *sendbuf, *recvbuf; +- char send_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char recv_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count[0] = MTestArgListGetLong(head, "sendcnt"); ++ count[1] = MTestArgListGetLong(head, "recvcnt"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -sendcnt=[COUNT] -recvcnt=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-sendcnt=", strlen("-sendcnt="))) { +- count[0] = atoi(argv[i] + strlen("-sendcnt=")); +- } else if (!strncmp(argv[i], "-recvcnt=", strlen("-recvcnt="))) { +- count[1] = atoi(argv[i] + strlen("-recvcnt=")); +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count[0], &send_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating send pool (%s,%d)\n", type_name, count[0]); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count[1], &recv_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating recv pool (%s,%d)\n", type_name, count[1]); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &send_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &recv_dtp); ++ err = DTP_pool_create(basic_type, count[0], seed, &dtp); + if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); ++ fprintf(stderr, "Error while creating send pool (%s,%ld)\n", basic_type, count[0]); ++ fflush(stderr); + } + +- /* these are ignored */ +- count[0] = 0; +- count[1] = 0; +-#endif ++ MTestArgListDestroy(head); + + /* The following illustrates the use of the routines to + * run through a selection of communicators and datatypes. + * Use subsets of these for tests that do not involve combinations + * of communicators, datatypes, and counts of datatypes */ + while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) ++ if (comm == MPI_COMM_NULL) { ++ /* for NULL comms, make sure these processes create the ++ * same number of objects, so the target knows what ++ * datatype layout to check for */ ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); + continue; ++ } + + /* Determine the sender and receiver */ + MPI_Comm_rank(comm, &rank); +@@ -196,77 +73,90 @@ int main(int argc, char *argv[]) + * change the error handler to errors return */ + MPI_Comm_set_errhandler(comm, MPI_ERRORS_RETURN); + +- for (i = 0; i < send_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(send_dtp, i, 0, 1, count[0]); ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &send_obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- sendcount = send_dtp->DTP_obj_array[i].DTP_obj_count; +- sendtype = send_dtp->DTP_obj_array[i].DTP_obj_type; +- sendbuf = send_dtp->DTP_obj_array[i].DTP_obj_buf; ++ err = DTP_obj_create(dtp, &recv_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- for (j = 0; j < recv_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(recv_dtp, j, 0, 0, 0); ++ if (rank == source) { ++ sendbuf = malloc(send_obj.DTP_bufsize); ++ if (sendbuf == NULL) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_buf_init(send_obj, sendbuf, 0, 1, count[0]); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- recvcount = recv_dtp->DTP_obj_array[j].DTP_obj_count; +- recvtype = recv_dtp->DTP_obj_array[j].DTP_obj_type; +- recvbuf = recv_dtp->DTP_obj_array[j].DTP_obj_buf; ++ sendcount = send_obj.DTP_type_count; ++ sendtype = send_obj.DTP_datatype; + +- if (rank == source) { +- err = MPI_Send(sendbuf, sendcount, sendtype, dest, 0, comm); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ err = ++ MPI_Send(sendbuf + send_obj.DTP_buf_offset, sendcount, sendtype, dest, 0, comm); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } +- } else if (rank == dest) { +- err = +- MPI_Recv(recvbuf, recvcount, recvtype, source, 0, comm, MPI_STATUS_IGNORE); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ } ++ ++ free(sendbuf); ++ } else if (rank == dest) { ++ recvbuf = malloc(recv_obj.DTP_bufsize); ++ if (recvbuf == NULL) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_buf_init(recv_obj, recvbuf, -1, -1, count[0]); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ recvcount = recv_obj.DTP_type_count; ++ recvtype = recv_obj.DTP_datatype; ++ ++ err = ++ MPI_Recv(recvbuf + recv_obj.DTP_buf_offset, recvcount, recvtype, source, 0, ++ comm, MPI_STATUS_IGNORE); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } ++ } + +- err = DTP_obj_buf_check(recv_dtp, j, 0, 1, count[0]); +- if (err != DTP_SUCCESS) { +- if (errs < 10) { +- MPI_Type_get_name(sendtype, send_name, &len); +- MPI_Type_get_name(recvtype, recv_name, &len); +- fprintf(stdout, +- "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %d\n", +- recv_name, send_name, count[0]); +- } +- errs++; ++ err = DTP_obj_buf_check(recv_obj, recvbuf, 0, 1, count[0]); ++ if (err != DTP_SUCCESS) { ++ if (errs < 10) { ++ fprintf(stderr, ++ "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %ld\n", ++ recv_obj.DTP_description, send_obj.DTP_description, count[0]); + } ++ errs++; + } +- DTP_obj_free(recv_dtp, j); ++ ++ free(recvbuf); + } +- DTP_obj_free(send_dtp, i); ++ DTP_obj_free(recv_obj); ++ DTP_obj_free(send_obj); + } + MTestFreeComm(&comm); + } + +- DTP_pool_free(send_dtp); +- DTP_pool_free(recv_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif ++ DTP_pool_free(dtp); + + MTest_Finalize(errs); + return MTestReturnValue(errs); +--- a/test/mpi/pt2pt/sendself.c ++++ b/test/mpi/pt2pt/sendself.c +@@ -13,62 +13,22 @@ + static char MTEST_Descrip[] = "Test of sending to self (with a preposted receive)"; + */ + +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; ++ + + int main(int argc, char *argv[]) + { + int errs = 0, err; + int rank, size; +- int count[2]; +- int i, j, len; +- MPI_Aint sendcount, recvcount; ++ int i, j, len, seed, testsize; ++ MPI_Aint sendcount, recvcount, count[2]; ++ MPI_Aint maxbufsize; + MPI_Comm comm; + MPI_Datatype sendtype, recvtype; + MPI_Request req; +- DTP_t send_dtp, recv_dtp; +- char send_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char recv_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ DTP_pool_s dtp; ++ DTP_obj_s send_obj, recv_obj; + void *sendbuf, *recvbuf; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +@@ -76,243 +36,174 @@ int main(int argc, char *argv[]) + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -sendcnt=[COUNT] -recvcnt=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-sendcnt=", strlen("-sendcnt="))) { +- count[0] = atoi(argv[i] + strlen("-sendcnt=")); +- } else if (!strncmp(argv[i], "-recvcnt=", strlen("-recvcnt="))) { +- count[1] = atoi(argv[i] + strlen("-recvcnt=")); +- } +- } +- } ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count[0] = MTestArgListGetLong(head, "sendcnt"); ++ count[1] = MTestArgListGetLong(head, "recvcnt"); ++ basic_type = MTestArgListGetString(head, "type"); + +- err = DTP_pool_create(basic_type, count[0], &send_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating send pool (%s,%d)\n", type_name, count[0]); +- fflush(stdout); +- } ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- err = DTP_pool_create(basic_type, count[1], &recv_dtp); ++ err = DTP_pool_create(basic_type, count[0], seed, &dtp); + if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating recv pool (%s,%d)\n", type_name, count[1]); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } ++ fprintf(stderr, "Error while creating send pool (%s,%ld)\n", basic_type, count[0]); ++ fflush(stderr); + } + +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &send_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &recv_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* these are ignored */ +- count[0] = 0; +- count[1] = 0; +-#endif ++ MTestArgListDestroy(head); + + /* To improve reporting of problems about operations, we + * change the error handler to errors return */ + MPI_Comm_set_errhandler(comm, MPI_ERRORS_RETURN); + +- for (i = 0; i < send_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(send_dtp, i, 0, 1, count[0]); ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &send_obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + } + +- sendcount = send_dtp->DTP_obj_array[i].DTP_obj_count; +- sendtype = send_dtp->DTP_obj_array[i].DTP_obj_type; +- sendbuf = send_dtp->DTP_obj_array[i].DTP_obj_buf; ++ err = DTP_obj_create(dtp, &recv_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ } + +- for (j = 0; j < recv_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(recv_dtp, j, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- } ++ sendbuf = malloc(send_obj.DTP_bufsize); ++ if (sendbuf == NULL) { ++ errs++; ++ break; ++ } + +- recvcount = recv_dtp->DTP_obj_array[j].DTP_obj_count; +- recvtype = recv_dtp->DTP_obj_array[j].DTP_obj_type; +- recvbuf = recv_dtp->DTP_obj_array[j].DTP_obj_buf; ++ recvbuf = malloc(recv_obj.DTP_bufsize); ++ if (recvbuf == NULL) { ++ errs++; ++ break; ++ } + +- err = MPI_Irecv(recvbuf, recvcount, recvtype, rank, 0, comm, &req); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } +- } ++ err = DTP_obj_buf_init(send_obj, sendbuf, 0, 1, count[0]); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_buf_init(recv_obj, recvbuf, -1, -1, count[0]); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ sendcount = send_obj.DTP_type_count; ++ sendtype = send_obj.DTP_datatype; ++ ++ recvcount = recv_obj.DTP_type_count; ++ recvtype = recv_obj.DTP_datatype; + +- err = MPI_Send(sendbuf, sendcount, sendtype, rank, 0, comm); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ err = ++ MPI_Irecv(recvbuf + recv_obj.DTP_buf_offset, recvcount, recvtype, rank, 0, comm, &req); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } ++ } + +- err = MPI_Wait(&req, MPI_STATUS_IGNORE); +- err = DTP_obj_buf_check(recv_dtp, j, 0, 1, count[0]); +- if (err != DTP_SUCCESS) { +- if (errs < 10) { +- MPI_Type_get_name(sendtype, send_name, &len); +- MPI_Type_get_name(recvtype, recv_name, &len); +- fprintf(stdout, +- "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %d\n", +- recv_name, send_name, count[0]); +- fflush(stdout); +- } +- errs++; ++ err = MPI_Send(sendbuf + send_obj.DTP_buf_offset, sendcount, sendtype, rank, 0, comm); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } ++ } + +- err = MPI_Irecv(recvbuf, recvcount, recvtype, rank, 0, comm, &req); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ err = MPI_Wait(&req, MPI_STATUS_IGNORE); ++ err = DTP_obj_buf_check(recv_obj, recvbuf, 0, 1, count[0]); ++ if (err != DTP_SUCCESS) { ++ if (errs < 10) { ++ fprintf(stderr, ++ "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %ld\n", ++ recv_obj.DTP_description, send_obj.DTP_description, count[0]); ++ fflush(stderr); + } ++ errs++; ++ } ++ ++ err = DTP_obj_buf_init(recv_obj, recvbuf, -1, -1, count[0]); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- err = MPI_Ssend(sendbuf, sendcount, sendtype, rank, 0, comm); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ err = ++ MPI_Irecv(recvbuf + recv_obj.DTP_buf_offset, recvcount, recvtype, rank, 0, comm, &req); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } ++ } + +- err = MPI_Wait(&req, MPI_STATUS_IGNORE); +- err = DTP_obj_buf_check(recv_dtp, j, 0, 1, count[0]); +- if (err != DTP_SUCCESS) { +- if (errs < 10) { +- MPI_Type_get_name(sendtype, send_name, &len); +- MPI_Type_get_name(recvtype, recv_name, &len); +- fprintf(stdout, +- "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %d\n", +- recv_name, send_name, count[0]); +- fflush(stdout); +- } +- errs++; ++ err = MPI_Ssend(sendbuf + send_obj.DTP_buf_offset, sendcount, sendtype, rank, 0, comm); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } ++ } + +- err = MPI_Irecv(recvbuf, recvcount, recvtype, rank, 0, comm, &req); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ err = MPI_Wait(&req, MPI_STATUS_IGNORE); ++ err = DTP_obj_buf_check(recv_obj, recvbuf, 0, 1, count[0]); ++ if (err != DTP_SUCCESS) { ++ if (errs < 10) { ++ fprintf(stderr, ++ "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %ld\n", ++ recv_obj.DTP_description, send_obj.DTP_description, count[0]); ++ fflush(stderr); + } ++ errs++; ++ } ++ ++ err = DTP_obj_buf_init(recv_obj, recvbuf, -1, -1, count[0]); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- err = MPI_Rsend(sendbuf, sendcount, sendtype, rank, 0, comm); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ err = ++ MPI_Irecv(recvbuf + recv_obj.DTP_buf_offset, recvcount, recvtype, rank, 0, comm, &req); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } ++ } + +- err = MPI_Wait(&req, MPI_STATUS_IGNORE); +- err = DTP_obj_buf_check(recv_dtp, j, 0, 1, count[0]); +- if (err != DTP_SUCCESS) { +- if (errs < 10) { +- MPI_Type_get_name(sendtype, send_name, &len); +- MPI_Type_get_name(recvtype, recv_name, &len); +- fprintf(stdout, +- "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %d\n", +- recv_name, send_name, count[0]); +- fflush(stdout); +- } +- errs++; ++ err = MPI_Rsend(sendbuf + send_obj.DTP_buf_offset, sendcount, sendtype, rank, 0, comm); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } +- DTP_obj_free(recv_dtp, j); + } +- DTP_obj_free(send_dtp, i); +- } + +- DTP_pool_free(send_dtp); +- DTP_pool_free(recv_dtp); ++ err = MPI_Wait(&req, MPI_STATUS_IGNORE); ++ err = DTP_obj_buf_check(recv_obj, recvbuf, 0, 1, count[0]); ++ if (err != DTP_SUCCESS) { ++ if (errs < 10) { ++ fprintf(stderr, ++ "Data in target buffer did not match for destination datatype %s and source datatype %s, count = %ld\n", ++ recv_obj.DTP_description, send_obj.DTP_description, count[0]); ++ fflush(stderr); ++ } ++ errs++; ++ } + +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); ++ free(sendbuf); ++ free(recvbuf); ++ DTP_obj_free(send_obj); ++ DTP_obj_free(recv_obj); + } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif ++ ++ DTP_pool_free(dtp); + + MTest_Finalize(errs); + return MTestReturnValue(errs); +deleted file mode 100644 +--- a/test/mpi/pt2pt/testlist.def ++++ /dev/null +@@ -1,50 +0,0 @@ +-sendrecv2 2 +-sendrecv3 2 +-sendflood 8 timeLimit=600 +-sendall 4 +-anyall 2 +-eagerdt 2 +-bottom 2 +-bsend1 1 +-bsend2 1 +-bsend3 1 +-bsend4 1 +-bsend5 4 +-bsendalign 2 +-bsendpending 2 +-isendself 1 +-issendselfcancel 1 xfail=ticket2276 +-isendirecv 10 +-bsendfrag 2 +-icsend 4 +-rqstatus 2 +-rqfreeb 4 +-greq1 1 +-probe_unexp 4 +-probenull 1 +-# For testing, scancel will run with 1 process as well +-scancel 2 xfail=ticket2266 xfail=ticket2270 +-scancel2 2 xfail=ticket2266 xfail=ticket2270 +-pscancel 2 xfail=ticket2266 xfail=ticket2270 +-rcancel 2 +-cancelrecv 2 xfail=ticket2266 xfail=ticket2270 +-scancel_unmatch 2 xfail=ticket2276 +-cancelanysrc 2 +-isendselfprobe 1 +-inactivereq 1 +-waittestnull 1 +-waitany_null 1 +-# this should be run only on machines with large amount of memory (>=8GB) +-# perhaps disable in the release tarball +-large_message 3 +-mprobe 2 mpiversion=3.0 +-big_count_status 1 mpiversion=3.0 +-many_isend 3 +-manylmt 2 +-huge_underflow 2 +-huge_anysrc 2 +-huge_dupcomm 2 +-dtype_send 2 +-recv_any 2 +-irecv_any 2 +-large_tag 2 +new file mode 100644 +--- /dev/null ++++ b/test/mpi/pt2pt/testlist.in +@@ -0,0 +1,52 @@ ++sendrecv2 2 ++sendrecv3 2 ++sendflood 8 timeLimit=600 ++sendall 4 ++anyall 2 ++eagerdt 2 ++bottom 2 ++bsend1 1 ++bsend2 1 ++bsend3 1 ++bsend4 1 ++bsend5 4 ++bsendalign 2 ++bsendpending 2 ++isendself 1 ++issendselfcancel 1 xfail=ticket2276 ++isendirecv 10 ++bsendfrag 2 ++icsend 4 ++rqstatus 2 ++rqfreeb 4 ++greq1 1 ++probe_unexp 4 ++probenull 1 ++# For testing, scancel will run with 1 process as well ++scancel 2 xfail=ticket2266 xfail=ticket2270 ++scancel2 2 xfail=ticket2266 xfail=ticket2270 ++pscancel 2 xfail=ticket2266 xfail=ticket2270 ++rcancel 2 ++cancelrecv 2 xfail=ticket2266 xfail=ticket2270 ++scancel_unmatch 2 xfail=ticket2276 ++cancelanysrc 2 ++isendselfprobe 1 ++inactivereq 1 ++waittestnull 1 ++waitany_null 1 ++# this should be run only on machines with large amount of memory (>=8GB) ++# perhaps disable in the release tarball ++large_message 3 ++mprobe 2 mpiversion=3.0 ++big_count_status 1 mpiversion=3.0 ++many_isend 3 ++manylmt 2 ++huge_underflow 2 ++huge_anysrc 2 ++huge_dupcomm 2 ++huge_ssend 2 ++multi_psend_derived 2 ++dtype_send 2 ++recv_any 2 ++irecv_any 2 ++large_tag 2 +--- a/test/mpi/rma/Makefile.am ++++ b/test/mpi/rma/Makefile.am +@@ -81,6 +81,8 @@ noinst_PROGRAMS = \ + strided_getacc_indexed \ + strided_getacc_indexed_shared \ + window_creation \ ++ window_allocation \ ++ window_noncontig_allocation \ + win_flavors \ + win_shared \ + win_shared_noncontig \ +@@ -158,6 +160,7 @@ noinst_PROGRAMS = \ + atomic_get_double_int \ + atomic_get_long_double_int \ + acc_pairtype \ ++ acc_pairtype_shm \ + manyget \ + derived_acc_flush_local\ + large_acc_flush_local \ +@@ -180,7 +183,24 @@ noinst_PROGRAMS = \ + rget_unlock \ + lock_nested \ + rget_testall \ +- win_shared_query_null ++ get_flushlocal \ ++ get_flushlocal_shm \ ++ win_shared_query_null \ ++ accfence1 \ ++ accpscw1 \ ++ epochtest \ ++ getfence1 \ ++ lock_contention_dt \ ++ lock_dt \ ++ lock_dt_flush \ ++ lock_dt_flushlocal \ ++ lockall_dt \ ++ lockall_dt_flush \ ++ lockall_dt_flushall \ ++ lockall_dt_flushlocal \ ++ lockall_dt_flushlocalall \ ++ putfence1 \ ++ putpscw1 + + if BUILD_MPIX_TESTS + noinst_PROGRAMS += aint +@@ -200,6 +220,9 @@ atomic_get_float_int_CPPFLAGS = -DTEST_FLOAT_INT $(AM_CPPFLAGS) + atomic_get_double_int_CPPFLAGS = -DTEST_DOUBLE_INT $(AM_CPPFLAGS) + atomic_get_long_double_int_CPPFLAGS = -DTEST_LONG_DOUBLE_INT $(AM_CPPFLAGS) + ++acc_pairtype_shm_SOURCES = acc_pairtype.c ++acc_pairtype_shm_CPPFLAGS = -DUSE_WIN_ALLOCATE $(AM_CPPFLAGS) ++ + strided_acc_indexed_LDADD = $(LDADD) -lm + strided_acc_onelock_LDADD = $(LDADD) -lm + strided_acc_subarray_LDADD = $(LDADD) -lm +@@ -209,6 +232,12 @@ strided_putget_indexed_LDADD = $(LDADD) -lm + strided_getacc_indexed_shared_LDADD = $(LDADD) -lm + strided_putget_indexed_shared_LDADD = $(LDADD) -lm + ++window_allocation_SOURCES = window_creation.c ++window_allocation_CPPFLAGS = -DUSE_WIN_ALLOCATE $(AM_CPPFLAGS) ++ ++window_noncontig_allocation_SOURCES = window_creation.c ++window_noncontig_allocation_CPPFLAGS = -DUSE_WIN_ALLOCATE_NONCONTIG $(AM_CPPFLAGS) ++ + fetch_and_op_char_CPPFLAGS = -DFOP_TYPE_CHAR $(AM_CPPFLAGS) + fetch_and_op_short_CPPFLAGS = -DFOP_TYPE_SHORT $(AM_CPPFLAGS) + fetch_and_op_int_CPPFLAGS = -DFOP_TYPE_INT $(AM_CPPFLAGS) +@@ -343,4 +372,50 @@ overlap_wins_gacc_CPPFLAGS = -DTEST_GACC $(AM_CPPFLAGS) + overlap_wins_fop_CPPFLAGS = -DTEST_FOP $(AM_CPPFLAGS) + overlap_wins_cas_CPPFLAGS = -DTEST_CAS $(AM_CPPFLAGS) + +-include Makefile.dtp ++get_flushlocal_shm_SOURCES = get_flushlocal.c ++get_flushlocal_shm_CPPFLAGS = -DUSE_WIN_ALLOCATE $(AM_CPPFLAGS) ++ ++accfence1_CPPFLAGS = $(AM_CPPFLAGS) ++accfence1_SOURCES = accfence1.c ++ ++accpscw1_CPPFLAGS = $(AM_CPPFLAGS) ++accpscw1_SOURCES = accpscw1.c ++ ++epochtest_CPPFLAGS = $(AM_CPPFLAGS) ++epochtest_SOURCES = epochtest.c ++ ++getfence1_CPPFLAGS = -DUSE_GET $(AM_CPPFLAGS) ++getfence1_SOURCES = fence.c ++ ++putfence1_CPPFLAGS = -DUSE_PUT $(AM_CPPFLAGS) ++putfence1_SOURCES = fence.c ++ ++lock_contention_dt_CPPFLAGS = -DMULTI_ORIGIN -DSINGLE_TARGET -DUSE_FLUSH_NONE -DUSE_FLUSH_LOCAL_NONE $(AM_CPPFLAGS) ++lock_contention_dt_SOURCES = lock_x_dt.c ++ ++lock_dt_CPPFLAGS = -DSINGLE_ORIGIN -DSINGLE_TARGET -DUSE_FLUSH_NONE -DUSE_FLUSH_LOCAL_NONE $(AM_CPPFLAGS) ++lock_dt_SOURCES = lock_x_dt.c ++ ++lock_dt_flush_CPPFLAGS = -DSINGLE_ORIGIN -DSINGLE_TARGET -DUSE_FLUSH -DUSE_FLUSH_LOCAL_NONE $(AM_CPPFLAGS) ++lock_dt_flush_SOURCES = lock_x_dt.c ++ ++lock_dt_flushlocal_CPPFLAGS = -DSINGLE_ORIGIN -DSINGLE_TARGET -DUSE_FLUSH_NONE -DUSE_FLUSH_LOCAL $(AM_CPPFLAGS) ++lock_dt_flushlocal_SOURCES = lock_x_dt.c ++ ++lockall_dt_CPPFLAGS = -DSINGLE_ORIGIN -DMULTI_TARGET -DUSE_FLUSH_NONE -DUSE_FLUSH_LOCAL_NONE $(AM_CPPFLAGS) ++lockall_dt_SOURCES = lock_x_dt.c ++ ++lockall_dt_flush_CPPFLAGS = -DSINGLE_ORIGIN -DMULTI_TARGET -DUSE_FLUSH -DUSE_FLUSH_LOCAL_NONE $(AM_CPPFLAGS) ++lockall_dt_flush_SOURCES = lock_x_dt.c ++ ++lockall_dt_flushall_CPPFLAGS = -DSINGLE_ORIGIN -DMULTI_TARGET -DUSE_FLUSH_ALL -DUSE_FLUSH_LOCAL_NONE $(AM_CPPFLAGS) ++lockall_dt_flushall_SOURCES = lock_x_dt.c ++ ++lockall_dt_flushlocal_CPPFLAGS = -DSINGLE_ORIGIN -DMULTI_TARGET -DUSE_FLUSH_NONE -DUSE_FLUSH_LOCAL $(AM_CPPFLAGS) ++lockall_dt_flushlocal_SOURCES = lock_x_dt.c ++ ++lockall_dt_flushlocalall_CPPFLAGS = -DSINGLE_ORIGIN -DMULTI_TARGET -DUSE_FLUSH_NONE -DUSE_FLUSH_LOCAL_ALL $(AM_CPPFLAGS) ++lockall_dt_flushlocalall_SOURCES = lock_x_dt.c ++ ++putpscw1_CPPFLAGS = $(AM_CPPFLAGS) ++putpscw1_SOURCES = putpscw1.c +--- a/test/mpi/rma/acc_pairtype.c ++++ b/test/mpi/rma/acc_pairtype.c +@@ -34,21 +34,36 @@ int main(int argc, char *argv[]) + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + + MPI_Alloc_mem(sizeof(long_double_int_t) * DATA_SIZE, MPI_INFO_NULL, &orig_buf); +- MPI_Alloc_mem(sizeof(long_double_int_t) * DATA_SIZE, MPI_INFO_NULL, &tar_buf); +- + for (i = 0; i < DATA_SIZE; i++) { + orig_buf[i].a = 1.0; + orig_buf[i].b = 1; +- tar_buf[i].a = 0; +- tar_buf[i].b = 0; + } + + MPI_Type_vector(5 /* count */ , 3 /* blocklength */ , 5 /* stride */ , MPI_LONG_DOUBLE_INT, + &vector_dtp); + MPI_Type_commit(&vector_dtp); + ++#ifdef USE_WIN_ALLOCATE ++ MPI_Win_allocate(sizeof(long_double_int_t) * DATA_SIZE, sizeof(long_double_int_t), ++ MPI_INFO_NULL, MPI_COMM_WORLD, &tar_buf, &win); ++ /* Reset window buffer */ ++ MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); ++ for (i = 0; i < DATA_SIZE; i++) { ++ tar_buf[i].a = 0; ++ tar_buf[i].b = 0; ++ } ++ MPI_Win_unlock(rank, win); ++ MPI_Barrier(MPI_COMM_WORLD); ++#else ++ MPI_Alloc_mem(sizeof(long_double_int_t) * DATA_SIZE, MPI_INFO_NULL, &tar_buf); ++ /* Reset window buffer */ ++ for (i = 0; i < DATA_SIZE; i++) { ++ tar_buf[i].a = 0; ++ tar_buf[i].b = 0; ++ } + MPI_Win_create(tar_buf, sizeof(long_double_int_t) * DATA_SIZE, sizeof(long_double_int_t), + MPI_INFO_NULL, MPI_COMM_WORLD, &win); ++#endif + + if (rank == 0) { + MPI_Win_lock(MPI_LOCK_SHARED, 1, 0, win); +@@ -56,9 +71,10 @@ int main(int argc, char *argv[]) + MPI_Win_unlock(1, win); + } + +- MPI_Win_free(&win); ++ MPI_Barrier(MPI_COMM_WORLD); + + if (rank == 1) { ++ MPI_Win_lock(MPI_LOCK_SHARED, 1, 0, win); + for (i = 0; i < DATA_SIZE; i++) { + if (i % 5 < 3) { + if (tar_buf[i].a != 1.0 || tar_buf[i].b != 1) { +@@ -70,12 +86,16 @@ int main(int argc, char *argv[]) + } + } + } ++ MPI_Win_unlock(1, win); + } + ++ MPI_Win_free(&win); + MPI_Type_free(&vector_dtp); + + MPI_Free_mem(orig_buf); ++#ifndef USE_WIN_ALLOCATE + MPI_Free_mem(tar_buf); ++#endif + + MTest_Finalize(errs); + return MTestReturnValue(errs); +--- a/test/mpi/rma/accfence1.c ++++ b/test/mpi/rma/accfence1.c +@@ -7,6 +7,7 @@ + #include "mpi.h" + #include + #include ++#include + #include "mpitest.h" + #include "dtpools.h" + +@@ -14,280 +15,173 @@ + static char MTEST_Descrip[] = "Accumulate/Replace with Fence"; + */ + +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; ++#define error(...) \ ++ do { \ ++ fprintf(stderr, __VA_ARGS__); \ ++ fflush(stderr); \ ++ } while (0) + + int main(int argc, char *argv[]) + { + int errs = 0, err; + int rank, size, orig, target; +- int minsize = 2, count; +- int i, j, len; ++ int minsize = 2; ++ int i; ++ int seed, testsize; + MPI_Aint origcount, targetcount; + MPI_Comm comm; + MPI_Win win; +- MPI_Aint extent, lb; ++ MPI_Aint extent, lb, count, maxbufsize; + MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- char orig_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char target_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ DTP_pool_s dtp; ++ DTP_obj_s orig_obj, target_obj; + void *origbuf, *targetbuf; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); ++ err = DTP_pool_create(basic_type, count, seed, &dtp); + if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); ++ error("Error while creating orig pool (%s,%ld)\n", basic_type, count); + } + +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; ++ MTestArgListDestroy(head); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); ++ if (MTestIsBasicDtype(dtp.DTP_base_type)) { ++ MPI_Type_get_extent(dtp.DTP_base_type, &lb, &extent); + } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } ++ /* accumulate tests cannot use struct types */ ++ goto fn_exit; + } + +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif ++ targetbuf = malloc(maxbufsize); ++ if (targetbuf == NULL) ++ errs++; + + /* The following illustrates the use of the routines to + * run through a selection of communicators and datatypes. + * Use subsets of these for tests that do not involve combinations + * of communicators, datatypes, and counts of datatypes */ + while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) ++ if (comm == MPI_COMM_NULL) { ++ /* for NULL comms, make sure these processes create the ++ * same number of objects, so the target knows what ++ * datatype layout to check for */ ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); + continue; ++ } ++ + /* Determine the sender and receiver */ + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); + orig = 0; + target = size - 1; + +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); ++ MPI_Win_create(targetbuf, maxbufsize, extent, MPI_INFO_NULL, comm, &win); ++ ++ /* To improve reporting of problems about operations, we ++ * change the error handler to errors return */ ++ MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &orig_obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; ++ err = DTP_obj_create(dtp, &target_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_buf_init(target_obj, targetbuf, -1, -1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ targetcount = target_obj.DTP_type_count; ++ targettype = target_obj.DTP_datatype; + +- MPI_Type_get_extent(targettype, &lb, &extent); +- MPI_Win_create(targetbuf, targetcount * extent + lb, +- (int) extent, MPI_INFO_NULL, comm, &win); + MPI_Win_fence(0, win); + +- /* To improve reporting of problems about operations, we +- * change the error handler to errors return */ +- MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ if (rank == orig) { ++ origbuf = malloc(orig_obj.DTP_bufsize); ++ if (origbuf == NULL) { ++ errs++; ++ break; ++ } + +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); ++ err = DTP_obj_buf_init(orig_obj, origbuf, 0, 1, count); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- /* MPI_REPLACE on accumulate is almost the same +- * as MPI_Put; the only difference is in the +- * handling of overlapping accumulate operations, +- * which are not tested here */ +- err = MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, targetcount, targettype, MPI_REPLACE, +- win); +- if (err) { +- errs++; +- if (errs < 10) { +- MPI_Type_get_name(origtype, orig_name, &len); +- MPI_Type_get_name(targettype, target_name, &len); +- fprintf(stdout, "Accumulate types: send %s, recv %s\n", orig_name, +- target_name); +- MTestPrintError(err); +- } ++ origcount = orig_obj.DTP_type_count; ++ origtype = orig_obj.DTP_datatype; ++ ++ /* MPI_REPLACE on accumulate is almost the same ++ * as MPI_Put; the only difference is in the ++ * handling of overlapping accumulate operations, ++ * which are not tested here */ ++ err = MPI_Accumulate(origbuf + orig_obj.DTP_buf_offset, origcount, ++ origtype, target, target_obj.DTP_buf_offset / extent, ++ targetcount, targettype, MPI_REPLACE, win); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ error("Accumulate types: send %s, recv %s\n", ++ orig_obj.DTP_description, target_obj.DTP_description); ++ MTestPrintError(err); + } +- err = MPI_Win_fence(0, win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ } ++ err = MPI_Win_fence(0, win); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } +- } else if (rank == target) { +- MPI_Win_fence(0, win); +- /* This should have the same effect, in terms of +- * transfering data, as a send/recv pair */ +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- if (errs < 10) { +- MPI_Type_get_name(origtype, orig_name, &len); +- MPI_Type_get_name(targettype, target_name, &len); +- fprintf(stdout, +- "Data received with type %s does not match data sent with type %s\n", +- target_name, orig_name); +- fflush(stdout); +- } +- errs++; ++ } ++ ++ free(origbuf); ++ } else if (rank == target) { ++ MPI_Win_fence(0, win); ++ /* This should have the same effect, in terms of ++ * transfering data, as a send/recv pair */ ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ if (errs < 10) { ++ error("Data received with type %s does not match data sent with type %s\n", ++ target_obj.DTP_description, orig_obj.DTP_description); + } +- } else { +- MPI_Win_fence(0, win); ++ errs++; + } +- DTP_obj_free(orig_dtp, j); ++ } else { ++ MPI_Win_fence(0, win); + } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); ++ DTP_obj_free(orig_obj); ++ DTP_obj_free(target_obj); + } ++ MPI_Win_free(&win); + MTestFreeComm(&comm); + } + +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif ++ free(targetbuf); + ++ fn_exit: ++ DTP_pool_free(dtp); + MTest_Finalize(errs); + return MTestReturnValue(errs); + } +--- a/test/mpi/rma/accpscw1.c ++++ b/test/mpi/rma/accpscw1.c +@@ -14,288 +14,176 @@ + static char MTEST_Descrip[] = "Accumulate/replace with Post/Start/Complete/Wait"; + */ + +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; + +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; + + int main(int argc, char *argv[]) + { + int errs = 0, err; + int rank, size, orig, target; +- int minsize = 2, count; +- int i, j, len; ++ int minsize = 2; ++ int i; ++ int seed, testsize; + MPI_Aint origcount, targetcount; + MPI_Comm comm; + MPI_Win win; +- MPI_Aint extent, lb; ++ MPI_Aint extent, lb, count, maxbufsize; + MPI_Group wingroup, neighbors; + MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- char orig_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char target_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ DTP_pool_s dtp; ++ DTP_obj_s orig_obj, target_obj; + void *origbuf, *targetbuf; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- err = DTP_pool_create(basic_type, count, &orig_dtp); ++ err = DTP_pool_create(basic_type, count, seed, &dtp); + if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); ++ fprintf(stderr, "Error while creating orig pool (%s,%ld)\n", basic_type, count); ++ fflush(stderr); + } + +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; ++ MTestArgListDestroy(head); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); ++ if (MTestIsBasicDtype(dtp.DTP_base_type)) { ++ MPI_Type_get_extent(dtp.DTP_base_type, &lb, &extent); + } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); ++ /* accumulate tests cannot use struct types */ ++ goto fn_exit; + } + +- /* this is ignored */ +- count = 0; +-#endif ++ targetbuf = malloc(maxbufsize); ++ if (targetbuf == NULL) ++ errs++; + + /* The following illustrates the use of the routines to + * run through a selection of communicators and datatypes. + * Use subsets of these for tests that do not involve combinations + * of communicators, datatypes, and counts of datatypes */ + while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) ++ if (comm == MPI_COMM_NULL) { ++ /* for NULL comms, make sure these processes create the ++ * same number of objects, so the target knows what ++ * datatype layout to check for */ ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); + continue; ++ } ++ + /* Determine the sender and receiver */ + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); + orig = 0; + target = size - 1; + +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); ++ MPI_Win_create(targetbuf, maxbufsize, extent, MPI_INFO_NULL, comm, &win); ++ MPI_Win_get_group(win, &wingroup); ++ ++ /* To improve reporting of problems about operations, we ++ * change the error handler to errors return */ ++ MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &orig_obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; ++ err = DTP_obj_create(dtp, &target_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- MPI_Type_extent(targettype, &extent); +- MPI_Type_lb(targettype, &lb); +- MPI_Win_create(targetbuf, targetcount * extent + lb, +- (int) extent, MPI_INFO_NULL, comm, &win); +- MPI_Win_get_group(win, &wingroup); ++ err = DTP_obj_buf_init(target_obj, targetbuf, -1, -1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- /* To improve reporting of problems about operations, we +- * change the error handler to errors return */ +- MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ targetcount = target_obj.DTP_type_count; ++ targettype = target_obj.DTP_datatype; + +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); ++ if (rank == orig) { ++ origbuf = malloc(orig_obj.DTP_bufsize); ++ ++ err = DTP_obj_buf_init(orig_obj, origbuf, 0, 1, count); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; ++ origcount = orig_obj.DTP_type_count; ++ origtype = orig_obj.DTP_datatype; + +- if (rank == orig) { +- /* Neighbor is target only */ +- MPI_Group_incl(wingroup, 1, &target, &neighbors); +- err = MPI_Win_start(neighbors, 0, win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } +- } +- MPI_Group_free(&neighbors); +- err = MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, targetcount, targettype, MPI_REPLACE, +- win); +- if (err) { +- errs++; ++ /* Neighbor is target only */ ++ MPI_Group_incl(wingroup, 1, &target, &neighbors); ++ err = MPI_Win_start(neighbors, 0, win); ++ if (err) { ++ errs++; ++ if (errs < 10) { + MTestPrintError(err); + } +- err = MPI_Win_complete(win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ } ++ MPI_Group_free(&neighbors); ++ err = MPI_Accumulate(origbuf + orig_obj.DTP_buf_offset, origcount, ++ origtype, target, target_obj.DTP_buf_offset / extent, ++ targetcount, targettype, MPI_REPLACE, win); ++ if (err) { ++ errs++; ++ MTestPrintError(err); ++ } ++ err = MPI_Win_complete(win); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } +- } else if (rank == target) { +- MPI_Group_incl(wingroup, 1, &orig, &neighbors); +- MPI_Win_post(neighbors, 0, win); +- MPI_Group_free(&neighbors); +- MPI_Win_wait(win); +- /* This should have the same effect, in terms of +- * transfering data, as a send/recv pair */ +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- if (errs < 10) { +- MPI_Type_get_name(origtype, orig_name, &len); +- MPI_Type_get_name(targettype, target_name, &len); +- fprintf(stdout, +- "Data received with type %s does not match data sent with type %s\n", +- target_name, orig_name); +- fflush(stdout); +- } ++ } ++ ++ free(origbuf); ++ } else if (rank == target) { ++ MPI_Group_incl(wingroup, 1, &orig, &neighbors); ++ MPI_Win_post(neighbors, 0, win); ++ MPI_Group_free(&neighbors); ++ MPI_Win_wait(win); ++ /* This should have the same effect, in terms of ++ * transfering data, as a send/recv pair */ ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ if (errs < 10) { ++ fprintf(stderr, ++ "Data received with type %s does not match data sent with type %s\n", ++ target_obj.DTP_description, orig_obj.DTP_description); ++ fflush(stderr); + } +- } else { +- /* Nothing; the other processes need not call any +- * MPI routines */ +- ; + } +- DTP_obj_free(orig_dtp, j); ++ } else { ++ /* Nothing; the other processes need not call any ++ * MPI routines */ ++ ; + } +- MPI_Win_free(&win); +- MPI_Group_free(&wingroup); +- DTP_obj_free(target_dtp, i); ++ DTP_obj_free(orig_obj); ++ DTP_obj_free(target_obj); + } ++ MPI_Win_free(&win); ++ MPI_Group_free(&wingroup); + MTestFreeComm(&comm); + } + +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif ++ free(targetbuf); + ++ fn_exit: ++ DTP_pool_free(dtp); + MTest_Finalize(errs); + return MTestReturnValue(errs); + } +--- a/test/mpi/rma/epochtest.c ++++ b/test/mpi/rma/epochtest.c +@@ -33,365 +33,253 @@ static char MTEST_Descrip[] = "Put with Fences used to separate epochs"; + + #define MAX_PERR 10 + +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int PrintRecvedError(const char *, MPI_Datatype, MPI_Datatype); ++ ++int PrintRecvedError(const char *, const char *, const char *); + + int main(int argc, char **argv) + { + int errs = 0, err; + int rank, size, orig, target; +- int minsize = 2, count; +- int i, j, len; ++ int minsize = 2; ++ int i; ++ int seed, testsize; + int onlyInt = 0; + MPI_Aint origcount, targetcount; + MPI_Comm comm; + MPI_Win win; +- MPI_Aint extent, lb; ++ MPI_Aint extent, lb, count, maxbufsize; + MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- char orig_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char target_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ DTP_pool_s dtp; ++ DTP_obj_s orig_obj, target_obj; + void *origbuf, *targetbuf; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); ++ err = DTP_pool_create(basic_type, count, seed, &dtp); + if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); ++ fprintf(stderr, "Error while creating orig pool (%s,%ld)\n", basic_type, count); ++ fflush(stderr); + } + +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif ++ MTestArgListDestroy(head); + + /* Check for a simple choice of communicator and datatypes */ + if (getenv("MTEST_SIMPLE")) + onlyInt = 1; + ++ if (MTestIsBasicDtype(dtp.DTP_base_type)) { ++ MPI_Type_get_extent(dtp.DTP_base_type, &lb, &extent); ++ } else { ++ /* if the base datatype is not a basic datatype, use an extent ++ * of 1 */ ++ extent = 1; ++ } ++ ++ targetbuf = malloc(maxbufsize); ++ if (targetbuf == NULL) ++ errs++; ++ + while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) ++ if (comm == MPI_COMM_NULL) { ++ /* for NULL comms, make sure these processes create the ++ * same number of objects, so the target knows what ++ * datatype layout to check for */ ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); + continue; ++ } ++ + /* Determine the sender and receiver */ + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); + orig = 0; + target = size - 1; + +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); ++ MPI_Win_create(targetbuf, maxbufsize, extent, MPI_INFO_NULL, comm, &win); ++ /* To improve reporting of problems about operations, we ++ * change the error handler to errors return */ ++ MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &orig_obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; ++ err = DTP_obj_create(dtp, &target_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- MPI_Type_get_extent(targettype, &lb, &extent); +- MPI_Win_create(targetbuf, targetcount * extent + lb, extent, MPI_INFO_NULL, comm, &win); +- /* To improve reporting of problems about operations, we +- * change the error handler to errors return */ +- MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ origbuf = malloc(orig_obj.DTP_bufsize); ++ if (origbuf == NULL) { ++ errs++; ++ break; ++ } + +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } ++ err = DTP_obj_buf_init(orig_obj, origbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_buf_init(target_obj, targetbuf, -1, -1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ origcount = orig_obj.DTP_type_count; ++ origtype = orig_obj.DTP_datatype; + +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; ++ targetcount = target_obj.DTP_type_count; ++ targettype = target_obj.DTP_datatype; + +- MPI_Type_get_name(targettype, target_name, &len); +- MPI_Type_get_name(origtype, orig_name, &len); +- MTestPrintfMsg(1, +- "Putting count = %d of origtype %s targettype %s\n", +- count, orig_name, target_name); ++ MTestPrintfMsg(1, ++ "Putting count = %d of origtype %s targettype %s\n", ++ count, orig_obj.DTP_description, target_obj.DTP_description); + +- /* At this point, we have all of the elements that we +- * need to begin the multiple fence and put tests */ +- /* Fence 1 */ +- err = MPI_Win_fence(MPI_MODE_NOPRECEDE, win); ++ /* At this point, we have all of the elements that we ++ * need to begin the multiple fence and put tests */ ++ /* Fence 1 */ ++ err = MPI_Win_fence(MPI_MODE_NOPRECEDE, win); ++ if (err) { ++ if (errs++ < MAX_PERR) ++ MTestPrintError(err); ++ } ++ ++ if (rank == orig) { ++ err = ++ MPI_Put(origbuf + orig_obj.DTP_buf_offset, origcount, origtype, target, ++ target_obj.DTP_buf_offset / extent, targetcount, targettype, win); + if (err) { + if (errs++ < MAX_PERR) + MTestPrintError(err); + } ++ } + +- if (rank == orig) { +- err = +- MPI_Put(origbuf, origcount, origtype, target, 0, targetcount, targettype, +- win); +- if (err) { +- if (errs++ < MAX_PERR) +- MTestPrintError(err); ++ /* Fence 2 */ ++ err = MPI_Win_fence(0, win); ++ if (err) { ++ if (errs++ < MAX_PERR) ++ MTestPrintError(err); ++ } ++ /* target checks data, then target puts */ ++ if (rank == target) { ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err) { ++ if (errs++ < MAX_PERR) { ++ PrintRecvedError("fence2", orig_obj.DTP_description, ++ target_obj.DTP_description); + } + } + +- /* Fence 2 */ +- err = MPI_Win_fence(0, win); ++ err = ++ MPI_Put(origbuf + orig_obj.DTP_buf_offset, origcount, origtype, orig, ++ target_obj.DTP_buf_offset / extent, targetcount, targettype, win); + if (err) { + if (errs++ < MAX_PERR) + MTestPrintError(err); + } +- /* target checks data, then target puts */ +- if (rank == target) { +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err) { +- if (errs++ < MAX_PERR) { +- PrintRecvedError("fence2", origtype, targettype); +- } +- } ++ } + +- err = MPI_Put(origbuf, origcount, +- origtype, orig, 0, targetcount, targettype, win); +- if (err) { +- if (errs++ < MAX_PERR) +- MTestPrintError(err); ++ /* Fence 3 */ ++ err = MPI_Win_fence(0, win); ++ if (err) { ++ if (errs++ < MAX_PERR) ++ MTestPrintError(err); ++ } ++ /* src checks data, then Src and target puts */ ++ if (rank == orig) { ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ if (errs++ < MAX_PERR) { ++ PrintRecvedError("fence3", orig_obj.DTP_description, ++ target_obj.DTP_description); + } + } + +- /* Fence 3 */ +- err = MPI_Win_fence(0, win); ++ err = ++ MPI_Put(origbuf + orig_obj.DTP_buf_offset, origcount, origtype, target, ++ target_obj.DTP_buf_offset / extent, targetcount, targettype, win); + if (err) { + if (errs++ < MAX_PERR) + MTestPrintError(err); + } +- /* src checks data, then Src and target puts */ +- if (rank == orig) { +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- if (errs++ < MAX_PERR) { +- PrintRecvedError("fence3", origtype, targettype); +- } +- } +- +- err = +- MPI_Put(origbuf, origcount, origtype, target, 0, targetcount, targettype, +- win); +- if (err) { +- if (errs++ < MAX_PERR) +- MTestPrintError(err); +- } +- } +- if (rank == target) { +- err = MPI_Put(origbuf, origcount, +- origtype, orig, 0, targetcount, targettype, win); +- if (err) { +- if (errs++ < MAX_PERR) +- MTestPrintError(err); +- } +- } +- +- /* Fence 4 */ +- err = MPI_Win_fence(MPI_MODE_NOSUCCEED, win); ++ } ++ if (rank == target) { ++ err = ++ MPI_Put(origbuf + orig_obj.DTP_buf_offset, origcount, origtype, orig, ++ target_obj.DTP_buf_offset / extent, targetcount, targettype, win); + if (err) { + if (errs++ < MAX_PERR) + MTestPrintError(err); + } +- /* src and target checks data */ +- if (rank == orig) { +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- if (errs++ < MAX_PERR) { +- PrintRecvedError("src fence4", origtype, targettype); +- } ++ } ++ ++ /* Fence 4 */ ++ err = MPI_Win_fence(MPI_MODE_NOSUCCEED, win); ++ if (err) { ++ if (errs++ < MAX_PERR) ++ MTestPrintError(err); ++ } ++ /* src and target checks data */ ++ if (rank == orig) { ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ if (errs++ < MAX_PERR) { ++ PrintRecvedError("src fence4", orig_obj.DTP_description, ++ target_obj.DTP_description); + } + } +- if (rank == target) { +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- if (errs++ < MAX_PERR) { +- PrintRecvedError("target fence4", origtype, targettype); +- } ++ } ++ if (rank == target) { ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ if (errs++ < MAX_PERR) { ++ PrintRecvedError("target fence4", orig_obj.DTP_description, ++ target_obj.DTP_description); + } + } +- +- DTP_obj_free(orig_dtp, j); +- /* Only do one datatype in the simple case */ +- if (onlyInt) +- break; + } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); ++ ++ free(origbuf); ++ DTP_obj_free(orig_obj); ++ DTP_obj_free(target_obj); + + /* Only do one count in the simple case */ + if (onlyInt) + break; + } ++ MPI_Win_free(&win); + MTestFreeComm(&comm); + /* Only do one communicator in the simple case */ + if (onlyInt) + break; + } + +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif ++ free(targetbuf); ++ DTP_pool_free(dtp); + + MTest_Finalize(errs); + return MTestReturnValue(errs); + } + +-int PrintRecvedError(const char *msg, MPI_Datatype origtype, MPI_Datatype targettype) ++int PrintRecvedError(const char *msg, const char *orig_name, const char *target_name) + { +- int len; +- char orig_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char target_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- MPI_Type_get_name(origtype, orig_name, &len); +- MPI_Type_get_name(targettype, target_name, &len); +- + printf +- ("At step %s, Data in target buffer did not match for targetination datatype %s (put with orig datatype %s)\n", ++ ("At step %s, Data in target buffer did not match for destination datatype %s (put with orig datatype %s)\n", + msg, orig_name, target_name); + return 0; + } +new file mode 100644 +--- /dev/null ++++ b/test/mpi/rma/fence.c +@@ -0,0 +1,254 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2003 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include "mpi.h" ++#include ++#include ++#include ++#include ++#include "mpitest.h" ++#include "dtpools.h" ++ ++/* ++static char MTEST_Descrip[] = "Get with Fence"; ++*/ ++ ++static inline int test(MPI_Comm comm, int rank, int orig, int target, ++ MPI_Aint count, MPI_Aint maxbufsize, ++ DTP_obj_s orig_obj, DTP_pool_s dtp, DTP_obj_s target_obj, void *targetbuf, ++ MPI_Win win) ++{ ++ int errs = 0, err; ++ MPI_Aint origcount, targetcount; ++ MPI_Aint extent, lb; ++ MPI_Datatype origtype, targettype; ++ void *origbuf; ++ ++ origtype = orig_obj.DTP_datatype; ++ origcount = orig_obj.DTP_type_count; ++ targettype = target_obj.DTP_datatype; ++ targetcount = target_obj.DTP_type_count; ++ ++ MTestPrintfMsg(1, ++ "Getting count = %ld of origtype %s - count = %ld target type %s\n", ++ origcount, orig_obj.DTP_description, targetcount, target_obj.DTP_description); ++ ++ if (rank == target) { ++#if defined(USE_GET) ++ err = DTP_obj_buf_init(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ return ++errs; ++ } ++#elif defined(USE_PUT) ++ err = DTP_obj_buf_init(target_obj, targetbuf, -1, -1, count); ++ if (err != DTP_SUCCESS) { ++ return ++errs; ++ } ++#endif ++ ++ /* The target does not need to do anything besides the ++ * fence */ ++ MPI_Win_fence(0, win); ++ MPI_Win_fence(0, win); ++ ++#if defined(USE_PUT) ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ if (errs < 10) { ++ printf ++ ("Data in target buffer did not match for target datatype %s (get with orig datatype %s)\n", ++ target_obj.DTP_description, orig_obj.DTP_description); ++ } ++ } ++#endif ++ } else if (rank == orig) { ++ origbuf = malloc(orig_obj.DTP_bufsize); ++ if (origbuf == NULL) ++ return ++errs; ++ ++#if defined(USE_GET) ++ err = DTP_obj_buf_init(orig_obj, origbuf, -1, -1, count); ++ if (err != DTP_SUCCESS) { ++ return ++errs; ++ } ++#elif defined(USE_PUT) ++ err = DTP_obj_buf_init(orig_obj, origbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ return ++errs; ++ } ++#endif ++ ++ /* To improve reporting of problems about operations, we ++ * change the error handler to errors return */ ++ MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ ++ MPI_Win_fence(0, win); ++ ++ if (MTestIsBasicDtype(dtp.DTP_base_type)) { ++ MPI_Type_get_extent(dtp.DTP_base_type, &lb, &extent); ++ } else { ++ /* if the base datatype is not a basic datatype, use an ++ * extent of 1 */ ++ extent = 1; ++ } ++ ++ /* This should have the same effect, in terms of ++ * transfering data, as a send/recv pair */ ++#if defined(USE_GET) ++ err = ++ MPI_Get(origbuf + orig_obj.DTP_buf_offset, origcount, origtype, target, ++ target_obj.DTP_buf_offset / extent, targetcount, targettype, win); ++#elif defined(USE_PUT) ++ err = ++ MPI_Put(origbuf + orig_obj.DTP_buf_offset, origcount, origtype, target, ++ target_obj.DTP_buf_offset / extent, targetcount, targettype, win); ++#endif ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); ++ } ++ } ++ err = MPI_Win_fence(0, win); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); ++ } ++ } ++#if defined(USE_GET) ++ err = DTP_obj_buf_check(orig_obj, origbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ if (errs < 10) { ++ printf ++ ("Data in origin buffer did not match for origin datatype %s (get with target datatype %s)\n", ++ orig_obj.DTP_description, target_obj.DTP_description); ++ } ++ } ++#endif ++ ++ free(origbuf); ++ } else { ++ MPI_Win_fence(0, win); ++ MPI_Win_fence(0, win); ++ } ++ ++ return errs; ++} ++ ++ ++int main(int argc, char *argv[]) ++{ ++ int err, errs = 0; ++ int rank, size, orig, target; ++ int minsize = 2; ++ int i; ++ int seed, testsize; ++ MPI_Aint count, maxbufsize; ++ MPI_Comm comm; ++ DTP_pool_s dtp; ++ DTP_obj_s orig_obj, target_obj; ++ char *basic_type; ++ void *targetbuf; ++ MPI_Aint extent, lb; ++ MPI_Win win; ++ ++ MTest_Init(&argc, &argv); ++ ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); ++ ++ maxbufsize = MTestDefaultMaxBufferSize(); ++ ++ err = DTP_pool_create(basic_type, count, seed, &dtp); ++ if (err != DTP_SUCCESS) { ++ fprintf(stderr, "Error while creating orig pool (%s,%ld)\n", basic_type, count); ++ fflush(stderr); ++ } ++ ++ MTestArgListDestroy(head); ++ ++ if (MTestIsBasicDtype(dtp.DTP_base_type)) { ++ MPI_Type_get_extent(dtp.DTP_base_type, &lb, &extent); ++ } else { ++ /* if the base datatype is not a basic datatype, use an extent ++ * of 1 */ ++ extent = 1; ++ } ++ ++ int type_size; ++ MPI_Type_size(dtp.DTP_base_type, &type_size); ++ if (type_size * count > maxbufsize) { ++ /* if the type size or count are too large, we do not have too ++ * many objects in the pool that we can search for. in such ++ * cases, simply return. */ ++ goto fn_exit; ++ } ++ ++ targetbuf = malloc(maxbufsize); ++ if (targetbuf == NULL) { ++ return ++errs; ++ } ++ ++ /* The following illustrates the use of the routines to ++ * run through a selection of communicators and datatypes. ++ * Use subsets of these for tests that do not involve combinations ++ * of communicators, datatypes, and counts of datatypes */ ++ while (MTestGetIntracommGeneral(&comm, minsize, 1)) { ++ if (comm == MPI_COMM_NULL) { ++ /* for NULL comms, make sure these processes create the ++ * same number of objects, so the target knows what ++ * datatype layout to check for */ ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ continue; ++ } ++ ++ /* Determine the sender and receiver */ ++ MPI_Comm_rank(comm, &rank); ++ MPI_Comm_size(comm, &size); ++ orig = 0; ++ target = size - 1; ++ ++ MPI_Win_create(targetbuf, maxbufsize, extent, MPI_INFO_NULL, comm, &win); ++ ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &orig_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_create(dtp, &target_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ errs += ++ test(comm, rank, orig, target, count, maxbufsize, orig_obj, dtp, target_obj, ++ targetbuf, win); ++ ++ DTP_obj_free(target_obj); ++ DTP_obj_free(orig_obj); ++ } ++ MPI_Win_free(&win); ++ MTestFreeComm(&comm); ++ } ++ ++ free(targetbuf); ++ ++ fn_exit: ++ DTP_pool_free(dtp); ++ ++ MTest_Finalize(errs); ++ return MTestReturnValue(errs); ++} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/rma/get_flushlocal.c +@@ -0,0 +1,81 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2018 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include "mpi.h" ++#include ++#include ++#include ++#include "mpitest.h" ++ ++/* ++static char MTEST_Descrip[] = "Get with Flush_local"; ++*/ ++ ++int errs = 0; ++const int NITER = 1000; ++#define BUFCNT 1024 ++ ++int main(int argc, char **argv) ++{ ++ int rank, nproc, x, i, target_rank; ++ int *winbuf = NULL, *locbuf = NULL; ++ MPI_Win win; ++ ++ MTest_Init(&argc, &argv); ++ ++ MPI_Comm_rank(MPI_COMM_WORLD, &rank); ++ MPI_Comm_size(MPI_COMM_WORLD, &nproc); ++ ++ locbuf = malloc(BUFCNT * sizeof(int)); ++ ++#ifdef USE_WIN_ALLOCATE ++ MPI_Win_allocate(BUFCNT * sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &winbuf, ++ &win); ++#else ++ winbuf = malloc(BUFCNT * sizeof(int)); ++ MPI_Win_create(winbuf, BUFCNT * sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win); ++#endif ++ ++ /* Initialize window buffer */ ++ MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); ++ for (i = 0; i < BUFCNT; i++) ++ winbuf[i] = rank * BUFCNT + i; ++ MPI_Win_unlock(rank, win); ++ ++ MPI_Barrier(MPI_COMM_WORLD); ++ ++ MPI_Win_lock_all(0, win); ++ for (x = 0; x < NITER; x++) { ++ for (target_rank = 0; target_rank < nproc; target_rank++) { ++ /* Test local completion with get+flush_local */ ++ memset(locbuf, 0, BUFCNT * sizeof(int)); ++ MPI_Get(locbuf, BUFCNT, MPI_INT, target_rank, 0, BUFCNT, MPI_INT, win); ++ MPI_Win_flush_local(target_rank, win); ++ ++ for (i = 0; i < BUFCNT; i++) { ++ int exp_val = target_rank * BUFCNT + i; ++ if (locbuf[i] != exp_val) { ++ errs++; ++ printf("[%d] Error: target_rank %d locbuf[%d] got %d, expected %d at iter %d\n", ++ rank, target_rank, i, locbuf[i], exp_val, x); ++ break; ++ } ++ } ++ } ++ } ++ ++ MPI_Win_unlock_all(win); ++ MPI_Win_free(&win); ++ ++#ifndef USE_WIN_ALLOCATE ++ free(winbuf); ++#endif ++ free(locbuf); ++ ++ MTest_Finalize(errs); ++ ++ return MTestReturnValue(errs); ++} +deleted file mode 100644 +--- a/test/mpi/rma/getfence1.c ++++ /dev/null +@@ -1,327 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2003 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Get with Fence"; +-*/ +- +-#define MAX_COUNT_SIZE (16000000) +-#define MAX_TYPE_SIZE (16) +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-static inline int test(MPI_Comm comm, int rank, int orig, int target, +- int i, int j, DTP_t orig_dtp, DTP_t target_dtp) +-{ +- int errs = 0, err; +- int disp_unit; +- int len; +- MPI_Aint origcount, targetcount, count; +- MPI_Aint extent, lb; +- MPI_Win win; +- MPI_Datatype origtype, targettype; +- char orig_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char target_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- void *origbuf, *targetbuf; +- +- count = orig_dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type_count; +- origtype = orig_dtp->DTP_obj_array[i].DTP_obj_type; +- targettype = target_dtp->DTP_obj_array[j].DTP_obj_type; +- origcount = orig_dtp->DTP_obj_array[i].DTP_obj_count; +- targetcount = target_dtp->DTP_obj_array[j].DTP_obj_count; +- origbuf = orig_dtp->DTP_obj_array[i].DTP_obj_buf; +- targetbuf = target_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- MPI_Type_get_name(origtype, orig_name, &len); +- MPI_Type_get_name(targettype, target_name, &len); +- +- MTestPrintfMsg(1, +- "Getting count = %ld of origtype %s - count = %ld receive type %s\n", +- origcount, orig_name, targetcount, target_name); +- +- MPI_Type_get_extent(origtype, &lb, &extent); +- /* This makes sure that disp_unit does not become negative for large counts */ +- disp_unit = extent < INT_MAX ? extent : 1; +- MPI_Win_create(origbuf, origcount * extent + lb, disp_unit, MPI_INFO_NULL, comm, &win); +- MPI_Win_fence(0, win); +- +- if (rank == orig) { +- /* The orig does not need to do anything besides the +- * fence */ +- MPI_Win_fence(0, win); +- } else if (rank == target) { +- /* To improve reporting of problems about operations, we +- * change the error handler to errors return */ +- MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); +- +- /* This should have the same effect, in terms of +- * transfering data, as a send/recv pair */ +- err = MPI_Get(targetbuf, targetcount, targettype, orig, 0, origcount, origtype, win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } +- } +- err = MPI_Win_fence(0, win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } +- } +- err = DTP_obj_buf_check(target_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- if (errs < 10) { +- printf +- ("Data in target buffer did not match for targetination datatype %s (put with orig datatype %s)\n", +- target_name, orig_name); +- } +- } +- } else { +- MPI_Win_fence(0, win); +- } +- MPI_Win_free(&win); +- +- return errs; +-} +- +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size, orig, target; +- int minsize = 2; +- int i, j; +- int count; +- MPI_Aint bufsize; +- MPI_Comm comm; +- DTP_t orig_dtp, target_dtp; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- MPI_Aint lb, extent; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- /* compute bufsize to limit number of comm in test */ +- MPI_Type_get_extent(basic_type, &lb, &extent); +- bufsize = extent * count; +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- /* TODO: ignore bufsize for structs for now; +- * we need to compute bufsize also for +- * this case */ +- bufsize = 0; +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- /* The following illustrates the use of the routines to +- * run through a selection of communicators and datatypes. +- * Use subsets of these for tests that do not involve combinations +- * of communicators, datatypes, and counts of datatypes */ +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- /* Determine the sender and receiver */ +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- orig = 0; +- target = size - 1; +- +- for (i = 0; i < orig_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(orig_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- for (j = 0; j < target_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(target_dtp, j, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- errs += test(comm, rank, orig, target, i, j, orig_dtp, target_dtp); +- +- DTP_obj_free(target_dtp, j); +- } +- DTP_obj_free(orig_dtp, i); +- } +- MTestFreeComm(&comm); +- +- /* for large buffers only do one communicator */ +- if (MAX_COUNT_SIZE * MAX_TYPE_SIZE < bufsize) { +- break; +- } +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +deleted file mode 100644 +--- a/test/mpi/rma/lock_contention_dt.c ++++ /dev/null +@@ -1,303 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test lock contention while streaming ACC-like operations"; +-*/ +- +-#define MAX_COUNT_SIZE (262144) +-#define MAX_TYPE_SIZE (16) +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size; +- int target = 1; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Aint bufsize; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- /* compute bufsize to limit number of comm in test */ +- MPI_Type_get_extent(basic_type, &lb, &extent); +- bufsize = extent * count; +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- /* TODO: ignore bufsize for structs for now; +- * we need to compute bufsize also for +- * this case */ +- bufsize = 0; +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank != target) { +- MPI_Win_lock(MPI_LOCK_EXCLUSIVE, target, 0, win); +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_unlock(target, win); +- MPI_Barrier(comm); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- /*wait for the destination to finish checking and reinitializing the buffer */ +- MPI_Barrier(comm); +- +- MPI_Win_lock(MPI_LOCK_EXCLUSIVE, target, 0, win); +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, targettype, +- target, 0, targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_unlock(target, win); +- MPI_Barrier(comm); +- free(resbuf); +- } else { /* Target checks the result */ +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_EXCLUSIVE, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Win_unlock(rank, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_EXCLUSIVE, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Win_unlock(rank, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- +- /* for large buffers only do one communicator */ +- if (MAX_COUNT_SIZE * MAX_TYPE_SIZE < bufsize) { +- break; +- } +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +deleted file mode 100644 +--- a/test/mpi/rma/lock_dt.c ++++ /dev/null +@@ -1,286 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock"; +-*/ +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size, orig, target; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- orig = 0; +- target = size - 1; +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_unlock(target, win); +- MPI_Barrier(comm); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- /*wait for the destination to finish checking and reinitializing the buffer */ +- MPI_Barrier(comm); +- +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, targettype, +- target, 0, targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_unlock(target, win); +- MPI_Barrier(comm); +- free(resbuf); +- } else if (rank == target) { +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Win_unlock(target, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Win_unlock(target, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- } +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +deleted file mode 100644 +--- a/test/mpi/rma/lock_dt_flush.c ++++ /dev/null +@@ -1,296 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock+flush"; +-*/ +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int errs = 0; +- int err = 0; +- int rank, size, orig, target; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- orig = 0; +- target = size - 1; +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_flush(target, win); +- /*signal to target that the ops are flushed so that it starts checking the result */ +- MPI_Barrier(comm); +- /*make sure target finishes checking the result before issuing unlock */ +- MPI_Barrier(comm); +- MPI_Win_unlock(target, win); +- +- /*wait for the destination to finish checking and reinitializing the buffer */ +- MPI_Barrier(comm); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, targettype, +- target, 0, targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_flush(target, win); +- /*signal to target that the ops are flushed so that it starts checking the result */ +- MPI_Barrier(comm); +- /*make sure target finishes checking the result before issuing unlock */ +- MPI_Barrier(comm); +- MPI_Win_unlock(target, win); +- free(resbuf); +- } else if (rank == target) { +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Barrier(comm); +- MPI_Win_unlock(target, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Barrier(comm); +- MPI_Win_unlock(target, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +deleted file mode 100644 +--- a/test/mpi/rma/lock_dt_flushlocal.c ++++ /dev/null +@@ -1,306 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock+flush_local"; +-*/ +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int errs = 0; +- int err = 0; +- int rank, size, orig, target; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- /* Determine the sender and receiver */ +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- orig = 0; +- target = size - 1; +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- MPI_Aint slb, sextent; +- MPI_Type_get_extent(origtype, &slb, &sextent); +- +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(slb + sextent * origcount, sizeof(char)); +- memcpy(tmp, origbuf, slb + sextent * origcount); +- +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_flush_local(target, win); +- /* reset the send buffer to test local completion */ +- memset(origbuf, 0, slb + sextent * origcount); +- MPI_Win_unlock(target, win); +- MPI_Barrier(comm); +- +- /* restore orig buffer */ +- memcpy(origbuf, tmp, slb + sextent * origcount); +- free(tmp); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- /*wait for the destinations to finish checking and reinitializing the buffers */ +- MPI_Barrier(comm); +- +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, targettype, +- target, 0, targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_flush_local(target, win); +- /* reset the send buffer to test local completion */ +- memset(origbuf, 0, slb + sextent * origcount); +- MPI_Win_unlock(target, win); +- MPI_Barrier(comm); +- free(resbuf); +- } else if (rank == target) { +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Win_unlock(target, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Win_unlock(target, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/rma/lock_x_dt.c +@@ -0,0 +1,331 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2015 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include "mpi.h" ++#include ++#include ++#include "mpitest.h" ++#include "dtpools.h" ++ ++/* ++static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock"; ++*/ ++ ++enum acc_type { ++ ACC_TYPE__ACC, ++ ACC_TYPE__GACC, ++}; ++ ++static int run_test(MPI_Comm comm, MPI_Win win, DTP_obj_s orig_obj, void *origbuf, ++ DTP_pool_s dtp, DTP_obj_s target_obj, void *targetbuf, ++ DTP_obj_s result_obj, void *resultbuf, int count, enum acc_type acc) ++{ ++ int rank, size, orig, target; ++ int target_start_idx, target_end_idx; ++ MPI_Datatype origtype, targettype, resulttype; ++ MPI_Aint origcount, targetcount, resultcount; ++ enum { ++ LOCK_TYPE__LOCK, ++ LOCK_TYPE__LOCKALL, ++ } lock_type; ++ enum { ++ FLUSH_TYPE__NONE, ++ FLUSH_TYPE__FLUSH, ++ FLUSH_TYPE__FLUSH_ALL, ++ } flush_type; ++ enum { ++ FLUSH_LOCAL_TYPE__NONE, ++ FLUSH_LOCAL_TYPE__FLUSH_LOCAL, ++ FLUSH_LOCAL_TYPE__FLUSH_LOCAL_ALL, ++ } flush_local_type; ++ int err, errs = 0; ++ ++ ++ MPI_Comm_rank(comm, &rank); ++ MPI_Comm_size(comm, &size); ++ ++#if defined(SINGLE_ORIGIN) && defined(SINGLE_TARGET) ++ orig = 0; ++ target = size - 1; ++ target_start_idx = target; ++ target_end_idx = target; ++ lock_type = LOCK_TYPE__LOCK; ++#elif defined(SINGLE_ORIGIN) && defined(MULTI_TARGET) ++ orig = 0; ++ if (rank == orig) ++ target = size - 1; ++ else ++ target = rank; ++ target_start_idx = orig + 1; ++ target_end_idx = target; ++ lock_type = LOCK_TYPE__LOCKALL; ++#elif defined(MULTI_ORIGIN) && defined(SINGLE_TARGET) ++ target = size - 1; ++ if (rank == target) ++ orig = 0; ++ else ++ orig = rank; ++ target_start_idx = target; ++ target_end_idx = target; ++ lock_type = LOCK_TYPE__LOCK; ++#else ++#error "SINGLE|MULTI_ORIGIN and SINGLE|MULTI_TARGET not defined" ++#endif ++ ++#if defined(USE_FLUSH) ++ flush_type = FLUSH_TYPE__FLUSH; ++#elif defined(USE_FLUSH_ALL) ++ flush_type = FLUSH_TYPE__FLUSH_ALL; ++#elif defined(USE_FLUSH_NONE) ++ flush_type = FLUSH_TYPE__NONE; ++#else ++#error "FLUSH_TYPE not defined" ++#endif ++ ++#if defined(USE_FLUSH_LOCAL) ++ flush_local_type = FLUSH_LOCAL_TYPE__FLUSH_LOCAL; ++#elif defined(USE_FLUSH_LOCAL_ALL) ++ flush_local_type = FLUSH_LOCAL_TYPE__FLUSH_LOCAL_ALL; ++#elif defined(USE_FLUSH_LOCAL_NONE) ++ flush_local_type = FLUSH_LOCAL_TYPE__NONE; ++#else ++#error "FLUSH_LOCAL_TYPE not defined" ++#endif ++ ++ /* we do two barriers: the first one informs the target(s) that ++ * the RMA operation should be visible at the target, and the ++ * second one informs the origin that the target is done ++ * checking. */ ++ if (rank == orig) { ++ origbuf = malloc(orig_obj.DTP_bufsize); ++ if (origbuf == NULL) ++ errs++; ++ ++ err = DTP_obj_buf_init(orig_obj, origbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) ++ errs++; ++ ++ if (lock_type == LOCK_TYPE__LOCK) { ++ MPI_Win_lock(MPI_LOCK_SHARED, target, 0, win); ++ } else { ++ MPI_Win_lock_all(0, win); ++ } ++ ++ MPI_Aint lb, extent; ++ MPI_Type_get_extent(dtp.DTP_base_type, &lb, &extent); ++ ++ origcount = orig_obj.DTP_type_count; ++ origtype = orig_obj.DTP_datatype; ++ targetcount = target_obj.DTP_type_count; ++ targettype = target_obj.DTP_datatype; ++ resultcount = result_obj.DTP_type_count; ++ resulttype = result_obj.DTP_datatype; ++ ++ int t; ++ if (acc == ACC_TYPE__ACC) { ++ for (t = target_start_idx; t <= target_end_idx; t++) { ++ MPI_Accumulate(origbuf + orig_obj.DTP_buf_offset, origcount, ++ origtype, t, target_obj.DTP_buf_offset / extent, targetcount, ++ targettype, MPI_REPLACE, win); ++ } ++ } else { ++ resultbuf = malloc(result_obj.DTP_bufsize); ++ if (resultbuf == NULL) ++ errs++; ++ ++#if !defined(MULTI_ORIGIN) && !defined(MULTI_TARGET) ++ err = DTP_obj_buf_init(result_obj, resultbuf, -1, -1, count); ++ if (err != DTP_SUCCESS) ++ errs++; ++#endif ++ ++ for (t = target_start_idx; t <= target_end_idx; t++) { ++ MPI_Get_accumulate(origbuf + orig_obj.DTP_buf_offset, origcount, ++ origtype, resultbuf + result_obj.DTP_buf_offset, resultcount, ++ resulttype, t, target_obj.DTP_buf_offset / extent, targetcount, ++ targettype, MPI_REPLACE, win); ++ } ++ } ++ ++ if (flush_local_type == FLUSH_LOCAL_TYPE__FLUSH_LOCAL) { ++ for (t = target_start_idx; t <= target_end_idx; t++) ++ MPI_Win_flush_local(t, win); ++ /* reset the send buffer to test local completion */ ++ DTP_obj_buf_init(orig_obj, origbuf, 0, 0, count); ++ } else if (flush_local_type == FLUSH_LOCAL_TYPE__FLUSH_LOCAL_ALL) { ++ MPI_Win_flush_local_all(win); ++ /* reset the send buffer to test local completion */ ++ DTP_obj_buf_init(orig_obj, origbuf, 0, 0, count); ++ } ++ ++ if (flush_type == FLUSH_TYPE__FLUSH_ALL) { ++ MPI_Win_flush_all(win); ++ MPI_Barrier(comm); ++ MPI_Barrier(comm); ++ } else if (flush_type == FLUSH_TYPE__FLUSH) { ++ for (t = target_start_idx; t <= target_end_idx; t++) ++ MPI_Win_flush(t, win); ++ MPI_Barrier(comm); ++ MPI_Barrier(comm); ++ } ++ ++ if (lock_type == LOCK_TYPE__LOCK) { ++ MPI_Win_unlock(target, win); ++ } else { ++ MPI_Win_unlock_all(win); ++ } ++ ++ if (flush_type == FLUSH_TYPE__NONE) { ++ MPI_Barrier(comm); ++ MPI_Barrier(comm); ++ } ++ ++ if (acc != ACC_TYPE__ACC) { ++#if !defined(MULTI_ORIGIN) && !defined(MULTI_TARGET) ++ /* check get results */ ++ /* this check is not valid for multi-origin tests, as some ++ * origins might receive the value that has already been ++ * overwritten by other origins */ ++ err = DTP_obj_buf_check(result_obj, resultbuf, 1, 2, count); ++ if (err != DTP_SUCCESS) ++ errs++; ++#endif ++ ++ free(resultbuf); ++ } ++ ++ free(origbuf); ++ } else if (rank == target) { ++ MPI_Barrier(comm); ++ MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); ++ ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) ++ errs++; ++ ++ err = DTP_obj_buf_init(target_obj, targetbuf, 1, 2, count); ++ if (err != DTP_SUCCESS) ++ errs++; ++ ++ MPI_Win_unlock(rank, win); ++ MPI_Barrier(comm); ++ } else { ++ MPI_Barrier(comm); ++ MPI_Barrier(comm); ++ } ++ ++ return errs; ++} ++ ++int main(int argc, char *argv[]) ++{ ++ int err, errs = 0; ++ int rank, size, orig, target; ++ int minsize = 2; ++ int i, seed, testsize; ++ MPI_Comm comm; ++ MPI_Win win; ++ MPI_Aint lb, extent, count, maxbufsize; ++ DTP_obj_s orig_obj, target_obj, result_obj; ++ DTP_pool_s dtp; ++ void *origbuf, *targetbuf, *resultbuf; ++ char *basic_type; ++ ++ MTest_Init(&argc, &argv); ++ ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); ++ ++ maxbufsize = MTestDefaultMaxBufferSize(); ++ ++ err = DTP_pool_create(basic_type, count, seed, &dtp); ++ if (err != DTP_SUCCESS) { ++ fprintf(stderr, "Error while creating orig pool (%s,%ld)\n", basic_type, count); ++ fflush(stderr); ++ } ++ ++ MTestArgListDestroy(head); ++ ++ if (MTestIsBasicDtype(dtp.DTP_base_type)) { ++ MPI_Type_get_extent(dtp.DTP_base_type, &lb, &extent); ++ } else { ++ /* accumulate tests cannot use struct types */ ++ goto fn_exit; ++ } ++ ++ targetbuf = malloc(maxbufsize); ++ if (targetbuf == NULL) { ++ errs++; ++ } ++ ++ while (MTestGetIntracommGeneral(&comm, minsize, 1)) { ++ if (comm == MPI_COMM_NULL) { ++ /* for NULL comms, make sure these processes create the ++ * same number of objects, so the target knows what ++ * datatype layout to check for */ ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ continue; ++ } ++ ++ MPI_Comm_rank(comm, &rank); ++ MPI_Comm_size(comm, &size); ++ ++ MPI_Win_create(targetbuf, maxbufsize, extent, MPI_INFO_NULL, comm, &win); ++ ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &orig_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_create(dtp, &target_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_create(dtp, &result_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ err = DTP_obj_buf_init(target_obj, targetbuf, 1, 2, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } ++ ++ /* do a barrier to ensure that the target buffer is ++ * initialized before we start writing data to it */ ++ MPI_Barrier(comm); ++ ++ run_test(comm, win, orig_obj, origbuf, dtp, target_obj, targetbuf, result_obj, ++ resultbuf, count, ACC_TYPE__ACC); ++ run_test(comm, win, orig_obj, origbuf, dtp, target_obj, targetbuf, result_obj, ++ resultbuf, count, ACC_TYPE__GACC); ++ ++ DTP_obj_free(orig_obj); ++ DTP_obj_free(target_obj); ++ DTP_obj_free(result_obj); ++ } ++ MPI_Win_free(&win); ++ MTestFreeComm(&comm); ++ } ++ ++ free(targetbuf); ++ ++ fn_exit: ++ DTP_pool_free(dtp); ++ MTest_Finalize(errs); ++ return MTestReturnValue(errs); ++} +deleted file mode 100644 +--- a/test/mpi/rma/lockall_dt.c ++++ /dev/null +@@ -1,313 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock_all"; +-*/ +- +-#define MAX_COUNT_SIZE (262144) +-#define MAX_TYPE_SIZE (16) +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Aint bufsize; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- /* compute bufsize to limit number of comm in test */ +- MPI_Type_get_extent(basic_type, &lb, &extent); +- bufsize = extent * count; +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- /* TODO: ignore bufsize for structs for now; +- * we need to compute bufsize also for +- * this case */ +- bufsize = 0; +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- int orig = 0; +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- int target; +- MPI_Win_lock_all(0, win); +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, +- targetcount, targettype, MPI_REPLACE, win); +- } +- MPI_Win_unlock_all(win); +- MPI_Barrier(comm); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- /*wait for the destination to finish checking and reinitializing the buffer */ +- MPI_Barrier(comm); +- +- MPI_Win_lock_all(0, win); +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, +- targettype, target, 0, targetcount, +- targettype, MPI_REPLACE, win); +- +- } +- MPI_Win_unlock_all(win); +- MPI_Barrier(comm); +- free(resbuf); +- } else { +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Win_unlock(rank, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Win_unlock(rank, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- +- /* for large buffers only do one communicator */ +- if (MAX_COUNT_SIZE * MAX_TYPE_SIZE < bufsize) { +- break; +- } +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +deleted file mode 100644 +--- a/test/mpi/rma/lockall_dt_flush.c ++++ /dev/null +@@ -1,324 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock_all+flush"; +-*/ +- +-#define MAX_COUNT_SIZE (262144) +-#define MAX_TYPE_SIZE (16) +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Aint bufsize; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- /* compute bufsize to limit number of comm in test */ +- MPI_Type_get_extent(basic_type, &lb, &extent); +- bufsize = extent * count; +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- /* TODO: ignore bufsize for structs for now; +- * we need to compute bufsize also for +- * this case */ +- bufsize = 0; +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- int orig = 0; +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- int target; +- MPI_Win_lock_all(0, win); +- +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, +- targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_flush(target, win); +- } +- /*signal to target that the ops are flushed so that it starts checking the result */ +- MPI_Barrier(comm); +- /*make sure target finishes checking the result before issuing unlock */ +- MPI_Barrier(comm); +- MPI_Win_unlock_all(win); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- /*wait for the destination to finish checking and reinitializing the buffer */ +- MPI_Barrier(comm); +- +- MPI_Win_lock_all(0, win); +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, +- targettype, target, 0, targetcount, +- targettype, MPI_REPLACE, win); +- MPI_Win_flush(target, win); +- } +- /*signal to target that the ops are flushed so that it starts checking the result */ +- MPI_Barrier(comm); +- /*make sure target finishes checking the result before issuing unlock */ +- MPI_Barrier(comm); +- MPI_Win_unlock_all(win); +- free(resbuf); +- } else { +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Barrier(comm); +- MPI_Win_unlock(rank, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Barrier(comm); +- MPI_Win_unlock(rank, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- +- /* for large buffers only do one communicator */ +- if (MAX_COUNT_SIZE * MAX_TYPE_SIZE < bufsize) { +- break; +- } +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +deleted file mode 100644 +--- a/test/mpi/rma/lockall_dt_flushall.c ++++ /dev/null +@@ -1,325 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock_all+flush_all"; +-*/ +- +-#define MAX_COUNT_SIZE (262144) +-#define MAX_TYPE_SIZE (16) +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Aint bufsize; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- /* compute bufsize to limit number of comm in test */ +- MPI_Type_get_extent(basic_type, &lb, &extent); +- bufsize = extent * count; +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- /* TODO: ignore bufsize for structs for now; +- * we need to compute bufsize also for +- * this case */ +- bufsize = 0; +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- int orig = 0; +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- int target; +- MPI_Win_lock_all(0, win); +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, +- targetcount, targettype, MPI_REPLACE, win); +- } +- +- MPI_Win_flush_all(win); +- /*signal to target that the ops are flushed so that it starts checking the result */ +- MPI_Barrier(comm); +- /*make sure target finishes checking the result before issuing unlock */ +- MPI_Barrier(comm); +- MPI_Win_unlock_all(win); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- /*wait for the destination to finish checking and reinitializing the buffer */ +- MPI_Barrier(comm); +- +- MPI_Win_lock_all(0, win); +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, +- targettype, target, 0, targetcount, +- targettype, MPI_REPLACE, win); +- +- } +- MPI_Win_flush_all(win); +- /*signal to target that the ops are flushed so that it starts checking the result */ +- MPI_Barrier(comm); +- /*make sure target finishes checking the result before issuing unlock */ +- MPI_Barrier(comm); +- MPI_Win_unlock_all(win); +- free(resbuf); +- } else { +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Barrier(comm); +- MPI_Win_unlock(rank, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Barrier(comm); +- MPI_Win_unlock(rank, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- +- /* for large buffers only do one communicator */ +- if (MAX_COUNT_SIZE * MAX_TYPE_SIZE < bufsize) { +- break; +- } +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +deleted file mode 100644 +--- a/test/mpi/rma/lockall_dt_flushlocal.c ++++ /dev/null +@@ -1,332 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock_all+flush_local"; +-*/ +- +-#define MAX_COUNT_SIZE (262144) +-#define MAX_TYPE_SIZE (16) +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Aint bufsize; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- /* compute bufsize to limit number of comm in test */ +- MPI_Type_get_extent(basic_type, &lb, &extent); +- bufsize = extent * count; +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- /* TODO: ignore bufsize for structs for now; +- * we need to compute bufsize also for +- * this case */ +- bufsize = 0; +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- int orig = 0; +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- int target; +- MPI_Aint slb, sextent; +- MPI_Type_get_extent(origtype, &slb, &sextent); +- +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(slb + sextent * origcount, sizeof(char)); +- memcpy(tmp, origbuf, slb + sextent * origcount); +- +- MPI_Win_lock_all(0, win); +- +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, +- targetcount, targettype, MPI_REPLACE, win); +- MPI_Win_flush_local(target, win); +- } +- /* reset the send buffer to test local completion */ +- memset(origbuf, 0, slb + sextent * origcount); +- MPI_Win_unlock_all(win); +- MPI_Barrier(comm); +- +- /* restore orig buffer */ +- memcpy(origbuf, tmp, slb + sextent * origcount); +- free(tmp); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- /*wait for the destinations to finish checking and reinitializing the buffers */ +- MPI_Barrier(comm); +- +- MPI_Win_lock_all(0, win); +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, +- targettype, target, 0, targetcount, +- targettype, MPI_REPLACE, win); +- MPI_Win_flush_local(target, win); +- } +- /* reset the send buffer to test local completion */ +- memset(origbuf, 0, slb + sextent * origcount); +- MPI_Win_unlock_all(win); +- MPI_Barrier(comm); +- free(resbuf); +- } else { +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Win_unlock(rank, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Win_unlock(rank, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- +- /* for large buffers only do one communicator */ +- if (MAX_COUNT_SIZE * MAX_TYPE_SIZE < bufsize) { +- break; +- } +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +deleted file mode 100644 +--- a/test/mpi/rma/lockall_dt_flushlocalall.c ++++ /dev/null +@@ -1,333 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2015 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Test for streaming ACC-like operations with lock_all+flush_local_all"; +-*/ +- +-#define MAX_COUNT_SIZE (262144) +-#define MAX_TYPE_SIZE (16) +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size; +- int minsize = 2, count; +- int i, j; +- MPI_Aint origcount, targetcount; +- MPI_Aint bufsize; +- MPI_Comm comm; +- MPI_Win win; +- MPI_Aint lb, extent; +- MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- void *origbuf, *targetbuf; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- /* compute bufsize to limit number of comm in test */ +- MPI_Type_get_extent(basic_type, &lb, &extent); +- bufsize = extent * count; +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- /* TODO: ignore bufsize for structs for now; +- * we need to compute bufsize also for +- * this case */ +- bufsize = 0; +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- int orig = 0; +- +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- +- MPI_Win_create(targetbuf, lb + targetcount * extent, +- (int) extent, MPI_INFO_NULL, comm, &win); +- +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- if (rank == orig) { +- int target; +- MPI_Aint slb, sextent; +- MPI_Type_get_extent(origtype, &slb, &sextent); +- +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(slb + sextent * origcount, sizeof(char)); +- memcpy(tmp, origbuf, slb + sextent * origcount); +- +- MPI_Win_lock_all(0, win); +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Accumulate(origbuf, origcount, +- origtype, target, 0, +- targetcount, targettype, MPI_REPLACE, win); +- } +- +- MPI_Win_flush_local_all(win); +- /* reset the send buffer to test local completion */ +- memset(origbuf, 0, slb + sextent * origcount); +- MPI_Win_unlock_all(win); +- MPI_Barrier(comm); +- +- /* restore orig buffer */ +- memcpy(origbuf, tmp, slb + sextent * origcount); +- free(tmp); +- +- char *resbuf = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- +- /*wait for the destinations to finish checking and reinitializing the buffers */ +- MPI_Barrier(comm); +- +- MPI_Win_lock_all(0, win); +- for (target = 0; target < size; target++) +- if (target != orig) { +- MPI_Get_accumulate(origbuf, origcount, +- origtype, resbuf, targetcount, +- targettype, target, 0, targetcount, +- targettype, MPI_REPLACE, win); +- +- } +- MPI_Win_flush_local_all(win); +- /* reset the send buffer to test local completion */ +- memset(origbuf, 0, slb + sextent * origcount); +- MPI_Win_unlock_all(win); +- MPI_Barrier(comm); +- free(resbuf); +- } else { +- /* TODO: add a DTP_buf_set() function to replace this */ +- char *tmp = (char *) calloc(lb + extent * targetcount, sizeof(char)); +- memcpy(tmp, targetbuf, lb + extent * targetcount); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- /* restore target buffer */ +- memcpy(targetbuf, tmp, lb + extent * targetcount); +- free(tmp); +- +- MPI_Win_unlock(rank, win); +- +- /*signal the source that checking and reinitialization is done */ +- MPI_Barrier(comm); +- +- MPI_Barrier(comm); +- MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- } +- MPI_Win_unlock(rank, win); +- } +- DTP_obj_free(orig_dtp, j); +- } +- MPI_Win_free(&win); +- DTP_obj_free(target_dtp, i); +- } +- MTestFreeComm(&comm); +- +- /* for large buffers only do one communicator */ +- if (MAX_COUNT_SIZE * MAX_TYPE_SIZE < bufsize) { +- break; +- } +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +--- a/test/mpi/rma/manyget.c ++++ b/test/mpi/rma/manyget.c +@@ -4,11 +4,6 @@ + * See COPYRIGHT in top-level directory. + */ + +-/* This test triggers a limitation in the Portals4 netmod where +- * too many large messages can overflow the available ME entries +- * (PTL_NO_SPACE). Our approach is to queue the entire send message +- * in the Rportals layer until we know there is ME space available. +- */ + #include + #include + #include +deleted file mode 100644 +--- a/test/mpi/rma/putfence1.c ++++ /dev/null +@@ -1,325 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2003 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +-#include "mpi.h" +-#include +-#include +-#include +-#include +-#include "mpitest.h" +-#include "dtpools.h" +- +-/* +-static char MTEST_Descrip[] = "Put with Fence"; +-*/ +- +-#define MAX_COUNT_SIZE (16000000) +-#define MAX_TYPE_SIZE (16) +- +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; +- +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; +- +-static inline int test(MPI_Comm comm, int rank, int orig, int target, +- int i, int j, DTP_t send_dtp, DTP_t target_dtp) +-{ +- int errs = 0, err; +- int len; +- int disp_unit; +- MPI_Aint origcount, targetcount, count; +- MPI_Aint extent, lb; +- MPI_Win win; +- MPI_Datatype origtype, targettype; +- char orig_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char target_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- void *origbuf, *targetbuf; +- +- count = send_dtp->DTP_type_signature.DTP_pool_basic.DTP_basic_type_count; +- origtype = send_dtp->DTP_obj_array[i].DTP_obj_type; +- targettype = target_dtp->DTP_obj_array[j].DTP_obj_type; +- origcount = send_dtp->DTP_obj_array[i].DTP_obj_count; +- targetcount = target_dtp->DTP_obj_array[j].DTP_obj_count; +- origbuf = send_dtp->DTP_obj_array[i].DTP_obj_buf; +- targetbuf = target_dtp->DTP_obj_array[j].DTP_obj_buf; +- +- MPI_Type_get_name(origtype, orig_name, &len); +- MPI_Type_get_name(targettype, target_name, &len); +- +- MTestPrintfMsg(1, +- "Putting count = %ld of origtype %s - count = %ld receive type %s\n", +- origcount, orig_name, targetcount, target_name); +- +- MPI_Type_get_extent(targettype, &lb, &extent); +- /* This makes sure that disp_unit does not become negative for large counts */ +- disp_unit = extent < INT_MAX ? extent : 1; +- MPI_Win_create(targetbuf, targetcount * extent + lb, disp_unit, MPI_INFO_NULL, comm, &win); +- MPI_Win_fence(0, win); +- +- /* To improve reporting of problems about operations, we +- * change the error handler to errors return */ +- MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); +- +- if (rank == orig) { +- err = MPI_Put(origbuf, origcount, origtype, target, 0, targetcount, targettype, win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } +- } +- err = MPI_Win_fence(0, win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } +- } +- } else if (rank == target) { +- MPI_Win_fence(0, win); +- /* This should have the same effect, in terms of +- * transfering data, as a send/recv pair */ +- err = DTP_obj_buf_check(target_dtp, j, 0, 1, count); +- if (err) { +- errs += err; +- if (errs < 10) { +- printf +- ("Data in target buffer did not match for targetination datatype %s (put with orig datatype %s)\n", +- target_name, orig_name); +- } +- } +- } else { +- MPI_Win_fence(0, win); +- } +- MPI_Win_free(&win); +- +- return errs; +-} +- +- +-int main(int argc, char *argv[]) +-{ +- int err, errs = 0; +- int rank, size, orig, target; +- int minsize = 2; +- int i, j; +- int count; +- MPI_Aint bufsize; +- MPI_Comm comm; +- DTP_t orig_dtp, target_dtp; +- +- MTest_Init(&argc, &argv); +- +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- MPI_Aint lb, extent; +- int len; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } +- +- /* compute bufsize to limit number of comm in test */ +- MPI_Type_get_extent(basic_type, &lb, &extent); +- bufsize = extent * count; +- +- err = DTP_pool_create(basic_type, count, &orig_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +- +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; +- +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- /* TODO: ignore bufsize for structs for now; +- * we need to compute bufsize also for +- * this case */ +- bufsize = 0; +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- /* this is ignored */ +- count = 0; +-#endif +- +- /* The following illustrates the use of the routines to +- * run through a selection of communicators and datatypes. +- * Use subsets of these for tests that do not involve combinations +- * of communicators, datatypes, and counts of datatypes */ +- while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) +- continue; +- /* Determine the sender and receiver */ +- MPI_Comm_rank(comm, &rank); +- MPI_Comm_size(comm, &size); +- orig = 0; +- target = size - 1; +- +- for (i = 0; i < orig_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(orig_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- for (j = 0; j < target_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(target_dtp, j, 0, 0, 0); +- if (err != DTP_SUCCESS) { +- errs++; +- break; +- } +- +- errs += test(comm, rank, orig, target, i, j, orig_dtp, target_dtp); +- +- DTP_obj_free(target_dtp, j); +- } +- DTP_obj_free(orig_dtp, i); +- } +- MTestFreeComm(&comm); +- +- /* for large buffers only do one communicator */ +- if (MAX_COUNT_SIZE * MAX_TYPE_SIZE < bufsize) { +- break; +- } +- } +- +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif +- +- MTest_Finalize(errs); +- return MTestReturnValue(errs); +-} +--- a/test/mpi/rma/putpscw1.c ++++ b/test/mpi/rma/putpscw1.c +@@ -14,287 +14,179 @@ + static char MTEST_Descrip[] = "Put with Post/Start/Complete/Wait"; + */ + +-typedef struct { +- const char *typename; +- MPI_Datatype type; +-} Type_t; + +-Type_t typelist[] = { +- {"MPI_CHAR", MPI_CHAR}, +- {"MPI_BYTE", MPI_BYTE}, +- {"MPI_WCHAR", MPI_WCHAR}, +- {"MPI_SHORT", MPI_SHORT}, +- {"MPI_INT", MPI_INT}, +- {"MPI_LONG", MPI_LONG}, +- {"MPI_LONG_LONG_INT", MPI_LONG_LONG_INT}, +- {"MPI_UNSIGNED_CHAR", MPI_UNSIGNED_CHAR}, +- {"MPI_UNSIGNED_SHORT", MPI_UNSIGNED_SHORT}, +- {"MPI_UNSIGNED", MPI_UNSIGNED}, +- {"MPI_UNSIGNED_LONG", MPI_UNSIGNED_LONG}, +- {"MPI_UNSIGNED_LONG_LONG", MPI_UNSIGNED_LONG_LONG}, +- {"MPI_FLOAT", MPI_FLOAT}, +- {"MPI_DOUBLE", MPI_DOUBLE}, +- {"MPI_LONG_DOUBLE", MPI_LONG_DOUBLE}, +- {"MPI_INT8_T", MPI_INT8_T}, +- {"MPI_INT16_T", MPI_INT16_T}, +- {"MPI_INT32_T", MPI_INT32_T}, +- {"MPI_INT64_T", MPI_INT64_T}, +- {"MPI_UINT8_T", MPI_UINT8_T}, +- {"MPI_UINT16_T", MPI_UINT16_T}, +- {"MPI_UINT32_T", MPI_UINT32_T}, +- {"MPI_UINT64_T", MPI_UINT64_T}, +- {"MPI_C_COMPLEX", MPI_C_COMPLEX}, +- {"MPI_C_FLOAT_COMPLEX", MPI_C_FLOAT_COMPLEX}, +- {"MPI_C_DOUBLE_COMPLEX", MPI_C_DOUBLE_COMPLEX}, +- {"MPI_C_LONG_DOUBLE_COMPLEX", MPI_C_LONG_DOUBLE_COMPLEX}, +- {"MPI_FLOAT_INT", MPI_FLOAT_INT}, +- {"MPI_DOUBLE_INT", MPI_DOUBLE_INT}, +- {"MPI_LONG_INT", MPI_LONG_INT}, +- {"MPI_2INT", MPI_2INT}, +- {"MPI_SHORT_INT", MPI_SHORT_INT}, +- {"MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT}, +- {"MPI_DATATYPE_NULL", MPI_DATATYPE_NULL} +-}; + + int main(int argc, char *argv[]) + { + int errs = 0, err; + int rank, size, orig, target; +- int minsize = 2, count; +- int i, j, len; ++ int minsize = 2; ++ int i; ++ int seed, testsize; + MPI_Aint origcount, targetcount; + MPI_Comm comm; + MPI_Win win; +- MPI_Aint extent, lb; ++ MPI_Aint extent, lb, count, maxbufsize; + MPI_Group wingroup, neighbors; + MPI_Datatype origtype, targettype; +- DTP_t orig_dtp, target_dtp; +- char orig_name[MPI_MAX_OBJECT_NAME] = { 0 }; +- char target_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ DTP_pool_s dtp; ++ DTP_obj_s orig_obj, target_obj; + void *origbuf, *targetbuf; ++ char *basic_type; + + MTest_Init(&argc, &argv); + +-#ifndef USE_DTP_POOL_TYPE__STRUCT /* set in 'test/mpi/structtypetest.txt' to split tests */ +- MPI_Datatype basic_type; +- char type_name[MPI_MAX_OBJECT_NAME] = { 0 }; ++ MTestArgList *head = MTestArgListCreate(argc, argv); ++ seed = MTestArgListGetInt(head, "seed"); ++ testsize = MTestArgListGetInt(head, "testsize"); ++ count = MTestArgListGetLong(head, "count"); ++ basic_type = MTestArgListGetString(head, "type"); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 3) { +- fprintf(stdout, "Usage: %s -type=[TYPE] -count=[COUNT]\n", argv[0]); +- return MTestReturnValue(1); +- } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-type=", strlen("-type="))) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(argv[i] + strlen("-type="), typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_type = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } else if (!strncmp(argv[i], "-count=", strlen("-count="))) { +- count = atoi(argv[i] + strlen("-count=")); +- /* TODO: make sure count is valid */ +- } +- } +- } ++ maxbufsize = MTestDefaultMaxBufferSize(); + +- err = DTP_pool_create(basic_type, count, &orig_dtp); ++ err = DTP_pool_create(basic_type, count, seed, &dtp); + if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating orig pool (%s,%d)\n", type_name, count); +- fflush(stdout); ++ fprintf(stderr, "Error while creating orig pool (%s,%ld)\n", basic_type, count); ++ fflush(stderr); + } + +- err = DTP_pool_create(basic_type, count, &target_dtp); +- if (err != DTP_SUCCESS) { +- MPI_Type_get_name(basic_type, type_name, &len); +- fprintf(stdout, "Error while creating target pool (%s,%d)\n", type_name, count); +- fflush(stdout); +- } +-#else +- MPI_Datatype *basic_types = NULL; +- int *basic_type_counts = NULL; +- int basic_type_num; +- int k; +- char *input_string, *token; ++ MTestArgListDestroy(head); + +- /* TODO: parse input parameters using optarg */ +- if (argc < 4) { +- fprintf(stdout, "Usage: %s -numtypes=[NUM] -types=[TYPES] -counts=[COUNTS]\n", argv[0]); +- return MTestReturnValue(1); ++ if (MTestIsBasicDtype(dtp.DTP_base_type)) { ++ MPI_Type_get_extent(dtp.DTP_base_type, &lb, &extent); + } else { +- for (i = 1; i < argc; i++) { +- if (!strncmp(argv[i], "-numtypes=", strlen("-numtypes="))) { +- basic_type_num = atoi(argv[i] + strlen("-numtypes=")); +- +- /* allocate arrays */ +- basic_type_counts = (int *) malloc(basic_type_num * sizeof(int)); +- basic_types = (MPI_Datatype *) malloc(basic_type_num * sizeof(MPI_Datatype)); +- } else if (!strncmp(argv[i], "-types=", strlen("-type="))) { +- input_string = strdup(argv[i] + strlen("-types=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- j = 0; +- while (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL") && +- strcmp(token, typelist[j].typename)) { +- j++; +- } +- +- if (strcmp(typelist[j].typename, "MPI_DATATYPE_NULL")) { +- basic_types[k++] = typelist[j].type; +- } else { +- fprintf(stdout, "Error: datatype not recognized\n"); +- return MTestReturnValue(1); +- } +- } +- free(input_string); +- } else if (!strncmp(argv[i], "-counts=", strlen("-counts="))) { +- input_string = strdup(argv[i] + strlen("-counts=")); +- for (k = 0, token = strtok(input_string, ","); token; token = strtok(NULL, ",")) { +- basic_type_counts[k++] = atoi(token); +- } +- free(input_string); +- } +- } +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &orig_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); +- } +- +- err = DTP_pool_create_struct(basic_type_num, basic_types, basic_type_counts, &target_dtp); +- if (err != DTP_SUCCESS) { +- fprintf(stdout, "Error while creating struct pool\n"); +- fflush(stdout); ++ /* if the base datatype is not a basic datatype, use an extent ++ * of 1 */ ++ extent = 1; + } + +- /* this is ignored */ +- count = 0; +-#endif ++ targetbuf = malloc(maxbufsize); ++ if (targetbuf == NULL) ++ errs++; + + /* The following illustrates the use of the routines to + * run through a selection of communicators and datatypes. + * Use subsets of these for tests that do not involve combinations + * of communicators, datatypes, and counts of datatypes */ + while (MTestGetIntracommGeneral(&comm, minsize, 1)) { +- if (comm == MPI_COMM_NULL) ++ if (comm == MPI_COMM_NULL) { ++ /* for NULL comms, make sure these processes create the ++ * same number of objects, so the target knows what ++ * datatype layout to check for */ ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); ++ errs += MTEST_CREATE_AND_FREE_DTP_OBJS(dtp, maxbufsize, testsize); + continue; ++ } ++ + /* Determine the sender and receiver */ + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); + orig = 0; + target = size - 1; + +- for (i = 0; i < target_dtp->DTP_num_objs; i++) { +- err = DTP_obj_create(target_dtp, i, 0, 0, 0); ++ MPI_Win_create(targetbuf, maxbufsize, extent, MPI_INFO_NULL, comm, &win); ++ MPI_Win_get_group(win, &wingroup); ++ ++ for (i = 0; i < testsize; i++) { ++ err = DTP_obj_create(dtp, &orig_obj, maxbufsize); + if (err != DTP_SUCCESS) { + errs++; + break; + } + +- targetcount = target_dtp->DTP_obj_array[i].DTP_obj_count; +- targettype = target_dtp->DTP_obj_array[i].DTP_obj_type; +- targetbuf = target_dtp->DTP_obj_array[i].DTP_obj_buf; ++ err = DTP_obj_create(dtp, &target_obj, maxbufsize); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- MPI_Type_extent(targettype, &extent); +- MPI_Type_lb(targettype, &lb); +- MPI_Win_create(targetbuf, targetcount * extent + lb, +- (int) extent, MPI_INFO_NULL, comm, &win); +- MPI_Win_get_group(win, &wingroup); ++ err = DTP_obj_buf_init(target_obj, targetbuf, -1, -1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- for (j = 0; j < orig_dtp->DTP_num_objs; j++) { +- err = DTP_obj_create(orig_dtp, j, 0, 1, count); +- if (err != DTP_SUCCESS) { ++ targetcount = target_obj.DTP_type_count; ++ targettype = target_obj.DTP_datatype; ++ ++ /* To improve reporting of problems about operations, we ++ * change the error handler to errors return */ ++ MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ ++ if (rank == orig) { ++ origbuf = malloc(orig_obj.DTP_bufsize); ++ if (origbuf == NULL) { + errs++; + break; + } + +- origcount = orig_dtp->DTP_obj_array[j].DTP_obj_count; +- origtype = orig_dtp->DTP_obj_array[j].DTP_obj_type; +- origbuf = orig_dtp->DTP_obj_array[j].DTP_obj_buf; ++ err = DTP_obj_buf_init(orig_obj, origbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ break; ++ } + +- /* To improve reporting of problems about operations, we +- * change the error handler to errors return */ +- MPI_Win_set_errhandler(win, MPI_ERRORS_RETURN); ++ origcount = orig_obj.DTP_type_count; ++ origtype = orig_obj.DTP_datatype; + +- if (rank == orig) { +- /* Neighbor is target only */ +- MPI_Group_incl(wingroup, 1, &target, &neighbors); +- err = MPI_Win_start(neighbors, 0, win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } +- } +- MPI_Group_free(&neighbors); +- err = +- MPI_Put(origbuf, origcount, origtype, target, 0, targetcount, targettype, +- win); +- if (err) { +- errs++; ++ /* Neighbor is target only */ ++ MPI_Group_incl(wingroup, 1, &target, &neighbors); ++ err = MPI_Win_start(neighbors, 0, win); ++ if (err) { ++ errs++; ++ if (errs < 10) { + MTestPrintError(err); + } +- err = MPI_Win_complete(win); +- if (err) { +- errs++; +- if (errs < 10) { +- MTestPrintError(err); +- } ++ } ++ MPI_Group_free(&neighbors); ++ err = ++ MPI_Put(origbuf + orig_obj.DTP_buf_offset, origcount, origtype, target, ++ target_obj.DTP_buf_offset / extent, targetcount, targettype, win); ++ if (err) { ++ errs++; ++ MTestPrintError(err); ++ } ++ err = MPI_Win_complete(win); ++ if (err) { ++ errs++; ++ if (errs < 10) { ++ MTestPrintError(err); + } +- } else if (rank == target) { +- MPI_Group_incl(wingroup, 1, &orig, &neighbors); +- MPI_Win_post(neighbors, 0, win); +- MPI_Group_free(&neighbors); +- MPI_Win_wait(win); +- /* This should have the same effect, in terms of +- * transfering data, as a send/recv pair */ +- err = DTP_obj_buf_check(target_dtp, i, 0, 1, count); +- if (err != DTP_SUCCESS) { +- errs++; +- if (errs < 10) { +- MPI_Type_get_name(origtype, orig_name, &len); +- MPI_Type_get_name(targettype, target_name, &len); +- fprintf(stdout, +- "Data received with type %s does not match data sent with type %s\n", +- target_name, orig_name); +- fflush(stdout); +- } ++ } ++ ++ free(origbuf); ++ } else if (rank == target) { ++ MPI_Group_incl(wingroup, 1, &orig, &neighbors); ++ MPI_Win_post(neighbors, 0, win); ++ MPI_Group_free(&neighbors); ++ MPI_Win_wait(win); ++ /* This should have the same effect, in terms of ++ * transfering data, as a send/recv pair */ ++ err = DTP_obj_buf_check(target_obj, targetbuf, 0, 1, count); ++ if (err != DTP_SUCCESS) { ++ errs++; ++ if (errs < 10) { ++ fprintf(stderr, ++ "Data received with type %s does not match data sent with type %s\n", ++ target_obj.DTP_description, orig_obj.DTP_description); ++ fflush(stderr); + } +- } else { +- /* Nothing; the other processes need not call any +- * MPI routines */ +- ; + } +- DTP_obj_free(orig_dtp, j); ++ } else { ++ /* Nothing; the other processes need not call any ++ * MPI routines */ ++ ; + } +- MPI_Win_free(&win); +- MPI_Group_free(&wingroup); +- DTP_obj_free(target_dtp, i); ++ DTP_obj_free(orig_obj); ++ DTP_obj_free(target_obj); + } ++ MPI_Win_free(&win); ++ MPI_Group_free(&wingroup); + MTestFreeComm(&comm); + } + +- DTP_pool_free(orig_dtp); +- DTP_pool_free(target_dtp); +- +-#ifdef USE_DTP_POOL_TYPE__STRUCT +- /* cleanup array if any */ +- if (basic_types) { +- free(basic_types); +- } +- if (basic_type_counts) { +- free(basic_type_counts); +- } +-#endif ++ free(targetbuf); ++ DTP_pool_free(dtp); + + MTest_Finalize(errs); + return MTestReturnValue(errs); +deleted file mode 100644 +--- a/test/mpi/rma/testlist.def ++++ /dev/null +@@ -1,167 +0,0 @@ +-winname 2 +-allocmem 2 +-putfidx 4 +-adlb_mimic1 3 +-accfence2 4 +-getgroup 4 +-transpose1 2 +-transpose2 2 +-transpose3 2 +-transpose3_shm 2 +-transpose5 2 +-transpose6 1 +-transpose7 2 +-test1 2 +-test2 2 +-test2_shm 2 +-test3 2 +-test3_shm 2 +-test4 2 +-test5 2 +-lockcontention 3 +-lockcontention2 4 +-lockcontention2 8 +-lockcontention3 8 +-lockopts 2 +-transpose4 2 +-fetchandadd 7 +-fetchandadd_tree 7 +-wintest 2 +-wintest_shm 2 +-contig_displ 1 +-test1_am 2 +-test2_am 2 +-test2_am_shm 2 +-test3_am 2 +-test3_am_shm 2 +-test4_am 2 +-test5_am 2 +-fetchandadd_am 7 +-fetchandadd_tree_am 7 +-accfence2_am 4 +-test1_dt 2 timeLimit=30 +-nullpscw 7 +-nullpscw_shm 7 +-attrorderwin 1 +-wincall 2 +-baseattrwin 1 +-fkeyvalwin 1 +-selfrma 1 +-mixedsync 4 +-locknull 2 +-rmanull 2 +-rmazero 2 +-strided_acc_indexed 2 +-strided_acc_onelock 2 +-strided_acc_subarray 2 +-strided_get_indexed 2 +-strided_putget_indexed 4 +-strided_putget_indexed_shared 4 mpiversion=3.0 +-strided_getacc_indexed 4 mpiversion=3.0 +-strided_getacc_indexed_shared 4 mpiversion=3.0 +-window_creation 2 +-contention_put 4 +-contention_putget 4 +-put_base 2 +-put_bottom 2 +-win_flavors 4 mpiversion=3.0 +-win_flavors 3 mpiversion=3.0 +-manyrma2 2 timeLimit=500 +-manyrma2_shm 2 timeLimit=500 +-manyrma3 2 +-win_shared 4 mpiversion=3.0 +-win_shared_create_allocshm 4 mpiversion=3.0 +-win_shared_create_no_allocshm 4 mpiversion=3.0 +-win_shared_noncontig 4 mpiversion=3.0 +-win_shared_noncontig_put 4 mpiversion=3.0 +-win_zero 4 mpiversion=3.0 +-@largetest@win_large_shm 4 mpiversion=3.0 +-@largetest@win_large_shm 3 mpiversion=3.0 +-win_dynamic_acc 4 mpiversion=3.0 +-get_acc_local 1 mpiversion=3.0 +-linked_list 4 mpiversion=3.0 +-linked_list_fop 4 mpiversion=3.0 +-compare_and_swap 4 mpiversion=3.0 +-fetch_and_op_char 4 mpiversion=3.0 +-fetch_and_op_short 4 mpiversion=3.0 +-fetch_and_op_int 4 mpiversion=3.0 +-fetch_and_op_long 4 mpiversion=3.0 +-fetch_and_op_double 4 mpiversion=3.0 +-fetch_and_op_long_double 4 mpiversion=3.0 +-get_accumulate_double 4 mpiversion=3.0 +-get_accumulate_double_derived 4 mpiversion=3.0 +-get_accumulate_int 4 mpiversion=3.0 +-get_accumulate_int_derived 4 mpiversion=3.0 +-get_accumulate_long 4 mpiversion=3.0 +-get_accumulate_long_derived 4 mpiversion=3.0 +-get_accumulate_short 4 mpiversion=3.0 +-get_accumulate_short_derived 4 mpiversion=3.0 +-flush 4 mpiversion=3.0 +-reqops 4 mpiversion=3.0 +-req_example 4 mpiversion=3.0 +-req_example_shm 4 mpiversion=3.0 +-rput_local_comp 2 mpiversion=3.0 +-racc_local_comp 2 mpiversion=3.0 +-win_info 4 mpiversion=3.0 +-linked_list_lockall 4 mpiversion=3.0 +-pscw_ordering 4 mpiversion=3.0 +-pscw_ordering_shm 4 mpiversion=3.0 +-linked_list_bench_lock_all 4 mpiversion=3.0 +-linked_list_bench_lock_excl 4 mpiversion=3.0 +-linked_list_bench_lock_shr 4 mpiversion=3.0 +-linked_list_bench_lock_shr_nocheck 4 mpiversion=3.0 +-mutex_bench 4 mpiversion=3.0 +-mutex_bench_shared 4 mpiversion=3.0 +-mutex_bench_shm 4 mpiversion=3.0 +-mutex_bench_shm_ordered 4 mpiversion=3.0 +-rma_contig 2 mpiversion=3.0 timeLimit=720 +-badrma 2 mpiversion=3.0 +-acc_loc 4 +-acc_ordering 2 mpiversion=3.0 +-fence_shm 2 mpiversion=3.0 +-win_shared_zerobyte 4 mpiversion=3.0 +-win_shared_put_flush_get 4 mpiversion=3.0 +-get_struct 2 +-at_complete 2 +-atomic_rmw_fop 3 +-atomic_rmw_cas 3 +-atomic_rmw_gacc 3 +-atomic_get_short_int 3 mpiversion=3.0 timeLimit=300 +-atomic_get_2int 3 mpiversion=3.0 timeLimit=300 +-atomic_get_long_int 3 mpiversion=3.0 timeLimit=300 +-atomic_get_float_int 3 mpiversion=3.0 timeLimit=300 +-atomic_get_double_int 3 mpiversion=3.0 timeLimit=300 +-atomic_get_long_double_int 3 mpiversion=3.0 timeLimit=300 +-aint 2 mpiversion=3.1 +-acc_pairtype 2 +-manyget 2 timeLimit=300 +-derived_acc_flush_local 3 mpiversion=3.0 +-large_acc_flush_local 3 mpiversion=3.0 +-large_small_acc 2 +-win_shared_put_flush_load 3 mpiversion=3.0 +-win_shared_acc_flush_load 3 mpiversion=3.0 +-win_shared_gacc_flush_load 3 mpiversion=3.0 +-win_shared_fop_flush_load 3 mpiversion=3.0 +-win_shared_cas_flush_load 3 mpiversion=3.0 +-put_flush_get 3 mpiversion=3.0 +-acc_flush_get 3 mpiversion=3.0 +-gacc_flush_get 3 mpiversion=3.0 +-fop_flush_get 3 mpiversion=3.0 +-cas_flush_get 3 mpiversion=3.0 +-rget_unlock 2 mpiversion=3.0 +-overlap_wins_put 3 +-overlap_wins_acc 3 +-overlap_wins_gacc 3 +-overlap_wins_fop 3 +-overlap_wins_cas 3 +-lock_nested 3 +-rget_testall 2 +-win_shared_query_null 4 mpiversion=3.0 +- +-## This test is not strictly correct. This was meant to test out the +-## case when MPI_Test is not nonblocking. However, we ended up +-## assuming that MPI_Win_lock will be nonblocking. That is not +-## specified by the standard and might not be true. Commenting this +-## out till be find a better way to test the original problem with +-## MPI_Test. +-# nb_test 2 mpiversion=3.0 +new file mode 100644 +--- /dev/null ++++ b/test/mpi/rma/testlist.in +@@ -0,0 +1,172 @@ ++winname 2 ++allocmem 2 ++putfidx 4 ++adlb_mimic1 3 ++accfence2 4 ++getgroup 4 ++transpose1 2 ++transpose2 2 ++transpose3 2 ++transpose3_shm 2 ++transpose5 2 ++transpose6 1 ++transpose7 2 ++test1 2 ++test2 2 ++test2_shm 2 ++test3 2 ++test3_shm 2 ++test4 2 ++test5 2 ++lockcontention 3 ++lockcontention2 4 ++lockcontention2 8 ++lockcontention3 8 ++lockopts 2 ++transpose4 2 ++fetchandadd 7 ++fetchandadd_tree 7 ++wintest 2 ++wintest_shm 2 ++contig_displ 1 ++test1_am 2 ++test2_am 2 ++test2_am_shm 2 ++test3_am 2 ++test3_am_shm 2 ++test4_am 2 ++test5_am 2 ++fetchandadd_am 7 ++fetchandadd_tree_am 7 ++accfence2_am 4 ++test1_dt 2 timeLimit=30 ++nullpscw 7 ++nullpscw_shm 7 ++attrorderwin 1 ++wincall 2 ++baseattrwin 1 ++fkeyvalwin 1 ++selfrma 1 ++mixedsync 4 ++locknull 2 ++rmanull 2 ++rmazero 2 ++strided_acc_indexed 2 ++strided_acc_onelock 2 ++strided_acc_subarray 2 ++strided_get_indexed 2 ++strided_putget_indexed 4 ++strided_putget_indexed_shared 4 mpiversion=3.0 ++strided_getacc_indexed 4 mpiversion=3.0 ++strided_getacc_indexed_shared 4 mpiversion=3.0 ++window_creation 2 ++window_allocation 4 mpiversion=3.0 ++window_noncontig_allocation 4 mpiversion=3.0 ++contention_put 4 ++contention_putget 4 ++put_base 2 ++put_bottom 2 ++win_flavors 4 mpiversion=3.0 ++win_flavors 3 mpiversion=3.0 ++manyrma2 2 timeLimit=500 ++manyrma2_shm 2 timeLimit=500 ++manyrma3 2 ++win_shared 4 mpiversion=3.0 ++win_shared_create_allocshm 4 mpiversion=3.0 ++win_shared_create_no_allocshm 4 mpiversion=3.0 ++win_shared_noncontig 4 mpiversion=3.0 ++win_shared_noncontig_put 4 mpiversion=3.0 ++win_zero 4 mpiversion=3.0 ++@largetest@win_large_shm 4 mpiversion=3.0 ++@largetest@win_large_shm 3 mpiversion=3.0 ++win_dynamic_acc 4 mpiversion=3.0 ++get_acc_local 1 mpiversion=3.0 ++linked_list 4 mpiversion=3.0 ++linked_list_fop 4 mpiversion=3.0 ++compare_and_swap 4 mpiversion=3.0 ++fetch_and_op_char 4 mpiversion=3.0 ++fetch_and_op_short 4 mpiversion=3.0 ++fetch_and_op_int 4 mpiversion=3.0 ++fetch_and_op_long 4 mpiversion=3.0 ++fetch_and_op_double 4 mpiversion=3.0 ++fetch_and_op_long_double 4 mpiversion=3.0 ++get_accumulate_double 4 mpiversion=3.0 ++get_accumulate_double_derived 4 mpiversion=3.0 ++get_accumulate_int 4 mpiversion=3.0 ++get_accumulate_int_derived 4 mpiversion=3.0 ++get_accumulate_long 4 mpiversion=3.0 ++get_accumulate_long_derived 4 mpiversion=3.0 ++get_accumulate_short 4 mpiversion=3.0 ++get_accumulate_short_derived 4 mpiversion=3.0 ++flush 4 mpiversion=3.0 ++reqops 4 mpiversion=3.0 ++req_example 4 mpiversion=3.0 ++req_example_shm 4 mpiversion=3.0 ++rput_local_comp 2 mpiversion=3.0 ++racc_local_comp 2 mpiversion=3.0 ++win_info 4 mpiversion=3.0 ++linked_list_lockall 4 mpiversion=3.0 ++pscw_ordering 4 mpiversion=3.0 ++pscw_ordering_shm 4 mpiversion=3.0 ++linked_list_bench_lock_all 4 mpiversion=3.0 ++linked_list_bench_lock_excl 4 mpiversion=3.0 ++linked_list_bench_lock_shr 4 mpiversion=3.0 ++linked_list_bench_lock_shr_nocheck 4 mpiversion=3.0 ++mutex_bench 4 mpiversion=3.0 ++mutex_bench_shared 4 mpiversion=3.0 ++mutex_bench_shm 4 mpiversion=3.0 ++mutex_bench_shm_ordered 4 mpiversion=3.0 ++rma_contig 2 mpiversion=3.0 timeLimit=720 ++badrma 2 mpiversion=3.0 ++acc_loc 4 ++acc_ordering 2 mpiversion=3.0 ++fence_shm 2 mpiversion=3.0 ++win_shared_zerobyte 4 mpiversion=3.0 ++win_shared_put_flush_get 4 mpiversion=3.0 ++get_struct 2 ++at_complete 2 ++atomic_rmw_fop 3 ++atomic_rmw_cas 3 ++atomic_rmw_gacc 3 ++atomic_get_short_int 3 mpiversion=3.0 timeLimit=300 ++atomic_get_2int 3 mpiversion=3.0 timeLimit=300 ++atomic_get_long_int 3 mpiversion=3.0 timeLimit=300 ++atomic_get_float_int 3 mpiversion=3.0 timeLimit=300 ++atomic_get_double_int 3 mpiversion=3.0 timeLimit=300 ++atomic_get_long_double_int 3 mpiversion=3.0 timeLimit=300 ++aint 2 mpiversion=3.1 ++acc_pairtype 2 ++acc_pairtype_shm 2 ++manyget 2 timeLimit=300 ++derived_acc_flush_local 3 mpiversion=3.0 ++large_acc_flush_local 3 mpiversion=3.0 ++large_small_acc 2 ++win_shared_put_flush_load 3 mpiversion=3.0 ++win_shared_acc_flush_load 3 mpiversion=3.0 ++win_shared_gacc_flush_load 3 mpiversion=3.0 ++win_shared_fop_flush_load 3 mpiversion=3.0 ++win_shared_cas_flush_load 3 mpiversion=3.0 ++put_flush_get 3 mpiversion=3.0 ++acc_flush_get 3 mpiversion=3.0 ++gacc_flush_get 3 mpiversion=3.0 ++fop_flush_get 3 mpiversion=3.0 ++cas_flush_get 3 mpiversion=3.0 ++rget_unlock 2 mpiversion=3.0 ++overlap_wins_put 3 ++overlap_wins_acc 3 ++overlap_wins_gacc 3 ++overlap_wins_fop 3 ++overlap_wins_cas 3 ++lock_nested 3 ++rget_testall 2 ++get_flushlocal 4 mpiversion=3.0 ++get_flushlocal_shm 4 mpiversion=3.0 ++win_shared_query_null 4 mpiversion=3.0 ++ ++## This test is not strictly correct. This was meant to test out the ++## case when MPI_Test is not nonblocking. However, we ended up ++## assuming that MPI_Win_lock will be nonblocking. That is not ++## specified by the standard and might not be true. Commenting this ++## out till be find a better way to test the original problem with ++## MPI_Test. ++# nb_test 2 mpiversion=3.0 +--- a/test/mpi/rma/window_creation.c ++++ b/test/mpi/rma/window_creation.c +@@ -30,11 +30,25 @@ int main(int argc, char **argv) + + /* Perform a pile of window creations */ + for (i = 0; i < NUM_WIN; i++) { ++#ifdef USE_WIN_ALLOCATE ++ if (rank == 0) ++ MTestPrintfMsg(1, " + Allocating window %d\n", i); ++ MPI_Win_allocate(DATA_SZ, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &base_ptrs[i], &windows[i]); ++#elif defined(USE_WIN_ALLOCATE_NONCONTIG) ++ MPI_Info info = MPI_INFO_NULL; ++ MPI_Info_create(&info); ++ MPI_Info_set(info, "alloc_shared_noncontig", "true"); ++ if (rank == 0) ++ MTestPrintfMsg(1, " + Allocating window (alloc_shared_noncontig=true) %d\n", i); ++ MPI_Win_allocate(DATA_SZ, 1, info, MPI_COMM_WORLD, &base_ptrs[i], &windows[i]); ++ MPI_Info_free(&info); ++#else + if (rank == 0) + MTestPrintfMsg(1, " + Creating window %d\n", i); + + MPI_Alloc_mem(DATA_SZ, MPI_INFO_NULL, &base_ptrs[i]); + MPI_Win_create(base_ptrs[i], DATA_SZ, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &windows[i]); ++#endif + } + + MPI_Barrier(MPI_COMM_WORLD); +@@ -45,7 +59,9 @@ int main(int argc, char **argv) + MTestPrintfMsg(1, " + Freeing window %d\n", i); + + MPI_Win_free(&windows[i]); ++#if !defined(USE_WIN_ALLOCATE) && !defined(USE_WIN_ALLOCATE_NONCONTIG) + MPI_Free_mem(base_ptrs[i]); ++#endif + } + + MTest_Finalize(0); +--- a/test/mpi/runtests.in ++++ b/test/mpi/runtests.in +@@ -415,14 +415,9 @@ sub RunList { + my $listfile = $_[0]; + my $ResultTest = ""; + my $InitForRun = ""; +- my $listfileSource = $listfile; + my @TYPES = ""; + my $DTP_SWITCH = "@DTP_SWITCH@"; + +- if (! defined $ENV{"DTP_NUM_OBJS"}) { +- $ENV{"DTP_NUM_OBJS"} = "5"; +- } +- + if (! defined $ENV{"DTP_RUNTIME_TYPES"}) { + @TYPES = split ' ', "MPI_INT MPI_DOUBLE"; + } +@@ -430,10 +425,19 @@ sub RunList { + @TYPES = split ' ', $ENV{"DTP_RUNTIME_TYPES"}; + } + +- print "Looking in $curdir/$listfile\n" if $debug; +- if (! -s "$listfile" && -s "$srcdir/$curdir/$listfile" ) { +- $listfileSource = "$srcdir/$curdir/$listfile"; +- } ++ # eg: runtests -tests='testlist,testlist.dtp' ++ my @all_listfiles = split /,\s*/, $listfile; ++ foreach my $_f (@all_listfiles){ ++ print "Looking in $curdir/$_f\n" if $debug; ++ my $listfileSource = $_f; ++ if (! -s "$_f" && -s "$srcdir/$curdir/$_f" ) { ++ $listfileSource = "$srcdir/$curdir/$_f"; ++ } ++ if (!-f $listfileSource && $_f ne "testlist") { ++ # just skip, do not complain missing unless it is "testlist" ++ next; ++ } ++ # FIXME: keeping the indentation to facilitate review, indent back on merge + open( $LIST, "<$listfileSource" ) || + die "Could not open $listfileSource\n"; + while (<$LIST>) { +@@ -622,6 +626,13 @@ sub RunList { + } + else { + $total_run++; ++ my $save_dir; ++ if ($programname =~/^(\S+)\/(\S+)$/) { ++ $save_dir = `pwd`; ++ chomp $save_dir; ++ $programname = $2; ++ chdir $1 or warn "Can't chdir $1\n"; ++ } + if (&BuildMPIProgram( $programname, $xfail ) == 0) { + if ($batchRun == 1) { + &AddMPIProgram( $programname, $np, $ResultTest, +@@ -643,9 +654,13 @@ sub RunList { + if ($batchRun == 0) { + &CleanUpAfterRun( $programname ); + } ++ if ($save_dir) { ++ chdir $save_dir; ++ } + } + } + close( $LIST ); ++ } + } + # + # This routine tries to run all of the files in the current +@@ -736,7 +751,7 @@ sub RunMPIProgram { + my $extraArgs = ""; + my $runtime = 0; + +- &RunPreMsg( $programname, $np, $curdir ); ++ &RunPreMsg( $programname, $np, $progArgs, $curdir ); + + unlink "err"; + +@@ -1167,9 +1182,10 @@ sub TestErrFatal { + # RunPostMsg - Call at end of each test + # + sub RunPreMsg { +- my ($programname,$np,$workdir) = @_; ++ my ($programname,$np,$progArgs,$workdir) = @_; + if ($xmloutput) { + print XMLOUT "$newline$programname$newline"; ++ print XMLOUT "$progArgs$newline"; + print XMLOUT "$np$newline"; + print XMLOUT "$workdir$newline"; + } +deleted file mode 100644 +--- a/test/mpi/structtypetest.txt ++++ /dev/null +@@ -1,55 +0,0 @@ +-# (C) 2018 by Argonne National Laboratory. +-# See COPYRIGHT in top-level directory. +-# +-# This file is used by autogen.sh to generate multiple binary files for MPI_Type_create_struct +-# testing. +-# Every line must have the format: +-# +-# :::::timeLimit=: +-# +-# The autogen.sh script generates a single binary for every line. More specifically, every line +-# will have a binary corresponding to different datatype structures of the form: +-# +-# struct { +-# char c[]; // +-# // -> type #1 in basictypelist.txt +-# int a[]; // +-# // -> type #3 in basictypelist.txt +-# float b[]; // +-# // -> type #11 in basictypelist.txt +-# ...; +-# }; +-# +-# NOTE: the first, third, fourth, fifth, and seventh fields are mandatory (i.e., there must be a +-# valid file pathname, structure information, and number of processes to run the test). +-# +-# TODO: add support for definition of a datatype and to reference it in tests +-# example: +-# DEFINE TYPE1[4]{MPI_CHAR:64,MPI_INT:32,MPI_INT:16,MPI_FLOAT:8} +-# DEFINE TYPE2[2]{MPI_CHAR:16,MPI_INT:32} +-# attr/fkeyvaltype.c:USE_DTP_POOL_TYPE__STRUCT:TYPE1::1 +-# attr/fkeyvaltype.c:USE_DTP_POOL_TYPE__STRUCT:TYPE2::1 +- +- +-attr/fkeyvaltype.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::1 +-coll/bcast.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::4 +-#cxx/attr/fkeyvaltypex.cxx:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::1 +-#cxx/datatype/packsizex.cxx:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::1 +-pt2pt/sendrecv1.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::4 +-pt2pt/sendself.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::1 +-pt2pt/pingping.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::2 +-rma/accfence1.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::4 +-rma/accpscw1.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::4 +-rma/epochtest.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::4 +-rma/getfence1.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::2 +-rma/lock_contention_dt.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::4 +-rma/lock_dt.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::2 +-rma/lock_dt_flush.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::2 +-rma/lock_dt_flushlocal.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::2 +-rma/lockall_dt.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::4 +-rma/lockall_dt_flush.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::4 +-rma/lockall_dt_flushall.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::4 +-rma/lockall_dt_flushlocal.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::4 +-rma/lockall_dt_flushlocalall.c:USE_DTP_POOL_TYPE__STRUCT:2:MPI_INT,MPI_INT:1,1::4 +-rma/putfence1.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::2 +-rma/putpscw1.c:USE_DTP_POOL_TYPE__STRUCT:4:MPI_CHAR,MPI_INT,MPI_INT,MPI_FLOAT:64,32,16,8::4 +--- a/test/mpi/threads/init/testlist ++++ b/test/mpi/threads/init/testlist +@@ -1,2 +1,2 @@ + initth 1 +-initth 2 +\ No newline at end of file ++initth 2 +--- a/test/mpi/threads/pt2pt/ibsend.c ++++ b/test/mpi/threads/pt2pt/ibsend.c +@@ -10,8 +10,8 @@ + multithreaded environment. + + It starts a single receiver thread that expects +- NUMSENDS messages and NUMSENDS sender threads, that +- use MPI_Bsend to send a message of size MSGSIZE ++ NUMSENDS from NUMTHREADS sender threads, that ++ use [i]bsend/[i]send to send a message of size MSGSIZE + to its right neigbour or rank 0 if (my_rank==comm_size-1), i.e. + target_rank = (my_rank+1)%size . + +@@ -28,18 +28,19 @@ + #include "mpitest.h" + #include "mpithreadtest.h" + +-#define NUMSENDS 32 ++#define NUMSENDS 4 ++#define NUMTHREADS 8 + #define BUFSIZE 10000000 + #define MSGSIZE 1024 + + int rank, size; + +-void *receiver(void *ptr) ++MTEST_THREAD_RETURN_TYPE receiver(void *ptr) + { + int k; + char buf[MSGSIZE]; + +- for (k = 0; k < NUMSENDS; k++) ++ for (k = 0; k < NUMSENDS * NUMTHREADS; k++) + MPI_Recv(buf, MSGSIZE, MPI_CHAR, MPI_ANY_SOURCE, MPI_ANY_TAG, + MPI_COMM_WORLD, MPI_STATUS_IGNORE); + +@@ -47,42 +48,50 @@ void *receiver(void *ptr) + } + + +-void *sender_bsend(void *ptr) ++MTEST_THREAD_RETURN_TYPE sender_bsend(void *ptr) + { + char buffer[MSGSIZE]; ++ int i; + MTEST_VG_MEM_INIT(buffer, MSGSIZE * sizeof(char)); +- MPI_Bsend(buffer, MSGSIZE, MPI_CHAR, (rank + 1) % size, 0, MPI_COMM_WORLD); ++ for (i = 0; i < NUMSENDS; i++) ++ MPI_Bsend(buffer, MSGSIZE, MPI_CHAR, (rank + 1) % size, 0, MPI_COMM_WORLD); + + return NULL; + } + +-void *sender_ibsend(void *ptr) ++MTEST_THREAD_RETURN_TYPE sender_ibsend(void *ptr) + { + char buffer[MSGSIZE]; +- MPI_Request req; ++ int i; ++ MPI_Request reqs[NUMSENDS]; + MTEST_VG_MEM_INIT(buffer, MSGSIZE * sizeof(char)); +- MPI_Ibsend(buffer, MSGSIZE, MPI_CHAR, (rank + 1) % size, 0, MPI_COMM_WORLD, &req); +- MPI_Wait(&req, MPI_STATUS_IGNORE); ++ for (i = 0; i < NUMSENDS; i++) ++ MPI_Ibsend(buffer, MSGSIZE, MPI_CHAR, (rank + 1) % size, 0, MPI_COMM_WORLD, &reqs[i]); ++ MPI_Waitall(NUMSENDS, reqs, MPI_STATUSES_IGNORE); + + return NULL; + } + +-void *sender_isend(void *ptr) ++MTEST_THREAD_RETURN_TYPE sender_isend(void *ptr) + { + char buffer[MSGSIZE]; +- MPI_Request req; ++ int i; ++ MPI_Request reqs[NUMSENDS]; + MTEST_VG_MEM_INIT(buffer, MSGSIZE * sizeof(char)); +- MPI_Isend(buffer, MSGSIZE, MPI_CHAR, (rank + 1) % size, 0, MPI_COMM_WORLD, &req); +- MPI_Wait(&req, MPI_STATUS_IGNORE); ++ for (i = 0; i < NUMSENDS; i++) ++ MPI_Isend(buffer, MSGSIZE, MPI_CHAR, (rank + 1) % size, 0, MPI_COMM_WORLD, &reqs[i]); ++ MPI_Waitall(NUMSENDS, reqs, MPI_STATUSES_IGNORE); + + return NULL; + } + +-void *sender_send(void *ptr) ++MTEST_THREAD_RETURN_TYPE sender_send(void *ptr) + { + char buffer[MSGSIZE]; ++ int i; + MTEST_VG_MEM_INIT(buffer, MSGSIZE * sizeof(char)); +- MPI_Send(buffer, MSGSIZE, MPI_CHAR, (rank + 1) % size, 0, MPI_COMM_WORLD); ++ for (i = 0; i < NUMSENDS; i++) ++ MPI_Send(buffer, MSGSIZE, MPI_CHAR, (rank + 1) % size, 0, MPI_COMM_WORLD); + + return NULL; + } +@@ -95,16 +104,14 @@ int main(int argc, char *argv[]) + buffer = (char *) malloc(BUFSIZE * sizeof(char)); + MTEST_VG_MEM_INIT(buffer, BUFSIZE * sizeof(char)); + MPI_Status status; +- pthread_t receiver_thread, sender_thread[NUMSENDS]; +- pthread_attr_t attr; + MPI_Comm communicator; + int bs; + + MTest_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); + + if (provided != MPI_THREAD_MULTIPLE) { +- printf("Error\n"); +- MPI_Abort(911, MPI_COMM_WORLD); ++ fprintf(stderr, "MPI_THREAD_MULTIPLE not supported by the MPI implementation\n"); ++ MPI_Abort(MPI_COMM_WORLD, -1); + } + + MPI_Buffer_attach(buffer, BUFSIZE); +@@ -115,45 +122,30 @@ int main(int argc, char *argv[]) + * with this call, the problem appears more reliably. + * If the MPI_Comm_dup() call is commented out, it is still + * evident but does not appear that often (don't know why) */ +- +- /* Initialize and set thread detached attribute */ +- pthread_attr_init(&attr); +- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); +- +- pthread_create(&receiver_thread, &attr, &receiver, NULL); +- for (k = 0; k < NUMSENDS; k++) +- pthread_create(&sender_thread[k], &attr, &sender_bsend, NULL); +- pthread_join(receiver_thread, NULL); +- for (k = 0; k < NUMSENDS; k++) +- pthread_join(sender_thread[k], NULL); ++ MTest_Start_thread(receiver, NULL); ++ for (k = 0; k < NUMTHREADS; k++) ++ MTest_Start_thread(sender_bsend, NULL); ++ MTest_Join_threads(); + MPI_Barrier(MPI_COMM_WORLD); + +- pthread_create(&receiver_thread, &attr, &receiver, NULL); +- for (k = 0; k < NUMSENDS; k++) +- pthread_create(&sender_thread[k], &attr, &sender_ibsend, NULL); +- pthread_join(receiver_thread, NULL); +- for (k = 0; k < NUMSENDS; k++) +- pthread_join(sender_thread[k], NULL); ++ MTest_Start_thread(receiver, NULL); ++ for (k = 0; k < NUMTHREADS; k++) ++ MTest_Start_thread(sender_ibsend, NULL); ++ MTest_Join_threads(); + MPI_Barrier(MPI_COMM_WORLD); + +- pthread_create(&receiver_thread, &attr, &receiver, NULL); +- for (k = 0; k < NUMSENDS; k++) +- pthread_create(&sender_thread[k], &attr, &sender_isend, NULL); +- pthread_join(receiver_thread, NULL); +- for (k = 0; k < NUMSENDS; k++) +- pthread_join(sender_thread[k], NULL); ++ MTest_Start_thread(receiver, NULL); ++ for (k = 0; k < NUMTHREADS; k++) ++ MTest_Start_thread(sender_isend, NULL); ++ MTest_Join_threads(); + MPI_Barrier(MPI_COMM_WORLD); + +- pthread_create(&receiver_thread, &attr, &receiver, NULL); +- for (k = 0; k < NUMSENDS; k++) +- pthread_create(&sender_thread[k], &attr, &sender_send, NULL); +- pthread_join(receiver_thread, NULL); +- for (k = 0; k < NUMSENDS; k++) +- pthread_join(sender_thread[k], NULL); ++ MTest_Start_thread(receiver, NULL); ++ for (k = 0; k < NUMTHREADS; k++) ++ MTest_Start_thread(sender_send, NULL); ++ MTest_Join_threads(); + MPI_Barrier(MPI_COMM_WORLD); + +- pthread_attr_destroy(&attr); +- + MPI_Comm_free(&communicator); + MPI_Buffer_detach(&ptr_dt, &bs); + free(buffer); +--- a/test/mpi/threads/util/mtestthread.c ++++ b/test/mpi/threads/util/mtestthread.c +@@ -37,9 +37,10 @@ static MTEST_THREAD_HANDLE threads[MTEST_MAX_THREADS]; + * speculative loading/storing */ + static volatile int nthreads = 0; + +-#ifdef HAVE_WINDOWS_H ++#if defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_WIN) + int MTest_Start_thread(MTEST_THREAD_RETURN_TYPE(*fn) (void *p), void *arg) + { ++ int errs = 0; + if (nthreads >= MTEST_MAX_THREADS) { + fprintf(stderr, "Too many threads already created: max is %d\n", MTEST_MAX_THREADS); + return 1; +@@ -72,6 +73,7 @@ int MTest_Join_threads(void) + + int MTest_thread_lock_create(MTEST_THREAD_LOCK_TYPE * lock) + { ++ int errs = 0; + if (lock == NULL) + return -1; + +@@ -85,6 +87,7 @@ int MTest_thread_lock_create(MTEST_THREAD_LOCK_TYPE * lock) + + int MTest_thread_lock(MTEST_THREAD_LOCK_TYPE * lock) + { ++ int errs = 0; + if (lock == NULL) + return -1; + +@@ -97,6 +100,7 @@ int MTest_thread_lock(MTEST_THREAD_LOCK_TYPE * lock) + + int MTest_thread_unlock(MTEST_THREAD_LOCK_TYPE * lock) + { ++ int errs = 0; + if (lock == NULL) + return -1; + if (ReleaseMutex(*lock) == 0) { +@@ -107,6 +111,7 @@ int MTest_thread_unlock(MTEST_THREAD_LOCK_TYPE * lock) + + int MTest_thread_lock_free(MTEST_THREAD_LOCK_TYPE * lock) + { ++ int errs = 0; + if (lock != NULL) { + if (CloseHandle(*lock) == 0) { + return -1; +@@ -115,7 +120,10 @@ int MTest_thread_lock_free(MTEST_THREAD_LOCK_TYPE * lock) + return MTestReturnValue(errs); + } + +-#else ++/* FIXME: We currently assume Solaris threads and Pthreads are interoperable. ++ * We need to use Solaris threads explicitly to avoid potential interoperability issues.*/ ++#elif defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_POSIX || \ ++ THREAD_PACKAGE_NAME == THREAD_PACKAGE_SOLARIS) + int MTest_Start_thread(MTEST_THREAD_RETURN_TYPE(*fn) (void *p), void *arg) + { + int err; +@@ -186,9 +194,78 @@ int MTest_thread_lock_free(MTEST_THREAD_LOCK_TYPE * lock) + } + return err; + } ++ ++#elif defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_ARGOBOTS) ++ ++extern ABT_pool pools[MTEST_NUM_XSTREAMS]; ++ ++int MTest_Start_thread(MTEST_THREAD_RETURN_TYPE(*fn) (void *p), void *arg) ++{ ++ int ret; ++ ++ if (nthreads >= MTEST_MAX_THREADS) { ++ fprintf(stderr, "Too many threads already created: max is %d\n", MTEST_MAX_THREADS); ++ return 1; ++ } ++ /* We push threads to pools[0] and let the random work-stealing ++ * scheduler balance things out. */ ++ ret = ABT_thread_create(pools[0], fn, arg, ABT_THREAD_ATTR_NULL, &threads[nthreads]); ++ MTEST_ABT_ERROR(ret, "ABT_thread_create"); ++ ++ nthreads++; ++ ++ return 0; ++} ++ ++int MTest_Join_threads(void) ++{ ++ int i, ret, err = 0; ++ for (i = 0; i < nthreads; i++) { ++ ret = ABT_thread_free(&threads[i]); ++ MTEST_ABT_ERROR(ret, "ABT_thread_free"); ++ } ++ nthreads = 0; ++ return 0; ++} ++ ++int MTest_thread_lock_create(MTEST_THREAD_LOCK_TYPE * lock) ++{ ++ int ret; ++ ret = ABT_mutex_create(lock); ++ MTEST_ABT_ERROR(ret, "ABT_mutex_create"); ++ return 0; ++} ++ ++int MTest_thread_lock(MTEST_THREAD_LOCK_TYPE * lock) ++{ ++ int ret; ++ ret = ABT_mutex_lock(*(lock)); ++ MTEST_ABT_ERROR(ret, "ABT_mutex_lock"); ++ return 0; ++} ++ ++int MTest_thread_unlock(MTEST_THREAD_LOCK_TYPE * lock) ++{ ++ int ret; ++ ret = ABT_mutex_unlock(*(lock)); ++ MTEST_ABT_ERROR(ret, "ABT_mutex_unlock"); ++ return 0; ++} ++ ++int MTest_thread_lock_free(MTEST_THREAD_LOCK_TYPE * lock) ++{ ++ int ret; ++ ret = ABT_mutex_free(lock); ++ MTEST_ABT_ERROR(ret, "ABT_mutex_free"); ++ return 0; ++} ++#else ++#error "thread package (THREAD_PACKAGE_NAME) not defined or unknown" + #endif + +-#if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_BARRIER_INIT) ++#if defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_POSIX || \ ++ THREAD_PACKAGE_NAME == THREAD_PACKAGE_SOLARIS) && \ ++ defined(HAVE_PTHREAD_BARRIER_INIT) + static MTEST_THREAD_LOCK_TYPE barrierLock; + static pthread_barrier_t barrier; + static int bcount = -1; +@@ -235,6 +312,54 @@ int MTest_thread_barrier(int nt) + } + return pthread_barrier_wait(&barrier); + } ++#elif defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_ARGOBOTS) ++static MTEST_THREAD_LOCK_TYPE barrierLock; ++static ABT_barrier barrier; ++static int bcount = -1; ++int MTest_thread_barrier_init(void) ++{ ++ bcount = -1; /* must reset to force barrier re-creation */ ++ return MTest_thread_lock_create(&barrierLock); ++} ++ ++int MTest_thread_barrier_free(void) ++{ ++ int ret; ++ MTest_thread_lock_free(&barrierLock); ++ ret = ABT_barrier_free(&barrier); ++ MTEST_ABT_ERROR(ret, "ABT_barrier_free"); ++ return 0; ++} ++ ++/* FIXME this barrier interface should be changed to more closely match the ++ * pthread interface. Specifically, nt should not be a barrier-time ++ * parameter but an init-time parameter. The double-checked locking below ++ * isn't valid according to pthreads, and it isn't guaranteed to be robust ++ * in the presence of aggressive CPU/compiler optimization. */ ++int MTest_thread_barrier(int nt) ++{ ++ int ret; ++ if (nt < 0) ++ nt = nthreads; ++ if (bcount != nt) { ++ /* One thread needs to initialize the barrier */ ++ ret = MTest_thread_lock(&barrierLock); ++ /* Test again in case another thread already fixed the problem */ ++ if (bcount != nt) { ++ if (bcount > 0) { ++ ret = ABT_barrier_free(&barrier); ++ MTEST_ABT_ERROR(ret, "ABT_barrier_free"); ++ } ++ ret = ABT_barrier_create(nt, &barrier); ++ MTEST_ABT_ERROR(ret, "ABT_barrier_create"); ++ bcount = nt; ++ } ++ ret = MTest_thread_unlock(&barrierLock); ++ } ++ ret = ABT_barrier_wait(barrier); ++ MTEST_ABT_ERROR(ret, "ABT_barrier_wait"); ++ return 0; ++} + #else + static MTEST_THREAD_LOCK_TYPE barrierLock; + static volatile int phase = 0; +--- a/test/mpi/util/Makefile.am ++++ b/test/mpi/util/Makefile.am +@@ -1,9 +1,22 @@ ++# -*- Mode: Makefile; -*- ++# vim: set ft=automake : ++# ++# (C) 2011 by Argonne National Laboratory. ++# See COPYRIGHT in top-level directory. ++# + +-AM_CPPFLAGS = -I${srcdir}/../include -I../include ++AM_CPPFLAGS = -I$(srcdir)/../include -I../include -I$(srcdir)/../dtpools/include + +-mtest.$(OBJEXT): mtest.c +-dtypes.$(OBJEXT): dtypes.c + all-local: mtest.$(OBJEXT) dtypes.$(OBJEXT) + + EXTRA_PROGRAMS = mtestcheck dtypes +-mtestcheck_SOURCES = mtestcheck.c mtest.c ++mtestcheck_SOURCES = mtestcheck.c mtest.c mtest_common.c ++ ++#---- CXX --------------------------------------------------------------------- ++all-local: mtest_cxx.$(OBJEXT) ++ ++## list a dummy library that we don't actually build in order to cause automake ++## to emit a rule for building mtest_cxx.o from mtest_cxx.cxx ++EXTRA_LIBRARIES = libmtest_dummy.a ++libmtest_dummy_a_SOURCES = mtest_cxx.cxx ++ +--- a/test/mpi/util/mtest.c ++++ b/test/mpi/util/mtest.c +@@ -64,6 +64,72 @@ static int usageOutput = 0; /* */ + #define MPI_THREAD_SINGLE 0 + #endif + ++/* MTest_init_thread_pkg() ++ * Initialize the threading package if needed. Argobots requires this ++ * but Pthreads doesn't, for example. */ ++ ++#if defined(THREAD_PACKAGE_NAME) && (THREAD_PACKAGE_NAME == THREAD_PACKAGE_ARGOBOTS) ++static ABT_xstream xstreams[MTEST_NUM_XSTREAMS]; ++static ABT_sched scheds[MTEST_NUM_XSTREAMS]; ++ABT_pool pools[MTEST_NUM_XSTREAMS]; ++ ++static void MTest_init_thread_pkg(int argc, char **argv) ++{ ++ int i, k, ret; ++ int num_xstreams; ++ ++ ABT_init(argc, argv); ++ ++ /* Create pools */ ++ for (i = 0; i < MTEST_NUM_XSTREAMS; i++) { ++ ret = ABT_pool_create_basic(ABT_POOL_FIFO, ABT_POOL_ACCESS_MPMC, ABT_TRUE, &pools[i]); ++ MTEST_ABT_ERROR(ret, "ABT_pool_create_basic"); ++ } ++ ++ /* Create schedulers */ ++ ABT_pool my_pools[MTEST_NUM_XSTREAMS]; ++ num_xstreams = MTEST_NUM_XSTREAMS; ++ for (i = 0; i < num_xstreams; i++) { ++ for (k = 0; k < num_xstreams; k++) { ++ my_pools[k] = pools[(i + k) % num_xstreams]; ++ } ++ ++ ret = ABT_sched_create_basic(ABT_SCHED_RANDWS, num_xstreams, my_pools, ++ ABT_SCHED_CONFIG_NULL, &scheds[i]); ++ MTEST_ABT_ERROR(ret, "ABT_sched_create_basic"); ++ } ++ ++ /* Create Execution Streams */ ++ ret = ABT_xstream_self(&xstreams[0]); ++ MTEST_ABT_ERROR(ret, "ABT_xstream_self"); ++ ret = ABT_xstream_set_main_sched(xstreams[0], scheds[0]); ++ MTEST_ABT_ERROR(ret, "ABT_xstream_set_main_sched"); ++ for (i = 1; i < num_xstreams; i++) { ++ ret = ABT_xstream_create(scheds[i], &xstreams[i]); ++ MTEST_ABT_ERROR(ret, "ABT_xstream_create"); ++ } ++} ++ ++static void MTest_finalize_thread_pkg() ++{ ++ int i, ret; ++ int num_xstreams = MTEST_NUM_XSTREAMS; ++ ++ for (i = 1; i < num_xstreams; i++) { ++ ret = ABT_xstream_join(xstreams[i]); ++ MTEST_ABT_ERROR(ret, "ABT_xstream_join"); ++ ret = ABT_xstream_free(&xstreams[i]); ++ MTEST_ABT_ERROR(ret, "ABT_xstream_free"); ++ } ++ ++ ret = ABT_finalize(); ++ MTEST_ABT_ERROR(ret, "ABT_finalize"); ++} ++#else ++#define MTest_init_thread_pkg(argc, argv) do { } while (0) ++#define MTest_finalize_thread_pkg() do { } while (0) ++#endif ++ + /* + * Initialize and Finalize MTest + */ +@@ -85,6 +151,8 @@ void MTest_Init_thread(int *argc, char ***argv, int required, int *provided) + int flag; + char *envval = 0; + ++ MTest_init_thread_pkg(*argc, *argv); ++ + MPI_Initialized(&flag); + if (!flag) { + /* Permit an MPI that claims only MPI 1 but includes the +@@ -213,6 +281,8 @@ void MTest_Finalize(int errs) + MTestRMACleanup(); + + MPI_Finalize(); ++ ++ MTest_finalize_thread_pkg(); + } + + /* ------------------------------------------------------------------------ */ +@@ -1314,5 +1384,3 @@ int MTestSpawnPossible(int *can_spawn) + } + return errs; + } +- +-/* ------------------------------------------------------------------------ */ +new file mode 100644 +--- /dev/null ++++ b/test/mpi/util/mtest_common.c +@@ -0,0 +1,158 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ ++/* ++ * ++ * (C) 2019 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++*/ ++ ++#include "mpitest.h" ++ ++/* ------------------------------------------------------------------------ */ ++/* Utilities related to test environment */ ++ ++/* Some tests would like to test with large buffer, but an arbitary size may fail ++ on machines that does not have sufficient memory or the OS may not support it. ++ This routine provides a portable interface to get that max size. ++ It is taking the simpliest solution here: default to 2GB, unless user set via ++ environment variable -- MPITEST_MAXBUFFER ++*/ ++MPI_Aint MTestDefaultMaxBufferSize() ++{ ++ MPI_Aint max_size = 2147483648; ++ char *envval = NULL; ++ envval = getenv("MPITEST_MAXBUFFER"); ++ if (envval) { ++ max_size = atol(envval); ++ if (max_size < 100000) { ++ fprintf(stderr, "MPITEST_MAXBUFFER (%s) is too small, we need at least 100MB\n", ++ envval); ++ exit(1); ++ } ++ } ++ return max_size; ++} ++ ++/* ------------------------------------------------------------------------ */ ++/* Utilities to parse command line options */ ++ ++/* Parses argument in the form of: -arg1=value1 -arg2=value2 ... ++ Arguments can be supplied in any order, but missing argument will cause error. ++*/ ++typedef struct MTestArgListEntry { ++ char *arg; ++ char *val; ++ struct MTestArgListEntry *next; ++} MTestArgListEntry; ++ ++static void MTestArgListInsert(MTestArgListEntry ** head, char *arg, char *val) ++{ ++ MTestArgListEntry *tmp = *head; ++ ++ if (!tmp) { ++ tmp = malloc(sizeof(MTestArgListEntry)); ++ tmp->arg = arg; ++ tmp->val = val; ++ tmp->next = NULL; ++ *head = tmp; ++ return; ++ } ++ ++ while (tmp->next) ++ tmp = tmp->next; ++ ++ tmp->next = malloc(sizeof(MTestArgListEntry)); ++ tmp->next->arg = arg; ++ tmp->next->val = val; ++ tmp->next->next = NULL; ++} ++ ++static char *MTestArgListSearch(MTestArgListEntry * head, const char *arg) ++{ ++ char *val = NULL; ++ ++ while (head && strcmp(head->arg, arg)) ++ head = head->next; ++ ++ if (head) ++ val = head->val; ++ ++ return val; ++} ++ ++static void MTestArgListPrintError(const char *arg) ++{ ++ fprintf(stderr, "Error: argument -%s= has not been defined!\n", arg); ++ exit(-1); ++} ++ ++void MTestArgListDestroy(MTestArgList * head) ++{ ++ MTestArgListEntry *cur = (MTestArgListEntry *) head; ++ ++ while (cur) { ++ MTestArgListEntry *prev = cur; ++ cur = cur->next; ++ free(prev->arg); ++ free(prev->val); ++ free(prev); ++ } ++} ++ ++/* ++ * following args are expected to be of the form: -arg=val ++ */ ++MTestArgList *MTestArgListCreate(int argc, char *argv[]) ++{ ++ int i; ++ char *string = NULL; ++ char *tmp = NULL; ++ char *arg = NULL; ++ char *val = NULL; ++ ++ MTestArgListEntry *head = NULL; ++ ++ for (i = 1; i < argc; i++) { ++ /* extract arg and val */ ++ string = strdup(argv[i]); ++ tmp = strtok(string, "="); ++ arg = strdup(tmp + 1); /* skip prepending '-' */ ++ tmp = strtok(NULL, "="); ++ val = strdup(tmp); ++ ++ MTestArgListInsert(&head, arg, val); ++ ++ free(string); ++ } ++ ++ return head; ++} ++ ++char *MTestArgListGetString(MTestArgList * head, const char *arg) ++{ ++ char *tmp; ++ ++ if (!(tmp = MTestArgListSearch((MTestArgListEntry *) head, arg))) ++ MTestArgListPrintError(arg); ++ ++ return tmp; ++} ++ ++int MTestArgListGetInt(MTestArgList * head, const char *arg) ++{ ++ return atoi(MTestArgListGetString(head, arg)); ++} ++ ++long MTestArgListGetLong(MTestArgList * head, const char *arg) ++{ ++ return atol(MTestArgListGetString(head, arg)); ++} ++ ++int MTestIsBasicDtype(MPI_Datatype type) ++{ ++ int numints, numaddrs, numtypes, combiner; ++ MPI_Type_get_envelope(type, &numints, &numaddrs, &numtypes, &combiner); ++ ++ int is_basic = (combiner == MPI_COMBINER_NAMED); ++ ++ return is_basic; ++} +new file mode 100644 +--- /dev/null ++++ b/test/mpi/util/mtest_cxx.cxx +@@ -0,0 +1,556 @@ ++/* -*- Mode: C++; c-basic-offset:4 ; -*- */ ++/* ++ * ++ * (C) 2001 by Argonne National Laboratory. ++ * See COPYRIGHT in top-level directory. ++ */ ++#include "mpitestcxx.h" ++ ++static int dbgflag = 0; /* Flag used for debugging */ ++static int wrank = -1; /* World rank */ ++static int verbose = 0; /* Message level (0 is none) */ ++ ++static void MTestRMACleanup(void); ++ ++/* ++ * Initialize and Finalize MTest ++ */ ++ ++/* ++ Initialize MTest, initializing MPI if necessary. ++ ++ Environment Variables: +++ MPITEST_DEBUG - If set (to any value), turns on debugging output ++- MPITEST_VERBOSE - If set to a numeric value, turns on that level of ++ verbose output. ++ ++ */ ++void MTest_Init(void) ++{ ++ bool flag; ++ const char *envval = 0; ++ int threadLevel, provided; ++ ++ threadLevel = MPI::THREAD_SINGLE; ++ envval = getenv("MTEST_THREADLEVEL_DEFAULT"); ++ if (envval && *envval) { ++ if (strcmp(envval, "MULTIPLE") == 0 || strcmp(envval, "multiple") == 0) { ++ threadLevel = MPI::THREAD_MULTIPLE; ++ } else if (strcmp(envval, "SERIALIZED") == 0 || strcmp(envval, "serialized") == 0) { ++ threadLevel = MPI::THREAD_SERIALIZED; ++ } else if (strcmp(envval, "FUNNELED") == 0 || strcmp(envval, "funneled") == 0) { ++ threadLevel = MPI::THREAD_FUNNELED; ++ } else if (strcmp(envval, "SINGLE") == 0 || strcmp(envval, "single") == 0) { ++ threadLevel = MPI::THREAD_SINGLE; ++ } else { ++ cerr << "Unrecognized thread level " << envval << "\n"; ++ cerr.flush(); ++ /* Use exit since MPI_Init/Init_thread has not been called. */ ++ exit(1); ++ } ++ } ++ ++ flag = MPI::Is_initialized(); ++ if (!flag) { ++ provided = MPI::Init_thread(threadLevel); ++ } ++#if defined(HAVE_MPI_IO) ++ MPI::FILE_NULL.Set_errhandler(MPI::ERRORS_THROW_EXCEPTIONS); ++#endif ++ ++ /* Check for debugging control */ ++ if (getenv("MPITEST_DEBUG")) { ++ dbgflag = 1; ++ wrank = MPI::COMM_WORLD.Get_rank(); ++ } ++ ++ /* Check for verbose control */ ++ envval = getenv("MPITEST_VERBOSE"); ++ if (envval) { ++ char *s; ++ long val = strtol(envval, &s, 0); ++ if (s == envval) { ++ /* This is the error case for strtol */ ++ cerr << "Warning: " << envval << " not valid for MPITEST_VERBOSE\n"; ++ cerr.flush(); ++ } else { ++ if (val >= 0) { ++ verbose = val; ++ } else { ++ cerr << "Warning: " << envval << " not valid for MPITEST_VERBOSE\n"; ++ cerr.flush(); ++ } ++ } ++ } ++} ++ ++/* ++ Finalize MTest. errs is the number of errors on the calling process; ++ this routine will write the total number of errors over all of MPI_COMM_WORLD ++ to the process with rank zero, or " No Errors". ++ */ ++void MTest_Finalize(int errs) ++{ ++ int rank, toterrs; ++ ++ rank = MPI::COMM_WORLD.Get_rank(); ++ ++ MPI::COMM_WORLD.Allreduce(&errs, &toterrs, 1, MPI::INT, MPI::SUM); ++ if (rank == 0) { ++ if (toterrs) { ++ cout << " Found " << toterrs << " errors\n"; ++ } else { ++ cout << " No Errors\n"; ++ } ++ cout.flush(); ++ } ++ // Clean up any persistent objects that we allocated ++ MTestRMACleanup(); ++ ++ MPI::Finalize(); ++} ++ ++/* ----------------------------------------------------------------------- */ ++ ++/* ++ * Create communicators. Use separate routines for inter and intra ++ * communicators (there is a routine to give both) ++ * Note that the routines may return MPI::COMM_NULL, so code should test for ++ * that return value as well. ++ * ++ */ ++static int interCommIdx = 0; ++static int intraCommIdx = 0; ++static const char *intraCommName = 0; ++static const char *interCommName = 0; ++ ++/* ++ * Get an intracommunicator with at least min_size members. If "allowSmaller" ++ * is true, allow the communicator to be smaller than MPI::COMM_WORLD and ++ * for this routine to return MPI::COMM_NULL for some values. Returns 0 if ++ * no more communicators are available. ++ */ ++int MTestGetIntracommGeneral(MPI::Intracomm & comm, int min_size, bool allowSmaller) ++{ ++ int size, rank; ++ bool done = false; ++ bool isBasic = false; ++ ++ /* The while loop allows us to skip communicators that are too small. ++ * MPI::COMM_NULL is always considered large enough */ ++ while (!done) { ++ switch (intraCommIdx) { ++ case 0: ++ comm = MPI::COMM_WORLD; ++ isBasic = true; ++ intraCommName = "MPI::COMM_WORLD"; ++ break; ++ case 1: ++ /* dup of world */ ++ comm = MPI::COMM_WORLD.Dup(); ++ intraCommName = "Dup of MPI::COMM_WORLD"; ++ break; ++ case 2: ++ /* reverse ranks */ ++ size = MPI::COMM_WORLD.Get_size(); ++ rank = MPI::COMM_WORLD.Get_rank(); ++ comm = MPI::COMM_WORLD.Split(0, size - rank); ++ intraCommName = "Rank reverse of MPI::COMM_WORLD"; ++ break; ++ case 3: ++ /* subset of world, with reversed ranks */ ++ size = MPI::COMM_WORLD.Get_size(); ++ rank = MPI::COMM_WORLD.Get_rank(); ++ comm = MPI::COMM_WORLD.Split((rank < size / 2), size - rank); ++ intraCommName = "Rank reverse of half of MPI::COMM_WORLD"; ++ break; ++ case 4: ++ comm = MPI::COMM_SELF; ++ isBasic = true; ++ intraCommName = "MPI::COMM_SELF"; ++ break; ++ ++ /* These next cases are communicators that include some ++ * but not all of the processes */ ++ case 5: ++ case 6: ++ case 7: ++ case 8: ++ { ++ int newsize; ++ size = MPI::COMM_WORLD.Get_size(); ++ newsize = size - (intraCommIdx - 4); ++ ++ if (allowSmaller && newsize >= min_size) { ++ rank = MPI::COMM_WORLD.Get_rank(); ++ comm = MPI::COMM_WORLD.Split(rank < newsize, rank); ++ if (rank >= newsize) { ++ comm.Free(); ++ comm = MPI::COMM_NULL; ++ } ++ } else { ++ /* Act like default */ ++ comm = MPI::COMM_NULL; ++ isBasic = true; ++ intraCommName = "MPI::COMM_NULL"; ++ intraCommIdx = -1; ++ } ++ } ++ break; ++ ++ /* Other ideas: dup of self, cart comm, graph comm */ ++ default: ++ comm = MPI::COMM_NULL; ++ isBasic = true; ++ intraCommName = "MPI::COMM_NULL"; ++ intraCommIdx = -1; ++ break; ++ } ++ ++ if (comm != MPI::COMM_NULL) { ++ size = comm.Get_size(); ++ if (size >= min_size) ++ done = true; ++ else { ++ /* Try again */ ++ if (!isBasic) ++ comm.Free(); ++ intraCommIdx++; ++ } ++ } else ++ done = true; ++ } ++ ++ intraCommIdx++; ++ return intraCommIdx; ++} ++ ++/* ++ * Get an intracommunicator with at least min_size members. ++ */ ++int MTestGetIntracomm(MPI::Intracomm & comm, int min_size) ++{ ++ return MTestGetIntracommGeneral(comm, min_size, false); ++} ++ ++/* Return the name of an intra communicator */ ++const char *MTestGetIntracommName(void) ++{ ++ return intraCommName; ++} ++ ++/* ++ * Return an intercomm; set isLeftGroup to 1 if the calling process is ++ * a member of the "left" group. ++ */ ++int MTestGetIntercomm(MPI::Intercomm & comm, int &isLeftGroup, int min_size) ++{ ++ int size, rank, remsize; ++ bool done = false; ++ MPI::Intracomm mcomm; ++ int rleader; ++ ++ /* The while loop allows us to skip communicators that are too small. ++ * MPI::COMM_NULL is always considered large enough. The size is ++ * the sum of the sizes of the local and remote groups */ ++ while (!done) { ++ comm = MPI::COMM_NULL; ++ isLeftGroup = 0; ++ interCommName = "MPI_COMM_NULL"; ++ ++ switch (interCommIdx) { ++ case 0: ++ /* Split comm world in half */ ++ rank = MPI::COMM_WORLD.Get_rank(); ++ size = MPI::COMM_WORLD.Get_size(); ++ if (size > 1) { ++ mcomm = MPI::COMM_WORLD.Split((rank < size / 2), rank); ++ if (rank == 0) { ++ rleader = size / 2; ++ } else if (rank == size / 2) { ++ rleader = 0; ++ } else { ++ /* Remote leader is signficant only for the processes ++ * designated local leaders */ ++ rleader = -1; ++ } ++ isLeftGroup = rank < size / 2; ++ comm = mcomm.Create_intercomm(0, MPI::COMM_WORLD, rleader, 12345); ++ mcomm.Free(); ++ interCommName = "Intercomm by splitting MPI::COMM_WORLD"; ++ } else { ++ comm = MPI::COMM_NULL; ++ } ++ break; ++ case 1: ++ /* Split comm world in to 1 and the rest */ ++ rank = MPI::COMM_WORLD.Get_rank(); ++ size = MPI::COMM_WORLD.Get_size(); ++ if (size > 1) { ++ mcomm = MPI::COMM_WORLD.Split(rank == 0, rank); ++ if (rank == 0) { ++ rleader = 1; ++ } else if (rank == 1) { ++ rleader = 0; ++ } else { ++ /* Remote leader is signficant only for the processes ++ * designated local leaders */ ++ rleader = -1; ++ } ++ isLeftGroup = rank == 0; ++ comm = mcomm.Create_intercomm(0, MPI::COMM_WORLD, rleader, 12346); ++ mcomm.Free(); ++ interCommName = "Intercomm by splitting MPI::COMM_WORLD into 1, rest"; ++ } else { ++ comm = MPI::COMM_NULL; ++ } ++ break; ++ ++ case 2: ++ /* Split comm world in to 2 and the rest */ ++ rank = MPI::COMM_WORLD.Get_rank(); ++ size = MPI::COMM_WORLD.Get_size(); ++ if (size > 3) { ++ mcomm = MPI::COMM_WORLD.Split(rank < 2, rank); ++ if (rank == 0) { ++ rleader = 2; ++ } else if (rank == 2) { ++ rleader = 0; ++ } else { ++ /* Remote leader is signficant only for the processes ++ * designated local leaders */ ++ rleader = -1; ++ } ++ isLeftGroup = rank < 2; ++ comm = mcomm.Create_intercomm(0, MPI::COMM_WORLD, rleader, 12347); ++ mcomm.Free(); ++ interCommName = "Intercomm by splitting MPI::COMM_WORLD into 2, rest"; ++ } else { ++ comm = MPI::COMM_NULL; ++ } ++ break; ++ ++ default: ++ comm = MPI::COMM_NULL; ++ interCommName = "MPI::COMM_NULL"; ++ interCommIdx = -1; ++ break; ++ } ++ if (comm != MPI::COMM_NULL) { ++ size = comm.Get_size(); ++ remsize = comm.Get_remote_size(); ++ if (size + remsize >= min_size) ++ done = true; ++ } else ++ done = true; ++ ++ /* we are only done if all processes are done */ ++ MPI::COMM_WORLD.Allreduce(MPI_IN_PLACE, &done, 1, MPI::BOOL, MPI::LAND); ++ ++ /* Advance the comm index whether we are done or not, otherwise we could ++ * spin forever trying to allocate a too-small communicator over and ++ * over again. */ ++ interCommIdx++; ++ ++ if (!done && comm != MPI::COMM_NULL) { ++ comm.Free(); ++ } ++ } ++ ++ return interCommIdx; ++} ++ ++/* Return the name of an intercommunicator */ ++const char *MTestGetIntercommName(void) ++{ ++ return interCommName; ++} ++ ++/* Get a communicator of a given minimum size. Both intra and inter ++ communicators are provided ++ Because Comm is an abstract base class, you can only have references ++ to a Comm.*/ ++int MTestGetComm(MPI::Comm ** comm, int min_size) ++{ ++ int idx; ++ static int getinter = 0; ++ ++ if (!getinter) { ++ MPI::Intracomm rcomm; ++ idx = MTestGetIntracomm(rcomm, min_size); ++ if (idx == 0) { ++ getinter = 1; ++ } else { ++ MPI::Intracomm * ncomm = new MPI::Intracomm(rcomm); ++ *comm = ncomm; ++ } ++ } ++ if (getinter) { ++ MPI::Intercomm icomm; ++ int isLeft; ++ idx = MTestGetIntercomm(icomm, isLeft, min_size); ++ if (idx == 0) { ++ getinter = 0; ++ } else { ++ MPI::Intercomm * ncomm = new MPI::Intercomm(icomm); ++ *comm = ncomm; ++ } ++ } ++ ++ return idx; ++} ++ ++/* Free a communicator. It may be called with a predefined communicator ++ or MPI_COMM_NULL */ ++void MTestFreeComm(MPI::Comm & comm) ++{ ++ if (comm != MPI::COMM_WORLD && comm != MPI::COMM_SELF && comm != MPI::COMM_NULL) { ++ comm.Free(); ++ } ++} ++ ++/* ------------------------------------------------------------------------ */ ++void MTestPrintError(int errcode) ++{ ++ int errclass, slen; ++ char string[MPI_MAX_ERROR_STRING]; ++ ++ errclass = MPI::Get_error_class(errcode); ++ MPI::Get_error_string(errcode, string, slen); ++ cout << "Error class " << errclass << "(" << string << ")\n"; ++ cout.flush(); ++} ++ ++void MTestPrintErrorMsg(const char msg[], int errcode) ++{ ++ int errclass, slen; ++ char string[MPI_MAX_ERROR_STRING]; ++ ++ errclass = MPI::Get_error_class(errcode); ++ MPI::Get_error_string(errcode, string, slen); ++ cout << msg << ": Error class " << errclass << " (" << string << ")\n"; ++ cout.flush(); ++} ++ ++/* ------------------------------------------------------------------------ */ ++/* Fatal error. Report and exit */ ++void MTestError(const char *msg) ++{ ++ cerr << msg << "\n"; ++ cerr.flush(); ++ MPI::COMM_WORLD.Abort(1); ++} ++ ++#ifdef HAVE_MPI_WIN_CREATE ++/* ++ * Create MPI Windows ++ */ ++static int win_index = 0; ++static const char *winName; ++/* Use an attribute to remember the type of memory allocation (static, ++ malloc, or MPI_Alloc_mem) */ ++static int mem_keyval = MPI::KEYVAL_INVALID; ++int MTestGetWin(MPI::Win & win, bool mustBePassive) ++{ ++ static char actbuf[1024]; ++ static char *pasbuf; ++ char *buf; ++ int n, rank; ++ MPI::Info info; ++ ++ if (mem_keyval == MPI::KEYVAL_INVALID) { ++ /* Create the keyval */ ++ mem_keyval = MPI::Win::Create_keyval(MPI::Win::NULL_COPY_FN, MPI::Win::NULL_DELETE_FN, 0); ++ } ++ ++ switch (win_index) { ++ case 0: ++ /* Active target window */ ++ win = MPI::Win::Create(actbuf, 1024, 1, MPI::INFO_NULL, MPI::COMM_WORLD); ++ winName = "active-window"; ++ win.Set_attr(mem_keyval, (void *) 0); ++ break; ++ case 1: ++ /* Passive target window */ ++ pasbuf = (char *) MPI::Alloc_mem(1024, MPI::INFO_NULL); ++ win = MPI::Win::Create(pasbuf, 1024, 1, MPI::INFO_NULL, MPI::COMM_WORLD); ++ winName = "passive-window"; ++ win.Set_attr(mem_keyval, (void *) 2); ++ break; ++ case 2: ++ /* Active target; all windows different sizes */ ++ rank = MPI::COMM_WORLD.Get_rank(); ++ n = rank * 64; ++ if (n) ++ buf = (char *) malloc(n); ++ else ++ buf = 0; ++ win = MPI::Win::Create(buf, n, 1, MPI::INFO_NULL, MPI::COMM_WORLD); ++ winName = "active-all-different-win"; ++ win.Set_attr(mem_keyval, (void *) 1); ++ break; ++ case 3: ++ /* Active target, no locks set */ ++ rank = MPI::COMM_WORLD.Get_rank(); ++ n = rank * 64; ++ if (n) ++ buf = (char *) malloc(n); ++ else ++ buf = 0; ++ info = MPI::Info::Create(); ++ info.Set("nolocks", "true"); ++ win = MPI::Win::Create(buf, n, 1, info, MPI::COMM_WORLD); ++ info.Free(); ++ winName = "active-nolocks-all-different-win"; ++ win.Set_attr(mem_keyval, (void *) 1); ++ break; ++ default: ++ win_index = -1; ++ } ++ win_index++; ++ return win_index; ++} ++ ++/* Return a pointer to the name associated with a window object */ ++const char *MTestGetWinName(void) ++{ ++ ++ return winName; ++} ++ ++/* Free the storage associated with a window object */ ++void MTestFreeWin(MPI::Win & win) ++{ ++ void *addr; ++ bool flag; ++ ++ flag = win.Get_attr(MPI_WIN_BASE, &addr); ++ if (!flag) { ++ MTestError("Could not get WIN_BASE from window"); ++ } ++ if (addr) { ++ void *val; ++ flag = win.Get_attr(mem_keyval, &val); ++ if (flag) { ++ if (val == (void *) 1) { ++ free(addr); ++ } else if (val == (void *) 2) { ++ MPI::Free_mem(addr); ++ } ++ /* if val == (void *)0, then static data that must not be freed */ ++ } ++ } ++ win.Free(); ++} ++ ++static void MTestRMACleanup(void) ++{ ++ if (mem_keyval != MPI::KEYVAL_INVALID) { ++ MPI::Win::Free_keyval(mem_keyval); ++ } ++} ++#else ++static void MTestRMACleanup(void) ++{ ++} ++#endif +deleted file mode 100644 +--- a/test/mpix/mutex/mutex_lock_unlock.c ++++ /dev/null +@@ -1,58 +0,0 @@ +-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +-/* +- * +- * (C) 2011 by Argonne National Laboratory. +- * See COPYRIGHT in top-level directory. +- */ +- +-/** MPI Mutex test -- James Dinan +- * +- * All processes create N mutexes then lock+unlock all mutexes on all +- * processes. +- */ +- +-#include +-#include +-#include +- +-#include +- +-#define NUM_MUTEXES 100 +- +-const int verbose = 0; +- +-int main(int argc, char **argv) +-{ +- int rank, nproc, i, j; +- MPIX_Mutex mtx; +- +- MPI_Init(&argc, &argv); +- +- MPI_Comm_rank(MPI_COMM_WORLD, &rank); +- MPI_Comm_size(MPI_COMM_WORLD, &nproc); +- +- if (rank == 0 && verbose) +- printf("Starting mutex test with %d processes\n", nproc); +- +- MPIX_Mutex_create(NUM_MUTEXES, MPI_COMM_WORLD, &mtx); +- +- for (i = 0; i < nproc; i++) +- for (j = 0; j < NUM_MUTEXES; j++) { +- MPIX_Mutex_lock(mtx, j, (rank + i) % nproc); +- MPIX_Mutex_unlock(mtx, j, (rank + i) % nproc); +- } +- +- if (verbose) { +- printf(" + %3d done\n", rank); +- fflush(NULL); +- } +- +- MPIX_Mutex_free(&mtx); +- +- if (rank == 0) +- printf(" No Errors\n"); +- +- MPI_Finalize(); +- +- return 0; +-} +deleted file mode 100644 +--- a/test/mpix/mutex/testlist ++++ /dev/null +@@ -1,3 +0,0 @@ +-mutex_lock_unlock 2 +-mutex_lock_unlock 4 +-mutex_lock_unlock 8 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000000..547788f66d2 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,20 @@ +MPICH for Debian +================= + +MPI Alternatives +---------------- +This package uses the Debian Alternatives system to allow you to choose +between the different MPI implementations. + +You can check which version of MPI you use with + update-alternatives --list mpirun + update-alternatives --list mpi (for the development files) + +Use 'update-alternatives --display' to list all installed implementations, +and 'update-alternatives --config' to configure which implementation to use. + + +================= +This work was heavily based on packaging work by Zach Lowry +and Muammar El Khatib . + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000000..deba5531c1e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,726 @@ +mpich (4.1~a1-2) focal; urgency=medium + + * Update version + + -- Brian J. Murrell Thu, 25 May 2023 09:15:42 -0400 + +mpich (4.0~a2-2) focal; urgency=medium + + * New upstream release + + -- Brian J. Murrell Tue, 24 Jan 2023 09:17:19 -0500 + +mpich (3.3.2-2build1) focal; urgency=medium + + * No-change rebuild for libgcc-s1 package name change. + + -- Matthias Klose Sun, 22 Mar 2020 16:50:37 +0100 + +mpich (3.3.2-2) unstable; urgency=medium + + * Force gfortran over flang compiler for this release. + * Ack. bug fixed in experimental release. Closes: #945933 + + -- Alastair McKinstry Mon, 02 Dec 2019 09:09:07 +0000 + +mpich (3.3.2-1) experimental; urgency=medium + + * New upstream release + * Drop obsolete Breaks/Replaces from d/control + * Standards-Version: 4.4.1.0 + * Fix NO_REAL128 conditional in d/rules + + -- Alastair McKinstry Sun, 01 Dec 2019 12:04:44 +0000 + +mpich (3.3.1-2) experimental; urgency=medium + + * Test fix for FTBFS on armel, armhf, + real128 not supported on these platforms. + + -- Alastair McKinstry Tue, 10 Sep 2019 16:40:34 +0100 + +mpich (3.3.1-1) unstable; urgency=medium + + * Standards-Version: 4.4.0 + * New upstream release + * Fix Vcs-* URLs. + * Use debhelper-compat (=12) + * Update patches; obsolete gcc version patches no longer needed + * Need to use chrpath on the libs. + + -- Alastair McKinstry Thu, 29 Aug 2019 15:58:59 +0100 + +mpich (3.3-3) unstable; urgency=medium + + [ Andreas Beckmann ] + * Synchronize alternatives handling with openmpi. + * Add Breaks against openmpi and lam predating mpi-$MULTIARCH alternatives. + * Apply patch from Ana Guerrero Lopez to remove obsolete GCC check. + Closes: #807666, #924837 + + -- Alastair McKinstry Mon, 18 Mar 2019 08:31:47 +0000 + +mpich (3.3-2) unstable; urgency=medium + + * Use dh_fortran_mod to install Fortran mod files in $fmoddir/mpich. + * B-D on gfortran | fortran-compiler + * Use f95, f77 aliases for Fortran compiler in d/rules + * Standards-Version: 4.3.0 + * Update alternatives handling. Closes: #896189 + + -- Alastair McKinstry Fri, 22 Feb 2019 16:45:42 +0000 + +mpich (3.3-1) unstable; urgency=medium + + * New upstream release + + -- Alastair McKinstry Sat, 24 Nov 2018 07:14:47 +0000 + +mpich (3.3~rc1-2) unstable; urgency=medium + + * Build hppa, riscv64 with built-in atomics to fix test failures + + -- Alastair McKinstry Thu, 15 Nov 2018 10:11:45 +0000 + +mpich (3.3~rc1-1) unstable; urgency=medium + + * New upstream release + * Don't ship empty directory /usr/lib/mpich in -dev package + * Add sources for vis.min.js to d/missing-sources/vis.js + + -- Alastair McKinstry Wed, 14 Nov 2018 11:57:19 +0000 + +mpich (3.3~b3-4) unstable; urgency=medium + + * Add mpich.preinst: check for a corrupt mpi alternatives file, and delete + as necessary. Closes: #912523 + + -- Alastair McKinstry Thu, 01 Nov 2018 08:55:36 +0000 + +mpich (3.3~b3-3) unstable; urgency=medium + + * Standards-Version: 4.2.1 + * Fix typo generating libmpich-dev.postinst file + * Add libmpich-dev.preinst to mirror openmpi changes for M-A + * Don't unconditionally delete mpi alternatives in libmpich-dev.prerm + * Enable set -e in mpich.postinst + * Drop hard-coded xz compression of tarball + + -- Alastair McKinstry Wed, 31 Oct 2018 12:13:23 +0000 + +mpich (3.3~b3-2) unstable; urgency=medium + + * Standards-Version: 4.2.0 + * Use dh-fortran-mod to register, track Fortran mod files + + -- Alastair McKinstry Thu, 30 Aug 2018 10:29:32 +0100 + +mpich (3.3~b3-1) experimental; urgency=medium + + * New upstream release + * Standards-Version: 4.1.5 + + -- Alastair McKinstry Wed, 11 Jul 2018 09:07:28 +0100 + +mpich (3.3~b2-7) unstable; urgency=medium + + [ Alastair McKinstry ] + * mpich.postinst: on update-alternatives, if the link is corrupt it is not + deleted. Force delete with rm /var/lib/dpkg/alternatives/mpi + + [ Anton Gladky ] + * Remove myself from uploaders + + -- Alastair McKinstry Wed, 09 May 2018 14:38:18 +0100 + +mpich (3.3~b2-6) unstable; urgency=medium + + * mpich.postinst: undo 'set -e' so update-alternatives deletes old corrupt + settings on failure. Closes: #897360 + + -- Alastair McKinstry Fri, 04 May 2018 16:27:29 +0100 + +mpich (3.3~b2-5) unstable; urgency=medium + + * Update Breaks/Replaces on mpich. Closes: #896153 + * Update mpich description for MPI-3.1. Closes: #815623 + * Fix postinst update-alternatives syntax (fails with set -e) + + -- Alastair McKinstry Tue, 24 Apr 2018 16:00:50 +0100 + +mpich (3.3~b2-4) unstable; urgency=medium + + * Fix postinst to cope with update-alternatives errors after lam4-dev + install + + -- Alastair McKinstry Sun, 22 Apr 2018 15:47:29 +0100 + +mpich (3.3~b2-3) unstable; urgency=medium + + * libmpich-dev now Depends on mpich. Closes: #896016 + * Move manpages from libmpich-dev to mpich + * Update autopkgtest: change from libpmich-dev to mpich. Closes: #896082 + + -- Alastair McKinstry Thu, 19 Apr 2018 11:37:05 +0100 + +mpich (3.3~b2-2) unstable; urgency=medium + + * Define missing PATH_MAX for Hurd builds + * Drop blcr support + * Add full multi-arch support + + -- Alastair McKinstry Wed, 18 Apr 2018 19:14:42 +0100 + +mpich (3.3~b2-1) unstable; urgency=medium + + * Standards-Version: 4.1.4 + * Drop obsolete --parallel + * Use internal hwloc for this release (2.0.0 needed; in experimental) + * Drop Breaks/Replaces on libmpich1.0; not in debian archives anymore + * Add Breaks/replaces mpich on libmpich-dev, as mpicc moved from -dev to + mpich package + + -- Alastair McKinstry Tue, 17 Apr 2018 13:03:38 +0100 + +mpich (3.3~b1-5) experimental; urgency=medium + + * Ensure M-A placeholders are properly substituted: autogenerate files + in ./rules. Closes: #891348 + + -- Alastair McKinstry Mon, 26 Feb 2018 11:16:54 +0000 + +mpich (3.3~b1-4) experimental; urgency=medium + + * New upstream release + * Drop --with autoconf from dh; obsolete + + -- Alastair McKinstry Tue, 06 Feb 2018 16:49:12 +0000 + +mpich (3.3~a3-3) unstable; urgency=medium + + * Add mpi-${lang}.pc pkgconfig files and alternatives. Closes: #860599 + * Point VCS to salsa.debian.org + + -- Alastair McKinstry Mon, 22 Jan 2018 11:32:54 +0000 + +mpich (3.3~a3-2) experimental; urgency=medium + + [ Alastair McKinstry ] + * bugfix in ./rules to select atomic_primitives on armhf + * re-enable tests for hurd in debian/rules to test + * Fix for ADIO_SFS not defined on GNU/Hurd + * Split alternatives into mpi and mpi-${DEB_HOST_MULTIARCH} parts; + to enable full multiarch of libmpich-dev later + Closes: #887614 + + -- Alastair McKinstry Fri, 19 Jan 2018 09:48:24 +0000 + +mpich (3.3~a3-1) experimental; urgency=medium + + [ Alastair McKinstry ] + * New upstream release + * Standards-Version: 4.1.3 + * Set homepage to use https://www.mpich.org + * Add mpi-fort.pc, mpi-c.pc, mpi-cxx.pc. Closes: #860599 + * Make some alternatives-tags multi-arch aware. + + -- Alastair McKinstry Wed, 17 Jan 2018 16:00:59 +0000 + +mpich (3.3~a2-4) unstable; urgency=medium + + [Alastair McKinstry] + * Undo romio change: doesn't fix hurd issues. + * Push experimental changes to unstable. Closes: #871689 + + -- Alastair McKinstry Mon, 25 Sep 2017 08:49:55 +0100 + +mpich (3.3~a2-3) experimental; urgency=medium + + [ Alastair McKinstry ] + * Standards-Version: 4.1.0; no changes required + * Set Debhelper COMPAT level 10. automake, dh-autoreconf no longer needed + * mpich-doc now marked Multi-Arch: foreign + * Set TZ=UTC+0 during build for reproducible font sorting + * Enable libfabric, ibverbs on appropriate archs + * Disable romio on hurd-i386 + * Disable builtin atomics on armhf + + -- Alastair McKinstry Sun, 24 Sep 2017 16:46:16 +0100 + +mpich (3.3~a2-2) unstable; urgency=medium + + [ Alastair McKinstry ] + * Remove gcc compiler check. Closes: #855324, #853404, #854532, #853562 + * Latest release fixes ppc64el bug. Closes: #871483 + + -- Alastair McKinstry Thu, 10 Aug 2017 09:29:30 +0100 + +mpich (3.3~a2-1) experimental; urgency=medium + + [ Alastair McKinstry ] + * [fa1de3cf] New upstream release + * [23c9187f] Standards-Version now 3.9.8 + * [82a09e4] Enable bvlcr on armhf. Closes: #685226 + * [541bb218] Use xz compression for debian pkg + * [fa9cef6a] Mark mpich-doc as M-A: foreign + + -- Alastair McKinstry Fri, 28 Jul 2017 07:33:24 +0100 + +mpich (3.2-7) unstable; urgency=medium + + * Team upload. + * [0803fb4] Drop unneeded Build-Dependency on default-jdk. + * [3174e8f] Use HTTPS in Vcs-Git. + * [21e5360] Let libmpich-dev depend on libcr-dev also on ppc64 and powerpcspe. + + -- Mattia Rizzolo Wed, 10 Aug 2016 08:49:18 +0000 + +mpich (3.2-6) unstable; urgency=medium + + [ Matthias Klose ] + * [aa5adf9] libmpich-dev: Install a /usr/lib/mpich/lib symlink. + (Closes: #811231) + + -- Anton Gladky Sun, 17 Jan 2016 13:50:55 +0100 + +mpich (3.2-5) unstable; urgency=medium + + [ Matthias Klose ] + * [0970d3b] Relax compiler check. (Closes: #811210) + + [ Anton Gladky ] + * [8504985] Move manpages into subdir. + * [e7218bb] Remove unusefull README.source + * [e668eeb] Remove old NEWS file. + + -- Anton Gladky Sat, 16 Jan 2016 22:21:15 +0100 + +mpich (3.2-4) unstable; urgency=medium + + * [769e1da] Remove old patch. Enable all tests. + + -- Anton Gladky Mon, 04 Jan 2016 22:21:11 +0100 + +mpich (3.2-3) unstable; urgency=medium + + * [a2f37f3] Recover mpif77.mpich. + + -- Anton Gladky Sat, 02 Jan 2016 14:46:11 +0100 + +mpich (3.2-2) unstable; urgency=medium + + * [9023327] Recover mpif90.mpich. (Closes: #808936) + + -- Anton Gladky Fri, 25 Dec 2015 17:22:57 +0100 + +mpich (3.2-1) unstable; urgency=medium + + * Move from experimental to unstable + + -- Anton Gladky Fri, 18 Dec 2015 21:46:54 +0100 + +mpich (3.2-1~exp2) experimental; urgency=medium + + * [f9dc45e] Fix build of indep-binaries only. (Closes: #806080) + + -- Anton Gladky Wed, 16 Dec 2015 23:34:12 +0100 + +mpich (3.2-1~exp1) experimental; urgency=medium + + [ Torquil Macdonald Sørensen ] + * New upstream release. (Closes: #807318, #807666) + * Set MPILIBNAME to keep old soname + * Drop transitional packages for MPICH2 + * Drop libmpl*/libopa* since they are now only symlinks to files in libmpich* + * Remove ARMCI section from debian/copyright since ARMCI is no longer in MPICH + * Bump standards version to 3.9.6.0 + * Remove versioned mpich2-doc from mpich-doc Conflicts + * Replace versioned libmpich2-dev Conflicts by Breaks and Replaces in package + libmpich-dev + * Remove versioned mpich2 from mpich Conflicts + * Man page updates + * Add libmpl1/libopa1 to Breaks/Replaces for libmpich12, since it replaces + those + * Include upstream manual page mpif77.1 and provide symlink for mpif90.mpich.1 + * Include hydra* manual pages + * Add parkill manual page + + [ Anton Gladky ] + * Apply cme fix dpkg-control + * Cosmetic changes + + -- Anton Gladky Tue, 15 Dec 2015 22:15:03 +0100 + +mpich (3.1-6) unstable; urgency=medium + + * Rebuild against gcc/gfortran5 for transition. Add dependency on latest + gfortran. + + -- Alastair McKinstry Mon, 10 Aug 2015 08:33:28 +0100 + +mpich (3.1-5) unstable; urgency=medium + + [ Anton Gladky ] + * Add mpi.pc alternative. (Closes: #752786) + + -- Alastair McKinstry Wed, 01 Oct 2014 14:28:24 +0100 + +mpich (3.1-4) unstable; urgency=medium + + * [c3e3398] Disable test_primitives, which is unreliable on some platforms. + (Closes: #743047) + * [265a699] Add minimal autotest. + + -- Anton Gladky Tue, 01 Apr 2014 20:24:20 +0200 + +mpich (3.1-3) unstable; urgency=medium + + * [5b62bf1] Separate mpl and opa from mpich. (Closes: #742941) + + -- Anton Gladky Sat, 29 Mar 2014 20:07:29 +0100 + +mpich (3.1-2) unstable; urgency=medium + + [ Anton Gladky ] + * [84ebc17] Update copyright-file, use DEP-5. (Closes: #742782) + * [4f1b5db] Set Standards-Version: 3.9.5. No changes. + + [ Dimitri John Ledkov ] + * [f52d751] Autoreconf all subprojects. + + -- Anton Gladky Thu, 27 Mar 2014 21:03:57 +0100 + +mpich (3.1-1) unstable; urgency=medium + + * [af581fb] Imported Upstream version 3.1 + * [0c97462] Ignore quilt dir + * [966748e] Remove old patches. + * [be2c8a6] Add build-dep libcr-dev for powerpcspe. (Closes: #731645) + * [6d41433] Update so-number. + * [a21b1a4] Disable smpd-build. + + -- Anton Gladky Sun, 16 Mar 2014 14:39:50 +0100 + +mpich (3.0.4-6) unstable; urgency=low + + [ Torquil Macdonald Sørensen ] + * [f635e5e] Removed valgrind from Build-Depends on armel architecture. + (Closes: #729140) + + [ Anton Gladky ] + * [33add7a] Add --disable-wrapper-rpath to escape RPATH-setting. + Thanks to Nicholas Breen . (Closes: #724864) + + -- Anton Gladky Sun, 24 Nov 2013 21:59:37 +0100 + +mpich (3.0.4-5) unstable; urgency=low + + * [95eabf3] Remove conflicts/replaces in libmpich10. + * [d2df217] Disable auto-test on hurd-i386. + + -- Anton Gladky Wed, 02 Oct 2013 21:37:01 +0200 + +mpich (3.0.4-4) unstable; urgency=low + + * [418fc26] Disable LL/SC ABA test, as it fails on armhf. (Closes: #722007) + + -- Anton Gladky Mon, 30 Sep 2013 22:43:50 +0200 + +mpich (3.0.4-3) unstable; urgency=low + + * [090aeef] Add Break/Replaces for libmpich1.0-dev. (Closes: #722666) + * [abf7347] Add Break/Replaces for mpich-bin. (Closes: #722667) + + -- Anton Gladky Tue, 17 Sep 2013 19:42:55 +0200 + +mpich (3.0.4-2) unstable; urgency=low + + * Rename libmpich10.symbols to libmpich10.symbols.amd64. + + -- Torquil Macdonald Sørensen Fri, 06 Sep 2013 00:35:46 +0200 + +mpich (3.0.4-1) unstable; urgency=low + + [ Lucas Nussbaum ] + * Remove myself from Uploaders. + + [ Torquil Macdonald Sørensen ] + * New upstream release. + * Rename package to mpich. + * Added dummy transitional packages for all except shared library package. + * Removed unnecessary additions to clean target in rules. + * Name change modifications to lintian-overrides, README.Debian, copyright. + * Added NEWS file. + + [ Anton Gladky ] + * Build pdf-files during the build-process. + + -- Torquil Macdonald Sørensen Thu, 15 Aug 2013 09:53:03 +0200 + +mpich2 (1.5~b1-1) unstable; urgency=low + + * New upstream (beta) release. + + -- Lucas Nussbaum Mon, 04 Jun 2012 15:26:51 +0200 + +mpich2 (1.4.1-4.2) unstable; urgency=high + + * Non-maintainer upload. + * debian/patches/fix_segfault.patch: New patch, fixes a segfault in + HYDU_get_abs_wd() if the requested executable is not available, taken from + upstream changeset 8d5444. Closes: #683226, #683217. + + -- Michael Banck Fri, 12 Apr 2013 13:46:26 +0200 + +mpich2 (1.4.1-4.1) unstable; urgency=low + + * Non-maintainer upload. + * Enable use of gcc primitives on sparc, fixing a build failure. + Closes: #660259. + + -- Steve Langasek Mon, 17 Dec 2012 01:06:08 +0000 + +mpich2 (1.4.1-4) unstable; urgency=low + + * Removed s390 from valgrind-supported arches. + * Added to clean files list. + + -- "Adam C. Powell, IV" Thu, 02 Feb 2012 13:54:30 -0500 + +mpich2 (1.4.1-3) unstable; urgency=low + + [ Adam C. Powell, IV ] + * Corrected lintian overrides for uploader name. + + [ Nobuhiro Iwamatsu ] + * Build-Depends on valgrind only on supported arches (closes: #658066). + + -- "Adam C. Powell, IV" Thu, 02 Feb 2012 11:09:04 -0500 + +mpich2 (1.4.1-2) unstable; urgency=low + + * New uploader Adam C. Powell, IV -- with lintian override regarding name. + * Link shared libraries with their dependencies (closes: #653616). + * Add valgrind to Build-Depends for PLPA. + + -- "Adam C. Powell, IV" Thu, 26 Jan 2012 15:19:17 -0500 + +mpich2 (1.4.1-1) unstable; urgency=low + + * New upstream release. + * Removed the now unneeded fix-hwloc.patch. + * Include new DESTDIR patch. Thanks Eric A. Borisch. + * Also fix paths in /etc/mpich2/*.conf and /usr/bin/mpi{cc,cxx,f77,f90}.mpich. + Also thanks Eric A. Borisch. Fixed using sed-replacements in debian/rules. + * Improve cleaning of source directory in debian/rules. + * Remove unneeded /usr/lib/libopa.la + + -- Torquil Macdonald Sørensen Fri, 26 Aug 2011 17:50:52 +0200 + +mpich2 (1.4-1) unstable; urgency=low + + * New upstream release + * Added patch fix-hwloc.patch (upstream changeset #8696) + to fix upstream issue #1507 + * Make mpif90 use gfortran instead of f95 (Closes: #630675) + + -- Torquil Macdonald Sørensen Tue, 19 Jul 2011 16:36:49 +0200 + +mpich2 (1.4~rc2-3) unstable; urgency=low + + * Add links for /usr/lib/mpich2/{include,lib}. Patch from Nicholas Breen. + Closes: #626429 + * Bump Standards-Version to 3.9.2. No changes needed. + + -- Lucas Nussbaum Fri, 20 May 2011 18:04:57 +0200 + +mpich2 (1.4~rc2-2) unstable; urgency=low + + [ Lucas Nussbaum ] + * Add Torquil Macdonald Sørensen to Uploaders. + + [ Torquil Macdonald Sørensen ] + * Don't let Debian buildflags influence runtime MPICH2 compiler flags. + Users must specify optimization and/or debug flags themselves when + using mpicc, mpicxx etc, just like for gcc, g++ etc. Closes: #624349 + + -- Torquil Macdonald Sørensen Fri, 06 May 2011 14:28:44 +0200 + +mpich2 (1.4~rc2-1) unstable; urgency=low + + * New upstream snapshot. + + -- Lucas Nussbaum Sat, 09 Apr 2011 13:39:27 +0200 + +mpich2 (1.4~rc1-2) unstable; urgency=low + + * libmipch2-3: Add Conflicts, Replaces: libmpich2-2. A better long-term + solution might be to split that binary package into 6(!) binary packages + (one of each shared lib). Closes: #620206 + + -- Lucas Nussbaum Thu, 31 Mar 2011 08:38:44 +0200 + +mpich2 (1.4~rc1-1) unstable; urgency=low + + * New upstream release. + * A rebuild probably closes: #617283. + * Add --with-hydra-ckpointlib=blcr to configure. Closes: #617879. + * Renamed libmpich2-1.2 to libmpich2-3. + + -- Lucas Nussbaum Tue, 29 Mar 2011 21:21:28 +0200 + +mpich2 (1.3.3~rc1-1) unstable; urgency=low + + * New upstream release. Closes: #576712. + * Limit libcr-dev dependency to architectures where it is actually + available. + * Switch to 3.0 (quilt). + + -- Lucas Nussbaum Wed, 02 Mar 2011 08:03:23 +0100 + +mpich2 (1.3.2p1-1) unstable; urgency=low + + * New upstream release. + + -- Lucas Nussbaum Sat, 19 Feb 2011 12:02:26 +0100 + +mpich2 (1.3.2-1) unstable; urgency=low + + * New upstream release. Closes: #612169. + * Make libmpich2-dev depend on libcr-dev. Closes: #612201. + + -- Lucas Nussbaum Tue, 08 Feb 2011 23:05:29 +0100 + +mpich2 (1.3.1-1) experimental; urgency=low + + * New upstream release. + * Remove mpd-related patches, as we don't ship mpd anymore. + + -- Lucas Nussbaum Sun, 21 Nov 2010 14:25:33 +0100 + +mpich2 (1.3.1~rc1-3) experimental; urgency=low + + * Enable checkpointing only on architectures that support it. + + -- Lucas Nussbaum Tue, 16 Nov 2010 05:28:57 -0600 + +mpich2 (1.3.1~rc1-2) experimental; urgency=low + + * Re-upload with amd64 binaries. + + -- Lucas Nussbaum Mon, 15 Nov 2010 14:07:42 -0600 + +mpich2 (1.3.1~rc1-1) experimental; urgency=low + + * New upstream version. + * Enable checkpointing. Closes: #555714 + + -- Lucas Nussbaum Mon, 15 Nov 2010 11:14:53 -0600 + +mpich2 (1.3-1) experimental; urgency=low + + * New upstream version. + + Hydra is now the default PM, replacing mpd. Closes: #577638 + + Renamed libmpich2-1.2 to libmpich2-2. + * Removed patches: + + fPIC.patch: merged upstream, somehow + + no-rpath.patch: now a configuration option + + undefined-variables-in-pc.patch: merged upstream + * Many build fixes due to the new upstream version. + * Bump standards-version to 3.9.1. No changes needed. + + -- Lucas Nussbaum Sun, 24 Oct 2010 08:10:41 +0200 + +mpich2 (1.2.1.1-5) unstable; urgency=low + + * Use /usr/bin/python instead of /usr/bin/python2.5. Allow to drop + dependency on python2.5. Closes: #595268 + * Make /usr/bin/mpdroot setuid. This is the default after the installation + of mpich2 from source, too. LP: #616929 + + Add corresponding lintian override. + + -- Lucas Nussbaum Wed, 15 Sep 2010 18:13:44 +0200 + +mpich2 (1.2.1.1-4) unstable; urgency=low + + * Fix broken symlink for mpdsigjob. It is 'job', not 'job*s*'. LP: #570254. + + -- Lucas Nussbaum Tue, 27 Apr 2010 10:34:19 +0200 + +mpich2 (1.2.1.1-3) unstable; urgency=medium + + * Add patches/hurd-no-SO_REUSEADDR.patch. Fix FTBFS on Hurd. Closes: #575963 + * Add patches/undefined-variables-in-pc.patch. Fix some undefined variables + in .pc. (LP: #566822) + + -- Lucas Nussbaum Tue, 20 Apr 2010 09:36:06 +0200 + +mpich2 (1.2.1.1-2) unstable; urgency=medium + + * Add patch no-rpath.patch: don't set rpath. Closes: #558960. + * Added slave alternatives symlinks for MPI FORTRAN libraries + (Closes: #563705). + + -- Lucas Nussbaum Fri, 19 Mar 2010 21:53:47 +0100 + +mpich2 (1.2.1.1-1) unstable; urgency=low + + * New upstream release. + * Support building on sh4. Closes: #565289. + * Fix documentation about alternatives. Closes: #568237. + * Standards-Version: 3.8.4. No changes needed. + + -- Lucas Nussbaum Wed, 24 Feb 2010 11:57:03 +0100 + +mpich2 (1.2.1-2) unstable; urgency=low + + * Remove bashism in postinst introduced in 1.2.1-1. (fixes piuparts failure) + + -- Lucas Nussbaum Sun, 29 Nov 2009 11:44:58 +0100 + +mpich2 (1.2.1-1) unstable; urgency=low + + * New upstream release. + * Fix alternatives: use the same alternatives as LAM, mpich and (from + recently) openmpi. See #522429 for discussion. + * Increase alternatives score to 40 (same as OpenMPI). + * Fix FTBFS on s390 by using -fPIC instead of -fpic. Closes: #555943. + * Remove .py binary suffix in /usr/share/mpich2/*.py. + * Run the test suite, but ignore failures for now. + + -- Lucas Nussbaum Thu, 19 Nov 2009 11:37:30 -0600 + +mpich2 (1.2.1~rc1-1) unstable; urgency=low + + * Add Conflicts with mpd (the Music Player Daemon). While this is not the + "policy-correct" solution about this problem (which would be to rename + the binaries in one or the other package), it is the solution that makes + the most sense from the user's POV. Closes: #551932. + * mpich2: Suggest mpich2-doc instead of Recommending it. This avoids some + strange behaviour when installing mpich2 with LAM installed. + Closes: #551752. + * Fix build failure on sparc: build with --with-atomic-primitives=no. + * Update fPIC.patch: also fix FTBFS on sparc. + * Add sizeofOPAptr-all.patch: fix FTBFS on powerpc. + * Run the test suite using "make testing" during build. Can be + disabled with DEB_BUILD_OPTIONS=nocheck if it takes too much time. + * New upstream release: + + Drop sizeofOPAptr-all.patch, was a backport from upstream. + + Drop fPIC.patch: fixed upstream. + + Adds manpages for mpd* + + -- Lucas Nussbaum Wed, 11 Nov 2009 13:34:22 +0100 + +mpich2 (1.2-2) unstable; urgency=low + + * Upload to unstable. (Actually, 1.2-1 was already uploaded to unstable) + * Use the quilt patch system. + * Add fPIC.patch: build with -fPIC instead of -fpic (fix FTBFS on s390). + + -- Lucas Nussbaum Mon, 19 Oct 2009 10:44:01 +0200 + +mpich2 (1.2-1) experimental; urgency=low + + * Initial packaging. Closes: #420638 + + -- Lucas Nussbaum Wed, 07 Oct 2009 23:11:42 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000000..b3bc2db9d18 --- /dev/null +++ b/debian/control @@ -0,0 +1,115 @@ +Source: mpich +Maintainer: Debian Science Maintainers +Uploaders: Torquil Macdonald Sørensen , + "Adam C. Powell, IV" , + Alastair McKinstry +Section: devel +Priority: optional +Build-Depends: debhelper-compat (= 12), + gfortran, + dh-fortran-mod (>= 0.12), + chrpath, + hwloc-nox, + libibverbs-dev (>= 1.1.7) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], + libfabric-dev [amd64 i386], + libxt-dev, + procps, + quilt, + txt2man, + valgrind [i386 amd64 powerpc armhf], + x11proto-core-dev, + libpsm-infinipath1-dev, + libpsm2-dev +Build-Depends-Indep: texlive-latex-extra, + texlive-latex-recommended, + doxygen-latex +Standards-Version: 4.4.1.0 +Vcs-Browser: https://salsa.debian.org/science-team/mpich +Vcs-Git: https://salsa.debian.org/science-team/mpich.git +Homepage: https://www.mpich.org/ + +Package: libmpich-dev +Architecture: any +Multi-Arch: same +Section: libdevel +Depends: gfortran | fortran-compiler, + g++, + libmpich12 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, + mpich (= ${binary:Version}) +Description: Development files for MPICH + MPICH is a high-performance and widely portable implementation of the + MPI-3.1 standard from the Argonne National Laboratory. + It efficiently supports different computation and communication platforms + including commodity clusters, SMPs, massively parallel systems, and + high-speed networks. + This release has all MPI 3.1 functions and features required by the standard + with the exception of support for the "external32" portable I/O format and + user-defined data representations for I/O. + . + This package includes the MPICH headers and static libraries, as well + as the compiler wrappers needed to build MPICH programs. + +Package: libmpich12 +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: Shared libraries for MPICH + MPICH is a high-performance and widely portable implementation of the + MPI-3.1 standard from the Argonne National Laboratory. + It efficiently supports different computation and communication platforms + including commodity clusters, SMPs, massively parallel systems, and + high-speed networks. + This release has all MPI 3.1 functions and features required by the standard + with the exception of support for the "external32" portable I/O format and + user-defined data representations for I/O. + . + This package includes the MPICH shared libraries. + +Package: mpich +Architecture: any +Multi-Arch: foreign +Depends: hwloc-nox | hwloc, + libmpich12 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Recommends: libmpich-dev (= ${binary:Version}) +Suggests: mpich-doc (= ${source:Version}) +Description: Implementation of the MPI Message Passing Interface standard + MPICH is a high-performance and widely portable implementation of the + MPI-3.1 standard from the Argonne National Laboratory. + It efficiently supports different computation and communication platforms + including commodity clusters, SMPs, massively parallel systems, and + high-speed networks. + This release has all MPI 3.1 functions and features required by the standard + with the exception of support for the "external32" portable I/O format and + user-defined data representations for I/O. + . + This package includes the program binaries necessary to run MPICH programs. + +Package: mpich-doc +Architecture: all +Multi-Arch: foreign +Section: doc +Depends: ${misc:Depends} +Breaks: mpich2-doc +Conflicts: lam-mpidoc, + lam4-dev, + mpi-doc, + openmpi-doc, + openmpi-mpidoc +Replaces: mpich2-doc +Description: Documentation for MPICH + MPICH is a high-performance and widely portable implementation of the + MPI-3.1 standard from the Argonne National Laboratory. + It efficiently supports different computation and communication platforms + including commodity clusters, SMPs, massively parallel systems, and + high-speed networks. + This release has all MPI 3.1 functions and features required by the standard + with the exception of support for the "external32" portable I/O format and + user-defined data representations for I/O. + . + This package includes the MPICH documentation. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000000..d6c2a290bca --- /dev/null +++ b/debian/copyright @@ -0,0 +1,621 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: MPICH +Upstream-Contact: The MPICH Team at Argonne National Laboratory +Source: http://www.mpich.org/ +Copyright: 2002 University of Chicago + +Files: * +Copyright: 2002 University of Chicago +License: other + COPYRIGHT + . + The following is a notice of limited availability of the code, and disclaimer + which must be included in the prologue of the code and in all source listings + of the code. + . + Copyright Notice + + 2002 University of Chicago + . + Permission is hereby granted to use, reproduce, prepare derivative works, and + to redistribute to others. This software was authored by: + . + Argonne National Laboratory Group + W. Gropp: (630) 252-4318; FAX: (630) 252-5986; e-mail: gropp@mcs.anl.gov + E. Lusk: (630) 252-7852; FAX: (630) 252-5986; e-mail: lusk@mcs.anl.gov + Mathematics and Computer Science Division + Argonne National Laboratory, Argonne IL 60439 + . + . + GOVERNMENT LICENSE + . + Portions of this material resulted from work developed under a U.S. + Government Contract and are subject to the following license: the Government + is granted for itself and others acting on its behalf a paid-up, nonexclusive, + irrevocable worldwide license in this computer software to reproduce, prepare + derivative works, and perform publicly and display publicly. + . + DISCLAIMER + . + This computer code material was prepared, in part, as an account of work + sponsored by an agency of the United States Government. Neither the United + States, nor the University of Chicago, nor any of their employees, makes any + warranty express or implied, or assumes any legal liability or responsibility + for the accuracy, completeness, or usefulness of any information, apparatus, + product, or process disclosed, or represents that its use would not infringe + privately owned rights. + . + Portions of this code were written by Microsoft. Those portions are + Copyright (c) 2007 Microsoft Corporation. Microsoft grants permission to + use, reproduce, prepare derivative works, and to redistribute to + others. The code is licensed "as is." The User bears the risk of using + it. Microsoft gives no express warranties, guarantees or + conditions. To the extent permitted by law, Microsoft excludes the + implied warranties of merchantability, fitness for a particular + purpose and non-infringement. + +Files: contrib/knem/* +Copyright: INRIA 2009, Brice Goglin +License: CeCILL-B + * This software is a computer program whose purpose is to provide + * a fast inter-process communication subsystem. + * + * This software is governed by the CeCILL-B license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL-B + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + . + This code is released under the CeCILL-B license, which is similar to the + BSD license. + . + <----- Start of the COPYING file in contrib/knem/ ------> + CeCILL-B FREE SOFTWARE LICENSE AGREEMENT + . + . + Notice + . + This Agreement is a Free Software license agreement that is the result + of discussions between its authors in order to ensure compliance with + the two main principles guiding its drafting: + . + * firstly, compliance with the principles governing the distribution + of Free Software: access to source code, broad rights granted to + users, + * secondly, the election of a governing law, French law, with which + it is conformant, both as regards the law of torts and + intellectual property law, and the protection that it offers to + both authors and holders of the economic rights over software. + . + The authors of the CeCILL-B (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) + license are: + . + Commissariat à l'Energie Atomique - CEA, a public scientific, technical + and industrial research establishment, having its principal place of + business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. + . + Centre National de la Recherche Scientifique - CNRS, a public scientific + and technological establishment, having its principal place of business + at 3 rue Michel-Ange, 75794 Paris cedex 16, France. + . + Institut National de Recherche en Informatique et en Automatique - + INRIA, a public scientific and technological establishment, having its + principal place of business at Domaine de Voluceau, Rocquencourt, BP + 105, 78153 Le Chesnay cedex, France. + . + . + Preamble + . + This Agreement is an open source software license intended to give users + significant freedom to modify and redistribute the software licensed + hereunder. + . + The exercising of this freedom is conditional upon a strong obligation + of giving credits for everybody that distributes a software + incorporating a software ruled by the current license so as all + contributions to be properly identified and acknowledged. + . + In consideration of access to the source code and the rights to copy, + modify and redistribute granted by the license, users are provided only + with a limited warranty and the software's author, the holder of the + economic rights, and the successive licensors only have limited liability. + . + In this respect, the risks associated with loading, using, modifying + and/or developing or reproducing the software by the user are brought to + the user's attention, given its Free Software status, which may make it + complicated to use, with the result that its use is reserved for + developers and experienced professionals having in-depth computer + knowledge. Users are therefore encouraged to load and test the + suitability of the software as regards their requirements in conditions + enabling the security of their systems and/or data to be ensured and, + more generally, to use and operate it in the same conditions of + security. This Agreement may be freely reproduced and published, + provided it is not altered, and that no provisions are either added or + removed herefrom. + . + This Agreement may apply to any or all software for which the holder of + the economic rights decides to submit the use thereof to its provisions. + . + . + Article 1 - DEFINITIONS + . + For the purpose of this Agreement, when the following expressions + commence with a capital letter, they shall have the following meaning: + . + Agreement: means this license agreement, and its possible subsequent + versions and annexes. + . + Software: means the software in its Object Code and/or Source Code form + and, where applicable, its documentation, "as is" when the Licensee + accepts the Agreement. + . + Initial Software: means the Software in its Source Code and possibly its + Object Code form and, where applicable, its documentation, "as is" when + it is first distributed under the terms and conditions of the Agreement. + . + Modified Software: means the Software modified by at least one + Contribution. + . + Source Code: means all the Software's instructions and program lines to + which access is required so as to modify the Software. + . + Object Code: means the binary files originating from the compilation of + the Source Code. + . + Holder: means the holder(s) of the economic rights over the Initial + Software. + . + Licensee: means the Software user(s) having accepted the Agreement. + . + Contributor: means a Licensee having made at least one Contribution. + . + Licensor: means the Holder, or any other individual or legal entity, who + distributes the Software under the Agreement. + . + Contribution: means any or all modifications, corrections, translations, + adaptations and/or new functions integrated into the Software by any or + all Contributors, as well as any or all Internal Modules. + . + Module: means a set of sources files including their documentation that + enables supplementary functions or services in addition to those offered + by the Software. + . + External Module: means any or all Modules, not derived from the + Software, so that this Module and the Software run in separate address + spaces, with one calling the other when they are run. + . + Internal Module: means any or all Module, connected to the Software so + that they both execute in the same address space. + . + Parties: mean both the Licensee and the Licensor. + . + These expressions may be used both in singular and plural form. + . + . + Article 2 - PURPOSE + . + The purpose of the Agreement is the grant by the Licensor to the + Licensee of a non-exclusive, transferable and worldwide license for the + Software as set forth in Article 5 hereinafter for the whole term of the + protection granted by the rights over said Software. + . + . + Article 3 - ACCEPTANCE + . + 3.1 The Licensee shall be deemed as having accepted the terms and + conditions of this Agreement upon the occurrence of the first of the + following events: + . + * (i) loading the Software by any or all means, notably, by + downloading from a remote server, or by loading from a physical + medium; + * (ii) the first time the Licensee exercises any of the rights + granted hereunder. + . + 3.2 One copy of the Agreement, containing a notice relating to the + characteristics of the Software, to the limited warranty, and to the + fact that its use is restricted to experienced users has been provided + to the Licensee prior to its acceptance as set forth in Article 3.1 + hereinabove, and the Licensee hereby acknowledges that it has read and + understood it. + . + . + Article 4 - EFFECTIVE DATE AND TERM + . + . + 4.1 EFFECTIVE DATE + . + The Agreement shall become effective on the date when it is accepted by + the Licensee as set forth in Article 3.1. + . + . + 4.2 TERM + . + The Agreement shall remain in force for the entire legal term of + protection of the economic rights over the Software. + . + . + Article 5 - SCOPE OF RIGHTS GRANTED + . + The Licensor hereby grants to the Licensee, who accepts, the following + rights over the Software for any or all use, and for the term of the + Agreement, on the basis of the terms and conditions set forth hereinafter. + . + Besides, if the Licensor owns or comes to own one or more patents + protecting all or part of the functions of the Software or of its + components, the Licensor undertakes not to enforce the rights granted by + these patents against successive Licensees using, exploiting or + modifying the Software. If these patents are transferred, the Licensor + undertakes to have the transferees subscribe to the obligations set + forth in this paragraph. + . + . + 5.1 RIGHT OF USE + . + The Licensee is authorized to use the Software, without any limitation + as to its fields of application, with it being hereinafter specified + that this comprises: + . + 1. permanent or temporary reproduction of all or part of the Software + by any or all means and in any or all form. + . + 2. loading, displaying, running, or storing the Software on any or + all medium. + . + 3. entitlement to observe, study or test its operation so as to + determine the ideas and principles behind any or all constituent + elements of said Software. This shall apply when the Licensee + carries out any or all loading, displaying, running, transmission + or storage operation as regards the Software, that it is entitled + to carry out hereunder. + . + . + 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS + . + The right to make Contributions includes the right to translate, adapt, + arrange, or make any or all modifications to the Software, and the right + to reproduce the resulting software. + . + The Licensee is authorized to make any or all Contributions to the + Software provided that it includes an explicit notice that it is the + author of said Contribution and indicates the date of the creation thereof. + . + . + 5.3 RIGHT OF DISTRIBUTION + . + In particular, the right of distribution includes the right to publish, + transmit and communicate the Software to the general public on any or + all medium, and by any or all means, and the right to market, either in + consideration of a fee, or free of charge, one or more copies of the + Software by any means. + . + The Licensee is further authorized to distribute copies of the modified + or unmodified Software to third parties according to the terms and + conditions set forth hereinafter. + . + . + 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION + . + The Licensee is authorized to distribute true copies of the Software in + Source Code or Object Code form, provided that said distribution + complies with all the provisions of the Agreement and is accompanied by: + . + 1. a copy of the Agreement, + . + 2. a notice relating to the limitation of both the Licensor's + warranty and liability as set forth in Articles 8 and 9, + . + and that, in the event that only the Object Code of the Software is + redistributed, the Licensee allows effective access to the full Source + Code of the Software at a minimum during the entire period of its + distribution of the Software, it being understood that the additional + cost of acquiring the Source Code shall not exceed the cost of + transferring the data. + . + . + 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE + . + If the Licensee makes any Contribution to the Software, the resulting + Modified Software may be distributed under a license agreement other + than this Agreement subject to compliance with the provisions of Article + 5.3.4. + . + . + 5.3.3 DISTRIBUTION OF EXTERNAL MODULES + . + When the Licensee has developed an External Module, the terms and + conditions of this Agreement do not apply to said External Module, that + may be distributed under a separate license agreement. + . + . + 5.3.4 CREDITS + . + Any Licensee who may distribute a Modified Software hereby expressly + agrees to: + . + 1. indicate in the related documentation that it is based on the + Software licensed hereunder, and reproduce the intellectual + property notice for the Software, + . + 2. ensure that written indications of the Software intended use, + intellectual property notice and license hereunder are included in + easily accessible format from the Modified Software interface, + . + 3. mention, on a freely accessible website describing the Modified + Software, at least throughout the distribution term thereof, that + it is based on the Software licensed hereunder, and reproduce the + Software intellectual property notice, + . + 4. where it is distributed to a third party that may distribute a + Modified Software without having to make its source code + available, make its best efforts to ensure that said third party + agrees to comply with the obligations set forth in this Article . + . + If the Software, whether or not modified, is distributed with an + External Module designed for use in connection with the Software, the + Licensee shall submit said External Module to the foregoing obligations. + . + . + 5.3.5 COMPATIBILITY WITH THE CeCILL AND CeCILL-C LICENSES + . + Where a Modified Software contains a Contribution subject to the CeCILL + license, the provisions set forth in Article 5.3.4 shall be optional. + . + A Modified Software may be distributed under the CeCILL-C license. In + such a case the provisions set forth in Article 5.3.4 shall be optional. + . + . + Article 6 - INTELLECTUAL PROPERTY + . + . + 6.1 OVER THE INITIAL SOFTWARE + . + The Holder owns the economic rights over the Initial Software. Any or + all use of the Initial Software is subject to compliance with the terms + and conditions under which the Holder has elected to distribute its work + and no one shall be entitled to modify the terms and conditions for the + distribution of said Initial Software. + . + The Holder undertakes that the Initial Software will remain ruled at + least by this Agreement, for the duration set forth in Article 4.2. + . + . + 6.2 OVER THE CONTRIBUTIONS + . + The Licensee who develops a Contribution is the owner of the + intellectual property rights over this Contribution as defined by + applicable law. + . + . + 6.3 OVER THE EXTERNAL MODULES + . + The Licensee who develops an External Module is the owner of the + intellectual property rights over this External Module as defined by + applicable law and is free to choose the type of agreement that shall + govern its distribution. + . + . + 6.4 JOINT PROVISIONS + . + The Licensee expressly undertakes: + . + 1. not to remove, or modify, in any manner, the intellectual property + notices attached to the Software; + . + 2. to reproduce said notices, in an identical manner, in the copies + of the Software modified or not. + . + The Licensee undertakes not to directly or indirectly infringe the + intellectual property rights of the Holder and/or Contributors on the + Software and to take, where applicable, vis-à-vis its staff, any and all + measures required to ensure respect of said intellectual property rights + of the Holder and/or Contributors. + . + . + Article 7 - RELATED SERVICES + . + 7.1 Under no circumstances shall the Agreement oblige the Licensor to + provide technical assistance or maintenance services for the Software. + . + However, the Licensor is entitled to offer this type of services. The + terms and conditions of such technical assistance, and/or such + maintenance, shall be set forth in a separate instrument. Only the + Licensor offering said maintenance and/or technical assistance services + shall incur liability therefor. + . + 7.2 Similarly, any Licensor is entitled to offer to its licensees, under + its sole responsibility, a warranty, that shall only be binding upon + itself, for the redistribution of the Software and/or the Modified + Software, under terms and conditions that it is free to decide. Said + warranty, and the financial terms and conditions of its application, + shall be subject of a separate instrument executed between the Licensor + and the Licensee. + . + . + Article 8 - LIABILITY + . + 8.1 Subject to the provisions of Article 8.2, the Licensee shall be + entitled to claim compensation for any direct loss it may have suffered + from the Software as a result of a fault on the part of the relevant + Licensor, subject to providing evidence thereof. + . + 8.2 The Licensor's liability is limited to the commitments made under + this Agreement and shall not be incurred as a result of in particular: + (i) loss due the Licensee's total or partial failure to fulfill its + obligations, (ii) direct or consequential loss that is suffered by the + Licensee due to the use or performance of the Software, and (iii) more + generally, any consequential loss. In particular the Parties expressly + agree that any or all pecuniary or business loss (i.e. loss of data, + loss of profits, operating loss, loss of customers or orders, + opportunity cost, any disturbance to business activities) or any or all + legal proceedings instituted against the Licensee by a third party, + shall constitute consequential loss and shall not provide entitlement to + any or all compensation from the Licensor. + . + . + Article 9 - WARRANTY + . + 9.1 The Licensee acknowledges that the scientific and technical + state-of-the-art when the Software was distributed did not enable all + possible uses to be tested and verified, nor for the presence of + possible defects to be detected. In this respect, the Licensee's + attention has been drawn to the risks associated with loading, using, + modifying and/or developing and reproducing the Software which are + reserved for experienced users. + . + The Licensee shall be responsible for verifying, by any or all means, + the suitability of the product for its requirements, its good working + order, and for ensuring that it shall not cause damage to either persons + or properties. + . + 9.2 The Licensor hereby represents, in good faith, that it is entitled + to grant all the rights over the Software (including in particular the + rights set forth in Article 5). + . + 9.3 The Licensee acknowledges that the Software is supplied "as is" by + the Licensor without any other express or tacit warranty, other than + that provided for in Article 9.2 and, in particular, without any warranty + as to its commercial value, its secured, safe, innovative or relevant + nature. + . + Specifically, the Licensor does not warrant that the Software is free + from any error, that it will operate without interruption, that it will + be compatible with the Licensee's own equipment and software + configuration, nor that it will meet the Licensee's requirements. + . + 9.4 The Licensor does not either expressly or tacitly warrant that the + Software does not infringe any third party intellectual property right + relating to a patent, software or any other property right. Therefore, + the Licensor disclaims any and all liability towards the Licensee + arising out of any or all proceedings for infringement that may be + instituted in respect of the use, modification and redistribution of the + Software. Nevertheless, should such proceedings be instituted against + the Licensee, the Licensor shall provide it with technical and legal + assistance for its defense. Such technical and legal assistance shall be + decided on a case-by-case basis between the relevant Licensor and the + Licensee pursuant to a memorandum of understanding. The Licensor + disclaims any and all liability as regards the Licensee's use of the + name of the Software. No warranty is given as regards the existence of + prior rights over the name of the Software or as regards the existence + of a trademark. + . + . + Article 10 - TERMINATION + . + 10.1 In the event of a breach by the Licensee of its obligations + hereunder, the Licensor may automatically terminate this Agreement + thirty (30) days after notice has been sent to the Licensee and has + remained ineffective. + . + 10.2 A Licensee whose Agreement is terminated shall no longer be + authorized to use, modify or distribute the Software. However, any + licenses that it may have granted prior to termination of the Agreement + shall remain valid subject to their having been granted in compliance + with the terms and conditions hereof. + . + . + Article 11 - MISCELLANEOUS + . + . + 11.1 EXCUSABLE EVENTS + . + Neither Party shall be liable for any or all delay, or failure to + perform the Agreement, that may be attributable to an event of force + majeure, an act of God or an outside cause, such as defective + functioning or interruptions of the electricity or telecommunications + networks, network paralysis following a virus attack, intervention by + government authorities, natural disasters, water damage, earthquakes, + fire, explosions, strikes and labor unrest, war, etc. + . + 11.2 Any failure by either Party, on one or more occasions, to invoke + one or more of the provisions hereof, shall under no circumstances be + interpreted as being a waiver by the interested Party of its right to + invoke said provision(s) subsequently. + . + 11.3 The Agreement cancels and replaces any or all previous agreements, + whether written or oral, between the Parties and having the same + purpose, and constitutes the entirety of the agreement between said + Parties concerning said purpose. No supplement or modification to the + terms and conditions hereof shall be effective as between the Parties + unless it is made in writing and signed by their duly authorized + representatives. + . + 11.4 In the event that one or more of the provisions hereof were to + conflict with a current or future applicable act or legislative text, + said act or legislative text shall prevail, and the Parties shall make + the necessary amendments so as to comply with said act or legislative + text. All other provisions shall remain effective. Similarly, invalidity + of a provision of the Agreement, for any reason whatsoever, shall not + cause the Agreement as a whole to be invalid. + . + . + 11.5 LANGUAGE + . + The Agreement is drafted in both French and English and both versions + are deemed authentic. + . + . + Article 12 - NEW VERSIONS OF THE AGREEMENT + . + 12.1 Any person is authorized to duplicate and distribute copies of this + Agreement. + . + 12.2 So as to ensure coherence, the wording of this Agreement is + protected and may only be modified by the authors of the License, who + reserve the right to periodically publish updates or new versions of the + Agreement, each with a separate number. These subsequent versions may + address new issues encountered by Free Software. + . + 12.3 Any Software distributed under a given version of the Agreement may + only be subsequently distributed under the same version of the Agreement + or a subsequent version. + . + . + Article 13 - GOVERNING LAW AND JURISDICTION + . + 13.1 The Agreement is governed by French law. The Parties agree to + endeavor to seek an amicable solution to any disagreements or disputes + that may arise during the performance of the Agreement. + . + 13.2 Failing an amicable solution within two (2) months as from their + occurrence, and unless emergency proceedings are necessary, the + disagreements or disputes shall be referred to the Paris Courts having + jurisdiction, by the more diligent Party. + . + . + Version 1.0 dated 2006-09-05. + +Files: src/pm/hydra/tools/topo/hwloc/hwloc/* +Copyright: 2009 CNRS + 2009 inria + 2009 Université Bordeaux 1 + 2009 Cisco Systems, Inc. + 2012 Blue Brain Project, EPFL. +License: BSD-3-clause + 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. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR 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. + +Files: debian/* +Copyright: 2009, Lucas Nussbaum +License: GPL-3+ + On Debian systems, the full text of the GNU General Public + License version 3 can be found in the file + `/usr/share/common-licenses/GPL-3' diff --git a/debian/libmpich-dev.fortran-mod b/debian/libmpich-dev.fortran-mod new file mode 100644 index 00000000000..62354049263 --- /dev/null +++ b/debian/libmpich-dev.fortran-mod @@ -0,0 +1 @@ +/usr/include/*/mpich/*mod mpich diff --git a/debian/libmpich-dev.install b/debian/libmpich-dev.install new file mode 100644 index 00000000000..546a5fc7e23 --- /dev/null +++ b/debian/libmpich-dev.install @@ -0,0 +1,12 @@ +usr/include/*/mpich/mpi* +usr/lib/*/libmpich.a +usr/lib/*/libmpich.so +usr/lib/*/libmpichcxx.a +usr/lib/*/libmpichcxx.so +usr/lib/*/libmpichfort.a +usr/lib/*/libmpichfort.so +usr/lib/*/libmpl.so +usr/lib/*/libopa.so +usr/lib/*/pkgconfig/mpich*.pc +# install mod files +/usr/include/*/mpich/*mod diff --git a/debian/libmpich-dev.links.in b/debian/libmpich-dev.links.in new file mode 100644 index 00000000000..b05c0f1931b --- /dev/null +++ b/debian/libmpich-dev.links.in @@ -0,0 +1,2 @@ +# Include directory +usr/include/TRIPLET/mpich usr/lib/TRIPLET/mpich/include diff --git a/debian/libmpich-dev.postinst.in b/debian/libmpich-dev.postinst.in new file mode 100644 index 00000000000..b51b233c672 --- /dev/null +++ b/debian/libmpich-dev.postinst.in @@ -0,0 +1,30 @@ +#!/bin/sh + +# This is a template file for libmpich-dev.postinst, since it will be processed +# by debian/rules. The update-alternatives command below needs the path to the +# lib*.so files, which depends on the multiarch triplet. This can be gotten +# from dpkg-architecture, but to avoid dependence on dpkg-dev, we instead +# determine it at package build-time, and include a processed version of this +# file as the libmpich-dev.postinst, where the variable TRIPLET has been replaced +# by its appropriate value, depending on the build host architecture. + +set -e + +if [ "$1" = "configure" ]; then + +update-alternatives \ + --install /usr/include/TRIPLET/mpi mpi-TRIPLET /usr/include/TRIPLET/mpich 40 \ + --slave /usr/lib/TRIPLET/libmpi.so libmpi.so-TRIPLET /usr/lib/TRIPLET/libmpich.so \ + --slave /usr/lib/TRIPLET/libmpi++.so libmpi++.so-TRIPLET /usr/lib/TRIPLET/libmpichcxx.so \ + --slave /usr/lib/TRIPLET/libmpicxx.so libmpicxx.so-TRIPLET /usr/lib/TRIPLET/libmpichcxx.so \ + --slave /usr/lib/TRIPLET/libmpifort.so libmpifort.so-TRIPLET /usr/lib/TRIPLET/libmpichfort.so \ + --slave /usr/lib/TRIPLET/libmpif77.so libmpif77.so-TRIPLET /usr/lib/TRIPLET/libmpichfort.so \ + --slave /usr/lib/TRIPLET/libmpif90.so libmpif90.so-TRIPLET /usr/lib/TRIPLET/libmpichfort.so \ + --slave /usr/lib/TRIPLET/pkgconfig/mpi.pc mpi.pc-TRIPLET /usr/lib/TRIPLET/pkgconfig/mpich.pc \ + --slave /usr/lib/TRIPLET/pkgconfig/mpi-c.pc mpi-c.pc-TRIPLET /usr/lib/TRIPLET/pkgconfig/mpich-c.pc \ + --slave /usr/lib/TRIPLET/pkgconfig/mpi-cxx.pc mpi-cxx.pc-TRIPLET /usr/lib/TRIPLET/pkgconfig/mpich-cxx.pc \ + --slave /usr/lib/TRIPLET/pkgconfig/mpi-fort.pc mpi-fort.pc-TRIPLET /usr/lib/TRIPLET/pkgconfig/mpich-fort.pc + +fi + +#DEBHELPER# diff --git a/debian/libmpich-dev.preinst.in b/debian/libmpich-dev.preinst.in new file mode 100644 index 00000000000..c0a3428f32c --- /dev/null +++ b/debian/libmpich-dev.preinst.in @@ -0,0 +1,59 @@ +#!/bin/sh + +set -e + +remove_corrupt_alternative() +{ + local alt=$1 + + if [ -f /var/lib/dpkg/alternatives/$alt ] && \ + ! update-alternatives --query $alt >/dev/null 2>&1 + then + # file exists, but query failed? likely corrupt! + echo "Removing corrupt alternative(s) '$alt'" + update-alternatives --remove-all $alt >/dev/null 2>&1 || \ + rm -fv /var/lib/dpkg/alternatives/$alt + fi +} + +remove_obsolete_alternative() +{ + local alt=$1 + + remove_corrupt_alternative $alt + + if update-alternatives --query $alt >/dev/null 2>&1 + then + echo "Removing obsolete alternative(s) '$alt'" + update-alternatives --remove-all $alt + fi +} + +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then + + if dpkg --compare-versions "$2" lt "3.3-2~" ; then + + # Recover from historically grown corruption (#912437) + remove_corrupt_alternative mpi + remove_corrupt_alternative mpi-TRIPLET + + # mpicc seemed to be used as a master alternative by some MPI package. But + # currently, all MPI packages have the mpicc alternative installed as a slave + # link. We remove the link here in order to resolve bugs #531184 and #532910. + remove_obsolete_alternative mpicc + + # Similarly, see #886644 + remove_obsolete_alternative mpiCC + + # Splitting mpi and mpi-$MULTIARCH requires this + if update-alternatives --query mpi 2>/dev/null | grep -q mpi-fort.pc ; then + echo "Removing pre-multiarch 'mpi' alternative(s)" + update-alternatives --remove-all mpi + update-alternatives --remove-all mpi-TRIPLET 2>/dev/null || true + fi + + fi + +fi + +#DEBHELPER# diff --git a/debian/libmpich-dev.prerm.in b/debian/libmpich-dev.prerm.in new file mode 100644 index 00000000000..de3c9289bcd --- /dev/null +++ b/debian/libmpich-dev.prerm.in @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +# do not touch the alternative while being deconfigured +# this is a M-A:same package which gets regularily deconfigured +# during upgrades if multiple architectures are installed +if [ "$1" = "remove" ]; then + update-alternatives --remove mpi-TRIPLET /usr/include/TRIPLET/mpich +fi + +#DEBHELPER# diff --git a/debian/libmpich10.symbols.amd64 b/debian/libmpich10.symbols.amd64 new file mode 100644 index 00000000000..9bb169cd362 --- /dev/null +++ b/debian/libmpich10.symbols.amd64 @@ -0,0 +1,7389 @@ +libfmpich.so.10 libmpich10 #MINVER# + MPIX_COMM_GROUP_FAILED@Base 3.0.4 + MPIX_COMM_REENABLE_ANYSOURCE@Base 3.0.4 + MPIX_COMM_REMOTE_GROUP_FAILED@Base 3.0.4 + MPI_ABORT@Base 3.0.4 + MPI_ACCUMULATE@Base 3.0.4 + MPI_ADDRESS@Base 3.0.4 + MPI_ADD_ERROR_CLASS@Base 3.0.4 + MPI_ADD_ERROR_CODE@Base 3.0.4 + MPI_ADD_ERROR_STRING@Base 3.0.4 + MPI_ALLGATHER@Base 3.0.4 + MPI_ALLGATHERV@Base 3.0.4 + MPI_ALLOC_MEM@Base 3.0.4 + MPI_ALLREDUCE@Base 3.0.4 + MPI_ALLTOALL@Base 3.0.4 + MPI_ALLTOALLV@Base 3.0.4 + MPI_ALLTOALLW@Base 3.0.4 + MPI_ATTR_DELETE@Base 3.0.4 + MPI_ATTR_GET@Base 3.0.4 + MPI_ATTR_PUT@Base 3.0.4 + MPI_BARRIER@Base 3.0.4 + MPI_BCAST@Base 3.0.4 + MPI_BSEND@Base 3.0.4 + MPI_BSEND_INIT@Base 3.0.4 + MPI_BUFFER_ATTACH@Base 3.0.4 + MPI_BUFFER_DETACH@Base 3.0.4 + MPI_CANCEL@Base 3.0.4 + MPI_CARTDIM_GET@Base 3.0.4 + MPI_CART_COORDS@Base 3.0.4 + MPI_CART_CREATE@Base 3.0.4 + MPI_CART_GET@Base 3.0.4 + MPI_CART_MAP@Base 3.0.4 + MPI_CART_RANK@Base 3.0.4 + MPI_CART_SHIFT@Base 3.0.4 + MPI_CART_SUB@Base 3.0.4 + MPI_CLOSE_PORT@Base 3.0.4 + MPI_COMM_ACCEPT@Base 3.0.4 + MPI_COMM_CALL_ERRHANDLER@Base 3.0.4 + MPI_COMM_COMPARE@Base 3.0.4 + MPI_COMM_CONNECT@Base 3.0.4 + MPI_COMM_CREATE@Base 3.0.4 + MPI_COMM_CREATE_ERRHANDLER@Base 3.0.4 + MPI_COMM_CREATE_GROUP@Base 3.0.4 + MPI_COMM_CREATE_KEYVAL@Base 3.0.4 + MPI_COMM_DELETE_ATTR@Base 3.0.4 + MPI_COMM_DISCONNECT@Base 3.0.4 + MPI_COMM_DUP@Base 3.0.4 + MPI_COMM_DUP_FN@Base 3.0.4 + MPI_COMM_DUP_WITH_INFO@Base 3.0.4 + MPI_COMM_FREE@Base 3.0.4 + MPI_COMM_FREE_KEYVAL@Base 3.0.4 + MPI_COMM_GET_ATTR@Base 3.0.4 + MPI_COMM_GET_ERRHANDLER@Base 3.0.4 + MPI_COMM_GET_INFO@Base 3.0.4 + MPI_COMM_GET_NAME@Base 3.0.4 + MPI_COMM_GET_PARENT@Base 3.0.4 + MPI_COMM_GROUP@Base 3.0.4 + MPI_COMM_IDUP@Base 3.0.4 + MPI_COMM_JOIN@Base 3.0.4 + MPI_COMM_NULL_COPY_FN@Base 3.0.4 + MPI_COMM_NULL_DELETE_FN@Base 3.0.4 + MPI_COMM_RANK@Base 3.0.4 + MPI_COMM_REMOTE_GROUP@Base 3.0.4 + MPI_COMM_REMOTE_SIZE@Base 3.0.4 + MPI_COMM_SET_ATTR@Base 3.0.4 + MPI_COMM_SET_ERRHANDLER@Base 3.0.4 + MPI_COMM_SET_INFO@Base 3.0.4 + MPI_COMM_SET_NAME@Base 3.0.4 + MPI_COMM_SIZE@Base 3.0.4 + MPI_COMM_SPAWN@Base 3.0.4 + MPI_COMM_SPAWN_MULTIPLE@Base 3.0.4 + MPI_COMM_SPLIT@Base 3.0.4 + MPI_COMM_SPLIT_TYPE@Base 3.0.4 + MPI_COMM_TEST_INTER@Base 3.0.4 + MPI_COMPARE_AND_SWAP@Base 3.0.4 + MPI_DIMS_CREATE@Base 3.0.4 + MPI_DIST_GRAPH_CREATE@Base 3.0.4 + MPI_DIST_GRAPH_CREATE_ADJACENT@Base 3.0.4 + MPI_DIST_GRAPH_NEIGHBORS@Base 3.0.4 + MPI_DIST_GRAPH_NEIGHBORS_COUNT@Base 3.0.4 + MPI_DUP_FN@Base 3.0.4 + MPI_ERRHANDLER_CREATE@Base 3.0.4 + MPI_ERRHANDLER_FREE@Base 3.0.4 + MPI_ERRHANDLER_GET@Base 3.0.4 + MPI_ERRHANDLER_SET@Base 3.0.4 + MPI_ERROR_CLASS@Base 3.0.4 + MPI_ERROR_STRING@Base 3.0.4 + MPI_EXSCAN@Base 3.0.4 + MPI_FETCH_AND_OP@Base 3.0.4 + MPI_FILE_CALL_ERRHANDLER@Base 3.0.4 + MPI_FILE_CLOSE@Base 3.0.4 + MPI_FILE_CREATE_ERRHANDLER@Base 3.0.4 + MPI_FILE_DELETE@Base 3.0.4 + MPI_FILE_GET_AMODE@Base 3.0.4 + MPI_FILE_GET_ATOMICITY@Base 3.0.4 + MPI_FILE_GET_BYTE_OFFSET@Base 3.0.4 + MPI_FILE_GET_ERRHANDLER@Base 3.0.4 + MPI_FILE_GET_GROUP@Base 3.0.4 + MPI_FILE_GET_INFO@Base 3.0.4 + MPI_FILE_GET_POSITION@Base 3.0.4 + MPI_FILE_GET_POSITION_SHARED@Base 3.0.4 + MPI_FILE_GET_SIZE@Base 3.0.4 + MPI_FILE_GET_TYPE_EXTENT@Base 3.0.4 + MPI_FILE_GET_VIEW@Base 3.0.4 + MPI_FILE_IREAD@Base 3.0.4 + MPI_FILE_IREAD_AT@Base 3.0.4 + MPI_FILE_IREAD_SHARED@Base 3.0.4 + MPI_FILE_IWRITE@Base 3.0.4 + MPI_FILE_IWRITE_AT@Base 3.0.4 + MPI_FILE_IWRITE_SHARED@Base 3.0.4 + MPI_FILE_OPEN@Base 3.0.4 + MPI_FILE_PREALLOCATE@Base 3.0.4 + MPI_FILE_READ@Base 3.0.4 + MPI_FILE_READ_ALL@Base 3.0.4 + MPI_FILE_READ_ALL_BEGIN@Base 3.0.4 + MPI_FILE_READ_ALL_END@Base 3.0.4 + MPI_FILE_READ_AT@Base 3.0.4 + MPI_FILE_READ_AT_ALL@Base 3.0.4 + MPI_FILE_READ_AT_ALL_BEGIN@Base 3.0.4 + MPI_FILE_READ_AT_ALL_END@Base 3.0.4 + MPI_FILE_READ_ORDERED@Base 3.0.4 + MPI_FILE_READ_ORDERED_BEGIN@Base 3.0.4 + MPI_FILE_READ_ORDERED_END@Base 3.0.4 + MPI_FILE_READ_SHARED@Base 3.0.4 + MPI_FILE_SEEK@Base 3.0.4 + MPI_FILE_SEEK_SHARED@Base 3.0.4 + MPI_FILE_SET_ATOMICITY@Base 3.0.4 + MPI_FILE_SET_ERRHANDLER@Base 3.0.4 + MPI_FILE_SET_INFO@Base 3.0.4 + MPI_FILE_SET_SIZE@Base 3.0.4 + MPI_FILE_SET_VIEW@Base 3.0.4 + MPI_FILE_SYNC@Base 3.0.4 + MPI_FILE_WRITE@Base 3.0.4 + MPI_FILE_WRITE_ALL@Base 3.0.4 + MPI_FILE_WRITE_ALL_BEGIN@Base 3.0.4 + MPI_FILE_WRITE_ALL_END@Base 3.0.4 + MPI_FILE_WRITE_AT@Base 3.0.4 + MPI_FILE_WRITE_AT_ALL@Base 3.0.4 + MPI_FILE_WRITE_AT_ALL_BEGIN@Base 3.0.4 + MPI_FILE_WRITE_AT_ALL_END@Base 3.0.4 + MPI_FILE_WRITE_ORDERED@Base 3.0.4 + MPI_FILE_WRITE_ORDERED_BEGIN@Base 3.0.4 + MPI_FILE_WRITE_ORDERED_END@Base 3.0.4 + MPI_FILE_WRITE_SHARED@Base 3.0.4 + MPI_FINALIZE@Base 3.0.4 + MPI_FINALIZED@Base 3.0.4 + MPI_FREE_MEM@Base 3.0.4 + MPI_GATHER@Base 3.0.4 + MPI_GATHERV@Base 3.0.4 + MPI_GET@Base 3.0.4 + MPI_GET_ACCUMULATE@Base 3.0.4 + MPI_GET_ADDRESS@Base 3.0.4 + MPI_GET_COUNT@Base 3.0.4 + MPI_GET_ELEMENTS@Base 3.0.4 + MPI_GET_ELEMENTS_X@Base 3.0.4 + MPI_GET_LIBRARY_VERSION@Base 3.0.4 + MPI_GET_PROCESSOR_NAME@Base 3.0.4 + MPI_GET_VERSION@Base 3.0.4 + MPI_GRAPHDIMS_GET@Base 3.0.4 + MPI_GRAPH_CREATE@Base 3.0.4 + MPI_GRAPH_GET@Base 3.0.4 + MPI_GRAPH_MAP@Base 3.0.4 + MPI_GRAPH_NEIGHBORS@Base 3.0.4 + MPI_GRAPH_NEIGHBORS_COUNT@Base 3.0.4 + MPI_GREQUEST_COMPLETE@Base 3.0.4 + MPI_GREQUEST_START@Base 3.0.4 + MPI_GROUP_COMPARE@Base 3.0.4 + MPI_GROUP_DIFFERENCE@Base 3.0.4 + MPI_GROUP_EXCL@Base 3.0.4 + MPI_GROUP_FREE@Base 3.0.4 + MPI_GROUP_INCL@Base 3.0.4 + MPI_GROUP_INTERSECTION@Base 3.0.4 + MPI_GROUP_RANGE_EXCL@Base 3.0.4 + MPI_GROUP_RANGE_INCL@Base 3.0.4 + MPI_GROUP_RANK@Base 3.0.4 + MPI_GROUP_SIZE@Base 3.0.4 + MPI_GROUP_TRANSLATE_RANKS@Base 3.0.4 + MPI_GROUP_UNION@Base 3.0.4 + MPI_IALLGATHER@Base 3.0.4 + MPI_IALLGATHERV@Base 3.0.4 + MPI_IALLREDUCE@Base 3.0.4 + MPI_IALLTOALL@Base 3.0.4 + MPI_IALLTOALLV@Base 3.0.4 + MPI_IALLTOALLW@Base 3.0.4 + MPI_IBARRIER@Base 3.0.4 + MPI_IBCAST@Base 3.0.4 + MPI_IBSEND@Base 3.0.4 + MPI_IEXSCAN@Base 3.0.4 + MPI_IGATHER@Base 3.0.4 + MPI_IGATHERV@Base 3.0.4 + MPI_IMPROBE@Base 3.0.4 + MPI_IMRECV@Base 3.0.4 + MPI_INEIGHBOR_ALLGATHER@Base 3.0.4 + MPI_INEIGHBOR_ALLGATHERV@Base 3.0.4 + MPI_INEIGHBOR_ALLTOALL@Base 3.0.4 + MPI_INEIGHBOR_ALLTOALLV@Base 3.0.4 + MPI_INEIGHBOR_ALLTOALLW@Base 3.0.4 + MPI_INFO_CREATE@Base 3.0.4 + MPI_INFO_DELETE@Base 3.0.4 + MPI_INFO_DUP@Base 3.0.4 + MPI_INFO_FREE@Base 3.0.4 + MPI_INFO_GET@Base 3.0.4 + MPI_INFO_GET_NKEYS@Base 3.0.4 + MPI_INFO_GET_NTHKEY@Base 3.0.4 + MPI_INFO_GET_VALUELEN@Base 3.0.4 + MPI_INFO_SET@Base 3.0.4 + MPI_INIT@Base 3.0.4 + MPI_INITIALIZED@Base 3.0.4 + MPI_INIT_THREAD@Base 3.0.4 + MPI_INTERCOMM_CREATE@Base 3.0.4 + MPI_INTERCOMM_MERGE@Base 3.0.4 + MPI_IPROBE@Base 3.0.4 + MPI_IRECV@Base 3.0.4 + MPI_IREDUCE@Base 3.0.4 + MPI_IREDUCE_SCATTER@Base 3.0.4 + MPI_IREDUCE_SCATTER_BLOCK@Base 3.0.4 + MPI_IRSEND@Base 3.0.4 + MPI_ISCAN@Base 3.0.4 + MPI_ISCATTER@Base 3.0.4 + MPI_ISCATTERV@Base 3.0.4 + MPI_ISEND@Base 3.0.4 + MPI_ISSEND@Base 3.0.4 + MPI_IS_THREAD_MAIN@Base 3.0.4 + MPI_KEYVAL_CREATE@Base 3.0.4 + MPI_KEYVAL_FREE@Base 3.0.4 + MPI_LOOKUP_NAME@Base 3.0.4 + MPI_MPROBE@Base 3.0.4 + MPI_MRECV@Base 3.0.4 + MPI_NEIGHBOR_ALLGATHER@Base 3.0.4 + MPI_NEIGHBOR_ALLGATHERV@Base 3.0.4 + MPI_NEIGHBOR_ALLTOALL@Base 3.0.4 + MPI_NEIGHBOR_ALLTOALLV@Base 3.0.4 + MPI_NEIGHBOR_ALLTOALLW@Base 3.0.4 + MPI_NULL_COPY_FN@Base 3.0.4 + MPI_NULL_DELETE_FN@Base 3.0.4 + MPI_OPEN_PORT@Base 3.0.4 + MPI_OP_COMMUTATIVE@Base 3.0.4 + MPI_OP_CREATE@Base 3.0.4 + MPI_OP_FREE@Base 3.0.4 + MPI_PACK@Base 3.0.4 + MPI_PACK_EXTERNAL@Base 3.0.4 + MPI_PACK_EXTERNAL_SIZE@Base 3.0.4 + MPI_PACK_SIZE@Base 3.0.4 + MPI_PCONTROL@Base 3.0.4 + MPI_PROBE@Base 3.0.4 + MPI_PUBLISH_NAME@Base 3.0.4 + MPI_PUT@Base 3.0.4 + MPI_QUERY_THREAD@Base 3.0.4 + MPI_RACCUMULATE@Base 3.0.4 + MPI_RECV@Base 3.0.4 + MPI_RECV_INIT@Base 3.0.4 + MPI_REDUCE@Base 3.0.4 + MPI_REDUCE_LOCAL@Base 3.0.4 + MPI_REDUCE_SCATTER@Base 3.0.4 + MPI_REDUCE_SCATTER_BLOCK@Base 3.0.4 + MPI_REGISTER_DATAREP@Base 3.0.4 + MPI_REQUEST_FREE@Base 3.0.4 + MPI_REQUEST_GET_STATUS@Base 3.0.4 + MPI_RGET@Base 3.0.4 + MPI_RGET_ACCUMULATE@Base 3.0.4 + MPI_RPUT@Base 3.0.4 + MPI_RSEND@Base 3.0.4 + MPI_RSEND_INIT@Base 3.0.4 + MPI_SCAN@Base 3.0.4 + MPI_SCATTER@Base 3.0.4 + MPI_SCATTERV@Base 3.0.4 + MPI_SEND@Base 3.0.4 + MPI_SENDRECV@Base 3.0.4 + MPI_SENDRECV_REPLACE@Base 3.0.4 + MPI_SEND_INIT@Base 3.0.4 + MPI_SSEND@Base 3.0.4 + MPI_SSEND_INIT@Base 3.0.4 + MPI_START@Base 3.0.4 + MPI_STARTALL@Base 3.0.4 + MPI_STATUS_SET_CANCELLED@Base 3.0.4 + MPI_STATUS_SET_ELEMENTS@Base 3.0.4 + MPI_STATUS_SET_ELEMENTS_X@Base 3.0.4 + MPI_Status_c2f@Base 3.0.4 + MPI_Status_f2c@Base 3.0.4 + MPI_TEST@Base 3.0.4 + MPI_TESTALL@Base 3.0.4 + MPI_TESTANY@Base 3.0.4 + MPI_TESTSOME@Base 3.0.4 + MPI_TEST_CANCELLED@Base 3.0.4 + MPI_TOPO_TEST@Base 3.0.4 + MPI_TYPE_COMMIT@Base 3.0.4 + MPI_TYPE_CONTIGUOUS@Base 3.0.4 + MPI_TYPE_CREATE_DARRAY@Base 3.0.4 + MPI_TYPE_CREATE_HINDEXED@Base 3.0.4 + MPI_TYPE_CREATE_HINDEXED_BLOCK@Base 3.0.4 + MPI_TYPE_CREATE_HVECTOR@Base 3.0.4 + MPI_TYPE_CREATE_INDEXED_BLOCK@Base 3.0.4 + MPI_TYPE_CREATE_KEYVAL@Base 3.0.4 + MPI_TYPE_CREATE_RESIZED@Base 3.0.4 + MPI_TYPE_CREATE_STRUCT@Base 3.0.4 + MPI_TYPE_CREATE_SUBARRAY@Base 3.0.4 + MPI_TYPE_DELETE_ATTR@Base 3.0.4 + MPI_TYPE_DUP@Base 3.0.4 + MPI_TYPE_DUP_FN@Base 3.0.4 + MPI_TYPE_EXTENT@Base 3.0.4 + MPI_TYPE_FREE@Base 3.0.4 + MPI_TYPE_FREE_KEYVAL@Base 3.0.4 + MPI_TYPE_GET_ATTR@Base 3.0.4 + MPI_TYPE_GET_CONTENTS@Base 3.0.4 + MPI_TYPE_GET_ENVELOPE@Base 3.0.4 + MPI_TYPE_GET_EXTENT@Base 3.0.4 + MPI_TYPE_GET_EXTENT_X@Base 3.0.4 + MPI_TYPE_GET_NAME@Base 3.0.4 + MPI_TYPE_GET_TRUE_EXTENT@Base 3.0.4 + MPI_TYPE_GET_TRUE_EXTENT_X@Base 3.0.4 + MPI_TYPE_HINDEXED@Base 3.0.4 + MPI_TYPE_HVECTOR@Base 3.0.4 + MPI_TYPE_INDEXED@Base 3.0.4 + MPI_TYPE_LB@Base 3.0.4 + MPI_TYPE_MATCH_SIZE@Base 3.0.4 + MPI_TYPE_NULL_COPY_FN@Base 3.0.4 + MPI_TYPE_NULL_DELETE_FN@Base 3.0.4 + MPI_TYPE_SET_ATTR@Base 3.0.4 + MPI_TYPE_SET_NAME@Base 3.0.4 + MPI_TYPE_SIZE@Base 3.0.4 + MPI_TYPE_SIZE_X@Base 3.0.4 + MPI_TYPE_STRUCT@Base 3.0.4 + MPI_TYPE_UB@Base 3.0.4 + MPI_TYPE_VECTOR@Base 3.0.4 + MPI_UNPACK@Base 3.0.4 + MPI_UNPACK_EXTERNAL@Base 3.0.4 + MPI_UNPUBLISH_NAME@Base 3.0.4 + MPI_WAIT@Base 3.0.4 + MPI_WAITALL@Base 3.0.4 + MPI_WAITANY@Base 3.0.4 + MPI_WAITSOME@Base 3.0.4 + MPI_WIN_ALLOCATE@Base 3.0.4 + MPI_WIN_ALLOCATE_SHARED@Base 3.0.4 + MPI_WIN_ATTACH@Base 3.0.4 + MPI_WIN_CALL_ERRHANDLER@Base 3.0.4 + MPI_WIN_COMPLETE@Base 3.0.4 + MPI_WIN_CREATE@Base 3.0.4 + MPI_WIN_CREATE_DYNAMIC@Base 3.0.4 + MPI_WIN_CREATE_ERRHANDLER@Base 3.0.4 + MPI_WIN_CREATE_KEYVAL@Base 3.0.4 + MPI_WIN_DELETE_ATTR@Base 3.0.4 + MPI_WIN_DETACH@Base 3.0.4 + MPI_WIN_DUP_FN@Base 3.0.4 + MPI_WIN_FENCE@Base 3.0.4 + MPI_WIN_FLUSH@Base 3.0.4 + MPI_WIN_FLUSH_ALL@Base 3.0.4 + MPI_WIN_FLUSH_LOCAL@Base 3.0.4 + MPI_WIN_FLUSH_LOCAL_ALL@Base 3.0.4 + MPI_WIN_FREE@Base 3.0.4 + MPI_WIN_FREE_KEYVAL@Base 3.0.4 + MPI_WIN_GET_ATTR@Base 3.0.4 + MPI_WIN_GET_ERRHANDLER@Base 3.0.4 + MPI_WIN_GET_GROUP@Base 3.0.4 + MPI_WIN_GET_INFO@Base 3.0.4 + MPI_WIN_GET_NAME@Base 3.0.4 + MPI_WIN_LOCK@Base 3.0.4 + MPI_WIN_LOCK_ALL@Base 3.0.4 + MPI_WIN_NULL_COPY_FN@Base 3.0.4 + MPI_WIN_NULL_DELETE_FN@Base 3.0.4 + MPI_WIN_POST@Base 3.0.4 + MPI_WIN_SET_ATTR@Base 3.0.4 + MPI_WIN_SET_ERRHANDLER@Base 3.0.4 + MPI_WIN_SET_INFO@Base 3.0.4 + MPI_WIN_SET_NAME@Base 3.0.4 + MPI_WIN_SHARED_QUERY@Base 3.0.4 + MPI_WIN_START@Base 3.0.4 + MPI_WIN_SYNC@Base 3.0.4 + MPI_WIN_TEST@Base 3.0.4 + MPI_WIN_UNLOCK@Base 3.0.4 + MPI_WIN_UNLOCK_ALL@Base 3.0.4 + MPI_WIN_WAIT@Base 3.0.4 + MPI_WTICK@Base 3.0.4 + MPI_WTIME@Base 3.0.4 + mpi_abort@Base 3.0.4 + mpi_abort_@Base 3.0.4 + mpi_abort__@Base 3.0.4 + mpi_accumulate@Base 3.0.4 + mpi_accumulate_@Base 3.0.4 + mpi_accumulate__@Base 3.0.4 + mpi_add_error_class@Base 3.0.4 + mpi_add_error_class_@Base 3.0.4 + mpi_add_error_class__@Base 3.0.4 + mpi_add_error_code@Base 3.0.4 + mpi_add_error_code_@Base 3.0.4 + mpi_add_error_code__@Base 3.0.4 + mpi_add_error_string@Base 3.0.4 + mpi_add_error_string_@Base 3.0.4 + mpi_add_error_string__@Base 3.0.4 + mpi_address@Base 3.0.4 + mpi_address_@Base 3.0.4 + mpi_address__@Base 3.0.4 + mpi_allgather@Base 3.0.4 + mpi_allgather_@Base 3.0.4 + mpi_allgather__@Base 3.0.4 + mpi_allgatherv@Base 3.0.4 + mpi_allgatherv_@Base 3.0.4 + mpi_allgatherv__@Base 3.0.4 + mpi_alloc_mem@Base 3.0.4 + mpi_alloc_mem_@Base 3.0.4 + mpi_alloc_mem__@Base 3.0.4 + mpi_allreduce@Base 3.0.4 + mpi_allreduce_@Base 3.0.4 + mpi_allreduce__@Base 3.0.4 + mpi_alltoall@Base 3.0.4 + mpi_alltoall_@Base 3.0.4 + mpi_alltoall__@Base 3.0.4 + mpi_alltoallv@Base 3.0.4 + mpi_alltoallv_@Base 3.0.4 + mpi_alltoallv__@Base 3.0.4 + mpi_alltoallw@Base 3.0.4 + mpi_alltoallw_@Base 3.0.4 + mpi_alltoallw__@Base 3.0.4 + mpi_attr_delete@Base 3.0.4 + mpi_attr_delete_@Base 3.0.4 + mpi_attr_delete__@Base 3.0.4 + mpi_attr_get@Base 3.0.4 + mpi_attr_get_@Base 3.0.4 + mpi_attr_get__@Base 3.0.4 + mpi_attr_put@Base 3.0.4 + mpi_attr_put_@Base 3.0.4 + mpi_attr_put__@Base 3.0.4 + mpi_barrier@Base 3.0.4 + mpi_barrier_@Base 3.0.4 + mpi_barrier__@Base 3.0.4 + mpi_bcast@Base 3.0.4 + mpi_bcast_@Base 3.0.4 + mpi_bcast__@Base 3.0.4 + mpi_bsend@Base 3.0.4 + mpi_bsend_@Base 3.0.4 + mpi_bsend__@Base 3.0.4 + mpi_bsend_init@Base 3.0.4 + mpi_bsend_init_@Base 3.0.4 + mpi_bsend_init__@Base 3.0.4 + mpi_buffer_attach@Base 3.0.4 + mpi_buffer_attach_@Base 3.0.4 + mpi_buffer_attach__@Base 3.0.4 + mpi_buffer_detach@Base 3.0.4 + mpi_buffer_detach_@Base 3.0.4 + mpi_buffer_detach__@Base 3.0.4 + mpi_cancel@Base 3.0.4 + mpi_cancel_@Base 3.0.4 + mpi_cancel__@Base 3.0.4 + mpi_cart_coords@Base 3.0.4 + mpi_cart_coords_@Base 3.0.4 + mpi_cart_coords__@Base 3.0.4 + mpi_cart_create@Base 3.0.4 + mpi_cart_create_@Base 3.0.4 + mpi_cart_create__@Base 3.0.4 + mpi_cart_get@Base 3.0.4 + mpi_cart_get_@Base 3.0.4 + mpi_cart_get__@Base 3.0.4 + mpi_cart_map@Base 3.0.4 + mpi_cart_map_@Base 3.0.4 + mpi_cart_map__@Base 3.0.4 + mpi_cart_rank@Base 3.0.4 + mpi_cart_rank_@Base 3.0.4 + mpi_cart_rank__@Base 3.0.4 + mpi_cart_shift@Base 3.0.4 + mpi_cart_shift_@Base 3.0.4 + mpi_cart_shift__@Base 3.0.4 + mpi_cart_sub@Base 3.0.4 + mpi_cart_sub_@Base 3.0.4 + mpi_cart_sub__@Base 3.0.4 + mpi_cartdim_get@Base 3.0.4 + mpi_cartdim_get_@Base 3.0.4 + mpi_cartdim_get__@Base 3.0.4 + mpi_close_port@Base 3.0.4 + mpi_close_port_@Base 3.0.4 + mpi_close_port__@Base 3.0.4 + mpi_comm_accept@Base 3.0.4 + mpi_comm_accept_@Base 3.0.4 + mpi_comm_accept__@Base 3.0.4 + mpi_comm_call_errhandler@Base 3.0.4 + mpi_comm_call_errhandler_@Base 3.0.4 + mpi_comm_call_errhandler__@Base 3.0.4 + mpi_comm_compare@Base 3.0.4 + mpi_comm_compare_@Base 3.0.4 + mpi_comm_compare__@Base 3.0.4 + mpi_comm_connect@Base 3.0.4 + mpi_comm_connect_@Base 3.0.4 + mpi_comm_connect__@Base 3.0.4 + mpi_comm_create@Base 3.0.4 + mpi_comm_create_@Base 3.0.4 + mpi_comm_create__@Base 3.0.4 + mpi_comm_create_errhandler@Base 3.0.4 + mpi_comm_create_errhandler_@Base 3.0.4 + mpi_comm_create_errhandler__@Base 3.0.4 + mpi_comm_create_group@Base 3.0.4 + mpi_comm_create_group_@Base 3.0.4 + mpi_comm_create_group__@Base 3.0.4 + mpi_comm_create_keyval@Base 3.0.4 + mpi_comm_create_keyval_@Base 3.0.4 + mpi_comm_create_keyval__@Base 3.0.4 + mpi_comm_delete_attr@Base 3.0.4 + mpi_comm_delete_attr_@Base 3.0.4 + mpi_comm_delete_attr__@Base 3.0.4 + mpi_comm_disconnect@Base 3.0.4 + mpi_comm_disconnect_@Base 3.0.4 + mpi_comm_disconnect__@Base 3.0.4 + mpi_comm_dup@Base 3.0.4 + mpi_comm_dup_@Base 3.0.4 + mpi_comm_dup__@Base 3.0.4 + mpi_comm_dup_fn@Base 3.0.4 + mpi_comm_dup_fn_@Base 3.0.4 + mpi_comm_dup_fn__@Base 3.0.4 + mpi_comm_dup_with_info@Base 3.0.4 + mpi_comm_dup_with_info_@Base 3.0.4 + mpi_comm_dup_with_info__@Base 3.0.4 + mpi_comm_free@Base 3.0.4 + mpi_comm_free_@Base 3.0.4 + mpi_comm_free__@Base 3.0.4 + mpi_comm_free_keyval@Base 3.0.4 + mpi_comm_free_keyval_@Base 3.0.4 + mpi_comm_free_keyval__@Base 3.0.4 + mpi_comm_get_attr@Base 3.0.4 + mpi_comm_get_attr_@Base 3.0.4 + mpi_comm_get_attr__@Base 3.0.4 + mpi_comm_get_errhandler@Base 3.0.4 + mpi_comm_get_errhandler_@Base 3.0.4 + mpi_comm_get_errhandler__@Base 3.0.4 + mpi_comm_get_info@Base 3.0.4 + mpi_comm_get_info_@Base 3.0.4 + mpi_comm_get_info__@Base 3.0.4 + mpi_comm_get_name@Base 3.0.4 + mpi_comm_get_name_@Base 3.0.4 + mpi_comm_get_name__@Base 3.0.4 + mpi_comm_get_parent@Base 3.0.4 + mpi_comm_get_parent_@Base 3.0.4 + mpi_comm_get_parent__@Base 3.0.4 + mpi_comm_group@Base 3.0.4 + mpi_comm_group_@Base 3.0.4 + mpi_comm_group__@Base 3.0.4 + mpi_comm_idup@Base 3.0.4 + mpi_comm_idup_@Base 3.0.4 + mpi_comm_idup__@Base 3.0.4 + mpi_comm_join@Base 3.0.4 + mpi_comm_join_@Base 3.0.4 + mpi_comm_join__@Base 3.0.4 + mpi_comm_null_copy_fn@Base 3.0.4 + mpi_comm_null_copy_fn_@Base 3.0.4 + mpi_comm_null_copy_fn__@Base 3.0.4 + mpi_comm_null_delete_fn@Base 3.0.4 + mpi_comm_null_delete_fn_@Base 3.0.4 + mpi_comm_null_delete_fn__@Base 3.0.4 + mpi_comm_rank@Base 3.0.4 + mpi_comm_rank_@Base 3.0.4 + mpi_comm_rank__@Base 3.0.4 + mpi_comm_remote_group@Base 3.0.4 + mpi_comm_remote_group_@Base 3.0.4 + mpi_comm_remote_group__@Base 3.0.4 + mpi_comm_remote_size@Base 3.0.4 + mpi_comm_remote_size_@Base 3.0.4 + mpi_comm_remote_size__@Base 3.0.4 + mpi_comm_set_attr@Base 3.0.4 + mpi_comm_set_attr_@Base 3.0.4 + mpi_comm_set_attr__@Base 3.0.4 + mpi_comm_set_errhandler@Base 3.0.4 + mpi_comm_set_errhandler_@Base 3.0.4 + mpi_comm_set_errhandler__@Base 3.0.4 + mpi_comm_set_info@Base 3.0.4 + mpi_comm_set_info_@Base 3.0.4 + mpi_comm_set_info__@Base 3.0.4 + mpi_comm_set_name@Base 3.0.4 + mpi_comm_set_name_@Base 3.0.4 + mpi_comm_set_name__@Base 3.0.4 + mpi_comm_size@Base 3.0.4 + mpi_comm_size_@Base 3.0.4 + mpi_comm_size__@Base 3.0.4 + mpi_comm_spawn@Base 3.0.4 + mpi_comm_spawn_@Base 3.0.4 + mpi_comm_spawn__@Base 3.0.4 + mpi_comm_spawn_multiple@Base 3.0.4 + mpi_comm_spawn_multiple_@Base 3.0.4 + mpi_comm_spawn_multiple__@Base 3.0.4 + mpi_comm_split@Base 3.0.4 + mpi_comm_split_@Base 3.0.4 + mpi_comm_split__@Base 3.0.4 + mpi_comm_split_type@Base 3.0.4 + mpi_comm_split_type_@Base 3.0.4 + mpi_comm_split_type__@Base 3.0.4 + mpi_comm_test_inter@Base 3.0.4 + mpi_comm_test_inter_@Base 3.0.4 + mpi_comm_test_inter__@Base 3.0.4 + mpi_compare_and_swap@Base 3.0.4 + mpi_compare_and_swap_@Base 3.0.4 + mpi_compare_and_swap__@Base 3.0.4 + mpi_dims_create@Base 3.0.4 + mpi_dims_create_@Base 3.0.4 + mpi_dims_create__@Base 3.0.4 + mpi_dist_graph_create@Base 3.0.4 + mpi_dist_graph_create_@Base 3.0.4 + mpi_dist_graph_create__@Base 3.0.4 + mpi_dist_graph_create_adjacent@Base 3.0.4 + mpi_dist_graph_create_adjacent_@Base 3.0.4 + mpi_dist_graph_create_adjacent__@Base 3.0.4 + mpi_dist_graph_neighbors@Base 3.0.4 + mpi_dist_graph_neighbors_@Base 3.0.4 + mpi_dist_graph_neighbors__@Base 3.0.4 + mpi_dist_graph_neighbors_count@Base 3.0.4 + mpi_dist_graph_neighbors_count_@Base 3.0.4 + mpi_dist_graph_neighbors_count__@Base 3.0.4 + mpi_dup_fn@Base 3.0.4 + mpi_dup_fn_@Base 3.0.4 + mpi_dup_fn__@Base 3.0.4 + mpi_errhandler_create@Base 3.0.4 + mpi_errhandler_create_@Base 3.0.4 + mpi_errhandler_create__@Base 3.0.4 + mpi_errhandler_free@Base 3.0.4 + mpi_errhandler_free_@Base 3.0.4 + mpi_errhandler_free__@Base 3.0.4 + mpi_errhandler_get@Base 3.0.4 + mpi_errhandler_get_@Base 3.0.4 + mpi_errhandler_get__@Base 3.0.4 + mpi_errhandler_set@Base 3.0.4 + mpi_errhandler_set_@Base 3.0.4 + mpi_errhandler_set__@Base 3.0.4 + mpi_error_class@Base 3.0.4 + mpi_error_class_@Base 3.0.4 + mpi_error_class__@Base 3.0.4 + mpi_error_string@Base 3.0.4 + mpi_error_string_@Base 3.0.4 + mpi_error_string__@Base 3.0.4 + mpi_exscan@Base 3.0.4 + mpi_exscan_@Base 3.0.4 + mpi_exscan__@Base 3.0.4 + mpi_fetch_and_op@Base 3.0.4 + mpi_fetch_and_op_@Base 3.0.4 + mpi_fetch_and_op__@Base 3.0.4 + mpi_file_call_errhandler@Base 3.0.4 + mpi_file_call_errhandler_@Base 3.0.4 + mpi_file_call_errhandler__@Base 3.0.4 + mpi_file_close@Base 3.0.4 + mpi_file_close_@Base 3.0.4 + mpi_file_close__@Base 3.0.4 + mpi_file_create_errhandler@Base 3.0.4 + mpi_file_create_errhandler_@Base 3.0.4 + mpi_file_create_errhandler__@Base 3.0.4 + mpi_file_delete@Base 3.0.4 + mpi_file_delete_@Base 3.0.4 + mpi_file_delete__@Base 3.0.4 + mpi_file_get_amode@Base 3.0.4 + mpi_file_get_amode_@Base 3.0.4 + mpi_file_get_amode__@Base 3.0.4 + mpi_file_get_atomicity@Base 3.0.4 + mpi_file_get_atomicity_@Base 3.0.4 + mpi_file_get_atomicity__@Base 3.0.4 + mpi_file_get_byte_offset@Base 3.0.4 + mpi_file_get_byte_offset_@Base 3.0.4 + mpi_file_get_byte_offset__@Base 3.0.4 + mpi_file_get_errhandler@Base 3.0.4 + mpi_file_get_errhandler_@Base 3.0.4 + mpi_file_get_errhandler__@Base 3.0.4 + mpi_file_get_group@Base 3.0.4 + mpi_file_get_group_@Base 3.0.4 + mpi_file_get_group__@Base 3.0.4 + mpi_file_get_info@Base 3.0.4 + mpi_file_get_info_@Base 3.0.4 + mpi_file_get_info__@Base 3.0.4 + mpi_file_get_position@Base 3.0.4 + mpi_file_get_position_@Base 3.0.4 + mpi_file_get_position__@Base 3.0.4 + mpi_file_get_position_shared@Base 3.0.4 + mpi_file_get_position_shared_@Base 3.0.4 + mpi_file_get_position_shared__@Base 3.0.4 + mpi_file_get_size@Base 3.0.4 + mpi_file_get_size_@Base 3.0.4 + mpi_file_get_size__@Base 3.0.4 + mpi_file_get_type_extent@Base 3.0.4 + mpi_file_get_type_extent_@Base 3.0.4 + mpi_file_get_type_extent__@Base 3.0.4 + mpi_file_get_view@Base 3.0.4 + mpi_file_get_view_@Base 3.0.4 + mpi_file_get_view__@Base 3.0.4 + mpi_file_iread@Base 3.0.4 + mpi_file_iread_@Base 3.0.4 + mpi_file_iread__@Base 3.0.4 + mpi_file_iread_at@Base 3.0.4 + mpi_file_iread_at_@Base 3.0.4 + mpi_file_iread_at__@Base 3.0.4 + mpi_file_iread_shared@Base 3.0.4 + mpi_file_iread_shared_@Base 3.0.4 + mpi_file_iread_shared__@Base 3.0.4 + mpi_file_iwrite@Base 3.0.4 + mpi_file_iwrite_@Base 3.0.4 + mpi_file_iwrite__@Base 3.0.4 + mpi_file_iwrite_at@Base 3.0.4 + mpi_file_iwrite_at_@Base 3.0.4 + mpi_file_iwrite_at__@Base 3.0.4 + mpi_file_iwrite_shared@Base 3.0.4 + mpi_file_iwrite_shared_@Base 3.0.4 + mpi_file_iwrite_shared__@Base 3.0.4 + mpi_file_open@Base 3.0.4 + mpi_file_open_@Base 3.0.4 + mpi_file_open__@Base 3.0.4 + mpi_file_preallocate@Base 3.0.4 + mpi_file_preallocate_@Base 3.0.4 + mpi_file_preallocate__@Base 3.0.4 + mpi_file_read@Base 3.0.4 + mpi_file_read_@Base 3.0.4 + mpi_file_read__@Base 3.0.4 + mpi_file_read_all@Base 3.0.4 + mpi_file_read_all_@Base 3.0.4 + mpi_file_read_all__@Base 3.0.4 + mpi_file_read_all_begin@Base 3.0.4 + mpi_file_read_all_begin_@Base 3.0.4 + mpi_file_read_all_begin__@Base 3.0.4 + mpi_file_read_all_end@Base 3.0.4 + mpi_file_read_all_end_@Base 3.0.4 + mpi_file_read_all_end__@Base 3.0.4 + mpi_file_read_at@Base 3.0.4 + mpi_file_read_at_@Base 3.0.4 + mpi_file_read_at__@Base 3.0.4 + mpi_file_read_at_all@Base 3.0.4 + mpi_file_read_at_all_@Base 3.0.4 + mpi_file_read_at_all__@Base 3.0.4 + mpi_file_read_at_all_begin@Base 3.0.4 + mpi_file_read_at_all_begin_@Base 3.0.4 + mpi_file_read_at_all_begin__@Base 3.0.4 + mpi_file_read_at_all_end@Base 3.0.4 + mpi_file_read_at_all_end_@Base 3.0.4 + mpi_file_read_at_all_end__@Base 3.0.4 + mpi_file_read_ordered@Base 3.0.4 + mpi_file_read_ordered_@Base 3.0.4 + mpi_file_read_ordered__@Base 3.0.4 + mpi_file_read_ordered_begin@Base 3.0.4 + mpi_file_read_ordered_begin_@Base 3.0.4 + mpi_file_read_ordered_begin__@Base 3.0.4 + mpi_file_read_ordered_end@Base 3.0.4 + mpi_file_read_ordered_end_@Base 3.0.4 + mpi_file_read_ordered_end__@Base 3.0.4 + mpi_file_read_shared@Base 3.0.4 + mpi_file_read_shared_@Base 3.0.4 + mpi_file_read_shared__@Base 3.0.4 + mpi_file_seek@Base 3.0.4 + mpi_file_seek_@Base 3.0.4 + mpi_file_seek__@Base 3.0.4 + mpi_file_seek_shared@Base 3.0.4 + mpi_file_seek_shared_@Base 3.0.4 + mpi_file_seek_shared__@Base 3.0.4 + mpi_file_set_atomicity@Base 3.0.4 + mpi_file_set_atomicity_@Base 3.0.4 + mpi_file_set_atomicity__@Base 3.0.4 + mpi_file_set_errhandler@Base 3.0.4 + mpi_file_set_errhandler_@Base 3.0.4 + mpi_file_set_errhandler__@Base 3.0.4 + mpi_file_set_info@Base 3.0.4 + mpi_file_set_info_@Base 3.0.4 + mpi_file_set_info__@Base 3.0.4 + mpi_file_set_size@Base 3.0.4 + mpi_file_set_size_@Base 3.0.4 + mpi_file_set_size__@Base 3.0.4 + mpi_file_set_view@Base 3.0.4 + mpi_file_set_view_@Base 3.0.4 + mpi_file_set_view__@Base 3.0.4 + mpi_file_sync@Base 3.0.4 + mpi_file_sync_@Base 3.0.4 + mpi_file_sync__@Base 3.0.4 + mpi_file_write@Base 3.0.4 + mpi_file_write_@Base 3.0.4 + mpi_file_write__@Base 3.0.4 + mpi_file_write_all@Base 3.0.4 + mpi_file_write_all_@Base 3.0.4 + mpi_file_write_all__@Base 3.0.4 + mpi_file_write_all_begin@Base 3.0.4 + mpi_file_write_all_begin_@Base 3.0.4 + mpi_file_write_all_begin__@Base 3.0.4 + mpi_file_write_all_end@Base 3.0.4 + mpi_file_write_all_end_@Base 3.0.4 + mpi_file_write_all_end__@Base 3.0.4 + mpi_file_write_at@Base 3.0.4 + mpi_file_write_at_@Base 3.0.4 + mpi_file_write_at__@Base 3.0.4 + mpi_file_write_at_all@Base 3.0.4 + mpi_file_write_at_all_@Base 3.0.4 + mpi_file_write_at_all__@Base 3.0.4 + mpi_file_write_at_all_begin@Base 3.0.4 + mpi_file_write_at_all_begin_@Base 3.0.4 + mpi_file_write_at_all_begin__@Base 3.0.4 + mpi_file_write_at_all_end@Base 3.0.4 + mpi_file_write_at_all_end_@Base 3.0.4 + mpi_file_write_at_all_end__@Base 3.0.4 + mpi_file_write_ordered@Base 3.0.4 + mpi_file_write_ordered_@Base 3.0.4 + mpi_file_write_ordered__@Base 3.0.4 + mpi_file_write_ordered_begin@Base 3.0.4 + mpi_file_write_ordered_begin_@Base 3.0.4 + mpi_file_write_ordered_begin__@Base 3.0.4 + mpi_file_write_ordered_end@Base 3.0.4 + mpi_file_write_ordered_end_@Base 3.0.4 + mpi_file_write_ordered_end__@Base 3.0.4 + mpi_file_write_shared@Base 3.0.4 + mpi_file_write_shared_@Base 3.0.4 + mpi_file_write_shared__@Base 3.0.4 + mpi_finalize@Base 3.0.4 + mpi_finalize_@Base 3.0.4 + mpi_finalize__@Base 3.0.4 + mpi_finalized@Base 3.0.4 + mpi_finalized_@Base 3.0.4 + mpi_finalized__@Base 3.0.4 + mpi_free_mem@Base 3.0.4 + mpi_free_mem_@Base 3.0.4 + mpi_free_mem__@Base 3.0.4 + mpi_gather@Base 3.0.4 + mpi_gather_@Base 3.0.4 + mpi_gather__@Base 3.0.4 + mpi_gatherv@Base 3.0.4 + mpi_gatherv_@Base 3.0.4 + mpi_gatherv__@Base 3.0.4 + mpi_get@Base 3.0.4 + mpi_get_@Base 3.0.4 + mpi_get__@Base 3.0.4 + mpi_get_accumulate@Base 3.0.4 + mpi_get_accumulate_@Base 3.0.4 + mpi_get_accumulate__@Base 3.0.4 + mpi_get_address@Base 3.0.4 + mpi_get_address_@Base 3.0.4 + mpi_get_address__@Base 3.0.4 + mpi_get_count@Base 3.0.4 + mpi_get_count_@Base 3.0.4 + mpi_get_count__@Base 3.0.4 + mpi_get_elements@Base 3.0.4 + mpi_get_elements_@Base 3.0.4 + mpi_get_elements__@Base 3.0.4 + mpi_get_elements_x@Base 3.0.4 + mpi_get_elements_x_@Base 3.0.4 + mpi_get_elements_x__@Base 3.0.4 + mpi_get_library_version@Base 3.0.4 + mpi_get_library_version_@Base 3.0.4 + mpi_get_library_version__@Base 3.0.4 + mpi_get_processor_name@Base 3.0.4 + mpi_get_processor_name_@Base 3.0.4 + mpi_get_processor_name__@Base 3.0.4 + mpi_get_version@Base 3.0.4 + mpi_get_version_@Base 3.0.4 + mpi_get_version__@Base 3.0.4 + mpi_graph_create@Base 3.0.4 + mpi_graph_create_@Base 3.0.4 + mpi_graph_create__@Base 3.0.4 + mpi_graph_get@Base 3.0.4 + mpi_graph_get_@Base 3.0.4 + mpi_graph_get__@Base 3.0.4 + mpi_graph_map@Base 3.0.4 + mpi_graph_map_@Base 3.0.4 + mpi_graph_map__@Base 3.0.4 + mpi_graph_neighbors@Base 3.0.4 + mpi_graph_neighbors_@Base 3.0.4 + mpi_graph_neighbors__@Base 3.0.4 + mpi_graph_neighbors_count@Base 3.0.4 + mpi_graph_neighbors_count_@Base 3.0.4 + mpi_graph_neighbors_count__@Base 3.0.4 + mpi_graphdims_get@Base 3.0.4 + mpi_graphdims_get_@Base 3.0.4 + mpi_graphdims_get__@Base 3.0.4 + mpi_grequest_complete@Base 3.0.4 + mpi_grequest_complete_@Base 3.0.4 + mpi_grequest_complete__@Base 3.0.4 + mpi_grequest_start@Base 3.0.4 + mpi_grequest_start_@Base 3.0.4 + mpi_grequest_start__@Base 3.0.4 + mpi_group_compare@Base 3.0.4 + mpi_group_compare_@Base 3.0.4 + mpi_group_compare__@Base 3.0.4 + mpi_group_difference@Base 3.0.4 + mpi_group_difference_@Base 3.0.4 + mpi_group_difference__@Base 3.0.4 + mpi_group_excl@Base 3.0.4 + mpi_group_excl_@Base 3.0.4 + mpi_group_excl__@Base 3.0.4 + mpi_group_free@Base 3.0.4 + mpi_group_free_@Base 3.0.4 + mpi_group_free__@Base 3.0.4 + mpi_group_incl@Base 3.0.4 + mpi_group_incl_@Base 3.0.4 + mpi_group_incl__@Base 3.0.4 + mpi_group_intersection@Base 3.0.4 + mpi_group_intersection_@Base 3.0.4 + mpi_group_intersection__@Base 3.0.4 + mpi_group_range_excl@Base 3.0.4 + mpi_group_range_excl_@Base 3.0.4 + mpi_group_range_excl__@Base 3.0.4 + mpi_group_range_incl@Base 3.0.4 + mpi_group_range_incl_@Base 3.0.4 + mpi_group_range_incl__@Base 3.0.4 + mpi_group_rank@Base 3.0.4 + mpi_group_rank_@Base 3.0.4 + mpi_group_rank__@Base 3.0.4 + mpi_group_size@Base 3.0.4 + mpi_group_size_@Base 3.0.4 + mpi_group_size__@Base 3.0.4 + mpi_group_translate_ranks@Base 3.0.4 + mpi_group_translate_ranks_@Base 3.0.4 + mpi_group_translate_ranks__@Base 3.0.4 + mpi_group_union@Base 3.0.4 + mpi_group_union_@Base 3.0.4 + mpi_group_union__@Base 3.0.4 + mpi_iallgather@Base 3.0.4 + mpi_iallgather_@Base 3.0.4 + mpi_iallgather__@Base 3.0.4 + mpi_iallgatherv@Base 3.0.4 + mpi_iallgatherv_@Base 3.0.4 + mpi_iallgatherv__@Base 3.0.4 + mpi_iallreduce@Base 3.0.4 + mpi_iallreduce_@Base 3.0.4 + mpi_iallreduce__@Base 3.0.4 + mpi_ialltoall@Base 3.0.4 + mpi_ialltoall_@Base 3.0.4 + mpi_ialltoall__@Base 3.0.4 + mpi_ialltoallv@Base 3.0.4 + mpi_ialltoallv_@Base 3.0.4 + mpi_ialltoallv__@Base 3.0.4 + mpi_ialltoallw@Base 3.0.4 + mpi_ialltoallw_@Base 3.0.4 + mpi_ialltoallw__@Base 3.0.4 + mpi_ibarrier@Base 3.0.4 + mpi_ibarrier_@Base 3.0.4 + mpi_ibarrier__@Base 3.0.4 + mpi_ibcast@Base 3.0.4 + mpi_ibcast_@Base 3.0.4 + mpi_ibcast__@Base 3.0.4 + mpi_ibsend@Base 3.0.4 + mpi_ibsend_@Base 3.0.4 + mpi_ibsend__@Base 3.0.4 + mpi_iexscan@Base 3.0.4 + mpi_iexscan_@Base 3.0.4 + mpi_iexscan__@Base 3.0.4 + mpi_igather@Base 3.0.4 + mpi_igather_@Base 3.0.4 + mpi_igather__@Base 3.0.4 + mpi_igatherv@Base 3.0.4 + mpi_igatherv_@Base 3.0.4 + mpi_igatherv__@Base 3.0.4 + mpi_improbe@Base 3.0.4 + mpi_improbe_@Base 3.0.4 + mpi_improbe__@Base 3.0.4 + mpi_imrecv@Base 3.0.4 + mpi_imrecv_@Base 3.0.4 + mpi_imrecv__@Base 3.0.4 + mpi_ineighbor_allgather@Base 3.0.4 + mpi_ineighbor_allgather_@Base 3.0.4 + mpi_ineighbor_allgather__@Base 3.0.4 + mpi_ineighbor_allgatherv@Base 3.0.4 + mpi_ineighbor_allgatherv_@Base 3.0.4 + mpi_ineighbor_allgatherv__@Base 3.0.4 + mpi_ineighbor_alltoall@Base 3.0.4 + mpi_ineighbor_alltoall_@Base 3.0.4 + mpi_ineighbor_alltoall__@Base 3.0.4 + mpi_ineighbor_alltoallv@Base 3.0.4 + mpi_ineighbor_alltoallv_@Base 3.0.4 + mpi_ineighbor_alltoallv__@Base 3.0.4 + mpi_ineighbor_alltoallw@Base 3.0.4 + mpi_ineighbor_alltoallw_@Base 3.0.4 + mpi_ineighbor_alltoallw__@Base 3.0.4 + mpi_info_create@Base 3.0.4 + mpi_info_create_@Base 3.0.4 + mpi_info_create__@Base 3.0.4 + mpi_info_delete@Base 3.0.4 + mpi_info_delete_@Base 3.0.4 + mpi_info_delete__@Base 3.0.4 + mpi_info_dup@Base 3.0.4 + mpi_info_dup_@Base 3.0.4 + mpi_info_dup__@Base 3.0.4 + mpi_info_free@Base 3.0.4 + mpi_info_free_@Base 3.0.4 + mpi_info_free__@Base 3.0.4 + mpi_info_get@Base 3.0.4 + mpi_info_get_@Base 3.0.4 + mpi_info_get__@Base 3.0.4 + mpi_info_get_nkeys@Base 3.0.4 + mpi_info_get_nkeys_@Base 3.0.4 + mpi_info_get_nkeys__@Base 3.0.4 + mpi_info_get_nthkey@Base 3.0.4 + mpi_info_get_nthkey_@Base 3.0.4 + mpi_info_get_nthkey__@Base 3.0.4 + mpi_info_get_valuelen@Base 3.0.4 + mpi_info_get_valuelen_@Base 3.0.4 + mpi_info_get_valuelen__@Base 3.0.4 + mpi_info_set@Base 3.0.4 + mpi_info_set_@Base 3.0.4 + mpi_info_set__@Base 3.0.4 + mpi_init@Base 3.0.4 + mpi_init_@Base 3.0.4 + mpi_init__@Base 3.0.4 + mpi_init_thread@Base 3.0.4 + mpi_init_thread_@Base 3.0.4 + mpi_init_thread__@Base 3.0.4 + mpi_initialized@Base 3.0.4 + mpi_initialized_@Base 3.0.4 + mpi_initialized__@Base 3.0.4 + mpi_intercomm_create@Base 3.0.4 + mpi_intercomm_create_@Base 3.0.4 + mpi_intercomm_create__@Base 3.0.4 + mpi_intercomm_merge@Base 3.0.4 + mpi_intercomm_merge_@Base 3.0.4 + mpi_intercomm_merge__@Base 3.0.4 + mpi_iprobe@Base 3.0.4 + mpi_iprobe_@Base 3.0.4 + mpi_iprobe__@Base 3.0.4 + mpi_irecv@Base 3.0.4 + mpi_irecv_@Base 3.0.4 + mpi_irecv__@Base 3.0.4 + mpi_ireduce@Base 3.0.4 + mpi_ireduce_@Base 3.0.4 + mpi_ireduce__@Base 3.0.4 + mpi_ireduce_scatter@Base 3.0.4 + mpi_ireduce_scatter_@Base 3.0.4 + mpi_ireduce_scatter__@Base 3.0.4 + mpi_ireduce_scatter_block@Base 3.0.4 + mpi_ireduce_scatter_block_@Base 3.0.4 + mpi_ireduce_scatter_block__@Base 3.0.4 + mpi_irsend@Base 3.0.4 + mpi_irsend_@Base 3.0.4 + mpi_irsend__@Base 3.0.4 + mpi_is_thread_main@Base 3.0.4 + mpi_is_thread_main_@Base 3.0.4 + mpi_is_thread_main__@Base 3.0.4 + mpi_iscan@Base 3.0.4 + mpi_iscan_@Base 3.0.4 + mpi_iscan__@Base 3.0.4 + mpi_iscatter@Base 3.0.4 + mpi_iscatter_@Base 3.0.4 + mpi_iscatter__@Base 3.0.4 + mpi_iscatterv@Base 3.0.4 + mpi_iscatterv_@Base 3.0.4 + mpi_iscatterv__@Base 3.0.4 + mpi_isend@Base 3.0.4 + mpi_isend_@Base 3.0.4 + mpi_isend__@Base 3.0.4 + mpi_issend@Base 3.0.4 + mpi_issend_@Base 3.0.4 + mpi_issend__@Base 3.0.4 + mpi_keyval_create@Base 3.0.4 + mpi_keyval_create_@Base 3.0.4 + mpi_keyval_create__@Base 3.0.4 + mpi_keyval_free@Base 3.0.4 + mpi_keyval_free_@Base 3.0.4 + mpi_keyval_free__@Base 3.0.4 + mpi_lookup_name@Base 3.0.4 + mpi_lookup_name_@Base 3.0.4 + mpi_lookup_name__@Base 3.0.4 + mpi_mprobe@Base 3.0.4 + mpi_mprobe_@Base 3.0.4 + mpi_mprobe__@Base 3.0.4 + mpi_mrecv@Base 3.0.4 + mpi_mrecv_@Base 3.0.4 + mpi_mrecv__@Base 3.0.4 + mpi_neighbor_allgather@Base 3.0.4 + mpi_neighbor_allgather_@Base 3.0.4 + mpi_neighbor_allgather__@Base 3.0.4 + mpi_neighbor_allgatherv@Base 3.0.4 + mpi_neighbor_allgatherv_@Base 3.0.4 + mpi_neighbor_allgatherv__@Base 3.0.4 + mpi_neighbor_alltoall@Base 3.0.4 + mpi_neighbor_alltoall_@Base 3.0.4 + mpi_neighbor_alltoall__@Base 3.0.4 + mpi_neighbor_alltoallv@Base 3.0.4 + mpi_neighbor_alltoallv_@Base 3.0.4 + mpi_neighbor_alltoallv__@Base 3.0.4 + mpi_neighbor_alltoallw@Base 3.0.4 + mpi_neighbor_alltoallw_@Base 3.0.4 + mpi_neighbor_alltoallw__@Base 3.0.4 + mpi_null_copy_fn@Base 3.0.4 + mpi_null_copy_fn_@Base 3.0.4 + mpi_null_copy_fn__@Base 3.0.4 + mpi_null_delete_fn@Base 3.0.4 + mpi_null_delete_fn_@Base 3.0.4 + mpi_null_delete_fn__@Base 3.0.4 + mpi_op_commutative@Base 3.0.4 + mpi_op_commutative_@Base 3.0.4 + mpi_op_commutative__@Base 3.0.4 + mpi_op_create@Base 3.0.4 + mpi_op_create_@Base 3.0.4 + mpi_op_create__@Base 3.0.4 + mpi_op_free@Base 3.0.4 + mpi_op_free_@Base 3.0.4 + mpi_op_free__@Base 3.0.4 + mpi_open_port@Base 3.0.4 + mpi_open_port_@Base 3.0.4 + mpi_open_port__@Base 3.0.4 + mpi_pack@Base 3.0.4 + mpi_pack_@Base 3.0.4 + mpi_pack__@Base 3.0.4 + mpi_pack_external@Base 3.0.4 + mpi_pack_external_@Base 3.0.4 + mpi_pack_external__@Base 3.0.4 + mpi_pack_external_size@Base 3.0.4 + mpi_pack_external_size_@Base 3.0.4 + mpi_pack_external_size__@Base 3.0.4 + mpi_pack_size@Base 3.0.4 + mpi_pack_size_@Base 3.0.4 + mpi_pack_size__@Base 3.0.4 + mpi_pcontrol@Base 3.0.4 + mpi_pcontrol_@Base 3.0.4 + mpi_pcontrol__@Base 3.0.4 + mpi_probe@Base 3.0.4 + mpi_probe_@Base 3.0.4 + mpi_probe__@Base 3.0.4 + mpi_publish_name@Base 3.0.4 + mpi_publish_name_@Base 3.0.4 + mpi_publish_name__@Base 3.0.4 + mpi_put@Base 3.0.4 + mpi_put_@Base 3.0.4 + mpi_put__@Base 3.0.4 + mpi_query_thread@Base 3.0.4 + mpi_query_thread_@Base 3.0.4 + mpi_query_thread__@Base 3.0.4 + mpi_raccumulate@Base 3.0.4 + mpi_raccumulate_@Base 3.0.4 + mpi_raccumulate__@Base 3.0.4 + mpi_recv@Base 3.0.4 + mpi_recv_@Base 3.0.4 + mpi_recv__@Base 3.0.4 + mpi_recv_init@Base 3.0.4 + mpi_recv_init_@Base 3.0.4 + mpi_recv_init__@Base 3.0.4 + mpi_reduce@Base 3.0.4 + mpi_reduce_@Base 3.0.4 + mpi_reduce__@Base 3.0.4 + mpi_reduce_local@Base 3.0.4 + mpi_reduce_local_@Base 3.0.4 + mpi_reduce_local__@Base 3.0.4 + mpi_reduce_scatter@Base 3.0.4 + mpi_reduce_scatter_@Base 3.0.4 + mpi_reduce_scatter__@Base 3.0.4 + mpi_reduce_scatter_block@Base 3.0.4 + mpi_reduce_scatter_block_@Base 3.0.4 + mpi_reduce_scatter_block__@Base 3.0.4 + mpi_register_datarep@Base 3.0.4 + mpi_register_datarep_@Base 3.0.4 + mpi_register_datarep__@Base 3.0.4 + mpi_request_free@Base 3.0.4 + mpi_request_free_@Base 3.0.4 + mpi_request_free__@Base 3.0.4 + mpi_request_get_status@Base 3.0.4 + mpi_request_get_status_@Base 3.0.4 + mpi_request_get_status__@Base 3.0.4 + mpi_rget@Base 3.0.4 + mpi_rget_@Base 3.0.4 + mpi_rget__@Base 3.0.4 + mpi_rget_accumulate@Base 3.0.4 + mpi_rget_accumulate_@Base 3.0.4 + mpi_rget_accumulate__@Base 3.0.4 + mpi_rput@Base 3.0.4 + mpi_rput_@Base 3.0.4 + mpi_rput__@Base 3.0.4 + mpi_rsend@Base 3.0.4 + mpi_rsend_@Base 3.0.4 + mpi_rsend__@Base 3.0.4 + mpi_rsend_init@Base 3.0.4 + mpi_rsend_init_@Base 3.0.4 + mpi_rsend_init__@Base 3.0.4 + mpi_scan@Base 3.0.4 + mpi_scan_@Base 3.0.4 + mpi_scan__@Base 3.0.4 + mpi_scatter@Base 3.0.4 + mpi_scatter_@Base 3.0.4 + mpi_scatter__@Base 3.0.4 + mpi_scatterv@Base 3.0.4 + mpi_scatterv_@Base 3.0.4 + mpi_scatterv__@Base 3.0.4 + mpi_send@Base 3.0.4 + mpi_send_@Base 3.0.4 + mpi_send__@Base 3.0.4 + mpi_send_init@Base 3.0.4 + mpi_send_init_@Base 3.0.4 + mpi_send_init__@Base 3.0.4 + mpi_sendrecv@Base 3.0.4 + mpi_sendrecv_@Base 3.0.4 + mpi_sendrecv__@Base 3.0.4 + mpi_sendrecv_replace@Base 3.0.4 + mpi_sendrecv_replace_@Base 3.0.4 + mpi_sendrecv_replace__@Base 3.0.4 + mpi_ssend@Base 3.0.4 + mpi_ssend_@Base 3.0.4 + mpi_ssend__@Base 3.0.4 + mpi_ssend_init@Base 3.0.4 + mpi_ssend_init_@Base 3.0.4 + mpi_ssend_init__@Base 3.0.4 + mpi_start@Base 3.0.4 + mpi_start_@Base 3.0.4 + mpi_start__@Base 3.0.4 + mpi_startall@Base 3.0.4 + mpi_startall_@Base 3.0.4 + mpi_startall__@Base 3.0.4 + mpi_status_set_cancelled@Base 3.0.4 + mpi_status_set_cancelled_@Base 3.0.4 + mpi_status_set_cancelled__@Base 3.0.4 + mpi_status_set_elements@Base 3.0.4 + mpi_status_set_elements_@Base 3.0.4 + mpi_status_set_elements__@Base 3.0.4 + mpi_status_set_elements_x@Base 3.0.4 + mpi_status_set_elements_x_@Base 3.0.4 + mpi_status_set_elements_x__@Base 3.0.4 + mpi_test@Base 3.0.4 + mpi_test_@Base 3.0.4 + mpi_test__@Base 3.0.4 + mpi_test_cancelled@Base 3.0.4 + mpi_test_cancelled_@Base 3.0.4 + mpi_test_cancelled__@Base 3.0.4 + mpi_testall@Base 3.0.4 + mpi_testall_@Base 3.0.4 + mpi_testall__@Base 3.0.4 + mpi_testany@Base 3.0.4 + mpi_testany_@Base 3.0.4 + mpi_testany__@Base 3.0.4 + mpi_testsome@Base 3.0.4 + mpi_testsome_@Base 3.0.4 + mpi_testsome__@Base 3.0.4 + mpi_topo_test@Base 3.0.4 + mpi_topo_test_@Base 3.0.4 + mpi_topo_test__@Base 3.0.4 + mpi_type_commit@Base 3.0.4 + mpi_type_commit_@Base 3.0.4 + mpi_type_commit__@Base 3.0.4 + mpi_type_contiguous@Base 3.0.4 + mpi_type_contiguous_@Base 3.0.4 + mpi_type_contiguous__@Base 3.0.4 + mpi_type_create_darray@Base 3.0.4 + mpi_type_create_darray_@Base 3.0.4 + mpi_type_create_darray__@Base 3.0.4 + mpi_type_create_hindexed@Base 3.0.4 + mpi_type_create_hindexed_@Base 3.0.4 + mpi_type_create_hindexed__@Base 3.0.4 + mpi_type_create_hindexed_block@Base 3.0.4 + mpi_type_create_hindexed_block_@Base 3.0.4 + mpi_type_create_hindexed_block__@Base 3.0.4 + mpi_type_create_hvector@Base 3.0.4 + mpi_type_create_hvector_@Base 3.0.4 + mpi_type_create_hvector__@Base 3.0.4 + mpi_type_create_indexed_block@Base 3.0.4 + mpi_type_create_indexed_block_@Base 3.0.4 + mpi_type_create_indexed_block__@Base 3.0.4 + mpi_type_create_keyval@Base 3.0.4 + mpi_type_create_keyval_@Base 3.0.4 + mpi_type_create_keyval__@Base 3.0.4 + mpi_type_create_resized@Base 3.0.4 + mpi_type_create_resized_@Base 3.0.4 + mpi_type_create_resized__@Base 3.0.4 + mpi_type_create_struct@Base 3.0.4 + mpi_type_create_struct_@Base 3.0.4 + mpi_type_create_struct__@Base 3.0.4 + mpi_type_create_subarray@Base 3.0.4 + mpi_type_create_subarray_@Base 3.0.4 + mpi_type_create_subarray__@Base 3.0.4 + mpi_type_delete_attr@Base 3.0.4 + mpi_type_delete_attr_@Base 3.0.4 + mpi_type_delete_attr__@Base 3.0.4 + mpi_type_dup@Base 3.0.4 + mpi_type_dup_@Base 3.0.4 + mpi_type_dup__@Base 3.0.4 + mpi_type_dup_fn@Base 3.0.4 + mpi_type_dup_fn_@Base 3.0.4 + mpi_type_dup_fn__@Base 3.0.4 + mpi_type_extent@Base 3.0.4 + mpi_type_extent_@Base 3.0.4 + mpi_type_extent__@Base 3.0.4 + mpi_type_free@Base 3.0.4 + mpi_type_free_@Base 3.0.4 + mpi_type_free__@Base 3.0.4 + mpi_type_free_keyval@Base 3.0.4 + mpi_type_free_keyval_@Base 3.0.4 + mpi_type_free_keyval__@Base 3.0.4 + mpi_type_get_attr@Base 3.0.4 + mpi_type_get_attr_@Base 3.0.4 + mpi_type_get_attr__@Base 3.0.4 + mpi_type_get_contents@Base 3.0.4 + mpi_type_get_contents_@Base 3.0.4 + mpi_type_get_contents__@Base 3.0.4 + mpi_type_get_envelope@Base 3.0.4 + mpi_type_get_envelope_@Base 3.0.4 + mpi_type_get_envelope__@Base 3.0.4 + mpi_type_get_extent@Base 3.0.4 + mpi_type_get_extent_@Base 3.0.4 + mpi_type_get_extent__@Base 3.0.4 + mpi_type_get_extent_x@Base 3.0.4 + mpi_type_get_extent_x_@Base 3.0.4 + mpi_type_get_extent_x__@Base 3.0.4 + mpi_type_get_name@Base 3.0.4 + mpi_type_get_name_@Base 3.0.4 + mpi_type_get_name__@Base 3.0.4 + mpi_type_get_true_extent@Base 3.0.4 + mpi_type_get_true_extent_@Base 3.0.4 + mpi_type_get_true_extent__@Base 3.0.4 + mpi_type_get_true_extent_x@Base 3.0.4 + mpi_type_get_true_extent_x_@Base 3.0.4 + mpi_type_get_true_extent_x__@Base 3.0.4 + mpi_type_hindexed@Base 3.0.4 + mpi_type_hindexed_@Base 3.0.4 + mpi_type_hindexed__@Base 3.0.4 + mpi_type_hvector@Base 3.0.4 + mpi_type_hvector_@Base 3.0.4 + mpi_type_hvector__@Base 3.0.4 + mpi_type_indexed@Base 3.0.4 + mpi_type_indexed_@Base 3.0.4 + mpi_type_indexed__@Base 3.0.4 + mpi_type_lb@Base 3.0.4 + mpi_type_lb_@Base 3.0.4 + mpi_type_lb__@Base 3.0.4 + mpi_type_match_size@Base 3.0.4 + mpi_type_match_size_@Base 3.0.4 + mpi_type_match_size__@Base 3.0.4 + mpi_type_null_copy_fn@Base 3.0.4 + mpi_type_null_copy_fn_@Base 3.0.4 + mpi_type_null_copy_fn__@Base 3.0.4 + mpi_type_null_delete_fn@Base 3.0.4 + mpi_type_null_delete_fn_@Base 3.0.4 + mpi_type_null_delete_fn__@Base 3.0.4 + mpi_type_set_attr@Base 3.0.4 + mpi_type_set_attr_@Base 3.0.4 + mpi_type_set_attr__@Base 3.0.4 + mpi_type_set_name@Base 3.0.4 + mpi_type_set_name_@Base 3.0.4 + mpi_type_set_name__@Base 3.0.4 + mpi_type_size@Base 3.0.4 + mpi_type_size_@Base 3.0.4 + mpi_type_size__@Base 3.0.4 + mpi_type_size_x@Base 3.0.4 + mpi_type_size_x_@Base 3.0.4 + mpi_type_size_x__@Base 3.0.4 + mpi_type_struct@Base 3.0.4 + mpi_type_struct_@Base 3.0.4 + mpi_type_struct__@Base 3.0.4 + mpi_type_ub@Base 3.0.4 + mpi_type_ub_@Base 3.0.4 + mpi_type_ub__@Base 3.0.4 + mpi_type_vector@Base 3.0.4 + mpi_type_vector_@Base 3.0.4 + mpi_type_vector__@Base 3.0.4 + mpi_unpack@Base 3.0.4 + mpi_unpack_@Base 3.0.4 + mpi_unpack__@Base 3.0.4 + mpi_unpack_external@Base 3.0.4 + mpi_unpack_external_@Base 3.0.4 + mpi_unpack_external__@Base 3.0.4 + mpi_unpublish_name@Base 3.0.4 + mpi_unpublish_name_@Base 3.0.4 + mpi_unpublish_name__@Base 3.0.4 + mpi_wait@Base 3.0.4 + mpi_wait_@Base 3.0.4 + mpi_wait__@Base 3.0.4 + mpi_waitall@Base 3.0.4 + mpi_waitall_@Base 3.0.4 + mpi_waitall__@Base 3.0.4 + mpi_waitany@Base 3.0.4 + mpi_waitany_@Base 3.0.4 + mpi_waitany__@Base 3.0.4 + mpi_waitsome@Base 3.0.4 + mpi_waitsome_@Base 3.0.4 + mpi_waitsome__@Base 3.0.4 + mpi_win_allocate@Base 3.0.4 + mpi_win_allocate_@Base 3.0.4 + mpi_win_allocate__@Base 3.0.4 + mpi_win_allocate_shared@Base 3.0.4 + mpi_win_allocate_shared_@Base 3.0.4 + mpi_win_allocate_shared__@Base 3.0.4 + mpi_win_attach@Base 3.0.4 + mpi_win_attach_@Base 3.0.4 + mpi_win_attach__@Base 3.0.4 + mpi_win_call_errhandler@Base 3.0.4 + mpi_win_call_errhandler_@Base 3.0.4 + mpi_win_call_errhandler__@Base 3.0.4 + mpi_win_complete@Base 3.0.4 + mpi_win_complete_@Base 3.0.4 + mpi_win_complete__@Base 3.0.4 + mpi_win_create@Base 3.0.4 + mpi_win_create_@Base 3.0.4 + mpi_win_create__@Base 3.0.4 + mpi_win_create_dynamic@Base 3.0.4 + mpi_win_create_dynamic_@Base 3.0.4 + mpi_win_create_dynamic__@Base 3.0.4 + mpi_win_create_errhandler@Base 3.0.4 + mpi_win_create_errhandler_@Base 3.0.4 + mpi_win_create_errhandler__@Base 3.0.4 + mpi_win_create_keyval@Base 3.0.4 + mpi_win_create_keyval_@Base 3.0.4 + mpi_win_create_keyval__@Base 3.0.4 + mpi_win_delete_attr@Base 3.0.4 + mpi_win_delete_attr_@Base 3.0.4 + mpi_win_delete_attr__@Base 3.0.4 + mpi_win_detach@Base 3.0.4 + mpi_win_detach_@Base 3.0.4 + mpi_win_detach__@Base 3.0.4 + mpi_win_dup_fn@Base 3.0.4 + mpi_win_dup_fn_@Base 3.0.4 + mpi_win_dup_fn__@Base 3.0.4 + mpi_win_fence@Base 3.0.4 + mpi_win_fence_@Base 3.0.4 + mpi_win_fence__@Base 3.0.4 + mpi_win_flush@Base 3.0.4 + mpi_win_flush_@Base 3.0.4 + mpi_win_flush__@Base 3.0.4 + mpi_win_flush_all@Base 3.0.4 + mpi_win_flush_all_@Base 3.0.4 + mpi_win_flush_all__@Base 3.0.4 + mpi_win_flush_local@Base 3.0.4 + mpi_win_flush_local_@Base 3.0.4 + mpi_win_flush_local__@Base 3.0.4 + mpi_win_flush_local_all@Base 3.0.4 + mpi_win_flush_local_all_@Base 3.0.4 + mpi_win_flush_local_all__@Base 3.0.4 + mpi_win_free@Base 3.0.4 + mpi_win_free_@Base 3.0.4 + mpi_win_free__@Base 3.0.4 + mpi_win_free_keyval@Base 3.0.4 + mpi_win_free_keyval_@Base 3.0.4 + mpi_win_free_keyval__@Base 3.0.4 + mpi_win_get_attr@Base 3.0.4 + mpi_win_get_attr_@Base 3.0.4 + mpi_win_get_attr__@Base 3.0.4 + mpi_win_get_errhandler@Base 3.0.4 + mpi_win_get_errhandler_@Base 3.0.4 + mpi_win_get_errhandler__@Base 3.0.4 + mpi_win_get_group@Base 3.0.4 + mpi_win_get_group_@Base 3.0.4 + mpi_win_get_group__@Base 3.0.4 + mpi_win_get_info@Base 3.0.4 + mpi_win_get_info_@Base 3.0.4 + mpi_win_get_info__@Base 3.0.4 + mpi_win_get_name@Base 3.0.4 + mpi_win_get_name_@Base 3.0.4 + mpi_win_get_name__@Base 3.0.4 + mpi_win_lock@Base 3.0.4 + mpi_win_lock_@Base 3.0.4 + mpi_win_lock__@Base 3.0.4 + mpi_win_lock_all@Base 3.0.4 + mpi_win_lock_all_@Base 3.0.4 + mpi_win_lock_all__@Base 3.0.4 + mpi_win_null_copy_fn@Base 3.0.4 + mpi_win_null_copy_fn_@Base 3.0.4 + mpi_win_null_copy_fn__@Base 3.0.4 + mpi_win_null_delete_fn@Base 3.0.4 + mpi_win_null_delete_fn_@Base 3.0.4 + mpi_win_null_delete_fn__@Base 3.0.4 + mpi_win_post@Base 3.0.4 + mpi_win_post_@Base 3.0.4 + mpi_win_post__@Base 3.0.4 + mpi_win_set_attr@Base 3.0.4 + mpi_win_set_attr_@Base 3.0.4 + mpi_win_set_attr__@Base 3.0.4 + mpi_win_set_errhandler@Base 3.0.4 + mpi_win_set_errhandler_@Base 3.0.4 + mpi_win_set_errhandler__@Base 3.0.4 + mpi_win_set_info@Base 3.0.4 + mpi_win_set_info_@Base 3.0.4 + mpi_win_set_info__@Base 3.0.4 + mpi_win_set_name@Base 3.0.4 + mpi_win_set_name_@Base 3.0.4 + mpi_win_set_name__@Base 3.0.4 + mpi_win_shared_query@Base 3.0.4 + mpi_win_shared_query_@Base 3.0.4 + mpi_win_shared_query__@Base 3.0.4 + mpi_win_start@Base 3.0.4 + mpi_win_start_@Base 3.0.4 + mpi_win_start__@Base 3.0.4 + mpi_win_sync@Base 3.0.4 + mpi_win_sync_@Base 3.0.4 + mpi_win_sync__@Base 3.0.4 + mpi_win_test@Base 3.0.4 + mpi_win_test_@Base 3.0.4 + mpi_win_test__@Base 3.0.4 + mpi_win_unlock@Base 3.0.4 + mpi_win_unlock_@Base 3.0.4 + mpi_win_unlock__@Base 3.0.4 + mpi_win_unlock_all@Base 3.0.4 + mpi_win_unlock_all_@Base 3.0.4 + mpi_win_unlock_all__@Base 3.0.4 + mpi_win_wait@Base 3.0.4 + mpi_win_wait_@Base 3.0.4 + mpi_win_wait__@Base 3.0.4 + mpi_wtick@Base 3.0.4 + mpi_wtick_@Base 3.0.4 + mpi_wtick__@Base 3.0.4 + mpi_wtime@Base 3.0.4 + mpi_wtime_@Base 3.0.4 + mpi_wtime__@Base 3.0.4 + mpix_comm_group_failed@Base 3.0.4 + mpix_comm_group_failed_@Base 3.0.4 + mpix_comm_group_failed__@Base 3.0.4 + mpix_comm_reenable_anysource@Base 3.0.4 + mpix_comm_reenable_anysource_@Base 3.0.4 + mpix_comm_reenable_anysource__@Base 3.0.4 + mpix_comm_remote_group_failed@Base 3.0.4 + mpix_comm_remote_group_failed_@Base 3.0.4 + mpix_comm_remote_group_failed__@Base 3.0.4 +libmpich.so.10 libmpich10 #MINVER# + ADIOI_Add_contig_flattened@Base 3.0.4 + ADIOI_Agg_idx@Base 3.0.4 + ADIOI_Build_agg_reqs@Base 3.0.4 + ADIOI_Build_client_pre_req@Base 3.0.4 + ADIOI_Build_client_req@Base 3.0.4 + ADIOI_Build_client_reqs@Base 3.0.4 + ADIOI_Calc_aggregator@Base 3.0.4 + ADIOI_Calc_bounds@Base 3.0.4 + ADIOI_Calc_file_domains@Base 3.0.4 + ADIOI_Calc_file_realms@Base 3.0.4 + ADIOI_Calc_file_realms_aar@Base 3.0.4 + ADIOI_Calc_file_realms_fsize@Base 3.0.4 + ADIOI_Calc_file_realms_user_size@Base 3.0.4 + ADIOI_Calc_my_off_len@Base 3.0.4 + ADIOI_Calc_my_req@Base 3.0.4 + ADIOI_Calc_others_req@Base 3.0.4 + ADIOI_Calloc_fn@Base 3.0.4 + ADIOI_Count_contiguous_blocks@Base 3.0.4 + ADIOI_Create_fr_simpletype@Base 3.0.4 + ADIOI_DFLT_ERR_HANDLER@Base 3.0.4 + ADIOI_Datarep_head@Base 3.0.4 + ADIOI_Datatype_iscontig@Base 3.0.4 + ADIOI_Delete_flattened@Base 3.0.4 + ADIOI_End_call@Base 3.0.4 + ADIOI_Err_create_code@Base 3.0.4 + ADIOI_Error@Base 3.0.4 + ADIOI_Exch_file_views@Base 3.0.4 + ADIOI_FAILSAFE_OpenColl@Base 3.0.4 + ADIOI_FAKE_IOComplete@Base 3.0.4 + ADIOI_FAKE_IODone@Base 3.0.4 + ADIOI_FAKE_IreadContig@Base 3.0.4 + ADIOI_FAKE_IreadStrided@Base 3.0.4 + ADIOI_FAKE_IwriteContig@Base 3.0.4 + ADIOI_FAKE_IwriteStrided@Base 3.0.4 + ADIOI_Flatlist@Base 3.0.4 + ADIOI_Flatten@Base 3.0.4 + ADIOI_Flatten_datatype@Base 3.0.4 + ADIOI_Free_fn@Base 3.0.4 + ADIOI_Ftable@Base 3.0.4 + ADIOI_Ftable_max@Base 3.0.4 + ADIOI_Ftable_ptr@Base 3.0.4 + ADIOI_GEN_Close@Base 3.0.4 + ADIOI_GEN_Delete@Base 3.0.4 + ADIOI_GEN_Fcntl@Base 3.0.4 + ADIOI_GEN_Feature@Base 3.0.4 + ADIOI_GEN_Flush@Base 3.0.4 + ADIOI_GEN_IOComplete@Base 3.0.4 + ADIOI_GEN_IODone@Base 3.0.4 + ADIOI_GEN_IreadContig@Base 3.0.4 + ADIOI_GEN_IreadStrided@Base 3.0.4 + ADIOI_GEN_IwriteContig@Base 3.0.4 + ADIOI_GEN_IwriteStrided@Base 3.0.4 + ADIOI_GEN_OpenColl@Base 3.0.4 + ADIOI_GEN_Prealloc@Base 3.0.4 + ADIOI_GEN_ReadContig@Base 3.0.4 + ADIOI_GEN_ReadStrided@Base 3.0.4 + ADIOI_GEN_ReadStridedColl@Base 3.0.4 + ADIOI_GEN_ReadStrided_naive@Base 3.0.4 + ADIOI_GEN_Resize@Base 3.0.4 + ADIOI_GEN_SeekIndividual@Base 3.0.4 + ADIOI_GEN_SetInfo@Base 3.0.4 + ADIOI_GEN_WriteContig@Base 3.0.4 + ADIOI_GEN_WriteStrided@Base 3.0.4 + ADIOI_GEN_WriteStridedColl@Base 3.0.4 + ADIOI_GEN_WriteStrided_naive@Base 3.0.4 + ADIOI_GEN_aio@Base 3.0.4 + ADIOI_GEN_aio_free_fn@Base 3.0.4 + ADIOI_GEN_aio_poll_fn@Base 3.0.4 + ADIOI_GEN_aio_query_fn@Base 3.0.4 + ADIOI_GEN_aio_wait_fn@Base 3.0.4 + ADIOI_Get_byte_offset@Base 3.0.4 + ADIOI_Get_eof_offset@Base 3.0.4 + ADIOI_Get_position@Base 3.0.4 + ADIOI_Heap_create@Base 3.0.4 + ADIOI_Heap_extract_min@Base 3.0.4 + ADIOI_Heap_free@Base 3.0.4 + ADIOI_Heap_insert@Base 3.0.4 + ADIOI_Heap_merge@Base 3.0.4 + ADIOI_IOFiletype@Base 3.0.4 + ADIOI_IOStridedColl@Base 3.0.4 + ADIOI_Malloc_fn@Base 3.0.4 + ADIOI_NFS_Fcntl@Base 3.0.4 + ADIOI_NFS_Feature@Base 3.0.4 + ADIOI_NFS_Get_shared_fp@Base 3.0.4 + ADIOI_NFS_IreadContig@Base 3.0.4 + ADIOI_NFS_IwriteContig@Base 3.0.4 + ADIOI_NFS_Open@Base 3.0.4 + ADIOI_NFS_ReadComplete@Base 3.0.4 + ADIOI_NFS_ReadContig@Base 3.0.4 + ADIOI_NFS_ReadDone@Base 3.0.4 + ADIOI_NFS_ReadStrided@Base 3.0.4 + ADIOI_NFS_Resize@Base 3.0.4 + ADIOI_NFS_Set_shared_fp@Base 3.0.4 + ADIOI_NFS_WriteComplete@Base 3.0.4 + ADIOI_NFS_WriteContig@Base 3.0.4 + ADIOI_NFS_WriteDone@Base 3.0.4 + ADIOI_NFS_WriteStrided@Base 3.0.4 + ADIOI_NFS_aio@Base 3.0.4 + ADIOI_NOLOCK_WriteStrided@Base 3.0.4 + ADIOI_Optimize_flattened@Base 3.0.4 + ADIOI_Print_flatlist_node@Base 3.0.4 + ADIOI_Realloc_fn@Base 3.0.4 + ADIOI_Reqtable@Base 3.0.4 + ADIOI_Reqtable_max@Base 3.0.4 + ADIOI_Reqtable_ptr@Base 3.0.4 + ADIOI_SCALEABLE_OpenColl@Base 3.0.4 + ADIOI_Set_lock@Base 3.0.4 + ADIOI_Shfp_fname@Base 3.0.4 + ADIOI_Strdup@Base 3.0.4 + ADIOI_Strnapp@Base 3.0.4 + ADIOI_Strncpy@Base 3.0.4 + ADIOI_TESTFS_Close@Base 3.0.4 + ADIOI_TESTFS_Delete@Base 3.0.4 + ADIOI_TESTFS_Fcntl@Base 3.0.4 + ADIOI_TESTFS_Flush@Base 3.0.4 + ADIOI_TESTFS_IreadContig@Base 3.0.4 + ADIOI_TESTFS_IreadStrided@Base 3.0.4 + ADIOI_TESTFS_IwriteContig@Base 3.0.4 + ADIOI_TESTFS_IwriteStrided@Base 3.0.4 + ADIOI_TESTFS_Open@Base 3.0.4 + ADIOI_TESTFS_ReadComplete@Base 3.0.4 + ADIOI_TESTFS_ReadContig@Base 3.0.4 + ADIOI_TESTFS_ReadDone@Base 3.0.4 + ADIOI_TESTFS_ReadStrided@Base 3.0.4 + ADIOI_TESTFS_ReadStridedColl@Base 3.0.4 + ADIOI_TESTFS_Resize@Base 3.0.4 + ADIOI_TESTFS_SeekIndividual@Base 3.0.4 + ADIOI_TESTFS_SetInfo@Base 3.0.4 + ADIOI_TESTFS_WriteComplete@Base 3.0.4 + ADIOI_TESTFS_WriteContig@Base 3.0.4 + ADIOI_TESTFS_WriteDone@Base 3.0.4 + ADIOI_TESTFS_WriteStrided@Base 3.0.4 + ADIOI_TESTFS_WriteStridedColl@Base 3.0.4 + ADIOI_UFS_Open@Base 3.0.4 + ADIOI_Verify_fr@Base 3.0.4 + ADIOI_cb_bcast_rank_map@Base 3.0.4 + ADIOI_cb_config_list_keyval@Base 3.0.4 + ADIOI_cb_config_list_parse@Base 3.0.4 + ADIOI_cb_copy_name_array@Base 3.0.4 + ADIOI_cb_delete_name_array@Base 3.0.4 + ADIOI_cb_gather_name_array@Base 3.0.4 + ADIOI_incorporate_system_hints@Base 3.0.4 + ADIOI_init_view_state@Base 3.0.4 + ADIOI_process_system_hints@Base 3.0.4 + ADIOI_syshints@Base 3.0.4 + ADIO_Close@Base 3.0.4 + ADIO_End@Base 3.0.4 + ADIO_Get_shared_fp@Base 3.0.4 + ADIO_ImmediateOpen@Base 3.0.4 + ADIO_Init@Base 3.0.4 + ADIO_Init_keyval@Base 3.0.4 + ADIO_NFS_operations@Base 3.0.4 + ADIO_Open@Base 3.0.4 + ADIO_ResolveFileType@Base 3.0.4 + ADIO_Set_shared_fp@Base 3.0.4 + ADIO_Set_view@Base 3.0.4 + ADIO_TESTFS_operations@Base 3.0.4 + ADIO_Type_create_darray@Base 3.0.4 + ADIO_Type_create_subarray@Base 3.0.4 + ADIO_UFS_operations@Base 3.0.4 + ADIO_same_amode@Base 3.0.4 + CONN_STATE_STR@Base 3.0.4 + CONN_TYPE_STR@Base 3.0.4 + LISTEN_STATE_STR@Base 3.0.4 + MPEI_Thread_start@Base 3.0.4 + MPIC_Irecv@Base 3.0.4 + MPIC_Irecv_ft@Base 3.0.4 + MPIC_Isend@Base 3.0.4 + MPIC_Isend_ft@Base 3.0.4 + MPIC_Probe@Base 3.0.4 + MPIC_Recv@Base 3.0.4 + MPIC_Recv_ft@Base 3.0.4 + MPIC_Send@Base 3.0.4 + MPIC_Send_ft@Base 3.0.4 + MPIC_Sendrecv@Base 3.0.4 + MPIC_Sendrecv_ft@Base 3.0.4 + MPIC_Sendrecv_replace@Base 3.0.4 + MPIC_Sendrecv_replace_ft@Base 3.0.4 + MPIC_Ssend@Base 3.0.4 + MPIC_Ssend_ft@Base 3.0.4 + MPIC_Wait@Base 3.0.4 + MPIC_Waitall_ft@Base 3.0.4 + MPIDI_Accumulate@Base 3.0.4 + MPIDI_Alloc_mem@Base 3.0.4 + MPIDI_Anysource_improbe_fn@Base 3.0.4 + MPIDI_Anysource_iprobe_fn@Base 3.0.4 + MPIDI_CH3I_Acceptq_dequeue@Base 3.0.4 + MPIDI_CH3I_Acceptq_enqueue@Base 3.0.4 + MPIDI_CH3I_BCFree@Base 3.0.4 + MPIDI_CH3I_BCInit@Base 3.0.4 + MPIDI_CH3I_Comm_create_hook@Base 3.0.4 + MPIDI_CH3I_Comm_destroy_hook@Base 3.0.4 + MPIDI_CH3I_Comm_handle_failed_procs@Base 3.0.4 + MPIDI_CH3I_Comm_init@Base 3.0.4 + MPIDI_CH3I_Complete_sendq_with_error@Base 3.0.4 + MPIDI_CH3I_Posted_recv_dequeued@Base 3.0.4 + MPIDI_CH3I_Posted_recv_enqueued@Base 3.0.4 + MPIDI_CH3I_Progress@Base 3.0.4 + MPIDI_CH3I_Progress_finalize@Base 3.0.4 + MPIDI_CH3I_Progress_init@Base 3.0.4 + MPIDI_CH3I_Progress_wakeup@Base 3.0.4 + MPIDI_CH3I_Register_anysource_notification@Base 3.0.4 + MPIDI_CH3I_Release_lock@Base 3.0.4 + MPIDI_CH3I_Seg_alloc@Base 3.0.4 + MPIDI_CH3I_Seg_commit@Base 3.0.4 + MPIDI_CH3I_Seg_destroy@Base 3.0.4 + MPIDI_CH3I_SendNoncontig@Base 3.0.4 + MPIDI_CH3I_Send_lock_granted_pkt@Base 3.0.4 + MPIDI_CH3I_Send_pt_rma_done_pkt@Base 3.0.4 + MPIDI_CH3I_Shm_send_progress@Base 3.0.4 + MPIDI_CH3I_Try_acquire_win_lock@Base 3.0.4 + MPIDI_CH3I_comm_create@Base 3.0.4 + MPIDI_CH3I_comm_destroy@Base 3.0.4 + MPIDI_CH3I_my_pg@Base 3.0.4 + MPIDI_CH3I_my_rank@Base 3.0.4 + MPIDI_CH3I_progress_blocked@Base 3.0.4 + MPIDI_CH3I_progress_completion_count@Base 3.0.4 + MPIDI_CH3I_progress_wakeup_signalled@Base 3.0.4 + MPIDI_CH3I_shm_active_send@Base 3.0.4 + MPIDI_CH3I_shm_sendq@Base 3.0.4 + MPIDI_CH3I_unexpected_recvq_buffer_size@Base 3.0.4 + MPIDI_CH3U_Buffer_copy@Base 3.0.4 + MPIDI_CH3U_Check_for_failed_procs@Base 3.0.4 + MPIDI_CH3U_Comm_FinishPending@Base 3.0.4 + MPIDI_CH3U_Comm_register_create_hook@Base 3.0.4 + MPIDI_CH3U_Comm_register_destroy_hook@Base 3.0.4 + MPIDI_CH3U_Complete_disabled_anysources@Base 3.0.4 + MPIDI_CH3U_Complete_posted_with_error@Base 3.0.4 + MPIDI_CH3U_Dbg_print_recvq@Base 3.0.4 + MPIDI_CH3U_Dump_vc_states@Base 3.0.4 + MPIDI_CH3U_Handle_connection@Base 3.0.4 + MPIDI_CH3U_Handle_recv_pkt@Base 3.0.4 + MPIDI_CH3U_Handle_recv_req@Base 3.0.4 + MPIDI_CH3U_Handle_send_req@Base 3.0.4 + MPIDI_CH3U_Post_data_receive_found@Base 3.0.4 + MPIDI_CH3U_Post_data_receive_unexpected@Base 3.0.4 + MPIDI_CH3U_Receive_data_found@Base 3.0.4 + MPIDI_CH3U_Receive_data_unexpected@Base 3.0.4 + MPIDI_CH3U_Recvq_DP@Base 3.0.4 + MPIDI_CH3U_Recvq_FDP_or_AEU@Base 3.0.4 + MPIDI_CH3U_Recvq_FDU@Base 3.0.4 + MPIDI_CH3U_Recvq_FDU_matchonly@Base 3.0.4 + MPIDI_CH3U_Recvq_FDU_or_AEP@Base 3.0.4 + MPIDI_CH3U_Recvq_FU@Base 3.0.4 + MPIDI_CH3U_Recvq_count_unexp@Base 3.0.4 + MPIDI_CH3U_Recvq_init@Base 3.0.4 + MPIDI_CH3U_Request_load_recv_iov@Base 3.0.4 + MPIDI_CH3U_Request_load_send_iov@Base 3.0.4 + MPIDI_CH3U_Request_unpack_srbuf@Base 3.0.4 + MPIDI_CH3U_Request_unpack_uebuf@Base 3.0.4 + MPIDI_CH3U_SRBuf_pool@Base 3.0.4 + MPIDI_CH3U_VC_SendClose@Base 3.0.4 + MPIDI_CH3U_VC_WaitForClose@Base 3.0.4 + MPIDI_CH3U_Win_allocate@Base 3.0.4 + MPIDI_CH3U_Win_allocate_shared@Base 3.0.4 + MPIDI_CH3U_Win_create@Base 3.0.4 + MPIDI_CH3U_Win_create_dynamic@Base 3.0.4 + MPIDI_CH3U_Win_create_gather@Base 3.0.4 + MPIDI_CH3U_Win_fns@Base 3.0.4 + MPIDI_CH3_Abort@Base 3.0.4 + MPIDI_CH3_Connect_to_root@Base 3.0.4 + MPIDI_CH3_Connection_terminate@Base 3.0.4 + MPIDI_CH3_EagerContigIsend@Base 3.0.4 + MPIDI_CH3_EagerContigSend@Base 3.0.4 + MPIDI_CH3_EagerContigShortSend@Base 3.0.4 + MPIDI_CH3_EagerNoncontigSend@Base 3.0.4 + MPIDI_CH3_EagerSyncAck@Base 3.0.4 + MPIDI_CH3_EagerSyncNoncontigSend@Base 3.0.4 + MPIDI_CH3_EagerSyncZero@Base 3.0.4 + MPIDI_CH3_Finalize@Base 3.0.4 + MPIDI_CH3_Finish_rma_op_target@Base 3.0.4 + MPIDI_CH3_FreeParentPort@Base 3.0.4 + MPIDI_CH3_GetParentPort@Base 3.0.4 + MPIDI_CH3_Get_business_card@Base 3.0.4 + MPIDI_CH3_Init@Base 3.0.4 + MPIDI_CH3_InitCompleted@Base 3.0.4 + MPIDI_CH3_PG_Destroy@Base 3.0.4 + MPIDI_CH3_PG_Init@Base 3.0.4 + MPIDI_CH3_PktHandler_Accumulate@Base 3.0.4 + MPIDI_CH3_PktHandler_Accumulate_Immed@Base 3.0.4 + MPIDI_CH3_PktHandler_CAS@Base 3.0.4 + MPIDI_CH3_PktHandler_CASResp@Base 3.0.4 + MPIDI_CH3_PktHandler_CancelSendReq@Base 3.0.4 + MPIDI_CH3_PktHandler_CancelSendResp@Base 3.0.4 + MPIDI_CH3_PktHandler_Close@Base 3.0.4 + MPIDI_CH3_PktHandler_EagerSend@Base 3.0.4 + MPIDI_CH3_PktHandler_EagerShortSend@Base 3.0.4 + MPIDI_CH3_PktHandler_EagerSyncAck@Base 3.0.4 + MPIDI_CH3_PktHandler_EagerSyncSend@Base 3.0.4 + MPIDI_CH3_PktHandler_EndCH3@Base 3.0.4 + MPIDI_CH3_PktHandler_FOP@Base 3.0.4 + MPIDI_CH3_PktHandler_FOPResp@Base 3.0.4 + MPIDI_CH3_PktHandler_FlowCntlUpdate@Base 3.0.4 + MPIDI_CH3_PktHandler_Flush@Base 3.0.4 + MPIDI_CH3_PktHandler_Get@Base 3.0.4 + MPIDI_CH3_PktHandler_GetResp@Base 3.0.4 + MPIDI_CH3_PktHandler_Get_AccumResp@Base 3.0.4 + MPIDI_CH3_PktHandler_Init@Base 3.0.4 + MPIDI_CH3_PktHandler_Lock@Base 3.0.4 + MPIDI_CH3_PktHandler_LockAccumUnlock@Base 3.0.4 + MPIDI_CH3_PktHandler_LockGetUnlock@Base 3.0.4 + MPIDI_CH3_PktHandler_LockGranted@Base 3.0.4 + MPIDI_CH3_PktHandler_LockPutUnlock@Base 3.0.4 + MPIDI_CH3_PktHandler_PtRMADone@Base 3.0.4 + MPIDI_CH3_PktHandler_Put@Base 3.0.4 + MPIDI_CH3_PktHandler_ReadySend@Base 3.0.4 + MPIDI_CH3_PktHandler_RndvClrToSend@Base 3.0.4 + MPIDI_CH3_PktHandler_RndvReqToSend@Base 3.0.4 + MPIDI_CH3_PktHandler_RndvSend@Base 3.0.4 + MPIDI_CH3_PktHandler_Unlock@Base 3.0.4 + MPIDI_CH3_PortFnsInit@Base 3.0.4 + MPIDI_CH3_RecvFromSelf@Base 3.0.4 + MPIDI_CH3_RecvRndv@Base 3.0.4 + MPIDI_CH3_ReqHandler_AccumRespDerivedDTComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_FOPComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_GetAccumRespComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_GetRespDerivedDTComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_GetSendRespComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_PutAccumRespComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_PutRespDerivedDTComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_RecvComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_ReloadIOV@Base 3.0.4 + MPIDI_CH3_ReqHandler_SendReloadIOV@Base 3.0.4 + MPIDI_CH3_ReqHandler_SinglePutAccumComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_UnpackSRBufComplete@Base 3.0.4 + MPIDI_CH3_ReqHandler_UnpackSRBufReloadIOV@Base 3.0.4 + MPIDI_CH3_ReqHandler_UnpackUEBufComplete@Base 3.0.4 + MPIDI_CH3_Request_destroy@Base 3.0.4 + MPIDI_CH3_RndvSend@Base 3.0.4 + MPIDI_CH3_SHM_Win_free@Base 3.0.4 + MPIDI_CH3_SHM_Win_shared_query@Base 3.0.4 + MPIDI_CH3_SendNoncontig_iov@Base 3.0.4 + MPIDI_CH3_Start_rma_op_target@Base 3.0.4 + MPIDI_CH3_VC_Destroy@Base 3.0.4 + MPIDI_CH3_VC_Init@Base 3.0.4 + MPIDI_CH3_Win_fns_init@Base 3.0.4 + MPIDI_CH3_iSend@Base 3.0.4 + MPIDI_CH3_iSendv@Base 3.0.4 + MPIDI_CH3_iStartMsg@Base 3.0.4 + MPIDI_CH3_iStartMsgv@Base 3.0.4 + MPIDI_CH3_packet_buffer@Base 3.0.4 + MPIDI_Comm_accept@Base 3.0.4 + MPIDI_Comm_connect@Base 3.0.4 + MPIDI_Comm_spawn_multiple@Base 3.0.4 + MPIDI_Compare_and_swap@Base 3.0.4 + MPIDI_Dataloop_dot_printf@Base 3.0.4 + MPIDI_Datatype_contents_printf@Base 3.0.4 + MPIDI_Datatype_dot_printf@Base 3.0.4 + MPIDI_Datatype_get_basic_size_external32@Base 3.0.4 + MPIDI_Datatype_get_contents_aints@Base 3.0.4 + MPIDI_Datatype_get_contents_ints@Base 3.0.4 + MPIDI_Datatype_get_contents_types@Base 3.0.4 + MPIDI_Datatype_printf@Base 3.0.4 + MPIDI_Failed_procs_group@Base 3.0.4 + MPIDI_Failed_vc_count@Base 3.0.4 + MPIDI_Fetch_and_op@Base 3.0.4 + MPIDI_Free_mem@Base 3.0.4 + MPIDI_Get@Base 3.0.4 + MPIDI_GetIPInterface@Base 3.0.4 + MPIDI_GetTagFromPort@Base 3.0.4 + MPIDI_Get_IP_for_iface@Base 3.0.4 + MPIDI_Get_accumulate@Base 3.0.4 + MPIDI_Isend_self@Base 3.0.4 + MPIDI_PG_CheckForSingleton@Base 3.0.4 + MPIDI_PG_Close_VCs@Base 3.0.4 + MPIDI_PG_Create@Base 3.0.4 + MPIDI_PG_Create_from_string@Base 3.0.4 + MPIDI_PG_Destroy@Base 3.0.4 + MPIDI_PG_Dup_vcr@Base 3.0.4 + MPIDI_PG_Finalize@Base 3.0.4 + MPIDI_PG_Find@Base 3.0.4 + MPIDI_PG_GetConnKVSname@Base 3.0.4 + MPIDI_PG_GetConnString@Base 3.0.4 + MPIDI_PG_Get_iterator@Base 3.0.4 + MPIDI_PG_Get_next@Base 3.0.4 + MPIDI_PG_Has_next@Base 3.0.4 + MPIDI_PG_IdToNum@Base 3.0.4 + MPIDI_PG_Id_compare@Base 3.0.4 + MPIDI_PG_Init@Base 3.0.4 + MPIDI_PG_InitConnKVS@Base 3.0.4 + MPIDI_PG_InitConnString@Base 3.0.4 + MPIDI_PG_SetConnInfo@Base 3.0.4 + MPIDI_PG_To_string@Base 3.0.4 + MPIDI_Pkt_GetDescString@Base 3.0.4 + MPIDI_Populate_vc_node_ids@Base 3.0.4 + MPIDI_Process@Base 3.0.4 + MPIDI_Put@Base 3.0.4 + MPIDI_Raccumulate@Base 3.0.4 + MPIDI_Rget@Base 3.0.4 + MPIDI_Rget_accumulate@Base 3.0.4 + MPIDI_Rput@Base 3.0.4 + MPIDI_SHM_Win_free@Base 3.0.4 + MPIDI_Use_pmi2_api@Base 3.0.4 + MPIDI_VC_GetStateString@Base 3.0.4 + MPIDI_VC_Init@Base 3.0.4 + MPIDI_Win_attach@Base 3.0.4 + MPIDI_Win_complete@Base 3.0.4 + MPIDI_Win_detach@Base 3.0.4 + MPIDI_Win_fence@Base 3.0.4 + MPIDI_Win_flush@Base 3.0.4 + MPIDI_Win_flush_all@Base 3.0.4 + MPIDI_Win_flush_local@Base 3.0.4 + MPIDI_Win_flush_local_all@Base 3.0.4 + MPIDI_Win_fns_init@Base 3.0.4 + MPIDI_Win_free@Base 3.0.4 + MPIDI_Win_get_info@Base 3.0.4 + MPIDI_Win_lock@Base 3.0.4 + MPIDI_Win_lock_all@Base 3.0.4 + MPIDI_Win_post@Base 3.0.4 + MPIDI_Win_set_info@Base 3.0.4 + MPIDI_Win_shared_query@Base 3.0.4 + MPIDI_Win_start@Base 3.0.4 + MPIDI_Win_sync@Base 3.0.4 + MPIDI_Win_test@Base 3.0.4 + MPIDI_Win_unlock@Base 3.0.4 + MPIDI_Win_unlock_all@Base 3.0.4 + MPIDI_Win_wait@Base 3.0.4 + MPIDI_dbg_printf@Base 3.0.4 + MPIDI_err_printf@Base 3.0.4 + MPIDI_nem_ckpt_finalize@Base 3.0.4 + MPIDI_nem_ckpt_finish@Base 3.0.4 + MPIDI_nem_ckpt_finish_checkpoint@Base 3.0.4 + MPIDI_nem_ckpt_init@Base 3.0.4 + MPIDI_nem_ckpt_pkthandler_init@Base 3.0.4 + MPIDI_nem_ckpt_start@Base 3.0.4 + MPIDI_nem_ckpt_start_checkpoint@Base 3.0.4 + MPIDI_nem_none_funcs@Base 3.0.4 + MPIDI_nem_tcp_funcs@Base 3.0.4 + MPIDU_Datatype_builtin_to_string@Base 3.0.4 + MPIDU_Datatype_combiner_to_string@Base 3.0.4 + MPIDU_Datatype_debug@Base 3.0.4 + MPIDU_Sched_are_pending@Base 3.0.4 + MPIDU_Sched_dump@Base 3.0.4 + MPIDU_Sched_dump_fh@Base 3.0.4 + MPIDU_Sched_progress@Base 3.0.4 + MPID_Abort@Base 3.0.4 + MPID_Alloc_mem@Base 3.0.4 + MPID_Attr_alloc@Base 3.0.4 + MPID_Attr_direct@Base 3.0.4 + MPID_Attr_free@Base 3.0.4 + MPID_Attr_mem@Base 3.0.4 + MPID_Bsend_init@Base 3.0.4 + MPID_Cancel_recv@Base 3.0.4 + MPID_Cancel_send@Base 3.0.4 + MPID_Close_port@Base 3.0.4 + MPID_Comm_accept@Base 3.0.4 + MPID_Comm_builtin@Base 3.0.4 + MPID_Comm_connect@Base 3.0.4 + MPID_Comm_direct@Base 3.0.4 + MPID_Comm_disconnect@Base 3.0.4 + MPID_Comm_fns@Base 3.0.4 + MPID_Comm_group_failed@Base 3.0.4 + MPID_Comm_mem@Base 3.0.4 + MPID_Comm_reenable_anysource@Base 3.0.4 + MPID_Comm_remote_group_failed@Base 3.0.4 + MPID_Comm_spawn_multiple@Base 3.0.4 + MPID_Dataloop_alloc@Base 3.0.4 + MPID_Dataloop_alloc_and_copy@Base 3.0.4 + MPID_Dataloop_copy@Base 3.0.4 + MPID_Dataloop_create@Base 3.0.4 + MPID_Dataloop_create_blockindexed@Base 3.0.4 + MPID_Dataloop_create_contiguous@Base 3.0.4 + MPID_Dataloop_create_indexed@Base 3.0.4 + MPID_Dataloop_create_pairtype@Base 3.0.4 + MPID_Dataloop_create_struct@Base 3.0.4 + MPID_Dataloop_create_vector@Base 3.0.4 + MPID_Dataloop_dup@Base 3.0.4 + MPID_Dataloop_free@Base 3.0.4 + MPID_Dataloop_print@Base 3.0.4 + MPID_Dataloop_stream_size@Base 3.0.4 + MPID_Dataloop_struct_alloc@Base 3.0.4 + MPID_Dataloop_update@Base 3.0.4 + MPID_Datatype_builtin@Base 3.0.4 + MPID_Datatype_direct@Base 3.0.4 + MPID_Datatype_free@Base 3.0.4 + MPID_Datatype_free_contents@Base 3.0.4 + MPID_Datatype_mem@Base 3.0.4 + MPID_Datatype_set_contents@Base 3.0.4 + MPID_Datatype_size_external32@Base 3.0.4 + MPID_Errhandler_builtin@Base 3.0.4 + MPID_Errhandler_direct@Base 3.0.4 + MPID_Errhandler_free@Base 3.0.4 + MPID_Errhandler_mem@Base 3.0.4 + MPID_Finalize@Base 3.0.4 + MPID_Free_mem@Base 3.0.4 + MPID_GPID_Get@Base 3.0.4 + MPID_GPID_GetAllInComm@Base 3.0.4 + MPID_GPID_ToLpidArray@Base 3.0.4 + MPID_Generic_wtick@Base 3.0.4 + MPID_Get_max_node_id@Base 3.0.4 + MPID_Get_node_id@Base 3.0.4 + MPID_Get_processor_name@Base 3.0.4 + MPID_Get_universe_size@Base 3.0.4 + MPID_Grequest_class_direct@Base 3.0.4 + MPID_Grequest_class_mem@Base 3.0.4 + MPID_Group_builtin@Base 3.0.4 + MPID_Group_direct@Base 3.0.4 + MPID_Group_empty@Base 3.0.4 + MPID_Group_mem@Base 3.0.4 + MPID_Improbe@Base 3.0.4 + MPID_Imrecv@Base 3.0.4 + MPID_Info_builtin@Base 3.0.4 + MPID_Info_direct@Base 3.0.4 + MPID_Info_mem@Base 3.0.4 + MPID_Init@Base 3.0.4 + MPID_InitCompleted@Base 3.0.4 + MPID_Iprobe@Base 3.0.4 + MPID_Irecv@Base 3.0.4 + MPID_Irsend@Base 3.0.4 + MPID_Isend@Base 3.0.4 + MPID_Issend@Base 3.0.4 + MPID_Keyval_direct@Base 3.0.4 + MPID_Keyval_mem@Base 3.0.4 + MPID_Mprobe@Base 3.0.4 + MPID_Mrecv@Base 3.0.4 + MPID_NS_Create@Base 3.0.4 + MPID_NS_Free@Base 3.0.4 + MPID_NS_Lookup@Base 3.0.4 + MPID_NS_Publish@Base 3.0.4 + MPID_NS_Unpublish@Base 3.0.4 + MPID_Op_builtin@Base 3.0.4 + MPID_Op_direct@Base 3.0.4 + MPID_Op_mem@Base 3.0.4 + MPID_Open_port@Base 3.0.4 + MPID_PG_BCast@Base 3.0.4 + MPID_PG_ForwardPGInfo@Base 3.0.4 + MPID_Probe@Base 3.0.4 + MPID_Recv@Base 3.0.4 + MPID_Recv_init@Base 3.0.4 + MPID_Request_create@Base 3.0.4 + MPID_Request_direct@Base 3.0.4 + MPID_Request_mem@Base 3.0.4 + MPID_Request_set_completed@Base 3.0.4 + MPID_Rsend@Base 3.0.4 + MPID_Rsend_init@Base 3.0.4 + MPID_Sched_barrier@Base 3.0.4 + MPID_Sched_cb2@Base 3.0.4 + MPID_Sched_cb@Base 3.0.4 + MPID_Sched_clone@Base 3.0.4 + MPID_Sched_copy@Base 3.0.4 + MPID_Sched_create@Base 3.0.4 + MPID_Sched_next_tag@Base 3.0.4 + MPID_Sched_recv@Base 3.0.4 + MPID_Sched_recv_status@Base 3.0.4 + MPID_Sched_reduce@Base 3.0.4 + MPID_Sched_send@Base 3.0.4 + MPID_Sched_send_defer@Base 3.0.4 + MPID_Sched_ssend@Base 3.0.4 + MPID_Sched_start@Base 3.0.4 + MPID_Segment_alloc@Base 3.0.4 + MPID_Segment_blkidx_m2m@Base 3.0.4 + MPID_Segment_contig_m2m@Base 3.0.4 + MPID_Segment_count_contig_blocks@Base 3.0.4 + MPID_Segment_flatten@Base 3.0.4 + MPID_Segment_free@Base 3.0.4 + MPID_Segment_index_m2m@Base 3.0.4 + MPID_Segment_init@Base 3.0.4 + MPID_Segment_manipulate@Base 3.0.4 + MPID_Segment_mpi_flatten@Base 3.0.4 + MPID_Segment_pack@Base 3.0.4 + MPID_Segment_pack_external32@Base 3.0.4 + MPID_Segment_pack_vector@Base 3.0.4 + MPID_Segment_unpack@Base 3.0.4 + MPID_Segment_unpack_external32@Base 3.0.4 + MPID_Segment_unpack_vector@Base 3.0.4 + MPID_Segment_vector_m2m@Base 3.0.4 + MPID_Send@Base 3.0.4 + MPID_Send_init@Base 3.0.4 + MPID_Ssend@Base 3.0.4 + MPID_Ssend_init@Base 3.0.4 + MPID_Startall@Base 3.0.4 + MPID_TimerStateBegin@Base 3.0.4 + MPID_TimerStateEnd@Base 3.0.4 + MPID_Type_access_contents@Base 3.0.4 + MPID_Type_blockindexed@Base 3.0.4 + MPID_Type_blockindexed_count_contig@Base 3.0.4 + MPID_Type_commit@Base 3.0.4 + MPID_Type_contiguous@Base 3.0.4 + MPID_Type_convert_darray@Base 3.0.4 + MPID_Type_convert_subarray@Base 3.0.4 + MPID_Type_create_pairtype@Base 3.0.4 + MPID_Type_create_resized@Base 3.0.4 + MPID_Type_dup@Base 3.0.4 + MPID_Type_get_contents@Base 3.0.4 + MPID_Type_get_envelope@Base 3.0.4 + MPID_Type_indexed@Base 3.0.4 + MPID_Type_indexed_count_contig@Base 3.0.4 + MPID_Type_release_contents@Base 3.0.4 + MPID_Type_struct@Base 3.0.4 + MPID_Type_vector@Base 3.0.4 + MPID_Type_zerolen@Base 3.0.4 + MPID_VCRT_Add_ref@Base 3.0.4 + MPID_VCRT_Create@Base 3.0.4 + MPID_VCRT_Get_ptr@Base 3.0.4 + MPID_VCRT_Release@Base 3.0.4 + MPID_VCR_CommFromLpids@Base 3.0.4 + MPID_VCR_Dup@Base 3.0.4 + MPID_VCR_Get_lpid@Base 3.0.4 + MPID_Win_allocate@Base 3.0.4 + MPID_Win_allocate_shared@Base 3.0.4 + MPID_Win_create@Base 3.0.4 + MPID_Win_create_dynamic@Base 3.0.4 + MPID_Win_direct@Base 3.0.4 + MPID_Win_get_info@Base 3.0.4 + MPID_Win_mem@Base 3.0.4 + MPID_Win_set_info@Base 3.0.4 + MPID_Wtick@Base 3.0.4 + MPID_Wtime@Base 3.0.4 + MPID_Wtime_acc@Base 3.0.4 + MPID_Wtime_diff@Base 3.0.4 + MPID_Wtime_todouble@Base 3.0.4 + MPID_nem_asymm_base_addr@Base 3.0.4 + MPID_nem_barrier@Base 3.0.4 + MPID_nem_barrier_init@Base 3.0.4 + MPID_nem_barrier_vars_init@Base 3.0.4 + MPID_nem_choose_netmod@Base 3.0.4 + MPID_nem_coll_init@Base 3.0.4 + MPID_nem_connect_to_root@Base 3.0.4 + MPID_nem_curr_fbox_all_poll@Base 3.0.4 + MPID_nem_curr_fboxq_elem@Base 3.0.4 + MPID_nem_dbg_dump_cell@Base 3.0.4 + MPID_nem_dbg_print_all_sendq@Base 3.0.4 + MPID_nem_dbg_print_vc_sendq@Base 3.0.4 + MPID_nem_fbox_fall_back_to_queue_count@Base 3.0.4 + MPID_nem_fboxq_elem_list@Base 3.0.4 + MPID_nem_fboxq_elem_list_last@Base 3.0.4 + MPID_nem_fboxq_head@Base 3.0.4 + MPID_nem_fboxq_tail@Base 3.0.4 + MPID_nem_finalize@Base 3.0.4 + MPID_nem_get_business_card@Base 3.0.4 + MPID_nem_handle_pkt@Base 3.0.4 + MPID_nem_hostname@Base 3.0.4 + MPID_nem_init@Base 3.0.4 + MPID_nem_lmt_RndvRecv@Base 3.0.4 + MPID_nem_lmt_RndvSend@Base 3.0.4 + MPID_nem_lmt_pkthandler_init@Base 3.0.4 + MPID_nem_lmt_shm_done_recv@Base 3.0.4 + MPID_nem_lmt_shm_done_send@Base 3.0.4 + MPID_nem_lmt_shm_handle_cookie@Base 3.0.4 + MPID_nem_lmt_shm_initiate_lmt@Base 3.0.4 + MPID_nem_lmt_shm_progress@Base 3.0.4 + MPID_nem_lmt_shm_start_recv@Base 3.0.4 + MPID_nem_lmt_shm_start_send@Base 3.0.4 + MPID_nem_lmt_shm_vc_terminated@Base 3.0.4 + MPID_nem_local_lmt_pending@Base 3.0.4 + MPID_nem_local_lmt_progress@Base 3.0.4 + MPID_nem_mem_region@Base 3.0.4 + MPID_nem_mpich_init@Base 3.0.4 + MPID_nem_net_module_vc_dbg_print_sendq@Base 3.0.4 + MPID_nem_netmod_func@Base 3.0.4 + MPID_nem_netmod_funcs@Base 3.0.4 + MPID_nem_netmod_id@Base 3.0.4 + MPID_nem_netmod_strings@Base 3.0.4 + MPID_nem_network_poll@Base 3.0.4 + MPID_nem_num_netmods@Base 3.0.4 + MPID_nem_prefetched_cell@Base 3.0.4 + MPID_nem_recv_seqno@Base 3.0.4 + MPID_nem_register_initcomp_cb@Base 3.0.4 + MPID_nem_send_iov@Base 3.0.4 + MPID_nem_tcp_SendNoncontig@Base 3.0.4 + MPID_nem_tcp_bind@Base 3.0.4 + MPID_nem_tcp_check_sock_status@Base 3.0.4 + MPID_nem_tcp_ckpt_cleanup@Base 3.0.4 + MPID_nem_tcp_ckpt_continue_vc@Base 3.0.4 + MPID_nem_tcp_ckpt_pause_send_vc@Base 3.0.4 + MPID_nem_tcp_ckpt_restart_vc@Base 3.0.4 + MPID_nem_tcp_cleanup@Base 3.0.4 + MPID_nem_tcp_cleanup_on_error@Base 3.0.4 + MPID_nem_tcp_conn_est@Base 3.0.4 + MPID_nem_tcp_connect@Base 3.0.4 + MPID_nem_tcp_connect_to_root@Base 3.0.4 + MPID_nem_tcp_connpoll@Base 3.0.4 + MPID_nem_tcp_error_out_send_queue@Base 3.0.4 + MPID_nem_tcp_finalize@Base 3.0.4 + MPID_nem_tcp_g_lstn_plfd@Base 3.0.4 + MPID_nem_tcp_g_lstn_sc@Base 3.0.4 + MPID_nem_tcp_get_addr_port_from_bc@Base 3.0.4 + MPID_nem_tcp_get_business_card@Base 3.0.4 + MPID_nem_tcp_get_conninfo@Base 3.0.4 + MPID_nem_tcp_get_vc_from_conninfo@Base 3.0.4 + MPID_nem_tcp_iSendContig@Base 3.0.4 + MPID_nem_tcp_iStartContigMsg@Base 3.0.4 + MPID_nem_tcp_iStartContigMsg_paused@Base 3.0.4 + MPID_nem_tcp_init@Base 3.0.4 + MPID_nem_tcp_is_sock_connected@Base 3.0.4 + MPID_nem_tcp_pkt_unpause_handler@Base 3.0.4 + MPID_nem_tcp_plfd_tbl@Base 3.0.4 + MPID_nem_tcp_send_finalize@Base 3.0.4 + MPID_nem_tcp_send_init@Base 3.0.4 + MPID_nem_tcp_send_queued@Base 3.0.4 + MPID_nem_tcp_set_sockopts@Base 3.0.4 + MPID_nem_tcp_sm_finalize@Base 3.0.4 + MPID_nem_tcp_sm_init@Base 3.0.4 + MPID_nem_tcp_state_listening_handler@Base 3.0.4 + MPID_nem_tcp_vc_dbg_print_sendq@Base 3.0.4 + MPID_nem_tcp_vc_destroy@Base 3.0.4 + MPID_nem_tcp_vc_init@Base 3.0.4 + MPID_nem_tcp_vc_terminate@Base 3.0.4 + MPID_nem_tcp_vc_terminated@Base 3.0.4 + MPID_nem_vc_destroy@Base 3.0.4 + MPID_nem_vc_init@Base 3.0.4 + MPIFCMB1@Base 3.0.4 + MPIFCMB1_@Base 3.0.4 + MPIFCMB2@Base 3.0.4 + MPIFCMB2_@Base 3.0.4 + MPIFCMB3@Base 3.0.4 + MPIFCMB3_@Base 3.0.4 + MPIFCMB4@Base 3.0.4 + MPIFCMB4_@Base 3.0.4 + MPIFCMB5@Base 3.0.4 + MPIFCMB5_@Base 3.0.4 + MPIFCMB6@Base 3.0.4 + MPIFCMB6_@Base 3.0.4 + MPIFCMB7@Base 3.0.4 + MPIFCMB7_@Base 3.0.4 + MPIFCMB8@Base 3.0.4 + MPIFCMB8_@Base 3.0.4 + MPIFCMB9@Base 3.0.4 + MPIFCMB9_@Base 3.0.4 + MPIOI_File_iread@Base 3.0.4 + MPIOI_File_iwrite@Base 3.0.4 + MPIOI_File_read@Base 3.0.4 + MPIOI_File_read_all@Base 3.0.4 + MPIOI_File_read_all_begin@Base 3.0.4 + MPIOI_File_read_all_end@Base 3.0.4 + MPIOI_File_write@Base 3.0.4 + MPIOI_File_write_all@Base 3.0.4 + MPIOI_File_write_all_begin@Base 3.0.4 + MPIOI_File_write_all_end@Base 3.0.4 + MPIO_Completed_request_create@Base 3.0.4 + MPIO_Err_create_code@Base 3.0.4 + MPIO_Err_return_comm@Base 3.0.4 + MPIO_Err_return_file@Base 3.0.4 + MPIO_File_c2f@Base 3.0.4 + MPIO_File_create@Base 3.0.4 + MPIO_File_f2c@Base 3.0.4 + MPIO_File_free@Base 3.0.4 + MPIO_File_resolve@Base 3.0.4 + MPIR_Add_finalize@Base 3.0.4 + MPIR_Allgather@Base 3.0.4 + MPIR_Allgather_impl@Base 3.0.4 + MPIR_Allgather_inter@Base 3.0.4 + MPIR_Allgather_intra@Base 3.0.4 + MPIR_Allgatherv@Base 3.0.4 + MPIR_Allgatherv_impl@Base 3.0.4 + MPIR_Allgatherv_inter@Base 3.0.4 + MPIR_Allgatherv_intra@Base 3.0.4 + MPIR_Allreduce@Base 3.0.4 + MPIR_Allreduce_group@Base 3.0.4 + MPIR_Allreduce_group_intra@Base 3.0.4 + MPIR_Allreduce_impl@Base 3.0.4 + MPIR_Allreduce_inter@Base 3.0.4 + MPIR_Allreduce_intra@Base 3.0.4 + MPIR_Alltoall@Base 3.0.4 + MPIR_Alltoall_impl@Base 3.0.4 + MPIR_Alltoall_inter@Base 3.0.4 + MPIR_Alltoall_intra@Base 3.0.4 + MPIR_Alltoallv@Base 3.0.4 + MPIR_Alltoallv_impl@Base 3.0.4 + MPIR_Alltoallv_inter@Base 3.0.4 + MPIR_Alltoallv_intra@Base 3.0.4 + MPIR_Alltoallw@Base 3.0.4 + MPIR_Alltoallw_impl@Base 3.0.4 + MPIR_Alltoallw_inter@Base 3.0.4 + MPIR_Alltoallw_intra@Base 3.0.4 + MPIR_Assert_fail@Base 3.0.4 + MPIR_Assert_fail_fmt@Base 3.0.4 + MPIR_Attr_copy_c_proxy@Base 3.0.4 + MPIR_Attr_delete_c_proxy@Base 3.0.4 + MPIR_Attr_delete_list@Base 3.0.4 + MPIR_Attr_dup_list@Base 3.0.4 + MPIR_BAND@Base 3.0.4 + MPIR_BAND_check_dtype@Base 3.0.4 + MPIR_BOR@Base 3.0.4 + MPIR_BOR_check_dtype@Base 3.0.4 + MPIR_BXOR@Base 3.0.4 + MPIR_BXOR_check_dtype@Base 3.0.4 + MPIR_Barrier@Base 3.0.4 + MPIR_Barrier_group@Base 3.0.4 + MPIR_Barrier_impl@Base 3.0.4 + MPIR_Barrier_inter@Base 3.0.4 + MPIR_Barrier_intra@Base 3.0.4 + MPIR_Bcast@Base 3.0.4 + MPIR_Bcast_impl@Base 3.0.4 + MPIR_Bcast_inter@Base 3.0.4 + MPIR_Bcast_intra@Base 3.0.4 + MPIR_Bsend_attach@Base 3.0.4 + MPIR_Bsend_detach@Base 3.0.4 + MPIR_Bsend_isend@Base 3.0.4 + MPIR_Call_attr_copy@Base 3.0.4 + MPIR_Call_attr_delete@Base 3.0.4 + MPIR_Cancel_impl@Base 3.0.4 + MPIR_Cart_create@Base 3.0.4 + MPIR_Cart_create_impl@Base 3.0.4 + MPIR_Cart_map@Base 3.0.4 + MPIR_Cart_map_impl@Base 3.0.4 + MPIR_Cart_rank_impl@Base 3.0.4 + MPIR_Cart_shift_impl@Base 3.0.4 + MPIR_CleanupThreadStorage@Base 3.0.4 + MPIR_Close_port_impl@Base 3.0.4 + MPIR_CommGetAttr@Base 3.0.4 + MPIR_CommGetAttr_fort@Base 3.0.4 + MPIR_CommSetAttr@Base 3.0.4 + MPIR_Comm_accept_impl@Base 3.0.4 + MPIR_Comm_apply_hints@Base 3.0.4 + MPIR_Comm_commit@Base 3.0.4 + MPIR_Comm_connect_impl@Base 3.0.4 + MPIR_Comm_copy@Base 3.0.4 + MPIR_Comm_copy_data@Base 3.0.4 + MPIR_Comm_create@Base 3.0.4 + MPIR_Comm_create_calculate_mapping@Base 3.0.4 + MPIR_Comm_create_create_and_map_vcrt@Base 3.0.4 + MPIR_Comm_create_errhandler_impl@Base 3.0.4 + MPIR_Comm_create_keyval_impl@Base 3.0.4 + MPIR_Comm_delete_attr_impl@Base 3.0.4 + MPIR_Comm_delete_internal@Base 3.0.4 + MPIR_Comm_dup_impl@Base 3.0.4 + MPIR_Comm_dup_with_info_impl@Base 3.0.4 + MPIR_Comm_free_impl@Base 3.0.4 + MPIR_Comm_free_keyval_impl@Base 3.0.4 + MPIR_Comm_get_errhandler_impl@Base 3.0.4 + MPIR_Comm_get_info_impl@Base 3.0.4 + MPIR_Comm_get_name_impl@Base 3.0.4 + MPIR_Comm_group_impl@Base 3.0.4 + MPIR_Comm_idup_impl@Base 3.0.4 + MPIR_Comm_init@Base 3.0.4 + MPIR_Comm_is_node_aware@Base 3.0.4 + MPIR_Comm_is_node_consecutive@Base 3.0.4 + MPIR_Comm_register_hint@Base 3.0.4 + MPIR_Comm_release_always@Base 3.0.4 + MPIR_Comm_remote_group_impl@Base 3.0.4 + MPIR_Comm_set_attr_impl@Base 3.0.4 + MPIR_Comm_set_errhandler_impl@Base 3.0.4 + MPIR_Comm_set_info_impl@Base 3.0.4 + MPIR_Comm_split_impl@Base 3.0.4 + MPIR_Comm_split_type_impl@Base 3.0.4 + MPIR_Compare_equal@Base 3.0.4 + MPIR_ContextMaskStats@Base 3.0.4 + MPIR_ContextMaskToStr@Base 3.0.4 + MPIR_Create_unnamed_predefined@Base 3.0.4 + MPIR_DatatypeAttrFinalize@Base 3.0.4 + MPIR_Datatype_builtin_fillin@Base 3.0.4 + MPIR_Datatype_init@Base 3.0.4 + MPIR_Datatype_init_names@Base 3.0.4 + MPIR_Datatype_iscontig@Base 3.0.4 + MPIR_Dims_create@Base 3.0.4 + MPIR_Dist_graph_neighbors_count_impl@Base 3.0.4 + MPIR_Dist_graph_neighbors_impl@Base 3.0.4 + MPIR_Dup_fn@Base 3.0.4 + MPIR_Err_add_class@Base 3.0.4 + MPIR_Err_add_code@Base 3.0.4 + MPIR_Err_combine_codes@Base 3.0.4 + MPIR_Err_create_code@Base 3.0.4 + MPIR_Err_create_code_valist@Base 3.0.4 + MPIR_Err_get_dynerr_string@Base 3.0.4 + MPIR_Err_get_string@Base 3.0.4 + MPIR_Err_init@Base 3.0.4 + MPIR_Err_is_fatal@Base 3.0.4 + MPIR_Err_preOrPostInit@Base 3.0.4 + MPIR_Err_return_comm@Base 3.0.4 + MPIR_Err_return_win@Base 3.0.4 + MPIR_Err_set_msg@Base 3.0.4 + MPIR_Errhandler_set_cxx@Base 3.0.4 + MPIR_Exscan@Base 3.0.4 + MPIR_Exscan_impl@Base 3.0.4 + MPIR_Ext_assert_fail@Base 3.0.4 + MPIR_Ext_cs_enter_allfunc@Base 3.0.4 + MPIR_Ext_cs_exit_allfunc@Base 3.0.4 + MPIR_Ext_datatype_iscommitted@Base 3.0.4 + MPIR_Ext_dbg_romio_terse_enabled@Base 3.0.4 + MPIR_Ext_dbg_romio_typical_enabled@Base 3.0.4 + MPIR_Ext_dbg_romio_verbose_enabled@Base 3.0.4 + MPIR_Ext_init@Base 3.0.4 + MPIR_F_FALSE@Base 3.0.4 + MPIR_F_MPI_BOTTOM@Base 3.0.4 + MPIR_F_MPI_IN_PLACE@Base 3.0.4 + MPIR_F_MPI_UNWEIGHTED@Base 3.0.4 + MPIR_F_MPI_WEIGHTS_EMPTY@Base 3.0.4 + MPIR_F_NeedInit@Base 3.0.4 + MPIR_F_TRUE@Base 3.0.4 + MPIR_File_call_cxx_errhandler@Base 3.0.4 + MPIR_Finalize_async_thread@Base 3.0.4 + MPIR_Free_contextid@Base 3.0.4 + MPIR_Gather@Base 3.0.4 + MPIR_Gather_impl@Base 3.0.4 + MPIR_Gather_inter@Base 3.0.4 + MPIR_Gather_intra@Base 3.0.4 + MPIR_Gatherv@Base 3.0.4 + MPIR_Gatherv_impl@Base 3.0.4 + MPIR_Get_contextid@Base 3.0.4 + MPIR_Get_contextid_nonblock@Base 3.0.4 + MPIR_Get_contextid_sparse@Base 3.0.4 + MPIR_Get_contextid_sparse_group@Base 3.0.4 + MPIR_Get_count_impl@Base 3.0.4 + MPIR_Get_elements_x_impl@Base 3.0.4 + MPIR_Get_file_error_routine@Base 3.0.4 + MPIR_Get_intercomm_contextid@Base 3.0.4 + MPIR_Get_intercomm_contextid_nonblock@Base 3.0.4 + MPIR_Graph_create@Base 3.0.4 + MPIR_Graph_map@Base 3.0.4 + MPIR_Graph_map_impl@Base 3.0.4 + MPIR_Graph_neighbors_count_impl@Base 3.0.4 + MPIR_Graph_neighbors_impl@Base 3.0.4 + MPIR_Grequest_cancel@Base 3.0.4 + MPIR_Grequest_class_list@Base 3.0.4 + MPIR_Grequest_complete_impl@Base 3.0.4 + MPIR_Grequest_free@Base 3.0.4 + MPIR_Grequest_progress_poke@Base 3.0.4 + MPIR_Grequest_query@Base 3.0.4 + MPIR_Grequest_registered_finalizer@Base 3.0.4 + MPIR_Grequest_set_lang_f77@Base 3.0.4 + MPIR_Grequest_start_impl@Base 3.0.4 + MPIR_Grequest_waitall@Base 3.0.4 + MPIR_GroupCheckVCRSubset@Base 3.0.4 + MPIR_Group_check_valid_ranges@Base 3.0.4 + MPIR_Group_check_valid_ranks@Base 3.0.4 + MPIR_Group_compare_impl@Base 3.0.4 + MPIR_Group_create@Base 3.0.4 + MPIR_Group_difference_impl@Base 3.0.4 + MPIR_Group_excl_impl@Base 3.0.4 + MPIR_Group_free_impl@Base 3.0.4 + MPIR_Group_incl_impl@Base 3.0.4 + MPIR_Group_init@Base 3.0.4 + MPIR_Group_intersection_impl@Base 3.0.4 + MPIR_Group_range_excl_impl@Base 3.0.4 + MPIR_Group_range_incl_impl@Base 3.0.4 + MPIR_Group_release@Base 3.0.4 + MPIR_Group_setup_lpid_list@Base 3.0.4 + MPIR_Group_setup_lpid_pairs@Base 3.0.4 + MPIR_Group_translate_ranks_impl@Base 3.0.4 + MPIR_Group_union_impl@Base 3.0.4 + MPIR_IS_ARGVS_NULL@Base 3.0.4 + MPIR_IS_BOTTOM@Base 3.0.4 + MPIR_IS_ERRCODES_IGNORE@Base 3.0.4 + MPIR_IS_IN_PLACE@Base 3.0.4 + MPIR_IS_STATUSES_IGNORE@Base 3.0.4 + MPIR_IS_STATUS_IGNORE@Base 3.0.4 + MPIR_IS_UNWEIGHTED@Base 3.0.4 + MPIR_Iallgather_bruck@Base 3.0.4 + MPIR_Iallgather_impl@Base 3.0.4 + MPIR_Iallgather_inter@Base 3.0.4 + MPIR_Iallgather_intra@Base 3.0.4 + MPIR_Iallgather_rec_dbl@Base 3.0.4 + MPIR_Iallgather_ring@Base 3.0.4 + MPIR_Iallgatherv_bruck@Base 3.0.4 + MPIR_Iallgatherv_impl@Base 3.0.4 + MPIR_Iallgatherv_inter@Base 3.0.4 + MPIR_Iallgatherv_intra@Base 3.0.4 + MPIR_Iallgatherv_rec_dbl@Base 3.0.4 + MPIR_Iallgatherv_ring@Base 3.0.4 + MPIR_Iallreduce_SMP@Base 3.0.4 + MPIR_Iallreduce_impl@Base 3.0.4 + MPIR_Iallreduce_inter@Base 3.0.4 + MPIR_Iallreduce_intra@Base 3.0.4 + MPIR_Iallreduce_naive@Base 3.0.4 + MPIR_Iallreduce_rec_dbl@Base 3.0.4 + MPIR_Iallreduce_redscat_allgather@Base 3.0.4 + MPIR_Ialltoall_bruck@Base 3.0.4 + MPIR_Ialltoall_impl@Base 3.0.4 + MPIR_Ialltoall_inplace@Base 3.0.4 + MPIR_Ialltoall_inter@Base 3.0.4 + MPIR_Ialltoall_intra@Base 3.0.4 + MPIR_Ialltoall_pairwise@Base 3.0.4 + MPIR_Ialltoall_perm_sr@Base 3.0.4 + MPIR_Ialltoallv_impl@Base 3.0.4 + MPIR_Ialltoallv_inter@Base 3.0.4 + MPIR_Ialltoallv_intra@Base 3.0.4 + MPIR_Ialltoallw_impl@Base 3.0.4 + MPIR_Ialltoallw_inter@Base 3.0.4 + MPIR_Ialltoallw_intra@Base 3.0.4 + MPIR_Ibarrier_impl@Base 3.0.4 + MPIR_Ibarrier_inter@Base 3.0.4 + MPIR_Ibarrier_intra@Base 3.0.4 + MPIR_Ibcast_SMP@Base 3.0.4 + MPIR_Ibcast_binomial@Base 3.0.4 + MPIR_Ibcast_impl@Base 3.0.4 + MPIR_Ibcast_inter@Base 3.0.4 + MPIR_Ibcast_intra@Base 3.0.4 + MPIR_Ibcast_scatter_rec_dbl_allgather@Base 3.0.4 + MPIR_Ibcast_scatter_ring_allgather@Base 3.0.4 + MPIR_Ibsend_impl@Base 3.0.4 + MPIR_Iexscan@Base 3.0.4 + MPIR_Iexscan_impl@Base 3.0.4 + MPIR_Igather_binomial@Base 3.0.4 + MPIR_Igather_impl@Base 3.0.4 + MPIR_Igather_inter@Base 3.0.4 + MPIR_Igather_intra@Base 3.0.4 + MPIR_Igatherv@Base 3.0.4 + MPIR_Igatherv_impl@Base 3.0.4 + MPIR_Ineighbor_allgather_default@Base 3.0.4 + MPIR_Ineighbor_allgather_impl@Base 3.0.4 + MPIR_Ineighbor_allgatherv_default@Base 3.0.4 + MPIR_Ineighbor_allgatherv_impl@Base 3.0.4 + MPIR_Ineighbor_alltoall_default@Base 3.0.4 + MPIR_Ineighbor_alltoall_impl@Base 3.0.4 + MPIR_Ineighbor_alltoallv_default@Base 3.0.4 + MPIR_Ineighbor_alltoallv_impl@Base 3.0.4 + MPIR_Ineighbor_alltoallw_default@Base 3.0.4 + MPIR_Ineighbor_alltoallw_impl@Base 3.0.4 + MPIR_Info_dup_impl@Base 3.0.4 + MPIR_Info_get_impl@Base 3.0.4 + MPIR_Info_get_nkeys_impl@Base 3.0.4 + MPIR_Info_get_nthkey_impl@Base 3.0.4 + MPIR_Info_get_valuelen_impl@Base 3.0.4 + MPIR_Info_set_impl@Base 3.0.4 + MPIR_Init_async_thread@Base 3.0.4 + MPIR_Init_thread@Base 3.0.4 + MPIR_Intercomm_create_impl@Base 3.0.4 + MPIR_Intercomm_merge_impl@Base 3.0.4 + MPIR_Ireduce_SMP@Base 3.0.4 + MPIR_Ireduce_binomial@Base 3.0.4 + MPIR_Ireduce_impl@Base 3.0.4 + MPIR_Ireduce_inter@Base 3.0.4 + MPIR_Ireduce_intra@Base 3.0.4 + MPIR_Ireduce_redscat_gather@Base 3.0.4 + MPIR_Ireduce_scatter_block_impl@Base 3.0.4 + MPIR_Ireduce_scatter_block_inter@Base 3.0.4 + MPIR_Ireduce_scatter_block_intra@Base 3.0.4 + MPIR_Ireduce_scatter_block_noncomm@Base 3.0.4 + MPIR_Ireduce_scatter_block_pairwise@Base 3.0.4 + MPIR_Ireduce_scatter_block_rec_dbl@Base 3.0.4 + MPIR_Ireduce_scatter_block_rec_hlv@Base 3.0.4 + MPIR_Ireduce_scatter_impl@Base 3.0.4 + MPIR_Ireduce_scatter_inter@Base 3.0.4 + MPIR_Ireduce_scatter_intra@Base 3.0.4 + MPIR_Ireduce_scatter_pairwise@Base 3.0.4 + MPIR_Ireduce_scatter_rec_dbl@Base 3.0.4 + MPIR_Ireduce_scatter_rec_hlv@Base 3.0.4 + MPIR_Iscan_SMP@Base 3.0.4 + MPIR_Iscan_impl@Base 3.0.4 + MPIR_Iscan_rec_dbl@Base 3.0.4 + MPIR_Iscatter_for_bcast@Base 3.0.4 + MPIR_Iscatter_impl@Base 3.0.4 + MPIR_Iscatter_inter@Base 3.0.4 + MPIR_Iscatter_intra@Base 3.0.4 + MPIR_Iscatterv@Base 3.0.4 + MPIR_Iscatterv_impl@Base 3.0.4 + MPIR_Keyval_set_proxy@Base 3.0.4 + MPIR_LAND@Base 3.0.4 + MPIR_LAND_check_dtype@Base 3.0.4 + MPIR_LOR@Base 3.0.4 + MPIR_LOR_check_dtype@Base 3.0.4 + MPIR_LXOR@Base 3.0.4 + MPIR_LXOR_check_dtype@Base 3.0.4 + MPIR_Localcopy@Base 3.0.4 + MPIR_MAXF@Base 3.0.4 + MPIR_MAXF_check_dtype@Base 3.0.4 + MPIR_MAXLOC@Base 3.0.4 + MPIR_MAXLOC_check_dtype@Base 3.0.4 + MPIR_MINF@Base 3.0.4 + MPIR_MINF_check_dtype@Base 3.0.4 + MPIR_MINLOC@Base 3.0.4 + MPIR_MINLOC_check_dtype@Base 3.0.4 + MPIR_MPIOInit@Base 3.0.4 + MPIR_NO_OP@Base 3.0.4 + MPIR_NO_OP_check_dtype@Base 3.0.4 + MPIR_Namepub@Base 3.0.4 + MPIR_Neighbor_allgather_default@Base 3.0.4 + MPIR_Neighbor_allgather_impl@Base 3.0.4 + MPIR_Neighbor_allgatherv_default@Base 3.0.4 + MPIR_Neighbor_allgatherv_impl@Base 3.0.4 + MPIR_Neighbor_alltoall_default@Base 3.0.4 + MPIR_Neighbor_alltoall_impl@Base 3.0.4 + MPIR_Neighbor_alltoallv_default@Base 3.0.4 + MPIR_Neighbor_alltoallv_impl@Base 3.0.4 + MPIR_Neighbor_alltoallw_default@Base 3.0.4 + MPIR_Neighbor_alltoallw_impl@Base 3.0.4 + MPIR_Op_check_dtype_table@Base 3.0.4 + MPIR_Op_set_cxx@Base 3.0.4 + MPIR_Op_table@Base 3.0.4 + MPIR_Open_port_impl@Base 3.0.4 + MPIR_PARAM_ABORT_ON_LEAKED_HANDLES@Base 3.0.4 + MPIR_PARAM_ALLGATHERV_PIPELINE_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_ALLGATHER_LONG_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_ALLGATHER_SHORT_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_ALLREDUCE_SHORT_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_ALLTOALL_MEDIUM_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_ALLTOALL_SHORT_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_ALLTOALL_THROTTLE@Base 3.0.4 + MPIR_PARAM_BCAST_LONG_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_BCAST_MIN_PROCS@Base 3.0.4 + MPIR_PARAM_BCAST_SHORT_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_CH3_EAGER_MAX_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_CHOP_ERROR_STACK@Base 3.0.4 + MPIR_PARAM_COMM_OVERRIDES@Base 3.0.4 + MPIR_PARAM_COMM_SPLIT_USE_QSORT@Base 3.0.4 + MPIR_PARAM_CTXID_EAGER_SIZE@Base 3.0.4 + MPIR_PARAM_DEBUG_HOLD@Base 3.0.4 + MPIR_PARAM_ENABLE_CKPOINT@Base 3.0.4 + MPIR_PARAM_ENABLE_COLL_FT_RET@Base 3.0.4 + MPIR_PARAM_ERROR_CHECKING@Base 3.0.4 + MPIR_PARAM_GATHERV_INTER_SSEND_MIN_PROCS@Base 3.0.4 + MPIR_PARAM_GATHER_INTER_SHORT_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_GATHER_VSMALL_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_HOST_LOOKUP_RETRIES@Base 3.0.4 + MPIR_PARAM_INTERFACE_HOSTNAME@Base 3.0.4 + MPIR_PARAM_MEMDUMP@Base 3.0.4 + MPIR_PARAM_NEMESIS_NETMOD@Base 3.0.4 + MPIR_PARAM_NEM_LMT_DMA_THRESHOLD@Base 3.0.4 + MPIR_PARAM_NETWORK_IFACE@Base 3.0.4 + MPIR_PARAM_NOLOCAL@Base 3.0.4 + MPIR_PARAM_ODD_EVEN_CLIQUES@Base 3.0.4 + MPIR_PARAM_POLLS_BEFORE_YIELD@Base 3.0.4 + MPIR_PARAM_PORT_RANGE@Base 3.0.4 + MPIR_PARAM_PRINT_ERROR_STACK@Base 3.0.4 + MPIR_PARAM_PROCTABLE_PRINT@Base 3.0.4 + MPIR_PARAM_PROCTABLE_SIZE@Base 3.0.4 + MPIR_PARAM_REDSCAT_COMMUTATIVE_LONG_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_REDUCE_SHORT_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_RMA_ACC_IMMED@Base 3.0.4 + MPIR_PARAM_RMA_LOCK_IMMED@Base 3.0.4 + MPIR_PARAM_RMA_MERGE_LOCK_OP_UNLOCK@Base 3.0.4 + MPIR_PARAM_RMA_NREQUEST_NEW_THRESHOLD@Base 3.0.4 + MPIR_PARAM_RMA_NREQUEST_THRESHOLD@Base 3.0.4 + MPIR_PARAM_SCATTER_INTER_SHORT_MSG_SIZE@Base 3.0.4 + MPIR_PARAM_SHM_EAGER_MAX_SZ@Base 3.0.4 + MPIR_PARAM_SHM_READY_EAGER_MAX_SZ@Base 3.0.4 + MPIR_PROD@Base 3.0.4 + MPIR_PROD_check_dtype@Base 3.0.4 + MPIR_Pack_impl@Base 3.0.4 + MPIR_Pack_size_impl@Base 3.0.4 + MPIR_Param_categories@Base 3.0.4 + MPIR_Param_finalize@Base 3.0.4 + MPIR_Param_init_params@Base 3.0.4 + MPIR_Param_params@Base 3.0.4 + MPIR_Process@Base 3.0.4 + MPIR_Progress_wait_request@Base 3.0.4 + MPIR_REPLACE@Base 3.0.4 + MPIR_REPLACE_check_dtype@Base 3.0.4 + MPIR_ROMIO_Get_file_errhand@Base 3.0.4 + MPIR_ROMIO_Set_file_errhand@Base 3.0.4 + MPIR_Reduce@Base 3.0.4 + MPIR_Reduce_impl@Base 3.0.4 + MPIR_Reduce_inter@Base 3.0.4 + MPIR_Reduce_intra@Base 3.0.4 + MPIR_Reduce_local_impl@Base 3.0.4 + MPIR_Reduce_scatter@Base 3.0.4 + MPIR_Reduce_scatter_block@Base 3.0.4 + MPIR_Reduce_scatter_block_impl@Base 3.0.4 + MPIR_Reduce_scatter_block_inter@Base 3.0.4 + MPIR_Reduce_scatter_block_intra@Base 3.0.4 + MPIR_Reduce_scatter_impl@Base 3.0.4 + MPIR_Reduce_scatter_inter@Base 3.0.4 + MPIR_Reduce_scatter_intra@Base 3.0.4 + MPIR_Request_complete@Base 3.0.4 + MPIR_Request_get_error@Base 3.0.4 + MPIR_SUM@Base 3.0.4 + MPIR_SUM_check_dtype@Base 3.0.4 + MPIR_Scan@Base 3.0.4 + MPIR_Scan_impl@Base 3.0.4 + MPIR_Scatter@Base 3.0.4 + MPIR_Scatter_impl@Base 3.0.4 + MPIR_Scatter_inter@Base 3.0.4 + MPIR_Scatter_intra@Base 3.0.4 + MPIR_Scatterv@Base 3.0.4 + MPIR_Scatterv_impl@Base 3.0.4 + MPIR_Sched_cb_free_buf@Base 3.0.4 + MPIR_Setup_intercomm_localcomm@Base 3.0.4 + MPIR_Status_set_bytes@Base 3.0.4 + MPIR_Status_set_elements_x_impl@Base 3.0.4 + MPIR_T_category_changed_impl@Base 3.0.4 + MPIR_T_category_get_categories_impl@Base 3.0.4 + MPIR_T_category_get_cvars_impl@Base 3.0.4 + MPIR_T_category_get_info_impl@Base 3.0.4 + MPIR_T_category_get_num_impl@Base 3.0.4 + MPIR_T_category_get_pvars_impl@Base 3.0.4 + MPIR_T_cvar_get_info_impl@Base 3.0.4 + MPIR_T_cvar_get_num_impl@Base 3.0.4 + MPIR_T_cvar_handle_alloc_impl@Base 3.0.4 + MPIR_T_cvar_handle_free_impl@Base 3.0.4 + MPIR_T_cvar_read_impl@Base 3.0.4 + MPIR_T_cvar_write_impl@Base 3.0.4 + MPIR_T_enum_get_info_impl@Base 3.0.4 + MPIR_T_enum_get_item_impl@Base 3.0.4 + MPIR_T_finalize_impl@Base 3.0.4 + MPIR_T_finalize_pvars@Base 3.0.4 + MPIR_T_get_num_pvars@Base 3.0.4 + MPIR_T_get_pvar_info_by_idx@Base 3.0.4 + MPIR_T_init_balance@Base 3.0.4 + MPIR_T_init_thread_impl@Base 3.0.4 + MPIR_T_is_initialized@Base 3.0.4 + MPIR_T_pvar_add@Base 3.0.4 + MPIR_T_pvar_all_handles_obj@Base 3.0.4 + MPIR_T_pvar_get_info_impl@Base 3.0.4 + MPIR_T_pvar_get_num_impl@Base 3.0.4 + MPIR_T_pvar_handle_alloc_impl@Base 3.0.4 + MPIR_T_pvar_handle_free_impl@Base 3.0.4 + MPIR_T_pvar_read_impl@Base 3.0.4 + MPIR_T_pvar_readreset_impl@Base 3.0.4 + MPIR_T_pvar_reset_impl@Base 3.0.4 + MPIR_T_pvar_session_create_impl@Base 3.0.4 + MPIR_T_pvar_session_free_impl@Base 3.0.4 + MPIR_T_pvar_start_impl@Base 3.0.4 + MPIR_T_pvar_stop_impl@Base 3.0.4 + MPIR_T_pvar_write_impl@Base 3.0.4 + MPIR_Test_impl@Base 3.0.4 + MPIR_Thread@Base 3.0.4 + MPIR_ThreadInfo@Base 3.0.4 + MPIR_Thread_CS_Finalize@Base 3.0.4 + MPIR_Topo_canon_nhb@Base 3.0.4 + MPIR_Topo_canon_nhb_count@Base 3.0.4 + MPIR_Topology_get@Base 3.0.4 + MPIR_Topology_put@Base 3.0.4 + MPIR_TypeGetAttr@Base 3.0.4 + MPIR_TypeSetAttr@Base 3.0.4 + MPIR_Type_commit_impl@Base 3.0.4 + MPIR_Type_contiguous_impl@Base 3.0.4 + MPIR_Type_create_hindexed_block_impl@Base 3.0.4 + MPIR_Type_create_indexed_block_impl@Base 3.0.4 + MPIR_Type_create_struct_impl@Base 3.0.4 + MPIR_Type_flatten@Base 3.0.4 + MPIR_Type_free_impl@Base 3.0.4 + MPIR_Type_get_contig_blocks@Base 3.0.4 + MPIR_Type_get_envelope_impl@Base 3.0.4 + MPIR_Type_get_extent_impl@Base 3.0.4 + MPIR_Type_get_extent_x_impl@Base 3.0.4 + MPIR_Type_get_true_extent_impl@Base 3.0.4 + MPIR_Type_get_true_extent_x_impl@Base 3.0.4 + MPIR_Type_hvector_impl@Base 3.0.4 + MPIR_Type_indexed_impl@Base 3.0.4 + MPIR_Type_is_rma_atomic@Base 3.0.4 + MPIR_Type_lb_impl@Base 3.0.4 + MPIR_Type_size_x_impl@Base 3.0.4 + MPIR_Type_struct_impl@Base 3.0.4 + MPIR_Type_vector_impl@Base 3.0.4 + MPIR_Unpack_impl@Base 3.0.4 + MPIR_Version_CC@Base 3.0.4 + MPIR_Version_CXX@Base 3.0.4 + MPIR_Version_F77@Base 3.0.4 + MPIR_Version_FC@Base 3.0.4 + MPIR_Version_configure@Base 3.0.4 + MPIR_Version_date@Base 3.0.4 + MPIR_Version_device@Base 3.0.4 + MPIR_Version_string@Base 3.0.4 + MPIR_Wait_impl@Base 3.0.4 + MPIR_Waitall_impl@Base 3.0.4 + MPIR_WinGetAttr@Base 3.0.4 + MPIR_WinSetAttr@Base 3.0.4 + MPIR_async_thread_initialized@Base 3.0.4 + MPIU_Basename@Base 3.0.4 + MPIU_Error_printf@Base 3.0.4 + MPIU_Exit@Base 3.0.4 + MPIU_Find_local_and_external@Base 3.0.4 + MPIU_Get_internode_rank@Base 3.0.4 + MPIU_Get_intranode_rank@Base 3.0.4 + MPIU_Greq_cancel_fn@Base 3.0.4 + MPIU_Greq_free_fn@Base 3.0.4 + MPIU_Greq_query_fn@Base 3.0.4 + MPIU_Handle_direct_init@Base 3.0.4 + MPIU_Handle_get_kind_str@Base 3.0.4 + MPIU_Handle_get_ptr_indirect@Base 3.0.4 + MPIU_Handle_obj_alloc@Base 3.0.4 + MPIU_Handle_obj_alloc_complete@Base 3.0.4 + MPIU_Handle_obj_alloc_unsafe@Base 3.0.4 + MPIU_Handle_obj_free@Base 3.0.4 + MPIU_Handle_obj_outstanding@Base 3.0.4 + MPIU_Info_alloc@Base 3.0.4 + MPIU_Info_free@Base 3.0.4 + MPIU_Internal_error_printf@Base 3.0.4 + MPIU_Internal_sys_error_printf@Base 3.0.4 + MPIU_Msg_printf@Base 3.0.4 + MPIU_Outlier_ratio@Base 3.0.4 + MPIU_PG_Printall@Base 3.0.4 + MPIU_SetTimeout@Base 3.0.4 + MPIU_Str_add_binary_arg@Base 3.0.4 + MPIU_Str_add_int_arg@Base 3.0.4 + MPIU_Str_add_string@Base 3.0.4 + MPIU_Str_add_string_arg@Base 3.0.4 + MPIU_Str_get_binary_arg@Base 3.0.4 + MPIU_Str_get_int_arg@Base 3.0.4 + MPIU_Str_get_string@Base 3.0.4 + MPIU_Str_get_string_arg@Base 3.0.4 + MPIU_Str_hide_string_arg@Base 3.0.4 + MPIU_Strerror@Base 3.0.4 + MPIU_Strnapp@Base 3.0.4 + MPIU_Strncpy@Base 3.0.4 + MPIU_Thread_create@Base 3.0.4 + MPIU_Tool_strncpy@Base 3.0.4 + MPIU_TrSetMaxMem@Base 3.0.4 + MPIU_Usage_printf@Base 3.0.4 + MPIU_datatype_full_size@Base 3.0.4 + MPIU_dbg_fp@Base 3.0.4 + MPIU_dbg_init@Base 3.0.4 + MPIU_dbg_printf@Base 3.0.4 + MPIU_dbg_state@Base 3.0.4 + MPIU_dbglog_printf@Base 3.0.4 + MPIU_dbglog_vprintf@Base 3.0.4 + MPIU_dump_dbg_memlog@Base 3.0.4 + MPIU_dump_dbg_memlog_to_file@Base 3.0.4 + MPIU_dump_dbg_memlog_to_stdout@Base 3.0.4 + MPIU_external32_buffer_setup@Base 3.0.4 + MPIU_hostname@Base 3.0.4 + MPIU_read_external32_conversion_fn@Base 3.0.4 + MPIU_trDebugLevel@Base 3.0.4 + MPIU_trcalloc@Base 3.0.4 + MPIU_trdump@Base 3.0.4 + MPIU_trfree@Base 3.0.4 + MPIU_trid@Base 3.0.4 + MPIU_trinit@Base 3.0.4 + MPIU_trlevel@Base 3.0.4 + MPIU_trmalloc@Base 3.0.4 + MPIU_trrealloc@Base 3.0.4 + MPIU_trspace@Base 3.0.4 + MPIU_trstrdup@Base 3.0.4 + MPIU_trvalid@Base 3.0.4 + MPIU_write_external32_conversion_fn@Base 3.0.4 + MPIX_COMM_GROUP_FAILED@Base 3.0.4 + MPIX_COMM_REENABLE_ANYSOURCE@Base 3.0.4 + MPIX_COMM_REMOTE_GROUP_FAILED@Base 3.0.4 + MPIX_Comm_group_failed@Base 3.0.4 + MPIX_Comm_reenable_anysource@Base 3.0.4 + MPIX_Comm_remote_group_failed@Base 3.0.4 + MPIX_Grequest_class_allocate@Base 3.0.4 + MPIX_Grequest_class_create@Base 3.0.4 + MPIX_Grequest_start@Base 3.0.4 + MPIX_Grequest_start_impl@Base 3.0.4 + MPIX_Mutex_create@Base 3.0.4 + MPIX_Mutex_free@Base 3.0.4 + MPIX_Mutex_lock@Base 3.0.4 + MPIX_Mutex_unlock@Base 3.0.4 + MPI_ABORT@Base 3.0.4 + MPI_ACCUMULATE@Base 3.0.4 + MPI_ADDRESS@Base 3.0.4 + MPI_ADD_ERROR_CLASS@Base 3.0.4 + MPI_ADD_ERROR_CODE@Base 3.0.4 + MPI_ADD_ERROR_STRING@Base 3.0.4 + MPI_ALLGATHER@Base 3.0.4 + MPI_ALLGATHERV@Base 3.0.4 + MPI_ALLOC_MEM@Base 3.0.4 + MPI_ALLREDUCE@Base 3.0.4 + MPI_ALLTOALL@Base 3.0.4 + MPI_ALLTOALLV@Base 3.0.4 + MPI_ALLTOALLW@Base 3.0.4 + MPI_ATTR_DELETE@Base 3.0.4 + MPI_ATTR_GET@Base 3.0.4 + MPI_ATTR_PUT@Base 3.0.4 + MPI_Abort@Base 3.0.4 + MPI_Accumulate@Base 3.0.4 + MPI_Add_error_class@Base 3.0.4 + MPI_Add_error_code@Base 3.0.4 + MPI_Add_error_string@Base 3.0.4 + MPI_Address@Base 3.0.4 + MPI_Allgather@Base 3.0.4 + MPI_Allgatherv@Base 3.0.4 + MPI_Alloc_mem@Base 3.0.4 + MPI_Allreduce@Base 3.0.4 + MPI_Alltoall@Base 3.0.4 + MPI_Alltoallv@Base 3.0.4 + MPI_Alltoallw@Base 3.0.4 + MPI_Attr_delete@Base 3.0.4 + MPI_Attr_get@Base 3.0.4 + MPI_Attr_put@Base 3.0.4 + MPI_BARRIER@Base 3.0.4 + MPI_BCAST@Base 3.0.4 + MPI_BSEND@Base 3.0.4 + MPI_BSEND_INIT@Base 3.0.4 + MPI_BUFFER_ATTACH@Base 3.0.4 + MPI_BUFFER_DETACH@Base 3.0.4 + MPI_Barrier@Base 3.0.4 + MPI_Bcast@Base 3.0.4 + MPI_Bsend@Base 3.0.4 + MPI_Bsend_init@Base 3.0.4 + MPI_Buffer_attach@Base 3.0.4 + MPI_Buffer_detach@Base 3.0.4 + MPI_CANCEL@Base 3.0.4 + MPI_CARTDIM_GET@Base 3.0.4 + MPI_CART_COORDS@Base 3.0.4 + MPI_CART_CREATE@Base 3.0.4 + MPI_CART_GET@Base 3.0.4 + MPI_CART_MAP@Base 3.0.4 + MPI_CART_RANK@Base 3.0.4 + MPI_CART_SHIFT@Base 3.0.4 + MPI_CART_SUB@Base 3.0.4 + MPI_CLOSE_PORT@Base 3.0.4 + MPI_COMM_ACCEPT@Base 3.0.4 + MPI_COMM_CALL_ERRHANDLER@Base 3.0.4 + MPI_COMM_COMPARE@Base 3.0.4 + MPI_COMM_CONNECT@Base 3.0.4 + MPI_COMM_CREATE@Base 3.0.4 + MPI_COMM_CREATE_ERRHANDLER@Base 3.0.4 + MPI_COMM_CREATE_GROUP@Base 3.0.4 + MPI_COMM_CREATE_KEYVAL@Base 3.0.4 + MPI_COMM_DELETE_ATTR@Base 3.0.4 + MPI_COMM_DISCONNECT@Base 3.0.4 + MPI_COMM_DUP@Base 3.0.4 + MPI_COMM_DUP_FN@Base 3.0.4 + MPI_COMM_DUP_WITH_INFO@Base 3.0.4 + MPI_COMM_FREE@Base 3.0.4 + MPI_COMM_FREE_KEYVAL@Base 3.0.4 + MPI_COMM_GET_ATTR@Base 3.0.4 + MPI_COMM_GET_ERRHANDLER@Base 3.0.4 + MPI_COMM_GET_INFO@Base 3.0.4 + MPI_COMM_GET_NAME@Base 3.0.4 + MPI_COMM_GET_PARENT@Base 3.0.4 + MPI_COMM_GROUP@Base 3.0.4 + MPI_COMM_IDUP@Base 3.0.4 + MPI_COMM_JOIN@Base 3.0.4 + MPI_COMM_NULL_COPY_FN@Base 3.0.4 + MPI_COMM_NULL_DELETE_FN@Base 3.0.4 + MPI_COMM_RANK@Base 3.0.4 + MPI_COMM_REMOTE_GROUP@Base 3.0.4 + MPI_COMM_REMOTE_SIZE@Base 3.0.4 + MPI_COMM_SET_ATTR@Base 3.0.4 + MPI_COMM_SET_ERRHANDLER@Base 3.0.4 + MPI_COMM_SET_INFO@Base 3.0.4 + MPI_COMM_SET_NAME@Base 3.0.4 + MPI_COMM_SIZE@Base 3.0.4 + MPI_COMM_SPAWN@Base 3.0.4 + MPI_COMM_SPAWN_MULTIPLE@Base 3.0.4 + MPI_COMM_SPLIT@Base 3.0.4 + MPI_COMM_SPLIT_TYPE@Base 3.0.4 + MPI_COMM_TEST_INTER@Base 3.0.4 + MPI_COMPARE_AND_SWAP@Base 3.0.4 + MPI_CONVERSION_FN_NULL@Base 3.0.4 + MPI_Cancel@Base 3.0.4 + MPI_Cart_coords@Base 3.0.4 + MPI_Cart_create@Base 3.0.4 + MPI_Cart_get@Base 3.0.4 + MPI_Cart_map@Base 3.0.4 + MPI_Cart_rank@Base 3.0.4 + MPI_Cart_shift@Base 3.0.4 + MPI_Cart_sub@Base 3.0.4 + MPI_Cartdim_get@Base 3.0.4 + MPI_Close_port@Base 3.0.4 + MPI_Comm_accept@Base 3.0.4 + MPI_Comm_call_errhandler@Base 3.0.4 + MPI_Comm_compare@Base 3.0.4 + MPI_Comm_connect@Base 3.0.4 + MPI_Comm_create@Base 3.0.4 + MPI_Comm_create_errhandler@Base 3.0.4 + MPI_Comm_create_group@Base 3.0.4 + MPI_Comm_create_keyval@Base 3.0.4 + MPI_Comm_delete_attr@Base 3.0.4 + MPI_Comm_disconnect@Base 3.0.4 + MPI_Comm_dup@Base 3.0.4 + MPI_Comm_dup_with_info@Base 3.0.4 + MPI_Comm_free@Base 3.0.4 + MPI_Comm_free_keyval@Base 3.0.4 + MPI_Comm_get_attr@Base 3.0.4 + MPI_Comm_get_errhandler@Base 3.0.4 + MPI_Comm_get_info@Base 3.0.4 + MPI_Comm_get_name@Base 3.0.4 + MPI_Comm_get_parent@Base 3.0.4 + MPI_Comm_group@Base 3.0.4 + MPI_Comm_idup@Base 3.0.4 + MPI_Comm_join@Base 3.0.4 + MPI_Comm_rank@Base 3.0.4 + MPI_Comm_remote_group@Base 3.0.4 + MPI_Comm_remote_size@Base 3.0.4 + MPI_Comm_set_attr@Base 3.0.4 + MPI_Comm_set_errhandler@Base 3.0.4 + MPI_Comm_set_info@Base 3.0.4 + MPI_Comm_set_name@Base 3.0.4 + MPI_Comm_size@Base 3.0.4 + MPI_Comm_spawn@Base 3.0.4 + MPI_Comm_spawn_multiple@Base 3.0.4 + MPI_Comm_split@Base 3.0.4 + MPI_Comm_split_type@Base 3.0.4 + MPI_Comm_test_inter@Base 3.0.4 + MPI_Compare_and_swap@Base 3.0.4 + MPI_DIMS_CREATE@Base 3.0.4 + MPI_DIST_GRAPH_CREATE@Base 3.0.4 + MPI_DIST_GRAPH_CREATE_ADJACENT@Base 3.0.4 + MPI_DIST_GRAPH_NEIGHBORS@Base 3.0.4 + MPI_DIST_GRAPH_NEIGHBORS_COUNT@Base 3.0.4 + MPI_DUP_FN@Base 3.0.4 + MPI_Dims_create@Base 3.0.4 + MPI_Dist_graph_create@Base 3.0.4 + MPI_Dist_graph_create_adjacent@Base 3.0.4 + MPI_Dist_graph_neighbors@Base 3.0.4 + MPI_Dist_graph_neighbors_count@Base 3.0.4 + MPI_ERRHANDLER_CREATE@Base 3.0.4 + MPI_ERRHANDLER_FREE@Base 3.0.4 + MPI_ERRHANDLER_GET@Base 3.0.4 + MPI_ERRHANDLER_SET@Base 3.0.4 + MPI_ERROR_CLASS@Base 3.0.4 + MPI_ERROR_STRING@Base 3.0.4 + MPI_EXSCAN@Base 3.0.4 + MPI_Errhandler_create@Base 3.0.4 + MPI_Errhandler_free@Base 3.0.4 + MPI_Errhandler_get@Base 3.0.4 + MPI_Errhandler_set@Base 3.0.4 + MPI_Error_class@Base 3.0.4 + MPI_Error_string@Base 3.0.4 + MPI_Exscan@Base 3.0.4 + MPI_FETCH_AND_OP@Base 3.0.4 + MPI_FILE_CALL_ERRHANDLER@Base 3.0.4 + MPI_FILE_CLOSE@Base 3.0.4 + MPI_FILE_CREATE_ERRHANDLER@Base 3.0.4 + MPI_FILE_DELETE@Base 3.0.4 + MPI_FILE_GET_AMODE@Base 3.0.4 + MPI_FILE_GET_ATOMICITY@Base 3.0.4 + MPI_FILE_GET_BYTE_OFFSET@Base 3.0.4 + MPI_FILE_GET_ERRHANDLER@Base 3.0.4 + MPI_FILE_GET_GROUP@Base 3.0.4 + MPI_FILE_GET_INFO@Base 3.0.4 + MPI_FILE_GET_POSITION@Base 3.0.4 + MPI_FILE_GET_POSITION_SHARED@Base 3.0.4 + MPI_FILE_GET_SIZE@Base 3.0.4 + MPI_FILE_GET_TYPE_EXTENT@Base 3.0.4 + MPI_FILE_GET_VIEW@Base 3.0.4 + MPI_FILE_IREAD@Base 3.0.4 + MPI_FILE_IREAD_AT@Base 3.0.4 + MPI_FILE_IREAD_SHARED@Base 3.0.4 + MPI_FILE_IWRITE@Base 3.0.4 + MPI_FILE_IWRITE_AT@Base 3.0.4 + MPI_FILE_IWRITE_SHARED@Base 3.0.4 + MPI_FILE_OPEN@Base 3.0.4 + MPI_FILE_PREALLOCATE@Base 3.0.4 + MPI_FILE_READ@Base 3.0.4 + MPI_FILE_READ_ALL@Base 3.0.4 + MPI_FILE_READ_ALL_BEGIN@Base 3.0.4 + MPI_FILE_READ_ALL_END@Base 3.0.4 + MPI_FILE_READ_AT@Base 3.0.4 + MPI_FILE_READ_AT_ALL@Base 3.0.4 + MPI_FILE_READ_AT_ALL_BEGIN@Base 3.0.4 + MPI_FILE_READ_AT_ALL_END@Base 3.0.4 + MPI_FILE_READ_ORDERED@Base 3.0.4 + MPI_FILE_READ_ORDERED_BEGIN@Base 3.0.4 + MPI_FILE_READ_ORDERED_END@Base 3.0.4 + MPI_FILE_READ_SHARED@Base 3.0.4 + MPI_FILE_SEEK@Base 3.0.4 + MPI_FILE_SEEK_SHARED@Base 3.0.4 + MPI_FILE_SET_ATOMICITY@Base 3.0.4 + MPI_FILE_SET_ERRHANDLER@Base 3.0.4 + MPI_FILE_SET_INFO@Base 3.0.4 + MPI_FILE_SET_SIZE@Base 3.0.4 + MPI_FILE_SET_VIEW@Base 3.0.4 + MPI_FILE_SYNC@Base 3.0.4 + MPI_FILE_WRITE@Base 3.0.4 + MPI_FILE_WRITE_ALL@Base 3.0.4 + MPI_FILE_WRITE_ALL_BEGIN@Base 3.0.4 + MPI_FILE_WRITE_ALL_END@Base 3.0.4 + MPI_FILE_WRITE_AT@Base 3.0.4 + MPI_FILE_WRITE_AT_ALL@Base 3.0.4 + MPI_FILE_WRITE_AT_ALL_BEGIN@Base 3.0.4 + MPI_FILE_WRITE_AT_ALL_END@Base 3.0.4 + MPI_FILE_WRITE_ORDERED@Base 3.0.4 + MPI_FILE_WRITE_ORDERED_BEGIN@Base 3.0.4 + MPI_FILE_WRITE_ORDERED_END@Base 3.0.4 + MPI_FILE_WRITE_SHARED@Base 3.0.4 + MPI_FINALIZE@Base 3.0.4 + MPI_FINALIZED@Base 3.0.4 + MPI_FREE_MEM@Base 3.0.4 + MPI_F_ARGVS_NULL@Base 3.0.4 + MPI_F_ERRCODES_IGNORE@Base 3.0.4 + MPI_F_STATUSES_IGNORE@Base 3.0.4 + MPI_F_STATUS_IGNORE@Base 3.0.4 + MPI_Fetch_and_op@Base 3.0.4 + MPI_File_c2f@Base 3.0.4 + MPI_File_call_errhandler@Base 3.0.4 + MPI_File_close@Base 3.0.4 + MPI_File_create_errhandler@Base 3.0.4 + MPI_File_delete@Base 3.0.4 + MPI_File_f2c@Base 3.0.4 + MPI_File_get_amode@Base 3.0.4 + MPI_File_get_atomicity@Base 3.0.4 + MPI_File_get_byte_offset@Base 3.0.4 + MPI_File_get_errhandler@Base 3.0.4 + MPI_File_get_group@Base 3.0.4 + MPI_File_get_info@Base 3.0.4 + MPI_File_get_position@Base 3.0.4 + MPI_File_get_position_shared@Base 3.0.4 + MPI_File_get_size@Base 3.0.4 + MPI_File_get_type_extent@Base 3.0.4 + MPI_File_get_view@Base 3.0.4 + MPI_File_iread@Base 3.0.4 + MPI_File_iread_at@Base 3.0.4 + MPI_File_iread_shared@Base 3.0.4 + MPI_File_iwrite@Base 3.0.4 + MPI_File_iwrite_at@Base 3.0.4 + MPI_File_iwrite_shared@Base 3.0.4 + MPI_File_open@Base 3.0.4 + MPI_File_preallocate@Base 3.0.4 + MPI_File_read@Base 3.0.4 + MPI_File_read_all@Base 3.0.4 + MPI_File_read_all_begin@Base 3.0.4 + MPI_File_read_all_end@Base 3.0.4 + MPI_File_read_at@Base 3.0.4 + MPI_File_read_at_all@Base 3.0.4 + MPI_File_read_at_all_begin@Base 3.0.4 + MPI_File_read_at_all_end@Base 3.0.4 + MPI_File_read_ordered@Base 3.0.4 + MPI_File_read_ordered_begin@Base 3.0.4 + MPI_File_read_ordered_end@Base 3.0.4 + MPI_File_read_shared@Base 3.0.4 + MPI_File_seek@Base 3.0.4 + MPI_File_seek_shared@Base 3.0.4 + MPI_File_set_atomicity@Base 3.0.4 + MPI_File_set_errhandler@Base 3.0.4 + MPI_File_set_info@Base 3.0.4 + MPI_File_set_size@Base 3.0.4 + MPI_File_set_view@Base 3.0.4 + MPI_File_sync@Base 3.0.4 + MPI_File_write@Base 3.0.4 + MPI_File_write_all@Base 3.0.4 + MPI_File_write_all_begin@Base 3.0.4 + MPI_File_write_all_end@Base 3.0.4 + MPI_File_write_at@Base 3.0.4 + MPI_File_write_at_all@Base 3.0.4 + MPI_File_write_at_all_begin@Base 3.0.4 + MPI_File_write_at_all_end@Base 3.0.4 + MPI_File_write_ordered@Base 3.0.4 + MPI_File_write_ordered_begin@Base 3.0.4 + MPI_File_write_ordered_end@Base 3.0.4 + MPI_File_write_shared@Base 3.0.4 + MPI_Finalize@Base 3.0.4 + MPI_Finalized@Base 3.0.4 + MPI_Free_mem@Base 3.0.4 + MPI_GATHER@Base 3.0.4 + MPI_GATHERV@Base 3.0.4 + MPI_GET@Base 3.0.4 + MPI_GET_ACCUMULATE@Base 3.0.4 + MPI_GET_ADDRESS@Base 3.0.4 + MPI_GET_COUNT@Base 3.0.4 + MPI_GET_ELEMENTS@Base 3.0.4 + MPI_GET_ELEMENTS_X@Base 3.0.4 + MPI_GET_LIBRARY_VERSION@Base 3.0.4 + MPI_GET_PROCESSOR_NAME@Base 3.0.4 + MPI_GET_VERSION@Base 3.0.4 + MPI_GRAPHDIMS_GET@Base 3.0.4 + MPI_GRAPH_CREATE@Base 3.0.4 + MPI_GRAPH_GET@Base 3.0.4 + MPI_GRAPH_MAP@Base 3.0.4 + MPI_GRAPH_NEIGHBORS@Base 3.0.4 + MPI_GRAPH_NEIGHBORS_COUNT@Base 3.0.4 + MPI_GREQUEST_COMPLETE@Base 3.0.4 + MPI_GREQUEST_START@Base 3.0.4 + MPI_GROUP_COMPARE@Base 3.0.4 + MPI_GROUP_DIFFERENCE@Base 3.0.4 + MPI_GROUP_EXCL@Base 3.0.4 + MPI_GROUP_FREE@Base 3.0.4 + MPI_GROUP_INCL@Base 3.0.4 + MPI_GROUP_INTERSECTION@Base 3.0.4 + MPI_GROUP_RANGE_EXCL@Base 3.0.4 + MPI_GROUP_RANGE_INCL@Base 3.0.4 + MPI_GROUP_RANK@Base 3.0.4 + MPI_GROUP_SIZE@Base 3.0.4 + MPI_GROUP_TRANSLATE_RANKS@Base 3.0.4 + MPI_GROUP_UNION@Base 3.0.4 + MPI_Gather@Base 3.0.4 + MPI_Gatherv@Base 3.0.4 + MPI_Get@Base 3.0.4 + MPI_Get_accumulate@Base 3.0.4 + MPI_Get_address@Base 3.0.4 + MPI_Get_count@Base 3.0.4 + MPI_Get_elements@Base 3.0.4 + MPI_Get_elements_x@Base 3.0.4 + MPI_Get_library_version@Base 3.0.4 + MPI_Get_processor_name@Base 3.0.4 + MPI_Get_version@Base 3.0.4 + MPI_Graph_create@Base 3.0.4 + MPI_Graph_get@Base 3.0.4 + MPI_Graph_map@Base 3.0.4 + MPI_Graph_neighbors@Base 3.0.4 + MPI_Graph_neighbors_count@Base 3.0.4 + MPI_Graphdims_get@Base 3.0.4 + MPI_Grequest_complete@Base 3.0.4 + MPI_Grequest_start@Base 3.0.4 + MPI_Group_compare@Base 3.0.4 + MPI_Group_difference@Base 3.0.4 + MPI_Group_excl@Base 3.0.4 + MPI_Group_free@Base 3.0.4 + MPI_Group_incl@Base 3.0.4 + MPI_Group_intersection@Base 3.0.4 + MPI_Group_range_excl@Base 3.0.4 + MPI_Group_range_incl@Base 3.0.4 + MPI_Group_rank@Base 3.0.4 + MPI_Group_size@Base 3.0.4 + MPI_Group_translate_ranks@Base 3.0.4 + MPI_Group_union@Base 3.0.4 + MPI_IALLGATHER@Base 3.0.4 + MPI_IALLGATHERV@Base 3.0.4 + MPI_IALLREDUCE@Base 3.0.4 + MPI_IALLTOALL@Base 3.0.4 + MPI_IALLTOALLV@Base 3.0.4 + MPI_IALLTOALLW@Base 3.0.4 + MPI_IBARRIER@Base 3.0.4 + MPI_IBCAST@Base 3.0.4 + MPI_IBSEND@Base 3.0.4 + MPI_IEXSCAN@Base 3.0.4 + MPI_IGATHER@Base 3.0.4 + MPI_IGATHERV@Base 3.0.4 + MPI_IMPROBE@Base 3.0.4 + MPI_IMRECV@Base 3.0.4 + MPI_INEIGHBOR_ALLGATHER@Base 3.0.4 + MPI_INEIGHBOR_ALLGATHERV@Base 3.0.4 + MPI_INEIGHBOR_ALLTOALL@Base 3.0.4 + MPI_INEIGHBOR_ALLTOALLV@Base 3.0.4 + MPI_INEIGHBOR_ALLTOALLW@Base 3.0.4 + MPI_INFO_CREATE@Base 3.0.4 + MPI_INFO_DELETE@Base 3.0.4 + MPI_INFO_DUP@Base 3.0.4 + MPI_INFO_FREE@Base 3.0.4 + MPI_INFO_GET@Base 3.0.4 + MPI_INFO_GET_NKEYS@Base 3.0.4 + MPI_INFO_GET_NTHKEY@Base 3.0.4 + MPI_INFO_GET_VALUELEN@Base 3.0.4 + MPI_INFO_SET@Base 3.0.4 + MPI_INIT@Base 3.0.4 + MPI_INITIALIZED@Base 3.0.4 + MPI_INIT_THREAD@Base 3.0.4 + MPI_INTERCOMM_CREATE@Base 3.0.4 + MPI_INTERCOMM_MERGE@Base 3.0.4 + MPI_IPROBE@Base 3.0.4 + MPI_IRECV@Base 3.0.4 + MPI_IREDUCE@Base 3.0.4 + MPI_IREDUCE_SCATTER@Base 3.0.4 + MPI_IREDUCE_SCATTER_BLOCK@Base 3.0.4 + MPI_IRSEND@Base 3.0.4 + MPI_ISCAN@Base 3.0.4 + MPI_ISCATTER@Base 3.0.4 + MPI_ISCATTERV@Base 3.0.4 + MPI_ISEND@Base 3.0.4 + MPI_ISSEND@Base 3.0.4 + MPI_IS_THREAD_MAIN@Base 3.0.4 + MPI_Iallgather@Base 3.0.4 + MPI_Iallgatherv@Base 3.0.4 + MPI_Iallreduce@Base 3.0.4 + MPI_Ialltoall@Base 3.0.4 + MPI_Ialltoallv@Base 3.0.4 + MPI_Ialltoallw@Base 3.0.4 + MPI_Ibarrier@Base 3.0.4 + MPI_Ibcast@Base 3.0.4 + MPI_Ibsend@Base 3.0.4 + MPI_Iexscan@Base 3.0.4 + MPI_Igather@Base 3.0.4 + MPI_Igatherv@Base 3.0.4 + MPI_Improbe@Base 3.0.4 + MPI_Imrecv@Base 3.0.4 + MPI_Ineighbor_allgather@Base 3.0.4 + MPI_Ineighbor_allgatherv@Base 3.0.4 + MPI_Ineighbor_alltoall@Base 3.0.4 + MPI_Ineighbor_alltoallv@Base 3.0.4 + MPI_Ineighbor_alltoallw@Base 3.0.4 + MPI_Info_create@Base 3.0.4 + MPI_Info_delete@Base 3.0.4 + MPI_Info_dup@Base 3.0.4 + MPI_Info_free@Base 3.0.4 + MPI_Info_get@Base 3.0.4 + MPI_Info_get_nkeys@Base 3.0.4 + MPI_Info_get_nthkey@Base 3.0.4 + MPI_Info_get_valuelen@Base 3.0.4 + MPI_Info_set@Base 3.0.4 + MPI_Init@Base 3.0.4 + MPI_Init_thread@Base 3.0.4 + MPI_Initialized@Base 3.0.4 + MPI_Intercomm_create@Base 3.0.4 + MPI_Intercomm_merge@Base 3.0.4 + MPI_Iprobe@Base 3.0.4 + MPI_Irecv@Base 3.0.4 + MPI_Ireduce@Base 3.0.4 + MPI_Ireduce_scatter@Base 3.0.4 + MPI_Ireduce_scatter_block@Base 3.0.4 + MPI_Irsend@Base 3.0.4 + MPI_Is_thread_main@Base 3.0.4 + MPI_Iscan@Base 3.0.4 + MPI_Iscatter@Base 3.0.4 + MPI_Iscatterv@Base 3.0.4 + MPI_Isend@Base 3.0.4 + MPI_Issend@Base 3.0.4 + MPI_KEYVAL_CREATE@Base 3.0.4 + MPI_KEYVAL_FREE@Base 3.0.4 + MPI_Keyval_create@Base 3.0.4 + MPI_Keyval_free@Base 3.0.4 + MPI_LOOKUP_NAME@Base 3.0.4 + MPI_Lookup_name@Base 3.0.4 + MPI_MPROBE@Base 3.0.4 + MPI_MRECV@Base 3.0.4 + MPI_Mprobe@Base 3.0.4 + MPI_Mrecv@Base 3.0.4 + MPI_NEIGHBOR_ALLGATHER@Base 3.0.4 + MPI_NEIGHBOR_ALLGATHERV@Base 3.0.4 + MPI_NEIGHBOR_ALLTOALL@Base 3.0.4 + MPI_NEIGHBOR_ALLTOALLV@Base 3.0.4 + MPI_NEIGHBOR_ALLTOALLW@Base 3.0.4 + MPI_NULL_COPY_FN@Base 3.0.4 + MPI_NULL_DELETE_FN@Base 3.0.4 + MPI_Neighbor_allgather@Base 3.0.4 + MPI_Neighbor_allgatherv@Base 3.0.4 + MPI_Neighbor_alltoall@Base 3.0.4 + MPI_Neighbor_alltoallv@Base 3.0.4 + MPI_Neighbor_alltoallw@Base 3.0.4 + MPI_OPEN_PORT@Base 3.0.4 + MPI_OP_COMMUTATIVE@Base 3.0.4 + MPI_OP_CREATE@Base 3.0.4 + MPI_OP_FREE@Base 3.0.4 + MPI_Op_commutative@Base 3.0.4 + MPI_Op_create@Base 3.0.4 + MPI_Op_free@Base 3.0.4 + MPI_Open_port@Base 3.0.4 + MPI_PACK@Base 3.0.4 + MPI_PACK_EXTERNAL@Base 3.0.4 + MPI_PACK_EXTERNAL_SIZE@Base 3.0.4 + MPI_PACK_SIZE@Base 3.0.4 + MPI_PCONTROL@Base 3.0.4 + MPI_PROBE@Base 3.0.4 + MPI_PUBLISH_NAME@Base 3.0.4 + MPI_PUT@Base 3.0.4 + MPI_Pack@Base 3.0.4 + MPI_Pack_external@Base 3.0.4 + MPI_Pack_external_size@Base 3.0.4 + MPI_Pack_size@Base 3.0.4 + MPI_Pcontrol@Base 3.0.4 + MPI_Probe@Base 3.0.4 + MPI_Publish_name@Base 3.0.4 + MPI_Put@Base 3.0.4 + MPI_QUERY_THREAD@Base 3.0.4 + MPI_Query_thread@Base 3.0.4 + MPI_RACCUMULATE@Base 3.0.4 + MPI_RECV@Base 3.0.4 + MPI_RECV_INIT@Base 3.0.4 + MPI_REDUCE@Base 3.0.4 + MPI_REDUCE_LOCAL@Base 3.0.4 + MPI_REDUCE_SCATTER@Base 3.0.4 + MPI_REDUCE_SCATTER_BLOCK@Base 3.0.4 + MPI_REGISTER_DATAREP@Base 3.0.4 + MPI_REQUEST_FREE@Base 3.0.4 + MPI_REQUEST_GET_STATUS@Base 3.0.4 + MPI_RGET@Base 3.0.4 + MPI_RGET_ACCUMULATE@Base 3.0.4 + MPI_RPUT@Base 3.0.4 + MPI_RSEND@Base 3.0.4 + MPI_RSEND_INIT@Base 3.0.4 + MPI_Raccumulate@Base 3.0.4 + MPI_Recv@Base 3.0.4 + MPI_Recv_init@Base 3.0.4 + MPI_Reduce@Base 3.0.4 + MPI_Reduce_local@Base 3.0.4 + MPI_Reduce_scatter@Base 3.0.4 + MPI_Reduce_scatter_block@Base 3.0.4 + MPI_Register_datarep@Base 3.0.4 + MPI_Request_free@Base 3.0.4 + MPI_Request_get_status@Base 3.0.4 + MPI_Rget@Base 3.0.4 + MPI_Rget_accumulate@Base 3.0.4 + MPI_Rput@Base 3.0.4 + MPI_Rsend@Base 3.0.4 + MPI_Rsend_init@Base 3.0.4 + MPI_SCAN@Base 3.0.4 + MPI_SCATTER@Base 3.0.4 + MPI_SCATTERV@Base 3.0.4 + MPI_SEND@Base 3.0.4 + MPI_SENDRECV@Base 3.0.4 + MPI_SENDRECV_REPLACE@Base 3.0.4 + MPI_SEND_INIT@Base 3.0.4 + MPI_SSEND@Base 3.0.4 + MPI_SSEND_INIT@Base 3.0.4 + MPI_START@Base 3.0.4 + MPI_STARTALL@Base 3.0.4 + MPI_STATUS_SET_CANCELLED@Base 3.0.4 + MPI_STATUS_SET_ELEMENTS@Base 3.0.4 + MPI_STATUS_SET_ELEMENTS_X@Base 3.0.4 + MPI_Scan@Base 3.0.4 + MPI_Scatter@Base 3.0.4 + MPI_Scatterv@Base 3.0.4 + MPI_Send@Base 3.0.4 + MPI_Send_init@Base 3.0.4 + MPI_Sendrecv@Base 3.0.4 + MPI_Sendrecv_replace@Base 3.0.4 + MPI_Ssend@Base 3.0.4 + MPI_Ssend_init@Base 3.0.4 + MPI_Start@Base 3.0.4 + MPI_Startall@Base 3.0.4 + MPI_Status_c2f@Base 3.0.4 + MPI_Status_f2c@Base 3.0.4 + MPI_Status_set_cancelled@Base 3.0.4 + MPI_Status_set_elements@Base 3.0.4 + MPI_Status_set_elements_x@Base 3.0.4 + MPI_TEST@Base 3.0.4 + MPI_TESTALL@Base 3.0.4 + MPI_TESTANY@Base 3.0.4 + MPI_TESTSOME@Base 3.0.4 + MPI_TEST_CANCELLED@Base 3.0.4 + MPI_TOPO_TEST@Base 3.0.4 + MPI_TYPE_COMMIT@Base 3.0.4 + MPI_TYPE_CONTIGUOUS@Base 3.0.4 + MPI_TYPE_CREATE_DARRAY@Base 3.0.4 + MPI_TYPE_CREATE_F90_COMPLEX@Base 3.0.4 + MPI_TYPE_CREATE_F90_INTEGER@Base 3.0.4 + MPI_TYPE_CREATE_F90_REAL@Base 3.0.4 + MPI_TYPE_CREATE_HINDEXED@Base 3.0.4 + MPI_TYPE_CREATE_HINDEXED_BLOCK@Base 3.0.4 + MPI_TYPE_CREATE_HVECTOR@Base 3.0.4 + MPI_TYPE_CREATE_INDEXED_BLOCK@Base 3.0.4 + MPI_TYPE_CREATE_KEYVAL@Base 3.0.4 + MPI_TYPE_CREATE_RESIZED@Base 3.0.4 + MPI_TYPE_CREATE_STRUCT@Base 3.0.4 + MPI_TYPE_CREATE_SUBARRAY@Base 3.0.4 + MPI_TYPE_DELETE_ATTR@Base 3.0.4 + MPI_TYPE_DUP@Base 3.0.4 + MPI_TYPE_DUP_FN@Base 3.0.4 + MPI_TYPE_EXTENT@Base 3.0.4 + MPI_TYPE_FREE@Base 3.0.4 + MPI_TYPE_FREE_KEYVAL@Base 3.0.4 + MPI_TYPE_GET_ATTR@Base 3.0.4 + MPI_TYPE_GET_CONTENTS@Base 3.0.4 + MPI_TYPE_GET_ENVELOPE@Base 3.0.4 + MPI_TYPE_GET_EXTENT@Base 3.0.4 + MPI_TYPE_GET_EXTENT_X@Base 3.0.4 + MPI_TYPE_GET_NAME@Base 3.0.4 + MPI_TYPE_GET_TRUE_EXTENT@Base 3.0.4 + MPI_TYPE_GET_TRUE_EXTENT_X@Base 3.0.4 + MPI_TYPE_HINDEXED@Base 3.0.4 + MPI_TYPE_HVECTOR@Base 3.0.4 + MPI_TYPE_INDEXED@Base 3.0.4 + MPI_TYPE_LB@Base 3.0.4 + MPI_TYPE_MATCH_SIZE@Base 3.0.4 + MPI_TYPE_NULL_COPY_FN@Base 3.0.4 + MPI_TYPE_NULL_DELETE_FN@Base 3.0.4 + MPI_TYPE_SET_ATTR@Base 3.0.4 + MPI_TYPE_SET_NAME@Base 3.0.4 + MPI_TYPE_SIZE@Base 3.0.4 + MPI_TYPE_SIZE_X@Base 3.0.4 + MPI_TYPE_STRUCT@Base 3.0.4 + MPI_TYPE_UB@Base 3.0.4 + MPI_TYPE_VECTOR@Base 3.0.4 + MPI_T_PVAR_ALL_HANDLES@Base 3.0.4 + MPI_T_category_changed@Base 3.0.4 + MPI_T_category_get_categories@Base 3.0.4 + MPI_T_category_get_cvars@Base 3.0.4 + MPI_T_category_get_info@Base 3.0.4 + MPI_T_category_get_num@Base 3.0.4 + MPI_T_category_get_pvars@Base 3.0.4 + MPI_T_cvar_get_info@Base 3.0.4 + MPI_T_cvar_get_num@Base 3.0.4 + MPI_T_cvar_handle_alloc@Base 3.0.4 + MPI_T_cvar_handle_free@Base 3.0.4 + MPI_T_cvar_read@Base 3.0.4 + MPI_T_cvar_write@Base 3.0.4 + MPI_T_enum_get_info@Base 3.0.4 + MPI_T_enum_get_item@Base 3.0.4 + MPI_T_finalize@Base 3.0.4 + MPI_T_init_thread@Base 3.0.4 + MPI_T_pvar_get_info@Base 3.0.4 + MPI_T_pvar_get_num@Base 3.0.4 + MPI_T_pvar_handle_alloc@Base 3.0.4 + MPI_T_pvar_handle_free@Base 3.0.4 + MPI_T_pvar_read@Base 3.0.4 + MPI_T_pvar_readreset@Base 3.0.4 + MPI_T_pvar_reset@Base 3.0.4 + MPI_T_pvar_session_create@Base 3.0.4 + MPI_T_pvar_session_free@Base 3.0.4 + MPI_T_pvar_start@Base 3.0.4 + MPI_T_pvar_stop@Base 3.0.4 + MPI_T_pvar_write@Base 3.0.4 + MPI_Test@Base 3.0.4 + MPI_Test_cancelled@Base 3.0.4 + MPI_Testall@Base 3.0.4 + MPI_Testany@Base 3.0.4 + MPI_Testsome@Base 3.0.4 + MPI_Topo_test@Base 3.0.4 + MPI_Type_commit@Base 3.0.4 + MPI_Type_contiguous@Base 3.0.4 + MPI_Type_create_darray@Base 3.0.4 + MPI_Type_create_f90_complex@Base 3.0.4 + MPI_Type_create_f90_integer@Base 3.0.4 + MPI_Type_create_f90_real@Base 3.0.4 + MPI_Type_create_hindexed@Base 3.0.4 + MPI_Type_create_hindexed_block@Base 3.0.4 + MPI_Type_create_hvector@Base 3.0.4 + MPI_Type_create_indexed_block@Base 3.0.4 + MPI_Type_create_keyval@Base 3.0.4 + MPI_Type_create_resized@Base 3.0.4 + MPI_Type_create_struct@Base 3.0.4 + MPI_Type_create_subarray@Base 3.0.4 + MPI_Type_delete_attr@Base 3.0.4 + MPI_Type_dup@Base 3.0.4 + MPI_Type_extent@Base 3.0.4 + MPI_Type_free@Base 3.0.4 + MPI_Type_free_keyval@Base 3.0.4 + MPI_Type_get_attr@Base 3.0.4 + MPI_Type_get_contents@Base 3.0.4 + MPI_Type_get_envelope@Base 3.0.4 + MPI_Type_get_extent@Base 3.0.4 + MPI_Type_get_extent_x@Base 3.0.4 + MPI_Type_get_name@Base 3.0.4 + MPI_Type_get_true_extent@Base 3.0.4 + MPI_Type_get_true_extent_x@Base 3.0.4 + MPI_Type_hindexed@Base 3.0.4 + MPI_Type_hvector@Base 3.0.4 + MPI_Type_indexed@Base 3.0.4 + MPI_Type_lb@Base 3.0.4 + MPI_Type_match_size@Base 3.0.4 + MPI_Type_set_attr@Base 3.0.4 + MPI_Type_set_name@Base 3.0.4 + MPI_Type_size@Base 3.0.4 + MPI_Type_size_x@Base 3.0.4 + MPI_Type_struct@Base 3.0.4 + MPI_Type_ub@Base 3.0.4 + MPI_Type_vector@Base 3.0.4 + MPI_UNPACK@Base 3.0.4 + MPI_UNPACK_EXTERNAL@Base 3.0.4 + MPI_UNPUBLISH_NAME@Base 3.0.4 + MPI_UNWEIGHTED@Base 3.0.4 + MPI_Unpack@Base 3.0.4 + MPI_Unpack_external@Base 3.0.4 + MPI_Unpublish_name@Base 3.0.4 + MPI_WAIT@Base 3.0.4 + MPI_WAITALL@Base 3.0.4 + MPI_WAITANY@Base 3.0.4 + MPI_WAITSOME@Base 3.0.4 + MPI_WEIGHTS_EMPTY@Base 3.0.4 + MPI_WIN_ALLOCATE@Base 3.0.4 + MPI_WIN_ALLOCATE_SHARED@Base 3.0.4 + MPI_WIN_ATTACH@Base 3.0.4 + MPI_WIN_CALL_ERRHANDLER@Base 3.0.4 + MPI_WIN_COMPLETE@Base 3.0.4 + MPI_WIN_CREATE@Base 3.0.4 + MPI_WIN_CREATE_DYNAMIC@Base 3.0.4 + MPI_WIN_CREATE_ERRHANDLER@Base 3.0.4 + MPI_WIN_CREATE_KEYVAL@Base 3.0.4 + MPI_WIN_DELETE_ATTR@Base 3.0.4 + MPI_WIN_DETACH@Base 3.0.4 + MPI_WIN_DUP_FN@Base 3.0.4 + MPI_WIN_FENCE@Base 3.0.4 + MPI_WIN_FLUSH@Base 3.0.4 + MPI_WIN_FLUSH_ALL@Base 3.0.4 + MPI_WIN_FLUSH_LOCAL@Base 3.0.4 + MPI_WIN_FLUSH_LOCAL_ALL@Base 3.0.4 + MPI_WIN_FREE@Base 3.0.4 + MPI_WIN_FREE_KEYVAL@Base 3.0.4 + MPI_WIN_GET_ATTR@Base 3.0.4 + MPI_WIN_GET_ERRHANDLER@Base 3.0.4 + MPI_WIN_GET_GROUP@Base 3.0.4 + MPI_WIN_GET_INFO@Base 3.0.4 + MPI_WIN_GET_NAME@Base 3.0.4 + MPI_WIN_LOCK@Base 3.0.4 + MPI_WIN_LOCK_ALL@Base 3.0.4 + MPI_WIN_NULL_COPY_FN@Base 3.0.4 + MPI_WIN_NULL_DELETE_FN@Base 3.0.4 + MPI_WIN_POST@Base 3.0.4 + MPI_WIN_SET_ATTR@Base 3.0.4 + MPI_WIN_SET_ERRHANDLER@Base 3.0.4 + MPI_WIN_SET_INFO@Base 3.0.4 + MPI_WIN_SET_NAME@Base 3.0.4 + MPI_WIN_SHARED_QUERY@Base 3.0.4 + MPI_WIN_START@Base 3.0.4 + MPI_WIN_SYNC@Base 3.0.4 + MPI_WIN_TEST@Base 3.0.4 + MPI_WIN_UNLOCK@Base 3.0.4 + MPI_WIN_UNLOCK_ALL@Base 3.0.4 + MPI_WIN_WAIT@Base 3.0.4 + MPI_WTICK@Base 3.0.4 + MPI_WTIME@Base 3.0.4 + MPI_Wait@Base 3.0.4 + MPI_Waitall@Base 3.0.4 + MPI_Waitany@Base 3.0.4 + MPI_Waitsome@Base 3.0.4 + MPI_Win_allocate@Base 3.0.4 + MPI_Win_allocate_shared@Base 3.0.4 + MPI_Win_attach@Base 3.0.4 + MPI_Win_call_errhandler@Base 3.0.4 + MPI_Win_complete@Base 3.0.4 + MPI_Win_create@Base 3.0.4 + MPI_Win_create_dynamic@Base 3.0.4 + MPI_Win_create_errhandler@Base 3.0.4 + MPI_Win_create_keyval@Base 3.0.4 + MPI_Win_delete_attr@Base 3.0.4 + MPI_Win_detach@Base 3.0.4 + MPI_Win_fence@Base 3.0.4 + MPI_Win_flush@Base 3.0.4 + MPI_Win_flush_all@Base 3.0.4 + MPI_Win_flush_local@Base 3.0.4 + MPI_Win_flush_local_all@Base 3.0.4 + MPI_Win_free@Base 3.0.4 + MPI_Win_free_keyval@Base 3.0.4 + MPI_Win_get_attr@Base 3.0.4 + MPI_Win_get_errhandler@Base 3.0.4 + MPI_Win_get_group@Base 3.0.4 + MPI_Win_get_info@Base 3.0.4 + MPI_Win_get_name@Base 3.0.4 + MPI_Win_lock@Base 3.0.4 + MPI_Win_lock_all@Base 3.0.4 + MPI_Win_post@Base 3.0.4 + MPI_Win_set_attr@Base 3.0.4 + MPI_Win_set_errhandler@Base 3.0.4 + MPI_Win_set_info@Base 3.0.4 + MPI_Win_set_name@Base 3.0.4 + MPI_Win_shared_query@Base 3.0.4 + MPI_Win_start@Base 3.0.4 + MPI_Win_sync@Base 3.0.4 + MPI_Win_test@Base 3.0.4 + MPI_Win_unlock@Base 3.0.4 + MPI_Win_unlock_all@Base 3.0.4 + MPI_Win_wait@Base 3.0.4 + MPI_Wtick@Base 3.0.4 + MPI_Wtime@Base 3.0.4 + PMIU_SetServer@Base 3.0.4 + PMIU_Set_rank@Base 3.0.4 + PMIU_chgval@Base 3.0.4 + PMIU_dump_keyvals@Base 3.0.4 + PMIU_getval@Base 3.0.4 + PMIU_parse_keyvals@Base 3.0.4 + PMIU_printf@Base 3.0.4 + PMIU_readline@Base 3.0.4 + PMIU_writeline@Base 3.0.4 + PMI_Abort@Base 3.0.4 + PMI_Barrier@Base 3.0.4 + PMI_Finalize@Base 3.0.4 + PMI_Get_appnum@Base 3.0.4 + PMI_Get_rank@Base 3.0.4 + PMI_Get_size@Base 3.0.4 + PMI_Get_universe_size@Base 3.0.4 + PMI_Init@Base 3.0.4 + PMI_Initialized@Base 3.0.4 + PMI_KVS_Commit@Base 3.0.4 + PMI_KVS_Get@Base 3.0.4 + PMI_KVS_Get_key_length_max@Base 3.0.4 + PMI_KVS_Get_my_name@Base 3.0.4 + PMI_KVS_Get_name_length_max@Base 3.0.4 + PMI_KVS_Get_value_length_max@Base 3.0.4 + PMI_KVS_Put@Base 3.0.4 + PMI_Lookup_name@Base 3.0.4 + PMI_Publish_name@Base 3.0.4 + PMI_Spawn_multiple@Base 3.0.4 + PMI_Unpublish_name@Base 3.0.4 + PMPIX_COMM_GROUP_FAILED@Base 3.0.4 + PMPIX_COMM_REENABLE_ANYSOURCE@Base 3.0.4 + PMPIX_COMM_REMOTE_GROUP_FAILED@Base 3.0.4 + PMPIX_Comm_group_failed@Base 3.0.4 + PMPIX_Comm_reenable_anysource@Base 3.0.4 + PMPIX_Comm_remote_group_failed@Base 3.0.4 + PMPIX_Grequest_class_allocate@Base 3.0.4 + PMPIX_Grequest_class_create@Base 3.0.4 + PMPIX_Grequest_start@Base 3.0.4 + PMPIX_Mutex_create@Base 3.0.4 + PMPIX_Mutex_free@Base 3.0.4 + PMPIX_Mutex_lock@Base 3.0.4 + PMPIX_Mutex_unlock@Base 3.0.4 + PMPI_ABORT@Base 3.0.4 + PMPI_ACCUMULATE@Base 3.0.4 + PMPI_ADDRESS@Base 3.0.4 + PMPI_ADD_ERROR_CLASS@Base 3.0.4 + PMPI_ADD_ERROR_CODE@Base 3.0.4 + PMPI_ADD_ERROR_STRING@Base 3.0.4 + PMPI_ALLGATHER@Base 3.0.4 + PMPI_ALLGATHERV@Base 3.0.4 + PMPI_ALLOC_MEM@Base 3.0.4 + PMPI_ALLREDUCE@Base 3.0.4 + PMPI_ALLTOALL@Base 3.0.4 + PMPI_ALLTOALLV@Base 3.0.4 + PMPI_ALLTOALLW@Base 3.0.4 + PMPI_ATTR_DELETE@Base 3.0.4 + PMPI_ATTR_GET@Base 3.0.4 + PMPI_ATTR_PUT@Base 3.0.4 + PMPI_Abort@Base 3.0.4 + PMPI_Accumulate@Base 3.0.4 + PMPI_Add_error_class@Base 3.0.4 + PMPI_Add_error_code@Base 3.0.4 + PMPI_Add_error_string@Base 3.0.4 + PMPI_Address@Base 3.0.4 + PMPI_Allgather@Base 3.0.4 + PMPI_Allgatherv@Base 3.0.4 + PMPI_Alloc_mem@Base 3.0.4 + PMPI_Allreduce@Base 3.0.4 + PMPI_Alltoall@Base 3.0.4 + PMPI_Alltoallv@Base 3.0.4 + PMPI_Alltoallw@Base 3.0.4 + PMPI_Attr_delete@Base 3.0.4 + PMPI_Attr_get@Base 3.0.4 + PMPI_Attr_put@Base 3.0.4 + PMPI_BARRIER@Base 3.0.4 + PMPI_BCAST@Base 3.0.4 + PMPI_BSEND@Base 3.0.4 + PMPI_BSEND_INIT@Base 3.0.4 + PMPI_BUFFER_ATTACH@Base 3.0.4 + PMPI_BUFFER_DETACH@Base 3.0.4 + PMPI_Barrier@Base 3.0.4 + PMPI_Bcast@Base 3.0.4 + PMPI_Bsend@Base 3.0.4 + PMPI_Bsend_init@Base 3.0.4 + PMPI_Buffer_attach@Base 3.0.4 + PMPI_Buffer_detach@Base 3.0.4 + PMPI_CANCEL@Base 3.0.4 + PMPI_CARTDIM_GET@Base 3.0.4 + PMPI_CART_COORDS@Base 3.0.4 + PMPI_CART_CREATE@Base 3.0.4 + PMPI_CART_GET@Base 3.0.4 + PMPI_CART_MAP@Base 3.0.4 + PMPI_CART_RANK@Base 3.0.4 + PMPI_CART_SHIFT@Base 3.0.4 + PMPI_CART_SUB@Base 3.0.4 + PMPI_CLOSE_PORT@Base 3.0.4 + PMPI_COMM_ACCEPT@Base 3.0.4 + PMPI_COMM_CALL_ERRHANDLER@Base 3.0.4 + PMPI_COMM_COMPARE@Base 3.0.4 + PMPI_COMM_CONNECT@Base 3.0.4 + PMPI_COMM_CREATE@Base 3.0.4 + PMPI_COMM_CREATE_ERRHANDLER@Base 3.0.4 + PMPI_COMM_CREATE_GROUP@Base 3.0.4 + PMPI_COMM_CREATE_KEYVAL@Base 3.0.4 + PMPI_COMM_DELETE_ATTR@Base 3.0.4 + PMPI_COMM_DISCONNECT@Base 3.0.4 + PMPI_COMM_DUP@Base 3.0.4 + PMPI_COMM_DUP_FN@Base 3.0.4 + PMPI_COMM_DUP_WITH_INFO@Base 3.0.4 + PMPI_COMM_FREE@Base 3.0.4 + PMPI_COMM_FREE_KEYVAL@Base 3.0.4 + PMPI_COMM_GET_ATTR@Base 3.0.4 + PMPI_COMM_GET_ERRHANDLER@Base 3.0.4 + PMPI_COMM_GET_INFO@Base 3.0.4 + PMPI_COMM_GET_NAME@Base 3.0.4 + PMPI_COMM_GET_PARENT@Base 3.0.4 + PMPI_COMM_GROUP@Base 3.0.4 + PMPI_COMM_IDUP@Base 3.0.4 + PMPI_COMM_JOIN@Base 3.0.4 + PMPI_COMM_NULL_COPY_FN@Base 3.0.4 + PMPI_COMM_NULL_DELETE_FN@Base 3.0.4 + PMPI_COMM_RANK@Base 3.0.4 + PMPI_COMM_REMOTE_GROUP@Base 3.0.4 + PMPI_COMM_REMOTE_SIZE@Base 3.0.4 + PMPI_COMM_SET_ATTR@Base 3.0.4 + PMPI_COMM_SET_ERRHANDLER@Base 3.0.4 + PMPI_COMM_SET_INFO@Base 3.0.4 + PMPI_COMM_SET_NAME@Base 3.0.4 + PMPI_COMM_SIZE@Base 3.0.4 + PMPI_COMM_SPAWN@Base 3.0.4 + PMPI_COMM_SPAWN_MULTIPLE@Base 3.0.4 + PMPI_COMM_SPLIT@Base 3.0.4 + PMPI_COMM_SPLIT_TYPE@Base 3.0.4 + PMPI_COMM_TEST_INTER@Base 3.0.4 + PMPI_COMPARE_AND_SWAP@Base 3.0.4 + PMPI_Cancel@Base 3.0.4 + PMPI_Cart_coords@Base 3.0.4 + PMPI_Cart_create@Base 3.0.4 + PMPI_Cart_get@Base 3.0.4 + PMPI_Cart_map@Base 3.0.4 + PMPI_Cart_rank@Base 3.0.4 + PMPI_Cart_shift@Base 3.0.4 + PMPI_Cart_sub@Base 3.0.4 + PMPI_Cartdim_get@Base 3.0.4 + PMPI_Close_port@Base 3.0.4 + PMPI_Comm_accept@Base 3.0.4 + PMPI_Comm_call_errhandler@Base 3.0.4 + PMPI_Comm_compare@Base 3.0.4 + PMPI_Comm_connect@Base 3.0.4 + PMPI_Comm_create@Base 3.0.4 + PMPI_Comm_create_errhandler@Base 3.0.4 + PMPI_Comm_create_group@Base 3.0.4 + PMPI_Comm_create_keyval@Base 3.0.4 + PMPI_Comm_delete_attr@Base 3.0.4 + PMPI_Comm_disconnect@Base 3.0.4 + PMPI_Comm_dup@Base 3.0.4 + PMPI_Comm_dup_with_info@Base 3.0.4 + PMPI_Comm_free@Base 3.0.4 + PMPI_Comm_free_keyval@Base 3.0.4 + PMPI_Comm_get_attr@Base 3.0.4 + PMPI_Comm_get_errhandler@Base 3.0.4 + PMPI_Comm_get_info@Base 3.0.4 + PMPI_Comm_get_name@Base 3.0.4 + PMPI_Comm_get_parent@Base 3.0.4 + PMPI_Comm_group@Base 3.0.4 + PMPI_Comm_idup@Base 3.0.4 + PMPI_Comm_join@Base 3.0.4 + PMPI_Comm_rank@Base 3.0.4 + PMPI_Comm_remote_group@Base 3.0.4 + PMPI_Comm_remote_size@Base 3.0.4 + PMPI_Comm_set_attr@Base 3.0.4 + PMPI_Comm_set_errhandler@Base 3.0.4 + PMPI_Comm_set_info@Base 3.0.4 + PMPI_Comm_set_name@Base 3.0.4 + PMPI_Comm_size@Base 3.0.4 + PMPI_Comm_spawn@Base 3.0.4 + PMPI_Comm_spawn_multiple@Base 3.0.4 + PMPI_Comm_split@Base 3.0.4 + PMPI_Comm_split_type@Base 3.0.4 + PMPI_Comm_test_inter@Base 3.0.4 + PMPI_Compare_and_swap@Base 3.0.4 + PMPI_DIMS_CREATE@Base 3.0.4 + PMPI_DIST_GRAPH_CREATE@Base 3.0.4 + PMPI_DIST_GRAPH_CREATE_ADJACENT@Base 3.0.4 + PMPI_DIST_GRAPH_NEIGHBORS@Base 3.0.4 + PMPI_DIST_GRAPH_NEIGHBORS_COUNT@Base 3.0.4 + PMPI_DUP_FN@Base 3.0.4 + PMPI_Dims_create@Base 3.0.4 + PMPI_Dist_graph_create@Base 3.0.4 + PMPI_Dist_graph_create_adjacent@Base 3.0.4 + PMPI_Dist_graph_neighbors@Base 3.0.4 + PMPI_Dist_graph_neighbors_count@Base 3.0.4 + PMPI_ERRHANDLER_CREATE@Base 3.0.4 + PMPI_ERRHANDLER_FREE@Base 3.0.4 + PMPI_ERRHANDLER_GET@Base 3.0.4 + PMPI_ERRHANDLER_SET@Base 3.0.4 + PMPI_ERROR_CLASS@Base 3.0.4 + PMPI_ERROR_STRING@Base 3.0.4 + PMPI_EXSCAN@Base 3.0.4 + PMPI_Errhandler_create@Base 3.0.4 + PMPI_Errhandler_free@Base 3.0.4 + PMPI_Errhandler_get@Base 3.0.4 + PMPI_Errhandler_set@Base 3.0.4 + PMPI_Error_class@Base 3.0.4 + PMPI_Error_string@Base 3.0.4 + PMPI_Exscan@Base 3.0.4 + PMPI_FETCH_AND_OP@Base 3.0.4 + PMPI_FILE_CALL_ERRHANDLER@Base 3.0.4 + PMPI_FILE_CLOSE@Base 3.0.4 + PMPI_FILE_CREATE_ERRHANDLER@Base 3.0.4 + PMPI_FILE_DELETE@Base 3.0.4 + PMPI_FILE_GET_AMODE@Base 3.0.4 + PMPI_FILE_GET_ATOMICITY@Base 3.0.4 + PMPI_FILE_GET_BYTE_OFFSET@Base 3.0.4 + PMPI_FILE_GET_ERRHANDLER@Base 3.0.4 + PMPI_FILE_GET_GROUP@Base 3.0.4 + PMPI_FILE_GET_INFO@Base 3.0.4 + PMPI_FILE_GET_POSITION@Base 3.0.4 + PMPI_FILE_GET_POSITION_SHARED@Base 3.0.4 + PMPI_FILE_GET_SIZE@Base 3.0.4 + PMPI_FILE_GET_TYPE_EXTENT@Base 3.0.4 + PMPI_FILE_GET_VIEW@Base 3.0.4 + PMPI_FILE_IREAD@Base 3.0.4 + PMPI_FILE_IREAD_AT@Base 3.0.4 + PMPI_FILE_IREAD_SHARED@Base 3.0.4 + PMPI_FILE_IWRITE@Base 3.0.4 + PMPI_FILE_IWRITE_AT@Base 3.0.4 + PMPI_FILE_IWRITE_SHARED@Base 3.0.4 + PMPI_FILE_OPEN@Base 3.0.4 + PMPI_FILE_PREALLOCATE@Base 3.0.4 + PMPI_FILE_READ@Base 3.0.4 + PMPI_FILE_READ_ALL@Base 3.0.4 + PMPI_FILE_READ_ALL_BEGIN@Base 3.0.4 + PMPI_FILE_READ_ALL_END@Base 3.0.4 + PMPI_FILE_READ_AT@Base 3.0.4 + PMPI_FILE_READ_AT_ALL@Base 3.0.4 + PMPI_FILE_READ_AT_ALL_BEGIN@Base 3.0.4 + PMPI_FILE_READ_AT_ALL_END@Base 3.0.4 + PMPI_FILE_READ_ORDERED@Base 3.0.4 + PMPI_FILE_READ_ORDERED_BEGIN@Base 3.0.4 + PMPI_FILE_READ_ORDERED_END@Base 3.0.4 + PMPI_FILE_READ_SHARED@Base 3.0.4 + PMPI_FILE_SEEK@Base 3.0.4 + PMPI_FILE_SEEK_SHARED@Base 3.0.4 + PMPI_FILE_SET_ATOMICITY@Base 3.0.4 + PMPI_FILE_SET_ERRHANDLER@Base 3.0.4 + PMPI_FILE_SET_INFO@Base 3.0.4 + PMPI_FILE_SET_SIZE@Base 3.0.4 + PMPI_FILE_SET_VIEW@Base 3.0.4 + PMPI_FILE_SYNC@Base 3.0.4 + PMPI_FILE_WRITE@Base 3.0.4 + PMPI_FILE_WRITE_ALL@Base 3.0.4 + PMPI_FILE_WRITE_ALL_BEGIN@Base 3.0.4 + PMPI_FILE_WRITE_ALL_END@Base 3.0.4 + PMPI_FILE_WRITE_AT@Base 3.0.4 + PMPI_FILE_WRITE_AT_ALL@Base 3.0.4 + PMPI_FILE_WRITE_AT_ALL_BEGIN@Base 3.0.4 + PMPI_FILE_WRITE_AT_ALL_END@Base 3.0.4 + PMPI_FILE_WRITE_ORDERED@Base 3.0.4 + PMPI_FILE_WRITE_ORDERED_BEGIN@Base 3.0.4 + PMPI_FILE_WRITE_ORDERED_END@Base 3.0.4 + PMPI_FILE_WRITE_SHARED@Base 3.0.4 + PMPI_FINALIZE@Base 3.0.4 + PMPI_FINALIZED@Base 3.0.4 + PMPI_FREE_MEM@Base 3.0.4 + PMPI_Fetch_and_op@Base 3.0.4 + PMPI_File_c2f@Base 3.0.4 + PMPI_File_call_errhandler@Base 3.0.4 + PMPI_File_close@Base 3.0.4 + PMPI_File_create_errhandler@Base 3.0.4 + PMPI_File_delete@Base 3.0.4 + PMPI_File_f2c@Base 3.0.4 + PMPI_File_get_amode@Base 3.0.4 + PMPI_File_get_atomicity@Base 3.0.4 + PMPI_File_get_byte_offset@Base 3.0.4 + PMPI_File_get_errhandler@Base 3.0.4 + PMPI_File_get_group@Base 3.0.4 + PMPI_File_get_info@Base 3.0.4 + PMPI_File_get_position@Base 3.0.4 + PMPI_File_get_position_shared@Base 3.0.4 + PMPI_File_get_size@Base 3.0.4 + PMPI_File_get_type_extent@Base 3.0.4 + PMPI_File_get_view@Base 3.0.4 + PMPI_File_iread@Base 3.0.4 + PMPI_File_iread_at@Base 3.0.4 + PMPI_File_iread_shared@Base 3.0.4 + PMPI_File_iwrite@Base 3.0.4 + PMPI_File_iwrite_at@Base 3.0.4 + PMPI_File_iwrite_shared@Base 3.0.4 + PMPI_File_open@Base 3.0.4 + PMPI_File_preallocate@Base 3.0.4 + PMPI_File_read@Base 3.0.4 + PMPI_File_read_all@Base 3.0.4 + PMPI_File_read_all_begin@Base 3.0.4 + PMPI_File_read_all_end@Base 3.0.4 + PMPI_File_read_at@Base 3.0.4 + PMPI_File_read_at_all@Base 3.0.4 + PMPI_File_read_at_all_begin@Base 3.0.4 + PMPI_File_read_at_all_end@Base 3.0.4 + PMPI_File_read_ordered@Base 3.0.4 + PMPI_File_read_ordered_begin@Base 3.0.4 + PMPI_File_read_ordered_end@Base 3.0.4 + PMPI_File_read_shared@Base 3.0.4 + PMPI_File_seek@Base 3.0.4 + PMPI_File_seek_shared@Base 3.0.4 + PMPI_File_set_atomicity@Base 3.0.4 + PMPI_File_set_errhandler@Base 3.0.4 + PMPI_File_set_info@Base 3.0.4 + PMPI_File_set_size@Base 3.0.4 + PMPI_File_set_view@Base 3.0.4 + PMPI_File_sync@Base 3.0.4 + PMPI_File_write@Base 3.0.4 + PMPI_File_write_all@Base 3.0.4 + PMPI_File_write_all_begin@Base 3.0.4 + PMPI_File_write_all_end@Base 3.0.4 + PMPI_File_write_at@Base 3.0.4 + PMPI_File_write_at_all@Base 3.0.4 + PMPI_File_write_at_all_begin@Base 3.0.4 + PMPI_File_write_at_all_end@Base 3.0.4 + PMPI_File_write_ordered@Base 3.0.4 + PMPI_File_write_ordered_begin@Base 3.0.4 + PMPI_File_write_ordered_end@Base 3.0.4 + PMPI_File_write_shared@Base 3.0.4 + PMPI_Finalize@Base 3.0.4 + PMPI_Finalized@Base 3.0.4 + PMPI_Free_mem@Base 3.0.4 + PMPI_GATHER@Base 3.0.4 + PMPI_GATHERV@Base 3.0.4 + PMPI_GET@Base 3.0.4 + PMPI_GET_ACCUMULATE@Base 3.0.4 + PMPI_GET_ADDRESS@Base 3.0.4 + PMPI_GET_COUNT@Base 3.0.4 + PMPI_GET_ELEMENTS@Base 3.0.4 + PMPI_GET_ELEMENTS_X@Base 3.0.4 + PMPI_GET_LIBRARY_VERSION@Base 3.0.4 + PMPI_GET_PROCESSOR_NAME@Base 3.0.4 + PMPI_GET_VERSION@Base 3.0.4 + PMPI_GRAPHDIMS_GET@Base 3.0.4 + PMPI_GRAPH_CREATE@Base 3.0.4 + PMPI_GRAPH_GET@Base 3.0.4 + PMPI_GRAPH_MAP@Base 3.0.4 + PMPI_GRAPH_NEIGHBORS@Base 3.0.4 + PMPI_GRAPH_NEIGHBORS_COUNT@Base 3.0.4 + PMPI_GREQUEST_COMPLETE@Base 3.0.4 + PMPI_GREQUEST_START@Base 3.0.4 + PMPI_GROUP_COMPARE@Base 3.0.4 + PMPI_GROUP_DIFFERENCE@Base 3.0.4 + PMPI_GROUP_EXCL@Base 3.0.4 + PMPI_GROUP_FREE@Base 3.0.4 + PMPI_GROUP_INCL@Base 3.0.4 + PMPI_GROUP_INTERSECTION@Base 3.0.4 + PMPI_GROUP_RANGE_EXCL@Base 3.0.4 + PMPI_GROUP_RANGE_INCL@Base 3.0.4 + PMPI_GROUP_RANK@Base 3.0.4 + PMPI_GROUP_SIZE@Base 3.0.4 + PMPI_GROUP_TRANSLATE_RANKS@Base 3.0.4 + PMPI_GROUP_UNION@Base 3.0.4 + PMPI_Gather@Base 3.0.4 + PMPI_Gatherv@Base 3.0.4 + PMPI_Get@Base 3.0.4 + PMPI_Get_accumulate@Base 3.0.4 + PMPI_Get_address@Base 3.0.4 + PMPI_Get_count@Base 3.0.4 + PMPI_Get_elements@Base 3.0.4 + PMPI_Get_elements_x@Base 3.0.4 + PMPI_Get_library_version@Base 3.0.4 + PMPI_Get_processor_name@Base 3.0.4 + PMPI_Get_version@Base 3.0.4 + PMPI_Graph_create@Base 3.0.4 + PMPI_Graph_get@Base 3.0.4 + PMPI_Graph_map@Base 3.0.4 + PMPI_Graph_neighbors@Base 3.0.4 + PMPI_Graph_neighbors_count@Base 3.0.4 + PMPI_Graphdims_get@Base 3.0.4 + PMPI_Grequest_complete@Base 3.0.4 + PMPI_Grequest_start@Base 3.0.4 + PMPI_Group_compare@Base 3.0.4 + PMPI_Group_difference@Base 3.0.4 + PMPI_Group_excl@Base 3.0.4 + PMPI_Group_free@Base 3.0.4 + PMPI_Group_incl@Base 3.0.4 + PMPI_Group_intersection@Base 3.0.4 + PMPI_Group_range_excl@Base 3.0.4 + PMPI_Group_range_incl@Base 3.0.4 + PMPI_Group_rank@Base 3.0.4 + PMPI_Group_size@Base 3.0.4 + PMPI_Group_translate_ranks@Base 3.0.4 + PMPI_Group_union@Base 3.0.4 + PMPI_IALLGATHER@Base 3.0.4 + PMPI_IALLGATHERV@Base 3.0.4 + PMPI_IALLREDUCE@Base 3.0.4 + PMPI_IALLTOALL@Base 3.0.4 + PMPI_IALLTOALLV@Base 3.0.4 + PMPI_IALLTOALLW@Base 3.0.4 + PMPI_IBARRIER@Base 3.0.4 + PMPI_IBCAST@Base 3.0.4 + PMPI_IBSEND@Base 3.0.4 + PMPI_IEXSCAN@Base 3.0.4 + PMPI_IGATHER@Base 3.0.4 + PMPI_IGATHERV@Base 3.0.4 + PMPI_IMPROBE@Base 3.0.4 + PMPI_IMRECV@Base 3.0.4 + PMPI_INEIGHBOR_ALLGATHER@Base 3.0.4 + PMPI_INEIGHBOR_ALLGATHERV@Base 3.0.4 + PMPI_INEIGHBOR_ALLTOALL@Base 3.0.4 + PMPI_INEIGHBOR_ALLTOALLV@Base 3.0.4 + PMPI_INEIGHBOR_ALLTOALLW@Base 3.0.4 + PMPI_INFO_CREATE@Base 3.0.4 + PMPI_INFO_DELETE@Base 3.0.4 + PMPI_INFO_DUP@Base 3.0.4 + PMPI_INFO_FREE@Base 3.0.4 + PMPI_INFO_GET@Base 3.0.4 + PMPI_INFO_GET_NKEYS@Base 3.0.4 + PMPI_INFO_GET_NTHKEY@Base 3.0.4 + PMPI_INFO_GET_VALUELEN@Base 3.0.4 + PMPI_INFO_SET@Base 3.0.4 + PMPI_INIT@Base 3.0.4 + PMPI_INITIALIZED@Base 3.0.4 + PMPI_INIT_THREAD@Base 3.0.4 + PMPI_INTERCOMM_CREATE@Base 3.0.4 + PMPI_INTERCOMM_MERGE@Base 3.0.4 + PMPI_IPROBE@Base 3.0.4 + PMPI_IRECV@Base 3.0.4 + PMPI_IREDUCE@Base 3.0.4 + PMPI_IREDUCE_SCATTER@Base 3.0.4 + PMPI_IREDUCE_SCATTER_BLOCK@Base 3.0.4 + PMPI_IRSEND@Base 3.0.4 + PMPI_ISCAN@Base 3.0.4 + PMPI_ISCATTER@Base 3.0.4 + PMPI_ISCATTERV@Base 3.0.4 + PMPI_ISEND@Base 3.0.4 + PMPI_ISSEND@Base 3.0.4 + PMPI_IS_THREAD_MAIN@Base 3.0.4 + PMPI_Iallgather@Base 3.0.4 + PMPI_Iallgatherv@Base 3.0.4 + PMPI_Iallreduce@Base 3.0.4 + PMPI_Ialltoall@Base 3.0.4 + PMPI_Ialltoallv@Base 3.0.4 + PMPI_Ialltoallw@Base 3.0.4 + PMPI_Ibarrier@Base 3.0.4 + PMPI_Ibcast@Base 3.0.4 + PMPI_Ibsend@Base 3.0.4 + PMPI_Iexscan@Base 3.0.4 + PMPI_Igather@Base 3.0.4 + PMPI_Igatherv@Base 3.0.4 + PMPI_Improbe@Base 3.0.4 + PMPI_Imrecv@Base 3.0.4 + PMPI_Ineighbor_allgather@Base 3.0.4 + PMPI_Ineighbor_allgatherv@Base 3.0.4 + PMPI_Ineighbor_alltoall@Base 3.0.4 + PMPI_Ineighbor_alltoallv@Base 3.0.4 + PMPI_Ineighbor_alltoallw@Base 3.0.4 + PMPI_Info_create@Base 3.0.4 + PMPI_Info_delete@Base 3.0.4 + PMPI_Info_dup@Base 3.0.4 + PMPI_Info_free@Base 3.0.4 + PMPI_Info_get@Base 3.0.4 + PMPI_Info_get_nkeys@Base 3.0.4 + PMPI_Info_get_nthkey@Base 3.0.4 + PMPI_Info_get_valuelen@Base 3.0.4 + PMPI_Info_set@Base 3.0.4 + PMPI_Init@Base 3.0.4 + PMPI_Init_thread@Base 3.0.4 + PMPI_Initialized@Base 3.0.4 + PMPI_Intercomm_create@Base 3.0.4 + PMPI_Intercomm_merge@Base 3.0.4 + PMPI_Iprobe@Base 3.0.4 + PMPI_Irecv@Base 3.0.4 + PMPI_Ireduce@Base 3.0.4 + PMPI_Ireduce_scatter@Base 3.0.4 + PMPI_Ireduce_scatter_block@Base 3.0.4 + PMPI_Irsend@Base 3.0.4 + PMPI_Is_thread_main@Base 3.0.4 + PMPI_Iscan@Base 3.0.4 + PMPI_Iscatter@Base 3.0.4 + PMPI_Iscatterv@Base 3.0.4 + PMPI_Isend@Base 3.0.4 + PMPI_Issend@Base 3.0.4 + PMPI_KEYVAL_CREATE@Base 3.0.4 + PMPI_KEYVAL_FREE@Base 3.0.4 + PMPI_Keyval_create@Base 3.0.4 + PMPI_Keyval_free@Base 3.0.4 + PMPI_LOOKUP_NAME@Base 3.0.4 + PMPI_Lookup_name@Base 3.0.4 + PMPI_MPROBE@Base 3.0.4 + PMPI_MRECV@Base 3.0.4 + PMPI_Mprobe@Base 3.0.4 + PMPI_Mrecv@Base 3.0.4 + PMPI_NEIGHBOR_ALLGATHER@Base 3.0.4 + PMPI_NEIGHBOR_ALLGATHERV@Base 3.0.4 + PMPI_NEIGHBOR_ALLTOALL@Base 3.0.4 + PMPI_NEIGHBOR_ALLTOALLV@Base 3.0.4 + PMPI_NEIGHBOR_ALLTOALLW@Base 3.0.4 + PMPI_NULL_COPY_FN@Base 3.0.4 + PMPI_NULL_DELETE_FN@Base 3.0.4 + PMPI_Neighbor_allgather@Base 3.0.4 + PMPI_Neighbor_allgatherv@Base 3.0.4 + PMPI_Neighbor_alltoall@Base 3.0.4 + PMPI_Neighbor_alltoallv@Base 3.0.4 + PMPI_Neighbor_alltoallw@Base 3.0.4 + PMPI_OPEN_PORT@Base 3.0.4 + PMPI_OP_COMMUTATIVE@Base 3.0.4 + PMPI_OP_CREATE@Base 3.0.4 + PMPI_OP_FREE@Base 3.0.4 + PMPI_Op_commutative@Base 3.0.4 + PMPI_Op_create@Base 3.0.4 + PMPI_Op_free@Base 3.0.4 + PMPI_Open_port@Base 3.0.4 + PMPI_PACK@Base 3.0.4 + PMPI_PACK_EXTERNAL@Base 3.0.4 + PMPI_PACK_EXTERNAL_SIZE@Base 3.0.4 + PMPI_PACK_SIZE@Base 3.0.4 + PMPI_PCONTROL@Base 3.0.4 + PMPI_PROBE@Base 3.0.4 + PMPI_PUBLISH_NAME@Base 3.0.4 + PMPI_PUT@Base 3.0.4 + PMPI_Pack@Base 3.0.4 + PMPI_Pack_external@Base 3.0.4 + PMPI_Pack_external_size@Base 3.0.4 + PMPI_Pack_size@Base 3.0.4 + PMPI_Pcontrol@Base 3.0.4 + PMPI_Probe@Base 3.0.4 + PMPI_Publish_name@Base 3.0.4 + PMPI_Put@Base 3.0.4 + PMPI_QUERY_THREAD@Base 3.0.4 + PMPI_Query_thread@Base 3.0.4 + PMPI_RACCUMULATE@Base 3.0.4 + PMPI_RECV@Base 3.0.4 + PMPI_RECV_INIT@Base 3.0.4 + PMPI_REDUCE@Base 3.0.4 + PMPI_REDUCE_LOCAL@Base 3.0.4 + PMPI_REDUCE_SCATTER@Base 3.0.4 + PMPI_REDUCE_SCATTER_BLOCK@Base 3.0.4 + PMPI_REGISTER_DATAREP@Base 3.0.4 + PMPI_REQUEST_FREE@Base 3.0.4 + PMPI_REQUEST_GET_STATUS@Base 3.0.4 + PMPI_RGET@Base 3.0.4 + PMPI_RGET_ACCUMULATE@Base 3.0.4 + PMPI_RPUT@Base 3.0.4 + PMPI_RSEND@Base 3.0.4 + PMPI_RSEND_INIT@Base 3.0.4 + PMPI_Raccumulate@Base 3.0.4 + PMPI_Recv@Base 3.0.4 + PMPI_Recv_init@Base 3.0.4 + PMPI_Reduce@Base 3.0.4 + PMPI_Reduce_local@Base 3.0.4 + PMPI_Reduce_scatter@Base 3.0.4 + PMPI_Reduce_scatter_block@Base 3.0.4 + PMPI_Register_datarep@Base 3.0.4 + PMPI_Request_free@Base 3.0.4 + PMPI_Request_get_status@Base 3.0.4 + PMPI_Rget@Base 3.0.4 + PMPI_Rget_accumulate@Base 3.0.4 + PMPI_Rput@Base 3.0.4 + PMPI_Rsend@Base 3.0.4 + PMPI_Rsend_init@Base 3.0.4 + PMPI_SCAN@Base 3.0.4 + PMPI_SCATTER@Base 3.0.4 + PMPI_SCATTERV@Base 3.0.4 + PMPI_SEND@Base 3.0.4 + PMPI_SENDRECV@Base 3.0.4 + PMPI_SENDRECV_REPLACE@Base 3.0.4 + PMPI_SEND_INIT@Base 3.0.4 + PMPI_SSEND@Base 3.0.4 + PMPI_SSEND_INIT@Base 3.0.4 + PMPI_START@Base 3.0.4 + PMPI_STARTALL@Base 3.0.4 + PMPI_STATUS_SET_CANCELLED@Base 3.0.4 + PMPI_STATUS_SET_ELEMENTS@Base 3.0.4 + PMPI_STATUS_SET_ELEMENTS_X@Base 3.0.4 + PMPI_Scan@Base 3.0.4 + PMPI_Scatter@Base 3.0.4 + PMPI_Scatterv@Base 3.0.4 + PMPI_Send@Base 3.0.4 + PMPI_Send_init@Base 3.0.4 + PMPI_Sendrecv@Base 3.0.4 + PMPI_Sendrecv_replace@Base 3.0.4 + PMPI_Ssend@Base 3.0.4 + PMPI_Ssend_init@Base 3.0.4 + PMPI_Start@Base 3.0.4 + PMPI_Startall@Base 3.0.4 + PMPI_Status_c2f@Base 3.0.4 + PMPI_Status_f2c@Base 3.0.4 + PMPI_Status_set_cancelled@Base 3.0.4 + PMPI_Status_set_elements@Base 3.0.4 + PMPI_Status_set_elements_x@Base 3.0.4 + PMPI_TEST@Base 3.0.4 + PMPI_TESTALL@Base 3.0.4 + PMPI_TESTANY@Base 3.0.4 + PMPI_TESTSOME@Base 3.0.4 + PMPI_TEST_CANCELLED@Base 3.0.4 + PMPI_TOPO_TEST@Base 3.0.4 + PMPI_TYPE_COMMIT@Base 3.0.4 + PMPI_TYPE_CONTIGUOUS@Base 3.0.4 + PMPI_TYPE_CREATE_DARRAY@Base 3.0.4 + PMPI_TYPE_CREATE_F90_COMPLEX@Base 3.0.4 + PMPI_TYPE_CREATE_F90_INTEGER@Base 3.0.4 + PMPI_TYPE_CREATE_F90_REAL@Base 3.0.4 + PMPI_TYPE_CREATE_HINDEXED@Base 3.0.4 + PMPI_TYPE_CREATE_HINDEXED_BLOCK@Base 3.0.4 + PMPI_TYPE_CREATE_HVECTOR@Base 3.0.4 + PMPI_TYPE_CREATE_INDEXED_BLOCK@Base 3.0.4 + PMPI_TYPE_CREATE_KEYVAL@Base 3.0.4 + PMPI_TYPE_CREATE_RESIZED@Base 3.0.4 + PMPI_TYPE_CREATE_STRUCT@Base 3.0.4 + PMPI_TYPE_CREATE_SUBARRAY@Base 3.0.4 + PMPI_TYPE_DELETE_ATTR@Base 3.0.4 + PMPI_TYPE_DUP@Base 3.0.4 + PMPI_TYPE_DUP_FN@Base 3.0.4 + PMPI_TYPE_EXTENT@Base 3.0.4 + PMPI_TYPE_FREE@Base 3.0.4 + PMPI_TYPE_FREE_KEYVAL@Base 3.0.4 + PMPI_TYPE_GET_ATTR@Base 3.0.4 + PMPI_TYPE_GET_CONTENTS@Base 3.0.4 + PMPI_TYPE_GET_ENVELOPE@Base 3.0.4 + PMPI_TYPE_GET_EXTENT@Base 3.0.4 + PMPI_TYPE_GET_EXTENT_X@Base 3.0.4 + PMPI_TYPE_GET_NAME@Base 3.0.4 + PMPI_TYPE_GET_TRUE_EXTENT@Base 3.0.4 + PMPI_TYPE_GET_TRUE_EXTENT_X@Base 3.0.4 + PMPI_TYPE_HINDEXED@Base 3.0.4 + PMPI_TYPE_HVECTOR@Base 3.0.4 + PMPI_TYPE_INDEXED@Base 3.0.4 + PMPI_TYPE_LB@Base 3.0.4 + PMPI_TYPE_MATCH_SIZE@Base 3.0.4 + PMPI_TYPE_NULL_COPY_FN@Base 3.0.4 + PMPI_TYPE_NULL_DELETE_FN@Base 3.0.4 + PMPI_TYPE_SET_ATTR@Base 3.0.4 + PMPI_TYPE_SET_NAME@Base 3.0.4 + PMPI_TYPE_SIZE@Base 3.0.4 + PMPI_TYPE_SIZE_X@Base 3.0.4 + PMPI_TYPE_STRUCT@Base 3.0.4 + PMPI_TYPE_UB@Base 3.0.4 + PMPI_TYPE_VECTOR@Base 3.0.4 + PMPI_T_category_changed@Base 3.0.4 + PMPI_T_category_get_categories@Base 3.0.4 + PMPI_T_category_get_cvars@Base 3.0.4 + PMPI_T_category_get_info@Base 3.0.4 + PMPI_T_category_get_num@Base 3.0.4 + PMPI_T_category_get_pvars@Base 3.0.4 + PMPI_T_cvar_get_info@Base 3.0.4 + PMPI_T_cvar_get_num@Base 3.0.4 + PMPI_T_cvar_handle_alloc@Base 3.0.4 + PMPI_T_cvar_handle_free@Base 3.0.4 + PMPI_T_cvar_read@Base 3.0.4 + PMPI_T_cvar_write@Base 3.0.4 + PMPI_T_enum_get_info@Base 3.0.4 + PMPI_T_enum_get_item@Base 3.0.4 + PMPI_T_finalize@Base 3.0.4 + PMPI_T_init_thread@Base 3.0.4 + PMPI_T_pvar_get_info@Base 3.0.4 + PMPI_T_pvar_get_num@Base 3.0.4 + PMPI_T_pvar_handle_alloc@Base 3.0.4 + PMPI_T_pvar_handle_free@Base 3.0.4 + PMPI_T_pvar_read@Base 3.0.4 + PMPI_T_pvar_readreset@Base 3.0.4 + PMPI_T_pvar_reset@Base 3.0.4 + PMPI_T_pvar_session_create@Base 3.0.4 + PMPI_T_pvar_session_free@Base 3.0.4 + PMPI_T_pvar_start@Base 3.0.4 + PMPI_T_pvar_stop@Base 3.0.4 + PMPI_T_pvar_write@Base 3.0.4 + PMPI_Test@Base 3.0.4 + PMPI_Test_cancelled@Base 3.0.4 + PMPI_Testall@Base 3.0.4 + PMPI_Testany@Base 3.0.4 + PMPI_Testsome@Base 3.0.4 + PMPI_Topo_test@Base 3.0.4 + PMPI_Type_commit@Base 3.0.4 + PMPI_Type_contiguous@Base 3.0.4 + PMPI_Type_create_darray@Base 3.0.4 + PMPI_Type_create_f90_complex@Base 3.0.4 + PMPI_Type_create_f90_integer@Base 3.0.4 + PMPI_Type_create_f90_real@Base 3.0.4 + PMPI_Type_create_hindexed@Base 3.0.4 + PMPI_Type_create_hindexed_block@Base 3.0.4 + PMPI_Type_create_hvector@Base 3.0.4 + PMPI_Type_create_indexed_block@Base 3.0.4 + PMPI_Type_create_keyval@Base 3.0.4 + PMPI_Type_create_resized@Base 3.0.4 + PMPI_Type_create_struct@Base 3.0.4 + PMPI_Type_create_subarray@Base 3.0.4 + PMPI_Type_delete_attr@Base 3.0.4 + PMPI_Type_dup@Base 3.0.4 + PMPI_Type_extent@Base 3.0.4 + PMPI_Type_free@Base 3.0.4 + PMPI_Type_free_keyval@Base 3.0.4 + PMPI_Type_get_attr@Base 3.0.4 + PMPI_Type_get_contents@Base 3.0.4 + PMPI_Type_get_envelope@Base 3.0.4 + PMPI_Type_get_extent@Base 3.0.4 + PMPI_Type_get_extent_x@Base 3.0.4 + PMPI_Type_get_name@Base 3.0.4 + PMPI_Type_get_true_extent@Base 3.0.4 + PMPI_Type_get_true_extent_x@Base 3.0.4 + PMPI_Type_hindexed@Base 3.0.4 + PMPI_Type_hvector@Base 3.0.4 + PMPI_Type_indexed@Base 3.0.4 + PMPI_Type_lb@Base 3.0.4 + PMPI_Type_match_size@Base 3.0.4 + PMPI_Type_set_attr@Base 3.0.4 + PMPI_Type_set_name@Base 3.0.4 + PMPI_Type_size@Base 3.0.4 + PMPI_Type_size_x@Base 3.0.4 + PMPI_Type_struct@Base 3.0.4 + PMPI_Type_ub@Base 3.0.4 + PMPI_Type_vector@Base 3.0.4 + PMPI_UNPACK@Base 3.0.4 + PMPI_UNPACK_EXTERNAL@Base 3.0.4 + PMPI_UNPUBLISH_NAME@Base 3.0.4 + PMPI_Unpack@Base 3.0.4 + PMPI_Unpack_external@Base 3.0.4 + PMPI_Unpublish_name@Base 3.0.4 + PMPI_WAIT@Base 3.0.4 + PMPI_WAITALL@Base 3.0.4 + PMPI_WAITANY@Base 3.0.4 + PMPI_WAITSOME@Base 3.0.4 + PMPI_WIN_ALLOCATE@Base 3.0.4 + PMPI_WIN_ALLOCATE_SHARED@Base 3.0.4 + PMPI_WIN_ATTACH@Base 3.0.4 + PMPI_WIN_CALL_ERRHANDLER@Base 3.0.4 + PMPI_WIN_COMPLETE@Base 3.0.4 + PMPI_WIN_CREATE@Base 3.0.4 + PMPI_WIN_CREATE_DYNAMIC@Base 3.0.4 + PMPI_WIN_CREATE_ERRHANDLER@Base 3.0.4 + PMPI_WIN_CREATE_KEYVAL@Base 3.0.4 + PMPI_WIN_DELETE_ATTR@Base 3.0.4 + PMPI_WIN_DETACH@Base 3.0.4 + PMPI_WIN_DUP_FN@Base 3.0.4 + PMPI_WIN_FENCE@Base 3.0.4 + PMPI_WIN_FLUSH@Base 3.0.4 + PMPI_WIN_FLUSH_ALL@Base 3.0.4 + PMPI_WIN_FLUSH_LOCAL@Base 3.0.4 + PMPI_WIN_FLUSH_LOCAL_ALL@Base 3.0.4 + PMPI_WIN_FREE@Base 3.0.4 + PMPI_WIN_FREE_KEYVAL@Base 3.0.4 + PMPI_WIN_GET_ATTR@Base 3.0.4 + PMPI_WIN_GET_ERRHANDLER@Base 3.0.4 + PMPI_WIN_GET_GROUP@Base 3.0.4 + PMPI_WIN_GET_INFO@Base 3.0.4 + PMPI_WIN_GET_NAME@Base 3.0.4 + PMPI_WIN_LOCK@Base 3.0.4 + PMPI_WIN_LOCK_ALL@Base 3.0.4 + PMPI_WIN_NULL_COPY_FN@Base 3.0.4 + PMPI_WIN_NULL_DELETE_FN@Base 3.0.4 + PMPI_WIN_POST@Base 3.0.4 + PMPI_WIN_SET_ATTR@Base 3.0.4 + PMPI_WIN_SET_ERRHANDLER@Base 3.0.4 + PMPI_WIN_SET_INFO@Base 3.0.4 + PMPI_WIN_SET_NAME@Base 3.0.4 + PMPI_WIN_SHARED_QUERY@Base 3.0.4 + PMPI_WIN_START@Base 3.0.4 + PMPI_WIN_SYNC@Base 3.0.4 + PMPI_WIN_TEST@Base 3.0.4 + PMPI_WIN_UNLOCK@Base 3.0.4 + PMPI_WIN_UNLOCK_ALL@Base 3.0.4 + PMPI_WIN_WAIT@Base 3.0.4 + PMPI_WTICK@Base 3.0.4 + PMPI_WTIME@Base 3.0.4 + PMPI_Wait@Base 3.0.4 + PMPI_Waitall@Base 3.0.4 + PMPI_Waitany@Base 3.0.4 + PMPI_Waitsome@Base 3.0.4 + PMPI_Win_allocate@Base 3.0.4 + PMPI_Win_allocate_shared@Base 3.0.4 + PMPI_Win_attach@Base 3.0.4 + PMPI_Win_call_errhandler@Base 3.0.4 + PMPI_Win_complete@Base 3.0.4 + PMPI_Win_create@Base 3.0.4 + PMPI_Win_create_dynamic@Base 3.0.4 + PMPI_Win_create_errhandler@Base 3.0.4 + PMPI_Win_create_keyval@Base 3.0.4 + PMPI_Win_delete_attr@Base 3.0.4 + PMPI_Win_detach@Base 3.0.4 + PMPI_Win_fence@Base 3.0.4 + PMPI_Win_flush@Base 3.0.4 + PMPI_Win_flush_all@Base 3.0.4 + PMPI_Win_flush_local@Base 3.0.4 + PMPI_Win_flush_local_all@Base 3.0.4 + PMPI_Win_free@Base 3.0.4 + PMPI_Win_free_keyval@Base 3.0.4 + PMPI_Win_get_attr@Base 3.0.4 + PMPI_Win_get_errhandler@Base 3.0.4 + PMPI_Win_get_group@Base 3.0.4 + PMPI_Win_get_info@Base 3.0.4 + PMPI_Win_get_name@Base 3.0.4 + PMPI_Win_lock@Base 3.0.4 + PMPI_Win_lock_all@Base 3.0.4 + PMPI_Win_post@Base 3.0.4 + PMPI_Win_set_attr@Base 3.0.4 + PMPI_Win_set_errhandler@Base 3.0.4 + PMPI_Win_set_info@Base 3.0.4 + PMPI_Win_set_name@Base 3.0.4 + PMPI_Win_shared_query@Base 3.0.4 + PMPI_Win_start@Base 3.0.4 + PMPI_Win_sync@Base 3.0.4 + PMPI_Win_test@Base 3.0.4 + PMPI_Win_unlock@Base 3.0.4 + PMPI_Win_unlock_all@Base 3.0.4 + PMPI_Win_wait@Base 3.0.4 + PMPI_Wtick@Base 3.0.4 + PMPI_Wtime@Base 3.0.4 + _CMPIFCMB1@Base 3.0.4 + _CMPIFCMB2@Base 3.0.4 + _CMPIFCMB3@Base 3.0.4 + _CMPIFCMB4@Base 3.0.4 + _CMPIFCMB5@Base 3.0.4 + _CMPIFCMB6@Base 3.0.4 + _CMPIFCMB7@Base 3.0.4 + _CMPIFCMB8@Base 3.0.4 + _CMPIFCMB9@Base 3.0.4 + _Cmpifcmb1@Base 3.0.4 + _Cmpifcmb2@Base 3.0.4 + _Cmpifcmb3@Base 3.0.4 + _Cmpifcmb4@Base 3.0.4 + _Cmpifcmb5@Base 3.0.4 + _Cmpifcmb6@Base 3.0.4 + _Cmpifcmb7@Base 3.0.4 + _Cmpifcmb8@Base 3.0.4 + _Cmpifcmb9@Base 3.0.4 + all_schedules@Base 3.0.4 + coll_fns_array@Base 3.0.4 + mpi_abort@Base 3.0.4 + mpi_abort_@Base 3.0.4 + mpi_abort__@Base 3.0.4 + mpi_accumulate@Base 3.0.4 + mpi_accumulate_@Base 3.0.4 + mpi_accumulate__@Base 3.0.4 + mpi_add_error_class@Base 3.0.4 + mpi_add_error_class_@Base 3.0.4 + mpi_add_error_class__@Base 3.0.4 + mpi_add_error_code@Base 3.0.4 + mpi_add_error_code_@Base 3.0.4 + mpi_add_error_code__@Base 3.0.4 + mpi_add_error_string@Base 3.0.4 + mpi_add_error_string_@Base 3.0.4 + mpi_add_error_string__@Base 3.0.4 + mpi_address@Base 3.0.4 + mpi_address_@Base 3.0.4 + mpi_address__@Base 3.0.4 + mpi_allgather@Base 3.0.4 + mpi_allgather_@Base 3.0.4 + mpi_allgather__@Base 3.0.4 + mpi_allgatherv@Base 3.0.4 + mpi_allgatherv_@Base 3.0.4 + mpi_allgatherv__@Base 3.0.4 + mpi_alloc_mem@Base 3.0.4 + mpi_alloc_mem_@Base 3.0.4 + mpi_alloc_mem__@Base 3.0.4 + mpi_allreduce@Base 3.0.4 + mpi_allreduce_@Base 3.0.4 + mpi_allreduce__@Base 3.0.4 + mpi_alltoall@Base 3.0.4 + mpi_alltoall_@Base 3.0.4 + mpi_alltoall__@Base 3.0.4 + mpi_alltoallv@Base 3.0.4 + mpi_alltoallv_@Base 3.0.4 + mpi_alltoallv__@Base 3.0.4 + mpi_alltoallw@Base 3.0.4 + mpi_alltoallw_@Base 3.0.4 + mpi_alltoallw__@Base 3.0.4 + mpi_attr_delete@Base 3.0.4 + mpi_attr_delete_@Base 3.0.4 + mpi_attr_delete__@Base 3.0.4 + mpi_attr_get@Base 3.0.4 + mpi_attr_get_@Base 3.0.4 + mpi_attr_get__@Base 3.0.4 + mpi_attr_put@Base 3.0.4 + mpi_attr_put_@Base 3.0.4 + mpi_attr_put__@Base 3.0.4 + mpi_barrier@Base 3.0.4 + mpi_barrier_@Base 3.0.4 + mpi_barrier__@Base 3.0.4 + mpi_bcast@Base 3.0.4 + mpi_bcast_@Base 3.0.4 + mpi_bcast__@Base 3.0.4 + mpi_bsend@Base 3.0.4 + mpi_bsend_@Base 3.0.4 + mpi_bsend__@Base 3.0.4 + mpi_bsend_init@Base 3.0.4 + mpi_bsend_init_@Base 3.0.4 + mpi_bsend_init__@Base 3.0.4 + mpi_buffer_attach@Base 3.0.4 + mpi_buffer_attach_@Base 3.0.4 + mpi_buffer_attach__@Base 3.0.4 + mpi_buffer_detach@Base 3.0.4 + mpi_buffer_detach_@Base 3.0.4 + mpi_buffer_detach__@Base 3.0.4 + mpi_cancel@Base 3.0.4 + mpi_cancel_@Base 3.0.4 + mpi_cancel__@Base 3.0.4 + mpi_cart_coords@Base 3.0.4 + mpi_cart_coords_@Base 3.0.4 + mpi_cart_coords__@Base 3.0.4 + mpi_cart_create@Base 3.0.4 + mpi_cart_create_@Base 3.0.4 + mpi_cart_create__@Base 3.0.4 + mpi_cart_get@Base 3.0.4 + mpi_cart_get_@Base 3.0.4 + mpi_cart_get__@Base 3.0.4 + mpi_cart_map@Base 3.0.4 + mpi_cart_map_@Base 3.0.4 + mpi_cart_map__@Base 3.0.4 + mpi_cart_rank@Base 3.0.4 + mpi_cart_rank_@Base 3.0.4 + mpi_cart_rank__@Base 3.0.4 + mpi_cart_shift@Base 3.0.4 + mpi_cart_shift_@Base 3.0.4 + mpi_cart_shift__@Base 3.0.4 + mpi_cart_sub@Base 3.0.4 + mpi_cart_sub_@Base 3.0.4 + mpi_cart_sub__@Base 3.0.4 + mpi_cartdim_get@Base 3.0.4 + mpi_cartdim_get_@Base 3.0.4 + mpi_cartdim_get__@Base 3.0.4 + mpi_close_port@Base 3.0.4 + mpi_close_port_@Base 3.0.4 + mpi_close_port__@Base 3.0.4 + mpi_comm_accept@Base 3.0.4 + mpi_comm_accept_@Base 3.0.4 + mpi_comm_accept__@Base 3.0.4 + mpi_comm_call_errhandler@Base 3.0.4 + mpi_comm_call_errhandler_@Base 3.0.4 + mpi_comm_call_errhandler__@Base 3.0.4 + mpi_comm_compare@Base 3.0.4 + mpi_comm_compare_@Base 3.0.4 + mpi_comm_compare__@Base 3.0.4 + mpi_comm_connect@Base 3.0.4 + mpi_comm_connect_@Base 3.0.4 + mpi_comm_connect__@Base 3.0.4 + mpi_comm_create@Base 3.0.4 + mpi_comm_create_@Base 3.0.4 + mpi_comm_create__@Base 3.0.4 + mpi_comm_create_errhandler@Base 3.0.4 + mpi_comm_create_errhandler_@Base 3.0.4 + mpi_comm_create_errhandler__@Base 3.0.4 + mpi_comm_create_group@Base 3.0.4 + mpi_comm_create_group_@Base 3.0.4 + mpi_comm_create_group__@Base 3.0.4 + mpi_comm_create_keyval@Base 3.0.4 + mpi_comm_create_keyval_@Base 3.0.4 + mpi_comm_create_keyval__@Base 3.0.4 + mpi_comm_delete_attr@Base 3.0.4 + mpi_comm_delete_attr_@Base 3.0.4 + mpi_comm_delete_attr__@Base 3.0.4 + mpi_comm_disconnect@Base 3.0.4 + mpi_comm_disconnect_@Base 3.0.4 + mpi_comm_disconnect__@Base 3.0.4 + mpi_comm_dup@Base 3.0.4 + mpi_comm_dup_@Base 3.0.4 + mpi_comm_dup__@Base 3.0.4 + mpi_comm_dup_fn@Base 3.0.4 + mpi_comm_dup_fn_@Base 3.0.4 + mpi_comm_dup_fn__@Base 3.0.4 + mpi_comm_dup_with_info@Base 3.0.4 + mpi_comm_dup_with_info_@Base 3.0.4 + mpi_comm_dup_with_info__@Base 3.0.4 + mpi_comm_free@Base 3.0.4 + mpi_comm_free_@Base 3.0.4 + mpi_comm_free__@Base 3.0.4 + mpi_comm_free_keyval@Base 3.0.4 + mpi_comm_free_keyval_@Base 3.0.4 + mpi_comm_free_keyval__@Base 3.0.4 + mpi_comm_get_attr@Base 3.0.4 + mpi_comm_get_attr_@Base 3.0.4 + mpi_comm_get_attr__@Base 3.0.4 + mpi_comm_get_errhandler@Base 3.0.4 + mpi_comm_get_errhandler_@Base 3.0.4 + mpi_comm_get_errhandler__@Base 3.0.4 + mpi_comm_get_info@Base 3.0.4 + mpi_comm_get_info_@Base 3.0.4 + mpi_comm_get_info__@Base 3.0.4 + mpi_comm_get_name@Base 3.0.4 + mpi_comm_get_name_@Base 3.0.4 + mpi_comm_get_name__@Base 3.0.4 + mpi_comm_get_parent@Base 3.0.4 + mpi_comm_get_parent_@Base 3.0.4 + mpi_comm_get_parent__@Base 3.0.4 + mpi_comm_group@Base 3.0.4 + mpi_comm_group_@Base 3.0.4 + mpi_comm_group__@Base 3.0.4 + mpi_comm_idup@Base 3.0.4 + mpi_comm_idup_@Base 3.0.4 + mpi_comm_idup__@Base 3.0.4 + mpi_comm_join@Base 3.0.4 + mpi_comm_join_@Base 3.0.4 + mpi_comm_join__@Base 3.0.4 + mpi_comm_null_copy_fn@Base 3.0.4 + mpi_comm_null_copy_fn_@Base 3.0.4 + mpi_comm_null_copy_fn__@Base 3.0.4 + mpi_comm_null_delete_fn@Base 3.0.4 + mpi_comm_null_delete_fn_@Base 3.0.4 + mpi_comm_null_delete_fn__@Base 3.0.4 + mpi_comm_rank@Base 3.0.4 + mpi_comm_rank_@Base 3.0.4 + mpi_comm_rank__@Base 3.0.4 + mpi_comm_remote_group@Base 3.0.4 + mpi_comm_remote_group_@Base 3.0.4 + mpi_comm_remote_group__@Base 3.0.4 + mpi_comm_remote_size@Base 3.0.4 + mpi_comm_remote_size_@Base 3.0.4 + mpi_comm_remote_size__@Base 3.0.4 + mpi_comm_set_attr@Base 3.0.4 + mpi_comm_set_attr_@Base 3.0.4 + mpi_comm_set_attr__@Base 3.0.4 + mpi_comm_set_errhandler@Base 3.0.4 + mpi_comm_set_errhandler_@Base 3.0.4 + mpi_comm_set_errhandler__@Base 3.0.4 + mpi_comm_set_info@Base 3.0.4 + mpi_comm_set_info_@Base 3.0.4 + mpi_comm_set_info__@Base 3.0.4 + mpi_comm_set_name@Base 3.0.4 + mpi_comm_set_name_@Base 3.0.4 + mpi_comm_set_name__@Base 3.0.4 + mpi_comm_size@Base 3.0.4 + mpi_comm_size_@Base 3.0.4 + mpi_comm_size__@Base 3.0.4 + mpi_comm_spawn@Base 3.0.4 + mpi_comm_spawn_@Base 3.0.4 + mpi_comm_spawn__@Base 3.0.4 + mpi_comm_spawn_multiple@Base 3.0.4 + mpi_comm_spawn_multiple_@Base 3.0.4 + mpi_comm_spawn_multiple__@Base 3.0.4 + mpi_comm_split@Base 3.0.4 + mpi_comm_split_@Base 3.0.4 + mpi_comm_split__@Base 3.0.4 + mpi_comm_split_type@Base 3.0.4 + mpi_comm_split_type_@Base 3.0.4 + mpi_comm_split_type__@Base 3.0.4 + mpi_comm_test_inter@Base 3.0.4 + mpi_comm_test_inter_@Base 3.0.4 + mpi_comm_test_inter__@Base 3.0.4 + mpi_compare_and_swap@Base 3.0.4 + mpi_compare_and_swap_@Base 3.0.4 + mpi_compare_and_swap__@Base 3.0.4 + mpi_conversion_fn_null@Base 3.0.4 + mpi_conversion_fn_null_@Base 3.0.4 + mpi_conversion_fn_null__@Base 3.0.4 + mpi_dims_create@Base 3.0.4 + mpi_dims_create_@Base 3.0.4 + mpi_dims_create__@Base 3.0.4 + mpi_dist_graph_create@Base 3.0.4 + mpi_dist_graph_create_@Base 3.0.4 + mpi_dist_graph_create__@Base 3.0.4 + mpi_dist_graph_create_adjacent@Base 3.0.4 + mpi_dist_graph_create_adjacent_@Base 3.0.4 + mpi_dist_graph_create_adjacent__@Base 3.0.4 + mpi_dist_graph_neighbors@Base 3.0.4 + mpi_dist_graph_neighbors_@Base 3.0.4 + mpi_dist_graph_neighbors__@Base 3.0.4 + mpi_dist_graph_neighbors_count@Base 3.0.4 + mpi_dist_graph_neighbors_count_@Base 3.0.4 + mpi_dist_graph_neighbors_count__@Base 3.0.4 + mpi_dup_fn@Base 3.0.4 + mpi_dup_fn_@Base 3.0.4 + mpi_dup_fn__@Base 3.0.4 + mpi_errhandler_create@Base 3.0.4 + mpi_errhandler_create_@Base 3.0.4 + mpi_errhandler_create__@Base 3.0.4 + mpi_errhandler_free@Base 3.0.4 + mpi_errhandler_free_@Base 3.0.4 + mpi_errhandler_free__@Base 3.0.4 + mpi_errhandler_get@Base 3.0.4 + mpi_errhandler_get_@Base 3.0.4 + mpi_errhandler_get__@Base 3.0.4 + mpi_errhandler_set@Base 3.0.4 + mpi_errhandler_set_@Base 3.0.4 + mpi_errhandler_set__@Base 3.0.4 + mpi_error_class@Base 3.0.4 + mpi_error_class_@Base 3.0.4 + mpi_error_class__@Base 3.0.4 + mpi_error_string@Base 3.0.4 + mpi_error_string_@Base 3.0.4 + mpi_error_string__@Base 3.0.4 + mpi_exscan@Base 3.0.4 + mpi_exscan_@Base 3.0.4 + mpi_exscan__@Base 3.0.4 + mpi_fetch_and_op@Base 3.0.4 + mpi_fetch_and_op_@Base 3.0.4 + mpi_fetch_and_op__@Base 3.0.4 + mpi_file_call_errhandler@Base 3.0.4 + mpi_file_call_errhandler_@Base 3.0.4 + mpi_file_call_errhandler__@Base 3.0.4 + mpi_file_close@Base 3.0.4 + mpi_file_close_@Base 3.0.4 + mpi_file_close__@Base 3.0.4 + mpi_file_create_errhandler@Base 3.0.4 + mpi_file_create_errhandler_@Base 3.0.4 + mpi_file_create_errhandler__@Base 3.0.4 + mpi_file_delete@Base 3.0.4 + mpi_file_delete_@Base 3.0.4 + mpi_file_delete__@Base 3.0.4 + mpi_file_get_amode@Base 3.0.4 + mpi_file_get_amode_@Base 3.0.4 + mpi_file_get_amode__@Base 3.0.4 + mpi_file_get_atomicity@Base 3.0.4 + mpi_file_get_atomicity_@Base 3.0.4 + mpi_file_get_atomicity__@Base 3.0.4 + mpi_file_get_byte_offset@Base 3.0.4 + mpi_file_get_byte_offset_@Base 3.0.4 + mpi_file_get_byte_offset__@Base 3.0.4 + mpi_file_get_errhandler@Base 3.0.4 + mpi_file_get_errhandler_@Base 3.0.4 + mpi_file_get_errhandler__@Base 3.0.4 + mpi_file_get_group@Base 3.0.4 + mpi_file_get_group_@Base 3.0.4 + mpi_file_get_group__@Base 3.0.4 + mpi_file_get_info@Base 3.0.4 + mpi_file_get_info_@Base 3.0.4 + mpi_file_get_info__@Base 3.0.4 + mpi_file_get_position@Base 3.0.4 + mpi_file_get_position_@Base 3.0.4 + mpi_file_get_position__@Base 3.0.4 + mpi_file_get_position_shared@Base 3.0.4 + mpi_file_get_position_shared_@Base 3.0.4 + mpi_file_get_position_shared__@Base 3.0.4 + mpi_file_get_size@Base 3.0.4 + mpi_file_get_size_@Base 3.0.4 + mpi_file_get_size__@Base 3.0.4 + mpi_file_get_type_extent@Base 3.0.4 + mpi_file_get_type_extent_@Base 3.0.4 + mpi_file_get_type_extent__@Base 3.0.4 + mpi_file_get_view@Base 3.0.4 + mpi_file_get_view_@Base 3.0.4 + mpi_file_get_view__@Base 3.0.4 + mpi_file_iread@Base 3.0.4 + mpi_file_iread_@Base 3.0.4 + mpi_file_iread__@Base 3.0.4 + mpi_file_iread_at@Base 3.0.4 + mpi_file_iread_at_@Base 3.0.4 + mpi_file_iread_at__@Base 3.0.4 + mpi_file_iread_shared@Base 3.0.4 + mpi_file_iread_shared_@Base 3.0.4 + mpi_file_iread_shared__@Base 3.0.4 + mpi_file_iwrite@Base 3.0.4 + mpi_file_iwrite_@Base 3.0.4 + mpi_file_iwrite__@Base 3.0.4 + mpi_file_iwrite_at@Base 3.0.4 + mpi_file_iwrite_at_@Base 3.0.4 + mpi_file_iwrite_at__@Base 3.0.4 + mpi_file_iwrite_shared@Base 3.0.4 + mpi_file_iwrite_shared_@Base 3.0.4 + mpi_file_iwrite_shared__@Base 3.0.4 + mpi_file_open@Base 3.0.4 + mpi_file_open_@Base 3.0.4 + mpi_file_open__@Base 3.0.4 + mpi_file_preallocate@Base 3.0.4 + mpi_file_preallocate_@Base 3.0.4 + mpi_file_preallocate__@Base 3.0.4 + mpi_file_read@Base 3.0.4 + mpi_file_read_@Base 3.0.4 + mpi_file_read__@Base 3.0.4 + mpi_file_read_all@Base 3.0.4 + mpi_file_read_all_@Base 3.0.4 + mpi_file_read_all__@Base 3.0.4 + mpi_file_read_all_begin@Base 3.0.4 + mpi_file_read_all_begin_@Base 3.0.4 + mpi_file_read_all_begin__@Base 3.0.4 + mpi_file_read_all_end@Base 3.0.4 + mpi_file_read_all_end_@Base 3.0.4 + mpi_file_read_all_end__@Base 3.0.4 + mpi_file_read_at@Base 3.0.4 + mpi_file_read_at_@Base 3.0.4 + mpi_file_read_at__@Base 3.0.4 + mpi_file_read_at_all@Base 3.0.4 + mpi_file_read_at_all_@Base 3.0.4 + mpi_file_read_at_all__@Base 3.0.4 + mpi_file_read_at_all_begin@Base 3.0.4 + mpi_file_read_at_all_begin_@Base 3.0.4 + mpi_file_read_at_all_begin__@Base 3.0.4 + mpi_file_read_at_all_end@Base 3.0.4 + mpi_file_read_at_all_end_@Base 3.0.4 + mpi_file_read_at_all_end__@Base 3.0.4 + mpi_file_read_ordered@Base 3.0.4 + mpi_file_read_ordered_@Base 3.0.4 + mpi_file_read_ordered__@Base 3.0.4 + mpi_file_read_ordered_begin@Base 3.0.4 + mpi_file_read_ordered_begin_@Base 3.0.4 + mpi_file_read_ordered_begin__@Base 3.0.4 + mpi_file_read_ordered_end@Base 3.0.4 + mpi_file_read_ordered_end_@Base 3.0.4 + mpi_file_read_ordered_end__@Base 3.0.4 + mpi_file_read_shared@Base 3.0.4 + mpi_file_read_shared_@Base 3.0.4 + mpi_file_read_shared__@Base 3.0.4 + mpi_file_seek@Base 3.0.4 + mpi_file_seek_@Base 3.0.4 + mpi_file_seek__@Base 3.0.4 + mpi_file_seek_shared@Base 3.0.4 + mpi_file_seek_shared_@Base 3.0.4 + mpi_file_seek_shared__@Base 3.0.4 + mpi_file_set_atomicity@Base 3.0.4 + mpi_file_set_atomicity_@Base 3.0.4 + mpi_file_set_atomicity__@Base 3.0.4 + mpi_file_set_errhandler@Base 3.0.4 + mpi_file_set_errhandler_@Base 3.0.4 + mpi_file_set_errhandler__@Base 3.0.4 + mpi_file_set_info@Base 3.0.4 + mpi_file_set_info_@Base 3.0.4 + mpi_file_set_info__@Base 3.0.4 + mpi_file_set_size@Base 3.0.4 + mpi_file_set_size_@Base 3.0.4 + mpi_file_set_size__@Base 3.0.4 + mpi_file_set_view@Base 3.0.4 + mpi_file_set_view_@Base 3.0.4 + mpi_file_set_view__@Base 3.0.4 + mpi_file_sync@Base 3.0.4 + mpi_file_sync_@Base 3.0.4 + mpi_file_sync__@Base 3.0.4 + mpi_file_write@Base 3.0.4 + mpi_file_write_@Base 3.0.4 + mpi_file_write__@Base 3.0.4 + mpi_file_write_all@Base 3.0.4 + mpi_file_write_all_@Base 3.0.4 + mpi_file_write_all__@Base 3.0.4 + mpi_file_write_all_begin@Base 3.0.4 + mpi_file_write_all_begin_@Base 3.0.4 + mpi_file_write_all_begin__@Base 3.0.4 + mpi_file_write_all_end@Base 3.0.4 + mpi_file_write_all_end_@Base 3.0.4 + mpi_file_write_all_end__@Base 3.0.4 + mpi_file_write_at@Base 3.0.4 + mpi_file_write_at_@Base 3.0.4 + mpi_file_write_at__@Base 3.0.4 + mpi_file_write_at_all@Base 3.0.4 + mpi_file_write_at_all_@Base 3.0.4 + mpi_file_write_at_all__@Base 3.0.4 + mpi_file_write_at_all_begin@Base 3.0.4 + mpi_file_write_at_all_begin_@Base 3.0.4 + mpi_file_write_at_all_begin__@Base 3.0.4 + mpi_file_write_at_all_end@Base 3.0.4 + mpi_file_write_at_all_end_@Base 3.0.4 + mpi_file_write_at_all_end__@Base 3.0.4 + mpi_file_write_ordered@Base 3.0.4 + mpi_file_write_ordered_@Base 3.0.4 + mpi_file_write_ordered__@Base 3.0.4 + mpi_file_write_ordered_begin@Base 3.0.4 + mpi_file_write_ordered_begin_@Base 3.0.4 + mpi_file_write_ordered_begin__@Base 3.0.4 + mpi_file_write_ordered_end@Base 3.0.4 + mpi_file_write_ordered_end_@Base 3.0.4 + mpi_file_write_ordered_end__@Base 3.0.4 + mpi_file_write_shared@Base 3.0.4 + mpi_file_write_shared_@Base 3.0.4 + mpi_file_write_shared__@Base 3.0.4 + mpi_finalize@Base 3.0.4 + mpi_finalize_@Base 3.0.4 + mpi_finalize__@Base 3.0.4 + mpi_finalized@Base 3.0.4 + mpi_finalized_@Base 3.0.4 + mpi_finalized__@Base 3.0.4 + mpi_free_mem@Base 3.0.4 + mpi_free_mem_@Base 3.0.4 + mpi_free_mem__@Base 3.0.4 + mpi_gather@Base 3.0.4 + mpi_gather_@Base 3.0.4 + mpi_gather__@Base 3.0.4 + mpi_gatherv@Base 3.0.4 + mpi_gatherv_@Base 3.0.4 + mpi_gatherv__@Base 3.0.4 + mpi_get@Base 3.0.4 + mpi_get_@Base 3.0.4 + mpi_get__@Base 3.0.4 + mpi_get_accumulate@Base 3.0.4 + mpi_get_accumulate_@Base 3.0.4 + mpi_get_accumulate__@Base 3.0.4 + mpi_get_address@Base 3.0.4 + mpi_get_address_@Base 3.0.4 + mpi_get_address__@Base 3.0.4 + mpi_get_count@Base 3.0.4 + mpi_get_count_@Base 3.0.4 + mpi_get_count__@Base 3.0.4 + mpi_get_elements@Base 3.0.4 + mpi_get_elements_@Base 3.0.4 + mpi_get_elements__@Base 3.0.4 + mpi_get_elements_x@Base 3.0.4 + mpi_get_elements_x_@Base 3.0.4 + mpi_get_elements_x__@Base 3.0.4 + mpi_get_library_version@Base 3.0.4 + mpi_get_library_version_@Base 3.0.4 + mpi_get_library_version__@Base 3.0.4 + mpi_get_processor_name@Base 3.0.4 + mpi_get_processor_name_@Base 3.0.4 + mpi_get_processor_name__@Base 3.0.4 + mpi_get_version@Base 3.0.4 + mpi_get_version_@Base 3.0.4 + mpi_get_version__@Base 3.0.4 + mpi_graph_create@Base 3.0.4 + mpi_graph_create_@Base 3.0.4 + mpi_graph_create__@Base 3.0.4 + mpi_graph_get@Base 3.0.4 + mpi_graph_get_@Base 3.0.4 + mpi_graph_get__@Base 3.0.4 + mpi_graph_map@Base 3.0.4 + mpi_graph_map_@Base 3.0.4 + mpi_graph_map__@Base 3.0.4 + mpi_graph_neighbors@Base 3.0.4 + mpi_graph_neighbors_@Base 3.0.4 + mpi_graph_neighbors__@Base 3.0.4 + mpi_graph_neighbors_count@Base 3.0.4 + mpi_graph_neighbors_count_@Base 3.0.4 + mpi_graph_neighbors_count__@Base 3.0.4 + mpi_graphdims_get@Base 3.0.4 + mpi_graphdims_get_@Base 3.0.4 + mpi_graphdims_get__@Base 3.0.4 + mpi_grequest_complete@Base 3.0.4 + mpi_grequest_complete_@Base 3.0.4 + mpi_grequest_complete__@Base 3.0.4 + mpi_grequest_start@Base 3.0.4 + mpi_grequest_start_@Base 3.0.4 + mpi_grequest_start__@Base 3.0.4 + mpi_group_compare@Base 3.0.4 + mpi_group_compare_@Base 3.0.4 + mpi_group_compare__@Base 3.0.4 + mpi_group_difference@Base 3.0.4 + mpi_group_difference_@Base 3.0.4 + mpi_group_difference__@Base 3.0.4 + mpi_group_excl@Base 3.0.4 + mpi_group_excl_@Base 3.0.4 + mpi_group_excl__@Base 3.0.4 + mpi_group_free@Base 3.0.4 + mpi_group_free_@Base 3.0.4 + mpi_group_free__@Base 3.0.4 + mpi_group_incl@Base 3.0.4 + mpi_group_incl_@Base 3.0.4 + mpi_group_incl__@Base 3.0.4 + mpi_group_intersection@Base 3.0.4 + mpi_group_intersection_@Base 3.0.4 + mpi_group_intersection__@Base 3.0.4 + mpi_group_range_excl@Base 3.0.4 + mpi_group_range_excl_@Base 3.0.4 + mpi_group_range_excl__@Base 3.0.4 + mpi_group_range_incl@Base 3.0.4 + mpi_group_range_incl_@Base 3.0.4 + mpi_group_range_incl__@Base 3.0.4 + mpi_group_rank@Base 3.0.4 + mpi_group_rank_@Base 3.0.4 + mpi_group_rank__@Base 3.0.4 + mpi_group_size@Base 3.0.4 + mpi_group_size_@Base 3.0.4 + mpi_group_size__@Base 3.0.4 + mpi_group_translate_ranks@Base 3.0.4 + mpi_group_translate_ranks_@Base 3.0.4 + mpi_group_translate_ranks__@Base 3.0.4 + mpi_group_union@Base 3.0.4 + mpi_group_union_@Base 3.0.4 + mpi_group_union__@Base 3.0.4 + mpi_iallgather@Base 3.0.4 + mpi_iallgather_@Base 3.0.4 + mpi_iallgather__@Base 3.0.4 + mpi_iallgatherv@Base 3.0.4 + mpi_iallgatherv_@Base 3.0.4 + mpi_iallgatherv__@Base 3.0.4 + mpi_iallreduce@Base 3.0.4 + mpi_iallreduce_@Base 3.0.4 + mpi_iallreduce__@Base 3.0.4 + mpi_ialltoall@Base 3.0.4 + mpi_ialltoall_@Base 3.0.4 + mpi_ialltoall__@Base 3.0.4 + mpi_ialltoallv@Base 3.0.4 + mpi_ialltoallv_@Base 3.0.4 + mpi_ialltoallv__@Base 3.0.4 + mpi_ialltoallw@Base 3.0.4 + mpi_ialltoallw_@Base 3.0.4 + mpi_ialltoallw__@Base 3.0.4 + mpi_ibarrier@Base 3.0.4 + mpi_ibarrier_@Base 3.0.4 + mpi_ibarrier__@Base 3.0.4 + mpi_ibcast@Base 3.0.4 + mpi_ibcast_@Base 3.0.4 + mpi_ibcast__@Base 3.0.4 + mpi_ibsend@Base 3.0.4 + mpi_ibsend_@Base 3.0.4 + mpi_ibsend__@Base 3.0.4 + mpi_iexscan@Base 3.0.4 + mpi_iexscan_@Base 3.0.4 + mpi_iexscan__@Base 3.0.4 + mpi_igather@Base 3.0.4 + mpi_igather_@Base 3.0.4 + mpi_igather__@Base 3.0.4 + mpi_igatherv@Base 3.0.4 + mpi_igatherv_@Base 3.0.4 + mpi_igatherv__@Base 3.0.4 + mpi_improbe@Base 3.0.4 + mpi_improbe_@Base 3.0.4 + mpi_improbe__@Base 3.0.4 + mpi_imrecv@Base 3.0.4 + mpi_imrecv_@Base 3.0.4 + mpi_imrecv__@Base 3.0.4 + mpi_ineighbor_allgather@Base 3.0.4 + mpi_ineighbor_allgather_@Base 3.0.4 + mpi_ineighbor_allgather__@Base 3.0.4 + mpi_ineighbor_allgatherv@Base 3.0.4 + mpi_ineighbor_allgatherv_@Base 3.0.4 + mpi_ineighbor_allgatherv__@Base 3.0.4 + mpi_ineighbor_alltoall@Base 3.0.4 + mpi_ineighbor_alltoall_@Base 3.0.4 + mpi_ineighbor_alltoall__@Base 3.0.4 + mpi_ineighbor_alltoallv@Base 3.0.4 + mpi_ineighbor_alltoallv_@Base 3.0.4 + mpi_ineighbor_alltoallv__@Base 3.0.4 + mpi_ineighbor_alltoallw@Base 3.0.4 + mpi_ineighbor_alltoallw_@Base 3.0.4 + mpi_ineighbor_alltoallw__@Base 3.0.4 + mpi_info_create@Base 3.0.4 + mpi_info_create_@Base 3.0.4 + mpi_info_create__@Base 3.0.4 + mpi_info_delete@Base 3.0.4 + mpi_info_delete_@Base 3.0.4 + mpi_info_delete__@Base 3.0.4 + mpi_info_dup@Base 3.0.4 + mpi_info_dup_@Base 3.0.4 + mpi_info_dup__@Base 3.0.4 + mpi_info_free@Base 3.0.4 + mpi_info_free_@Base 3.0.4 + mpi_info_free__@Base 3.0.4 + mpi_info_get@Base 3.0.4 + mpi_info_get_@Base 3.0.4 + mpi_info_get__@Base 3.0.4 + mpi_info_get_nkeys@Base 3.0.4 + mpi_info_get_nkeys_@Base 3.0.4 + mpi_info_get_nkeys__@Base 3.0.4 + mpi_info_get_nthkey@Base 3.0.4 + mpi_info_get_nthkey_@Base 3.0.4 + mpi_info_get_nthkey__@Base 3.0.4 + mpi_info_get_valuelen@Base 3.0.4 + mpi_info_get_valuelen_@Base 3.0.4 + mpi_info_get_valuelen__@Base 3.0.4 + mpi_info_set@Base 3.0.4 + mpi_info_set_@Base 3.0.4 + mpi_info_set__@Base 3.0.4 + mpi_init@Base 3.0.4 + mpi_init_@Base 3.0.4 + mpi_init__@Base 3.0.4 + mpi_init_thread@Base 3.0.4 + mpi_init_thread_@Base 3.0.4 + mpi_init_thread__@Base 3.0.4 + mpi_initialized@Base 3.0.4 + mpi_initialized_@Base 3.0.4 + mpi_initialized__@Base 3.0.4 + mpi_intercomm_create@Base 3.0.4 + mpi_intercomm_create_@Base 3.0.4 + mpi_intercomm_create__@Base 3.0.4 + mpi_intercomm_merge@Base 3.0.4 + mpi_intercomm_merge_@Base 3.0.4 + mpi_intercomm_merge__@Base 3.0.4 + mpi_iprobe@Base 3.0.4 + mpi_iprobe_@Base 3.0.4 + mpi_iprobe__@Base 3.0.4 + mpi_irecv@Base 3.0.4 + mpi_irecv_@Base 3.0.4 + mpi_irecv__@Base 3.0.4 + mpi_ireduce@Base 3.0.4 + mpi_ireduce_@Base 3.0.4 + mpi_ireduce__@Base 3.0.4 + mpi_ireduce_scatter@Base 3.0.4 + mpi_ireduce_scatter_@Base 3.0.4 + mpi_ireduce_scatter__@Base 3.0.4 + mpi_ireduce_scatter_block@Base 3.0.4 + mpi_ireduce_scatter_block_@Base 3.0.4 + mpi_ireduce_scatter_block__@Base 3.0.4 + mpi_irsend@Base 3.0.4 + mpi_irsend_@Base 3.0.4 + mpi_irsend__@Base 3.0.4 + mpi_is_thread_main@Base 3.0.4 + mpi_is_thread_main_@Base 3.0.4 + mpi_is_thread_main__@Base 3.0.4 + mpi_iscan@Base 3.0.4 + mpi_iscan_@Base 3.0.4 + mpi_iscan__@Base 3.0.4 + mpi_iscatter@Base 3.0.4 + mpi_iscatter_@Base 3.0.4 + mpi_iscatter__@Base 3.0.4 + mpi_iscatterv@Base 3.0.4 + mpi_iscatterv_@Base 3.0.4 + mpi_iscatterv__@Base 3.0.4 + mpi_isend@Base 3.0.4 + mpi_isend_@Base 3.0.4 + mpi_isend__@Base 3.0.4 + mpi_issend@Base 3.0.4 + mpi_issend_@Base 3.0.4 + mpi_issend__@Base 3.0.4 + mpi_keyval_create@Base 3.0.4 + mpi_keyval_create_@Base 3.0.4 + mpi_keyval_create__@Base 3.0.4 + mpi_keyval_free@Base 3.0.4 + mpi_keyval_free_@Base 3.0.4 + mpi_keyval_free__@Base 3.0.4 + mpi_lookup_name@Base 3.0.4 + mpi_lookup_name_@Base 3.0.4 + mpi_lookup_name__@Base 3.0.4 + mpi_mprobe@Base 3.0.4 + mpi_mprobe_@Base 3.0.4 + mpi_mprobe__@Base 3.0.4 + mpi_mrecv@Base 3.0.4 + mpi_mrecv_@Base 3.0.4 + mpi_mrecv__@Base 3.0.4 + mpi_neighbor_allgather@Base 3.0.4 + mpi_neighbor_allgather_@Base 3.0.4 + mpi_neighbor_allgather__@Base 3.0.4 + mpi_neighbor_allgatherv@Base 3.0.4 + mpi_neighbor_allgatherv_@Base 3.0.4 + mpi_neighbor_allgatherv__@Base 3.0.4 + mpi_neighbor_alltoall@Base 3.0.4 + mpi_neighbor_alltoall_@Base 3.0.4 + mpi_neighbor_alltoall__@Base 3.0.4 + mpi_neighbor_alltoallv@Base 3.0.4 + mpi_neighbor_alltoallv_@Base 3.0.4 + mpi_neighbor_alltoallv__@Base 3.0.4 + mpi_neighbor_alltoallw@Base 3.0.4 + mpi_neighbor_alltoallw_@Base 3.0.4 + mpi_neighbor_alltoallw__@Base 3.0.4 + mpi_null_copy_fn@Base 3.0.4 + mpi_null_copy_fn_@Base 3.0.4 + mpi_null_copy_fn__@Base 3.0.4 + mpi_null_delete_fn@Base 3.0.4 + mpi_null_delete_fn_@Base 3.0.4 + mpi_null_delete_fn__@Base 3.0.4 + mpi_op_commutative@Base 3.0.4 + mpi_op_commutative_@Base 3.0.4 + mpi_op_commutative__@Base 3.0.4 + mpi_op_create@Base 3.0.4 + mpi_op_create_@Base 3.0.4 + mpi_op_create__@Base 3.0.4 + mpi_op_free@Base 3.0.4 + mpi_op_free_@Base 3.0.4 + mpi_op_free__@Base 3.0.4 + mpi_open_port@Base 3.0.4 + mpi_open_port_@Base 3.0.4 + mpi_open_port__@Base 3.0.4 + mpi_pack@Base 3.0.4 + mpi_pack_@Base 3.0.4 + mpi_pack__@Base 3.0.4 + mpi_pack_external@Base 3.0.4 + mpi_pack_external_@Base 3.0.4 + mpi_pack_external__@Base 3.0.4 + mpi_pack_external_size@Base 3.0.4 + mpi_pack_external_size_@Base 3.0.4 + mpi_pack_external_size__@Base 3.0.4 + mpi_pack_size@Base 3.0.4 + mpi_pack_size_@Base 3.0.4 + mpi_pack_size__@Base 3.0.4 + mpi_pcontrol@Base 3.0.4 + mpi_pcontrol_@Base 3.0.4 + mpi_pcontrol__@Base 3.0.4 + mpi_probe@Base 3.0.4 + mpi_probe_@Base 3.0.4 + mpi_probe__@Base 3.0.4 + mpi_publish_name@Base 3.0.4 + mpi_publish_name_@Base 3.0.4 + mpi_publish_name__@Base 3.0.4 + mpi_put@Base 3.0.4 + mpi_put_@Base 3.0.4 + mpi_put__@Base 3.0.4 + mpi_query_thread@Base 3.0.4 + mpi_query_thread_@Base 3.0.4 + mpi_query_thread__@Base 3.0.4 + mpi_raccumulate@Base 3.0.4 + mpi_raccumulate_@Base 3.0.4 + mpi_raccumulate__@Base 3.0.4 + mpi_recv@Base 3.0.4 + mpi_recv_@Base 3.0.4 + mpi_recv__@Base 3.0.4 + mpi_recv_init@Base 3.0.4 + mpi_recv_init_@Base 3.0.4 + mpi_recv_init__@Base 3.0.4 + mpi_reduce@Base 3.0.4 + mpi_reduce_@Base 3.0.4 + mpi_reduce__@Base 3.0.4 + mpi_reduce_local@Base 3.0.4 + mpi_reduce_local_@Base 3.0.4 + mpi_reduce_local__@Base 3.0.4 + mpi_reduce_scatter@Base 3.0.4 + mpi_reduce_scatter_@Base 3.0.4 + mpi_reduce_scatter__@Base 3.0.4 + mpi_reduce_scatter_block@Base 3.0.4 + mpi_reduce_scatter_block_@Base 3.0.4 + mpi_reduce_scatter_block__@Base 3.0.4 + mpi_register_datarep@Base 3.0.4 + mpi_register_datarep_@Base 3.0.4 + mpi_register_datarep__@Base 3.0.4 + mpi_request_free@Base 3.0.4 + mpi_request_free_@Base 3.0.4 + mpi_request_free__@Base 3.0.4 + mpi_request_get_status@Base 3.0.4 + mpi_request_get_status_@Base 3.0.4 + mpi_request_get_status__@Base 3.0.4 + mpi_rget@Base 3.0.4 + mpi_rget_@Base 3.0.4 + mpi_rget__@Base 3.0.4 + mpi_rget_accumulate@Base 3.0.4 + mpi_rget_accumulate_@Base 3.0.4 + mpi_rget_accumulate__@Base 3.0.4 + mpi_rput@Base 3.0.4 + mpi_rput_@Base 3.0.4 + mpi_rput__@Base 3.0.4 + mpi_rsend@Base 3.0.4 + mpi_rsend_@Base 3.0.4 + mpi_rsend__@Base 3.0.4 + mpi_rsend_init@Base 3.0.4 + mpi_rsend_init_@Base 3.0.4 + mpi_rsend_init__@Base 3.0.4 + mpi_scan@Base 3.0.4 + mpi_scan_@Base 3.0.4 + mpi_scan__@Base 3.0.4 + mpi_scatter@Base 3.0.4 + mpi_scatter_@Base 3.0.4 + mpi_scatter__@Base 3.0.4 + mpi_scatterv@Base 3.0.4 + mpi_scatterv_@Base 3.0.4 + mpi_scatterv__@Base 3.0.4 + mpi_send@Base 3.0.4 + mpi_send_@Base 3.0.4 + mpi_send__@Base 3.0.4 + mpi_send_init@Base 3.0.4 + mpi_send_init_@Base 3.0.4 + mpi_send_init__@Base 3.0.4 + mpi_sendrecv@Base 3.0.4 + mpi_sendrecv_@Base 3.0.4 + mpi_sendrecv__@Base 3.0.4 + mpi_sendrecv_replace@Base 3.0.4 + mpi_sendrecv_replace_@Base 3.0.4 + mpi_sendrecv_replace__@Base 3.0.4 + mpi_ssend@Base 3.0.4 + mpi_ssend_@Base 3.0.4 + mpi_ssend__@Base 3.0.4 + mpi_ssend_init@Base 3.0.4 + mpi_ssend_init_@Base 3.0.4 + mpi_ssend_init__@Base 3.0.4 + mpi_start@Base 3.0.4 + mpi_start_@Base 3.0.4 + mpi_start__@Base 3.0.4 + mpi_startall@Base 3.0.4 + mpi_startall_@Base 3.0.4 + mpi_startall__@Base 3.0.4 + mpi_status_set_cancelled@Base 3.0.4 + mpi_status_set_cancelled_@Base 3.0.4 + mpi_status_set_cancelled__@Base 3.0.4 + mpi_status_set_elements@Base 3.0.4 + mpi_status_set_elements_@Base 3.0.4 + mpi_status_set_elements__@Base 3.0.4 + mpi_status_set_elements_x@Base 3.0.4 + mpi_status_set_elements_x_@Base 3.0.4 + mpi_status_set_elements_x__@Base 3.0.4 + mpi_test@Base 3.0.4 + mpi_test_@Base 3.0.4 + mpi_test__@Base 3.0.4 + mpi_test_cancelled@Base 3.0.4 + mpi_test_cancelled_@Base 3.0.4 + mpi_test_cancelled__@Base 3.0.4 + mpi_testall@Base 3.0.4 + mpi_testall_@Base 3.0.4 + mpi_testall__@Base 3.0.4 + mpi_testany@Base 3.0.4 + mpi_testany_@Base 3.0.4 + mpi_testany__@Base 3.0.4 + mpi_testsome@Base 3.0.4 + mpi_testsome_@Base 3.0.4 + mpi_testsome__@Base 3.0.4 + mpi_topo_test@Base 3.0.4 + mpi_topo_test_@Base 3.0.4 + mpi_topo_test__@Base 3.0.4 + mpi_type_commit@Base 3.0.4 + mpi_type_commit_@Base 3.0.4 + mpi_type_commit__@Base 3.0.4 + mpi_type_contiguous@Base 3.0.4 + mpi_type_contiguous_@Base 3.0.4 + mpi_type_contiguous__@Base 3.0.4 + mpi_type_create_darray@Base 3.0.4 + mpi_type_create_darray_@Base 3.0.4 + mpi_type_create_darray__@Base 3.0.4 + mpi_type_create_f90_complex@Base 3.0.4 + mpi_type_create_f90_complex_@Base 3.0.4 + mpi_type_create_f90_complex__@Base 3.0.4 + mpi_type_create_f90_integer@Base 3.0.4 + mpi_type_create_f90_integer_@Base 3.0.4 + mpi_type_create_f90_integer__@Base 3.0.4 + mpi_type_create_f90_real@Base 3.0.4 + mpi_type_create_f90_real_@Base 3.0.4 + mpi_type_create_f90_real__@Base 3.0.4 + mpi_type_create_hindexed@Base 3.0.4 + mpi_type_create_hindexed_@Base 3.0.4 + mpi_type_create_hindexed__@Base 3.0.4 + mpi_type_create_hindexed_block@Base 3.0.4 + mpi_type_create_hindexed_block_@Base 3.0.4 + mpi_type_create_hindexed_block__@Base 3.0.4 + mpi_type_create_hvector@Base 3.0.4 + mpi_type_create_hvector_@Base 3.0.4 + mpi_type_create_hvector__@Base 3.0.4 + mpi_type_create_indexed_block@Base 3.0.4 + mpi_type_create_indexed_block_@Base 3.0.4 + mpi_type_create_indexed_block__@Base 3.0.4 + mpi_type_create_keyval@Base 3.0.4 + mpi_type_create_keyval_@Base 3.0.4 + mpi_type_create_keyval__@Base 3.0.4 + mpi_type_create_resized@Base 3.0.4 + mpi_type_create_resized_@Base 3.0.4 + mpi_type_create_resized__@Base 3.0.4 + mpi_type_create_struct@Base 3.0.4 + mpi_type_create_struct_@Base 3.0.4 + mpi_type_create_struct__@Base 3.0.4 + mpi_type_create_subarray@Base 3.0.4 + mpi_type_create_subarray_@Base 3.0.4 + mpi_type_create_subarray__@Base 3.0.4 + mpi_type_delete_attr@Base 3.0.4 + mpi_type_delete_attr_@Base 3.0.4 + mpi_type_delete_attr__@Base 3.0.4 + mpi_type_dup@Base 3.0.4 + mpi_type_dup_@Base 3.0.4 + mpi_type_dup__@Base 3.0.4 + mpi_type_dup_fn@Base 3.0.4 + mpi_type_dup_fn_@Base 3.0.4 + mpi_type_dup_fn__@Base 3.0.4 + mpi_type_extent@Base 3.0.4 + mpi_type_extent_@Base 3.0.4 + mpi_type_extent__@Base 3.0.4 + mpi_type_free@Base 3.0.4 + mpi_type_free_@Base 3.0.4 + mpi_type_free__@Base 3.0.4 + mpi_type_free_keyval@Base 3.0.4 + mpi_type_free_keyval_@Base 3.0.4 + mpi_type_free_keyval__@Base 3.0.4 + mpi_type_get_attr@Base 3.0.4 + mpi_type_get_attr_@Base 3.0.4 + mpi_type_get_attr__@Base 3.0.4 + mpi_type_get_contents@Base 3.0.4 + mpi_type_get_contents_@Base 3.0.4 + mpi_type_get_contents__@Base 3.0.4 + mpi_type_get_envelope@Base 3.0.4 + mpi_type_get_envelope_@Base 3.0.4 + mpi_type_get_envelope__@Base 3.0.4 + mpi_type_get_extent@Base 3.0.4 + mpi_type_get_extent_@Base 3.0.4 + mpi_type_get_extent__@Base 3.0.4 + mpi_type_get_extent_x@Base 3.0.4 + mpi_type_get_extent_x_@Base 3.0.4 + mpi_type_get_extent_x__@Base 3.0.4 + mpi_type_get_name@Base 3.0.4 + mpi_type_get_name_@Base 3.0.4 + mpi_type_get_name__@Base 3.0.4 + mpi_type_get_true_extent@Base 3.0.4 + mpi_type_get_true_extent_@Base 3.0.4 + mpi_type_get_true_extent__@Base 3.0.4 + mpi_type_get_true_extent_x@Base 3.0.4 + mpi_type_get_true_extent_x_@Base 3.0.4 + mpi_type_get_true_extent_x__@Base 3.0.4 + mpi_type_hindexed@Base 3.0.4 + mpi_type_hindexed_@Base 3.0.4 + mpi_type_hindexed__@Base 3.0.4 + mpi_type_hvector@Base 3.0.4 + mpi_type_hvector_@Base 3.0.4 + mpi_type_hvector__@Base 3.0.4 + mpi_type_indexed@Base 3.0.4 + mpi_type_indexed_@Base 3.0.4 + mpi_type_indexed__@Base 3.0.4 + mpi_type_lb@Base 3.0.4 + mpi_type_lb_@Base 3.0.4 + mpi_type_lb__@Base 3.0.4 + mpi_type_match_size@Base 3.0.4 + mpi_type_match_size_@Base 3.0.4 + mpi_type_match_size__@Base 3.0.4 + mpi_type_null_copy_fn@Base 3.0.4 + mpi_type_null_copy_fn_@Base 3.0.4 + mpi_type_null_copy_fn__@Base 3.0.4 + mpi_type_null_delete_fn@Base 3.0.4 + mpi_type_null_delete_fn_@Base 3.0.4 + mpi_type_null_delete_fn__@Base 3.0.4 + mpi_type_set_attr@Base 3.0.4 + mpi_type_set_attr_@Base 3.0.4 + mpi_type_set_attr__@Base 3.0.4 + mpi_type_set_name@Base 3.0.4 + mpi_type_set_name_@Base 3.0.4 + mpi_type_set_name__@Base 3.0.4 + mpi_type_size@Base 3.0.4 + mpi_type_size_@Base 3.0.4 + mpi_type_size__@Base 3.0.4 + mpi_type_size_x@Base 3.0.4 + mpi_type_size_x_@Base 3.0.4 + mpi_type_size_x__@Base 3.0.4 + mpi_type_struct@Base 3.0.4 + mpi_type_struct_@Base 3.0.4 + mpi_type_struct__@Base 3.0.4 + mpi_type_ub@Base 3.0.4 + mpi_type_ub_@Base 3.0.4 + mpi_type_ub__@Base 3.0.4 + mpi_type_vector@Base 3.0.4 + mpi_type_vector_@Base 3.0.4 + mpi_type_vector__@Base 3.0.4 + mpi_unpack@Base 3.0.4 + mpi_unpack_@Base 3.0.4 + mpi_unpack__@Base 3.0.4 + mpi_unpack_external@Base 3.0.4 + mpi_unpack_external_@Base 3.0.4 + mpi_unpack_external__@Base 3.0.4 + mpi_unpublish_name@Base 3.0.4 + mpi_unpublish_name_@Base 3.0.4 + mpi_unpublish_name__@Base 3.0.4 + mpi_wait@Base 3.0.4 + mpi_wait_@Base 3.0.4 + mpi_wait__@Base 3.0.4 + mpi_waitall@Base 3.0.4 + mpi_waitall_@Base 3.0.4 + mpi_waitall__@Base 3.0.4 + mpi_waitany@Base 3.0.4 + mpi_waitany_@Base 3.0.4 + mpi_waitany__@Base 3.0.4 + mpi_waitsome@Base 3.0.4 + mpi_waitsome_@Base 3.0.4 + mpi_waitsome__@Base 3.0.4 + mpi_win_allocate@Base 3.0.4 + mpi_win_allocate_@Base 3.0.4 + mpi_win_allocate__@Base 3.0.4 + mpi_win_allocate_shared@Base 3.0.4 + mpi_win_allocate_shared_@Base 3.0.4 + mpi_win_allocate_shared__@Base 3.0.4 + mpi_win_attach@Base 3.0.4 + mpi_win_attach_@Base 3.0.4 + mpi_win_attach__@Base 3.0.4 + mpi_win_call_errhandler@Base 3.0.4 + mpi_win_call_errhandler_@Base 3.0.4 + mpi_win_call_errhandler__@Base 3.0.4 + mpi_win_complete@Base 3.0.4 + mpi_win_complete_@Base 3.0.4 + mpi_win_complete__@Base 3.0.4 + mpi_win_create@Base 3.0.4 + mpi_win_create_@Base 3.0.4 + mpi_win_create__@Base 3.0.4 + mpi_win_create_dynamic@Base 3.0.4 + mpi_win_create_dynamic_@Base 3.0.4 + mpi_win_create_dynamic__@Base 3.0.4 + mpi_win_create_errhandler@Base 3.0.4 + mpi_win_create_errhandler_@Base 3.0.4 + mpi_win_create_errhandler__@Base 3.0.4 + mpi_win_create_keyval@Base 3.0.4 + mpi_win_create_keyval_@Base 3.0.4 + mpi_win_create_keyval__@Base 3.0.4 + mpi_win_delete_attr@Base 3.0.4 + mpi_win_delete_attr_@Base 3.0.4 + mpi_win_delete_attr__@Base 3.0.4 + mpi_win_detach@Base 3.0.4 + mpi_win_detach_@Base 3.0.4 + mpi_win_detach__@Base 3.0.4 + mpi_win_dup_fn@Base 3.0.4 + mpi_win_dup_fn_@Base 3.0.4 + mpi_win_dup_fn__@Base 3.0.4 + mpi_win_fence@Base 3.0.4 + mpi_win_fence_@Base 3.0.4 + mpi_win_fence__@Base 3.0.4 + mpi_win_flush@Base 3.0.4 + mpi_win_flush_@Base 3.0.4 + mpi_win_flush__@Base 3.0.4 + mpi_win_flush_all@Base 3.0.4 + mpi_win_flush_all_@Base 3.0.4 + mpi_win_flush_all__@Base 3.0.4 + mpi_win_flush_local@Base 3.0.4 + mpi_win_flush_local_@Base 3.0.4 + mpi_win_flush_local__@Base 3.0.4 + mpi_win_flush_local_all@Base 3.0.4 + mpi_win_flush_local_all_@Base 3.0.4 + mpi_win_flush_local_all__@Base 3.0.4 + mpi_win_free@Base 3.0.4 + mpi_win_free_@Base 3.0.4 + mpi_win_free__@Base 3.0.4 + mpi_win_free_keyval@Base 3.0.4 + mpi_win_free_keyval_@Base 3.0.4 + mpi_win_free_keyval__@Base 3.0.4 + mpi_win_get_attr@Base 3.0.4 + mpi_win_get_attr_@Base 3.0.4 + mpi_win_get_attr__@Base 3.0.4 + mpi_win_get_errhandler@Base 3.0.4 + mpi_win_get_errhandler_@Base 3.0.4 + mpi_win_get_errhandler__@Base 3.0.4 + mpi_win_get_group@Base 3.0.4 + mpi_win_get_group_@Base 3.0.4 + mpi_win_get_group__@Base 3.0.4 + mpi_win_get_info@Base 3.0.4 + mpi_win_get_info_@Base 3.0.4 + mpi_win_get_info__@Base 3.0.4 + mpi_win_get_name@Base 3.0.4 + mpi_win_get_name_@Base 3.0.4 + mpi_win_get_name__@Base 3.0.4 + mpi_win_lock@Base 3.0.4 + mpi_win_lock_@Base 3.0.4 + mpi_win_lock__@Base 3.0.4 + mpi_win_lock_all@Base 3.0.4 + mpi_win_lock_all_@Base 3.0.4 + mpi_win_lock_all__@Base 3.0.4 + mpi_win_null_copy_fn@Base 3.0.4 + mpi_win_null_copy_fn_@Base 3.0.4 + mpi_win_null_copy_fn__@Base 3.0.4 + mpi_win_null_delete_fn@Base 3.0.4 + mpi_win_null_delete_fn_@Base 3.0.4 + mpi_win_null_delete_fn__@Base 3.0.4 + mpi_win_post@Base 3.0.4 + mpi_win_post_@Base 3.0.4 + mpi_win_post__@Base 3.0.4 + mpi_win_set_attr@Base 3.0.4 + mpi_win_set_attr_@Base 3.0.4 + mpi_win_set_attr__@Base 3.0.4 + mpi_win_set_errhandler@Base 3.0.4 + mpi_win_set_errhandler_@Base 3.0.4 + mpi_win_set_errhandler__@Base 3.0.4 + mpi_win_set_info@Base 3.0.4 + mpi_win_set_info_@Base 3.0.4 + mpi_win_set_info__@Base 3.0.4 + mpi_win_set_name@Base 3.0.4 + mpi_win_set_name_@Base 3.0.4 + mpi_win_set_name__@Base 3.0.4 + mpi_win_shared_query@Base 3.0.4 + mpi_win_shared_query_@Base 3.0.4 + mpi_win_shared_query__@Base 3.0.4 + mpi_win_start@Base 3.0.4 + mpi_win_start_@Base 3.0.4 + mpi_win_start__@Base 3.0.4 + mpi_win_sync@Base 3.0.4 + mpi_win_sync_@Base 3.0.4 + mpi_win_sync__@Base 3.0.4 + mpi_win_test@Base 3.0.4 + mpi_win_test_@Base 3.0.4 + mpi_win_test__@Base 3.0.4 + mpi_win_unlock@Base 3.0.4 + mpi_win_unlock_@Base 3.0.4 + mpi_win_unlock__@Base 3.0.4 + mpi_win_unlock_all@Base 3.0.4 + mpi_win_unlock_all_@Base 3.0.4 + mpi_win_unlock_all__@Base 3.0.4 + mpi_win_wait@Base 3.0.4 + mpi_win_wait_@Base 3.0.4 + mpi_win_wait__@Base 3.0.4 + mpi_wtick@Base 3.0.4 + mpi_wtick_@Base 3.0.4 + mpi_wtick__@Base 3.0.4 + mpi_wtime@Base 3.0.4 + mpi_wtime_@Base 3.0.4 + mpi_wtime__@Base 3.0.4 + mpifcmb1@Base 3.0.4 + mpifcmb1_@Base 3.0.4 + mpifcmb1r@Base 3.0.4 + mpifcmb2@Base 3.0.4 + mpifcmb2_@Base 3.0.4 + mpifcmb2r@Base 3.0.4 + mpifcmb3@Base 3.0.4 + mpifcmb3_@Base 3.0.4 + mpifcmb3r@Base 3.0.4 + mpifcmb4@Base 3.0.4 + mpifcmb4_@Base 3.0.4 + mpifcmb4r@Base 3.0.4 + mpifcmb5@Base 3.0.4 + mpifcmb5_@Base 3.0.4 + mpifcmb5r@Base 3.0.4 + mpifcmb6@Base 3.0.4 + mpifcmb6_@Base 3.0.4 + mpifcmb6r@Base 3.0.4 + mpifcmb7@Base 3.0.4 + mpifcmb7_@Base 3.0.4 + mpifcmb7r@Base 3.0.4 + mpifcmb8@Base 3.0.4 + mpifcmb8_@Base 3.0.4 + mpifcmb8r@Base 3.0.4 + mpifcmb9@Base 3.0.4 + mpifcmb9_@Base 3.0.4 + mpifcmb9r@Base 3.0.4 + mpir_is_argvs_null@Base 3.0.4 + mpir_is_argvs_null_@Base 3.0.4 + mpir_is_argvs_null__@Base 3.0.4 + mpir_is_bottom@Base 3.0.4 + mpir_is_bottom_@Base 3.0.4 + mpir_is_bottom__@Base 3.0.4 + mpir_is_errcodes_ignore@Base 3.0.4 + mpir_is_errcodes_ignore_@Base 3.0.4 + mpir_is_errcodes_ignore__@Base 3.0.4 + mpir_is_in_place@Base 3.0.4 + mpir_is_in_place_@Base 3.0.4 + mpir_is_in_place__@Base 3.0.4 + mpir_is_status_ignore@Base 3.0.4 + mpir_is_status_ignore_@Base 3.0.4 + mpir_is_status_ignore__@Base 3.0.4 + mpir_is_statuses_ignore@Base 3.0.4 + mpir_is_statuses_ignore_@Base 3.0.4 + mpir_is_statuses_ignore__@Base 3.0.4 + mpir_is_unweighted@Base 3.0.4 + mpir_is_unweighted_@Base 3.0.4 + mpir_is_unweighted__@Base 3.0.4 + mpirinitc2_@Base 3.0.4 + mpirinitc_@Base 3.0.4 + mpirinitf_@Base 3.0.4 + mpix_comm_group_failed@Base 3.0.4 + mpix_comm_group_failed_@Base 3.0.4 + mpix_comm_group_failed__@Base 3.0.4 + mpix_comm_reenable_anysource@Base 3.0.4 + mpix_comm_reenable_anysource_@Base 3.0.4 + mpix_comm_reenable_anysource__@Base 3.0.4 + mpix_comm_remote_group_failed@Base 3.0.4 + mpix_comm_remote_group_failed_@Base 3.0.4 + mpix_comm_remote_group_failed__@Base 3.0.4 + pmpi_abort@Base 3.0.4 + pmpi_abort_@Base 3.0.4 + pmpi_abort__@Base 3.0.4 + pmpi_accumulate@Base 3.0.4 + pmpi_accumulate_@Base 3.0.4 + pmpi_accumulate__@Base 3.0.4 + pmpi_add_error_class@Base 3.0.4 + pmpi_add_error_class_@Base 3.0.4 + pmpi_add_error_class__@Base 3.0.4 + pmpi_add_error_code@Base 3.0.4 + pmpi_add_error_code_@Base 3.0.4 + pmpi_add_error_code__@Base 3.0.4 + pmpi_add_error_string@Base 3.0.4 + pmpi_add_error_string_@Base 3.0.4 + pmpi_add_error_string__@Base 3.0.4 + pmpi_address@Base 3.0.4 + pmpi_address_@Base 3.0.4 + pmpi_address__@Base 3.0.4 + pmpi_allgather@Base 3.0.4 + pmpi_allgather_@Base 3.0.4 + pmpi_allgather__@Base 3.0.4 + pmpi_allgatherv@Base 3.0.4 + pmpi_allgatherv_@Base 3.0.4 + pmpi_allgatherv__@Base 3.0.4 + pmpi_alloc_mem@Base 3.0.4 + pmpi_alloc_mem_@Base 3.0.4 + pmpi_alloc_mem__@Base 3.0.4 + pmpi_allreduce@Base 3.0.4 + pmpi_allreduce_@Base 3.0.4 + pmpi_allreduce__@Base 3.0.4 + pmpi_alltoall@Base 3.0.4 + pmpi_alltoall_@Base 3.0.4 + pmpi_alltoall__@Base 3.0.4 + pmpi_alltoallv@Base 3.0.4 + pmpi_alltoallv_@Base 3.0.4 + pmpi_alltoallv__@Base 3.0.4 + pmpi_alltoallw@Base 3.0.4 + pmpi_alltoallw_@Base 3.0.4 + pmpi_alltoallw__@Base 3.0.4 + pmpi_attr_delete@Base 3.0.4 + pmpi_attr_delete_@Base 3.0.4 + pmpi_attr_delete__@Base 3.0.4 + pmpi_attr_get@Base 3.0.4 + pmpi_attr_get_@Base 3.0.4 + pmpi_attr_get__@Base 3.0.4 + pmpi_attr_put@Base 3.0.4 + pmpi_attr_put_@Base 3.0.4 + pmpi_attr_put__@Base 3.0.4 + pmpi_barrier@Base 3.0.4 + pmpi_barrier_@Base 3.0.4 + pmpi_barrier__@Base 3.0.4 + pmpi_bcast@Base 3.0.4 + pmpi_bcast_@Base 3.0.4 + pmpi_bcast__@Base 3.0.4 + pmpi_bsend@Base 3.0.4 + pmpi_bsend_@Base 3.0.4 + pmpi_bsend__@Base 3.0.4 + pmpi_bsend_init@Base 3.0.4 + pmpi_bsend_init_@Base 3.0.4 + pmpi_bsend_init__@Base 3.0.4 + pmpi_buffer_attach@Base 3.0.4 + pmpi_buffer_attach_@Base 3.0.4 + pmpi_buffer_attach__@Base 3.0.4 + pmpi_buffer_detach@Base 3.0.4 + pmpi_buffer_detach_@Base 3.0.4 + pmpi_buffer_detach__@Base 3.0.4 + pmpi_cancel@Base 3.0.4 + pmpi_cancel_@Base 3.0.4 + pmpi_cancel__@Base 3.0.4 + pmpi_cart_coords@Base 3.0.4 + pmpi_cart_coords_@Base 3.0.4 + pmpi_cart_coords__@Base 3.0.4 + pmpi_cart_create@Base 3.0.4 + pmpi_cart_create_@Base 3.0.4 + pmpi_cart_create__@Base 3.0.4 + pmpi_cart_get@Base 3.0.4 + pmpi_cart_get_@Base 3.0.4 + pmpi_cart_get__@Base 3.0.4 + pmpi_cart_map@Base 3.0.4 + pmpi_cart_map_@Base 3.0.4 + pmpi_cart_map__@Base 3.0.4 + pmpi_cart_rank@Base 3.0.4 + pmpi_cart_rank_@Base 3.0.4 + pmpi_cart_rank__@Base 3.0.4 + pmpi_cart_shift@Base 3.0.4 + pmpi_cart_shift_@Base 3.0.4 + pmpi_cart_shift__@Base 3.0.4 + pmpi_cart_sub@Base 3.0.4 + pmpi_cart_sub_@Base 3.0.4 + pmpi_cart_sub__@Base 3.0.4 + pmpi_cartdim_get@Base 3.0.4 + pmpi_cartdim_get_@Base 3.0.4 + pmpi_cartdim_get__@Base 3.0.4 + pmpi_close_port@Base 3.0.4 + pmpi_close_port_@Base 3.0.4 + pmpi_close_port__@Base 3.0.4 + pmpi_comm_accept@Base 3.0.4 + pmpi_comm_accept_@Base 3.0.4 + pmpi_comm_accept__@Base 3.0.4 + pmpi_comm_call_errhandler@Base 3.0.4 + pmpi_comm_call_errhandler_@Base 3.0.4 + pmpi_comm_call_errhandler__@Base 3.0.4 + pmpi_comm_compare@Base 3.0.4 + pmpi_comm_compare_@Base 3.0.4 + pmpi_comm_compare__@Base 3.0.4 + pmpi_comm_connect@Base 3.0.4 + pmpi_comm_connect_@Base 3.0.4 + pmpi_comm_connect__@Base 3.0.4 + pmpi_comm_create@Base 3.0.4 + pmpi_comm_create_@Base 3.0.4 + pmpi_comm_create__@Base 3.0.4 + pmpi_comm_create_errhandler@Base 3.0.4 + pmpi_comm_create_errhandler_@Base 3.0.4 + pmpi_comm_create_errhandler__@Base 3.0.4 + pmpi_comm_create_group@Base 3.0.4 + pmpi_comm_create_group_@Base 3.0.4 + pmpi_comm_create_group__@Base 3.0.4 + pmpi_comm_create_keyval@Base 3.0.4 + pmpi_comm_create_keyval_@Base 3.0.4 + pmpi_comm_create_keyval__@Base 3.0.4 + pmpi_comm_delete_attr@Base 3.0.4 + pmpi_comm_delete_attr_@Base 3.0.4 + pmpi_comm_delete_attr__@Base 3.0.4 + pmpi_comm_disconnect@Base 3.0.4 + pmpi_comm_disconnect_@Base 3.0.4 + pmpi_comm_disconnect__@Base 3.0.4 + pmpi_comm_dup@Base 3.0.4 + pmpi_comm_dup_@Base 3.0.4 + pmpi_comm_dup__@Base 3.0.4 + pmpi_comm_dup_fn@Base 3.0.4 + pmpi_comm_dup_fn_@Base 3.0.4 + pmpi_comm_dup_fn__@Base 3.0.4 + pmpi_comm_dup_with_info@Base 3.0.4 + pmpi_comm_dup_with_info_@Base 3.0.4 + pmpi_comm_dup_with_info__@Base 3.0.4 + pmpi_comm_free@Base 3.0.4 + pmpi_comm_free_@Base 3.0.4 + pmpi_comm_free__@Base 3.0.4 + pmpi_comm_free_keyval@Base 3.0.4 + pmpi_comm_free_keyval_@Base 3.0.4 + pmpi_comm_free_keyval__@Base 3.0.4 + pmpi_comm_get_attr@Base 3.0.4 + pmpi_comm_get_attr_@Base 3.0.4 + pmpi_comm_get_attr__@Base 3.0.4 + pmpi_comm_get_errhandler@Base 3.0.4 + pmpi_comm_get_errhandler_@Base 3.0.4 + pmpi_comm_get_errhandler__@Base 3.0.4 + pmpi_comm_get_info@Base 3.0.4 + pmpi_comm_get_info_@Base 3.0.4 + pmpi_comm_get_info__@Base 3.0.4 + pmpi_comm_get_name@Base 3.0.4 + pmpi_comm_get_name_@Base 3.0.4 + pmpi_comm_get_name__@Base 3.0.4 + pmpi_comm_get_parent@Base 3.0.4 + pmpi_comm_get_parent_@Base 3.0.4 + pmpi_comm_get_parent__@Base 3.0.4 + pmpi_comm_group@Base 3.0.4 + pmpi_comm_group_@Base 3.0.4 + pmpi_comm_group__@Base 3.0.4 + pmpi_comm_idup@Base 3.0.4 + pmpi_comm_idup_@Base 3.0.4 + pmpi_comm_idup__@Base 3.0.4 + pmpi_comm_join@Base 3.0.4 + pmpi_comm_join_@Base 3.0.4 + pmpi_comm_join__@Base 3.0.4 + pmpi_comm_null_copy_fn@Base 3.0.4 + pmpi_comm_null_copy_fn_@Base 3.0.4 + pmpi_comm_null_copy_fn__@Base 3.0.4 + pmpi_comm_null_delete_fn@Base 3.0.4 + pmpi_comm_null_delete_fn_@Base 3.0.4 + pmpi_comm_null_delete_fn__@Base 3.0.4 + pmpi_comm_rank@Base 3.0.4 + pmpi_comm_rank_@Base 3.0.4 + pmpi_comm_rank__@Base 3.0.4 + pmpi_comm_remote_group@Base 3.0.4 + pmpi_comm_remote_group_@Base 3.0.4 + pmpi_comm_remote_group__@Base 3.0.4 + pmpi_comm_remote_size@Base 3.0.4 + pmpi_comm_remote_size_@Base 3.0.4 + pmpi_comm_remote_size__@Base 3.0.4 + pmpi_comm_set_attr@Base 3.0.4 + pmpi_comm_set_attr_@Base 3.0.4 + pmpi_comm_set_attr__@Base 3.0.4 + pmpi_comm_set_errhandler@Base 3.0.4 + pmpi_comm_set_errhandler_@Base 3.0.4 + pmpi_comm_set_errhandler__@Base 3.0.4 + pmpi_comm_set_info@Base 3.0.4 + pmpi_comm_set_info_@Base 3.0.4 + pmpi_comm_set_info__@Base 3.0.4 + pmpi_comm_set_name@Base 3.0.4 + pmpi_comm_set_name_@Base 3.0.4 + pmpi_comm_set_name__@Base 3.0.4 + pmpi_comm_size@Base 3.0.4 + pmpi_comm_size_@Base 3.0.4 + pmpi_comm_size__@Base 3.0.4 + pmpi_comm_spawn@Base 3.0.4 + pmpi_comm_spawn_@Base 3.0.4 + pmpi_comm_spawn__@Base 3.0.4 + pmpi_comm_spawn_multiple@Base 3.0.4 + pmpi_comm_spawn_multiple_@Base 3.0.4 + pmpi_comm_spawn_multiple__@Base 3.0.4 + pmpi_comm_split@Base 3.0.4 + pmpi_comm_split_@Base 3.0.4 + pmpi_comm_split__@Base 3.0.4 + pmpi_comm_split_type@Base 3.0.4 + pmpi_comm_split_type_@Base 3.0.4 + pmpi_comm_split_type__@Base 3.0.4 + pmpi_comm_test_inter@Base 3.0.4 + pmpi_comm_test_inter_@Base 3.0.4 + pmpi_comm_test_inter__@Base 3.0.4 + pmpi_compare_and_swap@Base 3.0.4 + pmpi_compare_and_swap_@Base 3.0.4 + pmpi_compare_and_swap__@Base 3.0.4 + pmpi_dims_create@Base 3.0.4 + pmpi_dims_create_@Base 3.0.4 + pmpi_dims_create__@Base 3.0.4 + pmpi_dist_graph_create@Base 3.0.4 + pmpi_dist_graph_create_@Base 3.0.4 + pmpi_dist_graph_create__@Base 3.0.4 + pmpi_dist_graph_create_adjacent@Base 3.0.4 + pmpi_dist_graph_create_adjacent_@Base 3.0.4 + pmpi_dist_graph_create_adjacent__@Base 3.0.4 + pmpi_dist_graph_neighbors@Base 3.0.4 + pmpi_dist_graph_neighbors_@Base 3.0.4 + pmpi_dist_graph_neighbors__@Base 3.0.4 + pmpi_dist_graph_neighbors_count@Base 3.0.4 + pmpi_dist_graph_neighbors_count_@Base 3.0.4 + pmpi_dist_graph_neighbors_count__@Base 3.0.4 + pmpi_dup_fn@Base 3.0.4 + pmpi_dup_fn_@Base 3.0.4 + pmpi_dup_fn__@Base 3.0.4 + pmpi_errhandler_create@Base 3.0.4 + pmpi_errhandler_create_@Base 3.0.4 + pmpi_errhandler_create__@Base 3.0.4 + pmpi_errhandler_free@Base 3.0.4 + pmpi_errhandler_free_@Base 3.0.4 + pmpi_errhandler_free__@Base 3.0.4 + pmpi_errhandler_get@Base 3.0.4 + pmpi_errhandler_get_@Base 3.0.4 + pmpi_errhandler_get__@Base 3.0.4 + pmpi_errhandler_set@Base 3.0.4 + pmpi_errhandler_set_@Base 3.0.4 + pmpi_errhandler_set__@Base 3.0.4 + pmpi_error_class@Base 3.0.4 + pmpi_error_class_@Base 3.0.4 + pmpi_error_class__@Base 3.0.4 + pmpi_error_string@Base 3.0.4 + pmpi_error_string_@Base 3.0.4 + pmpi_error_string__@Base 3.0.4 + pmpi_exscan@Base 3.0.4 + pmpi_exscan_@Base 3.0.4 + pmpi_exscan__@Base 3.0.4 + pmpi_fetch_and_op@Base 3.0.4 + pmpi_fetch_and_op_@Base 3.0.4 + pmpi_fetch_and_op__@Base 3.0.4 + pmpi_file_call_errhandler@Base 3.0.4 + pmpi_file_call_errhandler_@Base 3.0.4 + pmpi_file_call_errhandler__@Base 3.0.4 + pmpi_file_close@Base 3.0.4 + pmpi_file_close_@Base 3.0.4 + pmpi_file_close__@Base 3.0.4 + pmpi_file_create_errhandler@Base 3.0.4 + pmpi_file_create_errhandler_@Base 3.0.4 + pmpi_file_create_errhandler__@Base 3.0.4 + pmpi_file_delete@Base 3.0.4 + pmpi_file_delete_@Base 3.0.4 + pmpi_file_delete__@Base 3.0.4 + pmpi_file_get_amode@Base 3.0.4 + pmpi_file_get_amode_@Base 3.0.4 + pmpi_file_get_amode__@Base 3.0.4 + pmpi_file_get_atomicity@Base 3.0.4 + pmpi_file_get_atomicity_@Base 3.0.4 + pmpi_file_get_atomicity__@Base 3.0.4 + pmpi_file_get_byte_offset@Base 3.0.4 + pmpi_file_get_byte_offset_@Base 3.0.4 + pmpi_file_get_byte_offset__@Base 3.0.4 + pmpi_file_get_errhandler@Base 3.0.4 + pmpi_file_get_errhandler_@Base 3.0.4 + pmpi_file_get_errhandler__@Base 3.0.4 + pmpi_file_get_group@Base 3.0.4 + pmpi_file_get_group_@Base 3.0.4 + pmpi_file_get_group__@Base 3.0.4 + pmpi_file_get_info@Base 3.0.4 + pmpi_file_get_info_@Base 3.0.4 + pmpi_file_get_info__@Base 3.0.4 + pmpi_file_get_position@Base 3.0.4 + pmpi_file_get_position_@Base 3.0.4 + pmpi_file_get_position__@Base 3.0.4 + pmpi_file_get_position_shared@Base 3.0.4 + pmpi_file_get_position_shared_@Base 3.0.4 + pmpi_file_get_position_shared__@Base 3.0.4 + pmpi_file_get_size@Base 3.0.4 + pmpi_file_get_size_@Base 3.0.4 + pmpi_file_get_size__@Base 3.0.4 + pmpi_file_get_type_extent@Base 3.0.4 + pmpi_file_get_type_extent_@Base 3.0.4 + pmpi_file_get_type_extent__@Base 3.0.4 + pmpi_file_get_view@Base 3.0.4 + pmpi_file_get_view_@Base 3.0.4 + pmpi_file_get_view__@Base 3.0.4 + pmpi_file_iread@Base 3.0.4 + pmpi_file_iread_@Base 3.0.4 + pmpi_file_iread__@Base 3.0.4 + pmpi_file_iread_at@Base 3.0.4 + pmpi_file_iread_at_@Base 3.0.4 + pmpi_file_iread_at__@Base 3.0.4 + pmpi_file_iread_shared@Base 3.0.4 + pmpi_file_iread_shared_@Base 3.0.4 + pmpi_file_iread_shared__@Base 3.0.4 + pmpi_file_iwrite@Base 3.0.4 + pmpi_file_iwrite_@Base 3.0.4 + pmpi_file_iwrite__@Base 3.0.4 + pmpi_file_iwrite_at@Base 3.0.4 + pmpi_file_iwrite_at_@Base 3.0.4 + pmpi_file_iwrite_at__@Base 3.0.4 + pmpi_file_iwrite_shared@Base 3.0.4 + pmpi_file_iwrite_shared_@Base 3.0.4 + pmpi_file_iwrite_shared__@Base 3.0.4 + pmpi_file_open@Base 3.0.4 + pmpi_file_open_@Base 3.0.4 + pmpi_file_open__@Base 3.0.4 + pmpi_file_preallocate@Base 3.0.4 + pmpi_file_preallocate_@Base 3.0.4 + pmpi_file_preallocate__@Base 3.0.4 + pmpi_file_read@Base 3.0.4 + pmpi_file_read_@Base 3.0.4 + pmpi_file_read__@Base 3.0.4 + pmpi_file_read_all@Base 3.0.4 + pmpi_file_read_all_@Base 3.0.4 + pmpi_file_read_all__@Base 3.0.4 + pmpi_file_read_all_begin@Base 3.0.4 + pmpi_file_read_all_begin_@Base 3.0.4 + pmpi_file_read_all_begin__@Base 3.0.4 + pmpi_file_read_all_end@Base 3.0.4 + pmpi_file_read_all_end_@Base 3.0.4 + pmpi_file_read_all_end__@Base 3.0.4 + pmpi_file_read_at@Base 3.0.4 + pmpi_file_read_at_@Base 3.0.4 + pmpi_file_read_at__@Base 3.0.4 + pmpi_file_read_at_all@Base 3.0.4 + pmpi_file_read_at_all_@Base 3.0.4 + pmpi_file_read_at_all__@Base 3.0.4 + pmpi_file_read_at_all_begin@Base 3.0.4 + pmpi_file_read_at_all_begin_@Base 3.0.4 + pmpi_file_read_at_all_begin__@Base 3.0.4 + pmpi_file_read_at_all_end@Base 3.0.4 + pmpi_file_read_at_all_end_@Base 3.0.4 + pmpi_file_read_at_all_end__@Base 3.0.4 + pmpi_file_read_ordered@Base 3.0.4 + pmpi_file_read_ordered_@Base 3.0.4 + pmpi_file_read_ordered__@Base 3.0.4 + pmpi_file_read_ordered_begin@Base 3.0.4 + pmpi_file_read_ordered_begin_@Base 3.0.4 + pmpi_file_read_ordered_begin__@Base 3.0.4 + pmpi_file_read_ordered_end@Base 3.0.4 + pmpi_file_read_ordered_end_@Base 3.0.4 + pmpi_file_read_ordered_end__@Base 3.0.4 + pmpi_file_read_shared@Base 3.0.4 + pmpi_file_read_shared_@Base 3.0.4 + pmpi_file_read_shared__@Base 3.0.4 + pmpi_file_seek@Base 3.0.4 + pmpi_file_seek_@Base 3.0.4 + pmpi_file_seek__@Base 3.0.4 + pmpi_file_seek_shared@Base 3.0.4 + pmpi_file_seek_shared_@Base 3.0.4 + pmpi_file_seek_shared__@Base 3.0.4 + pmpi_file_set_atomicity@Base 3.0.4 + pmpi_file_set_atomicity_@Base 3.0.4 + pmpi_file_set_atomicity__@Base 3.0.4 + pmpi_file_set_errhandler@Base 3.0.4 + pmpi_file_set_errhandler_@Base 3.0.4 + pmpi_file_set_errhandler__@Base 3.0.4 + pmpi_file_set_info@Base 3.0.4 + pmpi_file_set_info_@Base 3.0.4 + pmpi_file_set_info__@Base 3.0.4 + pmpi_file_set_size@Base 3.0.4 + pmpi_file_set_size_@Base 3.0.4 + pmpi_file_set_size__@Base 3.0.4 + pmpi_file_set_view@Base 3.0.4 + pmpi_file_set_view_@Base 3.0.4 + pmpi_file_set_view__@Base 3.0.4 + pmpi_file_sync@Base 3.0.4 + pmpi_file_sync_@Base 3.0.4 + pmpi_file_sync__@Base 3.0.4 + pmpi_file_write@Base 3.0.4 + pmpi_file_write_@Base 3.0.4 + pmpi_file_write__@Base 3.0.4 + pmpi_file_write_all@Base 3.0.4 + pmpi_file_write_all_@Base 3.0.4 + pmpi_file_write_all__@Base 3.0.4 + pmpi_file_write_all_begin@Base 3.0.4 + pmpi_file_write_all_begin_@Base 3.0.4 + pmpi_file_write_all_begin__@Base 3.0.4 + pmpi_file_write_all_end@Base 3.0.4 + pmpi_file_write_all_end_@Base 3.0.4 + pmpi_file_write_all_end__@Base 3.0.4 + pmpi_file_write_at@Base 3.0.4 + pmpi_file_write_at_@Base 3.0.4 + pmpi_file_write_at__@Base 3.0.4 + pmpi_file_write_at_all@Base 3.0.4 + pmpi_file_write_at_all_@Base 3.0.4 + pmpi_file_write_at_all__@Base 3.0.4 + pmpi_file_write_at_all_begin@Base 3.0.4 + pmpi_file_write_at_all_begin_@Base 3.0.4 + pmpi_file_write_at_all_begin__@Base 3.0.4 + pmpi_file_write_at_all_end@Base 3.0.4 + pmpi_file_write_at_all_end_@Base 3.0.4 + pmpi_file_write_at_all_end__@Base 3.0.4 + pmpi_file_write_ordered@Base 3.0.4 + pmpi_file_write_ordered_@Base 3.0.4 + pmpi_file_write_ordered__@Base 3.0.4 + pmpi_file_write_ordered_begin@Base 3.0.4 + pmpi_file_write_ordered_begin_@Base 3.0.4 + pmpi_file_write_ordered_begin__@Base 3.0.4 + pmpi_file_write_ordered_end@Base 3.0.4 + pmpi_file_write_ordered_end_@Base 3.0.4 + pmpi_file_write_ordered_end__@Base 3.0.4 + pmpi_file_write_shared@Base 3.0.4 + pmpi_file_write_shared_@Base 3.0.4 + pmpi_file_write_shared__@Base 3.0.4 + pmpi_finalize@Base 3.0.4 + pmpi_finalize_@Base 3.0.4 + pmpi_finalize__@Base 3.0.4 + pmpi_finalized@Base 3.0.4 + pmpi_finalized_@Base 3.0.4 + pmpi_finalized__@Base 3.0.4 + pmpi_free_mem@Base 3.0.4 + pmpi_free_mem_@Base 3.0.4 + pmpi_free_mem__@Base 3.0.4 + pmpi_gather@Base 3.0.4 + pmpi_gather_@Base 3.0.4 + pmpi_gather__@Base 3.0.4 + pmpi_gatherv@Base 3.0.4 + pmpi_gatherv_@Base 3.0.4 + pmpi_gatherv__@Base 3.0.4 + pmpi_get@Base 3.0.4 + pmpi_get_@Base 3.0.4 + pmpi_get__@Base 3.0.4 + pmpi_get_accumulate@Base 3.0.4 + pmpi_get_accumulate_@Base 3.0.4 + pmpi_get_accumulate__@Base 3.0.4 + pmpi_get_address@Base 3.0.4 + pmpi_get_address_@Base 3.0.4 + pmpi_get_address__@Base 3.0.4 + pmpi_get_count@Base 3.0.4 + pmpi_get_count_@Base 3.0.4 + pmpi_get_count__@Base 3.0.4 + pmpi_get_elements@Base 3.0.4 + pmpi_get_elements_@Base 3.0.4 + pmpi_get_elements__@Base 3.0.4 + pmpi_get_elements_x@Base 3.0.4 + pmpi_get_elements_x_@Base 3.0.4 + pmpi_get_elements_x__@Base 3.0.4 + pmpi_get_library_version@Base 3.0.4 + pmpi_get_library_version_@Base 3.0.4 + pmpi_get_library_version__@Base 3.0.4 + pmpi_get_processor_name@Base 3.0.4 + pmpi_get_processor_name_@Base 3.0.4 + pmpi_get_processor_name__@Base 3.0.4 + pmpi_get_version@Base 3.0.4 + pmpi_get_version_@Base 3.0.4 + pmpi_get_version__@Base 3.0.4 + pmpi_graph_create@Base 3.0.4 + pmpi_graph_create_@Base 3.0.4 + pmpi_graph_create__@Base 3.0.4 + pmpi_graph_get@Base 3.0.4 + pmpi_graph_get_@Base 3.0.4 + pmpi_graph_get__@Base 3.0.4 + pmpi_graph_map@Base 3.0.4 + pmpi_graph_map_@Base 3.0.4 + pmpi_graph_map__@Base 3.0.4 + pmpi_graph_neighbors@Base 3.0.4 + pmpi_graph_neighbors_@Base 3.0.4 + pmpi_graph_neighbors__@Base 3.0.4 + pmpi_graph_neighbors_count@Base 3.0.4 + pmpi_graph_neighbors_count_@Base 3.0.4 + pmpi_graph_neighbors_count__@Base 3.0.4 + pmpi_graphdims_get@Base 3.0.4 + pmpi_graphdims_get_@Base 3.0.4 + pmpi_graphdims_get__@Base 3.0.4 + pmpi_grequest_complete@Base 3.0.4 + pmpi_grequest_complete_@Base 3.0.4 + pmpi_grequest_complete__@Base 3.0.4 + pmpi_grequest_start@Base 3.0.4 + pmpi_grequest_start_@Base 3.0.4 + pmpi_grequest_start__@Base 3.0.4 + pmpi_group_compare@Base 3.0.4 + pmpi_group_compare_@Base 3.0.4 + pmpi_group_compare__@Base 3.0.4 + pmpi_group_difference@Base 3.0.4 + pmpi_group_difference_@Base 3.0.4 + pmpi_group_difference__@Base 3.0.4 + pmpi_group_excl@Base 3.0.4 + pmpi_group_excl_@Base 3.0.4 + pmpi_group_excl__@Base 3.0.4 + pmpi_group_free@Base 3.0.4 + pmpi_group_free_@Base 3.0.4 + pmpi_group_free__@Base 3.0.4 + pmpi_group_incl@Base 3.0.4 + pmpi_group_incl_@Base 3.0.4 + pmpi_group_incl__@Base 3.0.4 + pmpi_group_intersection@Base 3.0.4 + pmpi_group_intersection_@Base 3.0.4 + pmpi_group_intersection__@Base 3.0.4 + pmpi_group_range_excl@Base 3.0.4 + pmpi_group_range_excl_@Base 3.0.4 + pmpi_group_range_excl__@Base 3.0.4 + pmpi_group_range_incl@Base 3.0.4 + pmpi_group_range_incl_@Base 3.0.4 + pmpi_group_range_incl__@Base 3.0.4 + pmpi_group_rank@Base 3.0.4 + pmpi_group_rank_@Base 3.0.4 + pmpi_group_rank__@Base 3.0.4 + pmpi_group_size@Base 3.0.4 + pmpi_group_size_@Base 3.0.4 + pmpi_group_size__@Base 3.0.4 + pmpi_group_translate_ranks@Base 3.0.4 + pmpi_group_translate_ranks_@Base 3.0.4 + pmpi_group_translate_ranks__@Base 3.0.4 + pmpi_group_union@Base 3.0.4 + pmpi_group_union_@Base 3.0.4 + pmpi_group_union__@Base 3.0.4 + pmpi_iallgather@Base 3.0.4 + pmpi_iallgather_@Base 3.0.4 + pmpi_iallgather__@Base 3.0.4 + pmpi_iallgatherv@Base 3.0.4 + pmpi_iallgatherv_@Base 3.0.4 + pmpi_iallgatherv__@Base 3.0.4 + pmpi_iallreduce@Base 3.0.4 + pmpi_iallreduce_@Base 3.0.4 + pmpi_iallreduce__@Base 3.0.4 + pmpi_ialltoall@Base 3.0.4 + pmpi_ialltoall_@Base 3.0.4 + pmpi_ialltoall__@Base 3.0.4 + pmpi_ialltoallv@Base 3.0.4 + pmpi_ialltoallv_@Base 3.0.4 + pmpi_ialltoallv__@Base 3.0.4 + pmpi_ialltoallw@Base 3.0.4 + pmpi_ialltoallw_@Base 3.0.4 + pmpi_ialltoallw__@Base 3.0.4 + pmpi_ibarrier@Base 3.0.4 + pmpi_ibarrier_@Base 3.0.4 + pmpi_ibarrier__@Base 3.0.4 + pmpi_ibcast@Base 3.0.4 + pmpi_ibcast_@Base 3.0.4 + pmpi_ibcast__@Base 3.0.4 + pmpi_ibsend@Base 3.0.4 + pmpi_ibsend_@Base 3.0.4 + pmpi_ibsend__@Base 3.0.4 + pmpi_iexscan@Base 3.0.4 + pmpi_iexscan_@Base 3.0.4 + pmpi_iexscan__@Base 3.0.4 + pmpi_igather@Base 3.0.4 + pmpi_igather_@Base 3.0.4 + pmpi_igather__@Base 3.0.4 + pmpi_igatherv@Base 3.0.4 + pmpi_igatherv_@Base 3.0.4 + pmpi_igatherv__@Base 3.0.4 + pmpi_improbe@Base 3.0.4 + pmpi_improbe_@Base 3.0.4 + pmpi_improbe__@Base 3.0.4 + pmpi_imrecv@Base 3.0.4 + pmpi_imrecv_@Base 3.0.4 + pmpi_imrecv__@Base 3.0.4 + pmpi_ineighbor_allgather@Base 3.0.4 + pmpi_ineighbor_allgather_@Base 3.0.4 + pmpi_ineighbor_allgather__@Base 3.0.4 + pmpi_ineighbor_allgatherv@Base 3.0.4 + pmpi_ineighbor_allgatherv_@Base 3.0.4 + pmpi_ineighbor_allgatherv__@Base 3.0.4 + pmpi_ineighbor_alltoall@Base 3.0.4 + pmpi_ineighbor_alltoall_@Base 3.0.4 + pmpi_ineighbor_alltoall__@Base 3.0.4 + pmpi_ineighbor_alltoallv@Base 3.0.4 + pmpi_ineighbor_alltoallv_@Base 3.0.4 + pmpi_ineighbor_alltoallv__@Base 3.0.4 + pmpi_ineighbor_alltoallw@Base 3.0.4 + pmpi_ineighbor_alltoallw_@Base 3.0.4 + pmpi_ineighbor_alltoallw__@Base 3.0.4 + pmpi_info_create@Base 3.0.4 + pmpi_info_create_@Base 3.0.4 + pmpi_info_create__@Base 3.0.4 + pmpi_info_delete@Base 3.0.4 + pmpi_info_delete_@Base 3.0.4 + pmpi_info_delete__@Base 3.0.4 + pmpi_info_dup@Base 3.0.4 + pmpi_info_dup_@Base 3.0.4 + pmpi_info_dup__@Base 3.0.4 + pmpi_info_free@Base 3.0.4 + pmpi_info_free_@Base 3.0.4 + pmpi_info_free__@Base 3.0.4 + pmpi_info_get@Base 3.0.4 + pmpi_info_get_@Base 3.0.4 + pmpi_info_get__@Base 3.0.4 + pmpi_info_get_nkeys@Base 3.0.4 + pmpi_info_get_nkeys_@Base 3.0.4 + pmpi_info_get_nkeys__@Base 3.0.4 + pmpi_info_get_nthkey@Base 3.0.4 + pmpi_info_get_nthkey_@Base 3.0.4 + pmpi_info_get_nthkey__@Base 3.0.4 + pmpi_info_get_valuelen@Base 3.0.4 + pmpi_info_get_valuelen_@Base 3.0.4 + pmpi_info_get_valuelen__@Base 3.0.4 + pmpi_info_set@Base 3.0.4 + pmpi_info_set_@Base 3.0.4 + pmpi_info_set__@Base 3.0.4 + pmpi_init@Base 3.0.4 + pmpi_init_@Base 3.0.4 + pmpi_init__@Base 3.0.4 + pmpi_init_thread@Base 3.0.4 + pmpi_init_thread_@Base 3.0.4 + pmpi_init_thread__@Base 3.0.4 + pmpi_initialized@Base 3.0.4 + pmpi_initialized_@Base 3.0.4 + pmpi_initialized__@Base 3.0.4 + pmpi_intercomm_create@Base 3.0.4 + pmpi_intercomm_create_@Base 3.0.4 + pmpi_intercomm_create__@Base 3.0.4 + pmpi_intercomm_merge@Base 3.0.4 + pmpi_intercomm_merge_@Base 3.0.4 + pmpi_intercomm_merge__@Base 3.0.4 + pmpi_iprobe@Base 3.0.4 + pmpi_iprobe_@Base 3.0.4 + pmpi_iprobe__@Base 3.0.4 + pmpi_irecv@Base 3.0.4 + pmpi_irecv_@Base 3.0.4 + pmpi_irecv__@Base 3.0.4 + pmpi_ireduce@Base 3.0.4 + pmpi_ireduce_@Base 3.0.4 + pmpi_ireduce__@Base 3.0.4 + pmpi_ireduce_scatter@Base 3.0.4 + pmpi_ireduce_scatter_@Base 3.0.4 + pmpi_ireduce_scatter__@Base 3.0.4 + pmpi_ireduce_scatter_block@Base 3.0.4 + pmpi_ireduce_scatter_block_@Base 3.0.4 + pmpi_ireduce_scatter_block__@Base 3.0.4 + pmpi_irsend@Base 3.0.4 + pmpi_irsend_@Base 3.0.4 + pmpi_irsend__@Base 3.0.4 + pmpi_is_thread_main@Base 3.0.4 + pmpi_is_thread_main_@Base 3.0.4 + pmpi_is_thread_main__@Base 3.0.4 + pmpi_iscan@Base 3.0.4 + pmpi_iscan_@Base 3.0.4 + pmpi_iscan__@Base 3.0.4 + pmpi_iscatter@Base 3.0.4 + pmpi_iscatter_@Base 3.0.4 + pmpi_iscatter__@Base 3.0.4 + pmpi_iscatterv@Base 3.0.4 + pmpi_iscatterv_@Base 3.0.4 + pmpi_iscatterv__@Base 3.0.4 + pmpi_isend@Base 3.0.4 + pmpi_isend_@Base 3.0.4 + pmpi_isend__@Base 3.0.4 + pmpi_issend@Base 3.0.4 + pmpi_issend_@Base 3.0.4 + pmpi_issend__@Base 3.0.4 + pmpi_keyval_create@Base 3.0.4 + pmpi_keyval_create_@Base 3.0.4 + pmpi_keyval_create__@Base 3.0.4 + pmpi_keyval_free@Base 3.0.4 + pmpi_keyval_free_@Base 3.0.4 + pmpi_keyval_free__@Base 3.0.4 + pmpi_lookup_name@Base 3.0.4 + pmpi_lookup_name_@Base 3.0.4 + pmpi_lookup_name__@Base 3.0.4 + pmpi_mprobe@Base 3.0.4 + pmpi_mprobe_@Base 3.0.4 + pmpi_mprobe__@Base 3.0.4 + pmpi_mrecv@Base 3.0.4 + pmpi_mrecv_@Base 3.0.4 + pmpi_mrecv__@Base 3.0.4 + pmpi_neighbor_allgather@Base 3.0.4 + pmpi_neighbor_allgather_@Base 3.0.4 + pmpi_neighbor_allgather__@Base 3.0.4 + pmpi_neighbor_allgatherv@Base 3.0.4 + pmpi_neighbor_allgatherv_@Base 3.0.4 + pmpi_neighbor_allgatherv__@Base 3.0.4 + pmpi_neighbor_alltoall@Base 3.0.4 + pmpi_neighbor_alltoall_@Base 3.0.4 + pmpi_neighbor_alltoall__@Base 3.0.4 + pmpi_neighbor_alltoallv@Base 3.0.4 + pmpi_neighbor_alltoallv_@Base 3.0.4 + pmpi_neighbor_alltoallv__@Base 3.0.4 + pmpi_neighbor_alltoallw@Base 3.0.4 + pmpi_neighbor_alltoallw_@Base 3.0.4 + pmpi_neighbor_alltoallw__@Base 3.0.4 + pmpi_null_copy_fn@Base 3.0.4 + pmpi_null_copy_fn_@Base 3.0.4 + pmpi_null_copy_fn__@Base 3.0.4 + pmpi_null_delete_fn@Base 3.0.4 + pmpi_null_delete_fn_@Base 3.0.4 + pmpi_null_delete_fn__@Base 3.0.4 + pmpi_op_commutative@Base 3.0.4 + pmpi_op_commutative_@Base 3.0.4 + pmpi_op_commutative__@Base 3.0.4 + pmpi_op_create@Base 3.0.4 + pmpi_op_create_@Base 3.0.4 + pmpi_op_create__@Base 3.0.4 + pmpi_op_free@Base 3.0.4 + pmpi_op_free_@Base 3.0.4 + pmpi_op_free__@Base 3.0.4 + pmpi_open_port@Base 3.0.4 + pmpi_open_port_@Base 3.0.4 + pmpi_open_port__@Base 3.0.4 + pmpi_pack@Base 3.0.4 + pmpi_pack_@Base 3.0.4 + pmpi_pack__@Base 3.0.4 + pmpi_pack_external@Base 3.0.4 + pmpi_pack_external_@Base 3.0.4 + pmpi_pack_external__@Base 3.0.4 + pmpi_pack_external_size@Base 3.0.4 + pmpi_pack_external_size_@Base 3.0.4 + pmpi_pack_external_size__@Base 3.0.4 + pmpi_pack_size@Base 3.0.4 + pmpi_pack_size_@Base 3.0.4 + pmpi_pack_size__@Base 3.0.4 + pmpi_pcontrol@Base 3.0.4 + pmpi_pcontrol_@Base 3.0.4 + pmpi_pcontrol__@Base 3.0.4 + pmpi_probe@Base 3.0.4 + pmpi_probe_@Base 3.0.4 + pmpi_probe__@Base 3.0.4 + pmpi_publish_name@Base 3.0.4 + pmpi_publish_name_@Base 3.0.4 + pmpi_publish_name__@Base 3.0.4 + pmpi_put@Base 3.0.4 + pmpi_put_@Base 3.0.4 + pmpi_put__@Base 3.0.4 + pmpi_query_thread@Base 3.0.4 + pmpi_query_thread_@Base 3.0.4 + pmpi_query_thread__@Base 3.0.4 + pmpi_raccumulate@Base 3.0.4 + pmpi_raccumulate_@Base 3.0.4 + pmpi_raccumulate__@Base 3.0.4 + pmpi_recv@Base 3.0.4 + pmpi_recv_@Base 3.0.4 + pmpi_recv__@Base 3.0.4 + pmpi_recv_init@Base 3.0.4 + pmpi_recv_init_@Base 3.0.4 + pmpi_recv_init__@Base 3.0.4 + pmpi_reduce@Base 3.0.4 + pmpi_reduce_@Base 3.0.4 + pmpi_reduce__@Base 3.0.4 + pmpi_reduce_local@Base 3.0.4 + pmpi_reduce_local_@Base 3.0.4 + pmpi_reduce_local__@Base 3.0.4 + pmpi_reduce_scatter@Base 3.0.4 + pmpi_reduce_scatter_@Base 3.0.4 + pmpi_reduce_scatter__@Base 3.0.4 + pmpi_reduce_scatter_block@Base 3.0.4 + pmpi_reduce_scatter_block_@Base 3.0.4 + pmpi_reduce_scatter_block__@Base 3.0.4 + pmpi_register_datarep@Base 3.0.4 + pmpi_register_datarep_@Base 3.0.4 + pmpi_register_datarep__@Base 3.0.4 + pmpi_request_free@Base 3.0.4 + pmpi_request_free_@Base 3.0.4 + pmpi_request_free__@Base 3.0.4 + pmpi_request_get_status@Base 3.0.4 + pmpi_request_get_status_@Base 3.0.4 + pmpi_request_get_status__@Base 3.0.4 + pmpi_rget@Base 3.0.4 + pmpi_rget_@Base 3.0.4 + pmpi_rget__@Base 3.0.4 + pmpi_rget_accumulate@Base 3.0.4 + pmpi_rget_accumulate_@Base 3.0.4 + pmpi_rget_accumulate__@Base 3.0.4 + pmpi_rput@Base 3.0.4 + pmpi_rput_@Base 3.0.4 + pmpi_rput__@Base 3.0.4 + pmpi_rsend@Base 3.0.4 + pmpi_rsend_@Base 3.0.4 + pmpi_rsend__@Base 3.0.4 + pmpi_rsend_init@Base 3.0.4 + pmpi_rsend_init_@Base 3.0.4 + pmpi_rsend_init__@Base 3.0.4 + pmpi_scan@Base 3.0.4 + pmpi_scan_@Base 3.0.4 + pmpi_scan__@Base 3.0.4 + pmpi_scatter@Base 3.0.4 + pmpi_scatter_@Base 3.0.4 + pmpi_scatter__@Base 3.0.4 + pmpi_scatterv@Base 3.0.4 + pmpi_scatterv_@Base 3.0.4 + pmpi_scatterv__@Base 3.0.4 + pmpi_send@Base 3.0.4 + pmpi_send_@Base 3.0.4 + pmpi_send__@Base 3.0.4 + pmpi_send_init@Base 3.0.4 + pmpi_send_init_@Base 3.0.4 + pmpi_send_init__@Base 3.0.4 + pmpi_sendrecv@Base 3.0.4 + pmpi_sendrecv_@Base 3.0.4 + pmpi_sendrecv__@Base 3.0.4 + pmpi_sendrecv_replace@Base 3.0.4 + pmpi_sendrecv_replace_@Base 3.0.4 + pmpi_sendrecv_replace__@Base 3.0.4 + pmpi_ssend@Base 3.0.4 + pmpi_ssend_@Base 3.0.4 + pmpi_ssend__@Base 3.0.4 + pmpi_ssend_init@Base 3.0.4 + pmpi_ssend_init_@Base 3.0.4 + pmpi_ssend_init__@Base 3.0.4 + pmpi_start@Base 3.0.4 + pmpi_start_@Base 3.0.4 + pmpi_start__@Base 3.0.4 + pmpi_startall@Base 3.0.4 + pmpi_startall_@Base 3.0.4 + pmpi_startall__@Base 3.0.4 + pmpi_status_set_cancelled@Base 3.0.4 + pmpi_status_set_cancelled_@Base 3.0.4 + pmpi_status_set_cancelled__@Base 3.0.4 + pmpi_status_set_elements@Base 3.0.4 + pmpi_status_set_elements_@Base 3.0.4 + pmpi_status_set_elements__@Base 3.0.4 + pmpi_status_set_elements_x@Base 3.0.4 + pmpi_status_set_elements_x_@Base 3.0.4 + pmpi_status_set_elements_x__@Base 3.0.4 + pmpi_test@Base 3.0.4 + pmpi_test_@Base 3.0.4 + pmpi_test__@Base 3.0.4 + pmpi_test_cancelled@Base 3.0.4 + pmpi_test_cancelled_@Base 3.0.4 + pmpi_test_cancelled__@Base 3.0.4 + pmpi_testall@Base 3.0.4 + pmpi_testall_@Base 3.0.4 + pmpi_testall__@Base 3.0.4 + pmpi_testany@Base 3.0.4 + pmpi_testany_@Base 3.0.4 + pmpi_testany__@Base 3.0.4 + pmpi_testsome@Base 3.0.4 + pmpi_testsome_@Base 3.0.4 + pmpi_testsome__@Base 3.0.4 + pmpi_topo_test@Base 3.0.4 + pmpi_topo_test_@Base 3.0.4 + pmpi_topo_test__@Base 3.0.4 + pmpi_type_commit@Base 3.0.4 + pmpi_type_commit_@Base 3.0.4 + pmpi_type_commit__@Base 3.0.4 + pmpi_type_contiguous@Base 3.0.4 + pmpi_type_contiguous_@Base 3.0.4 + pmpi_type_contiguous__@Base 3.0.4 + pmpi_type_create_darray@Base 3.0.4 + pmpi_type_create_darray_@Base 3.0.4 + pmpi_type_create_darray__@Base 3.0.4 + pmpi_type_create_f90_complex@Base 3.0.4 + pmpi_type_create_f90_complex_@Base 3.0.4 + pmpi_type_create_f90_complex__@Base 3.0.4 + pmpi_type_create_f90_integer@Base 3.0.4 + pmpi_type_create_f90_integer_@Base 3.0.4 + pmpi_type_create_f90_integer__@Base 3.0.4 + pmpi_type_create_f90_real@Base 3.0.4 + pmpi_type_create_f90_real_@Base 3.0.4 + pmpi_type_create_f90_real__@Base 3.0.4 + pmpi_type_create_hindexed@Base 3.0.4 + pmpi_type_create_hindexed_@Base 3.0.4 + pmpi_type_create_hindexed__@Base 3.0.4 + pmpi_type_create_hindexed_block@Base 3.0.4 + pmpi_type_create_hindexed_block_@Base 3.0.4 + pmpi_type_create_hindexed_block__@Base 3.0.4 + pmpi_type_create_hvector@Base 3.0.4 + pmpi_type_create_hvector_@Base 3.0.4 + pmpi_type_create_hvector__@Base 3.0.4 + pmpi_type_create_indexed_block@Base 3.0.4 + pmpi_type_create_indexed_block_@Base 3.0.4 + pmpi_type_create_indexed_block__@Base 3.0.4 + pmpi_type_create_keyval@Base 3.0.4 + pmpi_type_create_keyval_@Base 3.0.4 + pmpi_type_create_keyval__@Base 3.0.4 + pmpi_type_create_resized@Base 3.0.4 + pmpi_type_create_resized_@Base 3.0.4 + pmpi_type_create_resized__@Base 3.0.4 + pmpi_type_create_struct@Base 3.0.4 + pmpi_type_create_struct_@Base 3.0.4 + pmpi_type_create_struct__@Base 3.0.4 + pmpi_type_create_subarray@Base 3.0.4 + pmpi_type_create_subarray_@Base 3.0.4 + pmpi_type_create_subarray__@Base 3.0.4 + pmpi_type_delete_attr@Base 3.0.4 + pmpi_type_delete_attr_@Base 3.0.4 + pmpi_type_delete_attr__@Base 3.0.4 + pmpi_type_dup@Base 3.0.4 + pmpi_type_dup_@Base 3.0.4 + pmpi_type_dup__@Base 3.0.4 + pmpi_type_dup_fn@Base 3.0.4 + pmpi_type_dup_fn_@Base 3.0.4 + pmpi_type_dup_fn__@Base 3.0.4 + pmpi_type_extent@Base 3.0.4 + pmpi_type_extent_@Base 3.0.4 + pmpi_type_extent__@Base 3.0.4 + pmpi_type_free@Base 3.0.4 + pmpi_type_free_@Base 3.0.4 + pmpi_type_free__@Base 3.0.4 + pmpi_type_free_keyval@Base 3.0.4 + pmpi_type_free_keyval_@Base 3.0.4 + pmpi_type_free_keyval__@Base 3.0.4 + pmpi_type_get_attr@Base 3.0.4 + pmpi_type_get_attr_@Base 3.0.4 + pmpi_type_get_attr__@Base 3.0.4 + pmpi_type_get_contents@Base 3.0.4 + pmpi_type_get_contents_@Base 3.0.4 + pmpi_type_get_contents__@Base 3.0.4 + pmpi_type_get_envelope@Base 3.0.4 + pmpi_type_get_envelope_@Base 3.0.4 + pmpi_type_get_envelope__@Base 3.0.4 + pmpi_type_get_extent@Base 3.0.4 + pmpi_type_get_extent_@Base 3.0.4 + pmpi_type_get_extent__@Base 3.0.4 + pmpi_type_get_extent_x@Base 3.0.4 + pmpi_type_get_extent_x_@Base 3.0.4 + pmpi_type_get_extent_x__@Base 3.0.4 + pmpi_type_get_name@Base 3.0.4 + pmpi_type_get_name_@Base 3.0.4 + pmpi_type_get_name__@Base 3.0.4 + pmpi_type_get_true_extent@Base 3.0.4 + pmpi_type_get_true_extent_@Base 3.0.4 + pmpi_type_get_true_extent__@Base 3.0.4 + pmpi_type_get_true_extent_x@Base 3.0.4 + pmpi_type_get_true_extent_x_@Base 3.0.4 + pmpi_type_get_true_extent_x__@Base 3.0.4 + pmpi_type_hindexed@Base 3.0.4 + pmpi_type_hindexed_@Base 3.0.4 + pmpi_type_hindexed__@Base 3.0.4 + pmpi_type_hvector@Base 3.0.4 + pmpi_type_hvector_@Base 3.0.4 + pmpi_type_hvector__@Base 3.0.4 + pmpi_type_indexed@Base 3.0.4 + pmpi_type_indexed_@Base 3.0.4 + pmpi_type_indexed__@Base 3.0.4 + pmpi_type_lb@Base 3.0.4 + pmpi_type_lb_@Base 3.0.4 + pmpi_type_lb__@Base 3.0.4 + pmpi_type_match_size@Base 3.0.4 + pmpi_type_match_size_@Base 3.0.4 + pmpi_type_match_size__@Base 3.0.4 + pmpi_type_null_copy_fn@Base 3.0.4 + pmpi_type_null_copy_fn_@Base 3.0.4 + pmpi_type_null_copy_fn__@Base 3.0.4 + pmpi_type_null_delete_fn@Base 3.0.4 + pmpi_type_null_delete_fn_@Base 3.0.4 + pmpi_type_null_delete_fn__@Base 3.0.4 + pmpi_type_set_attr@Base 3.0.4 + pmpi_type_set_attr_@Base 3.0.4 + pmpi_type_set_attr__@Base 3.0.4 + pmpi_type_set_name@Base 3.0.4 + pmpi_type_set_name_@Base 3.0.4 + pmpi_type_set_name__@Base 3.0.4 + pmpi_type_size@Base 3.0.4 + pmpi_type_size_@Base 3.0.4 + pmpi_type_size__@Base 3.0.4 + pmpi_type_size_x@Base 3.0.4 + pmpi_type_size_x_@Base 3.0.4 + pmpi_type_size_x__@Base 3.0.4 + pmpi_type_struct@Base 3.0.4 + pmpi_type_struct_@Base 3.0.4 + pmpi_type_struct__@Base 3.0.4 + pmpi_type_ub@Base 3.0.4 + pmpi_type_ub_@Base 3.0.4 + pmpi_type_ub__@Base 3.0.4 + pmpi_type_vector@Base 3.0.4 + pmpi_type_vector_@Base 3.0.4 + pmpi_type_vector__@Base 3.0.4 + pmpi_unpack@Base 3.0.4 + pmpi_unpack_@Base 3.0.4 + pmpi_unpack__@Base 3.0.4 + pmpi_unpack_external@Base 3.0.4 + pmpi_unpack_external_@Base 3.0.4 + pmpi_unpack_external__@Base 3.0.4 + pmpi_unpublish_name@Base 3.0.4 + pmpi_unpublish_name_@Base 3.0.4 + pmpi_unpublish_name__@Base 3.0.4 + pmpi_wait@Base 3.0.4 + pmpi_wait_@Base 3.0.4 + pmpi_wait__@Base 3.0.4 + pmpi_waitall@Base 3.0.4 + pmpi_waitall_@Base 3.0.4 + pmpi_waitall__@Base 3.0.4 + pmpi_waitany@Base 3.0.4 + pmpi_waitany_@Base 3.0.4 + pmpi_waitany__@Base 3.0.4 + pmpi_waitsome@Base 3.0.4 + pmpi_waitsome_@Base 3.0.4 + pmpi_waitsome__@Base 3.0.4 + pmpi_win_allocate@Base 3.0.4 + pmpi_win_allocate_@Base 3.0.4 + pmpi_win_allocate__@Base 3.0.4 + pmpi_win_allocate_shared@Base 3.0.4 + pmpi_win_allocate_shared_@Base 3.0.4 + pmpi_win_allocate_shared__@Base 3.0.4 + pmpi_win_attach@Base 3.0.4 + pmpi_win_attach_@Base 3.0.4 + pmpi_win_attach__@Base 3.0.4 + pmpi_win_call_errhandler@Base 3.0.4 + pmpi_win_call_errhandler_@Base 3.0.4 + pmpi_win_call_errhandler__@Base 3.0.4 + pmpi_win_complete@Base 3.0.4 + pmpi_win_complete_@Base 3.0.4 + pmpi_win_complete__@Base 3.0.4 + pmpi_win_create@Base 3.0.4 + pmpi_win_create_@Base 3.0.4 + pmpi_win_create__@Base 3.0.4 + pmpi_win_create_dynamic@Base 3.0.4 + pmpi_win_create_dynamic_@Base 3.0.4 + pmpi_win_create_dynamic__@Base 3.0.4 + pmpi_win_create_errhandler@Base 3.0.4 + pmpi_win_create_errhandler_@Base 3.0.4 + pmpi_win_create_errhandler__@Base 3.0.4 + pmpi_win_create_keyval@Base 3.0.4 + pmpi_win_create_keyval_@Base 3.0.4 + pmpi_win_create_keyval__@Base 3.0.4 + pmpi_win_delete_attr@Base 3.0.4 + pmpi_win_delete_attr_@Base 3.0.4 + pmpi_win_delete_attr__@Base 3.0.4 + pmpi_win_detach@Base 3.0.4 + pmpi_win_detach_@Base 3.0.4 + pmpi_win_detach__@Base 3.0.4 + pmpi_win_dup_fn@Base 3.0.4 + pmpi_win_dup_fn_@Base 3.0.4 + pmpi_win_dup_fn__@Base 3.0.4 + pmpi_win_fence@Base 3.0.4 + pmpi_win_fence_@Base 3.0.4 + pmpi_win_fence__@Base 3.0.4 + pmpi_win_flush@Base 3.0.4 + pmpi_win_flush_@Base 3.0.4 + pmpi_win_flush__@Base 3.0.4 + pmpi_win_flush_all@Base 3.0.4 + pmpi_win_flush_all_@Base 3.0.4 + pmpi_win_flush_all__@Base 3.0.4 + pmpi_win_flush_local@Base 3.0.4 + pmpi_win_flush_local_@Base 3.0.4 + pmpi_win_flush_local__@Base 3.0.4 + pmpi_win_flush_local_all@Base 3.0.4 + pmpi_win_flush_local_all_@Base 3.0.4 + pmpi_win_flush_local_all__@Base 3.0.4 + pmpi_win_free@Base 3.0.4 + pmpi_win_free_@Base 3.0.4 + pmpi_win_free__@Base 3.0.4 + pmpi_win_free_keyval@Base 3.0.4 + pmpi_win_free_keyval_@Base 3.0.4 + pmpi_win_free_keyval__@Base 3.0.4 + pmpi_win_get_attr@Base 3.0.4 + pmpi_win_get_attr_@Base 3.0.4 + pmpi_win_get_attr__@Base 3.0.4 + pmpi_win_get_errhandler@Base 3.0.4 + pmpi_win_get_errhandler_@Base 3.0.4 + pmpi_win_get_errhandler__@Base 3.0.4 + pmpi_win_get_group@Base 3.0.4 + pmpi_win_get_group_@Base 3.0.4 + pmpi_win_get_group__@Base 3.0.4 + pmpi_win_get_info@Base 3.0.4 + pmpi_win_get_info_@Base 3.0.4 + pmpi_win_get_info__@Base 3.0.4 + pmpi_win_get_name@Base 3.0.4 + pmpi_win_get_name_@Base 3.0.4 + pmpi_win_get_name__@Base 3.0.4 + pmpi_win_lock@Base 3.0.4 + pmpi_win_lock_@Base 3.0.4 + pmpi_win_lock__@Base 3.0.4 + pmpi_win_lock_all@Base 3.0.4 + pmpi_win_lock_all_@Base 3.0.4 + pmpi_win_lock_all__@Base 3.0.4 + pmpi_win_null_copy_fn@Base 3.0.4 + pmpi_win_null_copy_fn_@Base 3.0.4 + pmpi_win_null_copy_fn__@Base 3.0.4 + pmpi_win_null_delete_fn@Base 3.0.4 + pmpi_win_null_delete_fn_@Base 3.0.4 + pmpi_win_null_delete_fn__@Base 3.0.4 + pmpi_win_post@Base 3.0.4 + pmpi_win_post_@Base 3.0.4 + pmpi_win_post__@Base 3.0.4 + pmpi_win_set_attr@Base 3.0.4 + pmpi_win_set_attr_@Base 3.0.4 + pmpi_win_set_attr__@Base 3.0.4 + pmpi_win_set_errhandler@Base 3.0.4 + pmpi_win_set_errhandler_@Base 3.0.4 + pmpi_win_set_errhandler__@Base 3.0.4 + pmpi_win_set_info@Base 3.0.4 + pmpi_win_set_info_@Base 3.0.4 + pmpi_win_set_info__@Base 3.0.4 + pmpi_win_set_name@Base 3.0.4 + pmpi_win_set_name_@Base 3.0.4 + pmpi_win_set_name__@Base 3.0.4 + pmpi_win_shared_query@Base 3.0.4 + pmpi_win_shared_query_@Base 3.0.4 + pmpi_win_shared_query__@Base 3.0.4 + pmpi_win_start@Base 3.0.4 + pmpi_win_start_@Base 3.0.4 + pmpi_win_start__@Base 3.0.4 + pmpi_win_sync@Base 3.0.4 + pmpi_win_sync_@Base 3.0.4 + pmpi_win_sync__@Base 3.0.4 + pmpi_win_test@Base 3.0.4 + pmpi_win_test_@Base 3.0.4 + pmpi_win_test__@Base 3.0.4 + pmpi_win_unlock@Base 3.0.4 + pmpi_win_unlock_@Base 3.0.4 + pmpi_win_unlock__@Base 3.0.4 + pmpi_win_unlock_all@Base 3.0.4 + pmpi_win_unlock_all_@Base 3.0.4 + pmpi_win_unlock_all__@Base 3.0.4 + pmpi_win_wait@Base 3.0.4 + pmpi_win_wait_@Base 3.0.4 + pmpi_win_wait__@Base 3.0.4 + pmpi_wtick@Base 3.0.4 + pmpi_wtick_@Base 3.0.4 + pmpi_wtick__@Base 3.0.4 + pmpi_wtime@Base 3.0.4 + pmpi_wtime_@Base 3.0.4 + pmpi_wtime__@Base 3.0.4 + pmpix_comm_group_failed@Base 3.0.4 + pmpix_comm_group_failed_@Base 3.0.4 + pmpix_comm_group_failed__@Base 3.0.4 + pmpix_comm_reenable_anysource@Base 3.0.4 + pmpix_comm_reenable_anysource_@Base 3.0.4 + pmpix_comm_reenable_anysource__@Base 3.0.4 + pmpix_comm_remote_group_failed@Base 3.0.4 + pmpix_comm_remote_group_failed_@Base 3.0.4 + pmpix_comm_remote_group_failed__@Base 3.0.4 +libmpichcxx.so.10 libmpich10 #MINVER# + MPIR_Call_datarep_extent_fn@Base 3.0.4 + MPIR_Call_datarep_read_fn@Base 3.0.4 + MPIR_Call_datarep_write_fn@Base 3.0.4 + MPIR_Call_errhandler_function@Base 3.0.4 + MPIR_Call_op_fn@Base 3.0.4 + MPIR_Grequest_call_cancel_fn@Base 3.0.4 + MPIR_Grequest_call_free_fn@Base 3.0.4 + MPIR_Grequest_call_query_fn@Base 3.0.4 + _ZN3MPI10ANY_SOURCEE@Base 3.0.4 + _ZN3MPI10ARGVS_NULLE@Base 3.0.4 + _ZN3MPI10COMM_WORLDE@Base 3.0.4 + _ZN3MPI10Close_portEPKc@Base 3.0.4 + _ZN3MPI10DOUBLE_INTE@Base 3.0.4 + _ZN3MPI10ERR_ACCESSE@Base 3.0.4 + _ZN3MPI10ERR_ASSERTE@Base 3.0.4 + _ZN3MPI10ERR_BUFFERE@Base 3.0.4 + _ZN3MPI10ERR_INTERNE@Base 3.0.4 + _ZN3MPI10ERR_KEYVALE@Base 3.0.4 + _ZN3MPI10ERR_NO_MEME@Base 3.0.4 + _ZN3MPI10Errhandler4FreeEv@Base 3.0.4 + _ZN3MPI10ErrhandlerD0Ev@Base 3.0.4 + _ZN3MPI10ErrhandlerD1Ev@Base 3.0.4 + _ZN3MPI10ErrhandlerD2Ev@Base 3.0.4 + _ZN3MPI10GROUP_NULLE@Base 3.0.4 + _ZN3MPI10MODE_NOPUTE@Base 3.0.4 + _ZN3MPI10TWOINTEGERE@Base 3.0.4 + _ZN3MPI11ERR_PENDINGE@Base 3.0.4 + _ZN3MPI11ERR_REQUESTE@Base 3.0.4 + _ZN3MPI11ERR_SERVICEE@Base 3.0.4 + _ZN3MPI11ERR_UNKNOWNE@Base 3.0.4 + _ZN3MPI11GROUP_EMPTYE@Base 3.0.4 + _ZN3MPI11Get_addressEPKv@Base 3.0.4 + _ZN3MPI11Get_versionERiS0_@Base 3.0.4 + _ZN3MPI11Init_threadERiRPPci@Base 3.0.4 + _ZN3MPI11Init_threadEi@Base 3.0.4 + _ZN3MPI11LOCK_SHAREDE@Base 3.0.4 + _ZN3MPI11LONG_DOUBLEE@Base 3.0.4 + _ZN3MPI11Lookup_nameEPKcRKNS_4InfoEPc@Base 3.0.4 + _ZN3MPI11MODE_APPENDE@Base 3.0.4 + _ZN3MPI11MODE_CREATEE@Base 3.0.4 + _ZN3MPI11MODE_RDONLYE@Base 3.0.4 + _ZN3MPI11MODE_WRONLYE@Base 3.0.4 + _ZN3MPI11SIGNED_CHARE@Base 3.0.4 + _ZN3MPI12COMBINER_DUPE@Base 3.0.4 + _ZN3MPI12Compute_dimsEiiPi@Base 3.0.4 + _ZN3MPI12ERR_BAD_FILEE@Base 3.0.4 + _ZN3MPI12ERR_INFO_KEYE@Base 3.0.4 + _ZN3MPI12ERR_LASTCODEE@Base 3.0.4 + _ZN3MPI12ERR_LOCKTYPEE@Base 3.0.4 + _ZN3MPI12ERR_NOT_SAMEE@Base 3.0.4 + _ZN3MPI12ERR_NO_SPACEE@Base 3.0.4 + _ZN3MPI12ERR_RMA_SYNCE@Base 3.0.4 + _ZN3MPI12ERR_TOPOLOGYE@Base 3.0.4 + _ZN3MPI12ERR_TRUNCATEE@Base 3.0.4 + _ZN3MPI12Is_finalizedEv@Base 3.0.4 + _ZN3MPI12LASTUSEDCODEE@Base 3.0.4 + _ZN3MPI12MAX_INFO_KEYE@Base 3.0.4 + _ZN3MPI12MAX_INFO_VALE@Base 3.0.4 + _ZN3MPI12MODE_NOCHECKE@Base 3.0.4 + _ZN3MPI12MODE_NOSTOREE@Base 3.0.4 + _ZN3MPI12Publish_nameEPKcRKNS_4InfoES1_@Base 3.0.4 + _ZN3MPI12Query_threadEv@Base 3.0.4 + _ZN3MPI12REQUEST_NULLE@Base 3.0.4 + _ZN3MPI13Attach_bufferEPvi@Base 3.0.4 + _ZN3MPI13DATATYPE_NULLE@Base 3.0.4 + _ZN3MPI13Detach_bufferERPv@Base 3.0.4 + _ZN3MPI13ERRORS_RETURNE@Base 3.0.4 + _ZN3MPI13ERR_IN_STATUSE@Base 3.0.4 + _ZN3MPI13ERR_READ_ONLYE@Base 3.0.4 + _ZN3MPI13LONG_LONG_INTE@Base 3.0.4 + _ZN3MPI13MAX_PORT_NAMEE@Base 3.0.4 + _ZN3MPI13ORDER_FORTRANE@Base 3.0.4 + _ZN3MPI13THREAD_SINGLEE@Base 3.0.4 + _ZN3MPI13UNIVERSE_SIZEE@Base 3.0.4 + _ZN3MPI13UNSIGNED_CHARE@Base 3.0.4 + _ZN3MPI13UNSIGNED_LONGE@Base 3.0.4 + _ZN3MPI13WIN_DISP_UNITE@Base 3.0.4 + _ZN3MPI14Add_error_codeEi@Base 3.0.4 + _ZN3MPI14BSEND_OVERHEADE@Base 3.0.4 + _ZN3MPI14COMBINER_NAMEDE@Base 3.0.4 + _ZN3MPI14DOUBLE_COMPLEXE@Base 3.0.4 + _ZN3MPI14ERR_CONVERSIONE@Base 3.0.4 + _ZN3MPI14ERR_INFO_NOKEYE@Base 3.0.4 + _ZN3MPI14ERR_INFO_VALUEE@Base 3.0.4 + _ZN3MPI14Is_initializedEv@Base 3.0.4 + _ZN3MPI14Is_thread_mainEv@Base 3.0.4 + _ZN3MPI14KEYVAL_INVALIDE@Base 3.0.4 + _ZN3MPI14LOCK_EXCLUSIVEE@Base 3.0.4 + _ZN3MPI14MODE_NOPRECEDEE@Base 3.0.4 + _ZN3MPI14MODE_NOSUCCEEDE@Base 3.0.4 + _ZN3MPI14TYPECLASS_REALE@Base 3.0.4 + _ZN3MPI14UNSIGNED_SHORTE@Base 3.0.4 + _ZN3MPI14Unpublish_nameEPKcRKNS_4InfoES1_@Base 3.0.4 + _ZN3MPI15Add_error_classEv@Base 3.0.4 + _ZN3MPI15COMBINER_DARRAYE@Base 3.0.4 + _ZN3MPI15COMBINER_STRUCTE@Base 3.0.4 + _ZN3MPI15COMBINER_VECTORE@Base 3.0.4 + _ZN3MPI15DISTRIBUTE_NONEE@Base 3.0.4 + _ZN3MPI15ERRHANDLER_NULLE@Base 3.0.4 + _ZN3MPI15ERR_DUP_DATAREPE@Base 3.0.4 + _ZN3MPI15ERR_FILE_EXISTSE@Base 3.0.4 + _ZN3MPI15ERR_FILE_IN_USEE@Base 3.0.4 + _ZN3MPI15Get_error_classEi@Base 3.0.4 + _ZN3MPI15LONG_DOUBLE_INTE@Base 3.0.4 + _ZN3MPI15MAX_OBJECT_NAMEE@Base 3.0.4 + _ZN3MPI15MODE_SEQUENTIALE@Base 3.0.4 + _ZN3MPI15THREAD_FUNNELEDE@Base 3.0.4 + _ZN3MPI15THREAD_MULTIPLEE@Base 3.0.4 + _ZN3MPI15WTIME_IS_GLOBALE@Base 3.0.4 + _ZN3MPI16Add_error_stringEiPKc@Base 3.0.4 + _ZN3MPI16COMBINER_HVECTORE@Base 3.0.4 + _ZN3MPI16COMBINER_INDEXEDE@Base 3.0.4 + _ZN3MPI16COMBINER_RESIZEDE@Base 3.0.4 + _ZN3MPI16COMM_TYPE_SHAREDE@Base 3.0.4 + _ZN3MPI16DISTRIBUTE_BLOCKE@Base 3.0.4 + _ZN3MPI16DOUBLE_PRECISIONE@Base 3.0.4 + _ZN3MPI16ERRORS_ARE_FATALE@Base 3.0.4 + _ZN3MPI16ERR_NO_SUCH_FILEE@Base 3.0.4 + _ZN3MPI16ERR_RMA_CONFLICTE@Base 3.0.4 + _ZN3MPI16F_DOUBLE_COMPLEXE@Base 3.0.4 + _ZN3MPI16Get_error_stringEiPcRi@Base 3.0.4 + _ZN3MPI16MAX_ERROR_STRINGE@Base 3.0.4 + _ZN3MPI16MODE_UNIQUE_OPENE@Base 3.0.4 + _ZN3MPI16Register_datarepEPKcPFiPvRNS_8DatatypeEiS2_xS2_ES6_PFiRKS3_RlS2_ES2_@Base 3.0.4 + _ZN3MPI17COMBINER_F90_REALE@Base 3.0.4 + _ZN3MPI17COMBINER_HINDEXEDE@Base 3.0.4 + _ZN3MPI17COMBINER_SUBARRAYE@Base 3.0.4 + _ZN3MPI17DISTRIBUTE_CYCLICE@Base 3.0.4 + _ZN3MPI17THREAD_SERIALIZEDE@Base 3.0.4 + _ZN3MPI17TYPECLASS_COMPLEXE@Base 3.0.4 + _ZN3MPI17TYPECLASS_INTEGERE@Base 3.0.4 + _ZN3MPI18Get_processor_nameEPcRi@Base 3.0.4 + _ZN3MPI18MAX_DATAREP_STRINGE@Base 3.0.4 + _ZN3MPI18MAX_PROCESSOR_NAMEE@Base 3.0.4 + _ZN3MPI18UNSIGNED_LONG_LONGE@Base 3.0.4 + _ZN3MPI19COMBINER_CONTIGUOUSE@Base 3.0.4 + _ZN3MPI19LONG_DOUBLE_COMPLEXE@Base 3.0.4 + _ZN3MPI19TWODOUBLE_PRECISIONE@Base 3.0.4 + _ZN3MPI20COMBINER_F90_COMPLEXE@Base 3.0.4 + _ZN3MPI20COMBINER_F90_INTEGERE@Base 3.0.4 + _ZN3MPI20DISPLACEMENT_CURRENTE@Base 3.0.4 + _ZN3MPI20DISTRIBUTE_DFLT_DARGE@Base 3.0.4 + _ZN3MPI20MODE_DELETE_ON_CLOSEE@Base 3.0.4 + _ZN3MPI22COMBINER_INDEXED_BLOCKE@Base 3.0.4 + _ZN3MPI23COMBINER_HINDEXED_BLOCKE@Base 3.0.4 + _ZN3MPI23COMBINER_STRUCT_INTEGERE@Base 3.0.4 + _ZN3MPI23ERRORS_THROW_EXCEPTIONSE@Base 3.0.4 + _ZN3MPI23ERR_UNSUPPORTED_DATAREPE@Base 3.0.4 + _ZN3MPI23MPIR_Call_world_errhandEi@Base 3.0.4 + _ZN3MPI24COMBINER_HVECTOR_INTEGERE@Base 3.0.4 + _ZN3MPI25COMBINER_HINDEXED_INTEGERE@Base 3.0.4 + _ZN3MPI25ERR_UNSUPPORTED_OPERATIONE@Base 3.0.4 + _ZN3MPI26MPIR_CXX_InitDatatypeNamesEv@Base 3.0.4 + _ZN3MPI2IOE@Base 3.0.4 + _ZN3MPI2LBE@Base 3.0.4 + _ZN3MPI2Op12Reduce_localEPKvPviNS_8DatatypeE@Base 3.0.4 + _ZN3MPI2Op14Is_commutativeEv@Base 3.0.4 + _ZN3MPI2Op4FreeEv@Base 3.0.4 + _ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb@Base 3.0.4 + _ZN3MPI2OpD0Ev@Base 3.0.4 + _ZN3MPI2OpD1Ev@Base 3.0.4 + _ZN3MPI2OpD2Ev@Base 3.0.4 + _ZN3MPI2UBE@Base 3.0.4 + _ZN3MPI3BORE@Base 3.0.4 + _ZN3MPI3INTE@Base 3.0.4 + _ZN3MPI3LORE@Base 3.0.4 + _ZN3MPI3MAXE@Base 3.0.4 + _ZN3MPI3MINE@Base 3.0.4 + _ZN3MPI3SUME@Base 3.0.4 + _ZN3MPI3Win11Delete_attrEi@Base 3.0.4 + _ZN3MPI3Win12NULL_COPY_FNERKS0_iPvS3_S3_Rb@Base 3.0.4 + _ZN3MPI3Win13Create_keyvalEPFiRKS0_iPvS3_S3_RbEPFiRS0_iS3_S3_ES3_@Base 3.0.4 + _ZN3MPI3Win14NULL_DELETE_FNERS0_iPvS2_@Base 3.0.4 + _ZN3MPI3Win14Set_errhandlerERKNS_10ErrhandlerE@Base 3.0.4 + _ZN3MPI3Win17Create_errhandlerEPFvRS0_PizE@Base 3.0.4 + _ZN3MPI3Win4FreeEv@Base 3.0.4 + _ZN3MPI3Win8Set_attrEiPKv@Base 3.0.4 + _ZN3MPI3Win8Set_nameEPKc@Base 3.0.4 + _ZN3MPI3WinD0Ev@Base 3.0.4 + _ZN3MPI3WinD1Ev@Base 3.0.4 + _ZN3MPI3WinD2Ev@Base 3.0.4 + _ZN3MPI4BANDE@Base 3.0.4 + _ZN3MPI4BOOLE@Base 3.0.4 + _ZN3MPI4BXORE@Base 3.0.4 + _ZN3MPI4BYTEE@Base 3.0.4 + _ZN3MPI4CARTE@Base 3.0.4 + _ZN3MPI4CHARE@Base 3.0.4 + _ZN3MPI4Comm10DisconnectEv@Base 3.0.4 + _ZN3MPI4Comm10Get_parentEv@Base 3.0.4 + _ZN3MPI4Comm11Delete_attrEi@Base 3.0.4 + _ZN3MPI4Comm12NULL_COPY_FNERKS0_iPvS3_S3_Rb@Base 3.0.4 + _ZN3MPI4Comm13Create_keyvalEPFiRKS0_iPvS3_S3_RbEPFiRS0_iS3_S3_ES3_@Base 3.0.4 + _ZN3MPI4Comm14NULL_DELETE_FNERS0_iPvS2_@Base 3.0.4 + _ZN3MPI4Comm14Set_errhandlerERKNS_10ErrhandlerE@Base 3.0.4 + _ZN3MPI4Comm17Create_errhandlerEPFvRS0_PizE@Base 3.0.4 + _ZN3MPI4Comm4FreeEv@Base 3.0.4 + _ZN3MPI4Comm4JoinEi@Base 3.0.4 + _ZN3MPI4Comm8Set_attrEiPKv@Base 3.0.4 + _ZN3MPI4Comm8Set_nameEPKc@Base 3.0.4 + _ZN3MPI4CommD0Ev@Base 3.0.4 + _ZN3MPI4CommD1Ev@Base 3.0.4 + _ZN3MPI4CommD2Ev@Base 3.0.4 + _ZN3MPI4File11PreallocateEx@Base 3.0.4 + _ZN3MPI4File11Read_at_allExPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File11Read_at_allExPviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File11Read_sharedEPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File11Read_sharedEPviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File11Seek_sharedExi@Base 3.0.4 + _ZN3MPI4File12Iread_sharedEPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File12Read_all_endEPv@Base 3.0.4 + _ZN3MPI4File12Read_all_endEPvRNS_6StatusE@Base 3.0.4 + _ZN3MPI4File12Read_orderedEPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File12Read_orderedEPviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File12Write_at_allExPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File12Write_at_allExPKviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File12Write_sharedEPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File12Write_sharedEPKviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File13Iwrite_sharedEPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File13Set_atomicityEb@Base 3.0.4 + _ZN3MPI4File13Write_all_endEPKv@Base 3.0.4 + _ZN3MPI4File13Write_all_endEPKvRNS_6StatusE@Base 3.0.4 + _ZN3MPI4File13Write_orderedEPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File13Write_orderedEPKviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File14Read_all_beginEPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File14Set_errhandlerERKNS_10ErrhandlerE@Base 3.0.4 + _ZN3MPI4File15Read_at_all_endEPv@Base 3.0.4 + _ZN3MPI4File15Read_at_all_endEPvRNS_6StatusE@Base 3.0.4 + _ZN3MPI4File15Write_all_beginEPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File16Read_ordered_endEPv@Base 3.0.4 + _ZN3MPI4File16Read_ordered_endEPvRNS_6StatusE@Base 3.0.4 + _ZN3MPI4File16Write_at_all_endEPKv@Base 3.0.4 + _ZN3MPI4File16Write_at_all_endEPKvRNS_6StatusE@Base 3.0.4 + _ZN3MPI4File17Create_errhandlerEPFvRS0_PizE@Base 3.0.4 + _ZN3MPI4File17Read_at_all_beginExPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File17Write_ordered_endEPKv@Base 3.0.4 + _ZN3MPI4File17Write_ordered_endEPKvRNS_6StatusE@Base 3.0.4 + _ZN3MPI4File18Read_ordered_beginEPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File18Write_at_all_beginExPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File19Write_ordered_beginEPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File4ReadEPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File4ReadEPviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File4SeekExi@Base 3.0.4 + _ZN3MPI4File4SyncEv@Base 3.0.4 + _ZN3MPI4File5CloseEv@Base 3.0.4 + _ZN3MPI4File5IreadEPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File5WriteEPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File5WriteEPKviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File6IwriteEPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File7Read_atExPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File7Read_atExPviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File8Iread_atExPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File8Read_allEPviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File8Read_allEPviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File8Set_infoERKNS_4InfoE@Base 3.0.4 + _ZN3MPI4File8Set_sizeEx@Base 3.0.4 + _ZN3MPI4File8Set_viewExRKNS_8DatatypeES1_PKcRKNS_4InfoE@Base 3.0.4 + _ZN3MPI4File8Write_atExPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File8Write_atExPKviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4File9Iwrite_atExPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File9Write_allEPKviRKNS_8DatatypeE@Base 3.0.4 + _ZN3MPI4File9Write_allEPKviRKNS_8DatatypeERNS_6StatusE@Base 3.0.4 + _ZN3MPI4FileD0Ev@Base 3.0.4 + _ZN3MPI4FileD1Ev@Base 3.0.4 + _ZN3MPI4FileD2Ev@Base 3.0.4 + _ZN3MPI4HOSTE@Base 3.0.4 + _ZN3MPI4Info3SetEPKcS2_@Base 3.0.4 + _ZN3MPI4Info4FreeEv@Base 3.0.4 + _ZN3MPI4Info6DeleteEPKc@Base 3.0.4 + _ZN3MPI4InfoD0Ev@Base 3.0.4 + _ZN3MPI4InfoD1Ev@Base 3.0.4 + _ZN3MPI4InfoD2Ev@Base 3.0.4 + _ZN3MPI4InitERiRPPc@Base 3.0.4 + _ZN3MPI4InitEv@Base 3.0.4 + _ZN3MPI4LANDE@Base 3.0.4 + _ZN3MPI4LONGE@Base 3.0.4 + _ZN3MPI4LXORE@Base 3.0.4 + _ZN3MPI4PRODE@Base 3.0.4 + _ZN3MPI4REALE@Base 3.0.4 + _ZN3MPI4ROOTE@Base 3.0.4 + _ZN3MPI5FLOATE@Base 3.0.4 + _ZN3MPI5GRAPHE@Base 3.0.4 + _ZN3MPI5Group4FreeEv@Base 3.0.4 + _ZN3MPI5GroupD0Ev@Base 3.0.4 + _ZN3MPI5GroupD1Ev@Base 3.0.4 + _ZN3MPI5GroupD2Ev@Base 3.0.4 + _ZN3MPI5IDENTE@Base 3.0.4 + _ZN3MPI5REAL4E@Base 3.0.4 + _ZN3MPI5REAL8E@Base 3.0.4 + _ZN3MPI5SHORTE@Base 3.0.4 + _ZN3MPI5WCHARE@Base 3.0.4 + _ZN3MPI5WtickEv@Base 3.0.4 + _ZN3MPI5WtimeEv@Base 3.0.4 + _ZN3MPI6APPNUME@Base 3.0.4 + _ZN3MPI6BOTTOME@Base 3.0.4 + _ZN3MPI6DOUBLEE@Base 3.0.4 + _ZN3MPI6ERR_IOE@Base 3.0.4 + _ZN3MPI6ERR_OPE@Base 3.0.4 + _ZN3MPI6MAXLOCE@Base 3.0.4 + _ZN3MPI6MINLOCE@Base 3.0.4 + _ZN3MPI6PACKEDE@Base 3.0.4 + _ZN3MPI6REAL16E@Base 3.0.4 + _ZN3MPI6Status12Set_elementsERKNS_8DatatypeEi@Base 3.0.4 + _ZN3MPI6Status13Set_cancelledEb@Base 3.0.4 + _ZN3MPI6StatusD0Ev@Base 3.0.4 + _ZN3MPI6StatusD1Ev@Base 3.0.4 + _ZN3MPI6StatusD2Ev@Base 3.0.4 + _ZN3MPI6TAG_UBE@Base 3.0.4 + _ZN3MPI6TWOINTE@Base 3.0.4 + _ZN3MPI7ANY_TAGE@Base 3.0.4 + _ZN3MPI7COMPLEXE@Base 3.0.4 + _ZN3MPI7ERR_ARGE@Base 3.0.4 + _ZN3MPI7ERR_TAGE@Base 3.0.4 + _ZN3MPI7ERR_WINE@Base 3.0.4 + _ZN3MPI7INTEGERE@Base 3.0.4 + _ZN3MPI7LOGICALE@Base 3.0.4 + _ZN3MPI7OP_NULLE@Base 3.0.4 + _ZN3MPI7ORDER_CE@Base 3.0.4 + _ZN3MPI7REPLACEE@Base 3.0.4 + _ZN3MPI7Request4FreeEv@Base 3.0.4 + _ZN3MPI7Request4TestERNS_6StatusE@Base 3.0.4 + _ZN3MPI7Request4TestEv@Base 3.0.4 + _ZN3MPI7Request4WaitERNS_6StatusE@Base 3.0.4 + _ZN3MPI7Request4WaitEv@Base 3.0.4 + _ZN3MPI7RequestD0Ev@Base 3.0.4 + _ZN3MPI7RequestD1Ev@Base 3.0.4 + _ZN3MPI7RequestD2Ev@Base 3.0.4 + _ZN3MPI7SIMILARE@Base 3.0.4 + _ZN3MPI7SUCCESSE@Base 3.0.4 + _ZN3MPI7TWOREALE@Base 3.0.4 + _ZN3MPI7UNEQUALE@Base 3.0.4 + _ZN3MPI8COMPLEX8E@Base 3.0.4 + _ZN3MPI8CartcommD0Ev@Base 3.0.4 + _ZN3MPI8CartcommD1Ev@Base 3.0.4 + _ZN3MPI8CartcommD2Ev@Base 3.0.4 + _ZN3MPI8Datatype11Delete_attrEi@Base 3.0.4 + _ZN3MPI8Datatype12NULL_COPY_FNERKS0_iPvS3_S3_Rb@Base 3.0.4 + _ZN3MPI8Datatype13Create_keyvalEPFiRKS0_iPvS3_S3_RbEPFiRS0_iS3_S3_ES3_@Base 3.0.4 + _ZN3MPI8Datatype14NULL_DELETE_FNERS0_iPvS2_@Base 3.0.4 + _ZN3MPI8Datatype4FreeEv@Base 3.0.4 + _ZN3MPI8Datatype6CommitEv@Base 3.0.4 + _ZN3MPI8Datatype8Set_attrEiPKv@Base 3.0.4 + _ZN3MPI8Datatype8Set_nameEPKc@Base 3.0.4 + _ZN3MPI8DatatypeD0Ev@Base 3.0.4 + _ZN3MPI8DatatypeD1Ev@Base 3.0.4 + _ZN3MPI8DatatypeD2Ev@Base 3.0.4 + _ZN3MPI8ERR_BASEE@Base 3.0.4 + _ZN3MPI8ERR_COMME@Base 3.0.4 + _ZN3MPI8ERR_DIMSE@Base 3.0.4 + _ZN3MPI8ERR_DISPE@Base 3.0.4 + _ZN3MPI8ERR_FILEE@Base 3.0.4 + _ZN3MPI8ERR_INFOE@Base 3.0.4 + _ZN3MPI8ERR_NAMEE@Base 3.0.4 + _ZN3MPI8ERR_PORTE@Base 3.0.4 + _ZN3MPI8ERR_RANKE@Base 3.0.4 + _ZN3MPI8ERR_ROOTE@Base 3.0.4 + _ZN3MPI8ERR_SIZEE@Base 3.0.4 + _ZN3MPI8ERR_TYPEE@Base 3.0.4 + _ZN3MPI8FinalizeEv@Base 3.0.4 + _ZN3MPI8Free_memEPv@Base 3.0.4 + _ZN3MPI8Grequest5StartEPFiPvRNS_6StatusEEPFiS1_EPFiS1_bES1_@Base 3.0.4 + _ZN3MPI8Grequest8CompleteEv@Base 3.0.4 + _ZN3MPI8GrequestD0Ev@Base 3.0.4 + _ZN3MPI8GrequestD1Ev@Base 3.0.4 + _ZN3MPI8GrequestD2Ev@Base 3.0.4 + _ZN3MPI8INTEGER1E@Base 3.0.4 + _ZN3MPI8INTEGER2E@Base 3.0.4 + _ZN3MPI8INTEGER4E@Base 3.0.4 + _ZN3MPI8INTEGER8E@Base 3.0.4 + _ZN3MPI8IN_PLACEE@Base 3.0.4 + _ZN3MPI8LONG_INTE@Base 3.0.4 + _ZN3MPI8NullcommD0Ev@Base 3.0.4 + _ZN3MPI8NullcommD1Ev@Base 3.0.4 + _ZN3MPI8NullcommD2Ev@Base 3.0.4 + _ZN3MPI8PcontrolEiz@Base 3.0.4 + _ZN3MPI8Prequest5StartEv@Base 3.0.4 + _ZN3MPI8PrequestD0Ev@Base 3.0.4 + _ZN3MPI8PrequestD1Ev@Base 3.0.4 + _ZN3MPI8PrequestD2Ev@Base 3.0.4 + _ZN3MPI8SEEK_CURE@Base 3.0.4 + _ZN3MPI8SEEK_ENDE@Base 3.0.4 + _ZN3MPI8SEEK_SETE@Base 3.0.4 + _ZN3MPI8UNSIGNEDE@Base 3.0.4 + _ZN3MPI8WIN_BASEE@Base 3.0.4 + _ZN3MPI8WIN_NULLE@Base 3.0.4 + _ZN3MPI8WIN_SIZEE@Base 3.0.4 + _ZN3MPI9ARGV_NULLE@Base 3.0.4 + _ZN3MPI9Alloc_memElRKNS_4InfoE@Base 3.0.4 + _ZN3MPI9CHARACTERE@Base 3.0.4 + _ZN3MPI9COMM_NULLE@Base 3.0.4 + _ZN3MPI9COMM_SELFE@Base 3.0.4 + _ZN3MPI9COMPLEX16E@Base 3.0.4 + _ZN3MPI9COMPLEX32E@Base 3.0.4 + _ZN3MPI9CONGRUENTE@Base 3.0.4 + _ZN3MPI9ERR_AMODEE@Base 3.0.4 + _ZN3MPI9ERR_COUNTE@Base 3.0.4 + _ZN3MPI9ERR_GROUPE@Base 3.0.4 + _ZN3MPI9ERR_OTHERE@Base 3.0.4 + _ZN3MPI9ERR_QUOTAE@Base 3.0.4 + _ZN3MPI9ERR_SPAWNE@Base 3.0.4 + _ZN3MPI9ExceptionD0Ev@Base 3.0.4 + _ZN3MPI9ExceptionD1Ev@Base 3.0.4 + _ZN3MPI9ExceptionD2Ev@Base 3.0.4 + _ZN3MPI9FILE_NULLE@Base 3.0.4 + _ZN3MPI9FLOAT_INTE@Base 3.0.4 + _ZN3MPI9F_COMPLEXE@Base 3.0.4 + _ZN3MPI9GraphcommD0Ev@Base 3.0.4 + _ZN3MPI9GraphcommD1Ev@Base 3.0.4 + _ZN3MPI9GraphcommD2Ev@Base 3.0.4 + _ZN3MPI9INFO_NULLE@Base 3.0.4 + _ZN3MPI9INTEGER16E@Base 3.0.4 + _ZN3MPI9IntercommD0Ev@Base 3.0.4 + _ZN3MPI9IntercommD1Ev@Base 3.0.4 + _ZN3MPI9IntercommD2Ev@Base 3.0.4 + _ZN3MPI9IntracommD0Ev@Base 3.0.4 + _ZN3MPI9IntracommD1Ev@Base 3.0.4 + _ZN3MPI9IntracommD2Ev@Base 3.0.4 + _ZN3MPI9LONG_LONGE@Base 3.0.4 + _ZN3MPI9MODE_EXCLE@Base 3.0.4 + _ZN3MPI9MODE_RDWRE@Base 3.0.4 + _ZN3MPI9Open_portERKNS_4InfoEPc@Base 3.0.4 + _ZN3MPI9PROC_NULLE@Base 3.0.4 + _ZN3MPI9SHORT_INTE@Base 3.0.4 + _ZN3MPI9UNDEFINEDE@Base 3.0.4 + _ZNK3MPI3Win10AccumulateEPKviRKNS_8DatatypeEiliS5_RKNS_2OpE@Base 3.0.4 + _ZNK3MPI3Win14Get_errhandlerEv@Base 3.0.4 + _ZNK3MPI3Win15Call_errhandlerEi@Base 3.0.4 + _ZNK3MPI3Win3GetEPviRKNS_8DatatypeEiliS4_@Base 3.0.4 + _ZNK3MPI3Win3PutEPKviRKNS_8DatatypeEiliS5_@Base 3.0.4 + _ZNK3MPI3Win4LockEiii@Base 3.0.4 + _ZNK3MPI3Win4PostERKNS_5GroupEi@Base 3.0.4 + _ZNK3MPI3Win4TestEv@Base 3.0.4 + _ZNK3MPI3Win4WaitEv@Base 3.0.4 + _ZNK3MPI3Win5FenceEi@Base 3.0.4 + _ZNK3MPI3Win5StartERKNS_5GroupEi@Base 3.0.4 + _ZNK3MPI3Win6UnlockEi@Base 3.0.4 + _ZNK3MPI3Win8CompleteEv@Base 3.0.4 + _ZNK3MPI3Win8Get_attrEiPv@Base 3.0.4 + _ZNK3MPI3Win8Get_nameEPcRi@Base 3.0.4 + _ZNK3MPI3Win9Get_groupEv@Base 3.0.4 + _ZNK3MPI4Comm10AllgathervEPKviRKNS_8DatatypeEPvPKiS8_S5_@Base 3.0.4 + _ZNK3MPI4Comm10Bsend_initEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm10Rsend_initEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm10Ssend_initEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm12Get_topologyEv@Base 3.0.4 + _ZNK3MPI4Comm14Get_errhandlerEv@Base 3.0.4 + _ZNK3MPI4Comm14Reduce_scatterEPKvPvPKiRKNS_8DatatypeERKNS_2OpE@Base 3.0.4 + _ZNK3MPI4Comm15Call_errhandlerEi@Base 3.0.4 + _ZNK3MPI4Comm16Sendrecv_replaceEPviRKNS_8DatatypeEiiii@Base 3.0.4 + _ZNK3MPI4Comm16Sendrecv_replaceEPviRKNS_8DatatypeEiiiiRNS_6StatusE@Base 3.0.4 + _ZNK3MPI4Comm20Reduce_scatter_blockEPKvPviRKNS_8DatatypeERKNS_2OpE@Base 3.0.4 + _ZNK3MPI4Comm4RecvEPviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm4RecvEPviRKNS_8DatatypeEiiRNS_6StatusE@Base 3.0.4 + _ZNK3MPI4Comm4SendEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm5AbortEi@Base 3.0.4 + _ZNK3MPI4Comm5BcastEPviRKNS_8DatatypeEi@Base 3.0.4 + _ZNK3MPI4Comm5BsendEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm5IrecvEPviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm5IsendEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm5ProbeEii@Base 3.0.4 + _ZNK3MPI4Comm5ProbeEiiRNS_6StatusE@Base 3.0.4 + _ZNK3MPI4Comm5RsendEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm5SsendEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm6GatherEPKviRKNS_8DatatypeEPviS5_i@Base 3.0.4 + _ZNK3MPI4Comm6IbsendEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm6IprobeEii@Base 3.0.4 + _ZNK3MPI4Comm6IprobeEiiRNS_6StatusE@Base 3.0.4 + _ZNK3MPI4Comm6IrsendEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm6IssendEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm6ReduceEPKvPviRKNS_8DatatypeERKNS_2OpEi@Base 3.0.4 + _ZNK3MPI4Comm7BarrierEv@Base 3.0.4 + _ZNK3MPI4Comm7GathervEPKviRKNS_8DatatypeEPvPKiS8_S5_i@Base 3.0.4 + _ZNK3MPI4Comm7ScatterEPKviRKNS_8DatatypeEPviS5_i@Base 3.0.4 + _ZNK3MPI4Comm8AlltoallEPKviRKNS_8DatatypeEPviS5_@Base 3.0.4 + _ZNK3MPI4Comm8Get_attrEiPv@Base 3.0.4 + _ZNK3MPI4Comm8Get_nameEPcRi@Base 3.0.4 + _ZNK3MPI4Comm8Get_rankEv@Base 3.0.4 + _ZNK3MPI4Comm8Get_sizeEv@Base 3.0.4 + _ZNK3MPI4Comm8Is_interEv@Base 3.0.4 + _ZNK3MPI4Comm8ScattervEPKvPKiS4_RKNS_8DatatypeEPviS7_i@Base 3.0.4 + _ZNK3MPI4Comm8SendrecvEPKviRKNS_8DatatypeEiiPviS5_ii@Base 3.0.4 + _ZNK3MPI4Comm8SendrecvEPKviRKNS_8DatatypeEiiPviS5_iiRNS_6StatusE@Base 3.0.4 + _ZNK3MPI4Comm9AllgatherEPKviRKNS_8DatatypeEPviS5_@Base 3.0.4 + _ZNK3MPI4Comm9AllreduceEPKvPviRKNS_8DatatypeERKNS_2OpE@Base 3.0.4 + _ZNK3MPI4Comm9AlltoallvEPKvPKiS4_RKNS_8DatatypeEPvS4_S4_S7_@Base 3.0.4 + _ZNK3MPI4Comm9AlltoallwEPKvPKiS4_PKNS_8DatatypeEPvS4_S4_S7_@Base 3.0.4 + _ZNK3MPI4Comm9Get_groupEv@Base 3.0.4 + _ZNK3MPI4Comm9Recv_initEPviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4Comm9Send_initEPKviRKNS_8DatatypeEii@Base 3.0.4 + _ZNK3MPI4File12Get_positionEv@Base 3.0.4 + _ZNK3MPI4File13Get_atomicityEv@Base 3.0.4 + _ZNK3MPI4File14Get_errhandlerEv@Base 3.0.4 + _ZNK3MPI4File15Call_errhandlerEi@Base 3.0.4 + _ZNK3MPI4File15Get_byte_offsetEx@Base 3.0.4 + _ZNK3MPI4File15Get_type_extentERKNS_8DatatypeE@Base 3.0.4 + _ZNK3MPI4File19Get_position_sharedEv@Base 3.0.4 + _ZNK3MPI4File8Get_infoEv@Base 3.0.4 + _ZNK3MPI4File8Get_sizeEv@Base 3.0.4 + _ZNK3MPI4File8Get_viewERxRNS_8DatatypeES3_Pc@Base 3.0.4 + _ZNK3MPI4File9Get_amodeEv@Base 3.0.4 + _ZNK3MPI4File9Get_groupEv@Base 3.0.4 + _ZNK3MPI4Info10Get_nthkeyEiPc@Base 3.0.4 + _ZNK3MPI4Info12Get_valuelenEPKcRi@Base 3.0.4 + _ZNK3MPI4Info3GetEPKciPc@Base 3.0.4 + _ZNK3MPI4Info9Get_nkeysEv@Base 3.0.4 + _ZNK3MPI5Group10Range_exclEiPA3_Ki@Base 3.0.4 + _ZNK3MPI5Group10Range_inclEiPA3_Ki@Base 3.0.4 + _ZNK3MPI5Group4ExclEiPKi@Base 3.0.4 + _ZNK3MPI5Group4InclEiPKi@Base 3.0.4 + _ZNK3MPI5Group8Get_rankEv@Base 3.0.4 + _ZNK3MPI5Group8Get_sizeEv@Base 3.0.4 + _ZNK3MPI6Status12Get_elementsERKNS_8DatatypeE@Base 3.0.4 + _ZNK3MPI6Status12Is_cancelledEv@Base 3.0.4 + _ZNK3MPI6Status9Get_countERKNS_8DatatypeE@Base 3.0.4 + _ZNK3MPI7Request10Get_statusERNS_6StatusE@Base 3.0.4 + _ZNK3MPI7Request10Get_statusEv@Base 3.0.4 + _ZNK3MPI7Request6CancelEv@Base 3.0.4 + _ZNK3MPI8Cartcomm10Get_coordsEiiPi@Base 3.0.4 + _ZNK3MPI8Cartcomm13Get_cart_rankEPKi@Base 3.0.4 + _ZNK3MPI8Cartcomm3MapEiPKiPKb@Base 3.0.4 + _ZNK3MPI8Cartcomm3SubEPKb@Base 3.0.4 + _ZNK3MPI8Cartcomm5CloneEv@Base 3.0.4 + _ZNK3MPI8Cartcomm5ShiftEiiRiS1_@Base 3.0.4 + _ZNK3MPI8Cartcomm7Get_dimEv@Base 3.0.4 + _ZNK3MPI8Cartcomm8Get_topoEiPiPbS1_@Base 3.0.4 + _ZNK3MPI8Datatype10Get_extentERlS1_@Base 3.0.4 + _ZNK3MPI8Datatype12Get_contentsEiiiPiPlPS0_@Base 3.0.4 + _ZNK3MPI8Datatype12Get_envelopeERiS1_S1_S1_@Base 3.0.4 + _ZNK3MPI8Datatype13Create_darrayEiiiPKiS2_S2_S2_i@Base 3.0.4 + _ZNK3MPI8Datatype13Create_vectorEiii@Base 3.0.4 + _ZNK3MPI8Datatype13Pack_externalEPKcPKviPvlRl@Base 3.0.4 + _ZNK3MPI8Datatype14Create_hvectorEiil@Base 3.0.4 + _ZNK3MPI8Datatype14Create_indexedEiPKiS2_@Base 3.0.4 + _ZNK3MPI8Datatype14Create_resizedEll@Base 3.0.4 + _ZNK3MPI8Datatype15Create_hindexedEiPKiPKl@Base 3.0.4 + _ZNK3MPI8Datatype15Create_subarrayEiPKiS2_S2_i@Base 3.0.4 + _ZNK3MPI8Datatype15Get_true_extentERlS1_@Base 3.0.4 + _ZNK3MPI8Datatype15Unpack_externalEPKcPKvlRlPvi@Base 3.0.4 + _ZNK3MPI8Datatype17Create_contiguousEi@Base 3.0.4 + _ZNK3MPI8Datatype18Pack_external_sizeEPKci@Base 3.0.4 + _ZNK3MPI8Datatype20Create_indexed_blockEiiPKi@Base 3.0.4 + _ZNK3MPI8Datatype4PackEPKviPviRiRKNS_4CommE@Base 3.0.4 + _ZNK3MPI8Datatype6UnpackEPKviPviRiRKNS_4CommE@Base 3.0.4 + _ZNK3MPI8Datatype8Get_attrEiPv@Base 3.0.4 + _ZNK3MPI8Datatype8Get_nameEPcRi@Base 3.0.4 + _ZNK3MPI8Datatype8Get_sizeEv@Base 3.0.4 + _ZNK3MPI8Datatype9Pack_sizeEiRKNS_4CommE@Base 3.0.4 + _ZNK3MPI8Nullcomm5CloneEv@Base 3.0.4 + _ZNK3MPI9Graphcomm13Get_neighborsEiiPi@Base 3.0.4 + _ZNK3MPI9Graphcomm19Get_neighbors_countEi@Base 3.0.4 + _ZNK3MPI9Graphcomm3MapEiPKiS2_@Base 3.0.4 + _ZNK3MPI9Graphcomm5CloneEv@Base 3.0.4 + _ZNK3MPI9Graphcomm8Get_dimsEPiS1_@Base 3.0.4 + _ZNK3MPI9Graphcomm8Get_topoEiiPiS1_@Base 3.0.4 + _ZNK3MPI9Intercomm15Get_remote_sizeEv@Base 3.0.4 + _ZNK3MPI9Intercomm16Get_remote_groupEv@Base 3.0.4 + _ZNK3MPI9Intercomm5CloneEv@Base 3.0.4 + _ZNK3MPI9Intercomm5MergeEb@Base 3.0.4 + _ZNK3MPI9Intercomm5SplitEii@Base 3.0.4 + _ZNK3MPI9Intracomm11Create_cartEiPKiPKbb@Base 3.0.4 + _ZNK3MPI9Intracomm12Create_graphEiPKiS2_b@Base 3.0.4 + _ZNK3MPI9Intracomm16Create_intercommEiRKNS_4CommEii@Base 3.0.4 + _ZNK3MPI9Intracomm4ScanEPKvPviRKNS_8DatatypeERKNS_2OpE@Base 3.0.4 + _ZNK3MPI9Intracomm5CloneEv@Base 3.0.4 + _ZNK3MPI9Intracomm5SplitEii@Base 3.0.4 + _ZNK3MPI9Intracomm6AcceptEPKcRKNS_4InfoEi@Base 3.0.4 + _ZNK3MPI9Intracomm6CreateERKNS_5GroupE@Base 3.0.4 + _ZNK3MPI9Intracomm6ExscanEPKvPviRKNS_8DatatypeERKNS_2OpE@Base 3.0.4 + _ZNK3MPI9Intracomm7ConnectEPKcRKNS_4InfoEi@Base 3.0.4 + _ZTIN3MPI10ErrhandlerE@Base 3.0.4 + _ZTIN3MPI2OpE@Base 3.0.4 + _ZTIN3MPI3WinE@Base 3.0.4 + _ZTIN3MPI4CommE@Base 3.0.4 + _ZTIN3MPI4FileE@Base 3.0.4 + _ZTIN3MPI4InfoE@Base 3.0.4 + _ZTIN3MPI5GroupE@Base 3.0.4 + _ZTIN3MPI6StatusE@Base 3.0.4 + _ZTIN3MPI7RequestE@Base 3.0.4 + _ZTIN3MPI8CartcommE@Base 3.0.4 + _ZTIN3MPI8DatatypeE@Base 3.0.4 + _ZTIN3MPI8GrequestE@Base 3.0.4 + _ZTIN3MPI8NullcommE@Base 3.0.4 + _ZTIN3MPI8PrequestE@Base 3.0.4 + _ZTIN3MPI9ExceptionE@Base 3.0.4 + _ZTIN3MPI9GraphcommE@Base 3.0.4 + _ZTIN3MPI9IntercommE@Base 3.0.4 + _ZTIN3MPI9IntracommE@Base 3.0.4 + _ZTSN3MPI10ErrhandlerE@Base 3.0.4 + _ZTSN3MPI2OpE@Base 3.0.4 + _ZTSN3MPI3WinE@Base 3.0.4 + _ZTSN3MPI4CommE@Base 3.0.4 + _ZTSN3MPI4FileE@Base 3.0.4 + _ZTSN3MPI4InfoE@Base 3.0.4 + _ZTSN3MPI5GroupE@Base 3.0.4 + _ZTSN3MPI6StatusE@Base 3.0.4 + _ZTSN3MPI7RequestE@Base 3.0.4 + _ZTSN3MPI8CartcommE@Base 3.0.4 + _ZTSN3MPI8DatatypeE@Base 3.0.4 + _ZTSN3MPI8GrequestE@Base 3.0.4 + _ZTSN3MPI8NullcommE@Base 3.0.4 + _ZTSN3MPI8PrequestE@Base 3.0.4 + _ZTSN3MPI9ExceptionE@Base 3.0.4 + _ZTSN3MPI9GraphcommE@Base 3.0.4 + _ZTSN3MPI9IntercommE@Base 3.0.4 + _ZTSN3MPI9IntracommE@Base 3.0.4 + _ZTVN3MPI10ErrhandlerE@Base 3.0.4 + _ZTVN3MPI2OpE@Base 3.0.4 + _ZTVN3MPI3WinE@Base 3.0.4 + _ZTVN3MPI4CommE@Base 3.0.4 + _ZTVN3MPI4FileE@Base 3.0.4 + _ZTVN3MPI4InfoE@Base 3.0.4 + _ZTVN3MPI5GroupE@Base 3.0.4 + _ZTVN3MPI6StatusE@Base 3.0.4 + _ZTVN3MPI7RequestE@Base 3.0.4 + _ZTVN3MPI8CartcommE@Base 3.0.4 + _ZTVN3MPI8DatatypeE@Base 3.0.4 + _ZTVN3MPI8GrequestE@Base 3.0.4 + _ZTVN3MPI8NullcommE@Base 3.0.4 + _ZTVN3MPI8PrequestE@Base 3.0.4 + _ZTVN3MPI9ExceptionE@Base 3.0.4 + _ZTVN3MPI9GraphcommE@Base 3.0.4 + _ZTVN3MPI9IntercommE@Base 3.0.4 + _ZTVN3MPI9IntracommE@Base 3.0.4 +libmpichf90.so.10 libmpich10 #MINVER# + __mpi_constants_MOD_commeq@Base 3.0.4 + __mpi_constants_MOD_commneq@Base 3.0.4 + __mpi_constants_MOD_datatypeeq@Base 3.0.4 + __mpi_constants_MOD_datatypeneq@Base 3.0.4 + __mpi_constants_MOD_errhandlereq@Base 3.0.4 + __mpi_constants_MOD_errhandlerneq@Base 3.0.4 + __mpi_constants_MOD_fileeq@Base 3.0.4 + __mpi_constants_MOD_fileneq@Base 3.0.4 + __mpi_constants_MOD_groupeq@Base 3.0.4 + __mpi_constants_MOD_groupneq@Base 3.0.4 + __mpi_constants_MOD_infoeq@Base 3.0.4 + __mpi_constants_MOD_infoneq@Base 3.0.4 + __mpi_constants_MOD_messageeq@Base 3.0.4 + __mpi_constants_MOD_messageneq@Base 3.0.4 + __mpi_constants_MOD_opeq@Base 3.0.4 + __mpi_constants_MOD_opneq@Base 3.0.4 + __mpi_constants_MOD_requesteq@Base 3.0.4 + __mpi_constants_MOD_requestneq@Base 3.0.4 + __mpi_constants_MOD_wineq@Base 3.0.4 + __mpi_constants_MOD_winneq@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_ch@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_chv@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_cx@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_cxv@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_d@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_dv@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_i1@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_i1v@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_i2@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_i2v@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_i8@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_i8v@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_i@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_iv@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_l@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_lv@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_r@Base 3.0.4 + __mpi_sizeofs_MOD_mpi_sizeof_rv@Base 3.0.4 + mpifcmb1_@Base 3.0.4 + mpifcmb2_@Base 3.0.4 + mpifcmb3_@Base 3.0.4 + mpifcmb4_@Base 3.0.4 + mpifcmb5_@Base 3.0.4 + mpifcmb6_@Base 3.0.4 + mpifcmb7_@Base 3.0.4 + mpifcmb8_@Base 3.0.4 + mpifcmb9_@Base 3.0.4 +libmpl.so.1 libmpich10 #MINVER# + MPL_TrSetMaxMem@Base 3.0.4 + MPL_env2bool@Base 3.0.4 + MPL_env2double@Base 3.0.4 + MPL_env2int@Base 3.0.4 + MPL_env2range@Base 3.0.4 + MPL_env2str@Base 3.0.4 + MPL_putenv@Base 3.0.4 + MPL_strncpy@Base 3.0.4 + MPL_strsep@Base 3.0.4 + MPL_trDebugLevel@Base 3.0.4 + MPL_trSummary@Base 3.0.4 + MPL_trcalloc@Base 3.0.4 + MPL_trdump@Base 3.0.4 + MPL_trdumpGrouped@Base 3.0.4 + MPL_trfree@Base 3.0.4 + MPL_trid@Base 3.0.4 + MPL_trinit@Base 3.0.4 + MPL_trlevel@Base 3.0.4 + MPL_trmalloc@Base 3.0.4 + MPL_trrealloc@Base 3.0.4 + MPL_trspace@Base 3.0.4 + MPL_trstrdup@Base 3.0.4 + MPL_trvalid2@Base 3.0.4 + MPL_trvalid@Base 3.0.4 +libopa.so.1 libmpich10 #MINVER# + OPA_Interprocess_lock_init@Base 3.0.4 + OPA_Queue_header_init@Base 3.0.4 + OPA_Queue_init@Base 3.0.4 + OPA_Shm_asymm_base_addr@Base 3.0.4 + OPA_Shm_asymm_init@Base 3.0.4 + OPA_emulation_lock@Base 3.0.4 diff --git a/debian/libmpich12.install b/debian/libmpich12.install new file mode 100644 index 00000000000..fe78edadf2e --- /dev/null +++ b/debian/libmpich12.install @@ -0,0 +1,3 @@ +usr/lib/*/libmpich.so.* +usr/lib/*/libmpichcxx.so.* +usr/lib/*/libmpichfort.so.* diff --git a/debian/libmpl-dev.install b/debian/libmpl-dev.install new file mode 100644 index 00000000000..a1286c98c1c --- /dev/null +++ b/debian/libmpl-dev.install @@ -0,0 +1,2 @@ +usr/lib/*/lib*mpl*.a +usr/lib/*/lib*mpl*.so diff --git a/debian/libmpl1.install b/debian/libmpl1.install new file mode 100644 index 00000000000..078962d8ca0 --- /dev/null +++ b/debian/libmpl1.install @@ -0,0 +1 @@ +usr/lib/*/libmpl.so.1* diff --git a/debian/libopa-dev.install b/debian/libopa-dev.install new file mode 100644 index 00000000000..2b63f0f04de --- /dev/null +++ b/debian/libopa-dev.install @@ -0,0 +1,2 @@ +usr/lib/*/lib*opa*.a +usr/lib/*/lib*opa*.so diff --git a/debian/libopa1.install b/debian/libopa1.install new file mode 100644 index 00000000000..282323dae4b --- /dev/null +++ b/debian/libopa1.install @@ -0,0 +1 @@ +usr/lib/*/libopa.so.1* diff --git a/debian/man.Attic/clog2_print.1 b/debian/man.Attic/clog2_print.1 new file mode 100644 index 00000000000..8512499a853 --- /dev/null +++ b/debian/man.Attic/clog2_print.1 @@ -0,0 +1,16 @@ +.TH clog2_print 1 "21 Mar 2005" "" "MPI" +.SH NAME +clog2_print \- prints out the contents of a clog file +.SH SYNOPSIS +.B clog2_print [ +.I clogfilename +.B ] + +.SH DESCRIPTION +.B clog2_print +dumps the contents of a clog file out to stdout. +.SH AUTHOR +This manpage has been written by Zach Lowry , modified from +the page written by Junichi Uekawa for Debian GNU/Linux +.SH "SEE ALSO" +mpicc(1), mpicxx(1), mpif77(1), mpirun(1), "MPICH2 user's guide". diff --git a/debian/man.Attic/mpd.1 b/debian/man.Attic/mpd.1 new file mode 100644 index 00000000000..fd8118806db --- /dev/null +++ b/debian/man.Attic/mpd.1 @@ -0,0 +1,78 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH MPD "1" "September 2009" "mpd" "User Commands" +.SH NAME +mpd \- manual page for mpd daemon +.SH DESCRIPTION +usage: mpd [\-\-host= \fB\-\-port=\fR] [\-\-noconsole] +.IP +[\-\-trace] [\-\-echo] [\-\-daemon] [\-\-bulletproof] \fB\-\-ncpus=\fR +[\-\-ifhn=] [\-\-listenport=] +[\-\-pid=] \fB\-\-tmpdir=\fR] [\-zc] [\-\-debug] +.PP +Some long parameter names may be abbreviated to their first letters by using +.IP +only one hyphen and no equal sign: +.IP +mpd \fB\-h\fR donner \fB\-p\fR 4268 \fB\-n\fR +.IP +is equivalent to +.IP +mpd \fB\-\-host\fR=\fImagpie\fR \fB\-\-port\fR=\fI4268\fR \fB\-\-noconsole\fR +.PP +\fB\-\-host\fR and \fB\-\-port\fR must be specified together; they tell the new mpd where +.TP +to enter an existing ring; +if they are omitted, the new mpd forms a +.IP +stand\-alone ring that other mpds may enter later +.PP +\fB\-\-noconsole\fR is useful for running 2 mpds on the same machine; only one of +.IP +them will accept mpd commands +.PP +\fB\-\-trace\fR yields lots of traces thru mpd routines; currently too verbose +\fB\-\-debug\fR turns on some debugging prints; currently not verbose enough +\fB\-\-echo\fR causes the mpd echo its listener port by which other mpds may connect +\fB\-\-daemon\fR causes mpd to run backgrounded, with no controlling tty +\fB\-\-bulletproof\fR says to turn bulletproofing on (experimental) +\fB\-\-ncpus\fR indicates how many cpus are on the local host; used for starting processes +\fB\-\-ifhn\fR specifies an alternate interface hostname for the host this mpd is running on; +.IP +e.g. may be used to specify the alias for an interface other than default +.PP +\fB\-\-listenport\fR specifies a port for this mpd to listen on; by default it will +.IP +acquire one from the system +.PP +\fB\-\-conlistenport\fR specifies a port for this mpd to listen on for console +.IP +connections (only used when employing inet socket for console); by default it +will acquire one from the system +.PP +\fB\-\-pid\fR=\fIfilename\fR writes the mpd pid into the specified file, or \fB\-\-pid\fR alone +.IP +writes it into /var/run/mpd.pid +.PP +\fB\-\-tmpdir\fR=\fItmpdirname\fR where mpd places temporary sockets, etc. +\fB\-zc\fR is a purely EXPERIMENTAL option right now used to investigate zeroconf +.IP +networking; it can be used to allow mpds to discover each other locally +using multicast DNS; its usage may change over time +Currently, \fB\-zc\fR is specified like this: \fB\-zc\fR N +where N specifies a 'level' in a startup set of mpds. The first mpd in a ring +must have 1 and it will establish a ring of one mpd. Subsequent mpds can specify +\fB\-zc\fR 2 and will hook into the ring via the one at level 1. Except for level 1, new +mpds enter the ring via an mpd at level\-1. +.PP +A file named .mpd.conf file must be present in the user's home directory +.IP +with read and write access only for the user, and must contain at least +a line with MPD_SECRETWORD= +.PP +To run mpd as root, install it while root and instead of a .mpd.conf file +use mpd.conf (no leading dot) in the /etc directory.' +.SH AUTHOR +mpd was written by The MPICH2 Team. +.PP +This manual page was written by Muammar El Khatib , +for the Debian project (but may be used by others). diff --git a/debian/man.Attic/mpdboot.1 b/debian/man.Attic/mpdboot.1 new file mode 100644 index 00000000000..500e35dde05 --- /dev/null +++ b/debian/man.Attic/mpdboot.1 @@ -0,0 +1,139 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH MPDBOOT: "1" "September 2009" "mpdboot" "User Commands" +.SH NAME +mpdboot: \- manual page for mpdboot command +.SH DESCRIPTION +usage: mpdboot \fB\-\-totalnum=\fR [\-\-file=] [\-\-help] \e +.TP +[\-\-rsh=] [\-\-user=] [\-\-mpd=] +\e +.TP +[\-\-loccons] [\-\-remcons] [\-\-shell] [\-\-verbose] [\-1] +[\-\-ncpus=] [\-\-ifhn=] [\-\-chkup] [\-\-chkuponly] [\-\-maxbranch=] +.IP +or, in short form, +.IP +mpdboot \fB\-n\fR n_to_start [\-f ] [\-h] [\-r ] [\-u ] \e +.TP +[\-m ] +\fB\-s\fR \fB\-v\fR [\-1] [\-c] +.PP +\fB\-\-totalnum\fR specifies the total number of mpds to start; at least +.IP +one mpd will be started locally, and others on the machines specified +by the file argument; by default, only one mpd per host will be +started even if the hostname occurs multiple times in the hosts file +.PP +\fB\-1\fR means remove the restriction of starting only one mpd per machine; +.IP +in this case, at most the first mpd on a host will have a console +.PP +\fB\-\-file\fR specifies the file of machines to start the rest of the mpds on; +.IP +it defaults to mpd.hosts +.PP +\fB\-\-mpd\fR specifies the full path name of mpd on the remote hosts if it is +.IP +not in your path +.PP +\fB\-\-rsh\fR specifies the name of the command used to start remote mpds; it +.IP +defaults to ssh; an alternative is rsh +.PP +\fB\-\-shell\fR says that the Bourne shell is your default for rsh' +\fB\-\-verbose\fR shows the ssh attempts as they occur; it does not provide +.IP +confirmation that the sshs were successful +.PP +\fB\-\-loccons\fR says you do not want a console available on local mpd(s) +\fB\-\-remcons\fR says you do not want consoles available on remote mpd(s) +\fB\-\-ncpus\fR indicates how many cpus you want to show for the local machine; +.IP +others are listed in the hosts file +.PP +\fB\-\-ifhn\fR indicates the interface hostname to use for the local mpd; others +.IP +may be specified in the hostsfile +.PP +\fB\-\-chkup\fR requests that mpdboot try to verify that the hosts in the host file +.IP +are up before attempting start mpds on any of them; it just checks the number +of hosts specified by \fB\-n\fR +.PP +\fB\-\-chkuponly\fR requests that mpdboot try to verify that the hosts in the host file +.IP +are up; it then terminates; it just checks the number of hosts specified by \fB\-n\fR +.PP +\fB\-\-maxbranch\fR indicates the maximum number of mpds to enter the ring under another; +.IP +the default is 4 +.PP +usage: mpdboot \fB\-\-totalnum=\fR [\-\-file=] [\-\-help] \e +.TP +[\-\-rsh=] [\-\-user=] [\-\-mpd=] +\e +.TP +[\-\-loccons] [\-\-remcons] [\-\-shell] [\-\-verbose] [\-1] +[\-\-ncpus=] [\-\-ifhn=] [\-\-chkup] [\-\-chkuponly] [\-\-maxbranch=] +.IP +or, in short form, +.IP +mpdboot \fB\-n\fR n_to_start [\-f ] [\-h] [\-r ] [\-u ] \e +.TP +[\-m ] +\fB\-s\fR \fB\-v\fR [\-1] [\-c] +.PP +\fB\-\-totalnum\fR specifies the total number of mpds to start; at least +.IP +one mpd will be started locally, and others on the machines specified +by the file argument; by default, only one mpd per host will be +started even if the hostname occurs multiple times in the hosts file +.PP +\fB\-1\fR means remove the restriction of starting only one mpd per machine; +.IP +in this case, at most the first mpd on a host will have a console +.PP +\fB\-\-file\fR specifies the file of machines to start the rest of the mpds on; +.IP +it defaults to mpd.hosts +.PP +\fB\-\-mpd\fR specifies the full path name of mpd on the remote hosts if it is +.IP +not in your path +.PP +\fB\-\-rsh\fR specifies the name of the command used to start remote mpds; it +.IP +defaults to ssh; an alternative is rsh +.PP +\fB\-\-shell\fR says that the Bourne shell is your default for rsh' +\fB\-\-verbose\fR shows the ssh attempts as they occur; it does not provide +.IP +confirmation that the sshs were successful +.PP +\fB\-\-loccons\fR says you do not want a console available on local mpd(s) +\fB\-\-remcons\fR says you do not want consoles available on remote mpd(s) +\fB\-\-ncpus\fR indicates how many cpus you want to show for the local machine; +.IP +others are listed in the hosts file +.PP +\fB\-\-ifhn\fR indicates the interface hostname to use for the local mpd; others +.IP +may be specified in the hostsfile +.PP +\fB\-\-chkup\fR requests that mpdboot try to verify that the hosts in the host file +.IP +are up before attempting start mpds on any of them; it just checks the number +of hosts specified by \fB\-n\fR +.PP +\fB\-\-chkuponly\fR requests that mpdboot try to verify that the hosts in the host file +.IP +are up; it then terminates; it just checks the number of hosts specified by \fB\-n\fR +.PP +\fB\-\-maxbranch\fR indicates the maximum number of mpds to enter the ring under another; +.IP +the default is 4 +.SH AUTHOR +mpdboot was written by The MPICH2 Team. +.PP +This manual page was written by Muammar El Khatib , +for the Debian project (but may be used by others). diff --git a/debian/man.Attic/mpdcheck.1 b/debian/man.Attic/mpdcheck.1 new file mode 100644 index 00000000000..292bea5d664 --- /dev/null +++ b/debian/man.Attic/mpdcheck.1 @@ -0,0 +1,64 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. +.TH MPDCHECK "1" "September 2009" "mpdcheck" "User Commands" +.SH NAME +unrecognized \- manual page for mpdcheck command +.SH DESCRIPTION +mpdcheck +.PP +This script is a work in progress and may change frequently as we work +with users and gain additional insights into how to improve it. +.PP +This script prints useful information about the host on which it runs. +It is here to help us help users detect problems with configurations of +their computers. For example, some computers are configured to think +of themselves simply as 'localhost' with 127.0.0.1 as the IP address. +This might present problems if a process on that computer wishes to +identify itself by host and port to a process on another computer. +The process on the other computer would try to contact 'localhost'. +.PP +If you are having problems running parallel jobs via mpd on one or more +hosts, you might try running this script once on each of those hosts. +.PP +Any output with *** at the beginning indicates a potential problem +that you may have to resolve before being able to run parallel jobs +via mpd. +.SS "For help:" +.IP +mpdcheck \fB\-h\fR (or \fB\-\-help\fR) +.IP +prints this message +.PP +In the following modes, the \fB\-v\fR (verbose) option provides info about what +mpdcheck is doing; the \fB\-l\fR (long messages) option causes long informational +messages to print in situations where problems are spotted. +.PP +The three major modes of operation for this program are: +.IP +mpdcheck +.IP +looks for config problems on 'this' host; prints as nec +.IP +mpdcheck \fB\-pc\fR +.IP +print config info about 'this' host, e.g. contents of /etc/hosts, etc. +.IP +mpdcheck \fB\-f\fR some_file [\-ssh] +.IP +prints info about 'this' host and locatability info about the ones +listed in some_file as well (note the file might be mpd.hosts); +the \fB\-ssh\fR option can be used in conjunction with the \fB\-f\fR option to +cause ssh tests to be run to each remote host +.IP +mpdcheck \fB\-s\fR +.IP +runs this program as a server on one host +.IP +mpdcheck \fB\-c\fR server_host server_port +.IP +runs a client on another (or same) host; connects to the specifed +host/port where you previously started the server +.SH AUTHOR +mpdcheck was written by The MPICH2 Team. +.PP +This manual page was written by Muammar El Khatib , +for the Debian project (but may be used by others). diff --git a/debian/man.Attic/mpich2version.1 b/debian/man.Attic/mpich2version.1 new file mode 100644 index 00000000000..787b887227a --- /dev/null +++ b/debian/man.Attic/mpich2version.1 @@ -0,0 +1,15 @@ +.TH mpich2version 1 "21 Mar 2005" "" "MPI" +.SH NAME +mpich2version \- prints information about installed version of mpich2 +.SH SYNOPSIS +.B mpich2version + +.SH DESCRIPTION +.B mpich2version +Prints version information such as upstream version, configure options, build +date, etc. +.SH AUTHOR +This manpage has been written by Zach Lowry . Modified from +the page written by Adam Powell for Debian GNU/Linux +.SH "SEE ALSO" +mpirun(1), "MPICH2 user's guide". diff --git a/debian/man.Attic/mpigdb.1 b/debian/man.Attic/mpigdb.1 new file mode 100644 index 00000000000..766af7b8f6d --- /dev/null +++ b/debian/man.Attic/mpigdb.1 @@ -0,0 +1,17 @@ +.TH mpigdb 1 "21 Mar 2005" "" "mpd cmds" +.SH NAME +mpigdb \- debug a MPI program using mpd +.SH SYNOPSIS +.B mpigdb + +.SH DESCRIPTION +.B mpigdb +usage: +.TP +mpigdb -a jobid # to attach to a running job +.TP +mpigdb -n nprocs pgm [pgmars] # to use gdb on a new job + +.SH AUTHOR +This manpage has been written by Zach Lowry , modified from +the page written by Junichi Uekawa for Debian GNU/Linux diff --git a/debian/manpages/mpichversion.1 b/debian/manpages/mpichversion.1 new file mode 100644 index 00000000000..0e90d3d62f6 --- /dev/null +++ b/debian/manpages/mpichversion.1 @@ -0,0 +1,39 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2015 Torquil Macdonald Sørensen , +.\" +.TH mpichversion 1 "2015-11-05" +.\" Please adjust this date whenever revising the manpage. +.SH NAME +mpichversion \- Report on the MPICH version +.SH SYNOPSIS +.B mpichversion +.RI [ options ] +.SH DESCRIPTION +.PP +\fBmpichversion\fP is a program that shows information about the MPICH installation. +.SH OPTIONS +If no options are specified, all the information is displayed. +.TP +.B \-v, \-\-version +Show the version of MPICH. +.TP +.B \-D, \-\-date +Show the release date of this version. +.TP +.B \-patches +Show the identifiers for any applied patches. +.TP +.B \-c, \-\-configure +Show the configure arguments used to build MPICH. +.TP +.B \-d, \-\-device +Show the device for which MPICH was configured. +.SH AUTHOR +This manpage was written by Torquil Macdonald S\[u00F8]rensen . +.SH SEE ALSO +.BR mpiexec.hydra (1), +.BR mpicc.mpich (1), +.BR mpicxx.mpich (1), +.BR mpif77.mpich (1), +.BR mpif90.mpich (1), +.BR mpifort.mpich (1). diff --git a/debian/manpages/mpivars.1 b/debian/manpages/mpivars.1 new file mode 100644 index 00000000000..7f4ca5a1a63 --- /dev/null +++ b/debian/manpages/mpivars.1 @@ -0,0 +1,27 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2015 Torquil Macdonald Sørensen , +.\" +.TH mpivars 1 "2015-11-05" +.\" Please adjust this date whenever revising the manpage. +.SH NAME +mpivars \- Print MPI variables +.SH SYNOPSIS +.B mpivars +.RI [ options ] +.SH DESCRIPTION +.PP +\fBmpivars\fP prints a detailed list of MPI-related variables to screen. +.SH OPTIONS +If no options are specified, variable descriptions are included in the output. +.TP +.B \-nodesc +Don't include variable descriptions. +.SH AUTHOR +This manpage was written by Torquil Macdonald S\[u00F8]rensen . +.SH SEE ALSO +.BR mpiexec.hydra (1), +.BR mpicc.mpich (1), +.BR mpicxx.mpich (1), +.BR mpif77.mpich (1), +.BR mpif90.mpich (1), +.BR mpifort.mpich (1). diff --git a/debian/manpages/parkill.1 b/debian/manpages/parkill.1 new file mode 100644 index 00000000000..6705ae66aad --- /dev/null +++ b/debian/manpages/parkill.1 @@ -0,0 +1,40 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2015 Torquil Macdonald Sørensen , +.\" +.TH mpivars 1 "2015-11-06" +.\" Please adjust this date whenever revising the manpage. +.SH NAME +parkill \- Kill all processes running a specified command +.SH SYNOPSIS +.B parkill [ -debug ] [ -verbose ] [ -user=name ] program +.SH DESCRIPTION +.PP +\fBparkill\fP kills all processes running a specified command. + +Many systems also have the "killall" command; this should be used instead +if it is available. + +This script relies on the ps command; where possible, it uses the +/proc//cmdline interface to more reliably access the commandline +(to avoid matching command line parameters as if they were functions). + +.SH OPTIONS +.TP +.B \-debug +Print debug information. +.TP +.B \-verbose +Be verbose. +.TP +.B \--user=name +Only kill processes belonging to a particular user. Root privileges are required for this option. +.SH AUTHOR +This manpage was written by Torquil Macdonald S\[u00F8]rensen , by copying +from src/env/parkill.in in the MPICH sources. +.SH SEE ALSO +.BR mpiexec.hydra (1), +.BR mpicc.mpich (1), +.BR mpicxx.mpich (1), +.BR mpif77.mpich (1), +.BR mpif90.mpich (1), +.BR mpifort.mpich (1). diff --git a/debian/missing-sources/vis.js b/debian/missing-sources/vis.js new file mode 100644 index 00000000000..2591a2c7ca4 --- /dev/null +++ b/debian/missing-sources/vis.js @@ -0,0 +1,59936 @@ +/** + * vis.js + * https://github.com/almende/vis + * + * A dynamic, browser-based visualization library. + * + * @version 4.21.0 + * @date 2017-10-12 + * + * @license + * Copyright (C) 2011-2017 Almende B.V, http://almende.com + * + * Vis.js is dual licensed under both + * + * * The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * * The MIT License + * http://opensource.org/licenses/MIT + * + * Vis.js may be distributed under either license. + */ + +"use strict"; + +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["vis"] = factory(); + else + root["vis"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 123); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(169); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _getIterator2 = __webpack_require__(77); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _create = __webpack_require__(29); + +var _create2 = _interopRequireDefault(_create); + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +// utility functions + +// first check if moment.js is already loaded in the browser window, if so, +// use this instance. Else, load via commonjs. + + +var moment = __webpack_require__(9); +var uuid = __webpack_require__(157); + +/** + * Test whether given object is a number + * @param {*} object + * @return {Boolean} isNumber + */ +exports.isNumber = function (object) { + return object instanceof Number || typeof object == 'number'; +}; + +/** + * Remove everything in the DOM object + * @param {Element} DOMobject + */ +exports.recursiveDOMDelete = function (DOMobject) { + if (DOMobject) { + while (DOMobject.hasChildNodes() === true) { + exports.recursiveDOMDelete(DOMobject.firstChild); + DOMobject.removeChild(DOMobject.firstChild); + } + } +}; + +/** + * this function gives you a range between 0 and 1 based on the min and max values in the set, the total sum of all values and the current value. + * + * @param {number} min + * @param {number} max + * @param {number} total + * @param {number} value + * @returns {number} + */ +exports.giveRange = function (min, max, total, value) { + if (max == min) { + return 0.5; + } else { + var scale = 1 / (max - min); + return Math.max(0, (value - min) * scale); + } +}; + +/** + * Test whether given object is a string + * @param {*} object + * @return {Boolean} isString + */ +exports.isString = function (object) { + return object instanceof String || typeof object == 'string'; +}; + +/** + * Test whether given object is a Date, or a String containing a Date + * @param {Date | String} object + * @return {Boolean} isDate + */ +exports.isDate = function (object) { + if (object instanceof Date) { + return true; + } else if (exports.isString(object)) { + // test whether this string contains a date + var match = ASPDateRegex.exec(object); + if (match) { + return true; + } else if (!isNaN(Date.parse(object))) { + return true; + } + } + + return false; +}; + +/** + * Create a semi UUID + * source: http://stackoverflow.com/a/105074/1262753 + * @return {string} uuid + */ +exports.randomUUID = function () { + return uuid.v4(); +}; + +/** + * assign all keys of an object that are not nested objects to a certain value (used for color objects). + * @param {object} obj + * @param {number} value + */ +exports.assignAllKeys = function (obj, value) { + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) { + if ((0, _typeof3['default'])(obj[prop]) !== 'object') { + obj[prop] = value; + } + } + } +}; + +/** + * Copy property from b to a if property present in a. + * If property in b explicitly set to null, delete it if `allowDeletion` set. + * + * Internal helper routine, should not be exported. Not added to `exports` for that reason. + * + * @param {object} a target object + * @param {object} b source object + * @param {string} prop name of property to copy to a + * @param {boolean} allowDeletion if true, delete property in a if explicitly set to null in b + * @private + */ +function copyOrDelete(a, b, prop, allowDeletion) { + var doDeletion = false; + if (allowDeletion === true) { + doDeletion = b[prop] === null && a[prop] !== undefined; + } + + if (doDeletion) { + delete a[prop]; + } else { + a[prop] = b[prop]; // Remember, this is a reference copy! + } +} + +/** + * Fill an object with a possibly partially defined other object. + * + * Only copies values for the properties already present in a. + * That means an object is not created on a property if only the b object has it. + * + * @param {object} a + * @param {object} b + * @param {boolean} [allowDeletion=false] if true, delete properties in a that are explicitly set to null in b + */ +exports.fillIfDefined = function (a, b) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + // NOTE: iteration of properties of a + // NOTE: prototype properties iterated over as well + for (var prop in a) { + if (b[prop] !== undefined) { + if (b[prop] === null || (0, _typeof3['default'])(b[prop]) !== 'object') { + // Note: typeof null === 'object' + copyOrDelete(a, b, prop, allowDeletion); + } else { + if ((0, _typeof3['default'])(a[prop]) === 'object') { + exports.fillIfDefined(a[prop], b[prop], allowDeletion); + } + } + } + } +}; + +/** + * Extend object a with the properties of object b or a series of objects + * Only properties with defined values are copied + * @param {Object} a + * @param {...Object} b + * @return {Object} a + */ +exports.extend = function (a, b) { + // eslint-disable-line no-unused-vars + for (var i = 1; i < arguments.length; i++) { + var other = arguments[i]; + for (var prop in other) { + if (other.hasOwnProperty(prop)) { + a[prop] = other[prop]; + } + } + } + return a; +}; + +/** + * Extend object a with selected properties of object b or a series of objects + * Only properties with defined values are copied + * @param {Array.} props + * @param {Object} a + * @param {Object} b + * @return {Object} a + */ +exports.selectiveExtend = function (props, a, b) { + // eslint-disable-line no-unused-vars + if (!Array.isArray(props)) { + throw new Error('Array with property names expected as first argument'); + } + + for (var i = 2; i < arguments.length; i++) { + var other = arguments[i]; + + for (var p = 0; p < props.length; p++) { + var prop = props[p]; + if (other && other.hasOwnProperty(prop)) { + a[prop] = other[prop]; + } + } + } + return a; +}; + +/** + * Extend object a with selected properties of object b. + * Only properties with defined values are copied. + * + * **Note:** Previous version of this routine implied that multiple source objects + * could be used; however, the implementation was **wrong**. + * Since multiple (>1) sources weren't used anywhere in the `vis.js` code, + * this has been removed + * + * @param {Array.} props names of first-level properties to copy over + * @param {object} a target object + * @param {object} b source object + * @param {boolean} [allowDeletion=false] if true, delete property in a if explicitly set to null in b + * @returns {Object} a + */ +exports.selectiveDeepExtend = function (props, a, b) { + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + // TODO: add support for Arrays to deepExtend + if (Array.isArray(b)) { + throw new TypeError('Arrays are not supported by deepExtend'); + } + + for (var p = 0; p < props.length; p++) { + var prop = props[p]; + if (b.hasOwnProperty(prop)) { + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + if (a[prop].constructor === Object) { + exports.deepExtend(a[prop], b[prop], false, allowDeletion); + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + throw new TypeError('Arrays are not supported by deepExtend'); + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + } + return a; +}; + +/** + * Extend object `a` with properties of object `b`, ignoring properties which are explicitly + * specified to be excluded. + * + * The properties of `b` are considered for copying. + * Properties which are themselves objects are are also extended. + * Only properties with defined values are copied + * + * @param {Array.} propsToExclude names of properties which should *not* be copied + * @param {Object} a object to extend + * @param {Object} b object to take properties from for extension + * @param {boolean} [allowDeletion=false] if true, delete properties in a that are explicitly set to null in b + * @return {Object} a + */ +exports.selectiveNotDeepExtend = function (propsToExclude, a, b) { + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + // TODO: add support for Arrays to deepExtend + // NOTE: array properties have an else-below; apparently, there is a problem here. + if (Array.isArray(b)) { + throw new TypeError('Arrays are not supported by deepExtend'); + } + + for (var prop in b) { + if (!b.hasOwnProperty(prop)) continue; // Handle local properties only + if (propsToExclude.indexOf(prop) !== -1) continue; // In exclusion list, skip + + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + if (a[prop].constructor === Object) { + exports.deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated! + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + a[prop] = []; + for (var i = 0; i < b[prop].length; i++) { + a[prop].push(b[prop][i]); + } + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + + return a; +}; + +/** + * Deep extend an object a with the properties of object b + * + * @param {Object} a + * @param {Object} b + * @param {boolean} [protoExtend=false] If true, the prototype values will also be extended. + * (ie. the options objects that inherit from others will also get the inherited options) + * @param {boolean} [allowDeletion=false] If true, the values of fields that are null will be deleted + * @returns {Object} + */ +exports.deepExtend = function (a, b) { + var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + for (var prop in b) { + if (b.hasOwnProperty(prop) || protoExtend === true) { + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + if (a[prop].constructor === Object) { + exports.deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated! + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + a[prop] = []; + for (var i = 0; i < b[prop].length; i++) { + a[prop].push(b[prop][i]); + } + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + } + return a; +}; + +/** + * Test whether all elements in two arrays are equal. + * @param {Array} a + * @param {Array} b + * @return {boolean} Returns true if both arrays have the same length and same + * elements. + */ +exports.equalArray = function (a, b) { + if (a.length != b.length) return false; + + for (var i = 0, len = a.length; i < len; i++) { + if (a[i] != b[i]) return false; + } + + return true; +}; + +/** + * Convert an object to another type + * @param {boolean | number | string | Date | Moment | Null | undefined} object + * @param {string | undefined} type Name of the type. Available types: + * 'Boolean', 'Number', 'String', + * 'Date', 'Moment', ISODate', 'ASPDate'. + * @return {*} object + * @throws Error + */ +exports.convert = function (object, type) { + var match; + + if (object === undefined) { + return undefined; + } + if (object === null) { + return null; + } + + if (!type) { + return object; + } + if (!(typeof type === 'string') && !(type instanceof String)) { + throw new Error('Type must be a string'); + } + + //noinspection FallthroughInSwitchStatementJS + switch (type) { + case 'boolean': + case 'Boolean': + return Boolean(object); + + case 'number': + case 'Number': + if (exports.isString(object) && !isNaN(Date.parse(object))) { + return moment(object).valueOf(); + } else { + return Number(object.valueOf()); + } + case 'string': + case 'String': + return String(object); + + case 'Date': + if (exports.isNumber(object)) { + return new Date(object); + } + if (object instanceof Date) { + return new Date(object.valueOf()); + } else if (moment.isMoment(object)) { + return new Date(object.valueOf()); + } + if (exports.isString(object)) { + match = ASPDateRegex.exec(object); + if (match) { + // object is an ASP date + return new Date(Number(match[1])); // parse number + } else { + return moment(new Date(object)).toDate(); // parse string + } + } else { + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); + } + + case 'Moment': + if (exports.isNumber(object)) { + return moment(object); + } + if (object instanceof Date) { + return moment(object.valueOf()); + } else if (moment.isMoment(object)) { + return moment(object); + } + if (exports.isString(object)) { + match = ASPDateRegex.exec(object); + if (match) { + // object is an ASP date + return moment(Number(match[1])); // parse number + } else { + return moment(object); // parse string + } + } else { + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); + } + + case 'ISODate': + if (exports.isNumber(object)) { + return new Date(object); + } else if (object instanceof Date) { + return object.toISOString(); + } else if (moment.isMoment(object)) { + return object.toDate().toISOString(); + } else if (exports.isString(object)) { + match = ASPDateRegex.exec(object); + if (match) { + // object is an ASP date + return new Date(Number(match[1])).toISOString(); // parse number + } else { + return moment(object).format(); // ISO 8601 + } + } else { + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ISODate'); + } + + case 'ASPDate': + if (exports.isNumber(object)) { + return '/Date(' + object + ')/'; + } else if (object instanceof Date) { + return '/Date(' + object.valueOf() + ')/'; + } else if (exports.isString(object)) { + match = ASPDateRegex.exec(object); + var value; + if (match) { + // object is an ASP date + value = new Date(Number(match[1])).valueOf(); // parse number + } else { + value = new Date(object).valueOf(); // parse string + } + return '/Date(' + value + ')/'; + } else { + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ASPDate'); + } + + default: + throw new Error('Unknown type "' + type + '"'); + } +}; + +// parse ASP.Net Date pattern, +// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/' +// code from http://momentjs.com/ +var ASPDateRegex = /^\/?Date\((\-?\d+)/i; + +/** + * Get the type of an object, for example exports.getType([]) returns 'Array' + * @param {*} object + * @return {string} type + */ +exports.getType = function (object) { + var type = typeof object === 'undefined' ? 'undefined' : (0, _typeof3['default'])(object); + + if (type == 'object') { + if (object === null) { + return 'null'; + } + if (object instanceof Boolean) { + return 'Boolean'; + } + if (object instanceof Number) { + return 'Number'; + } + if (object instanceof String) { + return 'String'; + } + if (Array.isArray(object)) { + return 'Array'; + } + if (object instanceof Date) { + return 'Date'; + } + return 'Object'; + } else if (type == 'number') { + return 'Number'; + } else if (type == 'boolean') { + return 'Boolean'; + } else if (type == 'string') { + return 'String'; + } else if (type === undefined) { + return 'undefined'; + } + + return type; +}; + +/** + * Used to extend an array and copy it. This is used to propagate paths recursively. + * + * @param {Array} arr + * @param {*} newValue + * @returns {Array} + */ +exports.copyAndExtendArray = function (arr, newValue) { + var newArr = []; + for (var i = 0; i < arr.length; i++) { + newArr.push(arr[i]); + } + newArr.push(newValue); + return newArr; +}; + +/** + * Used to extend an array and copy it. This is used to propagate paths recursively. + * + * @param {Array} arr + * @returns {Array} + */ +exports.copyArray = function (arr) { + var newArr = []; + for (var i = 0; i < arr.length; i++) { + newArr.push(arr[i]); + } + return newArr; +}; + +/** + * Retrieve the absolute left value of a DOM element + * @param {Element} elem A dom element, for example a div + * @return {number} left The absolute left position of this element + * in the browser page. + */ +exports.getAbsoluteLeft = function (elem) { + return elem.getBoundingClientRect().left; +}; + +exports.getAbsoluteRight = function (elem) { + return elem.getBoundingClientRect().right; +}; + +/** + * Retrieve the absolute top value of a DOM element + * @param {Element} elem A dom element, for example a div + * @return {number} top The absolute top position of this element + * in the browser page. + */ +exports.getAbsoluteTop = function (elem) { + return elem.getBoundingClientRect().top; +}; + +/** + * add a className to the given elements style + * @param {Element} elem + * @param {string} classNames + */ +exports.addClassName = function (elem, classNames) { + var classes = elem.className.split(' '); + var newClasses = classNames.split(' '); + classes = classes.concat(newClasses.filter(function (className) { + return classes.indexOf(className) < 0; + })); + elem.className = classes.join(' '); +}; + +/** + * add a className to the given elements style + * @param {Element} elem + * @param {string} classNames + */ +exports.removeClassName = function (elem, classNames) { + var classes = elem.className.split(' '); + var oldClasses = classNames.split(' '); + classes = classes.filter(function (className) { + return oldClasses.indexOf(className) < 0; + }); + elem.className = classes.join(' '); +}; + +/** + * For each method for both arrays and objects. + * In case of an array, the built-in Array.forEach() is applied. (**No, it's not!**) + * In case of an Object, the method loops over all properties of the object. + * @param {Object | Array} object An Object or Array + * @param {function} callback Callback method, called for each item in + * the object or array with three parameters: + * callback(value, index, object) + */ +exports.forEach = function (object, callback) { + var i, len; + if (Array.isArray(object)) { + // array + for (i = 0, len = object.length; i < len; i++) { + callback(object[i], i, object); + } + } else { + // object + for (i in object) { + if (object.hasOwnProperty(i)) { + callback(object[i], i, object); + } + } + } +}; + +/** + * Convert an object into an array: all objects properties are put into the + * array. The resulting array is unordered. + * @param {Object} object + * @returns {Array} array + */ +exports.toArray = function (object) { + var array = []; + + for (var prop in object) { + if (object.hasOwnProperty(prop)) array.push(object[prop]); + } + + return array; +}; + +/** + * Update a property in an object + * @param {Object} object + * @param {string} key + * @param {*} value + * @return {Boolean} changed + */ +exports.updateProperty = function (object, key, value) { + if (object[key] !== value) { + object[key] = value; + return true; + } else { + return false; + } +}; + +/** + * Throttle the given function to be only executed once per animation frame + * @param {function} fn + * @returns {function} Returns the throttled function + */ +exports.throttle = function (fn) { + var scheduled = false; + + return function throttled() { + if (!scheduled) { + scheduled = true; + requestAnimationFrame(function () { + scheduled = false; + fn(); + }); + } + }; +}; + +/** + * Add and event listener. Works for all browsers + * @param {Element} element An html element + * @param {string} action The action, for example "click", + * without the prefix "on" + * @param {function} listener The callback function to be executed + * @param {boolean} [useCapture] + */ +exports.addEventListener = function (element, action, listener, useCapture) { + if (element.addEventListener) { + if (useCapture === undefined) useCapture = false; + + if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { + action = "DOMMouseScroll"; // For Firefox + } + + element.addEventListener(action, listener, useCapture); + } else { + element.attachEvent("on" + action, listener); // IE browsers + } +}; + +/** + * Remove an event listener from an element + * @param {Element} element An html dom element + * @param {string} action The name of the event, for example "mousedown" + * @param {function} listener The listener function + * @param {boolean} [useCapture] + */ +exports.removeEventListener = function (element, action, listener, useCapture) { + if (element.removeEventListener) { + // non-IE browsers + if (useCapture === undefined) useCapture = false; + + if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { + action = "DOMMouseScroll"; // For Firefox + } + + element.removeEventListener(action, listener, useCapture); + } else { + // IE browsers + element.detachEvent("on" + action, listener); + } +}; + +/** + * Cancels the event if it is cancelable, without stopping further propagation of the event. + * @param {Event} event + */ +exports.preventDefault = function (event) { + if (!event) event = window.event; + + if (event.preventDefault) { + event.preventDefault(); // non-IE browsers + } else { + event.returnValue = false; // IE browsers + } +}; + +/** + * Get HTML element which is the target of the event + * @param {Event} event + * @return {Element} target element + */ +exports.getTarget = function (event) { + // code from http://www.quirksmode.org/js/events_properties.html + if (!event) { + event = window.event; + } + + var target; + + if (event.target) { + target = event.target; + } else if (event.srcElement) { + target = event.srcElement; + } + + if (target.nodeType != undefined && target.nodeType == 3) { + // defeat Safari bug + target = target.parentNode; + } + + return target; +}; + +/** + * Check if given element contains given parent somewhere in the DOM tree + * @param {Element} element + * @param {Element} parent + * @returns {boolean} + */ +exports.hasParent = function (element, parent) { + var e = element; + + while (e) { + if (e === parent) { + return true; + } + e = e.parentNode; + } + + return false; +}; + +exports.option = {}; + +/** + * Convert a value into a boolean + * @param {Boolean | function | undefined} value + * @param {boolean} [defaultValue] + * @returns {Boolean} bool + */ +exports.option.asBoolean = function (value, defaultValue) { + if (typeof value == 'function') { + value = value(); + } + + if (value != null) { + return value != false; + } + + return defaultValue || null; +}; + +/** + * Convert a value into a number + * @param {Boolean | function | undefined} value + * @param {number} [defaultValue] + * @returns {number} number + */ +exports.option.asNumber = function (value, defaultValue) { + if (typeof value == 'function') { + value = value(); + } + + if (value != null) { + return Number(value) || defaultValue || null; + } + + return defaultValue || null; +}; + +/** + * Convert a value into a string + * @param {string | function | undefined} value + * @param {string} [defaultValue] + * @returns {String} str + */ +exports.option.asString = function (value, defaultValue) { + if (typeof value == 'function') { + value = value(); + } + + if (value != null) { + return String(value); + } + + return defaultValue || null; +}; + +/** + * Convert a size or location into a string with pixels or a percentage + * @param {string | number | function | undefined} value + * @param {string} [defaultValue] + * @returns {String} size + */ +exports.option.asSize = function (value, defaultValue) { + if (typeof value == 'function') { + value = value(); + } + + if (exports.isString(value)) { + return value; + } else if (exports.isNumber(value)) { + return value + 'px'; + } else { + return defaultValue || null; + } +}; + +/** + * Convert a value into a DOM element + * @param {HTMLElement | function | undefined} value + * @param {HTMLElement} [defaultValue] + * @returns {HTMLElement | null} dom + */ +exports.option.asElement = function (value, defaultValue) { + if (typeof value == 'function') { + value = value(); + } + + return value || defaultValue || null; +}; + +/** + * http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb + * + * @param {string} hex + * @returns {{r: *, g: *, b: *}} | 255 range + */ +exports.hexToRGB = function (hex) { + // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") + var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; + hex = hex.replace(shorthandRegex, function (m, r, g, b) { + return r + r + g + g + b + b; + }); + var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null; +}; + +/** + * This function takes color in hex format or rgb() or rgba() format and overrides the opacity. Returns rgba() string. + * @param {string} color + * @param {number} opacity + * @returns {String} + */ +exports.overrideOpacity = function (color, opacity) { + var rgb; + if (color.indexOf("rgba") != -1) { + return color; + } else if (color.indexOf("rgb") != -1) { + rgb = color.substr(color.indexOf("(") + 1).replace(")", "").split(","); + return "rgba(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + "," + opacity + ")"; + } else { + rgb = exports.hexToRGB(color); + if (rgb == null) { + return color; + } else { + return "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + opacity + ")"; + } + } +}; + +/** + * + * @param {number} red 0 -- 255 + * @param {number} green 0 -- 255 + * @param {number} blue 0 -- 255 + * @returns {String} + * @constructor + */ +exports.RGBToHex = function (red, green, blue) { + return "#" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1); +}; + +/** + * Parse a color property into an object with border, background, and + * highlight colors + * @param {Object | String} color + * @return {Object} colorObject + */ +exports.parseColor = function (color) { + var c; + if (exports.isString(color) === true) { + if (exports.isValidRGB(color) === true) { + var rgb = color.substr(4).substr(0, color.length - 5).split(',').map(function (value) { + return parseInt(value); + }); + color = exports.RGBToHex(rgb[0], rgb[1], rgb[2]); + } + if (exports.isValidHex(color) === true) { + var hsv = exports.hexToHSV(color); + var lighterColorHSV = { h: hsv.h, s: hsv.s * 0.8, v: Math.min(1, hsv.v * 1.02) }; + var darkerColorHSV = { h: hsv.h, s: Math.min(1, hsv.s * 1.25), v: hsv.v * 0.8 }; + var darkerColorHex = exports.HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v); + var lighterColorHex = exports.HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v); + c = { + background: color, + border: darkerColorHex, + highlight: { + background: lighterColorHex, + border: darkerColorHex + }, + hover: { + background: lighterColorHex, + border: darkerColorHex + } + }; + } else { + c = { + background: color, + border: color, + highlight: { + background: color, + border: color + }, + hover: { + background: color, + border: color + } + }; + } + } else { + c = {}; + c.background = color.background || undefined; + c.border = color.border || undefined; + + if (exports.isString(color.highlight)) { + c.highlight = { + border: color.highlight, + background: color.highlight + }; + } else { + c.highlight = {}; + c.highlight.background = color.highlight && color.highlight.background || undefined; + c.highlight.border = color.highlight && color.highlight.border || undefined; + } + + if (exports.isString(color.hover)) { + c.hover = { + border: color.hover, + background: color.hover + }; + } else { + c.hover = {}; + c.hover.background = color.hover && color.hover.background || undefined; + c.hover.border = color.hover && color.hover.border || undefined; + } + } + + return c; +}; + +/** + * http://www.javascripter.net/faq/rgb2hsv.htm + * + * @param {number} red + * @param {number} green + * @param {number} blue + * @returns {{h: number, s: number, v: number}} + * @constructor + */ +exports.RGBToHSV = function (red, green, blue) { + red = red / 255;green = green / 255;blue = blue / 255; + var minRGB = Math.min(red, Math.min(green, blue)); + var maxRGB = Math.max(red, Math.max(green, blue)); + + // Black-gray-white + if (minRGB == maxRGB) { + return { h: 0, s: 0, v: minRGB }; + } + + // Colors other than black-gray-white: + var d = red == minRGB ? green - blue : blue == minRGB ? red - green : blue - red; + var h = red == minRGB ? 3 : blue == minRGB ? 1 : 5; + var hue = 60 * (h - d / (maxRGB - minRGB)) / 360; + var saturation = (maxRGB - minRGB) / maxRGB; + var value = maxRGB; + return { h: hue, s: saturation, v: value }; +}; + +var cssUtil = { + // split a string with css styles into an object with key/values + split: function split(cssText) { + var styles = {}; + + cssText.split(';').forEach(function (style) { + if (style.trim() != '') { + var parts = style.split(':'); + var key = parts[0].trim(); + var value = parts[1].trim(); + styles[key] = value; + } + }); + + return styles; + }, + + // build a css text string from an object with key/values + join: function join(styles) { + return (0, _keys2['default'])(styles).map(function (key) { + return key + ': ' + styles[key]; + }).join('; '); + } +}; + +/** + * Append a string with css styles to an element + * @param {Element} element + * @param {string} cssText + */ +exports.addCssText = function (element, cssText) { + var currentStyles = cssUtil.split(element.style.cssText); + var newStyles = cssUtil.split(cssText); + var styles = exports.extend(currentStyles, newStyles); + + element.style.cssText = cssUtil.join(styles); +}; + +/** + * Remove a string with css styles from an element + * @param {Element} element + * @param {string} cssText + */ +exports.removeCssText = function (element, cssText) { + var styles = cssUtil.split(element.style.cssText); + var removeStyles = cssUtil.split(cssText); + + for (var key in removeStyles) { + if (removeStyles.hasOwnProperty(key)) { + delete styles[key]; + } + } + + element.style.cssText = cssUtil.join(styles); +}; + +/** + * https://gist.github.com/mjijackson/5311256 + * @param {number} h + * @param {number} s + * @param {number} v + * @returns {{r: number, g: number, b: number}} + * @constructor + */ +exports.HSVToRGB = function (h, s, v) { + var r, g, b; + + var i = Math.floor(h * 6); + var f = h * 6 - i; + var p = v * (1 - s); + var q = v * (1 - f * s); + var t = v * (1 - (1 - f) * s); + + switch (i % 6) { + case 0: + r = v, g = t, b = p;break; + case 1: + r = q, g = v, b = p;break; + case 2: + r = p, g = v, b = t;break; + case 3: + r = p, g = q, b = v;break; + case 4: + r = t, g = p, b = v;break; + case 5: + r = v, g = p, b = q;break; + } + + return { r: Math.floor(r * 255), g: Math.floor(g * 255), b: Math.floor(b * 255) }; +}; + +exports.HSVToHex = function (h, s, v) { + var rgb = exports.HSVToRGB(h, s, v); + return exports.RGBToHex(rgb.r, rgb.g, rgb.b); +}; + +exports.hexToHSV = function (hex) { + var rgb = exports.hexToRGB(hex); + return exports.RGBToHSV(rgb.r, rgb.g, rgb.b); +}; + +exports.isValidHex = function (hex) { + var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex); + return isOk; +}; + +exports.isValidRGB = function (rgb) { + rgb = rgb.replace(" ", ""); + var isOk = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(rgb); + return isOk; +}; +exports.isValidRGBA = function (rgba) { + rgba = rgba.replace(" ", ""); + var isOk = /rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(rgba); + return isOk; +}; + +/** + * This recursively redirects the prototype of JSON objects to the referenceObject + * This is used for default options. + * + * @param {Array.} fields + * @param {Object} referenceObject + * @returns {*} + */ +exports.selectiveBridgeObject = function (fields, referenceObject) { + if (referenceObject !== null && (typeof referenceObject === 'undefined' ? 'undefined' : (0, _typeof3['default'])(referenceObject)) === "object") { + // !!! typeof null === 'object' + var objectTo = (0, _create2['default'])(referenceObject); + for (var i = 0; i < fields.length; i++) { + if (referenceObject.hasOwnProperty(fields[i])) { + if ((0, _typeof3['default'])(referenceObject[fields[i]]) == "object") { + objectTo[fields[i]] = exports.bridgeObject(referenceObject[fields[i]]); + } + } + } + return objectTo; + } else { + return null; + } +}; + +/** + * This recursively redirects the prototype of JSON objects to the referenceObject + * This is used for default options. + * + * @param {Object} referenceObject + * @returns {*} + */ +exports.bridgeObject = function (referenceObject) { + if (referenceObject !== null && (typeof referenceObject === 'undefined' ? 'undefined' : (0, _typeof3['default'])(referenceObject)) === "object") { + // !!! typeof null === 'object' + var objectTo = (0, _create2['default'])(referenceObject); + if (referenceObject instanceof Element) { + // Avoid bridging DOM objects + objectTo = referenceObject; + } else { + objectTo = (0, _create2['default'])(referenceObject); + for (var i in referenceObject) { + if (referenceObject.hasOwnProperty(i)) { + if ((0, _typeof3['default'])(referenceObject[i]) == "object") { + objectTo[i] = exports.bridgeObject(referenceObject[i]); + } + } + } + } + return objectTo; + } else { + return null; + } +}; + +/** + * This method provides a stable sort implementation, very fast for presorted data + * + * @param {Array} a the array + * @param {function} compare an order comparator + * @returns {Array} + */ +exports.insertSort = function (a, compare) { + for (var i = 0; i < a.length; i++) { + var k = a[i]; + for (var j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) { + a[j] = a[j - 1]; + } + a[j] = k; + } + return a; +}; + +/** + * This is used to set the options of subobjects in the options object. + * + * A requirement of these subobjects is that they have an 'enabled' element + * which is optional for the user but mandatory for the program. + * + * The added value here of the merge is that option 'enabled' is set as required. + * + * + * @param {object} mergeTarget | either this.options or the options used for the groups. + * @param {object} options | options + * @param {string} option | option key in the options argument + * @param {object} globalOptions | global options, passed in to determine value of option 'enabled' + */ +exports.mergeOptions = function (mergeTarget, options, option) { + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + // Local helpers + var isPresent = function isPresent(obj) { + return obj !== null && obj !== undefined; + }; + + var isObject = function isObject(obj) { + return obj !== null && (typeof obj === 'undefined' ? 'undefined' : (0, _typeof3['default'])(obj)) === 'object'; + }; + + // https://stackoverflow.com/a/34491287/1223531 + var isEmpty = function isEmpty(obj) { + for (var x in obj) { + if (obj.hasOwnProperty(x)) return false; + } + return true; + }; + + // Guards + if (!isObject(mergeTarget)) { + throw new Error('Parameter mergeTarget must be an object'); + } + + if (!isObject(options)) { + throw new Error('Parameter options must be an object'); + } + + if (!isPresent(option)) { + throw new Error('Parameter option must have a value'); + } + + if (!isObject(globalOptions)) { + throw new Error('Parameter globalOptions must be an object'); + } + + // + // Actual merge routine, separated from main logic + // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue. + // + var doMerge = function doMerge(target, options, option) { + if (!isObject(target[option])) { + target[option] = {}; + } + + var src = options[option]; + var dst = target[option]; + for (var prop in src) { + if (src.hasOwnProperty(prop)) { + dst[prop] = src[prop]; + } + } + }; + + // Local initialization + var srcOption = options[option]; + var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions); + var globalOption = globalPassed ? globalOptions[option] : undefined; + var globalEnabled = globalOption ? globalOption.enabled : undefined; + + ///////////////////////////////////////// + // Main routine + ///////////////////////////////////////// + if (srcOption === undefined) { + return; // Nothing to do + } + + if (typeof srcOption === 'boolean') { + if (!isObject(mergeTarget[option])) { + mergeTarget[option] = {}; + } + + mergeTarget[option].enabled = srcOption; + return; + } + + if (srcOption === null && !isObject(mergeTarget[option])) { + // If possible, explicit copy from globals + if (isPresent(globalOption)) { + mergeTarget[option] = (0, _create2['default'])(globalOption); + } else { + return; // Nothing to do + } + } + + if (!isObject(srcOption)) { + return; + } + + // + // Ensure that 'enabled' is properly set. It is required internally + // Note that the value from options will always overwrite the existing value + // + var enabled = true; // default value + + if (srcOption.enabled !== undefined) { + enabled = srcOption.enabled; + } else { + // Take from globals, if present + if (globalEnabled !== undefined) { + enabled = globalOption.enabled; + } + } + + doMerge(mergeTarget, options, option); + mergeTarget[option].enabled = enabled; +}; + +/** + * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses + * this function will then iterate in both directions over this sorted list to find all visible items. + * + * @param {Item[]} orderedItems | Items ordered by start + * @param {function} comparator | -1 is lower, 0 is equal, 1 is higher + * @param {string} field + * @param {string} field2 + * @returns {number} + * @private + */ +exports.binarySearchCustom = function (orderedItems, comparator, field, field2) { + var maxIterations = 10000; + var iteration = 0; + var low = 0; + var high = orderedItems.length - 1; + + while (low <= high && iteration < maxIterations) { + var middle = Math.floor((low + high) / 2); + + var item = orderedItems[middle]; + var value = field2 === undefined ? item[field] : item[field][field2]; + + var searchResult = comparator(value); + if (searchResult == 0) { + // jihaa, found a visible item! + return middle; + } else if (searchResult == -1) { + // it is too small --> increase low + low = middle + 1; + } else { + // it is too big --> decrease high + high = middle - 1; + } + + iteration++; + } + + return -1; +}; + +/** + * This function does a binary search for a specific value in a sorted array. If it does not exist but is in between of + * two values, we return either the one before or the one after, depending on user input + * If it is found, we return the index, else -1. + * + * @param {Array} orderedItems + * @param {{start: number, end: number}} target + * @param {string} field + * @param {string} sidePreference 'before' or 'after' + * @param {function} comparator an optional comparator, returning -1,0,1 for <,==,>. + * @returns {number} + * @private + */ +exports.binarySearchValue = function (orderedItems, target, field, sidePreference, comparator) { + var maxIterations = 10000; + var iteration = 0; + var low = 0; + var high = orderedItems.length - 1; + var prevValue, value, nextValue, middle; + + comparator = comparator != undefined ? comparator : function (a, b) { + return a == b ? 0 : a < b ? -1 : 1; + }; + + while (low <= high && iteration < maxIterations) { + // get a new guess + middle = Math.floor(0.5 * (high + low)); + prevValue = orderedItems[Math.max(0, middle - 1)][field]; + value = orderedItems[middle][field]; + nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field]; + + if (comparator(value, target) == 0) { + // we found the target + return middle; + } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) { + // target is in between of the previous and the current + return sidePreference == 'before' ? Math.max(0, middle - 1) : middle; + } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) { + // target is in between of the current and the next + return sidePreference == 'before' ? middle : Math.min(orderedItems.length - 1, middle + 1); + } else { + // didnt find the target, we need to change our boundaries. + if (comparator(value, target) < 0) { + // it is too small --> increase low + low = middle + 1; + } else { + // it is too big --> decrease high + high = middle - 1; + } + } + iteration++; + } + + // didnt find anything. Return -1. + return -1; +}; + +/* + * Easing Functions - inspired from http://gizma.com/easing/ + * only considering the t value for the range [0, 1] => [0, 1] + * https://gist.github.com/gre/1650294 + */ +exports.easingFunctions = { + // no easing, no acceleration + linear: function linear(t) { + return t; + }, + // accelerating from zero velocity + easeInQuad: function easeInQuad(t) { + return t * t; + }, + // decelerating to zero velocity + easeOutQuad: function easeOutQuad(t) { + return t * (2 - t); + }, + // acceleration until halfway, then deceleration + easeInOutQuad: function easeInOutQuad(t) { + return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t; + }, + // accelerating from zero velocity + easeInCubic: function easeInCubic(t) { + return t * t * t; + }, + // decelerating to zero velocity + easeOutCubic: function easeOutCubic(t) { + return --t * t * t + 1; + }, + // acceleration until halfway, then deceleration + easeInOutCubic: function easeInOutCubic(t) { + return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; + }, + // accelerating from zero velocity + easeInQuart: function easeInQuart(t) { + return t * t * t * t; + }, + // decelerating to zero velocity + easeOutQuart: function easeOutQuart(t) { + return 1 - --t * t * t * t; + }, + // acceleration until halfway, then deceleration + easeInOutQuart: function easeInOutQuart(t) { + return t < .5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t; + }, + // accelerating from zero velocity + easeInQuint: function easeInQuint(t) { + return t * t * t * t * t; + }, + // decelerating to zero velocity + easeOutQuint: function easeOutQuint(t) { + return 1 + --t * t * t * t * t; + }, + // acceleration until halfway, then deceleration + easeInOutQuint: function easeInOutQuint(t) { + return t < .5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t; + } +}; + +exports.getScrollBarWidth = function () { + var inner = document.createElement('p'); + inner.style.width = "100%"; + inner.style.height = "200px"; + + var outer = document.createElement('div'); + outer.style.position = "absolute"; + outer.style.top = "0px"; + outer.style.left = "0px"; + outer.style.visibility = "hidden"; + outer.style.width = "200px"; + outer.style.height = "150px"; + outer.style.overflow = "hidden"; + outer.appendChild(inner); + + document.body.appendChild(outer); + var w1 = inner.offsetWidth; + outer.style.overflow = 'scroll'; + var w2 = inner.offsetWidth; + if (w1 == w2) w2 = outer.clientWidth; + + document.body.removeChild(outer); + + return w1 - w2; +}; + +exports.topMost = function (pile, accessors) { + var candidate = void 0; + if (!Array.isArray(accessors)) { + accessors = [accessors]; + } + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3['default'])(pile), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var member = _step.value; + + if (member) { + candidate = member[accessors[0]]; + for (var i = 1; i < accessors.length; i++) { + if (candidate) { + candidate = candidate[accessors[i]]; + } else { + continue; + } + } + if (typeof candidate != 'undefined') { + break; + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator['return']) { + _iterator['return'](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return candidate; +}; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(194), __esModule: true }; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _setPrototypeOf = __webpack_require__(196); + +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + +var _create = __webpack_require__(29); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; +}; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(142); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(144); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.1' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(140), __esModule: true }; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// first check if moment.js is already loaded in the browser window, if so, +// use this instance. Else, load via commonjs. +module.exports = typeof window !== 'undefined' && window['moment'] || __webpack_require__(154); + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Setup a mock hammer.js object, for unit testing. + * + * Inspiration: https://github.com/uber/deck.gl/pull/658 + * + * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}} + */ +function hammerMock() { + var noop = function noop() {}; + + return { + on: noop, + off: noop, + destroy: noop, + emit: noop, + + get: function get(m) { + //eslint-disable-line no-unused-vars + return { + set: noop + }; + } + }; +} + +if (typeof window !== 'undefined') { + var propagating = __webpack_require__(175); + var Hammer = window['Hammer'] || __webpack_require__(176); + module.exports = propagating(Hammer, { + preventDefault: 'mouse' + }); +} else { + module.exports = function () { + // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object. + return hammerMock(); + }; +} + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _stringify = __webpack_require__(19); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var Queue = __webpack_require__(43); + +/** + * DataSet + * // TODO: add a DataSet constructor DataSet(data, options) + * + * Usage: + * var dataSet = new DataSet({ + * fieldId: '_id', + * type: { + * // ... + * } + * }); + * + * dataSet.add(item); + * dataSet.add(data); + * dataSet.update(item); + * dataSet.update(data); + * dataSet.remove(id); + * dataSet.remove(ids); + * var data = dataSet.get(); + * var data = dataSet.get(id); + * var data = dataSet.get(ids); + * var data = dataSet.get(ids, options, data); + * dataSet.clear(); + * + * A data set can: + * - add/remove/update data + * - gives triggers upon changes in the data + * - can import/export data in various data formats + * + * @param {Array} [data] Optional array with initial data + * @param {Object} [options] Available options: + * {string} fieldId Field name of the id in the + * items, 'id' by default. + * {Object.} addedIds Array with the ids of the added items + */ +DataSet.prototype.add = function (data, senderId) { + var addedIds = [], + id, + me = this; + + if (Array.isArray(data)) { + // Array + for (var i = 0, len = data.length; i < len; i++) { + id = me._addItem(data[i]); + addedIds.push(id); + } + } else if (data && (typeof data === 'undefined' ? 'undefined' : (0, _typeof3['default'])(data)) === 'object') { + // Single item + id = me._addItem(data); + addedIds.push(id); + } else { + throw new Error('Unknown dataType'); + } + + if (addedIds.length) { + this._trigger('add', { items: addedIds }, senderId); + } + + return addedIds; +}; + +/** + * Update existing items. When an item does not exist, it will be created + * @param {Object | Array} data + * @param {string} [senderId] Optional sender id + * @return {Array.} updatedIds The ids of the added or updated items + * @throws {Error} Unknown Datatype + */ +DataSet.prototype.update = function (data, senderId) { + var addedIds = []; + var updatedIds = []; + var oldData = []; + var updatedData = []; + var me = this; + var fieldId = me._fieldId; + + var addOrUpdate = function addOrUpdate(item) { + var id = item[fieldId]; + if (me._data[id]) { + var oldItem = util.extend({}, me._data[id]); + // update item + id = me._updateItem(item); + updatedIds.push(id); + updatedData.push(item); + oldData.push(oldItem); + } else { + // add new item + id = me._addItem(item); + addedIds.push(id); + } + }; + + if (Array.isArray(data)) { + // Array + for (var i = 0, len = data.length; i < len; i++) { + if (data[i] && (0, _typeof3['default'])(data[i]) === 'object') { + addOrUpdate(data[i]); + } else { + console.warn('Ignoring input item, which is not an object at index ' + i); + } + } + } else if (data && (typeof data === 'undefined' ? 'undefined' : (0, _typeof3['default'])(data)) === 'object') { + // Single item + addOrUpdate(data); + } else { + throw new Error('Unknown dataType'); + } + + if (addedIds.length) { + this._trigger('add', { items: addedIds }, senderId); + } + if (updatedIds.length) { + var props = { items: updatedIds, oldData: oldData, data: updatedData }; + // TODO: remove deprecated property 'data' some day + //Object.defineProperty(props, 'data', { + // 'get': (function() { + // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); + // return updatedData; + // }).bind(this) + //}); + this._trigger('update', props, senderId); + } + + return addedIds.concat(updatedIds); +}; + +/** + * Get a data item or multiple items. + * + * Usage: + * + * get() + * get(options: Object) + * + * get(id: number | string) + * get(id: number | string, options: Object) + * + * get(ids: number[] | string[]) + * get(ids: number[] | string[], options: Object) + * + * Where: + * + * {number | string} id The id of an item + * {number[] | string{}} ids An array with ids of items + * {Object} options An Object with options. Available options: + * {string} [returnType] Type of data to be returned. + * Can be 'Array' (default) or 'Object'. + * {Object.} [type] + * {string[]} [fields] field names to be returned + * {function} [filter] filter items + * {string | function} [order] Order the items by a field name or custom sort function. + * @param {Array} args + * @returns {DataSet} + * @throws Error + */ +DataSet.prototype.get = function (args) { + // eslint-disable-line no-unused-vars + var me = this; + + // parse the arguments + var id, ids, options; + var firstType = util.getType(arguments[0]); + if (firstType == 'String' || firstType == 'Number') { + // get(id [, options]) + id = arguments[0]; + options = arguments[1]; + } else if (firstType == 'Array') { + // get(ids [, options]) + ids = arguments[0]; + options = arguments[1]; + } else { + // get([, options]) + options = arguments[0]; + } + + // determine the return type + var returnType; + if (options && options.returnType) { + var allowedValues = ['Array', 'Object']; + returnType = allowedValues.indexOf(options.returnType) == -1 ? 'Array' : options.returnType; + } else { + returnType = 'Array'; + } + + // build options + var type = options && options.type || this._options.type; + var filter = options && options.filter; + var items = [], + item, + itemIds, + itemId, + i, + len; + + // convert items + if (id != undefined) { + // return a single item + item = me._getItem(id, type); + if (item && filter && !filter(item)) { + item = null; + } + } else if (ids != undefined) { + // return a subset of items + for (i = 0, len = ids.length; i < len; i++) { + item = me._getItem(ids[i], type); + if (!filter || filter(item)) { + items.push(item); + } + } + } else { + // return all items + itemIds = (0, _keys2['default'])(this._data); + for (i = 0, len = itemIds.length; i < len; i++) { + itemId = itemIds[i]; + item = me._getItem(itemId, type); + if (!filter || filter(item)) { + items.push(item); + } + } + } + + // order the results + if (options && options.order && id == undefined) { + this._sort(items, options.order); + } + + // filter fields of the items + if (options && options.fields) { + var fields = options.fields; + if (id != undefined) { + item = this._filterFields(item, fields); + } else { + for (i = 0, len = items.length; i < len; i++) { + items[i] = this._filterFields(items[i], fields); + } + } + } + + // return the results + if (returnType == 'Object') { + var result = {}, + resultant; + for (i = 0, len = items.length; i < len; i++) { + resultant = items[i]; + result[resultant.id] = resultant; + } + return result; + } else { + if (id != undefined) { + // a single item + return item; + } else { + // just return our array + return items; + } + } +}; + +/** + * Get ids of all items or from a filtered set of items. + * @param {Object} [options] An Object with options. Available options: + * {function} [filter] filter items + * {string | function} [order] Order the items by + * a field name or custom sort function. + * @return {Array.} ids + */ +DataSet.prototype.getIds = function (options) { + var data = this._data, + filter = options && options.filter, + order = options && options.order, + type = options && options.type || this._options.type, + itemIds = (0, _keys2['default'])(data), + i, + len, + id, + item, + items, + ids = []; + + if (filter) { + // get filtered items + if (order) { + // create ordered list + items = []; + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (filter(item)) { + items.push(item); + } + } + + this._sort(items, order); + + for (i = 0, len = items.length; i < len; i++) { + ids.push(items[i][this._fieldId]); + } + } else { + // create unordered list + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (filter(item)) { + ids.push(item[this._fieldId]); + } + } + } + } else { + // get all items + if (order) { + // create an ordered list + items = []; + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + items.push(data[id]); + } + + this._sort(items, order); + + for (i = 0, len = items.length; i < len; i++) { + ids.push(items[i][this._fieldId]); + } + } else { + // create unordered list + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = data[id]; + ids.push(item[this._fieldId]); + } + } + } + + return ids; +}; + +/** + * Returns the DataSet itself. Is overwritten for example by the DataView, + * which returns the DataSet it is connected to instead. + * @returns {DataSet} + */ +DataSet.prototype.getDataSet = function () { + return this; +}; + +/** + * Execute a callback function for every item in the dataset. + * @param {function} callback + * @param {Object} [options] Available options: + * {Object.} [type] + * {string[]} [fields] filter fields + * {function} [filter] filter items + * {string | function} [order] Order the items by + * a field name or custom sort function. + */ +DataSet.prototype.forEach = function (callback, options) { + var filter = options && options.filter, + type = options && options.type || this._options.type, + data = this._data, + itemIds = (0, _keys2['default'])(data), + i, + len, + item, + id; + + if (options && options.order) { + // execute forEach on ordered list + var items = this.get(options); + + for (i = 0, len = items.length; i < len; i++) { + item = items[i]; + id = item[this._fieldId]; + callback(item, id); + } + } else { + // unordered + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (!filter || filter(item)) { + callback(item, id); + } + } + } +}; + +/** + * Map every item in the dataset. + * @param {function} callback + * @param {Object} [options] Available options: + * {Object.} [type] + * {string[]} [fields] filter fields + * {function} [filter] filter items + * {string | function} [order] Order the items by + * a field name or custom sort function. + * @return {Object[]} mappedItems + */ +DataSet.prototype.map = function (callback, options) { + var filter = options && options.filter, + type = options && options.type || this._options.type, + mappedItems = [], + data = this._data, + itemIds = (0, _keys2['default'])(data), + i, + len, + id, + item; + + // convert and filter items + for (i = 0, len = itemIds.length; i < len; i++) { + id = itemIds[i]; + item = this._getItem(id, type); + if (!filter || filter(item)) { + mappedItems.push(callback(item, id)); + } + } + + // order items + if (options && options.order) { + this._sort(mappedItems, options.order); + } + + return mappedItems; +}; + +/** + * Filter the fields of an item + * @param {Object | null} item + * @param {string[]} fields Field names + * @return {Object | null} filteredItem or null if no item is provided + * @private + */ +DataSet.prototype._filterFields = function (item, fields) { + if (!item) { + // item is null + return item; + } + + var filteredItem = {}, + itemFields = (0, _keys2['default'])(item), + len = itemFields.length, + i, + field; + + if (Array.isArray(fields)) { + for (i = 0; i < len; i++) { + field = itemFields[i]; + if (fields.indexOf(field) != -1) { + filteredItem[field] = item[field]; + } + } + } else { + for (i = 0; i < len; i++) { + field = itemFields[i]; + if (fields.hasOwnProperty(field)) { + filteredItem[fields[field]] = item[field]; + } + } + } + + return filteredItem; +}; + +/** + * Sort the provided array with items + * @param {Object[]} items + * @param {string | function} order A field name or custom sort function. + * @private + */ +DataSet.prototype._sort = function (items, order) { + if (util.isString(order)) { + // order by provided field name + var name = order; // field name + items.sort(function (a, b) { + var av = a[name]; + var bv = b[name]; + return av > bv ? 1 : av < bv ? -1 : 0; + }); + } else if (typeof order === 'function') { + // order by sort function + items.sort(order); + } + // TODO: extend order by an Object {field:string, direction:string} + // where direction can be 'asc' or 'desc' + else { + throw new TypeError('Order must be a function or a string'); + } +}; + +/** + * Remove an object by pointer or by id + * @param {string | number | Object | Array.} id Object or id, or an array with + * objects or ids to be removed + * @param {string} [senderId] Optional sender id + * @return {Array.} removedIds + */ +DataSet.prototype.remove = function (id, senderId) { + var removedIds = [], + removedItems = [], + ids = [], + i, + len, + itemId, + item; + + // force everything to be an array for simplicity + ids = Array.isArray(id) ? id : [id]; + + for (i = 0, len = ids.length; i < len; i++) { + item = this._remove(ids[i]); + if (item) { + itemId = item[this._fieldId]; + if (itemId != undefined) { + removedIds.push(itemId); + removedItems.push(item); + } + } + } + + if (removedIds.length) { + this._trigger('remove', { items: removedIds, oldData: removedItems }, senderId); + } + + return removedIds; +}; + +/** + * Remove an item by its id + * @param {number | string | Object} id id or item + * @returns {number | string | null} id + * @private + */ +DataSet.prototype._remove = function (id) { + var item, ident; + + // confirm the id to use based on the args type + if (util.isNumber(id) || util.isString(id)) { + ident = id; + } else if (id && (typeof id === 'undefined' ? 'undefined' : (0, _typeof3['default'])(id)) === 'object') { + ident = id[this._fieldId]; // look for the identifier field using _fieldId + } + + // do the remove if the item is found + if (ident !== undefined && this._data[ident]) { + item = this._data[ident]; + delete this._data[ident]; + this.length--; + return item; + } + return null; +}; + +/** + * Clear the data + * @param {string} [senderId] Optional sender id + * @return {Array.} removedIds The ids of all removed items + */ +DataSet.prototype.clear = function (senderId) { + var i, len; + var ids = (0, _keys2['default'])(this._data); + var items = []; + + for (i = 0, len = ids.length; i < len; i++) { + items.push(this._data[ids[i]]); + } + + this._data = {}; + this.length = 0; + + this._trigger('remove', { items: ids, oldData: items }, senderId); + + return ids; +}; + +/** + * Find the item with maximum value of a specified field + * @param {string} field + * @return {Object | null} item Item containing max value, or null if no items + */ +DataSet.prototype.max = function (field) { + var data = this._data, + itemIds = (0, _keys2['default'])(data), + max = null, + maxField = null, + i, + len; + + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + if (itemField != null && (!max || itemField > maxField)) { + max = item; + maxField = itemField; + } + } + + return max; +}; + +/** + * Find the item with minimum value of a specified field + * @param {string} field + * @return {Object | null} item Item containing max value, or null if no items + */ +DataSet.prototype.min = function (field) { + var data = this._data, + itemIds = (0, _keys2['default'])(data), + min = null, + minField = null, + i, + len; + + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + if (itemField != null && (!min || itemField < minField)) { + min = item; + minField = itemField; + } + } + + return min; +}; + +/** + * Find all distinct values of a specified field + * @param {string} field + * @return {Array} values Array containing all distinct values. If data items + * do not contain the specified field are ignored. + * The returned array is unordered. + */ +DataSet.prototype.distinct = function (field) { + var data = this._data; + var itemIds = (0, _keys2['default'])(data); + var values = []; + var fieldType = this._options.type && this._options.type[field] || null; + var count = 0; + var i, j, len; + + for (i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var value = item[field]; + var exists = false; + for (j = 0; j < count; j++) { + if (values[j] == value) { + exists = true; + break; + } + } + if (!exists && value !== undefined) { + values[count] = value; + count++; + } + } + + if (fieldType) { + for (i = 0, len = values.length; i < len; i++) { + values[i] = util.convert(values[i], fieldType); + } + } + + return values; +}; + +/** + * Add a single item. Will fail when an item with the same id already exists. + * @param {Object} item + * @return {string} id + * @private + */ +DataSet.prototype._addItem = function (item) { + var id = item[this._fieldId]; + + if (id != undefined) { + // check whether this id is already taken + if (this._data[id]) { + // item already exists + throw new Error('Cannot add item: item with id ' + id + ' already exists'); + } + } else { + // generate an id + id = util.randomUUID(); + item[this._fieldId] = id; + } + + var d = {}, + fields = (0, _keys2['default'])(item), + i, + len; + for (i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + d[field] = util.convert(item[field], fieldType); + } + this._data[id] = d; + this.length++; + + return id; +}; + +/** + * Get an item. Fields can be converted to a specific type + * @param {string} id + * @param {Object.} [types] field types to convert + * @return {Object | null} item + * @private + */ +DataSet.prototype._getItem = function (id, types) { + var field, value, i, len; + + // get the item from the dataset + var raw = this._data[id]; + if (!raw) { + return null; + } + + // convert the items field types + var converted = {}, + fields = (0, _keys2['default'])(raw); + + if (types) { + for (i = 0, len = fields.length; i < len; i++) { + field = fields[i]; + value = raw[field]; + converted[field] = util.convert(value, types[field]); + } + } else { + // no field types specified, no converting needed + for (i = 0, len = fields.length; i < len; i++) { + field = fields[i]; + value = raw[field]; + converted[field] = value; + } + } + + if (!converted[this._fieldId]) { + converted[this._fieldId] = raw.id; + } + + return converted; +}; + +/** + * Update a single item: merge with existing item. + * Will fail when the item has no id, or when there does not exist an item + * with the same id. + * @param {Object} item + * @return {string} id + * @private + */ +DataSet.prototype._updateItem = function (item) { + var id = item[this._fieldId]; + if (id == undefined) { + throw new Error('Cannot update item: item has no id (item: ' + (0, _stringify2['default'])(item) + ')'); + } + var d = this._data[id]; + if (!d) { + // item doesn't exist + throw new Error('Cannot update item: no item with id ' + id + ' found'); + } + + // merge with current item + var fields = (0, _keys2['default'])(item); + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + d[field] = util.convert(item[field], fieldType); + } + + return id; +}; + +module.exports = DataSet; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var DataSet = __webpack_require__(11); + +/** + * DataView + * + * a dataview offers a filtered view on a dataset or an other dataview. + * + * @param {DataSet | DataView} data + * @param {Object} [options] Available options: see method get + * + * @constructor DataView + */ +function DataView(data, options) { + this._data = null; + this._ids = {}; // ids of the items currently in memory (just contains a boolean true) + this.length = 0; // number of items in the DataView + this._options = options || {}; + this._fieldId = 'id'; // name of the field containing id + this._subscribers = {}; // event subscribers + + var me = this; + this.listener = function () { + me._onEvent.apply(me, arguments); + }; + + this.setData(data); +} + +// TODO: implement a function .config() to dynamically update things like configured filter +// and trigger changes accordingly + +/** + * Set a data source for the view + * @param {DataSet | DataView} data + */ +DataView.prototype.setData = function (data) { + var ids, id, i, len, items; + + if (this._data) { + // unsubscribe from current dataset + if (this._data.off) { + this._data.off('*', this.listener); + } + + // trigger a remove of all items in memory + ids = this._data.getIds({ filter: this._options && this._options.filter }); + items = []; + + for (i = 0, len = ids.length; i < len; i++) { + items.push(this._data._data[ids[i]]); + } + + this._ids = {}; + this.length = 0; + this._trigger('remove', { items: ids, oldData: items }); + } + + this._data = data; + + if (this._data) { + // update fieldId + this._fieldId = this._options.fieldId || this._data && this._data.options && this._data.options.fieldId || 'id'; + + // trigger an add of all added items + ids = this._data.getIds({ filter: this._options && this._options.filter }); + for (i = 0, len = ids.length; i < len; i++) { + id = ids[i]; + this._ids[id] = true; + } + this.length = ids.length; + this._trigger('add', { items: ids }); + + // subscribe to new dataset + if (this._data.on) { + this._data.on('*', this.listener); + } + } +}; + +/** + * Refresh the DataView. Useful when the DataView has a filter function + * containing a variable parameter. + */ +DataView.prototype.refresh = function () { + var id, i, len; + var ids = this._data.getIds({ filter: this._options && this._options.filter }), + oldIds = (0, _keys2['default'])(this._ids), + newIds = {}, + addedIds = [], + removedIds = [], + removedItems = []; + + // check for additions + for (i = 0, len = ids.length; i < len; i++) { + id = ids[i]; + newIds[id] = true; + if (!this._ids[id]) { + addedIds.push(id); + this._ids[id] = true; + } + } + + // check for removals + for (i = 0, len = oldIds.length; i < len; i++) { + id = oldIds[i]; + if (!newIds[id]) { + removedIds.push(id); + removedItems.push(this._data._data[id]); + delete this._ids[id]; + } + } + + this.length += addedIds.length - removedIds.length; + + // trigger events + if (addedIds.length) { + this._trigger('add', { items: addedIds }); + } + if (removedIds.length) { + this._trigger('remove', { items: removedIds, oldData: removedItems }); + } +}; + +/** + * Get data from the data view + * + * Usage: + * + * get() + * get(options: Object) + * get(options: Object, data: Array | DataTable) + * + * get(id: Number) + * get(id: Number, options: Object) + * get(id: Number, options: Object, data: Array | DataTable) + * + * get(ids: Number[]) + * get(ids: Number[], options: Object) + * get(ids: Number[], options: Object, data: Array | DataTable) + * + * Where: + * + * {number | string} id The id of an item + * {number[] | string{}} ids An array with ids of items + * {Object} options An Object with options. Available options: + * {string} [type] Type of data to be returned. Can + * be 'DataTable' or 'Array' (default) + * {Object.} [convert] + * {string[]} [fields] field names to be returned + * {function} [filter] filter items + * {string | function} [order] Order the items by + * a field name or custom sort function. + * {Array | DataTable} [data] If provided, items will be appended to this + * array or table. Required in case of Google + * DataTable. + * @param {Array} args + * @return {DataSet|DataView} + */ +DataView.prototype.get = function (args) { + // eslint-disable-line no-unused-vars + var me = this; + + // parse the arguments + var ids, options, data; + var firstType = util.getType(arguments[0]); + if (firstType == 'String' || firstType == 'Number' || firstType == 'Array') { + // get(id(s) [, options] [, data]) + ids = arguments[0]; // can be a single id or an array with ids + options = arguments[1]; + data = arguments[2]; + } else { + // get([, options] [, data]) + options = arguments[0]; + data = arguments[1]; + } + + // extend the options with the default options and provided options + var viewOptions = util.extend({}, this._options, options); + + // create a combined filter method when needed + if (this._options.filter && options && options.filter) { + viewOptions.filter = function (item) { + return me._options.filter(item) && options.filter(item); + }; + } + + // build up the call to the linked data set + var getArguments = []; + if (ids != undefined) { + getArguments.push(ids); + } + getArguments.push(viewOptions); + getArguments.push(data); + + return this._data && this._data.get.apply(this._data, getArguments); +}; + +/** + * Get ids of all items or from a filtered set of items. + * @param {Object} [options] An Object with options. Available options: + * {function} [filter] filter items + * {string | function} [order] Order the items by + * a field name or custom sort function. + * @return {Array.} ids + */ +DataView.prototype.getIds = function (options) { + var ids; + + if (this._data) { + var defaultFilter = this._options.filter; + var filter; + + if (options && options.filter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && options.filter(item); + }; + } else { + filter = options.filter; + } + } else { + filter = defaultFilter; + } + + ids = this._data.getIds({ + filter: filter, + order: options && options.order + }); + } else { + ids = []; + } + + return ids; +}; + +/** + * Map every item in the dataset. + * @param {function} callback + * @param {Object} [options] Available options: + * {Object.} [type] + * {string[]} [fields] filter fields + * {function} [filter] filter items + * {string | function} [order] Order the items by + * a field name or custom sort function. + * @return {Object[]} mappedItems + */ +DataView.prototype.map = function (callback, options) { + var mappedItems = []; + if (this._data) { + var defaultFilter = this._options.filter; + var filter; + + if (options && options.filter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && options.filter(item); + }; + } else { + filter = options.filter; + } + } else { + filter = defaultFilter; + } + + mappedItems = this._data.map(callback, { + filter: filter, + order: options && options.order + }); + } else { + mappedItems = []; + } + + return mappedItems; +}; + +/** + * Get the DataSet to which this DataView is connected. In case there is a chain + * of multiple DataViews, the root DataSet of this chain is returned. + * @return {DataSet} dataSet + */ +DataView.prototype.getDataSet = function () { + var dataSet = this; + while (dataSet instanceof DataView) { + dataSet = dataSet._data; + } + return dataSet || null; +}; + +/** + * Event listener. Will propagate all events from the connected data set to + * the subscribers of the DataView, but will filter the items and only trigger + * when there are changes in the filtered data set. + * @param {string} event + * @param {Object | null} params + * @param {string} senderId + * @private + */ +DataView.prototype._onEvent = function (event, params, senderId) { + var i, len, id, item; + var ids = params && params.items; + var addedIds = [], + updatedIds = [], + removedIds = [], + oldItems = [], + updatedItems = [], + removedItems = []; + + if (ids && this._data) { + switch (event) { + case 'add': + // filter the ids of the added items + for (i = 0, len = ids.length; i < len; i++) { + id = ids[i]; + item = this.get(id); + if (item) { + this._ids[id] = true; + addedIds.push(id); + } + } + + break; + + case 'update': + // determine the event from the views viewpoint: an updated + // item can be added, updated, or removed from this view. + for (i = 0, len = ids.length; i < len; i++) { + id = ids[i]; + item = this.get(id); + + if (item) { + if (this._ids[id]) { + updatedIds.push(id); + updatedItems.push(params.data[i]); + oldItems.push(params.oldData[i]); + } else { + this._ids[id] = true; + addedIds.push(id); + } + } else { + if (this._ids[id]) { + delete this._ids[id]; + removedIds.push(id); + removedItems.push(params.oldData[i]); + } else { + // nothing interesting for me :-( + } + } + } + + break; + + case 'remove': + // filter the ids of the removed items + for (i = 0, len = ids.length; i < len; i++) { + id = ids[i]; + if (this._ids[id]) { + delete this._ids[id]; + removedIds.push(id); + removedItems.push(params.oldData[i]); + } + } + + break; + } + + this.length += addedIds.length - removedIds.length; + + if (addedIds.length) { + this._trigger('add', { items: addedIds }, senderId); + } + if (updatedIds.length) { + this._trigger('update', { items: updatedIds, oldData: oldItems, data: updatedItems }, senderId); + } + if (removedIds.length) { + this._trigger('remove', { items: removedIds, oldData: removedItems }, senderId); + } + } +}; + +// copy subscription functionality from DataSet +DataView.prototype.on = DataSet.prototype.on; +DataView.prototype.off = DataSet.prototype.off; +DataView.prototype._trigger = DataSet.prototype._trigger; + +// TODO: make these functions deprecated (replaced with `on` and `off` since version 0.5) +DataView.prototype.subscribe = DataView.prototype.on; +DataView.prototype.unsubscribe = DataView.prototype.off; + +module.exports = DataView; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(57)('wks'); +var uid = __webpack_require__(40); +var Symbol = __webpack_require__(18).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// DOM utility methods + +/** + * this prepares the JSON container for allocating SVG elements + * @param {Object} JSONcontainer + * @private + */ +exports.prepareElements = function (JSONcontainer) { + // cleanup the redundant svgElements; + for (var elementType in JSONcontainer) { + if (JSONcontainer.hasOwnProperty(elementType)) { + JSONcontainer[elementType].redundant = JSONcontainer[elementType].used; + JSONcontainer[elementType].used = []; + } + } +}; + +/** + * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from + * which to remove the redundant elements. + * + * @param {Object} JSONcontainer + * @private + */ +exports.cleanupElements = function (JSONcontainer) { + // cleanup the redundant svgElements; + for (var elementType in JSONcontainer) { + if (JSONcontainer.hasOwnProperty(elementType)) { + if (JSONcontainer[elementType].redundant) { + for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) { + JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]); + } + JSONcontainer[elementType].redundant = []; + } + } + } +}; + +/** + * Ensures that all elements are removed first up so they can be recreated cleanly + * @param {Object} JSONcontainer + */ +exports.resetElements = function (JSONcontainer) { + exports.prepareElements(JSONcontainer); + exports.cleanupElements(JSONcontainer); + exports.prepareElements(JSONcontainer); +}; + +/** + * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer + * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. + * + * @param {string} elementType + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @returns {Element} + * @private + */ +exports.getSVGElement = function (elementType, JSONcontainer, svgContainer) { + var element; + // allocate SVG element, if it doesnt yet exist, create one. + if (JSONcontainer.hasOwnProperty(elementType)) { + // this element has been created before + // check if there is an redundant element + if (JSONcontainer[elementType].redundant.length > 0) { + element = JSONcontainer[elementType].redundant[0]; + JSONcontainer[elementType].redundant.shift(); + } else { + // create a new element and add it to the SVG + element = document.createElementNS('http://www.w3.org/2000/svg', elementType); + svgContainer.appendChild(element); + } + } else { + // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it. + element = document.createElementNS('http://www.w3.org/2000/svg', elementType); + JSONcontainer[elementType] = { used: [], redundant: [] }; + svgContainer.appendChild(element); + } + JSONcontainer[elementType].used.push(element); + return element; +}; + +/** + * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer + * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. + * + * @param {string} elementType + * @param {Object} JSONcontainer + * @param {Element} DOMContainer + * @param {Element} insertBefore + * @returns {*} + */ +exports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) { + var element; + // allocate DOM element, if it doesnt yet exist, create one. + if (JSONcontainer.hasOwnProperty(elementType)) { + // this element has been created before + // check if there is an redundant element + if (JSONcontainer[elementType].redundant.length > 0) { + element = JSONcontainer[elementType].redundant[0]; + JSONcontainer[elementType].redundant.shift(); + } else { + // create a new element and add it to the SVG + element = document.createElement(elementType); + if (insertBefore !== undefined) { + DOMContainer.insertBefore(element, insertBefore); + } else { + DOMContainer.appendChild(element); + } + } + } else { + // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it. + element = document.createElement(elementType); + JSONcontainer[elementType] = { used: [], redundant: [] }; + if (insertBefore !== undefined) { + DOMContainer.insertBefore(element, insertBefore); + } else { + DOMContainer.appendChild(element); + } + } + JSONcontainer[elementType].used.push(element); + return element; +}; + +/** + * Draw a point object. This is a separate function because it can also be called by the legend. + * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions + * as well. + * + * @param {number} x + * @param {number} y + * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' } + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @param {Object} labelObj + * @returns {vis.PointItem} + */ +exports.drawPoint = function (x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) { + var point; + if (groupTemplate.style == 'circle') { + point = exports.getSVGElement('circle', JSONcontainer, svgContainer); + point.setAttributeNS(null, "cx", x); + point.setAttributeNS(null, "cy", y); + point.setAttributeNS(null, "r", 0.5 * groupTemplate.size); + } else { + point = exports.getSVGElement('rect', JSONcontainer, svgContainer); + point.setAttributeNS(null, "x", x - 0.5 * groupTemplate.size); + point.setAttributeNS(null, "y", y - 0.5 * groupTemplate.size); + point.setAttributeNS(null, "width", groupTemplate.size); + point.setAttributeNS(null, "height", groupTemplate.size); + } + + if (groupTemplate.styles !== undefined) { + point.setAttributeNS(null, "style", groupTemplate.styles); + } + point.setAttributeNS(null, "class", groupTemplate.className + " vis-point"); + //handle label + + + if (labelObj) { + var label = exports.getSVGElement('text', JSONcontainer, svgContainer); + if (labelObj.xOffset) { + x = x + labelObj.xOffset; + } + + if (labelObj.yOffset) { + y = y + labelObj.yOffset; + } + if (labelObj.content) { + label.textContent = labelObj.content; + } + + if (labelObj.className) { + label.setAttributeNS(null, "class", labelObj.className + " vis-label"); + } + label.setAttributeNS(null, "x", x); + label.setAttributeNS(null, "y", y); + } + + return point; +}; + +/** + * draw a bar SVG element centered on the X coordinate + * + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {string} className + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @param {string} style + */ +exports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) { + if (height != 0) { + if (height < 0) { + height *= -1; + y -= height; + } + var rect = exports.getSVGElement('rect', JSONcontainer, svgContainer); + rect.setAttributeNS(null, "x", x - 0.5 * width); + rect.setAttributeNS(null, "y", y); + rect.setAttributeNS(null, "width", width); + rect.setAttributeNS(null, "height", height); + rect.setAttributeNS(null, "class", className); + if (style) { + rect.setAttributeNS(null, "style", style); + } + } +}; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.printStyle = undefined; + +var _stringify = __webpack_require__(19); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); + +var errorFound = false; +var allOptions = void 0; +var printStyle = 'background: #FFeeee; color: #dd0000'; +/** + * Used to validate options. + */ + +var Validator = function () { + /** + * @ignore + */ + function Validator() { + (0, _classCallCheck3['default'])(this, Validator); + } + + /** + * Main function to be called + * @param {Object} options + * @param {Object} referenceOptions + * @param {Object} subObject + * @returns {boolean} + * @static + */ + + + (0, _createClass3['default'])(Validator, null, [{ + key: 'validate', + value: function validate(options, referenceOptions, subObject) { + errorFound = false; + allOptions = referenceOptions; + var usedOptions = referenceOptions; + if (subObject !== undefined) { + usedOptions = referenceOptions[subObject]; + } + Validator.parse(options, usedOptions, []); + return errorFound; + } + + /** + * Will traverse an object recursively and check every value + * @param {Object} options + * @param {Object} referenceOptions + * @param {array} path | where to look for the actual option + * @static + */ + + }, { + key: 'parse', + value: function parse(options, referenceOptions, path) { + for (var option in options) { + if (options.hasOwnProperty(option)) { + Validator.check(option, options, referenceOptions, path); + } + } + } + + /** + * Check every value. If the value is an object, call the parse function on that object. + * @param {string} option + * @param {Object} options + * @param {Object} referenceOptions + * @param {array} path | where to look for the actual option + * @static + */ + + }, { + key: 'check', + value: function check(option, options, referenceOptions, path) { + if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) { + Validator.getSuggestion(option, referenceOptions, path); + return; + } + + var referenceOption = option; + var is_object = true; + + if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) { + // NOTE: This only triggers if the __any__ is in the top level of the options object. + // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!! + // TODO: Examine if needed, remove if possible + + // __any__ is a wildcard. Any value is accepted and will be further analysed by reference. + referenceOption = '__any__'; + + // if the any-subgroup is not a predefined object in the configurator, + // we do not look deeper into the object. + is_object = Validator.getType(options[option]) === 'object'; + } else { + // Since all options in the reference are objects, we can check whether + // they are supposed to be the object to look for the __type__ field. + // if this is an object, we check if the correct type has been supplied to account for shorthand options. + } + + var refOptionObj = referenceOptions[referenceOption]; + if (is_object && refOptionObj.__type__ !== undefined) { + refOptionObj = refOptionObj.__type__; + } + + Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path); + } + + /** + * + * @param {string} option | the option property + * @param {Object} options | The supplied options object + * @param {Object} referenceOptions | The reference options containing all options and their allowed formats + * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag. + * @param {string} refOptionObj | This is the type object from the reference options + * @param {Array} path | where in the object is the option + * @static + */ + + }, { + key: 'checkFields', + value: function checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) { + var log = function log(message) { + console.log('%c' + message + Validator.printLocation(path, option), printStyle); + }; + + var optionType = Validator.getType(options[option]); + var refOptionType = refOptionObj[optionType]; + + if (refOptionType !== undefined) { + // if the type is correct, we check if it is supposed to be one of a few select values + if (Validator.getType(refOptionType) === 'array' && refOptionType.indexOf(options[option]) === -1) { + log('Invalid option detected in "' + option + '".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not "' + options[option] + '". '); + errorFound = true; + } else if (optionType === 'object' && referenceOption !== "__any__") { + path = util.copyAndExtendArray(path, option); + Validator.parse(options[option], referenceOptions[referenceOption], path); + } + } else if (refOptionObj['any'] === undefined) { + // type of the field is incorrect and the field cannot be any + log('Invalid type received for "' + option + '". Expected: ' + Validator.print((0, _keys2['default'])(refOptionObj)) + '. Received [' + optionType + '] "' + options[option] + '"'); + errorFound = true; + } + } + + /** + * + * @param {Object|boolean|number|string|Array.|Date|Node|Moment|undefined|null} object + * @returns {string} + * @static + */ + + }, { + key: 'getType', + value: function getType(object) { + var type = typeof object === 'undefined' ? 'undefined' : (0, _typeof3['default'])(object); + + if (type === 'object') { + if (object === null) { + return 'null'; + } + if (object instanceof Boolean) { + return 'boolean'; + } + if (object instanceof Number) { + return 'number'; + } + if (object instanceof String) { + return 'string'; + } + if (Array.isArray(object)) { + return 'array'; + } + if (object instanceof Date) { + return 'date'; + } + if (object.nodeType !== undefined) { + return 'dom'; + } + if (object._isAMomentObject === true) { + return 'moment'; + } + return 'object'; + } else if (type === 'number') { + return 'number'; + } else if (type === 'boolean') { + return 'boolean'; + } else if (type === 'string') { + return 'string'; + } else if (type === undefined) { + return 'undefined'; + } + return type; + } + + /** + * @param {string} option + * @param {Object} options + * @param {Array.} path + * @static + */ + + }, { + key: 'getSuggestion', + value: function getSuggestion(option, options, path) { + var localSearch = Validator.findInOptions(option, options, path, false); + var globalSearch = Validator.findInOptions(option, allOptions, [], true); + + var localSearchThreshold = 8; + var globalSearchThreshold = 4; + + var msg = void 0; + if (localSearch.indexMatch !== undefined) { + msg = ' in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was incomplete? Did you mean: "' + localSearch.indexMatch + '"?\n\n'; + } else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) { + msg = ' in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch, ''); + } else if (localSearch.distance <= localSearchThreshold) { + msg = '. Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, option); + } else { + msg = '. Did you mean one of these: ' + Validator.print((0, _keys2['default'])(options)) + Validator.printLocation(path, option); + } + + console.log('%cUnknown option detected: "' + option + '"' + msg, printStyle); + errorFound = true; + } + + /** + * traverse the options in search for a match. + * @param {string} option + * @param {Object} options + * @param {Array} path | where to look for the actual option + * @param {boolean} [recursive=false] + * @returns {{closestMatch: string, path: Array, distance: number}} + * @static + */ + + }, { + key: 'findInOptions', + value: function findInOptions(option, options, path) { + var recursive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + var min = 1e9; + var closestMatch = ''; + var closestMatchPath = []; + var lowerCaseOption = option.toLowerCase(); + var indexMatch = undefined; + for (var op in options) { + // eslint-disable-line guard-for-in + var distance = void 0; + if (options[op].__type__ !== undefined && recursive === true) { + var result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path, op)); + if (min > result.distance) { + closestMatch = result.closestMatch; + closestMatchPath = result.path; + min = result.distance; + indexMatch = result.indexMatch; + } + } else { + if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) { + indexMatch = op; + } + distance = Validator.levenshteinDistance(option, op); + if (min > distance) { + closestMatch = op; + closestMatchPath = util.copyArray(path); + min = distance; + } + } + } + return { closestMatch: closestMatch, path: closestMatchPath, distance: min, indexMatch: indexMatch }; + } + + /** + * @param {Array.} path + * @param {Object} option + * @param {string} prefix + * @returns {String} + * @static + */ + + }, { + key: 'printLocation', + value: function printLocation(path, option) { + var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Problem value found at: \n'; + + var str = '\n\n' + prefix + 'options = {\n'; + for (var i = 0; i < path.length; i++) { + for (var j = 0; j < i + 1; j++) { + str += ' '; + } + str += path[i] + ': {\n'; + } + for (var _j = 0; _j < path.length + 1; _j++) { + str += ' '; + } + str += option + '\n'; + for (var _i = 0; _i < path.length + 1; _i++) { + for (var _j2 = 0; _j2 < path.length - _i; _j2++) { + str += ' '; + } + str += '}\n'; + } + return str + '\n\n'; + } + + /** + * @param {Object} options + * @returns {String} + * @static + */ + + }, { + key: 'print', + value: function print(options) { + return (0, _stringify2['default'])(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, "").replace(/(\,)/g, ', '); + } + + /** + * Compute the edit distance between the two given strings + * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript + * + * Copyright (c) 2011 Andrei Mackenzie + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @param {string} a + * @param {string} b + * @returns {Array.>}} + * @static + */ + + }, { + key: 'levenshteinDistance', + value: function levenshteinDistance(a, b) { + if (a.length === 0) return b.length; + if (b.length === 0) return a.length; + + var matrix = []; + + // increment along the first column of each row + var i; + for (i = 0; i <= b.length; i++) { + matrix[i] = [i]; + } + + // increment each column in the first row + var j; + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j; + } + + // Fill in the rest of the matrix + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) == a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution + Math.min(matrix[i][j - 1] + 1, // insertion + matrix[i - 1][j] + 1)); // deletion + } + } + } + + return matrix[b.length][a.length]; + } + }]); + return Validator; +}(); + +exports['default'] = Validator; +exports.printStyle = printStyle; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(2); + +/** + * Prototype for visual components + * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} [body] + * @param {Object} [options] + */ +function Component(body, options) { + // eslint-disable-line no-unused-vars + this.options = null; + this.props = null; +} + +/** + * Set options for the component. The new options will be merged into the + * current options. + * @param {Object} options + */ +Component.prototype.setOptions = function (options) { + if (options) { + util.extend(this.options, options); + } +}; + +/** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ +Component.prototype.redraw = function () { + // should be implemented by the component + return false; +}; + +/** + * Destroy the component. Cleanup DOM and event listeners + */ +Component.prototype.destroy = function () { + // should be implemented by the component +}; + +/** + * Test whether the component is resized since the last time _isResized() was + * called. + * @return {Boolean} Returns true if the component is resized + * @protected + */ +Component.prototype._isResized = function () { + var resized = this.props._previousWidth !== this.props.width || this.props._previousHeight !== this.props.height; + + this.props._previousWidth = this.props.width; + this.props._previousHeight = this.props.height; + + return resized; +}; + +module.exports = Component; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(18); +var core = __webpack_require__(7); +var ctx = __webpack_require__(80); +var hide = __webpack_require__(26); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(160), __esModule: true }; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(27); +var IE8_DOM_DEFINE = __webpack_require__(81); +var toPrimitive = __webpack_require__(53); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(21) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(28)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * The Base class for all Nodes. + */ +var NodeBase = function () { + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function NodeBase(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, NodeBase); + + this.body = body; + this.labelModule = labelModule; + this.setOptions(options); + this.top = undefined; + this.left = undefined; + this.height = undefined; + this.width = undefined; + this.radius = undefined; + this.margin = undefined; + this.refreshNeeded = true; + this.boundingBox = { top: 0, left: 0, right: 0, bottom: 0 }; + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3['default'])(NodeBase, [{ + key: 'setOptions', + value: function setOptions(options) { + this.options = options; + } + + /** + * + * @param {Label} labelModule + * @private + */ + + }, { + key: '_setMargins', + value: function _setMargins(labelModule) { + this.margin = {}; + if (this.options.margin) { + if ((0, _typeof3['default'])(this.options.margin) == 'object') { + this.margin.top = this.options.margin.top; + this.margin.right = this.options.margin.right; + this.margin.bottom = this.options.margin.bottom; + this.margin.left = this.options.margin.left; + } else { + this.margin.top = this.options.margin; + this.margin.right = this.options.margin; + this.margin.bottom = this.options.margin; + this.margin.left = this.options.margin; + } + } + labelModule.adjustSizes(this.margin); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + * @private + */ + + }, { + key: '_distanceToBorder', + value: function _distanceToBorder(ctx, angle) { + var borderWidth = this.options.borderWidth; + this.resize(ctx); + return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'enableShadow', + value: function enableShadow(ctx, values) { + if (values.shadow) { + ctx.shadowColor = values.shadowColor; + ctx.shadowBlur = values.shadowSize; + ctx.shadowOffsetX = values.shadowX; + ctx.shadowOffsetY = values.shadowY; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'disableShadow', + value: function disableShadow(ctx, values) { + if (values.shadow) { + ctx.shadowColor = 'rgba(0,0,0,0)'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'enableBorderDashes', + value: function enableBorderDashes(ctx, values) { + if (values.borderDashes !== false) { + if (ctx.setLineDash !== undefined) { + var dashes = values.borderDashes; + if (dashes === true) { + dashes = [5, 15]; + } + ctx.setLineDash(dashes); + } else { + console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."); + this.options.shapeProperties.borderDashes = false; + values.borderDashes = false; + } + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'disableBorderDashes', + value: function disableBorderDashes(ctx, values) { + if (values.borderDashes !== false) { + if (ctx.setLineDash !== undefined) { + ctx.setLineDash([0]); + } else { + console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."); + this.options.shapeProperties.borderDashes = false; + values.borderDashes = false; + } + } + } + + /** + * Determine if the shape of a node needs to be recalculated. + * + * @param {boolean} selected + * @param {boolean} hover + * @returns {boolean} + * @protected + */ + + }, { + key: 'needsRefresh', + value: function needsRefresh(selected, hover) { + if (this.refreshNeeded === true) { + // This is probably not the best location to reset this member. + // However, in the current logic, it is the most convenient one. + this.refreshNeeded = false; + return true; + } + + return this.width === undefined || this.labelModule.differentState(selected, hover); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'initContextForDraw', + value: function initContextForDraw(ctx, values) { + var borderWidth = values.borderWidth / this.body.view.scale; + + ctx.lineWidth = Math.min(this.width, borderWidth); + ctx.strokeStyle = values.borderColor; + ctx.fillStyle = values.color; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'performStroke', + value: function performStroke(ctx, values) { + var borderWidth = values.borderWidth / this.body.view.scale; + + //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. + ctx.save(); + // if borders are zero width, they will be drawn with width 1 by default. This prevents that + if (borderWidth > 0) { + this.enableBorderDashes(ctx, values); + //draw the border + ctx.stroke(); + //disable dashed border for other elements + this.disableBorderDashes(ctx, values); + } + ctx.restore(); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'performFill', + value: function performFill(ctx, values) { + // draw shadow if enabled + this.enableShadow(ctx, values); + // draw the background + ctx.fill(); + // disable shadows for other elements. + this.disableShadow(ctx, values); + + this.performStroke(ctx, values); + } + + /** + * + * @param {number} margin + * @private + */ + + }, { + key: '_addBoundingBoxMargin', + value: function _addBoundingBoxMargin(margin) { + this.boundingBox.left -= margin; + this.boundingBox.top -= margin; + this.boundingBox.bottom += margin; + this.boundingBox.right += margin; + } + + /** + * Actual implementation of this method call. + * + * Doing it like this makes it easier to override + * in the child classes. + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: '_updateBoundingBox', + value: function _updateBoundingBox(x, y, ctx, selected, hover) { + if (ctx !== undefined) { + this.resize(ctx, selected, hover); + } + + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this.boundingBox.left = this.left; + this.boundingBox.top = this.top; + this.boundingBox.bottom = this.top + this.height; + this.boundingBox.right = this.left + this.width; + } + + /** + * Default implementation of this method call. + * This acts as a stub which can be overridden. + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + }, { + key: 'updateBoundingBox', + value: function updateBoundingBox(x, y, ctx, selected, hover) { + this._updateBoundingBox(x, y, ctx, selected, hover); + } + + /** + * Determine the dimensions to use for nodes with an internal label + * + * Currently, these are: Circle, Ellipse, Database, Box + * The other nodes have external labels, and will not call this method + * + * If there is no label, decent default values are supplied. + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + * @returns {{width:number, height:number}} + */ + + }, { + key: 'getDimensionsFromLabel', + value: function getDimensionsFromLabel(ctx, selected, hover) { + // NOTE: previously 'textSize' was not put in 'this' for Ellipse + // TODO: examine the consequences. + this.textSize = this.labelModule.getTextSize(ctx, selected, hover); + var width = this.textSize.width; + var height = this.textSize.height; + + var DEFAULT_SIZE = 14; + if (width === 0) { + // This happens when there is no label text set + width = DEFAULT_SIZE; // use a decent default + height = DEFAULT_SIZE; // if width zero, then height also always zero + } + + return { width: width, height: height }; + } + }]); + return NodeBase; +}(); + +exports['default'] = NodeBase; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _NodeBase2 = __webpack_require__(23); + +var _NodeBase3 = _interopRequireDefault(_NodeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * Base class for constructing Node/Cluster Shapes. + * + * @extends NodeBase + */ +var ShapeBase = function (_NodeBase) { + (0, _inherits3['default'])(ShapeBase, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function ShapeBase(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, ShapeBase); + return (0, _possibleConstructorReturn3['default'])(this, (ShapeBase.__proto__ || (0, _getPrototypeOf2['default'])(ShapeBase)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + * @param {Object} [values={size: this.options.size}] + */ + + + (0, _createClass3['default'])(ShapeBase, [{ + key: 'resize', + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : { size: this.options.size }; + + if (this.needsRefresh(selected, hover)) { + this.labelModule.getTextSize(ctx, selected, hover); + var size = 2 * values.size; + this.width = size; + this.height = size; + this.radius = 0.5 * this.width; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {string} shape + * @param {number} sizeMultiplier - Unused! TODO: Remove next major release + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @private + */ + + }, { + key: '_drawShape', + value: function _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) { + this.resize(ctx, selected, hover, values); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this.initContextForDraw(ctx, values); + ctx[shape](x, y, values.size); + this.performFill(ctx, values); + + if (this.options.label !== undefined) { + // Need to call following here in order to ensure value for `this.labelModule.size.height` + this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, 'hanging'); + var yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height; + this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging'); + } + + this.updateBoundingBox(x, y); + } + + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: 'updateBoundingBox', + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height); + } + } + }]); + return ShapeBase; +}(_NodeBase3['default']); + +exports['default'] = ShapeBase; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(78); +var defined = __webpack_require__(51); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(20); +var createDesc = __webpack_require__(39); +module.exports = __webpack_require__(21) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(32); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(138), __esModule: true }; + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _isIterable2 = __webpack_require__(188); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +var _getIterator2 = __webpack_require__(77); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(84); +var enumBugKeys = __webpack_require__(58); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * @prototype Point3d + * @param {number} [x] + * @param {number} [y] + * @param {number} [z] + */ +function Point3d(x, y, z) { + this.x = x !== undefined ? x : 0; + this.y = y !== undefined ? y : 0; + this.z = z !== undefined ? z : 0; +} + +/** + * Subtract the two provided points, returns a-b + * @param {Point3d} a + * @param {Point3d} b + * @return {Point3d} a-b + */ +Point3d.subtract = function (a, b) { + var sub = new Point3d(); + sub.x = a.x - b.x; + sub.y = a.y - b.y; + sub.z = a.z - b.z; + return sub; +}; + +/** + * Add the two provided points, returns a+b + * @param {Point3d} a + * @param {Point3d} b + * @return {Point3d} a+b + */ +Point3d.add = function (a, b) { + var sum = new Point3d(); + sum.x = a.x + b.x; + sum.y = a.y + b.y; + sum.z = a.z + b.z; + return sum; +}; + +/** + * Calculate the average of two 3d points + * @param {Point3d} a + * @param {Point3d} b + * @return {Point3d} The average, (a+b)/2 + */ +Point3d.avg = function (a, b) { + return new Point3d((a.x + b.x) / 2, (a.y + b.y) / 2, (a.z + b.z) / 2); +}; + +/** + * Calculate the cross product of the two provided points, returns axb + * Documentation: http://en.wikipedia.org/wiki/Cross_product + * @param {Point3d} a + * @param {Point3d} b + * @return {Point3d} cross product axb + */ +Point3d.crossProduct = function (a, b) { + var crossproduct = new Point3d(); + + crossproduct.x = a.y * b.z - a.z * b.y; + crossproduct.y = a.z * b.x - a.x * b.z; + crossproduct.z = a.x * b.y - a.y * b.x; + + return crossproduct; +}; + +/** + * Rtrieve the length of the vector (or the distance from this point to the origin + * @return {number} length + */ +Point3d.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); +}; + +module.exports = Point3d; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; +/** + * Created by Alex on 11/6/2014. + */ + +// https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60 +// if the module has no dependencies, the above pattern can be simplified to +(function (root, factory) { + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.keycharm = factory(); + } +}(this, function () { + + function keycharm(options) { + var preventDefault = options && options.preventDefault || false; + + var container = options && options.container || window; + + var _exportFunctions = {}; + var _bound = {keydown:{}, keyup:{}}; + var _keys = {}; + var i; + + // a - z + for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};} + // A - Z + for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};} + // 0 - 9 + for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};} + // F1 - F12 + for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};} + // num0 - num9 + for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};} + + // numpad misc + _keys['num*'] = {code:106, shift: false}; + _keys['num+'] = {code:107, shift: false}; + _keys['num-'] = {code:109, shift: false}; + _keys['num/'] = {code:111, shift: false}; + _keys['num.'] = {code:110, shift: false}; + // arrows + _keys['left'] = {code:37, shift: false}; + _keys['up'] = {code:38, shift: false}; + _keys['right'] = {code:39, shift: false}; + _keys['down'] = {code:40, shift: false}; + // extra keys + _keys['space'] = {code:32, shift: false}; + _keys['enter'] = {code:13, shift: false}; + _keys['shift'] = {code:16, shift: undefined}; + _keys['esc'] = {code:27, shift: false}; + _keys['backspace'] = {code:8, shift: false}; + _keys['tab'] = {code:9, shift: false}; + _keys['ctrl'] = {code:17, shift: false}; + _keys['alt'] = {code:18, shift: false}; + _keys['delete'] = {code:46, shift: false}; + _keys['pageup'] = {code:33, shift: false}; + _keys['pagedown'] = {code:34, shift: false}; + // symbols + _keys['='] = {code:187, shift: false}; + _keys['-'] = {code:189, shift: false}; + _keys[']'] = {code:221, shift: false}; + _keys['['] = {code:219, shift: false}; + + + + var down = function(event) {handleEvent(event,'keydown');}; + var up = function(event) {handleEvent(event,'keyup');}; + + // handle the actualy bound key with the event + var handleEvent = function(event,type) { + if (_bound[type][event.keyCode] !== undefined) { + var bound = _bound[type][event.keyCode]; + for (var i = 0; i < bound.length; i++) { + if (bound[i].shift === undefined) { + bound[i].fn(event); + } + else if (bound[i].shift == true && event.shiftKey == true) { + bound[i].fn(event); + } + else if (bound[i].shift == false && event.shiftKey == false) { + bound[i].fn(event); + } + } + + if (preventDefault == true) { + event.preventDefault(); + } + } + }; + + // bind a key to a callback + _exportFunctions.bind = function(key, callback, type) { + if (type === undefined) { + type = 'keydown'; + } + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + if (_bound[type][_keys[key].code] === undefined) { + _bound[type][_keys[key].code] = []; + } + _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift}); + }; + + + // bind all keys to a call back (demo purposes) + _exportFunctions.bindAll = function(callback, type) { + if (type === undefined) { + type = 'keydown'; + } + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + _exportFunctions.bind(key,callback,type); + } + } + }; + + // get the key label from an event + _exportFunctions.getKey = function(event) { + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) { + return key; + } + else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) { + return key; + } + else if (event.keyCode == _keys[key].code && key == 'shift') { + return key; + } + } + } + return "unknown key, currently not supported"; + }; + + // unbind either a specific callback from a key or all of them (by leaving callback undefined) + _exportFunctions.unbind = function(key, callback, type) { + if (type === undefined) { + type = 'keydown'; + } + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + if (callback !== undefined) { + var newBindings = []; + var bound = _bound[type][_keys[key].code]; + if (bound !== undefined) { + for (var i = 0; i < bound.length; i++) { + if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) { + newBindings.push(_bound[type][_keys[key].code][i]); + } + } + } + _bound[type][_keys[key].code] = newBindings; + } + else { + _bound[type][_keys[key].code] = []; + } + }; + + // reset all bound variables. + _exportFunctions.reset = function() { + _bound = {keydown:{}, keyup:{}}; + }; + + // unbind all listeners and reset all variables. + _exportFunctions.destroy = function() { + _bound = {keydown:{}, keyup:{}}; + container.removeEventListener('keydown', down, true); + container.removeEventListener('keyup', up, true); + }; + + // create listeners. + container.addEventListener('keydown',down,true); + container.addEventListener('keyup',up,true); + + // return the public functions. + return _exportFunctions; + } + + return keycharm; +})); + + + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * used in Core to convert the options into a volatile variable + * + * @param {function} moment + * @param {Object} body + * @param {Array | Object} hiddenDates + * @returns {number} + */ +exports.convertHiddenOptions = function (moment, body, hiddenDates) { + if (hiddenDates && !Array.isArray(hiddenDates)) { + return exports.convertHiddenOptions(moment, body, [hiddenDates]); + } + + body.hiddenDates = []; + if (hiddenDates) { + if (Array.isArray(hiddenDates) == true) { + for (var i = 0; i < hiddenDates.length; i++) { + if (hiddenDates[i].repeat === undefined) { + var dateItem = {}; + dateItem.start = moment(hiddenDates[i].start).toDate().valueOf(); + dateItem.end = moment(hiddenDates[i].end).toDate().valueOf(); + body.hiddenDates.push(dateItem); + } + } + body.hiddenDates.sort(function (a, b) { + return a.start - b.start; + }); // sort by start time + } + } +}; + +/** + * create new entrees for the repeating hidden dates + * + * @param {function} moment + * @param {Object} body + * @param {Array | Object} hiddenDates + * @returns {null} + */ +exports.updateHiddenDates = function (moment, body, hiddenDates) { + if (hiddenDates && !Array.isArray(hiddenDates)) { + return exports.updateHiddenDates(moment, body, [hiddenDates]); + } + + if (hiddenDates && body.domProps.centerContainer.width !== undefined) { + exports.convertHiddenOptions(moment, body, hiddenDates); + + var start = moment(body.range.start); + var end = moment(body.range.end); + + var totalRange = body.range.end - body.range.start; + var pixelTime = totalRange / body.domProps.centerContainer.width; + + for (var i = 0; i < hiddenDates.length; i++) { + if (hiddenDates[i].repeat !== undefined) { + var startDate = moment(hiddenDates[i].start); + var endDate = moment(hiddenDates[i].end); + + if (startDate._d == "Invalid Date") { + throw new Error("Supplied start date is not valid: " + hiddenDates[i].start); + } + if (endDate._d == "Invalid Date") { + throw new Error("Supplied end date is not valid: " + hiddenDates[i].end); + } + + var duration = endDate - startDate; + if (duration >= 4 * pixelTime) { + + var offset = 0; + var runUntil = end.clone(); + switch (hiddenDates[i].repeat) { + case "daily": + // case of time + if (startDate.day() != endDate.day()) { + offset = 1; + } + startDate.dayOfYear(start.dayOfYear()); + startDate.year(start.year()); + startDate.subtract(7, 'days'); + + endDate.dayOfYear(start.dayOfYear()); + endDate.year(start.year()); + endDate.subtract(7 - offset, 'days'); + + runUntil.add(1, 'weeks'); + break; + case "weekly": + var dayOffset = endDate.diff(startDate, 'days'); + var day = startDate.day(); + + // set the start date to the range.start + startDate.date(start.date()); + startDate.month(start.month()); + startDate.year(start.year()); + endDate = startDate.clone(); + + // force + startDate.day(day); + endDate.day(day); + endDate.add(dayOffset, 'days'); + + startDate.subtract(1, 'weeks'); + endDate.subtract(1, 'weeks'); + + runUntil.add(1, 'weeks'); + break; + case "monthly": + if (startDate.month() != endDate.month()) { + offset = 1; + } + startDate.month(start.month()); + startDate.year(start.year()); + startDate.subtract(1, 'months'); + + endDate.month(start.month()); + endDate.year(start.year()); + endDate.subtract(1, 'months'); + endDate.add(offset, 'months'); + + runUntil.add(1, 'months'); + break; + case "yearly": + if (startDate.year() != endDate.year()) { + offset = 1; + } + startDate.year(start.year()); + startDate.subtract(1, 'years'); + endDate.year(start.year()); + endDate.subtract(1, 'years'); + endDate.add(offset, 'years'); + + runUntil.add(1, 'years'); + break; + default: + console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:", hiddenDates[i].repeat); + return; + } + while (startDate < runUntil) { + body.hiddenDates.push({ start: startDate.valueOf(), end: endDate.valueOf() }); + switch (hiddenDates[i].repeat) { + case "daily": + startDate.add(1, 'days'); + endDate.add(1, 'days'); + break; + case "weekly": + startDate.add(1, 'weeks'); + endDate.add(1, 'weeks'); + break; + case "monthly": + startDate.add(1, 'months'); + endDate.add(1, 'months'); + break; + case "yearly": + startDate.add(1, 'y'); + endDate.add(1, 'y'); + break; + default: + console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:", hiddenDates[i].repeat); + return; + } + } + body.hiddenDates.push({ start: startDate.valueOf(), end: endDate.valueOf() }); + } + } + } + // remove duplicates, merge where possible + exports.removeDuplicates(body); + // ensure the new positions are not on hidden dates + var startHidden = exports.isHidden(body.range.start, body.hiddenDates); + var endHidden = exports.isHidden(body.range.end, body.hiddenDates); + var rangeStart = body.range.start; + var rangeEnd = body.range.end; + if (startHidden.hidden == true) { + rangeStart = body.range.startToFront == true ? startHidden.startDate - 1 : startHidden.endDate + 1; + } + if (endHidden.hidden == true) { + rangeEnd = body.range.endToFront == true ? endHidden.startDate - 1 : endHidden.endDate + 1; + } + if (startHidden.hidden == true || endHidden.hidden == true) { + body.range._applyRange(rangeStart, rangeEnd); + } + } +}; + +/** + * remove duplicates from the hidden dates list. Duplicates are evil. They mess everything up. + * Scales with N^2 + * + * @param {Object} body + */ +exports.removeDuplicates = function (body) { + var hiddenDates = body.hiddenDates; + var safeDates = []; + for (var i = 0; i < hiddenDates.length; i++) { + for (var j = 0; j < hiddenDates.length; j++) { + if (i != j && hiddenDates[j].remove != true && hiddenDates[i].remove != true) { + // j inside i + if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) { + hiddenDates[j].remove = true; + } + // j start inside i + else if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].start <= hiddenDates[i].end) { + hiddenDates[i].end = hiddenDates[j].end; + hiddenDates[j].remove = true; + } + // j end inside i + else if (hiddenDates[j].end >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) { + hiddenDates[i].start = hiddenDates[j].start; + hiddenDates[j].remove = true; + } + } + } + } + + for (i = 0; i < hiddenDates.length; i++) { + if (hiddenDates[i].remove !== true) { + safeDates.push(hiddenDates[i]); + } + } + + body.hiddenDates = safeDates; + body.hiddenDates.sort(function (a, b) { + return a.start - b.start; + }); // sort by start time +}; + +exports.printDates = function (dates) { + for (var i = 0; i < dates.length; i++) { + console.log(i, new Date(dates[i].start), new Date(dates[i].end), dates[i].start, dates[i].end, dates[i].remove); + } +}; + +/** + * Used in TimeStep to avoid the hidden times. + * @param {function} moment + * @param {TimeStep} timeStep + * @param {Date} previousTime + */ +exports.stepOverHiddenDates = function (moment, timeStep, previousTime) { + var stepInHidden = false; + var currentValue = timeStep.current.valueOf(); + for (var i = 0; i < timeStep.hiddenDates.length; i++) { + var startDate = timeStep.hiddenDates[i].start; + var endDate = timeStep.hiddenDates[i].end; + if (currentValue >= startDate && currentValue < endDate) { + stepInHidden = true; + break; + } + } + + if (stepInHidden == true && currentValue < timeStep._end.valueOf() && currentValue != previousTime) { + var prevValue = moment(previousTime); + var newValue = moment(endDate); + //check if the next step should be major + if (prevValue.year() != newValue.year()) { + timeStep.switchedYear = true; + } else if (prevValue.month() != newValue.month()) { + timeStep.switchedMonth = true; + } else if (prevValue.dayOfYear() != newValue.dayOfYear()) { + timeStep.switchedDay = true; + } + + timeStep.current = newValue; + } +}; + +///** +// * Used in TimeStep to avoid the hidden times. +// * @param timeStep +// * @param previousTime +// */ +//exports.checkFirstStep = function(timeStep) { +// var stepInHidden = false; +// var currentValue = timeStep.current.valueOf(); +// for (var i = 0; i < timeStep.hiddenDates.length; i++) { +// var startDate = timeStep.hiddenDates[i].start; +// var endDate = timeStep.hiddenDates[i].end; +// if (currentValue >= startDate && currentValue < endDate) { +// stepInHidden = true; +// break; +// } +// } +// +// if (stepInHidden == true && currentValue <= timeStep._end.valueOf()) { +// var newValue = moment(endDate); +// timeStep.current = newValue.toDate(); +// } +//}; + +/** + * replaces the Core toScreen methods + * + * @param {vis.Core} Core + * @param {Date} time + * @param {number} width + * @returns {number} + */ +exports.toScreen = function (Core, time, width) { + var conversion; + if (Core.body.hiddenDates.length == 0) { + conversion = Core.range.conversion(width); + return (time.valueOf() - conversion.offset) * conversion.scale; + } else { + var hidden = exports.isHidden(time, Core.body.hiddenDates); + if (hidden.hidden == true) { + time = hidden.startDate; + } + + var duration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end); + if (time < Core.range.start) { + conversion = Core.range.conversion(width, duration); + var hiddenBeforeStart = exports.getHiddenDurationBeforeStart(Core.body.hiddenDates, time, conversion.offset); + time = Core.options.moment(time).toDate().valueOf(); + time = time + hiddenBeforeStart; + return -(conversion.offset - time.valueOf()) * conversion.scale; + } else if (time > Core.range.end) { + var rangeAfterEnd = { start: Core.range.start, end: time }; + time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, rangeAfterEnd, time); + conversion = Core.range.conversion(width, duration); + return (time.valueOf() - conversion.offset) * conversion.scale; + } else { + time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, Core.range, time); + conversion = Core.range.conversion(width, duration); + return (time.valueOf() - conversion.offset) * conversion.scale; + } + } +}; + +/** + * Replaces the core toTime methods + * + * @param {vis.Core} Core + * @param {number} x + * @param {number} width + * @returns {Date} + */ +exports.toTime = function (Core, x, width) { + if (Core.body.hiddenDates.length == 0) { + var conversion = Core.range.conversion(width); + return new Date(x / conversion.scale + conversion.offset); + } else { + var hiddenDuration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end); + var totalDuration = Core.range.end - Core.range.start - hiddenDuration; + var partialDuration = totalDuration * x / width; + var accumulatedHiddenDuration = exports.getAccumulatedHiddenDuration(Core.body.hiddenDates, Core.range, partialDuration); + + return new Date(accumulatedHiddenDuration + partialDuration + Core.range.start); + } +}; + +/** + * Support function + * + * @param {Array.<{start: Window.start, end: *}>} hiddenDates + * @param {number} start + * @param {number} end + * @returns {number} + */ +exports.getHiddenDurationBetween = function (hiddenDates, start, end) { + var duration = 0; + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + // if time after the cutout, and the + if (startDate >= start && endDate < end) { + duration += endDate - startDate; + } + } + return duration; +}; + +/** + * Support function + * + * @param {Array.<{start: Window.start, end: *}>} hiddenDates + * @param {number} start + * @param {number} end + * @returns {number} + */ +exports.getHiddenDurationBeforeStart = function (hiddenDates, start, end) { + var duration = 0; + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + + if (startDate >= start && endDate <= end) { + duration += endDate - startDate; + } + } + return duration; +}; + +/** + * Support function + * @param {function} moment + * @param {Array.<{start: Window.start, end: *}>} hiddenDates + * @param {{start: number, end: number}} range + * @param {Date} time + * @returns {number} + */ +exports.correctTimeForHidden = function (moment, hiddenDates, range, time) { + time = moment(time).toDate().valueOf(); + time -= exports.getHiddenDurationBefore(moment, hiddenDates, range, time); + return time; +}; + +exports.getHiddenDurationBefore = function (moment, hiddenDates, range, time) { + var timeOffset = 0; + time = moment(time).toDate().valueOf(); + + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + // if time after the cutout, and the + if (startDate >= range.start && endDate < range.end) { + if (time >= endDate) { + timeOffset += endDate - startDate; + } + } + } + return timeOffset; +}; + +/** + * sum the duration from start to finish, including the hidden duration, + * until the required amount has been reached, return the accumulated hidden duration + * @param {Array.<{start: Window.start, end: *}>} hiddenDates + * @param {{start: number, end: number}} range + * @param {number} [requiredDuration=0] + * @returns {number} + */ +exports.getAccumulatedHiddenDuration = function (hiddenDates, range, requiredDuration) { + var hiddenDuration = 0; + var duration = 0; + var previousPoint = range.start; + //exports.printDates(hiddenDates) + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + // if time after the cutout, and the + if (startDate >= range.start && endDate < range.end) { + duration += startDate - previousPoint; + previousPoint = endDate; + if (duration >= requiredDuration) { + break; + } else { + hiddenDuration += endDate - startDate; + } + } + } + + return hiddenDuration; +}; + +/** + * used to step over to either side of a hidden block. Correction is disabled on tablets, might be set to true + * @param {Array.<{start: Window.start, end: *}>} hiddenDates + * @param {Date} time + * @param {number} direction + * @param {boolean} correctionEnabled + * @returns {Date|number} + */ +exports.snapAwayFromHidden = function (hiddenDates, time, direction, correctionEnabled) { + var isHidden = exports.isHidden(time, hiddenDates); + if (isHidden.hidden == true) { + if (direction < 0) { + if (correctionEnabled == true) { + return isHidden.startDate - (isHidden.endDate - time) - 1; + } else { + return isHidden.startDate - 1; + } + } else { + if (correctionEnabled == true) { + return isHidden.endDate + (time - isHidden.startDate) + 1; + } else { + return isHidden.endDate + 1; + } + } + } else { + return time; + } +}; + +/** + * Check if a time is hidden + * + * @param {Date} time + * @param {Array.<{start: Window.start, end: *}>} hiddenDates + * @returns {{hidden: boolean, startDate: Window.start, endDate: *}} + */ +exports.isHidden = function (time, hiddenDates) { + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + + if (time >= startDate && time < endDate) { + // if the start is entering a hidden zone + return { hidden: true, startDate: startDate, endDate: endDate }; + } + } + return { hidden: false, startDate: startDate, endDate: endDate }; +}; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Register a touch event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ +exports.onTouch = function (hammer, callback) { + callback.inputHandler = function (event) { + if (event.isFirst) { + callback(event); + } + }; + + hammer.on('hammer.input', callback.inputHandler); +}; + +/** + * Register a release event, taking place after a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + * @returns {*} + */ +exports.onRelease = function (hammer, callback) { + callback.inputHandler = function (event) { + if (event.isFinal) { + callback(event); + } + }; + + return hammer.on('hammer.input', callback.inputHandler); +}; + +/** + * Unregister a touch event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ +exports.offTouch = function (hammer, callback) { + hammer.off('hammer.input', callback.inputHandler); +}; + +/** + * Unregister a release event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ +exports.offRelease = exports.offTouch; + +/** + * Hack the PinchRecognizer such that it doesn't prevent default behavior + * for vertical panning. + * + * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932 + * + * @param {Hammer.Pinch} pinchRecognizer + * @return {Hammer.Pinch} returns the pinchRecognizer + */ +exports.disablePreventDefaultVertically = function (pinchRecognizer) { + var TOUCH_ACTION_PAN_Y = 'pan-y'; + + pinchRecognizer.getTouchAction = function () { + // default method returns [TOUCH_ACTION_NONE] + return [TOUCH_ACTION_PAN_Y]; + }; + + return pinchRecognizer; +}; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Hammer = __webpack_require__(10); +var util = __webpack_require__(2); +var moment = __webpack_require__(9); + +/** + * @constructor Item + * @param {Object} data Object containing (optional) parameters type, + * start, end, content, group, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} options Configuration options + * // TODO: describe available options + */ +function Item(data, conversion, options) { + this.id = null; + this.parent = null; + this.data = data; + this.dom = null; + this.conversion = conversion || {}; + this.options = options || {}; + this.selected = false; + this.displayed = false; + this.groupShowing = true; + this.dirty = true; + + this.top = null; + this.right = null; + this.left = null; + this.width = null; + this.height = null; + + this.editable = null; + this._updateEditStatus(); +} + +Item.prototype.stack = true; + +/** + * Select current item + */ +Item.prototype.select = function () { + this.selected = true; + this.dirty = true; + if (this.displayed) this.redraw(); +}; + +/** + * Unselect current item + */ +Item.prototype.unselect = function () { + this.selected = false; + this.dirty = true; + if (this.displayed) this.redraw(); +}; + +/** + * Set data for the item. Existing data will be updated. The id should not + * be changed. When the item is displayed, it will be redrawn immediately. + * @param {Object} data + */ +Item.prototype.setData = function (data) { + var groupChanged = data.group != undefined && this.data.group != data.group; + if (groupChanged && this.parent != null) { + this.parent.itemSet._moveToGroup(this, data.group); + } + + if (this.parent) { + this.parent.stackDirty = true; + } + + var subGroupChanged = data.subgroup != undefined && this.data.subgroup != data.subgroup; + if (subGroupChanged && this.parent != null) { + this.parent.changeSubgroup(this, this.data.subgroup, data.subgroup); + } + + this.data = data; + this._updateEditStatus(); + this.dirty = true; + if (this.displayed) this.redraw(); +}; + +/** + * Set a parent for the item + * @param {Group} parent + */ +Item.prototype.setParent = function (parent) { + if (this.displayed) { + this.hide(); + this.parent = parent; + if (this.parent) { + this.show(); + } + } else { + this.parent = parent; + } +}; + +/** + * Check whether this item is visible inside given range + * @param {vis.Range} range with a timestamp for start and end + * @returns {boolean} True if visible + */ +Item.prototype.isVisible = function (range) { + // eslint-disable-line no-unused-vars + return false; +}; + +/** + * Show the Item in the DOM (when not already visible) + * @return {Boolean} changed + */ +Item.prototype.show = function () { + return false; +}; + +/** + * Hide the Item from the DOM (when visible) + * @return {Boolean} changed + */ +Item.prototype.hide = function () { + return false; +}; + +/** + * Repaint the item + */ +Item.prototype.redraw = function () { + // should be implemented by the item +}; + +/** + * Reposition the Item horizontally + */ +Item.prototype.repositionX = function () { + // should be implemented by the item +}; + +/** + * Reposition the Item vertically + */ +Item.prototype.repositionY = function () { + // should be implemented by the item +}; + +/** + * Repaint a drag area on the center of the item when the item is selected + * @protected + */ +Item.prototype._repaintDragCenter = function () { + if (this.selected && this.options.editable.updateTime && !this.dom.dragCenter) { + var me = this; + // create and show drag area + var dragCenter = document.createElement('div'); + dragCenter.className = 'vis-drag-center'; + dragCenter.dragCenterItem = this; + var hammer = new Hammer(dragCenter); + + hammer.on('tap', function (event) { + me.parent.itemSet.body.emitter.emit('click', { + event: event, + item: me.id + }); + }); + hammer.on('doubletap', function (event) { + event.stopPropagation(); + me.parent.itemSet._onUpdateItem(me); + me.parent.itemSet.body.emitter.emit('doubleClick', { + event: event, + item: me.id + }); + }); + + if (this.dom.box) { + if (this.dom.dragLeft) { + this.dom.box.insertBefore(dragCenter, this.dom.dragLeft); + } else { + this.dom.box.appendChild(dragCenter); + } + } else if (this.dom.point) { + this.dom.point.appendChild(dragCenter); + } + + this.dom.dragCenter = dragCenter; + } else if (!this.selected && this.dom.dragCenter) { + // delete drag area + if (this.dom.dragCenter.parentNode) { + this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter); + } + this.dom.dragCenter = null; + } +}; + +/** + * Repaint a delete button on the top right of the item when the item is selected + * @param {HTMLElement} anchor + * @protected + */ +Item.prototype._repaintDeleteButton = function (anchor) { + var editable = (this.options.editable.overrideItems || this.editable == null) && this.options.editable.remove || !this.options.editable.overrideItems && this.editable != null && this.editable.remove; + + if (this.selected && editable && !this.dom.deleteButton) { + // create and show button + var me = this; + + var deleteButton = document.createElement('div'); + + if (this.options.rtl) { + deleteButton.className = 'vis-delete-rtl'; + } else { + deleteButton.className = 'vis-delete'; + } + deleteButton.title = 'Delete this item'; + + // TODO: be able to destroy the delete button + new Hammer(deleteButton).on('tap', function (event) { + event.stopPropagation(); + me.parent.removeFromDataSet(me); + }); + + anchor.appendChild(deleteButton); + this.dom.deleteButton = deleteButton; + } else if (!this.selected && this.dom.deleteButton) { + // remove button + if (this.dom.deleteButton.parentNode) { + this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton); + } + this.dom.deleteButton = null; + } +}; + +/** + * Repaint a onChange tooltip on the top right of the item when the item is selected + * @param {HTMLElement} anchor + * @protected + */ +Item.prototype._repaintOnItemUpdateTimeTooltip = function (anchor) { + if (!this.options.tooltipOnItemUpdateTime) return; + + var editable = (this.options.editable.updateTime || this.data.editable === true) && this.data.editable !== false; + + if (this.selected && editable && !this.dom.onItemUpdateTimeTooltip) { + var onItemUpdateTimeTooltip = document.createElement('div'); + + onItemUpdateTimeTooltip.className = 'vis-onUpdateTime-tooltip'; + anchor.appendChild(onItemUpdateTimeTooltip); + this.dom.onItemUpdateTimeTooltip = onItemUpdateTimeTooltip; + } else if (!this.selected && this.dom.onItemUpdateTimeTooltip) { + // remove button + if (this.dom.onItemUpdateTimeTooltip.parentNode) { + this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip); + } + this.dom.onItemUpdateTimeTooltip = null; + } + + // position onChange tooltip + if (this.dom.onItemUpdateTimeTooltip) { + + // only show when editing + this.dom.onItemUpdateTimeTooltip.style.visibility = this.parent.itemSet.touchParams.itemIsDragging ? 'visible' : 'hidden'; + + // position relative to item's content + if (this.options.rtl) { + this.dom.onItemUpdateTimeTooltip.style.right = this.dom.content.style.right; + } else { + this.dom.onItemUpdateTimeTooltip.style.left = this.dom.content.style.left; + } + + // position above or below the item depending on the item's position in the window + var tooltipOffset = 50; // TODO: should be tooltip height (depends on template) + var scrollTop = this.parent.itemSet.body.domProps.scrollTop; + + // TODO: this.top for orientation:true is actually the items distance from the bottom... + // (should be this.bottom) + var itemDistanceFromTop; + if (this.options.orientation.item == 'top') { + itemDistanceFromTop = this.top; + } else { + itemDistanceFromTop = this.parent.height - this.top - this.height; + } + var isCloseToTop = itemDistanceFromTop + this.parent.top - tooltipOffset < -scrollTop; + + if (isCloseToTop) { + this.dom.onItemUpdateTimeTooltip.style.bottom = ""; + this.dom.onItemUpdateTimeTooltip.style.top = this.height + 2 + "px"; + } else { + this.dom.onItemUpdateTimeTooltip.style.top = ""; + this.dom.onItemUpdateTimeTooltip.style.bottom = this.height + 2 + "px"; + } + + // handle tooltip content + var content; + var templateFunction; + + if (this.options.tooltipOnItemUpdateTime && this.options.tooltipOnItemUpdateTime.template) { + templateFunction = this.options.tooltipOnItemUpdateTime.template.bind(this); + content = templateFunction(this.data); + } else { + content = 'start: ' + moment(this.data.start).format('MM/DD/YYYY hh:mm'); + if (this.data.end) { + content += '
end: ' + moment(this.data.end).format('MM/DD/YYYY hh:mm'); + } + } + this.dom.onItemUpdateTimeTooltip.innerHTML = content; + } +}; + +/** + * Set HTML contents for the item + * @param {Element} element HTML element to fill with the contents + * @private + */ +Item.prototype._updateContents = function (element) { + var content; + var changed; + var templateFunction; + var itemVisibleFrameContent; + var visibleFrameTemplateFunction; + var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset + + var frameElement = this.dom.box || this.dom.point; + var itemVisibleFrameContentElement = frameElement.getElementsByClassName('vis-item-visible-frame')[0]; + + if (this.options.visibleFrameTemplate) { + visibleFrameTemplateFunction = this.options.visibleFrameTemplate.bind(this); + itemVisibleFrameContent = visibleFrameTemplateFunction(itemData, frameElement); + } else { + itemVisibleFrameContent = ''; + } + + if (itemVisibleFrameContentElement) { + if (itemVisibleFrameContent instanceof Object && !(itemVisibleFrameContent instanceof Element)) { + visibleFrameTemplateFunction(itemData, itemVisibleFrameContentElement); + } else { + changed = this._contentToString(this.itemVisibleFrameContent) !== this._contentToString(itemVisibleFrameContent); + if (changed) { + // only replace the content when changed + if (itemVisibleFrameContent instanceof Element) { + itemVisibleFrameContentElement.innerHTML = ''; + itemVisibleFrameContentElement.appendChild(itemVisibleFrameContent); + } else if (itemVisibleFrameContent != undefined) { + itemVisibleFrameContentElement.innerHTML = itemVisibleFrameContent; + } else { + if (!(this.data.type == 'background' && this.data.content === undefined)) { + throw new Error('Property "content" missing in item ' + this.id); + } + } + + this.itemVisibleFrameContent = itemVisibleFrameContent; + } + } + } + + if (this.options.template) { + templateFunction = this.options.template.bind(this); + content = templateFunction(itemData, element, this.data); + } else { + content = this.data.content; + } + + if (content instanceof Object && !(content instanceof Element)) { + templateFunction(itemData, element); + } else { + changed = this._contentToString(this.content) !== this._contentToString(content); + if (changed) { + // only replace the content when changed + if (content instanceof Element) { + element.innerHTML = ''; + element.appendChild(content); + } else if (content != undefined) { + element.innerHTML = content; + } else { + if (!(this.data.type == 'background' && this.data.content === undefined)) { + throw new Error('Property "content" missing in item ' + this.id); + } + } + this.content = content; + } + } +}; + +/** + * Process dataAttributes timeline option and set as data- attributes on dom.content + * @param {Element} element HTML element to which the attributes will be attached + * @private + */ +Item.prototype._updateDataAttributes = function (element) { + if (this.options.dataAttributes && this.options.dataAttributes.length > 0) { + var attributes = []; + + if (Array.isArray(this.options.dataAttributes)) { + attributes = this.options.dataAttributes; + } else if (this.options.dataAttributes == 'all') { + attributes = (0, _keys2['default'])(this.data); + } else { + return; + } + + for (var i = 0; i < attributes.length; i++) { + var name = attributes[i]; + var value = this.data[name]; + + if (value != null) { + element.setAttribute('data-' + name, value); + } else { + element.removeAttribute('data-' + name); + } + } + } +}; + +/** + * Update custom styles of the element + * @param {Element} element + * @private + */ +Item.prototype._updateStyle = function (element) { + // remove old styles + if (this.style) { + util.removeCssText(element, this.style); + this.style = null; + } + + // append new styles + if (this.data.style) { + util.addCssText(element, this.data.style); + this.style = this.data.style; + } +}; + +/** + * Stringify the items contents + * @param {string | Element | undefined} content + * @returns {string | undefined} + * @private + */ +Item.prototype._contentToString = function (content) { + if (typeof content === 'string') return content; + if (content && 'outerHTML' in content) return content.outerHTML; + return content; +}; + +/** + * Update the editability of this item. + */ +Item.prototype._updateEditStatus = function () { + if (this.options) { + if (typeof this.options.editable === 'boolean') { + this.editable = { + updateTime: this.options.editable, + updateGroup: this.options.editable, + remove: this.options.editable + }; + } else if ((0, _typeof3['default'])(this.options.editable) === 'object') { + this.editable = {}; + util.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.options.editable); + } + } + // Item data overrides, except if options.editable.overrideItems is set. + if (!this.options || !this.options.editable || this.options.editable.overrideItems !== true) { + if (this.data) { + if (typeof this.data.editable === 'boolean') { + this.editable = { + updateTime: this.data.editable, + updateGroup: this.data.editable, + remove: this.data.editable + }; + } else if ((0, _typeof3['default'])(this.data.editable) === 'object') { + // TODO: in vis.js 5.0, we should change this to not reset options from the timeline configuration. + // Basically just remove the next line... + this.editable = {}; + util.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.data.editable); + } + } + } +}; + +/** + * Return the width of the item left from its start date + * @return {number} + */ +Item.prototype.getWidthLeft = function () { + return 0; +}; + +/** + * Return the width of the item right from the max of its start and end date + * @return {number} + */ +Item.prototype.getWidthRight = function () { + return 0; +}; + +/** + * Return the title of the item + * @return {string | undefined} + */ +Item.prototype.getTitle = function () { + return this.data.title; +}; + +module.exports = Item; + +/***/ }), +/* 39 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(51); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * A queue + * @param {Object} options + * Available options: + * - delay: number When provided, the queue will be flushed + * automatically after an inactivity of this delay + * in milliseconds. + * Default value is null. + * - max: number When the queue exceeds the given maximum number + * of entries, the queue is flushed automatically. + * Default value of max is Infinity. + * @constructor Queue + */ +function Queue(options) { + // options + this.delay = null; + this.max = Infinity; + + // properties + this._queue = []; + this._timeout = null; + this._extended = null; + + this.setOptions(options); +} + +/** + * Update the configuration of the queue + * @param {Object} options + * Available options: + * - delay: number When provided, the queue will be flushed + * automatically after an inactivity of this delay + * in milliseconds. + * Default value is null. + * - max: number When the queue exceeds the given maximum number + * of entries, the queue is flushed automatically. + * Default value of max is Infinity. + */ +Queue.prototype.setOptions = function (options) { + if (options && typeof options.delay !== 'undefined') { + this.delay = options.delay; + } + if (options && typeof options.max !== 'undefined') { + this.max = options.max; + } + + this._flushIfNeeded(); +}; + +/** + * Extend an object with queuing functionality. + * The object will be extended with a function flush, and the methods provided + * in options.replace will be replaced with queued ones. + * @param {Object} object + * @param {Object} options + * Available options: + * - replace: Array. + * A list with method names of the methods + * on the object to be replaced with queued ones. + * - delay: number When provided, the queue will be flushed + * automatically after an inactivity of this delay + * in milliseconds. + * Default value is null. + * - max: number When the queue exceeds the given maximum number + * of entries, the queue is flushed automatically. + * Default value of max is Infinity. + * @return {Queue} Returns the created queue + */ +Queue.extend = function (object, options) { + var queue = new Queue(options); + + if (object.flush !== undefined) { + throw new Error('Target object already has a property flush'); + } + object.flush = function () { + queue.flush(); + }; + + var methods = [{ + name: 'flush', + original: undefined + }]; + + if (options && options.replace) { + for (var i = 0; i < options.replace.length; i++) { + var name = options.replace[i]; + methods.push({ + name: name, + original: object[name] + }); + queue.replace(object, name); + } + } + + queue._extended = { + object: object, + methods: methods + }; + + return queue; +}; + +/** + * Destroy the queue. The queue will first flush all queued actions, and in + * case it has extended an object, will restore the original object. + */ +Queue.prototype.destroy = function () { + this.flush(); + + if (this._extended) { + var object = this._extended.object; + var methods = this._extended.methods; + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + if (method.original) { + object[method.name] = method.original; + } else { + delete object[method.name]; + } + } + this._extended = null; + } +}; + +/** + * Replace a method on an object with a queued version + * @param {Object} object Object having the method + * @param {string} method The method name + */ +Queue.prototype.replace = function (object, method) { + var me = this; + var original = object[method]; + if (!original) { + throw new Error('Method ' + method + ' undefined'); + } + + object[method] = function () { + // create an Array with the arguments + var args = []; + for (var i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + // add this call to the queue + me.queue({ + args: args, + fn: original, + context: this + }); + }; +}; + +/** + * Queue a call + * @param {function | {fn: function, args: Array} | {fn: function, args: Array, context: Object}} entry + */ +Queue.prototype.queue = function (entry) { + if (typeof entry === 'function') { + this._queue.push({ fn: entry }); + } else { + this._queue.push(entry); + } + + this._flushIfNeeded(); +}; + +/** + * Check whether the queue needs to be flushed + * @private + */ +Queue.prototype._flushIfNeeded = function () { + // flush when the maximum is exceeded. + if (this._queue.length > this.max) { + this.flush(); + } + + // flush after a period of inactivity when a delay is configured + clearTimeout(this._timeout); + if (this.queue.length > 0 && typeof this.delay === 'number') { + var me = this; + this._timeout = setTimeout(function () { + me.flush(); + }, this.delay); + } +}; + +/** + * Flush all queued calls + */ +Queue.prototype.flush = function () { + while (this._queue.length > 0) { + var entry = this._queue.shift(); + entry.fn.apply(entry.context || entry.fn, entry.args || []); + } +}; + +module.exports = Queue; + +/***/ }), +/* 44 */ +/***/ (function(module, exports) { + + +/** + * Expose `Emitter`. + */ + +module.exports = Emitter; + +/** + * Initialize a new `Emitter`. + * + * @api public + */ + +function Emitter(obj) { + if (obj) return mixin(obj); +}; + +/** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + return obj; +} + +/** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.on = +Emitter.prototype.addEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + (this._callbacks[event] = this._callbacks[event] || []) + .push(fn); + return this; +}; + +/** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.once = function(event, fn){ + var self = this; + this._callbacks = this._callbacks || {}; + + function on() { + self.off(event, on); + fn.apply(this, arguments); + } + + on.fn = fn; + this.on(event, on); + return this; +}; + +/** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.off = +Emitter.prototype.removeListener = +Emitter.prototype.removeAllListeners = +Emitter.prototype.removeEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + + // all + if (0 == arguments.length) { + this._callbacks = {}; + return this; + } + + // specific event + var callbacks = this._callbacks[event]; + if (!callbacks) return this; + + // remove all handlers + if (1 == arguments.length) { + delete this._callbacks[event]; + return this; + } + + // remove specific handler + var cb; + for (var i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + if (cb === fn || cb.fn === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; +}; + +/** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + +Emitter.prototype.emit = function(event){ + this._callbacks = this._callbacks || {}; + var args = [].slice.call(arguments, 1) + , callbacks = this._callbacks[event]; + + if (callbacks) { + callbacks = callbacks.slice(0); + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; +}; + +/** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + +Emitter.prototype.listeners = function(event){ + this._callbacks = this._callbacks || {}; + return this._callbacks[event] || []; +}; + +/** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + +Emitter.prototype.hasListeners = function(event){ + return !! this.listeners(event).length; +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var Component = __webpack_require__(16); +var TimeStep = __webpack_require__(66); +var DateUtil = __webpack_require__(36); +var moment = __webpack_require__(9); + +/** + * A horizontal time axis + * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body + * @param {Object} [options] See TimeAxis.setOptions for the available + * options. + * @constructor TimeAxis + * @extends Component + */ +function TimeAxis(body, options) { + this.dom = { + foreground: null, + lines: [], + majorTexts: [], + minorTexts: [], + redundant: { + lines: [], + majorTexts: [], + minorTexts: [] + } + }; + this.props = { + range: { + start: 0, + end: 0, + minimumStep: 0 + }, + lineTop: 0 + }; + + this.defaultOptions = { + orientation: { + axis: 'bottom' + }, // axis orientation: 'top' or 'bottom' + showMinorLabels: true, + showMajorLabels: true, + maxMinorChars: 7, + format: TimeStep.FORMAT, + moment: moment, + timeAxis: null + }; + this.options = util.extend({}, this.defaultOptions); + + this.body = body; + + // create the HTML DOM + this._create(); + + this.setOptions(options); +} + +TimeAxis.prototype = new Component(); + +/** + * Set options for the TimeAxis. + * Parameters will be merged in current options. + * @param {Object} options Available options: + * {string} [orientation.axis] + * {boolean} [showMinorLabels] + * {boolean} [showMajorLabels] + */ +TimeAxis.prototype.setOptions = function (options) { + if (options) { + // copy all options that we know + util.selectiveExtend(['showMinorLabels', 'showMajorLabels', 'maxMinorChars', 'hiddenDates', 'timeAxis', 'moment', 'rtl'], this.options, options); + + // deep copy the format options + util.selectiveDeepExtend(['format'], this.options, options); + + if ('orientation' in options) { + if (typeof options.orientation === 'string') { + this.options.orientation.axis = options.orientation; + } else if ((0, _typeof3['default'])(options.orientation) === 'object' && 'axis' in options.orientation) { + this.options.orientation.axis = options.orientation.axis; + } + } + + // apply locale to moment.js + // TODO: not so nice, this is applied globally to moment.js + if ('locale' in options) { + if (typeof moment.locale === 'function') { + // moment.js 2.8.1+ + moment.locale(options.locale); + } else { + moment.lang(options.locale); + } + } + } +}; + +/** + * Create the HTML DOM for the TimeAxis + */ +TimeAxis.prototype._create = function () { + this.dom.foreground = document.createElement('div'); + this.dom.background = document.createElement('div'); + + this.dom.foreground.className = 'vis-time-axis vis-foreground'; + this.dom.background.className = 'vis-time-axis vis-background'; +}; + +/** + * Destroy the TimeAxis + */ +TimeAxis.prototype.destroy = function () { + // remove from DOM + if (this.dom.foreground.parentNode) { + this.dom.foreground.parentNode.removeChild(this.dom.foreground); + } + if (this.dom.background.parentNode) { + this.dom.background.parentNode.removeChild(this.dom.background); + } + + this.body = null; +}; + +/** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ +TimeAxis.prototype.redraw = function () { + var props = this.props; + var foreground = this.dom.foreground; + var background = this.dom.background; + + // determine the correct parent DOM element (depending on option orientation) + var parent = this.options.orientation.axis == 'top' ? this.body.dom.top : this.body.dom.bottom; + var parentChanged = foreground.parentNode !== parent; + + // calculate character width and height + this._calculateCharSize(); + + // TODO: recalculate sizes only needed when parent is resized or options is changed + var showMinorLabels = this.options.showMinorLabels && this.options.orientation.axis !== 'none'; + var showMajorLabels = this.options.showMajorLabels && this.options.orientation.axis !== 'none'; + + // determine the width and height of the elemens for the axis + props.minorLabelHeight = showMinorLabels ? props.minorCharHeight : 0; + props.majorLabelHeight = showMajorLabels ? props.majorCharHeight : 0; + props.height = props.minorLabelHeight + props.majorLabelHeight; + props.width = foreground.offsetWidth; + + props.minorLineHeight = this.body.domProps.root.height - props.majorLabelHeight - (this.options.orientation.axis == 'top' ? this.body.domProps.bottom.height : this.body.domProps.top.height); + props.minorLineWidth = 1; // TODO: really calculate width + props.majorLineHeight = props.minorLineHeight + props.majorLabelHeight; + props.majorLineWidth = 1; // TODO: really calculate width + + // take foreground and background offline while updating (is almost twice as fast) + var foregroundNextSibling = foreground.nextSibling; + var backgroundNextSibling = background.nextSibling; + foreground.parentNode && foreground.parentNode.removeChild(foreground); + background.parentNode && background.parentNode.removeChild(background); + + foreground.style.height = this.props.height + 'px'; + + this._repaintLabels(); + + // put DOM online again (at the same place) + if (foregroundNextSibling) { + parent.insertBefore(foreground, foregroundNextSibling); + } else { + parent.appendChild(foreground); + } + if (backgroundNextSibling) { + this.body.dom.backgroundVertical.insertBefore(background, backgroundNextSibling); + } else { + this.body.dom.backgroundVertical.appendChild(background); + } + return this._isResized() || parentChanged; +}; + +/** + * Repaint major and minor text labels and vertical grid lines + * @private + */ +TimeAxis.prototype._repaintLabels = function () { + var orientation = this.options.orientation.axis; + + // calculate range and step (step such that we have space for 7 characters per label) + var start = util.convert(this.body.range.start, 'Number'); + var end = util.convert(this.body.range.end, 'Number'); + var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * this.options.maxMinorChars).valueOf(); + var minimumStep = timeLabelsize - DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this.body.range, timeLabelsize); + minimumStep -= this.body.util.toTime(0).valueOf(); + + var step = new TimeStep(new Date(start), new Date(end), minimumStep, this.body.hiddenDates, this.options); + step.setMoment(this.options.moment); + if (this.options.format) { + step.setFormat(this.options.format); + } + if (this.options.timeAxis) { + step.setScale(this.options.timeAxis); + } + this.step = step; + + // Move all DOM elements to a "redundant" list, where they + // can be picked for re-use, and clear the lists with lines and texts. + // At the end of the function _repaintLabels, left over elements will be cleaned up + var dom = this.dom; + dom.redundant.lines = dom.lines; + dom.redundant.majorTexts = dom.majorTexts; + dom.redundant.minorTexts = dom.minorTexts; + dom.lines = []; + dom.majorTexts = []; + dom.minorTexts = []; + + var current; // eslint-disable-line no-unused-vars + var next; + var x; + var xNext; + var isMajor; + var nextIsMajor; // eslint-disable-line no-unused-vars + var showMinorGrid; + var width = 0, + prevWidth; + var line; + var labelMinor; + var xFirstMajorLabel = undefined; + var count = 0; + var MAX = 1000; + var className; + + step.start(); + next = step.getCurrent(); + xNext = this.body.util.toScreen(next); + while (step.hasNext() && count < MAX) { + count++; + + isMajor = step.isMajor(); + className = step.getClassName(); + labelMinor = step.getLabelMinor(); + + current = next; + x = xNext; + + step.next(); + next = step.getCurrent(); + nextIsMajor = step.isMajor(); + xNext = this.body.util.toScreen(next); + + prevWidth = width; + width = xNext - x; + switch (step.scale) { + case 'week': + showMinorGrid = true;break; + default: + showMinorGrid = width >= prevWidth * 0.4;break; // prevent displaying of the 31th of the month on a scale of 5 days + } + + if (this.options.showMinorLabels && showMinorGrid) { + var label = this._repaintMinorText(x, labelMinor, orientation, className); + label.style.width = width + 'px'; // set width to prevent overflow + } + + if (isMajor && this.options.showMajorLabels) { + if (x > 0) { + if (xFirstMajorLabel == undefined) { + xFirstMajorLabel = x; + } + label = this._repaintMajorText(x, step.getLabelMajor(), orientation, className); + } + line = this._repaintMajorLine(x, width, orientation, className); + } else { + // minor line + if (showMinorGrid) { + line = this._repaintMinorLine(x, width, orientation, className); + } else { + if (line) { + // adjust the width of the previous grid + line.style.width = parseInt(line.style.width) + width + 'px'; + } + } + } + } + + if (count === MAX && !warnedForOverflow) { + console.warn('Something is wrong with the Timeline scale. Limited drawing of grid lines to ' + MAX + ' lines.'); + warnedForOverflow = true; + } + + // create a major label on the left when needed + if (this.options.showMajorLabels) { + var leftTime = this.body.util.toTime(0), + leftText = step.getLabelMajor(leftTime), + widthText = leftText.length * (this.props.majorCharWidth || 10) + 10; // upper bound estimation + + if (xFirstMajorLabel == undefined || widthText < xFirstMajorLabel) { + this._repaintMajorText(0, leftText, orientation, className); + } + } + + // Cleanup leftover DOM elements from the redundant list + util.forEach(this.dom.redundant, function (arr) { + while (arr.length) { + var elem = arr.pop(); + if (elem && elem.parentNode) { + elem.parentNode.removeChild(elem); + } + } + }); +}; + +/** + * Create a minor label for the axis at position x + * @param {number} x + * @param {string} text + * @param {string} orientation "top" or "bottom" (default) + * @param {string} className + * @return {Element} Returns the HTML element of the created label + * @private + */ +TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className) { + // reuse redundant label + var label = this.dom.redundant.minorTexts.shift(); + + if (!label) { + // create new label + var content = document.createTextNode(''); + label = document.createElement('div'); + label.appendChild(content); + this.dom.foreground.appendChild(label); + } + this.dom.minorTexts.push(label); + label.innerHTML = text; + + label.style.top = orientation == 'top' ? this.props.majorLabelHeight + 'px' : '0'; + + if (this.options.rtl) { + label.style.left = ""; + label.style.right = x + 'px'; + } else { + label.style.left = x + 'px'; + } + label.className = 'vis-text vis-minor ' + className; + //label.title = title; // TODO: this is a heavy operation + + return label; +}; + +/** + * Create a Major label for the axis at position x + * @param {number} x + * @param {string} text + * @param {string} orientation "top" or "bottom" (default) + * @param {string} className + * @return {Element} Returns the HTML element of the created label + * @private + */ +TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className) { + // reuse redundant label + var label = this.dom.redundant.majorTexts.shift(); + + if (!label) { + // create label + var content = document.createElement('div'); + label = document.createElement('div'); + label.appendChild(content); + this.dom.foreground.appendChild(label); + } + + label.childNodes[0].innerHTML = text; + label.className = 'vis-text vis-major ' + className; + //label.title = title; // TODO: this is a heavy operation + + label.style.top = orientation == 'top' ? '0' : this.props.minorLabelHeight + 'px'; + if (this.options.rtl) { + label.style.left = ""; + label.style.right = x + 'px'; + } else { + label.style.left = x + 'px'; + } + + this.dom.majorTexts.push(label); + return label; +}; + +/** + * Create a minor line for the axis at position x + * @param {number} x + * @param {number} width + * @param {string} orientation "top" or "bottom" (default) + * @param {string} className + * @return {Element} Returns the created line + * @private + */ +TimeAxis.prototype._repaintMinorLine = function (x, width, orientation, className) { + // reuse redundant line + var line = this.dom.redundant.lines.shift(); + if (!line) { + // create vertical line + line = document.createElement('div'); + this.dom.background.appendChild(line); + } + this.dom.lines.push(line); + + var props = this.props; + if (orientation == 'top') { + line.style.top = props.majorLabelHeight + 'px'; + } else { + line.style.top = this.body.domProps.top.height + 'px'; + } + line.style.height = props.minorLineHeight + 'px'; + if (this.options.rtl) { + line.style.left = ""; + line.style.right = x - props.minorLineWidth / 2 + 'px'; + line.className = 'vis-grid vis-vertical-rtl vis-minor ' + className; + } else { + line.style.left = x - props.minorLineWidth / 2 + 'px'; + line.className = 'vis-grid vis-vertical vis-minor ' + className; + } + line.style.width = width + 'px'; + + return line; +}; + +/** + * Create a Major line for the axis at position x + * @param {number} x + * @param {number} width + * @param {string} orientation "top" or "bottom" (default) + * @param {string} className + * @return {Element} Returns the created line + * @private + */ +TimeAxis.prototype._repaintMajorLine = function (x, width, orientation, className) { + // reuse redundant line + var line = this.dom.redundant.lines.shift(); + if (!line) { + // create vertical line + line = document.createElement('div'); + this.dom.background.appendChild(line); + } + this.dom.lines.push(line); + + var props = this.props; + if (orientation == 'top') { + line.style.top = '0'; + } else { + line.style.top = this.body.domProps.top.height + 'px'; + } + + if (this.options.rtl) { + line.style.left = ""; + line.style.right = x - props.majorLineWidth / 2 + 'px'; + line.className = 'vis-grid vis-vertical-rtl vis-major ' + className; + } else { + line.style.left = x - props.majorLineWidth / 2 + 'px'; + line.className = 'vis-grid vis-vertical vis-major ' + className; + } + + line.style.height = props.majorLineHeight + 'px'; + line.style.width = width + 'px'; + + return line; +}; + +/** + * Determine the size of text on the axis (both major and minor axis). + * The size is calculated only once and then cached in this.props. + * @private + */ +TimeAxis.prototype._calculateCharSize = function () { + // Note: We calculate char size with every redraw. Size may change, for + // example when any of the timelines parents had display:none for example. + + // determine the char width and height on the minor axis + if (!this.dom.measureCharMinor) { + this.dom.measureCharMinor = document.createElement('DIV'); + this.dom.measureCharMinor.className = 'vis-text vis-minor vis-measure'; + this.dom.measureCharMinor.style.position = 'absolute'; + + this.dom.measureCharMinor.appendChild(document.createTextNode('0')); + this.dom.foreground.appendChild(this.dom.measureCharMinor); + } + this.props.minorCharHeight = this.dom.measureCharMinor.clientHeight; + this.props.minorCharWidth = this.dom.measureCharMinor.clientWidth; + + // determine the char width and height on the major axis + if (!this.dom.measureCharMajor) { + this.dom.measureCharMajor = document.createElement('DIV'); + this.dom.measureCharMajor.className = 'vis-text vis-major vis-measure'; + this.dom.measureCharMajor.style.position = 'absolute'; + + this.dom.measureCharMajor.appendChild(document.createTextNode('0')); + this.dom.foreground.appendChild(this.dom.measureCharMajor); + } + this.props.majorCharHeight = this.dom.measureCharMajor.clientHeight; + this.props.majorCharWidth = this.dom.measureCharMajor.clientWidth; +}; + +var warnedForOverflow = false; + +module.exports = TimeAxis; + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Hammer = __webpack_require__(10); +var util = __webpack_require__(2); +var Component = __webpack_require__(16); +var moment = __webpack_require__(9); +var locales = __webpack_require__(98); + +/** + * A custom time bar + * @param {{range: Range, dom: Object}} body + * @param {Object} [options] Available parameters: + * {number | string} id + * {string} locales + * {string} locale + * @constructor CustomTime + * @extends Component + */ +function CustomTime(body, options) { + this.body = body; + + // default options + this.defaultOptions = { + moment: moment, + locales: locales, + locale: 'en', + id: undefined, + title: undefined + }; + this.options = util.extend({}, this.defaultOptions); + + if (options && options.time) { + this.customTime = options.time; + } else { + this.customTime = new Date(); + } + + this.eventParams = {}; // stores state parameters while dragging the bar + + this.setOptions(options); + + // create the DOM + this._create(); +} + +CustomTime.prototype = new Component(); + +/** + * Set options for the component. Options will be merged in current options. + * @param {Object} options Available parameters: + * {number | string} id + * {string} locales + * {string} locale + */ +CustomTime.prototype.setOptions = function (options) { + if (options) { + // copy all options that we know + util.selectiveExtend(['moment', 'locale', 'locales', 'id'], this.options, options); + } +}; + +/** + * Create the DOM for the custom time + * @private + */ +CustomTime.prototype._create = function () { + var bar = document.createElement('div'); + bar['custom-time'] = this; + bar.className = 'vis-custom-time ' + (this.options.id || ''); + bar.style.position = 'absolute'; + bar.style.top = '0px'; + bar.style.height = '100%'; + this.bar = bar; + + var drag = document.createElement('div'); + drag.style.position = 'relative'; + drag.style.top = '0px'; + drag.style.left = '-10px'; + drag.style.height = '100%'; + drag.style.width = '20px'; + + /** + * + * @param {WheelEvent} e + */ + function onMouseWheel(e) { + this.body.range._onMouseWheel(e); + } + + if (drag.addEventListener) { + // IE9, Chrome, Safari, Opera + drag.addEventListener("mousewheel", onMouseWheel.bind(this), false); + // Firefox + drag.addEventListener("DOMMouseScroll", onMouseWheel.bind(this), false); + } else { + // IE 6/7/8 + drag.attachEvent("onmousewheel", onMouseWheel.bind(this)); + } + + bar.appendChild(drag); + // attach event listeners + this.hammer = new Hammer(drag); + this.hammer.on('panstart', this._onDragStart.bind(this)); + this.hammer.on('panmove', this._onDrag.bind(this)); + this.hammer.on('panend', this._onDragEnd.bind(this)); + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); +}; + +/** + * Destroy the CustomTime bar + */ +CustomTime.prototype.destroy = function () { + this.hide(); + + this.hammer.destroy(); + this.hammer = null; + + this.body = null; +}; + +/** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ +CustomTime.prototype.redraw = function () { + var parent = this.body.dom.backgroundVertical; + if (this.bar.parentNode != parent) { + // attach to the dom + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); + } + parent.appendChild(this.bar); + } + + var x = this.body.util.toScreen(this.customTime); + + var locale = this.options.locales[this.options.locale]; + if (!locale) { + if (!this.warned) { + console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline/#Localization'); + this.warned = true; + } + locale = this.options.locales['en']; // fall back on english when not available + } + + var title = this.options.title; + // To hide the title completely use empty string ''. + if (title === undefined) { + title = locale.time + ': ' + this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss'); + title = title.charAt(0).toUpperCase() + title.substring(1); + } else if (typeof title === "function") { + title = title.call(this.customTime); + } + + this.bar.style.left = x + 'px'; + this.bar.title = title; + + return false; +}; + +/** + * Remove the CustomTime from the DOM + */ +CustomTime.prototype.hide = function () { + // remove the line from the DOM + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); + } +}; + +/** + * Set custom time. + * @param {Date | number | string} time + */ +CustomTime.prototype.setCustomTime = function (time) { + this.customTime = util.convert(time, 'Date'); + this.redraw(); +}; + +/** + * Retrieve the current custom time. + * @return {Date} customTime + */ +CustomTime.prototype.getCustomTime = function () { + return new Date(this.customTime.valueOf()); +}; + +/** + * Set custom title. + * @param {Date | number | string} title + */ +CustomTime.prototype.setCustomTitle = function (title) { + this.options.title = title; +}; + +/** + * Start moving horizontally + * @param {Event} event + * @private + */ +CustomTime.prototype._onDragStart = function (event) { + this.eventParams.dragging = true; + this.eventParams.customTime = this.customTime; + + event.stopPropagation(); +}; + +/** + * Perform moving operating. + * @param {Event} event + * @private + */ +CustomTime.prototype._onDrag = function (event) { + if (!this.eventParams.dragging) return; + + var x = this.body.util.toScreen(this.eventParams.customTime) + event.deltaX; + var time = this.body.util.toTime(x); + + this.setCustomTime(time); + + // fire a timechange event + this.body.emitter.emit('timechange', { + id: this.options.id, + time: new Date(this.customTime.valueOf()), + event: event + }); + + event.stopPropagation(); +}; + +/** + * Stop moving operating. + * @param {Event} event + * @private + */ +CustomTime.prototype._onDragEnd = function (event) { + if (!this.eventParams.dragging) return; + + // fire a timechanged event + this.body.emitter.emit('timechanged', { + id: this.options.id, + time: new Date(this.customTime.valueOf()), + event: event + }); + + event.stopPropagation(); +}; + +/** + * Find a custom time from an event target: + * searches for the attribute 'custom-time' in the event target's element tree + * @param {Event} event + * @return {CustomTime | null} customTime + */ +CustomTime.customTimeFromTarget = function (event) { + var target = event.target; + while (target) { + if (target.hasOwnProperty('custom-time')) { + return target['custom-time']; + } + target = target.parentNode; + } + + return null; +}; + +module.exports = CustomTime; + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); + +var Label = __webpack_require__(117)['default']; +var ComponentUtil = __webpack_require__(48)['default']; +var Box = __webpack_require__(193)['default']; +var Circle = __webpack_require__(200)['default']; +var CircularImage = __webpack_require__(201)['default']; +var Database = __webpack_require__(202)['default']; +var Diamond = __webpack_require__(203)['default']; +var Dot = __webpack_require__(204)['default']; +var Ellipse = __webpack_require__(205)['default']; +var Icon = __webpack_require__(206)['default']; +var Image = __webpack_require__(207)['default']; +var Square = __webpack_require__(208)['default']; +var Hexagon = __webpack_require__(209)['default']; +var Star = __webpack_require__(210)['default']; +var Text = __webpack_require__(211)['default']; +var Triangle = __webpack_require__(212)['default']; +var TriangleDown = __webpack_require__(213)['default']; + +var _require = __webpack_require__(15), + printStyle = _require.printStyle; + +/** + * A node. A node can be connected to other nodes via one or multiple edges. + */ + + +var Node = function () { + /** + * + * @param {object} options An object containing options for the node. All + * options are optional, except for the id. + * {number} id Id of the node. Required + * {string} label Text label for the node + * {number} x Horizontal position of the node + * {number} y Vertical position of the node + * {string} shape Node shape + * {string} image An image url + * {string} title A title text, can be HTML + * {anytype} group A group name or number + * + * @param {Object} body Shared state of current network instance + * @param {Network.Images} imagelist A list with images. Only needed when the node has an image + * @param {Groups} grouplist A list with groups. Needed for retrieving group options + * @param {Object} globalOptions Current global node options; these serve as defaults for the node instance + * @param {Object} defaultOptions Global default options for nodes; note that this is also the prototype + * for parameter `globalOptions`. + */ + function Node(options, body, imagelist, grouplist, globalOptions, defaultOptions) { + (0, _classCallCheck3['default'])(this, Node); + + this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; + this.defaultOptions = defaultOptions; + this.body = body; + + this.edges = []; // all edges connected to this node + + // set defaults for the options + this.id = undefined; + this.imagelist = imagelist; + this.grouplist = grouplist; + + // state options + this.x = undefined; + this.y = undefined; + this.baseSize = this.options.size; + this.baseFontSize = this.options.font.size; + this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate + this.selected = false; + this.hover = false; + + this.labelModule = new Label(this.body, this.options, false /* Not edge label */); + this.setOptions(options); + } + + /** + * Attach a edge to the node + * @param {Edge} edge + */ + + + (0, _createClass3['default'])(Node, [{ + key: 'attachEdge', + value: function attachEdge(edge) { + if (this.edges.indexOf(edge) === -1) { + this.edges.push(edge); + } + } + + /** + * Detach a edge from the node + * + * @param {Edge} edge + */ + + }, { + key: 'detachEdge', + value: function detachEdge(edge) { + var index = this.edges.indexOf(edge); + if (index != -1) { + this.edges.splice(index, 1); + } + } + + /** + * Set or overwrite options for the node + * + * @param {Object} options an object with options + * @returns {null|boolean} + */ + + }, { + key: 'setOptions', + value: function setOptions(options) { + var currentShape = this.options.shape; + if (!options) { + return; // Note that the return value will be 'undefined'! This is OK. + } + + // basic options + if (options.id !== undefined) { + this.id = options.id; + } + + if (this.id === undefined) { + throw new Error("Node must have an id"); + } + + Node.checkMass(options, this.id); + + // set these options locally + // clear x and y positions + if (options.x !== undefined) { + if (options.x === null) { + this.x = undefined;this.predefinedPosition = false; + } else { + this.x = parseInt(options.x);this.predefinedPosition = true; + } + } + if (options.y !== undefined) { + if (options.y === null) { + this.y = undefined;this.predefinedPosition = false; + } else { + this.y = parseInt(options.y);this.predefinedPosition = true; + } + } + if (options.size !== undefined) { + this.baseSize = options.size; + } + if (options.value !== undefined) { + options.value = parseFloat(options.value); + } + + // this transforms all shorthands into fully defined options + Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist); + + var pile = [options, this.options, this.defaultOptions]; + this.chooser = ComponentUtil.choosify('node', pile); + + this._load_images(); + this.updateLabelModule(options); + this.updateShape(currentShape); + + return options.hidden !== undefined || options.physics !== undefined; + } + + /** + * Load the images from the options, for the nodes that need them. + * + * TODO: The imageObj members should be moved to CircularImageBase. + * It's the only place where they are required. + * + * @private + */ + + }, { + key: '_load_images', + value: function _load_images() { + // Don't bother loading for nodes without images + if (this.options.shape !== 'circularImage' && this.options.shape !== 'image') { + return; + } + + if (this.options.image === undefined) { + throw new Error("Option image must be defined for node type '" + this.options.shape + "'"); + } + + if (this.imagelist === undefined) { + throw new Error("Internal Error: No images provided"); + } + + if (typeof this.options.image === 'string') { + this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id); + } else { + if (this.options.image.unselected === undefined) { + throw new Error("No unselected image provided"); + } + + this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id); + + if (this.options.image.selected !== undefined) { + this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id); + } else { + this.imageObjAlt = undefined; + } + } + } + + /** + * Copy group option values into the node options. + * + * The group options override the global node options, so the copy of group options + * must happen *after* the global node options have been set. + * + * This method must also be called also if the global node options have changed and the group options did not. + * + * @param {Object} parentOptions + * @param {Object} newOptions new values for the options, currently only passed in for check + * @param {Object} groupList + */ + + }, { + key: 'getFormattingValues', + + + /** + * + * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}} + */ + value: function getFormattingValues() { + var values = { + color: this.options.color.background, + borderWidth: this.options.borderWidth, + borderColor: this.options.color.border, + size: this.options.size, + borderDashes: this.options.shapeProperties.borderDashes, + borderRadius: this.options.shapeProperties.borderRadius, + shadow: this.options.shadow.enabled, + shadowColor: this.options.shadow.color, + shadowSize: this.options.shadow.size, + shadowX: this.options.shadow.x, + shadowY: this.options.shadow.y + }; + if (this.selected || this.hover) { + if (this.chooser === true) { + if (this.selected) { + values.borderWidth *= 2; + values.color = this.options.color.highlight.background; + values.borderColor = this.options.color.highlight.border; + values.shadow = this.options.shadow.enabled; + } else if (this.hover) { + values.color = this.options.color.hover.background; + values.borderColor = this.options.color.hover.border; + values.shadow = this.options.shadow.enabled; + } + } else if (typeof this.chooser === 'function') { + this.chooser(values, this.options.id, this.selected, this.hover); + if (values.shadow === false) { + if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) { + values.shadow = true; + } + } + } + } else { + values.shadow = this.options.shadow.enabled; + } + return values; + } + + /** + * + * @param {Object} options + */ + + }, { + key: 'updateLabelModule', + value: function updateLabelModule(options) { + if (this.options.label === undefined || this.options.label === null) { + this.options.label = ''; + } + + Node.updateGroupOptions(this.options, options, this.grouplist); + + // + // Note:The prototype chain for this.options is: + // + // this.options -> NodesHandler.options -> NodesHandler.defaultOptions + // (also: this.globalOptions) + // + // Note that the prototypes are mentioned explicitly in the pile list below; + // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels. + // This is a good indication that the prototype usage of options is deficient. + // + var currentGroup = this.grouplist.get(this.options.group, false); + var pile = [options, // new options + this.options, // current node options, see comment above for prototype + currentGroup, // group options, if any + this.globalOptions, // Currently set global node options + this.defaultOptions // Default global node options + ]; + this.labelModule.update(this.options, pile); + + if (this.labelModule.baseSize !== undefined) { + this.baseFontSize = this.labelModule.baseSize; + } + } + + /** + * + * @param {string} currentShape + */ + + }, { + key: 'updateShape', + value: function updateShape(currentShape) { + if (currentShape === this.options.shape && this.shape) { + this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt); + } else { + // choose draw method depending on the shape + switch (this.options.shape) { + case 'box': + this.shape = new Box(this.options, this.body, this.labelModule); + break; + case 'circle': + this.shape = new Circle(this.options, this.body, this.labelModule); + break; + case 'circularImage': + this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt); + break; + case 'database': + this.shape = new Database(this.options, this.body, this.labelModule); + break; + case 'diamond': + this.shape = new Diamond(this.options, this.body, this.labelModule); + break; + case 'dot': + this.shape = new Dot(this.options, this.body, this.labelModule); + break; + case 'ellipse': + this.shape = new Ellipse(this.options, this.body, this.labelModule); + break; + case 'icon': + this.shape = new Icon(this.options, this.body, this.labelModule); + break; + case 'image': + this.shape = new Image(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt); + break; + case 'square': + this.shape = new Square(this.options, this.body, this.labelModule); + break; + case 'hexagon': + this.shape = new Hexagon(this.options, this.body, this.labelModule); + break; + case 'star': + this.shape = new Star(this.options, this.body, this.labelModule); + break; + case 'text': + this.shape = new Text(this.options, this.body, this.labelModule); + break; + case 'triangle': + this.shape = new Triangle(this.options, this.body, this.labelModule); + break; + case 'triangleDown': + this.shape = new TriangleDown(this.options, this.body, this.labelModule); + break; + default: + this.shape = new Ellipse(this.options, this.body, this.labelModule); + break; + } + } + this.needsRefresh(); + } + + /** + * select this node + */ + + }, { + key: 'select', + value: function select() { + this.selected = true; + this.needsRefresh(); + } + + /** + * unselect this node + */ + + }, { + key: 'unselect', + value: function unselect() { + this.selected = false; + this.needsRefresh(); + } + + /** + * Reset the calculated size of the node, forces it to recalculate its size + */ + + }, { + key: 'needsRefresh', + value: function needsRefresh() { + this.shape.refreshNeeded = true; + } + + /** + * get the title of this node. + * @return {string} title The title of the node, or undefined when no title + * has been set. + */ + + }, { + key: 'getTitle', + value: function getTitle() { + return this.options.title; + } + + /** + * Calculate the distance to the border of the Node + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle Angle in radians + * @returns {number} distance Distance to the border in pixels + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this.shape.distanceToBorder(ctx, angle); + } + + /** + * Check if this node has a fixed x and y position + * @return {boolean} true if fixed, false if not + */ + + }, { + key: 'isFixed', + value: function isFixed() { + return this.options.fixed.x && this.options.fixed.y; + } + + /** + * check if this node is selecte + * @return {boolean} selected True if node is selected, else false + */ + + }, { + key: 'isSelected', + value: function isSelected() { + return this.selected; + } + + /** + * Retrieve the value of the node. Can be undefined + * @return {number} value + */ + + }, { + key: 'getValue', + value: function getValue() { + return this.options.value; + } + + /** + * Get the current dimensions of the label + * + * @return {rect} + */ + + }, { + key: 'getLabelSize', + value: function getLabelSize() { + return this.labelModule.size(); + } + + /** + * Adjust the value range of the node. The node will adjust it's size + * based on its value. + * @param {number} min + * @param {number} max + * @param {number} total + */ + + }, { + key: 'setValueRange', + value: function setValueRange(min, max, total) { + if (this.options.value !== undefined) { + var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value); + var sizeDiff = this.options.scaling.max - this.options.scaling.min; + if (this.options.scaling.label.enabled === true) { + var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min; + this.options.font.size = this.options.scaling.label.min + scale * fontDiff; + } + this.options.size = this.options.scaling.min + scale * sizeDiff; + } else { + this.options.size = this.baseSize; + this.options.font.size = this.baseFontSize; + } + + this.updateLabelModule(); + } + + /** + * Draw this node in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: 'draw', + value: function draw(ctx) { + var values = this.getFormattingValues(); + this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values); + } + + /** + * Update the bounding box of the shape + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: 'updateBoundingBox', + value: function updateBoundingBox(ctx) { + this.shape.updateBoundingBox(this.x, this.y, ctx); + } + + /** + * Recalculate the size of this node in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: 'resize', + value: function resize(ctx) { + var values = this.getFormattingValues(); + this.shape.resize(ctx, this.selected, this.hover, values); + } + + /** + * Determine all visual elements of this node instance, in which the given + * point falls within the bounding shape. + * + * @param {point} point + * @returns {Array.} list with the items which are on the point + */ + + }, { + key: 'getItemsOnPoint', + value: function getItemsOnPoint(point) { + var ret = []; + + if (this.labelModule.visible()) { + if (ComponentUtil.pointInRect(this.labelModule.getSize(), point)) { + ret.push({ nodeId: this.id, labelId: 0 }); + } + } + + if (ComponentUtil.pointInRect(this.shape.boundingBox, point)) { + ret.push({ nodeId: this.id }); + } + + return ret; + } + + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top, right, bottom + * @return {boolean} True if location is located on node + */ + + }, { + key: 'isOverlappingWith', + value: function isOverlappingWith(obj) { + return this.shape.left < obj.right && this.shape.left + this.shape.width > obj.left && this.shape.top < obj.bottom && this.shape.top + this.shape.height > obj.top; + } + + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top, right, bottom + * @return {boolean} True if location is located on node + */ + + }, { + key: 'isBoundingBoxOverlappingWith', + value: function isBoundingBoxOverlappingWith(obj) { + return this.shape.boundingBox.left < obj.right && this.shape.boundingBox.right > obj.left && this.shape.boundingBox.top < obj.bottom && this.shape.boundingBox.bottom > obj.top; + } + + /** + * Check valid values for mass + * + * The mass may not be negative or zero. If it is, reset to 1 + * + * @param {object} options + * @param {Node.id} id + * @static + */ + + }], [{ + key: 'updateGroupOptions', + value: function updateGroupOptions(parentOptions, newOptions, groupList) { + if (groupList === undefined) return; // No groups, nothing to do + + var group = parentOptions.group; + + // paranoia: the selected group is already merged into node options, check. + if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) { + throw new Error("updateGroupOptions: group values in options don't match."); + } + + var hasGroup = typeof group === 'number' || typeof group === 'string' && group != ''; + if (!hasGroup) return; // current node has no group, no need to merge + + var groupObj = groupList.get(group); + + // Skip merging of group font options into parent; these are required to be distinct for labels + // TODO: It might not be a good idea either to merge the rest of the options, investigate this. + util.selectiveNotDeepExtend(['font'], parentOptions, groupObj); + + // the color object needs to be completely defined. + // Since groups can partially overwrite the colors, we parse it again, just in case. + parentOptions.color = util.parseColor(parentOptions.color); + } + + /** + * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined. + * Static so it can also be used by the handler. + * + * @param {Object} parentOptions + * @param {Object} newOptions + * @param {boolean} [allowDeletion=false] + * @param {Object} [globalOptions={}] + * @param {Object} [groupList] + * @static + */ + + }, { + key: 'parseOptions', + value: function parseOptions(parentOptions, newOptions) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var groupList = arguments[4]; + + + var fields = ['color', 'fixed', 'shadow']; + util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion); + + Node.checkMass(newOptions); + + // merge the shadow options into the parent. + util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions); + + // individual shape newOptions + if (newOptions.color !== undefined && newOptions.color !== null) { + var parsedColor = util.parseColor(newOptions.color); + util.fillIfDefined(parentOptions.color, parsedColor); + } else if (allowDeletion === true && newOptions.color === null) { + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options + } + + // handle the fixed options + if (newOptions.fixed !== undefined && newOptions.fixed !== null) { + if (typeof newOptions.fixed === 'boolean') { + parentOptions.fixed.x = newOptions.fixed; + parentOptions.fixed.y = newOptions.fixed; + } else { + if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') { + parentOptions.fixed.x = newOptions.fixed.x; + } + if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') { + parentOptions.fixed.y = newOptions.fixed.y; + } + } + } + + if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options + } + + Node.updateGroupOptions(parentOptions, newOptions, groupList); + + // handle the scaling options, specifically the label part + if (newOptions.scaling !== undefined) { + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling); + } + } + }, { + key: 'checkMass', + value: function checkMass(options, id) { + if (options.mass !== undefined && options.mass <= 0) { + var strId = ''; + if (id !== undefined) { + strId = ' in node id: ' + id; + } + console.log('%cNegative or zero mass disallowed' + strId + ', setting mass to 1.', printStyle); + options.mass = 1; + } + } + }]); + return Node; +}(); + +exports['default'] = Node; + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * Definitions for param's in jsdoc. + * These are more or less global within Network. Putting them here until I can figure out + * where to really put them + * + * @typedef {string|number} Id + * @typedef {Id} NodeId + * @typedef {Id} EdgeId + * @typedef {Id} LabelId + * + * @typedef {{x: number, y: number}} point + * @typedef {{left: number, top: number, width: number, height: number}} rect + * @typedef {{x: number, y:number, angle: number}} rotationPoint + * - point to rotate around and the angle in radians to rotate. angle == 0 means no rotation + * @typedef {{nodeId:NodeId}} nodeClickItem + * @typedef {{nodeId:NodeId, labelId:LabelId}} nodeLabelClickItem + * @typedef {{edgeId:EdgeId}} edgeClickItem + * @typedef {{edgeId:EdgeId, labelId:LabelId}} edgeLabelClickItem + */ + +var util = __webpack_require__(2); + +/** + * Helper functions for components + * @class + */ + +var ComponentUtil = function () { + function ComponentUtil() { + (0, _classCallCheck3['default'])(this, ComponentUtil); + } + + (0, _createClass3['default'])(ComponentUtil, null, [{ + key: 'choosify', + + /** + * Determine values to use for (sub)options of 'chosen'. + * + * This option is either a boolean or an object whose values should be examined further. + * The relevant structures are: + * + * - chosen: + * - chosen: { subOption: } + * + * Where subOption is 'node', 'edge' or 'label'. + * + * The intention of this method appears to be to set a specific priority to the options; + * Since most properties are either bridged or merged into the local options objects, there + * is not much point in handling them separately. + * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we + * should be able to get rid of this method. + * + * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label' + * @param {Object} pile array of options objects to consider + * + * @return {boolean|function} value for passed subOption of 'chosen' to use + */ + value: function choosify(subOption, pile) { + // allowed values for subOption + var allowed = ['node', 'edge', 'label']; + var value = true; + + var chosen = util.topMost(pile, 'chosen'); + if (typeof chosen === 'boolean') { + value = chosen; + } else if ((typeof chosen === 'undefined' ? 'undefined' : (0, _typeof3['default'])(chosen)) === 'object') { + if (allowed.indexOf(subOption) === -1) { + throw new Error('choosify: subOption \'' + subOption + '\' should be one of ' + "'" + allowed.join("', '") + "'"); + } + + var chosenEdge = util.topMost(pile, ['chosen', subOption]); + if (typeof chosenEdge === 'boolean' || typeof chosenEdge === 'function') { + value = chosenEdge; + } + } + + return value; + } + + /** + * Check if the point falls within the given rectangle. + * + * @param {rect} rect + * @param {point} point + * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle. + * @returns {boolean} true if point within rectangle, false otherwise + * @static + */ + + }, { + key: 'pointInRect', + value: function pointInRect(rect, point, rotationPoint) { + if (rect.width <= 0 || rect.height <= 0) { + return false; // early out + } + + if (rotationPoint !== undefined) { + // Rotate the point the same amount as the rectangle + var tmp = { + x: point.x - rotationPoint.x, + y: point.y - rotationPoint.y + }; + + if (rotationPoint.angle !== 0) { + // In order to get the coordinates the same, you need to + // rotate in the reverse direction + var angle = -rotationPoint.angle; + + var tmp2 = { + x: Math.cos(angle) * tmp.x - Math.sin(angle) * tmp.y, + y: Math.sin(angle) * tmp.x + Math.cos(angle) * tmp.y + }; + point = tmp2; + } else { + point = tmp; + } + + // Note that if a rotation is specified, the rectangle coordinates + // are **not* the full canvas coordinates. They are relative to the + // rotationPoint. Hence, the point coordinates need not be translated + // back in this case. + } + + var right = rect.x + rect.width; + var bottom = rect.y + rect.width; + + return rect.left < point.x && right > point.x && rect.top < point.y && bottom > point.y; + } + + /** + * Check if given value is acceptable as a label text. + * + * @param {*} text value to check; can be anything at this point + * @returns {boolean} true if valid label value, false otherwise + */ + + }, { + key: 'isValidLabel', + value: function isValidLabel(text) { + // Note that this is quite strict: types that *might* be converted to string are disallowed + return typeof text === 'string' && text !== ''; + } + }]); + return ComponentUtil; +}(); + +exports['default'] = ComponentUtil; + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(125); +var global = __webpack_require__(18); +var hide = __webpack_require__(26); +var Iterators = __webpack_require__(31); +var TO_STRING_TAG = __webpack_require__(13)('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(32); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(27); +var dPs = __webpack_require__(130); +var enumBugKeys = __webpack_require__(58); +var IE_PROTO = __webpack_require__(56)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(82)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(134).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(57)('keys'); +var uid = __webpack_require__(40); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(18); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +module.exports = function (key) { + return store[key] || (store[key] = {}); +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(20).f; +var has = __webpack_require__(22); +var TAG = __webpack_require__(13)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(135)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(79)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(13); + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(18); +var core = __webpack_require__(7); +var LIBRARY = __webpack_require__(52); +var wksExt = __webpack_require__(61); +var defineProperty = __webpack_require__(20).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +var _stringify = __webpack_require__(19); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var moment = __webpack_require__(9); +var Component = __webpack_require__(16); +var DateUtil = __webpack_require__(36); + +/** + * A Range controls a numeric range with a start and end value. + * The Range adjusts the range based on mouse events or programmatic changes, + * and triggers events when the range is changing or has been changed. + * @param {{dom: Object, domProps: Object, emitter: Emitter}} body + * @param {Object} [options] See description at Range.setOptions + * @constructor Range + * @extends Component + */ +function Range(body, options) { + var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0); + var start = now.clone().add(-3, 'days').valueOf(); + var end = now.clone().add(3, 'days').valueOf(); + this.millisecondsPerPixelCache = undefined; + + if (options === undefined) { + this.start = start; + this.end = end; + } else { + this.start = options.start || start; + this.end = options.end || end; + } + + this.rolling = false; + + this.body = body; + this.deltaDifference = 0; + this.scaleOffset = 0; + this.startToFront = false; + this.endToFront = true; + + // default options + this.defaultOptions = { + rtl: false, + start: null, + end: null, + moment: moment, + direction: 'horizontal', // 'horizontal' or 'vertical' + moveable: true, + zoomable: true, + min: null, + max: null, + zoomMin: 10, // milliseconds + zoomMax: 1000 * 60 * 60 * 24 * 365 * 10000, // milliseconds + rollingMode: { + follow: false, + offset: 0.5 + } + }; + this.options = util.extend({}, this.defaultOptions); + this.props = { + touch: {} + }; + this.animationTimer = null; + + // drag listeners for dragging + this.body.emitter.on('panstart', this._onDragStart.bind(this)); + this.body.emitter.on('panmove', this._onDrag.bind(this)); + this.body.emitter.on('panend', this._onDragEnd.bind(this)); + + // mouse wheel for zooming + this.body.emitter.on('mousewheel', this._onMouseWheel.bind(this)); + + // pinch to zoom + this.body.emitter.on('touch', this._onTouch.bind(this)); + this.body.emitter.on('pinch', this._onPinch.bind(this)); + + // on click of rolling mode button + this.body.dom.rollingModeBtn.addEventListener('click', this.startRolling.bind(this)); + + this.setOptions(options); +} + +Range.prototype = new Component(); + +/** + * Set options for the range controller + * @param {Object} options Available options: + * {number | Date | String} start Start date for the range + * {number | Date | String} end End date for the range + * {number} min Minimum value for start + * {number} max Maximum value for end + * {number} zoomMin Set a minimum value for + * (end - start). + * {number} zoomMax Set a maximum value for + * (end - start). + * {boolean} moveable Enable moving of the range + * by dragging. True by default + * {boolean} zoomable Enable zooming of the range + * by pinching/scrolling. True by default + */ +Range.prototype.setOptions = function (options) { + if (options) { + // copy the options that we know + var fields = ['animation', 'direction', 'min', 'max', 'zoomMin', 'zoomMax', 'moveable', 'zoomable', 'moment', 'activate', 'hiddenDates', 'zoomKey', 'rtl', 'showCurrentTime', 'rollingMode', 'horizontalScroll']; + util.selectiveExtend(fields, this.options, options); + + if (options.rollingMode && options.rollingMode.follow) { + this.startRolling(); + } + if ('start' in options || 'end' in options) { + // apply a new range. both start and end are optional + this.setRange(options.start, options.end); + } + } +}; + +/** + * Test whether direction has a valid value + * @param {string} direction 'horizontal' or 'vertical' + */ +function validateDirection(direction) { + if (direction != 'horizontal' && direction != 'vertical') { + throw new TypeError('Unknown direction "' + direction + '". ' + 'Choose "horizontal" or "vertical".'); + } +} + +/** + * Start auto refreshing the current time bar + */ +Range.prototype.startRolling = function () { + var me = this; + + /** + * Updates the current time. + */ + function update() { + me.stopRolling(); + me.rolling = true; + + var interval = me.end - me.start; + var t = util.convert(new Date(), 'Date').valueOf(); + + var start = t - interval * me.options.rollingMode.offset; + var end = t + interval * (1 - me.options.rollingMode.offset); + + var options = { + animation: false + }; + me.setRange(start, end, options); + + // determine interval to refresh + var scale = me.conversion(me.body.domProps.center.width).scale; + interval = 1 / scale / 10; + if (interval < 30) interval = 30; + if (interval > 1000) interval = 1000; + + me.body.dom.rollingModeBtn.style.visibility = "hidden"; + // start a renderTimer to adjust for the new time + me.currentTimeTimer = setTimeout(update, interval); + } + + update(); +}; + +/** + * Stop auto refreshing the current time bar + */ +Range.prototype.stopRolling = function () { + if (this.currentTimeTimer !== undefined) { + clearTimeout(this.currentTimeTimer); + this.rolling = false; + this.body.dom.rollingModeBtn.style.visibility = "visible"; + } +}; + +/** + * Set a new start and end range + * @param {Date | number | string} [start] + * @param {Date | number | string} [end] + * @param {Object} options Available options: + * {boolean | {duration: number, easingFunction: string}} [animation=false] + * If true, the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * {boolean} [byUser=false] + * {Event} event Mouse event + * @param {Function} callback a callback function to be executed at the end of this function + * @param {Function} frameCallback a callback function executed each frame of the range animation. + * The callback will be passed three parameters: + * {number} easeCoefficient an easing coefficent + * {boolean} willDraw If true the caller will redraw after the callback completes + * {boolean} done If true then animation is ending after the current frame + */ + +Range.prototype.setRange = function (start, end, options, callback, frameCallback) { + if (!options) { + options = {}; + } + if (options.byUser !== true) { + options.byUser = false; + } + var me = this; + var finalStart = start != undefined ? util.convert(start, 'Date').valueOf() : null; + var finalEnd = end != undefined ? util.convert(end, 'Date').valueOf() : null; + this._cancelAnimation(); + this.millisecondsPerPixelCache = undefined; + + if (options.animation) { + // true or an Object + var initStart = this.start; + var initEnd = this.end; + var duration = (0, _typeof3['default'])(options.animation) === 'object' && 'duration' in options.animation ? options.animation.duration : 500; + var easingName = (0, _typeof3['default'])(options.animation) === 'object' && 'easingFunction' in options.animation ? options.animation.easingFunction : 'easeInOutQuad'; + var easingFunction = util.easingFunctions[easingName]; + if (!easingFunction) { + throw new Error('Unknown easing function ' + (0, _stringify2['default'])(easingName) + '. ' + 'Choose from: ' + (0, _keys2['default'])(util.easingFunctions).join(', ')); + } + + var initTime = new Date().valueOf(); + var anyChanged = false; + + var next = function next() { + if (!me.props.touch.dragging) { + var now = new Date().valueOf(); + var time = now - initTime; + var ease = easingFunction(time / duration); + var done = time > duration; + var s = done || finalStart === null ? finalStart : initStart + (finalStart - initStart) * ease; + var e = done || finalEnd === null ? finalEnd : initEnd + (finalEnd - initEnd) * ease; + + changed = me._applyRange(s, e); + DateUtil.updateHiddenDates(me.options.moment, me.body, me.options.hiddenDates); + anyChanged = anyChanged || changed; + + var params = { + start: new Date(me.start), + end: new Date(me.end), + byUser: options.byUser, + event: options.event + }; + + if (frameCallback) { + frameCallback(ease, changed, done); + } + + if (changed) { + me.body.emitter.emit('rangechange', params); + } + + if (done) { + if (anyChanged) { + me.body.emitter.emit('rangechanged', params); + if (callback) { + return callback(); + } + } + } else { + // animate with as high as possible frame rate, leave 20 ms in between + // each to prevent the browser from blocking + me.animationTimer = setTimeout(next, 20); + } + } + }; + + return next(); + } else { + var changed = this._applyRange(finalStart, finalEnd); + DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); + if (changed) { + var params = { + start: new Date(this.start), + end: new Date(this.end), + byUser: options.byUser, + event: options.event + }; + + this.body.emitter.emit('rangechange', params); + clearTimeout(me.timeoutID); + me.timeoutID = setTimeout(function () { + me.body.emitter.emit('rangechanged', params); + }, 200); + if (callback) { + return callback(); + } + } + } +}; + +/** + * Get the number of milliseconds per pixel. + * + * @returns {undefined|number} + */ +Range.prototype.getMillisecondsPerPixel = function () { + if (this.millisecondsPerPixelCache === undefined) { + this.millisecondsPerPixelCache = (this.end - this.start) / this.body.dom.center.clientWidth; + } + return this.millisecondsPerPixelCache; +}; + +/** + * Stop an animation + * @private + */ +Range.prototype._cancelAnimation = function () { + if (this.animationTimer) { + clearTimeout(this.animationTimer); + this.animationTimer = null; + } +}; + +/** + * Set a new start and end range. This method is the same as setRange, but + * does not trigger a range change and range changed event, and it returns + * true when the range is changed + * @param {number} [start] + * @param {number} [end] + * @return {boolean} changed + * @private + */ +Range.prototype._applyRange = function (start, end) { + var newStart = start != null ? util.convert(start, 'Date').valueOf() : this.start, + newEnd = end != null ? util.convert(end, 'Date').valueOf() : this.end, + max = this.options.max != null ? util.convert(this.options.max, 'Date').valueOf() : null, + min = this.options.min != null ? util.convert(this.options.min, 'Date').valueOf() : null, + diff; + + // check for valid number + if (isNaN(newStart) || newStart === null) { + throw new Error('Invalid start "' + start + '"'); + } + if (isNaN(newEnd) || newEnd === null) { + throw new Error('Invalid end "' + end + '"'); + } + + // prevent end < start + if (newEnd < newStart) { + newEnd = newStart; + } + + // prevent start < min + if (min !== null) { + if (newStart < min) { + diff = min - newStart; + newStart += diff; + newEnd += diff; + + // prevent end > max + if (max != null) { + if (newEnd > max) { + newEnd = max; + } + } + } + } + + // prevent end > max + if (max !== null) { + if (newEnd > max) { + diff = newEnd - max; + newStart -= diff; + newEnd -= diff; + + // prevent start < min + if (min != null) { + if (newStart < min) { + newStart = min; + } + } + } + } + + // prevent (end-start) < zoomMin + if (this.options.zoomMin !== null) { + var zoomMin = parseFloat(this.options.zoomMin); + if (zoomMin < 0) { + zoomMin = 0; + } + if (newEnd - newStart < zoomMin) { + // compensate for a scale of 0.5 ms + var compensation = 0.5; + if (this.end - this.start === zoomMin && newStart >= this.start - compensation && newEnd <= this.end) { + // ignore this action, we are already zoomed to the minimum + newStart = this.start; + newEnd = this.end; + } else { + // zoom to the minimum + diff = zoomMin - (newEnd - newStart); + newStart -= diff / 2; + newEnd += diff / 2; + } + } + } + + // prevent (end-start) > zoomMax + if (this.options.zoomMax !== null) { + var zoomMax = parseFloat(this.options.zoomMax); + if (zoomMax < 0) { + zoomMax = 0; + } + + if (newEnd - newStart > zoomMax) { + if (this.end - this.start === zoomMax && newStart < this.start && newEnd > this.end) { + // ignore this action, we are already zoomed to the maximum + newStart = this.start; + newEnd = this.end; + } else { + // zoom to the maximum + diff = newEnd - newStart - zoomMax; + newStart += diff / 2; + newEnd -= diff / 2; + } + } + } + + var changed = this.start != newStart || this.end != newEnd; + + // if the new range does NOT overlap with the old range, emit checkRangedItems to avoid not showing ranged items (ranged meaning has end time, not necessarily of type Range) + if (!(newStart >= this.start && newStart <= this.end || newEnd >= this.start && newEnd <= this.end) && !(this.start >= newStart && this.start <= newEnd || this.end >= newStart && this.end <= newEnd)) { + this.body.emitter.emit('checkRangedItems'); + } + + this.start = newStart; + this.end = newEnd; + return changed; +}; + +/** + * Retrieve the current range. + * @return {Object} An object with start and end properties + */ +Range.prototype.getRange = function () { + return { + start: this.start, + end: this.end + }; +}; + +/** + * Calculate the conversion offset and scale for current range, based on + * the provided width + * @param {number} width + * @param {number} [totalHidden=0] + * @returns {{offset: number, scale: number}} conversion + */ +Range.prototype.conversion = function (width, totalHidden) { + return Range.conversion(this.start, this.end, width, totalHidden); +}; + +/** + * Static method to calculate the conversion offset and scale for a range, + * based on the provided start, end, and width + * @param {number} start + * @param {number} end + * @param {number} width + * @param {number} [totalHidden=0] + * @returns {{offset: number, scale: number}} conversion + */ +Range.conversion = function (start, end, width, totalHidden) { + if (totalHidden === undefined) { + totalHidden = 0; + } + if (width != 0 && end - start != 0) { + return { + offset: start, + scale: width / (end - start - totalHidden) + }; + } else { + return { + offset: 0, + scale: 1 + }; + } +}; + +/** + * Start dragging horizontally or vertically + * @param {Event} event + * @private + */ +Range.prototype._onDragStart = function (event) { + this.deltaDifference = 0; + this.previousDelta = 0; + + // only allow dragging when configured as movable + if (!this.options.moveable) return; + + // only start dragging when the mouse is inside the current range + if (!this._isInsideRange(event)) return; + + // refuse to drag when we where pinching to prevent the timeline make a jump + // when releasing the fingers in opposite order from the touch screen + if (!this.props.touch.allowDragging) return; + + this.stopRolling(); + + this.props.touch.start = this.start; + this.props.touch.end = this.end; + this.props.touch.dragging = true; + + if (this.body.dom.root) { + this.body.dom.root.style.cursor = 'move'; + } +}; + +/** + * Perform dragging operation + * @param {Event} event + * @private + */ +Range.prototype._onDrag = function (event) { + if (!event) return; + + if (!this.props.touch.dragging) return; + + // only allow dragging when configured as movable + if (!this.options.moveable) return; + + // TODO: this may be redundant in hammerjs2 + // refuse to drag when we where pinching to prevent the timeline make a jump + // when releasing the fingers in opposite order from the touch screen + if (!this.props.touch.allowDragging) return; + + var direction = this.options.direction; + validateDirection(direction); + var delta = direction == 'horizontal' ? event.deltaX : event.deltaY; + delta -= this.deltaDifference; + var interval = this.props.touch.end - this.props.touch.start; + + // normalize dragging speed if cutout is in between. + var duration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); + interval -= duration; + + var width = direction == 'horizontal' ? this.body.domProps.center.width : this.body.domProps.center.height; + var diffRange; + if (this.options.rtl) { + diffRange = delta / width * interval; + } else { + diffRange = -delta / width * interval; + } + + var newStart = this.props.touch.start + diffRange; + var newEnd = this.props.touch.end + diffRange; + + // snapping times away from hidden zones + var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, this.previousDelta - delta, true); + var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, this.previousDelta - delta, true); + if (safeStart != newStart || safeEnd != newEnd) { + this.deltaDifference += delta; + this.props.touch.start = safeStart; + this.props.touch.end = safeEnd; + this._onDrag(event); + return; + } + + this.previousDelta = delta; + this._applyRange(newStart, newEnd); + + var startDate = new Date(this.start); + var endDate = new Date(this.end); + + // fire a rangechange event + this.body.emitter.emit('rangechange', { + start: startDate, + end: endDate, + byUser: true, + event: event + }); + + // fire a panmove event + this.body.emitter.emit('panmove'); +}; + +/** + * Stop dragging operation + * @param {event} event + * @private + */ +Range.prototype._onDragEnd = function (event) { + if (!this.props.touch.dragging) return; + + // only allow dragging when configured as movable + if (!this.options.moveable) return; + + // TODO: this may be redundant in hammerjs2 + // refuse to drag when we where pinching to prevent the timeline make a jump + // when releasing the fingers in opposite order from the touch screen + if (!this.props.touch.allowDragging) return; + + this.props.touch.dragging = false; + if (this.body.dom.root) { + this.body.dom.root.style.cursor = 'auto'; + } + + // fire a rangechanged event + this.body.emitter.emit('rangechanged', { + start: new Date(this.start), + end: new Date(this.end), + byUser: true, + event: event + }); +}; + +/** + * Event handler for mouse wheel event, used to zoom + * Code from http://adomas.org/javascript-mouse-wheel/ + * @param {Event} event + * @private + */ +Range.prototype._onMouseWheel = function (event) { + // retrieve delta + var delta = 0; + if (event.wheelDelta) { + /* IE/Opera. */ + delta = event.wheelDelta / 120; + } else if (event.detail) { + /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; + } + + // don't allow zoom when the according key is pressed and the zoomKey option or not zoomable but movable + if (this.options.zoomKey && !event[this.options.zoomKey] && this.options.zoomable || !this.options.zoomable && this.options.moveable) { + return; + } + + // only allow zooming when configured as zoomable and moveable + if (!(this.options.zoomable && this.options.moveable)) return; + + // only zoom when the mouse is inside the current range + if (!this._isInsideRange(event)) return; + + // If delta is nonzero, handle it. + // Basically, delta is now positive if wheel was scrolled up, + // and negative, if wheel was scrolled down. + if (delta) { + // perform the zoom action. Delta is normally 1 or -1 + + // adjust a negative delta such that zooming in with delta 0.1 + // equals zooming out with a delta -0.1 + var scale; + if (delta < 0) { + scale = 1 - delta / 5; + } else { + scale = 1 / (1 + delta / 5); + } + + // calculate center, the date to zoom around + var pointerDate; + if (this.rolling) { + pointerDate = this.start + (this.end - this.start) * this.options.rollingMode.offset; + } else { + var pointer = this.getPointer({ x: event.clientX, y: event.clientY }, this.body.dom.center); + pointerDate = this._pointerToDate(pointer); + } + this.zoom(scale, pointerDate, delta, event); + + // Prevent default actions caused by mouse wheel + // (else the page and timeline both scroll) + event.preventDefault(); + } +}; + +/** + * Start of a touch gesture + * @param {Event} event + * @private + */ +Range.prototype._onTouch = function (event) { + // eslint-disable-line no-unused-vars + this.props.touch.start = this.start; + this.props.touch.end = this.end; + this.props.touch.allowDragging = true; + this.props.touch.center = null; + this.scaleOffset = 0; + this.deltaDifference = 0; + // Disable the browser default handling of this event. + util.preventDefault(event); +}; + +/** + * Handle pinch event + * @param {Event} event + * @private + */ +Range.prototype._onPinch = function (event) { + // only allow zooming when configured as zoomable and moveable + if (!(this.options.zoomable && this.options.moveable)) return; + + // Disable the browser default handling of this event. + util.preventDefault(event); + + this.props.touch.allowDragging = false; + + if (!this.props.touch.center) { + this.props.touch.center = this.getPointer(event.center, this.body.dom.center); + } + + this.stopRolling(); + + var scale = 1 / (event.scale + this.scaleOffset); + var centerDate = this._pointerToDate(this.props.touch.center); + + var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); + var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, centerDate); + var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; + + // calculate new start and end + var newStart = centerDate - hiddenDurationBefore + (this.props.touch.start - (centerDate - hiddenDurationBefore)) * scale; + var newEnd = centerDate + hiddenDurationAfter + (this.props.touch.end - (centerDate + hiddenDurationAfter)) * scale; + + // snapping times away from hidden zones + this.startToFront = 1 - scale <= 0; // used to do the right auto correction with periodic hidden times + this.endToFront = scale - 1 <= 0; // used to do the right auto correction with periodic hidden times + + var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, 1 - scale, true); + var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, scale - 1, true); + if (safeStart != newStart || safeEnd != newEnd) { + this.props.touch.start = safeStart; + this.props.touch.end = safeEnd; + this.scaleOffset = 1 - event.scale; + newStart = safeStart; + newEnd = safeEnd; + } + + var options = { + animation: false, + byUser: true, + event: event + }; + this.setRange(newStart, newEnd, options); + + this.startToFront = false; // revert to default + this.endToFront = true; // revert to default +}; + +/** + * Test whether the mouse from a mouse event is inside the visible window, + * between the current start and end date + * @param {Object} event + * @return {boolean} Returns true when inside the visible window + * @private + */ +Range.prototype._isInsideRange = function (event) { + // calculate the time where the mouse is, check whether inside + // and no scroll action should happen. + var clientX = event.center ? event.center.x : event.clientX; + var x; + if (this.options.rtl) { + x = clientX - util.getAbsoluteLeft(this.body.dom.centerContainer); + } else { + x = util.getAbsoluteRight(this.body.dom.centerContainer) - clientX; + } + var time = this.body.util.toTime(x); + + return time >= this.start && time <= this.end; +}; + +/** + * Helper function to calculate the center date for zooming + * @param {{x: number, y: number}} pointer + * @return {number} date + * @private + */ +Range.prototype._pointerToDate = function (pointer) { + var conversion; + var direction = this.options.direction; + + validateDirection(direction); + + if (direction == 'horizontal') { + return this.body.util.toTime(pointer.x).valueOf(); + } else { + var height = this.body.domProps.center.height; + conversion = this.conversion(height); + return pointer.y / conversion.scale + conversion.offset; + } +}; + +/** + * Get the pointer location relative to the location of the dom element + * @param {{x: number, y: number}} touch + * @param {Element} element HTML DOM element + * @return {{x: number, y: number}} pointer + * @private + */ +Range.prototype.getPointer = function (touch, element) { + if (this.options.rtl) { + return { + x: util.getAbsoluteRight(element) - touch.x, + y: touch.y - util.getAbsoluteTop(element) + }; + } else { + return { + x: touch.x - util.getAbsoluteLeft(element), + y: touch.y - util.getAbsoluteTop(element) + }; + } +}; + +/** + * Zoom the range the given scale in or out. Start and end date will + * be adjusted, and the timeline will be redrawn. You can optionally give a + * date around which to zoom. + * For example, try scale = 0.9 or 1.1 + * @param {number} scale Scaling factor. Values above 1 will zoom out, + * values below 1 will zoom in. + * @param {number} [center] Value representing a date around which will + * be zoomed. + * @param {number} delta + * @param {Event} event + */ +Range.prototype.zoom = function (scale, center, delta, event) { + // if centerDate is not provided, take it half between start Date and end Date + if (center == null) { + center = (this.start + this.end) / 2; + } + + var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end); + var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, center); + var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; + + // calculate new start and end + var newStart = center - hiddenDurationBefore + (this.start - (center - hiddenDurationBefore)) * scale; + var newEnd = center + hiddenDurationAfter + (this.end - (center + hiddenDurationAfter)) * scale; + + // snapping times away from hidden zones + this.startToFront = delta > 0 ? false : true; // used to do the right autocorrection with periodic hidden times + this.endToFront = -delta > 0 ? false : true; // used to do the right autocorrection with periodic hidden times + var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, delta, true); + var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, -delta, true); + if (safeStart != newStart || safeEnd != newEnd) { + newStart = safeStart; + newEnd = safeEnd; + } + + var options = { + animation: false, + byUser: true, + event: event + }; + this.setRange(newStart, newEnd, options); + + this.startToFront = false; // revert to default + this.endToFront = true; // revert to default +}; + +/** + * Move the range with a given delta to the left or right. Start and end + * value will be adjusted. For example, try delta = 0.1 or -0.1 + * @param {number} delta Moving amount. Positive value will move right, + * negative value will move left + */ +Range.prototype.move = function (delta) { + // zoom start Date and end Date relative to the centerDate + var diff = this.end - this.start; + + // apply new values + var newStart = this.start + diff * delta; + var newEnd = this.end + diff * delta; + + // TODO: reckon with min and max range + + this.start = newStart; + this.end = newEnd; +}; + +/** + * Move the range to a new center point + * @param {number} moveTo New center point of the range + */ +Range.prototype.moveTo = function (moveTo) { + var center = (this.start + this.end) / 2; + + var diff = center - moveTo; + + // calculate new start and end + var newStart = this.start - diff; + var newEnd = this.end - diff; + + var options = { + animation: false, + byUser: true, + event: null + }; + this.setRange(newStart, newEnd, options); +}; + +module.exports = Range; + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _stringify = __webpack_require__(19); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Emitter = __webpack_require__(44); +var Hammer = __webpack_require__(10); +var hammerUtil = __webpack_require__(37); +var util = __webpack_require__(2); +var TimeAxis = __webpack_require__(45); +var Activator = __webpack_require__(97); +var DateUtil = __webpack_require__(36); +var CustomTime = __webpack_require__(46); + +/** + * Create a timeline visualization + * @constructor Core + */ +function Core() {} + +// turn Core into an event emitter +Emitter(Core.prototype); + +/** + * Create the main DOM for the Core: a root panel containing left, right, + * top, bottom, content, and background panel. + * @param {Element} container The container element where the Core will + * be attached. + * @protected + */ +Core.prototype._create = function (container) { + this.dom = {}; + + this.dom.container = container; + + this.dom.root = document.createElement('div'); + this.dom.background = document.createElement('div'); + this.dom.backgroundVertical = document.createElement('div'); + this.dom.backgroundHorizontal = document.createElement('div'); + this.dom.centerContainer = document.createElement('div'); + this.dom.leftContainer = document.createElement('div'); + this.dom.rightContainer = document.createElement('div'); + this.dom.center = document.createElement('div'); + this.dom.left = document.createElement('div'); + this.dom.right = document.createElement('div'); + this.dom.top = document.createElement('div'); + this.dom.bottom = document.createElement('div'); + this.dom.shadowTop = document.createElement('div'); + this.dom.shadowBottom = document.createElement('div'); + this.dom.shadowTopLeft = document.createElement('div'); + this.dom.shadowBottomLeft = document.createElement('div'); + this.dom.shadowTopRight = document.createElement('div'); + this.dom.shadowBottomRight = document.createElement('div'); + this.dom.rollingModeBtn = document.createElement('div'); + + this.dom.root.className = 'vis-timeline'; + this.dom.background.className = 'vis-panel vis-background'; + this.dom.backgroundVertical.className = 'vis-panel vis-background vis-vertical'; + this.dom.backgroundHorizontal.className = 'vis-panel vis-background vis-horizontal'; + this.dom.centerContainer.className = 'vis-panel vis-center'; + this.dom.leftContainer.className = 'vis-panel vis-left'; + this.dom.rightContainer.className = 'vis-panel vis-right'; + this.dom.top.className = 'vis-panel vis-top'; + this.dom.bottom.className = 'vis-panel vis-bottom'; + this.dom.left.className = 'vis-content'; + this.dom.center.className = 'vis-content'; + this.dom.right.className = 'vis-content'; + this.dom.shadowTop.className = 'vis-shadow vis-top'; + this.dom.shadowBottom.className = 'vis-shadow vis-bottom'; + this.dom.shadowTopLeft.className = 'vis-shadow vis-top'; + this.dom.shadowBottomLeft.className = 'vis-shadow vis-bottom'; + this.dom.shadowTopRight.className = 'vis-shadow vis-top'; + this.dom.shadowBottomRight.className = 'vis-shadow vis-bottom'; + this.dom.rollingModeBtn.className = 'vis-rolling-mode-btn'; + + this.dom.root.appendChild(this.dom.background); + this.dom.root.appendChild(this.dom.backgroundVertical); + this.dom.root.appendChild(this.dom.backgroundHorizontal); + this.dom.root.appendChild(this.dom.centerContainer); + this.dom.root.appendChild(this.dom.leftContainer); + this.dom.root.appendChild(this.dom.rightContainer); + this.dom.root.appendChild(this.dom.top); + this.dom.root.appendChild(this.dom.bottom); + this.dom.root.appendChild(this.dom.bottom); + this.dom.root.appendChild(this.dom.rollingModeBtn); + + this.dom.centerContainer.appendChild(this.dom.center); + this.dom.leftContainer.appendChild(this.dom.left); + this.dom.rightContainer.appendChild(this.dom.right); + this.dom.centerContainer.appendChild(this.dom.shadowTop); + this.dom.centerContainer.appendChild(this.dom.shadowBottom); + this.dom.leftContainer.appendChild(this.dom.shadowTopLeft); + this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft); + this.dom.rightContainer.appendChild(this.dom.shadowTopRight); + this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); + + // size properties of each of the panels + this.props = { + root: {}, + background: {}, + centerContainer: {}, + leftContainer: {}, + rightContainer: {}, + center: {}, + left: {}, + right: {}, + top: {}, + bottom: {}, + border: {}, + scrollTop: 0, + scrollTopMin: 0 + }; + + this.on('rangechange', function () { + if (this.initialDrawDone === true) { + this._redraw(); + } + }.bind(this)); + this.on('rangechanged', function () { + if (!this.initialRangeChangeDone) { + this.initialRangeChangeDone = true; + } + }.bind(this)); + this.on('touch', this._onTouch.bind(this)); + this.on('panmove', this._onDrag.bind(this)); + + var me = this; + this._origRedraw = this._redraw.bind(this); + this._redraw = util.throttle(this._origRedraw); + + this.on('_change', function (properties) { + if (me.itemSet && me.itemSet.initialItemSetDrawn && properties && properties.queue == true) { + me._redraw(); + } else { + me._origRedraw(); + } + }); + + // create event listeners for all interesting events, these events will be + // emitted via emitter + this.hammer = new Hammer(this.dom.root); + var pinchRecognizer = this.hammer.get('pinch').set({ enable: true }); + hammerUtil.disablePreventDefaultVertically(pinchRecognizer); + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); + this.listeners = {}; + + var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend' + // TODO: cleanup + //'touch', 'pinch', + //'tap', 'doubletap', 'hold', + //'dragstart', 'drag', 'dragend', + //'mousewheel', 'DOMMouseScroll' // DOMMouseScroll is needed for Firefox + ]; + events.forEach(function (type) { + var listener = function listener(event) { + if (me.isActive()) { + me.emit(type, event); + } + }; + me.hammer.on(type, listener); + me.listeners[type] = listener; + }); + + // emulate a touch event (emitted before the start of a pan, pinch, tap, or press) + hammerUtil.onTouch(this.hammer, function (event) { + me.emit('touch', event); + }.bind(this)); + + // emulate a release event (emitted after a pan, pinch, tap, or press) + hammerUtil.onRelease(this.hammer, function (event) { + me.emit('release', event); + }.bind(this)); + + /** + * + * @param {WheelEvent} event + */ + function onMouseWheel(event) { + if (this.isActive()) { + this.emit('mousewheel', event); + } + + // deltaX and deltaY normalization from jquery.mousewheel.js + var deltaX = 0; + var deltaY = 0; + + // Old school scrollwheel delta + if ('detail' in event) { + deltaY = event.detail * -1; + } + if ('wheelDelta' in event) { + deltaY = event.wheelDelta; + } + if ('wheelDeltaY' in event) { + deltaY = event.wheelDeltaY; + } + if ('wheelDeltaX' in event) { + deltaX = event.wheelDeltaX * -1; + } + + // Firefox < 17 horizontal scrolling related to DOMMouseScroll event + if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) { + deltaX = deltaY * -1; + deltaY = 0; + } + + // New school wheel delta (wheel event) + if ('deltaY' in event) { + deltaY = event.deltaY * -1; + } + if ('deltaX' in event) { + deltaX = event.deltaX; + } + + // prevent scrolling when zoomKey defined or activated + if (!this.options.zoomKey || event[this.options.zoomKey]) return; + + // Prevent default actions caused by mouse wheel + // (else the page and timeline both scroll) + event.preventDefault(); + + if (this.options.verticalScroll && Math.abs(deltaY) >= Math.abs(deltaX)) { + var current = this.props.scrollTop; + var adjusted = current + deltaY; + + if (this.isActive()) { + this._setScrollTop(adjusted); + this._redraw(); + this.emit('scroll', event); + } + } else if (this.options.horizontalScroll) { + var delta = Math.abs(deltaX) >= Math.abs(deltaY) ? deltaX : deltaY; + + // calculate a single scroll jump relative to the range scale + var diff = delta / 120 * (this.range.end - this.range.start) / 20; + // calculate new start and end + var newStart = this.range.start + diff; + var newEnd = this.range.end + diff; + + var options = { + animation: false, + byUser: true, + event: event + }; + this.range.setRange(newStart, newEnd, options); + } + } + + if (this.dom.centerContainer.addEventListener) { + // IE9, Chrome, Safari, Opera + this.dom.centerContainer.addEventListener("mousewheel", onMouseWheel.bind(this), false); + // Firefox + this.dom.centerContainer.addEventListener("DOMMouseScroll", onMouseWheel.bind(this), false); + } else { + // IE 6/7/8 + this.dom.centerContainer.attachEvent("onmousewheel", onMouseWheel.bind(this)); + } + + /** + * + * @param {scroll} event + */ + function onMouseScrollSide(event) { + if (!me.options.verticalScroll) return; + event.preventDefault(); + if (me.isActive()) { + var adjusted = -event.target.scrollTop; + me._setScrollTop(adjusted); + me._redraw(); + me.emit('scrollSide', event); + } + } + + this.dom.left.parentNode.addEventListener('scroll', onMouseScrollSide.bind(this)); + this.dom.right.parentNode.addEventListener('scroll', onMouseScrollSide.bind(this)); + + var itemAddedToTimeline = false; + + /** + * + * @param {dragover} event + * @returns {boolean} + */ + function handleDragOver(event) { + if (event.preventDefault) { + event.preventDefault(); // Necessary. Allows us to drop. + } + + // make sure your target is a vis element + if (!event.target.className.indexOf("vis") > -1) return; + + // make sure only one item is added every time you're over the timeline + if (itemAddedToTimeline) return; + + event.dataTransfer.dropEffect = 'move'; + itemAddedToTimeline = true; + return false; + } + + /** + * + * @param {drop} event + * @returns {boolean} + */ + function handleDrop(event) { + // prevent redirect to blank page - Firefox + if (event.preventDefault) { + event.preventDefault(); + } + if (event.stopPropagation) { + event.stopPropagation(); + } + // return when dropping non-vis items + try { + var itemData = JSON.parse(event.dataTransfer.getData("text")); + if (!itemData || !itemData.content) return; + } catch (err) { + return false; + } + + itemAddedToTimeline = false; + event.center = { + x: event.clientX, + y: event.clientY + }; + + if (itemData.target !== 'item') { + me.itemSet._onAddItem(event); + } else { + me.itemSet._onDropObjectOnItem(event); + } + me.emit('drop', me.getEventProperties(event)); + return false; + } + + this.dom.center.addEventListener('dragover', handleDragOver.bind(this), false); + this.dom.center.addEventListener('drop', handleDrop.bind(this), false); + + this.customTimes = []; + + // store state information needed for touch events + this.touch = {}; + + this.redrawCount = 0; + this.initialDrawDone = false; + this.initialRangeChangeDone = false; + + // attach the root panel to the provided container + if (!container) throw new Error('No container provided'); + container.appendChild(this.dom.root); +}; + +/** + * Set options. Options will be passed to all components loaded in the Timeline. + * @param {Object} [options] + * {String} orientation + * Vertical orientation for the Timeline, + * can be 'bottom' (default) or 'top'. + * {string | number} width + * Width for the timeline, a number in pixels or + * a css string like '1000px' or '75%'. '100%' by default. + * {string | number} height + * Fixed height for the Timeline, a number in pixels or + * a css string like '400px' or '75%'. If undefined, + * The Timeline will automatically size such that + * its contents fit. + * {string | number} minHeight + * Minimum height for the Timeline, a number in pixels or + * a css string like '400px' or '75%'. + * {string | number} maxHeight + * Maximum height for the Timeline, a number in pixels or + * a css string like '400px' or '75%'. + * {number | Date | string} start + * Start date for the visible window + * {number | Date | string} end + * End date for the visible window + */ +Core.prototype.setOptions = function (options) { + if (options) { + // copy the known options + var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'rtl', 'zoomKey', 'horizontalScroll', 'verticalScroll']; + util.selectiveExtend(fields, this.options, options); + + this.dom.rollingModeBtn.style.visibility = 'hidden'; + + if (this.options.rtl) { + this.dom.container.style.direction = "rtl"; + this.dom.backgroundVertical.className = 'vis-panel vis-background vis-vertical-rtl'; + } + + if (this.options.verticalScroll) { + if (this.options.rtl) { + this.dom.rightContainer.className = 'vis-panel vis-right vis-vertical-scroll'; + } else { + this.dom.leftContainer.className = 'vis-panel vis-left vis-vertical-scroll'; + } + } + + if ((0, _typeof3['default'])(this.options.orientation) !== 'object') { + this.options.orientation = { item: undefined, axis: undefined }; + } + if ('orientation' in options) { + if (typeof options.orientation === 'string') { + this.options.orientation = { + item: options.orientation, + axis: options.orientation + }; + } else if ((0, _typeof3['default'])(options.orientation) === 'object') { + if ('item' in options.orientation) { + this.options.orientation.item = options.orientation.item; + } + if ('axis' in options.orientation) { + this.options.orientation.axis = options.orientation.axis; + } + } + } + + if (this.options.orientation.axis === 'both') { + if (!this.timeAxis2) { + var timeAxis2 = this.timeAxis2 = new TimeAxis(this.body); + timeAxis2.setOptions = function (options) { + var _options = options ? util.extend({}, options) : {}; + _options.orientation = 'top'; // override the orientation option, always top + TimeAxis.prototype.setOptions.call(timeAxis2, _options); + }; + this.components.push(timeAxis2); + } + } else { + if (this.timeAxis2) { + var index = this.components.indexOf(this.timeAxis2); + if (index !== -1) { + this.components.splice(index, 1); + } + this.timeAxis2.destroy(); + this.timeAxis2 = null; + } + } + + // if the graph2d's drawPoints is a function delegate the callback to the onRender property + if (typeof options.drawPoints == 'function') { + options.drawPoints = { + onRender: options.drawPoints + }; + } + + if ('hiddenDates' in this.options) { + DateUtil.convertHiddenOptions(this.options.moment, this.body, this.options.hiddenDates); + } + + if ('clickToUse' in options) { + if (options.clickToUse) { + if (!this.activator) { + this.activator = new Activator(this.dom.root); + } + } else { + if (this.activator) { + this.activator.destroy(); + delete this.activator; + } + } + } + + if ('showCustomTime' in options) { + throw new Error('Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])'); + } + + // enable/disable autoResize + this._initAutoResize(); + } + + // propagate options to all components + this.components.forEach(function (component) { + return component.setOptions(options); + }); + + // enable/disable configure + if ('configure' in options) { + if (!this.configurator) { + this.configurator = this._createConfigurator(); + } + + this.configurator.setOptions(options.configure); + + // collect the settings of all components, and pass them to the configuration system + var appliedOptions = util.deepExtend({}, this.options); + this.components.forEach(function (component) { + util.deepExtend(appliedOptions, component.options); + }); + this.configurator.setModuleOptions({ global: appliedOptions }); + } + + this._redraw(); +}; + +/** + * Returns true when the Timeline is active. + * @returns {boolean} + */ +Core.prototype.isActive = function () { + return !this.activator || this.activator.active; +}; + +/** + * Destroy the Core, clean up all DOM elements and event listeners. + */ +Core.prototype.destroy = function () { + // unbind datasets + this.setItems(null); + this.setGroups(null); + + // remove all event listeners + this.off(); + + // stop checking for changed size + this._stopAutoResize(); + + // remove from DOM + if (this.dom.root.parentNode) { + this.dom.root.parentNode.removeChild(this.dom.root); + } + this.dom = null; + + // remove Activator + if (this.activator) { + this.activator.destroy(); + delete this.activator; + } + + // cleanup hammer touch events + for (var event in this.listeners) { + if (this.listeners.hasOwnProperty(event)) { + delete this.listeners[event]; + } + } + this.listeners = null; + this.hammer = null; + + // give all components the opportunity to cleanup + this.components.forEach(function (component) { + return component.destroy(); + }); + + this.body = null; +}; + +/** + * Set a custom time bar + * @param {Date} time + * @param {number} [id=undefined] Optional id of the custom time bar to be adjusted. + */ +Core.prototype.setCustomTime = function (time, id) { + var customTimes = this.customTimes.filter(function (component) { + return id === component.options.id; + }); + + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + (0, _stringify2['default'])(id)); + } + + if (customTimes.length > 0) { + customTimes[0].setCustomTime(time); + } +}; + +/** + * Retrieve the current custom time. + * @param {number} [id=undefined] Id of the custom time bar. + * @return {Date | undefined} customTime + */ +Core.prototype.getCustomTime = function (id) { + var customTimes = this.customTimes.filter(function (component) { + return component.options.id === id; + }); + + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + (0, _stringify2['default'])(id)); + } + return customTimes[0].getCustomTime(); +}; + +/** + * Set a custom title for the custom time bar. + * @param {string} [title] Custom title + * @param {number} [id=undefined] Id of the custom time bar. + * @returns {*} + */ +Core.prototype.setCustomTimeTitle = function (title, id) { + var customTimes = this.customTimes.filter(function (component) { + return component.options.id === id; + }); + + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + (0, _stringify2['default'])(id)); + } + if (customTimes.length > 0) { + return customTimes[0].setCustomTitle(title); + } +}; + +/** + * Retrieve meta information from an event. + * Should be overridden by classes extending Core + * @param {Event} event + * @return {Object} An object with related information. + */ +Core.prototype.getEventProperties = function (event) { + return { event: event }; +}; + +/** + * Add custom vertical bar + * @param {Date | string | number} [time] A Date, unix timestamp, or + * ISO date string. Time point where + * the new bar should be placed. + * If not provided, `new Date()` will + * be used. + * @param {number | string} [id=undefined] Id of the new bar. Optional + * @return {number | string} Returns the id of the new bar + */ +Core.prototype.addCustomTime = function (time, id) { + var timestamp = time !== undefined ? util.convert(time, 'Date').valueOf() : new Date(); + + var exists = this.customTimes.some(function (customTime) { + return customTime.options.id === id; + }); + if (exists) { + throw new Error('A custom time with id ' + (0, _stringify2['default'])(id) + ' already exists'); + } + + var customTime = new CustomTime(this.body, util.extend({}, this.options, { + time: timestamp, + id: id + })); + + this.customTimes.push(customTime); + this.components.push(customTime); + this._redraw(); + + return id; +}; + +/** + * Remove previously added custom bar + * @param {int} id ID of the custom bar to be removed + * [at]returns {boolean} True if the bar exists and is removed, false otherwise + */ +Core.prototype.removeCustomTime = function (id) { + var customTimes = this.customTimes.filter(function (bar) { + return bar.options.id === id; + }); + + if (customTimes.length === 0) { + throw new Error('No custom time bar found with id ' + (0, _stringify2['default'])(id)); + } + + customTimes.forEach(function (customTime) { + this.customTimes.splice(this.customTimes.indexOf(customTime), 1); + this.components.splice(this.components.indexOf(customTime), 1); + customTime.destroy(); + }.bind(this)); +}; + +/** + * Get the id's of the currently visible items. + * @returns {Array} The ids of the visible items + */ +Core.prototype.getVisibleItems = function () { + return this.itemSet && this.itemSet.getVisibleItems() || []; +}; + +/** + * Set Core window such that it fits all items + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * @param {function} [callback] a callback funtion to be executed at the end of this function + */ +Core.prototype.fit = function (options, callback) { + var range = this.getDataRange(); + + // skip range set if there is no min and max date + if (range.min === null && range.max === null) { + return; + } + + // apply a margin of 1% left and right of the data + var interval = range.max - range.min; + var min = new Date(range.min.valueOf() - interval * 0.01); + var max = new Date(range.max.valueOf() + interval * 0.01); + var animation = options && options.animation !== undefined ? options.animation : true; + this.range.setRange(min, max, { animation: animation }, callback); +}; + +/** + * Calculate the data range of the items start and end dates + * [at]returns {{min: [Date], max: [Date]}} + * @protected + */ +Core.prototype.getDataRange = function () { + // must be implemented by Timeline and Graph2d + throw new Error('Cannot invoke abstract method getDataRange'); +}; + +/** + * Set the visible window. Both parameters are optional, you can change only + * start or only end. Syntax: + * + * TimeLine.setWindow(start, end) + * TimeLine.setWindow(start, end, options) + * TimeLine.setWindow(range) + * + * Where start and end can be a Date, number, or string, and range is an + * object with properties start and end. + * + * @param {Date | number | string | Object} [start] Start date of visible window + * @param {Date | number | string} [end] End date of visible window + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * @param {function} [callback] a callback funtion to be executed at the end of this function + */ +Core.prototype.setWindow = function (start, end, options, callback) { + if (typeof arguments[2] == "function") { + callback = arguments[2]; + options = {}; + } + var animation; + var range; + if (arguments.length == 1) { + range = arguments[0]; + animation = range.animation !== undefined ? range.animation : true; + this.range.setRange(range.start, range.end, { animation: animation }); + } else if (arguments.length == 2 && typeof arguments[1] == "function") { + range = arguments[0]; + callback = arguments[1]; + animation = range.animation !== undefined ? range.animation : true; + this.range.setRange(range.start, range.end, { animation: animation }, callback); + } else { + animation = options && options.animation !== undefined ? options.animation : true; + this.range.setRange(start, end, { animation: animation }, callback); + } +}; + +/** + * Move the window such that given time is centered on screen. + * @param {Date | number | string} time + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * @param {function} [callback] a callback funtion to be executed at the end of this function + */ +Core.prototype.moveTo = function (time, options, callback) { + if (typeof arguments[1] == "function") { + callback = arguments[1]; + options = {}; + } + var interval = this.range.end - this.range.start; + var t = util.convert(time, 'Date').valueOf(); + + var start = t - interval / 2; + var end = t + interval / 2; + var animation = options && options.animation !== undefined ? options.animation : true; + + this.range.setRange(start, end, { animation: animation }, callback); +}; + +/** + * Get the visible window + * @return {{start: Date, end: Date}} Visible range + */ +Core.prototype.getWindow = function () { + var range = this.range.getRange(); + return { + start: new Date(range.start), + end: new Date(range.end) + }; +}; + +/** + * Zoom in the window such that given time is centered on screen. + * @param {number} percentage - must be between [0..1] + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * @param {function} [callback] a callback funtion to be executed at the end of this function + */ +Core.prototype.zoomIn = function (percentage, options, callback) { + if (!percentage || percentage < 0 || percentage > 1) return; + if (typeof arguments[1] == "function") { + callback = arguments[1]; + options = {}; + } + var range = this.getWindow(); + var start = range.start.valueOf(); + var end = range.end.valueOf(); + var interval = end - start; + var newInterval = interval / (1 + percentage); + var distance = (interval - newInterval) / 2; + var newStart = start + distance; + var newEnd = end - distance; + + this.setWindow(newStart, newEnd, options, callback); +}; + +/** + * Zoom out the window such that given time is centered on screen. + * @param {number} percentage - must be between [0..1] + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * @param {function} [callback] a callback funtion to be executed at the end of this function + */ +Core.prototype.zoomOut = function (percentage, options, callback) { + if (!percentage || percentage < 0 || percentage > 1) return; + if (typeof arguments[1] == "function") { + callback = arguments[1]; + options = {}; + } + var range = this.getWindow(); + var start = range.start.valueOf(); + var end = range.end.valueOf(); + var interval = end - start; + var newStart = start - interval * percentage / 2; + var newEnd = end + interval * percentage / 2; + + this.setWindow(newStart, newEnd, options, callback); +}; + +/** + * Force a redraw. Can be overridden by implementations of Core + * + * Note: this function will be overridden on construction with a trottled version + */ +Core.prototype.redraw = function () { + this._redraw(); +}; + +/** + * Redraw for internal use. Redraws all components. See also the public + * method redraw. + * @protected + */ +Core.prototype._redraw = function () { + this.redrawCount++; + var resized = false; + var options = this.options; + var props = this.props; + var dom = this.dom; + + if (!dom || !dom.container || dom.root.offsetWidth == 0) return; // when destroyed, or invisible + + DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); + + // update class names + if (options.orientation == 'top') { + util.addClassName(dom.root, 'vis-top'); + util.removeClassName(dom.root, 'vis-bottom'); + } else { + util.removeClassName(dom.root, 'vis-top'); + util.addClassName(dom.root, 'vis-bottom'); + } + + // update root width and height options + dom.root.style.maxHeight = util.option.asSize(options.maxHeight, ''); + dom.root.style.minHeight = util.option.asSize(options.minHeight, ''); + dom.root.style.width = util.option.asSize(options.width, ''); + + // calculate border widths + props.border.left = (dom.centerContainer.offsetWidth - dom.centerContainer.clientWidth) / 2; + props.border.right = props.border.left; + props.border.top = (dom.centerContainer.offsetHeight - dom.centerContainer.clientHeight) / 2; + props.border.bottom = props.border.top; + props.borderRootHeight = dom.root.offsetHeight - dom.root.clientHeight; + props.borderRootWidth = dom.root.offsetWidth - dom.root.clientWidth; + + // workaround for a bug in IE: the clientWidth of an element with + // a height:0px and overflow:hidden is not calculated and always has value 0 + if (dom.centerContainer.clientHeight === 0) { + props.border.left = props.border.top; + props.border.right = props.border.left; + } + if (dom.root.clientHeight === 0) { + props.borderRootWidth = props.borderRootHeight; + } + + // calculate the heights. If any of the side panels is empty, we set the height to + // minus the border width, such that the border will be invisible + props.center.height = dom.center.offsetHeight; + props.left.height = dom.left.offsetHeight; + props.right.height = dom.right.offsetHeight; + props.top.height = dom.top.clientHeight || -props.border.top; + props.bottom.height = dom.bottom.clientHeight || -props.border.bottom; + + // TODO: compensate borders when any of the panels is empty. + + // apply auto height + // TODO: only calculate autoHeight when needed (else we cause an extra reflow/repaint of the DOM) + var contentHeight = Math.max(props.left.height, props.center.height, props.right.height); + var autoHeight = props.top.height + contentHeight + props.bottom.height + props.borderRootHeight + props.border.top + props.border.bottom; + dom.root.style.height = util.option.asSize(options.height, autoHeight + 'px'); + + // calculate heights of the content panels + props.root.height = dom.root.offsetHeight; + props.background.height = props.root.height - props.borderRootHeight; + var containerHeight = props.root.height - props.top.height - props.bottom.height - props.borderRootHeight; + props.centerContainer.height = containerHeight; + props.leftContainer.height = containerHeight; + props.rightContainer.height = props.leftContainer.height; + + // calculate the widths of the panels + props.root.width = dom.root.offsetWidth; + props.background.width = props.root.width - props.borderRootWidth; + + if (!this.initialDrawDone) { + props.scrollbarWidth = util.getScrollBarWidth(); + } + + if (options.verticalScroll) { + if (options.rtl) { + props.left.width = dom.leftContainer.clientWidth || -props.border.left; + props.right.width = dom.rightContainer.clientWidth + props.scrollbarWidth || -props.border.right; + } else { + props.left.width = dom.leftContainer.clientWidth + props.scrollbarWidth || -props.border.left; + props.right.width = dom.rightContainer.clientWidth || -props.border.right; + } + } else { + props.left.width = dom.leftContainer.clientWidth || -props.border.left; + props.right.width = dom.rightContainer.clientWidth || -props.border.right; + } + + this._setDOM(); + + // update the scrollTop, feasible range for the offset can be changed + // when the height of the Core or of the contents of the center changed + var offset = this._updateScrollTop(); + + // reposition the scrollable contents + if (options.orientation.item != 'top') { + offset += Math.max(props.centerContainer.height - props.center.height - props.border.top - props.border.bottom, 0); + } + dom.center.style.top = offset + 'px'; + + // show shadows when vertical scrolling is available + var visibilityTop = props.scrollTop == 0 ? 'hidden' : ''; + var visibilityBottom = props.scrollTop == props.scrollTopMin ? 'hidden' : ''; + dom.shadowTop.style.visibility = visibilityTop; + dom.shadowBottom.style.visibility = visibilityBottom; + dom.shadowTopLeft.style.visibility = visibilityTop; + dom.shadowBottomLeft.style.visibility = visibilityBottom; + dom.shadowTopRight.style.visibility = visibilityTop; + dom.shadowBottomRight.style.visibility = visibilityBottom; + + if (options.verticalScroll) { + dom.rightContainer.className = 'vis-panel vis-right vis-vertical-scroll'; + dom.leftContainer.className = 'vis-panel vis-left vis-vertical-scroll'; + + dom.shadowTopRight.style.visibility = "hidden"; + dom.shadowBottomRight.style.visibility = "hidden"; + dom.shadowTopLeft.style.visibility = "hidden"; + dom.shadowBottomLeft.style.visibility = "hidden"; + + dom.left.style.top = '0px'; + dom.right.style.top = '0px'; + } + + if (!options.verticalScroll || props.center.height < props.centerContainer.height) { + dom.left.style.top = offset + 'px'; + dom.right.style.top = offset + 'px'; + dom.rightContainer.className = dom.rightContainer.className.replace(new RegExp('(?:^|\\s)' + 'vis-vertical-scroll' + '(?:\\s|$)'), ' '); + dom.leftContainer.className = dom.leftContainer.className.replace(new RegExp('(?:^|\\s)' + 'vis-vertical-scroll' + '(?:\\s|$)'), ' '); + props.left.width = dom.leftContainer.clientWidth || -props.border.left; + props.right.width = dom.rightContainer.clientWidth || -props.border.right; + this._setDOM(); + } + + // enable/disable vertical panning + var contentsOverflow = props.center.height > props.centerContainer.height; + this.hammer.get('pan').set({ + direction: contentsOverflow ? Hammer.DIRECTION_ALL : Hammer.DIRECTION_HORIZONTAL + }); + + // redraw all components + this.components.forEach(function (component) { + resized = component.redraw() || resized; + }); + var MAX_REDRAW = 5; + if (resized) { + if (this.redrawCount < MAX_REDRAW) { + this.body.emitter.emit('_change'); + return; + } else { + console.log('WARNING: infinite loop in redraw?'); + } + } else { + this.redrawCount = 0; + } + + //Emit public 'changed' event for UI updates, see issue #1592 + this.body.emitter.emit("changed"); +}; + +Core.prototype._setDOM = function () { + var props = this.props; + var dom = this.dom; + + props.leftContainer.width = props.left.width; + props.rightContainer.width = props.right.width; + var centerWidth = props.root.width - props.left.width - props.right.width - props.borderRootWidth; + props.center.width = centerWidth; + props.centerContainer.width = centerWidth; + props.top.width = centerWidth; + props.bottom.width = centerWidth; + + // resize the panels + dom.background.style.height = props.background.height + 'px'; + dom.backgroundVertical.style.height = props.background.height + 'px'; + dom.backgroundHorizontal.style.height = props.centerContainer.height + 'px'; + dom.centerContainer.style.height = props.centerContainer.height + 'px'; + dom.leftContainer.style.height = props.leftContainer.height + 'px'; + dom.rightContainer.style.height = props.rightContainer.height + 'px'; + + dom.background.style.width = props.background.width + 'px'; + dom.backgroundVertical.style.width = props.centerContainer.width + 'px'; + dom.backgroundHorizontal.style.width = props.background.width + 'px'; + dom.centerContainer.style.width = props.center.width + 'px'; + dom.top.style.width = props.top.width + 'px'; + dom.bottom.style.width = props.bottom.width + 'px'; + + // reposition the panels + dom.background.style.left = '0'; + dom.background.style.top = '0'; + dom.backgroundVertical.style.left = props.left.width + props.border.left + 'px'; + dom.backgroundVertical.style.top = '0'; + dom.backgroundHorizontal.style.left = '0'; + dom.backgroundHorizontal.style.top = props.top.height + 'px'; + dom.centerContainer.style.left = props.left.width + 'px'; + dom.centerContainer.style.top = props.top.height + 'px'; + dom.leftContainer.style.left = '0'; + dom.leftContainer.style.top = props.top.height + 'px'; + dom.rightContainer.style.left = props.left.width + props.center.width + 'px'; + dom.rightContainer.style.top = props.top.height + 'px'; + dom.top.style.left = props.left.width + 'px'; + dom.top.style.top = '0'; + dom.bottom.style.left = props.left.width + 'px'; + dom.bottom.style.top = props.top.height + props.centerContainer.height + 'px'; + dom.center.style.left = '0'; + dom.left.style.left = '0'; + dom.right.style.left = '0'; +}; + +// TODO: deprecated since version 1.1.0, remove some day +Core.prototype.repaint = function () { + throw new Error('Function repaint is deprecated. Use redraw instead.'); +}; + +/** + * Set a current time. This can be used for example to ensure that a client's + * time is synchronized with a shared server time. + * Only applicable when option `showCurrentTime` is true. + * @param {Date | string | number} time A Date, unix timestamp, or + * ISO date string. + */ +Core.prototype.setCurrentTime = function (time) { + if (!this.currentTime) { + throw new Error('Option showCurrentTime must be true'); + } + + this.currentTime.setCurrentTime(time); +}; + +/** + * Get the current time. + * Only applicable when option `showCurrentTime` is true. + * @return {Date} Returns the current time. + */ +Core.prototype.getCurrentTime = function () { + if (!this.currentTime) { + throw new Error('Option showCurrentTime must be true'); + } + + return this.currentTime.getCurrentTime(); +}; + +/** + * Convert a position on screen (pixels) to a datetime + * @param {int} x Position on the screen in pixels + * @return {Date} time The datetime the corresponds with given position x + * @protected + */ +// TODO: move this function to Range +Core.prototype._toTime = function (x) { + return DateUtil.toTime(this, x, this.props.center.width); +}; + +/** + * Convert a position on the global screen (pixels) to a datetime + * @param {int} x Position on the screen in pixels + * @return {Date} time The datetime the corresponds with given position x + * @protected + */ +// TODO: move this function to Range +Core.prototype._toGlobalTime = function (x) { + return DateUtil.toTime(this, x, this.props.root.width); + //var conversion = this.range.conversion(this.props.root.width); + //return new Date(x / conversion.scale + conversion.offset); +}; + +/** + * Convert a datetime (Date object) into a position on the screen + * @param {Date} time A date + * @return {int} x The position on the screen in pixels which corresponds + * with the given date. + * @protected + */ +// TODO: move this function to Range +Core.prototype._toScreen = function (time) { + return DateUtil.toScreen(this, time, this.props.center.width); +}; + +/** + * Convert a datetime (Date object) into a position on the root + * This is used to get the pixel density estimate for the screen, not the center panel + * @param {Date} time A date + * @return {int} x The position on root in pixels which corresponds + * with the given date. + * @protected + */ +// TODO: move this function to Range +Core.prototype._toGlobalScreen = function (time) { + return DateUtil.toScreen(this, time, this.props.root.width); + //var conversion = this.range.conversion(this.props.root.width); + //return (time.valueOf() - conversion.offset) * conversion.scale; +}; + +/** + * Initialize watching when option autoResize is true + * @private + */ +Core.prototype._initAutoResize = function () { + if (this.options.autoResize == true) { + this._startAutoResize(); + } else { + this._stopAutoResize(); + } +}; + +/** + * Watch for changes in the size of the container. On resize, the Panel will + * automatically redraw itself. + * @private + */ +Core.prototype._startAutoResize = function () { + var me = this; + + this._stopAutoResize(); + + this._onResize = function () { + if (me.options.autoResize != true) { + // stop watching when the option autoResize is changed to false + me._stopAutoResize(); + return; + } + + if (me.dom.root) { + // check whether the frame is resized + // Note: we compare offsetWidth here, not clientWidth. For some reason, + // IE does not restore the clientWidth from 0 to the actual width after + // changing the timeline's container display style from none to visible + if (me.dom.root.offsetWidth != me.props.lastWidth || me.dom.root.offsetHeight != me.props.lastHeight) { + me.props.lastWidth = me.dom.root.offsetWidth; + me.props.lastHeight = me.dom.root.offsetHeight; + me.props.scrollbarWidth = util.getScrollBarWidth(); + + me.body.emitter.emit('_change'); + } + } + }; + + // add event listener to window resize + util.addEventListener(window, 'resize', this._onResize); + + //Prevent initial unnecessary redraw + if (me.dom.root) { + me.props.lastWidth = me.dom.root.offsetWidth; + me.props.lastHeight = me.dom.root.offsetHeight; + } + + this.watchTimer = setInterval(this._onResize, 1000); +}; + +/** + * Stop watching for a resize of the frame. + * @private + */ +Core.prototype._stopAutoResize = function () { + if (this.watchTimer) { + clearInterval(this.watchTimer); + this.watchTimer = undefined; + } + + // remove event listener on window.resize + if (this._onResize) { + util.removeEventListener(window, 'resize', this._onResize); + this._onResize = null; + } +}; + +/** + * Start moving the timeline vertically + * @param {Event} event + * @private + */ +Core.prototype._onTouch = function (event) { + // eslint-disable-line no-unused-vars + this.touch.allowDragging = true; + this.touch.initialScrollTop = this.props.scrollTop; +}; + +/** + * Start moving the timeline vertically + * @param {Event} event + * @private + */ +Core.prototype._onPinch = function (event) { + // eslint-disable-line no-unused-vars + this.touch.allowDragging = false; +}; + +/** + * Move the timeline vertically + * @param {Event} event + * @private + */ +Core.prototype._onDrag = function (event) { + if (!event) return; + // refuse to drag when we where pinching to prevent the timeline make a jump + // when releasing the fingers in opposite order from the touch screen + if (!this.touch.allowDragging) return; + + var delta = event.deltaY; + + var oldScrollTop = this._getScrollTop(); + var newScrollTop = this._setScrollTop(this.touch.initialScrollTop + delta); + + if (this.options.verticalScroll) { + this.dom.left.parentNode.scrollTop = -this.props.scrollTop; + this.dom.right.parentNode.scrollTop = -this.props.scrollTop; + } + + if (newScrollTop != oldScrollTop) { + this.emit("verticalDrag"); + } +}; + +/** + * Apply a scrollTop + * @param {number} scrollTop + * @returns {number} scrollTop Returns the applied scrollTop + * @private + */ +Core.prototype._setScrollTop = function (scrollTop) { + this.props.scrollTop = scrollTop; + this._updateScrollTop(); + return this.props.scrollTop; +}; + +/** + * Update the current scrollTop when the height of the containers has been changed + * @returns {number} scrollTop Returns the applied scrollTop + * @private + */ +Core.prototype._updateScrollTop = function () { + // recalculate the scrollTopMin + var scrollTopMin = Math.min(this.props.centerContainer.height - this.props.center.height, 0); // is negative or zero + if (scrollTopMin != this.props.scrollTopMin) { + // in case of bottom orientation, change the scrollTop such that the contents + // do not move relative to the time axis at the bottom + if (this.options.orientation.item != 'top') { + this.props.scrollTop += scrollTopMin - this.props.scrollTopMin; + } + this.props.scrollTopMin = scrollTopMin; + } + + // limit the scrollTop to the feasible scroll range + if (this.props.scrollTop > 0) this.props.scrollTop = 0; + if (this.props.scrollTop < scrollTopMin) this.props.scrollTop = scrollTopMin; + + if (this.options.verticalScroll) { + this.dom.left.parentNode.scrollTop = -this.props.scrollTop; + this.dom.right.parentNode.scrollTop = -this.props.scrollTop; + } + + return this.props.scrollTop; +}; + +/** + * Get the current scrollTop + * @returns {number} scrollTop + * @private + */ +Core.prototype._getScrollTop = function () { + return this.props.scrollTop; +}; + +/** + * Load a configurator + * [at]returns {Object} + * @private + */ +Core.prototype._createConfigurator = function () { + throw new Error('Cannot invoke abstract method _createConfigurator'); +}; + +module.exports = Core; + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var moment = __webpack_require__(9); +var DateUtil = __webpack_require__(36); +var util = __webpack_require__(2); + +/** + * The class TimeStep is an iterator for dates. You provide a start date and an + * end date. The class itself determines the best scale (step size) based on the + * provided start Date, end Date, and minimumStep. + * + * If minimumStep is provided, the step size is chosen as close as possible + * to the minimumStep but larger than minimumStep. If minimumStep is not + * provided, the scale is set to 1 DAY. + * The minimumStep should correspond with the onscreen size of about 6 characters + * + * Alternatively, you can set a scale by hand. + * After creation, you can initialize the class by executing first(). Then you + * can iterate from the start date to the end date via next(). You can check if + * the end date is reached with the function hasNext(). After each step, you can + * retrieve the current date via getCurrent(). + * The TimeStep has scales ranging from milliseconds, seconds, minutes, hours, + * days, to years. + * + * Version: 1.2 + * + * @param {Date} [start] The start date, for example new Date(2010, 9, 21) + * or new Date(2010, 9, 21, 23, 45, 00) + * @param {Date} [end] The end date + * @param {number} [minimumStep] Optional. Minimum step size in milliseconds + * @param {Date|Array.} [hiddenDates] Optional. + * @param {{showMajorLabels: boolean}} [options] Optional. + * @constructor TimeStep + */ +function TimeStep(start, end, minimumStep, hiddenDates, options) { + this.moment = moment; + + // variables + this.current = this.moment(); + this._start = this.moment(); + this._end = this.moment(); + + this.autoScale = true; + this.scale = 'day'; + this.step = 1; + + // initialize the range + this.setRange(start, end, minimumStep); + + // hidden Dates options + this.switchedDay = false; + this.switchedMonth = false; + this.switchedYear = false; + if (Array.isArray(hiddenDates)) { + this.hiddenDates = hiddenDates; + } else if (hiddenDates != undefined) { + this.hiddenDates = [hiddenDates]; + } else { + this.hiddenDates = []; + } + + this.format = TimeStep.FORMAT; // default formatting + this.options = options ? options : {}; +} + +// Time formatting +TimeStep.FORMAT = { + minorLabels: { + millisecond: 'SSS', + second: 's', + minute: 'HH:mm', + hour: 'HH:mm', + weekday: 'ddd D', + day: 'D', + week: 'w', + month: 'MMM', + year: 'YYYY' + }, + majorLabels: { + millisecond: 'HH:mm:ss', + second: 'D MMMM HH:mm', + minute: 'ddd D MMMM', + hour: 'ddd D MMMM', + weekday: 'MMMM YYYY', + day: 'MMMM YYYY', + week: 'MMMM YYYY', + month: 'YYYY', + year: '' + } +}; + +/** + * Set custom constructor function for moment. Can be used to set dates + * to UTC or to set a utcOffset. + * @param {function} moment + */ +TimeStep.prototype.setMoment = function (moment) { + this.moment = moment; + + // update the date properties, can have a new utcOffset + this.current = this.moment(this.current.valueOf()); + this._start = this.moment(this._start.valueOf()); + this._end = this.moment(this._end.valueOf()); +}; + +/** + * Set custom formatting for the minor an major labels of the TimeStep. + * Both `minorLabels` and `majorLabels` are an Object with properties: + * 'millisecond', 'second', 'minute', 'hour', 'weekday', 'day', 'week', 'month', 'year'. + * @param {{minorLabels: Object, majorLabels: Object}} format + */ +TimeStep.prototype.setFormat = function (format) { + var defaultFormat = util.deepExtend({}, TimeStep.FORMAT); + this.format = util.deepExtend(defaultFormat, format); +}; + +/** + * Set a new range + * If minimumStep is provided, the step size is chosen as close as possible + * to the minimumStep but larger than minimumStep. If minimumStep is not + * provided, the scale is set to 1 DAY. + * The minimumStep should correspond with the onscreen size of about 6 characters + * @param {Date} [start] The start date and time. + * @param {Date} [end] The end date and time. + * @param {int} [minimumStep] Optional. Minimum step size in milliseconds + */ +TimeStep.prototype.setRange = function (start, end, minimumStep) { + if (!(start instanceof Date) || !(end instanceof Date)) { + throw "No legal start or end date in method setRange"; + } + + this._start = start != undefined ? this.moment(start.valueOf()) : new Date(); + this._end = end != undefined ? this.moment(end.valueOf()) : new Date(); + + if (this.autoScale) { + this.setMinimumStep(minimumStep); + } +}; + +/** + * Set the range iterator to the start date. + */ +TimeStep.prototype.start = function () { + this.current = this._start.clone(); + this.roundToMinor(); +}; + +/** + * Round the current date to the first minor date value + * This must be executed once when the current date is set to start Date + */ +TimeStep.prototype.roundToMinor = function () { + // round to floor + // to prevent year & month scales rounding down to the first day of week we perform this separately + if (this.scale == 'week') { + this.current.weekday(0); + } + // IMPORTANT: we have no breaks in this switch! (this is no bug) + // noinspection FallThroughInSwitchStatementJS + switch (this.scale) { + case 'year': + this.current.year(this.step * Math.floor(this.current.year() / this.step)); + this.current.month(0); + case 'month': + this.current.date(1); // eslint-disable-line no-fallthrough + case 'week': // eslint-disable-line no-fallthrough + case 'day': // eslint-disable-line no-fallthrough + case 'weekday': + this.current.hours(0); // eslint-disable-line no-fallthrough + case 'hour': + this.current.minutes(0); // eslint-disable-line no-fallthrough + case 'minute': + this.current.seconds(0); // eslint-disable-line no-fallthrough + case 'second': + this.current.milliseconds(0); // eslint-disable-line no-fallthrough + //case 'millisecond': // nothing to do for milliseconds + } + + if (this.step != 1) { + // round down to the first minor value that is a multiple of the current step size + switch (this.scale) { + case 'millisecond': + this.current.subtract(this.current.milliseconds() % this.step, 'milliseconds');break; + case 'second': + this.current.subtract(this.current.seconds() % this.step, 'seconds');break; + case 'minute': + this.current.subtract(this.current.minutes() % this.step, 'minutes');break; + case 'hour': + this.current.subtract(this.current.hours() % this.step, 'hours');break; + case 'weekday': // intentional fall through + case 'day': + this.current.subtract((this.current.date() - 1) % this.step, 'day');break; + case 'week': + this.current.subtract(this.current.week() % this.step, 'week');break; + case 'month': + this.current.subtract(this.current.month() % this.step, 'month');break; + case 'year': + this.current.subtract(this.current.year() % this.step, 'year');break; + default: + break; + } + } +}; + +/** + * Check if the there is a next step + * @return {boolean} true if the current date has not passed the end date + */ +TimeStep.prototype.hasNext = function () { + return this.current.valueOf() <= this._end.valueOf(); +}; + +/** + * Do the next step + */ +TimeStep.prototype.next = function () { + var prev = this.current.valueOf(); + + // Two cases, needed to prevent issues with switching daylight savings + // (end of March and end of October) + switch (this.scale) { + case 'millisecond': + this.current.add(this.step, 'millisecond');break; + case 'second': + this.current.add(this.step, 'second');break; + case 'minute': + this.current.add(this.step, 'minute');break; + case 'hour': + this.current.add(this.step, 'hour'); + + if (this.current.month() < 6) { + this.current.subtract(this.current.hours() % this.step, 'hour'); + } else { + if (this.current.hours() % this.step !== 0) { + this.current.add(this.step - this.current.hours() % this.step, 'hour'); + } + } + break; + case 'weekday': // intentional fall through + case 'day': + this.current.add(this.step, 'day');break; + case 'week': + if (this.current.weekday() !== 0) { + // we had a month break not correlating with a week's start before + this.current.weekday(0); // switch back to week cycles + this.current.add(this.step, 'week'); + } else if (this.options.showMajorLabels === false) { + this.current.add(this.step, 'week'); // the default case + } else { + // first day of the week + var nextWeek = this.current.clone(); + nextWeek.add(1, 'week'); + if (nextWeek.isSame(this.current, 'month')) { + // is the first day of the next week in the same month? + this.current.add(this.step, 'week'); // the default case + } else { + // inject a step at each first day of the month + this.current.add(this.step, 'week'); + this.current.date(1); + } + } + break; + case 'month': + this.current.add(this.step, 'month');break; + case 'year': + this.current.add(this.step, 'year');break; + default: + break; + } + + if (this.step != 1) { + // round down to the correct major value + switch (this.scale) { + case 'millisecond': + if (this.current.milliseconds() > 0 && this.current.milliseconds() < this.step) this.current.milliseconds(0);break; + case 'second': + if (this.current.seconds() > 0 && this.current.seconds() < this.step) this.current.seconds(0);break; + case 'minute': + if (this.current.minutes() > 0 && this.current.minutes() < this.step) this.current.minutes(0);break; + case 'hour': + if (this.current.hours() > 0 && this.current.hours() < this.step) this.current.hours(0);break; + case 'weekday': // intentional fall through + case 'day': + if (this.current.date() < this.step + 1) this.current.date(1);break; + case 'week': + if (this.current.week() < this.step) this.current.week(1);break; // week numbering starts at 1, not 0 + case 'month': + if (this.current.month() < this.step) this.current.month(0);break; + case 'year': + break; // nothing to do for year + default: + break; + } + } + + // safety mechanism: if current time is still unchanged, move to the end + if (this.current.valueOf() == prev) { + this.current = this._end.clone(); + } + + // Reset switches for year, month and day. Will get set to true where appropriate in DateUtil.stepOverHiddenDates + this.switchedDay = false; + this.switchedMonth = false; + this.switchedYear = false; + + DateUtil.stepOverHiddenDates(this.moment, this, prev); +}; + +/** + * Get the current datetime + * @return {Moment} current The current date + */ +TimeStep.prototype.getCurrent = function () { + return this.current; +}; + +/** + * Set a custom scale. Autoscaling will be disabled. + * For example setScale('minute', 5) will result + * in minor steps of 5 minutes, and major steps of an hour. + * + * @param {{scale: string, step: number}} params + * An object containing two properties: + * - A string 'scale'. Choose from 'millisecond', 'second', + * 'minute', 'hour', 'weekday', 'day', 'week', 'month', 'year'. + * - A number 'step'. A step size, by default 1. + * Choose for example 1, 2, 5, or 10. + */ +TimeStep.prototype.setScale = function (params) { + if (params && typeof params.scale == 'string') { + this.scale = params.scale; + this.step = params.step > 0 ? params.step : 1; + this.autoScale = false; + } +}; + +/** + * Enable or disable autoscaling + * @param {boolean} enable If true, autoascaling is set true + */ +TimeStep.prototype.setAutoScale = function (enable) { + this.autoScale = enable; +}; + +/** + * Automatically determine the scale that bests fits the provided minimum step + * @param {number} [minimumStep] The minimum step size in milliseconds + */ +TimeStep.prototype.setMinimumStep = function (minimumStep) { + if (minimumStep == undefined) { + return; + } + + //var b = asc + ds; + + var stepYear = 1000 * 60 * 60 * 24 * 30 * 12; + var stepMonth = 1000 * 60 * 60 * 24 * 30; + var stepDay = 1000 * 60 * 60 * 24; + var stepHour = 1000 * 60 * 60; + var stepMinute = 1000 * 60; + var stepSecond = 1000; + var stepMillisecond = 1; + + // find the smallest step that is larger than the provided minimumStep + if (stepYear * 1000 > minimumStep) { + this.scale = 'year';this.step = 1000; + } + if (stepYear * 500 > minimumStep) { + this.scale = 'year';this.step = 500; + } + if (stepYear * 100 > minimumStep) { + this.scale = 'year';this.step = 100; + } + if (stepYear * 50 > minimumStep) { + this.scale = 'year';this.step = 50; + } + if (stepYear * 10 > minimumStep) { + this.scale = 'year';this.step = 10; + } + if (stepYear * 5 > minimumStep) { + this.scale = 'year';this.step = 5; + } + if (stepYear > minimumStep) { + this.scale = 'year';this.step = 1; + } + if (stepMonth * 3 > minimumStep) { + this.scale = 'month';this.step = 3; + } + if (stepMonth > minimumStep) { + this.scale = 'month';this.step = 1; + } + if (stepDay * 5 > minimumStep) { + this.scale = 'day';this.step = 5; + } + if (stepDay * 2 > minimumStep) { + this.scale = 'day';this.step = 2; + } + if (stepDay > minimumStep) { + this.scale = 'day';this.step = 1; + } + if (stepDay / 2 > minimumStep) { + this.scale = 'weekday';this.step = 1; + } + if (stepHour * 4 > minimumStep) { + this.scale = 'hour';this.step = 4; + } + if (stepHour > minimumStep) { + this.scale = 'hour';this.step = 1; + } + if (stepMinute * 15 > minimumStep) { + this.scale = 'minute';this.step = 15; + } + if (stepMinute * 10 > minimumStep) { + this.scale = 'minute';this.step = 10; + } + if (stepMinute * 5 > minimumStep) { + this.scale = 'minute';this.step = 5; + } + if (stepMinute > minimumStep) { + this.scale = 'minute';this.step = 1; + } + if (stepSecond * 15 > minimumStep) { + this.scale = 'second';this.step = 15; + } + if (stepSecond * 10 > minimumStep) { + this.scale = 'second';this.step = 10; + } + if (stepSecond * 5 > minimumStep) { + this.scale = 'second';this.step = 5; + } + if (stepSecond > minimumStep) { + this.scale = 'second';this.step = 1; + } + if (stepMillisecond * 200 > minimumStep) { + this.scale = 'millisecond';this.step = 200; + } + if (stepMillisecond * 100 > minimumStep) { + this.scale = 'millisecond';this.step = 100; + } + if (stepMillisecond * 50 > minimumStep) { + this.scale = 'millisecond';this.step = 50; + } + if (stepMillisecond * 10 > minimumStep) { + this.scale = 'millisecond';this.step = 10; + } + if (stepMillisecond * 5 > minimumStep) { + this.scale = 'millisecond';this.step = 5; + } + if (stepMillisecond > minimumStep) { + this.scale = 'millisecond';this.step = 1; + } +}; + +/** + * Snap a date to a rounded value. + * The snap intervals are dependent on the current scale and step. + * Static function + * @param {Date} date the date to be snapped. + * @param {string} scale Current scale, can be 'millisecond', 'second', + * 'minute', 'hour', 'weekday, 'day', 'week', 'month', 'year'. + * @param {number} step Current step (1, 2, 4, 5, ... + * @return {Date} snappedDate + */ +TimeStep.snap = function (date, scale, step) { + var clone = moment(date); + + if (scale == 'year') { + var year = clone.year() + Math.round(clone.month() / 12); + clone.year(Math.round(year / step) * step); + clone.month(0); + clone.date(0); + clone.hours(0); + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'month') { + if (clone.date() > 15) { + clone.date(1); + clone.add(1, 'month'); + // important: first set Date to 1, after that change the month. + } else { + clone.date(1); + } + + clone.hours(0); + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'week') { + if (clone.weekday() > 2) { + // doing it the momentjs locale aware way + clone.weekday(0); + clone.add(1, 'week'); + } else { + clone.weekday(0); + } + + clone.hours(0); + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'day') { + //noinspection FallthroughInSwitchStatementJS + switch (step) { + case 5: + case 2: + clone.hours(Math.round(clone.hours() / 24) * 24);break; + default: + clone.hours(Math.round(clone.hours() / 12) * 12);break; + } + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'weekday') { + //noinspection FallthroughInSwitchStatementJS + switch (step) { + case 5: + case 2: + clone.hours(Math.round(clone.hours() / 12) * 12);break; + default: + clone.hours(Math.round(clone.hours() / 6) * 6);break; + } + clone.minutes(0); + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'hour') { + switch (step) { + case 4: + clone.minutes(Math.round(clone.minutes() / 60) * 60);break; + default: + clone.minutes(Math.round(clone.minutes() / 30) * 30);break; + } + clone.seconds(0); + clone.milliseconds(0); + } else if (scale == 'minute') { + //noinspection FallthroughInSwitchStatementJS + switch (step) { + case 15: + case 10: + clone.minutes(Math.round(clone.minutes() / 5) * 5); + clone.seconds(0); + break; + case 5: + clone.seconds(Math.round(clone.seconds() / 60) * 60);break; + default: + clone.seconds(Math.round(clone.seconds() / 30) * 30);break; + } + clone.milliseconds(0); + } else if (scale == 'second') { + //noinspection FallthroughInSwitchStatementJS + switch (step) { + case 15: + case 10: + clone.seconds(Math.round(clone.seconds() / 5) * 5); + clone.milliseconds(0); + break; + case 5: + clone.milliseconds(Math.round(clone.milliseconds() / 1000) * 1000);break; + default: + clone.milliseconds(Math.round(clone.milliseconds() / 500) * 500);break; + } + } else if (scale == 'millisecond') { + var _step = step > 5 ? step / 2 : 1; + clone.milliseconds(Math.round(clone.milliseconds() / _step) * _step); + } + + return clone; +}; + +/** + * Check if the current value is a major value (for example when the step + * is DAY, a major value is each first day of the MONTH) + * @return {boolean} true if current date is major, else false. + */ +TimeStep.prototype.isMajor = function () { + if (this.switchedYear == true) { + switch (this.scale) { + case 'year': + case 'month': + case 'week': + case 'weekday': + case 'day': + case 'hour': + case 'minute': + case 'second': + case 'millisecond': + return true; + default: + return false; + } + } else if (this.switchedMonth == true) { + switch (this.scale) { + case 'week': + case 'weekday': + case 'day': + case 'hour': + case 'minute': + case 'second': + case 'millisecond': + return true; + default: + return false; + } + } else if (this.switchedDay == true) { + switch (this.scale) { + case 'millisecond': + case 'second': + case 'minute': + case 'hour': + return true; + default: + return false; + } + } + + var date = this.moment(this.current); + switch (this.scale) { + case 'millisecond': + return date.milliseconds() == 0; + case 'second': + return date.seconds() == 0; + case 'minute': + return date.hours() == 0 && date.minutes() == 0; + case 'hour': + return date.hours() == 0; + case 'weekday': // intentional fall through + case 'day': + return date.date() == 1; + case 'week': + return date.date() == 1; + case 'month': + return date.month() == 0; + case 'year': + return false; + default: + return false; + } +}; + +/** + * Returns formatted text for the minor axislabel, depending on the current + * date and the scale. For example when scale is MINUTE, the current time is + * formatted as "hh:mm". + * @param {Date} [date=this.current] custom date. if not provided, current date is taken + * @returns {String} + */ +TimeStep.prototype.getLabelMinor = function (date) { + if (date == undefined) { + date = this.current; + } + if (date instanceof Date) { + date = this.moment(date); + } + + if (typeof this.format.minorLabels === "function") { + return this.format.minorLabels(date, this.scale, this.step); + } + + var format = this.format.minorLabels[this.scale]; + // noinspection FallThroughInSwitchStatementJS + switch (this.scale) { + case 'week': + if (this.isMajor() && date.weekday() !== 0) { + return ""; + } + default: + // eslint-disable-line no-fallthrough + return format && format.length > 0 ? this.moment(date).format(format) : ''; + } +}; + +/** + * Returns formatted text for the major axis label, depending on the current + * date and the scale. For example when scale is MINUTE, the major scale is + * hours, and the hour will be formatted as "hh". + * @param {Date} [date=this.current] custom date. if not provided, current date is taken + * @returns {String} + */ +TimeStep.prototype.getLabelMajor = function (date) { + if (date == undefined) { + date = this.current; + } + if (date instanceof Date) { + date = this.moment(date); + } + + if (typeof this.format.majorLabels === "function") { + return this.format.majorLabels(date, this.scale, this.step); + } + + var format = this.format.majorLabels[this.scale]; + return format && format.length > 0 ? this.moment(date).format(format) : ''; +}; + +TimeStep.prototype.getClassName = function () { + var _moment = this.moment; + var m = this.moment(this.current); + var current = m.locale ? m.locale('en') : m.lang('en'); // old versions of moment have .lang() function + var step = this.step; + var classNames = []; + + /** + * + * @param {number} value + * @returns {String} + */ + function even(value) { + return value / step % 2 == 0 ? ' vis-even' : ' vis-odd'; + } + + /** + * + * @param {Date} date + * @returns {String} + */ + function today(date) { + if (date.isSame(new Date(), 'day')) { + return ' vis-today'; + } + if (date.isSame(_moment().add(1, 'day'), 'day')) { + return ' vis-tomorrow'; + } + if (date.isSame(_moment().add(-1, 'day'), 'day')) { + return ' vis-yesterday'; + } + return ''; + } + + /** + * + * @param {Date} date + * @returns {String} + */ + function currentWeek(date) { + return date.isSame(new Date(), 'week') ? ' vis-current-week' : ''; + } + + /** + * + * @param {Date} date + * @returns {String} + */ + function currentMonth(date) { + return date.isSame(new Date(), 'month') ? ' vis-current-month' : ''; + } + + /** + * + * @param {Date} date + * @returns {String} + */ + function currentYear(date) { + return date.isSame(new Date(), 'year') ? ' vis-current-year' : ''; + } + + switch (this.scale) { + case 'millisecond': + classNames.push(today(current)); + classNames.push(even(current.milliseconds())); + break; + case 'second': + classNames.push(today(current)); + classNames.push(even(current.seconds())); + break; + case 'minute': + classNames.push(today(current)); + classNames.push(even(current.minutes())); + break; + case 'hour': + classNames.push('vis-h' + current.hours() + (this.step == 4 ? '-h' + (current.hours() + 4) : '')); + classNames.push(today(current)); + classNames.push(even(current.hours())); + break; + case 'weekday': + classNames.push('vis-' + current.format('dddd').toLowerCase()); + classNames.push(today(current)); + classNames.push(currentWeek(current)); + classNames.push(even(current.date())); + break; + case 'day': + classNames.push('vis-day' + current.date()); + classNames.push('vis-' + current.format('MMMM').toLowerCase()); + classNames.push(today(current)); + classNames.push(currentMonth(current)); + classNames.push(this.step <= 2 ? today(current) : ''); + classNames.push(this.step <= 2 ? 'vis-' + current.format('dddd').toLowerCase() : ''); + classNames.push(even(current.date() - 1)); + break; + case 'week': + classNames.push('vis-week' + current.format('w')); + classNames.push(currentWeek(current)); + classNames.push(even(current.week())); + break; + case 'month': + classNames.push('vis-' + current.format('MMMM').toLowerCase()); + classNames.push(currentMonth(current)); + classNames.push(even(current.month())); + break; + case 'year': + classNames.push('vis-year' + current.year()); + classNames.push(currentYear(current)); + classNames.push(even(current.year())); + break; + } + return classNames.filter(String).join(" "); +}; + +module.exports = TimeStep; + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(2); +var Component = __webpack_require__(16); +var moment = __webpack_require__(9); +var locales = __webpack_require__(98); + +/** + * A current time bar + * @param {{range: Range, dom: Object, domProps: Object}} body + * @param {Object} [options] Available parameters: + * {Boolean} [showCurrentTime] + * @constructor CurrentTime + * @extends Component + */ +function CurrentTime(body, options) { + this.body = body; + + // default options + this.defaultOptions = { + rtl: false, + showCurrentTime: true, + + moment: moment, + locales: locales, + locale: 'en' + }; + this.options = util.extend({}, this.defaultOptions); + this.offset = 0; + + this._create(); + + this.setOptions(options); +} + +CurrentTime.prototype = new Component(); + +/** + * Create the HTML DOM for the current time bar + * @private + */ +CurrentTime.prototype._create = function () { + var bar = document.createElement('div'); + bar.className = 'vis-current-time'; + bar.style.position = 'absolute'; + bar.style.top = '0px'; + bar.style.height = '100%'; + + this.bar = bar; +}; + +/** + * Destroy the CurrentTime bar + */ +CurrentTime.prototype.destroy = function () { + this.options.showCurrentTime = false; + this.redraw(); // will remove the bar from the DOM and stop refreshing + + this.body = null; +}; + +/** + * Set options for the component. Options will be merged in current options. + * @param {Object} options Available parameters: + * {boolean} [showCurrentTime] + */ +CurrentTime.prototype.setOptions = function (options) { + if (options) { + // copy all options that we know + util.selectiveExtend(['rtl', 'showCurrentTime', 'moment', 'locale', 'locales'], this.options, options); + } +}; + +/** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ +CurrentTime.prototype.redraw = function () { + if (this.options.showCurrentTime) { + var parent = this.body.dom.backgroundVertical; + if (this.bar.parentNode != parent) { + // attach to the dom + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); + } + parent.appendChild(this.bar); + + this.start(); + } + + var now = this.options.moment(new Date().valueOf() + this.offset); + var x = this.body.util.toScreen(now); + + var locale = this.options.locales[this.options.locale]; + if (!locale) { + if (!this.warned) { + console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline/#Localization'); + this.warned = true; + } + locale = this.options.locales['en']; // fall back on english when not available + } + var title = locale.current + ' ' + locale.time + ': ' + now.format('dddd, MMMM Do YYYY, H:mm:ss'); + title = title.charAt(0).toUpperCase() + title.substring(1); + + if (this.options.rtl) { + this.bar.style.right = x + 'px'; + } else { + this.bar.style.left = x + 'px'; + } + this.bar.title = title; + } else { + // remove the line from the DOM + if (this.bar.parentNode) { + this.bar.parentNode.removeChild(this.bar); + } + this.stop(); + } + + return false; +}; + +/** + * Start auto refreshing the current time bar + */ +CurrentTime.prototype.start = function () { + var me = this; + + /** + * Updates the current time. + */ + function update() { + me.stop(); + + // determine interval to refresh + var scale = me.body.range.conversion(me.body.domProps.center.width).scale; + var interval = 1 / scale / 10; + if (interval < 30) interval = 30; + if (interval > 1000) interval = 1000; + + me.redraw(); + me.body.emitter.emit('currentTimeTick'); + + // start a renderTimer to adjust for the new time + me.currentTimeTimer = setTimeout(update, interval); + } + + update(); +}; + +/** + * Stop auto refreshing the current time bar + */ +CurrentTime.prototype.stop = function () { + if (this.currentTimeTimer !== undefined) { + clearTimeout(this.currentTimeTimer); + delete this.currentTimeTimer; + } +}; + +/** + * Set a current time. This can be used for example to ensure that a client's + * time is synchronized with a shared server time. + * @param {Date | string | number} time A Date, unix timestamp, or + * ISO date string. + */ +CurrentTime.prototype.setCurrentTime = function (time) { + var t = util.convert(time, 'Date').valueOf(); + var now = new Date().valueOf(); + this.offset = t - now; + this.redraw(); +}; + +/** + * Get the current time. + * @return {Date} Returns the current time. + */ +CurrentTime.prototype.getCurrentTime = function () { + return new Date(new Date().valueOf() + this.offset); +}; + +module.exports = CurrentTime; + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var stack = __webpack_require__(100); + +/** + * @param {number | string} groupId + * @param {Object} data + * @param {ItemSet} itemSet + * @constructor Group + */ +function Group(groupId, data, itemSet) { + this.groupId = groupId; + this.subgroups = {}; + this.subgroupStack = {}; + this.subgroupStackAll = false; + this.doInnerStack = false; + this.subgroupIndex = 0; + this.subgroupOrderer = data && data.subgroupOrder; + this.itemSet = itemSet; + this.isVisible = null; + this.stackDirty = true; // if true, items will be restacked on next redraw + + if (data && data.nestedGroups) { + this.nestedGroups = data.nestedGroups; + if (data.showNested == false) { + this.showNested = false; + } else { + this.showNested = true; + } + } + + if (data && data.subgroupStack) { + if (typeof data.subgroupStack === "boolean") { + this.doInnerStack = data.subgroupStack; + this.subgroupStackAll = data.subgroupStack; + } else { + // We might be doing stacking on specific sub groups, but only + // if at least one is set to do stacking + for (var key in data.subgroupStack) { + this.subgroupStack[key] = data.subgroupStack[key]; + this.doInnerStack = this.doInnerStack || data.subgroupStack[key]; + } + } + } + + this.nestedInGroup = null; + + this.dom = {}; + this.props = { + label: { + width: 0, + height: 0 + } + }; + this.className = null; + + this.items = {}; // items filtered by groupId of this group + this.visibleItems = []; // items currently visible in window + this.itemsInRange = []; // items currently in range + this.orderedItems = { + byStart: [], + byEnd: [] + }; + this.checkRangedItems = false; // needed to refresh the ranged items if the window is programatically changed with NO overlap. + var me = this; + this.itemSet.body.emitter.on("checkRangedItems", function () { + me.checkRangedItems = true; + }); + + this._create(); + + this.setData(data); +} + +/** + * Create DOM elements for the group + * @private + */ +Group.prototype._create = function () { + var label = document.createElement('div'); + if (this.itemSet.options.groupEditable.order) { + label.className = 'vis-label draggable'; + } else { + label.className = 'vis-label'; + } + this.dom.label = label; + + var inner = document.createElement('div'); + inner.className = 'vis-inner'; + label.appendChild(inner); + this.dom.inner = inner; + + var foreground = document.createElement('div'); + foreground.className = 'vis-group'; + foreground['timeline-group'] = this; + this.dom.foreground = foreground; + + this.dom.background = document.createElement('div'); + this.dom.background.className = 'vis-group'; + + this.dom.axis = document.createElement('div'); + this.dom.axis.className = 'vis-group'; + + // create a hidden marker to detect when the Timelines container is attached + // to the DOM, or the style of a parent of the Timeline is changed from + // display:none is changed to visible. + this.dom.marker = document.createElement('div'); + this.dom.marker.style.visibility = 'hidden'; + this.dom.marker.style.position = 'absolute'; + this.dom.marker.innerHTML = ''; + this.dom.background.appendChild(this.dom.marker); +}; + +/** + * Set the group data for this group + * @param {Object} data Group data, can contain properties content and className + */ +Group.prototype.setData = function (data) { + // update contents + var content; + var templateFunction; + + if (this.itemSet.options && this.itemSet.options.groupTemplate) { + templateFunction = this.itemSet.options.groupTemplate.bind(this); + content = templateFunction(data, this.dom.inner); + } else { + content = data && data.content; + } + + if (content instanceof Element) { + this.dom.inner.appendChild(content); + while (this.dom.inner.firstChild) { + this.dom.inner.removeChild(this.dom.inner.firstChild); + } + this.dom.inner.appendChild(content); + } else if (content instanceof Object) { + templateFunction(data, this.dom.inner); + } else if (content !== undefined && content !== null) { + this.dom.inner.innerHTML = content; + } else { + this.dom.inner.innerHTML = this.groupId || ''; // groupId can be null + } + + // update title + this.dom.label.title = data && data.title || ''; + if (!this.dom.inner.firstChild) { + util.addClassName(this.dom.inner, 'vis-hidden'); + } else { + util.removeClassName(this.dom.inner, 'vis-hidden'); + } + + if (data && data.nestedGroups) { + if (!this.nestedGroups || this.nestedGroups != data.nestedGroups) { + this.nestedGroups = data.nestedGroups; + } + + if (data.showNested !== undefined || this.showNested === undefined) { + if (data.showNested == false) { + this.showNested = false; + } else { + this.showNested = true; + } + } + + util.addClassName(this.dom.label, 'vis-nesting-group'); + var collapsedDirClassName = this.itemSet.options.rtl ? 'collapsed-rtl' : 'collapsed'; + if (this.showNested) { + util.removeClassName(this.dom.label, collapsedDirClassName); + util.addClassName(this.dom.label, 'expanded'); + } else { + util.removeClassName(this.dom.label, 'expanded'); + util.addClassName(this.dom.label, collapsedDirClassName); + } + } else if (this.nestedGroups) { + this.nestedGroups = null; + collapsedDirClassName = this.itemSet.options.rtl ? 'collapsed-rtl' : 'collapsed'; + util.removeClassName(this.dom.label, collapsedDirClassName); + util.removeClassName(this.dom.label, 'expanded'); + util.removeClassName(this.dom.label, 'vis-nesting-group'); + } + + if (data && data.nestedInGroup) { + util.addClassName(this.dom.label, 'vis-nested-group'); + if (this.itemSet.options && this.itemSet.options.rtl) { + this.dom.inner.style.paddingRight = '30px'; + } else { + this.dom.inner.style.paddingLeft = '30px'; + } + } + + // update className + var className = data && data.className || null; + if (className != this.className) { + if (this.className) { + util.removeClassName(this.dom.label, this.className); + util.removeClassName(this.dom.foreground, this.className); + util.removeClassName(this.dom.background, this.className); + util.removeClassName(this.dom.axis, this.className); + } + util.addClassName(this.dom.label, className); + util.addClassName(this.dom.foreground, className); + util.addClassName(this.dom.background, className); + util.addClassName(this.dom.axis, className); + this.className = className; + } + + // update style + if (this.style) { + util.removeCssText(this.dom.label, this.style); + this.style = null; + } + if (data && data.style) { + util.addCssText(this.dom.label, data.style); + this.style = data.style; + } +}; + +/** + * Get the width of the group label + * @return {number} width + */ +Group.prototype.getLabelWidth = function () { + return this.props.label.width; +}; + +Group.prototype._didMarkerHeightChange = function () { + var markerHeight = this.dom.marker.clientHeight; + if (markerHeight != this.lastMarkerHeight) { + this.lastMarkerHeight = markerHeight; + var redrawQueue = {}; + var redrawQueueLength = 0; + + util.forEach(this.items, function (item, key) { + item.dirty = true; + if (item.displayed) { + var returnQueue = true; + redrawQueue[key] = item.redraw(returnQueue); + redrawQueueLength = redrawQueue[key].length; + } + }); + + var needRedraw = redrawQueueLength > 0; + if (needRedraw) { + // redraw all regular items + for (var i = 0; i < redrawQueueLength; i++) { + util.forEach(redrawQueue, function (fns) { + fns[i](); + }); + } + } + return true; + } +}; + +Group.prototype._calculateGroupSizeAndPosition = function () { + var offsetTop = this.dom.foreground.offsetTop; + var offsetLeft = this.dom.foreground.offsetLeft; + var offsetWidth = this.dom.foreground.offsetWidth; + this.top = offsetTop; + this.right = offsetLeft; + this.width = offsetWidth; +}; + +Group.prototype._redrawItems = function (forceRestack, lastIsVisible, margin, range) { + var restack = forceRestack || this.stackDirty || this.isVisible && !lastIsVisible; + + // if restacking, reposition visible items vertically + if (restack) { + var visibleSubgroups = {}; + var subgroup = null; + + if (typeof this.itemSet.options.order === 'function') { + // a custom order function + // brute force restack of all items + + // show all items + var me = this; + var limitSize = false; + + var redrawQueue = {}; + var redrawQueueLength = 0; + + util.forEach(this.items, function (item, key) { + if (!item.displayed) { + var returnQueue = true; + redrawQueue[key] = item.redraw(returnQueue); + redrawQueueLength = redrawQueue[key].length; + me.visibleItems.push(item); + } + }); + + var needRedraw = redrawQueueLength > 0; + if (needRedraw) { + // redraw all regular items + for (var i = 0; i < redrawQueueLength; i++) { + util.forEach(redrawQueue, function (fns) { + fns[i](); + }); + } + } + + util.forEach(this.items, function (item) { + item.repositionX(limitSize); + }); + + if (this.doInnerStack && this.itemSet.options.stackSubgroups) { + // Order the items within each subgroup + for (subgroup in this.subgroups) { + visibleSubgroups[subgroup] = this.subgroups[subgroup].items.slice().sort(function (a, b) { + return me.itemSet.options.order(a.data, b.data); + }); + } + + stack.stackSubgroupsWithInnerStack(visibleSubgroups, margin, this.subgroups); + } else { + // order all items and force a restacking + var customOrderedItems = this.orderedItems.byStart.slice().sort(function (a, b) { + return me.itemSet.options.order(a.data, b.data); + }); + stack.stack(customOrderedItems, margin, true /* restack=true */); + } + + this.visibleItems = this._updateItemsInRange(this.orderedItems, this.visibleItems, range); + } else { + // no custom order function, lazy stacking + this.visibleItems = this._updateItemsInRange(this.orderedItems, this.visibleItems, range); + + if (this.itemSet.options.stack) { + if (this.doInnerStack && this.itemSet.options.stackSubgroups) { + for (subgroup in this.subgroups) { + visibleSubgroups[subgroup] = this.subgroups[subgroup].items; + } + + stack.stackSubgroupsWithInnerStack(visibleSubgroups, margin, this.subgroups); + } else { + // TODO: ugly way to access options... + stack.stack(this.visibleItems, margin, true /* restack=true */); + } + } else { + // no stacking + stack.nostack(this.visibleItems, margin, this.subgroups, this.itemSet.options.stackSubgroups); + } + } + + this.stackDirty = false; + } +}; + +Group.prototype._didResize = function (resized, height) { + resized = util.updateProperty(this, 'height', height) || resized; + // recalculate size of label + var labelWidth = this.dom.inner.clientWidth; + var labelHeight = this.dom.inner.clientHeight; + resized = util.updateProperty(this.props.label, 'width', labelWidth) || resized; + resized = util.updateProperty(this.props.label, 'height', labelHeight) || resized; + return resized; +}; + +Group.prototype._applyGroupHeight = function (height) { + this.dom.background.style.height = height + 'px'; + this.dom.foreground.style.height = height + 'px'; + this.dom.label.style.height = height + 'px'; +}; + +// update vertical position of items after they are re-stacked and the height of the group is calculated +Group.prototype._updateItemsVerticalPosition = function (margin) { + for (var i = 0, ii = this.visibleItems.length; i < ii; i++) { + var item = this.visibleItems[i]; + item.repositionY(margin); + if (!this.isVisible && this.groupId != "__background__") { + if (item.displayed) item.hide(); + } + } +}; + +/** + * Repaint this group + * @param {{start: number, end: number}} range + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * @param {boolean} [forceRestack=false] Force restacking of all items + * @param {boolean} [returnQueue=false] return the queue or if the group resized + * @return {boolean} Returns true if the group is resized or the redraw queue if returnQueue=true + */ +Group.prototype.redraw = function (range, margin, forceRestack, returnQueue) { + var resized = false; + var lastIsVisible = this.isVisible; + var height; + + var queue = [ + // force recalculation of the height of the items when the marker height changed + // (due to the Timeline being attached to the DOM or changed from display:none to visible) + function () { + forceRestack = this._didMarkerHeightChange.bind(this); + }.bind(this), + + // recalculate the height of the subgroups + this._updateSubGroupHeights.bind(this, margin), + + // calculate actual size and position + this._calculateGroupSizeAndPosition.bind(this), + + // check if group is visible + function () { + this.isVisible = this._isGroupVisible.bind(this)(range, margin); + }.bind(this), + + // redraw Items if needed + function () { + this._redrawItems.bind(this)(forceRestack, lastIsVisible, margin, range); + }.bind(this), + + // update subgroups + this._updateSubgroupsSizes.bind(this), + + // recalculate the height of the group + function () { + height = this._calculateHeight.bind(this)(margin); + }.bind(this), + + // calculate actual size and position again + this._calculateGroupSizeAndPosition.bind(this), + + // check if resized + function () { + resized = this._didResize.bind(this)(resized, height); + }.bind(this), + + // apply group height + function () { + this._applyGroupHeight.bind(this)(height); + }.bind(this), + + // update vertical position of items after they are re-stacked and the height of the group is calculated + function () { + this._updateItemsVerticalPosition.bind(this)(margin); + }.bind(this), function () { + if (!this.isVisible && this.height) { + resized = false; + } + return resized; + }]; + + if (returnQueue) { + return queue; + } else { + var result; + queue.forEach(function (fn) { + result = fn(); + }); + return result; + } +}; + +/** + * recalculate the height of the subgroups + * + * @param {{item: vis.Item}} margin + * @private + */ +Group.prototype._updateSubGroupHeights = function (margin) { + if ((0, _keys2['default'])(this.subgroups).length > 0) { + var me = this; + + this.resetSubgroups(); + + util.forEach(this.visibleItems, function (item) { + if (item.data.subgroup !== undefined) { + me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height, item.height + margin.item.vertical); + me.subgroups[item.data.subgroup].visible = true; + } + }); + } +}; + +/** + * check if group is visible + * + * @param {vis.Range} range + * @param {{axis: vis.DataAxis}} margin + * @returns {boolean} is visible + * @private + */ +Group.prototype._isGroupVisible = function (range, margin) { + return this.top <= range.body.domProps.centerContainer.height - range.body.domProps.scrollTop + margin.axis && this.top + this.height + margin.axis >= -range.body.domProps.scrollTop; +}; + +/** + * recalculate the height of the group + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * @returns {number} Returns the height + * @private + */ +Group.prototype._calculateHeight = function (margin) { + // recalculate the height of the group + var height; + var itemsInRange = this.visibleItems; + if (itemsInRange.length > 0) { + var min = itemsInRange[0].top; + var max = itemsInRange[0].top + itemsInRange[0].height; + util.forEach(itemsInRange, function (item) { + min = Math.min(min, item.top); + max = Math.max(max, item.top + item.height); + }); + if (min > margin.axis) { + // there is an empty gap between the lowest item and the axis + var offset = min - margin.axis; + max -= offset; + util.forEach(itemsInRange, function (item) { + item.top -= offset; + }); + } + height = max + margin.item.vertical / 2; + } else { + height = 0; + } + height = Math.max(height, this.props.label.height); + + return height; +}; + +/** + * Show this group: attach to the DOM + */ +Group.prototype.show = function () { + if (!this.dom.label.parentNode) { + this.itemSet.dom.labelSet.appendChild(this.dom.label); + } + + if (!this.dom.foreground.parentNode) { + this.itemSet.dom.foreground.appendChild(this.dom.foreground); + } + + if (!this.dom.background.parentNode) { + this.itemSet.dom.background.appendChild(this.dom.background); + } + + if (!this.dom.axis.parentNode) { + this.itemSet.dom.axis.appendChild(this.dom.axis); + } +}; + +/** + * Hide this group: remove from the DOM + */ +Group.prototype.hide = function () { + var label = this.dom.label; + if (label.parentNode) { + label.parentNode.removeChild(label); + } + + var foreground = this.dom.foreground; + if (foreground.parentNode) { + foreground.parentNode.removeChild(foreground); + } + + var background = this.dom.background; + if (background.parentNode) { + background.parentNode.removeChild(background); + } + + var axis = this.dom.axis; + if (axis.parentNode) { + axis.parentNode.removeChild(axis); + } +}; + +/** + * Add an item to the group + * @param {Item} item + */ +Group.prototype.add = function (item) { + this.items[item.id] = item; + item.setParent(this); + this.stackDirty = true; + // add to + if (item.data.subgroup !== undefined) { + this._addToSubgroup(item); + this.orderSubgroups(); + } + + if (this.visibleItems.indexOf(item) == -1) { + var range = this.itemSet.body.range; // TODO: not nice accessing the range like this + this._checkIfVisible(item, this.visibleItems, range); + } +}; + +Group.prototype._addToSubgroup = function (item, subgroupId) { + subgroupId = subgroupId || item.data.subgroup; + if (subgroupId != undefined && this.subgroups[subgroupId] === undefined) { + this.subgroups[subgroupId] = { + height: 0, + top: 0, + start: item.data.start, + end: item.data.end || item.data.start, + visible: false, + index: this.subgroupIndex, + items: [], + stack: this.subgroupStackAll || this.subgroupStack[subgroupId] || false + }; + this.subgroupIndex++; + } + + if (new Date(item.data.start) < new Date(this.subgroups[subgroupId].start)) { + this.subgroups[subgroupId].start = item.data.start; + } + + var itemEnd = item.data.end || item.data.start; + if (new Date(itemEnd) > new Date(this.subgroups[subgroupId].end)) { + this.subgroups[subgroupId].end = itemEnd; + } + + this.subgroups[subgroupId].items.push(item); +}; + +Group.prototype._updateSubgroupsSizes = function () { + var me = this; + if (me.subgroups) { + for (var subgroup in me.subgroups) { + var initialEnd = me.subgroups[subgroup].items[0].data.end || me.subgroups[subgroup].items[0].data.start; + var newStart = me.subgroups[subgroup].items[0].data.start; + var newEnd = initialEnd - 1; + + me.subgroups[subgroup].items.forEach(function (item) { + if (new Date(item.data.start) < new Date(newStart)) { + newStart = item.data.start; + } + + var itemEnd = item.data.end || item.data.start; + if (new Date(itemEnd) > new Date(newEnd)) { + newEnd = itemEnd; + } + }); + + me.subgroups[subgroup].start = newStart; + me.subgroups[subgroup].end = new Date(newEnd - 1); // -1 to compensate for colliding end to start subgroups; + } + } +}; + +Group.prototype.orderSubgroups = function () { + if (this.subgroupOrderer !== undefined) { + var sortArray = []; + var subgroup; + if (typeof this.subgroupOrderer == 'string') { + for (subgroup in this.subgroups) { + sortArray.push({ subgroup: subgroup, sortField: this.subgroups[subgroup].items[0].data[this.subgroupOrderer] }); + } + sortArray.sort(function (a, b) { + return a.sortField - b.sortField; + }); + } else if (typeof this.subgroupOrderer == 'function') { + for (subgroup in this.subgroups) { + sortArray.push(this.subgroups[subgroup].items[0].data); + } + sortArray.sort(this.subgroupOrderer); + } + + if (sortArray.length > 0) { + for (var i = 0; i < sortArray.length; i++) { + this.subgroups[sortArray[i].subgroup].index = i; + } + } + } +}; + +Group.prototype.resetSubgroups = function () { + for (var subgroup in this.subgroups) { + if (this.subgroups.hasOwnProperty(subgroup)) { + this.subgroups[subgroup].visible = false; + this.subgroups[subgroup].height = 0; + } + } +}; + +/** + * Remove an item from the group + * @param {Item} item + */ +Group.prototype.remove = function (item) { + delete this.items[item.id]; + item.setParent(null); + this.stackDirty = true; + + // remove from visible items + var index = this.visibleItems.indexOf(item); + if (index != -1) this.visibleItems.splice(index, 1); + + if (item.data.subgroup !== undefined) { + this._removeFromSubgroup(item); + this.orderSubgroups(); + } +}; + +Group.prototype._removeFromSubgroup = function (item, subgroupId) { + subgroupId = subgroupId || item.data.subgroup; + if (subgroupId != undefined) { + var subgroup = this.subgroups[subgroupId]; + if (subgroup) { + var itemIndex = subgroup.items.indexOf(item); + // Check the item is actually in this subgroup. How should items not in the group be handled? + if (itemIndex >= 0) { + subgroup.items.splice(itemIndex, 1); + if (!subgroup.items.length) { + delete this.subgroups[subgroupId]; + } else { + this._updateSubgroupsSizes(); + } + } + } + } +}; + +/** + * Remove an item from the corresponding DataSet + * @param {Item} item + */ +Group.prototype.removeFromDataSet = function (item) { + this.itemSet.removeItem(item.id); +}; + +/** + * Reorder the items + */ +Group.prototype.order = function () { + var array = util.toArray(this.items); + var startArray = []; + var endArray = []; + + for (var i = 0; i < array.length; i++) { + if (array[i].data.end !== undefined) { + endArray.push(array[i]); + } + startArray.push(array[i]); + } + this.orderedItems = { + byStart: startArray, + byEnd: endArray + }; + + stack.orderByStart(this.orderedItems.byStart); + stack.orderByEnd(this.orderedItems.byEnd); +}; + +/** + * Update the visible items + * @param {{byStart: Item[], byEnd: Item[]}} orderedItems All items ordered by start date and by end date + * @param {Item[]} oldVisibleItems The previously visible items. + * @param {{start: number, end: number}} range Visible range + * @return {Item[]} visibleItems The new visible items. + * @private + */ +Group.prototype._updateItemsInRange = function (orderedItems, oldVisibleItems, range) { + var visibleItems = []; + var visibleItemsLookup = {}; // we keep this to quickly look up if an item already exists in the list without using indexOf on visibleItems + + var interval = (range.end - range.start) / 4; + var lowerBound = range.start - interval; + var upperBound = range.end + interval; + + // this function is used to do the binary search. + var searchFunction = function searchFunction(value) { + if (value < lowerBound) { + return -1; + } else if (value <= upperBound) { + return 0; + } else { + return 1; + } + }; + + // first check if the items that were in view previously are still in view. + // IMPORTANT: this handles the case for the items with startdate before the window and enddate after the window! + // also cleans up invisible items. + if (oldVisibleItems.length > 0) { + for (var i = 0; i < oldVisibleItems.length; i++) { + this._checkIfVisibleWithReference(oldVisibleItems[i], visibleItems, visibleItemsLookup, range); + } + } + + // we do a binary search for the items that have only start values. + var initialPosByStart = util.binarySearchCustom(orderedItems.byStart, searchFunction, 'data', 'start'); + + // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the start values. + this._traceVisible(initialPosByStart, orderedItems.byStart, visibleItems, visibleItemsLookup, function (item) { + return item.data.start < lowerBound || item.data.start > upperBound; + }); + + // if the window has changed programmatically without overlapping the old window, the ranged items with start < lowerBound and end > upperbound are not shown. + // We therefore have to brute force check all items in the byEnd list + if (this.checkRangedItems == true) { + this.checkRangedItems = false; + for (i = 0; i < orderedItems.byEnd.length; i++) { + this._checkIfVisibleWithReference(orderedItems.byEnd[i], visibleItems, visibleItemsLookup, range); + } + } else { + // we do a binary search for the items that have defined end times. + var initialPosByEnd = util.binarySearchCustom(orderedItems.byEnd, searchFunction, 'data', 'end'); + + // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the end values. + this._traceVisible(initialPosByEnd, orderedItems.byEnd, visibleItems, visibleItemsLookup, function (item) { + return item.data.end < lowerBound || item.data.end > upperBound; + }); + } + + var redrawQueue = {}; + var redrawQueueLength = 0; + + for (i = 0; i < visibleItems.length; i++) { + var item = visibleItems[i]; + if (!item.displayed) { + var returnQueue = true; + redrawQueue[i] = item.redraw(returnQueue); + redrawQueueLength = redrawQueue[i].length; + } + } + + var needRedraw = redrawQueueLength > 0; + if (needRedraw) { + // redraw all regular items + for (var j = 0; j < redrawQueueLength; j++) { + util.forEach(redrawQueue, function (fns) { + fns[j](); + }); + } + } + + for (i = 0; i < visibleItems.length; i++) { + visibleItems[i].repositionX(); + } + return visibleItems; +}; + +Group.prototype._traceVisible = function (initialPos, items, visibleItems, visibleItemsLookup, breakCondition) { + if (initialPos != -1) { + var i, item; + for (i = initialPos; i >= 0; i--) { + item = items[i]; + if (breakCondition(item)) { + break; + } else { + if (visibleItemsLookup[item.id] === undefined) { + visibleItemsLookup[item.id] = true; + visibleItems.push(item); + } + } + } + + for (i = initialPos + 1; i < items.length; i++) { + item = items[i]; + if (breakCondition(item)) { + break; + } else { + if (visibleItemsLookup[item.id] === undefined) { + visibleItemsLookup[item.id] = true; + visibleItems.push(item); + } + } + } + } +}; + +/** + * this function is very similar to the _checkIfInvisible() but it does not + * return booleans, hides the item if it should not be seen and always adds to + * the visibleItems. + * this one is for brute forcing and hiding. + * + * @param {Item} item + * @param {Array} visibleItems + * @param {{start:number, end:number}} range + * @private + */ +Group.prototype._checkIfVisible = function (item, visibleItems, range) { + if (item.isVisible(range)) { + if (!item.displayed) item.show(); + // reposition item horizontally + item.repositionX(); + visibleItems.push(item); + } else { + if (item.displayed) item.hide(); + } +}; + +/** + * this function is very similar to the _checkIfInvisible() but it does not + * return booleans, hides the item if it should not be seen and always adds to + * the visibleItems. + * this one is for brute forcing and hiding. + * + * @param {Item} item + * @param {Array.} visibleItems + * @param {Object} visibleItemsLookup + * @param {{start:number, end:number}} range + * @private + */ +Group.prototype._checkIfVisibleWithReference = function (item, visibleItems, visibleItemsLookup, range) { + if (item.isVisible(range)) { + if (visibleItemsLookup[item.id] === undefined) { + visibleItemsLookup[item.id] = true; + visibleItems.push(item); + } + } else { + if (item.displayed) item.hide(); + } +}; + +Group.prototype.changeSubgroup = function (item, oldSubgroup, newSubgroup) { + this._removeFromSubgroup(item, oldSubgroup); + this._addToSubgroup(item, newSubgroup); + this.orderSubgroups(); +}; + +module.exports = Group; + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _create = __webpack_require__(29); + +var _create2 = _interopRequireDefault(_create); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Group = __webpack_require__(68); + +/** + * @constructor BackgroundGroup + * @param {number | string} groupId + * @param {Object} data + * @param {ItemSet} itemSet + * @extends Group + */ +function BackgroundGroup(groupId, data, itemSet) { + Group.call(this, groupId, data, itemSet); + + this.width = 0; + this.height = 0; + this.top = 0; + this.left = 0; +} + +BackgroundGroup.prototype = (0, _create2['default'])(Group.prototype); + +/** + * Repaint this group + * @param {{start: number, end: number}} range + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * @param {boolean} [forceRestack=false] Force restacking of all items + * @return {boolean} Returns true if the group is resized + */ +BackgroundGroup.prototype.redraw = function (range, margin, forceRestack) { + // eslint-disable-line no-unused-vars + var resized = false; + + this.visibleItems = this._updateItemsInRange(this.orderedItems, this.visibleItems, range); + + // calculate actual size + this.width = this.dom.background.offsetWidth; + + // apply new height (just always zero for BackgroundGroup + this.dom.background.style.height = '0'; + + // update vertical position of items after they are re-stacked and the height of the group is calculated + for (var i = 0, ii = this.visibleItems.length; i < ii; i++) { + var item = this.visibleItems[i]; + item.repositionY(margin); + } + + return resized; +}; + +/** + * Show this group: attach to the DOM + */ +BackgroundGroup.prototype.show = function () { + if (!this.dom.background.parentNode) { + this.itemSet.dom.background.appendChild(this.dom.background); + } +}; + +module.exports = BackgroundGroup; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Item = __webpack_require__(38); + +/** + * @constructor RangeItem + * @extends Item + * @param {Object} data Object containing parameters start, end + * content, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} [options] Configuration options + * // TODO: describe options + */ +function RangeItem(data, conversion, options) { + this.props = { + content: { + width: 0 + } + }; + this.overflow = false; // if contents can overflow (css styling), this flag is set to true + this.options = options; + // validate data + if (data) { + if (data.start == undefined) { + throw new Error('Property "start" missing in item ' + data.id); + } + if (data.end == undefined) { + throw new Error('Property "end" missing in item ' + data.id); + } + } + + Item.call(this, data, conversion, options); +} + +RangeItem.prototype = new Item(null, null, null); + +RangeItem.prototype.baseClassName = 'vis-item vis-range'; + +/** + * Check whether this item is visible inside given range + * + * @param {vis.Range} range with a timestamp for start and end + * @returns {boolean} True if visible + */ +RangeItem.prototype.isVisible = function (range) { + // determine visibility + return this.data.start < range.end && this.data.end > range.start; +}; + +RangeItem.prototype._createDomElement = function () { + if (!this.dom) { + // create DOM + this.dom = {}; + + // background box + this.dom.box = document.createElement('div'); + // className is updated in redraw() + + // frame box (to prevent the item contents from overflowing) + this.dom.frame = document.createElement('div'); + this.dom.frame.className = 'vis-item-overflow'; + this.dom.box.appendChild(this.dom.frame); + + // visible frame box (showing the frame that is always visible) + this.dom.visibleFrame = document.createElement('div'); + this.dom.visibleFrame.className = 'vis-item-visible-frame'; + this.dom.box.appendChild(this.dom.visibleFrame); + + // contents box + this.dom.content = document.createElement('div'); + this.dom.content.className = 'vis-item-content'; + this.dom.frame.appendChild(this.dom.content); + + // attach this item as attribute + this.dom.box['timeline-item'] = this; + + this.dirty = true; + } +}; + +RangeItem.prototype._appendDomElement = function () { + if (!this.parent) { + throw new Error('Cannot redraw item: no parent attached'); + } + if (!this.dom.box.parentNode) { + var foreground = this.parent.dom.foreground; + if (!foreground) { + throw new Error('Cannot redraw item: parent has no foreground container element'); + } + foreground.appendChild(this.dom.box); + } + this.displayed = true; +}; + +RangeItem.prototype._updateDirtyDomComponents = function () { + // update dirty DOM. An item is marked dirty when: + // - the item is not yet rendered + // - the item's data is changed + // - the item is selected/deselected + if (this.dirty) { + this._updateContents(this.dom.content); + this._updateDataAttributes(this.dom.box); + this._updateStyle(this.dom.box); + + var editable = this.editable.updateTime || this.editable.updateGroup; + + // update class + var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); + this.dom.box.className = this.baseClassName + className; + + // turn off max-width to be able to calculate the real width + // this causes an extra browser repaint/reflow, but so be it + this.dom.content.style.maxWidth = 'none'; + } +}; + +RangeItem.prototype._getDomComponentsSizes = function () { + // determine from css whether this box has overflow + this.overflow = window.getComputedStyle(this.dom.frame).overflow !== 'hidden'; + return { + content: { + width: this.dom.content.offsetWidth + }, + box: { + height: this.dom.box.offsetHeight + } + }; +}; + +RangeItem.prototype._updateDomComponentsSizes = function (sizes) { + this.props.content.width = sizes.content.width; + this.height = sizes.box.height; + this.dom.content.style.maxWidth = ''; + this.dirty = false; +}; + +RangeItem.prototype._repaintDomAdditionals = function () { + this._repaintOnItemUpdateTimeTooltip(this.dom.box); + this._repaintDeleteButton(this.dom.box); + this._repaintDragCenter(); + this._repaintDragLeft(); + this._repaintDragRight(); +}; + +/** + * Repaint the item + * @param {boolean} [returnQueue=false] return the queue + * @return {boolean} the redraw queue if returnQueue=true + */ +RangeItem.prototype.redraw = function (returnQueue) { + var sizes; + var queue = [ + // create item DOM + this._createDomElement.bind(this), + + // append DOM to parent DOM + this._appendDomElement.bind(this), + + // update dirty DOM + this._updateDirtyDomComponents.bind(this), function () { + if (this.dirty) { + sizes = this._getDomComponentsSizes.bind(this)(); + } + }.bind(this), function () { + if (this.dirty) { + this._updateDomComponentsSizes.bind(this)(sizes); + } + }.bind(this), + + // repaint DOM additionals + this._repaintDomAdditionals.bind(this)]; + + if (returnQueue) { + return queue; + } else { + var result; + queue.forEach(function (fn) { + result = fn(); + }); + return result; + } +}; + +/** + * Show the item in the DOM (when not already visible). The items DOM will + * be created when needed. + */ +RangeItem.prototype.show = function () { + if (!this.displayed) { + this.redraw(); + } +}; + +/** + * Hide the item from the DOM (when visible) + */ +RangeItem.prototype.hide = function () { + if (this.displayed) { + var box = this.dom.box; + + if (box.parentNode) { + box.parentNode.removeChild(box); + } + + this.displayed = false; + } +}; + +/** + * Reposition the item horizontally + * @param {boolean} [limitSize=true] If true (default), the width of the range + * item will be limited, as the browser cannot + * display very wide divs. This means though + * that the applied left and width may + * not correspond to the ranges start and end + * @Override + */ +RangeItem.prototype.repositionX = function (limitSize) { + var parentWidth = this.parent.width; + var start = this.conversion.toScreen(this.data.start); + var end = this.conversion.toScreen(this.data.end); + var align = this.data.align === undefined ? this.options.align : this.data.align; + var contentStartPosition; + var contentWidth; + + // limit the width of the range, as browsers cannot draw very wide divs + // unless limitSize: false is explicitly set in item data + if (this.data.limitSize !== false && (limitSize === undefined || limitSize === true)) { + if (start < -parentWidth) { + start = -parentWidth; + } + if (end > 2 * parentWidth) { + end = 2 * parentWidth; + } + } + + // add 0.5 to compensate floating-point values rounding + var boxWidth = Math.max(end - start + 0.5, 1); + + if (this.overflow) { + if (this.options.rtl) { + this.right = start; + } else { + this.left = start; + } + this.width = boxWidth + this.props.content.width; + contentWidth = this.props.content.width; + + // Note: The calculation of width is an optimistic calculation, giving + // a width which will not change when moving the Timeline + // So no re-stacking needed, which is nicer for the eye; + } else { + if (this.options.rtl) { + this.right = start; + } else { + this.left = start; + } + this.width = boxWidth; + contentWidth = Math.min(end - start, this.props.content.width); + } + + if (this.options.rtl) { + this.dom.box.style.right = this.right + 'px'; + } else { + this.dom.box.style.left = this.left + 'px'; + } + this.dom.box.style.width = boxWidth + 'px'; + + switch (align) { + case 'left': + if (this.options.rtl) { + this.dom.content.style.right = '0'; + } else { + this.dom.content.style.left = '0'; + } + break; + + case 'right': + if (this.options.rtl) { + this.dom.content.style.right = Math.max(boxWidth - contentWidth, 0) + 'px'; + } else { + this.dom.content.style.left = Math.max(boxWidth - contentWidth, 0) + 'px'; + } + break; + + case 'center': + if (this.options.rtl) { + this.dom.content.style.right = Math.max((boxWidth - contentWidth) / 2, 0) + 'px'; + } else { + this.dom.content.style.left = Math.max((boxWidth - contentWidth) / 2, 0) + 'px'; + } + + break; + + default: + // 'auto' + // when range exceeds left of the window, position the contents at the left of the visible area + if (this.overflow) { + if (end > 0) { + contentStartPosition = Math.max(-start, 0); + } else { + contentStartPosition = -contentWidth; // ensure it's not visible anymore + } + } else { + if (start < 0) { + contentStartPosition = -start; + } else { + contentStartPosition = 0; + } + } + if (this.options.rtl) { + this.dom.content.style.right = contentStartPosition + 'px'; + } else { + this.dom.content.style.left = contentStartPosition + 'px'; + this.dom.content.style.width = 'calc(100% - ' + contentStartPosition + 'px)'; + } + } +}; + +/** + * Reposition the item vertically + * @Override + */ +RangeItem.prototype.repositionY = function () { + var orientation = this.options.orientation.item; + var box = this.dom.box; + + if (orientation == 'top') { + box.style.top = this.top + 'px'; + } else { + box.style.top = this.parent.height - this.top - this.height + 'px'; + } +}; + +/** + * Repaint a drag area on the left side of the range when the range is selected + * @protected + */ +RangeItem.prototype._repaintDragLeft = function () { + if ((this.selected || this.options.itemsAlwaysDraggable.range) && this.options.editable.updateTime && !this.dom.dragLeft) { + // create and show drag area + var dragLeft = document.createElement('div'); + dragLeft.className = 'vis-drag-left'; + dragLeft.dragLeftItem = this; + + this.dom.box.appendChild(dragLeft); + this.dom.dragLeft = dragLeft; + } else if (!this.selected && !this.options.itemsAlwaysDraggable.range && this.dom.dragLeft) { + // delete drag area + if (this.dom.dragLeft.parentNode) { + this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft); + } + this.dom.dragLeft = null; + } +}; + +/** + * Repaint a drag area on the right side of the range when the range is selected + * @protected + */ +RangeItem.prototype._repaintDragRight = function () { + if ((this.selected || this.options.itemsAlwaysDraggable.range) && this.options.editable.updateTime && !this.dom.dragRight) { + // create and show drag area + var dragRight = document.createElement('div'); + dragRight.className = 'vis-drag-right'; + dragRight.dragRightItem = this; + + this.dom.box.appendChild(dragRight); + this.dom.dragRight = dragRight; + } else if (!this.selected && !this.options.itemsAlwaysDraggable.range && this.dom.dragRight) { + // delete drag area + if (this.dom.dragRight.parentNode) { + this.dom.dragRight.parentNode.removeChild(this.dom.dragRight); + } + this.dom.dragRight = null; + } +}; + +module.exports = RangeItem; + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(19); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); + +var ColorPicker = __webpack_require__(179)['default']; + +/** + * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options. + * Boolean options are recognised as Boolean + * Number options should be written as array: [default value, min value, max value, stepsize] + * Colors should be written as array: ['color', '#ffffff'] + * Strings with should be written as array: [option1, option2, option3, ..] + * + * The options are matched with their counterparts in each of the modules and the values used in the configuration are + */ + +var Configurator = function () { + /** + * @param {Object} parentModule | the location where parentModule.setOptions() can be called + * @param {Object} defaultContainer | the default container of the module + * @param {Object} configureOptions | the fully configured and predefined options set found in allOptions.js + * @param {number} pixelRatio | canvas pixel ratio + */ + function Configurator(parentModule, defaultContainer, configureOptions) { + var pixelRatio = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; + (0, _classCallCheck3['default'])(this, Configurator); + + this.parent = parentModule; + this.changedOptions = []; + this.container = defaultContainer; + this.allowCreation = false; + + this.options = {}; + this.initialized = false; + this.popupCounter = 0; + this.defaultOptions = { + enabled: false, + filter: true, + container: undefined, + showButton: true + }; + util.extend(this.options, this.defaultOptions); + + this.configureOptions = configureOptions; + this.moduleOptions = {}; + this.domElements = []; + this.popupDiv = {}; + this.popupLimit = 5; + this.popupHistory = {}; + this.colorPicker = new ColorPicker(pixelRatio); + this.wrapper = undefined; + } + + /** + * refresh all options. + * Because all modules parse their options by themselves, we just use their options. We copy them here. + * + * @param {Object} options + */ + + + (0, _createClass3['default'])(Configurator, [{ + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + // reset the popup history because the indices may have been changed. + this.popupHistory = {}; + this._removePopup(); + + var enabled = true; + if (typeof options === 'string') { + this.options.filter = options; + } else if (options instanceof Array) { + this.options.filter = options.join(); + } else if ((typeof options === 'undefined' ? 'undefined' : (0, _typeof3['default'])(options)) === 'object') { + if (options.container !== undefined) { + this.options.container = options.container; + } + if (options.filter !== undefined) { + this.options.filter = options.filter; + } + if (options.showButton !== undefined) { + this.options.showButton = options.showButton; + } + if (options.enabled !== undefined) { + enabled = options.enabled; + } + } else if (typeof options === 'boolean') { + this.options.filter = true; + enabled = options; + } else if (typeof options === 'function') { + this.options.filter = options; + enabled = true; + } + if (this.options.filter === false) { + enabled = false; + } + + this.options.enabled = enabled; + } + this._clean(); + } + + /** + * + * @param {Object} moduleOptions + */ + + }, { + key: 'setModuleOptions', + value: function setModuleOptions(moduleOptions) { + this.moduleOptions = moduleOptions; + if (this.options.enabled === true) { + this._clean(); + if (this.options.container !== undefined) { + this.container = this.options.container; + } + this._create(); + } + } + + /** + * Create all DOM elements + * @private + */ + + }, { + key: '_create', + value: function _create() { + var _this = this; + + this._clean(); + this.changedOptions = []; + + var filter = this.options.filter; + var counter = 0; + var show = false; + for (var option in this.configureOptions) { + if (this.configureOptions.hasOwnProperty(option)) { + this.allowCreation = false; + show = false; + if (typeof filter === 'function') { + show = filter(option, []); + show = show || this._handleObject(this.configureOptions[option], [option], true); + } else if (filter === true || filter.indexOf(option) !== -1) { + show = true; + } + + if (show !== false) { + this.allowCreation = true; + + // linebreak between categories + if (counter > 0) { + this._makeItem([]); + } + // a header for the category + this._makeHeader(option); + + // get the sub options + this._handleObject(this.configureOptions[option], [option]); + } + counter++; + } + } + + if (this.options.showButton === true) { + var generateButton = document.createElement('div'); + generateButton.className = 'vis-configuration vis-config-button'; + generateButton.innerHTML = 'generate options'; + generateButton.onclick = function () { + _this._printOptions(); + }; + generateButton.onmouseover = function () { + generateButton.className = 'vis-configuration vis-config-button hover'; + }; + generateButton.onmouseout = function () { + generateButton.className = 'vis-configuration vis-config-button'; + }; + + this.optionsContainer = document.createElement('div'); + this.optionsContainer.className = 'vis-configuration vis-config-option-container'; + + this.domElements.push(this.optionsContainer); + this.domElements.push(generateButton); + } + + this._push(); + //~ this.colorPicker.insertTo(this.container); + } + + /** + * draw all DOM elements on the screen + * @private + */ + + }, { + key: '_push', + value: function _push() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'vis-configuration-wrapper'; + this.container.appendChild(this.wrapper); + for (var i = 0; i < this.domElements.length; i++) { + this.wrapper.appendChild(this.domElements[i]); + } + + this._showPopupIfNeeded(); + } + + /** + * delete all DOM elements + * @private + */ + + }, { + key: '_clean', + value: function _clean() { + for (var i = 0; i < this.domElements.length; i++) { + this.wrapper.removeChild(this.domElements[i]); + } + + if (this.wrapper !== undefined) { + this.container.removeChild(this.wrapper); + this.wrapper = undefined; + } + this.domElements = []; + + this._removePopup(); + } + + /** + * get the value from the actualOptions if it exists + * @param {array} path | where to look for the actual option + * @returns {*} + * @private + */ + + }, { + key: '_getValue', + value: function _getValue(path) { + var base = this.moduleOptions; + for (var i = 0; i < path.length; i++) { + if (base[path[i]] !== undefined) { + base = base[path[i]]; + } else { + base = undefined; + break; + } + } + return base; + } + + /** + * all option elements are wrapped in an item + * @param {Array} path | where to look for the actual option + * @param {Array.} domElements + * @returns {number} + * @private + */ + + }, { + key: '_makeItem', + value: function _makeItem(path) { + if (this.allowCreation === true) { + var item = document.createElement('div'); + item.className = 'vis-configuration vis-config-item vis-config-s' + path.length; + + for (var _len = arguments.length, domElements = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + domElements[_key - 1] = arguments[_key]; + } + + domElements.forEach(function (element) { + item.appendChild(element); + }); + this.domElements.push(item); + return this.domElements.length; + } + return 0; + } + + /** + * header for major subjects + * @param {string} name + * @private + */ + + }, { + key: '_makeHeader', + value: function _makeHeader(name) { + var div = document.createElement('div'); + div.className = 'vis-configuration vis-config-header'; + div.innerHTML = name; + this._makeItem([], div); + } + + /** + * make a label, if it is an object label, it gets different styling. + * @param {string} name + * @param {array} path | where to look for the actual option + * @param {string} objectLabel + * @returns {HTMLElement} + * @private + */ + + }, { + key: '_makeLabel', + value: function _makeLabel(name, path) { + var objectLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var div = document.createElement('div'); + div.className = 'vis-configuration vis-config-label vis-config-s' + path.length; + if (objectLabel === true) { + div.innerHTML = '' + name + ':'; + } else { + div.innerHTML = name + ':'; + } + return div; + } + + /** + * make a dropdown list for multiple possible string optoins + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: '_makeDropdown', + value: function _makeDropdown(arr, value, path) { + var select = document.createElement('select'); + select.className = 'vis-configuration vis-config-select'; + var selectedValue = 0; + if (value !== undefined) { + if (arr.indexOf(value) !== -1) { + selectedValue = arr.indexOf(value); + } + } + + for (var i = 0; i < arr.length; i++) { + var option = document.createElement('option'); + option.value = arr[i]; + if (i === selectedValue) { + option.selected = 'selected'; + } + option.innerHTML = arr[i]; + select.appendChild(option); + } + + var me = this; + select.onchange = function () { + me._update(this.value, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + this._makeItem(path, label, select); + } + + /** + * make a range object for numeric options + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: '_makeRange', + value: function _makeRange(arr, value, path) { + var defaultValue = arr[0]; + var min = arr[1]; + var max = arr[2]; + var step = arr[3]; + var range = document.createElement('input'); + range.className = 'vis-configuration vis-config-range'; + try { + range.type = 'range'; // not supported on IE9 + range.min = min; + range.max = max; + } + // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + range.step = step; + + // set up the popup settings in case they are needed. + var popupString = ''; + var popupValue = 0; + + if (value !== undefined) { + var factor = 1.20; + if (value < 0 && value * factor < min) { + range.min = Math.ceil(value * factor); + popupValue = range.min; + popupString = 'range increased'; + } else if (value / factor < min) { + range.min = Math.ceil(value / factor); + popupValue = range.min; + popupString = 'range increased'; + } + if (value * factor > max && max !== 1) { + range.max = Math.ceil(value * factor); + popupValue = range.max; + popupString = 'range increased'; + } + range.value = value; + } else { + range.value = defaultValue; + } + + var input = document.createElement('input'); + input.className = 'vis-configuration vis-config-rangeinput'; + input.value = range.value; + + var me = this; + range.onchange = function () { + input.value = this.value;me._update(Number(this.value), path); + }; + range.oninput = function () { + input.value = this.value; + }; + + var label = this._makeLabel(path[path.length - 1], path); + var itemIndex = this._makeItem(path, label, range, input); + + // if a popup is needed AND it has not been shown for this value, show it. + if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) { + this.popupHistory[itemIndex] = popupValue; + this._setupPopup(popupString, itemIndex); + } + } + + /** + * prepare the popup + * @param {string} string + * @param {number} index + * @private + */ + + }, { + key: '_setupPopup', + value: function _setupPopup(string, index) { + var _this2 = this; + + if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) { + var div = document.createElement("div"); + div.id = "vis-configuration-popup"; + div.className = "vis-configuration-popup"; + div.innerHTML = string; + div.onclick = function () { + _this2._removePopup(); + }; + this.popupCounter += 1; + this.popupDiv = { html: div, index: index }; + } + } + + /** + * remove the popup from the dom + * @private + */ + + }, { + key: '_removePopup', + value: function _removePopup() { + if (this.popupDiv.html !== undefined) { + this.popupDiv.html.parentNode.removeChild(this.popupDiv.html); + clearTimeout(this.popupDiv.hideTimeout); + clearTimeout(this.popupDiv.deleteTimeout); + this.popupDiv = {}; + } + } + + /** + * Show the popup if it is needed. + * @private + */ + + }, { + key: '_showPopupIfNeeded', + value: function _showPopupIfNeeded() { + var _this3 = this; + + if (this.popupDiv.html !== undefined) { + var correspondingElement = this.domElements[this.popupDiv.index]; + var rect = correspondingElement.getBoundingClientRect(); + this.popupDiv.html.style.left = rect.left + "px"; + this.popupDiv.html.style.top = rect.top - 30 + "px"; // 30 is the height; + document.body.appendChild(this.popupDiv.html); + this.popupDiv.hideTimeout = setTimeout(function () { + _this3.popupDiv.html.style.opacity = 0; + }, 1500); + this.popupDiv.deleteTimeout = setTimeout(function () { + _this3._removePopup(); + }, 1800); + } + } + + /** + * make a checkbox for boolean options. + * @param {number} defaultValue + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: '_makeCheckbox', + value: function _makeCheckbox(defaultValue, value, path) { + var checkbox = document.createElement('input'); + checkbox.type = 'checkbox'; + checkbox.className = 'vis-configuration vis-config-checkbox'; + checkbox.checked = defaultValue; + if (value !== undefined) { + checkbox.checked = value; + if (value !== defaultValue) { + if ((typeof defaultValue === 'undefined' ? 'undefined' : (0, _typeof3['default'])(defaultValue)) === 'object') { + if (value !== defaultValue.enabled) { + this.changedOptions.push({ path: path, value: value }); + } + } else { + this.changedOptions.push({ path: path, value: value }); + } + } + } + + var me = this; + checkbox.onchange = function () { + me._update(this.checked, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + this._makeItem(path, label, checkbox); + } + + /** + * make a text input field for string options. + * @param {number} defaultValue + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: '_makeTextInput', + value: function _makeTextInput(defaultValue, value, path) { + var checkbox = document.createElement('input'); + checkbox.type = 'text'; + checkbox.className = 'vis-configuration vis-config-text'; + checkbox.value = value; + if (value !== defaultValue) { + this.changedOptions.push({ path: path, value: value }); + } + + var me = this; + checkbox.onchange = function () { + me._update(this.value, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + this._makeItem(path, label, checkbox); + } + + /** + * make a color field with a color picker for color fields + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: '_makeColorField', + value: function _makeColorField(arr, value, path) { + var _this4 = this; + + var defaultColor = arr[1]; + var div = document.createElement('div'); + value = value === undefined ? defaultColor : value; + + if (value !== 'none') { + div.className = 'vis-configuration vis-config-colorBlock'; + div.style.backgroundColor = value; + } else { + div.className = 'vis-configuration vis-config-colorBlock none'; + } + + value = value === undefined ? defaultColor : value; + div.onclick = function () { + _this4._showColorPicker(value, div, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + this._makeItem(path, label, div); + } + + /** + * used by the color buttons to call the color picker. + * @param {number} value + * @param {HTMLElement} div + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: '_showColorPicker', + value: function _showColorPicker(value, div, path) { + var _this5 = this; + + // clear the callback from this div + div.onclick = function () {}; + + this.colorPicker.insertTo(div); + this.colorPicker.show(); + + this.colorPicker.setColor(value); + this.colorPicker.setUpdateCallback(function (color) { + var colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')'; + div.style.backgroundColor = colorString; + _this5._update(colorString, path); + }); + + // on close of the colorpicker, restore the callback. + this.colorPicker.setCloseCallback(function () { + div.onclick = function () { + _this5._showColorPicker(value, div, path); + }; + }); + } + + /** + * parse an object and draw the correct items + * @param {Object} obj + * @param {array} [path=[]] | where to look for the actual option + * @param {boolean} [checkOnly=false] + * @returns {boolean} + * @private + */ + + }, { + key: '_handleObject', + value: function _handleObject(obj) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var checkOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var show = false; + var filter = this.options.filter; + var visibleInSet = false; + for (var subObj in obj) { + if (obj.hasOwnProperty(subObj)) { + show = true; + var item = obj[subObj]; + var newPath = util.copyAndExtendArray(path, subObj); + if (typeof filter === 'function') { + show = filter(subObj, path); + + // if needed we must go deeper into the object. + if (show === false) { + if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) { + this.allowCreation = false; + show = this._handleObject(item, newPath, true); + this.allowCreation = checkOnly === false; + } + } + } + + if (show !== false) { + visibleInSet = true; + var value = this._getValue(newPath); + + if (item instanceof Array) { + this._handleArray(item, value, newPath); + } else if (typeof item === 'string') { + this._makeTextInput(item, value, newPath); + } else if (typeof item === 'boolean') { + this._makeCheckbox(item, value, newPath); + } else if (item instanceof Object) { + // collapse the physics options that are not enabled + var draw = true; + if (path.indexOf('physics') !== -1) { + if (this.moduleOptions.physics.solver !== subObj) { + draw = false; + } + } + + if (draw === true) { + // initially collapse options with an disabled enabled option. + if (item.enabled !== undefined) { + var enabledPath = util.copyAndExtendArray(newPath, 'enabled'); + var enabledValue = this._getValue(enabledPath); + if (enabledValue === true) { + var label = this._makeLabel(subObj, newPath, true); + this._makeItem(newPath, label); + visibleInSet = this._handleObject(item, newPath) || visibleInSet; + } else { + this._makeCheckbox(item, enabledValue, newPath); + } + } else { + var _label = this._makeLabel(subObj, newPath, true); + this._makeItem(newPath, _label); + visibleInSet = this._handleObject(item, newPath) || visibleInSet; + } + } + } else { + console.error('dont know how to handle', item, subObj, newPath); + } + } + } + } + return visibleInSet; + } + + /** + * handle the array type of option + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: '_handleArray', + value: function _handleArray(arr, value, path) { + if (typeof arr[0] === 'string' && arr[0] === 'color') { + this._makeColorField(arr, value, path); + if (arr[1] !== value) { + this.changedOptions.push({ path: path, value: value }); + } + } else if (typeof arr[0] === 'string') { + this._makeDropdown(arr, value, path); + if (arr[0] !== value) { + this.changedOptions.push({ path: path, value: value }); + } + } else if (typeof arr[0] === 'number') { + this._makeRange(arr, value, path); + if (arr[0] !== value) { + this.changedOptions.push({ path: path, value: Number(value) }); + } + } + } + + /** + * called to update the network with the new settings. + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: '_update', + value: function _update(value, path) { + var options = this._constructOptions(value, path); + + if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) { + this.parent.body.emitter.emit("configChange", options); + } + this.initialized = true; + this.parent.setOptions(options); + } + + /** + * + * @param {string|Boolean} value + * @param {Array.} path + * @param {{}} optionsObj + * @returns {{}} + * @private + */ + + }, { + key: '_constructOptions', + value: function _constructOptions(value, path) { + var optionsObj = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + var pointer = optionsObj; + + // when dropdown boxes can be string or boolean, we typecast it into correct types + value = value === 'true' ? true : value; + value = value === 'false' ? false : value; + + for (var i = 0; i < path.length; i++) { + if (path[i] !== 'global') { + if (pointer[path[i]] === undefined) { + pointer[path[i]] = {}; + } + if (i !== path.length - 1) { + pointer = pointer[path[i]]; + } else { + pointer[path[i]] = value; + } + } + } + return optionsObj; + } + + /** + * @private + */ + + }, { + key: '_printOptions', + value: function _printOptions() { + var options = this.getOptions(); + this.optionsContainer.innerHTML = '
var options = ' + (0, _stringify2['default'])(options, null, 2) + '
'; + } + + /** + * + * @returns {{}} options + */ + + }, { + key: 'getOptions', + value: function getOptions() { + var options = {}; + for (var i = 0; i < this.changedOptions.length; i++) { + this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options); + } + return options; + } + }]); + return Configurator; +}(); + +exports['default'] = Configurator; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var DOMutil = __webpack_require__(14); + +/** + * + * @param {number | string} groupId + * @param {Object} options // TODO: Describe options + * + * @constructor Points + */ +function Points(groupId, options) {} // eslint-disable-line no-unused-vars + + +/** + * draw the data points + * + * @param {Array} dataset + * @param {GraphGroup} group + * @param {Object} framework | SVG DOM element + * @param {number} [offset] + */ +Points.draw = function (dataset, group, framework, offset) { + offset = offset || 0; + var callback = getCallback(framework, group); + + for (var i = 0; i < dataset.length; i++) { + if (!callback) { + // draw the point the simple way. + DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group), framework.svgElements, framework.svg, dataset[i].label); + } else { + var callbackResult = callback(dataset[i], group); // result might be true, false or an object + if (callbackResult === true || (typeof callbackResult === 'undefined' ? 'undefined' : (0, _typeof3['default'])(callbackResult)) === 'object') { + DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group, callbackResult), framework.svgElements, framework.svg, dataset[i].label); + } + } + } +}; + +Points.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); + + //Don't call callback on icon + DOMutil.drawPoint(x + 0.5 * iconWidth, y, getGroupTemplate(group), framework.svgElements, framework.svg); +}; + +/** + * + * @param {vis.Group} group + * @param {any} callbackResult + * @returns {{style: *, styles: (*|string), size: *, className: *}} + */ +function getGroupTemplate(group, callbackResult) { + callbackResult = typeof callbackResult === 'undefined' ? {} : callbackResult; + return { + style: callbackResult.style || group.options.drawPoints.style, + styles: callbackResult.styles || group.options.drawPoints.styles, + size: callbackResult.size || group.options.drawPoints.size, + className: callbackResult.className || group.className + }; +} + +/** + * + * @param {Object} framework | SVG DOM element + * @param {vis.Group} group + * @returns {function} + */ +function getCallback(framework, group) { + var callback = undefined; + // check for the graph2d onRender + if (framework.options && framework.options.drawPoints && framework.options.drawPoints.onRender && typeof framework.options.drawPoints.onRender == 'function') { + callback = framework.options.drawPoints.onRender; + } + + // override it with the group onRender if defined + if (group.group.options && group.group.options.drawPoints && group.group.options.drawPoints.onRender && typeof group.group.options.drawPoints.onRender == 'function') { + callback = group.group.options.drawPoints.onRender; + } + return callback; +} + +module.exports = Points; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _NodeBase2 = __webpack_require__(23); + +var _NodeBase3 = _interopRequireDefault(_NodeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * NOTE: This is a bad base class + * + * Child classes are: + * + * Image - uses *only* image methods + * Circle - uses *only* _drawRawCircle + * CircleImage - uses all + * + * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase + * Rename this to ImageBase + * Consolidate common code in Image and CircleImage to base class + * + * @extends NodeBase + */ +var CircleImageBase = function (_NodeBase) { + (0, _inherits3['default'])(CircleImageBase, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CircleImageBase(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, CircleImageBase); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (CircleImageBase.__proto__ || (0, _getPrototypeOf2['default'])(CircleImageBase)).call(this, options, body, labelModule)); + + _this.labelOffset = 0; + _this.selected = false; + return _this; + } + + /** + * + * @param {Object} options + * @param {Object} [imageObj] + * @param {Object} [imageObjAlt] + */ + + + (0, _createClass3['default'])(CircleImageBase, [{ + key: 'setOptions', + value: function setOptions(options, imageObj, imageObjAlt) { + this.options = options; + + if (!(imageObj === undefined && imageObjAlt === undefined)) { + this.setImages(imageObj, imageObjAlt); + } + } + + /** + * Set the images for this node. + * + * The images can be updated after the initial setting of options; + * therefore, this method needs to be reentrant. + * + * For correct working in error cases, it is necessary to properly set + * field 'nodes.brokenImage' in the options. + * + * @param {Image} imageObj required; main image to show for this node + * @param {Image|undefined} imageObjAlt optional; image to show when node is selected + */ + + }, { + key: 'setImages', + value: function setImages(imageObj, imageObjAlt) { + if (imageObjAlt && this.selected) { + this.imageObj = imageObjAlt; + this.imageObjAlt = imageObj; + } else { + this.imageObj = imageObj; + this.imageObjAlt = imageObjAlt; + } + } + + /** + * Set selection and switch between the base and the selected image. + * + * Do the switch only if imageObjAlt exists. + * + * @param {boolean} selected value of new selected state for current node + */ + + }, { + key: 'switchImages', + value: function switchImages(selected) { + var selection_changed = selected && !this.selected || !selected && this.selected; + this.selected = selected; // Remember new selection + + if (this.imageObjAlt !== undefined && selection_changed) { + var imageTmp = this.imageObj; + this.imageObj = this.imageObjAlt; + this.imageObjAlt = imageTmp; + } + } + + /** + * Adjust the node dimensions for a loaded image. + * + * Pre: this.imageObj is valid + */ + + }, { + key: '_resizeImage', + value: function _resizeImage() { + var width, height; + + if (this.options.shapeProperties.useImageSize === false) { + // Use the size property + var ratio_width = 1; + var ratio_height = 1; + + // Only calculate the proper ratio if both width and height not zero + if (this.imageObj.width && this.imageObj.height) { + if (this.imageObj.width > this.imageObj.height) { + ratio_width = this.imageObj.width / this.imageObj.height; + } else { + ratio_height = this.imageObj.height / this.imageObj.width; + } + } + + width = this.options.size * 2 * ratio_width; + height = this.options.size * 2 * ratio_height; + } else { + // Use the image size + width = this.imageObj.width; + height = this.imageObj.height; + } + + this.width = width; + this.height = height; + this.radius = 0.5 * this.width; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @private + */ + + }, { + key: '_drawRawCircle', + value: function _drawRawCircle(ctx, x, y, values) { + this.initContextForDraw(ctx, values); + ctx.circle(x, y, values.size); + this.performFill(ctx, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @private + */ + + }, { + key: '_drawImageAtPosition', + value: function _drawImageAtPosition(ctx, values) { + if (this.imageObj.width != 0) { + // draw the image + ctx.globalAlpha = 1.0; + + // draw shadow if enabled + this.enableShadow(ctx, values); + + var factor = 1; + if (this.options.shapeProperties.interpolation === true) { + factor = this.imageObj.width / this.width / this.body.view.scale; + } + + this.imageObj.drawImageAtPosition(ctx, factor, this.left, this.top, this.width, this.height); + + // disable shadows for other elements. + this.disableShadow(ctx, values); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: '_drawImageLabel', + value: function _drawImageLabel(ctx, x, y, selected, hover) { + var yLabel; + var offset = 0; + + if (this.height !== undefined) { + offset = this.height * 0.5; + var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover); + if (labelDimensions.lineCount >= 1) { + offset += labelDimensions.height / 2; + } + } + + yLabel = y + offset; + + if (this.options.label) { + this.labelOffset = offset; + } + this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging'); + } + }]); + return CircleImageBase; +}(_NodeBase3['default']); + +exports['default'] = CircleImageBase; + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(19); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _create = __webpack_require__(29); + +var _create2 = _interopRequireDefault(_create); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var Label = __webpack_require__(117)['default']; +var ComponentUtil = __webpack_require__(48)['default']; +var CubicBezierEdge = __webpack_require__(215)['default']; +var BezierEdgeDynamic = __webpack_require__(217)['default']; +var BezierEdgeStatic = __webpack_require__(218)['default']; +var StraightEdge = __webpack_require__(219)['default']; + +/** + * An edge connects two nodes and has a specific direction. + */ + +var Edge = function () { + /** + * @param {Object} options values specific to this edge, must contain at least 'from' and 'to' + * @param {Object} body shared state from Network instance + * @param {Object} globalOptions options from the EdgesHandler instance + * @param {Object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant + */ + function Edge(options, body, globalOptions, defaultOptions) { + (0, _classCallCheck3['default'])(this, Edge); + + if (body === undefined) { + throw new Error("No body provided"); + } + + // Since globalOptions is constant in values as well as reference, + // Following needs to be done only once. + + this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; + this.defaultOptions = defaultOptions; + this.body = body; + + // initialize variables + this.id = undefined; + this.fromId = undefined; + this.toId = undefined; + this.selected = false; + this.hover = false; + this.labelDirty = true; + + this.baseWidth = this.options.width; + this.baseFontSize = this.options.font.size; + + this.from = undefined; // a node + this.to = undefined; // a node + + this.edgeType = undefined; + + this.connected = false; + + this.labelModule = new Label(this.body, this.options, true /* It's an edge label */); + this.setOptions(options); + } + + /** + * Set or overwrite options for the edge + * @param {Object} options an object with options + * @returns {null|boolean} null if no options, boolean if date changed + */ + + + (0, _createClass3['default'])(Edge, [{ + key: 'setOptions', + value: function setOptions(options) { + if (!options) { + return; + } + + Edge.parseOptions(this.options, options, true, this.globalOptions); + + if (options.id !== undefined) { + this.id = options.id; + } + if (options.from !== undefined) { + this.fromId = options.from; + } + if (options.to !== undefined) { + this.toId = options.to; + } + if (options.title !== undefined) { + this.title = options.title; + } + if (options.value !== undefined) { + options.value = parseFloat(options.value); + } + + var pile = [options, this.options, this.defaultOptions]; + this.chooser = ComponentUtil.choosify('edge', pile); + + // update label Module + this.updateLabelModule(options); + + var dataChanged = this.updateEdgeType(); + + // if anything has been updates, reset the selection width and the hover width + this._setInteractionWidths(); + + // A node is connected when it has a from and to node that both exist in the network.body.nodes. + this.connect(); + + if (options.hidden !== undefined || options.physics !== undefined) { + dataChanged = true; + } + + return dataChanged; + } + + /** + * + * @param {Object} parentOptions + * @param {Object} newOptions + * @param {boolean} [allowDeletion=false] + * @param {Object} [globalOptions={}] + * @param {boolean} [copyFromGlobals=false] + */ + + }, { + key: 'getFormattingValues', + + + /** + * + * @returns {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} + */ + value: function getFormattingValues() { + var toArrow = this.options.arrows.to === true || this.options.arrows.to.enabled === true; + var fromArrow = this.options.arrows.from === true || this.options.arrows.from.enabled === true; + var middleArrow = this.options.arrows.middle === true || this.options.arrows.middle.enabled === true; + var inheritsColor = this.options.color.inherit; + var values = { + toArrow: toArrow, + toArrowScale: this.options.arrows.to.scaleFactor, + toArrowType: this.options.arrows.to.type, + middleArrow: middleArrow, + middleArrowScale: this.options.arrows.middle.scaleFactor, + middleArrowType: this.options.arrows.middle.type, + fromArrow: fromArrow, + fromArrowScale: this.options.arrows.from.scaleFactor, + fromArrowType: this.options.arrows.from.type, + arrowStrikethrough: this.options.arrowStrikethrough, + color: inheritsColor ? undefined : this.options.color.color, + inheritsColor: inheritsColor, + opacity: this.options.color.opacity, + hidden: this.options.hidden, + length: this.options.length, + shadow: this.options.shadow.enabled, + shadowColor: this.options.shadow.color, + shadowSize: this.options.shadow.size, + shadowX: this.options.shadow.x, + shadowY: this.options.shadow.y, + dashes: this.options.dashes, + width: this.options.width + }; + if (this.selected || this.hover) { + if (this.chooser === true) { + if (this.selected) { + var selectedWidth = this.options.selectionWidth; + if (typeof selectedWidth === 'function') { + values.width = selectedWidth(values.width); + } else if (typeof selectedWidth === 'number') { + values.width += selectedWidth; + } + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + values.color = this.options.color.highlight; + values.shadow = this.options.shadow.enabled; + } else if (this.hover) { + var hoverWidth = this.options.hoverWidth; + if (typeof hoverWidth === 'function') { + values.width = hoverWidth(values.width); + } else if (typeof hoverWidth === 'number') { + values.width += hoverWidth; + } + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + values.color = this.options.color.hover; + values.shadow = this.options.shadow.enabled; + } + } else if (typeof this.chooser === 'function') { + this.chooser(values, this.options.id, this.selected, this.hover); + if (values.color !== undefined) { + values.inheritsColor = false; + } + if (values.shadow === false) { + if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) { + values.shadow = true; + } + } + } + } else { + values.shadow = this.options.shadow.enabled; + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + } + return values; + } + + /** + * update the options in the label module + * + * @param {Object} options + */ + + }, { + key: 'updateLabelModule', + value: function updateLabelModule(options) { + var pile = [options, this.options, this.globalOptions, // Currently set global edge options + this.defaultOptions]; + + this.labelModule.update(this.options, pile); + + if (this.labelModule.baseSize !== undefined) { + this.baseFontSize = this.labelModule.baseSize; + } + } + + /** + * update the edge type, set the options + * @returns {boolean} + */ + + }, { + key: 'updateEdgeType', + value: function updateEdgeType() { + var smooth = this.options.smooth; + var dataChanged = false; + var changeInType = true; + if (this.edgeType !== undefined) { + if (this.edgeType instanceof BezierEdgeDynamic && smooth.enabled === true && smooth.type === 'dynamic' || this.edgeType instanceof CubicBezierEdge && smooth.enabled === true && smooth.type === 'cubicBezier' || this.edgeType instanceof BezierEdgeStatic && smooth.enabled === true && smooth.type !== 'dynamic' && smooth.type !== 'cubicBezier' || this.edgeType instanceof StraightEdge && smooth.type.enabled === false) { + changeInType = false; + } + if (changeInType === true) { + dataChanged = this.cleanup(); + } + } + if (changeInType === true) { + if (smooth.enabled === true) { + if (smooth.type === 'dynamic') { + dataChanged = true; + this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule); + } else if (smooth.type === 'cubicBezier') { + this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule); + } else { + this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule); + } + } else { + this.edgeType = new StraightEdge(this.options, this.body, this.labelModule); + } + } else { + // if nothing changes, we just set the options. + this.edgeType.setOptions(this.options); + } + return dataChanged; + } + + /** + * Connect an edge to its nodes + */ + + }, { + key: 'connect', + value: function connect() { + this.disconnect(); + + this.from = this.body.nodes[this.fromId] || undefined; + this.to = this.body.nodes[this.toId] || undefined; + this.connected = this.from !== undefined && this.to !== undefined; + + if (this.connected === true) { + this.from.attachEdge(this); + this.to.attachEdge(this); + } else { + if (this.from) { + this.from.detachEdge(this); + } + if (this.to) { + this.to.detachEdge(this); + } + } + + this.edgeType.connect(); + } + + /** + * Disconnect an edge from its nodes + */ + + }, { + key: 'disconnect', + value: function disconnect() { + if (this.from) { + this.from.detachEdge(this); + this.from = undefined; + } + if (this.to) { + this.to.detachEdge(this); + this.to = undefined; + } + + this.connected = false; + } + + /** + * get the title of this edge. + * @return {string} title The title of the edge, or undefined when no title + * has been set. + */ + + }, { + key: 'getTitle', + value: function getTitle() { + return this.title; + } + + /** + * check if this node is selecte + * @return {boolean} selected True if node is selected, else false + */ + + }, { + key: 'isSelected', + value: function isSelected() { + return this.selected; + } + + /** + * Retrieve the value of the edge. Can be undefined + * @return {number} value + */ + + }, { + key: 'getValue', + value: function getValue() { + return this.options.value; + } + + /** + * Adjust the value range of the edge. The edge will adjust it's width + * based on its value. + * @param {number} min + * @param {number} max + * @param {number} total + */ + + }, { + key: 'setValueRange', + value: function setValueRange(min, max, total) { + if (this.options.value !== undefined) { + var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value); + var widthDiff = this.options.scaling.max - this.options.scaling.min; + if (this.options.scaling.label.enabled === true) { + var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min; + this.options.font.size = this.options.scaling.label.min + scale * fontDiff; + } + this.options.width = this.options.scaling.min + scale * widthDiff; + } else { + this.options.width = this.baseWidth; + this.options.font.size = this.baseFontSize; + } + + this._setInteractionWidths(); + this.updateLabelModule(); + } + + /** + * + * @private + */ + + }, { + key: '_setInteractionWidths', + value: function _setInteractionWidths() { + if (typeof this.options.hoverWidth === 'function') { + this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width); + } else { + this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width; + } + if (typeof this.options.selectionWidth === 'function') { + this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width); + } else { + this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width; + } + } + + /** + * Redraw a edge + * Draw this edge in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: 'draw', + value: function draw(ctx) { + var values = this.getFormattingValues(); + if (values.hidden) { + return; + } + + // get the via node from the edge type + var viaNode = this.edgeType.getViaNode(); + var arrowData = {}; + + // restore edge targets to defaults + this.edgeType.fromPoint = this.edgeType.from; + this.edgeType.toPoint = this.edgeType.to; + + // from and to arrows give a different end point for edges. we set them here + if (values.fromArrow) { + arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover, values); + if (values.arrowStrikethrough === false) this.edgeType.fromPoint = arrowData.from.core; + } + if (values.toArrow) { + arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover, values); + if (values.arrowStrikethrough === false) this.edgeType.toPoint = arrowData.to.core; + } + + // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly. + if (values.middleArrow) { + arrowData.middle = this.edgeType.getArrowData(ctx, 'middle', viaNode, this.selected, this.hover, values); + } + + // draw everything + this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode); + this.drawArrows(ctx, arrowData, values); + this.drawLabel(ctx, viaNode); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} arrowData + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'drawArrows', + value: function drawArrows(ctx, arrowData, values) { + if (values.fromArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from); + } + if (values.middleArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle); + } + if (values.toArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Node} viaNode + */ + + }, { + key: 'drawLabel', + value: function drawLabel(ctx, viaNode) { + if (this.options.label !== undefined) { + // set style + var node1 = this.from; + var node2 = this.to; + + if (this.labelModule.differentState(this.selected, this.hover)) { + this.labelModule.getTextSize(ctx, this.selected, this.hover); + } + + if (node1.id != node2.id) { + this.labelModule.pointToSelf = false; + var point = this.edgeType.getPoint(0.5, viaNode); + ctx.save(); + + var rotationPoint = this._getRotation(ctx); + if (rotationPoint.angle != 0) { + ctx.translate(rotationPoint.x, rotationPoint.y); + ctx.rotate(rotationPoint.angle); + } + + // draw the label + this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover); + + /* + // Useful debug code: draw a border around the label + // This should **not** be enabled in production! + var size = this.labelModule.getSize();; // ;; intentional so lint catches it + ctx.strokeStyle = "#ff0000"; + ctx.strokeRect(size.left, size.top, size.width, size.height); + // End debug code + */ + + ctx.restore(); + } else { + // Ignore the orientations. + this.labelModule.pointToSelf = true; + var x, y; + var radius = this.options.selfReferenceSize; + if (node1.shape.width > node1.shape.height) { + x = node1.x + node1.shape.width * 0.5; + y = node1.y - radius; + } else { + x = node1.x + radius; + y = node1.y - node1.shape.height * 0.5; + } + point = this._pointOnCircle(x, y, radius, 0.125); + this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover); + } + } + } + + /** + * Determine all visual elements of this edge instance, in which the given + * point falls within the bounding shape. + * + * @param {point} point + * @returns {Array.} list with the items which are on the point + */ + + }, { + key: 'getItemsOnPoint', + value: function getItemsOnPoint(point) { + var ret = []; + + if (this.labelModule.visible()) { + var rotationPoint = this._getRotation(); + if (ComponentUtil.pointInRect(this.labelModule.getSize(), point, rotationPoint)) { + ret.push({ edgeId: this.id, labelId: 0 }); + } + } + + var obj = { + left: point.x, + top: point.y + }; + + if (this.isOverlappingWith(obj)) { + ret.push({ edgeId: this.id }); + } + + return ret; + } + + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top + * @return {boolean} True if location is located on the edge + */ + + }, { + key: 'isOverlappingWith', + value: function isOverlappingWith(obj) { + if (this.connected) { + var distMax = 10; + var xFrom = this.from.x; + var yFrom = this.from.y; + var xTo = this.to.x; + var yTo = this.to.y; + var xObj = obj.left; + var yObj = obj.top; + + var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj); + + return dist < distMax; + } else { + return false; + } + } + + /** + * Determine the rotation point, if any. + * + * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size + * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate + * @private + */ + + }, { + key: '_getRotation', + value: function _getRotation(ctx) { + var viaNode = this.edgeType.getViaNode(); + var point = this.edgeType.getPoint(0.5, viaNode); + + if (ctx !== undefined) { + this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y); + } + + var ret = { + x: point.x, + y: this.labelModule.size.yLine, + angle: 0 + }; + + if (!this.labelModule.visible()) { + return ret; // Don't even bother doing the atan2, there's nothing to draw + } + + if (this.options.font.align === "horizontal") { + return ret; // No need to calculate angle + } + + var dy = this.from.y - this.to.y; + var dx = this.from.x - this.to.x; + var angle = Math.atan2(dy, dx); // radians + + // rotate so that label is readable + if (angle < -1 && dx < 0 || angle > 0 && dx < 0) { + angle += Math.PI; + } + ret.angle = angle; + + return ret; + } + + /** + * Get a point on a circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {number} percentage Value between 0 (line start) and 1 (line end) + * @return {Object} point + * @private + */ + + }, { + key: '_pointOnCircle', + value: function _pointOnCircle(x, y, radius, percentage) { + var angle = percentage * 2 * Math.PI; + return { + x: x + radius * Math.cos(angle), + y: y - radius * Math.sin(angle) + }; + } + + /** + * Sets selected state to true + */ + + }, { + key: 'select', + value: function select() { + this.selected = true; + } + + /** + * Sets selected state to false + */ + + }, { + key: 'unselect', + value: function unselect() { + this.selected = false; + } + + /** + * cleans all required things on delete + * @returns {*} + */ + + }, { + key: 'cleanup', + value: function cleanup() { + return this.edgeType.cleanup(); + } + + /** + * Remove edge from the list and perform necessary cleanup. + */ + + }, { + key: 'remove', + value: function remove() { + this.cleanup(); + this.disconnect(); + delete this.body.edges[this.id]; + } + + /** + * Check if both connecting nodes exist + * @returns {boolean} + */ + + }, { + key: 'endPointsValid', + value: function endPointsValid() { + return this.body.nodes[this.fromId] !== undefined && this.body.nodes[this.toId] !== undefined; + } + }], [{ + key: 'parseOptions', + value: function parseOptions(parentOptions, newOptions) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var copyFromGlobals = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + + var fields = ['arrowStrikethrough', 'id', 'from', 'hidden', 'hoverWidth', 'labelHighlightBold', 'length', 'line', 'opacity', 'physics', 'scaling', 'selectionWidth', 'selfReferenceSize', 'to', 'title', 'value', 'width', 'font', 'chosen', 'widthConstraint']; + + // only deep extend the items in the field array. These do not have shorthand. + util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion); + + // Only copy label if it's a legal value. + if (ComponentUtil.isValidLabel(newOptions.label)) { + parentOptions.label = newOptions.label; + } else { + parentOptions.label = undefined; + } + + util.mergeOptions(parentOptions, newOptions, 'smooth', globalOptions); + util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions); + + if (newOptions.dashes !== undefined && newOptions.dashes !== null) { + parentOptions.dashes = newOptions.dashes; + } else if (allowDeletion === true && newOptions.dashes === null) { + parentOptions.dashes = (0, _create2['default'])(globalOptions.dashes); // this sets the pointer of the option back to the global option. + } + + // set the scaling newOptions + if (newOptions.scaling !== undefined && newOptions.scaling !== null) { + if (newOptions.scaling.min !== undefined) { + parentOptions.scaling.min = newOptions.scaling.min; + } + if (newOptions.scaling.max !== undefined) { + parentOptions.scaling.max = newOptions.scaling.max; + } + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling); + } else if (allowDeletion === true && newOptions.scaling === null) { + parentOptions.scaling = (0, _create2['default'])(globalOptions.scaling); // this sets the pointer of the option back to the global option. + } + + // handle multiple input cases for arrows + if (newOptions.arrows !== undefined && newOptions.arrows !== null) { + if (typeof newOptions.arrows === 'string') { + var arrows = newOptions.arrows.toLowerCase(); + parentOptions.arrows.to.enabled = arrows.indexOf("to") != -1; + parentOptions.arrows.middle.enabled = arrows.indexOf("middle") != -1; + parentOptions.arrows.from.enabled = arrows.indexOf("from") != -1; + } else if ((0, _typeof3['default'])(newOptions.arrows) === 'object') { + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', globalOptions.arrows); + } else { + throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:" + (0, _stringify2['default'])(newOptions.arrows)); + } + } else if (allowDeletion === true && newOptions.arrows === null) { + parentOptions.arrows = (0, _create2['default'])(globalOptions.arrows); // this sets the pointer of the option back to the global option. + } + + // handle multiple input cases for color + if (newOptions.color !== undefined && newOptions.color !== null) { + var fromColor = newOptions.color; + var toColor = parentOptions.color; + + // If passed, fill in values from default options - required in the case of no prototype bridging + if (copyFromGlobals) { + util.deepExtend(toColor, globalOptions.color, false, allowDeletion); + } else { + // Clear local properties - need to do it like this in order to retain prototype bridges + for (var i in toColor) { + if (toColor.hasOwnProperty(i)) { + delete toColor[i]; + } + } + } + + if (util.isString(toColor)) { + toColor.color = toColor; + toColor.highlight = toColor; + toColor.hover = toColor; + toColor.inherit = false; + if (fromColor.opacity === undefined) { + toColor.opacity = 1.0; // set default + } + } else { + var colorsDefined = false; + if (fromColor.color !== undefined) { + toColor.color = fromColor.color;colorsDefined = true; + } + if (fromColor.highlight !== undefined) { + toColor.highlight = fromColor.highlight;colorsDefined = true; + } + if (fromColor.hover !== undefined) { + toColor.hover = fromColor.hover;colorsDefined = true; + } + if (fromColor.inherit !== undefined) { + toColor.inherit = fromColor.inherit; + } + if (fromColor.opacity !== undefined) { + toColor.opacity = Math.min(1, Math.max(0, fromColor.opacity)); + } + + if (colorsDefined === true) { + toColor.inherit = false; + } else { + if (toColor.inherit === undefined) { + toColor.inherit = 'from'; // Set default + } + } + } + } else if (allowDeletion === true && newOptions.color === null) { + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options + } + + if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options + } + } + }]); + return Edge; +}(); + +exports['default'] = Edge; + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _EdgeBase2 = __webpack_require__(118); + +var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * The Base Class for all Bezier edges. Bezier curves are used to model smooth + * gradual curves in paths between nodes. + * + * @extends EdgeBase + */ +var BezierEdgeBase = function (_EdgeBase) { + (0, _inherits3['default'])(BezierEdgeBase, _EdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeBase(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, BezierEdgeBase); + return (0, _possibleConstructorReturn3['default'])(this, (BezierEdgeBase.__proto__ || (0, _getPrototypeOf2['default'])(BezierEdgeBase)).call(this, options, body, labelModule)); + } + + /** + * This function uses binary search to look for the point where the bezier curve crosses the border of the node. + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Node} viaNode + * @returns {*} + * @private + */ + + + (0, _createClass3['default'])(BezierEdgeBase, [{ + key: '_findBorderPositionBezier', + value: function _findBorderPositionBezier(nearNode, ctx) { + var viaNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._getViaCoordinates(); + + var maxIterations = 10; + var iteration = 0; + var low = 0; + var high = 1; + var pos, angle, distanceToBorder, distanceToPoint, difference; + var threshold = 0.2; + var node = this.to; + var from = false; + if (nearNode.id === this.from.id) { + node = this.from; + from = true; + } + + while (low <= high && iteration < maxIterations) { + var middle = (low + high) * 0.5; + + pos = this.getPoint(middle, viaNode); + angle = Math.atan2(node.y - pos.y, node.x - pos.x); + distanceToBorder = node.distanceToBorder(ctx, angle); + distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2)); + difference = distanceToBorder - distanceToPoint; + if (Math.abs(difference) < threshold) { + break; // found + } else if (difference < 0) { + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (from === false) { + low = middle; + } else { + high = middle; + } + } else { + if (from === false) { + high = middle; + } else { + low = middle; + } + } + + iteration++; + } + pos.t = middle; + + return pos; + } + + /** + * Calculate the distance between a point (x3,y3) and a line segment from + * (x1,y1) to (x2,y2). + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * @param {number} x1 from x + * @param {number} y1 from y + * @param {number} x2 to x + * @param {number} y2 to y + * @param {number} x3 point to check x + * @param {number} y3 point to check y + * @param {Node} via + * @returns {number} + * @private + */ + + }, { + key: '_getDistanceToBezierEdge', + value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { + // x3,y3 is the point + var minDistance = 1e9; + var distance = void 0; + var i = void 0, + t = void 0, + x = void 0, + y = void 0; + var lastX = x1; + var lastY = y1; + for (i = 1; i < 10; i++) { + t = 0.1 * i; + x = Math.pow(1 - t, 2) * x1 + 2 * t * (1 - t) * via.x + Math.pow(t, 2) * x2; + y = Math.pow(1 - t, 2) * y1 + 2 * t * (1 - t) * via.y + Math.pow(t, 2) * y2; + if (i > 0) { + distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3); + minDistance = distance < minDistance ? distance : minDistance; + } + lastX = x; + lastY = y; + } + + return minDistance; + } + + /** + * Draw a bezier curve between two nodes + * + * The method accepts zero, one or two control points. + * Passing zero control points just draws a straight line + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} values | options for shadow drawing + * @param {Object|undefined} viaNode1 | first control point for curve drawing + * @param {Object|undefined} viaNode2 | second control point for curve drawing + * + * @protected + */ + + }, { + key: '_bezierCurve', + value: function _bezierCurve(ctx, values, viaNode1, viaNode2) { + var hasNode1 = viaNode1 !== undefined && viaNode1.x !== undefined; + var hasNode2 = viaNode2 !== undefined && viaNode2.x !== undefined; + + ctx.beginPath(); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + + if (hasNode1 && hasNode2) { + ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y); + } else if (hasNode1) { + ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y); + } else { + // fallback to normal straight edge + ctx.lineTo(this.toPoint.x, this.toPoint.y); + } + + // draw shadow if enabled + this.enableShadow(ctx, values); + ctx.stroke(); + this.disableShadow(ctx, values); + } + + /** + * + * @returns {*|{x, y}|{x: undefined, y: undefined}} + */ + + }, { + key: 'getViaNode', + value: function getViaNode() { + return this._getViaCoordinates(); + } + }]); + return BezierEdgeBase; +}(_EdgeBase3['default']); + +exports['default'] = BezierEdgeBase; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var util = __webpack_require__(2); + +/** + * Utility Class + */ + +var NetworkUtil = function () { + /** + * @ignore + */ + function NetworkUtil() { + (0, _classCallCheck3["default"])(this, NetworkUtil); + } + + /** + * Find the center position of the network considering the bounding boxes + * + * @param {Array.} allNodes + * @param {Array.} [specificNodes=[]] + * @returns {{minX: number, maxX: number, minY: number, maxY: number}} + * @static + */ + + + (0, _createClass3["default"])(NetworkUtil, null, [{ + key: "getRange", + value: function getRange(allNodes) { + var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + var minY = 1e9, + maxY = -1e9, + minX = 1e9, + maxX = -1e9, + node; + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + if (minX > node.shape.boundingBox.left) { + minX = node.shape.boundingBox.left; + } + if (maxX < node.shape.boundingBox.right) { + maxX = node.shape.boundingBox.right; + } + if (minY > node.shape.boundingBox.top) { + minY = node.shape.boundingBox.top; + } // top is negative, bottom is positive + if (maxY < node.shape.boundingBox.bottom) { + maxY = node.shape.boundingBox.bottom; + } // top is negative, bottom is positive + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + return { minX: minX, maxX: maxX, minY: minY, maxY: maxY }; + } + + /** + * Find the center position of the network + * + * @param {Array.} allNodes + * @param {Array.} [specificNodes=[]] + * @returns {{minX: number, maxX: number, minY: number, maxY: number}} + * @static + */ + + }, { + key: "getRangeCore", + value: function getRangeCore(allNodes) { + var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + var minY = 1e9, + maxY = -1e9, + minX = 1e9, + maxX = -1e9, + node; + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + if (minX > node.x) { + minX = node.x; + } + if (maxX < node.x) { + maxX = node.x; + } + if (minY > node.y) { + minY = node.y; + } // top is negative, bottom is positive + if (maxY < node.y) { + maxY = node.y; + } // top is negative, bottom is positive + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + return { minX: minX, maxX: maxX, minY: minY, maxY: maxY }; + } + + /** + * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; + * @returns {{x: number, y: number}} + * @static + */ + + }, { + key: "findCenter", + value: function findCenter(range) { + return { x: 0.5 * (range.maxX + range.minX), + y: 0.5 * (range.maxY + range.minY) }; + } + + /** + * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes. + * @param {vis.Item} item + * @param {'node'|undefined} type + * @returns {{}} + * @static + */ + + }, { + key: "cloneOptions", + value: function cloneOptions(item, type) { + var clonedOptions = {}; + if (type === undefined || type === 'node') { + util.deepExtend(clonedOptions, item.options, true); + clonedOptions.x = item.x; + clonedOptions.y = item.y; + clonedOptions.amountOfConnections = item.edges.length; + } else { + util.deepExtend(clonedOptions, item.options, true); + } + return clonedOptions; + } + }]); + return NetworkUtil; +}(); + +exports["default"] = NetworkUtil; + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(124), __esModule: true }; + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(50); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(52); +var $export = __webpack_require__(17); +var redefine = __webpack_require__(83); +var hide = __webpack_require__(26); +var has = __webpack_require__(22); +var Iterators = __webpack_require__(31); +var $iterCreate = __webpack_require__(129); +var setToStringTag = __webpack_require__(59); +var getPrototypeOf = __webpack_require__(85); +var ITERATOR = __webpack_require__(13)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(128); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(21) && !__webpack_require__(28)(function () { + return Object.defineProperty(__webpack_require__(82)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(32); +var document = __webpack_require__(18).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(26); + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(22); +var toIObject = __webpack_require__(25); +var arrayIndexOf = __webpack_require__(131)(false); +var IE_PROTO = __webpack_require__(56)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(22); +var toObject = __webpack_require__(41); +var IE_PROTO = __webpack_require__(56)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(50); +var TAG = __webpack_require__(13)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(17); +var core = __webpack_require__(7); +var fails = __webpack_require__(28); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(84); +var hiddenKeys = __webpack_require__(58).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(42); +var createDesc = __webpack_require__(39); +var toIObject = __webpack_require__(25); +var toPrimitive = __webpack_require__(53); +var has = __webpack_require__(22); +var IE8_DOM_DEFINE = __webpack_require__(81); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(21) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(162), __esModule: true }; + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * @prototype Point2d + * @param {number} [x] + * @param {number} [y] + */ +function Point2d(x, y) { + this.x = x !== undefined ? x : 0; + this.y = y !== undefined ? y : 0; +} + +module.exports = Point2d; + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(2); + +/** + * An html slider control with start/stop/prev/next buttons + * + * @constructor Slider + * @param {Element} container The element where the slider will be created + * @param {Object} options Available options: + * {boolean} visible If true (default) the + * slider is visible. + */ +function Slider(container, options) { + if (container === undefined) { + throw new Error('No container element defined'); + } + this.container = container; + this.visible = options && options.visible != undefined ? options.visible : true; + + if (this.visible) { + this.frame = document.createElement('DIV'); + //this.frame.style.backgroundColor = '#E5E5E5'; + this.frame.style.width = '100%'; + this.frame.style.position = 'relative'; + this.container.appendChild(this.frame); + + this.frame.prev = document.createElement('INPUT'); + this.frame.prev.type = 'BUTTON'; + this.frame.prev.value = 'Prev'; + this.frame.appendChild(this.frame.prev); + + this.frame.play = document.createElement('INPUT'); + this.frame.play.type = 'BUTTON'; + this.frame.play.value = 'Play'; + this.frame.appendChild(this.frame.play); + + this.frame.next = document.createElement('INPUT'); + this.frame.next.type = 'BUTTON'; + this.frame.next.value = 'Next'; + this.frame.appendChild(this.frame.next); + + this.frame.bar = document.createElement('INPUT'); + this.frame.bar.type = 'BUTTON'; + this.frame.bar.style.position = 'absolute'; + this.frame.bar.style.border = '1px solid red'; + this.frame.bar.style.width = '100px'; + this.frame.bar.style.height = '6px'; + this.frame.bar.style.borderRadius = '2px'; + this.frame.bar.style.MozBorderRadius = '2px'; + this.frame.bar.style.border = '1px solid #7F7F7F'; + this.frame.bar.style.backgroundColor = '#E5E5E5'; + this.frame.appendChild(this.frame.bar); + + this.frame.slide = document.createElement('INPUT'); + this.frame.slide.type = 'BUTTON'; + this.frame.slide.style.margin = '0px'; + this.frame.slide.value = ' '; + this.frame.slide.style.position = 'relative'; + this.frame.slide.style.left = '-100px'; + this.frame.appendChild(this.frame.slide); + + // create events + var me = this; + this.frame.slide.onmousedown = function (event) { + me._onMouseDown(event); + }; + this.frame.prev.onclick = function (event) { + me.prev(event); + }; + this.frame.play.onclick = function (event) { + me.togglePlay(event); + }; + this.frame.next.onclick = function (event) { + me.next(event); + }; + } + + this.onChangeCallback = undefined; + + this.values = []; + this.index = undefined; + + this.playTimeout = undefined; + this.playInterval = 1000; // milliseconds + this.playLoop = true; +} + +/** + * Select the previous index + */ +Slider.prototype.prev = function () { + var index = this.getIndex(); + if (index > 0) { + index--; + this.setIndex(index); + } +}; + +/** + * Select the next index + */ +Slider.prototype.next = function () { + var index = this.getIndex(); + if (index < this.values.length - 1) { + index++; + this.setIndex(index); + } +}; + +/** + * Select the next index + */ +Slider.prototype.playNext = function () { + var start = new Date(); + + var index = this.getIndex(); + if (index < this.values.length - 1) { + index++; + this.setIndex(index); + } else if (this.playLoop) { + // jump to the start + index = 0; + this.setIndex(index); + } + + var end = new Date(); + var diff = end - start; + + // calculate how much time it to to set the index and to execute the callback + // function. + var interval = Math.max(this.playInterval - diff, 0); + // document.title = diff // TODO: cleanup + + var me = this; + this.playTimeout = setTimeout(function () { + me.playNext(); + }, interval); +}; + +/** + * Toggle start or stop playing + */ +Slider.prototype.togglePlay = function () { + if (this.playTimeout === undefined) { + this.play(); + } else { + this.stop(); + } +}; + +/** + * Start playing + */ +Slider.prototype.play = function () { + // Test whether already playing + if (this.playTimeout) return; + + this.playNext(); + + if (this.frame) { + this.frame.play.value = 'Stop'; + } +}; + +/** + * Stop playing + */ +Slider.prototype.stop = function () { + clearInterval(this.playTimeout); + this.playTimeout = undefined; + + if (this.frame) { + this.frame.play.value = 'Play'; + } +}; + +/** + * Set a callback function which will be triggered when the value of the + * slider bar has changed. + * + * @param {function} callback + */ +Slider.prototype.setOnChangeCallback = function (callback) { + this.onChangeCallback = callback; +}; + +/** + * Set the interval for playing the list + * @param {number} interval The interval in milliseconds + */ +Slider.prototype.setPlayInterval = function (interval) { + this.playInterval = interval; +}; + +/** + * Retrieve the current play interval + * @return {number} interval The interval in milliseconds + */ +Slider.prototype.getPlayInterval = function () { + return this.playInterval; +}; + +/** + * Set looping on or off + * @param {boolean} doLoop If true, the slider will jump to the start when + * the end is passed, and will jump to the end + * when the start is passed. + * + */ +Slider.prototype.setPlayLoop = function (doLoop) { + this.playLoop = doLoop; +}; + +/** + * Execute the onchange callback function + */ +Slider.prototype.onChange = function () { + if (this.onChangeCallback !== undefined) { + this.onChangeCallback(); + } +}; + +/** + * redraw the slider on the correct place + */ +Slider.prototype.redraw = function () { + if (this.frame) { + // resize the bar + this.frame.bar.style.top = this.frame.clientHeight / 2 - this.frame.bar.offsetHeight / 2 + 'px'; + this.frame.bar.style.width = this.frame.clientWidth - this.frame.prev.clientWidth - this.frame.play.clientWidth - this.frame.next.clientWidth - 30 + 'px'; + + // position the slider button + var left = this.indexToLeft(this.index); + this.frame.slide.style.left = left + 'px'; + } +}; + +/** + * Set the list with values for the slider + * @param {Array} values A javascript array with values (any type) + */ +Slider.prototype.setValues = function (values) { + this.values = values; + + if (this.values.length > 0) this.setIndex(0);else this.index = undefined; +}; + +/** + * Select a value by its index + * @param {number} index + */ +Slider.prototype.setIndex = function (index) { + if (index < this.values.length) { + this.index = index; + + this.redraw(); + this.onChange(); + } else { + throw new Error('Index out of range'); + } +}; + +/** + * retrieve the index of the currently selected vaue + * @return {number} index + */ +Slider.prototype.getIndex = function () { + return this.index; +}; + +/** + * retrieve the currently selected value + * @return {*} value + */ +Slider.prototype.get = function () { + return this.values[this.index]; +}; + +Slider.prototype._onMouseDown = function (event) { + // only react on left mouse button down + var leftButtonDown = event.which ? event.which === 1 : event.button === 1; + if (!leftButtonDown) return; + + this.startClientX = event.clientX; + this.startSlideX = parseFloat(this.frame.slide.style.left); + + this.frame.style.cursor = 'move'; + + // add event listeners to handle moving the contents + // we store the function onmousemove and onmouseup in the graph, so we can + // remove the eventlisteners lateron in the function mouseUp() + var me = this; + this.onmousemove = function (event) { + me._onMouseMove(event); + }; + this.onmouseup = function (event) { + me._onMouseUp(event); + }; + util.addEventListener(document, 'mousemove', this.onmousemove); + util.addEventListener(document, 'mouseup', this.onmouseup); + util.preventDefault(event); +}; + +Slider.prototype.leftToIndex = function (left) { + var width = parseFloat(this.frame.bar.style.width) - this.frame.slide.clientWidth - 10; + var x = left - 3; + + var index = Math.round(x / width * (this.values.length - 1)); + if (index < 0) index = 0; + if (index > this.values.length - 1) index = this.values.length - 1; + + return index; +}; + +Slider.prototype.indexToLeft = function (index) { + var width = parseFloat(this.frame.bar.style.width) - this.frame.slide.clientWidth - 10; + + var x = index / (this.values.length - 1) * width; + var left = x + 3; + + return left; +}; + +Slider.prototype._onMouseMove = function (event) { + var diff = event.clientX - this.startClientX; + var x = this.startSlideX + diff; + + var index = this.leftToIndex(x); + + this.setIndex(index); + + util.preventDefault(); +}; + +Slider.prototype._onMouseUp = function (event) { + // eslint-disable-line no-unused-vars + this.frame.style.cursor = 'auto'; + + // remove event listeners + util.removeEventListener(document, 'mousemove', this.onmousemove); + util.removeEventListener(document, 'mouseup', this.onmouseup); + + util.preventDefault(); +}; + +module.exports = Slider; + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * @prototype StepNumber + * The class StepNumber is an iterator for Numbers. You provide a start and end + * value, and a best step size. StepNumber itself rounds to fixed values and + * a finds the step that best fits the provided step. + * + * If prettyStep is true, the step size is chosen as close as possible to the + * provided step, but being a round value like 1, 2, 5, 10, 20, 50, .... + * + * Example usage: + * var step = new StepNumber(0, 10, 2.5, true); + * step.start(); + * while (!step.end()) { + * alert(step.getCurrent()); + * step.next(); + * } + * + * Version: 1.0 + * + * @param {number} start The start value + * @param {number} end The end value + * @param {number} step Optional. Step size. Must be a positive value. + * @param {boolean} prettyStep Optional. If true, the step size is rounded + * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...) + */ +function StepNumber(start, end, step, prettyStep) { + // set default values + this._start = 0; + this._end = 0; + this._step = 1; + this.prettyStep = true; + this.precision = 5; + + this._current = 0; + this.setRange(start, end, step, prettyStep); +} + +/** + * Check for input values, to prevent disasters from happening + * + * Source: http://stackoverflow.com/a/1830844 + * + * @param {string} n + * @returns {boolean} + */ +StepNumber.prototype.isNumeric = function (n) { + return !isNaN(parseFloat(n)) && isFinite(n); +}; + +/** + * Set a new range: start, end and step. + * + * @param {number} start The start value + * @param {number} end The end value + * @param {number} step Optional. Step size. Must be a positive value. + * @param {boolean} prettyStep Optional. If true, the step size is rounded + * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...) + */ +StepNumber.prototype.setRange = function (start, end, step, prettyStep) { + if (!this.isNumeric(start)) { + throw new Error('Parameter \'start\' is not numeric; value: ' + start); + } + if (!this.isNumeric(end)) { + throw new Error('Parameter \'end\' is not numeric; value: ' + start); + } + if (!this.isNumeric(step)) { + throw new Error('Parameter \'step\' is not numeric; value: ' + start); + } + + this._start = start ? start : 0; + this._end = end ? end : 0; + + this.setStep(step, prettyStep); +}; + +/** + * Set a new step size + * @param {number} step New step size. Must be a positive value + * @param {boolean} prettyStep Optional. If true, the provided step is rounded + * to a pretty step size (like 1, 2, 5, 10, 20, 50, ...) + */ +StepNumber.prototype.setStep = function (step, prettyStep) { + if (step === undefined || step <= 0) return; + + if (prettyStep !== undefined) this.prettyStep = prettyStep; + + if (this.prettyStep === true) this._step = StepNumber.calculatePrettyStep(step);else this._step = step; +}; + +/** + * Calculate a nice step size, closest to the desired step size. + * Returns a value in one of the ranges 1*10^n, 2*10^n, or 5*10^n, where n is an + * integer Number. For example 1, 2, 5, 10, 20, 50, etc... + * @param {number} step Desired step size + * @return {number} Nice step size + */ +StepNumber.calculatePrettyStep = function (step) { + var log10 = function log10(x) { + return Math.log(x) / Math.LN10; + }; + + // try three steps (multiple of 1, 2, or 5 + var step1 = Math.pow(10, Math.round(log10(step))), + step2 = 2 * Math.pow(10, Math.round(log10(step / 2))), + step5 = 5 * Math.pow(10, Math.round(log10(step / 5))); + + // choose the best step (closest to minimum step) + var prettyStep = step1; + if (Math.abs(step2 - step) <= Math.abs(prettyStep - step)) prettyStep = step2; + if (Math.abs(step5 - step) <= Math.abs(prettyStep - step)) prettyStep = step5; + + // for safety + if (prettyStep <= 0) { + prettyStep = 1; + } + + return prettyStep; +}; + +/** + * returns the current value of the step + * @return {number} current value + */ +StepNumber.prototype.getCurrent = function () { + return parseFloat(this._current.toPrecision(this.precision)); +}; + +/** + * returns the current step size + * @return {number} current step size + */ +StepNumber.prototype.getStep = function () { + return this._step; +}; + +/** + * Set the current to its starting value. + * + * By default, this will be the largest value smaller than start, which + * is a multiple of the step size. + * + * Parameters checkFirst is optional, default false. + * If set to true, move the current value one step if smaller than start. + * + * @param {boolean} [checkFirst=false] + */ +StepNumber.prototype.start = function (checkFirst) { + if (checkFirst === undefined) { + checkFirst = false; + } + + this._current = this._start - this._start % this._step; + + if (checkFirst) { + if (this.getCurrent() < this._start) { + this.next(); + } + } +}; + +/** + * Do a step, add the step size to the current value + */ +StepNumber.prototype.next = function () { + this._current += this._step; +}; + +/** + * Returns true whether the end is reached + * @return {boolean} True if the current value has passed the end value. + */ +StepNumber.prototype.end = function () { + return this._current > this._end; +}; + +module.exports = StepNumber; + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +//////////////////////////////////////////////////////////////////////////////// +// This modules handles the options for Graph3d. +// +//////////////////////////////////////////////////////////////////////////////// +var util = __webpack_require__(2); +var Camera = __webpack_require__(95); +var Point3d = __webpack_require__(34); + +// enumerate the available styles +var STYLE = { + BAR: 0, + BARCOLOR: 1, + BARSIZE: 2, + DOT: 3, + DOTLINE: 4, + DOTCOLOR: 5, + DOTSIZE: 6, + GRID: 7, + LINE: 8, + SURFACE: 9 +}; + +// The string representations of the styles +var STYLENAME = { + 'dot': STYLE.DOT, + 'dot-line': STYLE.DOTLINE, + 'dot-color': STYLE.DOTCOLOR, + 'dot-size': STYLE.DOTSIZE, + 'line': STYLE.LINE, + 'grid': STYLE.GRID, + 'surface': STYLE.SURFACE, + 'bar': STYLE.BAR, + 'bar-color': STYLE.BARCOLOR, + 'bar-size': STYLE.BARSIZE +}; + +/** + * Field names in the options hash which are of relevance to the user. + * + * Specifically, these are the fields which require no special handling, + * and can be directly copied over. + */ +var OPTIONKEYS = ['width', 'height', 'filterLabel', 'legendLabel', 'xLabel', 'yLabel', 'zLabel', 'xValueLabel', 'yValueLabel', 'zValueLabel', 'showXAxis', 'showYAxis', 'showZAxis', 'showGrid', 'showPerspective', 'showShadow', 'keepAspectRatio', 'verticalRatio', 'dotSizeRatio', 'dotSizeMinFraction', 'dotSizeMaxFraction', 'showAnimationControls', 'animationInterval', 'animationPreload', 'animationAutoStart', 'axisColor', 'gridColor', 'xCenter', 'yCenter']; + +/** + * Field names in the options hash which are of relevance to the user. + * + * Same as OPTIONKEYS, but internally these fields are stored with + * prefix 'default' in the name. + */ +var PREFIXEDOPTIONKEYS = ['xBarWidth', 'yBarWidth', 'valueMin', 'valueMax', 'xMin', 'xMax', 'xStep', 'yMin', 'yMax', 'yStep', 'zMin', 'zMax', 'zStep']; + +// Placeholder for DEFAULTS reference +var DEFAULTS = undefined; + +/** + * Check if given hash is empty. + * + * Source: http://stackoverflow.com/a/679937 + * + * @param {object} obj + * @returns {boolean} + */ +function isEmpty(obj) { + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) return false; + } + + return true; +} + +/** + * Make first letter of parameter upper case. + * + * Source: http://stackoverflow.com/a/1026087 + * + * @param {string} str + * @returns {string} + */ +function capitalize(str) { + if (str === undefined || str === "" || typeof str != "string") { + return str; + } + + return str.charAt(0).toUpperCase() + str.slice(1); +} + +/** + * Add a prefix to a field name, taking style guide into account + * + * @param {string} prefix + * @param {string} fieldName + * @returns {string} + */ +function prefixFieldName(prefix, fieldName) { + if (prefix === undefined || prefix === "") { + return fieldName; + } + + return prefix + capitalize(fieldName); +} + +/** + * Forcibly copy fields from src to dst in a controlled manner. + * + * A given field in dst will always be overwitten. If this field + * is undefined or not present in src, the field in dst will + * be explicitly set to undefined. + * + * The intention here is to be able to reset all option fields. + * + * Only the fields mentioned in array 'fields' will be handled. + * + * @param {object} src + * @param {object} dst + * @param {array} fields array with names of fields to copy + * @param {string} [prefix] prefix to use for the target fields. + */ +function forceCopy(src, dst, fields, prefix) { + var srcKey; + var dstKey; + + for (var i = 0; i < fields.length; ++i) { + srcKey = fields[i]; + dstKey = prefixFieldName(prefix, srcKey); + + dst[dstKey] = src[srcKey]; + } +} + +/** + * Copy fields from src to dst in a safe and controlled manner. + * + * Only the fields mentioned in array 'fields' will be copied over, + * and only if these are actually defined. + * + * @param {object} src + * @param {object} dst + * @param {array} fields array with names of fields to copy + * @param {string} [prefix] prefix to use for the target fields. + */ +function safeCopy(src, dst, fields, prefix) { + var srcKey; + var dstKey; + + for (var i = 0; i < fields.length; ++i) { + srcKey = fields[i]; + if (src[srcKey] === undefined) continue; + + dstKey = prefixFieldName(prefix, srcKey); + + dst[dstKey] = src[srcKey]; + } +} + +/** + * Initialize dst with the values in src. + * + * src is the hash with the default values. + * A reference DEFAULTS to this hash is stored locally for + * further handling. + * + * For now, dst is assumed to be a Graph3d instance. + * @param {object} src + * @param {object} dst + */ +function setDefaults(src, dst) { + if (src === undefined || isEmpty(src)) { + throw new Error('No DEFAULTS passed'); + } + if (dst === undefined) { + throw new Error('No dst passed'); + } + + // Remember defaults for future reference + DEFAULTS = src; + + // Handle the defaults which can be simply copied over + forceCopy(src, dst, OPTIONKEYS); + forceCopy(src, dst, PREFIXEDOPTIONKEYS, 'default'); + + // Handle the more complex ('special') fields + setSpecialSettings(src, dst); + + // Following are internal fields, not part of the user settings + dst.margin = 10; // px + dst.showGrayBottom = false; // TODO: this does not work correctly + dst.showTooltip = false; + dst.onclick_callback = null; + dst.eye = new Point3d(0, 0, -1); // TODO: set eye.z about 3/4 of the width of the window? +} + +/** + * + * @param {object} options + * @param {object} dst + */ +function setOptions(options, dst) { + if (options === undefined) { + return; + } + if (dst === undefined) { + throw new Error('No dst passed'); + } + + if (DEFAULTS === undefined || isEmpty(DEFAULTS)) { + throw new Error('DEFAULTS not set for module Settings'); + } + + // Handle the parameters which can be simply copied over + safeCopy(options, dst, OPTIONKEYS); + safeCopy(options, dst, PREFIXEDOPTIONKEYS, 'default'); + + // Handle the more complex ('special') fields + setSpecialSettings(options, dst); +} + +/** + * Special handling for certain parameters + * + * 'Special' here means: setting requires more than a simple copy + * + * @param {object} src + * @param {object} dst + */ +function setSpecialSettings(src, dst) { + if (src.backgroundColor !== undefined) { + setBackgroundColor(src.backgroundColor, dst); + } + + setDataColor(src.dataColor, dst); + setStyle(src.style, dst); + setShowLegend(src.showLegend, dst); + setCameraPosition(src.cameraPosition, dst); + + // As special fields go, this is an easy one; just a translation of the name. + // Can't use this.tooltip directly, because that field exists internally + if (src.tooltip !== undefined) { + dst.showTooltip = src.tooltip; + } + if (src.onclick != undefined) { + dst.onclick_callback = src.onclick; + } + + if (src.tooltipStyle !== undefined) { + util.selectiveDeepExtend(['tooltipStyle'], dst, src); + } +} + +/** + * Set the value of setting 'showLegend' + * + * This depends on the value of the style fields, so it must be called + * after the style field has been initialized. + * + * @param {boolean} showLegend + * @param {object} dst + */ +function setShowLegend(showLegend, dst) { + if (showLegend === undefined) { + // If the default was auto, make a choice for this field + var isAutoByDefault = DEFAULTS.showLegend === undefined; + + if (isAutoByDefault) { + // these styles default to having legends + var isLegendGraphStyle = dst.style === STYLE.DOTCOLOR || dst.style === STYLE.DOTSIZE; + + dst.showLegend = isLegendGraphStyle; + } else { + // Leave current value as is + } + } else { + dst.showLegend = showLegend; + } +} + +/** + * Retrieve the style index from given styleName + * @param {string} styleName Style name such as 'dot', 'grid', 'dot-line' + * @return {number} styleNumber Enumeration value representing the style, or -1 + * when not found + */ +function getStyleNumberByName(styleName) { + var number = STYLENAME[styleName]; + + if (number === undefined) { + return -1; + } + + return number; +} + +/** + * Check if given number is a valid style number. + * + * @param {string | number} style + * @return {boolean} true if valid, false otherwise + */ +function checkStyleNumber(style) { + var valid = false; + + for (var n in STYLE) { + if (STYLE[n] === style) { + valid = true; + break; + } + } + + return valid; +} + +/** + * + * @param {string | number} style + * @param {Object} dst + */ +function setStyle(style, dst) { + if (style === undefined) { + return; // Nothing to do + } + + var styleNumber; + + if (typeof style === 'string') { + styleNumber = getStyleNumberByName(style); + + if (styleNumber === -1) { + throw new Error('Style \'' + style + '\' is invalid'); + } + } else { + // Do a pedantic check on style number value + if (!checkStyleNumber(style)) { + throw new Error('Style \'' + style + '\' is invalid'); + } + + styleNumber = style; + } + + dst.style = styleNumber; +} + +/** + * Set the background styling for the graph + * @param {string | {fill: string, stroke: string, strokeWidth: string}} backgroundColor + * @param {Object} dst + */ +function setBackgroundColor(backgroundColor, dst) { + var fill = 'white'; + var stroke = 'gray'; + var strokeWidth = 1; + + if (typeof backgroundColor === 'string') { + fill = backgroundColor; + stroke = 'none'; + strokeWidth = 0; + } else if ((typeof backgroundColor === 'undefined' ? 'undefined' : (0, _typeof3['default'])(backgroundColor)) === 'object') { + if (backgroundColor.fill !== undefined) fill = backgroundColor.fill; + if (backgroundColor.stroke !== undefined) stroke = backgroundColor.stroke; + if (backgroundColor.strokeWidth !== undefined) strokeWidth = backgroundColor.strokeWidth; + } else { + throw new Error('Unsupported type of backgroundColor'); + } + + dst.frame.style.backgroundColor = fill; + dst.frame.style.borderColor = stroke; + dst.frame.style.borderWidth = strokeWidth + 'px'; + dst.frame.style.borderStyle = 'solid'; +} + +/** + * + * @param {string | Object} dataColor + * @param {Object} dst + */ +function setDataColor(dataColor, dst) { + if (dataColor === undefined) { + return; // Nothing to do + } + + if (dst.dataColor === undefined) { + dst.dataColor = {}; + } + + if (typeof dataColor === 'string') { + dst.dataColor.fill = dataColor; + dst.dataColor.stroke = dataColor; + } else { + if (dataColor.fill) { + dst.dataColor.fill = dataColor.fill; + } + if (dataColor.stroke) { + dst.dataColor.stroke = dataColor.stroke; + } + if (dataColor.strokeWidth !== undefined) { + dst.dataColor.strokeWidth = dataColor.strokeWidth; + } + } +} + +/** + * + * @param {Object} cameraPosition + * @param {Object} dst + */ +function setCameraPosition(cameraPosition, dst) { + var camPos = cameraPosition; + if (camPos === undefined) { + return; + } + + if (dst.camera === undefined) { + dst.camera = new Camera(); + } + + dst.camera.setArmRotation(camPos.horizontal, camPos.vertical); + dst.camera.setArmLength(camPos.distance); +} + +module.exports.STYLE = STYLE; +module.exports.setDefaults = setDefaults; +module.exports.setOptions = setOptions; +module.exports.setCameraPosition = setCameraPosition; + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _sign = __webpack_require__(165); + +var _sign2 = _interopRequireDefault(_sign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Point3d = __webpack_require__(34); + +/** + * The camera is mounted on a (virtual) camera arm. The camera arm can rotate + * The camera is always looking in the direction of the origin of the arm. + * This way, the camera always rotates around one fixed point, the location + * of the camera arm. + * + * Documentation: + * http://en.wikipedia.org/wiki/3D_projection + * @class Camera + */ +function Camera() { + this.armLocation = new Point3d(); + this.armRotation = {}; + this.armRotation.horizontal = 0; + this.armRotation.vertical = 0; + this.armLength = 1.7; + this.cameraOffset = new Point3d(); + this.offsetMultiplier = 0.6; + + this.cameraLocation = new Point3d(); + this.cameraRotation = new Point3d(0.5 * Math.PI, 0, 0); + + this.calculateCameraOrientation(); +} + +/** + * Set offset camera in camera coordinates + * @param {number} x offset by camera horisontal + * @param {number} y offset by camera vertical + */ +Camera.prototype.setOffset = function (x, y) { + var abs = Math.abs, + sign = _sign2['default'], + mul = this.offsetMultiplier, + border = this.armLength * mul; + + if (abs(x) > border) { + x = sign(x) * border; + } + if (abs(y) > border) { + y = sign(y) * border; + } + this.cameraOffset.x = x; + this.cameraOffset.y = y; + this.calculateCameraOrientation(); +}; + +/** + * Get camera offset by horizontal and vertical + * @returns {number} + */ +Camera.prototype.getOffset = function () { + return this.cameraOffset; +}; + +/** + * Set the location (origin) of the arm + * @param {number} x Normalized value of x + * @param {number} y Normalized value of y + * @param {number} z Normalized value of z + */ +Camera.prototype.setArmLocation = function (x, y, z) { + this.armLocation.x = x; + this.armLocation.y = y; + this.armLocation.z = z; + + this.calculateCameraOrientation(); +}; + +/** + * Set the rotation of the camera arm + * @param {number} horizontal The horizontal rotation, between 0 and 2*PI. + * Optional, can be left undefined. + * @param {number} vertical The vertical rotation, between 0 and 0.5*PI + * if vertical=0.5*PI, the graph is shown from the + * top. Optional, can be left undefined. + */ +Camera.prototype.setArmRotation = function (horizontal, vertical) { + if (horizontal !== undefined) { + this.armRotation.horizontal = horizontal; + } + + if (vertical !== undefined) { + this.armRotation.vertical = vertical; + if (this.armRotation.vertical < 0) this.armRotation.vertical = 0; + if (this.armRotation.vertical > 0.5 * Math.PI) this.armRotation.vertical = 0.5 * Math.PI; + } + + if (horizontal !== undefined || vertical !== undefined) { + this.calculateCameraOrientation(); + } +}; + +/** + * Retrieve the current arm rotation + * @return {object} An object with parameters horizontal and vertical + */ +Camera.prototype.getArmRotation = function () { + var rot = {}; + rot.horizontal = this.armRotation.horizontal; + rot.vertical = this.armRotation.vertical; + + return rot; +}; + +/** + * Set the (normalized) length of the camera arm. + * @param {number} length A length between 0.71 and 5.0 + */ +Camera.prototype.setArmLength = function (length) { + if (length === undefined) return; + + this.armLength = length; + + // Radius must be larger than the corner of the graph, + // which has a distance of sqrt(0.5^2+0.5^2) = 0.71 from the center of the + // graph + if (this.armLength < 0.71) this.armLength = 0.71; + if (this.armLength > 5.0) this.armLength = 5.0; + + this.setOffset(this.cameraOffset.x, this.cameraOffset.y); + this.calculateCameraOrientation(); +}; + +/** + * Retrieve the arm length + * @return {number} length + */ +Camera.prototype.getArmLength = function () { + return this.armLength; +}; + +/** + * Retrieve the camera location + * @return {Point3d} cameraLocation + */ +Camera.prototype.getCameraLocation = function () { + return this.cameraLocation; +}; + +/** + * Retrieve the camera rotation + * @return {Point3d} cameraRotation + */ +Camera.prototype.getCameraRotation = function () { + return this.cameraRotation; +}; + +/** + * Calculate the location and rotation of the camera based on the + * position and orientation of the camera arm + */ +Camera.prototype.calculateCameraOrientation = function () { + // calculate location of the camera + this.cameraLocation.x = this.armLocation.x - this.armLength * Math.sin(this.armRotation.horizontal) * Math.cos(this.armRotation.vertical); + this.cameraLocation.y = this.armLocation.y - this.armLength * Math.cos(this.armRotation.horizontal) * Math.cos(this.armRotation.vertical); + this.cameraLocation.z = this.armLocation.z + this.armLength * Math.sin(this.armRotation.vertical); + + // calculate rotation of the camera + this.cameraRotation.x = Math.PI / 2 - this.armRotation.vertical; + this.cameraRotation.y = 0; + this.cameraRotation.z = -this.armRotation.horizontal; + + var xa = this.cameraRotation.x; + var za = this.cameraRotation.z; + var dx = this.cameraOffset.x; + var dy = this.cameraOffset.y; + var sin = Math.sin, + cos = Math.cos; + + this.cameraLocation.x = this.cameraLocation.x + dx * cos(za) + dy * -sin(za) * cos(xa); + this.cameraLocation.y = this.cameraLocation.y + dx * sin(za) + dy * cos(za) * cos(xa); + this.cameraLocation.z = this.cameraLocation.z + dy * sin(xa); +}; + +module.exports = Camera; + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var DataView = __webpack_require__(12); + +/** + * @class Filter + * + * @param {DataGroup} dataGroup the data group + * @param {number} column The index of the column to be filtered + * @param {Graph3d} graph The graph + */ +function Filter(dataGroup, column, graph) { + this.dataGroup = dataGroup; + this.column = column; + this.graph = graph; // the parent graph + + this.index = undefined; + this.value = undefined; + + // read all distinct values and select the first one + this.values = dataGroup.getDistinctValues(this.column); + + if (this.values.length > 0) { + this.selectValue(0); + } + + // create an array with the filtered datapoints. this will be loaded afterwards + this.dataPoints = []; + + this.loaded = false; + this.onLoadCallback = undefined; + + if (graph.animationPreload) { + this.loaded = false; + this.loadInBackground(); + } else { + this.loaded = true; + } +} + +/** + * Return the label + * @return {string} label + */ +Filter.prototype.isLoaded = function () { + return this.loaded; +}; + +/** + * Return the loaded progress + * @return {number} percentage between 0 and 100 + */ +Filter.prototype.getLoadedProgress = function () { + var len = this.values.length; + + var i = 0; + while (this.dataPoints[i]) { + i++; + } + + return Math.round(i / len * 100); +}; + +/** + * Return the label + * @return {string} label + */ +Filter.prototype.getLabel = function () { + return this.graph.filterLabel; +}; + +/** + * Return the columnIndex of the filter + * @return {number} columnIndex + */ +Filter.prototype.getColumn = function () { + return this.column; +}; + +/** + * Return the currently selected value. Returns undefined if there is no selection + * @return {*} value + */ +Filter.prototype.getSelectedValue = function () { + if (this.index === undefined) return undefined; + + return this.values[this.index]; +}; + +/** + * Retrieve all values of the filter + * @return {Array} values + */ +Filter.prototype.getValues = function () { + return this.values; +}; + +/** + * Retrieve one value of the filter + * @param {number} index + * @return {*} value + */ +Filter.prototype.getValue = function (index) { + if (index >= this.values.length) throw new Error('Index out of range'); + + return this.values[index]; +}; + +/** + * Retrieve the (filtered) dataPoints for the currently selected filter index + * @param {number} [index] (optional) + * @return {Array} dataPoints + */ +Filter.prototype._getDataPoints = function (index) { + if (index === undefined) index = this.index; + + if (index === undefined) return []; + + var dataPoints; + if (this.dataPoints[index]) { + dataPoints = this.dataPoints[index]; + } else { + var f = {}; + f.column = this.column; + f.value = this.values[index]; + + var dataView = new DataView(this.dataGroup.getDataSet(), { filter: function filter(item) { + return item[f.column] == f.value; + } }).get(); + dataPoints = this.dataGroup._getDataPoints(dataView); + + this.dataPoints[index] = dataPoints; + } + + return dataPoints; +}; + +/** + * Set a callback function when the filter is fully loaded. + * + * @param {function} callback + */ +Filter.prototype.setOnLoadCallback = function (callback) { + this.onLoadCallback = callback; +}; + +/** + * Add a value to the list with available values for this filter + * No double entries will be created. + * @param {number} index + */ +Filter.prototype.selectValue = function (index) { + if (index >= this.values.length) throw new Error('Index out of range'); + + this.index = index; + this.value = this.values[index]; +}; + +/** + * Load all filtered rows in the background one by one + * Start this method without providing an index! + * + * @param {number} [index=0] + */ +Filter.prototype.loadInBackground = function (index) { + if (index === undefined) index = 0; + + var frame = this.graph.frame; + + if (index < this.values.length) { + // create a progress box + if (frame.progress === undefined) { + frame.progress = document.createElement('DIV'); + frame.progress.style.position = 'absolute'; + frame.progress.style.color = 'gray'; + frame.appendChild(frame.progress); + } + var progress = this.getLoadedProgress(); + frame.progress.innerHTML = 'Loading animation... ' + progress + '%'; + // TODO: this is no nice solution... + frame.progress.style.bottom = 60 + 'px'; // TODO: use height of slider + frame.progress.style.left = 10 + 'px'; + + var me = this; + setTimeout(function () { + me.loadInBackground(index + 1); + }, 10); + this.loaded = false; + } else { + this.loaded = true; + + // remove the progress box + if (frame.progress !== undefined) { + frame.removeChild(frame.progress); + frame.progress = undefined; + } + + if (this.onLoadCallback) this.onLoadCallback(); + } +}; + +module.exports = Filter; + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var keycharm = __webpack_require__(35); +var Emitter = __webpack_require__(44); +var Hammer = __webpack_require__(10); +var util = __webpack_require__(2); + +/** + * Turn an element into an clickToUse element. + * When not active, the element has a transparent overlay. When the overlay is + * clicked, the mode is changed to active. + * When active, the element is displayed with a blue border around it, and + * the interactive contents of the element can be used. When clicked outside + * the element, the elements mode is changed to inactive. + * @param {Element} container + * @constructor Activator + */ +function Activator(container) { + this.active = false; + + this.dom = { + container: container + }; + + this.dom.overlay = document.createElement('div'); + this.dom.overlay.className = 'vis-overlay'; + + this.dom.container.appendChild(this.dom.overlay); + + this.hammer = Hammer(this.dom.overlay); + this.hammer.on('tap', this._onTapOverlay.bind(this)); + + // block all touch events (except tap) + var me = this; + var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend']; + events.forEach(function (event) { + me.hammer.on(event, function (event) { + event.stopPropagation(); + }); + }); + + // attach a click event to the window, in order to deactivate when clicking outside the timeline + if (document && document.body) { + this.onClick = function (event) { + if (!_hasParent(event.target, container)) { + me.deactivate(); + } + }; + document.body.addEventListener('click', this.onClick); + } + + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + this.keycharm = keycharm(); + + // keycharm listener only bounded when active) + this.escListener = this.deactivate.bind(this); +} + +// turn into an event emitter +Emitter(Activator.prototype); + +// The currently active activator +Activator.current = null; + +/** + * Destroy the activator. Cleans up all created DOM and event listeners + */ +Activator.prototype.destroy = function () { + this.deactivate(); + + // remove dom + this.dom.overlay.parentNode.removeChild(this.dom.overlay); + + // remove global event listener + if (this.onClick) { + document.body.removeEventListener('click', this.onClick); + } + + // cleanup hammer instances + this.hammer.destroy(); + this.hammer = null; + // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory) +}; + +/** + * Activate the element + * Overlay is hidden, element is decorated with a blue shadow border + */ +Activator.prototype.activate = function () { + // we allow only one active activator at a time + if (Activator.current) { + Activator.current.deactivate(); + } + Activator.current = this; + + this.active = true; + this.dom.overlay.style.display = 'none'; + util.addClassName(this.dom.container, 'vis-active'); + + this.emit('change'); + this.emit('activate'); + + // ugly hack: bind ESC after emitting the events, as the Network rebinds all + // keyboard events on a 'change' event + this.keycharm.bind('esc', this.escListener); +}; + +/** + * Deactivate the element + * Overlay is displayed on top of the element + */ +Activator.prototype.deactivate = function () { + this.active = false; + this.dom.overlay.style.display = ''; + util.removeClassName(this.dom.container, 'vis-active'); + this.keycharm.unbind('esc', this.escListener); + + this.emit('change'); + this.emit('deactivate'); +}; + +/** + * Handle a tap event: activate the container + * @param {Event} event The event + * @private + */ +Activator.prototype._onTapOverlay = function (event) { + // activate the container + this.activate(); + event.stopPropagation(); +}; + +/** + * Test whether the element has the requested parent element somewhere in + * its chain of parent nodes. + * @param {HTMLElement} element + * @param {HTMLElement} parent + * @returns {boolean} Returns true when the parent is found somewhere in the + * chain of parent nodes. + * @private + */ +function _hasParent(element, parent) { + while (element) { + if (element === parent) { + return true; + } + element = element.parentNode; + } + return false; +} + +module.exports = Activator; + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// English +exports['en'] = { + current: 'current', + time: 'time' +}; +exports['en_EN'] = exports['en']; +exports['en_US'] = exports['en']; + +// Italiano +exports['it'] = { + current: 'attuale', + time: 'tempo' +}; +exports['it_IT'] = exports['it']; +exports['it_CH'] = exports['it']; + +// Dutch +exports['nl'] = { + current: 'huidige', + time: 'tijd' +}; +exports['nl_NL'] = exports['nl']; +exports['nl_BE'] = exports['nl']; + +// German +exports['de'] = { + current: 'Aktuelle', + time: 'Zeit' +}; +exports['de_DE'] = exports['de']; + +// French +exports['fr'] = { + current: 'actuel', + time: 'heure' +}; +exports['fr_FR'] = exports['fr']; +exports['fr_CA'] = exports['fr']; +exports['fr_BE'] = exports['fr']; + +// Espanol +exports['es'] = { + current: 'corriente', + time: 'hora' +}; +exports['es_ES'] = exports['es']; + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _create = __webpack_require__(29); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Hammer = __webpack_require__(10); +var util = __webpack_require__(2); +var DataSet = __webpack_require__(11); +var DataView = __webpack_require__(12); +var TimeStep = __webpack_require__(66); +var Component = __webpack_require__(16); +var Group = __webpack_require__(68); +var BackgroundGroup = __webpack_require__(69); +var BoxItem = __webpack_require__(101); +var PointItem = __webpack_require__(102); +var RangeItem = __webpack_require__(70); +var BackgroundItem = __webpack_require__(103); +var Popup = __webpack_require__(104)['default']; + +var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items +var BACKGROUND = '__background__'; // reserved group id for background items without group + +/** + * An ItemSet holds a set of items and ranges which can be displayed in a + * range. The width is determined by the parent of the ItemSet, and the height + * is determined by the size of the items. + * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body + * @param {Object} [options] See ItemSet.setOptions for the available options. + * @constructor ItemSet + * @extends Component + */ +function ItemSet(body, options) { + this.body = body; + this.defaultOptions = { + type: null, // 'box', 'point', 'range', 'background' + orientation: { + item: 'bottom' // item orientation: 'top' or 'bottom' + }, + align: 'auto', // alignment of box items + stack: true, + stackSubgroups: true, + groupOrderSwap: function groupOrderSwap(fromGroup, toGroup, groups) { + // eslint-disable-line no-unused-vars + var targetOrder = toGroup.order; + toGroup.order = fromGroup.order; + fromGroup.order = targetOrder; + }, + groupOrder: 'order', + + selectable: true, + multiselect: false, + itemsAlwaysDraggable: { + item: false, + range: false + }, + + editable: { + updateTime: false, + updateGroup: false, + add: false, + remove: false, + overrideItems: false + }, + + groupEditable: { + order: false, + add: false, + remove: false + }, + + snap: TimeStep.snap, + + // Only called when `objectData.target === 'item'. + onDropObjectOnItem: function onDropObjectOnItem(objectData, item, callback) { + callback(item); + }, + onAdd: function onAdd(item, callback) { + callback(item); + }, + onUpdate: function onUpdate(item, callback) { + callback(item); + }, + onMove: function onMove(item, callback) { + callback(item); + }, + onRemove: function onRemove(item, callback) { + callback(item); + }, + onMoving: function onMoving(item, callback) { + callback(item); + }, + onAddGroup: function onAddGroup(item, callback) { + callback(item); + }, + onMoveGroup: function onMoveGroup(item, callback) { + callback(item); + }, + onRemoveGroup: function onRemoveGroup(item, callback) { + callback(item); + }, + + margin: { + item: { + horizontal: 10, + vertical: 10 + }, + axis: 20 + }, + + showTooltips: true, + + tooltip: { + followMouse: false, + overflowMethod: 'flip' + }, + + tooltipOnItemUpdateTime: false + }; + + // options is shared by this ItemSet and all its items + this.options = util.extend({}, this.defaultOptions); + this.options.rtl = options.rtl; + + // options for getting items from the DataSet with the correct type + this.itemOptions = { + type: { start: 'Date', end: 'Date' } + }; + + this.conversion = { + toScreen: body.util.toScreen, + toTime: body.util.toTime + }; + this.dom = {}; + this.props = {}; + this.hammer = null; + + var me = this; + this.itemsData = null; // DataSet + this.groupsData = null; // DataSet + + // listeners for the DataSet of the items + this.itemListeners = { + 'add': function add(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onAdd(params.items); + }, + 'update': function update(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onUpdate(params.items); + }, + 'remove': function remove(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onRemove(params.items); + } + }; + + // listeners for the DataSet of the groups + this.groupListeners = { + 'add': function add(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onAddGroups(params.items); + + if (me.groupsData && me.groupsData.length > 0) { + var groupsData = me.groupsData.getDataSet(); + groupsData.get().forEach(function (groupData) { + if (groupData.nestedGroups) { + if (groupData.showNested != false) { + groupData.showNested = true; + } + var updatedGroups = []; + groupData.nestedGroups.forEach(function (nestedGroupId) { + var updatedNestedGroup = groupsData.get(nestedGroupId); + if (!updatedNestedGroup) { + return; + } + updatedNestedGroup.nestedInGroup = groupData.id; + if (groupData.showNested == false) { + updatedNestedGroup.visible = false; + } + updatedGroups = updatedGroups.concat(updatedNestedGroup); + }); + groupsData.update(updatedGroups, senderId); + } + }); + } + }, + 'update': function update(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onUpdateGroups(params.items); + }, + 'remove': function remove(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onRemoveGroups(params.items); + } + }; + + this.items = {}; // object with an Item for every data item + this.groups = {}; // Group object for every group + this.groupIds = []; + + this.selection = []; // list with the ids of all selected nodes + + this.popup = null; + + this.touchParams = {}; // stores properties while dragging + this.groupTouchParams = {}; + // create the HTML DOM + + this._create(); + + this.setOptions(options); +} + +ItemSet.prototype = new Component(); + +// available item types will be registered here +ItemSet.types = { + background: BackgroundItem, + box: BoxItem, + range: RangeItem, + point: PointItem +}; + +/** + * Create the HTML DOM for the ItemSet + */ +ItemSet.prototype._create = function () { + var frame = document.createElement('div'); + frame.className = 'vis-itemset'; + frame['timeline-itemset'] = this; + this.dom.frame = frame; + + // create background panel + var background = document.createElement('div'); + background.className = 'vis-background'; + frame.appendChild(background); + this.dom.background = background; + + // create foreground panel + var foreground = document.createElement('div'); + foreground.className = 'vis-foreground'; + frame.appendChild(foreground); + this.dom.foreground = foreground; + + // create axis panel + var axis = document.createElement('div'); + axis.className = 'vis-axis'; + this.dom.axis = axis; + + // create labelset + var labelSet = document.createElement('div'); + labelSet.className = 'vis-labelset'; + this.dom.labelSet = labelSet; + + // create ungrouped Group + this._updateUngrouped(); + + // create background Group + var backgroundGroup = new BackgroundGroup(BACKGROUND, null, this); + backgroundGroup.show(); + this.groups[BACKGROUND] = backgroundGroup; + + // attach event listeners + // Note: we bind to the centerContainer for the case where the height + // of the center container is larger than of the ItemSet, so we + // can click in the empty area to create a new item or deselect an item. + this.hammer = new Hammer(this.body.dom.centerContainer); + + // drag items when selected + this.hammer.on('hammer.input', function (event) { + if (event.isFirst) { + this._onTouch(event); + } + }.bind(this)); + this.hammer.on('panstart', this._onDragStart.bind(this)); + this.hammer.on('panmove', this._onDrag.bind(this)); + this.hammer.on('panend', this._onDragEnd.bind(this)); + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); + + // single select (or unselect) when tapping an item + this.hammer.on('tap', this._onSelectItem.bind(this)); + + // multi select when holding mouse/touch, or on ctrl+click + this.hammer.on('press', this._onMultiSelectItem.bind(this)); + + // add item on doubletap + this.hammer.on('doubletap', this._onAddItem.bind(this)); + + if (this.options.rtl) { + this.groupHammer = new Hammer(this.body.dom.rightContainer); + } else { + this.groupHammer = new Hammer(this.body.dom.leftContainer); + } + + this.groupHammer.on('tap', this._onGroupClick.bind(this)); + this.groupHammer.on('panstart', this._onGroupDragStart.bind(this)); + this.groupHammer.on('panmove', this._onGroupDrag.bind(this)); + this.groupHammer.on('panend', this._onGroupDragEnd.bind(this)); + this.groupHammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_VERTICAL }); + + this.body.dom.centerContainer.addEventListener('mouseover', this._onMouseOver.bind(this)); + this.body.dom.centerContainer.addEventListener('mouseout', this._onMouseOut.bind(this)); + this.body.dom.centerContainer.addEventListener('mousemove', this._onMouseMove.bind(this)); + // right-click on timeline + this.body.dom.centerContainer.addEventListener('contextmenu', this._onDragEnd.bind(this)); + + this.body.dom.centerContainer.addEventListener('mousewheel', this._onMouseWheel.bind(this)); + + // attach to the DOM + this.show(); +}; + +/** + * Set options for the ItemSet. Existing options will be extended/overwritten. + * @param {Object} [options] The following options are available: + * {string} type + * Default type for the items. Choose from 'box' + * (default), 'point', 'range', or 'background'. + * The default style can be overwritten by + * individual items. + * {string} align + * Alignment for the items, only applicable for + * BoxItem. Choose 'center' (default), 'left', or + * 'right'. + * {string} orientation.item + * Orientation of the item set. Choose 'top' or + * 'bottom' (default). + * {Function} groupOrder + * A sorting function for ordering groups + * {boolean} stack + * If true (default), items will be stacked on + * top of each other. + * {number} margin.axis + * Margin between the axis and the items in pixels. + * Default is 20. + * {number} margin.item.horizontal + * Horizontal margin between items in pixels. + * Default is 10. + * {number} margin.item.vertical + * Vertical Margin between items in pixels. + * Default is 10. + * {number} margin.item + * Margin between items in pixels in both horizontal + * and vertical direction. Default is 10. + * {number} margin + * Set margin for both axis and items in pixels. + * {boolean} selectable + * If true (default), items can be selected. + * {boolean} multiselect + * If true, multiple items can be selected. + * False by default. + * {boolean} editable + * Set all editable options to true or false + * {boolean} editable.updateTime + * Allow dragging an item to an other moment in time + * {boolean} editable.updateGroup + * Allow dragging an item to an other group + * {boolean} editable.add + * Allow creating new items on double tap + * {boolean} editable.remove + * Allow removing items by clicking the delete button + * top right of a selected item. + * {Function(item: Item, callback: Function)} onAdd + * Callback function triggered when an item is about to be added: + * when the user double taps an empty space in the Timeline. + * {Function(item: Item, callback: Function)} onUpdate + * Callback function fired when an item is about to be updated. + * This function typically has to show a dialog where the user + * change the item. If not implemented, nothing happens. + * {Function(item: Item, callback: Function)} onMove + * Fired when an item has been moved. If not implemented, + * the move action will be accepted. + * {Function(item: Item, callback: Function)} onRemove + * Fired when an item is about to be deleted. + * If not implemented, the item will be always removed. + */ +ItemSet.prototype.setOptions = function (options) { + if (options) { + // copy all options that we know + var fields = ['type', 'rtl', 'align', 'order', 'stack', 'stackSubgroups', 'selectable', 'multiselect', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'visibleFrameTemplate', 'hide', 'snap', 'groupOrderSwap', 'showTooltips', 'tooltip', 'tooltipOnItemUpdateTime']; + util.selectiveExtend(fields, this.options, options); + + if ('itemsAlwaysDraggable' in options) { + if (typeof options.itemsAlwaysDraggable === 'boolean') { + this.options.itemsAlwaysDraggable.item = options.itemsAlwaysDraggable; + this.options.itemsAlwaysDraggable.range = false; + } else if ((0, _typeof3['default'])(options.itemsAlwaysDraggable) === 'object') { + util.selectiveExtend(['item', 'range'], this.options.itemsAlwaysDraggable, options.itemsAlwaysDraggable); + // only allow range always draggable when item is always draggable as well + if (!this.options.itemsAlwaysDraggable.item) { + this.options.itemsAlwaysDraggable.range = false; + } + } + } + + if ('orientation' in options) { + if (typeof options.orientation === 'string') { + this.options.orientation.item = options.orientation === 'top' ? 'top' : 'bottom'; + } else if ((0, _typeof3['default'])(options.orientation) === 'object' && 'item' in options.orientation) { + this.options.orientation.item = options.orientation.item; + } + } + + if ('margin' in options) { + if (typeof options.margin === 'number') { + this.options.margin.axis = options.margin; + this.options.margin.item.horizontal = options.margin; + this.options.margin.item.vertical = options.margin; + } else if ((0, _typeof3['default'])(options.margin) === 'object') { + util.selectiveExtend(['axis'], this.options.margin, options.margin); + if ('item' in options.margin) { + if (typeof options.margin.item === 'number') { + this.options.margin.item.horizontal = options.margin.item; + this.options.margin.item.vertical = options.margin.item; + } else if ((0, _typeof3['default'])(options.margin.item) === 'object') { + util.selectiveExtend(['horizontal', 'vertical'], this.options.margin.item, options.margin.item); + } + } + } + } + + if ('editable' in options) { + if (typeof options.editable === 'boolean') { + this.options.editable.updateTime = options.editable; + this.options.editable.updateGroup = options.editable; + this.options.editable.add = options.editable; + this.options.editable.remove = options.editable; + this.options.editable.overrideItems = false; + } else if ((0, _typeof3['default'])(options.editable) === 'object') { + util.selectiveExtend(['updateTime', 'updateGroup', 'add', 'remove', 'overrideItems'], this.options.editable, options.editable); + } + } + + if ('groupEditable' in options) { + if (typeof options.groupEditable === 'boolean') { + this.options.groupEditable.order = options.groupEditable; + this.options.groupEditable.add = options.groupEditable; + this.options.groupEditable.remove = options.groupEditable; + } else if ((0, _typeof3['default'])(options.groupEditable) === 'object') { + util.selectiveExtend(['order', 'add', 'remove'], this.options.groupEditable, options.groupEditable); + } + } + + // callback functions + var addCallback = function (name) { + var fn = options[name]; + if (fn) { + if (!(fn instanceof Function)) { + throw new Error('option ' + name + ' must be a function ' + name + '(item, callback)'); + } + this.options[name] = fn; + } + }.bind(this); + ['onDropObjectOnItem', 'onAdd', 'onUpdate', 'onRemove', 'onMove', 'onMoving', 'onAddGroup', 'onMoveGroup', 'onRemoveGroup'].forEach(addCallback); + + // force the itemSet to refresh: options like orientation and margins may be changed + this.markDirty(); + } +}; + +/** + * Mark the ItemSet dirty so it will refresh everything with next redraw. + * Optionally, all items can be marked as dirty and be refreshed. + * @param {{refreshItems: boolean}} [options] + */ +ItemSet.prototype.markDirty = function (options) { + this.groupIds = []; + + if (options && options.refreshItems) { + util.forEach(this.items, function (item) { + item.dirty = true; + if (item.displayed) item.redraw(); + }); + } +}; + +/** + * Destroy the ItemSet + */ +ItemSet.prototype.destroy = function () { + this.hide(); + this.setItems(null); + this.setGroups(null); + + this.hammer = null; + + this.body = null; + this.conversion = null; +}; + +/** + * Hide the component from the DOM + */ +ItemSet.prototype.hide = function () { + // remove the frame containing the items + if (this.dom.frame.parentNode) { + this.dom.frame.parentNode.removeChild(this.dom.frame); + } + + // remove the axis with dots + if (this.dom.axis.parentNode) { + this.dom.axis.parentNode.removeChild(this.dom.axis); + } + + // remove the labelset containing all group labels + if (this.dom.labelSet.parentNode) { + this.dom.labelSet.parentNode.removeChild(this.dom.labelSet); + } +}; + +/** + * Show the component in the DOM (when not already visible). + */ +ItemSet.prototype.show = function () { + // show frame containing the items + if (!this.dom.frame.parentNode) { + this.body.dom.center.appendChild(this.dom.frame); + } + + // show axis with dots + if (!this.dom.axis.parentNode) { + this.body.dom.backgroundVertical.appendChild(this.dom.axis); + } + + // show labelset containing labels + if (!this.dom.labelSet.parentNode) { + if (this.options.rtl) { + this.body.dom.right.appendChild(this.dom.labelSet); + } else { + this.body.dom.left.appendChild(this.dom.labelSet); + } + } +}; + +/** + * Set selected items by their id. Replaces the current selection + * Unknown id's are silently ignored. + * @param {string[] | string} [ids] An array with zero or more id's of the items to be + * selected, or a single item id. If ids is undefined + * or an empty array, all items will be unselected. + */ +ItemSet.prototype.setSelection = function (ids) { + var i, ii, id, item; + + if (ids == undefined) ids = []; + if (!Array.isArray(ids)) ids = [ids]; + + // unselect currently selected items + for (i = 0, ii = this.selection.length; i < ii; i++) { + id = this.selection[i]; + item = this.items[id]; + if (item) item.unselect(); + } + + // select items + this.selection = []; + for (i = 0, ii = ids.length; i < ii; i++) { + id = ids[i]; + item = this.items[id]; + if (item) { + this.selection.push(id); + item.select(); + } + } +}; + +/** + * Get the selected items by their id + * @return {Array} ids The ids of the selected items + */ +ItemSet.prototype.getSelection = function () { + return this.selection.concat([]); +}; + +/** + * Get the id's of the currently visible items. + * @returns {Array} The ids of the visible items + */ +ItemSet.prototype.getVisibleItems = function () { + var range = this.body.range.getRange(); + var right, left; + + if (this.options.rtl) { + right = this.body.util.toScreen(range.start); + left = this.body.util.toScreen(range.end); + } else { + left = this.body.util.toScreen(range.start); + right = this.body.util.toScreen(range.end); + } + + var ids = []; + for (var groupId in this.groups) { + if (this.groups.hasOwnProperty(groupId)) { + var group = this.groups[groupId]; + var rawVisibleItems = group.isVisible ? group.visibleItems : []; + + // filter the "raw" set with visibleItems into a set which is really + // visible by pixels + for (var i = 0; i < rawVisibleItems.length; i++) { + var item = rawVisibleItems[i]; + // TODO: also check whether visible vertically + if (this.options.rtl) { + if (item.right < left && item.right + item.width > right) { + ids.push(item.id); + } + } else { + if (item.left < right && item.left + item.width > left) { + ids.push(item.id); + } + } + } + } + } + + return ids; +}; + +/** + * Deselect a selected item + * @param {string | number} id + * @private + */ +ItemSet.prototype._deselect = function (id) { + var selection = this.selection; + for (var i = 0, ii = selection.length; i < ii; i++) { + if (selection[i] == id) { + // non-strict comparison! + selection.splice(i, 1); + break; + } + } +}; + +/** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ +ItemSet.prototype.redraw = function () { + var margin = this.options.margin, + range = this.body.range, + asSize = util.option.asSize, + options = this.options, + orientation = options.orientation.item, + resized = false, + frame = this.dom.frame; + + // recalculate absolute position (before redrawing groups) + this.props.top = this.body.domProps.top.height + this.body.domProps.border.top; + + if (this.options.rtl) { + this.props.right = this.body.domProps.right.width + this.body.domProps.border.right; + } else { + this.props.left = this.body.domProps.left.width + this.body.domProps.border.left; + } + + // update class name + frame.className = 'vis-itemset'; + + // reorder the groups (if needed) + resized = this._orderGroups() || resized; + + // check whether zoomed (in that case we need to re-stack everything) + // TODO: would be nicer to get this as a trigger from Range + var visibleInterval = range.end - range.start; + var zoomed = visibleInterval != this.lastVisibleInterval || this.props.width != this.props.lastWidth; + var scrolled = range.start != this.lastRangeStart; + var changedStackOption = options.stack != this.lastStack; + var changedStackSubgroupsOption = options.stackSubgroups != this.lastStackSubgroups; + var forceRestack = zoomed || scrolled || changedStackOption || changedStackSubgroupsOption; + this.lastVisibleInterval = visibleInterval; + this.lastRangeStart = range.start; + this.lastStack = options.stack; + this.lastStackSubgroups = options.stackSubgroups; + + this.props.lastWidth = this.props.width; + + var firstGroup = this._firstGroup(); + var firstMargin = { + item: margin.item, + axis: margin.axis + }; + var nonFirstMargin = { + item: margin.item, + axis: margin.item.vertical / 2 + }; + var height = 0; + var minHeight = margin.axis + margin.item.vertical; + + // redraw the background group + this.groups[BACKGROUND].redraw(range, nonFirstMargin, forceRestack); + + var redrawQueue = {}; + var redrawQueueLength = 0; + + // collect redraw functions + util.forEach(this.groups, function (group, key) { + if (key === BACKGROUND) return; + var groupMargin = group == firstGroup ? firstMargin : nonFirstMargin; + var returnQueue = true; + redrawQueue[key] = group.redraw(range, groupMargin, forceRestack, returnQueue); + redrawQueueLength = redrawQueue[key].length; + }); + + var needRedraw = redrawQueueLength > 0; + if (needRedraw) { + var redrawResults = {}; + + for (var i = 0; i < redrawQueueLength; i++) { + util.forEach(redrawQueue, function (fns, key) { + redrawResults[key] = fns[i](); + }); + } + + // redraw all regular groups + util.forEach(this.groups, function (group, key) { + if (key === BACKGROUND) return; + var groupResized = redrawResults[key]; + resized = groupResized || resized; + height += group.height; + }); + height = Math.max(height, minHeight); + } + + height = Math.max(height, minHeight); + + // update frame height + frame.style.height = asSize(height); + + // calculate actual size + this.props.width = frame.offsetWidth; + this.props.height = height; + + // reposition axis + this.dom.axis.style.top = asSize(orientation == 'top' ? this.body.domProps.top.height + this.body.domProps.border.top : this.body.domProps.top.height + this.body.domProps.centerContainer.height); + if (this.options.rtl) { + this.dom.axis.style.right = '0'; + } else { + this.dom.axis.style.left = '0'; + } + + this.initialItemSetDrawn = true; + // check if this component is resized + resized = this._isResized() || resized; + + return resized; +}; + +/** + * Get the first group, aligned with the axis + * @return {Group | null} firstGroup + * @private + */ +ItemSet.prototype._firstGroup = function () { + var firstGroupIndex = this.options.orientation.item == 'top' ? 0 : this.groupIds.length - 1; + var firstGroupId = this.groupIds[firstGroupIndex]; + var firstGroup = this.groups[firstGroupId] || this.groups[UNGROUPED]; + + return firstGroup || null; +}; + +/** + * Create or delete the group holding all ungrouped items. This group is used when + * there are no groups specified. + * @protected + */ +ItemSet.prototype._updateUngrouped = function () { + var ungrouped = this.groups[UNGROUPED]; + var item, itemId; + + if (this.groupsData) { + // remove the group holding all ungrouped items + if (ungrouped) { + ungrouped.hide(); + delete this.groups[UNGROUPED]; + + for (itemId in this.items) { + if (this.items.hasOwnProperty(itemId)) { + item = this.items[itemId]; + item.parent && item.parent.remove(item); + var groupId = this._getGroupId(item.data); + var group = this.groups[groupId]; + group && group.add(item) || item.hide(); + } + } + } + } else { + // create a group holding all (unfiltered) items + if (!ungrouped) { + var id = null; + var data = null; + ungrouped = new Group(id, data, this); + this.groups[UNGROUPED] = ungrouped; + + for (itemId in this.items) { + if (this.items.hasOwnProperty(itemId)) { + item = this.items[itemId]; + ungrouped.add(item); + } + } + + ungrouped.show(); + } + } +}; + +/** + * Get the element for the labelset + * @return {HTMLElement} labelSet + */ +ItemSet.prototype.getLabelSet = function () { + return this.dom.labelSet; +}; + +/** + * Set items + * @param {vis.DataSet | null} items + */ +ItemSet.prototype.setItems = function (items) { + var me = this, + ids, + oldItemsData = this.itemsData; + + // replace the dataset + if (!items) { + this.itemsData = null; + } else if (items instanceof DataSet || items instanceof DataView) { + this.itemsData = items; + } else { + throw new TypeError('Data must be an instance of DataSet or DataView'); + } + + if (oldItemsData) { + // unsubscribe from old dataset + util.forEach(this.itemListeners, function (callback, event) { + oldItemsData.off(event, callback); + }); + + // remove all drawn items + ids = oldItemsData.getIds(); + this._onRemove(ids); + } + + if (this.itemsData) { + // subscribe to new dataset + var id = this.id; + util.forEach(this.itemListeners, function (callback, event) { + me.itemsData.on(event, callback, id); + }); + + // add all new items + ids = this.itemsData.getIds(); + this._onAdd(ids); + + // update the group holding all ungrouped items + this._updateUngrouped(); + } + + this.body.emitter.emit('_change', { queue: true }); +}; + +/** + * Get the current items + * @returns {vis.DataSet | null} + */ +ItemSet.prototype.getItems = function () { + return this.itemsData; +}; + +/** + * Set groups + * @param {vis.DataSet} groups + */ +ItemSet.prototype.setGroups = function (groups) { + var me = this, + ids; + + // unsubscribe from current dataset + if (this.groupsData) { + util.forEach(this.groupListeners, function (callback, event) { + me.groupsData.off(event, callback); + }); + + // remove all drawn groups + ids = this.groupsData.getIds(); + this.groupsData = null; + this._onRemoveGroups(ids); // note: this will cause a redraw + } + + // replace the dataset + if (!groups) { + this.groupsData = null; + } else if (groups instanceof DataSet || groups instanceof DataView) { + this.groupsData = groups; + } else { + throw new TypeError('Data must be an instance of DataSet or DataView'); + } + + if (this.groupsData) { + // go over all groups nesting + var groupsData = this.groupsData; + if (this.groupsData instanceof DataView) { + groupsData = this.groupsData.getDataSet(); + } + + groupsData.get().forEach(function (group) { + if (group.nestedGroups) { + group.nestedGroups.forEach(function (nestedGroupId) { + var updatedNestedGroup = groupsData.get(nestedGroupId); + updatedNestedGroup.nestedInGroup = group.id; + if (group.showNested == false) { + updatedNestedGroup.visible = false; + } + groupsData.update(updatedNestedGroup); + }); + } + }); + + // subscribe to new dataset + var id = this.id; + util.forEach(this.groupListeners, function (callback, event) { + me.groupsData.on(event, callback, id); + }); + + // draw all ms + ids = this.groupsData.getIds(); + this._onAddGroups(ids); + } + + // update the group holding all ungrouped items + this._updateUngrouped(); + + // update the order of all items in each group + this._order(); + + this.body.emitter.emit('_change', { queue: true }); +}; + +/** + * Get the current groups + * @returns {vis.DataSet | null} groups + */ +ItemSet.prototype.getGroups = function () { + return this.groupsData; +}; + +/** + * Remove an item by its id + * @param {string | number} id + */ +ItemSet.prototype.removeItem = function (id) { + var item = this.itemsData.get(id), + dataset = this.itemsData.getDataSet(); + + if (item) { + // confirm deletion + this.options.onRemove(item, function (item) { + if (item) { + // remove by id here, it is possible that an item has no id defined + // itself, so better not delete by the item itself + dataset.remove(id); + } + }); + } +}; + +/** + * Get the time of an item based on it's data and options.type + * @param {Object} itemData + * @returns {string} Returns the type + * @private + */ +ItemSet.prototype._getType = function (itemData) { + return itemData.type || this.options.type || (itemData.end ? 'range' : 'box'); +}; + +/** + * Get the group id for an item + * @param {Object} itemData + * @returns {string} Returns the groupId + * @private + */ +ItemSet.prototype._getGroupId = function (itemData) { + var type = this._getType(itemData); + if (type == 'background' && itemData.group == undefined) { + return BACKGROUND; + } else { + return this.groupsData ? itemData.group : UNGROUPED; + } +}; + +/** + * Handle updated items + * @param {number[]} ids + * @protected + */ +ItemSet.prototype._onUpdate = function (ids) { + var me = this; + + ids.forEach(function (id) { + var itemData = me.itemsData.get(id, me.itemOptions); + var item = me.items[id]; + var type = itemData ? me._getType(itemData) : null; + + var constructor = ItemSet.types[type]; + var selected; + + if (item) { + // update item + if (!constructor || !(item instanceof constructor)) { + // item type has changed, delete the item and recreate it + selected = item.selected; // preserve selection of this item + me._removeItem(item); + item = null; + } else { + me._updateItem(item, itemData); + } + } + + if (!item && itemData) { + // create item + if (constructor) { + item = new constructor(itemData, me.conversion, me.options); + item.id = id; // TODO: not so nice setting id afterwards + + me._addItem(item); + if (selected) { + this.selection.push(id); + item.select(); + } + } else if (type == 'rangeoverflow') { + // TODO: deprecated since version 2.1.0 (or 3.0.0?). cleanup some day + throw new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: ' + '.vis-item.vis-range .vis-item-content {overflow: visible;}'); + } else { + throw new TypeError('Unknown item type "' + type + '"'); + } + } + }.bind(this)); + + this._order(); + this.body.emitter.emit('_change', { queue: true }); +}; + +/** + * Handle added items + * @param {number[]} ids + * @protected + */ +ItemSet.prototype._onAdd = ItemSet.prototype._onUpdate; + +/** + * Handle removed items + * @param {number[]} ids + * @protected + */ +ItemSet.prototype._onRemove = function (ids) { + var count = 0; + var me = this; + ids.forEach(function (id) { + var item = me.items[id]; + if (item) { + count++; + me._removeItem(item); + } + }); + + if (count) { + // update order + this._order(); + this.body.emitter.emit('_change', { queue: true }); + } +}; + +/** + * Update the order of item in all groups + * @private + */ +ItemSet.prototype._order = function () { + // reorder the items in all groups + // TODO: optimization: only reorder groups affected by the changed items + util.forEach(this.groups, function (group) { + group.order(); + }); +}; + +/** + * Handle updated groups + * @param {number[]} ids + * @private + */ +ItemSet.prototype._onUpdateGroups = function (ids) { + this._onAddGroups(ids); +}; + +/** + * Handle changed groups (added or updated) + * @param {number[]} ids + * @private + */ +ItemSet.prototype._onAddGroups = function (ids) { + var me = this; + + ids.forEach(function (id) { + var groupData = me.groupsData.get(id); + var group = me.groups[id]; + + if (!group) { + // check for reserved ids + if (id == UNGROUPED || id == BACKGROUND) { + throw new Error('Illegal group id. ' + id + ' is a reserved id.'); + } + + var groupOptions = (0, _create2['default'])(me.options); + util.extend(groupOptions, { + height: null + }); + + group = new Group(id, groupData, me); + me.groups[id] = group; + + // add items with this groupId to the new group + for (var itemId in me.items) { + if (me.items.hasOwnProperty(itemId)) { + var item = me.items[itemId]; + if (item.data.group == id) { + group.add(item); + } + } + } + + group.order(); + group.show(); + } else { + // update group + group.setData(groupData); + } + }); + + this.body.emitter.emit('_change', { queue: true }); +}; + +/** + * Handle removed groups + * @param {number[]} ids + * @private + */ +ItemSet.prototype._onRemoveGroups = function (ids) { + var groups = this.groups; + ids.forEach(function (id) { + var group = groups[id]; + + if (group) { + group.hide(); + delete groups[id]; + } + }); + + this.markDirty(); + + this.body.emitter.emit('_change', { queue: true }); +}; + +/** + * Reorder the groups if needed + * @return {boolean} changed + * @private + */ +ItemSet.prototype._orderGroups = function () { + if (this.groupsData) { + // reorder the groups + var groupIds = this.groupsData.getIds({ + order: this.options.groupOrder + }); + + groupIds = this._orderNestedGroups(groupIds); + + var changed = !util.equalArray(groupIds, this.groupIds); + if (changed) { + // hide all groups, removes them from the DOM + var groups = this.groups; + groupIds.forEach(function (groupId) { + groups[groupId].hide(); + }); + + // show the groups again, attach them to the DOM in correct order + groupIds.forEach(function (groupId) { + groups[groupId].show(); + }); + + this.groupIds = groupIds; + } + + return changed; + } else { + return false; + } +}; + +/** + * Reorder the nested groups + * + * @param {Array.} groupIds + * @returns {Array.} + * @private + */ +ItemSet.prototype._orderNestedGroups = function (groupIds) { + var newGroupIdsOrder = []; + + groupIds.forEach(function (groupId) { + var groupData = this.groupsData.get(groupId); + if (!groupData.nestedInGroup) { + newGroupIdsOrder.push(groupId); + } + if (groupData.nestedGroups) { + var nestedGroups = this.groupsData.get({ + filter: function filter(nestedGroup) { + return nestedGroup.nestedInGroup == groupId; + }, + order: this.options.groupOrder + }); + var nestedGroupIds = nestedGroups.map(function (nestedGroup) { + return nestedGroup.id; + }); + newGroupIdsOrder = newGroupIdsOrder.concat(nestedGroupIds); + } + }, this); + return newGroupIdsOrder; +}; + +/** + * Add a new item + * @param {Item} item + * @private + */ +ItemSet.prototype._addItem = function (item) { + this.items[item.id] = item; + + // add to group + var groupId = this._getGroupId(item.data); + var group = this.groups[groupId]; + + if (!group) { + item.groupShowing = false; + } else if (group && group.data && group.data.showNested) { + item.groupShowing = true; + } + + if (group) group.add(item); +}; + +/** + * Update an existing item + * @param {Item} item + * @param {Object} itemData + * @private + */ +ItemSet.prototype._updateItem = function (item, itemData) { + // update the items data (will redraw the item when displayed) + item.setData(itemData); + + var groupId = this._getGroupId(item.data); + var group = this.groups[groupId]; + if (!group) { + item.groupShowing = false; + } else if (group && group.data && group.data.showNested) { + item.groupShowing = true; + } +}; + +/** + * Delete an item from the ItemSet: remove it from the DOM, from the map + * with items, and from the map with visible items, and from the selection + * @param {Item} item + * @private + */ +ItemSet.prototype._removeItem = function (item) { + // remove from DOM + item.hide(); + + // remove from items + delete this.items[item.id]; + + // remove from selection + var index = this.selection.indexOf(item.id); + if (index != -1) this.selection.splice(index, 1); + + // remove from group + item.parent && item.parent.remove(item); +}; + +/** + * Create an array containing all items being a range (having an end date) + * @param {Array.} array + * @returns {Array} + * @private + */ +ItemSet.prototype._constructByEndArray = function (array) { + var endArray = []; + + for (var i = 0; i < array.length; i++) { + if (array[i] instanceof RangeItem) { + endArray.push(array[i]); + } + } + return endArray; +}; + +/** + * Register the clicked item on touch, before dragStart is initiated. + * + * dragStart is initiated from a mousemove event, AFTER the mouse/touch is + * already moving. Therefore, the mouse/touch can sometimes be above an other + * DOM element than the item itself. + * + * @param {Event} event + * @private + */ +ItemSet.prototype._onTouch = function (event) { + // store the touched item, used in _onDragStart + this.touchParams.item = this.itemFromTarget(event); + this.touchParams.dragLeftItem = event.target.dragLeftItem || false; + this.touchParams.dragRightItem = event.target.dragRightItem || false; + this.touchParams.itemProps = null; +}; + +/** + * Given an group id, returns the index it has. + * + * @param {number} groupId + * @returns {number} index / groupId + * @private + */ +ItemSet.prototype._getGroupIndex = function (groupId) { + for (var i = 0; i < this.groupIds.length; i++) { + if (groupId == this.groupIds[i]) return i; + } +}; + +/** + * Start dragging the selected events + * @param {Event} event + * @private + */ +ItemSet.prototype._onDragStart = function (event) { + if (this.touchParams.itemIsDragging) { + return; + } + var item = this.touchParams.item || null; + var me = this; + var props; + + if (item && (item.selected || this.options.itemsAlwaysDraggable.item)) { + + if (this.options.editable.overrideItems && !this.options.editable.updateTime && !this.options.editable.updateGroup) { + return; + } + + // override options.editable + if (item.editable != null && !item.editable.updateTime && !item.editable.updateGroup && !this.options.editable.overrideItems) { + return; + } + + var dragLeftItem = this.touchParams.dragLeftItem; + var dragRightItem = this.touchParams.dragRightItem; + this.touchParams.itemIsDragging = true; + this.touchParams.selectedItem = item; + + if (dragLeftItem) { + props = { + item: dragLeftItem, + initialX: event.center.x, + dragLeft: true, + data: this._cloneItemData(item.data) + }; + + this.touchParams.itemProps = [props]; + } else if (dragRightItem) { + props = { + item: dragRightItem, + initialX: event.center.x, + dragRight: true, + data: this._cloneItemData(item.data) + }; + + this.touchParams.itemProps = [props]; + } else if (this.options.editable.add && (event.srcEvent.ctrlKey || event.srcEvent.metaKey)) { + // create a new range item when dragging with ctrl key down + this._onDragStartAddItem(event); + } else { + if (this.groupIds.length < 1) { + // Mitigates a race condition if _onDragStart() is + // called after markDirty() without redraw() being called between. + this.redraw(); + } + + var baseGroupIndex = this._getGroupIndex(item.data.group); + + var itemsToDrag = this.options.itemsAlwaysDraggable.item && !item.selected ? [item.id] : this.getSelection(); + + this.touchParams.itemProps = itemsToDrag.map(function (id) { + var item = me.items[id]; + var groupIndex = me._getGroupIndex(item.data.group); + return { + item: item, + initialX: event.center.x, + groupOffset: baseGroupIndex - groupIndex, + data: this._cloneItemData(item.data) + }; + }.bind(this)); + } + + event.stopPropagation(); + } else if (this.options.editable.add && (event.srcEvent.ctrlKey || event.srcEvent.metaKey)) { + // create a new range item when dragging with ctrl key down + this._onDragStartAddItem(event); + } +}; + +/** + * Start creating a new range item by dragging. + * @param {Event} event + * @private + */ +ItemSet.prototype._onDragStartAddItem = function (event) { + var xAbs; + var x; + var snap = this.options.snap || null; + + if (this.options.rtl) { + xAbs = util.getAbsoluteRight(this.dom.frame); + x = xAbs - event.center.x + 10; // plus 10 to compensate for the drag starting as soon as you've moved 10px + } else { + xAbs = util.getAbsoluteLeft(this.dom.frame); + x = event.center.x - xAbs - 10; // minus 10 to compensate for the drag starting as soon as you've moved 10px + } + + var time = this.body.util.toTime(x); + var scale = this.body.util.getScale(); + var step = this.body.util.getStep(); + var start = snap ? snap(time, scale, step) : time; + var end = start; + + var itemData = { + type: 'range', + start: start, + end: end, + content: 'new item' + }; + + var id = util.randomUUID(); + itemData[this.itemsData._fieldId] = id; + + var group = this.groupFromTarget(event); + if (group) { + itemData.group = group.groupId; + } + var newItem = new RangeItem(itemData, this.conversion, this.options); + newItem.id = id; // TODO: not so nice setting id afterwards + newItem.data = this._cloneItemData(itemData); + this._addItem(newItem); + this.touchParams.selectedItem = newItem; + + var props = { + item: newItem, + initialX: event.center.x, + data: newItem.data + }; + + if (this.options.rtl) { + props.dragLeft = true; + } else { + props.dragRight = true; + } + this.touchParams.itemProps = [props]; + + event.stopPropagation(); +}; + +/** + * Drag selected items + * @param {Event} event + * @private + */ +ItemSet.prototype._onDrag = function (event) { + if (this.touchParams.itemProps) { + event.stopPropagation(); + + var me = this; + var snap = this.options.snap || null; + var xOffset; + + if (this.options.rtl) { + xOffset = this.body.dom.root.offsetLeft + this.body.domProps.right.width; + } else { + xOffset = this.body.dom.root.offsetLeft + this.body.domProps.left.width; + } + + var scale = this.body.util.getScale(); + var step = this.body.util.getStep(); + + //only calculate the new group for the item that's actually dragged + var selectedItem = this.touchParams.selectedItem; + var updateGroupAllowed = (this.options.editable.overrideItems || selectedItem.editable == null) && this.options.editable.updateGroup || !this.options.editable.overrideItems && selectedItem.editable != null && selectedItem.editable.updateGroup; + var newGroupBase = null; + if (updateGroupAllowed && selectedItem) { + if (selectedItem.data.group != undefined) { + // drag from one group to another + var group = me.groupFromTarget(event); + if (group) { + //we know the offset for all items, so the new group for all items + //will be relative to this one. + newGroupBase = this._getGroupIndex(group.groupId); + } + } + } + + // move + this.touchParams.itemProps.forEach(function (props) { + var current = me.body.util.toTime(event.center.x - xOffset); + var initial = me.body.util.toTime(props.initialX - xOffset); + var offset; + var initialStart; + var initialEnd; + var start; + var end; + + if (this.options.rtl) { + offset = -(current - initial); // ms + } else { + offset = current - initial; // ms + } + + var itemData = this._cloneItemData(props.item.data); // clone the data + if (props.item.editable != null && !props.item.editable.updateTime && !props.item.editable.updateGroup && !me.options.editable.overrideItems) { + return; + } + + var updateTimeAllowed = (this.options.editable.overrideItems || selectedItem.editable == null) && this.options.editable.updateTime || !this.options.editable.overrideItems && selectedItem.editable != null && selectedItem.editable.updateTime; + if (updateTimeAllowed) { + if (props.dragLeft) { + // drag left side of a range item + if (this.options.rtl) { + if (itemData.end != undefined) { + initialEnd = util.convert(props.data.end, 'Date'); + end = new Date(initialEnd.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.end = snap ? snap(end, scale, step) : end; + } + } else { + if (itemData.start != undefined) { + initialStart = util.convert(props.data.start, 'Date'); + start = new Date(initialStart.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.start = snap ? snap(start, scale, step) : start; + } + } + } else if (props.dragRight) { + // drag right side of a range item + if (this.options.rtl) { + if (itemData.start != undefined) { + initialStart = util.convert(props.data.start, 'Date'); + start = new Date(initialStart.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.start = snap ? snap(start, scale, step) : start; + } + } else { + if (itemData.end != undefined) { + initialEnd = util.convert(props.data.end, 'Date'); + end = new Date(initialEnd.valueOf() + offset); + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.end = snap ? snap(end, scale, step) : end; + } + } + } else { + // drag both start and end + if (itemData.start != undefined) { + + initialStart = util.convert(props.data.start, 'Date').valueOf(); + start = new Date(initialStart + offset); + + if (itemData.end != undefined) { + initialEnd = util.convert(props.data.end, 'Date'); + var duration = initialEnd.valueOf() - initialStart.valueOf(); + + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.start = snap ? snap(start, scale, step) : start; + itemData.end = new Date(itemData.start.valueOf() + duration); + } else { + // TODO: pass a Moment instead of a Date to snap(). (Breaking change) + itemData.start = snap ? snap(start, scale, step) : start; + } + } + } + } + + if (updateGroupAllowed && !props.dragLeft && !props.dragRight && newGroupBase != null) { + if (itemData.group != undefined) { + var newOffset = newGroupBase - props.groupOffset; + + //make sure we stay in bounds + newOffset = Math.max(0, newOffset); + newOffset = Math.min(me.groupIds.length - 1, newOffset); + itemData.group = me.groupIds[newOffset]; + } + } + + // confirm moving the item + itemData = this._cloneItemData(itemData); // convert start and end to the correct type + me.options.onMoving(itemData, function (itemData) { + if (itemData) { + props.item.setData(this._cloneItemData(itemData, 'Date')); + } + }.bind(this)); + }.bind(this)); + + this.body.emitter.emit('_change'); + } +}; + +/** + * Move an item to another group + * @param {Item} item + * @param {string | number} groupId + * @private + */ +ItemSet.prototype._moveToGroup = function (item, groupId) { + var group = this.groups[groupId]; + if (group && group.groupId != item.data.group) { + var oldGroup = item.parent; + oldGroup.remove(item); + oldGroup.order(); + + item.data.group = group.groupId; + + group.add(item); + group.order(); + } +}; + +/** + * End of dragging selected items + * @param {Event} event + * @private + */ +ItemSet.prototype._onDragEnd = function (event) { + this.touchParams.itemIsDragging = false; + if (this.touchParams.itemProps) { + event.stopPropagation(); + + var me = this; + var dataset = this.itemsData.getDataSet(); + var itemProps = this.touchParams.itemProps; + this.touchParams.itemProps = null; + + itemProps.forEach(function (props) { + var id = props.item.id; + var exists = me.itemsData.get(id, me.itemOptions) != null; + + if (!exists) { + // add a new item + me.options.onAdd(props.item.data, function (itemData) { + me._removeItem(props.item); // remove temporary item + if (itemData) { + me.itemsData.getDataSet().add(itemData); + } + + // force re-stacking of all items next redraw + me.body.emitter.emit('_change'); + }); + } else { + // update existing item + var itemData = this._cloneItemData(props.item.data); // convert start and end to the correct type + me.options.onMove(itemData, function (itemData) { + if (itemData) { + // apply changes + itemData[dataset._fieldId] = id; // ensure the item contains its id (can be undefined) + dataset.update(itemData); + } else { + // restore original values + props.item.setData(props.data); + + me.body.emitter.emit('_change'); + } + }); + } + }.bind(this)); + } +}; + +ItemSet.prototype._onGroupClick = function (event) { + var group = this.groupFromTarget(event); + + if (!group || !group.nestedGroups) return; + + var groupsData = this.groupsData.getDataSet(); + + var nestingGroup = groupsData.get(group.groupId); + if (nestingGroup.showNested == undefined) { + nestingGroup.showNested = true; + } + nestingGroup.showNested = !nestingGroup.showNested; + + var nestedGroups = groupsData.get(group.nestedGroups).map(function (nestedGroup) { + nestedGroup.visible = nestingGroup.showNested; + return nestedGroup; + }); + + groupsData.update(nestedGroups.concat(nestingGroup)); + + if (nestingGroup.showNested) { + util.removeClassName(group.dom.label, 'collapsed'); + util.addClassName(group.dom.label, 'expanded'); + } else { + util.removeClassName(group.dom.label, 'expanded'); + var collapsedDirClassName = this.options.rtl ? 'collapsed-rtl' : 'collapsed'; + util.addClassName(group.dom.label, collapsedDirClassName); + } +}; + +ItemSet.prototype._onGroupDragStart = function (event) { + if (this.options.groupEditable.order) { + this.groupTouchParams.group = this.groupFromTarget(event); + + if (this.groupTouchParams.group) { + event.stopPropagation(); + + this.groupTouchParams.originalOrder = this.groupsData.getIds({ + order: this.options.groupOrder + }); + } + } +}; + +ItemSet.prototype._onGroupDrag = function (event) { + if (this.options.groupEditable.order && this.groupTouchParams.group) { + event.stopPropagation(); + + var groupsData = this.groupsData; + if (this.groupsData instanceof DataView) { + groupsData = this.groupsData.getDataSet(); + } + // drag from one group to another + var group = this.groupFromTarget(event); + + // try to avoid toggling when groups differ in height + if (group && group.height != this.groupTouchParams.group.height) { + var movingUp = group.top < this.groupTouchParams.group.top; + var clientY = event.center ? event.center.y : event.clientY; + var targetGroupTop = util.getAbsoluteTop(group.dom.foreground); + var draggedGroupHeight = this.groupTouchParams.group.height; + if (movingUp) { + // skip swapping the groups when the dragged group is not below clientY afterwards + if (targetGroupTop + draggedGroupHeight < clientY) { + return; + } + } else { + var targetGroupHeight = group.height; + // skip swapping the groups when the dragged group is not below clientY afterwards + if (targetGroupTop + targetGroupHeight - draggedGroupHeight > clientY) { + return; + } + } + } + + if (group && group != this.groupTouchParams.group) { + var targetGroup = groupsData.get(group.groupId); + var draggedGroup = groupsData.get(this.groupTouchParams.group.groupId); + + // switch groups + if (draggedGroup && targetGroup) { + this.options.groupOrderSwap(draggedGroup, targetGroup, groupsData); + groupsData.update(draggedGroup); + groupsData.update(targetGroup); + } + + // fetch current order of groups + var newOrder = groupsData.getIds({ + order: this.options.groupOrder + }); + + // in case of changes since _onGroupDragStart + if (!util.equalArray(newOrder, this.groupTouchParams.originalOrder)) { + var origOrder = this.groupTouchParams.originalOrder; + var draggedId = this.groupTouchParams.group.groupId; + var numGroups = Math.min(origOrder.length, newOrder.length); + var curPos = 0; + var newOffset = 0; + var orgOffset = 0; + while (curPos < numGroups) { + // as long as the groups are where they should be step down along the groups order + while (curPos + newOffset < numGroups && curPos + orgOffset < numGroups && newOrder[curPos + newOffset] == origOrder[curPos + orgOffset]) { + curPos++; + } + + // all ok + if (curPos + newOffset >= numGroups) { + break; + } + + // not all ok + // if dragged group was move upwards everything below should have an offset + if (newOrder[curPos + newOffset] == draggedId) { + newOffset = 1; + } + // if dragged group was move downwards everything above should have an offset + else if (origOrder[curPos + orgOffset] == draggedId) { + orgOffset = 1; + } + // found a group (apart from dragged group) that has the wrong position -> switch with the + // group at the position where other one should be, fix index arrays and continue + else { + var slippedPosition = newOrder.indexOf(origOrder[curPos + orgOffset]); + var switchGroup = groupsData.get(newOrder[curPos + newOffset]); + var shouldBeGroup = groupsData.get(origOrder[curPos + orgOffset]); + this.options.groupOrderSwap(switchGroup, shouldBeGroup, groupsData); + groupsData.update(switchGroup); + groupsData.update(shouldBeGroup); + + var switchGroupId = newOrder[curPos + newOffset]; + newOrder[curPos + newOffset] = origOrder[curPos + orgOffset]; + newOrder[slippedPosition] = switchGroupId; + + curPos++; + } + } + } + } + } +}; + +ItemSet.prototype._onGroupDragEnd = function (event) { + if (this.options.groupEditable.order && this.groupTouchParams.group) { + event.stopPropagation(); + + // update existing group + var me = this; + var id = me.groupTouchParams.group.groupId; + var dataset = me.groupsData.getDataSet(); + var groupData = util.extend({}, dataset.get(id)); // clone the data + me.options.onMoveGroup(groupData, function (groupData) { + if (groupData) { + // apply changes + groupData[dataset._fieldId] = id; // ensure the group contains its id (can be undefined) + dataset.update(groupData); + } else { + + // fetch current order of groups + var newOrder = dataset.getIds({ + order: me.options.groupOrder + }); + + // restore original order + if (!util.equalArray(newOrder, me.groupTouchParams.originalOrder)) { + var origOrder = me.groupTouchParams.originalOrder; + var numGroups = Math.min(origOrder.length, newOrder.length); + var curPos = 0; + while (curPos < numGroups) { + // as long as the groups are where they should be step down along the groups order + while (curPos < numGroups && newOrder[curPos] == origOrder[curPos]) { + curPos++; + } + + // all ok + if (curPos >= numGroups) { + break; + } + + // found a group that has the wrong position -> switch with the + // group at the position where other one should be, fix index arrays and continue + var slippedPosition = newOrder.indexOf(origOrder[curPos]); + var switchGroup = dataset.get(newOrder[curPos]); + var shouldBeGroup = dataset.get(origOrder[curPos]); + me.options.groupOrderSwap(switchGroup, shouldBeGroup, dataset); + dataset.update(switchGroup); + dataset.update(shouldBeGroup); + + var switchGroupId = newOrder[curPos]; + newOrder[curPos] = origOrder[curPos]; + newOrder[slippedPosition] = switchGroupId; + + curPos++; + } + } + } + }); + + me.body.emitter.emit('groupDragged', { groupId: id }); + } +}; + +/** + * Handle selecting/deselecting an item when tapping it + * @param {Event} event + * @private + */ +ItemSet.prototype._onSelectItem = function (event) { + if (!this.options.selectable) return; + + var ctrlKey = event.srcEvent && (event.srcEvent.ctrlKey || event.srcEvent.metaKey); + var shiftKey = event.srcEvent && event.srcEvent.shiftKey; + if (ctrlKey || shiftKey) { + this._onMultiSelectItem(event); + return; + } + + var oldSelection = this.getSelection(); + + var item = this.itemFromTarget(event); + var selection = item ? [item.id] : []; + this.setSelection(selection); + + var newSelection = this.getSelection(); + + // emit a select event, + // except when old selection is empty and new selection is still empty + if (newSelection.length > 0 || oldSelection.length > 0) { + this.body.emitter.emit('select', { + items: newSelection, + event: event + }); + } +}; + +/** + * Handle hovering an item + * @param {Event} event + * @private + */ +ItemSet.prototype._onMouseOver = function (event) { + var item = this.itemFromTarget(event); + if (!item) return; + + // Item we just left + var related = this.itemFromRelatedTarget(event); + if (item === related) { + // We haven't changed item, just element in the item + return; + } + + var title = item.getTitle(); + if (this.options.showTooltips && title) { + if (this.popup == null) { + this.popup = new Popup(this.body.dom.root, this.options.tooltip.overflowMethod || 'flip'); + } + + this.popup.setText(title); + var container = this.body.dom.centerContainer; + this.popup.setPosition(event.clientX - util.getAbsoluteLeft(container) + container.offsetLeft, event.clientY - util.getAbsoluteTop(container) + container.offsetTop); + this.popup.show(); + } else { + // Hovering over item without a title, hide popup + // Needed instead of _just_ in _onMouseOut due to #2572 + if (this.popup != null) { + this.popup.hide(); + } + } + + this.body.emitter.emit('itemover', { + item: item.id, + event: event + }); +}; +ItemSet.prototype._onMouseOut = function (event) { + var item = this.itemFromTarget(event); + if (!item) return; + + // Item we are going to + var related = this.itemFromRelatedTarget(event); + if (item === related) { + // We aren't changing item, just element in the item + return; + } + + if (this.popup != null) { + this.popup.hide(); + } + + this.body.emitter.emit('itemout', { + item: item.id, + event: event + }); +}; +ItemSet.prototype._onMouseMove = function (event) { + var item = this.itemFromTarget(event); + if (!item) return; + + if (this.options.showTooltips && this.options.tooltip.followMouse) { + if (this.popup) { + if (!this.popup.hidden) { + var container = this.body.dom.centerContainer; + this.popup.setPosition(event.clientX - util.getAbsoluteLeft(container) + container.offsetLeft, event.clientY - util.getAbsoluteTop(container) + container.offsetTop); + this.popup.show(); // Redraw + } + } + } +}; + +/** + * Handle mousewheel + * @param {Event} event The event + * @private + */ +ItemSet.prototype._onMouseWheel = function (event) { + if (this.touchParams.itemIsDragging) { + this._onDragEnd(event); + } +}; + +/** + * Handle updates of an item on double tap + * @param {vis.Item} item The item + * @private + */ +ItemSet.prototype._onUpdateItem = function (item) { + if (!this.options.selectable) return; + if (!this.options.editable.add) return; + + var me = this; + + if (item) { + // execute async handler to update the item (or cancel it) + var itemData = me.itemsData.get(item.id); // get a clone of the data from the dataset + this.options.onUpdate(itemData, function (itemData) { + if (itemData) { + me.itemsData.getDataSet().update(itemData); + } + }); + } +}; + +/** + * Handle drop event of data on item + * Only called when `objectData.target === 'item'. + * @param {Event} event The event + * @private + */ +ItemSet.prototype._onDropObjectOnItem = function (event) { + var item = this.itemFromTarget(event); + var objectData = JSON.parse(event.dataTransfer.getData("text")); + this.options.onDropObjectOnItem(objectData, item); +}; + +/** + * Handle creation of an item on double tap or drop of a drag event + * @param {Event} event The event + * @private + */ +ItemSet.prototype._onAddItem = function (event) { + if (!this.options.selectable) return; + if (!this.options.editable.add) return; + + var me = this; + var snap = this.options.snap || null; + var xAbs; + var x; + // add item + if (this.options.rtl) { + xAbs = util.getAbsoluteRight(this.dom.frame); + x = xAbs - event.center.x; + } else { + xAbs = util.getAbsoluteLeft(this.dom.frame); + x = event.center.x - xAbs; + } + // var xAbs = util.getAbsoluteLeft(this.dom.frame); + // var x = event.center.x - xAbs; + var start = this.body.util.toTime(x); + var scale = this.body.util.getScale(); + var step = this.body.util.getStep(); + var end; + + var newItemData; + if (event.type == 'drop') { + newItemData = JSON.parse(event.dataTransfer.getData("text")); + newItemData.content = newItemData.content ? newItemData.content : 'new item'; + newItemData.start = newItemData.start ? newItemData.start : snap ? snap(start, scale, step) : start; + newItemData.type = newItemData.type || 'box'; + newItemData[this.itemsData._fieldId] = newItemData.id || util.randomUUID(); + + if (newItemData.type == 'range' && !newItemData.end) { + end = this.body.util.toTime(x + this.props.width / 5); + newItemData.end = snap ? snap(end, scale, step) : end; + } + } else { + newItemData = { + start: snap ? snap(start, scale, step) : start, + content: 'new item' + }; + newItemData[this.itemsData._fieldId] = util.randomUUID(); + + // when default type is a range, add a default end date to the new item + if (this.options.type === 'range') { + end = this.body.util.toTime(x + this.props.width / 5); + newItemData.end = snap ? snap(end, scale, step) : end; + } + } + + var group = this.groupFromTarget(event); + if (group) { + newItemData.group = group.groupId; + } + + // execute async handler to customize (or cancel) adding an item + newItemData = this._cloneItemData(newItemData); // convert start and end to the correct type + this.options.onAdd(newItemData, function (item) { + if (item) { + me.itemsData.getDataSet().add(item); + if (event.type == 'drop') { + me.setSelection([item.id]); + } + // TODO: need to trigger a redraw? + } + }); +}; + +/** + * Handle selecting/deselecting multiple items when holding an item + * @param {Event} event + * @private + */ +ItemSet.prototype._onMultiSelectItem = function (event) { + if (!this.options.selectable) return; + + var item = this.itemFromTarget(event); + + if (item) { + // multi select items (if allowed) + + var selection = this.options.multiselect ? this.getSelection() // take current selection + : []; // deselect current selection + + var shiftKey = event.srcEvent && event.srcEvent.shiftKey || false; + + if (shiftKey && this.options.multiselect) { + // select all items between the old selection and the tapped item + var itemGroup = this.itemsData.get(item.id).group; + + // when filtering get the group of the last selected item + var lastSelectedGroup = undefined; + if (this.options.multiselectPerGroup) { + if (selection.length > 0) { + lastSelectedGroup = this.itemsData.get(selection[0]).group; + } + } + + // determine the selection range + if (!this.options.multiselectPerGroup || lastSelectedGroup == undefined || lastSelectedGroup == itemGroup) { + selection.push(item.id); + } + var range = ItemSet._getItemRange(this.itemsData.get(selection, this.itemOptions)); + + if (!this.options.multiselectPerGroup || lastSelectedGroup == itemGroup) { + // select all items within the selection range + selection = []; + for (var id in this.items) { + if (this.items.hasOwnProperty(id)) { + var _item = this.items[id]; + var start = _item.data.start; + var end = _item.data.end !== undefined ? _item.data.end : start; + + if (start >= range.min && end <= range.max && (!this.options.multiselectPerGroup || lastSelectedGroup == this.itemsData.get(_item.id).group) && !(_item instanceof BackgroundItem)) { + selection.push(_item.id); // do not use id but item.id, id itself is stringified + } + } + } + } + } else { + // add/remove this item from the current selection + var index = selection.indexOf(item.id); + if (index == -1) { + // item is not yet selected -> select it + selection.push(item.id); + } else { + // item is already selected -> deselect it + selection.splice(index, 1); + } + } + + this.setSelection(selection); + + this.body.emitter.emit('select', { + items: this.getSelection(), + event: event + }); + } +}; + +/** + * Calculate the time range of a list of items + * @param {Array.} itemsData + * @return {{min: Date, max: Date}} Returns the range of the provided items + * @private + */ +ItemSet._getItemRange = function (itemsData) { + var max = null; + var min = null; + + itemsData.forEach(function (data) { + if (min == null || data.start < min) { + min = data.start; + } + + if (data.end != undefined) { + if (max == null || data.end > max) { + max = data.end; + } + } else { + if (max == null || data.start > max) { + max = data.start; + } + } + }); + + return { + min: min, + max: max + }; +}; + +/** + * Find an item from an element: + * searches for the attribute 'timeline-item' in the element's tree + * @param {HTMLElement} element + * @return {Item | null} item + */ +ItemSet.prototype.itemFromElement = function (element) { + var cur = element; + while (cur) { + if (cur.hasOwnProperty('timeline-item')) { + return cur['timeline-item']; + } + cur = cur.parentNode; + } + + return null; +}; + +/** + * Find an item from an event target: + * searches for the attribute 'timeline-item' in the event target's element tree + * @param {Event} event + * @return {Item | null} item + */ +ItemSet.prototype.itemFromTarget = function (event) { + return this.itemFromElement(event.target); +}; + +/** + * Find an item from an event's related target: + * searches for the attribute 'timeline-item' in the related target's element tree + * @param {Event} event + * @return {Item | null} item + */ +ItemSet.prototype.itemFromRelatedTarget = function (event) { + return this.itemFromElement(event.relatedTarget); +}; + +/** + * Find the Group from an event target: + * searches for the attribute 'timeline-group' in the event target's element tree + * @param {Event} event + * @return {Group | null} group + */ +ItemSet.prototype.groupFromTarget = function (event) { + var clientY = event.center ? event.center.y : event.clientY; + var groupIds = this.groupIds; + + if (groupIds.length <= 0 && this.groupsData) { + groupIds = this.groupsData.getIds({ + order: this.options.groupOrder + }); + } + + for (var i = 0; i < groupIds.length; i++) { + var groupId = groupIds[i]; + var group = this.groups[groupId]; + var foreground = group.dom.foreground; + var top = util.getAbsoluteTop(foreground); + if (clientY > top && clientY < top + foreground.offsetHeight) { + return group; + } + + if (this.options.orientation.item === 'top') { + if (i === this.groupIds.length - 1 && clientY > top) { + return group; + } + } else { + if (i === 0 && clientY < top + foreground.offset) { + return group; + } + } + } + + return null; +}; + +/** + * Find the ItemSet from an event target: + * searches for the attribute 'timeline-itemset' in the event target's element tree + * @param {Event} event + * @return {ItemSet | null} item + */ +ItemSet.itemSetFromTarget = function (event) { + var target = event.target; + while (target) { + if (target.hasOwnProperty('timeline-itemset')) { + return target['timeline-itemset']; + } + target = target.parentNode; + } + + return null; +}; + +/** + * Clone the data of an item, and "normalize" it: convert the start and end date + * to the type (Date, Moment, ...) configured in the DataSet. If not configured, + * start and end are converted to Date. + * @param {Object} itemData, typically `item.data` + * @param {string} [type] Optional Date type. If not provided, the type from the DataSet is taken + * @return {Object} The cloned object + * @private + */ +ItemSet.prototype._cloneItemData = function (itemData, type) { + var clone = util.extend({}, itemData); + + if (!type) { + // convert start and end date to the type (Date, Moment, ...) configured in the DataSet + type = this.itemsData.getDataSet()._options.type; + } + + if (clone.start != undefined) { + clone.start = util.convert(clone.start, type && type.start || 'Date'); + } + if (clone.end != undefined) { + clone.end = util.convert(clone.end, type && type.end || 'Date'); + } + + return clone; +}; + +module.exports = ItemSet; + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// Utility functions for ordering and stacking of items +var EPSILON = 0.001; // used when checking collisions, to prevent round-off errors + +/** + * Order items by their start data + * @param {Item[]} items + */ +exports.orderByStart = function (items) { + items.sort(function (a, b) { + return a.data.start - b.data.start; + }); +}; + +/** + * Order items by their end date. If they have no end date, their start date + * is used. + * @param {Item[]} items + */ +exports.orderByEnd = function (items) { + items.sort(function (a, b) { + var aTime = 'end' in a.data ? a.data.end : a.data.start, + bTime = 'end' in b.data ? b.data.end : b.data.start; + + return aTime - bTime; + }); +}; + +/** + * Adjust vertical positions of the items such that they don't overlap each + * other. + * @param {Item[]} items + * All visible items + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * Margins between items and between items and the axis. + * @param {boolean} [force=false] + * If true, all items will be repositioned. If false (default), only + * items having a top===null will be re-stacked + */ +exports.stack = function (items, margin, force) { + if (force) { + // reset top position of all items + for (var i = 0; i < items.length; i++) { + items[i].top = null; + } + } + + // calculate new, non-overlapping positions + for (var i = 0; i < items.length; i++) { + // eslint-disable-line no-redeclare + var item = items[i]; + if (item.stack && item.top === null) { + // initialize top position + item.top = margin.axis; + + do { + // TODO: optimize checking for overlap. when there is a gap without items, + // you only need to check for items from the next item on, not from zero + var collidingItem = null; + for (var j = 0, jj = items.length; j < jj; j++) { + var other = items[j]; + if (other.top !== null && other !== item && other.stack && exports.collision(item, other, margin.item, other.options.rtl)) { + collidingItem = other; + break; + } + } + + if (collidingItem != null) { + // There is a collision. Reposition the items above the colliding element + item.top = collidingItem.top + collidingItem.height + margin.item.vertical; + } + } while (collidingItem); + } + } +}; + +/** + * Adjust vertical positions of the items within a single subgroup such that they + * don't overlap each other. + * @param {Item[]} items + * All items withina subgroup + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * Margins between items and between items and the axis. + * @param {subgroup} subgroup + * The subgroup that is being stacked + */ +exports.substack = function (items, margin, subgroup) { + for (var i = 0; i < items.length; i++) { + items[i].top = null; + } + + // Set the initial height + var subgroupHeight = subgroup.height; + + // calculate new, non-overlapping positions + for (i = 0; i < items.length; i++) { + var item = items[i]; + + if (item.stack && item.top === null) { + // initialize top position + item.top = item.baseTop; //margin.axis + item.baseTop; + + do { + // TODO: optimize checking for overlap. when there is a gap without items, + // you only need to check for items from the next item on, not from zero + var collidingItem = null; + for (var j = 0, jj = items.length; j < jj; j++) { + var other = items[j]; + if (other.top !== null && other !== item /*&& other.stack*/ && exports.collision(item, other, margin.item, other.options.rtl)) { + collidingItem = other; + break; + } + } + + if (collidingItem != null) { + // There is a collision. Reposition the items above the colliding element + item.top = collidingItem.top + collidingItem.height + margin.item.vertical; // + item.baseTop; + } + + if (item.top + item.height > subgroupHeight) { + subgroupHeight = item.top + item.height; + } + } while (collidingItem); + } + } + + // Set the new height + subgroup.height = subgroupHeight - subgroup.top + 0.5 * margin.item.vertical; +}; + +/** + * Adjust vertical positions of the items without stacking them + * @param {Item[]} items + * All visible items + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * Margins between items and between items and the axis. + * @param {subgroups[]} subgroups + * All subgroups + * @param {boolean} stackSubgroups + */ +exports.nostack = function (items, margin, subgroups, stackSubgroups) { + for (var i = 0; i < items.length; i++) { + if (items[i].data.subgroup == undefined) { + items[i].top = margin.item.vertical; + } else if (items[i].data.subgroup !== undefined && stackSubgroups) { + var newTop = 0; + for (var subgroup in subgroups) { + if (subgroups.hasOwnProperty(subgroup)) { + if (subgroups[subgroup].visible == true && subgroups[subgroup].index < subgroups[items[i].data.subgroup].index) { + newTop += subgroups[subgroup].height; + subgroups[items[i].data.subgroup].top = newTop; + } + } + } + items[i].top = newTop + 0.5 * margin.item.vertical; + } + } + if (!stackSubgroups) { + exports.stackSubgroups(items, margin, subgroups); + } +}; + +/** + * Adjust vertical positions of the subgroups such that they don't overlap each + * other. + * @param {Array.} items + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin Margins between items and between items and the axis. + * @param {subgroups[]} subgroups + * All subgroups + */ +exports.stackSubgroups = function (items, margin, subgroups) { + for (var subgroup in subgroups) { + if (subgroups.hasOwnProperty(subgroup)) { + + subgroups[subgroup].top = 0; + do { + // TODO: optimize checking for overlap. when there is a gap without items, + // you only need to check for items from the next item on, not from zero + var collidingItem = null; + for (var otherSubgroup in subgroups) { + if (subgroups[otherSubgroup].top !== null && otherSubgroup !== subgroup && subgroups[subgroup].index > subgroups[otherSubgroup].index && exports.collisionByTimes(subgroups[subgroup], subgroups[otherSubgroup])) { + collidingItem = subgroups[otherSubgroup]; + break; + } + } + + if (collidingItem != null) { + // There is a collision. Reposition the subgroups above the colliding element + subgroups[subgroup].top = collidingItem.top + collidingItem.height; + } + } while (collidingItem); + } + } + for (var i = 0; i < items.length; i++) { + if (items[i].data.subgroup !== undefined) { + items[i].top = subgroups[items[i].data.subgroup].top + 0.5 * margin.item.vertical; + } + } +}; + +/** + * Adjust vertical positions of the subgroups such that they don't overlap each + * other, then stacks the contents of each subgroup individually. + * @param {Item[]} subgroupItems + * All the items in a subgroup + * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin + * Margins between items and between items and the axis. + * @param {subgroups[]} subgroups + * All subgroups + */ +exports.stackSubgroupsWithInnerStack = function (subgroupItems, margin, subgroups) { + var doSubStack = false; + + // Run subgroups in their order (if any) + var subgroupOrder = []; + + for (var subgroup in subgroups) { + if (subgroups[subgroup].hasOwnProperty("index")) { + subgroupOrder[subgroups[subgroup].index] = subgroup; + } else { + subgroupOrder.push(subgroup); + } + } + + for (var j = 0; j < subgroupOrder.length; j++) { + subgroup = subgroupOrder[j]; + if (subgroups.hasOwnProperty(subgroup)) { + + doSubStack = doSubStack || subgroups[subgroup].stack; + subgroups[subgroup].top = 0; + + for (var otherSubgroup in subgroups) { + if (subgroups[otherSubgroup].visible && subgroups[subgroup].index > subgroups[otherSubgroup].index) { + subgroups[subgroup].top += subgroups[otherSubgroup].height; + } + } + + var items = subgroupItems[subgroup]; + for (var i = 0; i < items.length; i++) { + if (items[i].data.subgroup !== undefined) { + items[i].top = subgroups[items[i].data.subgroup].top + 0.5 * margin.item.vertical; + + if (subgroups[subgroup].stack) { + items[i].baseTop = items[i].top; + } + } + } + + if (doSubStack && subgroups[subgroup].stack) { + exports.substack(subgroupItems[subgroup], margin, subgroups[subgroup]); + } + } + } +}; + +/** + * Test if the two provided items collide + * The items must have parameters left, width, top, and height. + * @param {Item} a The first item + * @param {Item} b The second item + * @param {{horizontal: number, vertical: number}} margin + * An object containing a horizontal and vertical + * minimum required margin. + * @param {boolean} rtl + * @return {boolean} true if a and b collide, else false + */ +exports.collision = function (a, b, margin, rtl) { + if (rtl) { + return a.right - margin.horizontal + EPSILON < b.right + b.width && a.right + a.width + margin.horizontal - EPSILON > b.right && a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top; + } else { + return a.left - margin.horizontal + EPSILON < b.left + b.width && a.left + a.width + margin.horizontal - EPSILON > b.left && a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top; + } +}; + +/** + * Test if the two provided objects collide + * The objects must have parameters start, end, top, and height. + * @param {Object} a The first Object + * @param {Object} b The second Object + * @return {boolean} true if a and b collide, else false + */ +exports.collisionByTimes = function (a, b) { + return a.start <= b.start && a.end >= b.start && a.top < b.top + b.height && a.top + a.height > b.top || b.start <= a.start && b.end >= a.start && b.top < a.top + a.height && b.top + b.height > a.top; +}; + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Item = __webpack_require__(38); + +/** + * @constructor BoxItem + * @extends Item + * @param {Object} data Object containing parameters start + * content, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} [options] Configuration options + * // TODO: describe available options + */ +function BoxItem(data, conversion, options) { + this.props = { + dot: { + width: 0, + height: 0 + }, + line: { + width: 0, + height: 0 + } + }; + this.options = options; + // validate data + if (data) { + if (data.start == undefined) { + throw new Error('Property "start" missing in item ' + data); + } + } + + Item.call(this, data, conversion, options); +} + +BoxItem.prototype = new Item(null, null, null); + +/** + * Check whether this item is visible inside given range + * @param {{start: number, end: number}} range with a timestamp for start and end + * @returns {boolean} True if visible + */ +BoxItem.prototype.isVisible = function (range) { + // determine visibility + var isVisible; + var align = this.options.align; + var widthInMs = this.width * range.getMillisecondsPerPixel(); + + if (align == 'right') { + isVisible = this.data.start.getTime() > range.start && this.data.start.getTime() - widthInMs < range.end; + } else if (align == 'left') { + isVisible = this.data.start.getTime() + widthInMs > range.start && this.data.start.getTime() < range.end; + } else { + // default or 'center' + isVisible = this.data.start.getTime() + widthInMs / 2 > range.start && this.data.start.getTime() - widthInMs / 2 < range.end; + } + return isVisible; +}; + +BoxItem.prototype._createDomElement = function () { + if (!this.dom) { + // create DOM + this.dom = {}; + + // create main box + this.dom.box = document.createElement('DIV'); + + // contents box (inside the background box). used for making margins + this.dom.content = document.createElement('DIV'); + this.dom.content.className = 'vis-item-content'; + this.dom.box.appendChild(this.dom.content); + + // line to axis + this.dom.line = document.createElement('DIV'); + this.dom.line.className = 'vis-line'; + + // dot on axis + this.dom.dot = document.createElement('DIV'); + this.dom.dot.className = 'vis-dot'; + + // attach this item as attribute + this.dom.box['timeline-item'] = this; + + this.dirty = true; + } +}; + +BoxItem.prototype._appendDomElement = function () { + if (!this.parent) { + throw new Error('Cannot redraw item: no parent attached'); + } + if (!this.dom.box.parentNode) { + var foreground = this.parent.dom.foreground; + if (!foreground) throw new Error('Cannot redraw item: parent has no foreground container element'); + foreground.appendChild(this.dom.box); + } + if (!this.dom.line.parentNode) { + var background = this.parent.dom.background; + if (!background) throw new Error('Cannot redraw item: parent has no background container element'); + background.appendChild(this.dom.line); + } + if (!this.dom.dot.parentNode) { + var axis = this.parent.dom.axis; + if (!background) throw new Error('Cannot redraw item: parent has no axis container element'); + axis.appendChild(this.dom.dot); + } + this.displayed = true; +}; + +BoxItem.prototype._updateDirtyDomComponents = function () { + // An item is marked dirty when: + // - the item is not yet rendered + // - the item's data is changed + // - the item is selected/deselected + if (this.dirty) { + this._updateContents(this.dom.content); + this._updateDataAttributes(this.dom.box); + this._updateStyle(this.dom.box); + + var editable = this.editable.updateTime || this.editable.updateGroup; + + // update class + var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); + this.dom.box.className = 'vis-item vis-box' + className; + this.dom.line.className = 'vis-item vis-line' + className; + this.dom.dot.className = 'vis-item vis-dot' + className; + } +}; + +BoxItem.prototype._getDomComponentsSizes = function () { + return { + previous: { + right: this.dom.box.style.right, + left: this.dom.box.style.left + }, + dot: { + height: this.dom.dot.offsetHeight, + width: this.dom.dot.offsetWidth + }, + line: { + width: this.dom.line.offsetWidth + }, + box: { + width: this.dom.box.offsetWidth, + height: this.dom.box.offsetHeight + } + }; +}; + +BoxItem.prototype._updateDomComponentsSizes = function (sizes) { + if (this.options.rtl) { + this.dom.box.style.right = "0px"; + } else { + this.dom.box.style.left = "0px"; + } + + // recalculate size + this.props.dot.height = sizes.dot.height; + this.props.dot.width = sizes.dot.width; + this.props.line.width = sizes.line.width; + this.width = sizes.box.width; + this.height = sizes.box.height; + + // restore previous position + if (this.options.rtl) { + this.dom.box.style.right = sizes.previous.right; + } else { + this.dom.box.style.left = sizes.previous.left; + } + + this.dirty = false; +}; + +BoxItem.prototype._repaintDomAdditionals = function () { + this._repaintOnItemUpdateTimeTooltip(this.dom.box); + this._repaintDragCenter(); + this._repaintDeleteButton(this.dom.box); +}; + +/** + * Repaint the item + * @param {boolean} [returnQueue=false] return the queue + * @return {boolean} the redraw queue if returnQueue=true + */ +BoxItem.prototype.redraw = function (returnQueue) { + var sizes; + var queue = [ + // create item DOM + this._createDomElement.bind(this), + + // append DOM to parent DOM + this._appendDomElement.bind(this), + + // update dirty DOM + this._updateDirtyDomComponents.bind(this), function () { + if (this.dirty) { + sizes = this._getDomComponentsSizes(); + } + }.bind(this), function () { + if (this.dirty) { + this._updateDomComponentsSizes.bind(this)(sizes); + } + }.bind(this), + + // repaint DOM additionals + this._repaintDomAdditionals.bind(this)]; + + if (returnQueue) { + return queue; + } else { + var result; + queue.forEach(function (fn) { + result = fn(); + }); + return result; + } +}; + +/** + * Show the item in the DOM (when not already displayed). The items DOM will + * be created when needed. + */ +BoxItem.prototype.show = function () { + if (!this.displayed) { + this.redraw(); + } +}; + +/** + * Hide the item from the DOM (when visible) + */ +BoxItem.prototype.hide = function () { + if (this.displayed) { + var dom = this.dom; + + if (dom.box.parentNode) dom.box.parentNode.removeChild(dom.box); + if (dom.line.parentNode) dom.line.parentNode.removeChild(dom.line); + if (dom.dot.parentNode) dom.dot.parentNode.removeChild(dom.dot); + + this.displayed = false; + } +}; + +/** + * Reposition the item horizontally + * @Override + */ +BoxItem.prototype.repositionX = function () { + var start = this.conversion.toScreen(this.data.start); + var align = this.options.align; + + // calculate left position of the box + if (align == 'right') { + if (this.options.rtl) { + this.right = start - this.width; + + // reposition box, line, and dot + this.dom.box.style.right = this.right + 'px'; + this.dom.line.style.right = start - this.props.line.width + 'px'; + this.dom.dot.style.right = start - this.props.line.width / 2 - this.props.dot.width / 2 + 'px'; + } else { + this.left = start - this.width; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = start - this.props.line.width + 'px'; + this.dom.dot.style.left = start - this.props.line.width / 2 - this.props.dot.width / 2 + 'px'; + } + } else if (align == 'left') { + if (this.options.rtl) { + this.right = start; + + // reposition box, line, and dot + this.dom.box.style.right = this.right + 'px'; + this.dom.line.style.right = start + 'px'; + this.dom.dot.style.right = start + this.props.line.width / 2 - this.props.dot.width / 2 + 'px'; + } else { + this.left = start; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = start + 'px'; + this.dom.dot.style.left = start + this.props.line.width / 2 - this.props.dot.width / 2 + 'px'; + } + } else { + // default or 'center' + if (this.options.rtl) { + this.right = start - this.width / 2; + + // reposition box, line, and dot + this.dom.box.style.right = this.right + 'px'; + this.dom.line.style.right = start - this.props.line.width + 'px'; + this.dom.dot.style.right = start - this.props.dot.width / 2 + 'px'; + } else { + this.left = start - this.width / 2; + + // reposition box, line, and dot + this.dom.box.style.left = this.left + 'px'; + this.dom.line.style.left = start - this.props.line.width / 2 + 'px'; + this.dom.dot.style.left = start - this.props.dot.width / 2 + 'px'; + } + } +}; + +/** + * Reposition the item vertically + * @Override + */ +BoxItem.prototype.repositionY = function () { + var orientation = this.options.orientation.item; + var box = this.dom.box; + var line = this.dom.line; + var dot = this.dom.dot; + + if (orientation == 'top') { + box.style.top = (this.top || 0) + 'px'; + + line.style.top = '0'; + line.style.height = this.parent.top + this.top + 1 + 'px'; + line.style.bottom = ''; + } else { + // orientation 'bottom' + var itemSetHeight = this.parent.itemSet.props.height; // TODO: this is nasty + var lineHeight = itemSetHeight - this.parent.top - this.parent.height + this.top; + + box.style.top = (this.parent.height - this.top - this.height || 0) + 'px'; + line.style.top = itemSetHeight - lineHeight + 'px'; + line.style.bottom = '0'; + } + + dot.style.top = -this.props.dot.height / 2 + 'px'; +}; + +/** + * Return the width of the item left from its start date + * @return {number} + */ +BoxItem.prototype.getWidthLeft = function () { + return this.width / 2; +}; + +/** + * Return the width of the item right from its start date + * @return {number} + */ +BoxItem.prototype.getWidthRight = function () { + return this.width / 2; +}; + +module.exports = BoxItem; + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Item = __webpack_require__(38); + +/** + * @constructor PointItem + * @extends Item + * @param {Object} data Object containing parameters start + * content, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} [options] Configuration options + * // TODO: describe available options + */ +function PointItem(data, conversion, options) { + this.props = { + dot: { + top: 0, + width: 0, + height: 0 + }, + content: { + height: 0, + marginLeft: 0, + marginRight: 0 + } + }; + this.options = options; + // validate data + if (data) { + if (data.start == undefined) { + throw new Error('Property "start" missing in item ' + data); + } + } + + Item.call(this, data, conversion, options); +} + +PointItem.prototype = new Item(null, null, null); + +/** + * Check whether this item is visible inside given range + * @param {{start: number, end: number}} range with a timestamp for start and end + * @returns {boolean} True if visible + */ +PointItem.prototype.isVisible = function (range) { + // determine visibility + var widthInMs = this.width * range.getMillisecondsPerPixel(); + + return this.data.start.getTime() + widthInMs > range.start && this.data.start < range.end; +}; + +PointItem.prototype._createDomElement = function () { + if (!this.dom) { + // create DOM + this.dom = {}; + + // background box + this.dom.point = document.createElement('div'); + // className is updated in redraw() + + // contents box, right from the dot + this.dom.content = document.createElement('div'); + this.dom.content.className = 'vis-item-content'; + this.dom.point.appendChild(this.dom.content); + + // dot at start + this.dom.dot = document.createElement('div'); + this.dom.point.appendChild(this.dom.dot); + + // attach this item as attribute + this.dom.point['timeline-item'] = this; + + this.dirty = true; + } +}; + +PointItem.prototype._appendDomElement = function () { + if (!this.parent) { + throw new Error('Cannot redraw item: no parent attached'); + } + if (!this.dom.point.parentNode) { + var foreground = this.parent.dom.foreground; + if (!foreground) { + throw new Error('Cannot redraw item: parent has no foreground container element'); + } + foreground.appendChild(this.dom.point); + } + this.displayed = true; +}; + +PointItem.prototype._updateDirtyDomComponents = function () { + // An item is marked dirty when: + // - the item is not yet rendered + // - the item's data is changed + // - the item is selected/deselected + if (this.dirty) { + this._updateContents(this.dom.content); + this._updateDataAttributes(this.dom.point); + this._updateStyle(this.dom.point); + + var editable = this.editable.updateTime || this.editable.updateGroup; + // update class + var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly'); + this.dom.point.className = 'vis-item vis-point' + className; + this.dom.dot.className = 'vis-item vis-dot' + className; + } +}; + +PointItem.prototype._getDomComponentsSizes = function () { + return { + dot: { + width: this.dom.dot.offsetWidth, + height: this.dom.dot.offsetHeight + }, + content: { + width: this.dom.content.offsetWidth, + height: this.dom.content.offsetHeight + }, + point: { + width: this.dom.point.offsetWidth, + height: this.dom.point.offsetHeight + } + }; +}; + +PointItem.prototype._updateDomComponentsSizes = function (sizes) { + // recalculate size of dot and contents + this.props.dot.width = sizes.dot.width; + this.props.dot.height = sizes.dot.height; + this.props.content.height = sizes.content.height; + + // resize contents + if (this.options.rtl) { + this.dom.content.style.marginRight = 2 * this.props.dot.width + 'px'; + } else { + this.dom.content.style.marginLeft = 2 * this.props.dot.width + 'px'; + } + //this.dom.content.style.marginRight = ... + 'px'; // TODO: margin right + + // recalculate size + this.width = sizes.point.width; + this.height = sizes.point.height; + + // reposition the dot + this.dom.dot.style.top = (this.height - this.props.dot.height) / 2 + 'px'; + if (this.options.rtl) { + this.dom.dot.style.right = this.props.dot.width / 2 + 'px'; + } else { + this.dom.dot.style.left = this.props.dot.width / 2 + 'px'; + } + + this.dirty = false; +}; + +PointItem.prototype._repaintDomAdditionals = function () { + this._repaintOnItemUpdateTimeTooltip(this.dom.point); + this._repaintDragCenter(); + this._repaintDeleteButton(this.dom.point); +}; + +/** + * Repaint the item + * @param {boolean} [returnQueue=false] return the queue + * @return {boolean} the redraw queue if returnQueue=true + */ +PointItem.prototype.redraw = function (returnQueue) { + var sizes; + var queue = [ + // create item DOM + this._createDomElement.bind(this), + + // append DOM to parent DOM + this._appendDomElement.bind(this), + + // update dirty DOM + this._updateDirtyDomComponents.bind(this), function () { + if (this.dirty) { + sizes = this._getDomComponentsSizes(); + } + }.bind(this), function () { + if (this.dirty) { + this._updateDomComponentsSizes.bind(this)(sizes); + } + }.bind(this), + + // repaint DOM additionals + this._repaintDomAdditionals.bind(this)]; + + if (returnQueue) { + return queue; + } else { + var result; + queue.forEach(function (fn) { + result = fn(); + }); + return result; + } +}; + +/** + * Show the item in the DOM (when not already visible). The items DOM will + * be created when needed. + */ +PointItem.prototype.show = function () { + if (!this.displayed) { + this.redraw(); + } +}; + +/** + * Hide the item from the DOM (when visible) + */ +PointItem.prototype.hide = function () { + if (this.displayed) { + if (this.dom.point.parentNode) { + this.dom.point.parentNode.removeChild(this.dom.point); + } + + this.displayed = false; + } +}; + +/** + * Reposition the item horizontally + * @Override + */ +PointItem.prototype.repositionX = function () { + var start = this.conversion.toScreen(this.data.start); + + if (this.options.rtl) { + this.right = start - this.props.dot.width; + + // reposition point + this.dom.point.style.right = this.right + 'px'; + } else { + this.left = start - this.props.dot.width; + + // reposition point + this.dom.point.style.left = this.left + 'px'; + } +}; + +/** + * Reposition the item vertically + * @Override + */ +PointItem.prototype.repositionY = function () { + var orientation = this.options.orientation.item; + var point = this.dom.point; + if (orientation == 'top') { + point.style.top = this.top + 'px'; + } else { + point.style.top = this.parent.height - this.top - this.height + 'px'; + } +}; + +/** + * Return the width of the item left from its start date + * @return {number} + */ +PointItem.prototype.getWidthLeft = function () { + return this.props.dot.width; +}; + +/** + * Return the width of the item right from its start date + * @return {number} + */ +PointItem.prototype.getWidthRight = function () { + return this.props.dot.width; +}; + +module.exports = PointItem; + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Item = __webpack_require__(38); +var BackgroundGroup = __webpack_require__(69); +var RangeItem = __webpack_require__(70); + +/** + * @constructor BackgroundItem + * @extends Item + * @param {Object} data Object containing parameters start, end + * content, className. + * @param {{toScreen: function, toTime: function}} conversion + * Conversion functions from time to screen and vice versa + * @param {Object} [options] Configuration options + * // TODO: describe options + * // TODO: implement support for the BackgroundItem just having a start, then being displayed as a sort of an annotation + */ +function BackgroundItem(data, conversion, options) { + this.props = { + content: { + width: 0 + } + }; + this.overflow = false; // if contents can overflow (css styling), this flag is set to true + + // validate data + if (data) { + if (data.start == undefined) { + throw new Error('Property "start" missing in item ' + data.id); + } + if (data.end == undefined) { + throw new Error('Property "end" missing in item ' + data.id); + } + } + + Item.call(this, data, conversion, options); +} + +BackgroundItem.prototype = new Item(null, null, null); + +BackgroundItem.prototype.baseClassName = 'vis-item vis-background'; + +BackgroundItem.prototype.stack = false; + +/** + * Check whether this item is visible inside given range + * @param {vis.Range} range with a timestamp for start and end + * @returns {boolean} True if visible + */ +BackgroundItem.prototype.isVisible = function (range) { + // determine visibility + return this.data.start < range.end && this.data.end > range.start; +}; + +BackgroundItem.prototype._createDomElement = function () { + if (!this.dom) { + // create DOM + this.dom = {}; + + // background box + this.dom.box = document.createElement('div'); + // className is updated in redraw() + + // frame box (to prevent the item contents from overflowing + this.dom.frame = document.createElement('div'); + this.dom.frame.className = 'vis-item-overflow'; + this.dom.box.appendChild(this.dom.frame); + + // contents box + this.dom.content = document.createElement('div'); + this.dom.content.className = 'vis-item-content'; + this.dom.frame.appendChild(this.dom.content); + + // Note: we do NOT attach this item as attribute to the DOM, + // such that background items cannot be selected + //this.dom.box['timeline-item'] = this; + + this.dirty = true; + } +}; + +BackgroundItem.prototype._appendDomElement = function () { + if (!this.parent) { + throw new Error('Cannot redraw item: no parent attached'); + } + if (!this.dom.box.parentNode) { + var background = this.parent.dom.background; + if (!background) { + throw new Error('Cannot redraw item: parent has no background container element'); + } + background.appendChild(this.dom.box); + } + this.displayed = true; +}; + +BackgroundItem.prototype._updateDirtyDomComponents = function () { + // update dirty DOM. An item is marked dirty when: + // - the item is not yet rendered + // - the item's data is changed + // - the item is selected/deselected + if (this.dirty) { + this._updateContents(this.dom.content); + this._updateDataAttributes(this.dom.content); + this._updateStyle(this.dom.box); + + // update class + var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : ''); + this.dom.box.className = this.baseClassName + className; + } +}; + +BackgroundItem.prototype._getDomComponentsSizes = function () { + // determine from css whether this box has overflow + this.overflow = window.getComputedStyle(this.dom.content).overflow !== 'hidden'; + return { + content: { + width: this.dom.content.offsetWidth + } + }; +}; + +BackgroundItem.prototype._updateDomComponentsSizes = function (sizes) { + // recalculate size + this.props.content.width = sizes.content.width; + this.height = 0; // set height zero, so this item will be ignored when stacking items + + this.dirty = false; +}; + +BackgroundItem.prototype._repaintDomAdditionals = function () {}; + +/** + * Repaint the item + * @param {boolean} [returnQueue=false] return the queue + * @return {boolean} the redraw result or the redraw queue if returnQueue=true + */ +BackgroundItem.prototype.redraw = function (returnQueue) { + var sizes; + var queue = [ + // create item DOM + this._createDomElement.bind(this), + + // append DOM to parent DOM + this._appendDomElement.bind(this), this._updateDirtyDomComponents.bind(this), function () { + if (this.dirty) { + sizes = this._getDomComponentsSizes.bind(this)(); + } + }.bind(this), function () { + if (this.dirty) { + this._updateDomComponentsSizes.bind(this)(sizes); + } + }.bind(this), + + // repaint DOM additionals + this._repaintDomAdditionals.bind(this)]; + + if (returnQueue) { + return queue; + } else { + var result; + queue.forEach(function (fn) { + result = fn(); + }); + return result; + } +}; + +/** + * Show the item in the DOM (when not already visible). The items DOM will + * be created when needed. + */ +BackgroundItem.prototype.show = RangeItem.prototype.show; + +/** + * Hide the item from the DOM (when visible) + * @return {Boolean} changed + */ +BackgroundItem.prototype.hide = RangeItem.prototype.hide; + +/** + * Reposition the item horizontally + * @Override + */ +BackgroundItem.prototype.repositionX = RangeItem.prototype.repositionX; + +/** + * Reposition the item vertically + * @Override + */ +BackgroundItem.prototype.repositionY = function (margin) { + // eslint-disable-line no-unused-vars + var height; + var orientation = this.options.orientation.item; + + // special positioning for subgroups + if (this.data.subgroup !== undefined) { + // TODO: instead of calculating the top position of the subgroups here for every BackgroundItem, calculate the top of the subgroup once in Itemset + var itemSubgroup = this.data.subgroup; + + this.dom.box.style.height = this.parent.subgroups[itemSubgroup].height + 'px'; + + if (orientation == 'top') { + this.dom.box.style.top = this.parent.top + this.parent.subgroups[itemSubgroup].top + 'px'; + } else { + this.dom.box.style.top = this.parent.top + this.parent.height - this.parent.subgroups[itemSubgroup].top - this.parent.subgroups[itemSubgroup].height + 'px'; + } + this.dom.box.style.bottom = ''; + } + // and in the case of no subgroups: + else { + // we want backgrounds with groups to only show in groups. + if (this.parent instanceof BackgroundGroup) { + // if the item is not in a group: + height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.center.height, this.parent.itemSet.body.domProps.centerContainer.height); + this.dom.box.style.bottom = orientation == 'bottom' ? '0' : ''; + this.dom.box.style.top = orientation == 'top' ? '0' : ''; + } else { + height = this.parent.height; + // same alignment for items when orientation is top or bottom + this.dom.box.style.top = this.parent.top + 'px'; + this.dom.box.style.bottom = ''; + } + } + this.dom.box.style.height = height + 'px'; +}; + +module.exports = BackgroundItem; + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * Popup is a class to create a popup window with some text + */ +var Popup = function () { + /** + * @param {Element} container The container object. + * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap') + */ + function Popup(container, overflowMethod) { + (0, _classCallCheck3['default'])(this, Popup); + + this.container = container; + this.overflowMethod = overflowMethod || 'cap'; + + this.x = 0; + this.y = 0; + this.padding = 5; + this.hidden = false; + + // create the frame + this.frame = document.createElement('div'); + this.frame.className = 'vis-tooltip'; + this.container.appendChild(this.frame); + } + + /** + * @param {number} x Horizontal position of the popup window + * @param {number} y Vertical position of the popup window + */ + + + (0, _createClass3['default'])(Popup, [{ + key: 'setPosition', + value: function setPosition(x, y) { + this.x = parseInt(x); + this.y = parseInt(y); + } + + /** + * Set the content for the popup window. This can be HTML code or text. + * @param {string | Element} content + */ + + }, { + key: 'setText', + value: function setText(content) { + if (content instanceof Element) { + this.frame.innerHTML = ''; + this.frame.appendChild(content); + } else { + this.frame.innerHTML = content; // string containing text or HTML + } + } + + /** + * Show the popup window + * @param {boolean} [doShow] Show or hide the window + */ + + }, { + key: 'show', + value: function show(doShow) { + if (doShow === undefined) { + doShow = true; + } + + if (doShow === true) { + var height = this.frame.clientHeight; + var width = this.frame.clientWidth; + var maxHeight = this.frame.parentNode.clientHeight; + var maxWidth = this.frame.parentNode.clientWidth; + + var left = 0, + top = 0; + + if (this.overflowMethod == 'flip') { + var isLeft = false, + isTop = true; // Where around the position it's located + + if (this.y - height < this.padding) { + isTop = false; + } + + if (this.x + width > maxWidth - this.padding) { + isLeft = true; + } + + if (isLeft) { + left = this.x - width; + } else { + left = this.x; + } + + if (isTop) { + top = this.y - height; + } else { + top = this.y; + } + } else { + top = this.y - height; + if (top + height + this.padding > maxHeight) { + top = maxHeight - height - this.padding; + } + if (top < this.padding) { + top = this.padding; + } + + left = this.x; + if (left + width + this.padding > maxWidth) { + left = maxWidth - width - this.padding; + } + if (left < this.padding) { + left = this.padding; + } + } + + this.frame.style.left = left + "px"; + this.frame.style.top = top + "px"; + this.frame.style.visibility = "visible"; + this.hidden = false; + } else { + this.hide(); + } + } + + /** + * Hide the popup window + */ + + }, { + key: 'hide', + value: function hide() { + this.hidden = true; + this.frame.style.left = "0"; + this.frame.style.top = "0"; + this.frame.style.visibility = "hidden"; + } + + /** + * Remove the popup window + */ + + }, { + key: 'destroy', + value: function destroy() { + this.frame.parentNode.removeChild(this.frame); // Remove element from DOM + } + }]); + return Popup; +}(); + +exports['default'] = Popup; + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * This object contains all possible options. It will check if the types are correct, if required if the option is one + * of the allowed values. + * + * __any__ means that the name of the property does not matter. + * __type__ is a required field for all objects and contains the allowed types of all objects + */ +var string = 'string'; +var bool = 'boolean'; +var number = 'number'; +var array = 'array'; +var date = 'date'; +var object = 'object'; // should only be in a __type__ property +var dom = 'dom'; +var moment = 'moment'; +var any = 'any'; + +var allOptions = { + configure: { + enabled: { 'boolean': bool }, + filter: { 'boolean': bool, 'function': 'function' }, + container: { dom: dom }, + __type__: { object: object, 'boolean': bool, 'function': 'function' } + }, + + //globals : + align: { string: string }, + rtl: { 'boolean': bool, 'undefined': 'undefined' }, + rollingMode: { + follow: { 'boolean': bool }, + offset: { number: number, 'undefined': 'undefined' }, + __type__: { object: object } + }, + verticalScroll: { 'boolean': bool, 'undefined': 'undefined' }, + horizontalScroll: { 'boolean': bool, 'undefined': 'undefined' }, + autoResize: { 'boolean': bool }, + throttleRedraw: { number: number }, // TODO: DEPRICATED see https://github.com/almende/vis/issues/2511 + clickToUse: { 'boolean': bool }, + dataAttributes: { string: string, array: array }, + editable: { + add: { 'boolean': bool, 'undefined': 'undefined' }, + remove: { 'boolean': bool, 'undefined': 'undefined' }, + updateGroup: { 'boolean': bool, 'undefined': 'undefined' }, + updateTime: { 'boolean': bool, 'undefined': 'undefined' }, + overrideItems: { 'boolean': bool, 'undefined': 'undefined' }, + __type__: { 'boolean': bool, object: object } + }, + end: { number: number, date: date, string: string, moment: moment }, + format: { + minorLabels: { + millisecond: { string: string, 'undefined': 'undefined' }, + second: { string: string, 'undefined': 'undefined' }, + minute: { string: string, 'undefined': 'undefined' }, + hour: { string: string, 'undefined': 'undefined' }, + weekday: { string: string, 'undefined': 'undefined' }, + day: { string: string, 'undefined': 'undefined' }, + week: { string: string, 'undefined': 'undefined' }, + month: { string: string, 'undefined': 'undefined' }, + year: { string: string, 'undefined': 'undefined' }, + __type__: { object: object, 'function': 'function' } + }, + majorLabels: { + millisecond: { string: string, 'undefined': 'undefined' }, + second: { string: string, 'undefined': 'undefined' }, + minute: { string: string, 'undefined': 'undefined' }, + hour: { string: string, 'undefined': 'undefined' }, + weekday: { string: string, 'undefined': 'undefined' }, + day: { string: string, 'undefined': 'undefined' }, + week: { string: string, 'undefined': 'undefined' }, + month: { string: string, 'undefined': 'undefined' }, + year: { string: string, 'undefined': 'undefined' }, + __type__: { object: object, 'function': 'function' } + }, + __type__: { object: object } + }, + moment: { 'function': 'function' }, + groupOrder: { string: string, 'function': 'function' }, + groupEditable: { + add: { 'boolean': bool, 'undefined': 'undefined' }, + remove: { 'boolean': bool, 'undefined': 'undefined' }, + order: { 'boolean': bool, 'undefined': 'undefined' }, + __type__: { 'boolean': bool, object: object } + }, + groupOrderSwap: { 'function': 'function' }, + height: { string: string, number: number }, + hiddenDates: { + start: { date: date, number: number, string: string, moment: moment }, + end: { date: date, number: number, string: string, moment: moment }, + repeat: { string: string }, + __type__: { object: object, array: array } + }, + itemsAlwaysDraggable: { + item: { 'boolean': bool, 'undefined': 'undefined' }, + range: { 'boolean': bool, 'undefined': 'undefined' }, + __type__: { 'boolean': bool, object: object } + }, + limitSize: { 'boolean': bool }, + locale: { string: string }, + locales: { + __any__: { any: any }, + __type__: { object: object } + }, + margin: { + axis: { number: number }, + item: { + horizontal: { number: number, 'undefined': 'undefined' }, + vertical: { number: number, 'undefined': 'undefined' }, + __type__: { object: object, number: number } + }, + __type__: { object: object, number: number } + }, + max: { date: date, number: number, string: string, moment: moment }, + maxHeight: { number: number, string: string }, + maxMinorChars: { number: number }, + min: { date: date, number: number, string: string, moment: moment }, + minHeight: { number: number, string: string }, + moveable: { 'boolean': bool }, + multiselect: { 'boolean': bool }, + multiselectPerGroup: { 'boolean': bool }, + onAdd: { 'function': 'function' }, + onDropObjectOnItem: { 'function': 'function' }, + onUpdate: { 'function': 'function' }, + onMove: { 'function': 'function' }, + onMoving: { 'function': 'function' }, + onRemove: { 'function': 'function' }, + onAddGroup: { 'function': 'function' }, + onMoveGroup: { 'function': 'function' }, + onRemoveGroup: { 'function': 'function' }, + onInitialDrawComplete: { 'function': 'function' }, + order: { 'function': 'function' }, + orientation: { + axis: { string: string, 'undefined': 'undefined' }, + item: { string: string, 'undefined': 'undefined' }, + __type__: { string: string, object: object } + }, + selectable: { 'boolean': bool }, + showCurrentTime: { 'boolean': bool }, + showMajorLabels: { 'boolean': bool }, + showMinorLabels: { 'boolean': bool }, + stack: { 'boolean': bool }, + stackSubgroups: { 'boolean': bool }, + snap: { 'function': 'function', 'null': 'null' }, + start: { date: date, number: number, string: string, moment: moment }, + template: { 'function': 'function' }, + groupTemplate: { 'function': 'function' }, + visibleFrameTemplate: { string: string, 'function': 'function' }, + showTooltips: { 'boolean': bool }, + tooltip: { + followMouse: { 'boolean': bool }, + overflowMethod: { 'string': ['cap', 'flip'] }, + __type__: { object: object } + }, + tooltipOnItemUpdateTime: { + template: { 'function': 'function' }, + __type__: { 'boolean': bool, object: object } + }, + timeAxis: { + scale: { string: string, 'undefined': 'undefined' }, + step: { number: number, 'undefined': 'undefined' }, + __type__: { object: object } + }, + type: { string: string }, + width: { string: string, number: number }, + zoomable: { 'boolean': bool }, + zoomKey: { string: ['ctrlKey', 'altKey', 'metaKey', ''] }, + zoomMax: { number: number }, + zoomMin: { number: number }, + + __type__: { object: object } +}; + +var configureOptions = { + global: { + align: ['center', 'left', 'right'], + direction: false, + autoResize: true, + clickToUse: false, + // dataAttributes: ['all'], // FIXME: can be 'all' or string[] + editable: { + add: false, + remove: false, + updateGroup: false, + updateTime: false + }, + end: '', + format: { + minorLabels: { + millisecond: 'SSS', + second: 's', + minute: 'HH:mm', + hour: 'HH:mm', + weekday: 'ddd D', + day: 'D', + week: 'w', + month: 'MMM', + year: 'YYYY' + }, + majorLabels: { + millisecond: 'HH:mm:ss', + second: 'D MMMM HH:mm', + minute: 'ddd D MMMM', + hour: 'ddd D MMMM', + weekday: 'MMMM YYYY', + day: 'MMMM YYYY', + week: 'MMMM YYYY', + month: 'YYYY', + year: '' + } + }, + + //groupOrder: {string, 'function': 'function'}, + groupsDraggable: false, + height: '', + //hiddenDates: {object, array}, + locale: '', + margin: { + axis: [20, 0, 100, 1], + item: { + horizontal: [10, 0, 100, 1], + vertical: [10, 0, 100, 1] + } + }, + max: '', + maxHeight: '', + maxMinorChars: [7, 0, 20, 1], + min: '', + minHeight: '', + moveable: false, + multiselect: false, + multiselectPerGroup: false, + //onAdd: {'function': 'function'}, + //onUpdate: {'function': 'function'}, + //onMove: {'function': 'function'}, + //onMoving: {'function': 'function'}, + //onRename: {'function': 'function'}, + //order: {'function': 'function'}, + orientation: { + axis: ['both', 'bottom', 'top'], + item: ['bottom', 'top'] + }, + selectable: true, + showCurrentTime: false, + showMajorLabels: true, + showMinorLabels: true, + stack: true, + stackSubgroups: true, + //snap: {'function': 'function', nada}, + start: '', + //template: {'function': 'function'}, + //timeAxis: { + // scale: ['millisecond', 'second', 'minute', 'hour', 'weekday', 'day', 'week', 'month', 'year'], + // step: [1, 1, 10, 1] + //}, + showTooltips: true, + tooltip: { + followMouse: false, + overflowMethod: 'flip' + }, + tooltipOnItemUpdateTime: false, + type: ['box', 'point', 'range', 'background'], + width: '100%', + zoomable: true, + zoomKey: ['ctrlKey', 'altKey', 'metaKey', ''], + zoomMax: [315360000000000, 10, 315360000000000, 1], + zoomMin: [10, 10, 315360000000000, 1] + } +}; + +exports.allOptions = allOptions; +exports.configureOptions = configureOptions; + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var DOMutil = __webpack_require__(14); +var DataSet = __webpack_require__(11); +var DataView = __webpack_require__(12); +var Component = __webpack_require__(16); +var DataAxis = __webpack_require__(107); +var GraphGroup = __webpack_require__(109); +var Legend = __webpack_require__(112); +var Bars = __webpack_require__(110); +var Lines = __webpack_require__(111); +var Points = __webpack_require__(72); + +var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items + +/** + * This is the constructor of the LineGraph. It requires a Timeline body and options. + * + * @param {vis.Timeline.body} body + * @param {Object} options + * @constructor LineGraph + * @extends Component + */ +function LineGraph(body, options) { + this.id = util.randomUUID(); + this.body = body; + + this.defaultOptions = { + yAxisOrientation: 'left', + defaultGroup: 'default', + sort: true, + sampling: true, + stack: false, + graphHeight: '400px', + shaded: { + enabled: false, + orientation: 'bottom' // top, bottom, zero + }, + style: 'line', // line, bar + barChart: { + width: 50, + sideBySide: false, + align: 'center' // left, center, right + }, + interpolation: { + enabled: true, + parametrization: 'centripetal', // uniform (alpha = 0.0), chordal (alpha = 1.0), centripetal (alpha = 0.5) + alpha: 0.5 + }, + drawPoints: { + enabled: true, + size: 6, + style: 'square' // square, circle + }, + dataAxis: {}, //Defaults are done on DataAxis level + legend: {}, //Defaults are done on Legend level + groups: { + visibility: {} + } + }; + + // options is shared by this lineGraph and all its items + this.options = util.extend({}, this.defaultOptions); + this.dom = {}; + this.props = {}; + this.hammer = null; + this.groups = {}; + this.abortedGraphUpdate = false; + this.updateSVGheight = false; + this.updateSVGheightOnResize = false; + this.forceGraphUpdate = true; + + var me = this; + this.itemsData = null; // DataSet + this.groupsData = null; // DataSet + + // listeners for the DataSet of the items + this.itemListeners = { + 'add': function add(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onAdd(params.items); + }, + 'update': function update(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onUpdate(params.items); + }, + 'remove': function remove(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onRemove(params.items); + } + }; + + // listeners for the DataSet of the groups + this.groupListeners = { + 'add': function add(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onAddGroups(params.items); + }, + 'update': function update(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onUpdateGroups(params.items); + }, + 'remove': function remove(event, params, senderId) { + // eslint-disable-line no-unused-vars + me._onRemoveGroups(params.items); + } + }; + + this.items = {}; // object with an Item for every data item + this.selection = []; // list with the ids of all selected nodes + this.lastStart = this.body.range.start; + this.touchParams = {}; // stores properties while dragging + + this.svgElements = {}; + this.setOptions(options); + this.groupsUsingDefaultStyles = [0]; + this.body.emitter.on('rangechanged', function () { + me.lastStart = me.body.range.start; + me.svg.style.left = util.option.asSize(-me.props.width); + + me.forceGraphUpdate = true; + //Is this local redraw necessary? (Core also does a change event!) + me.redraw.call(me); + }); + + // create the HTML DOM + this._create(); + this.framework = { svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups }; +} + +LineGraph.prototype = new Component(); + +/** + * Create the HTML DOM for the ItemSet + */ +LineGraph.prototype._create = function () { + var frame = document.createElement('div'); + frame.className = 'vis-line-graph'; + this.dom.frame = frame; + + // create svg element for graph drawing. + this.svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + this.svg.style.position = 'relative'; + this.svg.style.height = ('' + this.options.graphHeight).replace('px', '') + 'px'; + this.svg.style.display = 'block'; + frame.appendChild(this.svg); + + // data axis + this.options.dataAxis.orientation = 'left'; + this.yAxisLeft = new DataAxis(this.body, this.options.dataAxis, this.svg, this.options.groups); + + this.options.dataAxis.orientation = 'right'; + this.yAxisRight = new DataAxis(this.body, this.options.dataAxis, this.svg, this.options.groups); + delete this.options.dataAxis.orientation; + + // legends + this.legendLeft = new Legend(this.body, this.options.legend, 'left', this.options.groups); + this.legendRight = new Legend(this.body, this.options.legend, 'right', this.options.groups); + + this.show(); +}; + +/** + * set the options of the LineGraph. the mergeOptions is used for subObjects that have an enabled element. + * @param {object} options + */ +LineGraph.prototype.setOptions = function (options) { + if (options) { + var fields = ['sampling', 'defaultGroup', 'stack', 'height', 'graphHeight', 'yAxisOrientation', 'style', 'barChart', 'dataAxis', 'sort', 'groups']; + if (options.graphHeight === undefined && options.height !== undefined) { + this.updateSVGheight = true; + this.updateSVGheightOnResize = true; + } else if (this.body.domProps.centerContainer.height !== undefined && options.graphHeight !== undefined) { + if (parseInt((options.graphHeight + '').replace("px", '')) < this.body.domProps.centerContainer.height) { + this.updateSVGheight = true; + } + } + util.selectiveDeepExtend(fields, this.options, options); + util.mergeOptions(this.options, options, 'interpolation'); + util.mergeOptions(this.options, options, 'drawPoints'); + util.mergeOptions(this.options, options, 'shaded'); + util.mergeOptions(this.options, options, 'legend'); + + if (options.interpolation) { + if ((0, _typeof3['default'])(options.interpolation) == 'object') { + if (options.interpolation.parametrization) { + if (options.interpolation.parametrization == 'uniform') { + this.options.interpolation.alpha = 0; + } else if (options.interpolation.parametrization == 'chordal') { + this.options.interpolation.alpha = 1.0; + } else { + this.options.interpolation.parametrization = 'centripetal'; + this.options.interpolation.alpha = 0.5; + } + } + } + } + + if (this.yAxisLeft) { + if (options.dataAxis !== undefined) { + this.yAxisLeft.setOptions(this.options.dataAxis); + this.yAxisRight.setOptions(this.options.dataAxis); + } + } + + if (this.legendLeft) { + if (options.legend !== undefined) { + this.legendLeft.setOptions(this.options.legend); + this.legendRight.setOptions(this.options.legend); + } + } + + if (this.groups.hasOwnProperty(UNGROUPED)) { + this.groups[UNGROUPED].setOptions(options); + } + } + + // this is used to redraw the graph if the visibility of the groups is changed. + if (this.dom.frame) { + //not on initial run? + this.forceGraphUpdate = true; + this.body.emitter.emit("_change", { queue: true }); + } +}; + +/** + * Hide the component from the DOM + */ +LineGraph.prototype.hide = function () { + // remove the frame containing the items + if (this.dom.frame.parentNode) { + this.dom.frame.parentNode.removeChild(this.dom.frame); + } +}; + +/** + * Show the component in the DOM (when not already visible). + */ +LineGraph.prototype.show = function () { + // show frame containing the items + if (!this.dom.frame.parentNode) { + this.body.dom.center.appendChild(this.dom.frame); + } +}; + +/** + * Set items + * @param {vis.DataSet | null} items + */ +LineGraph.prototype.setItems = function (items) { + var me = this, + ids, + oldItemsData = this.itemsData; + + // replace the dataset + if (!items) { + this.itemsData = null; + } else if (items instanceof DataSet || items instanceof DataView) { + this.itemsData = items; + } else { + throw new TypeError('Data must be an instance of DataSet or DataView'); + } + + if (oldItemsData) { + // unsubscribe from old dataset + util.forEach(this.itemListeners, function (callback, event) { + oldItemsData.off(event, callback); + }); + + // remove all drawn items + ids = oldItemsData.getIds(); + this._onRemove(ids); + } + + if (this.itemsData) { + // subscribe to new dataset + var id = this.id; + util.forEach(this.itemListeners, function (callback, event) { + me.itemsData.on(event, callback, id); + }); + + // add all new items + ids = this.itemsData.getIds(); + this._onAdd(ids); + } +}; + +/** + * Set groups + * @param {vis.DataSet} groups + */ +LineGraph.prototype.setGroups = function (groups) { + var me = this; + var ids; + + // unsubscribe from current dataset + if (this.groupsData) { + util.forEach(this.groupListeners, function (callback, event) { + me.groupsData.off(event, callback); + }); + + // remove all drawn groups + ids = this.groupsData.getIds(); + this.groupsData = null; + for (var i = 0; i < ids.length; i++) { + this._removeGroup(ids[i]); + } + } + + // replace the dataset + if (!groups) { + this.groupsData = null; + } else if (groups instanceof DataSet || groups instanceof DataView) { + this.groupsData = groups; + } else { + throw new TypeError('Data must be an instance of DataSet or DataView'); + } + + if (this.groupsData) { + // subscribe to new dataset + var id = this.id; + util.forEach(this.groupListeners, function (callback, event) { + me.groupsData.on(event, callback, id); + }); + + // draw all ms + ids = this.groupsData.getIds(); + this._onAddGroups(ids); + } +}; + +LineGraph.prototype._onUpdate = function (ids) { + this._updateAllGroupData(ids); +}; +LineGraph.prototype._onAdd = function (ids) { + this._onUpdate(ids); +}; +LineGraph.prototype._onRemove = function (ids) { + this._onUpdate(ids); +}; +LineGraph.prototype._onUpdateGroups = function (groupIds) { + this._updateAllGroupData(null, groupIds); +}; +LineGraph.prototype._onAddGroups = function (groupIds) { + this._onUpdateGroups(groupIds); +}; + +/** + * this cleans the group out off the legends and the dataaxis, updates the ungrouped and updates the graph + * @param {Array} groupIds + * @private + */ +LineGraph.prototype._onRemoveGroups = function (groupIds) { + for (var i = 0; i < groupIds.length; i++) { + this._removeGroup(groupIds[i]); + } + this.forceGraphUpdate = true; + this.body.emitter.emit("_change", { queue: true }); +}; + +/** + * this cleans the group out off the legends and the dataaxis + * @param {vis.GraphGroup.id} groupId + * @private + */ +LineGraph.prototype._removeGroup = function (groupId) { + if (this.groups.hasOwnProperty(groupId)) { + if (this.groups[groupId].options.yAxisOrientation == 'right') { + this.yAxisRight.removeGroup(groupId); + this.legendRight.removeGroup(groupId); + this.legendRight.redraw(); + } else { + this.yAxisLeft.removeGroup(groupId); + this.legendLeft.removeGroup(groupId); + this.legendLeft.redraw(); + } + delete this.groups[groupId]; + } +}; + +/** + * update a group object with the group dataset entree + * + * @param {vis.GraphGroup} group + * @param {vis.GraphGroup.id} groupId + * @private + */ +LineGraph.prototype._updateGroup = function (group, groupId) { + if (!this.groups.hasOwnProperty(groupId)) { + this.groups[groupId] = new GraphGroup(group, groupId, this.options, this.groupsUsingDefaultStyles); + if (this.groups[groupId].options.yAxisOrientation == 'right') { + this.yAxisRight.addGroup(groupId, this.groups[groupId]); + this.legendRight.addGroup(groupId, this.groups[groupId]); + } else { + this.yAxisLeft.addGroup(groupId, this.groups[groupId]); + this.legendLeft.addGroup(groupId, this.groups[groupId]); + } + } else { + this.groups[groupId].update(group); + if (this.groups[groupId].options.yAxisOrientation == 'right') { + this.yAxisRight.updateGroup(groupId, this.groups[groupId]); + this.legendRight.updateGroup(groupId, this.groups[groupId]); + //If yAxisOrientation changed, clean out the group from the other axis. + this.yAxisLeft.removeGroup(groupId); + this.legendLeft.removeGroup(groupId); + } else { + this.yAxisLeft.updateGroup(groupId, this.groups[groupId]); + this.legendLeft.updateGroup(groupId, this.groups[groupId]); + //If yAxisOrientation changed, clean out the group from the other axis. + this.yAxisRight.removeGroup(groupId); + this.legendRight.removeGroup(groupId); + } + } + this.legendLeft.redraw(); + this.legendRight.redraw(); +}; + +/** + * this updates all groups, it is used when there is an update the the itemset. + * + * @param {Array} ids + * @param {Array} groupIds + * @private + */ +LineGraph.prototype._updateAllGroupData = function (ids, groupIds) { + if (this.itemsData != null) { + var groupsContent = {}; + var items = this.itemsData.get(); + var fieldId = this.itemsData._fieldId; + var idMap = {}; + if (ids) { + ids.map(function (id) { + idMap[id] = id; + }); + } + + //pre-Determine array sizes, for more efficient memory claim + var groupCounts = {}; + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var groupId = item.group; + if (groupId === null || groupId === undefined) { + groupId = UNGROUPED; + } + groupCounts.hasOwnProperty(groupId) ? groupCounts[groupId]++ : groupCounts[groupId] = 1; + } + + //Pre-load arrays from existing groups if items are not changed (not in ids) + var existingItemsMap = {}; + if (!groupIds && ids) { + for (groupId in this.groups) { + if (this.groups.hasOwnProperty(groupId)) { + group = this.groups[groupId]; + var existing_items = group.getItems(); + + groupsContent[groupId] = existing_items.filter(function (item) { + existingItemsMap[item[fieldId]] = item[fieldId]; + return item[fieldId] !== idMap[item[fieldId]]; + }); + var newLength = groupCounts[groupId]; + groupCounts[groupId] -= groupsContent[groupId].length; + if (groupsContent[groupId].length < newLength) { + groupsContent[groupId][newLength - 1] = {}; + } + } + } + } + + //Now insert data into the arrays. + for (i = 0; i < items.length; i++) { + item = items[i]; + groupId = item.group; + if (groupId === null || groupId === undefined) { + groupId = UNGROUPED; + } + if (!groupIds && ids && item[fieldId] !== idMap[item[fieldId]] && existingItemsMap.hasOwnProperty(item[fieldId])) { + continue; + } + if (!groupsContent.hasOwnProperty(groupId)) { + groupsContent[groupId] = new Array(groupCounts[groupId]); + } + //Copy data (because of unmodifiable DataView input. + var extended = util.bridgeObject(item); + extended.x = util.convert(item.x, 'Date'); + extended.end = util.convert(item.end, 'Date'); + extended.orginalY = item.y; //real Y + extended.y = Number(item.y); + extended[fieldId] = item[fieldId]; + + var index = groupsContent[groupId].length - groupCounts[groupId]--; + groupsContent[groupId][index] = extended; + } + + //Make sure all groups are present, to allow removal of old groups + for (groupId in this.groups) { + if (this.groups.hasOwnProperty(groupId)) { + if (!groupsContent.hasOwnProperty(groupId)) { + groupsContent[groupId] = new Array(0); + } + } + } + + //Update legendas, style and axis + for (groupId in groupsContent) { + if (groupsContent.hasOwnProperty(groupId)) { + if (groupsContent[groupId].length == 0) { + if (this.groups.hasOwnProperty(groupId)) { + this._removeGroup(groupId); + } + } else { + var group = undefined; + if (this.groupsData != undefined) { + group = this.groupsData.get(groupId); + } + if (group == undefined) { + group = { id: groupId, content: this.options.defaultGroup + groupId }; + } + this._updateGroup(group, groupId); + this.groups[groupId].setItems(groupsContent[groupId]); + } + } + } + this.forceGraphUpdate = true; + this.body.emitter.emit("_change", { queue: true }); + } +}; + +/** + * Redraw the component, mandatory function + * @return {boolean} Returns true if the component is resized + */ +LineGraph.prototype.redraw = function () { + var resized = false; + + // calculate actual size and position + this.props.width = this.dom.frame.offsetWidth; + this.props.height = this.body.domProps.centerContainer.height - this.body.domProps.border.top - this.body.domProps.border.bottom; + + // check if this component is resized + resized = this._isResized() || resized; + + // check whether zoomed (in that case we need to re-stack everything) + var visibleInterval = this.body.range.end - this.body.range.start; + var zoomed = visibleInterval != this.lastVisibleInterval; + this.lastVisibleInterval = visibleInterval; + + // the svg element is three times as big as the width, this allows for fully dragging left and right + // without reloading the graph. the controls for this are bound to events in the constructor + if (resized == true) { + this.svg.style.width = util.option.asSize(3 * this.props.width); + this.svg.style.left = util.option.asSize(-this.props.width); + + // if the height of the graph is set as proportional, change the height of the svg + if ((this.options.height + '').indexOf("%") != -1 || this.updateSVGheightOnResize == true) { + this.updateSVGheight = true; + } + } + + // update the height of the graph on each redraw of the graph. + if (this.updateSVGheight == true) { + if (this.options.graphHeight != this.props.height + 'px') { + this.options.graphHeight = this.props.height + 'px'; + this.svg.style.height = this.props.height + 'px'; + } + this.updateSVGheight = false; + } else { + this.svg.style.height = ('' + this.options.graphHeight).replace('px', '') + 'px'; + } + + // zoomed is here to ensure that animations are shown correctly. + if (resized == true || zoomed == true || this.abortedGraphUpdate == true || this.forceGraphUpdate == true) { + resized = this._updateGraph() || resized; + this.forceGraphUpdate = false; + } else { + // move the whole svg while dragging + if (this.lastStart != 0) { + var offset = this.body.range.start - this.lastStart; + var range = this.body.range.end - this.body.range.start; + if (this.props.width != 0) { + var rangePerPixelInv = this.props.width / range; + var xOffset = offset * rangePerPixelInv; + this.svg.style.left = -this.props.width - xOffset + 'px'; + } + } + } + this.legendLeft.redraw(); + this.legendRight.redraw(); + return resized; +}; + +LineGraph.prototype._getSortedGroupIds = function () { + // getting group Ids + var grouplist = []; + for (var groupId in this.groups) { + if (this.groups.hasOwnProperty(groupId)) { + var group = this.groups[groupId]; + if (group.visible == true && (this.options.groups.visibility[groupId] === undefined || this.options.groups.visibility[groupId] == true)) { + grouplist.push({ id: groupId, zIndex: group.options.zIndex }); + } + } + } + util.insertSort(grouplist, function (a, b) { + var az = a.zIndex; + var bz = b.zIndex; + if (az === undefined) az = 0; + if (bz === undefined) bz = 0; + return az == bz ? 0 : az < bz ? -1 : 1; + }); + var groupIds = new Array(grouplist.length); + for (var i = 0; i < grouplist.length; i++) { + groupIds[i] = grouplist[i].id; + } + return groupIds; +}; + +/** + * Update and redraw the graph. + * + * @returns {boolean} + * @private + */ +LineGraph.prototype._updateGraph = function () { + // reset the svg elements + DOMutil.prepareElements(this.svgElements); + if (this.props.width != 0 && this.itemsData != null) { + var group, i; + var groupRanges = {}; + var changeCalled = false; + // this is the range of the SVG canvas + var minDate = this.body.util.toGlobalTime(-this.body.domProps.root.width); + var maxDate = this.body.util.toGlobalTime(2 * this.body.domProps.root.width); + + // getting group Ids + var groupIds = this._getSortedGroupIds(); + if (groupIds.length > 0) { + var groupsData = {}; + + // fill groups data, this only loads the data we require based on the timewindow + this._getRelevantData(groupIds, groupsData, minDate, maxDate); + + // apply sampling, if disabled, it will pass through this function. + this._applySampling(groupIds, groupsData); + + // we transform the X coordinates to detect collisions + for (i = 0; i < groupIds.length; i++) { + this._convertXcoordinates(groupsData[groupIds[i]]); + } + + // now all needed data has been collected we start the processing. + this._getYRanges(groupIds, groupsData, groupRanges); + + // update the Y axis first, we use this data to draw at the correct Y points + changeCalled = this._updateYAxis(groupIds, groupRanges); + + // at changeCalled, abort this update cycle as the graph needs another update with new Width input from the Redraw container. + // Cleanup SVG elements on abort. + if (changeCalled == true) { + DOMutil.cleanupElements(this.svgElements); + this.abortedGraphUpdate = true; + return true; + } + this.abortedGraphUpdate = false; + + // With the yAxis scaled correctly, use this to get the Y values of the points. + var below = undefined; + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (this.options.stack === true && this.options.style === 'line') { + if (group.options.excludeFromStacking == undefined || !group.options.excludeFromStacking) { + if (below != undefined) { + this._stack(groupsData[group.id], groupsData[below.id]); + if (group.options.shaded.enabled == true && group.options.shaded.orientation !== "group") { + if (group.options.shaded.orientation == "top" && below.options.shaded.orientation !== "group") { + below.options.shaded.orientation = "group"; + below.options.shaded.groupId = group.id; + } else { + group.options.shaded.orientation = "group"; + group.options.shaded.groupId = below.id; + } + } + } + below = group; + } + } + this._convertYcoordinates(groupsData[groupIds[i]], group); + } + + //Precalculate paths and draw shading if appropriate. This will make sure the shading is always behind any lines. + var paths = {}; + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (group.options.style === 'line' && group.options.shaded.enabled == true) { + var dataset = groupsData[groupIds[i]]; + if (dataset == null || dataset.length == 0) { + continue; + } + if (!paths.hasOwnProperty(groupIds[i])) { + paths[groupIds[i]] = Lines.calcPath(dataset, group); + } + if (group.options.shaded.orientation === "group") { + var subGroupId = group.options.shaded.groupId; + if (groupIds.indexOf(subGroupId) === -1) { + console.log(group.id + ": Unknown shading group target given:" + subGroupId); + continue; + } + if (!paths.hasOwnProperty(subGroupId)) { + paths[subGroupId] = Lines.calcPath(groupsData[subGroupId], this.groups[subGroupId]); + } + Lines.drawShading(paths[groupIds[i]], group, paths[subGroupId], this.framework); + } else { + Lines.drawShading(paths[groupIds[i]], group, undefined, this.framework); + } + } + } + + // draw the groups, calculating paths if still necessary. + Bars.draw(groupIds, groupsData, this.framework); + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (groupsData[groupIds[i]].length > 0) { + switch (group.options.style) { + case "line": + if (!paths.hasOwnProperty(groupIds[i])) { + paths[groupIds[i]] = Lines.calcPath(groupsData[groupIds[i]], group); + } + Lines.draw(paths[groupIds[i]], group, this.framework); + // eslint-disable-line no-fallthrough + case "point": + // eslint-disable-line no-fallthrough + case "points": + if (group.options.style == "point" || group.options.style == "points" || group.options.drawPoints.enabled == true) { + Points.draw(groupsData[groupIds[i]], group, this.framework); + } + break; + case "bar": + // bar needs to be drawn enmasse + // eslint-disable-line no-fallthrough + default: + //do nothing... + } + } + } + } + } + + // cleanup unused svg elements + DOMutil.cleanupElements(this.svgElements); + return false; +}; + +LineGraph.prototype._stack = function (data, subData) { + var index, dx, dy, subPrevPoint, subNextPoint; + index = 0; + // for each data point we look for a matching on in the set below + for (var j = 0; j < data.length; j++) { + subPrevPoint = undefined; + subNextPoint = undefined; + // we look for time matches or a before-after point + for (var k = index; k < subData.length; k++) { + // if times match exactly + if (subData[k].x === data[j].x) { + subPrevPoint = subData[k]; + subNextPoint = subData[k]; + index = k; + break; + } else if (subData[k].x > data[j].x) { + // overshoot + subNextPoint = subData[k]; + if (k == 0) { + subPrevPoint = subNextPoint; + } else { + subPrevPoint = subData[k - 1]; + } + index = k; + break; + } + } + // in case the last data point has been used, we assume it stays like this. + if (subNextPoint === undefined) { + subPrevPoint = subData[subData.length - 1]; + subNextPoint = subData[subData.length - 1]; + } + // linear interpolation + dx = subNextPoint.x - subPrevPoint.x; + dy = subNextPoint.y - subPrevPoint.y; + if (dx == 0) { + data[j].y = data[j].orginalY + subNextPoint.y; + } else { + data[j].y = data[j].orginalY + dy / dx * (data[j].x - subPrevPoint.x) + subPrevPoint.y; // ax + b where b is data[j].y + } + } +}; + +/** + * first select and preprocess the data from the datasets. + * the groups have their preselection of data, we now loop over this data to see + * what data we need to draw. Sorted data is much faster. + * more optimization is possible by doing the sampling before and using the binary search + * to find the end date to determine the increment. + * + * @param {array} groupIds + * @param {object} groupsData + * @param {date} minDate + * @param {date} maxDate + * @private + */ +LineGraph.prototype._getRelevantData = function (groupIds, groupsData, minDate, maxDate) { + var group, i, j, item; + if (groupIds.length > 0) { + for (i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + var itemsData = group.getItems(); + // optimization for sorted data + if (group.options.sort == true) { + var dateComparator = function dateComparator(a, b) { + return a.getTime() == b.getTime() ? 0 : a < b ? -1 : 1; + }; + var first = Math.max(0, util.binarySearchValue(itemsData, minDate, 'x', 'before', dateComparator)); + var last = Math.min(itemsData.length, util.binarySearchValue(itemsData, maxDate, 'x', 'after', dateComparator) + 1); + if (last <= 0) { + last = itemsData.length; + } + var dataContainer = new Array(last - first); + for (j = first; j < last; j++) { + item = group.itemsData[j]; + dataContainer[j - first] = item; + } + groupsData[groupIds[i]] = dataContainer; + } else { + // If unsorted data, all data is relevant, just returning entire structure + groupsData[groupIds[i]] = group.itemsData; + } + } + } +}; + +/** + * + * @param {Array.} groupIds + * @param {vis.DataSet} groupsData + * @private + */ +LineGraph.prototype._applySampling = function (groupIds, groupsData) { + var group; + if (groupIds.length > 0) { + for (var i = 0; i < groupIds.length; i++) { + group = this.groups[groupIds[i]]; + if (group.options.sampling == true) { + var dataContainer = groupsData[groupIds[i]]; + if (dataContainer.length > 0) { + var increment = 1; + var amountOfPoints = dataContainer.length; + + // the global screen is used because changing the width of the yAxis may affect the increment, resulting in an endless loop + // of width changing of the yAxis. + //TODO: This assumes sorted data, but that's not guaranteed! + var xDistance = this.body.util.toGlobalScreen(dataContainer[dataContainer.length - 1].x) - this.body.util.toGlobalScreen(dataContainer[0].x); + var pointsPerPixel = amountOfPoints / xDistance; + increment = Math.min(Math.ceil(0.2 * amountOfPoints), Math.max(1, Math.round(pointsPerPixel))); + + var sampledData = new Array(amountOfPoints); + for (var j = 0; j < amountOfPoints; j += increment) { + var idx = Math.round(j / increment); + sampledData[idx] = dataContainer[j]; + } + groupsData[groupIds[i]] = sampledData.splice(0, Math.round(amountOfPoints / increment)); + } + } + } + } +}; + +/** + * + * @param {Array.} groupIds + * @param {vis.DataSet} groupsData + * @param {object} groupRanges | this is being filled here + * @private + */ +LineGraph.prototype._getYRanges = function (groupIds, groupsData, groupRanges) { + var groupData, group, i; + var combinedDataLeft = []; + var combinedDataRight = []; + var options; + if (groupIds.length > 0) { + for (i = 0; i < groupIds.length; i++) { + groupData = groupsData[groupIds[i]]; + options = this.groups[groupIds[i]].options; + if (groupData.length > 0) { + group = this.groups[groupIds[i]]; + // if bar graphs are stacked, their range need to be handled differently and accumulated over all groups. + if (options.stack === true && options.style === 'bar') { + if (options.yAxisOrientation === 'left') { + combinedDataLeft = combinedDataLeft.concat(groupData); + } else { + combinedDataRight = combinedDataRight.concat(groupData); + } + } else { + groupRanges[groupIds[i]] = group.getYRange(groupData, groupIds[i]); + } + } + } + + // if bar graphs are stacked, their range need to be handled differently and accumulated over all groups. + Bars.getStackedYRange(combinedDataLeft, groupRanges, groupIds, '__barStackLeft', 'left'); + Bars.getStackedYRange(combinedDataRight, groupRanges, groupIds, '__barStackRight', 'right'); + } +}; + +/** + * this sets the Y ranges for the Y axis. It also determines which of the axis should be shown or hidden. + * @param {Array.} groupIds + * @param {Object} groupRanges + * @returns {boolean} resized + * @private + */ +LineGraph.prototype._updateYAxis = function (groupIds, groupRanges) { + var resized = false; + var yAxisLeftUsed = false; + var yAxisRightUsed = false; + var minLeft = 1e9, + minRight = 1e9, + maxLeft = -1e9, + maxRight = -1e9, + minVal, + maxVal; + // if groups are present + if (groupIds.length > 0) { + // this is here to make sure that if there are no items in the axis but there are groups, that there is no infinite draw/redraw loop. + for (var i = 0; i < groupIds.length; i++) { + var group = this.groups[groupIds[i]]; + if (group && group.options.yAxisOrientation != 'right') { + yAxisLeftUsed = true; + minLeft = 1e9; + maxLeft = -1e9; + } else if (group && group.options.yAxisOrientation) { + yAxisRightUsed = true; + minRight = 1e9; + maxRight = -1e9; + } + } + + // if there are items: + for (i = 0; i < groupIds.length; i++) { + if (groupRanges.hasOwnProperty(groupIds[i])) { + if (groupRanges[groupIds[i]].ignore !== true) { + minVal = groupRanges[groupIds[i]].min; + maxVal = groupRanges[groupIds[i]].max; + + if (groupRanges[groupIds[i]].yAxisOrientation != 'right') { + yAxisLeftUsed = true; + minLeft = minLeft > minVal ? minVal : minLeft; + maxLeft = maxLeft < maxVal ? maxVal : maxLeft; + } else { + yAxisRightUsed = true; + minRight = minRight > minVal ? minVal : minRight; + maxRight = maxRight < maxVal ? maxVal : maxRight; + } + } + } + } + + if (yAxisLeftUsed == true) { + this.yAxisLeft.setRange(minLeft, maxLeft); + } + if (yAxisRightUsed == true) { + this.yAxisRight.setRange(minRight, maxRight); + } + } + resized = this._toggleAxisVisiblity(yAxisLeftUsed, this.yAxisLeft) || resized; + resized = this._toggleAxisVisiblity(yAxisRightUsed, this.yAxisRight) || resized; + + if (yAxisRightUsed == true && yAxisLeftUsed == true) { + this.yAxisLeft.drawIcons = true; + this.yAxisRight.drawIcons = true; + } else { + this.yAxisLeft.drawIcons = false; + this.yAxisRight.drawIcons = false; + } + this.yAxisRight.master = !yAxisLeftUsed; + this.yAxisRight.masterAxis = this.yAxisLeft; + + if (this.yAxisRight.master == false) { + if (yAxisRightUsed == true) { + this.yAxisLeft.lineOffset = this.yAxisRight.width; + } else { + this.yAxisLeft.lineOffset = 0; + } + + resized = this.yAxisLeft.redraw() || resized; + resized = this.yAxisRight.redraw() || resized; + } else { + resized = this.yAxisRight.redraw() || resized; + } + + // clean the accumulated lists + var tempGroups = ['__barStackLeft', '__barStackRight', '__lineStackLeft', '__lineStackRight']; + for (i = 0; i < tempGroups.length; i++) { + if (groupIds.indexOf(tempGroups[i]) != -1) { + groupIds.splice(groupIds.indexOf(tempGroups[i]), 1); + } + } + + return resized; +}; + +/** + * This shows or hides the Y axis if needed. If there is a change, the changed event is emitted by the updateYAxis function + * + * @param {boolean} axisUsed + * @param {vis.DataAxis} axis + * @returns {boolean} + * @private + */ +LineGraph.prototype._toggleAxisVisiblity = function (axisUsed, axis) { + var changed = false; + if (axisUsed == false) { + if (axis.dom.frame.parentNode && axis.hidden == false) { + axis.hide(); + changed = true; + } + } else { + if (!axis.dom.frame.parentNode && axis.hidden == true) { + axis.show(); + changed = true; + } + } + return changed; +}; + +/** + * This uses the DataAxis object to generate the correct X coordinate on the SVG window. It uses the + * util function toScreen to get the x coordinate from the timestamp. It also pre-filters the data and get the minMax ranges for + * the yAxis. + * + * @param {Array.} datapoints + * @private + */ +LineGraph.prototype._convertXcoordinates = function (datapoints) { + var toScreen = this.body.util.toScreen; + for (var i = 0; i < datapoints.length; i++) { + datapoints[i].screen_x = toScreen(datapoints[i].x) + this.props.width; + datapoints[i].screen_y = datapoints[i].y; //starting point for range calculations + if (datapoints[i].end != undefined) { + datapoints[i].screen_end = toScreen(datapoints[i].end) + this.props.width; + } else { + datapoints[i].screen_end = undefined; + } + } +}; + +/** + * This uses the DataAxis object to generate the correct X coordinate on the SVG window. It uses the + * util function toScreen to get the x coordinate from the timestamp. It also pre-filters the data and get the minMax ranges for + * the yAxis. + * + * @param {Array.} datapoints + * @param {vis.GraphGroup} group + * @private + */ +LineGraph.prototype._convertYcoordinates = function (datapoints, group) { + var axis = this.yAxisLeft; + var svgHeight = Number(this.svg.style.height.replace('px', '')); + if (group.options.yAxisOrientation == 'right') { + axis = this.yAxisRight; + } + for (var i = 0; i < datapoints.length; i++) { + datapoints[i].screen_y = Math.round(axis.convertValue(datapoints[i].y)); + } + group.setZeroPosition(Math.min(svgHeight, axis.convertValue(0))); +}; + +module.exports = LineGraph; + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var DOMutil = __webpack_require__(14); +var Component = __webpack_require__(16); +var DataScale = __webpack_require__(108); +/** + * A horizontal time axis + * @param {Object} body + * @param {Object} [options] See DataAxis.setOptions for the available + * options. + * @param {SVGElement} svg + * @param {vis.LineGraph.options} linegraphOptions + * @constructor DataAxis + * @extends Component + */ +function DataAxis(body, options, svg, linegraphOptions) { + this.id = util.randomUUID(); + this.body = body; + + this.defaultOptions = { + orientation: 'left', // supported: 'left', 'right' + showMinorLabels: true, + showMajorLabels: true, + icons: false, + majorLinesOffset: 7, + minorLinesOffset: 4, + labelOffsetX: 10, + labelOffsetY: 2, + iconWidth: 20, + width: '40px', + visible: true, + alignZeros: true, + left: { + range: { min: undefined, max: undefined }, + format: function format(value) { + return '' + parseFloat(value.toPrecision(3)); + }, + title: { text: undefined, style: undefined } + }, + right: { + range: { min: undefined, max: undefined }, + format: function format(value) { + return '' + parseFloat(value.toPrecision(3)); + }, + title: { text: undefined, style: undefined } + } + }; + + this.linegraphOptions = linegraphOptions; + this.linegraphSVG = svg; + this.props = {}; + this.DOMelements = { // dynamic elements + lines: {}, + labels: {}, + title: {} + }; + + this.dom = {}; + this.scale = undefined; + this.range = { start: 0, end: 0 }; + + this.options = util.extend({}, this.defaultOptions); + this.conversionFactor = 1; + + this.setOptions(options); + this.width = Number(('' + this.options.width).replace("px", "")); + this.minWidth = this.width; + this.height = this.linegraphSVG.getBoundingClientRect().height; + this.hidden = false; + + this.stepPixels = 25; + this.zeroCrossing = -1; + this.amountOfSteps = -1; + + this.lineOffset = 0; + this.master = true; + this.masterAxis = null; + this.svgElements = {}; + this.iconsRemoved = false; + + this.groups = {}; + this.amountOfGroups = 0; + + // create the HTML DOM + this._create(); + this.framework = { svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups }; + + var me = this; + this.body.emitter.on("verticalDrag", function () { + me.dom.lineContainer.style.top = me.body.domProps.scrollTop + 'px'; + }); +} + +DataAxis.prototype = new Component(); + +DataAxis.prototype.addGroup = function (label, graphOptions) { + if (!this.groups.hasOwnProperty(label)) { + this.groups[label] = graphOptions; + } + this.amountOfGroups += 1; +}; + +DataAxis.prototype.updateGroup = function (label, graphOptions) { + if (!this.groups.hasOwnProperty(label)) { + this.amountOfGroups += 1; + } + this.groups[label] = graphOptions; +}; + +DataAxis.prototype.removeGroup = function (label) { + if (this.groups.hasOwnProperty(label)) { + delete this.groups[label]; + this.amountOfGroups -= 1; + } +}; + +DataAxis.prototype.setOptions = function (options) { + if (options) { + var redraw = false; + if (this.options.orientation != options.orientation && options.orientation !== undefined) { + redraw = true; + } + var fields = ['orientation', 'showMinorLabels', 'showMajorLabels', 'icons', 'majorLinesOffset', 'minorLinesOffset', 'labelOffsetX', 'labelOffsetY', 'iconWidth', 'width', 'visible', 'left', 'right', 'alignZeros']; + util.selectiveDeepExtend(fields, this.options, options); + + this.minWidth = Number(('' + this.options.width).replace("px", "")); + if (redraw === true && this.dom.frame) { + this.hide(); + this.show(); + } + } +}; + +/** + * Create the HTML DOM for the DataAxis + */ +DataAxis.prototype._create = function () { + this.dom.frame = document.createElement('div'); + this.dom.frame.style.width = this.options.width; + this.dom.frame.style.height = this.height; + + this.dom.lineContainer = document.createElement('div'); + this.dom.lineContainer.style.width = '100%'; + this.dom.lineContainer.style.height = this.height; + this.dom.lineContainer.style.position = 'relative'; + + // create svg element for graph drawing. + this.svg = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + this.svg.style.position = "absolute"; + this.svg.style.top = '0px'; + this.svg.style.height = '100%'; + this.svg.style.width = '100%'; + this.svg.style.display = "block"; + this.dom.frame.appendChild(this.svg); +}; + +DataAxis.prototype._redrawGroupIcons = function () { + DOMutil.prepareElements(this.svgElements); + + var x; + var iconWidth = this.options.iconWidth; + var iconHeight = 15; + var iconOffset = 4; + var y = iconOffset + 0.5 * iconHeight; + + if (this.options.orientation === 'left') { + x = iconOffset; + } else { + x = this.width - iconWidth - iconOffset; + } + + var groupArray = (0, _keys2['default'])(this.groups); + groupArray.sort(function (a, b) { + return a < b ? -1 : 1; + }); + + for (var i = 0; i < groupArray.length; i++) { + var groupId = groupArray[i]; + if (this.groups[groupId].visible === true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] === true)) { + this.groups[groupId].getLegend(iconWidth, iconHeight, this.framework, x, y); + y += iconHeight + iconOffset; + } + } + + DOMutil.cleanupElements(this.svgElements); + this.iconsRemoved = false; +}; + +DataAxis.prototype._cleanupIcons = function () { + if (this.iconsRemoved === false) { + DOMutil.prepareElements(this.svgElements); + DOMutil.cleanupElements(this.svgElements); + this.iconsRemoved = true; + } +}; + +/** + * Create the HTML DOM for the DataAxis + */ +DataAxis.prototype.show = function () { + this.hidden = false; + if (!this.dom.frame.parentNode) { + if (this.options.orientation === 'left') { + this.body.dom.left.appendChild(this.dom.frame); + } else { + this.body.dom.right.appendChild(this.dom.frame); + } + } + + if (!this.dom.lineContainer.parentNode) { + this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer); + } +}; + +/** + * Create the HTML DOM for the DataAxis + */ +DataAxis.prototype.hide = function () { + this.hidden = true; + if (this.dom.frame.parentNode) { + this.dom.frame.parentNode.removeChild(this.dom.frame); + } + + if (this.dom.lineContainer.parentNode) { + this.dom.lineContainer.parentNode.removeChild(this.dom.lineContainer); + } +}; + +/** + * Set a range (start and end) + * @param {number} start + * @param {number} end + */ +DataAxis.prototype.setRange = function (start, end) { + this.range.start = start; + this.range.end = end; +}; + +/** + * Repaint the component + * @return {boolean} Returns true if the component is resized + */ +DataAxis.prototype.redraw = function () { + var resized = false; + var activeGroups = 0; + + // Make sure the line container adheres to the vertical scrolling. + this.dom.lineContainer.style.top = this.body.domProps.scrollTop + 'px'; + + for (var groupId in this.groups) { + if (this.groups.hasOwnProperty(groupId)) { + if (this.groups[groupId].visible === true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] === true)) { + activeGroups++; + } + } + } + if (this.amountOfGroups === 0 || activeGroups === 0) { + this.hide(); + } else { + this.show(); + this.height = Number(this.linegraphSVG.style.height.replace("px", "")); + + // svg offsetheight did not work in firefox and explorer... + this.dom.lineContainer.style.height = this.height + 'px'; + this.width = this.options.visible === true ? Number(('' + this.options.width).replace("px", "")) : 0; + + var props = this.props; + var frame = this.dom.frame; + + // update classname + frame.className = 'vis-data-axis'; + + // calculate character width and height + this._calculateCharSize(); + + var orientation = this.options.orientation; + var showMinorLabels = this.options.showMinorLabels; + var showMajorLabels = this.options.showMajorLabels; + + // determine the width and height of the elements for the axis + props.minorLabelHeight = showMinorLabels ? props.minorCharHeight : 0; + props.majorLabelHeight = showMajorLabels ? props.majorCharHeight : 0; + + props.minorLineWidth = this.body.dom.backgroundHorizontal.offsetWidth - this.lineOffset - this.width + 2 * this.options.minorLinesOffset; + props.minorLineHeight = 1; + props.majorLineWidth = this.body.dom.backgroundHorizontal.offsetWidth - this.lineOffset - this.width + 2 * this.options.majorLinesOffset; + props.majorLineHeight = 1; + + // take frame offline while updating (is almost twice as fast) + if (orientation === 'left') { + frame.style.top = '0'; + frame.style.left = '0'; + frame.style.bottom = ''; + frame.style.width = this.width + 'px'; + frame.style.height = this.height + "px"; + this.props.width = this.body.domProps.left.width; + this.props.height = this.body.domProps.left.height; + } else { + // right + frame.style.top = ''; + frame.style.bottom = '0'; + frame.style.left = '0'; + frame.style.width = this.width + 'px'; + frame.style.height = this.height + "px"; + this.props.width = this.body.domProps.right.width; + this.props.height = this.body.domProps.right.height; + } + + resized = this._redrawLabels(); + resized = this._isResized() || resized; + + if (this.options.icons === true) { + this._redrawGroupIcons(); + } else { + this._cleanupIcons(); + } + + this._redrawTitle(orientation); + } + return resized; +}; + +/** + * Repaint major and minor text labels and vertical grid lines + * + * @returns {boolean} + * @private + */ +DataAxis.prototype._redrawLabels = function () { + var _this = this; + + var resized = false; + DOMutil.prepareElements(this.DOMelements.lines); + DOMutil.prepareElements(this.DOMelements.labels); + var orientation = this.options['orientation']; + var customRange = this.options[orientation].range != undefined ? this.options[orientation].range : {}; + + //Override range with manual options: + var autoScaleEnd = true; + if (customRange.max != undefined) { + this.range.end = customRange.max; + autoScaleEnd = false; + } + var autoScaleStart = true; + if (customRange.min != undefined) { + this.range.start = customRange.min; + autoScaleStart = false; + } + + this.scale = new DataScale(this.range.start, this.range.end, autoScaleStart, autoScaleEnd, this.dom.frame.offsetHeight, this.props.majorCharHeight, this.options.alignZeros, this.options[orientation].format); + + if (this.master === false && this.masterAxis != undefined) { + this.scale.followScale(this.masterAxis.scale); + } + + //Is updated in side-effect of _redrawLabel(): + this.maxLabelSize = 0; + + var lines = this.scale.getLines(); + lines.forEach(function (line) { + var y = line.y; + var isMajor = line.major; + if (_this.options['showMinorLabels'] && isMajor === false) { + _this._redrawLabel(y - 2, line.val, orientation, 'vis-y-axis vis-minor', _this.props.minorCharHeight); + } + if (isMajor) { + if (y >= 0) { + _this._redrawLabel(y - 2, line.val, orientation, 'vis-y-axis vis-major', _this.props.majorCharHeight); + } + } + if (_this.master === true) { + if (isMajor) { + _this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-major', _this.options.majorLinesOffset, _this.props.majorLineWidth); + } else { + _this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-minor', _this.options.minorLinesOffset, _this.props.minorLineWidth); + } + } + }); + + // Note that title is rotated, so we're using the height, not width! + var titleWidth = 0; + if (this.options[orientation].title !== undefined && this.options[orientation].title.text !== undefined) { + titleWidth = this.props.titleCharHeight; + } + var offset = this.options.icons === true ? Math.max(this.options.iconWidth, titleWidth) + this.options.labelOffsetX + 15 : titleWidth + this.options.labelOffsetX + 15; + + // this will resize the yAxis to accommodate the labels. + if (this.maxLabelSize > this.width - offset && this.options.visible === true) { + this.width = this.maxLabelSize + offset; + this.options.width = this.width + "px"; + DOMutil.cleanupElements(this.DOMelements.lines); + DOMutil.cleanupElements(this.DOMelements.labels); + this.redraw(); + resized = true; + } + // this will resize the yAxis if it is too big for the labels. + else if (this.maxLabelSize < this.width - offset && this.options.visible === true && this.width > this.minWidth) { + this.width = Math.max(this.minWidth, this.maxLabelSize + offset); + this.options.width = this.width + "px"; + DOMutil.cleanupElements(this.DOMelements.lines); + DOMutil.cleanupElements(this.DOMelements.labels); + this.redraw(); + resized = true; + } else { + DOMutil.cleanupElements(this.DOMelements.lines); + DOMutil.cleanupElements(this.DOMelements.labels); + resized = false; + } + + return resized; +}; + +DataAxis.prototype.convertValue = function (value) { + return this.scale.convertValue(value); +}; + +DataAxis.prototype.screenToValue = function (x) { + return this.scale.screenToValue(x); +}; + +/** + * Create a label for the axis at position x + * + * @param {number} y + * @param {string} text + * @param {'top'|'right'|'bottom'|'left'} orientation + * @param {string} className + * @param {number} characterHeight + * @private + */ +DataAxis.prototype._redrawLabel = function (y, text, orientation, className, characterHeight) { + // reuse redundant label + var label = DOMutil.getDOMElement('div', this.DOMelements.labels, this.dom.frame); //this.dom.redundant.labels.shift(); + label.className = className; + label.innerHTML = text; + if (orientation === 'left') { + label.style.left = '-' + this.options.labelOffsetX + 'px'; + label.style.textAlign = "right"; + } else { + label.style.right = '-' + this.options.labelOffsetX + 'px'; + label.style.textAlign = "left"; + } + + label.style.top = y - 0.5 * characterHeight + this.options.labelOffsetY + 'px'; + + text += ''; + + var largestWidth = Math.max(this.props.majorCharWidth, this.props.minorCharWidth); + if (this.maxLabelSize < text.length * largestWidth) { + this.maxLabelSize = text.length * largestWidth; + } +}; + +/** + * Create a minor line for the axis at position y + * @param {number} y + * @param {'top'|'right'|'bottom'|'left'} orientation + * @param {string} className + * @param {number} offset + * @param {number} width + */ +DataAxis.prototype._redrawLine = function (y, orientation, className, offset, width) { + if (this.master === true) { + var line = DOMutil.getDOMElement('div', this.DOMelements.lines, this.dom.lineContainer); //this.dom.redundant.lines.shift(); + line.className = className; + line.innerHTML = ''; + + if (orientation === 'left') { + line.style.left = this.width - offset + 'px'; + } else { + line.style.right = this.width - offset + 'px'; + } + + line.style.width = width + 'px'; + line.style.top = y + 'px'; + } +}; + +/** + * Create a title for the axis + * @private + * @param {'top'|'right'|'bottom'|'left'} orientation + */ +DataAxis.prototype._redrawTitle = function (orientation) { + DOMutil.prepareElements(this.DOMelements.title); + + // Check if the title is defined for this axes + if (this.options[orientation].title !== undefined && this.options[orientation].title.text !== undefined) { + var title = DOMutil.getDOMElement('div', this.DOMelements.title, this.dom.frame); + title.className = 'vis-y-axis vis-title vis-' + orientation; + title.innerHTML = this.options[orientation].title.text; + + // Add style - if provided + if (this.options[orientation].title.style !== undefined) { + util.addCssText(title, this.options[orientation].title.style); + } + + if (orientation === 'left') { + title.style.left = this.props.titleCharHeight + 'px'; + } else { + title.style.right = this.props.titleCharHeight + 'px'; + } + + title.style.width = this.height + 'px'; + } + + // we need to clean up in case we did not use all elements. + DOMutil.cleanupElements(this.DOMelements.title); +}; + +/** + * Determine the size of text on the axis (both major and minor axis). + * The size is calculated only once and then cached in this.props. + * @private + */ +DataAxis.prototype._calculateCharSize = function () { + // determine the char width and height on the minor axis + if (!('minorCharHeight' in this.props)) { + var textMinor = document.createTextNode('0'); + var measureCharMinor = document.createElement('div'); + measureCharMinor.className = 'vis-y-axis vis-minor vis-measure'; + measureCharMinor.appendChild(textMinor); + this.dom.frame.appendChild(measureCharMinor); + + this.props.minorCharHeight = measureCharMinor.clientHeight; + this.props.minorCharWidth = measureCharMinor.clientWidth; + + this.dom.frame.removeChild(measureCharMinor); + } + + if (!('majorCharHeight' in this.props)) { + var textMajor = document.createTextNode('0'); + var measureCharMajor = document.createElement('div'); + measureCharMajor.className = 'vis-y-axis vis-major vis-measure'; + measureCharMajor.appendChild(textMajor); + this.dom.frame.appendChild(measureCharMajor); + + this.props.majorCharHeight = measureCharMajor.clientHeight; + this.props.majorCharWidth = measureCharMajor.clientWidth; + + this.dom.frame.removeChild(measureCharMajor); + } + + if (!('titleCharHeight' in this.props)) { + var textTitle = document.createTextNode('0'); + var measureCharTitle = document.createElement('div'); + measureCharTitle.className = 'vis-y-axis vis-title vis-measure'; + measureCharTitle.appendChild(textTitle); + this.dom.frame.appendChild(measureCharTitle); + + this.props.titleCharHeight = measureCharTitle.clientHeight; + this.props.titleCharWidth = measureCharTitle.clientWidth; + + this.dom.frame.removeChild(measureCharTitle); + } +}; + +module.exports = DataAxis; + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * + * @param {number} start + * @param {number} end + * @param {boolean} autoScaleStart + * @param {boolean} autoScaleEnd + * @param {number} containerHeight + * @param {number} majorCharHeight + * @param {boolean} zeroAlign + * @param {function} formattingFunction + * @constructor DataScale + */ +function DataScale(start, end, autoScaleStart, autoScaleEnd, containerHeight, majorCharHeight) { + var zeroAlign = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false; + var formattingFunction = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false; + + this.majorSteps = [1, 2, 5, 10]; + this.minorSteps = [0.25, 0.5, 1, 2]; + this.customLines = null; + + this.containerHeight = containerHeight; + this.majorCharHeight = majorCharHeight; + this._start = start; + this._end = end; + + this.scale = 1; + this.minorStepIdx = -1; + this.magnitudefactor = 1; + this.determineScale(); + + this.zeroAlign = zeroAlign; + this.autoScaleStart = autoScaleStart; + this.autoScaleEnd = autoScaleEnd; + + this.formattingFunction = formattingFunction; + + if (autoScaleStart || autoScaleEnd) { + var me = this; + var roundToMinor = function roundToMinor(value) { + var rounded = value - value % (me.magnitudefactor * me.minorSteps[me.minorStepIdx]); + if (value % (me.magnitudefactor * me.minorSteps[me.minorStepIdx]) > 0.5 * (me.magnitudefactor * me.minorSteps[me.minorStepIdx])) { + return rounded + me.magnitudefactor * me.minorSteps[me.minorStepIdx]; + } else { + return rounded; + } + }; + if (autoScaleStart) { + this._start -= this.magnitudefactor * 2 * this.minorSteps[this.minorStepIdx]; + this._start = roundToMinor(this._start); + } + + if (autoScaleEnd) { + this._end += this.magnitudefactor * this.minorSteps[this.minorStepIdx]; + this._end = roundToMinor(this._end); + } + this.determineScale(); + } +} + +DataScale.prototype.setCharHeight = function (majorCharHeight) { + this.majorCharHeight = majorCharHeight; +}; + +DataScale.prototype.setHeight = function (containerHeight) { + this.containerHeight = containerHeight; +}; + +DataScale.prototype.determineScale = function () { + var range = this._end - this._start; + this.scale = this.containerHeight / range; + var minimumStepValue = this.majorCharHeight / this.scale; + var orderOfMagnitude = range > 0 ? Math.round(Math.log(range) / Math.LN10) : 0; + + this.minorStepIdx = -1; + this.magnitudefactor = Math.pow(10, orderOfMagnitude); + + var start = 0; + if (orderOfMagnitude < 0) { + start = orderOfMagnitude; + } + + var solutionFound = false; + for (var l = start; Math.abs(l) <= Math.abs(orderOfMagnitude); l++) { + this.magnitudefactor = Math.pow(10, l); + for (var j = 0; j < this.minorSteps.length; j++) { + var stepSize = this.magnitudefactor * this.minorSteps[j]; + if (stepSize >= minimumStepValue) { + solutionFound = true; + this.minorStepIdx = j; + break; + } + } + if (solutionFound === true) { + break; + } + } +}; + +DataScale.prototype.is_major = function (value) { + return value % (this.magnitudefactor * this.majorSteps[this.minorStepIdx]) === 0; +}; + +DataScale.prototype.getStep = function () { + return this.magnitudefactor * this.minorSteps[this.minorStepIdx]; +}; + +DataScale.prototype.getFirstMajor = function () { + var majorStep = this.magnitudefactor * this.majorSteps[this.minorStepIdx]; + return this.convertValue(this._start + (majorStep - this._start % majorStep) % majorStep); +}; + +DataScale.prototype.formatValue = function (current) { + var returnValue = current.toPrecision(5); + if (typeof this.formattingFunction === 'function') { + returnValue = this.formattingFunction(current); + } + + if (typeof returnValue === 'number') { + return '' + returnValue; + } else if (typeof returnValue === 'string') { + return returnValue; + } else { + return current.toPrecision(5); + } +}; + +DataScale.prototype.getLines = function () { + var lines = []; + var step = this.getStep(); + var bottomOffset = (step - this._start % step) % step; + for (var i = this._start + bottomOffset; this._end - i > 0.00001; i += step) { + if (i != this._start) { + //Skip the bottom line + lines.push({ major: this.is_major(i), y: this.convertValue(i), val: this.formatValue(i) }); + } + } + return lines; +}; + +DataScale.prototype.followScale = function (other) { + var oldStepIdx = this.minorStepIdx; + var oldStart = this._start; + var oldEnd = this._end; + + var me = this; + var increaseMagnitude = function increaseMagnitude() { + me.magnitudefactor *= 2; + }; + var decreaseMagnitude = function decreaseMagnitude() { + me.magnitudefactor /= 2; + }; + + if (other.minorStepIdx <= 1 && this.minorStepIdx <= 1 || other.minorStepIdx > 1 && this.minorStepIdx > 1) { + //easy, no need to change stepIdx nor multiplication factor + } else if (other.minorStepIdx < this.minorStepIdx) { + //I'm 5, they are 4 per major. + this.minorStepIdx = 1; + if (oldStepIdx == 2) { + increaseMagnitude(); + } else { + increaseMagnitude(); + increaseMagnitude(); + } + } else { + //I'm 4, they are 5 per major + this.minorStepIdx = 2; + if (oldStepIdx == 1) { + decreaseMagnitude(); + } else { + decreaseMagnitude(); + decreaseMagnitude(); + } + } + + //Get masters stats: + var otherZero = other.convertValue(0); + var otherStep = other.getStep() * other.scale; + + var done = false; + var count = 0; + //Loop until magnitude is correct for given constrains. + while (!done && count++ < 5) { + + //Get my stats: + this.scale = otherStep / (this.minorSteps[this.minorStepIdx] * this.magnitudefactor); + var newRange = this.containerHeight / this.scale; + + //For the case the magnitudefactor has changed: + this._start = oldStart; + this._end = this._start + newRange; + + var myOriginalZero = this._end * this.scale; + var majorStep = this.magnitudefactor * this.majorSteps[this.minorStepIdx]; + var majorOffset = this.getFirstMajor() - other.getFirstMajor(); + + if (this.zeroAlign) { + var zeroOffset = otherZero - myOriginalZero; + this._end += zeroOffset / this.scale; + this._start = this._end - newRange; + } else { + if (!this.autoScaleStart) { + this._start += majorStep - majorOffset / this.scale; + this._end = this._start + newRange; + } else { + this._start -= majorOffset / this.scale; + this._end = this._start + newRange; + } + } + if (!this.autoScaleEnd && this._end > oldEnd + 0.00001) { + //Need to decrease magnitude to prevent scale overshoot! (end) + decreaseMagnitude(); + done = false; + continue; + } + if (!this.autoScaleStart && this._start < oldStart - 0.00001) { + if (this.zeroAlign && oldStart >= 0) { + console.warn("Can't adhere to given 'min' range, due to zeroalign"); + } else { + //Need to decrease magnitude to prevent scale overshoot! (start) + decreaseMagnitude(); + done = false; + continue; + } + } + if (this.autoScaleStart && this.autoScaleEnd && newRange < oldEnd - oldStart) { + increaseMagnitude(); + done = false; + continue; + } + done = true; + } +}; + +DataScale.prototype.convertValue = function (value) { + return this.containerHeight - (value - this._start) * this.scale; +}; + +DataScale.prototype.screenToValue = function (pixels) { + return (this.containerHeight - pixels) / this.scale + this._start; +}; + +module.exports = DataScale; + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var Bars = __webpack_require__(110); +var Lines = __webpack_require__(111); +var Points = __webpack_require__(72); + +/** + * /** + * @param {object} group | the object of the group from the dataset + * @param {string} groupId | ID of the group + * @param {object} options | the default options + * @param {array} groupsUsingDefaultStyles | this array has one entree. + * It is passed as an array so it is passed by reference. + * It enumerates through the default styles + * @constructor GraphGroup + */ +function GraphGroup(group, groupId, options, groupsUsingDefaultStyles) { + this.id = groupId; + var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'drawPoints', 'shaded', 'interpolation', 'zIndex', 'excludeFromStacking', 'excludeFromLegend']; + this.options = util.selectiveBridgeObject(fields, options); + this.usingDefaultStyle = group.className === undefined; + this.groupsUsingDefaultStyles = groupsUsingDefaultStyles; + this.zeroPosition = 0; + this.update(group); + if (this.usingDefaultStyle == true) { + this.groupsUsingDefaultStyles[0] += 1; + } + this.itemsData = []; + this.visible = group.visible === undefined ? true : group.visible; +} + +/** + * this loads a reference to all items in this group into this group. + * @param {array} items + */ +GraphGroup.prototype.setItems = function (items) { + if (items != null) { + this.itemsData = items; + if (this.options.sort == true) { + util.insertSort(this.itemsData, function (a, b) { + return a.x > b.x ? 1 : -1; + }); + } + } else { + this.itemsData = []; + } +}; + +GraphGroup.prototype.getItems = function () { + return this.itemsData; +}; + +/** + * this is used for barcharts and shading, this way, we only have to calculate it once. + * @param {number} pos + */ +GraphGroup.prototype.setZeroPosition = function (pos) { + this.zeroPosition = pos; +}; + +/** + * set the options of the graph group over the default options. + * @param {Object} options + */ +GraphGroup.prototype.setOptions = function (options) { + if (options !== undefined) { + var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'zIndex', 'excludeFromStacking', 'excludeFromLegend']; + util.selectiveDeepExtend(fields, this.options, options); + + // if the group's drawPoints is a function delegate the callback to the onRender property + if (typeof options.drawPoints == 'function') { + options.drawPoints = { + onRender: options.drawPoints + }; + } + + util.mergeOptions(this.options, options, 'interpolation'); + util.mergeOptions(this.options, options, 'drawPoints'); + util.mergeOptions(this.options, options, 'shaded'); + + if (options.interpolation) { + if ((0, _typeof3['default'])(options.interpolation) == 'object') { + if (options.interpolation.parametrization) { + if (options.interpolation.parametrization == 'uniform') { + this.options.interpolation.alpha = 0; + } else if (options.interpolation.parametrization == 'chordal') { + this.options.interpolation.alpha = 1.0; + } else { + this.options.interpolation.parametrization = 'centripetal'; + this.options.interpolation.alpha = 0.5; + } + } + } + } + } +}; + +/** + * this updates the current group class with the latest group dataset entree, used in _updateGroup in linegraph + * @param {vis.Group} group + */ +GraphGroup.prototype.update = function (group) { + this.group = group; + this.content = group.content || 'graph'; + this.className = group.className || this.className || 'vis-graph-group' + this.groupsUsingDefaultStyles[0] % 10; + this.visible = group.visible === undefined ? true : group.visible; + this.style = group.style; + this.setOptions(group.options); +}; + +/** + * return the legend entree for this group. + * + * @param {number} iconWidth + * @param {number} iconHeight + * @param {{svg: (*|Element), svgElements: Object, options: Object, groups: Array.}} framework + * @param {number} x + * @param {number} y + * @returns {{icon: (*|Element), label: (*|string), orientation: *}} + */ +GraphGroup.prototype.getLegend = function (iconWidth, iconHeight, framework, x, y) { + if (framework == undefined || framework == null) { + var svg = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + framework = { svg: svg, svgElements: {}, options: this.options, groups: [this] }; + } + if (x == undefined || x == null) { + x = 0; + } + if (y == undefined || y == null) { + y = 0.5 * iconHeight; + } + switch (this.options.style) { + case "line": + Lines.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; + case "points": //explicit no break + case "point": + Points.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; + case "bar": + Bars.drawIcon(this, x, y, iconWidth, iconHeight, framework); + break; + } + return { icon: framework.svg, label: this.content, orientation: this.options.yAxisOrientation }; +}; + +GraphGroup.prototype.getYRange = function (groupData) { + var yMin = groupData[0].y; + var yMax = groupData[0].y; + for (var j = 0; j < groupData.length; j++) { + yMin = yMin > groupData[j].y ? groupData[j].y : yMin; + yMax = yMax < groupData[j].y ? groupData[j].y : yMax; + } + return { min: yMin, max: yMax, yAxisOrientation: this.options.yAxisOrientation }; +}; + +module.exports = GraphGroup; + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var DOMutil = __webpack_require__(14); +var Points = __webpack_require__(72); + +/** + * + * @param {vis.GraphGroup.id} groupId + * @param {Object} options // TODO: Describe options + * @constructor Bargraph + */ +function Bargraph(groupId, options) {// eslint-disable-line no-unused-vars +} + +Bargraph.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); + + var barWidth = Math.round(0.3 * iconWidth); + var originalWidth = group.options.barChart.width; + var scale = originalWidth / barWidth; + var bar1Height = Math.round(0.4 * iconHeight); + var bar2Height = Math.round(0.75 * iconHeight); + + var offset = Math.round((iconWidth - 2 * barWidth) / 3); + + DOMutil.drawBar(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, barWidth, bar1Height, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + DOMutil.drawBar(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, barWidth, bar2Height, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + + if (group.options.drawPoints.enabled == true) { + var groupTemplate = { + style: group.options.drawPoints.style, + styles: group.options.drawPoints.styles, + size: group.options.drawPoints.size / scale, + className: group.className + }; + DOMutil.drawPoint(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, groupTemplate, framework.svgElements, framework.svg); + DOMutil.drawPoint(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, groupTemplate, framework.svgElements, framework.svg); + } +}; + +/** + * draw a bar graph + * + * @param {Array.} groupIds + * @param {Object} processedGroupData + * @param {{svg: Object, svgElements: Array., options: Object, groups: Array.}} framework + */ +Bargraph.draw = function (groupIds, processedGroupData, framework) { + var combinedData = []; + var intersections = {}; + var coreDistance; + var key, drawData; + var group; + var i, j; + var barPoints = 0; + + // combine all barchart data + for (i = 0; i < groupIds.length; i++) { + group = framework.groups[groupIds[i]]; + if (group.options.style === 'bar') { + if (group.visible === true && (framework.options.groups.visibility[groupIds[i]] === undefined || framework.options.groups.visibility[groupIds[i]] === true)) { + for (j = 0; j < processedGroupData[groupIds[i]].length; j++) { + combinedData.push({ + screen_x: processedGroupData[groupIds[i]][j].screen_x, + screen_end: processedGroupData[groupIds[i]][j].screen_end, + screen_y: processedGroupData[groupIds[i]][j].screen_y, + x: processedGroupData[groupIds[i]][j].x, + end: processedGroupData[groupIds[i]][j].end, + y: processedGroupData[groupIds[i]][j].y, + groupId: groupIds[i], + label: processedGroupData[groupIds[i]][j].label + }); + barPoints += 1; + } + } + } + } + + if (barPoints === 0) { + return; + } + + // sort by time and by group + combinedData.sort(function (a, b) { + if (a.screen_x === b.screen_x) { + return a.groupId < b.groupId ? -1 : 1; + } else { + return a.screen_x - b.screen_x; + } + }); + + // get intersections + Bargraph._getDataIntersections(intersections, combinedData); + + // plot barchart + for (i = 0; i < combinedData.length; i++) { + group = framework.groups[combinedData[i].groupId]; + var minWidth = group.options.barChart.minWidth != undefined ? group.options.barChart.minWidth : 0.1 * group.options.barChart.width; + + key = combinedData[i].screen_x; + var heightOffset = 0; + if (intersections[key] === undefined) { + if (i + 1 < combinedData.length) { + coreDistance = Math.abs(combinedData[i + 1].screen_x - key); + } + drawData = Bargraph._getSafeDrawData(coreDistance, group, minWidth); + } else { + var nextKey = i + (intersections[key].amount - intersections[key].resolved); + if (nextKey < combinedData.length) { + coreDistance = Math.abs(combinedData[nextKey].screen_x - key); + } + drawData = Bargraph._getSafeDrawData(coreDistance, group, minWidth); + intersections[key].resolved += 1; + + if (group.options.stack === true && group.options.excludeFromStacking !== true) { + if (combinedData[i].screen_y < group.zeroPosition) { + heightOffset = intersections[key].accumulatedNegative; + intersections[key].accumulatedNegative += group.zeroPosition - combinedData[i].screen_y; + } else { + heightOffset = intersections[key].accumulatedPositive; + intersections[key].accumulatedPositive += group.zeroPosition - combinedData[i].screen_y; + } + } else if (group.options.barChart.sideBySide === true) { + drawData.width = drawData.width / intersections[key].amount; + drawData.offset += intersections[key].resolved * drawData.width - 0.5 * drawData.width * (intersections[key].amount + 1); + } + } + + var dataWidth = drawData.width; + var start = combinedData[i].screen_x; + + // are we drawing explicit boxes? (we supplied an end value) + if (combinedData[i].screen_end != undefined) { + dataWidth = combinedData[i].screen_end - combinedData[i].screen_x; + start += dataWidth * 0.5; + } else { + start += drawData.offset; + } + + DOMutil.drawBar(start, combinedData[i].screen_y - heightOffset, dataWidth, group.zeroPosition - combinedData[i].screen_y, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); + + // draw points + if (group.options.drawPoints.enabled === true) { + var pointData = { + screen_x: combinedData[i].screen_x, + screen_y: combinedData[i].screen_y - heightOffset, + x: combinedData[i].x, + y: combinedData[i].y, + groupId: combinedData[i].groupId, + label: combinedData[i].label + }; + Points.draw([pointData], group, framework, drawData.offset); + //DOMutil.drawPoint(combinedData[i].x + drawData.offset, combinedData[i].y, group, framework.svgElements, framework.svg); + } + } +}; + +/** + * Fill the intersections object with counters of how many datapoints share the same x coordinates + * @param {Object} intersections + * @param {Array.} combinedData + * @private + */ +Bargraph._getDataIntersections = function (intersections, combinedData) { + // get intersections + var coreDistance; + for (var i = 0; i < combinedData.length; i++) { + if (i + 1 < combinedData.length) { + coreDistance = Math.abs(combinedData[i + 1].screen_x - combinedData[i].screen_x); + } + if (i > 0) { + coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].screen_x - combinedData[i].screen_x)); + } + if (coreDistance === 0) { + if (intersections[combinedData[i].screen_x] === undefined) { + intersections[combinedData[i].screen_x] = { + amount: 0, + resolved: 0, + accumulatedPositive: 0, + accumulatedNegative: 0 + }; + } + intersections[combinedData[i].screen_x].amount += 1; + } + } +}; + +/** + * Get the width and offset for bargraphs based on the coredistance between datapoints + * + * @param {number} coreDistance + * @param {vis.Group} group + * @param {number} minWidth + * @returns {{width: number, offset: number}} + * @private + */ +Bargraph._getSafeDrawData = function (coreDistance, group, minWidth) { + var width, offset; + if (coreDistance < group.options.barChart.width && coreDistance > 0) { + width = coreDistance < minWidth ? minWidth : coreDistance; + + offset = 0; // recalculate offset with the new width; + if (group.options.barChart.align === 'left') { + offset -= 0.5 * coreDistance; + } else if (group.options.barChart.align === 'right') { + offset += 0.5 * coreDistance; + } + } else { + // default settings + width = group.options.barChart.width; + offset = 0; + if (group.options.barChart.align === 'left') { + offset -= 0.5 * group.options.barChart.width; + } else if (group.options.barChart.align === 'right') { + offset += 0.5 * group.options.barChart.width; + } + } + + return { width: width, offset: offset }; +}; + +Bargraph.getStackedYRange = function (combinedData, groupRanges, groupIds, groupLabel, orientation) { + if (combinedData.length > 0) { + // sort by time and by group + combinedData.sort(function (a, b) { + if (a.screen_x === b.screen_x) { + return a.groupId < b.groupId ? -1 : 1; + } else { + return a.screen_x - b.screen_x; + } + }); + var intersections = {}; + + Bargraph._getDataIntersections(intersections, combinedData); + groupRanges[groupLabel] = Bargraph._getStackedYRange(intersections, combinedData); + groupRanges[groupLabel].yAxisOrientation = orientation; + groupIds.push(groupLabel); + } +}; + +Bargraph._getStackedYRange = function (intersections, combinedData) { + var key; + var yMin = combinedData[0].screen_y; + var yMax = combinedData[0].screen_y; + for (var i = 0; i < combinedData.length; i++) { + key = combinedData[i].screen_x; + if (intersections[key] === undefined) { + yMin = yMin > combinedData[i].screen_y ? combinedData[i].screen_y : yMin; + yMax = yMax < combinedData[i].screen_y ? combinedData[i].screen_y : yMax; + } else { + if (combinedData[i].screen_y < 0) { + intersections[key].accumulatedNegative += combinedData[i].screen_y; + } else { + intersections[key].accumulatedPositive += combinedData[i].screen_y; + } + } + } + for (var xpos in intersections) { + if (intersections.hasOwnProperty(xpos)) { + yMin = yMin > intersections[xpos].accumulatedNegative ? intersections[xpos].accumulatedNegative : yMin; + yMin = yMin > intersections[xpos].accumulatedPositive ? intersections[xpos].accumulatedPositive : yMin; + yMax = yMax < intersections[xpos].accumulatedNegative ? intersections[xpos].accumulatedNegative : yMax; + yMax = yMax < intersections[xpos].accumulatedPositive ? intersections[xpos].accumulatedPositive : yMax; + } + } + + return { min: yMin, max: yMax }; +}; + +module.exports = Bargraph; + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var DOMutil = __webpack_require__(14); + +/** + * + * @param {vis.GraphGroup.id} groupId + * @param {Object} options // TODO: Describe options + * @constructor Line + */ +function Line(groupId, options) {// eslint-disable-line no-unused-vars +} + +Line.calcPath = function (dataset, group) { + if (dataset != null) { + if (dataset.length > 0) { + var d = []; + + // construct path from dataset + if (group.options.interpolation.enabled == true) { + d = Line._catmullRom(dataset, group); + } else { + d = Line._linear(dataset); + } + return d; + } + } +}; + +Line.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) { + var fillHeight = iconHeight * 0.5; + var path, fillPath; + + var outline = DOMutil.getSVGElement("rect", framework.svgElements, framework.svg); + outline.setAttributeNS(null, "x", x); + outline.setAttributeNS(null, "y", y - fillHeight); + outline.setAttributeNS(null, "width", iconWidth); + outline.setAttributeNS(null, "height", 2 * fillHeight); + outline.setAttributeNS(null, "class", "vis-outline"); + + path = DOMutil.getSVGElement("path", framework.svgElements, framework.svg); + path.setAttributeNS(null, "class", group.className); + if (group.style !== undefined) { + path.setAttributeNS(null, "style", group.style); + } + + path.setAttributeNS(null, "d", "M" + x + "," + y + " L" + (x + iconWidth) + "," + y + ""); + if (group.options.shaded.enabled == true) { + fillPath = DOMutil.getSVGElement("path", framework.svgElements, framework.svg); + if (group.options.shaded.orientation == 'top') { + fillPath.setAttributeNS(null, "d", "M" + x + ", " + (y - fillHeight) + "L" + x + "," + y + " L" + (x + iconWidth) + "," + y + " L" + (x + iconWidth) + "," + (y - fillHeight)); + } else { + fillPath.setAttributeNS(null, "d", "M" + x + "," + y + " " + "L" + x + "," + (y + fillHeight) + " " + "L" + (x + iconWidth) + "," + (y + fillHeight) + "L" + (x + iconWidth) + "," + y); + } + fillPath.setAttributeNS(null, "class", group.className + " vis-icon-fill"); + if (group.options.shaded.style !== undefined && group.options.shaded.style !== "") { + fillPath.setAttributeNS(null, "style", group.options.shaded.style); + } + } + + if (group.options.drawPoints.enabled == true) { + var groupTemplate = { + style: group.options.drawPoints.style, + styles: group.options.drawPoints.styles, + size: group.options.drawPoints.size, + className: group.className + }; + DOMutil.drawPoint(x + 0.5 * iconWidth, y, groupTemplate, framework.svgElements, framework.svg); + } +}; + +Line.drawShading = function (pathArray, group, subPathArray, framework) { + // append shading to the path + if (group.options.shaded.enabled == true) { + var svgHeight = Number(framework.svg.style.height.replace('px', '')); + var fillPath = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); + var type = "L"; + if (group.options.interpolation.enabled == true) { + type = "C"; + } + var dFill; + var zero = 0; + if (group.options.shaded.orientation == 'top') { + zero = 0; + } else if (group.options.shaded.orientation == 'bottom') { + zero = svgHeight; + } else { + zero = Math.min(Math.max(0, group.zeroPosition), svgHeight); + } + if (group.options.shaded.orientation == 'group' && subPathArray != null && subPathArray != undefined) { + dFill = 'M' + pathArray[0][0] + "," + pathArray[0][1] + " " + this.serializePath(pathArray, type, false) + ' L' + subPathArray[subPathArray.length - 1][0] + "," + subPathArray[subPathArray.length - 1][1] + " " + this.serializePath(subPathArray, type, true) + subPathArray[0][0] + "," + subPathArray[0][1] + " Z"; + } else { + dFill = 'M' + pathArray[0][0] + "," + pathArray[0][1] + " " + this.serializePath(pathArray, type, false) + ' V' + zero + ' H' + pathArray[0][0] + " Z"; + } + + fillPath.setAttributeNS(null, 'class', group.className + ' vis-fill'); + if (group.options.shaded.style !== undefined) { + fillPath.setAttributeNS(null, 'style', group.options.shaded.style); + } + fillPath.setAttributeNS(null, 'd', dFill); + } +}; + +/** + * draw a line graph + * + * @param {Array.} pathArray + * @param {vis.Group} group + * @param {{svg: Object, svgElements: Array., options: Object, groups: Array.}} framework + */ +Line.draw = function (pathArray, group, framework) { + if (pathArray != null && pathArray != undefined) { + var path = DOMutil.getSVGElement('path', framework.svgElements, framework.svg); + path.setAttributeNS(null, "class", group.className); + if (group.style !== undefined) { + path.setAttributeNS(null, "style", group.style); + } + + var type = "L"; + if (group.options.interpolation.enabled == true) { + type = "C"; + } + // copy properties to path for drawing. + path.setAttributeNS(null, 'd', 'M' + pathArray[0][0] + "," + pathArray[0][1] + " " + this.serializePath(pathArray, type, false)); + } +}; + +Line.serializePath = function (pathArray, type, inverse) { + if (pathArray.length < 2) { + //Too little data to create a path. + return ""; + } + var d = type; + var i; + if (inverse) { + for (i = pathArray.length - 2; i > 0; i--) { + d += pathArray[i][0] + "," + pathArray[i][1] + " "; + } + } else { + for (i = 1; i < pathArray.length; i++) { + d += pathArray[i][0] + "," + pathArray[i][1] + " "; + } + } + return d; +}; + +/** + * This uses an uniform parametrization of the interpolation algorithm: + * 'On the Parameterization of Catmull-Rom Curves' by Cem Yuksel et al. + * @param {Array.} data + * @returns {string} + * @private + */ +Line._catmullRomUniform = function (data) { + // catmull rom + var p0, p1, p2, p3, bp1, bp2; + var d = []; + d.push([Math.round(data[0].screen_x), Math.round(data[0].screen_y)]); + var normalization = 1 / 6; + var length = data.length; + for (var i = 0; i < length - 1; i++) { + + p0 = i == 0 ? data[0] : data[i - 1]; + p1 = data[i]; + p2 = data[i + 1]; + p3 = i + 2 < length ? data[i + 2] : p2; + + // Catmull-Rom to Cubic Bezier conversion matrix + // 0 1 0 0 + // -1/6 1 1/6 0 + // 0 1/6 1 -1/6 + // 0 0 1 0 + + // bp0 = { x: p1.x, y: p1.y }; + bp1 = { + screen_x: (-p0.screen_x + 6 * p1.screen_x + p2.screen_x) * normalization, + screen_y: (-p0.screen_y + 6 * p1.screen_y + p2.screen_y) * normalization + }; + bp2 = { + screen_x: (p1.screen_x + 6 * p2.screen_x - p3.screen_x) * normalization, + screen_y: (p1.screen_y + 6 * p2.screen_y - p3.screen_y) * normalization + }; + // bp0 = { x: p2.x, y: p2.y }; + + d.push([bp1.screen_x, bp1.screen_y]); + d.push([bp2.screen_x, bp2.screen_y]); + d.push([p2.screen_x, p2.screen_y]); + } + + return d; +}; + +/** + * This uses either the chordal or centripetal parameterization of the catmull-rom algorithm. + * By default, the centripetal parameterization is used because this gives the nicest results. + * These parameterizations are relatively heavy because the distance between 4 points have to be calculated. + * + * One optimization can be used to reuse distances since this is a sliding window approach. + * @param {Array.} data + * @param {vis.GraphGroup} group + * @returns {string} + * @private + */ +Line._catmullRom = function (data, group) { + var alpha = group.options.interpolation.alpha; + if (alpha == 0 || alpha === undefined) { + return this._catmullRomUniform(data); + } else { + var p0, p1, p2, p3, bp1, bp2, d1, d2, d3, A, B, N, M; + var d3powA, d2powA, d3pow2A, d2pow2A, d1pow2A, d1powA; + var d = []; + d.push([Math.round(data[0].screen_x), Math.round(data[0].screen_y)]); + var length = data.length; + for (var i = 0; i < length - 1; i++) { + + p0 = i == 0 ? data[0] : data[i - 1]; + p1 = data[i]; + p2 = data[i + 1]; + p3 = i + 2 < length ? data[i + 2] : p2; + + d1 = Math.sqrt(Math.pow(p0.screen_x - p1.screen_x, 2) + Math.pow(p0.screen_y - p1.screen_y, 2)); + d2 = Math.sqrt(Math.pow(p1.screen_x - p2.screen_x, 2) + Math.pow(p1.screen_y - p2.screen_y, 2)); + d3 = Math.sqrt(Math.pow(p2.screen_x - p3.screen_x, 2) + Math.pow(p2.screen_y - p3.screen_y, 2)); + + // Catmull-Rom to Cubic Bezier conversion matrix + + // A = 2d1^2a + 3d1^a * d2^a + d3^2a + // B = 2d3^2a + 3d3^a * d2^a + d2^2a + + // [ 0 1 0 0 ] + // [ -d2^2a /N A/N d1^2a /N 0 ] + // [ 0 d3^2a /M B/M -d2^2a /M ] + // [ 0 0 1 0 ] + + d3powA = Math.pow(d3, alpha); + d3pow2A = Math.pow(d3, 2 * alpha); + d2powA = Math.pow(d2, alpha); + d2pow2A = Math.pow(d2, 2 * alpha); + d1powA = Math.pow(d1, alpha); + d1pow2A = Math.pow(d1, 2 * alpha); + + A = 2 * d1pow2A + 3 * d1powA * d2powA + d2pow2A; + B = 2 * d3pow2A + 3 * d3powA * d2powA + d2pow2A; + N = 3 * d1powA * (d1powA + d2powA); + if (N > 0) { + N = 1 / N; + } + M = 3 * d3powA * (d3powA + d2powA); + if (M > 0) { + M = 1 / M; + } + + bp1 = { + screen_x: (-d2pow2A * p0.screen_x + A * p1.screen_x + d1pow2A * p2.screen_x) * N, + screen_y: (-d2pow2A * p0.screen_y + A * p1.screen_y + d1pow2A * p2.screen_y) * N + }; + + bp2 = { + screen_x: (d3pow2A * p1.screen_x + B * p2.screen_x - d2pow2A * p3.screen_x) * M, + screen_y: (d3pow2A * p1.screen_y + B * p2.screen_y - d2pow2A * p3.screen_y) * M + }; + + if (bp1.screen_x == 0 && bp1.screen_y == 0) { + bp1 = p1; + } + if (bp2.screen_x == 0 && bp2.screen_y == 0) { + bp2 = p2; + } + d.push([bp1.screen_x, bp1.screen_y]); + d.push([bp2.screen_x, bp2.screen_y]); + d.push([p2.screen_x, p2.screen_y]); + } + + return d; + } +}; + +/** + * this generates the SVG path for a linear drawing between datapoints. + * @param {Array.} data + * @returns {string} + * @private + */ +Line._linear = function (data) { + // linear + var d = []; + for (var i = 0; i < data.length; i++) { + d.push([data[i].screen_x, data[i].screen_y]); + } + return d; +}; + +module.exports = Line; + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var DOMutil = __webpack_require__(14); +var Component = __webpack_require__(16); + +/** + * Legend for Graph2d + * + * @param {vis.Graph2d.body} body + * @param {vis.Graph2d.options} options + * @param {number} side + * @param {vis.LineGraph.options} linegraphOptions + * @constructor Legend + * @extends Component + */ +function Legend(body, options, side, linegraphOptions) { + this.body = body; + this.defaultOptions = { + enabled: false, + icons: true, + iconSize: 20, + iconSpacing: 6, + left: { + visible: true, + position: 'top-left' // top/bottom - left,center,right + }, + right: { + visible: true, + position: 'top-right' // top/bottom - left,center,right + } + }; + + this.side = side; + this.options = util.extend({}, this.defaultOptions); + this.linegraphOptions = linegraphOptions; + + this.svgElements = {}; + this.dom = {}; + this.groups = {}; + this.amountOfGroups = 0; + this._create(); + this.framework = { svg: this.svg, svgElements: this.svgElements, options: this.options, groups: this.groups }; + + this.setOptions(options); +} + +Legend.prototype = new Component(); + +Legend.prototype.clear = function () { + this.groups = {}; + this.amountOfGroups = 0; +}; + +Legend.prototype.addGroup = function (label, graphOptions) { + + // Include a group only if the group option 'excludeFromLegend: false' is not set. + if (graphOptions.options.excludeFromLegend != true) { + if (!this.groups.hasOwnProperty(label)) { + this.groups[label] = graphOptions; + } + this.amountOfGroups += 1; + } +}; + +Legend.prototype.updateGroup = function (label, graphOptions) { + this.groups[label] = graphOptions; +}; + +Legend.prototype.removeGroup = function (label) { + if (this.groups.hasOwnProperty(label)) { + delete this.groups[label]; + this.amountOfGroups -= 1; + } +}; + +Legend.prototype._create = function () { + this.dom.frame = document.createElement('div'); + this.dom.frame.className = 'vis-legend'; + this.dom.frame.style.position = "absolute"; + this.dom.frame.style.top = "10px"; + this.dom.frame.style.display = "block"; + + this.dom.textArea = document.createElement('div'); + this.dom.textArea.className = 'vis-legend-text'; + this.dom.textArea.style.position = "relative"; + this.dom.textArea.style.top = "0px"; + + this.svg = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + this.svg.style.position = 'absolute'; + this.svg.style.top = 0 + 'px'; + this.svg.style.width = this.options.iconSize + 5 + 'px'; + this.svg.style.height = '100%'; + + this.dom.frame.appendChild(this.svg); + this.dom.frame.appendChild(this.dom.textArea); +}; + +/** + * Hide the component from the DOM + */ +Legend.prototype.hide = function () { + // remove the frame containing the items + if (this.dom.frame.parentNode) { + this.dom.frame.parentNode.removeChild(this.dom.frame); + } +}; + +/** + * Show the component in the DOM (when not already visible). + */ +Legend.prototype.show = function () { + // show frame containing the items + if (!this.dom.frame.parentNode) { + this.body.dom.center.appendChild(this.dom.frame); + } +}; + +Legend.prototype.setOptions = function (options) { + var fields = ['enabled', 'orientation', 'icons', 'left', 'right']; + util.selectiveDeepExtend(fields, this.options, options); +}; + +Legend.prototype.redraw = function () { + var activeGroups = 0; + var groupArray = (0, _keys2['default'])(this.groups); + groupArray.sort(function (a, b) { + return a < b ? -1 : 1; + }); + + for (var i = 0; i < groupArray.length; i++) { + var groupId = groupArray[i]; + if (this.groups[groupId].visible == true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] == true)) { + activeGroups++; + } + } + + if (this.options[this.side].visible == false || this.amountOfGroups == 0 || this.options.enabled == false || activeGroups == 0) { + this.hide(); + } else { + this.show(); + if (this.options[this.side].position == 'top-left' || this.options[this.side].position == 'bottom-left') { + this.dom.frame.style.left = '4px'; + this.dom.frame.style.textAlign = "left"; + this.dom.textArea.style.textAlign = "left"; + this.dom.textArea.style.left = this.options.iconSize + 15 + 'px'; + this.dom.textArea.style.right = ''; + this.svg.style.left = 0 + 'px'; + this.svg.style.right = ''; + } else { + this.dom.frame.style.right = '4px'; + this.dom.frame.style.textAlign = "right"; + this.dom.textArea.style.textAlign = "right"; + this.dom.textArea.style.right = this.options.iconSize + 15 + 'px'; + this.dom.textArea.style.left = ''; + this.svg.style.right = 0 + 'px'; + this.svg.style.left = ''; + } + + if (this.options[this.side].position == 'top-left' || this.options[this.side].position == 'top-right') { + this.dom.frame.style.top = 4 - Number(this.body.dom.center.style.top.replace("px", "")) + 'px'; + this.dom.frame.style.bottom = ''; + } else { + var scrollableHeight = this.body.domProps.center.height - this.body.domProps.centerContainer.height; + this.dom.frame.style.bottom = 4 + scrollableHeight + Number(this.body.dom.center.style.top.replace("px", "")) + 'px'; + this.dom.frame.style.top = ''; + } + + if (this.options.icons == false) { + this.dom.frame.style.width = this.dom.textArea.offsetWidth + 10 + 'px'; + this.dom.textArea.style.right = ''; + this.dom.textArea.style.left = ''; + this.svg.style.width = '0px'; + } else { + this.dom.frame.style.width = this.options.iconSize + 15 + this.dom.textArea.offsetWidth + 10 + 'px'; + this.drawLegendIcons(); + } + + var content = ''; + for (i = 0; i < groupArray.length; i++) { + groupId = groupArray[i]; + if (this.groups[groupId].visible == true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] == true)) { + content += this.groups[groupId].content + '
'; + } + } + this.dom.textArea.innerHTML = content; + this.dom.textArea.style.lineHeight = 0.75 * this.options.iconSize + this.options.iconSpacing + 'px'; + } +}; + +Legend.prototype.drawLegendIcons = function () { + if (this.dom.frame.parentNode) { + var groupArray = (0, _keys2['default'])(this.groups); + groupArray.sort(function (a, b) { + return a < b ? -1 : 1; + }); + + // this resets the elements so the order is maintained + DOMutil.resetElements(this.svgElements); + + var padding = window.getComputedStyle(this.dom.frame).paddingTop; + var iconOffset = Number(padding.replace('px', '')); + var x = iconOffset; + var iconWidth = this.options.iconSize; + var iconHeight = 0.75 * this.options.iconSize; + var y = iconOffset + 0.5 * iconHeight + 3; + + this.svg.style.width = iconWidth + 5 + iconOffset + 'px'; + + for (var i = 0; i < groupArray.length; i++) { + var groupId = groupArray[i]; + if (this.groups[groupId].visible == true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] == true)) { + this.groups[groupId].getLegend(iconWidth, iconHeight, this.framework, x, y); + y += iconHeight + this.options.iconSpacing; + } + } + } +}; + +module.exports = Legend; + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * This object contains all possible options. It will check if the types are correct, if required if the option is one + * of the allowed values. + * + * __any__ means that the name of the property does not matter. + * __type__ is a required field for all objects and contains the allowed types of all objects + */ +var string = 'string'; +var bool = 'boolean'; +var number = 'number'; +var array = 'array'; +var date = 'date'; +var object = 'object'; // should only be in a __type__ property +var dom = 'dom'; +var moment = 'moment'; +var any = 'any'; + +var allOptions = { + configure: { + enabled: { 'boolean': bool }, + filter: { 'boolean': bool, 'function': 'function' }, + container: { dom: dom }, + __type__: { object: object, 'boolean': bool, 'function': 'function' } + }, + + //globals : + yAxisOrientation: { string: ['left', 'right'] }, + defaultGroup: { string: string }, + sort: { 'boolean': bool }, + sampling: { 'boolean': bool }, + stack: { 'boolean': bool }, + graphHeight: { string: string, number: number }, + shaded: { + enabled: { 'boolean': bool }, + orientation: { string: ['bottom', 'top', 'zero', 'group'] }, // top, bottom, zero, group + groupId: { object: object }, + __type__: { 'boolean': bool, object: object } + }, + style: { string: ['line', 'bar', 'points'] }, // line, bar + barChart: { + width: { number: number }, + minWidth: { number: number }, + sideBySide: { 'boolean': bool }, + align: { string: ['left', 'center', 'right'] }, + __type__: { object: object } + }, + interpolation: { + enabled: { 'boolean': bool }, + parametrization: { string: ['centripetal', 'chordal', 'uniform'] }, // uniform (alpha = 0.0), chordal (alpha = 1.0), centripetal (alpha = 0.5) + alpha: { number: number }, + __type__: { object: object, 'boolean': bool } + }, + drawPoints: { + enabled: { 'boolean': bool }, + onRender: { 'function': 'function' }, + size: { number: number }, + style: { string: ['square', 'circle'] }, // square, circle + __type__: { object: object, 'boolean': bool, 'function': 'function' } + }, + dataAxis: { + showMinorLabels: { 'boolean': bool }, + showMajorLabels: { 'boolean': bool }, + icons: { 'boolean': bool }, + width: { string: string, number: number }, + visible: { 'boolean': bool }, + alignZeros: { 'boolean': bool }, + left: { + range: { min: { number: number, 'undefined': 'undefined' }, max: { number: number, 'undefined': 'undefined' }, __type__: { object: object } }, + format: { 'function': 'function' }, + title: { text: { string: string, number: number, 'undefined': 'undefined' }, style: { string: string, 'undefined': 'undefined' }, __type__: { object: object } }, + __type__: { object: object } + }, + right: { + range: { min: { number: number, 'undefined': 'undefined' }, max: { number: number, 'undefined': 'undefined' }, __type__: { object: object } }, + format: { 'function': 'function' }, + title: { text: { string: string, number: number, 'undefined': 'undefined' }, style: { string: string, 'undefined': 'undefined' }, __type__: { object: object } }, + __type__: { object: object } + }, + __type__: { object: object } + }, + legend: { + enabled: { 'boolean': bool }, + icons: { 'boolean': bool }, + left: { + visible: { 'boolean': bool }, + position: { string: ['top-right', 'bottom-right', 'top-left', 'bottom-left'] }, + __type__: { object: object } + }, + right: { + visible: { 'boolean': bool }, + position: { string: ['top-right', 'bottom-right', 'top-left', 'bottom-left'] }, + __type__: { object: object } + }, + __type__: { object: object, 'boolean': bool } + }, + groups: { + visibility: { any: any }, + __type__: { object: object } + }, + + autoResize: { 'boolean': bool }, + throttleRedraw: { number: number }, // TODO: DEPRICATED see https://github.com/almende/vis/issues/2511 + clickToUse: { 'boolean': bool }, + end: { number: number, date: date, string: string, moment: moment }, + format: { + minorLabels: { + millisecond: { string: string, 'undefined': 'undefined' }, + second: { string: string, 'undefined': 'undefined' }, + minute: { string: string, 'undefined': 'undefined' }, + hour: { string: string, 'undefined': 'undefined' }, + weekday: { string: string, 'undefined': 'undefined' }, + day: { string: string, 'undefined': 'undefined' }, + month: { string: string, 'undefined': 'undefined' }, + year: { string: string, 'undefined': 'undefined' }, + __type__: { object: object } + }, + majorLabels: { + millisecond: { string: string, 'undefined': 'undefined' }, + second: { string: string, 'undefined': 'undefined' }, + minute: { string: string, 'undefined': 'undefined' }, + hour: { string: string, 'undefined': 'undefined' }, + weekday: { string: string, 'undefined': 'undefined' }, + day: { string: string, 'undefined': 'undefined' }, + month: { string: string, 'undefined': 'undefined' }, + year: { string: string, 'undefined': 'undefined' }, + __type__: { object: object } + }, + __type__: { object: object } + }, + moment: { 'function': 'function' }, + height: { string: string, number: number }, + hiddenDates: { + start: { date: date, number: number, string: string, moment: moment }, + end: { date: date, number: number, string: string, moment: moment }, + repeat: { string: string }, + __type__: { object: object, array: array } + }, + locale: { string: string }, + locales: { + __any__: { any: any }, + __type__: { object: object } + }, + max: { date: date, number: number, string: string, moment: moment }, + maxHeight: { number: number, string: string }, + maxMinorChars: { number: number }, + min: { date: date, number: number, string: string, moment: moment }, + minHeight: { number: number, string: string }, + moveable: { 'boolean': bool }, + multiselect: { 'boolean': bool }, + orientation: { string: string }, + showCurrentTime: { 'boolean': bool }, + showMajorLabels: { 'boolean': bool }, + showMinorLabels: { 'boolean': bool }, + start: { date: date, number: number, string: string, moment: moment }, + timeAxis: { + scale: { string: string, 'undefined': 'undefined' }, + step: { number: number, 'undefined': 'undefined' }, + __type__: { object: object } + }, + width: { string: string, number: number }, + zoomable: { 'boolean': bool }, + zoomKey: { string: ['ctrlKey', 'altKey', 'metaKey', ''] }, + zoomMax: { number: number }, + zoomMin: { number: number }, + zIndex: { number: number }, + __type__: { object: object } +}; + +var configureOptions = { + global: { + //yAxisOrientation: ['left','right'], // TDOO: enable as soon as Grahp2d doesn't crash when changing this on the fly + sort: true, + sampling: true, + stack: false, + shaded: { + enabled: false, + orientation: ['zero', 'top', 'bottom', 'group'] // zero, top, bottom + }, + style: ['line', 'bar', 'points'], // line, bar + barChart: { + width: [50, 5, 100, 5], + minWidth: [50, 5, 100, 5], + sideBySide: false, + align: ['left', 'center', 'right'] // left, center, right + }, + interpolation: { + enabled: true, + parametrization: ['centripetal', 'chordal', 'uniform'] // uniform (alpha = 0.0), chordal (alpha = 1.0), centripetal (alpha = 0.5) + }, + drawPoints: { + enabled: true, + size: [6, 2, 30, 1], + style: ['square', 'circle'] // square, circle + }, + dataAxis: { + showMinorLabels: true, + showMajorLabels: true, + icons: false, + width: [40, 0, 200, 1], + visible: true, + alignZeros: true, + left: { + //range: {min:'undefined': 'undefined'ined,max:'undefined': 'undefined'ined}, + //format: function (value) {return value;}, + title: { text: '', style: '' } + }, + right: { + //range: {min:'undefined': 'undefined'ined,max:'undefined': 'undefined'ined}, + //format: function (value) {return value;}, + title: { text: '', style: '' } + } + }, + legend: { + enabled: false, + icons: true, + left: { + visible: true, + position: ['top-right', 'bottom-right', 'top-left', 'bottom-left'] // top/bottom - left,right + }, + right: { + visible: true, + position: ['top-right', 'bottom-right', 'top-left', 'bottom-left'] // top/bottom - left,right + } + }, + + autoResize: true, + clickToUse: false, + end: '', + format: { + minorLabels: { + millisecond: 'SSS', + second: 's', + minute: 'HH:mm', + hour: 'HH:mm', + weekday: 'ddd D', + day: 'D', + month: 'MMM', + year: 'YYYY' + }, + majorLabels: { + millisecond: 'HH:mm:ss', + second: 'D MMMM HH:mm', + minute: 'ddd D MMMM', + hour: 'ddd D MMMM', + weekday: 'MMMM YYYY', + day: 'MMMM YYYY', + month: 'YYYY', + year: '' + } + }, + + height: '', + locale: '', + max: '', + maxHeight: '', + maxMinorChars: [7, 0, 20, 1], + min: '', + minHeight: '', + moveable: true, + orientation: ['both', 'bottom', 'top'], + showCurrentTime: false, + showMajorLabels: true, + showMinorLabels: true, + start: '', + width: '100%', + zoomable: true, + zoomKey: ['ctrlKey', 'altKey', 'metaKey', ''], + zoomMax: [315360000000000, 10, 315360000000000, 1], + zoomMin: [10, 10, 315360000000000, 1], + zIndex: 0 + } +}; + +exports.allOptions = allOptions; +exports.configureOptions = configureOptions; + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _create = __webpack_require__(29); + +var _create2 = _interopRequireDefault(_create); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * Parse a text source containing data in DOT language into a JSON object. + * The object contains two lists: one with nodes and one with edges. + * + * DOT language reference: http://www.graphviz.org/doc/info/lang.html + * + * DOT language attributes: http://graphviz.org/content/attrs + * + * @param {string} data Text containing a graph in DOT-notation + * @return {Object} graph An object containing two parameters: + * {Object[]} nodes + * {Object[]} edges + * + * ------------------------------------------- + * TODO + * ==== + * + * For label handling, this is an incomplete implementation. From docs (quote #3015): + * + * > the escape sequences "\n", "\l" and "\r" divide the label into lines, centered, + * > left-justified, and right-justified, respectively. + * + * Source: http://www.graphviz.org/content/attrs#kescString + * + * > As another aid for readability, dot allows double-quoted strings to span multiple physical + * > lines using the standard C convention of a backslash immediately preceding a newline + * > character + * > In addition, double-quoted strings can be concatenated using a '+' operator. + * > As HTML strings can contain newline characters, which are used solely for formatting, + * > the language does not allow escaped newlines or concatenation operators to be used + * > within them. + * + * - Currently, only '\\n' is handled + * - Note that text explicitly says 'labels'; the dot parser currently handles escape + * sequences in **all** strings. + */ +function parseDOT(data) { + dot = data; + return parseGraph(); +} + +// mapping of attributes from DOT (the keys) to vis.js (the values) +var NODE_ATTR_MAPPING = { + 'fontsize': 'font.size', + 'fontcolor': 'font.color', + 'labelfontcolor': 'font.color', + 'fontname': 'font.face', + 'color': ['color.border', 'color.background'], + 'fillcolor': 'color.background', + 'tooltip': 'title', + 'labeltooltip': 'title' +}; +var EDGE_ATTR_MAPPING = (0, _create2['default'])(NODE_ATTR_MAPPING); +EDGE_ATTR_MAPPING.color = 'color.color'; +EDGE_ATTR_MAPPING.style = 'dashes'; + +// token types enumeration +var TOKENTYPE = { + NULL: 0, + DELIMITER: 1, + IDENTIFIER: 2, + UNKNOWN: 3 +}; + +// map with all delimiters +var DELIMITERS = { + '{': true, + '}': true, + '[': true, + ']': true, + ';': true, + '=': true, + ',': true, + + '->': true, + '--': true +}; + +var dot = ''; // current dot file +var index = 0; // current index in dot file +var c = ''; // current token character in expr +var token = ''; // current token +var tokenType = TOKENTYPE.NULL; // type of the token + +/** + * Get the first character from the dot file. + * The character is stored into the char c. If the end of the dot file is + * reached, the function puts an empty string in c. + */ +function first() { + index = 0; + c = dot.charAt(0); +} + +/** + * Get the next character from the dot file. + * The character is stored into the char c. If the end of the dot file is + * reached, the function puts an empty string in c. + */ +function next() { + index++; + c = dot.charAt(index); +} + +/** + * Preview the next character from the dot file. + * @return {string} cNext + */ +function nextPreview() { + return dot.charAt(index + 1); +} + +var regexAlphaNumeric = /[a-zA-Z_0-9.:#]/; +/** + * Test whether given character is alphabetic or numeric + * @param {string} c + * @return {Boolean} isAlphaNumeric + */ +function isAlphaNumeric(c) { + return regexAlphaNumeric.test(c); +} + +/** + * Merge all options of object b into object b + * @param {Object} a + * @param {Object} b + * @return {Object} a + */ +function merge(a, b) { + if (!a) { + a = {}; + } + + if (b) { + for (var name in b) { + if (b.hasOwnProperty(name)) { + a[name] = b[name]; + } + } + } + return a; +} + +/** + * Set a value in an object, where the provided parameter name can be a + * path with nested parameters. For example: + * + * var obj = {a: 2}; + * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}} + * + * @param {Object} obj + * @param {string} path A parameter name or dot-separated parameter path, + * like "color.highlight.border". + * @param {*} value + */ +function setValue(obj, path, value) { + var keys = path.split('.'); + var o = obj; + while (keys.length) { + var key = keys.shift(); + if (keys.length) { + // this isn't the end point + if (!o[key]) { + o[key] = {}; + } + o = o[key]; + } else { + // this is the end point + o[key] = value; + } + } +} + +/** + * Add a node to a graph object. If there is already a node with + * the same id, their attributes will be merged. + * @param {Object} graph + * @param {Object} node + */ +function addNode(graph, node) { + var i, len; + var current = null; + + // find root graph (in case of subgraph) + var graphs = [graph]; // list with all graphs from current graph to root graph + var root = graph; + while (root.parent) { + graphs.push(root.parent); + root = root.parent; + } + + // find existing node (at root level) by its id + if (root.nodes) { + for (i = 0, len = root.nodes.length; i < len; i++) { + if (node.id === root.nodes[i].id) { + current = root.nodes[i]; + break; + } + } + } + + if (!current) { + // this is a new node + current = { + id: node.id + }; + if (graph.node) { + // clone default attributes + current.attr = merge(current.attr, graph.node); + } + } + + // add node to this (sub)graph and all its parent graphs + for (i = graphs.length - 1; i >= 0; i--) { + var g = graphs[i]; + + if (!g.nodes) { + g.nodes = []; + } + if (g.nodes.indexOf(current) === -1) { + g.nodes.push(current); + } + } + + // merge attributes + if (node.attr) { + current.attr = merge(current.attr, node.attr); + } +} + +/** + * Add an edge to a graph object + * @param {Object} graph + * @param {Object} edge + */ +function addEdge(graph, edge) { + if (!graph.edges) { + graph.edges = []; + } + graph.edges.push(edge); + if (graph.edge) { + var attr = merge({}, graph.edge); // clone default attributes + edge.attr = merge(attr, edge.attr); // merge attributes + } +} + +/** + * Create an edge to a graph object + * @param {Object} graph + * @param {string | number | Object} from + * @param {string | number | Object} to + * @param {string} type + * @param {Object | null} attr + * @return {Object} edge + */ +function createEdge(graph, from, to, type, attr) { + var edge = { + from: from, + to: to, + type: type + }; + + if (graph.edge) { + edge.attr = merge({}, graph.edge); // clone default attributes + } + edge.attr = merge(edge.attr || {}, attr); // merge attributes + + return edge; +} + +/** + * Get next token in the current dot file. + * The token and token type are available as token and tokenType + */ +function getToken() { + tokenType = TOKENTYPE.NULL; + token = ''; + + // skip over whitespaces + while (c === ' ' || c === '\t' || c === '\n' || c === '\r') { + // space, tab, enter + next(); + } + + do { + var isComment = false; + + // skip comment + if (c === '#') { + // find the previous non-space character + var i = index - 1; + while (dot.charAt(i) === ' ' || dot.charAt(i) === '\t') { + i--; + } + if (dot.charAt(i) === '\n' || dot.charAt(i) === '') { + // the # is at the start of a line, this is indeed a line comment + while (c != '' && c != '\n') { + next(); + } + isComment = true; + } + } + if (c === '/' && nextPreview() === '/') { + // skip line comment + while (c != '' && c != '\n') { + next(); + } + isComment = true; + } + if (c === '/' && nextPreview() === '*') { + // skip block comment + while (c != '') { + if (c === '*' && nextPreview() === '/') { + // end of block comment found. skip these last two characters + next(); + next(); + break; + } else { + next(); + } + } + isComment = true; + } + + // skip over whitespaces + while (c === ' ' || c === '\t' || c === '\n' || c === '\r') { + // space, tab, enter + next(); + } + } while (isComment); + + // check for end of dot file + if (c === '') { + // token is still empty + tokenType = TOKENTYPE.DELIMITER; + return; + } + + // check for delimiters consisting of 2 characters + var c2 = c + nextPreview(); + if (DELIMITERS[c2]) { + tokenType = TOKENTYPE.DELIMITER; + token = c2; + next(); + next(); + return; + } + + // check for delimiters consisting of 1 character + if (DELIMITERS[c]) { + tokenType = TOKENTYPE.DELIMITER; + token = c; + next(); + return; + } + + // check for an identifier (number or string) + // TODO: more precise parsing of numbers/strings (and the port separator ':') + if (isAlphaNumeric(c) || c === '-') { + token += c; + next(); + + while (isAlphaNumeric(c)) { + token += c; + next(); + } + if (token === 'false') { + token = false; // convert to boolean + } else if (token === 'true') { + token = true; // convert to boolean + } else if (!isNaN(Number(token))) { + token = Number(token); // convert to number + } + tokenType = TOKENTYPE.IDENTIFIER; + return; + } + + // check for a string enclosed by double quotes + if (c === '"') { + next(); + while (c != '' && (c != '"' || c === '"' && nextPreview() === '"')) { + if (c === '"') { + // skip the escape character + token += c; + next(); + } else if (c === '\\' && nextPreview() === 'n') { + // Honor a newline escape sequence + token += '\n'; + next(); + } else { + token += c; + } + next(); + } + if (c != '"') { + throw newSyntaxError('End of string " expected'); + } + next(); + tokenType = TOKENTYPE.IDENTIFIER; + return; + } + + // something unknown is found, wrong characters, a syntax error + tokenType = TOKENTYPE.UNKNOWN; + while (c != '') { + token += c; + next(); + } + throw new SyntaxError('Syntax error in part "' + chop(token, 30) + '"'); +} + +/** + * Parse a graph. + * @returns {Object} graph + */ +function parseGraph() { + var graph = {}; + + first(); + getToken(); + + // optional strict keyword + if (token === 'strict') { + graph.strict = true; + getToken(); + } + + // graph or digraph keyword + if (token === 'graph' || token === 'digraph') { + graph.type = token; + getToken(); + } + + // optional graph id + if (tokenType === TOKENTYPE.IDENTIFIER) { + graph.id = token; + getToken(); + } + + // open angle bracket + if (token != '{') { + throw newSyntaxError('Angle bracket { expected'); + } + getToken(); + + // statements + parseStatements(graph); + + // close angle bracket + if (token != '}') { + throw newSyntaxError('Angle bracket } expected'); + } + getToken(); + + // end of file + if (token !== '') { + throw newSyntaxError('End of file expected'); + } + getToken(); + + // remove temporary default options + delete graph.node; + delete graph.edge; + delete graph.graph; + + return graph; +} + +/** + * Parse a list with statements. + * @param {Object} graph + */ +function parseStatements(graph) { + while (token !== '' && token != '}') { + parseStatement(graph); + if (token === ';') { + getToken(); + } + } +} + +/** + * Parse a single statement. Can be a an attribute statement, node + * statement, a series of node statements and edge statements, or a + * parameter. + * @param {Object} graph + */ +function parseStatement(graph) { + // parse subgraph + var subgraph = parseSubgraph(graph); + if (subgraph) { + // edge statements + parseEdge(graph, subgraph); + + return; + } + + // parse an attribute statement + var attr = parseAttributeStatement(graph); + if (attr) { + return; + } + + // parse node + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier expected'); + } + var id = token; // id can be a string or a number + getToken(); + + if (token === '=') { + // id statement + getToken(); + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier expected'); + } + graph[id] = token; + getToken(); + // TODO: implement comma separated list with "a_list: ID=ID [','] [a_list] " + } else { + parseNodeStatement(graph, id); + } +} + +/** + * Parse a subgraph + * @param {Object} graph parent graph object + * @return {Object | null} subgraph + */ +function parseSubgraph(graph) { + var subgraph = null; + + // optional subgraph keyword + if (token === 'subgraph') { + subgraph = {}; + subgraph.type = 'subgraph'; + getToken(); + + // optional graph id + if (tokenType === TOKENTYPE.IDENTIFIER) { + subgraph.id = token; + getToken(); + } + } + + // open angle bracket + if (token === '{') { + getToken(); + + if (!subgraph) { + subgraph = {}; + } + subgraph.parent = graph; + subgraph.node = graph.node; + subgraph.edge = graph.edge; + subgraph.graph = graph.graph; + + // statements + parseStatements(subgraph); + + // close angle bracket + if (token != '}') { + throw newSyntaxError('Angle bracket } expected'); + } + getToken(); + + // remove temporary default options + delete subgraph.node; + delete subgraph.edge; + delete subgraph.graph; + delete subgraph.parent; + + // register at the parent graph + if (!graph.subgraphs) { + graph.subgraphs = []; + } + graph.subgraphs.push(subgraph); + } + + return subgraph; +} + +/** + * parse an attribute statement like "node [shape=circle fontSize=16]". + * Available keywords are 'node', 'edge', 'graph'. + * The previous list with default attributes will be replaced + * @param {Object} graph + * @returns {String | null} keyword Returns the name of the parsed attribute + * (node, edge, graph), or null if nothing + * is parsed. + */ +function parseAttributeStatement(graph) { + // attribute statements + if (token === 'node') { + getToken(); + + // node attributes + graph.node = parseAttributeList(); + return 'node'; + } else if (token === 'edge') { + getToken(); + + // edge attributes + graph.edge = parseAttributeList(); + return 'edge'; + } else if (token === 'graph') { + getToken(); + + // graph attributes + graph.graph = parseAttributeList(); + return 'graph'; + } + + return null; +} + +/** + * parse a node statement + * @param {Object} graph + * @param {string | number} id + */ +function parseNodeStatement(graph, id) { + // node statement + var node = { + id: id + }; + var attr = parseAttributeList(); + if (attr) { + node.attr = attr; + } + addNode(graph, node); + + // edge statements + parseEdge(graph, id); +} + +/** + * Parse an edge or a series of edges + * @param {Object} graph + * @param {string | number} from Id of the from node + */ +function parseEdge(graph, from) { + while (token === '->' || token === '--') { + var to; + var type = token; + getToken(); + + var subgraph = parseSubgraph(graph); + if (subgraph) { + to = subgraph; + } else { + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier or subgraph expected'); + } + to = token; + addNode(graph, { + id: to + }); + getToken(); + } + + // parse edge attributes + var attr = parseAttributeList(); + + // create edge + var edge = createEdge(graph, from, to, type, attr); + addEdge(graph, edge); + + from = to; + } +} + +/** + * Parse a set with attributes, + * for example [label="1.000", shape=solid] + * @return {Object | null} attr + */ +function parseAttributeList() { + var attr = null; + + // edge styles of dot and vis + var edgeStyles = { + 'dashed': true, + 'solid': false, + 'dotted': [1, 5] + }; + + while (token === '[') { + getToken(); + attr = {}; + while (token !== '' && token != ']') { + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Attribute name expected'); + } + var name = token; + + getToken(); + if (token != '=') { + throw newSyntaxError('Equal sign = expected'); + } + getToken(); + + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Attribute value expected'); + } + var value = token; + + // convert from dot style to vis + if (name === 'style') { + value = edgeStyles[value]; + } + + setValue(attr, name, value); // name can be a path + + getToken(); + if (token == ',') { + getToken(); + } + } + + if (token != ']') { + throw newSyntaxError('Bracket ] expected'); + } + getToken(); + } + + return attr; +} + +/** + * Create a syntax error with extra information on current token and index. + * @param {string} message + * @returns {SyntaxError} err + */ +function newSyntaxError(message) { + return new SyntaxError(message + ', got "' + chop(token, 30) + '" (char ' + index + ')'); +} + +/** + * Chop off text after a maximum length + * @param {string} text + * @param {number} maxLength + * @returns {String} + */ +function chop(text, maxLength) { + return text.length <= maxLength ? text : text.substr(0, 27) + '...'; +} + +/** + * Execute a function fn for each pair of elements in two arrays + * @param {Array | *} array1 + * @param {Array | *} array2 + * @param {function} fn + */ +function forEach2(array1, array2, fn) { + if (Array.isArray(array1)) { + array1.forEach(function (elem1) { + if (Array.isArray(array2)) { + array2.forEach(function (elem2) { + fn(elem1, elem2); + }); + } else { + fn(elem1, array2); + } + }); + } else { + if (Array.isArray(array2)) { + array2.forEach(function (elem2) { + fn(array1, elem2); + }); + } else { + fn(array1, array2); + } + } +} + +/** + * Set a nested property on an object + * When nested objects are missing, they will be created. + * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}} + * @param {Object} object + * @param {string} path A dot separated string like 'font.color' + * @param {*} value Value for the property + * @return {Object} Returns the original object, allows for chaining. + */ +function setProp(object, path, value) { + var names = path.split('.'); + var prop = names.pop(); + + // traverse over the nested objects + var obj = object; + for (var i = 0; i < names.length; i++) { + var name = names[i]; + if (!(name in obj)) { + obj[name] = {}; + } + obj = obj[name]; + } + + // set the property value + obj[prop] = value; + + return object; +} + +/** + * Convert an object with DOT attributes to their vis.js equivalents. + * @param {Object} attr Object with DOT attributes + * @param {Object} mapping + * @return {Object} Returns an object with vis.js attributes + */ +function convertAttr(attr, mapping) { + var converted = {}; + + for (var prop in attr) { + if (attr.hasOwnProperty(prop)) { + var visProp = mapping[prop]; + if (Array.isArray(visProp)) { + visProp.forEach(function (visPropI) { + setProp(converted, visPropI, attr[prop]); + }); + } else if (typeof visProp === 'string') { + setProp(converted, visProp, attr[prop]); + } else { + setProp(converted, prop, attr[prop]); + } + } + } + + return converted; +} + +/** + * Convert a string containing a graph in DOT language into a map containing + * with nodes and edges in the format of graph. + * @param {string} data Text containing a graph in DOT-notation + * @return {Object} graphData + */ +function DOTToGraph(data) { + // parse the DOT file + var dotData = parseDOT(data); + var graphData = { + nodes: [], + edges: [], + options: {} + }; + + // copy the nodes + if (dotData.nodes) { + dotData.nodes.forEach(function (dotNode) { + var graphNode = { + id: dotNode.id, + label: String(dotNode.label || dotNode.id) + }; + merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING)); + if (graphNode.image) { + graphNode.shape = 'image'; + } + graphData.nodes.push(graphNode); + }); + } + + // copy the edges + if (dotData.edges) { + /** + * Convert an edge in DOT format to an edge with VisGraph format + * @param {Object} dotEdge + * @returns {Object} graphEdge + */ + var convertEdge = function convertEdge(dotEdge) { + var graphEdge = { + from: dotEdge.from, + to: dotEdge.to + }; + merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING)); + graphEdge.arrows = dotEdge.type === '->' ? 'to' : undefined; + + return graphEdge; + }; + + dotData.edges.forEach(function (dotEdge) { + var from, to; + if (dotEdge.from instanceof Object) { + from = dotEdge.from.nodes; + } else { + from = { + id: dotEdge.from + }; + } + + // TODO: support for attributes 'dir' and 'arrowhead' (edge arrows) + + if (dotEdge.to instanceof Object) { + to = dotEdge.to.nodes; + } else { + to = { + id: dotEdge.to + }; + } + + if (dotEdge.from instanceof Object && dotEdge.from.edges) { + dotEdge.from.edges.forEach(function (subEdge) { + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + } + + forEach2(from, to, function (from, to) { + var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr); + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + + if (dotEdge.to instanceof Object && dotEdge.to.edges) { + dotEdge.to.edges.forEach(function (subEdge) { + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + } + }); + } + + // copy the options + if (dotData.attr) { + graphData.options = dotData.attr; + } + + return graphData; +} + +// exports +exports.parseDOT = parseDOT; +exports.DOTToGraph = DOTToGraph; + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * + * @param {json} gephiJSON + * @param {obj} optionsObj + * @returns {{nodes: Array, edges: Array}} + */ +function parseGephi(gephiJSON, optionsObj) { + var edges = []; + var nodes = []; + var options = { + edges: { + inheritColor: false + }, + nodes: { + fixed: false, + parseColor: false + } + }; + + if (optionsObj !== undefined) { + if (optionsObj.fixed !== undefined) { + options.nodes.fixed = optionsObj.fixed; + } + if (optionsObj.parseColor !== undefined) { + options.nodes.parseColor = optionsObj.parseColor; + } + if (optionsObj.inheritColor !== undefined) { + options.edges.inheritColor = optionsObj.inheritColor; + } + } + + var gEdges = gephiJSON.edges; + var gNodes = gephiJSON.nodes; + for (var i = 0; i < gEdges.length; i++) { + var edge = {}; + var gEdge = gEdges[i]; + edge['id'] = gEdge.id; + edge['from'] = gEdge.source; + edge['to'] = gEdge.target; + edge['attributes'] = gEdge.attributes; + edge['label'] = gEdge.label; + edge['title'] = gEdge.attributes !== undefined ? gEdge.attributes.title : undefined; + if (gEdge['type'] === 'Directed') { + edge['arrows'] = 'to'; + } + // edge['value'] = gEdge.attributes !== undefined ? gEdge.attributes.Weight : undefined; + // edge['width'] = edge['value'] !== undefined ? undefined : edgegEdge.size; + if (gEdge.color && options.inheritColor === false) { + edge['color'] = gEdge.color; + } + edges.push(edge); + } + + for (var j = 0; j < gNodes.length; j++) { + var node = {}; + var gNode = gNodes[j]; + node['id'] = gNode.id; + node['attributes'] = gNode.attributes; + node['x'] = gNode.x; + node['y'] = gNode.y; + node['label'] = gNode.label; + node['title'] = gNode.attributes !== undefined ? gNode.attributes.title : gNode.title; + if (options.nodes.parseColor === true) { + node['color'] = gNode.color; + } else { + node['color'] = gNode.color !== undefined ? { background: gNode.color, border: gNode.color, highlight: { background: gNode.color, border: gNode.color }, hover: { background: gNode.color, border: gNode.color } } : undefined; + } + node['size'] = gNode.size; + node['fixed'] = options.nodes.fixed && gNode.x !== undefined && gNode.y !== undefined; + nodes.push(node); + } + + return { nodes: nodes, edges: edges }; +} + +exports.parseGephi = parseGephi; + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _CachedImage = __webpack_require__(185); + +var _CachedImage2 = _interopRequireDefault(_CachedImage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * This callback is a callback that accepts an Image. + * @callback ImageCallback + * @param {Image} image + */ + +/** + * This class loads images and keeps them stored. + * + * @param {ImageCallback} callback + */ +var Images = function () { + /** + * @param {ImageCallback} callback + */ + function Images(callback) { + (0, _classCallCheck3["default"])(this, Images); + + this.images = {}; + this.imageBroken = {}; + this.callback = callback; + } + + /** + * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image + * @param {string} brokenUrl Url the broken image to try and load + * @param {Image} imageToLoadBrokenUrlOn The image object + */ + + + (0, _createClass3["default"])(Images, [{ + key: "_tryloadBrokenUrl", + value: function _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) { + //If these parameters aren't specified then exit the function because nothing constructive can be done + if (url === undefined || imageToLoadBrokenUrlOn === undefined) return; + if (brokenUrl === undefined) { + console.warn("No broken url image defined"); + return; + } + + //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl + imageToLoadBrokenUrlOn.onerror = function () { + console.error("Could not load brokenImage:", brokenUrl); + // cache item will contain empty image, this should be OK for default + }; + + //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image + imageToLoadBrokenUrlOn.image.src = brokenUrl; + } + + /** + * + * @param {vis.Image} imageToRedrawWith + * @private + */ + + }, { + key: "_redrawWithImage", + value: function _redrawWithImage(imageToRedrawWith) { + if (this.callback) { + this.callback(imageToRedrawWith); + } + } + + /** + * @param {string} url Url of the image + * @param {string} brokenUrl Url of an image to use if the url image is not found + * @return {Image} img The image object + */ + + }, { + key: "load", + value: function load(url, brokenUrl) { + var _this = this; + + //Try and get the image from the cache, if successful then return the cached image + var cachedImage = this.images[url]; + if (cachedImage) return cachedImage; + + //Create a new image + var img = new _CachedImage2["default"](); + + // Need to add to cache here, otherwise final return will spawn different copies of the same image, + // Also, there will be multiple loads of the same image. + this.images[url] = img; + + //Subscribe to the event that is raised if the image loads successfully + img.image.onload = function () { + // Properly init the cached item and then request a redraw + _this._fixImageCoordinates(img.image); + img.init(); + _this._redrawWithImage(img); + }; + + //Subscribe to the event that is raised if the image fails to load + img.image.onerror = function () { + console.error("Could not load image:", url); + //Try and load the image specified by the brokenUrl using + _this._tryloadBrokenUrl(url, brokenUrl, img); + }; + + //Set the source of the image to the url, this is what actually kicks off the loading of the image + img.image.src = url; + + //Return the new image + return img; + } + + /** + * IE11 fix -- thanks dponch! + * + * Local helper function + * @param {vis.Image} imageToCache + * @private + */ + + }, { + key: "_fixImageCoordinates", + value: function _fixImageCoordinates(imageToCache) { + if (imageToCache.width === 0) { + document.body.appendChild(imageToCache); + imageToCache.width = imageToCache.offsetWidth; + imageToCache.height = imageToCache.offsetHeight; + document.body.removeChild(imageToCache); + } + } + }]); + return Images; +}(); + +exports["default"] = Images; + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray2 = __webpack_require__(30); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var ComponentUtil = __webpack_require__(48)['default']; +var LabelSplitter = __webpack_require__(191)['default']; + +/** + * @typedef {'bold'|'ital'|'boldital'|'mono'|'normal'} MultiFontStyle + * + * The allowed specifiers of multi-fonts. + */ + +/** + * @typedef {{color:string, size:number, face:string, mod:string, vadjust:number}} MultiFontOptions + * + * The full set of options of a given multi-font. + */ + +/** + * @typedef {Array.} Pile + * + * Sequence of option objects, the order is significant. + * The sequence is used to determine the value of a given option. + * + * Usage principles: + * + * - All search is done in the sequence of the pile. + * - As soon as a value is found, the searching stops. + * - prototypes are totally ignored. The idea is to add option objects used as prototypes + * to the pile, in the correct order. + */ + +/** + * List of special styles for multi-fonts + * @private + */ +var multiFontStyle = ['bold', 'ital', 'boldital', 'mono']; + +/** + * A Label to be used for Nodes or Edges. + */ + +var Label = function () { + + /** + * @param {Object} body + * @param {Object} options + * @param {boolean} [edgelabel=false] + */ + function Label(body, options) { + var edgelabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + (0, _classCallCheck3['default'])(this, Label); + + this.body = body; + this.pointToSelf = false; + this.baseSize = undefined; + this.fontOptions = {}; // instance variable containing the *instance-local* font options + this.setOptions(options); + this.size = { top: 0, left: 0, width: 0, height: 0, yLine: 0 }; + this.isEdgeLabel = edgelabel; + } + + /** + * @param {Object} options the options of the parent Node-instance + */ + + + (0, _createClass3['default'])(Label, [{ + key: 'setOptions', + value: function setOptions(options) { + this.elementOptions = options; // Reference to the options of the parent Node-instance + + this.initFontOptions(options.font); + + if (ComponentUtil.isValidLabel(options.label)) { + this.labelDirty = true; + } else { + // Bad label! Change the option value to prevent bad stuff happening + options.label = ''; + } + + if (options.font !== undefined && options.font !== null) { + // font options can be deleted at various levels + if (typeof options.font === 'string') { + this.baseSize = this.fontOptions.size; + } else if ((0, _typeof3['default'])(options.font) === 'object') { + var size = options.font.size; + + if (size !== undefined) { + this.baseSize = size; + } + } + } + } + + /** + * Init the font Options structure. + * + * Member fontOptions serves as an accumulator for the current font options. + * As such, it needs to be completely separated from the node options. + * + * @param {Object} newFontOptions the new font options to process + * @private + */ + + }, { + key: 'initFontOptions', + value: function initFontOptions(newFontOptions) { + var _this = this; + + // Prepare the multi-font option objects. + // These will be filled in propagateFonts(), if required + util.forEach(multiFontStyle, function (style) { + _this.fontOptions[style] = {}; + }); + + // Handle shorthand option, if present + if (Label.parseFontString(this.fontOptions, newFontOptions)) { + this.fontOptions.vadjust = 0; + return; + } + + // Copy over the non-multifont options, if specified + util.forEach(newFontOptions, function (prop, n) { + if (prop !== undefined && prop !== null && (typeof prop === 'undefined' ? 'undefined' : (0, _typeof3['default'])(prop)) !== 'object') { + _this.fontOptions[n] = prop; + } + }); + } + + /** + * If in-variable is a string, parse it as a font specifier. + * + * Note that following is not done here and have to be done after the call: + * - No number conversion (size) + * - Not all font options are set (vadjust, mod) + * + * @param {Object} outOptions out-parameter, object in which to store the parse results (if any) + * @param {Object} inOptions font options to parse + * @return {boolean} true if font parsed as string, false otherwise + * @static + */ + + }, { + key: 'constrain', + + + /** + * Set the width and height constraints based on 'nearest' value + * + * @param {Array} pile array of option objects to consider + * @returns {object} the actual constraint values to use + * @private + */ + value: function constrain(pile) { + // NOTE: constrainWidth and constrainHeight never set! + // NOTE: for edge labels, only 'maxWdt' set + // Node labels can set all the fields + var fontOptions = { + constrainWidth: false, + maxWdt: -1, + minWdt: -1, + constrainHeight: false, + minHgt: -1, + valign: 'middle' + }; + + var widthConstraint = util.topMost(pile, 'widthConstraint'); + if (typeof widthConstraint === 'number') { + fontOptions.maxWdt = Number(widthConstraint); + fontOptions.minWdt = Number(widthConstraint); + } else if ((typeof widthConstraint === 'undefined' ? 'undefined' : (0, _typeof3['default'])(widthConstraint)) === 'object') { + var widthConstraintMaximum = util.topMost(pile, ['widthConstraint', 'maximum']); + if (typeof widthConstraintMaximum === 'number') { + fontOptions.maxWdt = Number(widthConstraintMaximum); + } + var widthConstraintMinimum = util.topMost(pile, ['widthConstraint', 'minimum']); + if (typeof widthConstraintMinimum === 'number') { + fontOptions.minWdt = Number(widthConstraintMinimum); + } + } + + var heightConstraint = util.topMost(pile, 'heightConstraint'); + if (typeof heightConstraint === 'number') { + fontOptions.minHgt = Number(heightConstraint); + } else if ((typeof heightConstraint === 'undefined' ? 'undefined' : (0, _typeof3['default'])(heightConstraint)) === 'object') { + var heightConstraintMinimum = util.topMost(pile, ['heightConstraint', 'minimum']); + if (typeof heightConstraintMinimum === 'number') { + fontOptions.minHgt = Number(heightConstraintMinimum); + } + var heightConstraintValign = util.topMost(pile, ['heightConstraint', 'valign']); + if (typeof heightConstraintValign === 'string') { + if (heightConstraintValign === 'top' || heightConstraintValign === 'bottom') { + fontOptions.valign = heightConstraintValign; + } + } + } + + return fontOptions; + } + + /** + * Set options and update internal state + * + * @param {Object} options options to set + * @param {Array} pile array of option objects to consider for option 'chosen' + */ + + }, { + key: 'update', + value: function update(options, pile) { + this.setOptions(options, true); + this.propagateFonts(pile); + util.deepExtend(this.fontOptions, this.constrain(pile)); + this.fontOptions.chooser = ComponentUtil.choosify('label', pile); + } + + /** + * When margins are set in an element, adjust sizes is called to remove them + * from the width/height constraints. This must be done prior to label sizing. + * + * @param {{top: number, right: number, bottom: number, left: number}} margins + */ + + }, { + key: 'adjustSizes', + value: function adjustSizes(margins) { + var widthBias = margins ? margins.right + margins.left : 0; + if (this.fontOptions.constrainWidth) { + this.fontOptions.maxWdt -= widthBias; + this.fontOptions.minWdt -= widthBias; + } + var heightBias = margins ? margins.top + margins.bottom : 0; + if (this.fontOptions.constrainHeight) { + this.fontOptions.minHgt -= heightBias; + } + } + + ///////////////////////////////////////////////////////// + // Methods for handling options piles + // Eventually, these will be moved to a separate class + ///////////////////////////////////////////////////////// + + /** + * Add the font members of the passed list of option objects to the pile. + * + * @param {Pile} dstPile pile of option objects add to + * @param {Pile} srcPile pile of option objects to take font options from + * @private + */ + + }, { + key: 'addFontOptionsToPile', + value: function addFontOptionsToPile(dstPile, srcPile) { + for (var i = 0; i < srcPile.length; ++i) { + this.addFontToPile(dstPile, srcPile[i]); + } + } + + /** + * Add given font option object to the list of objects (the 'pile') to consider for determining + * multi-font option values. + * + * @param {Pile} pile pile of option objects to use + * @param {object} options instance to add to pile + * @private + */ + + }, { + key: 'addFontToPile', + value: function addFontToPile(pile, options) { + if (options === undefined) return; + if (options.font === undefined || options.font === null) return; + + var item = options.font; + pile.push(item); + } + + /** + * Collect all own-property values from the font pile that aren't multi-font option objectss. + * + * @param {Pile} pile pile of option objects to use + * @returns {object} object with all current own basic font properties + * @private + */ + + }, { + key: 'getBasicOptions', + value: function getBasicOptions(pile) { + var ret = {}; + + // Scans the whole pile to get all options present + for (var n = 0; n < pile.length; ++n) { + var fontOptions = pile[n]; + + // Convert shorthand if necessary + var tmpShorthand = {}; + if (Label.parseFontString(tmpShorthand, fontOptions)) { + fontOptions = tmpShorthand; + } + + util.forEach(fontOptions, function (opt, name) { + if (opt === undefined) return; // multi-font option need not be present + if (ret.hasOwnProperty(name)) return; // Keep first value we encounter + + if (multiFontStyle.indexOf(name) !== -1) { + // Skip multi-font properties but we do need the structure + ret[name] = {}; + } else { + ret[name] = opt; + } + }); + } + + return ret; + } + + /** + * Return the value for given option for the given multi-font. + * + * All available option objects are trawled in the set order to construct the option values. + * + * --------------------------------------------------------------------- + * ## Traversal of pile for multi-fonts + * + * The determination of multi-font option values is a special case, because any values not + * present in the multi-font options should by definition be taken from the main font options, + * i.e. from the current 'parent' object of the multi-font option. + * + * ### Search order for multi-fonts + * + * 'bold' used as example: + * + * - search in option group 'bold' in local properties + * - search in main font option group in local properties + * + * --------------------------------------------------------------------- + * + * @param {Pile} pile pile of option objects to use + * @param {MultiFontStyle} multiName sub path for the multi-font + * @param {string} option the option to search for, for the given multi-font + * @returns {string|number} the value for the given option + * @private + */ + + }, { + key: 'getFontOption', + value: function getFontOption(pile, multiName, option) { + var multiFont = void 0; + + // Search multi font in local properties + for (var n = 0; n < pile.length; ++n) { + var fontOptions = pile[n]; + + if (fontOptions.hasOwnProperty(multiName)) { + multiFont = fontOptions[multiName]; + if (multiFont === undefined || multiFont === null) continue; + + // Convert shorthand if necessary + // TODO: inefficient to do this conversion every time; find a better way. + var tmpShorthand = {}; + if (Label.parseFontString(tmpShorthand, multiFont)) { + multiFont = tmpShorthand; + } + + if (multiFont.hasOwnProperty(option)) { + return multiFont[option]; + } + } + } + + // Option is not mentioned in the multi font options; take it from the parent font options. + // These have already been converted with getBasicOptions(), so use the converted values. + if (this.fontOptions.hasOwnProperty(option)) { + return this.fontOptions[option]; + } + + // A value **must** be found; you should never get here. + throw new Error("Did not find value for multi-font for property: '" + option + "'"); + } + + /** + * Return all options values for the given multi-font. + * + * All available option objects are trawled in the set order to construct the option values. + * + * @param {Pile} pile pile of option objects to use + * @param {MultiFontStyle} multiName sub path for the mod-font + * @returns {MultiFontOptions} + * @private + */ + + }, { + key: 'getFontOptions', + value: function getFontOptions(pile, multiName) { + var result = {}; + var optionNames = ['color', 'size', 'face', 'mod', 'vadjust']; // List of allowed options per multi-font + + for (var i = 0; i < optionNames.length; ++i) { + var mod = optionNames[i]; + result[mod] = this.getFontOption(pile, multiName, mod); + } + + return result; + } + + ///////////////////////////////////////////////////////// + // End methods for handling options piles + ///////////////////////////////////////////////////////// + + + /** + * Collapse the font options for the multi-font to single objects, from + * the chain of option objects passed (the 'pile'). + * + * @param {Pile} pile sequence of option objects to consider. + * First item in list assumed to be the newly set options. + */ + + }, { + key: 'propagateFonts', + value: function propagateFonts(pile) { + var _this2 = this; + + var fontPile = []; // sequence of font objects to consider, order important + + // Note that this.elementOptions is not used here. + this.addFontOptionsToPile(fontPile, pile); + this.fontOptions = this.getBasicOptions(fontPile); + + // We set multifont values even if multi === false, for consistency (things break otherwise) + + var _loop = function _loop(i) { + var mod = multiFontStyle[i]; + var modOptions = _this2.fontOptions[mod]; + var tmpMultiFontOptions = _this2.getFontOptions(fontPile, mod); + + // Copy over found values + util.forEach(tmpMultiFontOptions, function (option, n) { + modOptions[n] = option; + }); + + modOptions.size = Number(modOptions.size); + modOptions.vadjust = Number(modOptions.vadjust); + }; + + for (var i = 0; i < multiFontStyle.length; ++i) { + _loop(i); + } + } + + /** + * Main function. This is called from anything that wants to draw a label. + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {string} [baseline='middle'] + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover) { + var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle'; + + // if no label, return + if (this.elementOptions.label === undefined) return; + + // check if we have to render the label + var viewFontSize = this.fontOptions.size * this.body.view.scale; + if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) return; + + // This ensures that there will not be HUGE letters on screen + // by setting an upper limit on the visible text size (regardless of zoomLevel) + if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) { + viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale; + } + + // update the size cache if required + this.calculateLabelSize(ctx, selected, hover, x, y, baseline); + this._drawBackground(ctx); + this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize); + } + + /** + * Draws the label background + * @param {CanvasRenderingContext2D} ctx + * @private + */ + + }, { + key: '_drawBackground', + value: function _drawBackground(ctx) { + if (this.fontOptions.background !== undefined && this.fontOptions.background !== "none") { + ctx.fillStyle = this.fontOptions.background; + var size = this.getSize(); + ctx.fillRect(size.left, size.top, size.width, size.height); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {string} [baseline='middle'] + * @param {number} viewFontSize + * @private + */ + + }, { + key: '_drawText', + value: function _drawText(ctx, x, y) { + var baseline = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'middle'; + var viewFontSize = arguments[4]; + + var _setAlignment2 = this._setAlignment(ctx, x, y, baseline); + + var _setAlignment3 = (0, _slicedToArray3['default'])(_setAlignment2, 2); + + x = _setAlignment3[0]; + y = _setAlignment3[1]; + + + ctx.textAlign = 'left'; + x = x - this.size.width / 2; // Shift label 1/2-distance to the left + if (this.fontOptions.valign && this.size.height > this.size.labelHeight) { + if (this.fontOptions.valign === 'top') { + y -= (this.size.height - this.size.labelHeight) / 2; + } + if (this.fontOptions.valign === 'bottom') { + y += (this.size.height - this.size.labelHeight) / 2; + } + } + + // draw the text + for (var i = 0; i < this.lineCount; i++) { + var line = this.lines[i]; + if (line && line.blocks) { + var width = 0; + if (this.isEdgeLabel || this.fontOptions.align === 'center') { + width += (this.size.width - line.width) / 2; + } else if (this.fontOptions.align === 'right') { + width += this.size.width - line.width; + } + for (var j = 0; j < line.blocks.length; j++) { + var block = line.blocks[j]; + ctx.font = block.font; + + var _getColor2 = this._getColor(block.color, viewFontSize, block.strokeColor), + _getColor3 = (0, _slicedToArray3['default'])(_getColor2, 2), + fontColor = _getColor3[0], + strokeColor = _getColor3[1]; + + if (block.strokeWidth > 0) { + ctx.lineWidth = block.strokeWidth; + ctx.strokeStyle = strokeColor; + ctx.lineJoin = 'round'; + } + ctx.fillStyle = fontColor; + + if (block.strokeWidth > 0) { + ctx.strokeText(block.text, x + width, y + block.vadjust); + } + ctx.fillText(block.text, x + width, y + block.vadjust); + width += block.width; + } + y += line.height; + } + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {string} baseline + * @returns {Array.} + * @private + */ + + }, { + key: '_setAlignment', + value: function _setAlignment(ctx, x, y, baseline) { + // check for label alignment (for edges) + // TODO: make alignment for nodes + if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) { + x = 0; + y = 0; + + var lineMargin = 2; + if (this.fontOptions.align === 'top') { + ctx.textBaseline = 'alphabetic'; + y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers + } else if (this.fontOptions.align === 'bottom') { + ctx.textBaseline = 'hanging'; + y += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers + } else { + ctx.textBaseline = 'middle'; + } + } else { + ctx.textBaseline = baseline; + } + return [x, y]; + } + + /** + * fade in when relative scale is between threshold and threshold - 1. + * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here. + * + * @param {string} color The font color to use + * @param {number} viewFontSize + * @param {string} initialStrokeColor + * @returns {Array.} An array containing the font color and stroke color + * @private + */ + + }, { + key: '_getColor', + value: function _getColor(color, viewFontSize, initialStrokeColor) { + var fontColor = color || '#000000'; + var strokeColor = initialStrokeColor || '#ffffff'; + if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) { + var opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize))); + fontColor = util.overrideOpacity(fontColor, opacity); + strokeColor = util.overrideOpacity(strokeColor, opacity); + } + return [fontColor, strokeColor]; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @returns {{width: number, height: number}} + */ + + }, { + key: 'getTextSize', + value: function getTextSize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + this._processLabel(ctx, selected, hover); + return { + width: this.size.width, + height: this.size.height, + lineCount: this.lineCount + }; + } + + /** + * Get the current dimensions of the label + * + * @return {rect} + */ + + }, { + key: 'getSize', + value: function getSize() { + var lineMargin = 2; + var x = this.size.left; // default values which might be overridden below + var y = this.size.top - 0.5 * lineMargin; // idem + + if (this.isEdgeLabel) { + var x2 = -this.size.width * 0.5; + + switch (this.fontOptions.align) { + case 'middle': + x = x2; + y = -this.size.height * 0.5; + break; + case 'top': + x = x2; + y = -(this.size.height + lineMargin); + break; + case 'bottom': + x = x2; + y = lineMargin; + break; + } + } + + var ret = { + left: x, + top: y, + width: this.size.width, + height: this.size.height + }; + + return ret; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {number} [x=0] + * @param {number} [y=0] + * @param {'middle'|'hanging'} [baseline='middle'] + */ + + }, { + key: 'calculateLabelSize', + value: function calculateLabelSize(ctx, selected, hover) { + var x = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var y = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; + var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle'; + + this._processLabel(ctx, selected, hover); + this.size.left = x - this.size.width * 0.5; + this.size.top = y - this.size.height * 0.5; + this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size; + if (baseline === "hanging") { + this.size.top += 0.5 * this.fontOptions.size; + this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers + this.size.yLine += 4; // distance from node + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {string} mod + * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}} + */ + + }, { + key: 'getFormattingValues', + value: function getFormattingValues(ctx, selected, hover, mod) { + var getValue = function getValue(fontOptions, mod, option) { + if (mod === "normal") { + if (option === 'mod') return ""; + return fontOptions[option]; + } + + if (fontOptions[mod][option] !== undefined) { + // Grumbl leaving out test on undefined equals false for "" + return fontOptions[mod][option]; + } else { + // Take from parent font option + return fontOptions[option]; + } + }; + + var values = { + color: getValue(this.fontOptions, mod, 'color'), + size: getValue(this.fontOptions, mod, 'size'), + face: getValue(this.fontOptions, mod, 'face'), + mod: getValue(this.fontOptions, mod, 'mod'), + vadjust: getValue(this.fontOptions, mod, 'vadjust'), + strokeWidth: this.fontOptions.strokeWidth, + strokeColor: this.fontOptions.strokeColor + }; + if (selected || hover) { + if (mod === "normal" && this.fontOptions.chooser === true && this.elementOptions.labelHighlightBold) { + values.mod = 'bold'; + } else { + if (typeof this.fontOptions.chooser === 'function') { + this.fontOptions.chooser(values, this.elementOptions.id, selected, hover); + } + } + } + + var fontString = ""; + if (values.mod !== undefined && values.mod !== "") { + // safeguard for undefined - this happened + fontString += values.mod + " "; + } + fontString += values.size + "px " + values.face; + + ctx.font = fontString.replace(/"/g, ""); + values.font = ctx.font; + values.height = values.size; + return values; + } + + /** + * + * @param {boolean} selected + * @param {boolean} hover + * @returns {boolean} + */ + + }, { + key: 'differentState', + value: function differentState(selected, hover) { + return selected !== this.selectedState || hover !== this.hoverState; + } + + /** + * This explodes the passed text into lines and determines the width, height and number of lines. + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {string} inText the text to explode + * @returns {{width, height, lines}|*} + * @private + */ + + }, { + key: '_processLabelText', + value: function _processLabelText(ctx, selected, hover, inText) { + var splitter = new LabelSplitter(ctx, this, selected, hover); + return splitter.process(inText); + } + + /** + * This explodes the label string into lines and sets the width, height and number of lines. + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: '_processLabel', + value: function _processLabel(ctx, selected, hover) { + + if (this.labelDirty === false && !this.differentState(selected, hover)) return; + + var state = this._processLabelText(ctx, selected, hover, this.elementOptions.label); + + if (this.fontOptions.minWdt > 0 && state.width < this.fontOptions.minWdt) { + state.width = this.fontOptions.minWdt; + } + + this.size.labelHeight = state.height; + if (this.fontOptions.minHgt > 0 && state.height < this.fontOptions.minHgt) { + state.height = this.fontOptions.minHgt; + } + + this.lines = state.lines; + this.lineCount = state.lines.length; + this.size.width = state.width; + this.size.height = state.height; + this.selectedState = selected; + this.hoverState = hover; + + this.labelDirty = false; + } + + /** + * Check if this label is visible + * + * @return {boolean} true if this label will be show, false otherwise + */ + + }, { + key: 'visible', + value: function visible() { + if (this.size.width === 0 || this.size.height === 0 || this.elementOptions.label === undefined) { + return false; // nothing to display + } + + var viewFontSize = this.fontOptions.size * this.body.view.scale; + if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) { + return false; // Too small or too far away to show + } + + return true; + } + }], [{ + key: 'parseFontString', + value: function parseFontString(outOptions, inOptions) { + if (!inOptions || typeof inOptions !== 'string') return false; + + var newOptionsArray = inOptions.split(" "); + + outOptions.size = newOptionsArray[0].replace("px", ''); + outOptions.face = newOptionsArray[1]; + outOptions.color = newOptionsArray[2]; + + return true; + } + }]); + return Label; +}(); + +exports['default'] = Label; + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray2 = __webpack_require__(30); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var util = __webpack_require__(2); +var EndPoints = __webpack_require__(119)["default"]; + +/** + * The Base Class for all edges. + * + */ + +var EdgeBase = function () { + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function EdgeBase(options, body, labelModule) { + (0, _classCallCheck3["default"])(this, EdgeBase); + + this.body = body; + this.labelModule = labelModule; + this.options = {}; + this.setOptions(options); + this.colorDirty = true; + this.color = {}; + this.selectionWidth = 2; + this.hoverWidth = 1.5; + this.fromPoint = this.from; + this.toPoint = this.to; + } + + /** + * Connects a node to itself + */ + + + (0, _createClass3["default"])(EdgeBase, [{ + key: "connect", + value: function connect() { + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + } + + /** + * + * @returns {boolean} always false + */ + + }, { + key: "cleanup", + value: function cleanup() { + return false; + } + + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + this.options = options; + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + this.id = this.options.id; + } + + /** + * Redraw a edge as a line + * Draw this edge in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {boolean} selected + * @param {boolean} hover + * @param {Node} viaNode + * @private + */ + + }, { + key: "drawLine", + value: function drawLine(ctx, values, selected, hover, viaNode) { + // set style + ctx.strokeStyle = this.getColor(ctx, values, selected, hover); + ctx.lineWidth = values.width; + + if (values.dashes !== false) { + this._drawDashedLine(ctx, values, viaNode); + } else { + this._drawLine(ctx, values, viaNode); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {Node} viaNode + * @param {{x: number, y: number}} [fromPoint] + * @param {{x: number, y: number}} [toPoint] + * @private + */ + + }, { + key: "_drawLine", + value: function _drawLine(ctx, values, viaNode, fromPoint, toPoint) { + if (this.from != this.to) { + // draw line + this._line(ctx, values, viaNode, fromPoint, toPoint); + } else { + var _getCircleData2 = this._getCircleData(ctx), + _getCircleData3 = (0, _slicedToArray3["default"])(_getCircleData2, 3), + x = _getCircleData3[0], + y = _getCircleData3[1], + radius = _getCircleData3[2]; + + this._circle(ctx, values, x, y, radius); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {Node} viaNode + * @param {{x: number, y: number}} [fromPoint] TODO: Remove in next major release + * @param {{x: number, y: number}} [toPoint] TODO: Remove in next major release + * @private + */ + + }, { + key: "_drawDashedLine", + value: function _drawDashedLine(ctx, values, viaNode, fromPoint, toPoint) { + // eslint-disable-line no-unused-vars + ctx.lineCap = 'round'; + var pattern = [5, 5]; + if (Array.isArray(values.dashes) === true) { + pattern = values.dashes; + } + + // only firefox and chrome support this method, else we use the legacy one. + if (ctx.setLineDash !== undefined) { + ctx.save(); + + // set dash settings for chrome or firefox + ctx.setLineDash(pattern); + ctx.lineDashOffset = 0; + + // draw the line + if (this.from != this.to) { + // draw line + this._line(ctx, values, viaNode); + } else { + var _getCircleData4 = this._getCircleData(ctx), + _getCircleData5 = (0, _slicedToArray3["default"])(_getCircleData4, 3), + x = _getCircleData5[0], + y = _getCircleData5[1], + radius = _getCircleData5[2]; + + this._circle(ctx, values, x, y, radius); + } + + // restore the dash settings. + ctx.setLineDash([0]); + ctx.lineDashOffset = 0; + ctx.restore(); + } else { + // unsupporting smooth lines + if (this.from != this.to) { + // draw line + ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern); + } else { + var _getCircleData6 = this._getCircleData(ctx), + _getCircleData7 = (0, _slicedToArray3["default"])(_getCircleData6, 3), + _x = _getCircleData7[0], + _y = _getCircleData7[1], + _radius = _getCircleData7[2]; + + this._circle(ctx, values, _x, _y, _radius); + } + // draw shadow if enabled + this.enableShadow(ctx, values); + + ctx.stroke(); + + // disable shadows for other elements. + this.disableShadow(ctx, values); + } + } + + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {{x: number, y: number}} + */ + + }, { + key: "findBorderPosition", + value: function findBorderPosition(nearNode, ctx, options) { + if (this.from != this.to) { + return this._findBorderPosition(nearNode, ctx, options); + } else { + return this._findBorderPositionCircle(nearNode, ctx, options); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @returns {{from: ({x: number, y: number, t: number}|*), to: ({x: number, y: number, t: number}|*)}} + */ + + }, { + key: "findBorderPositions", + value: function findBorderPositions(ctx) { + var from = {}; + var to = {}; + if (this.from != this.to) { + from = this._findBorderPosition(this.from, ctx); + to = this._findBorderPosition(this.to, ctx); + } else { + var _getCircleData$slice = this._getCircleData(ctx).slice(0, 2), + _getCircleData$slice2 = (0, _slicedToArray3["default"])(_getCircleData$slice, 2), + x = _getCircleData$slice2[0], + y = _getCircleData$slice2[1]; + + from = this._findBorderPositionCircle(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); + to = this._findBorderPositionCircle(this.from, ctx, { x: x, y: y, low: 0.6, high: 0.8, direction: 1 }); + } + return { from: from, to: to }; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @returns {Array.} x, y, radius + * @private + */ + + }, { + key: "_getCircleData", + value: function _getCircleData(ctx) { + var x = void 0, + y = void 0; + var node = this.from; + var radius = this.options.selfReferenceSize; + + if (ctx !== undefined) { + if (node.shape.width === undefined) { + node.shape.resize(ctx); + } + } + + // get circle coordinates + if (node.shape.width > node.shape.height) { + x = node.x + node.shape.width * 0.5; + y = node.y - radius; + } else { + x = node.x + radius; + y = node.y - node.shape.height * 0.5; + } + return [x, y, radius]; + } + + /** + * Get a point on a circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {number} percentage - Value between 0 (line start) and 1 (line end) + * @return {Object} point + * @private + */ + + }, { + key: "_pointOnCircle", + value: function _pointOnCircle(x, y, radius, percentage) { + var angle = percentage * 2 * Math.PI; + return { + x: x + radius * Math.cos(angle), + y: y - radius * Math.sin(angle) + }; + } + + /** + * This function uses binary search to look for the point where the circle crosses the border of the node. + * @param {Node} node + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: "_findBorderPositionCircle", + value: function _findBorderPositionCircle(node, ctx, options) { + var x = options.x; + var y = options.y; + var low = options.low; + var high = options.high; + var direction = options.direction; + + var maxIterations = 10; + var iteration = 0; + var radius = this.options.selfReferenceSize; + var pos = void 0, + angle = void 0, + distanceToBorder = void 0, + distanceToPoint = void 0, + difference = void 0; + var threshold = 0.05; + var middle = (low + high) * 0.5; + + while (low <= high && iteration < maxIterations) { + middle = (low + high) * 0.5; + + pos = this._pointOnCircle(x, y, radius, middle); + angle = Math.atan2(node.y - pos.y, node.x - pos.x); + distanceToBorder = node.distanceToBorder(ctx, angle); + distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2)); + difference = distanceToBorder - distanceToPoint; + if (Math.abs(difference) < threshold) { + break; // found + } else if (difference > 0) { + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (direction > 0) { + low = middle; + } else { + high = middle; + } + } else { + if (direction > 0) { + high = middle; + } else { + low = middle; + } + } + iteration++; + } + pos.t = middle; + + return pos; + } + + /** + * Get the line width of the edge. Depends on width and whether one of the + * connected nodes is selected. + * @param {boolean} selected + * @param {boolean} hover + * @returns {number} width + * @private + */ + + }, { + key: "getLineWidth", + value: function getLineWidth(selected, hover) { + if (selected === true) { + return Math.max(this.selectionWidth, 0.3 / this.body.view.scale); + } else { + if (hover === true) { + return Math.max(this.hoverWidth, 0.3 / this.body.view.scale); + } else { + return Math.max(this.options.width, 0.3 / this.body.view.scale); + } + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @param {boolean} selected - Unused + * @param {boolean} hover - Unused + * @returns {string} + */ + + }, { + key: "getColor", + value: function getColor(ctx, values, selected, hover) { + // eslint-disable-line no-unused-vars + if (values.inheritsColor !== false) { + // when this is a loop edge, just use the 'from' method + if (values.inheritsColor === 'both' && this.from.id !== this.to.id) { + var grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y); + var fromColor = void 0, + toColor = void 0; + fromColor = this.from.options.color.highlight.border; + toColor = this.to.options.color.highlight.border; + + if (this.from.selected === false && this.to.selected === false) { + fromColor = util.overrideOpacity(this.from.options.color.border, values.opacity); + toColor = util.overrideOpacity(this.to.options.color.border, values.opacity); + } else if (this.from.selected === true && this.to.selected === false) { + toColor = this.to.options.color.border; + } else if (this.from.selected === false && this.to.selected === true) { + fromColor = this.from.options.color.border; + } + grd.addColorStop(0, fromColor); + grd.addColorStop(1, toColor); + + // -------------------- this returns -------------------- // + return grd; + } + + if (values.inheritsColor === "to") { + return util.overrideOpacity(this.to.options.color.border, values.opacity); + } else { + // "from" + return util.overrideOpacity(this.from.options.color.border, values.opacity); + } + } else { + return util.overrideOpacity(values.color, values.opacity); + } + } + + /** + * Draw a line from a node to itself, a circle + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {number} x + * @param {number} y + * @param {number} radius + * @private + */ + + }, { + key: "_circle", + value: function _circle(ctx, values, x, y, radius) { + // draw shadow if enabled + this.enableShadow(ctx, values); + + // draw a circle + ctx.beginPath(); + ctx.arc(x, y, radius, 0, 2 * Math.PI, false); + ctx.stroke(); + + // disable shadows for other elements. + this.disableShadow(ctx, values); + } + + /** + * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2). + * (x3,y3) is the point. + * + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} via + * @param {Array} values + * @returns {number} + */ + + }, { + key: "getDistanceToEdge", + value: function getDistanceToEdge(x1, y1, x2, y2, x3, y3, via, values) { + // eslint-disable-line no-unused-vars + var returnValue = 0; + if (this.from != this.to) { + returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via); + } else { + var _getCircleData8 = this._getCircleData(undefined), + _getCircleData9 = (0, _slicedToArray3["default"])(_getCircleData8, 3), + x = _getCircleData9[0], + y = _getCircleData9[1], + radius = _getCircleData9[2]; + + var dx = x - x3; + var dy = y - y3; + returnValue = Math.abs(Math.sqrt(dx * dx + dy * dy) - radius); + } + + return returnValue; + } + + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToLine", + value: function _getDistanceToLine(x1, y1, x2, y2, x3, y3) { + var px = x2 - x1; + var py = y2 - y1; + var something = px * px + py * py; + var u = ((x3 - x1) * px + (y3 - y1) * py) / something; + + if (u > 1) { + u = 1; + } else if (u < 0) { + u = 0; + } + + var x = x1 + u * px; + var y = y1 + u * py; + var dx = x - x3; + var dy = y - y3; + + //# Note: If the actual distance does not matter, + //# if you only want to compare what this function + //# returns to other results of this function, you + //# can just return the squared distance instead + //# (i.e. remove the sqrt) to gain a little performance + + return Math.sqrt(dx * dx + dy * dy); + } + + /** + * @param {CanvasRenderingContext2D} ctx + * @param {string} position + * @param {Node} viaNode + * @param {boolean} selected + * @param {boolean} hover + * @param {Array} values + * @returns {{point: *, core: {x: number, y: number}, angle: *, length: number, type: *}} + */ + + }, { + key: "getArrowData", + value: function getArrowData(ctx, position, viaNode, selected, hover, values) { + // set lets + var angle = void 0; + var arrowPoint = void 0; + var node1 = void 0; + var node2 = void 0; + var guideOffset = void 0; + var scaleFactor = void 0; + var type = void 0; + var lineWidth = values.width; + + if (position === 'from') { + node1 = this.from; + node2 = this.to; + guideOffset = 0.1; + scaleFactor = values.fromArrowScale; + type = values.fromArrowType; + } else if (position === 'to') { + node1 = this.to; + node2 = this.from; + guideOffset = -0.1; + scaleFactor = values.toArrowScale; + type = values.toArrowType; + } else { + node1 = this.to; + node2 = this.from; + scaleFactor = values.middleArrowScale; + type = values.middleArrowType; + } + + // if not connected to itself + if (node1 != node2) { + if (position !== 'middle') { + // draw arrow head + if (this.options.smooth.enabled === true) { + arrowPoint = this.findBorderPosition(node1, ctx, { via: viaNode }); + var guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode); + angle = Math.atan2(arrowPoint.y - guidePos.y, arrowPoint.x - guidePos.x); + } else { + angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + arrowPoint = this.findBorderPosition(node1, ctx); + } + } else { + angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow. + } + } else { + // draw circle + var _getCircleData10 = this._getCircleData(ctx), + _getCircleData11 = (0, _slicedToArray3["default"])(_getCircleData10, 3), + x = _getCircleData11[0], + y = _getCircleData11[1], + radius = _getCircleData11[2]; + + if (position === 'from') { + arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } else if (position === 'to') { + arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.6, high: 1.0, direction: 1 }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; + } else { + arrowPoint = this._pointOnCircle(x, y, radius, 0.175); + angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } + } + + if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow + var length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge. + + var xi = arrowPoint.x - length * 0.9 * Math.cos(angle); + var yi = arrowPoint.y - length * 0.9 * Math.sin(angle); + var arrowCore = { x: xi, y: yi }; + + return { point: arrowPoint, core: arrowCore, angle: angle, length: length, type: type }; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @param {boolean} selected + * @param {boolean} hover + * @param {Object} arrowData + */ + + }, { + key: "drawArrowHead", + value: function drawArrowHead(ctx, values, selected, hover, arrowData) { + // set style + ctx.strokeStyle = this.getColor(ctx, values, selected, hover); + ctx.fillStyle = ctx.strokeStyle; + ctx.lineWidth = values.width; + + EndPoints.draw(ctx, arrowData); + + // draw shadow if enabled + this.enableShadow(ctx, values); + ctx.fill(); + // disable shadows for other elements. + this.disableShadow(ctx, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: "enableShadow", + value: function enableShadow(ctx, values) { + if (values.shadow === true) { + ctx.shadowColor = values.shadowColor; + ctx.shadowBlur = values.shadowSize; + ctx.shadowOffsetX = values.shadowX; + ctx.shadowOffsetY = values.shadowY; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: "disableShadow", + value: function disableShadow(ctx, values) { + if (values.shadow === true) { + ctx.shadowColor = 'rgba(0,0,0,0)'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + } + } + }]); + return EdgeBase; +}(); + +exports["default"] = EdgeBase; + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** ============================================================================ + * Location of all the endpoint drawing routines. + * + * Every endpoint has its own drawing routine, which contains an endpoint definition. + * + * The endpoint definitions must have the following properies: + * + * - (0,0) is the connection point to the node it attaches to + * - The endpoints are orientated to the positive x-direction + * - The length of the endpoint is at most 1 + * + * As long as the endpoint classes remain simple and not too numerous, they will + * be contained within this module. + * All classes here except `EndPoints` should be considered as private to this module. + * + * ----------------------------------------------------------------------------- + * ### Further Actions + * + * After adding a new endpoint here, you also need to do the following things: + * + * - Add the new endpoint name to `network/options.js` in array `endPoints`. + * - Add the new endpoint name to the documentation. + * Scan for 'arrows.to.type` and add it to the description. + * - Add the endpoint to the examples. At the very least, add it to example + * `edgeStyles/arrowTypes`. + * ============================================================================= */ + +// NOTE: When a typedef is isolated in a separate comment block, an actual description is generated for it, +// using the rest of the commenting in the code block. Usage of typedef in other comments then +// link to there. TIL. +// +// Also noteworthy, all typedef's set up in this manner are collected in a single, global page 'global.html'. +// In other words, it doesn't matter *where* the typedef's are defined in the code. +// +// +// TODO: add descriptive commenting to given typedef's + +/** + * @typedef {{type:string, point:Point, angle:number, length:number}} ArrowData + * + * Object containing instantiation data for a given endpoint. + */ + +/** + * @typedef {{x:number, y:number}} Point + * + * A point in view-coordinates. + */ + +/** + * Common methods for endpoints + * + * @class + */ +var EndPoint = function () { + function EndPoint() { + (0, _classCallCheck3['default'])(this, EndPoint); + } + + (0, _createClass3['default'])(EndPoint, null, [{ + key: 'transform', + + + /** + * Apply transformation on points for display. + * + * The following is done: + * - rotate by the specified angle + * - multiply the (normalized) coordinates by the passed length + * - offset by the target coordinates + * + * @param {Array} points + * @param {ArrowData} arrowData + * @static + */ + value: function transform(points, arrowData) { + if (!(points instanceof Array)) { + points = [points]; + } + + var x = arrowData.point.x; + var y = arrowData.point.y; + var angle = arrowData.angle; + var length = arrowData.length; + + for (var i = 0; i < points.length; ++i) { + var p = points[i]; + var xt = p.x * Math.cos(angle) - p.y * Math.sin(angle); + var yt = p.x * Math.sin(angle) + p.y * Math.cos(angle); + + p.x = x + length * xt; + p.y = y + length * yt; + } + } + + /** + * Draw a closed path using the given real coordinates. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array.} points + * @static + */ + + }, { + key: 'drawPath', + value: function drawPath(ctx, points) { + ctx.beginPath(); + ctx.moveTo(points[0].x, points[0].y); + for (var i = 1; i < points.length; ++i) { + ctx.lineTo(points[i].x, points[i].y); + } + ctx.closePath(); + } + }]); + return EndPoint; +}(); + +/** + * Drawing methods for the arrow endpoint. + * @extends EndPoint + */ + + +var Arrow = function (_EndPoint) { + (0, _inherits3['default'])(Arrow, _EndPoint); + + function Arrow() { + (0, _classCallCheck3['default'])(this, Arrow); + return (0, _possibleConstructorReturn3['default'])(this, (Arrow.__proto__ || (0, _getPrototypeOf2['default'])(Arrow)).apply(this, arguments)); + } + + (0, _createClass3['default'])(Arrow, null, [{ + key: 'draw', + + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ x: 0, y: 0 }, { x: -1, y: 0.3 }, { x: -0.9, y: 0 }, { x: -1, y: -0.3 }]; + + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + return Arrow; +}(EndPoint); + +/** + * Drawing methods for the circle endpoint. + */ + + +var Circle = function () { + function Circle() { + (0, _classCallCheck3['default'])(this, Circle); + } + + (0, _createClass3['default'])(Circle, null, [{ + key: 'draw', + + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var point = { x: -0.4, y: 0 }; + + EndPoint.transform(point, arrowData); + ctx.circle(point.x, point.y, arrowData.length * 0.4); + } + }]); + return Circle; +}(); + +/** + * Drawing methods for the bar endpoint. + */ + + +var Bar = function () { + function Bar() { + (0, _classCallCheck3['default'])(this, Bar); + } + + (0, _createClass3['default'])(Bar, null, [{ + key: 'draw', + + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + /* + var points = [ + {x:0, y:0.5}, + {x:0, y:-0.5} + ]; + + EndPoint.transform(points, arrowData); + ctx.beginPath(); + ctx.moveTo(points[0].x, points[0].y); + ctx.lineTo(points[1].x, points[1].y); + ctx.stroke(); + */ + + var points = [{ x: 0, y: 0.5 }, { x: 0, y: -0.5 }, { x: -0.15, y: -0.5 }, { x: -0.15, y: 0.5 }]; + + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + return Bar; +}(); + +/** + * Drawing methods for the endpoints. + */ + + +var EndPoints = function () { + function EndPoints() { + (0, _classCallCheck3['default'])(this, EndPoints); + } + + (0, _createClass3['default'])(EndPoints, null, [{ + key: 'draw', + + + /** + * Draw an endpoint + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var type; + if (arrowData.type) { + type = arrowData.type.toLowerCase(); + } + + switch (type) { + case 'circle': + Circle.draw(ctx, arrowData); + break; + case 'bar': + Bar.draw(ctx, arrowData); + break; + case 'arrow': // fall-through + default: + Arrow.draw(ctx, arrowData); + } + } + }]); + return EndPoints; +}(); + +exports['default'] = EndPoints; + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * Barnes Hut Solver + */ +var BarnesHutSolver = function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function BarnesHutSolver(body, physicsBody, options) { + (0, _classCallCheck3["default"])(this, BarnesHutSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.barnesHutTree; + this.setOptions(options); + this.randomSeed = 5; + + // debug: show grid + // this.body.emitter.on("afterDrawing", (ctx) => {this._debug(ctx,'#ff0000')}) + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3["default"])(BarnesHutSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + this.thetaInversed = 1 / this.options.theta; + + // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius + this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap)); + } + + /** + * + * @returns {number} random integer + */ + + }, { + key: "seededRandom", + value: function seededRandom() { + var x = Math.sin(this.randomSeed++) * 10000; + return x - Math.floor(x); + } + + /** + * This function calculates the forces the nodes apply on each other based on a gravitational model. + * The Barnes Hut method is used to speed up this N-body simulation. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) { + var node = void 0; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var nodeCount = nodeIndices.length; + + // create the tree + var barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices); + + // for debugging + this.barnesHutTree = barnesHutTree; + + // place the nodes one by one recursively + for (var i = 0; i < nodeCount; i++) { + node = nodes[nodeIndices[i]]; + if (node.options.mass > 0) { + // starting with root is irrelevant, it never passes the BarnesHutSolver condition + this._getForceContributions(barnesHutTree.root, node); + } + } + } + } + + /** + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_getForceContributions", + value: function _getForceContributions(parentBranch, node) { + this._getForceContribution(parentBranch.children.NW, node); + this._getForceContribution(parentBranch.children.NE, node); + this._getForceContribution(parentBranch.children.SW, node); + this._getForceContribution(parentBranch.children.SE, node); + } + + /** + * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass. + * If a region contains a single node, we check if it is not itself, then we apply the force. + * + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_getForceContribution", + value: function _getForceContribution(parentBranch, node) { + // we get no force contribution from an empty region + if (parentBranch.childrenCount > 0) { + var dx = void 0, + dy = void 0, + distance = void 0; + + // get the distance from the center of mass to the node. + dx = parentBranch.centerOfMass.x - node.x; + dy = parentBranch.centerOfMass.y - node.y; + distance = Math.sqrt(dx * dx + dy * dy); + + // BarnesHutSolver condition + // original condition : s/d < theta = passed === d/s > 1/theta = passed + // calcSize = 1/s --> d * 1/s > 1/theta = passed + if (distance * parentBranch.calcSize > this.thetaInversed) { + this._calculateForces(distance, dx, dy, node, parentBranch); + } else { + // Did not pass the condition, go into children if available + if (parentBranch.childrenCount === 4) { + this._getForceContributions(parentBranch, node); + } else { + // parentBranch must have only one node, if it was empty we wouldnt be here + if (parentBranch.children.data.id != node.id) { + // if it is not self + this._calculateForces(distance, dx, dy, node, parentBranch); + } + } + } + } + } + + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Node} node + * @param {Object} parentBranch + * @private + */ + + }, { + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, node, parentBranch) { + if (distance === 0) { + distance = 0.1; + dx = distance; + } + + if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { + distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius); + } + + // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines + // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce + var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance, 3); + var fx = dx * gravityForce; + var fy = dy * gravityForce; + + this.physicsBody.forces[node.id].x += fx; + this.physicsBody.forces[node.id].y += fy; + } + + /** + * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes. + * + * @param {Array.} nodes + * @param {Array.} nodeIndices + * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree + * @private + */ + + }, { + key: "_formBarnesHutTree", + value: function _formBarnesHutTree(nodes, nodeIndices) { + var node = void 0; + var nodeCount = nodeIndices.length; + + var minX = nodes[nodeIndices[0]].x; + var minY = nodes[nodeIndices[0]].y; + var maxX = nodes[nodeIndices[0]].x; + var maxY = nodes[nodeIndices[0]].y; + + // get the range of the nodes + for (var i = 1; i < nodeCount; i++) { + var _node = nodes[nodeIndices[i]]; + var x = _node.x; + var y = _node.y; + if (_node.options.mass > 0) { + if (x < minX) { + minX = x; + } + if (x > maxX) { + maxX = x; + } + if (y < minY) { + minY = y; + } + if (y > maxY) { + maxY = y; + } + } + } + // make the range a square + var sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y + if (sizeDiff > 0) { + minY -= 0.5 * sizeDiff; + maxY += 0.5 * sizeDiff; + } // xSize > ySize + else { + minX += 0.5 * sizeDiff; + maxX -= 0.5 * sizeDiff; + } // xSize < ySize + + + var minimumTreeSize = 1e-5; + var rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX)); + var halfRootSize = 0.5 * rootSize; + var centerX = 0.5 * (minX + maxX), + centerY = 0.5 * (minY + maxY); + + // construct the barnesHutTree + var barnesHutTree = { + root: { + centerOfMass: { x: 0, y: 0 }, + mass: 0, + range: { + minX: centerX - halfRootSize, maxX: centerX + halfRootSize, + minY: centerY - halfRootSize, maxY: centerY + halfRootSize + }, + size: rootSize, + calcSize: 1 / rootSize, + children: { data: null }, + maxWidth: 0, + level: 0, + childrenCount: 4 + } + }; + this._splitBranch(barnesHutTree.root); + + // place the nodes one by one recursively + for (var _i = 0; _i < nodeCount; _i++) { + node = nodes[nodeIndices[_i]]; + if (node.options.mass > 0) { + this._placeInTree(barnesHutTree.root, node); + } + } + + // make global + return barnesHutTree; + } + + /** + * this updates the mass of a branch. this is increased by adding a node. + * + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_updateBranchMass", + value: function _updateBranchMass(parentBranch, node) { + var centerOfMass = parentBranch.centerOfMass; + var totalMass = parentBranch.mass + node.options.mass; + var totalMassInv = 1 / totalMass; + + centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass; + centerOfMass.x *= totalMassInv; + + centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass; + centerOfMass.y *= totalMassInv; + + parentBranch.mass = totalMass; + var biggestSize = Math.max(Math.max(node.height, node.radius), node.width); + parentBranch.maxWidth = parentBranch.maxWidth < biggestSize ? biggestSize : parentBranch.maxWidth; + } + + /** + * determine in which branch the node will be placed. + * + * @param {Object} parentBranch + * @param {Node} node + * @param {boolean} skipMassUpdate + * @private + */ + + }, { + key: "_placeInTree", + value: function _placeInTree(parentBranch, node, skipMassUpdate) { + if (skipMassUpdate != true || skipMassUpdate === undefined) { + // update the mass of the branch. + this._updateBranchMass(parentBranch, node); + } + + var range = parentBranch.children.NW.range; + var region = void 0; + if (range.maxX > node.x) { + // in NW or SW + if (range.maxY > node.y) { + region = "NW"; + } else { + region = "SW"; + } + } else { + // in NE or SE + if (range.maxY > node.y) { + region = "NE"; + } else { + region = "SE"; + } + } + + this._placeInRegion(parentBranch, node, region); + } + + /** + * actually place the node in a region (or branch) + * + * @param {Object} parentBranch + * @param {Node} node + * @param {'NW'| 'NE' | 'SW' | 'SE'} region + * @private + */ + + }, { + key: "_placeInRegion", + value: function _placeInRegion(parentBranch, node, region) { + var children = parentBranch.children[region]; + + switch (children.childrenCount) { + case 0: + // place node here + children.children.data = node; + children.childrenCount = 1; + this._updateBranchMass(children, node); + break; + case 1: + // convert into children + // if there are two nodes exactly overlapping (on init, on opening of cluster etc.) + // we move one node a little bit and we do not put it in the tree. + if (children.children.data.x === node.x && children.children.data.y === node.y) { + node.x += this.seededRandom(); + node.y += this.seededRandom(); + } else { + this._splitBranch(children); + this._placeInTree(children, node); + } + break; + case 4: + // place in branch + this._placeInTree(children, node); + break; + } + } + + /** + * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch + * after the split is complete. + * + * @param {Object} parentBranch + * @private + */ + + }, { + key: "_splitBranch", + value: function _splitBranch(parentBranch) { + // if the branch is shaded with a node, replace the node in the new subset. + var containedNode = null; + if (parentBranch.childrenCount === 1) { + containedNode = parentBranch.children.data; + parentBranch.mass = 0; + parentBranch.centerOfMass.x = 0; + parentBranch.centerOfMass.y = 0; + } + parentBranch.childrenCount = 4; + parentBranch.children.data = null; + this._insertRegion(parentBranch, "NW"); + this._insertRegion(parentBranch, "NE"); + this._insertRegion(parentBranch, "SW"); + this._insertRegion(parentBranch, "SE"); + + if (containedNode != null) { + this._placeInTree(parentBranch, containedNode); + } + } + + /** + * This function subdivides the region into four new segments. + * Specifically, this inserts a single new segment. + * It fills the children section of the parentBranch + * + * @param {Object} parentBranch + * @param {'NW'| 'NE' | 'SW' | 'SE'} region + * @private + */ + + }, { + key: "_insertRegion", + value: function _insertRegion(parentBranch, region) { + var minX = void 0, + maxX = void 0, + minY = void 0, + maxY = void 0; + var childSize = 0.5 * parentBranch.size; + switch (region) { + case "NW": + minX = parentBranch.range.minX; + maxX = parentBranch.range.minX + childSize; + minY = parentBranch.range.minY; + maxY = parentBranch.range.minY + childSize; + break; + case "NE": + minX = parentBranch.range.minX + childSize; + maxX = parentBranch.range.maxX; + minY = parentBranch.range.minY; + maxY = parentBranch.range.minY + childSize; + break; + case "SW": + minX = parentBranch.range.minX; + maxX = parentBranch.range.minX + childSize; + minY = parentBranch.range.minY + childSize; + maxY = parentBranch.range.maxY; + break; + case "SE": + minX = parentBranch.range.minX + childSize; + maxX = parentBranch.range.maxX; + minY = parentBranch.range.minY + childSize; + maxY = parentBranch.range.maxY; + break; + } + + parentBranch.children[region] = { + centerOfMass: { x: 0, y: 0 }, + mass: 0, + range: { minX: minX, maxX: maxX, minY: minY, maxY: maxY }, + size: 0.5 * parentBranch.size, + calcSize: 2 * parentBranch.calcSize, + children: { data: null }, + maxWidth: 0, + level: parentBranch.level + 1, + childrenCount: 0 + }; + } + + //--------------------------- DEBUGGING BELOW ---------------------------// + + + /** + * This function is for debugging purposed, it draws the tree. + * + * @param {CanvasRenderingContext2D} ctx + * @param {string} color + * @private + */ + + }, { + key: "_debug", + value: function _debug(ctx, color) { + if (this.barnesHutTree !== undefined) { + + ctx.lineWidth = 1; + + this._drawBranch(this.barnesHutTree.root, ctx, color); + } + } + + /** + * This function is for debugging purposes. It draws the branches recursively. + * + * @param {Object} branch + * @param {CanvasRenderingContext2D} ctx + * @param {string} color + * @private + */ + + }, { + key: "_drawBranch", + value: function _drawBranch(branch, ctx, color) { + if (color === undefined) { + color = "#FF0000"; + } + + if (branch.childrenCount === 4) { + this._drawBranch(branch.children.NW, ctx); + this._drawBranch(branch.children.NE, ctx); + this._drawBranch(branch.children.SE, ctx); + this._drawBranch(branch.children.SW, ctx); + } + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(branch.range.minX, branch.range.minY); + ctx.lineTo(branch.range.maxX, branch.range.minY); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(branch.range.maxX, branch.range.minY); + ctx.lineTo(branch.range.maxX, branch.range.maxY); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(branch.range.maxX, branch.range.maxY); + ctx.lineTo(branch.range.minX, branch.range.maxY); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(branch.range.minX, branch.range.maxY); + ctx.lineTo(branch.range.minX, branch.range.minY); + ctx.stroke(); + + /* + if (branch.mass > 0) { + ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass); + ctx.stroke(); + } + */ + } + }]); + return BarnesHutSolver; +}(); + +exports["default"] = BarnesHutSolver; + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * Central Gravity Solver + */ +var CentralGravitySolver = function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function CentralGravitySolver(body, physicsBody, options) { + (0, _classCallCheck3["default"])(this, CentralGravitySolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3["default"])(CentralGravitySolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + + /** + * Calculates forces for each node + */ + + }, { + key: "solve", + value: function solve() { + var dx = void 0, + dy = void 0, + distance = void 0, + node = void 0; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; + + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + node = nodes[nodeId]; + dx = -node.x; + dy = -node.y; + distance = Math.sqrt(dx * dx + dy * dy); + + this._calculateForces(distance, dx, dy, forces, node); + } + } + + /** + * Calculate the forces based on the distance. + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Object} forces + * @param {Node} node + * @private + */ + + }, { + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, forces, node) { + var gravityForce = distance === 0 ? 0 : this.options.centralGravity / distance; + forces[node.id].x = dx * gravityForce; + forces[node.id].y = dy * gravityForce; + } + }]); + return CentralGravitySolver; +}(); + +exports["default"] = CentralGravitySolver; + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * This object contains all possible options. It will check if the types are correct, if required if the option is one + * of the allowed values. + * + * __any__ means that the name of the property does not matter. + * __type__ is a required field for all objects and contains the allowed types of all objects + */ +var string = 'string'; +var bool = 'boolean'; +var number = 'number'; +var array = 'array'; +var object = 'object'; // should only be in a __type__ property +var dom = 'dom'; +var any = 'any'; + +// List of endpoints +var endPoints = ['arrow', 'circle', 'bar']; + +var allOptions = { + configure: { + enabled: { boolean: bool }, + filter: { boolean: bool, string: string, array: array, 'function': 'function' }, + container: { dom: dom }, + showButton: { boolean: bool }, + __type__: { object: object, boolean: bool, string: string, array: array, 'function': 'function' } + }, + edges: { + arrows: { + to: { enabled: { boolean: bool }, scaleFactor: { number: number }, type: { string: endPoints }, __type__: { object: object, boolean: bool } }, + middle: { enabled: { boolean: bool }, scaleFactor: { number: number }, type: { string: endPoints }, __type__: { object: object, boolean: bool } }, + from: { enabled: { boolean: bool }, scaleFactor: { number: number }, type: { string: endPoints }, __type__: { object: object, boolean: bool } }, + __type__: { string: ['from', 'to', 'middle'], object: object } + }, + arrowStrikethrough: { boolean: bool }, + chosen: { + label: { boolean: bool, 'function': 'function' }, + edge: { boolean: bool, 'function': 'function' }, + __type__: { object: object, boolean: bool } + }, + color: { + color: { string: string }, + highlight: { string: string }, + hover: { string: string }, + inherit: { string: ['from', 'to', 'both'], boolean: bool }, + opacity: { number: number }, + __type__: { object: object, string: string } + }, + dashes: { boolean: bool, array: array }, + font: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + background: { string: string }, + strokeWidth: { number: number }, // px + strokeColor: { string: string }, + align: { string: ['horizontal', 'top', 'middle', 'bottom'] }, + vadjust: { number: number }, + multi: { boolean: bool, string: string }, + bold: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + mod: { string: string }, + vadjust: { number: number }, + __type__: { object: object, string: string } + }, + boldital: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + mod: { string: string }, + vadjust: { number: number }, + __type__: { object: object, string: string } + }, + ital: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + mod: { string: string }, + vadjust: { number: number }, + __type__: { object: object, string: string } + }, + mono: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + mod: { string: string }, + vadjust: { number: number }, + __type__: { object: object, string: string } + }, + __type__: { object: object, string: string } + }, + hidden: { boolean: bool }, + hoverWidth: { 'function': 'function', number: number }, + label: { string: string, 'undefined': 'undefined' }, + labelHighlightBold: { boolean: bool }, + length: { number: number, 'undefined': 'undefined' }, + physics: { boolean: bool }, + scaling: { + min: { number: number }, + max: { number: number }, + label: { + enabled: { boolean: bool }, + min: { number: number }, + max: { number: number }, + maxVisible: { number: number }, + drawThreshold: { number: number }, + __type__: { object: object, boolean: bool } + }, + customScalingFunction: { 'function': 'function' }, + __type__: { object: object } + }, + selectionWidth: { 'function': 'function', number: number }, + selfReferenceSize: { number: number }, + shadow: { + enabled: { boolean: bool }, + color: { string: string }, + size: { number: number }, + x: { number: number }, + y: { number: number }, + __type__: { object: object, boolean: bool } + }, + smooth: { + enabled: { boolean: bool }, + type: { string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'] }, + roundness: { number: number }, + forceDirection: { string: ['horizontal', 'vertical', 'none'], boolean: bool }, + __type__: { object: object, boolean: bool } + }, + title: { string: string, 'undefined': 'undefined' }, + width: { number: number }, + widthConstraint: { + maximum: { number: number }, + __type__: { object: object, boolean: bool, number: number } + }, + value: { number: number, 'undefined': 'undefined' }, + __type__: { object: object } + }, + groups: { + useDefaultGroups: { boolean: bool }, + __any__: 'get from nodes, will be overwritten below', + __type__: { object: object } + }, + interaction: { + dragNodes: { boolean: bool }, + dragView: { boolean: bool }, + hideEdgesOnDrag: { boolean: bool }, + hideNodesOnDrag: { boolean: bool }, + hover: { boolean: bool }, + keyboard: { + enabled: { boolean: bool }, + speed: { x: { number: number }, y: { number: number }, zoom: { number: number }, __type__: { object: object } }, + bindToWindow: { boolean: bool }, + __type__: { object: object, boolean: bool } + }, + multiselect: { boolean: bool }, + navigationButtons: { boolean: bool }, + selectable: { boolean: bool }, + selectConnectedEdges: { boolean: bool }, + hoverConnectedEdges: { boolean: bool }, + tooltipDelay: { number: number }, + zoomView: { boolean: bool }, + __type__: { object: object } + }, + layout: { + randomSeed: { 'undefined': 'undefined', number: number }, + improvedLayout: { boolean: bool }, + hierarchical: { + enabled: { boolean: bool }, + levelSeparation: { number: number }, + nodeSpacing: { number: number }, + treeSpacing: { number: number }, + blockShifting: { boolean: bool }, + edgeMinimization: { boolean: bool }, + parentCentralization: { boolean: bool }, + direction: { string: ['UD', 'DU', 'LR', 'RL'] }, // UD, DU, LR, RL + sortMethod: { string: ['hubsize', 'directed'] }, // hubsize, directed + __type__: { object: object, boolean: bool } + }, + __type__: { object: object } + }, + manipulation: { + enabled: { boolean: bool }, + initiallyActive: { boolean: bool }, + addNode: { boolean: bool, 'function': 'function' }, + addEdge: { boolean: bool, 'function': 'function' }, + editNode: { 'function': 'function' }, + editEdge: { + editWithoutDrag: { 'function': 'function' }, + __type__: { object: object, boolean: bool, 'function': 'function' } + }, + deleteNode: { boolean: bool, 'function': 'function' }, + deleteEdge: { boolean: bool, 'function': 'function' }, + controlNodeStyle: 'get from nodes, will be overwritten below', + __type__: { object: object, boolean: bool } + }, + nodes: { + borderWidth: { number: number }, + borderWidthSelected: { number: number, 'undefined': 'undefined' }, + brokenImage: { string: string, 'undefined': 'undefined' }, + chosen: { + label: { boolean: bool, 'function': 'function' }, + node: { boolean: bool, 'function': 'function' }, + __type__: { object: object, boolean: bool } + }, + color: { + border: { string: string }, + background: { string: string }, + highlight: { + border: { string: string }, + background: { string: string }, + __type__: { object: object, string: string } + }, + hover: { + border: { string: string }, + background: { string: string }, + __type__: { object: object, string: string } + }, + __type__: { object: object, string: string } + }, + fixed: { + x: { boolean: bool }, + y: { boolean: bool }, + __type__: { object: object, boolean: bool } + }, + font: { + align: { string: string }, + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + background: { string: string }, + strokeWidth: { number: number }, // px + strokeColor: { string: string }, + vadjust: { number: number }, + multi: { boolean: bool, string: string }, + bold: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + mod: { string: string }, + vadjust: { number: number }, + __type__: { object: object, string: string } + }, + boldital: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + mod: { string: string }, + vadjust: { number: number }, + __type__: { object: object, string: string } + }, + ital: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + mod: { string: string }, + vadjust: { number: number }, + __type__: { object: object, string: string } + }, + mono: { + color: { string: string }, + size: { number: number }, // px + face: { string: string }, + mod: { string: string }, + vadjust: { number: number }, + __type__: { object: object, string: string } + }, + __type__: { object: object, string: string } + }, + group: { string: string, number: number, 'undefined': 'undefined' }, + heightConstraint: { + minimum: { number: number }, + valign: { string: string }, + __type__: { object: object, boolean: bool, number: number } + }, + hidden: { boolean: bool }, + icon: { + face: { string: string }, + code: { string: string }, //'\uf007', + size: { number: number }, //50, + color: { string: string }, + __type__: { object: object } + }, + id: { string: string, number: number }, + image: { + selected: { string: string, 'undefined': 'undefined' }, // --> URL + unselected: { string: string, 'undefined': 'undefined' }, // --> URL + __type__: { object: object, string: string } + }, + label: { string: string, 'undefined': 'undefined' }, + labelHighlightBold: { boolean: bool }, + level: { number: number, 'undefined': 'undefined' }, + margin: { + top: { number: number }, + right: { number: number }, + bottom: { number: number }, + left: { number: number }, + __type__: { object: object, number: number } + }, + mass: { number: number }, + physics: { boolean: bool }, + scaling: { + min: { number: number }, + max: { number: number }, + label: { + enabled: { boolean: bool }, + min: { number: number }, + max: { number: number }, + maxVisible: { number: number }, + drawThreshold: { number: number }, + __type__: { object: object, boolean: bool } + }, + customScalingFunction: { 'function': 'function' }, + __type__: { object: object } + }, + shadow: { + enabled: { boolean: bool }, + color: { string: string }, + size: { number: number }, + x: { number: number }, + y: { number: number }, + __type__: { object: object, boolean: bool } + }, + shape: { string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon', 'hexagon'] }, + shapeProperties: { + borderDashes: { boolean: bool, array: array }, + borderRadius: { number: number }, + interpolation: { boolean: bool }, + useImageSize: { boolean: bool }, + useBorderWithImage: { boolean: bool }, + __type__: { object: object } + }, + size: { number: number }, + title: { string: string, dom: dom, 'undefined': 'undefined' }, + value: { number: number, 'undefined': 'undefined' }, + widthConstraint: { + minimum: { number: number }, + maximum: { number: number }, + __type__: { object: object, boolean: bool, number: number } + }, + x: { number: number }, + y: { number: number }, + __type__: { object: object } + }, + physics: { + enabled: { boolean: bool }, + barnesHut: { + gravitationalConstant: { number: number }, + centralGravity: { number: number }, + springLength: { number: number }, + springConstant: { number: number }, + damping: { number: number }, + avoidOverlap: { number: number }, + __type__: { object: object } + }, + forceAtlas2Based: { + gravitationalConstant: { number: number }, + centralGravity: { number: number }, + springLength: { number: number }, + springConstant: { number: number }, + damping: { number: number }, + avoidOverlap: { number: number }, + __type__: { object: object } + }, + repulsion: { + centralGravity: { number: number }, + springLength: { number: number }, + springConstant: { number: number }, + nodeDistance: { number: number }, + damping: { number: number }, + __type__: { object: object } + }, + hierarchicalRepulsion: { + centralGravity: { number: number }, + springLength: { number: number }, + springConstant: { number: number }, + nodeDistance: { number: number }, + damping: { number: number }, + __type__: { object: object } + }, + maxVelocity: { number: number }, + minVelocity: { number: number }, // px/s + solver: { string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'] }, + stabilization: { + enabled: { boolean: bool }, + iterations: { number: number }, // maximum number of iteration to stabilize + updateInterval: { number: number }, + onlyDynamicEdges: { boolean: bool }, + fit: { boolean: bool }, + __type__: { object: object, boolean: bool } + }, + timestep: { number: number }, + adaptiveTimestep: { boolean: bool }, + __type__: { object: object, boolean: bool } + }, + + //globals : + autoResize: { boolean: bool }, + clickToUse: { boolean: bool }, + locale: { string: string }, + locales: { + __any__: { any: any }, + __type__: { object: object } + }, + height: { string: string }, + width: { string: string }, + __type__: { object: object } +}; + +allOptions.groups.__any__ = allOptions.nodes; +allOptions.manipulation.controlNodeStyle = allOptions.nodes; + +var configureOptions = { + nodes: { + borderWidth: [1, 0, 10, 1], + borderWidthSelected: [2, 0, 10, 1], + color: { + border: ['color', '#2B7CE9'], + background: ['color', '#97C2FC'], + highlight: { + border: ['color', '#2B7CE9'], + background: ['color', '#D2E5FF'] + }, + hover: { + border: ['color', '#2B7CE9'], + background: ['color', '#D2E5FF'] + } + }, + fixed: { + x: false, + y: false + }, + font: { + color: ['color', '#343434'], + size: [14, 0, 100, 1], // px + face: ['arial', 'verdana', 'tahoma'], + background: ['color', 'none'], + strokeWidth: [0, 0, 50, 1], // px + strokeColor: ['color', '#ffffff'] + }, + //group: 'string', + hidden: false, + labelHighlightBold: true, + //icon: { + // face: 'string', //'FontAwesome', + // code: 'string', //'\uf007', + // size: [50, 0, 200, 1], //50, + // color: ['color','#2B7CE9'] //'#aa00ff' + //}, + //image: 'string', // --> URL + physics: true, + scaling: { + min: [10, 0, 200, 1], + max: [30, 0, 200, 1], + label: { + enabled: false, + min: [14, 0, 200, 1], + max: [30, 0, 200, 1], + maxVisible: [30, 0, 200, 1], + drawThreshold: [5, 0, 20, 1] + } + }, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: [10, 0, 20, 1], + x: [5, -30, 30, 1], + y: [5, -30, 30, 1] + }, + shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown', 'hexagon'], + shapeProperties: { + borderDashes: false, + borderRadius: [6, 0, 20, 1], + interpolation: true, + useImageSize: false + }, + size: [25, 0, 200, 1] + }, + edges: { + arrows: { + to: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' }, + middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' }, + from: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' } + }, + arrowStrikethrough: true, + color: { + color: ['color', '#848484'], + highlight: ['color', '#848484'], + hover: ['color', '#848484'], + inherit: ['from', 'to', 'both', true, false], + opacity: [1, 0, 1, 0.05] + }, + dashes: false, + font: { + color: ['color', '#343434'], + size: [14, 0, 100, 1], // px + face: ['arial', 'verdana', 'tahoma'], + background: ['color', 'none'], + strokeWidth: [2, 0, 50, 1], // px + strokeColor: ['color', '#ffffff'], + align: ['horizontal', 'top', 'middle', 'bottom'] + }, + hidden: false, + hoverWidth: [1.5, 0, 5, 0.1], + labelHighlightBold: true, + physics: true, + scaling: { + min: [1, 0, 100, 1], + max: [15, 0, 100, 1], + label: { + enabled: true, + min: [14, 0, 200, 1], + max: [30, 0, 200, 1], + maxVisible: [30, 0, 200, 1], + drawThreshold: [5, 0, 20, 1] + } + }, + selectionWidth: [1.5, 0, 5, 0.1], + selfReferenceSize: [20, 0, 200, 1], + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: [10, 0, 20, 1], + x: [5, -30, 30, 1], + y: [5, -30, 30, 1] + }, + smooth: { + enabled: true, + type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'], + forceDirection: ['horizontal', 'vertical', 'none'], + roundness: [0.5, 0, 1, 0.05] + }, + width: [1, 0, 30, 1] + }, + layout: { + //randomSeed: [0, 0, 500, 1], + //improvedLayout: true, + hierarchical: { + enabled: false, + levelSeparation: [150, 20, 500, 5], + nodeSpacing: [100, 20, 500, 5], + treeSpacing: [200, 20, 500, 5], + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, + direction: ['UD', 'DU', 'LR', 'RL'], // UD, DU, LR, RL + sortMethod: ['hubsize', 'directed'] // hubsize, directed + } + }, + interaction: { + dragNodes: true, + dragView: true, + hideEdgesOnDrag: false, + hideNodesOnDrag: false, + hover: false, + keyboard: { + enabled: false, + speed: { x: [10, 0, 40, 1], y: [10, 0, 40, 1], zoom: [0.02, 0, 0.1, 0.005] }, + bindToWindow: true + }, + multiselect: false, + navigationButtons: false, + selectable: true, + selectConnectedEdges: true, + hoverConnectedEdges: true, + tooltipDelay: [300, 0, 1000, 25], + zoomView: true + }, + manipulation: { + enabled: false, + initiallyActive: false + }, + physics: { + enabled: true, + barnesHut: { + //theta: [0.5, 0.1, 1, 0.05], + gravitationalConstant: [-2000, -30000, 0, 50], + centralGravity: [0.3, 0, 10, 0.05], + springLength: [95, 0, 500, 5], + springConstant: [0.04, 0, 1.2, 0.005], + damping: [0.09, 0, 1, 0.01], + avoidOverlap: [0, 0, 1, 0.01] + }, + forceAtlas2Based: { + //theta: [0.5, 0.1, 1, 0.05], + gravitationalConstant: [-50, -500, 0, 1], + centralGravity: [0.01, 0, 1, 0.005], + springLength: [95, 0, 500, 5], + springConstant: [0.08, 0, 1.2, 0.005], + damping: [0.4, 0, 1, 0.01], + avoidOverlap: [0, 0, 1, 0.01] + }, + repulsion: { + centralGravity: [0.2, 0, 10, 0.05], + springLength: [200, 0, 500, 5], + springConstant: [0.05, 0, 1.2, 0.005], + nodeDistance: [100, 0, 500, 5], + damping: [0.09, 0, 1, 0.01] + }, + hierarchicalRepulsion: { + centralGravity: [0.2, 0, 10, 0.05], + springLength: [100, 0, 500, 5], + springConstant: [0.01, 0, 1.2, 0.005], + nodeDistance: [120, 0, 500, 5], + damping: [0.09, 0, 1, 0.01] + }, + maxVelocity: [50, 0, 150, 1], + minVelocity: [0.1, 0.01, 0.5, 0.01], + solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'], + timestep: [0.5, 0.01, 1, 0.01] + //adaptiveTimestep: true + } +}; + +exports.allOptions = allOptions; +exports.configureOptions = configureOptions; + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(2); + +// Graph3d +util.extend(exports, __webpack_require__(159)); + +// Timeline & Graph2d +util.extend(exports, __webpack_require__(177)); + +// Network +util.extend(exports, __webpack_require__(181)); + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(49); +__webpack_require__(60); +module.exports = __webpack_require__(136); + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(126); +var step = __webpack_require__(127); +var Iterators = __webpack_require__(31); +var toIObject = __webpack_require__(25); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(79)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 126 */ +/***/ (function(module, exports) { + +module.exports = function () { /* empty */ }; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(54); +var descriptor = __webpack_require__(39); +var setToStringTag = __webpack_require__(59); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(26)(IteratorPrototype, __webpack_require__(13)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(20); +var anObject = __webpack_require__(27); +var getKeys = __webpack_require__(33); + +module.exports = __webpack_require__(21) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(25); +var toLength = __webpack_require__(132); +var toAbsoluteIndex = __webpack_require__(133); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(55); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(55); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(18).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(55); +var defined = __webpack_require__(51); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(27); +var get = __webpack_require__(137); +module.exports = __webpack_require__(7).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(86); +var ITERATOR = __webpack_require__(13)('iterator'); +var Iterators = __webpack_require__(31); +module.exports = __webpack_require__(7).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(139); +var $Object = __webpack_require__(7).Object; +module.exports = function create(P, D) { + return $Object.create(P, D); +}; + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(17); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(54) }); + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(141); +module.exports = __webpack_require__(7).Object.keys; + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(41); +var $keys = __webpack_require__(33); + +__webpack_require__(87)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(143), __esModule: true }; + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(60); +__webpack_require__(49); +module.exports = __webpack_require__(61).f('iterator'); + + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(145), __esModule: true }; + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(146); +__webpack_require__(151); +__webpack_require__(152); +__webpack_require__(153); +module.exports = __webpack_require__(7).Symbol; + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(18); +var has = __webpack_require__(22); +var DESCRIPTORS = __webpack_require__(21); +var $export = __webpack_require__(17); +var redefine = __webpack_require__(83); +var META = __webpack_require__(147).KEY; +var $fails = __webpack_require__(28); +var shared = __webpack_require__(57); +var setToStringTag = __webpack_require__(59); +var uid = __webpack_require__(40); +var wks = __webpack_require__(13); +var wksExt = __webpack_require__(61); +var wksDefine = __webpack_require__(62); +var enumKeys = __webpack_require__(148); +var isArray = __webpack_require__(149); +var anObject = __webpack_require__(27); +var toIObject = __webpack_require__(25); +var toPrimitive = __webpack_require__(53); +var createDesc = __webpack_require__(39); +var _create = __webpack_require__(54); +var gOPNExt = __webpack_require__(150); +var $GOPD = __webpack_require__(89); +var $DP = __webpack_require__(20); +var $keys = __webpack_require__(33); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(88).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(42).f = $propertyIsEnumerable; + __webpack_require__(63).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(52)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + replacer = args[1]; + if (typeof replacer == 'function') $replacer = replacer; + if ($replacer || !isArray(replacer)) replacer = function (key, value) { + if ($replacer) value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(26)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(40)('meta'); +var isObject = __webpack_require__(32); +var has = __webpack_require__(22); +var setDesc = __webpack_require__(20).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(28)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(33); +var gOPS = __webpack_require__(63); +var pIE = __webpack_require__(42); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(50); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(25); +var gOPN = __webpack_require__(88).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 151 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(62)('asyncIterator'); + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(62)('observable'); + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js +//! version : 2.19.1 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com + +;(function (global, factory) { + true ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + global.moment = factory() +}(this, (function () { 'use strict'; + +var hookCallback; + +function hooks () { + return hookCallback.apply(null, arguments); +} + +// This is done to register the method called with moment() +// without creating circular dependencies. +function setHookCallback (callback) { + hookCallback = callback; +} + +function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; +} + +function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; +} + +function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return (Object.getOwnPropertyNames(obj).length === 0); + } else { + var k; + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + return true; + } +} + +function isUndefined(input) { + return input === void 0; +} + +function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; +} + +function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; +} + +function map(arr, fn) { + var res = [], i; + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + return res; +} + +function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); +} + +function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; +} + +function createUTC (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); +} + +function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty : false, + unusedTokens : [], + unusedInput : [], + overflow : -2, + charsLeftOver : 0, + nullInput : false, + invalidMonth : null, + invalidFormat : false, + userInvalidated : false, + iso : false, + parsedDateParts : [], + meridiem : null, + rfc2822 : false, + weekdayMismatch : false + }; +} + +function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + return m._pf; +} + +var some; +if (Array.prototype.some) { + some = Array.prototype.some; +} else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; +} + +function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } + else { + return isNowValid; + } + } + return m._isValid; +} + +function createInvalid (flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } + else { + getParsingFlags(m).userInvalidated = true; + } + + return m; +} + +// Plugins that add properties should also add the key here (null value), +// so we can properly clone ourselves. +var momentProperties = hooks.momentProperties = []; + +function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; +} + +var updateInProgress = false; + +// Moment prototype object +function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } +} + +function isMoment (obj) { + return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); +} + +function absFloor (number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } +} + +function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; +} + +// compare two arrays, return the number of differences +function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ((dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { + diffs++; + } + } + return diffs + lengthDiff; +} + +function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && + (typeof console !== 'undefined') && console.warn) { + console.warn('Deprecation warning: ' + msg); + } +} + +function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = []; + var arg; + for (var i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); +} + +var deprecations = {}; + +function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } +} + +hooks.suppressDeprecationWarnings = false; +hooks.deprecationHandler = null; + +function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; +} + +function set (config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + (/\d{1,2}/).source); +} + +function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; +} + +function Locale(config) { + if (config != null) { + this.set(config); + } +} + +var keys; + +if (Object.keys) { + keys = Object.keys; +} else { + keys = function (obj) { + var i, res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; +} + +var defaultCalendar = { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' +}; + +function calendar (key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; +} + +var defaultLongDateFormat = { + LTS : 'h:mm:ss A', + LT : 'h:mm A', + L : 'MM/DD/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' +}; + +function longDateFormat (key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + + return this._longDateFormat[key]; +} + +var defaultInvalidDate = 'Invalid date'; + +function invalidDate () { + return this._invalidDate; +} + +var defaultOrdinal = '%d'; +var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + +function ordinal (number) { + return this._ordinal.replace('%d', number); +} + +var defaultRelativeTime = { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' +}; + +function relativeTime (number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return (isFunction(output)) ? + output(number, withoutSuffix, string, isFuture) : + output.replace(/%d/i, number); +} + +function pastFuture (diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); +} + +var aliases = {}; + +function addUnitAlias (unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; +} + +function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; +} + +function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; +} + +var priorities = {}; + +function addUnitPriority(unit, priority) { + priorities[unit] = priority; +} + +function getPrioritizedUnits(unitsObj) { + var units = []; + for (var u in unitsObj) { + units.push({unit: u, priority: priorities[u]}); + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; +} + +function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; +} + +var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + +var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + +var formatFunctions = {}; + +var formatTokenFunctions = {}; + +// token: 'M' +// padded: ['MM', 2] +// ordinal: 'Mo' +// callback: function () { this.month() + 1 } +function addFormatToken (token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } +} + +function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); +} + +function makeFormatFunction(format) { + var array = format.match(formattingTokens), i, length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + return output; + }; +} + +// format date using native date object +function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); +} + +function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; +} + +var match1 = /\d/; // 0 - 9 +var match2 = /\d\d/; // 00 - 99 +var match3 = /\d{3}/; // 000 - 999 +var match4 = /\d{4}/; // 0000 - 9999 +var match6 = /[+-]?\d{6}/; // -999999 - 999999 +var match1to2 = /\d\d?/; // 0 - 99 +var match3to4 = /\d\d\d\d?/; // 999 - 9999 +var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 +var match1to3 = /\d{1,3}/; // 0 - 999 +var match1to4 = /\d{1,4}/; // 0 - 9999 +var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + +var matchUnsigned = /\d+/; // 0 - inf +var matchSigned = /[+-]?\d+/; // -inf - inf + +var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z +var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + +var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + +// any word (or two) characters or numbers including two/three word month in arabic. +// includes scottish gaelic two word and hyphenated months +var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; + + +var regexes = {}; + +function addRegexToken (token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return (isStrict && strictRegex) ? strictRegex : regex; + }; +} + +function getParseRegexForToken (token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); +} + +// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript +function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); +} + +function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); +} + +var tokens = {}; + +function addParseToken (token, callback) { + var i, func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } +} + +function addWeekParseToken (token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); +} + +function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } +} + +var YEAR = 0; +var MONTH = 1; +var DATE = 2; +var HOUR = 3; +var MINUTE = 4; +var SECOND = 5; +var MILLISECOND = 6; +var WEEK = 7; +var WEEKDAY = 8; + +// FORMATTING + +addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; +}); + +addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; +}); + +addFormatToken(0, ['YYYY', 4], 0, 'year'); +addFormatToken(0, ['YYYYY', 5], 0, 'year'); +addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + +// ALIASES + +addUnitAlias('year', 'y'); + +// PRIORITIES + +addUnitPriority('year', 1); + +// PARSING + +addRegexToken('Y', matchSigned); +addRegexToken('YY', match1to2, match2); +addRegexToken('YYYY', match1to4, match4); +addRegexToken('YYYYY', match1to6, match6); +addRegexToken('YYYYYY', match1to6, match6); + +addParseToken(['YYYYY', 'YYYYYY'], YEAR); +addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); +}); +addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); +}); +addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); +}); + +// HELPERS + +function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; +} + +function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; +} + +// HOOKS + +hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); +}; + +// MOMENTS + +var getSetYear = makeGetSet('FullYear', true); + +function getIsLeapYear () { + return isLeapYear(this.year()); +} + +function makeGetSet (unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; +} + +function get (mom, unit) { + return mom.isValid() ? + mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; +} + +function set$1 (mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year())) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } + else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } +} + +// MOMENTS + +function stringGet (units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; +} + + +function stringSet (units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; +} + +function mod(n, x) { + return ((n % x) + x) % x; +} + +var indexOf; + +if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; +} else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; +} + +function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); +} + +// FORMATTING + +addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; +}); + +addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); +}); + +addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); +}); + +// ALIASES + +addUnitAlias('month', 'M'); + +// PRIORITY + +addUnitPriority('month', 8); + +// PARSING + +addRegexToken('M', match1to2); +addRegexToken('MM', match1to2, match2); +addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); +}); +addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); +}); + +addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; +}); + +addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } +}); + +// LOCALES + +var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; +var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); +function localeMonths (m, format) { + if (!m) { + return isArray(this._months) ? this._months : + this._months['standalone']; + } + return isArray(this._months) ? this._months[m.month()] : + this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; +} + +var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); +function localeMonthsShort (m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : + this._monthsShort['standalone']; + } + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : + this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; +} + +function handleStrictParse(monthName, format, strict) { + var i, ii, mom, llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } +} + +function localeMonthsParse (monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } +} + +// MOMENTS + +function setMonth (mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; +} + +function getSetMonth (value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } +} + +function getDaysInMonth () { + return daysInMonth(this.year(), this.month()); +} + +var defaultMonthsShortRegex = matchWord; +function monthsShortRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict ? + this._monthsShortStrictRegex : this._monthsShortRegex; + } +} + +var defaultMonthsRegex = matchWord; +function monthsRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict ? + this._monthsStrictRegex : this._monthsRegex; + } +} + +function computeMonthsParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], longPieces = [], mixedPieces = [], + i, mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); +} + +function createDate (y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date = new Date(y, m, d, h, M, s, ms); + + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { + date.setFullYear(y); + } + return date; +} + +function createUTCDate (y) { + var date = new Date(Date.UTC.apply(null, arguments)); + + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + return date; +} + +// start-of-first-week - start-of-year +function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; +} + +// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday +function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; +} + +function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; +} + +function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; +} + +// FORMATTING + +addFormatToken('w', ['ww', 2], 'wo', 'week'); +addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + +// ALIASES + +addUnitAlias('week', 'w'); +addUnitAlias('isoWeek', 'W'); + +// PRIORITIES + +addUnitPriority('week', 5); +addUnitPriority('isoWeek', 5); + +// PARSING + +addRegexToken('w', match1to2); +addRegexToken('ww', match1to2, match2); +addRegexToken('W', match1to2); +addRegexToken('WW', match1to2, match2); + +addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); +}); + +// HELPERS + +// LOCALES + +function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; +} + +var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 1st is the first week of the year. +}; + +function localeFirstDayOfWeek () { + return this._week.dow; +} + +function localeFirstDayOfYear () { + return this._week.doy; +} + +// MOMENTS + +function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); +} + +function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); +} + +// FORMATTING + +addFormatToken('d', 0, 'do', 'day'); + +addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); +}); + +addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); +}); + +addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); +}); + +addFormatToken('e', 0, 0, 'weekday'); +addFormatToken('E', 0, 0, 'isoWeekday'); + +// ALIASES + +addUnitAlias('day', 'd'); +addUnitAlias('weekday', 'e'); +addUnitAlias('isoWeekday', 'E'); + +// PRIORITY +addUnitPriority('day', 11); +addUnitPriority('weekday', 11); +addUnitPriority('isoWeekday', 11); + +// PARSING + +addRegexToken('d', match1to2); +addRegexToken('e', match1to2); +addRegexToken('E', match1to2); +addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); +}); +addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); +}); +addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); +}); + +addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } +}); + +addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); +}); + +// HELPERS + +function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; +} + +function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; +} + +// LOCALES + +var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); +function localeWeekdays (m, format) { + if (!m) { + return isArray(this._weekdays) ? this._weekdays : + this._weekdays['standalone']; + } + return isArray(this._weekdays) ? this._weekdays[m.day()] : + this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; +} + +var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); +function localeWeekdaysShort (m) { + return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; +} + +var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); +function localeWeekdaysMin (m) { + return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; +} + +function handleStrictParse$1(weekdayName, format, strict) { + var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } +} + +function localeWeekdaysParse (weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); + } + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } +} + +// MOMENTS + +function getSetDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } +} + +function getSetLocaleDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); +} + +function getSetISODayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } +} + +var defaultWeekdaysRegex = matchWord; +function weekdaysRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict ? + this._weekdaysStrictRegex : this._weekdaysRegex; + } +} + +var defaultWeekdaysShortRegex = matchWord; +function weekdaysShortRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict ? + this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } +} + +var defaultWeekdaysMinRegex = matchWord; +function weekdaysMinRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict ? + this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } +} + + +function computeWeekdaysParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], + i, mom, minp, shortp, longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); +} + +// FORMATTING + +function hFormat() { + return this.hours() % 12 || 12; +} + +function kFormat() { + return this.hours() || 24; +} + +addFormatToken('H', ['HH', 2], 0, 'hour'); +addFormatToken('h', ['hh', 2], 0, hFormat); +addFormatToken('k', ['kk', 2], 0, kFormat); + +addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); +}); + +addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); +}); + +addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); +}); + +addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); +}); + +function meridiem (token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); +} + +meridiem('a', true); +meridiem('A', false); + +// ALIASES + +addUnitAlias('hour', 'h'); + +// PRIORITY +addUnitPriority('hour', 13); + +// PARSING + +function matchMeridiem (isStrict, locale) { + return locale._meridiemParse; +} + +addRegexToken('a', matchMeridiem); +addRegexToken('A', matchMeridiem); +addRegexToken('H', match1to2); +addRegexToken('h', match1to2); +addRegexToken('k', match1to2); +addRegexToken('HH', match1to2, match2); +addRegexToken('hh', match1to2, match2); +addRegexToken('kk', match1to2, match2); + +addRegexToken('hmm', match3to4); +addRegexToken('hmmss', match5to6); +addRegexToken('Hmm', match3to4); +addRegexToken('Hmmss', match5to6); + +addParseToken(['H', 'HH'], HOUR); +addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; +}); +addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; +}); +addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; +}); +addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; +}); +addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; +}); +addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); +}); +addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); +}); + +// LOCALES + +function localeIsPM (input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return ((input + '').toLowerCase().charAt(0) === 'p'); +} + +var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; +function localeMeridiem (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } +} + + +// MOMENTS + +// Setting the hour should keep the time, because the user explicitly +// specified which hour he wants. So trying to maintain the same hour (in +// a new timezone) makes sense. Adding/subtracting hours does not follow +// this rule. +var getSetHour = makeGetSet('Hours', true); + +// months +// week +// weekdays +// meridiem +var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse +}; + +// internal storage for locale config files +var locales = {}; +var localeFamilies = {}; +var globalLocale; + +function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; +} + +// pick the locale from the array +// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each +// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root +function chooseLocale(names) { + var i = 0, j, next, locale, split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return null; +} + +function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && (typeof module !== 'undefined') && + module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = require; + !(function webpackMissingModule() { var e = new Error("Cannot find module \"./locale\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + return locales[name]; +} + +// This function will load locale and then set the global locale. If +// no arguments are passed in, it will simply return the current global +// locale key. +function getSetGlobalLocale (key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } + else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + } + + return globalLocale._abbr; +} + +function defineLocale (name, config) { + if (config !== null) { + var parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } +} + +function updateLocale(name, config) { + if (config != null) { + var locale, parentConfig = baseConfig; + // MERGE + if (locales[name] != null) { + parentConfig = locales[name]._config; + } + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; +} + +// returns locale data +function getLocale (key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); +} + +function listLocales() { + return keys(locales); +} + +function checkOverflow (m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : + -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; +} + +// Pick the first defined of two or three arguments. +function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; +} + +function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; +} + +// convert an array to a date. +// the array should mirror the parameters below +// note: all values past the year are optional and will default to the lowest possible value. +// [year, month, day , hour, minute, second, millisecond] +function configFromArray (config) { + var i, date, input = [], currentDate, yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if (config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) { + getParsingFlags(config).weekdayMismatch = true; + } +} + +function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + var curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from begining of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to begining of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } +} + +// iso 8601 regex +// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) +var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; +var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + +var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + +var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/] +]; + +// iso time formats and regexes +var isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/] +]; + +var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; + +// date from iso format +function configFromISO(config) { + var i, l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, dateFormat, timeFormat, tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } +} + +// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 +var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + +function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10) + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; +} + +function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; +} + +function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim(); +} + +function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; +} + +var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 +}; + +function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, h = (hm - m) / 100; + return h * 60 + m; + } +} + +// date and time from ref 2822 format +function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } +} + +// date from iso format or fallback +function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); +} + +hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } +); + +// constant that refers to the ISO standard +hooks.ISO_8601 = function () {}; + +// constant that refers to the RFC 2822 form +hooks.RFC_2822 = function () {}; + +// date from string and format string +function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, parsedInput, tokens, token, skipped, + stringLength = string.length, + totalParsedInputLength = 0; + + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; + // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } + else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } + else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if (config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + + configFromArray(config); + checkOverflow(config); +} + + +function meridiemFixWrap (locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } +} + +// date from string and array of format strings +function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + + scoreToBeat, + i, + currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); +} + +function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + + configFromArray(config); +} + +function createFromConfig (config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; +} + +function prepareConfig (config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({nullInput: true}); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; +} + +function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } +} + +function createLocalOrUTC (input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ((isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0)) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); +} + +function createLocal (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); +} + +var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } +); + +var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } +); + +// Pick a moment m from moments so that m[fn](other) is true for all +// other. This relies on the function fn to be transitive. +// +// moments should either be an array of moment objects or an array, whose +// first element is an array of moment objects. +function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; +} + +// TODO: Use [].sort instead? +function min () { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); +} + +function max () { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); +} + +var now = function () { + return Date.now ? Date.now() : +(new Date()); +}; + +var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + +function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; +} + +function isValid$1() { + return this._isValid; +} + +function createInvalid$1() { + return createDuration(NaN); +} + +function Duration (duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + + quarters * 3 + + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); +} + +function isDuration (obj) { + return obj instanceof Duration; +} + +function absRound (number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } +} + +// FORMATTING + +function offset (token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); + }); +} + +offset('Z', ':'); +offset('ZZ', ''); + +// PARSING + +addRegexToken('Z', matchShortOffset); +addRegexToken('ZZ', matchShortOffset); +addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); +}); + +// HELPERS + +// timezone chunker +// '+10:00' > ['10', '00'] +// '-1530' > ['-15', '30'] +var chunkOffset = /([\+\-]|\d\d)/gi; + +function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? + 0 : + parts[0] === '+' ? minutes : -minutes; +} + +// Return a moment from input, that is local/utc/zone equivalent to model. +function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } +} + +function getDateOffset (m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; +} + +// HOOKS + +// This function will be called whenever a moment is mutated. +// It is intended to keep the offset in sync with the timezone. +hooks.updateOffset = function () {}; + +// MOMENTS + +// keepLocalTime = true means only change the timezone, without +// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> +// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset +// +0200, so we adjust the time as needed, to be valid. +// +// Keeping the time actually adds/subtracts (one hour) +// from the actual represented time. That is why we call updateOffset +// a second time. In case it wants us to change the offset again +// _changeInProgress == true case, then we have to adjust, because +// there is no such time in the given timezone. +function getSetOffset (input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } +} + +function getSetZone (input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } +} + +function setOffsetToUTC (keepLocalTime) { + return this.utcOffset(0, keepLocalTime); +} + +function setOffsetToLocal (keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; +} + +function setOffsetToParsedOffset () { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } + else { + this.utcOffset(0, true); + } + } + return this; +} + +function hasAlignedHourOffset (input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; +} + +function isDaylightSavingTime () { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); +} + +function isDaylightSavingTimeShifted () { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && + compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; +} + +function isLocal () { + return this.isValid() ? !this._isUTC : false; +} + +function isUtcOffset () { + return this.isValid() ? this._isUTC : false; +} + +function isUtc () { + return this.isValid() ? this._isUTC && this._offset === 0 : false; +} + +// ASP.NET json date format regex +var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; + +// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html +// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere +// and further modified to allow for strings containing both week and day +var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + +function createDuration (input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms : input._milliseconds, + d : input._days, + M : input._months + }; + } else if (isNumber(input)) { + duration = {}; + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : 0, + d : toInt(match[DATE]) * sign, + h : toInt(match[HOUR]) * sign, + m : toInt(match[MINUTE]) * sign, + s : toInt(match[SECOND]) * sign, + ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1; + duration = { + y : parseIso(match[2], sign), + M : parseIso(match[3], sign), + w : parseIso(match[4], sign), + d : parseIso(match[5], sign), + h : parseIso(match[6], sign), + m : parseIso(match[7], sign), + s : parseIso(match[8], sign) + }; + } else if (duration == null) {// checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; +} + +createDuration.fn = Duration.prototype; +createDuration.invalid = createInvalid$1; + +function parseIso (inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; +} + +function positiveMomentsDifference(base, other) { + var res = {milliseconds: 0, months: 0}; + + res.months = other.month() - base.month() + + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +(base.clone().add(res.months, 'M')); + + return res; +} + +function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return {milliseconds: 0, months: 0}; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; +} + +// TODO: remove 'name' arg after deprecation is removed +function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; val = period; period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; +} + +function addSubtract (mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } +} + +var add = createAdder(1, 'add'); +var subtract = createAdder(-1, 'subtract'); + +function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : + diff < -1 ? 'lastWeek' : + diff < 0 ? 'lastDay' : + diff < 1 ? 'sameDay' : + diff < 2 ? 'nextDay' : + diff < 7 ? 'nextWeek' : 'sameElse'; +} + +function calendar$1 (time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); +} + +function clone () { + return new Moment(this); +} + +function isAfter (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } +} + +function isBefore (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } +} + +function isBetween (from, to, units, inclusivity) { + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && + (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units)); +} + +function isSame (input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units || 'millisecond'); + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } +} + +function isSameOrAfter (input, units) { + return this.isSame(input, units) || this.isAfter(input,units); +} + +function isSameOrBefore (input, units) { + return this.isSame(input, units) || this.isBefore(input,units); +} + +function diff (input, units, asFloat) { + var that, + zoneDelta, + delta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': output = monthDiff(this, that) / 12; break; + case 'month': output = monthDiff(this, that); break; + case 'quarter': output = monthDiff(this, that) / 3; break; + case 'second': output = (this - that) / 1e3; break; // 1000 + case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 + case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 + case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst + case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: output = this - that; + } + + return asFloat ? output : absFloor(output); +} + +function monthDiff (a, b) { + // difference in months + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; +} + +hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; +hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + +function toString () { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); +} + +function toISOString() { + if (!this.isValid()) { + return null; + } + var m = this.clone().utc(); + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + return this.toDate().toISOString(); + } + return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); +} + +/** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ +function inspect () { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment'; + var zone = ''; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + var prefix = '[' + func + '("]'; + var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); +} + +function format (inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); +} + +function from (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } +} + +function fromNow (withoutSuffix) { + return this.from(createLocal(), withoutSuffix); +} + +function to (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } +} + +function toNow (withoutSuffix) { + return this.to(createLocal(), withoutSuffix); +} + +// If passed a locale key, it will set the locale for this +// instance. Otherwise, it will return the locale configuration +// variables for this instance. +function locale (key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } +} + +var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } +); + +function localeData () { + return this._locale; +} + +function startOf (units) { + units = normalizeUnits(units); + // the following switch intentionally omits break keywords + // to utilize falling through the cases. + switch (units) { + case 'year': + this.month(0); + /* falls through */ + case 'quarter': + case 'month': + this.date(1); + /* falls through */ + case 'week': + case 'isoWeek': + case 'day': + case 'date': + this.hours(0); + /* falls through */ + case 'hour': + this.minutes(0); + /* falls through */ + case 'minute': + this.seconds(0); + /* falls through */ + case 'second': + this.milliseconds(0); + } + + // weeks are a special case + if (units === 'week') { + this.weekday(0); + } + if (units === 'isoWeek') { + this.isoWeekday(1); + } + + // quarters are also special + if (units === 'quarter') { + this.month(Math.floor(this.month() / 3) * 3); + } + + return this; +} + +function endOf (units) { + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond') { + return this; + } + + // 'date' is an alias for 'day', so it should be considered as such. + if (units === 'date') { + units = 'day'; + } + + return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); +} + +function valueOf () { + return this._d.valueOf() - ((this._offset || 0) * 60000); +} + +function unix () { + return Math.floor(this.valueOf() / 1000); +} + +function toDate () { + return new Date(this.valueOf()); +} + +function toArray () { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; +} + +function toObject () { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; +} + +function toJSON () { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; +} + +function isValid$2 () { + return isValid(this); +} + +function parsingFlags () { + return extend({}, getParsingFlags(this)); +} + +function invalidAt () { + return getParsingFlags(this).overflow; +} + +function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; +} + +// FORMATTING + +addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; +}); + +addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; +}); + +function addWeekYearFormatToken (token, getter) { + addFormatToken(0, [token, token.length], 0, getter); +} + +addWeekYearFormatToken('gggg', 'weekYear'); +addWeekYearFormatToken('ggggg', 'weekYear'); +addWeekYearFormatToken('GGGG', 'isoWeekYear'); +addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + +// ALIASES + +addUnitAlias('weekYear', 'gg'); +addUnitAlias('isoWeekYear', 'GG'); + +// PRIORITY + +addUnitPriority('weekYear', 1); +addUnitPriority('isoWeekYear', 1); + + +// PARSING + +addRegexToken('G', matchSigned); +addRegexToken('g', matchSigned); +addRegexToken('GG', match1to2, match2); +addRegexToken('gg', match1to2, match2); +addRegexToken('GGGG', match1to4, match4); +addRegexToken('gggg', match1to4, match4); +addRegexToken('GGGGG', match1to6, match6); +addRegexToken('ggggg', match1to6, match6); + +addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); +}); + +addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); +}); + +// MOMENTS + +function getSetWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy); +} + +function getSetISOWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, this.isoWeek(), this.isoWeekday(), 1, 4); +} + +function getISOWeeksInYear () { + return weeksInYear(this.year(), 1, 4); +} + +function getWeeksInYear () { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); +} + +function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } +} + +function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; +} + +// FORMATTING + +addFormatToken('Q', 0, 'Qo', 'quarter'); + +// ALIASES + +addUnitAlias('quarter', 'Q'); + +// PRIORITY + +addUnitPriority('quarter', 7); + +// PARSING + +addRegexToken('Q', match1); +addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; +}); + +// MOMENTS + +function getSetQuarter (input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); +} + +// FORMATTING + +addFormatToken('D', ['DD', 2], 'Do', 'date'); + +// ALIASES + +addUnitAlias('date', 'D'); + +// PRIOROITY +addUnitPriority('date', 9); + +// PARSING + +addRegexToken('D', match1to2); +addRegexToken('DD', match1to2, match2); +addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? + (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : + locale._dayOfMonthOrdinalParseLenient; +}); + +addParseToken(['D', 'DD'], DATE); +addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0], 10); +}); + +// MOMENTS + +var getSetDayOfMonth = makeGetSet('Date', true); + +// FORMATTING + +addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + +// ALIASES + +addUnitAlias('dayOfYear', 'DDD'); + +// PRIORITY +addUnitPriority('dayOfYear', 4); + +// PARSING + +addRegexToken('DDD', match1to3); +addRegexToken('DDDD', match3); +addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); +}); + +// HELPERS + +// MOMENTS + +function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); +} + +// FORMATTING + +addFormatToken('m', ['mm', 2], 0, 'minute'); + +// ALIASES + +addUnitAlias('minute', 'm'); + +// PRIORITY + +addUnitPriority('minute', 14); + +// PARSING + +addRegexToken('m', match1to2); +addRegexToken('mm', match1to2, match2); +addParseToken(['m', 'mm'], MINUTE); + +// MOMENTS + +var getSetMinute = makeGetSet('Minutes', false); + +// FORMATTING + +addFormatToken('s', ['ss', 2], 0, 'second'); + +// ALIASES + +addUnitAlias('second', 's'); + +// PRIORITY + +addUnitPriority('second', 15); + +// PARSING + +addRegexToken('s', match1to2); +addRegexToken('ss', match1to2, match2); +addParseToken(['s', 'ss'], SECOND); + +// MOMENTS + +var getSetSecond = makeGetSet('Seconds', false); + +// FORMATTING + +addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); +}); + +addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); +}); + +addFormatToken(0, ['SSS', 3], 0, 'millisecond'); +addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; +}); +addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; +}); +addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; +}); +addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; +}); +addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; +}); +addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; +}); + + +// ALIASES + +addUnitAlias('millisecond', 'ms'); + +// PRIORITY + +addUnitPriority('millisecond', 16); + +// PARSING + +addRegexToken('S', match1to3, match1); +addRegexToken('SS', match1to3, match2); +addRegexToken('SSS', match1to3, match3); + +var token; +for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); +} + +function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); +} + +for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); +} +// MOMENTS + +var getSetMillisecond = makeGetSet('Milliseconds', false); + +// FORMATTING + +addFormatToken('z', 0, 0, 'zoneAbbr'); +addFormatToken('zz', 0, 0, 'zoneName'); + +// MOMENTS + +function getZoneAbbr () { + return this._isUTC ? 'UTC' : ''; +} + +function getZoneName () { + return this._isUTC ? 'Coordinated Universal Time' : ''; +} + +var proto = Moment.prototype; + +proto.add = add; +proto.calendar = calendar$1; +proto.clone = clone; +proto.diff = diff; +proto.endOf = endOf; +proto.format = format; +proto.from = from; +proto.fromNow = fromNow; +proto.to = to; +proto.toNow = toNow; +proto.get = stringGet; +proto.invalidAt = invalidAt; +proto.isAfter = isAfter; +proto.isBefore = isBefore; +proto.isBetween = isBetween; +proto.isSame = isSame; +proto.isSameOrAfter = isSameOrAfter; +proto.isSameOrBefore = isSameOrBefore; +proto.isValid = isValid$2; +proto.lang = lang; +proto.locale = locale; +proto.localeData = localeData; +proto.max = prototypeMax; +proto.min = prototypeMin; +proto.parsingFlags = parsingFlags; +proto.set = stringSet; +proto.startOf = startOf; +proto.subtract = subtract; +proto.toArray = toArray; +proto.toObject = toObject; +proto.toDate = toDate; +proto.toISOString = toISOString; +proto.inspect = inspect; +proto.toJSON = toJSON; +proto.toString = toString; +proto.unix = unix; +proto.valueOf = valueOf; +proto.creationData = creationData; + +// Year +proto.year = getSetYear; +proto.isLeapYear = getIsLeapYear; + +// Week Year +proto.weekYear = getSetWeekYear; +proto.isoWeekYear = getSetISOWeekYear; + +// Quarter +proto.quarter = proto.quarters = getSetQuarter; + +// Month +proto.month = getSetMonth; +proto.daysInMonth = getDaysInMonth; + +// Week +proto.week = proto.weeks = getSetWeek; +proto.isoWeek = proto.isoWeeks = getSetISOWeek; +proto.weeksInYear = getWeeksInYear; +proto.isoWeeksInYear = getISOWeeksInYear; + +// Day +proto.date = getSetDayOfMonth; +proto.day = proto.days = getSetDayOfWeek; +proto.weekday = getSetLocaleDayOfWeek; +proto.isoWeekday = getSetISODayOfWeek; +proto.dayOfYear = getSetDayOfYear; + +// Hour +proto.hour = proto.hours = getSetHour; + +// Minute +proto.minute = proto.minutes = getSetMinute; + +// Second +proto.second = proto.seconds = getSetSecond; + +// Millisecond +proto.millisecond = proto.milliseconds = getSetMillisecond; + +// Offset +proto.utcOffset = getSetOffset; +proto.utc = setOffsetToUTC; +proto.local = setOffsetToLocal; +proto.parseZone = setOffsetToParsedOffset; +proto.hasAlignedHourOffset = hasAlignedHourOffset; +proto.isDST = isDaylightSavingTime; +proto.isLocal = isLocal; +proto.isUtcOffset = isUtcOffset; +proto.isUtc = isUtc; +proto.isUTC = isUtc; + +// Timezone +proto.zoneAbbr = getZoneAbbr; +proto.zoneName = getZoneName; + +// Deprecations +proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); +proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); +proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); +proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); +proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + +function createUnix (input) { + return createLocal(input * 1000); +} + +function createInZone () { + return createLocal.apply(null, arguments).parseZone(); +} + +function preParsePostFormat (string) { + return string; +} + +var proto$1 = Locale.prototype; + +proto$1.calendar = calendar; +proto$1.longDateFormat = longDateFormat; +proto$1.invalidDate = invalidDate; +proto$1.ordinal = ordinal; +proto$1.preparse = preParsePostFormat; +proto$1.postformat = preParsePostFormat; +proto$1.relativeTime = relativeTime; +proto$1.pastFuture = pastFuture; +proto$1.set = set; + +// Month +proto$1.months = localeMonths; +proto$1.monthsShort = localeMonthsShort; +proto$1.monthsParse = localeMonthsParse; +proto$1.monthsRegex = monthsRegex; +proto$1.monthsShortRegex = monthsShortRegex; + +// Week +proto$1.week = localeWeek; +proto$1.firstDayOfYear = localeFirstDayOfYear; +proto$1.firstDayOfWeek = localeFirstDayOfWeek; + +// Day of Week +proto$1.weekdays = localeWeekdays; +proto$1.weekdaysMin = localeWeekdaysMin; +proto$1.weekdaysShort = localeWeekdaysShort; +proto$1.weekdaysParse = localeWeekdaysParse; + +proto$1.weekdaysRegex = weekdaysRegex; +proto$1.weekdaysShortRegex = weekdaysShortRegex; +proto$1.weekdaysMinRegex = weekdaysMinRegex; + +// Hours +proto$1.isPM = localeIsPM; +proto$1.meridiem = localeMeridiem; + +function get$1 (format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); +} + +function listMonthsImpl (format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + return out; +} + +// () +// (5) +// (fmt, 5) +// (fmt) +// (true) +// (true, 5) +// (true, fmt, 5) +// (true, fmt) +function listWeekdaysImpl (localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + return out; +} + +function listMonths (format, index) { + return listMonthsImpl(format, index, 'months'); +} + +function listMonthsShort (format, index) { + return listMonthsImpl(format, index, 'monthsShort'); +} + +function listWeekdays (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); +} + +function listWeekdaysShort (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); +} + +function listWeekdaysMin (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); +} + +getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (toInt(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } +}); + +// Side effect imports +hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); +hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + +var mathAbs = Math.abs; + +function abs () { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; +} + +function addSubtract$1 (duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); +} + +// supports only 2.0-style add(1, 's') or add(duration) +function add$1 (input, value) { + return addSubtract$1(this, input, value, 1); +} + +// supports only 2.0-style subtract(1, 's') or subtract(duration) +function subtract$1 (input, value) { + return addSubtract$1(this, input, value, -1); +} + +function absCeil (number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } +} + +function bubble () { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if (!((milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0))) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; +} + +function daysToMonths (days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; +} + +function monthsToDays (months) { + // the reverse of daysToMonths + return months * 146097 / 4800; +} + +function as (units) { + if (!this.isValid()) { + return NaN; + } + var days; + var months; + var milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + return units === 'month' ? months : months / 12; + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week' : return days / 7 + milliseconds / 6048e5; + case 'day' : return days + milliseconds / 864e5; + case 'hour' : return days * 24 + milliseconds / 36e5; + case 'minute' : return days * 1440 + milliseconds / 6e4; + case 'second' : return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': return Math.floor(days * 864e5) + milliseconds; + default: throw new Error('Unknown unit ' + units); + } + } +} + +// TODO: Use this.as('ms')? +function valueOf$1 () { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); +} + +function makeAs (alias) { + return function () { + return this.as(alias); + }; +} + +var asMilliseconds = makeAs('ms'); +var asSeconds = makeAs('s'); +var asMinutes = makeAs('m'); +var asHours = makeAs('h'); +var asDays = makeAs('d'); +var asWeeks = makeAs('w'); +var asMonths = makeAs('M'); +var asYears = makeAs('y'); + +function clone$1 () { + return createDuration(this); +} + +function get$2 (units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; +} + +function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; +} + +var milliseconds = makeGetter('milliseconds'); +var seconds = makeGetter('seconds'); +var minutes = makeGetter('minutes'); +var hours = makeGetter('hours'); +var days = makeGetter('days'); +var months = makeGetter('months'); +var years = makeGetter('years'); + +function weeks () { + return absFloor(this.days() / 7); +} + +var round = Math.round; +var thresholds = { + ss: 44, // a few seconds to seconds + s : 45, // seconds to minute + m : 45, // minutes to hour + h : 22, // hours to day + d : 26, // days to month + M : 11 // months to year +}; + +// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize +function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); +} + +function relativeTime$1 (posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + + var a = seconds <= thresholds.ss && ['s', seconds] || + seconds < thresholds.s && ['ss', seconds] || + minutes <= 1 && ['m'] || + minutes < thresholds.m && ['mm', minutes] || + hours <= 1 && ['h'] || + hours < thresholds.h && ['hh', hours] || + days <= 1 && ['d'] || + days < thresholds.d && ['dd', days] || + months <= 1 && ['M'] || + months < thresholds.M && ['MM', months] || + years <= 1 && ['y'] || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); +} + +// This function allows you to set the rounding function for relative time strings +function getSetRelativeTimeRounding (roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof(roundingFunction) === 'function') { + round = roundingFunction; + return true; + } + return false; +} + +// This function allows you to set a threshold for relative time strings +function getSetRelativeTimeThreshold (threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; +} + +function humanize (withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); +} + +var abs$1 = Math.abs; + +function sign(x) { + return ((x > 0) - (x < 0)) || +x; +} + +function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return totalSign + 'P' + + (Y ? ymSign + Y + 'Y' : '') + + (M ? ymSign + M + 'M' : '') + + (D ? daysSign + D + 'D' : '') + + ((h || m || s) ? 'T' : '') + + (h ? hmsSign + h + 'H' : '') + + (m ? hmsSign + m + 'M' : '') + + (s ? hmsSign + s + 'S' : ''); +} + +var proto$2 = Duration.prototype; + +proto$2.isValid = isValid$1; +proto$2.abs = abs; +proto$2.add = add$1; +proto$2.subtract = subtract$1; +proto$2.as = as; +proto$2.asMilliseconds = asMilliseconds; +proto$2.asSeconds = asSeconds; +proto$2.asMinutes = asMinutes; +proto$2.asHours = asHours; +proto$2.asDays = asDays; +proto$2.asWeeks = asWeeks; +proto$2.asMonths = asMonths; +proto$2.asYears = asYears; +proto$2.valueOf = valueOf$1; +proto$2._bubble = bubble; +proto$2.clone = clone$1; +proto$2.get = get$2; +proto$2.milliseconds = milliseconds; +proto$2.seconds = seconds; +proto$2.minutes = minutes; +proto$2.hours = hours; +proto$2.days = days; +proto$2.weeks = weeks; +proto$2.months = months; +proto$2.years = years; +proto$2.humanize = humanize; +proto$2.toISOString = toISOString$1; +proto$2.toString = toISOString$1; +proto$2.toJSON = toISOString$1; +proto$2.locale = locale; +proto$2.localeData = localeData; + +// Deprecations +proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); +proto$2.lang = lang; + +// Side effect imports + +// FORMATTING + +addFormatToken('X', 0, 0, 'unix'); +addFormatToken('x', 0, 0, 'valueOf'); + +// PARSING + +addRegexToken('x', matchSigned); +addRegexToken('X', matchTimestamp); +addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); +}); +addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); +}); + +// Side effect imports + + +hooks.version = '2.19.1'; + +setHookCallback(createLocal); + +hooks.fn = proto; +hooks.min = min; +hooks.max = max; +hooks.now = now; +hooks.utc = createUTC; +hooks.unix = createUnix; +hooks.months = listMonths; +hooks.isDate = isDate; +hooks.locale = getSetGlobalLocale; +hooks.invalid = createInvalid; +hooks.duration = createDuration; +hooks.isMoment = isMoment; +hooks.weekdays = listWeekdays; +hooks.parseZone = createInZone; +hooks.localeData = getLocale; +hooks.isDuration = isDuration; +hooks.monthsShort = listMonthsShort; +hooks.weekdaysMin = listWeekdaysMin; +hooks.defineLocale = defineLocale; +hooks.updateLocale = updateLocale; +hooks.locales = listLocales; +hooks.weekdaysShort = listWeekdaysShort; +hooks.normalizeUnits = normalizeUnits; +hooks.relativeTimeRounding = getSetRelativeTimeRounding; +hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; +hooks.calendarFormat = getCalendarFormat; +hooks.prototype = proto; + +return hooks; + +}))); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(155)(module))) + +/***/ }), +/* 155 */ +/***/ (function(module, exports) { + +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 156 */ +/***/ (function(module, exports) { + +function webpackEmptyContext(req) { + throw new Error("Cannot find module '" + req + "'."); +} +webpackEmptyContext.keys = function() { return []; }; +webpackEmptyContext.resolve = webpackEmptyContext; +module.exports = webpackEmptyContext; +webpackEmptyContext.id = 156; + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { + +/* eslint-disable require-jsdoc */ + +var _rng; + +var globalVar = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : null; + +if (globalVar && globalVar.crypto && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + _rng = function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; +} + +if (!_rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + _rng = function _rng() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; +} + +// uuid.js +// +// Copyright (c) 2010-2012 Robert Kieffer +// MIT License - http://opensource.org/licenses/mit-license.php + +// Unique ID creation requires a high quality random # generator. We feature +// detect to determine the best RNG source, normalizing to a function that +// returns 128-bits of randomness, since that's what's usually required + +//var _rng = require('./rng'); + +// Maps for number <-> hex string conversion +var _byteToHex = []; +var _hexToByte = {}; +for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; +} + +// **`parse()` - Parse a UUID into it's component bytes** +function parse(s, buf, offset) { + var i = buf && offset || 0, + ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function (oct) { + if (ii < 16) { + // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; +} + +// **`unparse()` - Convert UUID byte array (ala parse()) into a string** +function unparse(buf, offset) { + var i = offset || 0, + bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; +} + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +// random #'s we need to init node and clockseq +var _seedBytes = _rng(); + +// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) +var _nodeId = [_seedBytes[0] | 0x01, _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]]; + +// Per 4.2.2, randomize (14 bit) clockseq +var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + +// Previous uuid creation time +var _lastMSecs = 0, + _lastNSecs = 0; + +// See https://github.com/broofa/node-uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); +} + +// **`v4()` - Generate random UUID** + +// See https://github.com/broofa/node-uuid for API details +function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof options == 'string') { + buf = options == 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); +} + +// Export public API +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; +uuid.parse = parse; +uuid.unparse = unparse; + +module.exports = uuid; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(158))) + +/***/ }), +/* 158 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// utils +exports.util = __webpack_require__(2); +exports.DOMutil = __webpack_require__(14); + +// data +exports.DataSet = __webpack_require__(11); +exports.DataView = __webpack_require__(12); +exports.Queue = __webpack_require__(43); + +// Graph3d +exports.Graph3d = __webpack_require__(161); +exports.graph3d = { + Camera: __webpack_require__(95), + Filter: __webpack_require__(96), + Point2d: __webpack_require__(91), + Point3d: __webpack_require__(34), + Slider: __webpack_require__(92), + StepNumber: __webpack_require__(93) +}; + +// bundled external libraries +exports.moment = __webpack_require__(9); +exports.Hammer = __webpack_require__(10); +exports.keycharm = __webpack_require__(35); + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(7); +var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); +module.exports = function stringify(it) { // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assign = __webpack_require__(90); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Emitter = __webpack_require__(44); +var util = __webpack_require__(2); +var Point3d = __webpack_require__(34); +var Point2d = __webpack_require__(91); +var Slider = __webpack_require__(92); +var StepNumber = __webpack_require__(93); +var Settings = __webpack_require__(94); +var Validator = __webpack_require__(15)['default']; + +var _require = __webpack_require__(15), + printStyle = _require.printStyle; + +var _require2 = __webpack_require__(172), + allOptions = _require2.allOptions; + +var DataGroup = __webpack_require__(173); + +/// enumerate the available styles +Graph3d.STYLE = Settings.STYLE; + +/** + * Following label is used in the settings to describe values which should be + * determined by the code while running, from the current data and graph style. + * + * Using 'undefined' directly achieves the same thing, but this is more + * descriptive by describing the intent. + */ +var autoByDefault = undefined; + +/** + * Default values for option settings. + * + * These are the values used when a Graph3d instance is initialized without + * custom settings. + * + * If a field is not in this list, a default value of 'autoByDefault' is assumed, + * which is just an alias for 'undefined'. + */ +Graph3d.DEFAULTS = { + width: '400px', + height: '400px', + filterLabel: 'time', + legendLabel: 'value', + xLabel: 'x', + yLabel: 'y', + zLabel: 'z', + xValueLabel: function xValueLabel(v) { + return v; + }, + yValueLabel: function yValueLabel(v) { + return v; + }, + zValueLabel: function zValueLabel(v) { + return v; + }, + showXAxis: true, + showYAxis: true, + showZAxis: true, + showGrid: true, + showPerspective: true, + showShadow: false, + keepAspectRatio: true, + verticalRatio: 0.5, // 0.1 to 1.0, where 1.0 results in a 'cube' + + dotSizeRatio: 0.02, // size of the dots as a fraction of the graph width + dotSizeMinFraction: 0.5, // size of min-value dot as a fraction of dotSizeRatio + dotSizeMaxFraction: 2.5, // size of max-value dot as a fraction of dotSizeRatio + + showAnimationControls: autoByDefault, + animationInterval: 1000, // milliseconds + animationPreload: false, + animationAutoStart: autoByDefault, + + axisColor: '#4D4D4D', + gridColor: '#D3D3D3', + xCenter: '55%', + yCenter: '50%', + + style: Graph3d.STYLE.DOT, + tooltip: false, + + tooltipStyle: { + content: { + padding: '10px', + border: '1px solid #4d4d4d', + color: '#1a1a1a', + background: 'rgba(255,255,255,0.7)', + borderRadius: '2px', + boxShadow: '5px 5px 10px rgba(128,128,128,0.5)' + }, + line: { + height: '40px', + width: '0', + borderLeft: '1px solid #4d4d4d' + }, + dot: { + height: '0', + width: '0', + border: '5px solid #4d4d4d', + borderRadius: '5px' + } + }, + + dataColor: { + fill: '#7DC1FF', + stroke: '#3267D2', + strokeWidth: 1 // px + }, + + cameraPosition: { + horizontal: 1.0, + vertical: 0.5, + distance: 1.7 + }, + + /* + The following fields are 'auto by default', see above. + */ + showLegend: autoByDefault, // determined by graph style + backgroundColor: autoByDefault, + + xBarWidth: autoByDefault, + yBarWidth: autoByDefault, + valueMin: autoByDefault, + valueMax: autoByDefault, + xMin: autoByDefault, + xMax: autoByDefault, + xStep: autoByDefault, + yMin: autoByDefault, + yMax: autoByDefault, + yStep: autoByDefault, + zMin: autoByDefault, + zMax: autoByDefault, + zStep: autoByDefault +}; + +// ----------------------------------------------------------------------------- +// Class Graph3d +// ----------------------------------------------------------------------------- + + +/** + * Graph3d displays data in 3d. + * + * Graph3d is developed in javascript as a Google Visualization Chart. + * + * @constructor Graph3d + * @param {Element} container The DOM element in which the Graph3d will + * be created. Normally a div element. + * @param {DataSet | DataView | Array} [data] + * @param {Object} [options] + */ +function Graph3d(container, data, options) { + if (!(this instanceof Graph3d)) { + throw new SyntaxError('Constructor must be called with the new operator'); + } + + // create variables and set default values + this.containerElement = container; + + this.dataGroup = new DataGroup(); + this.dataPoints = null; // The table with point objects + + // create a frame and canvas + this.create(); + + Settings.setDefaults(Graph3d.DEFAULTS, this); + + // the column indexes + this.colX = undefined; + this.colY = undefined; + this.colZ = undefined; + this.colValue = undefined; + + // TODO: customize axis range + + // apply options (also when undefined) + this.setOptions(options); + + // apply data + this.setData(data); +} + +// Extend Graph3d with an Emitter mixin +Emitter(Graph3d.prototype); + +/** + * Calculate the scaling values, dependent on the range in x, y, and z direction + */ +Graph3d.prototype._setScale = function () { + this.scale = new Point3d(1 / this.xRange.range(), 1 / this.yRange.range(), 1 / this.zRange.range()); + + // keep aspect ration between x and y scale if desired + if (this.keepAspectRatio) { + if (this.scale.x < this.scale.y) { + //noinspection JSSuspiciousNameCombination + this.scale.y = this.scale.x; + } else { + //noinspection JSSuspiciousNameCombination + this.scale.x = this.scale.y; + } + } + + // scale the vertical axis + this.scale.z *= this.verticalRatio; + // TODO: can this be automated? verticalRatio? + + // determine scale for (optional) value + if (this.valueRange !== undefined) { + this.scale.value = 1 / this.valueRange.range(); + } + + // position the camera arm + var xCenter = this.xRange.center() * this.scale.x; + var yCenter = this.yRange.center() * this.scale.y; + var zCenter = this.zRange.center() * this.scale.z; + this.camera.setArmLocation(xCenter, yCenter, zCenter); +}; + +/** + * Convert a 3D location to a 2D location on screen + * Source: ttp://en.wikipedia.org/wiki/3D_projection + * + * @param {Point3d} point3d A 3D point with parameters x, y, z + * @returns {Point2d} point2d A 2D point with parameters x, y + */ +Graph3d.prototype._convert3Dto2D = function (point3d) { + var translation = this._convertPointToTranslation(point3d); + return this._convertTranslationToScreen(translation); +}; + +/** + * Convert a 3D location its translation seen from the camera + * Source: http://en.wikipedia.org/wiki/3D_projection + * + * @param {Point3d} point3d A 3D point with parameters x, y, z + * @returns {Point3d} translation A 3D point with parameters x, y, z This is + * the translation of the point, seen from the + * camera. + */ +Graph3d.prototype._convertPointToTranslation = function (point3d) { + var cameraLocation = this.camera.getCameraLocation(), + cameraRotation = this.camera.getCameraRotation(), + ax = point3d.x * this.scale.x, + ay = point3d.y * this.scale.y, + az = point3d.z * this.scale.z, + cx = cameraLocation.x, + cy = cameraLocation.y, + cz = cameraLocation.z, + + + // calculate angles + sinTx = Math.sin(cameraRotation.x), + cosTx = Math.cos(cameraRotation.x), + sinTy = Math.sin(cameraRotation.y), + cosTy = Math.cos(cameraRotation.y), + sinTz = Math.sin(cameraRotation.z), + cosTz = Math.cos(cameraRotation.z), + + + // calculate translation + dx = cosTy * (sinTz * (ay - cy) + cosTz * (ax - cx)) - sinTy * (az - cz), + dy = sinTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) + cosTx * (cosTz * (ay - cy) - sinTz * (ax - cx)), + dz = cosTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) - sinTx * (cosTz * (ay - cy) - sinTz * (ax - cx)); + + return new Point3d(dx, dy, dz); +}; + +/** + * Convert a translation point to a point on the screen + * + * @param {Point3d} translation A 3D point with parameters x, y, z This is + * the translation of the point, seen from the + * camera. + * @returns {Point2d} point2d A 2D point with parameters x, y + */ +Graph3d.prototype._convertTranslationToScreen = function (translation) { + var ex = this.eye.x, + ey = this.eye.y, + ez = this.eye.z, + dx = translation.x, + dy = translation.y, + dz = translation.z; + + // calculate position on screen from translation + var bx; + var by; + if (this.showPerspective) { + bx = (dx - ex) * (ez / dz); + by = (dy - ey) * (ez / dz); + } else { + bx = dx * -(ez / this.camera.getArmLength()); + by = dy * -(ez / this.camera.getArmLength()); + } + + // shift and scale the point to the center of the screen + // use the width of the graph to scale both horizontally and vertically. + return new Point2d(this.currentXCenter + bx * this.frame.canvas.clientWidth, this.currentYCenter - by * this.frame.canvas.clientWidth); +}; + +/** + * Calculate the translations and screen positions of all points + * + * @param {Array.} points + * @private + */ +Graph3d.prototype._calcTranslations = function (points) { + for (var i = 0; i < points.length; i++) { + var point = points[i]; + point.trans = this._convertPointToTranslation(point.point); + point.screen = this._convertTranslationToScreen(point.trans); + + // calculate the translation of the point at the bottom (needed for sorting) + var transBottom = this._convertPointToTranslation(point.bottom); + point.dist = this.showPerspective ? transBottom.length() : -transBottom.z; + } + + // sort the points on depth of their (x,y) position (not on z) + var sortDepth = function sortDepth(a, b) { + return b.dist - a.dist; + }; + points.sort(sortDepth); +}; + +/** + * Transfer min/max values to the Graph3d instance. + */ +Graph3d.prototype._initializeRanges = function () { + // TODO: later on, all min/maxes of all datagroups will be combined here + var dg = this.dataGroup; + this.xRange = dg.xRange; + this.yRange = dg.yRange; + this.zRange = dg.zRange; + this.valueRange = dg.valueRange; + + // Values currently needed but which need to be sorted out for + // the multiple graph case. + this.xStep = dg.xStep; + this.yStep = dg.yStep; + this.zStep = dg.zStep; + this.xBarWidth = dg.xBarWidth; + this.yBarWidth = dg.yBarWidth; + this.colX = dg.colX; + this.colY = dg.colY; + this.colZ = dg.colZ; + this.colValue = dg.colValue; + + // set the scale dependent on the ranges. + this._setScale(); +}; + +/** + * Return all data values as a list of Point3d objects + * + * @param {vis.DataSet} data + * @returns {Array.} + */ +Graph3d.prototype.getDataPoints = function (data) { + var dataPoints = []; + + for (var i = 0; i < data.length; i++) { + var point = new Point3d(); + point.x = data[i][this.colX] || 0; + point.y = data[i][this.colY] || 0; + point.z = data[i][this.colZ] || 0; + point.data = data[i]; + + if (this.colValue !== undefined) { + point.value = data[i][this.colValue] || 0; + } + + var obj = {}; + obj.point = point; + obj.bottom = new Point3d(point.x, point.y, this.zRange.min); + obj.trans = undefined; + obj.screen = undefined; + + dataPoints.push(obj); + } + + return dataPoints; +}; + +/** + * Filter the data based on the current filter + * + * @param {Array} data + * @returns {Array} dataPoints Array with point objects which can be drawn on + * screen + */ +Graph3d.prototype._getDataPoints = function (data) { + // TODO: store the created matrix dataPoints in the filters instead of + // reloading each time. + var x, y, i, obj; + + var dataPoints = []; + + if (this.style === Graph3d.STYLE.GRID || this.style === Graph3d.STYLE.SURFACE) { + // copy all values from the data table to a matrix + // the provided values are supposed to form a grid of (x,y) positions + + // create two lists with all present x and y values + var dataX = this.dataGroup.getDistinctValues(this.colX, data); + var dataY = this.dataGroup.getDistinctValues(this.colY, data); + + dataPoints = this.getDataPoints(data); + + // create a grid, a 2d matrix, with all values. + var dataMatrix = []; // temporary data matrix + for (i = 0; i < dataPoints.length; i++) { + obj = dataPoints[i]; + + // TODO: implement Array().indexOf() for Internet Explorer + var xIndex = dataX.indexOf(obj.point.x); + var yIndex = dataY.indexOf(obj.point.y); + + if (dataMatrix[xIndex] === undefined) { + dataMatrix[xIndex] = []; + } + + dataMatrix[xIndex][yIndex] = obj; + } + + // fill in the pointers to the neighbors. + for (x = 0; x < dataMatrix.length; x++) { + for (y = 0; y < dataMatrix[x].length; y++) { + if (dataMatrix[x][y]) { + dataMatrix[x][y].pointRight = x < dataMatrix.length - 1 ? dataMatrix[x + 1][y] : undefined; + dataMatrix[x][y].pointTop = y < dataMatrix[x].length - 1 ? dataMatrix[x][y + 1] : undefined; + dataMatrix[x][y].pointCross = x < dataMatrix.length - 1 && y < dataMatrix[x].length - 1 ? dataMatrix[x + 1][y + 1] : undefined; + } + } + } + } else { + // 'dot', 'dot-line', etc. + this._checkValueField(data); + dataPoints = this.getDataPoints(data); + + if (this.style === Graph3d.STYLE.LINE) { + // Add next member points for line drawing + for (i = 0; i < dataPoints.length; i++) { + if (i > 0) { + dataPoints[i - 1].pointNext = dataPoints[i]; + } + } + } + } + + return dataPoints; +}; + +/** + * Create the main frame for the Graph3d. + * + * This function is executed once when a Graph3d object is created. The frame + * contains a canvas, and this canvas contains all objects like the axis and + * nodes. + */ +Graph3d.prototype.create = function () { + // remove all elements from the container element. + while (this.containerElement.hasChildNodes()) { + this.containerElement.removeChild(this.containerElement.firstChild); + } + + this.frame = document.createElement('div'); + this.frame.style.position = 'relative'; + this.frame.style.overflow = 'hidden'; + + // create the graph canvas (HTML canvas element) + this.frame.canvas = document.createElement('canvas'); + this.frame.canvas.style.position = 'relative'; + this.frame.appendChild(this.frame.canvas); + //if (!this.frame.canvas.getContext) { + { + var noCanvas = document.createElement('DIV'); + noCanvas.style.color = 'red'; + noCanvas.style.fontWeight = 'bold'; + noCanvas.style.padding = '10px'; + noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; + this.frame.canvas.appendChild(noCanvas); + } + + this.frame.filter = document.createElement('div'); + this.frame.filter.style.position = 'absolute'; + this.frame.filter.style.bottom = '0px'; + this.frame.filter.style.left = '0px'; + this.frame.filter.style.width = '100%'; + this.frame.appendChild(this.frame.filter); + + // add event listeners to handle moving and zooming the contents + var me = this; + var onmousedown = function onmousedown(event) { + me._onMouseDown(event); + }; + var ontouchstart = function ontouchstart(event) { + me._onTouchStart(event); + }; + var onmousewheel = function onmousewheel(event) { + me._onWheel(event); + }; + var ontooltip = function ontooltip(event) { + me._onTooltip(event); + }; + var onclick = function onclick(event) { + me._onClick(event); + }; + // TODO: these events are never cleaned up... can give a 'memory leakage' + + util.addEventListener(this.frame.canvas, 'mousedown', onmousedown); + util.addEventListener(this.frame.canvas, 'touchstart', ontouchstart); + util.addEventListener(this.frame.canvas, 'mousewheel', onmousewheel); + util.addEventListener(this.frame.canvas, 'mousemove', ontooltip); + util.addEventListener(this.frame.canvas, 'click', onclick); + + // add the new graph to the container element + this.containerElement.appendChild(this.frame); +}; + +/** + * Set a new size for the graph + * + * @param {number} width + * @param {number} height + * @private + */ +Graph3d.prototype._setSize = function (width, height) { + this.frame.style.width = width; + this.frame.style.height = height; + + this._resizeCanvas(); +}; + +/** + * Resize the canvas to the current size of the frame + */ +Graph3d.prototype._resizeCanvas = function () { + this.frame.canvas.style.width = '100%'; + this.frame.canvas.style.height = '100%'; + + this.frame.canvas.width = this.frame.canvas.clientWidth; + this.frame.canvas.height = this.frame.canvas.clientHeight; + + // adjust with for margin + this.frame.filter.style.width = this.frame.canvas.clientWidth - 2 * 10 + 'px'; +}; + +/** + * Start playing the animation, if requested and filter present. Only applicable + * when animation data is available. + */ +Graph3d.prototype.animationStart = function () { + // start animation when option is true + if (!this.animationAutoStart || !this.dataGroup.dataFilter) return; + + if (!this.frame.filter || !this.frame.filter.slider) throw new Error('No animation available'); + + this.frame.filter.slider.play(); +}; + +/** + * Stop animation + */ +Graph3d.prototype.animationStop = function () { + if (!this.frame.filter || !this.frame.filter.slider) return; + + this.frame.filter.slider.stop(); +}; + +/** + * Resize the center position based on the current values in this.xCenter + * and this.yCenter (which are strings with a percentage or a value + * in pixels). The center positions are the variables this.currentXCenter + * and this.currentYCenter + */ +Graph3d.prototype._resizeCenter = function () { + // calculate the horizontal center position + if (this.xCenter.charAt(this.xCenter.length - 1) === '%') { + this.currentXCenter = parseFloat(this.xCenter) / 100 * this.frame.canvas.clientWidth; + } else { + this.currentXCenter = parseFloat(this.xCenter); // supposed to be in px + } + + // calculate the vertical center position + if (this.yCenter.charAt(this.yCenter.length - 1) === '%') { + this.currentYCenter = parseFloat(this.yCenter) / 100 * (this.frame.canvas.clientHeight - this.frame.filter.clientHeight); + } else { + this.currentYCenter = parseFloat(this.yCenter); // supposed to be in px + } +}; + +/** + * Retrieve the current camera rotation + * + * @returns {object} An object with parameters horizontal, vertical, and + * distance + */ +Graph3d.prototype.getCameraPosition = function () { + var pos = this.camera.getArmRotation(); + pos.distance = this.camera.getArmLength(); + return pos; +}; + +/** + * Load data into the 3D Graph + * + * @param {vis.DataSet} data + * @private + */ +Graph3d.prototype._readData = function (data) { + // read the data + this.dataPoints = this.dataGroup.initializeData(this, data, this.style); + + this._initializeRanges(); + this._redrawFilter(); +}; + +/** + * Replace the dataset of the Graph3d + * + * @param {Array | DataSet | DataView} data + */ +Graph3d.prototype.setData = function (data) { + if (data === undefined || data === null) return; + + this._readData(data); + this.redraw(); + this.animationStart(); +}; + +/** + * Update the options. Options will be merged with current options + * + * @param {Object} options + */ +Graph3d.prototype.setOptions = function (options) { + if (options === undefined) return; + + var errorFound = Validator.validate(options, allOptions); + if (errorFound === true) { + console.log('%cErrors have been found in the supplied options object.', printStyle); + } + + this.animationStop(); + + Settings.setOptions(options, this); + this.setPointDrawingMethod(); + this._setSize(this.width, this.height); + + this.setData(this.dataGroup.getDataTable()); + this.animationStart(); +}; + +/** + * Determine which point drawing method to use for the current graph style. + */ +Graph3d.prototype.setPointDrawingMethod = function () { + var method = undefined; + + switch (this.style) { + case Graph3d.STYLE.BAR: + method = Graph3d.prototype._redrawBarGraphPoint; + break; + case Graph3d.STYLE.BARCOLOR: + method = Graph3d.prototype._redrawBarColorGraphPoint; + break; + case Graph3d.STYLE.BARSIZE: + method = Graph3d.prototype._redrawBarSizeGraphPoint; + break; + case Graph3d.STYLE.DOT: + method = Graph3d.prototype._redrawDotGraphPoint; + break; + case Graph3d.STYLE.DOTLINE: + method = Graph3d.prototype._redrawDotLineGraphPoint; + break; + case Graph3d.STYLE.DOTCOLOR: + method = Graph3d.prototype._redrawDotColorGraphPoint; + break; + case Graph3d.STYLE.DOTSIZE: + method = Graph3d.prototype._redrawDotSizeGraphPoint; + break; + case Graph3d.STYLE.SURFACE: + method = Graph3d.prototype._redrawSurfaceGraphPoint; + break; + case Graph3d.STYLE.GRID: + method = Graph3d.prototype._redrawGridGraphPoint; + break; + case Graph3d.STYLE.LINE: + method = Graph3d.prototype._redrawLineGraphPoint; + break; + default: + throw new Error('Can not determine point drawing method ' + 'for graph style \'' + this.style + '\''); + } + + this._pointDrawingMethod = method; +}; + +/** + * Redraw the Graph. + */ +Graph3d.prototype.redraw = function () { + if (this.dataPoints === undefined) { + throw new Error('Graph data not initialized'); + } + + this._resizeCanvas(); + this._resizeCenter(); + this._redrawSlider(); + this._redrawClear(); + this._redrawAxis(); + + this._redrawDataGraph(); + + this._redrawInfo(); + this._redrawLegend(); +}; + +/** + * Get drawing context without exposing canvas + * + * @returns {CanvasRenderingContext2D} + * @private + */ +Graph3d.prototype._getContext = function () { + var canvas = this.frame.canvas; + var ctx = canvas.getContext('2d'); + + ctx.lineJoin = 'round'; + ctx.lineCap = 'round'; + + return ctx; +}; + +/** + * Clear the canvas before redrawing + */ +Graph3d.prototype._redrawClear = function () { + var canvas = this.frame.canvas; + var ctx = canvas.getContext('2d'); + + ctx.clearRect(0, 0, canvas.width, canvas.height); +}; + +Graph3d.prototype._dotSize = function () { + return this.frame.clientWidth * this.dotSizeRatio; +}; + +/** + * Get legend width + * + * @returns {*} + * @private + */ +Graph3d.prototype._getLegendWidth = function () { + var width; + + if (this.style === Graph3d.STYLE.DOTSIZE) { + var dotSize = this._dotSize(); + //width = dotSize / 2 + dotSize * 2; + width = dotSize * this.dotSizeMaxFraction; + } else if (this.style === Graph3d.STYLE.BARSIZE) { + width = this.xBarWidth; + } else { + width = 20; + } + return width; +}; + +/** + * Redraw the legend based on size, dot color, or surface height + */ +Graph3d.prototype._redrawLegend = function () { + + //Return without drawing anything, if no legend is specified + if (this.showLegend !== true) { + return; + } + + // Do not draw legend when graph style does not support + if (this.style === Graph3d.STYLE.LINE || this.style === Graph3d.STYLE.BARSIZE //TODO add legend support for BARSIZE + ) { + return; + } + + // Legend types - size and color. Determine if size legend. + var isSizeLegend = this.style === Graph3d.STYLE.BARSIZE || this.style === Graph3d.STYLE.DOTSIZE; + + // Legend is either tracking z values or style values. This flag if false means use z values. + var isValueLegend = this.style === Graph3d.STYLE.DOTSIZE || this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.BARCOLOR; + + var height = Math.max(this.frame.clientHeight * 0.25, 100); + var top = this.margin; + var width = this._getLegendWidth(); // px - overwritten by size legend + var right = this.frame.clientWidth - this.margin; + var left = right - width; + var bottom = top + height; + + var ctx = this._getContext(); + ctx.lineWidth = 1; + ctx.font = '14px arial'; // TODO: put in options + + if (isSizeLegend === false) { + // draw the color bar + var ymin = 0; + var ymax = height; // Todo: make height customizable + var y; + + for (y = ymin; y < ymax; y++) { + var f = (y - ymin) / (ymax - ymin); + var hue = f * 240; + var color = this._hsv2rgb(hue, 1, 1); + + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(left, top + y); + ctx.lineTo(right, top + y); + ctx.stroke(); + } + ctx.strokeStyle = this.axisColor; + ctx.strokeRect(left, top, width, height); + } else { + + // draw the size legend box + var widthMin; + if (this.style === Graph3d.STYLE.DOTSIZE) { + // Get the proportion to max and min right + widthMin = width * (this.dotSizeMinFraction / this.dotSizeMaxFraction); + } else if (this.style === Graph3d.STYLE.BARSIZE) { + //widthMin = this.xBarWidth * 0.2 this is wrong - barwidth measures in terms of xvalues + } + ctx.strokeStyle = this.axisColor; + ctx.fillStyle = this.dataColor.fill; + ctx.beginPath(); + ctx.moveTo(left, top); + ctx.lineTo(right, top); + ctx.lineTo(left + widthMin, bottom); + ctx.lineTo(left, bottom); + ctx.closePath(); + ctx.fill(); + ctx.stroke(); + } + + // print value text along the legend edge + var gridLineLen = 5; // px + + var legendMin = isValueLegend ? this.valueRange.min : this.zRange.min; + var legendMax = isValueLegend ? this.valueRange.max : this.zRange.max; + var step = new StepNumber(legendMin, legendMax, (legendMax - legendMin) / 5, true); + step.start(true); + + var from; + var to; + while (!step.end()) { + y = bottom - (step.getCurrent() - legendMin) / (legendMax - legendMin) * height; + from = new Point2d(left - gridLineLen, y); + to = new Point2d(left, y); + this._line(ctx, from, to); + + ctx.textAlign = 'right'; + ctx.textBaseline = 'middle'; + ctx.fillStyle = this.axisColor; + ctx.fillText(step.getCurrent(), left - 2 * gridLineLen, y); + + step.next(); + } + + ctx.textAlign = 'right'; + ctx.textBaseline = 'top'; + var label = this.legendLabel; + ctx.fillText(label, right, bottom + this.margin); +}; + +/** + * Redraw the filter + */ +Graph3d.prototype._redrawFilter = function () { + var dataFilter = this.dataGroup.dataFilter; + var filter = this.frame.filter; + filter.innerHTML = ''; + + if (!dataFilter) { + filter.slider = undefined; + return; + } + + var options = { + 'visible': this.showAnimationControls + }; + var slider = new Slider(filter, options); + filter.slider = slider; + + // TODO: css here is not nice here... + filter.style.padding = '10px'; + //this.frame.filter.style.backgroundColor = '#EFEFEF'; + + slider.setValues(dataFilter.values); + slider.setPlayInterval(this.animationInterval); + + // create an event handler + var me = this; + var onchange = function onchange() { + var dataFilter = me.dataGroup.dataFilter; + var index = slider.getIndex(); + + dataFilter.selectValue(index); + me.dataPoints = dataFilter._getDataPoints(); + + me.redraw(); + }; + + slider.setOnChangeCallback(onchange); +}; + +/** + * Redraw the slider + */ +Graph3d.prototype._redrawSlider = function () { + if (this.frame.filter.slider !== undefined) { + this.frame.filter.slider.redraw(); + } +}; + +/** + * Redraw common information + */ +Graph3d.prototype._redrawInfo = function () { + var info = this.dataGroup.getInfo(); + if (info === undefined) return; + + var ctx = this._getContext(); + + ctx.font = '14px arial'; // TODO: put in options + ctx.lineStyle = 'gray'; + ctx.fillStyle = 'gray'; + ctx.textAlign = 'left'; + ctx.textBaseline = 'top'; + + var x = this.margin; + var y = this.margin; + ctx.fillText(info, x, y); +}; + +/** + * Draw a line between 2d points 'from' and 'to'. + * + * If stroke style specified, set that as well. + * + * @param {CanvasRenderingContext2D} ctx + * @param {vis.Point2d} from + * @param {vis.Point2d} to + * @param {string} [strokeStyle] + * @private + */ +Graph3d.prototype._line = function (ctx, from, to, strokeStyle) { + if (strokeStyle !== undefined) { + ctx.strokeStyle = strokeStyle; + } + + ctx.beginPath(); + ctx.moveTo(from.x, from.y); + ctx.lineTo(to.x, to.y); + ctx.stroke(); +}; + +/** + * + * @param {CanvasRenderingContext2D} ctx + * @param {vis.Point3d} point3d + * @param {string} text + * @param {number} armAngle + * @param {number} [yMargin=0] + */ +Graph3d.prototype.drawAxisLabelX = function (ctx, point3d, text, armAngle, yMargin) { + if (yMargin === undefined) { + yMargin = 0; + } + + var point2d = this._convert3Dto2D(point3d); + + if (Math.cos(armAngle * 2) > 0) { + ctx.textAlign = 'center'; + ctx.textBaseline = 'top'; + point2d.y += yMargin; + } else if (Math.sin(armAngle * 2) < 0) { + ctx.textAlign = 'right'; + ctx.textBaseline = 'middle'; + } else { + ctx.textAlign = 'left'; + ctx.textBaseline = 'middle'; + } + + ctx.fillStyle = this.axisColor; + ctx.fillText(text, point2d.x, point2d.y); +}; + +/** + * + * @param {CanvasRenderingContext2D} ctx + * @param {vis.Point3d} point3d + * @param {string} text + * @param {number} armAngle + * @param {number} [yMargin=0] + */ +Graph3d.prototype.drawAxisLabelY = function (ctx, point3d, text, armAngle, yMargin) { + if (yMargin === undefined) { + yMargin = 0; + } + + var point2d = this._convert3Dto2D(point3d); + + if (Math.cos(armAngle * 2) < 0) { + ctx.textAlign = 'center'; + ctx.textBaseline = 'top'; + point2d.y += yMargin; + } else if (Math.sin(armAngle * 2) > 0) { + ctx.textAlign = 'right'; + ctx.textBaseline = 'middle'; + } else { + ctx.textAlign = 'left'; + ctx.textBaseline = 'middle'; + } + + ctx.fillStyle = this.axisColor; + ctx.fillText(text, point2d.x, point2d.y); +}; + +/** + * + * @param {CanvasRenderingContext2D} ctx + * @param {vis.Point3d} point3d + * @param {string} text + * @param {number} [offset=0] + */ +Graph3d.prototype.drawAxisLabelZ = function (ctx, point3d, text, offset) { + if (offset === undefined) { + offset = 0; + } + + var point2d = this._convert3Dto2D(point3d); + ctx.textAlign = 'right'; + ctx.textBaseline = 'middle'; + ctx.fillStyle = this.axisColor; + ctx.fillText(text, point2d.x - offset, point2d.y); +}; + +/** + + +/** + * Draw a line between 2d points 'from' and 'to'. + * + * If stroke style specified, set that as well. + * + * @param {CanvasRenderingContext2D} ctx + * @param {vis.Point2d} from + * @param {vis.Point2d} to + * @param {string} [strokeStyle] + * @private + */ +Graph3d.prototype._line3d = function (ctx, from, to, strokeStyle) { + var from2d = this._convert3Dto2D(from); + var to2d = this._convert3Dto2D(to); + + this._line(ctx, from2d, to2d, strokeStyle); +}; + +/** + * Redraw the axis + */ +Graph3d.prototype._redrawAxis = function () { + var ctx = this._getContext(), + from, + to, + step, + prettyStep, + text, + xText, + yText, + zText, + offset, + xOffset, + yOffset; + + // TODO: get the actual rendered style of the containerElement + //ctx.font = this.containerElement.style.font; + ctx.font = 24 / this.camera.getArmLength() + 'px arial'; + + // calculate the length for the short grid lines + var gridLenX = 0.025 / this.scale.x; + var gridLenY = 0.025 / this.scale.y; + var textMargin = 5 / this.camera.getArmLength(); // px + var armAngle = this.camera.getArmRotation().horizontal; + var armVector = new Point2d(Math.cos(armAngle), Math.sin(armAngle)); + + var xRange = this.xRange; + var yRange = this.yRange; + var zRange = this.zRange; + var point3d; + + // draw x-grid lines + ctx.lineWidth = 1; + prettyStep = this.defaultXStep === undefined; + step = new StepNumber(xRange.min, xRange.max, this.xStep, prettyStep); + step.start(true); + + while (!step.end()) { + var x = step.getCurrent(); + + if (this.showGrid) { + from = new Point3d(x, yRange.min, zRange.min); + to = new Point3d(x, yRange.max, zRange.min); + this._line3d(ctx, from, to, this.gridColor); + } else if (this.showXAxis) { + from = new Point3d(x, yRange.min, zRange.min); + to = new Point3d(x, yRange.min + gridLenX, zRange.min); + this._line3d(ctx, from, to, this.axisColor); + + from = new Point3d(x, yRange.max, zRange.min); + to = new Point3d(x, yRange.max - gridLenX, zRange.min); + this._line3d(ctx, from, to, this.axisColor); + } + + if (this.showXAxis) { + yText = armVector.x > 0 ? yRange.min : yRange.max; + point3d = new Point3d(x, yText, zRange.min); + var msg = ' ' + this.xValueLabel(x) + ' '; + this.drawAxisLabelX(ctx, point3d, msg, armAngle, textMargin); + } + + step.next(); + } + + // draw y-grid lines + ctx.lineWidth = 1; + prettyStep = this.defaultYStep === undefined; + step = new StepNumber(yRange.min, yRange.max, this.yStep, prettyStep); + step.start(true); + + while (!step.end()) { + var y = step.getCurrent(); + + if (this.showGrid) { + from = new Point3d(xRange.min, y, zRange.min); + to = new Point3d(xRange.max, y, zRange.min); + this._line3d(ctx, from, to, this.gridColor); + } else if (this.showYAxis) { + from = new Point3d(xRange.min, y, zRange.min); + to = new Point3d(xRange.min + gridLenY, y, zRange.min); + this._line3d(ctx, from, to, this.axisColor); + + from = new Point3d(xRange.max, y, zRange.min); + to = new Point3d(xRange.max - gridLenY, y, zRange.min); + this._line3d(ctx, from, to, this.axisColor); + } + + if (this.showYAxis) { + xText = armVector.y > 0 ? xRange.min : xRange.max; + point3d = new Point3d(xText, y, zRange.min); + var _msg = ' ' + this.yValueLabel(y) + ' '; + this.drawAxisLabelY(ctx, point3d, _msg, armAngle, textMargin); + } + + step.next(); + } + + // draw z-grid lines and axis + if (this.showZAxis) { + ctx.lineWidth = 1; + prettyStep = this.defaultZStep === undefined; + step = new StepNumber(zRange.min, zRange.max, this.zStep, prettyStep); + step.start(true); + + xText = armVector.x > 0 ? xRange.min : xRange.max; + yText = armVector.y < 0 ? yRange.min : yRange.max; + + while (!step.end()) { + var z = step.getCurrent(); + + // TODO: make z-grid lines really 3d? + var from3d = new Point3d(xText, yText, z); + var from2d = this._convert3Dto2D(from3d); + to = new Point2d(from2d.x - textMargin, from2d.y); + this._line(ctx, from2d, to, this.axisColor); + + var _msg2 = this.zValueLabel(z) + ' '; + this.drawAxisLabelZ(ctx, from3d, _msg2, 5); + + step.next(); + } + + ctx.lineWidth = 1; + from = new Point3d(xText, yText, zRange.min); + to = new Point3d(xText, yText, zRange.max); + this._line3d(ctx, from, to, this.axisColor); + } + + // draw x-axis + if (this.showXAxis) { + var xMin2d; + var xMax2d; + ctx.lineWidth = 1; + + // line at yMin + xMin2d = new Point3d(xRange.min, yRange.min, zRange.min); + xMax2d = new Point3d(xRange.max, yRange.min, zRange.min); + this._line3d(ctx, xMin2d, xMax2d, this.axisColor); + // line at ymax + xMin2d = new Point3d(xRange.min, yRange.max, zRange.min); + xMax2d = new Point3d(xRange.max, yRange.max, zRange.min); + this._line3d(ctx, xMin2d, xMax2d, this.axisColor); + } + + // draw y-axis + if (this.showYAxis) { + ctx.lineWidth = 1; + // line at xMin + from = new Point3d(xRange.min, yRange.min, zRange.min); + to = new Point3d(xRange.min, yRange.max, zRange.min); + this._line3d(ctx, from, to, this.axisColor); + // line at xMax + from = new Point3d(xRange.max, yRange.min, zRange.min); + to = new Point3d(xRange.max, yRange.max, zRange.min); + this._line3d(ctx, from, to, this.axisColor); + } + + // draw x-label + var xLabel = this.xLabel; + if (xLabel.length > 0 && this.showXAxis) { + yOffset = 0.1 / this.scale.y; + xText = (xRange.max + 3 * xRange.min) / 4; + yText = armVector.x > 0 ? yRange.min - yOffset : yRange.max + yOffset; + text = new Point3d(xText, yText, zRange.min); + this.drawAxisLabelX(ctx, text, xLabel, armAngle); + } + + // draw y-label + var yLabel = this.yLabel; + if (yLabel.length > 0 && this.showYAxis) { + xOffset = 0.1 / this.scale.x; + xText = armVector.y > 0 ? xRange.min - xOffset : xRange.max + xOffset; + yText = (yRange.max + 3 * yRange.min) / 4; + text = new Point3d(xText, yText, zRange.min); + + this.drawAxisLabelY(ctx, text, yLabel, armAngle); + } + + // draw z-label + var zLabel = this.zLabel; + if (zLabel.length > 0 && this.showZAxis) { + offset = 30; // pixels. // TODO: relate to the max width of the values on the z axis? + xText = armVector.x > 0 ? xRange.min : xRange.max; + yText = armVector.y < 0 ? yRange.min : yRange.max; + zText = (zRange.max + 3 * zRange.min) / 4; + text = new Point3d(xText, yText, zText); + + this.drawAxisLabelZ(ctx, text, zLabel, offset); + } +}; + +/** + * Calculate the color based on the given value. + * @param {number} H Hue, a value be between 0 and 360 + * @param {number} S Saturation, a value between 0 and 1 + * @param {number} V Value, a value between 0 and 1 + * @returns {string} + * @private + */ +Graph3d.prototype._hsv2rgb = function (H, S, V) { + var R, G, B, C, Hi, X; + + C = V * S; + Hi = Math.floor(H / 60); // hi = 0,1,2,3,4,5 + X = C * (1 - Math.abs(H / 60 % 2 - 1)); + + switch (Hi) { + case 0: + R = C;G = X;B = 0;break; + case 1: + R = X;G = C;B = 0;break; + case 2: + R = 0;G = C;B = X;break; + case 3: + R = 0;G = X;B = C;break; + case 4: + R = X;G = 0;B = C;break; + case 5: + R = C;G = 0;B = X;break; + + default: + R = 0;G = 0;B = 0;break; + } + + return 'RGB(' + parseInt(R * 255) + ',' + parseInt(G * 255) + ',' + parseInt(B * 255) + ')'; +}; + +/** + * + * @param {vis.Point3d} point + * @returns {*} + * @private + */ +Graph3d.prototype._getStrokeWidth = function (point) { + if (point !== undefined) { + if (this.showPerspective) { + return 1 / -point.trans.z * this.dataColor.strokeWidth; + } else { + return -(this.eye.z / this.camera.getArmLength()) * this.dataColor.strokeWidth; + } + } + + return this.dataColor.strokeWidth; +}; + +// ----------------------------------------------------------------------------- +// Drawing primitives for the graphs +// ----------------------------------------------------------------------------- + + +/** + * Draw a bar element in the view with the given properties. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @param {number} xWidth + * @param {number} yWidth + * @param {string} color + * @param {string} borderColor + * @private + */ +Graph3d.prototype._redrawBar = function (ctx, point, xWidth, yWidth, color, borderColor) { + var surface; + + // calculate all corner points + var me = this; + var point3d = point.point; + var zMin = this.zRange.min; + var top = [{ point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, point3d.z) }, { point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, point3d.z) }, { point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, point3d.z) }, { point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, point3d.z) }]; + var bottom = [{ point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, zMin) }, { point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, zMin) }, { point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, zMin) }, { point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, zMin) }]; + + // calculate screen location of the points + top.forEach(function (obj) { + obj.screen = me._convert3Dto2D(obj.point); + }); + bottom.forEach(function (obj) { + obj.screen = me._convert3Dto2D(obj.point); + }); + + // create five sides, calculate both corner points and center points + var surfaces = [{ corners: top, center: Point3d.avg(bottom[0].point, bottom[2].point) }, { corners: [top[0], top[1], bottom[1], bottom[0]], center: Point3d.avg(bottom[1].point, bottom[0].point) }, { corners: [top[1], top[2], bottom[2], bottom[1]], center: Point3d.avg(bottom[2].point, bottom[1].point) }, { corners: [top[2], top[3], bottom[3], bottom[2]], center: Point3d.avg(bottom[3].point, bottom[2].point) }, { corners: [top[3], top[0], bottom[0], bottom[3]], center: Point3d.avg(bottom[0].point, bottom[3].point) }]; + point.surfaces = surfaces; + + // calculate the distance of each of the surface centers to the camera + for (var j = 0; j < surfaces.length; j++) { + surface = surfaces[j]; + var transCenter = this._convertPointToTranslation(surface.center); + surface.dist = this.showPerspective ? transCenter.length() : -transCenter.z; + // TODO: this dept calculation doesn't work 100% of the cases due to perspective, + // but the current solution is fast/simple and works in 99.9% of all cases + // the issue is visible in example 14, with graph.setCameraPosition({horizontal: 2.97, vertical: 0.5, distance: 0.9}) + } + + // order the surfaces by their (translated) depth + surfaces.sort(function (a, b) { + var diff = b.dist - a.dist; + if (diff) return diff; + + // if equal depth, sort the top surface last + if (a.corners === top) return 1; + if (b.corners === top) return -1; + + // both are equal + return 0; + }); + + // draw the ordered surfaces + ctx.lineWidth = this._getStrokeWidth(point); + ctx.strokeStyle = borderColor; + ctx.fillStyle = color; + // NOTE: we start at j=2 instead of j=0 as we don't need to draw the two surfaces at the backside + for (var _j = 2; _j < surfaces.length; _j++) { + surface = surfaces[_j]; + this._polygon(ctx, surface.corners); + } +}; + +/** + * Draw a polygon using the passed points and fill it with the passed style and stroke. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array.} points an array of points. + * @param {string} [fillStyle] the fill style to set + * @param {string} [strokeStyle] the stroke style to set + */ +Graph3d.prototype._polygon = function (ctx, points, fillStyle, strokeStyle) { + if (points.length < 2) { + return; + } + + if (fillStyle !== undefined) { + ctx.fillStyle = fillStyle; + } + if (strokeStyle !== undefined) { + ctx.strokeStyle = strokeStyle; + } + ctx.beginPath(); + ctx.moveTo(points[0].screen.x, points[0].screen.y); + + for (var i = 1; i < points.length; ++i) { + var point = points[i]; + ctx.lineTo(point.screen.x, point.screen.y); + } + + ctx.closePath(); + ctx.fill(); + ctx.stroke(); // TODO: only draw stroke when strokeWidth > 0 +}; + +/** + * @param {CanvasRenderingContext2D} ctx + * @param {object} point + * @param {string} color + * @param {string} borderColor + * @param {number} [size=this._dotSize()] + * @private + */ +Graph3d.prototype._drawCircle = function (ctx, point, color, borderColor, size) { + var radius = this._calcRadius(point, size); + + ctx.lineWidth = this._getStrokeWidth(point); + ctx.strokeStyle = borderColor; + ctx.fillStyle = color; + ctx.beginPath(); + ctx.arc(point.screen.x, point.screen.y, radius, 0, Math.PI * 2, true); + ctx.fill(); + ctx.stroke(); +}; + +/** + * Determine the colors for the 'regular' graph styles. + * + * @param {object} point + * @returns {{fill, border}} + * @private + */ +Graph3d.prototype._getColorsRegular = function (point) { + // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 + var hue = (1 - (point.point.z - this.zRange.min) * this.scale.z / this.verticalRatio) * 240; + var color = this._hsv2rgb(hue, 1, 1); + var borderColor = this._hsv2rgb(hue, 1, 0.8); + + return { + fill: color, + border: borderColor + }; +}; + +/** + * Get the colors for the 'color' graph styles. + * These styles are currently: 'bar-color' and 'dot-color' + * Color may be set as a string representation of HTML color, like #ff00ff, + * or calculated from a number, for example, distance from this point + * The first option is useful when we have some pre-given legend, to which we have to adjust ourselves + * The second option is useful when we are interested in automatically setting the color, from some value, + * using some color scale + * @param {object} point + * @returns {{fill: *, border: *}} + * @private + */ +Graph3d.prototype._getColorsColor = function (point) { + // calculate the color based on the value + var color, borderColor; + + if (typeof point.point.value === "string") { + color = point.point.value; + borderColor = point.point.value; + } else { + var hue = (1 - (point.point.value - this.valueRange.min) * this.scale.value) * 240; + color = this._hsv2rgb(hue, 1, 1); + borderColor = this._hsv2rgb(hue, 1, 0.8); + } + return { + fill: color, + border: borderColor + }; +}; + +/** + * Get the colors for the 'size' graph styles. + * These styles are currently: 'bar-size' and 'dot-size' + * + * @returns {{fill: *, border: (string|colorOptions.stroke|{string, undefined}|string|colorOptions.stroke|{string}|*)}} + * @private + */ +Graph3d.prototype._getColorsSize = function () { + return { + fill: this.dataColor.fill, + border: this.dataColor.stroke + }; +}; + +/** + * Determine the size of a point on-screen, as determined by the + * distance to the camera. + * + * @param {Object} point + * @param {number} [size=this._dotSize()] the size that needs to be translated to screen coordinates. + * optional; if not passed, use the default point size. + * @returns {number} + * @private + */ +Graph3d.prototype._calcRadius = function (point, size) { + if (size === undefined) { + size = this._dotSize(); + } + + var radius; + if (this.showPerspective) { + radius = size / -point.trans.z; + } else { + radius = size * -(this.eye.z / this.camera.getArmLength()); + } + if (radius < 0) { + radius = 0; + } + + return radius; +}; + +// ----------------------------------------------------------------------------- +// Methods for drawing points per graph style. +// ----------------------------------------------------------------------------- + + +/** + * Draw single datapoint for graph style 'bar'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawBarGraphPoint = function (ctx, point) { + var xWidth = this.xBarWidth / 2; + var yWidth = this.yBarWidth / 2; + var colors = this._getColorsRegular(point); + + this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border); +}; + +/** + * Draw single datapoint for graph style 'bar-color'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawBarColorGraphPoint = function (ctx, point) { + var xWidth = this.xBarWidth / 2; + var yWidth = this.yBarWidth / 2; + var colors = this._getColorsColor(point); + + this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border); +}; + +/** + * Draw single datapoint for graph style 'bar-size'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawBarSizeGraphPoint = function (ctx, point) { + // calculate size for the bar + var fraction = (point.point.value - this.valueRange.min) / this.valueRange.range(); + var xWidth = this.xBarWidth / 2 * (fraction * 0.8 + 0.2); + var yWidth = this.yBarWidth / 2 * (fraction * 0.8 + 0.2); + + var colors = this._getColorsSize(); + + this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border); +}; + +/** + * Draw single datapoint for graph style 'dot'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawDotGraphPoint = function (ctx, point) { + var colors = this._getColorsRegular(point); + + this._drawCircle(ctx, point, colors.fill, colors.border); +}; + +/** + * Draw single datapoint for graph style 'dot-line'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawDotLineGraphPoint = function (ctx, point) { + // draw a vertical line from the XY-plane to the graph value + var from = this._convert3Dto2D(point.bottom); + ctx.lineWidth = 1; + this._line(ctx, from, point.screen, this.gridColor); + + this._redrawDotGraphPoint(ctx, point); +}; + +/** + * Draw single datapoint for graph style 'dot-color'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawDotColorGraphPoint = function (ctx, point) { + var colors = this._getColorsColor(point); + + this._drawCircle(ctx, point, colors.fill, colors.border); +}; + +/** + * Draw single datapoint for graph style 'dot-size'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawDotSizeGraphPoint = function (ctx, point) { + var dotSize = this._dotSize(); + var fraction = (point.point.value - this.valueRange.min) / this.valueRange.range(); + + var sizeMin = dotSize * this.dotSizeMinFraction; + var sizeRange = dotSize * this.dotSizeMaxFraction - sizeMin; + var size = sizeMin + sizeRange * fraction; + + var colors = this._getColorsSize(); + + this._drawCircle(ctx, point, colors.fill, colors.border, size); +}; + +/** + * Draw single datapoint for graph style 'surface'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawSurfaceGraphPoint = function (ctx, point) { + var right = point.pointRight; + var top = point.pointTop; + var cross = point.pointCross; + + if (point === undefined || right === undefined || top === undefined || cross === undefined) { + return; + } + + var topSideVisible = true; + var fillStyle; + var strokeStyle; + + if (this.showGrayBottom || this.showShadow) { + // calculate the cross product of the two vectors from center + // to left and right, in order to know whether we are looking at the + // bottom or at the top side. We can also use the cross product + // for calculating light intensity + var aDiff = Point3d.subtract(cross.trans, point.trans); + var bDiff = Point3d.subtract(top.trans, right.trans); + var crossproduct = Point3d.crossProduct(aDiff, bDiff); + var len = crossproduct.length(); + // FIXME: there is a bug with determining the surface side (shadow or colored) + + topSideVisible = crossproduct.z > 0; + } + + if (topSideVisible) { + + // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 + var zAvg = (point.point.z + right.point.z + top.point.z + cross.point.z) / 4; + var h = (1 - (zAvg - this.zRange.min) * this.scale.z / this.verticalRatio) * 240; + var s = 1; // saturation + var v; + + if (this.showShadow) { + v = Math.min(1 + crossproduct.x / len / 2, 1); // value. TODO: scale + fillStyle = this._hsv2rgb(h, s, v); + strokeStyle = fillStyle; + } else { + v = 1; + fillStyle = this._hsv2rgb(h, s, v); + strokeStyle = this.axisColor; // TODO: should be customizable + } + } else { + fillStyle = 'gray'; + strokeStyle = this.axisColor; + } + + ctx.lineWidth = this._getStrokeWidth(point); + // TODO: only draw stroke when strokeWidth > 0 + + var points = [point, right, cross, top]; + this._polygon(ctx, points, fillStyle, strokeStyle); +}; + +/** + * Helper method for _redrawGridGraphPoint() + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} from + * @param {Object} to + * @private + */ +Graph3d.prototype._drawGridLine = function (ctx, from, to) { + if (from === undefined || to === undefined) { + return; + } + + // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 + var zAvg = (from.point.z + to.point.z) / 2; + var h = (1 - (zAvg - this.zRange.min) * this.scale.z / this.verticalRatio) * 240; + + ctx.lineWidth = this._getStrokeWidth(from) * 2; + ctx.strokeStyle = this._hsv2rgb(h, 1, 1); + this._line(ctx, from.screen, to.screen); +}; + +/** + * Draw single datapoint for graph style 'Grid'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawGridGraphPoint = function (ctx, point) { + this._drawGridLine(ctx, point, point.pointRight); + this._drawGridLine(ctx, point, point.pointTop); +}; + +/** + * Draw single datapoint for graph style 'line'. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} point + * @private + */ +Graph3d.prototype._redrawLineGraphPoint = function (ctx, point) { + if (point.pointNext === undefined) { + return; + } + + ctx.lineWidth = this._getStrokeWidth(point); + ctx.strokeStyle = this.dataColor.stroke; + + this._line(ctx, point.screen, point.pointNext.screen); +}; + +/** + * Draw all datapoints for currently selected graph style. + * + */ +Graph3d.prototype._redrawDataGraph = function () { + var ctx = this._getContext(); + var i; + + if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? + + this._calcTranslations(this.dataPoints); + + for (i = 0; i < this.dataPoints.length; i++) { + var point = this.dataPoints[i]; + + // Using call() ensures that the correct context is used + this._pointDrawingMethod.call(this, ctx, point); + } +}; + +// ----------------------------------------------------------------------------- +// End methods for drawing points per graph style. +// ----------------------------------------------------------------------------- + +/** + * Store startX, startY and startOffset for mouse operations + * + * @param {Event} event The event that occurred + */ +Graph3d.prototype._storeMousePosition = function (event) { + // get mouse position (different code for IE and all other browsers) + this.startMouseX = getMouseX(event); + this.startMouseY = getMouseY(event); + + this._startCameraOffset = this.camera.getOffset(); +}; + +/** + * Start a moving operation inside the provided parent element + * @param {Event} event The event that occurred (required for + * retrieving the mouse position) + */ +Graph3d.prototype._onMouseDown = function (event) { + event = event || window.event; + + // check if mouse is still down (may be up when focus is lost for example + // in an iframe) + if (this.leftButtonDown) { + this._onMouseUp(event); + } + + // only react on left mouse button down + this.leftButtonDown = event.which ? event.which === 1 : event.button === 1; + if (!this.leftButtonDown && !this.touchDown) return; + + this._storeMousePosition(event); + + this.startStart = new Date(this.start); + this.startEnd = new Date(this.end); + this.startArmRotation = this.camera.getArmRotation(); + + this.frame.style.cursor = 'move'; + + // add event listeners to handle moving the contents + // we store the function onmousemove and onmouseup in the graph, so we can + // remove the eventlisteners lateron in the function mouseUp() + var me = this; + this.onmousemove = function (event) { + me._onMouseMove(event); + }; + this.onmouseup = function (event) { + me._onMouseUp(event); + }; + util.addEventListener(document, 'mousemove', me.onmousemove); + util.addEventListener(document, 'mouseup', me.onmouseup); + util.preventDefault(event); +}; + +/** + * Perform moving operating. + * This function activated from within the funcion Graph.mouseDown(). + * @param {Event} event Well, eehh, the event + */ +Graph3d.prototype._onMouseMove = function (event) { + this.moving = true; + event = event || window.event; + + // calculate change in mouse position + var diffX = parseFloat(getMouseX(event)) - this.startMouseX; + var diffY = parseFloat(getMouseY(event)) - this.startMouseY; + + // move with ctrl or rotate by other + if (event && event.ctrlKey === true) { + // calculate change in mouse position + var scaleX = this.frame.clientWidth * 0.5; + var scaleY = this.frame.clientHeight * 0.5; + + var offXNew = (this._startCameraOffset.x || 0) - diffX / scaleX * this.camera.armLength * 0.8; + var offYNew = (this._startCameraOffset.y || 0) + diffY / scaleY * this.camera.armLength * 0.8; + + this.camera.setOffset(offXNew, offYNew); + this._storeMousePosition(event); + } else { + var horizontalNew = this.startArmRotation.horizontal + diffX / 200; + var verticalNew = this.startArmRotation.vertical + diffY / 200; + + var snapAngle = 4; // degrees + var snapValue = Math.sin(snapAngle / 360 * 2 * Math.PI); + + // snap horizontally to nice angles at 0pi, 0.5pi, 1pi, 1.5pi, etc... + // the -0.001 is to take care that the vertical axis is always drawn at the left front corner + if (Math.abs(Math.sin(horizontalNew)) < snapValue) { + horizontalNew = Math.round(horizontalNew / Math.PI) * Math.PI - 0.001; + } + if (Math.abs(Math.cos(horizontalNew)) < snapValue) { + horizontalNew = (Math.round(horizontalNew / Math.PI - 0.5) + 0.5) * Math.PI - 0.001; + } + + // snap vertically to nice angles + if (Math.abs(Math.sin(verticalNew)) < snapValue) { + verticalNew = Math.round(verticalNew / Math.PI) * Math.PI; + } + if (Math.abs(Math.cos(verticalNew)) < snapValue) { + verticalNew = (Math.round(verticalNew / Math.PI - 0.5) + 0.5) * Math.PI; + } + this.camera.setArmRotation(horizontalNew, verticalNew); + } + + this.redraw(); + + // fire a cameraPositionChange event + var parameters = this.getCameraPosition(); + this.emit('cameraPositionChange', parameters); + + util.preventDefault(event); +}; + +/** + * Stop moving operating. + * This function activated from within the funcion Graph.mouseDown(). + * @param {Event} event The event + */ +Graph3d.prototype._onMouseUp = function (event) { + this.frame.style.cursor = 'auto'; + this.leftButtonDown = false; + + // remove event listeners here + util.removeEventListener(document, 'mousemove', this.onmousemove); + util.removeEventListener(document, 'mouseup', this.onmouseup); + util.preventDefault(event); +}; + +/** + * @param {Event} event The event + */ +Graph3d.prototype._onClick = function (event) { + if (!this.onclick_callback) return; + if (!this.moving) { + var boundingRect = this.frame.getBoundingClientRect(); + var mouseX = getMouseX(event) - boundingRect.left; + var mouseY = getMouseY(event) - boundingRect.top; + var dataPoint = this._dataPointFromXY(mouseX, mouseY); + if (dataPoint) this.onclick_callback(dataPoint.point.data); + } else { + // disable onclick callback, if it came immediately after rotate/pan + this.moving = false; + } + util.preventDefault(event); +}; + +/** + * After having moved the mouse, a tooltip should pop up when the mouse is resting on a data point + * @param {Event} event A mouse move event + */ +Graph3d.prototype._onTooltip = function (event) { + var delay = 300; // ms + var boundingRect = this.frame.getBoundingClientRect(); + var mouseX = getMouseX(event) - boundingRect.left; + var mouseY = getMouseY(event) - boundingRect.top; + + if (!this.showTooltip) { + return; + } + + if (this.tooltipTimeout) { + clearTimeout(this.tooltipTimeout); + } + + // (delayed) display of a tooltip only if no mouse button is down + if (this.leftButtonDown) { + this._hideTooltip(); + return; + } + + if (this.tooltip && this.tooltip.dataPoint) { + // tooltip is currently visible + var dataPoint = this._dataPointFromXY(mouseX, mouseY); + if (dataPoint !== this.tooltip.dataPoint) { + // datapoint changed + if (dataPoint) { + this._showTooltip(dataPoint); + } else { + this._hideTooltip(); + } + } + } else { + // tooltip is currently not visible + var me = this; + this.tooltipTimeout = setTimeout(function () { + me.tooltipTimeout = null; + + // show a tooltip if we have a data point + var dataPoint = me._dataPointFromXY(mouseX, mouseY); + if (dataPoint) { + me._showTooltip(dataPoint); + } + }, delay); + } +}; + +/** + * Event handler for touchstart event on mobile devices + * @param {Event} event The event + */ +Graph3d.prototype._onTouchStart = function (event) { + this.touchDown = true; + + var me = this; + this.ontouchmove = function (event) { + me._onTouchMove(event); + }; + this.ontouchend = function (event) { + me._onTouchEnd(event); + }; + util.addEventListener(document, 'touchmove', me.ontouchmove); + util.addEventListener(document, 'touchend', me.ontouchend); + + this._onMouseDown(event); +}; + +/** + * Event handler for touchmove event on mobile devices + * @param {Event} event The event + */ +Graph3d.prototype._onTouchMove = function (event) { + this._onMouseMove(event); +}; + +/** + * Event handler for touchend event on mobile devices + * @param {Event} event The event + */ +Graph3d.prototype._onTouchEnd = function (event) { + this.touchDown = false; + + util.removeEventListener(document, 'touchmove', this.ontouchmove); + util.removeEventListener(document, 'touchend', this.ontouchend); + + this._onMouseUp(event); +}; + +/** + * Event handler for mouse wheel event, used to zoom the graph + * Code from http://adomas.org/javascript-mouse-wheel/ + * @param {Event} event The event + */ +Graph3d.prototype._onWheel = function (event) { + if (!event) /* For IE. */ + event = window.event; + + // retrieve delta + var delta = 0; + if (event.wheelDelta) { + /* IE/Opera. */ + delta = event.wheelDelta / 120; + } else if (event.detail) { + /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; + } + + // If delta is nonzero, handle it. + // Basically, delta is now positive if wheel was scrolled up, + // and negative, if wheel was scrolled down. + if (delta) { + var oldLength = this.camera.getArmLength(); + var newLength = oldLength * (1 - delta / 10); + + this.camera.setArmLength(newLength); + this.redraw(); + + this._hideTooltip(); + } + + // fire a cameraPositionChange event + var parameters = this.getCameraPosition(); + this.emit('cameraPositionChange', parameters); + + // Prevent default actions caused by mouse wheel. + // That might be ugly, but we handle scrolls somehow + // anyway, so don't bother here.. + util.preventDefault(event); +}; + +/** + * Test whether a point lies inside given 2D triangle + * + * @param {vis.Point2d} point + * @param {vis.Point2d[]} triangle + * @returns {boolean} true if given point lies inside or on the edge of the + * triangle, false otherwise + * @private + */ +Graph3d.prototype._insideTriangle = function (point, triangle) { + var a = triangle[0], + b = triangle[1], + c = triangle[2]; + + /** + * + * @param {number} x + * @returns {number} + */ + function sign(x) { + return x > 0 ? 1 : x < 0 ? -1 : 0; + } + + var as = sign((b.x - a.x) * (point.y - a.y) - (b.y - a.y) * (point.x - a.x)); + var bs = sign((c.x - b.x) * (point.y - b.y) - (c.y - b.y) * (point.x - b.x)); + var cs = sign((a.x - c.x) * (point.y - c.y) - (a.y - c.y) * (point.x - c.x)); + + // each of the three signs must be either equal to each other or zero + return (as == 0 || bs == 0 || as == bs) && (bs == 0 || cs == 0 || bs == cs) && (as == 0 || cs == 0 || as == cs); +}; + +/** + * Find a data point close to given screen position (x, y) + * + * @param {number} x + * @param {number} y + * @returns {Object | null} The closest data point or null if not close to any + * data point + * @private + */ +Graph3d.prototype._dataPointFromXY = function (x, y) { + var i, + distMax = 100, + // px + dataPoint = null, + closestDataPoint = null, + closestDist = null, + center = new Point2d(x, y); + + if (this.style === Graph3d.STYLE.BAR || this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE) { + // the data points are ordered from far away to closest + for (i = this.dataPoints.length - 1; i >= 0; i--) { + dataPoint = this.dataPoints[i]; + var surfaces = dataPoint.surfaces; + if (surfaces) { + for (var s = surfaces.length - 1; s >= 0; s--) { + // split each surface in two triangles, and see if the center point is inside one of these + var surface = surfaces[s]; + var corners = surface.corners; + var triangle1 = [corners[0].screen, corners[1].screen, corners[2].screen]; + var triangle2 = [corners[2].screen, corners[3].screen, corners[0].screen]; + if (this._insideTriangle(center, triangle1) || this._insideTriangle(center, triangle2)) { + // return immediately at the first hit + return dataPoint; + } + } + } + } + } else { + // find the closest data point, using distance to the center of the point on 2d screen + for (i = 0; i < this.dataPoints.length; i++) { + dataPoint = this.dataPoints[i]; + var point = dataPoint.screen; + if (point) { + var distX = Math.abs(x - point.x); + var distY = Math.abs(y - point.y); + var dist = Math.sqrt(distX * distX + distY * distY); + + if ((closestDist === null || dist < closestDist) && dist < distMax) { + closestDist = dist; + closestDataPoint = dataPoint; + } + } + } + } + + return closestDataPoint; +}; + +/** + * Determine if the given style has bars + * + * @param {number} style the style to check + * @returns {boolean} true if bar style, false otherwise + */ +Graph3d.prototype.hasBars = function (style) { + return style == Graph3d.STYLE.BAR || style == Graph3d.STYLE.BARCOLOR || style == Graph3d.STYLE.BARSIZE; +}; + +/** + * Display a tooltip for given data point + * @param {Object} dataPoint + * @private + */ +Graph3d.prototype._showTooltip = function (dataPoint) { + var content, line, dot; + + if (!this.tooltip) { + content = document.createElement('div'); + (0, _assign2['default'])(content.style, {}, this.tooltipStyle.content); + content.style.position = 'absolute'; + + line = document.createElement('div'); + (0, _assign2['default'])(line.style, {}, this.tooltipStyle.line); + line.style.position = 'absolute'; + + dot = document.createElement('div'); + (0, _assign2['default'])(dot.style, {}, this.tooltipStyle.dot); + dot.style.position = 'absolute'; + + this.tooltip = { + dataPoint: null, + dom: { + content: content, + line: line, + dot: dot + } + }; + } else { + content = this.tooltip.dom.content; + line = this.tooltip.dom.line; + dot = this.tooltip.dom.dot; + } + + this._hideTooltip(); + + this.tooltip.dataPoint = dataPoint; + if (typeof this.showTooltip === 'function') { + content.innerHTML = this.showTooltip(dataPoint.point); + } else { + content.innerHTML = '' + '' + '' + '' + '
' + this.xLabel + ':' + dataPoint.point.x + '
' + this.yLabel + ':' + dataPoint.point.y + '
' + this.zLabel + ':' + dataPoint.point.z + '
'; + } + + content.style.left = '0'; + content.style.top = '0'; + this.frame.appendChild(content); + this.frame.appendChild(line); + this.frame.appendChild(dot); + + // calculate sizes + var contentWidth = content.offsetWidth; + var contentHeight = content.offsetHeight; + var lineHeight = line.offsetHeight; + var dotWidth = dot.offsetWidth; + var dotHeight = dot.offsetHeight; + + var left = dataPoint.screen.x - contentWidth / 2; + left = Math.min(Math.max(left, 10), this.frame.clientWidth - 10 - contentWidth); + + line.style.left = dataPoint.screen.x + 'px'; + line.style.top = dataPoint.screen.y - lineHeight + 'px'; + content.style.left = left + 'px'; + content.style.top = dataPoint.screen.y - lineHeight - contentHeight + 'px'; + dot.style.left = dataPoint.screen.x - dotWidth / 2 + 'px'; + dot.style.top = dataPoint.screen.y - dotHeight / 2 + 'px'; +}; + +/** + * Hide the tooltip when displayed + * @private + */ +Graph3d.prototype._hideTooltip = function () { + if (this.tooltip) { + this.tooltip.dataPoint = null; + + for (var prop in this.tooltip.dom) { + if (this.tooltip.dom.hasOwnProperty(prop)) { + var elem = this.tooltip.dom[prop]; + if (elem && elem.parentNode) { + elem.parentNode.removeChild(elem); + } + } + } + } +}; + +/**--------------------------------------------------------------------------**/ + +/** + * Get the horizontal mouse position from a mouse event + * + * @param {Event} event + * @returns {number} mouse x + */ +function getMouseX(event) { + if ('clientX' in event) return event.clientX; + return event.targetTouches[0] && event.targetTouches[0].clientX || 0; +} + +/** + * Get the vertical mouse position from a mouse event + * + * @param {Event} event + * @returns {number} mouse y + */ +function getMouseY(event) { + if ('clientY' in event) return event.clientY; + return event.targetTouches[0] && event.targetTouches[0].clientY || 0; +} + +// ----------------------------------------------------------------------------- +// Public methods for specific settings +// ----------------------------------------------------------------------------- + +/** + * Set the rotation and distance of the camera + * + * @param {Object} pos An object with the camera position + * @param {number} [pos.horizontal] The horizontal rotation, between 0 and 2*PI. + * Optional, can be left undefined. + * @param {number} [pos.vertical] The vertical rotation, between 0 and 0.5*PI. + * if vertical=0.5*PI, the graph is shown from + * the top. Optional, can be left undefined. + * @param {number} [pos.distance] The (normalized) distance of the camera to the + * center of the graph, a value between 0.71 and + * 5.0. Optional, can be left undefined. + */ +Graph3d.prototype.setCameraPosition = function (pos) { + Settings.setCameraPosition(pos, this); + this.redraw(); +}; + +/** + * Set a new size for the graph + * + * @param {string} width Width in pixels or percentage (for example '800px' + * or '50%') + * @param {string} height Height in pixels or percentage (for example '400px' + * or '30%') + */ +Graph3d.prototype.setSize = function (width, height) { + this._setSize(width, height); + this.redraw(); +}; + +// ----------------------------------------------------------------------------- +// End public methods for specific settings +// ----------------------------------------------------------------------------- + + +module.exports = Graph3d; + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(163); +module.exports = __webpack_require__(7).Object.assign; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(17); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(164) }); + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(33); +var gOPS = __webpack_require__(63); +var pIE = __webpack_require__(42); +var toObject = __webpack_require__(41); +var IObject = __webpack_require__(78); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(28)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(166), __esModule: true }; + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(167); +module.exports = __webpack_require__(7).Math.sign; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__(17); + +$export($export.S, 'Math', { sign: __webpack_require__(168) }); + + +/***/ }), +/* 168 */ +/***/ (function(module, exports) { + +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(170), __esModule: true }; + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(171); +var $Object = __webpack_require__(7).Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; + + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(17); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(21), 'Object', { defineProperty: __webpack_require__(20).f }); + + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * This object contains all possible options. It will check if the types are correct, if required if the option is one + * of the allowed values. + * + * __any__ means that the name of the property does not matter. + * __type__ is a required field for all objects and contains the allowed types of all objects + */ +var string = 'string'; +var bool = 'boolean'; +var number = 'number'; +var object = 'object'; // should only be in a __type__ property +// Following not used here, but useful for reference +//let array = 'array'; +//let dom = 'dom'; +//let any = 'any'; + + +var colorOptions = { + fill: { string: string }, + stroke: { string: string }, + strokeWidth: { number: number }, + __type__: { string: string, object: object, 'undefined': 'undefined' } +}; + +/** + * Order attempted to be alphabetical. + * - x/y/z-prefixes ignored in sorting + * - __type__ always at end + * - globals at end + */ +var allOptions = { + animationAutoStart: { boolean: bool, 'undefined': 'undefined' }, + animationInterval: { number: number }, + animationPreload: { boolean: bool }, + axisColor: { string: string }, + backgroundColor: colorOptions, + xBarWidth: { number: number, 'undefined': 'undefined' }, + yBarWidth: { number: number, 'undefined': 'undefined' }, + cameraPosition: { + distance: { number: number }, + horizontal: { number: number }, + vertical: { number: number }, + __type__: { object: object } + }, + xCenter: { string: string }, + yCenter: { string: string }, + dataColor: colorOptions, + dotSizeMinFraction: { number: number }, + dotSizeMaxFraction: { number: number }, + dotSizeRatio: { number: number }, + filterLabel: { string: string }, + gridColor: { string: string }, + onclick: { 'function': 'function' }, + keepAspectRatio: { boolean: bool }, + xLabel: { string: string }, + yLabel: { string: string }, + zLabel: { string: string }, + legendLabel: { string: string }, + xMin: { number: number, 'undefined': 'undefined' }, + yMin: { number: number, 'undefined': 'undefined' }, + zMin: { number: number, 'undefined': 'undefined' }, + xMax: { number: number, 'undefined': 'undefined' }, + yMax: { number: number, 'undefined': 'undefined' }, + zMax: { number: number, 'undefined': 'undefined' }, + showAnimationControls: { boolean: bool, 'undefined': 'undefined' }, + showGrid: { boolean: bool }, + showLegend: { boolean: bool, 'undefined': 'undefined' }, + showPerspective: { boolean: bool }, + showShadow: { boolean: bool }, + showXAxis: { boolean: bool }, + showYAxis: { boolean: bool }, + showZAxis: { boolean: bool }, + xStep: { number: number, 'undefined': 'undefined' }, + yStep: { number: number, 'undefined': 'undefined' }, + zStep: { number: number, 'undefined': 'undefined' }, + style: { + number: number, // TODO: either Graph3d.DEFAULT has string, or number allowed in documentation + string: ['bar', 'bar-color', 'bar-size', 'dot', 'dot-line', 'dot-color', 'dot-size', 'line', 'grid', 'surface'] + }, + tooltip: { boolean: bool, 'function': 'function' }, + tooltipStyle: { + content: { + color: { string: string }, + background: { string: string }, + border: { string: string }, + borderRadius: { string: string }, + boxShadow: { string: string }, + padding: { string: string }, + __type__: { object: object } + }, + line: { + borderLeft: { string: string }, + height: { string: string }, + width: { string: string }, + __type__: { object: object } + }, + dot: { + border: { string: string }, + borderRadius: { string: string }, + height: { string: string }, + width: { string: string }, + __type__: { object: object } + }, + __type__: { object: object } + }, + xValueLabel: { 'function': 'function' }, + yValueLabel: { 'function': 'function' }, + zValueLabel: { 'function': 'function' }, + valueMax: { number: number, 'undefined': 'undefined' }, + valueMin: { number: number, 'undefined': 'undefined' }, + verticalRatio: { number: number }, + + //globals : + height: { string: string }, + width: { string: string }, + __type__: { object: object } +}; + +exports.allOptions = allOptions; + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var DataSet = __webpack_require__(11); +var DataView = __webpack_require__(12); +var Range = __webpack_require__(174); +var Filter = __webpack_require__(96); +var Settings = __webpack_require__(94); +var Point3d = __webpack_require__(34); + +/** + * Creates a container for all data of one specific 3D-graph. + * + * On construction, the container is totally empty; the data + * needs to be initialized with method initializeData(). + * Failure to do so will result in the following exception begin thrown + * on instantiation of Graph3D: + * + * Error: Array, DataSet, or DataView expected + * + * @constructor DataGroup + */ +function DataGroup() { + this.dataTable = null; // The original data table +} + +/** + * Initializes the instance from the passed data. + * + * Calculates minimum and maximum values and column index values. + * + * The graph3d instance is used internally to access the settings for + * the given instance. + * TODO: Pass settings only instead. + * + * @param {vis.Graph3d} graph3d Reference to the calling Graph3D instance. + * @param {Array | DataSet | DataView} rawData The data containing the items for + * the Graph. + * @param {number} style Style Number + * @returns {Array.} + */ +DataGroup.prototype.initializeData = function (graph3d, rawData, style) { + if (rawData === undefined) return; + + if (Array.isArray(rawData)) { + rawData = new DataSet(rawData); + } + + var data; + if (rawData instanceof DataSet || rawData instanceof DataView) { + data = rawData.get(); + } else { + throw new Error('Array, DataSet, or DataView expected'); + } + + if (data.length == 0) return; + + this.style = style; + + // unsubscribe from the dataTable + if (this.dataSet) { + this.dataSet.off('*', this._onChange); + } + + this.dataSet = rawData; + this.dataTable = data; + + // subscribe to changes in the dataset + var me = this; + this._onChange = function () { + graph3d.setData(me.dataSet); + }; + this.dataSet.on('*', this._onChange); + + // determine the location of x,y,z,value,filter columns + this.colX = 'x'; + this.colY = 'y'; + this.colZ = 'z'; + + var withBars = graph3d.hasBars(style); + + // determine barWidth from data + if (withBars) { + if (graph3d.defaultXBarWidth !== undefined) { + this.xBarWidth = graph3d.defaultXBarWidth; + } else { + this.xBarWidth = this.getSmallestDifference(data, this.colX) || 1; + } + + if (graph3d.defaultYBarWidth !== undefined) { + this.yBarWidth = graph3d.defaultYBarWidth; + } else { + this.yBarWidth = this.getSmallestDifference(data, this.colY) || 1; + } + } + + // calculate minima and maxima + this._initializeRange(data, this.colX, graph3d, withBars); + this._initializeRange(data, this.colY, graph3d, withBars); + this._initializeRange(data, this.colZ, graph3d, false); + + if (data[0].hasOwnProperty('style')) { + this.colValue = 'style'; + var valueRange = this.getColumnRange(data, this.colValue); + this._setRangeDefaults(valueRange, graph3d.defaultValueMin, graph3d.defaultValueMax); + this.valueRange = valueRange; + } + + // Initialize data filter if a filter column is provided + var table = this.getDataTable(); + if (table[0].hasOwnProperty('filter')) { + if (this.dataFilter === undefined) { + this.dataFilter = new Filter(this, 'filter', graph3d); + this.dataFilter.setOnLoadCallback(function () { + graph3d.redraw(); + }); + } + } + + var dataPoints; + if (this.dataFilter) { + // apply filtering + dataPoints = this.dataFilter._getDataPoints(); + } else { + // no filtering. load all data + dataPoints = this._getDataPoints(this.getDataTable()); + } + return dataPoints; +}; + +/** + * Collect the range settings for the given data column. + * + * This internal method is intended to make the range + * initalization more generic. + * + * TODO: if/when combined settings per axis defined, get rid of this. + * + * @private + * + * @param {'x'|'y'|'z'} column The data column to process + * @param {vis.Graph3d} graph3d Reference to the calling Graph3D instance; + * required for access to settings + * @returns {Object} + */ +DataGroup.prototype._collectRangeSettings = function (column, graph3d) { + var index = ['x', 'y', 'z'].indexOf(column); + + if (index == -1) { + throw new Error('Column \'' + column + '\' invalid'); + } + + var upper = column.toUpperCase(); + + return { + barWidth: this[column + 'BarWidth'], + min: graph3d['default' + upper + 'Min'], + max: graph3d['default' + upper + 'Max'], + step: graph3d['default' + upper + 'Step'], + range_label: column + 'Range', // Name of instance field to write to + step_label: column + 'Step' // Name of instance field to write to + }; +}; + +/** + * Initializes the settings per given column. + * + * TODO: if/when combined settings per axis defined, rewrite this. + * + * @private + * + * @param {DataSet | DataView} data The data containing the items for the Graph + * @param {'x'|'y'|'z'} column The data column to process + * @param {vis.Graph3d} graph3d Reference to the calling Graph3D instance; + * required for access to settings + * @param {boolean} withBars True if initializing for bar graph + */ +DataGroup.prototype._initializeRange = function (data, column, graph3d, withBars) { + var NUMSTEPS = 5; + var settings = this._collectRangeSettings(column, graph3d); + + var range = this.getColumnRange(data, column); + if (withBars && column != 'z') { + // Safeguard for 'z'; it doesn't have a bar width + range.expand(settings.barWidth / 2); + } + + this._setRangeDefaults(range, settings.min, settings.max); + this[settings.range_label] = range; + this[settings.step_label] = settings.step !== undefined ? settings.step : range.range() / NUMSTEPS; +}; + +/** + * Creates a list with all the different values in the data for the given column. + * + * If no data passed, use the internal data of this instance. + * + * @param {'x'|'y'|'z'} column The data column to process + * @param {DataSet|DataView|undefined} data The data containing the items for the Graph + * + * @returns {Array} All distinct values in the given column data, sorted ascending. + */ +DataGroup.prototype.getDistinctValues = function (column, data) { + if (data === undefined) { + data = this.dataTable; + } + + var values = []; + + for (var i = 0; i < data.length; i++) { + var value = data[i][column] || 0; + if (values.indexOf(value) === -1) { + values.push(value); + } + } + + return values.sort(function (a, b) { + return a - b; + }); +}; + +/** + * Determine the smallest difference between the values for given + * column in the passed data set. + * + * @param {DataSet|DataView|undefined} data The data containing the items for the Graph + * @param {'x'|'y'|'z'} column The data column to process + * + * @returns {number|null} Smallest difference value or + * null, if it can't be determined. + */ +DataGroup.prototype.getSmallestDifference = function (data, column) { + var values = this.getDistinctValues(data, column); + + // Get all the distinct diffs + // Array values is assumed to be sorted here + var smallest_diff = null; + + for (var i = 1; i < values.length; i++) { + var diff = values[i] - values[i - 1]; + + if (smallest_diff == null || smallest_diff > diff) { + smallest_diff = diff; + } + } + + return smallest_diff; +}; + +/** + * Get the absolute min/max values for the passed data column. + * + * @param {DataSet|DataView|undefined} data The data containing the items for the Graph + * @param {'x'|'y'|'z'} column The data column to process + * + * @returns {Range} A Range instance with min/max members properly set. + */ +DataGroup.prototype.getColumnRange = function (data, column) { + var range = new Range(); + + // Adjust the range so that it covers all values in the passed data elements. + for (var i = 0; i < data.length; i++) { + var item = data[i][column]; + range.adjust(item); + } + + return range; +}; + +/** + * Determines the number of rows in the current data. + * + * @returns {number} + */ +DataGroup.prototype.getNumberOfRows = function () { + return this.dataTable.length; +}; + +/** + * Set default values for range + * + * The default values override the range values, if defined. + * + * Because it's possible that only defaultMin or defaultMax is set, it's better + * to pass in a range already set with the min/max set from the data. Otherwise, + * it's quite hard to process the min/max properly. + * + * @param {vis.Range} range + * @param {number} [defaultMin=range.min] + * @param {number} [defaultMax=range.max] + * @private + */ +DataGroup.prototype._setRangeDefaults = function (range, defaultMin, defaultMax) { + if (defaultMin !== undefined) { + range.min = defaultMin; + } + + if (defaultMax !== undefined) { + range.max = defaultMax; + } + + // This is the original way that the default min/max values were adjusted. + // TODO: Perhaps it's better if an error is thrown if the values do not agree. + // But this will change the behaviour. + if (range.max <= range.min) range.max = range.min + 1; +}; + +DataGroup.prototype.getDataTable = function () { + return this.dataTable; +}; + +DataGroup.prototype.getDataSet = function () { + return this.dataSet; +}; + +/** + * Return all data values as a list of Point3d objects + * @param {Array.} data + * @returns {Array.} + */ +DataGroup.prototype.getDataPoints = function (data) { + var dataPoints = []; + + for (var i = 0; i < data.length; i++) { + var point = new Point3d(); + point.x = data[i][this.colX] || 0; + point.y = data[i][this.colY] || 0; + point.z = data[i][this.colZ] || 0; + point.data = data[i]; + + if (this.colValue !== undefined) { + point.value = data[i][this.colValue] || 0; + } + + var obj = {}; + obj.point = point; + obj.bottom = new Point3d(point.x, point.y, this.zRange.min); + obj.trans = undefined; + obj.screen = undefined; + + dataPoints.push(obj); + } + + return dataPoints; +}; + +/** + * Copy all values from the data table to a matrix. + * + * The provided values are supposed to form a grid of (x,y) positions. + * @param {Array.} data + * @returns {Array.} + * @private + */ +DataGroup.prototype.initDataAsMatrix = function (data) { + // TODO: store the created matrix dataPoints in the filters instead of + // reloading each time. + var x, y, i, obj; + + // create two lists with all present x and y values + var dataX = this.getDistinctValues(this.colX, data); + var dataY = this.getDistinctValues(this.colY, data); + + var dataPoints = this.getDataPoints(data); + + // create a grid, a 2d matrix, with all values. + var dataMatrix = []; // temporary data matrix + for (i = 0; i < dataPoints.length; i++) { + obj = dataPoints[i]; + + // TODO: implement Array().indexOf() for Internet Explorer + var xIndex = dataX.indexOf(obj.point.x); + var yIndex = dataY.indexOf(obj.point.y); + + if (dataMatrix[xIndex] === undefined) { + dataMatrix[xIndex] = []; + } + + dataMatrix[xIndex][yIndex] = obj; + } + + // fill in the pointers to the neighbors. + for (x = 0; x < dataMatrix.length; x++) { + for (y = 0; y < dataMatrix[x].length; y++) { + if (dataMatrix[x][y]) { + dataMatrix[x][y].pointRight = x < dataMatrix.length - 1 ? dataMatrix[x + 1][y] : undefined; + dataMatrix[x][y].pointTop = y < dataMatrix[x].length - 1 ? dataMatrix[x][y + 1] : undefined; + dataMatrix[x][y].pointCross = x < dataMatrix.length - 1 && y < dataMatrix[x].length - 1 ? dataMatrix[x + 1][y + 1] : undefined; + } + } + } + + return dataPoints; +}; + +/** + * Return common information, if present + * + * @returns {string} + */ +DataGroup.prototype.getInfo = function () { + var dataFilter = this.dataFilter; + if (!dataFilter) return undefined; + + return dataFilter.getLabel() + ': ' + dataFilter.getSelectedValue(); +}; + +/** + * Reload the data + */ +DataGroup.prototype.reload = function () { + if (this.dataTable) { + this.setData(this.dataTable); + } +}; + +/** + * Filter the data based on the current filter + * + * @param {Array} data + * @returns {Array} dataPoints Array with point objects which can be drawn on + * screen + */ +DataGroup.prototype._getDataPoints = function (data) { + var dataPoints = []; + + if (this.style === Settings.STYLE.GRID || this.style === Settings.STYLE.SURFACE) { + dataPoints = this.initDataAsMatrix(data); + } else { + // 'dot', 'dot-line', etc. + this._checkValueField(data); + dataPoints = this.getDataPoints(data); + + if (this.style === Settings.STYLE.LINE) { + // Add next member points for line drawing + for (var i = 0; i < dataPoints.length; i++) { + if (i > 0) { + dataPoints[i - 1].pointNext = dataPoints[i]; + } + } + } + } + + return dataPoints; +}; + +/** + * Check if the state is consistent for the use of the value field. + * + * Throws if a problem is detected. + * + * @param {Array.} data + * @private + */ +DataGroup.prototype._checkValueField = function (data) { + + var hasValueField = this.style === Settings.STYLE.BARCOLOR || this.style === Settings.STYLE.BARSIZE || this.style === Settings.STYLE.DOTCOLOR || this.style === Settings.STYLE.DOTSIZE; + + if (!hasValueField) { + return; // No need to check further + } + + // Following field must be present for the current graph style + if (this.colValue === undefined) { + throw new Error('Expected data to have ' + ' field \'style\' ' + ' for graph style \'' + this.style + '\''); + } + + // The data must also contain this field. + // Note that only first data element is checked. + if (data[0][this.colValue] === undefined) { + throw new Error('Expected data to have ' + ' field \'' + this.colValue + '\' ' + ' for graph style \'' + this.style + '\''); + } +}; + +module.exports = DataGroup; + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * @prototype Range + * + * Helper class to make working with related min and max values easier. + * + * The range is inclusive; a given value is considered part of the range if: + * + * this.min <= value <= this.max + */ +function Range() { + this.min = undefined; + this.max = undefined; +} + +/** + * Adjust the range so that the passed value fits in it. + * + * If the value is outside of the current extremes, adjust + * the min or max so that the value is within the range. + * + * @param {number} value Numeric value to fit in range + */ +Range.prototype.adjust = function (value) { + if (value === undefined) return; + + if (this.min === undefined || this.min > value) { + this.min = value; + } + + if (this.max === undefined || this.max < value) { + this.max = value; + } +}; + +/** + * Adjust the current range so that the passed range fits in it. + * + * @param {Range} range Range instance to fit in current instance + */ +Range.prototype.combine = function (range) { + this.add(range.min); + this.add(range.max); +}; + +/** + * Expand the range by the given value + * + * min will be lowered by given value; + * max will be raised by given value + * + * Shrinking by passing a negative value is allowed. + * + * @param {number} val Amount by which to expand or shrink current range with + */ +Range.prototype.expand = function (val) { + if (val === undefined) { + return; + } + + var newMin = this.min - val; + var newMax = this.max + val; + + // Note that following allows newMin === newMax. + // This should be OK, since method expand() allows this also. + if (newMin > newMax) { + throw new Error('Passed expansion value makes range invalid'); + } + + this.min = newMin; + this.max = newMax; +}; + +/** + * Determine the full range width of current instance. + * + * @returns {num} The calculated width of this range + */ +Range.prototype.range = function () { + return this.max - this.min; +}; + +/** + * Determine the central point of current instance. + * + * @returns {number} the value in the middle of min and max + */ +Range.prototype.center = function () { + return (this.min + this.max) / 2; +}; + +module.exports = Range; + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; + +(function (factory) { + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + window.propagating = factory(); + } +}(function () { + var _firstTarget = null; // singleton, will contain the target element where the touch event started + + /** + * Extend an Hammer.js instance with event propagation. + * + * Features: + * - Events emitted by hammer will propagate in order from child to parent + * elements. + * - Events are extended with a function `event.stopPropagation()` to stop + * propagation to parent elements. + * - An option `preventDefault` to stop all default browser behavior. + * + * Usage: + * var hammer = propagatingHammer(new Hammer(element)); + * var hammer = propagatingHammer(new Hammer(element), {preventDefault: true}); + * + * @param {Hammer.Manager} hammer An hammer instance. + * @param {Object} [options] Available options: + * - `preventDefault: true | false | 'mouse' | 'touch' | 'pen'`. + * Enforce preventing the default browser behavior. + * Cannot be set to `false`. + * @return {Hammer.Manager} Returns the same hammer instance with extended + * functionality + */ + return function propagating(hammer, options) { + var _options = options || { + preventDefault: false + }; + + if (hammer.Manager) { + // This looks like the Hammer constructor. + // Overload the constructors with our own. + var Hammer = hammer; + + var PropagatingHammer = function(element, options) { + var o = Object.create(_options); + if (options) Hammer.assign(o, options); + return propagating(new Hammer(element, o), o); + }; + Hammer.assign(PropagatingHammer, Hammer); + + PropagatingHammer.Manager = function (element, options) { + var o = Object.create(_options); + if (options) Hammer.assign(o, options); + return propagating(new Hammer.Manager(element, o), o); + }; + + return PropagatingHammer; + } + + // create a wrapper object which will override the functions + // `on`, `off`, `destroy`, and `emit` of the hammer instance + var wrapper = Object.create(hammer); + + // attach to DOM element + var element = hammer.element; + + if(!element.hammer) element.hammer = []; + element.hammer.push(wrapper); + + // register an event to catch the start of a gesture and store the + // target in a singleton + hammer.on('hammer.input', function (event) { + if (_options.preventDefault === true || (_options.preventDefault === event.pointerType)) { + event.preventDefault(); + } + if (event.isFirst) { + _firstTarget = event.target; + } + }); + + /** @type {Object.>} */ + wrapper._handlers = {}; + + /** + * Register a handler for one or multiple events + * @param {String} events A space separated string with events + * @param {function} handler A callback function, called as handler(event) + * @returns {Hammer.Manager} Returns the hammer instance + */ + wrapper.on = function (events, handler) { + // register the handler + split(events).forEach(function (event) { + var _handlers = wrapper._handlers[event]; + if (!_handlers) { + wrapper._handlers[event] = _handlers = []; + + // register the static, propagated handler + hammer.on(event, propagatedHandler); + } + _handlers.push(handler); + }); + + return wrapper; + }; + + /** + * Unregister a handler for one or multiple events + * @param {String} events A space separated string with events + * @param {function} [handler] Optional. The registered handler. If not + * provided, all handlers for given events + * are removed. + * @returns {Hammer.Manager} Returns the hammer instance + */ + wrapper.off = function (events, handler) { + // unregister the handler + split(events).forEach(function (event) { + var _handlers = wrapper._handlers[event]; + if (_handlers) { + _handlers = handler ? _handlers.filter(function (h) { + return h !== handler; + }) : []; + + if (_handlers.length > 0) { + wrapper._handlers[event] = _handlers; + } + else { + // remove static, propagated handler + hammer.off(event, propagatedHandler); + delete wrapper._handlers[event]; + } + } + }); + + return wrapper; + }; + + /** + * Emit to the event listeners + * @param {string} eventType + * @param {Event} event + */ + wrapper.emit = function(eventType, event) { + _firstTarget = event.target; + hammer.emit(eventType, event); + }; + + wrapper.destroy = function () { + // Detach from DOM element + var hammers = hammer.element.hammer; + var idx = hammers.indexOf(wrapper); + if(idx !== -1) hammers.splice(idx,1); + if(!hammers.length) delete hammer.element.hammer; + + // clear all handlers + wrapper._handlers = {}; + + // call original hammer destroy + hammer.destroy(); + }; + + // split a string with space separated words + function split(events) { + return events.match(/[^ ]+/g); + } + + /** + * A static event handler, applying event propagation. + * @param {Object} event + */ + function propagatedHandler(event) { + // let only a single hammer instance handle this event + if (event.type !== 'hammer.input') { + // it is possible that the same srcEvent is used with multiple hammer events, + // we keep track on which events are handled in an object _handled + if (!event.srcEvent._handled) { + event.srcEvent._handled = {}; + } + + if (event.srcEvent._handled[event.type]) { + return; + } + else { + event.srcEvent._handled[event.type] = true; + } + } + + // attach a stopPropagation function to the event + var stopped = false; + event.stopPropagation = function () { + stopped = true; + }; + + //wrap the srcEvent's stopPropagation to also stop hammer propagation: + var srcStop = event.srcEvent.stopPropagation.bind(event.srcEvent); + if(typeof srcStop == "function") { + event.srcEvent.stopPropagation = function(){ + srcStop(); + event.stopPropagation(); + } + } + + // attach firstTarget property to the event + event.firstTarget = _firstTarget; + + // propagate over all elements (until stopped) + var elem = _firstTarget; + while (elem && !stopped) { + var elemHammer = elem.hammer; + if(elemHammer){ + var _handlers; + for(var k = 0; k < elemHammer.length; k++){ + _handlers = elemHammer[k]._handlers[event.type]; + if(_handlers) for (var i = 0; i < _handlers.length && !stopped; i++) { + _handlers[i](event); + } + } + } + elem = elem.parentNode; + } + } + + return wrapper; + }; +})); + + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22 + * http://hammerjs.github.io/ + * + * Copyright (c) 2016 Jorik Tangelder; + * Licensed under the MIT license */ +(function(window, document, exportName, undefined) { + 'use strict'; + +var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; +var TEST_ELEMENT = document.createElement('div'); + +var TYPE_FUNCTION = 'function'; + +var round = Math.round; +var abs = Math.abs; +var now = Date.now; + +/** + * set a timeout with a given scope + * @param {Function} fn + * @param {Number} timeout + * @param {Object} context + * @returns {number} + */ +function setTimeoutContext(fn, timeout, context) { + return setTimeout(bindFn(fn, context), timeout); +} + +/** + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ +function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + return false; +} + +/** + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ +function each(obj, iterator, context) { + var i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } +} + +/** + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ +function deprecate(method, name, message) { + var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; + return function() { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '') + .replace(/^\s+at\s+/gm, '') + .replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + + var log = window.console && (window.console.warn || window.console.log); + if (log) { + log.call(window.console, deprecationMessage, stack); + } + return method.apply(this, arguments); + }; +} + +/** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ +var assign; +if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + return output; + }; +} else { + assign = Object.assign; +} + +/** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest + */ +var extend = deprecate(function extend(dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + while (i < keys.length) { + if (!merge || (merge && dest[keys[i]] === undefined)) { + dest[keys[i]] = src[keys[i]]; + } + i++; + } + return dest; +}, 'extend', 'Use `assign`.'); + +/** + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ +var merge = deprecate(function merge(dest, src) { + return extend(dest, src, true); +}, 'merge', 'Use `assign`.'); + +/** + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ +function inherit(child, base, properties) { + var baseP = base.prototype, + childP; + + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + assign(childP, properties); + } +} + +/** + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ +function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; +} + +/** + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ +function boolOrFn(val, args) { + if (typeof val == TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + return val; +} + +/** + * use the val2 when val1 is undefined + * @param {*} val1 + * @param {*} val2 + * @returns {*} + */ +function ifUndefined(val1, val2) { + return (val1 === undefined) ? val2 : val1; +} + +/** + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function addEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.addEventListener(type, handler, false); + }); +} + +/** + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function removeEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.removeEventListener(type, handler, false); + }); +} + +/** + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ +function hasParent(node, parent) { + while (node) { + if (node == parent) { + return true; + } + node = node.parentNode; + } + return false; +} + +/** + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ +function inStr(str, find) { + return str.indexOf(find) > -1; +} + +/** + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ +function splitStr(str) { + return str.trim().split(/\s+/g); +} + +/** + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ +function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + while (i < src.length) { + if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { + return i; + } + i++; + } + return -1; + } +} + +/** + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ +function toArray(obj) { + return Array.prototype.slice.call(obj, 0); +} + +/** + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ +function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + if (inArray(values, val) < 0) { + results.push(src[i]); + } + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function sortUniqueArray(a, b) { + return a[key] > b[key]; + }); + } + } + + return results; +} + +/** + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ +function prefixed(obj, property) { + var prefix, prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + + var i = 0; + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = (prefix) ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + i++; + } + return undefined; +} + +/** + * get a unique id + * @returns {number} uniqueId + */ +var _uniqueId = 1; +function uniqueId() { + return _uniqueId++; +} + +/** + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ +function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return (doc.defaultView || doc.parentWindow || window); +} + +var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + +var SUPPORT_TOUCH = ('ontouchstart' in window); +var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; +var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + +var INPUT_TYPE_TOUCH = 'touch'; +var INPUT_TYPE_PEN = 'pen'; +var INPUT_TYPE_MOUSE = 'mouse'; +var INPUT_TYPE_KINECT = 'kinect'; + +var COMPUTE_INTERVAL = 25; + +var INPUT_START = 1; +var INPUT_MOVE = 2; +var INPUT_END = 4; +var INPUT_CANCEL = 8; + +var DIRECTION_NONE = 1; +var DIRECTION_LEFT = 2; +var DIRECTION_RIGHT = 4; +var DIRECTION_UP = 8; +var DIRECTION_DOWN = 16; + +var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; +var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; +var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + +var PROPS_XY = ['x', 'y']; +var PROPS_CLIENT_XY = ['clientX', 'clientY']; + +/** + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ +function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; + + // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + this.domHandler = function(ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + +} + +Input.prototype = { + /** + * should handle the inputEvent data and trigger the callback + * @virtual + */ + handler: function() { }, + + /** + * bind the events + */ + init: function() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }, + + /** + * unbind the events + */ + destroy: function() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + } +}; + +/** + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ +function createInputInstance(manager) { + var Type; + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + return new (Type)(manager, inputHandler); +} + +/** + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ +function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); + var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); + + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } + + // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + input.eventType = eventType; + + // compute scale, rotation etc + computeInputData(manager, input); + + // emit secret event + manager.emit('hammer.input', input); + + manager.recognize(input); + manager.session.prevInput = input; +} + +/** + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ +function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; + + // store the first input to calculate the distance and direction + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } + + // to compute scale and rotation we need to store the multiple touches + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + var firstInput = session.firstInput; + var firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; + + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + + input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > + session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); + + computeIntervalInputData(session, input); + + // find the correct target + var target = manager.element; + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + input.target = target; +} + +function computeDeltaXY(session, input) { + var center = input.center; + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); +} + +/** + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ +function computeIntervalInputData(session, input) { + var last = session.lastInterval || input, + deltaTime = input.timeStamp - last.timeStamp, + velocity, velocityX, velocityY, direction; + + if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; + + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; +} + +/** + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ +function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; +} + +/** + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ +function getCenter(pointers) { + var pointersLength = pointers.length; + + // no need to loop when only one touch + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + var x = 0, y = 0, i = 0; + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; +} + +/** + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ +function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; +} + +/** + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ +function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; +} + +/** + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ +function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + + return Math.sqrt((x * x) + (y * y)); +} + +/** + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ +function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; +} + +/** + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ +function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); +} + +/** + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ +function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); +} + +var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END +}; + +var MOUSE_ELEMENT_EVENTS = 'mousedown'; +var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + +/** + * Mouse events input + * @constructor + * @extends Input + */ +function MouseInput() { + this.evEl = MOUSE_ELEMENT_EVENTS; + this.evWin = MOUSE_WINDOW_EVENTS; + + this.pressed = false; // mousedown state + + Input.apply(this, arguments); +} + +inherit(MouseInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function MEhandler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; + + // on start we want to have the left mouse button down + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } + + // mouse must be down + if (!this.pressed) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + } +}); + +var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL +}; + +// in IE10 the pointer types is defined as an enum +var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 +}; + +var POINTER_ELEMENT_EVENTS = 'pointerdown'; +var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; + +// IE10 has prefixed support, and case-sensitive +if (window.MSPointerEvent && !window.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; +} + +/** + * Pointer events input + * @constructor + * @extends Input + */ +function PointerEventInput() { + this.evEl = POINTER_ELEMENT_EVENTS; + this.evWin = POINTER_WINDOW_EVENTS; + + Input.apply(this, arguments); + + this.store = (this.manager.session.pointerEvents = []); +} + +inherit(PointerEventInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function PEhandler(ev) { + var store = this.store; + var removePointer = false; + + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + + var isTouch = (pointerType == INPUT_TYPE_TOUCH); + + // get index of the event in the store + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); + + // start and mouse must be down + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } + + // it not found, so the pointer hasn't been down (so it's probably a hover) + if (storeIndex < 0) { + return; + } + + // update the event in the store + store[storeIndex] = ev; + + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + } +}); + +var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; +var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Touch events input + * @constructor + * @extends Input + */ +function SingleTouchInput() { + this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + this.started = false; + + Input.apply(this, arguments); +} + +inherit(SingleTouchInput, Input, { + handler: function TEhandler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; + + // should we handle the touch events? + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + var touches = normalizeSingleTouches.call(this, ev, type); + + // when done, reset the started state + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); + +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; +} + +var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Multi-user touch events input + * @constructor + * @extends Input + */ +function TouchInput() { + this.evTarget = TOUCH_TARGET_EVENTS; + this.targetIds = {}; + + Input.apply(this, arguments); +} + +inherit(TouchInput, Input, { + handler: function MTEhandler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); + +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; + + // when there is only one touch, the process can be simplified + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + var i, + targetTouches, + changedTouches = toArray(ev.changedTouches), + changedTargetTouches = [], + target = this.target; + + // get target touches from touches + targetTouches = allTouches.filter(function(touch) { + return hasParent(touch.target, target); + }); + + // collect touches + if (type === INPUT_START) { + i = 0; + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } + + // filter changed touches to only contain touches that exist in the collected target ids + i = 0; + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } + + // cleanup removed touches + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [ + // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), + changedTargetTouches + ]; +} + +/** + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ + +var DEDUP_TIMEOUT = 2500; +var DEDUP_DISTANCE = 25; + +function TouchMouseInput() { + Input.apply(this, arguments); + + var handler = bindFn(this.handler, this); + this.touch = new TouchInput(this.manager, handler); + this.mouse = new MouseInput(this.manager, handler); + + this.primaryTouch = null; + this.lastTouches = []; +} + +inherit(TouchMouseInput, Input, { + /** + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + handler: function TMEhandler(manager, inputEvent, inputData) { + var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), + isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); + + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } + + // when we're in a touch event, record touches to de-dupe synthetic mouse event + if (isTouch) { + recordTouches.call(this, inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(this, inputData)) { + return; + } + + this.callback(manager, inputEvent, inputData); + }, + + /** + * remove the event listeners + */ + destroy: function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + } +}); + +function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } +} + +function setLastTouch(eventData) { + var touch = eventData.changedPointers[0]; + + if (touch.identifier === this.primaryTouch) { + var lastTouch = {x: touch.clientX, y: touch.clientY}; + this.lastTouches.push(lastTouch); + var lts = this.lastTouches; + var removeLastTouch = function() { + var i = lts.indexOf(lastTouch); + if (i > -1) { + lts.splice(i, 1); + } + }; + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } +} + +function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY; + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y); + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + return false; +} + +var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); +var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + +// magical touchAction value +var TOUCH_ACTION_COMPUTE = 'compute'; +var TOUCH_ACTION_AUTO = 'auto'; +var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented +var TOUCH_ACTION_NONE = 'none'; +var TOUCH_ACTION_PAN_X = 'pan-x'; +var TOUCH_ACTION_PAN_Y = 'pan-y'; +var TOUCH_ACTION_MAP = getTouchActionProps(); + +/** + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ +function TouchAction(manager, value) { + this.manager = manager; + this.set(value); +} + +TouchAction.prototype = { + /** + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + set: function(value) { + // find out the touch-action by the event handlers + if (value == TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + this.actions = value.toLowerCase().trim(); + }, + + /** + * just re-set the touchAction value + */ + update: function() { + this.set(this.manager.options.touchAction); + }, + + /** + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + compute: function() { + var actions = []; + each(this.manager.recognizers, function(recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }, + + /** + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + preventDefaults: function(input) { + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; + + // if the touch action did prevented once this session + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; + + if (hasNone) { + //do not prevent defaults if this is a tap gesture + + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; + + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + + if (hasNone || + (hasPanY && direction & DIRECTION_HORIZONTAL) || + (hasPanX && direction & DIRECTION_VERTICAL)) { + return this.preventSrc(srcEvent); + } + }, + + /** + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + preventSrc: function(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + } +}; + +/** + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ +function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + + // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } + + // pan-x OR pan-y + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } + + // manipulation + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; +} + +function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + var touchMap = {}; + var cssSupports = window.CSS && window.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) { + + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; + }); + return touchMap; +} + +/** + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ +var STATE_POSSIBLE = 1; +var STATE_BEGAN = 2; +var STATE_CHANGED = 4; +var STATE_ENDED = 8; +var STATE_RECOGNIZED = STATE_ENDED; +var STATE_CANCELLED = 16; +var STATE_FAILED = 32; + +/** + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ +function Recognizer(options) { + this.options = assign({}, this.defaults, options || {}); + + this.id = uniqueId(); + + this.manager = null; + + // default is enable true + this.options.enable = ifUndefined(this.options.enable, true); + + this.state = STATE_POSSIBLE; + + this.simultaneous = {}; + this.requireFail = []; +} + +Recognizer.prototype = { + /** + * @virtual + * @type {Object} + */ + defaults: {}, + + /** + * set options + * @param {Object} options + * @return {Recognizer} + */ + set: function(options) { + assign(this.options, options); + + // also update the touchAction, in case something changed about the directions/enabled state + this.manager && this.manager.touchAction.update(); + return this; + }, + + /** + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + recognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + return this; + }, + + /** + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRecognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }, + + /** + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + requireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + return this; + }, + + /** + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRequireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + if (index > -1) { + this.requireFail.splice(index, 1); + } + return this; + }, + + /** + * has require failures boolean + * @returns {boolean} + */ + hasRequireFailures: function() { + return this.requireFail.length > 0; + }, + + /** + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + canRecognizeWith: function(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }, + + /** + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + emit: function(input) { + var self = this; + var state = this.state; + + function emit(event) { + self.manager.emit(event, input); + } + + // 'panstart' and 'panmove' + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } + + // panend and pancancel + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }, + + /** + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + tryEmit: function(input) { + if (this.canEmit()) { + return this.emit(input); + } + // it's failing anyway + this.state = STATE_FAILED; + }, + + /** + * can we emit? + * @returns {boolean} + */ + canEmit: function() { + var i = 0; + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + i++; + } + return true; + }, + + /** + * update the recognizer + * @param {Object} inputData + */ + recognize: function(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign({}, inputData); + + // is is enabled and allow recognizing? + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } + + // reset when we've reached the end + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); + + // the recognizer has recognized a gesture + // so trigger an event + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }, + + /** + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {Const} STATE + */ + process: function(inputData) { }, // jshint ignore:line + + /** + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + getTouchAction: function() { }, + + /** + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + reset: function() { } +}; + +/** + * get a usable string, used as event postfix + * @param {Const} state + * @returns {String} state + */ +function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + return ''; +} + +/** + * direction cons to string + * @param {Const} direction + * @returns {String} + */ +function directionStr(direction) { + if (direction == DIRECTION_DOWN) { + return 'down'; + } else if (direction == DIRECTION_UP) { + return 'up'; + } else if (direction == DIRECTION_LEFT) { + return 'left'; + } else if (direction == DIRECTION_RIGHT) { + return 'right'; + } + return ''; +} + +/** + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ +function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + if (manager) { + return manager.get(otherRecognizer); + } + return otherRecognizer; +} + +/** + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ +function AttrRecognizer() { + Recognizer.apply(this, arguments); +} + +inherit(AttrRecognizer, Recognizer, { + /** + * @namespace + * @memberof AttrRecognizer + */ + defaults: { + /** + * @type {Number} + * @default 1 + */ + pointers: 1 + }, + + /** + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + attrTest: function(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }, + + /** + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + process: function(input) { + var state = this.state; + var eventType = input.eventType; + + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); + + // on cancel input and we've recognized before, return STATE_CANCELLED + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + return state | STATE_CHANGED; + } + return STATE_FAILED; + } +}); + +/** + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +function PanRecognizer() { + AttrRecognizer.apply(this, arguments); + + this.pX = null; + this.pY = null; +} + +inherit(PanRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PanRecognizer + */ + defaults: { + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, + + getTouchAction: function() { + var direction = this.options.direction; + var actions = []; + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + return actions; + }, + + directionTest: function(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; + + // lock to axis? + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x != this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y != this.pY; + distance = Math.abs(input.deltaY); + } + } + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }, + + attrTest: function(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && + (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); + }, + + emit: function(input) { + + this.pX = input.deltaX; + this.pY = input.deltaY; + + var direction = directionStr(input.direction); + + if (direction) { + input.additionalEvent = this.options.event + direction; + } + this._super.emit.call(this, input); + } +}); + +/** + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ +function PinchRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(PinchRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'pinch', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }, + + emit: function(input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + this._super.emit.call(this, input); + } +}); + +/** + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ +function PressRecognizer() { + Recognizer.apply(this, arguments); + + this._timer = null; + this._input = null; +} + +inherit(PressRecognizer, Recognizer, { + /** + * @namespace + * @memberof PressRecognizer + */ + defaults: { + event: 'press', + pointers: 1, + time: 251, // minimal time of the pointer to be pressed + threshold: 9 // a minimal movement is ok, but keep it low + }, + + getTouchAction: function() { + return [TOUCH_ACTION_AUTO]; + }, + + process: function(input) { + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + + this._input = input; + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.time, this); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + return STATE_FAILED; + }, + + reset: function() { + clearTimeout(this._timer); + }, + + emit: function(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && (input.eventType & INPUT_END)) { + this.manager.emit(this.options.event + 'up', input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + } +}); + +/** + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ +function RotateRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(RotateRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof RotateRecognizer + */ + defaults: { + event: 'rotate', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + } +}); + +/** + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +function SwipeRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(SwipeRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof SwipeRecognizer + */ + defaults: { + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, + + getTouchAction: function() { + return PanRecognizer.prototype.getTouchAction.call(this); + }, + + attrTest: function(input) { + var direction = this.options.direction; + var velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } + + return this._super.attrTest.call(this, input) && + direction & input.offsetDirection && + input.distance > this.options.threshold && + input.maxPointers == this.options.pointers && + abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }, + + emit: function(input) { + var direction = directionStr(input.offsetDirection); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + } +}); + +/** + * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ +function TapRecognizer() { + Recognizer.apply(this, arguments); + + // previous time and center, + // used for tap counting + this.pTime = false; + this.pCenter = false; + + this._timer = null; + this._input = null; + this.count = 0; +} + +inherit(TapRecognizer, Recognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, // max time between the multi-tap taps + time: 250, // max time of the pointer to be down (like finger on the screen) + threshold: 9, // a minimal movement is ok, but keep it low + posThreshold: 10 // a multi-tap can be a bit off the initial position + }, + + getTouchAction: function() { + return [TOUCH_ACTION_MANIPULATION]; + }, + + process: function(input) { + var options = this.options; + + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + + this.reset(); + + if ((input.eventType & INPUT_START) && (this.count === 0)) { + return this.failTimeout(); + } + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (validMovement && validTouchTime && validPointers) { + if (input.eventType != INPUT_END) { + return this.failTimeout(); + } + + var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; + + // if tap count matches we have recognized it, + // else it has began recognizing... + var tapCount = this.count % options.taps; + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.interval, this); + return STATE_BEGAN; + } + } + } + return STATE_FAILED; + }, + + failTimeout: function() { + this._timer = setTimeoutContext(function() { + this.state = STATE_FAILED; + }, this.options.interval, this); + return STATE_FAILED; + }, + + reset: function() { + clearTimeout(this._timer); + }, + + emit: function() { + if (this.state == STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + } +}); + +/** + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Hammer(element, options) { + options = options || {}; + options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); + return new Manager(element, options); +} + +/** + * @const {string} + */ +Hammer.VERSION = '2.0.7'; + +/** + * default settings + * @namespace + */ +Hammer.defaults = { + /** + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [ + // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, {enable: false}], + [PinchRecognizer, {enable: false}, ['rotate']], + [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}], + [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']], + [TapRecognizer], + [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']], + [PressRecognizer] + ], + + /** + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: 'none', + + /** + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: 'none', + + /** + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: 'none', + + /** + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: 'none', + + /** + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: 'none', + + /** + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: 'rgba(0,0,0,0)' + } +}; + +var STOP = 1; +var FORCED_STOP = 2; + +/** + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Manager(element, options) { + this.options = assign({}, Hammer.defaults, options || {}); + + this.options.inputTarget = this.options.inputTarget || element; + + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + + toggleCssProps(this, true); + + each(this.options.recognizers, function(item) { + var recognizer = this.add(new (item[0])(item[1])); + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); +} + +Manager.prototype = { + /** + * set options + * @param {Object} options + * @returns {Manager} + */ + set: function(options) { + assign(this.options, options); + + // Options that need a little more setup + if (options.touchAction) { + this.touchAction.update(); + } + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + return this; + }, + + /** + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + stop: function(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }, + + /** + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + recognize: function(inputData) { + var session = this.session; + if (session.stopped) { + return; + } + + // run the touch-action polyfill + this.touchAction.preventDefaults(inputData); + + var recognizer; + var recognizers = this.recognizers; + + // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + var curRecognizer = session.curRecognizer; + + // reset when the last recognizer is recognized + // or when we're in a new session + if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { + curRecognizer = session.curRecognizer = null; + } + + var i = 0; + while (i < recognizers.length) { + recognizer = recognizers[i]; + + // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer == curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } + + // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + curRecognizer = session.curRecognizer = recognizer; + } + i++; + } + }, + + /** + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + get: function(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + var recognizers = this.recognizers; + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event == recognizer) { + return recognizers[i]; + } + } + return null; + }, + + /** + * add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + add: function(recognizer) { + if (invokeArrayArg(recognizer, 'add', this)) { + return this; + } + + // remove existing + var existing = this.get(recognizer.options.event); + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + + this.touchAction.update(); + return recognizer; + }, + + /** + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + remove: function(recognizer) { + if (invokeArrayArg(recognizer, 'remove', this)) { + return this; + } + + recognizer = this.get(recognizer); + + // let's make sure this recognizer exists + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, recognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + + return this; + }, + + /** + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + on: function(events, handler) { + if (events === undefined) { + return; + } + if (handler === undefined) { + return; + } + + var handlers = this.handlers; + each(splitStr(events), function(event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }, + + /** + * unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + off: function(events, handler) { + if (events === undefined) { + return; + } + + var handlers = this.handlers; + each(splitStr(events), function(event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }, + + /** + * emit event to the listeners + * @param {String} event + * @param {Object} data + */ + emit: function(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } + + // no handlers, so skip it all + var handlers = this.handlers[event] && this.handlers[event].slice(); + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + data.preventDefault = function() { + data.srcEvent.preventDefault(); + }; + + var i = 0; + while (i < handlers.length) { + handlers[i](data); + i++; + } + }, + + /** + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + destroy: function() { + this.element && toggleCssProps(this, false); + + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + } +}; + +/** + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ +function toggleCssProps(manager, add) { + var element = manager.element; + if (!element.style) { + return; + } + var prop; + each(manager.options.cssProps, function(value, name) { + prop = prefixed(element.style, name); + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ''; + } + }); + if (!add) { + manager.oldCssProps = {}; + } +} + +/** + * trigger dom event + * @param {String} event + * @param {Object} data + */ +function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent('Event'); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); +} + +assign(Hammer, { + INPUT_START: INPUT_START, + INPUT_MOVE: INPUT_MOVE, + INPUT_END: INPUT_END, + INPUT_CANCEL: INPUT_CANCEL, + + STATE_POSSIBLE: STATE_POSSIBLE, + STATE_BEGAN: STATE_BEGAN, + STATE_CHANGED: STATE_CHANGED, + STATE_ENDED: STATE_ENDED, + STATE_RECOGNIZED: STATE_RECOGNIZED, + STATE_CANCELLED: STATE_CANCELLED, + STATE_FAILED: STATE_FAILED, + + DIRECTION_NONE: DIRECTION_NONE, + DIRECTION_LEFT: DIRECTION_LEFT, + DIRECTION_RIGHT: DIRECTION_RIGHT, + DIRECTION_UP: DIRECTION_UP, + DIRECTION_DOWN: DIRECTION_DOWN, + DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL: DIRECTION_VERTICAL, + DIRECTION_ALL: DIRECTION_ALL, + + Manager: Manager, + Input: Input, + TouchAction: TouchAction, + + TouchInput: TouchInput, + MouseInput: MouseInput, + PointerEventInput: PointerEventInput, + TouchMouseInput: TouchMouseInput, + SingleTouchInput: SingleTouchInput, + + Recognizer: Recognizer, + AttrRecognizer: AttrRecognizer, + Tap: TapRecognizer, + Pan: PanRecognizer, + Swipe: SwipeRecognizer, + Pinch: PinchRecognizer, + Rotate: RotateRecognizer, + Press: PressRecognizer, + + on: addEventListeners, + off: removeEventListeners, + each: each, + merge: merge, + extend: extend, + assign: assign, + inherit: inherit, + bindFn: bindFn, + prefixed: prefixed +}); + +// this prevents errors when Hammer is loaded in the presence of an AMD +// style loader but by script tag, not by the loader. +var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line +freeGlobal.Hammer = Hammer; + +if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return Hammer; + }.call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} else if (typeof module != 'undefined' && module.exports) { + module.exports = Hammer; +} else { + window[exportName] = Hammer; +} + +})(window, document, 'Hammer'); + + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// utils +exports.util = __webpack_require__(2); +exports.DOMutil = __webpack_require__(14); + +// data +exports.DataSet = __webpack_require__(11); +exports.DataView = __webpack_require__(12); +exports.Queue = __webpack_require__(43); + +// Timeline +exports.Timeline = __webpack_require__(178); +exports.Graph2d = __webpack_require__(180); +exports.timeline = { + Core: __webpack_require__(65), + DateUtil: __webpack_require__(36), + Range: __webpack_require__(64), + stack: __webpack_require__(100), + TimeStep: __webpack_require__(66), + + components: { + items: { + Item: __webpack_require__(38), + BackgroundItem: __webpack_require__(103), + BoxItem: __webpack_require__(101), + PointItem: __webpack_require__(102), + RangeItem: __webpack_require__(70) + }, + + BackgroundGroup: __webpack_require__(69), + Component: __webpack_require__(16), + CurrentTime: __webpack_require__(67), + CustomTime: __webpack_require__(46), + DataAxis: __webpack_require__(107), + DataScale: __webpack_require__(108), + GraphGroup: __webpack_require__(109), + Group: __webpack_require__(68), + ItemSet: __webpack_require__(99), + Legend: __webpack_require__(112), + LineGraph: __webpack_require__(106), + TimeAxis: __webpack_require__(45) + } +}; + +// bundled external libraries +exports.moment = __webpack_require__(9); +exports.Hammer = __webpack_require__(10); +exports.keycharm = __webpack_require__(35); + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var moment = __webpack_require__(9); +var util = __webpack_require__(2); +var DataSet = __webpack_require__(11); +var DataView = __webpack_require__(12); +var Range = __webpack_require__(64); +var Core = __webpack_require__(65); +var TimeAxis = __webpack_require__(45); +var CurrentTime = __webpack_require__(67); +var CustomTime = __webpack_require__(46); +var ItemSet = __webpack_require__(99); + +var printStyle = __webpack_require__(15).printStyle; +var allOptions = __webpack_require__(105).allOptions; +var configureOptions = __webpack_require__(105).configureOptions; + +var Configurator = __webpack_require__(71)['default']; +var Validator = __webpack_require__(15)['default']; + +/** + * Create a timeline visualization + * @param {HTMLElement} container + * @param {vis.DataSet | vis.DataView | Array} [items] + * @param {vis.DataSet | vis.DataView | Array} [groups] + * @param {Object} [options] See Timeline.setOptions for the available options. + * @constructor Timeline + * @extends Core + */ +function Timeline(container, items, groups, options) { + + if (!(this instanceof Timeline)) { + throw new SyntaxError('Constructor must be called with the new operator'); + } + + // if the third element is options, the forth is groups (optionally); + if (!(Array.isArray(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) { + var forthArgument = options; + options = groups; + groups = forthArgument; + } + + // TODO: REMOVE THIS in the next MAJOR release + // see https://github.com/almende/vis/issues/2511 + if (options && options.throttleRedraw) { + console.warn("Timeline option \"throttleRedraw\" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release."); + } + + var me = this; + this.defaultOptions = { + start: null, + end: null, + autoResize: true, + orientation: { + axis: 'bottom', // axis orientation: 'bottom', 'top', or 'both' + item: 'bottom' // not relevant + }, + moment: moment, + width: null, + height: null, + maxHeight: null, + minHeight: null + }; + this.options = util.deepExtend({}, this.defaultOptions); + + // Create the DOM, props, and emitter + this._create(container); + if (!options || options && typeof options.rtl == "undefined") { + this.dom.root.style.visibility = 'hidden'; + var directionFromDom, + domNode = this.dom.root; + while (!directionFromDom && domNode) { + directionFromDom = window.getComputedStyle(domNode, null).direction; + domNode = domNode.parentElement; + } + this.options.rtl = directionFromDom && directionFromDom.toLowerCase() == "rtl"; + } else { + this.options.rtl = options.rtl; + } + + this.options.rollingMode = options && options.rollingMode; + this.options.onInitialDrawComplete = options && options.onInitialDrawComplete; + + // all components listed here will be repainted automatically + this.components = []; + + this.body = { + dom: this.dom, + domProps: this.props, + emitter: { + on: this.on.bind(this), + off: this.off.bind(this), + emit: this.emit.bind(this) + }, + hiddenDates: [], + util: { + getScale: function getScale() { + return me.timeAxis.step.scale; + }, + getStep: function getStep() { + return me.timeAxis.step.step; + }, + + toScreen: me._toScreen.bind(me), + toGlobalScreen: me._toGlobalScreen.bind(me), // this refers to the root.width + toTime: me._toTime.bind(me), + toGlobalTime: me._toGlobalTime.bind(me) + } + }; + + // range + this.range = new Range(this.body, this.options); + this.components.push(this.range); + this.body.range = this.range; + + // time axis + this.timeAxis = new TimeAxis(this.body, this.options); + this.timeAxis2 = null; // used in case of orientation option 'both' + this.components.push(this.timeAxis); + + // current time bar + this.currentTime = new CurrentTime(this.body, this.options); + this.components.push(this.currentTime); + + // item set + this.itemSet = new ItemSet(this.body, this.options); + this.components.push(this.itemSet); + + this.itemsData = null; // DataSet + this.groupsData = null; // DataSet + + this.dom.root.onclick = function (event) { + me.emit('click', me.getEventProperties(event)); + }; + this.dom.root.ondblclick = function (event) { + me.emit('doubleClick', me.getEventProperties(event)); + }; + this.dom.root.oncontextmenu = function (event) { + me.emit('contextmenu', me.getEventProperties(event)); + }; + this.dom.root.onmouseover = function (event) { + me.emit('mouseOver', me.getEventProperties(event)); + }; + if (window.PointerEvent) { + this.dom.root.onpointerdown = function (event) { + me.emit('mouseDown', me.getEventProperties(event)); + }; + this.dom.root.onpointermove = function (event) { + me.emit('mouseMove', me.getEventProperties(event)); + }; + this.dom.root.onpointerup = function (event) { + me.emit('mouseUp', me.getEventProperties(event)); + }; + } else { + this.dom.root.onmousemove = function (event) { + me.emit('mouseMove', me.getEventProperties(event)); + }; + this.dom.root.onmousedown = function (event) { + me.emit('mouseDown', me.getEventProperties(event)); + }; + this.dom.root.onmouseup = function (event) { + me.emit('mouseUp', me.getEventProperties(event)); + }; + } + + //Single time autoscale/fit + this.initialFitDone = false; + this.on('changed', function () { + if (this.itemsData == null || this.options.rollingMode) return; + if (!me.initialFitDone) { + me.initialFitDone = true; + if (me.options.start != undefined || me.options.end != undefined) { + if (me.options.start == undefined || me.options.end == undefined) { + var range = me.getItemRange(); + } + + var start = me.options.start != undefined ? me.options.start : range.min; + var end = me.options.end != undefined ? me.options.end : range.max; + me.setWindow(start, end, { animation: false }); + } else { + me.fit({ animation: false }); + } + } + + if (!me.initialDrawDone && me.initialRangeChangeDone) { + me.initialDrawDone = true; + me.dom.root.style.visibility = 'visible'; + if (me.options.onInitialDrawComplete) { + setTimeout(function () { + return me.options.onInitialDrawComplete(); + }, 0); + } + } + }); + + // apply options + if (options) { + this.setOptions(options); + } + + // IMPORTANT: THIS HAPPENS BEFORE SET ITEMS! + if (groups) { + this.setGroups(groups); + } + + // create itemset + if (items) { + this.setItems(items); + } + + // draw for the first time + this._redraw(); +} + +// Extend the functionality from Core +Timeline.prototype = new Core(); + +/** + * Load a configurator + * @return {Object} + * @private + */ +Timeline.prototype._createConfigurator = function () { + return new Configurator(this, this.dom.container, configureOptions); +}; + +/** + * Force a redraw. The size of all items will be recalculated. + * Can be useful to manually redraw when option autoResize=false and the window + * has been resized, or when the items CSS has been changed. + * + * Note: this function will be overridden on construction with a trottled version + */ +Timeline.prototype.redraw = function () { + this.itemSet && this.itemSet.markDirty({ refreshItems: true }); + this._redraw(); +}; + +Timeline.prototype.setOptions = function (options) { + // validate options + var errorFound = Validator.validate(options, allOptions); + + if (errorFound === true) { + console.log('%cErrors have been found in the supplied options object.', printStyle); + } + Core.prototype.setOptions.call(this, options); + + if ('type' in options) { + if (options.type !== this.options.type) { + this.options.type = options.type; + + // force recreation of all items + var itemsData = this.itemsData; + if (itemsData) { + var selection = this.getSelection(); + this.setItems(null); // remove all + this.setItems(itemsData); // add all + this.setSelection(selection); // restore selection + } + } + } +}; + +/** + * Set items + * @param {vis.DataSet | Array | null} items + */ +Timeline.prototype.setItems = function (items) { + // convert to type DataSet when needed + var newDataSet; + if (!items) { + newDataSet = null; + } else if (items instanceof DataSet || items instanceof DataView) { + newDataSet = items; + } else { + // turn an array into a dataset + newDataSet = new DataSet(items, { + type: { + start: 'Date', + end: 'Date' + } + }); + } + + // set items + this.itemsData = newDataSet; + this.itemSet && this.itemSet.setItems(newDataSet); +}; + +/** + * Set groups + * @param {vis.DataSet | Array} groups + */ +Timeline.prototype.setGroups = function (groups) { + // convert to type DataSet when needed + var newDataSet; + if (!groups) { + newDataSet = null; + } else { + var filter = function filter(group) { + return group.visible !== false; + }; + if (groups instanceof DataSet || groups instanceof DataView) { + newDataSet = new DataView(groups, { filter: filter }); + } else { + // turn an array into a dataset + newDataSet = new DataSet(groups.filter(filter)); + } + } + + this.groupsData = newDataSet; + this.itemSet.setGroups(newDataSet); +}; + +/** + * Set both items and groups in one go + * @param {{items: (Array | vis.DataSet), groups: (Array | vis.DataSet)}} data + */ +Timeline.prototype.setData = function (data) { + if (data && data.groups) { + this.setGroups(data.groups); + } + + if (data && data.items) { + this.setItems(data.items); + } +}; + +/** + * Set selected items by their id. Replaces the current selection + * Unknown id's are silently ignored. + * @param {string[] | string} [ids] An array with zero or more id's of the items to be + * selected. If ids is an empty array, all items will be + * unselected. + * @param {Object} [options] Available options: + * `focus: boolean` + * If true, focus will be set to the selected item(s) + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * Only applicable when option focus is true. + */ +Timeline.prototype.setSelection = function (ids, options) { + this.itemSet && this.itemSet.setSelection(ids); + + if (options && options.focus) { + this.focus(ids, options); + } +}; + +/** + * Get the selected items by their id + * @return {Array} ids The ids of the selected items + */ +Timeline.prototype.getSelection = function () { + return this.itemSet && this.itemSet.getSelection() || []; +}; + +/** + * Adjust the visible window such that the selected item (or multiple items) + * are centered on screen. + * @param {string | String[]} id An item id or array with item ids + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + */ +Timeline.prototype.focus = function (id, options) { + if (!this.itemsData || id == undefined) return; + + var ids = Array.isArray(id) ? id : [id]; + + // get the specified item(s) + var itemsData = this.itemsData.getDataSet().get(ids, { + type: { + start: 'Date', + end: 'Date' + } + }); + + // calculate minimum start and maximum end of specified items + var start = null; + var end = null; + itemsData.forEach(function (itemData) { + var s = itemData.start.valueOf(); + var e = 'end' in itemData ? itemData.end.valueOf() : itemData.start.valueOf(); + + if (start === null || s < start) { + start = s; + } + + if (end === null || e > end) { + end = e; + } + }); + + if (start !== null && end !== null) { + var me = this; + // Use the first item for the vertical focus + var item = this.itemSet.items[ids[0]]; + var startPos = this._getScrollTop() * -1; + var initialVerticalScroll = null; + + // Setup a handler for each frame of the vertical scroll + var verticalAnimationFrame = function verticalAnimationFrame(ease, willDraw, done) { + var verticalScroll = getItemVerticalScroll(me, item); + + if (!initialVerticalScroll) { + initialVerticalScroll = verticalScroll; + } + + if (initialVerticalScroll.itemTop == verticalScroll.itemTop && !initialVerticalScroll.shouldScroll) { + return; // We don't need to scroll, so do nothing + } else if (initialVerticalScroll.itemTop != verticalScroll.itemTop && verticalScroll.shouldScroll) { + // The redraw shifted elements, so reset the animation to correct + initialVerticalScroll = verticalScroll; + startPos = me._getScrollTop() * -1; + } + + var from = startPos; + var to = initialVerticalScroll.scrollOffset; + var scrollTop = done ? to : from + (to - from) * ease; + + me._setScrollTop(-scrollTop); + + if (!willDraw) { + me._redraw(); + } + }; + + // Enforces the final vertical scroll position + var setFinalVerticalPosition = function setFinalVerticalPosition() { + var finalVerticalScroll = getItemVerticalScroll(me, item); + + if (finalVerticalScroll.shouldScroll && finalVerticalScroll.itemTop != initialVerticalScroll.itemTop) { + me._setScrollTop(-finalVerticalScroll.scrollOffset); + me._redraw(); + } + }; + + // Perform one last check at the end to make sure the final vertical + // position is correct + var finalVerticalCallback = function finalVerticalCallback() { + // Double check we ended at the proper scroll position + setFinalVerticalPosition(); + + // Let the redraw settle and finalize the position. + setTimeout(setFinalVerticalPosition, 100); + }; + + // calculate the new middle and interval for the window + var middle = (start + end) / 2; + var interval = Math.max(this.range.end - this.range.start, (end - start) * 1.1); + + var animation = options && options.animation !== undefined ? options.animation : true; + + if (!animation) { + // We aren't animating so set a default so that the final callback forces the vertical location + initialVerticalScroll = { shouldScroll: false, scrollOffset: -1, itemTop: -1 }; + } + + this.range.setRange(middle - interval / 2, middle + interval / 2, { animation: animation }, finalVerticalCallback, verticalAnimationFrame); + } +}; + +/** + * Set Timeline window such that it fits all items + * @param {Object} [options] Available options: + * `animation: boolean | {duration: number, easingFunction: string}` + * If true (default), the range is animated + * smoothly to the new window. An object can be + * provided to specify duration and easing function. + * Default duration is 500 ms, and default easing + * function is 'easeInOutQuad'. + * @param {function} [callback] + */ +Timeline.prototype.fit = function (options, callback) { + var animation = options && options.animation !== undefined ? options.animation : true; + var range; + + var dataset = this.itemsData && this.itemsData.getDataSet(); + if (dataset.length === 1 && dataset.get()[0].end === undefined) { + // a single item -> don't fit, just show a range around the item from -4 to +3 days + range = this.getDataRange(); + this.moveTo(range.min.valueOf(), { animation: animation }, callback); + } else { + // exactly fit the items (plus a small margin) + range = this.getItemRange(); + this.range.setRange(range.min, range.max, { animation: animation }, callback); + } +}; + +/** + * + * @param {vis.Item} item + * @returns {number} + */ +function getStart(item) { + return util.convert(item.data.start, 'Date').valueOf(); +} + +/** + * + * @param {vis.Item} item + * @returns {number} + */ +function getEnd(item) { + var end = item.data.end != undefined ? item.data.end : item.data.start; + return util.convert(end, 'Date').valueOf(); +} + +/** + * @param {vis.Timeline} timeline + * @param {vis.Item} item + * @return {{shouldScroll: bool, scrollOffset: number, itemTop: number}} + */ +function getItemVerticalScroll(timeline, item) { + var leftHeight = timeline.props.leftContainer.height; + var contentHeight = timeline.props.left.height; + + var group = item.parent; + var offset = group.top; + var shouldScroll = true; + var orientation = timeline.timeAxis.options.orientation.axis; + + var itemTop = function itemTop() { + if (orientation == "bottom") { + return group.height - item.top - item.height; + } else { + return item.top; + } + }; + + var currentScrollHeight = timeline._getScrollTop() * -1; + var targetOffset = offset + itemTop(); + var height = item.height; + + if (targetOffset < currentScrollHeight) { + if (offset + leftHeight <= offset + itemTop() + height) { + offset += itemTop() - timeline.itemSet.options.margin.item.vertical; + } + } else if (targetOffset + height > currentScrollHeight + leftHeight) { + offset += itemTop() + height - leftHeight + timeline.itemSet.options.margin.item.vertical; + } else { + shouldScroll = false; + } + + offset = Math.min(offset, contentHeight - leftHeight); + + return { shouldScroll: shouldScroll, scrollOffset: offset, itemTop: targetOffset }; +} + +/** + * Determine the range of the items, taking into account their actual width + * and a margin of 10 pixels on both sides. + * + * @returns {{min: Date, max: Date}} + */ +Timeline.prototype.getItemRange = function () { + // get a rough approximation for the range based on the items start and end dates + var range = this.getDataRange(); + var min = range.min !== null ? range.min.valueOf() : null; + var max = range.max !== null ? range.max.valueOf() : null; + var minItem = null; + var maxItem = null; + + if (min != null && max != null) { + var interval = max - min; // ms + if (interval <= 0) { + interval = 10; + } + var factor = interval / this.props.center.width; + + var redrawQueue = {}; + var redrawQueueLength = 0; + + // collect redraw functions + util.forEach(this.itemSet.items, function (item, key) { + if (item.groupShowing) { + var returnQueue = true; + redrawQueue[key] = item.redraw(returnQueue); + redrawQueueLength = redrawQueue[key].length; + } + }); + + var needRedraw = redrawQueueLength > 0; + if (needRedraw) { + // redraw all regular items + for (var i = 0; i < redrawQueueLength; i++) { + util.forEach(redrawQueue, function (fns) { + fns[i](); + }); + } + } + + // calculate the date of the left side and right side of the items given + util.forEach(this.itemSet.items, function (item) { + var start = getStart(item); + var end = getEnd(item); + var startSide; + var endSide; + + if (this.options.rtl) { + startSide = start - (item.getWidthRight() + 10) * factor; + endSide = end + (item.getWidthLeft() + 10) * factor; + } else { + startSide = start - (item.getWidthLeft() + 10) * factor; + endSide = end + (item.getWidthRight() + 10) * factor; + } + + if (startSide < min) { + min = startSide; + minItem = item; + } + if (endSide > max) { + max = endSide; + maxItem = item; + } + }.bind(this)); + + if (minItem && maxItem) { + var lhs = minItem.getWidthLeft() + 10; + var rhs = maxItem.getWidthRight() + 10; + var delta = this.props.center.width - lhs - rhs; // px + + if (delta > 0) { + if (this.options.rtl) { + min = getStart(minItem) - rhs * interval / delta; // ms + max = getEnd(maxItem) + lhs * interval / delta; // ms + } else { + min = getStart(minItem) - lhs * interval / delta; // ms + max = getEnd(maxItem) + rhs * interval / delta; // ms + } + } + } + } + + return { + min: min != null ? new Date(min) : null, + max: max != null ? new Date(max) : null + }; +}; + +/** + * Calculate the data range of the items start and end dates + * @returns {{min: Date, max: Date}} + */ +Timeline.prototype.getDataRange = function () { + var min = null; + var max = null; + + var dataset = this.itemsData && this.itemsData.getDataSet(); + if (dataset) { + dataset.forEach(function (item) { + var start = util.convert(item.start, 'Date').valueOf(); + var end = util.convert(item.end != undefined ? item.end : item.start, 'Date').valueOf(); + if (min === null || start < min) { + min = start; + } + if (max === null || end > max) { + max = end; + } + }); + } + + return { + min: min != null ? new Date(min) : null, + max: max != null ? new Date(max) : null + }; +}; + +/** + * Generate Timeline related information from an event + * @param {Event} event + * @return {Object} An object with related information, like on which area + * The event happened, whether clicked on an item, etc. + */ +Timeline.prototype.getEventProperties = function (event) { + var clientX = event.center ? event.center.x : event.clientX; + var clientY = event.center ? event.center.y : event.clientY; + var x; + if (this.options.rtl) { + x = util.getAbsoluteRight(this.dom.centerContainer) - clientX; + } else { + x = clientX - util.getAbsoluteLeft(this.dom.centerContainer); + } + var y = clientY - util.getAbsoluteTop(this.dom.centerContainer); + + var item = this.itemSet.itemFromTarget(event); + var group = this.itemSet.groupFromTarget(event); + var customTime = CustomTime.customTimeFromTarget(event); + + var snap = this.itemSet.options.snap || null; + var scale = this.body.util.getScale(); + var step = this.body.util.getStep(); + var time = this._toTime(x); + var snappedTime = snap ? snap(time, scale, step) : time; + + var element = util.getTarget(event); + var what = null; + if (item != null) { + what = 'item'; + } else if (customTime != null) { + what = 'custom-time'; + } else if (util.hasParent(element, this.timeAxis.dom.foreground)) { + what = 'axis'; + } else if (this.timeAxis2 && util.hasParent(element, this.timeAxis2.dom.foreground)) { + what = 'axis'; + } else if (util.hasParent(element, this.itemSet.dom.labelSet)) { + what = 'group-label'; + } else if (util.hasParent(element, this.currentTime.bar)) { + what = 'current-time'; + } else if (util.hasParent(element, this.dom.center)) { + what = 'background'; + } + + return { + event: event, + item: item ? item.id : null, + group: group ? group.groupId : null, + what: what, + pageX: event.srcEvent ? event.srcEvent.pageX : event.pageX, + pageY: event.srcEvent ? event.srcEvent.pageY : event.pageY, + x: x, + y: y, + time: time, + snappedTime: snappedTime + }; +}; + +/** + * Toggle Timeline rolling mode + */ + +Timeline.prototype.toggleRollingMode = function () { + if (this.range.rolling) { + this.range.stopRolling(); + } else { + if (this.options.rollingMode == undefined) { + this.setOptions(this.options); + } + this.range.startRolling(); + } +}; + +module.exports = Timeline; + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(19); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Hammer = __webpack_require__(10); +var hammerUtil = __webpack_require__(37); +var util = __webpack_require__(2); + +/** + * @param {number} [pixelRatio=1] + */ + +var ColorPicker = function () { + /** + * @param {number} [pixelRatio=1] + */ + function ColorPicker() { + var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + (0, _classCallCheck3['default'])(this, ColorPicker); + + this.pixelRatio = pixelRatio; + this.generated = false; + this.centerCoordinates = { x: 289 / 2, y: 289 / 2 }; + this.r = 289 * 0.49; + this.color = { r: 255, g: 255, b: 255, a: 1.0 }; + this.hueCircle = undefined; + this.initialColor = { r: 255, g: 255, b: 255, a: 1.0 }; + this.previousColor = undefined; + this.applied = false; + + // bound by + this.updateCallback = function () {}; + this.closeCallback = function () {}; + + // create all DOM elements + this._create(); + } + + /** + * this inserts the colorPicker into a div from the DOM + * @param {Element} container + */ + + + (0, _createClass3['default'])(ColorPicker, [{ + key: 'insertTo', + value: function insertTo(container) { + if (this.hammer !== undefined) { + this.hammer.destroy(); + this.hammer = undefined; + } + this.container = container; + this.container.appendChild(this.frame); + this._bindHammer(); + + this._setSize(); + } + + /** + * the callback is executed on apply and save. Bind it to the application + * @param {function} callback + */ + + }, { + key: 'setUpdateCallback', + value: function setUpdateCallback(callback) { + if (typeof callback === 'function') { + this.updateCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker update callback is not a function."); + } + } + + /** + * the callback is executed on apply and save. Bind it to the application + * @param {function} callback + */ + + }, { + key: 'setCloseCallback', + value: function setCloseCallback(callback) { + if (typeof callback === 'function') { + this.closeCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker closing callback is not a function."); + } + } + + /** + * + * @param {string} color + * @returns {String} + * @private + */ + + }, { + key: '_isColorString', + value: function _isColorString(color) { + var htmlColors = { black: '#000000', navy: '#000080', darkblue: '#00008B', mediumblue: '#0000CD', blue: '#0000FF', darkgreen: '#006400', green: '#008000', teal: '#008080', darkcyan: '#008B8B', deepskyblue: '#00BFFF', darkturquoise: '#00CED1', mediumspringgreen: '#00FA9A', lime: '#00FF00', springgreen: '#00FF7F', aqua: '#00FFFF', cyan: '#00FFFF', midnightblue: '#191970', dodgerblue: '#1E90FF', lightseagreen: '#20B2AA', forestgreen: '#228B22', seagreen: '#2E8B57', darkslategray: '#2F4F4F', limegreen: '#32CD32', mediumseagreen: '#3CB371', turquoise: '#40E0D0', royalblue: '#4169E1', steelblue: '#4682B4', darkslateblue: '#483D8B', mediumturquoise: '#48D1CC', indigo: '#4B0082', darkolivegreen: '#556B2F', cadetblue: '#5F9EA0', cornflowerblue: '#6495ED', mediumaquamarine: '#66CDAA', dimgray: '#696969', slateblue: '#6A5ACD', olivedrab: '#6B8E23', slategray: '#708090', lightslategray: '#778899', mediumslateblue: '#7B68EE', lawngreen: '#7CFC00', chartreuse: '#7FFF00', aquamarine: '#7FFFD4', maroon: '#800000', purple: '#800080', olive: '#808000', gray: '#808080', skyblue: '#87CEEB', lightskyblue: '#87CEFA', blueviolet: '#8A2BE2', darkred: '#8B0000', darkmagenta: '#8B008B', saddlebrown: '#8B4513', darkseagreen: '#8FBC8F', lightgreen: '#90EE90', mediumpurple: '#9370D8', darkviolet: '#9400D3', palegreen: '#98FB98', darkorchid: '#9932CC', yellowgreen: '#9ACD32', sienna: '#A0522D', brown: '#A52A2A', darkgray: '#A9A9A9', lightblue: '#ADD8E6', greenyellow: '#ADFF2F', paleturquoise: '#AFEEEE', lightsteelblue: '#B0C4DE', powderblue: '#B0E0E6', firebrick: '#B22222', darkgoldenrod: '#B8860B', mediumorchid: '#BA55D3', rosybrown: '#BC8F8F', darkkhaki: '#BDB76B', silver: '#C0C0C0', mediumvioletred: '#C71585', indianred: '#CD5C5C', peru: '#CD853F', chocolate: '#D2691E', tan: '#D2B48C', lightgrey: '#D3D3D3', palevioletred: '#D87093', thistle: '#D8BFD8', orchid: '#DA70D6', goldenrod: '#DAA520', crimson: '#DC143C', gainsboro: '#DCDCDC', plum: '#DDA0DD', burlywood: '#DEB887', lightcyan: '#E0FFFF', lavender: '#E6E6FA', darksalmon: '#E9967A', violet: '#EE82EE', palegoldenrod: '#EEE8AA', lightcoral: '#F08080', khaki: '#F0E68C', aliceblue: '#F0F8FF', honeydew: '#F0FFF0', azure: '#F0FFFF', sandybrown: '#F4A460', wheat: '#F5DEB3', beige: '#F5F5DC', whitesmoke: '#F5F5F5', mintcream: '#F5FFFA', ghostwhite: '#F8F8FF', salmon: '#FA8072', antiquewhite: '#FAEBD7', linen: '#FAF0E6', lightgoldenrodyellow: '#FAFAD2', oldlace: '#FDF5E6', red: '#FF0000', fuchsia: '#FF00FF', magenta: '#FF00FF', deeppink: '#FF1493', orangered: '#FF4500', tomato: '#FF6347', hotpink: '#FF69B4', coral: '#FF7F50', darkorange: '#FF8C00', lightsalmon: '#FFA07A', orange: '#FFA500', lightpink: '#FFB6C1', pink: '#FFC0CB', gold: '#FFD700', peachpuff: '#FFDAB9', navajowhite: '#FFDEAD', moccasin: '#FFE4B5', bisque: '#FFE4C4', mistyrose: '#FFE4E1', blanchedalmond: '#FFEBCD', papayawhip: '#FFEFD5', lavenderblush: '#FFF0F5', seashell: '#FFF5EE', cornsilk: '#FFF8DC', lemonchiffon: '#FFFACD', floralwhite: '#FFFAF0', snow: '#FFFAFA', yellow: '#FFFF00', lightyellow: '#FFFFE0', ivory: '#FFFFF0', white: '#FFFFFF' }; + if (typeof color === 'string') { + return htmlColors[color]; + } + } + + /** + * Set the color of the colorPicker + * Supported formats: + * 'red' --> HTML color string + * '#ffffff' --> hex string + * 'rbg(255,255,255)' --> rgb string + * 'rgba(255,255,255,1.0)' --> rgba string + * {r:255,g:255,b:255} --> rgb object + * {r:255,g:255,b:255,a:1.0} --> rgba object + * @param {string|Object} color + * @param {boolean} [setInitial=true] + */ + + }, { + key: 'setColor', + value: function setColor(color) { + var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (color === 'none') { + return; + } + + var rgba = void 0; + + // if a html color shorthand is used, convert to hex + var htmlColor = this._isColorString(color); + if (htmlColor !== undefined) { + color = htmlColor; + } + + // check format + if (util.isString(color) === true) { + if (util.isValidRGB(color) === true) { + var rgbaArray = color.substr(4).substr(0, color.length - 5).split(','); + rgba = { r: rgbaArray[0], g: rgbaArray[1], b: rgbaArray[2], a: 1.0 }; + } else if (util.isValidRGBA(color) === true) { + var _rgbaArray = color.substr(5).substr(0, color.length - 6).split(','); + rgba = { r: _rgbaArray[0], g: _rgbaArray[1], b: _rgbaArray[2], a: _rgbaArray[3] }; + } else if (util.isValidHex(color) === true) { + var rgbObj = util.hexToRGB(color); + rgba = { r: rgbObj.r, g: rgbObj.g, b: rgbObj.b, a: 1.0 }; + } + } else { + if (color instanceof Object) { + if (color.r !== undefined && color.g !== undefined && color.b !== undefined) { + var alpha = color.a !== undefined ? color.a : '1.0'; + rgba = { r: color.r, g: color.g, b: color.b, a: alpha }; + } + } + } + + // set color + if (rgba === undefined) { + throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: " + (0, _stringify2['default'])(color)); + } else { + this._setColor(rgba, setInitial); + } + } + + /** + * this shows the color picker. + * The hue circle is constructed once and stored. + */ + + }, { + key: 'show', + value: function show() { + if (this.closeCallback !== undefined) { + this.closeCallback(); + this.closeCallback = undefined; + } + + this.applied = false; + this.frame.style.display = 'block'; + this._generateHueCircle(); + } + + // ------------------------------------------ PRIVATE ----------------------------- // + + /** + * Hide the picker. Is called by the cancel button. + * Optional boolean to store the previous color for easy access later on. + * @param {boolean} [storePrevious=true] + * @private + */ + + }, { + key: '_hide', + value: function _hide() { + var _this = this; + + var storePrevious = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + // store the previous color for next time; + if (storePrevious === true) { + this.previousColor = util.extend({}, this.color); + } + + if (this.applied === true) { + this.updateCallback(this.initialColor); + } + + this.frame.style.display = 'none'; + + // call the closing callback, restoring the onclick method. + // this is in a setTimeout because it will trigger the show again before the click is done. + setTimeout(function () { + if (_this.closeCallback !== undefined) { + _this.closeCallback(); + _this.closeCallback = undefined; + } + }, 0); + } + + /** + * bound to the save button. Saves and hides. + * @private + */ + + }, { + key: '_save', + value: function _save() { + this.updateCallback(this.color); + this.applied = false; + this._hide(); + } + + /** + * Bound to apply button. Saves but does not close. Is undone by the cancel button. + * @private + */ + + }, { + key: '_apply', + value: function _apply() { + this.applied = true; + this.updateCallback(this.color); + this._updatePicker(this.color); + } + + /** + * load the color from the previous session. + * @private + */ + + }, { + key: '_loadLast', + value: function _loadLast() { + if (this.previousColor !== undefined) { + this.setColor(this.previousColor, false); + } else { + alert("There is no last color to load..."); + } + } + + /** + * set the color, place the picker + * @param {Object} rgba + * @param {boolean} [setInitial=true] + * @private + */ + + }, { + key: '_setColor', + value: function _setColor(rgba) { + var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + // store the initial color + if (setInitial === true) { + this.initialColor = util.extend({}, rgba); + } + + this.color = rgba; + var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); + + var angleConvert = 2 * Math.PI; + var radius = this.r * hsv.s; + var x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h); + var y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h); + + this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px'; + this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px'; + + this._updatePicker(rgba); + } + + /** + * bound to opacity control + * @param {number} value + * @private + */ + + }, { + key: '_setOpacity', + value: function _setOpacity(value) { + this.color.a = value / 100; + this._updatePicker(this.color); + } + + /** + * bound to brightness control + * @param {number} value + * @private + */ + + }, { + key: '_setBrightness', + value: function _setBrightness(value) { + var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); + hsv.v = value / 100; + var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); + rgba['a'] = this.color.a; + this.color = rgba; + this._updatePicker(); + } + + /** + * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing. + * @param {Object} rgba + * @private + */ + + }, { + key: '_updatePicker', + value: function _updatePicker() { + var rgba = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.color; + + var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); + var ctx = this.colorPickerCanvas.getContext('2d'); + if (this.pixelRation === undefined) { + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + } + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + + // clear the canvas + var w = this.colorPickerCanvas.clientWidth; + var h = this.colorPickerCanvas.clientHeight; + ctx.clearRect(0, 0, w, h); + + ctx.putImageData(this.hueCircle, 0, 0); + ctx.fillStyle = 'rgba(0,0,0,' + (1 - hsv.v) + ')'; + ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); + ctx.fill(); + + this.brightnessRange.value = 100 * hsv.v; + this.opacityRange.value = 100 * rgba.a; + + this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')'; + this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')'; + } + + /** + * used by create to set the size of the canvas. + * @private + */ + + }, { + key: '_setSize', + value: function _setSize() { + this.colorPickerCanvas.style.width = '100%'; + this.colorPickerCanvas.style.height = '100%'; + + this.colorPickerCanvas.width = 289 * this.pixelRatio; + this.colorPickerCanvas.height = 289 * this.pixelRatio; + } + + /** + * create all dom elements + * TODO: cleanup, lots of similar dom elements + * @private + */ + + }, { + key: '_create', + value: function _create() { + this.frame = document.createElement('div'); + this.frame.className = 'vis-color-picker'; + + this.colorPickerDiv = document.createElement('div'); + this.colorPickerSelector = document.createElement('div'); + this.colorPickerSelector.className = 'vis-selector'; + this.colorPickerDiv.appendChild(this.colorPickerSelector); + + this.colorPickerCanvas = document.createElement('canvas'); + this.colorPickerDiv.appendChild(this.colorPickerCanvas); + + if (!this.colorPickerCanvas.getContext) { + var noCanvas = document.createElement('DIV'); + noCanvas.style.color = 'red'; + noCanvas.style.fontWeight = 'bold'; + noCanvas.style.padding = '10px'; + noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; + this.colorPickerCanvas.appendChild(noCanvas); + } else { + var ctx = this.colorPickerCanvas.getContext("2d"); + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + + this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + } + + this.colorPickerDiv.className = 'vis-color'; + + this.opacityDiv = document.createElement('div'); + this.opacityDiv.className = 'vis-opacity'; + + this.brightnessDiv = document.createElement('div'); + this.brightnessDiv.className = 'vis-brightness'; + + this.arrowDiv = document.createElement('div'); + this.arrowDiv.className = 'vis-arrow'; + + this.opacityRange = document.createElement('input'); + try { + this.opacityRange.type = 'range'; // Not supported on IE9 + this.opacityRange.min = '0'; + this.opacityRange.max = '100'; + } + // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + this.opacityRange.value = '100'; + this.opacityRange.className = 'vis-range'; + + this.brightnessRange = document.createElement('input'); + try { + this.brightnessRange.type = 'range'; // Not supported on IE9 + this.brightnessRange.min = '0'; + this.brightnessRange.max = '100'; + } + // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + this.brightnessRange.value = '100'; + this.brightnessRange.className = 'vis-range'; + + this.opacityDiv.appendChild(this.opacityRange); + this.brightnessDiv.appendChild(this.brightnessRange); + + var me = this; + this.opacityRange.onchange = function () { + me._setOpacity(this.value); + }; + this.opacityRange.oninput = function () { + me._setOpacity(this.value); + }; + this.brightnessRange.onchange = function () { + me._setBrightness(this.value); + }; + this.brightnessRange.oninput = function () { + me._setBrightness(this.value); + }; + + this.brightnessLabel = document.createElement("div"); + this.brightnessLabel.className = "vis-label vis-brightness"; + this.brightnessLabel.innerHTML = 'brightness:'; + + this.opacityLabel = document.createElement("div"); + this.opacityLabel.className = "vis-label vis-opacity"; + this.opacityLabel.innerHTML = 'opacity:'; + + this.newColorDiv = document.createElement("div"); + this.newColorDiv.className = "vis-new-color"; + this.newColorDiv.innerHTML = 'new'; + + this.initialColorDiv = document.createElement("div"); + this.initialColorDiv.className = "vis-initial-color"; + this.initialColorDiv.innerHTML = 'initial'; + + this.cancelButton = document.createElement("div"); + this.cancelButton.className = "vis-button vis-cancel"; + this.cancelButton.innerHTML = 'cancel'; + this.cancelButton.onclick = this._hide.bind(this, false); + + this.applyButton = document.createElement("div"); + this.applyButton.className = "vis-button vis-apply"; + this.applyButton.innerHTML = 'apply'; + this.applyButton.onclick = this._apply.bind(this); + + this.saveButton = document.createElement("div"); + this.saveButton.className = "vis-button vis-save"; + this.saveButton.innerHTML = 'save'; + this.saveButton.onclick = this._save.bind(this); + + this.loadButton = document.createElement("div"); + this.loadButton.className = "vis-button vis-load"; + this.loadButton.innerHTML = 'load last'; + this.loadButton.onclick = this._loadLast.bind(this); + + this.frame.appendChild(this.colorPickerDiv); + this.frame.appendChild(this.arrowDiv); + this.frame.appendChild(this.brightnessLabel); + this.frame.appendChild(this.brightnessDiv); + this.frame.appendChild(this.opacityLabel); + this.frame.appendChild(this.opacityDiv); + this.frame.appendChild(this.newColorDiv); + this.frame.appendChild(this.initialColorDiv); + + this.frame.appendChild(this.cancelButton); + this.frame.appendChild(this.applyButton); + this.frame.appendChild(this.saveButton); + this.frame.appendChild(this.loadButton); + } + + /** + * bind hammer to the color picker + * @private + */ + + }, { + key: '_bindHammer', + value: function _bindHammer() { + var _this2 = this; + + this.drag = {}; + this.pinch = {}; + this.hammer = new Hammer(this.colorPickerCanvas); + this.hammer.get('pinch').set({ enable: true }); + + hammerUtil.onTouch(this.hammer, function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('tap', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panstart', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panmove', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panend', function (event) { + _this2._moveSelector(event); + }); + } + + /** + * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown. + * @private + */ + + }, { + key: '_generateHueCircle', + value: function _generateHueCircle() { + if (this.generated === false) { + var ctx = this.colorPickerCanvas.getContext('2d'); + if (this.pixelRation === undefined) { + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + } + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + + // clear the canvas + var w = this.colorPickerCanvas.clientWidth; + var h = this.colorPickerCanvas.clientHeight; + ctx.clearRect(0, 0, w, h); + + // draw hue circle + var x = void 0, + y = void 0, + hue = void 0, + sat = void 0; + this.centerCoordinates = { x: w * 0.5, y: h * 0.5 }; + this.r = 0.49 * w; + var angleConvert = 2 * Math.PI / 360; + var hfac = 1 / 360; + var sfac = 1 / this.r; + var rgb = void 0; + for (hue = 0; hue < 360; hue++) { + for (sat = 0; sat < this.r; sat++) { + x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue); + y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue); + rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1); + ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')'; + ctx.fillRect(x - 0.5, y - 0.5, 2, 2); + } + } + ctx.strokeStyle = 'rgba(0,0,0,1)'; + ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); + ctx.stroke(); + + this.hueCircle = ctx.getImageData(0, 0, w, h); + } + this.generated = true; + } + + /** + * move the selector. This is called by hammer functions. + * + * @param {Event} event The event + * @private + */ + + }, { + key: '_moveSelector', + value: function _moveSelector(event) { + var rect = this.colorPickerDiv.getBoundingClientRect(); + var left = event.center.x - rect.left; + var top = event.center.y - rect.top; + + var centerY = 0.5 * this.colorPickerDiv.clientHeight; + var centerX = 0.5 * this.colorPickerDiv.clientWidth; + + var x = left - centerX; + var y = top - centerY; + + var angle = Math.atan2(x, y); + var radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX); + + var newTop = Math.cos(angle) * radius + centerY; + var newLeft = Math.sin(angle) * radius + centerX; + + this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px'; + this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px'; + + // set color + var h = angle / (2 * Math.PI); + h = h < 0 ? h + 1 : h; + var s = radius / this.r; + var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); + hsv.h = h; + hsv.s = s; + var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); + rgba['a'] = this.color.a; + this.color = rgba; + + // update previews + this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')'; + this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')'; + } + }]); + return ColorPicker; +}(); + +exports['default'] = ColorPicker; + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var moment = __webpack_require__(9); +var util = __webpack_require__(2); +var DataSet = __webpack_require__(11); +var DataView = __webpack_require__(12); +var Range = __webpack_require__(64); +var Core = __webpack_require__(65); +var TimeAxis = __webpack_require__(45); +var CurrentTime = __webpack_require__(67); +var CustomTime = __webpack_require__(46); +var LineGraph = __webpack_require__(106); + +var printStyle = __webpack_require__(15).printStyle; +var allOptions = __webpack_require__(113).allOptions; +var configureOptions = __webpack_require__(113).configureOptions; + +var Configurator = __webpack_require__(71)['default']; +var Validator = __webpack_require__(15)['default']; + +/** + * Create a timeline visualization + * @param {HTMLElement} container + * @param {vis.DataSet | Array} [items] + * @param {vis.DataSet | Array | vis.DataView | Object} [groups] + * @param {Object} [options] See Graph2d.setOptions for the available options. + * @constructor Graph2d + * @extends Core + */ +function Graph2d(container, items, groups, options) { + // if the third element is options, the forth is groups (optionally); + if (!(Array.isArray(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) { + var forthArgument = options; + options = groups; + groups = forthArgument; + } + + // TODO: REMOVE THIS in the next MAJOR release + // see https://github.com/almende/vis/issues/2511 + if (options && options.throttleRedraw) { + console.warn("Graph2d option \"throttleRedraw\" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release."); + } + + var me = this; + this.defaultOptions = { + start: null, + end: null, + + autoResize: true, + + orientation: { + axis: 'bottom', // axis orientation: 'bottom', 'top', or 'both' + item: 'bottom' // not relevant for Graph2d + }, + + moment: moment, + + width: null, + height: null, + maxHeight: null, + minHeight: null + }; + this.options = util.deepExtend({}, this.defaultOptions); + + // Create the DOM, props, and emitter + this._create(container); + + // all components listed here will be repainted automatically + this.components = []; + + this.body = { + dom: this.dom, + domProps: this.props, + emitter: { + on: this.on.bind(this), + off: this.off.bind(this), + emit: this.emit.bind(this) + }, + hiddenDates: [], + util: { + toScreen: me._toScreen.bind(me), + toGlobalScreen: me._toGlobalScreen.bind(me), // this refers to the root.width + toTime: me._toTime.bind(me), + toGlobalTime: me._toGlobalTime.bind(me) + } + }; + + // range + this.range = new Range(this.body); + this.components.push(this.range); + this.body.range = this.range; + + // time axis + this.timeAxis = new TimeAxis(this.body); + this.components.push(this.timeAxis); + //this.body.util.snap = this.timeAxis.snap.bind(this.timeAxis); + + // current time bar + this.currentTime = new CurrentTime(this.body); + this.components.push(this.currentTime); + + // item set + this.linegraph = new LineGraph(this.body); + + this.components.push(this.linegraph); + + this.itemsData = null; // DataSet + this.groupsData = null; // DataSet + + + this.on('tap', function (event) { + me.emit('click', me.getEventProperties(event)); + }); + this.on('doubletap', function (event) { + me.emit('doubleClick', me.getEventProperties(event)); + }); + this.dom.root.oncontextmenu = function (event) { + me.emit('contextmenu', me.getEventProperties(event)); + }; + + // apply options + if (options) { + this.setOptions(options); + } + + // IMPORTANT: THIS HAPPENS BEFORE SET ITEMS! + if (groups) { + this.setGroups(groups); + } + + // create itemset + if (items) { + this.setItems(items); + } + + // draw for the first time + this._redraw(); +} + +// Extend the functionality from Core +Graph2d.prototype = new Core(); + +Graph2d.prototype.setOptions = function (options) { + // validate options + var errorFound = Validator.validate(options, allOptions); + if (errorFound === true) { + console.log('%cErrors have been found in the supplied options object.', printStyle); + } + + Core.prototype.setOptions.call(this, options); +}; + +/** + * Set items + * @param {vis.DataSet | Array | null} items + */ +Graph2d.prototype.setItems = function (items) { + var initialLoad = this.itemsData == null; + + // convert to type DataSet when needed + var newDataSet; + if (!items) { + newDataSet = null; + } else if (items instanceof DataSet || items instanceof DataView) { + newDataSet = items; + } else { + // turn an array into a dataset + newDataSet = new DataSet(items, { + type: { + start: 'Date', + end: 'Date' + } + }); + } + + // set items + this.itemsData = newDataSet; + this.linegraph && this.linegraph.setItems(newDataSet); + + if (initialLoad) { + if (this.options.start != undefined || this.options.end != undefined) { + var start = this.options.start != undefined ? this.options.start : null; + var end = this.options.end != undefined ? this.options.end : null; + this.setWindow(start, end, { animation: false }); + } else { + this.fit({ animation: false }); + } + } +}; + +/** + * Set groups + * @param {vis.DataSet | Array} groups + */ +Graph2d.prototype.setGroups = function (groups) { + // convert to type DataSet when needed + var newDataSet; + if (!groups) { + newDataSet = null; + } else if (groups instanceof DataSet || groups instanceof DataView) { + newDataSet = groups; + } else { + // turn an array into a dataset + newDataSet = new DataSet(groups); + } + + this.groupsData = newDataSet; + this.linegraph.setGroups(newDataSet); +}; + +/** + * Returns an object containing an SVG element with the icon of the group (size determined by iconWidth and iconHeight), the label of the group (content) and the yAxisOrientation of the group (left or right). + * @param {vis.GraphGroup.id} groupId + * @param {number} width + * @param {number} height + * @returns {{icon: SVGElement, label: string, orientation: string}|string} + */ +Graph2d.prototype.getLegend = function (groupId, width, height) { + if (width === undefined) { + width = 15; + } + if (height === undefined) { + height = 15; + } + if (this.linegraph.groups[groupId] !== undefined) { + return this.linegraph.groups[groupId].getLegend(width, height); + } else { + return "cannot find group:'" + groupId + "'"; + } +}; + +/** + * This checks if the visible option of the supplied group (by ID) is true or false. + * @param {vis.GraphGroup.id} groupId + * @returns {boolean} + */ +Graph2d.prototype.isGroupVisible = function (groupId) { + if (this.linegraph.groups[groupId] !== undefined) { + return this.linegraph.groups[groupId].visible && (this.linegraph.options.groups.visibility[groupId] === undefined || this.linegraph.options.groups.visibility[groupId] == true); + } else { + return false; + } +}; + +/** + * Get the data range of the item set. + * @returns {{min: Date, max: Date}} range A range with a start and end Date. + * When no minimum is found, min==null + * When no maximum is found, max==null + */ +Graph2d.prototype.getDataRange = function () { + var min = null; + var max = null; + + // calculate min from start filed + for (var groupId in this.linegraph.groups) { + if (this.linegraph.groups.hasOwnProperty(groupId)) { + if (this.linegraph.groups[groupId].visible == true) { + for (var i = 0; i < this.linegraph.groups[groupId].itemsData.length; i++) { + var item = this.linegraph.groups[groupId].itemsData[i]; + var value = util.convert(item.x, 'Date').valueOf(); + min = min == null ? value : min > value ? value : min; + max = max == null ? value : max < value ? value : max; + } + } + } + } + + return { + min: min != null ? new Date(min) : null, + max: max != null ? new Date(max) : null + }; +}; + +/** + * Generate Timeline related information from an event + * @param {Event} event + * @return {Object} An object with related information, like on which area + * The event happened, whether clicked on an item, etc. + */ +Graph2d.prototype.getEventProperties = function (event) { + var clientX = event.center ? event.center.x : event.clientX; + var clientY = event.center ? event.center.y : event.clientY; + var x = clientX - util.getAbsoluteLeft(this.dom.centerContainer); + var y = clientY - util.getAbsoluteTop(this.dom.centerContainer); + var time = this._toTime(x); + + var customTime = CustomTime.customTimeFromTarget(event); + + var element = util.getTarget(event); + var what = null; + if (util.hasParent(element, this.timeAxis.dom.foreground)) { + what = 'axis'; + } else if (this.timeAxis2 && util.hasParent(element, this.timeAxis2.dom.foreground)) { + what = 'axis'; + } else if (util.hasParent(element, this.linegraph.yAxisLeft.dom.frame)) { + what = 'data-axis'; + } else if (util.hasParent(element, this.linegraph.yAxisRight.dom.frame)) { + what = 'data-axis'; + } else if (util.hasParent(element, this.linegraph.legendLeft.dom.frame)) { + what = 'legend'; + } else if (util.hasParent(element, this.linegraph.legendRight.dom.frame)) { + what = 'legend'; + } else if (customTime != null) { + what = 'custom-time'; + } else if (util.hasParent(element, this.currentTime.bar)) { + what = 'current-time'; + } else if (util.hasParent(element, this.dom.center)) { + what = 'background'; + } + + var value = []; + var yAxisLeft = this.linegraph.yAxisLeft; + var yAxisRight = this.linegraph.yAxisRight; + if (!yAxisLeft.hidden && this.itemsData.length > 0) { + value.push(yAxisLeft.screenToValue(y)); + } + if (!yAxisRight.hidden && this.itemsData.length > 0) { + value.push(yAxisRight.screenToValue(y)); + } + + return { + event: event, + what: what, + pageX: event.srcEvent ? event.srcEvent.pageX : event.pageX, + pageY: event.srcEvent ? event.srcEvent.pageY : event.pageY, + x: x, + y: y, + time: time, + value: value + }; +}; + +/** + * Load a configurator + * @return {Object} + * @private + */ +Graph2d.prototype._createConfigurator = function () { + return new Configurator(this, this.dom.container, configureOptions); +}; + +module.exports = Graph2d; + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// utils +exports.util = __webpack_require__(2); +exports.DOMutil = __webpack_require__(14); + +// data +exports.DataSet = __webpack_require__(11); +exports.DataView = __webpack_require__(12); +exports.Queue = __webpack_require__(43); + +// Network +exports.Network = __webpack_require__(182); +exports.network = { + Images: __webpack_require__(116), + dotparser: __webpack_require__(114), + gephiParser: __webpack_require__(115), + allOptions: __webpack_require__(122) +}; +exports.network.convertDot = function (input) { + return exports.network.dotparser.DOTToGraph(input); +}; +exports.network.convertGephi = function (input, options) { + return exports.network.gephiParser.parseGephi(input, options); +}; + +// bundled external libraries +exports.moment = __webpack_require__(9); +exports.Hammer = __webpack_require__(10); +exports.keycharm = __webpack_require__(35); + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// Load custom shapes into CanvasRenderingContext2D +__webpack_require__(183); + +var Emitter = __webpack_require__(44); +var util = __webpack_require__(2); +var dotparser = __webpack_require__(114); +var gephiParser = __webpack_require__(115); +var Activator = __webpack_require__(97); +var locales = __webpack_require__(184); + +var Images = __webpack_require__(116)['default']; +var Groups = __webpack_require__(186)['default']; +var NodesHandler = __webpack_require__(187)['default']; +var EdgesHandler = __webpack_require__(214)['default']; +var PhysicsEngine = __webpack_require__(220)['default']; +var ClusterEngine = __webpack_require__(227)['default']; +var CanvasRenderer = __webpack_require__(229)['default']; +var Canvas = __webpack_require__(230)['default']; +var View = __webpack_require__(231)['default']; +var InteractionHandler = __webpack_require__(232)['default']; +var SelectionHandler = __webpack_require__(234)['default']; +var LayoutEngine = __webpack_require__(235)['default']; +var ManipulationSystem = __webpack_require__(237)['default']; +var Configurator = __webpack_require__(71)['default']; +var Validator = __webpack_require__(15)['default']; + +var _require = __webpack_require__(15), + printStyle = _require.printStyle; + +var _require2 = __webpack_require__(122), + allOptions = _require2.allOptions, + configureOptions = _require2.configureOptions; + +var KamadaKawai = __webpack_require__(238)['default']; + +/** + * Create a network visualization, displaying nodes and edges. + * + * @param {Element} container The DOM element in which the Network will + * be created. Normally a div element. + * @param {Object} data An object containing parameters + * {Array} nodes + * {Array} edges + * @param {Object} options Options + * @constructor Network + */ +function Network(container, data, options) { + var _this = this; + + if (!(this instanceof Network)) { + throw new SyntaxError('Constructor must be called with the new operator'); + } + + // set constant values + this.options = {}; + this.defaultOptions = { + locale: 'en', + locales: locales, + clickToUse: false + }; + util.extend(this.options, this.defaultOptions); + + /** + * Containers for nodes and edges. + * + * 'edges' and 'nodes' contain the full definitions of all the network elements. + * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements. + * + * The distinction is important, because a defined node need not be active, i.e. + * visible on the canvas. This happens in particular when clusters are defined, in + * that case there will be nodes and edges not displayed. + * The bottom line is that all code with actions related to visibility, *must* use + * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly. + */ + this.body = { + container: container, + + // See comment above for following fields + nodes: {}, + nodeIndices: [], + edges: {}, + edgeIndices: [], + + emitter: { + on: this.on.bind(this), + off: this.off.bind(this), + emit: this.emit.bind(this), + once: this.once.bind(this) + }, + eventListeners: { + onTap: function onTap() {}, + onTouch: function onTouch() {}, + onDoubleTap: function onDoubleTap() {}, + onHold: function onHold() {}, + onDragStart: function onDragStart() {}, + onDrag: function onDrag() {}, + onDragEnd: function onDragEnd() {}, + onMouseWheel: function onMouseWheel() {}, + onPinch: function onPinch() {}, + onMouseMove: function onMouseMove() {}, + onRelease: function onRelease() {}, + onContext: function onContext() {} + }, + data: { + nodes: null, // A DataSet or DataView + edges: null // A DataSet or DataView + }, + functions: { + createNode: function createNode() {}, + createEdge: function createEdge() {}, + getPointer: function getPointer() {} + }, + modules: {}, + view: { + scale: 1, + translation: { x: 0, y: 0 } + } + }; + + // bind the event listeners + this.bindEventListeners(); + + // setting up all modules + this.images = new Images(function () { + return _this.body.emitter.emit("_requestRedraw"); + }); // object with images + this.groups = new Groups(); // object with groups + this.canvas = new Canvas(this.body); // DOM handler + this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler + this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key + this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms + this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into + this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations + this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout + this.clustering = new ClusterEngine(this.body); // clustering api + this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler); // data manipulation system + + this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options + this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options + + this.body.modules["kamadaKawai"] = new KamadaKawai(this.body, 150, 0.05); // Layouting algorithm. + this.body.modules["clustering"] = this.clustering; + + // create the DOM elements + this.canvas._create(); + + // apply options + this.setOptions(options); + + // load data (the disable start variable will be the same as the enabled clustering) + this.setData(data); +} + +// Extend Network with an Emitter mixin +Emitter(Network.prototype); + +/** + * Set options + * @param {Object} options + */ +Network.prototype.setOptions = function (options) { + var _this2 = this; + + if (options !== undefined) { + var errorFound = Validator.validate(options, allOptions); + if (errorFound === true) { + console.log('%cErrors have been found in the supplied options object.', printStyle); + } + + // copy the global fields over + var fields = ['locale', 'locales', 'clickToUse']; + util.selectiveDeepExtend(fields, this.options, options); + + // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system. + options = this.layoutEngine.setOptions(options.layout, options); + + this.canvas.setOptions(options); // options for canvas are in globals + + // pass the options to the modules + this.groups.setOptions(options.groups); + this.nodesHandler.setOptions(options.nodes); + this.edgesHandler.setOptions(options.edges); + this.physics.setOptions(options.physics); + this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals + + this.interactionHandler.setOptions(options.interaction); + this.renderer.setOptions(options.interaction); // options for rendering are in interaction + this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction + + // reload the settings of the nodes to apply changes in groups that are not referenced by pointer. + if (options.groups !== undefined) { + this.body.emitter.emit("refreshNodes"); + } + // these two do not have options at the moment, here for completeness + //this.view.setOptions(options.view); + //this.clustering.setOptions(options.clustering); + + if ('configure' in options) { + if (!this.configurator) { + this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio); + } + + this.configurator.setOptions(options.configure); + } + + // if the configuration system is enabled, copy all options and put them into the config system + if (this.configurator && this.configurator.options.enabled === true) { + var networkOptions = { nodes: {}, edges: {}, layout: {}, interaction: {}, manipulation: {}, physics: {}, global: {} }; + util.deepExtend(networkOptions.nodes, this.nodesHandler.options); + util.deepExtend(networkOptions.edges, this.edgesHandler.options); + util.deepExtend(networkOptions.layout, this.layoutEngine.options); + // load the selectionHandler and render default options in to the interaction group + util.deepExtend(networkOptions.interaction, this.selectionHandler.options); + util.deepExtend(networkOptions.interaction, this.renderer.options); + + util.deepExtend(networkOptions.interaction, this.interactionHandler.options); + util.deepExtend(networkOptions.manipulation, this.manipulation.options); + util.deepExtend(networkOptions.physics, this.physics.options); + + // load globals into the global object + util.deepExtend(networkOptions.global, this.canvas.options); + util.deepExtend(networkOptions.global, this.options); + + this.configurator.setModuleOptions(networkOptions); + } + + // handle network global options + if (options.clickToUse !== undefined) { + if (options.clickToUse === true) { + if (this.activator === undefined) { + this.activator = new Activator(this.canvas.frame); + this.activator.on('change', function () { + _this2.body.emitter.emit("activate"); + }); + } + } else { + if (this.activator !== undefined) { + this.activator.destroy(); + delete this.activator; + } + this.body.emitter.emit("activate"); + } + } else { + this.body.emitter.emit("activate"); + } + + this.canvas.setSize(); + // start the physics simulation. Can be safely called multiple times. + this.body.emitter.emit("startSimulation"); + } +}; + +/** + * Update the visible nodes and edges list with the most recent node state. + * + * Visible nodes are stored in this.body.nodeIndices. + * Visible edges are stored in this.body.edgeIndices. + * A node or edges is visible if it is not hidden or clustered. + * + * @private + */ +Network.prototype._updateVisibleIndices = function () { + var nodes = this.body.nodes; + var edges = this.body.edges; + this.body.nodeIndices = []; + this.body.edgeIndices = []; + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) { + this.body.nodeIndices.push(nodes[nodeId].id); + } + } + } + + for (var edgeId in edges) { + if (edges.hasOwnProperty(edgeId)) { + var edge = edges[edgeId]; + + // It can happen that this is executed *after* a node edge has been removed, + // but *before* the edge itself has been removed. Taking this into account. + var fromNode = nodes[edge.fromId]; + var toNode = nodes[edge.toId]; + var edgeNodesPresent = fromNode !== undefined && toNode !== undefined; + + var isVisible = !this.clustering._isClusteredEdge(edgeId) && edge.options.hidden === false && edgeNodesPresent && fromNode.options.hidden === false // Also hidden if any of its connecting nodes are hidden + && toNode.options.hidden === false; // idem + + if (isVisible) { + this.body.edgeIndices.push(edge.id); + } + } + } +}; + +/** + * Bind all events + */ +Network.prototype.bindEventListeners = function () { + var _this3 = this; + + // This event will trigger a rebuilding of the cache everything. + // Used when nodes or edges have been added or removed. + this.body.emitter.on("_dataChanged", function () { + _this3.edgesHandler._updateState(); + _this3.body.emitter.emit("_dataUpdated"); + }); + + // this is called when options of EXISTING nodes or edges have changed. + this.body.emitter.on("_dataUpdated", function () { + // Order important in following block + _this3.clustering._updateState(); + _this3._updateVisibleIndices(); + + _this3._updateValueRange(_this3.body.nodes); + _this3._updateValueRange(_this3.body.edges); + // start simulation (can be called safely, even if already running) + _this3.body.emitter.emit("startSimulation"); + _this3.body.emitter.emit("_requestRedraw"); + }); +}; + +/** + * Set nodes and edges, and optionally options as well. + * + * @param {Object} data Object containing parameters: + * {Array | DataSet | DataView} [nodes] Array with nodes + * {Array | DataSet | DataView} [edges] Array with edges + * {String} [dot] String containing data in DOT format + * {String} [gephi] String containing data in gephi JSON format + * {Options} [options] Object with options + */ +Network.prototype.setData = function (data) { + // reset the physics engine. + this.body.emitter.emit("resetPhysics"); + this.body.emitter.emit("_resetData"); + + // unselect all to ensure no selections from old data are carried over. + this.selectionHandler.unselectAll(); + + if (data && data.dot && (data.nodes || data.edges)) { + throw new SyntaxError('Data must contain either parameter "dot" or ' + ' parameter pair "nodes" and "edges", but not both.'); + } + + // set options + this.setOptions(data && data.options); + // set all data + if (data && data.dot) { + console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);'); + // parse DOT file + var dotData = dotparser.DOTToGraph(data.dot); + this.setData(dotData); + return; + } else if (data && data.gephi) { + // parse DOT file + console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);'); + var gephiData = gephiParser.parseGephi(data.gephi); + this.setData(gephiData); + return; + } else { + this.nodesHandler.setData(data && data.nodes, true); + this.edgesHandler.setData(data && data.edges, true); + } + + // emit change in data + this.body.emitter.emit("_dataChanged"); + + // emit data loaded + this.body.emitter.emit("_dataLoaded"); + + // find a stable position or start animating to a stable position + this.body.emitter.emit("initPhysics"); +}; + +/** + * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function. + * var network = new vis.Network(..); + * network.destroy(); + * network = null; + */ +Network.prototype.destroy = function () { + this.body.emitter.emit("destroy"); + // clear events + this.body.emitter.off(); + this.off(); + + // delete modules + delete this.groups; + delete this.canvas; + delete this.selectionHandler; + delete this.interactionHandler; + delete this.view; + delete this.renderer; + delete this.physics; + delete this.layoutEngine; + delete this.clustering; + delete this.manipulation; + delete this.nodesHandler; + delete this.edgesHandler; + delete this.configurator; + delete this.images; + + for (var nodeId in this.body.nodes) { + if (!this.body.nodes.hasOwnProperty(nodeId)) continue; + delete this.body.nodes[nodeId]; + } + + for (var edgeId in this.body.edges) { + if (!this.body.edges.hasOwnProperty(edgeId)) continue; + delete this.body.edges[edgeId]; + } + + // remove the container and everything inside it recursively + util.recursiveDOMDelete(this.body.container); +}; + +/** + * Update the values of all object in the given array according to the current + * value range of the objects in the array. + * @param {Object} obj An object containing a set of Edges or Nodes + * The objects must have a method getValue() and + * setValueRange(min, max). + * @private + */ +Network.prototype._updateValueRange = function (obj) { + var id; + + // determine the range of the objects + var valueMin = undefined; + var valueMax = undefined; + var valueTotal = 0; + for (id in obj) { + if (obj.hasOwnProperty(id)) { + var value = obj[id].getValue(); + if (value !== undefined) { + valueMin = valueMin === undefined ? value : Math.min(value, valueMin); + valueMax = valueMax === undefined ? value : Math.max(value, valueMax); + valueTotal += value; + } + } + } + + // adjust the range of all objects + if (valueMin !== undefined && valueMax !== undefined) { + for (id in obj) { + if (obj.hasOwnProperty(id)) { + obj[id].setValueRange(valueMin, valueMax, valueTotal); + } + } + } +}; + +/** + * Returns true when the Network is active. + * @returns {boolean} + */ +Network.prototype.isActive = function () { + return !this.activator || this.activator.active; +}; + +Network.prototype.setSize = function () { + return this.canvas.setSize.apply(this.canvas, arguments); +}; +Network.prototype.canvasToDOM = function () { + return this.canvas.canvasToDOM.apply(this.canvas, arguments); +}; +Network.prototype.DOMtoCanvas = function () { + return this.canvas.DOMtoCanvas.apply(this.canvas, arguments); +}; +Network.prototype.findNode = function () { + return this.clustering.findNode.apply(this.clustering, arguments); +}; +Network.prototype.isCluster = function () { + return this.clustering.isCluster.apply(this.clustering, arguments); +}; +Network.prototype.openCluster = function () { + return this.clustering.openCluster.apply(this.clustering, arguments); +}; +Network.prototype.cluster = function () { + return this.clustering.cluster.apply(this.clustering, arguments); +}; +Network.prototype.getNodesInCluster = function () { + return this.clustering.getNodesInCluster.apply(this.clustering, arguments); +}; +Network.prototype.clusterByConnection = function () { + return this.clustering.clusterByConnection.apply(this.clustering, arguments); +}; +Network.prototype.clusterByHubsize = function () { + return this.clustering.clusterByHubsize.apply(this.clustering, arguments); +}; +Network.prototype.clusterOutliers = function () { + return this.clustering.clusterOutliers.apply(this.clustering, arguments); +}; +Network.prototype.getSeed = function () { + return this.layoutEngine.getSeed.apply(this.layoutEngine, arguments); +}; +Network.prototype.enableEditMode = function () { + return this.manipulation.enableEditMode.apply(this.manipulation, arguments); +}; +Network.prototype.disableEditMode = function () { + return this.manipulation.disableEditMode.apply(this.manipulation, arguments); +}; +Network.prototype.addNodeMode = function () { + return this.manipulation.addNodeMode.apply(this.manipulation, arguments); +}; +Network.prototype.editNode = function () { + return this.manipulation.editNode.apply(this.manipulation, arguments); +}; +Network.prototype.editNodeMode = function () { + console.log("Deprecated: Please use editNode instead of editNodeMode.");return this.manipulation.editNode.apply(this.manipulation, arguments); +}; +Network.prototype.addEdgeMode = function () { + return this.manipulation.addEdgeMode.apply(this.manipulation, arguments); +}; +Network.prototype.editEdgeMode = function () { + return this.manipulation.editEdgeMode.apply(this.manipulation, arguments); +}; +Network.prototype.deleteSelected = function () { + return this.manipulation.deleteSelected.apply(this.manipulation, arguments); +}; +Network.prototype.getPositions = function () { + return this.nodesHandler.getPositions.apply(this.nodesHandler, arguments); +}; +Network.prototype.storePositions = function () { + return this.nodesHandler.storePositions.apply(this.nodesHandler, arguments); +}; +Network.prototype.moveNode = function () { + return this.nodesHandler.moveNode.apply(this.nodesHandler, arguments); +}; +Network.prototype.getBoundingBox = function () { + return this.nodesHandler.getBoundingBox.apply(this.nodesHandler, arguments); +}; +Network.prototype.getConnectedNodes = function (objectId) { + if (this.body.nodes[objectId] !== undefined) { + return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler, arguments); + } else { + return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler, arguments); + } +}; +Network.prototype.getConnectedEdges = function () { + return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler, arguments); +}; +Network.prototype.startSimulation = function () { + return this.physics.startSimulation.apply(this.physics, arguments); +}; +Network.prototype.stopSimulation = function () { + return this.physics.stopSimulation.apply(this.physics, arguments); +}; +Network.prototype.stabilize = function () { + return this.physics.stabilize.apply(this.physics, arguments); +}; +Network.prototype.getSelection = function () { + return this.selectionHandler.getSelection.apply(this.selectionHandler, arguments); +}; +Network.prototype.setSelection = function () { + return this.selectionHandler.setSelection.apply(this.selectionHandler, arguments); +}; +Network.prototype.getSelectedNodes = function () { + return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler, arguments); +}; +Network.prototype.getSelectedEdges = function () { + return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler, arguments); +}; +Network.prototype.getNodeAt = function () { + var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler, arguments); + if (node !== undefined && node.id !== undefined) { + return node.id; + } + return node; +}; +Network.prototype.getEdgeAt = function () { + var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler, arguments); + if (edge !== undefined && edge.id !== undefined) { + return edge.id; + } + return edge; +}; +Network.prototype.selectNodes = function () { + return this.selectionHandler.selectNodes.apply(this.selectionHandler, arguments); +}; +Network.prototype.selectEdges = function () { + return this.selectionHandler.selectEdges.apply(this.selectionHandler, arguments); +}; +Network.prototype.unselectAll = function () { + this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments); + this.redraw(); +}; +Network.prototype.redraw = function () { + return this.renderer.redraw.apply(this.renderer, arguments); +}; +Network.prototype.getScale = function () { + return this.view.getScale.apply(this.view, arguments); +}; +Network.prototype.getViewPosition = function () { + return this.view.getViewPosition.apply(this.view, arguments); +}; +Network.prototype.fit = function () { + return this.view.fit.apply(this.view, arguments); +}; +Network.prototype.moveTo = function () { + return this.view.moveTo.apply(this.view, arguments); +}; +Network.prototype.focus = function () { + return this.view.focus.apply(this.view, arguments); +}; +Network.prototype.releaseNode = function () { + return this.view.releaseNode.apply(this.view, arguments); +}; +Network.prototype.getOptionsFromConfigurator = function () { + var options = {}; + if (this.configurator) { + options = this.configurator.getOptions.apply(this.configurator); + } + return options; +}; + +module.exports = Network; + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Canvas shapes used by Network + */ +if (typeof CanvasRenderingContext2D !== 'undefined') { + + /** + * Draw a circle shape + * + * @param {number} x + * @param {number} y + * @param {number} r + */ + CanvasRenderingContext2D.prototype.circle = function (x, y, r) { + this.beginPath(); + this.arc(x, y, r, 0, 2 * Math.PI, false); + this.closePath(); + }; + + /** + * Draw a square shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r size, width and height of the square + */ + CanvasRenderingContext2D.prototype.square = function (x, y, r) { + this.beginPath(); + this.rect(x - r, y - r, r * 2, r * 2); + this.closePath(); + }; + + /** + * Draw a triangle shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + CanvasRenderingContext2D.prototype.triangle = function (x, y, r) { + // http://en.wikipedia.org/wiki/Equilateral_triangle + this.beginPath(); + + // the change in radius and the offset is here to center the shape + r *= 1.15; + y += 0.275 * r; + + var s = r * 2; + var s2 = s / 2; + var ir = Math.sqrt(3) / 6 * s; // radius of inner circle + var h = Math.sqrt(s * s - s2 * s2); // height + + + this.moveTo(x, y - (h - ir)); + this.lineTo(x + s2, y + ir); + this.lineTo(x - s2, y + ir); + this.lineTo(x, y - (h - ir)); + this.closePath(); + }; + + /** + * Draw a triangle shape in downward orientation + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius + */ + CanvasRenderingContext2D.prototype.triangleDown = function (x, y, r) { + // http://en.wikipedia.org/wiki/Equilateral_triangle + this.beginPath(); + + // the change in radius and the offset is here to center the shape + r *= 1.15; + y -= 0.275 * r; + + var s = r * 2; + var s2 = s / 2; + var ir = Math.sqrt(3) / 6 * s; // radius of inner circle + var h = Math.sqrt(s * s - s2 * s2); // height + + this.moveTo(x, y + (h - ir)); + this.lineTo(x + s2, y - ir); + this.lineTo(x - s2, y - ir); + this.lineTo(x, y + (h - ir)); + this.closePath(); + }; + + /** + * Draw a star shape, a star with 5 points + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + CanvasRenderingContext2D.prototype.star = function (x, y, r) { + // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/ + this.beginPath(); + + // the change in radius and the offset is here to center the shape + r *= 0.82; + y += 0.1 * r; + + for (var n = 0; n < 10; n++) { + var radius = n % 2 === 0 ? r * 1.3 : r * 0.5; + this.lineTo(x + radius * Math.sin(n * 2 * Math.PI / 10), y - radius * Math.cos(n * 2 * Math.PI / 10)); + } + + this.closePath(); + }; + + /** + * Draw a Diamond shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + CanvasRenderingContext2D.prototype.diamond = function (x, y, r) { + // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/ + this.beginPath(); + + this.lineTo(x, y + r); + this.lineTo(x + r, y); + this.lineTo(x, y - r); + this.lineTo(x - r, y); + + this.closePath(); + }; + + /** + * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + * @param {number} r + */ + CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) { + var r2d = Math.PI / 180; + if (w - 2 * r < 0) { + r = w / 2; + } //ensure that the radius isn't too large for x + if (h - 2 * r < 0) { + r = h / 2; + } //ensure that the radius isn't too large for y + this.beginPath(); + this.moveTo(x + r, y); + this.lineTo(x + w - r, y); + this.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false); + this.lineTo(x + w, y + h - r); + this.arc(x + w - r, y + h - r, r, 0, r2d * 90, false); + this.lineTo(x + r, y + h); + this.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false); + this.lineTo(x, y + r); + this.arc(x + r, y + r, r, r2d * 180, r2d * 270, false); + this.closePath(); + }; + + /** + * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas + * + * Postfix '_vis' added to discern it from standard method ellipse(). + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + */ + CanvasRenderingContext2D.prototype.ellipse_vis = function (x, y, w, h) { + var kappa = .5522848, + ox = w / 2 * kappa, + // control point offset horizontal + oy = h / 2 * kappa, + // control point offset vertical + xe = x + w, + // x-end + ye = y + h, + // y-end + xm = x + w / 2, + // x-middle + ym = y + h / 2; // y-middle + + this.beginPath(); + this.moveTo(x, ym); + this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + this.closePath(); + }; + + /** + * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + */ + CanvasRenderingContext2D.prototype.database = function (x, y, w, h) { + var f = 1 / 3; + var wEllipse = w; + var hEllipse = h * f; + + var kappa = .5522848, + ox = wEllipse / 2 * kappa, + // control point offset horizontal + oy = hEllipse / 2 * kappa, + // control point offset vertical + xe = x + wEllipse, + // x-end + ye = y + hEllipse, + // y-end + xm = x + wEllipse / 2, + // x-middle + ym = y + hEllipse / 2, + // y-middle + ymb = y + (h - hEllipse / 2), + // y-midlle, bottom ellipse + yeb = y + h; // y-end, bottom ellipse + + this.beginPath(); + this.moveTo(xe, ym); + + this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + + this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + + this.lineTo(xe, ymb); + + this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb); + this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb); + + this.lineTo(x, ym); + }; + + /** + * Sets up the dashedLine functionality for drawing + * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas + * @author David Jordan + * @date 2012-08-08 + * + * @param {number} x + * @param {number} y + * @param {number} x2 + * @param {number} y2 + * @param {string} pattern + */ + CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, pattern) { + this.beginPath(); + this.moveTo(x, y); + + var patternLength = pattern.length; + var dx = x2 - x; + var dy = y2 - y; + var slope = dy / dx; + var distRemaining = Math.sqrt(dx * dx + dy * dy); + var patternIndex = 0; + var draw = true; + var xStep = 0; + var dashLength = pattern[0]; + + while (distRemaining >= 0.1) { + dashLength = pattern[patternIndex++ % patternLength]; + if (dashLength > distRemaining) { + dashLength = distRemaining; + } + + xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope)); + xStep = dx < 0 ? -xStep : xStep; + x += xStep; + y += slope * xStep; + + if (draw === true) { + this.lineTo(x, y); + } else { + this.moveTo(x, y); + } + + distRemaining -= dashLength; + draw = !draw; + } + }; + + /** + * Draw a Hexagon shape with 6 sides + * @param {Number} x horizontal center + * @param {Number} y vertical center + * @param {Number} r radius + */ + CanvasRenderingContext2D.prototype.hexagon = function (x, y, r) { + this.beginPath(); + var sides = 6; + var a = Math.PI * 2 / sides; + this.moveTo(x + r, y); + for (var i = 1; i < sides; i++) { + this.lineTo(x + r * Math.cos(a * i), y + r * Math.sin(a * i)); + } + this.closePath(); + }; +} + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// English +exports['en'] = { + edit: 'Edit', + del: 'Delete selected', + back: 'Back', + addNode: 'Add Node', + addEdge: 'Add Edge', + editNode: 'Edit Node', + editEdge: 'Edit Edge', + addDescription: 'Click in an empty space to place a new node.', + edgeDescription: 'Click on a node and drag the edge to another node to connect them.', + editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.', + createEdgeError: 'Cannot link edges to a cluster.', + deleteClusterError: 'Clusters cannot be deleted.', + editClusterError: 'Clusters cannot be edited.' +}; +exports['en_EN'] = exports['en']; +exports['en_US'] = exports['en']; + +// German +exports['de'] = { + edit: 'Editieren', + del: 'L\xF6sche Auswahl', + back: 'Zur\xFCck', + addNode: 'Knoten hinzuf\xFCgen', + addEdge: 'Kante hinzuf\xFCgen', + editNode: 'Knoten editieren', + editEdge: 'Kante editieren', + addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.', + edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.', + editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.', + createEdgeError: 'Es ist nicht m\xF6glich, Kanten mit Clustern zu verbinden.', + deleteClusterError: 'Cluster k\xF6nnen nicht gel\xF6scht werden.', + editClusterError: 'Cluster k\xF6nnen nicht editiert werden.' +}; +exports['de_DE'] = exports['de']; + +// Spanish +exports['es'] = { + edit: 'Editar', + del: 'Eliminar selecci\xF3n', + back: '\xC1tras', + addNode: 'A\xF1adir nodo', + addEdge: 'A\xF1adir arista', + editNode: 'Editar nodo', + editEdge: 'Editar arista', + addDescription: 'Haga clic en un lugar vac\xEDo para colocar un nuevo nodo.', + edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.', + editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.', + createEdgeError: 'No se puede conectar una arista a un grupo.', + deleteClusterError: 'No es posible eliminar grupos.', + editClusterError: 'No es posible editar grupos.' +}; +exports['es_ES'] = exports['es']; + +//Italiano +exports['it'] = { + edit: 'Modifica', + del: 'Cancella la selezione', + back: 'Indietro', + addNode: 'Aggiungi un nodo', + addEdge: 'Aggiungi un vertice', + editNode: 'Modifica il nodo', + editEdge: 'Modifica il vertice', + addDescription: 'Clicca per aggiungere un nuovo nodo', + edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.', + editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.', + createEdgeError: 'Non si possono collegare vertici ad un cluster', + deleteClusterError: 'I cluster non possono essere cancellati', + editClusterError: 'I clusters non possono essere modificati.' +}; +exports['it_IT'] = exports['it']; + +// Dutch +exports['nl'] = { + edit: 'Wijzigen', + del: 'Selectie verwijderen', + back: 'Terug', + addNode: 'Node toevoegen', + addEdge: 'Link toevoegen', + editNode: 'Node wijzigen', + editEdge: 'Link wijzigen', + addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.', + edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.', + editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.', + createEdgeError: 'Kan geen link maken naar een cluster.', + deleteClusterError: 'Clusters kunnen niet worden verwijderd.', + editClusterError: 'Clusters kunnen niet worden aangepast.' +}; +exports['nl_NL'] = exports['nl']; +exports['nl_BE'] = exports['nl']; + +// Portuguese Brazil +exports['pt-br'] = { + edit: 'Editar', + del: 'Remover selecionado', + back: 'Voltar', + addNode: 'Adicionar nó', + addEdge: 'Adicionar aresta', + editNode: 'Editar nó', + editEdge: 'Editar aresta', + addDescription: 'Clique em um espaço em branco para adicionar um novo nó', + edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los', + editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los', + createEdgeError: 'Não foi possível linkar arestas a um cluster.', + deleteClusterError: 'Clusters não puderam ser removidos.', + editClusterError: 'Clusters não puderam ser editados.' +}; +exports['pt-BR'] = exports['pt-br']; +exports['pt_BR'] = exports['pt-br']; +exports['pt_br'] = exports['pt-br']; + +// Russian +exports['ru'] = { + edit: 'Редактировать', + del: 'Удалить выбранное', + back: 'Назад', + addNode: 'Добавить узел', + addEdge: 'Добавить ребро', + editNode: 'Редактировать узел', + editEdge: 'Редактировать ребро', + addDescription: 'Кликните в свободное место, чтобы добавить новый узел.', + edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.', + editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.', + createEdgeError: 'Невозможно соединить ребра в кластер.', + deleteClusterError: 'Кластеры не могут быть удалены', + editClusterError: 'Кластеры недоступны для редактирования.' +}; +exports['ru_RU'] = exports['ru']; + +// Chinese +exports['cn'] = { + edit: '编辑', + del: '删除选定', + back: '返回', + addNode: '添加节点', + addEdge: '添加连接线', + editNode: '编辑节点', + editEdge: '编辑连接线', + addDescription: '单击空白处放置新节点。', + edgeDescription: '单击某个节点并将该连接线拖动到另一个节点以连接它们。', + editEdgeDescription: '单击控制节点并将它们拖到节点上连接。', + createEdgeError: '无法将连接线连接到群集。', + deleteClusterError: '无法删除群集。', + editClusterError: '无法编辑群集。' +}; +exports['zh_CN'] = exports['cn']; + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * Associates a canvas to a given image, containing a number of renderings + * of the image at various sizes. + * + * This technique is known as 'mipmapping'. + * + * NOTE: Images can also be of type 'data:svg+xml`. This code also works + * for svg, but the mipmapping may not be necessary. + * + * @param {Image} image + */ +var CachedImage = function () { + /** + * @ignore + */ + function CachedImage() { + (0, _classCallCheck3['default'])(this, CachedImage); + // eslint-disable-line no-unused-vars + this.NUM_ITERATIONS = 4; // Number of items in the coordinates array + + this.image = new Image(); + this.canvas = document.createElement('canvas'); + } + + /** + * Called when the image has been successfully loaded. + */ + + + (0, _createClass3['default'])(CachedImage, [{ + key: 'init', + value: function init() { + if (this.initialized()) return; + + this.src = this.image.src; // For same interface with Image + var w = this.image.width; + var h = this.image.height; + + // Ease external access + this.width = w; + this.height = h; + + var h2 = Math.floor(h / 2); + var h4 = Math.floor(h / 4); + var h8 = Math.floor(h / 8); + var h16 = Math.floor(h / 16); + + var w2 = Math.floor(w / 2); + var w4 = Math.floor(w / 4); + var w8 = Math.floor(w / 8); + var w16 = Math.floor(w / 16); + + // Make canvas as small as possible + this.canvas.width = 3 * w4; + this.canvas.height = h2; + + // Coordinates and sizes of images contained in the canvas + // Values per row: [top x, left y, width, height] + + this.coordinates = [[0, 0, w2, h2], [w2, 0, w4, h4], [w2, h4, w8, h8], [5 * w8, h4, w16, h16]]; + + this._fillMipMap(); + } + + /** + * @return {Boolean} true if init() has been called, false otherwise. + */ + + }, { + key: 'initialized', + value: function initialized() { + return this.coordinates !== undefined; + } + + /** + * Redraw main image in various sizes to the context. + * + * The rationale behind this is to reduce artefacts due to interpolation + * at differing zoom levels. + * + * Source: http://stackoverflow.com/q/18761404/1223531 + * + * This methods takes the resizing out of the drawing loop, in order to + * reduce performance overhead. + * + * TODO: The code assumes that a 2D context can always be gotten. This is + * not necessarily true! OTOH, if not true then usage of this class + * is senseless. + * + * @private + */ + + }, { + key: '_fillMipMap', + value: function _fillMipMap() { + var ctx = this.canvas.getContext('2d'); + + // First zoom-level comes from the image + var to = this.coordinates[0]; + ctx.drawImage(this.image, to[0], to[1], to[2], to[3]); + + // The rest are copy actions internal to the canvas/context + for (var iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) { + var from = this.coordinates[iterations - 1]; + var _to = this.coordinates[iterations]; + + ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], _to[0], _to[1], _to[2], _to[3]); + } + } + + /** + * Draw the image, using the mipmap if necessary. + * + * MipMap is only used if param factor > 2; otherwise, original bitmap + * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1 + * + * Credits to 'Alex de Mulder' for original implementation. + * + * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image + * @param {Float} factor scale factor at which to draw + * @param {number} left + * @param {number} top + * @param {number} width + * @param {number} height + */ + + }, { + key: 'drawImageAtPosition', + value: function drawImageAtPosition(ctx, factor, left, top, width, height) { + + if (!this.initialized()) return; //can't draw image yet not intialized + + if (factor > 2) { + // Determine which zoomed image to use + factor *= 0.5; + var iterations = 0; + while (factor > 2 && iterations < this.NUM_ITERATIONS) { + factor *= 0.5; + iterations += 1; + } + + if (iterations >= this.NUM_ITERATIONS) { + iterations = this.NUM_ITERATIONS - 1; + } + //console.log("iterations: " + iterations); + + var from = this.coordinates[iterations]; + ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], left, top, width, height); + } else { + // Draw image directly + ctx.drawImage(this.image, left, top, width, height); + } + } + }]); + return CachedImage; +}(); + +exports['default'] = CachedImage; + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var util = __webpack_require__(2); + +/** + * This class can store groups and options specific for groups. + */ + +var Groups = function () { + /** + * @ignore + */ + function Groups() { + (0, _classCallCheck3["default"])(this, Groups); + + this.clear(); + this.defaultIndex = 0; + this.groupsArray = []; + this.groupIndex = 0; + + this.defaultGroups = [{ border: "#2B7CE9", background: "#97C2FC", highlight: { border: "#2B7CE9", background: "#D2E5FF" }, hover: { border: "#2B7CE9", background: "#D2E5FF" } }, // 0: blue + { border: "#FFA500", background: "#FFFF00", highlight: { border: "#FFA500", background: "#FFFFA3" }, hover: { border: "#FFA500", background: "#FFFFA3" } }, // 1: yellow + { border: "#FA0A10", background: "#FB7E81", highlight: { border: "#FA0A10", background: "#FFAFB1" }, hover: { border: "#FA0A10", background: "#FFAFB1" } }, // 2: red + { border: "#41A906", background: "#7BE141", highlight: { border: "#41A906", background: "#A1EC76" }, hover: { border: "#41A906", background: "#A1EC76" } }, // 3: green + { border: "#E129F0", background: "#EB7DF4", highlight: { border: "#E129F0", background: "#F0B3F5" }, hover: { border: "#E129F0", background: "#F0B3F5" } }, // 4: magenta + { border: "#7C29F0", background: "#AD85E4", highlight: { border: "#7C29F0", background: "#D3BDF0" }, hover: { border: "#7C29F0", background: "#D3BDF0" } }, // 5: purple + { border: "#C37F00", background: "#FFA807", highlight: { border: "#C37F00", background: "#FFCA66" }, hover: { border: "#C37F00", background: "#FFCA66" } }, // 6: orange + { border: "#4220FB", background: "#6E6EFD", highlight: { border: "#4220FB", background: "#9B9BFD" }, hover: { border: "#4220FB", background: "#9B9BFD" } }, // 7: darkblue + { border: "#FD5A77", background: "#FFC0CB", highlight: { border: "#FD5A77", background: "#FFD1D9" }, hover: { border: "#FD5A77", background: "#FFD1D9" } }, // 8: pink + { border: "#4AD63A", background: "#C2FABC", highlight: { border: "#4AD63A", background: "#E6FFE3" }, hover: { border: "#4AD63A", background: "#E6FFE3" } }, // 9: mint + + { border: "#990000", background: "#EE0000", highlight: { border: "#BB0000", background: "#FF3333" }, hover: { border: "#BB0000", background: "#FF3333" } }, // 10:bright red + + { border: "#FF6000", background: "#FF6000", highlight: { border: "#FF6000", background: "#FF6000" }, hover: { border: "#FF6000", background: "#FF6000" } }, // 12: real orange + { border: "#97C2FC", background: "#2B7CE9", highlight: { border: "#D2E5FF", background: "#2B7CE9" }, hover: { border: "#D2E5FF", background: "#2B7CE9" } }, // 13: blue + { border: "#399605", background: "#255C03", highlight: { border: "#399605", background: "#255C03" }, hover: { border: "#399605", background: "#255C03" } }, // 14: green + { border: "#B70054", background: "#FF007E", highlight: { border: "#B70054", background: "#FF007E" }, hover: { border: "#B70054", background: "#FF007E" } }, // 15: magenta + { border: "#AD85E4", background: "#7C29F0", highlight: { border: "#D3BDF0", background: "#7C29F0" }, hover: { border: "#D3BDF0", background: "#7C29F0" } }, // 16: purple + { border: "#4557FA", background: "#000EA1", highlight: { border: "#6E6EFD", background: "#000EA1" }, hover: { border: "#6E6EFD", background: "#000EA1" } }, // 17: darkblue + { border: "#FFC0CB", background: "#FD5A77", highlight: { border: "#FFD1D9", background: "#FD5A77" }, hover: { border: "#FFD1D9", background: "#FD5A77" } }, // 18: pink + { border: "#C2FABC", background: "#74D66A", highlight: { border: "#E6FFE3", background: "#74D66A" }, hover: { border: "#E6FFE3", background: "#74D66A" } }, // 19: mint + + { border: "#EE0000", background: "#990000", highlight: { border: "#FF3333", background: "#BB0000" }, hover: { border: "#FF3333", background: "#BB0000" } // 20:bright red + }]; + + this.options = {}; + this.defaultOptions = { + useDefaultGroups: true + }; + util.extend(this.options, this.defaultOptions); + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3["default"])(Groups, [{ + key: "setOptions", + value: function setOptions(options) { + var optionFields = ['useDefaultGroups']; + + if (options !== undefined) { + for (var groupName in options) { + if (options.hasOwnProperty(groupName)) { + if (optionFields.indexOf(groupName) === -1) { + var group = options[groupName]; + this.add(groupName, group); + } + } + } + } + } + + /** + * Clear all groups + */ + + }, { + key: "clear", + value: function clear() { + this.groups = {}; + this.groupsArray = []; + } + + /** + * Get group options of a groupname. + * If groupname is not found, a new group may be created. + * + * @param {*} groupname Can be a number, string, Date, etc. + * @param {boolean} [shouldCreate=true] If true, create a new group + * @return {Object} The found or created group + */ + + }, { + key: "get", + value: function get(groupname) { + var shouldCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var group = this.groups[groupname]; + + if (group === undefined && shouldCreate) { + if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) { + // create new group + var index = this.groupIndex % this.groupsArray.length; + this.groupIndex++; + group = {}; + group.color = this.groups[this.groupsArray[index]]; + this.groups[groupname] = group; + } else { + // create new group + var _index = this.defaultIndex % this.defaultGroups.length; + this.defaultIndex++; + group = {}; + group.color = this.defaultGroups[_index]; + this.groups[groupname] = group; + } + } + + return group; + } + + /** + * Add a custom group style + * @param {string} groupName + * @param {Object} style An object containing borderColor, + * backgroundColor, etc. + * @return {Object} group The created group object + */ + + }, { + key: "add", + value: function add(groupName, style) { + this.groups[groupName] = style; + this.groupsArray.push(groupName); + return style; + } + }]); + return Groups; +}(); + +exports["default"] = Groups; + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var DataSet = __webpack_require__(11); +var DataView = __webpack_require__(12); +var Node = __webpack_require__(47)['default']; + +/** + * Handler for Nodes + */ + +var NodesHandler = function () { + /** + * @param {Object} body + * @param {Images} images + * @param {Array.} groups + * @param {LayoutEngine} layoutEngine + */ + function NodesHandler(body, images, groups, layoutEngine) { + var _this = this; + + (0, _classCallCheck3['default'])(this, NodesHandler); + + this.body = body; + this.images = images; + this.groups = groups; + this.layoutEngine = layoutEngine; + + // create the node API in the body container + this.body.functions.createNode = this.create.bind(this); + + this.nodesListeners = { + add: function add(event, params) { + _this.add(params.items); + }, + update: function update(event, params) { + _this.update(params.items, params.data, params.oldData); + }, + remove: function remove(event, params) { + _this.remove(params.items); + } + }; + + this.defaultOptions = { + borderWidth: 1, + borderWidthSelected: 2, + brokenImage: undefined, + color: { + border: '#2B7CE9', + background: '#97C2FC', + highlight: { + border: '#2B7CE9', + background: '#D2E5FF' + }, + hover: { + border: '#2B7CE9', + background: '#D2E5FF' + } + }, + fixed: { + x: false, + y: false + }, + font: { + color: '#343434', + size: 14, // px + face: 'arial', + background: 'none', + strokeWidth: 0, // px + strokeColor: '#ffffff', + align: 'center', + vadjust: 0, + multi: false, + bold: { + mod: 'bold' + }, + boldital: { + mod: 'bold italic' + }, + ital: { + mod: 'italic' + }, + mono: { + mod: '', + size: 15, // px + face: 'monospace', + vadjust: 2 + } + }, + group: undefined, + hidden: false, + icon: { + face: 'FontAwesome', //'FontAwesome', + code: undefined, //'\uf007', + size: 50, //50, + color: '#2B7CE9' //'#aa00ff' + }, + image: undefined, // --> URL + label: undefined, + labelHighlightBold: true, + level: undefined, + margin: { + top: 5, + right: 5, + bottom: 5, + left: 5 + }, + mass: 1, + physics: true, + scaling: { + min: 10, + max: 30, + label: { + enabled: false, + min: 14, + max: 30, + maxVisible: 30, + drawThreshold: 5 + }, + customScalingFunction: function customScalingFunction(min, max, total, value) { + if (max === min) { + return 0.5; + } else { + var scale = 1 / (max - min); + return Math.max(0, (value - min) * scale); + } + } + }, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: 10, + x: 5, + y: 5 + }, + shape: 'ellipse', + shapeProperties: { + borderDashes: false, // only for borders + borderRadius: 6, // only for box shape + interpolation: true, // only for image and circularImage shapes + useImageSize: false, // only for image and circularImage shapes + useBorderWithImage: false // only for image shape + }, + size: 25, + title: undefined, + value: undefined, + x: undefined, + y: undefined + }; + + // Protect from idiocy + if (this.defaultOptions.mass <= 0) { + throw 'Internal error: mass in defaultOptions of NodesHandler may not be zero or negative'; + } + + this.options = util.bridgeObject(this.defaultOptions); + + this.bindEventListeners(); + } + + /** + * Binds event listeners + */ + + + (0, _createClass3['default'])(NodesHandler, [{ + key: 'bindEventListeners', + value: function bindEventListeners() { + var _this2 = this; + + // refresh the nodes. Used when reverting from hierarchical layout + this.body.emitter.on('refreshNodes', this.refresh.bind(this)); + this.body.emitter.on('refresh', this.refresh.bind(this)); + this.body.emitter.on('destroy', function () { + util.forEach(_this2.nodesListeners, function (callback, event) { + if (_this2.body.data.nodes) _this2.body.data.nodes.off(event, callback); + }); + delete _this2.body.functions.createNode; + delete _this2.nodesListeners.add; + delete _this2.nodesListeners.update; + delete _this2.nodesListeners.remove; + delete _this2.nodesListeners; + }); + } + + /** + * + * @param {Object} options + */ + + }, { + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + Node.parseOptions(this.options, options); + + // update the shape in all nodes + if (options.shape !== undefined) { + for (var nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + this.body.nodes[nodeId].updateShape(); + } + } + } + + // update the font in all nodes + if (options.font !== undefined) { + for (var _nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId)) { + this.body.nodes[_nodeId].updateLabelModule(); + this.body.nodes[_nodeId].needsRefresh(); + } + } + } + + // update the shape size in all nodes + if (options.size !== undefined) { + for (var _nodeId2 in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId2)) { + this.body.nodes[_nodeId2].needsRefresh(); + } + } + } + + // update the state of the variables if needed + if (options.hidden !== undefined || options.physics !== undefined) { + this.body.emitter.emit('_dataChanged'); + } + } + } + + /** + * Set a data set with nodes for the network + * @param {Array | DataSet | DataView} nodes The data containing the nodes. + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: 'setData', + value: function setData(nodes) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var oldNodesData = this.body.data.nodes; + + if (nodes instanceof DataSet || nodes instanceof DataView) { + this.body.data.nodes = nodes; + } else if (Array.isArray(nodes)) { + this.body.data.nodes = new DataSet(); + this.body.data.nodes.add(nodes); + } else if (!nodes) { + this.body.data.nodes = new DataSet(); + } else { + throw new TypeError('Array or DataSet expected'); + } + + if (oldNodesData) { + // unsubscribe from old dataset + util.forEach(this.nodesListeners, function (callback, event) { + oldNodesData.off(event, callback); + }); + } + + // remove drawn nodes + this.body.nodes = {}; + + if (this.body.data.nodes) { + // subscribe to new dataset + var me = this; + util.forEach(this.nodesListeners, function (callback, event) { + me.body.data.nodes.on(event, callback); + }); + + // draw all new nodes + var ids = this.body.data.nodes.getIds(); + this.add(ids, true); + } + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + + /** + * Add nodes + * @param {number[] | string[]} ids + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: 'add', + value: function add(ids) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var id = void 0; + var newNodes = []; + for (var i = 0; i < ids.length; i++) { + id = ids[i]; + var properties = this.body.data.nodes.get(id); + var node = this.create(properties); + newNodes.push(node); + this.body.nodes[id] = node; // note: this may replace an existing node + } + + this.layoutEngine.positionInitially(newNodes); + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + + /** + * Update existing nodes, or create them when not yet existing + * @param {number[] | string[]} ids id's of changed nodes + * @param {Array} changedData array with changed data + * @param {Array|undefined} oldData optional; array with previous data + * @private + */ + + }, { + key: 'update', + value: function update(ids, changedData, oldData) { + var nodes = this.body.nodes; + var dataChanged = false; + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var node = nodes[id]; + var data = changedData[i]; + if (node !== undefined) { + // update node + if (node.setOptions(data)) { + dataChanged = true; + } + } else { + dataChanged = true; + // create node + node = this.create(data); + nodes[id] = node; + } + } + + if (!dataChanged && oldData !== undefined) { + // Check for any changes which should trigger a layout recalculation + // For now, this is just 'level' for hierarchical layout + // Assumption: old and new data arranged in same order; at time of writing, this holds. + dataChanged = changedData.some(function (newValue, index) { + var oldValue = oldData[index]; + return oldValue && oldValue.level !== newValue.level; + }); + } + + if (dataChanged === true) { + this.body.emitter.emit("_dataChanged"); + } else { + this.body.emitter.emit("_dataUpdated"); + } + } + + /** + * Remove existing nodes. If nodes do not exist, the method will just ignore it. + * @param {number[] | string[]} ids + * @private + */ + + }, { + key: 'remove', + value: function remove(ids) { + var nodes = this.body.nodes; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + delete nodes[id]; + } + + this.body.emitter.emit("_dataChanged"); + } + + /** + * create a node + * @param {Object} properties + * @param {class} [constructorClass=Node.default] + * @returns {*} + */ + + }, { + key: 'create', + value: function create(properties) { + var constructorClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Node; + + return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions); + } + + /** + * + * @param {boolean} [clearPositions=false] + */ + + }, { + key: 'refresh', + value: function refresh() { + var _this3 = this; + + var clearPositions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + util.forEach(this.body.nodes, function (node, nodeId) { + var data = _this3.body.data.nodes.get(nodeId); + if (data !== undefined) { + if (clearPositions === true) { + node.setOptions({ x: null, y: null }); + } + node.setOptions({ fixed: false }); + node.setOptions(data); + } + }); + } + + /** + * Returns the positions of the nodes. + * @param {Array.|String} [ids] --> optional, can be array of nodeIds, can be string + * @returns {{}} + */ + + }, { + key: 'getPositions', + value: function getPositions(ids) { + var dataArray = {}; + if (ids !== undefined) { + if (Array.isArray(ids) === true) { + for (var i = 0; i < ids.length; i++) { + if (this.body.nodes[ids[i]] !== undefined) { + var node = this.body.nodes[ids[i]]; + dataArray[ids[i]] = { x: Math.round(node.x), y: Math.round(node.y) }; + } + } + } else { + if (this.body.nodes[ids] !== undefined) { + var _node = this.body.nodes[ids]; + dataArray[ids] = { x: Math.round(_node.x), y: Math.round(_node.y) }; + } + } + } else { + for (var _i = 0; _i < this.body.nodeIndices.length; _i++) { + var _node2 = this.body.nodes[this.body.nodeIndices[_i]]; + dataArray[this.body.nodeIndices[_i]] = { x: Math.round(_node2.x), y: Math.round(_node2.y) }; + } + } + return dataArray; + } + + /** + * Load the XY positions of the nodes into the dataset. + */ + + }, { + key: 'storePositions', + value: function storePositions() { + // todo: add support for clusters and hierarchical. + var dataArray = []; + var dataset = this.body.data.nodes.getDataSet(); + + for (var nodeId in dataset._data) { + if (dataset._data.hasOwnProperty(nodeId)) { + var node = this.body.nodes[nodeId]; + if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) { + dataArray.push({ id: node.id, x: Math.round(node.x), y: Math.round(node.y) }); + } + } + } + dataset.update(dataArray); + } + + /** + * get the bounding box of a node. + * @param {Node.id} nodeId + * @returns {j|*} + */ + + }, { + key: 'getBoundingBox', + value: function getBoundingBox(nodeId) { + if (this.body.nodes[nodeId] !== undefined) { + return this.body.nodes[nodeId].shape.boundingBox; + } + } + + /** + * Get the Ids of nodes connected to this node. + * @param {Node.id} nodeId + * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only. + * Any other value returns both parent and child nodes. + * @returns {Array} + */ + + }, { + key: 'getConnectedNodes', + value: function getConnectedNodes(nodeId, direction) { + var nodeList = []; + if (this.body.nodes[nodeId] !== undefined) { + var node = this.body.nodes[nodeId]; + var nodeObj = {}; // used to quickly check if node already exists + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + if (direction !== 'to' && edge.toId == node.id) { + // these are double equals since ids can be numeric or string + if (nodeObj[edge.fromId] === undefined) { + nodeList.push(edge.fromId); + nodeObj[edge.fromId] = true; + } + } else if (direction !== 'from' && edge.fromId == node.id) { + // these are double equals since ids can be numeric or string + if (nodeObj[edge.toId] === undefined) { + nodeList.push(edge.toId); + nodeObj[edge.toId] = true; + } + } + } + } + return nodeList; + } + + /** + * Get the ids of the edges connected to this node. + * @param {Node.id} nodeId + * @returns {*} + */ + + }, { + key: 'getConnectedEdges', + value: function getConnectedEdges(nodeId) { + var edgeList = []; + if (this.body.nodes[nodeId] !== undefined) { + var node = this.body.nodes[nodeId]; + for (var i = 0; i < node.edges.length; i++) { + edgeList.push(node.edges[i].id); + } + } else { + console.log("NodeId provided for getConnectedEdges does not exist. Provided: ", nodeId); + } + return edgeList; + } + + /** + * Move a node. + * + * @param {Node.id} nodeId + * @param {number} x + * @param {number} y + */ + + }, { + key: 'moveNode', + value: function moveNode(nodeId, x, y) { + var _this4 = this; + + if (this.body.nodes[nodeId] !== undefined) { + this.body.nodes[nodeId].x = Number(x); + this.body.nodes[nodeId].y = Number(y); + setTimeout(function () { + _this4.body.emitter.emit("startSimulation"); + }, 0); + } else { + console.log("Node id supplied to moveNode does not exist. Provided: ", nodeId); + } + } + }]); + return NodesHandler; +}(); + +exports['default'] = NodesHandler; + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(189), __esModule: true }; + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(49); +__webpack_require__(60); +module.exports = __webpack_require__(190); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(86); +var ITERATOR = __webpack_require__(13)('iterator'); +var Iterators = __webpack_require__(31); +module.exports = __webpack_require__(7).isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var LabelAccumulator = __webpack_require__(192)['default']; +var ComponentUtil = __webpack_require__(48)['default']; + +/** + * Helper class for Label which explodes the label text into lines and blocks within lines + * + * @private + */ + +var LabelSplitter = function () { + + /** + * @param {CanvasRenderingContext2D} ctx Canvas rendering context + * @param {Label} parent reference to the Label instance using current instance + * @param {boolean} selected + * @param {boolean} hover + */ + function LabelSplitter(ctx, parent, selected, hover) { + var _this = this; + + (0, _classCallCheck3['default'])(this, LabelSplitter); + + this.ctx = ctx; + this.parent = parent; + + /** + * Callback to determine text width; passed to LabelAccumulator instance + * + * @param {String} text string to determine width of + * @param {String} mod font type to use for this text + * @return {Object} { width, values} width in pixels and font attributes + */ + var textWidth = function textWidth(text, mod) { + if (text === undefined) return 0; + + // TODO: This can be done more efficiently with caching + var values = _this.parent.getFormattingValues(ctx, selected, hover, mod); + + var width = 0; + if (text !== '') { + // NOTE: The following may actually be *incorrect* for the mod fonts! + // This returns the size with a regular font, bold etc. may + // have different sizes. + var measure = _this.ctx.measureText(text); + width = measure.width; + } + + return { width: width, values: values }; + }; + + this.lines = new LabelAccumulator(textWidth); + } + + /** + * Split passed text of a label into lines and blocks. + * + * # NOTE + * + * The handling of spacing is option dependent: + * + * - if `font.multi : false`, all spaces are retained + * - if `font.multi : true`, every sequence of spaces is compressed to a single space + * + * This might not be the best way to do it, but this is as it has been working till now. + * In order not to break existing functionality, for the time being this behaviour will + * be retained in any code changes. + * + * @param {string} text text to split + * @returns {Array} + */ + + + (0, _createClass3['default'])(LabelSplitter, [{ + key: 'process', + value: function process(text) { + if (!ComponentUtil.isValidLabel(text)) { + return this.lines.finalize(); + } + + var font = this.parent.fontOptions; + + // Normalize the end-of-line's to a single representation - order important + text = text.replace(/\r\n/g, '\n'); // Dos EOL's + text = text.replace(/\r/g, '\n'); // Mac EOL's + + // Note that at this point, there can be no \r's in the text. + // This is used later on splitStringIntoLines() to split multifont texts. + + var nlLines = String(text).split('\n'); + var lineCount = nlLines.length; + + if (font.multi) { + // Multi-font case: styling tags active + for (var i = 0; i < lineCount; i++) { + var blocks = this.splitBlocks(nlLines[i], font.multi); + // Post: Sequences of tabs and spaces are reduced to single space + + if (blocks === undefined) continue; + + if (blocks.length === 0) { + this.lines.newLine(""); + continue; + } + + if (font.maxWdt > 0) { + // widthConstraint.maximum defined + //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt); + for (var j = 0; j < blocks.length; j++) { + var mod = blocks[j].mod; + var _text = blocks[j].text; + this.splitStringIntoLines(_text, mod, true); + } + } else { + // widthConstraint.maximum NOT defined + for (var _j = 0; _j < blocks.length; _j++) { + var _mod = blocks[_j].mod; + var _text2 = blocks[_j].text; + this.lines.append(_text2, _mod); + } + } + + this.lines.newLine(); + } + } else { + // Single-font case + if (font.maxWdt > 0) { + // widthConstraint.maximum defined + // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt); + for (var _i = 0; _i < lineCount; _i++) { + this.splitStringIntoLines(nlLines[_i]); + } + } else { + // widthConstraint.maximum NOT defined + for (var _i2 = 0; _i2 < lineCount; _i2++) { + this.lines.newLine(nlLines[_i2]); + } + } + } + + return this.lines.finalize(); + } + + /** + * normalize the markup system + * + * @param {boolean|'md'|'markdown'|'html'} markupSystem + * @returns {string} + */ + + }, { + key: 'decodeMarkupSystem', + value: function decodeMarkupSystem(markupSystem) { + var system = 'none'; + if (markupSystem === 'markdown' || markupSystem === 'md') { + system = 'markdown'; + } else if (markupSystem === true || markupSystem === 'html') { + system = 'html'; + } + return system; + } + + /** + * + * @param {string} text + * @returns {Array} + */ + + }, { + key: 'splitHtmlBlocks', + value: function splitHtmlBlocks(text) { + var blocks = []; + + // TODO: consolidate following + methods/closures with splitMarkdownBlocks() + // NOTE: sequences of tabs and spaces are reduced to single space; scan usage of `this.spacing` within method + var s = { + bold: false, + ital: false, + mono: false, + spacing: false, + position: 0, + buffer: "", + modStack: [] + }; + + s.mod = function () { + return this.modStack.length === 0 ? 'normal' : this.modStack[0]; + }; + + s.modName = function () { + if (this.modStack.length === 0) return 'normal';else if (this.modStack[0] === 'mono') return 'mono';else { + if (s.bold && s.ital) { + return 'boldital'; + } else if (s.bold) { + return 'bold'; + } else if (s.ital) { + return 'ital'; + } + } + }; + + s.emitBlock = function () { + var override = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + // eslint-disable-line no-unused-vars + if (this.spacing) { + this.add(" "); + this.spacing = false; + } + if (this.buffer.length > 0) { + blocks.push({ text: this.buffer, mod: this.modName() }); + this.buffer = ""; + } + }; + + s.add = function (text) { + if (text === " ") { + s.spacing = true; + } + if (s.spacing) { + this.buffer += " "; + this.spacing = false; + } + if (text != " ") { + this.buffer += text; + } + }; + + while (s.position < text.length) { + var ch = text.charAt(s.position); + if (/[ \t]/.test(ch)) { + if (!s.mono) { + s.spacing = true; + } else { + s.add(ch); + } + } else if (//.test(text.substr(s.position, 3))) { + s.emitBlock(); + s.bold = true; + s.modStack.unshift("bold"); + s.position += 2; + } else if (!s.mono && !s.ital && //.test(text.substr(s.position, 3))) { + s.emitBlock(); + s.ital = true; + s.modStack.unshift("ital"); + s.position += 2; + } else if (!s.mono && //.test(text.substr(s.position, 6))) { + s.emitBlock(); + s.mono = true; + s.modStack.unshift("mono"); + s.position += 5; + } else if (!s.mono && s.mod() === 'bold' && /<\/b>/.test(text.substr(s.position, 4))) { + s.emitBlock(); + s.bold = false; + s.modStack.shift(); + s.position += 3; + } else if (!s.mono && s.mod() === 'ital' && /<\/i>/.test(text.substr(s.position, 4))) { + s.emitBlock(); + s.ital = false; + s.modStack.shift(); + s.position += 3; + } else if (s.mod() === 'mono' && /<\/code>/.test(text.substr(s.position, 7))) { + s.emitBlock(); + s.mono = false; + s.modStack.shift(); + s.position += 6; + } else { + s.add(ch); + } + } else if (/&/.test(ch)) { + if (/</.test(text.substr(s.position, 4))) { + s.add("<"); + s.position += 3; + } else if (/&/.test(text.substr(s.position, 5))) { + s.add("&"); + s.position += 4; + } else { + s.add("&"); + } + } else { + s.add(ch); + } + s.position++; + } + s.emitBlock(); + return blocks; + } + + /** + * + * @param {string} text + * @returns {Array} + */ + + }, { + key: 'splitMarkdownBlocks', + value: function splitMarkdownBlocks(text) { + var blocks = []; + + // TODO: consolidate following + methods/closures with splitHtmlBlocks() + // NOTE: sequences of tabs and spaces are reduced to single space; scan usage of `this.spacing` within method + var s = { + bold: false, + ital: false, + mono: false, + beginable: true, + spacing: false, + position: 0, + buffer: "", + modStack: [] + }; + + s.mod = function () { + return this.modStack.length === 0 ? 'normal' : this.modStack[0]; + }; + + s.modName = function () { + if (this.modStack.length === 0) return 'normal';else if (this.modStack[0] === 'mono') return 'mono';else { + if (s.bold && s.ital) { + return 'boldital'; + } else if (s.bold) { + return 'bold'; + } else if (s.ital) { + return 'ital'; + } + } + }; + + s.emitBlock = function () { + var override = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + // eslint-disable-line no-unused-vars + if (this.spacing) { + this.add(" "); + this.spacing = false; + } + if (this.buffer.length > 0) { + blocks.push({ text: this.buffer, mod: this.modName() }); + this.buffer = ""; + } + }; + + s.add = function (text) { + if (text === " ") { + s.spacing = true; + } + if (s.spacing) { + this.buffer += " "; + this.spacing = false; + } + if (text != " ") { + this.buffer += text; + } + }; + + while (s.position < text.length) { + var ch = text.charAt(s.position); + if (/[ \t]/.test(ch)) { + if (!s.mono) { + s.spacing = true; + } else { + s.add(ch); + } + s.beginable = true; + } else if (/\\/.test(ch)) { + if (s.position < text.length + 1) { + s.position++; + ch = text.charAt(s.position); + if (/ \t/.test(ch)) { + s.spacing = true; + } else { + s.add(ch); + s.beginable = false; + } + } + } else if (!s.mono && !s.bold && (s.beginable || s.spacing) && /\*/.test(ch)) { + s.emitBlock(); + s.bold = true; + s.modStack.unshift("bold"); + } else if (!s.mono && !s.ital && (s.beginable || s.spacing) && /\_/.test(ch)) { + s.emitBlock(); + s.ital = true; + s.modStack.unshift("ital"); + } else if (!s.mono && (s.beginable || s.spacing) && /`/.test(ch)) { + s.emitBlock(); + s.mono = true; + s.modStack.unshift("mono"); + } else if (!s.mono && s.mod() === "bold" && /\*/.test(ch)) { + if (s.position === text.length - 1 || /[.,_` \t\n]/.test(text.charAt(s.position + 1))) { + s.emitBlock(); + s.bold = false; + s.modStack.shift(); + } else { + s.add(ch); + } + } else if (!s.mono && s.mod() === "ital" && /\_/.test(ch)) { + if (s.position === text.length - 1 || /[.,*` \t\n]/.test(text.charAt(s.position + 1))) { + s.emitBlock(); + s.ital = false; + s.modStack.shift(); + } else { + s.add(ch); + } + } else if (s.mono && s.mod() === "mono" && /`/.test(ch)) { + if (s.position === text.length - 1 || /[.,*_ \t\n]/.test(text.charAt(s.position + 1))) { + s.emitBlock(); + s.mono = false; + s.modStack.shift(); + } else { + s.add(ch); + } + } else { + s.add(ch); + s.beginable = false; + } + s.position++; + } + s.emitBlock(); + return blocks; + } + + /** + * Explodes a piece of text into single-font blocks using a given markup + * + * @param {string} text + * @param {boolean|'md'|'markdown'|'html'} markupSystem + * @returns {Array.<{text: string, mod: string}>} + * @private + */ + + }, { + key: 'splitBlocks', + value: function splitBlocks(text, markupSystem) { + var system = this.decodeMarkupSystem(markupSystem); + if (system === 'none') { + return [{ + text: text, + mod: 'normal' + }]; + } else if (system === 'markdown') { + return this.splitMarkdownBlocks(text); + } else if (system === 'html') { + return this.splitHtmlBlocks(text); + } + } + + /** + * @param {string} text + * @returns {boolean} true if text length over the current max with + * @private + */ + + }, { + key: 'overMaxWidth', + value: function overMaxWidth(text) { + var width = this.ctx.measureText(text).width; + return this.lines.curWidth() + width > this.parent.fontOptions.maxWdt; + } + + /** + * Determine the longest part of the sentence which still fits in the + * current max width. + * + * @param {Array} words Array of strings signifying a text lines + * @return {number} index of first item in string making string go over max + * @private + */ + + }, { + key: 'getLongestFit', + value: function getLongestFit(words) { + var text = ''; + var w = 0; + + while (w < words.length) { + var pre = text === '' ? '' : ' '; + var newText = text + pre + words[w]; + + if (this.overMaxWidth(newText)) break; + text = newText; + w++; + } + + return w; + } + + /** + * Determine the longest part of the string which still fits in the + * current max width. + * + * @param {Array} words Array of strings signifying a text lines + * @return {number} index of first item in string making string go over max + */ + + }, { + key: 'getLongestFitWord', + value: function getLongestFitWord(words) { + var w = 0; + + while (w < words.length) { + if (this.overMaxWidth(words.slice(0, w))) break; + w++; + } + + return w; + } + + /** + * Split the passed text into lines, according to width constraint (if any). + * + * The method assumes that the input string is a single line, i.e. without lines break. + * + * This method retains spaces, if still present (case `font.multi: false`). + * A space which falls on an internal line break, will be replaced by a newline. + * There is no special handling of tabs; these go along with the flow. + * + * @param {string} str + * @param {string} [mod='normal'] + * @param {boolean} [appendLast=false] + * @private + */ + + }, { + key: 'splitStringIntoLines', + value: function splitStringIntoLines(str) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + var appendLast = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + // Still-present spaces are relevant, retain them + str = str.replace(/^( +)/g, '$1\r'); + str = str.replace(/([^\r][^ ]*)( +)/g, '$1\r$2\r'); + var words = str.split('\r'); + + while (words.length > 0) { + var w = this.getLongestFit(words); + + if (w === 0) { + // Special case: the first word is already larger than the max width. + var word = words[0]; + + // Break the word to the largest part that fits the line + var x = this.getLongestFitWord(word); + this.lines.newLine(word.slice(0, x), mod); + + // Adjust the word, so that the rest will be done next iteration + words[0] = word.slice(x); + } else { + // skip any space that is replaced by a newline + var newW = w; + if (words[w - 1] === ' ') { + w--; + } else if (words[newW] === ' ') { + newW++; + } + + var text = words.slice(0, w).join(""); + + if (w == words.length && appendLast) { + this.lines.append(text, mod); + } else { + this.lines.newLine(text, mod); + } + + // Adjust the word, so that the rest will be done next iteration + words = words.slice(newW); + } + } + } + }]); + return LabelSplitter; +}(); + +exports['default'] = LabelSplitter; + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(90); + +var _assign2 = _interopRequireDefault(_assign); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * Callback to determine text dimensions, using the parent label settings. + * @callback MeasureText + * @param {text} text + * @param {text} mod + * @return {Object} { width, values} width in pixels and font attributes + */ + +/** + * Helper class for Label which collects results of splitting labels into lines and blocks. + * + * @private + */ +var LabelAccumulator = function () { + + /** + * @param {MeasureText} measureText + */ + function LabelAccumulator(measureText) { + (0, _classCallCheck3["default"])(this, LabelAccumulator); + + this.measureText = measureText; + this.current = 0; + this.width = 0; + this.height = 0; + this.lines = []; + } + + /** + * Append given text to the given line. + * + * @param {number} l index of line to add to + * @param {string} text string to append to line + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + * @private + */ + + + (0, _createClass3["default"])(LabelAccumulator, [{ + key: "_add", + value: function _add(l, text) { + var mod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal'; + + + if (this.lines[l] === undefined) { + this.lines[l] = { + width: 0, + height: 0, + blocks: [] + }; + } + + // We still need to set a block for undefined and empty texts, hence return at this point + // This is necessary because we don't know at this point if we're at the + // start of an empty line or not. + // To compensate, empty blocks are removed in `finalize()`. + // + // Empty strings should still have a height + var tmpText = text; + if (text === undefined || text === "") tmpText = " "; + + // Determine width and get the font properties + var result = this.measureText(tmpText, mod); + var block = (0, _assign2["default"])({}, result.values); + block.text = text; + block.width = result.width; + block.mod = mod; + + if (text === undefined || text === "") { + block.width = 0; + } + + this.lines[l].blocks.push(block); + + // Update the line width. We need this for determining if a string goes over max width + this.lines[l].width += block.width; + } + + /** + * Returns the width in pixels of the current line. + * + * @returns {number} + */ + + }, { + key: "curWidth", + value: function curWidth() { + var line = this.lines[this.current]; + if (line === undefined) return 0; + + return line.width; + } + + /** + * Add text in block to current line + * + * @param {string} text + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + */ + + }, { + key: "append", + value: function append(text) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + + this._add(this.current, text, mod); + } + + /** + * Add text in block to current line and start a new line + * + * @param {string} text + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + */ + + }, { + key: "newLine", + value: function newLine(text) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + + this._add(this.current, text, mod); + this.current++; + } + + /** + * Determine and set the heights of all the lines currently contained in this instance + * + * Note that width has already been set. + * + * @private + */ + + }, { + key: "determineLineHeights", + value: function determineLineHeights() { + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; + + // Looking for max height of blocks in line + var height = 0; + + if (line.blocks !== undefined) { + // Can happen if text contains e.g. '\n ' + for (var l = 0; l < line.blocks.length; l++) { + var block = line.blocks[l]; + + if (height < block.height) { + height = block.height; + } + } + } + + line.height = height; + } + } + + /** + * Determine the full size of the label text, as determined by current lines and blocks + * + * @private + */ + + }, { + key: "determineLabelSize", + value: function determineLabelSize() { + var width = 0; + var height = 0; + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; + + if (line.width > width) { + width = line.width; + } + height += line.height; + } + + this.width = width; + this.height = height; + } + + /** + * Remove all empty blocks and empty lines we don't need + * + * This must be done after the width/height determination, + * so that these are set properly for processing here. + * + * @returns {Array} Lines with empty blocks (and some empty lines) removed + * @private + */ + + }, { + key: "removeEmptyBlocks", + value: function removeEmptyBlocks() { + var tmpLines = []; + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; + + // Note: an empty line in between text has width zero but is still relevant to layout. + // So we can't use width for testing empty line here + if (line.blocks.length === 0) continue; + + // Discard final empty line always + if (k === this.lines.length - 1) { + if (line.width === 0) continue; + } + + var tmpLine = {}; + (0, _assign2["default"])(tmpLine, line); + tmpLine.blocks = []; + + var firstEmptyBlock = void 0; + var tmpBlocks = []; + for (var l = 0; l < line.blocks.length; l++) { + var block = line.blocks[l]; + if (block.width !== 0) { + tmpBlocks.push(block); + } else { + if (firstEmptyBlock === undefined) { + firstEmptyBlock = block; + } + } + } + + // Ensure that there is *some* text present + if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) { + tmpBlocks.push(firstEmptyBlock); + } + + tmpLine.blocks = tmpBlocks; + + tmpLines.push(tmpLine); + } + + return tmpLines; + } + + /** + * Set the sizes for all lines and the whole thing. + * + * @returns {{width: (number|*), height: (number|*), lines: Array}} + */ + + }, { + key: "finalize", + value: function finalize() { + //console.log(JSON.stringify(this.lines, null, 2)); + + this.determineLineHeights(); + this.determineLabelSize(); + var tmpLines = this.removeEmptyBlocks(); + + // Return a simple hash object for further processing. + return { + width: this.width, + height: this.height, + lines: tmpLines + }; + } + }]); + return LabelAccumulator; +}(); + +exports["default"] = LabelAccumulator; + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _NodeBase2 = __webpack_require__(23); + +var _NodeBase3 = _interopRequireDefault(_NodeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Box Node/Cluster shape. + * + * @extends NodeBase + */ +var Box = function (_NodeBase) { + (0, _inherits3['default'])(Box, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Box(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Box); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (Box.__proto__ || (0, _getPrototypeOf2['default'])(Box)).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + return _this; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + (0, _createClass3['default'])(Box, [{ + key: 'resize', + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + + this.width = dimensions.width + this.margin.right + this.margin.left; + this.height = dimensions.height + this.margin.top + this.margin.bottom; + this.radius = this.width / 2; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this.initContextForDraw(ctx, values); + ctx.roundRect(this.left, this.top, this.width, this.height, values.borderRadius); + this.performFill(ctx, values); + + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); + } + + /** + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + }, { + key: 'updateBoundingBox', + value: function updateBoundingBox(x, y, ctx, selected, hover) { + this._updateBoundingBox(x, y, ctx, selected, hover); + + var borderRadius = this.options.shapeProperties.borderRadius; // only effective for box + this._addBoundingBoxMargin(borderRadius); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + this.resize(ctx); + var borderWidth = this.options.borderWidth; + + return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; + } + }]); + return Box; +}(_NodeBase3['default']); + +exports['default'] = Box; + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(195); +module.exports = __webpack_require__(7).Object.getPrototypeOf; + + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(41); +var $getPrototypeOf = __webpack_require__(85); + +__webpack_require__(87)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(197), __esModule: true }; + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(198); +module.exports = __webpack_require__(7).Object.setPrototypeOf; + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(17); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(199).set }); + + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(32); +var anObject = __webpack_require__(27); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(80)(Function.call, __webpack_require__(89).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _CircleImageBase2 = __webpack_require__(73); + +var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Circle Node/Cluster shape. + * + * @extends CircleImageBase + */ +var Circle = function (_CircleImageBase) { + (0, _inherits3['default'])(Circle, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Circle(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Circle); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (Circle.__proto__ || (0, _getPrototypeOf2['default'])(Circle)).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + return _this; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + (0, _createClass3['default'])(Circle, [{ + key: 'resize', + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + + var diameter = Math.max(dimensions.width + this.margin.right + this.margin.left, dimensions.height + this.margin.top + this.margin.bottom); + + this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box + this.width = diameter; + this.height = diameter; + this.radius = this.width / 2; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this._drawRawCircle(ctx, x, y, values); + + this.updateBoundingBox(x, y); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, y, selected, hover); + } + + /** + * + * @param {number} x width + * @param {number} y height + */ + + }, { + key: 'updateBoundingBox', + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle - Unused + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.width * 0.5; + } + }]); + return Circle; +}(_CircleImageBase3['default']); + +exports['default'] = Circle; + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _CircleImageBase2 = __webpack_require__(73); + +var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A CircularImage Node/Cluster shape. + * + * @extends CircleImageBase + */ +var CircularImage = function (_CircleImageBase) { + (0, _inherits3['default'])(CircularImage, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + * @param {Image} imageObj + * @param {Image} imageObjAlt + */ + function CircularImage(options, body, labelModule, imageObj, imageObjAlt) { + (0, _classCallCheck3['default'])(this, CircularImage); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (CircularImage.__proto__ || (0, _getPrototypeOf2['default'])(CircularImage)).call(this, options, body, labelModule)); + + _this.setImages(imageObj, imageObjAlt); + return _this; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + (0, _createClass3['default'])(CircularImage, [{ + key: 'resize', + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + var imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined; + + if (imageAbsent) { + var diameter = this.options.size * 2; + this.width = diameter; + this.height = diameter; + this.radius = 0.5 * this.width; + return; + } + + // At this point, an image is present, i.e. this.imageObj is valid. + if (this.needsRefresh(selected, hover)) { + this._resizeImage(); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this.switchImages(selected); + this.resize(); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below. + this._drawRawCircle(ctx, x, y, values); + + // now we draw in the circle, we save so we can revert the clip operation after drawing. + ctx.save(); + // clip is used to use the stroke in drawRawCircle as an area that we can draw in. + ctx.clip(); + // draw the image + this._drawImageAtPosition(ctx, values); + // restore so we can again draw on the full canvas + ctx.restore(); + + this._drawImageLabel(ctx, x, y, selected, hover); + + this.updateBoundingBox(x, y); + } + + // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here + /** + * + * @param {number} x width + * @param {number} y height + */ + + }, { + key: 'updateBoundingBox', + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; + + // TODO: compare with Image.updateBoundingBox(), consolidate? + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle - Unused + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.width * 0.5; + } + }]); + return CircularImage; +}(_CircleImageBase3['default']); + +exports['default'] = CircularImage; + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _NodeBase2 = __webpack_require__(23); + +var _NodeBase3 = _interopRequireDefault(_NodeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Database Node/Cluster shape. + * + * @extends NodeBase + */ +var Database = function (_NodeBase) { + (0, _inherits3['default'])(Database, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Database(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Database); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (Database.__proto__ || (0, _getPrototypeOf2['default'])(Database)).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + return _this; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + + (0, _createClass3['default'])(Database, [{ + key: 'resize', + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + var size = dimensions.width + this.margin.right + this.margin.left; + + this.width = size; + this.height = size; + this.radius = this.width / 2; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this.initContextForDraw(ctx, values); + ctx.database(x - this.width / 2, y - this.height / 2, this.width, this.height); + this.performFill(ctx, values); + + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Database; +}(_NodeBase3['default']); + +exports['default'] = Database; + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _ShapeBase2 = __webpack_require__(24); + +var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Diamond Node/Cluster shape. + * + * @extends ShapeBase + */ +var Diamond = function (_ShapeBase) { + (0, _inherits3['default'])(Diamond, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Diamond(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Diamond); + return (0, _possibleConstructorReturn3['default'])(this, (Diamond.__proto__ || (0, _getPrototypeOf2['default'])(Diamond)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + + (0, _createClass3['default'])(Diamond, [{ + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Diamond; +}(_ShapeBase3['default']); + +exports['default'] = Diamond; + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _ShapeBase2 = __webpack_require__(24); + +var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Dot Node/Cluster shape. + * + * @extends ShapeBase + */ +var Dot = function (_ShapeBase) { + (0, _inherits3['default'])(Dot, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Dot(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Dot); + return (0, _possibleConstructorReturn3['default'])(this, (Dot.__proto__ || (0, _getPrototypeOf2['default'])(Dot)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + + (0, _createClass3['default'])(Dot, [{ + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.options.size; + } + }]); + return Dot; +}(_ShapeBase3['default']); + +exports['default'] = Dot; + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _NodeBase2 = __webpack_require__(23); + +var _NodeBase3 = _interopRequireDefault(_NodeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * Am Ellipse Node/Cluster shape. + * + * @extends NodeBase + */ +var Ellipse = function (_NodeBase) { + (0, _inherits3['default'])(Ellipse, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Ellipse(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Ellipse); + return (0, _possibleConstructorReturn3['default'])(this, (Ellipse.__proto__ || (0, _getPrototypeOf2['default'])(Ellipse)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + (0, _createClass3['default'])(Ellipse, [{ + key: 'resize', + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + + this.height = dimensions.height * 2; + this.width = dimensions.width + dimensions.height; + this.radius = 0.5 * this.width; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width * 0.5; + this.top = y - this.height * 0.5; + + this.initContextForDraw(ctx, values); + ctx.ellipse_vis(this.left, this.top, this.width, this.height); + this.performFill(ctx, values); + + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, x, y, selected, hover); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + this.resize(ctx); + var a = this.width * 0.5; + var b = this.height * 0.5; + var w = Math.sin(angle) * a; + var h = Math.cos(angle) * b; + return a * b / Math.sqrt(w * w + h * h); + } + }]); + return Ellipse; +}(_NodeBase3['default']); + +exports['default'] = Ellipse; + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _NodeBase2 = __webpack_require__(23); + +var _NodeBase3 = _interopRequireDefault(_NodeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * An icon replacement for the default Node shape. + * + * @extends NodeBase + */ +var Icon = function (_NodeBase) { + (0, _inherits3['default'])(Icon, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Icon(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Icon); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (Icon.__proto__ || (0, _getPrototypeOf2['default'])(Icon)).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + return _this; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx - Unused. + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + (0, _createClass3['default'])(Icon, [{ + key: 'resize', + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + this.iconSize = { + width: Number(this.options.icon.size), + height: Number(this.options.icon.size) + }; + this.width = this.iconSize.width + this.margin.right + this.margin.left; + this.height = this.iconSize.height + this.margin.top + this.margin.bottom; + this.radius = 0.5 * this.width; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.options.icon.size = this.options.icon.size || 50; + + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this._icon(ctx, x, y, selected, hover, values); + + if (this.options.label !== undefined) { + var iconTextSpacing = 5; + this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left, y + this.height / 2 + iconTextSpacing, selected); + } + + this.updateBoundingBox(x, y); + } + + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: 'updateBoundingBox', + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.icon.size * 0.5; + this.boundingBox.left = x - this.options.icon.size * 0.5; + this.boundingBox.right = x + this.options.icon.size * 0.5; + this.boundingBox.bottom = y + this.options.icon.size * 0.5; + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + var iconTextSpacing = 5; + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover - Unused + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: '_icon', + value: function _icon(ctx, x, y, selected, hover, values) { + var iconSize = Number(this.options.icon.size); + + if (this.options.icon.code !== undefined) { + ctx.font = (selected ? "bold " : "") + iconSize + "px " + this.options.icon.face; + + // draw icon + ctx.fillStyle = this.options.icon.color || "black"; + ctx.textAlign = "center"; + ctx.textBaseline = "middle"; + + // draw shadow if enabled + this.enableShadow(ctx, values); + ctx.fillText(this.options.icon.code, x, y); + + // disable shadows for other elements. + this.disableShadow(ctx, values); + } else { + console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.'); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Icon; +}(_NodeBase3['default']); + +exports['default'] = Icon; + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _CircleImageBase2 = __webpack_require__(73); + +var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * An image-based replacement for the default Node shape. + * + * @extends CircleImageBase + */ +var Image = function (_CircleImageBase) { + (0, _inherits3['default'])(Image, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + * @param {Image} imageObj + * @param {Image} imageObjAlt + */ + function Image(options, body, labelModule, imageObj, imageObjAlt) { + (0, _classCallCheck3['default'])(this, Image); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (Image.__proto__ || (0, _getPrototypeOf2['default'])(Image)).call(this, options, body, labelModule)); + + _this.setImages(imageObj, imageObjAlt); + return _this; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx - Unused. + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + (0, _createClass3['default'])(Image, [{ + key: 'resize', + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + var imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined; + + if (imageAbsent) { + var side = this.options.size * 2; + this.width = side; + this.height = side; + return; + } + + if (this.needsRefresh(selected, hover)) { + this._resizeImage(); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this.switchImages(selected); + this.resize(); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + if (this.options.shapeProperties.useBorderWithImage === true) { + var neutralborderWidth = this.options.borderWidth; + var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); + + ctx.beginPath(); + + // setup the line properties. + ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; + + // set a fillstyle + ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; + + // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image + ctx.rect(this.left - 0.5 * ctx.lineWidth, this.top - 0.5 * ctx.lineWidth, this.width + ctx.lineWidth, this.height + ctx.lineWidth); + ctx.fill(); + + this.performStroke(ctx, values); + + ctx.closePath(); + } + + this._drawImageAtPosition(ctx, values); + + this._drawImageLabel(ctx, x, y, selected, hover); + + this.updateBoundingBox(x, y); + } + + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: 'updateBoundingBox', + value: function updateBoundingBox(x, y) { + this.resize(); + this._updateBoundingBox(x, y); + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset); + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Image; +}(_CircleImageBase3['default']); + +exports['default'] = Image; + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _ShapeBase2 = __webpack_require__(24); + +var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Square Node/Cluster shape. + * + * @extends ShapeBase + */ +var Square = function (_ShapeBase) { + (0, _inherits3['default'])(Square, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Square(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Square); + return (0, _possibleConstructorReturn3['default'])(this, (Square.__proto__ || (0, _getPrototypeOf2['default'])(Square)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + + (0, _createClass3['default'])(Square, [{ + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'square', 2, x, y, selected, hover, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Square; +}(_ShapeBase3['default']); + +exports['default'] = Square; + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _ShapeBase2 = __webpack_require__(24); + +var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Hexagon Node/Cluster shape. + * + * @extends ShapeBase + */ +var Hexagon = function (_ShapeBase) { + (0, _inherits3['default'])(Hexagon, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Hexagon(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Hexagon); + return (0, _possibleConstructorReturn3['default'])(this, (Hexagon.__proto__ || (0, _getPrototypeOf2['default'])(Hexagon)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + + (0, _createClass3['default'])(Hexagon, [{ + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'hexagon', 4, x, y, selected, hover, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Hexagon; +}(_ShapeBase3['default']); + +exports['default'] = Hexagon; + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _ShapeBase2 = __webpack_require__(24); + +var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Star Node/Cluster shape. + * + * @extends ShapeBase + */ +var Star = function (_ShapeBase) { + (0, _inherits3['default'])(Star, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Star(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Star); + return (0, _possibleConstructorReturn3['default'])(this, (Star.__proto__ || (0, _getPrototypeOf2['default'])(Star)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + + (0, _createClass3['default'])(Star, [{ + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'star', 4, x, y, selected, hover, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Star; +}(_ShapeBase3['default']); + +exports['default'] = Star; + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _NodeBase2 = __webpack_require__(23); + +var _NodeBase3 = _interopRequireDefault(_NodeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A text-based replacement for the default Node shape. + * + * @extends NodeBase + */ +var Text = function (_NodeBase) { + (0, _inherits3['default'])(Text, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Text(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Text); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (Text.__proto__ || (0, _getPrototypeOf2['default'])(Text)).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + return _this; + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + + (0, _createClass3['default'])(Text, [{ + key: 'resize', + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + this.textSize = this.labelModule.getTextSize(ctx, selected, hover); + this.width = this.textSize.width + this.margin.right + this.margin.left; + this.height = this.textSize.height + this.margin.top + this.margin.bottom; + this.radius = 0.5 * this.width; + } + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + // draw shadow if enabled + this.enableShadow(ctx, values); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); + + // disable shadows for other elements. + this.disableShadow(ctx, values); + + this.updateBoundingBox(x, y, ctx, selected, hover); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Text; +}(_NodeBase3['default']); + +exports['default'] = Text; + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _ShapeBase2 = __webpack_require__(24); + +var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Triangle Node/Cluster shape. + * + * @extends ShapeBase + */ +var Triangle = function (_ShapeBase) { + (0, _inherits3['default'])(Triangle, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Triangle(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, Triangle); + return (0, _possibleConstructorReturn3['default'])(this, (Triangle.__proto__ || (0, _getPrototypeOf2['default'])(Triangle)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + + (0, _createClass3['default'])(Triangle, [{ + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return Triangle; +}(_ShapeBase3['default']); + +exports['default'] = Triangle; + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _ShapeBase2 = __webpack_require__(24); + +var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A downward facing Triangle Node/Cluster shape. + * + * @extends ShapeBase + */ +var TriangleDown = function (_ShapeBase) { + (0, _inherits3['default'])(TriangleDown, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function TriangleDown(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, TriangleDown); + return (0, _possibleConstructorReturn3['default'])(this, (TriangleDown.__proto__ || (0, _getPrototypeOf2['default'])(TriangleDown)).call(this, options, body, labelModule)); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + + (0, _createClass3['default'])(TriangleDown, [{ + key: 'draw', + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values); + } + + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: 'distanceToBorder', + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + return TriangleDown; +}(_ShapeBase3['default']); + +exports['default'] = TriangleDown; + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var DataSet = __webpack_require__(11); +var DataView = __webpack_require__(12); +var Edge = __webpack_require__(74)['default']; + +/** + * Handler for Edges + */ + +var EdgesHandler = function () { + /** + * @param {Object} body + * @param {Array.} images + * @param {Array.} groups + */ + function EdgesHandler(body, images, groups) { + var _this = this; + + (0, _classCallCheck3['default'])(this, EdgesHandler); + + this.body = body; + this.images = images; + this.groups = groups; + + // create the edge API in the body container + this.body.functions.createEdge = this.create.bind(this); + + this.edgesListeners = { + add: function add(event, params) { + _this.add(params.items); + }, + update: function update(event, params) { + _this.update(params.items); + }, + remove: function remove(event, params) { + _this.remove(params.items); + } + }; + + this.options = {}; + this.defaultOptions = { + arrows: { + to: { enabled: false, scaleFactor: 1, type: 'arrow' }, // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1} + middle: { enabled: false, scaleFactor: 1, type: 'arrow' }, + from: { enabled: false, scaleFactor: 1, type: 'arrow' } + }, + arrowStrikethrough: true, + color: { + color: '#848484', + highlight: '#848484', + hover: '#848484', + inherit: 'from', + opacity: 1.0 + }, + dashes: false, + font: { + color: '#343434', + size: 14, // px + face: 'arial', + background: 'none', + strokeWidth: 2, // px + strokeColor: '#ffffff', + align: 'horizontal', + multi: false, + vadjust: 0, + bold: { + mod: 'bold' + }, + boldital: { + mod: 'bold italic' + }, + ital: { + mod: 'italic' + }, + mono: { + mod: '', + size: 15, // px + face: 'courier new', + vadjust: 2 + } + }, + hidden: false, + hoverWidth: 1.5, + label: undefined, + labelHighlightBold: true, + length: undefined, + physics: true, + scaling: { + min: 1, + max: 15, + label: { + enabled: true, + min: 14, + max: 30, + maxVisible: 30, + drawThreshold: 5 + }, + customScalingFunction: function customScalingFunction(min, max, total, value) { + if (max === min) { + return 0.5; + } else { + var scale = 1 / (max - min); + return Math.max(0, (value - min) * scale); + } + } + }, + selectionWidth: 1.5, + selfReferenceSize: 20, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: 10, + x: 5, + y: 5 + }, + smooth: { + enabled: true, + type: "dynamic", + forceDirection: 'none', + roundness: 0.5 + }, + title: undefined, + width: 1, + value: undefined + }; + + util.deepExtend(this.options, this.defaultOptions); + + this.bindEventListeners(); + } + + /** + * Binds event listeners + */ + + + (0, _createClass3['default'])(EdgesHandler, [{ + key: 'bindEventListeners', + value: function bindEventListeners() { + var _this2 = this; + + // this allows external modules to force all dynamic curves to turn static. + this.body.emitter.on("_forceDisableDynamicCurves", function (type) { + var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (type === 'dynamic') { + type = 'continuous'; + } + var dataChanged = false; + for (var edgeId in _this2.body.edges) { + if (_this2.body.edges.hasOwnProperty(edgeId)) { + var edge = _this2.body.edges[edgeId]; + var edgeData = _this2.body.data.edges._data[edgeId]; + + // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined. + // this is because a change in the global would not affect these curves. + if (edgeData !== undefined) { + var smoothOptions = edgeData.smooth; + if (smoothOptions !== undefined) { + if (smoothOptions.enabled === true && smoothOptions.type === 'dynamic') { + if (type === undefined) { + edge.setOptions({ smooth: false }); + } else { + edge.setOptions({ smooth: { type: type } }); + } + dataChanged = true; + } + } + } + } + } + if (emit === true && dataChanged === true) { + _this2.body.emitter.emit("_dataChanged"); + } + }); + + // this is called when options of EXISTING nodes or edges have changed. + // + // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes. + // See update() for logic. + // TODO: Verify and examine the consequences of this. It might still trigger when + // non-option fields have changed, but then reconnecting edges is still useless. + // Alternatively, it might also be called when edges are removed. + // + this.body.emitter.on("_dataUpdated", function () { + _this2.reconnectEdges(); + }); + + // refresh the edges. Used when reverting from hierarchical layout + this.body.emitter.on("refreshEdges", this.refresh.bind(this)); + this.body.emitter.on("refresh", this.refresh.bind(this)); + this.body.emitter.on("destroy", function () { + util.forEach(_this2.edgesListeners, function (callback, event) { + if (_this2.body.data.edges) _this2.body.data.edges.off(event, callback); + }); + delete _this2.body.functions.createEdge; + delete _this2.edgesListeners.add; + delete _this2.edgesListeners.update; + delete _this2.edgesListeners.remove; + delete _this2.edgesListeners; + }); + } + + /** + * + * @param {Object} options + */ + + }, { + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + // use the parser from the Edge class to fill in all shorthand notations + Edge.parseOptions(this.options, options, true, this.defaultOptions, true); + + // update smooth settings in all edges + var dataChanged = false; + if (options.smooth !== undefined) { + for (var edgeId in this.body.edges) { + if (this.body.edges.hasOwnProperty(edgeId)) { + dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged; + } + } + } + + // update fonts in all edges + if (options.font !== undefined) { + for (var _edgeId in this.body.edges) { + if (this.body.edges.hasOwnProperty(_edgeId)) { + this.body.edges[_edgeId].updateLabelModule(); + } + } + } + + // update the state of the variables if needed + if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) { + this.body.emitter.emit('_dataChanged'); + } + } + } + + /** + * Load edges by reading the data table + * @param {Array | DataSet | DataView} edges The data containing the edges. + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: 'setData', + value: function setData(edges) { + var _this3 = this; + + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var oldEdgesData = this.body.data.edges; + + if (edges instanceof DataSet || edges instanceof DataView) { + this.body.data.edges = edges; + } else if (Array.isArray(edges)) { + this.body.data.edges = new DataSet(); + this.body.data.edges.add(edges); + } else if (!edges) { + this.body.data.edges = new DataSet(); + } else { + throw new TypeError('Array or DataSet expected'); + } + + // TODO: is this null or undefined or false? + if (oldEdgesData) { + // unsubscribe from old dataset + util.forEach(this.edgesListeners, function (callback, event) { + oldEdgesData.off(event, callback); + }); + } + + // remove drawn edges + this.body.edges = {}; + + // TODO: is this null or undefined or false? + if (this.body.data.edges) { + // subscribe to new dataset + util.forEach(this.edgesListeners, function (callback, event) { + _this3.body.data.edges.on(event, callback); + }); + + // draw all new nodes + var ids = this.body.data.edges.getIds(); + this.add(ids, true); + } + + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + + /** + * Add edges + * @param {number[] | string[]} ids + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: 'add', + value: function add(ids) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var edges = this.body.edges; + var edgesData = this.body.data.edges; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + + var oldEdge = edges[id]; + if (oldEdge) { + oldEdge.disconnect(); + } + + var data = edgesData.get(id, { "showInternalIds": true }); + edges[id] = this.create(data); + } + + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + + /** + * Update existing edges, or create them when not yet existing + * @param {number[] | string[]} ids + * @private + */ + + }, { + key: 'update', + value: function update(ids) { + var edges = this.body.edges; + var edgesData = this.body.data.edges; + var dataChanged = false; + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var data = edgesData.get(id); + var edge = edges[id]; + if (edge !== undefined) { + // update edge + edge.disconnect(); + dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed. + edge.connect(); + } else { + // create edge + this.body.edges[id] = this.create(data); + dataChanged = true; + } + } + + if (dataChanged === true) { + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + this.body.emitter.emit("_dataChanged"); + } else { + this.body.emitter.emit("_dataUpdated"); + } + } + + /** + * Remove existing edges. Non existing ids will be ignored + * @param {number[] | string[]} ids + * @param {boolean} [emit=true] + * @private + */ + + }, { + key: 'remove', + value: function remove(ids) { + var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (ids.length === 0) return; // early out + + var edges = this.body.edges; + util.forEach(ids, function (id) { + var edge = edges[id]; + if (edge !== undefined) { + edge.remove(); + } + }); + + if (emit) { + this.body.emitter.emit("_dataChanged"); + } + } + + /** + * Refreshes Edge Handler + */ + + }, { + key: 'refresh', + value: function refresh() { + var _this4 = this; + + util.forEach(this.body.edges, function (edge, edgeId) { + var data = _this4.body.data.edges._data[edgeId]; + if (data !== undefined) { + edge.setOptions(data); + } + }); + } + + /** + * + * @param {Object} properties + * @returns {Edge} + */ + + }, { + key: 'create', + value: function create(properties) { + return new Edge(properties, this.body, this.options, this.defaultOptions); + } + + /** + * Reconnect all edges + * @private + */ + + }, { + key: 'reconnectEdges', + value: function reconnectEdges() { + var id; + var nodes = this.body.nodes; + var edges = this.body.edges; + + for (id in nodes) { + if (nodes.hasOwnProperty(id)) { + nodes[id].edges = []; + } + } + + for (id in edges) { + if (edges.hasOwnProperty(id)) { + var edge = edges[id]; + edge.from = null; + edge.to = null; + edge.connect(); + } + } + } + + /** + * + * @param {Edge.id} edgeId + * @returns {Array} + */ + + }, { + key: 'getConnectedNodes', + value: function getConnectedNodes(edgeId) { + var nodeList = []; + if (this.body.edges[edgeId] !== undefined) { + var edge = this.body.edges[edgeId]; + if (edge.fromId !== undefined) { + nodeList.push(edge.fromId); + } + if (edge.toId !== undefined) { + nodeList.push(edge.toId); + } + } + return nodeList; + } + + /** + * There is no direct relation between the nodes and the edges DataSet, + * so the right place to do call this is in the handler for event `_dataUpdated`. + */ + + }, { + key: '_updateState', + value: function _updateState() { + this._addMissingEdges(); + this._removeInvalidEdges(); + } + + /** + * Scan for missing nodes and remove corresponding edges, if any. + * @private + */ + + }, { + key: '_removeInvalidEdges', + value: function _removeInvalidEdges() { + var _this5 = this; + + var edgesToDelete = []; + + util.forEach(this.body.edges, function (edge, id) { + var toNode = _this5.body.nodes[edge.toId]; + var fromNode = _this5.body.nodes[edge.fromId]; + + // Skip clustering edges here, let the Clustering module handle those + if (toNode !== undefined && toNode.isCluster === true || fromNode !== undefined && fromNode.isCluster === true) { + return; + } + + if (toNode === undefined || fromNode === undefined) { + edgesToDelete.push(id); + } + }); + + this.remove(edgesToDelete, false); + } + + /** + * add all edges from dataset that are not in the cached state + * @private + */ + + }, { + key: '_addMissingEdges', + value: function _addMissingEdges() { + var edges = this.body.edges; + var edgesData = this.body.data.edges; + var addIds = []; + + edgesData.forEach(function (edgeData, edgeId) { + var edge = edges[edgeId]; + if (edge === undefined) { + addIds.push(edgeId); + } + }); + + this.add(addIds, true); + } + }]); + return EdgesHandler; +}(); + +exports['default'] = EdgesHandler; + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray2 = __webpack_require__(30); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _CubicBezierEdgeBase2 = __webpack_require__(216); + +var _CubicBezierEdgeBase3 = _interopRequireDefault(_CubicBezierEdgeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. + * + * @extends CubicBezierEdgeBase + */ +var CubicBezierEdge = function (_CubicBezierEdgeBase) { + (0, _inherits3['default'])(CubicBezierEdge, _CubicBezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CubicBezierEdge(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, CubicBezierEdge); + return (0, _possibleConstructorReturn3['default'])(this, (CubicBezierEdge.__proto__ || (0, _getPrototypeOf2['default'])(CubicBezierEdge)).call(this, options, body, labelModule)); + } + + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @param {Array.} viaNodes + * @private + */ + + + (0, _createClass3['default'])(CubicBezierEdge, [{ + key: '_line', + value: function _line(ctx, values, viaNodes) { + // get the coordinates of the support points. + var via1 = viaNodes[0]; + var via2 = viaNodes[1]; + this._bezierCurve(ctx, values, via1, via2); + } + + /** + * + * @returns {Array.<{x: number, y: number}>} + * @private + */ + + }, { + key: '_getViaCoordinates', + value: function _getViaCoordinates() { + var dx = this.from.x - this.to.x; + var dy = this.from.y - this.to.y; + + var x1 = void 0, + y1 = void 0, + x2 = void 0, + y2 = void 0; + var roundness = this.options.smooth.roundness; + + // horizontal if x > y or if direction is forced or if direction is horizontal + if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') { + y1 = this.from.y; + y2 = this.to.y; + x1 = this.from.x - roundness * dx; + x2 = this.to.x + roundness * dx; + } else { + y1 = this.from.y - roundness * dy; + y2 = this.to.y + roundness * dy; + x1 = this.from.x; + x2 = this.to.x; + } + + return [{ x: x1, y: y1 }, { x: x2, y: y2 }]; + } + + /** + * + * @returns {Array.<{x: number, y: number}>} + */ + + }, { + key: 'getViaNode', + value: function getViaNode() { + return this._getViaCoordinates(); + } + + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {{x: number, y: number, t: number}} + * @private + */ + + }, { + key: '_findBorderPosition', + value: function _findBorderPosition(nearNode, ctx) { + return this._findBorderPositionBezier(nearNode, ctx); + } + + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} via1 + * @param {Node} via2 + * @returns {number} + * @private + */ + + }, { + key: '_getDistanceToEdge', + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + var _ref = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(), + _ref2 = (0, _slicedToArray3['default'])(_ref, 2), + via1 = _ref2[0], + via2 = _ref2[1]; + + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2); + } + + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * @param {number} percentage + * @param {{x: number, y: number}} [via1=this._getViaCoordinates()[0]] + * @param {{x: number, y: number}} [via2=this._getViaCoordinates()[1]] + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: 'getPoint', + value: function getPoint(percentage) { + var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(), + _ref4 = (0, _slicedToArray3['default'])(_ref3, 2), + via1 = _ref4[0], + via2 = _ref4[1]; + + var t = percentage; + var vec = []; + vec[0] = Math.pow(1 - t, 3); + vec[1] = 3 * t * Math.pow(1 - t, 2); + vec[2] = 3 * Math.pow(t, 2) * (1 - t); + vec[3] = Math.pow(t, 3); + var x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x; + var y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y; + + return { x: x, y: y }; + } + }]); + return CubicBezierEdge; +}(_CubicBezierEdgeBase3['default']); + +exports['default'] = CubicBezierEdge; + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _BezierEdgeBase2 = __webpack_require__(75); + +var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model + * smooth gradual curves in paths between nodes. + * + * @extends BezierEdgeBase + */ +var CubicBezierEdgeBase = function (_BezierEdgeBase) { + (0, _inherits3['default'])(CubicBezierEdgeBase, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CubicBezierEdgeBase(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, CubicBezierEdgeBase); + return (0, _possibleConstructorReturn3['default'])(this, (CubicBezierEdgeBase.__proto__ || (0, _getPrototypeOf2['default'])(CubicBezierEdgeBase)).call(this, options, body, labelModule)); + } + + /** + * Calculate the distance between a point (x3,y3) and a line segment from + * (x1,y1) to (x2,y2). + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * https://en.wikipedia.org/wiki/B%C3%A9zier_curve + * @param {number} x1 from x + * @param {number} y1 from y + * @param {number} x2 to x + * @param {number} y2 to y + * @param {number} x3 point to check x + * @param {number} y3 point to check y + * @param {Node} via1 + * @param {Node} via2 + * @returns {number} + * @private + */ + + + (0, _createClass3['default'])(CubicBezierEdgeBase, [{ + key: '_getDistanceToBezierEdge', + value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { + // x3,y3 is the point + var minDistance = 1e9; + var distance = void 0; + var i = void 0, + t = void 0, + x = void 0, + y = void 0; + var lastX = x1; + var lastY = y1; + var vec = [0, 0, 0, 0]; + for (i = 1; i < 10; i++) { + t = 0.1 * i; + vec[0] = Math.pow(1 - t, 3); + vec[1] = 3 * t * Math.pow(1 - t, 2); + vec[2] = 3 * Math.pow(t, 2) * (1 - t); + vec[3] = Math.pow(t, 3); + x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2; + y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2; + if (i > 0) { + distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3); + minDistance = distance < minDistance ? distance : minDistance; + } + lastX = x; + lastY = y; + } + + return minDistance; + } + }]); + return CubicBezierEdgeBase; +}(_BezierEdgeBase3['default']); + +exports['default'] = CubicBezierEdgeBase; + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray2 = __webpack_require__(30); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _BezierEdgeBase2 = __webpack_require__(75); + +var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. The Dynamic piece refers to how the curve + * reacts to physics changes. + * + * @extends BezierEdgeBase + */ +var BezierEdgeDynamic = function (_BezierEdgeBase) { + (0, _inherits3["default"])(BezierEdgeDynamic, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeDynamic(options, body, labelModule) { + (0, _classCallCheck3["default"])(this, BezierEdgeDynamic); + + // --> this calls the setOptions below + var _this = (0, _possibleConstructorReturn3["default"])(this, (BezierEdgeDynamic.__proto__ || (0, _getPrototypeOf2["default"])(BezierEdgeDynamic)).call(this, options, body, labelModule)); + //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked. + + + _this._boundFunction = function () { + _this.positionBezierNode(); + }; + _this.body.emitter.on("_repositionBezierNodes", _this._boundFunction); + return _this; + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3["default"])(BezierEdgeDynamic, [{ + key: "setOptions", + value: function setOptions(options) { + // check if the physics has changed. + var physicsChange = false; + if (this.options.physics !== options.physics) { + physicsChange = true; + } + + // set the options and the to and from nodes + this.options = options; + this.id = this.options.id; + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + + // setup the support node and connect + this.setupSupportNode(); + this.connect(); + + // when we change the physics state of the edge, we reposition the support node. + if (physicsChange === true) { + this.via.setOptions({ physics: this.options.physics }); + this.positionBezierNode(); + } + } + + /** + * Connects an edge to node(s) + */ + + }, { + key: "connect", + value: function connect() { + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + if (this.from === undefined || this.to === undefined || this.options.physics === false) { + this.via.setOptions({ physics: false }); + } else { + // fix weird behaviour where a self referencing node has physics enabled + if (this.from.id === this.to.id) { + this.via.setOptions({ physics: false }); + } else { + this.via.setOptions({ physics: true }); + } + } + } + + /** + * remove the support nodes + * @returns {boolean} + */ + + }, { + key: "cleanup", + value: function cleanup() { + this.body.emitter.off("_repositionBezierNodes", this._boundFunction); + if (this.via !== undefined) { + delete this.body.nodes[this.via.id]; + this.via = undefined; + return true; + } + return false; + } + + /** + * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but + * are used for the force calculation. + * + * The changed data is not called, if needed, it is returned by the main edge constructor. + * @private + */ + + }, { + key: "setupSupportNode", + value: function setupSupportNode() { + if (this.via === undefined) { + var nodeId = "edgeId:" + this.id; + var node = this.body.functions.createNode({ + id: nodeId, + shape: 'circle', + physics: true, + hidden: true + }); + this.body.nodes[nodeId] = node; + this.via = node; + this.via.parentEdgeId = this.id; + this.positionBezierNode(); + } + } + + /** + * Positions bezier node + */ + + }, { + key: "positionBezierNode", + value: function positionBezierNode() { + if (this.via !== undefined && this.from !== undefined && this.to !== undefined) { + this.via.x = 0.5 * (this.from.x + this.to.x); + this.via.y = 0.5 * (this.from.y + this.to.y); + } else if (this.via !== undefined) { + this.via.x = 0; + this.via.y = 0; + } + } + + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @param {Node} viaNode + * @private + */ + + }, { + key: "_line", + value: function _line(ctx, values, viaNode) { + this._bezierCurve(ctx, values, viaNode); + } + + /** + * + * @returns {Node|undefined|*|{index, line, column}} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this.via; + } + + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * + * @param {number} percentage + * @param {Node} viaNode + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.via; + + var t = percentage; + var x = void 0, + y = void 0; + if (this.from === this.to) { + var _getCircleData = this._getCircleData(this.from), + _getCircleData2 = (0, _slicedToArray3["default"])(_getCircleData, 3), + cx = _getCircleData2[0], + cy = _getCircleData2[1], + cr = _getCircleData2[2]; + + var a = 2 * Math.PI * (1 - t); + x = cx + cr * Math.sin(a); + y = cy + cr - cr * (1 - Math.cos(a)); + } else { + x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; + } + + return { x: x, y: y }; + } + + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {*} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + return this._findBorderPositionBezier(nearNode, ctx, this.via); + } + + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via); + } + }]); + return BezierEdgeDynamic; +}(_BezierEdgeBase3["default"]); + +exports["default"] = BezierEdgeDynamic; + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _BezierEdgeBase2 = __webpack_require__(75); + +var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Static Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. + * + * @extends BezierEdgeBase + */ +var BezierEdgeStatic = function (_BezierEdgeBase) { + (0, _inherits3['default'])(BezierEdgeStatic, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeStatic(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, BezierEdgeStatic); + return (0, _possibleConstructorReturn3['default'])(this, (BezierEdgeStatic.__proto__ || (0, _getPrototypeOf2['default'])(BezierEdgeStatic)).call(this, options, body, labelModule)); + } + + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @param {Node} viaNode + * @private + */ + + + (0, _createClass3['default'])(BezierEdgeStatic, [{ + key: '_line', + value: function _line(ctx, values, viaNode) { + this._bezierCurve(ctx, values, viaNode); + } + + /** + * + * @returns {Array.<{x: number, y: number}>} + */ + + }, { + key: 'getViaNode', + value: function getViaNode() { + return this._getViaCoordinates(); + } + + /** + * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows. + * @returns {{x: undefined, y: undefined}} + * @private + */ + + }, { + key: '_getViaCoordinates', + value: function _getViaCoordinates() { + // Assumption: x/y coordinates in from/to always defined + var xVia = undefined; + var yVia = undefined; + var factor = this.options.smooth.roundness; + var type = this.options.smooth.type; + var dx = Math.abs(this.from.x - this.to.x); + var dy = Math.abs(this.from.y - this.to.y); + if (type === 'discrete' || type === 'diagonalCross') { + var stepX = void 0; + var stepY = void 0; + + if (dx <= dy) { + stepX = stepY = factor * dy; + } else { + stepX = stepY = factor * dx; + } + + if (this.from.x > this.to.x) stepX = -stepX; + if (this.from.y >= this.to.y) stepY = -stepY; + + xVia = this.from.x + stepX; + yVia = this.from.y + stepY; + + if (type === "discrete") { + if (dx <= dy) { + xVia = dx < factor * dy ? this.from.x : xVia; + } else { + yVia = dy < factor * dx ? this.from.y : yVia; + } + } + } else if (type === "straightCross") { + var _stepX = (1 - factor) * dx; + var _stepY = (1 - factor) * dy; + + if (dx <= dy) { + // up - down + _stepX = 0; + if (this.from.y < this.to.y) _stepY = -_stepY; + } else { + // left - right + if (this.from.x < this.to.x) _stepX = -_stepX; + _stepY = 0; + } + xVia = this.to.x + _stepX; + yVia = this.to.y + _stepY; + } else if (type === 'horizontal') { + var _stepX2 = (1 - factor) * dx; + if (this.from.x < this.to.x) _stepX2 = -_stepX2; + xVia = this.to.x + _stepX2; + yVia = this.from.y; + } else if (type === 'vertical') { + var _stepY2 = (1 - factor) * dy; + if (this.from.y < this.to.y) _stepY2 = -_stepY2; + xVia = this.from.x; + yVia = this.to.y + _stepY2; + } else if (type === 'curvedCW') { + dx = this.to.x - this.from.x; + dy = this.from.y - this.to.y; + var radius = Math.sqrt(dx * dx + dy * dy); + var pi = Math.PI; + + var originalAngle = Math.atan2(dy, dx); + var myAngle = (originalAngle + (factor * 0.5 + 0.5) * pi) % (2 * pi); + + xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle); + yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle); + } else if (type === 'curvedCCW') { + dx = this.to.x - this.from.x; + dy = this.from.y - this.to.y; + var _radius = Math.sqrt(dx * dx + dy * dy); + var _pi = Math.PI; + + var _originalAngle = Math.atan2(dy, dx); + var _myAngle = (_originalAngle + (-factor * 0.5 + 0.5) * _pi) % (2 * _pi); + + xVia = this.from.x + (factor * 0.5 + 0.5) * _radius * Math.sin(_myAngle); + yVia = this.from.y + (factor * 0.5 + 0.5) * _radius * Math.cos(_myAngle); + } else { + // continuous + var _stepX3 = void 0; + var _stepY3 = void 0; + + if (dx <= dy) { + _stepX3 = _stepY3 = factor * dy; + } else { + _stepX3 = _stepY3 = factor * dx; + } + + if (this.from.x > this.to.x) _stepX3 = -_stepX3; + if (this.from.y >= this.to.y) _stepY3 = -_stepY3; + + xVia = this.from.x + _stepX3; + yVia = this.from.y + _stepY3; + + if (dx <= dy) { + if (this.from.x <= this.to.x) { + xVia = this.to.x < xVia ? this.to.x : xVia; + } else { + xVia = this.to.x > xVia ? this.to.x : xVia; + } + } else { + if (this.from.y >= this.to.y) { + yVia = this.to.y > yVia ? this.to.y : yVia; + } else { + yVia = this.to.y < yVia ? this.to.y : yVia; + } + } + } + return { x: xVia, y: yVia }; + } + + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: '_findBorderPosition', + value: function _findBorderPosition(nearNode, ctx) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + return this._findBorderPositionBezier(nearNode, ctx, options.via); + } + + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} viaNode + * @returns {number} + * @private + */ + + }, { + key: '_getDistanceToEdge', + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + var viaNode = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(); + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode); + } + + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * @param {number} percentage + * @param {Node} viaNode + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: 'getPoint', + value: function getPoint(percentage) { + var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(); + + var t = percentage; + var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + var y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; + + return { x: x, y: y }; + } + }]); + return BezierEdgeStatic; +}(_BezierEdgeBase3['default']); + +exports['default'] = BezierEdgeStatic; + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _EdgeBase2 = __webpack_require__(118); + +var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * A Straight Edge. + * + * @extends EdgeBase + */ +var StraightEdge = function (_EdgeBase) { + (0, _inherits3['default'])(StraightEdge, _EdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function StraightEdge(options, body, labelModule) { + (0, _classCallCheck3['default'])(this, StraightEdge); + return (0, _possibleConstructorReturn3['default'])(this, (StraightEdge.__proto__ || (0, _getPrototypeOf2['default'])(StraightEdge)).call(this, options, body, labelModule)); + } + + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + * @private + */ + + + (0, _createClass3['default'])(StraightEdge, [{ + key: '_line', + value: function _line(ctx, values) { + // draw a straight line + ctx.beginPath(); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + ctx.lineTo(this.toPoint.x, this.toPoint.y); + // draw shadow if enabled + this.enableShadow(ctx, values); + ctx.stroke(); + this.disableShadow(ctx, values); + } + + /** + * + * @returns {undefined} + */ + + }, { + key: 'getViaNode', + value: function getViaNode() { + return undefined; + } + + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * + * @param {number} percentage + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: 'getPoint', + value: function getPoint(percentage) { + return { + x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x, + y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y + }; + } + + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: '_findBorderPosition', + value: function _findBorderPosition(nearNode, ctx) { + var node1 = this.to; + var node2 = this.from; + if (nearNode.id === this.from.id) { + node1 = this.from; + node2 = this.to; + } + + var angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + var dx = node1.x - node2.x; + var dy = node1.y - node2.y; + var edgeSegmentLength = Math.sqrt(dx * dx + dy * dy); + var toBorderDist = nearNode.distanceToBorder(ctx, angle); + var toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength; + + var borderPos = {}; + borderPos.x = (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x; + borderPos.y = (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y; + + return borderPos; + } + + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: '_getDistanceToEdge', + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + // x3,y3 is the point + return this._getDistanceToLine(x1, y1, x2, y2, x3, y3); + } + }]); + return StraightEdge; +}(_EdgeBase3['default']); + +exports['default'] = StraightEdge; + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var BarnesHutSolver = __webpack_require__(120)['default']; +var Repulsion = __webpack_require__(221)['default']; +var HierarchicalRepulsion = __webpack_require__(222)['default']; +var SpringSolver = __webpack_require__(223)['default']; +var HierarchicalSpringSolver = __webpack_require__(224)['default']; +var CentralGravitySolver = __webpack_require__(121)['default']; +var ForceAtlas2BasedRepulsionSolver = __webpack_require__(225)['default']; +var ForceAtlas2BasedCentralGravitySolver = __webpack_require__(226)['default']; +var util = __webpack_require__(2); +var EndPoints = __webpack_require__(119)['default']; // for debugging with _drawForces() + + +/** + * The physics engine + */ + +var PhysicsEngine = function () { + /** + * @param {Object} body + */ + function PhysicsEngine(body) { + (0, _classCallCheck3['default'])(this, PhysicsEngine); + + this.body = body; + this.physicsBody = { physicsNodeIndices: [], physicsEdgeIndices: [], forces: {}, velocities: {} }; + + this.physicsEnabled = true; + this.simulationInterval = 1000 / 60; + this.requiresTimeout = true; + this.previousStates = {}; + this.referenceState = {}; + this.freezeCache = {}; + this.renderTimer = undefined; + + // parameters for the adaptive timestep + this.adaptiveTimestep = false; + this.adaptiveTimestepEnabled = false; + this.adaptiveCounter = 0; + this.adaptiveInterval = 3; + + this.stabilized = false; + this.startedStabilization = false; + this.stabilizationIterations = 0; + this.ready = false; // will be set to true if the stabilize + + // default options + this.options = {}; + this.defaultOptions = { + enabled: true, + barnesHut: { + theta: 0.5, + gravitationalConstant: -2000, + centralGravity: 0.3, + springLength: 95, + springConstant: 0.04, + damping: 0.09, + avoidOverlap: 0 + }, + forceAtlas2Based: { + theta: 0.5, + gravitationalConstant: -50, + centralGravity: 0.01, + springConstant: 0.08, + springLength: 100, + damping: 0.4, + avoidOverlap: 0 + }, + repulsion: { + centralGravity: 0.2, + springLength: 200, + springConstant: 0.05, + nodeDistance: 100, + damping: 0.09, + avoidOverlap: 0 + }, + hierarchicalRepulsion: { + centralGravity: 0.0, + springLength: 100, + springConstant: 0.01, + nodeDistance: 120, + damping: 0.09 + }, + maxVelocity: 50, + minVelocity: 0.75, // px/s + solver: 'barnesHut', + stabilization: { + enabled: true, + iterations: 1000, // maximum number of iteration to stabilize + updateInterval: 50, + onlyDynamicEdges: false, + fit: true + }, + timestep: 0.5, + adaptiveTimestep: true + }; + util.extend(this.options, this.defaultOptions); + this.timestep = 0.5; + this.layoutFailed = false; + + this.bindEventListeners(); + } + + /** + * Binds event listeners + */ + + + (0, _createClass3['default'])(PhysicsEngine, [{ + key: 'bindEventListeners', + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on('initPhysics', function () { + _this.initPhysics(); + }); + this.body.emitter.on('_layoutFailed', function () { + _this.layoutFailed = true; + }); + this.body.emitter.on('resetPhysics', function () { + _this.stopSimulation();_this.ready = false; + }); + this.body.emitter.on('disablePhysics', function () { + _this.physicsEnabled = false;_this.stopSimulation(); + }); + this.body.emitter.on('restorePhysics', function () { + _this.setOptions(_this.options); + if (_this.ready === true) { + _this.startSimulation(); + } + }); + this.body.emitter.on('startSimulation', function () { + if (_this.ready === true) { + _this.startSimulation(); + } + }); + this.body.emitter.on('stopSimulation', function () { + _this.stopSimulation(); + }); + this.body.emitter.on('destroy', function () { + _this.stopSimulation(false); + _this.body.emitter.off(); + }); + this.body.emitter.on("_dataChanged", function () { + // Nodes and/or edges have been added or removed, update shortcut lists. + _this.updatePhysicsData(); + }); + + // debug: show forces + // this.body.emitter.on("afterDrawing", (ctx) => {this._drawForces(ctx);}); + } + + /** + * set the physics options + * @param {Object} options + */ + + }, { + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + if (options === false) { + this.options.enabled = false; + this.physicsEnabled = false; + this.stopSimulation(); + } else if (options === true) { + this.options.enabled = true; + this.physicsEnabled = true; + this.startSimulation(); + } else { + this.physicsEnabled = true; + util.selectiveNotDeepExtend(['stabilization'], this.options, options); + util.mergeOptions(this.options, options, 'stabilization'); + + if (options.enabled === undefined) { + this.options.enabled = true; + } + + if (this.options.enabled === false) { + this.physicsEnabled = false; + this.stopSimulation(); + } + + // set the timestep + this.timestep = this.options.timestep; + } + } + this.init(); + } + + /** + * configure the engine. + */ + + }, { + key: 'init', + value: function init() { + var options; + if (this.options.solver === 'forceAtlas2Based') { + options = this.options.forceAtlas2Based; + this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options); + } else if (this.options.solver === 'repulsion') { + options = this.options.repulsion; + this.nodesSolver = new Repulsion(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } else if (this.options.solver === 'hierarchicalRepulsion') { + options = this.options.hierarchicalRepulsion; + this.nodesSolver = new HierarchicalRepulsion(this.body, this.physicsBody, options); + this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } else { + // barnesHut + options = this.options.barnesHut; + this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } + + this.modelOptions = options; + } + + /** + * initialize the engine + */ + + }, { + key: 'initPhysics', + value: function initPhysics() { + if (this.physicsEnabled === true && this.options.enabled === true) { + if (this.options.stabilization.enabled === true) { + this.stabilize(); + } else { + this.stabilized = false; + this.ready = true; + this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom + this.startSimulation(); + } + } else { + this.ready = true; + this.body.emitter.emit('fit'); + } + } + + /** + * Start the simulation + */ + + }, { + key: 'startSimulation', + value: function startSimulation() { + if (this.physicsEnabled === true && this.options.enabled === true) { + this.stabilized = false; + + // when visible, adaptivity is disabled. + this.adaptiveTimestep = false; + + // this sets the width of all nodes initially which could be required for the avoidOverlap + this.body.emitter.emit("_resizeNodes"); + if (this.viewFunction === undefined) { + this.viewFunction = this.simulationStep.bind(this); + this.body.emitter.on('initRedraw', this.viewFunction); + this.body.emitter.emit('_startRendering'); + } + } else { + this.body.emitter.emit('_redraw'); + } + } + + /** + * Stop the simulation, force stabilization. + * @param {boolean} [emit=true] + */ + + }, { + key: 'stopSimulation', + value: function stopSimulation() { + var emit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + this.stabilized = true; + if (emit === true) { + this._emitStabilized(); + } + if (this.viewFunction !== undefined) { + this.body.emitter.off('initRedraw', this.viewFunction); + this.viewFunction = undefined; + if (emit === true) { + this.body.emitter.emit('_stopRendering'); + } + } + } + + /** + * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized. + * + */ + + }, { + key: 'simulationStep', + value: function simulationStep() { + // check if the physics have settled + var startTime = Date.now(); + this.physicsTick(); + var physicsTime = Date.now() - startTime; + + // run double speed if it is a little graph + if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) { + this.physicsTick(); + + // this makes sure there is no jitter. The decision is taken once to run it at double speed. + this.runDoubleSpeed = true; + } + + if (this.stabilized === true) { + this.stopSimulation(); + } + } + + /** + * trigger the stabilized event. + * + * @param {number} [amountOfIterations=this.stabilizationIterations] + * @private + */ + + }, { + key: '_emitStabilized', + value: function _emitStabilized() { + var _this2 = this; + + var amountOfIterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.stabilizationIterations; + + if (this.stabilizationIterations > 1 || this.startedStabilization === true) { + setTimeout(function () { + _this2.body.emitter.emit('stabilized', { iterations: amountOfIterations }); + _this2.startedStabilization = false; + _this2.stabilizationIterations = 0; + }, 0); + } + } + + /** + * Calculate the forces for one physics iteration and move the nodes. + * @private + */ + + }, { + key: 'physicsStep', + value: function physicsStep() { + this.gravitySolver.solve(); + this.nodesSolver.solve(); + this.edgesSolver.solve(); + this.moveNodes(); + } + + /** + * Make dynamic adjustments to the timestep, based on current state. + * + * Helper function for physicsTick(). + * @private + */ + + }, { + key: 'adjustTimeStep', + value: function adjustTimeStep() { + var factor = 1.2; // Factor for increasing the timestep on success. + + // we compare the two steps. if it is acceptable we double the step. + if (this._evaluateStepQuality() === true) { + this.timestep = factor * this.timestep; + } else { + // if not, we decrease the step to a minimum of the options timestep. + // if the decreased timestep is smaller than the options step, we do not reset the counter + // we assume that the options timestep is stable enough. + if (this.timestep / factor < this.options.timestep) { + this.timestep = this.options.timestep; + } else { + // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure + // that large instabilities do not form. + this.adaptiveCounter = -1; // check again next iteration + this.timestep = Math.max(this.options.timestep, this.timestep / factor); + } + } + } + + /** + * A single simulation step (or 'tick') in the physics simulation + * + * @private + */ + + }, { + key: 'physicsTick', + value: function physicsTick() { + this._startStabilizing(); // this ensures that there is no start event when the network is already stable. + if (this.stabilized === true) return; + + // adaptivity means the timestep adapts to the situation, only applicable for stabilization + if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) { + // timestep remains stable for "interval" iterations. + var doAdaptive = this.adaptiveCounter % this.adaptiveInterval === 0; + + if (doAdaptive) { + // first the big step and revert. + this.timestep = 2 * this.timestep; + this.physicsStep(); + this.revert(); // saves the reference state + + // now the normal step. Since this is the last step, it is the more stable one and we will take this. + this.timestep = 0.5 * this.timestep; + + // since it's half the step, we do it twice. + this.physicsStep(); + this.physicsStep(); + + this.adjustTimeStep(); + } else { + this.physicsStep(); // normal step, keeping timestep constant + } + + this.adaptiveCounter += 1; + } else { + // case for the static timestep, we reset it to the one in options and take a normal step. + this.timestep = this.options.timestep; + this.physicsStep(); + } + + if (this.stabilized === true) this.revert(); + this.stabilizationIterations++; + } + + /** + * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time. + * + * @private + */ + + }, { + key: 'updatePhysicsData', + value: function updatePhysicsData() { + this.physicsBody.forces = {}; + this.physicsBody.physicsNodeIndices = []; + this.physicsBody.physicsEdgeIndices = []; + var nodes = this.body.nodes; + var edges = this.body.edges; + + // get node indices for physics + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (nodes[nodeId].options.physics === true) { + this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id); + } + } + } + + // get edge indices for physics + for (var edgeId in edges) { + if (edges.hasOwnProperty(edgeId)) { + if (edges[edgeId].options.physics === true) { + this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id); + } + } + } + + // get the velocity and the forces vector + for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { + var _nodeId = this.physicsBody.physicsNodeIndices[i]; + this.physicsBody.forces[_nodeId] = { x: 0, y: 0 }; + + // forces can be reset because they are recalculated. Velocities have to persist. + if (this.physicsBody.velocities[_nodeId] === undefined) { + this.physicsBody.velocities[_nodeId] = { x: 0, y: 0 }; + } + } + + // clean deleted nodes from the velocity vector + for (var _nodeId2 in this.physicsBody.velocities) { + if (nodes[_nodeId2] === undefined) { + delete this.physicsBody.velocities[_nodeId2]; + } + } + } + + /** + * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized. + */ + + }, { + key: 'revert', + value: function revert() { + var nodeIds = (0, _keys2['default'])(this.previousStates); + var nodes = this.body.nodes; + var velocities = this.physicsBody.velocities; + this.referenceState = {}; + + for (var i = 0; i < nodeIds.length; i++) { + var nodeId = nodeIds[i]; + if (nodes[nodeId] !== undefined) { + if (nodes[nodeId].options.physics === true) { + this.referenceState[nodeId] = { + positions: { x: nodes[nodeId].x, y: nodes[nodeId].y } + }; + velocities[nodeId].x = this.previousStates[nodeId].vx; + velocities[nodeId].y = this.previousStates[nodeId].vy; + nodes[nodeId].x = this.previousStates[nodeId].x; + nodes[nodeId].y = this.previousStates[nodeId].y; + } + } else { + delete this.previousStates[nodeId]; + } + } + } + + /** + * This compares the reference state to the current state + * + * @returns {boolean} + * @private + */ + + }, { + key: '_evaluateStepQuality', + value: function _evaluateStepQuality() { + var dx = void 0, + dy = void 0, + dpos = void 0; + var nodes = this.body.nodes; + var reference = this.referenceState; + var posThreshold = 0.3; + + for (var nodeId in this.referenceState) { + if (this.referenceState.hasOwnProperty(nodeId) && nodes[nodeId] !== undefined) { + dx = nodes[nodeId].x - reference[nodeId].positions.x; + dy = nodes[nodeId].y - reference[nodeId].positions.y; + + dpos = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + + if (dpos > posThreshold) { + return false; + } + } + } + return true; + } + + /** + * move the nodes one timestep and check if they are stabilized + */ + + }, { + key: 'moveNodes', + value: function moveNodes() { + var nodeIndices = this.physicsBody.physicsNodeIndices; + var maxNodeVelocity = 0; + var averageNodeVelocity = 0; + + // the velocity threshold (energy in the system) for the adaptivity toggle + var velocityAdaptiveThreshold = 5; + + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + var nodeVelocity = this._performStep(nodeId); + // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized + maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity); + averageNodeVelocity += nodeVelocity; + } + + // evaluating the stabilized and adaptiveTimestepEnabled conditions + this.adaptiveTimestepEnabled = averageNodeVelocity / nodeIndices.length < velocityAdaptiveThreshold; + this.stabilized = maxNodeVelocity < this.options.minVelocity; + } + + /** + * Calculate new velocity for a coordinate direction + * + * @param {number} v velocity for current coordinate + * @param {number} f regular force for current coordinate + * @param {number} m mass of current node + * @returns {number} new velocity for current coordinate + * @private + */ + + }, { + key: 'calculateComponentVelocity', + value: function calculateComponentVelocity(v, f, m) { + var df = this.modelOptions.damping * v; // damping force + var a = (f - df) / m; // acceleration + + v += a * this.timestep; + + // Put a limit on the velocities if it is really high + var maxV = this.options.maxVelocity || 1e9; + if (Math.abs(v) > maxV) { + v = v > 0 ? maxV : -maxV; + } + + return v; + } + + /** + * Perform the actual step + * + * @param {Node.id} nodeId + * @returns {number} the new velocity of given node + * @private + */ + + }, { + key: '_performStep', + value: function _performStep(nodeId) { + var node = this.body.nodes[nodeId]; + var force = this.physicsBody.forces[nodeId]; + var velocity = this.physicsBody.velocities[nodeId]; + + // store the state so we can revert + this.previousStates[nodeId] = { x: node.x, y: node.y, vx: velocity.x, vy: velocity.y }; + + if (node.options.fixed.x === false) { + velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass); + node.x += velocity.x * this.timestep; + } else { + force.x = 0; + velocity.x = 0; + } + + if (node.options.fixed.y === false) { + velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass); + node.y += velocity.y * this.timestep; + } else { + force.y = 0; + velocity.y = 0; + } + + var totalVelocity = Math.sqrt(Math.pow(velocity.x, 2) + Math.pow(velocity.y, 2)); + return totalVelocity; + } + + /** + * When initializing and stabilizing, we can freeze nodes with a predefined position. + * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle. + * + * @private + */ + + }, { + key: '_freezeNodes', + value: function _freezeNodes() { + var nodes = this.body.nodes; + for (var id in nodes) { + if (nodes.hasOwnProperty(id)) { + if (nodes[id].x && nodes[id].y) { + var fixed = nodes[id].options.fixed; + this.freezeCache[id] = { x: fixed.x, y: fixed.y }; + fixed.x = true; + fixed.y = true; + } + } + } + } + + /** + * Unfreezes the nodes that have been frozen by _freezeDefinedNodes. + * + * @private + */ + + }, { + key: '_restoreFrozenNodes', + value: function _restoreFrozenNodes() { + var nodes = this.body.nodes; + for (var id in nodes) { + if (nodes.hasOwnProperty(id)) { + if (this.freezeCache[id] !== undefined) { + nodes[id].options.fixed.x = this.freezeCache[id].x; + nodes[id].options.fixed.y = this.freezeCache[id].y; + } + } + } + this.freezeCache = {}; + } + + /** + * Find a stable position for all nodes + * + * @param {number} [iterations=this.options.stabilization.iterations] + */ + + }, { + key: 'stabilize', + value: function stabilize() { + var _this3 = this; + + var iterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.stabilization.iterations; + + if (typeof iterations !== 'number') { + iterations = this.options.stabilization.iterations; + console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', iterations); + } + + if (this.physicsBody.physicsNodeIndices.length === 0) { + this.ready = true; + return; + } + + // enable adaptive timesteps + this.adaptiveTimestep = true && this.options.adaptiveTimestep; + + // this sets the width of all nodes initially which could be required for the avoidOverlap + this.body.emitter.emit("_resizeNodes"); + + this.stopSimulation(); // stop the render loop + this.stabilized = false; + + // block redraw requests + this.body.emitter.emit('_blockRedraw'); + this.targetIterations = iterations; + + // start the stabilization + if (this.options.stabilization.onlyDynamicEdges === true) { + this._freezeNodes(); + } + this.stabilizationIterations = 0; + + setTimeout(function () { + return _this3._stabilizationBatch(); + }, 0); + } + + /** + * If not already stabilizing, start it and emit a start event. + * + * @returns {boolean} true if stabilization started with this call + * @private + */ + + }, { + key: '_startStabilizing', + value: function _startStabilizing() { + if (this.startedStabilization === true) return false; + + this.body.emitter.emit('startStabilizing'); + this.startedStabilization = true; + return true; + } + + /** + * One batch of stabilization + * @private + */ + + }, { + key: '_stabilizationBatch', + value: function _stabilizationBatch() { + var _this4 = this; + + var running = function running() { + return _this4.stabilized === false && _this4.stabilizationIterations < _this4.targetIterations; + }; + + var sendProgress = function sendProgress() { + _this4.body.emitter.emit('stabilizationProgress', { + iterations: _this4.stabilizationIterations, + total: _this4.targetIterations + }); + }; + + if (this._startStabilizing()) { + sendProgress(); // Ensure that there is at least one start event. + } + + var count = 0; + while (running() && count < this.options.stabilization.updateInterval) { + this.physicsTick(); + count++; + } + + sendProgress(); + + if (running()) { + setTimeout(this._stabilizationBatch.bind(this), 0); + } else { + this._finalizeStabilization(); + } + } + + /** + * Wrap up the stabilization, fit and emit the events. + * @private + */ + + }, { + key: '_finalizeStabilization', + value: function _finalizeStabilization() { + this.body.emitter.emit('_allowRedraw'); + if (this.options.stabilization.fit === true) { + this.body.emitter.emit('fit'); + } + + if (this.options.stabilization.onlyDynamicEdges === true) { + this._restoreFrozenNodes(); + } + + this.body.emitter.emit('stabilizationIterationsDone'); + this.body.emitter.emit('_requestRedraw'); + + if (this.stabilized === true) { + this._emitStabilized(); + } else { + this.startSimulation(); + } + + this.ready = true; + } + + //--------------------------- DEBUGGING BELOW ---------------------------// + + + /** + * Debug function that display arrows for the forces currently active in the network. + * + * Use this when debugging only. + * + * @param {CanvasRenderingContext2D} ctx + * @private + */ + + }, { + key: '_drawForces', + value: function _drawForces(ctx) { + for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { + var index = this.physicsBody.physicsNodeIndices[i]; + var node = this.body.nodes[index]; + var force = this.physicsBody.forces[index]; + var factor = 20; + var colorFactor = 0.03; + var forceSize = Math.sqrt(Math.pow(force.x, 2) + Math.pow(force.x, 2)); + + var size = Math.min(Math.max(5, forceSize), 15); + var arrowSize = 3 * size; + + var color = util.HSVToHex((180 - Math.min(1, Math.max(0, colorFactor * forceSize)) * 180) / 360, 1, 1); + + var point = { + x: node.x + factor * force.x, + y: node.y + factor * force.y + }; + + ctx.lineWidth = size; + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(node.x, node.y); + ctx.lineTo(point.x, point.y); + ctx.stroke(); + + var angle = Math.atan2(force.y, force.x); + ctx.fillStyle = color; + EndPoints.draw(ctx, { type: 'arrow', point: point, angle: angle, length: arrowSize }); + ctx.fill(); + } + } + }]); + return PhysicsEngine; +}(); + +exports['default'] = PhysicsEngine; + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * Repulsion Solver + */ +var RepulsionSolver = function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function RepulsionSolver(body, physicsBody, options) { + (0, _classCallCheck3["default"])(this, RepulsionSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3["default"])(RepulsionSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + + /** + * Calculate the forces the nodes apply on each other based on a repulsion field. + * This field is linearly approximated. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var dx, dy, distance, fx, fy, repulsingForce, node1, node2; + + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; + + // repulsing forces between nodes + var nodeDistance = this.options.nodeDistance; + + // approximation constants + var a = -2 / 3 / nodeDistance; + var b = 4 / 3; + + // we loop from i over all but the last entree in the array + // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j + for (var i = 0; i < nodeIndices.length - 1; i++) { + node1 = nodes[nodeIndices[i]]; + for (var j = i + 1; j < nodeIndices.length; j++) { + node2 = nodes[nodeIndices[j]]; + + dx = node2.x - node1.x; + dy = node2.y - node1.y; + distance = Math.sqrt(dx * dx + dy * dy); + + // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping. + if (distance === 0) { + distance = 0.1 * Math.random(); + dx = distance; + } + + if (distance < 2 * nodeDistance) { + if (distance < 0.5 * nodeDistance) { + repulsingForce = 1.0; + } else { + repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness)) + } + repulsingForce = repulsingForce / distance; + + fx = dx * repulsingForce; + fy = dy * repulsingForce; + + forces[node1.id].x -= fx; + forces[node1.id].y -= fy; + forces[node2.id].x += fx; + forces[node2.id].y += fy; + } + } + } + } + }]); + return RepulsionSolver; +}(); + +exports["default"] = RepulsionSolver; + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * Hierarchical Repulsion Solver + */ +var HierarchicalRepulsionSolver = function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function HierarchicalRepulsionSolver(body, physicsBody, options) { + (0, _classCallCheck3["default"])(this, HierarchicalRepulsionSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3["default"])(HierarchicalRepulsionSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + + /** + * Calculate the forces the nodes apply on each other based on a repulsion field. + * This field is linearly approximated. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j; + + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; + + // repulsing forces between nodes + var nodeDistance = this.options.nodeDistance; + + // we loop from i over all but the last entree in the array + // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j + for (i = 0; i < nodeIndices.length - 1; i++) { + node1 = nodes[nodeIndices[i]]; + for (j = i + 1; j < nodeIndices.length; j++) { + node2 = nodes[nodeIndices[j]]; + + // nodes only affect nodes on their level + if (node1.level === node2.level) { + dx = node2.x - node1.x; + dy = node2.y - node1.y; + distance = Math.sqrt(dx * dx + dy * dy); + + var steepness = 0.05; + if (distance < nodeDistance) { + repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * nodeDistance, 2); + } else { + repulsingForce = 0; + } + // normalize force with + if (distance === 0) { + distance = 0.01; + } else { + repulsingForce = repulsingForce / distance; + } + fx = dx * repulsingForce; + fy = dy * repulsingForce; + + forces[node1.id].x -= fx; + forces[node1.id].y -= fy; + forces[node2.id].x += fx; + forces[node2.id].y += fy; + } + } + } + } + }]); + return HierarchicalRepulsionSolver; +}(); + +exports["default"] = HierarchicalRepulsionSolver; + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * Spring Solver + */ +var SpringSolver = function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function SpringSolver(body, physicsBody, options) { + (0, _classCallCheck3["default"])(this, SpringSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3["default"])(SpringSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + + /** + * This function calculates the springforces on the nodes, accounting for the support nodes. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var edgeLength = void 0, + edge = void 0; + var edgeIndices = this.physicsBody.physicsEdgeIndices; + var edges = this.body.edges; + var node1 = void 0, + node2 = void 0, + node3 = void 0; + + // forces caused by the edges, modelled as springs + for (var i = 0; i < edgeIndices.length; i++) { + edge = edges[edgeIndices[i]]; + if (edge.connected === true && edge.toId !== edge.fromId) { + // only calculate forces if nodes are in the same sector + if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) { + if (edge.edgeType.via !== undefined) { + edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length; + node1 = edge.to; + node2 = edge.edgeType.via; + node3 = edge.from; + + this._calculateSpringForce(node1, node2, 0.5 * edgeLength); + this._calculateSpringForce(node2, node3, 0.5 * edgeLength); + } else { + // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use + // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger. + edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5 : edge.options.length; + this._calculateSpringForce(edge.from, edge.to, edgeLength); + } + } + } + } + } + + /** + * This is the code actually performing the calculation for the function above. + * + * @param {Node} node1 + * @param {Node} node2 + * @param {number} edgeLength + * @private + */ + + }, { + key: "_calculateSpringForce", + value: function _calculateSpringForce(node1, node2, edgeLength) { + var dx = node1.x - node2.x; + var dy = node1.y - node2.y; + var distance = Math.max(Math.sqrt(dx * dx + dy * dy), 0.01); + + // the 1/distance is so the fx and fy can be calculated without sine or cosine. + var springForce = this.options.springConstant * (edgeLength - distance) / distance; + + var fx = dx * springForce; + var fy = dy * springForce; + + // handle the case where one node is not part of the physcis + if (this.physicsBody.forces[node1.id] !== undefined) { + this.physicsBody.forces[node1.id].x += fx; + this.physicsBody.forces[node1.id].y += fy; + } + + if (this.physicsBody.forces[node2.id] !== undefined) { + this.physicsBody.forces[node2.id].x -= fx; + this.physicsBody.forces[node2.id].y -= fy; + } + } + }]); + return SpringSolver; +}(); + +exports["default"] = SpringSolver; + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * Hierarchical Spring Solver + */ +var HierarchicalSpringSolver = function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function HierarchicalSpringSolver(body, physicsBody, options) { + (0, _classCallCheck3["default"])(this, HierarchicalSpringSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3["default"])(HierarchicalSpringSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + + /** + * This function calculates the springforces on the nodes, accounting for the support nodes. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var edgeLength, edge; + var dx, dy, fx, fy, springForce, distance; + var edges = this.body.edges; + var factor = 0.5; + + var edgeIndices = this.physicsBody.physicsEdgeIndices; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; + + // initialize the spring force counters + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + forces[nodeId].springFx = 0; + forces[nodeId].springFy = 0; + } + + // forces caused by the edges, modelled as springs + for (var _i = 0; _i < edgeIndices.length; _i++) { + edge = edges[edgeIndices[_i]]; + if (edge.connected === true) { + edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length; + + dx = edge.from.x - edge.to.x; + dy = edge.from.y - edge.to.y; + distance = Math.sqrt(dx * dx + dy * dy); + distance = distance === 0 ? 0.01 : distance; + + // the 1/distance is so the fx and fy can be calculated without sine or cosine. + springForce = this.options.springConstant * (edgeLength - distance) / distance; + + fx = dx * springForce; + fy = dy * springForce; + + if (edge.to.level != edge.from.level) { + if (forces[edge.toId] !== undefined) { + forces[edge.toId].springFx -= fx; + forces[edge.toId].springFy -= fy; + } + if (forces[edge.fromId] !== undefined) { + forces[edge.fromId].springFx += fx; + forces[edge.fromId].springFy += fy; + } + } else { + if (forces[edge.toId] !== undefined) { + forces[edge.toId].x -= factor * fx; + forces[edge.toId].y -= factor * fy; + } + if (forces[edge.fromId] !== undefined) { + forces[edge.fromId].x += factor * fx; + forces[edge.fromId].y += factor * fy; + } + } + } + } + + // normalize spring forces + springForce = 1; + var springFx, springFy; + for (var _i2 = 0; _i2 < nodeIndices.length; _i2++) { + var _nodeId = nodeIndices[_i2]; + springFx = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFx)); + springFy = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFy)); + + forces[_nodeId].x += springFx; + forces[_nodeId].y += springFy; + } + + // retain energy balance + var totalFx = 0; + var totalFy = 0; + for (var _i3 = 0; _i3 < nodeIndices.length; _i3++) { + var _nodeId2 = nodeIndices[_i3]; + totalFx += forces[_nodeId2].x; + totalFy += forces[_nodeId2].y; + } + var correctionFx = totalFx / nodeIndices.length; + var correctionFy = totalFy / nodeIndices.length; + + for (var _i4 = 0; _i4 < nodeIndices.length; _i4++) { + var _nodeId3 = nodeIndices[_i4]; + forces[_nodeId3].x -= correctionFx; + forces[_nodeId3].y -= correctionFy; + } + } + }]); + return HierarchicalSpringSolver; +}(); + +exports["default"] = HierarchicalSpringSolver; + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _BarnesHutSolver2 = __webpack_require__(120); + +var _BarnesHutSolver3 = _interopRequireDefault(_BarnesHutSolver2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * @extends BarnesHutSolver + */ +var ForceAtlas2BasedRepulsionSolver = function (_BarnesHutSolver) { + (0, _inherits3["default"])(ForceAtlas2BasedRepulsionSolver, _BarnesHutSolver); + + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function ForceAtlas2BasedRepulsionSolver(body, physicsBody, options) { + (0, _classCallCheck3["default"])(this, ForceAtlas2BasedRepulsionSolver); + return (0, _possibleConstructorReturn3["default"])(this, (ForceAtlas2BasedRepulsionSolver.__proto__ || (0, _getPrototypeOf2["default"])(ForceAtlas2BasedRepulsionSolver)).call(this, body, physicsBody, options)); + } + + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Node} node + * @param {Object} parentBranch + * @private + */ + + + (0, _createClass3["default"])(ForceAtlas2BasedRepulsionSolver, [{ + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, node, parentBranch) { + if (distance === 0) { + distance = 0.1 * Math.random(); + dx = distance; + } + + if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { + distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius); + } + + var degree = node.edges.length + 1; + // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines + // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce + var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance, 2); + var fx = dx * gravityForce; + var fy = dy * gravityForce; + + this.physicsBody.forces[node.id].x += fx; + this.physicsBody.forces[node.id].y += fy; + } + }]); + return ForceAtlas2BasedRepulsionSolver; +}(_BarnesHutSolver3["default"]); + +exports["default"] = ForceAtlas2BasedRepulsionSolver; + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _CentralGravitySolver2 = __webpack_require__(121); + +var _CentralGravitySolver3 = _interopRequireDefault(_CentralGravitySolver2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * @extends CentralGravitySolver + */ +var ForceAtlas2BasedCentralGravitySolver = function (_CentralGravitySolver) { + (0, _inherits3["default"])(ForceAtlas2BasedCentralGravitySolver, _CentralGravitySolver); + + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function ForceAtlas2BasedCentralGravitySolver(body, physicsBody, options) { + (0, _classCallCheck3["default"])(this, ForceAtlas2BasedCentralGravitySolver); + return (0, _possibleConstructorReturn3["default"])(this, (ForceAtlas2BasedCentralGravitySolver.__proto__ || (0, _getPrototypeOf2["default"])(ForceAtlas2BasedCentralGravitySolver)).call(this, body, physicsBody, options)); + } + + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Object} forces + * @param {Node} node + * @private + */ + + + (0, _createClass3["default"])(ForceAtlas2BasedCentralGravitySolver, [{ + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, forces, node) { + if (distance > 0) { + var degree = node.edges.length + 1; + var gravityForce = this.options.centralGravity * degree * node.options.mass; + forces[node.id].x = dx * gravityForce; + forces[node.id].y = dy * gravityForce; + } + } + }]); + return ForceAtlas2BasedCentralGravitySolver; +}(_CentralGravitySolver3["default"]); + +exports["default"] = ForceAtlas2BasedCentralGravitySolver; + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/* =========================================================================== + +# TODO + +- `edgeReplacedById` not cleaned up yet on cluster edge removal +- allowSingleNodeCluster could be a global option as well; currently needs to always + be passed to clustering methods + +---------------------------------------------- + +# State Model for Clustering + +The total state for clustering is non-trivial. It is useful to have a model +available as to how it works. The following documents the relevant state items. + + +## Network State + +The following `network`-members are relevant to clustering: + +- `body.nodes` - all nodes actively participating in the network +- `body.edges` - same for edges +- `body.nodeIndices` - id's of nodes that are visible at a given moment +- `body.edgeIndices` - same for edges + +This includes: + +- helper nodes for dragging in `manipulation` +- helper nodes for edge type `dynamic` +- cluster nodes and edges +- there may be more than this. + +A node/edge may be missing in the `Indices` member if: + +- it is a helper node +- the node or edge state has option `hidden` set +- It is not visible due to clustering + + +## Clustering State + +For the hashes, the id's of the nodes/edges are used as key. + +Member `network.clustering` contains the following items: + +- `clusteredNodes` - hash with values: { clusterId: , node: } +- `clusteredEdges` - hash with values: restore information for given edge + + +Due to nesting of clusters, these members can contain cluster nodes and edges as well. + +The important thing to note here, is that the clustered nodes and edges also +appear in the members of the cluster nodes. For data update, it is therefore +important to scan these lists as well as the cluster nodes. + + +### Cluster Node + +A cluster node has the following extra fields: + +- `isCluster : true` - indication that this is a cluster node +- `containedNodes` - hash of nodes contained in this cluster +- `containedEdges` - same for edges +- `edges` - array of cluster edges for this node + + +**NOTE:** + +- `containedEdges` can also contain edges which are not clustered; e.g. an edge + connecting two nodes in the same cluster. + + +### Cluster Edge + +These are the items in the `edges` member of a clustered node. They have the +following relevant members: + +- 'clusteringEdgeReplacingIds` - array of id's of edges replaced by this edge + +Note that it's possible to nest clusters, so that `clusteringEdgeReplacingIds` +can contain edge id's of other clusters. + + +### Clustered Edge + +This is any edge contained by a cluster edge. It gets the following additional +member: + +- `edgeReplacedById` - id of the cluster edge in which current edge is clustered + + + =========================================================================== */ +var util = __webpack_require__(2); +var NetworkUtil = __webpack_require__(76)['default']; +var Cluster = __webpack_require__(228)['default']; +var Edge = __webpack_require__(74)['default']; // Only needed for check on type! +var Node = __webpack_require__(47)['default']; // Only needed for check on type! + +/** + * The clustering engine + */ + +var ClusterEngine = function () { + /** + * @param {Object} body + */ + function ClusterEngine(body) { + var _this = this; + + (0, _classCallCheck3['default'])(this, ClusterEngine); + + this.body = body; + this.clusteredNodes = {}; // key: node id, value: { clusterId: , node: } + this.clusteredEdges = {}; // key: edge id, value: restore information for given edge + + this.options = {}; + this.defaultOptions = {}; + util.extend(this.options, this.defaultOptions); + + this.body.emitter.on('_resetData', function () { + _this.clusteredNodes = {};_this.clusteredEdges = {}; + }); + } + + /** + * + * @param {number} hubsize + * @param {Object} options + */ + + + (0, _createClass3['default'])(ClusterEngine, [{ + key: 'clusterByHubsize', + value: function clusterByHubsize(hubsize, options) { + if (hubsize === undefined) { + hubsize = this._getHubSize(); + } else if ((typeof hubsize === 'undefined' ? 'undefined' : (0, _typeof3['default'])(hubsize)) === "object") { + options = this._checkOptions(hubsize); + hubsize = this._getHubSize(); + } + + var nodesToCluster = []; + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + if (node.edges.length >= hubsize) { + nodesToCluster.push(node.id); + } + } + + for (var _i = 0; _i < nodesToCluster.length; _i++) { + this.clusterByConnection(nodesToCluster[_i], options, true); + } + + this.body.emitter.emit('_dataChanged'); + } + + /** + * loop over all nodes, check if they adhere to the condition and cluster if needed. + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: 'cluster', + value: function cluster() { + var _this2 = this; + + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (options.joinCondition === undefined) { + throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options."); + } + + // check if the options object is fine, append if needed + options = this._checkOptions(options); + + var childNodesObj = {}; + var childEdgesObj = {}; + + // collect the nodes that will be in the cluster + util.forEach(this.body.nodes, function (node, nodeId) { + var clonedOptions = NetworkUtil.cloneOptions(node); + if (options.joinCondition(clonedOptions) === true) { + childNodesObj[nodeId] = node; + + // collect the edges that will be in the cluster + util.forEach(node.edges, function (edge) { + if (_this2.clusteredEdges[edge.id] === undefined) { + childEdgesObj[edge.id] = edge; + } + }); + } + }); + + this._cluster(childNodesObj, childEdgesObj, options, refreshData); + } + + /** + * Cluster all nodes in the network that have only X edges + * @param {number} edgeCount + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: 'clusterByEdgeCount', + value: function clusterByEdgeCount(edgeCount, options) { + var _this3 = this; + + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + options = this._checkOptions(options); + var clusters = []; + var usedNodes = {}; + var edge = void 0, + edges = void 0, + relevantEdgeCount = void 0; + // collect the nodes that will be in the cluster + + var _loop = function _loop(i) { + var childNodesObj = {}; + var childEdgesObj = {}; + var nodeId = _this3.body.nodeIndices[i]; + var node = _this3.body.nodes[nodeId]; + + // if this node is already used in another cluster this session, we do not have to re-evaluate it. + if (usedNodes[nodeId] === undefined) { + relevantEdgeCount = 0; + edges = []; + for (var j = 0; j < node.edges.length; j++) { + edge = node.edges[j]; + if (_this3.clusteredEdges[edge.id] === undefined) { + if (edge.toId !== edge.fromId) { + relevantEdgeCount++; + } + edges.push(edge); + } + } + + // this node qualifies, we collect its neighbours to start the clustering process. + if (relevantEdgeCount === edgeCount) { + checkJoinCondition = function checkJoinCondition(node) { + if (options.joinCondition === undefined || options.joinCondition === null) { + return true; + } + + var clonedOptions = NetworkUtil.cloneOptions(node); + return options.joinCondition(clonedOptions); + }; + + var gatheringSuccessful = true; + for (var _j = 0; _j < edges.length; _j++) { + edge = edges[_j]; + var childNodeId = _this3._getConnectedId(edge, nodeId); + // add the nodes to the list by the join condition. + if (checkJoinCondition(node)) { + childEdgesObj[edge.id] = edge; + childNodesObj[nodeId] = node; + childNodesObj[childNodeId] = _this3.body.nodes[childNodeId]; + usedNodes[nodeId] = true; + } else { + // this node does not qualify after all. + gatheringSuccessful = false; + break; + } + } + + // add to the cluster queue + if ((0, _keys2['default'])(childNodesObj).length > 0 && (0, _keys2['default'])(childEdgesObj).length > 0 && gatheringSuccessful === true) { + /** + * Search for cluster data that contains any of the node id's + * @returns {Boolean} true if no joinCondition, otherwise return value of joinCondition + */ + findClusterData = function findClusterData() { + for (var n = 0; n < clusters.length; ++n) { + // Search for a cluster containing any of the node id's + for (var m in childNodesObj) { + if (clusters[n].nodes[m] !== undefined) { + return clusters[n]; + } + } + } + + return undefined; + }; + + // If any of the found nodes is part of a cluster found in this method, + // add the current values to that cluster + + + foundCluster = findClusterData(); + + if (foundCluster !== undefined) { + // Add nodes to found cluster if not present + for (var m in childNodesObj) { + if (foundCluster.nodes[m] === undefined) { + foundCluster.nodes[m] = childNodesObj[m]; + } + } + + // Add edges to found cluster, if not present + for (var _m in childEdgesObj) { + if (foundCluster.edges[_m] === undefined) { + foundCluster.edges[_m] = childEdgesObj[_m]; + } + } + } else { + // Create a new cluster group + clusters.push({ nodes: childNodesObj, edges: childEdgesObj }); + } + } + } + } + }; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var checkJoinCondition; + var findClusterData; + var foundCluster; + + _loop(i); + } + + for (var i = 0; i < clusters.length; i++) { + this._cluster(clusters[i].nodes, clusters[i].edges, options, false); + } + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + + /** + * Cluster all nodes in the network that have only 1 edge + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: 'clusterOutliers', + value: function clusterOutliers(options) { + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + this.clusterByEdgeCount(1, options, refreshData); + } + + /** + * Cluster all nodes in the network that have only 2 edge + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: 'clusterBridges', + value: function clusterBridges(options) { + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + this.clusterByEdgeCount(2, options, refreshData); + } + + /** + * suck all connected nodes of a node into the node. + * @param {Node.id} nodeId + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: 'clusterByConnection', + value: function clusterByConnection(nodeId, options) { + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + // kill conditions + if (nodeId === undefined) { + throw new Error("No nodeId supplied to clusterByConnection!"); + } + if (this.body.nodes[nodeId] === undefined) { + throw new Error("The nodeId given to clusterByConnection does not exist!"); + } + + var node = this.body.nodes[nodeId]; + options = this._checkOptions(options, node); + if (options.clusterNodeProperties.x === undefined) { + options.clusterNodeProperties.x = node.x; + } + if (options.clusterNodeProperties.y === undefined) { + options.clusterNodeProperties.y = node.y; + } + if (options.clusterNodeProperties.fixed === undefined) { + options.clusterNodeProperties.fixed = {}; + options.clusterNodeProperties.fixed.x = node.options.fixed.x; + options.clusterNodeProperties.fixed.y = node.options.fixed.y; + } + + var childNodesObj = {}; + var childEdgesObj = {}; + var parentNodeId = node.id; + var parentClonedOptions = NetworkUtil.cloneOptions(node); + childNodesObj[parentNodeId] = node; + + // collect the nodes that will be in the cluster + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + if (this.clusteredEdges[edge.id] === undefined) { + var childNodeId = this._getConnectedId(edge, parentNodeId); + + // if the child node is not in a cluster + if (this.clusteredNodes[childNodeId] === undefined) { + if (childNodeId !== parentNodeId) { + if (options.joinCondition === undefined) { + childEdgesObj[edge.id] = edge; + childNodesObj[childNodeId] = this.body.nodes[childNodeId]; + } else { + // clone the options and insert some additional parameters that could be interesting. + var childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]); + if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) { + childEdgesObj[edge.id] = edge; + childNodesObj[childNodeId] = this.body.nodes[childNodeId]; + } + } + } else { + // swallow the edge if it is self-referencing. + childEdgesObj[edge.id] = edge; + } + } + } + } + var childNodeIDs = (0, _keys2['default'])(childNodesObj).map(function (childNode) { + return childNodesObj[childNode].id; + }); + + for (childNode in childNodesObj) { + if (!childNodesObj.hasOwnProperty(childNode)) continue; + + var childNode = childNodesObj[childNode]; + for (var y = 0; y < childNode.edges.length; y++) { + var childEdge = childNode.edges[y]; + if (childNodeIDs.indexOf(this._getConnectedId(childEdge, childNode.id)) > -1) { + childEdgesObj[childEdge.id] = childEdge; + } + } + } + this._cluster(childNodesObj, childEdgesObj, options, refreshData); + } + + /** + * This function creates the edges that will be attached to the cluster + * It looks for edges that are connected to the nodes from the "outside' of the cluster. + * + * @param {{Node.id: vis.Node}} childNodesObj + * @param {{vis.Edge.id: vis.Edge}} childEdgesObj + * @param {Object} clusterNodeProperties + * @param {Object} clusterEdgeProperties + * @private + */ + + }, { + key: '_createClusterEdges', + value: function _createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) { + var edge = void 0, + childNodeId = void 0, + childNode = void 0, + toId = void 0, + fromId = void 0, + otherNodeId = void 0; + + // loop over all child nodes and their edges to find edges going out of the cluster + // these edges will be replaced by clusterEdges. + var childKeys = (0, _keys2['default'])(childNodesObj); + var createEdges = []; + for (var i = 0; i < childKeys.length; i++) { + childNodeId = childKeys[i]; + childNode = childNodesObj[childNodeId]; + + // construct new edges from the cluster to others + for (var j = 0; j < childNode.edges.length; j++) { + edge = childNode.edges[j]; + // we only handle edges that are visible to the system, not the disabled ones from the clustering process. + if (this.clusteredEdges[edge.id] === undefined) { + // self-referencing edges will be added to the "hidden" list + if (edge.toId == edge.fromId) { + childEdgesObj[edge.id] = edge; + } else { + // set up the from and to. + if (edge.toId == childNodeId) { + // this is a double equals because ints and strings can be interchanged here. + toId = clusterNodeProperties.id; + fromId = edge.fromId; + otherNodeId = fromId; + } else { + toId = edge.toId; + fromId = clusterNodeProperties.id; + otherNodeId = toId; + } + } + + // Only edges from the cluster outwards are being replaced. + if (childNodesObj[otherNodeId] === undefined) { + createEdges.push({ edge: edge, fromId: fromId, toId: toId }); + } + } + } + } + + // + // Here we actually create the replacement edges. + // + // We could not do this in the loop above as the creation process + // would add an edge to the edges array we are iterating over. + // + // NOTE: a clustered edge can have multiple base edges! + // + var newEdges = []; + + /** + * Find a cluster edge which matches the given created edge. + * @param {vis.Edge} createdEdge + * @returns {vis.Edge} + */ + var getNewEdge = function getNewEdge(createdEdge) { + for (var _j2 = 0; _j2 < newEdges.length; _j2++) { + var newEdge = newEdges[_j2]; + + // We replace both to and from edges with a single cluster edge + var matchToDirection = createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId; + var matchFromDirection = createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId; + + if (matchToDirection || matchFromDirection) { + return newEdge; + } + } + + return null; + }; + + for (var _j3 = 0; _j3 < createEdges.length; _j3++) { + var createdEdge = createEdges[_j3]; + var _edge = createdEdge.edge; + var newEdge = getNewEdge(createdEdge); + + if (newEdge === null) { + // Create a clustered edge for this connection + newEdge = this._createClusteredEdge(createdEdge.fromId, createdEdge.toId, _edge, clusterEdgeProperties); + + newEdges.push(newEdge); + } else { + newEdge.clusteringEdgeReplacingIds.push(_edge.id); + } + + // also reference the new edge in the old edge + this.body.edges[_edge.id].edgeReplacedById = newEdge.id; + + // hide the replaced edge + this._backupEdgeOptions(_edge); + _edge.setOptions({ physics: false }); + } + } + + /** + * This function checks the options that can be supplied to the different cluster functions + * for certain fields and inserts defaults if needed + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: '_checkOptions', + value: function _checkOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (options.clusterEdgeProperties === undefined) { + options.clusterEdgeProperties = {}; + } + if (options.clusterNodeProperties === undefined) { + options.clusterNodeProperties = {}; + } + + return options; + } + + /** + * + * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node + * @param {Object} childEdgesObj | object with edge objects, id as keys + * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties} + * @param {boolean} refreshData | when true, do not wrap up + * @private + */ + + }, { + key: '_cluster', + value: function _cluster(childNodesObj, childEdgesObj, options) { + var refreshData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + + // Remove nodes which are already clustered + var tmpNodesToRemove = []; + for (var _nodeId in childNodesObj) { + if (childNodesObj.hasOwnProperty(_nodeId)) { + if (this.clusteredNodes[_nodeId] !== undefined) { + tmpNodesToRemove.push(_nodeId); + } + } + } + + for (var n = 0; n < tmpNodesToRemove.length; ++n) { + delete childNodesObj[tmpNodesToRemove[n]]; + } + + // kill condition: no nodes don't bother + if ((0, _keys2['default'])(childNodesObj).length == 0) { + return; + } + + // allow clusters of 1 if options allow + if ((0, _keys2['default'])(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) { + return; + } + + var clusterNodeProperties = util.deepExtend({}, options.clusterNodeProperties); + + // construct the clusterNodeProperties + if (options.processProperties !== undefined) { + // get the childNode options + var childNodesOptions = []; + for (var _nodeId2 in childNodesObj) { + if (childNodesObj.hasOwnProperty(_nodeId2)) { + var clonedOptions = NetworkUtil.cloneOptions(childNodesObj[_nodeId2]); + childNodesOptions.push(clonedOptions); + } + } + + // get cluster properties based on childNodes + var childEdgesOptions = []; + for (var edgeId in childEdgesObj) { + if (childEdgesObj.hasOwnProperty(edgeId)) { + // these cluster edges will be removed on creation of the cluster. + if (edgeId.substr(0, 12) !== "clusterEdge:") { + var _clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge'); + childEdgesOptions.push(_clonedOptions); + } + } + } + + clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions); + if (!clusterNodeProperties) { + throw new Error("The processProperties function does not return properties!"); + } + } + + // check if we have an unique id; + if (clusterNodeProperties.id === undefined) { + clusterNodeProperties.id = 'cluster:' + util.randomUUID(); + } + var clusterId = clusterNodeProperties.id; + + if (clusterNodeProperties.label === undefined) { + clusterNodeProperties.label = 'cluster'; + } + + // give the clusterNode a position if it does not have one. + var pos = undefined; + if (clusterNodeProperties.x === undefined) { + pos = this._getClusterPosition(childNodesObj); + clusterNodeProperties.x = pos.x; + } + if (clusterNodeProperties.y === undefined) { + if (pos === undefined) { + pos = this._getClusterPosition(childNodesObj); + } + clusterNodeProperties.y = pos.y; + } + + // force the ID to remain the same + clusterNodeProperties.id = clusterId; + + // create the cluster Node + // Note that allowSingleNodeCluster, if present, is stored in the options as well + var clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster); + clusterNode.containedNodes = childNodesObj; + clusterNode.containedEdges = childEdgesObj; + // cache a copy from the cluster edge properties if we have to reconnect others later on + clusterNode.clusterEdgeProperties = options.clusterEdgeProperties; + + // finally put the cluster node into global + this.body.nodes[clusterNodeProperties.id] = clusterNode; + + this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties); + + // set ID to undefined so no duplicates arise + clusterNodeProperties.id = undefined; + + // wrap up + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + + /** + * + * @param {Edge} edge + * @private + */ + + }, { + key: '_backupEdgeOptions', + value: function _backupEdgeOptions(edge) { + if (this.clusteredEdges[edge.id] === undefined) { + this.clusteredEdges[edge.id] = { physics: edge.options.physics }; + } + } + + /** + * + * @param {Edge} edge + * @private + */ + + }, { + key: '_restoreEdge', + value: function _restoreEdge(edge) { + var originalOptions = this.clusteredEdges[edge.id]; + if (originalOptions !== undefined) { + edge.setOptions({ physics: originalOptions.physics }); + delete this.clusteredEdges[edge.id]; + } + } + + /** + * Check if a node is a cluster. + * @param {Node.id} nodeId + * @returns {*} + */ + + }, { + key: 'isCluster', + value: function isCluster(nodeId) { + if (this.body.nodes[nodeId] !== undefined) { + return this.body.nodes[nodeId].isCluster === true; + } else { + console.log("Node does not exist."); + return false; + } + } + + /** + * get the position of the cluster node based on what's inside + * @param {object} childNodesObj | object with node objects, id as keys + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: '_getClusterPosition', + value: function _getClusterPosition(childNodesObj) { + var childKeys = (0, _keys2['default'])(childNodesObj); + var minX = childNodesObj[childKeys[0]].x; + var maxX = childNodesObj[childKeys[0]].x; + var minY = childNodesObj[childKeys[0]].y; + var maxY = childNodesObj[childKeys[0]].y; + var node = void 0; + for (var i = 1; i < childKeys.length; i++) { + node = childNodesObj[childKeys[i]]; + minX = node.x < minX ? node.x : minX; + maxX = node.x > maxX ? node.x : maxX; + minY = node.y < minY ? node.y : minY; + maxY = node.y > maxY ? node.y : maxY; + } + + return { x: 0.5 * (minX + maxX), y: 0.5 * (minY + maxY) }; + } + + /** + * Open a cluster by calling this function. + * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node + * @param {Object} options + * @param {boolean} refreshData | wrap up afterwards if not true + */ + + }, { + key: 'openCluster', + value: function openCluster(clusterNodeId, options) { + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + // kill conditions + if (clusterNodeId === undefined) { + throw new Error("No clusterNodeId supplied to openCluster."); + } + + var clusterNode = this.body.nodes[clusterNodeId]; + + if (clusterNode === undefined) { + throw new Error("The clusterNodeId supplied to openCluster does not exist."); + } + if (clusterNode.isCluster !== true || clusterNode.containedNodes === undefined || clusterNode.containedEdges === undefined) { + throw new Error("The node:" + clusterNodeId + " is not a valid cluster."); + } + + // Check if current cluster is clustered itself + var stack = this.findNode(clusterNodeId); + var parentIndex = stack.indexOf(clusterNodeId) - 1; + if (parentIndex >= 0) { + // Current cluster is clustered; transfer contained nodes and edges to parent + var parentClusterNodeId = stack[parentIndex]; + var parentClusterNode = this.body.nodes[parentClusterNodeId]; + + // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged + parentClusterNode._openChildCluster(clusterNodeId); + + // All components of child cluster node have been transferred. It can die now. + delete this.body.nodes[clusterNodeId]; + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + + return; + } + + // main body + var containedNodes = clusterNode.containedNodes; + var containedEdges = clusterNode.containedEdges; + + // allow the user to position the nodes after release. + if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') { + var positions = {}; + var clusterPosition = { x: clusterNode.x, y: clusterNode.y }; + for (var _nodeId3 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId3)) { + var containedNode = this.body.nodes[_nodeId3]; + positions[_nodeId3] = { x: containedNode.x, y: containedNode.y }; + } + } + var newPositions = options.releaseFunction(clusterPosition, positions); + + for (var _nodeId4 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId4)) { + var _containedNode = this.body.nodes[_nodeId4]; + if (newPositions[_nodeId4] !== undefined) { + _containedNode.x = newPositions[_nodeId4].x === undefined ? clusterNode.x : newPositions[_nodeId4].x; + _containedNode.y = newPositions[_nodeId4].y === undefined ? clusterNode.y : newPositions[_nodeId4].y; + } + } + } + } else { + // copy the position from the cluster + util.forEach(containedNodes, function (containedNode) { + // inherit position + if (containedNode.options.fixed.x === false) { + containedNode.x = clusterNode.x; + } + if (containedNode.options.fixed.y === false) { + containedNode.y = clusterNode.y; + } + }); + } + + // release nodes + for (var _nodeId5 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId5)) { + var _containedNode2 = this.body.nodes[_nodeId5]; + + // inherit speed + _containedNode2.vx = clusterNode.vx; + _containedNode2.vy = clusterNode.vy; + + _containedNode2.setOptions({ physics: true }); + + delete this.clusteredNodes[_nodeId5]; + } + } + + // copy the clusterNode edges because we cannot iterate over an object that we add or remove from. + var edgesToBeDeleted = []; + for (var i = 0; i < clusterNode.edges.length; i++) { + edgesToBeDeleted.push(clusterNode.edges[i]); + } + + // actually handling the deleting. + for (var _i2 = 0; _i2 < edgesToBeDeleted.length; _i2++) { + var edge = edgesToBeDeleted[_i2]; + var otherNodeId = this._getConnectedId(edge, clusterNodeId); + var otherNode = this.clusteredNodes[otherNodeId]; + + for (var j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) { + var transferId = edge.clusteringEdgeReplacingIds[j]; + var transferEdge = this.body.edges[transferId]; + if (transferEdge === undefined) continue; + + // if the other node is in another cluster, we transfer ownership of this edge to the other cluster + if (otherNode !== undefined) { + // transfer ownership: + var otherCluster = this.body.nodes[otherNode.clusterId]; + otherCluster.containedEdges[transferEdge.id] = transferEdge; + + // delete local reference + delete containedEdges[transferEdge.id]; + + // get to and from + var fromId = transferEdge.fromId; + var toId = transferEdge.toId; + if (transferEdge.toId == otherNodeId) { + toId = otherNode.clusterId; + } else { + fromId = otherNode.clusterId; + } + + // create new cluster edge from the otherCluster + this._createClusteredEdge(fromId, toId, transferEdge, otherCluster.clusterEdgeProperties, { hidden: false, physics: true }); + } else { + this._restoreEdge(transferEdge); + } + } + + edge.remove(); + } + + // handle the releasing of the edges + for (var edgeId in containedEdges) { + if (containedEdges.hasOwnProperty(edgeId)) { + this._restoreEdge(containedEdges[edgeId]); + } + } + + // remove clusterNode + delete this.body.nodes[clusterNodeId]; + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + + /** + * + * @param {Cluster.id} clusterId + * @returns {Array.} + */ + + }, { + key: 'getNodesInCluster', + value: function getNodesInCluster(clusterId) { + var nodesArray = []; + if (this.isCluster(clusterId) === true) { + var containedNodes = this.body.nodes[clusterId].containedNodes; + for (var _nodeId6 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId6)) { + nodesArray.push(this.body.nodes[_nodeId6].id); + } + } + } + + return nodesArray; + } + + /** + * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node + * + * If a node can't be found in the chain, return an empty array. + * + * @param {string|number} nodeId + * @returns {Array} + */ + + }, { + key: 'findNode', + value: function findNode(nodeId) { + var stack = []; + var max = 100; + var counter = 0; + var node = void 0; + + while (this.clusteredNodes[nodeId] !== undefined && counter < max) { + node = this.body.nodes[nodeId]; + if (node === undefined) return []; + stack.push(node.id); + + nodeId = this.clusteredNodes[nodeId].clusterId; + counter++; + } + + node = this.body.nodes[nodeId]; + if (node === undefined) return []; + stack.push(node.id); + + stack.reverse(); + return stack; + } + + /** + * Using a clustered nodeId, update with the new options + * @param {vis.Edge.id} clusteredNodeId + * @param {object} newOptions + */ + + }, { + key: 'updateClusteredNode', + value: function updateClusteredNode(clusteredNodeId, newOptions) { + if (clusteredNodeId === undefined) { + throw new Error("No clusteredNodeId supplied to updateClusteredNode."); + } + if (newOptions === undefined) { + throw new Error("No newOptions supplied to updateClusteredNode."); + } + if (this.body.nodes[clusteredNodeId] === undefined) { + throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist."); + } + + this.body.nodes[clusteredNodeId].setOptions(newOptions); + this.body.emitter.emit('_dataChanged'); + } + + /** + * Using a base edgeId, update all related clustered edges with the new options + * @param {vis.Edge.id} startEdgeId + * @param {object} newOptions + */ + + }, { + key: 'updateEdge', + value: function updateEdge(startEdgeId, newOptions) { + if (startEdgeId === undefined) { + throw new Error("No startEdgeId supplied to updateEdge."); + } + if (newOptions === undefined) { + throw new Error("No newOptions supplied to updateEdge."); + } + if (this.body.edges[startEdgeId] === undefined) { + throw new Error("The startEdgeId supplied to updateEdge does not exist."); + } + + var allEdgeIds = this.getClusteredEdges(startEdgeId); + for (var i = 0; i < allEdgeIds.length; i++) { + var edge = this.body.edges[allEdgeIds[i]]; + edge.setOptions(newOptions); + } + this.body.emitter.emit('_dataChanged'); + } + + /** + * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId) + * @param {vis.Edge.id} edgeId + * @returns {Array.} + */ + + }, { + key: 'getClusteredEdges', + value: function getClusteredEdges(edgeId) { + var stack = []; + var max = 100; + var counter = 0; + + while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) { + stack.push(this.body.edges[edgeId].id); + edgeId = this.body.edges[edgeId].edgeReplacedById; + counter++; + } + stack.reverse(); + return stack; + } + + /** + * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge + * @param {vis.Edge.id} clusteredEdgeId + * @returns {vis.Edge.id} baseEdgeId + * + * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use. + */ + + }, { + key: 'getBaseEdge', + value: function getBaseEdge(clusteredEdgeId) { + // Just kludge this by returning the first base edge id found + return this.getBaseEdges(clusteredEdgeId)[0]; + } + + /** + * Get all regular edges for this clustered edge id. + * + * @param {vis.Edge.id} clusteredEdgeId + * @returns {Array.} all baseEdgeId's under this clustered edge + */ + + }, { + key: 'getBaseEdges', + value: function getBaseEdges(clusteredEdgeId) { + var IdsToHandle = [clusteredEdgeId]; + var doneIds = []; + var foundIds = []; + var max = 100; + var counter = 0; + + while (IdsToHandle.length > 0 && counter < max) { + var nextId = IdsToHandle.pop(); + if (nextId === undefined) continue; // Paranoia here and onwards + var nextEdge = this.body.edges[nextId]; + if (nextEdge === undefined) continue; + counter++; + + var replacingIds = nextEdge.clusteringEdgeReplacingIds; + if (replacingIds === undefined) { + // nextId is a base id + foundIds.push(nextId); + } else { + // Another cluster edge, unravel this one as well + for (var i = 0; i < replacingIds.length; ++i) { + var replacingId = replacingIds[i]; + + // Don't add if already handled + // TODO: never triggers; find a test-case which does + if (IdsToHandle.indexOf(replacingIds) !== -1 || doneIds.indexOf(replacingIds) !== -1) { + continue; + } + + IdsToHandle.push(replacingId); + } + } + + doneIds.push(nextId); + } + + return foundIds; + } + + /** + * Get the Id the node is connected to + * @param {vis.Edge} edge + * @param {Node.id} nodeId + * @returns {*} + * @private + */ + + }, { + key: '_getConnectedId', + value: function _getConnectedId(edge, nodeId) { + if (edge.toId != nodeId) { + return edge.toId; + } else if (edge.fromId != nodeId) { + return edge.fromId; + } else { + return edge.fromId; + } + } + + /** + * We determine how many connections denote an important hub. + * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%) + * + * @returns {number} + * @private + */ + + }, { + key: '_getHubSize', + value: function _getHubSize() { + var average = 0; + var averageSquared = 0; + var hubCounter = 0; + var largestHub = 0; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var _node = this.body.nodes[this.body.nodeIndices[i]]; + if (_node.edges.length > largestHub) { + largestHub = _node.edges.length; + } + average += _node.edges.length; + averageSquared += Math.pow(_node.edges.length, 2); + hubCounter += 1; + } + average = average / hubCounter; + averageSquared = averageSquared / hubCounter; + + var variance = averageSquared - Math.pow(average, 2); + var standardDeviation = Math.sqrt(variance); + + var hubThreshold = Math.floor(average + 2 * standardDeviation); + + // always have at least one to cluster + if (hubThreshold > largestHub) { + hubThreshold = largestHub; + } + + return hubThreshold; + } + + /** + * Create an edge for the cluster representation. + * + * @param {Node.id} fromId + * @param {Node.id} toId + * @param {vis.Edge} baseEdge + * @param {Object} clusterEdgeProperties + * @param {Object} extraOptions + * @returns {Edge} newly created clustered edge + * @private + */ + + }, { + key: '_createClusteredEdge', + value: function _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) { + // copy the options of the edge we will replace + var clonedOptions = NetworkUtil.cloneOptions(baseEdge, 'edge'); + // make sure the properties of clusterEdges are superimposed on it + util.deepExtend(clonedOptions, clusterEdgeProperties); + + // set up the edge + clonedOptions.from = fromId; + clonedOptions.to = toId; + clonedOptions.id = 'clusterEdge:' + util.randomUUID(); + + // apply the edge specific options to it if specified + if (extraOptions !== undefined) { + util.deepExtend(clonedOptions, extraOptions); + } + + var newEdge = this.body.functions.createEdge(clonedOptions); + newEdge.clusteringEdgeReplacingIds = [baseEdge.id]; + newEdge.connect(); + + // Register the new edge + this.body.edges[newEdge.id] = newEdge; + + return newEdge; + } + + /** + * Add the passed child nodes and edges to the given cluster node. + * + * @param {Object|Node} childNodes hash of nodes or single node to add in cluster + * @param {Object|Edge} childEdges hash of edges or single edge to take into account when clustering + * @param {Node} clusterNode cluster node to add nodes and edges to + * @param {Object} [clusterEdgeProperties] + * @private + */ + + }, { + key: '_clusterEdges', + value: function _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) { + if (childEdges instanceof Edge) { + var edge = childEdges; + var obj = {}; + obj[edge.id] = edge; + childEdges = obj; + } + + if (childNodes instanceof Node) { + var _node2 = childNodes; + var _obj = {}; + _obj[_node2.id] = _node2; + childNodes = _obj; + } + + if (clusterNode === undefined || clusterNode === null) { + throw new Error("_clusterEdges: parameter clusterNode required"); + } + + if (clusterEdgeProperties === undefined) { + // Take the required properties from the cluster node + clusterEdgeProperties = clusterNode.clusterEdgeProperties; + } + + // create the new edges that will connect to the cluster. + // All self-referencing edges will be added to childEdges here. + this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties); + + // disable the childEdges + for (var edgeId in childEdges) { + if (childEdges.hasOwnProperty(edgeId)) { + if (this.body.edges[edgeId] !== undefined) { + var _edge2 = this.body.edges[edgeId]; + // cache the options before changing + this._backupEdgeOptions(_edge2); + // disable physics and hide the edge + _edge2.setOptions({ physics: false }); + } + } + } + + // disable the childNodes + for (var _nodeId7 in childNodes) { + if (childNodes.hasOwnProperty(_nodeId7)) { + this.clusteredNodes[_nodeId7] = { clusterId: clusterNode.id, node: this.body.nodes[_nodeId7] }; + this.body.nodes[_nodeId7].setOptions({ physics: false }); + } + } + } + + /** + * Determine in which cluster given nodeId resides. + * + * If not in cluster, return undefined. + * + * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders). + * + * @param {Node.id} nodeId + * @returns {Node|undefined} Node instance for cluster, if present + * @private + */ + + }, { + key: '_getClusterNodeForNode', + value: function _getClusterNodeForNode(nodeId) { + if (nodeId === undefined) return undefined; + var clusteredNode = this.clusteredNodes[nodeId]; + + // NOTE: If no cluster info found, it should actually be an error + if (clusteredNode === undefined) return undefined; + var clusterId = clusteredNode.clusterId; + if (clusterId === undefined) return undefined; + + return this.body.nodes[clusterId]; + } + + /** + * Internal helper function for conditionally removing items in array + * + * Done like this because Array.filter() is not fully supported by all IE's. + * + * @param {Array} arr + * @param {function} callback + * @returns {Array} + * @private + */ + + }, { + key: '_filter', + value: function _filter(arr, callback) { + var ret = []; + + util.forEach(arr, function (item) { + if (callback(item)) { + ret.push(item); + } + }); + + return ret; + } + + /** + * Scan all edges for changes in clustering and adjust this if necessary. + * + * Call this (internally) after there has been a change in node or edge data. + * + * Pre: States of this.body.nodes and this.body.edges consistent + * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges + * of cluster nodes. + */ + + }, { + key: '_updateState', + value: function _updateState() { + var _this4 = this; + + var nodeId = void 0; + var deletedNodeIds = []; + var deletedEdgeIds = []; + + /** + * Utility function to iterate over clustering nodes only + * + * @param {Function} callback function to call for each cluster node + */ + var eachClusterNode = function eachClusterNode(callback) { + util.forEach(_this4.body.nodes, function (node) { + if (node.isCluster === true) { + callback(node); + } + }); + }; + + // + // Remove deleted regular nodes from clustering + // + + // Determine the deleted nodes + for (nodeId in this.clusteredNodes) { + if (!this.clusteredNodes.hasOwnProperty(nodeId)) continue; + var _node3 = this.body.nodes[nodeId]; + + if (_node3 === undefined) { + deletedNodeIds.push(nodeId); + } + } + + // Remove nodes from cluster nodes + eachClusterNode(function (clusterNode) { + for (var n = 0; n < deletedNodeIds.length; n++) { + delete clusterNode.containedNodes[deletedNodeIds[n]]; + } + }); + + // Remove nodes from cluster list + for (var n = 0; n < deletedNodeIds.length; n++) { + delete this.clusteredNodes[deletedNodeIds[n]]; + } + + // + // Remove deleted edges from clustering + // + + // Add the deleted clustered edges to the list + util.forEach(this.clusteredEdges, function (edgeId) { + var edge = _this4.body.edges[edgeId]; + if (edge === undefined || !edge.endPointsValid()) { + deletedEdgeIds.push(edgeId); + } + }); + + // Cluster nodes can also contain edges which are not clustered, + // i.e. nodes 1-2 within cluster with an edge in between. + // So the cluster nodes also need to be scanned for invalid edges + eachClusterNode(function (clusterNode) { + util.forEach(clusterNode.containedEdges, function (edge, edgeId) { + if (!edge.endPointsValid() && deletedEdgeIds.indexOf(edgeId) === -1) { + deletedEdgeIds.push(edgeId); + } + }); + }); + + // Also scan for cluster edges which need to be removed in the active list. + // Regular edges have been removed beforehand, so this only picks up the cluster edges. + util.forEach(this.body.edges, function (edge, edgeId) { + // Explicitly scan the contained edges for validity + var isValid = true; + var replacedIds = edge.clusteringEdgeReplacingIds; + if (replacedIds !== undefined) { + var numValid = 0; + + util.forEach(replacedIds, function (containedEdgeId) { + var containedEdge = _this4.body.edges[containedEdgeId]; + + if (containedEdge !== undefined && containedEdge.endPointsValid()) { + numValid += 1; + } + }); + + isValid = numValid > 0; + } + + if (!edge.endPointsValid() || !isValid) { + deletedEdgeIds.push(edgeId); + } + }); + + // Remove edges from cluster nodes + eachClusterNode(function (clusterNode) { + util.forEach(deletedEdgeIds, function (deletedEdgeId) { + delete clusterNode.containedEdges[deletedEdgeId]; + + util.forEach(clusterNode.edges, function (edge, m) { + if (edge.id === deletedEdgeId) { + clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop + return; + } + + edge.clusteringEdgeReplacingIds = _this4._filter(edge.clusteringEdgeReplacingIds, function (id) { + return deletedEdgeIds.indexOf(id) === -1; + }); + }); + + // Clean up the nulls + clusterNode.edges = _this4._filter(clusterNode.edges, function (item) { + return item !== null; + }); + }); + }); + + // Remove from cluster list + util.forEach(deletedEdgeIds, function (edgeId) { + delete _this4.clusteredEdges[edgeId]; + }); + + // Remove cluster edges from active list (this.body.edges). + // deletedEdgeIds still contains id of regular edges, but these should all + // be gone when you reach here. + util.forEach(deletedEdgeIds, function (edgeId) { + delete _this4.body.edges[edgeId]; + }); + + // + // Check changed cluster state of edges + // + + // Iterating over keys here, because edges may be removed in the loop + var ids = (0, _keys2['default'])(this.body.edges); + util.forEach(ids, function (edgeId) { + var edge = _this4.body.edges[edgeId]; + + var shouldBeClustered = _this4._isClusteredNode(edge.fromId) || _this4._isClusteredNode(edge.toId); + if (shouldBeClustered === _this4._isClusteredEdge(edge.id)) { + return; // all is well + } + + if (shouldBeClustered) { + // add edge to clustering + var clusterFrom = _this4._getClusterNodeForNode(edge.fromId); + if (clusterFrom !== undefined) { + _this4._clusterEdges(_this4.body.nodes[edge.fromId], edge, clusterFrom); + } + + var clusterTo = _this4._getClusterNodeForNode(edge.toId); + if (clusterTo !== undefined) { + _this4._clusterEdges(_this4.body.nodes[edge.toId], edge, clusterTo); + } + + // TODO: check that it works for both edges clustered + // (This might be paranoia) + } else { + // This should not be happening, the state should + // be properly updated at this point. + // + // If it *is* reached during normal operation, then we have to implement + // undo clustering for this edge here. + throw new Error('remove edge from clustering not implemented!'); + } + }); + + // Clusters may be nested to any level. Keep on opening until nothing to open + var changed = false; + var continueLoop = true; + + var _loop2 = function _loop2() { + var clustersToOpen = []; + + // Determine the id's of clusters that need opening + eachClusterNode(function (clusterNode) { + var numNodes = (0, _keys2['default'])(clusterNode.containedNodes).length; + var allowSingle = clusterNode.options.allowSingleNodeCluster === true; + if (allowSingle && numNodes < 1 || !allowSingle && numNodes < 2) { + clustersToOpen.push(clusterNode.id); + } + }); + + // Open them + for (var _n = 0; _n < clustersToOpen.length; ++_n) { + _this4.openCluster(clustersToOpen[_n], {}, false /* Don't refresh, we're in an refresh/update already */); + } + + continueLoop = clustersToOpen.length > 0; + changed = changed || continueLoop; + }; + + while (continueLoop) { + _loop2(); + } + + if (changed) { + this._updateState(); // Redo this method (recursion possible! should be safe) + } + } + + /** + * Determine if node with given id is part of a cluster. + * + * @param {Node.id} nodeId + * @return {boolean} true if part of a cluster. + */ + + }, { + key: '_isClusteredNode', + value: function _isClusteredNode(nodeId) { + return this.clusteredNodes[nodeId] !== undefined; + } + + /** + * Determine if edge with given id is not visible due to clustering. + * + * An edge is considered clustered if: + * - it is directly replaced by a clustering edge + * - any of its connecting nodes is in a cluster + * + * @param {vis.Edge.id} edgeId + * @return {boolean} true if part of a cluster. + */ + + }, { + key: '_isClusteredEdge', + value: function _isClusteredEdge(edgeId) { + return this.clusteredEdges[edgeId] !== undefined; + } + }]); + return ClusterEngine; +}(); + +exports['default'] = ClusterEngine; + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +var util = __webpack_require__(2); +var Node = __webpack_require__(47)["default"]; + +/** + * A Cluster is a special Node that allows a group of Nodes positioned closely together + * to be represented by a single Cluster Node. + * + * @extends Node + */ + +var Cluster = function (_Node) { + (0, _inherits3["default"])(Cluster, _Node); + + /** + * @param {Object} options + * @param {Object} body + * @param {Array.}imagelist + * @param {Array} grouplist + * @param {Object} globalOptions + * @param {Object} defaultOptions Global default options for nodes + */ + function Cluster(options, body, imagelist, grouplist, globalOptions, defaultOptions) { + (0, _classCallCheck3["default"])(this, Cluster); + + var _this = (0, _possibleConstructorReturn3["default"])(this, (Cluster.__proto__ || (0, _getPrototypeOf2["default"])(Cluster)).call(this, options, body, imagelist, grouplist, globalOptions, defaultOptions)); + + _this.isCluster = true; + _this.containedNodes = {}; + _this.containedEdges = {}; + return _this; + } + + /** + * Transfer child cluster data to current and disconnect the child cluster. + * + * Please consult the header comment in 'Clustering.js' for the fields set here. + * + * @param {string|number} childClusterId id of child cluster to open + */ + + + (0, _createClass3["default"])(Cluster, [{ + key: "_openChildCluster", + value: function _openChildCluster(childClusterId) { + var _this2 = this; + + var childCluster = this.body.nodes[childClusterId]; + if (this.containedNodes[childClusterId] === undefined) { + throw new Error('node with id: ' + childClusterId + ' not in current cluster'); + } + if (!childCluster.isCluster) { + throw new Error('node with id: ' + childClusterId + ' is not a cluster'); + } + + // Disconnect child cluster from current cluster + delete this.containedNodes[childClusterId]; + util.forEach(childCluster.edges, function (edge) { + delete _this2.containedEdges[edge.id]; + }); + + // Transfer nodes and edges + util.forEach(childCluster.containedNodes, function (node, nodeId) { + _this2.containedNodes[nodeId] = node; + }); + childCluster.containedNodes = {}; + + util.forEach(childCluster.containedEdges, function (edge, edgeId) { + _this2.containedEdges[edgeId] = edge; + }); + childCluster.containedEdges = {}; + + // Transfer edges within cluster edges which are clustered + util.forEach(childCluster.edges, function (clusterEdge) { + util.forEach(_this2.edges, function (parentClusterEdge) { + // Assumption: a clustered edge can only be present in a single clustering edge + // Not tested here + var index = parentClusterEdge.clusteringEdgeReplacingIds.indexOf(clusterEdge.id); + if (index === -1) return; + + util.forEach(clusterEdge.clusteringEdgeReplacingIds, function (srcId) { + parentClusterEdge.clusteringEdgeReplacingIds.push(srcId); + + // Maintain correct bookkeeping for transferred edge + _this2.body.edges[srcId].edgeReplacedById = parentClusterEdge.id; + }); + + // Remove cluster edge from parent cluster edge + parentClusterEdge.clusteringEdgeReplacingIds.splice(index, 1); + }); + }); + childCluster.edges = []; + } + }]); + return Cluster; +}(Node); + +exports["default"] = Cluster; + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * Initializes window.requestAnimationFrame() to a usable form. + * + * Specifically, set up this method for the case of running on node.js with jsdom enabled. + * + * NOTES: + * + * * On node.js, when calling this directly outside of this class, `window` is not defined. + * This happens even if jsdom is used. + * * For node.js + jsdom, `window` is available at the moment the constructor is called. + * For this reason, the called is placed within the constructor. + * * Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added. + * * During unit testing, it happens that the window object is reset during execution, causing + * a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for, + * see `_requestNextFrame()`. + * * Since this is a global object, it may affect other modules besides `Network`. With normal + * usage, this does not cause any problems. During unit testing, errors may occur. These have + * been compensated for, see comment block in _requestNextFrame(). + * + * @private + */ +function _initRequestAnimationFrame() { + var func; + + if (window !== undefined) { + func = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; + } + + if (func === undefined) { + // window or method not present, setting mock requestAnimationFrame + window.requestAnimationFrame = function (callback) { + //console.log("Called mock requestAnimationFrame"); + callback(); + }; + } else { + window.requestAnimationFrame = func; + } +} + +var util = __webpack_require__(2); + +/** + * The canvas renderer + */ + +var CanvasRenderer = function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function CanvasRenderer(body, canvas) { + (0, _classCallCheck3["default"])(this, CanvasRenderer); + + _initRequestAnimationFrame(); + this.body = body; + this.canvas = canvas; + + this.redrawRequested = false; + this.renderTimer = undefined; + this.requiresTimeout = true; + this.renderingActive = false; + this.renderRequests = 0; + this.allowRedraw = true; + + this.dragging = false; + this.options = {}; + this.defaultOptions = { + hideEdgesOnDrag: false, + hideNodesOnDrag: false + }; + util.extend(this.options, this.defaultOptions); + + this._determineBrowserMethod(); + this.bindEventListeners(); + } + + /** + * Binds event listeners + */ + + + (0, _createClass3["default"])(CanvasRenderer, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on("dragStart", function () { + _this.dragging = true; + }); + this.body.emitter.on("dragEnd", function () { + _this.dragging = false; + }); + this.body.emitter.on("_resizeNodes", function () { + _this._resizeNodes(); + }); + this.body.emitter.on("_redraw", function () { + if (_this.renderingActive === false) { + _this._redraw(); + } + }); + this.body.emitter.on("_blockRedraw", function () { + _this.allowRedraw = false; + }); + this.body.emitter.on("_allowRedraw", function () { + _this.allowRedraw = true;_this.redrawRequested = false; + }); + this.body.emitter.on("_requestRedraw", this._requestRedraw.bind(this)); + this.body.emitter.on("_startRendering", function () { + _this.renderRequests += 1; + _this.renderingActive = true; + _this._startRendering(); + }); + this.body.emitter.on("_stopRendering", function () { + _this.renderRequests -= 1; + _this.renderingActive = _this.renderRequests > 0; + _this.renderTimer = undefined; + }); + this.body.emitter.on('destroy', function () { + _this.renderRequests = 0; + _this.allowRedraw = false; + _this.renderingActive = false; + if (_this.requiresTimeout === true) { + clearTimeout(_this.renderTimer); + } else { + window.cancelAnimationFrame(_this.renderTimer); + } + _this.body.emitter.off(); + }); + } + + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + var fields = ['hideEdgesOnDrag', 'hideNodesOnDrag']; + util.selectiveDeepExtend(fields, this.options, options); + } + } + + /** + * Prepare the drawing of the next frame. + * + * Calls the callback when the next frame can or will be drawn. + * + * @param {function} callback + * @param {number} delay - timeout case only, wait this number of milliseconds + * @returns {function|undefined} + * @private + */ + + }, { + key: "_requestNextFrame", + value: function _requestNextFrame(callback, delay) { + // During unit testing, it happens that the mock window object is reset while + // the next frame is still pending. Then, either 'window' is not present, or + // 'requestAnimationFrame()' is not present because it is not defined on the + // mock window object. + // + // As a consequence, unrelated unit tests may appear to fail, even if the problem + // described happens in the current unit test. + // + // This is not something that will happen in normal operation, but we still need + // to take it into account. + // + if (typeof window === 'undefined') return; // Doing `if (window === undefined)` does not work here! + + var timer = void 0; + + var myWindow = window; // Grab a reference to reduce the possibility that 'window' is reset + // while running this method. + + if (this.requiresTimeout === true) { + // wait given number of milliseconds and perform the animation step function + timer = myWindow.setTimeout(callback, delay); + } else { + if (myWindow.requestAnimationFrame) { + timer = myWindow.requestAnimationFrame(callback); + } + } + + return timer; + } + + /** + * + * @private + */ + + }, { + key: "_startRendering", + value: function _startRendering() { + if (this.renderingActive === true) { + if (this.renderTimer === undefined) { + this.renderTimer = this._requestNextFrame(this._renderStep.bind(this), this.simulationInterval); + } + } + } + + /** + * + * @private + */ + + }, { + key: "_renderStep", + value: function _renderStep() { + if (this.renderingActive === true) { + // reset the renderTimer so a new scheduled animation step can be set + this.renderTimer = undefined; + + if (this.requiresTimeout === true) { + // this schedules a new simulation step + this._startRendering(); + } + + this._redraw(); + + if (this.requiresTimeout === false) { + // this schedules a new simulation step + this._startRendering(); + } + } + } + + /** + * Redraw the network with the current data + * chart will be resized too. + */ + + }, { + key: "redraw", + value: function redraw() { + this.body.emitter.emit('setSize'); + this._redraw(); + } + + /** + * Redraw the network with the current data + * @private + */ + + }, { + key: "_requestRedraw", + value: function _requestRedraw() { + var _this2 = this; + + if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) { + this.redrawRequested = true; + this._requestNextFrame(function () { + _this2._redraw(false); + }, 0); + } + } + + /** + * Redraw the network with the current data + * @param {boolean} [hidden=false] | Used to get the first estimate of the node sizes. + * Only the nodes are drawn after which they are quickly drawn over. + * @private + */ + + }, { + key: "_redraw", + value: function _redraw() { + var hidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.allowRedraw === true) { + this.body.emitter.emit("initRedraw"); + + this.redrawRequested = false; + + // when the container div was hidden, this fixes it back up! + if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) { + this.canvas.setSize(); + } + + this.canvas.setTransform(); + + var ctx = this.canvas.getContext(); + + // clear the canvas + var w = this.canvas.frame.canvas.clientWidth; + var h = this.canvas.frame.canvas.clientHeight; + ctx.clearRect(0, 0, w, h); + + // if the div is hidden, we stop the redraw here for performance. + if (this.canvas.frame.clientWidth === 0) { + return; + } + + // set scaling and translation + ctx.save(); + ctx.translate(this.body.view.translation.x, this.body.view.translation.y); + ctx.scale(this.body.view.scale, this.body.view.scale); + + ctx.beginPath(); + this.body.emitter.emit("beforeDrawing", ctx); + ctx.closePath(); + + if (hidden === false) { + if (this.dragging === false || this.dragging === true && this.options.hideEdgesOnDrag === false) { + this._drawEdges(ctx); + } + } + + if (this.dragging === false || this.dragging === true && this.options.hideNodesOnDrag === false) { + this._drawNodes(ctx, hidden); + } + + ctx.beginPath(); + this.body.emitter.emit("afterDrawing", ctx); + ctx.closePath(); + + // restore original scaling and translation + ctx.restore(); + if (hidden === true) { + ctx.clearRect(0, 0, w, h); + } + } + } + + /** + * Redraw all nodes + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [alwaysShow] + * @private + */ + + }, { + key: "_resizeNodes", + value: function _resizeNodes() { + this.canvas.setTransform(); + var ctx = this.canvas.getContext(); + ctx.save(); + ctx.translate(this.body.view.translation.x, this.body.view.translation.y); + ctx.scale(this.body.view.scale, this.body.view.scale); + + var nodes = this.body.nodes; + var node = void 0; + + // resize all nodes + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + node = nodes[nodeId]; + node.resize(ctx); + node.updateBoundingBox(ctx, node.selected); + } + } + + // restore original scaling and translation + ctx.restore(); + } + + /** + * Redraw all nodes + * + * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas + * @param {boolean} [alwaysShow] + * @private + */ + + }, { + key: "_drawNodes", + value: function _drawNodes(ctx) { + var alwaysShow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var nodes = this.body.nodes; + var nodeIndices = this.body.nodeIndices; + var node = void 0; + var selected = []; + var margin = 20; + var topLeft = this.canvas.DOMtoCanvas({ x: -margin, y: -margin }); + var bottomRight = this.canvas.DOMtoCanvas({ + x: this.canvas.frame.canvas.clientWidth + margin, + y: this.canvas.frame.canvas.clientHeight + margin + }); + var viewableArea = { top: topLeft.y, left: topLeft.x, bottom: bottomRight.y, right: bottomRight.x }; + + // draw unselected nodes; + for (var i = 0; i < nodeIndices.length; i++) { + node = nodes[nodeIndices[i]]; + // set selected nodes aside + if (node.isSelected()) { + selected.push(nodeIndices[i]); + } else { + if (alwaysShow === true) { + node.draw(ctx); + } else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) { + node.draw(ctx); + } else { + node.updateBoundingBox(ctx, node.selected); + } + } + } + + // draw the selected nodes on top + for (var _i = 0; _i < selected.length; _i++) { + node = nodes[selected[_i]]; + node.draw(ctx); + } + } + + /** + * Redraw all edges + * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas + * @private + */ + + }, { + key: "_drawEdges", + value: function _drawEdges(ctx) { + var edges = this.body.edges; + var edgeIndices = this.body.edgeIndices; + var edge = void 0; + + for (var i = 0; i < edgeIndices.length; i++) { + edge = edges[edgeIndices[i]]; + if (edge.connected === true) { + edge.draw(ctx); + } + } + } + + /** + * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because + * some implementations (safari and IE9) did not support requestAnimationFrame + * @private + */ + + }, { + key: "_determineBrowserMethod", + value: function _determineBrowserMethod() { + if (typeof window !== 'undefined') { + var browserType = navigator.userAgent.toLowerCase(); + this.requiresTimeout = false; + if (browserType.indexOf('msie 9.0') != -1) { + // IE 9 + this.requiresTimeout = true; + } else if (browserType.indexOf('safari') != -1) { + // safari + if (browserType.indexOf('chrome') <= -1) { + this.requiresTimeout = true; + } + } + } else { + this.requiresTimeout = true; + } + } + }]); + return CanvasRenderer; +}(); + +exports["default"] = CanvasRenderer; + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Hammer = __webpack_require__(10); +var hammerUtil = __webpack_require__(37); + +var util = __webpack_require__(2); + +/** + * Create the main frame for the Network. + * This function is executed once when a Network object is created. The frame + * contains a canvas, and this canvas contains all objects like the axis and + * nodes. + */ + +var Canvas = function () { + /** + * @param {Object} body + */ + function Canvas(body) { + (0, _classCallCheck3['default'])(this, Canvas); + + this.body = body; + this.pixelRatio = 1; + this.resizeTimer = undefined; + this.resizeFunction = this._onResize.bind(this); + this.cameraState = {}; + this.initialized = false; + this.canvasViewCenter = {}; + + this.options = {}; + this.defaultOptions = { + autoResize: true, + height: '100%', + width: '100%' + }; + util.extend(this.options, this.defaultOptions); + + this.bindEventListeners(); + } + + /** + * Binds event listeners + */ + + + (0, _createClass3['default'])(Canvas, [{ + key: 'bindEventListeners', + value: function bindEventListeners() { + var _this = this; + + // bind the events + this.body.emitter.once("resize", function (obj) { + if (obj.width !== 0) { + _this.body.view.translation.x = obj.width * 0.5; + } + if (obj.height !== 0) { + _this.body.view.translation.y = obj.height * 0.5; + } + }); + this.body.emitter.on("setSize", this.setSize.bind(this)); + this.body.emitter.on("destroy", function () { + _this.hammerFrame.destroy(); + _this.hammer.destroy(); + _this._cleanUp(); + }); + } + + /** + * @param {Object} options + */ + + }, { + key: 'setOptions', + value: function setOptions(options) { + var _this2 = this; + + if (options !== undefined) { + var fields = ['width', 'height', 'autoResize']; + util.selectiveDeepExtend(fields, this.options, options); + } + + if (this.options.autoResize === true) { + // automatically adapt to a changing size of the browser. + this._cleanUp(); + this.resizeTimer = setInterval(function () { + var changed = _this2.setSize(); + if (changed === true) { + _this2.body.emitter.emit("_requestRedraw"); + } + }, 1000); + this.resizeFunction = this._onResize.bind(this); + util.addEventListener(window, 'resize', this.resizeFunction); + } + } + + /** + * @private + */ + + }, { + key: '_cleanUp', + value: function _cleanUp() { + // automatically adapt to a changing size of the browser. + if (this.resizeTimer !== undefined) { + clearInterval(this.resizeTimer); + } + util.removeEventListener(window, 'resize', this.resizeFunction); + this.resizeFunction = undefined; + } + + /** + * @private + */ + + }, { + key: '_onResize', + value: function _onResize() { + this.setSize(); + this.body.emitter.emit("_redraw"); + } + + /** + * Get and store the cameraState + * + * @param {number} [pixelRatio=this.pixelRatio] + * @private + */ + + }, { + key: '_getCameraState', + value: function _getCameraState() { + var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pixelRatio; + + if (this.initialized === true) { + this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; + this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; + this.cameraState.scale = this.body.view.scale; + this.cameraState.position = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.width / pixelRatio, + y: 0.5 * this.frame.canvas.height / pixelRatio + }); + } + } + + /** + * Set the cameraState + * @private + */ + + }, { + key: '_setCameraState', + value: function _setCameraState() { + if (this.cameraState.scale !== undefined && this.frame.canvas.clientWidth !== 0 && this.frame.canvas.clientHeight !== 0 && this.pixelRatio !== 0 && this.cameraState.previousWidth > 0) { + + var widthRatio = this.frame.canvas.width / this.pixelRatio / this.cameraState.previousWidth; + var heightRatio = this.frame.canvas.height / this.pixelRatio / this.cameraState.previousHeight; + var newScale = this.cameraState.scale; + + if (widthRatio != 1 && heightRatio != 1) { + newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio); + } else if (widthRatio != 1) { + newScale = this.cameraState.scale * widthRatio; + } else if (heightRatio != 1) { + newScale = this.cameraState.scale * heightRatio; + } + + this.body.view.scale = newScale; + // this comes from the view module. + var currentViewCenter = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.clientWidth, + y: 0.5 * this.frame.canvas.clientHeight + }); + + var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node + x: currentViewCenter.x - this.cameraState.position.x, + y: currentViewCenter.y - this.cameraState.position.y + }; + this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale; + this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale; + } + } + + /** + * + * @param {number|string} value + * @returns {string} + * @private + */ + + }, { + key: '_prepareValue', + value: function _prepareValue(value) { + if (typeof value === 'number') { + return value + 'px'; + } else if (typeof value === 'string') { + if (value.indexOf('%') !== -1 || value.indexOf('px') !== -1) { + return value; + } else if (value.indexOf('%') === -1) { + return value + 'px'; + } + } + throw new Error('Could not use the value supplied for width or height:' + value); + } + + /** + * Create the HTML + */ + + }, { + key: '_create', + value: function _create() { + // remove all elements from the container element. + while (this.body.container.hasChildNodes()) { + this.body.container.removeChild(this.body.container.firstChild); + } + + this.frame = document.createElement('div'); + this.frame.className = 'vis-network'; + this.frame.style.position = 'relative'; + this.frame.style.overflow = 'hidden'; + this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window + + ////////////////////////////////////////////////////////////////// + + this.frame.canvas = document.createElement("canvas"); + this.frame.canvas.style.position = 'relative'; + this.frame.appendChild(this.frame.canvas); + + if (!this.frame.canvas.getContext) { + var noCanvas = document.createElement('DIV'); + noCanvas.style.color = 'red'; + noCanvas.style.fontWeight = 'bold'; + noCanvas.style.padding = '10px'; + noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; + this.frame.canvas.appendChild(noCanvas); + } else { + this._setPixelRatio(); + this.setTransform(); + } + + // add the frame to the container element + this.body.container.appendChild(this.frame); + + this.body.view.scale = 1; + this.body.view.translation = { x: 0.5 * this.frame.canvas.clientWidth, y: 0.5 * this.frame.canvas.clientHeight }; + + this._bindHammer(); + } + + /** + * This function binds hammer, it can be repeated over and over due to the uniqueness check. + * @private + */ + + }, { + key: '_bindHammer', + value: function _bindHammer() { + var _this3 = this; + + if (this.hammer !== undefined) { + this.hammer.destroy(); + } + this.drag = {}; + this.pinch = {}; + + // init hammer + this.hammer = new Hammer(this.frame.canvas); + this.hammer.get('pinch').set({ enable: true }); + // enable to get better response, todo: test on mobile. + this.hammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_ALL }); + + hammerUtil.onTouch(this.hammer, function (event) { + _this3.body.eventListeners.onTouch(event); + }); + this.hammer.on('tap', function (event) { + _this3.body.eventListeners.onTap(event); + }); + this.hammer.on('doubletap', function (event) { + _this3.body.eventListeners.onDoubleTap(event); + }); + this.hammer.on('press', function (event) { + _this3.body.eventListeners.onHold(event); + }); + this.hammer.on('panstart', function (event) { + _this3.body.eventListeners.onDragStart(event); + }); + this.hammer.on('panmove', function (event) { + _this3.body.eventListeners.onDrag(event); + }); + this.hammer.on('panend', function (event) { + _this3.body.eventListeners.onDragEnd(event); + }); + this.hammer.on('pinch', function (event) { + _this3.body.eventListeners.onPinch(event); + }); + + // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work? + this.frame.canvas.addEventListener('mousewheel', function (event) { + _this3.body.eventListeners.onMouseWheel(event); + }); + this.frame.canvas.addEventListener('DOMMouseScroll', function (event) { + _this3.body.eventListeners.onMouseWheel(event); + }); + + this.frame.canvas.addEventListener('mousemove', function (event) { + _this3.body.eventListeners.onMouseMove(event); + }); + this.frame.canvas.addEventListener('contextmenu', function (event) { + _this3.body.eventListeners.onContext(event); + }); + + this.hammerFrame = new Hammer(this.frame); + hammerUtil.onRelease(this.hammerFrame, function (event) { + _this3.body.eventListeners.onRelease(event); + }); + } + + /** + * Set a new size for the network + * @param {string} width Width in pixels or percentage (for example '800px' + * or '50%') + * @param {string} height Height in pixels or percentage (for example '400px' + * or '30%') + * @returns {boolean} + */ + + }, { + key: 'setSize', + value: function setSize() { + var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.width; + var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.height; + + width = this._prepareValue(width); + height = this._prepareValue(height); + + var emitEvent = false; + var oldWidth = this.frame.canvas.width; + var oldHeight = this.frame.canvas.height; + + // update the pixel ratio + // + // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code + // where it is assumed that the pixel ratio could change at runtime. + // The only way I can think of this happening is a rotating screen or tablet; but then + // there should be a mechanism for reloading the data (TODO: check if this is present). + // + // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage + // of pixel ratio must be overhauled for this. + // + // For the time being, I will humor the assumption here, and in the rest of the code assume it is + // constant. + var previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value + this._setPixelRatio(); + + if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) { + this._getCameraState(previousRatio); + + this.frame.style.width = width; + this.frame.style.height = height; + + this.frame.canvas.style.width = '100%'; + this.frame.canvas.style.height = '100%'; + + this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio); + this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio); + + this.options.width = width; + this.options.height = height; + + this.canvasViewCenter = { + x: 0.5 * this.frame.clientWidth, + y: 0.5 * this.frame.clientHeight + }; + + emitEvent = true; + } else { + // this would adapt the width of the canvas to the width from 100% if and only if + // there is a change. + + var newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio); + var newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio); + + // store the camera if there is a change in size. + if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) { + this._getCameraState(previousRatio); + } + + if (this.frame.canvas.width !== newWidth) { + this.frame.canvas.width = newWidth; + emitEvent = true; + } + if (this.frame.canvas.height !== newHeight) { + this.frame.canvas.height = newHeight; + emitEvent = true; + } + } + + if (emitEvent === true) { + this.body.emitter.emit('resize', { + width: Math.round(this.frame.canvas.width / this.pixelRatio), + height: Math.round(this.frame.canvas.height / this.pixelRatio), + oldWidth: Math.round(oldWidth / this.pixelRatio), + oldHeight: Math.round(oldHeight / this.pixelRatio) + }); + + // restore the camera on change. + this._setCameraState(); + } + + // set initialized so the get and set camera will work from now on. + this.initialized = true; + return emitEvent; + } + + /** + * + * @returns {CanvasRenderingContext2D} + */ + + }, { + key: 'getContext', + value: function getContext() { + return this.frame.canvas.getContext("2d"); + } + + /** + * Determine the pixel ratio for various browsers. + * + * @returns {number} + * @private + */ + + }, { + key: '_determinePixelRatio', + value: function _determinePixelRatio() { + var ctx = this.getContext(); + if (ctx === undefined) { + throw new Error("Could not get canvax context"); + } + + var numerator = 1; + if (typeof window !== 'undefined') { + // (window !== undefined) doesn't work here! + // Protection during unit tests, where 'window' can be missing + numerator = window.devicePixelRatio || 1; + } + + var denominator = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; + + return numerator / denominator; + } + + /** + * Lazy determination of pixel ratio. + * + * @private + */ + + }, { + key: '_setPixelRatio', + value: function _setPixelRatio() { + this.pixelRatio = this._determinePixelRatio(); + } + + /** + * Set the transform in the contained context, based on its pixelRatio + */ + + }, { + key: 'setTransform', + value: function setTransform() { + var ctx = this.getContext(); + if (ctx === undefined) { + throw new Error("Could not get canvax context"); + } + + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + } + + /** + * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to + * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) + * @param {number} x + * @returns {number} + * @private + */ + + }, { + key: '_XconvertDOMtoCanvas', + value: function _XconvertDOMtoCanvas(x) { + return (x - this.body.view.translation.x) / this.body.view.scale; + } + + /** + * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to + * the X coordinate in DOM-space (coordinate point in browser relative to the container div) + * @param {number} x + * @returns {number} + * @private + */ + + }, { + key: '_XconvertCanvasToDOM', + value: function _XconvertCanvasToDOM(x) { + return x * this.body.view.scale + this.body.view.translation.x; + } + + /** + * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to + * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) + * @param {number} y + * @returns {number} + * @private + */ + + }, { + key: '_YconvertDOMtoCanvas', + value: function _YconvertDOMtoCanvas(y) { + return (y - this.body.view.translation.y) / this.body.view.scale; + } + + /** + * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to + * the Y coordinate in DOM-space (coordinate point in browser relative to the container div) + * @param {number} y + * @returns {number} + * @private + */ + + }, { + key: '_YconvertCanvasToDOM', + value: function _YconvertCanvasToDOM(y) { + return y * this.body.view.scale + this.body.view.translation.y; + } + + /** + * @param {point} pos + * @returns {point} + */ + + }, { + key: 'canvasToDOM', + value: function canvasToDOM(pos) { + return { x: this._XconvertCanvasToDOM(pos.x), y: this._YconvertCanvasToDOM(pos.y) }; + } + + /** + * + * @param {point} pos + * @returns {point} + */ + + }, { + key: 'DOMtoCanvas', + value: function DOMtoCanvas(pos) { + return { x: this._XconvertDOMtoCanvas(pos.x), y: this._YconvertDOMtoCanvas(pos.y) }; + } + }]); + return Canvas; +}(); + +exports['default'] = Canvas; + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); + +var NetworkUtil = __webpack_require__(76)['default']; + +/** + * The view + */ + +var View = function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function View(body, canvas) { + var _this = this; + + (0, _classCallCheck3['default'])(this, View); + + this.body = body; + this.canvas = canvas; + + this.animationSpeed = 1 / this.renderRefreshRate; + this.animationEasingFunction = "easeInOutQuint"; + this.easingTime = 0; + this.sourceScale = 0; + this.targetScale = 0; + this.sourceTranslation = 0; + this.targetTranslation = 0; + this.lockedOnNodeId = undefined; + this.lockedOnNodeOffset = undefined; + this.touchTime = 0; + + this.viewFunction = undefined; + + this.body.emitter.on("fit", this.fit.bind(this)); + this.body.emitter.on("animationFinished", function () { + _this.body.emitter.emit("_stopRendering"); + }); + this.body.emitter.on("unlockNode", this.releaseNode.bind(this)); + } + + /** + * + * @param {Object} [options={}] + */ + + + (0, _createClass3['default'])(View, [{ + key: 'setOptions', + value: function setOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.options = options; + } + + /** + * This function zooms out to fit all data on screen based on amount of nodes + * @param {Object} [options={{nodes=Array}}] + * @param {boolean} [initialZoom=false] | zoom based on fitted formula or range, true = fitted, default = false; + */ + + }, { + key: 'fit', + value: function fit() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { nodes: [] }; + var initialZoom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var range = void 0; + var zoomLevel = void 0; + if (options.nodes === undefined || options.nodes.length === 0) { + options.nodes = this.body.nodeIndices; + } + + if (initialZoom === true) { + // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation. + var positionDefined = 0; + for (var nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + var node = this.body.nodes[nodeId]; + if (node.predefinedPosition === true) { + positionDefined += 1; + } + } + } + if (positionDefined > 0.5 * this.body.nodeIndices.length) { + this.fit(options, false); + return; + } + + range = NetworkUtil.getRange(this.body.nodes, options.nodes); + + var numberOfNodes = this.body.nodeIndices.length; + zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. + + // correct for larger canvasses. + var factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600); + zoomLevel *= factor; + } else { + this.body.emitter.emit("_resizeNodes"); + range = NetworkUtil.getRange(this.body.nodes, options.nodes); + + var xDistance = Math.abs(range.maxX - range.minX) * 1.1; + var yDistance = Math.abs(range.maxY - range.minY) * 1.1; + + var xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance; + var yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance; + + zoomLevel = xZoomLevel <= yZoomLevel ? xZoomLevel : yZoomLevel; + } + + if (zoomLevel > 1.0) { + zoomLevel = 1.0; + } else if (zoomLevel === 0) { + zoomLevel = 1.0; + } + + var center = NetworkUtil.findCenter(range); + var animationOptions = { position: center, scale: zoomLevel, animation: options.animation }; + this.moveTo(animationOptions); + } + + // animation + + /** + * Center a node in view. + * + * @param {number} nodeId + * @param {number} [options] + */ + + }, { + key: 'focus', + value: function focus(nodeId) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (this.body.nodes[nodeId] !== undefined) { + var nodePosition = { x: this.body.nodes[nodeId].x, y: this.body.nodes[nodeId].y }; + options.position = nodePosition; + options.lockedOnNode = nodeId; + + this.moveTo(options); + } else { + console.log("Node: " + nodeId + " cannot be found."); + } + } + + /** + * + * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels + * | options.scale = number // scale to move to + * | options.position = {x:number, y:number} // position to move to + * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to + */ + + }, { + key: 'moveTo', + value: function moveTo(options) { + if (options === undefined) { + options = {}; + return; + } + if (options.offset === undefined) { + options.offset = { x: 0, y: 0 }; + } + if (options.offset.x === undefined) { + options.offset.x = 0; + } + if (options.offset.y === undefined) { + options.offset.y = 0; + } + if (options.scale === undefined) { + options.scale = this.body.view.scale; + } + if (options.position === undefined) { + options.position = this.getViewPosition(); + } + if (options.animation === undefined) { + options.animation = { duration: 0 }; + } + if (options.animation === false) { + options.animation = { duration: 0 }; + } + if (options.animation === true) { + options.animation = {}; + } + if (options.animation.duration === undefined) { + options.animation.duration = 1000; + } // default duration + if (options.animation.easingFunction === undefined) { + options.animation.easingFunction = "easeInOutQuad"; + } // default easing function + + this.animateView(options); + } + + /** + * + * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels + * | options.time = number // animation time in milliseconds + * | options.scale = number // scale to animate to + * | options.position = {x:number, y:number} // position to animate to + * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad, + * // easeInCubic, easeOutCubic, easeInOutCubic, + * // easeInQuart, easeOutQuart, easeInOutQuart, + * // easeInQuint, easeOutQuint, easeInOutQuint + */ + + }, { + key: 'animateView', + value: function animateView(options) { + if (options === undefined) { + return; + } + this.animationEasingFunction = options.animation.easingFunction; + // release if something focussed on the node + this.releaseNode(); + if (options.locked === true) { + this.lockedOnNodeId = options.lockedOnNode; + this.lockedOnNodeOffset = options.offset; + } + + // forcefully complete the old animation if it was still running + if (this.easingTime != 0) { + this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation. + } + + this.sourceScale = this.body.view.scale; + this.sourceTranslation = this.body.view.translation; + this.targetScale = options.scale; + + // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw + // but at least then we'll have the target transition + this.body.view.scale = this.targetScale; + var viewCenter = this.canvas.DOMtoCanvas({ x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight }); + + var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node + x: viewCenter.x - options.position.x, + y: viewCenter.y - options.position.y + }; + this.targetTranslation = { + x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x, + y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y + }; + + // if the time is set to 0, don't do an animation + if (options.animation.duration === 0) { + if (this.lockedOnNodeId != undefined) { + this.viewFunction = this._lockedRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + } else { + this.body.view.scale = this.targetScale; + this.body.view.translation = this.targetTranslation; + this.body.emitter.emit("_requestRedraw"); + } + } else { + this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's + this.animationEasingFunction = options.animation.easingFunction; + + this.viewFunction = this._transitionRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + this.body.emitter.emit("_startRendering"); + } + } + + /** + * used to animate smoothly by hijacking the redraw function. + * @private + */ + + }, { + key: '_lockedRedraw', + value: function _lockedRedraw() { + var nodePosition = { x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y }; + var viewCenter = this.canvas.DOMtoCanvas({ x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight }); + var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node + x: viewCenter.x - nodePosition.x, + y: viewCenter.y - nodePosition.y + }; + var sourceTranslation = this.body.view.translation; + var targetTranslation = { + x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x, + y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y + }; + + this.body.view.translation = targetTranslation; + } + + /** + * Resets state of a locked on Node + */ + + }, { + key: 'releaseNode', + value: function releaseNode() { + if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) { + this.body.emitter.off("initRedraw", this.viewFunction); + this.lockedOnNodeId = undefined; + this.lockedOnNodeOffset = undefined; + } + } + + /** + * @param {boolean} [finished=false] + * @private + */ + + }, { + key: '_transitionRedraw', + value: function _transitionRedraw() { + var finished = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + this.easingTime += this.animationSpeed; + this.easingTime = finished === true ? 1.0 : this.easingTime; + + var progress = util.easingFunctions[this.animationEasingFunction](this.easingTime); + + this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress; + this.body.view.translation = { + x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress, + y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress + }; + + // cleanup + if (this.easingTime >= 1.0) { + this.body.emitter.off("initRedraw", this.viewFunction); + this.easingTime = 0; + if (this.lockedOnNodeId != undefined) { + this.viewFunction = this._lockedRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + } + this.body.emitter.emit("animationFinished"); + } + } + + /** + * + * @returns {number} + */ + + }, { + key: 'getScale', + value: function getScale() { + return this.body.view.scale; + } + + /** + * + * @returns {{x: number, y: number}} + */ + + }, { + key: 'getViewPosition', + value: function getViewPosition() { + return this.canvas.DOMtoCanvas({ x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight }); + } + }]); + return View; +}(); + +exports['default'] = View; + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var NavigationHandler = __webpack_require__(233)['default']; +var Popup = __webpack_require__(104)['default']; + +/** + * Handler for interactions + */ + +var InteractionHandler = function () { + /** + * @param {Object} body + * @param {Canvas} canvas + * @param {SelectionHandler} selectionHandler + */ + function InteractionHandler(body, canvas, selectionHandler) { + (0, _classCallCheck3['default'])(this, InteractionHandler); + + this.body = body; + this.canvas = canvas; + this.selectionHandler = selectionHandler; + this.navigationHandler = new NavigationHandler(body, canvas); + + // bind the events from hammer to functions in this object + this.body.eventListeners.onTap = this.onTap.bind(this); + this.body.eventListeners.onTouch = this.onTouch.bind(this); + this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this); + this.body.eventListeners.onHold = this.onHold.bind(this); + this.body.eventListeners.onDragStart = this.onDragStart.bind(this); + this.body.eventListeners.onDrag = this.onDrag.bind(this); + this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this); + this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this); + this.body.eventListeners.onPinch = this.onPinch.bind(this); + this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this); + this.body.eventListeners.onRelease = this.onRelease.bind(this); + this.body.eventListeners.onContext = this.onContext.bind(this); + + this.touchTime = 0; + this.drag = {}; + this.pinch = {}; + this.popup = undefined; + this.popupObj = undefined; + this.popupTimer = undefined; + + this.body.functions.getPointer = this.getPointer.bind(this); + + this.options = {}; + this.defaultOptions = { + dragNodes: true, + dragView: true, + hover: false, + keyboard: { + enabled: false, + speed: { x: 10, y: 10, zoom: 0.02 }, + bindToWindow: true + }, + navigationButtons: false, + tooltipDelay: 300, + zoomView: true + }; + util.extend(this.options, this.defaultOptions); + + this.bindEventListeners(); + } + + /** + * Binds event listeners + */ + + + (0, _createClass3['default'])(InteractionHandler, [{ + key: 'bindEventListeners', + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on('destroy', function () { + clearTimeout(_this.popupTimer); + delete _this.body.functions.getPointer; + }); + } + + /** + * + * @param {Object} options + */ + + }, { + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + // extend all but the values in fields + var fields = ['hideEdgesOnDrag', 'hideNodesOnDrag', 'keyboard', 'multiselect', 'selectable', 'selectConnectedEdges']; + util.selectiveNotDeepExtend(fields, this.options, options); + + // merge the keyboard options in. + util.mergeOptions(this.options, options, 'keyboard'); + + if (options.tooltip) { + util.extend(this.options.tooltip, options.tooltip); + if (options.tooltip.color) { + this.options.tooltip.color = util.parseColor(options.tooltip.color); + } + } + } + + this.navigationHandler.setOptions(this.options); + } + + /** + * Get the pointer location from a touch location + * @param {{x: number, y: number}} touch + * @return {{x: number, y: number}} pointer + * @private + */ + + }, { + key: 'getPointer', + value: function getPointer(touch) { + return { + x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas), + y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas) + }; + } + + /** + * On start of a touch gesture, store the pointer + * @param {Event} event The event + * @private + */ + + }, { + key: 'onTouch', + value: function onTouch(event) { + if (new Date().valueOf() - this.touchTime > 50) { + this.drag.pointer = this.getPointer(event.center); + this.drag.pinched = false; + this.pinch.scale = this.body.view.scale; + // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame) + this.touchTime = new Date().valueOf(); + } + } + + /** + * handle tap/click event: select/unselect a node + * @param {Event} event + * @private + */ + + }, { + key: 'onTap', + value: function onTap(event) { + var pointer = this.getPointer(event.center); + var multiselect = this.selectionHandler.options.multiselect && (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey); + + this.checkSelectionChanges(pointer, event, multiselect); + this.selectionHandler._generateClickEvent('click', event, pointer); + } + + /** + * handle doubletap event + * @param {Event} event + * @private + */ + + }, { + key: 'onDoubleTap', + value: function onDoubleTap(event) { + var pointer = this.getPointer(event.center); + this.selectionHandler._generateClickEvent('doubleClick', event, pointer); + } + + /** + * handle long tap event: multi select nodes + * @param {Event} event + * @private + */ + + }, { + key: 'onHold', + value: function onHold(event) { + var pointer = this.getPointer(event.center); + var multiselect = this.selectionHandler.options.multiselect; + + this.checkSelectionChanges(pointer, event, multiselect); + + this.selectionHandler._generateClickEvent('click', event, pointer); + this.selectionHandler._generateClickEvent('hold', event, pointer); + } + + /** + * handle the release of the screen + * + * @param {Event} event + * @private + */ + + }, { + key: 'onRelease', + value: function onRelease(event) { + if (new Date().valueOf() - this.touchTime > 10) { + var pointer = this.getPointer(event.center); + this.selectionHandler._generateClickEvent('release', event, pointer); + // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame) + this.touchTime = new Date().valueOf(); + } + } + + /** + * + * @param {Event} event + */ + + }, { + key: 'onContext', + value: function onContext(event) { + var pointer = this.getPointer({ x: event.clientX, y: event.clientY }); + this.selectionHandler._generateClickEvent('oncontext', event, pointer); + } + + /** + * Select and deselect nodes depending current selection change. + * + * For changing nodes, select/deselect events are fired. + * + * NOTE: For a given edge, if one connecting node is deselected and with the same + * click the other node is selected, no events for the edge will fire. + * It was selected and it will remain selected. + * + * TODO: This is all SelectionHandler calls; the method should be moved to there. + * + * @param {{x: number, y: number}} pointer + * @param {Event} event + * @param {boolean} [add=false] + */ + + }, { + key: 'checkSelectionChanges', + value: function checkSelectionChanges(pointer, event) { + var add = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var previousSelection = this.selectionHandler.getSelection(); + var selected = false; + if (add === true) { + selected = this.selectionHandler.selectAdditionalOnPoint(pointer); + } else { + selected = this.selectionHandler.selectOnPoint(pointer); + } + var currentSelection = this.selectionHandler.getSelection(); + + // See NOTE in method comment for the reason to do it like this + var deselectedItems = this._determineDifference(previousSelection, currentSelection); + var selectedItems = this._determineDifference(currentSelection, previousSelection); + + if (deselectedItems.edges.length > 0) { + this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection); + selected = true; + } + + if (deselectedItems.nodes.length > 0) { + this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); + selected = true; + } + + if (selectedItems.nodes.length > 0) { + this.selectionHandler._generateClickEvent('selectNode', event, pointer); + selected = true; + } + + if (selectedItems.edges.length > 0) { + this.selectionHandler._generateClickEvent('selectEdge', event, pointer); + selected = true; + } + + // fire the select event if anything has been selected or deselected + if (selected === true) { + // select or unselect + this.selectionHandler._generateClickEvent('select', event, pointer); + } + } + + /** + * Remove all node and edge id's from the first set that are present in the second one. + * + * @param {{nodes: Array., edges: Array.}} firstSet + * @param {{nodes: Array., edges: Array.}} secondSet + * @returns {{nodes: Array., edges: Array.}} + * @private + */ + + }, { + key: '_determineDifference', + value: function _determineDifference(firstSet, secondSet) { + var arrayDiff = function arrayDiff(firstArr, secondArr) { + var result = []; + + for (var i = 0; i < firstArr.length; i++) { + var value = firstArr[i]; + if (secondArr.indexOf(value) === -1) { + result.push(value); + } + } + + return result; + }; + + return { + nodes: arrayDiff(firstSet.nodes, secondSet.nodes), + edges: arrayDiff(firstSet.edges, secondSet.edges) + }; + } + + /** + * This function is called by onDragStart. + * It is separated out because we can then overload it for the datamanipulation system. + * + * @param {Event} event + * @private + */ + + }, { + key: 'onDragStart', + value: function onDragStart(event) { + //in case the touch event was triggered on an external div, do the initial touch now. + if (this.drag.pointer === undefined) { + this.onTouch(event); + } + + // note: drag.pointer is set in onTouch to get the initial touch location + var node = this.selectionHandler.getNodeAt(this.drag.pointer); + + this.drag.dragging = true; + this.drag.selection = []; + this.drag.translation = util.extend({}, this.body.view.translation); // copy the object + this.drag.nodeId = undefined; + + if (node !== undefined && this.options.dragNodes === true) { + this.drag.nodeId = node.id; + // select the clicked node if not yet selected + if (node.isSelected() === false) { + this.selectionHandler.unselectAll(); + this.selectionHandler.selectObject(node); + } + + // after select to contain the node + this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer); + + var selection = this.selectionHandler.selectionObj.nodes; + // create an array with the selected nodes and their original location and status + for (var nodeId in selection) { + if (selection.hasOwnProperty(nodeId)) { + var object = selection[nodeId]; + var s = { + id: object.id, + node: object, + + // store original x, y, xFixed and yFixed, make the node temporarily Fixed + x: object.x, + y: object.y, + xFixed: object.options.fixed.x, + yFixed: object.options.fixed.y + }; + + object.options.fixed.x = true; + object.options.fixed.y = true; + + this.drag.selection.push(s); + } + } + } else { + // fallback if no node is selected and thus the view is dragged. + this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true); + } + } + + /** + * handle drag event + * @param {Event} event + * @private + */ + + }, { + key: 'onDrag', + value: function onDrag(event) { + var _this2 = this; + + if (this.drag.pinched === true) { + return; + } + + // remove the focus on node if it is focussed on by the focusOnNode + this.body.emitter.emit('unlockNode'); + + var pointer = this.getPointer(event.center); + + var selection = this.drag.selection; + if (selection && selection.length && this.options.dragNodes === true) { + this.selectionHandler._generateClickEvent('dragging', event, pointer); + + // calculate delta's and new location + var deltaX = pointer.x - this.drag.pointer.x; + var deltaY = pointer.y - this.drag.pointer.y; + + // update position of all selected nodes + selection.forEach(function (selection) { + var node = selection.node; + // only move the node if it was not fixed initially + if (selection.xFixed === false) { + node.x = _this2.canvas._XconvertDOMtoCanvas(_this2.canvas._XconvertCanvasToDOM(selection.x) + deltaX); + } + // only move the node if it was not fixed initially + if (selection.yFixed === false) { + node.y = _this2.canvas._YconvertDOMtoCanvas(_this2.canvas._YconvertCanvasToDOM(selection.y) + deltaY); + } + }); + + // start the simulation of the physics + this.body.emitter.emit('startSimulation'); + } else { + // move the network + if (this.options.dragView === true) { + this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true); + + // if the drag was not started properly because the click started outside the network div, start it now. + if (this.drag.pointer === undefined) { + this.onDragStart(event); + return; + } + var diffX = pointer.x - this.drag.pointer.x; + var diffY = pointer.y - this.drag.pointer.y; + + this.body.view.translation = { x: this.drag.translation.x + diffX, y: this.drag.translation.y + diffY }; + this.body.emitter.emit('_requestRedraw'); + } + } + } + + /** + * handle drag start event + * @param {Event} event + * @private + */ + + }, { + key: 'onDragEnd', + value: function onDragEnd(event) { + this.drag.dragging = false; + var selection = this.drag.selection; + if (selection && selection.length) { + selection.forEach(function (s) { + // restore original xFixed and yFixed + s.node.options.fixed.x = s.xFixed; + s.node.options.fixed.y = s.yFixed; + }); + this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center)); + this.body.emitter.emit('startSimulation'); + } else { + this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true); + this.body.emitter.emit('_requestRedraw'); + } + } + + /** + * Handle pinch event + * @param {Event} event The event + * @private + */ + + }, { + key: 'onPinch', + value: function onPinch(event) { + var pointer = this.getPointer(event.center); + + this.drag.pinched = true; + if (this.pinch['scale'] === undefined) { + this.pinch.scale = 1; + } + + // TODO: enabled moving while pinching? + var scale = this.pinch.scale * event.scale; + this.zoom(scale, pointer); + } + + /** + * Zoom the network in or out + * @param {number} scale a number around 1, and between 0.01 and 10 + * @param {{x: number, y: number}} pointer Position on screen + * @private + */ + + }, { + key: 'zoom', + value: function zoom(scale, pointer) { + if (this.options.zoomView === true) { + var scaleOld = this.body.view.scale; + if (scale < 0.00001) { + scale = 0.00001; + } + if (scale > 10) { + scale = 10; + } + + var preScaleDragPointer = undefined; + if (this.drag !== undefined) { + if (this.drag.dragging === true) { + preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer); + } + } + // + this.canvas.frame.canvas.clientHeight / 2 + var translation = this.body.view.translation; + + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac; + + this.body.view.scale = scale; + this.body.view.translation = { x: tx, y: ty }; + + if (preScaleDragPointer != undefined) { + var postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer); + this.drag.pointer.x = postScaleDragPointer.x; + this.drag.pointer.y = postScaleDragPointer.y; + } + + this.body.emitter.emit('_requestRedraw'); + + if (scaleOld < scale) { + this.body.emitter.emit('zoom', { direction: '+', scale: this.body.view.scale, pointer: pointer }); + } else { + this.body.emitter.emit('zoom', { direction: '-', scale: this.body.view.scale, pointer: pointer }); + } + } + } + + /** + * Event handler for mouse wheel event, used to zoom the timeline + * See http://adomas.org/javascript-mouse-wheel/ + * https://github.com/EightMedia/hammer.js/issues/256 + * @param {MouseEvent} event + * @private + */ + + }, { + key: 'onMouseWheel', + value: function onMouseWheel(event) { + if (this.options.zoomView === true) { + // retrieve delta + var delta = 0; + if (event.wheelDelta) { + /* IE/Opera. */ + delta = event.wheelDelta / 120; + } else if (event.detail) { + /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; + } + + // If delta is nonzero, handle it. + // Basically, delta is now positive if wheel was scrolled up, + // and negative, if wheel was scrolled down. + if (delta !== 0) { + + // calculate the new scale + var scale = this.body.view.scale; + var zoom = delta / 10; + if (delta < 0) { + zoom = zoom / (1 - zoom); + } + scale *= 1 + zoom; + + // calculate the pointer location + var pointer = this.getPointer({ x: event.clientX, y: event.clientY }); + + // apply the new scale + this.zoom(scale, pointer); + } + + // Prevent default actions caused by mouse wheel. + event.preventDefault(); + } + } + + /** + * Mouse move handler for checking whether the title moves over a node with a title. + * @param {Event} event + * @private + */ + + }, { + key: 'onMouseMove', + value: function onMouseMove(event) { + var _this3 = this; + + var pointer = this.getPointer({ x: event.clientX, y: event.clientY }); + var popupVisible = false; + + // check if the previously selected node is still selected + if (this.popup !== undefined) { + if (this.popup.hidden === false) { + this._checkHidePopup(pointer); + } + + // if the popup was not hidden above + if (this.popup.hidden === false) { + popupVisible = true; + this.popup.setPosition(pointer.x + 3, pointer.y - 5); + this.popup.show(); + } + } + + // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over. + if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) { + this.canvas.frame.focus(); + } + + // start a timeout that will check if the mouse is positioned above an element + if (popupVisible === false) { + if (this.popupTimer !== undefined) { + clearInterval(this.popupTimer); // stop any running calculationTimer + this.popupTimer = undefined; + } + if (!this.drag.dragging) { + this.popupTimer = setTimeout(function () { + return _this3._checkShowPopup(pointer); + }, this.options.tooltipDelay); + } + } + + // adding hover highlights + if (this.options.hover === true) { + this.selectionHandler.hoverObject(event, pointer); + } + } + + /** + * Check if there is an element on the given position in the network + * (a node or edge). If so, and if this element has a title, + * show a popup window with its title. + * + * @param {{x:number, y:number}} pointer + * @private + */ + + }, { + key: '_checkShowPopup', + value: function _checkShowPopup(pointer) { + var x = this.canvas._XconvertDOMtoCanvas(pointer.x); + var y = this.canvas._YconvertDOMtoCanvas(pointer.y); + var pointerObj = { + left: x, + top: y, + right: x, + bottom: y + }; + + var previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id; + var nodeUnderCursor = false; + var popupType = 'node'; + + // check if a node is under the cursor. + if (this.popupObj === undefined) { + // search the nodes for overlap, select the top one in case of multiple nodes + var nodeIndices = this.body.nodeIndices; + var nodes = this.body.nodes; + var node = void 0; + var overlappingNodes = []; + for (var i = 0; i < nodeIndices.length; i++) { + node = nodes[nodeIndices[i]]; + if (node.isOverlappingWith(pointerObj) === true) { + if (node.getTitle() !== undefined) { + overlappingNodes.push(nodeIndices[i]); + } + } + } + + if (overlappingNodes.length > 0) { + // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others + this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]]; + // if you hover over a node, the title of the edge is not supposed to be shown. + nodeUnderCursor = true; + } + } + + if (this.popupObj === undefined && nodeUnderCursor === false) { + // search the edges for overlap + var edgeIndices = this.body.edgeIndices; + var edges = this.body.edges; + var edge = void 0; + var overlappingEdges = []; + for (var _i = 0; _i < edgeIndices.length; _i++) { + edge = edges[edgeIndices[_i]]; + if (edge.isOverlappingWith(pointerObj) === true) { + if (edge.connected === true && edge.getTitle() !== undefined) { + overlappingEdges.push(edgeIndices[_i]); + } + } + } + + if (overlappingEdges.length > 0) { + this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]]; + popupType = 'edge'; + } + } + + if (this.popupObj !== undefined) { + // show popup message window + if (this.popupObj.id !== previousPopupObjId) { + if (this.popup === undefined) { + this.popup = new Popup(this.canvas.frame); + } + + this.popup.popupTargetType = popupType; + this.popup.popupTargetId = this.popupObj.id; + + // adjust a small offset such that the mouse cursor is located in the + // bottom left location of the popup, and you can easily move over the + // popup area + this.popup.setPosition(pointer.x + 3, pointer.y - 5); + this.popup.setText(this.popupObj.getTitle()); + this.popup.show(); + this.body.emitter.emit('showPopup', this.popupObj.id); + } + } else { + if (this.popup !== undefined) { + this.popup.hide(); + this.body.emitter.emit('hidePopup'); + } + } + } + + /** + * Check if the popup must be hidden, which is the case when the mouse is no + * longer hovering on the object + * @param {{x:number, y:number}} pointer + * @private + */ + + }, { + key: '_checkHidePopup', + value: function _checkHidePopup(pointer) { + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + + var stillOnObj = false; + if (this.popup.popupTargetType === 'node') { + if (this.body.nodes[this.popup.popupTargetId] !== undefined) { + stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj); + + // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it. + // we initially only check stillOnObj because this is much faster. + if (stillOnObj === true) { + var overNode = this.selectionHandler.getNodeAt(pointer); + stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId; + } + } + } else { + if (this.selectionHandler.getNodeAt(pointer) === undefined) { + if (this.body.edges[this.popup.popupTargetId] !== undefined) { + stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj); + } + } + } + + if (stillOnObj === false) { + this.popupObj = undefined; + this.popup.hide(); + this.body.emitter.emit('hidePopup'); + } + } + }]); + return InteractionHandler; +}(); + +exports['default'] = InteractionHandler; + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Hammer = __webpack_require__(10); +var hammerUtil = __webpack_require__(37); +var keycharm = __webpack_require__(35); + +/** + * Navigation Handler + */ + +var NavigationHandler = function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function NavigationHandler(body, canvas) { + var _this = this; + + (0, _classCallCheck3['default'])(this, NavigationHandler); + + this.body = body; + this.canvas = canvas; + + this.iconsCreated = false; + this.navigationHammers = []; + this.boundFunctions = {}; + this.touchTime = 0; + this.activated = false; + + this.body.emitter.on("activate", function () { + _this.activated = true;_this.configureKeyboardBindings(); + }); + this.body.emitter.on("deactivate", function () { + _this.activated = false;_this.configureKeyboardBindings(); + }); + this.body.emitter.on("destroy", function () { + if (_this.keycharm !== undefined) { + _this.keycharm.destroy(); + } + }); + + this.options = {}; + } + + /** + * + * @param {Object} options + */ + + + (0, _createClass3['default'])(NavigationHandler, [{ + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + this.options = options; + this.create(); + } + } + + /** + * Creates or refreshes navigation and sets key bindings + */ + + }, { + key: 'create', + value: function create() { + if (this.options.navigationButtons === true) { + if (this.iconsCreated === false) { + this.loadNavigationElements(); + } + } else if (this.iconsCreated === true) { + this.cleanNavigation(); + } + + this.configureKeyboardBindings(); + } + + /** + * Cleans up previous navigation items + */ + + }, { + key: 'cleanNavigation', + value: function cleanNavigation() { + // clean hammer bindings + if (this.navigationHammers.length != 0) { + for (var i = 0; i < this.navigationHammers.length; i++) { + this.navigationHammers[i].destroy(); + } + this.navigationHammers = []; + } + + // clean up previous navigation items + if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) { + this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']); + } + + this.iconsCreated = false; + } + + /** + * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation + * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent + * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false. + * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas. + * + * @private + */ + + }, { + key: 'loadNavigationElements', + value: function loadNavigationElements() { + var _this2 = this; + + this.cleanNavigation(); + + this.navigationDOM = {}; + var navigationDivs = ['up', 'down', 'left', 'right', 'zoomIn', 'zoomOut', 'zoomExtends']; + var navigationDivActions = ['_moveUp', '_moveDown', '_moveLeft', '_moveRight', '_zoomIn', '_zoomOut', '_fit']; + + this.navigationDOM['wrapper'] = document.createElement('div'); + this.navigationDOM['wrapper'].className = 'vis-navigation'; + this.canvas.frame.appendChild(this.navigationDOM['wrapper']); + + for (var i = 0; i < navigationDivs.length; i++) { + this.navigationDOM[navigationDivs[i]] = document.createElement('div'); + this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i]; + this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]); + + var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]); + if (navigationDivActions[i] === "_fit") { + hammerUtil.onTouch(hammer, this._fit.bind(this)); + } else { + hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this, navigationDivActions[i])); + } + + this.navigationHammers.push(hammer); + } + + // use a hammer for the release so we do not require the one used in the rest of the network + // the one the rest uses can be overloaded by the manipulation system. + var hammerFrame = new Hammer(this.canvas.frame); + hammerUtil.onRelease(hammerFrame, function () { + _this2._stopMovement(); + }); + this.navigationHammers.push(hammerFrame); + + this.iconsCreated = true; + } + + /** + * + * @param {string} action + */ + + }, { + key: 'bindToRedraw', + value: function bindToRedraw(action) { + if (this.boundFunctions[action] === undefined) { + this.boundFunctions[action] = this[action].bind(this); + this.body.emitter.on("initRedraw", this.boundFunctions[action]); + this.body.emitter.emit("_startRendering"); + } + } + + /** + * + * @param {string} action + */ + + }, { + key: 'unbindFromRedraw', + value: function unbindFromRedraw(action) { + if (this.boundFunctions[action] !== undefined) { + this.body.emitter.off("initRedraw", this.boundFunctions[action]); + this.body.emitter.emit("_stopRendering"); + delete this.boundFunctions[action]; + } + } + + /** + * this stops all movement induced by the navigation buttons + * + * @private + */ + + }, { + key: '_fit', + value: function _fit() { + if (new Date().valueOf() - this.touchTime > 700) { + // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?) + this.body.emitter.emit("fit", { duration: 700 }); + this.touchTime = new Date().valueOf(); + } + } + + /** + * this stops all movement induced by the navigation buttons + * + * @private + */ + + }, { + key: '_stopMovement', + value: function _stopMovement() { + for (var boundAction in this.boundFunctions) { + if (this.boundFunctions.hasOwnProperty(boundAction)) { + this.body.emitter.off("initRedraw", this.boundFunctions[boundAction]); + this.body.emitter.emit("_stopRendering"); + } + } + this.boundFunctions = {}; + } + /** + * + * @private + */ + + }, { + key: '_moveUp', + value: function _moveUp() { + this.body.view.translation.y += this.options.keyboard.speed.y; + } + /** + * + * @private + */ + + }, { + key: '_moveDown', + value: function _moveDown() { + this.body.view.translation.y -= this.options.keyboard.speed.y; + } + /** + * + * @private + */ + + }, { + key: '_moveLeft', + value: function _moveLeft() { + this.body.view.translation.x += this.options.keyboard.speed.x; + } + /** + * + * @private + */ + + }, { + key: '_moveRight', + value: function _moveRight() { + this.body.view.translation.x -= this.options.keyboard.speed.x; + } + /** + * + * @private + */ + + }, { + key: '_zoomIn', + value: function _zoomIn() { + var scaleOld = this.body.view.scale; + var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom); + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac; + + this.body.view.scale = scale; + this.body.view.translation = { x: tx, y: ty }; + this.body.emitter.emit('zoom', { direction: '+', scale: this.body.view.scale, pointer: null }); + } + + /** + * + * @private + */ + + }, { + key: '_zoomOut', + value: function _zoomOut() { + var scaleOld = this.body.view.scale; + var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom); + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac; + + this.body.view.scale = scale; + this.body.view.translation = { x: tx, y: ty }; + this.body.emitter.emit('zoom', { direction: '-', scale: this.body.view.scale, pointer: null }); + } + + /** + * bind all keys using keycharm. + */ + + }, { + key: 'configureKeyboardBindings', + value: function configureKeyboardBindings() { + var _this3 = this; + + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + + if (this.options.keyboard.enabled === true) { + if (this.options.keyboard.bindToWindow === true) { + this.keycharm = keycharm({ container: window, preventDefault: true }); + } else { + this.keycharm = keycharm({ container: this.canvas.frame, preventDefault: true }); + } + + this.keycharm.reset(); + + if (this.activated === true) { + this.keycharm.bind("up", function () { + _this3.bindToRedraw("_moveUp"); + }, "keydown"); + this.keycharm.bind("down", function () { + _this3.bindToRedraw("_moveDown"); + }, "keydown"); + this.keycharm.bind("left", function () { + _this3.bindToRedraw("_moveLeft"); + }, "keydown"); + this.keycharm.bind("right", function () { + _this3.bindToRedraw("_moveRight"); + }, "keydown"); + this.keycharm.bind("=", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("num+", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("num-", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("-", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("[", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("]", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("pageup", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("pagedown", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + + this.keycharm.bind("up", function () { + _this3.unbindFromRedraw("_moveUp"); + }, "keyup"); + this.keycharm.bind("down", function () { + _this3.unbindFromRedraw("_moveDown"); + }, "keyup"); + this.keycharm.bind("left", function () { + _this3.unbindFromRedraw("_moveLeft"); + }, "keyup"); + this.keycharm.bind("right", function () { + _this3.unbindFromRedraw("_moveRight"); + }, "keyup"); + this.keycharm.bind("=", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("num+", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("num-", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("-", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("[", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("]", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("pageup", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("pagedown", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + } + } + } + }]); + return NavigationHandler; +}(); + +exports['default'] = NavigationHandler; + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var Node = __webpack_require__(47)['default']; +var Edge = __webpack_require__(74)['default']; + +var util = __webpack_require__(2); + +/** + * The handler for selections + */ + +var SelectionHandler = function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function SelectionHandler(body, canvas) { + var _this = this; + + (0, _classCallCheck3['default'])(this, SelectionHandler); + + this.body = body; + this.canvas = canvas; + this.selectionObj = { nodes: [], edges: [] }; + this.hoverObj = { nodes: {}, edges: {} }; + + this.options = {}; + this.defaultOptions = { + multiselect: false, + selectable: true, + selectConnectedEdges: true, + hoverConnectedEdges: true + }; + util.extend(this.options, this.defaultOptions); + + this.body.emitter.on("_dataChanged", function () { + _this.updateSelection(); + }); + } + + /** + * + * @param {Object} [options] + */ + + + (0, _createClass3['default'])(SelectionHandler, [{ + key: 'setOptions', + value: function setOptions(options) { + if (options !== undefined) { + var fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges']; + util.selectiveDeepExtend(fields, this.options, options); + } + } + + /** + * handles the selection part of the tap; + * + * @param {{x: number, y: number}} pointer + * @returns {boolean} + */ + + }, { + key: 'selectOnPoint', + value: function selectOnPoint(pointer) { + var selected = false; + if (this.options.selectable === true) { + var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); + + // unselect after getting the objects in order to restore width and height. + this.unselectAll(); + + if (obj !== undefined) { + selected = this.selectObject(obj); + } + this.body.emitter.emit("_requestRedraw"); + } + return selected; + } + + /** + * + * @param {{x: number, y: number}} pointer + * @returns {boolean} + */ + + }, { + key: 'selectAdditionalOnPoint', + value: function selectAdditionalOnPoint(pointer) { + var selectionChanged = false; + if (this.options.selectable === true) { + var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); + + if (obj !== undefined) { + selectionChanged = true; + if (obj.isSelected() === true) { + this.deselectObject(obj); + } else { + this.selectObject(obj); + } + + this.body.emitter.emit("_requestRedraw"); + } + } + return selectionChanged; + } + + /** + * Create an object containing the standard fields for an event. + * + * @param {Event} event + * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse + * @returns {{}} + * @private + */ + + }, { + key: '_initBaseEvent', + value: function _initBaseEvent(event, pointer) { + var properties = {}; + + properties['pointer'] = { + DOM: { x: pointer.x, y: pointer.y }, + canvas: this.canvas.DOMtoCanvas(pointer) + }; + properties['event'] = event; + + return properties; + } + + /** + * Generate an event which the user can catch. + * + * This adds some extra data to the event with respect to cursor position and + * selected nodes and edges. + * + * @param {string} eventType Name of event to send + * @param {Event} event + * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse + * @param {Object|undefined} oldSelection If present, selection state before event occured + * @param {boolean|undefined} [emptySelection=false] Indicate if selection data should be passed + */ + + }, { + key: '_generateClickEvent', + value: function _generateClickEvent(eventType, event, pointer, oldSelection) { + var emptySelection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + + var properties = this._initBaseEvent(event, pointer); + + if (emptySelection === true) { + properties.nodes = []; + properties.edges = []; + } else { + var tmp = this.getSelection(); + properties.nodes = tmp.nodes; + properties.edges = tmp.edges; + } + + if (oldSelection !== undefined) { + properties['previousSelection'] = oldSelection; + } + + if (eventType == 'click') { + // For the time being, restrict this functionality to + // just the click event. + properties.items = this.getClickedItems(pointer); + } + + this.body.emitter.emit(eventType, properties); + } + + /** + * + * @param {Object} obj + * @param {boolean} [highlightEdges=this.options.selectConnectedEdges] + * @returns {boolean} + */ + + }, { + key: 'selectObject', + value: function selectObject(obj) { + var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.selectConnectedEdges; + + if (obj !== undefined) { + if (obj instanceof Node) { + if (highlightEdges === true) { + this._selectConnectedEdges(obj); + } + } + obj.select(); + this._addToSelection(obj); + return true; + } + return false; + } + + /** + * + * @param {Object} obj + */ + + }, { + key: 'deselectObject', + value: function deselectObject(obj) { + if (obj.isSelected() === true) { + obj.selected = false; + this._removeFromSelection(obj); + } + } + + /** + * retrieve all nodes overlapping with given object + * @param {Object} object An object with parameters left, top, right, bottom + * @return {number[]} An array with id's of the overlapping nodes + * @private + */ + + }, { + key: '_getAllNodesOverlappingWith', + value: function _getAllNodesOverlappingWith(object) { + var overlappingNodes = []; + var nodes = this.body.nodes; + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var nodeId = this.body.nodeIndices[i]; + if (nodes[nodeId].isOverlappingWith(object)) { + overlappingNodes.push(nodeId); + } + } + return overlappingNodes; + } + + /** + * Return a position object in canvasspace from a single point in screenspace + * + * @param {{x: number, y: number}} pointer + * @returns {{left: number, top: number, right: number, bottom: number}} + * @private + */ + + }, { + key: '_pointerToPositionObject', + value: function _pointerToPositionObject(pointer) { + var canvasPos = this.canvas.DOMtoCanvas(pointer); + return { + left: canvasPos.x - 1, + top: canvasPos.y + 1, + right: canvasPos.x + 1, + bottom: canvasPos.y - 1 + }; + } + + /** + * Get the top node at the passed point (like a click) + * + * @param {{x: number, y: number}} pointer + * @param {boolean} [returnNode=true] + * @return {Node | undefined} node + */ + + }, { + key: 'getNodeAt', + value: function getNodeAt(pointer) { + var returnNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + // we first check if this is an navigation controls element + var positionObject = this._pointerToPositionObject(pointer); + var overlappingNodes = this._getAllNodesOverlappingWith(positionObject); + // if there are overlapping nodes, select the last one, this is the + // one which is drawn on top of the others + if (overlappingNodes.length > 0) { + if (returnNode === true) { + return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]]; + } else { + return overlappingNodes[overlappingNodes.length - 1]; + } + } else { + return undefined; + } + } + + /** + * retrieve all edges overlapping with given object, selector is around center + * @param {Object} object An object with parameters left, top, right, bottom + * @param {number[]} overlappingEdges An array with id's of the overlapping nodes + * @private + */ + + }, { + key: '_getEdgesOverlappingWith', + value: function _getEdgesOverlappingWith(object, overlappingEdges) { + var edges = this.body.edges; + for (var i = 0; i < this.body.edgeIndices.length; i++) { + var edgeId = this.body.edgeIndices[i]; + if (edges[edgeId].isOverlappingWith(object)) { + overlappingEdges.push(edgeId); + } + } + } + + /** + * retrieve all nodes overlapping with given object + * @param {Object} object An object with parameters left, top, right, bottom + * @return {number[]} An array with id's of the overlapping nodes + * @private + */ + + }, { + key: '_getAllEdgesOverlappingWith', + value: function _getAllEdgesOverlappingWith(object) { + var overlappingEdges = []; + this._getEdgesOverlappingWith(object, overlappingEdges); + return overlappingEdges; + } + + /** + * Get the edges nearest to the passed point (like a click) + * + * @param {{x: number, y: number}} pointer + * @param {boolean} [returnEdge=true] + * @return {Edge | undefined} node + */ + + }, { + key: 'getEdgeAt', + value: function getEdgeAt(pointer) { + var returnEdge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + // Iterate over edges, pick closest within 10 + var canvasPos = this.canvas.DOMtoCanvas(pointer); + var mindist = 10; + var overlappingEdge = null; + var edges = this.body.edges; + for (var i = 0; i < this.body.edgeIndices.length; i++) { + var edgeId = this.body.edgeIndices[i]; + var edge = edges[edgeId]; + if (edge.connected) { + var xFrom = edge.from.x; + var yFrom = edge.from.y; + var xTo = edge.to.x; + var yTo = edge.to.y; + var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y); + if (dist < mindist) { + overlappingEdge = edgeId; + mindist = dist; + } + } + } + if (overlappingEdge !== null) { + if (returnEdge === true) { + return this.body.edges[overlappingEdge]; + } else { + return overlappingEdge; + } + } else { + return undefined; + } + } + + /** + * Add object to the selection array. + * + * @param {Object} obj + * @private + */ + + }, { + key: '_addToSelection', + value: function _addToSelection(obj) { + if (obj instanceof Node) { + this.selectionObj.nodes[obj.id] = obj; + } else { + this.selectionObj.edges[obj.id] = obj; + } + } + + /** + * Add object to the selection array. + * + * @param {Object} obj + * @private + */ + + }, { + key: '_addToHover', + value: function _addToHover(obj) { + if (obj instanceof Node) { + this.hoverObj.nodes[obj.id] = obj; + } else { + this.hoverObj.edges[obj.id] = obj; + } + } + + /** + * Remove a single option from selection. + * + * @param {Object} obj + * @private + */ + + }, { + key: '_removeFromSelection', + value: function _removeFromSelection(obj) { + if (obj instanceof Node) { + delete this.selectionObj.nodes[obj.id]; + this._unselectConnectedEdges(obj); + } else { + delete this.selectionObj.edges[obj.id]; + } + } + + /** + * Unselect all. The selectionObj is useful for this. + */ + + }, { + key: 'unselectAll', + value: function unselectAll() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + this.selectionObj.nodes[nodeId].unselect(); + } + } + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + this.selectionObj.edges[edgeId].unselect(); + } + } + + this.selectionObj = { nodes: {}, edges: {} }; + } + + /** + * return the number of selected nodes + * + * @returns {number} + * @private + */ + + }, { + key: '_getSelectedNodeCount', + value: function _getSelectedNodeCount() { + var count = 0; + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + count += 1; + } + } + return count; + } + + /** + * return the selected node + * + * @returns {number} + * @private + */ + + }, { + key: '_getSelectedNode', + value: function _getSelectedNode() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + return this.selectionObj.nodes[nodeId]; + } + } + return undefined; + } + + /** + * return the selected edge + * + * @returns {number} + * @private + */ + + }, { + key: '_getSelectedEdge', + value: function _getSelectedEdge() { + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + return this.selectionObj.edges[edgeId]; + } + } + return undefined; + } + + /** + * return the number of selected edges + * + * @returns {number} + * @private + */ + + }, { + key: '_getSelectedEdgeCount', + value: function _getSelectedEdgeCount() { + var count = 0; + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + count += 1; + } + } + return count; + } + + /** + * return the number of selected objects. + * + * @returns {number} + * @private + */ + + }, { + key: '_getSelectedObjectCount', + value: function _getSelectedObjectCount() { + var count = 0; + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + count += 1; + } + } + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + count += 1; + } + } + return count; + } + + /** + * Check if anything is selected + * + * @returns {boolean} + * @private + */ + + }, { + key: '_selectionIsEmpty', + value: function _selectionIsEmpty() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + return false; + } + } + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + return false; + } + } + return true; + } + + /** + * check if one of the selected nodes is a cluster. + * + * @returns {boolean} + * @private + */ + + }, { + key: '_clusterInSelection', + value: function _clusterInSelection() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + if (this.selectionObj.nodes[nodeId].clusterSize > 1) { + return true; + } + } + } + return false; + } + + /** + * select the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: '_selectConnectedEdges', + value: function _selectConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.select(); + this._addToSelection(edge); + } + } + + /** + * select the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: '_hoverConnectedEdges', + value: function _hoverConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.hover = true; + this._addToHover(edge); + } + } + + /** + * unselect the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: '_unselectConnectedEdges', + value: function _unselectConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.unselect(); + this._removeFromSelection(edge); + } + } + + /** + * Remove the highlight from a node or edge, in response to mouse movement + * + * @param {Event} event + * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse + * @param {Node|vis.Edge} object + * @private + */ + + }, { + key: 'emitBlurEvent', + value: function emitBlurEvent(event, pointer, object) { + var properties = this._initBaseEvent(event, pointer); + + if (object.hover === true) { + object.hover = false; + if (object instanceof Node) { + properties.node = object.id; + this.body.emitter.emit("blurNode", properties); + } else { + properties.edge = object.id; + this.body.emitter.emit("blurEdge", properties); + } + } + } + + /** + * Create the highlight for a node or edge, in response to mouse movement + * + * @param {Event} event + * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse + * @param {Node|vis.Edge} object + * @returns {boolean} hoverChanged + * @private + */ + + }, { + key: 'emitHoverEvent', + value: function emitHoverEvent(event, pointer, object) { + var properties = this._initBaseEvent(event, pointer); + var hoverChanged = false; + + if (object.hover === false) { + object.hover = true; + this._addToHover(object); + hoverChanged = true; + if (object instanceof Node) { + properties.node = object.id; + this.body.emitter.emit("hoverNode", properties); + } else { + properties.edge = object.id; + this.body.emitter.emit("hoverEdge", properties); + } + } + + return hoverChanged; + } + + /** + * Perform actions in response to a mouse movement. + * + * @param {Event} event + * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse + */ + + }, { + key: 'hoverObject', + value: function hoverObject(event, pointer) { + var object = this.getNodeAt(pointer); + if (object === undefined) { + object = this.getEdgeAt(pointer); + } + + var hoverChanged = false; + // remove all node hover highlights + for (var nodeId in this.hoverObj.nodes) { + if (this.hoverObj.nodes.hasOwnProperty(nodeId)) { + if (object === undefined || object instanceof Node && object.id != nodeId || object instanceof Edge) { + this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]); + delete this.hoverObj.nodes[nodeId]; + hoverChanged = true; + } + } + } + + // removing all edge hover highlights + for (var edgeId in this.hoverObj.edges) { + if (this.hoverObj.edges.hasOwnProperty(edgeId)) { + // if the hover has been changed here it means that the node has been hovered over or off + // we then do not use the emitBlurEvent method here. + if (hoverChanged === true) { + this.hoverObj.edges[edgeId].hover = false; + delete this.hoverObj.edges[edgeId]; + } + // if the blur remains the same and the object is undefined (mouse off) or another + // edge has been hovered, or another node has been hovered we blur the edge. + else if (object === undefined || object instanceof Edge && object.id != edgeId || object instanceof Node && !object.hover) { + this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]); + delete this.hoverObj.edges[edgeId]; + hoverChanged = true; + } + } + } + + if (object !== undefined) { + hoverChanged = hoverChanged || this.emitHoverEvent(event, pointer, object); + if (object instanceof Node && this.options.hoverConnectedEdges === true) { + this._hoverConnectedEdges(object); + } + } + + if (hoverChanged === true) { + this.body.emitter.emit('_requestRedraw'); + } + } + + /** + * + * retrieve the currently selected objects + * @return {{nodes: Array., edges: Array.}} selection + */ + + }, { + key: 'getSelection', + value: function getSelection() { + var nodeIds = this.getSelectedNodes(); + var edgeIds = this.getSelectedEdges(); + return { nodes: nodeIds, edges: edgeIds }; + } + + /** + * + * retrieve the currently selected nodes + * @return {string[]} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: 'getSelectedNodes', + value: function getSelectedNodes() { + var idArray = []; + if (this.options.selectable === true) { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + idArray.push(this.selectionObj.nodes[nodeId].id); + } + } + } + return idArray; + } + + /** + * + * retrieve the currently selected edges + * @return {Array} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: 'getSelectedEdges', + value: function getSelectedEdges() { + var idArray = []; + if (this.options.selectable === true) { + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + idArray.push(this.selectionObj.edges[edgeId].id); + } + } + } + return idArray; + } + + /** + * Updates the current selection + * @param {{nodes: Array., edges: Array.}} selection + * @param {Object} options Options + */ + + }, { + key: 'setSelection', + value: function setSelection(selection) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var i = void 0, + id = void 0; + + if (!selection || !selection.nodes && !selection.edges) throw 'Selection must be an object with nodes and/or edges properties'; + // first unselect any selected node, if option is true or undefined + if (options.unselectAll || options.unselectAll === undefined) { + this.unselectAll(); + } + if (selection.nodes) { + for (i = 0; i < selection.nodes.length; i++) { + id = selection.nodes[i]; + + var node = this.body.nodes[id]; + if (!node) { + throw new RangeError('Node with id "' + id + '" not found'); + } + // don't select edges with it + this.selectObject(node, options.highlightEdges); + } + } + + if (selection.edges) { + for (i = 0; i < selection.edges.length; i++) { + id = selection.edges[i]; + + var edge = this.body.edges[id]; + if (!edge) { + throw new RangeError('Edge with id "' + id + '" not found'); + } + this.selectObject(edge); + } + } + this.body.emitter.emit('_requestRedraw'); + } + + /** + * select zero or more nodes with the option to highlight edges + * @param {number[] | string[]} selection An array with the ids of the + * selected nodes. + * @param {boolean} [highlightEdges] + */ + + }, { + key: 'selectNodes', + value: function selectNodes(selection) { + var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; + + this.setSelection({ nodes: selection }, { highlightEdges: highlightEdges }); + } + + /** + * select zero or more edges + * @param {number[] | string[]} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: 'selectEdges', + value: function selectEdges(selection) { + if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; + + this.setSelection({ edges: selection }); + } + + /** + * Validate the selection: remove ids of nodes which no longer exist + * @private + */ + + }, { + key: 'updateSelection', + value: function updateSelection() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + if (!this.body.nodes.hasOwnProperty(nodeId)) { + delete this.selectionObj.nodes[nodeId]; + } + } + } + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + if (!this.body.edges.hasOwnProperty(edgeId)) { + delete this.selectionObj.edges[edgeId]; + } + } + } + } + + /** + * Determine all the visual elements clicked which are on the given point. + * + * All elements are returned; this includes nodes, edges and their labels. + * The order returned is from highest to lowest, i.e. element 0 of the return + * value is the topmost item clicked on. + * + * The return value consists of an array of the following possible elements: + * + * - `{nodeId:number}` - node with given id clicked on + * - `{nodeId:number, labelId:0}` - label of node with given id clicked on + * - `{edgeId:number}` - edge with given id clicked on + * - `{edge:number, labelId:0}` - label of edge with given id clicked on + * + * ## NOTES + * + * - Currently, there is only one label associated with a node or an edge, + * but this is expected to change somewhere in the future. + * - Since there is no z-indexing yet, it is not really possible to set the nodes and + * edges in the correct order. For the time being, nodes come first. + * + * @param {point} pointer mouse position in screen coordinates + * @returns {Array.} + * @private + */ + + }, { + key: 'getClickedItems', + value: function getClickedItems(pointer) { + var point = this.canvas.DOMtoCanvas(pointer); + var items = []; + + // Note reverse order; we want the topmost clicked items to be first in the array + // Also note that selected nodes are disregarded here; these normally display on top + var nodeIndices = this.body.nodeIndices; + var nodes = this.body.nodes; + for (var i = nodeIndices.length - 1; i >= 0; i--) { + var node = nodes[nodeIndices[i]]; + var ret = node.getItemsOnPoint(point); + items.push.apply(items, ret); // Append the return value to the running list. + } + + var edgeIndices = this.body.edgeIndices; + var edges = this.body.edges; + for (var _i = edgeIndices.length - 1; _i >= 0; _i--) { + var edge = edges[edgeIndices[_i]]; + var _ret = edge.getItemsOnPoint(point); + items.push.apply(items, _ret); // Append the return value to the running list. + } + + return items; + } + }]); + return SelectionHandler; +}(); + +exports['default'] = SelectionHandler; + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * There's a mix-up with terms in the code. Following are the formal definitions: + * + * tree - a strict hierarchical network, i.e. every node has at most one parent + * forest - a collection of trees. These distinct trees are thus not connected. + * + * So: + * - in a network that is not a tree, there exist nodes with multiple parents. + * - a network consisting of unconnected sub-networks, of which at least one + * is not a tree, is not a forest. + * + * In the code, the definitions are: + * + * tree - any disconnected sub-network, strict hierarchical or not. + * forest - a bunch of these sub-networks + * + * The difference between tree and not-tree is important in the code, notably within + * to the block-shifting algorithm. The algorithm assumes formal trees and fails + * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues). + * + * In order to distinguish the definitions in the following code, the adjective 'formal' is + * used. If 'formal' is absent, you must assume the non-formal definition. + * + * ---------------------------------------------------------------------------------- + * NOTES + * ===== + * + * A hierarchical layout is a different thing from a hierarchical network. + * The layout is a way to arrange the nodes in the view; this can be done + * on non-hierarchical networks as well. The converse is also possible. + */ + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray2 = __webpack_require__(30); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var NetworkUtil = __webpack_require__(76)['default']; + +var _require = __webpack_require__(236), + HorizontalStrategy = _require.HorizontalStrategy, + VerticalStrategy = _require.VerticalStrategy; + +/** + * Container for derived data on current network, relating to hierarchy. + * + * @private + */ + + +var HierarchicalStatus = function () { + /** + * @ignore + */ + function HierarchicalStatus() { + (0, _classCallCheck3['default'])(this, HierarchicalStatus); + + this.childrenReference = {}; // child id's per node id + this.parentReference = {}; // parent id's per node id + this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong + + this.distributionOrdering = {}; // The nodes per level, in the display order + this.levels = {}; // hierarchy level per node id + this.distributionIndex = {}; // The position of the node in the level sorting order, per node id. + + this.isTree = false; // True if current network is a formal tree + this.treeIndex = -1; // Highest tree id in current network. + } + + /** + * Add the relation between given nodes to the current state. + * + * @param {Node.id} parentNodeId + * @param {Node.id} childNodeId + */ + + + (0, _createClass3['default'])(HierarchicalStatus, [{ + key: 'addRelation', + value: function addRelation(parentNodeId, childNodeId) { + if (this.childrenReference[parentNodeId] === undefined) { + this.childrenReference[parentNodeId] = []; + } + this.childrenReference[parentNodeId].push(childNodeId); + + if (this.parentReference[childNodeId] === undefined) { + this.parentReference[childNodeId] = []; + } + this.parentReference[childNodeId].push(parentNodeId); + } + + /** + * Check if the current state is for a formal tree or formal forest. + * + * This is the case if every node has at most one parent. + * + * Pre: parentReference init'ed properly for current network + */ + + }, { + key: 'checkIfTree', + value: function checkIfTree() { + for (var i in this.parentReference) { + if (this.parentReference[i].length > 1) { + this.isTree = false; + return; + } + } + + this.isTree = true; + } + + /** + * Return the number of separate trees in the current network. + * @returns {number} + */ + + }, { + key: 'numTrees', + value: function numTrees() { + return this.treeIndex + 1; // This assumes the indexes are assigned consecitively + } + + /** + * Assign a tree id to a node + * @param {Node} node + * @param {string|number} treeId + */ + + }, { + key: 'setTreeIndex', + value: function setTreeIndex(node, treeId) { + if (treeId === undefined) return; // Don't bother + + if (this.trees[node.id] === undefined) { + this.trees[node.id] = treeId; + this.treeIndex = Math.max(treeId, this.treeIndex); + } + } + + /** + * Ensure level for given id is defined. + * + * Sets level to zero for given node id if not already present + * + * @param {Node.id} nodeId + */ + + }, { + key: 'ensureLevel', + value: function ensureLevel(nodeId) { + if (this.levels[nodeId] === undefined) { + this.levels[nodeId] = 0; + } + } + + /** + * get the maximum level of a branch. + * + * TODO: Never entered; find a test case to test this! + * @param {Node.id} nodeId + * @returns {number} + */ + + }, { + key: 'getMaxLevel', + value: function getMaxLevel(nodeId) { + var _this = this; + + var accumulator = {}; + + var _getMaxLevel = function _getMaxLevel(nodeId) { + if (accumulator[nodeId] !== undefined) { + return accumulator[nodeId]; + } + var level = _this.levels[nodeId]; + if (_this.childrenReference[nodeId]) { + var children = _this.childrenReference[nodeId]; + if (children.length > 0) { + for (var i = 0; i < children.length; i++) { + level = Math.max(level, _getMaxLevel(children[i])); + } + } + } + accumulator[nodeId] = level; + return level; + }; + + return _getMaxLevel(nodeId); + } + + /** + * + * @param {Node} nodeA + * @param {Node} nodeB + */ + + }, { + key: 'levelDownstream', + value: function levelDownstream(nodeA, nodeB) { + if (this.levels[nodeB.id] === undefined) { + // set initial level + if (this.levels[nodeA.id] === undefined) { + this.levels[nodeA.id] = 0; + } + // set level + this.levels[nodeB.id] = this.levels[nodeA.id] + 1; + } + } + + /** + * Small util method to set the minimum levels of the nodes to zero. + * + * @param {Array.} nodes + */ + + }, { + key: 'setMinLevelToZero', + value: function setMinLevelToZero(nodes) { + var minLevel = 1e9; + // get the minimum level + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (this.levels[nodeId] !== undefined) { + minLevel = Math.min(this.levels[nodeId], minLevel); + } + } + } + + // subtract the minimum from the set so we have a range starting from 0 + for (var _nodeId in nodes) { + if (nodes.hasOwnProperty(_nodeId)) { + if (this.levels[_nodeId] !== undefined) { + this.levels[_nodeId] -= minLevel; + } + } + } + } + + /** + * Get the min and max xy-coordinates of a given tree + * + * @param {Array.} nodes + * @param {number} index + * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}} + */ + + }, { + key: 'getTreeSize', + value: function getTreeSize(nodes, index) { + var min_x = 1e9; + var max_x = -1e9; + var min_y = 1e9; + var max_y = -1e9; + + for (var nodeId in this.trees) { + if (this.trees.hasOwnProperty(nodeId)) { + if (this.trees[nodeId] === index) { + var node = nodes[nodeId]; + min_x = Math.min(node.x, min_x); + max_x = Math.max(node.x, max_x); + min_y = Math.min(node.y, min_y); + max_y = Math.max(node.y, max_y); + } + } + } + + return { + min_x: min_x, + max_x: max_x, + min_y: min_y, + max_y: max_y + }; + } + + /** + * Check if two nodes have the same parent(s) + * + * @param {Node} node1 + * @param {Node} node2 + * @return {boolean} true if the two nodes have a same ancestor node, false otherwise + */ + + }, { + key: 'hasSameParent', + value: function hasSameParent(node1, node2) { + var parents1 = this.parentReference[node1.id]; + var parents2 = this.parentReference[node2.id]; + if (parents1 === undefined || parents2 === undefined) { + return false; + } + + for (var i = 0; i < parents1.length; i++) { + for (var j = 0; j < parents2.length; j++) { + if (parents1[i] == parents2[j]) { + return true; + } + } + } + return false; + } + + /** + * Check if two nodes are in the same tree. + * + * @param {Node} node1 + * @param {Node} node2 + * @return {Boolean} true if this is so, false otherwise + */ + + }, { + key: 'inSameSubNetwork', + value: function inSameSubNetwork(node1, node2) { + return this.trees[node1.id] === this.trees[node2.id]; + } + + /** + * Get a list of the distinct levels in the current network + * + * @returns {Array} + */ + + }, { + key: 'getLevels', + value: function getLevels() { + return (0, _keys2['default'])(this.distributionOrdering); + } + + /** + * Add a node to the ordering per level + * + * @param {Node} node + * @param {number} level + */ + + }, { + key: 'addToOrdering', + value: function addToOrdering(node, level) { + if (this.distributionOrdering[level] === undefined) { + this.distributionOrdering[level] = []; + } + + var isPresent = false; + var curLevel = this.distributionOrdering[level]; + for (var n in curLevel) { + //if (curLevel[n].id === node.id) { + if (curLevel[n] === node) { + isPresent = true; + break; + } + } + + if (!isPresent) { + this.distributionOrdering[level].push(node); + this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1; + } + } + }]); + return HierarchicalStatus; +}(); + +/** + * The Layout Engine + */ + + +var LayoutEngine = function () { + /** + * @param {Object} body + */ + function LayoutEngine(body) { + (0, _classCallCheck3['default'])(this, LayoutEngine); + + this.body = body; + + this.initialRandomSeed = Math.round(Math.random() * 1000000); + this.randomSeed = this.initialRandomSeed; + this.setPhysics = false; + this.options = {}; + this.optionsBackup = { physics: {} }; + + this.defaultOptions = { + randomSeed: undefined, + improvedLayout: true, + hierarchical: { + enabled: false, + levelSeparation: 150, + nodeSpacing: 100, + treeSpacing: 200, + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, + direction: 'UD', // UD, DU, LR, RL + sortMethod: 'hubsize' // hubsize, directed + } + }; + util.extend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + + /** + * Binds event listeners + */ + + + (0, _createClass3['default'])(LayoutEngine, [{ + key: 'bindEventListeners', + value: function bindEventListeners() { + var _this2 = this; + + this.body.emitter.on('_dataChanged', function () { + _this2.setupHierarchicalLayout(); + }); + this.body.emitter.on('_dataLoaded', function () { + _this2.layoutNetwork(); + }); + this.body.emitter.on('_resetHierarchicalLayout', function () { + _this2.setupHierarchicalLayout(); + }); + this.body.emitter.on('_adjustEdgesForHierarchicalLayout', function () { + if (_this2.options.hierarchical.enabled !== true) { + return; + } + // get the type of static smooth curve in case it is required + var type = _this2.direction.curveType(); + + // force all edges into static smooth curves. + _this2.body.emitter.emit('_forceDisableDynamicCurves', type, false); + }); + } + + /** + * + * @param {Object} options + * @param {Object} allOptions + * @returns {Object} + */ + + }, { + key: 'setOptions', + value: function setOptions(options, allOptions) { + if (options !== undefined) { + var hierarchical = this.options.hierarchical; + var prevHierarchicalState = hierarchical.enabled; + util.selectiveDeepExtend(["randomSeed", "improvedLayout"], this.options, options); + util.mergeOptions(this.options, options, 'hierarchical'); + if (options.randomSeed !== undefined) { + this.initialRandomSeed = options.randomSeed; + } + + if (hierarchical.enabled === true) { + if (prevHierarchicalState === true) { + // refresh the overridden options for nodes and edges. + this.body.emitter.emit('refresh', true); + } + + // make sure the level separation is the right way up + if (hierarchical.direction === 'RL' || hierarchical.direction === 'DU') { + if (hierarchical.levelSeparation > 0) { + hierarchical.levelSeparation *= -1; + } + } else { + if (hierarchical.levelSeparation < 0) { + hierarchical.levelSeparation *= -1; + } + } + + this.setDirectionStrategy(); + + this.body.emitter.emit('_resetHierarchicalLayout'); + // because the hierarchical system needs it's own physics and smooth curve settings, + // we adapt the other options if needed. + return this.adaptAllOptionsForHierarchicalLayout(allOptions); + } else { + if (prevHierarchicalState === true) { + // refresh the overridden options for nodes and edges. + this.body.emitter.emit('refresh'); + return util.deepExtend(allOptions, this.optionsBackup); + } + } + } + return allOptions; + } + + /** + * + * @param {Object} allOptions + * @returns {Object} + */ + + }, { + key: 'adaptAllOptionsForHierarchicalLayout', + value: function adaptAllOptionsForHierarchicalLayout(allOptions) { + if (this.options.hierarchical.enabled === true) { + var backupPhysics = this.optionsBackup.physics; + + // set the physics + if (allOptions.physics === undefined || allOptions.physics === true) { + allOptions.physics = { + enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled, + solver: 'hierarchicalRepulsion' + }; + backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled; + backupPhysics.solver = backupPhysics.solver || 'barnesHut'; + } else if ((0, _typeof3['default'])(allOptions.physics) === 'object') { + backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled; + backupPhysics.solver = allOptions.physics.solver || 'barnesHut'; + allOptions.physics.solver = 'hierarchicalRepulsion'; + } else if (allOptions.physics !== false) { + backupPhysics.solver = 'barnesHut'; + allOptions.physics = { solver: 'hierarchicalRepulsion' }; + } + + // get the type of static smooth curve in case it is required + var type = this.direction.curveType(); + + // disable smooth curves if nothing is defined. If smooth curves have been turned on, + // turn them into static smooth curves. + if (allOptions.edges === undefined) { + this.optionsBackup.edges = { smooth: { enabled: true, type: 'dynamic' } }; + allOptions.edges = { smooth: false }; + } else if (allOptions.edges.smooth === undefined) { + this.optionsBackup.edges = { smooth: { enabled: true, type: 'dynamic' } }; + allOptions.edges.smooth = false; + } else { + if (typeof allOptions.edges.smooth === 'boolean') { + this.optionsBackup.edges = { smooth: allOptions.edges.smooth }; + allOptions.edges.smooth = { enabled: allOptions.edges.smooth, type: type }; + } else { + var smooth = allOptions.edges.smooth; + + // allow custom types except for dynamic + if (smooth.type !== undefined && smooth.type !== 'dynamic') { + type = smooth.type; + } + + // TODO: this is options merging; see if the standard routines can be used here. + this.optionsBackup.edges = { + smooth: smooth.enabled === undefined ? true : smooth.enabled, + type: smooth.type === undefined ? 'dynamic' : smooth.type, + roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness, + forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection + }; + + // NOTE: Copying an object to self; this is basically setting defaults for undefined variables + allOptions.edges.smooth = { + enabled: smooth.enabled === undefined ? true : smooth.enabled, + type: type, + roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness, + forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection + }; + } + } + + // Force all edges into static smooth curves. + // Only applies to edges that do not use the global options for smooth. + this.body.emitter.emit('_forceDisableDynamicCurves', type); + } + + return allOptions; + } + + /** + * + * @returns {number} + */ + + }, { + key: 'seededRandom', + value: function seededRandom() { + var x = Math.sin(this.randomSeed++) * 10000; + return x - Math.floor(x); + } + + /** + * + * @param {Array.} nodesArray + */ + + }, { + key: 'positionInitially', + value: function positionInitially(nodesArray) { + if (this.options.hierarchical.enabled !== true) { + this.randomSeed = this.initialRandomSeed; + var radius = nodesArray.length + 50; + for (var i = 0; i < nodesArray.length; i++) { + var node = nodesArray[i]; + var angle = 2 * Math.PI * this.seededRandom(); + if (node.x === undefined) { + node.x = radius * Math.cos(angle); + } + if (node.y === undefined) { + node.y = radius * Math.sin(angle); + } + } + } + } + + /** + * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we + * cluster them first to reduce the amount. + */ + + }, { + key: 'layoutNetwork', + value: function layoutNetwork() { + if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) { + var indices = this.body.nodeIndices; + + // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible + // nodes have predefined positions we use this. + var positionDefined = 0; + for (var i = 0; i < indices.length; i++) { + var node = this.body.nodes[indices[i]]; + if (node.predefinedPosition === true) { + positionDefined += 1; + } + } + + // if less than half of the nodes have a predefined position we continue + if (positionDefined < 0.5 * indices.length) { + var MAX_LEVELS = 10; + var level = 0; + var clusterThreshold = 150; // TODO add this to options + + // + // Define the options for the hidden cluster nodes + // These options don't propagate outside the clustering phase. + // + // Some options are explicitly disabled, because they may be set in group or default node options. + // The clusters are never displayed, so most explicit settings here serve as performance optimizations. + // + // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden + // cluster nodes, leading to an exception on creation. + // + // All settings here are performance related, except when noted otherwise. + // + var clusterOptions = { + clusterNodeProperties: { + shape: 'ellipse', // Bugfix: avoid type 'image', no images supplied + label: '', // avoid label handling + group: '', // avoid group handling + font: { multi: false } // avoid font propagation + }, + clusterEdgeProperties: { + label: '', // avoid label handling + font: { multi: false }, // avoid font propagation + smooth: { + enabled: false // avoid drawing penalty for complex edges + } + } + }; + + // if there are a lot of nodes, we cluster before we run the algorithm. + // NOTE: this part fails to find clusters for large scale-free networks, which should + // be easily clusterable. + // TODO: examine why this is so + if (indices.length > clusterThreshold) { + var startLength = indices.length; + while (indices.length > clusterThreshold && level <= MAX_LEVELS) { + //console.time("clustering") + level += 1; + var before = indices.length; + // if there are many nodes we do a hubsize cluster + if (level % 3 === 0) { + this.body.modules.clustering.clusterBridges(clusterOptions); + } else { + this.body.modules.clustering.clusterOutliers(clusterOptions); + } + var after = indices.length; + if (before == after && level % 3 !== 0) { + this._declusterAll(); + this.body.emitter.emit("_layoutFailed"); + console.info("This network could not be positioned by this version of the improved layout algorithm." + " Please disable improvedLayout for better performance."); + return; + } + //console.timeEnd("clustering") + //console.log(before,level,after); + } + // increase the size of the edges + this.body.modules.kamadaKawai.setOptions({ springLength: Math.max(150, 2 * startLength) }); + } + if (level > MAX_LEVELS) { + console.info("The clustering didn't succeed within the amount of interations allowed," + " progressing with partial result."); + } + + // position the system for these nodes and edges + this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true); + + // shift to center point + this._shiftToCenter(); + + // perturb the nodes a little bit to force the physics to kick in + var offset = 70; + for (var _i = 0; _i < indices.length; _i++) { + // Only perturb the nodes that aren't fixed + var _node = this.body.nodes[indices[_i]]; + if (_node.predefinedPosition === false) { + _node.x += (0.5 - this.seededRandom()) * offset; + _node.y += (0.5 - this.seededRandom()) * offset; + } + } + + // uncluster all clusters + this._declusterAll(); + + // reposition all bezier nodes. + this.body.emitter.emit("_repositionBezierNodes"); + } + } + } + + /** + * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view + * @private + */ + + }, { + key: '_shiftToCenter', + value: function _shiftToCenter() { + var range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices); + var center = NetworkUtil.findCenter(range); + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + node.x -= center.x; + node.y -= center.y; + } + } + + /** + * Expands all clusters + * @private + */ + + }, { + key: '_declusterAll', + value: function _declusterAll() { + var clustersPresent = true; + while (clustersPresent === true) { + clustersPresent = false; + for (var i = 0; i < this.body.nodeIndices.length; i++) { + if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) { + clustersPresent = true; + this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false); + } + } + if (clustersPresent === true) { + this.body.emitter.emit('_dataChanged'); + } + } + } + + /** + * + * @returns {number|*} + */ + + }, { + key: 'getSeed', + value: function getSeed() { + return this.initialRandomSeed; + } + + /** + * This is the main function to layout the nodes in a hierarchical way. + * It checks if the node details are supplied correctly + * + * @private + */ + + }, { + key: 'setupHierarchicalLayout', + value: function setupHierarchicalLayout() { + if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) { + // get the size of the largest hubs and check if the user has defined a level for a node. + var node = void 0, + nodeId = void 0; + var definedLevel = false; + var undefinedLevel = false; + this.lastNodeOnLevel = {}; + this.hierarchical = new HierarchicalStatus(); + + for (nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + node = this.body.nodes[nodeId]; + if (node.options.level !== undefined) { + definedLevel = true; + this.hierarchical.levels[nodeId] = node.options.level; + } else { + undefinedLevel = true; + } + } + } + + // if the user defined some levels but not all, alert and run without hierarchical layout + if (undefinedLevel === true && definedLevel === true) { + throw new Error('To use the hierarchical layout, nodes require either no predefined levels' + ' or levels have to be defined for all nodes.'); + } else { + // define levels if undefined by the users. Based on hubsize. + if (undefinedLevel === true) { + var sortMethod = this.options.hierarchical.sortMethod; + if (sortMethod === 'hubsize') { + this._determineLevelsByHubsize(); + } else if (sortMethod === 'directed') { + this._determineLevelsDirected(); + } else if (sortMethod === 'custom') { + this._determineLevelsCustomCallback(); + } + } + + // fallback for cases where there are nodes but no edges + for (var _nodeId2 in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId2)) { + this.hierarchical.ensureLevel(_nodeId2); + } + } + // check the distribution of the nodes per level. + var distribution = this._getDistribution(); + + // get the parent children relations. + this._generateMap(); + + // place the nodes on the canvas. + this._placeNodesByHierarchy(distribution); + + // condense the whitespace. + this._condenseHierarchy(); + + // shift to center so gravity does not have to do much + this._shiftToCenter(); + } + } + } + + /** + * @private + */ + + }, { + key: '_condenseHierarchy', + value: function _condenseHierarchy() { + var _this3 = this; + + // Global var in this scope to define when the movement has stopped. + var stillShifting = false; + var branches = {}; + // first we have some methods to help shifting trees around. + // the main method to shift the trees + var shiftTrees = function shiftTrees() { + var treeSizes = getTreeSizes(); + var shiftBy = 0; + for (var i = 0; i < treeSizes.length - 1; i++) { + var diff = treeSizes[i].max - treeSizes[i + 1].min; + shiftBy += diff + _this3.options.hierarchical.treeSpacing; + shiftTree(i + 1, shiftBy); + } + }; + + // shift a single tree by an offset + var shiftTree = function shiftTree(index, offset) { + var trees = _this3.hierarchical.trees; + + for (var nodeId in trees) { + if (trees.hasOwnProperty(nodeId)) { + if (trees[nodeId] === index) { + _this3.direction.shift(nodeId, offset); + } + } + } + }; + + // get the width of all trees + var getTreeSizes = function getTreeSizes() { + var treeWidths = []; + for (var i = 0; i < _this3.hierarchical.numTrees(); i++) { + treeWidths.push(_this3.direction.getTreeSize(i)); + } + return treeWidths; + }; + + // get a map of all nodes in this branch + var getBranchNodes = function getBranchNodes(source, map) { + if (map[source.id]) { + return; + } + map[source.id] = true; + if (_this3.hierarchical.childrenReference[source.id]) { + var children = _this3.hierarchical.childrenReference[source.id]; + if (children.length > 0) { + for (var i = 0; i < children.length; i++) { + getBranchNodes(_this3.body.nodes[children[i]], map); + } + } + } + }; + + // get a min max width as well as the maximum movement space it has on either sides + // we use min max terminology because width and height can interchange depending on the direction of the layout + var getBranchBoundary = function getBranchBoundary(branchMap) { + var maxLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e9; + + var minSpace = 1e9; + var maxSpace = 1e9; + var min = 1e9; + var max = -1e9; + for (var branchNode in branchMap) { + if (branchMap.hasOwnProperty(branchNode)) { + var node = _this3.body.nodes[branchNode]; + var level = _this3.hierarchical.levels[node.id]; + var position = _this3.direction.getPosition(node); + + // get the space around the node. + + var _getSpaceAroundNode2 = _this3._getSpaceAroundNode(node, branchMap), + _getSpaceAroundNode3 = (0, _slicedToArray3['default'])(_getSpaceAroundNode2, 2), + minSpaceNode = _getSpaceAroundNode3[0], + maxSpaceNode = _getSpaceAroundNode3[1]; + + minSpace = Math.min(minSpaceNode, minSpace); + maxSpace = Math.min(maxSpaceNode, maxSpace); + + // the width is only relevant for the levels two nodes have in common. This is why we filter on this. + if (level <= maxLevel) { + min = Math.min(position, min); + max = Math.max(position, max); + } + } + } + + return [min, max, minSpace, maxSpace]; + }; + + // check what the maximum level is these nodes have in common. + var getCollisionLevel = function getCollisionLevel(node1, node2) { + var maxLevel1 = _this3.hierarchical.getMaxLevel(node1.id); + var maxLevel2 = _this3.hierarchical.getMaxLevel(node2.id); + return Math.min(maxLevel1, maxLevel2); + }; + + /** + * Condense elements. These can be nodes or branches depending on the callback. + * + * @param {function} callback + * @param {Array.} levels + * @param {*} centerParents + */ + var shiftElementsCloser = function shiftElementsCloser(callback, levels, centerParents) { + var hier = _this3.hierarchical; + + for (var i = 0; i < levels.length; i++) { + var level = levels[i]; + var levelNodes = hier.distributionOrdering[level]; + if (levelNodes.length > 1) { + for (var j = 0; j < levelNodes.length - 1; j++) { + var node1 = levelNodes[j]; + var node2 = levelNodes[j + 1]; + + // NOTE: logic maintained as it was; if nodes have same ancestor, + // then of course they are in the same sub-network. + if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2)) { + callback(node1, node2, centerParents); + } + } + } + } + }; + + // callback for shifting branches + var branchShiftCallback = function branchShiftCallback(node1, node2) { + var centerParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + //window.CALLBACKS.push(() => { + var pos1 = _this3.direction.getPosition(node1); + var pos2 = _this3.direction.getPosition(node2); + var diffAbs = Math.abs(pos2 - pos1); + var nodeSpacing = _this3.options.hierarchical.nodeSpacing; + //console.log("NOW CHECKING:", node1.id, node2.id, diffAbs); + if (diffAbs > nodeSpacing) { + var branchNodes1 = {}; + var branchNodes2 = {}; + + getBranchNodes(node1, branchNodes1); + getBranchNodes(node2, branchNodes2); + + // check the largest distance between the branches + var maxLevel = getCollisionLevel(node1, node2); + var branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel); + var branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel); + var max1 = branchNodeBoundary1[1]; + var min2 = branchNodeBoundary2[0]; + var minSpace2 = branchNodeBoundary2[2]; + + //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id, + // getBranchBoundary(branchNodes2, maxLevel), maxLevel); + var diffBranch = Math.abs(max1 - min2); + if (diffBranch > nodeSpacing) { + var offset = max1 - min2 + nodeSpacing; + if (offset < -minSpace2 + nodeSpacing) { + offset = -minSpace2 + nodeSpacing; + //console.log("RESETTING OFFSET", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset); + } + if (offset < 0) { + //console.log("SHIFTING", node2.id, offset); + _this3._shiftBlock(node2.id, offset); + stillShifting = true; + + if (centerParent === true) _this3._centerParent(node2); + } + } + } + //this.body.emitter.emit("_redraw");}) + }; + + var minimizeEdgeLength = function minimizeEdgeLength(iterations, node) { + //window.CALLBACKS.push(() => { + // console.log("ts",node.id); + var nodeId = node.id; + var allEdges = node.edges; + var nodeLevel = _this3.hierarchical.levels[node.id]; + + // gather constants + var C2 = _this3.options.hierarchical.levelSeparation * _this3.options.hierarchical.levelSeparation; + var referenceNodes = {}; + var aboveEdges = []; + for (var i = 0; i < allEdges.length; i++) { + var edge = allEdges[i]; + if (edge.toId != edge.fromId) { + var otherNode = edge.toId == nodeId ? edge.from : edge.to; + referenceNodes[allEdges[i].id] = otherNode; + if (_this3.hierarchical.levels[otherNode.id] < nodeLevel) { + aboveEdges.push(edge); + } + } + } + + // differentiated sum of lengths based on only moving one node over one axis + var getFx = function getFx(point, edges) { + var sum = 0; + for (var _i2 = 0; _i2 < edges.length; _i2++) { + if (referenceNodes[edges[_i2].id] !== undefined) { + var a = _this3.direction.getPosition(referenceNodes[edges[_i2].id]) - point; + sum += a / Math.sqrt(a * a + C2); + } + } + return sum; + }; + + // doubly differentiated sum of lengths based on only moving one node over one axis + var getDFx = function getDFx(point, edges) { + var sum = 0; + for (var _i3 = 0; _i3 < edges.length; _i3++) { + if (referenceNodes[edges[_i3].id] !== undefined) { + var a = _this3.direction.getPosition(referenceNodes[edges[_i3].id]) - point; + sum -= C2 * Math.pow(a * a + C2, -1.5); + } + } + return sum; + }; + + var getGuess = function getGuess(iterations, edges) { + var guess = _this3.direction.getPosition(node); + // Newton's method for optimization + var guessMap = {}; + for (var _i4 = 0; _i4 < iterations; _i4++) { + var fx = getFx(guess, edges); + var dfx = getDFx(guess, edges); + + // we limit the movement to avoid instability. + var limit = 40; + var ratio = Math.max(-limit, Math.min(limit, Math.round(fx / dfx))); + guess = guess - ratio; + // reduce duplicates + if (guessMap[guess] !== undefined) { + break; + } + guessMap[guess] = _i4; + } + return guess; + }; + + var moveBranch = function moveBranch(guess) { + // position node if there is space + var nodePosition = _this3.direction.getPosition(node); + + // check movable area of the branch + if (branches[node.id] === undefined) { + var branchNodes = {}; + getBranchNodes(node, branchNodes); + branches[node.id] = branchNodes; + } + var branchBoundary = getBranchBoundary(branches[node.id]); + var minSpaceBranch = branchBoundary[2]; + var maxSpaceBranch = branchBoundary[3]; + + var diff = guess - nodePosition; + + // check if we are allowed to move the node: + var branchOffset = 0; + if (diff > 0) { + branchOffset = Math.min(diff, maxSpaceBranch - _this3.options.hierarchical.nodeSpacing); + } else if (diff < 0) { + branchOffset = -Math.min(-diff, minSpaceBranch - _this3.options.hierarchical.nodeSpacing); + } + + if (branchOffset != 0) { + //console.log("moving branch:",branchOffset, maxSpaceBranch, minSpaceBranch) + _this3._shiftBlock(node.id, branchOffset); + //this.body.emitter.emit("_redraw"); + stillShifting = true; + } + }; + + var moveNode = function moveNode(guess) { + var nodePosition = _this3.direction.getPosition(node); + + // position node if there is space + + var _getSpaceAroundNode4 = _this3._getSpaceAroundNode(node), + _getSpaceAroundNode5 = (0, _slicedToArray3['default'])(_getSpaceAroundNode4, 2), + minSpace = _getSpaceAroundNode5[0], + maxSpace = _getSpaceAroundNode5[1]; + + var diff = guess - nodePosition; + // check if we are allowed to move the node: + var newPosition = nodePosition; + if (diff > 0) { + newPosition = Math.min(nodePosition + (maxSpace - _this3.options.hierarchical.nodeSpacing), guess); + } else if (diff < 0) { + newPosition = Math.max(nodePosition - (minSpace - _this3.options.hierarchical.nodeSpacing), guess); + } + + if (newPosition !== nodePosition) { + //console.log("moving Node:",diff, minSpace, maxSpace); + _this3.direction.setPosition(node, newPosition); + //this.body.emitter.emit("_redraw"); + stillShifting = true; + } + }; + + var guess = getGuess(iterations, aboveEdges); + moveBranch(guess); + guess = getGuess(iterations, allEdges); + moveNode(guess); + //}) + }; + + // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + var minimizeEdgeLengthBottomUp = function minimizeEdgeLengthBottomUp(iterations) { + var levels = _this3.hierarchical.getLevels(); + levels = levels.reverse(); + for (var i = 0; i < iterations; i++) { + stillShifting = false; + for (var j = 0; j < levels.length; j++) { + var level = levels[j]; + var levelNodes = _this3.hierarchical.distributionOrdering[level]; + for (var k = 0; k < levelNodes.length; k++) { + minimizeEdgeLength(1000, levelNodes[k]); + } + } + if (stillShifting !== true) { + //console.log("FINISHED minimizeEdgeLengthBottomUp IN " + i); + break; + } + } + }; + + // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + var shiftBranchesCloserBottomUp = function shiftBranchesCloserBottomUp(iterations) { + var levels = _this3.hierarchical.getLevels(); + levels = levels.reverse(); + for (var i = 0; i < iterations; i++) { + stillShifting = false; + shiftElementsCloser(branchShiftCallback, levels, true); + if (stillShifting !== true) { + //console.log("FINISHED shiftBranchesCloserBottomUp IN " + (i+1)); + break; + } + } + }; + + // center all parents + var centerAllParents = function centerAllParents() { + for (var nodeId in _this3.body.nodes) { + if (_this3.body.nodes.hasOwnProperty(nodeId)) _this3._centerParent(_this3.body.nodes[nodeId]); + } + }; + + // center all parents + var centerAllParentsBottomUp = function centerAllParentsBottomUp() { + var levels = _this3.hierarchical.getLevels(); + levels = levels.reverse(); + for (var i = 0; i < levels.length; i++) { + var level = levels[i]; + var levelNodes = _this3.hierarchical.distributionOrdering[level]; + for (var j = 0; j < levelNodes.length; j++) { + _this3._centerParent(levelNodes[j]); + } + } + }; + + // the actual work is done here. + if (this.options.hierarchical.blockShifting === true) { + shiftBranchesCloserBottomUp(5); + centerAllParents(); + } + + // minimize edge length + if (this.options.hierarchical.edgeMinimization === true) { + minimizeEdgeLengthBottomUp(20); + } + + if (this.options.hierarchical.parentCentralization === true) { + centerAllParentsBottomUp(); + } + + shiftTrees(); + } + + /** + * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map. + * This is used to only get the distances to nodes outside of a branch. + * @param {Node} node + * @param {{Node.id: vis.Node}} map + * @returns {number[]} + * @private + */ + + }, { + key: '_getSpaceAroundNode', + value: function _getSpaceAroundNode(node, map) { + var useMap = true; + if (map === undefined) { + useMap = false; + } + var level = this.hierarchical.levels[node.id]; + if (level !== undefined) { + var index = this.hierarchical.distributionIndex[node.id]; + var position = this.direction.getPosition(node); + var ordering = this.hierarchical.distributionOrdering[level]; + var minSpace = 1e9; + var maxSpace = 1e9; + if (index !== 0) { + var prevNode = ordering[index - 1]; + if (useMap === true && map[prevNode.id] === undefined || useMap === false) { + var prevPos = this.direction.getPosition(prevNode); + minSpace = position - prevPos; + } + } + + if (index != ordering.length - 1) { + var nextNode = ordering[index + 1]; + if (useMap === true && map[nextNode.id] === undefined || useMap === false) { + var nextPos = this.direction.getPosition(nextNode); + maxSpace = Math.min(maxSpace, nextPos - position); + } + } + + return [minSpace, maxSpace]; + } else { + return [0, 0]; + } + } + + /** + * We use this method to center a parent node and check if it does not cross other nodes when it does. + * @param {Node} node + * @private + */ + + }, { + key: '_centerParent', + value: function _centerParent(node) { + if (this.hierarchical.parentReference[node.id]) { + var parents = this.hierarchical.parentReference[node.id]; + for (var i = 0; i < parents.length; i++) { + var parentId = parents[i]; + var parentNode = this.body.nodes[parentId]; + var children = this.hierarchical.childrenReference[parentId]; + + if (children !== undefined) { + // get the range of the children + var newPosition = this._getCenterPosition(children); + + var position = this.direction.getPosition(parentNode); + + var _getSpaceAroundNode6 = this._getSpaceAroundNode(parentNode), + _getSpaceAroundNode7 = (0, _slicedToArray3['default'])(_getSpaceAroundNode6, 2), + minSpace = _getSpaceAroundNode7[0], + maxSpace = _getSpaceAroundNode7[1]; + + var diff = position - newPosition; + if (diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing || diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing) { + this.direction.setPosition(parentNode, newPosition); + } + } + } + } + } + + /** + * This function places the nodes on the canvas based on the hierarchial distribution. + * + * @param {Object} distribution | obtained by the function this._getDistribution() + * @private + */ + + }, { + key: '_placeNodesByHierarchy', + value: function _placeNodesByHierarchy(distribution) { + this.positionedNodes = {}; + // start placing all the level 0 nodes first. Then recursively position their branches. + for (var level in distribution) { + if (distribution.hasOwnProperty(level)) { + // sort nodes in level by position: + var nodeArray = (0, _keys2['default'])(distribution[level]); + nodeArray = this._indexArrayToNodes(nodeArray); + this.direction.sort(nodeArray); + var handledNodeCount = 0; + + for (var i = 0; i < nodeArray.length; i++) { + var node = nodeArray[i]; + if (this.positionedNodes[node.id] === undefined) { + var spacing = this.options.hierarchical.nodeSpacing; + var pos = spacing * handledNodeCount; + // We get the X or Y values we need and store them in pos and previousPos. + // The get and set make sure we get X or Y + if (handledNodeCount > 0) { + pos = this.direction.getPosition(nodeArray[i - 1]) + spacing; + } + this.direction.setPosition(node, pos, level); + this._validatePositionAndContinue(node, level, pos); + + handledNodeCount++; + } + } + } + } + } + + /** + * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes + * on a X position that ensures there will be no overlap. + * + * @param {Node.id} parentId + * @param {number} parentLevel + * @private + */ + + }, { + key: '_placeBranchNodes', + value: function _placeBranchNodes(parentId, parentLevel) { + var childRef = this.hierarchical.childrenReference[parentId]; + + // if this is not a parent, cancel the placing. This can happen with multiple parents to one child. + if (childRef === undefined) { + return; + } + + // get a list of childNodes + var childNodes = []; + for (var i = 0; i < childRef.length; i++) { + childNodes.push(this.body.nodes[childRef[i]]); + } + + // use the positions to order the nodes. + this.direction.sort(childNodes); + + // position the childNodes + for (var _i5 = 0; _i5 < childNodes.length; _i5++) { + var childNode = childNodes[_i5]; + var childNodeLevel = this.hierarchical.levels[childNode.id]; + // check if the child node is below the parent node and if it has already been positioned. + if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) { + // get the amount of space required for this node. If parent the width is based on the amount of children. + var spacing = this.options.hierarchical.nodeSpacing; + var pos = void 0; + + // we get the X or Y values we need and store them in pos and previousPos. + // The get and set make sure we get X or Y + if (_i5 === 0) { + pos = this.direction.getPosition(this.body.nodes[parentId]); + } else { + pos = this.direction.getPosition(childNodes[_i5 - 1]) + spacing; + } + this.direction.setPosition(childNode, pos, childNodeLevel); + this._validatePositionAndContinue(childNode, childNodeLevel, pos); + } else { + return; + } + } + + // center the parent nodes. + var center = this._getCenterPosition(childNodes); + this.direction.setPosition(this.body.nodes[parentId], center, parentLevel); + } + + /** + * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes. + * Finally it will call _placeBranchNodes to place the branch nodes. + * @param {Node} node + * @param {number} level + * @param {number} pos + * @private + */ + + }, { + key: '_validatePositionAndContinue', + value: function _validatePositionAndContinue(node, level, pos) { + // This method only works for formal trees and formal forests + // Early exit if this is not the case + if (!this.hierarchical.isTree) return; + + // if overlap has been detected, we shift the branch + if (this.lastNodeOnLevel[level] !== undefined) { + var previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]); + if (pos - previousPos < this.options.hierarchical.nodeSpacing) { + var diff = previousPos + this.options.hierarchical.nodeSpacing - pos; + var sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id); + this._shiftBlock(sharedParent.withChild, diff); + } + } + + this.lastNodeOnLevel[level] = node.id; // store change in position. + this.positionedNodes[node.id] = true; + this._placeBranchNodes(node.id, level); + } + + /** + * Receives an array with node indices and returns an array with the actual node references. + * Used for sorting based on node properties. + * @param {Array.} idArray + * @returns {Array.} + */ + + }, { + key: '_indexArrayToNodes', + value: function _indexArrayToNodes(idArray) { + var array = []; + for (var i = 0; i < idArray.length; i++) { + array.push(this.body.nodes[idArray[i]]); + } + return array; + } + + /** + * This function get the distribution of levels based on hubsize + * + * @returns {Object} + * @private + */ + + }, { + key: '_getDistribution', + value: function _getDistribution() { + var distribution = {}; + var nodeId = void 0, + node = void 0; + + // we fix Y because the hierarchy is vertical, + // we fix X so we do not give a node an x position for a second time. + // the fix of X is removed after the x value has been set. + for (nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + node = this.body.nodes[nodeId]; + var level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId]; + this.direction.fix(node, level); + if (distribution[level] === undefined) { + distribution[level] = {}; + } + distribution[level][nodeId] = node; + } + } + return distribution; + } + + /** + * Return the active (i.e. visible) edges for this node + * + * @param {Node} node + * @returns {Array.} Array of edge instances + * @private + */ + + }, { + key: '_getActiveEdges', + value: function _getActiveEdges(node) { + var _this4 = this; + + var result = []; + + util.forEach(node.edges, function (edge) { + if (_this4.body.edgeIndices.indexOf(edge.id) !== -1) { + result.push(edge); + } + }); + + return result; + } + + /** + * Get the hubsizes for all active nodes. + * + * @returns {number} + * @private + */ + + }, { + key: '_getHubSizes', + value: function _getHubSizes() { + var _this5 = this; + + var hubSizes = {}; + var nodeIds = this.body.nodeIndices; + + util.forEach(nodeIds, function (nodeId) { + var node = _this5.body.nodes[nodeId]; + var hubSize = _this5._getActiveEdges(node).length; + hubSizes[hubSize] = true; + }); + + // Make an array of the size sorted descending + var result = []; + util.forEach(hubSizes, function (size) { + result.push(Number(size)); + }); + + result.sort(function (a, b) { + return b - a; + }); + + return result; + } + + /** + * this function allocates nodes in levels based on the recursive branching from the largest hubs. + * + * @private + */ + + }, { + key: '_determineLevelsByHubsize', + value: function _determineLevelsByHubsize() { + var _this6 = this; + + var levelDownstream = function levelDownstream(nodeA, nodeB) { + _this6.hierarchical.levelDownstream(nodeA, nodeB); + }; + + var hubSizes = this._getHubSizes(); + + var _loop = function _loop(i) { + var hubSize = hubSizes[i]; + if (hubSize === 0) return 'break'; + + util.forEach(_this6.body.nodeIndices, function (nodeId) { + var node = _this6.body.nodes[nodeId]; + + if (hubSize === _this6._getActiveEdges(node).length) { + _this6._crawlNetwork(levelDownstream, nodeId); + } + }); + }; + + for (var i = 0; i < hubSizes.length; ++i) { + var _ret = _loop(i); + + if (_ret === 'break') break; + } + } + + /** + * TODO: release feature + * TODO: Determine if this feature is needed at all + * + * @private + */ + + }, { + key: '_determineLevelsCustomCallback', + value: function _determineLevelsCustomCallback() { + var _this7 = this; + + var minLevel = 100000; + + // TODO: this should come from options. + var customCallback = function customCallback(nodeA, nodeB, edge) {// eslint-disable-line no-unused-vars + + }; + + // TODO: perhaps move to HierarchicalStatus. + // But I currently don't see the point, this method is not used. + var levelByDirection = function levelByDirection(nodeA, nodeB, edge) { + var levelA = _this7.hierarchical.levels[nodeA.id]; + // set initial level + if (levelA === undefined) { + levelA = _this7.hierarchical.levels[nodeA.id] = minLevel; + } + + var diff = customCallback(NetworkUtil.cloneOptions(nodeA, 'node'), NetworkUtil.cloneOptions(nodeB, 'node'), NetworkUtil.cloneOptions(edge, 'edge')); + + _this7.hierarchical.levels[nodeB.id] = levelA + diff; + }; + + this._crawlNetwork(levelByDirection); + this.hierarchical.setMinLevelToZero(this.body.nodes); + } + + /** + * Allocate nodes in levels based on the direction of the edges. + * + * @private + */ + + }, { + key: '_determineLevelsDirected', + value: function _determineLevelsDirected() { + var _this8 = this; + + var minLevel = 10000; + + /** + * Check if there is an edge going the opposite direction for given edge + * + * @param {Edge} edge edge to check + * @returns {boolean} true if there's another edge going into the opposite direction + */ + var isBidirectional = function isBidirectional(edge) { + util.forEach(_this8.body.edges, function (otherEdge) { + if (otherEdge.toId === edge.fromId && otherEdge.fromId === edge.toId) { + return true; + } + }); + + return false; + }; + + var levelByDirection = function levelByDirection(nodeA, nodeB, edge) { + var levelA = _this8.hierarchical.levels[nodeA.id]; + var levelB = _this8.hierarchical.levels[nodeB.id]; + + if (isBidirectional(edge) && levelA !== undefined && levelB !== undefined) { + // Don't redo the level determination if already done in this case. + return; + } + + // set initial level + if (levelA === undefined) { + levelA = _this8.hierarchical.levels[nodeA.id] = minLevel; + } + if (edge.toId == nodeB.id) { + _this8.hierarchical.levels[nodeB.id] = levelA + 1; + } else { + _this8.hierarchical.levels[nodeB.id] = levelA - 1; + } + }; + + this._crawlNetwork(levelByDirection); + this.hierarchical.setMinLevelToZero(this.body.nodes); + } + + /** + * Update the bookkeeping of parent and child. + * @private + */ + + }, { + key: '_generateMap', + value: function _generateMap() { + var _this9 = this; + + var fillInRelations = function fillInRelations(parentNode, childNode) { + if (_this9.hierarchical.levels[childNode.id] > _this9.hierarchical.levels[parentNode.id]) { + _this9.hierarchical.addRelation(parentNode.id, childNode.id); + } + }; + + this._crawlNetwork(fillInRelations); + this.hierarchical.checkIfTree(); + } + + /** + * Crawl over the entire network and use a callback on each node couple that is connected to each other. + * @param {function} [callback=function(){}] | will receive nodeA, nodeB and the connecting edge. A and B are distinct. + * @param {Node.id} startingNodeId + * @private + */ + + }, { + key: '_crawlNetwork', + value: function _crawlNetwork() { + var _this10 = this; + + var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; + var startingNodeId = arguments[1]; + + var progress = {}; + + var crawler = function crawler(node, tree) { + if (progress[node.id] === undefined) { + _this10.hierarchical.setTreeIndex(node, tree); + + progress[node.id] = true; + var childNode = void 0; + var edges = _this10._getActiveEdges(node); + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + if (edge.connected === true) { + if (edge.toId == node.id) { + // Not '===' because id's can be string and numeric + childNode = edge.from; + } else { + childNode = edge.to; + } + + if (node.id != childNode.id) { + // Not '!==' because id's can be string and numeric + callback(node, childNode, edge); + crawler(childNode, tree); + } + } + } + } + }; + + if (startingNodeId === undefined) { + // Crawl over all nodes + var treeIndex = 0; // Serves to pass a unique id for the current distinct tree + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var nodeId = this.body.nodeIndices[i]; + + if (progress[nodeId] === undefined) { + var node = this.body.nodes[nodeId]; + crawler(node, treeIndex); + treeIndex += 1; + } + } + } else { + // Crawl from the given starting node + var _node2 = this.body.nodes[startingNodeId]; + if (_node2 === undefined) { + console.error("Node not found:", startingNodeId); + return; + } + crawler(_node2); + } + } + + /** + * Shift a branch a certain distance + * @param {Node.id} parentId + * @param {number} diff + * @private + */ + + }, { + key: '_shiftBlock', + value: function _shiftBlock(parentId, diff) { + var _this11 = this; + + var progress = {}; + var shifter = function shifter(parentId) { + if (progress[parentId]) { + return; + } + progress[parentId] = true; + _this11.direction.shift(parentId, diff); + + var childRef = _this11.hierarchical.childrenReference[parentId]; + if (childRef !== undefined) { + for (var i = 0; i < childRef.length; i++) { + shifter(childRef[i]); + } + } + }; + shifter(parentId); + } + + /** + * Find a common parent between branches. + * @param {Node.id} childA + * @param {Node.id} childB + * @returns {{foundParent, withChild}} + * @private + */ + + }, { + key: '_findCommonParent', + value: function _findCommonParent(childA, childB) { + var _this12 = this; + + var parents = {}; + var iterateParents = function iterateParents(parents, child) { + var parentRef = _this12.hierarchical.parentReference[child]; + if (parentRef !== undefined) { + for (var i = 0; i < parentRef.length; i++) { + var parent = parentRef[i]; + parents[parent] = true; + iterateParents(parents, parent); + } + } + }; + var findParent = function findParent(parents, child) { + var parentRef = _this12.hierarchical.parentReference[child]; + if (parentRef !== undefined) { + for (var i = 0; i < parentRef.length; i++) { + var parent = parentRef[i]; + if (parents[parent] !== undefined) { + return { foundParent: parent, withChild: child }; + } + var branch = findParent(parents, parent); + if (branch.foundParent !== null) { + return branch; + } + } + } + return { foundParent: null, withChild: child }; + }; + + iterateParents(parents, childA); + return findParent(parents, childB); + } + + /** + * Set the strategy pattern for handling the coordinates given the current direction. + * + * The individual instances contain all the operations and data specific to a layout direction. + * + * @param {Node} node + * @param {{x: number, y: number}} position + * @param {number} level + * @param {boolean} [doNotUpdate=false] + * @private + */ + + }, { + key: 'setDirectionStrategy', + value: function setDirectionStrategy() { + var isVertical = this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU'; + + if (isVertical) { + this.direction = new VerticalStrategy(this); + } else { + this.direction = new HorizontalStrategy(this); + } + } + + /** + * Determine the center position of a branch from the passed list of child nodes + * + * This takes into account the positions of all the child nodes. + * @param {Array.} childNodes Array of either child nodes or node id's + * @return {number} + * @private + */ + + }, { + key: '_getCenterPosition', + value: function _getCenterPosition(childNodes) { + var minPos = 1e9; + var maxPos = -1e9; + + for (var i = 0; i < childNodes.length; i++) { + var childNode = void 0; + if (childNodes[i].id !== undefined) { + childNode = childNodes[i]; + } else { + var childNodeId = childNodes[i]; + childNode = this.body.nodes[childNodeId]; + } + + var position = this.direction.getPosition(childNode); + minPos = Math.min(minPos, position); + maxPos = Math.max(maxPos, position); + } + + return 0.5 * (minPos + maxPos); + } + }]); + return LayoutEngine; +}(); + +exports['default'] = LayoutEngine; + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.VerticalStrategy = exports.HorizontalStrategy = undefined; + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * Helper classes for LayoutEngine. + * + * Strategy pattern for usage of direction methods for hierarchical layouts. + */ + +/** + * Interface definition for direction strategy classes. + * + * This class describes the interface for the Strategy + * pattern classes used to differentiate horizontal and vertical + * direction of hierarchical results. + * + * For a given direction, one coordinate will be 'fixed', meaning that it is + * determined by level. + * The other coordinate is 'unfixed', meaning that the nodes on a given level + * can still move along that coordinate. So: + * + * - `vertical` layout: `x` unfixed, `y` fixed per level + * - `horizontal` layout: `x` fixed per level, `y` unfixed + * + * The local methods are stubs and should be regarded as abstract. + * Derived classes **must** implement all the methods themselves. + * + * @private + */ +var DirectionInterface = function () { + function DirectionInterface() { + (0, _classCallCheck3['default'])(this, DirectionInterface); + } + + (0, _createClass3['default'])(DirectionInterface, [{ + key: 'abstract', + + /** @ignore **/ + value: function abstract() { + throw new Error("Can't instantiate abstract class!"); + } + + /** + * This is a dummy call which is used to suppress the jsdoc errors of type: + * + * "'param' is assigned a value but never used" + * + * @ignore + **/ + + }, { + key: 'fake_use', + value: function fake_use() {} + // Do nothing special + + + /** + * Type to use to translate dynamic curves to, in the case of hierarchical layout. + * Dynamic curves do not work for these. + * + * The value should be perpendicular to the actual direction of the layout. + * + * @return {string} Direction, either 'vertical' or 'horizontal' + */ + + }, { + key: 'curveType', + value: function curveType() { + return this.abstract(); + } + + /** + * Return the value of the coordinate that is not fixed for this direction. + * + * @param {Node} node The node to read + * @return {number} Value of the unfixed coordinate + */ + + }, { + key: 'getPosition', + value: function getPosition(node) { + this.fake_use(node);return this.abstract(); + } + + /** + * Set the value of the coordinate that is not fixed for this direction. + * + * @param {Node} node The node to adjust + * @param {number} position + * @param {number} [level] if specified, the hierarchy level that this node should be fixed to + */ + + }, { + key: 'setPosition', + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + this.fake_use(node, position, level);this.abstract(); + } + + /** + * Get the width of a tree. + * + * A `tree` here is a subset of nodes within the network which are not connected to other nodes, + * only among themselves. In essence, it is a sub-network. + * + * @param {number} index The index number of a tree + * @return {number} the width of a tree in the view coordinates + */ + + }, { + key: 'getTreeSize', + value: function getTreeSize(index) { + this.fake_use(index);return this.abstract(); + } + + /** + * Sort array of nodes on the unfixed coordinates. + * + * @param {Array.} nodeArray array of nodes to sort + */ + + }, { + key: 'sort', + value: function sort(nodeArray) { + this.fake_use(nodeArray);this.abstract(); + } + + /** + * Assign the fixed coordinate of the node to the given level + * + * @param {Node} node The node to adjust + * @param {number} level The level to fix to + */ + + }, { + key: 'fix', + value: function fix(node, level) { + this.fake_use(node, level);this.abstract(); + } + + /** + * Add an offset to the unfixed coordinate of the given node. + * + * @param {NodeId} nodeId Id of the node to adjust + * @param {number} diff Offset to add to the unfixed coordinate + */ + + }, { + key: 'shift', + value: function shift(nodeId, diff) { + this.fake_use(nodeId, diff);this.abstract(); + } + }]); + return DirectionInterface; +}(); + +/** + * Vertical Strategy + * + * Coordinate `y` is fixed on levels, coordinate `x` is unfixed. + * + * @extends DirectionInterface + * @private + */ + + +var VerticalStrategy = function (_DirectionInterface) { + (0, _inherits3['default'])(VerticalStrategy, _DirectionInterface); + + /** + * Constructor + * + * @param {Object} layout reference to the parent LayoutEngine instance. + */ + function VerticalStrategy(layout) { + (0, _classCallCheck3['default'])(this, VerticalStrategy); + + var _this = (0, _possibleConstructorReturn3['default'])(this, (VerticalStrategy.__proto__ || (0, _getPrototypeOf2['default'])(VerticalStrategy)).call(this)); + + _this.layout = layout; + return _this; + } + + /** @inheritdoc */ + + + (0, _createClass3['default'])(VerticalStrategy, [{ + key: 'curveType', + value: function curveType() { + return 'horizontal'; + } + + /** @inheritdoc */ + + }, { + key: 'getPosition', + value: function getPosition(node) { + return node.x; + } + + /** @inheritdoc */ + + }, { + key: 'setPosition', + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + + if (level !== undefined) { + this.layout.hierarchical.addToOrdering(node, level); + } + node.x = position; + } + + /** @inheritdoc */ + + }, { + key: 'getTreeSize', + value: function getTreeSize(index) { + var res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index); + return { min: res.min_x, max: res.max_x }; + } + + /** @inheritdoc */ + + }, { + key: 'sort', + value: function sort(nodeArray) { + nodeArray.sort(function (a, b) { + // Test on 'undefined' takes care of divergent behaviour in chrome + if (a.x === undefined || b.x === undefined) return 0; // THIS HAPPENS + return a.x - b.x; + }); + } + + /** @inheritdoc */ + + }, { + key: 'fix', + value: function fix(node, level) { + node.y = this.layout.options.hierarchical.levelSeparation * level; + node.options.fixed.y = true; + } + + /** @inheritdoc */ + + }, { + key: 'shift', + value: function shift(nodeId, diff) { + this.layout.body.nodes[nodeId].x += diff; + } + }]); + return VerticalStrategy; +}(DirectionInterface); + +/** + * Horizontal Strategy + * + * Coordinate `x` is fixed on levels, coordinate `y` is unfixed. + * + * @extends DirectionInterface + * @private + */ + + +var HorizontalStrategy = function (_DirectionInterface2) { + (0, _inherits3['default'])(HorizontalStrategy, _DirectionInterface2); + + /** + * Constructor + * + * @param {Object} layout reference to the parent LayoutEngine instance. + */ + function HorizontalStrategy(layout) { + (0, _classCallCheck3['default'])(this, HorizontalStrategy); + + var _this2 = (0, _possibleConstructorReturn3['default'])(this, (HorizontalStrategy.__proto__ || (0, _getPrototypeOf2['default'])(HorizontalStrategy)).call(this)); + + _this2.layout = layout; + return _this2; + } + + /** @inheritdoc */ + + + (0, _createClass3['default'])(HorizontalStrategy, [{ + key: 'curveType', + value: function curveType() { + return 'vertical'; + } + + /** @inheritdoc */ + + }, { + key: 'getPosition', + value: function getPosition(node) { + return node.y; + } + + /** @inheritdoc */ + + }, { + key: 'setPosition', + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + + if (level !== undefined) { + this.layout.hierarchical.addToOrdering(node, level); + } + node.y = position; + } + + /** @inheritdoc */ + + }, { + key: 'getTreeSize', + value: function getTreeSize(index) { + var res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index); + return { min: res.min_y, max: res.max_y }; + } + + /** @inheritdoc */ + + }, { + key: 'sort', + value: function sort(nodeArray) { + nodeArray.sort(function (a, b) { + // Test on 'undefined' takes care of divergent behaviour in chrome + if (a.y === undefined || b.y === undefined) return 0; // THIS HAPPENS + return a.y - b.y; + }); + } + + /** @inheritdoc */ + + }, { + key: 'fix', + value: function fix(node, level) { + node.x = this.layout.options.hierarchical.levelSeparation * level; + node.options.fixed.x = true; + } + + /** @inheritdoc */ + + }, { + key: 'shift', + value: function shift(nodeId, diff) { + this.layout.body.nodes[nodeId].y += diff; + } + }]); + return HorizontalStrategy; +}(DirectionInterface); + +exports.HorizontalStrategy = HorizontalStrategy; +exports.VerticalStrategy = VerticalStrategy; + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(8); + +var _keys2 = _interopRequireDefault(_keys); + +var _stringify = __webpack_require__(19); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _typeof2 = __webpack_require__(6); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var util = __webpack_require__(2); +var Hammer = __webpack_require__(10); +var hammerUtil = __webpack_require__(37); + +/** + * Clears the toolbar div element of children + * + * @private + */ + +var ManipulationSystem = function () { + /** + * @param {Object} body + * @param {Canvas} canvas + * @param {SelectionHandler} selectionHandler + */ + function ManipulationSystem(body, canvas, selectionHandler) { + var _this = this; + + (0, _classCallCheck3['default'])(this, ManipulationSystem); + + this.body = body; + this.canvas = canvas; + this.selectionHandler = selectionHandler; + + this.editMode = false; + this.manipulationDiv = undefined; + this.editModeDiv = undefined; + this.closeDiv = undefined; + + this.manipulationHammers = []; + this.temporaryUIFunctions = {}; + this.temporaryEventFunctions = []; + + this.touchTime = 0; + this.temporaryIds = { nodes: [], edges: [] }; + this.guiEnabled = false; + this.inMode = false; + this.selectedControlNode = undefined; + + this.options = {}; + this.defaultOptions = { + enabled: false, + initiallyActive: false, + addNode: true, + addEdge: true, + editNode: undefined, + editEdge: true, + deleteNode: true, + deleteEdge: true, + controlNodeStyle: { + shape: 'dot', + size: 6, + color: { background: '#ff0000', border: '#3c3c3c', highlight: { background: '#07f968', border: '#3c3c3c' } }, + borderWidth: 2, + borderWidthSelected: 2 + } + }; + util.extend(this.options, this.defaultOptions); + + this.body.emitter.on('destroy', function () { + _this._clean(); + }); + this.body.emitter.on('_dataChanged', this._restore.bind(this)); + this.body.emitter.on('_resetData', this._restore.bind(this)); + } + + /** + * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes. + * @private + */ + + + (0, _createClass3['default'])(ManipulationSystem, [{ + key: '_restore', + value: function _restore() { + if (this.inMode !== false) { + if (this.options.initiallyActive === true) { + this.enableEditMode(); + } else { + this.disableEditMode(); + } + } + } + + /** + * Set the Options + * + * @param {Object} options + * @param {Object} allOptions + * @param {Object} globalOptions + */ + + }, { + key: 'setOptions', + value: function setOptions(options, allOptions, globalOptions) { + if (allOptions !== undefined) { + if (allOptions.locale !== undefined) { + this.options.locale = allOptions.locale; + } else { + this.options.locale = globalOptions.locale; + } + if (allOptions.locales !== undefined) { + this.options.locales = allOptions.locales; + } else { + this.options.locales = globalOptions.locales; + } + } + + if (options !== undefined) { + if (typeof options === 'boolean') { + this.options.enabled = options; + } else { + this.options.enabled = true; + util.deepExtend(this.options, options); + } + if (this.options.initiallyActive === true) { + this.editMode = true; + } + this._setup(); + } + } + + /** + * Enable or disable edit-mode. Draws the DOM required and cleans up after itself. + * + * @private + */ + + }, { + key: 'toggleEditMode', + value: function toggleEditMode() { + if (this.editMode === true) { + this.disableEditMode(); + } else { + this.enableEditMode(); + } + } + + /** + * Enables Edit Mode + */ + + }, { + key: 'enableEditMode', + value: function enableEditMode() { + this.editMode = true; + + this._clean(); + if (this.guiEnabled === true) { + this.manipulationDiv.style.display = 'block'; + this.closeDiv.style.display = 'block'; + this.editModeDiv.style.display = 'none'; + this.showManipulatorToolbar(); + } + } + + /** + * Disables Edit Mode + */ + + }, { + key: 'disableEditMode', + value: function disableEditMode() { + this.editMode = false; + + this._clean(); + if (this.guiEnabled === true) { + this.manipulationDiv.style.display = 'none'; + this.closeDiv.style.display = 'none'; + this.editModeDiv.style.display = 'block'; + this._createEditButton(); + } + } + + /** + * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar. + * + * @private + */ + + }, { + key: 'showManipulatorToolbar', + value: function showManipulatorToolbar() { + // restore the state of any bound functions or events, remove control nodes, restore physics + this._clean(); + + // reset global variables + this.manipulationDOM = {}; + + // if the gui is enabled, draw all elements. + if (this.guiEnabled === true) { + // a _restore will hide these menus + this.editMode = true; + this.manipulationDiv.style.display = 'block'; + this.closeDiv.style.display = 'block'; + + var selectedNodeCount = this.selectionHandler._getSelectedNodeCount(); + var selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount(); + var selectedTotalCount = selectedNodeCount + selectedEdgeCount; + var locale = this.options.locales[this.options.locale]; + var needSeperator = false; + + if (this.options.addNode !== false) { + this._createAddNodeButton(locale); + needSeperator = true; + } + if (this.options.addEdge !== false) { + if (needSeperator === true) { + this._createSeperator(1); + } else { + needSeperator = true; + } + this._createAddEdgeButton(locale); + } + + if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') { + if (needSeperator === true) { + this._createSeperator(2); + } else { + needSeperator = true; + } + this._createEditNodeButton(locale); + } else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) { + if (needSeperator === true) { + this._createSeperator(3); + } else { + needSeperator = true; + } + this._createEditEdgeButton(locale); + } + + // remove buttons + if (selectedTotalCount !== 0) { + if (selectedNodeCount > 0 && this.options.deleteNode !== false) { + if (needSeperator === true) { + this._createSeperator(4); + } + this._createDeleteButton(locale); + } else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) { + if (needSeperator === true) { + this._createSeperator(4); + } + this._createDeleteButton(locale); + } + } + + // bind the close button + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + + // refresh this bar based on what has been selected + this._temporaryBindEvent('select', this.showManipulatorToolbar.bind(this)); + } + + // redraw to show any possible changes + this.body.emitter.emit('_redraw'); + } + + /** + * Create the toolbar for adding Nodes + */ + + }, { + key: 'addNodeMode', + value: function addNodeMode() { + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } + + // restore the state of any bound functions or events, remove control nodes, restore physics + this._clean(); + + this.inMode = 'addNode'; + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + this._createBackButton(locale); + this._createSeperator(); + this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']); + + // bind the close button + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } + + this._temporaryBindEvent('click', this._performAddNode.bind(this)); + } + + /** + * call the bound function to handle the editing of the node. The node has to be selected. + */ + + }, { + key: 'editNode', + value: function editNode() { + var _this2 = this; + + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } + + // restore the state of any bound functions or events, remove control nodes, restore physics + this._clean(); + var node = this.selectionHandler._getSelectedNode(); + if (node !== undefined) { + this.inMode = 'editNode'; + if (typeof this.options.editNode === 'function') { + if (node.isCluster !== true) { + var data = util.deepExtend({}, node.options, false); + data.x = node.x; + data.y = node.y; + + if (this.options.editNode.length === 2) { + this.options.editNode(data, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this2.inMode === 'editNode') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this2.body.data.nodes.getDataSet().update(finalizedData); + } + _this2.showManipulatorToolbar(); + }); + } else { + throw new Error('The function for edit does not support two arguments (data, callback)'); + } + } else { + alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']); + } + } else { + throw new Error('No function has been configured to handle the editing of nodes.'); + } + } else { + this.showManipulatorToolbar(); + } + } + + /** + * create the toolbar to connect nodes + */ + + }, { + key: 'addEdgeMode', + value: function addEdgeMode() { + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } + + // restore the state of any bound functions or events, remove control nodes, restore physics + this._clean(); + + this.inMode = 'addEdge'; + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + this._createBackButton(locale); + this._createSeperator(); + this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']); + + // bind the close button + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } + + // temporarily overload functions + this._temporaryBindUI('onTouch', this._handleConnect.bind(this)); + this._temporaryBindUI('onDragEnd', this._finishConnect.bind(this)); + this._temporaryBindUI('onDrag', this._dragControlNode.bind(this)); + this._temporaryBindUI('onRelease', this._finishConnect.bind(this)); + this._temporaryBindUI('onDragStart', this._dragStartEdge.bind(this)); + this._temporaryBindUI('onHold', function () {}); + } + + /** + * create the toolbar to edit edges + */ + + }, { + key: 'editEdgeMode', + value: function editEdgeMode() { + // when using the gui, enable edit mode if it wasn't already. + if (this.editMode !== true) { + this.enableEditMode(); + } + + // restore the state of any bound functions or events, remove control nodes, restore physics + this._clean(); + + this.inMode = 'editEdge'; + if ((0, _typeof3['default'])(this.options.editEdge) === 'object' && typeof this.options.editEdge.editWithoutDrag === "function") { + this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0]; + if (this.edgeBeingEditedId !== undefined) { + var edge = this.body.edges[this.edgeBeingEditedId]; + this._performEditEdge(edge.from, edge.to); + return; + } + } + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + this._createBackButton(locale); + this._createSeperator(); + this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']); + + // bind the close button + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } + + this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0]; + if (this.edgeBeingEditedId !== undefined) { + var _edge = this.body.edges[this.edgeBeingEditedId]; + + // create control nodes + var controlNodeFrom = this._getNewTargetNode(_edge.from.x, _edge.from.y); + var controlNodeTo = this._getNewTargetNode(_edge.to.x, _edge.to.y); + + this.temporaryIds.nodes.push(controlNodeFrom.id); + this.temporaryIds.nodes.push(controlNodeTo.id); + + this.body.nodes[controlNodeFrom.id] = controlNodeFrom; + this.body.nodeIndices.push(controlNodeFrom.id); + this.body.nodes[controlNodeTo.id] = controlNodeTo; + this.body.nodeIndices.push(controlNodeTo.id); + + // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI + this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position + this._temporaryBindUI('onTap', function () {}); // disabled + this._temporaryBindUI('onHold', function () {}); // disabled + this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this)); // used to select control node + this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node + this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes + this._temporaryBindUI('onMouseMove', function () {}); // disabled + + // create function to position control nodes correctly on movement + // automatically cleaned up because we use the temporary bind + this._temporaryBindEvent('beforeDrawing', function (ctx) { + var positions = _edge.edgeType.findBorderPositions(ctx); + if (controlNodeFrom.selected === false) { + controlNodeFrom.x = positions.from.x; + controlNodeFrom.y = positions.from.y; + } + if (controlNodeTo.selected === false) { + controlNodeTo.x = positions.to.x; + controlNodeTo.y = positions.to.y; + } + }); + + this.body.emitter.emit('_redraw'); + } else { + this.showManipulatorToolbar(); + } + } + + /** + * delete everything in the selection + */ + + }, { + key: 'deleteSelected', + value: function deleteSelected() { + var _this3 = this; + + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } + + // restore the state of any bound functions or events, remove control nodes, restore physics + this._clean(); + + this.inMode = 'delete'; + var selectedNodes = this.selectionHandler.getSelectedNodes(); + var selectedEdges = this.selectionHandler.getSelectedEdges(); + var deleteFunction = undefined; + if (selectedNodes.length > 0) { + for (var i = 0; i < selectedNodes.length; i++) { + if (this.body.nodes[selectedNodes[i]].isCluster === true) { + alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']); + return; + } + } + + if (typeof this.options.deleteNode === 'function') { + deleteFunction = this.options.deleteNode; + } + } else if (selectedEdges.length > 0) { + if (typeof this.options.deleteEdge === 'function') { + deleteFunction = this.options.deleteEdge; + } + } + + if (typeof deleteFunction === 'function') { + var data = { nodes: selectedNodes, edges: selectedEdges }; + if (deleteFunction.length === 2) { + deleteFunction(data, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this3.inMode === 'delete') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this3.body.data.edges.getDataSet().remove(finalizedData.edges); + _this3.body.data.nodes.getDataSet().remove(finalizedData.nodes); + _this3.body.emitter.emit('startSimulation'); + _this3.showManipulatorToolbar(); + } else { + _this3.body.emitter.emit('startSimulation'); + _this3.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for delete does not support two arguments (data, callback)'); + } + } else { + this.body.data.edges.getDataSet().remove(selectedEdges); + this.body.data.nodes.getDataSet().remove(selectedNodes); + this.body.emitter.emit('startSimulation'); + this.showManipulatorToolbar(); + } + } + + //********************************************** PRIVATE ***************************************// + + /** + * draw or remove the DOM + * @private + */ + + }, { + key: '_setup', + value: function _setup() { + if (this.options.enabled === true) { + // Enable the GUI + this.guiEnabled = true; + + this._createWrappers(); + if (this.editMode === false) { + this._createEditButton(); + } else { + this.showManipulatorToolbar(); + } + } else { + this._removeManipulationDOM(); + + // disable the gui + this.guiEnabled = false; + } + } + + /** + * create the div overlays that contain the DOM + * @private + */ + + }, { + key: '_createWrappers', + value: function _createWrappers() { + // load the manipulator HTML elements. All styling done in css. + if (this.manipulationDiv === undefined) { + this.manipulationDiv = document.createElement('div'); + this.manipulationDiv.className = 'vis-manipulation'; + if (this.editMode === true) { + this.manipulationDiv.style.display = 'block'; + } else { + this.manipulationDiv.style.display = 'none'; + } + this.canvas.frame.appendChild(this.manipulationDiv); + } + + // container for the edit button. + if (this.editModeDiv === undefined) { + this.editModeDiv = document.createElement('div'); + this.editModeDiv.className = 'vis-edit-mode'; + if (this.editMode === true) { + this.editModeDiv.style.display = 'none'; + } else { + this.editModeDiv.style.display = 'block'; + } + this.canvas.frame.appendChild(this.editModeDiv); + } + + // container for the close div button + if (this.closeDiv === undefined) { + this.closeDiv = document.createElement('div'); + this.closeDiv.className = 'vis-close'; + this.closeDiv.style.display = this.manipulationDiv.style.display; + this.canvas.frame.appendChild(this.closeDiv); + } + } + + /** + * generate a new target node. Used for creating new edges and editing edges + * + * @param {number} x + * @param {number} y + * @returns {Node} + * @private + */ + + }, { + key: '_getNewTargetNode', + value: function _getNewTargetNode(x, y) { + var controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle); + + controlNodeStyle.id = 'targetNode' + util.randomUUID(); + controlNodeStyle.hidden = false; + controlNodeStyle.physics = false; + controlNodeStyle.x = x; + controlNodeStyle.y = y; + + // we have to define the bounding box in order for the nodes to be drawn immediately + var node = this.body.functions.createNode(controlNodeStyle); + node.shape.boundingBox = { left: x, right: x, top: y, bottom: y }; + + return node; + } + + /** + * Create the edit button + */ + + }, { + key: '_createEditButton', + value: function _createEditButton() { + // restore everything to it's original state (if applicable) + this._clean(); + + // reset the manipulationDOM + this.manipulationDOM = {}; + + // empty the editModeDiv + util.recursiveDOMDelete(this.editModeDiv); + + // create the contents for the editMode button + var locale = this.options.locales[this.options.locale]; + var button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']); + this.editModeDiv.appendChild(button); + + // bind a hammer listener to the button, calling the function toggleEditMode. + this._bindHammerToDiv(button, this.toggleEditMode.bind(this)); + } + + /** + * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed. + * @private + */ + + }, { + key: '_clean', + value: function _clean() { + // not in mode + this.inMode = false; + + // _clean the divs + if (this.guiEnabled === true) { + util.recursiveDOMDelete(this.editModeDiv); + util.recursiveDOMDelete(this.manipulationDiv); + + // removes all the bindings and overloads + this._cleanManipulatorHammers(); + } + + // remove temporary nodes and edges + this._cleanupTemporaryNodesAndEdges(); + + // restore overloaded UI functions + this._unbindTemporaryUIs(); + + // remove the temporaryEventFunctions + this._unbindTemporaryEvents(); + + // restore the physics if required + this.body.emitter.emit('restorePhysics'); + } + + /** + * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up. + * @private + */ + + }, { + key: '_cleanManipulatorHammers', + value: function _cleanManipulatorHammers() { + // _clean hammer bindings + if (this.manipulationHammers.length != 0) { + for (var i = 0; i < this.manipulationHammers.length; i++) { + this.manipulationHammers[i].destroy(); + } + this.manipulationHammers = []; + } + } + + /** + * Remove all DOM elements created by this module. + * @private + */ + + }, { + key: '_removeManipulationDOM', + value: function _removeManipulationDOM() { + // removes all the bindings and overloads + this._clean(); + + // empty the manipulation divs + util.recursiveDOMDelete(this.manipulationDiv); + util.recursiveDOMDelete(this.editModeDiv); + util.recursiveDOMDelete(this.closeDiv); + + // remove the manipulation divs + if (this.manipulationDiv) { + this.canvas.frame.removeChild(this.manipulationDiv); + } + if (this.editModeDiv) { + this.canvas.frame.removeChild(this.editModeDiv); + } + if (this.closeDiv) { + this.canvas.frame.removeChild(this.closeDiv); + } + + // set the references to undefined + this.manipulationDiv = undefined; + this.editModeDiv = undefined; + this.closeDiv = undefined; + } + + /** + * create a seperator line. the index is to differentiate in the manipulation dom + * @param {number} [index=1] + * @private + */ + + }, { + key: '_createSeperator', + value: function _createSeperator() { + var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + + this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div'); + this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line'; + this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]); + } + + // ---------------------- DOM functions for buttons --------------------------// + + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: '_createAddNodeButton', + value: function _createAddNodeButton(locale) { + var button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']); + this.manipulationDiv.appendChild(button); + this._bindHammerToDiv(button, this.addNodeMode.bind(this)); + } + + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: '_createAddEdgeButton', + value: function _createAddEdgeButton(locale) { + var button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']); + this.manipulationDiv.appendChild(button); + this._bindHammerToDiv(button, this.addEdgeMode.bind(this)); + } + + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: '_createEditNodeButton', + value: function _createEditNodeButton(locale) { + var button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']); + this.manipulationDiv.appendChild(button); + this._bindHammerToDiv(button, this.editNode.bind(this)); + } + + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: '_createEditEdgeButton', + value: function _createEditEdgeButton(locale) { + var button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']); + this.manipulationDiv.appendChild(button); + this._bindHammerToDiv(button, this.editEdgeMode.bind(this)); + } + + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: '_createDeleteButton', + value: function _createDeleteButton(locale) { + var deleteBtnClass; + if (this.options.rtl) { + deleteBtnClass = 'vis-button vis-delete-rtl'; + } else { + deleteBtnClass = 'vis-button vis-delete'; + } + var button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']); + this.manipulationDiv.appendChild(button); + this._bindHammerToDiv(button, this.deleteSelected.bind(this)); + } + + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: '_createBackButton', + value: function _createBackButton(locale) { + var button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']); + this.manipulationDiv.appendChild(button); + this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this)); + } + + /** + * + * @param {number|string} id + * @param {string} className + * @param {label} label + * @param {string} labelClassName + * @returns {HTMLElement} + * @private + */ + + }, { + key: '_createButton', + value: function _createButton(id, className, label) { + var labelClassName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vis-label'; + + + this.manipulationDOM[id + 'Div'] = document.createElement('div'); + this.manipulationDOM[id + 'Div'].className = className; + this.manipulationDOM[id + 'Label'] = document.createElement('div'); + this.manipulationDOM[id + 'Label'].className = labelClassName; + this.manipulationDOM[id + 'Label'].innerHTML = label; + this.manipulationDOM[id + 'Div'].appendChild(this.manipulationDOM[id + 'Label']); + return this.manipulationDOM[id + 'Div']; + } + + /** + * + * @param {Label} label + * @private + */ + + }, { + key: '_createDescription', + value: function _createDescription(label) { + this.manipulationDiv.appendChild(this._createButton('description', 'vis-button vis-none', label)); + } + + // -------------------------- End of DOM functions for buttons ------------------------------// + + /** + * this binds an event until cleanup by the clean functions. + * @param {Event} event The event + * @param {function} newFunction + * @private + */ + + }, { + key: '_temporaryBindEvent', + value: function _temporaryBindEvent(event, newFunction) { + this.temporaryEventFunctions.push({ event: event, boundFunction: newFunction }); + this.body.emitter.on(event, newFunction); + } + + /** + * this overrides an UI function until cleanup by the clean function + * @param {string} UIfunctionName + * @param {function} newFunction + * @private + */ + + }, { + key: '_temporaryBindUI', + value: function _temporaryBindUI(UIfunctionName, newFunction) { + if (this.body.eventListeners[UIfunctionName] !== undefined) { + this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName]; + this.body.eventListeners[UIfunctionName] = newFunction; + } else { + throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + (0, _stringify2['default'])((0, _keys2['default'])(this.body.eventListeners))); + } + } + + /** + * Restore the overridden UI functions to their original state. + * + * @private + */ + + }, { + key: '_unbindTemporaryUIs', + value: function _unbindTemporaryUIs() { + for (var functionName in this.temporaryUIFunctions) { + if (this.temporaryUIFunctions.hasOwnProperty(functionName)) { + this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName]; + delete this.temporaryUIFunctions[functionName]; + } + } + this.temporaryUIFunctions = {}; + } + + /** + * Unbind the events created by _temporaryBindEvent + * @private + */ + + }, { + key: '_unbindTemporaryEvents', + value: function _unbindTemporaryEvents() { + for (var i = 0; i < this.temporaryEventFunctions.length; i++) { + var eventName = this.temporaryEventFunctions[i].event; + var boundFunction = this.temporaryEventFunctions[i].boundFunction; + this.body.emitter.off(eventName, boundFunction); + } + this.temporaryEventFunctions = []; + } + + /** + * Bind an hammer instance to a DOM element. + * + * @param {Element} domElement + * @param {function} boundFunction + */ + + }, { + key: '_bindHammerToDiv', + value: function _bindHammerToDiv(domElement, boundFunction) { + var hammer = new Hammer(domElement, {}); + hammerUtil.onTouch(hammer, boundFunction); + this.manipulationHammers.push(hammer); + } + + /** + * Neatly clean up temporary edges and nodes + * @private + */ + + }, { + key: '_cleanupTemporaryNodesAndEdges', + value: function _cleanupTemporaryNodesAndEdges() { + // _clean temporary edges + for (var i = 0; i < this.temporaryIds.edges.length; i++) { + this.body.edges[this.temporaryIds.edges[i]].disconnect(); + delete this.body.edges[this.temporaryIds.edges[i]]; + var indexTempEdge = this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]); + if (indexTempEdge !== -1) { + this.body.edgeIndices.splice(indexTempEdge, 1); + } + } + + // _clean temporary nodes + for (var _i = 0; _i < this.temporaryIds.nodes.length; _i++) { + delete this.body.nodes[this.temporaryIds.nodes[_i]]; + var indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[_i]); + if (indexTempNode !== -1) { + this.body.nodeIndices.splice(indexTempNode, 1); + } + } + + this.temporaryIds = { nodes: [], edges: [] }; + } + + // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------// + + /** + * the touch is used to get the position of the initial click + * @param {Event} event The event + * @private + */ + + }, { + key: '_controlNodeTouch', + value: function _controlNodeTouch(event) { + this.selectionHandler.unselectAll(); + this.lastTouch = this.body.functions.getPointer(event.center); + this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object + } + + /** + * the drag start is used to mark one of the control nodes as selected. + * @param {Event} event The event + * @private + */ + + }, { + key: '_controlNodeDragStart', + value: function _controlNodeDragStart(event) { + // eslint-disable-line no-unused-vars + var pointer = this.lastTouch; + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + var from = this.body.nodes[this.temporaryIds.nodes[0]]; + var to = this.body.nodes[this.temporaryIds.nodes[1]]; + var edge = this.body.edges[this.edgeBeingEditedId]; + this.selectedControlNode = undefined; + + var fromSelect = from.isOverlappingWith(pointerObj); + var toSelect = to.isOverlappingWith(pointerObj); + + if (fromSelect === true) { + this.selectedControlNode = from; + edge.edgeType.from = from; + } else if (toSelect === true) { + this.selectedControlNode = to; + edge.edgeType.to = to; + } + + // we use the selection to find the node that is being dragged. We explicitly select it here. + if (this.selectedControlNode !== undefined) { + this.selectionHandler.selectObject(this.selectedControlNode); + } + + this.body.emitter.emit('_redraw'); + } + + /** + * dragging the control nodes or the canvas + * @param {Event} event The event + * @private + */ + + }, { + key: '_controlNodeDrag', + value: function _controlNodeDrag(event) { + this.body.emitter.emit('disablePhysics'); + var pointer = this.body.functions.getPointer(event.center); + var pos = this.canvas.DOMtoCanvas(pointer); + if (this.selectedControlNode !== undefined) { + this.selectedControlNode.x = pos.x; + this.selectedControlNode.y = pos.y; + } else { + // if the drag was not started properly because the click started outside the network div, start it now. + var diffX = pointer.x - this.lastTouch.x; + var diffY = pointer.y - this.lastTouch.y; + this.body.view.translation = { x: this.lastTouch.translation.x + diffX, y: this.lastTouch.translation.y + diffY }; + } + this.body.emitter.emit('_redraw'); + } + + /** + * connecting or restoring the control nodes. + * @param {Event} event The event + * @private + */ + + }, { + key: '_controlNodeDragEnd', + value: function _controlNodeDragEnd(event) { + var pointer = this.body.functions.getPointer(event.center); + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + var edge = this.body.edges[this.edgeBeingEditedId]; + // if the node that was dragged is not a control node, return + if (this.selectedControlNode === undefined) { + return; + } + + // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here. + this.selectionHandler.unselectAll(); + var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); + var node = undefined; + for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { + if (overlappingNodeIds[i] !== this.selectedControlNode.id) { + node = this.body.nodes[overlappingNodeIds[i]]; + break; + } + } + // perform the connection + if (node !== undefined && this.selectedControlNode !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + var from = this.body.nodes[this.temporaryIds.nodes[0]]; + if (this.selectedControlNode.id === from.id) { + this._performEditEdge(node.id, edge.to.id); + } else { + this._performEditEdge(edge.from.id, node.id); + } + } + } else { + edge.updateEdgeType(); + this.body.emitter.emit('restorePhysics'); + } + + this.body.emitter.emit('_redraw'); + } + + // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------// + + + // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------// + /** + * the function bound to the selection event. It checks if you want to connect a cluster and changes the description + * to walk the user through the process. + * + * @param {Event} event + * @private + */ + + }, { + key: '_handleConnect', + value: function _handleConnect(event) { + // check to avoid double fireing of this function. + if (new Date().valueOf() - this.touchTime > 100) { + this.lastTouch = this.body.functions.getPointer(event.center); + this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object + + var pointer = this.lastTouch; + var node = this.selectionHandler.getNodeAt(pointer); + + if (node !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + // create a node the temporary line can look at + var targetNode = this._getNewTargetNode(node.x, node.y); + this.body.nodes[targetNode.id] = targetNode; + this.body.nodeIndices.push(targetNode.id); + + // create a temporary edge + var connectionEdge = this.body.functions.createEdge({ + id: 'connectionEdge' + util.randomUUID(), + from: node.id, + to: targetNode.id, + physics: false, + smooth: { + enabled: true, + type: 'continuous', + roundness: 0.5 + } + }); + this.body.edges[connectionEdge.id] = connectionEdge; + this.body.edgeIndices.push(connectionEdge.id); + + this.temporaryIds.nodes.push(targetNode.id); + this.temporaryIds.edges.push(connectionEdge.id); + } + } + this.touchTime = new Date().valueOf(); + } + } + + /** + * + * @param {Event} event + * @private + */ + + }, { + key: '_dragControlNode', + value: function _dragControlNode(event) { + var pointer = this.body.functions.getPointer(event.center); + if (this.temporaryIds.nodes[0] !== undefined) { + var targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode. + targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x); + targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y); + this.body.emitter.emit('_redraw'); + } else { + var diffX = pointer.x - this.lastTouch.x; + var diffY = pointer.y - this.lastTouch.y; + this.body.view.translation = { x: this.lastTouch.translation.x + diffX, y: this.lastTouch.translation.y + diffY }; + } + } + + /** + * Connect the new edge to the target if one exists, otherwise remove temp line + * @param {Event} event The event + * @private + */ + + }, { + key: '_finishConnect', + value: function _finishConnect(event) { + var pointer = this.body.functions.getPointer(event.center); + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + + // remember the edge id + var connectFromId = undefined; + if (this.temporaryIds.edges[0] !== undefined) { + connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId; + } + + // get the overlapping node but NOT the temporary node; + var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); + var node = undefined; + for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { + // if the node id is NOT a temporary node, accept the node. + if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) { + node = this.body.nodes[overlappingNodeIds[i]]; + break; + } + } + + // clean temporary nodes and edges. + this._cleanupTemporaryNodesAndEdges(); + + // perform the connection + if (node !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) { + this._performAddEdge(connectFromId, node.id); + } + } + } + + // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires. + this.body.emitter.emit('_redraw'); + } + + /** + * + * @param {Event} event + * @private + */ + + }, { + key: '_dragStartEdge', + value: function _dragStartEdge(event) { + var pointer = this.lastTouch; + this.selectionHandler._generateClickEvent('dragStart', event, pointer, undefined, true); + } + + // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------// + + + // ------------------------------ Performing all the actual data manipulation ------------------------// + + /** + * Adds a node on the specified location + * + * @param {Object} clickData + * @private + */ + + }, { + key: '_performAddNode', + value: function _performAddNode(clickData) { + var _this4 = this; + + var defaultData = { + id: util.randomUUID(), + x: clickData.pointer.canvas.x, + y: clickData.pointer.canvas.y, + label: 'new' + }; + + if (typeof this.options.addNode === 'function') { + if (this.options.addNode.length === 2) { + this.options.addNode(defaultData, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this4.inMode === 'addNode') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback + _this4.body.data.nodes.getDataSet().add(finalizedData); + _this4.showManipulatorToolbar(); + } + }); + } else { + this.showManipulatorToolbar(); + throw new Error('The function for add does not support two arguments (data,callback)'); + } + } else { + this.body.data.nodes.getDataSet().add(defaultData); + this.showManipulatorToolbar(); + } + } + + /** + * connect two nodes with a new edge. + * + * @param {Node.id} sourceNodeId + * @param {Node.id} targetNodeId + * @private + */ + + }, { + key: '_performAddEdge', + value: function _performAddEdge(sourceNodeId, targetNodeId) { + var _this5 = this; + + var defaultData = { from: sourceNodeId, to: targetNodeId }; + if (typeof this.options.addEdge === 'function') { + if (this.options.addEdge.length === 2) { + this.options.addEdge(defaultData, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this5.inMode === 'addEdge') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback + _this5.body.data.edges.getDataSet().add(finalizedData); + _this5.selectionHandler.unselectAll(); + _this5.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for connect does not support two arguments (data,callback)'); + } + } else { + this.body.data.edges.getDataSet().add(defaultData); + this.selectionHandler.unselectAll(); + this.showManipulatorToolbar(); + } + } + + /** + * connect two nodes with a new edge. + * + * @param {Node.id} sourceNodeId + * @param {Node.id} targetNodeId + * @private + */ + + }, { + key: '_performEditEdge', + value: function _performEditEdge(sourceNodeId, targetNodeId) { + var _this6 = this; + + var defaultData = { id: this.edgeBeingEditedId, from: sourceNodeId, to: targetNodeId, label: this.body.data.edges._data[this.edgeBeingEditedId].label }; + var eeFunct = this.options.editEdge; + if ((typeof eeFunct === 'undefined' ? 'undefined' : (0, _typeof3['default'])(eeFunct)) === 'object') { + eeFunct = eeFunct.editWithoutDrag; + } + if (typeof eeFunct === 'function') { + if (eeFunct.length === 2) { + eeFunct(defaultData, function (finalizedData) { + if (finalizedData === null || finalizedData === undefined || _this6.inMode !== 'editEdge') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this6.body.edges[defaultData.id].updateEdgeType(); + _this6.body.emitter.emit('_redraw'); + _this6.showManipulatorToolbar(); + } else { + _this6.body.data.edges.getDataSet().update(finalizedData); + _this6.selectionHandler.unselectAll(); + _this6.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for edit does not support two arguments (data, callback)'); + } + } else { + this.body.data.edges.getDataSet().update(defaultData); + this.selectionHandler.unselectAll(); + this.showManipulatorToolbar(); + } + } + }]); + return ManipulationSystem; +}(); + +exports['default'] = ManipulationSystem; + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray2 = __webpack_require__(30); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _FloydWarshall = __webpack_require__(239); + +var _FloydWarshall2 = _interopRequireDefault(_FloydWarshall); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * KamadaKawai positions the nodes initially based on + * + * "AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS" + * -- Tomihisa KAMADA and Satoru KAWAI in 1989 + * + * Possible optimizations in the distance calculation can be implemented. + */ +var KamadaKawai = function () { + /** + * @param {Object} body + * @param {number} edgeLength + * @param {number} edgeStrength + */ + function KamadaKawai(body, edgeLength, edgeStrength) { + (0, _classCallCheck3["default"])(this, KamadaKawai); + + this.body = body; + this.springLength = edgeLength; + this.springConstant = edgeStrength; + this.distanceSolver = new _FloydWarshall2["default"](); + } + + /** + * Not sure if needed but can be used to update the spring length and spring constant + * @param {Object} options + */ + + + (0, _createClass3["default"])(KamadaKawai, [{ + key: "setOptions", + value: function setOptions(options) { + if (options) { + if (options.springLength) { + this.springLength = options.springLength; + } + if (options.springConstant) { + this.springConstant = options.springConstant; + } + } + } + + /** + * Position the system + * @param {Array.} nodesArray + * @param {Array.} edgesArray + * @param {boolean} [ignoreClusters=false] + */ + + }, { + key: "solve", + value: function solve(nodesArray, edgesArray) { + var ignoreClusters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + // get distance matrix + var D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix + + // get the L Matrix + this._createL_matrix(D_matrix); + + // get the K Matrix + this._createK_matrix(D_matrix); + + // initial E Matrix + this._createE_matrix(); + + // calculate positions + var threshold = 0.01; + var innerThreshold = 1; + var iterations = 0; + var maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000)); + var maxInnerIterations = 5; + + var maxEnergy = 1e9; + var highE_nodeId = 0, + dE_dx = 0, + dE_dy = 0, + delta_m = 0, + subIterations = 0; + + while (maxEnergy > threshold && iterations < maxIterations) { + iterations += 1; + + var _getHighestEnergyNode2 = this._getHighestEnergyNode(ignoreClusters); + + var _getHighestEnergyNode3 = (0, _slicedToArray3["default"])(_getHighestEnergyNode2, 4); + + highE_nodeId = _getHighestEnergyNode3[0]; + maxEnergy = _getHighestEnergyNode3[1]; + dE_dx = _getHighestEnergyNode3[2]; + dE_dy = _getHighestEnergyNode3[3]; + + delta_m = maxEnergy; + subIterations = 0; + while (delta_m > innerThreshold && subIterations < maxInnerIterations) { + subIterations += 1; + this._moveNode(highE_nodeId, dE_dx, dE_dy); + + var _getEnergy2 = this._getEnergy(highE_nodeId); + + var _getEnergy3 = (0, _slicedToArray3["default"])(_getEnergy2, 3); + + delta_m = _getEnergy3[0]; + dE_dx = _getEnergy3[1]; + dE_dy = _getEnergy3[2]; + } + } + } + + /** + * get the node with the highest energy + * @param {boolean} ignoreClusters + * @returns {number[]} + * @private + */ + + }, { + key: "_getHighestEnergyNode", + value: function _getHighestEnergyNode(ignoreClusters) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var maxEnergy = 0; + var maxEnergyNodeId = nodesArray[0]; + var dE_dx_max = 0, + dE_dy_max = 0; + + for (var nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) { + var m = nodesArray[nodeIdx]; + // by not evaluating nodes with predefined positions we should only move nodes that have no positions. + if (nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) { + var _getEnergy4 = this._getEnergy(m), + _getEnergy5 = (0, _slicedToArray3["default"])(_getEnergy4, 3), + delta_m = _getEnergy5[0], + dE_dx = _getEnergy5[1], + dE_dy = _getEnergy5[2]; + + if (maxEnergy < delta_m) { + maxEnergy = delta_m; + maxEnergyNodeId = m; + dE_dx_max = dE_dx; + dE_dy_max = dE_dy; + } + } + } + + return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max]; + } + + /** + * calculate the energy of a single node + * @param {Node.id} m + * @returns {number[]} + * @private + */ + + }, { + key: "_getEnergy", + value: function _getEnergy(m) { + var _E_sums$m = (0, _slicedToArray3["default"])(this.E_sums[m], 2), + dE_dx = _E_sums$m[0], + dE_dy = _E_sums$m[1]; + + var delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2)); + return [delta_m, dE_dx, dE_dy]; + } + + /** + * move the node based on it's energy + * the dx and dy are calculated from the linear system proposed by Kamada and Kawai + * @param {number} m + * @param {number} dE_dx + * @param {number} dE_dy + * @private + */ + + }, { + key: "_moveNode", + value: function _moveNode(m, dE_dx, dE_dy) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var d2E_dx2 = 0; + var d2E_dxdy = 0; + var d2E_dy2 = 0; + + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var km = this.K_matrix[m]; + var lm = this.L_matrix[m]; + + for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + if (i !== m) { + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var kmat = km[i]; + var lmat = lm[i]; + var denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5); + d2E_dx2 += kmat * (1 - lmat * Math.pow(y_m - y_i, 2) * denominator); + d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator); + d2E_dy2 += kmat * (1 - lmat * Math.pow(x_m - x_i, 2) * denominator); + } + } + // make the variable names easier to make the solving of the linear system easier to read + var A = d2E_dx2, + B = d2E_dxdy, + C = dE_dx, + D = d2E_dy2, + E = dE_dy; + + // solve the linear system for dx and dy + var dy = (C / A + E / B) / (B / A - D / B); + var dx = -(B * dy + C) / A; + + // move the node + nodes[m].x += dx; + nodes[m].y += dy; + + // Recalculate E_matrix (should be incremental) + this._updateE_matrix(m); + } + + /** + * Create the L matrix: edge length times shortest path + * @param {Object} D_matrix + * @private + */ + + }, { + key: "_createL_matrix", + value: function _createL_matrix(D_matrix) { + var nodesArray = this.body.nodeIndices; + var edgeLength = this.springLength; + + this.L_matrix = []; + for (var i = 0; i < nodesArray.length; i++) { + this.L_matrix[nodesArray[i]] = {}; + for (var j = 0; j < nodesArray.length; j++) { + this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]]; + } + } + } + + /** + * Create the K matrix: spring constants times shortest path + * @param {Object} D_matrix + * @private + */ + + }, { + key: "_createK_matrix", + value: function _createK_matrix(D_matrix) { + var nodesArray = this.body.nodeIndices; + var edgeStrength = this.springConstant; + + this.K_matrix = []; + for (var i = 0; i < nodesArray.length; i++) { + this.K_matrix[nodesArray[i]] = {}; + for (var j = 0; j < nodesArray.length; j++) { + this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2); + } + } + } + + /** + * Create matrix with all energies between nodes + * @private + */ + + }, { + key: "_createE_matrix", + value: function _createE_matrix() { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + this.E_matrix = {}; + this.E_sums = {}; + for (var mIdx = 0; mIdx < nodesArray.length; mIdx++) { + this.E_matrix[nodesArray[mIdx]] = []; + } + for (var _mIdx = 0; _mIdx < nodesArray.length; _mIdx++) { + var m = nodesArray[_mIdx]; + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var dE_dx = 0; + var dE_dy = 0; + for (var iIdx = _mIdx; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + if (i !== m) { + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2)); + this.E_matrix[m][iIdx] = [this.K_matrix[m][i] * (x_m - x_i - this.L_matrix[m][i] * (x_m - x_i) * denominator), this.K_matrix[m][i] * (y_m - y_i - this.L_matrix[m][i] * (y_m - y_i) * denominator)]; + this.E_matrix[i][_mIdx] = this.E_matrix[m][iIdx]; + dE_dx += this.E_matrix[m][iIdx][0]; + dE_dy += this.E_matrix[m][iIdx][1]; + } + } + //Store sum + this.E_sums[m] = [dE_dx, dE_dy]; + } + } + + /** + * Update method, just doing single column (rows are auto-updated) (update all sums) + * + * @param {number} m + * @private + */ + + }, { + key: "_updateE_matrix", + value: function _updateE_matrix(m) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var colm = this.E_matrix[m]; + var kcolm = this.K_matrix[m]; + var lcolm = this.L_matrix[m]; + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var dE_dx = 0; + var dE_dy = 0; + for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + if (i !== m) { + //Keep old energy value for sum modification below + var cell = colm[iIdx]; + var oldDx = cell[0]; + var oldDy = cell[1]; + + //Calc new energy: + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2)); + var dx = kcolm[i] * (x_m - x_i - lcolm[i] * (x_m - x_i) * denominator); + var dy = kcolm[i] * (y_m - y_i - lcolm[i] * (y_m - y_i) * denominator); + colm[iIdx] = [dx, dy]; + dE_dx += dx; + dE_dy += dy; + + //add new energy to sum of each column + var sum = this.E_sums[i]; + sum[0] += dx - oldDx; + sum[1] += dy - oldDy; + } + } + //Store sum at -1 index + this.E_sums[m] = [dE_dx, dE_dy]; + } + }]); + return KamadaKawai; +}(); // distance finding algorithm + + +exports["default"] = KamadaKawai; + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(0); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(1); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/** + * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in + * a weighted graph with positive or negative edge weights (but with no negative + * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm + */ +var FloydWarshall = function () { + /** + * @ignore + */ + function FloydWarshall() { + (0, _classCallCheck3["default"])(this, FloydWarshall); + } + + /** + * + * @param {Object} body + * @param {Array.} nodesArray + * @param {Array.} edgesArray + * @returns {{}} + */ + + + (0, _createClass3["default"])(FloydWarshall, [{ + key: "getDistances", + value: function getDistances(body, nodesArray, edgesArray) { + var D_matrix = {}; + var edges = body.edges; + + // prepare matrix with large numbers + for (var i = 0; i < nodesArray.length; i++) { + var node = nodesArray[i]; + var cell = {}; + D_matrix[node] = cell; + for (var j = 0; j < nodesArray.length; j++) { + cell[nodesArray[j]] = i == j ? 0 : 1e9; + } + } + + // put the weights for the edges in. This assumes unidirectionality. + for (var _i = 0; _i < edgesArray.length; _i++) { + var edge = edges[edgesArray[_i]]; + // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix + if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) { + D_matrix[edge.fromId][edge.toId] = 1; + D_matrix[edge.toId][edge.fromId] = 1; + } + } + + var nodeCount = nodesArray.length; + + // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity. + for (var k = 0; k < nodeCount; k++) { + var knode = nodesArray[k]; + var kcolm = D_matrix[knode]; + for (var _i2 = 0; _i2 < nodeCount - 1; _i2++) { + var inode = nodesArray[_i2]; + var icolm = D_matrix[inode]; + for (var _j = _i2 + 1; _j < nodeCount; _j++) { + var jnode = nodesArray[_j]; + var jcolm = D_matrix[jnode]; + + var val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]); + icolm[jnode] = val; + jcolm[inode] = val; + } + } + } + + return D_matrix; + } + }]); + return FloydWarshall; +}(); + +exports["default"] = FloydWarshall; + +/***/ }) +/******/ ]); +}); \ No newline at end of file diff --git a/debian/mpich-doc.docs b/debian/mpich-doc.docs new file mode 100644 index 00000000000..0596204cd78 --- /dev/null +++ b/debian/mpich-doc.docs @@ -0,0 +1 @@ +RELEASE_NOTES diff --git a/debian/mpich-doc.examples b/debian/mpich-doc.examples new file mode 100644 index 00000000000..e39721e20f0 --- /dev/null +++ b/debian/mpich-doc.examples @@ -0,0 +1 @@ +examples/* diff --git a/debian/mpich.install b/debian/mpich.install new file mode 100644 index 00000000000..7fb41baebc5 --- /dev/null +++ b/debian/mpich.install @@ -0,0 +1,8 @@ +usr/bin/hydra_* +usr/bin/mpiexec.* +usr/bin/parkill +usr/bin/mpichversion +usr/bin/mpicc.* +usr/bin/mpicxx.* +usr/bin/mpifort.* +usr/bin/mpivars diff --git a/debian/mpich.links b/debian/mpich.links new file mode 100644 index 00000000000..5041d62e545 --- /dev/null +++ b/debian/mpich.links @@ -0,0 +1,11 @@ +usr/bin/mpiexec.hydra usr/bin/mpiexec.mpich +usr/bin/mpiexec.hydra usr/bin/mpirun.mpich +usr/share/man/man1/mpiexec.mpich.1.gz usr/share/man/man1/mpiexec.hydra.1.gz +usr/share/man/man1/mpiexec.mpich.1.gz usr/share/man/man1/mpirun.mpich.1.gz +#usr/bin/mpicxx.mpich usr/bin/mpic++.mpich +#usr/share/man/man1/mpicxx.mpich.1.gz /usr/share/man/man1/mpic++.mpich.1.gz +usr/bin/mpifort.mpich usr/bin/mpif90.mpich +usr/bin/mpifort.mpich usr/bin/mpif77.mpich +# Symlinks to make lintian happy. +# Provide manual page mpif90.mpich +usr/share/man/man1/mpifort.mpich.1.gz /usr/share/man/man1/mpif90.mpich.1.gz diff --git a/debian/mpich.postinst b/debian/mpich.postinst new file mode 100644 index 00000000000..ced1eb20b98 --- /dev/null +++ b/debian/mpich.postinst @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ]; then + +# mpich2 versions before 1.2.1~rc1-1 were using two alternatives where other +# MPI implementations were using only one, which breaks. Clean up +# our mess. +if [ "$2" != "" ] && dpkg --compare-versions "$2" le "1.2.1~rc1-1"; then + update-alternatives --remove mpiexec /usr/bin/mpiexec.mpich2 +fi +if update-alternatives --list mpiexec >/dev/null 2>&1; then + # OK, that case sucks. Apparently, we still have a mpiexec alternative, maybe + # from a different package (like openmpi). In that case, the only thing we + # can do is --remove-all... + update-alternatives --remove-all mpiexec +fi + +update-alternatives \ + --install /usr/bin/mpicc mpi /usr/bin/mpicc.mpich 40 \ + --slave /usr/bin/mpic++ mpic++ /usr/bin/mpicxx.mpich \ + --slave /usr/bin/mpicxx mpicxx /usr/bin/mpicxx.mpich \ + --slave /usr/bin/mpiCC mpiCC /usr/bin/mpicxx.mpich \ + --slave /usr/bin/mpifort mpifort /usr/bin/mpifort.mpich \ + --slave /usr/bin/mpif77 mpif77 /usr/bin/mpifort.mpich \ + --slave /usr/bin/mpif90 mpif90 /usr/bin/mpifort.mpich + +update-alternatives \ + --install /usr/bin/mpirun mpirun /usr/bin/mpirun.mpich 40 \ + --slave /usr/bin/mpiexec mpiexec /usr/bin/mpiexec.mpich + +fi + +#DEBHELPER# diff --git a/debian/mpich.preinst.in b/debian/mpich.preinst.in new file mode 100644 index 00000000000..b017d4b6461 --- /dev/null +++ b/debian/mpich.preinst.in @@ -0,0 +1,51 @@ +#!/bin/sh + +set -e + + +remove_corrupt_alternative() +{ + local alt=$1 + + if [ -f /var/lib/dpkg/alternatives/$alt ] && \ + ! update-alternatives --query $alt >/dev/null 2>&1 + then + # file exists, but query failed? likely corrupt! + echo "Removing corrupt alternative(s) '$alt'" + update-alternatives --remove-all $alt >/dev/null 2>&1 || \ + rm -fv /var/lib/dpkg/alternatives/$alt + fi +} + +remove_obsolete_alternative() +{ + local alt=$1 + + remove_corrupt_alternative $alt + + if update-alternatives --query $alt >/dev/null 2>&1 + then + echo "Removing obsolete alternative(s) '$alt'" + update-alternatives --remove-all $alt + fi +} + +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then + + if dpkg --compare-versions "$2" lt "3.3-3~" ; then + + remove_corrupt_alternative mpi + + # Add a comment here + remove_obsolete_alternative mpirun-@TRIPLET@ + + # Splitting mpi and mpi-$MULTIARCH requires this + if update-alternatives --query mpi 2>/dev/null | grep -q libmpi ; then + echo "Removing pre-multiarch 'mpi' alternative(s)" + update-alternatives --remove-all mpi + update-alternatives --remove-all mpi-@TRIPLET@ 2>/dev/null || true + fi + fi +fi + +#DEBHELPER# diff --git a/debian/mpich.prerm b/debian/mpich.prerm new file mode 100644 index 00000000000..39625c2ae5f --- /dev/null +++ b/debian/mpich.prerm @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then + update-alternatives --remove mpirun /usr/bin/mpirun.mpich + update-alternatives --remove mpi /usr/bin/mpicc.mpich +fi + +#DEBHELPER# diff --git a/debian/patches/fix-autogen-hwloc.patch b/debian/patches/fix-autogen-hwloc.patch new file mode 100644 index 00000000000..a047730be03 --- /dev/null +++ b/debian/patches/fix-autogen-hwloc.patch @@ -0,0 +1,17 @@ +Forwarded: +Reviewed-By: +Last-Update: 2018-01-10 + +Index: mpich-3.3~b1/src/hwloc/config/hwloc.m4 +=================================================================== +--- mpich-3.3~b1.orig/src/hwloc/config/hwloc.m4 ++++ mpich-3.3~b1/src/hwloc/config/hwloc.m4 +@@ -126,8 +126,6 @@ EOF]) + # becomes the "main" config header file. Any AC-CONFIG-HEADERS + # after that (hwloc/config.h) will only have selective #defines + # replaced, not the entire file. +- AC_CONFIG_HEADERS(hwloc_config_prefix[include/private/autogen/config.h]) +- AC_CONFIG_HEADERS(hwloc_config_prefix[include/hwloc/autogen/config.h]) + + # What prefix are we using? + AC_MSG_CHECKING([for hwloc symbol prefix]) diff --git a/debian/patches/hurd_fix.patch b/debian/patches/hurd_fix.patch new file mode 100644 index 00000000000..87dbdec9e1c --- /dev/null +++ b/debian/patches/hurd_fix.patch @@ -0,0 +1,21 @@ +Description: Handle ADIO_SFS not defined on GNU/Hurd + Also, missing PATH_MAX definitions +Author: Alastair McKinstry +Forwarded: no +Last-Updated: 2018-04-18 + +Index: mpich-3.3.1/src/mpl/src/str/mpl_str.c +=================================================================== +--- mpich-3.3.1.orig/src/mpl/src/str/mpl_str.c ++++ mpich-3.3.1/src/mpl/src/str/mpl_str.c +@@ -19,6 +19,10 @@ + #include + #endif + ++#ifndef PATH_MAX /* Hurd */ ++#define PATH_MAX 2048 ++#endif ++ + #if !defined MPL_HAVE_SNPRINTF + int MPL_snprintf(char *str, size_t size, const char *format, ...) + { diff --git a/debian/patches/pkgconfig.patch b/debian/patches/pkgconfig.patch new file mode 100644 index 00000000000..5f6a7d8fcd8 --- /dev/null +++ b/debian/patches/pkgconfig.patch @@ -0,0 +1,105 @@ +Index: mpich-3.3.1/src/packaging/pkgconfig/Makefile.mk +=================================================================== +--- mpich-3.3.1.orig/src/packaging/pkgconfig/Makefile.mk ++++ mpich-3.3.1/src/packaging/pkgconfig/Makefile.mk +@@ -5,4 +5,7 @@ + ## See COPYRIGHT in top-level directory + ## + +-nodist_pkgconfig_DATA += src/packaging/pkgconfig/mpich.pc ++nodist_pkgconfig_DATA += src/packaging/pkgconfig/mpich.pc \ ++ src/packaging/pkgconfig/mpich-c.pc \ ++ src/packaging/pkgconfig/mpich-cxx.pc \ ++ src/packaging/pkgconfig/mpich-fort.pc +Index: mpich-3.3.1/src/packaging/pkgconfig/mpich-c.pc.in +=================================================================== +--- /dev/null ++++ mpich-3.3.1/src/packaging/pkgconfig/mpich-c.pc.in +@@ -0,0 +1,20 @@ ++# this gives access to the mpich header files ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: mpich ++Description: High Performance and portable MPI ++Version: @MPICH_VERSION@ ++URL: http://www.mcs.anl.gov/research/projects/mpich ++Requires: ++Libs: @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ -L${libdir} -l@MPILIBNAME@ @LPMPILIBNAME@ @WRAPPER_LIBS@ ++Cflags: @WRAPPER_CPPFLAGS@ @WRAPPER_CFLAGS@ -I${includedir} ++ ++# pkg-config does not understand Cxxflags, etc. So we allow users to ++# query them using the --variable option ++ ++cxxflags=@WRAPPER_CPPFLAGS@ @WRAPPER_CXXFLAGS@ -I${includedir} ++fflags=@WRAPPER_FFLAGS@ -I${includedir} ++fcflags=@WRAPPER_FCFLAGS@ -I${includedir} +\ No newline at end of file +Index: mpich-3.3.1/src/packaging/pkgconfig/mpich-cxx.pc.in +=================================================================== +--- /dev/null ++++ mpich-3.3.1/src/packaging/pkgconfig/mpich-cxx.pc.in +@@ -0,0 +1,20 @@ ++# this gives access to the mpich header files ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: mpich ++Description: High Performance and portable MPI ++Version: @MPICH_VERSION@ ++URL: http://www.mcs.anl.gov/research/projects/mpich ++Requires: ++Libs: @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ -L${libdir} -l@MPILIBNAME@ @LPMPILIBNAME@ @WRAPPER_LIBS@ ++Cflags: @WRAPPER_CPPFLAGS@ @WRAPPER_CXXFLAGS@ -I${includedir} ++ ++# pkg-config does not understand Cxxflags, etc. So we allow users to ++# query them using the --variable option ++ ++cxxflags=@WRAPPER_CPPFLAGS@ @WRAPPER_CXXFLAGS@ -I${includedir} ++fflags=@WRAPPER_FFLAGS@ -I${includedir} ++fcflags=@WRAPPER_FCFLAGS@ -I${includedir} +\ No newline at end of file +Index: mpich-3.3.1/src/packaging/pkgconfig/mpich-fort.pc.in +=================================================================== +--- /dev/null ++++ mpich-3.3.1/src/packaging/pkgconfig/mpich-fort.pc.in +@@ -0,0 +1,20 @@ ++# this gives access to the mpich header files ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: mpich ++Description: High Performance and portable MPI ++Version: @MPICH_VERSION@ ++URL: http://www.mcs.anl.gov/research/projects/mpich ++Requires: ++Libs: @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ -L${libdir} -l@MPILIBNAME@ @LPMPILIBNAME@ @WRAPPER_LIBS@ ++Cflags: @WRAPPER_CPPFLAGS@ @WRAPPER_FFLAGS@ @WRAPPER_FCFLAGS@ -I${includedir} ++ ++# pkg-config does not understand Cxxflags, etc. So we allow users to ++# query them using the --variable option ++ ++cxxflags=@WRAPPER_CPPFLAGS@ @WRAPPER_CXXFLAGS@ -I${includedir} ++fflags=@WRAPPER_FFLAGS@ -I${includedir} ++fcflags=@WRAPPER_FCFLAGS@ -I${includedir} +\ No newline at end of file +Index: mpich-3.3.1/configure.ac +=================================================================== +--- mpich-3.3.1.orig/configure.ac ++++ mpich-3.3.1/configure.ac +@@ -4309,6 +4309,9 @@ AC_OUTPUT(Makefile \ + src/binding/fortran/use_mpi_f08/mpi_f08_compile_constants.f90 \ + src/binding/fortran/use_mpi_f08/mpi_c_interface_types.f90 \ + src/packaging/pkgconfig/mpich.pc \ ++ src/packaging/pkgconfig/mpich-c.pc \ ++ src/packaging/pkgconfig/mpich-cxx.pc \ ++ src/packaging/pkgconfig/mpich-fort.pc \ + src/packaging/envmods/mpich.module \ + src/env/mpixxx_opts.conf \ + src/env/mpicc.sh \ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000000..6f747635152 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +hurd_fix.patch +pkgconfig.patch +# fix-autogen-hwloc.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000000..acc1cb4963d --- /dev/null +++ b/debian/rules @@ -0,0 +1,120 @@ +#! /usr/bin/make -f + +export DH_VERBOSE=1 + +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +export MPICHLIB_CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS) +export MPICHLIB_CFLAGS=$(shell dpkg-buildflags --get CFLAGS) +export MPICHLIB_CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS) +export MPICHLIB_FFLAGS=$(shell dpkg-buildflags --get FFLAGS) +export MPICHLIB_FCFLAGS=$(shell dpkg-buildflags --get FFLAGS) -cpp +export FFLAGS=$(shell dpkg-buildflags --get FFLAGS | sed -e 's/-g //') +export FC=f95 +export F77=f77 +export TZ=UTC+0 + + +AUTOGENERATED:= libmpich-dev.prerm libmpich-dev.postinst libmpich-dev.links \ + mpich.preinst libmpich-dev.preinst + +# Keep old library naming scheme +export MPILIBNAME=mpich + +NO_ROMIO_ARCH:= hurd-i386 +NO_VERBS_ARCH:= hurd-i386 kfreebsd-amd64 kfreebsd-i386 s390x +FABRIC_ARCH:= amd64 i386 +BUILTIN_ATOMICS_ARCH:= armhf riscv64 hppa +NO_REAL128_ARCH:= armel armhf mipsel hppa m68k sh5 + + +ifneq (,$(findstring " $(DEB_HOST_ARCH)",$(NO_VERBS_ARCH))) + VERBS := --with-ibverbs +endif +ifneq (,$(findstring $(DEB_HOST_ARCH),$(BUILTIN_ATOMICS_ARCH))) + DISABLE_BUILTIN_ATOMICS:= --with-atomic-primitives=no +endif +ifneq (,$(findstring $(DEB_HOST_ARCH),$(FABRIC_ARCH))) + FABRIC := --with-libfabric +endif +ifneq (,$(findstring $(DEB_HOST_ARCH),$(NO_REAL128_ARCH))) + MPICHLIB_FCFLAGS:=$(MPICHLIB_FCFLAGS) -DNO_REAL128 +endif + +extra_flags += \ + $(VERBS) \ + $(FABRIC) \ + $(DISABLE_BUILTIN_ATOMICS) \ + --enable-shared \ + --prefix=/usr \ + --enable-fortran=all \ + --disable-rpath \ + --disable-wrapper-rpath \ + --sysconfdir=/etc/mpich \ + --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ + --includedir=/usr/include/$(DEB_HOST_MULTIARCH)/mpich \ + --docdir=/usr/share/doc/mpich \ + --with-device=ch4:ofi + + +# On sparc and sh4, OPA isn't available, so we need to fallback to +# emulation mode. There's a performance penalty, unfortunately. +ifneq (,$(findstring $(DEB_HOST_GNU_CPU),sparc sh4)) + extra_flags += --with-atomic-primitives=no +endif + +clean: + dh $@ + +%: + dh $@ --with=fortran_mod + +override_dh_autoreconf: + ./autogen.sh + +override_dh_auto_clean: + dh_clean + rm -f $(patsubst %, debian/%, ${AUTOGENERATED}) + +override_dh_auto_configure: + for f in ${AUTOGENERATED} ; do \ + sed -e 's%TRIPLET%${DEB_HOST_MULTIARCH}%g' < debian/$$f.in > debian/$$f ; \ + done + dh_auto_configure -- $(extra_flags) CPPFLAGS="" CFLAGS="" CXXFLAGS="" FFLAGS="" FCFLAGS="" BASH_SHELL=/bin/bash + +override_dh_auto_build-indep: + dh_auto_build -i + # Disable rebuilding pdfs for the moment due to pdflatex problem + # cd $(CURDIR)/doc/installguide; rm *.pdf; $(MAKE) install.pdf + # cd $(CURDIR)/doc/logging; rm *.pdf; $(MAKE) logging.pdf + #cd $(CURDIR)/doc/smpd; rm *.pdf; $(MAKE) smpd_pmi.pdf + #cd $(CURDIR)/doc/userguide; rm *.pdf; $(MAKE) user.pdf + +override_dh_auto_install-arch: + dh_auto_install -a + chrpath -d debian/tmp/usr/lib/*/*.so* + + # Delete objs from examples + find ./examples -name '*.o' -delete + + # Rename executables (ignore upstream symlinks) + for i in mpicc mpicxx mpifort; do \ + (cd debian/tmp/usr/bin/ && mv $$i $$i.mpich); \ + done + + chrpath -d debian/*/usr/bin/mpivars debian/*/usr/bin/mpichversion + + +override_dh_installchangelogs: + dh_installchangelogs README + +# Some tests are failing on hurd-i386. +# Disable them, to be investiated later +# disable_test_archs = hurd-i386 +# failing in the DAOS CI (but not my local builder) +disable_test_archs = amd64 +ifneq (,$(filter $(DEB_HOST_ARCH),$(disable_test_archs))) +override_dh_auto_test: + +endif + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000000..163aaf8d82b --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 00000000000..0db2f88159e --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,3 @@ +# Lintian thinks uploader Adam Powell's name violates policy +mpich source: uploader-address-missing "Adam C. Powell +mpich source: uploader-not-full-name IV" diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000000..29b250aa8ee --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: version +Depends: mpich diff --git a/debian/tests/version b/debian/tests/version new file mode 100755 index 00000000000..b5a22b72c26 --- /dev/null +++ b/debian/tests/version @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +/usr/bin/mpichversion diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000000..dd62a69425f --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +# Compulsory line, this is a version 3 file +version=3 +opts="uversionmangle=s/(\d+)b(\d+)/$1~b$2/" http://www.mpich.org/downloads .*/mpich-(.*)\.tar\.gz diff --git a/maint/extractstates b/maint/extractstates new file mode 100755 index 00000000000..b2e10dfaca8 --- /dev/null +++ b/maint/extractstates @@ -0,0 +1,440 @@ +#! /usr/bin/env perl +## +## Copyright (C) by Argonne National Laboratory +## See COPYRIGHT in top-level directory +## + +# This file contains the routines specific to extracting the states from +# the source files and writing them to the .states-cache files. This +# file is input into the "extractstrings" perl script that creates +# cache files in directory trees +# +# Creates the following files: +# src/include/mpiallstates.h - an enum of all of the states used in the +# code +# +# Also allows an exceptions list on a per-directory basis. This file is +# describe_estates.txt, and contains +# statename routine-name [r g b] +# where [r g b] are optional and provide the color values as bytes, e.g., +# 255 0 0 +# is red +# +# FIXME: Add better error detection and reporting +# In the previous genstates.in script, a different set of problems in +# the source code was detected. Those included: +# Using STATE_DECL without FUNC_ENTER/EXIT +# Using FUNC_ENTER after FUNC_ENTER without FUNC_EXIT first +# Using FUNC_ENTER after FUNC_EXIT without a STATE_DECL first +# +# Some uses of these macros do not permit lexical scope checks. For +# example, code that has multiple "return"s, each of which has its +# own FUNC_EXIT, will defeat the check for FUNC_ENTER after FUNC_EXIT +# without a STATE_DECL +# +# Defaults for this step. These are globals variables that are used +# by routines in the extractstrings script. +# findStateDecl is the routine that is run to scan a file for information +use warnings; + +$scanFile = "findStateDecl"; +$cachefile = '.state-cache'; +$pattern = '\.[chi](pp){0,1}$'; +$exceptionsFile = "estates.txt"; + +# Load in the routines to extract strings from files +$maintdir = "./maint"; +require "$maintdir/extractstrings"; + +# These are "states" that are internal to a function, but still +# use FUNC_ENTER/EXIT +%exceptionState = ( # System Calls + 'MPID_STATE_READ' => 'read', + 'MPID_STATE_WRITE' => 'write', + 'MPID_STATE_READV' => 'readv', + 'MPID_STATE_WRITEV' => 'writev', + 'MPID_STATE_MEMCPY' => 'memcpy', + 'MPID_STATE_MPIDI_CH3I_SOCK_LISTEN', # used in sock code + 'MPID_STATE_MPIDI_CH3I_SOCK_ACCEPT', + 'MPID_STATE_POLL' => 'poll', + # MPICH internal implementation routines + 'MPID_STATE_UPDATE_REQUEST' => 'update_request', + 'MPID_STATE_CREATE_REQUEST' => 'create_request', + 'MPID_STATE_MPIDU_YIELD' => 'MPIDU_Yield', + 'MPID_STATE_MPIDU_SLEEP_YIELD' => 'MPIDU_Sleep_yield', + 'MPID_STATE_GETQUEUEDCOMPLETIONSTATUS' => + 'GetQueuedCompletionStatus', + 'MPID_STATE_CH3_CA_COMPLETE' => 'CH3_CA_Complete', + 'MPID_STATE_VAPI_REGISTER_MR' => 'vapi_register_mr', + 'MPID_STATE_VAPI_DEREGISTER_MR' => 'vapi_deregister_mr', + 'MPID_STATE_VAPI_POST_SR' => 'vapi_post_sr', + ); + +# Set the default directories +$dirs = "src/include src/mpi src/mpid/ch3 src/mpid/common src/util src/pmi src/binding src/nameserv"; +# Add mm for debugging +#$dirs .= " src/mpid/mm"; + +# Check for options +foreach (@ARGV) { + if (/-updateall/) { $gUpdateAll = 1; } + elsif (/-quiet/) { $gVerbose = 0; } + elsif (/-verbose=(\d+)/) { $gVerbose = $1; } + elsif (/-verbose/) { $gVerbose = 1; } + elsif (/-xxx/) { + # gUpdateAll and scanFile are used in the extractstrings file. To + # keep perl -w happy, we provide another use of these two + # symbols + print STDERR "gUpdateAll = $gUpdateAll, gVerbose = $gVerbose, and scanFile = $scanFile\n"; + } + elsif (/-dirs=(.*)/) { + $dirs = $1; + } + else { + print STDERR "Unrecognized argument $_\n"; + } +} + +# First, update any cache files +# This step reads each cache file and rescans any files more recent than +# their cached information are rescanned and the cachefiles are updated +# Any file that needs to be updated is read with the routine given by +# the variable "scanFile", which is "findStateDecl" in this script. +foreach my $dir (split(/\s/,$dirs)) { + &processDirs( $dir, $cachefile, $pattern ); +} + +# Now, extract all of the info from the cachefiles into allInfo +# This reads the cached information. catState will also read any +# per-directory (allInfo is global and is accessed by catState) +%allInfo = (); +foreach my $dir (split(/\s/,$dirs)) { + &processDirsAndAction( $dir, "catState", $cachefile ); +} + +# Make sure that there are no inconsistencies in the list by +# ensuring that all keys have the same descriptions. Report on +# any problems +&CheckAllInfo; + +# Finally, use allInfo to create the final description. +# What we do first is to convert it from lines that hash to a location +# (which makes it easier to identify problems) to a hash that maps keys to +# values. This gives us one more opportunity to detect duplicate or +# mismatched values +%allKeys = (); +%allKeysLoc = (); +foreach my $key (keys(%allInfo)) { + # Split line into value + my $val = ""; + my $origKey = $key; + if ($key =~ /(\S+)\s+(.*)/) { + $key = $1; + $val = $2; + } + if (defined($allKeys{$key})) { + my $valForKey = $allKeys{$key}; + if ($valForKey ne $val) { + print STDERR "\nInconsistent values for keys:\n"; + print STDERR "In $allInfo{$origKey}, have\n"; + print STDERR" $key -> $val\n"; + print STDERR "also to $key -> $valForKey\n"; + print STDERR "seen in $allKeysLoc{$key} .\n"; + print STDERR "Using $key -> $val\n"; + } + } + $allKeys{$key} = $val; + $allKeysLoc{$key} = $allInfo{$origKey}; +} +# + +# # FIXME: Who uses this now +# # This roughly reproduces the describe_states file +# open DS, ">src/describe_states.txt" || die "Cannot open src/describe_states.txt"; +# foreach my $key (sort(keys(%allInfo))) { +# $key =~ s/\r?\n//; +# my $funcname = ""; +# if ($key =~ /(\S+)\s+(\S+)/) { +# $key = $1; +# $funcname = $2; +# } +# else { +# $funcname = $key; +# if ($key =~ /^(MPID[A-Z]*_STATE_)+(MPI[A-Z]*)_(\w)(\S+)/) { +# $funcname = "$2_$3" . lc($4); +# } +# } +# print DS "$key $funcname\n"; +# } +# close DS; + +open DH, ">src/include/mpiallstates.h" || die "Cannot open src/include/mpiallstates.h"; +print DH "/* + * Copyright (C) by Argonne National Laboratory + * See COPYRIGHT in top-level directory + */ + +/* DO NOT EDIT: AUTOMATICALLY GENERATED BY extractstates */ +#ifndef MPIALLSTATES_H_INCLUDED +#define MPIALLSTATES_H_INCLUDED\n"; +# print the enum of states +print DH "\nenum MPID_TIMER_STATE {\n"; +foreach my $key (sort(keys(%allKeys))) { + print DH "\t$key,\n"; +} +print DH "\tMPID_NUM_TIMER_STATES };\n"; +print DH "#endif\n"; +close DH; + + +# -------------------- +# Read a file and find the state definitions +# This routine is invoked by the "ProcessFile" script in extractstates, +# which in turn is invoked by ProcessDir. It returns a string +# of newline-separated items which are simply the items that need to be +# added to the cache file for a given directory, for this particular file. +sub findStateDecl { + my $file = $_[0]; + my $info = ""; # newline separate list of states in a file + my $linenum = 0; # Keep track of location in file + my $curfuncname = ""; + my $lastFuncname = ""; # Last funcname and state are used to help with + my $lastState = ""; # routines that have multiple declaration + # blocks protected by ifdefs (to avoid false + # warnings about missing FUNCNAME definitions). + my %knownLines = (); # Hash used to detect duplicate lines + my %knownStates = (); # Hash used to detect known states, to avoid + # adding additional lines of the for "state" + # where "state name" has been already added + # (this can happen in places where there are + # multiple STATE_DECLS for a single FUNCNAME, + # which is discouraged but allowed. + my $inDecls = 0; # Keep track of whether we're still seeing + # state declarations or not. + my $inComment = 0; + my $showWarnings = 1; # Allow files to turn off warnings + + open FD, "<$file" || die "Cannot open $file\n"; + while () { + $linenum++; + # This allows us to skip files that are, for example, generated + # from the states information (e.g., the describe_states.h file) + if (/\/\*\s+STATES:SKIP\s+\*\//) { + last; + } + if (/\/\*\s+STATES:NO WARNINGS\s+\*\//) { + $showWarnings = 0; + next; + } + # Skip commented out definitions. The complexity here handles + # multi-line comments + if ($inComment) { + if (/.*\*\/(.*)/) { + $_ = 1; + $inComment = 0; + } + else { + $_ = ""; + } + } + else { + $processed = ""; + while (/(.*)\/\*(.*)/) { + $processed .= $1; + $_ = $2; + if (/.*\*\/(.*)/) { + $inComment = 0; + $_ = $1; + } + else { + $inComment = 1; + $_ = ""; + } + } + $_ = $processed . $_; + } + + + if (/^\#\s*define\s+FUNCNAME\s+(\S*)/) { + $curfuncname = $1; + $lastState = ""; + } + elsif (/STATE_DECL\((.*)\)/ && !/^\#\s*define\s/) { + my $state = $1; + my $candidateLine = ""; + $state =~ s/\s+//g; # Remove blanks + $candidateLine .= $state; + # Check for special cases (mostly system calls embedded within + # other routines that are not implemented by MPICH. + # In the long run, these should use a different macro instead + # of MPIxxx_STATE_DECL + if (!$inDecls) { $lastState = ""; } + $inDecls = 1; + if (defined($exceptionState{$state})) { + $candidateLine .= " " . $exceptionState{$state}; + $lastState .= ":$state:"; + } + else { + # Check for (a) this state is known, (b) that state + # has an associated name, and (c) curfuncname is null + if (defined($knownStates{$state}) && + $knownStates{$state} ne "" && $curfuncname eq "") { + print "Skipping state definition $state because already set to $knownStates{$state}\n" if $gVerbose; + # Skip this state + next; + } + + # Reload curfuncname if this is the same state as the last + # state + if ($curfuncname eq "" && $lastState eq ":$state:") { + $curfuncname = $lastFuncname; + } + if ($curfuncname ne "") { + $candidateLine .= " $curfuncname"; + } + else { + print STDERR "Warning: no FUNCNAME defined for $state in $file\n" if $showWarnings; + } + $lastState .= ":$state:"; + if ($curfuncname ne "") { + $lastFuncname = $curfuncname; + } + # Save this state and the associated function name + if (!defined($knownStates{$state})) { + $knownStates{$state} = $curfuncname; + } + + # Once we see the declaration of the state, set the + # state name to empty. The source code must be organized + # so that the state declarations only appear once LEXICALLY + # in the code. + if (! $showWarnings) { + $curfuncname = ""; + } + } + if (!defined($knownLines{$candidateLine})) { + $info .= $candidateLine . "\n"; + $knownLines{$candidateLine} = $linenum; + } + } + elsif (/FUNC_ENTER\((.*)\)/ && !/^\#\s*define\s/) { + # Match with current state + my $state = $1; + $inDecls = 0; + if (! ($lastState =~ /:$state:/) && + ! defined($exceptionState{$state}) ) { + print STDERR "Warning: State in FUNC_ENTER($state) does not match STATE_DECL($lastState) in $file at $linenum\n" if $showWarnings; + } + } + elsif (/FUNC_EXIT\((.*)\)/ && !/^\#\s*define\s/) { + # Match with current state + my $state = $1; + $inDecls = 0; + if (! ($lastState =~ /:$state:/) && + ! defined($exceptionState{$state})) { + print STDERR "Warning: State in FUNC_EXIT($state) does not match STATE_DECL($lastState) in $file\n" if $showWarnings; + } +# else { +# # Remove this state from the defined states +# $lastState =~ s/:$state://; +# } + } + + } + close FD; + + return $info; +} + +# Read the cache file and add the information to the hash allInfo +# The key for allInfo is the specification line, the value is the location +# of the cache file where the value was found. +# For entries from the exceptions file, the value is the location of the +# exceptions file. +sub catState { + my ($dir,$cachefile) = @_; + if (-s "$dir/$cachefile") { + my %f = &ReadCacheContents( $dir, $cachefile ); + foreach my $key (keys(%f)) { + foreach my $value (split/\n/,$f{$key}) { + $allInfo{$value} = "$dir/$cachefile"; + } + } + } + if (-s "$dir/$exceptionsFile") { + print "Reading $dir/$exceptionsFile\n" if $gVerbose; + open CFD, "<$dir/$exceptionsFile" || + die "Could not open $dir/$exceptionsFile"; + while () { + s/#.*//; + if (/^(\S+)\s+(\S+)\s*(.*)/) { + # Found a conforming line. + my $key = $1; + my $name = $2; + my $color = $3; + my $defaultKey = $1 . " " . $2; + if (defined($allInfo{$defaultKey}) && $color ne "") { + # Replace this entry + delete $allInfo{$defaultKey}; + } + $allInfo{$_} = "$dir/$exceptionsFile"; + } + } + close CFD; + } +} + +# -------------------------------------------------------------------------- +# Make sure that there are no inconsistencies in the list by +# ensuring that all keys have the same descriptions. Also +# synthesize the function names here +# Keys in allInfo are of the form "state [optional func]" +# The value is the cache file in which the key was defined. +# stateNames is used to keep track of all states, so that if the +# same state is defined in multiple cache files, but with different +# values, we can detect the inconsistency. +sub CheckAllInfo { + my %stateNames = (); + my %stateLoc = (); + foreach my $key (sort(keys(%allInfo))) { + my $val = ""; + my $color = ""; + my $origkey = $key; + my $origval = ""; + if ($key =~ /(\S+)\s+(.+)/) { + $key = $1; + $val = $2; + $origval = $val; + } + elsif ($key =~ /\s/) { + print STDERR "Key :$key: contains a blank, found in $allInfo{$origkey}\n"; + } + + # If there is no value (no function name to go with the state, + # synthesize one + if ($val eq "") { + $val = $key; + if ($val =~ /^(MPID[A-Z]*_STATE_)+(MPI[A-Z]*)_(\w)(\S+)/) { + $val = "$2_$3" . lc($4); + } + print "Setting value for state $key to $val for entry found in $allInfo{$origkey}\n" if $gVerbose; + } + + if (defined($stateNames{$key})) { + if ($stateNames{$key} ne $val) { + # There are two possibilities: + # One of the values is cached and the other is an exception + # value, in which case we reject the cached value + # The other possibility is a conflict, which we report. + + print STDERR "\nInconsistent value for state of $key:\n"; + print STDERR "Old : $stateNames{$key} in $stateLoc{$key}\n"; + print STDERR "New : $val in $allInfo{$origkey}\n"; + } + } + else { + $stateNames{$key} = $val; + $stateLoc{$key} = $allInfo{$origkey}; + } + } +} diff --git a/maint/genstates b/maint/genstates new file mode 100755 index 00000000000..8676dbfa840 --- /dev/null +++ b/maint/genstates @@ -0,0 +1,275 @@ +#! /usr/bin/env perl +## +## Copyright (C) by Argonne National Laboratory +## See COPYRIGHT in top-level directory +## + +use File::Find; + +%states = (); + +# Find all the source and header files and parse the states. +find sub +{ + if ($File::Find::name =~ /\.[ich]$/) + { + %local_states = (); + $line_no = 1; + $previous_line_no = 1; + $filename = $File::Find::name; + #printf("opening $_\n"); + open (F, "$_") or die "unable to open $_"; + while () + { + chomp; + if (/STATE_DECL\((.+)\)/) + { + if (!/^#\s*define/) + { + if ($local_states{$1} eq "declared") + { + printf("$filename:$previous_line_no:$line_no\n"); + printf("ERROR: no FUNC_ENTER/EXIT for declared state '$1'\n"); + } +# if ($local_states{$1} eq "entered") +# { +# # This actually could be a nested state declaration of the same name. +# printf("$filename:$line_no\n"); +# printf("ERROR: no FUNC_EXIT for state '$1'\n"); +# } + #printf("state declared: $1\n"); + if (/\s+\\\s*/) + { + # Assume that if the declared state is in a macro then it will be correctly entered and exited. + # Otherwise it is too hard to parse the file. + $local_states{$1} = "exited"; + } + else + { + $local_states{$1} = "declared"; + } + $previous_line_no = $line_no; + } + } + if (/FUNC_ENTER.*\((.+)\)/) + { + if ( (!/^#\s*define/) && (!/\s+\\\s*/) ) + { + if ($local_states{$1} eq "declared") + { + #printf("state entered: '$1'\n"); + $local_states{$1} = "entered"; + } + else + { + if (!defined($local_states{$1})) + { + printf("$filename:$line_no\n"); + printf("ERROR: FUNC_ENTER for undefined state '$1'\n"); + } + if ($local_states{$1} eq "entered") + { + printf("$filename:$line_no\n"); + printf("ERROR: FUNC_ENTER repeated for state '$1'\n"); + } +# if ($local_states{$1} eq "exited") +# { +# printf("$filename:$line_no\n"); +# printf("Warning: FUNC_ENTER after FUNC_EXIT for state '$1'\n"); +# } + } + } + } + if (/FUNC_EXIT.*\((.+)\)/) + { + if ( (!/^#\s*define/) && (!/\s+\\\s*/) ) + { + if (($local_states{$1} eq "entered") || ($local_states{$1} eq "exited")) + { + #printf("state exited: $1\n"); + $local_states{$1} = "exited"; + } + else + { + if (!defined($local_states{$1})) + { + printf("$filename:$line_no\n"); + printf("ERROR: FUNC_EXIT for undefined state '$1'\n"); + } + if ($local_states{$1} eq "declared") + { + printf("$filename:$line_no\n"); + printf("ERROR: FUNC_EXIT without FUNC_ENTER for state '$1'\n"); + } + } + } + } + $line_no = $line_no + 1; + } + close F; + foreach (keys(%local_states)) + { + if ($local_states{$_} eq "declared") + { + printf("$filename:\n"); + printf("ERROR: no FUNC_ENTER/EXIT for declared state $_\n"); + } + else + { + if ($local_states{$_} eq "entered") + { + printf("$filename:\n"); + printf("ERROR: FUNC_ENTER without FUNC_EXIT for state $_\n"); + } + else + { + if (!($_ eq "")) + { + $states{$_} = "NULL"; + } + } + } + } + } +}, "src"; + +@states = sort keys(%states); + +# Remove the MPID_STATE_ prefix +foreach (@states) +{ + if ( !($_ eq "") ) + { + /(MPID_STATE_)(.+)/; + $display_names{"$1$2"} = "$2"; + } +} + +# Find all the describe_states.txt files and parse them +find sub +{ + if ($_ eq "describe_states.txt") + { + open F, $_; + $line_no = 1; + while () + { + chomp; + # Check for a line with a display name and a color + /\s*(\S+)(\s+)(\S+)(\s+)(\d+)(\s+)(\d+)(\s+)(\d+).*/; + if (defined($1) && defined($2) && defined($3) && defined($4) && defined($5) && defined($6) && defined($7) && defined($8) && defined($9)) + { + if (!defined($states{$1})) + { + printf("Warning1: described state '$1' not used, consider removing it from $File::Find::name:$line_no\n"); + } + $display_names{$1} = "$3"; + $states{$1} = "\"$5 $7 $9\""; + } + else + { + # Check for a line with just a color + /\s*(\S+)(\s+)(\d+)(\s+)(\d+)(\s+)(\d+).*/; + if (defined($1) && defined($2) && defined($3) && defined($4) && defined($5) && defined($6) && defined($7)) + { + if (!defined($states{$1})) + { + printf("Warning2: described state '$1' not used, consider removing it from $File::Find::name:$line_no\n"); + } + $states{$1} = "\"$3 $5 $7\""; + } + else + { + # Check for a line with just a display name + /\s*(\S+)(\s+)(\S+).*/; + if (defined($1) && defined($2) && defined($3)) + { + if (!defined($states{$1})) + { + printf("Warning3: described state '$1' not used, consider removing it from $File::Find::name:$line_no\n"); + } + $display_names{$1} = "$3"; + } + } + } + $line_no = $line_no + 1; + } + close F; + } +}, "src"; + +# FIXME: It would be better to assemble this from just the relevant +# modules, rather than all files. A directory-based approach, such as +# that from extractstrings, could be used. +# +open HFILE, ">src/include/mpiallstates.h" + or die "Unable to open src/include/mpiallstates.h"; +print HFILE "/*\n"; +print HFILE " * Copyright (C) by Argonne National Laboratory\n"; +print HFILE " * See COPYRIGHT in top-level directory\n"; +print HFILE " */\n"; +print HFILE "\n"; +print HFILE "/* automatically generated by maint/genstates */\n"; +print HFILE "\n"; +print HFILE "#ifndef MPIALLSTATES_H_INCLUDED\n"; +print HFILE "#define MPIALLSTATES_H_INCLUDED\n"; +print HFILE "\n"; +print HFILE "/* Insert all the states to be logged here */\n"; +print HFILE "\n"; +print HFILE "enum MPID_TIMER_STATE\n"; +print HFILE "{\n"; +foreach (@states) +{ + if ( !($_ eq "") ) + { + print HFILE "$_,\n"; + } +} +print HFILE "MPID_NUM_TIMER_STATES\n"; +print HFILE "};\n"; +print HFILE "\n"; +print HFILE "#endif\n"; +close HFILE; + +# FIXME: This is RLOG specific and should be placed in the appropriate +# RLOG directory, not common. +# FIXME: It would also make more sense for the RLOG_Describe_state routine +# to perform the random color assignment when provided with an empty +# or null color string, rather than including all of this code in what is +# otherwise an RLOG-specific file. + +open F, ">src/util/logging/common/describe_states.c" + or die "Unable to open src/util/logging/common/describe_states.c"; +print F "/*\n"; +print F " * Copyright (C) by Argonne National Laboratory\n"; +print F " * See COPYRIGHT in top-level directory\n"; +print F " */\n"; +print F "\n"; +print F "/* automatically generated by maint/genstates */\n"; +print F "\n"; +print F "#include \"mpiimpl.h\"\n"; +print F "\n"; +print F "/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build\n"; +print F " the MPI routines */\n"; +print F "#ifndef MPICH_MPI_FROM_PMPI\n"; +print F "\n"; +print F "#ifdef HAVE_TIMING\n"; +print F "\n"; +print F "#if (USE_LOGGING == MPICH_LOGGING__RLOG)\n"; +print F "\n"; +print F "int MPII_Describe_timer_states()\n"; +print F "{\n"; +print F "\n"; +foreach (@states) +{ + if ( !($_ eq "") ) + { + print F " RLOG_DescribeState(g_pRLOG, $_, \"$display_names{$_}\", $states{$_});\n"; + } +} +print F " return 0;\n"; +print F "}\n"; +print F "\n"; +print F "#endif /* USE_LOGGING == MPICH_LOGGING__RLOG */\n"; +print F "#endif /* HAVE_TIMING */\n"; +print F "#endif /* MPICH_MPI_FROM_PMPI */\n"; diff --git a/mock/almalinux-9-x86_64.cfg b/mock/almalinux-9-x86_64.cfg new file mode 120000 index 00000000000..97d97bf3ccf --- /dev/null +++ b/mock/almalinux-9-x86_64.cfg @@ -0,0 +1 @@ +/etc/mock/almalinux-9-x86_64.cfg \ No newline at end of file diff --git a/mock/logging.ini b/mock/logging.ini new file mode 120000 index 00000000000..49f7059a31b --- /dev/null +++ b/mock/logging.ini @@ -0,0 +1 @@ +/etc/mock/logging.ini \ No newline at end of file diff --git a/mock/rocky+epel-8-x86_64.cfg b/mock/rocky+epel-8-x86_64.cfg new file mode 100644 index 00000000000..97139b3e334 --- /dev/null +++ b/mock/rocky+epel-8-x86_64.cfg @@ -0,0 +1,171 @@ +include('templates/rocky-8.tpl') +include('templates/epel-8.tpl') + +config_opts['root'] = 'rocky+epel-8-x86_64' +config_opts['description'] = 'Rocky Linux 8 + EPEL' +config_opts['target_arch'] = 'x86_64' +config_opts['legal_host_arches'] = ('x86_64',) +config_opts['module_setup_commands'] = [ + ('enable', 'javapackages-tools:201801'), + ('disable', 'go-toolset') +] +config_opts['dnf.conf'] += """ +[main] +best=0 +""" +config_opts['yum.conf'] += """ + +# can't use group repos, as they don't get signed properly: https://www.jfrog.com/jira/browse/RTFACT-26590 +# Also group repos are not working all CentOS/Alma/Rocky 8 releases. +#[daos_ci-rocky8-group-artifactory] +#name=daos_ci-rocky8-group +#baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-$releasever-$basearch-group/ +#enabled=1 +#gpgcheck=1 +## repomd.xml.key is missing in this repo: https://www.jfrog.com/jira/browse/RTFACT-26586 +##gpgkey=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-$releasever-$basearch-group/repodata/repomd.xml.key +#gpgkey=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-el-8-$basearch-release-group/repodata/repomd.xml.key +#repo_gpgcheck=1 + +[daos_ci-rocky8-base-artifactory] +name=daos_ci-rocky8-base-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/BaseOS/$basearch/os/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-rockyofficial + +[daos_ci-rocky8-extras-artifactory] +name=daos_ci-rocky8-extras-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/extras/$basearch/os/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-rockyofficial + +[daos_ci-rocky8-appstream-artifactory] +name=daos_ci-rocky8-appstream-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/AppStream/$basearch/os/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-rockyofficial + +[daos_ci-rocky8-powertools-artifactory] +name=daos_ci-rocky8-powertools-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/PowerTools/$basearch/os/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-rockyofficial + +[daos_ci-rocky8-base-artifactory-debuginfo] +name=daos_ci-rocky8-base-artifactory-debuginfo +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/BaseOS/$basearch/debug/tree +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-rockyofficial + +[daos_ci-rocky8-extras-artifactory-debuginfo] +name=daos_ci-rocky8-extras-artifactory-debuginfo +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/extras/$basearch/debug/tree +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-rockyofficial + +[daos_ci-rocky8-appstream-artifactory-debuginfo] +name=daos_ci-rocky8-appstream-artifactory-debuginfo +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/AppStream/$basearch/debug/tree +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-rockyofficial + +[daos_ci-rocky8-powertools-artifactory-debuginfo] +name=daos_ci-rocky8-powertools-artifactory-debuginfo +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/PowerTools/$basearch/debug/tree +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-rockyofficial + +[daos_ci-el8-epel-artifactory] +name=daos_ci-el8-epel-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/fedora-proxy/epel/8/Everything/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/epel/RPM-GPG-KEY-EPEL-8 + +[daos_ci-el8-epel-modular-artifactory] +name=daos_ci-el8-epel-modular-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/fedora-proxy/epel/8/Modular/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/epel/RPM-GPG-KEY-EPEL-8 + +[daos-stack-deps-el-8-x86_64-stable-local-artifactory] +name=daos-stack-deps-el-8-x86_64-stable-local-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-deps-el-8-x86_64-stable-local/ +enabled=1 +gpgcheck=0 +gpgkey=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-deps-el-8-x86_64-stable-local/repodata/repomd.xml.key +repo_gpgcheck=1 + +[daos-stack-daos-el-8-x86_64-stable-local-artifactory] +name=daos-stack-daos-el-8-x86_64-stable-local-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-daos-el-8-x86_64-stable-local/ +enabled=1 +gpgcheck=0 +gpgkey=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-daos-el-8-x86_64-stable-local/repodata/repomd.xml.key +repo_gpgcheck=1 + +[daos_ci-intel-tools-el-8-x86_64-stable-local-artifactory] +name=daos_ci-intel-tools-el-8-x86_64-stable-local-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/intel-tools-el-8-$basearch-stable-local/ +enabled=1 +gpgcheck=0 +gpgkey=https://artifactory.dc.hpdd.intel.com/artifactory/intel-tools-el-8-$basearch-stable-local/repodata/repomd.xml.key +repo_gpgcheck=1 +[argobots:PR-24:lastSuccessfulBuild] +name=argobots:PR-24:lastSuccessfulBuild +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/argobots/job/PR-24/lastSuccessfulBuild/artifact/artifacts/el8/ +enabled=1 +gpgcheck=False + +[raft:PR-72:lastSuccessfulBuild] +name=raft:PR-72:lastSuccessfulBuild +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/raft/job/PR-72/lastSuccessfulBuild/artifact/artifacts/el8/ +enabled=1 +gpgcheck=False + +[isa-l:PR-11:lastSuccessfulBuild] +name=isa-l:PR-11:lastSuccessfulBuild +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/isa-l/job/PR-11/lastSuccessfulBuild/artifact/artifacts/el8/ +enabled=1 +gpgcheck=False + +[isa-l_crypto:PR-9:lastSuccessfulBuild] +name=isa-l_crypto:PR-9:lastSuccessfulBuild +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/isa-l_crypto/job/PR-9/lastSuccessfulBuild/artifact/artifacts/el8/ +enabled=1 +gpgcheck=False + +[mercury:PR-102:lastBuild] +name=mercury:PR-102:lastBuild +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/mercury/job/PR-102/lastBuild/artifact/artifacts/el8/ +enabled=1 +gpgcheck=False + +[dpdk:PR-26:lastSuccessfulBuild] +name=dpdk:PR-26:lastSuccessfulBuild +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/dpdk/job/PR-26/lastSuccessfulBuild/artifact/artifacts/el8/ +enabled=1 +gpgcheck=False + +[spdk:PR-59:lastBuild] +name=spdk:PR-59:lastBuild +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/spdk/job/PR-59/lastBuild/artifact/artifacts/el8/ +enabled=1 +gpgcheck=False + +[daos:PR-12176:40] +name=daos:PR-12176:40 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-12176/40/artifact/artifacts/el8/ +enabled=1 +gpgcheck=False + +""" diff --git a/mock/rocky+epel-9-x86_64.cfg b/mock/rocky+epel-9-x86_64.cfg new file mode 100644 index 00000000000..a95faa5f387 --- /dev/null +++ b/mock/rocky+epel-9-x86_64.cfg @@ -0,0 +1,155 @@ +include('rocky-9-x86_64.cfg') +include('templates/epel-9.tpl') + +config_opts['root'] = "rocky+epel-9-{{ target_arch }}" +config_opts['description'] = 'Rocky Linux 9 + EPEL' +config_opts['dnf.conf'] += """ +[main] +best=0 +""" +config_opts['yum.conf'] += """ + +[daos_ci-rocky9-base-artifactory] +name=daos_ci-rocky9-base-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/BaseOS/$basearch/os/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-Rocky-9 + +[daos_ci-rocky9-base-debug-artifactory] +name=daos_ci-rocky9-base-debug-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/BaseOS/$basearch/debug/tree/ +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-Rocky-9 + +[daos_ci-rocky9-extras-artifactory] +name=daos_ci-rocky9-extras-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/extras/$basearch/os/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-Rocky-9 + +[daos_ci-rocky9-extras-debug-artifactory] +name=daos_ci-rocky9-extras-debug-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/extras/$basearch/debug/tree/ +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-Rocky-9 + +[daos_ci-rocky9-appstream-artifactory] +name=daos_ci-rocky9-appstream-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/AppStream/$basearch/os/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-Rocky-9 + +[daos_ci-rocky9-appstream-debug-artifactory] +name=daos_ci-rocky9-appstream-debug-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/AppStream/$basearch/debug/tree/ +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-Rocky-9 + +[daos_ci-rocky9-crb-artifactory] +name=daos_ci-rocky9-crb-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/CRB/$basearch/os/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-Rocky-9 + +[daos_ci-rocky9-crb-debug-artifactory] +name=daos_ci-rocky9-crb-debug-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/rocky-all-proxy/$releasever/CRB/$basearch/debug/tree/ +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/rocky/RPM-GPG-KEY-Rocky-9 + +[daos_ci-el9-epel-artifactory] +name=daos_ci-el9-epel-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/fedora-proxy/epel/9/Everything/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/epel/RPM-GPG-KEY-EPEL-9 + +[daos_ci-el-next-epel-9-artifactory] +name=daos_ci-el-next-epel-9-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/fedora-proxy/epel/next/9/Everything/$basearch +enabled=0 +gpgcheck=1 +gpgkey=file:///usr/share/distribution-gpg-keys/epel/RPM-GPG-KEY-EPEL-9 + +[daos-stack-deps-el-9-x86_64-stable-local-artifactory] +name=daos-stack-deps-el-9-x86_64-stable-local-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-deps-el-9-x86_64-stable-local/ +enabled=1 +skip_if_unavailable=1 +gpgcheck=0 +gpgkey=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-deps-el-9-x86_64-stable-local/repodata/repomd.xml.key +repo_gpgcheck=1 + +[daos-stack-daos-el-9-x86_64-stable-local-artifactory] +name=daos-stack-daos-el-9-x86_64-stable-local-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-daos-el-9-x86_64-stable-local/ +enabled=1 +skip_if_unavailable=1 +gpgcheck=0 +gpgkey=https://artifactory.dc.hpdd.intel.com/artifactory/daos-stack-daos-el-9-x86_64-stable-local/repodata/repomd.xml.key +repo_gpgcheck=1 + +[daos_ci-intel-tools-el-8-x86_64-stable-local-artifactory] +name=daos_ci-intel-tools-el-8-x86_64-stable-local-artifactory +baseurl=https://artifactory.dc.hpdd.intel.com/artifactory/intel-tools-el-8-$basearch-stable-local/ +enabled=1 +gpgcheck=0 +gpgkey=https://artifactory.dc.hpdd.intel.com/artifactory/intel-tools-el-8-$basearch-stable-local/repodata/repomd.xml.key +repo_gpgcheck=1 +[argobots:PR-24:6] +name=argobots:PR-24:6 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/argobots/job/PR-24/6/artifact/artifacts/el9/ +enabled=1 +gpgcheck=False + +[raft:PR-72:8] +name=raft:PR-72:8 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/raft/job/PR-72/8/artifact/artifacts/el9/ +enabled=1 +gpgcheck=False + +[isa-l:PR-11:3] +name=isa-l:PR-11:3 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/isa-l/job/PR-11/3/artifact/artifacts/el9/ +enabled=1 +gpgcheck=False + +[isa-l_crypto:PR-9:2] +name=isa-l_crypto:PR-9:2 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/isa-l_crypto/job/PR-9/2/artifact/artifacts/el9/ +enabled=1 +gpgcheck=False + +[mercury:PR-102:1] +name=mercury:PR-102:1 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/mercury/job/PR-102/1/artifact/artifacts/el9/ +enabled=1 +gpgcheck=False + +[dpdk:PR-26:1] +name=dpdk:PR-26:1 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/dpdk/job/PR-26/1/artifact/artifacts/el9/ +enabled=1 +gpgcheck=False + +[spdk:PR-59:2] +name=spdk:PR-59:2 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/spdk/job/PR-59/2/artifact/artifacts/el9/ +enabled=1 +gpgcheck=False + +[daos:PR-12176:16] +name=daos:PR-12176:16 +baseurl=https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-12176/16/artifact/artifacts/el9/ +enabled=1 +gpgcheck=False + +""" diff --git a/mock/rocky-9-x86_64.cfg b/mock/rocky-9-x86_64.cfg new file mode 120000 index 00000000000..e8299db1d00 --- /dev/null +++ b/mock/rocky-9-x86_64.cfg @@ -0,0 +1 @@ +/etc/mock/rocky-9-x86_64.cfg \ No newline at end of file diff --git a/mock/templates b/mock/templates new file mode 120000 index 00000000000..6c502a2d869 --- /dev/null +++ b/mock/templates @@ -0,0 +1 @@ +/etc/mock/templates \ No newline at end of file diff --git a/mpich-3.0.4-rh.patch b/mpich-3.0.4-rh.patch new file mode 100644 index 00000000000..d786abe851b --- /dev/null +++ b/mpich-3.0.4-rh.patch @@ -0,0 +1,116 @@ +diff -upr mpich-3.0.4/src/pm/hydra/configure.ac mpich-3.0.4.new/src/pm/hydra/configure.ac +--- mpich-3.0.4/src/pm/hydra/configure.ac 2013-04-24 10:05:00.000000000 -0400 ++++ mpich-3.0.4.new/src/pm/hydra/configure.ac 2013-09-05 11:49:01.000000000 -0400 +@@ -10,28 +10,6 @@ AC_INIT([Hydra], MPICH_VERSION_m4) + AC_CONFIG_AUX_DIR(confdb) + AC_CONFIG_MACRO_DIR(confdb) + +-# needed by hwloc in embedded mode. Must come very early to avoid +-# bizarre expansion ordering warnings +-AC_CANONICAL_TARGET +-AC_ARG_PROGRAM +- +-dnl must come before LT_INIT, which AC_REQUIREs AC_PROG_CC +-dnl must also come before AC_USE_SYSTEM_EXTENSIONS +-PAC_PROG_CC +- +-# also needed by hwloc in embedded mode, must also come early for expansion +-# ordering reasons +-AC_USE_SYSTEM_EXTENSIONS +- +-# Define -D_DARWIN_C_SOURCE on OS/X to ensure that hwloc will build even if we +-# are building under MPICH with --enable-strict that defined _POSIX_C_SOURCE. +-# Some standard Darwin headers don't build correctly under a strict posix +-# environment. +-AS_CASE([$host], +- [*-*-darwin*], [PAC_APPEND_FLAG([-D_DARWIN_C_SOURCE],[CPPFLAGS])] +-) +- +- + AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.12.3]) + + AM_PROG_AR +@@ -353,54 +331,16 @@ AC_MSG_RESULT([$hydra_topolib_list]) + + hydra_topolibs="`echo $hydra_topolib_list | sed -e 's/:/ /g' -e 's/,/ /g'`" + +-# Unconditionally include the hwloc macros, even if we are using an +-# external hwloc (or hwloc is disabled). This is needed for the +-# AM_CONDITIONALS that we will set later. +-m4_include([tools/topo/hwloc/hwloc/config/hwloc.m4]) +-m4_include([tools/topo/hwloc/hwloc/config/hwloc_check_attributes.m4]) +-m4_include([tools/topo/hwloc/hwloc/config/hwloc_check_visibility.m4]) +-m4_include([tools/topo/hwloc/hwloc/config/hwloc_check_vendor.m4]) +-m4_include([tools/topo/hwloc/hwloc/config/hwloc_components.m4]) +-m4_include([tools/topo/hwloc/hwloc/config/hwloc_pkg.m4]) +- + have_hwloc=no +-for hydra_topolib in ${hydra_topolibs}; do +- case "$hydra_topolib" in +- hwloc) +- if test "$with_hwloc_prefix" = "embedded" ; then +- HWLOC_SETUP_CORE([tools/topo/hwloc/hwloc],[have_hwloc=yes],[have_hwloc=no],[1]) +- # Only build hwloc in embedded mode +- if test "$have_hwloc" = "yes" ; then +- hydra_use_embedded_hwloc=yes +- CFLAGS="$HWLOC_EMBEDDED_CFLAGS $CFLAGS" +- CPPFLAGS="$HWLOC_EMBEDDED_CPPFLAGS $CPPFLAGS" +- LIBS="$HWLOC_EMBEDDED_LIBS $LIBS" +- fi +- else +- AC_CHECK_HEADERS([hwloc.h]) +- # hwloc_topology_set_pid was added in hwloc-1.0.0, which is our minimum +- # required version +- AC_CHECK_LIB([hwloc],[hwloc_topology_set_pid]) +- AC_MSG_CHECKING([if non-embedded hwloc works]) +- if test "$ac_cv_header_hwloc_h" = "yes" -a "$ac_cv_lib_hwloc_hwloc_topology_set_pid" = "yes" ; then +- have_hwloc=yes +- fi +- AC_MSG_RESULT([$have_hwloc]) +- fi +- +- # FIXME: Disable hwloc on Cygwin for now. The hwloc package, atleast as of 1.0.2, +- # does not install correctly on Cygwin +- AS_CASE([$host], [*-*-cygwin], [have_hwloc=no]) +- +- if test "$have_hwloc" = "yes" ; then +- AC_DEFINE(HAVE_HWLOC,1,[Define if hwloc is available]) +- available_topolibs="$available_topolibs hwloc" +- fi +- ;; +- *) +- ;; +- esac +-done ++AC_CHECK_HEADERS([hwloc.h]) ++# hwloc_topology_set_pid was added in hwloc-1.0.0, which is our minimum ++# required version ++AC_CHECK_LIB([hwloc],[hwloc_topology_set_pid]) ++AC_MSG_CHECKING([if non-embedded hwloc works]) ++if test "$ac_cv_header_hwloc_h" = "yes" -a "$ac_cv_lib_hwloc_hwloc_topology_set_pid" = "yes" ; then ++ have_hwloc=yes ++fi ++AC_MSG_RESULT([$have_hwloc]) + + tmp_list= + for hydra_topolib in ${available_topolibs}; do +@@ -424,7 +364,6 @@ fi + + HWLOC_DO_AM_CONDITIONALS + AM_CONDITIONAL([hydra_have_hwloc], [test "${have_hwloc}" = "yes"]) +-AM_CONDITIONAL([hydra_use_embedded_hwloc], [test "${hydra_use_embedded_hwloc}" = "yes"]) + + AC_MSG_CHECKING([available processor topology libraries]) + AC_MSG_RESULT([$available_topolibs]) +diff -upr mpich-3.0.4/src/pm/hydra/autogen.sh mpich-3.0.4.new/src/pm/hydra/autogen.sh +--- mpich-3.0.4/src/pm/hydra/autogen.sh 2013-04-24 10:05:00.000000000 -0400 ++++ mpich-3.0.4.new/src/pm/hydra/autogen.sh 2013-09-05 11:50:18.000000000 -0400 +@@ -8,8 +8,6 @@ fi + + echo "=== running autoreconf in 'mpl' ===" + (cd mpl && $autoreconf ${autoreconf_args:-"-vif"}) +-echo "=== running autoreconf in 'tools/topo/hwloc/hwloc' ===" +-(cd tools/topo/hwloc/hwloc && $autoreconf ${autoreconf_args:-"-vif"}) + $autoreconf ${autoreconf_args:-"-vif"} + + # Remove the autom4te.cache folders for a release-like structure. diff --git a/mpich-3.2.1-9.el8.src.rpm b/mpich-3.2.1-9.el8.src.rpm new file mode 100644 index 00000000000..04b6119158d Binary files /dev/null and b/mpich-3.2.1-9.el8.src.rpm differ diff --git a/mpich-3.2.spec b/mpich-3.2.spec new file mode 100644 index 00000000000..54d593da6e8 --- /dev/null +++ b/mpich-3.2.spec @@ -0,0 +1,540 @@ +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + +Summary: A high-performance implementation of MPI +Name: mpich +Version: 3.2 +Release: 2%{?dist} +License: MIT +Group: Development/Libraries +URL: http://www.mpich.org + +Source0: http://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz +Source1: mpich.macros.in +Source2: mpich.module.in +Patch1: https://trac.mpich.org/projects/mpich/raw-attachment/ticket/2299/0001-pm-remshell-include-MPL-when-linking.patch +Patch2: 0002-pm-gforker-include-MPL-when-linking.patch +Patch3: 0003-soften-version-check.patch +Patch4: 0001-hydra-improve-localhost-detection.patch +Patch5: 0001-Revert-require-automake-1.15.patch +Patch6: 0002-Revert-require-libtool-2.4.3.patch +Patch7: 0003-unbundle-YAML-Tiny.patch +Patch8: 0004-unbundle-hwloc-from-hydra.patch + +# Source100 derived from +# Source100: http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz +# by +# rm -r src/mpid/pamid +# vi src/mpid/Makefile* +# and remove references to pamid +# rm -r src/mpid/ch3/channels/nemesis/netmod/scif +# vi src/src/mpid/ch3/channels/nemesis/netmod/Makefile* +# and remove references to scif +# rm -r src/pm/hydra/tools/topo/hwloc/hwloc +# vi src/pm/hydra/tools/topo/hwloc/Makefile.mk +# and remove references to hwloc +# rm `find * -name 'Makefile.in' -print | grep -v doc/ | grep -v src/mpi/romio/mpi2-other/` +# rm -r contrib www +# rm src/mpi/romio/test/external32.c +# rm `find * -name ar-lib -o -name compile -o -name config.guess -o -name config.sub -o -name depcomp -o -name missing -o -name configure -o -name .state-cache -o -name aclocal.mp -o -name libtool.m4` +# rm README.envvar maint/createcoverage maint/getcoverage src/include/mpichconf.h.in src/include/mpich_param_vals.h src/pm/hydra/include/hydra_config.h.in src/util/logging/common/state_names.h src/util/param/param_vals.c subsys_include.m4 +# more extensive changes need to actually build are included in the mpich-3.0.4-rh.patch file +Source100: mpich-3.0.4-rh.tar.gz +Patch100: mpich-3.0.4-rh.patch + +BuildRequires: libXt-devel, bison, flex, libuuid-devel +BuildRequires: gcc-c++ gcc-gfortran +BuildRequires: hwloc-devel >= 1.5 +BuildRequires: perl, python, perl-Digest-MD5, perl-YAML-Tiny +BuildRequires: automake autoconf libtool gettext +%ifnarch s390 +BuildRequires: valgrind-devel +%endif + +%global common_desc MPICH is a high-performance and widely portable implementation of the Message\ +Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3). The goals of MPICH\ +are: (1) to provide an MPI implementation that efficiently supports different\ +computation and communication platforms including commodity clusters (desktop\ +systems, shared-memory systems, multicore architectures), high-speed networks\ +(10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics) and proprietary high-end\ +computing systems (Blue Gene, Cray) and (2) to enable cutting-edge research in\ +MPI through an easy-to-extend modular framework for other derived\ +implementations.\ +\ +The mpich binaries in this RPM packages were configured to use the default\ +process manager (Hydra) using the default device (ch3). The ch3 device\ +was configured with support for the nemesis channel that allows for\ +shared-memory and TCP/IP sockets based communication. + +%description +%{common_desc} + +%package 3.2 +Summary: A high-performance implementation of MPI +Group: Development/Libraries +Obsoletes: mpich2 < 1.5-4 +Obsoletes: mpich-libs < 1.1.1 +Obsoletes: mpich-mpd < 1.4.1 +Obsoletes: mpich < 3.0.4-9 +Provides: mpi +Requires: environment-modules + +%description 3.2 +%{common_desc} + +%package 3.2-autoload +Summary: Load mpich 3.2 automatically into profile +Group: System Environment/Base +Requires: mpich-3.2 = %{version}-%{release} + +%description 3.2-autoload +This package contains profile files that make mpich 3.2 automatically loaded. + +%package 3.2-devel +Summary: Development files for mpich-3.2 +Group: Development/Libraries +Provides: mpi-devel +Obsoletes: mpich-devel < 3.0.4-9 +Requires: mpich-3.2 = %{version}-%{release} +Requires: pkgconfig +Requires: gcc-gfortran + +%description 3.2-devel +Contains development headers and libraries for mpich 3.2. + +%package 3.2-doc +Summary: Documentations and examples for mpich 3.2 +Group: Documentation +BuildArch: noarch +Obsoletes: mpich-doc < 3.0.4-9 +Requires: mpich-3.2-devel = %{version}-%{release} + +%description 3.2-doc +Contains documentations, examples and manpages for mpich 3.2. + +%package 3.0 +Summary: MPICH 3.0.x implementation of MPI +Group: Development/Libraries +Version: 3.0.4 +Release: 10%{?dist} +Obsoletes: mpich2 < 1.5-4 +Obsoletes: mpich-libs < 1.1.1 +Obsoletes: mpich-mpd < 1.4.1 +Obsoletes: mpich < 3.0.4-9 +Provides: mpi +Provides: mpich = %{version}-%{release} +Provides: mpich%{?_isa} = %{version}-%{release} +Requires: environment-modules + +%description 3.0 +%{common_desc} + +This package provides compatibility for applications compiled with MPICH 3.0.4. + +%package 3.0-autoload +Summary: Load mpich 3.0 automatically into profile +Group: System Environment/Base +Version: %{version} +Release: %{release} +Obsoletes: mpich-autoload < 3.0.4-9 +Provides: mpich-autoload = %{version}-%{release} +Requires: mpich-3.0 = %{version}-%{release} + +%description 3.0-autoload +This package contains profile files that make mpich 3.0 automatically loaded. + +%package 3.0-devel +Summary: Development files for mpich-3.0 +Group: Development/Libraries +Version: %{version} +Release: %{release} +Provides: mpi-devel +Obsoletes: mpich-devel < 3.0.4-9 +Provides: mpich-devel = %{version}-%{release} +Requires: mpich-3.0 = %{version}-%{release} +Requires: pkgconfig +Requires: gcc-gfortran + +%description 3.0-devel +Contains development headers and libraries for mpich 3.0. + +%package 3.0-doc +Summary: Documentations and examples for mpich 3.0 +Group: Documentation +Version: %{version} +Release: %{release} +BuildArch: noarch +Obsoletes: mpich-doc < 3.0.4-9 +Provides: mpich-doc = %{version}-%{release} +Requires: mpich-3.0-devel = %{version}-%{release} + +%description 3.0-doc +Contains documentations, examples and manpages for mpich 3.0. + +# We only compile with gcc, but other people may want other compilers. +# Set the compiler here. +%{!?opt_cc: %global opt_cc gcc} +%{!?opt_fc: %global opt_fc gfortran} +%{!?opt_f77: %global opt_f77 gfortran} +# Optional CFLAGS to use with the specific compiler...gcc doesn't need any, +# so uncomment and undefine to NOT use +%{!?opt_cc_cflags: %global opt_cc_cflags %{optflags}} +%{!?opt_fc_fflags: %global opt_fc_fflags %{optflags}} +#%{!?opt_fc_fflags: %global opt_fc_fflags %{optflags} -I%{_fmoddir}} +%{!?opt_f77_fflags: %global opt_f77_fflags %{optflags}} + +%prep +%setup -q -b 100 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 + + # bundled knem module + rm -r contrib/ + # bundled YAML::Tiny + rm -r maint/local_perl/ + # bundled hwloc + rm -r src/pm/hydra/tools/topo/hwloc/hwloc/ + # HTML manpages + rm -r www/ + + ./autogen.sh +cd .. + +cd mpich-3.0.4 +%patch100 -p1 -b .rh + + ./autogen.sh + cd src/pm/hydra && ./autogen.sh && cd ../../.. +cd .. + +%build +cd .. + +%ifarch s390 +%global m_option -m31 +%else +%global m_option -m%{__isa_bits} +%endif + +%ifarch %{arm} aarch64 +%global m_option "" +%endif + +%global selected_channels ch3:nemesis + +%ifarch %{ix86} x86_64 s390 %{arm} aarch64 +%global XFLAGS -fPIC +%endif + +%global variant mpich-3.2 +%global libname %{variant} +%global namearch %{variant}-%{_arch} + +cd mpich-3.2 +%configure \ + --enable-sharedlibs=gcc \ + --enable-shared \ + --enable-static=no \ + --enable-lib-depend \ + --disable-rpath \ + --disable-silent-rules \ + --enable-fc \ + --with-device=%{selected_channels} \ + --with-pm=hydra:gforker \ + --sysconfdir=%{_sysconfdir}/%{namearch} \ + --includedir=%{_includedir}/%{namearch} \ + --bindir=%{_libdir}/%{libname}/bin \ + --libdir=%{_libdir}/%{libname}/lib \ + --datadir=%{_datadir}/%{libname} \ + --mandir=%{_mandir}/%{libname} \ + --docdir=%{_docdir}/%{libname} \ + --with-hwloc-prefix=system \ + FC=%{opt_fc} \ + F77=%{opt_f77} \ + CFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + CXXFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + FCFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + FFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + LDFLAGS='-Wl,-z,noexecstack' \ + MPICH2LIB_CFLAGS="%{?opt_cc_cflags}" \ + MPICH2LIB_CXXFLAGS="%{optflags}" \ + MPICH2LIB_FCFLAGS="%{?opt_fc_fflags}" \ + MPICH2LIB_FFLAGS="%{?opt_f77_fflags}" +# MPICH2LIB_LDFLAGS='-Wl,-z,noexecstack' \ +# MPICH2_MPICC_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ +# MPICH2_MPICXX_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ +# MPICH2_MPIFC_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ +# MPICH2_MPIF77_FLAGS="%{m_option} -O2 %{?XFLAGS}" +# --with-openpa-prefix=embedded \ + +# FCFLAGS="%{?opt_fc_fflags} -I%{_fmoddir}/%{name} %{?XFLAGS}" \ + +# Remove rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +make %{?_smp_mflags} V=1 +cd .. + + +%ifarch s390 +%global m_option -m31 +%else +%global m_option -m%{__isa_bits} +%endif + +%ifarch %{arm} aarch64 +%global m_option "" +%endif + +%ifarch %{ix86} x86_64 +%global selected_channels ch3:nemesis +%else +%global selected_channels ch3:sock +%endif + +%ifarch %{ix86} x86_64 s390 %{arm} +%global XFLAGS -fPIC +%endif + +%global variant mpich +%global libname %{variant} +%global namearch %{variant}-%{_arch} + +cd mpich-3.0.4 +%configure \ + --enable-sharedlibs=gcc \ + --enable-shared \ + --enable-lib-depend \ + --disable-rpath \ + --enable-fc \ + --with-device=%{selected_channels} \ + --with-pm=hydra:gforker \ + --sysconfdir=%{_sysconfdir}/%{namearch} \ + --includedir=%{_includedir}/%{namearch} \ + --bindir=%{_libdir}/%{libname}/bin \ + --libdir=%{_libdir}/%{libname}/lib \ + --datadir=%{_datadir}/%{libname} \ + --mandir=%{_mandir}/%{libname} \ + --docdir=%{_docdir}/%{libname} \ + --with-hwloc-prefix=system \ + FC=%{opt_fc} \ + F77=%{opt_f77} \ + CFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + CXXFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + FCFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + FFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + LDFLAGS='-Wl,-z,noexecstack' \ + MPICH2LIB_CFLAGS="%{?opt_cc_cflags}" \ + MPICH2LIB_CXXFLAGS="%{optflags}" \ + MPICH2LIB_FCFLAGS="%{?opt_fc_fflags}" \ + MPICH2LIB_FFLAGS="%{?opt_f77_fflags}" +# MPICH2LIB_LDFLAGS='-Wl,-z,noexecstack' \ +# MPICH2_MPICC_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ +# MPICH2_MPICXX_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ +# MPICH2_MPIFC_FLAGS="%{m_option} -O2 %{?XFLAGS}" \ +# MPICH2_MPIF77_FLAGS="%{m_option} -O2 %{?XFLAGS}" +# --with-openpa-prefix=embedded \ + +# FCFLAGS="%{?opt_fc_fflags} -I%{_fmoddir}/%{name} %{?XFLAGS}" \ +#make %{?_smp_mflags} doesn't work +make V=1 +cd .. + +%install +cd .. + +finish_install() { + local VARIANT="$1" + local LIBNAME="$VARIANT" + local NAMEARCH="$VARIANT-%{_arch}" + + find %{buildroot}%{_libdir}/$LIBNAME/lib -name \*.la -delete + mkdir -p %{buildroot}/%{_fmoddir}/$NAMEARCH + mkdir -p %{buildroot}%{python_sitearch}/$LIBNAME + + # Make the environment-modules file + mkdir -p %{buildroot}%{_sysconfdir}/modulefiles/mpi + sed "s#@LIBDIR@#%{_libdir}/$LIBNAME#g; + s#@ETCDIR@#%{_sysconfdir}/$NAMEARCH#g; + s#@FMODDIR@#%{_fmoddir}/$NAMEARCH#g; + s#@INCDIR@#%{_includedir}/$NAMEARCH#g; + s#@MANDIR@#%{_mandir}/$LIBNAME#g; + s#@PYSITEARCH@#%{python_sitearch}/$LIBNAME#g; + s#@COMPILER@#$NAMEARCH#g; + s#@SUFFIX@#_$LIBNAME#g" \ + < %SOURCE2 \ + > %{buildroot}%{_sysconfdir}/modulefiles/mpi/$NAMEARCH + + # Make the profile script for autoload + mkdir -p %{buildroot}%{_sysconfdir}/profile.d + cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/$NAMEARCH.sh +# Load mpich environment module +module load mpi/$NAMEARCH +EOF + cp -p %{buildroot}%{_sysconfdir}/profile.d/$NAMEARCH.{sh,csh} + + # Make the rpm macro file + mkdir -p %{buildroot}/%{_sysconfdir}/rpm + # do not expand _arch + sed "s#@MACRONAME@#${LIBNAME//[-.]/_}#g; + s#@MODULENAME@#$VARIANT-%%{_arch}#" \ + < %SOURCE1 \ + > %{buildroot}/%{_sysconfdir}/rpm/macros.$LIBNAME +} + +cd mpich-3.2 +%make_install +cd .. +finish_install mpich-3.2 + +cd mpich-3.0.4 +%make_install +cd .. +finish_install mpich +rm -f %{buildroot}%{_libdir}/mpich/lib/lib{*mpich*,opa,mpl}.a +ln -s mpich-%{_arch} %{buildroot}%{_sysconfdir}/modulefiles/mpi/mpich-3.0-%{_arch} +ln -s mpich-%{_arch} %{buildroot}%{_sysconfdir}/mpich-3.0-%{_arch} +# Silence rpmlint +sed -i '/^#! \//,1 d' %{buildroot}%{_sysconfdir}/mpich-%{_arch}/mpi*.conf + +%global variant mpich-3.2 +%global libname %{variant} +%global namearch %{variant}-%{_arch} + +%files 3.2 +%defattr(-,root,root,-) +%doc CHANGES COPYRIGHT README RELEASE_NOTES +%dir %{_libdir}/%{libname} +%dir %{_libdir}/%{libname}/lib +%dir %{_libdir}/%{libname}/bin +%{_libdir}/%{libname}/lib/*.so.* +%{_libdir}/%{libname}/bin/hydra* +%{_libdir}/%{libname}/bin/mpichversion +%{_libdir}/%{libname}/bin/mpiexec* +%{_libdir}/%{libname}/bin/mpirun +%{_libdir}/%{libname}/bin/mpivars +%dir %{python_sitearch}/%{libname} +%dir %{_fmoddir}/%{namearch} +%{_libdir}/%{libname}/bin/parkill +%dir %{_mandir}/%{libname} +%dir %{_mandir}/%{libname}/man1 +%{_mandir}/%{libname}/man1/mpiexec* +%{_mandir}/%{libname}/man1/hydra* +%dir %{_sysconfdir}/modulefiles/mpi +%{_sysconfdir}/modulefiles/mpi/%{namearch} + +%files 3.2-autoload +%defattr(-,root,root,-) +%{_sysconfdir}/profile.d/%{namearch}.* + +%files 3.2-devel +%defattr(-,root,root,-) +%{_libdir}/%{libname}/bin/mpicc +%{_libdir}/%{libname}/bin/mpicxx +%{_libdir}/%{libname}/bin/mpic++ +%{_libdir}/%{libname}/bin/mpif* +%{_mandir}/%{libname}/man1/mpic* +%{_mandir}/%{libname}/man1/mpif* +%{_includedir}/%{namearch}/ +%{_libdir}/%{libname}/lib/*.so +%{_libdir}/%{libname}/lib/pkgconfig/ +%config %{_sysconfdir}/rpm/macros.%{libname} + +%files 3.2-doc +%defattr(-,root,root,-) +%{_docdir}/%{libname} +%{_mandir}/%{libname}/man3/ + +%global variant mpich +%global libname %{variant} +%global namearch %{variant}-%{_arch} + +%files 3.0 +%defattr(-,root,root,-) +%doc COPYRIGHT +%dir %{_libdir}/%{libname} +%dir %{_libdir}/%{libname}/lib +%dir %{_libdir}/%{libname}/bin +%{_libdir}/%{libname}/lib/*.so.* +%{_libdir}/%{libname}/bin/hydra* +%{_libdir}/%{libname}/bin/mpichversion +%{_libdir}/%{libname}/bin/mpiexec* +%{_libdir}/%{libname}/bin/mpirun +%dir %{python_sitearch}/%{libname} +%dir %{_fmoddir}/%{namearch} +%{_libdir}/%{libname}/bin/parkill +%dir %{_mandir}/%{libname} +%dir %{_mandir}/%{libname}/man1 +%{_mandir}/%{libname}/man1/mpiexec* +%dir %{_sysconfdir}/modulefiles/mpi +%{_sysconfdir}/modulefiles/mpi/%{namearch} +%{_sysconfdir}/modulefiles/mpi/mpich-3.0-%{_arch} + +%files 3.0-autoload +%defattr(-,root,root,-) +%{_sysconfdir}/profile.d/%{namearch}.* + +%files 3.0-devel +%defattr(-,root,root,-) +%{_libdir}/%{libname}/bin/mpicc +%{_libdir}/%{libname}/bin/mpicxx +%{_libdir}/%{libname}/bin/mpic++ +%{_libdir}/%{libname}/bin/mpif* +%{_mandir}/%{libname}/man1/mpic* +%{_mandir}/%{libname}/man1/mpif* +%config %{_sysconfdir}/%{namearch}/ +%{_sysconfdir}/mpich-3.0-%{_arch} +%{_includedir}/%{namearch}/ +%{_libdir}/%{libname}/lib/*.so +%{_libdir}/%{libname}/lib/pkgconfig/ +%config %{_sysconfdir}/rpm/macros.%{libname} + +%files 3.0-doc +%defattr(-,root,root,-) +%{_docdir}/%{libname} +%{_mandir}/%{libname}/man3/ + +%changelog +* Fri Jul 29 2016 Michal Schmidt - 3.2-2 +- Remove bad rpath in two binaries in mpich-3.2. +- Restore trimming of shebang lines in config files in mpich-3.0-devel. +- Related: rhbz1091532 + +* Wed Jun 22 2016 Michal Schmidt - 3.2-1 +- Update to upstream version mpich-3.2 with patches from Fedora. +- Keep 3.0.4 as 'mpich-3.0' for backwards compatibility. +- Resolves: rhbz1091532 +- Resolves: rhbz1142117 +- Resolves: rhbz1148992 + +* Wed Sep 10 2014 Yaakov Selkowitz - 3.0.4-8 +- Do not use -m64 on AArch64 + Resolves: rhbz1077315 + +* Mon Mar 3 2014 Jay Fenlason - 3.0.4-7 +- Update build flags to fix + Resolves: rhbz1070778 + +* Fri Jan 24 2014 Daniel Mach - 3.0.4-6 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 3.0.4-5 +- Mass rebuild 2013-12-27 + +* Fri Oct 4 2013 Jay Fenlason 3.0.4-4.el7 +- Fix the module file to contain all the definitions we expect. + Resolves: rhbz1001469 + +* Wed Oct 2 2013 Jay Fenlason 3.0.4-3.el7 +- Fix macros.mpich + Resolves: rhbz1001469 + +* Fri Sep 6 2013 Jay Fenlason 3.0.4-1.el7 +- Initial import for RHEL, using sanitized source tarball. + diff --git a/mpich-3.3.tar.gz.dist b/mpich-3.3.tar.gz.dist new file mode 100644 index 00000000000..473a830ea15 Binary files /dev/null and b/mpich-3.3.tar.gz.dist differ diff --git a/mpich-3.4~a2.tar.gz.old b/mpich-3.4~a2.tar.gz.old new file mode 100644 index 00000000000..fac8a388450 Binary files /dev/null and b/mpich-3.4~a2.tar.gz.old differ diff --git a/mpich-EL_7.spec b/mpich-EL_7.spec index 5423dfd90b3..64d9b4c324c 100644 --- a/mpich-EL_7.spec +++ b/mpich-EL_7.spec @@ -1,7 +1,7 @@ Summary: A high-performance implementation of MPI Name: mpich -Version: 4.0~a2 -Release: 3%{?dist} +Version: 4.1~a1 +Release: 1%{?dist} License: MIT URL: http://www.mpich.org/ @@ -168,8 +168,8 @@ mpich support for Python 3. %setup -q -n mpich-%{upstream_version} # we patched autoconf.ac (and friends) so need to regnerate configure ./autogen.sh -%patch0 -p1 -%patch1 -p1 +%patch -P 0 -p1 +%patch -P 1 -p1 %build %configure \ @@ -344,8 +344,11 @@ find %{buildroot} -type f -name "*.la" -delete %{python3_sitearch}/%{name}.pth %changelog +* Thu May 25 2023 Brian J. Murrell - 4.1~a1-1 +- Update to 4.1a1 + * Mon Apr 11 2022 Mohamad Chaarawi - 4.0~a2-3 -- remove with-pm setting and use default +- Remove with-pm setting and use default * Mon Nov 15 2021 Wang Shilong - 4.0~a2-2 - Rebuilt for breaking DAOS API change @@ -354,7 +357,7 @@ find %{buildroot} -type f -name "*.la" -delete - Update to 4.0a2 git hash 65dcaccf3 * Fri Aug 6 2021 Mohamad Chaarawi - 4.0~a1-2 -- remove --with-cart +- Remove --with-cart * Thu Jun 03 2021 Brian J. Murrell - 4.0~a1-1 - Build with DAOS diff --git a/mpich-EL_8.spec b/mpich-EL_8.spec index effb5aed66c..25d7abcb03a 100644 --- a/mpich-EL_8.spec +++ b/mpich-EL_8.spec @@ -4,11 +4,12 @@ Summary: A high-performance implementation of MPI Name: mpich -Version: 4.0~a2 +Version: 4.1~a1 Release: 3%{?dist} License: MIT URL: http://www.mpich.org/ + # upstream_version is version with ~ removed %{lua: rpm.define("upstream_version " .. string.gsub(rpm.expand("%{version}"), "~", "")) @@ -20,6 +21,7 @@ Source2: mpich.pth.py3 Patch0: mpich-modules.patch Patch1: fix-version.patch +BuildRequires: gcc-c++ BuildRequires: gcc-gfortran %ifarch %{valgrind_arches} BuildRequires: valgrind-devel @@ -30,6 +32,9 @@ BuildRequires: rpm-mpi-hooks BuildRequires: automake BuildRequires: libtool >= 2.4.4 BuildRequires: daos-devel +%if 0%{?rhel} > 8 +BuildRequires: perl-lib +%endif # this really should be Requires: by daos-devel BuildRequires: libuuid-devel Provides: mpi @@ -39,7 +44,17 @@ Provides: bundled(hwloc) = 2.4.1 # Make sure this package is rebuilt with correct Python version when updating # Otherwise mpi.req from rpm-mpi-hooks doesn't work # https://bugzilla.redhat.com/show_bug.cgi?id=1705296 +%{warn:python ver1: %{python3_version}} +%{!?python3_version: %global python3_version 3.9} +%{warn:python ver2: %{python3_version}} +%global python3_version 3.9 +%{warn:python ver3: %{python3_version}} +%if 0%{?rhel} == 88 +Requires: python(abi) = %{python3_version} +%else +# this doesn't seem to work with mock any more for EL8, so see above Requires: (python(abi) = %{python3_version} if python3) +%endif %description MPICH is a high-performance and widely portable implementation of the Message @@ -96,7 +111,7 @@ Contains documentations, examples and man-pages for mpich %package -n python3-mpich Summary: mpich support for Python 3 Group: Development/Libraries -Provides: python-mpich +Provides: python-mpich Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python(abi) = %{python3_version} @@ -242,8 +257,11 @@ make check VERBOSE=1 \ %{python3_sitearch}/%{name}.pth %changelog +* Thu May 25 2023 Brian J. Murrell - 4.1~a1-1 +- Update to 4.1a1 + * Mon Apr 11 2022 Mohamad Chaarawi - 4.0~a2-3 -- remove with-pm setting and use default +- Remove with-pm setting and use default * Mon Nov 15 2021 Wang Shilong - 4.0~a2-2 - Rebuilt for breaking DAOS API change @@ -252,7 +270,7 @@ make check VERBOSE=1 \ - Update to 4.0a2 git hash 65dcaccf3 * Fri Aug 6 2021 Mohamad Chaarawi - 4.0~a1-2 -- remove --with-cart +- Remove --with-cart * Thu Jun 03 2021 Brian J. Murrell - 4.0~a1-1 - Build with DAOS diff --git a/mpich-EL_9.spec b/mpich-EL_9.spec new file mode 100644 index 00000000000..25d7abcb03a --- /dev/null +++ b/mpich-EL_9.spec @@ -0,0 +1,483 @@ +# this is needed until we can use the system hwloc (2.2.0) in EL8.4 +# as the build hardening breaks the embedded hwloc build +%undefine _hardened_build + +Summary: A high-performance implementation of MPI +Name: mpich +Version: 4.1~a1 +Release: 3%{?dist} +License: MIT +URL: http://www.mpich.org/ + + +# upstream_version is version with ~ removed +%{lua: + rpm.define("upstream_version " .. string.gsub(rpm.expand("%{version}"), "~", "")) +} + +Source0: http://www.mpich.org/static/downloads/%{upstream_version}/%{name}-%{upstream_version}.tar.gz +Source1: mpich.macros +Source2: mpich.pth.py3 +Patch0: mpich-modules.patch +Patch1: fix-version.patch + +BuildRequires: gcc-c++ +BuildRequires: gcc-gfortran +%ifarch %{valgrind_arches} +BuildRequires: valgrind-devel +%endif +# For %%{python3_sitearch} +BuildRequires: python3-devel +BuildRequires: rpm-mpi-hooks +BuildRequires: automake +BuildRequires: libtool >= 2.4.4 +BuildRequires: daos-devel +%if 0%{?rhel} > 8 +BuildRequires: perl-lib +%endif +# this really should be Requires: by daos-devel +BuildRequires: libuuid-devel +Provides: mpi +Requires: environment(modules) +Provides: bundled(hwloc) = 2.4.1 + +# Make sure this package is rebuilt with correct Python version when updating +# Otherwise mpi.req from rpm-mpi-hooks doesn't work +# https://bugzilla.redhat.com/show_bug.cgi?id=1705296 +%{warn:python ver1: %{python3_version}} +%{!?python3_version: %global python3_version 3.9} +%{warn:python ver2: %{python3_version}} +%global python3_version 3.9 +%{warn:python ver3: %{python3_version}} +%if 0%{?rhel} == 88 +Requires: python(abi) = %{python3_version} +%else +# this doesn't seem to work with mock any more for EL8, so see above +Requires: (python(abi) = %{python3_version} if python3) +%endif + +%description +MPICH is a high-performance and widely portable implementation of the Message +Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3). The goals of MPICH +are: (1) to provide an MPI implementation that efficiently supports different +computation and communication platforms including commodity clusters (desktop +systems, shared-memory systems, multicore architectures), high-speed networks +(10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics) and proprietary high-end +computing systems (Blue Gene, Cray) and (2) to enable cutting-edge research in +MPI through an easy-to-extend modular framework for other derived +implementations. + +The mpich binaries in this RPM packages were configured to use the default +process manager (Hydra) using the default device (ch3). The ch3 device +was configured with support for the nemesis channel that allows for +shared-memory and TCP/IP sockets based communication. + +This build also include support for using the 'module environment' to select +which MPI implementation to use when multiple implementations are installed. +If you want MPICH support to be automatically loaded, you need to install the +mpich-autoload package. + +%package autoload +Summary: Load mpich automatically into profile +Group: System Environment/Base +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description autoload +This package contains profile files that make mpich automatically loaded. + +%package devel +Summary: Development files for mpich +Group: Development/Libraries +Provides: %{name}-devel-static = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig +Requires: gcc-gfortran +Requires: rpm-mpi-hooks +Requires: redhat-rpm-config +Requires: daos-devel + +%description devel +Contains development headers and libraries for mpich + +%package doc +Summary: Documentations and examples for mpich +Group: Documentation +BuildArch: noarch +Requires: %{name}-devel = %{version}-%{release} + +%description doc +Contains documentations, examples and man-pages for mpich + +%package -n python3-mpich +Summary: mpich support for Python 3 +Group: Development/Libraries +Provides: python-mpich +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python(abi) = %{python3_version} + +%description -n python3-mpich +mpich support for Python 3. + +%prep +%autosetup -p1 -n mpich-%{upstream_version} + +%build +./autogen.sh + +CONFIGURE_OPTS=( + --enable-sharedlibs=gcc + --enable-shared + --enable-static=no + --enable-lib-depend + --disable-rpath + --disable-silent-rules + --enable-fc + --with-device=ch3:nemesis + --includedir=%{_includedir}/%{name}-%{_arch} + --bindir=%{_libdir}/%{name}/bin + --libdir=%{_libdir}/%{name}/lib + --datadir=%{_datadir}/%{name} + --mandir=%{_mandir}/%{name}-%{_arch} + --docdir=%{_datadir}/%{name}/doc + --htmldir=%{_datadir}/%{name}/doc + --with-hwloc=embedded + --enable-fortran=all + --enable-romio + --with-file-system=ufs+daos + --with-daos=/usr + --disable-checkerrors + --disable-perftest + --disable-large-tests + --disable-ft-tests + --disable-comm-overlap-tests + --enable-threads=single +) + +%configure "${CONFIGURE_OPTS[@]}" + +# Remove rpath +sed -r -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -r -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +#Try and work around 'unused-direct-shlib-dependency' rpmlint warnning +sed -i -e 's| -shared | -Wl,--as-needed\0|g' libtool + +%make_build VERBOSE=1 + +%install +%make_install + +mkdir -p %{buildroot}%{_fmoddir}/%{name} +mv %{buildroot}%{_includedir}/%{name}-*/*.mod %{buildroot}%{_fmoddir}/%{name}/ +sed -r -i 's|^modincdir=.*|modincdir=%{_fmoddir}/%{name}|' %{buildroot}%{_libdir}/%{name}/bin/mpifort + +# Install the module file +mkdir -p %{buildroot}%{_datadir}/modulefiles/mpi +sed -r 's|%{_bindir}|%{_libdir}/%{name}/bin|; + s|@LIBDIR@|%{_libdir}/%{name}|; + s|@MPINAME@|%{name}|; + s|@py3sitearch@|%{python3_sitearch}|; + s|@ARCH@|%{_arch}|; + s|@fortranmoddir@|%{_fmoddir}|; + ' \ + %{buildroot}%{_datadir}/modulefiles/mpi/%{name}-%{_arch} + +mkdir -p %{buildroot}%{_sysconfdir}/profile.d +cat >%{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.sh < - 4.1~a1-1 +- Update to 4.1a1 + +* Mon Apr 11 2022 Mohamad Chaarawi - 4.0~a2-3 +- Remove with-pm setting and use default + +* Mon Nov 15 2021 Wang Shilong - 4.0~a2-2 +- Rebuilt for breaking DAOS API change + +* Tue Oct 5 2021 Mohamad Chaarawi - 4.0~a2-1 +- Update to 4.0a2 git hash 65dcaccf3 + +* Fri Aug 6 2021 Mohamad Chaarawi - 4.0~a1-2 +- Remove --with-cart + +* Thu Jun 03 2021 Brian J. Murrell - 4.0~a1-1 +- Build with DAOS +- Update to 4.0a1 git hash 032b3aeb2 +- Added switches to configure: + --disable-checkerrors + --disable-perftest + --disable-large-tests + --disable-ft-tests + --disable-comm-overlap-tests + --enable-threads=single + +* Thu May 27 2021 Honggang Li - 3.4.1-1 +- Sync with Fedora build +- Update to latest upstream release 3.4.1 +- Resolves: rhbz#1960076 + +* Thu Oct 15 2020 Honggang Li - 3.3.2-9 +- Fix a dependency typo +- Related: rhbz#1850080 + +* Thu Oct 15 2020 Honggang Li - 3.3.2-8 +- Sync with Fedora build +- Update to latest upstream release 3.3.2 +- Resolves: rhbz#1657316, rhbz#1732982, rhbz#1850080 + +* Fri Sep 21 2018 Jarod Wilson - 3.2.1-9 +- Use proper distro compile flags throughout build +- Related: rhbz#1624144 + +* Thu Sep 13 2018 Jarod Wilson - 3.2.1-8 +- Remove python2 bits entirely, fix mpi lib dependencies +- Remove obsolete Provides/Obsoletes for mpich2 +- Resolves: rhbz#1628628 + +* Fri Aug 3 2018 Florian Weimer - 3.2.1-7 +- Honor %%{valgrind_arches} + +* Thu May 17 2018 Charalampos Stratakis - 3.2.1-6 +- Do not build the python2 subpackage on EL > 7 + +* Wed Apr 4 2018 Zbigniew Jędrzejewski-Szmek - 3.2.1-5 +- Update MANPATH so that normal man pages can still be found (#1533717) + +* Thu Feb 08 2018 Fedora Release Engineering - 3.2.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Feb 01 2018 Ralf Corsépius - 3.2.1-3 +- Rebuilt for GCC-8.0.1. + +* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-2 +- Update $modincdir in mpifort after moving .mod files (#1301533) +- Move compiler wrappers to mpich-devel (#1353621) +- Remove bogus rpath (#1361586) + +* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-1 +- Update to latest bugfix release (#1512188) + +* Thu Aug 03 2017 Fedora Release Engineering - 3.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 3.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 3.2-7 +- Rebuild for Python 3.6 + +* Wed Nov 2 2016 Orion Poplawski - 3.2-7 +- Split python support into sub-packages + +* Wed Mar 30 2016 Michal Toman - 3.2-6 +- Fix build on MIPS + +* Thu Feb 04 2016 Fedora Release Engineering - 3.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 22 2016 Orion Poplawski - 3.2-4 +- Add patch to allow -host localhost to work on builders + +* Wed Jan 20 2016 Orion Poplawski - 3.2-3 +- Use nemesis channel on all platforms + +* Wed Dec 9 2015 Zbigniew Jędrzejewski-Szmek - 3.2-2 +- Soften version check (#1289779) + +* Tue Dec 1 2015 Zbigniew Jędrzejewski-Szmek - 3.2-1 +- Update to latest version + +* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-9 +- Update requires and fix MPI_FORTRAN_MOD_DIR var + +* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-8 +- Move fortran .mod files to %%{_fmoddir}/mpich (#1154991) +- Move man pages to arch-specific dir (#1264359) + +* Tue Nov 10 2015 Fedora Release Engineering - 3.1.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Aug 27 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-6 +- Use .pth files to set the python path (https://fedorahosted.org/fpc/ticket/563) +- Cleanups to the spec file + +* Sun Jul 26 2015 Sandro Mani - 3.1.4-5 +- Require, BuildRequire: rpm-mpi-hooks + +* Wed Jun 17 2015 Fedora Release Engineering - 3.1.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 9 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-3 +- Change MPI_SYCONFIG to /etc/mpich-x86_64 (#1196728) + +* Fri Mar 13 2015 Orion Poplawski - 3.1.4-2 +- Set PKG_CONFIG_DIR (bug #1113627) +- Fix modulefile names and python paths (bug#1201343) + +* Wed Mar 11 2015 Orion Poplawski - 3.1.4-1 +- Update to 3.1.4 +- Own and set PKG_CONFIG_DIR (bug #1113627) +- Do not ship old modulefile location (bug #921534) + +* Sun Aug 17 2014 Fedora Release Engineering - 3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Feb 21 2014 Ville Skyttä - 3.1-2 +- Install rpm macros to %%{_rpmconfigdir}/macros.d as non-%%config. + +* Fri Feb 21 2014 Deji Akingunola - 3.1-1 +- Update to 3.1 + +* Mon Jan 6 2014 Peter Robinson 3.0.4-7 +- Set the aarch64 compiler options + +* Fri Dec 13 2013 Peter Robinson 3.0.4-6 +- Now have valgrind on ARMv7 +- No valgrind on aarch64 + +* Fri Aug 23 2013 Orion Poplawski - 3.0.4-5 +- Add %%check + +* Sat Aug 03 2013 Fedora Release Engineering - 3.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sat Jul 20 2013 Deji Akingunola - 3.0.4-3 +- Add proper Provides and Obsoletes for the sub-packages + +* Thu Jul 18 2013 Deji Akingunola - 3.0.4-2 +- Fix some of the rpmlint warnings from package review (BZ #973493) + +* Wed Jun 12 2013 Deji Akingunola - 3.0.4-1 +- Update to 3.0.4 + +* Thu Feb 21 2013 Deji Akingunola - 3.0.2-1 +- Update to 3.0.2 +- Rename to mpich. +- Drop check for old alternatives' installation + +* Thu Feb 14 2013 Fedora Release Engineering - 1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Nov 1 2012 Orion Poplawski - 1.5-1 +- Update to 1.5 +- Drop destdir-fix and mpicxx-und patches +- Update rpm macros to use the new module location + +* Wed Oct 31 2012 Orion Poplawski - 1.4.1p1-9 +- Install module file in mpi subdirectory and conflict with other mpi modules +- Leave existing module file location for backwards compatibility for a while + +* Fri Jul 20 2012 Fedora Release Engineering - 1.4.1p1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Feb 15 2012 Peter Robinson - 1.4.1p1-7 +- Rebuild for new hwloc + +* Wed Feb 15 2012 Peter Robinson - 1.4.1p1-6 +- Update ARM build configuration + +* Fri Jan 13 2012 Fedora Release Engineering - 1.4.1p1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Jan 2 2012 Jussi Lehtola - 1.4.1p1-4 +- Bump spec. + +* Wed Nov 16 2011 Jussi Lehtola - 1.4.1p1-3 +- Comply to MPI guidelines by separating autoloading into separate package + (BZ #647147). + +* Tue Oct 18 2011 Deji Akingunola - 1.4.1p1-2 +- Rebuild for hwloc soname bump. + +* Sun Sep 11 2011 Deji Akingunola - 1.4.1p1-1 +- Update to 1.4.1p1 patch update +- Add enable-lib-depend to configure flags + +* Sat Aug 27 2011 Deji Akingunola - 1.4.1-1 +- Update to 1.4.1 final +- Drop the mpd subpackage, the PM is no longer supported upstream +- Fix undefined symbols in libmpichcxx (again) (#732926) + +* Wed Aug 03 2011 Jussi Lehtola - 1.4-2 +- Respect environment module guidelines wrt placement of module file. + +* Fri Jun 17 2011 Deji Akingunola - 1.4-1 +- Update to 1.4 final diff --git a/mpich-LEAP_15.spec b/mpich-LEAP_15.spec index 9820ee6abe3..ce3acd22564 100644 --- a/mpich-LEAP_15.spec +++ b/mpich-LEAP_15.spec @@ -22,8 +22,8 @@ %define pname mpich -%define vers 4.0~a2 -%define _vers 4_0 +%define vers 4.1~a1 +%define _vers 4_1 %define build_flavor ofi %{bcond_with hpc} @@ -198,9 +198,9 @@ the dynamic library and headers. %{hpc_master_package -a devel} %{hpc_master_package macros-devel} %{hpc_master_package -a devel-static} -%endif # ?with_hpc +%endif -%endif # ! testsuite +%endif %prep %if %{with hpc} @@ -331,7 +331,7 @@ cat << EOF > %{buildroot}%{_moduledir}/.version #%%Module1.0 set ModulesVersion "%{version}" EOF -%else # with hpc +%else install -d -m 755 %{buildroot}%{_sysconfdir}/rpm cp %{S:3} %{buildroot}%{_sysconfdir}/rpm @@ -371,7 +371,7 @@ sed -e "s/export/setenv/" -e "s/=/ /" \ %{buildroot}/%{p_bindir}/mpivars.sh > \ %{buildroot}/%{p_bindir}/mpivars.csh mkdir -p %{buildroot}%{_sysconfdir}/rpm -%endif # with hpc +%endif # Install the .pth files # bjm - borrowed from the EL7 spec. not sure how SUSE typically does this @@ -455,9 +455,9 @@ fi %files macros-devel %defattr(-,root,root) %config %{_sysconfdir}/rpm/macros.hpc-mpich -%endif # with hpc +%endif -%endif # !testsuite +%endif %changelog * Mon Apr 11 2022 Mohamad Chaarawi - 4.0~a2-4 diff --git a/mpich-UBUNTU_20_04.spec b/mpich-UBUNTU_20_04.spec new file mode 120000 index 00000000000..ecbbd2cee0a --- /dev/null +++ b/mpich-UBUNTU_20_04.spec @@ -0,0 +1 @@ +mpich-EL_8.spec \ No newline at end of file diff --git a/mpich-c8s.spec b/mpich-c8s.spec new file mode 100644 index 00000000000..9515b1ce799 --- /dev/null +++ b/mpich-c8s.spec @@ -0,0 +1,439 @@ +Summary: A high-performance implementation of MPI +Name: mpich +Version: 3.4.1 +Release: 1%{?dist} +License: MIT +URL: https://www.mpich.org/ + +Source0: https://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz +Source1: mpich.macros +Source2: mpich.pth.py3 +Patch0: mpich-modules.patch +Patch1: 0001-Drop-real128.patch +# Drop build flags, e.g. -specs... and -lto from mpi wrappers (mpicc and mpicxx) +# for discussion see: +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/7TFWEKTDWBYBHEGMIWBVI3AVGORZGNBS/ +Patch3: fix_wrapper_flags.patch +# https://github.com/pmodels/mpich/issues/4534 +Patch4: 0001-Revert-Remove-use-of-vasprintf.patch + +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: gcc-gfortran +BuildRequires: hwloc-devel >= 2.2.0 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +# For ./maint/extractcvars +BuildRequires: perl(lib) +%ifnarch s390 %{mips} +BuildRequires: valgrind-devel +%endif +# For %%{python3_sitearch} +BuildRequires: python3-devel +BuildRequires: rpm-mpi-hooks +Provides: mpi +Requires: environment(modules) + +# Make sure this package is rebuilt with correct Python version when updating +# Otherwise mpi.req from rpm-mpi-hooks doesn't work +# https://bugzilla.redhat.com/show_bug.cgi?id=1705296 +Requires: (python(abi) = %{python3_version} if python3) + +%description +MPICH is a high-performance and widely portable implementation of the Message +Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3). The goals of MPICH +are: (1) to provide an MPI implementation that efficiently supports different +computation and communication platforms including commodity clusters (desktop +systems, shared-memory systems, multicore architectures), high-speed networks +(10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics) and proprietary high-end +computing systems (Blue Gene, Cray) and (2) to enable cutting-edge research in +MPI through an easy-to-extend modular framework for other derived +implementations. + +The mpich binaries in this RPM packages were configured to use the default +process manager (Hydra) using the default device (ch3). The ch3 device +was configured with support for the nemesis channel that allows for +shared-memory and TCP/IP sockets based communication. + +This build also include support for using the 'module environment' to select +which MPI implementation to use when multiple implementations are installed. +If you want MPICH support to be automatically loaded, you need to install the +mpich-autoload package. + +%package autoload +Summary: Load mpich automatically into profile +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description autoload +This package contains profile files that make mpich automatically loaded. + +%package devel +Summary: Development files for mpich +Provides: %{name}-devel-static = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig +Requires: gcc-gfortran +Requires: rpm-mpi-hooks +Requires: redhat-rpm-config + +%description devel +Contains development headers and libraries for mpich + +%package doc +Summary: Documentations and examples for mpich +BuildArch: noarch +Requires: %{name}-devel = %{version}-%{release} + +%description doc +Contains documentations, examples and man-pages for mpich + +%package -n python3-mpich +Summary: mpich support for Python 3 +Provides: python-mpich +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python(abi) = %{python3_version} + +%description -n python3-mpich +mpich support for Python 3. + +%prep +%setup -q + +%patch0 -p1 + +%ifarch %{arm} +%patch1 -p1 +%endif + +%patch3 -p1 + +%patch4 -p1 + +%build +./autogen.sh + +CONFIGURE_OPTS=( + --enable-sharedlibs=gcc + --enable-shared + --enable-static=no + --enable-lib-depend + --disable-rpath + --disable-silent-rules + --enable-fortran + --with-gnu-ld + --with-device=ch3:nemesis + --with-pm=hydra:gforker + --includedir=%{_includedir}/%{name}-%{_arch} + --bindir=%{_libdir}/%{name}/bin + --libdir=%{_libdir}/%{name}/lib + --datadir=%{_datadir}/%{name} + --mandir=%{_mandir}/%{name}-%{_arch} + --docdir=%{_datadir}/%{name}/doc + --htmldir=%{_datadir}/%{name}/doc + --with-hwloc-prefix=system +) + +%configure "${CONFIGURE_OPTS[@]}" + +# Remove rpath +sed -r -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -r -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +#Try and work around 'unused-direct-shlib-dependency' rpmlint warnning +sed -i -e 's| -shared | -Wl,--as-needed\0|g' libtool + +# work-around libtool error: cannot determine absolute directory name of 'system/lib' +mkdir -p system/lib + +%make_build VERBOSE=1 + +%install +%make_install + +mkdir -p %{buildroot}%{_fmoddir}/%{name} +mv %{buildroot}%{_includedir}/%{name}-*/*.mod %{buildroot}%{_fmoddir}/%{name}/ +sed -r -i 's|^modincdir=.*|modincdir=%{_fmoddir}/%{name}|' %{buildroot}%{_libdir}/%{name}/bin/mpifort + +# Install the module file +mkdir -p %{buildroot}%{_datadir}/modulefiles/mpi +sed -r 's|%{_bindir}|%{_libdir}/%{name}/bin|; + s|@LIBDIR@|%{_libdir}/%{name}|; + s|@MPINAME@|%{name}|; + s|@py3sitearch@|%{python3_sitearch}|; + s|@ARCH@|%{_arch}|; + s|@fortranmoddir@|%{_fmoddir}|; + ' \ + %{buildroot}%{_datadir}/modulefiles/mpi/%{name}-%{_arch} + +mkdir -p %{buildroot}%{_sysconfdir}/profile.d +cat >%{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.sh < - 3.4.1-1 +- Sync with Fedora build +- Update to latest upstream release 3.4.1 +- Resolves: rhbz#1960076 + +* Thu Oct 15 2020 Honggang Li - 3.3.2-9 +- Fix a dependency typo +- Related: rhbz#1850080 + +* Thu Oct 15 2020 Honggang Li - 3.3.2-8 +- Sync with Fedora build +- Update to latest upstream release 3.3.2 +- Resolves: rhbz#1657316, rhbz#1732982, rhbz#1850080 + +* Fri Sep 21 2018 Jarod Wilson - 3.2.1-9 +- Use proper distro compile flags throughout build +- Related: rhbz#1624144 + +* Thu Sep 13 2018 Jarod Wilson - 3.2.1-8 +- Remove python2 bits entirely, fix mpi lib dependencies +- Remove obsolete Provides/Obsoletes for mpich2 +- Resolves: rhbz#1628628 + +* Fri Aug 3 2018 Florian Weimer - 3.2.1-7 +- Honor %%{valgrind_arches} + +* Thu May 17 2018 Charalampos Stratakis - 3.2.1-6 +- Do not build the python2 subpackage on EL > 7 + +* Wed Apr 4 2018 Zbigniew Jędrzejewski-Szmek - 3.2.1-5 +- Update MANPATH so that normal man pages can still be found (#1533717) + +* Thu Feb 08 2018 Fedora Release Engineering - 3.2.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Feb 01 2018 Ralf Corsépius - 3.2.1-3 +- Rebuilt for GCC-8.0.1. + +* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-2 +- Update $modincdir in mpifort after moving .mod files (#1301533) +- Move compiler wrappers to mpich-devel (#1353621) +- Remove bogus rpath (#1361586) + +* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-1 +- Update to latest bugfix release (#1512188) + +* Thu Aug 03 2017 Fedora Release Engineering - 3.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 3.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 3.2-7 +- Rebuild for Python 3.6 + +* Wed Nov 2 2016 Orion Poplawski - 3.2-7 +- Split python support into sub-packages + +* Wed Mar 30 2016 Michal Toman - 3.2-6 +- Fix build on MIPS + +* Thu Feb 04 2016 Fedora Release Engineering - 3.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 22 2016 Orion Poplawski - 3.2-4 +- Add patch to allow -host localhost to work on builders + +* Wed Jan 20 2016 Orion Poplawski - 3.2-3 +- Use nemesis channel on all platforms + +* Wed Dec 9 2015 Zbigniew Jędrzejewski-Szmek - 3.2-2 +- Soften version check (#1289779) + +* Tue Dec 1 2015 Zbigniew Jędrzejewski-Szmek - 3.2-1 +- Update to latest version + +* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-9 +- Update requires and fix MPI_FORTRAN_MOD_DIR var + +* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-8 +- Move fortran .mod files to %%{_fmoddir}/mpich (#1154991) +- Move man pages to arch-specific dir (#1264359) + +* Tue Nov 10 2015 Fedora Release Engineering - 3.1.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Aug 27 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-6 +- Use .pth files to set the python path (https://fedorahosted.org/fpc/ticket/563) +- Cleanups to the spec file + +* Sun Jul 26 2015 Sandro Mani - 3.1.4-5 +- Require, BuildRequire: rpm-mpi-hooks + +* Wed Jun 17 2015 Fedora Release Engineering - 3.1.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 9 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-3 +- Change MPI_SYCONFIG to /etc/mpich-x86_64 (#1196728) + +* Fri Mar 13 2015 Orion Poplawski - 3.1.4-2 +- Set PKG_CONFIG_DIR (bug #1113627) +- Fix modulefile names and python paths (bug#1201343) + +* Wed Mar 11 2015 Orion Poplawski - 3.1.4-1 +- Update to 3.1.4 +- Own and set PKG_CONFIG_DIR (bug #1113627) +- Do not ship old modulefile location (bug #921534) + +* Sun Aug 17 2014 Fedora Release Engineering - 3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Feb 21 2014 Ville Skyttä - 3.1-2 +- Install rpm macros to %%{_rpmconfigdir}/macros.d as non-%%config. + +* Fri Feb 21 2014 Deji Akingunola - 3.1-1 +- Update to 3.1 + +* Mon Jan 6 2014 Peter Robinson 3.0.4-7 +- Set the aarch64 compiler options + +* Fri Dec 13 2013 Peter Robinson 3.0.4-6 +- Now have valgrind on ARMv7 +- No valgrind on aarch64 + +* Fri Aug 23 2013 Orion Poplawski - 3.0.4-5 +- Add %%check + +* Sat Aug 03 2013 Fedora Release Engineering - 3.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sat Jul 20 2013 Deji Akingunola - 3.0.4-3 +- Add proper Provides and Obsoletes for the sub-packages + +* Thu Jul 18 2013 Deji Akingunola - 3.0.4-2 +- Fix some of the rpmlint warnings from package review (BZ #973493) + +* Wed Jun 12 2013 Deji Akingunola - 3.0.4-1 +- Update to 3.0.4 + +* Thu Feb 21 2013 Deji Akingunola - 3.0.2-1 +- Update to 3.0.2 +- Rename to mpich. +- Drop check for old alternatives' installation + +* Thu Feb 14 2013 Fedora Release Engineering - 1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Nov 1 2012 Orion Poplawski - 1.5-1 +- Update to 1.5 +- Drop destdir-fix and mpicxx-und patches +- Update rpm macros to use the new module location + +* Wed Oct 31 2012 Orion Poplawski - 1.4.1p1-9 +- Install module file in mpi subdirectory and conflict with other mpi modules +- Leave existing module file location for backwards compatibility for a while + +* Fri Jul 20 2012 Fedora Release Engineering - 1.4.1p1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Feb 15 2012 Peter Robinson - 1.4.1p1-7 +- Rebuild for new hwloc + +* Wed Feb 15 2012 Peter Robinson - 1.4.1p1-6 +- Update ARM build configuration + +* Fri Jan 13 2012 Fedora Release Engineering - 1.4.1p1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Jan 2 2012 Jussi Lehtola - 1.4.1p1-4 +- Bump spec. + +* Wed Nov 16 2011 Jussi Lehtola - 1.4.1p1-3 +- Comply to MPI guidelines by separating autoloading into separate package + (BZ #647147). + +* Tue Oct 18 2011 Deji Akingunola - 1.4.1p1-2 +- Rebuild for hwloc soname bump. + +* Sun Sep 11 2011 Deji Akingunola - 1.4.1p1-1 +- Update to 1.4.1p1 patch update +- Add enable-lib-depend to configure flags + +* Sat Aug 27 2011 Deji Akingunola - 1.4.1-1 +- Update to 1.4.1 final +- Drop the mpd subpackage, the PM is no longer supported upstream +- Fix undefined symbols in libmpichcxx (again) (#732926) + +* Wed Aug 03 2011 Jussi Lehtola - 1.4-2 +- Respect environment module guidelines wrt placement of module file. + +* Fri Jun 17 2011 Deji Akingunola - 1.4-1 +- Update to 1.4 final diff --git a/mpich.macros.in b/mpich.macros.in new file mode 100644 index 00000000000..7232d2fc3bd --- /dev/null +++ b/mpich.macros.in @@ -0,0 +1,7 @@ +%_@MACRONAME@_load \ + . /etc/profile.d/modules.sh; \ + module load mpi/@MODULENAME@; \ + export CFLAGS="$CFLAGS %{optflags}"; +%_@MACRONAME@_unload \ + . /etc/profile.d/modules.sh; \ + module unload mpi/@MODULENAME@; diff --git a/mpich.module.in b/mpich.module.in new file mode 100644 index 00000000000..418e4ff27ba --- /dev/null +++ b/mpich.module.in @@ -0,0 +1,20 @@ +#%Module 1.0 +# +# MPICH module for use with 'environment-modules' package: +# +conflict mpi +prepend-path PATH @LIBDIR@/bin +prepend-path LD_LIBRARY_PATH @LIBDIR@/lib +prepend-path PYTHONPATH @PYSITEARCH@ +prepend-path MANPATH @MANDIR@ +prepend-path PKG_CONFIG_PATH @LIBDIR@/lib/pkgconfig +setenv MPI_BIN @LIBDIR@/bin +setenv MPI_SYSCONFIG @ETCDIR@ +setenv MPI_FORTRAN_MOD_DIR @FMODDIR@ +setenv MPI_INCLUDE @INCDIR@ +setenv MPI_LIB @LIBDIR@/lib +setenv MPI_MAN @MANDIR@ +setenv MPI_PYTHON_SITEARCH @PYSITEARCH@ +setenv MPI_COMPILER @COMPILER@ +setenv MPI_SUFFIX @SUFFIX@ +setenv MPI_HOME @LIBDIR@ diff --git a/mpich.rpmlintrc b/mpich.rpmlintrc new file mode 100644 index 00000000000..7a9d8b7947c --- /dev/null +++ b/mpich.rpmlintrc @@ -0,0 +1,10 @@ +# This line is mandatory to access the configuration functions +from Config import * + +addFilter('python3-mpich.x86_64: E: useless-provides python-mpich') +addFilter('mpich-devel.x86_64: E: rpath-in-buildconfig /usr/lib64/mpich/lib/pkgconfig/mpich.pc lines 12') +addFilter('mpich-autoload.x86_64: E: no-binary') +addFilter('mpich.src: E: invalid-spec-name') +addFilter('mpich-doc.noarch: E: devel-dependency mpich-devel') +addFilter('mpich.x86_64: E: standard-dir-owned-by-package /usr/share/doc') +addFilter('mpich-devel.x86_64: E: rpath-in-buildconfig /usr/lib64/mpi/gcc/mpich/lib64/pkgconfig/mpich.pc lines 12') \ No newline at end of file diff --git a/packaging/Dockerfile.centos.7 b/packaging/Dockerfile.centos.7 index 55510f72c47..cdfb7f69784 100644 --- a/packaging/Dockerfile.centos.7 +++ b/packaging/Dockerfile.centos.7 @@ -1,12 +1,12 @@ # -# Copyright 2018-2021, Intel Corporation +# Copyright 2018-2022, Intel Corporation # # 'recipe' for Docker to build an RPM # # Pull base image FROM centos:7 -MAINTAINER daos-stack +LABEL maintainer="daos@daos.groups.io" # use same UID as host and default value of 1000 if not specified ARG UID=1000 diff --git a/packaging/Dockerfile.mockbuild b/packaging/Dockerfile.mockbuild index 38d376034cd..c804819061a 100644 --- a/packaging/Dockerfile.mockbuild +++ b/packaging/Dockerfile.mockbuild @@ -1,5 +1,5 @@ # -# Copyright 2018-2022, Intel Corporation +# Copyright 2018-2022 Intel Corporation # # 'recipe' for Docker to build an RPM # @@ -8,14 +8,24 @@ FROM fedora:latest LABEL maintainer="daos@daos.groups.io" -# use same UID as host and default value of 1000 if not specified -ARG UID=1000 +# Use local repo server if present +ARG REPO_FILE_URL +RUN if [ -n "$REPO_FILE_URL" ]; then \ + cd /etc/yum.repos.d/ && \ + curl -f -o daos_ci-fedora-artifactory.repo.tmp \ + "$REPO_FILE_URL"daos_ci-fedora-artifactory.repo && \ + rm -f *.repo && \ + mv daos_ci-fedora-artifactory.repo{.tmp,}; \ + fi # Install basic tools -RUN dnf -y install mock make \ - rpm-build curl createrepo rpmlint redhat-lsb-core git \ +RUN dnf -y install mock make \ + rpm-build createrepo rpmlint redhat-lsb-core git \ python-srpm-macros rpmdevtools +# use same UID as host and default value of 1000 if not specified +ARG UID=1000 + # Add build user (to keep rpmbuild happy) ENV USER build ENV PASSWD build @@ -24,10 +34,24 @@ RUN echo "$USER:$PASSWD" | chpasswd # add the user to the mock group so it can run mock RUN usermod -a -G mock $USER -# mock in Docker needs to use the old-chroot option -RUN grep use_nspawn /etc/mock/site-defaults.cfg || \ - echo "config_opts['use_nspawn'] = False" >> /etc/mock/site-defaults.cfg - -ARG CACHEBUST +ARG CB0 RUN dnf -y upgrade && \ dnf clean all + +# Monkey-patch rpmlint until a new release is made with +# https://github.com/rpm-software-management/rpmlint/pull/795 in it +# But make sure to patch after dnf upgrade so that an upgraded rpmlint +# RPM doesn't wipe out our patch +COPY packaging/rpmlint--ignore-unused-rpmlintrc.patch . +RUN (cd $(python3 -c 'import site; print(site.getsitepackages()[-1])') && \ + if ! grep -e --ignore-unused-rpmlintrc rpmlint/cli.py; then \ + if ! patch -p1; then \ + exit 1; \ + fi; \ + rm -f rpmlint/__pycache__/{cli,lint}.*.pyc; \ + fi) < rpmlint--ignore-unused-rpmlintrc.patch; \ + rm -f rpmlint--ignore-unused-rpmlintrc.patch + +# show the release that was built +ARG CACHEBUST +RUN cat /etc/os-release diff --git a/packaging/Dockerfile.ubuntu.20.04 b/packaging/Dockerfile.ubuntu.20.04 index f95614540e1..ec76bfd1086 100644 --- a/packaging/Dockerfile.ubuntu.20.04 +++ b/packaging/Dockerfile.ubuntu.20.04 @@ -7,33 +7,60 @@ FROM ubuntu:20.04 LABEL org.opencontainers.image.authors="daos@daos.groups.io" -# use same UID as host and default value of 1000 if not specified -ARG UID=1000 -ARG REPO_URL="" -ARG REPO_UBUNTU_20_04="" +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + curl gpg + +ARG REPO_FILE_URL +RUN if [ -n "$REPO_FILE_URL" ]; then \ + cd /etc/apt/sources.list.d && \ + curl -f -o daos_ci-ubuntu20.04-artifactory.list.tmp \ + "$REPO_FILE_URL"daos_ci-ubuntu20.04-artifactory.list && \ + true > ../sources.list && \ + mv daos_ci-ubuntu20.04-artifactory.list.tmp \ + daos_ci-ubuntu20.04-artifactory.list; \ + fi; \ + cd -; \ + curl -f -O "$REPO_FILE_URL"esad_repo.key; \ + gpg --no-default-keyring --keyring ./temp-keyring.gpg \ + --import esad_repo.key; \ + mkdir -p /usr/local/share/keyrings/; \ + gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \ + --output /usr/local/share/keyrings/daos-stack-public.gpg; \ + rm ./temp-keyring.gpg; \ + url_prefix=https://downloads.linux.hpe.com/SDR/; \ + for url in hpPublicKey2048.pub \ + hpPublicKey2048_key1.pub \ + hpePublicKey2048_key1.pub; do \ + curl -f -O "$url_prefix$url"; \ + gpg --no-default-keyring --keyring ./temp-keyring.gpg \ + --import "$(basename $url)"; \ + done; \ + gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \ + --output /usr/local/share/keyrings/hpe-sdr-public.gpg; \ + rm ./temp-keyring.gpg # Install basic tools RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ autoconf bash ca-certificates curl debhelper dh-make \ - dpkg-dev dh-python doxygen gcc git git-buildpackage locales \ - make patch pbuilder pkg-config python3-dev python3-distro \ - python3-distutils rpm scons wget + dpkg-dev dh-python doxygen gcc git git-buildpackage \ + javahelper locales make patch pbuilder pkg-config \ + python3-dev python3-distro python3-distutils rpm scons wget \ + cmake valgrind rpmdevtools -# rpmdevtools -RUN echo "deb [trusted=yes] ${REPO_URL}${REPO_UBUNTU_20_04} focal main" > /etc/apt/sources.list.d/daos-stack-ubuntu-stable-local.list -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - rpmdevtools +# use same UID as host and default value of 1000 if not specified +ARG UID=1000 # Add build user (to keep chrootbuild happy) ENV USER build RUN useradd -u $UID -ms /bin/bash $USER # need to run the build command as root, as it needs to chroot -RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \ - echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \ - fi; \ - echo "Defaults env_keep += \"DPKG_GENSYMBOLS_CHECK_LEVEL\"" > /etc/sudoers.d/build; \ - echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" >> /etc/sudoers.d/build; \ - chmod 0440 /etc/sudoers.d/build; \ - visudo -c; \ +RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \ + echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \ + fi; \ + echo "Defaults env_keep += \"DPKG_GENSYMBOLS_CHECK_LEVEL\"" > /etc/sudoers.d/build; \ + echo "build ALL=(ALL) NOPASSWD: /usr/bin/tee /root/.pbuilderrc" >> /etc/sudoers.d/build; \ + echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" >> /etc/sudoers.d/build; \ + chmod 0440 /etc/sudoers.d/build; \ + visudo -c; \ sudo -l -U build diff --git a/packaging/Makefile_distro_vars.mk b/packaging/Makefile_distro_vars.mk index d1e5767e14e..6a7f88b6072 100644 --- a/packaging/Makefile_distro_vars.mk +++ b/packaging/Makefile_distro_vars.mk @@ -40,10 +40,25 @@ DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist}) VERSION_ID := 8 DISTRO_ID := el8 DISTRO_BASE := EL_8 +ifneq ($(DISTRO_VERSION_EL8),) +override DISTRO_VERSION := $(DISTRO_VERSION_EL8) +endif DISTRO_VERSION ?= $(VERSION_ID) ORIG_TARGET_VER := 8 SED_EXPR := 1s/$(DIST)//p endif +ifeq ($(patsubst %epel-9-x86_64,,$(lastword $(subst +, ,$(CHROOT_NAME)))),) +DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist}) +VERSION_ID := 9 +DISTRO_ID := el9 +DISTRO_BASE := EL_9 +ifneq ($(DISTRO_VERSION_EL9),) +override DISTRO_VERSION := $(DISTRO_VERSION_EL9) +endif +DISTRO_VERSION ?= $(VERSION_ID) +ORIG_TARGET_VER := 9 +SED_EXPR := 1s/$(DIST)//p +endif ifeq ($(CHROOT_NAME),opensuse-leap-15.2-x86_64) VERSION_ID := 15.2 DISTRO_ID := sl15.2 @@ -57,7 +72,15 @@ VERSION_ID := 15.3 DISTRO_ID := sl15.3 DISTRO_BASE := LEAP_15 DISTRO_VERSION ?= $(VERSION_ID) -ORIG_TARGET_VER := 15.2 +ORIG_TARGET_VER := 15.3 +SED_EXPR := 1p +endif +ifeq ($(CHROOT_NAME),opensuse-leap-15.4-x86_64) +VERSION_ID := 15.4 +DISTRO_ID := sl15.4 +DISTRO_BASE := LEAP_15 +DISTRO_VERSION ?= $(VERSION_ID) +ORIG_TARGET_VER := 15.4 SED_EXPR := 1p endif endif diff --git a/packaging/Makefile_packaging.mk b/packaging/Makefile_packaging.mk index a7c2469246a..b19489e481a 100644 --- a/packaging/Makefile_packaging.mk +++ b/packaging/Makefile_packaging.mk @@ -6,7 +6,7 @@ # force bash (looking at you Ubuntu) SHELL=/bin/bash -# Put site overrides (i.e. REPOSITORY_URL, DAOS_STACK_*_LOCAL_REPO) in here +# Put site overrides (i.e. DAOS_STACK_*_LOCAL_REPO) in here -include Makefile.local # default to Leap 15 distro for chrootbuild @@ -19,7 +19,9 @@ endif CALLING_MAKEFILE := $(word 1, $(MAKEFILE_LIST)) -TOPDIR ?= $(CURDIR) +# this Makefile should always be executed from it's own dir +TOPDIR ?= $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) + BUILD_PREFIX ?= . DOT := . @@ -28,11 +30,6 @@ RPM_BUILD_OPTIONS += $(EXTERNAL_RPM_BUILD_OPTIONS) # some defaults the caller can override PACKAGING_CHECK_DIR ?= ../packaging LOCAL_REPOS ?= true -ifeq ($(ID_LIKE),debian) -DAOS_REPO_TYPE ?= LOCAL -else -DAOS_REPO_TYPE ?= STABLE -endif TEST_PACKAGES ?= ${NAME} # unfortunately we cannot always name the repo the same as the project @@ -42,7 +39,9 @@ PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-rep LEAP_15_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-leap15: *\(.*\)/\1/p') EL_7_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-el7: *\(.*\)/\1/p') EL_8_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-el8: *\(.*\)/\1/p') +EL_9_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-el9: *\(.*\)/\1/p') UBUNTU_20_04_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-ubuntu20: *\(.*\)/\1/p') +REPO_FILES_PR ?= $(shell git show -s --format=%B | sed -ne 's/^Repo-files-PR: *\(.*\)/\1/p') ifneq ($(PKG_GIT_COMMIT),) ifeq ($(GITHUB_PROJECT),) @@ -68,7 +67,7 @@ DEB_BUILD := $(DEB_TOP)/$(NAME)-$(VERSION) DEB_TARBASE := $(DEB_TOP)/$(DEB_NAME)_$(VERSION) SOURCE ?= $(eval SOURCE := $(shell CHROOT_NAME=$(CHROOT_NAME) $(SPECTOOL) $(COMMON_RPM_ARGS) -S -l $(SPEC) | sed -e 2,\$$d -e 's/\#/\\\#/g' -e 's/.*: *//'))$(SOURCE) PATCHES ?= $(eval PATCHES := $(shell CHROOT_NAME=$(CHROOT_NAME) $(SPECTOOL) $(COMMON_RPM_ARGS) -l $(SPEC) | sed -ne 1d -e 's/.*: *//' -e 's/.*\///' -e '/\.patch/p'))$(PATCHES) -OTHER_SOURCES := $(eval OTHER_SOURCES := $(shell CHROOT_NAME=$(CHROOT_NAME) $(SPECTOOL) $(COMMON_RPM_ARGS) -l $(SPEC) | sed -ne 1d -e 's/.*: *//' -e 's/.*\///' -e '/\.patch/d' -e p))$(OTHER_SOURCES) +OTHER_SOURCES := $(eval OTHER_SOURCES := $(shell CHROOT_NAME=$(CHROOT_NAME) $(SPECTOOL) $(COMMON_RPM_ARGS) -l $(SPEC) | sed -ne 1d -e '/already present/d' -e '/^Patch.*:/d' -e 's/Source.*: *//' -e 's/.*\///' -e p))$(OTHER_SOURCES) SOURCES := $(addprefix _topdir/SOURCES/,$(notdir $(SOURCE)) $(PATCHES) $(OTHER_SOURCES)) ifeq ($(ID_LIKE),debian) DEBS := $(addsuffix _$(VERSION)-1_amd64.deb,$(shell sed -n '/-udeb/b; s,^Package:[[:blank:]],$(DEB_TOP)/,p' $(TOPDIR)/debian/control)) @@ -86,7 +85,7 @@ define distro_map case $(DISTRO_ID) in \ el7) distro="centos7" \ ;; \ - el8) distro="el8" \ + el*) distro="$(DISTRO_ID)" \ ;; \ sle12.3) distro="sles12.3" \ ;; \ @@ -100,27 +99,29 @@ define distro_map endef define install_repos - IFS='|' read -ra BASES <<< "$($(DISTRO_BASE)_LOCAL_REPOS)"; \ - for baseurl in "$${BASES[@]}"; do \ - baseurl="$${baseurl# *}"; \ - $(call install_repo,$$baseurl); \ - done - for repo in $($(DISTRO_BASE)_PR_REPOS) \ - $(PR_REPOS) $(1); do \ - branch="master"; \ - build_number="lastSuccessfulBuild"; \ - if [[ $$repo = *@* ]]; then \ - branch="$${repo#*@}"; \ - repo="$${repo%@*}"; \ - if [[ $$branch = *:* ]]; then \ - build_number="$${branch#*:}"; \ - branch="$${branch%:*}"; \ - fi; \ - fi; \ - $(call distro_map) \ + if [ "$(ID_LIKE)" = "debian" ]; then \ + IFS='|' read -ra BASES <<< "$($(DISTRO_BASE)_LOCAL_REPOS)"; \ + for baseurl in "$${BASES[@]}"; do \ + baseurl="$${baseurl# *}"; \ + $(call install_repo,$$baseurl) \ + done; \ + fi + for repo in $($(DISTRO_BASE)_PR_REPOS) \ + $(PR_REPOS) $(1); do \ + branch="master"; \ + build_number="lastSuccessfulBuild"; \ + if [[ $$repo = *@* ]]; then \ + branch="$${repo#*@}"; \ + repo="$${repo%@*}"; \ + if [[ $$branch = *:* ]]; then \ + build_number="$${branch#*:}"; \ + branch="$${branch%:*}"; \ + fi; \ + fi; \ + $(call distro_map) \ baseurl=$${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$$repo/job/$$branch/; \ - baseurl+=$$build_number/artifact/artifacts/$$distro/; \ - $(call install_repo,$$baseurl); \ + baseurl+=$$build_number/artifact/artifacts/$$distro/; \ + $(call install_repo,$$baseurl) \ done endef @@ -154,28 +155,8 @@ ifeq ($(DL_NAME),) DL_NAME = $(NAME) endif -$(DL_NAME)$(DL_VERSION).linux-amd64.tar.$(SRC_EXT): $(SPEC) $(CALLING_MAKEFILE) - rm -f ./$(DL_NAME)*.tar{gz,bz*,xz} - $(SPECTOOL) -g $(SPEC) - -$(DL_NAME)-$(DL_VERSION).tar.$(SRC_EXT).asc: $(SPEC) $(CALLING_MAKEFILE) - rm -f ./$(DL_NAME)-*.tar.{gz,bz*,xz}.asc - $(SPECTOOL) -g $(SPEC) - -$(DL_NAME)-$(DL_VERSION).tar.$(SRC_EXT).sig: $(SPEC) $(CALLING_MAKEFILE) - rm -f ./$(DL_NAME)-*.tar.{gz,bz*,xz}.sig - $(SPECTOOL) -g $(SPEC) - -$(DL_NAME)-$(DL_VERSION).tar.$(SRC_EXT): $(SPEC) $(CALLING_MAKEFILE) - rm -f ./$(DL_NAME)-*.tar.{gz,bz*,xz} - $(SPECTOOL) -g $(SPEC) - -v$(DL_VERSION).tar.$(SRC_EXT): $(SPEC) $(CALLING_MAKEFILE) - rm -f ./v*.tar.{gz,bz*,xz} - $(SPECTOOL) -g $(SPEC) - -$(DL_VERSION).tar.$(SRC_EXT): $(SPEC) $(CALLING_MAKEFILE) - rm -f ./*.tar.{gz,bz*,xz} +$(notdir $(SOURCE)): $(SPEC) $(CALLING_MAKEFILE) + # TODO: need to clean up old ones $(SPECTOOL) -g $(SPEC) $(DEB_TOP)/%: % | $(DEB_TOP)/ @@ -291,6 +272,9 @@ $(DEB_TOP)/$(DEB_DSC): $(CALLING_MAKEFILE) $(DEB_BUILD).tar.$(SRC_EXT) \ cd $(DEB_BUILD); dpkg-buildpackage -S --no-sign --no-check-builddeps $(SRPM): $(SPEC) $(SOURCES) + if [ -f bz-1955184_find-requires ]; then \ + chmod 755 bz-1955184_find-requires; \ + fi rpmbuild -bs $(COMMON_RPM_ARGS) $(RPM_BUILD_OPTIONS) $(SPEC) srpm: $(SRPM) @@ -299,6 +283,10 @@ $(RPMS): $(SRPM) $(CALLING_MAKEFILE) rpms: $(RPMS) +repo: rpms + rm -rf _topdir/RPMS/repodata/ + createrepo _topdir/RPMS/ + $(DEBS): $(CALLING_MAKEFILE) debs: $(DEBS) @@ -333,66 +321,23 @@ patch: echo "PKG_GIT_COMMIT is not defined" endif -# *_LOCAL_* repos are locally built packages. -# *_GROUP_* repos are a local mirror of a group of upstream repos. -# *_GROUP_* repos may not supply a repomd.xml.key. -ifeq ($(LOCAL_REPOS),true) - ifneq ($(REPOSITORY_URL),) - # group repos are not working in Nexus so we hack in the group members directly below - #ifneq ($(DAOS_STACK_$(DISTRO_BASE)_DOCKER_$(DAOS_REPO_TYPE)_REPO),) - #DISTRO_REPOS = $(DAOS_STACK_$(DISTRO_BASE)_DOCKER_$(DAOS_REPO_TYPE)_REPO) - #$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)|$(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_DOCKER_$(DAOS_REPO_TYPE)_REPO)/ - #endif - ifneq ($(DAOS_STACK_$(DISTRO_BASE)_$(DAOS_REPO_TYPE)_REPO),) - ifeq ($(ID_LIKE),debian) - # $(DISTRO_BASE)_LOCAL_REPOS is a list separated by | because you cannot pass lists - # of values with spaces as environment variables - $(DISTRO_BASE)_LOCAL_REPOS := [trusted=yes] - else - $(DISTRO_BASE)_LOCAL_REPOS := $(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO) - DISTRO_REPOS = disabled # any non-empty value here works and is not used beyond testing if the value is empty or not - endif # ifeq ($(ID_LIKE),debian) - ifeq ($(DISTRO_BASE), EL_8) - # hack to use 8.3 non-group repos on EL_8 - $(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)|$(subst $(ORIG_TARGET_VER),$(DISTRO_VERSION),$(REPOSITORY_URL)repository/rocky-8.5-base-x86_64-proxy|$(REPOSITORY_URL)repository/rocky-8.5-extras-x86_64-proxy|$(REPOSITORY_URL)repository/epel-el-8-x86_64-proxy) - else ifeq ($(DISTRO_BASE), EL_7) - # hack to use 7.9 non-group repos on EL_7 - $(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)|$(subst $(ORIG_TARGET_VER),$(DISTRO_VERSION),$(REPOSITORY_URL)repository/centos-7.9-base-x86_64-proxy|$(REPOSITORY_URL)repository/centos-7.9-extras-x86_64-proxy|$(REPOSITORY_URL)repository/centos-7.9-updates-x86_64-proxy|$(REPOSITORY_URL)repository/epel-el-7-x86_64-proxy) - else ifeq ($(DISTRO_BASE), LEAP_15) - # hack to use 15 non-group repos on LEAP_15 - $(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)|$(subst $(ORIG_TARGET_VER),$(DISTRO_VERSION),$(REPOSITORY_URL)repository/opensuse-15.2-oss-x86_64-proxy|$(REPOSITORY_URL)repository/opensuse-15.2-update-oss-x86_64-provo-mirror-proxy|$(REPOSITORY_URL)repository/opensuse-15.2-update-non-oss-x86_64-proxy|$(REPOSITORY_URL)repository/opensuse-15.2-non-oss-x86_64-proxy|$(REPOSITORY_URL)repository/opensuse-15.2-repo-sle-update-proxy|$(REPOSITORY_URL)repository/opensuse-15.2-repo-backports-update-proxy) - else - # debian - $(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS) $(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_$(DAOS_REPO_TYPE)_REPO) - endif # ifeq ($(DISTRO_BASE), *) - endif #ifneq ($(DAOS_STACK_$(DISTRO_BASE)_$(DAOS_REPO_TYPE)_REPO),) - ifneq ($(DAOS_STACK_$(DISTRO_BASE)_APPSTREAM_REPO),) - $(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)|$(subst centos-8.3,rocky-8.5,$(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_APPSTREAM_REPO)) - endif - # group repos are not working in Nexus so we hack in the group members directly above - ifneq ($(DAOS_STACK_$(DISTRO_BASE)_POWERTOOLS_REPO),) - $(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)|$(subst centos-8.3,rocky-8.5,$(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_POWERTOOLS_REPO)) - endif - ifneq ($(ID_LIKE),debian) - ifneq ($(DAOS_STACK_INTEL_ONEAPI_REPO),) - $(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)|$(REPOSITORY_URL)$(DAOS_STACK_INTEL_ONEAPI_REPO) - endif # ifneq ($(DAOS_STACK_INTEL_ONEAPI_REPO),) - endif # ifneq ($(ID_LIKE),debian) - endif # ifneq ($(REPOSITORY_URL),) -endif # ifeq ($(LOCAL_REPOS),true) ifeq ($(ID_LIKE),debian) chrootbuild: $(DEB_TOP)/$(DEB_DSC) $(call distro_map) \ DISTRO="$$distro" \ PR_REPOS="$(PR_REPOS)" \ + REPO_FILES_PR="$(REPO_FILES_PR)" \ DISTRO_BASE_PR_REPOS="$($(DISTRO_BASE)_PR_REPOS)" \ JENKINS_URL="$${JENKINS_URL}" \ JOB_REPOS="$(JOB_REPOS)" \ + REPO_FILE_URL="$(REPO_FILE_URL)" \ DISTRO_BASE_LOCAL_REPOS="$($(DISTRO_BASE)_LOCAL_REPOS)" \ VERSION_CODENAME="$(VERSION_CODENAME)" \ DEB_TOP="$(DEB_TOP)" \ DEB_DSC="$(DEB_DSC)" \ DISTRO_ID_OPT="$(DISTRO_ID_OPT)" \ + LOCAL_REPOS='$(LOCAL_REPOS)' \ + ARTIFACTORY_URL="$(ARTIFACTORY_URL)" \ packaging/debian_chrootbuild else chrootbuild: $(SRPM) $(CALLING_MAKEFILE) @@ -400,26 +345,59 @@ chrootbuild: $(SRPM) $(CALLING_MAKEFILE) DISTRO="$$distro" \ CHROOT_NAME="$(CHROOT_NAME)" \ PR_REPOS="$(PR_REPOS)" \ + REPO_FILES_PR="$(REPO_FILES_PR)" \ DISTRO_BASE_PR_REPOS="$($(DISTRO_BASE)_PR_REPOS)" \ JENKINS_URL="$${JENKINS_URL}" \ JOB_REPOS="$(JOB_REPOS)" \ - DISTRO_BASE_LOCAL_REPOS="$($(DISTRO_BASE)_LOCAL_REPOS)" \ + REPO_FILE_URL="$(REPO_FILE_URL)" \ MOCK_OPTIONS="$(MOCK_OPTIONS)" \ RPM_BUILD_OPTIONS='$(RPM_BUILD_OPTIONS)' \ - DISTRO_REPOS='$(DISTRO_REPOS)' \ + LOCAL_REPOS='$(LOCAL_REPOS)' \ + ARTIFACTORY_URL="$(ARTIFACTORY_URL)" \ + DISTRO_VERSION="$(DISTRO_VERSION)" \ TARGET="$<" \ packaging/rpm_chrootbuild endif +podman_chrootbuild: + if ! podman build --build-arg REPO_FILE_URL=$(REPO_FILE_URL) \ + -t $(subst +,-,$(CHROOT_NAME))-chrootbuild \ + -f packaging/Dockerfile.mockbuild .; then \ + echo "Container build failed"; \ + exit 1; \ + fi + rm -f /var/lib/mock/$(CHROOT_NAME)/result/{root,build}.log + if ! podman run --rm --privileged -w $(TOPDIR) -v=$(TOPDIR)/..:$(TOPDIR)/.. \ + -it $(subst +,-,$(CHROOT_NAME))-chrootbuild \ + bash -c 'if ! DISTRO_REPOS=false \ + REPO_FILE_URL=$(REPO_FILE_URL) \ + make REPO_FILES_PR=$(REPO_FILES_PR) \ + MOCK_OPTIONS=$(MOCK_OPTIONS) \ + CHROOT_NAME=$(CHROOT_NAME) -C $(CURDIR) chrootbuild; then \ + cat /var/lib/mock/$(CHROOT_NAME)/{result/{root,build},root/builddir/build/BUILD/*/config}.log; \ + exit 1; \ + fi; \ + rpmlint $$(ls /var/lib/mock/$(CHROOT_NAME)/result/*.rpm | \ + grep -v -e debuginfo -e debugsource -e src.rpm)' + docker_chrootbuild: - $(DOCKER) build --build-arg UID=$$(id -u) -t chrootbuild \ - -f packaging/Dockerfile.mockbuild . - $(DOCKER) run --privileged=true -w $(TOPDIR) -v=$(TOPDIR):$(TOPDIR) \ - -it chrootbuild bash -c "make -C $(CURDIR) \ - CHROOT_NAME=$(CHROOT_NAME) chrootbuild" + if ! $(DOCKER) build --build-arg UID=$$(id -u) -t chrootbuild \ + --build-arg REPO_FILE_URL=$(REPO_FILE_URL) \ + -f packaging/Dockerfile.mockbuild .; then \ + echo "Container build failed"; \ + exit 1; \ + fi + rm -f /var/lib/mock/$(CHROOT_NAME)/result/{root,build}.log + if ! $(DOCKER) run --user=$$(id -u) --privileged=true -w $(TOPDIR) \ + -v=$(TOPDIR):$(TOPDIR) \ + -it chrootbuild bash -c "make -C $(CURDIR) \ + CHROOT_NAME=$(CHROOT_NAME) chrootbuild"; then \ + cat /var/lib/mock/$(CHROOT_NAME)/result/{root,build}.log; \ + exit 1; \ + fi rpmlint: $(SPEC) - rpmlint $< + rpmlint --ignore-unused-rpmlintrc $< packaging_check: if grep -e --repo $(CALLING_MAKEFILE); then \ @@ -439,6 +417,7 @@ packaging_check: --exclude install \ --exclude packaging \ --exclude utils \ + --exclude .vscode \ -bur $(PACKAGING_CHECK_DIR)/ packaging/; then \ exit 1; \ fi @@ -456,6 +435,9 @@ test: $(call install_repos,$(REPO_NAME)@$(BRANCH_NAME):$(BUILD_NUMBER)) dnf -y install $(TEST_PACKAGES) +show_NAME: + @echo '$(NAME)' + show_DISTRO_ID: @echo '$(DISTRO_ID)' diff --git a/packaging/debian_chrootbuild b/packaging/debian_chrootbuild index 5ea4eadaab9..03b232a0aab 100755 --- a/packaging/debian_chrootbuild +++ b/packaging/debian_chrootbuild @@ -2,14 +2,13 @@ set -uex -# shellcheck disable=SC2153 -IFS=\| read -r -a distro_base_local_repos <<< "$DISTRO_BASE_LOCAL_REPOS" +if [ -n "${ARTIFACTORY_URL:-}" ] && "$LOCAL_REPOS"; then + echo "MIRRORSITE=${ARTIFACTORY_URL}artifactory/ubuntu-proxy" | sudo tee /root/.pbuilderrc +fi # shellcheck disable=SC2086 -sudo pbuilder create \ - --extrapackages "gnupg ca-certificates" \ - --othermirror \ - "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $VERSION_CODENAME universe|deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $VERSION_CODENAME-updates main universe" \ +sudo pbuilder create \ + --extrapackages "gnupg ca-certificates" \ $DISTRO_ID_OPT repo_args="" @@ -26,9 +25,18 @@ for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do fi repo_args="$repo_args|deb [trusted=yes] ${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$repo/job/$branch/$build_number/artifact/artifacts/$DISTRO/ ./" done -for repo in $JOB_REPOS "${distro_base_local_repos[@]}"; do - repo_args="$repo_args|deb ${repo} $VERSION_CODENAME main" + +repo_args+="|$(curl -sSf "$REPO_FILE_URL"daos_ci-"$DISTRO"-artifactory.list | + sed -e 's/#.*//' -e '/ubuntu-proxy/d' -e '/^$/d' -e '/^$/d' \ + -e 's/signed-by=.*\.gpg/trusted=yes/' | + sed -e ':a; N; $!ba; s/\n/|/g')" +for repo in $JOB_REPOS; do + repo_args+="|deb ${repo} $VERSION_CODENAME main" done +# NB: This PPA is needed to support modern go toolchains on ubuntu 20.04. +# After the build is updated to use 22.04, which supports go >= 1.18, it +# should no longer be needed. +repo_args="$repo_args|deb [trusted=yes] https://ppa.launchpadcontent.net/longsleep/golang-backports/ubuntu $VERSION_CODENAME main" echo "$repo_args" if [ "$repo_args" = "|" ]; then repo_args="" diff --git a/packaging/rpm_chrootbuild b/packaging/rpm_chrootbuild index 8c1008ec879..bfb49ed37ab 100755 --- a/packaging/rpm_chrootbuild +++ b/packaging/rpm_chrootbuild @@ -2,17 +2,7 @@ set -uex -# shellcheck disable=SC2153 -IFS=\| read -r -a distro_base_local_repos <<< "$DISTRO_BASE_LOCAL_REPOS" -repo_adds=() -repo_dels=() - -if [ -n "${REPOSITORY_URL:-}" ] && [ -n "$DISTRO_REPOS" ]; then - repo_dels+=("--disablerepo=\*") -fi - -: "${WORKSPACE:=$PWD}" -mock_config_dir="$WORKSPACE/mock" +mock_config_dir="${WORKSPACE:-$PWD}/mock" original_cfg_file="/etc/mock/${CHROOT_NAME}.cfg" cfg_file="$mock_config_dir/${CHROOT_NAME}.cfg" mkdir -p "$mock_config_dir" @@ -21,12 +11,66 @@ ln -sf /etc/mock/logging.ini "$mock_config_dir/" cp "$original_cfg_file" "$cfg_file" -if [ "${CHROOT_NAME}" == "epel-8-x86_64" ]; then - echo -e "config_opts['module_enable'] = ['javapackages-tools:201801']" \ - >> "$cfg_file" +if [[ $CHROOT_NAME == *epel-8-x86_64 ]]; then + cat <> "$cfg_file" +config_opts['module_setup_commands'] = [ + ('enable', 'javapackages-tools:201801'), + ('disable', 'go-toolset') +] +EOF +elif [[ $CHROOT_NAME == *epel-9-x86_64 ]]; then + # DO NOT LAND + # waiting for an answer on https://github.com/rpm-software-management/mock/discussions/1078 + ln -sf /etc/mock/almalinux-9-x86_64.cfg "$mock_config_dir" + ln -sf /etc/mock/rocky-9-x86_64.cfg "$mock_config_dir" +fi + +# Use dnf on CentOS 7 +if [[ $CHROOT_NAME == *epel-7-x86_64 ]]; then + MOCK_OPTIONS="--dnf --no-bootstrap-chroot${MOCK_OPTIONS:+ }$MOCK_OPTIONS" fi +# Allow BR: foo-devel < 1.2 to work when foo-devel-1.3 is actually available +cat <> "$cfg_file" +config_opts['dnf.conf'] += """ +[main] +best=0 +""" +EOF + +# shellcheck disable=SC2153 +repo_adds=() +repo_dels=() + echo -e "config_opts['yum.conf'] += \"\"\"\n" >> "$cfg_file" + +if [ -n "${ARTIFACTORY_URL:-}" ] && "$LOCAL_REPOS"; then + repo_dels+=("--disablerepo=\*") + + if [ -n "${REPO_FILE_URL:-}" ]; then + if [ -n "$REPO_FILES_PR" ]; then + if [[ $REPO_FILES_PR = PR-* ]]; then + build_number="lastSuccessfulBuild" + branch="$REPO_FILES_PR" + if [[ $branch = *:* ]]; then + build_number="${branch#*:}" + branch="${branch%:*}" + fi + REPO_FILE_URL="${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-do/job/repo-files/job/$branch/$build_number/artifact/" + else + if [ ! -d "$REPO_FILES_PR" ]; then + echo "Could not find your specified directory \"$REPO_FILES_PR\" to read repo-files from" + exit 1 + fi + REPO_FILE_URL="file://$(readlink -e "$REPO_FILES_PR")/" + fi + fi + curl -sSf "$REPO_FILE_URL"daos_ci-"$DISTRO"-mock-artifactory.repo >> "$cfg_file" + repo_adds+=("--enablerepo *-artifactory") + fi +fi + +repos_added=() for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do branch="master" build_number="lastSuccessfulBuild" @@ -38,25 +82,38 @@ for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do branch="${branch%:*}" fi fi - repo_adds+=("--enablerepo $repo:$branch:$build_number") - echo -e "[$repo:$branch:$build_number]\n\ -name=$repo:$branch:$build_number\n\ -baseurl=${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$repo/job/$branch/$build_number/artifact/artifacts/$DISTRO/\n\ + if [[ " ${repos_added[*]} " = *\ ${repo}\ * ]]; then + # don't add duplicates, first found wins + continue + fi + repos_added+=("$repo") + repo_adds+=("--enablerepo $repo:${branch//[@\/]/_}:$build_number") + echo -e "[$repo:${branch//[@\/]/_}:$build_number]\n\ +name=$repo:${branch//[@\/]/_}:$build_number\n\ +baseurl=${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$repo/job/${branch//\//%2F}/$build_number/artifact/artifacts/$DISTRO/\n\ enabled=1\n\ gpgcheck=False\n" >> "$cfg_file" done -for repo in $JOB_REPOS "${distro_base_local_repos[@]}"; do +for repo in $JOB_REPOS; do repo_name=${repo##*://} repo_name=${repo_name//\//_} + if [[ " ${repos_added[*]} " = *\ ${repo_name}\ * ]]; then + # don't add duplicates, first found wins + continue + fi + repos_added+=("$repo_name") repo_adds+=("--enablerepo $repo_name") - echo -e "[${repo_name//@/_}]\n\ + echo -e "[${repo_name//[@\/]/_}]\n\ name=${repo_name}\n\ -baseurl=${repo}\n\ +baseurl=${repo//\//%2F}\n\ enabled=1\n" >> "$cfg_file" done echo "\"\"\"" >> "$cfg_file" +if [ -n "$DISTRO_VERSION" ]; then + releasever_opt=("--config-opts=releasever=$DISTRO_VERSION") +fi # shellcheck disable=SC2086 -eval mock --configdir "$mock_config_dir" -r "${CHROOT_NAME}" \ - ${repo_dels[*]} ${repo_adds[*]} \ - $MOCK_OPTIONS $RPM_BUILD_OPTIONS "$TARGET" +eval mock --configdir "$mock_config_dir" -r "${CHROOT_NAME}" \ + ${repo_dels[*]} ${repo_adds[*]} --disablerepo=\*-debug* \ + "${releasever_opt[@]}" $MOCK_OPTIONS $RPM_BUILD_OPTIONS "$TARGET" diff --git a/packaging/rpmlint--ignore-unused-rpmlintrc.patch b/packaging/rpmlint--ignore-unused-rpmlintrc.patch new file mode 100644 index 00000000000..f24075ff35c --- /dev/null +++ b/packaging/rpmlint--ignore-unused-rpmlintrc.patch @@ -0,0 +1,41 @@ +From 060fbdd03d03b0b9835b861a72f9aeb25347277d Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Tue, 25 Jan 2022 14:29:05 +0100 +Subject: [PATCH] Add new option --ignore-unused-rpmlintrc. + +The option skips reporting of unused-rpmlintrc-filter errors. + +Fixes: #794. +--- + rpmlint/cli.py | 2 ++ + rpmlint/lint.py | 3 ++- + test/test_lint.py | 3 ++- + 3 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/rpmlint/cli.py b/rpmlint/cli.py +index 81d5b92b..8a7bc09e 100644 +--- a/rpmlint/cli.py ++++ b/rpmlint/cli.py +@@ -82,6 +82,8 @@ def process_lint_args(argv): + parser.add_argument('-i', '--installed', nargs='+', default='', help='installed packages to be validated by rpmlint') + parser.add_argument('-t', '--time-report', action='store_true', help='print time report for run checks') + parser.add_argument('-T', '--profile', action='store_true', help='print cProfile report') ++ parser.add_argument('--ignore-unused-rpmlintrc', action='store_true', ++ help='Do not report "unused-rpmlintrc-filter" errors') + lint_modes_parser = parser.add_mutually_exclusive_group() + lint_modes_parser.add_argument('-s', '--strict', action='store_true', help='treat all messages as errors') + lint_modes_parser.add_argument('-P', '--permissive', action='store_true', help='treat individual errors as non-fatal') +diff --git a/rpmlint/lint.py b/rpmlint/lint.py +index a98d2c04..1d5e0050 100644 +--- a/rpmlint/lint.py ++++ b/rpmlint/lint.py +@@ -277,7 +277,8 @@ + + # validate used filters in rpmlintrc + if is_last: +- self.output.validate_filters(pkg) ++ if not self.options['ignore_unused_rpmlintrc']: ++ self.output.validate_filters(pkg) + + if spec_checks: + self.specfiles_checked += 1 diff --git a/repomd.xml.key b/repomd.xml.key new file mode 100644 index 00000000000..f3d1c756a9b --- /dev/null +++ b/repomd.xml.key @@ -0,0 +1,19 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBEeWWzoRBAC9glKjWUuOJxFBEWefD+9m+9oQnrmtBEn4uW7JeC3RQtwf0Ib7 +kWO7N7z/Kk0NMmA5eqrBlfBY3rDb1qWS4A1W+nzusMmsWGVhFjbc9pY/Tv/HBtpL +vygt6/DssYBh38ynkAa9bfRHhpaLNxrZ0iwQA58J3xTrvbIDff9UO9YBawCgx0KI ++wh+NJM/kHeqKISXQsgXmx8D/R0gpb48c+7hh5Ge5YXu+SNofJCcCWcsnWE2zo23 +Ne+mWtsNguszM7JezXvrfyVXagwVny1Tes6RD1DIr0fSQBVprEc9g0T/zf2R8vb5 +S+8WguKIOr2t2aMLZMnrgqvDeCFQfwDBiqNW8Gc1bX9TLwHh+bVizyqprM2WcReI +pECIA/9Im5e60CsVc5UwBgmgNFWkUAAw87upG0Do0OVi5YIp+G/LrvvqdYExPZvg +dNCyABHuRz73RxOIN2zhfCGifUfud+wb37bMSfbbrjSNGfK+VyDijc4UJwfrPGak +N6SKJC1Nf9c7u1ujVOKspbE/JRfSqC7mJ5qrUEA6xSSZs1EgVrQwc2NpZW5jZSBP +QlMgUHJvamVjdCA8c2NpZW5jZUBidWlsZC5vcGVuc3VzZS5vcmc+iGYEExECACYF +Al1ue4QCGwMFCRn20EoGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAB23MClD2L +uMCFAJ9kHHB+GuenwAnWst7mdR4cHkhs+ACeM56DBVwcwCAES/DuH0glULgZhgaI +RgQTEQIABgUCR5ZbOgAKCRA7MBG3a51lI6bqAKChyrk96dWoOdFYRI9Lh3Dhk7RW +KwCfSlpN87ipcMW2KFKnxtn6TX0FCms= +=ezH9 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/src/binding/fortran/mpif_h/fproto.h.new b/src/binding/fortran/mpif_h/fproto.h.new new file mode 100644 index 00000000000..a1dd655f448 --- /dev/null +++ b/src/binding/fortran/mpif_h/fproto.h.new @@ -0,0 +1,9 @@ +/* + * Copyright (C) by Argonne National Laboratory + * See COPYRIGHT in top-level directory + * + * This file is automatically generated by buildiface + * DO NOT EDIT + */ +/* Prototypes for Fortran Interface Functions */ +